impact-nova 2.3.0 → 2.5.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.
Files changed (162) hide show
  1. package/dist/components/data/data-table/data-table-column-list.js +16 -16
  2. package/dist/components/data/data-table/data-table-sheet-layout.d.ts +26 -0
  3. package/dist/components/data/data-table/data-table-sheet-layout.js +71 -0
  4. package/dist/components/data/data-table/data-table-sheet.d.ts +2 -0
  5. package/dist/components/data/data-table/index.d.ts +1 -0
  6. package/dist/components/data/data-table/index.js +40 -34
  7. package/dist/components/data/nested-list/hooks/useNestedListHandlers.d.ts +3 -2
  8. package/dist/components/data/nested-list/hooks/useNestedListHandlers.js +129 -130
  9. package/dist/components/data/nested-list/hooks/useNestedListState.d.ts +2 -3
  10. package/dist/components/data/nested-list/hooks/useNestedListState.js +118 -117
  11. package/dist/components/data/nested-list/nested-list.js +219 -221
  12. package/dist/components/flows/accordion-nested-list/accordion-nested-list.js +80 -65
  13. package/dist/components/forms/date-picker/month-picker.js +136 -109
  14. package/dist/filter-shell/index.d.ts +12 -0
  15. package/dist/filter-shell/index.js +9 -0
  16. package/dist/filter-shell/utils/buildFilterFieldValidationRules.d.ts +1 -0
  17. package/dist/filter-shell/utils/validateVisibleRequiredFilterFields.d.ts +1 -0
  18. package/dist/filter-shell/utils/validationNavigation.utils.d.ts +26 -0
  19. package/dist/filter-shell/utils/validationNavigation.utils.js +38 -0
  20. package/dist/form-engine/field-dependency-graph.d.ts +17 -0
  21. package/dist/form-engine/field-dependency-graph.js +90 -0
  22. package/dist/form-engine/index.d.ts +9 -0
  23. package/dist/form-engine/index.js +16 -0
  24. package/dist/form-engine/is-empty-value.d.ts +1 -0
  25. package/dist/form-engine/is-empty-value.js +8 -0
  26. package/dist/form-engine/types.d.ts +17 -0
  27. package/dist/form-react/Fields/ButtonsGroupField.d.ts +3 -0
  28. package/dist/form-react/Fields/ButtonsGroupField.js +52 -0
  29. package/dist/form-react/Fields/CheckboxField.d.ts +3 -0
  30. package/dist/form-react/Fields/CheckboxField.js +46 -0
  31. package/dist/form-react/Fields/ChipsField.d.ts +3 -0
  32. package/dist/form-react/Fields/ChipsField.js +146 -0
  33. package/dist/form-react/Fields/DateInputField.d.ts +8 -0
  34. package/dist/form-react/Fields/DateInputField.js +134 -0
  35. package/dist/form-react/Fields/DateRangeField.d.ts +8 -0
  36. package/dist/form-react/Fields/DateRangeField.js +57 -0
  37. package/dist/form-react/Fields/DividerField.d.ts +3 -0
  38. package/dist/form-react/Fields/DividerField.js +9 -0
  39. package/dist/form-react/Fields/DividerWithLabelField.d.ts +3 -0
  40. package/dist/form-react/Fields/DividerWithLabelField.js +31 -0
  41. package/dist/form-react/Fields/FileUploadField.d.ts +3 -0
  42. package/dist/form-react/Fields/FileUploadField.js +42 -0
  43. package/dist/form-react/Fields/FillFormByFileUploadField.d.ts +3 -0
  44. package/dist/form-react/Fields/FillFormByFileUploadField.js +65 -0
  45. package/dist/form-react/Fields/FillFormByPasteField.d.ts +3 -0
  46. package/dist/form-react/Fields/FillFormByPasteField.js +106 -0
  47. package/dist/form-react/Fields/LabelField.d.ts +3 -0
  48. package/dist/form-react/Fields/LabelField.js +14 -0
  49. package/dist/form-react/Fields/MonthRangeField.d.ts +8 -0
  50. package/dist/form-react/Fields/MonthRangeField.js +72 -0
  51. package/dist/form-react/Fields/MultiMonthPickerField.d.ts +8 -0
  52. package/dist/form-react/Fields/MultiMonthPickerField.js +46 -0
  53. package/dist/form-react/Fields/MultiWeekPickerField.d.ts +8 -0
  54. package/dist/form-react/Fields/MultiWeekPickerField.js +47 -0
  55. package/dist/form-react/Fields/NumericComboboxField.d.ts +18 -0
  56. package/dist/form-react/Fields/NumericComboboxField.js +51 -0
  57. package/dist/form-react/Fields/RadioField.d.ts +3 -0
  58. package/dist/form-react/Fields/RadioField.js +68 -0
  59. package/dist/form-react/Fields/SelectField.d.ts +3 -0
  60. package/dist/form-react/Fields/SelectField.js +76 -0
  61. package/dist/form-react/Fields/SwitchField.d.ts +3 -0
  62. package/dist/form-react/Fields/SwitchField.js +47 -0
  63. package/dist/form-react/Fields/TextAreaField.d.ts +3 -0
  64. package/dist/form-react/Fields/TextAreaField.js +41 -0
  65. package/dist/form-react/Fields/TextField.d.ts +3 -0
  66. package/dist/form-react/Fields/TextField.js +75 -0
  67. package/dist/form-react/Fields/TextFieldWithBackendValidation.d.ts +3 -0
  68. package/dist/form-react/Fields/TextFieldWithBackendValidation.js +117 -0
  69. package/dist/form-react/Fields/WeekRangePicker.d.ts +8 -0
  70. package/dist/form-react/Fields/WeekRangePicker.js +71 -0
  71. package/dist/form-react/ReactHooksForm.d.ts +3 -0
  72. package/dist/form-react/ReactHooksForm.js +132 -0
  73. package/dist/form-react/components/ArrayFieldRenderer.d.ts +13 -0
  74. package/dist/form-react/components/ArrayFieldRenderer.js +90 -0
  75. package/dist/form-react/components/FieldRenderer.d.ts +16 -0
  76. package/dist/form-react/components/FieldRenderer.js +68 -0
  77. package/dist/form-react/components/FormFieldRow.d.ts +13 -0
  78. package/dist/form-react/components/FormFieldRow.js +47 -0
  79. package/dist/form-react/components/FormFileUploadWrapper.d.ts +22 -0
  80. package/dist/form-react/components/FormFileUploadWrapper.js +88 -0
  81. package/dist/form-react/components/ObjectFieldRenderer.d.ts +13 -0
  82. package/dist/form-react/components/ObjectFieldRenderer.js +46 -0
  83. package/dist/form-react/components/SetToEmptyWrapper.d.ts +16 -0
  84. package/dist/form-react/components/SetToEmptyWrapper.js +49 -0
  85. package/dist/form-react/fields.d.ts +23 -0
  86. package/dist/form-react/fields.js +40 -0
  87. package/dist/form-react/hooks/useCascadingForm.d.ts +17 -0
  88. package/dist/form-react/hooks/useCascadingForm.js +122 -0
  89. package/dist/form-react/hooks/useFieldVisibility.d.ts +14 -0
  90. package/dist/form-react/hooks/useFieldVisibility.js +60 -0
  91. package/dist/form-react/hooks/useFillFormByFileUpload.d.ts +33 -0
  92. package/dist/form-react/hooks/useFillFormByFileUpload.js +199 -0
  93. package/dist/form-react/hooks/useFillFormByPaste.d.ts +33 -0
  94. package/dist/form-react/hooks/useFillFormByPaste.js +104 -0
  95. package/dist/form-react/hooks/useFormFieldChangeSubscription.d.ts +13 -0
  96. package/dist/form-react/hooks/useFormFieldChangeSubscription.js +42 -0
  97. package/dist/form-react/hooks/useReactHookForm.d.ts +3 -0
  98. package/dist/form-react/hooks/useReactHookForm.js +161 -0
  99. package/dist/form-react/hooks/useSelectOptions.d.ts +8 -0
  100. package/dist/form-react/hooks/useSelectOptions.js +116 -0
  101. package/dist/form-react/index.d.ts +62 -0
  102. package/dist/form-react/index.js +97 -0
  103. package/dist/form-react/registry/defaultFieldRegistrations.d.ts +2 -0
  104. package/dist/form-react/registry/defaultFieldRegistrations.js +30 -0
  105. package/dist/form-react/registry/fieldRegistry.d.ts +14 -0
  106. package/dist/form-react/registry/fieldRegistry.js +19 -0
  107. package/dist/form-react/registry/resolveFieldComponent.d.ts +10 -0
  108. package/dist/form-react/registry/resolveFieldComponent.js +137 -0
  109. package/dist/form-react/types/fields.types.d.ts +402 -0
  110. package/dist/form-react/types/fieldsOutput.types.d.ts +73 -0
  111. package/dist/form-react/types/reactHookForm.types.d.ts +196 -0
  112. package/dist/form-react/utils/batchFormFieldUpdates.d.ts +14 -0
  113. package/dist/form-react/utils/batchFormFieldUpdates.js +13 -0
  114. package/dist/form-react/utils/buildFieldValidationRules.d.ts +6 -0
  115. package/dist/form-react/utils/buildFieldValidationRules.js +13 -0
  116. package/dist/form-react/utils/buildSelectRemountKey.d.ts +14 -0
  117. package/dist/form-react/utils/buildSelectRemountKey.js +14 -0
  118. package/dist/form-react/utils/calendar-boundary.d.ts +3 -0
  119. package/dist/form-react/utils/calendar-boundary.js +33 -0
  120. package/dist/form-react/utils/date.utils.d.ts +31 -0
  121. package/dist/form-react/utils/date.utils.js +86 -0
  122. package/dist/form-react/utils/evaluateFieldValidation.d.ts +19 -0
  123. package/dist/form-react/utils/evaluateFieldValidation.js +53 -0
  124. package/dist/form-react/utils/fieldDefaults.utils.d.ts +6 -0
  125. package/dist/form-react/utils/fieldDefaults.utils.js +25 -0
  126. package/dist/form-react/utils/fieldPath.utils.d.ts +23 -0
  127. package/dist/form-react/utils/fieldPath.utils.js +26 -0
  128. package/dist/form-react/utils/fieldRangeValidation.utils.d.ts +3 -0
  129. package/dist/form-react/utils/fieldRangeValidation.utils.js +24 -0
  130. package/dist/form-react/utils/fieldRendererUtils.d.ts +10 -0
  131. package/dist/form-react/utils/fieldRendererUtils.js +47 -0
  132. package/dist/form-react/utils/fieldTestIds.d.ts +3 -0
  133. package/dist/form-react/utils/fieldTestIds.js +13 -0
  134. package/dist/form-react/utils/formDate.utils.d.ts +13 -0
  135. package/dist/form-react/utils/formDate.utils.js +9 -0
  136. package/dist/form-react/utils/formValidationFeedback.utils.d.ts +32 -0
  137. package/dist/form-react/utils/formValidationFeedback.utils.js +153 -0
  138. package/dist/form-react/utils/icons.d.ts +5 -0
  139. package/dist/form-react/utils/icons.js +10 -0
  140. package/dist/form-react/utils/optionFlag.d.ts +11 -0
  141. package/dist/form-react/utils/optionFlag.js +17 -0
  142. package/dist/form-react/utils/pastedValues.d.ts +1 -0
  143. package/dist/form-react/utils/resolveFormSubmittable.d.ts +18 -0
  144. package/dist/form-react/utils/resolveFormSubmittable.js +32 -0
  145. package/dist/form-react/utils/select-option-filter-values.d.ts +5 -0
  146. package/dist/form-react/utils/select-option-filter-values.js +30 -0
  147. package/dist/form-react/utils/serializeFormStateForQueryKey.d.ts +1 -0
  148. package/dist/form-react/utils/serializeFormStateForQueryKey.js +21 -0
  149. package/dist/form-react/utils/stableSerialize.d.ts +5 -0
  150. package/dist/form-react/utils/stableSerialize.js +11 -0
  151. package/dist/form-react/utils/validateVisibleRequiredFormFields.d.ts +21 -0
  152. package/dist/form-react/utils/validateVisibleRequiredFormFields.js +64 -0
  153. package/dist/form-react/utils/validationUtils.d.ts +3 -0
  154. package/dist/form-react/utils/validationUtils.js +77 -0
  155. package/dist/impact-nova.css +1 -1
  156. package/dist/index.js +170 -164
  157. package/dist/lib/primitives/use-field-chrome.js +16 -16
  158. package/dist/llms/rules/ag-grid.js +1 -1
  159. package/dist/llms/rules/installation.js +1 -1
  160. package/dist/llms/rules/real-world-patterns.js +1 -1
  161. package/dist/llms/rules/requirements.js +1 -1
  162. package/package.json +21 -2
@@ -1,166 +1,167 @@
1
- import { useState as u, useMemo as O, useCallback as g } from "react";
2
- function p(s) {
3
- const e = /* @__PURE__ */ new Map(), t = /* @__PURE__ */ new Map(), n = /* @__PURE__ */ new Map(), d = [], i = (r, h) => {
4
- r.forEach((o) => {
5
- e.set(o.id, o), n.set(o.id, h), o.children && o.children.length > 0 ? (t.set(o.id, o.children.map((C) => C.id)), i(o.children, o.id)) : t.set(o.id, []), h === null && d.push(o.id);
1
+ import { useState as o, useCallback as y, useRef as N, useEffect as z, useMemo as ss } from "react";
2
+ function l(t) {
3
+ const n = /* @__PURE__ */ new Map(), s = /* @__PURE__ */ new Map(), e = /* @__PURE__ */ new Map(), u = [], i = (I, h) => {
4
+ I.forEach((r) => {
5
+ n.set(r.id, r), e.set(r.id, h), r.children && r.children.length > 0 ? (s.set(r.id, r.children.map((C) => C.id)), i(r.children, r.id)) : s.set(r.id, []), h === null && u.push(r.id);
6
6
  });
7
7
  };
8
- return i(s, null), { byId: e, childrenById: t, parentById: n, rootIds: d };
8
+ return i(t, null), { byId: n, childrenById: s, parentById: e, rootIds: u };
9
9
  }
10
- function a(s) {
11
- const e = (t) => {
12
- const n = [];
13
- for (const d of t) {
14
- const i = s.byId.get(d);
10
+ function T(t) {
11
+ const n = (s) => {
12
+ const e = [];
13
+ for (const u of s) {
14
+ const i = t.byId.get(u);
15
15
  if (!i) continue;
16
- const r = s.childrenById.get(d) || [], h = r.length > 0 ? e(r) : void 0;
17
- n.push({
16
+ const I = t.childrenById.get(u) || [], h = I.length > 0 ? n(I) : void 0;
17
+ e.push({
18
18
  ...i,
19
19
  children: h
20
20
  });
21
21
  }
22
- return n;
22
+ return e;
23
23
  };
24
- return e(s.rootIds);
24
+ return n(t.rootIds);
25
25
  }
26
- function R(s, e, t) {
27
- const n = s.byId.get(e);
28
- if (!n) return s;
29
- const d = new Map(s.byId);
30
- return d.set(e, { ...n, ...t }), {
31
- ...s,
32
- byId: d
26
+ function j(t, n, s) {
27
+ const e = t.byId.get(n);
28
+ if (!e) return t;
29
+ const u = new Map(t.byId);
30
+ return u.set(n, { ...e, ...s }), {
31
+ ...t,
32
+ byId: u
33
33
  };
34
34
  }
35
- function N(s, e) {
36
- return s.byId.get(e) || null;
35
+ function ts(t, n) {
36
+ return t.byId.get(n) || null;
37
37
  }
38
- function z(s, e) {
39
- const t = [];
40
- let n = s.parentById.get(e) || null;
41
- for (; n !== null; )
42
- t.push(n), n = s.parentById.get(n) || null;
43
- return t;
38
+ function es(t, n) {
39
+ const s = [];
40
+ let e = t.parentById.get(n) || null;
41
+ for (; e !== null; )
42
+ s.push(e), e = t.parentById.get(e) || null;
43
+ return s;
44
44
  }
45
- function tt(s, e) {
46
- const t = [], n = (d) => {
47
- (s.childrenById.get(d) || []).forEach((r) => {
48
- t.push(r), n(r);
45
+ function ns(t, n) {
46
+ const s = [], e = (u) => {
47
+ (t.childrenById.get(u) || []).forEach((I) => {
48
+ s.push(I), e(I);
49
49
  });
50
50
  };
51
- return n(e), t;
51
+ return e(n), s;
52
52
  }
53
- const nt = ({
54
- initialItems: s,
55
- enableApplyDiscard: e,
56
- enableNormalizedState: t = !1,
57
- initialCollapsedItems: n
53
+ const rs = ({
54
+ initialItems: t,
55
+ enableApplyDiscard: n,
56
+ enableNormalizedState: s = !1,
57
+ initialCollapsedItems: e
58
58
  }) => {
59
- const [d, i] = u(s), [r, h] = u(!1), o = O(() => ({
60
- get current() {
61
- return r;
62
- },
63
- set current(c) {
64
- c !== r && queueMicrotask(() => h(c));
65
- }
66
- }), [r]), C = d !== s, [j, x] = u(s), [v, l] = u(s), [f, w] = u(
67
- () => t ? p(s) : {
59
+ const [u, i] = o(t), [I, h] = o(!1), r = y(() => h(!0), []), C = u !== t, [m, x] = o(t), [p, w] = o(t), k = N(p);
60
+ z(() => {
61
+ k.current = p;
62
+ }, [p]);
63
+ const [f, B] = o(
64
+ () => s ? l(t) : {
68
65
  byId: /* @__PURE__ */ new Map(),
69
66
  childrenById: /* @__PURE__ */ new Map(),
70
67
  parentById: /* @__PURE__ */ new Map(),
71
68
  rootIds: []
72
69
  }
73
- ), [k, E] = u(
74
- () => t ? p(s) : {
70
+ ), [E, U] = o(
71
+ () => s ? l(t) : {
75
72
  byId: /* @__PURE__ */ new Map(),
76
73
  childrenById: /* @__PURE__ */ new Map(),
77
74
  parentById: /* @__PURE__ */ new Map(),
78
75
  rootIds: []
79
76
  }
80
- ), [G, J] = u(""), [K, P] = u(n ?? {}), [Q, V] = u(!1), [W, X] = u(null), [Y, Z] = u(null), [_, $] = u(
77
+ ), [q, G] = o(""), [J, K] = o(e ?? {}), [P, Q] = o(!1), [V, W] = o(null), [X, Y] = o(null), [Z, _] = o(
81
78
  /* @__PURE__ */ new Set()
82
- ), [m, b] = u(/* @__PURE__ */ new Set());
83
- if (C && !r && (i(s), l(s), e && x(s), t)) {
84
- const c = p(s);
85
- w(c), e && E(c);
86
- }
87
- r && !C && h(!1);
88
- const U = g((c) => t ? N(f, c) : null, [t, f]), L = g((c, y) => {
89
- t && (w((I) => R(I, c, y)), l((I) => a(R(p(I), c, y))));
90
- }, [t]), A = g((c) => t ? z(f, c) : [], [t, f]), F = g((c) => t ? tt(f, c) : [], [t, f]), q = g((c) => {
91
- t && (w((y) => {
92
- const I = new Map(y.byId);
93
- return c.forEach((T, B) => {
94
- const M = I.get(B);
95
- M && I.set(B, { ...M, ...T });
96
- }), { ...y, byId: I };
97
- }), l((y) => {
98
- const I = p(y);
99
- return c.forEach((T, B) => {
100
- const M = I.byId.get(B);
101
- M && I.byId.set(B, { ...M, ...T });
102
- }), a(I);
79
+ ), [$, b] = o(/* @__PURE__ */ new Set());
80
+ if (C) {
81
+ if (i(t), I)
82
+ h(!1);
83
+ else if (w(t), n && x(t), s) {
84
+ const c = l(t);
85
+ B(c), n && U(c);
86
+ }
87
+ } else I && h(!1);
88
+ const L = y((c) => s ? ts(f, c) : null, [s, f]), A = y((c, g) => {
89
+ s && (B((d) => j(d, c, g)), w((d) => T(j(l(d), c, g))));
90
+ }, [s]), F = y((c) => s ? es(f, c) : [], [s, f]), R = y((c) => s ? ns(f, c) : [], [s, f]), D = y((c) => {
91
+ s && (B((g) => {
92
+ const d = new Map(g.byId);
93
+ return c.forEach((a, M) => {
94
+ const v = d.get(M);
95
+ v && d.set(M, { ...v, ...a });
96
+ }), { ...g, byId: d };
97
+ }), w((g) => {
98
+ const d = l(g);
99
+ return c.forEach((a, M) => {
100
+ const v = d.byId.get(M);
101
+ v && d.byId.set(M, { ...v, ...a });
102
+ }), T(d);
103
103
  }));
104
- }, [t]), D = g(() => {
105
- t && l(a(f));
106
- }, [t, f]), H = g(() => {
107
- t && w(p(v));
108
- }, [t, v]), S = O(() => ({
109
- findItemByIdFast: U,
110
- updateItemFast: L,
111
- getAncestors: A,
112
- getDescendants: F,
113
- batchUpdateItems: q,
114
- syncToTreeState: D,
115
- syncToNormalizedState: H,
116
- isNormalized: t,
104
+ }, [s]), H = y(() => {
105
+ s && w(T(f));
106
+ }, [s, f]), O = y(() => {
107
+ s && B(l(p));
108
+ }, [s, p]), S = ss(() => ({
109
+ findItemByIdFast: L,
110
+ updateItemFast: A,
111
+ getAncestors: F,
112
+ getDescendants: R,
113
+ batchUpdateItems: D,
114
+ syncToTreeState: H,
115
+ syncToNormalizedState: O,
116
+ isNormalized: s,
117
117
  normalizedState: f,
118
- setNormalizedState: w,
119
- savedNormalizedState: k,
120
- setSavedNormalizedState: E
118
+ setNormalizedState: B,
119
+ savedNormalizedState: E,
120
+ setSavedNormalizedState: U
121
121
  }), [
122
- U,
123
122
  L,
124
123
  A,
125
124
  F,
126
- q,
125
+ R,
127
126
  D,
128
127
  H,
129
- t,
128
+ O,
129
+ s,
130
130
  f,
131
- k
131
+ E
132
132
  ]);
133
133
  return {
134
134
  // Standard state (backward compatible)
135
- items: v,
136
- setItems: l,
137
- savedItems: j,
135
+ items: p,
136
+ setItems: w,
137
+ itemsRef: k,
138
+ savedItems: m,
138
139
  setSavedItems: x,
139
- isUserChangeRef: o,
140
- searchText: G,
141
- setSearchText: J,
142
- collapsedItems: K,
143
- setCollapsedItems: P,
144
- isListCollapsed: Q,
145
- setIsListCollapsed: V,
146
- activeId: W,
147
- setActiveId: X,
148
- overId: Y,
149
- setOverId: Z,
150
- selectedCategories: _,
151
- setSelectedCategories: $,
152
- itemsToBlink: m,
140
+ markUserChange: r,
141
+ searchText: q,
142
+ setSearchText: G,
143
+ collapsedItems: J,
144
+ setCollapsedItems: K,
145
+ isListCollapsed: P,
146
+ setIsListCollapsed: Q,
147
+ activeId: V,
148
+ setActiveId: W,
149
+ overId: X,
150
+ setOverId: Y,
151
+ selectedCategories: Z,
152
+ setSelectedCategories: _,
153
+ itemsToBlink: $,
153
154
  setItemsToBlink: b,
154
155
  // Normalized state helpers (for optimized operations)
155
156
  ...S
156
157
  };
157
158
  };
158
159
  export {
159
- a as denormalizeItems,
160
- z as getAncestorIds,
161
- tt as getDescendantIds,
162
- N as getItemById,
163
- p as normalizeItems,
164
- R as updateNormalizedItem,
165
- nt as useNestedListState
160
+ T as denormalizeItems,
161
+ es as getAncestorIds,
162
+ ns as getDescendantIds,
163
+ ts as getItemById,
164
+ l as normalizeItems,
165
+ j as updateNormalizedItem,
166
+ rs as useNestedListState
166
167
  };