@vc-shell/framework 1.0.153 → 1.0.155
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +26 -0
- package/core/composables/useMenuService/index.ts +30 -24
- package/core/directives/loading/styles.css +1 -1
- package/core/types/index.ts +5 -1
- package/dist/core/composables/useMenuService/index.d.ts +2 -2
- package/dist/core/composables/useMenuService/index.d.ts.map +1 -1
- package/dist/core/types/index.d.ts +5 -1
- package/dist/core/types/index.d.ts.map +1 -1
- package/dist/framework.js +12756 -12644
- package/dist/index.css +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/shared/components/popup-handler/components/vc-popup-container/vc-popup-container.vue.d.ts.map +1 -1
- package/dist/shared/components/popup-handler/types/index.d.ts +2 -2
- package/dist/shared/components/popup-handler/types/index.d.ts.map +1 -1
- package/dist/shared/modules/dynamic/components/FIELD_MAP.d.ts.map +1 -1
- package/dist/shared/modules/dynamic/components/SchemaRender.d.ts +42 -3
- package/dist/shared/modules/dynamic/components/SchemaRender.d.ts.map +1 -1
- package/dist/shared/modules/dynamic/components/factories.d.ts +19 -17
- package/dist/shared/modules/dynamic/components/factories.d.ts.map +1 -1
- package/dist/shared/modules/dynamic/components/fields/Button.d.ts +15 -6
- package/dist/shared/modules/dynamic/components/fields/Button.d.ts.map +1 -1
- package/dist/shared/modules/dynamic/components/fields/Card.d.ts +14 -5
- package/dist/shared/modules/dynamic/components/fields/Card.d.ts.map +1 -1
- package/dist/shared/modules/dynamic/components/fields/Checkbox.d.ts +15 -6
- package/dist/shared/modules/dynamic/components/fields/Checkbox.d.ts.map +1 -1
- package/dist/shared/modules/dynamic/components/fields/ContentField.d.ts +15 -6
- package/dist/shared/modules/dynamic/components/fields/ContentField.d.ts.map +1 -1
- package/dist/shared/modules/dynamic/components/fields/CustomComponent.d.ts +137 -0
- package/dist/shared/modules/dynamic/components/fields/CustomComponent.d.ts.map +1 -0
- package/dist/shared/modules/dynamic/components/fields/DynamicProperty.d.ts +14 -5
- package/dist/shared/modules/dynamic/components/fields/DynamicProperty.d.ts.map +1 -1
- package/dist/shared/modules/dynamic/components/fields/EditorField.d.ts +15 -6
- package/dist/shared/modules/dynamic/components/fields/EditorField.d.ts.map +1 -1
- package/dist/shared/modules/dynamic/components/fields/Fieldset.d.ts +15 -6
- package/dist/shared/modules/dynamic/components/fields/Fieldset.d.ts.map +1 -1
- package/dist/shared/modules/dynamic/components/fields/GalleryField.d.ts +15 -6
- package/dist/shared/modules/dynamic/components/fields/GalleryField.d.ts.map +1 -1
- package/dist/shared/modules/dynamic/components/fields/ImageField.d.ts +15 -6
- package/dist/shared/modules/dynamic/components/fields/ImageField.d.ts.map +1 -1
- package/dist/shared/modules/dynamic/components/fields/InputCurrency.d.ts +15 -6
- package/dist/shared/modules/dynamic/components/fields/InputCurrency.d.ts.map +1 -1
- package/dist/shared/modules/dynamic/components/fields/InputField.d.ts +15 -6
- package/dist/shared/modules/dynamic/components/fields/InputField.d.ts.map +1 -1
- package/dist/shared/modules/dynamic/components/fields/MultivalueField.d.ts +15 -6
- package/dist/shared/modules/dynamic/components/fields/MultivalueField.d.ts.map +1 -1
- package/dist/shared/modules/dynamic/components/fields/RatingField.d.ts +137 -0
- package/dist/shared/modules/dynamic/components/fields/RatingField.d.ts.map +1 -0
- package/dist/shared/modules/dynamic/components/fields/SelectField.d.ts +15 -6
- package/dist/shared/modules/dynamic/components/fields/SelectField.d.ts.map +1 -1
- package/dist/shared/modules/dynamic/components/fields/StatusField.d.ts +15 -6
- package/dist/shared/modules/dynamic/components/fields/StatusField.d.ts.map +1 -1
- package/dist/shared/modules/dynamic/components/fields/SwitchField.d.ts +137 -0
- package/dist/shared/modules/dynamic/components/fields/SwitchField.d.ts.map +1 -0
- package/dist/shared/modules/dynamic/components/fields/Table.d.ts +137 -0
- package/dist/shared/modules/dynamic/components/fields/Table.d.ts.map +1 -0
- package/dist/shared/modules/dynamic/components/fields/TextareaField.d.ts +15 -6
- package/dist/shared/modules/dynamic/components/fields/TextareaField.d.ts.map +1 -1
- package/dist/shared/modules/dynamic/components/fields/VideoField.d.ts +15 -6
- package/dist/shared/modules/dynamic/components/fields/VideoField.d.ts.map +1 -1
- package/dist/shared/modules/dynamic/components/fields/props.d.ts +15 -6
- package/dist/shared/modules/dynamic/components/fields/props.d.ts.map +1 -1
- package/dist/shared/modules/dynamic/composables/index.d.ts +2 -0
- package/dist/shared/modules/dynamic/composables/index.d.ts.map +1 -1
- package/dist/shared/modules/dynamic/composables/useFilterBuilder/index.d.ts +1 -0
- package/dist/shared/modules/dynamic/composables/useFilterBuilder/index.d.ts.map +1 -1
- package/dist/shared/modules/dynamic/composables/useTableTemplates/index.d.ts +12 -0
- package/dist/shared/modules/dynamic/composables/useTableTemplates/index.d.ts.map +1 -0
- package/dist/shared/modules/dynamic/{helpers/toolbarReducer.d.ts → composables/useToolbarReducer/index.d.ts} +6 -5
- package/dist/shared/modules/dynamic/composables/useToolbarReducer/index.d.ts.map +1 -0
- package/dist/shared/modules/dynamic/factories/base/useDetailsFactory.d.ts +1 -1
- package/dist/shared/modules/dynamic/factories/base/useDetailsFactory.d.ts.map +1 -1
- package/dist/shared/modules/dynamic/factories/types/index.d.ts +2 -2
- package/dist/shared/modules/dynamic/factories/types/index.d.ts.map +1 -1
- package/dist/shared/modules/dynamic/helpers/nodeBuilder.d.ts.map +1 -1
- package/dist/shared/modules/dynamic/helpers/visibilityHandler.d.ts +4 -0
- package/dist/shared/modules/dynamic/helpers/visibilityHandler.d.ts.map +1 -0
- package/dist/shared/modules/dynamic/index.d.ts +2 -1
- package/dist/shared/modules/dynamic/index.d.ts.map +1 -1
- package/dist/shared/modules/dynamic/pages/dynamic-blade-form.vue.d.ts +15 -2
- package/dist/shared/modules/dynamic/pages/dynamic-blade-form.vue.d.ts.map +1 -1
- package/dist/shared/modules/dynamic/pages/dynamic-blade-list.vue.d.ts +14 -1
- package/dist/shared/modules/dynamic/pages/dynamic-blade-list.vue.d.ts.map +1 -1
- package/dist/shared/modules/dynamic/types/index.d.ts +138 -36
- package/dist/shared/modules/dynamic/types/index.d.ts.map +1 -1
- package/dist/shared/modules/dynamic/types/models.d.ts +13 -21
- package/dist/shared/modules/dynamic/types/models.d.ts.map +1 -1
- package/dist/shared/utilities/vueUtils.d.ts +1 -1
- package/dist/shared/utilities/vueUtils.d.ts.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/ui/components/atoms/index.d.ts +0 -1
- package/dist/ui/components/atoms/index.d.ts.map +1 -1
- package/dist/ui/components/atoms/vc-col/vc-col.vue.d.ts +4 -4
- package/dist/ui/components/atoms/vc-label/vc-label.vue.d.ts.map +1 -1
- package/dist/ui/components/molecules/vc-editor/vc-editor.vue.d.ts.map +1 -1
- package/dist/ui/components/molecules/vc-field/_internal/vc-field-type/vc-field-type.vue.d.ts +1 -1
- package/dist/ui/components/molecules/vc-field/_internal/vc-field-type/vc-field-type.vue.d.ts.map +1 -1
- package/dist/ui/components/molecules/vc-field/vc-field.vue.d.ts +16 -2
- package/dist/ui/components/molecules/vc-field/vc-field.vue.d.ts.map +1 -1
- package/dist/ui/components/molecules/vc-input/vc-input.vue.d.ts +4 -4
- package/dist/ui/components/molecules/vc-input/vc-input.vue.d.ts.map +1 -1
- package/dist/ui/components/molecules/vc-rating/index.d.ts +1 -119
- package/dist/ui/components/molecules/vc-rating/index.d.ts.map +1 -1
- package/dist/ui/components/molecules/vc-rating/vc-rating.vue.d.ts +10 -3
- package/dist/ui/components/molecules/vc-rating/vc-rating.vue.d.ts.map +1 -1
- package/dist/ui/components/molecules/vc-select/vc-select.vue.d.ts.map +1 -1
- package/dist/ui/components/organisms/vc-app/_internal/vc-app-bar/vc-app-bar.vue.d.ts.map +1 -1
- package/dist/ui/components/organisms/vc-table/vc-table.vue.d.ts +6 -6
- package/dist/ui/components/organisms/vc-table/vc-table.vue.d.ts.map +1 -1
- package/package.json +6 -6
- package/shared/components/blade-navigation/components/vc-blade-navigation/vc-blade-navigation.vue +11 -11
- package/shared/components/popup-handler/components/vc-popup-container/vc-popup-container.vue +4 -1
- package/shared/components/popup-handler/types/index.ts +2 -5
- package/shared/modules/dynamic/components/FIELD_MAP.ts +8 -0
- package/shared/modules/dynamic/components/SchemaRender.ts +15 -5
- package/shared/modules/dynamic/components/factories.ts +53 -35
- package/shared/modules/dynamic/components/fields/Button.ts +1 -2
- package/shared/modules/dynamic/components/fields/Card.ts +15 -6
- package/shared/modules/dynamic/components/fields/Checkbox.ts +15 -16
- package/shared/modules/dynamic/components/fields/ContentField.ts +2 -2
- package/shared/modules/dynamic/components/fields/CustomComponent.ts +19 -0
- package/shared/modules/dynamic/components/fields/DynamicProperty.ts +1 -2
- package/shared/modules/dynamic/components/fields/EditorField.ts +11 -14
- package/shared/modules/dynamic/components/fields/Fieldset.ts +62 -68
- package/shared/modules/dynamic/components/fields/GalleryField.ts +1 -2
- package/shared/modules/dynamic/components/fields/ImageField.ts +1 -2
- package/shared/modules/dynamic/components/fields/InputCurrency.ts +11 -14
- package/shared/modules/dynamic/components/fields/InputField.ts +11 -14
- package/shared/modules/dynamic/components/fields/MultivalueField.ts +11 -14
- package/shared/modules/dynamic/components/fields/RatingField.ts +21 -0
- package/shared/modules/dynamic/components/fields/SelectField.ts +11 -14
- package/shared/modules/dynamic/components/fields/StatusField.ts +1 -4
- package/shared/modules/dynamic/components/fields/SwitchField.ts +22 -0
- package/shared/modules/dynamic/components/fields/Table.ts +58 -0
- package/shared/modules/dynamic/components/fields/TextareaField.ts +11 -14
- package/shared/modules/dynamic/components/fields/VideoField.ts +1 -2
- package/shared/modules/dynamic/components/fields/props.ts +1 -5
- package/shared/modules/dynamic/composables/index.ts +2 -0
- package/shared/modules/dynamic/composables/useFilterBuilder/index.ts +25 -26
- package/shared/modules/dynamic/composables/useTableTemplates/index.ts +63 -0
- package/shared/modules/dynamic/composables/useToolbarReducer/index.ts +71 -0
- package/shared/modules/dynamic/factories/base/useDetailsFactory.ts +2 -2
- package/shared/modules/dynamic/factories/types/index.ts +1 -1
- package/shared/modules/dynamic/helpers/nodeBuilder.ts +60 -39
- package/shared/modules/dynamic/helpers/visibilityHandler.ts +22 -0
- package/shared/modules/dynamic/index.ts +2 -1
- package/shared/modules/dynamic/pages/dynamic-blade-form.vue +47 -42
- package/shared/modules/dynamic/pages/dynamic-blade-list.vue +48 -88
- package/shared/modules/dynamic/types/index.ts +159 -34
- package/shared/modules/dynamic/types/models.ts +22 -21
- package/shared/utilities/vueUtils.ts +5 -1
- package/ui/components/atoms/index.ts +0 -1
- package/ui/components/atoms/vc-col/vc-col.vue +3 -3
- package/ui/components/atoms/vc-label/vc-label.vue +21 -7
- package/ui/components/molecules/vc-editor/vc-editor.vue +15 -7
- package/ui/components/molecules/vc-field/_internal/vc-field-type/vc-field-type.vue +22 -17
- package/ui/components/molecules/vc-field/vc-field.vue +48 -25
- package/ui/components/molecules/vc-input/vc-input.vue +7 -9
- package/ui/components/molecules/vc-multivalue/vc-multivalue.vue +1 -1
- package/ui/components/molecules/vc-rating/index.ts +1 -10
- package/ui/components/molecules/vc-rating/vc-rating.stories.ts +1 -1
- package/ui/components/molecules/vc-rating/vc-rating.vue +10 -5
- package/ui/components/molecules/vc-select/vc-select.vue +4 -5
- package/ui/components/organisms/vc-app/_internal/vc-app-bar/vc-app-bar.vue +23 -5
- package/ui/components/organisms/vc-blade/_internal/vc-blade-toolbar/_internal/vc-blade-toolbar-button/vc-blade-toolbar-button.vue +1 -1
- package/ui/components/organisms/vc-table/_internal/vc-table-column-switcher/vc-table-column-switcher.vue +16 -24
- package/ui/components/organisms/vc-table/vc-table.vue +6 -5
- package/dist/shared/modules/dynamic/helpers/toolbarReducer.d.ts.map +0 -1
- package/dist/ui/components/atoms/vc-info-row/index.d.ts +0 -32
- package/dist/ui/components/atoms/vc-info-row/index.d.ts.map +0 -1
- package/dist/ui/components/atoms/vc-info-row/vc-info-row.stories.d.ts +0 -7
- package/dist/ui/components/atoms/vc-info-row/vc-info-row.stories.d.ts.map +0 -1
- package/dist/ui/components/atoms/vc-info-row/vc-info-row.vue.d.ts +0 -32
- package/dist/ui/components/atoms/vc-info-row/vc-info-row.vue.d.ts.map +0 -1
- package/shared/modules/dynamic/helpers/toolbarReducer.ts +0 -43
- package/ui/components/atoms/vc-info-row/index.ts +0 -3
- package/ui/components/atoms/vc-info-row/vc-info-row.stories.ts +0 -25
- package/ui/components/atoms/vc-info-row/vc-info-row.vue +0 -40
|
@@ -11,12 +11,14 @@ import {
|
|
|
11
11
|
IButton,
|
|
12
12
|
IInputCurrency,
|
|
13
13
|
IFieldset,
|
|
14
|
-
IControlBaseOptions,
|
|
15
14
|
IStatusField,
|
|
16
15
|
IContentField,
|
|
17
16
|
IVideoField,
|
|
18
17
|
IImageField,
|
|
19
18
|
ITextareaField,
|
|
19
|
+
ISwitch,
|
|
20
|
+
ITable,
|
|
21
|
+
IRating,
|
|
20
22
|
} from "./../types/models";
|
|
21
23
|
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
22
24
|
import { markRaw } from "vue";
|
|
@@ -36,12 +38,11 @@ import {
|
|
|
36
38
|
VcVideo,
|
|
37
39
|
VcTextarea,
|
|
38
40
|
VcMultivalue,
|
|
41
|
+
VcSwitch,
|
|
42
|
+
VcTable,
|
|
43
|
+
VcRating,
|
|
39
44
|
} from "../../../../ui/components";
|
|
40
45
|
|
|
41
|
-
export const ControlBase = ({ visibility = undefined }: IControlBaseOptions): IControlBaseOptions => ({
|
|
42
|
-
visibility,
|
|
43
|
-
});
|
|
44
|
-
|
|
45
46
|
export const ControlBaseProps = ({
|
|
46
47
|
rules = undefined,
|
|
47
48
|
label = undefined,
|
|
@@ -66,151 +67,168 @@ export const ControlBaseProps = ({
|
|
|
66
67
|
...rest,
|
|
67
68
|
});
|
|
68
69
|
|
|
69
|
-
export const MultivalueField = ({ props, slots
|
|
70
|
+
export const MultivalueField = ({ props, slots }: IMultivalueField): IMultivalueField => ({
|
|
70
71
|
component: markRaw(VcMultivalue),
|
|
71
72
|
props: {
|
|
72
73
|
...ControlBaseProps(props),
|
|
73
74
|
...props,
|
|
74
75
|
},
|
|
75
|
-
|
|
76
|
+
|
|
76
77
|
slots,
|
|
77
78
|
});
|
|
78
79
|
|
|
79
|
-
export const SelectField = ({ props, slots
|
|
80
|
+
export const SelectField = ({ props, slots }: ISelectField): ISelectField => ({
|
|
80
81
|
component: markRaw(VcSelect) as any,
|
|
81
82
|
props: {
|
|
82
83
|
...ControlBaseProps(props),
|
|
83
84
|
...props,
|
|
84
85
|
},
|
|
85
|
-
|
|
86
|
+
|
|
86
87
|
slots,
|
|
87
88
|
});
|
|
88
89
|
|
|
89
|
-
export const StatusField = ({ props, slots
|
|
90
|
+
export const StatusField = ({ props, slots }: IStatusField): IStatusField => ({
|
|
90
91
|
component: markRaw(VcStatus),
|
|
91
92
|
props: {
|
|
92
93
|
...ControlBaseProps(props),
|
|
93
94
|
...props,
|
|
94
95
|
},
|
|
95
|
-
|
|
96
|
+
|
|
96
97
|
slots,
|
|
97
98
|
});
|
|
98
99
|
|
|
99
|
-
export const InputField = ({ props,
|
|
100
|
+
export const InputField = ({ props, slots }: IInputField): IInputField => ({
|
|
100
101
|
component: markRaw(VcInput),
|
|
101
102
|
props: {
|
|
102
103
|
...ControlBaseProps(props),
|
|
103
104
|
...props,
|
|
104
105
|
},
|
|
105
|
-
|
|
106
|
+
|
|
106
107
|
slots,
|
|
107
108
|
});
|
|
108
109
|
|
|
109
|
-
export const TextareaField = ({ props
|
|
110
|
+
export const TextareaField = ({ props }: ITextareaField): ITextareaField => ({
|
|
110
111
|
component: markRaw(VcTextarea),
|
|
111
112
|
props: {
|
|
112
113
|
...ControlBaseProps(props),
|
|
113
114
|
...props,
|
|
114
115
|
},
|
|
115
|
-
options: ControlBase(options),
|
|
116
116
|
});
|
|
117
117
|
|
|
118
|
-
export const ContentField = ({ props
|
|
118
|
+
export const ContentField = ({ props }: IContentField): IContentField => ({
|
|
119
119
|
component: markRaw(VcField),
|
|
120
120
|
props: {
|
|
121
121
|
...ControlBaseProps(props),
|
|
122
122
|
...props,
|
|
123
123
|
},
|
|
124
|
-
options: ControlBase(options),
|
|
125
124
|
});
|
|
126
125
|
|
|
127
|
-
export const ImageField = ({ props
|
|
126
|
+
export const ImageField = ({ props }: IImageField): IImageField => ({
|
|
128
127
|
component: markRaw(VcImage),
|
|
129
128
|
props: {
|
|
130
129
|
...ControlBaseProps(props),
|
|
131
130
|
...props,
|
|
132
131
|
},
|
|
133
|
-
options: ControlBase(options),
|
|
134
132
|
});
|
|
135
133
|
|
|
136
|
-
export const VideoField = ({ props
|
|
134
|
+
export const VideoField = ({ props }: IInputField): IVideoField => ({
|
|
137
135
|
component: markRaw(VcVideo),
|
|
138
136
|
props: {
|
|
139
137
|
...ControlBaseProps(props),
|
|
140
138
|
...props,
|
|
141
139
|
},
|
|
142
|
-
options: ControlBase(options),
|
|
143
140
|
});
|
|
144
141
|
|
|
145
|
-
export const InputCurrency = ({ props
|
|
142
|
+
export const InputCurrency = ({ props }: IInputCurrency): IInputCurrency => ({
|
|
146
143
|
component: markRaw(VcInputCurrency),
|
|
147
144
|
props: {
|
|
148
145
|
...ControlBaseProps(props),
|
|
149
146
|
...props,
|
|
150
147
|
},
|
|
151
|
-
options: ControlBase(options),
|
|
152
148
|
});
|
|
153
149
|
|
|
154
|
-
export const CardCollection = ({ props,
|
|
150
|
+
export const CardCollection = ({ props, slots }: ICardCollection): ICardCollection => ({
|
|
155
151
|
component: markRaw(VcCard),
|
|
156
152
|
props: {
|
|
157
153
|
...props,
|
|
158
154
|
...ControlBaseProps(props),
|
|
159
155
|
},
|
|
160
|
-
|
|
156
|
+
|
|
161
157
|
slots,
|
|
162
158
|
});
|
|
163
159
|
|
|
164
|
-
export const DynamicProperties = ({ props
|
|
160
|
+
export const DynamicProperties = ({ props }: IDynamicProperties): IDynamicProperties => ({
|
|
165
161
|
component: markRaw(VcDynamicProperty),
|
|
166
162
|
props: {
|
|
167
163
|
...props,
|
|
168
164
|
...ControlBaseProps(props),
|
|
169
165
|
},
|
|
170
|
-
options: ControlBase(options),
|
|
171
166
|
});
|
|
172
167
|
|
|
173
|
-
export const EditorField = ({ props
|
|
168
|
+
export const EditorField = ({ props }: IEditorField): IEditorField => ({
|
|
174
169
|
component: markRaw(VcEditor),
|
|
175
170
|
props: {
|
|
176
171
|
...ControlBaseProps(props),
|
|
177
172
|
...props,
|
|
178
173
|
},
|
|
179
|
-
options: ControlBase(options),
|
|
180
174
|
});
|
|
181
175
|
|
|
182
|
-
export const Gallery = ({ props
|
|
176
|
+
export const Gallery = ({ props }: IGallery): IGallery => ({
|
|
183
177
|
component: markRaw(VcGallery),
|
|
184
178
|
props: {
|
|
185
179
|
...ControlBaseProps(props),
|
|
186
180
|
...props,
|
|
187
181
|
},
|
|
188
|
-
options: ControlBase(options),
|
|
189
182
|
});
|
|
190
183
|
|
|
191
|
-
export const Checkbox = ({ props,
|
|
184
|
+
export const Checkbox = ({ props, slots }: ICheckbox): ICheckbox => ({
|
|
192
185
|
component: markRaw(VcCheckbox),
|
|
193
186
|
props: {
|
|
194
187
|
...ControlBaseProps(props),
|
|
195
188
|
...props,
|
|
196
189
|
},
|
|
197
|
-
|
|
190
|
+
|
|
198
191
|
slots,
|
|
199
192
|
});
|
|
200
193
|
|
|
201
|
-
export const Button = ({ props,
|
|
194
|
+
export const Button = ({ props, slots }: IButton): IButton => ({
|
|
202
195
|
component: markRaw(VcButton),
|
|
203
196
|
props: {
|
|
204
197
|
...ControlBaseProps(props),
|
|
205
198
|
...props,
|
|
206
199
|
},
|
|
207
|
-
|
|
200
|
+
|
|
208
201
|
slots,
|
|
209
202
|
});
|
|
210
203
|
|
|
204
|
+
export const Switch = ({ props }: ISwitch): ISwitch => ({
|
|
205
|
+
component: markRaw(VcSwitch),
|
|
206
|
+
props: {
|
|
207
|
+
...ControlBaseProps(props),
|
|
208
|
+
...props,
|
|
209
|
+
},
|
|
210
|
+
});
|
|
211
|
+
|
|
211
212
|
export const Fieldset = ({ columns, fields, property, remove }: IFieldset): IFieldset => ({
|
|
212
213
|
columns,
|
|
213
214
|
fields,
|
|
214
215
|
property,
|
|
215
216
|
remove,
|
|
216
217
|
});
|
|
218
|
+
|
|
219
|
+
export const Table = ({ props, slots }: ITable): ITable => ({
|
|
220
|
+
component: markRaw(VcTable),
|
|
221
|
+
props: {
|
|
222
|
+
...ControlBaseProps(props),
|
|
223
|
+
...props,
|
|
224
|
+
},
|
|
225
|
+
slots,
|
|
226
|
+
});
|
|
227
|
+
|
|
228
|
+
export const Rating = ({ props }: IRating): IRating => ({
|
|
229
|
+
component: markRaw(VcRating),
|
|
230
|
+
props: {
|
|
231
|
+
...ControlBaseProps(props),
|
|
232
|
+
...props,
|
|
233
|
+
},
|
|
234
|
+
});
|
|
@@ -19,13 +19,12 @@ export default {
|
|
|
19
19
|
unref(props.bladeContext.scope)?.[props.element.method]();
|
|
20
20
|
},
|
|
21
21
|
},
|
|
22
|
-
options: props.baseOptions,
|
|
23
22
|
slots: {
|
|
24
23
|
default: () => props.element.content,
|
|
25
24
|
},
|
|
26
25
|
});
|
|
27
26
|
|
|
28
|
-
return
|
|
27
|
+
return h(field.component as Component, field.props, field.slots);
|
|
29
28
|
};
|
|
30
29
|
},
|
|
31
30
|
};
|
|
@@ -45,15 +45,26 @@ export default {
|
|
|
45
45
|
const field = CardCollection({
|
|
46
46
|
props: {
|
|
47
47
|
...props.baseProps,
|
|
48
|
-
header: props.
|
|
48
|
+
header: props.baseProps.label,
|
|
49
49
|
isCollapsable: props.element.collapsible,
|
|
50
50
|
isCollapsed: restoreCollapsed(props.element.id),
|
|
51
51
|
"onState:collapsed": (e: boolean) => handleCollapsed(props.element.id, e),
|
|
52
52
|
},
|
|
53
|
-
options: props.baseOptions,
|
|
54
53
|
|
|
55
54
|
slots: {
|
|
56
|
-
default: () =>
|
|
55
|
+
default: () =>
|
|
56
|
+
h(
|
|
57
|
+
"div",
|
|
58
|
+
{
|
|
59
|
+
class: {
|
|
60
|
+
"tw-flex": true,
|
|
61
|
+
"tw-flex-col": true,
|
|
62
|
+
"tw-p-4": !!props.element.removePadding === true ? false : true,
|
|
63
|
+
"tw-gap-4": true,
|
|
64
|
+
},
|
|
65
|
+
},
|
|
66
|
+
toValue(props.fields),
|
|
67
|
+
),
|
|
57
68
|
actions: () => {
|
|
58
69
|
if (props.element.action && props.fieldContext && props.currentLocale) {
|
|
59
70
|
const elem = nodeBuilder({
|
|
@@ -78,9 +89,7 @@ export default {
|
|
|
78
89
|
return localStorage?.getItem(key) === "true";
|
|
79
90
|
}
|
|
80
91
|
|
|
81
|
-
return
|
|
82
|
-
? h(field.component as Component, field.props, field.slots)
|
|
83
|
-
: null;
|
|
92
|
+
return hasNoComment.value ? h(field.component as Component, field.props, field.slots) : null;
|
|
84
93
|
};
|
|
85
94
|
},
|
|
86
95
|
};
|
|
@@ -1,8 +1,10 @@
|
|
|
1
|
-
import { ExtractPropTypes, h, Component } from "vue";
|
|
1
|
+
import { ExtractPropTypes, h, Component, unref } from "vue";
|
|
2
2
|
import { Checkbox } from "../factories";
|
|
3
3
|
import componentProps from "./props";
|
|
4
4
|
import ValidationField from "./ValidationField";
|
|
5
5
|
import { CheckboxSchema } from "../../types";
|
|
6
|
+
import { unwrapInterpolation } from "../../helpers/unwrapInterpolation";
|
|
7
|
+
import { toValue } from "@vueuse/core";
|
|
6
8
|
|
|
7
9
|
export default {
|
|
8
10
|
name: "Checkbox",
|
|
@@ -15,29 +17,26 @@ export default {
|
|
|
15
17
|
trueValue: props.element.trueValue,
|
|
16
18
|
falseValue: props.element.falseValue,
|
|
17
19
|
},
|
|
18
|
-
options: props.baseOptions,
|
|
19
20
|
slots: {
|
|
20
|
-
default: () => props.element.content,
|
|
21
|
+
default: () => unref(unwrapInterpolation(props.element.content, toValue(props.fieldContext!))),
|
|
21
22
|
},
|
|
22
23
|
});
|
|
23
24
|
|
|
24
25
|
const render = h(field.component as Component, field.props, field.slots);
|
|
25
26
|
|
|
26
27
|
if (field.props.rules) {
|
|
27
|
-
return
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
)
|
|
38
|
-
: null;
|
|
28
|
+
return h(
|
|
29
|
+
ValidationField,
|
|
30
|
+
{
|
|
31
|
+
props: field.props,
|
|
32
|
+
slots: field.slots,
|
|
33
|
+
index: props.elIndex,
|
|
34
|
+
rows: props.rows,
|
|
35
|
+
},
|
|
36
|
+
() => render,
|
|
37
|
+
);
|
|
39
38
|
} else {
|
|
40
|
-
return
|
|
39
|
+
return render;
|
|
41
40
|
}
|
|
42
41
|
};
|
|
43
42
|
},
|
|
@@ -13,13 +13,13 @@ export default {
|
|
|
13
13
|
...props.baseProps,
|
|
14
14
|
type: props.element.variant,
|
|
15
15
|
copyable: props.element.copyable || false,
|
|
16
|
+
orientation: props.element.orientation,
|
|
16
17
|
},
|
|
17
|
-
options: props.baseOptions,
|
|
18
18
|
});
|
|
19
19
|
|
|
20
20
|
const render = h(field.component as Component, field.props);
|
|
21
21
|
|
|
22
|
-
return
|
|
22
|
+
return render;
|
|
23
23
|
};
|
|
24
24
|
},
|
|
25
25
|
};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { CustomComponentSchema } from "./../../types";
|
|
2
|
+
import { ExtractPropTypes, resolveComponent, h } from "vue";
|
|
3
|
+
import componentProps from "./props";
|
|
4
|
+
|
|
5
|
+
export default {
|
|
6
|
+
name: "CustomComponentRenderer",
|
|
7
|
+
props: componentProps,
|
|
8
|
+
setup(props: ExtractPropTypes<typeof componentProps> & { element: CustomComponentSchema }) {
|
|
9
|
+
return () => {
|
|
10
|
+
const component = resolveComponent(props.element?.name);
|
|
11
|
+
|
|
12
|
+
return typeof component === "object"
|
|
13
|
+
? h(component, {
|
|
14
|
+
context: props.bladeContext,
|
|
15
|
+
})
|
|
16
|
+
: null;
|
|
17
|
+
};
|
|
18
|
+
},
|
|
19
|
+
};
|
|
@@ -116,13 +116,12 @@ export default {
|
|
|
116
116
|
key: prop.multilanguage ? prop.name + "_" + prop.id + "_" + props.currentLocale : prop.name + "_" + prop.id,
|
|
117
117
|
currentLanguage: props.currentLocale,
|
|
118
118
|
},
|
|
119
|
-
options: props.baseOptions,
|
|
120
119
|
}),
|
|
121
120
|
);
|
|
122
121
|
});
|
|
123
122
|
|
|
124
123
|
return () => {
|
|
125
|
-
return properties && properties.length
|
|
124
|
+
return properties && properties.length
|
|
126
125
|
? properties?.map((field) => h(field.component as Component, unrefNested(field.props)))
|
|
127
126
|
: null;
|
|
128
127
|
};
|
|
@@ -14,26 +14,23 @@ export default {
|
|
|
14
14
|
currentLanguage: props.currentLocale,
|
|
15
15
|
assetsFolder: unref(props.formData).id || unref(props.formData).categoryId,
|
|
16
16
|
},
|
|
17
|
-
options: props.baseOptions,
|
|
18
17
|
});
|
|
19
18
|
|
|
20
19
|
const render = h(field.component as Component, field.props);
|
|
21
20
|
|
|
22
21
|
if (field.props.rules) {
|
|
23
|
-
return
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
)
|
|
34
|
-
: null;
|
|
22
|
+
return h(
|
|
23
|
+
ValidationField,
|
|
24
|
+
{
|
|
25
|
+
props: field.props,
|
|
26
|
+
index: props.elIndex,
|
|
27
|
+
rows: props.rows,
|
|
28
|
+
key: `${String(field.props.key)}_validation`,
|
|
29
|
+
},
|
|
30
|
+
() => render,
|
|
31
|
+
);
|
|
35
32
|
} else {
|
|
36
|
-
return
|
|
33
|
+
return render;
|
|
37
34
|
}
|
|
38
35
|
};
|
|
39
36
|
},
|
|
@@ -13,75 +13,69 @@ export default {
|
|
|
13
13
|
const { fields: fieldsetFields } = toRefs(props);
|
|
14
14
|
|
|
15
15
|
return () =>
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
const divideByCols = _.chunk(fields, props.element.columns || 1) ?? [];
|
|
16
|
+
toValue(fieldsetFields.value).map((fields, index, arr) => {
|
|
17
|
+
const divideByCols = _.chunk(fields, props.element.columns || 1) ?? [];
|
|
19
18
|
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
19
|
+
return h(
|
|
20
|
+
"div",
|
|
21
|
+
{
|
|
22
|
+
class: "tw-flex tw-row tw-relative",
|
|
23
|
+
key: `fieldset-${index}`,
|
|
24
|
+
},
|
|
25
|
+
[
|
|
26
|
+
h("div", { class: "tw-flex-1 tw-gap-4 tw-flex tw-flex-col tw-min-w-0" }, [
|
|
27
|
+
divideByCols.map((itemsArr, colIndex) => {
|
|
28
|
+
return h(
|
|
29
|
+
VcRow,
|
|
30
|
+
{
|
|
31
|
+
key: `col-${colIndex}-${index}`,
|
|
32
|
+
class: {
|
|
33
|
+
"tw-relative": true,
|
|
34
|
+
"tw-gap-4": true,
|
|
35
|
+
"!tw-flex-wrap": true,
|
|
36
|
+
"!tw-flex !tw-flex-row": !!props.element.aspectRatio,
|
|
37
|
+
},
|
|
38
|
+
},
|
|
39
|
+
() => [
|
|
40
|
+
...itemsArr.map((item, itemIndex) => {
|
|
41
|
+
return h(
|
|
42
|
+
VcCol,
|
|
43
|
+
{
|
|
44
|
+
key: `col-${itemIndex}-${colIndex}-${index}`,
|
|
45
|
+
size: "aspectRatio" in props.element ? props.element.aspectRatio?.[itemIndex] : 1,
|
|
38
46
|
},
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
"tw-m-2": !isMobile.value,
|
|
73
|
-
"tw-absolute tw-top-0 tw-right-0": isMobile.value,
|
|
74
|
-
"!tw-hidden": arr.length === 1,
|
|
75
|
-
},
|
|
76
|
-
onClick: () => {
|
|
77
|
-
if (props.element.remove?.method)
|
|
78
|
-
props.bladeContext.scope?.[props.element.remove?.method](index);
|
|
79
|
-
},
|
|
80
|
-
})
|
|
81
|
-
: undefined,
|
|
82
|
-
],
|
|
83
|
-
);
|
|
84
|
-
})
|
|
85
|
-
: null;
|
|
47
|
+
() => {
|
|
48
|
+
if (typeof item === "object") {
|
|
49
|
+
return h(item, {
|
|
50
|
+
elIndex: index,
|
|
51
|
+
rows: arr.length,
|
|
52
|
+
key: `item-${itemIndex}-${colIndex}-${index}`,
|
|
53
|
+
});
|
|
54
|
+
}
|
|
55
|
+
},
|
|
56
|
+
);
|
|
57
|
+
}),
|
|
58
|
+
],
|
|
59
|
+
);
|
|
60
|
+
}),
|
|
61
|
+
]),
|
|
62
|
+
props.element.remove
|
|
63
|
+
? h(VcButton, {
|
|
64
|
+
iconSize: "m",
|
|
65
|
+
icon: "fas fa-times-circle",
|
|
66
|
+
text: true,
|
|
67
|
+
class: {
|
|
68
|
+
"tw-m-2": !isMobile.value,
|
|
69
|
+
"tw-absolute tw-top-0 tw-right-0": isMobile.value,
|
|
70
|
+
"!tw-hidden": arr.length === 1,
|
|
71
|
+
},
|
|
72
|
+
onClick: () => {
|
|
73
|
+
if (props.element.remove?.method) props.bladeContext.scope?.[props.element.remove?.method](index);
|
|
74
|
+
},
|
|
75
|
+
})
|
|
76
|
+
: undefined,
|
|
77
|
+
],
|
|
78
|
+
);
|
|
79
|
+
});
|
|
86
80
|
},
|
|
87
81
|
};
|
|
@@ -132,10 +132,9 @@ export default {
|
|
|
132
132
|
onSort: editImages,
|
|
133
133
|
hideAfterUpload: props.element.hideAfterUpload,
|
|
134
134
|
},
|
|
135
|
-
options: props.baseOptions,
|
|
136
135
|
});
|
|
137
136
|
|
|
138
|
-
return
|
|
137
|
+
return h(field.component as Component, unrefNested(field.props));
|
|
139
138
|
};
|
|
140
139
|
},
|
|
141
140
|
};
|
|
@@ -19,12 +19,11 @@ export default {
|
|
|
19
19
|
size: props.element.size,
|
|
20
20
|
background: props.element.background,
|
|
21
21
|
},
|
|
22
|
-
options: props.baseOptions,
|
|
23
22
|
});
|
|
24
23
|
|
|
25
24
|
const render = h(field.component as Component, field.props);
|
|
26
25
|
|
|
27
|
-
return
|
|
26
|
+
return render;
|
|
28
27
|
};
|
|
29
28
|
},
|
|
30
29
|
};
|
|
@@ -29,25 +29,22 @@ export default {
|
|
|
29
29
|
},
|
|
30
30
|
clearable: props.element.clearable || false,
|
|
31
31
|
},
|
|
32
|
-
options: props.baseOptions,
|
|
33
32
|
});
|
|
34
33
|
const render = h(field.component as Component, field.props);
|
|
35
34
|
|
|
36
35
|
if (field.props.rules) {
|
|
37
|
-
return
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
)
|
|
48
|
-
: null;
|
|
36
|
+
return h(
|
|
37
|
+
ValidationField,
|
|
38
|
+
{
|
|
39
|
+
props: field.props,
|
|
40
|
+
index: props.elIndex,
|
|
41
|
+
rows: props.rows,
|
|
42
|
+
key: `${String(field.props.key)}_validation`,
|
|
43
|
+
},
|
|
44
|
+
() => render,
|
|
45
|
+
);
|
|
49
46
|
} else {
|
|
50
|
-
return
|
|
47
|
+
return render;
|
|
51
48
|
}
|
|
52
49
|
};
|
|
53
50
|
},
|