@webitel/ui-datalist 26.8.5 → 26.8.6
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
CHANGED
|
@@ -1,8 +1,12 @@
|
|
|
1
|
-
import type { StoreDefinition } from 'pinia';
|
|
2
1
|
import { computed, type MaybeRefOrGetter, toValue, watch } from 'vue';
|
|
3
2
|
|
|
4
3
|
import { useInjectedCardStore } from '../../card/composables/useCardStoreProvider';
|
|
5
|
-
import type { CardItemId } from '../../card/types/CardStore.types';
|
|
4
|
+
import type { CardItemId, NestedList } from '../../card/types/CardStore.types';
|
|
5
|
+
|
|
6
|
+
/** what this needs of a table store, which `createTableStore` satisfies */
|
|
7
|
+
interface NestedTableListStore extends NestedList {
|
|
8
|
+
initialize: (options: { parentId: string | number }) => unknown;
|
|
9
|
+
}
|
|
6
10
|
|
|
7
11
|
/**
|
|
8
12
|
* The list of a card page's nested tab.
|
|
@@ -23,11 +27,11 @@ import type { CardItemId } from '../../card/types/CardStore.types';
|
|
|
23
27
|
*
|
|
24
28
|
* [WTEL-10350](https://webitel.atlassian.net/browse/WTEL-10350)
|
|
25
29
|
*/
|
|
26
|
-
export const useNestedTableList = ({
|
|
30
|
+
export const useNestedTableList = <Store extends NestedTableListStore>({
|
|
27
31
|
useTableStore,
|
|
28
32
|
parentId,
|
|
29
33
|
}: {
|
|
30
|
-
useTableStore:
|
|
34
|
+
useTableStore: () => Store;
|
|
31
35
|
/** only where the parent is not the card's own record */
|
|
32
36
|
parentId?: MaybeRefOrGetter<CardItemId>;
|
|
33
37
|
}) => {
|