@vc-shell/framework 1.2.3-beta.0 → 1.2.3
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 -2
- package/core/composables/useAssets/index.ts +28 -72
- package/core/composables/useAsync/index.ts +1 -4
- package/core/composables/useBladeRegistry/index.ts +5 -6
- package/core/composables/useBreadcrumbs/index.ts +1 -4
- package/core/composables/useErrorHandler/index.ts +1 -4
- package/core/composables/useFunctions/debounce.ts +1 -0
- package/core/composables/useFunctions/delay.ts +1 -0
- package/core/composables/useFunctions/index.ts +1 -0
- package/core/composables/useFunctions/once.ts +1 -0
- package/core/composables/useFunctions/sleep.ts +1 -0
- package/core/composables/useFunctions/throttle.ts +1 -0
- package/core/composables/useGlobalSearch/index.ts +3 -3
- package/core/composables/useMenuService/index.ts +12 -7
- package/core/composables/useNotifications/index.ts +2 -5
- package/core/composables/useTheme/index.ts +1 -4
- package/core/composables/useUser/index.ts +20 -189
- package/core/composables/useWidgets/index.ts +2 -5
- package/core/constants/index.ts +0 -2
- package/core/interceptors/index.ts +2 -5
- package/core/plugins/modularity/index.ts +6 -8
- package/core/plugins/modularity/loader.ts +33 -36
- package/core/plugins/signalR/index.ts +3 -6
- package/core/services/app-bar-menu-service.ts +1 -4
- package/core/services/dashboard-service.ts +1 -4
- package/core/services/global-search-service.ts +36 -0
- package/core/services/index.ts +0 -2
- package/core/services/menu-service.ts +41 -5
- package/core/services/settings-menu-service.ts +1 -4
- package/core/services/toolbar-service.ts +3 -18
- package/core/services/widget-service.ts +4 -7
- package/core/types/index.ts +47 -3
- package/core/utilities/index.ts +0 -2
- package/dist/core/composables/useAssets/index.d.ts.map +1 -1
- package/dist/core/composables/useAsync/index.d.ts.map +1 -1
- package/dist/core/composables/useBladeRegistry/index.d.ts.map +1 -1
- package/dist/core/composables/useBreadcrumbs/index.d.ts.map +1 -1
- package/dist/core/composables/useErrorHandler/index.d.ts.map +1 -1
- package/dist/core/composables/useFunctions/debounce.d.ts.map +1 -1
- package/dist/core/composables/useFunctions/delay.d.ts.map +1 -1
- package/dist/core/composables/useFunctions/index.d.ts.map +1 -1
- package/dist/core/composables/useFunctions/once.d.ts.map +1 -1
- package/dist/core/composables/useFunctions/sleep.d.ts.map +1 -1
- package/dist/core/composables/useFunctions/throttle.d.ts.map +1 -1
- package/dist/core/composables/useGlobalSearch/index.d.ts.map +1 -1
- package/dist/core/composables/useMenuService/index.d.ts +2 -2
- package/dist/core/composables/useMenuService/index.d.ts.map +1 -1
- package/dist/core/composables/useNotifications/index.d.ts.map +1 -1
- package/dist/core/composables/useTheme/index.d.ts.map +1 -1
- package/dist/core/composables/useUser/index.d.ts +0 -8
- package/dist/core/composables/useUser/index.d.ts.map +1 -1
- package/dist/core/composables/useWidgets/index.d.ts.map +1 -1
- package/dist/core/constants/index.d.ts +0 -2
- package/dist/core/constants/index.d.ts.map +1 -1
- package/dist/core/interceptors/index.d.ts.map +1 -1
- package/dist/core/plugins/modularity/index.d.ts.map +1 -1
- package/dist/core/plugins/modularity/loader.d.ts.map +1 -1
- package/dist/core/plugins/signalR/index.d.ts.map +1 -1
- package/dist/core/services/app-bar-menu-service.d.ts.map +1 -1
- package/dist/core/services/dashboard-service.d.ts.map +1 -1
- package/dist/core/services/global-search-service.d.ts +10 -0
- package/dist/core/services/global-search-service.d.ts.map +1 -0
- package/dist/core/services/menu-service.d.ts +24 -1
- package/dist/core/services/menu-service.d.ts.map +1 -1
- package/dist/core/services/settings-menu-service.d.ts.map +1 -1
- package/dist/core/services/toolbar-service.d.ts.map +1 -1
- package/dist/core/services/widget-service.d.ts.map +1 -1
- package/dist/core/types/index.d.ts +34 -0
- package/dist/core/types/index.d.ts.map +1 -1
- package/dist/core/utilities/index.d.ts +0 -2
- package/dist/core/utilities/index.d.ts.map +1 -1
- package/dist/framework.js +8664 -9720
- package/dist/index.css +1 -1
- package/dist/index.d.ts +0 -19
- package/dist/index.d.ts.map +1 -1
- package/dist/injection-keys.d.ts +6 -21
- package/dist/injection-keys.d.ts.map +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.map +1 -1
- package/dist/shared/components/blade-navigation/composables/useBladeNavigation/internal/bladeActions.d.ts.map +1 -1
- package/dist/shared/components/blade-navigation/composables/useBladeNavigation/internal/bladeRouteResolver.d.ts.map +1 -1
- package/dist/shared/components/blade-navigation/composables/useBladeNavigation/internal/routerUtils.d.ts.map +1 -1
- package/dist/shared/components/draggable-dashboard/composables/useDashboardDragAndDrop.d.ts.map +1 -1
- package/dist/shared/components/draggable-dashboard/composables/useLayoutPersistence.d.ts.map +1 -1
- package/dist/shared/components/notifications/composables/useContainer/index.d.ts.map +1 -1
- package/dist/shared/components/notifications/composables/useInstance/index.d.ts.map +1 -1
- package/dist/shared/components/notifications/core/notification.d.ts.map +1 -1
- package/dist/shared/components/popup-handler/components/vc-popup-container/vc-popup-container.vue.d.ts.map +1 -1
- package/dist/shared/components/sign-in/useExternalProvider.d.ts.map +1 -1
- package/dist/shared/composables/useExternalWidgets.d.ts.map +1 -1
- package/dist/shared/composables/useMenuExpanded.d.ts.map +1 -1
- package/dist/shared/composables/useTableSelection.d.ts.map +1 -1
- package/dist/shared/composables/useTableSort.d.ts.map +1 -1
- package/dist/shared/modules/assets-manager/components/assets-manager/assets-manager.vue.d.ts.map +1 -1
- package/dist/shared/pages/LoginPage/components/login/Login.vue.d.ts.map +1 -1
- package/dist/shared/utilities/colorUtils.d.ts +6 -0
- package/dist/shared/utilities/colorUtils.d.ts.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/ui/components/atoms/vc-badge/vc-badge.vue.d.ts +3 -0
- package/dist/ui/components/atoms/vc-badge/vc-badge.vue.d.ts.map +1 -1
- package/dist/ui/components/atoms/vc-banner/vc-banner.vue.d.ts.map +1 -1
- package/dist/ui/components/atoms/vc-button/vc-button.vue.d.ts +15 -0
- package/dist/ui/components/atoms/vc-button/vc-button.vue.d.ts.map +1 -1
- package/dist/ui/components/atoms/vc-container/vc-container.vue.d.ts.map +1 -1
- package/dist/ui/components/atoms/vc-icon/vc-icon.vue.d.ts.map +1 -1
- package/dist/ui/components/atoms/vc-icon/vc-lucide-icon.vue.d.ts.map +1 -1
- package/dist/ui/components/atoms/vc-image/vc-image.vue.d.ts.map +1 -1
- package/dist/ui/components/atoms/vc-link/vc-link.vue.d.ts.map +1 -1
- package/dist/ui/components/atoms/vc-loading/vc-loading.vue.d.ts.map +1 -1
- package/dist/ui/components/atoms/vc-status/vc-status.vue.d.ts +5 -0
- package/dist/ui/components/atoms/vc-status/vc-status.vue.d.ts.map +1 -1
- package/dist/ui/components/atoms/vc-tooltip/vc-tooltip.vue.d.ts.map +1 -1
- package/dist/ui/components/atoms/vc-video/vc-video.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-breadcrumbs/vc-breadcrumbs.vue.d.ts.map +1 -1
- package/dist/ui/components/molecules/vc-input/vc-input.vue.d.ts.map +1 -1
- package/dist/ui/components/molecules/vc-pagination/vc-pagination.vue.d.ts.map +1 -1
- package/dist/ui/components/molecules/vc-toast/vc-toast.vue.d.ts.map +1 -1
- package/dist/ui/components/organisms/vc-app/_internal/vc-app-menu/_internal/vc-app-menu-item/_internal/useBadge.d.ts +18 -0
- package/dist/ui/components/organisms/vc-app/_internal/vc-app-menu/_internal/vc-app-menu-item/_internal/useBadge.d.ts.map +1 -0
- package/dist/ui/components/organisms/vc-app/_internal/vc-app-menu/_internal/vc-app-menu-item/_internal/vc-app-menu-link.vue.d.ts +4 -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-app/_internal/vc-app-menu/_internal/vc-app-menu-item/vc-app-menu-item.vue.d.ts +4 -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/_internal/vc-app-menu/vc-app-menu.vue.d.ts.map +1 -1
- 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-buttons/_internal/vc-blade-toolbar-button/vc-blade-toolbar-button.vue.d.ts.map +1 -1
- package/dist/ui/components/organisms/vc-blade/vc-blade.vue.d.ts.map +1 -1
- package/dist/ui/components/organisms/vc-login-form/vc-login-form.vue.d.ts.map +1 -1
- package/dist/ui/components/organisms/vc-table/_internal/vc-table-cell/vc-table-cell.vue.d.ts.map +1 -1
- package/dist/ui/components/organisms/vc-table/composables/useTableActions.d.ts.map +1 -1
- package/dist/ui/components/organisms/vc-table/composables/useTableColumnResize.d.ts.map +1 -1
- package/dist/ui/components/organisms/vc-table/composables/useTableRowReorder.d.ts.map +1 -1
- package/dist/ui/components/organisms/vc-table/composables/useTableSelection.d.ts.map +1 -1
- package/dist/ui/components/organisms/vc-table/composables/useTableState.d.ts.map +1 -1
- package/dist/{vendor-lodash-es-SgOIjJF8.js → vendor-lodash-es-BqkGj3Jl.js} +0 -2
- package/package.json +5 -5
- package/shared/components/app-switcher/composables/useAppSwitcher/index.ts +1 -4
- package/shared/components/blade-navigation/components/vc-blade-navigation/vc-blade-navigation.vue +4 -67
- package/shared/components/blade-navigation/composables/useBladeNavigation/index.ts +10 -13
- package/shared/components/blade-navigation/composables/useBladeNavigation/internal/bladeActions.ts +4 -7
- package/shared/components/blade-navigation/composables/useBladeNavigation/internal/bladeRouteResolver.ts +1 -4
- package/shared/components/blade-navigation/composables/useBladeNavigation/internal/routerUtils.ts +1 -4
- package/shared/components/change-password/change-password.vue +1 -1
- package/shared/components/draggable-dashboard/composables/useDashboardDragAndDrop.ts +5 -14
- package/shared/components/draggable-dashboard/composables/useLayoutPersistence.ts +2 -5
- package/shared/components/index.ts +0 -2
- package/shared/components/notifications/composables/useContainer/index.ts +6 -8
- package/shared/components/notifications/composables/useInstance/index.ts +1 -4
- package/shared/components/notifications/core/notification.ts +7 -10
- package/shared/components/popup-handler/components/vc-popup-container/vc-popup-container.vue +1 -20
- package/shared/components/sign-in/useExternalProvider.ts +4 -6
- package/shared/composables/useExternalWidgets.ts +4 -7
- package/shared/composables/useMenuExpanded.ts +1 -15
- package/shared/composables/useTableSelection.ts +0 -6
- package/shared/composables/useTableSort.ts +4 -4
- package/shared/modules/assets-manager/components/assets-manager/assets-manager.vue +3 -6
- package/shared/pages/LoginPage/components/login/Login.vue +1 -4
- package/shared/utilities/colorUtils.ts +12 -5
- package/ui/components/atoms/vc-badge/vc-badge.vue +59 -0
- package/ui/components/atoms/vc-banner/vc-banner.vue +1 -4
- package/ui/components/atoms/vc-button/vc-button.vue +25 -2
- package/ui/components/atoms/vc-container/vc-container.vue +3 -12
- package/ui/components/atoms/vc-icon/vc-icon.vue +10 -0
- package/ui/components/atoms/vc-icon/vc-lucide-icon.vue +2 -5
- package/ui/components/atoms/vc-image/vc-image.vue +1 -4
- package/ui/components/atoms/vc-link/vc-link.vue +54 -59
- package/ui/components/atoms/vc-loading/vc-loading.vue +0 -4
- package/ui/components/atoms/vc-status/vc-status.vue +5 -0
- package/ui/components/atoms/vc-status-icon/vc-status-icon.vue +4 -4
- package/ui/components/atoms/vc-tooltip/vc-tooltip.vue +1 -8
- package/ui/components/atoms/vc-video/vc-video.vue +2 -4
- package/ui/components/atoms/vc-widget/vc-widget.vue +1 -4
- package/ui/components/molecules/vc-breadcrumbs/vc-breadcrumbs.vue +2 -7
- package/ui/components/molecules/vc-input/vc-input.vue +1 -0
- package/ui/components/molecules/vc-pagination/vc-pagination.vue +1 -6
- package/ui/components/molecules/vc-rating/vc-rating.vue +1 -1
- package/ui/components/molecules/vc-textarea/vc-textarea.vue +1 -1
- package/ui/components/molecules/vc-toast/vc-toast.vue +1 -11
- package/ui/components/organisms/vc-app/_internal/vc-app-menu/_internal/vc-app-menu-item/_internal/useBadge.ts +80 -0
- package/ui/components/organisms/vc-app/_internal/vc-app-menu/_internal/vc-app-menu-item/_internal/vc-app-menu-link.vue +53 -10
- package/ui/components/organisms/vc-app/_internal/vc-app-menu/_internal/vc-app-menu-item/vc-app-menu-item.vue +10 -1
- package/ui/components/organisms/vc-app/_internal/vc-app-menu/vc-app-menu.vue +3 -0
- package/ui/components/organisms/vc-app/vc-app.vue +3 -22
- package/ui/components/organisms/vc-blade/_internal/vc-blade-toolbar/_internal/vc-blade-toolbar-buttons/_internal/vc-blade-toolbar-button/vc-blade-toolbar-button.vue +1 -4
- package/ui/components/organisms/vc-blade/_internal/vc-blade-toolbar/vc-blade-toolbar.vue +14 -14
- package/ui/components/organisms/vc-blade/vc-blade.vue +1 -3
- package/ui/components/organisms/vc-login-form/vc-login-form.vue +1 -3
- package/ui/components/organisms/vc-table/_internal/vc-table-cell/vc-table-cell.vue +2 -34
- package/ui/components/organisms/vc-table/composables/useTableActions.ts +10 -7
- package/ui/components/organisms/vc-table/composables/useTableColumnResize.ts +1 -4
- package/ui/components/organisms/vc-table/composables/useTableRowReorder.ts +2 -5
- package/ui/components/organisms/vc-table/composables/useTableSelection.ts +18 -26
- package/ui/components/organisms/vc-table/composables/useTableState.ts +1 -4
- package/core/constants/defaults.ts +0 -76
- package/core/constants/ui.ts +0 -68
- package/core/plugins/ai-agent/README.md +0 -336
- package/core/plugins/ai-agent/components/VcAiAgentPanel.vue +0 -125
- package/core/plugins/ai-agent/components/_internal/VcAiAgentHeader.vue +0 -182
- package/core/plugins/ai-agent/components/_internal/VcAiAgentIframe.vue +0 -77
- package/core/plugins/ai-agent/components/index.ts +0 -1
- package/core/plugins/ai-agent/composables/index.ts +0 -4
- package/core/plugins/ai-agent/composables/useAiAgent.ts +0 -231
- package/core/plugins/ai-agent/composables/useAiAgentContext.ts +0 -280
- package/core/plugins/ai-agent/constants.ts +0 -89
- package/core/plugins/ai-agent/index.ts +0 -91
- package/core/plugins/ai-agent/services/ai-agent-service.ts +0 -598
- package/core/plugins/ai-agent/types.ts +0 -310
- package/core/types/services.ts +0 -194
- package/core/utilities/errorTypes.ts +0 -126
- package/core/utilities/logger.ts +0 -120
- package/dist/core/constants/defaults.d.ts +0 -63
- package/dist/core/constants/defaults.d.ts.map +0 -1
- package/dist/core/constants/ui.d.ts +0 -50
- package/dist/core/constants/ui.d.ts.map +0 -1
- package/dist/core/plugins/ai-agent/components/VcAiAgentPanel.vue.d.ts +0 -3
- package/dist/core/plugins/ai-agent/components/VcAiAgentPanel.vue.d.ts.map +0 -1
- package/dist/core/plugins/ai-agent/components/_internal/VcAiAgentHeader.vue.d.ts +0 -15
- package/dist/core/plugins/ai-agent/components/_internal/VcAiAgentHeader.vue.d.ts.map +0 -1
- package/dist/core/plugins/ai-agent/components/_internal/VcAiAgentIframe.vue.d.ts +0 -10
- package/dist/core/plugins/ai-agent/components/_internal/VcAiAgentIframe.vue.d.ts.map +0 -1
- package/dist/core/plugins/ai-agent/components/index.d.ts +0 -2
- package/dist/core/plugins/ai-agent/components/index.d.ts.map +0 -1
- package/dist/core/plugins/ai-agent/composables/index.d.ts +0 -4
- package/dist/core/plugins/ai-agent/composables/index.d.ts.map +0 -1
- package/dist/core/plugins/ai-agent/composables/useAiAgent.d.ts +0 -95
- package/dist/core/plugins/ai-agent/composables/useAiAgent.d.ts.map +0 -1
- package/dist/core/plugins/ai-agent/composables/useAiAgentContext.d.ts +0 -55
- package/dist/core/plugins/ai-agent/composables/useAiAgentContext.d.ts.map +0 -1
- package/dist/core/plugins/ai-agent/constants.d.ts +0 -47
- package/dist/core/plugins/ai-agent/constants.d.ts.map +0 -1
- package/dist/core/plugins/ai-agent/index.d.ts +0 -48
- package/dist/core/plugins/ai-agent/index.d.ts.map +0 -1
- package/dist/core/plugins/ai-agent/services/ai-agent-service.d.ts +0 -45
- package/dist/core/plugins/ai-agent/services/ai-agent-service.d.ts.map +0 -1
- package/dist/core/plugins/ai-agent/types.d.ts +0 -258
- package/dist/core/plugins/ai-agent/types.d.ts.map +0 -1
- package/dist/core/types/services.d.ts +0 -169
- package/dist/core/types/services.d.ts.map +0 -1
- package/dist/core/utilities/errorTypes.d.ts +0 -61
- package/dist/core/utilities/errorTypes.d.ts.map +0 -1
- package/dist/core/utilities/logger.d.ts +0 -259
- package/dist/core/utilities/logger.d.ts.map +0 -1
|
@@ -1,5 +1,34 @@
|
|
|
1
1
|
<template>
|
|
2
|
+
<!-- Inline mode: render badge element directly without wrapper -->
|
|
2
3
|
<div
|
|
4
|
+
v-if="inline && (typeof content !== 'undefined' || isDot)"
|
|
5
|
+
ref="badge"
|
|
6
|
+
class="vc-badge__badge vc-badge__badge--inline"
|
|
7
|
+
:class="[
|
|
8
|
+
`vc-badge__badge--${variant}`,
|
|
9
|
+
{
|
|
10
|
+
'vc-badge__badge--active': active,
|
|
11
|
+
'vc-badge__badge--clickable': clickable,
|
|
12
|
+
'vc-badge__badge--disabled': disabled,
|
|
13
|
+
'vc-badge__badge--content-long': String(content).length > 1,
|
|
14
|
+
'vc-badge__badge--content-very-long': String(content).length > 2,
|
|
15
|
+
'vc-badge__badge--dot': isDot,
|
|
16
|
+
'vc-badge__badge--inline-small': size === 's',
|
|
17
|
+
'vc-badge__badge--inline-medium': size === 'm',
|
|
18
|
+
},
|
|
19
|
+
]"
|
|
20
|
+
@click="onClick"
|
|
21
|
+
>
|
|
22
|
+
<span
|
|
23
|
+
v-if="!isDot"
|
|
24
|
+
class="vc-badge__text"
|
|
25
|
+
>{{ content }}</span
|
|
26
|
+
>
|
|
27
|
+
</div>
|
|
28
|
+
|
|
29
|
+
<!-- Standard mode: wrapper with slot and positioned badge -->
|
|
30
|
+
<div
|
|
31
|
+
v-else
|
|
3
32
|
ref="badgeContainer"
|
|
4
33
|
class="vc-badge"
|
|
5
34
|
:class="{
|
|
@@ -53,6 +82,8 @@ export interface Props {
|
|
|
53
82
|
customPosition?: boolean;
|
|
54
83
|
top?: string;
|
|
55
84
|
right?: string;
|
|
85
|
+
/** When true, renders badge as inline element without absolute positioning (no slot content) */
|
|
86
|
+
inline?: boolean;
|
|
56
87
|
}
|
|
57
88
|
|
|
58
89
|
export interface Emits {
|
|
@@ -66,6 +97,7 @@ const props = withDefaults(defineProps<Props>(), {
|
|
|
66
97
|
customPosition: false,
|
|
67
98
|
top: undefined,
|
|
68
99
|
right: undefined,
|
|
100
|
+
inline: false,
|
|
69
101
|
});
|
|
70
102
|
|
|
71
103
|
const emit = defineEmits<Emits>();
|
|
@@ -236,4 +268,31 @@ $sizes: small, medium;
|
|
|
236
268
|
.vc-badge__badge--disabled {
|
|
237
269
|
@apply tw-cursor-not-allowed tw-bg-[color:var(--badge-background-color-disabled)] tw-text-[color:var(--badge-text-color-disabled)] tw-border-[color:var(--badge-border-color-disabled)] hover:tw-bg-[color:var(--badge-background-color-disabled)] hover:tw-text-[color:var(--badge-text-color-disabled)] hover:tw-border-[color:var(--badge-border-color-disabled)];
|
|
238
270
|
}
|
|
271
|
+
|
|
272
|
+
// Inline mode - relative positioning, no wrapper
|
|
273
|
+
.vc-badge__badge--inline {
|
|
274
|
+
@apply tw-relative tw-top-0 tw-right-0;
|
|
275
|
+
}
|
|
276
|
+
|
|
277
|
+
.vc-badge__badge--inline-small {
|
|
278
|
+
height: var(--badge-size-small);
|
|
279
|
+
min-width: var(--badge-size-small);
|
|
280
|
+
|
|
281
|
+
&.vc-badge__badge--dot {
|
|
282
|
+
height: var(--badge-dot-size-small);
|
|
283
|
+
min-width: var(--badge-dot-size-small);
|
|
284
|
+
width: var(--badge-dot-size-small);
|
|
285
|
+
}
|
|
286
|
+
}
|
|
287
|
+
|
|
288
|
+
.vc-badge__badge--inline-medium {
|
|
289
|
+
height: var(--badge-size-medium);
|
|
290
|
+
min-width: var(--badge-size-medium);
|
|
291
|
+
|
|
292
|
+
&.vc-badge__badge--dot {
|
|
293
|
+
height: var(--badge-dot-size-medium);
|
|
294
|
+
min-width: var(--badge-dot-size-medium);
|
|
295
|
+
width: var(--badge-dot-size-medium);
|
|
296
|
+
}
|
|
297
|
+
}
|
|
239
298
|
</style>
|
|
@@ -73,9 +73,6 @@ const props = withDefaults(defineProps<Props>(), {
|
|
|
73
73
|
iconSize: "xxl",
|
|
74
74
|
});
|
|
75
75
|
|
|
76
|
-
/** Maximum height in pixels before content is collapsed */
|
|
77
|
-
const COLLAPSED_MAX_HEIGHT = 100;
|
|
78
|
-
|
|
79
76
|
const contentRef = ref<HTMLDivElement>();
|
|
80
77
|
const isExpanded = ref(false);
|
|
81
78
|
const hasOverflow = ref(false);
|
|
@@ -86,7 +83,7 @@ const toggle = () => {
|
|
|
86
83
|
|
|
87
84
|
const checkOverflow = () => {
|
|
88
85
|
if (contentRef.value) {
|
|
89
|
-
hasOverflow.value = contentRef.value.scrollHeight >
|
|
86
|
+
hasOverflow.value = contentRef.value.scrollHeight > 100;
|
|
90
87
|
}
|
|
91
88
|
};
|
|
92
89
|
|
|
@@ -29,8 +29,23 @@ export interface Props {
|
|
|
29
29
|
variant?: "primary" | "secondary";
|
|
30
30
|
disabled?: boolean;
|
|
31
31
|
size?: "xs" | "sm" | "base";
|
|
32
|
+
/**
|
|
33
|
+
* @deprecated Use `size` instead
|
|
34
|
+
* Whether the button is small
|
|
35
|
+
* */
|
|
36
|
+
small?: boolean;
|
|
37
|
+
/**
|
|
38
|
+
* @deprecated Use `variant` instead
|
|
39
|
+
* Whether the button is outlined
|
|
40
|
+
* */
|
|
41
|
+
outline?: boolean;
|
|
32
42
|
selected?: boolean;
|
|
33
43
|
text?: boolean;
|
|
44
|
+
/**
|
|
45
|
+
* @deprecated Use `variant` instead
|
|
46
|
+
* Whether the button is raised
|
|
47
|
+
* */
|
|
48
|
+
raised?: boolean;
|
|
34
49
|
}
|
|
35
50
|
|
|
36
51
|
export interface Emits {
|
|
@@ -58,9 +73,12 @@ const buttonClass = computed(() => {
|
|
|
58
73
|
{
|
|
59
74
|
[`vc-button-${props.variant}`]: props.variant,
|
|
60
75
|
[`vc-button_${props.size}`]: props.size,
|
|
76
|
+
// "vc-button_small": props.small,
|
|
77
|
+
// "vc-button_outline": props.outline,
|
|
61
78
|
"vc-button_selected": props.selected,
|
|
62
79
|
"vc-button_text": props.text,
|
|
63
80
|
"vc-button_disabled": props.disabled,
|
|
81
|
+
// "vc-button_raised": props.raised,
|
|
64
82
|
},
|
|
65
83
|
];
|
|
66
84
|
});
|
|
@@ -138,12 +156,17 @@ $variants: primary, secondary;
|
|
|
138
156
|
@apply tw-text-[color:var(--button-#{$variant}-text-color-disabled)] tw-bg-[color:var(--button-#{$variant}-background-color-disabled)] tw-border-[color:var(--button-#{$variant}-border-color-disabled)] tw-cursor-not-allowed;
|
|
139
157
|
}
|
|
140
158
|
|
|
159
|
+
// TODO: remove this after the migration
|
|
160
|
+
// &.vc-button_small {
|
|
161
|
+
// @apply tw-py-[var(--button-padding-vert-extra-small)] tw-min-h-[var(--button-height-extra-small)] tw-px-[var(--button-padding-hor-extra-small)] tw-text-xxs #{!important};
|
|
162
|
+
// }
|
|
163
|
+
|
|
141
164
|
&.vc-button_text {
|
|
142
165
|
@apply tw-border-none tw-bg-transparent
|
|
143
166
|
tw-text-[color:var(--button-#{$variant}-background-color)]
|
|
144
167
|
hover:tw-text-[color:var(--button-#{$variant}-background-color-hover)]
|
|
145
168
|
focus:tw-text-[color:var(--button-#{$variant}-background-color-hover)]
|
|
146
|
-
disabled:tw-text-[color:
|
|
169
|
+
disabled:tw-text-[color:rgb(from_var(--button-#{$variant}-background-color)_r_g_b/50%)];
|
|
147
170
|
|
|
148
171
|
@apply tw-p-0 tw-min-h-0 #{!important};
|
|
149
172
|
}
|
|
@@ -152,7 +175,7 @@ $variants: primary, secondary;
|
|
|
152
175
|
@apply tw-bg-[color:var(--button-#{$variant}-background-color-hover)];
|
|
153
176
|
|
|
154
177
|
&.vc-button_text {
|
|
155
|
-
@apply tw-bg-[color:
|
|
178
|
+
@apply tw-bg-[color:rgb(from_var(--button-#{$variant}-background-color-hover)_r_g_b/7%)] tw-p-1;
|
|
156
179
|
}
|
|
157
180
|
}
|
|
158
181
|
|
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
</template>
|
|
43
43
|
|
|
44
44
|
<script lang="ts" setup>
|
|
45
|
-
import { ref, onMounted,
|
|
45
|
+
import { ref, onMounted, computed, shallowRef, watch, inject, Ref } from "vue";
|
|
46
46
|
import { VcIcon } from "./../vc-icon";
|
|
47
47
|
|
|
48
48
|
export interface Props {
|
|
@@ -70,8 +70,6 @@ const goingUp = shallowRef(false);
|
|
|
70
70
|
const touching = shallowRef(false);
|
|
71
71
|
const isMobile = inject("isMobile") as Ref<boolean>;
|
|
72
72
|
|
|
73
|
-
let resizeObserver: ResizeObserver | null = null;
|
|
74
|
-
|
|
75
73
|
const topOffset = computed(() => Math.max(0, Math.min(pullDist.value, touchDiff.value)));
|
|
76
74
|
const canRefresh = computed(() => touchDiff.value >= pullDist.value && !refreshing.value);
|
|
77
75
|
|
|
@@ -118,19 +116,12 @@ function onScroll(e: Event) {
|
|
|
118
116
|
}
|
|
119
117
|
|
|
120
118
|
onMounted(() => {
|
|
121
|
-
|
|
119
|
+
const observer = new ResizeObserver(() => {
|
|
122
120
|
scroll.value = (component.value && component.value.clientHeight < component.value.scrollHeight) as boolean;
|
|
123
121
|
});
|
|
124
122
|
|
|
125
123
|
if (component.value) {
|
|
126
|
-
|
|
127
|
-
}
|
|
128
|
-
});
|
|
129
|
-
|
|
130
|
-
onBeforeUnmount(() => {
|
|
131
|
-
if (resizeObserver) {
|
|
132
|
-
resizeObserver.disconnect();
|
|
133
|
-
resizeObserver = null;
|
|
124
|
+
observer.observe(component.value);
|
|
134
125
|
}
|
|
135
126
|
});
|
|
136
127
|
|
|
@@ -110,6 +110,16 @@ const sizeMap = {
|
|
|
110
110
|
xxxl: 64,
|
|
111
111
|
} as const;
|
|
112
112
|
|
|
113
|
+
// Scaling factors for different icon types to make them visually equal
|
|
114
|
+
const scalingFactors = {
|
|
115
|
+
fontawesome: 1, // base reference
|
|
116
|
+
material: 1.1,
|
|
117
|
+
bootstrap: 0.95,
|
|
118
|
+
lucide: 1.2,
|
|
119
|
+
custom: 1,
|
|
120
|
+
svg: 1,
|
|
121
|
+
};
|
|
122
|
+
|
|
113
123
|
// Function to detect icon type if not explicitly specified
|
|
114
124
|
const detectIconType = computed((): IconType => {
|
|
115
125
|
if (typeof props.icon !== "string") {
|
|
@@ -23,9 +23,6 @@ import { computed, markRaw, onMounted, ref } from "vue";
|
|
|
23
23
|
import type { IconSize, IconVariant } from "./types";
|
|
24
24
|
import type { Component } from "vue";
|
|
25
25
|
import { useIcon } from "./composables";
|
|
26
|
-
import { createLogger } from "../../../../core/utilities";
|
|
27
|
-
|
|
28
|
-
const logger = createLogger("vc-lucide-icon");
|
|
29
26
|
|
|
30
27
|
interface Props {
|
|
31
28
|
/**
|
|
@@ -128,10 +125,10 @@ onMounted(async () => {
|
|
|
128
125
|
if (module && typeof module === "object" && iconName in module) {
|
|
129
126
|
resolvedIconComponent.value = markRaw(module[iconName as keyof typeof module] as Component);
|
|
130
127
|
} else {
|
|
131
|
-
|
|
128
|
+
console.warn(`Lucide icon not found: ${iconName}`);
|
|
132
129
|
}
|
|
133
130
|
} catch (error) {
|
|
134
|
-
|
|
131
|
+
console.error(`Error loading Lucide icon: ${normalizedIconName.value}`, error);
|
|
135
132
|
}
|
|
136
133
|
});
|
|
137
134
|
</script>
|
|
@@ -32,9 +32,6 @@
|
|
|
32
32
|
<script lang="ts" setup>
|
|
33
33
|
import { VcIcon } from "./../vc-icon";
|
|
34
34
|
import { computed } from "vue";
|
|
35
|
-
import { createLogger } from "../../../../core/utilities";
|
|
36
|
-
|
|
37
|
-
const logger = createLogger("vc-image");
|
|
38
35
|
|
|
39
36
|
export interface Props {
|
|
40
37
|
aspect?: "1x1" | "16x9" | "4x3" | "3x2";
|
|
@@ -70,7 +67,7 @@ function ensureHttps(url: string): string {
|
|
|
70
67
|
return urlObject.href;
|
|
71
68
|
}
|
|
72
69
|
} catch (e) {
|
|
73
|
-
|
|
70
|
+
console.warn("Invalid URL:", url);
|
|
74
71
|
}
|
|
75
72
|
return url;
|
|
76
73
|
}
|
|
@@ -1,59 +1,54 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<
|
|
3
|
-
|
|
4
|
-
class="
|
|
5
|
-
|
|
6
|
-
'vc-link--
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
:
|
|
40
|
-
--link-text-color: var(--
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
&--disabled {
|
|
56
|
-
@apply tw-cursor-not-allowed tw-text-[color:var(--link-text-color-disabled)] tw-no-underline hover:tw-text-[color:var(--link-text-color-disabled)] hover:tw-no-underline;
|
|
57
|
-
}
|
|
58
|
-
}
|
|
59
|
-
</style>
|
|
1
|
+
<template>
|
|
2
|
+
<div
|
|
3
|
+
class="vc-link"
|
|
4
|
+
:class="{
|
|
5
|
+
'vc-link--active': active,
|
|
6
|
+
'vc-link--disabled': disabled,
|
|
7
|
+
}"
|
|
8
|
+
@click="onClickFn"
|
|
9
|
+
>
|
|
10
|
+
<slot></slot>
|
|
11
|
+
</div>
|
|
12
|
+
</template>
|
|
13
|
+
|
|
14
|
+
<script lang="ts" setup>
|
|
15
|
+
export interface Props {
|
|
16
|
+
active?: boolean;
|
|
17
|
+
disabled?: boolean;
|
|
18
|
+
onClick?: () => void;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
export interface Emits {
|
|
22
|
+
(event: "click"): void;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
const props = defineProps<Props>();
|
|
26
|
+
const emit = defineEmits<Emits>();
|
|
27
|
+
|
|
28
|
+
function onClickFn(): void {
|
|
29
|
+
if (!props.disabled) {
|
|
30
|
+
emit("click");
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
</script>
|
|
34
|
+
|
|
35
|
+
<style lang="scss">
|
|
36
|
+
:root {
|
|
37
|
+
--link-text-color: var(--primary-500);
|
|
38
|
+
--link-text-color-hover: var(--primary-400);
|
|
39
|
+
--link-text-color-active: var(--primary-700);
|
|
40
|
+
--link-text-color-disabled: var(--neutrals-300);
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
.vc-link {
|
|
44
|
+
@apply tw-text-[color:var(--link-text-color)] tw-no-underline tw-cursor-pointer tw-transition tw-duration-200 tw-inline-block hover:tw-text-[color:var(--link-text-color-hover)] hover:tw-underline;
|
|
45
|
+
|
|
46
|
+
&--active {
|
|
47
|
+
@apply tw-text-[color:var(--link-text-color-active)] tw-no-underline hover:tw-text-[color:var(--link-text-color-active)] hover:tw-no-underline;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
&--disabled {
|
|
51
|
+
@apply tw-cursor-not-allowed tw-text-[color:var(--link-text-color-disabled)] tw-no-underline hover:tw-text-[color:var(--link-text-color-disabled)] hover:tw-no-underline;
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
</style>
|
|
@@ -4,9 +4,6 @@
|
|
|
4
4
|
:class="{
|
|
5
5
|
'vc-loading-overlay--active': active,
|
|
6
6
|
}"
|
|
7
|
-
role="status"
|
|
8
|
-
:aria-busy="active"
|
|
9
|
-
aria-live="polite"
|
|
10
7
|
>
|
|
11
8
|
<div class="vc-loading-overlay__content">
|
|
12
9
|
<span class="vc-loading-overlay__main-marker"></span>
|
|
@@ -17,7 +14,6 @@
|
|
|
17
14
|
class="vc-loading-overlay__marker"
|
|
18
15
|
></span>
|
|
19
16
|
</div>
|
|
20
|
-
<span class="tw-sr-only">{{ active ? 'Loading...' : '' }}</span>
|
|
21
17
|
</div>
|
|
22
18
|
</div>
|
|
23
19
|
</template>
|
|
@@ -18,12 +18,17 @@
|
|
|
18
18
|
<script lang="ts" setup>
|
|
19
19
|
export interface Props {
|
|
20
20
|
variant?: "info" | "warning" | "danger" | "success" | "light-danger" | "info-dark" | "primary";
|
|
21
|
+
/**
|
|
22
|
+
* @deprecated
|
|
23
|
+
*/
|
|
24
|
+
outline?: boolean;
|
|
21
25
|
extend?: boolean;
|
|
22
26
|
dot?: boolean;
|
|
23
27
|
}
|
|
24
28
|
|
|
25
29
|
withDefaults(defineProps<Props>(), {
|
|
26
30
|
variant: "info",
|
|
31
|
+
outline: false,
|
|
27
32
|
dot: false,
|
|
28
33
|
});
|
|
29
34
|
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
<template v-else>
|
|
10
10
|
<VcIcon
|
|
11
11
|
icon="material-cancel"
|
|
12
|
-
class="vc-status-icon__icon vc-status-icon__icon--
|
|
12
|
+
class="vc-status-icon__icon vc-status-icon__icon--info"
|
|
13
13
|
></VcIcon>
|
|
14
14
|
</template>
|
|
15
15
|
</div>
|
|
@@ -27,7 +27,7 @@ defineProps<Props>();
|
|
|
27
27
|
<style lang="scss">
|
|
28
28
|
:root {
|
|
29
29
|
--status-success-main-color: var(--success-400);
|
|
30
|
-
--status-
|
|
30
|
+
--status-info-main-color: var(--info-300);
|
|
31
31
|
}
|
|
32
32
|
|
|
33
33
|
.vc-status-icon {
|
|
@@ -35,8 +35,8 @@ defineProps<Props>();
|
|
|
35
35
|
@apply tw-text-[color:var(--status-success-main-color)];
|
|
36
36
|
}
|
|
37
37
|
|
|
38
|
-
&__icon--
|
|
39
|
-
@apply tw-text-[color:var(--status-
|
|
38
|
+
&__icon--info {
|
|
39
|
+
@apply tw-text-[color:var(--status-info-main-color)];
|
|
40
40
|
}
|
|
41
41
|
}
|
|
42
42
|
</style>
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
<!-- eslint-disable @typescript-eslint/no-explicit-any -->
|
|
28
28
|
<script lang="ts" setup>
|
|
29
29
|
import { useFloating, shift, Placement, offset as floatingOffset } from "@floating-ui/vue";
|
|
30
|
-
import { getCurrentInstance, ref, computed
|
|
30
|
+
import { getCurrentInstance, ref, computed } from "vue";
|
|
31
31
|
|
|
32
32
|
export interface Props {
|
|
33
33
|
placement?: "top" | "right" | "bottom" | "left" | "top-start" | "top-end" | "bottom-start" | "bottom-end" | "right-start" | "right-end" | "left-start" | "left-end";
|
|
@@ -83,13 +83,6 @@ const hideTooltip = () => {
|
|
|
83
83
|
}
|
|
84
84
|
tooltipVisible.value = false;
|
|
85
85
|
};
|
|
86
|
-
|
|
87
|
-
onBeforeUnmount(() => {
|
|
88
|
-
if (showTimeout) {
|
|
89
|
-
clearTimeout(showTimeout);
|
|
90
|
-
showTimeout = null;
|
|
91
|
-
}
|
|
92
|
-
});
|
|
93
86
|
</script>
|
|
94
87
|
|
|
95
88
|
<style lang="scss">
|
|
@@ -16,14 +16,12 @@
|
|
|
16
16
|
<div class="vc-video__container">
|
|
17
17
|
<div v-if="source">
|
|
18
18
|
<iframe
|
|
19
|
-
:src="source"
|
|
19
|
+
:src="`${source}`"
|
|
20
20
|
width="100%"
|
|
21
21
|
height="300px"
|
|
22
22
|
frameborder="0"
|
|
23
|
-
sandbox="allow-scripts allow-same-origin allow-presentation allow-popups"
|
|
24
23
|
allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture"
|
|
25
|
-
allowfullscreen
|
|
26
|
-
loading="lazy"
|
|
24
|
+
allowfullscreen="false"
|
|
27
25
|
>
|
|
28
26
|
</iframe>
|
|
29
27
|
</div>
|
|
@@ -41,9 +41,6 @@
|
|
|
41
41
|
import { computed, getCurrentInstance, useAttrs } from "vue";
|
|
42
42
|
import { VcIcon } from "./../vc-icon";
|
|
43
43
|
import { useWidgets } from "../../../../core/composables";
|
|
44
|
-
import { createLogger } from "../../../../core/utilities";
|
|
45
|
-
|
|
46
|
-
const logger = createLogger("vc-widget");
|
|
47
44
|
|
|
48
45
|
export interface Props {
|
|
49
46
|
icon?: string;
|
|
@@ -75,7 +72,7 @@ function onClick() {
|
|
|
75
72
|
widgetId: actualWidgetId.value,
|
|
76
73
|
});
|
|
77
74
|
} else if (!actualWidgetId.value) {
|
|
78
|
-
|
|
75
|
+
console.warn("VcWidget: widgetId is missing from attrs. Widget activation might not work as expected.");
|
|
79
76
|
}
|
|
80
77
|
emit("click");
|
|
81
78
|
}
|
|
@@ -102,11 +102,6 @@ defineSlots<{
|
|
|
102
102
|
trigger: (props: { click: () => void; isActive: boolean }) => VNode;
|
|
103
103
|
}>();
|
|
104
104
|
|
|
105
|
-
/** Default width for the "more" button in pixels */
|
|
106
|
-
const MORE_BUTTON_WIDTH = 100;
|
|
107
|
-
/** Default initial item width for calculation in pixels */
|
|
108
|
-
const INITIAL_ITEM_WIDTH = 100;
|
|
109
|
-
|
|
110
105
|
const el = ref<HTMLElement | null>(null);
|
|
111
106
|
const showBreadcrumbs = ref(false);
|
|
112
107
|
|
|
@@ -114,9 +109,9 @@ const { visibleItems, hiddenItems, showMoreButton, recalculate } = useAdaptiveIt
|
|
|
114
109
|
containerRef: el,
|
|
115
110
|
items: toRef(props, "items"),
|
|
116
111
|
getItemKey: (item) => item.id!,
|
|
117
|
-
moreButtonWidth:
|
|
112
|
+
moreButtonWidth: 100,
|
|
118
113
|
calculationStrategy: "reverse",
|
|
119
|
-
initialItemWidth:
|
|
114
|
+
initialItemWidth: 100,
|
|
120
115
|
});
|
|
121
116
|
|
|
122
117
|
function toggleBreadcrumbs() {
|
|
@@ -269,6 +269,7 @@ import VueDatePicker, { VueDatePickerProps, ModelValue } from "@vuepic/vue-datep
|
|
|
269
269
|
import "@vuepic/vue-datepicker/dist/main.css";
|
|
270
270
|
import {
|
|
271
271
|
convertColorNameToHex,
|
|
272
|
+
convertHexToColorName,
|
|
272
273
|
isValidHexColor,
|
|
273
274
|
normalizeHexColor,
|
|
274
275
|
} from "../../../../shared/utilities";
|
|
@@ -79,11 +79,6 @@ const emit = defineEmits<Emits>();
|
|
|
79
79
|
|
|
80
80
|
const isMobile = inject("isMobile") as Ref<boolean>;
|
|
81
81
|
|
|
82
|
-
/** Number of page buttons to show on mobile devices */
|
|
83
|
-
const MAX_PAGES_MOBILE = 3;
|
|
84
|
-
/** Number of page buttons to show on desktop devices */
|
|
85
|
-
const MAX_PAGES_DESKTOP = 5;
|
|
86
|
-
|
|
87
82
|
const { variant } = toRefs(props);
|
|
88
83
|
const localCurrentPage = ref(props.currentPage);
|
|
89
84
|
|
|
@@ -107,7 +102,7 @@ const pagesToShow = computed(() => {
|
|
|
107
102
|
const pages = [];
|
|
108
103
|
const totalPages = props.pages;
|
|
109
104
|
const current = localCurrentPage.value;
|
|
110
|
-
const maxPages = isMobile.value ?
|
|
105
|
+
const maxPages = isMobile.value ? 3 : 5;
|
|
111
106
|
|
|
112
107
|
if (totalPages <= maxPages) {
|
|
113
108
|
for (let i = 1; i <= totalPages; i++) {
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
<script lang="ts" setup>
|
|
38
38
|
import { Content, NotificationType, NotificationPosition } from "../../../../shared/components/notifications";
|
|
39
39
|
import { VcIcon } from "../..";
|
|
40
|
-
import { Ref, onMounted,
|
|
40
|
+
import { Ref, onMounted, ref, toRefs, watch } from "vue";
|
|
41
41
|
|
|
42
42
|
export interface Props {
|
|
43
43
|
content?: Content;
|
|
@@ -70,7 +70,6 @@ interface NotificationTimer {
|
|
|
70
70
|
pause: () => void;
|
|
71
71
|
resume: () => void;
|
|
72
72
|
start: () => void;
|
|
73
|
-
clear: () => void;
|
|
74
73
|
}
|
|
75
74
|
|
|
76
75
|
const timer = ref<NotificationTimer | null>(null);
|
|
@@ -121,22 +120,13 @@ function Timer(callback: (...args: unknown[]) => unknown, delay: number): Notifi
|
|
|
121
120
|
resume();
|
|
122
121
|
}
|
|
123
122
|
|
|
124
|
-
function clear() {
|
|
125
|
-
window.clearTimeout(timerId);
|
|
126
|
-
}
|
|
127
|
-
|
|
128
123
|
return {
|
|
129
124
|
pause,
|
|
130
125
|
resume,
|
|
131
126
|
start,
|
|
132
|
-
clear,
|
|
133
127
|
};
|
|
134
128
|
}
|
|
135
129
|
|
|
136
|
-
onBeforeUnmount(() => {
|
|
137
|
-
timer.value?.clear();
|
|
138
|
-
});
|
|
139
|
-
|
|
140
130
|
function onMouseEnter() {
|
|
141
131
|
if (props.timeout) {
|
|
142
132
|
timer.value?.pause();
|