@vc-shell/framework 1.0.169 → 1.0.170

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 (46) hide show
  1. package/CHANGELOG.md +11 -0
  2. package/core/types/index.ts +2 -2
  3. package/dist/core/types/index.d.ts +2 -2
  4. package/dist/core/types/index.d.ts.map +1 -1
  5. package/dist/framework.js +12455 -12260
  6. package/dist/index.css +1 -1
  7. package/dist/index.d.ts.map +1 -1
  8. package/dist/shared/modules/assets/index.d.ts.map +1 -1
  9. package/dist/shared/modules/assets-manager/components/assets-manager/assets-manager.vue.d.ts.map +1 -1
  10. package/dist/shared/modules/assets-manager/index.d.ts.map +1 -1
  11. package/dist/shared/modules/dynamic/composables/useToolbarReducer/index.d.ts +2 -2
  12. package/dist/shared/modules/dynamic/composables/useToolbarReducer/index.d.ts.map +1 -1
  13. package/dist/shared/modules/dynamic/pages/dynamic-blade-form.vue.d.ts.map +1 -1
  14. package/dist/shared/modules/dynamic/pages/dynamic-blade-list.vue.d.ts +3 -2
  15. package/dist/shared/modules/dynamic/pages/dynamic-blade-list.vue.d.ts.map +1 -1
  16. package/dist/shared/modules/dynamic/types/index.d.ts +7 -1
  17. package/dist/shared/modules/dynamic/types/index.d.ts.map +1 -1
  18. package/dist/shared/pages/LoginPage/components/login/Login.vue.d.ts.map +1 -1
  19. package/dist/tsconfig.tsbuildinfo +1 -1
  20. package/dist/ui/components/atoms/vc-container/vc-container.vue.d.ts.map +1 -1
  21. package/dist/ui/components/organisms/vc-gallery/_internal/vc-gallery-item/vc-gallery-item.vue.d.ts +1 -1
  22. package/dist/ui/components/organisms/vc-gallery/vc-gallery.vue.d.ts +1 -1
  23. package/dist/ui/components/organisms/vc-table/_internal/vc-table-mobile-item/vc-table-mobile-item.vue.d.ts +11 -4
  24. package/dist/ui/components/organisms/vc-table/_internal/vc-table-mobile-item/vc-table-mobile-item.vue.d.ts.map +1 -1
  25. package/dist/ui/components/organisms/vc-table/vc-table.vue.d.ts +6 -3
  26. package/dist/ui/components/organisms/vc-table/vc-table.vue.d.ts.map +1 -1
  27. package/package.json +5 -4
  28. package/shared/modules/assets/index.ts +1 -2
  29. package/shared/modules/assets-manager/components/assets-manager/assets-manager.vue +24 -22
  30. package/shared/modules/assets-manager/index.ts +1 -2
  31. package/shared/modules/dynamic/composables/useToolbarReducer/index.ts +2 -2
  32. package/shared/modules/dynamic/pages/dynamic-blade-form.vue +4 -1
  33. package/shared/modules/dynamic/pages/dynamic-blade-list.vue +48 -4
  34. package/shared/modules/dynamic/types/index.ts +9 -1
  35. package/shared/pages/LoginPage/components/login/Login.vue +8 -5
  36. package/ui/components/atoms/vc-container/vc-container.vue +40 -8
  37. package/ui/components/organisms/vc-table/_internal/vc-table-mobile-item/vc-table-mobile-item.vue +171 -160
  38. package/ui/components/organisms/vc-table/vc-table.vue +13 -8
  39. package/dist/shared/modules/assets/locales/index.d.ts +0 -3
  40. package/dist/shared/modules/assets/locales/index.d.ts.map +0 -1
  41. package/dist/shared/modules/assets-manager/locales/index.d.ts +0 -3
  42. package/dist/shared/modules/assets-manager/locales/index.d.ts.map +0 -1
  43. package/shared/modules/assets/locales/en.json +0 -32
  44. package/shared/modules/assets/locales/index.ts +0 -2
  45. package/shared/modules/assets-manager/locales/en.json +0 -28
  46. package/shared/modules/assets-manager/locales/index.ts +0 -2
@@ -1 +1 @@
1
- {"version":3,"file":"vc-container.vue.d.ts","sourceRoot":"","sources":["../../../../../ui/components/atoms/vc-container/vc-container.vue.ts"],"names":[],"mappings":"AAKA,MAAM,WAAW,KAAK;IACpB,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,MAAM,CAAC,EAAE,OAAO,CAAC;CAClB;AAED,MAAM,WAAW,KAAK;IACpB,CAAC,KAAK,EAAE,YAAY,GAAG,IAAI,CAAC;CAC7B;;;;;;;;;;;AAuPD,wBAAwG;AACxG,KAAK,sBAAsB,CAAC,CAAC,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AAC,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"}
@@ -34,8 +34,8 @@ declare const _default: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_T
34
34
  };
35
35
  disableDrag: boolean;
36
36
  }>>> & {
37
- onEdit?: ((...args: any[]) => any) | undefined;
38
37
  onRemove?: ((...args: any[]) => any) | undefined;
38
+ onEdit?: ((...args: any[]) => any) | undefined;
39
39
  onPreview?: ((...args: any[]) => any) | undefined;
40
40
  }, {
41
41
  image: ICommonAsset;
@@ -54,9 +54,9 @@ declare const _default: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_T
54
54
  name: string;
55
55
  }>>> & {
56
56
  onUpload?: ((files: FileList, startingSortOrder?: number | undefined) => any) | undefined;
57
- onEdit?: ((image: ICommonAsset) => any) | undefined;
58
57
  onSort?: ((sorted: ICommonAsset[]) => any) | undefined;
59
58
  onRemove?: ((image: ICommonAsset) => any) | undefined;
59
+ onEdit?: ((image: ICommonAsset) => any) | undefined;
60
60
  }, {
61
61
  variant: "gallery" | "file-upload";
62
62
  name: string;
@@ -1,7 +1,8 @@
1
- import { IActionBuilderResult } from "./../../../../../../core/types";
1
+ import { IActionBuilderResult } from "../../../../../../core/types";
2
2
  export interface Emits {
3
3
  (event: "swipeStart", id: string): void;
4
4
  (event: "click"): void;
5
+ (event: "select"): void;
5
6
  }
6
7
  export interface TableItem {
7
8
  [x: string]: any;
@@ -9,10 +10,12 @@ export interface TableItem {
9
10
  }
10
11
  declare const _default: <T extends string | TableItem>(__VLS_props: {
11
12
  onClick?: (() => any) | undefined;
13
+ onSelect?: (() => any) | undefined;
12
14
  item: T;
13
- actionBuilder?: ((item: T) => IActionBuilderResult[]) | undefined;
15
+ actionBuilder?: ((item: T) => IActionBuilderResult[] | undefined) | undefined;
14
16
  onSwipeStart?: ((id: string) => any) | undefined;
15
17
  swipingItem?: string | undefined;
18
+ isSelected?: boolean | undefined;
16
19
  } & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, __VLS_ctx?: {
17
20
  attrs: any;
18
21
  slots: {
@@ -22,10 +25,12 @@ declare const _default: <T extends string | TableItem>(__VLS_props: {
22
25
  } | undefined, __VLS_expose?: ((exposed: import('vue').ShallowUnwrapRef<{}>) => void) | undefined, __VLS_setup?: Promise<{
23
26
  props: {
24
27
  onClick?: (() => any) | undefined;
28
+ onSelect?: (() => any) | undefined;
25
29
  item: T;
26
- actionBuilder?: ((item: T) => IActionBuilderResult[]) | undefined;
30
+ actionBuilder?: ((item: T) => IActionBuilderResult[] | undefined) | undefined;
27
31
  onSwipeStart?: ((id: string) => any) | undefined;
28
32
  swipingItem?: string | undefined;
33
+ isSelected?: boolean | undefined;
29
34
  } & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps;
30
35
  expose(exposed: import('vue').ShallowUnwrapRef<{}>): void;
31
36
  attrs: any;
@@ -39,10 +44,12 @@ declare const _default: <T extends string | TableItem>(__VLS_props: {
39
44
  __ctx?: {
40
45
  props: {
41
46
  onClick?: (() => any) | undefined;
47
+ onSelect?: (() => any) | undefined;
42
48
  item: T;
43
- actionBuilder?: ((item: T) => IActionBuilderResult[]) | undefined;
49
+ actionBuilder?: ((item: T) => IActionBuilderResult[] | undefined) | undefined;
44
50
  onSwipeStart?: ((id: string) => any) | undefined;
45
51
  swipingItem?: string | undefined;
52
+ isSelected?: boolean | undefined;
46
53
  } & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps;
47
54
  expose(exposed: import('vue').ShallowUnwrapRef<{}>): void;
48
55
  attrs: any;
@@ -1 +1 @@
1
- {"version":3,"file":"vc-table-mobile-item.vue.d.ts","sourceRoot":"","sources":["../../../../../../../ui/components/organisms/vc-table/_internal/vc-table-mobile-item/vc-table-mobile-item.vue.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,oBAAoB,EAAE,MAAM,gCAAgC,CAAC;AAGtE,MAAM,WAAW,KAAK;IACpB,CAAC,KAAK,EAAE,YAAY,EAAE,EAAE,EAAE,MAAM,GAAG,IAAI,CAAC;IACxC,CAAC,KAAK,EAAE,OAAO,GAAG,IAAI,CAAC;CACxB;AACD,MAAM,WAAW,SAAS;IAExB,CAAC,CAAC,EAAE,MAAM,GAAG,GAAG,CAAC;IACjB,OAAO,CAAC,EAAE,oBAAoB,EAAE,CAAC;CAClC;;;;kCA0gB8B,oBAAoB,EAAE;;;;WAS9C,GAAG;;yBArCoB,GAAG;;;yCAoCjB,OAAO,KAAK,EAAE,gBAAgB,CAAC,EAAE,CAAC,KAAG,IAAI;;;;sCAR1B,oBAAoB,EAAE;;;;oBAQrC,OAAO,KAAK,EAAE,gBAAgB,CAAC,EAAE,CAAC,GAAG,IAAI;WAClD,GAAG;;yBArCoB,GAAG;;;;;;;;;;0CA4BF,oBAAoB,EAAE;;;;wBAQrC,OAAO,KAAK,EAAE,gBAAgB,CAAC,EAAE,CAAC,GAAG,IAAI;eAClD,GAAG;;6BArCoB,GAAG;;;;;AA3ejC,wBAqhB2E"}
1
+ {"version":3,"file":"vc-table-mobile-item.vue.d.ts","sourceRoot":"","sources":["../../../../../../../ui/components/organisms/vc-table/_internal/vc-table-mobile-item/vc-table-mobile-item.vue.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,oBAAoB,EAAE,MAAM,8BAA8B,CAAC;AAKpE,MAAM,WAAW,KAAK;IACpB,CAAC,KAAK,EAAE,YAAY,EAAE,EAAE,EAAE,MAAM,GAAG,IAAI,CAAC;IACxC,CAAC,KAAK,EAAE,OAAO,GAAG,IAAI,CAAC;IACvB,CAAC,KAAK,EAAE,QAAQ,GAAG,IAAI,CAAC;CACzB;AACD,MAAM,WAAW,SAAS;IAExB,CAAC,CAAC,EAAE,MAAM,GAAG,GAAG,CAAC;IACjB,OAAO,CAAC,EAAE,oBAAoB,EAAE,CAAC;CAClC;;;;;kCAsf8B,oBAAoB,EAAE,GAAG,SAAS;;;;;WAU1D,GAAG;;yBA1CoB,GAAG;;;yCAyCjB,OAAO,KAAK,EAAE,gBAAgB,CAAC,EAAE,CAAC,KAAG,IAAI;;;;;sCAT1B,oBAAoB,EAAE,GAAG,SAAS;;;;;oBASjD,OAAO,KAAK,EAAE,gBAAgB,CAAC,EAAE,CAAC,GAAG,IAAI;WAClD,GAAG;;yBA1CoB,GAAG;;;;;;;;;;;0CAgCF,oBAAoB,EAAE,GAAG,SAAS;;;;;wBASjD,OAAO,KAAK,EAAE,gBAAgB,CAAC,EAAE,CAAC,GAAG,IAAI;eAClD,GAAG;;6BA1CoB,GAAG;;;;;AAndjC,wBAkgB2E"}
@@ -33,7 +33,7 @@ declare const _default: <T extends string | TableItem>(__VLS_props: {
33
33
  value: T[];
34
34
  }) => any) | undefined;
35
35
  "onSelect:all"?: ((values: boolean) => any) | undefined;
36
- itemActionBuilder?: ((item: T) => IActionBuilderResult[]) | undefined;
36
+ itemActionBuilder?: ((item: T) => IActionBuilderResult[] | undefined) | undefined;
37
37
  multiselect?: boolean | undefined;
38
38
  totalLabel?: string | undefined;
39
39
  searchPlaceholder?: string | undefined;
@@ -48,6 +48,7 @@ declare const _default: <T extends string | TableItem>(__VLS_props: {
48
48
  reorderableRows?: boolean | undefined;
49
49
  stateKey: string;
50
50
  selectAll?: boolean | undefined;
51
+ enableItemActions?: boolean | undefined;
51
52
  } & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, __VLS_ctx?: {
52
53
  attrs: any;
53
54
  slots: Readonly<{
@@ -112,7 +113,7 @@ declare const _default: <T extends string | TableItem>(__VLS_props: {
112
113
  value: T[];
113
114
  }) => any) | undefined;
114
115
  "onSelect:all"?: ((values: boolean) => any) | undefined;
115
- itemActionBuilder?: ((item: T) => IActionBuilderResult[]) | undefined;
116
+ itemActionBuilder?: ((item: T) => IActionBuilderResult[] | undefined) | undefined;
116
117
  multiselect?: boolean | undefined;
117
118
  totalLabel?: string | undefined;
118
119
  searchPlaceholder?: string | undefined;
@@ -127,6 +128,7 @@ declare const _default: <T extends string | TableItem>(__VLS_props: {
127
128
  reorderableRows?: boolean | undefined;
128
129
  stateKey: string;
129
130
  selectAll?: boolean | undefined;
131
+ enableItemActions?: boolean | undefined;
130
132
  } & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps;
131
133
  expose(exposed: import('vue').ShallowUnwrapRef<{}>): void;
132
134
  attrs: any;
@@ -195,7 +197,7 @@ declare const _default: <T extends string | TableItem>(__VLS_props: {
195
197
  value: T[];
196
198
  }) => any) | undefined;
197
199
  "onSelect:all"?: ((values: boolean) => any) | undefined;
198
- itemActionBuilder?: ((item: T) => IActionBuilderResult[]) | undefined;
200
+ itemActionBuilder?: ((item: T) => IActionBuilderResult[] | undefined) | undefined;
199
201
  multiselect?: boolean | undefined;
200
202
  totalLabel?: string | undefined;
201
203
  searchPlaceholder?: string | undefined;
@@ -210,6 +212,7 @@ declare const _default: <T extends string | TableItem>(__VLS_props: {
210
212
  reorderableRows?: boolean | undefined;
211
213
  stateKey: string;
212
214
  selectAll?: boolean | undefined;
215
+ enableItemActions?: boolean | undefined;
213
216
  } & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps;
214
217
  expose(exposed: import('vue').ShallowUnwrapRef<{}>): void;
215
218
  attrs: any;
@@ -1 +1 @@
1
- {"version":3,"file":"vc-table.vue.d.ts","sourceRoot":"","sources":["../../../../../ui/components/organisms/vc-table/vc-table.vue.ts"],"names":[],"mappings":"AAEA,OAAO,EAOL,GAAG,EAIH,QAAQ,EAET,MAAM,KAAK,CAAC;AAOb,OAAO,EAAE,oBAAo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GAAG;4BACX;gBAAE,UAAU,EAAE,MAAM,IAAI,CAAA;aAAE,KAAK,GAAG;;;kBACZ,GAAG;8BAGvB,GAAG,KAAK,GAAG;2BACd,GAAG,KAAK,GAAG;4BACV,GAAG,KAAK,GAAG;;+CAJQ,GAAG,KAAK,GAAG;;;sBACG,aAAa;kBAAO,GAAG;4BAJxD,GAAG,KAAK,GAAG;4BACX;gBAAE,UAAU,EAAE,MAAM,IAAI,CAAA;aAAE,KAAK,GAAG;;;kBACZ,GAAG;8BAGvB,GAAG,KAAK,GAAG;2BACd,GAAG,KAAK,GAAG;4BACV,GAAG,KAAK,GAAG;;;uBA0DQ,MAAM;uBAAa,MAAM;;;;;AAxE9D,wBA2+D2E;AAQ3E,KAAK,cAAc,CAAC,CAAC,IAAI;KAAG,CAAC,IAAI,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;CAAG,GAAG,EAAE,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vc-shell/framework",
3
- "version": "1.0.169",
3
+ "version": "1.0.170",
4
4
  "type": "module",
5
5
  "main": "./dist/framework.js",
6
6
  "types": "./dist/index.d.ts",
@@ -50,12 +50,13 @@
50
50
  "vue-i18n": "^9.8.0",
51
51
  "vue-router": "^4.2.5",
52
52
  "vue3-ace-editor": "^2.2.4",
53
+ "vue3-touch-events": "^4.1.8",
53
54
  "whatwg-fetch": "^3.6.19"
54
55
  },
55
56
  "devDependencies": {
56
- "@vc-shell/api-client-generator": "^1.0.169",
57
- "@vc-shell/config-generator": "^1.0.169",
58
- "@vc-shell/ts-config": "^1.0.169",
57
+ "@vc-shell/api-client-generator": "^1.0.170",
58
+ "@vc-shell/config-generator": "^1.0.170",
59
+ "@vc-shell/ts-config": "^1.0.170",
59
60
  "@vitejs/plugin-vue": "^5.0.3",
60
61
  "sass": "^1.69.6",
61
62
  "typescript": "^5.3.3",
@@ -1,6 +1,5 @@
1
1
  import { createAppModule } from "../../../core/plugins/modularity";
2
2
  import * as components from "./components";
3
- import * as locales from "./locales";
4
3
 
5
4
  // Declare globally
6
5
  declare module "@vue/runtime-core" {
@@ -9,6 +8,6 @@ declare module "@vue/runtime-core" {
9
8
  }
10
9
  }
11
10
 
12
- export const AssetsDetailsModule = createAppModule(components, locales);
11
+ export const AssetsDetailsModule = createAppModule(components);
13
12
 
14
13
  export * from "./components";
@@ -25,6 +25,7 @@
25
25
  :header="false"
26
26
  :footer="false"
27
27
  :item-action-builder="!readonly ? actionBuilder : undefined"
28
+ :enable-item-actions="!readonly"
28
29
  :multiselect="!readonly"
29
30
  class="tw-h-full tw-w-full"
30
31
  @item-click="onItemClick"
@@ -34,14 +35,21 @@
34
35
  <!-- Empty template -->
35
36
  <template #empty>
36
37
  <div class="tw-w-full tw-h-full tw-box-border tw-flex tw-flex-col tw-items-center tw-justify-center">
37
- <VcIcon
38
- icon="fas fa-cloud-upload-alt"
39
- class="tw-text-[100px] tw-text-[#41afe6]"
40
- ></VcIcon>
41
- <div class="tw-m-4 tw-text-xl tw-font-medium">
42
- {{ t("ASSETS_MANAGER.EMPTY.NO_ASSETS") }}
43
- </div>
44
- <VcButton @click="toggleUploader">{{ t("ASSETS_MANAGER.EMPTY.UPLOAD") }}</VcButton>
38
+ <template v-if="!readonly">
39
+ <VcIcon
40
+ icon="fas fa-cloud-upload-alt"
41
+ class="tw-text-[100px] tw-text-[#41afe6]"
42
+ ></VcIcon>
43
+ <div class="tw-m-4 tw-text-xl tw-font-medium">
44
+ {{ t("ASSETS_MANAGER.EMPTY.UPLOAD_ASSETS") }}
45
+ </div>
46
+ <VcButton @click="toggleUploader">{{ t("ASSETS_MANAGER.EMPTY.UPLOAD") }}</VcButton>
47
+ </template>
48
+ <template v-else>
49
+ <div class="tw-m-4 tw-text-xl tw-font-medium">
50
+ {{ t("ASSETS_MANAGER.EMPTY.NO_ASSETS") }}
51
+ </div>
52
+ </template>
45
53
  </div>
46
54
  </template>
47
55
 
@@ -73,7 +81,7 @@
73
81
  </div>
74
82
  </template>
75
83
 
76
- <!-- Overide order column -->
84
+ <!-- Override order column -->
77
85
  <template #item_sortOrder="{ item }">
78
86
  <div>
79
87
  {{ item.sortOrder }}
@@ -176,7 +184,7 @@ const props = withDefaults(defineProps<Props>(), {
176
184
  param: undefined,
177
185
  });
178
186
 
179
- const emit = defineEmits<Emits>();
187
+ defineEmits<Emits>();
180
188
 
181
189
  defineOptions({
182
190
  name: "AssetsManager",
@@ -196,15 +204,6 @@ const modified = ref(false);
196
204
  const { openBlade, resolveBladeByName } = useBladeNavigation();
197
205
 
198
206
  const bladeToolbar = ref<IBladeToolbar[]>([
199
- {
200
- id: "save",
201
- title: computed(() => t("ASSETS_MANAGER.TOOLBAR.SAVE")),
202
- icon: "fas fa-save",
203
- clickHandler() {
204
- emit("close:blade");
205
- },
206
- disabled: computed(() => !modified.value || readonly.value),
207
- },
208
207
  {
209
208
  id: "add",
210
209
  title: computed(() => t("ASSETS_MANAGER.TOOLBAR.ADD")),
@@ -213,6 +212,7 @@ const bladeToolbar = ref<IBladeToolbar[]>([
213
212
  toggleUploader();
214
213
  },
215
214
  disabled: computed(() => readonly.value),
215
+ isVisible: computed(() => !readonly.value),
216
216
  },
217
217
  {
218
218
  id: "delete",
@@ -224,6 +224,7 @@ const bladeToolbar = ref<IBladeToolbar[]>([
224
224
  }
225
225
  },
226
226
  disabled: computed(() => !selectedItems.value.length || readonly.value),
227
+ isVisible: computed(() => !readonly.value),
227
228
  },
228
229
  ]);
229
230
 
@@ -363,7 +364,8 @@ const actionBuilder = (): IActionBuilderResult<ICommonAsset>[] => {
363
364
  result.push({
364
365
  icon: "fas fa-edit",
365
366
  title: computed(() => t("ASSETS_MANAGER.TABLE.ACTIONS.EDIT")),
366
- variant: "success",
367
+ type: "success",
368
+ position: "right",
367
369
  clickHandler(item: ICommonAsset) {
368
370
  onItemClick(item);
369
371
  },
@@ -372,8 +374,8 @@ const actionBuilder = (): IActionBuilderResult<ICommonAsset>[] => {
372
374
  result.push({
373
375
  icon: "fas fa-trash",
374
376
  title: computed(() => t("ASSETS_MANAGER.TABLE.ACTIONS.DELETE")),
375
- variant: "danger",
376
- leftActions: true,
377
+ type: "danger",
378
+ position: "left",
377
379
  async clickHandler(item: ICommonAsset) {
378
380
  defaultAssets.value = await props.options.assetsRemoveHandler([item]);
379
381
  selectedItems.value = [];
@@ -1,6 +1,5 @@
1
1
  import { createAppModule } from "../../../core/plugins/modularity";
2
2
  import * as components from "./components";
3
- import * as locales from "./locales";
4
3
 
5
4
  // Declare globally
6
5
  declare module "@vue/runtime-core" {
@@ -9,6 +8,6 @@ declare module "@vue/runtime-core" {
9
8
  }
10
9
  }
11
10
 
12
- export const AssetsManagerModule = createAppModule(components, locales);
11
+ export const AssetsManagerModule = createAppModule(components);
13
12
 
14
13
  export * from "./components";
@@ -1,7 +1,7 @@
1
1
  /* eslint-disable @typescript-eslint/no-explicit-any */
2
2
  import { IBladeToolbar } from "../../../../../core/types";
3
3
  import * as _ from "lodash-es";
4
- import { SettingsSchema } from "../../types";
4
+ import { SettingsSchema, ToolbarSchema } from "../../types";
5
5
  import { BaseBladeScope, DetailsBladeContext, ListBladeContext } from "../../factories/types";
6
6
  import { useI18n } from "vue-i18n";
7
7
  import { toValue } from "@vueuse/core";
@@ -13,7 +13,7 @@ export const useToolbarReducer = (args: {
13
13
  customToolbarConfig: BaseBladeScope["toolbarOverrides"];
14
14
  context: UnwrapNestedRefs<DetailsBladeContext> | UnwrapNestedRefs<ListBladeContext>;
15
15
  scope: ComputedRef<BaseBladeScope> | undefined;
16
- }): UnwrapNestedRefs<ComputedRef<IBladeToolbar[]>> | undefined => {
16
+ }): UnwrapNestedRefs<ComputedRef<(IBladeToolbar & ToolbarSchema)[]>> | undefined => {
17
17
  if (!args) return;
18
18
 
19
19
  const { t } = useI18n({ useScope: "global" });
@@ -79,9 +79,10 @@ import {
79
79
  type Component,
80
80
  ConcreteComponent,
81
81
  toRefs,
82
+ provide,
82
83
  } from "vue";
83
84
  import { DynamicDetailsSchema, FormContentSchema, SettingsSchema } from "../types";
84
- import { reactiveComputed, useMounted, useTemplateRefsList } from "@vueuse/core";
85
+ import { reactiveComputed, toReactive, useMounted, useTemplateRefsList } from "@vueuse/core";
85
86
  import {
86
87
  DetailsBladeContext,
87
88
  DetailsBaseBladeScope,
@@ -337,6 +338,8 @@ onBeforeClose(async () => {
337
338
  }
338
339
  });
339
340
 
341
+ provide("bladeContext", toReactive(bladeContext));
342
+
340
343
  defineExpose({
341
344
  title: bladeTitle ?? "",
342
345
  updateActiveWidgetCount,
@@ -44,6 +44,8 @@
44
44
  :items="itemsProxy as Record<string, any>[]"
45
45
  :multiselect="isWidgetView ? false : tableData?.multiselect"
46
46
  :header="isWidgetView ? false : tableData?.header"
47
+ :item-action-builder="actionBuilder"
48
+ :enable-item-actions="!!tableData?.actions"
47
49
  :footer="!isWidgetView"
48
50
  :sort="sort"
49
51
  :pages="pagination?.pages"
@@ -55,6 +57,7 @@
55
57
  :active-filter-count="activeFilterCount"
56
58
  :reorderable-rows="isWidgetView ? false : tableData?.reorderableRows"
57
59
  :pull-to-reload="!isWidgetView"
60
+ :select-all="tableData?.selectAll"
58
61
  @item-click="onItemClick"
59
62
  @pagination-click="onPaginationClick"
60
63
  @selection-changed="onSelectionChanged"
@@ -63,6 +66,7 @@
63
66
  @scroll:ptr="reload"
64
67
  @search:change="onSearchList"
65
68
  @row:reorder="sortRows"
69
+ @select:all="handleSelectAllItems"
66
70
  >
67
71
  <template
68
72
  v-if="isFilterVisible"
@@ -76,6 +80,7 @@
76
80
  <template v-if="tableTemplates?.notFound">
77
81
  <component
78
82
  :is="tableTemplates.notFound"
83
+ :context="bladeContext"
79
84
  @reset="resetSearch"
80
85
  ></component>
81
86
  </template>
@@ -101,6 +106,7 @@
101
106
  :class="{
102
107
  'tw-py-6': isWidgetView,
103
108
  }"
109
+ :context="bladeContext"
104
110
  @add="openDetailsBlade"
105
111
  ></component>
106
112
  </template>
@@ -156,19 +162,21 @@ import {
156
162
  ComputedRef,
157
163
  onBeforeMount,
158
164
  toRefs,
165
+ provide,
159
166
  } from "vue";
160
167
  import { useI18n } from "vue-i18n";
161
- import { DynamicGridSchema, ListContentSchema, SettingsSchema } from "../types";
168
+ import { DynamicGridSchema, ListContentSchema, SettingsSchema, ToolbarSchema } from "../types";
162
169
  import { useFilterBuilder, useTableTemplates } from "../composables";
163
170
  import { useFunctions, useNotifications } from "../../../../core/composables";
164
- import { ITableColumns } from "../../../../core/types";
171
+ import { IActionBuilderResult, IBladeToolbar, ITableColumns } from "../../../../core/types";
165
172
  import { useToolbarReducer } from "../composables/useToolbarReducer";
166
173
  import { notification, usePopup } from "../../../components";
167
174
  import { ListBaseBladeScope, ListBladeContext, UseList } from "../factories/types";
168
175
  import { IParentCallArgs } from "../../../index";
169
176
  import * as _ from "lodash-es";
170
- import { useMounted } from "@vueuse/core";
177
+ import { toReactive, useMounted } from "@vueuse/core";
171
178
  import { safeIn } from "../helpers/safeIn";
179
+ import { isRef } from "vue";
172
180
 
173
181
  export interface Props {
174
182
  expanded?: boolean;
@@ -357,7 +365,7 @@ const toolbarComputed =
357
365
  await removeItems();
358
366
  },
359
367
  disabled: computed(() => !selectedIds.value?.length),
360
- isVisible: isDesktop.value,
368
+ // isVisible: computed(() => isDesktop.value),
361
369
  },
362
370
  },
363
371
  customToolbarConfig: toValue(scope)?.toolbarOverrides,
@@ -586,6 +594,42 @@ function updateActiveWidgetCount() {
586
594
  });
587
595
  }
588
596
 
597
+ async function handleSelectAllItems(all: boolean) {
598
+ allSelected.value = all;
599
+ }
600
+
601
+ // TODO add to documentation
602
+ function actionBuilder(): IActionBuilderResult[] | undefined {
603
+ const result = tableData?.value?.actions?.map((action) => {
604
+ return {
605
+ icon: action.icon,
606
+ title: computed(() => t(action.title)),
607
+ type: action.type,
608
+ position: action.position,
609
+ clickHandler: async (itemVal: (typeof items.value)[number]) => {
610
+ try {
611
+ if (isRef(toolbarComputed) && toolbarComputed.value && toolbarComputed.value.length > 0) {
612
+ const toolbarItem = toolbarComputed.value.find((x) => x.method === action.method);
613
+ selectedIds.value = [itemVal.id];
614
+ if (toolbarItem) {
615
+ await toolbarItem.clickHandler?.();
616
+ } else {
617
+ await toValue(scope)?.[action.method]?.(itemVal);
618
+ }
619
+ selectedIds.value = [];
620
+ }
621
+ } catch (error) {
622
+ throw new Error(`Method ${action.method} is not defined in scope or toolbarOverrides`);
623
+ }
624
+ },
625
+ };
626
+ });
627
+
628
+ return result;
629
+ }
630
+
631
+ provide("bladeContext", toReactive(bladeContext));
632
+
589
633
  defineExpose({
590
634
  reload,
591
635
  title,
@@ -58,7 +58,7 @@ export interface SettingsDetails extends SettingsBase {
58
58
 
59
59
  export type IViewComponentName = "DynamicBladeForm" | "DynamicBladeList";
60
60
 
61
- type ToolbarSchema = {
61
+ export type ToolbarSchema = {
62
62
  id: string;
63
63
  title: string;
64
64
  icon: string;
@@ -162,6 +162,14 @@ export interface ListContentSchema {
162
162
  };
163
163
  })[];
164
164
  reorderableRows?: boolean;
165
+ // TODO Add to documentation
166
+ selectAll?: boolean;
167
+ // TODO Add to documentation
168
+ actions?: (ToolbarSchema & {
169
+ position: "right" | "left";
170
+ type: "danger" | "success";
171
+ method: string;
172
+ })[];
165
173
  mobileTemplate?: {
166
174
  component: string;
167
175
  };
@@ -7,14 +7,13 @@
7
7
  <template v-if="isLogin">
8
8
  <VcForm @submit.prevent="login">
9
9
  <Field
10
- v-slot="{ field, errorMessage, handleChange, errors }"
10
+ v-slot="{ errorMessage, handleChange, errors }"
11
11
  :label="t('LOGIN.FIELDS.LOGIN.LABEL')"
12
12
  name="username"
13
13
  :model-value="form.username"
14
14
  rules="required"
15
15
  >
16
16
  <VcInput
17
- v-bind="field"
18
17
  ref="loginField"
19
18
  v-model="form.username"
20
19
  class="tw-mb-4 tw-mt-1"
@@ -27,14 +26,13 @@
27
26
  />
28
27
  </Field>
29
28
  <Field
30
- v-slot="{ field, errorMessage, handleChange, errors }"
29
+ v-slot="{ errorMessage, handleChange, errors }"
31
30
  :label="t('LOGIN.FIELDS.PASSWORD.LABEL')"
32
31
  name="password"
33
32
  :model-value="form.password"
34
33
  rules="required"
35
34
  >
36
35
  <VcInput
37
- v-bind="field"
38
36
  ref="passwordField"
39
37
  v-model="form.password"
40
38
  class="tw-mb-4"
@@ -78,6 +76,7 @@
78
76
  <div
79
77
  class="tw-flex tw-items-center tw-text-center tw-uppercase tw-text-[color:var(--separator-text)] before:tw-content-[''] before:tw-flex-1 before:tw-border-b before:tw-border-b-[color:var(--separator)] before:tw-mr-2 after:tw-content-[''] after:tw-flex-1 after:tw-border-b after:tw-border-b-[color:var(--separator)] after:tw-ml-2"
80
78
  >
79
+ <!-- TODO add to localization -->
81
80
  OR
82
81
  </div>
83
82
  <div class="tw-flex tw-justify-center tw-mt-4 tw-flex-wrap tw-gap-2">
@@ -198,7 +197,7 @@ const props = defineProps<Props>();
198
197
 
199
198
  const router = useRouter();
200
199
 
201
- useForm({ validateOnMount: false });
200
+ const { setFieldError, resetForm, setErrors, validateField } = useForm({ validateOnMount: false });
202
201
  const { uiSettings, loading: customizationLoading } = useSettings();
203
202
  const { t } = useI18n({ useScope: "global" });
204
203
  let useLogin;
@@ -253,6 +252,7 @@ const forgotPasswordForm = reactive({
253
252
 
254
253
  const login = async () => {
255
254
  if (isValid.value) {
255
+ signInResult.value.error = "";
256
256
  signInResult.value = (await signIn(form.username, form.password)) as SignInResult & {
257
257
  status?: number;
258
258
  error?: any;
@@ -264,6 +264,8 @@ const login = async () => {
264
264
  if (signInResult.value.status) {
265
265
  if (signInResult.value.status === 401) {
266
266
  signInResult.value.error = "The login or password is incorrect.";
267
+ form.password = "";
268
+ validateField("password");
267
269
  } else {
268
270
  signInResult.value.error = "Authentication error (code: " + signInResult.value.status + ").";
269
271
  }
@@ -288,6 +290,7 @@ const forgot = async () => {
288
290
 
289
291
  const togglePassRequest = () => {
290
292
  isLogin.value = !isLogin.value;
293
+ signInResult.value.error = "";
291
294
  if (isLogin.value) {
292
295
  forgotPasswordRequestSent.value = false;
293
296
  forgotPasswordForm.loginOrEmail = "";
@@ -24,10 +24,12 @@
24
24
  :style="{ height: dist ? `${dist}px` : '0px' }"
25
25
  >
26
26
  <VcIcon
27
- icon="fas fa-spinner"
28
- :style="{ 'tw-font-size': `${dist / 2}px` }"
29
- class="vc-container__overscroll-icon"
27
+ :icon="status === 'pulling' ? 'fas fa-arrow-down' : 'fas fa-sync'"
28
+ :class="[iconClass]"
29
+ :style="{ transform: status === 'pulling' ? `rotate(${dist * 3}deg)` : '' }"
30
30
  ></VcIcon>
31
+ <span v-if="status === 'pulling'">{{ $t("COMPONENTS.ATOMS.VC_CONTAINER.PULL_TO_REFRESH") }}</span>
32
+ <span v-else-if="status === 'loosing'">{{ $t("COMPONENTS.ATOMS.VC_CONTAINER.REFRESHING") }}</span>
31
33
  </div>
32
34
  <slot></slot>
33
35
  </div>
@@ -73,6 +75,15 @@ onMounted(() => {
73
75
 
74
76
  const touchable = computed(() => status.value !== "refresh" && status.value !== "success");
75
77
 
78
+ const iconClass = computed(() => {
79
+ if (status.value === "loosing") {
80
+ return "vc-container__overscroll-icon_refresh";
81
+ } else if (status.value === "pulling") {
82
+ return "vc-container__overscroll-icon_pulling";
83
+ }
84
+ return "vc-container__overscroll-icon";
85
+ });
86
+
76
87
  const scrollTop = () => {
77
88
  if (component.value) {
78
89
  component.value.scroll(0, 0);
@@ -178,15 +189,27 @@ defineExpose({
178
189
  }
179
190
 
180
191
  &__overscroll {
181
- @apply tw-relative tw-w-full tw-flex tw-items-start tw-justify-center tw-overflow-hidden;
192
+ @apply tw-relative tw-w-full tw-flex tw-items-start tw-justify-center tw-overflow-hidden tw-gap-2;
182
193
 
183
- &-icon {
184
- @apply tw-text-[color:#a1c0d4] tw-animate-spin;
194
+ &_passed {
195
+ @apply tw-text-[#43b0e6];
185
196
  }
197
+ }
186
198
 
187
- &_passed &-icon {
188
- @apply tw-text-[#43b0e6];
199
+ &__overscroll-icon {
200
+ @apply tw-text-[color:#a1c0d4];
201
+
202
+ &_pulling {
203
+ @apply tw-text-[color:#a1c0d4];
189
204
  }
205
+
206
+ &_refresh {
207
+ animation: tw-spin 2s linear infinite;
208
+ }
209
+ }
210
+
211
+ &__overscroll span {
212
+ @apply tw-mb-2 tw-text-sm tw-text-gray-500;
190
213
  }
191
214
 
192
215
  &__inner {
@@ -214,4 +237,13 @@ defineExpose({
214
237
  @apply tw-p-0;
215
238
  }
216
239
  }
240
+
241
+ @keyframes tw-spin {
242
+ from {
243
+ transform: rotate(0deg);
244
+ }
245
+ to {
246
+ transform: rotate(360deg);
247
+ }
248
+ }
217
249
  </style>