@vc-shell/framework 1.0.117 → 1.0.118

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.
Files changed (50) hide show
  1. package/CHANGELOG.md +19 -0
  2. package/dist/framework.mjs +12405 -12165
  3. package/dist/shared/modules/dynamic/components/FIELD_MAP.d.ts.map +1 -1
  4. package/dist/shared/modules/dynamic/components/factories.d.ts +4 -1
  5. package/dist/shared/modules/dynamic/components/factories.d.ts.map +1 -1
  6. package/dist/shared/modules/dynamic/components/fields/ContentField.d.ts +131 -0
  7. package/dist/shared/modules/dynamic/components/fields/ContentField.d.ts.map +1 -0
  8. package/dist/shared/modules/dynamic/components/fields/ImageField.d.ts +131 -0
  9. package/dist/shared/modules/dynamic/components/fields/ImageField.d.ts.map +1 -0
  10. package/dist/shared/modules/dynamic/components/fields/VideoField.d.ts +131 -0
  11. package/dist/shared/modules/dynamic/components/fields/VideoField.d.ts.map +1 -0
  12. package/dist/shared/modules/dynamic/factories/types/index.d.ts.map +1 -1
  13. package/dist/shared/modules/dynamic/helpers/nodeBuilder.d.ts +1 -1
  14. package/dist/shared/modules/dynamic/helpers/nodeBuilder.d.ts.map +1 -1
  15. package/dist/shared/modules/dynamic/pages/dynamic-blade-list.vue.d.ts +8 -0
  16. package/dist/shared/modules/dynamic/pages/dynamic-blade-list.vue.d.ts.map +1 -1
  17. package/dist/shared/modules/dynamic/types/index.d.ts +24 -2
  18. package/dist/shared/modules/dynamic/types/index.d.ts.map +1 -1
  19. package/dist/shared/modules/dynamic/types/models.d.ts +14 -2
  20. package/dist/shared/modules/dynamic/types/models.d.ts.map +1 -1
  21. package/dist/tsconfig.tsbuildinfo +1 -1
  22. package/dist/ui/components/molecules/index.d.ts +1 -0
  23. package/dist/ui/components/molecules/index.d.ts.map +1 -1
  24. package/dist/ui/components/molecules/vc-field/_internal/vc-field-type/vc-field-type.vue.d.ts +33 -0
  25. package/dist/ui/components/molecules/vc-field/_internal/vc-field-type/vc-field-type.vue.d.ts.map +1 -0
  26. package/dist/ui/components/molecules/vc-field/index.d.ts +2 -0
  27. package/dist/ui/components/molecules/vc-field/index.d.ts.map +1 -0
  28. package/dist/ui/components/molecules/vc-field/vc-field.vue.d.ts +45 -0
  29. package/dist/ui/components/molecules/vc-field/vc-field.vue.d.ts.map +1 -0
  30. package/dist/ui/components/organisms/vc-table/_internal/vc-table-cell/vc-table-cell.vue.d.ts.map +1 -1
  31. package/dist/ui/types/index.d.ts +1 -0
  32. package/dist/ui/types/index.d.ts.map +1 -1
  33. package/package.json +4 -4
  34. package/shared/modules/dynamic/components/FIELD_MAP.ts +7 -0
  35. package/shared/modules/dynamic/components/SchemaRender.ts +3 -3
  36. package/shared/modules/dynamic/components/factories.ts +33 -0
  37. package/shared/modules/dynamic/components/fields/ContentField.ts +25 -0
  38. package/shared/modules/dynamic/components/fields/ImageField.ts +30 -0
  39. package/shared/modules/dynamic/components/fields/VideoField.ts +28 -0
  40. package/shared/modules/dynamic/factories/types/index.ts +1 -1
  41. package/shared/modules/dynamic/helpers/nodeBuilder.ts +9 -8
  42. package/shared/modules/dynamic/pages/dynamic-blade-list.vue +39 -2
  43. package/shared/modules/dynamic/types/index.ts +30 -2
  44. package/shared/modules/dynamic/types/models.ts +21 -1
  45. package/ui/components/molecules/index.ts +1 -0
  46. package/ui/components/molecules/vc-field/_internal/vc-field-type/vc-field-type.vue +66 -0
  47. package/ui/components/molecules/vc-field/index.ts +1 -0
  48. package/ui/components/molecules/vc-field/vc-field.vue +67 -0
  49. package/ui/components/organisms/vc-table/_internal/vc-table-cell/vc-table-cell.vue +4 -2
  50. package/ui/types/index.ts +1 -0
@@ -12,4 +12,5 @@ export * from "./vc-select";
12
12
  export * from "./vc-slider";
13
13
  export * from "./vc-textarea";
14
14
  export * from "./vc-multivalue";
15
+ export * from "./vc-field";
15
16
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../ui/components/molecules/index.ts"],"names":[],"mappings":"AAAA,cAAc,kBAAkB,CAAC;AACjC,cAAc,kBAAkB,CAAC;AACjC,cAAc,aAAa,CAAC;AAC5B,cAAc,WAAW,CAAC;AAC1B,cAAc,kBAAkB,CAAC;AACjC,cAAc,YAAY,CAAC;AAC3B,cAAc,qBAAqB,CAAC;AACpC,cAAc,mBAAmB,CAAC;AAClC,cAAc,iBAAiB,CAAC;AAChC,cAAc,aAAa,CAAC;AAC5B,cAAc,aAAa,CAAC;AAC5B,cAAc,aAAa,CAAC;AAC5B,cAAc,eAAe,CAAC;AAC9B,cAAc,iBAAiB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../ui/components/molecules/index.ts"],"names":[],"mappings":"AAAA,cAAc,kBAAkB,CAAC;AACjC,cAAc,kBAAkB,CAAC;AACjC,cAAc,aAAa,CAAC;AAC5B,cAAc,WAAW,CAAC;AAC1B,cAAc,kBAAkB,CAAC;AACjC,cAAc,YAAY,CAAC;AAC3B,cAAc,qBAAqB,CAAC;AACpC,cAAc,mBAAmB,CAAC;AAClC,cAAc,iBAAiB,CAAC;AAChC,cAAc,aAAa,CAAC;AAC5B,cAAc,aAAa,CAAC;AAC5B,cAAc,aAAa,CAAC;AAC5B,cAAc,eAAe,CAAC;AAC9B,cAAc,iBAAiB,CAAC;AAChC,cAAc,YAAY,CAAC"}
@@ -0,0 +1,33 @@
1
+ export interface Props {
2
+ type: "text" | "date" | "date-ago" | "link";
3
+ value: any;
4
+ }
5
+ export interface Emits {
6
+ (event: "click"): void;
7
+ (event: "copy"): void;
8
+ }
9
+ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__VLS_TypePropsToRuntimeProps<Props>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
10
+ click: () => void;
11
+ copy: () => void;
12
+ }, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToRuntimeProps<Props>>> & {
13
+ onClick?: () => any;
14
+ onCopy?: () => any;
15
+ }, {}, {}>, {
16
+ default?(_: {}): any;
17
+ }>;
18
+ export default _default;
19
+ type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
20
+ type __VLS_TypePropsToRuntimeProps<T> = {
21
+ [K in keyof T]-?: {} extends Pick<T, K> ? {
22
+ type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
23
+ } : {
24
+ type: import('vue').PropType<T[K]>;
25
+ required: true;
26
+ };
27
+ };
28
+ type __VLS_WithTemplateSlots<T, S> = T & {
29
+ new (): {
30
+ $slots: S;
31
+ };
32
+ };
33
+ //# sourceMappingURL=vc-field-type.vue.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"vc-field-type.vue.d.ts","sourceRoot":"","sources":["../../../../../../../ui/components/molecules/vc-field/_internal/vc-field-type/vc-field-type.vue.ts"],"names":[],"mappings":"AAIA,MAAM,WAAW,KAAK;IACpB,IAAI,EAAE,MAAM,GAAG,MAAM,GAAG,UAAU,GAAG,MAAM,CAAC;IAE5C,KAAK,EAAE,GAAG,CAAC;CACZ;AAED,MAAM,WAAW,KAAK;IACpB,CAAC,KAAK,EAAE,OAAO,GAAG,IAAI,CAAC;IACvB,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;CACvB;;;;;;;;;;AA4OD,wBAAwG;AAGxG,KAAK,sBAAsB,CAAC,CAAC,IAAI,CAAC,SAAS,SAAS,GAAG,KAAK,GAAG,CAAC,CAAC;AACjE,KAAK,6BAA6B,CAAC,CAAC,IAAI;KAAG,CAAC,IAAI,MAAM,CAAC,CAAC,CAAC,GAAG,EAAE,SAAS,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,GAAG;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,sBAAsB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAA;KAAE,GAAG;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QAAC,QAAQ,EAAE,IAAI,CAAA;KAAE;CAAE,CAAC;AAC9M,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IAAE,QAAO;QAClD,MAAM,EAAE,CAAC,CAAC;KACT,CAAA;CAAE,CAAC"}
@@ -0,0 +1,2 @@
1
+ export { default as VcField } from "./vc-field.vue";
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../ui/components/molecules/vc-field/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,OAAO,EAAE,MAAM,gBAAgB,CAAC"}
@@ -0,0 +1,45 @@
1
+ export interface Props {
2
+ /**
3
+ * Field label text
4
+ */
5
+ label?: string;
6
+ /**
7
+ * Field tooltip information
8
+ */
9
+ tooltip?: string;
10
+ /**
11
+ * Field type
12
+ */
13
+ type?: "text" | "date" | "date-ago" | "link";
14
+ /**
15
+ * Field content
16
+ */
17
+ modelValue?: any;
18
+ /**
19
+ * Add button for field content copying
20
+ */
21
+ copyable?: boolean;
22
+ }
23
+ declare const _default: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<Props>, {
24
+ type: string;
25
+ }>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<Props>, {
26
+ type: string;
27
+ }>>>, {
28
+ type: "link" | "text" | "date" | "date-ago";
29
+ }, {}>;
30
+ export default _default;
31
+ type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
32
+ type __VLS_TypePropsToRuntimeProps<T> = {
33
+ [K in keyof T]-?: {} extends Pick<T, K> ? {
34
+ type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
35
+ } : {
36
+ type: import('vue').PropType<T[K]>;
37
+ required: true;
38
+ };
39
+ };
40
+ type __VLS_WithDefaults<P, D> = {
41
+ [K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_Prettify<P[K] & {
42
+ default: D[K];
43
+ }> : P[K];
44
+ };
45
+ //# sourceMappingURL=vc-field.vue.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"vc-field.vue.d.ts","sourceRoot":"","sources":["../../../../../ui/components/molecules/vc-field/vc-field.vue.ts"],"names":[],"mappings":"AAKA,MAAM,WAAW,KAAK;IACpB;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,UAAU,GAAG,MAAM,CAAC;IAC7C;;OAEG;IAEH,UAAU,CAAC,EAAE,GAAG,CAAC;IACjB;;OAEG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;;;;;;;;AAsJD,wBAMG;AAGH,KAAK,sBAAsB,CAAC,CAAC,IAAI,CAAC,SAAS,SAAS,GAAG,KAAK,GAAG,CAAC,CAAC;AACjE,KAAK,6BAA6B,CAAC,CAAC,IAAI;KAAG,CAAC,IAAI,MAAM,CAAC,CAAC,CAAC,GAAG,EAAE,SAAS,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,GAAG;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,sBAAsB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAA;KAAE,GAAG;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QAAC,QAAQ,EAAE,IAAI,CAAA;KAAE;CAAE,CAAC;AAC9M,KAAK,kBAAkB,CAAC,CAAC,EAAE,CAAC,IAAI;KAE1B,CAAC,IAAI,MAAM,IAAI,CAAC,CAAC,EAAE,MAAM,CAAC,CAAC,GAAG,CAAC,SAAS,MAAM,CAAC,GAAG,cAAc,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG;QACxE,OAAO,EAAE,CAAC,CAAC,CAAC,CAAC,CAAA;KACb,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;CACT,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"vc-table-cell.vue.d.ts","sourceRoot":"","sources":["../../../../../../../ui/components/organisms/vc-table/_internal/vc-table-cell/vc-table-cell.vue.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,aAAa,EAAE,MAAM,gCAAgC,CAAC;AAE/D,MAAM,WAAW,KAAK;IACpB,IAAI,EAAE,aAAa,CAAC;IACpB,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CAC/B;;AAgQD,wBAMG;AAGH,KAAK,sBAAsB,CAAC,CAAC,IAAI,CAAC,SAAS,SAAS,GAAG,KAAK,GAAG,CAAC,CAAC;AACjE,KAAK,6BAA6B,CAAC,CAAC,IAAI;KAAG,CAAC,IAAI,MAAM,CAAC,CAAC,CAAC,GAAG,EAAE,SAAS,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,GAAG;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,sBAAsB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAA;KAAE,GAAG;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QAAC,QAAQ,EAAE,IAAI,CAAA;KAAE;CAAE,CAAC"}
1
+ {"version":3,"file":"vc-table-cell.vue.d.ts","sourceRoot":"","sources":["../../../../../../../ui/components/organisms/vc-table/_internal/vc-table-cell/vc-table-cell.vue.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,aAAa,EAAE,MAAM,gCAAgC,CAAC;AAE/D,MAAM,WAAW,KAAK;IACpB,IAAI,EAAE,aAAa,CAAC;IACpB,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CAC/B;;AAkQD,wBAMG;AAGH,KAAK,sBAAsB,CAAC,CAAC,IAAI,CAAC,SAAS,SAAS,GAAG,KAAK,GAAG,CAAC,CAAC;AACjE,KAAK,6BAA6B,CAAC,CAAC,IAAI;KAAG,CAAC,IAAI,MAAM,CAAC,CAAC,CAAC,GAAG,EAAE,SAAS,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,GAAG;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,sBAAsB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAA;KAAE,GAAG;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QAAC,QAAQ,EAAE,IAAI,CAAA;KAAE;CAAE,CAAC"}
@@ -34,6 +34,7 @@ declare module "vue" {
34
34
  VcSlider: (typeof VcShellComponents)["VcSlider"];
35
35
  VcTextarea: (typeof VcShellComponents)["VcTextarea"];
36
36
  VcMultivalue: (typeof VcShellComponents)["VcMultivalue"];
37
+ VcField: (typeof VcShellComponents)["VcField"];
37
38
  VcApp: (typeof VcShellComponents)["VcApp"];
38
39
  VcBlade: (typeof VcShellComponents)["VcBlade"];
39
40
  VcDynamicProperty: (typeof VcShellComponents)["VcDynamicProperty"];
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../ui/types/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,iBAAiB,MAAM,iBAAiB,CAAC;AAGrD,OAAO,QAAQ,KAAK,CAAC;IACnB,UAAiB,gBAAgB;QAE/B,OAAO,EAAE,CAAC,OAAO,iBAAiB,CAAC,CAAC,SAAS,CAAC,CAAC;QAC/C,QAAQ,EAAE,CAAC,OA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framework",
3
- "version": "1.0.117",
3
+ "version": "1.0.118",
4
4
  "main": "./dist/framework.mjs",
5
5
  "module": "./dist/framework.mjs",
6
6
  "types": "./dist/index.d.ts",
@@ -56,9 +56,9 @@
56
56
  "whatwg-fetch": "^3.6.2"
57
57
  },
58
58
  "devDependencies": {
59
- "@vc-shell/api-client-generator": "^1.0.117",
60
- "@vc-shell/config-generator": "^1.0.117",
61
- "@vc-shell/ts-config": "^1.0.117",
59
+ "@vc-shell/api-client-generator": "^1.0.118",
60
+ "@vc-shell/config-generator": "^1.0.118",
61
+ "@vc-shell/ts-config": "^1.0.118",
62
62
  "@vitejs/plugin-vue": "^4.2.3",
63
63
  "sass": "^1.62.1",
64
64
  "typescript": "^5.2.2",
@@ -9,6 +9,10 @@ import EditorField from "./fields/EditorField";
9
9
  import GalleryField from "./fields/GalleryField";
10
10
  import Button from "./fields/Button";
11
11
  import StatusField from "./fields/StatusField";
12
+ import ContentField from "./fields/ContentField";
13
+ import VideoField from "./fields/VideoField";
14
+ import ImageField from "./fields/ImageField";
15
+
12
16
  import { ControlSchema } from "../types";
13
17
  import { ConcreteComponent } from "vue";
14
18
 
@@ -27,6 +31,9 @@ const FIELD_MAP: TFieldMap = {
27
31
  "vc-gallery": GalleryField,
28
32
  "vc-button": Button,
29
33
  "vc-status": StatusField,
34
+ "vc-field": ContentField,
35
+ "vc-video": VideoField,
36
+ "vc-image": ImageField,
30
37
  };
31
38
 
32
39
  export default FIELD_MAP;
@@ -68,10 +68,10 @@ export default defineComponent({
68
68
  nodeBuilder({
69
69
  controlSchema: field,
70
70
  parentId: field.id,
71
- internalContext: internalFormData.value,
71
+ internalContext: internalFormData,
72
72
  bladeContext: props.context,
73
- currentLocale: currentLocale.value,
74
- formData: internalFormData.value,
73
+ currentLocale: currentLocale,
74
+ formData: internalFormData,
75
75
  }),
76
76
  ],
77
77
  []
@@ -6,11 +6,14 @@ import {
6
6
  VcCheckbox,
7
7
  VcDynamicProperty,
8
8
  VcEditor,
9
+ VcField,
9
10
  VcGallery,
11
+ VcImage,
10
12
  VcInput,
11
13
  VcInputCurrency,
12
14
  VcSelect,
13
15
  VcStatus,
16
+ VcVideo,
14
17
  } from "../../../../ui/components";
15
18
  import {
16
19
  IControlBaseProps,
@@ -26,6 +29,9 @@ import {
26
29
  IFieldset,
27
30
  IControlBaseOptions,
28
31
  IStatusField,
32
+ IContentField,
33
+ IVideoField,
34
+ IImageField,
29
35
  } from "../types/models";
30
36
 
31
37
  export const ControlBase = ({ visibility = undefined }: IControlBaseOptions): IControlBaseOptions => ({
@@ -85,6 +91,33 @@ export const InputField = ({ props, options }: Partial<IInputField>): IInputFiel
85
91
  options: ControlBase(options),
86
92
  });
87
93
 
94
+ export const ContentField = ({ props, options }: Partial<IContentField>): IContentField => ({
95
+ component: markRaw(VcField),
96
+ props: {
97
+ ...ControlBaseProps(props),
98
+ ...props,
99
+ },
100
+ options: ControlBase(options),
101
+ });
102
+
103
+ export const ImageField = ({ props, options }: Partial<IImageField>): IImageField => ({
104
+ component: markRaw(VcImage),
105
+ props: {
106
+ ...ControlBaseProps(props),
107
+ ...props,
108
+ },
109
+ options: ControlBase(options),
110
+ });
111
+
112
+ export const VideoField = ({ props, options }: Partial<IInputField>): IVideoField => ({
113
+ component: markRaw(VcVideo),
114
+ props: {
115
+ ...ControlBaseProps(props),
116
+ ...props,
117
+ },
118
+ options: ControlBase(options),
119
+ });
120
+
88
121
  export const InputCurrency = ({ props, options }: Partial<IInputCurrency>): IInputCurrency => ({
89
122
  component: markRaw(VcInputCurrency),
90
123
  props: {
@@ -0,0 +1,25 @@
1
+ import { ExtractPropTypes, h } from "vue";
2
+ import { ContentField } from "../factories";
3
+ import componentProps from "./props";
4
+ import { FieldSchema } from "../../types";
5
+
6
+ export default {
7
+ name: "ContentField",
8
+ props: componentProps,
9
+ setup(props: ExtractPropTypes<typeof componentProps> & { element: FieldSchema }) {
10
+ return () => {
11
+ const field = ContentField({
12
+ props: {
13
+ ...props.baseProps,
14
+ type: props.element.variant,
15
+ copyable: props.element.copyable || false,
16
+ },
17
+ options: props.baseOptions,
18
+ });
19
+
20
+ const render = h(field.component, field.props);
21
+
22
+ return props.baseOptions.visibility ? render : null;
23
+ };
24
+ },
25
+ };
@@ -0,0 +1,30 @@
1
+ import { ExtractPropTypes, h } from "vue";
2
+ import { ImageField } from "../factories";
3
+ import componentProps from "./props";
4
+ import { ImageSchema } from "../../types";
5
+
6
+ export default {
7
+ name: "ImageField",
8
+ props: componentProps,
9
+ setup(props: ExtractPropTypes<typeof componentProps> & { element: ImageSchema }) {
10
+ return () => {
11
+ const field = ImageField({
12
+ props: {
13
+ ...props.baseProps,
14
+ src: props.baseProps.modelValue,
15
+ aspect: props.element.aspect,
16
+ rounded: props.element.rounded,
17
+ bordered: props.element.bordered,
18
+ clickable: props.element.clickable,
19
+ size: props.element.size,
20
+ background: props.element.background,
21
+ },
22
+ options: props.baseOptions,
23
+ });
24
+
25
+ const render = h(field.component, field.props);
26
+
27
+ return props.baseOptions.visibility ? render : null;
28
+ };
29
+ },
30
+ };
@@ -0,0 +1,28 @@
1
+ import { ExtractPropTypes, h } from "vue";
2
+ import { VideoField } from "../factories";
3
+ import componentProps from "./props";
4
+ import { VideoSchema } from "../../types";
5
+
6
+ export default {
7
+ name: "VideoField",
8
+ props: componentProps,
9
+ setup(props: ExtractPropTypes<typeof componentProps> & { element: VideoSchema }) {
10
+ return () => {
11
+ const field = VideoField({
12
+ props: {
13
+ ...props.baseProps,
14
+ source: props.baseProps.modelValue,
15
+ size: props.element.size,
16
+ rounded: props.element.rounded,
17
+ bordered: props.element.bordered,
18
+ clickable: props.element.clickable,
19
+ },
20
+ options: props.baseOptions,
21
+ });
22
+
23
+ const render = h(field.component, field.props);
24
+
25
+ return props.baseOptions.visibility ? render : null;
26
+ };
27
+ },
28
+ };
@@ -1,5 +1,5 @@
1
1
  /* eslint-disable @typescript-eslint/no-explicit-any */
2
- import { ComputedRef, MaybeRef, Ref, UnwrapNestedRefs } from "vue";
2
+ import { ComputedRef, MaybeRef, Ref, UnwrapNestedRefs, UnwrapRef } from "vue";
3
3
  import { AsyncAction } from "../../../../../core/composables";
4
4
  import { SettingsSchema } from "../../types";
5
5
  import { Asset, AssetsHandler, IBladeToolbar, IImage } from "../../../../../core/types";
@@ -1,4 +1,4 @@
1
- import { unref, computed, toValue, h, UnwrapNestedRefs, MaybeRef, reactive, VNode } from "vue";
1
+ import { unref, computed, toValue, h, UnwrapNestedRefs, MaybeRef, reactive, Ref, VNode } from "vue";
2
2
  import FIELD_MAP from "../components/FIELD_MAP";
3
3
  import { ControlSchema } from "../types";
4
4
  import { IControlBaseProps, IControlBaseOptions } from "../types/models";
@@ -7,6 +7,7 @@ import { setModel } from "./setters";
7
7
  import { unwrapInterpolation } from "./unwrapInterpolation";
8
8
  import { DetailsBladeContext } from "../factories";
9
9
  import * as _ from "lodash-es";
10
+ import { unrefNested } from "./unrefNested";
10
11
 
11
12
  function disabledHandler(
12
13
  disabled: { method?: string } | boolean,
@@ -22,7 +23,7 @@ function disabledHandler(
22
23
  function nodeBuilder<Context, BContext extends UnwrapNestedRefs<DetailsBladeContext>, FormData>(args: {
23
24
  controlSchema: ControlSchema;
24
25
  parentId: string | number;
25
- internalContext: Context;
26
+ internalContext: MaybeRef<Context>;
26
27
  bladeContext: BContext;
27
28
  currentLocale: MaybeRef<string>;
28
29
  formData: FormData;
@@ -32,7 +33,7 @@ function nodeBuilder<Context, BContext extends UnwrapNestedRefs<DetailsBladeCont
32
33
 
33
34
  const baseProps = reactive<IControlBaseProps>({
34
35
  key: `${parentId}`,
35
- label: controlSchema.label ? unref(unwrapInterpolation(controlSchema.label, internalContext)) : undefined,
36
+ label: controlSchema.label ? unref(unwrapInterpolation(controlSchema.label, toValue(internalContext))) : undefined,
36
37
  disabled:
37
38
  ("disabled" in bladeContext.scope && bladeContext.scope.disabled) ||
38
39
  disabledHandler("disabled" in controlSchema && controlSchema.disabled, bladeContext),
@@ -40,14 +41,14 @@ function nodeBuilder<Context, BContext extends UnwrapNestedRefs<DetailsBladeCont
40
41
  rules: controlSchema.rules,
41
42
  placeholder: controlSchema.placeholder,
42
43
  required: controlSchema.rules?.required,
43
- modelValue: getModel(controlSchema.property, internalContext),
44
+ modelValue: getModel(controlSchema.property, toValue(internalContext)),
44
45
  "onUpdate:modelValue": (e) => {
45
- setModel({ property: controlSchema.property, value: e, context: internalContext });
46
+ setModel({ property: controlSchema.property, value: e, context: toValue(internalContext) });
46
47
 
47
48
  if (_.has(controlSchema, "update.method")) {
48
49
  controlSchema.update.method in bladeContext.scope &&
49
50
  typeof bladeContext.scope[controlSchema.update.method] === "function"
50
- ? bladeContext.scope[controlSchema.update.method](e, controlSchema.property, internalContext)
51
+ ? bladeContext.scope[controlSchema.update.method](e, controlSchema.property, toValue(internalContext))
51
52
  : undefined;
52
53
  }
53
54
  },
@@ -65,7 +66,7 @@ function nodeBuilder<Context, BContext extends UnwrapNestedRefs<DetailsBladeCont
65
66
 
66
67
  const fieldsHandler = computed(() => {
67
68
  if (!("fields" in controlSchema)) return null;
68
- const fieldsModel = getModel(controlSchema.property, internalContext);
69
+ const fieldsModel = getModel(controlSchema.property, toValue(internalContext));
69
70
 
70
71
  if (toValue(fieldsModel) && Array.isArray(toValue(fieldsModel))) {
71
72
  return toValue(fieldsModel).map((model: { [x: string]: unknown; id: string }) =>
@@ -106,7 +107,7 @@ function nodeBuilder<Context, BContext extends UnwrapNestedRefs<DetailsBladeCont
106
107
  fieldContext: internalContext,
107
108
  };
108
109
 
109
- return h(component, elProps);
110
+ return h(component, unrefNested(elProps));
110
111
  }
111
112
 
112
113
  export { nodeBuilder };
@@ -15,7 +15,7 @@
15
15
  :expanded="expanded"
16
16
  v-bind="bladeOptions?.table"
17
17
  :state-key="tableData?.id"
18
- :items="items"
18
+ :items="itemsProxy"
19
19
  :multiselect="tableData?.multiselect"
20
20
  :header="tableData?.header"
21
21
  :sort="sort"
@@ -26,6 +26,7 @@
26
26
  :total-label="$t(`${settings.localizationPrefix.trim().toUpperCase()}.PAGES.LIST.TABLE.TOTALS`)"
27
27
  :total-count="pagination?.totalCount"
28
28
  :active-filter-count="activeFilterCount"
29
+ :reorderable-rows="tableData?.reorderableRows"
29
30
  @item-click="onItemClick"
30
31
  @pagination-click="onPaginationClick"
31
32
  @selection-changed="onSelectionChanged"
@@ -33,6 +34,7 @@
33
34
  @load:change="onSearchList"
34
35
  @scroll:ptr="reload"
35
36
  @search:change="onSearchList"
37
+ @row:reorder="sortRows"
36
38
  >
37
39
  <template
38
40
  v-if="isFilterVisible"
@@ -133,6 +135,8 @@ import { ITableColumns } from "../../../../core/types";
133
135
  import { toolbarReducer } from "../helpers/toolbarReducer";
134
136
  import { notification, usePopup } from "../../../components";
135
137
  import { ListBaseBladeScope, ListBladeContext, UseList } from "../factories/types";
138
+ import { IParentCallArgs } from "../../../index";
139
+ import * as _ from "lodash-es";
136
140
 
137
141
  export interface Props {
138
142
  expanded?: boolean;
@@ -144,6 +148,7 @@ export interface Props {
144
148
  }
145
149
 
146
150
  export interface Emits {
151
+ (event: "parent:call", args: IParentCallArgs): void;
147
152
  (event: "close:blade"): void;
148
153
  (event: "collapse:blade"): void;
149
154
  (event: "expand:blade"): void;
@@ -174,6 +179,8 @@ const selectedItemId = ref();
174
179
  const sort = ref("createdDate:DESC");
175
180
  const selectedIds = ref<string[]>([]);
176
181
  const isDesktop = inject<Ref<boolean>>("isDesktop");
182
+ const itemsProxy = ref<Record<string, any>[]>();
183
+ const modified = ref(false);
177
184
 
178
185
  const { moduleNotifications, markAsRead } = useNotifications(settings.value.pushNotificationType);
179
186
 
@@ -231,7 +238,7 @@ const {
231
238
  const bladeContext = ref<ListBladeContext>({
232
239
  load,
233
240
  remove,
234
- items,
241
+ items: computed(() => itemsProxy.value),
235
242
  loading,
236
243
  pagination,
237
244
  query,
@@ -242,6 +249,12 @@ const bladeContext = ref<ListBladeContext>({
242
249
  const toolbarComputed = toolbarReducer({
243
250
  defaultToolbarSchema: settings.value.toolbar,
244
251
  defaultToolbarBindings: {
252
+ save: {
253
+ clickHandler() {
254
+ emit("close:blade");
255
+ },
256
+ disabled: computed(() => !modified.value),
257
+ },
245
258
  openAddBlade: {
246
259
  async clickHandler() {
247
260
  if (
@@ -274,10 +287,22 @@ onMounted(async () => {
274
287
  await load({ ...query.value, sort: sort.value });
275
288
  });
276
289
 
290
+ watch(
291
+ () => itemsProxy.value,
292
+ (newVal) => {
293
+ modified.value = !_.isEqual(newVal, items.value);
294
+ },
295
+ { deep: true }
296
+ );
297
+
277
298
  watch(sort, async (value) => {
278
299
  await load({ ...query.value, sort: value });
279
300
  });
280
301
 
302
+ watch(items, (newVal) => {
303
+ itemsProxy.value = newVal;
304
+ });
305
+
281
306
  watch(
282
307
  () => props.param,
283
308
  (newVal) => {
@@ -465,8 +490,20 @@ function resolveTemplateComponent(name: keyof ListContentSchema) {
465
490
  }
466
491
  }
467
492
 
493
+ function sortRows(event: { dragIndex: number; dropIndex: number; value: any[] }) {
494
+ if (event.dragIndex !== event.dropIndex) {
495
+ const sorted = event.value.map((item, index) => {
496
+ item.sortOrder = index;
497
+ return item;
498
+ });
499
+
500
+ itemsProxy.value = sorted;
501
+ }
502
+ }
503
+
468
504
  defineExpose({
469
505
  reload,
470
506
  title,
507
+ ...scope.value,
471
508
  });
472
509
  </script>
@@ -1,4 +1,4 @@
1
- import { VcButton, VcIcon, VcInput, VcStatus } from "./../../../../ui/components";
1
+ import { VcButton, VcField, VcIcon, VcImage, VcInput, VcStatus, VcVideo } from "./../../../../ui/components";
2
2
  import { ITableColumns, IValidationRules } from "../../../../core/types";
3
3
  import type { ComponentProps, ComponentEmit, ComponentSlots } from "vue-component-type-helpers";
4
4
 
@@ -95,6 +95,7 @@ export interface ListContentSchema extends SchemaBase {
95
95
  type?: string;
96
96
  customTemplate?: GridTemplateOverride;
97
97
  })[];
98
+ reorderableRows?: boolean;
98
99
  mobileTemplate?: {
99
100
  component: string;
100
101
  };
@@ -150,6 +151,30 @@ export interface InputSchema extends SchemaBase {
150
151
  clearable?: boolean;
151
152
  }
152
153
 
154
+ export interface VideoSchema extends SchemaBase {
155
+ component: "vc-video";
156
+ size?: ComponentProps<typeof VcVideo>["size"];
157
+ rounded?: boolean;
158
+ bordered?: boolean;
159
+ clickable?: boolean;
160
+ }
161
+
162
+ export interface FieldSchema extends SchemaBase {
163
+ component: "vc-field";
164
+ variant?: ComponentProps<typeof VcField>["type"];
165
+ copyable?: boolean;
166
+ }
167
+
168
+ export interface ImageSchema extends SchemaBase {
169
+ component: "vc-image";
170
+ aspect?: ComponentProps<typeof VcImage>["aspect"];
171
+ size?: ComponentProps<typeof VcImage>["size"];
172
+ background?: ComponentProps<typeof VcImage>["background"];
173
+ rounded?: boolean;
174
+ bordered?: boolean;
175
+ clickable?: boolean;
176
+ }
177
+
153
178
  export interface StatusSchema extends SchemaBase {
154
179
  component: "vc-status";
155
180
  outline?: boolean;
@@ -237,7 +262,10 @@ export type ControlSchema =
237
262
  | FieldsetSchema
238
263
  | ButtonSchema
239
264
  | InputCurrencySchema
240
- | StatusSchema;
265
+ | StatusSchema
266
+ | FieldSchema
267
+ | VideoSchema
268
+ | ImageSchema;
241
269
 
242
270
  export interface FilterBase {
243
271
  columns: {
@@ -6,11 +6,14 @@ import {
6
6
  VcCheckbox,
7
7
  VcDynamicProperty,
8
8
  VcEditor,
9
+ VcField,
9
10
  VcGallery,
11
+ VcImage,
10
12
  VcInput,
11
13
  VcInputCurrency,
12
14
  VcSelect,
13
15
  VcStatus,
16
+ VcVideo,
14
17
  } from "../../../../ui/components";
15
18
  import type { ComponentProps, ComponentEmit, ComponentSlots } from "vue-component-type-helpers";
16
19
 
@@ -44,7 +47,9 @@ export type ControlType =
44
47
  | ICheckbox
45
48
  | IButton
46
49
  | IInputCurrency
47
- | IStatusField;
50
+ | IStatusField
51
+ | IContentField
52
+ | IImageField;
48
53
 
49
54
  export type ControlTypeWithSlots = Extract<
50
55
  ControlType,
@@ -92,6 +97,21 @@ export type IInputField = {
92
97
  options: IControlBaseOptions;
93
98
  } & FieldOpts<typeof VcInput>;
94
99
 
100
+ export type IContentField = {
101
+ props: ComponentProps<typeof VcField> | IControlBaseProps;
102
+ options: IControlBaseOptions;
103
+ } & FieldOpts<typeof VcField>;
104
+
105
+ export type IVideoField = {
106
+ props: ComponentProps<typeof VcVideo> | IControlBaseProps;
107
+ options: IControlBaseOptions;
108
+ } & FieldOpts<typeof VcVideo>;
109
+
110
+ export type IImageField = {
111
+ props: ComponentProps<typeof VcImage> | IControlBaseProps;
112
+ options: IControlBaseOptions;
113
+ } & FieldOpts<typeof VcImage>;
114
+
95
115
  export type IInputCurrency = {
96
116
  props: Partial<ComponentProps<typeof VcInputCurrency>> | IControlBaseProps;
97
117
  options: IControlBaseOptions;
@@ -12,3 +12,4 @@ export * from "./vc-select";
12
12
  export * from "./vc-slider";
13
13
  export * from "./vc-textarea";
14
14
  export * from "./vc-multivalue";
15
+ export * from "./vc-field";