@gears-frontx/ui-kit 0.4.3 → 0.4.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/README.md +4 -1
- package/dist/chunks/data-grid.DYrZEU-F.css +1 -0
- package/dist/chunks/debounce.js +17 -0
- package/dist/chunks/debounce.js.map +1 -0
- package/dist/chunks/dialog.CIR9bQoU.css +1 -0
- package/dist/chunks/dropdown-menu.DT1_JLqL.css +1 -0
- package/dist/chunks/empty.Cfg5lE0n.css +1 -0
- package/dist/chunks/filters.DcFdZpNG.css +1 -0
- package/dist/chunks/hooked.js +52 -0
- package/dist/chunks/hooked.js.map +1 -0
- package/dist/chunks/messages.js +18 -3
- package/dist/chunks/messages.js.map +1 -1
- package/dist/chunks/pagination.DPVITj_D.css +1 -0
- package/dist/chunks/{select.BFwI5rhI.css → select.C3sLDoZI.css} +1 -1
- package/dist/chunks/sidebar.Dw_e0Jqw.css +1 -0
- package/dist/chunks/tabs.BqhiMRUP.css +1 -0
- package/dist/components/data-grid/components/filter-chip.d.ts +21 -0
- package/dist/components/data-grid/components/filter-chip.d.ts.map +1 -0
- package/dist/components/data-grid/components/filter-control-area.d.ts +9 -0
- package/dist/components/data-grid/components/filter-control-area.d.ts.map +1 -0
- package/dist/components/data-grid/components/filter-options-search-input.d.ts +11 -0
- package/dist/components/data-grid/components/filter-options-search-input.d.ts.map +1 -0
- package/dist/components/data-grid/components/filter-popover-content.d.ts +8 -0
- package/dist/components/data-grid/components/filter-popover-content.d.ts.map +1 -0
- package/dist/components/data-grid/components/filter-reset-button.d.ts +8 -0
- package/dist/components/data-grid/components/filter-reset-button.d.ts.map +1 -0
- package/dist/components/data-grid/components/filter-scrollable-wrapper.d.ts +8 -0
- package/dist/components/data-grid/components/filter-scrollable-wrapper.d.ts.map +1 -0
- package/dist/components/data-grid/messages.d.ts +15 -0
- package/dist/components/data-grid/messages.d.ts.map +1 -1
- package/dist/components/data-grid/plugins/filters/components/adaptive-popover.d.ts +20 -0
- package/dist/components/data-grid/plugins/filters/components/adaptive-popover.d.ts.map +1 -0
- package/dist/components/data-grid/plugins/filters/components/all-filters-button.d.ts +3 -0
- package/dist/components/data-grid/plugins/filters/components/all-filters-button.d.ts.map +1 -0
- package/dist/components/data-grid/plugins/filters/components/all-filters-dialog.d.ts +7 -0
- package/dist/components/data-grid/plugins/filters/components/all-filters-dialog.d.ts.map +1 -0
- package/dist/components/data-grid/plugins/filters/components/dialog-filter-item.d.ts +9 -0
- package/dist/components/data-grid/plugins/filters/components/dialog-filter-item.d.ts.map +1 -0
- package/dist/components/data-grid/plugins/filters/components/filter-label.d.ts +7 -0
- package/dist/components/data-grid/plugins/filters/components/filter-label.d.ts.map +1 -0
- package/dist/components/data-grid/plugins/filters/components/filter-popover.d.ts +9 -0
- package/dist/components/data-grid/plugins/filters/components/filter-popover.d.ts.map +1 -0
- package/dist/components/data-grid/plugins/filters/components/filter-single.d.ts +7 -0
- package/dist/components/data-grid/plugins/filters/components/filter-single.d.ts.map +1 -0
- package/dist/components/data-grid/plugins/filters/components/filters-bar.d.ts +3 -0
- package/dist/components/data-grid/plugins/filters/components/filters-bar.d.ts.map +1 -0
- package/dist/components/data-grid/plugins/filters/entities/checkbox-group/checkbox-group-dialog-filter.d.ts +7 -0
- package/dist/components/data-grid/plugins/filters/entities/checkbox-group/checkbox-group-dialog-filter.d.ts.map +1 -0
- package/dist/components/data-grid/plugins/filters/entities/checkbox-group/checkbox-group-list.d.ts +12 -0
- package/dist/components/data-grid/plugins/filters/entities/checkbox-group/checkbox-group-list.d.ts.map +1 -0
- package/dist/components/data-grid/plugins/filters/entities/checkbox-group/checkbox-group-quick-filter.d.ts +7 -0
- package/dist/components/data-grid/plugins/filters/entities/checkbox-group/checkbox-group-quick-filter.d.ts.map +1 -0
- package/dist/components/data-grid/plugins/filters/entities/checkbox-group/filter-checkbox-group.d.ts +20 -0
- package/dist/components/data-grid/plugins/filters/entities/checkbox-group/filter-checkbox-group.d.ts.map +1 -0
- package/dist/components/data-grid/plugins/filters/entities/date-range/date-range-calendar.d.ts +17 -0
- package/dist/components/data-grid/plugins/filters/entities/date-range/date-range-calendar.d.ts.map +1 -0
- package/dist/components/data-grid/plugins/filters/entities/date-range/date-range-dialog-filter.d.ts +7 -0
- package/dist/components/data-grid/plugins/filters/entities/date-range/date-range-dialog-filter.d.ts.map +1 -0
- package/dist/components/data-grid/plugins/filters/entities/date-range/date-range-quick-filter.d.ts +7 -0
- package/dist/components/data-grid/plugins/filters/entities/date-range/date-range-quick-filter.d.ts.map +1 -0
- package/dist/components/data-grid/plugins/filters/entities/date-range/date-range-selection.d.ts +16 -0
- package/dist/components/data-grid/plugins/filters/entities/date-range/date-range-selection.d.ts.map +1 -0
- package/dist/components/data-grid/plugins/filters/entities/date-range/date-range-value.d.ts +19 -0
- package/dist/components/data-grid/plugins/filters/entities/date-range/date-range-value.d.ts.map +1 -0
- package/dist/components/data-grid/plugins/filters/entities/date-range/filter-date-range.d.ts +16 -0
- package/dist/components/data-grid/plugins/filters/entities/date-range/filter-date-range.d.ts.map +1 -0
- package/dist/components/data-grid/plugins/filters/entities/entities.d.ts +7 -0
- package/dist/components/data-grid/plugins/filters/entities/entities.d.ts.map +1 -0
- package/dist/components/data-grid/plugins/filters/entities/search/filter-search.d.ts +10 -0
- package/dist/components/data-grid/plugins/filters/entities/search/filter-search.d.ts.map +1 -0
- package/dist/components/data-grid/plugins/filters/entities/search/search-quick-filter.d.ts +7 -0
- package/dist/components/data-grid/plugins/filters/entities/search/search-quick-filter.d.ts.map +1 -0
- package/dist/components/data-grid/plugins/filters/entities/tag-group/filter-tag-group.d.ts +14 -0
- package/dist/components/data-grid/plugins/filters/entities/tag-group/filter-tag-group.d.ts.map +1 -0
- package/dist/components/data-grid/plugins/filters/entities/tag-group/tag-group-dialog-filter.d.ts +7 -0
- package/dist/components/data-grid/plugins/filters/entities/tag-group/tag-group-dialog-filter.d.ts.map +1 -0
- package/dist/components/data-grid/plugins/filters/entities/tag-group/tag-group-list.d.ts +11 -0
- package/dist/components/data-grid/plugins/filters/entities/tag-group/tag-group-list.d.ts.map +1 -0
- package/dist/components/data-grid/plugins/filters/entities/tag-group/tag-group-quick-filter.d.ts +7 -0
- package/dist/components/data-grid/plugins/filters/entities/tag-group/tag-group-quick-filter.d.ts.map +1 -0
- package/dist/components/data-grid/plugins/filters/entities/toggle/filter-toggle.d.ts +10 -0
- package/dist/components/data-grid/plugins/filters/entities/toggle/filter-toggle.d.ts.map +1 -0
- package/dist/components/data-grid/plugins/filters/entities/toggle/toggle-quick-filter.d.ts +7 -0
- package/dist/components/data-grid/plugins/filters/entities/toggle/toggle-quick-filter.d.ts.map +1 -0
- package/dist/components/data-grid/plugins/filters/entities/tree/filter-tree.d.ts +20 -0
- package/dist/components/data-grid/plugins/filters/entities/tree/filter-tree.d.ts.map +1 -0
- package/dist/components/data-grid/plugins/filters/entities/tree/resolve-filter-tree-value.d.ts +8 -0
- package/dist/components/data-grid/plugins/filters/entities/tree/resolve-filter-tree-value.d.ts.map +1 -0
- package/dist/components/data-grid/plugins/filters/entities/tree/tree-dialog-filter.d.ts +7 -0
- package/dist/components/data-grid/plugins/filters/entities/tree/tree-dialog-filter.d.ts.map +1 -0
- package/dist/components/data-grid/plugins/filters/entities/tree/tree-list.d.ts +12 -0
- package/dist/components/data-grid/plugins/filters/entities/tree/tree-list.d.ts.map +1 -0
- package/dist/components/data-grid/plugins/filters/entities/tree/tree-quick-filter.d.ts +7 -0
- package/dist/components/data-grid/plugins/filters/entities/tree/tree-quick-filter.d.ts.map +1 -0
- package/dist/components/data-grid/plugins/filters/entities/tree/tree-radio-select-plugin.d.ts +13 -0
- package/dist/components/data-grid/plugins/filters/entities/tree/tree-radio-select-plugin.d.ts.map +1 -0
- package/dist/components/data-grid/plugins/filters/entities/tree/use-tree-search.d.ts +8 -0
- package/dist/components/data-grid/plugins/filters/entities/tree/use-tree-search.d.ts.map +1 -0
- package/dist/components/data-grid/plugins/filters/filters-plugin.d.ts +3 -0
- package/dist/components/data-grid/plugins/filters/filters-plugin.d.ts.map +1 -0
- package/dist/components/data-grid/plugins/filters/filters-types.d.ts +141 -0
- package/dist/components/data-grid/plugins/filters/filters-types.d.ts.map +1 -0
- package/dist/components/data-grid/plugins/filters/public.d.ts +11 -0
- package/dist/components/data-grid/plugins/filters/public.d.ts.map +1 -0
- package/dist/components/data-grid/plugins/filters/services/read-option-values.d.ts +7 -0
- package/dist/components/data-grid/plugins/filters/services/read-option-values.d.ts.map +1 -0
- package/dist/components/data-grid/plugins/filters/services/use-async-filter-search.d.ts +20 -0
- package/dist/components/data-grid/plugins/filters/services/use-async-filter-search.d.ts.map +1 -0
- package/dist/components/data-grid/plugins/filters/services/use-filter-search.d.ts +12 -0
- package/dist/components/data-grid/plugins/filters/services/use-filter-search.d.ts.map +1 -0
- package/dist/components/data-grid/tree/components/tree-actions.d.ts +7 -0
- package/dist/components/data-grid/tree/components/tree-actions.d.ts.map +1 -0
- package/dist/components/data-grid/tree/components/tree-content.d.ts +3 -0
- package/dist/components/data-grid/tree/components/tree-content.d.ts.map +1 -0
- package/dist/components/data-grid/tree/components/tree-layout-slot.d.ts +9 -0
- package/dist/components/data-grid/tree/components/tree-layout-slot.d.ts.map +1 -0
- package/dist/components/data-grid/tree/components/tree-left-slot.d.ts +7 -0
- package/dist/components/data-grid/tree/components/tree-left-slot.d.ts.map +1 -0
- package/dist/components/data-grid/tree/components/tree-list-item.d.ts +10 -0
- package/dist/components/data-grid/tree/components/tree-list-item.d.ts.map +1 -0
- package/dist/components/data-grid/tree/components/tree-main.d.ts +3 -0
- package/dist/components/data-grid/tree/components/tree-main.d.ts.map +1 -0
- package/dist/components/data-grid/tree/components/tree-node-content.d.ts +7 -0
- package/dist/components/data-grid/tree/components/tree-node-content.d.ts.map +1 -0
- package/dist/components/data-grid/tree/components/tree-node-directory-item.d.ts +7 -0
- package/dist/components/data-grid/tree/components/tree-node-directory-item.d.ts.map +1 -0
- package/dist/components/data-grid/tree/components/tree-node-leaf.d.ts +7 -0
- package/dist/components/data-grid/tree/components/tree-node-leaf.d.ts.map +1 -0
- package/dist/components/data-grid/tree/components/tree-nodes.d.ts +7 -0
- package/dist/components/data-grid/tree/components/tree-nodes.d.ts.map +1 -0
- package/dist/components/data-grid/tree/components/tree-placeholder.d.ts +6 -0
- package/dist/components/data-grid/tree/components/tree-placeholder.d.ts.map +1 -0
- package/dist/components/data-grid/tree/create-tree.d.ts +5 -0
- package/dist/components/data-grid/tree/create-tree.d.ts.map +1 -0
- package/dist/components/data-grid/tree/services/core/tree-context.d.ts +21 -0
- package/dist/components/data-grid/tree/services/core/tree-context.d.ts.map +1 -0
- package/dist/components/data-grid/tree/services/focus/focus-service.d.ts +5 -0
- package/dist/components/data-grid/tree/services/focus/focus-service.d.ts.map +1 -0
- package/dist/components/data-grid/tree/services/focus/focus-types.d.ts +25 -0
- package/dist/components/data-grid/tree/services/focus/focus-types.d.ts.map +1 -0
- package/dist/components/data-grid/tree/services/focus/navigation-helpers.d.ts +27 -0
- package/dist/components/data-grid/tree/services/focus/navigation-helpers.d.ts.map +1 -0
- package/dist/components/data-grid/tree/services/hooked/hooked-types.d.ts +8 -0
- package/dist/components/data-grid/tree/services/hooked/hooked-types.d.ts.map +1 -0
- package/dist/components/data-grid/tree/services/hooked/hooked.d.ts +3 -0
- package/dist/components/data-grid/tree/services/hooked/hooked.d.ts.map +1 -0
- package/dist/components/data-grid/tree/services/internal/internal-helpers.d.ts +2 -0
- package/dist/components/data-grid/tree/services/internal/internal-helpers.d.ts.map +1 -0
- package/dist/components/data-grid/tree/services/layout/layout-service.d.ts +5 -0
- package/dist/components/data-grid/tree/services/layout/layout-service.d.ts.map +1 -0
- package/dist/components/data-grid/tree/services/layout/layout-types.d.ts +124 -0
- package/dist/components/data-grid/tree/services/layout/layout-types.d.ts.map +1 -0
- package/dist/components/data-grid/tree/services/plugins/plugins-helpers.d.ts +50 -0
- package/dist/components/data-grid/tree/services/plugins/plugins-helpers.d.ts.map +1 -0
- package/dist/components/data-grid/tree/services/plugins/plugins-service.d.ts +5 -0
- package/dist/components/data-grid/tree/services/plugins/plugins-service.d.ts.map +1 -0
- package/dist/components/data-grid/tree/services/plugins/plugins-types.d.ts +43 -0
- package/dist/components/data-grid/tree/services/plugins/plugins-types.d.ts.map +1 -0
- package/dist/components/data-grid/tree/services/settings/settings-service.d.ts +5 -0
- package/dist/components/data-grid/tree/services/settings/settings-service.d.ts.map +1 -0
- package/dist/components/data-grid/tree/services/settings/settings-types.d.ts +73 -0
- package/dist/components/data-grid/tree/services/settings/settings-types.d.ts.map +1 -0
- package/dist/components/data-grid/tree/tree-types.d.ts +44 -0
- package/dist/components/data-grid/tree/tree-types.d.ts.map +1 -0
- package/dist/components/data-grid/tree/tree.d.ts +4 -0
- package/dist/components/data-grid/tree/tree.d.ts.map +1 -0
- package/dist/components/data-grid/tree-structure/tree-structure-types.d.ts +89 -0
- package/dist/components/data-grid/tree-structure/tree-structure-types.d.ts.map +1 -0
- package/dist/components/data-grid/tree-structure/tree-structure.d.ts +19 -0
- package/dist/components/data-grid/tree-structure/tree-structure.d.ts.map +1 -0
- package/dist/components/data-grid/utils/components-stack.d.ts +12 -0
- package/dist/components/data-grid/utils/components-stack.d.ts.map +1 -0
- package/dist/components/data-grid/utils/use-is-tablet-up.d.ts +3 -0
- package/dist/components/data-grid/utils/use-is-tablet-up.d.ts.map +1 -0
- package/dist/data-grid/filters.d.ts +1 -0
- package/dist/data-grid/filters.js +1633 -0
- package/dist/data-grid/filters.js.map +1 -0
- package/dist/data-grid/pagination.js +39 -38
- package/dist/data-grid/pagination.js.map +1 -1
- package/dist/data-grid/text-search.js +55 -67
- package/dist/data-grid/text-search.js.map +1 -1
- package/dist/data-grid.js +578 -618
- package/dist/data-grid.js.map +1 -1
- package/dist/dialog.js +38 -38
- package/dist/docs/data-grid.md +172 -4
- package/dist/docs/drawer.md +1 -1
- package/dist/docs/questionnaire.md +1 -1
- package/dist/dropdown-menu.js +56 -56
- package/dist/empty.js +34 -34
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +392 -382
- package/dist/index.js.map +1 -1
- package/dist/select.js +45 -45
- package/dist/sidebar.js +112 -112
- package/dist/tabs.js +14 -14
- package/llms.txt +2 -2
- package/package.json +1 -4
- package/dist/chunks/data-grid.DIkpRRaf.css +0 -1
- package/dist/chunks/dialog.Cpo8vChK.css +0 -1
- package/dist/chunks/dropdown-menu.TU3FHXbJ.css +0 -1
- package/dist/chunks/empty.DWqLrSfF.css +0 -1
- package/dist/chunks/pagination.Cn8tIWMX.css +0 -1
- package/dist/chunks/sidebar.CIuN--7U.css +0 -1
- package/dist/chunks/tabs.DFa0OYMo.css +0 -1
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The selection a list filter (checkbox group, tag group) holds, read from its state. The state
|
|
3
|
+
* can come back from storage or the address bar, where it is editable, so anything that is not a
|
|
4
|
+
* list reads as no selection: the list would otherwise throw from `includes` while it renders.
|
|
5
|
+
*/
|
|
6
|
+
export declare function readOptionValues(value: unknown): (string | number)[];
|
|
7
|
+
//# sourceMappingURL=read-option-values.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"read-option-values.d.ts","sourceRoot":"","sources":["../../../../../../src/components/data-grid/plugins/filters/services/read-option-values.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,OAAO,GAAG,CAAC,MAAM,GAAG,MAAM,CAAC,EAAE,CAEpE"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
interface AsyncFilterSearchResult<T> {
|
|
2
|
+
searchTerm: string;
|
|
3
|
+
setSearchTerm: (term: string) => void;
|
|
4
|
+
options: T[];
|
|
5
|
+
isLoading: boolean;
|
|
6
|
+
}
|
|
7
|
+
/**
|
|
8
|
+
* Server-side counterpart to {@link useFilterSearch}: instead of filtering a
|
|
9
|
+
* static list locally, it debounces the search term, calls the async resolver,
|
|
10
|
+
* and exposes the resulting options plus a loading flag. Stale responses are
|
|
11
|
+
* discarded so the latest query always wins.
|
|
12
|
+
*
|
|
13
|
+
* The resolver is called on mount with the initial (empty) term, so the first
|
|
14
|
+
* page loads as soon as the list is rendered — pair it with a lazily mounted
|
|
15
|
+
* popover to avoid fetching before the filter is opened. Keep `searchOptions`
|
|
16
|
+
* referentially stable (e.g. `useCallback`) to avoid redundant refetches.
|
|
17
|
+
*/
|
|
18
|
+
export declare function useAsyncFilterSearch<T>(searchOptions: (query: string) => Promise<T[]>, debounceMs?: number): AsyncFilterSearchResult<T>;
|
|
19
|
+
export {};
|
|
20
|
+
//# sourceMappingURL=use-async-filter-search.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-async-filter-search.d.ts","sourceRoot":"","sources":["../../../../../../src/components/data-grid/plugins/filters/services/use-async-filter-search.ts"],"names":[],"mappings":"AAEA,UAAU,uBAAuB,CAAC,CAAC;IACjC,UAAU,EAAE,MAAM,CAAC;IACnB,aAAa,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IACtC,OAAO,EAAE,CAAC,EAAE,CAAC;IACb,SAAS,EAAE,OAAO,CAAC;CACpB;AAID;;;;;;;;;;GAUG;AACH,wBAAgB,oBAAoB,CAAC,CAAC,EACpC,aAAa,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,OAAO,CAAC,CAAC,EAAE,CAAC,EAC9C,UAAU,GAAE,MAA0B,GACrC,uBAAuB,CAAC,CAAC,CAAC,CAmC5B"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
export interface FilterSearchOption {
|
|
3
|
+
label: ReactNode;
|
|
4
|
+
}
|
|
5
|
+
export declare function resolveLabel(label: ReactNode): string;
|
|
6
|
+
export declare function resolveTreeLabel<Item extends Record<string, unknown>>(item: Item, treeLabel: string | ((item: Item) => string)): string;
|
|
7
|
+
export declare function useFilterSearch<T extends FilterSearchOption>(options: T[], enabled: boolean): {
|
|
8
|
+
searchTerm: string;
|
|
9
|
+
setSearchTerm: import('react').Dispatch<import('react').SetStateAction<string>>;
|
|
10
|
+
filteredOptions: T[];
|
|
11
|
+
};
|
|
12
|
+
//# sourceMappingURL=use-filter-search.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-filter-search.d.ts","sourceRoot":"","sources":["../../../../../../src/components/data-grid/plugins/filters/services/use-filter-search.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEvC,MAAM,WAAW,kBAAkB;IACjC,KAAK,EAAE,SAAS,CAAC;CAClB;AAED,wBAAgB,YAAY,CAAC,KAAK,EAAE,SAAS,GAAG,MAAM,CAIrD;AAED,wBAAgB,gBAAgB,CAAC,IAAI,SAAS,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EACnE,IAAI,EAAE,IAAI,EACV,SAAS,EAAE,MAAM,GAAG,CAAC,CAAC,IAAI,EAAE,IAAI,KAAK,MAAM,CAAC,GAC3C,MAAM,CAKR;AAED,wBAAgB,eAAe,CAAC,CAAC,SAAS,kBAAkB,EAAE,OAAO,EAAE,CAAC,EAAE,EAAE,OAAO,EAAE,OAAO;;;;EAiB3F"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { DataGridTreeItem, DataGridTreeNode } from '../../tree-structure/tree-structure-types';
|
|
2
|
+
interface TreeActionsProps<TItem extends DataGridTreeItem> {
|
|
3
|
+
node: DataGridTreeNode<TItem>;
|
|
4
|
+
}
|
|
5
|
+
export declare function TreeActions<TItem extends DataGridTreeItem = DataGridTreeItem>({ node, }: TreeActionsProps<TItem>): import("react").JSX.Element | null;
|
|
6
|
+
export {};
|
|
7
|
+
//# sourceMappingURL=tree-actions.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tree-actions.d.ts","sourceRoot":"","sources":["../../../../../src/components/data-grid/tree/components/tree-actions.tsx"],"names":[],"mappings":";AACA,OAAO,KAAK,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,MAAM,2CAA2C,CAAC;AAMpG,UAAU,gBAAgB,CAAC,KAAK,SAAS,gBAAgB;IACvD,IAAI,EAAE,gBAAgB,CAAC,KAAK,CAAC,CAAC;CAC/B;AAED,wBAAgB,WAAW,CAAC,KAAK,SAAS,gBAAgB,GAAG,gBAAgB,EAAE,EAC7E,IAAI,GACL,EAAE,gBAAgB,CAAC,KAAK,CAAC,sCAiCzB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tree-content.d.ts","sourceRoot":"","sources":["../../../../../src/components/data-grid/tree/components/tree-content.tsx"],"names":[],"mappings":";AACA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,2CAA2C,CAAC;AAIlF,wBAAgB,WAAW,CAAC,KAAK,SAAS,gBAAgB,GAAG,gBAAgB,wCAc5E"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { DataGridTreeItem } from '../../tree-structure/tree-structure-types';
|
|
2
|
+
import { TreeLayoutSlotName } from '../services/layout/layout-types';
|
|
3
|
+
interface TreeLayoutSlotProps {
|
|
4
|
+
name: TreeLayoutSlotName;
|
|
5
|
+
[key: string]: unknown;
|
|
6
|
+
}
|
|
7
|
+
export declare function TreeLayoutSlot<TItem extends DataGridTreeItem = DataGridTreeItem>({ name, ...props }: TreeLayoutSlotProps): import("react").JSX.Element | null;
|
|
8
|
+
export {};
|
|
9
|
+
//# sourceMappingURL=tree-layout-slot.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tree-layout-slot.d.ts","sourceRoot":"","sources":["../../../../../src/components/data-grid/tree/components/tree-layout-slot.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,2CAA2C,CAAC;AAElF,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,iCAAiC,CAAC;AAE1E,UAAU,mBAAmB;IAC3B,IAAI,EAAE,kBAAkB,CAAC;IACzB,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;CACxB;AAED,wBAAgB,cAAc,CAAC,KAAK,SAAS,gBAAgB,GAAG,gBAAgB,EAAE,EAChF,IAAI,EACJ,GAAG,KAAK,EACT,EAAE,mBAAmB,sCAgBrB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tree-left-slot.d.ts","sourceRoot":"","sources":["../../../../../src/components/data-grid/tree/components/tree-left-slot.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAGvC,UAAU,iBAAiB;IACzB,QAAQ,CAAC,EAAE,SAAS,CAAC;CACtB;AAED,wBAAgB,YAAY,CAAC,EAAE,QAAQ,EAAE,EAAE,iBAAiB,+BAE3D"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { DataGridTreeItem, DataGridTreeNode } from '../../tree-structure/tree-structure-types';
|
|
3
|
+
export interface TreeListItemProps<TItem extends DataGridTreeItem> {
|
|
4
|
+
node: DataGridTreeNode<TItem>;
|
|
5
|
+
children?: ReactNode;
|
|
6
|
+
className?: string;
|
|
7
|
+
leftSlot?: ReactNode;
|
|
8
|
+
}
|
|
9
|
+
export declare function TreeListItem<TItem extends DataGridTreeItem = DataGridTreeItem>({ node, children, className, leftSlot, }: TreeListItemProps<TItem>): import("react").JSX.Element;
|
|
10
|
+
//# sourceMappingURL=tree-list-item.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tree-list-item.d.ts","sourceRoot":"","sources":["../../../../../src/components/data-grid/tree/components/tree-list-item.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAc,SAAS,EAAE,MAAM,OAAO,CAAC;AAGnD,OAAO,KAAK,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,MAAM,2CAA2C,CAAC;AAMpG,MAAM,WAAW,iBAAiB,CAAC,KAAK,SAAS,gBAAgB;IAC/D,IAAI,EAAE,gBAAgB,CAAC,KAAK,CAAC,CAAC;IAC9B,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,SAAS,CAAC;CACtB;AAED,wBAAgB,YAAY,CAAC,KAAK,SAAS,gBAAgB,GAAG,gBAAgB,EAAE,EAC9E,IAAI,EACJ,QAAQ,EACR,SAAS,EACT,QAAQ,GACT,EAAE,iBAAiB,CAAC,KAAK,CAAC,+BAyF1B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tree-main.d.ts","sourceRoot":"","sources":["../../../../../src/components/data-grid/tree/components/tree-main.tsx"],"names":[],"mappings":";AACA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,2CAA2C,CAAC;AAOlF,wBAAgB,QAAQ,CAAC,KAAK,SAAS,gBAAgB,GAAG,gBAAgB,iCA0BzE"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { DataGridTreeItem, DataGridTreeNode } from '../../tree-structure/tree-structure-types';
|
|
2
|
+
interface TreeNodeContentProps<TItem extends DataGridTreeItem> {
|
|
3
|
+
node: DataGridTreeNode<TItem>;
|
|
4
|
+
}
|
|
5
|
+
export declare function TreeNodeContent<TItem extends DataGridTreeItem = DataGridTreeItem>({ node, }: TreeNodeContentProps<TItem>): import("react").JSX.Element;
|
|
6
|
+
export {};
|
|
7
|
+
//# sourceMappingURL=tree-node-content.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tree-node-content.d.ts","sourceRoot":"","sources":["../../../../../src/components/data-grid/tree/components/tree-node-content.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,MAAM,2CAA2C,CAAC;AAGpG,UAAU,oBAAoB,CAAC,KAAK,SAAS,gBAAgB;IAC3D,IAAI,EAAE,gBAAgB,CAAC,KAAK,CAAC,CAAC;CAC/B;AAED,wBAAgB,eAAe,CAAC,KAAK,SAAS,gBAAgB,GAAG,gBAAgB,EAAE,EACjF,IAAI,GACL,EAAE,oBAAoB,CAAC,KAAK,CAAC,+BAwB7B"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { DataGridTreeItem, DataGridTreeNode } from '../../tree-structure/tree-structure-types';
|
|
2
|
+
interface TreeNodeDirectoryItemProps<TItem extends DataGridTreeItem> {
|
|
3
|
+
node: DataGridTreeNode<TItem>;
|
|
4
|
+
}
|
|
5
|
+
export declare function TreeNodeDirectoryItem<TItem extends DataGridTreeItem = DataGridTreeItem>({ node, }: TreeNodeDirectoryItemProps<TItem>): import("react").JSX.Element;
|
|
6
|
+
export {};
|
|
7
|
+
//# sourceMappingURL=tree-node-directory-item.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tree-node-directory-item.d.ts","sourceRoot":"","sources":["../../../../../src/components/data-grid/tree/components/tree-node-directory-item.tsx"],"names":[],"mappings":";AAGA,OAAO,KAAK,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,MAAM,2CAA2C,CAAC;AAOpG,UAAU,0BAA0B,CAAC,KAAK,SAAS,gBAAgB;IACjE,IAAI,EAAE,gBAAgB,CAAC,KAAK,CAAC,CAAC;CAC/B;AAED,wBAAgB,qBAAqB,CAAC,KAAK,SAAS,gBAAgB,GAAG,gBAAgB,EAAE,EACvF,IAAI,GACL,EAAE,0BAA0B,CAAC,KAAK,CAAC,+BAmEnC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { DataGridTreeItem, DataGridTreeNode } from '../../tree-structure/tree-structure-types';
|
|
2
|
+
interface TreeNodeLeafProps<TItem extends DataGridTreeItem> {
|
|
3
|
+
node: DataGridTreeNode<TItem>;
|
|
4
|
+
}
|
|
5
|
+
export declare function TreeNodeLeaf<TItem extends DataGridTreeItem = DataGridTreeItem>({ node, }: TreeNodeLeafProps<TItem>): import("react").JSX.Element;
|
|
6
|
+
export {};
|
|
7
|
+
//# sourceMappingURL=tree-node-leaf.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tree-node-leaf.d.ts","sourceRoot":"","sources":["../../../../../src/components/data-grid/tree/components/tree-node-leaf.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,MAAM,2CAA2C,CAAC;AAMpG,UAAU,iBAAiB,CAAC,KAAK,SAAS,gBAAgB;IACxD,IAAI,EAAE,gBAAgB,CAAC,KAAK,CAAC,CAAC;CAC/B;AAED,wBAAgB,YAAY,CAAC,KAAK,SAAS,gBAAgB,GAAG,gBAAgB,EAAE,EAC9E,IAAI,GACL,EAAE,iBAAiB,CAAC,KAAK,CAAC,+BAoC1B"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { DataGridTreeItem, DataGridTreeNode } from '../../tree-structure/tree-structure-types';
|
|
2
|
+
interface TreeNodesProps<TItem extends DataGridTreeItem> {
|
|
3
|
+
nodes: readonly DataGridTreeNode<TItem>[];
|
|
4
|
+
}
|
|
5
|
+
export declare function TreeNodes<TItem extends DataGridTreeItem = DataGridTreeItem>({ nodes, }: TreeNodesProps<TItem>): import("react").JSX.Element;
|
|
6
|
+
export {};
|
|
7
|
+
//# sourceMappingURL=tree-nodes.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tree-nodes.d.ts","sourceRoot":"","sources":["../../../../../src/components/data-grid/tree/components/tree-nodes.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,MAAM,2CAA2C,CAAC;AAYpG,UAAU,cAAc,CAAC,KAAK,SAAS,gBAAgB;IACrD,KAAK,EAAE,SAAS,gBAAgB,CAAC,KAAK,CAAC,EAAE,CAAC;CAC3C;AAED,wBAAgB,SAAS,CAAC,KAAK,SAAS,gBAAgB,GAAG,gBAAgB,EAAE,EAC3E,KAAK,GACN,EAAE,cAAc,CAAC,KAAK,CAAC,+BAavB"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { DataGridTreeItem } from '../../tree-structure/tree-structure-types';
|
|
2
|
+
export interface TreePlaceholderProps<TItem extends DataGridTreeItem> {
|
|
3
|
+
parent: TItem | null;
|
|
4
|
+
}
|
|
5
|
+
export declare function TreePlaceholder<TItem extends DataGridTreeItem = DataGridTreeItem>({ parent, }: TreePlaceholderProps<TItem>): import("react").JSX.Element;
|
|
6
|
+
//# sourceMappingURL=tree-placeholder.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tree-placeholder.d.ts","sourceRoot":"","sources":["../../../../../src/components/data-grid/tree/components/tree-placeholder.tsx"],"names":[],"mappings":";AAEA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,2CAA2C,CAAC;AAKlF,MAAM,WAAW,oBAAoB,CAAC,KAAK,SAAS,gBAAgB;IAClE,MAAM,EAAE,KAAK,GAAG,IAAI,CAAC;CACtB;AAED,wBAAgB,eAAe,CAAC,KAAK,SAAS,gBAAgB,GAAG,gBAAgB,EAAE,EACjF,MAAM,GACP,EAAE,oBAAoB,CAAC,KAAK,CAAC,+BAW7B"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { DataGridTreeItem } from '../tree-structure/tree-structure-types';
|
|
2
|
+
import { TreePlugin } from './services/plugins/plugins-types';
|
|
3
|
+
import { TreeInstance, TreeConfig } from './tree-types';
|
|
4
|
+
export declare function createTree<TItem extends DataGridTreeItem, TPlugins extends TreePlugin<TItem>[] = TreePlugin<TItem>[]>(config: TreeConfig<TItem>): TreeInstance<TItem, TPlugins>;
|
|
5
|
+
//# sourceMappingURL=create-tree.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"create-tree.d.ts","sourceRoot":"","sources":["../../../../src/components/data-grid/tree/create-tree.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,wCAAwC,CAAC;AAM/E,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,kCAAkC,CAAC;AAEnE,OAAO,KAAK,EAAuB,YAAY,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAElF,wBAAgB,UAAU,CACxB,KAAK,SAAS,gBAAgB,EAC9B,QAAQ,SAAS,UAAU,CAAC,KAAK,CAAC,EAAE,GAAG,UAAU,CAAC,KAAK,CAAC,EAAE,EAC1D,MAAM,EAAE,UAAU,CAAC,KAAK,CAAC,GAAG,YAAY,CAAC,KAAK,EAAE,QAAQ,CAAC,CA6C1D"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { DataGridTreeItem } from '../../../tree-structure/tree-structure-types';
|
|
2
|
+
import { TreeInternalContext, TreeInstance } from '../../tree-types';
|
|
3
|
+
import { TreePlugin, TreePluginContext } from '../plugins/plugins-types';
|
|
4
|
+
export declare const TreeProvider: import('react').Provider<TreeInstance<any, any[]> | null>;
|
|
5
|
+
/**
|
|
6
|
+
* @public
|
|
7
|
+
*/
|
|
8
|
+
export declare function useTree<TItem extends DataGridTreeItem = DataGridTreeItem, TPlugins extends TreePlugin<TItem>[] = TreePlugin<TItem>[]>(): TreeInstance<TItem, TPlugins>;
|
|
9
|
+
/**
|
|
10
|
+
* Hook for plugins to access public plugin context.
|
|
11
|
+
* Provides access to plugin APIs, hooks, and layout registration.
|
|
12
|
+
* @public
|
|
13
|
+
*/
|
|
14
|
+
export declare function useTreePluginContext<TItem extends DataGridTreeItem = DataGridTreeItem>(): TreePluginContext<TItem>;
|
|
15
|
+
/**
|
|
16
|
+
* Hook for internal access to all tree services.
|
|
17
|
+
* Not exported in public API - for internal use only.
|
|
18
|
+
* @internal
|
|
19
|
+
*/
|
|
20
|
+
export declare function useTreeContext<TItem extends DataGridTreeItem = DataGridTreeItem>(): TreeInternalContext<TItem>;
|
|
21
|
+
//# sourceMappingURL=tree-context.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tree-context.d.ts","sourceRoot":"","sources":["../../../../../../src/components/data-grid/tree/services/core/tree-context.tsx"],"names":[],"mappings":";AACA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,8CAA8C,CAAC;AACrF,OAAO,KAAK,EAAE,mBAAmB,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAE1E,OAAO,KAAK,EAAE,UAAU,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAK9E,eAAO,MAAM,YAAY,2DAAuB,CAAC;AAEjD;;GAEG;AACH,wBAAgB,OAAO,CACrB,KAAK,SAAS,gBAAgB,GAAG,gBAAgB,EACjD,QAAQ,SAAS,UAAU,CAAC,KAAK,CAAC,EAAE,GAAG,UAAU,CAAC,KAAK,CAAC,EAAE,KACvD,YAAY,CAAC,KAAK,EAAE,QAAQ,CAAC,CAOjC;AAED;;;;GAIG;AACH,wBAAgB,oBAAoB,CAClC,KAAK,SAAS,gBAAgB,GAAG,gBAAgB,KAC9C,iBAAiB,CAAC,KAAK,CAAC,CAI5B;AAED;;;;GAIG;AACH,wBAAgB,cAAc,CAC5B,KAAK,SAAS,gBAAgB,GAAG,gBAAgB,KAC9C,mBAAmB,CAAC,KAAK,CAAC,CAI9B"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { DataGridTreeItem } from '../../../tree-structure/tree-structure-types';
|
|
2
|
+
import { TreeInternalContext } from '../../tree-types';
|
|
3
|
+
import { TreeFocusService } from './focus-types';
|
|
4
|
+
export declare function createFocusService<TItem extends DataGridTreeItem>(context: TreeInternalContext<TItem>): TreeFocusService;
|
|
5
|
+
//# sourceMappingURL=focus-service.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"focus-service.d.ts","sourceRoot":"","sources":["../../../../../../src/components/data-grid/tree/services/focus/focus-service.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EACV,gBAAgB,EAEjB,MAAM,8CAA8C,CAAC;AACtD,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAC5D,OAAO,KAAK,EAAsB,gBAAgB,EAAkB,MAAM,eAAe,CAAC;AAG1F,wBAAgB,kBAAkB,CAAC,KAAK,SAAS,gBAAgB,EAC/D,OAAO,EAAE,mBAAmB,CAAC,KAAK,CAAC,GAClC,gBAAgB,CAwLlB"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { KeyboardEvent } from 'react';
|
|
2
|
+
import { StoreApi, UseBoundStore } from 'zustand';
|
|
3
|
+
import { DataGridTreeItemId } from '../../../tree-structure/tree-structure-types';
|
|
4
|
+
export interface TreeFocusStore {
|
|
5
|
+
focusedNodeId: DataGridTreeItemId | null;
|
|
6
|
+
}
|
|
7
|
+
export interface TreeFocusPublicApi {
|
|
8
|
+
/**
|
|
9
|
+
* Set the focused node ID.
|
|
10
|
+
*
|
|
11
|
+
* @param id - Node ID to focus, or null to clear focus
|
|
12
|
+
*/
|
|
13
|
+
setFocusedNode: (id: DataGridTreeItemId | null) => void;
|
|
14
|
+
/**
|
|
15
|
+
* Focus a node by ID (sets focus state and moves DOM focus).
|
|
16
|
+
*
|
|
17
|
+
* @param id - Node ID to focus
|
|
18
|
+
*/
|
|
19
|
+
focusNode: (id: DataGridTreeItemId) => void;
|
|
20
|
+
}
|
|
21
|
+
export interface TreeFocusService extends TreeFocusPublicApi {
|
|
22
|
+
useFocusStore: UseBoundStore<StoreApi<TreeFocusStore>>;
|
|
23
|
+
handleKeyDown: (event: KeyboardEvent<HTMLDivElement>) => void;
|
|
24
|
+
}
|
|
25
|
+
//# sourceMappingURL=focus-types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"focus-types.d.ts","sourceRoot":"","sources":["../../../../../../src/components/data-grid/tree/services/focus/focus-types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAC3C,OAAO,KAAK,EAAE,QAAQ,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AACvD,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,8CAA8C,CAAC;AAEvF,MAAM,WAAW,cAAc;IAC7B,aAAa,EAAE,kBAAkB,GAAG,IAAI,CAAC;CAC1C;AAED,MAAM,WAAW,kBAAkB;IACjC;;;;OAIG;IACH,cAAc,EAAE,CAAC,EAAE,EAAE,kBAAkB,GAAG,IAAI,KAAK,IAAI,CAAC;IAExD;;;;OAIG;IACH,SAAS,EAAE,CAAC,EAAE,EAAE,kBAAkB,KAAK,IAAI,CAAC;CAC7C;AAED,MAAM,WAAW,gBAAiB,SAAQ,kBAAkB;IAC1D,aAAa,EAAE,aAAa,CAAC,QAAQ,CAAC,cAAc,CAAC,CAAC,CAAC;IACvD,aAAa,EAAE,CAAC,KAAK,EAAE,aAAa,CAAC,cAAc,CAAC,KAAK,IAAI,CAAC;CAC/D"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { DataGridTreeItem, DataGridTreeItemId, DataGridTreeNode, DataGridTreeStructure } from '../../../tree-structure/tree-structure-types';
|
|
2
|
+
/**
|
|
3
|
+
* Get all visible nodes in tree order (depth-first traversal).
|
|
4
|
+
* Skips children of collapsed nodes.
|
|
5
|
+
*
|
|
6
|
+
* @param tree - Tree structure instance
|
|
7
|
+
* @param expandedIds - Set of expanded node IDs
|
|
8
|
+
* @returns Flat array of visible nodes in tree order
|
|
9
|
+
*/
|
|
10
|
+
export declare function getVisibleNodes<Item extends DataGridTreeItem>(tree: DataGridTreeStructure<Item>, expandedIds: Set<DataGridTreeItemId>): DataGridTreeNode<Item>[];
|
|
11
|
+
/**
|
|
12
|
+
* Get next visible node in tree order.
|
|
13
|
+
*
|
|
14
|
+
* @param nodes - Array of visible nodes
|
|
15
|
+
* @param currentId - Current node ID
|
|
16
|
+
* @returns Next visible node or null if at end
|
|
17
|
+
*/
|
|
18
|
+
export declare function getNextVisibleNode<Item extends DataGridTreeItem>(nodes: DataGridTreeNode<Item>[], currentId: DataGridTreeItemId): DataGridTreeNode<Item> | null;
|
|
19
|
+
/**
|
|
20
|
+
* Get previous visible node in tree order.
|
|
21
|
+
*
|
|
22
|
+
* @param nodes - Array of visible nodes
|
|
23
|
+
* @param currentId - Current node ID
|
|
24
|
+
* @returns Previous visible node or null if at start
|
|
25
|
+
*/
|
|
26
|
+
export declare function getPreviousVisibleNode<Item extends DataGridTreeItem>(nodes: DataGridTreeNode<Item>[], currentId: DataGridTreeItemId): DataGridTreeNode<Item> | null;
|
|
27
|
+
//# sourceMappingURL=navigation-helpers.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"navigation-helpers.d.ts","sourceRoot":"","sources":["../../../../../../src/components/data-grid/tree/services/focus/navigation-helpers.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,gBAAgB,EAChB,kBAAkB,EAClB,gBAAgB,EAChB,qBAAqB,EACtB,MAAM,8CAA8C,CAAC;AAEtD;;;;;;;GAOG;AACH,wBAAgB,eAAe,CAAC,IAAI,SAAS,gBAAgB,EAC3D,IAAI,EAAE,qBAAqB,CAAC,IAAI,CAAC,EACjC,WAAW,EAAE,GAAG,CAAC,kBAAkB,CAAC,GACnC,gBAAgB,CAAC,IAAI,CAAC,EAAE,CAc1B;AAED;;;;;;GAMG;AACH,wBAAgB,kBAAkB,CAAC,IAAI,SAAS,gBAAgB,EAC9D,KAAK,EAAE,gBAAgB,CAAC,IAAI,CAAC,EAAE,EAC/B,SAAS,EAAE,kBAAkB,GAC5B,gBAAgB,CAAC,IAAI,CAAC,GAAG,IAAI,CAM/B;AAED;;;;;;GAMG;AACH,wBAAgB,sBAAsB,CAAC,IAAI,SAAS,gBAAgB,EAClE,KAAK,EAAE,gBAAgB,CAAC,IAAI,CAAC,EAAE,EAC/B,SAAS,EAAE,kBAAkB,GAC5B,gBAAgB,CAAC,IAAI,CAAC,GAAG,IAAI,CAM/B"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { Hooked } from '../../../utils/hooked';
|
|
2
|
+
export interface TreeHooks {
|
|
3
|
+
init: () => void;
|
|
4
|
+
reset: () => void;
|
|
5
|
+
destroy: () => void;
|
|
6
|
+
}
|
|
7
|
+
export type TreeHooked<Hooks extends TreeHooks = TreeHooks> = Pick<Hooked<Hooks>, 'hook' | 'callHook' | 'callHookParallel' | 'callHookSync'>;
|
|
8
|
+
//# sourceMappingURL=hooked-types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"hooked-types.d.ts","sourceRoot":"","sources":["../../../../../../src/components/data-grid/tree/services/hooked/hooked-types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAC;AAEpD,MAAM,WAAW,SAAS;IACxB,IAAI,EAAE,MAAM,IAAI,CAAC;IACjB,KAAK,EAAE,MAAM,IAAI,CAAC;IAClB,OAAO,EAAE,MAAM,IAAI,CAAC;CACrB;AAED,MAAM,MAAM,UAAU,CAAC,KAAK,SAAS,SAAS,GAAG,SAAS,IAAI,IAAI,CAChE,MAAM,CAAC,KAAK,CAAC,EACb,MAAM,GAAG,UAAU,GAAG,kBAAkB,GAAG,cAAc,CAC1D,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"hooked.d.ts","sourceRoot":"","sources":["../../../../../../src/components/data-grid/tree/services/hooked/hooked.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,UAAU,EAAa,MAAM,gBAAgB,CAAC;AAE5D,wBAAgB,mBAAmB,IAAI,UAAU,CAShD"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"internal-helpers.d.ts","sourceRoot":"","sources":["../../../../../../src/components/data-grid/tree/services/internal/internal-helpers.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,kBAAkB,eAAkC,CAAC"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { DataGridTreeItem } from '../../../tree-structure/tree-structure-types';
|
|
2
|
+
import { TreeInternalContext } from '../../tree-types';
|
|
3
|
+
import { TreeLayoutService } from './layout-types';
|
|
4
|
+
export declare function createLayoutService<TItem extends DataGridTreeItem>(context: TreeInternalContext<TItem>): TreeLayoutService<TItem>;
|
|
5
|
+
//# sourceMappingURL=layout-service.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"layout-service.d.ts","sourceRoot":"","sources":["../../../../../../src/components/data-grid/tree/services/layout/layout-service.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EACV,gBAAgB,EAEjB,MAAM,8CAA8C,CAAC;AAGtD,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAC5D,OAAO,KAAK,EAEV,iBAAiB,EAOlB,MAAM,gBAAgB,CAAC;AAExB,wBAAgB,mBAAmB,CAAC,KAAK,SAAS,gBAAgB,EAChE,OAAO,EAAE,mBAAmB,CAAC,KAAK,CAAC,GAClC,iBAAiB,CAAC,KAAK,CAAC,CA8I1B"}
|
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
import { ComponentType } from 'react';
|
|
2
|
+
import { StoreApi, UseBoundStore } from 'zustand';
|
|
3
|
+
import { ComponentsStackService } from '../../../utils/components-stack';
|
|
4
|
+
import { DataGridTreeItem, DataGridTreeItemId, DataGridTreeNode } from '../../../tree-structure/tree-structure-types';
|
|
5
|
+
export interface TreeLayoutSlotLeftProps<TItem extends DataGridTreeItem> {
|
|
6
|
+
item: TItem;
|
|
7
|
+
node: DataGridTreeNode<TItem>;
|
|
8
|
+
}
|
|
9
|
+
export interface TreeLayoutSlotActionsProps<TItem extends DataGridTreeItem> {
|
|
10
|
+
item: TItem;
|
|
11
|
+
}
|
|
12
|
+
export interface TreeLayoutSlotLabelProps<TItem extends DataGridTreeItem> {
|
|
13
|
+
item: TItem;
|
|
14
|
+
label: string;
|
|
15
|
+
}
|
|
16
|
+
export interface TreeLayoutSlotPlaceholderProps<TItem extends DataGridTreeItem> {
|
|
17
|
+
parent: TItem | null;
|
|
18
|
+
}
|
|
19
|
+
export type TreeLayoutSlotBottomProps = Record<string, never>;
|
|
20
|
+
export interface TreeLayoutSlotDirectoryBottomProps<TItem extends DataGridTreeItem> {
|
|
21
|
+
node: DataGridTreeNode<TItem>;
|
|
22
|
+
}
|
|
23
|
+
export interface TreeLayoutSlotIconProps<TItem extends DataGridTreeItem> {
|
|
24
|
+
item: TItem;
|
|
25
|
+
expanded: boolean;
|
|
26
|
+
}
|
|
27
|
+
export interface TreeLayoutSlotBase<Name extends string> {
|
|
28
|
+
id: string;
|
|
29
|
+
name: Name;
|
|
30
|
+
order: number;
|
|
31
|
+
component: ComponentType<any>;
|
|
32
|
+
}
|
|
33
|
+
export type TreeLayoutSlot = TreeLayoutSlotBase<'left'> | TreeLayoutSlotBase<'actions'> | TreeLayoutSlotBase<'label'> | TreeLayoutSlotBase<'placeholder'> | TreeLayoutSlotBase<'bottom'> | TreeLayoutSlotBase<'directory-bottom'> | TreeLayoutSlotBase<'icon'>;
|
|
34
|
+
/**
|
|
35
|
+
* Layout slot names for the tree.
|
|
36
|
+
*
|
|
37
|
+
* - `'left'` - Left side of the node (e.g., checkbox)
|
|
38
|
+
* - `'icon'` - Node icon
|
|
39
|
+
* - `'label'` - Node label
|
|
40
|
+
* - `'actions'` - Actions on the right side
|
|
41
|
+
* - `'bottom'` - Content below the node
|
|
42
|
+
* - `'placeholder'` - Placeholder when tree is empty
|
|
43
|
+
* - `'directory-bottom'` - Content below directory nodes
|
|
44
|
+
*/
|
|
45
|
+
export type TreeLayoutSlotName = TreeLayoutSlot['name'];
|
|
46
|
+
export interface TreeLayoutSlotOptions<TItem extends DataGridTreeItem> {
|
|
47
|
+
left: {
|
|
48
|
+
component: ComponentType<TreeLayoutSlotLeftProps<TItem>>;
|
|
49
|
+
};
|
|
50
|
+
actions: {
|
|
51
|
+
component: ComponentType<TreeLayoutSlotActionsProps<TItem>>;
|
|
52
|
+
};
|
|
53
|
+
label: {
|
|
54
|
+
component: ComponentType<TreeLayoutSlotLabelProps<TItem>>;
|
|
55
|
+
};
|
|
56
|
+
placeholder: {
|
|
57
|
+
component: ComponentType<TreeLayoutSlotPlaceholderProps<TItem>>;
|
|
58
|
+
};
|
|
59
|
+
bottom: {
|
|
60
|
+
component: ComponentType<TreeLayoutSlotBottomProps>;
|
|
61
|
+
};
|
|
62
|
+
'directory-bottom': {
|
|
63
|
+
component: ComponentType<TreeLayoutSlotDirectoryBottomProps<TItem>>;
|
|
64
|
+
};
|
|
65
|
+
icon: {
|
|
66
|
+
component: ComponentType<TreeLayoutSlotIconProps<TItem>>;
|
|
67
|
+
};
|
|
68
|
+
}
|
|
69
|
+
export type TreeLayoutComponentName = 'leaf' | 'directory' | 'placeholder';
|
|
70
|
+
export type TreeLayoutComponentStacks = Record<TreeLayoutComponentName, ComponentsStackService>;
|
|
71
|
+
export interface TreeLayoutStore {
|
|
72
|
+
slots: Map<TreeLayoutSlotName, TreeLayoutSlot[]>;
|
|
73
|
+
expandedIds: Set<DataGridTreeItemId>;
|
|
74
|
+
activeIds: Set<DataGridTreeItemId>;
|
|
75
|
+
filter?: (item: DataGridTreeItem) => boolean;
|
|
76
|
+
}
|
|
77
|
+
export interface TreeLayoutPublicApi<TItem extends DataGridTreeItem = DataGridTreeItem> {
|
|
78
|
+
/**
|
|
79
|
+
* Register a component in a layout slot.
|
|
80
|
+
*
|
|
81
|
+
* @param name - The slot name to register the component in
|
|
82
|
+
* @param options - Configuration for the slot component
|
|
83
|
+
* @returns Unregister function
|
|
84
|
+
*/
|
|
85
|
+
registerSlot: <T extends TreeLayoutSlotName>(name: T, options: TreeLayoutSlotOptions<TItem>[T]) => () => void;
|
|
86
|
+
/**
|
|
87
|
+
* Register a component wrapper in the component stack.
|
|
88
|
+
* Allows plugins to wrap base components (e.g., drag-drop wrapping leaf components).
|
|
89
|
+
*
|
|
90
|
+
* @param name - Component type to wrap ('leaf', 'directory', 'placeholder')
|
|
91
|
+
* @param component - Wrapper component
|
|
92
|
+
*/
|
|
93
|
+
registerComponent: (name: TreeLayoutComponentName, component: ComponentType<any>) => void;
|
|
94
|
+
/**
|
|
95
|
+
* Toggle node expanded state.
|
|
96
|
+
*
|
|
97
|
+
* @param id - Node ID
|
|
98
|
+
* @param state - Optional explicit state
|
|
99
|
+
*/
|
|
100
|
+
toggleExpanded: (id: DataGridTreeItemId, state?: boolean) => void;
|
|
101
|
+
/**
|
|
102
|
+
* Toggle node active state.
|
|
103
|
+
*
|
|
104
|
+
* @param id - Node ID
|
|
105
|
+
* @param state - Optional explicit state
|
|
106
|
+
*/
|
|
107
|
+
toggleActive: (id: DataGridTreeItemId, state?: boolean) => void;
|
|
108
|
+
/**
|
|
109
|
+
* Clear all active nodes.
|
|
110
|
+
*/
|
|
111
|
+
clearActive: () => void;
|
|
112
|
+
/**
|
|
113
|
+
* Set filter function. Triggers re-render of filtered nodes.
|
|
114
|
+
*/
|
|
115
|
+
setFilter: (filter?: (item: TItem) => boolean) => void;
|
|
116
|
+
}
|
|
117
|
+
export interface TreeLayoutService<TItem extends DataGridTreeItem = DataGridTreeItem> extends TreeLayoutPublicApi<TItem> {
|
|
118
|
+
useLayoutStore: UseBoundStore<StoreApi<TreeLayoutStore>>;
|
|
119
|
+
useSlots: <T extends TreeLayoutSlotName>(name: T) => Extract<TreeLayoutSlot, {
|
|
120
|
+
name: T;
|
|
121
|
+
}>[];
|
|
122
|
+
useComponent: <TProps = unknown>(name: TreeLayoutComponentName) => ComponentType<TProps>;
|
|
123
|
+
}
|
|
124
|
+
//# sourceMappingURL=layout-types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"layout-types.d.ts","sourceRoot":"","sources":["../../../../../../src/components/data-gr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,CAAC,CAAC,SAAS,kBAAkB,EAAE,IAAI,EAAE,CAAC,KAAK,OAAO,CAAC,cAAc,EAAE;QAAE,IAAI,EAAE,CAAC,CAAA;KAAE,CAAC,EAAE,CAAC;IAC5F,YAAY,EAAE,CAAC,MAAM,GAAG,OAAO,EAAE,IAAI,EAAE,uBAAuB,KAAK,aAAa,CAAC,MAAM,CAAC,CAAC;CAC1F"}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { DataGridTreeItem } from '../../../tree-structure/tree-structure-types';
|
|
2
|
+
import { TreePluginContext } from './plugins-types';
|
|
3
|
+
export interface PluginApi<TProps extends Record<string, unknown> = Record<string, unknown>> {
|
|
4
|
+
onPropsChange?: (props: TProps) => void;
|
|
5
|
+
}
|
|
6
|
+
/**
|
|
7
|
+
* Creates a Tree plugin as a React component.
|
|
8
|
+
*
|
|
9
|
+
* @param name - Unique plugin name for plugin identification
|
|
10
|
+
* @param setup - Setup function that runs once on mount, returns plugin API
|
|
11
|
+
* @param propsAreEqual - Optional comparison function for React.memo to control re-renders
|
|
12
|
+
* @returns React component that accepts TProps and can be used as child of Tree
|
|
13
|
+
*
|
|
14
|
+
* @example
|
|
15
|
+
* ```tsx
|
|
16
|
+
* interface SelectPluginProps {
|
|
17
|
+
* initialSelectedIds?: string[];
|
|
18
|
+
* }
|
|
19
|
+
*
|
|
20
|
+
* interface SelectPluginApi extends PluginApi<SelectPluginProps> {
|
|
21
|
+
* useSelectStore: UseBoundStore<StoreApi<{ selectedIds: Set<string> }>>;
|
|
22
|
+
* }
|
|
23
|
+
*
|
|
24
|
+
* export const TreeNodeSelectPlugin = createTreePlugin<
|
|
25
|
+
* DataGridTreeItem,
|
|
26
|
+
* 'nodeSelect',
|
|
27
|
+
* SelectPluginProps
|
|
28
|
+
* >('nodeSelect', (context) => {
|
|
29
|
+
* const useSelectStore = create(() => ({ selectedIds: new Set() }));
|
|
30
|
+
*
|
|
31
|
+
* context.registerSlot('left', {
|
|
32
|
+
* id: 'checkbox',
|
|
33
|
+
* component: CheckboxComponent,
|
|
34
|
+
* });
|
|
35
|
+
*
|
|
36
|
+
* return {
|
|
37
|
+
* useSelectStore,
|
|
38
|
+
* onPropsChange,
|
|
39
|
+
* };
|
|
40
|
+
*
|
|
41
|
+
* function onPropsChange(props: SelectPluginProps) {
|
|
42
|
+
* if (props.initialSelectedIds) {
|
|
43
|
+
* useSelectStore.setState({ selectedIds: new Set(props.initialSelectedIds) });
|
|
44
|
+
* }
|
|
45
|
+
* }
|
|
46
|
+
* });
|
|
47
|
+
* ```
|
|
48
|
+
*/
|
|
49
|
+
export declare function createTreePlugin<TItem extends DataGridTreeItem = DataGridTreeItem, TName extends string = string, TProps extends Record<string, unknown> = Record<string, unknown>, TApi extends PluginApi<TProps> = PluginApi<TProps>>(name: TName, setup: (context: TreePluginContext<TItem>) => TApi, propsAreEqual?: (prevProps: Readonly<TProps>, nextProps: Readonly<TProps>) => boolean): import('react').NamedExoticComponent<TProps>;
|
|
50
|
+
//# sourceMappingURL=plugins-helpers.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"plugins-helpers.d.ts","sourceRoot":"","sources":["../../../../../../src/components/data-grid/tree/services/plugins/plugins-helpers.ts"],"names":[],"mappings":";AACA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,8CAA8C,CAAC;AAErF,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AAEzD,MAAM,WAAW,SAAS,CAAC,MAAM,SAAS,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;IACzF,aAAa,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;CACzC;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA0CG;AACH,wBAAgB,gBAAgB,CAC9B,KAAK,SAAS,gBAAgB,GAAG,gBAAgB,EACjD,KAAK,SAAS,MAAM,GAAG,MAAM,EAC7B,MAAM,SAAS,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAChE,IAAI,SAAS,SAAS,CAAC,MAAM,CAAC,GAAG,SAAS,CAAC,MAAM,CAAC,EAElD,IAAI,EAAE,KAAK,EACX,KAAK,EAAE,CAAC,OAAO,EAAE,iBAAiB,CAAC,KAAK,CAAC,KAAK,IAAI,EAClD,aAAa,CAAC,EAAE,CAAC,SAAS,EAAE,QAAQ,CAAC,MAAM,CAAC,EAAE,SAAS,EAAE,QAAQ,CAAC,MAAM,CAAC,KAAK,OAAO,gDAqBtF"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { DataGridTreeItem } from '../../../tree-structure/tree-structure-types';
|
|
2
|
+
import { TreeInternalContext } from '../../tree-types';
|
|
3
|
+
import { TreePluginsService } from './plugins-types';
|
|
4
|
+
export declare function createPluginsService<TItem extends DataGridTreeItem>(context: Pick<TreeInternalContext<TItem>, 'hooked'>): TreePluginsService<TItem>;
|
|
5
|
+
//# sourceMappingURL=plugins-service.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"plugins-service.d.ts","sourceRoot":"","sources":["../../../../../../src/components/data-grid/tree/services/plugins/plugins-service.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,8CAA8C,CAAC;AACrF,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAC5D,OAAO,KAAK,EAGV,kBAAkB,EAGnB,MAAM,iBAAiB,CAAC;AAIzB,wBAAgB,oBAAoB,CAAC,KAAK,SAAS,gBAAgB,EACjE,OAAO,EAAE,IAAI,CAAC,mBAAmB,CAAC,KAAK,CAAC,EAAE,QAAQ,CAAC,GAClD,kBAAkB,CAAC,KAAK,CAAC,CA6C3B"}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { DataGridTreeItem, DataGridTreeNode } from '../../../tree-structure/tree-structure-types';
|
|
2
|
+
import { TreeFocusPublicApi } from '../focus/focus-types';
|
|
3
|
+
import { TreeHooked } from '../hooked/hooked-types';
|
|
4
|
+
import { TreeLayoutPublicApi } from '../layout/layout-types';
|
|
5
|
+
import { TreeSettingsPublicApi } from '../settings/settings-types';
|
|
6
|
+
/**
|
|
7
|
+
* Node context provided to tree components.
|
|
8
|
+
* Includes node data and API methods for interaction.
|
|
9
|
+
*/
|
|
10
|
+
export interface TreeNodeContext<TItem extends DataGridTreeItem = DataGridTreeItem> {
|
|
11
|
+
node: DataGridTreeNode<TItem>;
|
|
12
|
+
item: TItem;
|
|
13
|
+
}
|
|
14
|
+
export interface TreePluginsPublicApi {
|
|
15
|
+
/**
|
|
16
|
+
* Register a lifecycle hook handler.
|
|
17
|
+
*
|
|
18
|
+
* @param name - Hook name (e.g., 'init', 'destroy')
|
|
19
|
+
* @param handler - Handler function to execute when hook is called
|
|
20
|
+
*/
|
|
21
|
+
hook: TreeHooked['hook'];
|
|
22
|
+
/**
|
|
23
|
+
* Access another plugin's API.
|
|
24
|
+
*
|
|
25
|
+
* @param name - Plugin name
|
|
26
|
+
* @returns The plugin's public API or undefined if not found
|
|
27
|
+
*/
|
|
28
|
+
getPlugin: <TApi>(name: string) => TApi | undefined;
|
|
29
|
+
}
|
|
30
|
+
export type TreeServicesPublicApiTypes<TItem extends DataGridTreeItem> = TreeLayoutPublicApi<TItem> | TreePluginsPublicApi | TreeSettingsPublicApi<TItem> | TreeFocusPublicApi;
|
|
31
|
+
export interface TreePluginContext<TItem extends DataGridTreeItem> extends TreeLayoutPublicApi<TItem>, TreePluginsPublicApi, TreeSettingsPublicApi<TItem>, TreeFocusPublicApi {
|
|
32
|
+
}
|
|
33
|
+
export interface TreePlugin<TItem extends DataGridTreeItem = DataGridTreeItem, TName extends string = string, TApi = void> {
|
|
34
|
+
name: TName;
|
|
35
|
+
setup: (context: TreePluginContext<TItem>) => TApi;
|
|
36
|
+
}
|
|
37
|
+
export interface TreePluginsService<TItem extends DataGridTreeItem> extends TreePluginsPublicApi {
|
|
38
|
+
registerPlugin: (plugin: TreePlugin<TItem>) => void;
|
|
39
|
+
registerPlugins: (plugins: TreePlugin<TItem>[]) => void;
|
|
40
|
+
registerPublicApi: (methods: TreeServicesPublicApiTypes<TItem>) => void;
|
|
41
|
+
pluginContext: TreePluginContext<TItem>;
|
|
42
|
+
}
|
|
43
|
+
//# sourceMappingURL=plugins-types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"plugins-types.d.ts","sourceRoot":"","sources":["../../../../../../src/components/data-grid/tree/services/plugins/plugins-types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,gBAAgB,EAChB,gBAAgB,EACjB,MAAM,8CAA8C,CAAC;AACtD,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAC/D,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AACzD,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,wBAAwB,CAAC;AAClE,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,4BAA4B,CAAC;AAExE;;;GAGG;AACH,MAAM,WAAW,eAAe,CAAC,KAAK,SAAS,gBAAgB,GAAG,gBAAgB;IAChF,IAAI,EAAE,gBAAgB,CAAC,KAAK,CAAC,CAAC;IAC9B,IAAI,EAAE,KAAK,CAAC;CACb;AAED,MAAM,WAAW,oBAAoB;IACnC;;;;;OAKG;IACH,IAAI,EAAE,UAAU,CAAC,MAAM,CAAC,CAAC;IAEzB;;;;;OAKG;IACH,SAAS,EAAE,CAAC,IAAI,EAAE,IAAI,EAAE,MAAM,KAAK,IAAI,GAAG,SAAS,CAAC;CACrD;AAED,MAAM,MAAM,0BAA0B,CAAC,KAAK,SAAS,gBAAgB,IACjE,mBAAmB,CAAC,KAAK,CAAC,GAC1B,oBAAoB,GACpB,qBAAqB,CA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