impact-nova 3.0.0-alpha.2 → 3.0.0-alpha.22
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/components/data/ag-grid-react/ag-grid-list.d.ts +3 -1
- package/dist/components/data/ag-grid-react/ag-grid-list.demo-board.d.ts +46 -0
- package/dist/components/data/ag-grid-react/ag-grid-list.js +9 -8
- package/dist/components/data/ag-grid-react/ag-grid-list.key-attributes.d.ts +1 -0
- package/dist/components/data/ag-grid-react/ag-grid.types.d.ts +65 -3
- package/dist/components/data/ag-grid-react/build-list-drag-column-defs.d.ts +8 -0
- package/dist/components/data/ag-grid-react/build-list-drag-column-defs.js +28 -0
- package/dist/components/data/ag-grid-react/cell-renderers/badge-cell-renderer.d.ts +2 -0
- package/dist/components/data/ag-grid-react/cell-renderers/badge-cell-renderer.js +15 -14
- package/dist/components/data/ag-grid-react/cell-renderers/badge-icon-registry.d.ts +10 -0
- package/dist/components/data/ag-grid-react/cell-renderers/badge-icon-registry.js +17 -0
- package/dist/components/data/ag-grid-react/cell-renderers/drag-handle-cell-renderer.d.ts +18 -0
- package/dist/components/data/ag-grid-react/cell-renderers/drag-handle-cell-renderer.js +32 -0
- package/dist/components/data/ag-grid-react/cell-renderers/editors/list-select-cell-editor.js +71 -46
- package/dist/components/data/ag-grid-react/cell-renderers/editors/select-cell-editor.js +53 -49
- package/dist/components/data/ag-grid-react/cell-renderers/index.d.ts +45 -7
- package/dist/components/data/ag-grid-react/cell-renderers/index.js +70 -58
- package/dist/components/data/ag-grid-react/cell-renderers/link-with-batch-cell-renderer.js +88 -76
- package/dist/components/data/ag-grid-react/cell-renderers/list-select-display-renderer.js +31 -33
- package/dist/components/data/ag-grid-react/cell-renderers/select-display-renderer.js +18 -17
- package/dist/components/data/ag-grid-react/cell-renderers/style-description-display-renderer.d.ts +5 -11
- package/dist/components/data/ag-grid-react/cell-renderers/style-description-display-renderer.js +127 -51
- package/dist/components/data/ag-grid-react/editable-utils.d.ts +9 -1
- package/dist/components/data/ag-grid-react/editable-utils.js +46 -41
- package/dist/components/data/ag-grid-react/headers/custom-header.js +110 -108
- package/dist/components/data/ag-grid-react/headers/header-search-input.js +203 -199
- package/dist/components/data/ag-grid-react/index.d.ts +6 -1
- package/dist/components/data/ag-grid-react/index.js +316 -248
- package/dist/components/data/ag-grid-react/list-drag-grid-options.d.ts +34 -0
- package/dist/components/data/ag-grid-react/list-drag-grid-options.js +110 -0
- package/dist/components/data/ag-grid-react/list-drag-preview-card.d.ts +4 -0
- package/dist/components/data/ag-grid-react/list-drag-preview-card.js +14 -0
- package/dist/components/data/ag-grid-react/list-drag-preview-snapshot.d.ts +20 -0
- package/dist/components/data/ag-grid-react/list-drag-preview-snapshot.js +42 -0
- package/dist/components/data/ag-grid-react/list-find-highlight.d.ts +6 -0
- package/dist/components/data/ag-grid-react/list-find-highlight.js +7 -0
- package/dist/components/data/ag-grid-react/list-row-move.d.ts +84 -0
- package/dist/components/data/ag-grid-react/list-row-move.js +74 -0
- package/dist/components/data/ag-grid-react/numeric-column-header-alignment.d.ts +9 -0
- package/dist/components/data/ag-grid-react/numeric-column-header-alignment.js +67 -0
- package/dist/components/data/ag-grid-react/process-backend-columndefs.d.ts +10 -2
- package/dist/components/data/ag-grid-react/process-backend-columndefs.js +84 -0
- package/dist/components/data/ag-grid-react/use-ag-grid-list-drag.d.ts +67 -0
- package/dist/components/data/ag-grid-react/use-ag-grid-list-drag.js +162 -0
- package/dist/components/data/ag-grid-react/use-list-drag-preview.d.ts +20 -0
- package/dist/components/data/ag-grid-react/use-list-drag-preview.js +148 -0
- package/dist/components/data/ag-grid-react/use-list-find.d.ts +36 -0
- package/dist/components/data/ag-grid-react/use-list-row-drop-zones.d.ts +46 -0
- package/dist/components/data/ag-grid-react/use-list-row-drop-zones.js +92 -0
- package/dist/components/data/data-table/build-column-tree-from-grid.js +15 -15
- package/dist/components/data/data-table/column-picker-authority.js +9 -9
- package/dist/components/data/data-table/data-table-column-apply.js +30 -29
- package/dist/components/data/data-table/data-table-column-tree-cache.js +62 -60
- package/dist/components/data/data-table/data-table-list-header.d.ts +7 -0
- package/dist/components/data/data-table/data-table-list-header.js +31 -0
- package/dist/components/data/data-table/data-table-overlay.d.ts +6 -0
- package/dist/components/data/data-table/data-table-overlay.js +18 -0
- package/dist/components/data/data-table/data-table-picker-column-eligibility.d.ts +3 -0
- package/dist/components/data/data-table/data-table-picker-column-eligibility.js +24 -4
- package/dist/components/data/data-table/data-table.js +35 -34
- package/dist/components/data/data-table/data-table.types.d.ts +13 -2
- package/dist/components/data/data-table/index.d.ts +10 -0
- package/dist/components/data/data-table/index.js +64 -52
- package/dist/components/data/data-table/use-data-table-viewport.d.ts +10 -0
- package/dist/components/data/data-table/use-data-table-viewport.js +31 -0
- package/dist/components/data/expandable-list-item/expandable-list-item-attributes.js +3 -2
- package/dist/components/data/expandable-list-item/expandable-list-item-metrics.js +3 -2
- package/dist/components/data/expandable-list-item/index.d.ts +2 -0
- package/dist/components/data/expandable-list-item/index.js +20 -16
- package/dist/components/data/expandable-list-item/product-card-hero.d.ts +15 -0
- package/dist/components/data/expandable-list-item/product-card-iris-insight-trigger.d.ts +8 -0
- package/dist/components/data/expandable-list-item/product-card-iris-insight-trigger.js +41 -0
- package/dist/components/data/expandable-list-item/product-card-metrics-toggle.d.ts +13 -0
- package/dist/components/data/expandable-list-item/product-card-metrics-toggle.js +27 -0
- package/dist/components/data/expandable-list-item/sku-picker-chrome.d.ts +40 -0
- package/dist/components/data/expandable-list-item/sku-picker-chrome.js +150 -0
- package/dist/components/data/expandable-list-item/useServerSkuInfinitePages.d.ts +2 -1
- package/dist/components/data/expandable-list-item/virtualized-responsive-grid.catalog.d.ts +5 -4
- package/dist/components/data/expandable-list-item/virtualized-responsive-grid.sku-picker.d.ts +3 -2
- package/dist/components/data/scenario-comparison/flatten-scenario-comparison-rows.d.ts +2 -0
- package/dist/components/data/scenario-comparison/flatten-scenario-comparison-rows.js +16 -0
- package/dist/components/data/scenario-comparison/index.d.ts +3 -0
- package/dist/components/data/scenario-comparison/index.js +6 -0
- package/dist/components/data/scenario-comparison/scenario-comparison-column.d.ts +12 -0
- package/dist/components/data/scenario-comparison/scenario-comparison-column.js +172 -0
- package/dist/components/data/scenario-comparison/scenario-comparison-label.d.ts +6 -0
- package/dist/components/data/scenario-comparison/scenario-comparison-label.js +64 -0
- package/dist/components/data/scenario-comparison/scenario-comparison.d.ts +5 -0
- package/dist/components/data/scenario-comparison/scenario-comparison.js +127 -0
- package/dist/components/data/scenario-comparison/scenario-comparison.types.d.ts +56 -0
- package/dist/components/data/scenario-comparison/scenario-comparison.variants.d.ts +7 -0
- package/dist/components/data/scenario-comparison/scenario-comparison.variants.js +29 -0
- package/dist/components/data-display/badge/index.d.ts +2 -0
- package/dist/components/data-display/badge/index.js +4 -2
- package/dist/components/data-display/badge/trophy-icon.d.ts +6 -0
- package/dist/components/data-display/badge/trophy-icon.js +28 -0
- package/dist/components/data-display/chart/chart-heatmap-layout.d.ts +31 -0
- package/dist/components/data-display/chart/chart-heatmap-layout.js +72 -0
- package/dist/components/data-display/chart/chart-scatter3d.d.ts +39 -0
- package/dist/components/data-display/chart/chart-scatter3d.js +180 -0
- package/dist/components/data-display/chart/chart.category-cluster-heatmap.stories-data.d.ts +1 -1
- package/dist/components/data-display/chart/chart.js +171 -143
- package/dist/components/data-display/chart/chart.types.d.ts +17 -0
- package/dist/components/data-display/chart/chart.utils.js +122 -92
- package/dist/components/data-display/heatmap-grid/heatmap-grid-play.d.ts +9 -0
- package/dist/components/data-display/heatmap-grid/heatmap-grid.d.ts +32 -0
- package/dist/components/data-display/heatmap-grid/heatmap-grid.js +93 -0
- package/dist/components/data-display/heatmap-grid/heatmap-grid.layout.d.ts +46 -0
- package/dist/components/data-display/heatmap-grid/heatmap-grid.layout.js +80 -0
- package/dist/components/data-display/heatmap-grid/heatmap-grid.types.d.ts +54 -0
- package/dist/components/data-display/heatmap-grid/heatmap-grid.variants.d.ts +18 -0
- package/dist/components/data-display/heatmap-grid/heatmap-grid.variants.js +80 -0
- package/dist/components/data-display/heatmap-grid/index.d.ts +3 -0
- package/dist/components/data-display/heatmap-grid/index.js +14 -0
- package/dist/components/data-display/heatmap-grid/internals/heatmap-grid-cell.d.ts +14 -0
- package/dist/components/data-display/heatmap-grid/internals/heatmap-grid-cell.js +39 -0
- package/dist/components/data-display/heatmap-grid/internals/heatmap-grid-context.d.ts +29 -0
- package/dist/components/data-display/heatmap-grid/internals/heatmap-grid-context.js +33 -0
- package/dist/components/data-display/heatmap-grid/internals/heatmap-grid-tooltip.d.ts +4 -0
- package/dist/components/data-display/heatmap-grid/internals/heatmap-grid-tooltip.js +49 -0
- package/dist/components/data-display/heatmap-grid/internals/heatmap-grid-viewport.d.ts +3 -0
- package/dist/components/data-display/heatmap-grid/internals/heatmap-grid-viewport.js +173 -0
- package/dist/components/data-display/heatmap-grid/internals/use-heatmap-grid-viewport.d.ts +12 -0
- package/dist/components/data-display/heatmap-grid/internals/use-heatmap-grid-viewport.js +161 -0
- package/dist/components/data-display/stereo-scatter/index.d.ts +2 -0
- package/dist/components/data-display/stereo-scatter/index.js +10 -0
- package/dist/components/data-display/stereo-scatter/internals/stereo-engine-frame.d.ts +41 -0
- package/dist/components/data-display/stereo-scatter/internals/stereo-engine-frame.js +178 -0
- package/dist/components/data-display/stereo-scatter/internals/stereo-engine-theme.d.ts +14 -0
- package/dist/components/data-display/stereo-scatter/internals/stereo-engine-theme.js +29 -0
- package/dist/components/data-display/stereo-scatter/internals/stereo-engine-wedges.d.ts +23 -0
- package/dist/components/data-display/stereo-scatter/internals/stereo-engine-wedges.js +80 -0
- package/dist/components/data-display/stereo-scatter/internals/stereo-engine.d.ts +120 -0
- package/dist/components/data-display/stereo-scatter/internals/stereo-engine.js +519 -0
- package/dist/components/data-display/stereo-scatter/internals/stereo-math.d.ts +64 -0
- package/dist/components/data-display/stereo-scatter/internals/stereo-math.js +129 -0
- package/dist/components/data-display/stereo-scatter/internals/stereo-model.d.ts +37 -0
- package/dist/components/data-display/stereo-scatter/internals/stereo-model.js +71 -0
- package/dist/components/data-display/stereo-scatter/internals/stereo-scatter-context.d.ts +33 -0
- package/dist/components/data-display/stereo-scatter/internals/stereo-scatter-context.js +19 -0
- package/dist/components/data-display/stereo-scatter/internals/stereo-scatter-key.d.ts +4 -0
- package/dist/components/data-display/stereo-scatter/internals/stereo-scatter-key.js +19 -0
- package/dist/components/data-display/stereo-scatter/internals/stereo-scatter-legend.d.ts +2 -0
- package/dist/components/data-display/stereo-scatter/internals/stereo-scatter-legend.js +75 -0
- package/dist/components/data-display/stereo-scatter/internals/stereo-scatter-scene.d.ts +2 -0
- package/dist/components/data-display/stereo-scatter/internals/stereo-scatter-scene.js +149 -0
- package/dist/components/data-display/stereo-scatter/internals/stereo-scatter-toolbar.d.ts +13 -0
- package/dist/components/data-display/stereo-scatter/internals/stereo-scatter-toolbar.js +93 -0
- package/dist/components/data-display/stereo-scatter/internals/stereo-scatter-tooltip.d.ts +2 -0
- package/dist/components/data-display/stereo-scatter/internals/stereo-scatter-tooltip.js +62 -0
- package/dist/components/data-display/stereo-scatter/internals/stereo-scatter-viewport.d.ts +3 -0
- package/dist/components/data-display/stereo-scatter/internals/stereo-scatter-viewport.js +41 -0
- package/dist/components/data-display/stereo-scatter/stereo-scatter.d.ts +12 -0
- package/dist/components/data-display/stereo-scatter/stereo-scatter.js +107 -0
- package/dist/components/data-display/stereo-scatter/stereo-scatter.stories-data.d.ts +11 -0
- package/dist/components/data-display/stereo-scatter/stereo-scatter.types.d.ts +69 -0
- package/dist/components/data-display/stereo-scatter/stereo-scatter.variants.d.ts +13 -0
- package/dist/components/data-display/stereo-scatter/stereo-scatter.variants.js +42 -0
- package/dist/components/feedback/find-bar/collect-find-matches.d.ts +35 -0
- package/dist/components/feedback/find-bar/collect-find-matches.js +68 -0
- package/dist/components/feedback/find-bar/find-bar-shortcuts.d.ts +5 -0
- package/dist/components/feedback/find-bar/find-bar-shortcuts.js +27 -0
- package/dist/components/feedback/find-bar/find-bar.d.ts +7 -0
- package/dist/components/feedback/find-bar/find-bar.js +266 -0
- package/dist/components/feedback/find-bar/find-bar.types.d.ts +32 -0
- package/dist/components/feedback/find-bar/index.d.ts +4 -0
- package/dist/components/feedback/find-bar/index.js +11 -0
- package/dist/components/feedback/tooltip/button-icon-tooltip.d.ts +6 -1
- package/dist/components/feedback/tooltip/button-icon-tooltip.js +22 -17
- package/dist/components/feedback/tooltip/tab-tooltip-render.js +3 -2
- package/dist/components/feedback/tooltip/use-overflow-tooltip.js +44 -36
- package/dist/components/flows/command-palette/shortcut-settings.js +10 -10
- package/dist/components/flows/filter-panel/filter-panel.js +4 -4
- package/dist/components/flows/iris-chat/IrisChatComposerVoiceCapture.d.ts +5 -0
- package/dist/components/flows/iris-chat/IrisChatComposerVoiceCapture.js +73 -0
- package/dist/components/flows/iris-chat/IrisChatHeaderWindowSizeButton.d.ts +5 -0
- package/dist/components/flows/iris-chat/IrisChatHeaderWindowSizeButton.js +49 -0
- package/dist/components/flows/iris-chat/IrisChatSnapTile.d.ts +8 -0
- package/dist/components/flows/iris-chat/IrisChatSnapTile.js +30 -0
- package/dist/components/flows/iris-chat/IrisChatVoiceWaveform.d.ts +3 -0
- package/dist/components/flows/iris-chat/IrisChatVoiceWaveform.js +25 -0
- package/dist/components/flows/iris-chat/IrisChatWindowSnapMenu.d.ts +4 -0
- package/dist/components/flows/iris-chat/IrisChatWindowSnapMenu.js +113 -0
- package/dist/components/flows/iris-chat/index.d.ts +3 -1
- package/dist/components/flows/iris-chat/index.js +58 -53
- package/dist/components/flows/iris-chat/iris-chat-artifact.js +46 -36
- package/dist/components/flows/iris-chat/iris-chat-chrome.d.ts +39 -0
- package/dist/components/flows/iris-chat/iris-chat-chrome.js +311 -0
- package/dist/components/flows/iris-chat/iris-chat-close-animation.d.ts +12 -0
- package/dist/components/flows/iris-chat/iris-chat-close-animation.js +21 -0
- package/dist/components/flows/iris-chat/iris-chat-composer.js +291 -234
- package/dist/components/flows/iris-chat/iris-chat-context.d.ts +16 -0
- package/dist/components/flows/iris-chat/iris-chat-context.js +14 -10
- package/dist/components/flows/iris-chat/iris-chat-copy-feedback.d.ts +4 -0
- package/dist/components/flows/iris-chat/iris-chat-copy-feedback.js +16 -0
- package/dist/components/flows/iris-chat/iris-chat-frame.d.ts +32 -0
- package/dist/components/flows/iris-chat/iris-chat-frame.js +88 -0
- package/dist/components/flows/iris-chat/iris-chat-icons.d.ts +2 -0
- package/dist/components/flows/iris-chat/iris-chat-icons.js +46 -20
- package/dist/components/flows/iris-chat/iris-chat-launch-animation.d.ts +11 -0
- package/dist/components/flows/iris-chat/iris-chat-launch-animation.js +35 -0
- package/dist/components/flows/iris-chat/iris-chat-markdown.js +82 -42
- package/dist/components/flows/iris-chat/iris-chat-menu.js +149 -117
- package/dist/components/flows/iris-chat/iris-chat-snap-presets.d.ts +7 -0
- package/dist/components/flows/iris-chat/iris-chat-snap-presets.js +83 -0
- package/dist/components/flows/iris-chat/iris-chat-speech.d.ts +52 -0
- package/dist/components/flows/iris-chat/iris-chat-speech.js +121 -0
- package/dist/components/flows/iris-chat/iris-chat-thread.d.ts +4 -0
- package/dist/components/flows/iris-chat/iris-chat-thread.js +277 -220
- package/dist/components/flows/iris-chat/iris-chat-window-chrome.d.ts +33 -0
- package/dist/components/flows/iris-chat/iris-chat-window-chrome.js +37 -0
- package/dist/components/flows/iris-chat/iris-chat-window-geometry-context.d.ts +14 -0
- package/dist/components/flows/iris-chat/iris-chat-window-geometry-context.js +15 -0
- package/dist/components/flows/iris-chat/iris-chat-window-geometry.d.ts +12 -0
- package/dist/components/flows/iris-chat/iris-chat-window-geometry.js +113 -0
- package/dist/components/flows/iris-chat/iris-chat-window-handles.d.ts +6 -0
- package/dist/components/flows/iris-chat/iris-chat-window-handles.js +50 -0
- package/dist/components/flows/iris-chat/iris-chat-window-shell.d.ts +8 -0
- package/dist/components/flows/iris-chat/iris-chat-window-shell.js +37 -0
- package/dist/components/flows/iris-chat/iris-chat.d.ts +3 -39
- package/dist/components/flows/iris-chat/iris-chat.js +22 -330
- package/dist/components/flows/iris-chat/iris-chat.types.d.ts +20 -0
- package/dist/components/flows/iris-chat/iris-chat.variants.d.ts +4 -3
- package/dist/components/flows/iris-chat/iris-chat.variants.js +45 -22
- package/dist/components/flows/iris-chat/sync-iris-chat-composer-textarea.d.ts +6 -0
- package/dist/components/flows/iris-chat/sync-iris-chat-composer-textarea.js +23 -0
- package/dist/components/flows/iris-chat/use-iris-chat-root.d.ts +29 -0
- package/dist/components/flows/iris-chat/use-iris-chat-root.js +162 -0
- package/dist/components/forms/choice-card/choice-card-compare-scroll.d.ts +4 -0
- package/dist/components/forms/choice-card/choice-card-compare-scroll.js +6 -0
- package/dist/components/forms/choice-card/choice-card-percent.js +82 -51
- package/dist/components/forms/choice-card/choice-card.d.ts +14 -2
- package/dist/components/forms/choice-card/choice-card.js +470 -381
- package/dist/components/forms/choice-card/choice-card.types.d.ts +9 -2
- package/dist/components/forms/choice-card/choice-card.variants.js +24 -3
- package/dist/components/forms/input/input.js +5 -5
- package/dist/components/forms/select/components/SelectMenuPanel.js +15 -15
- package/dist/components/forms/select/components/SelectTriggerValue.js +3 -2
- package/dist/components/forms/select/components/Submenu.js +3 -2
- package/dist/components/layout/header/header.js +1 -0
- package/dist/components/layout/horizontal-scroller/horizontal-scroller-mask.d.ts +3 -0
- package/dist/components/layout/horizontal-scroller/horizontal-scroller-mask.js +12 -0
- package/dist/components/layout/horizontal-scroller/horizontal-scroller.js +181 -125
- package/dist/components/layout/horizontal-scroller/horizontal-scroller.types.d.ts +2 -0
- package/dist/components/layout/horizontal-scroller/scroll-overflow-affordance.d.ts +3 -1
- package/dist/components/layout/horizontal-scroller/scroll-overflow-affordance.js +77 -67
- package/dist/components/primitives/button/button.variants.js +1 -1
- package/dist/components/primitives/iris/iris-insight-truncated-text.d.ts +3 -0
- package/dist/components/primitives/iris/iris-insight-truncated-text.js +33 -0
- package/dist/components/primitives/iris/iris.d.ts +3 -1
- package/dist/components/primitives/iris/iris.js +85 -91
- package/dist/components/primitives/iris/iris.types.d.ts +9 -0
- package/dist/components/primitives/stepper/internals/step-model.d.ts +1 -1
- package/dist/components/primitives/stepper/internals/step-model.js +5 -5
- package/dist/components/primitives/stepper/internals/stepper-compact.js +13 -13
- package/dist/components/primitives/stepper/internals/stepper-pipeline.js +6 -6
- package/dist/components/primitives/stepper/internals/stepper-rail.js +15 -15
- package/dist/components/primitives/stepper/internals/stepper-summary.js +7 -7
- package/dist/components/primitives/stepper/internals/stepper-track.js +2 -2
- package/dist/components/primitives/stepper/stepper.js +99 -97
- package/dist/components/primitives/stepper/stepper.types.d.ts +4 -0
- package/dist/components/primitives/tabs/folder-tab-path.d.ts +6 -0
- package/dist/components/primitives/tabs/folder-tab-path.js +16 -0
- package/dist/components/primitives/tabs/tabs.js +178 -112
- package/dist/components/primitives/tabs/tabs.types.d.ts +1 -1
- package/dist/form-react/Fields/SelectField.js +66 -57
- package/dist/form-react/Fields/VirtualizedListField.d.ts +3 -0
- package/dist/form-react/Fields/VirtualizedListField.js +223 -0
- package/dist/form-react/fields.d.ts +1 -0
- package/dist/form-react/fields.js +28 -26
- package/dist/form-react/index.d.ts +1 -1
- package/dist/form-react/registry/defaultFieldRegistrations.d.ts +1 -1
- package/dist/form-react/registry/defaultFieldRegistrations.js +13 -12
- package/dist/form-react/types/fields.types.d.ts +48 -1
- package/dist/form-react/types/fieldsOutput.types.d.ts +4 -1
- package/dist/form-react/types/reactHookForm.types.d.ts +18 -1
- package/dist/form-react/utils/fieldDefaults.utils.js +1 -1
- package/dist/i18n/defaultMessages.d.ts +75 -0
- package/dist/i18n/defaultMessages.js +112 -42
- package/dist/i18n/impact-nova-i18n-defaults.d.ts +5 -0
- package/dist/i18n/impact-nova-i18n-defaults.js +4 -9
- package/dist/i18n/index.d.ts +1 -1
- package/dist/i18n/locales/de.js +71 -1
- package/dist/i18n/locales/es.js +71 -1
- package/dist/i18n/locales/hi.js +71 -1
- package/dist/i18n/locales/kn.js +71 -1
- package/dist/impact-nova-components.css +372 -14
- package/dist/impact-nova-tokens.scss +4 -0
- package/dist/impact-nova.css +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.js +627 -601
- package/dist/lib/alphabetical-sort.d.ts +3 -0
- package/dist/lib/alphabetical-sort.js +13 -0
- package/dist/lib/guidance/engine/guidance-engine.js +26 -27
- package/dist/lib/guidance/engine/step-navigation.d.ts +1 -0
- package/dist/lib/guidance/engine/step-navigation.js +16 -9
- package/dist/lib/guidance/types/guidance.types.d.ts +9 -1
- package/dist/lib/virtualized/index.d.ts +2 -0
- package/dist/lib/virtualized/index.js +35 -31
- package/dist/lib/virtualized/list-index.d.ts +5 -0
- package/dist/lib/virtualized/list-index.js +13 -0
- package/dist/lib/virtualized/read-infinite-query-list.d.ts +14 -0
- package/dist/lib/virtualized/read-infinite-query-list.js +12 -0
- package/dist/lib/virtualized/types.d.ts +4 -2
- package/dist/lib/virtualized/useRowState.js +60 -56
- package/dist/lib/virtualized/useVirtualizedList.d.ts +5 -0
- package/dist/llms/rules/ag-grid.js +1 -1
- package/dist/llms/rules/installation.js +1 -1
- package/dist/llms/rules/real-world-patterns.js +1 -1
- package/dist/llms/rules/requirements.js +1 -1
- package/dist/tailwind.config.js +3 -0
- package/dist/theme/tailwind-colors.js +3 -0
- package/package.json +27 -4
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
export type AlphabeticalSortDirection = "none" | "asc" | "desc";
|
|
2
|
+
export declare function nextAlphabeticalSortDirection(current: AlphabeticalSortDirection): AlphabeticalSortDirection;
|
|
3
|
+
export declare function compareAlphabeticalValues(left: string, right: string, direction: AlphabeticalSortDirection): number;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
function t(e) {
|
|
2
|
+
return e === "none" ? "asc" : e === "asc" ? "desc" : "none";
|
|
3
|
+
}
|
|
4
|
+
function a(e, o, n) {
|
|
5
|
+
if (n === "none")
|
|
6
|
+
return 0;
|
|
7
|
+
const r = e.localeCompare(o);
|
|
8
|
+
return n === "desc" ? -r : r;
|
|
9
|
+
}
|
|
10
|
+
export {
|
|
11
|
+
a as compareAlphabeticalValues,
|
|
12
|
+
t as nextAlphabeticalSortDirection
|
|
13
|
+
};
|
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import { GuideRegistry as
|
|
2
|
-
import { getStepIndex as u,
|
|
3
|
-
import { TriggerPluginRegistry as
|
|
1
|
+
import { GuideRegistry as f } from "./guide-registry.js";
|
|
2
|
+
import { getStepIndex as u, canGoBackFromStep as c, getNextStepId as g, getStepById as h, resolveLocalizedStepContent as v } from "./step-navigation.js";
|
|
3
|
+
import { TriggerPluginRegistry as m } from "../triggers/trigger-registry.js";
|
|
4
4
|
import { registerBuiltInTriggerPlugins as w } from "../triggers/built-in-triggers.js";
|
|
5
|
-
import { TargetResolver as
|
|
6
|
-
import { GuidanceTargetRefRegistry as
|
|
7
|
-
import { buildGuidanceStorageKey as r, buildSessionStatsKey as
|
|
8
|
-
class
|
|
5
|
+
import { TargetResolver as I, resolveTargetSynchronously as y, waitForTargetResolved as R } from "../targets/target-resolver.js";
|
|
6
|
+
import { GuidanceTargetRefRegistry as G } from "../targets/ref-registry.js";
|
|
7
|
+
import { buildGuidanceStorageKey as r, buildSessionStatsKey as l, createDefaultSessionStats as k } from "../storage/storage-keys.js";
|
|
8
|
+
class D {
|
|
9
9
|
sessionState = { status: "idle" };
|
|
10
10
|
activationToken = 0;
|
|
11
11
|
listeners = /* @__PURE__ */ new Set();
|
|
12
12
|
eventHandlers = /* @__PURE__ */ new Map();
|
|
13
|
-
guideRegistry = new
|
|
14
|
-
triggerRegistry = new
|
|
15
|
-
targetRefRegistry = new
|
|
13
|
+
guideRegistry = new f();
|
|
14
|
+
triggerRegistry = new m();
|
|
15
|
+
targetRefRegistry = new G();
|
|
16
16
|
targetResolver;
|
|
17
17
|
guideQueue = [];
|
|
18
18
|
previewMode = !1;
|
|
@@ -27,7 +27,7 @@ class _ {
|
|
|
27
27
|
cachedRenderInstruction = null;
|
|
28
28
|
config;
|
|
29
29
|
constructor(t) {
|
|
30
|
-
this.config = t, this.targetResolver = new
|
|
30
|
+
this.config = t, this.targetResolver = new I(this.targetRefRegistry), w(this.triggerRegistry), this.consentGranted = !t.consentRequired;
|
|
31
31
|
}
|
|
32
32
|
get state() {
|
|
33
33
|
return this.sessionState;
|
|
@@ -150,7 +150,7 @@ class _ {
|
|
|
150
150
|
if (!s)
|
|
151
151
|
return;
|
|
152
152
|
const i = u(s, e);
|
|
153
|
-
i <= 0 || s
|
|
153
|
+
i <= 0 || c(s, i) && await this.activateGuide(s, i - 1);
|
|
154
154
|
}
|
|
155
155
|
async goToStep(t) {
|
|
156
156
|
const e = this.sessionState.guideId;
|
|
@@ -170,7 +170,7 @@ class _ {
|
|
|
170
170
|
if (!s)
|
|
171
171
|
return;
|
|
172
172
|
this.track("step.completed", { guideId: t, stepId: e });
|
|
173
|
-
const i = await
|
|
173
|
+
const i = await g(
|
|
174
174
|
s,
|
|
175
175
|
e,
|
|
176
176
|
(a) => this.triggerRegistry.evaluateExpression(a, this.buildTriggerContext())
|
|
@@ -197,7 +197,7 @@ class _ {
|
|
|
197
197
|
if (!t || !e || this.sessionState.status !== "active")
|
|
198
198
|
return;
|
|
199
199
|
const s = this.guideRegistry.get(t);
|
|
200
|
-
!s || !
|
|
200
|
+
!s || !h(s, e)?.skippable || await this.moveToFollowingStep();
|
|
201
201
|
}
|
|
202
202
|
/**
|
|
203
203
|
* Leaves a step whose target will not appear, including while the engine is
|
|
@@ -215,7 +215,7 @@ class _ {
|
|
|
215
215
|
if (!s)
|
|
216
216
|
return;
|
|
217
217
|
this.track("step.skipped", { guideId: t, stepId: e });
|
|
218
|
-
const i = await
|
|
218
|
+
const i = await g(
|
|
219
219
|
s,
|
|
220
220
|
e,
|
|
221
221
|
(a) => this.triggerRegistry.evaluateExpression(a, this.buildTriggerContext())
|
|
@@ -235,23 +235,22 @@ class _ {
|
|
|
235
235
|
this.cachedRenderInstruction = null;
|
|
236
236
|
return;
|
|
237
237
|
}
|
|
238
|
-
const t = this.guideRegistry.get(this.sessionState.guideId), e = t ?
|
|
238
|
+
const t = this.guideRegistry.get(this.sessionState.guideId), e = t ? h(t, this.sessionState.stepId) : void 0;
|
|
239
239
|
if (!t || !e) {
|
|
240
240
|
this.cachedRenderInstruction = null;
|
|
241
241
|
return;
|
|
242
242
|
}
|
|
243
|
-
const s = this.sessionState.stepIndex > 0 ? t.steps[this.sessionState.stepIndex - 1] : void 0;
|
|
244
243
|
this.cachedRenderInstruction = {
|
|
245
244
|
guideId: t.id,
|
|
246
245
|
stepId: e.id,
|
|
247
246
|
stepIndex: this.sessionState.stepIndex,
|
|
248
247
|
totalSteps: t.steps.length,
|
|
249
248
|
renderer: e.renderer,
|
|
250
|
-
content:
|
|
249
|
+
content: v(t, e, this.config.locale),
|
|
251
250
|
target: this.sessionState.resolvedTarget ?? null,
|
|
252
251
|
skippable: e.skippable,
|
|
253
252
|
advanceOn: e.advanceOn,
|
|
254
|
-
canGoBack:
|
|
253
|
+
canGoBack: c(t, this.sessionState.stepIndex),
|
|
255
254
|
placement: e.placement ?? "auto",
|
|
256
255
|
modalBehavior: e.modalBehavior,
|
|
257
256
|
interactionFooter: e.interactionFooter
|
|
@@ -286,7 +285,7 @@ class _ {
|
|
|
286
285
|
}
|
|
287
286
|
let n = null;
|
|
288
287
|
if (i.target) {
|
|
289
|
-
if (n =
|
|
288
|
+
if (n = y(
|
|
290
289
|
this.targetResolver,
|
|
291
290
|
i.target
|
|
292
291
|
), n?.element || (this.setSession({
|
|
@@ -294,7 +293,7 @@ class _ {
|
|
|
294
293
|
guideId: t.id,
|
|
295
294
|
stepIndex: e,
|
|
296
295
|
stepId: i.id
|
|
297
|
-
}), n = await
|
|
296
|
+
}), n = await R(
|
|
298
297
|
this.targetResolver,
|
|
299
298
|
i.target,
|
|
300
299
|
i.timeout ?? 5e3,
|
|
@@ -394,8 +393,8 @@ class _ {
|
|
|
394
393
|
if (a && Date.now() < a || (e.dismissedCounts[t.id] ?? 0) >= 3 && t.persistence.mode === "showOnce")
|
|
395
394
|
return !1;
|
|
396
395
|
if (t.persistence.schedule) {
|
|
397
|
-
const o = Date.now(),
|
|
398
|
-
if (o <
|
|
396
|
+
const o = Date.now(), p = Date.parse(t.persistence.schedule.start), S = Date.parse(t.persistence.schedule.end);
|
|
397
|
+
if (o < p || o > S)
|
|
399
398
|
return !1;
|
|
400
399
|
}
|
|
401
400
|
return this.triggerRegistry.evaluateAll(
|
|
@@ -433,12 +432,12 @@ class _ {
|
|
|
433
432
|
await this.start(t);
|
|
434
433
|
}
|
|
435
434
|
async loadSessionStats() {
|
|
436
|
-
const t =
|
|
437
|
-
return (await this.config.storage.get([t]))[t] ??
|
|
435
|
+
const t = l(this.config.tenantId);
|
|
436
|
+
return (await this.config.storage.get([t]))[t] ?? k();
|
|
438
437
|
}
|
|
439
438
|
async saveSessionStats(t) {
|
|
440
439
|
await this.config.storage.set({
|
|
441
|
-
[
|
|
440
|
+
[l(this.config.tenantId)]: t
|
|
442
441
|
});
|
|
443
442
|
}
|
|
444
443
|
async hydrateVisitCounts(t) {
|
|
@@ -510,5 +509,5 @@ class _ {
|
|
|
510
509
|
}
|
|
511
510
|
}
|
|
512
511
|
export {
|
|
513
|
-
|
|
512
|
+
D as GuidanceEngine
|
|
514
513
|
};
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { GuideManifest, Step, TriggerExpression } from '../types/guidance.types';
|
|
2
2
|
export declare function getStepById(manifest: GuideManifest, stepId: string): Step | undefined;
|
|
3
3
|
export declare function getStepIndex(manifest: GuideManifest, stepId: string): number;
|
|
4
|
+
export declare function canGoBackFromStep(manifest: GuideManifest, stepIndex: number): boolean;
|
|
4
5
|
export declare function getNextStepId(manifest: GuideManifest, currentStepId: string, evaluateCondition: (expression: TriggerExpression) => Promise<boolean>): Promise<string | null>;
|
|
5
6
|
export declare function resolveLocalizedStepContent(manifest: GuideManifest, step: Step, locale: string): Step['content'];
|
|
@@ -4,13 +4,19 @@ function a(t, e) {
|
|
|
4
4
|
function c(t, e) {
|
|
5
5
|
return t.steps.findIndex((n) => n.id === e);
|
|
6
6
|
}
|
|
7
|
-
function l(t, e
|
|
7
|
+
function l(t, e) {
|
|
8
|
+
if (e <= 0 || t.steps.length <= 1)
|
|
9
|
+
return !1;
|
|
10
|
+
const n = t.steps[e];
|
|
11
|
+
return n?.showBack === !0 ? !0 : n?.showBack === !1 ? !1 : t.steps[e - 1]?.advanceOn === "click-next";
|
|
12
|
+
}
|
|
13
|
+
function f(t, e, n) {
|
|
8
14
|
const o = (t.transitions ?? []).filter(
|
|
9
15
|
(r) => r.from === e
|
|
10
16
|
);
|
|
11
17
|
if (!o.length) {
|
|
12
|
-
const r = c(t, e),
|
|
13
|
-
return Promise.resolve(
|
|
18
|
+
const r = c(t, e), i = t.steps[r + 1];
|
|
19
|
+
return Promise.resolve(i?.id ?? null);
|
|
14
20
|
}
|
|
15
21
|
return u(o, n);
|
|
16
22
|
}
|
|
@@ -21,14 +27,15 @@ async function u(t, e) {
|
|
|
21
27
|
return null;
|
|
22
28
|
}
|
|
23
29
|
function d(t, e, n) {
|
|
24
|
-
const
|
|
25
|
-
if (
|
|
26
|
-
return
|
|
27
|
-
const r = n.split("-")[0],
|
|
28
|
-
return
|
|
30
|
+
const s = t.locale[n], o = c(t, e.id);
|
|
31
|
+
if (s?.[o])
|
|
32
|
+
return s[o];
|
|
33
|
+
const r = n.split("-")[0], i = t.locale[r];
|
|
34
|
+
return i?.[o] ? i[o] : e.content;
|
|
29
35
|
}
|
|
30
36
|
export {
|
|
31
|
-
l as
|
|
37
|
+
l as canGoBackFromStep,
|
|
38
|
+
f as getNextStepId,
|
|
32
39
|
a as getStepById,
|
|
33
40
|
c as getStepIndex,
|
|
34
41
|
d as resolveLocalizedStepContent
|
|
@@ -76,6 +76,11 @@ export interface Step {
|
|
|
76
76
|
modalBehavior?: GuidanceModalBehavior;
|
|
77
77
|
/** Announcement renderer: `keybinding` shows shortcut hint footer instead of Next/Done. */
|
|
78
78
|
interactionFooter?: GuidanceInteractionFooter;
|
|
79
|
+
/**
|
|
80
|
+
* Overrides Back on this step. Omitted keeps the default (only after a previous
|
|
81
|
+
* `click-next` step). Ignored on the first step and on single-step guides.
|
|
82
|
+
*/
|
|
83
|
+
showBack?: boolean;
|
|
79
84
|
}
|
|
80
85
|
export interface StepTransition {
|
|
81
86
|
from: string;
|
|
@@ -157,7 +162,10 @@ export interface RenderInstruction {
|
|
|
157
162
|
target: ResolvedTarget | null;
|
|
158
163
|
skippable: boolean;
|
|
159
164
|
advanceOn: AdvanceCondition;
|
|
160
|
-
/**
|
|
165
|
+
/**
|
|
166
|
+
* Whether this step shows Back. Default: previous step used `click-next`.
|
|
167
|
+
* `Step.showBack` overrides that. Always false on the first step and single-step guides.
|
|
168
|
+
*/
|
|
161
169
|
canGoBack: boolean;
|
|
162
170
|
/** Explicit popover placement relative to the target. Defaults to 'auto'. */
|
|
163
171
|
placement: PopoverPlacement;
|
|
@@ -6,6 +6,8 @@ export { useVirtualizedRows, type UseVirtualizedRowsOptions } from './useVirtual
|
|
|
6
6
|
export { useVirtualizedList, type UseVirtualizedListOptions, type UseVirtualizedListResult, } from './useVirtualizedList';
|
|
7
7
|
export { buildSectionedFlatList, type DataSectionBlock, type HeaderSectionBlock, type SectionBlock, type SectionedFlatList, type SectionedFlatRow, } from './sectioned';
|
|
8
8
|
export { useDebouncedValue } from './useDebouncedValue';
|
|
9
|
+
export { nextVirtualizedListIndex } from './list-index';
|
|
10
|
+
export { readInfiniteQueryList } from './read-infinite-query-list';
|
|
9
11
|
export { createDirectionalRangeExtractor, createStickyStripRangeExtractor, type DirectionalRangeExtractorOptions, type VirtualScrollDirection, } from './directional-range-extractor';
|
|
10
12
|
export { useScrollSeekPaintedRange } from './useScrollSeekPaintedRange';
|
|
11
13
|
export { getResponsiveColumnCount, useResponsiveColumnCount, type ResponsiveColumnCountInput, type UseResponsiveColumnCountOptions, } from './useResponsiveColumnCount';
|
|
@@ -3,41 +3,45 @@ import { useDataSource as o } from "./useDataSource.js";
|
|
|
3
3
|
import { useRowState as s } from "./useRowState.js";
|
|
4
4
|
import { useVirtualizedRows as l } from "./useVirtualizedRows.js";
|
|
5
5
|
import { useVirtualizedList as n } from "./useVirtualizedList.js";
|
|
6
|
-
import { buildSectionedFlatList as
|
|
7
|
-
import { useDebouncedValue as
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
6
|
+
import { buildSectionedFlatList as x } from "./sectioned.js";
|
|
7
|
+
import { useDebouncedValue as V } from "./useDebouncedValue.js";
|
|
8
|
+
import { nextVirtualizedListIndex as L } from "./list-index.js";
|
|
9
|
+
import { readInfiniteQueryList as c } from "./read-infinite-query-list.js";
|
|
10
|
+
import { createDirectionalRangeExtractor as R, createStickyStripRangeExtractor as C } from "./directional-range-extractor.js";
|
|
11
|
+
import { useScrollSeekPaintedRange as w } from "./useScrollSeekPaintedRange.js";
|
|
12
|
+
import { getResponsiveColumnCount as D, useResponsiveColumnCount as b } from "./useResponsiveColumnCount.js";
|
|
13
|
+
import { useDataGridVirtualRows as v } from "./useDataGrid.js";
|
|
14
|
+
import { VirtualizedListProvider as F, useVirtualizedListContext as h } from "./virtualized-list-context.js";
|
|
15
|
+
import { getVisibleReadyRowIds as E } from "./virtualized-list-utils.js";
|
|
16
|
+
import { VirtualizedList as P, VirtualizedListContent as G, VirtualizedListFooter as Q, VirtualizedListHeader as j, VirtualizedListHeaderActions as q, VirtualizedListItem as B, VirtualizedListItemSkeleton as J, VirtualizedListSearch as K, VirtualizedListSelectAll as M, VirtualizedListShell as N, VirtualizedListViewport as O } from "./virtualized-list-parts.js";
|
|
15
17
|
export {
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
18
|
+
P as VirtualizedList,
|
|
19
|
+
G as VirtualizedListContent,
|
|
20
|
+
Q as VirtualizedListFooter,
|
|
21
|
+
j as VirtualizedListHeader,
|
|
22
|
+
q as VirtualizedListHeaderActions,
|
|
23
|
+
B as VirtualizedListItem,
|
|
24
|
+
J as VirtualizedListItemSkeleton,
|
|
25
|
+
F as VirtualizedListProvider,
|
|
26
|
+
K as VirtualizedListSearch,
|
|
27
|
+
M as VirtualizedListSelectAll,
|
|
28
|
+
N as VirtualizedListShell,
|
|
29
|
+
O as VirtualizedListViewport,
|
|
30
|
+
x as buildSectionedFlatList,
|
|
31
|
+
R as createDirectionalRangeExtractor,
|
|
32
|
+
C as createStickyStripRangeExtractor,
|
|
33
|
+
D as getResponsiveColumnCount,
|
|
32
34
|
r as getSelectionCountsFromState,
|
|
33
|
-
|
|
34
|
-
|
|
35
|
+
E as getVisibleReadyRowIds,
|
|
36
|
+
L as nextVirtualizedListIndex,
|
|
37
|
+
c as readInfiniteQueryList,
|
|
38
|
+
v as useDataGridVirtualRows,
|
|
35
39
|
o as useDataSource,
|
|
36
|
-
|
|
37
|
-
|
|
40
|
+
V as useDebouncedValue,
|
|
41
|
+
b as useResponsiveColumnCount,
|
|
38
42
|
s as useRowState,
|
|
39
|
-
|
|
43
|
+
w as useScrollSeekPaintedRange,
|
|
40
44
|
n as useVirtualizedList,
|
|
41
|
-
|
|
45
|
+
h as useVirtualizedListContext,
|
|
42
46
|
l as useVirtualizedRows
|
|
43
47
|
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
function r(e) {
|
|
2
|
+
if (!(e.itemCount <= 0)) {
|
|
3
|
+
if (e.key === "ArrowDown")
|
|
4
|
+
return Math.min(e.activeIndex + 1, e.itemCount - 1);
|
|
5
|
+
if (e.key === "ArrowUp")
|
|
6
|
+
return Math.max(e.activeIndex - 1, 0);
|
|
7
|
+
if (e.key === "Home") return 0;
|
|
8
|
+
if (e.key === "End") return e.itemCount - 1;
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
export {
|
|
12
|
+
r as nextVirtualizedListIndex
|
|
13
|
+
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Page-sized TanStack Query lists. For a windowed source, use `prefetchRange` instead of flattening.
|
|
3
|
+
*/
|
|
4
|
+
export declare function readInfiniteQueryList<TItem>(input: {
|
|
5
|
+
pages: readonly (readonly TItem[])[] | undefined;
|
|
6
|
+
hasNextPage?: boolean;
|
|
7
|
+
isFetchingNextPage?: boolean;
|
|
8
|
+
fetchNextPage?: () => void;
|
|
9
|
+
}): {
|
|
10
|
+
items: TItem[];
|
|
11
|
+
hasMore: boolean;
|
|
12
|
+
loadingMore: boolean;
|
|
13
|
+
onEndReached: (() => void) | undefined;
|
|
14
|
+
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
function s(e) {
|
|
2
|
+
const n = e.pages?.flat() ?? [], t = e.hasNextPage === !0, a = e.isFetchingNextPage === !0, o = e.fetchNextPage;
|
|
3
|
+
return {
|
|
4
|
+
items: n,
|
|
5
|
+
hasMore: t,
|
|
6
|
+
loadingMore: a,
|
|
7
|
+
onEndReached: t && !a && o ? o : void 0
|
|
8
|
+
};
|
|
9
|
+
}
|
|
10
|
+
export {
|
|
11
|
+
s as readInfiniteQueryList
|
|
12
|
+
};
|
|
@@ -62,10 +62,11 @@ export interface SelectionCounts {
|
|
|
62
62
|
}
|
|
63
63
|
/**
|
|
64
64
|
* - **`explicit`**: finite selection only — `selectedIds` is the source of truth (same as before).
|
|
65
|
+
* - **`single`**: one id. `toggleSelect` replaces the set. Select-all is a no-op.
|
|
65
66
|
* - **`selectAllWithExceptions`**: AG Grid–style SSRM selection — global `selectAll` + exception `toggledIds`
|
|
66
67
|
* without enumerating every row id (`isSelected` uses the inversion formula).
|
|
67
68
|
*/
|
|
68
|
-
export type RowSelectionMode = "explicit" | "selectAllWithExceptions";
|
|
69
|
+
export type RowSelectionMode = "explicit" | "single" | "selectAllWithExceptions";
|
|
69
70
|
export interface UseRowStateOptions {
|
|
70
71
|
/**
|
|
71
72
|
* @default "explicit"
|
|
@@ -122,7 +123,8 @@ export interface UseRowStateResult {
|
|
|
122
123
|
mergeSelectedIds: (ids: string[]) => void;
|
|
123
124
|
/**
|
|
124
125
|
* If every id is already selected, removes those ids in one update; otherwise adds all ids
|
|
125
|
-
* (same merge as {@link mergeSelectedIds}).
|
|
126
|
+
* (same merge as {@link mergeSelectedIds}). Ids outside the list stay selected.
|
|
127
|
+
* Pass the filtered id list, or the visible window. No-op in `single` mode.
|
|
126
128
|
*/
|
|
127
129
|
toggleSelectAll: (ids: ReadonlyArray<string>) => void;
|
|
128
130
|
clearSelection: () => void;
|
|
@@ -1,112 +1,116 @@
|
|
|
1
|
-
import { useState as b, useMemo as
|
|
1
|
+
import { useState as b, useMemo as v, useCallback as c } from "react";
|
|
2
2
|
import { getSelectionCountsFromState as J } from "./selection-counts.js";
|
|
3
|
-
function
|
|
3
|
+
function S(d) {
|
|
4
4
|
return d ? d instanceof Set ? new Set(d) : new Set(d) : /* @__PURE__ */ new Set();
|
|
5
5
|
}
|
|
6
6
|
function K(d) {
|
|
7
7
|
return (d.selectionMode ?? "explicit") === "selectAllWithExceptions" ? {
|
|
8
8
|
all: d.defaultSelectAll ?? !1,
|
|
9
|
-
toggled:
|
|
9
|
+
toggled: S(d.defaultToggledIds)
|
|
10
10
|
} : {
|
|
11
11
|
all: !1,
|
|
12
|
-
toggled:
|
|
12
|
+
toggled: S(d.defaultSelectedIds)
|
|
13
13
|
};
|
|
14
14
|
}
|
|
15
15
|
function O(d = {}) {
|
|
16
|
-
const
|
|
17
|
-
selectedIds:
|
|
16
|
+
const l = d.selectionMode ?? "explicit", {
|
|
17
|
+
selectedIds: a,
|
|
18
18
|
onSelectedIdsChange: h,
|
|
19
19
|
expandedIds: x,
|
|
20
|
-
onExpandedIdsChange:
|
|
20
|
+
onExpandedIdsChange: w,
|
|
21
21
|
defaultExpandedIds: R,
|
|
22
22
|
onSelectionStateChange: P,
|
|
23
|
-
selectAll:
|
|
24
|
-
toggledIds:
|
|
25
|
-
} = d, [I, A] = b(() => K(d)), [
|
|
26
|
-
() =>
|
|
27
|
-
), r = x !== void 0, E =
|
|
28
|
-
() =>
|
|
29
|
-
[
|
|
30
|
-
),
|
|
31
|
-
(e) =>
|
|
32
|
-
[
|
|
33
|
-
), F = c((e) => E.has(e), [E]),
|
|
23
|
+
selectAll: u,
|
|
24
|
+
toggledIds: p
|
|
25
|
+
} = d, [I, A] = b(() => K(d)), [m, y] = b(
|
|
26
|
+
() => S(R)
|
|
27
|
+
), r = x !== void 0, E = v(() => r ? S(x) : m, [r, x, m]), s = v(
|
|
28
|
+
() => l === "selectAllWithExceptions" ? u !== void 0 ? u : I.all : !1,
|
|
29
|
+
[l, u, I.all]
|
|
30
|
+
), n = v(() => l === "explicit" || l === "single" ? a !== void 0 ? S(a) : I.toggled : p !== void 0 ? S(p) : I.toggled, [l, a, p, I.toggled]), W = v(() => l === "explicit" || !s ? n : /* @__PURE__ */ new Set(), [l, s, n]), k = c(
|
|
31
|
+
(e) => s ? !n.has(e) : n.has(e),
|
|
32
|
+
[s, n]
|
|
33
|
+
), F = c((e) => E.has(e), [E]), f = c(
|
|
34
34
|
(e) => {
|
|
35
|
-
h?.(e),
|
|
35
|
+
h?.(e), a === void 0 && A((t) => ({ ...t, all: !1, toggled: e }));
|
|
36
36
|
},
|
|
37
|
-
[h,
|
|
37
|
+
[h, a]
|
|
38
38
|
), i = c(
|
|
39
39
|
(e) => {
|
|
40
|
-
P?.(e),
|
|
40
|
+
P?.(e), u === void 0 && p === void 0 ? A({ all: e.selectAll, toggled: e.toggledIds }) : p === void 0 ? A((t) => ({ ...t, toggled: e.toggledIds })) : u === void 0 && A((t) => ({ ...t, all: e.selectAll }));
|
|
41
41
|
},
|
|
42
|
-
[P,
|
|
42
|
+
[P, u, p]
|
|
43
43
|
), T = c(
|
|
44
44
|
(e) => {
|
|
45
|
-
|
|
46
|
-
|
|
45
|
+
if (l === "single") {
|
|
46
|
+
f(/* @__PURE__ */ new Set([e]));
|
|
47
|
+
return;
|
|
48
|
+
}
|
|
49
|
+
const t = new Set(n);
|
|
50
|
+
t.has(e) ? t.delete(e) : t.add(e), l === "explicit" ? f(t) : i({ selectAll: s, toggledIds: t });
|
|
47
51
|
},
|
|
48
|
-
[
|
|
52
|
+
[l, n, s, f, i]
|
|
49
53
|
), j = c(
|
|
50
54
|
(e) => {
|
|
51
|
-
const t = r ?
|
|
52
|
-
|
|
55
|
+
const t = r ? S(x) : m, o = new Set(t);
|
|
56
|
+
o.has(e) ? o.delete(e) : o.add(e), r ? w?.(o) : y(o);
|
|
53
57
|
},
|
|
54
|
-
[r, x,
|
|
58
|
+
[r, x, m, w]
|
|
55
59
|
), q = c(
|
|
56
60
|
(e) => {
|
|
57
|
-
const t = new Set(
|
|
58
|
-
for (const
|
|
59
|
-
|
|
60
|
-
|
|
61
|
+
const t = new Set(n);
|
|
62
|
+
for (const o of e)
|
|
63
|
+
s ? t.delete(o) : t.add(o);
|
|
64
|
+
l === "explicit" ? f(t) : i({ selectAll: s, toggledIds: t });
|
|
61
65
|
},
|
|
62
|
-
[
|
|
66
|
+
[l, n, s, f, i]
|
|
63
67
|
), z = c(
|
|
64
68
|
(e) => {
|
|
65
|
-
if (e.length === 0) return;
|
|
69
|
+
if (l === "single" || e.length === 0) return;
|
|
66
70
|
const t = e.every(
|
|
67
|
-
(
|
|
68
|
-
),
|
|
71
|
+
(g) => s ? !n.has(g) : n.has(g)
|
|
72
|
+
), o = new Set(n);
|
|
69
73
|
if (t)
|
|
70
|
-
for (const
|
|
71
|
-
|
|
74
|
+
for (const g of e)
|
|
75
|
+
s ? o.add(g) : o.delete(g);
|
|
72
76
|
else
|
|
73
|
-
for (const
|
|
74
|
-
|
|
75
|
-
|
|
77
|
+
for (const g of e)
|
|
78
|
+
s ? o.delete(g) : o.add(g);
|
|
79
|
+
l === "explicit" ? f(o) : i({ selectAll: s, toggledIds: o });
|
|
76
80
|
},
|
|
77
|
-
[
|
|
81
|
+
[l, s, n, f, i]
|
|
78
82
|
), C = c(() => {
|
|
79
83
|
const e = /* @__PURE__ */ new Set();
|
|
80
|
-
|
|
81
|
-
}, [
|
|
84
|
+
l === "explicit" ? (h?.(e), a === void 0 && A((t) => ({ ...t, all: !1, toggled: e }))) : i({ selectAll: !1, toggledIds: e });
|
|
85
|
+
}, [l, h, a, i]), B = c(
|
|
82
86
|
(e) => {
|
|
83
|
-
if (
|
|
87
|
+
if (l === "explicit") {
|
|
84
88
|
e || C();
|
|
85
89
|
return;
|
|
86
90
|
}
|
|
87
91
|
i({ selectAll: e, toggledIds: /* @__PURE__ */ new Set() });
|
|
88
92
|
},
|
|
89
|
-
[
|
|
93
|
+
[l, C, i]
|
|
90
94
|
), M = c(() => ({
|
|
91
|
-
selectAll:
|
|
92
|
-
toggledIds: new Set(
|
|
93
|
-
}), [
|
|
95
|
+
selectAll: s,
|
|
96
|
+
toggledIds: new Set(n)
|
|
97
|
+
}), [s, n]), D = c(
|
|
94
98
|
(e) => J(M(), e),
|
|
95
99
|
[M]
|
|
96
100
|
), G = c(
|
|
97
101
|
(e) => e.length === 0 ? !0 : e.every(
|
|
98
|
-
(t) =>
|
|
102
|
+
(t) => s ? !n.has(t) : n.has(t)
|
|
99
103
|
),
|
|
100
|
-
[
|
|
104
|
+
[s, n]
|
|
101
105
|
), H = c(() => {
|
|
102
106
|
const e = /* @__PURE__ */ new Set();
|
|
103
|
-
r ?
|
|
104
|
-
}, [r,
|
|
107
|
+
r ? w?.(e) : y(e);
|
|
108
|
+
}, [r, w]);
|
|
105
109
|
return {
|
|
106
|
-
selectionMode:
|
|
110
|
+
selectionMode: l,
|
|
107
111
|
selectedIds: W,
|
|
108
|
-
selectAll:
|
|
109
|
-
toggledIds:
|
|
112
|
+
selectAll: s,
|
|
113
|
+
toggledIds: n,
|
|
110
114
|
getSelectionState: M,
|
|
111
115
|
getSelectionCounts: D,
|
|
112
116
|
setSelectAll: B,
|
|
@@ -74,7 +74,12 @@ export interface UseVirtualizedListResult<TData, TScrollElement extends Element
|
|
|
74
74
|
* estimateSize: () => 52,
|
|
75
75
|
* onEndReached: fetchNextPage,
|
|
76
76
|
* hasMore,
|
|
77
|
+
* selectionMode: "single",
|
|
77
78
|
* });
|
|
79
|
+
* list.rowState.toggleSelect(id);
|
|
80
|
+
* list.rowState.toggleSelectAll(filteredIds);
|
|
78
81
|
* ```
|
|
82
|
+
*
|
|
83
|
+
* `readInfiniteQueryList` flattens TanStack Query pages into `items`, `hasMore`, and `onEndReached`.
|
|
79
84
|
*/
|
|
80
85
|
export declare function useVirtualizedList<TData, TScrollElement extends Element = HTMLDivElement, TItemElement extends Element = HTMLDivElement>(options: UseVirtualizedListOptions<TData, TScrollElement, TItemElement>): UseVirtualizedListResult<TData, TScrollElement, TItemElement>;
|