@maropost-ui/liquidsky-ui 0.1.48 → 0.1.49
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/components/AppTreeDropdown/useTreeDropdownData.d.ts +4 -1
- package/dist/components/AppTreeDropdown/useTreeDropdownData.d.ts.map +1 -1
- package/dist/index.css +1 -1
- package/dist/index.js +8048 -8033
- package/dist/index.js.map +1 -1
- package/dist/types/TreeDropdownProps.d.ts +72 -32
- package/dist/types/TreeDropdownProps.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -1,61 +1,91 @@
|
|
|
1
|
-
import type { AppDropdownProps } from './AppDropdownProps';
|
|
1
|
+
import type { AppDropdownProps, AppDropdownService, DataFetcher } from './AppDropdownProps';
|
|
2
2
|
export interface TreeDropdownItem {
|
|
3
3
|
[key: string]: unknown;
|
|
4
4
|
children?: TreeDropdownItem[];
|
|
5
5
|
disabled?: boolean;
|
|
6
6
|
selectable?: boolean;
|
|
7
7
|
}
|
|
8
|
-
|
|
8
|
+
/** Shape for `v-model:select-all` when `selectAllInModel` is false. */
|
|
9
|
+
export interface TreeDropdownSelectAllModel<T = TreeDropdownItem> {
|
|
10
|
+
select_all: boolean;
|
|
11
|
+
ids: T[];
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* Props for AppTreeDropdown (`TreeDropdown.vue`).
|
|
15
|
+
* Extends AppDropdown data-loading props; adds tree-specific selection and display options.
|
|
16
|
+
*/
|
|
17
|
+
export interface TreeDropdownProps<T = TreeDropdownItem> extends Omit<AppDropdownProps<T>, 'allowNewItem' | 'loadItemById'> {
|
|
9
18
|
/**
|
|
10
|
-
*
|
|
19
|
+
* Async loader for tree nodes. Results are merged with `items`, `default-items`, and
|
|
20
|
+
* drive the empty / `#no-data-append` state when a search returns no catalog rows.
|
|
11
21
|
*/
|
|
12
|
-
|
|
22
|
+
dataFetcher?: DataFetcher<T>;
|
|
13
23
|
/**
|
|
14
|
-
*
|
|
15
|
-
*
|
|
24
|
+
* Injectable service with `findAll` / `items` / `pagination` — same contract as AppDropdown.
|
|
25
|
+
* Flat `parent_id` rows are built into a tree when nested `children` are absent.
|
|
16
26
|
*/
|
|
17
|
-
|
|
27
|
+
service?: AppDropdownService<T>;
|
|
28
|
+
/** Item ids to omit from the tree and from fetch results. */
|
|
29
|
+
exclude?: number[];
|
|
30
|
+
/** Extra params merged into every `dataFetcher` / `service.findAll` request. */
|
|
31
|
+
customParams?: Record<string, unknown>;
|
|
18
32
|
/**
|
|
19
|
-
*
|
|
33
|
+
* Rows merged into the tree after fetch (e.g. user-created categories).
|
|
34
|
+
* Not used for exact-search matching; does not block `#no-data-append` when the catalog fetch is empty.
|
|
20
35
|
*/
|
|
21
|
-
|
|
36
|
+
defaultItems?: T[];
|
|
37
|
+
/** Normalizes each row before tree build and after fetch (default: identity). */
|
|
38
|
+
compactItem?: (item: T) => T;
|
|
39
|
+
/** When `chips` is on, show only `maxVisibleChips` chips plus a "+N others" label. */
|
|
40
|
+
chipCollapsible?: boolean;
|
|
41
|
+
/** Number of chips shown before the "+N others" summary (requires `chipCollapsible`). */
|
|
42
|
+
maxVisibleChips?: number;
|
|
43
|
+
/** Show a search icon in the field (`prepend-inner` slot). */
|
|
44
|
+
showSearchIcon?: boolean;
|
|
22
45
|
/**
|
|
23
|
-
*
|
|
46
|
+
* Show **Select All / Deselect All** with total selectable count (multiple mode only).
|
|
47
|
+
* Hidden while the user is searching.
|
|
24
48
|
*/
|
|
25
|
-
|
|
49
|
+
allowSelectAll?: boolean;
|
|
26
50
|
/**
|
|
27
|
-
*
|
|
51
|
+
* Static hierarchical items. When provided, the tree renders without an initial fetch
|
|
52
|
+
* unless `dataFetcher` or `service` is also set.
|
|
28
53
|
*/
|
|
29
|
-
|
|
54
|
+
items?: T[];
|
|
30
55
|
/**
|
|
31
|
-
*
|
|
56
|
+
* When the data source is flat, builds a tree using this parent reference field.
|
|
57
|
+
* Ignored when items already contain nested `children`.
|
|
32
58
|
*/
|
|
33
|
-
|
|
59
|
+
parentIdKey?: string;
|
|
34
60
|
/**
|
|
35
|
-
*
|
|
36
|
-
*
|
|
37
|
-
* - `all` — selecting a parent selects the parent and all descendants; deselecting any child deselects the parent
|
|
38
|
-
* - `classic` — same cascade UI as `all`, but the model only stores leaf nodes (Vuetify default)
|
|
61
|
+
* Lazy-load child nodes for a branch (passed through to `v-treeview` `load-children`).
|
|
62
|
+
* After loading, `fetchItems` runs again when a `dataFetcher` / `service` is configured.
|
|
39
63
|
*/
|
|
40
|
-
|
|
41
|
-
/** v-autocomplete: enable multiple selection */
|
|
64
|
+
loadChildren?: (item: T) => Promise<void>;
|
|
65
|
+
/** v-autocomplete: enable multiple selection with tree checkboxes. */
|
|
42
66
|
multiple?: boolean;
|
|
43
|
-
/** v-autocomplete: show selection as chips (requires multiple) */
|
|
67
|
+
/** v-autocomplete: show selection as chips (requires `multiple`). */
|
|
44
68
|
chips?: boolean;
|
|
45
|
-
/** v-autocomplete: chips can be closed/removed */
|
|
69
|
+
/** v-autocomplete: chips can be closed/removed (requires `chips`). */
|
|
46
70
|
closableChips?: boolean;
|
|
47
|
-
/** v-autocomplete: v-model stores full item objects */
|
|
71
|
+
/** v-autocomplete: v-model stores full item objects instead of `itemValue` keys. */
|
|
48
72
|
returnObject?: boolean;
|
|
49
|
-
/** v-autocomplete: show clear button */
|
|
73
|
+
/** v-autocomplete: show clear button on the input. */
|
|
50
74
|
clearable?: boolean;
|
|
51
|
-
/** v-autocomplete / field label */
|
|
75
|
+
/** v-autocomplete / field label. */
|
|
52
76
|
label?: string;
|
|
53
|
-
/**
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
77
|
+
/**
|
|
78
|
+
* Restrict selection to nodes without children (or nodes with `selectable: false` on parents).
|
|
79
|
+
* Parent rows show a count of selectable leaf descendants in the menu.
|
|
80
|
+
*/
|
|
81
|
+
leafOnly?: boolean;
|
|
82
|
+
/**
|
|
83
|
+
* VTreeview select strategy for multiple mode.
|
|
84
|
+
* - `independent` — select parent and children separately (default)
|
|
85
|
+
* - `all` — selecting a parent selects the parent and all descendants; deselecting any child deselects the parent
|
|
86
|
+
* - `classic` — same cascade UI as `all`, but the model only stores leaf nodes
|
|
87
|
+
*/
|
|
88
|
+
selectStrategy?: 'classic' | 'independent' | 'all' | 'leaf' | 'single-leaf' | 'single-independent' | 'trunk';
|
|
59
89
|
/**
|
|
60
90
|
* How Select All updates selection when `allowSelectAll` is true.
|
|
61
91
|
* - `false` (default) — uses `v-model:select-all` with `{ select_all, ids }` for
|
|
@@ -63,5 +93,15 @@ export interface TreeDropdownProps<T = TreeDropdownItem> extends AppDropdownProp
|
|
|
63
93
|
* - `true` — Select All puts every selectable value in `v-model`; Deselect All clears `v-model`.
|
|
64
94
|
*/
|
|
65
95
|
selectAllInModel?: boolean;
|
|
96
|
+
/** Key used for item display text (string key or formatter function). Menu titles are title-cased for string keys. */
|
|
97
|
+
itemTitle?: string | ((item: T) => string);
|
|
98
|
+
/** Key used as the stable node id / v-model value. */
|
|
99
|
+
itemValue?: string;
|
|
100
|
+
/** Key used for nested children (default `children`). */
|
|
101
|
+
itemChildren?: string;
|
|
102
|
+
/** Expand all branches while the user types in the search field. */
|
|
103
|
+
openAllOnSearch?: boolean;
|
|
104
|
+
/** Show the full ancestor path in chips and single selection display. */
|
|
105
|
+
showPathInSelection?: boolean;
|
|
66
106
|
}
|
|
67
107
|
//# sourceMappingURL=TreeDropdownProps.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TreeDropdownProps.d.ts","sourceRoot":"","sources":["../../src/types/TreeDropdownProps.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"TreeDropdownProps.d.ts","sourceRoot":"","sources":["../../src/types/TreeDropdownProps.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,gBAAgB,EAChB,kBAAkB,EAClB,WAAW,EACZ,MAAM,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