@toolbox-web/grid 1.24.2 → 1.25.0
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/all.d.ts +0 -1
- package/all.js +2 -2
- package/all.js.map +1 -1
- package/index.d.ts +0 -1
- package/index.js +1 -1
- package/index.js.map +1 -1
- package/lib/core/constants.d.ts +0 -1
- package/lib/core/grid.d.ts +145 -33
- package/lib/core/internal/aggregators.d.ts +0 -1
- package/lib/core/internal/aria.d.ts +8 -1
- package/lib/core/internal/columns.d.ts +3 -4
- package/lib/core/internal/config-manager.d.ts +2 -54
- package/lib/core/internal/dom-builder.d.ts +0 -1
- package/lib/core/internal/event-delegation.d.ts +3 -4
- package/lib/core/internal/feature-hook.d.ts +0 -1
- package/lib/core/internal/focus-manager.d.ts +49 -0
- package/lib/core/internal/header.d.ts +2 -3
- package/lib/core/internal/idle-scheduler.d.ts +0 -1
- package/lib/core/internal/inference.d.ts +0 -1
- package/lib/core/internal/keyboard.d.ts +3 -4
- package/lib/core/internal/loading.d.ts +0 -1
- package/lib/core/internal/render-scheduler.d.ts +3 -66
- package/lib/core/internal/resize.d.ts +2 -3
- package/lib/core/internal/row-animation.d.ts +0 -1
- package/lib/core/internal/row-manager.d.ts +31 -0
- package/lib/core/internal/rows.d.ts +4 -5
- package/lib/core/internal/sanitize.d.ts +0 -1
- package/lib/core/internal/shell.d.ts +7 -25
- package/lib/core/internal/sorting.d.ts +3 -4
- package/lib/core/internal/style-injector.d.ts +0 -1
- package/lib/core/internal/touch-scroll.d.ts +31 -12
- package/lib/core/internal/utils.d.ts +8 -1
- package/lib/core/internal/validate-config.d.ts +4 -5
- package/lib/core/internal/virtualization-manager.d.ts +48 -0
- package/lib/core/internal/virtualization.d.ts +0 -1
- package/lib/core/plugin/base-plugin.d.ts +2 -3
- package/lib/core/plugin/expander-column.d.ts +0 -1
- package/lib/core/plugin/index.d.ts +0 -1
- package/lib/core/plugin/plugin-manager.d.ts +2 -1
- package/lib/core/plugin/types.d.ts +7 -2
- package/lib/core/styles/index.d.ts +0 -1
- package/lib/core/types.d.ts +364 -54
- package/lib/features/clipboard.d.ts +0 -1
- package/lib/features/column-virtualization.d.ts +0 -1
- package/lib/features/context-menu.d.ts +0 -1
- package/lib/features/editing.d.ts +0 -1
- package/lib/features/export.d.ts +0 -1
- package/lib/features/filtering.d.ts +0 -1
- package/lib/features/grouping-columns.d.ts +0 -1
- package/lib/features/grouping-rows.d.ts +0 -1
- package/lib/features/master-detail.d.ts +0 -1
- package/lib/features/multi-sort.d.ts +1 -2
- package/lib/features/multi-sort.js.map +1 -1
- package/lib/features/pinned-columns.d.ts +0 -1
- package/lib/features/pinned-rows.d.ts +0 -1
- package/lib/features/pivot.d.ts +0 -1
- package/lib/features/print.d.ts +0 -1
- package/lib/features/registry.d.ts +0 -1
- package/lib/features/reorder-columns.d.ts +1 -2
- package/lib/features/reorder-columns.js.map +1 -1
- package/lib/features/reorder-rows.d.ts +1 -2
- package/lib/features/reorder-rows.js.map +1 -1
- package/lib/features/responsive.d.ts +0 -1
- package/lib/features/selection.d.ts +0 -1
- package/lib/features/server-side.d.ts +0 -1
- package/lib/features/tree.d.ts +0 -1
- package/lib/features/undo-redo.d.ts +0 -1
- package/lib/features/visibility.d.ts +0 -1
- package/lib/plugins/clipboard/ClipboardPlugin.d.ts +0 -1
- package/lib/plugins/clipboard/copy.d.ts +0 -1
- package/lib/plugins/clipboard/index.d.ts +0 -1
- package/lib/plugins/clipboard/index.js +1 -1
- package/lib/plugins/clipboard/index.js.map +1 -1
- package/lib/plugins/clipboard/paste.d.ts +0 -1
- package/lib/plugins/clipboard/types.d.ts +6 -1
- package/lib/plugins/column-virtualization/ColumnVirtualizationPlugin.d.ts +0 -1
- package/lib/plugins/column-virtualization/column-virtualization.d.ts +0 -1
- package/lib/plugins/column-virtualization/index.d.ts +0 -1
- package/lib/plugins/column-virtualization/index.js +1 -1
- package/lib/plugins/column-virtualization/index.js.map +1 -1
- package/lib/plugins/column-virtualization/types.d.ts +0 -1
- package/lib/plugins/context-menu/ContextMenuPlugin.d.ts +16 -1
- package/lib/plugins/context-menu/index.d.ts +1 -2
- package/lib/plugins/context-menu/index.js +1 -1
- package/lib/plugins/context-menu/index.js.map +1 -1
- package/lib/plugins/context-menu/menu.d.ts +14 -1
- package/lib/plugins/context-menu/types.d.ts +13 -3
- package/lib/plugins/editing/EditingPlugin.d.ts +4 -6
- package/lib/plugins/editing/editors.d.ts +0 -1
- package/lib/plugins/editing/index.d.ts +0 -1
- package/lib/plugins/editing/index.js +1 -1
- package/lib/plugins/editing/index.js.map +1 -1
- package/lib/plugins/editing/internal/cell-validation.d.ts +0 -1
- package/lib/plugins/editing/internal/dirty-tracking-manager.d.ts +0 -1
- package/lib/plugins/editing/internal/dirty-tracking.d.ts +2 -2
- package/lib/plugins/editing/internal/editor-injection.d.ts +3 -4
- package/lib/plugins/editing/internal/helpers.d.ts +0 -1
- package/lib/plugins/editing/types.d.ts +15 -14
- package/lib/plugins/export/ExportPlugin.d.ts +0 -1
- package/lib/plugins/export/csv.d.ts +0 -1
- package/lib/plugins/export/excel.d.ts +0 -1
- package/lib/plugins/export/index.d.ts +0 -1
- package/lib/plugins/export/index.js +1 -1
- package/lib/plugins/export/index.js.map +1 -1
- package/lib/plugins/export/types.d.ts +4 -1
- package/lib/plugins/filtering/FilteringPlugin.d.ts +0 -1
- package/lib/plugins/filtering/filter-model.d.ts +0 -1
- package/lib/plugins/filtering/filter-panel-date.d.ts +0 -1
- package/lib/plugins/filtering/filter-panel-default.d.ts +0 -1
- package/lib/plugins/filtering/filter-panel-number.d.ts +0 -1
- package/lib/plugins/filtering/index.d.ts +0 -1
- package/lib/plugins/filtering/index.js +1 -1
- package/lib/plugins/filtering/index.js.map +1 -1
- package/lib/plugins/filtering/types.d.ts +4 -1
- package/lib/plugins/grouping-columns/GroupingColumnsPlugin.d.ts +0 -1
- package/lib/plugins/grouping-columns/grouping-columns.d.ts +0 -1
- package/lib/plugins/grouping-columns/index.d.ts +0 -1
- package/lib/plugins/grouping-columns/index.js +1 -1
- package/lib/plugins/grouping-columns/index.js.map +1 -1
- package/lib/plugins/grouping-columns/types.d.ts +0 -1
- package/lib/plugins/grouping-rows/GroupingRowsPlugin.d.ts +0 -1
- package/lib/plugins/grouping-rows/grouping-rows.d.ts +0 -1
- package/lib/plugins/grouping-rows/index.d.ts +0 -1
- package/lib/plugins/grouping-rows/index.js +1 -1
- package/lib/plugins/grouping-rows/index.js.map +1 -1
- package/lib/plugins/grouping-rows/types.d.ts +4 -1
- package/lib/plugins/master-detail/MasterDetailPlugin.d.ts +0 -1
- package/lib/plugins/master-detail/index.d.ts +0 -1
- package/lib/plugins/master-detail/index.js +1 -1
- package/lib/plugins/master-detail/index.js.map +1 -1
- package/lib/plugins/master-detail/master-detail.d.ts +0 -1
- package/lib/plugins/master-detail/types.d.ts +4 -1
- package/lib/plugins/multi-sort/MultiSortPlugin.d.ts +3 -3
- package/lib/plugins/multi-sort/index.d.ts +1 -2
- package/lib/plugins/multi-sort/index.js +1 -1
- package/lib/plugins/multi-sort/index.js.map +1 -1
- package/lib/plugins/multi-sort/multi-sort.d.ts +0 -1
- package/lib/plugins/multi-sort/types.d.ts +5 -1
- package/lib/plugins/pinned-columns/PinnedColumnsPlugin.d.ts +0 -1
- package/lib/plugins/pinned-columns/index.d.ts +0 -1
- package/lib/plugins/pinned-columns/index.js +1 -1
- package/lib/plugins/pinned-columns/index.js.map +1 -1
- package/lib/plugins/pinned-columns/pinned-columns.d.ts +0 -1
- package/lib/plugins/pinned-columns/types.d.ts +0 -1
- package/lib/plugins/pinned-rows/PinnedRowsPlugin.d.ts +0 -1
- package/lib/plugins/pinned-rows/index.d.ts +0 -1
- package/lib/plugins/pinned-rows/index.js +1 -1
- package/lib/plugins/pinned-rows/index.js.map +1 -1
- package/lib/plugins/pinned-rows/pinned-rows.d.ts +0 -1
- package/lib/plugins/pinned-rows/types.d.ts +0 -1
- package/lib/plugins/pivot/PivotPlugin.d.ts +0 -1
- package/lib/plugins/pivot/index.d.ts +0 -1
- package/lib/plugins/pivot/index.js +1 -1
- package/lib/plugins/pivot/index.js.map +1 -1
- package/lib/plugins/pivot/pivot-engine.d.ts +0 -1
- package/lib/plugins/pivot/pivot-model.d.ts +0 -1
- package/lib/plugins/pivot/pivot-panel.d.ts +0 -1
- package/lib/plugins/pivot/pivot-rows.d.ts +0 -1
- package/lib/plugins/pivot/types.d.ts +0 -1
- package/lib/plugins/print/PrintPlugin.d.ts +0 -1
- package/lib/plugins/print/index.d.ts +0 -1
- package/lib/plugins/print/index.js +1 -1
- package/lib/plugins/print/index.js.map +1 -1
- package/lib/plugins/print/print-isolated.d.ts +0 -1
- package/lib/plugins/print/types.d.ts +6 -1
- package/lib/plugins/reorder-columns/ReorderPlugin.d.ts +5 -5
- package/lib/plugins/reorder-columns/column-drag.d.ts +3 -2
- package/lib/plugins/reorder-columns/index.d.ts +0 -1
- package/lib/plugins/reorder-columns/index.js +1 -1
- package/lib/plugins/reorder-columns/index.js.map +1 -1
- package/lib/plugins/reorder-columns/types.d.ts +4 -1
- package/lib/plugins/reorder-rows/RowReorderPlugin.d.ts +3 -3
- package/lib/plugins/reorder-rows/index.d.ts +0 -1
- package/lib/plugins/reorder-rows/index.js +1 -1
- package/lib/plugins/reorder-rows/index.js.map +1 -1
- package/lib/plugins/reorder-rows/types.d.ts +4 -1
- package/lib/plugins/responsive/ResponsivePlugin.d.ts +0 -1
- package/lib/plugins/responsive/index.d.ts +0 -1
- package/lib/plugins/responsive/index.js +1 -1
- package/lib/plugins/responsive/index.js.map +1 -1
- package/lib/plugins/responsive/types.d.ts +4 -1
- package/lib/plugins/selection/SelectionPlugin.d.ts +1 -3
- package/lib/plugins/selection/index.d.ts +0 -1
- package/lib/plugins/selection/index.js +1 -1
- package/lib/plugins/selection/index.js.map +1 -1
- package/lib/plugins/selection/range-selection.d.ts +0 -1
- package/lib/plugins/selection/row-selection.d.ts +0 -1
- package/lib/plugins/selection/types.d.ts +4 -1
- package/lib/plugins/server-side/ServerSidePlugin.d.ts +0 -1
- package/lib/plugins/server-side/cache.d.ts +0 -1
- package/lib/plugins/server-side/datasource.d.ts +0 -1
- package/lib/plugins/server-side/index.d.ts +0 -1
- package/lib/plugins/server-side/index.js +1 -1
- package/lib/plugins/server-side/index.js.map +1 -1
- package/lib/plugins/server-side/types.d.ts +0 -1
- package/lib/plugins/shared/data-collection.d.ts +0 -1
- package/lib/plugins/tree/TreePlugin.d.ts +0 -1
- package/lib/plugins/tree/index.d.ts +0 -1
- package/lib/plugins/tree/index.js +1 -1
- package/lib/plugins/tree/index.js.map +1 -1
- package/lib/plugins/tree/tree-data.d.ts +0 -1
- package/lib/plugins/tree/tree-detect.d.ts +0 -1
- package/lib/plugins/tree/types.d.ts +4 -1
- package/lib/plugins/undo-redo/UndoRedoPlugin.d.ts +1 -2
- package/lib/plugins/undo-redo/history.d.ts +0 -1
- package/lib/plugins/undo-redo/index.d.ts +0 -1
- package/lib/plugins/undo-redo/index.js +1 -1
- package/lib/plugins/undo-redo/index.js.map +1 -1
- package/lib/plugins/undo-redo/types.d.ts +6 -1
- package/lib/plugins/visibility/VisibilityPlugin.d.ts +0 -1
- package/lib/plugins/visibility/index.d.ts +0 -1
- package/lib/plugins/visibility/index.js +1 -1
- package/lib/plugins/visibility/index.js.map +1 -1
- package/lib/plugins/visibility/types.d.ts +0 -1
- package/lib/plugins/visibility/visibility.d.ts +0 -1
- package/package.json +1 -1
- package/public.d.ts +31 -12
- package/umd/grid.all.umd.js +1 -1
- package/umd/grid.all.umd.js.map +1 -1
- package/umd/grid.umd.js +1 -1
- package/umd/grid.umd.js.map +1 -1
- package/umd/plugins/clipboard.umd.js +1 -1
- package/umd/plugins/clipboard.umd.js.map +1 -1
- package/umd/plugins/column-virtualization.umd.js +1 -1
- package/umd/plugins/column-virtualization.umd.js.map +1 -1
- package/umd/plugins/context-menu.umd.js +1 -1
- package/umd/plugins/context-menu.umd.js.map +1 -1
- package/umd/plugins/editing.umd.js +1 -1
- package/umd/plugins/editing.umd.js.map +1 -1
- package/umd/plugins/filtering.umd.js +1 -1
- package/umd/plugins/filtering.umd.js.map +1 -1
- package/umd/plugins/grouping-columns.umd.js +1 -1
- package/umd/plugins/grouping-columns.umd.js.map +1 -1
- package/umd/plugins/master-detail.umd.js +1 -1
- package/umd/plugins/master-detail.umd.js.map +1 -1
- package/umd/plugins/multi-sort.umd.js +1 -1
- package/umd/plugins/multi-sort.umd.js.map +1 -1
- package/umd/plugins/pinned-columns.umd.js +1 -1
- package/umd/plugins/pinned-columns.umd.js.map +1 -1
- package/umd/plugins/pinned-rows.umd.js +1 -1
- package/umd/plugins/pinned-rows.umd.js.map +1 -1
- package/umd/plugins/print.umd.js +1 -1
- package/umd/plugins/print.umd.js.map +1 -1
- package/umd/plugins/reorder-columns.umd.js +1 -1
- package/umd/plugins/reorder-columns.umd.js.map +1 -1
- package/umd/plugins/reorder-rows.umd.js +1 -1
- package/umd/plugins/reorder-rows.umd.js.map +1 -1
- package/umd/plugins/responsive.umd.js +1 -1
- package/umd/plugins/responsive.umd.js.map +1 -1
- package/umd/plugins/selection.umd.js +1 -1
- package/umd/plugins/selection.umd.js.map +1 -1
- package/umd/plugins/server-side.umd.js.map +1 -1
- package/umd/plugins/tree.umd.js +1 -1
- package/umd/plugins/tree.umd.js.map +1 -1
- package/umd/plugins/undo-redo.umd.js.map +1 -1
- package/umd/plugins/visibility.umd.js +1 -1
- package/umd/plugins/visibility.umd.js.map +1 -1
- package/all.d.ts.map +0 -1
- package/index.d.ts.map +0 -1
- package/lib/core/constants.d.ts.map +0 -1
- package/lib/core/grid.d.ts.map +0 -1
- package/lib/core/internal/aggregators.d.ts.map +0 -1
- package/lib/core/internal/aria.d.ts.map +0 -1
- package/lib/core/internal/columns.d.ts.map +0 -1
- package/lib/core/internal/config-manager.d.ts.map +0 -1
- package/lib/core/internal/dom-builder.d.ts.map +0 -1
- package/lib/core/internal/event-delegation.d.ts.map +0 -1
- package/lib/core/internal/feature-hook.d.ts.map +0 -1
- package/lib/core/internal/header.d.ts.map +0 -1
- package/lib/core/internal/idle-scheduler.d.ts.map +0 -1
- package/lib/core/internal/inference.d.ts.map +0 -1
- package/lib/core/internal/keyboard.d.ts.map +0 -1
- package/lib/core/internal/loading.d.ts.map +0 -1
- package/lib/core/internal/render-scheduler.d.ts.map +0 -1
- package/lib/core/internal/resize.d.ts.map +0 -1
- package/lib/core/internal/row-animation.d.ts.map +0 -1
- package/lib/core/internal/rows.d.ts.map +0 -1
- package/lib/core/internal/sanitize.d.ts.map +0 -1
- package/lib/core/internal/shell.d.ts.map +0 -1
- package/lib/core/internal/sorting.d.ts.map +0 -1
- package/lib/core/internal/style-injector.d.ts.map +0 -1
- package/lib/core/internal/touch-scroll.d.ts.map +0 -1
- package/lib/core/internal/utils.d.ts.map +0 -1
- package/lib/core/internal/validate-config.d.ts.map +0 -1
- package/lib/core/internal/virtualization.d.ts.map +0 -1
- package/lib/core/plugin/base-plugin.d.ts.map +0 -1
- package/lib/core/plugin/expander-column.d.ts.map +0 -1
- package/lib/core/plugin/index.d.ts.map +0 -1
- package/lib/core/plugin/plugin-manager.d.ts.map +0 -1
- package/lib/core/plugin/types.d.ts.map +0 -1
- package/lib/core/styles/index.d.ts.map +0 -1
- package/lib/core/types.d.ts.map +0 -1
- package/lib/features/clipboard.d.ts.map +0 -1
- package/lib/features/column-virtualization.d.ts.map +0 -1
- package/lib/features/context-menu.d.ts.map +0 -1
- package/lib/features/editing.d.ts.map +0 -1
- package/lib/features/export.d.ts.map +0 -1
- package/lib/features/filtering.d.ts.map +0 -1
- package/lib/features/grouping-columns.d.ts.map +0 -1
- package/lib/features/grouping-rows.d.ts.map +0 -1
- package/lib/features/magic-string.es-CkyDP9Ir.mjs.map +0 -1
- package/lib/features/master-detail.d.ts.map +0 -1
- package/lib/features/multi-sort.d.ts.map +0 -1
- package/lib/features/pinned-columns.d.ts.map +0 -1
- package/lib/features/pinned-rows.d.ts.map +0 -1
- package/lib/features/pivot.d.ts.map +0 -1
- package/lib/features/print.d.ts.map +0 -1
- package/lib/features/registry.d.ts.map +0 -1
- package/lib/features/registry.spec.js +0 -5
- package/lib/features/registry.spec.js.map +0 -1
- package/lib/features/reorder-columns.d.ts.map +0 -1
- package/lib/features/reorder-rows.d.ts.map +0 -1
- package/lib/features/responsive.d.ts.map +0 -1
- package/lib/features/selection.d.ts.map +0 -1
- package/lib/features/server-side.d.ts.map +0 -1
- package/lib/features/tree.d.ts.map +0 -1
- package/lib/features/undo-redo.d.ts.map +0 -1
- package/lib/features/visibility.d.ts.map +0 -1
- package/lib/plugins/clipboard/ClipboardPlugin.d.ts.map +0 -1
- package/lib/plugins/clipboard/copy.d.ts.map +0 -1
- package/lib/plugins/clipboard/index.d.ts.map +0 -1
- package/lib/plugins/clipboard/paste.d.ts.map +0 -1
- package/lib/plugins/clipboard/types.d.ts.map +0 -1
- package/lib/plugins/column-virtualization/ColumnVirtualizationPlugin.d.ts.map +0 -1
- package/lib/plugins/column-virtualization/column-virtualization.d.ts.map +0 -1
- package/lib/plugins/column-virtualization/index.d.ts.map +0 -1
- package/lib/plugins/column-virtualization/types.d.ts.map +0 -1
- package/lib/plugins/context-menu/ContextMenuPlugin.d.ts.map +0 -1
- package/lib/plugins/context-menu/index.d.ts.map +0 -1
- package/lib/plugins/context-menu/menu.d.ts.map +0 -1
- package/lib/plugins/context-menu/types.d.ts.map +0 -1
- package/lib/plugins/editing/EditingPlugin.d.ts.map +0 -1
- package/lib/plugins/editing/editors.d.ts.map +0 -1
- package/lib/plugins/editing/index.d.ts.map +0 -1
- package/lib/plugins/editing/internal/cell-validation.d.ts.map +0 -1
- package/lib/plugins/editing/internal/dirty-tracking-manager.d.ts.map +0 -1
- package/lib/plugins/editing/internal/dirty-tracking.d.ts.map +0 -1
- package/lib/plugins/editing/internal/editor-injection.d.ts.map +0 -1
- package/lib/plugins/editing/internal/helpers.d.ts.map +0 -1
- package/lib/plugins/editing/types.d.ts.map +0 -1
- package/lib/plugins/export/ExportPlugin.d.ts.map +0 -1
- package/lib/plugins/export/csv.d.ts.map +0 -1
- package/lib/plugins/export/excel.d.ts.map +0 -1
- package/lib/plugins/export/index.d.ts.map +0 -1
- package/lib/plugins/export/types.d.ts.map +0 -1
- package/lib/plugins/filtering/FilteringPlugin.d.ts.map +0 -1
- package/lib/plugins/filtering/filter-model.d.ts.map +0 -1
- package/lib/plugins/filtering/filter-panel-date.d.ts.map +0 -1
- package/lib/plugins/filtering/filter-panel-default.d.ts.map +0 -1
- package/lib/plugins/filtering/filter-panel-number.d.ts.map +0 -1
- package/lib/plugins/filtering/index.d.ts.map +0 -1
- package/lib/plugins/filtering/types.d.ts.map +0 -1
- package/lib/plugins/grouping-columns/GroupingColumnsPlugin.d.ts.map +0 -1
- package/lib/plugins/grouping-columns/grouping-columns.d.ts.map +0 -1
- package/lib/plugins/grouping-columns/index.d.ts.map +0 -1
- package/lib/plugins/grouping-columns/types.d.ts.map +0 -1
- package/lib/plugins/grouping-rows/GroupingRowsPlugin.d.ts.map +0 -1
- package/lib/plugins/grouping-rows/grouping-rows.d.ts.map +0 -1
- package/lib/plugins/grouping-rows/index.d.ts.map +0 -1
- package/lib/plugins/grouping-rows/types.d.ts.map +0 -1
- package/lib/plugins/master-detail/MasterDetailPlugin.d.ts.map +0 -1
- package/lib/plugins/master-detail/index.d.ts.map +0 -1
- package/lib/plugins/master-detail/master-detail.d.ts.map +0 -1
- package/lib/plugins/master-detail/types.d.ts.map +0 -1
- package/lib/plugins/multi-sort/MultiSortPlugin.d.ts.map +0 -1
- package/lib/plugins/multi-sort/index.d.ts.map +0 -1
- package/lib/plugins/multi-sort/multi-sort.d.ts.map +0 -1
- package/lib/plugins/multi-sort/types.d.ts.map +0 -1
- package/lib/plugins/pinned-columns/PinnedColumnsPlugin.d.ts.map +0 -1
- package/lib/plugins/pinned-columns/index.d.ts.map +0 -1
- package/lib/plugins/pinned-columns/pinned-columns.d.ts.map +0 -1
- package/lib/plugins/pinned-columns/types.d.ts.map +0 -1
- package/lib/plugins/pinned-rows/PinnedRowsPlugin.d.ts.map +0 -1
- package/lib/plugins/pinned-rows/index.d.ts.map +0 -1
- package/lib/plugins/pinned-rows/pinned-rows.d.ts.map +0 -1
- package/lib/plugins/pinned-rows/types.d.ts.map +0 -1
- package/lib/plugins/pivot/PivotPlugin.d.ts.map +0 -1
- package/lib/plugins/pivot/index.d.ts.map +0 -1
- package/lib/plugins/pivot/pivot-engine.d.ts.map +0 -1
- package/lib/plugins/pivot/pivot-model.d.ts.map +0 -1
- package/lib/plugins/pivot/pivot-panel.d.ts.map +0 -1
- package/lib/plugins/pivot/pivot-rows.d.ts.map +0 -1
- package/lib/plugins/pivot/types.d.ts.map +0 -1
- package/lib/plugins/print/PrintPlugin.d.ts.map +0 -1
- package/lib/plugins/print/index.d.ts.map +0 -1
- package/lib/plugins/print/print-isolated.d.ts.map +0 -1
- package/lib/plugins/print/types.d.ts.map +0 -1
- package/lib/plugins/reorder-columns/ReorderPlugin.d.ts.map +0 -1
- package/lib/plugins/reorder-columns/column-drag.d.ts.map +0 -1
- package/lib/plugins/reorder-columns/index.d.ts.map +0 -1
- package/lib/plugins/reorder-columns/types.d.ts.map +0 -1
- package/lib/plugins/reorder-rows/RowReorderPlugin.d.ts.map +0 -1
- package/lib/plugins/reorder-rows/index.d.ts.map +0 -1
- package/lib/plugins/reorder-rows/types.d.ts.map +0 -1
- package/lib/plugins/responsive/ResponsivePlugin.d.ts.map +0 -1
- package/lib/plugins/responsive/index.d.ts.map +0 -1
- package/lib/plugins/responsive/types.d.ts.map +0 -1
- package/lib/plugins/selection/SelectionPlugin.d.ts.map +0 -1
- package/lib/plugins/selection/index.d.ts.map +0 -1
- package/lib/plugins/selection/range-selection.d.ts.map +0 -1
- package/lib/plugins/selection/row-selection.d.ts.map +0 -1
- package/lib/plugins/selection/types.d.ts.map +0 -1
- package/lib/plugins/server-side/ServerSidePlugin.d.ts.map +0 -1
- package/lib/plugins/server-side/cache.d.ts.map +0 -1
- package/lib/plugins/server-side/datasource.d.ts.map +0 -1
- package/lib/plugins/server-side/index.d.ts.map +0 -1
- package/lib/plugins/server-side/types.d.ts.map +0 -1
- package/lib/plugins/shared/data-collection.d.ts.map +0 -1
- package/lib/plugins/tree/TreePlugin.d.ts.map +0 -1
- package/lib/plugins/tree/index.d.ts.map +0 -1
- package/lib/plugins/tree/tree-data.d.ts.map +0 -1
- package/lib/plugins/tree/tree-detect.d.ts.map +0 -1
- package/lib/plugins/tree/types.d.ts.map +0 -1
- package/lib/plugins/undo-redo/UndoRedoPlugin.d.ts.map +0 -1
- package/lib/plugins/undo-redo/history.d.ts.map +0 -1
- package/lib/plugins/undo-redo/index.d.ts.map +0 -1
- package/lib/plugins/undo-redo/types.d.ts.map +0 -1
- package/lib/plugins/visibility/VisibilityPlugin.d.ts.map +0 -1
- package/lib/plugins/visibility/index.d.ts.map +0 -1
- package/lib/plugins/visibility/types.d.ts.map +0 -1
- package/lib/plugins/visibility/visibility.d.ts.map +0 -1
- package/public.d.ts.map +0 -1
package/lib/core/types.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { ShellState } from './internal/shell';
|
|
1
2
|
import { RowPosition } from './internal/virtualization';
|
|
2
3
|
import { PluginQuery } from './plugin/base-plugin';
|
|
3
4
|
import { AfterCellRenderContext, AfterRowRenderContext, CellMouseEvent } from './plugin/types';
|
|
@@ -22,7 +23,7 @@ export type RowPositionEntry = RowPosition;
|
|
|
22
23
|
* // Query existing grid
|
|
23
24
|
* const grid = document.querySelector('tbw-grid') as DataGridElement<Employee>;
|
|
24
25
|
* grid.rows = employees;
|
|
25
|
-
* grid.
|
|
26
|
+
* grid.on('cell-click', (detail) => console.log(detail));
|
|
26
27
|
*
|
|
27
28
|
* // Create grid programmatically
|
|
28
29
|
* import { createGrid } from '@toolbox-web/grid';
|
|
@@ -382,6 +383,13 @@ export interface PublicGrid<T = any> {
|
|
|
382
383
|
* @category Plugin Development
|
|
383
384
|
*/
|
|
384
385
|
export interface InternalGrid<T = any> extends PublicGrid<T>, GridConfig<T> {
|
|
386
|
+
/** The element's `id` attribute. Available because DataGridElement extends HTMLElement. */
|
|
387
|
+
id: string;
|
|
388
|
+
/**
|
|
389
|
+
* The grid's host HTMLElement (`this`). Use instead of casting `grid as unknown as HTMLElement`.
|
|
390
|
+
* @internal
|
|
391
|
+
*/
|
|
392
|
+
readonly _hostElement: HTMLElement;
|
|
385
393
|
querySelector<K extends keyof HTMLElementTagNameMap>(selectors: K): HTMLElementTagNameMap[K] | null;
|
|
386
394
|
querySelector<E extends Element = Element>(selectors: string): E | null;
|
|
387
395
|
querySelectorAll<K extends keyof HTMLElementTagNameMap>(selectors: K): NodeListOf<HTMLElementTagNameMap[K]>;
|
|
@@ -431,9 +439,13 @@ export interface InternalGrid<T = any> extends PublicGrid<T>, GridConfig<T> {
|
|
|
431
439
|
changedRows?: T[];
|
|
432
440
|
/** Get IDs of all changed rows. Injected by EditingPlugin. */
|
|
433
441
|
changedRowIds?: string[];
|
|
442
|
+
/** Internal Set for O(1) lookup in the render hot path. Injected by EditingPlugin. @internal */
|
|
443
|
+
_changedRowIdSet?: ReadonlySet<string>;
|
|
434
444
|
effectiveConfig?: GridConfig<T>;
|
|
435
445
|
findHeaderRow?: () => HTMLElement;
|
|
436
446
|
refreshVirtualWindow: (full: boolean, skipAfterRender?: boolean) => boolean;
|
|
447
|
+
/** @internal Trigger a COLUMNS-phase re-render. */
|
|
448
|
+
refreshColumns?: () => void;
|
|
437
449
|
updateTemplate?: () => void;
|
|
438
450
|
findRenderedRowElement?: (rowIndex: number) => HTMLElement | null;
|
|
439
451
|
/** Get a row by its ID. Implemented in grid.ts */
|
|
@@ -462,7 +474,7 @@ export interface InternalGrid<T = any> extends PublicGrid<T>, GridConfig<T> {
|
|
|
462
474
|
/** Dispatch row click to plugin system, returns true if handled */
|
|
463
475
|
_dispatchRowClick?: (event: MouseEvent, rowIndex: number, row: any, rowEl: HTMLElement) => boolean;
|
|
464
476
|
/** Dispatch header click to plugin system, returns true if handled */
|
|
465
|
-
_dispatchHeaderClick?: (event: MouseEvent, col: ColumnConfig, headerEl: HTMLElement) => boolean;
|
|
477
|
+
_dispatchHeaderClick?: (event: MouseEvent | KeyboardEvent, col: ColumnConfig, headerEl: HTMLElement) => boolean;
|
|
466
478
|
/** Dispatch keydown to plugin system, returns true if handled */
|
|
467
479
|
_dispatchKeyDown?: (event: KeyboardEvent) => boolean;
|
|
468
480
|
/** Dispatch cell mouse events for drag operations. Returns true if any plugin started a drag. */
|
|
@@ -489,7 +501,48 @@ export interface InternalGrid<T = any> extends PublicGrid<T>, GridConfig<T> {
|
|
|
489
501
|
queryPlugins?: <T>(query: PluginQuery) => T[];
|
|
490
502
|
/** Request emission of column-state-change event (debounced) */
|
|
491
503
|
requestStateChange?: () => void;
|
|
504
|
+
/** @internal */ _renderVisibleRows(start: number, end: number, epoch?: number): void;
|
|
505
|
+
/** @internal */ _updateAriaCounts(totalRows: number, totalCols: number): void;
|
|
506
|
+
/** @internal */ _requestSchedulerPhase(phase: number, source: string): void;
|
|
507
|
+
/** @internal */ _rebuildRowIdMap(): void;
|
|
508
|
+
/** @internal */ _emitDataChange(): void;
|
|
509
|
+
/** @internal */ _getPluginExtraHeight(): number;
|
|
510
|
+
/** @internal */ _getPluginRowHeight(row: T, index: number): number | undefined;
|
|
511
|
+
/** @internal */ _getPluginExtraHeightBefore(start: number): number;
|
|
512
|
+
/** @internal */ _adjustPluginVirtualStart(start: number, scrollTop: number, rowHeight: number): number | undefined;
|
|
513
|
+
/** @internal */ _afterPluginRender(): void;
|
|
514
|
+
/** @internal */ _emitPluginEvent(event: string, detail: unknown): void;
|
|
515
|
+
/** @internal */ _schedulerMergeConfig(): void;
|
|
516
|
+
/** @internal */ _schedulerProcessColumns(): void;
|
|
517
|
+
/** @internal */ _schedulerProcessRows(): void;
|
|
518
|
+
/** @internal */ _schedulerRenderHeader(): void;
|
|
519
|
+
/** @internal */ _schedulerUpdateTemplate(): void;
|
|
520
|
+
/** @internal */ _schedulerAfterRender(): void;
|
|
521
|
+
/** @internal */ readonly _schedulerIsConnected: boolean;
|
|
522
|
+
/** @internal The render root element for DOM queries. */
|
|
523
|
+
readonly _renderRoot: Element;
|
|
524
|
+
/** @internal Emit a custom event from the grid. */
|
|
525
|
+
_emit(eventName: string, detail: unknown): void;
|
|
526
|
+
/** @internal Get accordion expand/collapse icons from effective config. */
|
|
527
|
+
readonly _accordionIcons: {
|
|
528
|
+
expand: IconValue;
|
|
529
|
+
collapse: IconValue;
|
|
530
|
+
};
|
|
531
|
+
/** @internal Shell state for config manager shell merging. */
|
|
532
|
+
readonly _shellState: ShellState;
|
|
533
|
+
/** @internal Clear the row pool and body element. */
|
|
534
|
+
_clearRowPool(): void;
|
|
535
|
+
/** @internal Run grid setup (DOM rebuild). */
|
|
536
|
+
_setup(): void;
|
|
537
|
+
/** @internal Apply animation configuration to host element. */
|
|
538
|
+
_applyAnimationConfig(config: GridConfig): void;
|
|
492
539
|
}
|
|
540
|
+
/**
|
|
541
|
+
* Grid reference type combining InternalGrid with HTMLElement.
|
|
542
|
+
* Used by extracted managers that need both internal grid state and DOM APIs.
|
|
543
|
+
* @internal
|
|
544
|
+
*/
|
|
545
|
+
export type GridHost<T = any> = InternalGrid<T> & HTMLElement;
|
|
493
546
|
/**
|
|
494
547
|
* Built-in primitive column types with automatic formatting and editing support.
|
|
495
548
|
*
|
|
@@ -839,9 +892,12 @@ export interface ColumnConfig<TRow = any> extends BaseColumnConfig<TRow, any> {
|
|
|
839
892
|
*
|
|
840
893
|
* // Status-based styling
|
|
841
894
|
* cellClass: (value) => [`status-${value}`]
|
|
895
|
+
*
|
|
896
|
+
* // Single class as string
|
|
897
|
+
* cellClass: (value) => value < 0 ? 'negative' : ''
|
|
842
898
|
* ```
|
|
843
899
|
*/
|
|
844
|
-
cellClass?: (value: unknown, row: TRow, column: ColumnConfig<TRow>) => string[];
|
|
900
|
+
cellClass?: (value: unknown, row: TRow, column: ColumnConfig<TRow>) => string | string[];
|
|
845
901
|
/**
|
|
846
902
|
* Custom header label renderer. Customize the label content while the grid
|
|
847
903
|
* handles sort icons, filter buttons, resize handles, and click interactions.
|
|
@@ -1032,9 +1088,9 @@ export interface ColumnEditorContext<TRow = any, TValue = any> {
|
|
|
1032
1088
|
* @example
|
|
1033
1089
|
* ```typescript
|
|
1034
1090
|
* // In a cell-commit listener:
|
|
1035
|
-
* grid.
|
|
1036
|
-
* if (
|
|
1037
|
-
*
|
|
1091
|
+
* grid.on('cell-commit', (detail) => {
|
|
1092
|
+
* if (detail.field === 'quantity') {
|
|
1093
|
+
* detail.updateRow({ total: detail.row.price * detail.value });
|
|
1038
1094
|
* }
|
|
1039
1095
|
* });
|
|
1040
1096
|
* ```
|
|
@@ -1323,8 +1379,10 @@ export interface FrameworkAdapter {
|
|
|
1323
1379
|
/**
|
|
1324
1380
|
* Creates a view renderer function from a light DOM element.
|
|
1325
1381
|
* The renderer receives cell context and returns DOM or string.
|
|
1382
|
+
* Returns undefined if no renderer template is registered, allowing the grid
|
|
1383
|
+
* to use its default rendering.
|
|
1326
1384
|
*/
|
|
1327
|
-
createRenderer<TRow = unknown, TValue = unknown>(element: HTMLElement): ColumnViewRenderer<TRow, TValue
|
|
1385
|
+
createRenderer<TRow = unknown, TValue = unknown>(element: HTMLElement): ColumnViewRenderer<TRow, TValue> | undefined;
|
|
1328
1386
|
/**
|
|
1329
1387
|
* Creates an editor spec from a light DOM element.
|
|
1330
1388
|
* The editor receives context with commit/cancel and returns DOM.
|
|
@@ -1345,6 +1403,20 @@ export interface FrameworkAdapter {
|
|
|
1345
1403
|
* @returns Type defaults for renderer/editor, or undefined if not registered
|
|
1346
1404
|
*/
|
|
1347
1405
|
getTypeDefault?<TRow = unknown>(type: string): TypeDefault<TRow> | undefined;
|
|
1406
|
+
/**
|
|
1407
|
+
* Pre-process a grid config before the grid core applies it.
|
|
1408
|
+
* Framework adapters use this to convert framework-specific component references
|
|
1409
|
+
* (Angular classes, Vue components, React elements) to DOM-returning functions.
|
|
1410
|
+
*
|
|
1411
|
+
* Called automatically by the grid's `set gridConfig` setter when a
|
|
1412
|
+
* `__frameworkAdapter` is present on the grid instance.
|
|
1413
|
+
*
|
|
1414
|
+
* Must be **idempotent** — already-processed configs must pass through safely.
|
|
1415
|
+
*
|
|
1416
|
+
* @param config - The raw grid config (may contain framework-specific values)
|
|
1417
|
+
* @returns Processed config with DOM-returning functions
|
|
1418
|
+
*/
|
|
1419
|
+
processConfig?<TRow = unknown>(config: GridConfig<TRow>): GridConfig<TRow>;
|
|
1348
1420
|
/**
|
|
1349
1421
|
* Called when a cell's content is about to be wiped (e.g., when exiting edit mode,
|
|
1350
1422
|
* scroll-recycling a row, or rebuilding a row).
|
|
@@ -1366,6 +1438,16 @@ export interface FrameworkAdapter {
|
|
|
1366
1438
|
* @param container - The container element returned by a create* method
|
|
1367
1439
|
*/
|
|
1368
1440
|
unmount?(container: HTMLElement): void;
|
|
1441
|
+
/**
|
|
1442
|
+
* Parse a `<tbw-grid-detail>` element and return a detail renderer function.
|
|
1443
|
+
* Used by MasterDetailPlugin to support framework-specific detail templates.
|
|
1444
|
+
*/
|
|
1445
|
+
parseDetailElement?<TRow = unknown>(element: Element): ((row: TRow, rowIndex: number) => HTMLElement | string) | undefined;
|
|
1446
|
+
/**
|
|
1447
|
+
* Parse a `<tbw-grid-responsive-card>` element and return a card renderer function.
|
|
1448
|
+
* Used by ResponsivePlugin to support framework-specific card templates.
|
|
1449
|
+
*/
|
|
1450
|
+
parseResponsiveCardElement?<TRow = unknown>(element: Element): ((row: TRow, rowIndex: number) => HTMLElement) | undefined;
|
|
1369
1451
|
}
|
|
1370
1452
|
/**
|
|
1371
1453
|
* Column internal properties used during light DOM parsing.
|
|
@@ -1890,9 +1972,12 @@ export interface GridConfig<TRow = any> {
|
|
|
1890
1972
|
*
|
|
1891
1973
|
* // Status-based row styling
|
|
1892
1974
|
* rowClass: (row) => [`priority-${row.priority}`]
|
|
1975
|
+
*
|
|
1976
|
+
* // Single class as string
|
|
1977
|
+
* rowClass: (row) => row.isNew ? 'new-row' : ''
|
|
1893
1978
|
* ```
|
|
1894
1979
|
*/
|
|
1895
|
-
rowClass?: (row: TRow) => string[];
|
|
1980
|
+
rowClass?: (row: TRow) => string | string[];
|
|
1896
1981
|
/** Sizing mode for columns. Can also be set via `fitMode` prop. */
|
|
1897
1982
|
fitMode?: FitMode;
|
|
1898
1983
|
/**
|
|
@@ -2328,6 +2413,31 @@ export interface LoadingContext {
|
|
|
2328
2413
|
* @see {@link LoadingSize} for size variants ('large' | 'small')
|
|
2329
2414
|
*/
|
|
2330
2415
|
export type LoadingRenderer = (context: LoadingContext) => HTMLElement | string;
|
|
2416
|
+
/**
|
|
2417
|
+
* Detail for the `data-change` event.
|
|
2418
|
+
*
|
|
2419
|
+
* Fired whenever the grid's row data changes — including new data assignment,
|
|
2420
|
+
* row insertion/removal, and in-place mutations via `updateRow()`.
|
|
2421
|
+
*
|
|
2422
|
+
* Use this to keep external UI in sync with the grid's current data state
|
|
2423
|
+
* (row counts, summaries, charts, etc.).
|
|
2424
|
+
*
|
|
2425
|
+
* @example
|
|
2426
|
+
* ```typescript
|
|
2427
|
+
* grid.on('data-change', ({ rowCount, sourceRowCount }) => {
|
|
2428
|
+
* console.log(`${rowCount} rows visible of ${sourceRowCount} total`);
|
|
2429
|
+
* });
|
|
2430
|
+
* ```
|
|
2431
|
+
*
|
|
2432
|
+
* @see {@link DataGridEventMap} for all event types
|
|
2433
|
+
* @category Events
|
|
2434
|
+
*/
|
|
2435
|
+
export interface DataChangeDetail {
|
|
2436
|
+
/** Number of visible (processed) rows */
|
|
2437
|
+
rowCount: number;
|
|
2438
|
+
/** Total number of source rows (before filtering/grouping) */
|
|
2439
|
+
sourceRowCount: number;
|
|
2440
|
+
}
|
|
2331
2441
|
/**
|
|
2332
2442
|
* Indicates the origin of a data change.
|
|
2333
2443
|
* Used to prevent infinite loops in cascade update handlers.
|
|
@@ -2338,14 +2448,14 @@ export type LoadingRenderer = (context: LoadingContext) => HTMLElement | string;
|
|
|
2338
2448
|
*
|
|
2339
2449
|
* @example
|
|
2340
2450
|
* ```typescript
|
|
2341
|
-
* grid.
|
|
2342
|
-
* const { source, field, newValue } =
|
|
2451
|
+
* grid.on('cell-change', (detail) => {
|
|
2452
|
+
* const { source, field, newValue } = detail;
|
|
2343
2453
|
*
|
|
2344
2454
|
* // Only cascade updates for user edits
|
|
2345
2455
|
* if (source === 'user' && field === 'price') {
|
|
2346
2456
|
* // Update calculated field (marked as 'cascade')
|
|
2347
|
-
* grid.updateRow(
|
|
2348
|
-
* total: newValue *
|
|
2457
|
+
* grid.updateRow(detail.rowId, {
|
|
2458
|
+
* total: newValue * detail.row.quantity,
|
|
2349
2459
|
* });
|
|
2350
2460
|
* }
|
|
2351
2461
|
*
|
|
@@ -2369,9 +2479,7 @@ export type UpdateSource = 'user' | 'cascade' | 'api';
|
|
|
2369
2479
|
*
|
|
2370
2480
|
* @example
|
|
2371
2481
|
* ```typescript
|
|
2372
|
-
* grid.
|
|
2373
|
-
* const { row, rowId, field, oldValue, newValue, source } = e.detail;
|
|
2374
|
-
*
|
|
2482
|
+
* grid.on('cell-change', ({ row, rowId, field, oldValue, newValue, source }) => {
|
|
2375
2483
|
* console.log(`${field} changed from ${oldValue} to ${newValue}`);
|
|
2376
2484
|
* console.log(`Change source: ${source}`);
|
|
2377
2485
|
*
|
|
@@ -2811,11 +2919,12 @@ export interface ToolPanelDefinition {
|
|
|
2811
2919
|
* container.appendChild(span);
|
|
2812
2920
|
*
|
|
2813
2921
|
* // Update on data changes
|
|
2814
|
-
* const
|
|
2815
|
-
*
|
|
2922
|
+
* const unsub = grid.on('data-change', () => {
|
|
2923
|
+
* span.textContent = `${grid.rows.length} rows`;
|
|
2924
|
+
* });
|
|
2816
2925
|
*
|
|
2817
2926
|
* return () => {
|
|
2818
|
-
*
|
|
2927
|
+
* unsub();
|
|
2819
2928
|
* };
|
|
2820
2929
|
* },
|
|
2821
2930
|
* });
|
|
@@ -2927,9 +3036,9 @@ export interface GridColumnState {
|
|
|
2927
3036
|
*
|
|
2928
3037
|
* @example
|
|
2929
3038
|
* ```typescript
|
|
2930
|
-
* grid.
|
|
2931
|
-
*
|
|
2932
|
-
*
|
|
3039
|
+
* grid.on('cell-click', ({ row, field, value, rowIndex, colIndex }) => {
|
|
3040
|
+
* console.log(`Clicked ${field} = ${value} in row ${rowIndex}`);
|
|
3041
|
+
*
|
|
2933
3042
|
* // Access the full row data
|
|
2934
3043
|
* if (row.status === 'pending') {
|
|
2935
3044
|
* showApprovalDialog(row);
|
|
@@ -2963,8 +3072,7 @@ export interface CellClickDetail<TRow = unknown> {
|
|
|
2963
3072
|
*
|
|
2964
3073
|
* @example
|
|
2965
3074
|
* ```typescript
|
|
2966
|
-
* grid.
|
|
2967
|
-
* const { row, rowIndex, rowEl } = e.detail;
|
|
3075
|
+
* grid.on('row-click', ({ row, rowIndex, rowEl }) => {
|
|
2968
3076
|
* console.log(`Clicked row ${rowIndex}: ${row.name}`);
|
|
2969
3077
|
*
|
|
2970
3078
|
* // Highlight the row
|
|
@@ -2992,9 +3100,7 @@ export interface RowClickDetail<TRow = unknown> {
|
|
|
2992
3100
|
*
|
|
2993
3101
|
* @example
|
|
2994
3102
|
* ```typescript
|
|
2995
|
-
* grid.
|
|
2996
|
-
* const { field, direction } = e.detail;
|
|
2997
|
-
*
|
|
3103
|
+
* grid.on('sort-change', ({ field, direction }) => {
|
|
2998
3104
|
* if (direction === 0) {
|
|
2999
3105
|
* console.log(`Sort cleared on ${field}`);
|
|
3000
3106
|
* } else {
|
|
@@ -3022,8 +3128,7 @@ export interface SortChangeDetail {
|
|
|
3022
3128
|
*
|
|
3023
3129
|
* @example
|
|
3024
3130
|
* ```typescript
|
|
3025
|
-
* grid.
|
|
3026
|
-
* const { field, width } = e.detail;
|
|
3131
|
+
* grid.on('column-resize', ({ field, width }) => {
|
|
3027
3132
|
* console.log(`Column ${field} resized to ${width}px`);
|
|
3028
3133
|
*
|
|
3029
3134
|
* // Persist to user preferences
|
|
@@ -3056,9 +3161,7 @@ export type CellActivateTrigger = 'keyboard' | 'pointer';
|
|
|
3056
3161
|
*
|
|
3057
3162
|
* @example
|
|
3058
3163
|
* ```typescript
|
|
3059
|
-
* grid.
|
|
3060
|
-
* const { row, field, value, trigger, cellEl } = e.detail;
|
|
3061
|
-
*
|
|
3164
|
+
* grid.on('cell-activate', ({ row, field, value, trigger, cellEl }, event) => {
|
|
3062
3165
|
* if (trigger === 'keyboard') {
|
|
3063
3166
|
* console.log('Activated via Enter key');
|
|
3064
3167
|
* } else {
|
|
@@ -3067,8 +3170,8 @@ export type CellActivateTrigger = 'keyboard' | 'pointer';
|
|
|
3067
3170
|
*
|
|
3068
3171
|
* // Start custom editing for specific columns
|
|
3069
3172
|
* if (field === 'notes') {
|
|
3173
|
+
* event.preventDefault(); // Prevent default editing
|
|
3070
3174
|
* openNotesEditor(row, cellEl);
|
|
3071
|
-
* e.preventDefault(); // Prevent default editing
|
|
3072
3175
|
* }
|
|
3073
3176
|
* });
|
|
3074
3177
|
* ```
|
|
@@ -3097,7 +3200,7 @@ export interface CellActivateDetail<TRow = unknown> {
|
|
|
3097
3200
|
}
|
|
3098
3201
|
/**
|
|
3099
3202
|
* @deprecated Use `CellActivateDetail` instead. Will be removed in next major version.
|
|
3100
|
-
* Kept for backwards compatibility.
|
|
3203
|
+
* Kept for backwards compatibility. Will be removed in v2.
|
|
3101
3204
|
*
|
|
3102
3205
|
* @category Events
|
|
3103
3206
|
*/
|
|
@@ -3116,8 +3219,7 @@ export interface ActivateCellDetail {
|
|
|
3116
3219
|
* @example
|
|
3117
3220
|
* ```typescript
|
|
3118
3221
|
* // Framework adapter listens for this event
|
|
3119
|
-
* grid.
|
|
3120
|
-
* const { placeholder, spec, context } = e.detail;
|
|
3222
|
+
* grid.on('mount-external-view', ({ placeholder, spec, context }) => {
|
|
3121
3223
|
* // Mount framework component into placeholder
|
|
3122
3224
|
* mountComponent(spec.component, placeholder, context);
|
|
3123
3225
|
* });
|
|
@@ -3146,8 +3248,7 @@ export interface ExternalMountViewDetail<TRow = unknown> {
|
|
|
3146
3248
|
* @example
|
|
3147
3249
|
* ```typescript
|
|
3148
3250
|
* // Framework adapter listens for this event
|
|
3149
|
-
* grid.
|
|
3150
|
-
* const { placeholder, spec, context } = e.detail;
|
|
3251
|
+
* grid.on('mount-external-editor', ({ placeholder, spec, context }) => {
|
|
3151
3252
|
* // Mount framework editor with commit/cancel wired
|
|
3152
3253
|
* mountEditor(spec.component, placeholder, {
|
|
3153
3254
|
* value: context.value,
|
|
@@ -3176,39 +3277,242 @@ export interface ExternalMountEditorDetail<TRow = unknown> {
|
|
|
3176
3277
|
/**
|
|
3177
3278
|
* Maps event names to their detail payload types.
|
|
3178
3279
|
*
|
|
3179
|
-
*
|
|
3280
|
+
* Used by {@link DataGridElement.on | grid.on()} and `addEventListener()` for
|
|
3281
|
+
* fully typed event handling. Plugins extend this map via module augmentation.
|
|
3180
3282
|
*
|
|
3181
3283
|
* @example
|
|
3182
3284
|
* ```typescript
|
|
3183
|
-
* //
|
|
3184
|
-
*
|
|
3185
|
-
*
|
|
3186
|
-
* event: K,
|
|
3187
|
-
* handler: (detail: DataGridEventMap[K]) => void,
|
|
3188
|
-
* ): void {
|
|
3189
|
-
* grid.addEventListener(event, (e: CustomEvent) => handler(e.detail));
|
|
3190
|
-
* }
|
|
3191
|
-
*
|
|
3192
|
-
* handleEvent(grid, 'cell-click', (detail) => {
|
|
3193
|
-
* console.log(detail.field); // Type-safe access
|
|
3285
|
+
* // Recommended: grid.on() auto-unwraps the detail
|
|
3286
|
+
* const off = grid.on('cell-click', ({ field, value, row }) => {
|
|
3287
|
+
* console.log(`Clicked ${field} = ${value}`);
|
|
3194
3288
|
* });
|
|
3289
|
+
* off(); // unsubscribe
|
|
3290
|
+
*
|
|
3291
|
+
* // addEventListener works too (useful for { once, signal, capture })
|
|
3292
|
+
* grid.addEventListener('cell-click', (e) => {
|
|
3293
|
+
* console.log(e.detail.field);
|
|
3294
|
+
* }, { once: true });
|
|
3195
3295
|
* ```
|
|
3196
3296
|
*
|
|
3297
|
+
* @see {@link DataGridElement.on} for the recommended subscription API
|
|
3197
3298
|
* @see {@link DataGridCustomEvent} for typed CustomEvent wrapper
|
|
3198
3299
|
* @see {@link DGEvents} for event name constants
|
|
3199
3300
|
* @category Events
|
|
3200
3301
|
*/
|
|
3201
3302
|
export interface DataGridEventMap<TRow = unknown> {
|
|
3303
|
+
/**
|
|
3304
|
+
* Fired when a cell is clicked.
|
|
3305
|
+
* Provides full context: row data, column config, cell element, and the original mouse event.
|
|
3306
|
+
*
|
|
3307
|
+
* @example
|
|
3308
|
+
* ```typescript
|
|
3309
|
+
* grid.on('cell-click', ({ row, field, value, cellEl }) => {
|
|
3310
|
+
* console.log(`Clicked ${field} = ${value}`);
|
|
3311
|
+
*
|
|
3312
|
+
* // Open a detail dialog for a specific column
|
|
3313
|
+
* if (field === 'avatar') {
|
|
3314
|
+
* showImagePreview(row.avatarUrl, cellEl);
|
|
3315
|
+
* }
|
|
3316
|
+
* });
|
|
3317
|
+
* ```
|
|
3318
|
+
*
|
|
3319
|
+
* @see {@link CellClickDetail}
|
|
3320
|
+
* @group Core Events
|
|
3321
|
+
*/
|
|
3202
3322
|
'cell-click': CellClickDetail<TRow>;
|
|
3323
|
+
/**
|
|
3324
|
+
* Fired when a row is clicked (anywhere on the row).
|
|
3325
|
+
* Use for row-level actions like opening a detail panel or navigating.
|
|
3326
|
+
*
|
|
3327
|
+
* @example
|
|
3328
|
+
* ```typescript
|
|
3329
|
+
* grid.on('row-click', ({ row, rowIndex }) => {
|
|
3330
|
+
* console.log(`Row ${rowIndex}: ${row.name}`);
|
|
3331
|
+
*
|
|
3332
|
+
* // Navigate to detail page
|
|
3333
|
+
* router.navigate(`/employees/${row.id}`);
|
|
3334
|
+
* });
|
|
3335
|
+
* ```
|
|
3336
|
+
*
|
|
3337
|
+
* @see {@link RowClickDetail}
|
|
3338
|
+
* @group Core Events
|
|
3339
|
+
*/
|
|
3203
3340
|
'row-click': RowClickDetail<TRow>;
|
|
3341
|
+
/**
|
|
3342
|
+
* Fired when a cell is activated by Enter key or pointer click.
|
|
3343
|
+
* Unified event for both keyboard and pointer activation — use this
|
|
3344
|
+
* instead of the deprecated `activate-cell`.
|
|
3345
|
+
*
|
|
3346
|
+
* Call `event.preventDefault()` to suppress default behavior (e.g., inline editing).
|
|
3347
|
+
*
|
|
3348
|
+
* @example
|
|
3349
|
+
* ```typescript
|
|
3350
|
+
* grid.on('cell-activate', ({ row, field, trigger, cellEl }, event) => {
|
|
3351
|
+
* // Custom editing for a specific column
|
|
3352
|
+
* if (field === 'notes') {
|
|
3353
|
+
* event.preventDefault();
|
|
3354
|
+
* openRichTextEditor(row, cellEl);
|
|
3355
|
+
* }
|
|
3356
|
+
*
|
|
3357
|
+
* console.log(`Activated via ${trigger}`); // 'keyboard' | 'pointer'
|
|
3358
|
+
* });
|
|
3359
|
+
* ```
|
|
3360
|
+
*
|
|
3361
|
+
* @see {@link CellActivateDetail}
|
|
3362
|
+
* @see {@link CellActivateTrigger}
|
|
3363
|
+
* @group Core Events
|
|
3364
|
+
*/
|
|
3204
3365
|
'cell-activate': CellActivateDetail<TRow>;
|
|
3366
|
+
/**
|
|
3367
|
+
* Fired after any data mutation — user edits, cascade updates, or API calls.
|
|
3368
|
+
* This is an informational event for logging, auditing, or cascading updates
|
|
3369
|
+
* to related fields. Check `source` to distinguish edit origins.
|
|
3370
|
+
*
|
|
3371
|
+
* @example
|
|
3372
|
+
* ```typescript
|
|
3373
|
+
* grid.on('cell-change', ({ row, rowId, field, oldValue, newValue, source }) => {
|
|
3374
|
+
* console.log(`${field}: ${oldValue} → ${newValue} (${source})`);
|
|
3375
|
+
*
|
|
3376
|
+
* // Cascade: recalculate total when quantity changes
|
|
3377
|
+
* if (source === 'user' && field === 'quantity') {
|
|
3378
|
+
* grid.updateRow(rowId, { total: newValue * row.price });
|
|
3379
|
+
* }
|
|
3380
|
+
* });
|
|
3381
|
+
* ```
|
|
3382
|
+
*
|
|
3383
|
+
* @see {@link CellChangeDetail}
|
|
3384
|
+
* @see {@link UpdateSource}
|
|
3385
|
+
* @group Core Events
|
|
3386
|
+
*/
|
|
3205
3387
|
'cell-change': CellChangeDetail<TRow>;
|
|
3388
|
+
/**
|
|
3389
|
+
* Fired whenever the grid's row data changes — new data assignment,
|
|
3390
|
+
* row insertion/removal, or in-place mutations via `updateRow()`.
|
|
3391
|
+
* Use to keep external UI (row counts, summaries, charts) in sync.
|
|
3392
|
+
*
|
|
3393
|
+
* @example
|
|
3394
|
+
* ```typescript
|
|
3395
|
+
* grid.on('data-change', ({ rowCount, sourceRowCount }) => {
|
|
3396
|
+
* statusBar.textContent = `${rowCount} of ${sourceRowCount} rows`;
|
|
3397
|
+
* });
|
|
3398
|
+
* ```
|
|
3399
|
+
*
|
|
3400
|
+
* @see {@link DataChangeDetail}
|
|
3401
|
+
* @group Core Events
|
|
3402
|
+
*/
|
|
3403
|
+
'data-change': DataChangeDetail;
|
|
3404
|
+
/**
|
|
3405
|
+
* Emitted when a cell with an external view renderer (React, Angular, Vue component)
|
|
3406
|
+
* needs to be mounted. Framework adapters listen for this event internally.
|
|
3407
|
+
*
|
|
3408
|
+
* @example
|
|
3409
|
+
* ```typescript
|
|
3410
|
+
* // Custom framework adapter
|
|
3411
|
+
* grid.on('mount-external-view', ({ placeholder, spec, context }) => {
|
|
3412
|
+
* myFramework.render(spec.component, placeholder, {
|
|
3413
|
+
* row: context.row,
|
|
3414
|
+
* value: context.value,
|
|
3415
|
+
* });
|
|
3416
|
+
* });
|
|
3417
|
+
* ```
|
|
3418
|
+
*
|
|
3419
|
+
* @see {@link ExternalMountViewDetail}
|
|
3420
|
+
* @see {@link FrameworkAdapter}
|
|
3421
|
+
* @group Framework Adapter Events
|
|
3422
|
+
*/
|
|
3206
3423
|
'mount-external-view': ExternalMountViewDetail<TRow>;
|
|
3424
|
+
/**
|
|
3425
|
+
* Emitted when a cell with an external editor component (React, Angular, Vue)
|
|
3426
|
+
* needs to be mounted with commit/cancel bindings. Framework adapters listen
|
|
3427
|
+
* for this event internally.
|
|
3428
|
+
*
|
|
3429
|
+
* @example
|
|
3430
|
+
* ```typescript
|
|
3431
|
+
* // Custom framework adapter
|
|
3432
|
+
* grid.on('mount-external-editor', ({ placeholder, spec, context }) => {
|
|
3433
|
+
* myFramework.render(spec.component, placeholder, {
|
|
3434
|
+
* value: context.value,
|
|
3435
|
+
* onSave: context.commit,
|
|
3436
|
+
* onCancel: context.cancel,
|
|
3437
|
+
* });
|
|
3438
|
+
* });
|
|
3439
|
+
* ```
|
|
3440
|
+
*
|
|
3441
|
+
* @see {@link ExternalMountEditorDetail}
|
|
3442
|
+
* @see {@link FrameworkAdapter}
|
|
3443
|
+
* @group Framework Adapter Events
|
|
3444
|
+
*/
|
|
3207
3445
|
'mount-external-editor': ExternalMountEditorDetail<TRow>;
|
|
3446
|
+
/**
|
|
3447
|
+
* Fired when the sort state changes — column header click, programmatic sort,
|
|
3448
|
+
* or sort cleared. `direction: 0` indicates the sort was removed.
|
|
3449
|
+
*
|
|
3450
|
+
* @example
|
|
3451
|
+
* ```typescript
|
|
3452
|
+
* grid.on('sort-change', ({ field, direction }) => {
|
|
3453
|
+
* if (direction === 0) {
|
|
3454
|
+
* console.log('Sort cleared');
|
|
3455
|
+
* } else {
|
|
3456
|
+
* console.log(`Sorted by ${field} ${direction === 1 ? 'ASC' : 'DESC'}`);
|
|
3457
|
+
* }
|
|
3458
|
+
*
|
|
3459
|
+
* // Server-side sorting
|
|
3460
|
+
* fetchData({ sortBy: field, sortDir: direction });
|
|
3461
|
+
* });
|
|
3462
|
+
* ```
|
|
3463
|
+
*
|
|
3464
|
+
* @see {@link SortChangeDetail}
|
|
3465
|
+
* @see {@link SortHandler}
|
|
3466
|
+
* @group Core Events
|
|
3467
|
+
*/
|
|
3208
3468
|
'sort-change': SortChangeDetail;
|
|
3469
|
+
/**
|
|
3470
|
+
* Fired when a column is resized by the user dragging the resize handle.
|
|
3471
|
+
* Use to persist column widths to user preferences or localStorage.
|
|
3472
|
+
*
|
|
3473
|
+
* @example
|
|
3474
|
+
* ```typescript
|
|
3475
|
+
* grid.on('column-resize', ({ field, width }) => {
|
|
3476
|
+
* console.log(`Column "${field}" resized to ${width}px`);
|
|
3477
|
+
*
|
|
3478
|
+
* // Persist to localStorage
|
|
3479
|
+
* const widths = JSON.parse(localStorage.getItem('col-widths') ?? '{}');
|
|
3480
|
+
* widths[field] = width;
|
|
3481
|
+
* localStorage.setItem('col-widths', JSON.stringify(widths));
|
|
3482
|
+
* });
|
|
3483
|
+
* ```
|
|
3484
|
+
*
|
|
3485
|
+
* @see {@link ColumnResizeDetail}
|
|
3486
|
+
* @group Core Events
|
|
3487
|
+
*/
|
|
3209
3488
|
'column-resize': ColumnResizeDetail;
|
|
3210
|
-
/**
|
|
3489
|
+
/**
|
|
3490
|
+
* @deprecated Use `cell-activate` instead. Will be removed in v2.
|
|
3491
|
+
* @see {@link ActivateCellDetail}
|
|
3492
|
+
* @group Core Events
|
|
3493
|
+
*/
|
|
3211
3494
|
'activate-cell': ActivateCellDetail;
|
|
3495
|
+
/**
|
|
3496
|
+
* Fired when column state changes — reordering, resizing, visibility toggle,
|
|
3497
|
+
* or sort changes. Use with `getColumnState()` / `columnState` setter for
|
|
3498
|
+
* full state persistence.
|
|
3499
|
+
*
|
|
3500
|
+
* @example
|
|
3501
|
+
* ```typescript
|
|
3502
|
+
* grid.on('column-state-change', (state) => {
|
|
3503
|
+
* localStorage.setItem('grid-state', JSON.stringify(state));
|
|
3504
|
+
* console.log(`${state.columns.length} columns in state`);
|
|
3505
|
+
* });
|
|
3506
|
+
*
|
|
3507
|
+
* // Restore on load
|
|
3508
|
+
* const saved = localStorage.getItem('grid-state');
|
|
3509
|
+
* if (saved) grid.columnState = JSON.parse(saved);
|
|
3510
|
+
* ```
|
|
3511
|
+
*
|
|
3512
|
+
* @see {@link GridColumnState}
|
|
3513
|
+
* @see {@link ColumnState}
|
|
3514
|
+
* @group Core Events
|
|
3515
|
+
*/
|
|
3212
3516
|
'column-state-change': GridColumnState;
|
|
3213
3517
|
}
|
|
3214
3518
|
/**
|
|
@@ -3238,19 +3542,26 @@ export type DataGridEventDetail<K extends keyof DataGridEventMap<unknown>, TRow
|
|
|
3238
3542
|
/**
|
|
3239
3543
|
* Custom event type for DataGrid events with typed detail payload.
|
|
3240
3544
|
*
|
|
3241
|
-
*
|
|
3545
|
+
* Primarily useful when you need to declare handler parameters with
|
|
3546
|
+
* `addEventListener`. For most use cases, prefer {@link DataGridElement.on | grid.on()}
|
|
3547
|
+
* which handles typing automatically.
|
|
3242
3548
|
*
|
|
3243
3549
|
* @example
|
|
3244
3550
|
* ```typescript
|
|
3245
|
-
* //
|
|
3551
|
+
* // Typed handler for addEventListener
|
|
3246
3552
|
* function onCellClick(e: DataGridCustomEvent<'cell-click', Employee>): void {
|
|
3247
3553
|
* const { row, field, value } = e.detail;
|
|
3248
3554
|
* console.log(`Clicked ${field} = ${value} on ${row.name}`);
|
|
3249
3555
|
* }
|
|
3250
|
-
*
|
|
3251
3556
|
* grid.addEventListener('cell-click', onCellClick);
|
|
3557
|
+
*
|
|
3558
|
+
* // With grid.on() you don't need this type — it's inferred:
|
|
3559
|
+
* grid.on('cell-click', ({ row, field, value }) => {
|
|
3560
|
+
* console.log(`Clicked ${field} = ${value} on ${row.name}`);
|
|
3561
|
+
* });
|
|
3252
3562
|
* ```
|
|
3253
3563
|
*
|
|
3564
|
+
* @see {@link DataGridElement.on} for the recommended subscription API
|
|
3254
3565
|
* @see {@link DataGridEventMap} for all event types
|
|
3255
3566
|
* @see {@link DataGridEventDetail} for extracting detail type only
|
|
3256
3567
|
* @category Events
|
|
@@ -3265,4 +3576,3 @@ export interface EvalContext {
|
|
|
3265
3576
|
value: unknown;
|
|
3266
3577
|
row: Record<string, unknown> | null;
|
|
3267
3578
|
}
|
|
3268
|
-
//# sourceMappingURL=types.d.ts.map
|
package/lib/features/export.d.ts
CHANGED