impact-nova 2.6.3 → 3.0.0-alpha.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/dist/components/data/ag-grid-react/ag-grid-cell-components.d.ts +9 -0
- package/dist/components/data/ag-grid-react/ag-grid-list.d.ts +16 -0
- package/dist/components/data/ag-grid-react/ag-grid-list.js +23 -0
- package/dist/components/data/ag-grid-react/ag-grid.types.d.ts +7 -0
- package/dist/components/data/ag-grid-react/cell-renderers/editors/list-select-cell-editor.d.ts +14 -0
- package/dist/components/data/ag-grid-react/cell-renderers/editors/list-select-cell-editor.js +70 -0
- package/dist/components/data/ag-grid-react/cell-renderers/editors/select-cell-editor.d.ts +10 -5
- package/dist/components/data/ag-grid-react/cell-renderers/editors/select-cell-editor.js +73 -41
- package/dist/components/data/ag-grid-react/cell-renderers/index.d.ts +7 -0
- package/dist/components/data/ag-grid-react/cell-renderers/index.js +42 -36
- package/dist/components/data/ag-grid-react/cell-renderers/list-select-display-renderer.d.ts +19 -0
- package/dist/components/data/ag-grid-react/cell-renderers/list-select-display-renderer.js +89 -0
- package/dist/components/data/ag-grid-react/cell-renderers/select-ai-insight-affordance.d.ts +28 -0
- package/dist/components/data/ag-grid-react/cell-renderers/select-ai-insight-affordance.js +96 -0
- package/dist/components/data/ag-grid-react/cell-renderers/select-display-renderer.d.ts +30 -10
- package/dist/components/data/ag-grid-react/cell-renderers/select-display-renderer.js +72 -24
- package/dist/components/data/ag-grid-react/cell-renderers/style-description-display-renderer.d.ts +42 -0
- package/dist/components/data/ag-grid-react/cell-renderers/style-description-display-renderer.js +86 -0
- package/dist/components/data/ag-grid-react/index.d.ts +1 -1
- package/dist/components/data/ag-grid-react/index.js +162 -146
- package/dist/components/data/data-table/data-table.js +85 -82
- package/dist/components/data/data-table/data-table.types.d.ts +5 -0
- package/dist/components/data/expandable-list-item/expandable-list-item-attributes.js +2 -3
- package/dist/components/data/expandable-list-item/expandable-list-item-metrics.js +2 -3
- package/dist/components/data/expandable-list-item/sku-next-page-coordinator.d.ts +14 -0
- package/dist/components/data/expandable-list-item/sku-strip-lookahead.d.ts +26 -0
- package/dist/components/data/expandable-list-item/useServerSkuInfinitePages.d.ts +10 -0
- package/dist/components/data/expandable-list-item/useSkuStripVirtualizer.d.ts +30 -0
- package/dist/components/data/expandable-list-item/virtualized-responsive-grid.catalog.d.ts +81 -0
- package/dist/components/data/expandable-list-item/virtualized-responsive-grid.item-grid.d.ts +1 -0
- package/dist/components/data/expandable-list-item/virtualized-responsive-grid.product-card.d.ts +7 -0
- package/dist/components/data/expandable-list-item/virtualized-responsive-grid.sku-picker.d.ts +2 -0
- package/dist/components/data-display/chart/chart-heatmap-demos.d.ts +3 -0
- package/dist/components/data-display/chart/chart-heatmap-play.d.ts +9 -0
- package/dist/components/data-display/chart/chart.category-cluster-heatmap.stories-data.d.ts +22 -0
- package/dist/components/data-display/chart/chart.diverging-heatmap.stories-data.d.ts +43 -0
- package/dist/components/data-display/chart/chart.js +100 -93
- package/dist/components/data-display/chart/chart.types.d.ts +10 -0
- package/dist/components/data-display/chart/chart.utils.d.ts +14 -2
- package/dist/components/data-display/chart/chart.utils.js +132 -35
- package/dist/components/data-display/chart/index.js +15 -13
- package/dist/components/data-display/chart/resolve-highcharts-options.js +19 -14
- package/dist/components/data-display/globe-map/globe-map.d.ts +8 -0
- package/dist/components/data-display/globe-map/globe-map.js +161 -0
- package/dist/components/data-display/globe-map/globe-map.stories-data.d.ts +12 -0
- package/dist/components/data-display/globe-map/globe-map.types.d.ts +83 -0
- package/dist/components/data-display/globe-map/globe-map.utils.d.ts +115 -0
- package/dist/components/data-display/globe-map/globe-map.utils.js +259 -0
- package/dist/components/data-display/globe-map/globe-map.variants.d.ts +19 -0
- package/dist/components/data-display/globe-map/globe-map.variants.js +80 -0
- package/dist/components/data-display/globe-map/index.d.ts +2 -0
- package/dist/components/data-display/globe-map/index.js +10 -0
- package/dist/components/data-display/globe-map/internals/globe-countries-110m.json.d.ts +4 -0
- package/dist/components/data-display/globe-map/internals/globe-countries-110m.json.js +7 -0
- package/dist/components/data-display/globe-map/internals/globe-map-context.d.ts +25 -0
- package/dist/components/data-display/globe-map/internals/globe-map-context.js +19 -0
- package/dist/components/data-display/globe-map/internals/globe-map-legend.d.ts +2 -0
- package/dist/components/data-display/globe-map/internals/globe-map-legend.js +51 -0
- package/dist/components/data-display/globe-map/internals/globe-map-point-card-carousel.d.ts +6 -0
- package/dist/components/data-display/globe-map/internals/globe-map-point-card-carousel.js +119 -0
- package/dist/components/data-display/globe-map/internals/globe-map-point-card.d.ts +2 -0
- package/dist/components/data-display/globe-map/internals/globe-map-point-card.js +106 -0
- package/dist/components/data-display/globe-map/internals/globe-map-scene.d.ts +17 -0
- package/dist/components/data-display/globe-map/internals/globe-map-scene.js +218 -0
- package/dist/components/data-display/globe-map/internals/globe-map-tooltip.d.ts +2 -0
- package/dist/components/data-display/globe-map/internals/globe-map-tooltip.js +33 -0
- package/dist/components/data-display/globe-map/internals/use-globe-map-scene.d.ts +45 -0
- package/dist/components/data-display/globe-map/internals/use-globe-map-scene.js +270 -0
- package/dist/components/data-display/hex-tilemap/hex-tilemap.d.ts +9 -0
- package/dist/components/data-display/hex-tilemap/hex-tilemap.js +94 -0
- package/dist/components/data-display/hex-tilemap/hex-tilemap.stories-data.d.ts +7 -0
- package/dist/components/data-display/hex-tilemap/hex-tilemap.types.d.ts +43 -0
- package/dist/components/data-display/hex-tilemap/hex-tilemap.variants.d.ts +11 -0
- package/dist/components/data-display/hex-tilemap/hex-tilemap.variants.js +47 -0
- package/dist/components/data-display/hex-tilemap/index.d.ts +2 -0
- package/dist/components/data-display/hex-tilemap/index.js +12 -0
- package/dist/components/data-display/hex-tilemap/internals/hex-camera.d.ts +40 -0
- package/dist/components/data-display/hex-tilemap/internals/hex-camera.js +103 -0
- package/dist/components/data-display/hex-tilemap/internals/hex-country-lattices.d.ts +9 -0
- package/dist/components/data-display/hex-tilemap/internals/hex-country-lattices.js +1387 -0
- package/dist/components/data-display/hex-tilemap/internals/hex-geometry.d.ts +21 -0
- package/dist/components/data-display/hex-tilemap/internals/hex-geometry.js +82 -0
- package/dist/components/data-display/hex-tilemap/internals/hex-lattice.d.ts +18 -0
- package/dist/components/data-display/hex-tilemap/internals/hex-lattice.js +47 -0
- package/dist/components/data-display/hex-tilemap/internals/hex-layout.d.ts +10 -0
- package/dist/components/data-display/hex-tilemap/internals/hex-layout.js +35 -0
- package/dist/components/data-display/hex-tilemap/internals/hex-new-zealand-grid.d.ts +31 -0
- package/dist/components/data-display/hex-tilemap/internals/hex-new-zealand-grid.js +138 -0
- package/dist/components/data-display/hex-tilemap/internals/hex-regions.d.ts +6 -0
- package/dist/components/data-display/hex-tilemap/internals/hex-regions.js +18 -0
- package/dist/components/data-display/hex-tilemap/internals/hex-tilemap-context.d.ts +24 -0
- package/dist/components/data-display/hex-tilemap/internals/hex-tilemap-context.js +19 -0
- package/dist/components/data-display/hex-tilemap/internals/hex-tilemap-legend.d.ts +2 -0
- package/dist/components/data-display/hex-tilemap/internals/hex-tilemap-legend.js +51 -0
- package/dist/components/data-display/hex-tilemap/internals/hex-tilemap-tooltip.d.ts +2 -0
- package/dist/components/data-display/hex-tilemap/internals/hex-tilemap-tooltip.js +36 -0
- package/dist/components/data-display/hex-tilemap/internals/hex-tilemap-viewport.d.ts +3 -0
- package/dist/components/data-display/hex-tilemap/internals/hex-tilemap-viewport.js +147 -0
- package/dist/components/data-display/hex-tilemap/internals/hex-tilemap-zoom.d.ts +13 -0
- package/dist/components/data-display/hex-tilemap/internals/hex-tilemap-zoom.js +99 -0
- package/dist/components/data-display/hex-tilemap/internals/hex-world-grid.d.ts +8 -0
- package/dist/components/data-display/hex-tilemap/internals/use-hex-camera.d.ts +27 -0
- package/dist/components/data-display/hex-tilemap/internals/use-hex-camera.js +137 -0
- package/dist/components/data-display/notch-card/index.d.ts +2 -0
- package/dist/components/data-display/notch-card/index.js +6 -0
- package/dist/components/data-display/notch-card/notch-card.d.ts +7 -0
- package/dist/components/data-display/notch-card/notch-card.js +151 -0
- package/dist/components/data-display/notch-card/notch-card.path.d.ts +19 -0
- package/dist/components/data-display/notch-card/notch-card.path.js +118 -0
- package/dist/components/data-display/notch-card/notch-card.types.d.ts +15 -0
- package/dist/components/data-display/notch-card/notch-card.variants.d.ts +15 -0
- package/dist/components/data-display/notch-card/notch-card.variants.js +86 -0
- package/dist/components/feedback/hover-card/hover-card.d.ts +3 -1
- package/dist/components/feedback/hover-card/hover-card.js +28 -24
- package/dist/components/feedback/tooltip/overflow-tooltip.d.ts +1 -1
- package/dist/components/feedback/tooltip/overflow-tooltip.js +63 -57
- package/dist/components/feedback/tooltip/overflow-tooltip.types.d.ts +4 -0
- package/dist/components/feedback/tooltip/tab-tooltip-render.js +2 -3
- 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/filter-strip/index.d.ts +1 -0
- package/dist/components/flows/filter-strip/index.js +4 -2
- package/dist/components/flows/iris-chat/index.d.ts +10 -0
- package/dist/components/flows/iris-chat/index.js +55 -0
- package/dist/components/flows/iris-chat/iris-chat-artifact.d.ts +4 -0
- package/dist/components/flows/iris-chat/iris-chat-artifact.js +125 -0
- package/dist/components/flows/iris-chat/iris-chat-composer.d.ts +3 -0
- package/dist/components/flows/iris-chat/iris-chat-composer.js +297 -0
- package/dist/components/flows/iris-chat/iris-chat-context.d.ts +14 -0
- package/dist/components/flows/iris-chat/iris-chat-context.js +23 -0
- package/dist/components/flows/iris-chat/iris-chat-icons.d.ts +18 -0
- package/dist/components/flows/iris-chat/iris-chat-icons.js +176 -0
- package/dist/components/flows/iris-chat/iris-chat-markdown.d.ts +3 -0
- package/dist/components/flows/iris-chat/iris-chat-markdown.js +62 -0
- package/dist/components/flows/iris-chat/iris-chat-menu.d.ts +15 -0
- package/dist/components/flows/iris-chat/iris-chat-menu.js +259 -0
- package/dist/components/flows/iris-chat/iris-chat-prompt.d.ts +3 -0
- package/dist/components/flows/iris-chat/iris-chat-prompt.js +46 -0
- package/dist/components/flows/iris-chat/iris-chat-thinking.d.ts +12 -0
- package/dist/components/flows/iris-chat/iris-chat-thinking.js +202 -0
- package/dist/components/flows/iris-chat/iris-chat-thread.d.ts +37 -0
- package/dist/components/flows/iris-chat/iris-chat-thread.js +493 -0
- package/dist/components/flows/iris-chat/iris-chat.d.ts +43 -0
- package/dist/components/flows/iris-chat/iris-chat.js +336 -0
- package/dist/components/flows/iris-chat/iris-chat.types.d.ts +208 -0
- package/dist/components/flows/iris-chat/iris-chat.variants.d.ts +14 -0
- package/dist/components/flows/iris-chat/iris-chat.variants.js +78 -0
- package/dist/components/flows/iris-chat/read-iris-greeting-period.d.ts +4 -0
- package/dist/components/flows/iris-chat/read-iris-greeting-period.js +16 -0
- package/dist/components/flows/wizard/index.d.ts +2 -2
- package/dist/components/flows/wizard/index.js +17 -13
- package/dist/components/flows/wizard/wizard-context.d.ts +6 -1
- package/dist/components/flows/wizard/wizard-context.js +15 -7
- package/dist/components/flows/wizard/wizard.d.ts +22 -4
- package/dist/components/flows/wizard/wizard.js +278 -174
- package/dist/components/flows/wizard/wizard.types.d.ts +40 -0
- package/dist/components/forms/choice-card/assets/featured-backdrop-baked.webp.js +4 -0
- package/dist/components/forms/choice-card/assets/featured-noise.webp.js +4 -0
- package/dist/components/forms/choice-card/choice-card-featured-arcs.d.ts +4 -0
- package/dist/components/forms/choice-card/choice-card-featured-arcs.js +42 -0
- package/dist/components/forms/choice-card/choice-card-featured-backdrop.d.ts +4 -0
- package/dist/components/forms/choice-card/choice-card-featured-backdrop.js +45 -0
- package/dist/components/forms/choice-card/choice-card-indicator.variants.d.ts +8 -0
- package/dist/components/forms/choice-card/choice-card-indicator.variants.js +5 -0
- package/dist/components/forms/choice-card/choice-card-percent.d.ts +11 -0
- package/dist/components/forms/choice-card/choice-card-percent.js +80 -0
- package/dist/components/forms/choice-card/choice-card.d.ts +40 -3
- package/dist/components/forms/choice-card/choice-card.js +651 -170
- package/dist/components/forms/choice-card/choice-card.types.d.ts +40 -0
- package/dist/components/forms/choice-card/choice-card.variants.d.ts +7 -0
- package/dist/components/forms/choice-card/choice-card.variants.js +100 -0
- package/dist/components/forms/choice-card/index.d.ts +2 -1
- package/dist/components/forms/choice-card/index.js +27 -10
- package/dist/components/forms/select/components/SelectTriggerValue.js +2 -3
- package/dist/components/forms/select/components/Submenu.js +2 -3
- package/dist/components/layout/header/header.d.ts +3 -2
- package/dist/components/layout/header/header.js +67 -47
- package/dist/components/layout/header/header.types.d.ts +1 -0
- package/dist/components/primitives/iris/iris-agent-cursor.d.ts +3 -0
- package/dist/components/primitives/iris/iris-agent-cursor.js +89 -0
- package/dist/components/primitives/iris/iris-alan-gradient-icon.d.ts +5 -0
- package/dist/components/primitives/iris/iris-alan-gradient-icon.js +69 -0
- package/dist/components/primitives/iris/iris-control-context.d.ts +15 -0
- package/dist/components/primitives/iris/iris-control-context.js +44 -0
- package/dist/components/primitives/iris/iris-control-region.d.ts +10 -0
- package/dist/components/primitives/iris/iris-control-region.js +102 -0
- package/dist/components/primitives/iris/iris-control.types.d.ts +24 -0
- package/dist/components/primitives/iris/iris-control.variants.d.ts +4 -0
- package/dist/components/primitives/iris/iris-control.variants.js +20 -0
- package/dist/components/primitives/iris/iris.d.ts +24 -0
- package/dist/components/primitives/iris/iris.js +232 -0
- package/dist/components/primitives/iris/iris.types.d.ts +35 -0
- package/dist/components/primitives/iris/iris.variants.d.ts +30 -0
- package/dist/components/primitives/iris/iris.variants.js +120 -0
- package/dist/components/primitives/stepper/internals/pipeline-current-mark.d.ts +6 -0
- package/dist/components/primitives/stepper/internals/pipeline-current-mark.js +35 -0
- package/dist/components/primitives/stepper/internals/rail-status-dot.d.ts +13 -0
- package/dist/components/primitives/stepper/internals/rail-status-dot.js +70 -0
- package/dist/components/primitives/stepper/internals/step-hit-target.d.ts +15 -0
- package/dist/components/primitives/stepper/internals/step-hit-target.js +51 -0
- package/dist/components/primitives/stepper/internals/step-model.d.ts +3 -0
- package/dist/components/primitives/stepper/internals/step-model.js +10 -0
- package/dist/components/primitives/stepper/internals/stepper-compact.d.ts +5 -0
- package/dist/components/primitives/stepper/internals/stepper-compact.js +68 -0
- package/dist/components/primitives/stepper/internals/stepper-pipeline.d.ts +7 -0
- package/dist/components/primitives/stepper/internals/stepper-pipeline.js +87 -0
- package/dist/components/primitives/stepper/internals/stepper-rail.d.ts +5 -0
- package/dist/components/primitives/stepper/internals/stepper-rail.js +105 -0
- package/dist/components/primitives/stepper/internals/stepper-summary.d.ts +5 -0
- package/dist/components/primitives/stepper/internals/stepper-summary.js +103 -0
- package/dist/components/primitives/stepper/internals/stepper-track.d.ts +8 -0
- package/dist/components/primitives/stepper/internals/stepper-track.js +170 -0
- package/dist/components/primitives/stepper/stepper.d.ts +1 -0
- package/dist/components/primitives/stepper/stepper.js +134 -52
- package/dist/components/primitives/stepper/stepper.types.d.ts +17 -0
- package/dist/components/primitives/stepper/stepper.variants.d.ts +26 -0
- package/dist/components/primitives/stepper/stepper.variants.js +165 -5
- package/dist/components/primitives/tabs/tabs.d.ts +4 -1
- package/dist/components/primitives/tabs/tabs.js +131 -59
- package/dist/components/primitives/tabs/tabs.types.d.ts +5 -1
- package/dist/i18n/defaultMessages.d.ts +100 -0
- package/dist/i18n/defaultMessages.js +118 -21
- package/dist/i18n/index.d.ts +1 -1
- package/dist/i18n/locales/de.js +99 -2
- package/dist/i18n/locales/es.js +99 -2
- package/dist/i18n/locales/hi.js +99 -2
- package/dist/i18n/locales/kn.js +99 -2
- package/dist/impact-nova-components.css +972 -2
- package/dist/impact-nova-tokens.scss +109 -1
- package/dist/impact-nova.css +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +585 -551
- package/dist/lib/virtualized/directional-range-extractor.d.ts +26 -0
- package/dist/lib/virtualized/directional-range-extractor.js +39 -0
- package/dist/lib/virtualized/index.d.ts +3 -0
- package/dist/lib/virtualized/index.js +35 -27
- package/dist/lib/virtualized/scroll-seek.d.ts +61 -0
- package/dist/lib/virtualized/scroll-seek.js +61 -0
- package/dist/lib/virtualized/usePaintedRangeVirtualizer.d.ts +19 -0
- package/dist/lib/virtualized/usePaintedRangeVirtualizer.js +30 -0
- package/dist/lib/virtualized/useResponsiveColumnCount.d.ts +35 -0
- package/dist/lib/virtualized/useResponsiveColumnCount.js +51 -0
- package/dist/lib/virtualized/useScrollSeekPaintedRange.d.ts +13 -0
- package/dist/lib/virtualized/useScrollSeekPaintedRange.js +45 -0
- package/dist/lib/virtualized/useVirtualizedList.d.ts +7 -0
- package/dist/lib/virtualized/useVirtualizedList.js +89 -87
- package/dist/lib/virtualized/useVirtualizedRows.d.ts +9 -2
- package/dist/lib/virtualized/useVirtualizedRows.js +15 -13
- package/dist/lib/virtualized/virtualized.types.d.ts +2 -0
- package/dist/llms/rules/installation.js +1 -1
- package/dist/llms/rules/requirements.js +1 -1
- package/dist/tailwind.config.js +3 -1
- package/dist/theme/tailwind-colors.js +2 -1
- package/package.json +39 -4
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
import { jsx as o, jsxs as a } from "react/jsx-runtime";
|
|
2
|
+
import { Badge as f } from "../../../data-display/badge/badge.js";
|
|
3
|
+
import { HoverCard as u, HoverCardTrigger as m, HoverCardContent as g } from "../../../feedback/hover-card/hover-card.js";
|
|
4
|
+
import { IrisAlanGradientIcon as h } from "../../../primitives/iris/iris-alan-gradient-icon.js";
|
|
5
|
+
import { cn as s } from "../../../../lib/utils.js";
|
|
6
|
+
import { getFieldValue as l } from "./cell-renderer-utils.js";
|
|
7
|
+
function v(e) {
|
|
8
|
+
return e.showAiInsight === !0 || e.cellMetadata?.aiInsight === !0 ? !0 : l(e.aiInsightField, void 0, e.data) === !0;
|
|
9
|
+
}
|
|
10
|
+
function b(e) {
|
|
11
|
+
if (typeof e.cellMetadata?.confidenceScore == "number")
|
|
12
|
+
return e.cellMetadata.confidenceScore;
|
|
13
|
+
const t = l(
|
|
14
|
+
e.confidenceScoreField,
|
|
15
|
+
e.confidenceScore,
|
|
16
|
+
e.data
|
|
17
|
+
);
|
|
18
|
+
return typeof t == "number" ? t : void 0;
|
|
19
|
+
}
|
|
20
|
+
function y(e) {
|
|
21
|
+
if (typeof e.cellMetadata?.confidenceReason == "string" && e.cellMetadata.confidenceReason.length > 0)
|
|
22
|
+
return e.cellMetadata.confidenceReason;
|
|
23
|
+
const t = l(
|
|
24
|
+
e.confidenceReasonField,
|
|
25
|
+
e.confidenceReason,
|
|
26
|
+
e.data
|
|
27
|
+
);
|
|
28
|
+
return typeof t == "string" && t.length > 0 ? t : void 0;
|
|
29
|
+
}
|
|
30
|
+
function A(e) {
|
|
31
|
+
const t = e.confidenceLabel ?? "Confidence Score";
|
|
32
|
+
if (!v(e)) return null;
|
|
33
|
+
const i = b(e), c = y(e), d = i != null || c != null, r = /* @__PURE__ */ o(
|
|
34
|
+
"button",
|
|
35
|
+
{
|
|
36
|
+
type: "button",
|
|
37
|
+
"data-component": "select-display-ai-insight",
|
|
38
|
+
className: s(
|
|
39
|
+
"relative z-[2] inline-flex size-6 shrink-0 items-center justify-center rounded-sm text-content-icon",
|
|
40
|
+
"hover:bg-canvas-tint focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-stroke-focus",
|
|
41
|
+
"motion-reduce:transition-none",
|
|
42
|
+
e.className
|
|
43
|
+
),
|
|
44
|
+
"aria-label": i != null ? `${t} ${i}%` : "AI insight",
|
|
45
|
+
onMouseDown: (n) => {
|
|
46
|
+
n.preventDefault(), n.stopPropagation();
|
|
47
|
+
},
|
|
48
|
+
onClick: (n) => {
|
|
49
|
+
n.preventDefault(), n.stopPropagation();
|
|
50
|
+
},
|
|
51
|
+
onPointerDown: (n) => {
|
|
52
|
+
n.stopPropagation();
|
|
53
|
+
},
|
|
54
|
+
children: /* @__PURE__ */ o(h, { size: 14 })
|
|
55
|
+
}
|
|
56
|
+
);
|
|
57
|
+
return d ? /* @__PURE__ */ a(u, { openDelay: 200, closeDelay: 100, children: [
|
|
58
|
+
/* @__PURE__ */ o(m, { asChild: !0, children: r }),
|
|
59
|
+
/* @__PURE__ */ a(
|
|
60
|
+
g,
|
|
61
|
+
{
|
|
62
|
+
align: "end",
|
|
63
|
+
side: "top",
|
|
64
|
+
sideOffset: 8,
|
|
65
|
+
collisionPadding: 12,
|
|
66
|
+
className: "z-[9999] w-80 max-w-[min(20rem,calc(100vw-1.5rem))] p-3",
|
|
67
|
+
"data-component": "select-display-confidence-card",
|
|
68
|
+
onMouseDown: (n) => n.stopPropagation(),
|
|
69
|
+
onClick: (n) => n.stopPropagation(),
|
|
70
|
+
onPointerDown: (n) => n.stopPropagation(),
|
|
71
|
+
children: [
|
|
72
|
+
i != null && /* @__PURE__ */ a(f, { variant: "outline", color: "success", size: "sm", shape: "circle", children: [
|
|
73
|
+
t,
|
|
74
|
+
" - ",
|
|
75
|
+
i,
|
|
76
|
+
"%"
|
|
77
|
+
] }),
|
|
78
|
+
c != null && /* @__PURE__ */ o(
|
|
79
|
+
"p",
|
|
80
|
+
{
|
|
81
|
+
className: s(
|
|
82
|
+
"text-sm text-content leading-snug",
|
|
83
|
+
i != null && "mt-2"
|
|
84
|
+
),
|
|
85
|
+
children: c
|
|
86
|
+
}
|
|
87
|
+
)
|
|
88
|
+
]
|
|
89
|
+
}
|
|
90
|
+
)
|
|
91
|
+
] }) : r;
|
|
92
|
+
}
|
|
93
|
+
A.displayName = "SelectAiInsightAffordance";
|
|
94
|
+
export {
|
|
95
|
+
A as SelectAiInsightAffordance
|
|
96
|
+
};
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import { ICellRendererParams } from 'ag-grid-community';
|
|
2
2
|
import { SelectOption } from './types';
|
|
3
|
+
import { SelectAiInsightMetadata } from './select-ai-insight-affordance';
|
|
4
|
+
export type { SelectAiInsightMetadata };
|
|
3
5
|
export interface SelectDisplayRendererProps extends ICellRendererParams {
|
|
4
6
|
/** Available options for the select */
|
|
5
7
|
options?: SelectOption[];
|
|
@@ -7,6 +9,23 @@ export interface SelectDisplayRendererProps extends ICellRendererParams {
|
|
|
7
9
|
placeholder?: string;
|
|
8
10
|
/** Whether the field is disabled */
|
|
9
11
|
disabled?: boolean;
|
|
12
|
+
/**
|
|
13
|
+
* Force-show the AI sparkle when insight metadata is absent.
|
|
14
|
+
* Prefer `cellMetadata.aiInsight` / `aiInsightField` for per-row control.
|
|
15
|
+
*/
|
|
16
|
+
showAiInsight?: boolean;
|
|
17
|
+
/** Row field that resolves to a boolean for the AI sparkle */
|
|
18
|
+
aiInsightField?: string;
|
|
19
|
+
/** Static confidence score (0–100); overridden by cellMetadata / field */
|
|
20
|
+
confidenceScore?: number;
|
|
21
|
+
/** Row field for confidence score */
|
|
22
|
+
confidenceScoreField?: string;
|
|
23
|
+
/** Static confidence reason copy */
|
|
24
|
+
confidenceReason?: string;
|
|
25
|
+
/** Row field for confidence reason */
|
|
26
|
+
confidenceReasonField?: string;
|
|
27
|
+
/** Confidence badge label prefix (default: "Confidence Score") */
|
|
28
|
+
confidenceLabel?: string;
|
|
10
29
|
}
|
|
11
30
|
/**
|
|
12
31
|
* SelectDisplayRenderer - Lightweight styled div that looks like a select/dropdown.
|
|
@@ -15,28 +34,29 @@ export interface SelectDisplayRendererProps extends ICellRendererParams {
|
|
|
15
34
|
* zero React state. Shows the label of the currently selected option with a
|
|
16
35
|
* chevron icon. When clicked, AG Grid activates the paired `SelectCellEditor`.
|
|
17
36
|
*
|
|
37
|
+
* Optional AI insight affordance: when `aiInsight` metadata (or `showAiInsight`)
|
|
38
|
+
* is set, an Iris sparkle appears. Hovering it opens a confidence HoverCard
|
|
39
|
+
* (score badge + reason) without entering edit mode.
|
|
40
|
+
*
|
|
18
41
|
* Usage in colDef:
|
|
19
42
|
* ```ts
|
|
20
43
|
* {
|
|
21
|
-
* field: '
|
|
44
|
+
* field: 'recommendation',
|
|
22
45
|
* cellRenderer: SelectDisplayRenderer,
|
|
23
46
|
* cellEditor: SelectCellEditor,
|
|
24
47
|
* editable: true,
|
|
25
48
|
* singleClickEdit: true,
|
|
26
49
|
* cellRendererParams: {
|
|
27
50
|
* options: [
|
|
28
|
-
* { label: '
|
|
29
|
-
* { label: '
|
|
30
|
-
*
|
|
31
|
-
* placeholder: 'Select status...',
|
|
32
|
-
* },
|
|
33
|
-
* cellEditorParams: {
|
|
34
|
-
* options: [
|
|
35
|
-
* { label: 'Active', value: 'active' },
|
|
36
|
-
* { label: 'Inactive', value: 'inactive' },
|
|
51
|
+
* { label: 'Keep', value: 'keep' },
|
|
52
|
+
* { label: 'Shop', value: 'shop' },
|
|
53
|
+
* { label: 'Drop', value: 'drop' },
|
|
37
54
|
* ],
|
|
55
|
+
* placeholder: 'Select...',
|
|
38
56
|
* },
|
|
39
57
|
* }
|
|
58
|
+
* // Cell value with AI insight:
|
|
59
|
+
* // { value: 'keep', cellMetadata: { aiInsight: true, confidenceScore: 98, confidenceReason: '...' } }
|
|
40
60
|
* ```
|
|
41
61
|
*/
|
|
42
62
|
export declare const SelectDisplayRenderer: {
|
|
@@ -1,31 +1,79 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { ChevronRight as
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
1
|
+
import { jsxs as m, jsx as d } from "react/jsx-runtime";
|
|
2
|
+
import { ChevronRight as D } from "impact-nova-icons";
|
|
3
|
+
import { cn as f } from "../../../../lib/utils.js";
|
|
4
|
+
import { SelectAiInsightAffordance as M } from "./select-ai-insight-affordance.js";
|
|
5
|
+
function E(i) {
|
|
6
|
+
const { value: e, data: t, disabled: c, colDef: l } = i;
|
|
7
|
+
if (c) return !1;
|
|
8
|
+
const a = e && typeof e == "object" && "cellMetadata" in e ? e.cellMetadata?._isDisabled : void 0, n = t && typeof t == "object" && "rowMetadata" in t ? t.rowMetadata?._isDisabled : void 0, r = l?._originalEditable;
|
|
9
|
+
return l?.editable === !1 ? !1 : a === !1 ? !0 : a === !0 ? !1 : n === !1 ? !0 : n === !0 ? !1 : r === !0 || l?.editable === !0;
|
|
10
|
+
}
|
|
11
|
+
const F = (i) => {
|
|
12
|
+
const {
|
|
13
|
+
value: e,
|
|
14
|
+
options: t = [],
|
|
15
|
+
placeholder: c = "Select...",
|
|
16
|
+
disabled: l,
|
|
17
|
+
data: a,
|
|
18
|
+
showAiInsight: n,
|
|
19
|
+
aiInsightField: r,
|
|
20
|
+
confidenceScore: h,
|
|
21
|
+
confidenceScoreField: g,
|
|
22
|
+
confidenceReason: v,
|
|
23
|
+
confidenceReasonField: x,
|
|
24
|
+
confidenceLabel: y
|
|
25
|
+
} = i, s = E(i), u = e && typeof e == "object" && "value" in e, w = u ? e.cellMetadata : void 0, o = u ? e.value : e, p = t.find((j) => j.value === String(o ?? ""))?.label ?? (o != null && o !== "" ? String(o) : ""), b = !p, S = a && typeof a == "object" ? a : null;
|
|
26
|
+
return /* @__PURE__ */ m(
|
|
12
27
|
"div",
|
|
13
28
|
{
|
|
14
|
-
className:
|
|
15
|
-
|
|
16
|
-
"
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
29
|
+
className: f(
|
|
30
|
+
"box-border flex h-full w-full min-w-0 items-center gap-2 ps-2 pe-2.5",
|
|
31
|
+
l && "opacity-60 cursor-not-allowed",
|
|
32
|
+
s && "in-ag-editable-cell-highlight"
|
|
33
|
+
),
|
|
34
|
+
"data-component": "select-display-renderer",
|
|
35
|
+
children: [
|
|
36
|
+
/* @__PURE__ */ m(
|
|
37
|
+
"div",
|
|
38
|
+
{
|
|
39
|
+
className: f(
|
|
40
|
+
"flex h-7 min-w-0 flex-1 items-center justify-between rounded-[8px] px-1.5",
|
|
41
|
+
s ? "bg-canvas-elevated cursor-pointer" : "bg-inherit"
|
|
42
|
+
),
|
|
43
|
+
children: [
|
|
44
|
+
/* @__PURE__ */ d(
|
|
45
|
+
"span",
|
|
46
|
+
{
|
|
47
|
+
className: f(
|
|
48
|
+
"truncate text-sm font-medium text-content",
|
|
49
|
+
b && "text-content-empty"
|
|
50
|
+
),
|
|
51
|
+
children: b ? c : p
|
|
52
|
+
}
|
|
53
|
+
),
|
|
54
|
+
s && /* @__PURE__ */ d(D, { className: "h-3.5 w-3.5 shrink-0 rotate-90 text-content-icon" })
|
|
55
|
+
]
|
|
56
|
+
}
|
|
57
|
+
),
|
|
58
|
+
/* @__PURE__ */ d(
|
|
59
|
+
M,
|
|
60
|
+
{
|
|
61
|
+
showAiInsight: n,
|
|
62
|
+
aiInsightField: r,
|
|
63
|
+
confidenceScore: h,
|
|
64
|
+
confidenceScoreField: g,
|
|
65
|
+
confidenceReason: v,
|
|
66
|
+
confidenceReasonField: x,
|
|
67
|
+
confidenceLabel: y,
|
|
68
|
+
data: S,
|
|
69
|
+
cellMetadata: w
|
|
70
|
+
}
|
|
71
|
+
)
|
|
72
|
+
]
|
|
25
73
|
}
|
|
26
74
|
);
|
|
27
75
|
};
|
|
28
|
-
|
|
76
|
+
F.displayName = "SelectDisplayRenderer";
|
|
29
77
|
export {
|
|
30
|
-
|
|
78
|
+
F as SelectDisplayRenderer
|
|
31
79
|
};
|
package/dist/components/data/ag-grid-react/cell-renderers/style-description-display-renderer.d.ts
ADDED
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { ICellRendererParams } from 'ag-grid-community';
|
|
2
|
+
export interface StyleDescriptionCellValue {
|
|
3
|
+
label?: string;
|
|
4
|
+
/** CSS color for the swatch (token or data-driven hex from the API) */
|
|
5
|
+
swatchColor?: string;
|
|
6
|
+
imageUrl?: string;
|
|
7
|
+
imageAlt?: string;
|
|
8
|
+
}
|
|
9
|
+
export interface StyleDescriptionDisplayRendererProps extends ICellRendererParams {
|
|
10
|
+
/** Row field for the style label (fallback when value is a plain string) */
|
|
11
|
+
labelField?: string;
|
|
12
|
+
/** Row field for swatch color */
|
|
13
|
+
swatchColorField?: string;
|
|
14
|
+
/** Row field for product thumbnail URL */
|
|
15
|
+
imageUrlField?: string;
|
|
16
|
+
/** Row field for image alt text */
|
|
17
|
+
imageAltField?: string;
|
|
18
|
+
/** Shown when label is empty (default em dash) */
|
|
19
|
+
emptyLabel?: string;
|
|
20
|
+
className?: string;
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* StyleDescriptionDisplayRenderer — swatch + label + thumbnail in one cell.
|
|
24
|
+
*
|
|
25
|
+
* Matches Hindsight By Item “Style Description” (color chip, style name,
|
|
26
|
+
* product image with empty fallback). Display-only; no editor pairing.
|
|
27
|
+
*
|
|
28
|
+
* Usage in colDef:
|
|
29
|
+
* ```ts
|
|
30
|
+
* {
|
|
31
|
+
* field: 'styleDescription',
|
|
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
|
+
* ```
|
|
38
|
+
*/
|
|
39
|
+
export declare const StyleDescriptionDisplayRenderer: {
|
|
40
|
+
(props: StyleDescriptionDisplayRendererProps): import("react/jsx-runtime").JSX.Element;
|
|
41
|
+
displayName: string;
|
|
42
|
+
};
|
package/dist/components/data/ag-grid-react/cell-renderers/style-description-display-renderer.js
ADDED
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
import { jsx as l, jsxs as c } from "react/jsx-runtime";
|
|
2
|
+
import { Image as p } from "impact-nova-icons";
|
|
3
|
+
import { Avatar as y, AvatarImage as f, AvatarFallback as g } from "../../../data-display/avatar/avatar.js";
|
|
4
|
+
import { cn as d } from "../../../../lib/utils.js";
|
|
5
|
+
import { getFieldValue as n } from "./cell-renderer-utils.js";
|
|
6
|
+
function b(a) {
|
|
7
|
+
const { value: t, data: i } = a;
|
|
8
|
+
if (t && typeof t == "object" && !Array.isArray(t)) {
|
|
9
|
+
const e = t;
|
|
10
|
+
if (e.value && typeof e.value == "object" && !Array.isArray(e.value))
|
|
11
|
+
return e.value;
|
|
12
|
+
if ("label" in e || "swatchColor" in e || "imageUrl" in e)
|
|
13
|
+
return e;
|
|
14
|
+
}
|
|
15
|
+
const r = typeof t == "string" || typeof t == "number" ? String(t) : void 0;
|
|
16
|
+
return {
|
|
17
|
+
label: n(a.labelField, r, i) ?? void 0,
|
|
18
|
+
swatchColor: n(a.swatchColorField, void 0, i) ?? void 0,
|
|
19
|
+
imageUrl: n(a.imageUrlField, void 0, i) ?? void 0,
|
|
20
|
+
imageAlt: n(a.imageAltField, void 0, i) ?? void 0
|
|
21
|
+
};
|
|
22
|
+
}
|
|
23
|
+
const h = (a) => {
|
|
24
|
+
const { className: t, emptyLabel: i = "—" } = a, { label: r, swatchColor: e, imageUrl: s, imageAlt: u } = b(a), o = r != null && String(r).trim().length > 0, m = o ? String(r) : i;
|
|
25
|
+
return !o && !e && !s ? /* @__PURE__ */ l(
|
|
26
|
+
"div",
|
|
27
|
+
{
|
|
28
|
+
className: d(
|
|
29
|
+
"w-full h-full flex items-center justify-center ag-cell-inner-padding text-content-empty text-sm",
|
|
30
|
+
t
|
|
31
|
+
),
|
|
32
|
+
"data-component": "style-description-display",
|
|
33
|
+
children: i
|
|
34
|
+
}
|
|
35
|
+
) : /* @__PURE__ */ c(
|
|
36
|
+
"div",
|
|
37
|
+
{
|
|
38
|
+
className: d(
|
|
39
|
+
"w-full h-full flex items-center gap-2 ag-cell-inner-padding min-w-0",
|
|
40
|
+
t
|
|
41
|
+
),
|
|
42
|
+
"data-component": "style-description-display",
|
|
43
|
+
children: [
|
|
44
|
+
/* @__PURE__ */ c("div", { className: "flex min-w-0 flex-1 items-center gap-2", children: [
|
|
45
|
+
e ? /* @__PURE__ */ l(
|
|
46
|
+
"span",
|
|
47
|
+
{
|
|
48
|
+
className: "box-border size-4 shrink-0 rounded-sm border border-stroke bg-muted",
|
|
49
|
+
style: { backgroundColor: e },
|
|
50
|
+
title: e,
|
|
51
|
+
"aria-hidden": !0,
|
|
52
|
+
"data-component": "style-description-swatch"
|
|
53
|
+
}
|
|
54
|
+
) : null,
|
|
55
|
+
/* @__PURE__ */ l(
|
|
56
|
+
"span",
|
|
57
|
+
{
|
|
58
|
+
className: d(
|
|
59
|
+
"truncate text-sm font-medium",
|
|
60
|
+
o ? "text-content" : "text-content-empty"
|
|
61
|
+
),
|
|
62
|
+
children: m
|
|
63
|
+
}
|
|
64
|
+
)
|
|
65
|
+
] }),
|
|
66
|
+
/* @__PURE__ */ l("div", { className: "ms-auto flex shrink-0 items-center border-s border-stroke ps-2", children: /* @__PURE__ */ c(
|
|
67
|
+
y,
|
|
68
|
+
{
|
|
69
|
+
size: "sm",
|
|
70
|
+
shape: "square",
|
|
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
|
+
]
|
|
77
|
+
}
|
|
78
|
+
) })
|
|
79
|
+
]
|
|
80
|
+
}
|
|
81
|
+
);
|
|
82
|
+
};
|
|
83
|
+
h.displayName = "StyleDescriptionDisplayRenderer";
|
|
84
|
+
export {
|
|
85
|
+
h as StyleDescriptionDisplayRenderer
|
|
86
|
+
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { AgGridWrapperProps } from './ag-grid.types';
|
|
2
2
|
import { subscribeGridApiEvent, subscribeGridApiEvents } from './grid-api-event-subscription';
|
|
3
3
|
export { subscribeGridApiEvent, subscribeGridApiEvents };
|
|
4
|
-
export declare function AgGridWrapper<TData>({ children, defaultColDef, defaultColGroupDef, columnDefs, valueFormatters, onGridReady: userOnGridReady, onGridPreDestroyed: userOnGridPreDestroyed, onFilterChanged: userOnFilterChanged, onSelectionChanged: userOnSelectionChanged, onModelUpdated: userOnModelUpdated, ensureDomOrder, autoSizeStrategy, tooltipShowMode, tooltipShowDelay, tooltipHideDelay, tooltipInteraction, themeOverride, ...restProps }: AgGridWrapperProps<TData> & {
|
|
4
|
+
export declare function AgGridWrapper<TData>({ children, defaultColDef, defaultColGroupDef, columnDefs, valueFormatters, onGridReady: userOnGridReady, onGridPreDestroyed: userOnGridPreDestroyed, onFilterChanged: userOnFilterChanged, onSelectionChanged: userOnSelectionChanged, onModelUpdated: userOnModelUpdated, ensureDomOrder, autoSizeStrategy, tooltipShowMode, tooltipShowDelay, tooltipHideDelay, tooltipInteraction, themeOverride, variant, ...restProps }: AgGridWrapperProps<TData> & {
|
|
5
5
|
className?: string;
|
|
6
6
|
}): import("react/jsx-runtime").JSX.Element;
|
|
7
7
|
export { useAgGridTruncationTooltip } from './use-ag-grid-truncation-tooltip';
|