@gears-frontx/ui-kit 0.4.4 → 0.4.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/dist/chunks/actions.iasfkjWq.css +1 -0
- package/dist/chunks/create-column-auto-size.js +62 -0
- package/dist/chunks/create-column-auto-size.js.map +1 -0
- package/dist/chunks/data-grid-record-context.js +13 -0
- package/dist/chunks/data-grid-record-context.js.map +1 -0
- package/dist/chunks/data-grid.-6P4UQGJ.css +1 -0
- package/dist/chunks/debounce.js +17 -0
- package/dist/chunks/debounce.js.map +1 -0
- package/dist/chunks/empty.Cfg5lE0n.css +1 -0
- package/dist/chunks/filters.DcFdZpNG.css +1 -0
- package/dist/chunks/hooked.js +44 -0
- package/dist/chunks/hooked.js.map +1 -0
- package/dist/chunks/ignore-row-click.js +5 -0
- package/dist/chunks/ignore-row-click.js.map +1 -0
- package/dist/chunks/messages.js +34 -3
- package/dist/chunks/messages.js.map +1 -1
- package/dist/chunks/pagination.DPVITj_D.css +1 -0
- package/dist/chunks/resolve-body-cell-props.DGczzk1U.css +1 -0
- package/dist/chunks/resolve-body-cell-props.js +140 -0
- package/dist/chunks/resolve-body-cell-props.js.map +1 -0
- package/dist/chunks/row-actions.BprAXgu2.css +1 -0
- package/dist/chunks/row-click.DAYTmSBO.css +1 -0
- package/dist/chunks/row-number.C7fNu9Bw.css +1 -0
- package/dist/chunks/row-select.BjKdiMf5.css +1 -0
- package/dist/chunks/table-configuration.a6C_fp7B.css +1 -0
- package/dist/chunks/table-context.js +8 -0
- package/dist/chunks/table-context.js.map +1 -0
- package/dist/chunks/table-types.js +11 -0
- package/dist/chunks/table-types.js.map +1 -0
- package/dist/chunks/table.Dmz7LEk7.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 +31 -0
- package/dist/components/data-grid/messages.d.ts.map +1 -1
- package/dist/components/data-grid/plugins/actions/actions-plugin.d.ts +4 -0
- package/dist/components/data-grid/plugins/actions/actions-plugin.d.ts.map +1 -0
- package/dist/components/data-grid/plugins/actions/actions-types.d.ts +11 -0
- package/dist/components/data-grid/plugins/actions/actions-types.d.ts.map +1 -0
- package/dist/components/data-grid/plugins/actions/components/data-grid-actions-wrapper.d.ts +3 -0
- package/dist/components/data-grid/plugins/actions/components/data-grid-actions-wrapper.d.ts.map +1 -0
- package/dist/components/data-grid/plugins/actions/public.d.ts +3 -0
- package/dist/components/data-grid/plugins/actions/public.d.ts.map +1 -0
- package/dist/components/data-grid/plugins/actions-menu/actions-menu-plugin.d.ts +3 -0
- package/dist/components/data-grid/plugins/actions-menu/actions-menu-plugin.d.ts.map +1 -0
- package/dist/components/data-grid/plugins/actions-menu/actions-menu-types.d.ts +25 -0
- package/dist/components/data-grid/plugins/actions-menu/actions-menu-types.d.ts.map +1 -0
- package/dist/components/data-grid/plugins/actions-menu/components/data-grid-actions-menu.d.ts +3 -0
- package/dist/components/data-grid/plugins/actions-menu/components/data-grid-actions-menu.d.ts.map +1 -0
- package/dist/components/data-grid/plugins/actions-menu/public.d.ts +3 -0
- package/dist/components/data-grid/plugins/actions-menu/public.d.ts.map +1 -0
- 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/plugins/row-actions/components/data-grid-row-actions-cell.d.ts +3 -0
- package/dist/components/data-grid/plugins/row-actions/components/data-grid-row-actions-cell.d.ts.map +1 -0
- package/dist/components/data-grid/plugins/row-actions/public.d.ts +3 -0
- package/dist/components/data-grid/plugins/row-actions/public.d.ts.map +1 -0
- package/dist/components/data-grid/plugins/row-actions/row-actions-plugin.d.ts +6 -0
- package/dist/components/data-grid/plugins/row-actions/row-actions-plugin.d.ts.map +1 -0
- package/dist/components/data-grid/plugins/row-actions/row-actions-types.d.ts +24 -0
- package/dist/components/data-grid/plugins/row-actions/row-actions-types.d.ts.map +1 -0
- package/dist/components/data-grid/plugins/row-click/components/data-grid-row-click.d.ts +8 -0
- package/dist/components/data-grid/plugins/row-click/components/data-grid-row-click.d.ts.map +1 -0
- package/dist/components/data-grid/plugins/row-click/public.d.ts +3 -0
- package/dist/components/data-grid/plugins/row-click/public.d.ts.map +1 -0
- package/dist/components/data-grid/plugins/row-click/row-click-plugin.d.ts +14 -0
- package/dist/components/data-grid/plugins/row-click/row-click-plugin.d.ts.map +1 -0
- package/dist/components/data-grid/plugins/row-click/row-click-utils.d.ts +9 -0
- package/dist/components/data-grid/plugins/row-click/row-click-utils.d.ts.map +1 -0
- package/dist/components/data-grid/plugins/row-number/components/data-grid-row-number-cell.d.ts +3 -0
- package/dist/components/data-grid/plugins/row-number/components/data-grid-row-number-cell.d.ts.map +1 -0
- package/dist/components/data-grid/plugins/row-number/public.d.ts +3 -0
- package/dist/components/data-grid/plugins/row-number/public.d.ts.map +1 -0
- package/dist/components/data-grid/plugins/row-number/row-number-plugin.d.ts +4 -0
- package/dist/components/data-grid/plugins/row-number/row-number-plugin.d.ts.map +1 -0
- package/dist/components/data-grid/plugins/row-number/row-number-types.d.ts +6 -0
- package/dist/components/data-grid/plugins/row-number/row-number-types.d.ts.map +1 -0
- package/dist/components/data-grid/plugins/row-number/services/row-number-formula.d.ts +2 -0
- package/dist/components/data-grid/plugins/row-number/services/row-number-formula.d.ts.map +1 -0
- package/dist/components/data-grid/plugins/row-select/components/data-grid-row-select-banner.d.ts +3 -0
- package/dist/components/data-grid/plugins/row-select/components/data-grid-row-select-banner.d.ts.map +1 -0
- package/dist/components/data-grid/plugins/row-select/components/data-grid-row-select-body.d.ts +3 -0
- package/dist/components/data-grid/plugins/row-select/components/data-grid-row-select-body.d.ts.map +1 -0
- package/dist/components/data-grid/plugins/row-select/components/data-grid-row-select-header.d.ts +3 -0
- package/dist/components/data-grid/plugins/row-select/components/data-grid-row-select-header.d.ts.map +1 -0
- package/dist/components/data-grid/plugins/row-select/components/data-grid-row-select-top.d.ts +3 -0
- package/dist/components/data-grid/plugins/row-select/components/data-grid-row-select-top.d.ts.map +1 -0
- package/dist/components/data-grid/plugins/row-select/public.d.ts +3 -0
- package/dist/components/data-grid/plugins/row-select/public.d.ts.map +1 -0
- package/dist/components/data-grid/plugins/row-select/row-select-plugin.d.ts +5 -0
- package/dist/components/data-grid/plugins/row-select/row-select-plugin.d.ts.map +1 -0
- package/dist/components/data-grid/plugins/row-select/row-select-types.d.ts +113 -0
- package/dist/components/data-grid/plugins/row-select/row-select-types.d.ts.map +1 -0
- package/dist/components/data-grid/plugins/table-configuration/components/data-grid-table-configuration-group-item.d.ts +10 -0
- package/dist/components/data-grid/plugins/table-configuration/components/data-grid-table-configuration-group-item.d.ts.map +1 -0
- package/dist/components/data-grid/plugins/table-configuration/components/data-grid-table-configuration-item.d.ts +10 -0
- package/dist/components/data-grid/plugins/table-configuration/components/data-grid-table-configuration-item.d.ts.map +1 -0
- package/dist/components/data-grid/plugins/table-configuration/components/data-grid-table-configuration-pin-button.d.ts +8 -0
- package/dist/components/data-grid/plugins/table-configuration/components/data-grid-table-configuration-pin-button.d.ts.map +1 -0
- package/dist/components/data-grid/plugins/table-configuration/components/data-grid-table-configuration-trigger.d.ts +3 -0
- package/dist/components/data-grid/plugins/table-configuration/components/data-grid-table-configuration-trigger.d.ts.map +1 -0
- package/dist/components/data-grid/plugins/table-configuration/components/data-grid-table-configuration.d.ts +3 -0
- package/dist/components/data-grid/plugins/table-configuration/components/data-grid-table-configuration.d.ts.map +1 -0
- package/dist/components/data-grid/plugins/table-configuration/public.d.ts +3 -0
- package/dist/components/data-grid/plugins/table-configuration/public.d.ts.map +1 -0
- package/dist/components/data-grid/plugins/table-configuration/table-configuration-plugin.d.ts +5 -0
- package/dist/components/data-grid/plugins/table-configuration/table-configuration-plugin.d.ts.map +1 -0
- package/dist/components/data-grid/services/layout/components/data-grid-layout-top.d.ts.map +1 -1
- package/dist/components/data-grid/services/layout/components/toolbar-lines.d.ts +2 -0
- package/dist/components/data-grid/services/layout/components/toolbar-lines.d.ts.map +1 -0
- package/dist/components/data-grid/services/table/components/data-grid-cell.d.ts.map +1 -1
- package/dist/components/data-grid/services/table/components/data-grid-extra-header-cell.d.ts.map +1 -1
- package/dist/components/data-grid/services/table/components/data-grid-header-cell.d.ts.map +1 -1
- package/dist/components/data-grid/services/table/components/data-grid-header-group.d.ts.map +1 -1
- package/dist/components/data-grid/services/table/table-service.d.ts.map +1 -1
- package/dist/components/data-grid/services/table/table-sticky.d.ts +16 -0
- package/dist/components/data-grid/services/table/table-sticky.d.ts.map +1 -1
- 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/components/table/table.d.ts +20 -3
- package/dist/components/table/table.d.ts.map +1 -1
- package/dist/data-grid/actions-menu.d.ts +1 -0
- package/dist/data-grid/actions-menu.js +57 -0
- package/dist/data-grid/actions-menu.js.map +1 -0
- package/dist/data-grid/actions.d.ts +1 -0
- package/dist/data-grid/actions.js +36 -0
- package/dist/data-grid/actions.js.map +1 -0
- package/dist/data-grid/filters.d.ts +1 -0
- package/dist/data-grid/filters.js +1634 -0
- package/dist/data-grid/filters.js.map +1 -0
- package/dist/data-grid/pagination.js +41 -40
- package/dist/data-grid/pagination.js.map +1 -1
- package/dist/data-grid/row-actions.d.ts +1 -0
- package/dist/data-grid/row-actions.js +52 -0
- package/dist/data-grid/row-actions.js.map +1 -0
- package/dist/data-grid/row-click.d.ts +1 -0
- package/dist/data-grid/row-click.js +69 -0
- package/dist/data-grid/row-click.js.map +1 -0
- package/dist/data-grid/row-number.d.ts +1 -0
- package/dist/data-grid/row-number.js +38 -0
- package/dist/data-grid/row-number.js.map +1 -0
- package/dist/data-grid/row-select.d.ts +1 -0
- package/dist/data-grid/row-select.js +293 -0
- package/dist/data-grid/row-select.js.map +1 -0
- package/dist/data-grid/table-configuration.d.ts +1 -0
- package/dist/data-grid/table-configuration.js +165 -0
- package/dist/data-grid/table-configuration.js.map +1 -0
- package/dist/data-grid/text-search.js +55 -67
- package/dist/data-grid/text-search.js.map +1 -1
- package/dist/data-grid.js +901 -1009
- package/dist/data-grid.js.map +1 -1
- package/dist/docs/data-grid.md +504 -11
- package/dist/docs/table.md +57 -2
- package/dist/empty.js +34 -34
- package/dist/index.d.ts +8 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +418 -393
- package/dist/index.js.map +1 -1
- package/dist/table.js +114 -112
- package/dist/table.js.map +1 -1
- package/llms.txt +9 -7
- package/package.json +1 -1
- package/dist/chunks/data-grid.DIkpRRaf.css +0 -1
- package/dist/chunks/empty.DWqLrSfF.css +0 -1
- package/dist/chunks/pagination.BAAl9D_S.css +0 -1
- package/dist/chunks/table.CMm41tvy.css +0 -1
|
@@ -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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AAe,CAAC,CAAC,CAAC;IACzD,QAAQ,EAAE,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,CAAC,KAAK,CAAC,GAC5B,kBAAkB,CAAC;AAEvB,MAAM,WAAW,iBAAiB,CAAC,KAAK,SAAS,gBAAgB,CAC/D,SACE,mBAAmB,CAAC,KAAK,CAAC,EAC1B,oBAAoB,EACpB,qBAAqB,CAAC,KAAK,CAAC,EAC5B,kBAAkB;CAAG;AAEzB,MAAM,WAAW,UAAU,CACzB,KAAK,SAAS,gBAAgB,GAAG,gBAAgB,EACjD,KAAK,SAAS,MAAM,GAAG,MAAM,EAC7B,IAAI,GAAG,IAAI;IAEX,IAAI,EAAE,KAAK,CAAC;IACZ,KAAK,EAAE,CAAC,OAAO,EAAE,iBAAiB,CAAC,KAAK,CAAC,KAAK,IAAI,CAAC;CACpD;AAED,MAAM,WAAW,kBAAkB,CAAC,KAAK,SAAS,gBAAgB,CAAE,SAAQ,oBAAoB;IAC9F,cAAc,EAAE,CAAC,MAAM,EAAE,UAAU,CAAC,KAAK,CAAC,KAAK,IAAI,CAAC;IACpD,eAAe,EAAE,CAAC,OAAO,EAAE,UAAU,CAAC,KAAK,CAAC,EAAE,KAAK,IAAI,CAAC;IACxD,iBAAiB,EAAE,CAAC,OAAO,EAAE,0BAA0B,CAAC,KAAK,CAAC,KAAK,IAAI,CAAC;IACxE,aAAa,EAAE,iBAAiB,CAAC,KAAK,CAAC,CAAC;CACzC"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { DataGridTreeItem } from '../../../tree-structure/tree-structure-types';
|
|
2
|
+
import { TreeInternalContext, TreeConfig } from '../../tree-types';
|
|
3
|
+
import { TreeSettingsService } from './settings-types';
|
|
4
|
+
export declare function createSettingsService<TItem extends DataGridTreeItem>(context: TreeInternalContext<TItem>, config: TreeConfig<TItem>): TreeSettingsService<TItem>;
|
|
5
|
+
//# sourceMappingURL=settings-service.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"settings-service.d.ts","sourceRoot":"","sources":["../../../../../../src/components/data-grid/tree/services/settings/settings-service.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,8CAA8C,CAAC;AACrF,OAAO,KAAK,EAAE,mBAAmB,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AACxE,OAAO,KAAK,EAAyB,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAEnF,wBAAgB,qBAAqB,CAAC,KAAK,SAAS,gBAAgB,EAClE,OAAO,EAAE,mBAAmB,CAAC,KAAK,CAAC,EACnC,MAAM,EAAE,UAAU,CAAC,KAAK,CAAC,GACxB,mBAAmB,CAAC,KAAK,CAAC,CAa5B"}
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import { RefObject } from 'react';
|
|
2
|
+
import { DataGridTreeItem, DataGridTreeStructure } from '../../../tree-structure/tree-structure-types';
|
|
3
|
+
import { TreeConfig } from '../../tree-types';
|
|
4
|
+
import { TreeNodeContext } from '../plugins/plugins-types';
|
|
5
|
+
export type TreeSettingsClickCallback<TItem extends DataGridTreeItem = DataGridTreeItem> = (node: {
|
|
6
|
+
id: string | number;
|
|
7
|
+
item: TItem;
|
|
8
|
+
}) => void;
|
|
9
|
+
export type TreeLabel<TItem extends DataGridTreeItem> = (keyof TItem & string) | ((item: TItem) => string);
|
|
10
|
+
export type TreeDirectoryBottomShowOption = boolean | 'when_expanded';
|
|
11
|
+
export type TreeActionsShowOption = boolean | 'when_hover';
|
|
12
|
+
/**
|
|
13
|
+
* Tree settings configuration
|
|
14
|
+
*/
|
|
15
|
+
export interface TreeSettings<TItem extends DataGridTreeItem> {
|
|
16
|
+
/**
|
|
17
|
+
* Make the whole node as "button" and attach click listeners
|
|
18
|
+
* Use with caution! If you have active elements inside, you should not pass it
|
|
19
|
+
*/
|
|
20
|
+
click?: TreeSettingsClickCallback<TItem>;
|
|
21
|
+
/** Tree data structure with operations (REQUIRED) */
|
|
22
|
+
treeStructure: DataGridTreeStructure<TItem>;
|
|
23
|
+
/** Ellipsis option passed to list item (optional) */
|
|
24
|
+
ellipsis?: boolean;
|
|
25
|
+
/**
|
|
26
|
+
* Whether to show inline start slot or not
|
|
27
|
+
* @default 'leaf'
|
|
28
|
+
*/
|
|
29
|
+
showInlineStart?: 'leaf' | 'directory' | ((item: TItem) => boolean);
|
|
30
|
+
/**
|
|
31
|
+
* When to show directory-bottom slot
|
|
32
|
+
* - true: show for all directories
|
|
33
|
+
* - false: never show
|
|
34
|
+
* - 'when_expanded': show only for expanded directories
|
|
35
|
+
*/
|
|
36
|
+
showDirectoryBottom?: (item: TItem, ctx: TreeNodeContext<TItem>) => TreeDirectoryBottomShowOption;
|
|
37
|
+
/**
|
|
38
|
+
* When to show actions slot
|
|
39
|
+
* - true: show always
|
|
40
|
+
* - false: never show
|
|
41
|
+
* - 'when_hover': show only on hover
|
|
42
|
+
*/
|
|
43
|
+
showActions?: (item: TItem, ctx: TreeNodeContext<TItem>) => TreeActionsShowOption;
|
|
44
|
+
/**
|
|
45
|
+
* Get value from node and format it (REQUIRED)
|
|
46
|
+
* Can be property name (keyof Item & string) or function
|
|
47
|
+
*/
|
|
48
|
+
label: TreeLabel<TItem>;
|
|
49
|
+
/**
|
|
50
|
+
* Filter items for display. Return true to show item, false to hide.
|
|
51
|
+
* This is for visual filtering only and doesn't mutate the underlying data.
|
|
52
|
+
*/
|
|
53
|
+
filter?: (item: TItem) => boolean;
|
|
54
|
+
/**
|
|
55
|
+
* Node ID to focus on mount. If not provided, focus is determined automatically
|
|
56
|
+
* based on selection state.
|
|
57
|
+
*/
|
|
58
|
+
initialFocusedNodeId?: string | number;
|
|
59
|
+
/**
|
|
60
|
+
* Accessible label for the tree. Provides a name for screen readers.
|
|
61
|
+
*/
|
|
62
|
+
ariaLabel?: string;
|
|
63
|
+
/**
|
|
64
|
+
* ID of element that labels the tree. Alternative to ariaLabel.
|
|
65
|
+
*/
|
|
66
|
+
ariaLabelledBy?: string;
|
|
67
|
+
}
|
|
68
|
+
export interface TreeSettingsPublicApi<TItem extends DataGridTreeItem> {
|
|
69
|
+
settings: TreeConfig<TItem>;
|
|
70
|
+
treeStructure: RefObject<DataGridTreeStructure<TItem>>;
|
|
71
|
+
}
|
|
72
|
+
export type TreeSettingsService<TItem extends DataGridTreeItem> = TreeConfig<TItem>;
|
|
73
|
+
//# sourceMappingURL=settings-types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"settings-types.d.ts","sourceRoot":"","sources":["../../../../../../src/components/data-grid/tree/services/settings/settings-types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACvC,OAAO,KAAK,EACV,gBAAgB,EAChB,qBAAqB,EACtB,MAAM,8CAA8C,CAAC;AACtD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AACnD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAC;AAEhE,MAAM,MAAM,yBAAyB,CAAC,KAAK,SAAS,gBAAgB,GAAG,gBAAgB,IAAI,CAAC,IAAI,EAAE;IAChG,EAAE,EAAE,MAAM,GAAG,MAAM,CAAC;IACpB,IAAI,EAAE,KAAK,CAAC;CACb,KAAK,IAAI,CAAC;AAEX,MAAM,MAAM,SAAS,CAAC,KAAK,SAAS,gBAAgB,IAClD,CAAC,MAAM,KAAK,GAAG,MAAM,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,KAAK,KAAK,MAAM,CAAC,CAAC;AAErD,MAAM,MAAM,6BAA6B,GAAG,OAAO,GAAG,eAAe,CAAC;AAEtE,MAAM,MAAM,qBAAqB,GAAG,OAAO,GAAG,YAAY,CAAC;AAE3D;;GAEG;AACH,MAAM,WAAW,YAAY,CAAC,KAAK,SAAS,gBAAgB;IAC1D;;;OAGG;IACH,KAAK,CAAC,EAAE,yBAAyB,CAAC,KAAK,CAAC,CAAC;IAEzC,qDAAqD;IACrD,aAAa,EAAE,qBAAqB,CAAC,KAAK,CAAC,CAAC;IAE5C,qDAAqD;IACrD,QAAQ,CAAC,EAAE,OAAO,CAAC;IAEnB;;;OAGG;IACH,eAAe,CAAC,EAAE,MAAM,GAAG,WAAW,GAAG,CAAC,CAAC,IAAI,EAAE,KAAK,KAAK,OAAO,CAAC,CAAC;IAEpE;;;;;OAKG;IACH,mBAAmB,CAAC,EAAE,CAAC,IAAI,EAAE,KAAK,EAAE,GAAG,EAAE,eAAe,CAAC,KAAK,CAAC,KAAK,6BAA6B,CAAC;IAElG;;;;;OAKG;IACH,WAAW,CAAC,EAAE,CAAC,IAAI,EAAE,KAAK,EAAE,GAAG,EAAE,eAAe,CAAC,KAAK,CAAC,KAAK,qBAAqB,CAAC;IAElF;;;OAGG;IACH,KAAK,EAAE,SAAS,CAAC,KAAK,CAAC,CAAC;IAExB;;;OAGG;IACH,MAAM,CAAC,EAAE,CAAC,IAAI,EAAE,KAAK,KAAK,OAAO,CAAC;IAElC;;;OAGG;IACH,oBAAoB,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IAEvC;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB;;OAEG;IACH,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB;AAED,MAAM,WAAW,qBAAqB,CAAC,KAAK,SAAS,gBAAgB;IACnE,QAAQ,EAAE,UAAU,CAAC,KAAK,CAAC,CAAC;IAC5B,aAAa,EAAE,SAAS,CAAC,qBAAqB,CAAC,KAAK,CAAC,CAAC,CAAC;CACxD;AAED,MAAM,MAAM,mBAAmB,CAAC,KAAK,SAAS,gBAAgB,IAAI,UAAU,CAAC,KAAK,CAAC,CAAC"}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { ReactNode, RefObject } from 'react';
|
|
2
|
+
import { DataGridTreeItem, DataGridTreeStructure } from '../tree-structure/tree-structure-types';
|
|
3
|
+
import { TreeFocusService } from './services/focus/focus-types';
|
|
4
|
+
import { TreeHooked } from './services/hooked/hooked-types';
|
|
5
|
+
import { internalContextKey } from './services/internal/internal-helpers';
|
|
6
|
+
import { TreeLayoutService } from './services/layout/layout-types';
|
|
7
|
+
import { TreePluginsService, TreePlugin, TreePluginContext } from './services/plugins/plugins-types';
|
|
8
|
+
import { TreeSettings, TreeSettingsService } from './services/settings/settings-types';
|
|
9
|
+
/**
|
|
10
|
+
* Tree configuration
|
|
11
|
+
*/
|
|
12
|
+
export interface TreeConfig<TItem extends DataGridTreeItem> extends Omit<TreeSettings<TItem>, 'treeStructure'> {
|
|
13
|
+
name: string;
|
|
14
|
+
treeStructure: RefObject<DataGridTreeStructure<TItem>>;
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* Tree component props
|
|
18
|
+
*/
|
|
19
|
+
export interface TreeProps<TItem extends DataGridTreeItem> extends TreeSettings<TItem> {
|
|
20
|
+
name: string;
|
|
21
|
+
children?: ReactNode;
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* Internal context passed to services and plugins
|
|
25
|
+
*/
|
|
26
|
+
export interface TreeInternalContext<TItem extends DataGridTreeItem> {
|
|
27
|
+
hooked: TreeHooked;
|
|
28
|
+
plugins: TreePluginsService<TItem>;
|
|
29
|
+
layout: TreeLayoutService<TItem>;
|
|
30
|
+
settings: TreeSettingsService<TItem>;
|
|
31
|
+
focus: TreeFocusService;
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* Tree instance
|
|
35
|
+
*/
|
|
36
|
+
export interface TreeInstance<TItem extends DataGridTreeItem, TPlugins extends TreePlugin<TItem>[] = TreePlugin<TItem>[]> extends Omit<TreePluginContext<TItem>, 'getPlugin'> {
|
|
37
|
+
init: () => Promise<void>;
|
|
38
|
+
destroy: () => void;
|
|
39
|
+
getPlugin: (<TApi>(name: string) => TApi | undefined) & (<TName extends TPlugins[number]['name']>(name: TName) => ReturnType<Extract<TPlugins[number], {
|
|
40
|
+
name: TName;
|
|
41
|
+
}>['setup']>);
|
|
42
|
+
[internalContextKey]: TreeInternalContext<TItem>;
|
|
43
|
+
}
|
|
44
|
+
//# sourceMappingURL=tree-types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tree-types.d.ts","sourceRoot":"","sources":["../../../../src/components/data-grid/tree/tree-types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAClD,OAAO,KAAK,EACV,gBAAgB,EAChB,qBAAqB,EACtB,MAAM,wCAAwC,CAAC;AAChD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,8BAA8B,CAAC;AACrE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,gCAAgC,CAAC;AACjE,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,sCAAsC,CAAC;AAC/E,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAC;AACxE,OAAO,KAAK,EACV,kBAAkB,EAClB,UAAU,EACV,iBAAiB,EAClB,MAAM,kCAAkC,CAAC;AAC1C,OAAO,KAAK,EAAE,YAAY,EAAE,mBAAmB,EAAE,MAAM,oCAAoC,CAAC;AAE5F;;GAEG;AACH,MAAM,WAAW,UAAU,CAAC,KAAK,SAAS,gBAAgB,CAAE,SAAQ,IAAI,CACtE,YAAY,CAAC,KAAK,CAAC,EACnB,eAAe,CAChB;IACC,IAAI,EAAE,MAAM,CAAC;IACb,aAAa,EAAE,SAAS,CAAC,qBAAqB,CAAC,KAAK,CAAC,CAAC,CAAC;CACxD;AAED;;GAEG;AACH,MAAM,WAAW,SAAS,CAAC,KAAK,SAAS,gBAAgB,CAAE,SAAQ,YAAY,CAAC,KAAK,CAAC;IACpF,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,CAAC,EAAE,SAAS,CAAC;CACtB;AAED;;GAEG;AACH,MAAM,WAAW,mBAAmB,CAAC,KAAK,SAAS,gBAAgB;IACjE,MAAM,EAAE,UAAU,CAAC;IACnB,OAAO,EAAE,kBAAkB,CAAC,KAAK,CAAC,CAAC;IACnC,MAAM,EAAE,iBAAiB,CAAC,KAAK,CAAC,CAAC;IACjC,QAAQ,EAAE,mBAAmB,CAAC,KAAK,CAAC,CAAC;IACrC,KAAK,EAAE,gBAAgB,CAAC;CACzB;AAED;;GAEG;AACH,MAAM,WAAW,YAAY,CAC3B,KAAK,SAAS,gBAAgB,EAC9B,QAAQ,SAAS,UAAU,CAAC,KAAK,CAAC,EAAE,GAAG,UAAU,CAAC,KAAK,CAAC,EAAE,CAC1D,SAAQ,IAAI,CAAC,iBAAiB,CAAC,KAAK,CAAC,EAAE,WAAW,CAAC;IACnD,IAAI,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;IAC1B,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,SAAS,EAAE,CAAC,CAAC,IAAI,EAAE,IAAI,EAAE,MAAM,KAAK,IAAI,GAAG,SAAS,CAAC,GACnD,CAAC,CAAC,KAAK,SAAS,QAAQ,CAAC,MAAM,CAAC,CAAC,MAAM,CAAC,EACtC,IAAI,EAAE,KAAK,KACR,UAAU,CAAC,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAC,EAAE;QAAE,IAAI,EAAE,KAAK,CAAA;KAAE,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC;IACxE,CAAC,kBAAkB,CAAC,EAAE,mBAAmB,CAAC,KAAK,CAAC,CAAC;CAClD"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { DataGridTreeItem } from '../tree-structure/tree-structure-types';
|
|
2
|
+
import { TreeProps } from './tree-types';
|
|
3
|
+
export declare function Tree<TItem extends DataGridTreeItem = DataGridTreeItem>({ name, treeStructure, children, ...settingsProps }: TreeProps<TItem>): import("react").JSX.Element;
|
|
4
|
+
//# sourceMappingURL=tree.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tree.d.ts","sourceRoot":"","sources":["../../../../src/components/data-grid/tree/tree.tsx"],"names":[],"mappings":";AACA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,wCAAwC,CAAC;AAM/E,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAE9C,wBAAgB,IAAI,CAAC,KAAK,SAAS,gBAAgB,GAAG,gBAAgB,EAAE,EACtE,IAAI,EACJ,aAAa,EACb,QAAQ,EACR,GAAG,aAAa,EACjB,EAAE,SAAS,CAAC,KAAK,CAAC,+BAoBlB"}
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
export type DataGridTreeItemId = string | number;
|
|
2
|
+
export type DataGridTreeParentId = DataGridTreeItemId | null;
|
|
3
|
+
export type DataGridTreeItemKey<Item extends DataGridTreeItem> = DataGridTreeItemId | ((item: Item) => DataGridTreeItemId);
|
|
4
|
+
export type DataGridTreeParentKey<Item extends DataGridTreeItem> = DataGridTreeItemId | ((item: Item) => DataGridTreeParentId | undefined);
|
|
5
|
+
export type DataGridTreeChildrenKey<Item extends DataGridTreeItem> = DataGridTreeItemId | ((item: Item) => Item[] | null | undefined);
|
|
6
|
+
export type DataGridTreeItem = Record<DataGridTreeItemId, unknown>;
|
|
7
|
+
export interface DataGridTreeNode<Item extends DataGridTreeItem = DataGridTreeItem> {
|
|
8
|
+
id: DataGridTreeItemId;
|
|
9
|
+
parentId: DataGridTreeParentId;
|
|
10
|
+
isLeaf: boolean;
|
|
11
|
+
parent: DataGridTreeNode<Item> | null;
|
|
12
|
+
item: Item;
|
|
13
|
+
children: DataGridTreeNode<Item>[];
|
|
14
|
+
}
|
|
15
|
+
export type DataGridTreeStructureConfig<Item extends DataGridTreeItem> = {
|
|
16
|
+
/**
|
|
17
|
+
* Initial items
|
|
18
|
+
*/
|
|
19
|
+
items?: Item[];
|
|
20
|
+
/**
|
|
21
|
+
* If string - it will be used as "key" to get value from item
|
|
22
|
+
* If function - result of the function will be used as a unique key
|
|
23
|
+
*/
|
|
24
|
+
itemKey?: DataGridTreeItemKey<Item>;
|
|
25
|
+
/**
|
|
26
|
+
* Determines whether an item is leaf (has no children)
|
|
27
|
+
*/
|
|
28
|
+
isLeaf?: (item: Item) => boolean;
|
|
29
|
+
} & ({
|
|
30
|
+
/**
|
|
31
|
+
* If string - it will be used as "key" to get value from item
|
|
32
|
+
* If function - result of the function will be used as a parent id
|
|
33
|
+
*/
|
|
34
|
+
parentKey?: DataGridTreeParentKey<Item>;
|
|
35
|
+
childrenKey?: never;
|
|
36
|
+
} | {
|
|
37
|
+
/**
|
|
38
|
+
* If string - it will be used as "key" to get children array from item
|
|
39
|
+
* If function - result of the function will be used as children ids
|
|
40
|
+
*/
|
|
41
|
+
childrenKey: DataGridTreeChildrenKey<Item>;
|
|
42
|
+
parentKey?: never;
|
|
43
|
+
});
|
|
44
|
+
export interface DataGridTreeMoveParams {
|
|
45
|
+
/**
|
|
46
|
+
* Move this id
|
|
47
|
+
*/
|
|
48
|
+
id: DataGridTreeItemId;
|
|
49
|
+
/**
|
|
50
|
+
* New parent id (where to move)
|
|
51
|
+
*/
|
|
52
|
+
parentId: DataGridTreeParentId;
|
|
53
|
+
/**
|
|
54
|
+
* Insert at the specified index
|
|
55
|
+
* @default children.length
|
|
56
|
+
*/
|
|
57
|
+
position?: number;
|
|
58
|
+
}
|
|
59
|
+
export type InferDataGridTreeItem<Structure extends DataGridTreeStructure<DataGridTreeItem>> = NonNullable<ReturnType<Structure['useNode']>>['item'];
|
|
60
|
+
export interface DataGridTreeStructureStore<Item extends DataGridTreeItem> {
|
|
61
|
+
nodeMap: Map<DataGridTreeItemId, DataGridTreeNode<Item>>;
|
|
62
|
+
childrenMap: Map<DataGridTreeParentId, DataGridTreeNode<Item>[]>;
|
|
63
|
+
}
|
|
64
|
+
export interface DataGridTreeStructure<Item extends DataGridTreeItem> {
|
|
65
|
+
setItems: (items: Item[]) => void;
|
|
66
|
+
move: (params: DataGridTreeMoveParams) => void;
|
|
67
|
+
forEach: (callback: (node: DataGridTreeNode<Item>) => void) => void;
|
|
68
|
+
eachNode: () => Generator<DataGridTreeNode<Item>, void, unknown>;
|
|
69
|
+
getNode: (id: DataGridTreeItemId) => DataGridTreeNode<Item> | undefined;
|
|
70
|
+
getChildren: (parentId: DataGridTreeParentId) => readonly DataGridTreeNode<Item>[];
|
|
71
|
+
getRootNodes: () => readonly DataGridTreeNode<Item>[];
|
|
72
|
+
getNodes: () => readonly DataGridTreeNode<Item>[];
|
|
73
|
+
getLevel: (id: DataGridTreeItemId) => number;
|
|
74
|
+
getSiblingCount: (id: DataGridTreeItemId) => number;
|
|
75
|
+
getSiblingPosition: (id: DataGridTreeItemId) => number;
|
|
76
|
+
isDescendantOf: (descendantId: DataGridTreeItemId, parentId: DataGridTreeItemId) => boolean;
|
|
77
|
+
useRootNodes: () => readonly DataGridTreeNode<Item>[];
|
|
78
|
+
useNodes: () => readonly DataGridTreeNode<Item>[];
|
|
79
|
+
useNodesCount: () => number;
|
|
80
|
+
useNode: (id: DataGridTreeItemId) => DataGridTreeNode<Item> | undefined;
|
|
81
|
+
useHasNode: (id: DataGridTreeItemId) => boolean;
|
|
82
|
+
useChildren: (parentId: DataGridTreeParentId) => readonly DataGridTreeNode<Item>[];
|
|
83
|
+
useNodePath: (id: DataGridTreeItemId) => readonly DataGridTreeNode<Item>[];
|
|
84
|
+
useNodeLevel: (id: DataGridTreeItemId) => number;
|
|
85
|
+
useNodeIndex: (id: DataGridTreeItemId) => number;
|
|
86
|
+
useIsLeaf: (id: DataGridTreeItemId) => boolean;
|
|
87
|
+
useIsDescendantOf: (descendantId: DataGridTreeItemId, parentId: DataGridTreeItemId) => boolean;
|
|
88
|
+
}
|
|
89
|
+
//# sourceMappingURL=tree-structure-types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tree-structure-types.d.ts","sourceRoot":"","sources":["../../../../src/components/data-grid/tree-structure/tree-structure-types.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,kBAAkB,GAAG,MAAM,GAAG,MAAM,CAAC;AACjD,MAAM,MAAM,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,CAAC,YAAY,EAAE,kBAAkB,EAAE,QAAQ,EAAE,kBAAkB,KAAK,OAAO,CAAC;CAChG"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { DataGridTreeItem, DataGridTreeStructure, DataGridTreeStructureConfig } from './tree-structure-types';
|
|
2
|
+
export declare function createDataGridTreeStructure<Item extends DataGridTreeItem>(config: DataGridTreeStructureConfig<Item>): DataGridTreeStructure<Item>;
|
|
3
|
+
/**
|
|
4
|
+
* Hook to create and memoize tree structure.
|
|
5
|
+
* Prevents recreation of tree structure on every render.
|
|
6
|
+
*
|
|
7
|
+
* @example
|
|
8
|
+
* ```tsx
|
|
9
|
+
* const tree = useDataGridTreeStructure({
|
|
10
|
+
* items,
|
|
11
|
+
* itemKey: 'id',
|
|
12
|
+
* parentKey: 'parentId',
|
|
13
|
+
* });
|
|
14
|
+
*
|
|
15
|
+
* filterTree({ id: 'department', tree, treeLabel: 'name' });
|
|
16
|
+
* ```
|
|
17
|
+
*/
|
|
18
|
+
export declare function useDataGridTreeStructure<Item extends DataGridTreeItem>(config: DataGridTreeStructureConfig<Item>): DataGridTreeStructure<Item>;
|
|
19
|
+
//# sourceMappingURL=tree-structure.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tree-structure.d.ts","sourceRoot":"","sources":["../../../../src/components/data-grid/tree-structure/tree-structure.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EACV,gBAAgB,EAIhB,qBAAqB,EACrB,2BAA2B,EAE5B,MAAM,wBAAwB,CAAC;AAEhC,wBAAgB,2BAA2B,CAAC,IAAI,SAAS,gBAAgB,EACvE,MAAM,EAAE,2BAA2B,CAAC,IAAI,CAAC,GACxC,qBAAqB,CAAC,IAAI,CAAC,CAyT7B;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,wBAAwB,CAAC,IAAI,SAAS,gBAAgB,EACpE,MAAM,EAAE,2BAA2B,CAAC,IAAI,CAAC,GACxC,qBAAqB,CAAC,IAAI,CAAC,CAI7B"}
|