@webitel/ui-sdk 26.8.51 → 26.8.53
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/dist/{clients-rgtvDufW.js → clients-jhkEj9YI.js} +191 -166
- package/dist/{components-9JJurJkY.js → components-C4rE9PlV.js} +3 -3
- package/dist/ui-sdk.js +1 -1
- package/dist/ui-sdk.umd.cjs +274 -274
- package/dist/{wt-chat-emoji-D2VNcMWj.js → wt-chat-emoji-DVIlMP3o.js} +1 -1
- package/dist/{wt-display-chip-items-Dk-8hhAU.js → wt-display-chip-items-DwMS-DJc.js} +1 -1
- package/dist/{wt-send-message-popup-BYV75cZf.js → wt-send-message-popup-DPjllTAk.js} +2 -2
- package/dist/{wt-type-extension-value-input-BYoxNwD4.js → wt-type-extension-value-input-BO44atDh.js} +2 -2
- package/dist/{wt-vidstack-player-B-vb7PqO.js → wt-vidstack-player-BD28KRTU.js} +1 -1
- package/package.json +1 -1
- package/src/composables/index.ts +0 -1
- package/src/modules/AgentPdfs/components/agent-pdfs-tab.vue +1 -1
- package/src/modules/TableComponentModule/composables/{useTableEmpty.js → useTableEmpty.ts} +69 -9
- package/types/.tsbuildinfo +1 -1
- package/types/composables/index.d.ts +0 -1
- package/types/modules/TableComponentModule/composables/useTableEmpty.d.ts +46 -13
- package/src/composables/useCard/useCardTabs.js +0 -29
- package/types/composables/useCard/useCardTabs.d.ts +0 -4
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
export * from './useCachedInterval/useCachedInterval';
|
|
2
2
|
export * from './useCachedItemInstanceName/useCachedItemInstanceName';
|
|
3
3
|
export * from './useCard/useCardComponent';
|
|
4
|
-
export * from './useCard/useCardTabs';
|
|
5
4
|
export * from './useClose/useClose';
|
|
6
5
|
export * from './useDestroyableSortable/useDestroyableSortable';
|
|
7
6
|
export * from './useEventBus/useEventBus';
|
|
@@ -1,15 +1,48 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
import { EmptyCause } from '../../../enums/index';
|
|
2
|
+
type DeepPartial<T> = T extends object ? {
|
|
3
|
+
[K in keyof T]?: DeepPartial<T[K]>;
|
|
4
|
+
} : T;
|
|
5
|
+
interface EmptyImageSet {
|
|
6
|
+
dark: string;
|
|
7
|
+
light: string;
|
|
8
|
+
}
|
|
9
|
+
interface EmptyStateVariants<T> {
|
|
10
|
+
filters: T;
|
|
11
|
+
error: T;
|
|
12
|
+
empty: T;
|
|
13
|
+
}
|
|
14
|
+
interface EmptyStateConfig {
|
|
15
|
+
image: EmptyStateVariants<EmptyImageSet>;
|
|
16
|
+
headline: EmptyStateVariants<string>;
|
|
17
|
+
title: EmptyStateVariants<string>;
|
|
18
|
+
text: EmptyStateVariants<string>;
|
|
19
|
+
primaryActionText: EmptyStateVariants<string>;
|
|
20
|
+
secondaryActionText: EmptyStateVariants<string>;
|
|
21
|
+
}
|
|
22
|
+
/** duck-typed readable ref — accepts `Ref`/`ComputedRef`/Pinia `ToRef` alike, only `.value` is ever read */
|
|
23
|
+
type Readable<T> = {
|
|
24
|
+
value: T;
|
|
25
|
+
};
|
|
26
|
+
export interface UseTableEmptySource {
|
|
27
|
+
dataList?: Readable<unknown[] | undefined>;
|
|
28
|
+
filters?: Readable<Record<string, unknown> | undefined>;
|
|
29
|
+
error?: Readable<unknown>;
|
|
30
|
+
isLoading?: Readable<boolean | undefined>;
|
|
31
|
+
}
|
|
32
|
+
type MaybeOverridesGetter = DeepPartial<EmptyStateConfig> | Readable<DeepPartial<EmptyStateConfig>> | (() => DeepPartial<EmptyStateConfig>);
|
|
33
|
+
/**
|
|
34
|
+
* @param overrides plain object, ref, computed, or getter — use a reactive
|
|
35
|
+
* source (not a plain object literal) if any value inside depends on
|
|
36
|
+
* locale/dark mode, so it re-evaluates instead of freezing at first render
|
|
37
|
+
*/
|
|
38
|
+
export declare const useTableEmpty: ({ dataList, filters, error, isLoading }?: UseTableEmptySource, overrides?: MaybeOverridesGetter) => {
|
|
7
39
|
showEmpty: import("vue").ComputedRef<boolean>;
|
|
8
|
-
emptyCause: import("vue").ComputedRef<
|
|
9
|
-
image: import("vue").ComputedRef<
|
|
10
|
-
headline: import("vue").ComputedRef<
|
|
11
|
-
title: import("vue").ComputedRef<
|
|
12
|
-
text: import("vue").ComputedRef<
|
|
13
|
-
primaryActionText: import("vue").ComputedRef<
|
|
14
|
-
secondaryActionText: import("vue").ComputedRef<
|
|
40
|
+
emptyCause: import("vue").ComputedRef<EmptyCause | null>;
|
|
41
|
+
image: import("vue").ComputedRef<string | null>;
|
|
42
|
+
headline: import("vue").ComputedRef<string | null>;
|
|
43
|
+
title: import("vue").ComputedRef<string | null>;
|
|
44
|
+
text: import("vue").ComputedRef<string | null>;
|
|
45
|
+
primaryActionText: import("vue").ComputedRef<string | null>;
|
|
46
|
+
secondaryActionText: import("vue").ComputedRef<string | null>;
|
|
15
47
|
};
|
|
48
|
+
export {};
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import { computed } from 'vue';
|
|
2
|
-
import { useRoute, useRouter } from 'vue-router';
|
|
3
|
-
|
|
4
|
-
export const useCardTabs = (tabs) => {
|
|
5
|
-
const router = useRouter();
|
|
6
|
-
const route = useRoute();
|
|
7
|
-
|
|
8
|
-
const currentTab = computed(() => {
|
|
9
|
-
return (
|
|
10
|
-
tabs?.value.find(({ pathName }) => route.name === pathName) ||
|
|
11
|
-
tabs?.value[0]
|
|
12
|
-
);
|
|
13
|
-
});
|
|
14
|
-
|
|
15
|
-
function changeTab(tab) {
|
|
16
|
-
if (!tab?.pathName) return;
|
|
17
|
-
|
|
18
|
-
return router.push({
|
|
19
|
-
...route,
|
|
20
|
-
name: tab.pathName,
|
|
21
|
-
});
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
return {
|
|
25
|
-
currentTab,
|
|
26
|
-
|
|
27
|
-
changeTab,
|
|
28
|
-
};
|
|
29
|
-
};
|