impact-nova 3.0.0-alpha.7 → 3.0.0-alpha.9

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.
Files changed (103) hide show
  1. package/README.md +1 -1
  2. package/dist/components/data/expandable-list-item/sku-picker-chrome.d.ts +4 -0
  3. package/dist/components/data/expandable-list-item/sku-picker-chrome.js +37 -42
  4. package/dist/components/data-display/stereo-scatter/index.d.ts +2 -0
  5. package/dist/components/data-display/stereo-scatter/index.js +10 -0
  6. package/dist/components/data-display/stereo-scatter/internals/stereo-engine-frame.d.ts +41 -0
  7. package/dist/components/data-display/stereo-scatter/internals/stereo-engine-frame.js +178 -0
  8. package/dist/components/data-display/stereo-scatter/internals/stereo-engine-theme.d.ts +14 -0
  9. package/dist/components/data-display/stereo-scatter/internals/stereo-engine-theme.js +29 -0
  10. package/dist/components/data-display/stereo-scatter/internals/stereo-engine-wedges.d.ts +23 -0
  11. package/dist/components/data-display/stereo-scatter/internals/stereo-engine-wedges.js +80 -0
  12. package/dist/components/data-display/stereo-scatter/internals/stereo-engine.d.ts +120 -0
  13. package/dist/components/data-display/stereo-scatter/internals/stereo-engine.js +519 -0
  14. package/dist/components/data-display/stereo-scatter/internals/stereo-math.d.ts +64 -0
  15. package/dist/components/data-display/stereo-scatter/internals/stereo-math.js +129 -0
  16. package/dist/components/data-display/stereo-scatter/internals/stereo-model.d.ts +37 -0
  17. package/dist/components/data-display/stereo-scatter/internals/stereo-model.js +71 -0
  18. package/dist/components/data-display/stereo-scatter/internals/stereo-scatter-context.d.ts +33 -0
  19. package/dist/components/data-display/stereo-scatter/internals/stereo-scatter-context.js +19 -0
  20. package/dist/components/data-display/stereo-scatter/internals/stereo-scatter-key.d.ts +4 -0
  21. package/dist/components/data-display/stereo-scatter/internals/stereo-scatter-key.js +19 -0
  22. package/dist/components/data-display/stereo-scatter/internals/stereo-scatter-legend.d.ts +2 -0
  23. package/dist/components/data-display/stereo-scatter/internals/stereo-scatter-legend.js +75 -0
  24. package/dist/components/data-display/stereo-scatter/internals/stereo-scatter-scene.d.ts +2 -0
  25. package/dist/components/data-display/stereo-scatter/internals/stereo-scatter-scene.js +149 -0
  26. package/dist/components/data-display/stereo-scatter/internals/stereo-scatter-toolbar.d.ts +13 -0
  27. package/dist/components/data-display/stereo-scatter/internals/stereo-scatter-toolbar.js +93 -0
  28. package/dist/components/data-display/stereo-scatter/internals/stereo-scatter-tooltip.d.ts +2 -0
  29. package/dist/components/data-display/stereo-scatter/internals/stereo-scatter-tooltip.js +62 -0
  30. package/dist/components/data-display/stereo-scatter/internals/stereo-scatter-viewport.d.ts +3 -0
  31. package/dist/components/data-display/stereo-scatter/internals/stereo-scatter-viewport.js +41 -0
  32. package/dist/components/data-display/stereo-scatter/stereo-scatter.d.ts +12 -0
  33. package/dist/components/data-display/stereo-scatter/stereo-scatter.js +107 -0
  34. package/dist/components/data-display/stereo-scatter/stereo-scatter.stories-data.d.ts +11 -0
  35. package/dist/components/data-display/stereo-scatter/stereo-scatter.types.d.ts +69 -0
  36. package/dist/components/data-display/stereo-scatter/stereo-scatter.variants.d.ts +13 -0
  37. package/dist/components/data-display/stereo-scatter/stereo-scatter.variants.js +42 -0
  38. package/dist/components/feedback/tooltip/button-icon-tooltip.d.ts +3 -1
  39. package/dist/components/feedback/tooltip/button-icon-tooltip.js +22 -19
  40. package/dist/components/flows/iris-chat/IrisChatComposerVoiceCapture.d.ts +5 -0
  41. package/dist/components/flows/iris-chat/IrisChatComposerVoiceCapture.js +73 -0
  42. package/dist/components/flows/iris-chat/IrisChatVoiceWaveform.d.ts +3 -0
  43. package/dist/components/flows/iris-chat/IrisChatVoiceWaveform.js +25 -0
  44. package/dist/components/flows/iris-chat/index.d.ts +3 -1
  45. package/dist/components/flows/iris-chat/index.js +58 -53
  46. package/dist/components/flows/iris-chat/iris-chat-chrome.d.ts +39 -0
  47. package/dist/components/flows/iris-chat/iris-chat-chrome.js +325 -0
  48. package/dist/components/flows/iris-chat/iris-chat-close-animation.d.ts +12 -0
  49. package/dist/components/flows/iris-chat/iris-chat-close-animation.js +21 -0
  50. package/dist/components/flows/iris-chat/iris-chat-composer.js +266 -238
  51. package/dist/components/flows/iris-chat/iris-chat-context.d.ts +13 -0
  52. package/dist/components/flows/iris-chat/iris-chat-context.js +14 -10
  53. package/dist/components/flows/iris-chat/iris-chat-copy-feedback.d.ts +4 -0
  54. package/dist/components/flows/iris-chat/iris-chat-copy-feedback.js +16 -0
  55. package/dist/components/flows/iris-chat/iris-chat-frame.d.ts +31 -0
  56. package/dist/components/flows/iris-chat/iris-chat-frame.js +79 -0
  57. package/dist/components/flows/iris-chat/iris-chat-icons.d.ts +1 -0
  58. package/dist/components/flows/iris-chat/iris-chat-icons.js +28 -15
  59. package/dist/components/flows/iris-chat/iris-chat-launch-animation.d.ts +11 -0
  60. package/dist/components/flows/iris-chat/iris-chat-launch-animation.js +35 -0
  61. package/dist/components/flows/iris-chat/iris-chat-markdown.js +70 -50
  62. package/dist/components/flows/iris-chat/iris-chat-menu.js +91 -86
  63. package/dist/components/flows/iris-chat/iris-chat-speech.d.ts +52 -0
  64. package/dist/components/flows/iris-chat/iris-chat-speech.js +121 -0
  65. package/dist/components/flows/iris-chat/iris-chat-thread.d.ts +3 -0
  66. package/dist/components/flows/iris-chat/iris-chat-thread.js +241 -190
  67. package/dist/components/flows/iris-chat/iris-chat-window-chrome.d.ts +30 -0
  68. package/dist/components/flows/iris-chat/iris-chat-window-chrome.js +34 -0
  69. package/dist/components/flows/iris-chat/iris-chat-window-geometry-context.d.ts +14 -0
  70. package/dist/components/flows/iris-chat/iris-chat-window-geometry-context.js +15 -0
  71. package/dist/components/flows/iris-chat/iris-chat-window-geometry.d.ts +12 -0
  72. package/dist/components/flows/iris-chat/iris-chat-window-geometry.js +113 -0
  73. package/dist/components/flows/iris-chat/iris-chat-window-handles.d.ts +6 -0
  74. package/dist/components/flows/iris-chat/iris-chat-window-handles.js +50 -0
  75. package/dist/components/flows/iris-chat/iris-chat-window-shell.d.ts +8 -0
  76. package/dist/components/flows/iris-chat/iris-chat-window-shell.js +37 -0
  77. package/dist/components/flows/iris-chat/iris-chat.d.ts +3 -39
  78. package/dist/components/flows/iris-chat/iris-chat.js +22 -330
  79. package/dist/components/flows/iris-chat/iris-chat.types.d.ts +18 -0
  80. package/dist/components/flows/iris-chat/iris-chat.variants.d.ts +3 -3
  81. package/dist/components/flows/iris-chat/iris-chat.variants.js +21 -16
  82. package/dist/components/flows/iris-chat/use-iris-chat-root.d.ts +26 -0
  83. package/dist/components/flows/iris-chat/use-iris-chat-root.js +140 -0
  84. package/dist/components/forms/choice-card/choice-card.d.ts +1 -0
  85. package/dist/components/forms/choice-card/choice-card.js +183 -186
  86. package/dist/components/layout/header/header.js +1 -0
  87. package/dist/form-react/Fields/SelectField.js +66 -57
  88. package/dist/form-react/Fields/VirtualizedListField.js +140 -96
  89. package/dist/form-react/index.d.ts +1 -1
  90. package/dist/form-react/types/fields.types.d.ts +27 -0
  91. package/dist/form-react/types/reactHookForm.types.d.ts +18 -1
  92. package/dist/i18n/defaultMessages.d.ts +37 -0
  93. package/dist/i18n/defaultMessages.js +54 -18
  94. package/dist/i18n/index.d.ts +1 -1
  95. package/dist/i18n/locales/de.js +36 -0
  96. package/dist/i18n/locales/es.js +36 -0
  97. package/dist/i18n/locales/hi.js +36 -0
  98. package/dist/i18n/locales/kn.js +36 -0
  99. package/dist/impact-nova-components.css +19 -0
  100. package/dist/impact-nova.css +1 -1
  101. package/dist/llms/rules/installation.js +1 -1
  102. package/dist/llms/rules/requirements.js +1 -1
  103. package/package.json +5 -1
@@ -111,6 +111,7 @@ const P = i(
111
111
  {
112
112
  ref: o,
113
113
  type: "button",
114
+ "data-component": "header-iris-button",
114
115
  className: n(
115
116
  "relative flex items-center justify-center h-8 gap-1 px-3 py-1.5 rounded-md cursor-pointer outline-none",
116
117
  "header-iris-button-gradient",
@@ -1,73 +1,82 @@
1
- import { jsx as c } from "react/jsx-runtime";
2
- import { useState as A } from "react";
3
- import { Controller as f } from "react-hook-form";
1
+ import { jsx as u } from "react/jsx-runtime";
2
+ import { useState as R } from "react";
3
+ import { Controller as v } from "react-hook-form";
4
4
  import { Select as M } from "../../components/forms/select/select.js";
5
- import { useSelectOptions as x } from "../hooks/useSelectOptions.js";
6
- import { getFieldTestId as T } from "../utils/fieldTestIds.js";
7
- const L = ({
8
- field: e,
9
- validationRules: p,
10
- isDisabled: u,
11
- formHelpers: n,
12
- supportedValues: d
5
+ import { useSelectOptions as T } from "../hooks/useSelectOptions.js";
6
+ import { getFieldTestId as E } from "../utils/fieldTestIds.js";
7
+ const F = ({
8
+ field: t,
9
+ validationRules: m,
10
+ isDisabled: S,
11
+ formHelpers: r,
12
+ supportedValues: b
13
13
  }) => {
14
- const t = e.fieldType === "select" ? e : null, [m, i] = A(!1), S = n.form.control, h = d?.[e.id], { options: g, isLoading: b, error: O, refetch: C } = x({
15
- apiConfig: t?.apiConfig,
16
- formHelpers: n,
17
- initialOptions: t?.options,
18
- id: e.id,
19
- isEnabled: m,
20
- getSelectOptionsName: t?.getSelectOptionsName,
21
- fieldSupportedValues: h,
22
- cascadingDependency: e.cascadingDependency
14
+ const e = t.fieldType === "select" ? t : null, [h, l] = R(!1), g = r.form.control, O = b?.[t.id], { options: i, isLoading: C, error: x, refetch: y } = T({
15
+ apiConfig: e?.apiConfig,
16
+ formHelpers: r,
17
+ initialOptions: e?.options,
18
+ id: t.id,
19
+ isEnabled: h,
20
+ getSelectOptionsName: e?.getSelectOptionsName,
21
+ fieldSupportedValues: O,
22
+ cascadingDependency: t.cascadingDependency
23
23
  });
24
- return t ? /* @__PURE__ */ c(
25
- f,
24
+ if (!e) return null;
25
+ const s = e.optionRendererName ? r.formContext?.optionRenderers?.[e.optionRendererName] : void 0;
26
+ return /* @__PURE__ */ u(
27
+ v,
26
28
  {
27
- name: e.id,
28
- control: S,
29
- rules: p,
30
- render: ({ field: o, fieldState: l }) => {
31
- const s = !!l.error, a = o.value, y = t?.isMultiSelect ? a ?? [] : a?.[0] ?? null;
32
- return /* @__PURE__ */ c(
29
+ name: t.id,
30
+ control: g,
31
+ rules: m,
32
+ render: ({ field: o, fieldState: a }) => {
33
+ const c = !!a.error, d = o.value, f = e?.isMultiSelect ? d ?? [] : d?.[0] ?? null;
34
+ return /* @__PURE__ */ u(
33
35
  M,
34
36
  {
35
- id: e.id,
36
- label: e.label,
37
- placeholder: e?.placeholder,
38
- required: e.isRequired,
39
- isReadOnly: e.isFieldReadonly,
40
- disabled: u,
41
- options: g,
42
- maxSelectableOptions: t?.maxSelectLimit,
43
- value: y,
44
- onChange: (r) => {
45
- t?.isMultiSelect ? o.onChange(
46
- Array.isArray(r) ? r : []
47
- ) : r == null ? o.onChange([]) : o.onChange(
48
- Array.isArray(r) ? r : [r]
37
+ id: t.id,
38
+ label: t.label,
39
+ placeholder: t?.placeholder,
40
+ required: t.isRequired,
41
+ isReadOnly: t.isFieldReadonly,
42
+ disabled: S,
43
+ options: i,
44
+ maxSelectableOptions: e?.maxSelectLimit,
45
+ value: f,
46
+ onChange: (n) => {
47
+ e?.isMultiSelect ? o.onChange(
48
+ Array.isArray(n) ? n : []
49
+ ) : n == null ? o.onChange([]) : o.onChange(
50
+ Array.isArray(n) ? n : [n]
49
51
  );
50
52
  },
51
- isSearchable: !t?.disableOptionSearch,
52
- isClearable: !t?.disableClearAll,
53
- multiple: t?.isMultiSelect,
54
- isSelectAllEnabled: !t?.disableSelectAll,
55
- labelOrientation: t?.labelOrientation || "top",
56
- error: s,
57
- helperText: s ? l.error?.message : e.helpText,
53
+ isSearchable: !e?.disableOptionSearch,
54
+ isClearable: !e?.disableClearAll,
55
+ multiple: e?.isMultiSelect,
56
+ isSelectAllEnabled: !e?.disableSelectAll,
57
+ labelOrientation: e?.labelOrientation || "top",
58
+ error: c,
59
+ helperText: c ? a.error?.message : t.helpText,
58
60
  ignoreAccents: !0,
59
- isLoading: b,
60
- fetchError: O,
61
- onRefetch: C,
62
- onMenuOpen: () => i(!0),
63
- onMenuClose: () => i(!1),
64
- "data-testid": T(e.id)
61
+ isLoading: C,
62
+ fetchError: x,
63
+ onRefetch: y,
64
+ onMenuOpen: () => l(!0),
65
+ onMenuClose: () => l(!1),
66
+ renderOption: s ? (n, p) => s({
67
+ option: p,
68
+ index: i.findIndex((A) => A.value === p.value),
69
+ options: i,
70
+ selected: n.selected,
71
+ disabled: n.disabled
72
+ }) : void 0,
73
+ "data-testid": E(t.id)
65
74
  }
66
75
  );
67
76
  }
68
77
  }
69
- ) : null;
78
+ );
70
79
  };
71
80
  export {
72
- L as SelectField
81
+ F as SelectField
73
82
  };
@@ -1,179 +1,223 @@
1
- import { jsx as i, jsxs as S } from "react/jsx-runtime";
1
+ import { jsx as l, jsxs as T } from "react/jsx-runtime";
2
2
  import { useState as b } from "react";
3
- import { Controller as O } from "react-hook-form";
4
- import { ChoiceCardGroup as k, ChoiceCard as I, ChoiceCardIndicator as j, ChoiceCardContent as q, ChoiceCardTitle as z } from "../../components/forms/choice-card/choice-card.js";
5
- import { SkuPickerChrome as B } from "../../components/data/expandable-list-item/sku-picker-chrome.js";
6
- import { nextAlphabeticalSortDirection as M, compareAlphabeticalValues as P } from "../../lib/alphabetical-sort.js";
7
- import { cn as y } from "../../lib/utils.js";
8
- import { getFieldTestId as E } from "../utils/fieldTestIds.js";
9
- function G(e) {
3
+ import { Controller as E } from "react-hook-form";
4
+ import { ChoiceCardGroup as R, ChoiceCard as W, ChoiceCardIndicator as _, ChoiceCardContent as P, ChoiceCardTitle as j } from "../../components/forms/choice-card/choice-card.js";
5
+ import { OverflowTooltip as q } from "../../components/feedback/tooltip/overflow-tooltip.js";
6
+ import { SkuPickerChrome as z } from "../../components/data/expandable-list-item/sku-picker-chrome.js";
7
+ import { nextAlphabeticalSortDirection as B, compareAlphabeticalValues as H } from "../../lib/alphabetical-sort.js";
8
+ import { cn as N } from "../../lib/utils.js";
9
+ import { getFieldTestId as y } from "../utils/fieldTestIds.js";
10
+ const G = 180, U = [];
11
+ function Y(e) {
10
12
  if (!Array.isArray(e))
11
13
  return [];
12
- const r = [];
14
+ const n = [];
13
15
  for (const t of e)
14
- typeof t == "string" && r.push(t);
15
- return r;
16
+ typeof t == "string" && n.push(t);
17
+ return n;
16
18
  }
17
- function x(e, r, t) {
19
+ function S(e, n, t) {
18
20
  if (t === "single") {
19
- const n = Array.from(r).find((s) => !e.includes(s));
20
- return n ? [n] : Array.from(r).slice(0, 1);
21
+ const o = Array.from(n).find((s) => !e.includes(s));
22
+ return o ? [o] : Array.from(n).slice(0, 1);
21
23
  }
22
- const a = [];
23
- for (const n of e)
24
- r.has(n) && a.push(n);
25
- for (const n of r)
26
- e.includes(n) || a.push(n);
27
- return a;
24
+ const r = [];
25
+ for (const o of e)
26
+ n.has(o) && r.push(o);
27
+ for (const o of n)
28
+ e.includes(o) || r.push(o);
29
+ return r;
28
30
  }
29
- function d(e) {
31
+ function m(e) {
30
32
  return typeof e.label == "string" ? e.label : e.value;
31
33
  }
32
- function R(e, r, t) {
33
- const a = r.trim().toLowerCase(), n = e.filter(
34
- (s) => d(s).toLowerCase().includes(a)
34
+ function J(e, n, t) {
35
+ const r = n.trim().toLowerCase(), o = e.filter(
36
+ (s) => m(s).toLowerCase().includes(r)
35
37
  );
36
- return t === "none" ? n : n.sort(
37
- (s, f) => P(
38
- d(s),
39
- d(f),
38
+ return t === "none" ? o : o.sort(
39
+ (s, f) => H(
40
+ m(s),
41
+ m(f),
40
42
  t
41
43
  )
42
44
  );
43
45
  }
44
- function _(e, r) {
46
+ function K(e, n) {
45
47
  let t = 0;
46
- for (const a of e)
47
- if (a.isDisabled !== !0 && (t += 1, !r.includes(a.value)))
48
+ for (const r of e)
49
+ if (r.isDisabled !== !0 && (t += 1, !n.includes(r.value)))
48
50
  return !1;
49
51
  return t > 0;
50
52
  }
51
- function $(e, r) {
53
+ function Q(e, n) {
52
54
  const t = [];
53
- for (const a of r) {
54
- const n = e.find((s) => s.value === a);
55
- if (n && (t.push(d(n)), t.length === 5))
55
+ for (const r of n) {
56
+ const o = e.find((s) => s.value === r);
57
+ if (o && (t.push(m(o)), t.length === 5))
56
58
  break;
57
59
  }
58
60
  return t;
59
61
  }
60
- function H(e) {
61
- const r = e.view === "card";
62
- return /* @__PURE__ */ i(
63
- k,
62
+ function x(e) {
63
+ if (!(e === void 0 || e <= 0))
64
+ return e;
65
+ }
66
+ function X(e) {
67
+ const n = `${e.itemMinWidth}px`;
68
+ if (e.view === "list")
69
+ return `repeat(${x(e.listColumnCount) ?? 1}, minmax(${n}, 1fr))`;
70
+ const t = x(e.cardColumnCount);
71
+ return t ? `repeat(${t}, minmax(${n}, 1fr))` : `repeat(auto-fit, minmax(${n}, 1fr))`;
72
+ }
73
+ function Z(e) {
74
+ const n = e.view === "card", t = m(e.option), r = e.renderOption ? e.renderOption({
75
+ option: e.option,
76
+ index: e.index,
77
+ options: e.options,
78
+ selected: e.selected,
79
+ disabled: e.disabled,
80
+ view: e.view
81
+ }) : null;
82
+ return /* @__PURE__ */ l(
83
+ R,
64
84
  {
65
85
  type: "multiple",
66
- value: e.selected ? [e.option.value] : [],
67
- onValueChange: (t) => {
68
- t.includes(e.option.value) !== e.selected && e.onToggle();
86
+ value: e.selected ? [e.option.value] : U,
87
+ onValueChange: (o) => {
88
+ o.includes(e.option.value) !== e.selected && e.onToggle();
69
89
  },
70
90
  disabled: e.disabled,
71
91
  className: "min-w-0 w-full",
72
- children: /* @__PURE__ */ S(
73
- I,
92
+ children: /* @__PURE__ */ T(
93
+ W,
74
94
  {
75
95
  value: e.option.value,
76
96
  size: "sm",
77
97
  disabled: e.disabled,
78
- "aria-label": d(e.option),
79
- className: y(
98
+ "aria-label": t,
99
+ className: N(
80
100
  "w-full min-w-0 items-center",
81
- !r && "justify-start gap-3 rounded-none border-0 bg-transparent p-0 shadow-none hover:border-0 data-[selected]:border-0 data-[selected]:bg-transparent data-[selected]:shadow-none"
101
+ !n && "justify-start gap-3 rounded-none border-0 bg-transparent p-0 shadow-none hover:border-0 data-[selected]:border-0 data-[selected]:bg-transparent data-[selected]:shadow-none"
82
102
  ),
83
103
  children: [
84
- /* @__PURE__ */ i(
85
- j,
104
+ e.indicatorStyle === "none" ? null : /* @__PURE__ */ l(
105
+ _,
86
106
  {
87
- className: r ? "order-last self-center" : "order-first self-center"
107
+ shape: e.indicatorStyle === "radio" ? "radio" : void 0,
108
+ className: n ? "order-last self-center" : "order-first self-center"
88
109
  }
89
110
  ),
90
- /* @__PURE__ */ i(q, { className: "min-w-0", children: /* @__PURE__ */ i(z, { className: "whitespace-normal normal-case", children: d(e.option) }) })
111
+ /* @__PURE__ */ l(P, { className: "min-w-0 overflow-hidden", children: r ?? /* @__PURE__ */ l(j, { className: "min-w-0 normal-case", children: /* @__PURE__ */ l(
112
+ q,
113
+ {
114
+ triggerClassName: "truncate whitespace-nowrap normal-case",
115
+ content: t,
116
+ children: t
117
+ }
118
+ ) }) })
91
119
  ]
92
120
  }
93
121
  )
94
122
  }
95
123
  );
96
124
  }
97
- const F = ({
125
+ const se = ({
98
126
  field: e,
99
- validationRules: r,
127
+ validationRules: n,
100
128
  isDisabled: t,
101
- formHelpers: a
129
+ formHelpers: r
102
130
  }) => {
103
- const [n, s] = b(""), [f, N] = b("none"), [m, V] = b("card");
131
+ const [o, s] = b(""), [f, A] = b("none"), [h, L] = b("card");
104
132
  if (e.fieldType !== "virtualized_list") return null;
105
- const C = e.options ?? [], g = e.selectionMode ?? "multi", A = a.form.control, h = R(C, n, f);
106
- return /* @__PURE__ */ i(
107
- O,
133
+ const v = e.options ?? [], C = e.selectionMode ?? "multi", O = e.viewportHeight ?? 240, V = e.itemMinWidth ?? G, M = e.optionRendererName ? r.formContext?.optionRenderers?.[e.optionRendererName] : void 0, $ = r.form.control, d = J(v, o, f);
134
+ return /* @__PURE__ */ l(
135
+ E,
108
136
  {
109
137
  name: e.id,
110
- control: A,
138
+ control: $,
111
139
  disabled: t,
112
- rules: r,
113
- render: ({ field: u, fieldState: p }) => {
114
- const c = G(u.value), v = !!p.error, w = v ? p.error?.message : e.helpText, L = (l) => {
115
- if (t || l.isDisabled === !0)
140
+ rules: n,
141
+ render: ({ field: u, fieldState: w }) => {
142
+ const c = Y(u.value), g = !!w.error, p = g ? w.error?.message : e.helpText, D = (i) => {
143
+ if (t || i.isDisabled === !0 || C === "single" && c.includes(i.value))
116
144
  return;
117
- const o = new Set(c);
118
- o.has(l.value) ? o.delete(l.value) : o.add(l.value), u.onChange(x(c, o, g));
119
- }, T = () => {
120
- if (g === "single") {
121
- const o = h.find((D) => D.isDisabled !== !0);
122
- u.onChange(o ? [o.value] : []);
145
+ const a = new Set(c);
146
+ a.has(i.value) ? a.delete(i.value) : a.add(i.value), u.onChange(S(c, a, C));
147
+ }, I = () => {
148
+ if (C === "single") {
149
+ const a = d.find((k) => k.isDisabled !== !0);
150
+ u.onChange(a ? [a.value] : []);
123
151
  return;
124
152
  }
125
- const l = new Set(c);
126
- for (const o of h)
127
- o.isDisabled !== !0 && l.add(o.value);
128
- u.onChange(x(c, l, "multi"));
153
+ const i = new Set(c);
154
+ for (const a of d)
155
+ a.isDisabled !== !0 && i.add(a.value);
156
+ u.onChange(S(c, i, "multi"));
129
157
  };
130
- return /* @__PURE__ */ S("div", { "data-testid": E(e.id), children: [
131
- /* @__PURE__ */ i(
132
- B,
158
+ return /* @__PURE__ */ T("div", { "data-testid": y(e.id), children: [
159
+ /* @__PURE__ */ l(
160
+ z,
133
161
  {
134
162
  collapsible: e.collapsible,
135
163
  defaultCollapsed: e.defaultCollapsed,
136
- title: e.label,
164
+ title: e.label?.trim() ? e.label : void 0,
137
165
  required: e.isRequired,
138
166
  emptyLabel: "None selected",
139
167
  searchLabel: e.label ? `Search ${e.label}` : "Search",
140
168
  showBack: !1,
141
- view: m,
142
- search: n,
169
+ showToolbar: e.showToolbar,
170
+ view: h,
171
+ search: o,
143
172
  sortDirection: f,
144
173
  selectedCount: c.length,
145
- allSelected: _(h, c),
146
- previewCodes: $(C, c),
174
+ allSelected: K(d, c),
175
+ previewCodes: Q(v, c),
147
176
  onSearchChange: s,
148
- onViewChange: V,
149
- onToggleSort: () => N((l) => M(l)),
150
- onSelectAll: T,
177
+ onViewChange: L,
178
+ onToggleSort: () => A((i) => B(i)),
179
+ showBulkActions: C === "multi",
180
+ onSelectAll: I,
151
181
  onClear: () => u.onChange([]),
152
- children: /* @__PURE__ */ i(
182
+ children: /* @__PURE__ */ l(
153
183
  "div",
154
184
  {
155
- className: m === "card" ? "grid w-full grid-cols-[repeat(auto-fill,minmax(180px,1fr))] gap-3" : "flex w-full flex-col gap-2",
156
- children: h.map((l) => /* @__PURE__ */ i(
157
- H,
185
+ "data-testid": `${y(e.id)}-options`,
186
+ className: h === "card" ? "grid w-full min-w-0 gap-3 overflow-y-auto" : "grid w-full min-w-0 gap-2 overflow-y-auto",
187
+ style: {
188
+ maxHeight: O,
189
+ gridTemplateColumns: X({
190
+ view: h,
191
+ cardColumnCount: e.cardColumnCount,
192
+ listColumnCount: e.listColumnCount,
193
+ itemMinWidth: V
194
+ })
195
+ },
196
+ children: d.map((i, a) => /* @__PURE__ */ l(
197
+ Z,
158
198
  {
159
- option: l,
160
- selected: c.includes(l.value),
161
- disabled: t || l.isDisabled === !0,
162
- view: m,
163
- onToggle: () => L(l)
199
+ option: i,
200
+ index: a,
201
+ options: d,
202
+ selected: c.includes(i.value),
203
+ disabled: t || i.isDisabled === !0,
204
+ view: h,
205
+ indicatorStyle: e.indicatorStyle,
206
+ renderOption: M,
207
+ onToggle: () => D(i)
164
208
  },
165
- l.value
209
+ i.value
166
210
  ))
167
211
  }
168
212
  )
169
213
  }
170
214
  ),
171
- w ? /* @__PURE__ */ i("p", { className: y("mt-1 text-xs", v ? "text-destructive" : "text-content-tertiary"), children: w }) : null
215
+ p ? /* @__PURE__ */ l("p", { className: N("mt-1 text-xs", g ? "text-destructive" : "text-content-tertiary"), children: p }) : null
172
216
  ] });
173
217
  }
174
218
  }
175
219
  );
176
220
  };
177
221
  export {
178
- F as VirtualizedListField
222
+ se as VirtualizedListField
179
223
  };
@@ -36,7 +36,7 @@ export { FormFileUploadWrapper } from './components/FormFileUploadWrapper';
36
36
  export { registerFieldType, getFieldComponent, hasRegisteredFieldType, listRegisteredFieldTypes, } from './registry/fieldRegistry';
37
37
  export { registerDefaultFieldTypes } from './registry/defaultFieldRegistrations';
38
38
  export { resolveFieldComponent, renderRegisteredField } from './registry/resolveFieldComponent';
39
- export type { IFormConfig, FormFieldProps, FormType, FormStepConfig, FormStepStateMeta, ReactHooksFormStepActions, FieldVisibilityBase, ReactHooksFormProps, UseSelectOptionsProps, FormContext, FormValidationMeta, FormTransport, CustomFieldTypesMap, FetchSelectOptionsParams, PastedValuesValidationResult, ValidatePastedValuesParams, ValidateUploadedFileParams, UploadedFileValidationResult, ValidateTextFieldWithBackendParams, TextFieldBackendValidationResult, SupportedValuesMap, } from './types/reactHookForm.types';
39
+ export type { IFormConfig, FormFieldProps, FormType, FormStepConfig, FormStepStateMeta, ReactHooksFormStepActions, FieldVisibilityBase, ReactHooksFormProps, UseSelectOptionsProps, FormContext, OptionRenderParams, OptionRenderer, FormValidationMeta, FormTransport, CustomFieldTypesMap, FetchSelectOptionsParams, PastedValuesValidationResult, ValidatePastedValuesParams, ValidateUploadedFileParams, UploadedFileValidationResult, ValidateTextFieldWithBackendParams, TextFieldBackendValidationResult, SupportedValuesMap, } from './types/reactHookForm.types';
40
40
  export type { IField } from './types/fields.types';
41
41
  export type * from './types/fields.types';
42
42
  export type * from './types/fieldsOutput.types';
@@ -117,6 +117,11 @@ export type SelectField = BaseField & {
117
117
  * When set, that resolver is used instead of apiConfig fetch.
118
118
  */
119
119
  getSelectOptionsName?: string;
120
+ /**
121
+ * Name of formContext.optionRenderers[name].
122
+ * Replaces the default option row content. Omit for the default label.
123
+ */
124
+ optionRendererName?: string;
120
125
  apiConfig?: {
121
126
  apiEndpoint: string;
122
127
  method: "GET" | "POST";
@@ -507,6 +512,28 @@ export type VirtualizedListField = BaseField & {
507
512
  collapsible?: boolean;
508
513
  /** Start folded. Ignored unless `collapsible` is set. */
509
514
  defaultCollapsed?: boolean;
515
+ /**
516
+ * Columns in card view. Omit for `auto-fill` at `itemMinWidth`.
517
+ */
518
+ cardColumnCount?: number;
519
+ /**
520
+ * Columns in list view. Default: 1.
521
+ */
522
+ listColumnCount?: number;
523
+ /** Minimum item width in pixels. Default: 180. */
524
+ itemMinWidth?: number;
525
+ /**
526
+ * Name of formContext.optionRenderers[name].
527
+ * Replaces the default option label inside the choice card. Omit for the default label.
528
+ */
529
+ optionRendererName?: string;
530
+ /** Search, sort, view toggle, Select All, and Clear. Default: true. */
531
+ showToolbar?: boolean;
532
+ /**
533
+ * Selection mark on each option.
534
+ * Omit for the checkbox. `'radio'` is the round mark. `'none'` is the card highlight only.
535
+ */
536
+ indicatorStyle?: "checkbox" | "radio" | "none";
510
537
  };
511
538
  export type DividerField = BaseField & {
512
539
  fieldType: "divider";
@@ -1,4 +1,4 @@
1
- import { ComponentType } from 'react';
1
+ import { ComponentType, ReactNode } from 'react';
2
2
  import { FieldErrors, FormState, RegisterOptions, UseFormReturn } from 'react-hook-form';
3
3
  import { Option } from '../../components/forms/select';
4
4
  import { FieldVisibilityBase, FormStepConfig } from '../../form-engine';
@@ -46,6 +46,18 @@ export type FormContextValidator = (params: FormContextFieldChangeParams) => str
46
46
  export type FormContextGetSelectOptions = (params: FormContextFieldChangeParams) => Option[] | Promise<Option[]>;
47
47
  export type FormContextFunction = (params: FormContextFunctionParams) => unknown | Promise<unknown>;
48
48
  export type FormContextOnFieldChange = (params: FormContextFieldChangeParams) => void;
49
+ /** Per-option render params — same shape for select menus and virtualized lists. */
50
+ export type OptionRenderParams = {
51
+ option: Option;
52
+ index: number;
53
+ options: readonly Option[];
54
+ selected: boolean;
55
+ disabled: boolean;
56
+ /** Set by virtualized_list. Select menu rows omit it. */
57
+ view?: 'card' | 'list';
58
+ };
59
+ /** Named option content renderer, looked up via field.optionRendererName. */
60
+ export type OptionRenderer = (params: OptionRenderParams) => ReactNode;
49
61
  export type FetchSelectOptionsParams = {
50
62
  fieldId: string;
51
63
  apiConfig: NonNullable<SelectField['apiConfig']>;
@@ -136,6 +148,11 @@ export interface FormContext {
136
148
  getSelectOptions?: Record<string, FormContextGetSelectOptions>;
137
149
  /** Named handlers — referenced via BaseField.handlerName (on change + specialized validate) */
138
150
  functions?: Record<string, FormContextFunction>;
151
+ /**
152
+ * Named option content renderers — referenced via optionRendererName
153
+ * on select and virtualized_list fields.
154
+ */
155
+ optionRenderers?: Record<string, OptionRenderer>;
139
156
  /** Called after any field value changes */
140
157
  onFieldChange?: FormContextOnFieldChange;
141
158
  /** Host-provided network transport (axios, fetch, etc.) — not implemented by Impact Nova */
@@ -314,10 +314,22 @@ export interface IrisChatMessages {
314
314
  attachImage: string;
315
315
  mic: string;
316
316
  listening: string;
317
+ listeningHint: string;
318
+ speechRecordingTitle: string;
319
+ speechRecordingHint: string;
320
+ speechRecordingWaiting: string;
321
+ speechStopRecording: string;
322
+ speechUnsupported: string;
323
+ speechPermissionDenied: string;
324
+ speechNoSpeech: string;
325
+ speechNetwork: string;
326
+ speechError: string;
327
+ speechEmpty: string;
317
328
  model: string;
318
329
  newChat: string;
319
330
  minimize: string;
320
331
  expand: string;
332
+ resize: string;
321
333
  back: string;
322
334
  filter: string;
323
335
  filterType: string;
@@ -433,6 +445,30 @@ export interface GlobeMapMessages {
433
445
  trendingNow: string;
434
446
  slideLabel: string;
435
447
  }
448
+ export interface StereoScatterMessages {
449
+ chartLabel: string;
450
+ legend: string;
451
+ hideCluster: string;
452
+ showCluster: string;
453
+ storeCount: string;
454
+ toolbar: string;
455
+ viewIso: string;
456
+ viewFront: string;
457
+ viewTop: string;
458
+ viewSide: string;
459
+ zoomIn: string;
460
+ zoomOut: string;
461
+ resetView: string;
462
+ autoRotate: string;
463
+ towardViewer: string;
464
+ awayFromViewer: string;
465
+ clusterAverage: string;
466
+ inspectCluster: string;
467
+ versusAverage: string;
468
+ interactionHint: string;
469
+ clearFocus: string;
470
+ webglUnavailable: string;
471
+ }
436
472
  export interface ImpactNovaMessages {
437
473
  calendar: CalendarMessages;
438
474
  datePicker: DatePickerMessages;
@@ -456,6 +492,7 @@ export interface ImpactNovaMessages {
456
492
  irisChat: IrisChatMessages;
457
493
  hexTilemap: HexTilemapMessages;
458
494
  globeMap: GlobeMapMessages;
495
+ stereoScatter: StereoScatterMessages;
459
496
  }
460
497
  /** Default English messages used when no provider or partial override */
461
498
  export declare const defaultMessages: ImpactNovaMessages;