@vc-shell/framework 1.0.45 → 1.0.48
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/plugins/index.ts +2 -1
- package/core/plugins/moment/humanize.ts +77 -0
- package/core/plugins/moment/index.ts +1 -0
- package/core/plugins/moment/moment.ts +29 -0
- package/core/types/index.ts +11 -6
- package/dist/core/plugins/index.d.ts +2 -1
- package/dist/core/plugins/index.d.ts.map +1 -1
- package/dist/core/plugins/moment/humanize.d.ts +3 -0
- package/dist/core/plugins/moment/humanize.d.ts.map +1 -0
- package/dist/core/plugins/moment/index.d.ts +2 -0
- package/dist/core/plugins/moment/index.d.ts.map +1 -0
- package/dist/core/plugins/moment/moment.d.ts +13 -0
- package/dist/core/plugins/moment/moment.d.ts.map +1 -0
- package/dist/core/types/index.d.ts +13 -7
- package/dist/core/types/index.d.ts.map +1 -1
- package/dist/framework.js +96 -81
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/style.css +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/ui/components/index.d.ts +0 -1
- package/dist/ui/components/index.d.ts.map +1 -1
- package/dist/ui/components/molecules/vc-input/index.d.ts +1 -1
- package/dist/ui/components/molecules/vc-input/index.d.ts.map +1 -1
- package/dist/ui/components/molecules/vc-input/vc-input-model.d.ts +1 -5
- package/dist/ui/components/molecules/vc-input/vc-input-model.d.ts.map +1 -1
- package/dist/ui/components/molecules/vc-input-currency/vc-input-currency-model.d.ts +4 -10
- package/dist/ui/components/molecules/vc-input-currency/vc-input-currency-model.d.ts.map +1 -1
- package/dist/ui/components/molecules/vc-select/index.d.ts.map +1 -1
- package/dist/ui/components/molecules/vc-select/vc-select-model.d.ts +6 -13
- package/dist/ui/components/molecules/vc-select/vc-select-model.d.ts.map +1 -1
- package/dist/ui/types/index.d.ts +6 -6
- package/dist/ui/types/index.d.ts.map +1 -1
- package/dist/ui/types/ts-helpers.d.ts +4 -5
- package/dist/ui/types/ts-helpers.d.ts.map +1 -1
- package/dist/vite.config.d.ts.map +1 -1
- package/package.json +7 -7
- package/shared/assets/components/assets-details/assets-details.vue +9 -10
- package/ui/components/atoms/vc-col/vc-col.vue +10 -6
- package/ui/components/atoms/vc-icon/vc-icon.vue +1 -1
- package/ui/components/index.ts +0 -1
- package/ui/components/molecules/vc-breadcrumbs/vc-breadcrumbs.vue +12 -5
- package/ui/components/molecules/vc-input/index.ts +1 -1
- package/ui/components/molecules/vc-input/vc-input-model.ts +2 -5
- package/ui/components/molecules/vc-input/vc-input.vue +2 -2
- package/ui/components/molecules/vc-input-currency/vc-input-currency-model.ts +4 -10
- package/ui/components/molecules/vc-input-currency/vc-input-currency.vue +2 -5
- package/ui/components/molecules/vc-select/index.ts +1 -0
- package/ui/components/molecules/vc-select/vc-select-model.ts +16 -22
- package/ui/components/molecules/vc-select/vc-select.vue +3 -2
- package/ui/components/molecules/vc-slider/vc-slider.vue +10 -6
- package/ui/components/organisms/vc-app/_internal/vc-app-bar/vc-app-bar.vue +1 -1
- package/ui/components/organisms/vc-app/_internal/vc-app-menu/_internal/vc-app-menu-item/_internal/vc-app-menu-link.vue +3 -3
- package/ui/components/organisms/vc-app/_internal/vc-app-menu/_internal/vc-app-menu-item/vc-app-menu-item.vue +6 -8
- package/ui/components/organisms/vc-app/_internal/vc-app-menu/vc-app-menu.vue +2 -0
- package/ui/components/organisms/vc-app/vc-app.vue +5 -1
- package/ui/components/organisms/vc-blade/_internal/vc-blade-toolbar/_internal/vc-blade-toolbar-button/vc-blade-toolbar-button.vue +22 -36
- package/ui/components/organisms/vc-blade/_internal/vc-blade-toolbar/vc-blade-toolbar.vue +7 -5
- package/ui/components/organisms/vc-blade/vc-blade.vue +5 -2
- package/ui/components/organisms/vc-dynamic-property/vc-dynamic-property.vue +20 -15
- package/ui/components/organisms/vc-gallery/_internal/vc-gallery-preview/vc-gallery-preview.vue +12 -11
- package/ui/components/organisms/vc-table/vc-table.vue +92 -141
- package/ui/types/index.ts +5 -17
- package/ui/types/ts-helpers.ts +7 -21
- package/dist/framework.js.map +0 -1
- package/ui/components/molecules/vc-currency-input/vc-input.vue +0 -436
- package/ui/components/molecules/vc-multivalue/vc-multivalue.vue +0 -447
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
<div
|
|
3
3
|
class="vc-app-menu-item"
|
|
4
4
|
:class="[
|
|
5
|
-
{ 'vc-app-menu-item_active': isActive && !children.length },
|
|
6
|
-
{ 'vc-app-menu-item_no-hover': children.length },
|
|
5
|
+
{ 'vc-app-menu-item_active': isActive && !Object.keys(children).length },
|
|
6
|
+
{ 'vc-app-menu-item_no-hover': Object.keys(children).length },
|
|
7
7
|
]"
|
|
8
8
|
@click="$emit('onClick')"
|
|
9
9
|
>
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
class="vc-app-menu-item__title-icon"
|
|
23
23
|
icon="fas fa-chevron-down"
|
|
24
24
|
size="xs"
|
|
25
|
-
v-if="children.length"
|
|
25
|
+
v-if="Object.keys(children).length"
|
|
26
26
|
></VcIcon>
|
|
27
27
|
</div>
|
|
28
28
|
</div>
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
:isActive="isActive"
|
|
7
7
|
:children="children"
|
|
8
8
|
:sticky="sticky"
|
|
9
|
-
:icon="icon"
|
|
9
|
+
:icon="icon as string"
|
|
10
10
|
:title="title"
|
|
11
11
|
@onClick="onMenuItemClick(() => navigate($event))"
|
|
12
12
|
/>
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
<vc-app-menu-link
|
|
17
17
|
:children="children"
|
|
18
18
|
:sticky="sticky"
|
|
19
|
-
:icon="icon"
|
|
19
|
+
:icon="icon as string"
|
|
20
20
|
:title="title"
|
|
21
21
|
@onClick="onMenuItemClick"
|
|
22
22
|
:isActive="isHomePage"
|
|
@@ -54,7 +54,7 @@
|
|
|
54
54
|
|
|
55
55
|
<script lang="ts" setup>
|
|
56
56
|
import { onMounted, ref, computed } from "vue";
|
|
57
|
-
import {
|
|
57
|
+
import {ExtendedComponent, IBladeToolbar, IMenuItems} from "@/core/types";
|
|
58
58
|
import VcAppMenuLink from "./_internal/vc-app-menu-link.vue";
|
|
59
59
|
import { NavigationFailure, useRoute } from "vue-router";
|
|
60
60
|
|
|
@@ -64,9 +64,9 @@ export interface Props {
|
|
|
64
64
|
component?: ExtendedComponent;
|
|
65
65
|
bladeOptions?: Record<string, unknown>;
|
|
66
66
|
clickHandler?: () => void;
|
|
67
|
-
icon
|
|
68
|
-
title
|
|
69
|
-
children?:
|
|
67
|
+
icon?: string | (() => string);
|
|
68
|
+
title?: string;
|
|
69
|
+
children?: IBladeToolbar[];
|
|
70
70
|
isCollapsed?: boolean;
|
|
71
71
|
}
|
|
72
72
|
|
|
@@ -90,8 +90,6 @@ const props = withDefaults(defineProps<Props>(), {
|
|
|
90
90
|
component: undefined,
|
|
91
91
|
bladeOptions: () => ({}),
|
|
92
92
|
clickHandler: undefined,
|
|
93
|
-
icon: "",
|
|
94
|
-
title: "",
|
|
95
93
|
children: () => [],
|
|
96
94
|
isCollapsed: true,
|
|
97
95
|
});
|
|
@@ -17,7 +17,11 @@
|
|
|
17
17
|
:blades="bladesRefs"
|
|
18
18
|
:buttons="toolbarItems"
|
|
19
19
|
@toolbarbutton:click="onToolbarButtonClick"
|
|
20
|
-
@menubutton:click="
|
|
20
|
+
@menubutton:click="
|
|
21
|
+
(
|
|
22
|
+
$refs.menu as Record<'isMobileVisible', boolean>
|
|
23
|
+
).isMobileVisible = true
|
|
24
|
+
"
|
|
21
25
|
@backlink:click="$emit('backlink:click', bladesRefs.length - 2)"
|
|
22
26
|
@logo:click="openDashboard"
|
|
23
27
|
:title="title"
|
|
@@ -3,13 +3,13 @@
|
|
|
3
3
|
class="vc-blade-toolbar-button"
|
|
4
4
|
:class="{ 'vc-blade-toolbar-button_disabled': disabled || isWaiting }"
|
|
5
5
|
@click="onClick"
|
|
6
|
-
:title="title"
|
|
6
|
+
:title="title as string"
|
|
7
7
|
>
|
|
8
8
|
<div ref="dropButtonRef">
|
|
9
9
|
<div class="vc-blade-toolbar-button__wrap" ref="bladeDropToggle">
|
|
10
10
|
<VcIcon
|
|
11
11
|
class="vc-blade-toolbar-button__icon"
|
|
12
|
-
:icon="icon"
|
|
12
|
+
:icon="icon as string"
|
|
13
13
|
size="m"
|
|
14
14
|
></VcIcon>
|
|
15
15
|
<div v-if="isExpanded" class="vc-blade-toolbar-button__title">
|
|
@@ -41,7 +41,7 @@
|
|
|
41
41
|
</template>
|
|
42
42
|
|
|
43
43
|
<script lang="ts">
|
|
44
|
-
import { defineComponent, nextTick,
|
|
44
|
+
import { defineComponent, nextTick, ref } from "vue";
|
|
45
45
|
|
|
46
46
|
export default defineComponent({
|
|
47
47
|
inheritAttrs: false,
|
|
@@ -51,40 +51,26 @@ export default defineComponent({
|
|
|
51
51
|
<script lang="ts" setup>
|
|
52
52
|
import { VcIcon } from "@/ui/components";
|
|
53
53
|
import { createPopper, Instance } from "@popperjs/core";
|
|
54
|
-
import { IBladeDropdownItem } from "@/core/types";
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
icon:
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
title: {
|
|
73
|
-
type: String,
|
|
74
|
-
default: undefined,
|
|
75
|
-
},
|
|
76
|
-
|
|
77
|
-
dropdownItems: {
|
|
78
|
-
type: Array as PropType<IBladeDropdownItem[]>,
|
|
79
|
-
default: () => [],
|
|
80
|
-
},
|
|
81
|
-
|
|
82
|
-
clickHandler: {
|
|
83
|
-
type: Function,
|
|
84
|
-
default: undefined,
|
|
85
|
-
},
|
|
54
|
+
import { IBladeDropdownItem, IBladeToolbar } from "@/core/types";
|
|
55
|
+
|
|
56
|
+
export interface Props extends IBladeToolbar {
|
|
57
|
+
isExpanded: boolean;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
export interface Emits {
|
|
61
|
+
(event: "click"): void;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
const props = withDefaults(defineProps<Props>(), {
|
|
65
|
+
disabled: false,
|
|
66
|
+
isExpanded: true,
|
|
67
|
+
icon: "fas fa-question-circle",
|
|
68
|
+
title: undefined,
|
|
69
|
+
dropdownItems: () => [],
|
|
70
|
+
clickHandler: undefined,
|
|
86
71
|
});
|
|
87
|
-
|
|
72
|
+
|
|
73
|
+
const emit = defineEmits<Emits>();
|
|
88
74
|
|
|
89
75
|
const popper = ref<Instance>();
|
|
90
76
|
const isWaiting = ref(false);
|
|
@@ -24,14 +24,16 @@
|
|
|
24
24
|
</template>
|
|
25
25
|
|
|
26
26
|
<script lang="ts" setup>
|
|
27
|
+
import { IBladeToolbar } from "@/core/types";
|
|
27
28
|
import { ref } from "vue";
|
|
28
29
|
import VcBladeToolbarButton from "./_internal/vc-blade-toolbar-button/vc-blade-toolbar-button.vue";
|
|
29
30
|
|
|
30
|
-
|
|
31
|
-
items:
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
31
|
+
export interface Props {
|
|
32
|
+
items: IBladeToolbar[];
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
const props = withDefaults(defineProps<Props>(), {
|
|
36
|
+
items: () => [],
|
|
35
37
|
});
|
|
36
38
|
|
|
37
39
|
const isExpanded = ref(true);
|
|
@@ -1,8 +1,11 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div
|
|
3
|
-
class="vc-blade tw-relative tw-flex tw-shrink-0 tw-flex-col tw-bg-[color:var(--blade-background-color)] tw-rounded-[var(--blade-border-radius)] tw-shadow-[2px_2px_8px_rgba(126,142,157,0.14)] tw-my-4 tw-mx-2 tw-overflow-hidden
|
|
3
|
+
class="vc-blade tw-relative tw-flex tw-shrink-0 tw-flex-col tw-bg-[color:var(--blade-background-color)] tw-rounded-[var(--blade-border-radius)] tw-shadow-[2px_2px_8px_rgba(126,142,157,0.14)] tw-my-4 tw-mx-2 tw-overflow-hidden tw-transition-[width] tw-duration-200"
|
|
4
4
|
:style="{ width: typeof width === 'number' ? `${width}px` : width }"
|
|
5
|
-
:class="[
|
|
5
|
+
:class="[
|
|
6
|
+
$attrs.class,
|
|
7
|
+
{ '!tw-w-full !tw-shrink': $isMobile.value || expanded },
|
|
8
|
+
]"
|
|
6
9
|
>
|
|
7
10
|
<!-- Init blade header -->
|
|
8
11
|
<VcBladeHeader
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
v-if="
|
|
4
4
|
(property.dictionary || property.isDictionary) && !property.multivalue
|
|
5
5
|
"
|
|
6
|
-
v-slot="{
|
|
6
|
+
v-slot="{ errorMessage, handleChange, errors }"
|
|
7
7
|
:name="property.displayName || property.name"
|
|
8
8
|
:modelValue="getter(property, true)"
|
|
9
9
|
:rules="rules"
|
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
property.multivalue &&
|
|
39
39
|
!(property.dictionary || property.isDictionary)
|
|
40
40
|
"
|
|
41
|
-
v-slot="{
|
|
41
|
+
v-slot="{ errorMessage, handleChange }"
|
|
42
42
|
:name="property.name"
|
|
43
43
|
:modelValue="property.values"
|
|
44
44
|
:rules="rules"
|
|
@@ -96,7 +96,7 @@
|
|
|
96
96
|
|
|
97
97
|
<Field
|
|
98
98
|
v-else-if="property.valueType === 'ShortText'"
|
|
99
|
-
v-slot="{
|
|
99
|
+
v-slot="{ errorMessage, handleChange, errors }"
|
|
100
100
|
:name="property.displayName || property.name"
|
|
101
101
|
:modelValue="getter(property)"
|
|
102
102
|
:rules="rules"
|
|
@@ -122,14 +122,13 @@
|
|
|
122
122
|
|
|
123
123
|
<Field
|
|
124
124
|
v-else-if="property.valueType === 'Number' && property.multivalue"
|
|
125
|
-
v-slot="{
|
|
125
|
+
v-slot="{ errorMessage, handleChange, errors }"
|
|
126
126
|
:name="property.name"
|
|
127
127
|
:modelValue="property.values"
|
|
128
128
|
:rules="rules"
|
|
129
129
|
>
|
|
130
|
-
<
|
|
130
|
+
<VcSelect
|
|
131
131
|
v-bind="$attrs"
|
|
132
|
-
:error-message="errorMessage"
|
|
133
132
|
:label="handleDisplayName"
|
|
134
133
|
:modelValue="property.values"
|
|
135
134
|
@update:modelValue="
|
|
@@ -142,12 +141,18 @@
|
|
|
142
141
|
:required="property.required || property.isRequired"
|
|
143
142
|
placeholder="Add value"
|
|
144
143
|
:disabled="disabled"
|
|
145
|
-
|
|
144
|
+
:error="!!errors.length"
|
|
145
|
+
:error-message="errorMessage"
|
|
146
|
+
:options="items"
|
|
147
|
+
option-value="id"
|
|
148
|
+
:option-label="handleDisplayProperty"
|
|
149
|
+
multiple
|
|
150
|
+
></VcSelect>
|
|
146
151
|
</Field>
|
|
147
152
|
|
|
148
153
|
<Field
|
|
149
154
|
v-else-if="property.valueType === 'Number'"
|
|
150
|
-
v-slot="{
|
|
155
|
+
v-slot="{ errorMessage, handleChange, errors }"
|
|
151
156
|
:name="property.name"
|
|
152
157
|
:modelValue="getter(property)"
|
|
153
158
|
:rules="rules"
|
|
@@ -174,7 +179,7 @@
|
|
|
174
179
|
|
|
175
180
|
<Field
|
|
176
181
|
v-else-if="property.valueType === 'Integer'"
|
|
177
|
-
v-slot="{
|
|
182
|
+
v-slot="{ errorMessage, handleChange, errors }"
|
|
178
183
|
:name="property.name"
|
|
179
184
|
:modelValue="getter(property)"
|
|
180
185
|
:rules="rules"
|
|
@@ -202,7 +207,7 @@
|
|
|
202
207
|
|
|
203
208
|
<Field
|
|
204
209
|
v-else-if="property.valueType === 'DateTime'"
|
|
205
|
-
v-slot="{
|
|
210
|
+
v-slot="{ errorMessage, handleChange, errors }"
|
|
206
211
|
:name="property.name"
|
|
207
212
|
:modelValue="getter(property)"
|
|
208
213
|
:rules="rules"
|
|
@@ -228,7 +233,7 @@
|
|
|
228
233
|
|
|
229
234
|
<Field
|
|
230
235
|
v-else-if="property.valueType === 'LongText'"
|
|
231
|
-
v-slot="{
|
|
236
|
+
v-slot="{ errorMessage, handleChange }"
|
|
232
237
|
:name="property.name"
|
|
233
238
|
:modelValue="getter(property)"
|
|
234
239
|
:rules="rules"
|
|
@@ -252,7 +257,7 @@
|
|
|
252
257
|
|
|
253
258
|
<Field
|
|
254
259
|
v-else-if="property.valueType === 'Boolean'"
|
|
255
|
-
v-slot="{
|
|
260
|
+
v-slot="{ errorMessage, handleChange }"
|
|
256
261
|
:name="property.displayName || property.name"
|
|
257
262
|
:modelValue="getter(property)"
|
|
258
263
|
:rules="rules"
|
|
@@ -277,7 +282,7 @@
|
|
|
277
282
|
|
|
278
283
|
<Field
|
|
279
284
|
v-else-if="property.valueType === 'Html'"
|
|
280
|
-
v-slot="{
|
|
285
|
+
v-slot="{ errorMessage, handleChange }"
|
|
281
286
|
:name="property.displayName || property.name"
|
|
282
287
|
:modelValue="getter(property)"
|
|
283
288
|
:rules="rules"
|
|
@@ -307,12 +312,12 @@ import { ref, onMounted, computed } from "vue";
|
|
|
307
312
|
import { useI18n } from "@/core/composables";
|
|
308
313
|
import { Field } from "vee-validate";
|
|
309
314
|
|
|
310
|
-
|
|
315
|
+
type IValidationRules = {
|
|
311
316
|
required?: boolean;
|
|
312
317
|
min?: number;
|
|
313
318
|
max?: number;
|
|
314
319
|
regex?: RegExp;
|
|
315
|
-
}
|
|
320
|
+
};
|
|
316
321
|
|
|
317
322
|
interface IDisplayName {
|
|
318
323
|
languageCode: string;
|
package/ui/components/organisms/vc-gallery/_internal/vc-gallery-preview/vc-gallery-preview.vue
CHANGED
|
@@ -7,7 +7,9 @@
|
|
|
7
7
|
<span>)</span>
|
|
8
8
|
</div>
|
|
9
9
|
</template>
|
|
10
|
-
<div
|
|
10
|
+
<div
|
|
11
|
+
class="tw-w-full tw-h-full tw-box-border tw-flex tw-flex-col tw-items-center"
|
|
12
|
+
>
|
|
11
13
|
<div class="tw-box-border p-5 tw-grow tw-basis-0 tw-w-full">
|
|
12
14
|
<div
|
|
13
15
|
class="bg-contain tw-bg-no-repeat tw-bg-center tw-w-full tw-h-full tw-box-border"
|
|
@@ -55,21 +57,20 @@
|
|
|
55
57
|
<script lang="ts" setup>
|
|
56
58
|
import { computed, ref } from "vue";
|
|
57
59
|
import { VcPopup } from "@/ui/components";
|
|
60
|
+
import { IImage } from "@/core/types";
|
|
58
61
|
|
|
59
|
-
|
|
60
|
-
images
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
},
|
|
62
|
+
export interface Props {
|
|
63
|
+
images?: IImage[];
|
|
64
|
+
index: number;
|
|
65
|
+
}
|
|
64
66
|
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
},
|
|
67
|
+
const props = withDefaults(defineProps<Props>(), {
|
|
68
|
+
images: () => [],
|
|
69
|
+
index: 0,
|
|
69
70
|
});
|
|
70
71
|
|
|
71
72
|
const localIndex = ref(props.index);
|
|
72
|
-
const currentImage = computed(() => props.images[localIndex.value]
|
|
73
|
+
const currentImage = computed(() => props.images[localIndex.value]);
|
|
73
74
|
|
|
74
75
|
const copyLink = (link: string) => {
|
|
75
76
|
if (link.charAt(0) === "/") {
|