@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
package/dist/data-grid.js
CHANGED
|
@@ -1,110 +1,162 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsx as
|
|
3
|
-
import {
|
|
4
|
-
import { b as
|
|
5
|
-
import { c as
|
|
6
|
-
import { cx as
|
|
7
|
-
import { Spinner as
|
|
8
|
-
import { SearchXIcon as
|
|
2
|
+
import { jsx as f, jsxs as G, Fragment as M } from "react/jsx-runtime";
|
|
3
|
+
import { useRef as z, useState as ut, useEffect as R, useMemo as vt, Suspense as kt } from "react";
|
|
4
|
+
import { b as O, u as j, i as U, D as xt } from "./chunks/plugins-helpers.js";
|
|
5
|
+
import { c as Fn, a as Bn } from "./chunks/plugins-helpers.js";
|
|
6
|
+
import { cx as H } from "class-variance-authority";
|
|
7
|
+
import { Spinner as Et } from "./spinner.js";
|
|
8
|
+
import { SearchXIcon as _t, OctagonAlertIcon as Lt, TablePropertiesIcon as It } from "lucide-react";
|
|
9
9
|
import { m as V } from "./chunks/messages.js";
|
|
10
|
-
import { Empty as dt, EmptyHeader as
|
|
11
|
-
import { create as
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import
|
|
10
|
+
import { Empty as dt, EmptyHeader as ft, EmptyMedia as pt, EmptyTitle as mt, EmptyDescription as St } from "./empty.js";
|
|
11
|
+
import { create as P } from "zustand";
|
|
12
|
+
import { c as Dt, u as Gt } from "./chunks/hooked.js";
|
|
13
|
+
import { S as Mt } from "./chunks/segment.js";
|
|
14
|
+
import { ToggleGroupItem as Rt } from "./toggle-group.js";
|
|
15
|
+
import { useShallow as J } from "zustand/react/shallow";
|
|
16
|
+
import { g as Ot, r as At, a as q, s as Wt, D as tt, b as Ht, c as X, d as Nt } from "./chunks/resolve-body-cell-props.js";
|
|
17
|
+
import { u as N } from "./chunks/table-context.js";
|
|
18
|
+
import { TableHead as Vt, TableRow as Y, TableBody as Pt, TableHeader as Tt, Table as Ft } from "./table.js";
|
|
19
|
+
import { D as Bt } from "./chunks/data-grid-record-context.js";
|
|
20
|
+
import { u as zn } from "./chunks/data-grid-record-context.js";
|
|
21
|
+
import { i as D } from "./chunks/table-types.js";
|
|
22
|
+
import './chunks/data-grid.-6P4UQGJ.css';const $t = "_delayed_1ys81_5", zt = {
|
|
17
23
|
delayed: $t
|
|
18
24
|
};
|
|
19
|
-
function
|
|
20
|
-
return /* @__PURE__ */
|
|
25
|
+
function Q({ className: t }) {
|
|
26
|
+
return /* @__PURE__ */ f("span", { className: H(zt.delayed, t), children: /* @__PURE__ */ f(Et, { size: "lg" }) });
|
|
21
27
|
}
|
|
22
|
-
const
|
|
23
|
-
root:
|
|
28
|
+
const jt = "_root_9f4nk_13", Kt = {
|
|
29
|
+
root: jt
|
|
24
30
|
};
|
|
25
|
-
function
|
|
26
|
-
const t =
|
|
31
|
+
function Ut() {
|
|
32
|
+
const t = O(), e = t.load.useLoadStateStore((o) => o.recordsLoadState), n = t.core.useExternalLoadingStore((o) => o.loading);
|
|
27
33
|
return e === "loading" || n;
|
|
28
34
|
}
|
|
29
|
-
const
|
|
30
|
-
loaderOverlay:
|
|
35
|
+
const Yt = "_loaderOverlay_15xmu_29", Jt = {
|
|
36
|
+
loaderOverlay: Yt
|
|
31
37
|
};
|
|
32
|
-
function
|
|
33
|
-
const n =
|
|
34
|
-
return /* @__PURE__ */
|
|
38
|
+
function qt({ children: t }) {
|
|
39
|
+
const n = O().core.useLoadStateStore((m) => m.loadState), s = Ut() && n === "loaded", a = s || n === "loading";
|
|
40
|
+
return /* @__PURE__ */ G("div", { className: Kt.root, "aria-busy": a ? "true" : void 0, children: [
|
|
35
41
|
t,
|
|
36
|
-
|
|
42
|
+
s && /* @__PURE__ */ f("div", { className: Jt.loaderOverlay, children: /* @__PURE__ */ f(Q, {}) })
|
|
37
43
|
] });
|
|
38
44
|
}
|
|
39
|
-
const Xt = "_emptyState_1tt1k_3",
|
|
45
|
+
const Xt = "_emptyState_1tt1k_3", Qt = {
|
|
40
46
|
emptyState: Xt
|
|
41
47
|
};
|
|
42
|
-
function
|
|
43
|
-
const { useStore: t } =
|
|
44
|
-
return /* @__PURE__ */
|
|
45
|
-
/* @__PURE__ */
|
|
46
|
-
/* @__PURE__ */
|
|
47
|
-
e && /* @__PURE__ */
|
|
48
|
+
function Zt() {
|
|
49
|
+
const { useStore: t } = j(), e = t((n) => n.hasActiveFilters);
|
|
50
|
+
return /* @__PURE__ */ f(dt, { className: Qt.emptyState, children: /* @__PURE__ */ G(ft, { children: [
|
|
51
|
+
/* @__PURE__ */ f(pt, { variant: "icon", children: /* @__PURE__ */ f(_t, {}) }),
|
|
52
|
+
/* @__PURE__ */ f(mt, { children: V.emptyState.noResultsFound }),
|
|
53
|
+
e && /* @__PURE__ */ f(St, { children: V.emptyState.noResultsFoundDescription })
|
|
48
54
|
] }) });
|
|
49
55
|
}
|
|
50
|
-
const
|
|
51
|
-
dataGridLayoutMain:
|
|
56
|
+
const te = "_dataGridLayoutMain_ta8be_5", ee = {
|
|
57
|
+
dataGridLayoutMain: te
|
|
52
58
|
};
|
|
53
|
-
function
|
|
54
|
-
const { useStore: t } =
|
|
55
|
-
return /* @__PURE__ */
|
|
56
|
-
|
|
57
|
-
u && (
|
|
59
|
+
function ne() {
|
|
60
|
+
const { useStore: t } = j(), e = O(), n = t((y) => y.visibleRecords), o = t((y) => y.hasActiveFilters), s = e.layout.useLayoutStore((y) => y.activeSlotIds.get("main")), a = e.layout.useLayoutStore((y) => y.slots.get("main")), m = a == null ? void 0 : a.find((y) => y.id === s), g = e.layout.useLayoutStore((y) => y.slots.get("empty")), c = g == null ? void 0 : g[0], d = n.length === 0, l = m && (!d || o), u = d;
|
|
61
|
+
return /* @__PURE__ */ G("div", { className: ee.dataGridLayoutMain, children: [
|
|
62
|
+
l && /* @__PURE__ */ f(m.component, {}),
|
|
63
|
+
u && (c ? /* @__PURE__ */ f(c.component, {}) : /* @__PURE__ */ f(Zt, {}))
|
|
58
64
|
] });
|
|
59
65
|
}
|
|
60
|
-
function
|
|
61
|
-
const n =
|
|
62
|
-
return !n || n.length === 0 ? null : /* @__PURE__ */
|
|
66
|
+
function oe({ name: t }) {
|
|
67
|
+
const n = O().layout.useLayoutStore((o) => o.slots.get(t));
|
|
68
|
+
return !n || n.length === 0 ? null : /* @__PURE__ */ f(M, { children: n.map((o) => /* @__PURE__ */ f(o.component, {}, o.id)) });
|
|
63
69
|
}
|
|
64
|
-
const
|
|
65
|
-
dataGridTopDefault:
|
|
66
|
-
topStartSlots:
|
|
70
|
+
const re = "_dataGridTopDefault_5t4tt_1", se = "_topStartSlots_5t4tt_16", ie = "_topStartSlot_5t4tt_16", ae = "_topEndSlot_5t4tt_32", ce = "_topEndSlots_5t4tt_36", F = {
|
|
71
|
+
dataGridTopDefault: re,
|
|
72
|
+
topStartSlots: se,
|
|
67
73
|
topStartSlot: ie,
|
|
68
|
-
topEndSlot:
|
|
69
|
-
topEndSlots:
|
|
74
|
+
topEndSlot: ae,
|
|
75
|
+
topEndSlots: ce
|
|
70
76
|
};
|
|
71
|
-
function ce() {
|
|
72
|
-
const t = H(), e = t.layout.useLayoutStore(
|
|
73
|
-
(s) => s.slots.get("top-start")
|
|
74
|
-
), n = t.layout.useLayoutStore((s) => s.slots.get("top-end")), o = ((e == null ? void 0 : e.length) ?? 0) > 0, r = ((n == null ? void 0 : n.length) ?? 0) > 0;
|
|
75
|
-
return !o && !r ? null : /* @__PURE__ */ D("div", { className: P.dataGridTopDefault, children: [
|
|
76
|
-
o && /* @__PURE__ */ p("div", { className: P.topStartSlots, children: e == null ? void 0 : e.map((s) => /* @__PURE__ */ p("div", { className: P.topStartSlot, children: /* @__PURE__ */ p(s.component, {}) }, s.id)) }),
|
|
77
|
-
r && /* @__PURE__ */ p("div", { className: P.topEndSlots, children: n == null ? void 0 : n.map((s) => /* @__PURE__ */ p("div", { className: P.topEndSlot, children: /* @__PURE__ */ p(s.component, {}) }, s.id)) })
|
|
78
|
-
] });
|
|
79
|
-
}
|
|
80
77
|
function le() {
|
|
81
|
-
const t =
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
return /* @__PURE__ */
|
|
78
|
+
const t = O(), e = t.layout.useLayoutStore(
|
|
79
|
+
(a) => a.slots.get("top-start")
|
|
80
|
+
), n = t.layout.useLayoutStore((a) => a.slots.get("top-end")), o = ((e == null ? void 0 : e.length) ?? 0) > 0, s = ((n == null ? void 0 : n.length) ?? 0) > 0;
|
|
81
|
+
return !o && !s ? null : /* @__PURE__ */ G("div", { className: F.dataGridTopDefault, children: [
|
|
82
|
+
o && /* @__PURE__ */ f("div", { className: F.topStartSlots, children: e == null ? void 0 : e.map((a) => /* @__PURE__ */ f("div", { className: F.topStartSlot, children: /* @__PURE__ */ f(a.component, {}) }, a.id)) }),
|
|
83
|
+
s && /* @__PURE__ */ f("div", { className: F.topEndSlots, children: n == null ? void 0 : n.map((a) => /* @__PURE__ */ f("div", { className: F.topEndSlot, children: /* @__PURE__ */ f(a.component, {}) }, a.id)) })
|
|
84
|
+
] });
|
|
85
85
|
}
|
|
86
|
-
const de = "
|
|
87
|
-
|
|
86
|
+
const ue = "_wrapper_1h8lw_7", de = "_replacement_1h8lw_18", et = {
|
|
87
|
+
wrapper: ue,
|
|
88
|
+
replacement: de
|
|
88
89
|
};
|
|
89
|
-
function
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
90
|
+
function ht(t) {
|
|
91
|
+
const e = [];
|
|
92
|
+
for (const n of Array.from(t.children)) {
|
|
93
|
+
const { display: o, position: s } = getComputedStyle(n);
|
|
94
|
+
o === "none" || s === "absolute" || s === "fixed" || (o === "contents" ? e.push(...ht(n)) : e.push(n));
|
|
95
|
+
}
|
|
96
|
+
return e;
|
|
97
|
+
}
|
|
98
|
+
function fe(t) {
|
|
99
|
+
const { display: e, flexWrap: n } = getComputedStyle(t);
|
|
100
|
+
return e.includes("flex") && n !== "" && n !== "nowrap";
|
|
101
|
+
}
|
|
102
|
+
function pe(t) {
|
|
103
|
+
let e = Number.NEGATIVE_INFINITY, n = Number.POSITIVE_INFINITY;
|
|
104
|
+
for (const o of ht(t)) {
|
|
105
|
+
const { top: s, bottom: a, width: m, height: g } = o.getBoundingClientRect();
|
|
106
|
+
m === 0 && g === 0 || (e = Math.max(e, s), n = Math.min(n, a));
|
|
107
|
+
}
|
|
108
|
+
return e <= n + 0.5;
|
|
109
|
+
}
|
|
110
|
+
function me(t) {
|
|
111
|
+
return [t, ...Array.from(t.querySelectorAll("*"))].every(
|
|
112
|
+
(e) => !fe(e) || pe(e)
|
|
113
|
+
);
|
|
95
114
|
}
|
|
96
|
-
function
|
|
97
|
-
const t =
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
115
|
+
function Se() {
|
|
116
|
+
const t = O(), e = t.layout.useLayoutStore((d) => d.activeSlotIds.get("top")), n = t.layout.useLayoutStore((d) => d.slots.get("top")), o = n == null ? void 0 : n.find((d) => d.id === e), s = (o == null ? void 0 : o.id) === "default", a = z(null), [m, g] = ut();
|
|
117
|
+
if (R(() => {
|
|
118
|
+
const d = a.current;
|
|
119
|
+
if (!s || !d) return;
|
|
120
|
+
const l = new ResizeObserver((u) => {
|
|
121
|
+
var r, i;
|
|
122
|
+
const y = u[u.length - 1], p = ((i = (r = y.borderBoxSize) == null ? void 0 : r[0]) == null ? void 0 : i.blockSize) ?? y.contentRect.height;
|
|
123
|
+
g(me(d) ? p : void 0);
|
|
124
|
+
});
|
|
125
|
+
return l.observe(d), () => l.disconnect();
|
|
126
|
+
}, [s]), !o) return null;
|
|
127
|
+
const c = s ? le : o.component;
|
|
128
|
+
return /* @__PURE__ */ f(
|
|
129
|
+
"div",
|
|
130
|
+
{
|
|
131
|
+
ref: a,
|
|
132
|
+
className: H(et.wrapper, !s && et.replacement),
|
|
133
|
+
style: !s && m ? { minBlockSize: m } : void 0,
|
|
134
|
+
children: /* @__PURE__ */ f(c, {})
|
|
135
|
+
}
|
|
136
|
+
);
|
|
137
|
+
}
|
|
138
|
+
const he = "_center_s4klt_3", nt = {
|
|
139
|
+
center: he
|
|
140
|
+
};
|
|
141
|
+
function ye({ loadState: t, children: e }) {
|
|
142
|
+
return t === "loaded" ? /* @__PURE__ */ f(M, { children: e }) : t === "error" ? /* @__PURE__ */ f(dt, { className: nt.center, children: /* @__PURE__ */ G(ft, { children: [
|
|
143
|
+
/* @__PURE__ */ f(pt, { variant: "icon", children: /* @__PURE__ */ f(Lt, {}) }),
|
|
144
|
+
/* @__PURE__ */ f(mt, { children: V.loadError.headerDefault }),
|
|
145
|
+
/* @__PURE__ */ f(St, { children: V.loadError.bodyDefault })
|
|
146
|
+
] }) }) : /* @__PURE__ */ f(Q, { className: nt.center });
|
|
147
|
+
}
|
|
148
|
+
function ge() {
|
|
149
|
+
const t = j(), { useStore: e } = t, { core: n } = O(), o = e((m) => m.visibleRecords), s = n.useLoadStateStore((m) => m.loadState), a = o.length === 0;
|
|
150
|
+
return R(() => (t.init().catch((m) => {
|
|
151
|
+
process.env.NODE_ENV !== "production" && console.error("[DataGrid] Initial load failed:", m);
|
|
152
|
+
}), () => t.destroy()), [t]), /* @__PURE__ */ f(qt, { children: /* @__PURE__ */ G(ye, { loadState: s, children: [
|
|
153
|
+
/* @__PURE__ */ f(Se, {}),
|
|
154
|
+
/* @__PURE__ */ f(ne, {}),
|
|
155
|
+
!a && /* @__PURE__ */ f(oe, { name: "bottom" })
|
|
104
156
|
] }) });
|
|
105
157
|
}
|
|
106
|
-
function
|
|
107
|
-
const t =
|
|
158
|
+
function yt() {
|
|
159
|
+
const t = P()(() => ({
|
|
108
160
|
loadState: "blank"
|
|
109
161
|
}));
|
|
110
162
|
let e = 0;
|
|
@@ -112,9 +164,9 @@ function ht() {
|
|
|
112
164
|
useLoadState: t,
|
|
113
165
|
setLoading: n,
|
|
114
166
|
setLoaded: o,
|
|
115
|
-
setError:
|
|
116
|
-
setBlank:
|
|
117
|
-
reset:
|
|
167
|
+
setError: s,
|
|
168
|
+
setBlank: a,
|
|
169
|
+
reset: m,
|
|
118
170
|
loadPromise: g
|
|
119
171
|
};
|
|
120
172
|
function n() {
|
|
@@ -123,28 +175,28 @@ function ht() {
|
|
|
123
175
|
function o() {
|
|
124
176
|
t.setState({ loadState: "loaded" });
|
|
125
177
|
}
|
|
126
|
-
function
|
|
178
|
+
function s() {
|
|
127
179
|
t.setState({ loadState: "error" });
|
|
128
180
|
}
|
|
129
|
-
function
|
|
181
|
+
function a() {
|
|
130
182
|
t.setState({ loadState: "blank" });
|
|
131
183
|
}
|
|
132
|
-
function
|
|
133
|
-
e += 1,
|
|
184
|
+
function m() {
|
|
185
|
+
e += 1, a();
|
|
134
186
|
}
|
|
135
|
-
async function g(
|
|
136
|
-
const
|
|
187
|
+
async function g(c) {
|
|
188
|
+
const d = ++e;
|
|
137
189
|
n();
|
|
138
190
|
try {
|
|
139
|
-
const
|
|
140
|
-
return
|
|
141
|
-
} catch (
|
|
142
|
-
throw
|
|
191
|
+
const l = await c;
|
|
192
|
+
return d === e && o(), l;
|
|
193
|
+
} catch (l) {
|
|
194
|
+
throw d === e && s(), l;
|
|
143
195
|
}
|
|
144
196
|
}
|
|
145
197
|
}
|
|
146
|
-
function
|
|
147
|
-
const { useLoadState: t, loadPromise: e, reset: n } =
|
|
198
|
+
function Ce() {
|
|
199
|
+
const { useLoadState: t, loadPromise: e, reset: n } = yt(), o = P()(() => ({
|
|
148
200
|
loading: !1
|
|
149
201
|
}));
|
|
150
202
|
return {
|
|
@@ -152,46 +204,14 @@ function pe() {
|
|
|
152
204
|
loadPromise: e,
|
|
153
205
|
resetLoadState: n,
|
|
154
206
|
useExternalLoadingStore: o,
|
|
155
|
-
updateLoading:
|
|
207
|
+
updateLoading: s
|
|
156
208
|
};
|
|
157
|
-
function
|
|
158
|
-
o.setState({ loading:
|
|
159
|
-
}
|
|
160
|
-
}
|
|
161
|
-
function Se() {
|
|
162
|
-
const t = /* @__PURE__ */ new Map();
|
|
163
|
-
return { hook: e, callHook: o, callHookParallel: r, callHookSync: s };
|
|
164
|
-
function e(l, g) {
|
|
165
|
-
if (!l || typeof g != "function")
|
|
166
|
-
return () => {
|
|
167
|
-
};
|
|
168
|
-
const a = g, f = t.get(l) ?? [];
|
|
169
|
-
return f.push(a), t.set(l, f), () => {
|
|
170
|
-
const d = t.get(l);
|
|
171
|
-
if (!d) return;
|
|
172
|
-
const u = d.indexOf(a);
|
|
173
|
-
u !== -1 && d.splice(u, 1), d.length === 0 && t.delete(l);
|
|
174
|
-
};
|
|
175
|
-
}
|
|
176
|
-
function n(l) {
|
|
177
|
-
return [...t.get(l) ?? []];
|
|
178
|
-
}
|
|
179
|
-
function o(l, ...g) {
|
|
180
|
-
const a = n(l).reduce((f, d) => {
|
|
181
|
-
const u = f[f.length - 1] ?? Promise.resolve();
|
|
182
|
-
return [...f, u.then(() => d(...g))];
|
|
183
|
-
}, []);
|
|
184
|
-
return Promise.all(a);
|
|
185
|
-
}
|
|
186
|
-
function r(l, ...g) {
|
|
187
|
-
return Promise.all(n(l).map((a) => a(...g)));
|
|
188
|
-
}
|
|
189
|
-
function s(l, ...g) {
|
|
190
|
-
return n(l).map((a) => a(...g));
|
|
209
|
+
function s(a) {
|
|
210
|
+
o.setState({ loading: a });
|
|
191
211
|
}
|
|
192
212
|
}
|
|
193
|
-
function
|
|
194
|
-
const t =
|
|
213
|
+
function be() {
|
|
214
|
+
const t = Dt();
|
|
195
215
|
return {
|
|
196
216
|
hook: t.hook,
|
|
197
217
|
callHook: t.callHook,
|
|
@@ -199,288 +219,288 @@ function me() {
|
|
|
199
219
|
callHookSync: t.callHookSync
|
|
200
220
|
};
|
|
201
221
|
}
|
|
202
|
-
const
|
|
203
|
-
[
|
|
204
|
-
[
|
|
222
|
+
const Z = "table_layout", gt = "cards_layout", ot = "view_selector", we = /* @__PURE__ */ new Map([
|
|
223
|
+
[Z, V.layoutMainSlotSelector.table],
|
|
224
|
+
[gt, V.layoutMainSlotSelector.cards]
|
|
205
225
|
]);
|
|
206
|
-
function
|
|
207
|
-
const t =
|
|
226
|
+
function ve() {
|
|
227
|
+
const t = O(), e = t.layout.useLayoutStore((s) => s.slots.get("main")), n = t.layout.useLayoutStore((s) => s.activeSlotIds.get("main"));
|
|
208
228
|
if (!e || e.length < 2) return null;
|
|
209
|
-
return /* @__PURE__ */
|
|
210
|
-
const
|
|
211
|
-
return /* @__PURE__ */
|
|
212
|
-
|
|
229
|
+
return /* @__PURE__ */ f(Mt, { size: "sm", iconOnly: !0, value: n, onValueChange: o, children: e.map((s) => {
|
|
230
|
+
const a = "icon" in s ? s.icon : void 0;
|
|
231
|
+
return /* @__PURE__ */ f(
|
|
232
|
+
Rt,
|
|
213
233
|
{
|
|
214
|
-
value:
|
|
215
|
-
"aria-label":
|
|
216
|
-
children:
|
|
234
|
+
value: s.id,
|
|
235
|
+
"aria-label": we.get(s.id) ?? s.id,
|
|
236
|
+
children: a ? /* @__PURE__ */ f(a, {}) : null
|
|
217
237
|
},
|
|
218
|
-
|
|
238
|
+
s.id
|
|
219
239
|
);
|
|
220
240
|
}) });
|
|
221
|
-
function o(
|
|
222
|
-
|
|
241
|
+
function o(s) {
|
|
242
|
+
s && t.layout.setActiveSlotId("main", s);
|
|
223
243
|
}
|
|
224
244
|
}
|
|
225
|
-
function
|
|
226
|
-
const e =
|
|
245
|
+
function ke(t) {
|
|
246
|
+
const e = P()(() => ({
|
|
227
247
|
slots: /* @__PURE__ */ new Map(),
|
|
228
248
|
activeSlotIds: /* @__PURE__ */ new Map()
|
|
229
249
|
})), n = {
|
|
230
|
-
registerSlot:
|
|
231
|
-
setActiveSlotId:
|
|
250
|
+
registerSlot: a,
|
|
251
|
+
setActiveSlotId: m,
|
|
232
252
|
getActiveSlotId: g
|
|
233
253
|
};
|
|
234
254
|
return t.plugins.registerPublicApi(n), {
|
|
235
255
|
...n,
|
|
236
256
|
useLayoutStore: e
|
|
237
257
|
};
|
|
238
|
-
function o(
|
|
239
|
-
return
|
|
258
|
+
function o(c, d) {
|
|
259
|
+
return s(c).find((l) => l.id === d);
|
|
240
260
|
}
|
|
241
|
-
function
|
|
242
|
-
return e.getState().slots.get(
|
|
261
|
+
function s(c) {
|
|
262
|
+
return e.getState().slots.get(c) ?? [];
|
|
243
263
|
}
|
|
244
|
-
function
|
|
245
|
-
(
|
|
264
|
+
function a(c, d) {
|
|
265
|
+
(c === "top-start" || c === "top-end") && !o("top", "default") && a("top", {
|
|
246
266
|
id: "default",
|
|
247
267
|
active: !0,
|
|
248
268
|
component: () => null
|
|
249
269
|
});
|
|
250
|
-
const
|
|
251
|
-
e.setState((
|
|
252
|
-
const
|
|
253
|
-
return
|
|
254
|
-
}), ("active" in
|
|
255
|
-
id:
|
|
256
|
-
component:
|
|
270
|
+
const l = d.id ?? Math.random().toString(), u = s(c), y = d.order ?? (u.length + 1) * 10, p = { id: l, name: c, ...d, order: y }, r = [...u, p].sort((i, S) => i.order - S.order);
|
|
271
|
+
e.setState((i) => {
|
|
272
|
+
const S = new Map(i.slots);
|
|
273
|
+
return S.set(c, r), { slots: S };
|
|
274
|
+
}), ("active" in d && d.active || r.length === 1) && m(c, p.id), c === "main" && r.length >= 2 && !o("top-end", ot) && a("top-end", {
|
|
275
|
+
id: ot,
|
|
276
|
+
component: ve
|
|
257
277
|
});
|
|
258
278
|
}
|
|
259
|
-
function
|
|
260
|
-
e.setState((
|
|
261
|
-
const u = new Map(
|
|
262
|
-
return u.set(
|
|
279
|
+
function m(c, d) {
|
|
280
|
+
e.setState((l) => {
|
|
281
|
+
const u = new Map(l.activeSlotIds);
|
|
282
|
+
return u.set(c, d), { activeSlotIds: u };
|
|
263
283
|
});
|
|
264
284
|
}
|
|
265
|
-
function g(
|
|
266
|
-
return e.getState().activeSlotIds.get(
|
|
285
|
+
function g(c) {
|
|
286
|
+
return e.getState().activeSlotIds.get(c);
|
|
267
287
|
}
|
|
268
288
|
}
|
|
269
289
|
function $(t) {
|
|
270
290
|
return typeof t == "object" && t !== null;
|
|
271
291
|
}
|
|
272
|
-
function
|
|
273
|
-
const n = ((e == null ? void 0 : e.id) ?? Math.random()).toString(), o = new AbortController(),
|
|
274
|
-
let
|
|
275
|
-
const
|
|
292
|
+
function xe(t, e) {
|
|
293
|
+
const n = ((e == null ? void 0 : e.id) ?? Math.random()).toString(), o = new AbortController(), s = yt(), a = structuredClone((e == null ? void 0 : e.loadContext) ?? {});
|
|
294
|
+
let m, g, c;
|
|
295
|
+
const d = {}, l = {
|
|
276
296
|
id: n,
|
|
277
|
-
useLoadState:
|
|
297
|
+
useLoadState: s.useLoadState,
|
|
278
298
|
signal: o.signal,
|
|
279
299
|
abort: u,
|
|
280
300
|
refresh: (e == null ? void 0 : e.refresh) ?? null,
|
|
281
301
|
get promise() {
|
|
282
|
-
return
|
|
302
|
+
return d.promise;
|
|
283
303
|
},
|
|
284
304
|
get loadContext() {
|
|
285
|
-
return
|
|
305
|
+
return a;
|
|
286
306
|
},
|
|
287
307
|
get processResult() {
|
|
288
308
|
return g;
|
|
289
309
|
},
|
|
290
310
|
get fetchResult() {
|
|
291
|
-
return
|
|
311
|
+
return m;
|
|
292
312
|
},
|
|
293
313
|
get error() {
|
|
294
|
-
return
|
|
314
|
+
return c;
|
|
295
315
|
}
|
|
296
316
|
};
|
|
297
|
-
return
|
|
317
|
+
return d.promise = s.loadPromise(y()), l;
|
|
298
318
|
function u() {
|
|
299
319
|
o.abort();
|
|
300
320
|
}
|
|
301
|
-
async function
|
|
321
|
+
async function y() {
|
|
302
322
|
try {
|
|
303
|
-
await t.hooked.callHookParallel("load:prepare",
|
|
304
|
-
const
|
|
305
|
-
|
|
306
|
-
const
|
|
307
|
-
...
|
|
308
|
-
signal:
|
|
323
|
+
await t.hooked.callHookParallel("load:prepare", l);
|
|
324
|
+
const i = await t.hooked.callHookParallel("load:context", l);
|
|
325
|
+
r(a, i);
|
|
326
|
+
const S = {
|
|
327
|
+
...l.loadContext,
|
|
328
|
+
signal: l.signal
|
|
309
329
|
};
|
|
310
|
-
if (
|
|
311
|
-
const
|
|
312
|
-
(!
|
|
330
|
+
if (m = await t.config.load.current(S), p(m), g = (await t.hooked.callHook("load:process", l))[0] ?? m, p(g), (e == null ? void 0 : e.store) !== !1) {
|
|
331
|
+
const h = t.hooked.callHookSync("load:store", l);
|
|
332
|
+
(!h.length || h.every((C) => C !== !0)) && (t.storage.clearSections(), t.storage.createSection({ loadContext: a }, g.results));
|
|
313
333
|
}
|
|
314
|
-
await t.hooked.callHook("load:success",
|
|
315
|
-
} catch (
|
|
316
|
-
throw
|
|
334
|
+
await t.hooked.callHook("load:success", l);
|
|
335
|
+
} catch (i) {
|
|
336
|
+
throw c = i, await t.hooked.callHook("load:error", l), c;
|
|
317
337
|
}
|
|
318
338
|
}
|
|
319
|
-
function
|
|
320
|
-
if (typeof
|
|
339
|
+
function p(i) {
|
|
340
|
+
if (typeof i != "object" || i === null || !("results" in i))
|
|
321
341
|
throw new Error(
|
|
322
|
-
`Load result must be an object with "results" and "total?" properties. Got ${JSON.stringify(
|
|
342
|
+
`Load result must be an object with "results" and "total?" properties. Got ${JSON.stringify(i)}`
|
|
323
343
|
);
|
|
324
344
|
}
|
|
325
|
-
function i
|
|
326
|
-
for (const
|
|
327
|
-
if ($(
|
|
328
|
-
for (const C in
|
|
329
|
-
const
|
|
330
|
-
if ($(
|
|
331
|
-
if (Array.isArray(
|
|
332
|
-
|
|
345
|
+
function r(i, S) {
|
|
346
|
+
for (const h of S ?? [])
|
|
347
|
+
if ($(h))
|
|
348
|
+
for (const C in h) {
|
|
349
|
+
const w = h[C];
|
|
350
|
+
if ($(w))
|
|
351
|
+
if (Array.isArray(w))
|
|
352
|
+
i[C] = w;
|
|
333
353
|
else {
|
|
334
|
-
|
|
335
|
-
const
|
|
336
|
-
$(
|
|
354
|
+
i[C] ?? (i[C] = {});
|
|
355
|
+
const k = i[C];
|
|
356
|
+
$(k) && Object.assign(k, w);
|
|
337
357
|
}
|
|
338
358
|
}
|
|
339
359
|
}
|
|
340
360
|
}
|
|
341
|
-
function
|
|
361
|
+
function Ee(t) {
|
|
342
362
|
const e = /* @__PURE__ */ new Map(), n = /* @__PURE__ */ new Set();
|
|
343
363
|
let o;
|
|
344
|
-
const
|
|
364
|
+
const s = P()(() => ({
|
|
345
365
|
loadState: "blank",
|
|
346
366
|
recordsLoadState: "blank"
|
|
347
|
-
})),
|
|
348
|
-
triggerLoad:
|
|
349
|
-
refresh:
|
|
350
|
-
abort:
|
|
351
|
-
getLoadInstances:
|
|
352
|
-
useLoadStateStore:
|
|
367
|
+
})), a = {
|
|
368
|
+
triggerLoad: r,
|
|
369
|
+
refresh: y,
|
|
370
|
+
abort: d,
|
|
371
|
+
getLoadInstances: c,
|
|
372
|
+
useLoadStateStore: s
|
|
353
373
|
};
|
|
354
|
-
return t.plugins.registerPublicApi(
|
|
355
|
-
...
|
|
374
|
+
return t.plugins.registerPublicApi(a), {
|
|
375
|
+
...a,
|
|
356
376
|
init: u
|
|
357
377
|
};
|
|
358
|
-
function
|
|
359
|
-
|
|
378
|
+
function m() {
|
|
379
|
+
s.setState({
|
|
360
380
|
loadState: e.size > 0 ? "loading" : "blank",
|
|
361
381
|
recordsLoadState: n.size > 0 ? "loading" : "blank"
|
|
362
382
|
});
|
|
363
383
|
}
|
|
364
|
-
function g(
|
|
365
|
-
var
|
|
366
|
-
return (
|
|
384
|
+
function g(i) {
|
|
385
|
+
var S, h;
|
|
386
|
+
return (i == null ? void 0 : i.store) === !1 ? !1 : ((h = (S = i == null ? void 0 : i.loadContext) == null ? void 0 : S.tree) == null ? void 0 : h.parentId) == null;
|
|
367
387
|
}
|
|
368
|
-
function
|
|
388
|
+
function c() {
|
|
369
389
|
return [...e.values()];
|
|
370
390
|
}
|
|
371
|
-
function
|
|
372
|
-
for (const
|
|
373
|
-
|
|
391
|
+
function d() {
|
|
392
|
+
for (const i of e.values())
|
|
393
|
+
i.abort();
|
|
374
394
|
}
|
|
375
|
-
async function
|
|
395
|
+
async function l(i) {
|
|
376
396
|
try {
|
|
377
|
-
return await
|
|
378
|
-
} catch (
|
|
379
|
-
if (
|
|
380
|
-
throw
|
|
397
|
+
return await i.promise, !1;
|
|
398
|
+
} catch (S) {
|
|
399
|
+
if (i.signal.aborted) return !0;
|
|
400
|
+
throw S;
|
|
381
401
|
}
|
|
382
402
|
}
|
|
383
403
|
async function u() {
|
|
384
404
|
await t.hooked.callHook("init");
|
|
385
|
-
const
|
|
386
|
-
if (!await
|
|
387
|
-
let
|
|
388
|
-
for (; o !==
|
|
389
|
-
|
|
390
|
-
}
|
|
391
|
-
function
|
|
392
|
-
return o =
|
|
393
|
-
}
|
|
394
|
-
async function
|
|
395
|
-
|
|
396
|
-
const
|
|
397
|
-
await t.hooked.callHook("refresh",
|
|
398
|
-
}
|
|
399
|
-
function i
|
|
400
|
-
const
|
|
401
|
-
return e.set(
|
|
402
|
-
e.delete(
|
|
405
|
+
const i = o;
|
|
406
|
+
if (!await l(r())) return;
|
|
407
|
+
let S = i;
|
|
408
|
+
for (; o !== S; )
|
|
409
|
+
S = o, await S;
|
|
410
|
+
}
|
|
411
|
+
function y(i = {}) {
|
|
412
|
+
return o = p(i), o;
|
|
413
|
+
}
|
|
414
|
+
async function p(i) {
|
|
415
|
+
d();
|
|
416
|
+
const S = { resetFilters: i.resetFilters ?? !0 };
|
|
417
|
+
await t.hooked.callHook("refresh", S), await l(r({ refresh: S }));
|
|
418
|
+
}
|
|
419
|
+
function r(i) {
|
|
420
|
+
const S = xe(t, i);
|
|
421
|
+
return e.set(S.id, S), g(i) && n.add(S.id), m(), S.promise.finally(() => {
|
|
422
|
+
e.delete(S.id), n.delete(S.id), m();
|
|
403
423
|
}).catch(() => {
|
|
404
|
-
}),
|
|
424
|
+
}), S;
|
|
405
425
|
}
|
|
406
426
|
}
|
|
407
|
-
function
|
|
408
|
-
const e = /* @__PURE__ */ new Map(), n = /* @__PURE__ */ new Map(), o = t.config.name,
|
|
409
|
-
registerPersistentState:
|
|
427
|
+
function _e(t) {
|
|
428
|
+
const e = /* @__PURE__ */ new Map(), n = /* @__PURE__ */ new Map(), o = t.config.name, s = t.config.persistent ?? "localStorage", a = {
|
|
429
|
+
registerPersistentState: c
|
|
410
430
|
};
|
|
411
|
-
return t.plugins.registerPublicApi(
|
|
412
|
-
function
|
|
413
|
-
return `dataGrid:${o}:${
|
|
431
|
+
return t.plugins.registerPublicApi(a), a;
|
|
432
|
+
function m(d) {
|
|
433
|
+
return `dataGrid:${o}:${d}`;
|
|
414
434
|
}
|
|
415
|
-
function g(
|
|
435
|
+
function g(d) {
|
|
416
436
|
if (typeof window > "u") return null;
|
|
417
437
|
try {
|
|
418
|
-
return
|
|
438
|
+
return d === "localStorage" ? localStorage : sessionStorage;
|
|
419
439
|
} catch {
|
|
420
440
|
return null;
|
|
421
441
|
}
|
|
422
442
|
}
|
|
423
|
-
function
|
|
424
|
-
const u =
|
|
443
|
+
function c(d, l = {}) {
|
|
444
|
+
const u = m(d), y = l.storage ?? s, p = y === "router" && l.router === !1;
|
|
425
445
|
return {
|
|
426
446
|
get value() {
|
|
427
|
-
return
|
|
447
|
+
return r();
|
|
428
448
|
},
|
|
429
|
-
setValue:
|
|
430
|
-
buildStorageItem:
|
|
449
|
+
setValue: i,
|
|
450
|
+
buildStorageItem: S
|
|
431
451
|
};
|
|
432
|
-
function
|
|
433
|
-
if (
|
|
452
|
+
function r() {
|
|
453
|
+
if (p)
|
|
434
454
|
return;
|
|
435
|
-
if (
|
|
436
|
-
return n.get(
|
|
437
|
-
if (
|
|
455
|
+
if (y === "memory")
|
|
456
|
+
return n.get(d);
|
|
457
|
+
if (y === "router") {
|
|
438
458
|
const C = new URLSearchParams(window.location.search);
|
|
439
|
-
return
|
|
459
|
+
return rt(C.get(d));
|
|
440
460
|
}
|
|
441
|
-
const
|
|
442
|
-
if (
|
|
443
|
-
return
|
|
461
|
+
const h = g(y);
|
|
462
|
+
if (h)
|
|
463
|
+
return rt(Le(h, u));
|
|
444
464
|
}
|
|
445
|
-
function
|
|
465
|
+
function i(h) {
|
|
446
466
|
var C;
|
|
447
|
-
if (!
|
|
448
|
-
if (
|
|
449
|
-
|
|
450
|
-
else if (
|
|
451
|
-
const
|
|
452
|
-
|
|
453
|
-
const
|
|
454
|
-
window.history.replaceState(null, "",
|
|
467
|
+
if (!p) {
|
|
468
|
+
if (y === "memory")
|
|
469
|
+
h === void 0 ? n.delete(d) : n.set(d, h);
|
|
470
|
+
else if (y === "router") {
|
|
471
|
+
const w = new URLSearchParams(window.location.search);
|
|
472
|
+
h === void 0 ? w.delete(d) : w.set(d, JSON.stringify(h));
|
|
473
|
+
const k = `${window.location.pathname}?${w.toString()}`;
|
|
474
|
+
window.history.replaceState(null, "", k);
|
|
455
475
|
} else {
|
|
456
|
-
const
|
|
457
|
-
if (!
|
|
476
|
+
const w = g(y);
|
|
477
|
+
if (!w) return;
|
|
458
478
|
try {
|
|
459
|
-
|
|
479
|
+
h === void 0 ? w.removeItem(u) : w.setItem(u, JSON.stringify(h));
|
|
460
480
|
} catch {
|
|
461
481
|
}
|
|
462
482
|
}
|
|
463
|
-
(C = e.get(
|
|
483
|
+
(C = e.get(d)) == null || C.forEach((w) => w());
|
|
464
484
|
}
|
|
465
485
|
}
|
|
466
|
-
function h
|
|
467
|
-
if (!
|
|
486
|
+
function S(h) {
|
|
487
|
+
if (!l.schema) return { [d]: h };
|
|
468
488
|
const C = {};
|
|
469
|
-
return Object.entries(
|
|
470
|
-
const
|
|
471
|
-
|
|
489
|
+
return Object.entries(l.schema).forEach(([w]) => {
|
|
490
|
+
const k = $(h) ? h[w] : void 0;
|
|
491
|
+
k !== void 0 && (C[w] = k);
|
|
472
492
|
}), C;
|
|
473
493
|
}
|
|
474
494
|
}
|
|
475
495
|
}
|
|
476
|
-
function
|
|
496
|
+
function Le(t, e) {
|
|
477
497
|
try {
|
|
478
498
|
return t.getItem(e);
|
|
479
499
|
} catch {
|
|
480
500
|
return null;
|
|
481
501
|
}
|
|
482
502
|
}
|
|
483
|
-
function
|
|
503
|
+
function rt(t) {
|
|
484
504
|
if (t)
|
|
485
505
|
try {
|
|
486
506
|
return JSON.parse(t);
|
|
@@ -488,39 +508,39 @@ function ot(t) {
|
|
|
488
508
|
return;
|
|
489
509
|
}
|
|
490
510
|
}
|
|
491
|
-
function
|
|
511
|
+
function Ie(t) {
|
|
492
512
|
const e = /* @__PURE__ */ new Map(), n = {
|
|
493
513
|
hook: t.hooked.hook,
|
|
494
514
|
getPlugin: g
|
|
495
515
|
}, o = { ...n };
|
|
496
516
|
return {
|
|
497
517
|
...n,
|
|
498
|
-
registerPlugin:
|
|
499
|
-
registerPlugins:
|
|
500
|
-
registerPublicApi:
|
|
518
|
+
registerPlugin: a,
|
|
519
|
+
registerPlugins: m,
|
|
520
|
+
registerPublicApi: s,
|
|
501
521
|
pluginContext: o
|
|
502
522
|
};
|
|
503
|
-
function
|
|
504
|
-
Object.assign(o,
|
|
523
|
+
function s(c) {
|
|
524
|
+
Object.assign(o, c);
|
|
505
525
|
}
|
|
506
|
-
function
|
|
507
|
-
if (e.has(
|
|
526
|
+
function a(c) {
|
|
527
|
+
if (e.has(c.name)) {
|
|
508
528
|
process.env.NODE_ENV !== "production" && console.warn(
|
|
509
|
-
`[DataGrid] Plugin "${
|
|
529
|
+
`[DataGrid] Plugin "${c.name}" is already registered. Skipping duplicate.`
|
|
510
530
|
);
|
|
511
531
|
return;
|
|
512
532
|
}
|
|
513
|
-
const
|
|
514
|
-
|
|
533
|
+
const d = c.setup(o);
|
|
534
|
+
d !== void 0 && e.set(c.name, d);
|
|
515
535
|
}
|
|
516
|
-
function
|
|
517
|
-
|
|
536
|
+
function m(c) {
|
|
537
|
+
c.forEach((d) => a(d));
|
|
518
538
|
}
|
|
519
|
-
function g(
|
|
520
|
-
return e.get(
|
|
539
|
+
function g(c) {
|
|
540
|
+
return e.get(c);
|
|
521
541
|
}
|
|
522
542
|
}
|
|
523
|
-
function
|
|
543
|
+
function st(t, e) {
|
|
524
544
|
if (typeof e == "string") {
|
|
525
545
|
if (!(e in t))
|
|
526
546
|
throw new Error(`Key "${e}" not found in item ${JSON.stringify(t)}`);
|
|
@@ -528,8 +548,8 @@ function rt(t, e) {
|
|
|
528
548
|
}
|
|
529
549
|
return e(t);
|
|
530
550
|
}
|
|
531
|
-
function
|
|
532
|
-
const e =
|
|
551
|
+
function De(t) {
|
|
552
|
+
const e = P()(() => ({
|
|
533
553
|
sections: /* @__PURE__ */ new Map(),
|
|
534
554
|
recordSections: /* @__PURE__ */ new Map(),
|
|
535
555
|
visibleRecords: [],
|
|
@@ -540,42 +560,42 @@ function xe(t) {
|
|
|
540
560
|
let n = [];
|
|
541
561
|
const o = {
|
|
542
562
|
useStore: e,
|
|
543
|
-
clearSections:
|
|
544
|
-
createSection:
|
|
545
|
-
getSections:
|
|
563
|
+
clearSections: a,
|
|
564
|
+
createSection: s,
|
|
565
|
+
getSections: m,
|
|
546
566
|
getRecord: g,
|
|
547
|
-
getSectionsByParentId:
|
|
548
|
-
getRecordsByParentId:
|
|
549
|
-
getItemId:
|
|
567
|
+
getSectionsByParentId: c,
|
|
568
|
+
getRecordsByParentId: d,
|
|
569
|
+
getItemId: l
|
|
550
570
|
};
|
|
551
|
-
return t.plugins.registerPublicApi(o), { ...o, updateImplicitFilterKeys:
|
|
552
|
-
function r
|
|
553
|
-
const
|
|
554
|
-
id:
|
|
571
|
+
return t.plugins.registerPublicApi(o), { ...o, updateImplicitFilterKeys: y };
|
|
572
|
+
function s(r, i) {
|
|
573
|
+
const S = Math.random().toString(), h = r.parentId ?? null, C = {
|
|
574
|
+
id: S,
|
|
555
575
|
visible: !0,
|
|
556
|
-
parentId:
|
|
557
|
-
loadContext:
|
|
576
|
+
parentId: h,
|
|
577
|
+
loadContext: r.loadContext,
|
|
558
578
|
records: []
|
|
559
|
-
},
|
|
560
|
-
for (const [
|
|
561
|
-
const
|
|
562
|
-
C.records.push({ id:
|
|
579
|
+
}, w = t.config.itemKey ?? "id";
|
|
580
|
+
for (const [k, _] of i.entries()) {
|
|
581
|
+
const b = st(_, w);
|
|
582
|
+
C.records.push({ id: b, item: _, index: k, section: C });
|
|
563
583
|
}
|
|
564
|
-
return e.setState((
|
|
565
|
-
const _ = new Map(
|
|
566
|
-
_.set(
|
|
567
|
-
const { visibleRecords: x, rootSections:
|
|
584
|
+
return e.setState((k) => {
|
|
585
|
+
const _ = new Map(k.sections), b = new Map(k.recordSections);
|
|
586
|
+
_.set(S, C), b.set(h, [...b.get(h) ?? [], S]);
|
|
587
|
+
const { visibleRecords: x, rootSections: E, visibleSections: L, hasActiveFilters: v } = p(_, b);
|
|
568
588
|
return {
|
|
569
589
|
sections: _,
|
|
570
|
-
recordSections:
|
|
590
|
+
recordSections: b,
|
|
571
591
|
visibleRecords: x,
|
|
572
|
-
rootSections:
|
|
573
|
-
visibleSections:
|
|
574
|
-
hasActiveFilters:
|
|
592
|
+
rootSections: E,
|
|
593
|
+
visibleSections: L,
|
|
594
|
+
hasActiveFilters: v
|
|
575
595
|
};
|
|
576
596
|
}), C;
|
|
577
597
|
}
|
|
578
|
-
function
|
|
598
|
+
function a() {
|
|
579
599
|
e.setState({
|
|
580
600
|
sections: /* @__PURE__ */ new Map(),
|
|
581
601
|
recordSections: /* @__PURE__ */ new Map(),
|
|
@@ -585,334 +605,193 @@ function xe(t) {
|
|
|
585
605
|
hasActiveFilters: !1
|
|
586
606
|
});
|
|
587
607
|
}
|
|
588
|
-
function
|
|
608
|
+
function m() {
|
|
589
609
|
return [...e.getState().sections.values()];
|
|
590
610
|
}
|
|
591
|
-
function g(
|
|
592
|
-
for (const
|
|
593
|
-
const
|
|
594
|
-
if (
|
|
595
|
-
return
|
|
611
|
+
function g(r) {
|
|
612
|
+
for (const i of e.getState().sections.values()) {
|
|
613
|
+
const S = i.records.find((h) => h.id === r);
|
|
614
|
+
if (S)
|
|
615
|
+
return S;
|
|
596
616
|
}
|
|
597
617
|
}
|
|
598
|
-
function
|
|
599
|
-
const
|
|
600
|
-
return (
|
|
618
|
+
function c(r) {
|
|
619
|
+
const i = e.getState();
|
|
620
|
+
return (i.recordSections.get(r) ?? []).map((h) => i.sections.get(h)).filter(Boolean);
|
|
601
621
|
}
|
|
602
|
-
function
|
|
603
|
-
return
|
|
622
|
+
function d(r) {
|
|
623
|
+
return c(r).flatMap((i) => i.records);
|
|
604
624
|
}
|
|
605
|
-
function
|
|
606
|
-
const
|
|
607
|
-
return
|
|
625
|
+
function l(r) {
|
|
626
|
+
const i = t.config.itemKey ?? "id";
|
|
627
|
+
return st(r, i);
|
|
608
628
|
}
|
|
609
|
-
function u(
|
|
610
|
-
return
|
|
629
|
+
function u(r) {
|
|
630
|
+
return r == null ? !1 : typeof r == "boolean" ? !0 : Array.isArray(r) ? r.length > 0 : !!r;
|
|
611
631
|
}
|
|
612
|
-
function
|
|
613
|
-
n !==
|
|
632
|
+
function y(r) {
|
|
633
|
+
n !== r && (n = r, e.setState((i) => p(i.sections, i.recordSections)));
|
|
614
634
|
}
|
|
615
|
-
function
|
|
616
|
-
const
|
|
617
|
-
const { filters: x } =
|
|
635
|
+
function p(r, i) {
|
|
636
|
+
const h = [...r.values()].filter((b) => b.visible), w = (i.get(null) ?? []).map((b) => r.get(b)).filter((b) => b.visible), k = h.flatMap((b) => b.records), _ = h.some((b) => {
|
|
637
|
+
const { filters: x } = b.loadContext;
|
|
618
638
|
return x ? Object.entries(x).some(
|
|
619
|
-
([
|
|
639
|
+
([E, L]) => !n.includes(E) && u(L == null ? void 0 : L.value)
|
|
620
640
|
) : !1;
|
|
621
641
|
});
|
|
622
642
|
return {
|
|
623
|
-
visibleSections:
|
|
624
|
-
rootSections:
|
|
625
|
-
visibleRecords:
|
|
643
|
+
visibleSections: h,
|
|
644
|
+
rootSections: w,
|
|
645
|
+
visibleRecords: k,
|
|
626
646
|
hasActiveFilters: _
|
|
627
647
|
};
|
|
628
648
|
}
|
|
629
649
|
}
|
|
630
|
-
function
|
|
631
|
-
return typeof t == "function" ? t() : t;
|
|
632
|
-
}
|
|
633
|
-
function gt(t, e) {
|
|
634
|
-
return e.split(".").reduce((n, o) => {
|
|
635
|
-
if (n != null && typeof n == "object")
|
|
636
|
-
return n[o];
|
|
637
|
-
}, t);
|
|
638
|
-
}
|
|
639
|
-
function Ct(t, e) {
|
|
640
|
-
if (t.render || t.component) return;
|
|
641
|
-
const n = t.key ?? t.id, o = n.includes(".") ? gt(e, n) : e[n];
|
|
642
|
-
return t.formatter ? t.formatter(o) : o != null ? String(o) : "";
|
|
643
|
-
}
|
|
644
|
-
function _e({
|
|
650
|
+
function Ge({
|
|
645
651
|
column: t,
|
|
646
652
|
item: e
|
|
647
653
|
}) {
|
|
648
654
|
if (t.render)
|
|
649
|
-
return typeof t.render == "function" ? /* @__PURE__ */
|
|
655
|
+
return typeof t.render == "function" ? /* @__PURE__ */ f(M, { children: t.render(e) }) : /* @__PURE__ */ f(M, { children: t.render });
|
|
650
656
|
if (t.component) {
|
|
651
|
-
const n = t.component, o = t.key ?? t.id,
|
|
652
|
-
return /* @__PURE__ */
|
|
657
|
+
const n = t.component, o = t.key ?? t.id, s = o.includes(".") ? Ot(e, o) : e[o];
|
|
658
|
+
return /* @__PURE__ */ f(n, { item: e, column: t, value: s });
|
|
653
659
|
}
|
|
654
|
-
return /* @__PURE__ */
|
|
660
|
+
return /* @__PURE__ */ f(M, { children: At(t, e) });
|
|
655
661
|
}
|
|
656
|
-
function
|
|
657
|
-
return /* @__PURE__ */
|
|
662
|
+
function Me({ children: t }) {
|
|
663
|
+
return /* @__PURE__ */ f(M, { children: t });
|
|
658
664
|
}
|
|
659
|
-
function
|
|
665
|
+
function Re({
|
|
660
666
|
column: t
|
|
661
667
|
}) {
|
|
662
|
-
return /* @__PURE__ */
|
|
668
|
+
return /* @__PURE__ */ f("span", { children: q(t.label) });
|
|
663
669
|
}
|
|
664
|
-
|
|
665
|
-
return H().table;
|
|
666
|
-
}
|
|
667
|
-
const Ie = "_cell_5zgpa_2", De = "_stickyCell_5zgpa_16", Ge = "_stickyHeaderCell_5zgpa_33", Re = "_contentRow_5zgpa_38", Me = "_content_5zgpa_37", He = "_endSlot_5zgpa_37", R = {
|
|
668
|
-
cell: Ie,
|
|
669
|
-
stickyCell: De,
|
|
670
|
-
stickyHeaderCell: Ge,
|
|
671
|
-
contentRow: Re,
|
|
672
|
-
content: Me,
|
|
673
|
-
endSlot: He
|
|
674
|
-
}, Oe = "_headerCell_18ulc_1", Ae = "_headerCellContent_18ulc_13", We = "_extraHeaderCell_18ulc_21", j = {
|
|
670
|
+
const Oe = "_headerCell_18ulc_1", Ae = "_headerCellContent_18ulc_13", We = "_extraHeaderCell_18ulc_21", K = {
|
|
675
671
|
headerCell: Oe,
|
|
676
672
|
headerCellContent: Ae,
|
|
677
673
|
extraHeaderCell: We
|
|
678
674
|
};
|
|
679
|
-
function
|
|
680
|
-
return /* @__PURE__ */
|
|
675
|
+
function Ct({ children: t }) {
|
|
676
|
+
return /* @__PURE__ */ f("span", { className: K.headerCellContent, children: t });
|
|
681
677
|
}
|
|
682
678
|
function bt({
|
|
683
679
|
group: t,
|
|
684
680
|
colspan: e,
|
|
685
681
|
className: n
|
|
686
682
|
}) {
|
|
687
|
-
const
|
|
688
|
-
return /* @__PURE__ */
|
|
689
|
-
|
|
683
|
+
const s = N().useGroupStickyOffset(t.id), a = s !== void 0, m = t.component, g = m ? /* @__PURE__ */ f(m, { group: t }) : /* @__PURE__ */ f(Ct, { children: q(t.label) });
|
|
684
|
+
return /* @__PURE__ */ f(
|
|
685
|
+
Vt,
|
|
690
686
|
{
|
|
691
|
-
className:
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
l && R.stickyCell,
|
|
695
|
-
s && R.stickyHeaderCell,
|
|
696
|
-
n
|
|
697
|
-
),
|
|
698
|
-
style: l ? { position: "sticky", insetInlineStart: `${r}px` } : void 0,
|
|
687
|
+
className: H(Wt.cell, K.headerCell, n),
|
|
688
|
+
pinned: a,
|
|
689
|
+
style: a ? { insetInlineStart: `${s}px` } : void 0,
|
|
699
690
|
scope: "col",
|
|
700
691
|
colSpan: e,
|
|
701
|
-
children:
|
|
702
|
-
}
|
|
703
|
-
);
|
|
704
|
-
}
|
|
705
|
-
const vt = Lt(null), Ne = vt.Provider;
|
|
706
|
-
function Vn() {
|
|
707
|
-
const t = Et(vt);
|
|
708
|
-
if (!t)
|
|
709
|
-
throw new Error("useDataGridRecord must be used within a DataGridRow");
|
|
710
|
-
return t;
|
|
711
|
-
}
|
|
712
|
-
const Ve = "--_data-grid-col-max";
|
|
713
|
-
function kt(t) {
|
|
714
|
-
return typeof t == "string" && t.trim().endsWith("%");
|
|
715
|
-
}
|
|
716
|
-
function xt(t) {
|
|
717
|
-
return typeof t == "number" ? `${t}px` : /^-?\d+(\.\d+)?$/.test(t.trim()) ? `${t}px` : t;
|
|
718
|
-
}
|
|
719
|
-
function _t(t, e, n) {
|
|
720
|
-
return e === "auto" ? Pe(t, n) : ze(t, n);
|
|
721
|
-
}
|
|
722
|
-
function ze(t, e) {
|
|
723
|
-
const o = (t.width === "min-content" ? e : t.width) ?? t.minWidth ?? t.maxWidth;
|
|
724
|
-
if (o === void 0) return { headerStyle: {}, contentVars: {}, isCapped: !1 };
|
|
725
|
-
if (kt(o))
|
|
726
|
-
return { headerStyle: { inlineSize: o }, contentVars: {}, isCapped: !1 };
|
|
727
|
-
const r = xt(o);
|
|
728
|
-
return {
|
|
729
|
-
headerStyle: { width: r, minInlineSize: r },
|
|
730
|
-
contentVars: {},
|
|
731
|
-
isCapped: !1
|
|
732
|
-
};
|
|
733
|
-
}
|
|
734
|
-
function Pe(t, e) {
|
|
735
|
-
const { width: n, minWidth: o, maxWidth: r } = t, s = {};
|
|
736
|
-
if (n !== void 0)
|
|
737
|
-
if (n === "min-content" && e !== void 0) {
|
|
738
|
-
const a = `${r !== void 0 ? Math.min(e, r) : e}px`;
|
|
739
|
-
s.width = a, s.minInlineSize = a;
|
|
740
|
-
} else if (kt(n))
|
|
741
|
-
s.inlineSize = n;
|
|
742
|
-
else {
|
|
743
|
-
const g = xt(n);
|
|
744
|
-
s.width = g, s.minInlineSize = g;
|
|
745
|
-
}
|
|
746
|
-
o !== void 0 && (s.minInlineSize = `${o}px`);
|
|
747
|
-
const l = {};
|
|
748
|
-
return r !== void 0 && (n === void 0 && (s.width = `${r}px`), l[Ve] = `${r}px`), { headerStyle: s, contentVars: l, isCapped: r !== void 0 };
|
|
749
|
-
}
|
|
750
|
-
function Te(t, e, n) {
|
|
751
|
-
const o = t.cellOverflow ?? "wrap", { contentVars: r, isCapped: s } = _t(t, n), l = o === "nowrap" ? Ct(t, e) : void 0;
|
|
752
|
-
return { style: r, overflow: o, capped: s, title: l || void 0 };
|
|
753
|
-
}
|
|
754
|
-
const $e = "data-grid-row-ignore-click";
|
|
755
|
-
function Fe(t) {
|
|
756
|
-
if (t != null)
|
|
757
|
-
return typeof t == "number" ? `${t}px` : isNaN(Number(t)) ? t : `${t}px`;
|
|
758
|
-
}
|
|
759
|
-
function K({
|
|
760
|
-
columnId: t,
|
|
761
|
-
rowspan: e,
|
|
762
|
-
className: n,
|
|
763
|
-
style: o,
|
|
764
|
-
width: r,
|
|
765
|
-
children: s,
|
|
766
|
-
header: l,
|
|
767
|
-
endSlot: g,
|
|
768
|
-
overflow: a,
|
|
769
|
-
capped: f,
|
|
770
|
-
title: d,
|
|
771
|
-
contentRowRef: u,
|
|
772
|
-
fillContent: m,
|
|
773
|
-
ignoreRowClick: S
|
|
774
|
-
}) {
|
|
775
|
-
const i = O(), c = i.useColumnStickyOffset(t), h = i.useColumnEndStickyOffset(t), y = c !== void 0, C = h !== void 0, b = /* @__PURE__ */ p("span", { className: R.content, children: s }), v = l ? mt : Vt, _ = Fe(r);
|
|
776
|
-
return /* @__PURE__ */ p(
|
|
777
|
-
v,
|
|
778
|
-
{
|
|
779
|
-
"data-column-id": t,
|
|
780
|
-
"data-overflow": a,
|
|
781
|
-
"data-capped": f || void 0,
|
|
782
|
-
"data-header-fill": m || void 0,
|
|
783
|
-
...S && { [$e]: "" },
|
|
784
|
-
title: d,
|
|
785
|
-
className: N(R.cell, (y || C) && R.stickyCell, n),
|
|
786
|
-
style: {
|
|
787
|
-
...o,
|
|
788
|
-
..._ ? { width: _ } : {},
|
|
789
|
-
...y ? { position: "sticky", insetInlineStart: `${c}px` } : {},
|
|
790
|
-
...C ? { position: "sticky", insetInlineEnd: `${h}px` } : {}
|
|
791
|
-
},
|
|
792
|
-
scope: l ? "col" : void 0,
|
|
793
|
-
rowSpan: e,
|
|
794
|
-
children: g ? /* @__PURE__ */ D("span", { className: R.contentRow, ref: u, children: [
|
|
795
|
-
b,
|
|
796
|
-
/* @__PURE__ */ p("span", { className: R.endSlot, children: g })
|
|
797
|
-
] }) : b
|
|
692
|
+
children: g
|
|
798
693
|
}
|
|
799
694
|
);
|
|
800
695
|
}
|
|
801
|
-
function
|
|
802
|
-
|
|
803
|
-
}) {
|
|
804
|
-
const n = O().useExtraColumns(t);
|
|
805
|
-
return /* @__PURE__ */ p(G, { children: n.map((o) => /* @__PURE__ */ p(
|
|
806
|
-
K,
|
|
807
|
-
{
|
|
808
|
-
columnId: o.id,
|
|
809
|
-
width: o.width,
|
|
810
|
-
ignoreRowClick: o.ignoreRowClick,
|
|
811
|
-
children: o.body ? /* @__PURE__ */ p(o.body, {}) : null
|
|
812
|
-
},
|
|
813
|
-
o.id
|
|
814
|
-
)) });
|
|
815
|
-
}
|
|
816
|
-
function Be({ record: t }) {
|
|
817
|
-
const e = O(), n = e.useVisibleColumns(), o = e.useTableLayout(), r = e.useComponent(
|
|
696
|
+
function He({ record: t }) {
|
|
697
|
+
const e = N(), n = e.useVisibleColumns(), o = e.useTableLayout(), s = e.useComponent(
|
|
818
698
|
"body-cell-content"
|
|
819
699
|
);
|
|
820
|
-
return /* @__PURE__ */
|
|
821
|
-
/* @__PURE__ */
|
|
822
|
-
n.map((
|
|
823
|
-
var
|
|
824
|
-
const
|
|
825
|
-
return /* @__PURE__ */
|
|
826
|
-
|
|
700
|
+
return /* @__PURE__ */ f(Bt, { value: t, children: /* @__PURE__ */ G(Y, { children: [
|
|
701
|
+
/* @__PURE__ */ f(tt, { position: "start" }),
|
|
702
|
+
n.map((a) => {
|
|
703
|
+
var c;
|
|
704
|
+
const m = (c = a.getClassName) == null ? void 0 : c.call(a, t.item), g = Ht(a, t.item, o);
|
|
705
|
+
return /* @__PURE__ */ f(
|
|
706
|
+
X,
|
|
827
707
|
{
|
|
828
|
-
columnId:
|
|
829
|
-
className:
|
|
708
|
+
columnId: a.id,
|
|
709
|
+
className: m,
|
|
830
710
|
...g,
|
|
831
|
-
children: /* @__PURE__ */
|
|
711
|
+
children: /* @__PURE__ */ f(s, { column: a, item: t.item })
|
|
832
712
|
},
|
|
833
|
-
|
|
713
|
+
a.id
|
|
834
714
|
);
|
|
835
715
|
}),
|
|
836
|
-
/* @__PURE__ */
|
|
716
|
+
/* @__PURE__ */ f(tt, { position: "end" })
|
|
837
717
|
] }) });
|
|
838
718
|
}
|
|
839
|
-
const
|
|
840
|
-
tableWrapper:
|
|
841
|
-
table:
|
|
842
|
-
layoutFixed:
|
|
843
|
-
layoutAuto:
|
|
844
|
-
tableBordered:
|
|
719
|
+
const Ne = "_tableWrapper_6b0cm_6", Ve = "_table_6b0cm_6", Pe = "_layoutFixed_6b0cm_39", Te = "_layoutAuto_6b0cm_46", Fe = "_tableBordered_6b0cm_53", B = {
|
|
720
|
+
tableWrapper: Ne,
|
|
721
|
+
table: Ve,
|
|
722
|
+
layoutFixed: Pe,
|
|
723
|
+
layoutAuto: Te,
|
|
724
|
+
tableBordered: Fe
|
|
845
725
|
};
|
|
846
|
-
function
|
|
726
|
+
function Be({
|
|
847
727
|
record: t
|
|
848
728
|
}) {
|
|
849
|
-
const n =
|
|
850
|
-
return /* @__PURE__ */
|
|
729
|
+
const n = N().useComponent("row");
|
|
730
|
+
return /* @__PURE__ */ f(n, { record: t });
|
|
851
731
|
}
|
|
852
|
-
function
|
|
732
|
+
function $e({
|
|
853
733
|
records: t
|
|
854
734
|
}) {
|
|
855
|
-
return /* @__PURE__ */
|
|
735
|
+
return /* @__PURE__ */ f(M, { children: t.map((e) => /* @__PURE__ */ f(Be, { record: e }, e.id)) });
|
|
856
736
|
}
|
|
857
|
-
function
|
|
858
|
-
const e =
|
|
859
|
-
return /* @__PURE__ */
|
|
737
|
+
function ze() {
|
|
738
|
+
const e = j().useStore((n) => n.rootSections);
|
|
739
|
+
return /* @__PURE__ */ f(M, { children: e.map((n) => /* @__PURE__ */ f(Pt, { children: /* @__PURE__ */ f($e, { records: n.records }) }, n.id)) });
|
|
860
740
|
}
|
|
861
|
-
function
|
|
741
|
+
function je({
|
|
862
742
|
column: t,
|
|
863
743
|
rowspan: e,
|
|
864
744
|
className: n,
|
|
865
745
|
children: o
|
|
866
746
|
}) {
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
K,
|
|
747
|
+
return /* @__PURE__ */ f(
|
|
748
|
+
X,
|
|
870
749
|
{
|
|
871
750
|
header: !0,
|
|
872
751
|
columnId: t.id,
|
|
873
|
-
className:
|
|
752
|
+
className: H(K.extraHeaderCell, n),
|
|
874
753
|
width: t.width,
|
|
875
754
|
rowspan: e,
|
|
876
755
|
ignoreRowClick: t.ignoreRowClick,
|
|
877
|
-
children: o ? /* @__PURE__ */
|
|
756
|
+
children: o ? /* @__PURE__ */ f(Ct, { children: o }) : null
|
|
878
757
|
}
|
|
879
758
|
);
|
|
880
759
|
}
|
|
881
|
-
function
|
|
760
|
+
function it({
|
|
882
761
|
position: t,
|
|
883
762
|
isGroupRow: e,
|
|
884
763
|
className: n
|
|
885
764
|
}) {
|
|
886
|
-
const o =
|
|
887
|
-
return /* @__PURE__ */
|
|
888
|
-
|
|
765
|
+
const o = N(), s = o.useHasGroups(), a = o.useExtraColumns(t), m = !s || e;
|
|
766
|
+
return /* @__PURE__ */ f(M, { children: a.map((g) => /* @__PURE__ */ f(
|
|
767
|
+
je,
|
|
889
768
|
{
|
|
890
769
|
column: g,
|
|
891
|
-
rowspan:
|
|
770
|
+
rowspan: m && s ? 2 : void 0,
|
|
892
771
|
className: n,
|
|
893
|
-
children:
|
|
772
|
+
children: m && g.header ? /* @__PURE__ */ f(g.header, {}) : null
|
|
894
773
|
},
|
|
895
774
|
g.id
|
|
896
775
|
)) });
|
|
897
776
|
}
|
|
898
|
-
function
|
|
777
|
+
function Ke(t) {
|
|
899
778
|
return {
|
|
900
779
|
setMinContentWidth: e,
|
|
901
780
|
useMinContentWidth: n
|
|
902
781
|
};
|
|
903
|
-
function e(o,
|
|
904
|
-
const
|
|
905
|
-
if (
|
|
906
|
-
const
|
|
907
|
-
|
|
782
|
+
function e(o, s) {
|
|
783
|
+
const a = t.getState().minContentWidths;
|
|
784
|
+
if (a.get(o) === s) return;
|
|
785
|
+
const m = new Map(a);
|
|
786
|
+
m.set(o, s), t.setState({ minContentWidths: m });
|
|
908
787
|
}
|
|
909
788
|
function n(o) {
|
|
910
|
-
return t((
|
|
789
|
+
return t((s) => s.minContentWidths.get(o));
|
|
911
790
|
}
|
|
912
791
|
}
|
|
913
|
-
function
|
|
914
|
-
const n = e ? window.getComputedStyle(e) : void 0, o = n ? parseFloat(n.paddingInlineStart || "0") + parseFloat(n.paddingInlineEnd || "0") : 0,
|
|
915
|
-
return Math.ceil(t.contentRect.width + o +
|
|
792
|
+
function Ue(t, e) {
|
|
793
|
+
const n = e ? window.getComputedStyle(e) : void 0, o = n ? parseFloat(n.paddingInlineStart || "0") + parseFloat(n.paddingInlineEnd || "0") : 0, s = n ? parseFloat(n.borderInlineStartWidth || "0") + parseFloat(n.borderInlineEndWidth || "0") : 0;
|
|
794
|
+
return Math.ceil(t.contentRect.width + o + s);
|
|
916
795
|
}
|
|
917
796
|
function at({
|
|
918
797
|
column: t,
|
|
@@ -920,489 +799,504 @@ function at({
|
|
|
920
799
|
headerCellEndSlots: n,
|
|
921
800
|
className: o
|
|
922
801
|
}) {
|
|
923
|
-
const
|
|
802
|
+
const s = N(), a = z(null), m = s.useComponent("header-cell-label"), g = s.useTableLayout(), c = s.useMinContentWidth(t.id), d = t.headerComponent ? /* @__PURE__ */ f(t.headerComponent, { column: t }) : (
|
|
924
803
|
// eslint-disable-next-line react-hooks/static-components -- LabelComponent comes from the grid's component registry (a store lookup), so it is the same component on every render; the rule cannot see through the lookup.
|
|
925
|
-
/* @__PURE__ */
|
|
926
|
-
),
|
|
804
|
+
/* @__PURE__ */ f(m, { column: t })
|
|
805
|
+
), l = t.headerOverflow ?? "nowrap", u = t.width === "min-content", y = u ? void 0 : l, { headerStyle: p, contentVars: r, isCapped: i } = Nt(
|
|
927
806
|
t,
|
|
928
807
|
g,
|
|
929
|
-
|
|
930
|
-
),
|
|
931
|
-
return
|
|
932
|
-
if (!
|
|
933
|
-
const
|
|
934
|
-
if (!
|
|
935
|
-
const
|
|
936
|
-
const
|
|
937
|
-
|
|
808
|
+
c
|
|
809
|
+
), S = !t.headerComponent && l === "nowrap" ? q(t.label) : void 0, h = !!t.headerComponent && !u;
|
|
810
|
+
return R(() => {
|
|
811
|
+
if (!u) return;
|
|
812
|
+
const C = a.current;
|
|
813
|
+
if (!C) return;
|
|
814
|
+
const w = C.closest("th, td"), k = new ResizeObserver((_) => {
|
|
815
|
+
const b = _[_.length - 1];
|
|
816
|
+
s.setMinContentWidth(t.id, Ue(b, w));
|
|
938
817
|
});
|
|
939
|
-
return
|
|
940
|
-
}, [
|
|
941
|
-
|
|
818
|
+
return k.observe(C), () => k.disconnect();
|
|
819
|
+
}, [u, t.id, s]), /* @__PURE__ */ f(
|
|
820
|
+
X,
|
|
942
821
|
{
|
|
943
822
|
header: !0,
|
|
944
823
|
columnId: t.id,
|
|
945
|
-
className:
|
|
946
|
-
style: { ...
|
|
824
|
+
className: H(K.headerCell, o),
|
|
825
|
+
style: { ...p, ...r },
|
|
947
826
|
rowspan: e,
|
|
948
|
-
overflow:
|
|
949
|
-
capped:
|
|
950
|
-
title:
|
|
951
|
-
contentRowRef:
|
|
952
|
-
fillContent:
|
|
953
|
-
endSlot: n.map((
|
|
954
|
-
const
|
|
955
|
-
return /* @__PURE__ */
|
|
827
|
+
overflow: y,
|
|
828
|
+
capped: u ? void 0 : i,
|
|
829
|
+
title: S,
|
|
830
|
+
contentRowRef: u ? a : void 0,
|
|
831
|
+
fillContent: h,
|
|
832
|
+
endSlot: n.map((C) => {
|
|
833
|
+
const w = C.component;
|
|
834
|
+
return /* @__PURE__ */ f(w, { column: t }, C.id);
|
|
956
835
|
}),
|
|
957
836
|
children: d
|
|
958
837
|
}
|
|
959
838
|
);
|
|
960
839
|
}
|
|
961
|
-
const
|
|
962
|
-
theadSticky:
|
|
840
|
+
const Ye = "_theadSticky_167rm_11", Je = {
|
|
841
|
+
theadSticky: Ye
|
|
963
842
|
};
|
|
964
|
-
function
|
|
965
|
-
const t =
|
|
966
|
-
return
|
|
967
|
-
const
|
|
968
|
-
if (!
|
|
969
|
-
n.current = new ResizeObserver((
|
|
970
|
-
var u,
|
|
971
|
-
for (const
|
|
972
|
-
const { columnId:
|
|
973
|
-
if (
|
|
974
|
-
const
|
|
975
|
-
t.onResizeColumn(
|
|
843
|
+
function qe() {
|
|
844
|
+
const t = N(), e = z(null), n = z(null), o = t.useHasGroups(), s = t.useStickyHeader(), a = t.useFirstRowHeaderCells(), m = t.useSecondRowHeaderColumns(), g = t.useSlots("header-cell-end");
|
|
845
|
+
return R(() => {
|
|
846
|
+
const c = e.current;
|
|
847
|
+
if (!c) return;
|
|
848
|
+
n.current = new ResizeObserver((l) => {
|
|
849
|
+
var u, y;
|
|
850
|
+
for (const p of l) {
|
|
851
|
+
const { columnId: r } = p.target.dataset;
|
|
852
|
+
if (r) {
|
|
853
|
+
const i = ((y = (u = p.borderBoxSize) == null ? void 0 : u[0]) == null ? void 0 : y.inlineSize) ?? p.contentRect.width;
|
|
854
|
+
t.onResizeColumn(r, i);
|
|
976
855
|
}
|
|
977
856
|
}
|
|
978
857
|
});
|
|
979
|
-
const
|
|
980
|
-
for (const
|
|
981
|
-
n.current.observe(
|
|
858
|
+
const d = c.querySelectorAll("[data-column-id]");
|
|
859
|
+
for (const l of d)
|
|
860
|
+
n.current.observe(l);
|
|
982
861
|
return () => {
|
|
983
|
-
var
|
|
984
|
-
(
|
|
862
|
+
var l;
|
|
863
|
+
(l = n.current) == null || l.disconnect();
|
|
985
864
|
};
|
|
986
|
-
}, [t,
|
|
987
|
-
|
|
865
|
+
}, [t, a, m]), /* @__PURE__ */ G(
|
|
866
|
+
Tt,
|
|
988
867
|
{
|
|
989
868
|
ref: e,
|
|
990
|
-
className:
|
|
869
|
+
className: H(s && o && Je.theadSticky),
|
|
991
870
|
children: [
|
|
992
|
-
/* @__PURE__ */
|
|
993
|
-
/* @__PURE__ */
|
|
994
|
-
|
|
995
|
-
if (
|
|
996
|
-
const
|
|
997
|
-
return /* @__PURE__ */
|
|
871
|
+
/* @__PURE__ */ G(Y, { children: [
|
|
872
|
+
/* @__PURE__ */ f(it, { position: "start", isGroupRow: !0 }),
|
|
873
|
+
a.map((c) => {
|
|
874
|
+
if (c.type === "group") {
|
|
875
|
+
const l = c.item;
|
|
876
|
+
return /* @__PURE__ */ f(bt, { group: l, colspan: c.colspan }, l.id);
|
|
998
877
|
}
|
|
999
|
-
const
|
|
1000
|
-
return /* @__PURE__ */
|
|
878
|
+
const d = c.item;
|
|
879
|
+
return /* @__PURE__ */ f(
|
|
1001
880
|
at,
|
|
1002
881
|
{
|
|
1003
|
-
column:
|
|
1004
|
-
rowspan:
|
|
882
|
+
column: d,
|
|
883
|
+
rowspan: c.rowspan,
|
|
1005
884
|
headerCellEndSlots: g
|
|
1006
885
|
},
|
|
1007
|
-
|
|
886
|
+
d.id
|
|
1008
887
|
);
|
|
1009
888
|
}),
|
|
1010
|
-
/* @__PURE__ */
|
|
889
|
+
/* @__PURE__ */ f(it, { position: "end", isGroupRow: !0 })
|
|
1011
890
|
] }),
|
|
1012
|
-
o &&
|
|
891
|
+
o && m.length > 0 && /* @__PURE__ */ f(Y, { children: m.map((c) => /* @__PURE__ */ f(
|
|
1013
892
|
at,
|
|
1014
893
|
{
|
|
1015
|
-
column:
|
|
894
|
+
column: c,
|
|
1016
895
|
headerCellEndSlots: g
|
|
1017
896
|
},
|
|
1018
|
-
|
|
897
|
+
c.id
|
|
1019
898
|
)) })
|
|
1020
899
|
]
|
|
1021
900
|
}
|
|
1022
901
|
);
|
|
1023
902
|
}
|
|
1024
903
|
function ct({ slots: t }) {
|
|
1025
|
-
return t.length === 0 ? null : /* @__PURE__ */
|
|
904
|
+
return t.length === 0 ? null : /* @__PURE__ */ f(M, { children: t.map((e) => {
|
|
1026
905
|
const n = e.component;
|
|
1027
|
-
return /* @__PURE__ */
|
|
906
|
+
return /* @__PURE__ */ f(n, {}, e.id);
|
|
1028
907
|
}) });
|
|
1029
908
|
}
|
|
1030
|
-
const
|
|
1031
|
-
fixed:
|
|
1032
|
-
auto:
|
|
909
|
+
const Xe = {
|
|
910
|
+
fixed: B.layoutFixed,
|
|
911
|
+
auto: B.layoutAuto
|
|
1033
912
|
};
|
|
1034
|
-
function
|
|
1035
|
-
const t =
|
|
913
|
+
function Qe() {
|
|
914
|
+
const t = N(), e = t.useHasGroups(), n = t.useSlots("subheader"), o = t.useSlots("footer"), s = t.useTableLayout(), a = t.useStickyHeader(), m = t.useComponent("content");
|
|
1036
915
|
return (
|
|
1037
916
|
// eslint-disable-next-line react-hooks/static-components -- ContentWrapper comes from the grid's component registry (a store lookup), so it is the same component on every render; the rule cannot see through the lookup.
|
|
1038
|
-
/* @__PURE__ */
|
|
1039
|
-
|
|
917
|
+
/* @__PURE__ */ f(m, { children: /* @__PURE__ */ G(
|
|
918
|
+
Ft,
|
|
1040
919
|
{
|
|
1041
|
-
stickyHeader:
|
|
1042
|
-
containerClassName:
|
|
1043
|
-
className:
|
|
920
|
+
stickyHeader: a,
|
|
921
|
+
containerClassName: B.tableWrapper,
|
|
922
|
+
className: H(B.table, Xe[s], e && B.tableBordered),
|
|
1044
923
|
children: [
|
|
1045
|
-
/* @__PURE__ */
|
|
1046
|
-
/* @__PURE__ */
|
|
1047
|
-
/* @__PURE__ */
|
|
1048
|
-
/* @__PURE__ */
|
|
924
|
+
/* @__PURE__ */ f(qe, {}),
|
|
925
|
+
/* @__PURE__ */ f(ct, { slots: n }),
|
|
926
|
+
/* @__PURE__ */ f(ze, {}),
|
|
927
|
+
/* @__PURE__ */ f(ct, { slots: o })
|
|
1049
928
|
]
|
|
1050
929
|
}
|
|
1051
930
|
) })
|
|
1052
931
|
);
|
|
1053
932
|
}
|
|
1054
|
-
|
|
1055
|
-
|
|
1056
|
-
|
|
1057
|
-
|
|
1058
|
-
function ln(t, e, n) {
|
|
1059
|
-
const o = /* @__PURE__ */ new Set(), r = /* @__PURE__ */ new Set();
|
|
1060
|
-
let s = !1;
|
|
933
|
+
const Ze = /^[a-z][a-z0-9]*(?:_[a-z0-9]+)*$/;
|
|
934
|
+
function tn(t, e, n) {
|
|
935
|
+
const o = /* @__PURE__ */ new Set(), s = /* @__PURE__ */ new Set();
|
|
936
|
+
let a = !1;
|
|
1061
937
|
return {
|
|
1062
|
-
initializeColumns:
|
|
1063
|
-
useVisibleColumns:
|
|
938
|
+
initializeColumns: p,
|
|
939
|
+
useVisibleColumns: y
|
|
1064
940
|
};
|
|
1065
|
-
function
|
|
1066
|
-
if (!
|
|
1067
|
-
throw new Error(`Column id "${
|
|
1068
|
-
}
|
|
1069
|
-
function g(
|
|
1070
|
-
return !
|
|
1071
|
-
`[DataGrid] Column "${
|
|
1072
|
-
)), { ...
|
|
1073
|
-
}
|
|
1074
|
-
function
|
|
1075
|
-
|
|
1076
|
-
(
|
|
1077
|
-
).length <= 1 || o.has(
|
|
1078
|
-
`[DataGrid] Column "${
|
|
941
|
+
function m(r) {
|
|
942
|
+
if (!Ze.test(r))
|
|
943
|
+
throw new Error(`Column id "${r}" must be snake_case (e.g., "user_name", "is_active").`);
|
|
944
|
+
}
|
|
945
|
+
function g(r) {
|
|
946
|
+
return !r.headerTruncate || r.headerOverflow !== void 0 ? r : (process.env.NODE_ENV !== "production" && !s.has(r.id) && (s.add(r.id), console.warn(
|
|
947
|
+
`[DataGrid] Column "${r.id}": \`headerTruncate\` is deprecated, use \`headerOverflow: 'nowrap'\` instead. \`headerTruncate\` will be removed in a future release.`
|
|
948
|
+
)), { ...r, headerOverflow: "nowrap" });
|
|
949
|
+
}
|
|
950
|
+
function c(r, i) {
|
|
951
|
+
i !== "fixed" || process.env.NODE_ENV === "production" || r.width === "min-content" || [r.width, r.minWidth, r.maxWidth].filter(
|
|
952
|
+
(h) => h !== void 0
|
|
953
|
+
).length <= 1 || o.has(r.id) || (o.add(r.id), console.warn(
|
|
954
|
+
`[DataGrid] Column "${r.id}": width, minWidth, and maxWidth cannot all apply under tableLayout="fixed" -- they collapse to a single track (width wins when set). Use tableLayout="auto" for independent min/max constraints, or drop the extra prop(s).`
|
|
1079
955
|
));
|
|
1080
956
|
}
|
|
1081
|
-
function
|
|
1082
|
-
|
|
1083
|
-
(
|
|
1084
|
-
) || (
|
|
957
|
+
function d(r, i) {
|
|
958
|
+
i !== "auto" || process.env.NODE_ENV === "production" || a || r.length === 0 || !r.every(
|
|
959
|
+
(h) => h.width !== void 0 || h.maxWidth !== void 0
|
|
960
|
+
) || (a = !0, console.warn(
|
|
1085
961
|
'[DataGrid] Every column has a width or maxWidth under tableLayout="auto" -- if the container is wider than their sum, the browser will grow columns past their caps and capped content will show trailing blank space. Leave at least one column without a width/maxWidth to absorb the extra space.'
|
|
1086
962
|
));
|
|
1087
963
|
}
|
|
1088
|
-
function
|
|
1089
|
-
const
|
|
1090
|
-
for (const
|
|
1091
|
-
if (
|
|
1092
|
-
for (const
|
|
1093
|
-
|
|
964
|
+
function l(r) {
|
|
965
|
+
const i = [];
|
|
966
|
+
for (const S of r)
|
|
967
|
+
if (D(S))
|
|
968
|
+
for (const h of S.columns)
|
|
969
|
+
i.push(g({ ...h, groupId: S.id }));
|
|
1094
970
|
else
|
|
1095
|
-
|
|
1096
|
-
return
|
|
971
|
+
i.push(g(S));
|
|
972
|
+
return i;
|
|
1097
973
|
}
|
|
1098
|
-
function u(
|
|
1099
|
-
const
|
|
1100
|
-
function
|
|
1101
|
-
|
|
974
|
+
function u(r) {
|
|
975
|
+
const i = /* @__PURE__ */ new Map(), S = /* @__PURE__ */ new Set();
|
|
976
|
+
function h(C) {
|
|
977
|
+
i.set(C.id, C.visible ?? !0), C.visibleToggleDisabled && S.add(C.id);
|
|
1102
978
|
}
|
|
1103
|
-
for (const C of
|
|
1104
|
-
if (
|
|
1105
|
-
for (const
|
|
1106
|
-
|
|
979
|
+
for (const C of r)
|
|
980
|
+
if (D(C))
|
|
981
|
+
for (const w of C.columns)
|
|
982
|
+
h(w);
|
|
1107
983
|
else
|
|
1108
|
-
|
|
1109
|
-
for (const [C,
|
|
1110
|
-
|
|
1111
|
-
return
|
|
984
|
+
h(C);
|
|
985
|
+
for (const [C, w] of Object.entries((n == null ? void 0 : n.read()) ?? {}))
|
|
986
|
+
i.has(C) && !S.has(C) && i.set(C, w);
|
|
987
|
+
return i;
|
|
1112
988
|
}
|
|
1113
|
-
function
|
|
989
|
+
function y() {
|
|
1114
990
|
return t(
|
|
1115
|
-
|
|
1116
|
-
const
|
|
1117
|
-
return e.getOrderedColumnsWithSticky(
|
|
991
|
+
J((r) => {
|
|
992
|
+
const i = r.flatColumns.filter((S) => r.columnVisibility.get(S.id) !== !1);
|
|
993
|
+
return e.getOrderedColumnsWithSticky(i, r.columnSticky);
|
|
1118
994
|
})
|
|
1119
995
|
);
|
|
1120
996
|
}
|
|
1121
|
-
function
|
|
1122
|
-
const
|
|
1123
|
-
for (const
|
|
1124
|
-
|
|
1125
|
-
return
|
|
1126
|
-
columns:
|
|
1127
|
-
flatColumns:
|
|
1128
|
-
columnVisibility: u(
|
|
997
|
+
function p(r) {
|
|
998
|
+
const i = l(r), { tableLayout: S } = t.getState();
|
|
999
|
+
for (const h of i)
|
|
1000
|
+
m(h.id), c(h, S);
|
|
1001
|
+
return d(i, S), {
|
|
1002
|
+
columns: r,
|
|
1003
|
+
flatColumns: i,
|
|
1004
|
+
columnVisibility: u(r)
|
|
1129
1005
|
};
|
|
1130
1006
|
}
|
|
1131
1007
|
}
|
|
1132
|
-
const
|
|
1133
|
-
function
|
|
1008
|
+
const en = "columnVisibility";
|
|
1009
|
+
function nn(t) {
|
|
1134
1010
|
if (!t.config.persistentColumnVisibility) return;
|
|
1135
1011
|
const e = t.persistentState.registerPersistentState(
|
|
1136
|
-
|
|
1012
|
+
en,
|
|
1137
1013
|
{ storage: "localStorage" }
|
|
1138
1014
|
);
|
|
1139
1015
|
return { read: n, record: o };
|
|
1140
1016
|
function n() {
|
|
1141
|
-
var
|
|
1142
|
-
const
|
|
1143
|
-
return typeof
|
|
1144
|
-
Object.entries(
|
|
1017
|
+
var a;
|
|
1018
|
+
const s = (a = e.value) == null ? void 0 : a.columns;
|
|
1019
|
+
return typeof s != "object" || s === null || Array.isArray(s) ? {} : Object.fromEntries(
|
|
1020
|
+
Object.entries(s).filter(([, m]) => typeof m == "boolean")
|
|
1145
1021
|
);
|
|
1146
1022
|
}
|
|
1147
|
-
function o(
|
|
1148
|
-
e.setValue({ columns: { ...n(), [
|
|
1023
|
+
function o(s, a) {
|
|
1024
|
+
e.setValue({ columns: { ...n(), [s]: a } });
|
|
1149
1025
|
}
|
|
1150
1026
|
}
|
|
1151
|
-
function
|
|
1027
|
+
function on(t) {
|
|
1152
1028
|
const e = /* @__PURE__ */ new Set();
|
|
1153
1029
|
return {
|
|
1154
1030
|
registerExtraColumn: n,
|
|
1155
|
-
updateExtraColumnWidth:
|
|
1156
|
-
updateExtraColumnOrder:
|
|
1157
|
-
updateExtraColumnSticky:
|
|
1031
|
+
updateExtraColumnWidth: s,
|
|
1032
|
+
updateExtraColumnOrder: a,
|
|
1033
|
+
updateExtraColumnSticky: m,
|
|
1158
1034
|
useExtraColumns: g
|
|
1159
1035
|
};
|
|
1160
|
-
function n(
|
|
1161
|
-
const
|
|
1162
|
-
id:
|
|
1163
|
-
header:
|
|
1164
|
-
body:
|
|
1165
|
-
width:
|
|
1166
|
-
sticky:
|
|
1167
|
-
ignoreRowClick:
|
|
1168
|
-
order:
|
|
1169
|
-
position:
|
|
1170
|
-
},
|
|
1171
|
-
|
|
1172
|
-
}
|
|
1173
|
-
function o(
|
|
1174
|
-
process.env.NODE_ENV !== "production" &&
|
|
1175
|
-
`[DataGrid] Extra column "${
|
|
1036
|
+
function n(c) {
|
|
1037
|
+
const d = t.getState(), l = c.position ?? "end", u = l === "start" ? d.extraColumnsStart : d.extraColumnsEnd, y = c.order ?? (u.length + 1) * 10, p = {
|
|
1038
|
+
id: c.id ?? Math.random().toString(36).slice(2),
|
|
1039
|
+
header: c.header,
|
|
1040
|
+
body: c.body,
|
|
1041
|
+
width: c.width,
|
|
1042
|
+
sticky: c.sticky,
|
|
1043
|
+
ignoreRowClick: c.ignoreRowClick,
|
|
1044
|
+
order: y,
|
|
1045
|
+
position: l
|
|
1046
|
+
}, r = [...u, p].sort((i, S) => i.order - S.order);
|
|
1047
|
+
l === "start" ? (o(p.id, p.sticky), t.setState({ extraColumnsStart: r })) : t.setState({ extraColumnsEnd: r });
|
|
1048
|
+
}
|
|
1049
|
+
function o(c, d) {
|
|
1050
|
+
process.env.NODE_ENV !== "production" && d && (e.has(c) || (e.add(c), console.warn(
|
|
1051
|
+
`[DataGrid] Extra column "${c}": \`sticky\` pins to the table's inline-end edge and is read only for columns at the \`end\` position -- on a \`start\` column it does nothing. Drop the flag, or register the column at the \`end\` position.`
|
|
1176
1052
|
)));
|
|
1177
1053
|
}
|
|
1178
|
-
function
|
|
1179
|
-
const
|
|
1180
|
-
function u(
|
|
1181
|
-
const
|
|
1182
|
-
if (
|
|
1183
|
-
const
|
|
1184
|
-
return
|
|
1054
|
+
function s(c, d) {
|
|
1055
|
+
const l = t.getState();
|
|
1056
|
+
function u(r) {
|
|
1057
|
+
const i = r.findIndex((h) => h.id === c);
|
|
1058
|
+
if (i === -1) return;
|
|
1059
|
+
const S = [...r];
|
|
1060
|
+
return S[i] = { ...S[i], width: d }, S;
|
|
1185
1061
|
}
|
|
1186
|
-
const
|
|
1187
|
-
if (
|
|
1188
|
-
t.setState({ extraColumnsStart:
|
|
1062
|
+
const y = u(l.extraColumnsStart);
|
|
1063
|
+
if (y) {
|
|
1064
|
+
t.setState({ extraColumnsStart: y });
|
|
1189
1065
|
return;
|
|
1190
1066
|
}
|
|
1191
|
-
const
|
|
1192
|
-
|
|
1193
|
-
}
|
|
1194
|
-
function
|
|
1195
|
-
const
|
|
1196
|
-
function u(
|
|
1197
|
-
const
|
|
1198
|
-
if (
|
|
1199
|
-
const
|
|
1200
|
-
return
|
|
1067
|
+
const p = u(l.extraColumnsEnd);
|
|
1068
|
+
p && t.setState({ extraColumnsEnd: p });
|
|
1069
|
+
}
|
|
1070
|
+
function a(c, d) {
|
|
1071
|
+
const l = t.getState();
|
|
1072
|
+
function u(r) {
|
|
1073
|
+
const i = r.findIndex((h) => h.id === c);
|
|
1074
|
+
if (i === -1) return;
|
|
1075
|
+
const S = [...r];
|
|
1076
|
+
return S[i] = { ...S[i], order: d }, S.sort((h, C) => h.order - C.order);
|
|
1201
1077
|
}
|
|
1202
|
-
const
|
|
1203
|
-
if (
|
|
1204
|
-
t.setState({ extraColumnsStart:
|
|
1078
|
+
const y = u(l.extraColumnsStart);
|
|
1079
|
+
if (y) {
|
|
1080
|
+
t.setState({ extraColumnsStart: y });
|
|
1205
1081
|
return;
|
|
1206
1082
|
}
|
|
1207
|
-
const
|
|
1208
|
-
|
|
1083
|
+
const p = u(l.extraColumnsEnd);
|
|
1084
|
+
p && t.setState({ extraColumnsEnd: p });
|
|
1209
1085
|
}
|
|
1210
|
-
function
|
|
1211
|
-
const
|
|
1212
|
-
if (
|
|
1213
|
-
const
|
|
1214
|
-
|
|
1086
|
+
function m(c, d) {
|
|
1087
|
+
const l = t.getState(), u = l.extraColumnsStart.some((S) => S.id === c), y = u ? "extraColumnsStart" : "extraColumnsEnd", p = l[y], r = p.findIndex((S) => S.id === c);
|
|
1088
|
+
if (r === -1 || (u && o(c, d), (p[r].sticky ?? !1) === d)) return;
|
|
1089
|
+
const i = [...p];
|
|
1090
|
+
i[r] = { ...i[r], sticky: d }, t.setState({ [y]: i });
|
|
1215
1091
|
}
|
|
1216
|
-
function g(
|
|
1217
|
-
return t((
|
|
1092
|
+
function g(c) {
|
|
1093
|
+
return t((d) => c === "start" ? d.extraColumnsStart : d.extraColumnsEnd);
|
|
1218
1094
|
}
|
|
1219
1095
|
}
|
|
1220
|
-
function
|
|
1096
|
+
function rn(t, e, n) {
|
|
1221
1097
|
const o = [];
|
|
1222
|
-
let
|
|
1098
|
+
let s = null, a = null;
|
|
1223
1099
|
return {
|
|
1224
|
-
useHasGroups:
|
|
1100
|
+
useHasGroups: l,
|
|
1225
1101
|
useFirstRowHeaderCells: u,
|
|
1226
|
-
useSecondRowHeaderColumns:
|
|
1102
|
+
useSecondRowHeaderColumns: y
|
|
1227
1103
|
};
|
|
1228
|
-
function
|
|
1229
|
-
const
|
|
1230
|
-
return e.getOrderedColumnsWithSticky(
|
|
1104
|
+
function m() {
|
|
1105
|
+
const p = t.getState(), r = p.flatColumns.filter((i) => p.columnVisibility.get(i.id) !== !1);
|
|
1106
|
+
return e.getOrderedColumnsWithSticky(r, p.columnSticky);
|
|
1231
1107
|
}
|
|
1232
1108
|
function g() {
|
|
1233
|
-
return t.getState().columns.some(
|
|
1109
|
+
return t.getState().columns.some(D);
|
|
1234
1110
|
}
|
|
1235
|
-
function
|
|
1236
|
-
const
|
|
1111
|
+
function c() {
|
|
1112
|
+
const p = t.getState(), r = m();
|
|
1237
1113
|
if (!g()) {
|
|
1238
|
-
const
|
|
1239
|
-
return
|
|
1114
|
+
const h = p.components.get("header-cell") ?? n.get("header-cell");
|
|
1115
|
+
return r.map((C) => ({
|
|
1240
1116
|
type: "column",
|
|
1241
1117
|
item: C,
|
|
1242
|
-
component:
|
|
1118
|
+
component: h
|
|
1243
1119
|
}));
|
|
1244
1120
|
}
|
|
1245
|
-
const
|
|
1246
|
-
return [...
|
|
1247
|
-
const
|
|
1248
|
-
return
|
|
1249
|
-
}).flatMap((
|
|
1250
|
-
if (
|
|
1251
|
-
const C =
|
|
1252
|
-
(
|
|
1121
|
+
const i = new Map(r.map((h, C) => [h.id, C]));
|
|
1122
|
+
return [...p.columns].sort((h, C) => {
|
|
1123
|
+
const w = D(h) ? Math.min(...h.columns.map((_) => i.get(_.id) ?? 1 / 0)) : i.get(h.id) ?? 1 / 0, k = D(C) ? Math.min(...C.columns.map((_) => i.get(_.id) ?? 1 / 0)) : i.get(C.id) ?? 1 / 0;
|
|
1124
|
+
return w - k;
|
|
1125
|
+
}).flatMap((h) => {
|
|
1126
|
+
if (D(h)) {
|
|
1127
|
+
const C = h.columns.filter(
|
|
1128
|
+
(w) => p.columnVisibility.get(w.id) !== !1
|
|
1253
1129
|
).length;
|
|
1254
1130
|
return C === 0 ? [] : {
|
|
1255
1131
|
type: "group",
|
|
1256
|
-
item:
|
|
1257
|
-
component:
|
|
1132
|
+
item: h,
|
|
1133
|
+
component: p.components.get("header-group") ?? n.get("header-group"),
|
|
1258
1134
|
colspan: C
|
|
1259
1135
|
};
|
|
1260
1136
|
}
|
|
1261
|
-
return
|
|
1137
|
+
return p.columnVisibility.get(h.id) === !1 ? [] : {
|
|
1262
1138
|
type: "column",
|
|
1263
|
-
item:
|
|
1264
|
-
component:
|
|
1139
|
+
item: h,
|
|
1140
|
+
component: p.components.get("header-cell") ?? n.get("header-cell"),
|
|
1265
1141
|
rowspan: 2
|
|
1266
1142
|
};
|
|
1267
1143
|
});
|
|
1268
1144
|
}
|
|
1269
|
-
function
|
|
1145
|
+
function d() {
|
|
1270
1146
|
if (!g()) return o;
|
|
1271
|
-
const
|
|
1272
|
-
return
|
|
1147
|
+
const p = t.getState();
|
|
1148
|
+
return m().filter((i) => i.groupId && p.columnVisibility.get(i.id) !== !1);
|
|
1273
1149
|
}
|
|
1274
|
-
function
|
|
1275
|
-
return t((
|
|
1150
|
+
function l() {
|
|
1151
|
+
return t((p) => p.columns.some(D));
|
|
1276
1152
|
}
|
|
1277
1153
|
function u() {
|
|
1278
|
-
return t((
|
|
1279
|
-
if (
|
|
1280
|
-
return
|
|
1281
|
-
const
|
|
1282
|
-
return
|
|
1154
|
+
return t((p) => {
|
|
1155
|
+
if (s !== null && s.state === p)
|
|
1156
|
+
return s.result;
|
|
1157
|
+
const r = c();
|
|
1158
|
+
return s = { state: p, result: r }, r;
|
|
1283
1159
|
});
|
|
1284
1160
|
}
|
|
1285
|
-
function
|
|
1286
|
-
return t((
|
|
1287
|
-
if (
|
|
1288
|
-
return
|
|
1289
|
-
const
|
|
1290
|
-
return
|
|
1161
|
+
function y() {
|
|
1162
|
+
return t((p) => {
|
|
1163
|
+
if (a !== null && a.state === p)
|
|
1164
|
+
return a.result;
|
|
1165
|
+
const r = d();
|
|
1166
|
+
return a = { state: p, result: r }, r;
|
|
1291
1167
|
});
|
|
1292
1168
|
}
|
|
1293
1169
|
}
|
|
1294
1170
|
const lt = [];
|
|
1295
|
-
function
|
|
1171
|
+
function sn(t) {
|
|
1296
1172
|
return {
|
|
1297
1173
|
registerSlot: e,
|
|
1298
1174
|
useSlots: n
|
|
1299
1175
|
};
|
|
1300
|
-
function e(o,
|
|
1301
|
-
const
|
|
1302
|
-
id:
|
|
1176
|
+
function e(o, s) {
|
|
1177
|
+
const a = t.getState(), m = Math.random().toString(36).slice(2), g = a.slots.get(o) ?? lt, c = s.order ?? (g.length + 1) * 10, d = {
|
|
1178
|
+
id: m,
|
|
1303
1179
|
name: o,
|
|
1304
|
-
component:
|
|
1305
|
-
order:
|
|
1306
|
-
},
|
|
1307
|
-
u.set(o,
|
|
1180
|
+
component: s.component,
|
|
1181
|
+
order: c
|
|
1182
|
+
}, l = [...g, d].sort((y, p) => y.order - p.order), u = new Map(a.slots);
|
|
1183
|
+
u.set(o, l), t.setState({ slots: u });
|
|
1308
1184
|
}
|
|
1309
1185
|
function n(o) {
|
|
1310
|
-
return t(
|
|
1186
|
+
return t(J((s) => s.slots.get(o) ?? lt));
|
|
1311
1187
|
}
|
|
1312
1188
|
}
|
|
1313
|
-
const
|
|
1314
|
-
function
|
|
1189
|
+
const an = /^\s*(\d+(?:\.\d+)?)px\s*$/;
|
|
1190
|
+
function cn(t) {
|
|
1315
1191
|
return {
|
|
1316
1192
|
initializeStickyState: e,
|
|
1317
1193
|
getOrderedColumnsWithSticky: n,
|
|
1318
1194
|
onResizeColumn: o,
|
|
1319
|
-
isColumnSticky:
|
|
1320
|
-
isGroupSticky:
|
|
1321
|
-
useColumnStickyOffset:
|
|
1195
|
+
isColumnSticky: s,
|
|
1196
|
+
isGroupSticky: a,
|
|
1197
|
+
useColumnStickyOffset: m,
|
|
1322
1198
|
useColumnEndStickyOffset: g,
|
|
1323
|
-
useGroupStickyOffset:
|
|
1199
|
+
useGroupStickyOffset: c
|
|
1324
1200
|
};
|
|
1325
|
-
function e(
|
|
1326
|
-
const u = /* @__PURE__ */ new Map(),
|
|
1327
|
-
for (const
|
|
1328
|
-
if (
|
|
1329
|
-
|
|
1330
|
-
for (const
|
|
1331
|
-
u.set(
|
|
1201
|
+
function e(l) {
|
|
1202
|
+
const u = /* @__PURE__ */ new Map(), y = /* @__PURE__ */ new Map();
|
|
1203
|
+
for (const p of l)
|
|
1204
|
+
if (D(p)) {
|
|
1205
|
+
y.set(p.id, p.sticky ?? !1);
|
|
1206
|
+
for (const r of p.columns)
|
|
1207
|
+
u.set(r.id, r.sticky ?? p.sticky ?? !1);
|
|
1332
1208
|
} else
|
|
1333
|
-
u.set(
|
|
1334
|
-
return { columnSticky: u, groupSticky:
|
|
1209
|
+
u.set(p.id, p.sticky ?? !1);
|
|
1210
|
+
return { columnSticky: u, groupSticky: y };
|
|
1335
1211
|
}
|
|
1336
|
-
function n(
|
|
1337
|
-
const
|
|
1338
|
-
for (const
|
|
1339
|
-
u.get(
|
|
1340
|
-
return [...
|
|
1212
|
+
function n(l, u) {
|
|
1213
|
+
const y = [], p = [];
|
|
1214
|
+
for (const r of l)
|
|
1215
|
+
u.get(r.id) ? y.push(r) : p.push(r);
|
|
1216
|
+
return [...y, ...p];
|
|
1341
1217
|
}
|
|
1342
|
-
function o(
|
|
1343
|
-
const
|
|
1344
|
-
if (
|
|
1345
|
-
const
|
|
1346
|
-
|
|
1218
|
+
function o(l, u) {
|
|
1219
|
+
const y = t.getState().columnWidths;
|
|
1220
|
+
if (y.get(l) === u) return;
|
|
1221
|
+
const p = new Map(y);
|
|
1222
|
+
p.set(l, u), t.setState({ columnWidths: p });
|
|
1347
1223
|
}
|
|
1348
|
-
function
|
|
1349
|
-
return t.getState().columnSticky.get(
|
|
1224
|
+
function s(l) {
|
|
1225
|
+
return t.getState().columnSticky.get(l) === !0;
|
|
1350
1226
|
}
|
|
1351
|
-
function
|
|
1352
|
-
return t.getState().groupSticky.get(
|
|
1227
|
+
function a(l) {
|
|
1228
|
+
return t.getState().groupSticky.get(l) === !0;
|
|
1353
1229
|
}
|
|
1354
|
-
function l
|
|
1230
|
+
function m(l) {
|
|
1355
1231
|
return t((u) => {
|
|
1356
|
-
if (!u.columnSticky.get(
|
|
1357
|
-
let
|
|
1358
|
-
const
|
|
1359
|
-
for (const
|
|
1360
|
-
if (
|
|
1361
|
-
u.columnSticky.get(
|
|
1232
|
+
if (!u.columnSticky.get(l)) return ln(u, l);
|
|
1233
|
+
let y = d(u);
|
|
1234
|
+
const p = u.flatColumns.filter((r) => u.columnVisibility.get(r.id) !== !1);
|
|
1235
|
+
for (const r of p) {
|
|
1236
|
+
if (r.id === l) break;
|
|
1237
|
+
u.columnSticky.get(r.id) && (y += u.columnWidths.get(r.id) ?? 0);
|
|
1362
1238
|
}
|
|
1363
|
-
return
|
|
1239
|
+
return y;
|
|
1364
1240
|
});
|
|
1365
1241
|
}
|
|
1366
|
-
function g(
|
|
1367
|
-
return t((u) =>
|
|
1242
|
+
function g(l) {
|
|
1243
|
+
return t((u) => dn(u, l));
|
|
1368
1244
|
}
|
|
1369
|
-
function
|
|
1245
|
+
function c(l) {
|
|
1370
1246
|
return t((u) => {
|
|
1371
|
-
if (!u.groupSticky.get(
|
|
1372
|
-
let
|
|
1373
|
-
const
|
|
1374
|
-
for (const
|
|
1375
|
-
if (
|
|
1376
|
-
u.columnSticky.get(
|
|
1247
|
+
if (!u.groupSticky.get(l)) return;
|
|
1248
|
+
let y = d(u);
|
|
1249
|
+
const p = u.flatColumns.filter((r) => u.columnVisibility.get(r.id) !== !1);
|
|
1250
|
+
for (const r of p) {
|
|
1251
|
+
if (r.groupId === l) break;
|
|
1252
|
+
u.columnSticky.get(r.id) && (y += u.columnWidths.get(r.id) ?? 0);
|
|
1377
1253
|
}
|
|
1378
|
-
return
|
|
1254
|
+
return y;
|
|
1379
1255
|
});
|
|
1380
1256
|
}
|
|
1381
|
-
function
|
|
1257
|
+
function d(l) {
|
|
1382
1258
|
let u = 0;
|
|
1383
|
-
for (const
|
|
1384
|
-
|
|
1259
|
+
for (const y of l.extraColumnsStart)
|
|
1260
|
+
u += wt(y);
|
|
1385
1261
|
return u;
|
|
1386
1262
|
}
|
|
1387
1263
|
}
|
|
1388
|
-
function
|
|
1264
|
+
function wt(t) {
|
|
1265
|
+
return t.width && parseInt(t.width, 10) || 0;
|
|
1266
|
+
}
|
|
1267
|
+
function ln(t, e) {
|
|
1268
|
+
if (!t.extraColumnsStart.some((o) => o.id === e) || !un(t))
|
|
1269
|
+
return;
|
|
1270
|
+
let n = 0;
|
|
1271
|
+
for (const o of t.extraColumnsStart) {
|
|
1272
|
+
if (o.id === e) return n;
|
|
1273
|
+
n += wt(o);
|
|
1274
|
+
}
|
|
1275
|
+
}
|
|
1276
|
+
function un(t) {
|
|
1277
|
+
const e = (n) => t.columnVisibility.get(n.id) !== !1;
|
|
1278
|
+
return t.flatColumns.some((n) => e(n) && t.columnSticky.get(n.id)) || t.columns.some(
|
|
1279
|
+
(n) => D(n) && t.groupSticky.get(n.id) && n.columns.some(e)
|
|
1280
|
+
);
|
|
1281
|
+
}
|
|
1282
|
+
function dn(t, e) {
|
|
1389
1283
|
let n = 0;
|
|
1390
1284
|
for (let o = t.extraColumnsEnd.length - 1; o >= 0; o--) {
|
|
1391
|
-
const
|
|
1392
|
-
if (
|
|
1393
|
-
if (
|
|
1394
|
-
n +=
|
|
1285
|
+
const s = t.extraColumnsEnd[o];
|
|
1286
|
+
if (s.sticky) {
|
|
1287
|
+
if (s.id === e) return n;
|
|
1288
|
+
n += fn(t, s);
|
|
1395
1289
|
}
|
|
1396
1290
|
}
|
|
1397
1291
|
}
|
|
1398
|
-
function
|
|
1292
|
+
function fn(t, e) {
|
|
1399
1293
|
const n = t.columnWidths.get(e.id);
|
|
1400
1294
|
if (n !== void 0) return n;
|
|
1401
|
-
const o =
|
|
1295
|
+
const o = an.exec(e.width ?? "");
|
|
1402
1296
|
return o ? Number(o[1]) : 0;
|
|
1403
1297
|
}
|
|
1404
|
-
function
|
|
1405
|
-
return
|
|
1298
|
+
function pn() {
|
|
1299
|
+
return P(() => ({
|
|
1406
1300
|
columns: [],
|
|
1407
1301
|
flatColumns: [],
|
|
1408
1302
|
columnVisibility: /* @__PURE__ */ new Map(),
|
|
@@ -1418,130 +1312,134 @@ function Cn() {
|
|
|
1418
1312
|
stickyHeader: !1
|
|
1419
1313
|
}));
|
|
1420
1314
|
}
|
|
1421
|
-
function
|
|
1422
|
-
const e =
|
|
1315
|
+
function mn(t) {
|
|
1316
|
+
const e = pn(), n = Sn();
|
|
1423
1317
|
t.layout.registerSlot("main", {
|
|
1424
|
-
id:
|
|
1425
|
-
component:
|
|
1318
|
+
id: Z,
|
|
1319
|
+
component: Qe,
|
|
1426
1320
|
active: !0,
|
|
1427
|
-
icon:
|
|
1321
|
+
icon: It
|
|
1428
1322
|
});
|
|
1429
|
-
const o =
|
|
1323
|
+
const o = sn(e), s = on(e), a = cn(e), m = nn(t), g = tn(e, a, m), c = rn(e, a, n), d = Ke(e), l = {
|
|
1430
1324
|
registerTableSlot: o.registerSlot,
|
|
1431
|
-
registerExtraColumn:
|
|
1432
|
-
updateExtraColumnWidth:
|
|
1433
|
-
updateExtraColumnOrder:
|
|
1434
|
-
updateExtraColumnSticky:
|
|
1325
|
+
registerExtraColumn: s.registerExtraColumn,
|
|
1326
|
+
updateExtraColumnWidth: s.updateExtraColumnWidth,
|
|
1327
|
+
updateExtraColumnOrder: s.updateExtraColumnOrder,
|
|
1328
|
+
updateExtraColumnSticky: s.updateExtraColumnSticky,
|
|
1435
1329
|
registerComponent: C,
|
|
1436
1330
|
updateColumns: u,
|
|
1437
|
-
updateColumnVisibility:
|
|
1438
|
-
updateColumnSticky:
|
|
1439
|
-
updateTableLayout:
|
|
1440
|
-
updateStickyHeader:
|
|
1331
|
+
updateColumnVisibility: y,
|
|
1332
|
+
updateColumnSticky: h,
|
|
1333
|
+
updateTableLayout: p,
|
|
1334
|
+
updateStickyHeader: i
|
|
1441
1335
|
};
|
|
1442
|
-
return t.plugins.registerPublicApi(
|
|
1443
|
-
...
|
|
1336
|
+
return t.plugins.registerPublicApi(l), {
|
|
1337
|
+
...l,
|
|
1444
1338
|
updateColumns: u,
|
|
1445
|
-
useComponent:
|
|
1339
|
+
useComponent: w,
|
|
1446
1340
|
useConfigurationColumns: _,
|
|
1447
|
-
useTableLayout:
|
|
1448
|
-
useStickyHeader:
|
|
1341
|
+
useTableLayout: r,
|
|
1342
|
+
useStickyHeader: S,
|
|
1449
1343
|
...o,
|
|
1450
|
-
...r,
|
|
1451
1344
|
...s,
|
|
1452
|
-
...g,
|
|
1453
1345
|
...a,
|
|
1454
|
-
...
|
|
1346
|
+
...g,
|
|
1347
|
+
...c,
|
|
1348
|
+
...d
|
|
1455
1349
|
};
|
|
1456
|
-
function u(
|
|
1457
|
-
const x = g.initializeColumns(
|
|
1350
|
+
function u(b) {
|
|
1351
|
+
const x = g.initializeColumns(b), { columnSticky: E, groupSticky: L } = a.initializeStickyState(b), v = e.getState();
|
|
1458
1352
|
e.setState({
|
|
1459
1353
|
...x,
|
|
1460
|
-
columnSticky:
|
|
1461
|
-
groupSticky:
|
|
1462
|
-
extraColumnsStart:
|
|
1463
|
-
extraColumnsEnd:
|
|
1464
|
-
slots:
|
|
1465
|
-
components:
|
|
1466
|
-
columnWidths:
|
|
1467
|
-
minContentWidths:
|
|
1354
|
+
columnSticky: E,
|
|
1355
|
+
groupSticky: L,
|
|
1356
|
+
extraColumnsStart: v.extraColumnsStart,
|
|
1357
|
+
extraColumnsEnd: v.extraColumnsEnd,
|
|
1358
|
+
slots: v.slots,
|
|
1359
|
+
components: v.components,
|
|
1360
|
+
columnWidths: v.columnWidths,
|
|
1361
|
+
minContentWidths: v.minContentWidths
|
|
1468
1362
|
});
|
|
1469
1363
|
}
|
|
1470
|
-
function
|
|
1471
|
-
const
|
|
1472
|
-
|
|
1473
|
-
}
|
|
1474
|
-
function S(w) {
|
|
1475
|
-
e.setState({ tableLayout: w });
|
|
1364
|
+
function y(b, x) {
|
|
1365
|
+
const E = e.getState(), L = new Map(E.columnVisibility);
|
|
1366
|
+
L.set(b, x), e.setState({ columnVisibility: L }), m == null || m.record(b, x);
|
|
1476
1367
|
}
|
|
1477
|
-
function
|
|
1478
|
-
|
|
1368
|
+
function p(b) {
|
|
1369
|
+
e.setState({ tableLayout: b });
|
|
1479
1370
|
}
|
|
1480
|
-
function
|
|
1481
|
-
e
|
|
1482
|
-
}
|
|
1483
|
-
function
|
|
1484
|
-
|
|
1485
|
-
}
|
|
1486
|
-
function
|
|
1487
|
-
|
|
1488
|
-
|
|
1489
|
-
|
|
1490
|
-
|
|
1371
|
+
function r() {
|
|
1372
|
+
return e((b) => b.tableLayout);
|
|
1373
|
+
}
|
|
1374
|
+
function i(b) {
|
|
1375
|
+
e.setState({ stickyHeader: b });
|
|
1376
|
+
}
|
|
1377
|
+
function S() {
|
|
1378
|
+
return e((b) => b.stickyHeader);
|
|
1379
|
+
}
|
|
1380
|
+
function h(b, x) {
|
|
1381
|
+
const E = e.getState();
|
|
1382
|
+
if (E.columns.some((v) => D(v) && v.id === b)) {
|
|
1383
|
+
const v = E.columns.find((A) => D(A) && A.id === b), T = new Map(E.groupSticky);
|
|
1384
|
+
T.set(b, x);
|
|
1385
|
+
const I = new Map(E.columnSticky);
|
|
1386
|
+
if (v && D(v))
|
|
1387
|
+
for (const A of v.columns) I.set(A.id, x);
|
|
1388
|
+
e.setState({ groupSticky: T, columnSticky: I });
|
|
1491
1389
|
} else {
|
|
1492
|
-
const
|
|
1493
|
-
|
|
1390
|
+
const v = new Map(E.columnSticky);
|
|
1391
|
+
v.set(b, x), e.setState({ columnSticky: v });
|
|
1494
1392
|
}
|
|
1495
1393
|
}
|
|
1496
|
-
function C(
|
|
1497
|
-
const
|
|
1498
|
-
|
|
1394
|
+
function C(b, x) {
|
|
1395
|
+
const E = e.getState(), L = new Map(E.components);
|
|
1396
|
+
L.set(b, x), e.setState({ components: L });
|
|
1499
1397
|
}
|
|
1500
|
-
function b
|
|
1398
|
+
function w(b) {
|
|
1501
1399
|
return e(
|
|
1502
|
-
(x) => x.components.get(
|
|
1400
|
+
(x) => x.components.get(b) ?? n.get(b)
|
|
1503
1401
|
);
|
|
1504
1402
|
}
|
|
1505
|
-
function
|
|
1506
|
-
return typeof
|
|
1403
|
+
function k(b) {
|
|
1404
|
+
return typeof b == "function" ? b() : b;
|
|
1507
1405
|
}
|
|
1508
1406
|
function _() {
|
|
1509
|
-
const { columns:
|
|
1510
|
-
|
|
1511
|
-
columns:
|
|
1512
|
-
columnVisibility:
|
|
1513
|
-
columnSticky:
|
|
1514
|
-
groupSticky:
|
|
1407
|
+
const { columns: b, columnVisibility: x, columnSticky: E, groupSticky: L } = e(
|
|
1408
|
+
J((v) => ({
|
|
1409
|
+
columns: v.columns,
|
|
1410
|
+
columnVisibility: v.columnVisibility,
|
|
1411
|
+
columnSticky: v.columnSticky,
|
|
1412
|
+
groupSticky: v.groupSticky
|
|
1515
1413
|
}))
|
|
1516
1414
|
);
|
|
1517
|
-
return
|
|
1518
|
-
const
|
|
1519
|
-
function
|
|
1520
|
-
const
|
|
1415
|
+
return vt(() => {
|
|
1416
|
+
const v = Array.from(x.values()).filter(Boolean).length;
|
|
1417
|
+
function T(I) {
|
|
1418
|
+
const A = x.get(I.id) ?? !0;
|
|
1521
1419
|
return {
|
|
1522
1420
|
id: I.id,
|
|
1523
|
-
label:
|
|
1524
|
-
visible:
|
|
1525
|
-
sticky:
|
|
1526
|
-
visibleToggleDisabled: I.visibleToggleDisabled ?? (
|
|
1421
|
+
label: k(I.label),
|
|
1422
|
+
visible: A,
|
|
1423
|
+
sticky: E.get(I.id) ?? !1,
|
|
1424
|
+
visibleToggleDisabled: I.visibleToggleDisabled ?? (A && v === 1)
|
|
1527
1425
|
};
|
|
1528
1426
|
}
|
|
1529
|
-
return
|
|
1427
|
+
return b.map((I) => D(I) ? {
|
|
1530
1428
|
id: I.id,
|
|
1531
|
-
label:
|
|
1429
|
+
label: k(I.label),
|
|
1532
1430
|
visible: I.visible ?? !0,
|
|
1533
|
-
sticky:
|
|
1534
|
-
columns: I.columns.map(
|
|
1535
|
-
} :
|
|
1536
|
-
}, [
|
|
1431
|
+
sticky: L.get(I.id) ?? !1,
|
|
1432
|
+
columns: I.columns.map(T)
|
|
1433
|
+
} : T(I));
|
|
1434
|
+
}, [b, x, E, L]);
|
|
1537
1435
|
}
|
|
1538
1436
|
}
|
|
1539
|
-
function
|
|
1437
|
+
function Sn() {
|
|
1540
1438
|
const t = /* @__PURE__ */ new Map();
|
|
1541
|
-
return t.set("body-cell-content",
|
|
1439
|
+
return t.set("body-cell-content", Ge), t.set("content", Me), t.set("header-cell-label", Re), t.set("header-group", bt), t.set("row", He), t;
|
|
1542
1440
|
}
|
|
1543
|
-
function
|
|
1544
|
-
const e =
|
|
1441
|
+
function hn(t) {
|
|
1442
|
+
const e = be(), n = {}, o = {
|
|
1545
1443
|
hooked: e,
|
|
1546
1444
|
config: t,
|
|
1547
1445
|
get plugins() {
|
|
@@ -1566,20 +1464,20 @@ function vn(t) {
|
|
|
1566
1464
|
return W(n.table, "table");
|
|
1567
1465
|
}
|
|
1568
1466
|
};
|
|
1569
|
-
return n.plugins =
|
|
1570
|
-
init:
|
|
1571
|
-
destroy:
|
|
1467
|
+
return n.plugins = Ie(o), n.core = Ce(), n.load = Ee(o), n.storage = De(o), n.persistentState = _e(o), n.layout = ke(o), n.table = mn(o), {
|
|
1468
|
+
init: a,
|
|
1469
|
+
destroy: s,
|
|
1572
1470
|
...o.plugins.pluginContext,
|
|
1573
1471
|
[U]: o
|
|
1574
1472
|
};
|
|
1575
|
-
function
|
|
1473
|
+
function s() {
|
|
1576
1474
|
e.callHookSync("destroy");
|
|
1577
|
-
const
|
|
1578
|
-
o.load.abort(),
|
|
1475
|
+
const m = o.core.useLoadStateStore.getState().loadState === "loading" && o.load.getLoadInstances().length > 0;
|
|
1476
|
+
o.load.abort(), m && o.core.resetLoadState();
|
|
1579
1477
|
}
|
|
1580
|
-
async function
|
|
1581
|
-
const { loadState:
|
|
1582
|
-
|
|
1478
|
+
async function a() {
|
|
1479
|
+
const { loadState: m } = o.core.useLoadStateStore.getState();
|
|
1480
|
+
m === "loaded" || m === "loading" || await o.core.loadPromise(o.load.init());
|
|
1583
1481
|
}
|
|
1584
1482
|
}
|
|
1585
1483
|
function W(t, e) {
|
|
@@ -1587,64 +1485,58 @@ function W(t, e) {
|
|
|
1587
1485
|
throw new Error(`[DataGrid] The ${e} service was used before it was created.`);
|
|
1588
1486
|
return t;
|
|
1589
1487
|
}
|
|
1590
|
-
|
|
1591
|
-
|
|
1592
|
-
return A(() => {
|
|
1593
|
-
e.current = t;
|
|
1594
|
-
}, [t]), e;
|
|
1595
|
-
}
|
|
1596
|
-
const xn = [];
|
|
1597
|
-
function zn({
|
|
1488
|
+
const yn = [];
|
|
1489
|
+
function Hn({
|
|
1598
1490
|
name: t,
|
|
1599
1491
|
load: e,
|
|
1600
1492
|
columns: n,
|
|
1601
1493
|
children: o,
|
|
1602
|
-
persistent:
|
|
1603
|
-
persistentColumnVisibility:
|
|
1604
|
-
tableLayout:
|
|
1494
|
+
persistent: s,
|
|
1495
|
+
persistentColumnVisibility: a,
|
|
1496
|
+
tableLayout: m = "fixed",
|
|
1605
1497
|
stickyHeader: g = !1,
|
|
1606
|
-
loading:
|
|
1607
|
-
implicitFilterKeys:
|
|
1498
|
+
loading: c = !1,
|
|
1499
|
+
implicitFilterKeys: d
|
|
1608
1500
|
}) {
|
|
1609
|
-
const
|
|
1610
|
-
() =>
|
|
1501
|
+
const l = Gt(e), [u] = ut(
|
|
1502
|
+
() => hn({
|
|
1611
1503
|
name: t,
|
|
1612
|
-
load:
|
|
1613
|
-
persistent:
|
|
1614
|
-
persistentColumnVisibility:
|
|
1504
|
+
load: l,
|
|
1505
|
+
persistent: s,
|
|
1506
|
+
persistentColumnVisibility: a
|
|
1615
1507
|
})
|
|
1616
1508
|
);
|
|
1617
|
-
return
|
|
1618
|
-
u.updateTableLayout(
|
|
1619
|
-
}, [u,
|
|
1509
|
+
return R(() => {
|
|
1510
|
+
u.updateTableLayout(m);
|
|
1511
|
+
}, [u, m]), R(() => {
|
|
1620
1512
|
u.updateColumns(n);
|
|
1621
|
-
}, [u, n]),
|
|
1513
|
+
}, [u, n]), R(() => {
|
|
1622
1514
|
u.updateStickyHeader(g);
|
|
1623
|
-
}, [u, g]),
|
|
1624
|
-
u[U].core.updateLoading(
|
|
1625
|
-
}, [u,
|
|
1515
|
+
}, [u, g]), R(() => {
|
|
1516
|
+
u[U].core.updateLoading(c);
|
|
1517
|
+
}, [u, c]), R(() => {
|
|
1626
1518
|
u[U].storage.updateImplicitFilterKeys(
|
|
1627
|
-
|
|
1519
|
+
d ?? yn
|
|
1628
1520
|
);
|
|
1629
|
-
}, [u,
|
|
1521
|
+
}, [u, d]), /* @__PURE__ */ G(xt, { value: u, children: [
|
|
1630
1522
|
o,
|
|
1631
|
-
/* @__PURE__ */
|
|
1523
|
+
/* @__PURE__ */ f(kt, { fallback: /* @__PURE__ */ f(Q, {}), children: /* @__PURE__ */ f(ge, {}) })
|
|
1632
1524
|
] });
|
|
1633
1525
|
}
|
|
1634
|
-
const
|
|
1635
|
-
table:
|
|
1636
|
-
cards:
|
|
1526
|
+
const Nn = {
|
|
1527
|
+
table: Z,
|
|
1528
|
+
cards: gt
|
|
1637
1529
|
};
|
|
1638
|
-
function
|
|
1639
|
-
return
|
|
1530
|
+
function Vn() {
|
|
1531
|
+
return O().layout.useLayoutStore((e) => e.activeSlotIds.get("main"));
|
|
1640
1532
|
}
|
|
1641
1533
|
export {
|
|
1642
|
-
|
|
1643
|
-
|
|
1644
|
-
|
|
1645
|
-
|
|
1646
|
-
|
|
1647
|
-
|
|
1648
|
-
|
|
1534
|
+
Nn as DATA_GRID_VIEW,
|
|
1535
|
+
Hn as DataGrid,
|
|
1536
|
+
Fn as createDataGridPlugin,
|
|
1537
|
+
j as useDataGrid,
|
|
1538
|
+
Vn as useDataGridActiveView,
|
|
1539
|
+
Bn as useDataGridPluginContext,
|
|
1540
|
+
zn as useDataGridRecord
|
|
1649
1541
|
};
|
|
1650
1542
|
//# sourceMappingURL=data-grid.js.map
|