@vc-shell/framework 1.0.237 → 1.0.239

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 (34) hide show
  1. package/CHANGELOG.md +26 -0
  2. package/core/directives/loading/index.ts +8 -1
  3. package/core/directives/loading/styles.css +2 -3
  4. package/dist/core/directives/loading/index.d.ts.map +1 -1
  5. package/dist/framework.js +16555 -16498
  6. package/dist/index.css +1 -1
  7. package/dist/shared/components/blade-navigation/components/vc-blade-navigation/vc-blade-navigation.vue.d.ts.map +1 -1
  8. package/dist/ui/components/atoms/vc-card/vc-card.stories.d.ts +24 -8
  9. package/dist/ui/components/atoms/vc-card/vc-card.stories.d.ts.map +1 -1
  10. package/dist/ui/components/atoms/vc-tooltip/vc-tooltip.vue.d.ts.map +1 -1
  11. package/dist/ui/components/molecules/vc-breadcrumbs/vc-breadcrumbs.vue.d.ts.map +1 -1
  12. package/dist/ui/components/molecules/vc-input/vc-input.stories.d.ts +24 -8
  13. package/dist/ui/components/molecules/vc-input/vc-input.stories.d.ts.map +1 -1
  14. package/dist/ui/components/molecules/vc-input/vc-input.vue.d.ts +24 -8
  15. package/dist/ui/components/molecules/vc-input/vc-input.vue.d.ts.map +1 -1
  16. package/dist/ui/components/organisms/vc-app/_internal/vc-app-menu/_internal/vc-app-menu-item/_internal/vc-app-menu-link.vue.d.ts.map +1 -1
  17. package/dist/ui/components/organisms/vc-app/_internal/vc-app-menu/vc-app-menu.vue.d.ts.map +1 -1
  18. package/dist/ui/components/organisms/vc-blade/vc-blade.vue.d.ts.map +1 -1
  19. package/dist/ui/components/organisms/vc-table/vc-table.vue.d.ts.map +1 -1
  20. package/package.json +4 -4
  21. package/shared/components/app-switcher/components/vc-app-switcher/vc-app-switcher.vue +1 -1
  22. package/shared/components/blade-navigation/components/vc-blade-navigation/vc-blade-navigation.vue +4 -3
  23. package/shared/modules/dynamic/components/fields/GalleryField.ts +1 -1
  24. package/shared/modules/dynamic/pages/dynamic-blade-form.vue +2 -2
  25. package/ui/components/atoms/vc-tooltip/vc-tooltip.vue +2 -0
  26. package/ui/components/molecules/vc-breadcrumbs/vc-breadcrumbs.vue +3 -1
  27. package/ui/components/molecules/vc-input/vc-input.vue +25 -8
  28. package/ui/components/organisms/vc-app/_internal/vc-app-bar/vc-app-bar.vue +1 -1
  29. package/ui/components/organisms/vc-app/_internal/vc-app-menu/_internal/vc-app-menu-item/_internal/vc-app-menu-link.vue +97 -51
  30. package/ui/components/organisms/vc-app/_internal/vc-app-menu/vc-app-menu.vue +5 -11
  31. package/ui/components/organisms/vc-blade/vc-blade.vue +1 -0
  32. package/ui/components/organisms/vc-gallery/vc-gallery.vue +1 -1
  33. package/ui/components/organisms/vc-table/_internal/vc-table-mobile-item/vc-table-mobile-item.vue +4 -1
  34. package/ui/components/organisms/vc-table/vc-table.vue +49 -10
@@ -1,36 +1,44 @@
1
1
  <template>
2
2
  <div
3
- class="vc-app-menu-item tw-flex"
4
- :class="[
5
- {
6
- 'vc-app-menu-item_active': isMenuItemActive,
7
- 'vc-app-menu-item_no-hover': !children?.length,
8
- 'vc-app-menu-item_child-opened': expand && isOpened,
9
- },
10
- ]"
3
+ class="vc-app-menu-link tw-cursor-pointer tw-group"
4
+ :class="{
5
+ 'tw-px-[19px]': ($isDesktop.value && expand) || $isMobile.value,
6
+ 'tw-pl-[19px] tw-pr-[4px]': $isDesktop.value && !expand,
7
+ }"
11
8
  @click="onMenuItemClick"
12
9
  >
13
10
  <div
14
- v-if="icon"
15
- class="vc-app-menu-item__icon tw-w-[var(--app-menu-item-icon-width)]"
11
+ class="vc-app-menu-item tw-flex"
12
+ :class="[
13
+ {
14
+ 'vc-app-menu-item_active': isMenuItemActive,
15
+ 'vc-app-menu-item_no-hover': !children?.length,
16
+ 'vc-app-menu-item_child-opened': expand && isOpened,
17
+ },
18
+ ]"
16
19
  >
17
- <VcIcon
18
- class="tw-text-center"
19
- :icon="icon"
20
- size="m"
21
- />
22
- </div>
23
- <div
24
- v-if="expand"
25
- class="vc-app-menu-item__title tw-capitalize"
26
- >
27
- {{ title }}
28
- <VcIcon
29
- v-if="!!children?.length || false"
30
- class="vc-app-menu-item__title-icon"
31
- :icon="`fas fa-chevron-${isOpened ? 'up' : 'down'}`"
32
- size="xs"
33
- ></VcIcon>
20
+ <div
21
+ v-if="icon"
22
+ class="vc-app-menu-item__icon tw-w-[var(--app-menu-item-icon-width)]"
23
+ >
24
+ <VcIcon
25
+ class="tw-text-center"
26
+ :icon="icon"
27
+ size="m"
28
+ />
29
+ </div>
30
+ <div
31
+ v-if="expand"
32
+ class="vc-app-menu-item__title tw-capitalize"
33
+ >
34
+ {{ title }}
35
+ <VcIcon
36
+ v-if="!!children?.length || false"
37
+ class="vc-app-menu-item__title-icon"
38
+ :icon="`fas fa-chevron-${isOpened ? 'up' : 'down'}`"
39
+ size="xs"
40
+ ></VcIcon>
41
+ </div>
34
42
  </div>
35
43
  </div>
36
44
  <!-- Nested menu items -->
@@ -51,35 +59,43 @@
51
59
  custom
52
60
  >
53
61
  <div
54
- :key="i"
55
- :class="[
56
- {
57
- 'vc-app-menu-item__child-item_active': isActive(nested.url ?? ''),
58
- 'tw-pl-[21px]': expand,
59
- },
60
- 'vc-app-menu-item__child-item tw-min-w-0 tw-flex tw-w-full tw-h-[var(--app-menu-item-height)] tw-items-center',
61
- ]"
62
+ :class="{
63
+ 'tw-px-[19px] ': ($isDesktop.value && expand) || $isMobile.value,
64
+ 'tw-pl-[19px] tw-pr-[4px] ': $isDesktop.value && !expand,
65
+ }"
66
+ class="vc-app-menu-item__child-item-link tw-cursor-pointer tw-z-[2]"
62
67
  @click="$emit('onClick', nested)"
63
68
  >
64
69
  <div
65
- v-if="nested.icon"
66
- class="vc-app-menu-item__icon tw-w-[var(--app-menu-item-icon-width)]"
67
- :class="{
68
- 'tw-p-0': !expand,
69
- }"
70
+ :key="i"
71
+ :class="[
72
+ {
73
+ 'vc-app-menu-item__child-item_active': isActive(nested.url ?? ''),
74
+ 'tw-pl-[21px]': expand,
75
+ },
76
+ 'vc-app-menu-item__child-item tw-min-w-0 tw-flex tw-w-full tw-h-[var(--app-menu-item-height)] tw-items-center',
77
+ ]"
70
78
  >
71
- <VcIcon
72
- class="tw-text-center"
73
- :icon="nested.icon"
74
- size="m"
75
- />
79
+ <div
80
+ v-if="nested.icon"
81
+ class="vc-app-menu-item__icon tw-w-[var(--app-menu-item-icon-width)]"
82
+ :class="{
83
+ 'tw-p-0': !expand,
84
+ }"
85
+ >
86
+ <VcIcon
87
+ class="tw-text-center"
88
+ :icon="nested.icon"
89
+ size="m"
90
+ />
91
+ </div>
92
+ <p
93
+ v-if="expand"
94
+ class="tw-truncate tw-pl-[7px]"
95
+ >
96
+ {{ nested.title }}
97
+ </p>
76
98
  </div>
77
- <p
78
- v-if="expand"
79
- class="tw-truncate tw-pl-[7px]"
80
- >
81
- {{ nested.title }}
82
- </p>
83
99
  </div>
84
100
  </router-link>
85
101
  </template>
@@ -172,6 +188,36 @@ const isActive = (url: string) => {
172
188
  --app-menu-item-active-icon: #2e3d4e;
173
189
  }
174
190
 
191
+ .vc-app-menu-link:hover .vc-app-menu-item {
192
+ @apply tw-bg-[color:var(--app-menu-item-background-color-hover)] tw-bg-opacity-50
193
+ tw-rounded-[var(--app-menu-item-hover-radius)];
194
+
195
+ .vc-app-menu-item__title {
196
+ @apply tw-text-[color:var(--app-menu-item-title-color-active)];
197
+ }
198
+
199
+ .vc-app-menu-item__icon {
200
+ @apply tw-text-[color:var(--app-menu-item-icon-color-active)];
201
+ }
202
+
203
+ .vc-app-menu-item__title-icon {
204
+ @apply tw-text-[color:var(--app-menu-item-icon-color-active)];
205
+ }
206
+
207
+ .vc-app-menu-item__handler_enabled {
208
+ @apply tw-visible #{!important};
209
+ }
210
+ }
211
+
212
+ .vc-app-menu-item__child-item-link:hover .vc-app-menu-item__child-item {
213
+ @apply tw-bg-[color:var(--app-menu-item-background-color-hover)] tw-bg-opacity-50
214
+ tw-rounded-[var(--app-menu-item-hover-radius)];
215
+
216
+ .vc-app-menu-item__icon {
217
+ @apply tw-text-[color:var(--app-menu-item-icon-color-active)];
218
+ }
219
+ }
220
+
175
221
  .vc-app-menu-item {
176
222
  @apply tw-flex tw-items-center tw-w-full tw-h-[var(--app-menu-item-height)]
177
223
  tw-border-none
@@ -19,13 +19,13 @@
19
19
  @click="isMobileVisible = false"
20
20
  ></div>
21
21
  <div
22
- class="!tw-absolute vc-app-menu__inner tw-flex tw-flex-col tw-h-full [transition:width_300ms_cubic-bezier(0.2,0,0,1)_0s] tw-z-[9999] tw-top-0 tw-bottom-0 tw-bg-[color:var(--app-background)] tw-shadow-[inset_0px_2px_5px_0px_#3654751A]"
22
+ class="!tw-absolute vc-app-menu__inner tw-flex tw-flex-col tw-h-full [transition:width_300ms_cubic-bezier(0.2,0,0,1)_0s] tw-z-[1001] tw-top-0 tw-bottom-0 tw-bg-[color:var(--app-background)]"
23
23
  :class="{
24
24
  'tw-left-0 tw-pt-[22px]': $isDesktop.value,
25
- '!tw-w-[var(--app-menu-width-collapse)] !tw-shadow-[inset_4px_2px_5px_0px_#3654751A]':
26
- $isDesktop.value && !isExpanded && !isExpandedOver,
25
+ '!tw-w-[var(--app-menu-width-collapse)]': $isDesktop.value && !isExpanded && !isExpandedOver,
27
26
  'tw-w-[var(--app-menu-width)]': $isDesktop.value && (isExpanded || isExpandedOver),
28
27
  'tw-shadow-none': $isDesktop.value && isExpanded,
28
+ 'tw-shadow-[6px_0_5px_-2px_#3654751A]': $isDesktop.value && isExpandedOver,
29
29
  }"
30
30
  >
31
31
  <!-- Show menu close handler on mobile devices -->
@@ -46,7 +46,7 @@
46
46
  class="tw-pl-[19px] tw-pb-2"
47
47
  >
48
48
  <button
49
- class="tw-p-[10px] tw-h-[var(--app-menu-item-height)] tw-rounded tw-text-[color:var(--app-menu-burger-color)] hover:tw-bg-[color:var(--app-menu-burger-background-color)]"
49
+ class="tw-flex tw-items-center tw-p-[10px] tw-rounded tw-text-[color:var(--app-menu-burger-color)] hover:tw-bg-[color:var(--app-menu-burger-background-color)]"
50
50
  @click="toggleMenu"
51
51
  >
52
52
  <VcIcon
@@ -61,13 +61,7 @@
61
61
  :no-padding="true"
62
62
  class="tw-grow tw-basis-0"
63
63
  >
64
- <div
65
- class="tw-gap-[5px] tw-flex tw-flex-col tw-h-full"
66
- :class="{
67
- 'tw-px-[19px]': ($isDesktop.value && (isExpanded || isExpandedOver)) || $isMobile.value,
68
- 'tw-pl-[19px] tw-pr-[4px]': $isDesktop.value && !isExpanded && !isExpandedOver,
69
- }"
70
- >
64
+ <div class="tw-gap-[5px] tw-flex tw-flex-col tw-h-full">
71
65
  <slot
72
66
  v-if="!$isDesktop.value"
73
67
  name="mobile"
@@ -85,6 +85,7 @@
85
85
  ref="widgetsRef"
86
86
  class="vc-blade__widgets tw-flex"
87
87
  :class="{
88
+ 'tw-border-l tw-border-solid tw-border-l-[#eaedf3]': $isDesktop.value,
88
89
  'tw-w-[var(--blade-widgets-width)] tw-flex-col': $isDesktop.value && !isExpanded,
89
90
  'tw-w-[var(--blade-widgets-width-expanded)] tw-flex-col': $isDesktop.value && isExpanded,
90
91
  'tw-w-auto tw-border-t tw-border-solid tw-border-t-[#eaedf3] tw-flex-row': $isMobile.value,
@@ -56,7 +56,7 @@
56
56
  </template>
57
57
  <div
58
58
  v-else
59
- class="tw-flex tw-justify-center tw-p-5"
59
+ class="tw-flex tw-justify-center tw-p-5 tw-h-full tw-items-center"
60
60
  >
61
61
  <VcHint>{{ t("COMPONENTS.ORGANISMS.VC_GALLERY.GALLERY_IS_EMPTY") }}</VcHint>
62
62
  </div>
@@ -17,7 +17,10 @@
17
17
  v-if="anySelected"
18
18
  class="tw-pl-4 tw-flex tw-items-center tw-justify-center tw-border-b tw-border-solid tw-border-b-[#e3e7ec]"
19
19
  >
20
- <VcCheckbox :model-value="unref(isSelected ?? false)"></VcCheckbox>
20
+ <VcCheckbox
21
+ :model-value="unref(isSelected ?? false)"
22
+ size="m"
23
+ ></VcCheckbox>
21
24
  </div>
22
25
  <div class="tw-flex-1 tw-w-0">
23
26
  <div class="tw-flex tw-flex-col tw-h-full tw-border-b tw-border-solid tw-border-b-[#e3e7ec]">
@@ -1,10 +1,10 @@
1
1
  <template>
2
2
  <div
3
- v-loading="unref(loading) || columnsInit"
3
+ v-loading:1000="unref(loading) || columnsInit"
4
4
  class="tw-relative tw-overflow-hidden tw-flex tw-flex-col tw-grow tw-basis-0 tw-border-[color:#eef0f2] tw-border-solid tw-border-t-0"
5
5
  >
6
6
  <div
7
- v-if="$isMobile.value && (selection.length > 0 || allSelected)"
7
+ v-if="multiselect && $isMobile.value && (selection.length > 0 || allSelected)"
8
8
  class="tw-flex tw-flex-col"
9
9
  >
10
10
  <div
@@ -15,6 +15,7 @@
15
15
  <VcCheckbox
16
16
  v-model="headerCheckbox"
17
17
  class="tw-font-normal tw-self-center tw-flex"
18
+ size="m"
18
19
  @click.stop
19
20
  >{{ $t("COMPONENTS.ORGANISMS.VC_TABLE.SELECT_ALL_TRUNCATED") }}</VcCheckbox
20
21
  >
@@ -88,6 +89,7 @@
88
89
 
89
90
  <!-- Table search input -->
90
91
  <VcInput
92
+ ref="searchInput"
91
93
  class="tw-grow tw-basis-0"
92
94
  :placeholder="searchPlaceholder || $t('COMPONENTS.ORGANISMS.VC_TABLE.SEARCH')"
93
95
  clearable
@@ -95,10 +97,11 @@
95
97
  :model-value="searchValue"
96
98
  @update:model-value="$emit('search:change', $event)"
97
99
  >
98
- <template #prepend-inner>
100
+ <template #prepend-inner="{ focus }">
99
101
  <VcIcon
100
102
  icon="fas fa-search"
101
- class="tw-text-[color:#a5a5a5]"
103
+ class="tw-text-[color:#d2d4d7]"
104
+ @click="focus?.()"
102
105
  ></VcIcon>
103
106
  </template>
104
107
  </VcInput>
@@ -147,7 +150,7 @@
147
150
  :is-selected="isSelected(item)"
148
151
  @click="$emit('itemClick', item)"
149
152
  @swipe-start="handleSwipe"
150
- @select="rowCheckbox(item)"
153
+ @select="multiselect ? rowCheckbox(item) : undefined"
151
154
  >
152
155
  <slot
153
156
  name="mobile-item"
@@ -200,6 +203,20 @@
200
203
  @mouseleave="handleHeaderMouseOver(false)"
201
204
  >
202
205
  <div class="vc-table__header-row tw-flex tw-flex-row">
206
+ <div
207
+ v-if="editing && multiselect && items && items.length"
208
+ class="tw-flex-1 tw-flex tw-items-center tw-justify-center tw-w-[28px] tw-max-w-[28px] tw-min-w-[28px] tw-bg-[#f9f9f9] !tw-border-0 tw-shadow-[inset_0px_1px_0px_#eaedf3,_inset_0px_-1px_0px_#eaedf3] tw-box-border tw-sticky tw-top-0 tw-select-none tw-overflow-hidden tw-z-[1]"
209
+ >
210
+ <div class="tw-flex tw-justify-center tw-items-center">
211
+ <VcCheckbox
212
+ v-model="headerCheckbox"
213
+ @click.stop
214
+ ></VcCheckbox>
215
+ </div>
216
+ <div class="tw-top-0 tw-bottom-0 tw-absolute tw-right-0 tw-flex tw-justify-end">
217
+ <div class="tw-w-px tw-bg-[#e5e7eb] tw-h-full"></div>
218
+ </div>
219
+ </div>
203
220
  <div
204
221
  v-for="(item, index) in filteredCols"
205
222
  :id="item.id"
@@ -221,7 +238,7 @@
221
238
  @click="handleHeaderClick(item)"
222
239
  >
223
240
  <div
224
- v-if="multiselect && index === 0"
241
+ v-if="!editing && multiselect && index === 0 && items && items.length"
225
242
  class="tw-flex tw-pl-5 tw-items-center tw-justify-center tw-w-auto tw-bg-[#f9f9f9] tw-box-border tw-select-none tw-overflow-hidden tw-z-[1] tw-shrink-0"
226
243
  >
227
244
  <div class="tw-flex tw-justify-center tw-items-center">
@@ -343,6 +360,19 @@
343
360
  @drop="onRowDrop"
344
361
  @mouseover="showActions(itemIndex)"
345
362
  >
363
+ <div
364
+ v-if="editing && multiselect && typeof item === 'object'"
365
+ class="tw-w-[28px] tw-max-w-[28px] tw-min-w-[28px] tw-relative tw-flex-1 tw-flex tw-items-center tw-justify-center"
366
+ @click.stop
367
+ >
368
+ <div class="tw-flex tw-justify-center tw-items-center">
369
+ <VcCheckbox
370
+ :model-value="isSelected(item)"
371
+ @update:model-value="rowCheckbox(item)"
372
+ ></VcCheckbox>
373
+ </div>
374
+ <div class="tw-w-px tw-top-0 tw-bottom-0 tw-absolute tw-right-0 tw-bg-[#e5e7eb]"></div>
375
+ </div>
346
376
  <div
347
377
  v-for="cell in filteredCols"
348
378
  :id="`${(typeof item === 'object' && 'id' in item && item.id) || itemIndex}_${cell.id}`"
@@ -583,6 +613,7 @@ const slots = useSlots();
583
613
  // template refs
584
614
  const reorderRef = ref<HTMLElement | null>();
585
615
  const tableRef = ref<HTMLElement | null>();
616
+ const searchInput = ref<HTMLElement | null>();
586
617
 
587
618
  // event listeners
588
619
  let columnResizeListener: ((...args: any[]) => any) | null = null;
@@ -614,6 +645,7 @@ const draggedColumn = ref();
614
645
  const draggedElement = ref<HTMLElement>();
615
646
  const dropPosition = ref();
616
647
  const columnsInit = ref(true);
648
+ const isHovered = ref(false);
617
649
 
618
650
  // row reordering variables
619
651
  const draggedRow = ref<T>();
@@ -647,26 +679,33 @@ const renderCellSlot = ({ item, cell, index }: { item: T; cell: ITableColumns; i
647
679
  const checkboxComponent = h(
648
680
  "div",
649
681
  {
650
- onClick: (e) => e.stopPropagation(),
651
682
  class: "tw-absolute tw-z-10 tw-top-0 tw-bottom-0 tw-left-[20px] tw-right-0 tw-flex tw-items-center",
652
683
  },
653
684
  h(VcCheckbox, {
654
685
  class: "",
655
686
  size: "m",
656
687
  modelValue: selection.value.includes(item),
657
- "onUpdate:modelValue": (value: boolean) => {
688
+ onClick: (e: Event) => e.stopPropagation(),
689
+ onMouseover: () => (isHovered.value = true),
690
+ onMouseout: () => (isHovered.value = false),
691
+ "onUpdate:modelValue": () => {
658
692
  rowCheckbox(item);
659
693
  },
660
694
  }),
661
695
  );
662
696
 
663
- const checkboxVisibilityHandler = (isFirstCell && selectedRowIndex.value === index) || (isRowSelected && isFirstCell);
697
+ const checkboxVisibilityHandler =
698
+ !props.editing &&
699
+ props.multiselect &&
700
+ props.items &&
701
+ props.items.length &&
702
+ ((isFirstCell && selectedRowIndex.value === index) || (isRowSelected && isFirstCell));
664
703
 
665
704
  return h("div", { class: "" }, [
666
705
  checkboxVisibilityHandler ? checkboxComponent : undefined,
667
706
  h(
668
707
  "div",
669
- { class: checkboxVisibilityHandler ? "tw-opacity-15" : "" },
708
+ { class: checkboxVisibilityHandler ? (isHovered.value ? "tw-opacity-5" : "tw-opacity-15") : "" },
670
709
  !isSlotExist
671
710
  ? h(VcTableCell, {
672
711
  cell,