@vc-shell/framework 1.0.234 → 1.0.235
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.
- package/CHANGELOG.md +15 -0
- package/core/composables/useMenuService/index.ts +14 -10
- package/core/types/index.ts +5 -0
- package/dist/core/composables/useMenuService/index.d.ts.map +1 -1
- package/dist/core/types/index.d.ts +5 -0
- package/dist/core/types/index.d.ts.map +1 -1
- package/dist/framework.js +4757 -4706
- package/dist/index.css +1 -1
- package/dist/shared/modules/assets-manager/components/assets-manager/assets-manager.vue.d.ts.map +1 -1
- package/dist/shared/modules/dynamic/components/fields/GalleryField.d.ts.map +1 -1
- package/dist/shared/modules/dynamic/types/index.d.ts +7 -0
- package/dist/shared/modules/dynamic/types/index.d.ts.map +1 -1
- package/dist/ui/components/atoms/vc-container/vc-container.vue.d.ts +2 -1
- package/dist/ui/components/atoms/vc-container/vc-container.vue.d.ts.map +1 -1
- package/dist/ui/components/atoms/vc-widget/vc-widget.vue.d.ts.map +1 -1
- package/dist/ui/components/molecules/vc-checkbox/index.d.ts +31 -0
- package/dist/ui/components/molecules/vc-checkbox/index.d.ts.map +1 -1
- package/dist/ui/components/molecules/vc-checkbox/vc-checkbox.stories.d.ts +310 -0
- package/dist/ui/components/molecules/vc-checkbox/vc-checkbox.stories.d.ts.map +1 -1
- package/dist/ui/components/molecules/vc-checkbox/vc-checkbox.vue.d.ts +5 -0
- package/dist/ui/components/molecules/vc-checkbox/vc-checkbox.vue.d.ts.map +1 -1
- package/dist/ui/components/molecules/vc-file-upload/vc-file-upload.stories.d.ts +24 -0
- package/dist/ui/components/molecules/vc-file-upload/vc-file-upload.stories.d.ts.map +1 -1
- package/dist/ui/components/molecules/vc-file-upload/vc-file-upload.vue.d.ts +4 -0
- package/dist/ui/components/molecules/vc-file-upload/vc-file-upload.vue.d.ts.map +1 -1
- 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
- package/dist/ui/components/organisms/vc-gallery/vc-gallery.stories.d.ts +12 -0
- package/dist/ui/components/organisms/vc-gallery/vc-gallery.stories.d.ts.map +1 -1
- package/dist/ui/components/organisms/vc-gallery/vc-gallery.vue.d.ts +4 -0
- package/dist/ui/components/organisms/vc-gallery/vc-gallery.vue.d.ts.map +1 -1
- package/dist/ui/components/organisms/vc-table/vc-table.vue.d.ts.map +1 -1
- package/package.json +4 -4
- package/shared/components/change-password/change-password.vue +3 -30
- package/shared/components/notification-template/notification-template.vue +1 -1
- package/shared/modules/assets-manager/components/assets-manager/assets-manager.vue +0 -10
- package/shared/modules/dynamic/components/fields/GalleryField.ts +11 -1
- package/shared/modules/dynamic/pages/dynamic-blade-form.vue +4 -4
- package/shared/modules/dynamic/types/index.ts +7 -0
- package/ui/components/atoms/vc-container/vc-container.vue +10 -29
- package/ui/components/atoms/vc-widget/vc-widget.vue +4 -1
- package/ui/components/molecules/vc-checkbox/vc-checkbox.vue +26 -9
- package/ui/components/molecules/vc-editor/vc-editor.vue +0 -18
- package/ui/components/molecules/vc-file-upload/vc-file-upload.vue +8 -2
- package/ui/components/molecules/vc-notification/vc-notification.vue +0 -22
- package/ui/components/organisms/vc-app/_internal/vc-app-menu/_internal/vc-app-menu-item/_internal/vc-app-menu-link.vue +34 -11
- package/ui/components/organisms/vc-app/_internal/vc-app-menu/vc-app-menu.vue +2 -2
- package/ui/components/organisms/vc-blade/vc-blade.vue +2 -2
- package/ui/components/organisms/vc-gallery/vc-gallery.vue +5 -0
- package/ui/components/organisms/vc-table/_internal/vc-table-column-switcher/vc-table-column-switcher.vue +1 -1
- package/ui/components/organisms/vc-table/_internal/vc-table-mobile-item/vc-table-mobile-item.vue +1 -1
- package/ui/components/organisms/vc-table/vc-table.vue +49 -31
|
@@ -129,11 +129,6 @@ function onMouseLeave() {
|
|
|
129
129
|
--notification-error: #ef796f;
|
|
130
130
|
--notification-success: #87b563;
|
|
131
131
|
--notification-info: #bdd1df;
|
|
132
|
-
|
|
133
|
-
--notification-scroll-color: #e1eff9;
|
|
134
|
-
--notification-scroll-color-hover: #cce4f5;
|
|
135
|
-
--notification-scroll-width: 8px;
|
|
136
|
-
--notification-scroll-shadow: 0 3px 2px rgba(0, 0, 0, 0.1) inset, 0 -3px 2px rgba(0, 0, 0, 0.1) inset;
|
|
137
132
|
}
|
|
138
133
|
|
|
139
134
|
.vc-notification {
|
|
@@ -142,22 +137,5 @@ function onMouseLeave() {
|
|
|
142
137
|
.vc-app_mobile {
|
|
143
138
|
@apply tw-max-w-[80%];
|
|
144
139
|
}
|
|
145
|
-
|
|
146
|
-
&__content {
|
|
147
|
-
&::-webkit-scrollbar {
|
|
148
|
-
@apply tw-w-[var(--notification-scroll-width)] tw-bg-transparent;
|
|
149
|
-
}
|
|
150
|
-
|
|
151
|
-
&::-webkit-scrollbar-track {
|
|
152
|
-
@apply tw-bg-transparent;
|
|
153
|
-
}
|
|
154
|
-
|
|
155
|
-
&::-webkit-scrollbar-thumb {
|
|
156
|
-
@apply tw-bg-[color:var(--notification-scroll-color)]
|
|
157
|
-
tw-rounded-[calc(var(--notification-scroll-width)/2)]
|
|
158
|
-
tw-overflow-x-hidden
|
|
159
|
-
hover:tw-bg-[color:var(--notification-scroll-color-hover)];
|
|
160
|
-
}
|
|
161
|
-
}
|
|
162
140
|
}
|
|
163
141
|
</style>
|
|
@@ -24,6 +24,7 @@
|
|
|
24
24
|
class="vc-app-menu-item__icon"
|
|
25
25
|
>
|
|
26
26
|
<VcIcon
|
|
27
|
+
class="tw-w-[var(--app-menu-item-icon-width)] tw-text-center"
|
|
27
28
|
:icon="icon"
|
|
28
29
|
size="m"
|
|
29
30
|
/>
|
|
@@ -43,8 +44,11 @@
|
|
|
43
44
|
</div>
|
|
44
45
|
<!-- Nested menu items -->
|
|
45
46
|
<div
|
|
46
|
-
v-show="isOpened
|
|
47
|
+
v-show="isOpened"
|
|
47
48
|
class="vc-app-menu-item__child"
|
|
49
|
+
:class="{
|
|
50
|
+
'!tw-ml-0': !expand,
|
|
51
|
+
}"
|
|
48
52
|
>
|
|
49
53
|
<template
|
|
50
54
|
v-for="(nested, i) in children"
|
|
@@ -60,12 +64,31 @@
|
|
|
60
64
|
:class="[
|
|
61
65
|
{
|
|
62
66
|
'vc-app-menu-item__child-item_active': isActive(nested.url ?? ''),
|
|
67
|
+
'tw-px-[10px] tw-flex tw-justify-center tw-items-center': !expand,
|
|
63
68
|
},
|
|
64
|
-
'vc-app-menu-item__child-item',
|
|
69
|
+
'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',
|
|
65
70
|
]"
|
|
66
71
|
@click="$emit('onClick', nested)"
|
|
67
72
|
>
|
|
68
|
-
|
|
73
|
+
<div
|
|
74
|
+
v-if="nested.icon"
|
|
75
|
+
class="vc-app-menu-item__icon"
|
|
76
|
+
:class="{
|
|
77
|
+
'tw-p-0': !expand,
|
|
78
|
+
}"
|
|
79
|
+
>
|
|
80
|
+
<VcIcon
|
|
81
|
+
class="tw-w-[var(--app-menu-item-icon-width)] tw-text-center"
|
|
82
|
+
:icon="nested.icon"
|
|
83
|
+
size="m"
|
|
84
|
+
/>
|
|
85
|
+
</div>
|
|
86
|
+
<p
|
|
87
|
+
v-if="expand"
|
|
88
|
+
class="tw-truncate"
|
|
89
|
+
>
|
|
90
|
+
{{ nested.title }}
|
|
91
|
+
</p>
|
|
69
92
|
</div>
|
|
70
93
|
</router-link>
|
|
71
94
|
</template>
|
|
@@ -100,11 +123,7 @@ const isOpened = ref(false);
|
|
|
100
123
|
const route = useRoute();
|
|
101
124
|
const params = Object.fromEntries(Object.entries(route.params).filter(([key]) => key !== "pathMatch"));
|
|
102
125
|
|
|
103
|
-
const isMenuItemActive = computed(
|
|
104
|
-
() =>
|
|
105
|
-
(isActive(props.url ?? "") && !props.children?.length) ||
|
|
106
|
-
(!props.expand && isOpened.value && props.children?.some((x) => isActive(x.url ?? ""))),
|
|
107
|
-
);
|
|
126
|
+
const isMenuItemActive = computed(() => isActive(props.url ?? "") && !props.children?.length);
|
|
108
127
|
|
|
109
128
|
watch(
|
|
110
129
|
() => route.path,
|
|
@@ -147,7 +166,7 @@ const isActive = (url: string) => {
|
|
|
147
166
|
<style lang="scss">
|
|
148
167
|
:root {
|
|
149
168
|
--app-menu-item-height: 36px;
|
|
150
|
-
--app-menu-item-icon-width:
|
|
169
|
+
--app-menu-item-icon-width: 22px;
|
|
151
170
|
--app-menu-item-icon-color: #82a6bd;
|
|
152
171
|
--app-menu-item-icon-color-active: #ffffff;
|
|
153
172
|
--app-menu-item-handler-width: 10px;
|
|
@@ -227,19 +246,23 @@ const isActive = (url: string) => {
|
|
|
227
246
|
}
|
|
228
247
|
|
|
229
248
|
&__child {
|
|
230
|
-
@apply tw-
|
|
249
|
+
@apply tw-gap-[4px] tw-mt-[4px] tw-flex tw-flex-col;
|
|
231
250
|
}
|
|
232
251
|
|
|
233
252
|
&__child-item {
|
|
234
253
|
@apply tw-cursor-pointer tw-w-fit tw-py-[4px] tw-px-[6px] tw-rounded-[4px]
|
|
235
254
|
hover:tw-bg-[color:var(--app-menu-item-background-color-hover)]
|
|
236
|
-
hover:tw-text-[color:var(--app-menu-item-title-color-active)];
|
|
255
|
+
hover:tw-text-[color:var(--app-menu-item-title-color-active)] tw-pl-[25px];
|
|
237
256
|
|
|
238
257
|
&_active {
|
|
239
258
|
@apply tw-bg-[color:var(--app-menu-item-background-color-active)]
|
|
240
259
|
tw-text-[color:var(--app-menu-item-title-color-active)] tw-font-bold
|
|
241
260
|
hover:tw-bg-[color:var(--app-menu-item-background-color-active)]
|
|
242
261
|
hover:tw-text-[color:var(--app-menu-item-title-color-active)];
|
|
262
|
+
|
|
263
|
+
.vc-app-menu-item__icon {
|
|
264
|
+
@apply tw-text-[color:var(--app-menu-item-icon-color-active)];
|
|
265
|
+
}
|
|
243
266
|
}
|
|
244
267
|
}
|
|
245
268
|
|
|
@@ -79,7 +79,7 @@
|
|
|
79
79
|
$hasAccess(item.permissions!) && (item.children?.some((child) => $hasAccess(child.permissions!)) ?? true)
|
|
80
80
|
"
|
|
81
81
|
:url="item.url"
|
|
82
|
-
:icon="item.icon"
|
|
82
|
+
:icon="item.groupIcon || item.icon"
|
|
83
83
|
:title="item.title as string"
|
|
84
84
|
:children="item.children"
|
|
85
85
|
:expand="$isDesktop.value ? isExpanded || isExpandedOver : true"
|
|
@@ -93,7 +93,7 @@
|
|
|
93
93
|
</div>
|
|
94
94
|
</VcContainer>
|
|
95
95
|
<div
|
|
96
|
-
class="tw-text-[color:var(--app-menu-version-color)] tw-text-xs tw-mt-auto tw-self-start tw-py-1 tw-pl-
|
|
96
|
+
class="tw-text-[color:var(--app-menu-version-color)] tw-text-xs tw-mt-auto tw-self-start tw-py-1 tw-pl-[22px]"
|
|
97
97
|
@click="$emit('version:click')"
|
|
98
98
|
>
|
|
99
99
|
{{ version }}
|
|
@@ -92,9 +92,9 @@
|
|
|
92
92
|
>
|
|
93
93
|
<div
|
|
94
94
|
ref="widgetsContainerRef"
|
|
95
|
-
class="vc-blade__widget-container tw-flex tw-overflow-auto"
|
|
95
|
+
class="vc-blade__widget-container tw-flex tw-overflow-y-auto"
|
|
96
96
|
:class="{
|
|
97
|
-
'tw-flex-col': $isDesktop.value,
|
|
97
|
+
'tw-flex-col tw-overflow-x-clip': $isDesktop.value,
|
|
98
98
|
'tw-flex-row': $isMobile.value,
|
|
99
99
|
}"
|
|
100
100
|
>
|
|
@@ -44,6 +44,7 @@
|
|
|
44
44
|
:rules="rules"
|
|
45
45
|
:name="name"
|
|
46
46
|
:loading="loading"
|
|
47
|
+
:custom-text="customText"
|
|
47
48
|
@upload="onUpload"
|
|
48
49
|
></VcFileUpload>
|
|
49
50
|
</div>
|
|
@@ -89,6 +90,10 @@ export interface Props {
|
|
|
89
90
|
rules?: keyof IValidationRules | IValidationRules;
|
|
90
91
|
name?: string;
|
|
91
92
|
loading?: boolean;
|
|
93
|
+
customText?: {
|
|
94
|
+
dragHere: string;
|
|
95
|
+
browse: string;
|
|
96
|
+
};
|
|
92
97
|
}
|
|
93
98
|
|
|
94
99
|
export interface Emits {
|
package/ui/components/organisms/vc-table/_internal/vc-table-mobile-item/vc-table-mobile-item.vue
CHANGED
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
>
|
|
20
20
|
<VcCheckbox :model-value="unref(isSelected ?? false)"></VcCheckbox>
|
|
21
21
|
</div>
|
|
22
|
-
<div class="tw-flex-1 tw-w-
|
|
22
|
+
<div class="tw-flex-1 tw-w-0">
|
|
23
23
|
<div class="tw-flex tw-flex-col tw-h-full tw-border-b tw-border-solid tw-border-b-[#e3e7ec]">
|
|
24
24
|
<slot></slot>
|
|
25
25
|
</div>
|
|
@@ -4,7 +4,7 @@
|
|
|
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"
|
|
7
|
+
v-if="$isMobile.value && (selection.length > 0 || allSelected)"
|
|
8
8
|
class="tw-flex tw-flex-col"
|
|
9
9
|
>
|
|
10
10
|
<div
|
|
@@ -18,12 +18,17 @@
|
|
|
18
18
|
@click.stop
|
|
19
19
|
>{{ $t("COMPONENTS.ORGANISMS.VC_TABLE.SELECT_ALL_TRUNCATED") }}</VcCheckbox
|
|
20
20
|
>
|
|
21
|
-
{{ $t("COMPONENTS.ORGANISMS.VC_TABLE.SELECTED") }}: {{ selection.length }}
|
|
21
|
+
{{ $t("COMPONENTS.ORGANISMS.VC_TABLE.SELECTED") }}: {{ allSelected ? totalCount : selection.length }}
|
|
22
22
|
</div>
|
|
23
23
|
|
|
24
24
|
<VcButton
|
|
25
25
|
text
|
|
26
|
-
@click="
|
|
26
|
+
@click="
|
|
27
|
+
() => {
|
|
28
|
+
selection = [];
|
|
29
|
+
allSelected = false;
|
|
30
|
+
}
|
|
31
|
+
"
|
|
27
32
|
>{{ $t("COMPONENTS.ORGANISMS.VC_TABLE.CANCEL") }}</VcButton
|
|
28
33
|
>
|
|
29
34
|
</div>
|
|
@@ -216,12 +221,13 @@
|
|
|
216
221
|
@click="handleHeaderClick(item)"
|
|
217
222
|
>
|
|
218
223
|
<div
|
|
219
|
-
v-if="multiselect && index === 0
|
|
220
|
-
class="tw-flex tw-pl-
|
|
224
|
+
v-if="multiselect && index === 0"
|
|
225
|
+
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]"
|
|
221
226
|
>
|
|
222
227
|
<div class="tw-flex tw-justify-center tw-items-center">
|
|
223
228
|
<VcCheckbox
|
|
224
229
|
v-model="headerCheckbox"
|
|
230
|
+
size="m"
|
|
225
231
|
@click.stop
|
|
226
232
|
></VcCheckbox>
|
|
227
233
|
</div>
|
|
@@ -341,7 +347,7 @@
|
|
|
341
347
|
v-for="cell in filteredCols"
|
|
342
348
|
:id="`${(typeof item === 'object' && 'id' in item && item.id) || itemIndex}_${cell.id}`"
|
|
343
349
|
:key="`${(typeof item === 'object' && 'id' in item && item.id) || itemIndex}_${cell.id}`"
|
|
344
|
-
class="tw-box-border tw-overflow-hidden tw-px-3 tw-flex-1 tw-flex tw-items-center"
|
|
350
|
+
class="tw-box-border tw-overflow-hidden tw-px-3 tw-flex-1 tw-flex tw-items-center tw-relative"
|
|
345
351
|
:class="[cell.class]"
|
|
346
352
|
:style="{ maxWidth: cell.width, width: cell.width }"
|
|
347
353
|
>
|
|
@@ -638,32 +644,44 @@ const renderCellSlot = ({ item, cell, index }: { item: T; cell: ITableColumns; i
|
|
|
638
644
|
|
|
639
645
|
const isRowSelected = selection.value.includes(item);
|
|
640
646
|
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
if (!isSlotExist) {
|
|
655
|
-
return h(VcTableCell, {
|
|
656
|
-
cell,
|
|
657
|
-
item: item as TableItem,
|
|
658
|
-
index,
|
|
659
|
-
editing: props.editing,
|
|
660
|
-
onUpdate: (event) => {
|
|
661
|
-
emit("onEditComplete", { event, index });
|
|
647
|
+
const checkboxComponent = h(
|
|
648
|
+
"div",
|
|
649
|
+
{
|
|
650
|
+
onClick: (e) => e.stopPropagation(),
|
|
651
|
+
class: "tw-absolute tw-z-10 tw-top-0 tw-bottom-0 tw-left-[20px] tw-right-0 tw-flex tw-items-center",
|
|
652
|
+
},
|
|
653
|
+
h(VcCheckbox, {
|
|
654
|
+
class: "",
|
|
655
|
+
size: "m",
|
|
656
|
+
modelValue: selection.value.includes(item),
|
|
657
|
+
"onUpdate:modelValue": (value: boolean) => {
|
|
658
|
+
rowCheckbox(item);
|
|
662
659
|
},
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
660
|
+
}),
|
|
661
|
+
);
|
|
662
|
+
|
|
663
|
+
const checkboxVisibilityHandler = (isFirstCell && selectedRowIndex.value === index) || (isRowSelected && isFirstCell);
|
|
664
|
+
|
|
665
|
+
return h("div", { class: "" }, [
|
|
666
|
+
checkboxVisibilityHandler ? checkboxComponent : undefined,
|
|
667
|
+
h(
|
|
668
|
+
"div",
|
|
669
|
+
{ class: checkboxVisibilityHandler ? "tw-opacity-15" : "" },
|
|
670
|
+
!isSlotExist
|
|
671
|
+
? h(VcTableCell, {
|
|
672
|
+
cell,
|
|
673
|
+
|
|
674
|
+
item: item as TableItem,
|
|
675
|
+
index,
|
|
676
|
+
editing: props.editing,
|
|
677
|
+
onUpdate: (event) => {
|
|
678
|
+
emit("onEditComplete", { event, index });
|
|
679
|
+
},
|
|
680
|
+
onBlur: (event) => emit("onCellBlur", event),
|
|
681
|
+
})
|
|
682
|
+
: slots[`item_${cell.id}`]?.({ item, cell, index }),
|
|
683
|
+
),
|
|
684
|
+
]);
|
|
667
685
|
};
|
|
668
686
|
|
|
669
687
|
const calculateElWidth = (id: string) => {
|