@vc-shell/framework 1.0.70 → 1.0.71
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 +35 -1
- package/core/composables/useNotifications/index.ts +1 -1
- package/core/composables/useUser/index.ts +175 -9
- package/dist/core/composables/useNotifications/index.d.ts +1 -1
- package/dist/core/composables/useNotifications/index.d.ts.map +1 -1
- package/dist/core/composables/useUser/index.d.ts +18 -1
- package/dist/core/composables/useUser/index.d.ts.map +1 -1
- package/dist/framework.mjs +17124 -15573
- package/dist/index.css +1 -1
- package/dist/index.d.ts +3 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/injectionSymbols.d.ts +6 -0
- package/dist/injectionSymbols.d.ts.map +1 -0
- package/dist/shared/components/app-switcher/composables/useAppSwitcher/index.d.ts +1 -1
- package/dist/shared/components/app-switcher/composables/useAppSwitcher/index.d.ts.map +1 -1
- package/dist/shared/components/blade-navigation/components/vc-blade-navigation/vc-blade-navigation.vue.d.ts.map +1 -1
- package/dist/shared/components/blade-navigation/composables/useBladeNavigation/index.d.ts +1 -1
- package/dist/shared/components/blade-navigation/composables/useBladeNavigation/index.d.ts.map +1 -1
- package/dist/shared/components/change-password/change-password.vue.d.ts +7 -0
- package/dist/shared/components/change-password/change-password.vue.d.ts.map +1 -0
- package/dist/shared/components/change-password/index.d.ts +11 -0
- package/dist/shared/components/change-password/index.d.ts.map +1 -0
- package/dist/shared/components/index.d.ts +9 -0
- package/dist/shared/components/index.d.ts.map +1 -0
- package/dist/shared/components/language-selector/index.d.ts +55 -0
- package/dist/shared/components/language-selector/index.d.ts.map +1 -0
- package/dist/shared/components/language-selector/language-selector.vue.d.ts +45 -0
- package/dist/shared/components/language-selector/language-selector.vue.d.ts.map +1 -0
- package/dist/shared/components/notifications/core/notification.d.ts.map +1 -1
- package/dist/shared/components/notifications/types/index.d.ts +3 -1
- package/dist/shared/components/notifications/types/index.d.ts.map +1 -1
- package/dist/shared/components/user-dropdown-button/index.d.ts +43 -0
- package/dist/shared/components/user-dropdown-button/index.d.ts.map +1 -0
- package/dist/shared/components/user-dropdown-button/user-dropdown-button.vue.d.ts +33 -0
- package/dist/shared/components/user-dropdown-button/user-dropdown-button.vue.d.ts.map +1 -0
- package/dist/shared/index.d.ts +3 -7
- package/dist/shared/index.d.ts.map +1 -1
- package/dist/shared/locales/index.d.ts +3 -0
- package/dist/shared/locales/index.d.ts.map +1 -0
- package/dist/shared/modules/assets/components/assets-details/assets-details.vue.d.ts +2 -9
- package/dist/shared/modules/assets/components/assets-details/assets-details.vue.d.ts.map +1 -1
- package/dist/shared/modules/assets/components/assets-details/index.d.ts +23 -157
- package/dist/shared/modules/assets/components/assets-details/index.d.ts.map +1 -1
- package/dist/shared/modules/assets-manager/components/assets-manager/assets-manager.vue.d.ts +2 -9
- package/dist/shared/modules/assets-manager/components/assets-manager/assets-manager.vue.d.ts.map +1 -1
- package/dist/shared/modules/assets-manager/components/assets-manager/index.d.ts +27 -172
- package/dist/shared/modules/assets-manager/components/assets-manager/index.d.ts.map +1 -1
- package/dist/shared/modules/index.d.ts +3 -0
- package/dist/shared/modules/index.d.ts.map +1 -0
- package/dist/shared/pages/InvitePage/components/index.d.ts +2 -0
- package/dist/shared/pages/InvitePage/components/index.d.ts.map +1 -0
- package/dist/shared/pages/InvitePage/components/invite/Invite.vue.d.ts +33 -0
- package/dist/shared/pages/InvitePage/components/invite/Invite.vue.d.ts.map +1 -0
- package/dist/shared/pages/InvitePage/components/invite/index.d.ts +32 -0
- package/dist/shared/pages/InvitePage/components/invite/index.d.ts.map +1 -0
- package/dist/shared/pages/InvitePage/index.d.ts +5 -0
- package/dist/shared/pages/InvitePage/index.d.ts.map +1 -0
- package/dist/shared/pages/InvitePage/locales/index.d.ts +3 -0
- package/dist/shared/pages/InvitePage/locales/index.d.ts.map +1 -0
- package/dist/shared/pages/LoginPage/components/index.d.ts +2 -0
- package/dist/shared/pages/LoginPage/components/index.d.ts.map +1 -0
- package/dist/shared/pages/LoginPage/components/login/Login.vue.d.ts +17 -0
- package/dist/shared/pages/LoginPage/components/login/Login.vue.d.ts.map +1 -0
- package/dist/shared/pages/LoginPage/components/login/index.d.ts +28 -0
- package/dist/shared/pages/LoginPage/components/login/index.d.ts.map +1 -0
- package/dist/shared/pages/LoginPage/index.d.ts +3 -0
- package/dist/shared/pages/LoginPage/index.d.ts.map +1 -0
- package/dist/shared/pages/LoginPage/locales/index.d.ts +3 -0
- package/dist/shared/pages/LoginPage/locales/index.d.ts.map +1 -0
- package/dist/shared/pages/LoginPage/plugin.d.ts +6 -0
- package/dist/shared/pages/LoginPage/plugin.d.ts.map +1 -0
- package/dist/shared/pages/ResetPasswordPage/components/index.d.ts +2 -0
- package/dist/shared/pages/ResetPasswordPage/components/index.d.ts.map +1 -0
- package/dist/shared/pages/ResetPasswordPage/components/reset-password/ResetPassword.vue.d.ts +33 -0
- package/dist/shared/pages/ResetPasswordPage/components/reset-password/ResetPassword.vue.d.ts.map +1 -0
- package/dist/shared/pages/ResetPasswordPage/components/reset-password/index.d.ts +32 -0
- package/dist/shared/pages/ResetPasswordPage/components/reset-password/index.d.ts.map +1 -0
- package/dist/shared/pages/ResetPasswordPage/index.d.ts +5 -0
- package/dist/shared/pages/ResetPasswordPage/index.d.ts.map +1 -0
- package/dist/shared/pages/ResetPasswordPage/locales/index.d.ts +3 -0
- package/dist/shared/pages/ResetPasswordPage/locales/index.d.ts.map +1 -0
- package/dist/shared/pages/index.d.ts +10 -0
- package/dist/shared/pages/index.d.ts.map +1 -0
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/typings/index.d.ts +8 -0
- package/dist/typings/index.d.ts.map +1 -0
- package/dist/ui/components/atoms/vc-button/index.d.ts +36 -6
- package/dist/ui/components/atoms/vc-button/index.d.ts.map +1 -1
- package/dist/ui/components/atoms/vc-button/vc-button.vue.d.ts +10 -7
- package/dist/ui/components/atoms/vc-button/vc-button.vue.d.ts.map +1 -1
- package/dist/ui/components/atoms/vc-status/index.d.ts +6 -6
- package/dist/ui/components/atoms/vc-status/vc-status.vue.d.ts +1 -1
- package/dist/ui/components/organisms/vc-app/_internal/vc-app-menu/_internal/vc-app-menu-item/vc-app-menu-item.vue.d.ts +1 -1
- 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
- package/dist/ui/components/organisms/vc-app/vc-app.vue.d.ts +2 -2
- package/dist/ui/components/organisms/vc-app/vc-app.vue.d.ts.map +1 -1
- 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
- package/dist/ui/components/organisms/vc-blade/index.d.ts +1 -31
- package/dist/ui/components/organisms/vc-blade/index.d.ts.map +1 -1
- package/dist/ui/components/organisms/vc-blade/vc-blade.vue.d.ts +1 -6
- package/dist/ui/components/organisms/vc-blade/vc-blade.vue.d.ts.map +1 -1
- package/dist/ui/components/organisms/vc-popup/index.d.ts +6 -6
- package/dist/ui/components/organisms/vc-popup/vc-popup.vue.d.ts +1 -1
- package/dist/ui/components/organisms/vc-popup/vc-popup.vue.d.ts.map +1 -1
- package/dist/ui/components/organisms/vc-table/_internal/vc-table-filter/vc-table-filter.vue.d.ts +2 -1
- package/dist/ui/components/organisms/vc-table/_internal/vc-table-filter/vc-table-filter.vue.d.ts.map +1 -1
- package/dist/ui/components/organisms/vc-table/index.d.ts +7 -7
- package/dist/ui/components/organisms/vc-table/vc-table.vue.d.ts +7 -7
- package/dist/ui/components/organisms/vc-table/vc-table.vue.d.ts.map +1 -1
- package/package.json +9 -7
- package/shared/components/app-switcher/composables/useAppSwitcher/index.ts +1 -1
- package/shared/components/blade-navigation/components/vc-blade-navigation/vc-blade-navigation.vue +4 -11
- package/shared/components/blade-navigation/composables/useBladeNavigation/index.ts +4 -7
- package/shared/components/change-password/change-password.vue +167 -0
- package/shared/components/change-password/index.ts +10 -0
- package/shared/components/index.ts +8 -0
- package/shared/components/language-selector/index.ts +10 -0
- package/shared/components/language-selector/language-selector.vue +60 -0
- package/shared/components/notifications/core/notification.ts +3 -3
- package/shared/components/notifications/types/index.ts +4 -1
- package/shared/components/user-dropdown-button/index.ts +10 -0
- package/shared/components/user-dropdown-button/user-dropdown-button.vue +124 -0
- package/shared/index.ts +12 -8
- package/shared/locales/en.json +35 -0
- package/shared/locales/index.ts +2 -0
- package/shared/modules/assets/components/assets-details/assets-details.vue +1 -7
- package/shared/modules/assets-manager/components/assets-manager/assets-manager.vue +0 -6
- package/shared/modules/index.ts +2 -0
- package/shared/pages/InvitePage/components/index.ts +1 -0
- package/shared/pages/InvitePage/components/invite/Invite.vue +172 -0
- package/shared/pages/InvitePage/components/invite/index.ts +3 -0
- package/shared/pages/InvitePage/index.ts +7 -0
- package/shared/pages/InvitePage/locales/en.json +31 -0
- package/shared/pages/InvitePage/locales/index.ts +2 -0
- package/shared/pages/LoginPage/components/index.ts +1 -0
- package/shared/pages/LoginPage/components/login/Login.vue +283 -0
- package/shared/pages/LoginPage/components/login/index.ts +3 -0
- package/shared/pages/LoginPage/index.ts +2 -0
- package/shared/pages/LoginPage/locales/en.json +36 -0
- package/shared/pages/LoginPage/locales/index.ts +2 -0
- package/shared/pages/LoginPage/plugin.ts +17 -0
- package/shared/pages/ResetPasswordPage/components/index.ts +1 -0
- package/shared/pages/ResetPasswordPage/components/reset-password/ResetPassword.vue +166 -0
- package/shared/pages/ResetPasswordPage/components/reset-password/index.ts +3 -0
- package/shared/pages/ResetPasswordPage/index.ts +7 -0
- package/shared/pages/ResetPasswordPage/locales/en.json +28 -0
- package/shared/pages/ResetPasswordPage/locales/index.ts +2 -0
- package/shared/pages/index.ts +12 -0
- package/ui/components/atoms/vc-button/vc-button.vue +109 -143
- 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/vc-app-menu-item.vue +3 -4
- package/ui/components/organisms/vc-app/vc-app.vue +6 -9
- package/ui/components/organisms/vc-blade/_internal/vc-blade-toolbar/_internal/vc-blade-toolbar-button/vc-blade-toolbar-button.vue +5 -8
- package/ui/components/organisms/vc-blade/vc-blade.vue +14 -22
- package/ui/components/organisms/vc-login-form/vc-login-form.stories.ts +1 -1
- package/ui/components/organisms/vc-popup/_internal/vc-popup-warning/vc-popup-warning.vue +1 -1
- package/ui/components/organisms/vc-popup/vc-popup.vue +1 -1
- package/ui/components/organisms/vc-table/_internal/vc-table-filter/vc-table-filter.vue +5 -8
- package/ui/components/organisms/vc-table/vc-table.vue +25 -18
- package/ui/locales/en.json +3 -3
|
@@ -34,7 +34,7 @@ declare const _default: <T extends string | TableItem>(__VLS_props: {
|
|
|
34
34
|
reorderableColumns?: boolean;
|
|
35
35
|
reorderableRows?: boolean;
|
|
36
36
|
stateKey: string;
|
|
37
|
-
|
|
37
|
+
selectAll?: boolean;
|
|
38
38
|
} & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, __VLS_ctx?: Pick<{
|
|
39
39
|
props: {
|
|
40
40
|
columns: ITableColumns[];
|
|
@@ -61,7 +61,7 @@ declare const _default: <T extends string | TableItem>(__VLS_props: {
|
|
|
61
61
|
reorderableColumns?: boolean;
|
|
62
62
|
reorderableRows?: boolean;
|
|
63
63
|
stateKey: string;
|
|
64
|
-
|
|
64
|
+
selectAll?: boolean;
|
|
65
65
|
};
|
|
66
66
|
expose(exposed: {}): void;
|
|
67
67
|
attrs: any;
|
|
@@ -94,7 +94,7 @@ declare const _default: <T extends string | TableItem>(__VLS_props: {
|
|
|
94
94
|
dropIndex: number;
|
|
95
95
|
value: T[];
|
|
96
96
|
}): void;
|
|
97
|
-
(event: "
|
|
97
|
+
(event: "select:all", values: boolean): void;
|
|
98
98
|
};
|
|
99
99
|
}, "slots" | "attrs" | "emit">, __VLS_setup?: {
|
|
100
100
|
props: {
|
|
@@ -122,7 +122,7 @@ declare const _default: <T extends string | TableItem>(__VLS_props: {
|
|
|
122
122
|
reorderableColumns?: boolean;
|
|
123
123
|
reorderableRows?: boolean;
|
|
124
124
|
stateKey: string;
|
|
125
|
-
|
|
125
|
+
selectAll?: boolean;
|
|
126
126
|
};
|
|
127
127
|
expose(exposed: {}): void;
|
|
128
128
|
attrs: any;
|
|
@@ -155,7 +155,7 @@ declare const _default: <T extends string | TableItem>(__VLS_props: {
|
|
|
155
155
|
dropIndex: number;
|
|
156
156
|
value: T[];
|
|
157
157
|
}): void;
|
|
158
|
-
(event: "
|
|
158
|
+
(event: "select:all", values: boolean): void;
|
|
159
159
|
};
|
|
160
160
|
}) => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
161
161
|
[key: string]: any;
|
|
@@ -186,7 +186,7 @@ declare const _default: <T extends string | TableItem>(__VLS_props: {
|
|
|
186
186
|
reorderableColumns?: boolean;
|
|
187
187
|
reorderableRows?: boolean;
|
|
188
188
|
stateKey: string;
|
|
189
|
-
|
|
189
|
+
selectAll?: boolean;
|
|
190
190
|
};
|
|
191
191
|
expose(exposed: {}): void;
|
|
192
192
|
attrs: any;
|
|
@@ -219,7 +219,7 @@ declare const _default: <T extends string | TableItem>(__VLS_props: {
|
|
|
219
219
|
dropIndex: number;
|
|
220
220
|
value: T[];
|
|
221
221
|
}): void;
|
|
222
|
-
(event: "
|
|
222
|
+
(event: "select:all", values: boolean): void;
|
|
223
223
|
};
|
|
224
224
|
};
|
|
225
225
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"vc-table.vue.d.ts","sourceRoot":"","sources":["../../../../../ui/components/organisms/vc-table/vc-table.vue.ts"],"names":[],"mappings":"AASA,OAAO,EAAE,oBAAoB,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAC;AAI/E,MAAM,WAAW,WAAW;IAC1B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,YAAY,CAAC,EAAE,MAAM,IAAI,CAAC;CAC3B;AAED,MAAM,WAAW,SAAS;IACxB,CAAC,CAAC,EAAE,MAAM,GAAG,GAAG,CAAC;IACjB,OAAO,CAAC,EAAE,oBAAoB,EAAE,CAAC;CAClC;;
|
|
1
|
+
{"version":3,"file":"vc-table.vue.d.ts","sourceRoot":"","sources":["../../../../../ui/components/organisms/vc-table/vc-table.vue.ts"],"names":[],"mappings":"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"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vc-shell/framework",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.71",
|
|
4
4
|
"main": "./dist/framework.mjs",
|
|
5
5
|
"module": "./dist/framework.mjs",
|
|
6
6
|
"types": "./dist/index.d.ts",
|
|
@@ -38,6 +38,7 @@
|
|
|
38
38
|
"@vueuse/integrations": "^10.1.2",
|
|
39
39
|
"buffer-esm": "^1.2.0",
|
|
40
40
|
"client-oauth2": "^4.3.3",
|
|
41
|
+
"fetch-intercept": "^2.4.0",
|
|
41
42
|
"moment": "^2.29.4",
|
|
42
43
|
"normalize.css": "^8.0.1",
|
|
43
44
|
"querystring-es3": "^0.2.1",
|
|
@@ -45,20 +46,21 @@
|
|
|
45
46
|
"quill-image-uploader": "^1.3.0",
|
|
46
47
|
"swiper": "^6.8.4",
|
|
47
48
|
"vee-validate": "^4.9.3",
|
|
48
|
-
"vue": "^3.3.
|
|
49
|
+
"vue": "^3.3.4",
|
|
49
50
|
"vue-currency-input": "~2.5.1",
|
|
50
51
|
"vue-i18n": "^9.2.2",
|
|
51
|
-
"vue-router": "^4.2.
|
|
52
|
+
"vue-router": "^4.2.1",
|
|
52
53
|
"vue3-ace-editor": "^2.2.2",
|
|
53
|
-
"vue3-touch-events": "^4.1.2"
|
|
54
|
+
"vue3-touch-events": "^4.1.2",
|
|
55
|
+
"whatwg-fetch": "^3.6.2"
|
|
54
56
|
},
|
|
55
57
|
"devDependencies": {
|
|
56
|
-
"@vc-shell/api-client-generator": "^1.0.
|
|
57
|
-
"@vc-shell/config-generator": "^1.0.
|
|
58
|
+
"@vc-shell/api-client-generator": "^1.0.71",
|
|
59
|
+
"@vc-shell/config-generator": "^1.0.71",
|
|
58
60
|
"@vitejs/plugin-vue": "^4.2.3",
|
|
59
61
|
"sass": "^1.62.1",
|
|
60
62
|
"typescript": "^5.0.4",
|
|
61
|
-
"vite": "^4.3.
|
|
63
|
+
"vite": "^4.3.9",
|
|
62
64
|
"vue-tsc": "^1.6.5"
|
|
63
65
|
},
|
|
64
66
|
"publishConfig": {
|
package/shared/components/blade-navigation/components/vc-blade-navigation/vc-blade-navigation.vue
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
capture
|
|
5
5
|
>
|
|
6
6
|
<router-view
|
|
7
|
-
v-slot="{ Component }
|
|
7
|
+
v-slot="{ Component }"
|
|
8
8
|
:key="route.path"
|
|
9
9
|
@vue:before-unmount="reset"
|
|
10
10
|
>
|
|
@@ -19,14 +19,10 @@
|
|
|
19
19
|
:maximized="findStateById(0)"
|
|
20
20
|
:blades="blades"
|
|
21
21
|
:param="resolveParam"
|
|
22
|
+
:error="error"
|
|
22
23
|
@expand:blade="handleMaximizeBlade(0, true)"
|
|
23
24
|
@collapse:blade="handleMaximizeBlade(0, false)"
|
|
24
25
|
>
|
|
25
|
-
<template
|
|
26
|
-
v-if="error"
|
|
27
|
-
#error
|
|
28
|
-
>{{ error }}</template
|
|
29
|
-
>
|
|
30
26
|
</component>
|
|
31
27
|
</router-view>
|
|
32
28
|
</ErrorInterceptor>
|
|
@@ -48,17 +44,14 @@
|
|
|
48
44
|
:expanded="i === blades.length - 1"
|
|
49
45
|
:maximized="findStateById(blade.idx)"
|
|
50
46
|
:options="blade.options"
|
|
47
|
+
:error="error"
|
|
48
|
+
:blades="blades"
|
|
51
49
|
@close:blade="onBladeClose(i)"
|
|
52
50
|
@close:children="$emit('onClose', i + 1)"
|
|
53
51
|
@parent:call="$emit('onParentCall', { id: i, args: $event })"
|
|
54
52
|
@expand:blade="handleMaximizeBlade(blade.idx, true)"
|
|
55
53
|
@collapse:blade="handleMaximizeBlade(blade.idx, false)"
|
|
56
54
|
>
|
|
57
|
-
<template
|
|
58
|
-
v-if="error"
|
|
59
|
-
#error
|
|
60
|
-
>{{ error }}</template
|
|
61
|
-
>
|
|
62
55
|
</component>
|
|
63
56
|
</ErrorInterceptor>
|
|
64
57
|
</template>
|
|
@@ -37,7 +37,7 @@ interface IUseBladeNavigation {
|
|
|
37
37
|
onOpen,
|
|
38
38
|
onClose,
|
|
39
39
|
}: IBladeEvent<Blade>) => void;
|
|
40
|
-
closeBlade: (index: number) =>
|
|
40
|
+
closeBlade: (index: number) => Promise<boolean>;
|
|
41
41
|
onParentCall: (index: number, args: IParentCallArgs) => void;
|
|
42
42
|
}
|
|
43
43
|
|
|
@@ -55,7 +55,6 @@ export function useBladeNavigation(): IUseBladeNavigation {
|
|
|
55
55
|
const navigationInstance =
|
|
56
56
|
(instance && inject<BladeNavigationPlugin>("bladeNavigationPlugin")) || bladeNavigationInstance;
|
|
57
57
|
|
|
58
|
-
const lastBladeUrl = ref();
|
|
59
58
|
watch(
|
|
60
59
|
navigationInstance.blades,
|
|
61
60
|
(newVal) => {
|
|
@@ -104,16 +103,15 @@ export function useBladeNavigation(): IUseBladeNavigation {
|
|
|
104
103
|
await router.push(bladeComponent.url);
|
|
105
104
|
}
|
|
106
105
|
} else {
|
|
107
|
-
let isPrevented;
|
|
108
106
|
if (existingChild === undefined) {
|
|
109
107
|
bladeComponent.idx = index ? index + 1 : 1;
|
|
110
108
|
} else if (existingChild) {
|
|
111
|
-
|
|
109
|
+
await closeBlade(
|
|
112
110
|
navigationInstance.blades.value.findIndex((x: IBladeContainer) => x.idx === existingChild.idx)
|
|
113
111
|
);
|
|
114
112
|
bladeComponent.idx = existingChild.idx;
|
|
115
113
|
}
|
|
116
|
-
if (!isPrevented) {
|
|
114
|
+
if (!isPrevented.value) {
|
|
117
115
|
await addBlade(bladeComponent, param, options, onOpen, onClose, index);
|
|
118
116
|
}
|
|
119
117
|
}
|
|
@@ -133,7 +131,7 @@ export function useBladeNavigation(): IUseBladeNavigation {
|
|
|
133
131
|
if (result === false) {
|
|
134
132
|
isPrevented.value = true;
|
|
135
133
|
console.debug(`[@vc-shell/framework#useBladeNavigation] - Navigation is prevented`);
|
|
136
|
-
return isPrevented;
|
|
134
|
+
return isPrevented.value;
|
|
137
135
|
}
|
|
138
136
|
}
|
|
139
137
|
}
|
|
@@ -202,7 +200,6 @@ export function useBladeNavigation(): IUseBladeNavigation {
|
|
|
202
200
|
|
|
203
201
|
function addEntryToLocation(params: string) {
|
|
204
202
|
history.pushState({}, null, "#" + params);
|
|
205
|
-
lastBladeUrl.value = params;
|
|
206
203
|
}
|
|
207
204
|
|
|
208
205
|
async function clearParentData() {
|
|
@@ -0,0 +1,167 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<VcPopup
|
|
3
|
+
variant="small"
|
|
4
|
+
:title="$t('COMPONENTS.CHANGE_PASSWORD.TITLE')"
|
|
5
|
+
@close="$emit('close')"
|
|
6
|
+
>
|
|
7
|
+
<div class="tw-p-3">
|
|
8
|
+
<VcForm>
|
|
9
|
+
<Field
|
|
10
|
+
v-slot="{ field, errorMessage, errors }"
|
|
11
|
+
:label="$t('COMPONENTS.CHANGE_PASSWORD.CURRENT_PASSWORD.LABEL')"
|
|
12
|
+
name="current"
|
|
13
|
+
rules="required|min:6"
|
|
14
|
+
:model-value="form.currentPassword"
|
|
15
|
+
>
|
|
16
|
+
<VcInput
|
|
17
|
+
v-bind="field"
|
|
18
|
+
ref="passwordField"
|
|
19
|
+
v-model="form.currentPassword"
|
|
20
|
+
class="tw-mb-4 tw-mt-1"
|
|
21
|
+
:label="$t('COMPONENTS.CHANGE_PASSWORD.CURRENT_PASSWORD.LABEL')"
|
|
22
|
+
:placeholder="$t('COMPONENTS.CHANGE_PASSWORD.CURRENT_PASSWORD.PLACEHOLDER')"
|
|
23
|
+
type="password"
|
|
24
|
+
required
|
|
25
|
+
:error="!!errors.length"
|
|
26
|
+
:error-message="errorMessage"
|
|
27
|
+
@update:model-value="validate"
|
|
28
|
+
></VcInput>
|
|
29
|
+
</Field>
|
|
30
|
+
<Field
|
|
31
|
+
v-slot="{ field, errorMessage, errors }"
|
|
32
|
+
:label="$t('COMPONENTS.CHANGE_PASSWORD.NEW_PASSWORD.LABEL')"
|
|
33
|
+
name="new_pass"
|
|
34
|
+
rules="required|min:6"
|
|
35
|
+
:model-value="form.password"
|
|
36
|
+
>
|
|
37
|
+
<VcInput
|
|
38
|
+
v-bind="field"
|
|
39
|
+
ref="newPasswordField"
|
|
40
|
+
v-model="form.password"
|
|
41
|
+
class="tw-mb-4 tw-mt-1"
|
|
42
|
+
:label="$t('COMPONENTS.CHANGE_PASSWORD.NEW_PASSWORD.LABEL')"
|
|
43
|
+
:placeholder="$t('COMPONENTS.CHANGE_PASSWORD.NEW_PASSWORD.PLACEHOLDER')"
|
|
44
|
+
type="password"
|
|
45
|
+
required
|
|
46
|
+
:error="!!errors.length"
|
|
47
|
+
:error-message="errorMessage"
|
|
48
|
+
@update:model-value="validate"
|
|
49
|
+
></VcInput>
|
|
50
|
+
</Field>
|
|
51
|
+
<Field
|
|
52
|
+
v-slot="{ field, errorMessage, errors }"
|
|
53
|
+
:label="$t('COMPONENTS.CHANGE_PASSWORD.CONFIRM_PASSWORD.LABEL')"
|
|
54
|
+
name="confirm_pass"
|
|
55
|
+
rules="required|min:6"
|
|
56
|
+
:model-value="form.confirmPassword"
|
|
57
|
+
>
|
|
58
|
+
<VcInput
|
|
59
|
+
v-bind="field"
|
|
60
|
+
ref="confirmPasswordField"
|
|
61
|
+
v-model="form.confirmPassword"
|
|
62
|
+
class="tw-mb-4"
|
|
63
|
+
:label="$t('COMPONENTS.CHANGE_PASSWORD.CONFIRM_PASSWORD.LABEL')"
|
|
64
|
+
:placeholder="$t('COMPONENTS.CHANGE_PASSWORD.CONFIRM_PASSWORD.PLACEHOLDER')"
|
|
65
|
+
type="password"
|
|
66
|
+
required
|
|
67
|
+
:error="!!errors.length"
|
|
68
|
+
:error-message="errorMessage"
|
|
69
|
+
@update:model-value="validate"
|
|
70
|
+
></VcInput>
|
|
71
|
+
</Field>
|
|
72
|
+
<div class="tw-flex tw-justify-center tw-items-center tw-pt-2">
|
|
73
|
+
<span
|
|
74
|
+
v-if="$isDesktop.value"
|
|
75
|
+
class="tw-grow tw-basis-0"
|
|
76
|
+
></span>
|
|
77
|
+
<VcButton
|
|
78
|
+
:outline="true"
|
|
79
|
+
class="tw-mr-3"
|
|
80
|
+
@click="$emit('close')"
|
|
81
|
+
>
|
|
82
|
+
{{ $t("COMPONENTS.CHANGE_PASSWORD.CANCEL") }}
|
|
83
|
+
</VcButton>
|
|
84
|
+
<VcButton
|
|
85
|
+
:disabled="loading || !form.isValid || isDisabled"
|
|
86
|
+
@click="changePassword"
|
|
87
|
+
>
|
|
88
|
+
{{ $t("COMPONENTS.CHANGE_PASSWORD.SAVE") }}
|
|
89
|
+
</VcButton>
|
|
90
|
+
</div>
|
|
91
|
+
|
|
92
|
+
<VcHint
|
|
93
|
+
v-for="(err, i) in form.errors"
|
|
94
|
+
:key="i"
|
|
95
|
+
class="tw-mt-3 !tw-text-[#f14e4e]"
|
|
96
|
+
>
|
|
97
|
+
<!-- TODO: stylizing-->
|
|
98
|
+
{{
|
|
99
|
+
(err as IIdentityError).code ? $t(`COMPONENTS.CHANGE_PASSWORD.ERRORS.${(err as IIdentityError).code}`) : err
|
|
100
|
+
}}
|
|
101
|
+
</VcHint>
|
|
102
|
+
</VcForm>
|
|
103
|
+
</div>
|
|
104
|
+
</VcPopup>
|
|
105
|
+
</template>
|
|
106
|
+
|
|
107
|
+
<script lang="ts" setup>
|
|
108
|
+
import { nextTick, reactive, computed } from "vue";
|
|
109
|
+
import { useIsFormValid, Field, useIsFormDirty, useForm } from "vee-validate";
|
|
110
|
+
import { VcInput, VcHint, VcButton, VcPopup, VcForm } from "./../../../ui/components";
|
|
111
|
+
import { IIdentityError } from "./../../../core/api";
|
|
112
|
+
import { useUser } from "./../../../core/composables/useUser";
|
|
113
|
+
|
|
114
|
+
interface IChangePassForm {
|
|
115
|
+
isValid: boolean;
|
|
116
|
+
errors: IIdentityError[] | string[];
|
|
117
|
+
currentPassword: string;
|
|
118
|
+
password: string;
|
|
119
|
+
confirmPassword: string;
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
interface Emits {
|
|
123
|
+
(event: "close"): void;
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
const emit = defineEmits<Emits>();
|
|
127
|
+
const { changeUserPassword, loading, validatePassword } = useUser();
|
|
128
|
+
useForm({ validateOnMount: false });
|
|
129
|
+
const isValid = useIsFormValid();
|
|
130
|
+
const isDirty = useIsFormDirty();
|
|
131
|
+
const form = reactive<IChangePassForm>({
|
|
132
|
+
isValid: false,
|
|
133
|
+
errors: [],
|
|
134
|
+
currentPassword: "",
|
|
135
|
+
password: "",
|
|
136
|
+
confirmPassword: "",
|
|
137
|
+
});
|
|
138
|
+
|
|
139
|
+
const isDisabled = computed(() => {
|
|
140
|
+
return !isDirty.value || !isValid.value;
|
|
141
|
+
});
|
|
142
|
+
|
|
143
|
+
async function changePassword() {
|
|
144
|
+
const result = await changeUserPassword(form.currentPassword, form.password);
|
|
145
|
+
if (result.succeeded) {
|
|
146
|
+
emit("close");
|
|
147
|
+
} else {
|
|
148
|
+
form.errors = result.errors;
|
|
149
|
+
form.isValid = form.errors.length == 0;
|
|
150
|
+
}
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
function validate() {
|
|
154
|
+
nextTick(async () => {
|
|
155
|
+
if (form.password || form.confirmPassword) {
|
|
156
|
+
form.errors = (await validatePassword(form.password)).errors;
|
|
157
|
+
if (form.confirmPassword !== form.password) {
|
|
158
|
+
(form.errors as IIdentityError[]).push({ code: "Repeat-password" });
|
|
159
|
+
}
|
|
160
|
+
if (form.confirmPassword === form.currentPassword && form.password === form.currentPassword) {
|
|
161
|
+
(form.errors as IIdentityError[]).push({ code: "Equal-passwords" });
|
|
162
|
+
}
|
|
163
|
+
form.isValid = form.errors.length == 0;
|
|
164
|
+
}
|
|
165
|
+
});
|
|
166
|
+
}
|
|
167
|
+
</script>
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import _ChangePassword from "./change-password.vue";
|
|
2
|
+
|
|
3
|
+
export const ChangePassword = _ChangePassword as typeof _ChangePassword;
|
|
4
|
+
|
|
5
|
+
// Declare globally
|
|
6
|
+
declare module "@vue/runtime-core" {
|
|
7
|
+
export interface GlobalComponents {
|
|
8
|
+
ChangePassword: typeof ChangePassword;
|
|
9
|
+
}
|
|
10
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export * from "./app-switcher";
|
|
2
|
+
export * from "./blade-navigation";
|
|
3
|
+
export * from "./notifications";
|
|
4
|
+
export * from "./error-interceptor";
|
|
5
|
+
export * from "./popup-handler";
|
|
6
|
+
export * from "./change-password";
|
|
7
|
+
export * from "./language-selector";
|
|
8
|
+
export * from "./user-dropdown-button";
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import _LanguageSelector from "./language-selector.vue";
|
|
2
|
+
|
|
3
|
+
export const LanguageSelector = _LanguageSelector as typeof _LanguageSelector;
|
|
4
|
+
|
|
5
|
+
// Declare globally
|
|
6
|
+
declare module "@vue/runtime-core" {
|
|
7
|
+
export interface GlobalComponents {
|
|
8
|
+
LanguageSelector: typeof LanguageSelector;
|
|
9
|
+
}
|
|
10
|
+
}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div
|
|
3
|
+
v-on-click-outside="
|
|
4
|
+
() => {
|
|
5
|
+
isDropActive = false;
|
|
6
|
+
}
|
|
7
|
+
"
|
|
8
|
+
class="tw-relative"
|
|
9
|
+
:title="title"
|
|
10
|
+
@click.stop="isDropActive = !isDropActive"
|
|
11
|
+
>
|
|
12
|
+
<div
|
|
13
|
+
:class="[
|
|
14
|
+
{
|
|
15
|
+
'tw-shadow-[0_-6px_6px_white,1px_1px_22px_rgba(126,142,157,0.2)] [clip-path:inset(0px_-20px_0px_-20px)] tw-bg-white tw-z-[10000]':
|
|
16
|
+
isDropActive,
|
|
17
|
+
},
|
|
18
|
+
'tw-relative tw-h-full tw-flex tw-items-center tw-justify-center tw-w-[var(--app-bar-button-width)] tw-border-l tw-border-solid tw-border-l-[color:var(--app-bar-button-border-color)] tw-cursor-pointer tw-text-[color:var(--app-bar-button-color)] tw-bg-[color:var(--app-bar-button-background-color)] tw-transition-[color] tw-duration-200 hover:tw-text-[color:var(--app-bar-button-color-hover)] hover:tw-bg-[color:var(--app-bar-button-background-color-hover)]',
|
|
19
|
+
]"
|
|
20
|
+
>
|
|
21
|
+
<VcIcon
|
|
22
|
+
icon="fas fa-globe"
|
|
23
|
+
size="xl"
|
|
24
|
+
></VcIcon>
|
|
25
|
+
</div>
|
|
26
|
+
<div
|
|
27
|
+
v-if="isDropActive"
|
|
28
|
+
class="tw-absolute tw-right-0 tw-top-[var(--app-bar-height)] tw-bg-white tw-shadow-[0_-6px_6px_white,1px_1px_22px_rgba(126,142,157,0.2)] tw-w-min tw-z-[10000]"
|
|
29
|
+
>
|
|
30
|
+
<div
|
|
31
|
+
v-for="(lang, i) in languageItems"
|
|
32
|
+
:key="i"
|
|
33
|
+
class="tw-p-3 tw-text-lg tw-text-black tw-border-l tw-border-solid tw-border-l-[#eef0f2] tw-border-b tw-border-b-[#eef0f2] tw-white tw-cursor-pointer hover:tw-bg-[#eff7fc]"
|
|
34
|
+
@click="lang.hasOwnProperty('clickHandler') && lang.clickHandler(lang.lang)"
|
|
35
|
+
>
|
|
36
|
+
{{ lang.title }}
|
|
37
|
+
</div>
|
|
38
|
+
</div>
|
|
39
|
+
</div>
|
|
40
|
+
</template>
|
|
41
|
+
|
|
42
|
+
<script lang="ts" setup>
|
|
43
|
+
import { VcIcon } from "./../../../ui/components";
|
|
44
|
+
import { ref } from "vue";
|
|
45
|
+
import { vOnClickOutside } from "@vueuse/components";
|
|
46
|
+
|
|
47
|
+
export interface Props {
|
|
48
|
+
title: string;
|
|
49
|
+
value: string;
|
|
50
|
+
languageItems: { lang: string; title: string; clickHandler: (lang: string) => void }[];
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
withDefaults(defineProps<Props>(), {
|
|
54
|
+
title: "",
|
|
55
|
+
value: "",
|
|
56
|
+
languageItems: () => [],
|
|
57
|
+
});
|
|
58
|
+
|
|
59
|
+
const isDropActive = ref(false);
|
|
60
|
+
</script>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { mergeProps } from "vue";
|
|
2
|
-
import { NotificationOptions } from "../types";
|
|
2
|
+
import { InternalNotificationOptions, NotificationOptions } from "../types";
|
|
3
3
|
import { useContainer } from "../composables";
|
|
4
4
|
|
|
5
5
|
const {
|
|
@@ -18,7 +18,7 @@ function checkPending(limit?: number) {
|
|
|
18
18
|
return limitCount > 0 && visibleCount + pending.items.length >= limitCount;
|
|
19
19
|
}
|
|
20
20
|
|
|
21
|
-
function resolvePending(options:
|
|
21
|
+
function resolvePending(options: InternalNotificationOptions) {
|
|
22
22
|
if (checkPending(options.limit)) {
|
|
23
23
|
pending.items.push({
|
|
24
24
|
notificationId: options.notificationId,
|
|
@@ -27,7 +27,7 @@ function resolvePending(options: NotificationOptions) {
|
|
|
27
27
|
}
|
|
28
28
|
}
|
|
29
29
|
|
|
30
|
-
function showNotification(content: string, options:
|
|
30
|
+
function showNotification(content: string, options: InternalNotificationOptions) {
|
|
31
31
|
options = mergeProps(defaultOptions as Record<string, unknown>, options as Record<string, unknown>);
|
|
32
32
|
|
|
33
33
|
if (
|
|
@@ -7,10 +7,13 @@ export interface NotificationOptions {
|
|
|
7
7
|
content?: string;
|
|
8
8
|
notificationId?: number | string;
|
|
9
9
|
type?: NotificationType;
|
|
10
|
-
closeNotification?(): void;
|
|
11
10
|
onOpen?: <T>(payload: T) => void;
|
|
12
11
|
onClose?: <T>(payload: T) => void;
|
|
13
12
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
14
13
|
payload?: string | Record<string, any>;
|
|
15
14
|
updateId?: string | number;
|
|
16
15
|
}
|
|
16
|
+
|
|
17
|
+
export interface InternalNotificationOptions extends NotificationOptions {
|
|
18
|
+
closeNotification?(): void;
|
|
19
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import _UserDropdownButton from "./user-dropdown-button.vue";
|
|
2
|
+
|
|
3
|
+
export const UserDropdownButton = _UserDropdownButton as typeof _UserDropdownButton;
|
|
4
|
+
|
|
5
|
+
// Declare globally
|
|
6
|
+
declare module "@vue/runtime-core" {
|
|
7
|
+
export interface GlobalComponents {
|
|
8
|
+
UserDropdownButton: typeof UserDropdownButton;
|
|
9
|
+
}
|
|
10
|
+
}
|
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div
|
|
3
|
+
v-on-click-outside="onClose"
|
|
4
|
+
class="user-dropdown-button"
|
|
5
|
+
:class="{
|
|
6
|
+
'user-dropdown-button_active': accountMenuVisible,
|
|
7
|
+
'user-dropdown-button_no-pointer': $isMobile.value,
|
|
8
|
+
}"
|
|
9
|
+
@click.stop="toggleAccountMenuVisible"
|
|
10
|
+
>
|
|
11
|
+
<div
|
|
12
|
+
class="user-dropdown-button__avatar"
|
|
13
|
+
:style="{ 'background-image': `url(${avatar})` }"
|
|
14
|
+
></div>
|
|
15
|
+
<div class="tw-grow tw-basis-0 tw-ml-3 tw-overflow-hidden">
|
|
16
|
+
<div class="user-dropdown-button__name tw-truncate">
|
|
17
|
+
{{ name }}
|
|
18
|
+
</div>
|
|
19
|
+
<div class="user-dropdown-button__role">
|
|
20
|
+
{{ role }}
|
|
21
|
+
</div>
|
|
22
|
+
</div>
|
|
23
|
+
<div
|
|
24
|
+
v-if="menuItems && menuItems.length"
|
|
25
|
+
class="user-dropdown-button__chevron"
|
|
26
|
+
>
|
|
27
|
+
<VcIcon
|
|
28
|
+
icon="fas fa-chevron-down"
|
|
29
|
+
size="xl"
|
|
30
|
+
></VcIcon>
|
|
31
|
+
</div>
|
|
32
|
+
<div
|
|
33
|
+
v-if="menuItems && accountMenuVisible"
|
|
34
|
+
class="user-dropdown-button__menu"
|
|
35
|
+
@click.stop="accountMenuVisible = false"
|
|
36
|
+
>
|
|
37
|
+
<div
|
|
38
|
+
v-for="(item, i) in menuItems"
|
|
39
|
+
:key="`menu_item_${i}`"
|
|
40
|
+
class="user-dropdown-button__menu-item"
|
|
41
|
+
@click="item.hasOwnProperty('clickHandler') ? item.clickHandler() : null"
|
|
42
|
+
>
|
|
43
|
+
{{ item.title }}
|
|
44
|
+
</div>
|
|
45
|
+
</div>
|
|
46
|
+
</div>
|
|
47
|
+
</template>
|
|
48
|
+
|
|
49
|
+
<script lang="ts" setup>
|
|
50
|
+
import { ref } from "vue";
|
|
51
|
+
import { vOnClickOutside } from "@vueuse/components";
|
|
52
|
+
import { BladeMenu } from "./../../../core/types";
|
|
53
|
+
|
|
54
|
+
export interface Props {
|
|
55
|
+
avatar: string;
|
|
56
|
+
name: string;
|
|
57
|
+
role: string;
|
|
58
|
+
menuItems?: BladeMenu[];
|
|
59
|
+
}
|
|
60
|
+
const props = withDefaults(defineProps<Props>(), {
|
|
61
|
+
menuItems: () => [],
|
|
62
|
+
});
|
|
63
|
+
|
|
64
|
+
const accountMenuVisible = ref(false);
|
|
65
|
+
|
|
66
|
+
const toggleAccountMenuVisible = () => {
|
|
67
|
+
if (props.menuItems && props.menuItems.length) {
|
|
68
|
+
accountMenuVisible.value = !accountMenuVisible.value;
|
|
69
|
+
}
|
|
70
|
+
};
|
|
71
|
+
|
|
72
|
+
const onClose = () => {
|
|
73
|
+
accountMenuVisible.value = false;
|
|
74
|
+
};
|
|
75
|
+
</script>
|
|
76
|
+
|
|
77
|
+
<style lang="scss">
|
|
78
|
+
.user-dropdown-button {
|
|
79
|
+
@apply tw-w-[240px] tw-border-l tw-border-solid tw-border-l-[color:var(--app-bar-divider-color)] tw-px-4 tw-cursor-pointer
|
|
80
|
+
tw-relative tw-flex tw-justify-between tw-items-center tw-h-full;
|
|
81
|
+
|
|
82
|
+
&_no-pointer {
|
|
83
|
+
@apply tw-cursor-default;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
&:hover,
|
|
87
|
+
&_active {
|
|
88
|
+
@apply tw-bg-[color:var(--app-bar-toolbar-icon-background-hover)];
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
&__avatar {
|
|
92
|
+
@apply tw-rounded-full tw-overflow-hidden tw-w-[34px] tw-h-[34px] tw-bg-[color:var(--app-bar-account-info-role-color)]
|
|
93
|
+
tw-bg-cover tw-bg-center tw-shrink-0;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
&__name {
|
|
97
|
+
@apply tw-text-base tw-text-[color:var(--app-bar-account-info-name-color)];
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
&__role {
|
|
101
|
+
@apply tw-text-base tw-text-[color:var(--app-bar-account-info-role-color)];
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
&__chevron {
|
|
105
|
+
@apply tw-text-[#7e8e9d] [transition:transform_0.2s_ease] [transition:color_0.2s_ease];
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
&:hover &__chevron {
|
|
109
|
+
@apply tw-text-[color:#34414f];
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
&_active &__chevron {
|
|
113
|
+
@apply -tw-scale-y-100;
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
&__menu {
|
|
117
|
+
@apply tw-absolute -tw-left-px tw-right-0 tw-top-[var(--app-bar-height)] tw-bg-white tw-z-[10000] tw-shadow-[0_-6px_6px_white,1px_1px_22px_rgba(126,142,157,0.2)];
|
|
118
|
+
|
|
119
|
+
&-item {
|
|
120
|
+
@apply tw-p-3 tw-text-lg tw-text-black tw-border-l tw-border-solid tw-border-l-[#eef0f2] tw-border-b tw-border-b-[#eef0f2] tw-bg-white hover:tw-bg-[#eff7fc];
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
</style>
|