@webitel/ui-datalist 26.8.3 → 26.8.5
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/package.json +1 -1
- package/src/index.ts +2 -1
- package/src/modules/card/composables/__tests__/useCardRouting.spec.ts +146 -0
- package/src/modules/card/composables/useCardComponent.ts +9 -0
- package/src/modules/card/composables/useCardRouting.ts +12 -6
- package/src/modules/card/composables/useCardStoreProvider.ts +26 -0
- package/src/modules/card/composables/useNestedCardComponent.ts +8 -5
- package/src/modules/card/index.ts +1 -0
- package/src/modules/card/stores/__tests__/createCardStore.spec.ts +73 -0
- package/src/modules/card/stores/createCardStore.ts +23 -2
- package/src/modules/card/types/CardStore.types.ts +8 -0
- package/src/modules/table/__tests__/createTableStore.spec.ts +262 -0
- package/src/modules/table/__tests__/useNestedTableList.spec.ts +218 -0
- package/src/modules/table/composables/useNestedTableList.ts +57 -0
- package/src/modules/table/createTableStore.store.ts +37 -0
- package/types/.tsbuildinfo +1 -1
- package/types/index.d.ts +2 -1
- package/types/modules/card/composables/useCardRouting.d.ts +10 -6
- package/types/modules/card/composables/useCardStoreProvider.d.ts +18 -0
- package/types/modules/card/composables/useNestedCardComponent.d.ts +6 -2
- package/types/modules/card/index.d.ts +1 -0
- package/types/modules/card/stores/createCardStore.d.ts +19 -10
- package/types/modules/card/types/CardStore.types.d.ts +7 -0
- package/types/modules/filter-presets/stores/createFilterPresetsStore.d.ts +2 -0
- package/types/modules/filters/modules/filterConfig/components/case-service/config.d.ts +1 -1
- package/types/modules/permissions-page/stores/createPermissionsStore.d.ts +2 -0
- package/types/modules/table/composables/useNestedTableList.d.ts +27 -0
- package/types/modules/table/createTableStore.store.d.ts +4 -0
package/types/index.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
+
import { useNestedTableList } from './modules/table/composables/useNestedTableList';
|
|
1
2
|
import { createTableStore } from './modules/table/createTableStore.store';
|
|
2
3
|
import type { DatalistTableHeader } from './modules/types/tableStore.types';
|
|
3
4
|
export type { DatalistTableHeader };
|
|
4
|
-
export { createTableStore };
|
|
5
|
+
export { createTableStore, useNestedTableList };
|
|
@@ -1,18 +1,22 @@
|
|
|
1
|
-
import { type Ref } from 'vue';
|
|
2
|
-
import type { CardItemId } from '../types/CardStore.types';
|
|
1
|
+
import { type MaybeRefOrGetter, type Ref } from 'vue';
|
|
2
|
+
import type { CardItemId, CardParentId } from '../types/CardStore.types';
|
|
3
3
|
/**
|
|
4
4
|
* Routing logic shared by top-level and nested card components.
|
|
5
5
|
*
|
|
6
6
|
* - `routeParamName` — which `route.params` key holds the item ID (default: `'id'`)
|
|
7
7
|
* - `parentId` — when provided, the card is treated as nested: URL is updated
|
|
8
|
-
* only when a newly created item receives its server-assigned ID
|
|
8
|
+
* only when a newly created item receives its server-assigned ID. Pass a ref
|
|
9
|
+
* or a getter whenever the parent can be created while the card is already
|
|
10
|
+
* mounted — a popup living inside its parent's card page watches
|
|
11
|
+
* `route.params.id` go from `'new'` to a real id underneath it, and a plain
|
|
12
|
+
* string captured at setup would keep addressing `'new'`.
|
|
9
13
|
*/
|
|
10
|
-
export declare const useCardRouting: ({ itemId, routeParamName, parentId, manualSetup, }: {
|
|
14
|
+
export declare const useCardRouting: ({ itemId, routeParamName, parentId: rawParentId, manualSetup, }: {
|
|
11
15
|
itemId: Ref<CardItemId>;
|
|
12
16
|
routeParamName?: string;
|
|
13
|
-
parentId?:
|
|
17
|
+
parentId?: MaybeRefOrGetter<CardParentId>;
|
|
14
18
|
manualSetup?: boolean;
|
|
15
19
|
}) => {
|
|
16
20
|
routeId: import("vue").ComputedRef<any>;
|
|
17
|
-
parentId: string | undefined
|
|
21
|
+
parentId: import("vue").ComputedRef<string | number | null | undefined>;
|
|
18
22
|
};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { type InjectionKey } from 'vue';
|
|
2
|
+
import type { CardItemId, NestedList } from '../types/CardStore.types';
|
|
3
|
+
/**
|
|
4
|
+
* What a nested tab needs from the card page it lives in: the record it is a
|
|
5
|
+
* tab of, and somewhere to register its list so the card can empty it.
|
|
6
|
+
*/
|
|
7
|
+
export interface NestedListsOwner {
|
|
8
|
+
itemId: CardItemId;
|
|
9
|
+
registerNestedList: (list: NestedList) => void;
|
|
10
|
+
}
|
|
11
|
+
export declare const CardStoreKey: InjectionKey<NestedListsOwner>;
|
|
12
|
+
/**
|
|
13
|
+
* `useCardComponent` provides the card's own store, so the tabs below it need
|
|
14
|
+
* no wiring of their own — see `useNestedTableList`.
|
|
15
|
+
*/
|
|
16
|
+
export declare const provideCardStore: (store: NestedListsOwner) => void;
|
|
17
|
+
/** `null` outside a card page, where a list has no owner to reset it */
|
|
18
|
+
export declare const useInjectedCardStore: () => NestedListsOwner | null;
|
|
@@ -1,10 +1,14 @@
|
|
|
1
1
|
import { type StoreDefinition } from 'pinia';
|
|
2
|
+
import { type MaybeRefOrGetter } from 'vue';
|
|
3
|
+
import type { CardParentId } from '../types/CardStore.types';
|
|
2
4
|
/**
|
|
3
5
|
* Composable for nested (popup) card components.
|
|
4
6
|
*
|
|
5
7
|
* Wraps `useCardComponent` with `manualSetup: true` and delegates
|
|
6
8
|
* routing to `useCardRouting`. Pass `parentId` from the component —
|
|
7
|
-
* its presence indicates a nested card context.
|
|
9
|
+
* its presence indicates a nested card context. A ref or getter is read on
|
|
10
|
+
* every `initialize`, so a popup mounted while its parent was still `'new'`
|
|
11
|
+
* follows the parent's real id instead of addressing `'new'` forever.
|
|
8
12
|
*
|
|
9
13
|
* @example
|
|
10
14
|
* ```ts
|
|
@@ -21,7 +25,7 @@ export declare const useNestedCardComponent: <CardEntity extends Record<string,
|
|
|
21
25
|
useCardStore: StoreDefinition;
|
|
22
26
|
onLoadErrorHandler?: (err: unknown) => void;
|
|
23
27
|
routeParamName: string;
|
|
24
|
-
parentId?:
|
|
28
|
+
parentId?: MaybeRefOrGetter<CardParentId>;
|
|
25
29
|
}) => {
|
|
26
30
|
modelValue: import("vue").ComputedRef<import("@regle/core").JoinDiscriminatedUnions<import("vue").UnwrapNestedRefs<CardEntity>> | import("@regle/schemas").RegleSchemaStatus<CardEntity, {}, true>["$value"]>;
|
|
27
31
|
debouncedIsLoading: Readonly<import("vue").Ref<any, any>>;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
export * from './composables/useCardAnyFieldEditedWatcher';
|
|
2
2
|
export * from './composables/useCardComponent';
|
|
3
3
|
export * from './composables/useCardListNavigation';
|
|
4
|
+
export * from './composables/useCardStoreProvider';
|
|
4
5
|
export * from './composables/useCardTabs';
|
|
5
6
|
export * from './composables/useNestedCardComponent';
|
|
6
7
|
export * from './stores/createCardStore';
|
|
@@ -2,7 +2,7 @@ import { type RegleSchemaBehaviourOptions } from '@regle/schemas';
|
|
|
2
2
|
import type { ApiModule } from '@webitel/ui-sdk/src/api/types/ApiModule';
|
|
3
3
|
import type { MaybeRef } from 'vue';
|
|
4
4
|
import type { z } from 'zod/v4';
|
|
5
|
-
import type { CardItemId } from '../types/CardStore.types';
|
|
5
|
+
import type { CardItemId, CardParentId, NestedList } from '../types/CardStore.types';
|
|
6
6
|
export declare const createCardStore: <Entity extends {
|
|
7
7
|
id?: string | number;
|
|
8
8
|
} = {
|
|
@@ -27,10 +27,11 @@ export declare const createCardStore: <Entity extends {
|
|
|
27
27
|
error: import("vue").Ref<unknown, unknown>;
|
|
28
28
|
initialize: ({ itemId: initialItemId, parentId: initialParentId, }?: {
|
|
29
29
|
itemId?: string | number;
|
|
30
|
-
parentId?:
|
|
30
|
+
parentId?: CardParentId;
|
|
31
31
|
}) => Promise<void>;
|
|
32
32
|
saveItem: (draft: Entity) => Promise<void>;
|
|
33
33
|
$reset: () => void;
|
|
34
|
+
registerNestedList: (list: NestedList) => void;
|
|
34
35
|
}, keyof ({
|
|
35
36
|
parentId: import("vue").Ref<CardItemId | undefined, CardItemId | undefined>;
|
|
36
37
|
itemId: import("vue").Ref<CardItemId | undefined, CardItemId | undefined>;
|
|
@@ -42,10 +43,11 @@ export declare const createCardStore: <Entity extends {
|
|
|
42
43
|
error: import("vue").Ref<unknown, unknown>;
|
|
43
44
|
initialize: ({ itemId: initialItemId, parentId: initialParentId, }?: {
|
|
44
45
|
itemId?: string | number;
|
|
45
|
-
parentId?:
|
|
46
|
+
parentId?: CardParentId;
|
|
46
47
|
}) => Promise<void>;
|
|
47
48
|
saveItem: (draft: Entity) => Promise<void>;
|
|
48
49
|
$reset: () => void;
|
|
50
|
+
registerNestedList: (list: NestedList) => void;
|
|
49
51
|
} extends infer T ? { [K in keyof T as {
|
|
50
52
|
parentId: import("vue").Ref<CardItemId | undefined, CardItemId | undefined>;
|
|
51
53
|
itemId: import("vue").Ref<CardItemId | undefined, CardItemId | undefined>;
|
|
@@ -57,10 +59,11 @@ export declare const createCardStore: <Entity extends {
|
|
|
57
59
|
error: import("vue").Ref<unknown, unknown>;
|
|
58
60
|
initialize: ({ itemId: initialItemId, parentId: initialParentId, }?: {
|
|
59
61
|
itemId?: string | number;
|
|
60
|
-
parentId?:
|
|
62
|
+
parentId?: CardParentId;
|
|
61
63
|
}) => Promise<void>;
|
|
62
64
|
saveItem: (draft: Entity) => Promise<void>;
|
|
63
65
|
$reset: () => void;
|
|
66
|
+
registerNestedList: (list: NestedList) => void;
|
|
64
67
|
}[K] extends import("pinia")._Method | import("vue").ComputedRef<any> ? never : K]: any; } : never)>, Pick<{
|
|
65
68
|
parentId: import("vue").Ref<CardItemId | undefined, CardItemId | undefined>;
|
|
66
69
|
itemId: import("vue").Ref<CardItemId | undefined, CardItemId | undefined>;
|
|
@@ -72,10 +75,11 @@ export declare const createCardStore: <Entity extends {
|
|
|
72
75
|
error: import("vue").Ref<unknown, unknown>;
|
|
73
76
|
initialize: ({ itemId: initialItemId, parentId: initialParentId, }?: {
|
|
74
77
|
itemId?: string | number;
|
|
75
|
-
parentId?:
|
|
78
|
+
parentId?: CardParentId;
|
|
76
79
|
}) => Promise<void>;
|
|
77
80
|
saveItem: (draft: Entity) => Promise<void>;
|
|
78
81
|
$reset: () => void;
|
|
82
|
+
registerNestedList: (list: NestedList) => void;
|
|
79
83
|
}, keyof ({
|
|
80
84
|
parentId: import("vue").Ref<CardItemId | undefined, CardItemId | undefined>;
|
|
81
85
|
itemId: import("vue").Ref<CardItemId | undefined, CardItemId | undefined>;
|
|
@@ -87,10 +91,11 @@ export declare const createCardStore: <Entity extends {
|
|
|
87
91
|
error: import("vue").Ref<unknown, unknown>;
|
|
88
92
|
initialize: ({ itemId: initialItemId, parentId: initialParentId, }?: {
|
|
89
93
|
itemId?: string | number;
|
|
90
|
-
parentId?:
|
|
94
|
+
parentId?: CardParentId;
|
|
91
95
|
}) => Promise<void>;
|
|
92
96
|
saveItem: (draft: Entity) => Promise<void>;
|
|
93
97
|
$reset: () => void;
|
|
98
|
+
registerNestedList: (list: NestedList) => void;
|
|
94
99
|
} extends infer T_1 ? { [K_1 in keyof T_1 as {
|
|
95
100
|
parentId: import("vue").Ref<CardItemId | undefined, CardItemId | undefined>;
|
|
96
101
|
itemId: import("vue").Ref<CardItemId | undefined, CardItemId | undefined>;
|
|
@@ -102,10 +107,11 @@ export declare const createCardStore: <Entity extends {
|
|
|
102
107
|
error: import("vue").Ref<unknown, unknown>;
|
|
103
108
|
initialize: ({ itemId: initialItemId, parentId: initialParentId, }?: {
|
|
104
109
|
itemId?: string | number;
|
|
105
|
-
parentId?:
|
|
110
|
+
parentId?: CardParentId;
|
|
106
111
|
}) => Promise<void>;
|
|
107
112
|
saveItem: (draft: Entity) => Promise<void>;
|
|
108
113
|
$reset: () => void;
|
|
114
|
+
registerNestedList: (list: NestedList) => void;
|
|
109
115
|
}[K_1] extends import("vue").ComputedRef<any> ? K_1 : never]: any; } : never)>, Pick<{
|
|
110
116
|
parentId: import("vue").Ref<CardItemId | undefined, CardItemId | undefined>;
|
|
111
117
|
itemId: import("vue").Ref<CardItemId | undefined, CardItemId | undefined>;
|
|
@@ -117,10 +123,11 @@ export declare const createCardStore: <Entity extends {
|
|
|
117
123
|
error: import("vue").Ref<unknown, unknown>;
|
|
118
124
|
initialize: ({ itemId: initialItemId, parentId: initialParentId, }?: {
|
|
119
125
|
itemId?: string | number;
|
|
120
|
-
parentId?:
|
|
126
|
+
parentId?: CardParentId;
|
|
121
127
|
}) => Promise<void>;
|
|
122
128
|
saveItem: (draft: Entity) => Promise<void>;
|
|
123
129
|
$reset: () => void;
|
|
130
|
+
registerNestedList: (list: NestedList) => void;
|
|
124
131
|
}, keyof ({
|
|
125
132
|
parentId: import("vue").Ref<CardItemId | undefined, CardItemId | undefined>;
|
|
126
133
|
itemId: import("vue").Ref<CardItemId | undefined, CardItemId | undefined>;
|
|
@@ -132,10 +139,11 @@ export declare const createCardStore: <Entity extends {
|
|
|
132
139
|
error: import("vue").Ref<unknown, unknown>;
|
|
133
140
|
initialize: ({ itemId: initialItemId, parentId: initialParentId, }?: {
|
|
134
141
|
itemId?: string | number;
|
|
135
|
-
parentId?:
|
|
142
|
+
parentId?: CardParentId;
|
|
136
143
|
}) => Promise<void>;
|
|
137
144
|
saveItem: (draft: Entity) => Promise<void>;
|
|
138
145
|
$reset: () => void;
|
|
146
|
+
registerNestedList: (list: NestedList) => void;
|
|
139
147
|
} extends infer T_2 ? { [K_2 in keyof T_2 as {
|
|
140
148
|
parentId: import("vue").Ref<CardItemId | undefined, CardItemId | undefined>;
|
|
141
149
|
itemId: import("vue").Ref<CardItemId | undefined, CardItemId | undefined>;
|
|
@@ -147,8 +155,9 @@ export declare const createCardStore: <Entity extends {
|
|
|
147
155
|
error: import("vue").Ref<unknown, unknown>;
|
|
148
156
|
initialize: ({ itemId: initialItemId, parentId: initialParentId, }?: {
|
|
149
157
|
itemId?: string | number;
|
|
150
|
-
parentId?:
|
|
158
|
+
parentId?: CardParentId;
|
|
151
159
|
}) => Promise<void>;
|
|
152
160
|
saveItem: (draft: Entity) => Promise<void>;
|
|
153
161
|
$reset: () => void;
|
|
162
|
+
registerNestedList: (list: NestedList) => void;
|
|
154
163
|
}[K_2] extends import("pinia")._Method ? K_2 : never]: any; } : never)>>;
|
|
@@ -1,2 +1,9 @@
|
|
|
1
1
|
export type CardItemId = string | number | null;
|
|
2
2
|
export type CardParentId = CardItemId;
|
|
3
|
+
/**
|
|
4
|
+
* What a card store needs from the list of one of its nested tabs: the ability
|
|
5
|
+
* to empty it when the card page goes away.
|
|
6
|
+
*/
|
|
7
|
+
export interface NestedList {
|
|
8
|
+
$reset: () => void;
|
|
9
|
+
}
|
|
@@ -4,6 +4,7 @@ export declare const filterPresetsStoreBody: (namespace?: string) => {
|
|
|
4
4
|
setupPresetPersistence: () => Promise<void>;
|
|
5
5
|
resetPreset: () => Promise<void>;
|
|
6
6
|
isStoreSetUp: import("vue").Ref<boolean, boolean>;
|
|
7
|
+
isNested: import("vue").Ref<boolean, boolean>;
|
|
7
8
|
dataList: import("vue").Ref<EnginePresetQuery[], EnginePresetQuery[]>;
|
|
8
9
|
selected: import("vue").Ref<EnginePresetQuery[], EnginePresetQuery[]>;
|
|
9
10
|
error: import("vue").Ref<unknown, unknown>;
|
|
@@ -132,6 +133,7 @@ export declare const filterPresetsStoreBody: (namespace?: string) => {
|
|
|
132
133
|
initialize: ({ parentId: storeParentId, }?: {
|
|
133
134
|
parentId?: string | number;
|
|
134
135
|
}) => Promise<void>;
|
|
136
|
+
$reset: () => void;
|
|
135
137
|
syncPersistence: () => Promise<void>;
|
|
136
138
|
loadDataList: ({ withLoading, }?: import("../../types/tableStore.types").LoadDataListOptions) => Promise<void>;
|
|
137
139
|
appendToDataList: () => Promise<void>;
|
|
@@ -4,7 +4,7 @@ export const searchMethod: (params: import("@webitel/api-services/api/clients/_s
|
|
|
4
4
|
}>;
|
|
5
5
|
export const servicesSearchMethod: (params: Parameters<({ parentId, rootId, ...rest }: {
|
|
6
6
|
parentId?: import("@webitel/api-services/api/clients/_shared/types").ApiId;
|
|
7
|
-
rootId
|
|
7
|
+
rootId?: import("@webitel/api-services/api/clients/_shared/types").ApiId;
|
|
8
8
|
} & import("@webitel/api-services/api/clients/_shared/types").ApiParams) => Promise<{
|
|
9
9
|
items: any;
|
|
10
10
|
next: any;
|
|
@@ -13,6 +13,7 @@ export declare const permissionsStoreBody: (namespace: string, config: useTableS
|
|
|
13
13
|
}) => Promise<void>;
|
|
14
14
|
$reset: () => void;
|
|
15
15
|
isStoreSetUp: import("vue").Ref<boolean, boolean>;
|
|
16
|
+
isNested: import("vue").Ref<boolean, boolean>;
|
|
16
17
|
dataList: import("vue").Ref<PermissionEntity[], PermissionEntity[]>;
|
|
17
18
|
selected: import("vue").Ref<PermissionEntity[], PermissionEntity[]>;
|
|
18
19
|
error: import("vue").Ref<unknown, unknown>;
|
|
@@ -182,6 +183,7 @@ export declare const createPermissionsStore: (namespace: string, config: Omit<us
|
|
|
182
183
|
}) => Promise<void>;
|
|
183
184
|
$reset: () => void;
|
|
184
185
|
isStoreSetUp: import("vue").Ref<boolean, boolean>;
|
|
186
|
+
isNested: import("vue").Ref<boolean, boolean>;
|
|
185
187
|
dataList: import("vue").Ref<PermissionEntity[], PermissionEntity[]>;
|
|
186
188
|
selected: import("vue").Ref<PermissionEntity[], PermissionEntity[]>;
|
|
187
189
|
error: import("vue").Ref<unknown, unknown>;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import type { StoreDefinition } from 'pinia';
|
|
2
|
+
import { type MaybeRefOrGetter } from 'vue';
|
|
3
|
+
import type { CardItemId } from '../../card/types/CardStore.types';
|
|
4
|
+
/**
|
|
5
|
+
* The list of a card page's nested tab.
|
|
6
|
+
*
|
|
7
|
+
* The store is shared by every card of its kind and outlives all of them, so a
|
|
8
|
+
* tab that read it directly showed the rows of whichever record was opened
|
|
9
|
+
* before — and a card for an unsaved record, having no id to initialize with,
|
|
10
|
+
* showed them until it was saved.
|
|
11
|
+
*
|
|
12
|
+
* Registering the list with the card store makes the card responsible for
|
|
13
|
+
* emptying it, and the parent to load comes from the card's own `itemId`: it
|
|
14
|
+
* arrives late for a record created from a nested tab, and the list follows.
|
|
15
|
+
*
|
|
16
|
+
* ```ts
|
|
17
|
+
* const tableStore = useNestedTableList({ useTableStore: useQueueBucketsStore });
|
|
18
|
+
* const { dataList, isLoading } = storeToRefs(tableStore);
|
|
19
|
+
* ```
|
|
20
|
+
*
|
|
21
|
+
* [WTEL-10350](https://webitel.atlassian.net/browse/WTEL-10350)
|
|
22
|
+
*/
|
|
23
|
+
export declare const useNestedTableList: ({ useTableStore, parentId, }: {
|
|
24
|
+
useTableStore: StoreDefinition;
|
|
25
|
+
/** only where the parent is not the card's own record */
|
|
26
|
+
parentId?: MaybeRefOrGetter<CardItemId>;
|
|
27
|
+
}) => import("pinia").Store<string, import("pinia").StateTree, import("pinia")._GettersTree<import("pinia").StateTree>, import("pinia")._ActionsTree>;
|
|
@@ -3,6 +3,7 @@ import type { Identifiable } from '../types/createDatalistStore.types';
|
|
|
3
3
|
import type { LoadDataListOptions, PatchItemPropertyParams, useTableStoreConfig } from '../types/tableStore.types';
|
|
4
4
|
export declare const tableStoreBody: <Entity extends Identifiable>(namespace: string, config: useTableStoreConfig<Entity>) => {
|
|
5
5
|
isStoreSetUp: Ref<boolean, boolean>;
|
|
6
|
+
isNested: Ref<boolean, boolean>;
|
|
6
7
|
dataList: Ref<Entity[], Entity[]>;
|
|
7
8
|
selected: Ref<Entity[], Entity[]>;
|
|
8
9
|
error: Ref<unknown, unknown>;
|
|
@@ -131,6 +132,7 @@ export declare const tableStoreBody: <Entity extends Identifiable>(namespace: st
|
|
|
131
132
|
initialize: ({ parentId: storeParentId, }?: {
|
|
132
133
|
parentId?: string | number;
|
|
133
134
|
}) => Promise<void>;
|
|
135
|
+
$reset: () => void;
|
|
134
136
|
syncPersistence: () => Promise<void>;
|
|
135
137
|
loadDataList: ({ withLoading, }?: LoadDataListOptions) => Promise<void>;
|
|
136
138
|
appendToDataList: () => Promise<void>;
|
|
@@ -163,6 +165,7 @@ export declare const tableStoreBody: <Entity extends Identifiable>(namespace: st
|
|
|
163
165
|
};
|
|
164
166
|
export declare const createTableStore: <Entity extends Identifiable>(namespace: string, config: useTableStoreConfig<Entity>) => import("../types/createDatalistStore.types").PatchableStoreFactory<{
|
|
165
167
|
isStoreSetUp: Ref<boolean, boolean>;
|
|
168
|
+
isNested: Ref<boolean, boolean>;
|
|
166
169
|
dataList: Ref<Entity[], Entity[]>;
|
|
167
170
|
selected: Ref<Entity[], Entity[]>;
|
|
168
171
|
error: Ref<unknown, unknown>;
|
|
@@ -291,6 +294,7 @@ export declare const createTableStore: <Entity extends Identifiable>(namespace:
|
|
|
291
294
|
initialize: ({ parentId: storeParentId, }?: {
|
|
292
295
|
parentId?: string | number;
|
|
293
296
|
}) => Promise<void>;
|
|
297
|
+
$reset: () => void;
|
|
294
298
|
syncPersistence: () => Promise<void>;
|
|
295
299
|
loadDataList: ({ withLoading, }?: LoadDataListOptions) => Promise<void>;
|
|
296
300
|
appendToDataList: () => Promise<void>;
|