@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,293 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { create as D } from "zustand";
|
|
3
|
+
import { u as p, c as ee } from "../chunks/plugins-helpers.js";
|
|
4
|
+
import { jsx as u, jsxs as M } from "react/jsx-runtime";
|
|
5
|
+
import { u as te } from "../chunks/data-grid-record-context.js";
|
|
6
|
+
import { Checkbox as T } from "../checkbox.js";
|
|
7
|
+
import { m } from "../chunks/messages.js";
|
|
8
|
+
import { Alert as ne, AlertDescription as le } from "../alert.js";
|
|
9
|
+
import { Link as se } from "../link.js";
|
|
10
|
+
import '../chunks/row-select.BjKdiMf5.css';const ce = "_cell_11t3n_1", oe = {
|
|
11
|
+
cell: ce
|
|
12
|
+
};
|
|
13
|
+
function ie() {
|
|
14
|
+
const o = p(), t = te(), s = o.getPlugin("rowSelect"), i = s.useIsVisible(t.item), r = s.useIsSelected(t.id);
|
|
15
|
+
return i ? /* @__PURE__ */ u("div", { className: oe.cell, children: /* @__PURE__ */ u(T, { checked: r, onCheckedChange: () => s.toggleSelection(t.id) }) }) : null;
|
|
16
|
+
}
|
|
17
|
+
function re() {
|
|
18
|
+
const t = p().getPlugin("rowSelect"), s = t.useMultiple(), i = t.useShowSelectAll(), r = t.useIsAllSelected(), g = t.useIsPartialSelected();
|
|
19
|
+
return !s || !i ? null : /* @__PURE__ */ u(
|
|
20
|
+
T,
|
|
21
|
+
{
|
|
22
|
+
checked: r,
|
|
23
|
+
indeterminate: g,
|
|
24
|
+
onCheckedChange: t.toggleSelectAll
|
|
25
|
+
}
|
|
26
|
+
);
|
|
27
|
+
}
|
|
28
|
+
const ae = "_banner_18hmm_11", ue = "_action_18hmm_16", y = {
|
|
29
|
+
banner: ae,
|
|
30
|
+
action: ue
|
|
31
|
+
};
|
|
32
|
+
function de() {
|
|
33
|
+
const t = p().getPlugin("rowSelect"), s = t.useMultiple(), i = t.useShowSelectAllMatching(), r = t.useIsSelectAllMatching(), g = t.useIsAllSelected(), A = t.useTotalCount(), b = t.useSelectableCount(), C = t.useVisibleCount();
|
|
34
|
+
if (!s || !i) return null;
|
|
35
|
+
const v = g && A > C;
|
|
36
|
+
if (!r && !v) return null;
|
|
37
|
+
const f = r ? {
|
|
38
|
+
text: m.rowSelect.allSelected(A),
|
|
39
|
+
action: m.rowSelect.clearSelection,
|
|
40
|
+
onAction: t.clearSelection
|
|
41
|
+
} : {
|
|
42
|
+
text: m.rowSelect.pageSelected(b),
|
|
43
|
+
action: m.rowSelect.selectAll(A),
|
|
44
|
+
onAction: t.selectAllMatching
|
|
45
|
+
};
|
|
46
|
+
return /* @__PURE__ */ u(ne, { className: y.banner, children: /* @__PURE__ */ M(le, { children: [
|
|
47
|
+
`${f.text} `,
|
|
48
|
+
/* @__PURE__ */ u(se, { render: /* @__PURE__ */ u("button", { type: "button", className: y.action }), onClick: f.onAction, children: f.action })
|
|
49
|
+
] }) });
|
|
50
|
+
}
|
|
51
|
+
const Se = "_container_1r0z6_8", ge = "_rowSelectTop_1r0z6_6", fe = "_actions_1r0z6_34", he = "_selectedCount_1r0z6_42", w = {
|
|
52
|
+
container: Se,
|
|
53
|
+
rowSelectTop: ge,
|
|
54
|
+
actions: fe,
|
|
55
|
+
selectedCount: he
|
|
56
|
+
};
|
|
57
|
+
function me() {
|
|
58
|
+
const t = p().getPlugin("rowSelect"), s = t.useComponent(), i = t.useStatusComponent(), r = t.useSelectionCount();
|
|
59
|
+
return !s && !i ? null : /* @__PURE__ */ M("div", { className: w.container, children: [
|
|
60
|
+
/* @__PURE__ */ M("div", { className: w.rowSelectTop, children: [
|
|
61
|
+
s && /* @__PURE__ */ u("div", { className: w.actions, children: /* @__PURE__ */ u(s, { rowSelect: t }) }),
|
|
62
|
+
/* @__PURE__ */ u("div", { className: w.selectedCount, children: i ? (
|
|
63
|
+
// eslint-disable-next-line react-hooks/static-components -- StatusComponent is the consumer's component held in the plugin's store, so it is the same component on every render; the rule cannot see through the store.
|
|
64
|
+
/* @__PURE__ */ u(i, { rowSelect: t })
|
|
65
|
+
) : m.rowSelect.itemsSelected(r) })
|
|
66
|
+
] }),
|
|
67
|
+
/* @__PURE__ */ u(de, {})
|
|
68
|
+
] });
|
|
69
|
+
}
|
|
70
|
+
const G = "row-select", Ae = "default", we = ee("rowSelect", (o) => {
|
|
71
|
+
const t = D(() => ({
|
|
72
|
+
selectedIds: /* @__PURE__ */ new Set(),
|
|
73
|
+
selectAllMatching: !1,
|
|
74
|
+
total: 0
|
|
75
|
+
})), s = D(() => ({
|
|
76
|
+
multiple: !0,
|
|
77
|
+
showSelectAll: !0,
|
|
78
|
+
showSelectAllMatching: !1,
|
|
79
|
+
keepHiddenSelection: !1,
|
|
80
|
+
visible: void 0,
|
|
81
|
+
onSelectionChange: void 0,
|
|
82
|
+
component: void 0,
|
|
83
|
+
statusComponent: void 0
|
|
84
|
+
})), i = /* @__PURE__ */ new Map();
|
|
85
|
+
o.registerExtraColumn({
|
|
86
|
+
position: "start",
|
|
87
|
+
order: 5,
|
|
88
|
+
width: "40px",
|
|
89
|
+
header: re,
|
|
90
|
+
body: ie,
|
|
91
|
+
// Selecting a row via its checkbox must never also fire the row-click
|
|
92
|
+
// callback. Marking the whole cell (not just the checkbox) covers the
|
|
93
|
+
// checkbox, its label, and the cell padding.
|
|
94
|
+
ignoreRowClick: !0
|
|
95
|
+
}), o.hook("load:store", (e) => {
|
|
96
|
+
var l;
|
|
97
|
+
const n = ((l = e.processResult) == null ? void 0 : l.total) ?? 0;
|
|
98
|
+
n !== t.getState().total && t.setState({ total: n });
|
|
99
|
+
});
|
|
100
|
+
let r = /* @__PURE__ */ new Set();
|
|
101
|
+
o.useStore.subscribe((e) => {
|
|
102
|
+
const n = new Set(e.visibleRecords.map((d) => d.id)), l = !pe(n, r);
|
|
103
|
+
r = n;
|
|
104
|
+
const { selectedIds: c, selectAllMatching: a } = t.getState();
|
|
105
|
+
if (c.size === 0 && !a) return;
|
|
106
|
+
const S = {};
|
|
107
|
+
if (a && (S.selectAllMatching = !1), l && c.size > 0 && !s.getState().keepHiddenSelection) {
|
|
108
|
+
const d = /* @__PURE__ */ new Set();
|
|
109
|
+
for (const P of c)
|
|
110
|
+
n.has(P) && d.add(P);
|
|
111
|
+
d.size !== c.size && (S.selectedIds = d);
|
|
112
|
+
}
|
|
113
|
+
Object.keys(S).length !== 0 && (t.setState(S), h());
|
|
114
|
+
});
|
|
115
|
+
let g = !1;
|
|
116
|
+
return {
|
|
117
|
+
...{
|
|
118
|
+
useSelectedIds: b,
|
|
119
|
+
useIsSelected: C,
|
|
120
|
+
useMultiple: v,
|
|
121
|
+
useShowSelectAll: f,
|
|
122
|
+
useShowSelectAllMatching: H,
|
|
123
|
+
useComponent: V,
|
|
124
|
+
useStatusComponent: N,
|
|
125
|
+
useIsAllSelected: j,
|
|
126
|
+
useIsPartialSelected: B,
|
|
127
|
+
useIsVisible: $,
|
|
128
|
+
useIsSelectAllMatching: E,
|
|
129
|
+
useSelectionMode: q,
|
|
130
|
+
useSelectionCount: F,
|
|
131
|
+
useTotalCount: _,
|
|
132
|
+
useSelectableCount: O,
|
|
133
|
+
useVisibleCount: R,
|
|
134
|
+
toggleSelection: X,
|
|
135
|
+
clearSelection: z,
|
|
136
|
+
toggleSelectAll: Q,
|
|
137
|
+
selectAllMatching: W,
|
|
138
|
+
getSelectionDescriptor: Y
|
|
139
|
+
},
|
|
140
|
+
onPropsChange: Z
|
|
141
|
+
};
|
|
142
|
+
function b() {
|
|
143
|
+
return t((e) => e.selectedIds);
|
|
144
|
+
}
|
|
145
|
+
function C(e) {
|
|
146
|
+
return t((n) => n.selectedIds.has(e));
|
|
147
|
+
}
|
|
148
|
+
function v() {
|
|
149
|
+
return s((e) => e.multiple);
|
|
150
|
+
}
|
|
151
|
+
function f() {
|
|
152
|
+
return s((e) => e.showSelectAll);
|
|
153
|
+
}
|
|
154
|
+
function H() {
|
|
155
|
+
return s((e) => e.showSelectAllMatching);
|
|
156
|
+
}
|
|
157
|
+
function V() {
|
|
158
|
+
return s((e) => e.component);
|
|
159
|
+
}
|
|
160
|
+
function N() {
|
|
161
|
+
return s((e) => e.statusComponent);
|
|
162
|
+
}
|
|
163
|
+
function j() {
|
|
164
|
+
const e = t((l) => l.selectedIds), n = I();
|
|
165
|
+
return n.length > 0 && n.every((l) => e.has(l.id));
|
|
166
|
+
}
|
|
167
|
+
function B() {
|
|
168
|
+
const e = t((c) => c.selectedIds), n = I(), l = n.filter((c) => e.has(c.id)).length;
|
|
169
|
+
return l > 0 && l < n.length;
|
|
170
|
+
}
|
|
171
|
+
function I() {
|
|
172
|
+
const e = s((l) => l.visible), n = o.useStore((l) => l.visibleRecords);
|
|
173
|
+
return e ? n.filter((l) => e(l.item)) : n;
|
|
174
|
+
}
|
|
175
|
+
function $(e) {
|
|
176
|
+
const n = s((l) => l.visible);
|
|
177
|
+
return n ? n(e) : !0;
|
|
178
|
+
}
|
|
179
|
+
function E() {
|
|
180
|
+
return t((e) => e.selectAllMatching);
|
|
181
|
+
}
|
|
182
|
+
function O() {
|
|
183
|
+
const e = s((l) => l.visible), n = o.useStore((l) => l.visibleRecords);
|
|
184
|
+
return e ? n.filter((l) => e(l.item)).length : n.length;
|
|
185
|
+
}
|
|
186
|
+
function R() {
|
|
187
|
+
return o.useStore((e) => e.visibleRecords.length);
|
|
188
|
+
}
|
|
189
|
+
function _() {
|
|
190
|
+
const e = t((l) => l.total), n = R();
|
|
191
|
+
return e || n;
|
|
192
|
+
}
|
|
193
|
+
function q() {
|
|
194
|
+
const e = t((l) => l.selectedIds.size), n = t((l) => l.selectAllMatching);
|
|
195
|
+
return k(e, n);
|
|
196
|
+
}
|
|
197
|
+
function F() {
|
|
198
|
+
const e = t((c) => c.selectedIds.size), n = t((c) => c.selectAllMatching), l = _();
|
|
199
|
+
return n ? l : e;
|
|
200
|
+
}
|
|
201
|
+
function L(e) {
|
|
202
|
+
const { visible: n } = s.getState();
|
|
203
|
+
return n ? n(e) : !0;
|
|
204
|
+
}
|
|
205
|
+
function J() {
|
|
206
|
+
return o.useStore.getState().visibleRecords.filter((e) => L(e.item));
|
|
207
|
+
}
|
|
208
|
+
function K() {
|
|
209
|
+
const { total: e } = t.getState();
|
|
210
|
+
return e || o.useStore.getState().visibleRecords.length;
|
|
211
|
+
}
|
|
212
|
+
function k(e, n) {
|
|
213
|
+
return n ? "all" : e > 0 ? "page" : "none";
|
|
214
|
+
}
|
|
215
|
+
function Q(e) {
|
|
216
|
+
e ? U() : z();
|
|
217
|
+
}
|
|
218
|
+
function U() {
|
|
219
|
+
const e = J(), { keepHiddenSelection: n } = s.getState(), l = new Set(
|
|
220
|
+
n ? t.getState().selectedIds : []
|
|
221
|
+
);
|
|
222
|
+
for (const c of e)
|
|
223
|
+
l.add(c.id), n && i.set(c.id, c.item);
|
|
224
|
+
t.setState({ selectedIds: l, selectAllMatching: !1 }), h();
|
|
225
|
+
}
|
|
226
|
+
function W() {
|
|
227
|
+
const { showSelectAllMatching: e, multiple: n } = s.getState();
|
|
228
|
+
!e || !n || (t.setState({ selectAllMatching: !0 }), h());
|
|
229
|
+
}
|
|
230
|
+
function X(e) {
|
|
231
|
+
const { selectedIds: n } = t.getState(), { multiple: l, keepHiddenSelection: c } = s.getState(), a = new Set(l ? n : []);
|
|
232
|
+
if (n.has(e) ? a.delete(e) : a.add(e), c)
|
|
233
|
+
if (l || i.clear(), a.has(e)) {
|
|
234
|
+
const S = o.useStore.getState().visibleRecords.find((d) => d.id === e);
|
|
235
|
+
S && i.set(e, S.item);
|
|
236
|
+
} else
|
|
237
|
+
i.delete(e);
|
|
238
|
+
t.setState({ selectedIds: a, selectAllMatching: !1 }), h();
|
|
239
|
+
}
|
|
240
|
+
function z() {
|
|
241
|
+
t.setState({ selectedIds: /* @__PURE__ */ new Set(), selectAllMatching: !1 }), i.clear(), h();
|
|
242
|
+
}
|
|
243
|
+
function Y() {
|
|
244
|
+
const { selectedIds: e, selectAllMatching: n } = t.getState();
|
|
245
|
+
return n ? { mode: "all-matching" } : { mode: "ids", ids: [...e] };
|
|
246
|
+
}
|
|
247
|
+
function h() {
|
|
248
|
+
const { onSelectionChange: e, keepHiddenSelection: n } = s.getState();
|
|
249
|
+
if (!e) return;
|
|
250
|
+
const { selectedIds: l, selectAllMatching: c } = t.getState(), a = [];
|
|
251
|
+
if (n)
|
|
252
|
+
a.push(...i.values());
|
|
253
|
+
else
|
|
254
|
+
for (const d of o.useStore.getState().visibleRecords)
|
|
255
|
+
l.has(d.id) && a.push(d.item);
|
|
256
|
+
const S = {
|
|
257
|
+
mode: k(l.size, c),
|
|
258
|
+
count: c ? K() : l.size
|
|
259
|
+
};
|
|
260
|
+
e(a, S);
|
|
261
|
+
}
|
|
262
|
+
function Z(e) {
|
|
263
|
+
s.setState({
|
|
264
|
+
multiple: e.multiple ?? !0,
|
|
265
|
+
showSelectAll: e.showSelectAll ?? !0,
|
|
266
|
+
showSelectAllMatching: e.showSelectAllMatching ?? !1,
|
|
267
|
+
keepHiddenSelection: e.keepHiddenSelection ?? !1,
|
|
268
|
+
visible: e.visible,
|
|
269
|
+
onSelectionChange: e.onSelectionChange,
|
|
270
|
+
component: e.component,
|
|
271
|
+
statusComponent: e.statusComponent
|
|
272
|
+
}), (e.component || e.statusComponent) && !g && x();
|
|
273
|
+
}
|
|
274
|
+
function x() {
|
|
275
|
+
g || (g = !0, o.registerSlot("top", {
|
|
276
|
+
id: G,
|
|
277
|
+
component: me
|
|
278
|
+
}), t.subscribe((e) => {
|
|
279
|
+
const n = e.selectedIds.size > 0;
|
|
280
|
+
o.setActiveSlotId("top", n ? G : Ae);
|
|
281
|
+
}));
|
|
282
|
+
}
|
|
283
|
+
}), ze = we;
|
|
284
|
+
function pe(o, t) {
|
|
285
|
+
if (o.size !== t.size) return !1;
|
|
286
|
+
for (const s of o)
|
|
287
|
+
if (!t.has(s)) return !1;
|
|
288
|
+
return !0;
|
|
289
|
+
}
|
|
290
|
+
export {
|
|
291
|
+
ze as DataGridRowSelectPlugin
|
|
292
|
+
};
|
|
293
|
+
//# sourceMappingURL=row-select.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"row-select.js","sources":["../../src/components/data-grid/plugins/row-select/components/data-grid-row-select-body.tsx","../../src/components/data-grid/plugins/row-select/components/data-grid-row-select-header.tsx","../../src/components/data-grid/plugins/row-select/components/data-grid-row-select-banner.tsx","../../src/components/data-grid/plugins/row-select/components/data-grid-row-select-top.tsx","../../src/components/data-grid/plugins/row-select/row-select-plugin.tsx"],"sourcesContent":["import { Checkbox } from '../../../../checkbox/public.js';\nimport { useDataGrid } from '../../../services/core/data-grid-context';\nimport { useDataGridRecord } from '../../../services/table/data-grid-record-context';\nimport type { DataGridRowSelectPluginApi } from '../row-select-types';\nimport styles from './data-grid-row-select-body.module.css';\n\nexport function DataGridRowSelectBody() {\n const grid = useDataGrid();\n const record = useDataGridRecord();\n const rowSelect = grid.getPlugin<DataGridRowSelectPluginApi>('rowSelect')!;\n\n const isVisible = rowSelect.useIsVisible(record.item);\n const isSelected = rowSelect.useIsSelected(record.id);\n\n if (!isVisible) return null;\n\n return (\n <div className={styles.cell}>\n <Checkbox checked={isSelected} onCheckedChange={() => rowSelect.toggleSelection(record.id)} />\n </div>\n );\n}\n","import { Checkbox } from '../../../../checkbox/public.js';\nimport { useDataGrid } from '../../../services/core/data-grid-context';\nimport type { DataGridRowSelectPluginApi } from '../row-select-types';\n\nexport function DataGridRowSelectHeader() {\n const grid = useDataGrid();\n const rowSelect = grid.getPlugin<DataGridRowSelectPluginApi>('rowSelect')!;\n\n const multiple = rowSelect.useMultiple();\n const showSelectAll = rowSelect.useShowSelectAll();\n const isAllSelected = rowSelect.useIsAllSelected();\n const isPartialSelected = rowSelect.useIsPartialSelected();\n\n if (!multiple || !showSelectAll) return null;\n\n return (\n <Checkbox\n checked={isAllSelected}\n indeterminate={isPartialSelected}\n onCheckedChange={rowSelect.toggleSelectAll}\n />\n );\n}\n","import { Alert, AlertDescription } from '../../../../alert/public.js';\nimport { Link } from '../../../../link/public.js';\nimport { messages } from '../../../messages';\nimport { useDataGrid } from '../../../services/core/data-grid-context';\nimport type { DataGridRowSelectPluginApi } from '../row-select-types';\nimport styles from './data-grid-row-select-banner.module.css';\n\nexport function DataGridRowSelectBanner() {\n const grid = useDataGrid();\n const rowSelect = grid.getPlugin<DataGridRowSelectPluginApi>('rowSelect')!;\n\n const multiple = rowSelect.useMultiple();\n const showSelectAllMatching = rowSelect.useShowSelectAllMatching();\n const isSelectAllMatching = rowSelect.useIsSelectAllMatching();\n const isAllSelected = rowSelect.useIsAllSelected();\n const total = rowSelect.useTotalCount();\n const pageCount = rowSelect.useSelectableCount();\n const visibleCount = rowSelect.useVisibleCount();\n\n if (!multiple || !showSelectAllMatching) return null;\n\n // More records match than are loaded on this page. Compare against the loaded\n // count (not the selectable count) so a `visible`-gated single page doesn't\n // falsely offer \"select all\".\n const pageFull = isAllSelected && total > visibleCount;\n if (!isSelectAllMatching && !pageFull) return null;\n\n const content = isSelectAllMatching\n ? {\n text: messages.rowSelect.allSelected(total),\n action: messages.rowSelect.clearSelection,\n onAction: rowSelect.clearSelection,\n }\n : {\n text: messages.rowSelect.pageSelected(pageCount),\n action: messages.rowSelect.selectAll(total),\n onAction: rowSelect.selectAllMatching,\n };\n\n // The action sits at the end of the sentence as an inline link, but it is a button: it changes\n // the selection and goes nowhere.\n return (\n <Alert className={styles.banner}>\n <AlertDescription>\n {`${content.text} `}\n <Link render={<button type=\"button\" className={styles.action} />} onClick={content.onAction}>\n {content.action}\n </Link>\n </AlertDescription>\n </Alert>\n );\n}\n","import { messages } from '../../../messages';\nimport { useDataGrid } from '../../../services/core/data-grid-context';\nimport type { DataGridRowSelectPluginApi } from '../row-select-types';\nimport { DataGridRowSelectBanner } from './data-grid-row-select-banner';\nimport styles from './data-grid-row-select-top.module.css';\n\nexport function DataGridRowSelectTop() {\n const grid = useDataGrid();\n const rowSelect = grid.getPlugin<DataGridRowSelectPluginApi>('rowSelect')!;\n\n const ActionComponent = rowSelect.useComponent();\n const StatusComponent = rowSelect.useStatusComponent();\n const count = rowSelect.useSelectionCount();\n\n if (!ActionComponent && !StatusComponent) return null;\n\n return (\n <div className={styles.container}>\n <div className={styles.rowSelectTop}>\n {ActionComponent && (\n <div className={styles.actions}>\n {/* eslint-disable-next-line react-hooks/static-components -- ActionComponent is the consumer's component held in the plugin's store, so it is the same component on every render; the rule cannot see through the store. */}\n <ActionComponent rowSelect={rowSelect} />\n </div>\n )}\n <div className={styles.selectedCount}>\n {StatusComponent ? (\n // eslint-disable-next-line react-hooks/static-components -- StatusComponent is the consumer's component held in the plugin's store, so it is the same component on every render; the rule cannot see through the store.\n <StatusComponent rowSelect={rowSelect} />\n ) : (\n messages.rowSelect.itemsSelected(count)\n )}\n </div>\n </div>\n <DataGridRowSelectBanner />\n </div>\n );\n}\n","// Load-bearing: a plugin is rendered as a child of <DataGrid>, so a Server Component can import\n// and render it, and the component it returns calls hooks. This directive puts the banner on the\n// plugin's own entry chunk (dist/data-grid/<plugin>.js). client-boundaries.test.ts only scans a\n// component's top-level files, so scripts/verify-consumer.sh is what checks the built banner of\n// every plugin entry.\n'use client';\n\nimport type { ReactNode } from 'react';\nimport { create } from 'zustand';\nimport type { DataGridItem } from '../../data-grid-types';\nimport { createDataGridPlugin } from '../../services/plugins/plugins-helpers';\nimport type { DataGridItemId, DataGridRecord } from '../../services/storage/storage-types';\nimport { DataGridRowSelectBody } from './components/data-grid-row-select-body';\nimport { DataGridRowSelectHeader } from './components/data-grid-row-select-header';\nimport { DataGridRowSelectTop } from './components/data-grid-row-select-top';\nimport type {\n DataGridRowSelectChangeMeta,\n DataGridRowSelectDescriptor,\n DataGridRowSelectMode,\n DataGridRowSelectPluginApi,\n DataGridRowSelectPluginProps,\n RowSelectConfigStore,\n RowSelectStore,\n} from './row-select-types';\n\nconst rowSelectSlotId = 'row-select';\nconst defaultSlotId = 'default';\n\nconst DataGridRowSelectPluginRaw = createDataGridPlugin<\n DataGridItem,\n 'rowSelect',\n DataGridRowSelectPluginProps\n>('rowSelect', (context) => {\n const useRowSelectStore = create<RowSelectStore>(() => ({\n selectedIds: new Set(),\n selectAllMatching: false,\n total: 0,\n }));\n\n const useConfigStore = create<RowSelectConfigStore>(() => ({\n multiple: true,\n showSelectAll: true,\n showSelectAllMatching: false,\n keepHiddenSelection: false,\n visible: undefined,\n onSelectionChange: undefined,\n component: undefined,\n statusComponent: undefined,\n }));\n\n // In `keepHiddenSelection` mode this holds the selected items across pages so\n // `onSelectionChange` can report rows that are no longer visible. Untouched in\n // the default (page-scoped) mode, where selected items come from the visible\n // records instead.\n const selectedItemsById = new Map<DataGridItemId, DataGridItem>();\n\n // Register extra column with checkboxes\n context.registerExtraColumn({\n position: 'start',\n order: 5,\n width: '40px',\n header: DataGridRowSelectHeader,\n body: DataGridRowSelectBody,\n // Selecting a row via its checkbox must never also fire the row-click\n // callback. Marking the whole cell (not just the checkbox) covers the\n // checkbox, its label, and the cell padding.\n ignoreRowClick: true,\n });\n\n // Mirror the total matching count from the load result. This is the same value\n // the pagination plugin surfaces (both read `processResult.total`); reading it\n // here keeps the plugin independent of plugin registration order.\n context.hook('load:store', (instance) => {\n // Reset to 0 when a load omits `total` so a stale count from a previous\n // load never leaks; `useTotalCount` then falls back to the visible count.\n const total = instance.processResult?.total ?? 0;\n if (total !== useRowSelectStore.getState().total) {\n useRowSelectStore.setState({ total });\n }\n });\n\n // Selection is page-scoped (Gmail-style): \"Select all N matching\" is meant for\n // an immediate bulk action on the current filter, not for paging through. When\n // the visible records change (pagination, filter, search, or reload) the stale\n // selection is pruned and all-matching mode is left, so navigating pages starts\n // fresh.\n let prevVisibleRecordIds = new Set<DataGridItemId>();\n\n context.useStore.subscribe((state) => {\n const currentIds = new Set(state.visibleRecords.map((r) => r.id));\n const idsChanged = !setsEqual(currentIds, prevVisibleRecordIds);\n prevVisibleRecordIds = currentIds;\n\n const { selectedIds, selectAllMatching: selectAllMatchingActive } =\n useRowSelectStore.getState();\n if (selectedIds.size === 0 && !selectAllMatchingActive) return;\n\n const nextState: Partial<RowSelectStore> = {};\n\n // Any reload/data change leaves all-matching mode — even one that returns the\n // same ids under a different filter (selection is page-scoped).\n if (selectAllMatchingActive) nextState.selectAllMatching = false;\n\n // Prune stale explicit ids only when the visible set actually changed. In\n // keepHiddenSelection mode selections deliberately outlive the page, so\n // explicit ids are never pruned.\n if (idsChanged && selectedIds.size > 0 && !useConfigStore.getState().keepHiddenSelection) {\n const pruned = new Set<DataGridItemId>();\n for (const id of selectedIds) {\n if (currentIds.has(id)) {\n pruned.add(id);\n }\n }\n if (pruned.size !== selectedIds.size) nextState.selectedIds = pruned;\n }\n\n if (Object.keys(nextState).length === 0) return;\n\n useRowSelectStore.setState(nextState);\n emitSelection();\n });\n\n let topSlotRegistered = false;\n\n const api: DataGridRowSelectPluginApi = {\n useSelectedIds,\n useIsSelected,\n useMultiple,\n useShowSelectAll,\n useShowSelectAllMatching,\n useComponent,\n useStatusComponent,\n useIsAllSelected,\n useIsPartialSelected,\n useIsVisible,\n useIsSelectAllMatching,\n useSelectionMode,\n useSelectionCount,\n useTotalCount,\n useSelectableCount,\n useVisibleCount,\n toggleSelection,\n clearSelection,\n toggleSelectAll,\n selectAllMatching,\n getSelectionDescriptor,\n };\n\n return {\n ...api,\n onPropsChange,\n };\n\n function useSelectedIds() {\n return useRowSelectStore((s) => s.selectedIds);\n }\n\n function useIsSelected(itemId: DataGridItemId) {\n return useRowSelectStore((s) => s.selectedIds.has(itemId));\n }\n\n function useMultiple() {\n return useConfigStore((s) => s.multiple);\n }\n\n function useShowSelectAll() {\n return useConfigStore((s) => s.showSelectAll);\n }\n\n function useShowSelectAllMatching() {\n return useConfigStore((s) => s.showSelectAllMatching);\n }\n\n function useComponent() {\n return useConfigStore((s) => s.component);\n }\n\n function useStatusComponent() {\n return useConfigStore((s) => s.statusComponent);\n }\n\n function useIsAllSelected() {\n const selectedIds = useRowSelectStore((s) => s.selectedIds);\n const records = useSelectableRecords();\n // Scope to the visible page: in keepHiddenSelection mode `selectedIds` may\n // include off-page rows, so a raw size comparison would misreport.\n return records.length > 0 && records.every((r) => selectedIds.has(r.id));\n }\n\n function useIsPartialSelected() {\n const selectedIds = useRowSelectStore((s) => s.selectedIds);\n const records = useSelectableRecords();\n const selectedOnPage = records.filter((r) => selectedIds.has(r.id)).length;\n return selectedOnPage > 0 && selectedOnPage < records.length;\n }\n\n function useSelectableRecords() {\n const visible = useConfigStore((s) => s.visible);\n const records = context.useStore((s) => s.visibleRecords);\n return visible ? records.filter((r) => visible(r.item)) : records;\n }\n\n function useIsVisible(item: DataGridItem) {\n const visible = useConfigStore((s) => s.visible);\n return visible ? visible(item) : true;\n }\n\n function useIsSelectAllMatching() {\n return useRowSelectStore((s) => s.selectAllMatching);\n }\n\n function useSelectableCount() {\n const visible = useConfigStore((s) => s.visible);\n const records = context.useStore((s) => s.visibleRecords);\n return visible ? records.filter((r) => visible(r.item)).length : records.length;\n }\n\n function useVisibleCount() {\n return context.useStore((s) => s.visibleRecords.length);\n }\n\n function useTotalCount() {\n const total = useRowSelectStore((s) => s.total);\n const visibleCount = useVisibleCount();\n return total || visibleCount;\n }\n\n function useSelectionMode(): DataGridRowSelectMode {\n const size = useRowSelectStore((s) => s.selectedIds.size);\n const selectAllMatchingActive = useRowSelectStore((s) => s.selectAllMatching);\n return getMode(size, selectAllMatchingActive);\n }\n\n function useSelectionCount() {\n const size = useRowSelectStore((s) => s.selectedIds.size);\n const selectAllMatchingActive = useRowSelectStore((s) => s.selectAllMatching);\n const total = useTotalCount();\n return selectAllMatchingActive ? total : size;\n }\n\n function isVisible(item: DataGridItem) {\n const { visible } = useConfigStore.getState();\n return visible ? visible(item) : true;\n }\n\n function getVisibleSelectableRecords(): DataGridRecord[] {\n return context.useStore.getState().visibleRecords.filter((record) => isVisible(record.item));\n }\n\n function getTotal() {\n const { total } = useRowSelectStore.getState();\n return total || context.useStore.getState().visibleRecords.length;\n }\n\n function getMode(size: number, selectAllMatchingActive: boolean): DataGridRowSelectMode {\n if (selectAllMatchingActive) return 'all';\n return size > 0 ? 'page' : 'none';\n }\n\n function toggleSelectAll(value: boolean) {\n if (value) {\n selectAll();\n } else {\n clearSelection();\n }\n }\n\n function selectAll() {\n const records = getVisibleSelectableRecords();\n const { keepHiddenSelection } = useConfigStore.getState();\n // Keep-hidden mode adds the page to any cross-page selection; default mode\n // replaces the selection with the current page (unchanged behaviour).\n const newSelectedIds = new Set<DataGridItemId>(\n keepHiddenSelection ? useRowSelectStore.getState().selectedIds : [],\n );\n for (const record of records) {\n newSelectedIds.add(record.id);\n if (keepHiddenSelection) {\n selectedItemsById.set(record.id, record.item);\n }\n }\n useRowSelectStore.setState({ selectedIds: newSelectedIds, selectAllMatching: false });\n emitSelection();\n }\n\n function selectAllMatching() {\n const { showSelectAllMatching, multiple } = useConfigStore.getState();\n // All-matching is meaningless in single-selection mode.\n if (!showSelectAllMatching || !multiple) return;\n useRowSelectStore.setState({ selectAllMatching: true });\n emitSelection();\n }\n\n function toggleSelection(itemId: DataGridItemId) {\n const { selectedIds } = useRowSelectStore.getState();\n const { multiple, keepHiddenSelection } = useConfigStore.getState();\n const newSelectedIds = new Set(multiple ? selectedIds : []);\n\n if (selectedIds.has(itemId)) {\n newSelectedIds.delete(itemId);\n } else {\n newSelectedIds.add(itemId);\n }\n\n if (keepHiddenSelection) {\n if (!multiple) {\n selectedItemsById.clear();\n }\n if (newSelectedIds.has(itemId)) {\n const record = context.useStore.getState().visibleRecords.find((r) => r.id === itemId);\n if (record) {\n selectedItemsById.set(itemId, record.item);\n }\n } else {\n selectedItemsById.delete(itemId);\n }\n }\n\n // Any explicit row toggle leaves all-matching mode.\n useRowSelectStore.setState({ selectedIds: newSelectedIds, selectAllMatching: false });\n emitSelection();\n }\n\n function clearSelection() {\n useRowSelectStore.setState({ selectedIds: new Set(), selectAllMatching: false });\n selectedItemsById.clear();\n emitSelection();\n }\n\n function getSelectionDescriptor(): DataGridRowSelectDescriptor {\n const { selectedIds, selectAllMatching: selectAllMatchingActive } =\n useRowSelectStore.getState();\n if (selectAllMatchingActive) return { mode: 'all-matching' };\n return { mode: 'ids', ids: [...selectedIds] };\n }\n\n function emitSelection() {\n const { onSelectionChange, keepHiddenSelection } = useConfigStore.getState();\n if (!onSelectionChange) return;\n\n const { selectedIds, selectAllMatching: selectAllMatchingActive } =\n useRowSelectStore.getState();\n\n // Keep-hidden mode reports the retained cross-page items; default mode\n // reports only the rows selected on the visible page.\n const selectedItems: DataGridItem[] = [];\n if (keepHiddenSelection) {\n selectedItems.push(...selectedItemsById.values());\n } else {\n for (const record of context.useStore.getState().visibleRecords) {\n if (selectedIds.has(record.id)) {\n selectedItems.push(record.item);\n }\n }\n }\n\n const meta: DataGridRowSelectChangeMeta = {\n mode: getMode(selectedIds.size, selectAllMatchingActive),\n count: selectAllMatchingActive ? getTotal() : selectedIds.size,\n };\n\n onSelectionChange(selectedItems, meta);\n }\n\n function onPropsChange(props: DataGridRowSelectPluginProps) {\n useConfigStore.setState({\n multiple: props.multiple ?? true,\n showSelectAll: props.showSelectAll ?? true,\n showSelectAllMatching: props.showSelectAllMatching ?? false,\n keepHiddenSelection: props.keepHiddenSelection ?? false,\n visible: props.visible,\n onSelectionChange: props.onSelectionChange,\n component: props.component,\n statusComponent: props.statusComponent,\n });\n\n if ((props.component || props.statusComponent) && !topSlotRegistered) {\n registerTopSlot();\n }\n }\n\n function registerTopSlot() {\n if (topSlotRegistered) return;\n topSlotRegistered = true;\n\n context.registerSlot('top', {\n id: rowSelectSlotId,\n component: DataGridRowSelectTop,\n });\n\n // Subscribe to selection changes to toggle active slot\n useRowSelectStore.subscribe((state) => {\n const isSelectMode = state.selectedIds.size > 0;\n context.setActiveSlotId('top', isSelectMode ? rowSelectSlotId : defaultSlotId);\n });\n }\n});\n\n// The plugin is built for the base item type; the cast hands the consumer a generic component, so\n// `<DataGridRowSelectPlugin<User> onSelectionChange={...} />` types the items it reports.\nexport const DataGridRowSelectPlugin = DataGridRowSelectPluginRaw as <\n TItem extends DataGridItem = DataGridItem,\n>(\n props: DataGridRowSelectPluginProps<TItem>,\n) => ReactNode;\n\nfunction setsEqual<T>(a: Set<T>, b: Set<T>): boolean {\n if (a.size !== b.size) return false;\n for (const item of a) {\n if (!b.has(item)) return false;\n }\n return true;\n}\n"],"names":["DataGridRowSelectBody","grid","useDataGrid","record","useDataGridRecord","rowSelect","isVisible","isSelected","styles","Checkbox","DataGridRowSelectHeader","multiple","showSelectAll","isAllSelected","isPartialSelected","jsx","DataGridRowSelectBanner","showSelectAllMatching","isSelectAllMatching","total","pageCount","visibleCount","pageFull","content","messages","Alert","AlertDescription","Link","DataGridRowSelectTop","ActionComponent","StatusComponent","count","jsxs","rowSelectSlotId","defaultSlotId","DataGridRowSelectPluginRaw","createDataGridPlugin","context","useRowSelectStore","create","useConfigStore","selectedItemsById","instance","_a","prevVisibleRecordIds","state","currentIds","r","idsChanged","setsEqual","selectedIds","selectAllMatchingActive","nextState","pruned","id","emitSelection","topSlotRegistered","useSelectedIds","useIsSelected","useMultiple","useShowSelectAll","useShowSelectAllMatching","useComponent","useStatusComponent","useIsAllSelected","useIsPartialSelected","useIsVisible","useIsSelectAllMatching","useSelectionMode","useSelectionCount","useTotalCount","useSelectableCount","useVisibleCount","toggleSelection","clearSelection","toggleSelectAll","selectAllMatching","getSelectionDescriptor","onPropsChange","s","itemId","records","useSelectableRecords","selectedOnPage","visible","item","size","getMode","getVisibleSelectableRecords","getTotal","value","selectAll","keepHiddenSelection","newSelectedIds","onSelectionChange","selectedItems","meta","props","registerTopSlot","isSelectMode","DataGridRowSelectPlugin","a","b"],"mappings":";;;;;;;;;;;;AAMO,SAASA,KAAwB;AACtC,QAAMC,IAAOC,EAAA,GACPC,IAASC,GAAA,GACTC,IAAYJ,EAAK,UAAsC,WAAW,GAElEK,IAAYD,EAAU,aAAaF,EAAO,IAAI,GAC9CI,IAAaF,EAAU,cAAcF,EAAO,EAAE;AAEpD,SAAKG,sBAGF,OAAA,EAAI,WAAWE,GAAO,MACrB,4BAACC,GAAA,EAAS,SAASF,GAAY,iBAAiB,MAAMF,EAAU,gBAAgBF,EAAO,EAAE,GAAG,GAC9F,IALqB;AAOzB;ACjBO,SAASO,KAA0B;AAExC,QAAML,IADOH,EAAA,EACU,UAAsC,WAAW,GAElES,IAAWN,EAAU,YAAA,GACrBO,IAAgBP,EAAU,iBAAA,GAC1BQ,IAAgBR,EAAU,iBAAA,GAC1BS,IAAoBT,EAAU,qBAAA;AAEpC,SAAI,CAACM,KAAY,CAACC,IAAsB,OAGtC,gBAAAG;AAAA,IAACN;AAAA,IAAA;AAAA,MACC,SAASI;AAAA,MACT,eAAeC;AAAA,MACf,iBAAiBT,EAAU;AAAA,IAAA;AAAA,EAAA;AAGjC;;;;;ACfO,SAASW,KAA0B;AAExC,QAAMX,IADOH,EAAA,EACU,UAAsC,WAAW,GAElES,IAAWN,EAAU,YAAA,GACrBY,IAAwBZ,EAAU,yBAAA,GAClCa,IAAsBb,EAAU,uBAAA,GAChCQ,IAAgBR,EAAU,iBAAA,GAC1Bc,IAAQd,EAAU,cAAA,GAClBe,IAAYf,EAAU,mBAAA,GACtBgB,IAAehB,EAAU,gBAAA;AAE/B,MAAI,CAACM,KAAY,CAACM,EAAuB,QAAO;AAKhD,QAAMK,IAAWT,KAAiBM,IAAQE;AAC1C,MAAI,CAACH,KAAuB,CAACI,EAAU,QAAO;AAE9C,QAAMC,IAAUL,IACZ;AA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,EAAM;AAAA,IAAA,CACxB,IAEIA,EAAM,aAAaA,EAAM,oBAAoB,CAACzC,KACjD0C,EAAA;AAAA,EAEJ;AAEA,WAASA,IAAkB;AACzB,IAAI1C,MACJA,IAAoB,IAEpBnB,EAAQ,aAAa,OAAO;AAAA,MAC1B,IAAIJ;AAAA,MACJ,WAAWL;AAAA,IAAA,CACZ,GAGDU,EAAkB,UAAU,CAACO,MAAU;AACrC,YAAMsD,IAAetD,EAAM,YAAY,OAAO;AAC9C,MAAAR,EAAQ,gBAAgB,OAAO8D,IAAelE,IAAkBC,EAAa;AAAA,IAC/E,CAAC;AAAA,EACH;AACF,CAAC,GAIYkE,KAA0BjE;AAMvC,SAASc,GAAaoD,GAAWC,GAAoB;AACnD,MAAID,EAAE,SAASC,EAAE,KAAM,QAAO;AAC9B,aAAWjB,KAAQgB;AACjB,QAAI,CAACC,EAAE,IAAIjB,CAAI,EAAG,QAAO;AAE3B,SAAO;AACT;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from '../components/data-grid/plugins/table-configuration/public.js'
|
|
@@ -0,0 +1,165 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { c as f } from "../chunks/plugins-helpers.js";
|
|
3
|
+
import { jsx as n, jsxs as s } from "react/jsx-runtime";
|
|
4
|
+
import { PinIcon as b, SettingsIcon as h } from "lucide-react";
|
|
5
|
+
import { m as c } from "../chunks/messages.js";
|
|
6
|
+
import { Fragment as _ } from "react";
|
|
7
|
+
import { u as C } from "../chunks/table-context.js";
|
|
8
|
+
import { a as T } from "../chunks/table-types.js";
|
|
9
|
+
import { cx as u } from "class-variance-authority";
|
|
10
|
+
import { Toggle as y } from "../toggle.js";
|
|
11
|
+
import { DropdownMenuItem as g, DropdownMenu as k, DropdownMenuSeparator as S } from "../dropdown-menu.js";
|
|
12
|
+
import { Switch as w } from "../switch.js";
|
|
13
|
+
import { Popover as N, PopoverTrigger as v, PopoverContent as I } from "../popover.js";
|
|
14
|
+
import { Button as D } from "../button.js";
|
|
15
|
+
import '../chunks/table-configuration.a6C_fp7B.css';const B = "_popup_i679w_8", G = "_tableConfiguration_i679w_23", V = "_header_i679w_33", P = "_content_i679w_48", x = "_configurationItem_i679w_61", z = "_pinButton_i679w_92", M = "_pinButtonVisible_i679w_97", j = "_pin_i679w_92", O = "_label_i679w_116", F = "_configurationItemNoSticky_i679w_122", q = "_groupContent_i679w_126", o = {
|
|
16
|
+
popup: B,
|
|
17
|
+
tableConfiguration: G,
|
|
18
|
+
header: V,
|
|
19
|
+
content: P,
|
|
20
|
+
configurationItem: x,
|
|
21
|
+
pinButton: z,
|
|
22
|
+
pinButtonVisible: M,
|
|
23
|
+
pin: j,
|
|
24
|
+
label: O,
|
|
25
|
+
configurationItemNoSticky: F,
|
|
26
|
+
groupContent: q
|
|
27
|
+
};
|
|
28
|
+
function m({
|
|
29
|
+
sticky: i,
|
|
30
|
+
onToggle: a
|
|
31
|
+
}) {
|
|
32
|
+
return /* @__PURE__ */ n("div", { className: u(o.pinButton, i && o.pinButtonVisible), children: /* @__PURE__ */ n(
|
|
33
|
+
y,
|
|
34
|
+
{
|
|
35
|
+
className: o.pin,
|
|
36
|
+
iconOnly: !0,
|
|
37
|
+
size: "sm",
|
|
38
|
+
pressed: i ?? !1,
|
|
39
|
+
onPressedChange: a,
|
|
40
|
+
"aria-label": i ? c.tableConfiguration.unpinColumn : c.tableConfiguration.pinColumn,
|
|
41
|
+
children: /* @__PURE__ */ n(b, {})
|
|
42
|
+
}
|
|
43
|
+
) });
|
|
44
|
+
}
|
|
45
|
+
function d({
|
|
46
|
+
column: i,
|
|
47
|
+
hasSticky: a,
|
|
48
|
+
onVisibilityToggle: l,
|
|
49
|
+
onStickyToggle: r
|
|
50
|
+
}) {
|
|
51
|
+
function t(p) {
|
|
52
|
+
l(i.id, p);
|
|
53
|
+
}
|
|
54
|
+
function e() {
|
|
55
|
+
r(i.id, !i.sticky);
|
|
56
|
+
}
|
|
57
|
+
return /* @__PURE__ */ s(
|
|
58
|
+
g,
|
|
59
|
+
{
|
|
60
|
+
className: u(o.configurationItem, !a && o.configurationItemNoSticky),
|
|
61
|
+
children: [
|
|
62
|
+
a && /* @__PURE__ */ n(m, { sticky: i.sticky, onToggle: e }),
|
|
63
|
+
/* @__PURE__ */ n("span", { className: o.label, children: i.label }),
|
|
64
|
+
/* @__PURE__ */ n(
|
|
65
|
+
w,
|
|
66
|
+
{
|
|
67
|
+
size: "sm",
|
|
68
|
+
checked: i.visible,
|
|
69
|
+
disabled: i.visibleToggleDisabled,
|
|
70
|
+
onCheckedChange: t
|
|
71
|
+
}
|
|
72
|
+
)
|
|
73
|
+
]
|
|
74
|
+
}
|
|
75
|
+
);
|
|
76
|
+
}
|
|
77
|
+
function A({
|
|
78
|
+
group: i,
|
|
79
|
+
hasSticky: a,
|
|
80
|
+
onVisibilityToggle: l,
|
|
81
|
+
onStickyToggle: r
|
|
82
|
+
}) {
|
|
83
|
+
function t() {
|
|
84
|
+
r(i.id, !i.sticky);
|
|
85
|
+
}
|
|
86
|
+
return /* @__PURE__ */ s("div", { children: [
|
|
87
|
+
/* @__PURE__ */ s(g, { className: o.configurationItem, children: [
|
|
88
|
+
a && /* @__PURE__ */ n(m, { sticky: i.sticky, onToggle: t }),
|
|
89
|
+
/* @__PURE__ */ n("span", { className: o.label, children: i.label })
|
|
90
|
+
] }),
|
|
91
|
+
/* @__PURE__ */ n("div", { className: o.groupContent, children: i.columns.map((e) => /* @__PURE__ */ n(
|
|
92
|
+
d,
|
|
93
|
+
{
|
|
94
|
+
column: e,
|
|
95
|
+
onVisibilityToggle: l,
|
|
96
|
+
onStickyToggle: r
|
|
97
|
+
},
|
|
98
|
+
e.id
|
|
99
|
+
)) })
|
|
100
|
+
] });
|
|
101
|
+
}
|
|
102
|
+
function E() {
|
|
103
|
+
const i = C(), a = i.useConfigurationColumns();
|
|
104
|
+
function l(t, e) {
|
|
105
|
+
i.updateColumnVisibility(t, e);
|
|
106
|
+
}
|
|
107
|
+
function r(t, e) {
|
|
108
|
+
i.updateColumnSticky(t, e);
|
|
109
|
+
}
|
|
110
|
+
return (
|
|
111
|
+
// The menu parts without a popup of their own: the popover is the popup, and the menu only
|
|
112
|
+
// supplies the items, so there is no arrow-key navigation between them.
|
|
113
|
+
/* @__PURE__ */ n(k, { open: !0, modal: !1, children: /* @__PURE__ */ s("div", { className: o.tableConfiguration, children: [
|
|
114
|
+
/* @__PURE__ */ n("div", { className: o.header, children: c.tableConfiguration.header }),
|
|
115
|
+
/* @__PURE__ */ n("div", { className: o.content, children: a.map((t, e) => /* @__PURE__ */ s(_, { children: [
|
|
116
|
+
T(t) ? /* @__PURE__ */ n(
|
|
117
|
+
A,
|
|
118
|
+
{
|
|
119
|
+
group: t,
|
|
120
|
+
hasSticky: !0,
|
|
121
|
+
onVisibilityToggle: l,
|
|
122
|
+
onStickyToggle: r
|
|
123
|
+
}
|
|
124
|
+
) : /* @__PURE__ */ n(
|
|
125
|
+
d,
|
|
126
|
+
{
|
|
127
|
+
column: t,
|
|
128
|
+
hasSticky: !0,
|
|
129
|
+
onVisibilityToggle: l,
|
|
130
|
+
onStickyToggle: r
|
|
131
|
+
}
|
|
132
|
+
),
|
|
133
|
+
e !== a.length - 1 && /* @__PURE__ */ n(S, {})
|
|
134
|
+
] }, t.id)) })
|
|
135
|
+
] }) })
|
|
136
|
+
);
|
|
137
|
+
}
|
|
138
|
+
function H() {
|
|
139
|
+
return /* @__PURE__ */ s(N, { children: [
|
|
140
|
+
/* @__PURE__ */ n(
|
|
141
|
+
v,
|
|
142
|
+
{
|
|
143
|
+
render: /* @__PURE__ */ n(
|
|
144
|
+
D,
|
|
145
|
+
{
|
|
146
|
+
variant: "ghost",
|
|
147
|
+
size: "sm",
|
|
148
|
+
icon: /* @__PURE__ */ n(h, {}),
|
|
149
|
+
"aria-label": c.tableConfiguration.configureColumns
|
|
150
|
+
}
|
|
151
|
+
)
|
|
152
|
+
}
|
|
153
|
+
),
|
|
154
|
+
/* @__PURE__ */ n(I, { side: "bottom", align: "end", sideOffset: 4, className: o.popup, children: /* @__PURE__ */ n(E, {}) })
|
|
155
|
+
] });
|
|
156
|
+
}
|
|
157
|
+
const oi = f("tableConfiguration", (i) => (i.registerSlot("top-end", {
|
|
158
|
+
id: "tableConfiguration",
|
|
159
|
+
component: H,
|
|
160
|
+
order: 10
|
|
161
|
+
}), {}));
|
|
162
|
+
export {
|
|
163
|
+
oi as DataGridTableConfigurationPlugin
|
|
164
|
+
};
|
|
165
|
+
//# sourceMappingURL=table-configuration.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"table-configuration.js","sources":["../../src/components/data-grid/plugins/table-configuration/components/data-grid-table-configuration-pin-button.tsx","../../src/components/data-grid/plugins/table-configuration/components/data-grid-table-configuration-item.tsx","../../src/components/data-grid/plugins/table-configuration/components/data-grid-table-configuration-group-item.tsx","../../src/components/data-grid/plugins/table-configuration/components/data-grid-table-configuration.tsx","../../src/components/data-grid/plugins/table-configuration/components/data-grid-table-configuration-trigger.tsx","../../src/components/data-grid/plugins/table-configuration/table-configuration-plugin.tsx"],"sourcesContent":["import { cx } from 'class-variance-authority';\nimport { PinIcon } from 'lucide-react';\n\nimport { Toggle } from '../../../../toggle/public.js';\nimport { messages } from '../../../messages';\nimport styles from './data-grid-table-configuration.module.css';\n\ninterface DataGridTableConfigurationPinButtonProps {\n sticky?: boolean;\n onToggle: () => void;\n}\n\nexport function DataGridTableConfigurationPinButton({\n sticky,\n onToggle,\n}: DataGridTableConfigurationPinButtonProps) {\n return (\n <div className={cx(styles.pinButton, sticky && styles.pinButtonVisible)}>\n <Toggle\n className={styles.pin}\n iconOnly\n size=\"sm\"\n pressed={sticky ?? false}\n onPressedChange={onToggle}\n aria-label={\n sticky ? messages.tableConfiguration.unpinColumn : messages.tableConfiguration.pinColumn\n }\n >\n <PinIcon />\n </Toggle>\n </div>\n );\n}\n","import { cx } from 'class-variance-authority';\n\nimport { DropdownMenuItem } from '../../../../dropdown-menu/public.js';\nimport { Switch } from '../../../../switch/public.js';\nimport type { ConfigurationColumn } from '../../../services/table/table-types';\nimport styles from './data-grid-table-configuration.module.css';\nimport { DataGridTableConfigurationPinButton } from './data-grid-table-configuration-pin-button';\n\ninterface DataGridTableConfigurationItemProps {\n column: ConfigurationColumn;\n hasSticky?: boolean;\n onVisibilityToggle: (columnId: string, visible: boolean) => void;\n onStickyToggle: (columnId: string, sticky: boolean) => void;\n}\n\nexport function DataGridTableConfigurationItem({\n column,\n hasSticky,\n onVisibilityToggle,\n onStickyToggle,\n}: DataGridTableConfigurationItemProps) {\n function handleVisibilityToggle(visible: boolean) {\n onVisibilityToggle(column.id, visible);\n }\n\n function handleStickyToggle() {\n onStickyToggle(column.id, !column.sticky);\n }\n\n // The item holds a switch and a pin button, both interactive: a menu item is the row they sit\n // in, not something to activate itself.\n return (\n <DropdownMenuItem\n className={cx(styles.configurationItem, !hasSticky && styles.configurationItemNoSticky)}\n >\n {hasSticky && (\n <DataGridTableConfigurationPinButton sticky={column.sticky} onToggle={handleStickyToggle} />\n )}\n <span className={styles.label}>{column.label}</span>\n <Switch\n size=\"sm\"\n checked={column.visible}\n disabled={column.visibleToggleDisabled}\n onCheckedChange={handleVisibilityToggle}\n />\n </DropdownMenuItem>\n );\n}\n","import { DropdownMenuItem } from '../../../../dropdown-menu/public.js';\nimport type { ConfigurationGroup } from '../../../services/table/table-types';\nimport styles from './data-grid-table-configuration.module.css';\nimport { DataGridTableConfigurationItem } from './data-grid-table-configuration-item';\nimport { DataGridTableConfigurationPinButton } from './data-grid-table-configuration-pin-button';\n\ninterface DataGridTableConfigurationGroupItemProps {\n group: ConfigurationGroup;\n hasSticky?: boolean;\n onVisibilityToggle: (columnId: string, visible: boolean) => void;\n onStickyToggle: (id: string, sticky: boolean) => void;\n}\n\nexport function DataGridTableConfigurationGroupItem({\n group,\n hasSticky,\n onVisibilityToggle,\n onStickyToggle,\n}: DataGridTableConfigurationGroupItemProps) {\n function handleStickyToggle() {\n onStickyToggle(group.id, !group.sticky);\n }\n\n return (\n <div>\n <DropdownMenuItem className={styles.configurationItem}>\n {hasSticky && (\n <DataGridTableConfigurationPinButton sticky={group.sticky} onToggle={handleStickyToggle} />\n )}\n <span className={styles.label}>{group.label}</span>\n </DropdownMenuItem>\n <div className={styles.groupContent}>\n {group.columns.map((col) => (\n <DataGridTableConfigurationItem\n key={col.id}\n column={col}\n onVisibilityToggle={onVisibilityToggle}\n onStickyToggle={onStickyToggle}\n />\n ))}\n </div>\n </div>\n );\n}\n","import { Fragment } from 'react';\n\nimport { DropdownMenu, DropdownMenuSeparator } from '../../../../dropdown-menu/public.js';\nimport { messages } from '../../../messages';\nimport { useTableService } from '../../../services/table/table-context';\nimport { isConfigurationGroup } from '../../../services/table/table-types';\nimport styles from './data-grid-table-configuration.module.css';\nimport { DataGridTableConfigurationGroupItem } from './data-grid-table-configuration-group-item';\nimport { DataGridTableConfigurationItem } from './data-grid-table-configuration-item';\n\nexport function DataGridTableConfiguration() {\n const tableService = useTableService();\n const columns = tableService.useConfigurationColumns();\n\n function handleVisibilityToggle(columnId: string, visible: boolean) {\n tableService.updateColumnVisibility(columnId, visible);\n }\n\n function handleStickyToggle(id: string, sticky: boolean) {\n tableService.updateColumnSticky(id, sticky);\n }\n\n return (\n // The menu parts without a popup of their own: the popover is the popup, and the menu only\n // supplies the items, so there is no arrow-key navigation between them.\n <DropdownMenu open modal={false}>\n <div className={styles.tableConfiguration}>\n <div className={styles.header}>{messages.tableConfiguration.header}</div>\n <div className={styles.content}>\n {columns.map((entry, index) => (\n <Fragment key={entry.id}>\n {isConfigurationGroup(entry) ? (\n <DataGridTableConfigurationGroupItem\n group={entry}\n hasSticky\n onVisibilityToggle={handleVisibilityToggle}\n onStickyToggle={handleStickyToggle}\n />\n ) : (\n <DataGridTableConfigurationItem\n column={entry}\n hasSticky\n onVisibilityToggle={handleVisibilityToggle}\n onStickyToggle={handleStickyToggle}\n />\n )}\n {index !== columns.length - 1 && <DropdownMenuSeparator />}\n </Fragment>\n ))}\n </div>\n </div>\n </DropdownMenu>\n );\n}\n","import { SettingsIcon } from 'lucide-react';\n\nimport { Button } from '../../../../button/public.js';\nimport { Popover, PopoverContent, PopoverTrigger } from '../../../../popover/public.js';\nimport { messages } from '../../../messages';\nimport styles from './data-grid-table-configuration.module.css';\nimport { DataGridTableConfiguration } from './data-grid-table-configuration';\n\nexport function DataGridTableConfigurationTrigger() {\n return (\n <Popover>\n <PopoverTrigger\n render={\n <Button\n variant=\"ghost\"\n size=\"sm\"\n icon={<SettingsIcon />}\n aria-label={messages.tableConfiguration.configureColumns}\n />\n }\n />\n <PopoverContent side=\"bottom\" align=\"end\" sideOffset={4} className={styles.popup}>\n <DataGridTableConfiguration />\n </PopoverContent>\n </Popover>\n );\n}\n","// Load-bearing: a plugin is rendered as a child of <DataGrid>, so a Server Component can import\n// and render it, and the component it returns calls hooks. This directive puts the banner on the\n// plugin's own entry chunk (dist/data-grid/<plugin>.js). client-boundaries.test.ts only scans a\n// component's top-level files, so scripts/verify-consumer.sh is what checks the built banner of\n// every plugin entry.\n'use client';\n\nimport type { DataGridItem } from '../../data-grid-types';\nimport { createDataGridPlugin } from '../../services/plugins/plugins-helpers';\nimport { DataGridTableConfigurationTrigger } from './components/data-grid-table-configuration-trigger';\n\n/** The plugin takes no props; the type is public so a consumer can name it. */\nexport type DataGridTableConfigurationPluginProps = Record<string, never>;\n\nexport const DataGridTableConfigurationPlugin = createDataGridPlugin<\n DataGridItem,\n 'tableConfiguration',\n DataGridTableConfigurationPluginProps\n>('tableConfiguration', (context) => {\n context.registerSlot('top-end', {\n id: 'tableConfiguration',\n component: DataGridTableConfigurationTrigger,\n order: 10,\n });\n\n return {};\n});\n"],"names":["DataGridTableConfigurationPinButton","sticky","onToggle","jsx","cx","styles","Toggle","messages","PinIcon","DataGridTableConfigurationItem","column","hasSticky","onVisibilityToggle","onStickyToggle","handleVisibilityToggle","visible","handleStickyToggle","jsxs","DropdownMenuItem","Switch","DataGridTableConfigurationGroupItem","group","col","DataGridTableConfiguration","tableService","useTableService","columns","columnId","id","DropdownMenu","entry","index","Fragment","isConfigurationGroup","DropdownMenuSeparator","DataGridTableConfigurationTrigger","Popover","PopoverTrigger","Button","SettingsIcon","PopoverContent","DataGridTableConfigurationPlugin","createDataGridPlugin","context"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AAYO,SAASA,EAAoC;AAAA,EAClD,QAAAC;AAAA,EACA,UAAAC;AACF,GAA6C;AAC3C,SACE,gBAAAC,EAAC,SAAI,WAAWC,EAAGC,EAAO,WAAWJ,KAAUI,EAAO,gBAAgB,GACpE,UAAA,gBAAAF;AAAA,IAACG;AAAA,IAAA;AAAA,MACC,WAAWD,EAAO;AAAA,MAClB,UAAQ;AAAA,MACR,MAAK;AAAA,MACL,SAASJ,KAAU;AAAA,MACnB,iBAAiBC;AAAA,MACjB,cACED,IAASM,EAAS,mBAAmB,cAAcA,EAAS,mBAAmB;AAAA,MAGjF,4BAACC,GAAA,CAAA,CAAQ;AAAA,IAAA;AAAA,EAAA,GAEb;AAEJ;ACjBO,SAASC,EAA+B;AAAA,EAC7C,QAAAC;AAAA,EACA,WAAAC;AAAA,EACA,oBAAAC;AAAA,EACA,gBAAAC;AACF,GAAwC;AACtC,WAASC,EAAuBC,GAAkB;AAChD,IAAAH,EAAmBF,EAAO,IAAIK,CAAO;AAAA,EACvC;AAEA,WAASC,IAAqB;AAC5B,IAAAH,EAAeH,EAAO,IAAI,CAACA,EAAO,MAAM;AAAA,EAC1C;AAIA,SACE,gBAAAO;AAAA,IAACC;AAAA,IAAA;AAAA,MACC,WAAWd,EAAGC,EAAO,mBAAmB,CAACM,KAAaN,EAAO,yBAAyB;AAAA,MAErF,UAAA;AAAA,QAAAM,uBACEX,GAAA,EAAoC,QAAQU,EAAO,QAAQ,UAAUM,GAAoB;AAAA,0BAE3F,QAAA,EAAK,WAAWX,EAAO,OAAQ,YAAO,OAAM;AAAA,QAC7C,gBAAAF;AAAA,UAACgB;AAAA,UAA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