@vc-shell/framework 1.0.244 → 1.0.245

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 (36) hide show
  1. package/CHANGELOG.md +9 -0
  2. package/core/plugins/signalR/index.ts +8 -5
  3. package/dist/core/plugins/signalR/index.d.ts.map +1 -1
  4. package/dist/framework.js +17067 -16247
  5. package/dist/index.css +1 -1
  6. package/dist/shared/modules/dynamic/factories/types/index.d.ts +2 -0
  7. package/dist/shared/modules/dynamic/factories/types/index.d.ts.map +1 -1
  8. package/dist/shared/modules/dynamic/helpers/nodeBuilder.d.ts.map +1 -1
  9. package/dist/shared/modules/dynamic/pages/dynamic-blade-form.vue.d.ts +2 -0
  10. package/dist/shared/modules/dynamic/pages/dynamic-blade-form.vue.d.ts.map +1 -1
  11. package/dist/tsconfig.tsbuildinfo +1 -1
  12. package/dist/ui/components/molecules/vc-editor/vc-editor.stories.d.ts +397 -3
  13. package/dist/ui/components/molecules/vc-editor/vc-editor.stories.d.ts.map +1 -1
  14. package/dist/ui/components/organisms/vc-app/_internal/vc-app-menu/_internal/vc-app-menu-item/_internal/vc-app-menu-link.vue.d.ts +1 -0
  15. 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
  16. package/dist/ui/components/organisms/vc-app/_internal/vc-app-menu/_internal/vc-app-menu-item/vc-app-menu-item.vue.d.ts +1 -0
  17. package/dist/ui/components/organisms/vc-app/_internal/vc-app-menu/_internal/vc-app-menu-item/vc-app-menu-item.vue.d.ts.map +1 -1
  18. package/dist/ui/components/organisms/vc-app/_internal/vc-app-menu/vc-app-menu.vue.d.ts.map +1 -1
  19. package/dist/ui/components/organisms/vc-blade/_internal/vc-blade-toolbar/_internal/vc-blade-toolbar-button/vc-blade-toolbar-button.vue.d.ts +1 -0
  20. package/dist/ui/components/organisms/vc-blade/_internal/vc-blade-toolbar/_internal/vc-blade-toolbar-button/vc-blade-toolbar-button.vue.d.ts.map +1 -1
  21. package/dist/ui/components/organisms/vc-table/vc-table.vue.d.ts.map +1 -1
  22. package/package.json +5 -4
  23. package/shared/modules/dynamic/factories/types/index.ts +2 -0
  24. package/shared/modules/dynamic/helpers/nodeBuilder.ts +1 -0
  25. package/shared/modules/dynamic/pages/dynamic-blade-form.vue +7 -1
  26. package/ui/components/molecules/vc-editor/vc-editor.stories.ts +1 -0
  27. package/ui/components/molecules/vc-editor/vc-editor.vue +4 -0
  28. package/ui/components/molecules/vc-select/vc-select.vue +3 -0
  29. package/ui/components/organisms/vc-app/_internal/vc-app-menu/_internal/vc-app-menu-item/_internal/vc-app-menu-link.vue +18 -14
  30. package/ui/components/organisms/vc-app/_internal/vc-app-menu/_internal/vc-app-menu-item/vc-app-menu-item.vue +3 -0
  31. package/ui/components/organisms/vc-app/_internal/vc-app-menu/vc-app-menu.vue +22 -10
  32. package/ui/components/organisms/vc-blade/_internal/vc-blade-toolbar/_internal/vc-blade-toolbar-button/vc-blade-toolbar-button.vue +3 -0
  33. package/ui/components/organisms/vc-blade/_internal/vc-blade-toolbar/vc-blade-toolbar.vue +1 -0
  34. package/ui/components/organisms/vc-table/vc-table.vue +10 -4
  35. package/dist/ui/components/molecules/vc-editor/vc-editor.vue.d.ts +0 -42
  36. package/dist/ui/components/molecules/vc-editor/vc-editor.vue.d.ts.map +0 -1
@@ -1,10 +1,6 @@
1
1
  <template>
2
2
  <div
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
- }"
3
+ class="vc-app-menu-link tw-cursor-pointer tw-group tw-px-[19px]"
8
4
  @click="onMenuItemClick"
9
5
  >
10
6
  <div
@@ -14,6 +10,7 @@
14
10
  'vc-app-menu-item_active': isMenuItemActive,
15
11
  'vc-app-menu-item_no-hover': !children?.length,
16
12
  'vc-app-menu-item_child-opened': expand && isOpened,
13
+ 'vc-app-menu-item_collapsed': !expand,
17
14
  },
18
15
  ]"
19
16
  >
@@ -59,11 +56,8 @@
59
56
  custom
60
57
  >
61
58
  <div
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]"
59
+ class="vc-app-menu-item__child-item-link tw-cursor-pointer tw-z-[2] tw-px-[19px]"
60
+ :data-test-id="nested.routeId"
67
61
  @click="$emit('onClick', nested)"
68
62
  >
69
63
  <div
@@ -71,9 +65,10 @@
71
65
  :class="[
72
66
  {
73
67
  'vc-app-menu-item__child-item_active': isActive(nested.url ?? ''),
74
- 'tw-pl-[21px]': expand,
68
+ 'vc-app-menu-item__child-item_collapsed': !expand,
69
+ 'tw-pl-[21px] tw-w-full ': expand,
75
70
  },
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',
71
+ 'vc-app-menu-item__child-item tw-min-w-0 tw-flex tw-h-[var(--app-menu-item-height)] tw-items-center [transition:padding_150ms_cubic-bezier(0.2,0,0,1)_0s] ',
77
72
  ]"
78
73
  >
79
74
  <div
@@ -114,6 +109,7 @@ export interface Props {
114
109
  title?: string;
115
110
  url?: string;
116
111
  expand?: boolean;
112
+ isExpanding?: boolean;
117
113
  }
118
114
 
119
115
  export interface Emits {
@@ -188,7 +184,7 @@ const isActive = (url: string) => {
188
184
  --app-menu-item-active-icon: #2e3d4e;
189
185
  }
190
186
 
191
- .vc-app-menu-link:hover .vc-app-menu-item {
187
+ .vc-app-menu-link:hover .vc-app-menu-item:not(.vc-app-menu-item_active) {
192
188
  @apply tw-bg-[color:var(--app-menu-item-background-color-hover)] tw-bg-opacity-50
193
189
  tw-rounded-[var(--app-menu-item-hover-radius)];
194
190
 
@@ -209,7 +205,7 @@ const isActive = (url: string) => {
209
205
  }
210
206
  }
211
207
 
212
- .vc-app-menu-item__child-item-link:hover .vc-app-menu-item__child-item {
208
+ .vc-app-menu-item__child-item-link:hover .vc-app-menu-item__child-item:not(.vc-app-menu-item__child-item_active) {
213
209
  @apply tw-bg-[color:var(--app-menu-item-background-color-hover)] tw-bg-opacity-50
214
210
  tw-rounded-[var(--app-menu-item-hover-radius)];
215
211
 
@@ -223,6 +219,10 @@ const isActive = (url: string) => {
223
219
  tw-border-none
224
220
  tw-flex-nowrap tw-box-border tw-cursor-pointer tw-relative tw-uppercase tw-select-none tw-py-[4px] tw-px-[8px];
225
221
 
222
+ &_collapsed {
223
+ @apply tw-w-[40px];
224
+ }
225
+
226
226
  &_active {
227
227
  @apply tw-bg-[color:var(--app-menu-item-background-color-active)]
228
228
  tw-rounded-[var(--app-menu-item-hover-radius)]
@@ -301,6 +301,10 @@ const isActive = (url: string) => {
301
301
  @apply tw-text-[color:var(--app-menu-item-icon-color-active)];
302
302
  }
303
303
  }
304
+
305
+ &_collapsed {
306
+ @apply tw-w-[40px];
307
+ }
304
308
  }
305
309
 
306
310
  &:hover:not(.vc-app-menu-item_active) {
@@ -12,6 +12,7 @@
12
12
  :title="title ?? ''"
13
13
  :url="url"
14
14
  :expand="expand"
15
+ :is-expanding="isExpanding"
15
16
  @on-click="$emit('click')"
16
17
  />
17
18
  </router-link>
@@ -24,6 +25,7 @@
24
25
  :icon="icon ?? ''"
25
26
  :title="title ?? ''"
26
27
  :expand="expand"
28
+ :is-expanding="isExpanding"
27
29
  @on-click="$emit('click', $event)"
28
30
  />
29
31
  </template>
@@ -42,6 +44,7 @@ export interface Props {
42
44
  title?: string;
43
45
  children?: MenuItem[];
44
46
  expand?: boolean;
47
+ isExpanding?: boolean;
45
48
  }
46
49
 
47
50
  export interface Emits {
@@ -1,7 +1,7 @@
1
1
  <template>
2
2
  <div
3
3
  v-if="isMenuVisible"
4
- class="vc-app-menu tw-relative tw-w-[var(--app-menu-width)] [transition:width_300ms_cubic-bezier(0.2,0,0,1)_0s] tw-pt-[22px]"
4
+ class="vc-app-menu tw-relative tw-w-[var(--app-menu-width)] [transition:width_300ms_cubic-bezier(0.2,0,0,1)_0s] tw-pt-[22px] -tw-mr-[8px]"
5
5
  :class="{
6
6
  'vc-app-menu_mobile tw-hidden !tw-fixed !tw-left-0 !tw-top-0 !tw-w-full !tw-bottom-0 !tw-z-[9999]':
7
7
  $isMobile.value,
@@ -19,13 +19,11 @@
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-[1001] tw-top-0 tw-bottom-0 tw-bg-[color:var(--app-background)]"
22
+ class="!tw-absolute vc-app-menu__inner tw-flex tw-flex-col tw-h-full [transition:width_150ms_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
25
  '!tw-w-[var(--app-menu-width-collapse)]': $isDesktop.value && !isExpanded && !isExpandedOver,
26
26
  'tw-w-[var(--app-menu-width)]': $isDesktop.value && (isExpanded || isExpandedOver),
27
- 'tw-shadow-none': $isDesktop.value && isExpanded,
28
- 'tw-shadow-[6px_0_5px_-2px_#3654751A]': $isDesktop.value && isExpandedOver,
29
27
  }"
30
28
  >
31
29
  <!-- Show menu close handler on mobile devices -->
@@ -62,14 +60,20 @@
62
60
  class="tw-grow tw-basis-0"
63
61
  >
64
62
  <div class="tw-gap-[5px] tw-flex tw-flex-col tw-h-full">
65
- <slot
66
- v-if="!$isDesktop.value"
67
- name="mobile"
68
- ></slot>
63
+ <div
64
+ v-if="$slots['mobile']"
65
+ class="tw-px-[19px]"
66
+ >
67
+ <slot
68
+ v-if="!$isDesktop.value"
69
+ name="mobile"
70
+ ></slot>
71
+ </div>
69
72
 
70
73
  <VcAppMenuItem
71
74
  v-for="item in menuItems"
72
75
  :key="item?.id"
76
+ :data-test-id="item?.routeId"
73
77
  :is-visible="
74
78
  $hasAccess(item.permissions!) && (item.children?.some((child) => $hasAccess(child.permissions!)) ?? true)
75
79
  "
@@ -78,6 +82,7 @@
78
82
  :title="item.title as string"
79
83
  :children="item.children"
80
84
  :expand="$isDesktop.value ? isExpanded || isExpandedOver : true"
85
+ :is-expanding="isExpandingOver"
81
86
  @click="
82
87
  (event) => {
83
88
  $emit('item:click', event ? event : item);
@@ -124,6 +129,7 @@ defineEmits<Emits>();
124
129
  const { menuItems } = useMenuService();
125
130
  const isExpanded = useLocalStorage("VC_APP_MENU_EXPANDED", true);
126
131
  const isExpandedOver = ref(false);
132
+ const isExpandingOver = ref(false);
127
133
 
128
134
  const isMobileVisible = ref(false);
129
135
 
@@ -147,10 +153,16 @@ function expandOverHandler(state: boolean) {
147
153
  if (isExpandedOver.value !== state) {
148
154
  isExpandedOver.value = state;
149
155
  }
150
- }, 200);
156
+ }, 50);
151
157
  } else {
152
158
  isExpandedOver.value = state;
153
159
  }
160
+
161
+ // Set isExpandingOver to true during expansion animation
162
+ isExpandingOver.value = true;
163
+ setTimeout(() => {
164
+ isExpandingOver.value = false;
165
+ }, 100);
154
166
  }
155
167
 
156
168
  defineExpose({
@@ -161,7 +173,7 @@ defineExpose({
161
173
  <style lang="scss">
162
174
  :root {
163
175
  --app-menu-width: 230px;
164
- --app-menu-width-collapse: 63px;
176
+ --app-menu-width-collapse: 70px;
165
177
  --app-menu-background-color: #ffffff;
166
178
  --app-menu-version-color: #838d9a;
167
179
 
@@ -6,11 +6,13 @@
6
6
  'tw-border-l tw-border-solid tw-border-[color:#eef0f2]': separator === 'left',
7
7
  }"
8
8
  :title="title"
9
+ :data-test-id="id ?? 'vc-blade-toolbar-button'"
9
10
  @click="onClick"
10
11
  >
11
12
  <div ref="dropButtonRef">
12
13
  <div
13
14
  ref="bladeDropToggle"
15
+ type="button"
14
16
  class="vc-blade-toolbar-button__wrap"
15
17
  >
16
18
  <VcIcon
@@ -64,6 +66,7 @@ export interface Props {
64
66
  dropdownItems?: IBladeDropdownItem[];
65
67
  clickHandler?(): void;
66
68
  separator?: "left" | "right" | "both";
69
+ id?: string;
67
70
  }
68
71
 
69
72
  export interface Emits {
@@ -11,6 +11,7 @@
11
11
  >
12
12
  <VcBladeToolbarButton
13
13
  v-if="$hasAccess(item.permissions) && (item.isVisible === undefined || item.isVisible)"
14
+ :id="item.id"
14
15
  :is-expanded="isExpanded"
15
16
  :icon="item.icon"
16
17
  :title="unref(item.title)"
@@ -645,7 +645,7 @@ const draggedColumn = ref();
645
645
  const draggedElement = ref<HTMLElement>();
646
646
  const dropPosition = ref();
647
647
  const columnsInit = ref(true);
648
- const isHovered = ref(false);
648
+ const isHovered = ref(undefined) as Ref<{ item: T; state: boolean } | undefined>;
649
649
 
650
650
  // row reordering variables
651
651
  const draggedRow = ref<T>();
@@ -686,8 +686,8 @@ const renderCellSlot = ({ item, cell, index }: { item: T; cell: ITableColumns; i
686
686
  size: "m",
687
687
  modelValue: selection.value.includes(item),
688
688
  onClick: (e: Event) => e.stopPropagation(),
689
- onMouseover: () => (isHovered.value = true),
690
- onMouseout: () => (isHovered.value = false),
689
+ onMouseover: () => (isHovered.value = { state: true, item: item }),
690
+ onMouseout: () => (isHovered.value = { state: false, item: item }),
691
691
  "onUpdate:modelValue": () => {
692
692
  rowCheckbox(item);
693
693
  },
@@ -705,7 +705,13 @@ const renderCellSlot = ({ item, cell, index }: { item: T; cell: ITableColumns; i
705
705
  checkboxVisibilityHandler ? checkboxComponent : undefined,
706
706
  h(
707
707
  "div",
708
- { class: checkboxVisibilityHandler ? (isHovered.value ? "tw-opacity-5" : "tw-opacity-15") : "" },
708
+ {
709
+ class: checkboxVisibilityHandler
710
+ ? isHovered.value?.item === item && isHovered.value.state
711
+ ? "tw-opacity-5"
712
+ : "tw-opacity-15"
713
+ : "",
714
+ },
709
715
  !isSlotExist
710
716
  ? h(VcTableCell, {
711
717
  cell,
@@ -1,42 +0,0 @@
1
- import "@vueup/vue-quill/dist/vue-quill.snow.css";
2
- export interface Props {
3
- placeholder?: string;
4
- modelValue?: string;
5
- required?: boolean;
6
- disabled?: boolean;
7
- label?: string;
8
- tooltip?: string;
9
- errorMessage?: string;
10
- assetsFolder: string;
11
- multilanguage?: boolean;
12
- currentLanguage?: string;
13
- maxlength?: number;
14
- }
15
- export interface Emits {
16
- (event: "update:modelValue", value: string | number | Date | null | undefined): void;
17
- }
18
- declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__VLS_TypePropsToRuntimeProps<Props>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
19
- "update:modelValue": (value: string | number | Date | null | undefined) => void;
20
- }, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToRuntimeProps<Props>>> & {
21
- "onUpdate:modelValue"?: ((value: string | number | Date | null | undefined) => any) | undefined;
22
- }, {}, {}>, Readonly<{
23
- error?: ((props: any) => any) | undefined;
24
- }> & {
25
- error?: ((props: any) => any) | undefined;
26
- }>;
27
- export default _default;
28
- type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
29
- type __VLS_TypePropsToRuntimeProps<T> = {
30
- [K in keyof T]-?: {} extends Pick<T, K> ? {
31
- type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
32
- } : {
33
- type: import('vue').PropType<T[K]>;
34
- required: true;
35
- };
36
- };
37
- type __VLS_WithTemplateSlots<T, S> = T & {
38
- new (): {
39
- $slots: S;
40
- };
41
- };
42
- //# sourceMappingURL=vc-editor.vue.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"vc-editor.vue.d.ts","sourceRoot":"","sources":["../../../../../ui/components/molecules/vc-editor/vc-editor.vue.ts"],"names":[],"mappings":"AAGA,OAAO,0CAA0C,CAAC;AAKlD,MAAM,WAAW,KAAK;IACpB,WAAW,CAAC,EA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