impact-nova 3.0.0-alpha.1 → 3.0.0-alpha.11
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.types.d.ts +5 -0
- package/dist/components/data/ag-grid-react/cell-renderers/cell-renderer-utils.js +12 -10
- package/dist/components/data/ag-grid-react/cell-renderers/editors/list-select-cell-editor.js +56 -42
- 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/link-with-batch-cell-renderer.js +0 -2
- 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.d.ts +8 -0
- package/dist/components/data/ag-grid-react/cell-renderers/select-display-renderer.js +57 -42
- package/dist/components/data/ag-grid-react/cell-renderers/types.d.ts +4 -0
- 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/advanced-filter/advanced-filter-dialog.js +29 -31
- package/dist/components/data/ag-grid-react/headers/components/lazy-tooltip.js +6 -8
- package/dist/components/data/ag-grid-react/headers/header-search-input.js +203 -199
- package/dist/components/data/ag-grid-react/index.d.ts +1 -1
- package/dist/components/data/ag-grid-react/index.js +115 -111
- package/dist/components/data/expandable-list-item/expandable-list-item-attributes.js +6 -9
- package/dist/components/data/expandable-list-item/expandable-list-item-metrics.js +2 -3
- 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-display/calendar/fiscal-period-caption-select.js +2 -4
- 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/popover/popover.js +1 -1
- package/dist/components/feedback/tooltip/button-icon-tooltip.d.ts +6 -1
- package/dist/components/feedback/tooltip/button-icon-tooltip.js +22 -19
- package/dist/components/feedback/tooltip/tab-tooltip-render.js +4 -7
- 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/guidance/renderers/guidance-card-shared.js +1 -1
- 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 +48 -38
- 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 +266 -238
- 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 +1 -0
- package/dist/components/flows/iris-chat/iris-chat-icons.js +28 -15
- 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 +46 -23
- 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-percent.js +82 -51
- package/dist/components/forms/choice-card/choice-card.d.ts +1 -0
- package/dist/components/forms/choice-card/choice-card.js +196 -199
- package/dist/components/forms/choice-card/choice-card.variants.js +3 -3
- package/dist/components/forms/combobox/combobox.js +1 -1
- 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 +8 -9
- package/dist/components/forms/select/components/Submenu.js +2 -3
- package/dist/components/layout/breadcrumb/breadcrumb.js +1 -1
- 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 +76 -84
- 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 +92 -91
- package/dist/components/primitives/stepper/stepper.types.d.ts +2 -0
- 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 +50 -0
- package/dist/i18n/defaultMessages.js +63 -14
- package/dist/i18n/index.d.ts +1 -1
- package/dist/i18n/locales/de.js +49 -0
- package/dist/i18n/locales/es.js +49 -0
- package/dist/i18n/locales/hi.js +49 -0
- package/dist/i18n/locales/kn.js +49 -0
- package/dist/impact-nova-components.css +195 -8
- package/dist/impact-nova.css +1 -1
- package/dist/index.js +356 -352
- package/dist/lib/alphabetical-sort.d.ts +3 -0
- package/dist/lib/alphabetical-sort.js +13 -0
- package/dist/lib/overflow/is-text-overflowing.js +24 -6
- package/dist/llms/rules/installation.js +1 -1
- package/dist/llms/rules/requirements.js +1 -1
- package/dist/providers/app-providers.js +11 -13
- package/package.json +8 -2
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { AlphabeticalSortDirection } from '../../../lib/alphabetical-sort';
|
|
3
|
+
export type SkuPickerView = "card" | "list";
|
|
4
|
+
export type SkuPickerGridProps = {
|
|
5
|
+
/** Fold the toolbar and choices behind the title row. */
|
|
6
|
+
collapsible?: boolean;
|
|
7
|
+
/** Start folded. Ignored unless `collapsible` is set. */
|
|
8
|
+
defaultCollapsed?: boolean;
|
|
9
|
+
/** Title in the header. Default: SKU. */
|
|
10
|
+
title?: string;
|
|
11
|
+
required?: boolean;
|
|
12
|
+
};
|
|
13
|
+
export declare function SkuPickerChrome(props: {
|
|
14
|
+
view: SkuPickerView;
|
|
15
|
+
search: string;
|
|
16
|
+
sortDirection: AlphabeticalSortDirection;
|
|
17
|
+
selectedCount: number;
|
|
18
|
+
/** True when every choice Select All would touch is already selected. */
|
|
19
|
+
allSelected?: boolean;
|
|
20
|
+
previewCodes: string[];
|
|
21
|
+
onSearchChange: (value: string) => void;
|
|
22
|
+
onViewChange: (view: SkuPickerView) => void;
|
|
23
|
+
onToggleSort: () => void;
|
|
24
|
+
onSelectAll: () => void;
|
|
25
|
+
onClear: () => void;
|
|
26
|
+
/** Multi-select shows Select All and Clear. Single-select omits them. */
|
|
27
|
+
showBulkActions?: boolean;
|
|
28
|
+
/** Search, sort, view toggle, and bulk actions. Default: true. */
|
|
29
|
+
showToolbar?: boolean;
|
|
30
|
+
children: ReactNode;
|
|
31
|
+
footer?: ReactNode;
|
|
32
|
+
collapsible?: boolean;
|
|
33
|
+
defaultCollapsed?: boolean;
|
|
34
|
+
title?: string;
|
|
35
|
+
required?: boolean;
|
|
36
|
+
emptyLabel?: string;
|
|
37
|
+
searchLabel?: string;
|
|
38
|
+
/** Story picker keeps the back control. Form fields omit it. */
|
|
39
|
+
showBack?: boolean;
|
|
40
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,150 @@
|
|
|
1
|
+
import { jsx as t, jsxs as l } from "react/jsx-runtime";
|
|
2
|
+
import { Search as s, CardView as m, ListFilter as u, ArrowUp as h, ArrowDown as b, Back as f } from "impact-nova-icons";
|
|
3
|
+
import "react";
|
|
4
|
+
import { Badge as v } from "../../data-display/badge/badge.js";
|
|
5
|
+
import { ButtonIconTooltip as c } from "../../feedback/tooltip/button-icon-tooltip.js";
|
|
6
|
+
import { Input as x } from "../../forms/input/input.js";
|
|
7
|
+
import { Accordion as w, AccordionItem as g, AccordionTrigger as C, AccordionContent as N } from "../../primitives/accordion/accordion.js";
|
|
8
|
+
import { Button as i } from "../../primitives/button/button.js";
|
|
9
|
+
import { cn as S } from "../../../lib/utils.js";
|
|
10
|
+
const o = "picker";
|
|
11
|
+
function y(e) {
|
|
12
|
+
return S(
|
|
13
|
+
e && "border-brand bg-accent text-brand hover:bg-accent hover:text-brand"
|
|
14
|
+
);
|
|
15
|
+
}
|
|
16
|
+
function A(e) {
|
|
17
|
+
if (e.selectedCount === 0)
|
|
18
|
+
return /* @__PURE__ */ t("p", { className: "text-xs font-medium text-content-muted", children: e.emptyLabel });
|
|
19
|
+
const a = Math.max(0, e.selectedCount - e.previewCodes.length);
|
|
20
|
+
return /* @__PURE__ */ l("div", { className: "flex min-w-0 items-center gap-1", children: [
|
|
21
|
+
/* @__PURE__ */ t("p", { className: "truncate text-xs font-medium text-content-muted", children: e.previewCodes.join(", ") }),
|
|
22
|
+
a > 0 ? /* @__PURE__ */ l(v, { variant: "subtle", color: "primary", size: "sm", shape: "square", children: [
|
|
23
|
+
"+",
|
|
24
|
+
a
|
|
25
|
+
] }) : null
|
|
26
|
+
] });
|
|
27
|
+
}
|
|
28
|
+
function V(e) {
|
|
29
|
+
const a = e.title?.trim() ? e.title : void 0, n = /* @__PURE__ */ t(
|
|
30
|
+
A,
|
|
31
|
+
{
|
|
32
|
+
selectedCount: e.selectedCount,
|
|
33
|
+
previewCodes: e.previewCodes,
|
|
34
|
+
emptyLabel: e.emptyLabel ?? "No SKUs selected"
|
|
35
|
+
}
|
|
36
|
+
), r = /* @__PURE__ */ l("div", { className: "flex items-center justify-between gap-3", children: [
|
|
37
|
+
/* @__PURE__ */ l("div", { className: "flex items-center gap-3", children: [
|
|
38
|
+
/* @__PURE__ */ t(
|
|
39
|
+
x,
|
|
40
|
+
{
|
|
41
|
+
size: "default",
|
|
42
|
+
className: "w-[200px]",
|
|
43
|
+
placeholder: "Search",
|
|
44
|
+
value: e.search,
|
|
45
|
+
onChange: (d) => e.onSearchChange(d.target.value),
|
|
46
|
+
prefix: /* @__PURE__ */ t(s, { className: "size-4 text-content-placeholder", "aria-hidden": !0 }),
|
|
47
|
+
"aria-label": e.searchLabel ?? "Search SKUs"
|
|
48
|
+
}
|
|
49
|
+
),
|
|
50
|
+
/* @__PURE__ */ t(
|
|
51
|
+
c,
|
|
52
|
+
{
|
|
53
|
+
label: e.view === "card" ? "Switch to list view" : "Switch to card view",
|
|
54
|
+
children: /* @__PURE__ */ t(
|
|
55
|
+
i,
|
|
56
|
+
{
|
|
57
|
+
type: "button",
|
|
58
|
+
size: "icon",
|
|
59
|
+
variant: "tertiary",
|
|
60
|
+
"aria-label": e.view === "card" ? "Switch to list view" : "Switch to card view",
|
|
61
|
+
"aria-pressed": e.view === "list",
|
|
62
|
+
onClick: () => e.onViewChange(e.view === "card" ? "list" : "card"),
|
|
63
|
+
children: e.view === "card" ? /* @__PURE__ */ t(m, {}) : /* @__PURE__ */ t(u, {})
|
|
64
|
+
}
|
|
65
|
+
)
|
|
66
|
+
}
|
|
67
|
+
),
|
|
68
|
+
/* @__PURE__ */ t(
|
|
69
|
+
c,
|
|
70
|
+
{
|
|
71
|
+
label: e.sortDirection === "desc" ? "Sort Z to A" : "Sort A to Z",
|
|
72
|
+
children: /* @__PURE__ */ t(
|
|
73
|
+
i,
|
|
74
|
+
{
|
|
75
|
+
type: "button",
|
|
76
|
+
size: "icon",
|
|
77
|
+
variant: "tertiary",
|
|
78
|
+
"aria-label": e.sortDirection === "desc" ? "Sort Z to A" : "Sort A to Z",
|
|
79
|
+
"aria-pressed": e.sortDirection !== "none",
|
|
80
|
+
className: y(e.sortDirection !== "none"),
|
|
81
|
+
onClick: e.onToggleSort,
|
|
82
|
+
children: e.sortDirection === "desc" ? /* @__PURE__ */ t(h, {}) : /* @__PURE__ */ t(b, {})
|
|
83
|
+
}
|
|
84
|
+
)
|
|
85
|
+
}
|
|
86
|
+
)
|
|
87
|
+
] }),
|
|
88
|
+
e.showBulkActions === !1 ? null : /* @__PURE__ */ l("div", { className: "flex items-center gap-3", children: [
|
|
89
|
+
/* @__PURE__ */ t(
|
|
90
|
+
i,
|
|
91
|
+
{
|
|
92
|
+
type: "button",
|
|
93
|
+
variant: "ghost",
|
|
94
|
+
className: "text-brand hover:text-brand",
|
|
95
|
+
onClick: e.onSelectAll,
|
|
96
|
+
disabled: e.allSelected === !0,
|
|
97
|
+
children: "Select All"
|
|
98
|
+
}
|
|
99
|
+
),
|
|
100
|
+
/* @__PURE__ */ t(
|
|
101
|
+
i,
|
|
102
|
+
{
|
|
103
|
+
type: "button",
|
|
104
|
+
variant: "ghost",
|
|
105
|
+
className: "text-brand hover:text-brand",
|
|
106
|
+
onClick: e.onClear,
|
|
107
|
+
disabled: e.selectedCount === 0,
|
|
108
|
+
children: "Clear"
|
|
109
|
+
}
|
|
110
|
+
)
|
|
111
|
+
] })
|
|
112
|
+
] });
|
|
113
|
+
return e.collapsible ? /* @__PURE__ */ t(
|
|
114
|
+
w,
|
|
115
|
+
{
|
|
116
|
+
type: "single",
|
|
117
|
+
collapsible: !0,
|
|
118
|
+
defaultValue: e.defaultCollapsed ? void 0 : o,
|
|
119
|
+
className: "w-full",
|
|
120
|
+
children: /* @__PURE__ */ l(g, { value: o, className: "border border-stroke-subtle", children: [
|
|
121
|
+
/* @__PURE__ */ t(C, { headingLevel: 3, rightActions: n, children: a ? /* @__PURE__ */ l("span", { className: "truncate text-sm font-semibold leading-6 text-content-title", children: [
|
|
122
|
+
a,
|
|
123
|
+
e.required ? /* @__PURE__ */ t("span", { className: "text-destructive", children: " *" }) : null
|
|
124
|
+
] }) : null }),
|
|
125
|
+
/* @__PURE__ */ l(N, { className: "flex flex-col gap-3", children: [
|
|
126
|
+
e.showToolbar === !1 ? null : r,
|
|
127
|
+
e.children,
|
|
128
|
+
e.footer
|
|
129
|
+
] })
|
|
130
|
+
] })
|
|
131
|
+
}
|
|
132
|
+
) : /* @__PURE__ */ l("div", { className: "flex w-full flex-col gap-3 overflow-hidden rounded-lg border border-stroke-subtle bg-canvas-elevated px-4 py-2", children: [
|
|
133
|
+
/* @__PURE__ */ l("div", { className: "flex items-center justify-between gap-3", children: [
|
|
134
|
+
/* @__PURE__ */ l("div", { className: "flex items-center gap-3", children: [
|
|
135
|
+
e.showBack === !1 ? null : /* @__PURE__ */ t(i, { type: "button", size: "icon", variant: "ghost", "aria-label": "Back", children: /* @__PURE__ */ t(f, {}) }),
|
|
136
|
+
a ? /* @__PURE__ */ l("p", { className: "text-sm font-semibold leading-6 text-content-title", children: [
|
|
137
|
+
a,
|
|
138
|
+
e.required ? /* @__PURE__ */ t("span", { className: "text-destructive", children: " *" }) : null
|
|
139
|
+
] }) : null
|
|
140
|
+
] }),
|
|
141
|
+
n
|
|
142
|
+
] }),
|
|
143
|
+
e.showToolbar === !1 ? null : r,
|
|
144
|
+
e.children,
|
|
145
|
+
e.footer
|
|
146
|
+
] });
|
|
147
|
+
}
|
|
148
|
+
export {
|
|
149
|
+
V as SkuPickerChrome
|
|
150
|
+
};
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
|
|
1
|
+
import { AlphabeticalSortDirection } from '../../../lib/alphabetical-sort';
|
|
2
|
+
export declare function useServerSkuInfinitePages(search: string, sortDirection: AlphabeticalSortDirection): {
|
|
2
3
|
debouncedSearch: string;
|
|
3
4
|
query: import('@tanstack/react-query').UseInfiniteQueryResult<import('@tanstack/query-core').InfiniteData<import('./virtualized-responsive-grid.catalog').SkuServerPage, unknown>, Error>;
|
|
4
5
|
loadedCatalogIndices: number[];
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { ImageComponent } from 'impact-nova-icons';
|
|
2
|
+
import { AlphabeticalSortDirection } from '../../../lib/alphabetical-sort';
|
|
2
3
|
export declare const SKU_CATALOG_TOTAL = 50000;
|
|
3
4
|
export declare const ITEM_CATALOG_TOTAL = 50000;
|
|
4
5
|
export declare const SERVER_PAGE_SIZE = 200;
|
|
@@ -8,7 +9,7 @@ export declare const SKU_CARD_COLUMN_GAP = 12;
|
|
|
8
9
|
export declare const SKU_CARD_HEIGHT = 66;
|
|
9
10
|
export declare const SKU_LIST_MINIMUM_WIDTH = 155;
|
|
10
11
|
export declare const SKU_LIST_COLUMN_GAP = 80;
|
|
11
|
-
export declare const SKU_LIST_ROW_HEIGHT =
|
|
12
|
+
export declare const SKU_LIST_ROW_HEIGHT = 36;
|
|
12
13
|
export declare const SKU_LIST_ROW_GAP = 16;
|
|
13
14
|
export declare const SKU_STRIP_OVERSCAN = 12;
|
|
14
15
|
export declare const BY_ITEM_VISUAL_GRID_COLUMN_COUNT = 4;
|
|
@@ -57,11 +58,11 @@ export type SkuServerPage = {
|
|
|
57
58
|
nextStartIndex?: number;
|
|
58
59
|
};
|
|
59
60
|
/** Reuse the filtered catalog for later pages of the same search. Does not mutate cached arrays. */
|
|
60
|
-
export declare function getCachedSkuMatchingIndices(searchQuery: string,
|
|
61
|
+
export declare function getCachedSkuMatchingIndices(searchQuery: string, sortDirection: AlphabeticalSortDirection): number[] | null;
|
|
61
62
|
export declare function fetchSkuServerPage(options: {
|
|
62
63
|
startIndex: number;
|
|
63
64
|
searchQuery: string;
|
|
64
|
-
|
|
65
|
+
sortDirection: AlphabeticalSortDirection;
|
|
65
66
|
pageSize?: number;
|
|
66
67
|
}): Promise<SkuServerPage>;
|
|
67
68
|
export declare function getItemCatalogRecord(catalogIndex: number): ItemCatalogRecord;
|
|
@@ -75,7 +76,7 @@ export declare function collectStripCatalogIndices(options: {
|
|
|
75
76
|
export declare function filterAndSortCatalogIndices(options: {
|
|
76
77
|
totalCount: number;
|
|
77
78
|
searchQuery: string;
|
|
78
|
-
|
|
79
|
+
sortDirection: AlphabeticalSortDirection;
|
|
79
80
|
getSearchText: (catalogIndex: number) => string;
|
|
80
81
|
getSortKey: (catalogIndex: number) => string;
|
|
81
82
|
}): number[] | null;
|
package/dist/components/data/expandable-list-item/virtualized-responsive-grid.sku-picker.d.ts
CHANGED
|
@@ -1,2 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
export declare function
|
|
1
|
+
import { SkuPickerGridProps } from './sku-picker-chrome';
|
|
2
|
+
export declare function ClientSkuPickerGrid(props?: SkuPickerGridProps): import("react/jsx-runtime").JSX.Element;
|
|
3
|
+
export declare function ServerSkuPickerGrid(props?: SkuPickerGridProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -2,10 +2,8 @@ import { jsx as t, jsxs as v } from "react/jsx-runtime";
|
|
|
2
2
|
import * as f from "react";
|
|
3
3
|
import { Select as C } from "../../forms/select/select.js";
|
|
4
4
|
import { Tooltip as O, TooltipTrigger as S, TooltipContent as b } from "../../feedback/tooltip/tooltip.js";
|
|
5
|
-
import "clsx";
|
|
6
|
-
import "tailwind-merge";
|
|
7
5
|
import { formatPeriodTooltip as g, formatPeriodOption as T, formatPeriodCell as x } from "./calendar-fiscal-labels.js";
|
|
8
|
-
function
|
|
6
|
+
function N({
|
|
9
7
|
periods: i,
|
|
10
8
|
selectedPeriod: o,
|
|
11
9
|
placeholder: m,
|
|
@@ -61,5 +59,5 @@ function w({
|
|
|
61
59
|
) : p;
|
|
62
60
|
}
|
|
63
61
|
export {
|
|
64
|
-
|
|
62
|
+
N as FiscalPeriodCaptionSelect
|
|
65
63
|
};
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { default as Highcharts, Chart3dOptions } from 'highcharts';
|
|
2
|
+
import { ChartProps } from './chart.types';
|
|
3
|
+
type DragChart = {
|
|
4
|
+
container: object;
|
|
5
|
+
pointer: {
|
|
6
|
+
normalize: (event: unknown) => {
|
|
7
|
+
chartX: number;
|
|
8
|
+
chartY: number;
|
|
9
|
+
};
|
|
10
|
+
};
|
|
11
|
+
options: {
|
|
12
|
+
chart?: {
|
|
13
|
+
options3d?: {
|
|
14
|
+
alpha?: number;
|
|
15
|
+
beta?: number;
|
|
16
|
+
};
|
|
17
|
+
};
|
|
18
|
+
};
|
|
19
|
+
update: (options: {
|
|
20
|
+
chart: {
|
|
21
|
+
options3d: {
|
|
22
|
+
alpha: number;
|
|
23
|
+
beta: number;
|
|
24
|
+
};
|
|
25
|
+
};
|
|
26
|
+
}, redraw?: boolean, oneToOne?: boolean, animation?: boolean) => void;
|
|
27
|
+
};
|
|
28
|
+
type Unbind = () => void;
|
|
29
|
+
type AddEvent = (element: object, type: string, handler: (event: unknown) => void) => Unbind | void;
|
|
30
|
+
/** Drag-to-rotate for Highcharts 3D charts (bound from `chart.events.load`). */
|
|
31
|
+
export declare function attach3dDragRotation(chart: DragChart, addEvent: AddEvent): void;
|
|
32
|
+
export declare function enable3dDragRotation(this: DragChart): void;
|
|
33
|
+
export declare function chartUsesScatter3d(props: Pick<ChartProps, 'is3D' | 'type' | 'series'>): boolean;
|
|
34
|
+
type Chart3dFrame = NonNullable<Chart3dOptions['frame']>;
|
|
35
|
+
export declare function mergeScatter3dChartLoadHandlers(userLoad: Highcharts.ChartLoadCallbackFunction | undefined): Highcharts.ChartLoadCallbackFunction;
|
|
36
|
+
export declare function mergeScatter3dOptions3dFrame(base: Chart3dFrame | undefined, override: Chart3dFrame | undefined): Chart3dFrame | undefined;
|
|
37
|
+
/** Design-system defaults for 3D scatter (axes, frame, markers, drag rotation). */
|
|
38
|
+
export declare function getScatter3dHighchartsOptions(props: Pick<ChartProps, 'xAxisTitle' | 'yAxisTitle' | 'options'>): Highcharts.Options;
|
|
39
|
+
export {};
|
|
@@ -0,0 +1,180 @@
|
|
|
1
|
+
import L from "highcharts";
|
|
2
|
+
import { getInitializedHighcharts as v } from "./initializeHighcharts.js";
|
|
3
|
+
const c = "var(--color-surface-muted)", g = 5;
|
|
4
|
+
function n(t) {
|
|
5
|
+
return typeof t == "function" ? t : void 0;
|
|
6
|
+
}
|
|
7
|
+
function S(t, e) {
|
|
8
|
+
let i;
|
|
9
|
+
const o = (l) => {
|
|
10
|
+
const h = t.pointer.normalize(l), y = h.chartX, x = h.chartY, A = t.options.chart?.options3d?.alpha ?? 0, z = t.options.chart?.options3d?.beta ?? 0, r = [], p = (d) => {
|
|
11
|
+
const m = t.pointer.normalize(d);
|
|
12
|
+
t.update(
|
|
13
|
+
{
|
|
14
|
+
chart: {
|
|
15
|
+
options3d: {
|
|
16
|
+
alpha: A + (m.chartY - x) / g,
|
|
17
|
+
beta: z + (y - m.chartX) / g
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
},
|
|
21
|
+
void 0,
|
|
22
|
+
void 0,
|
|
23
|
+
!1
|
|
24
|
+
);
|
|
25
|
+
}, f = () => {
|
|
26
|
+
r.forEach((d) => d?.()), r.length = 0, i = void 0;
|
|
27
|
+
};
|
|
28
|
+
i = f, r.push(n(e(document, "mousemove", p))), r.push(n(e(document, "touchmove", p))), r.push(n(e(document, "mouseup", f))), r.push(n(e(document, "touchend", f)));
|
|
29
|
+
}, s = [
|
|
30
|
+
n(e(t.container, "mousedown", o)),
|
|
31
|
+
n(e(t.container, "touchstart", o))
|
|
32
|
+
];
|
|
33
|
+
n(e(t, "destroy", () => {
|
|
34
|
+
i?.(), s.forEach((l) => l?.());
|
|
35
|
+
}));
|
|
36
|
+
}
|
|
37
|
+
function T() {
|
|
38
|
+
v();
|
|
39
|
+
const t = L.addEvent;
|
|
40
|
+
typeof t == "function" && S(this, t);
|
|
41
|
+
}
|
|
42
|
+
function F(t) {
|
|
43
|
+
return t.is3D ? t.type === "scatter3d" || t.series?.some((e) => "type" in e && e.type === "scatter3d") ? !0 : t.type === "scatter" : !1;
|
|
44
|
+
}
|
|
45
|
+
const k = {
|
|
46
|
+
color: "var(--color-foreground-tertiary)",
|
|
47
|
+
fontFamily: '"Manrope", sans-serif',
|
|
48
|
+
fontSize: "12px",
|
|
49
|
+
fontWeight: "500"
|
|
50
|
+
}, u = {
|
|
51
|
+
color: "var(--color-foreground-tertiary)",
|
|
52
|
+
fontFamily: '"Manrope", sans-serif',
|
|
53
|
+
fontSize: "14px",
|
|
54
|
+
fontWeight: "500",
|
|
55
|
+
lineHeight: "20px"
|
|
56
|
+
};
|
|
57
|
+
function D() {
|
|
58
|
+
return {
|
|
59
|
+
type: "linear",
|
|
60
|
+
categories: void 0,
|
|
61
|
+
startOnTick: !0,
|
|
62
|
+
endOnTick: !0,
|
|
63
|
+
showFirstLabel: !0,
|
|
64
|
+
showLastLabel: !0,
|
|
65
|
+
gridLineWidth: 1,
|
|
66
|
+
gridLineColor: "var(--color-border)",
|
|
67
|
+
gridLineDashStyle: "Solid",
|
|
68
|
+
minorGridLineWidth: 0,
|
|
69
|
+
lineWidth: 1,
|
|
70
|
+
lineColor: "var(--color-border)",
|
|
71
|
+
tickWidth: 0,
|
|
72
|
+
tickLength: 0,
|
|
73
|
+
labels: {
|
|
74
|
+
style: k,
|
|
75
|
+
position3d: "offset",
|
|
76
|
+
skew3d: !1
|
|
77
|
+
}
|
|
78
|
+
};
|
|
79
|
+
}
|
|
80
|
+
function b(t, e) {
|
|
81
|
+
if (!e)
|
|
82
|
+
return t;
|
|
83
|
+
const i = ["bottom", "back", "left", "right", "top", "front"], o = { ...t, ...e };
|
|
84
|
+
for (const s of i)
|
|
85
|
+
e[s] && (o[s] = { ...t?.[s], ...e[s] });
|
|
86
|
+
return o;
|
|
87
|
+
}
|
|
88
|
+
function O(t) {
|
|
89
|
+
return function(...i) {
|
|
90
|
+
T.call(this), typeof t == "function" && t.apply(this, i);
|
|
91
|
+
};
|
|
92
|
+
}
|
|
93
|
+
function R(t, e) {
|
|
94
|
+
return b(t, e);
|
|
95
|
+
}
|
|
96
|
+
function W(t) {
|
|
97
|
+
const i = t.options?.chart?.options3d, o = Array.isArray(t.options?.zAxis) ? t.options?.zAxis[0] : t.options?.zAxis, s = {
|
|
98
|
+
size: 1,
|
|
99
|
+
bottom: { color: c, size: 1, visible: !0 },
|
|
100
|
+
back: { color: c, size: 1, visible: !0 },
|
|
101
|
+
left: { color: c, size: 1, visible: !0 },
|
|
102
|
+
right: { color: c, size: 1, visible: !1 },
|
|
103
|
+
top: { color: "transparent", size: 0, visible: !1 },
|
|
104
|
+
front: { color: "transparent", size: 0, visible: !1 }
|
|
105
|
+
}, a = D();
|
|
106
|
+
return {
|
|
107
|
+
chart: {
|
|
108
|
+
type: "scatter3d",
|
|
109
|
+
spacingLeft: 0,
|
|
110
|
+
spacingRight: 0,
|
|
111
|
+
marginLeft: 24,
|
|
112
|
+
marginRight: 8,
|
|
113
|
+
options3d: {
|
|
114
|
+
enabled: !0,
|
|
115
|
+
alpha: 16,
|
|
116
|
+
beta: 22,
|
|
117
|
+
depth: 320,
|
|
118
|
+
viewDistance: 18,
|
|
119
|
+
fitToPlot: !0,
|
|
120
|
+
...i,
|
|
121
|
+
frame: b(s, i?.frame)
|
|
122
|
+
}
|
|
123
|
+
},
|
|
124
|
+
xAxis: {
|
|
125
|
+
...a,
|
|
126
|
+
crosshair: !1,
|
|
127
|
+
title: t.xAxisTitle ? {
|
|
128
|
+
text: t.xAxisTitle,
|
|
129
|
+
style: u,
|
|
130
|
+
position3d: "offset",
|
|
131
|
+
skew3d: !1
|
|
132
|
+
} : void 0
|
|
133
|
+
},
|
|
134
|
+
yAxis: {
|
|
135
|
+
...a,
|
|
136
|
+
title: t.yAxisTitle ? {
|
|
137
|
+
text: t.yAxisTitle,
|
|
138
|
+
style: u,
|
|
139
|
+
position3d: "offset",
|
|
140
|
+
skew3d: !1,
|
|
141
|
+
reserveSpace: !0,
|
|
142
|
+
margin: 18,
|
|
143
|
+
x: 0
|
|
144
|
+
} : void 0
|
|
145
|
+
},
|
|
146
|
+
zAxis: {
|
|
147
|
+
...a,
|
|
148
|
+
showFirstLabel: !1,
|
|
149
|
+
labels: {
|
|
150
|
+
...a.labels,
|
|
151
|
+
step: 5,
|
|
152
|
+
y: 14
|
|
153
|
+
},
|
|
154
|
+
title: {
|
|
155
|
+
text: o?.title?.text ?? "",
|
|
156
|
+
style: u,
|
|
157
|
+
position3d: "offset",
|
|
158
|
+
skew3d: !1
|
|
159
|
+
},
|
|
160
|
+
...o
|
|
161
|
+
},
|
|
162
|
+
plotOptions: {
|
|
163
|
+
scatter3d: {
|
|
164
|
+
marker: {
|
|
165
|
+
radius: 5,
|
|
166
|
+
symbol: "circle",
|
|
167
|
+
lineWidth: 0
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
}
|
|
171
|
+
};
|
|
172
|
+
}
|
|
173
|
+
export {
|
|
174
|
+
S as attach3dDragRotation,
|
|
175
|
+
F as chartUsesScatter3d,
|
|
176
|
+
T as enable3dDragRotation,
|
|
177
|
+
W as getScatter3dHighchartsOptions,
|
|
178
|
+
O as mergeScatter3dChartLoadHandlers,
|
|
179
|
+
R as mergeScatter3dOptions3dFrame
|
|
180
|
+
};
|