diff --git a/qqq-backend-core/src/main/java/com/kingsrook/qqq/backend/core/model/dashboard/widgets/blocks/actionbutton/ActionButtonBlockData.java b/qqq-backend-core/src/main/java/com/kingsrook/qqq/backend/core/model/dashboard/widgets/blocks/actionbutton/ActionButtonBlockData.java new file mode 100644 index 00000000..90964144 --- /dev/null +++ b/qqq-backend-core/src/main/java/com/kingsrook/qqq/backend/core/model/dashboard/widgets/blocks/actionbutton/ActionButtonBlockData.java @@ -0,0 +1,47 @@ +/* + * QQQ - Low-code Application Framework for Engineers. + * Copyright (C) 2021-2024. Kingsrook, LLC + * 651 N Broad St Ste 205 # 6917 | Middletown DE 19709 | United States + * contact@kingsrook.com + * https://github.com/Kingsrook/ + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + +package com.kingsrook.qqq.backend.core.model.dashboard.widgets.blocks.actionbutton; + + +import com.kingsrook.qqq.backend.core.model.dashboard.widgets.blocks.AbstractBlockWidgetData; +import com.kingsrook.qqq.backend.core.model.dashboard.widgets.blocks.base.BaseSlots; +import com.kingsrook.qqq.backend.core.model.dashboard.widgets.blocks.base.BaseStyles; + + +/******************************************************************************* + ** a button (for a process - not sure yet what this could do in a standalone + ** widget?) to submit the process screen to run a specific action (e.g., not just + ** 'next') + *******************************************************************************/ +public class ActionButtonBlockData extends AbstractBlockWidgetData +{ + + /******************************************************************************* + ** + *******************************************************************************/ + @Override + public String getBlockTypeName() + { + return "ACTION_BUTTON"; + } + +} diff --git a/qqq-backend-core/src/main/java/com/kingsrook/qqq/backend/core/model/dashboard/widgets/blocks/actionbutton/ActionButtonValues.java b/qqq-backend-core/src/main/java/com/kingsrook/qqq/backend/core/model/dashboard/widgets/blocks/actionbutton/ActionButtonValues.java new file mode 100644 index 00000000..8f084f94 --- /dev/null +++ b/qqq-backend-core/src/main/java/com/kingsrook/qqq/backend/core/model/dashboard/widgets/blocks/actionbutton/ActionButtonValues.java @@ -0,0 +1,120 @@ +/* + * QQQ - Low-code Application Framework for Engineers. + * Copyright (C) 2021-2024. Kingsrook, LLC + * 651 N Broad St Ste 205 # 6917 | Middletown DE 19709 | United States + * contact@kingsrook.com + * https://github.com/Kingsrook/ + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + +package com.kingsrook.qqq.backend.core.model.dashboard.widgets.blocks.actionbutton; + + +import com.kingsrook.qqq.backend.core.model.dashboard.widgets.blocks.BlockValuesInterface; + + +/******************************************************************************* + ** + *******************************************************************************/ +public class ActionButtonValues implements BlockValuesInterface +{ + private String label; + private String actionCode; + + + + /******************************************************************************* + ** Constructor + ** + *******************************************************************************/ + public ActionButtonValues() + { + } + + + + /******************************************************************************* + ** Constructor + ** + *******************************************************************************/ + public ActionButtonValues(String label, String actionCode) + { + setLabel(label); + setActionCode(actionCode); + } + + + + /******************************************************************************* + ** Getter for label + *******************************************************************************/ + public String getLabel() + { + return (this.label); + } + + + + /******************************************************************************* + ** Setter for label + *******************************************************************************/ + public void setLabel(String label) + { + this.label = label; + } + + + + /******************************************************************************* + ** Fluent setter for label + *******************************************************************************/ + public ActionButtonValues withLabel(String label) + { + this.label = label; + return (this); + } + + + + /******************************************************************************* + ** Getter for actionCode + *******************************************************************************/ + public String getActionCode() + { + return (this.actionCode); + } + + + + /******************************************************************************* + ** Setter for actionCode + *******************************************************************************/ + public void setActionCode(String actionCode) + { + this.actionCode = actionCode; + } + + + + /******************************************************************************* + ** Fluent setter for actionCode + *******************************************************************************/ + public ActionButtonValues withActionCode(String actionCode) + { + this.actionCode = actionCode; + return (this); + } + +} diff --git a/qqq-backend-core/src/main/java/com/kingsrook/qqq/backend/core/model/dashboard/widgets/blocks/audio/AudioBlockData.java b/qqq-backend-core/src/main/java/com/kingsrook/qqq/backend/core/model/dashboard/widgets/blocks/audio/AudioBlockData.java new file mode 100644 index 00000000..7cd051d2 --- /dev/null +++ b/qqq-backend-core/src/main/java/com/kingsrook/qqq/backend/core/model/dashboard/widgets/blocks/audio/AudioBlockData.java @@ -0,0 +1,45 @@ +/* + * QQQ - Low-code Application Framework for Engineers. + * Copyright (C) 2021-2024. Kingsrook, LLC + * 651 N Broad St Ste 205 # 6917 | Middletown DE 19709 | United States + * contact@kingsrook.com + * https://github.com/Kingsrook/ + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + +package com.kingsrook.qqq.backend.core.model.dashboard.widgets.blocks.audio; + + +import com.kingsrook.qqq.backend.core.model.dashboard.widgets.blocks.AbstractBlockWidgetData; +import com.kingsrook.qqq.backend.core.model.dashboard.widgets.blocks.base.BaseSlots; +import com.kingsrook.qqq.backend.core.model.dashboard.widgets.blocks.base.BaseStyles; + + +/******************************************************************************* + ** block that plays an audio file + *******************************************************************************/ +public class AudioBlockData extends AbstractBlockWidgetData +{ + + /******************************************************************************* + ** + *******************************************************************************/ + @Override + public String getBlockTypeName() + { + return "AUDIO"; + } + +} diff --git a/qqq-backend-core/src/main/java/com/kingsrook/qqq/backend/core/model/dashboard/widgets/blocks/audio/AudioValues.java b/qqq-backend-core/src/main/java/com/kingsrook/qqq/backend/core/model/dashboard/widgets/blocks/audio/AudioValues.java new file mode 100644 index 00000000..bffa3f03 --- /dev/null +++ b/qqq-backend-core/src/main/java/com/kingsrook/qqq/backend/core/model/dashboard/widgets/blocks/audio/AudioValues.java @@ -0,0 +1,130 @@ +/* + * QQQ - Low-code Application Framework for Engineers. + * Copyright (C) 2021-2024. Kingsrook, LLC + * 651 N Broad St Ste 205 # 6917 | Middletown DE 19709 | United States + * contact@kingsrook.com + * https://github.com/Kingsrook/ + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + +package com.kingsrook.qqq.backend.core.model.dashboard.widgets.blocks.audio; + + +import com.kingsrook.qqq.backend.core.model.dashboard.widgets.blocks.BlockValuesInterface; + + +/******************************************************************************* + ** + *******************************************************************************/ +public class AudioValues implements BlockValuesInterface +{ + private String path; + private boolean showControls = false; + private boolean autoPlay = true; + + + + /******************************************************************************* + ** Getter for path + *******************************************************************************/ + public String getPath() + { + return (this.path); + } + + + + /******************************************************************************* + ** Setter for path + *******************************************************************************/ + public void setPath(String path) + { + this.path = path; + } + + + + /******************************************************************************* + ** Fluent setter for path + *******************************************************************************/ + public AudioValues withPath(String path) + { + this.path = path; + return (this); + } + + + + /******************************************************************************* + ** Getter for showControls + *******************************************************************************/ + public boolean getShowControls() + { + return (this.showControls); + } + + + + /******************************************************************************* + ** Setter for showControls + *******************************************************************************/ + public void setShowControls(boolean showControls) + { + this.showControls = showControls; + } + + + + /******************************************************************************* + ** Fluent setter for showControls + *******************************************************************************/ + public AudioValues withShowControls(boolean showControls) + { + this.showControls = showControls; + return (this); + } + + + + /******************************************************************************* + ** Getter for autoPlay + *******************************************************************************/ + public boolean getAutoPlay() + { + return (this.autoPlay); + } + + + + /******************************************************************************* + ** Setter for autoPlay + *******************************************************************************/ + public void setAutoPlay(boolean autoPlay) + { + this.autoPlay = autoPlay; + } + + + + /******************************************************************************* + ** Fluent setter for autoPlay + *******************************************************************************/ + public AudioValues withAutoPlay(boolean autoPlay) + { + this.autoPlay = autoPlay; + return (this); + } + +} diff --git a/qqq-backend-core/src/main/java/com/kingsrook/qqq/backend/core/model/dashboard/widgets/blocks/image/ImageBlockData.java b/qqq-backend-core/src/main/java/com/kingsrook/qqq/backend/core/model/dashboard/widgets/blocks/image/ImageBlockData.java new file mode 100644 index 00000000..823c1fa9 --- /dev/null +++ b/qqq-backend-core/src/main/java/com/kingsrook/qqq/backend/core/model/dashboard/widgets/blocks/image/ImageBlockData.java @@ -0,0 +1,44 @@ +/* + * QQQ - Low-code Application Framework for Engineers. + * Copyright (C) 2021-2024. Kingsrook, LLC + * 651 N Broad St Ste 205 # 6917 | Middletown DE 19709 | United States + * contact@kingsrook.com + * https://github.com/Kingsrook/ + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + +package com.kingsrook.qqq.backend.core.model.dashboard.widgets.blocks.image; + + +import com.kingsrook.qqq.backend.core.model.dashboard.widgets.blocks.AbstractBlockWidgetData; +import com.kingsrook.qqq.backend.core.model.dashboard.widgets.blocks.base.BaseSlots; + + +/******************************************************************************* + ** block to display an image + *******************************************************************************/ +public class ImageBlockData extends AbstractBlockWidgetData +{ + + /******************************************************************************* + ** + *******************************************************************************/ + @Override + public String getBlockTypeName() + { + return "IMAGE"; + } + +} diff --git a/qqq-backend-core/src/main/java/com/kingsrook/qqq/backend/core/model/dashboard/widgets/blocks/image/ImageStyles.java b/qqq-backend-core/src/main/java/com/kingsrook/qqq/backend/core/model/dashboard/widgets/blocks/image/ImageStyles.java new file mode 100644 index 00000000..9ab944ee --- /dev/null +++ b/qqq-backend-core/src/main/java/com/kingsrook/qqq/backend/core/model/dashboard/widgets/blocks/image/ImageStyles.java @@ -0,0 +1,130 @@ +/* + * QQQ - Low-code Application Framework for Engineers. + * Copyright (C) 2021-2024. Kingsrook, LLC + * 651 N Broad St Ste 205 # 6917 | Middletown DE 19709 | United States + * contact@kingsrook.com + * https://github.com/Kingsrook/ + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + +package com.kingsrook.qqq.backend.core.model.dashboard.widgets.blocks.image; + + +import com.kingsrook.qqq.backend.core.model.dashboard.widgets.blocks.BlockStylesInterface; + + +/******************************************************************************* + ** + *******************************************************************************/ +public class ImageStyles implements BlockStylesInterface +{ + private String width; + private String height; + private boolean bordered = false; + + + + /******************************************************************************* + ** Getter for bordered + *******************************************************************************/ + public boolean getBordered() + { + return (this.bordered); + } + + + + /******************************************************************************* + ** Setter for bordered + *******************************************************************************/ + public void setBordered(boolean bordered) + { + this.bordered = bordered; + } + + + + /******************************************************************************* + ** Fluent setter for bordered + *******************************************************************************/ + public ImageStyles withBordered(boolean bordered) + { + this.bordered = bordered; + return (this); + } + + + + /******************************************************************************* + ** Getter for width + *******************************************************************************/ + public String getWidth() + { + return (this.width); + } + + + + /******************************************************************************* + ** Setter for width + *******************************************************************************/ + public void setWidth(String width) + { + this.width = width; + } + + + + /******************************************************************************* + ** Fluent setter for width + *******************************************************************************/ + public ImageStyles withWidth(String width) + { + this.width = width; + return (this); + } + + + + /******************************************************************************* + ** Getter for height + *******************************************************************************/ + public String getHeight() + { + return (this.height); + } + + + + /******************************************************************************* + ** Setter for height + *******************************************************************************/ + public void setHeight(String height) + { + this.height = height; + } + + + + /******************************************************************************* + ** Fluent setter for height + *******************************************************************************/ + public ImageStyles withHeight(String height) + { + this.height = height; + return (this); + } + +} diff --git a/qqq-backend-core/src/main/java/com/kingsrook/qqq/backend/core/model/dashboard/widgets/blocks/image/ImageValues.java b/qqq-backend-core/src/main/java/com/kingsrook/qqq/backend/core/model/dashboard/widgets/blocks/image/ImageValues.java new file mode 100644 index 00000000..8cffaacc --- /dev/null +++ b/qqq-backend-core/src/main/java/com/kingsrook/qqq/backend/core/model/dashboard/widgets/blocks/image/ImageValues.java @@ -0,0 +1,98 @@ +/* + * QQQ - Low-code Application Framework for Engineers. + * Copyright (C) 2021-2024. Kingsrook, LLC + * 651 N Broad St Ste 205 # 6917 | Middletown DE 19709 | United States + * contact@kingsrook.com + * https://github.com/Kingsrook/ + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + +package com.kingsrook.qqq.backend.core.model.dashboard.widgets.blocks.image; + + +import com.kingsrook.qqq.backend.core.model.dashboard.widgets.blocks.BlockValuesInterface; + + +/******************************************************************************* + ** + *******************************************************************************/ +public class ImageValues implements BlockValuesInterface +{ + private String path; + private String alt; + + + + /******************************************************************************* + ** Getter for path + *******************************************************************************/ + public String getPath() + { + return (this.path); + } + + + + /******************************************************************************* + ** Setter for path + *******************************************************************************/ + public void setPath(String path) + { + this.path = path; + } + + + + /******************************************************************************* + ** Fluent setter for path + *******************************************************************************/ + public ImageValues withPath(String path) + { + this.path = path; + return (this); + } + + + + /******************************************************************************* + ** Getter for alt + *******************************************************************************/ + public String getAlt() + { + return (this.alt); + } + + + + /******************************************************************************* + ** Setter for alt + *******************************************************************************/ + public void setAlt(String alt) + { + this.alt = alt; + } + + + + /******************************************************************************* + ** Fluent setter for alt + *******************************************************************************/ + public ImageValues withAlt(String alt) + { + this.alt = alt; + return (this); + } + +} diff --git a/qqq-backend-core/src/main/java/com/kingsrook/qqq/backend/core/model/dashboard/widgets/blocks/inputfield/InputFieldBlockData.java b/qqq-backend-core/src/main/java/com/kingsrook/qqq/backend/core/model/dashboard/widgets/blocks/inputfield/InputFieldBlockData.java new file mode 100644 index 00000000..feea9c67 --- /dev/null +++ b/qqq-backend-core/src/main/java/com/kingsrook/qqq/backend/core/model/dashboard/widgets/blocks/inputfield/InputFieldBlockData.java @@ -0,0 +1,45 @@ +/* + * QQQ - Low-code Application Framework for Engineers. + * Copyright (C) 2021-2024. Kingsrook, LLC + * 651 N Broad St Ste 205 # 6917 | Middletown DE 19709 | United States + * contact@kingsrook.com + * https://github.com/Kingsrook/ + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + +package com.kingsrook.qqq.backend.core.model.dashboard.widgets.blocks.inputfield; + + +import com.kingsrook.qqq.backend.core.model.dashboard.widgets.blocks.AbstractBlockWidgetData; +import com.kingsrook.qqq.backend.core.model.dashboard.widgets.blocks.base.BaseSlots; +import com.kingsrook.qqq.backend.core.model.dashboard.widgets.blocks.base.BaseStyles; + + +/******************************************************************************* + ** block to display an input field - initially targeted at widgets-in-processes + *******************************************************************************/ +public class InputFieldBlockData extends AbstractBlockWidgetData +{ + + /******************************************************************************* + ** + *******************************************************************************/ + @Override + public String getBlockTypeName() + { + return "INPUT_FIELD"; + } + +} diff --git a/qqq-backend-core/src/main/java/com/kingsrook/qqq/backend/core/model/dashboard/widgets/blocks/inputfield/InputFieldValues.java b/qqq-backend-core/src/main/java/com/kingsrook/qqq/backend/core/model/dashboard/widgets/blocks/inputfield/InputFieldValues.java new file mode 100644 index 00000000..bacf5355 --- /dev/null +++ b/qqq-backend-core/src/main/java/com/kingsrook/qqq/backend/core/model/dashboard/widgets/blocks/inputfield/InputFieldValues.java @@ -0,0 +1,152 @@ +/* + * QQQ - Low-code Application Framework for Engineers. + * Copyright (C) 2021-2024. Kingsrook, LLC + * 651 N Broad St Ste 205 # 6917 | Middletown DE 19709 | United States + * contact@kingsrook.com + * https://github.com/Kingsrook/ + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + +package com.kingsrook.qqq.backend.core.model.dashboard.widgets.blocks.inputfield; + + +import com.kingsrook.qqq.backend.core.model.dashboard.widgets.blocks.BlockValuesInterface; +import com.kingsrook.qqq.backend.core.model.metadata.fields.QFieldMetaData; + + +/******************************************************************************* + ** + *******************************************************************************/ +public class InputFieldValues implements BlockValuesInterface +{ + private QFieldMetaData fieldMetaData; + private Boolean autoFocus; + private Boolean submitOnEnter; + + + + /******************************************************************************* + ** Constructor + ** + *******************************************************************************/ + public InputFieldValues() + { + } + + + + /******************************************************************************* + ** Constructor + ** + *******************************************************************************/ + public InputFieldValues(QFieldMetaData fieldMetaData) + { + setFieldMetaData(fieldMetaData); + } + + + + /******************************************************************************* + ** Getter for fieldMetaData + *******************************************************************************/ + public QFieldMetaData getFieldMetaData() + { + return (this.fieldMetaData); + } + + + + /******************************************************************************* + ** Setter for fieldMetaData + *******************************************************************************/ + public void setFieldMetaData(QFieldMetaData fieldMetaData) + { + this.fieldMetaData = fieldMetaData; + } + + + + /******************************************************************************* + ** Fluent setter for fieldMetaData + *******************************************************************************/ + public InputFieldValues withFieldMetaData(QFieldMetaData fieldMetaData) + { + this.fieldMetaData = fieldMetaData; + return (this); + } + + + + /******************************************************************************* + ** Getter for autoFocus + *******************************************************************************/ + public Boolean getAutoFocus() + { + return (this.autoFocus); + } + + + + /******************************************************************************* + ** Setter for autoFocus + *******************************************************************************/ + public void setAutoFocus(Boolean autoFocus) + { + this.autoFocus = autoFocus; + } + + + + /******************************************************************************* + ** Fluent setter for autoFocus + *******************************************************************************/ + public InputFieldValues withAutoFocus(Boolean autoFocus) + { + this.autoFocus = autoFocus; + return (this); + } + + + + /******************************************************************************* + ** Getter for submitOnEnter + *******************************************************************************/ + public Boolean getSubmitOnEnter() + { + return (this.submitOnEnter); + } + + + + /******************************************************************************* + ** Setter for submitOnEnter + *******************************************************************************/ + public void setSubmitOnEnter(Boolean submitOnEnter) + { + this.submitOnEnter = submitOnEnter; + } + + + + /******************************************************************************* + ** Fluent setter for submitOnEnter + *******************************************************************************/ + public InputFieldValues withSubmitOnEnter(Boolean submitOnEnter) + { + this.submitOnEnter = submitOnEnter; + return (this); + } + +}