@vc-shell/framework 1.0.266 → 1.0.268
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 +18 -0
- package/core/composables/useSettings/index.ts +4 -2
- package/dist/core/composables/useSettings/index.d.ts +2 -0
- package/dist/core/composables/useSettings/index.d.ts.map +1 -1
- package/dist/framework.js +19 -8
- package/dist/index.css +1 -1
- package/dist/locales/en.json +5 -1
- package/dist/ui/components/molecules/vc-pagination/index.d.ts +0 -2
- package/dist/ui/components/molecules/vc-pagination/index.d.ts.map +1 -1
- package/dist/ui/components/molecules/vc-pagination/vc-pagination.stories.d.ts +0 -4
- package/dist/ui/components/molecules/vc-pagination/vc-pagination.stories.d.ts.map +1 -1
- package/dist/ui/components/molecules/vc-pagination/vc-pagination.vue.d.ts +0 -3
- package/dist/ui/components/molecules/vc-pagination/vc-pagination.vue.d.ts.map +1 -1
- package/dist/ui/components/organisms/vc-app/vc-app.stories.d.ts +12 -0
- package/dist/ui/components/organisms/vc-app/vc-app.stories.d.ts.map +1 -1
- package/dist/ui/components/organisms/vc-app/vc-app.vue.d.ts +1 -0
- package/dist/ui/components/organisms/vc-app/vc-app.vue.d.ts.map +1 -1
- package/package.json +4 -4
- package/ui/components/molecules/vc-pagination/vc-pagination.vue +9 -5
- package/ui/components/organisms/vc-app/vc-app.vue +5 -1
package/dist/locales/en.json
CHANGED
|
@@ -2,7 +2,11 @@
|
|
|
2
2
|
"SHELL": {
|
|
3
3
|
"USER": {
|
|
4
4
|
"ROLE": {
|
|
5
|
-
"ADMINISTRATOR": "Administrator"
|
|
5
|
+
"ADMINISTRATOR": "Administrator",
|
|
6
|
+
"vcmp-admin-role": "Admin",
|
|
7
|
+
"vcmp-agent-role": "Agent",
|
|
8
|
+
"vcmp-operator-role": "Operator",
|
|
9
|
+
"vcmp-owner-role": "Owner"
|
|
6
10
|
}
|
|
7
11
|
},
|
|
8
12
|
"ACCOUNT": {
|
|
@@ -16,7 +16,6 @@ export declare const VcPagination: import("vue").DefineComponent<{
|
|
|
16
16
|
};
|
|
17
17
|
}, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
18
18
|
itemClick: (pages: number) => void;
|
|
19
|
-
pageSizeChange: (pageSize: number) => void;
|
|
20
19
|
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
21
20
|
variant: {
|
|
22
21
|
type: import("vue").PropType<"default" | "minimal">;
|
|
@@ -35,7 +34,6 @@ export declare const VcPagination: import("vue").DefineComponent<{
|
|
|
35
34
|
};
|
|
36
35
|
}>> & {
|
|
37
36
|
onItemClick?: ((pages: number) => any) | undefined;
|
|
38
|
-
onPageSizeChange?: ((pageSize: number) => any) | undefined;
|
|
39
37
|
}, {
|
|
40
38
|
variant: "default" | "minimal";
|
|
41
39
|
pages: number;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../ui/components/molecules/vc-pagination/index.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,YAAY
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../ui/components/molecules/vc-pagination/index.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAAoC,CAAC"}
|
|
@@ -20,7 +20,6 @@ declare const _default: {
|
|
|
20
20
|
};
|
|
21
21
|
}, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
22
22
|
itemClick: (pages: number) => void;
|
|
23
|
-
pageSizeChange: (pageSize: number) => void;
|
|
24
23
|
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
25
24
|
variant: {
|
|
26
25
|
type: import("vue").PropType<"default" | "minimal">;
|
|
@@ -39,7 +38,6 @@ declare const _default: {
|
|
|
39
38
|
};
|
|
40
39
|
}>> & {
|
|
41
40
|
onItemClick?: ((pages: number) => any) | undefined;
|
|
42
|
-
onPageSizeChange?: ((pageSize: number) => any) | undefined;
|
|
43
41
|
}, {
|
|
44
42
|
variant: "default" | "minimal";
|
|
45
43
|
pages: number;
|
|
@@ -70,7 +68,6 @@ export declare const Expanded: StoryFn<import("vue").DefineComponent<{
|
|
|
70
68
|
};
|
|
71
69
|
}, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
72
70
|
itemClick: (pages: number) => void;
|
|
73
|
-
pageSizeChange: (pageSize: number) => void;
|
|
74
71
|
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
75
72
|
variant: {
|
|
76
73
|
type: import("vue").PropType<"default" | "minimal">;
|
|
@@ -89,7 +86,6 @@ export declare const Expanded: StoryFn<import("vue").DefineComponent<{
|
|
|
89
86
|
};
|
|
90
87
|
}>> & {
|
|
91
88
|
onItemClick?: ((pages: number) => any) | undefined;
|
|
92
|
-
onPageSizeChange?: ((pageSize: number) => any) | undefined;
|
|
93
89
|
}, {
|
|
94
90
|
variant: "default" | "minimal";
|
|
95
91
|
pages: number;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"vc-pagination.stories.d.ts","sourceRoot":"","sources":["../../../../../ui/components/molecules/vc-pagination/vc-pagination.stories.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAQ,OAAO,EAAE,MAAM,iBAAiB,CAAC;AACrD,OAAO,EAAE,YAAY,EAAE,MAAM,IAAI,CAAC
|
|
1
|
+
{"version":3,"file":"vc-pagination.stories.d.ts","sourceRoot":"","sources":["../../../../../ui/components/molecules/vc-pagination/vc-pagination.stories.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAQ,OAAO,EAAE,MAAM,iBAAiB,CAAC;AACrD,OAAO,EAAE,YAAY,EAAE,MAAM,IAAI,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAElC,wBAOsC;AAEtC,eAAO,MAAM,QAAQ,EAAE,OAAO,CAAC,OAAO,YAAY,CAMhD,CAAC;AAEH,eAAO,MAAM,QAAQ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAAoB,CAAC"}
|
|
@@ -6,7 +6,6 @@ export interface Props {
|
|
|
6
6
|
}
|
|
7
7
|
export interface Emits {
|
|
8
8
|
(event: "itemClick", pages: number): void;
|
|
9
|
-
(event: "pageSizeChange", pageSize: number): void;
|
|
10
9
|
}
|
|
11
10
|
declare const _default: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<Props>, {
|
|
12
11
|
pages: number;
|
|
@@ -14,14 +13,12 @@ declare const _default: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_T
|
|
|
14
13
|
variant: string;
|
|
15
14
|
}>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
16
15
|
itemClick: (pages: number) => void;
|
|
17
|
-
pageSizeChange: (pageSize: number) => void;
|
|
18
16
|
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<Props>, {
|
|
19
17
|
pages: number;
|
|
20
18
|
currentPage: number;
|
|
21
19
|
variant: string;
|
|
22
20
|
}>>> & {
|
|
23
21
|
onItemClick?: ((pages: number) => any) | undefined;
|
|
24
|
-
onPageSizeChange?: ((pageSize: number) => any) | undefined;
|
|
25
22
|
}, {
|
|
26
23
|
variant: "default" | "minimal";
|
|
27
24
|
pages: number;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"vc-pagination.vue.d.ts","sourceRoot":"","sources":["../../../../../ui/components/molecules/vc-pagination/vc-pagination.vue.ts"],"names":[],"mappings":"AAKA,MAAM,WAAW,KAAK;IACpB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,KAAK,CAAC,EAAE,MAAM,C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AAC,SAAS,MAAM,CAAC,GAAG,cAAc,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG;QACxE,OAAO,EAAE,CAAC,CAAC,CAAC,CAAC,CAAA;KACb,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;CACT,CAAC;AACN,KAAK,cAAc,CAAC,CAAC,IAAI;KAAG,CAAC,IAAI,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;CAAG,GAAG,EAAE,CAAC"}
|
|
@@ -23,6 +23,9 @@ declare const _default: {
|
|
|
23
23
|
disableMenu: {
|
|
24
24
|
type: import("vue").PropType<boolean>;
|
|
25
25
|
};
|
|
26
|
+
role: {
|
|
27
|
+
type: import("vue").PropType<string>;
|
|
28
|
+
};
|
|
26
29
|
}>>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps & Readonly<import("vue").ExtractPropTypes<{
|
|
27
30
|
isReady: {
|
|
28
31
|
type: import("vue").PropType<boolean>;
|
|
@@ -43,6 +46,9 @@ declare const _default: {
|
|
|
43
46
|
disableMenu: {
|
|
44
47
|
type: import("vue").PropType<boolean>;
|
|
45
48
|
};
|
|
49
|
+
role: {
|
|
50
|
+
type: import("vue").PropType<string>;
|
|
51
|
+
};
|
|
46
52
|
}>>, {}, true, {}, {}, {
|
|
47
53
|
P: {};
|
|
48
54
|
B: {};
|
|
@@ -70,6 +76,9 @@ declare const _default: {
|
|
|
70
76
|
disableMenu: {
|
|
71
77
|
type: import("vue").PropType<boolean>;
|
|
72
78
|
};
|
|
79
|
+
role: {
|
|
80
|
+
type: import("vue").PropType<string>;
|
|
81
|
+
};
|
|
73
82
|
}>>, {}, {}, {}, {}, {}>;
|
|
74
83
|
__isFragment?: undefined;
|
|
75
84
|
__isTeleport?: undefined;
|
|
@@ -94,6 +103,9 @@ declare const _default: {
|
|
|
94
103
|
disableMenu: {
|
|
95
104
|
type: import("vue").PropType<boolean>;
|
|
96
105
|
};
|
|
106
|
+
role: {
|
|
107
|
+
type: import("vue").PropType<string>;
|
|
108
|
+
};
|
|
97
109
|
}>>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, {}, {}, string, {}> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps & (new () => {
|
|
98
110
|
$slots: Readonly<{
|
|
99
111
|
"app-switcher": void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"vc-app.stories.d.ts","sourceRoot":"","sources":["../../../../../ui/components/organisms/vc-app/vc-app.stories.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAQ,OAAO,EAAE,MAAM,iBAAiB,CAAC;AACrD,OAAO,EAAE,KAAK,EAAE,MAAM,IAAI,CAAC
|
|
1
|
+
{"version":3,"file":"vc-app.stories.d.ts","sourceRoot":"","sources":["../../../../../ui/components/organisms/vc-app/vc-app.stories.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAQ,OAAO,EAAE,MAAM,iBAAiB,CAAC;AACrD,OAAO,EAAE,KAAK,EAAE,MAAM,IAAI,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAK3B,wBAmB+B;AAE/B,eAAO,MAAM,OAAO,EAAE,OAAO,CAAC,OAAO,KAAK,CAgBxC,CAAC;AAEH,eAAO,MAAM,qBAAqB,EAAE,OAAO,CAAC,OAAO,KAAK,CAYtD,CAAC;AAUH,eAAO,MAAM,iBAAiB,EAAE,OAAO,CAAC,OAAO,KAAK,CAsBlD,CAAC;AAUH,eAAO,MAAM,wBAAwB,EAAE,OAAO,CAAC,OAAO,KAAK,CAYzD,CAAC;AAUH,eAAO,MAAM,iCAAiC,EAAE,OAAO,CAAC,OAAO,KAAK,CAqBlE,CAAC;AAUH,eAAO,MAAM,+BAA+B,EAAE,OAAO,CAAC,OAAO,KAAK,CAqBhE,CAAC;AAWH,eAAO,MAAM,4BAA4B,EAAE,OAAO,CAAC,OAAO,KAAK,CAqB7D,CAAC"}
|
|
@@ -5,6 +5,7 @@ export interface Props {
|
|
|
5
5
|
title?: string;
|
|
6
6
|
avatar?: string;
|
|
7
7
|
disableMenu?: boolean;
|
|
8
|
+
role?: string;
|
|
8
9
|
}
|
|
9
10
|
declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__VLS_TypePropsToRuntimeProps<Props>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToRuntimeProps<Props>>>, {}, {}>, Readonly<{
|
|
10
11
|
"app-switcher": void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"vc-app.vue.d.ts","sourceRoot":"","sources":["../../../../../ui/components/organisms/vc-app/vc-app.vue.ts"],"names":[],"mappings":"AAmBA,MAAM,WAAW,KAAK;IACpB,OAAO,EAAE,OAAO,CAAC;IACjB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,WAAW,CAAC,EAAE,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"vc-app.vue.d.ts","sourceRoot":"","sources":["../../../../../ui/components/organisms/vc-app/vc-app.vue.ts"],"names":[],"mappings":"AAmBA,MAA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|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "./dist/framework.js",
|
|
6
6
|
"types": "./dist/index.d.ts",
|
|
@@ -61,9 +61,9 @@
|
|
|
61
61
|
"devDependencies": {
|
|
62
62
|
"@types/dompurify": "^3.0.5",
|
|
63
63
|
"@types/quill": "^2.0.14",
|
|
64
|
-
"@vc-shell/api-client-generator": "^1.0.
|
|
65
|
-
"@vc-shell/config-generator": "^1.0.
|
|
66
|
-
"@vc-shell/ts-config": "^1.0.
|
|
64
|
+
"@vc-shell/api-client-generator": "^1.0.268",
|
|
65
|
+
"@vc-shell/config-generator": "^1.0.268",
|
|
66
|
+
"@vc-shell/ts-config": "^1.0.268",
|
|
67
67
|
"@vitejs/plugin-vue": "^5.0.3",
|
|
68
68
|
"cypress-signalr-mock": "^1.5.0",
|
|
69
69
|
"sass": "^1.69.6",
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
|
|
40
40
|
<!-- Jump to page input -->
|
|
41
41
|
<div
|
|
42
|
-
v-if="variant === 'default'"
|
|
42
|
+
v-if="variant === 'default' && pages > 5"
|
|
43
43
|
class="vc-pagination__jump"
|
|
44
44
|
>
|
|
45
45
|
<p class="tw-mr-3">{{ $t("COMPONENTS.MOLECULES.VC_PAGINATION.JUMP") }}</p>
|
|
@@ -79,7 +79,6 @@ export interface Props {
|
|
|
79
79
|
|
|
80
80
|
export interface Emits {
|
|
81
81
|
(event: "itemClick", pages: number): void;
|
|
82
|
-
(event: "pageSizeChange", pageSize: number): void;
|
|
83
82
|
}
|
|
84
83
|
|
|
85
84
|
const props = withDefaults(defineProps<Props>(), {
|
|
@@ -91,9 +90,10 @@ const props = withDefaults(defineProps<Props>(), {
|
|
|
91
90
|
const emit = defineEmits<Emits>();
|
|
92
91
|
|
|
93
92
|
const currentPage = ref(props.currentPage);
|
|
94
|
-
const jumpPage = ref(
|
|
93
|
+
const jumpPage = ref();
|
|
95
94
|
|
|
96
95
|
const setPage = (page: number | string) => {
|
|
96
|
+
if (typeof page === "undefined" || (typeof page === "number" && isNaN(page))) return;
|
|
97
97
|
const pageNumber = typeof page === "string" ? parseInt(page) : page;
|
|
98
98
|
if (pageNumber < 1 || pageNumber > props.pages || page === "...") return;
|
|
99
99
|
currentPage.value = pageNumber;
|
|
@@ -114,7 +114,11 @@ const handleInputChange = (value: unknown) => {
|
|
|
114
114
|
};
|
|
115
115
|
|
|
116
116
|
function onKeyDown(e: KeyboardEvent) {
|
|
117
|
-
|
|
117
|
+
const allowedKeys = ["Backspace", "Delete", "ArrowUp", "ArrowDown", "ArrowLeft", "ArrowRight"];
|
|
118
|
+
if (
|
|
119
|
+
(!/^\d$/.test(e.key) && !allowedKeys.includes(e.key)) ||
|
|
120
|
+
(jumpPage.value >= props.pages && e.key !== "Backspace" && e.key !== "Delete")
|
|
121
|
+
) {
|
|
118
122
|
e.preventDefault();
|
|
119
123
|
}
|
|
120
124
|
}
|
|
@@ -226,7 +230,7 @@ const pagesToShow = computed(() => {
|
|
|
226
230
|
|
|
227
231
|
&__jump input {
|
|
228
232
|
width: 50px;
|
|
229
|
-
|
|
233
|
+
text-align: center;
|
|
230
234
|
}
|
|
231
235
|
}
|
|
232
236
|
</style>
|
|
@@ -60,7 +60,10 @@
|
|
|
60
60
|
name="toolbar:user-dropdown"
|
|
61
61
|
:user-dropdown="UserDropdownButton"
|
|
62
62
|
>
|
|
63
|
-
<UserDropdownButton
|
|
63
|
+
<UserDropdownButton
|
|
64
|
+
:avatar-url="avatar"
|
|
65
|
+
:role="role"
|
|
66
|
+
/>
|
|
64
67
|
</slot>
|
|
65
68
|
</template>
|
|
66
69
|
</slot>
|
|
@@ -122,6 +125,7 @@ export interface Props {
|
|
|
122
125
|
title?: string;
|
|
123
126
|
avatar?: string;
|
|
124
127
|
disableMenu?: boolean;
|
|
128
|
+
role?: string;
|
|
125
129
|
}
|
|
126
130
|
|
|
127
131
|
defineOptions({
|