@vc-shell/framework 1.0.152 → 1.0.154
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 +12620 -12517
- package/dist/index.css +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/shared/components/blade-navigation/composables/useBladeNavigation/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-menu/vc-app-menu.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/blade-navigation/composables/useBladeNavigation/index.ts +8 -3
- 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-menu/vc-app-menu.vue +3 -1
- 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
|
@@ -5,6 +5,7 @@ import {
|
|
|
5
5
|
VcImage,
|
|
6
6
|
VcInput,
|
|
7
7
|
VcMultivalue,
|
|
8
|
+
VcRating,
|
|
8
9
|
VcStatus,
|
|
9
10
|
VcVideo,
|
|
10
11
|
} from "./../../../../ui/components";
|
|
@@ -57,6 +58,13 @@ export interface SettingsDetails extends SettingsBase {
|
|
|
57
58
|
|
|
58
59
|
export type IViewComponentName = "DynamicBladeForm" | "DynamicBladeList";
|
|
59
60
|
|
|
61
|
+
type ToolbarSchema = {
|
|
62
|
+
id: string;
|
|
63
|
+
title: string;
|
|
64
|
+
icon: string;
|
|
65
|
+
method: string;
|
|
66
|
+
};
|
|
67
|
+
|
|
60
68
|
export interface SettingsBase {
|
|
61
69
|
/**
|
|
62
70
|
* Blade url
|
|
@@ -91,13 +99,10 @@ export interface SettingsBase {
|
|
|
91
99
|
* [`saveChanges`, `remove`] methods in `DynamicBladeForm`
|
|
92
100
|
*
|
|
93
101
|
* [`openAddBlade`, `refresh`, `removeItems`, `save`] methods in `DynamicBladeList`
|
|
102
|
+
*
|
|
103
|
+
* If not set - toolbar data will try to consume from composable, if not found - toolbar will not be added
|
|
94
104
|
*/
|
|
95
|
-
toolbar
|
|
96
|
-
id: string;
|
|
97
|
-
title: string;
|
|
98
|
-
icon: string;
|
|
99
|
-
method: string;
|
|
100
|
-
}[];
|
|
105
|
+
toolbar?: ToolbarSchema[];
|
|
101
106
|
/**
|
|
102
107
|
* Blade component
|
|
103
108
|
*/
|
|
@@ -129,6 +134,12 @@ export interface SettingsBase {
|
|
|
129
134
|
* @default undefined
|
|
130
135
|
*/
|
|
131
136
|
menuItem?: MenuItemConfig;
|
|
137
|
+
/**
|
|
138
|
+
* Collapsed blade width in percentage
|
|
139
|
+
* @default "50%"
|
|
140
|
+
*/
|
|
141
|
+
// TODO Add to documentation
|
|
142
|
+
width?: `${number}%`;
|
|
132
143
|
}
|
|
133
144
|
|
|
134
145
|
export interface ListContentSchema {
|
|
@@ -137,6 +148,7 @@ export interface ListContentSchema {
|
|
|
137
148
|
filter?: FilterSchema;
|
|
138
149
|
multiselect?: boolean;
|
|
139
150
|
header?: boolean;
|
|
151
|
+
footer?: boolean;
|
|
140
152
|
columns?: (Omit<ITableColumns, "visible"> & {
|
|
141
153
|
id: string;
|
|
142
154
|
title: string;
|
|
@@ -227,6 +239,10 @@ export interface SchemaBase {
|
|
|
227
239
|
* @type {{ method: string }}
|
|
228
240
|
*/
|
|
229
241
|
update?: { method: string };
|
|
242
|
+
/**
|
|
243
|
+
* Adds horizontal separator after component.
|
|
244
|
+
*/
|
|
245
|
+
horizontalSeparator?: boolean;
|
|
230
246
|
}
|
|
231
247
|
|
|
232
248
|
/**
|
|
@@ -411,7 +427,9 @@ export interface VideoSchema
|
|
|
411
427
|
* Data field schema interface.
|
|
412
428
|
* @interface
|
|
413
429
|
*/
|
|
414
|
-
|
|
430
|
+
// TODO update documentation
|
|
431
|
+
export interface FieldSchema
|
|
432
|
+
extends Pick<SchemaBase, "id" | "property" | "label" | "visibility" | "tooltip" | "horizontalSeparator"> {
|
|
415
433
|
/**
|
|
416
434
|
* Component type for field.
|
|
417
435
|
* @type {"vc-field"}
|
|
@@ -427,13 +445,26 @@ export interface FieldSchema extends Pick<SchemaBase, "id" | "property" | "label
|
|
|
427
445
|
* @type {boolean}
|
|
428
446
|
*/
|
|
429
447
|
copyable?: boolean;
|
|
448
|
+
/**
|
|
449
|
+
* Field orientation.
|
|
450
|
+
* @type {"horizontal" | "vertical"}
|
|
451
|
+
* @default "vertical"
|
|
452
|
+
*/
|
|
453
|
+
orientation?: "horizontal" | "vertical";
|
|
454
|
+
/**
|
|
455
|
+
* Field columns aspect ratio.
|
|
456
|
+
* @description Uses CSS flex-grow property.
|
|
457
|
+
* @type {[number, number]}
|
|
458
|
+
*/
|
|
459
|
+
aspectRatio?: [number, number];
|
|
430
460
|
}
|
|
431
461
|
|
|
432
462
|
/**
|
|
433
463
|
* Image schema interface.
|
|
434
464
|
* @interface
|
|
435
465
|
*/
|
|
436
|
-
export interface ImageSchema
|
|
466
|
+
export interface ImageSchema
|
|
467
|
+
extends Pick<SchemaBase, "id" | "property" | "visibility" | "update" | "horizontalSeparator"> {
|
|
437
468
|
/**
|
|
438
469
|
* Component type for image.
|
|
439
470
|
* @type {"vc-image"}
|
|
@@ -475,7 +506,7 @@ export interface ImageSchema extends Pick<SchemaBase, "id" | "property" | "visib
|
|
|
475
506
|
* Status schema interface.
|
|
476
507
|
* @interface
|
|
477
508
|
*/
|
|
478
|
-
export interface StatusSchema extends Pick<SchemaBase, "id" | "visibility"> {
|
|
509
|
+
export interface StatusSchema extends Pick<SchemaBase, "id" | "visibility" | "horizontalSeparator"> {
|
|
479
510
|
/**
|
|
480
511
|
* Component type for status.
|
|
481
512
|
* @type {"vc-status"}
|
|
@@ -576,7 +607,8 @@ export interface EditorSchema extends SchemaBase {
|
|
|
576
607
|
* Interface for dynamic properties schema.
|
|
577
608
|
* @interface
|
|
578
609
|
*/
|
|
579
|
-
export interface DynamicPropertiesSchema
|
|
610
|
+
export interface DynamicPropertiesSchema
|
|
611
|
+
extends Pick<SchemaBase, "id" | "disabled" | "property" | "visibility" | "horizontalSeparator"> {
|
|
580
612
|
/**
|
|
581
613
|
* The component type for dynamic properties.
|
|
582
614
|
* @type {"vc-dynamic-properties"}
|
|
@@ -634,7 +666,8 @@ export interface GallerySchema extends Omit<SchemaBase, "placeholder" | "multila
|
|
|
634
666
|
* Interface for a card schema.
|
|
635
667
|
* @interface
|
|
636
668
|
*/
|
|
637
|
-
export interface CardSchema
|
|
669
|
+
export interface CardSchema
|
|
670
|
+
extends RequiredBy<Pick<SchemaBase, "id" | "label" | "visibility" | "horizontalSeparator">, "label"> {
|
|
638
671
|
/**
|
|
639
672
|
* Component type for the card.
|
|
640
673
|
* @type {"vc-card"}
|
|
@@ -655,17 +688,38 @@ export interface CardSchema extends RequiredBy<Pick<SchemaBase, "id" | "label" |
|
|
|
655
688
|
* @type {boolean}
|
|
656
689
|
*/
|
|
657
690
|
collapsible?: boolean;
|
|
691
|
+
/**
|
|
692
|
+
* Removes internal padding from the card.
|
|
693
|
+
* @type {boolean}
|
|
694
|
+
* @default false
|
|
695
|
+
*/
|
|
696
|
+
removePadding?: boolean;
|
|
658
697
|
}
|
|
659
698
|
|
|
660
|
-
export interface WidgetsSchema extends Pick<SchemaBase, "id"> {
|
|
699
|
+
export interface WidgetsSchema extends Pick<SchemaBase, "id" | "horizontalSeparator"> {
|
|
661
700
|
component: "vc-widgets";
|
|
662
701
|
children: string[];
|
|
663
702
|
}
|
|
664
703
|
|
|
665
704
|
export interface CheckboxSchema extends Omit<SchemaBase, "multilanguage" | "placeholder"> {
|
|
705
|
+
/**
|
|
706
|
+
* Component type for checkbox.
|
|
707
|
+
* @type {"vc-checkbox"}
|
|
708
|
+
*/
|
|
666
709
|
component: "vc-checkbox";
|
|
710
|
+
/**
|
|
711
|
+
* Checkbox text content.
|
|
712
|
+
*/
|
|
667
713
|
content: string;
|
|
714
|
+
/**
|
|
715
|
+
* True value for the switch.
|
|
716
|
+
* @type {boolean}
|
|
717
|
+
*/
|
|
668
718
|
trueValue?: boolean;
|
|
719
|
+
/**
|
|
720
|
+
* False value for the switch.
|
|
721
|
+
* @type {boolean}
|
|
722
|
+
*/
|
|
669
723
|
falseValue?: boolean;
|
|
670
724
|
}
|
|
671
725
|
|
|
@@ -673,7 +727,8 @@ export interface CheckboxSchema extends Omit<SchemaBase, "multilanguage" | "plac
|
|
|
673
727
|
* Fieldset schema interface.
|
|
674
728
|
* @interface
|
|
675
729
|
*/
|
|
676
|
-
export interface FieldsetSchema
|
|
730
|
+
export interface FieldsetSchema
|
|
731
|
+
extends PartialBy<Pick<SchemaBase, "id" | "property" | "visibility" | "horizontalSeparator">, "property"> {
|
|
677
732
|
/**
|
|
678
733
|
* Component type for the fieldset.
|
|
679
734
|
* @type {"vc-fieldset"}
|
|
@@ -710,10 +765,37 @@ export interface FieldsetSchema extends PartialBy<Pick<SchemaBase, "id" | "prope
|
|
|
710
765
|
};
|
|
711
766
|
}
|
|
712
767
|
|
|
768
|
+
/**
|
|
769
|
+
* Switch schema interface.
|
|
770
|
+
* @interface
|
|
771
|
+
*/
|
|
772
|
+
// TODO add to documentation
|
|
773
|
+
export interface SwitchSchema extends Omit<SchemaBase, "placeholder" | "multilanguage"> {
|
|
774
|
+
/**
|
|
775
|
+
* Component type for switch.
|
|
776
|
+
* @type {"vc-switch"}
|
|
777
|
+
*/
|
|
778
|
+
component: "vc-switch";
|
|
779
|
+
/**
|
|
780
|
+
* True value for the switch.
|
|
781
|
+
* @type {boolean}
|
|
782
|
+
*/
|
|
783
|
+
trueValue?: boolean;
|
|
784
|
+
/**
|
|
785
|
+
* False value for the switch.
|
|
786
|
+
* @type {boolean}
|
|
787
|
+
*/
|
|
788
|
+
falseValue?: boolean;
|
|
789
|
+
}
|
|
790
|
+
|
|
791
|
+
// TODO add to documentation
|
|
792
|
+
export type TableSchema = Omit<ListContentSchema, "filter"> & Pick<SchemaBase, "id" | "property" | "visibility">;
|
|
793
|
+
|
|
713
794
|
/**
|
|
714
795
|
* Button schema interface.
|
|
796
|
+
* @interface
|
|
715
797
|
*/
|
|
716
|
-
export interface ButtonSchema extends Pick<SchemaBase, "id" | "disabled" | "visibility"> {
|
|
798
|
+
export interface ButtonSchema extends Pick<SchemaBase, "id" | "disabled" | "visibility" | "horizontalSeparator"> {
|
|
717
799
|
/**
|
|
718
800
|
* Component type.
|
|
719
801
|
* @type {"vc-button"}
|
|
@@ -752,6 +834,49 @@ export interface ButtonSchema extends Pick<SchemaBase, "id" | "disabled" | "visi
|
|
|
752
834
|
method: string;
|
|
753
835
|
}
|
|
754
836
|
|
|
837
|
+
/**
|
|
838
|
+
* Custom component schema interface.
|
|
839
|
+
* @interface
|
|
840
|
+
*/
|
|
841
|
+
// TODO add to documentation
|
|
842
|
+
export interface CustomComponentSchema extends Pick<SchemaBase, "id" | "visibility"> {
|
|
843
|
+
/**
|
|
844
|
+
* Component type for custom component.
|
|
845
|
+
* @type {vc-custom}
|
|
846
|
+
*/
|
|
847
|
+
component: "vc-custom";
|
|
848
|
+
/**
|
|
849
|
+
* Component name of custom component. Component should be registered globally.
|
|
850
|
+
*/
|
|
851
|
+
name: string;
|
|
852
|
+
}
|
|
853
|
+
|
|
854
|
+
/**
|
|
855
|
+
* Rating schema interface.
|
|
856
|
+
* @interface
|
|
857
|
+
*/
|
|
858
|
+
export interface RatingSchema
|
|
859
|
+
extends Pick<
|
|
860
|
+
SchemaBase,
|
|
861
|
+
"id" | "visibility" | "label" | "property" | "tooltip" | "horizontalSeparator" | "placeholder"
|
|
862
|
+
> {
|
|
863
|
+
/**
|
|
864
|
+
* Component type for rating.
|
|
865
|
+
* @type {"vc-rating"}
|
|
866
|
+
*/
|
|
867
|
+
component: "vc-rating";
|
|
868
|
+
/**
|
|
869
|
+
* Maximal rating size.
|
|
870
|
+
* @type {number}
|
|
871
|
+
*/
|
|
872
|
+
max?: number;
|
|
873
|
+
/**
|
|
874
|
+
* Rating component display variant.
|
|
875
|
+
* @type {"text" | "stars" | "star-and-text"}
|
|
876
|
+
*/
|
|
877
|
+
type?: ComponentProps<typeof VcRating>["variant"];
|
|
878
|
+
}
|
|
879
|
+
|
|
755
880
|
export type ControlSchema =
|
|
756
881
|
| SelectSchema
|
|
757
882
|
| InputSchema
|
|
@@ -769,35 +894,36 @@ export type ControlSchema =
|
|
|
769
894
|
| VideoSchema
|
|
770
895
|
| ImageSchema
|
|
771
896
|
| TextareaSchema
|
|
772
|
-
| MultivalueSchema
|
|
897
|
+
| MultivalueSchema
|
|
898
|
+
| SwitchSchema
|
|
899
|
+
| TableSchema
|
|
900
|
+
| CustomComponentSchema
|
|
901
|
+
| RatingSchema;
|
|
773
902
|
|
|
774
903
|
export interface FilterBase {
|
|
775
904
|
columns: {
|
|
776
905
|
title: string;
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
component: InputSchema["component"] | CheckboxSchema["component"];
|
|
780
|
-
}[];
|
|
906
|
+
id: string;
|
|
907
|
+
controls: (FilterCheckbox | FilterDateInput)[];
|
|
781
908
|
}[];
|
|
782
909
|
}
|
|
783
910
|
|
|
784
|
-
export type FilterCheckbox =
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
911
|
+
export type FilterCheckbox = {
|
|
912
|
+
id: string;
|
|
913
|
+
field: string;
|
|
914
|
+
multiple?: boolean;
|
|
915
|
+
data?: { value: string; displayName: string }[];
|
|
916
|
+
component: CheckboxSchema["component"];
|
|
790
917
|
};
|
|
791
918
|
|
|
792
|
-
export type FilterDateInput =
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
}[];
|
|
919
|
+
export type FilterDateInput = {
|
|
920
|
+
id: string;
|
|
921
|
+
field: string;
|
|
922
|
+
label?: string;
|
|
923
|
+
component: InputSchema["component"];
|
|
798
924
|
};
|
|
799
925
|
|
|
800
|
-
export type FilterSchema =
|
|
926
|
+
export type FilterSchema = FilterBase;
|
|
801
927
|
|
|
802
928
|
export interface OverridesSchema {
|
|
803
929
|
upsert?: (OverridesUpsert | OverridesReplace)[];
|
|
@@ -810,8 +936,7 @@ export interface OverridesUpsert extends OverridesReplace {
|
|
|
810
936
|
|
|
811
937
|
export interface OverridesReplace {
|
|
812
938
|
path: string;
|
|
813
|
-
|
|
814
|
-
value: ControlSchema | SettingsSchema["toolbar"][number] | SettingsSchema["menuItem"] | string | boolean;
|
|
939
|
+
value: ControlSchema | ToolbarSchema | SettingsSchema["menuItem"] | string | boolean;
|
|
815
940
|
id: string;
|
|
816
941
|
}
|
|
817
942
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
2
|
-
import {
|
|
2
|
+
import { Raw } from "vue";
|
|
3
3
|
import {
|
|
4
4
|
VcButton,
|
|
5
5
|
VcCard,
|
|
@@ -16,6 +16,9 @@ import {
|
|
|
16
16
|
VcVideo,
|
|
17
17
|
VcTextarea,
|
|
18
18
|
VcMultivalue,
|
|
19
|
+
VcSwitch,
|
|
20
|
+
VcTable,
|
|
21
|
+
VcRating,
|
|
19
22
|
} from "../../../../ui/components";
|
|
20
23
|
import type { ComponentProps, ComponentEmit, ComponentSlots } from "vue-component-type-helpers";
|
|
21
24
|
|
|
@@ -81,63 +84,52 @@ export type WithRequiredProperty<Type, Key extends keyof Type> = Type & {
|
|
|
81
84
|
[Property in Key]-?: Type[Property];
|
|
82
85
|
};
|
|
83
86
|
|
|
84
|
-
export interface IControlBaseOptions {
|
|
85
|
-
visibility?: ComputedRef<boolean | undefined>;
|
|
86
|
-
}
|
|
87
|
-
|
|
88
87
|
export type IMultivalueField = {
|
|
89
88
|
props: ComponentProps<typeof VcMultivalue> | IControlBaseProps;
|
|
90
89
|
slots?: Partial<ComponentSlots<typeof VcMultivalue>>;
|
|
91
|
-
options: IControlBaseOptions;
|
|
92
90
|
} & FieldOpts<typeof VcMultivalue>;
|
|
93
91
|
|
|
94
92
|
export type ISelectField = {
|
|
95
93
|
props: ComponentProps<typeof VcSelect> | IControlBaseProps;
|
|
96
94
|
slots?: Partial<ComponentSlots<typeof VcSelect>>;
|
|
97
|
-
options: IControlBaseOptions;
|
|
98
95
|
} & FieldOpts<typeof VcSelect>;
|
|
99
96
|
|
|
100
97
|
export type IStatusField = {
|
|
101
|
-
props: ComponentProps<typeof VcStatus
|
|
98
|
+
props: ComponentProps<typeof VcStatus>;
|
|
102
99
|
slots?: Partial<Pick<ComponentSlots<typeof VcButton>, "default">>;
|
|
103
|
-
options: IControlBaseOptions;
|
|
104
100
|
} & FieldOpts<typeof VcStatus>;
|
|
105
101
|
|
|
106
102
|
export type IInputField = {
|
|
107
103
|
props: ComponentProps<typeof VcInput> | IControlBaseProps;
|
|
108
|
-
|
|
104
|
+
|
|
109
105
|
slots?: Partial<Pick<ComponentSlots<typeof VcInput>, "append" | "prepend" | "append-inner" | "prepend-inner">>;
|
|
110
106
|
} & FieldOpts<typeof VcInput>;
|
|
111
107
|
|
|
112
108
|
export type IContentField = {
|
|
113
109
|
props: ComponentProps<typeof VcField> | IControlBaseProps;
|
|
114
|
-
options: IControlBaseOptions;
|
|
115
110
|
} & FieldOpts<typeof VcField>;
|
|
116
111
|
|
|
117
112
|
export type IVideoField = {
|
|
118
113
|
props: ComponentProps<typeof VcVideo> | IControlBaseProps;
|
|
119
|
-
options: IControlBaseOptions;
|
|
120
114
|
} & FieldOpts<typeof VcVideo>;
|
|
121
115
|
|
|
122
116
|
export type IImageField = {
|
|
123
117
|
props: ComponentProps<typeof VcImage> | IControlBaseProps;
|
|
124
|
-
options: IControlBaseOptions;
|
|
125
118
|
} & FieldOpts<typeof VcImage>;
|
|
126
119
|
|
|
127
120
|
export type IInputCurrency = {
|
|
128
121
|
props: Partial<ComponentProps<typeof VcInputCurrency>> | IControlBaseProps;
|
|
129
|
-
options: IControlBaseOptions;
|
|
130
122
|
} & FieldOpts<typeof VcInputCurrency>;
|
|
131
123
|
|
|
132
124
|
export type ICardCollection = {
|
|
133
125
|
props: ComponentProps<typeof VcCard> | IControlBaseProps;
|
|
134
|
-
|
|
126
|
+
|
|
135
127
|
slots?: Partial<Pick<ComponentSlots<typeof VcCard>, "default" | "actions">>;
|
|
136
128
|
} & FieldOpts<typeof VcCard>;
|
|
137
129
|
|
|
138
130
|
export type ICheckbox = {
|
|
139
131
|
props: ComponentProps<typeof VcCheckbox> | IControlBaseProps;
|
|
140
|
-
|
|
132
|
+
|
|
141
133
|
slots?: Partial<Pick<ComponentSlots<typeof VcCheckbox>, "default" | "error">>;
|
|
142
134
|
} & FieldOpts<typeof VcCheckbox>;
|
|
143
135
|
|
|
@@ -146,22 +138,19 @@ export type IDynamicProperties = {
|
|
|
146
138
|
| (ComponentProps<typeof VcDynamicProperty> & FromGenericEventsToProps<ComponentEmit<typeof VcDynamicProperty>>)
|
|
147
139
|
| (ComponentProps<typeof VcDynamicProperty> &
|
|
148
140
|
Omit<IControlBaseProps, keyof ComponentProps<typeof VcDynamicProperty> | "onUpdate:modelValue" | "rules">);
|
|
149
|
-
options: IControlBaseOptions;
|
|
150
141
|
} & FieldOpts<typeof VcDynamicProperty>;
|
|
151
142
|
|
|
152
143
|
export type IEditorField = {
|
|
153
144
|
props: ComponentProps<typeof VcEditor> | IControlBaseProps;
|
|
154
|
-
options: IControlBaseOptions;
|
|
155
145
|
} & FieldOpts<typeof VcEditor>;
|
|
156
146
|
|
|
157
147
|
export type IGallery = {
|
|
158
148
|
props: (ComponentProps<typeof VcGallery> & { rules: Record<string, unknown> }) | IControlBaseProps;
|
|
159
|
-
options: IControlBaseOptions;
|
|
160
149
|
} & FieldOpts<typeof VcGallery>;
|
|
161
150
|
|
|
162
151
|
export type IButton = {
|
|
163
152
|
props: ComponentProps<typeof VcButton>;
|
|
164
|
-
|
|
153
|
+
|
|
165
154
|
slots?: Partial<Pick<ComponentSlots<typeof VcButton>, "default">>;
|
|
166
155
|
} & FieldOpts<typeof VcButton>;
|
|
167
156
|
|
|
@@ -174,5 +163,17 @@ export type IFieldset = {
|
|
|
174
163
|
|
|
175
164
|
export type ITextareaField = {
|
|
176
165
|
props: ComponentProps<typeof VcTextarea> | IControlBaseProps;
|
|
177
|
-
options: IControlBaseOptions;
|
|
178
166
|
} & FieldOpts<typeof VcTextarea>;
|
|
167
|
+
|
|
168
|
+
export type ISwitch = {
|
|
169
|
+
props: ComponentProps<typeof VcSwitch> | IControlBaseProps;
|
|
170
|
+
} & FieldOpts<typeof VcSwitch>;
|
|
171
|
+
|
|
172
|
+
export type ITable = {
|
|
173
|
+
props: ComponentProps<typeof VcTable> | IControlBaseProps;
|
|
174
|
+
slots: Partial<Pick<ComponentSlots<typeof VcTable>, `item_${string}` | "notfound" | "mobile-item" | "empty">>;
|
|
175
|
+
} & FieldOpts<typeof VcTable>;
|
|
176
|
+
|
|
177
|
+
export type IRating = {
|
|
178
|
+
props: ComponentProps<typeof VcRating> | IControlBaseProps;
|
|
179
|
+
} & FieldOpts<typeof VcRating>;
|
|
@@ -4,7 +4,11 @@
|
|
|
4
4
|
import { ComponentPublicInstance, ComputedOptions, MethodOptions } from "vue";
|
|
5
5
|
|
|
6
6
|
type RemoveOnVnodePrefix<T> = {
|
|
7
|
-
[K in keyof T as K extends `onVnode${string}`
|
|
7
|
+
[K in keyof T as K extends `onVnode${string}`
|
|
8
|
+
? never
|
|
9
|
+
: K extends `on${infer Event}`
|
|
10
|
+
? Uncapitalize<`on${Event}`>
|
|
11
|
+
: K]: T[K];
|
|
8
12
|
};
|
|
9
13
|
|
|
10
14
|
type EmitsExtractor<T> = RemoveOnVnodePrefix<Pick<T, Extract<keyof T, `on${string}`>>>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div
|
|
3
3
|
class="vc-col tw-flex tw-flex-col tw-min-w-0 tw-basis-0"
|
|
4
|
-
:style="{ flexGrow:
|
|
4
|
+
:style="{ flexGrow: size }"
|
|
5
5
|
>
|
|
6
6
|
<slot></slot>
|
|
7
7
|
</div>
|
|
@@ -9,11 +9,11 @@
|
|
|
9
9
|
|
|
10
10
|
<script lang="ts" setup>
|
|
11
11
|
export interface Props {
|
|
12
|
-
size?:
|
|
12
|
+
size?: number;
|
|
13
13
|
}
|
|
14
14
|
|
|
15
15
|
withDefaults(defineProps<Props>(), {
|
|
16
|
-
size:
|
|
16
|
+
size: 1,
|
|
17
17
|
});
|
|
18
18
|
|
|
19
19
|
defineSlots<{
|
|
@@ -12,22 +12,28 @@
|
|
|
12
12
|
</div>
|
|
13
13
|
<span
|
|
14
14
|
v-if="$slots['tooltip']"
|
|
15
|
-
class="tw-grow tw-basis-0 tw-ml-1"
|
|
15
|
+
class="tw-grow tw-basis-0 tw-ml-1 tw-relative"
|
|
16
16
|
>
|
|
17
17
|
<VcIcon
|
|
18
|
+
ref="tooltipIconRef"
|
|
18
19
|
class="tw-text-[color:var(--label-tooltip-color)]"
|
|
19
20
|
:icon="tooltipIcon"
|
|
20
21
|
size="s"
|
|
21
22
|
@mouseenter="tooltipVisible = true"
|
|
22
23
|
@mouseleave="tooltipVisible = false"
|
|
23
24
|
></VcIcon>
|
|
24
|
-
<
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
25
|
+
<teleport to="body">
|
|
26
|
+
<span
|
|
27
|
+
v-if="tooltipVisible"
|
|
28
|
+
ref="tooltipRef"
|
|
29
|
+
:style="floatingStyles"
|
|
30
|
+
class="tw-absolute tw-z-10 tw-bg-white tw-border tw-border-solid tw-border-[color:#eef0f2] tw-shadow-[1px_1px_8px_rgba(126,142,157,0.25)] tw-rounded-[3px] tw-text-[color:#8e9daa] tw-font-normal tw-py-1 tw-px-2 tw-ml-4"
|
|
31
|
+
>
|
|
32
|
+
<slot name="tooltip"></slot>
|
|
33
|
+
</span>
|
|
34
|
+
</teleport>
|
|
30
35
|
</span>
|
|
36
|
+
|
|
31
37
|
<div
|
|
32
38
|
v-if="multilanguage"
|
|
33
39
|
class="tw-text-[color:var(--app-menu-item-icon-color)] tw-shrink-0"
|
|
@@ -40,6 +46,7 @@
|
|
|
40
46
|
<script lang="ts" setup>
|
|
41
47
|
import { VcIcon } from "./../../../components";
|
|
42
48
|
import { ref } from "vue";
|
|
49
|
+
import { useFloating, shift, flip } from "@floating-ui/vue";
|
|
43
50
|
|
|
44
51
|
export interface Props {
|
|
45
52
|
required?: boolean;
|
|
@@ -58,6 +65,13 @@ defineSlots<{
|
|
|
58
65
|
}>();
|
|
59
66
|
|
|
60
67
|
const tooltipVisible = ref(false);
|
|
68
|
+
const tooltipIconRef = ref<HTMLElement | null>(null);
|
|
69
|
+
const tooltipRef = ref<HTMLElement | null>(null);
|
|
70
|
+
|
|
71
|
+
const { floatingStyles } = useFloating(tooltipIconRef, tooltipRef, {
|
|
72
|
+
placement: "top-start",
|
|
73
|
+
middleware: [flip({ fallbackPlacements: ["top-start", "bottom-start"] }), shift({ mainAxis: false })],
|
|
74
|
+
});
|
|
61
75
|
</script>
|
|
62
76
|
|
|
63
77
|
<style lang="scss">
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
|
|
27
27
|
<!-- Editor field -->
|
|
28
28
|
<QuillEditor
|
|
29
|
-
:key="disabled
|
|
29
|
+
:key="`${disabled}`"
|
|
30
30
|
v-model:content="content"
|
|
31
31
|
class="quill-editor tw-border tw-border-solid tw-border-[color:var(--editor-border-color)] tw-rounded-b-[var(--editor-border-radius)] tw-h-[200px]"
|
|
32
32
|
:class="{ 'tw-bg-[#fafafa] tw-text-[#424242] tw-cursor-default': disabled }"
|
|
@@ -52,7 +52,7 @@
|
|
|
52
52
|
<script lang="ts" setup>
|
|
53
53
|
import { QuillEditor } from "@vueup/vue-quill";
|
|
54
54
|
import "@vueup/vue-quill/dist/vue-quill.snow.css";
|
|
55
|
-
import { ref, unref, watch, onMounted } from "vue";
|
|
55
|
+
import { ref, unref, watch, onMounted, onUpdated } from "vue";
|
|
56
56
|
import ImageUploader from "quill-image-uploader";
|
|
57
57
|
import { VcLabel, VcHint } from "./../../";
|
|
58
58
|
|
|
@@ -121,11 +121,11 @@ const modules = {
|
|
|
121
121
|
};
|
|
122
122
|
|
|
123
123
|
onMounted(() => {
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
124
|
+
removeBlankClass();
|
|
125
|
+
});
|
|
126
|
+
|
|
127
|
+
onUpdated(() => {
|
|
128
|
+
removeBlankClass();
|
|
129
129
|
});
|
|
130
130
|
|
|
131
131
|
watch(
|
|
@@ -136,6 +136,14 @@ watch(
|
|
|
136
136
|
{ immediate: true },
|
|
137
137
|
);
|
|
138
138
|
|
|
139
|
+
function removeBlankClass() {
|
|
140
|
+
// fixes quill editor placeholder visibility issue when content is not empty
|
|
141
|
+
const editor = document.querySelector(".ql-editor.ql-blank");
|
|
142
|
+
if (editor && content.value) {
|
|
143
|
+
editor.classList.remove("ql-blank");
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
|
|
139
147
|
function onInput() {
|
|
140
148
|
if (isQuillEmpty(content.value)) {
|
|
141
149
|
emit("update:modelValue", null);
|