From f352f7ac51568fc1ca51376f8a79de8b7dc496bd Mon Sep 17 00:00:00 2001 From: Jordan Blasenhauer Date: Fri, 17 May 2024 14:23:17 +0200 Subject: [PATCH] update POC * enhance and create some components * removed useless files * start pinia store logic --- vuejs/client/src/components/Builder.vue | 47 +++-- .../src/components/Forms/Field/Checkbox.vue | 9 +- .../src/components/Forms/Field/Input.vue | 24 ++- .../src/components/Forms/Field/Select.vue | 20 +- .../src/components/Icons/Button/Add.vue | 49 +++++ vuejs/client/src/components/Widget/Button.vue | 174 ++++++++++++++++++ .../src/components/Widget/Container.vue | 15 +- vuejs/client/src/components/Widget/Flex.vue | 21 ++- vuejs/client/src/components/Widget/Grid.vue | 13 +- .../src/components/Widget/GridLayout.vue | 17 +- vuejs/client/src/pages/test/Test.vue | 13 ++ vuejs/client/src/store/bans.js | 28 --- vuejs/client/src/store/configs.js | 31 ---- vuejs/client/src/store/event.js | 34 ++++ vuejs/client/src/store/global.js | 55 ------ vuejs/client/src/store/instances.js | 54 ------ vuejs/client/src/store/jobs.js | 23 --- vuejs/client/src/store/logs.js | 16 -- vuejs/client/src/store/plugins.js | 25 --- vuejs/client/src/store/services.js | 61 ------ vuejs/client/src/store/settings.js | 60 ------ 21 files changed, 406 insertions(+), 383 deletions(-) create mode 100644 vuejs/client/src/components/Icons/Button/Add.vue create mode 100644 vuejs/client/src/components/Widget/Button.vue delete mode 100644 vuejs/client/src/store/bans.js delete mode 100644 vuejs/client/src/store/configs.js create mode 100644 vuejs/client/src/store/event.js delete mode 100644 vuejs/client/src/store/global.js delete mode 100644 vuejs/client/src/store/instances.js delete mode 100644 vuejs/client/src/store/jobs.js delete mode 100644 vuejs/client/src/store/logs.js delete mode 100644 vuejs/client/src/store/plugins.js delete mode 100644 vuejs/client/src/store/services.js delete mode 100644 vuejs/client/src/store/settings.js diff --git a/vuejs/client/src/components/Builder.vue b/vuejs/client/src/components/Builder.vue index 0e01ee88e..8e7b15162 100644 --- a/vuejs/client/src/components/Builder.vue +++ b/vuejs/client/src/components/Builder.vue @@ -6,22 +6,29 @@ import Input from "@components/Forms/Field/Input.vue"; import GridLayout from "@components/Widget/GridLayout.vue"; import Grid from "@components/Widget/Grid.vue"; -const props = defineProps({ - builder : { - type: Array, - required: true, - }, -}) - -// Example of builder -const builder = [{ - // we are starting with the top level container name - // this can be a "card", "modal", "table"... etc - "type": "card", +/* + COMPONENT DESCRIPTION + * + * + This Builder component is used to create complete pages content with multiple components. + This is an abstract component that will be used to create any kind of page content. + You need to determine each container and each widget inside it. + * + * + PROPS ARGUMENTS + * + * + builder : array, + * + * + PROPS EXAMPLE + * + * + [{ + "type": "card", // this can be a "card", "modal", "table"... etc "containerClass": "", // tailwind css grid class (items-start, ...) "containerColumns" : {"pc": 12, "tablet": 12, "mobile": 12}, - // container title - "title" : "My awesome card", + "title" : "My awesome card", // container title // Each widget need a name (here type) and associated data // We need to send specific data for each widget type widgets: [ @@ -33,8 +40,18 @@ const builder = [{ data : {containerClass : "", columns : {"pc": 6, "tablet": 12, "mobile": 12}, id: 'test-select', value: 'yes', values: ['yes', 'no'], name: 'test-select', disabled: false, required: true, label: 'Test select', tabId: '1',} } ] + }, + ] + * + * +*/ + +const props = defineProps({ + builder : { + type: Array, + required: true, }, -] +})