@vc-shell/framework 1.0.59 → 1.0.60
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/core/composables/index.ts +0 -1
- package/core/composables/useNotifications/index.ts +2 -2
- package/core/composables/usePermissions/index.ts +1 -1
- package/core/composables/useSettings/index.ts +2 -2
- package/core/composables/useUser/index.ts +2 -2
- package/dist/framework.mjs +1124 -327
- package/dist/index.css +1 -1
- package/dist/types/core/composables/index.d.ts +0 -1
- package/dist/types/core/composables/index.d.ts.map +1 -1
- package/dist/types/core/composables/useNotifications/index.d.ts +1 -1
- package/dist/types/core/composables/useNotifications/index.d.ts.map +1 -1
- package/dist/types/core/composables/useUser/index.d.ts +2 -2
- package/dist/types/core/composables/useUser/index.d.ts.map +1 -1
- package/dist/types/shared/modules/assets/components/assets-details/assets-details.vue.d.ts +1 -0
- package/dist/types/shared/modules/assets/components/assets-details/assets-details.vue.d.ts.map +1 -1
- package/dist/types/shared/modules/assets/components/assets-details/index.d.ts +2 -0
- package/dist/types/shared/modules/assets/components/assets-details/index.d.ts.map +1 -1
- package/dist/types/shared/modules/assets-manager/components/assets-manager/assets-manager.vue.d.ts +3 -3
- package/dist/types/shared/modules/assets-manager/components/assets-manager/assets-manager.vue.d.ts.map +1 -1
- package/dist/types/shared/modules/assets-manager/components/assets-manager/index.d.ts +6 -6
- package/dist/types/ui/components/molecules/vc-editor/vc-editor.vue.d.ts.map +1 -1
- package/dist/types/ui/components/molecules/vc-file-upload/index.d.ts +12 -12
- package/dist/types/ui/components/molecules/vc-select/index.d.ts +24 -0
- package/dist/types/ui/components/molecules/vc-select/index.d.ts.map +1 -1
- package/dist/types/ui/components/molecules/vc-select/vc-select.vue.d.ts +20 -0
- package/dist/types/ui/components/molecules/vc-select/vc-select.vue.d.ts.map +1 -1
- package/dist/types/ui/components/molecules/vc-textarea/index.d.ts +0 -4
- package/dist/types/ui/components/molecules/vc-textarea/index.d.ts.map +1 -1
- package/dist/types/ui/components/molecules/vc-textarea/vc-textarea.stories.d.ts +0 -4
- package/dist/types/ui/components/molecules/vc-textarea/vc-textarea.stories.d.ts.map +1 -1
- package/dist/types/ui/components/molecules/vc-textarea/vc-textarea.vue.d.ts +1 -1
- package/dist/types/ui/components/molecules/vc-textarea/vc-textarea.vue.d.ts.map +1 -1
- package/dist/types/ui/components/organisms/vc-dynamic-property/index.d.ts +12 -0
- package/dist/types/ui/components/organisms/vc-dynamic-property/index.d.ts.map +1 -1
- package/dist/types/ui/components/organisms/vc-dynamic-property/vc-dynamic-property.vue.d.ts +7 -0
- package/dist/types/ui/components/organisms/vc-dynamic-property/vc-dynamic-property.vue.d.ts.map +1 -1
- package/dist/types/ui/components/organisms/vc-gallery/index.d.ts +6 -6
- package/dist/types/ui/components/organisms/vc-table/vc-table.vue.d.ts.map +1 -1
- package/package.json +4 -4
- package/shared/modules/assets/components/assets-details/assets-details.vue +60 -22
- package/shared/modules/assets-manager/components/assets-manager/assets-manager.vue +38 -21
- package/tailwind.config.js +0 -2
- package/ui/components/atoms/vc-button/vc-button.vue +0 -1
- package/ui/components/molecules/vc-editor/vc-editor.vue +21 -0
- package/ui/components/molecules/vc-select/vc-select.vue +39 -8
- package/ui/components/molecules/vc-textarea/vc-textarea.vue +1 -1
- package/ui/components/organisms/vc-dynamic-property/index.ts +0 -1
- package/ui/components/organisms/vc-dynamic-property/vc-dynamic-property.vue +14 -3
- package/ui/components/organisms/vc-table/vc-table.vue +26 -52
- package/core/composables/useAutosave/index.ts +0 -55
- package/dist/types/core/composables/useAutosave/index.d.ts +0 -9
- package/dist/types/core/composables/useAutosave/index.d.ts.map +0 -1
|
@@ -105,7 +105,7 @@
|
|
|
105
105
|
<tr class="vc-table__header-row">
|
|
106
106
|
<th
|
|
107
107
|
v-if="multiselect"
|
|
108
|
-
class="tw-h-[42px] tw-w-[50px] tw-max-w-[
|
|
108
|
+
class="tw-h-[42px] tw-w-[50px] 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]"
|
|
109
109
|
>
|
|
110
110
|
<div class="tw-flex tw-justify-center tw-items-center">
|
|
111
111
|
<VcCheckbox
|
|
@@ -118,7 +118,7 @@
|
|
|
118
118
|
</div>
|
|
119
119
|
</th>
|
|
120
120
|
<th
|
|
121
|
-
class="tw-h-[42px] tw-w-[
|
|
121
|
+
class="tw-h-[42px] tw-w-[21px] tw-max-w-[21px] tw-min-w-[21px] tw-bg-[#f9f9f9] tw-m-w-[70px] !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-z-[1]"
|
|
122
122
|
v-if="itemActionBuilder"
|
|
123
123
|
>
|
|
124
124
|
<div class="tw-w-3 tw-top-0 tw-bottom-0 tw-absolute tw-right-0 tw-flex tw-justify-end">
|
|
@@ -211,7 +211,7 @@
|
|
|
211
211
|
:key="(typeof item === 'object' && 'id' in item && item.id) || itemIndex"
|
|
212
212
|
class="vc-table__body-row tw-h-[60px] tw-bg-white hover:tw-bg-[#dfeef9] tw-cursor-pointer"
|
|
213
213
|
:class="{
|
|
214
|
-
'tw-bg-[#
|
|
214
|
+
'!tw-bg-[#F9F9F9]': itemIndex % 2 === 1,
|
|
215
215
|
'!tw-bg-[#dfeef9] hover:tw-bg-[#dfeef9]':
|
|
216
216
|
typeof item === 'object' && 'id' in item && item.id ? selectedItemId === item.id : false,
|
|
217
217
|
}"
|
|
@@ -226,7 +226,7 @@
|
|
|
226
226
|
>
|
|
227
227
|
<td
|
|
228
228
|
v-if="multiselect && typeof item === 'object'"
|
|
229
|
-
class="tw-w-[50px] tw-max-w-[
|
|
229
|
+
class="tw-w-[50px] tw-max-w-[28px] tw-min-w-[28px] tw-relative"
|
|
230
230
|
@click.stop
|
|
231
231
|
>
|
|
232
232
|
<div class="tw-flex tw-justify-center tw-items-center">
|
|
@@ -235,15 +235,18 @@
|
|
|
235
235
|
:model-value="isSelected(item)"
|
|
236
236
|
></VcCheckbox>
|
|
237
237
|
</div>
|
|
238
|
+
<div class="tw-w-px tw-top-0 tw-bottom-0 tw-absolute tw-right-0 tw-bg-[#e5e7eb]"></div>
|
|
238
239
|
</td>
|
|
239
240
|
<td
|
|
240
|
-
class="tw-box-border tw-overflow-visible tw-
|
|
241
|
+
class="tw-box-border tw-overflow-visible tw-w-[21px] tw-max-w-[21px] tw-min-w-[21px] tw-relative"
|
|
241
242
|
v-if="itemActionBuilder && typeof item === 'object'"
|
|
242
243
|
@click.stop
|
|
243
244
|
>
|
|
244
|
-
<div
|
|
245
|
+
<div
|
|
246
|
+
class="vc-table__body-actions-container tw-relative tw-flex tw-justify-center tw-items-center tw-group"
|
|
247
|
+
>
|
|
245
248
|
<button
|
|
246
|
-
class="tw-text-[#41afe6] tw-cursor-pointer tw-border-none tw-bg-transparent disabled:tw-text-[gray] tw-w-
|
|
249
|
+
class="tw-text-[#41afe6] tw-cursor-pointer tw-border-none tw-bg-transparent disabled:tw-text-[gray] tw-w-full group-hover:tw-text-[#319ed4]"
|
|
247
250
|
@click.stop="showActions(item, item.id)"
|
|
248
251
|
:ref="(el: Element) => setActionToggleRefs(el, item.id)"
|
|
249
252
|
aria-describedby="tooltip"
|
|
@@ -290,6 +293,7 @@
|
|
|
290
293
|
></div>
|
|
291
294
|
</div>
|
|
292
295
|
</div>
|
|
296
|
+
<div class="tw-w-px tw-top-0 tw-bottom-0 tw-absolute tw-right-0 tw-bg-[#e5e7eb]"></div>
|
|
293
297
|
</td>
|
|
294
298
|
<td
|
|
295
299
|
v-for="cell in filteredCols"
|
|
@@ -583,8 +587,6 @@ const headerCheckbox = computed({
|
|
|
583
587
|
}
|
|
584
588
|
|
|
585
589
|
selection.value = _selected;
|
|
586
|
-
|
|
587
|
-
emit("selectionChanged", selection.value);
|
|
588
590
|
},
|
|
589
591
|
});
|
|
590
592
|
|
|
@@ -602,10 +604,20 @@ watch(
|
|
|
602
604
|
scrollContainer.value?.scrollTop();
|
|
603
605
|
|
|
604
606
|
calculateActions(newVal);
|
|
607
|
+
|
|
608
|
+
selection.value = selection.value.filter((selection) => newVal.includes(selection));
|
|
605
609
|
},
|
|
606
610
|
{ deep: true, immediate: true }
|
|
607
611
|
);
|
|
608
612
|
|
|
613
|
+
watch(
|
|
614
|
+
() => selection.value,
|
|
615
|
+
(newVal) => {
|
|
616
|
+
emit("selectionChanged", newVal);
|
|
617
|
+
},
|
|
618
|
+
{ deep: true }
|
|
619
|
+
);
|
|
620
|
+
|
|
609
621
|
watch(
|
|
610
622
|
() => props.columns,
|
|
611
623
|
(newVal) => {
|
|
@@ -628,8 +640,6 @@ function rowCheckbox(item: TableItemType) {
|
|
|
628
640
|
} else {
|
|
629
641
|
selection.value.push(clear);
|
|
630
642
|
}
|
|
631
|
-
|
|
632
|
-
emit("selectionChanged", selection.value);
|
|
633
643
|
}
|
|
634
644
|
|
|
635
645
|
function setTooltipRefs(el: Element, id: string) {
|
|
@@ -804,7 +814,7 @@ function onColumnHeaderDragStart(event: DragEvent, item: ITableColumns) {
|
|
|
804
814
|
}
|
|
805
815
|
|
|
806
816
|
draggedColumn.value = item;
|
|
807
|
-
draggedElement.value = event.target as HTMLElement
|
|
817
|
+
draggedElement.value = event.target as HTMLElement;
|
|
808
818
|
event.dataTransfer.setData("text", "reorder");
|
|
809
819
|
}
|
|
810
820
|
|
|
@@ -1052,42 +1062,6 @@ $variants: (
|
|
|
1052
1062
|
|
|
1053
1063
|
.vc-table {
|
|
1054
1064
|
&__body {
|
|
1055
|
-
&-tooltip {
|
|
1056
|
-
background: #ffffff;
|
|
1057
|
-
border-radius: 4px 0 0 4px;
|
|
1058
|
-
padding: 15px;
|
|
1059
|
-
z-index: 0;
|
|
1060
|
-
position: absolute;
|
|
1061
|
-
right: 0;
|
|
1062
|
-
filter: drop-shadow(1px 3px 14px rgba(111, 122, 131, 0.25));
|
|
1063
|
-
}
|
|
1064
|
-
|
|
1065
|
-
&-tooltip-arrow,
|
|
1066
|
-
&-tooltip-arrow:before {
|
|
1067
|
-
position: absolute;
|
|
1068
|
-
width: 8px;
|
|
1069
|
-
height: 8px;
|
|
1070
|
-
background: inherit;
|
|
1071
|
-
}
|
|
1072
|
-
|
|
1073
|
-
&-tooltip-arrow {
|
|
1074
|
-
visibility: hidden;
|
|
1075
|
-
}
|
|
1076
|
-
|
|
1077
|
-
&-tooltip-arrow:before {
|
|
1078
|
-
visibility: visible;
|
|
1079
|
-
content: "";
|
|
1080
|
-
transform: rotate(45deg);
|
|
1081
|
-
}
|
|
1082
|
-
|
|
1083
|
-
&-tooltip[data-popper-placement^="top"] > .vc-table__body-tooltip-arrow {
|
|
1084
|
-
bottom: -5px;
|
|
1085
|
-
}
|
|
1086
|
-
|
|
1087
|
-
&-tooltip[data-popper-placement^="bottom"] > .vc-table__body-tooltip-arrow {
|
|
1088
|
-
top: -5px;
|
|
1089
|
-
}
|
|
1090
|
-
|
|
1091
1065
|
&-actions-item {
|
|
1092
1066
|
@each $name, $variant in $variants {
|
|
1093
1067
|
&_#{$name} {
|
|
@@ -1106,20 +1080,20 @@ $variants: (
|
|
|
1106
1080
|
}
|
|
1107
1081
|
|
|
1108
1082
|
&-tooltip[data-popper-placement^="top"] > .vc-table__body-tooltip-arrow {
|
|
1109
|
-
@apply tw-bottom-[-
|
|
1083
|
+
@apply tw-bottom-[-4px];
|
|
1110
1084
|
}
|
|
1111
1085
|
|
|
1112
1086
|
&-tooltip[data-popper-placement^="bottom"] > .vc-table__body-tooltip-arrow {
|
|
1113
|
-
@apply tw-top-[-
|
|
1087
|
+
@apply tw-top-[-4px];
|
|
1114
1088
|
}
|
|
1115
1089
|
}
|
|
1116
1090
|
|
|
1117
1091
|
&__drag-row-bottom {
|
|
1118
|
-
|
|
1092
|
+
@apply tw-shadow-[inset_0_-2px_0_0_var(--row-drag-color)];
|
|
1119
1093
|
}
|
|
1120
1094
|
|
|
1121
1095
|
&__drag-row-top {
|
|
1122
|
-
|
|
1096
|
+
@apply tw-shadow-[inset_0_2px_0_0_var(--row-drag-color)];
|
|
1123
1097
|
}
|
|
1124
1098
|
}
|
|
1125
1099
|
</style>
|
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
import { computed, isRef, Ref, ref, unref, watch } from "vue";
|
|
2
|
-
|
|
3
|
-
interface IUseAutosave {
|
|
4
|
-
savedValue: Ref<Record<string, unknown>>;
|
|
5
|
-
loadAutosaved: () => void;
|
|
6
|
-
resetAutosaved: () => void;
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
export default (data, modified, defaultName: string): IUseAutosave => {
|
|
10
|
-
const rawValue = computed(() => (isRef(data) ? unref(data) : data));
|
|
11
|
-
const isModified = computed(() => (isRef(modified) ? unref(modified) : modified));
|
|
12
|
-
const savedValue = ref();
|
|
13
|
-
|
|
14
|
-
const isSaving = ref(false);
|
|
15
|
-
|
|
16
|
-
watch(isModified, () => {
|
|
17
|
-
if (isModified.value) {
|
|
18
|
-
isSaving.value = true;
|
|
19
|
-
} else {
|
|
20
|
-
isSaving.value = false;
|
|
21
|
-
resetAutosaved();
|
|
22
|
-
}
|
|
23
|
-
});
|
|
24
|
-
|
|
25
|
-
watch(
|
|
26
|
-
[rawValue, isSaving],
|
|
27
|
-
() => {
|
|
28
|
-
if (isSaving.value) {
|
|
29
|
-
saveToStorage();
|
|
30
|
-
}
|
|
31
|
-
},
|
|
32
|
-
{ deep: true }
|
|
33
|
-
);
|
|
34
|
-
|
|
35
|
-
function saveToStorage() {
|
|
36
|
-
localStorage.setItem(defaultName, JSON.stringify(rawValue.value));
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
function loadAutosaved() {
|
|
40
|
-
const savedData = JSON.parse(localStorage.getItem(defaultName));
|
|
41
|
-
if (savedData) {
|
|
42
|
-
savedValue.value = savedData;
|
|
43
|
-
}
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
function resetAutosaved() {
|
|
47
|
-
localStorage.removeItem(defaultName);
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
return {
|
|
51
|
-
savedValue: computed(() => savedValue.value),
|
|
52
|
-
loadAutosaved,
|
|
53
|
-
resetAutosaved,
|
|
54
|
-
};
|
|
55
|
-
};
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { Ref } from "vue";
|
|
2
|
-
interface IUseAutosave {
|
|
3
|
-
savedValue: Ref<Record<string, unknown>>;
|
|
4
|
-
loadAutosaved: () => void;
|
|
5
|
-
resetAutosaved: () => void;
|
|
6
|
-
}
|
|
7
|
-
declare const _default: (data: any, modified: any, defaultName: string) => IUseAutosave;
|
|
8
|
-
export default _default;
|
|
9
|
-
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../core/composables/useAutosave/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAmB,GAAG,EAAqB,MAAM,KAAK,CAAC;AAE9D,UAAU,YAAY;IACpB,UAAU,EAAE,GAAG,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC;IACzC,aAAa,EAAE,MAAM,IAAI,CAAC;IAC1B,cAAc,EAAE,MAAM,IAAI,CAAC;CAC5B;gEAE4C,MAAM,KAAG,YAAY;AAAlE,wBA8CE"}
|