impact-nova 3.0.0-alpha.2 → 3.0.0-alpha.20
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/_virtual/index.js +4 -4
- package/dist/_virtual/index2.js +4 -4
- 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 +48 -45
- 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-scatter3d.d.ts +39 -0
- package/dist/components/data-display/chart/chart-scatter3d.js +180 -0
- package/dist/components/data-display/chart/chart.js +125 -112
- package/dist/components/data-display/chart/chart.utils.js +122 -92
- 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 +69 -0
- package/dist/i18n/defaultMessages.js +107 -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 +66 -1
- package/dist/i18n/locales/es.js +66 -1
- package/dist/i18n/locales/hi.js +66 -1
- package/dist/i18n/locales/kn.js +66 -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/node_modules/hast-util-to-jsx-runtime/lib/index.js +1 -1
- package/dist/node_modules/unified/lib/index.js +1 -1
- package/dist/tailwind.config.js +3 -0
- package/dist/theme/tailwind-colors.js +3 -0
- package/package.json +23 -4
|
@@ -1,61 +1,59 @@
|
|
|
1
|
-
import { jsx as t, jsxs as
|
|
1
|
+
import { jsx as t, jsxs as b } from "react/jsx-runtime";
|
|
2
2
|
import { Cross as N, ChevronRight as D } from "impact-nova-icons";
|
|
3
|
-
import { cn as
|
|
3
|
+
import { cn as o } from "../../../../lib/utils.js";
|
|
4
4
|
import { selectTriggerVariants as j } from "../../../forms/select/select.variants.js";
|
|
5
|
-
|
|
5
|
+
import { readColDefEditable as C } from "../editable-utils.js";
|
|
6
|
+
const V = (c) => {
|
|
6
7
|
const {
|
|
7
|
-
value:
|
|
8
|
-
options:
|
|
9
|
-
placeholder:
|
|
10
|
-
disabled:
|
|
11
|
-
isClearable:
|
|
8
|
+
value: e,
|
|
9
|
+
options: h = [],
|
|
10
|
+
placeholder: x = "Select...",
|
|
11
|
+
disabled: a,
|
|
12
|
+
isClearable: g = !0,
|
|
12
13
|
triggerClassName: w,
|
|
13
|
-
colDef:
|
|
14
|
-
data:
|
|
14
|
+
colDef: d,
|
|
15
|
+
data: i,
|
|
15
16
|
setValue: v
|
|
16
|
-
} =
|
|
17
|
-
let
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
}
|
|
22
|
-
const n = l && typeof l == "object" && "value" in l ? l.value : l, u = g.find((a) => a.value === String(n ?? ""))?.label ?? (n != null && n !== "" ? String(n) : ""), c = !u, y = x && e && !c && !i, p = (a) => {
|
|
23
|
-
a.preventDefault(), a.stopPropagation(), v?.(null);
|
|
17
|
+
} = c, f = e && typeof e == "object" && "cellMetadata" in e ? e.cellMetadata?._isDisabled : void 0, m = i && typeof i == "object" && "rowMetadata" in i ? i.rowMetadata?._isDisabled : void 0;
|
|
18
|
+
let l = !1;
|
|
19
|
+
a || (d?.editable === !1 ? l = !1 : f === !1 ? l = !0 : f === !0 ? l = !1 : m === !1 ? l = !0 : m === !0 ? l = !1 : l = C(d, c));
|
|
20
|
+
const s = e && typeof e == "object" && "value" in e ? e.value : e, u = h.find((n) => n.value === String(s ?? ""))?.label ?? (s != null && s !== "" ? String(s) : ""), r = !u, y = g && l && !r && !a, p = (n) => {
|
|
21
|
+
n.preventDefault(), n.stopPropagation(), v?.(null);
|
|
24
22
|
};
|
|
25
23
|
return /* @__PURE__ */ t(
|
|
26
24
|
"div",
|
|
27
25
|
{
|
|
28
|
-
className:
|
|
26
|
+
className: o(
|
|
29
27
|
"flex h-full w-full min-w-0 items-center ag-cell-inner-padding",
|
|
30
|
-
|
|
31
|
-
!
|
|
28
|
+
a && "cursor-not-allowed opacity-60",
|
|
29
|
+
!a && l && "in-ag-editable-cell-highlight"
|
|
32
30
|
),
|
|
33
|
-
children: /* @__PURE__ */ t("div", { className:
|
|
31
|
+
children: /* @__PURE__ */ t("div", { className: o("min-w-0 flex-1", w), children: /* @__PURE__ */ t(
|
|
34
32
|
"div",
|
|
35
33
|
{
|
|
36
|
-
className:
|
|
34
|
+
className: o(
|
|
37
35
|
j({
|
|
38
36
|
size: "default",
|
|
39
37
|
error: !1,
|
|
40
|
-
disabled: !!
|
|
41
|
-
readOnly: !
|
|
38
|
+
disabled: !!a,
|
|
39
|
+
readOnly: !l,
|
|
42
40
|
open: !1
|
|
43
41
|
}),
|
|
44
42
|
"w-full max-w-full"
|
|
45
43
|
),
|
|
46
44
|
"data-component": "select-trigger",
|
|
47
|
-
children: /* @__PURE__ */
|
|
45
|
+
children: /* @__PURE__ */ b("div", { className: "flex w-full min-w-0 max-w-full items-center justify-between", children: [
|
|
48
46
|
/* @__PURE__ */ t(
|
|
49
47
|
"span",
|
|
50
48
|
{
|
|
51
|
-
className:
|
|
49
|
+
className: o(
|
|
52
50
|
"block min-w-0 truncate text-[14px] text-content",
|
|
53
|
-
|
|
51
|
+
r ? "font-normal text-content-placeholder" : "font-normal"
|
|
54
52
|
),
|
|
55
|
-
children:
|
|
53
|
+
children: r ? x : u
|
|
56
54
|
}
|
|
57
55
|
),
|
|
58
|
-
|
|
56
|
+
/* @__PURE__ */ b("div", { className: "flex shrink-0 items-center gap-1 text-content-icon", children: [
|
|
59
57
|
y ? /* @__PURE__ */ t(
|
|
60
58
|
"span",
|
|
61
59
|
{
|
|
@@ -76,14 +74,14 @@ const C = (b) => {
|
|
|
76
74
|
className: "rotate-90 shrink-0"
|
|
77
75
|
}
|
|
78
76
|
)
|
|
79
|
-
] })
|
|
77
|
+
] })
|
|
80
78
|
] })
|
|
81
79
|
}
|
|
82
80
|
) })
|
|
83
81
|
}
|
|
84
82
|
);
|
|
85
83
|
};
|
|
86
|
-
|
|
84
|
+
V.displayName = "ListSelectDisplayRenderer";
|
|
87
85
|
export {
|
|
88
|
-
|
|
86
|
+
V as ListSelectDisplayRenderer
|
|
89
87
|
};
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { jsxs as p, jsx as s } from "react/jsx-runtime";
|
|
2
2
|
import { LoadingSpinner as N, ChevronRight as R } from "impact-nova-icons";
|
|
3
3
|
import { cn as f } from "../../../../lib/utils.js";
|
|
4
|
-
import {
|
|
5
|
-
|
|
4
|
+
import { readColDefEditable as F } from "../editable-utils.js";
|
|
5
|
+
import { SelectAiInsightAffordance as C } from "./select-ai-insight-affordance.js";
|
|
6
|
+
function E(e) {
|
|
6
7
|
if (e && typeof e == "object" && "cellMetadata" in e)
|
|
7
8
|
return e.cellMetadata;
|
|
8
9
|
}
|
|
@@ -10,16 +11,16 @@ function A(e) {
|
|
|
10
11
|
if (e && typeof e == "object" && "rowMetadata" in e)
|
|
11
12
|
return e.rowMetadata;
|
|
12
13
|
}
|
|
13
|
-
function
|
|
14
|
-
return e.isLoading === !0 ||
|
|
14
|
+
function g(e) {
|
|
15
|
+
return e.isLoading === !0 || E(e.value)?.isLoading === !0 ? !0 : A(e.data)?.isLoading === !0;
|
|
15
16
|
}
|
|
16
|
-
function
|
|
17
|
+
function I(e) {
|
|
17
18
|
const { value: t, data: a, disabled: d, colDef: i } = e;
|
|
18
|
-
if (d ||
|
|
19
|
-
const n = t && typeof t == "object" && "cellMetadata" in t ? t.cellMetadata?._isDisabled : void 0, l = a && typeof a == "object" && "rowMetadata" in a ? a.rowMetadata?._isDisabled : void 0
|
|
20
|
-
return i?.editable === !1 ? !1 : n === !1 ? !0 : n === !0 ? !1 : l === !1 ? !0 : l === !0 ? !1 :
|
|
19
|
+
if (d || g(e)) return !1;
|
|
20
|
+
const n = t && typeof t == "object" && "cellMetadata" in t ? t.cellMetadata?._isDisabled : void 0, l = a && typeof a == "object" && "rowMetadata" in a ? a.rowMetadata?._isDisabled : void 0;
|
|
21
|
+
return i?.editable === !1 ? !1 : n === !1 ? !0 : n === !0 ? !1 : l === !1 ? !0 : l === !0 ? !1 : F(i, e);
|
|
21
22
|
}
|
|
22
|
-
const
|
|
23
|
+
const O = (e) => {
|
|
23
24
|
const {
|
|
24
25
|
value: t,
|
|
25
26
|
options: a = [],
|
|
@@ -27,13 +28,13 @@ const I = (e) => {
|
|
|
27
28
|
disabled: i,
|
|
28
29
|
data: n,
|
|
29
30
|
showAiInsight: l,
|
|
30
|
-
aiInsightField:
|
|
31
|
+
aiInsightField: h,
|
|
31
32
|
confidenceScore: v,
|
|
32
33
|
confidenceScoreField: y,
|
|
33
34
|
confidenceReason: w,
|
|
34
35
|
confidenceReasonField: x,
|
|
35
36
|
confidenceLabel: S
|
|
36
|
-
} = e, o =
|
|
37
|
+
} = e, o = g(e), r = I(e), M = r || o, u = t && typeof t == "object" && "value" in t, j = u ? t.cellMetadata : void 0, c = u ? t.value : t, b = a.find((L) => L.value === String(c ?? ""))?.label ?? (c != null && c !== "" ? String(c) : ""), m = !b, D = n && typeof n == "object" ? n : null;
|
|
37
38
|
return /* @__PURE__ */ p(
|
|
38
39
|
"div",
|
|
39
40
|
{
|
|
@@ -60,9 +61,9 @@ const I = (e) => {
|
|
|
60
61
|
{
|
|
61
62
|
className: f(
|
|
62
63
|
"truncate text-sm font-medium text-content",
|
|
63
|
-
|
|
64
|
+
m && "text-content-empty"
|
|
64
65
|
),
|
|
65
|
-
children:
|
|
66
|
+
children: m ? d : b
|
|
66
67
|
}
|
|
67
68
|
),
|
|
68
69
|
o ? /* @__PURE__ */ s(N, { size: "14px", className: "shrink-0 text-content-icon" }) : r ? /* @__PURE__ */ s(R, { className: "h-3.5 w-3.5 shrink-0 rotate-90 text-content-icon" }) : null
|
|
@@ -70,10 +71,10 @@ const I = (e) => {
|
|
|
70
71
|
}
|
|
71
72
|
),
|
|
72
73
|
/* @__PURE__ */ s(
|
|
73
|
-
|
|
74
|
+
C,
|
|
74
75
|
{
|
|
75
76
|
showAiInsight: l,
|
|
76
|
-
aiInsightField:
|
|
77
|
+
aiInsightField: h,
|
|
77
78
|
confidenceScore: v,
|
|
78
79
|
confidenceScoreField: y,
|
|
79
80
|
confidenceReason: w,
|
|
@@ -87,7 +88,7 @@ const I = (e) => {
|
|
|
87
88
|
}
|
|
88
89
|
);
|
|
89
90
|
};
|
|
90
|
-
|
|
91
|
+
O.displayName = "SelectDisplayRenderer";
|
|
91
92
|
export {
|
|
92
|
-
|
|
93
|
+
O as SelectDisplayRenderer
|
|
93
94
|
};
|
package/dist/components/data/ag-grid-react/cell-renderers/style-description-display-renderer.d.ts
CHANGED
|
@@ -23,18 +23,12 @@ export interface StyleDescriptionDisplayRendererProps extends ICellRendererParam
|
|
|
23
23
|
* StyleDescriptionDisplayRenderer — swatch + label + thumbnail in one cell.
|
|
24
24
|
*
|
|
25
25
|
* Matches Hindsight By Item “Style Description” (color chip, style name,
|
|
26
|
-
* product image with empty fallback). Display-only
|
|
26
|
+
* product image with empty fallback and hover preview). Display-only.
|
|
27
27
|
*
|
|
28
|
-
*
|
|
29
|
-
*
|
|
30
|
-
* {
|
|
31
|
-
*
|
|
32
|
-
* cellRenderer: StyleDescriptionDisplayRenderer,
|
|
33
|
-
* cellClass: AG_CELL_NO_PADDING,
|
|
34
|
-
* // value: { label: 'Ribbed Jeans', swatchColor: '#7f1d1d', imageUrl: '...' }
|
|
35
|
-
* // or cellRendererParams: { labelField, swatchColorField, imageUrlField }
|
|
36
|
-
* }
|
|
37
|
-
* ```
|
|
28
|
+
* Cell value can be:
|
|
29
|
+
* - `{ label, swatchColor, imageUrl }`
|
|
30
|
+
* - backend `{ value, color: { value }, image: { url } }`
|
|
31
|
+
* - a string plus `cellRendererParams` field names
|
|
38
32
|
*/
|
|
39
33
|
export declare const StyleDescriptionDisplayRenderer: {
|
|
40
34
|
(props: StyleDescriptionDisplayRendererProps): import("react/jsx-runtime").JSX.Element;
|
package/dist/components/data/ag-grid-react/cell-renderers/style-description-display-renderer.js
CHANGED
|
@@ -1,86 +1,162 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { Image as
|
|
3
|
-
import { Avatar as
|
|
4
|
-
import {
|
|
5
|
-
import
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
1
|
+
import { jsx as o, jsxs as p } from "react/jsx-runtime";
|
|
2
|
+
import { Image as y } from "impact-nova-icons";
|
|
3
|
+
import { Avatar as b, AvatarImage as v, AvatarFallback as w } from "../../../data-display/avatar/avatar.js";
|
|
4
|
+
import { HoverCard as A, HoverCardTrigger as x, HoverCardContent as C } from "../../../feedback/hover-card/hover-card.js";
|
|
5
|
+
import "react";
|
|
6
|
+
import { OverflowTooltip as N } from "../../../feedback/tooltip/overflow-tooltip.js";
|
|
7
|
+
import { cn as f } from "../../../../lib/utils.js";
|
|
8
|
+
import { getFieldValue as g } from "./cell-renderer-utils.js";
|
|
9
|
+
function a(t) {
|
|
10
|
+
if (typeof t != "string")
|
|
11
|
+
return;
|
|
12
|
+
const r = t.trim();
|
|
13
|
+
return r.length > 0 ? r : void 0;
|
|
14
|
+
}
|
|
15
|
+
function u(t, r, e) {
|
|
16
|
+
const n = t[r], i = a(n);
|
|
17
|
+
if (i)
|
|
18
|
+
return i;
|
|
19
|
+
if (!(!n || typeof n != "object" || Array.isArray(n)))
|
|
20
|
+
return a(n[e]);
|
|
21
|
+
}
|
|
22
|
+
function D(t) {
|
|
23
|
+
const { value: r, data: e } = t;
|
|
24
|
+
if (r && typeof r == "object" && !Array.isArray(r)) {
|
|
25
|
+
const i = r, l = i.value;
|
|
26
|
+
if (l && typeof l == "object" && !Array.isArray(l)) {
|
|
27
|
+
const s = l;
|
|
28
|
+
return {
|
|
29
|
+
label: a(s.label) ?? a(s.value),
|
|
30
|
+
swatchColor: a(s.swatchColor) ?? u(s, "color", "value"),
|
|
31
|
+
imageUrl: a(s.imageUrl) ?? u(s, "image", "url"),
|
|
32
|
+
imageAlt: a(s.imageAlt)
|
|
33
|
+
};
|
|
34
|
+
}
|
|
35
|
+
const m = a(i.label) ?? a(i.value), c = a(i.swatchColor) ?? u(i, "color", "value"), d = a(i.imageUrl) ?? u(i, "image", "url"), h = a(i.imageAlt);
|
|
36
|
+
if (m || c || d)
|
|
37
|
+
return { label: m, swatchColor: c, imageUrl: d, imageAlt: h };
|
|
14
38
|
}
|
|
15
|
-
const
|
|
39
|
+
const n = typeof r == "string" || typeof r == "number" ? String(r) : void 0;
|
|
16
40
|
return {
|
|
17
|
-
label:
|
|
18
|
-
swatchColor:
|
|
19
|
-
imageUrl:
|
|
20
|
-
imageAlt:
|
|
41
|
+
label: g(t.labelField, n, e) ?? void 0,
|
|
42
|
+
swatchColor: g(t.swatchColorField, void 0, e) ?? void 0,
|
|
43
|
+
imageUrl: g(t.imageUrlField, void 0, e) ?? void 0,
|
|
44
|
+
imageAlt: g(t.imageAltField, void 0, e) ?? void 0
|
|
21
45
|
};
|
|
22
46
|
}
|
|
23
|
-
|
|
24
|
-
const
|
|
25
|
-
|
|
47
|
+
function U(t) {
|
|
48
|
+
const r = /* @__PURE__ */ p(
|
|
49
|
+
b,
|
|
50
|
+
{
|
|
51
|
+
size: "sm",
|
|
52
|
+
shape: "square",
|
|
53
|
+
className: "rounded-md text-[0]",
|
|
54
|
+
"data-component": "style-description-image",
|
|
55
|
+
children: [
|
|
56
|
+
t.imageUrl ? /* @__PURE__ */ o(v, { src: t.imageUrl, alt: t.imageAlt }) : null,
|
|
57
|
+
/* @__PURE__ */ o(w, { className: "rounded-md bg-muted text-content-icon", children: /* @__PURE__ */ o(y, { "aria-hidden": !0, className: "text-content-icon" }) })
|
|
58
|
+
]
|
|
59
|
+
}
|
|
60
|
+
);
|
|
61
|
+
return t.imageUrl ? /* @__PURE__ */ p(A, { openDelay: 200, closeDelay: 150, children: [
|
|
62
|
+
/* @__PURE__ */ o(x, { asChild: !0, children: /* @__PURE__ */ o(
|
|
63
|
+
"button",
|
|
64
|
+
{
|
|
65
|
+
type: "button",
|
|
66
|
+
className: "shrink-0 overflow-hidden rounded-md border-0 bg-transparent p-0",
|
|
67
|
+
"aria-label": t.imageAlt,
|
|
68
|
+
"data-component": "style-description-image-trigger",
|
|
69
|
+
onMouseDown: (e) => {
|
|
70
|
+
e.preventDefault(), e.stopPropagation();
|
|
71
|
+
},
|
|
72
|
+
onClick: (e) => {
|
|
73
|
+
e.preventDefault(), e.stopPropagation();
|
|
74
|
+
},
|
|
75
|
+
onPointerDown: (e) => e.stopPropagation(),
|
|
76
|
+
children: r
|
|
77
|
+
}
|
|
78
|
+
) }),
|
|
79
|
+
/* @__PURE__ */ o(
|
|
80
|
+
C,
|
|
81
|
+
{
|
|
82
|
+
side: "right",
|
|
83
|
+
align: "start",
|
|
84
|
+
sideOffset: 7,
|
|
85
|
+
className: "w-auto border-0 bg-canvas p-1.5 shadow-md",
|
|
86
|
+
"data-component": "style-description-image-preview",
|
|
87
|
+
onMouseDown: (e) => e.stopPropagation(),
|
|
88
|
+
onClick: (e) => e.stopPropagation(),
|
|
89
|
+
onPointerDown: (e) => e.stopPropagation(),
|
|
90
|
+
children: /* @__PURE__ */ o(
|
|
91
|
+
"img",
|
|
92
|
+
{
|
|
93
|
+
src: t.imageUrl,
|
|
94
|
+
alt: t.imageAlt,
|
|
95
|
+
width: 200,
|
|
96
|
+
height: 200,
|
|
97
|
+
className: "size-[200px] rounded-lg object-cover"
|
|
98
|
+
}
|
|
99
|
+
)
|
|
100
|
+
}
|
|
101
|
+
)
|
|
102
|
+
] }) : r;
|
|
103
|
+
}
|
|
104
|
+
const k = (t) => {
|
|
105
|
+
const { className: r, emptyLabel: e = "—" } = t, { label: n, swatchColor: i, imageUrl: l, imageAlt: m } = D(t), c = n != null && String(n).trim().length > 0, d = c ? String(n) : e;
|
|
106
|
+
return !c && !i && !l ? /* @__PURE__ */ o(
|
|
26
107
|
"div",
|
|
27
108
|
{
|
|
28
|
-
className:
|
|
29
|
-
"w-full h-full flex items-center justify-center ag-cell-inner-padding text-content-empty
|
|
30
|
-
|
|
109
|
+
className: f(
|
|
110
|
+
"w-full h-full flex items-center justify-center ag-cell-inner-padding text-content-empty",
|
|
111
|
+
r
|
|
31
112
|
),
|
|
32
113
|
"data-component": "style-description-display",
|
|
33
|
-
children:
|
|
114
|
+
children: e
|
|
34
115
|
}
|
|
35
|
-
) : /* @__PURE__ */
|
|
116
|
+
) : /* @__PURE__ */ p(
|
|
36
117
|
"div",
|
|
37
118
|
{
|
|
38
|
-
className:
|
|
119
|
+
className: f(
|
|
39
120
|
"w-full h-full flex items-center gap-2 ag-cell-inner-padding min-w-0",
|
|
40
|
-
|
|
121
|
+
r
|
|
41
122
|
),
|
|
42
123
|
"data-component": "style-description-display",
|
|
43
124
|
children: [
|
|
44
|
-
/* @__PURE__ */
|
|
45
|
-
|
|
125
|
+
/* @__PURE__ */ p("div", { className: "flex min-w-0 flex-1 items-center gap-2", children: [
|
|
126
|
+
i ? /* @__PURE__ */ o(
|
|
46
127
|
"span",
|
|
47
128
|
{
|
|
48
|
-
className: "box-border
|
|
49
|
-
style: { backgroundColor:
|
|
50
|
-
title:
|
|
129
|
+
className: "box-border shrink-0 rounded-sm border border-stroke bg-muted",
|
|
130
|
+
style: { backgroundColor: i },
|
|
131
|
+
title: i,
|
|
51
132
|
"aria-hidden": !0,
|
|
52
133
|
"data-component": "style-description-swatch"
|
|
53
134
|
}
|
|
54
135
|
) : null,
|
|
55
|
-
/* @__PURE__ */
|
|
56
|
-
|
|
136
|
+
/* @__PURE__ */ o(
|
|
137
|
+
N,
|
|
57
138
|
{
|
|
58
|
-
|
|
59
|
-
"
|
|
60
|
-
|
|
139
|
+
triggerClassName: f(
|
|
140
|
+
"block min-w-0 w-full truncate font-medium",
|
|
141
|
+
c ? "text-content" : "text-content-empty"
|
|
61
142
|
),
|
|
62
|
-
|
|
143
|
+
side: "top",
|
|
144
|
+
children: d
|
|
63
145
|
}
|
|
64
146
|
)
|
|
65
147
|
] }),
|
|
66
|
-
/* @__PURE__ */
|
|
67
|
-
|
|
148
|
+
/* @__PURE__ */ o("div", { className: "ms-auto flex shrink-0 items-center border-s border-stroke ps-2", children: /* @__PURE__ */ o(
|
|
149
|
+
U,
|
|
68
150
|
{
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
className: "size-8 rounded-md text-[0]",
|
|
72
|
-
"data-component": "style-description-image",
|
|
73
|
-
children: [
|
|
74
|
-
s ? /* @__PURE__ */ l(f, { src: s, alt: u ?? m }) : null,
|
|
75
|
-
/* @__PURE__ */ l(g, { className: "rounded-md bg-muted text-content-icon", children: /* @__PURE__ */ l(p, { size: 16, "aria-hidden": !0, className: "text-content-icon" }) })
|
|
76
|
-
]
|
|
151
|
+
imageUrl: l,
|
|
152
|
+
imageAlt: m ?? d
|
|
77
153
|
}
|
|
78
154
|
) })
|
|
79
155
|
]
|
|
80
156
|
}
|
|
81
157
|
);
|
|
82
158
|
};
|
|
83
|
-
|
|
159
|
+
k.displayName = "StyleDescriptionDisplayRenderer";
|
|
84
160
|
export {
|
|
85
|
-
|
|
161
|
+
k as StyleDescriptionDisplayRenderer
|
|
86
162
|
};
|
|
@@ -1,4 +1,12 @@
|
|
|
1
|
-
import { ColDef, ColGroupDef } from 'ag-grid-community';
|
|
1
|
+
import { ColDef, ColGroupDef, ICellRendererParams } from 'ag-grid-community';
|
|
2
|
+
/**
|
|
3
|
+
* Resolve column-level editability for display renderers.
|
|
4
|
+
*
|
|
5
|
+
* AG Grid accepts `editable` as a boolean *or* a callback. Display chrome
|
|
6
|
+
* (Select trigger, chevron) must invoke the callback — `=== true` misses every
|
|
7
|
+
* function and paints the cell as a disabled input.
|
|
8
|
+
*/
|
|
9
|
+
export declare function readColDefEditable(colDef: ColDef | null | undefined, rendererParams: ICellRendererParams): boolean;
|
|
2
10
|
/**
|
|
3
11
|
* Recursively overrides `editable` on leaf columns to be a function
|
|
4
12
|
* that enforces the **4-level editable priority**: column < split < row < cell.
|
|
@@ -1,62 +1,67 @@
|
|
|
1
1
|
import { resolveCellEditable as d } from "./cell-renderers/cell-renderer-utils.js";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
2
|
+
function j(n, t) {
|
|
3
|
+
const e = n?.editable;
|
|
4
|
+
return typeof e == "function" ? e(t) : e === !0 ? !0 : e === !1 ? !1 : n?._originalEditable === !0;
|
|
5
|
+
}
|
|
6
|
+
const y = (n, t) => {
|
|
7
|
+
if (t in n) return n[t];
|
|
8
|
+
if (t.includes(".")) {
|
|
9
|
+
const e = t.split(".");
|
|
10
|
+
let l = n;
|
|
11
|
+
for (const r of e)
|
|
12
|
+
if (l != null && typeof l == "object")
|
|
13
|
+
l = l[r];
|
|
10
14
|
else
|
|
11
15
|
return;
|
|
12
|
-
return
|
|
16
|
+
return l;
|
|
13
17
|
}
|
|
14
|
-
},
|
|
15
|
-
const
|
|
16
|
-
if (!
|
|
17
|
-
let e =
|
|
18
|
-
if (!(
|
|
19
|
-
const
|
|
20
|
-
|
|
21
|
-
for (let i = 0; i <
|
|
22
|
-
const
|
|
23
|
-
if (
|
|
24
|
-
e =
|
|
18
|
+
}, E = (n) => {
|
|
19
|
+
const t = n.colDef.field;
|
|
20
|
+
if (!t) return !1;
|
|
21
|
+
let e = n.data, l = t;
|
|
22
|
+
if (!(t in e) && t.includes(".")) {
|
|
23
|
+
const o = t.split(".");
|
|
24
|
+
l = o[o.length - 1];
|
|
25
|
+
for (let i = 0; i < o.length - 1; i++) {
|
|
26
|
+
const a = e[o[i]];
|
|
27
|
+
if (a != null && typeof a == "object")
|
|
28
|
+
e = a;
|
|
25
29
|
else
|
|
26
30
|
return !1;
|
|
27
31
|
}
|
|
28
32
|
}
|
|
29
|
-
const
|
|
30
|
-
return
|
|
33
|
+
const r = e[l], u = n.newValue;
|
|
34
|
+
return r && typeof r == "object" && "cellMetadata" in r ? e[l] = u && typeof u == "object" && "value" in u ? u : { ...r, value: u } : e[l] = u, !0;
|
|
31
35
|
};
|
|
32
|
-
function
|
|
33
|
-
return
|
|
34
|
-
const e = { ...
|
|
36
|
+
function g(n) {
|
|
37
|
+
return n.map((t) => {
|
|
38
|
+
const e = { ...t };
|
|
35
39
|
if (e.children?.length)
|
|
36
|
-
return e.children =
|
|
37
|
-
const
|
|
38
|
-
if (!
|
|
39
|
-
const
|
|
40
|
-
return e._originalEditable =
|
|
40
|
+
return e.children = g(e.children), e;
|
|
41
|
+
const l = e.field;
|
|
42
|
+
if (!l) return e;
|
|
43
|
+
const r = e.cellEditorParams?.splits, u = r?.some((i) => i.editable === !0) ?? !1, o = typeof e.editable == "boolean" ? e.editable : void 0;
|
|
44
|
+
return e._originalEditable = o, r || (e.valueSetter = E), e.editable = (i) => {
|
|
41
45
|
if (i.node?.group === !0 || i.data?.group === !0)
|
|
42
46
|
return !1;
|
|
43
|
-
const
|
|
44
|
-
if (!
|
|
45
|
-
const
|
|
46
|
-
if (
|
|
47
|
-
const p =
|
|
48
|
-
return
|
|
49
|
-
const f =
|
|
47
|
+
const a = i.data;
|
|
48
|
+
if (!a) return u || !!o;
|
|
49
|
+
const s = y(a, l);
|
|
50
|
+
if (r) {
|
|
51
|
+
const p = s != null && typeof s == "object" ? s : null;
|
|
52
|
+
return r.some((c) => {
|
|
53
|
+
const f = c.field?.split(".")?.pop();
|
|
50
54
|
if (!f) return !1;
|
|
51
55
|
const v = p?.[f];
|
|
52
|
-
return d(
|
|
56
|
+
return d(o, c.editable, a, v);
|
|
53
57
|
});
|
|
54
58
|
}
|
|
55
|
-
const b =
|
|
56
|
-
return d(
|
|
59
|
+
const b = s != null && typeof s == "object" && "value" in s ? s : void 0;
|
|
60
|
+
return d(o, void 0, a, b);
|
|
57
61
|
}, e;
|
|
58
62
|
});
|
|
59
63
|
}
|
|
60
64
|
export {
|
|
61
|
-
|
|
65
|
+
g as addRowDataEditableCheck,
|
|
66
|
+
j as readColDefEditable
|
|
62
67
|
};
|