@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,4 +1,4 @@
|
|
|
1
|
-
import { C as e, i as t } from "./components-
|
|
1
|
+
import { C as e, i as t } from "./components-C4rE9PlV.js";
|
|
2
2
|
import { t as n } from "./_plugin-vue_export-helper-B3ysoDQm.js";
|
|
3
3
|
import { t as r } from "./displayText-CtaxzaBz.js";
|
|
4
4
|
import { Fragment as i, computed as a, createCommentVNode as o, createElementBlock as s, createTextVNode as c, createVNode as l, defineComponent as u, openBlock as d, renderList as f, renderSlot as p, toDisplayString as m, unref as h, withCtx as g } from "vue";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { t as e } from "./rolldown-runtime-BEcgMyyN.js";
|
|
2
|
-
import { n as t, r as n } from "./clients-
|
|
3
|
-
import { T as r, n as i, w as a } from "./components-
|
|
2
|
+
import { n as t, r as n } from "./clients-jhkEj9YI.js";
|
|
3
|
+
import { T as r, n as i, w as a } from "./components-C4rE9PlV.js";
|
|
4
4
|
import { t as o } from "./vue-i18n-Db_oYfO8.js";
|
|
5
5
|
import { n as s } from "./useEventBus-B-ZeklLu.js";
|
|
6
6
|
import { createBlock as c, createTextVNode as l, createVNode as u, defineComponent as d, mergeProps as f, onMounted as p, openBlock as m, ref as h, resolveComponent as g, toDisplayString as _, unref as v, withCtx as y } from "vue";
|
package/dist/{wt-type-extension-value-input-BYoxNwD4.js → wt-type-extension-value-input-BO44atDh.js}
RENAMED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { t as e } from "./clients-
|
|
2
|
-
import { a as t, o as n, r, s as i } from "./components-
|
|
1
|
+
import { t as e } from "./clients-jhkEj9YI.js";
|
|
2
|
+
import { a as t, o as n, r, s as i } from "./components-C4rE9PlV.js";
|
|
3
3
|
import { t as a } from "./enums-DY3jIXFF.js";
|
|
4
4
|
import { t as o } from "./vue-i18n-Db_oYfO8.js";
|
|
5
5
|
import { computed as s, createBlock as c, createCommentVNode as l, createVNode as u, defineComponent as d, mergeModels as f, mergeProps as p, openBlock as m, renderSlot as h, resolveComponent as g, unref as _, useModel as v } from "vue";
|
package/package.json
CHANGED
package/src/composables/index.ts
CHANGED
|
@@ -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';
|
|
@@ -9,18 +9,72 @@ import EmptyFiltersLight from '../_internals/assets/empty-filters-light.svg';
|
|
|
9
9
|
import EmptyTableDark from '../_internals/assets/empty-table-dark.svg';
|
|
10
10
|
import EmptyTableLight from '../_internals/assets/empty-table-light.svg';
|
|
11
11
|
|
|
12
|
+
type DeepPartial<T> = T extends object
|
|
13
|
+
? {
|
|
14
|
+
[K in keyof T]?: DeepPartial<T[K]>;
|
|
15
|
+
}
|
|
16
|
+
: T;
|
|
17
|
+
|
|
18
|
+
interface EmptyImageSet {
|
|
19
|
+
dark: string;
|
|
20
|
+
light: string;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
interface EmptyStateVariants<T> {
|
|
24
|
+
filters: T;
|
|
25
|
+
error: T;
|
|
26
|
+
empty: T;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
interface EmptyStateConfig {
|
|
30
|
+
image: EmptyStateVariants<EmptyImageSet>;
|
|
31
|
+
headline: EmptyStateVariants<string>;
|
|
32
|
+
title: EmptyStateVariants<string>;
|
|
33
|
+
text: EmptyStateVariants<string>;
|
|
34
|
+
primaryActionText: EmptyStateVariants<string>;
|
|
35
|
+
secondaryActionText: EmptyStateVariants<string>;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
/** duck-typed readable ref — accepts `Ref`/`ComputedRef`/Pinia `ToRef` alike, only `.value` is ever read */
|
|
39
|
+
type Readable<T> = {
|
|
40
|
+
value: T;
|
|
41
|
+
};
|
|
42
|
+
|
|
43
|
+
export interface UseTableEmptySource {
|
|
44
|
+
dataList?: Readable<unknown[] | undefined>;
|
|
45
|
+
filters?: Readable<Record<string, unknown> | undefined>;
|
|
46
|
+
error?: Readable<unknown>;
|
|
47
|
+
isLoading?: Readable<boolean | undefined>;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
type MaybeOverridesGetter =
|
|
51
|
+
| DeepPartial<EmptyStateConfig>
|
|
52
|
+
| Readable<DeepPartial<EmptyStateConfig>>
|
|
53
|
+
| (() => DeepPartial<EmptyStateConfig>);
|
|
54
|
+
|
|
55
|
+
const resolveOverrides = (
|
|
56
|
+
source: MaybeOverridesGetter,
|
|
57
|
+
): DeepPartial<EmptyStateConfig> => {
|
|
58
|
+
if (typeof source === 'function') return source();
|
|
59
|
+
if (source && typeof source === 'object' && 'value' in source) {
|
|
60
|
+
return source.value;
|
|
61
|
+
}
|
|
62
|
+
return source;
|
|
63
|
+
};
|
|
64
|
+
|
|
12
65
|
/**
|
|
13
|
-
* @param
|
|
14
|
-
*
|
|
66
|
+
* @param overrides plain object, ref, computed, or getter — use a reactive
|
|
67
|
+
* source (not a plain object literal) if any value inside depends on
|
|
68
|
+
* locale/dark mode, so it re-evaluates instead of freezing at first render
|
|
15
69
|
*/
|
|
16
70
|
export const useTableEmpty = (
|
|
17
|
-
{ dataList, filters, error, isLoading } = {},
|
|
18
|
-
overrides = {},
|
|
71
|
+
{ dataList, filters, error, isLoading }: UseTableEmptySource = {},
|
|
72
|
+
overrides: MaybeOverridesGetter = {},
|
|
19
73
|
) => {
|
|
20
74
|
const { t } = useI18n();
|
|
21
75
|
|
|
22
76
|
// use computed, so that at locale change, texts will be updated too
|
|
23
|
-
const defaults = computed(() => ({
|
|
77
|
+
const defaults = computed<EmptyStateConfig>(() => ({
|
|
24
78
|
image: {
|
|
25
79
|
filters: {
|
|
26
80
|
dark: EmptyFiltersDark,
|
|
@@ -62,18 +116,24 @@ export const useTableEmpty = (
|
|
|
62
116
|
},
|
|
63
117
|
}));
|
|
64
118
|
|
|
65
|
-
const merged = computed(
|
|
119
|
+
const merged = computed<EmptyStateConfig>(
|
|
120
|
+
() =>
|
|
121
|
+
deepmerge(
|
|
122
|
+
defaults.value,
|
|
123
|
+
resolveOverrides(overrides),
|
|
124
|
+
) as EmptyStateConfig,
|
|
125
|
+
);
|
|
66
126
|
|
|
67
|
-
const darkMode = toRef(inject('darkMode'));
|
|
127
|
+
const darkMode = toRef(inject<boolean>('darkMode'));
|
|
68
128
|
|
|
69
129
|
const emptyState = computed(() => {
|
|
70
130
|
return !isLoading?.value && !error?.value && !dataList?.value?.length;
|
|
71
131
|
});
|
|
72
132
|
|
|
73
|
-
const emptyCause = computed(() => {
|
|
133
|
+
const emptyCause = computed<EmptyCause | null>(() => {
|
|
74
134
|
if (!emptyState?.value) return null;
|
|
75
135
|
|
|
76
|
-
if (error
|
|
136
|
+
if (error?.value) return EmptyCause.ERROR;
|
|
77
137
|
if (filters?.value) {
|
|
78
138
|
const uncheckedFilters = [
|
|
79
139
|
'page',
|