@vc-shell/framework 1.0.163 → 1.0.165

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 (61) hide show
  1. package/CHANGELOG.md +23 -0
  2. package/core/composables/index.ts +1 -0
  3. package/core/composables/useAsync/index.ts +4 -3
  4. package/core/composables/useBreadcrumbs/index.ts +75 -0
  5. package/dist/core/composables/index.d.ts +1 -0
  6. package/dist/core/composables/index.d.ts.map +1 -1
  7. package/dist/core/composables/useAsync/index.d.ts +1 -1
  8. package/dist/core/composables/useAsync/index.d.ts.map +1 -1
  9. package/dist/core/composables/useBreadcrumbs/index.d.ts +18 -0
  10. package/dist/core/composables/useBreadcrumbs/index.d.ts.map +1 -0
  11. package/dist/framework.js +2761 -2706
  12. package/dist/index.css +1 -1
  13. package/dist/shared/components/notifications/components/notification-container/index.d.ts +5 -5
  14. package/dist/shared/components/notifications/components/notification-container/index.d.ts.map +1 -1
  15. package/dist/shared/modules/dynamic/components/fields/GalleryField.d.ts.map +1 -1
  16. package/dist/shared/modules/dynamic/components/fields/ImageField.d.ts.map +1 -1
  17. package/dist/shared/modules/dynamic/components/fields/StatusField.d.ts.map +1 -1
  18. package/dist/shared/modules/dynamic/components/fields/VideoField.d.ts.map +1 -1
  19. package/dist/shared/modules/dynamic/factories/base/useListFactory.d.ts +3 -3
  20. package/dist/shared/modules/dynamic/factories/base/useListFactory.d.ts.map +1 -1
  21. package/dist/shared/modules/dynamic/factories/types/index.d.ts +9 -3
  22. package/dist/shared/modules/dynamic/factories/types/index.d.ts.map +1 -1
  23. package/dist/shared/modules/dynamic/pages/dynamic-blade-form.vue.d.ts +9 -9
  24. package/dist/shared/modules/dynamic/pages/dynamic-blade-form.vue.d.ts.map +1 -1
  25. package/dist/shared/modules/dynamic/pages/dynamic-blade-list.vue.d.ts +10 -4
  26. package/dist/shared/modules/dynamic/pages/dynamic-blade-list.vue.d.ts.map +1 -1
  27. package/dist/shared/modules/dynamic/types/index.d.ts +2 -1
  28. package/dist/shared/modules/dynamic/types/index.d.ts.map +1 -1
  29. package/dist/tsconfig.tsbuildinfo +1 -1
  30. package/dist/ui/components/molecules/vc-breadcrumbs/_internal/vc-breadcrumbs-item/vc-breadcrumbs-item.vue.d.ts +20 -52
  31. package/dist/ui/components/molecules/vc-breadcrumbs/_internal/vc-breadcrumbs-item/vc-breadcrumbs-item.vue.d.ts.map +1 -1
  32. package/dist/ui/components/molecules/vc-breadcrumbs/index.d.ts +3 -21
  33. package/dist/ui/components/molecules/vc-breadcrumbs/index.d.ts.map +1 -1
  34. package/dist/ui/components/molecules/vc-breadcrumbs/vc-breadcrumbs.vue.d.ts +3 -14
  35. package/dist/ui/components/molecules/vc-breadcrumbs/vc-breadcrumbs.vue.d.ts.map +1 -1
  36. package/dist/ui/components/molecules/vc-editor/vc-editor.vue.d.ts.map +1 -1
  37. package/dist/ui/components/molecules/vc-field/vc-field.vue.d.ts.map +1 -1
  38. package/dist/ui/components/molecules/vc-rating/vc-rating.vue.d.ts.map +1 -1
  39. package/dist/ui/components/organisms/vc-gallery/_internal/vc-gallery-item/vc-gallery-item.vue.d.ts +1 -1
  40. package/dist/ui/components/organisms/vc-table/vc-table.vue.d.ts +3 -6
  41. package/dist/ui/components/organisms/vc-table/vc-table.vue.d.ts.map +1 -1
  42. package/dist/ui/types/index.d.ts +6 -0
  43. package/dist/ui/types/index.d.ts.map +1 -1
  44. package/package.json +5 -5
  45. package/shared/modules/dynamic/components/fields/GalleryField.ts +2 -2
  46. package/shared/modules/dynamic/components/fields/ImageField.ts +2 -2
  47. package/shared/modules/dynamic/components/fields/StatusField.ts +7 -1
  48. package/shared/modules/dynamic/components/fields/VideoField.ts +2 -2
  49. package/shared/modules/dynamic/factories/base/useListFactory.ts +6 -6
  50. package/shared/modules/dynamic/factories/types/index.ts +12 -4
  51. package/shared/modules/dynamic/pages/dynamic-blade-form.vue +8 -6
  52. package/shared/modules/dynamic/pages/dynamic-blade-list.vue +39 -12
  53. package/shared/modules/dynamic/types/index.ts +2 -6
  54. package/ui/components/molecules/vc-breadcrumbs/_internal/vc-breadcrumbs-item/vc-breadcrumbs-item.vue +11 -27
  55. package/ui/components/molecules/vc-breadcrumbs/vc-breadcrumbs.stories.ts +3 -3
  56. package/ui/components/molecules/vc-breadcrumbs/vc-breadcrumbs.vue +4 -9
  57. package/ui/components/molecules/vc-editor/vc-editor.vue +9 -2
  58. package/ui/components/molecules/vc-field/vc-field.vue +0 -1
  59. package/ui/components/molecules/vc-rating/vc-rating.vue +1 -1
  60. package/ui/components/organisms/vc-table/vc-table.vue +0 -2
  61. package/ui/types/index.ts +6 -1
@@ -138,7 +138,6 @@ export interface SettingsBase {
138
138
  * Collapsed blade width in percentage
139
139
  * @default "50%"
140
140
  */
141
- // TODO Add to documentation
142
141
  width?: `${number}%`;
143
142
  }
144
143
 
@@ -427,7 +426,6 @@ export interface VideoSchema
427
426
  * Data field schema interface.
428
427
  * @interface
429
428
  */
430
- // TODO update documentation
431
429
  export interface FieldSchema
432
430
  extends Pick<SchemaBase, "id" | "property" | "label" | "visibility" | "tooltip" | "horizontalSeparator"> {
433
431
  /**
@@ -437,7 +435,7 @@ export interface FieldSchema
437
435
  component: "vc-field";
438
436
  /**
439
437
  * Field variant.
440
- * @type {"text" | "normal" | "date" | "date-ago" | "link"}
438
+ * @type {"date-ago" | "date" | "link" | "text" | "email"}
441
439
  */
442
440
  variant?: ComponentProps<typeof VcField>["type"];
443
441
  /**
@@ -454,6 +452,7 @@ export interface FieldSchema
454
452
  /**
455
453
  * Field columns aspect ratio.
456
454
  * @description Uses CSS flex-grow property.
455
+ * @default [1,1]
457
456
  * @type {[number, number]}
458
457
  */
459
458
  aspectRatio?: [number, number];
@@ -769,7 +768,6 @@ export interface FieldsetSchema
769
768
  * Switch schema interface.
770
769
  * @interface
771
770
  */
772
- // TODO add to documentation
773
771
  export interface SwitchSchema extends Omit<SchemaBase, "placeholder" | "multilanguage"> {
774
772
  /**
775
773
  * Component type for switch.
@@ -788,7 +786,6 @@ export interface SwitchSchema extends Omit<SchemaBase, "placeholder" | "multilan
788
786
  falseValue?: boolean;
789
787
  }
790
788
 
791
- // TODO add to documentation
792
789
  export type TableSchema = Omit<ListContentSchema, "filter"> & Pick<SchemaBase, "id" | "property" | "visibility">;
793
790
 
794
791
  /**
@@ -838,7 +835,6 @@ export interface ButtonSchema extends Pick<SchemaBase, "id" | "disabled" | "visi
838
835
  * Custom component schema interface.
839
836
  * @interface
840
837
  */
841
- // TODO add to documentation
842
838
  export interface CustomComponentSchema extends Pick<SchemaBase, "id" | "visibility"> {
843
839
  /**
844
840
  * Component type for custom component.
@@ -19,36 +19,20 @@
19
19
  </template>
20
20
 
21
21
  <script lang="ts" setup>
22
+ import { Breadcrumbs } from "../../../../../types";
22
23
  import { VcIcon } from "./../../../../";
23
24
 
24
- const props = defineProps({
25
- current: {
26
- type: Boolean,
27
- default: false,
28
- },
29
-
30
- icon: {
31
- type: String,
32
- default: undefined,
33
- },
34
-
35
- title: {
36
- type: String,
37
- default: undefined,
38
- },
25
+ export interface Props extends Breadcrumbs {
26
+ current: boolean;
27
+ }
39
28
 
40
- clickHandler: {
41
- type: Function,
42
- default: undefined,
43
- },
29
+ export interface Emits {
30
+ (event: "click"): void;
31
+ }
44
32
 
45
- id: {
46
- type: String,
47
- default: undefined,
48
- },
49
- });
33
+ const props = defineProps<Props>();
50
34
 
51
- const emit = defineEmits(["click"]);
35
+ const emit = defineEmits<Emits>();
52
36
 
53
37
  function onClick(): void {
54
38
  if (!props.current) {
@@ -74,12 +58,12 @@ function onClick(): void {
74
58
 
75
59
  .vc-breadcrumbs-item {
76
60
  @apply tw-h-[var(--breadcrumbs-item-height)]
77
- tw-box-border tw-rounded-[calc(var(--breadcrumbs-item-height)/2)]
61
+ tw-box-border tw-rounded-[3px]
78
62
  tw-border tw-border-solid
79
63
  tw-border-[color:var(--breadcrumbs-item-border-color)]
80
64
  tw-text-[color:var(--breadcrumbs-item-color)]
81
65
  tw-whitespace-nowrap
82
- tw-px-3 tw-mr-2
66
+ tw-px-3
83
67
  tw-text-sm tw-cursor-pointer tw-inline-flex tw-items-center
84
68
  hover:tw-border
85
69
  hover:tw-border-solid
@@ -23,17 +23,17 @@ export const Primary: Story = {
23
23
  id: "0",
24
24
  title: "Back",
25
25
  icon: "fas fa-arrow-left",
26
- current: false,
26
+ // current: false,
27
27
  },
28
28
  {
29
29
  id: "1",
30
30
  title: "Electronics",
31
- current: false,
31
+ // current: false,
32
32
  },
33
33
  {
34
34
  id: "2",
35
35
  title: "Desktop",
36
- current: true,
36
+ // current: true,
37
37
  },
38
38
  ],
39
39
  },
@@ -1,7 +1,7 @@
1
1
  <template>
2
2
  <div
3
- v-if="items"
4
- class="tw-flex tw-items-center tw-flex-nowrap"
3
+ v-if="items && items.length"
4
+ class="tw-flex tw-items-center tw-flex-wrap tw-gap-[10px]"
5
5
  >
6
6
  <VcBreadcrumbsItem
7
7
  v-for="(item, i) in items"
@@ -13,16 +13,11 @@
13
13
  </template>
14
14
 
15
15
  <script lang="ts" setup>
16
+ import { Breadcrumbs } from "../../../types";
16
17
  import VcBreadcrumbsItem from "./_internal/vc-breadcrumbs-item/vc-breadcrumbs-item.vue";
17
18
 
18
19
  export interface Props {
19
- items?: {
20
- current: boolean;
21
- icon?: string;
22
- title: string;
23
- clickHandler?: () => void;
24
- id: string;
25
- }[];
20
+ items?: Breadcrumbs[];
26
21
  }
27
22
 
28
23
  withDefaults(defineProps<Props>(), {
@@ -27,6 +27,7 @@
27
27
  <!-- Editor field -->
28
28
  <QuillEditor
29
29
  :key="`${disabled}`"
30
+ ref="quillRef"
30
31
  v-model:content="content"
31
32
  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
33
  :class="{ 'tw-bg-[#fafafa] tw-text-[#424242] tw-cursor-default': disabled }"
@@ -50,9 +51,9 @@
50
51
  </template>
51
52
  <!-- eslint-disable @typescript-eslint/no-explicit-any -->
52
53
  <script lang="ts" setup>
53
- import { QuillEditor } from "@vueup/vue-quill";
54
+ import { QuillEditor, Quill } from "@vueup/vue-quill";
54
55
  import "@vueup/vue-quill/dist/vue-quill.snow.css";
55
- import { ref, unref, watch, onMounted, onUpdated } from "vue";
56
+ import { ref, unref, watch, onMounted, onUpdated, Ref } from "vue";
56
57
  import ImageUploader from "quill-image-uploader";
57
58
  import { VcLabel, VcHint } from "./../../";
58
59
 
@@ -82,6 +83,8 @@ defineSlots<{
82
83
  }>();
83
84
 
84
85
  const content = ref();
86
+ const quillRef = ref<Quill | null>(null);
87
+
85
88
  const toolbar = {
86
89
  container: [
87
90
  { header: 1 },
@@ -131,6 +134,10 @@ onUpdated(() => {
131
134
  watch(
132
135
  () => props.modelValue,
133
136
  (value) => {
137
+ if (value === "") {
138
+ quillRef.value?.setText(value);
139
+ return;
140
+ }
134
141
  content.value = unref(value);
135
142
  },
136
143
  { immediate: true },
@@ -63,7 +63,6 @@ export interface Props {
63
63
  * Add button for field content copying
64
64
  */
65
65
  copyable?: boolean;
66
- // TODO Add to documentation
67
66
  /**
68
67
  * Field orientation
69
68
  */
@@ -41,7 +41,7 @@
41
41
  </template>
42
42
  </template>
43
43
  <template v-else>
44
- <span class="vc-rating__placeholder"></span>
44
+ <span class="vc-rating__placeholder">{{ placeholder }}</span>
45
45
  </template>
46
46
  </div>
47
47
  </template>
@@ -507,7 +507,6 @@ const props = withDefaults(
507
507
  pages: 0,
508
508
  expanded: true,
509
509
  currentPage: 0,
510
- selectedItemId: undefined,
511
510
  header: true,
512
511
  footer: true,
513
512
  activeFilterCount: 0,
@@ -526,7 +525,6 @@ const emit = defineEmits<{
526
525
  selectionChanged: [values: T[]];
527
526
  "search:change": [value: string | number | Date | null | undefined];
528
527
  headerClick: [item: ITableColumns];
529
- value: [Record<string, unknown>];
530
528
  itemClick: [item: T];
531
529
  "scroll:ptr": [];
532
530
  "row:reorder": [args: { dragIndex: number; dropIndex: number; value: T[] }];
package/ui/types/index.ts CHANGED
@@ -10,4 +10,9 @@ declare module "vue" {
10
10
  export interface GlobalComponents extends TGlobalComponents<typeof components> {}
11
11
  }
12
12
 
13
- export {};
13
+ export interface Breadcrumbs {
14
+ icon?: string;
15
+ title: string;
16
+ clickHandler?: (id: string) => void | Promise<void>;
17
+ id: string;
18
+ }