impact-nova 2.5.14 → 2.5.16

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 (62) hide show
  1. package/dist/components/data/data-table/build-column-tree-from-grid.d.ts +1 -0
  2. package/dist/components/data/data-table/build-column-tree-from-grid.js +55 -50
  3. package/dist/components/data/data-table/column-picker-authority.d.ts +34 -0
  4. package/dist/components/data/data-table/column-picker-authority.js +116 -0
  5. package/dist/components/data/data-table/column-picker-drop-validation.d.ts +7 -0
  6. package/dist/components/data/data-table/column-picker-drop-validation.js +37 -0
  7. package/dist/components/data/data-table/data-table-column-apply.d.ts +2 -0
  8. package/dist/components/data/data-table/data-table-column-apply.js +84 -73
  9. package/dist/components/data/data-table/data-table-column-list-tree-apply.d.ts +10 -0
  10. package/dist/components/data/data-table/data-table-column-list-tree-apply.js +79 -0
  11. package/dist/components/data/data-table/data-table-column-list.js +94 -64
  12. package/dist/components/data/data-table/data-table-column-tree-cache.d.ts +12 -6
  13. package/dist/components/data/data-table/data-table-column-tree-cache.js +250 -131
  14. package/dist/components/data/data-table/data-table-flat-column-virtual-rows.d.ts +26 -0
  15. package/dist/components/data/data-table/data-table-flat-column-virtual-rows.js +195 -0
  16. package/dist/components/data/data-table/data-table-picker-column-eligibility.d.ts +1 -0
  17. package/dist/components/data/data-table/data-table-picker-column-eligibility.js +7 -0
  18. package/dist/components/data/data-table/patch-column-tree-indicators-from-grid.d.ts +5 -0
  19. package/dist/components/data/data-table/patch-column-tree-indicators-from-grid.js +28 -11
  20. package/dist/components/data/data-table/reconcile-column-tree-from-grid.d.ts +12 -0
  21. package/dist/components/data/data-table/reconcile-column-tree-from-grid.js +12 -0
  22. package/dist/components/data/data-table/use-data-table-column-list-sync.d.ts +10 -0
  23. package/dist/components/data/data-table/use-data-table-column-list-sync.js +250 -196
  24. package/dist/components/data/nested-list/components/NestedListContent.d.ts +10 -2
  25. package/dist/components/data/nested-list/components/NestedListContent.js +253 -138
  26. package/dist/components/data/nested-list/components/SortableItem.d.ts +2 -1
  27. package/dist/components/data/nested-list/components/SortableItem.js +62 -60
  28. package/dist/components/data/nested-list/hooks/useNestedListDragDrop.d.ts +10 -20
  29. package/dist/components/data/nested-list/hooks/useNestedListDragDrop.js +44 -233
  30. package/dist/components/data/nested-list/hooks/useVirtualNestedListDrag.d.ts +24 -0
  31. package/dist/components/data/nested-list/hooks/useVirtualNestedListDrag.js +128 -0
  32. package/dist/components/data/nested-list/nested-list-constants.d.ts +4 -1
  33. package/dist/components/data/nested-list/nested-list-constants.js +10 -4
  34. package/dist/components/data/nested-list/nested-list-display-utils.d.ts +11 -0
  35. package/dist/components/data/nested-list/nested-list-display-utils.js +74 -0
  36. package/dist/components/data/nested-list/nested-list-drop-engine.d.ts +31 -0
  37. package/dist/components/data/nested-list/nested-list-drop-engine.js +209 -0
  38. package/dist/components/data/nested-list/nested-list-flat-virtual-handlers.d.ts +26 -0
  39. package/dist/components/data/nested-list/nested-list-flat-virtual-handlers.js +67 -0
  40. package/dist/components/data/nested-list/nested-list-item-tree-mutations.d.ts +4 -0
  41. package/dist/components/data/nested-list/nested-list-item-tree-mutations.js +43 -0
  42. package/dist/components/data/nested-list/nested-list-lazy-flat-rows.d.ts +3 -0
  43. package/dist/components/data/nested-list/nested-list-lazy-flat-rows.js +34 -0
  44. package/dist/components/data/nested-list/nested-list-row-estimates.d.ts +9 -0
  45. package/dist/components/data/nested-list/nested-list-row-estimates.js +14 -0
  46. package/dist/components/data/nested-list/nested-list-scroll-anchor.d.ts +36 -0
  47. package/dist/components/data/nested-list/nested-list-scroll-anchor.js +47 -0
  48. package/dist/components/data/nested-list/nested-list-virtual-drop.d.ts +59 -0
  49. package/dist/components/data/nested-list/nested-list-virtual-drop.js +341 -0
  50. package/dist/components/data/nested-list/nested-list.js +322 -336
  51. package/dist/components/data/nested-list/nested-list.types.d.ts +17 -0
  52. package/dist/form-react/Fields/MultiYearPickerField.js +14 -13
  53. package/dist/form-react/Fields/YearPickerField.js +11 -10
  54. package/dist/form-react/Fields/YearRangePickerField.js +7 -6
  55. package/dist/form-react/types/fields.types.d.ts +3 -0
  56. package/dist/impact-nova.css +1 -1
  57. package/dist/lib/hash/fnv1a128.d.ts +16 -0
  58. package/dist/lib/hash/fnv1a128.js +21 -0
  59. package/dist/llms/rules/ag-grid.js +1 -1
  60. package/dist/llms/rules/installation.js +1 -1
  61. package/dist/llms/rules/requirements.js +1 -1
  62. package/package.json +1 -1
@@ -1,4 +1,9 @@
1
+ import { FlatNestedListRow } from './nested-list-virtual-drop';
1
2
  import type * as React from "react";
3
+ export interface FlatVirtualRowModel {
4
+ rowCount: number;
5
+ getRowAt: (index: number) => FlatNestedListRow;
6
+ }
2
7
  export interface NestedListItem {
3
8
  id: string;
4
9
  label: string;
@@ -47,9 +52,21 @@ export interface NestedListProps {
47
52
  initialCollapsedItems?: Record<string, boolean>;
48
53
  onCollapseChange?: (collapsedItems: Record<string, boolean>) => void;
49
54
  canDrag?: (item: NestedListItem, level: number) => boolean;
55
+ isValidDropTarget?: (options: {
56
+ activeItemId: string;
57
+ overItemId: string;
58
+ items: NestedListItem[];
59
+ insertAfter?: boolean;
60
+ }) => boolean;
50
61
  searchPlaceholder?: string;
51
62
  className?: string;
52
63
  groupLabel?: string;
53
64
  submitButtonLabel?: string;
54
65
  cancelButtonLabel?: string;
66
+ dragMode?: NestedListDragMode;
67
+ onVirtualReorder?: (fromIndex: number, toIndex: number) => void;
68
+ onVirtualDrop?: (activeId: string, overId: string, insertAfter: boolean) => void;
69
+ flatVirtualRowResolver?: (searchQuery: string) => FlatVirtualRowModel;
70
+ onFlatVirtualSelectAll?: (shouldSelectAll: boolean) => void;
55
71
  }
72
+ export type NestedListDragMode = 'sortable' | 'virtual-index';
@@ -1,49 +1,50 @@
1
1
  import { jsx as a } from "react/jsx-runtime";
2
2
  import { Controller as p } from "react-hook-form";
3
3
  import { MultiYearPicker as M } from "../../components/forms/date-picker/multi-year-picker.js";
4
- import { getFieldTestId as f } from "../utils/fieldTestIds.js";
4
+ import { getFieldTestId as w } from "../utils/fieldTestIds.js";
5
5
  import { toLocalDate as o } from "../utils/calendar-boundary.js";
6
6
  const g = ({
7
- field: r,
7
+ field: t,
8
8
  validationRules: h,
9
9
  isDisabled: u,
10
10
  formHelpers: n
11
11
  }) => {
12
- const e = r.fieldType === "multi_year_picker" ? r : null;
12
+ const e = t.fieldType === "multi_year_picker" ? t : null;
13
13
  if (!e) return null;
14
- const c = n.form.control, d = e.defaultValue?.map((t) => ({ year: t }));
14
+ const c = n.form.control, d = e.defaultValue?.map((r) => ({ year: r }));
15
15
  return /* @__PURE__ */ a(
16
16
  p,
17
17
  {
18
- name: r.id,
18
+ name: t.id,
19
19
  control: c,
20
20
  defaultValue: d,
21
21
  rules: h,
22
- render: ({ field: t, fieldState: l }) => {
23
- const s = !!l.error, m = t.value;
24
- return /* @__PURE__ */ a("div", { "data-testid": f(r.id), children: /* @__PURE__ */ a(
22
+ render: ({ field: r, fieldState: l }) => {
23
+ const s = !!l.error, m = r.value;
24
+ return /* @__PURE__ */ a("div", { "data-testid": w(t.id), children: /* @__PURE__ */ a(
25
25
  M,
26
26
  {
27
- label: r.label,
27
+ label: t.label,
28
28
  value: m ?? void 0,
29
29
  onChange: (i) => {
30
- t.onChange(i ?? null), n.setValue(r.id, i ?? null);
30
+ r.onChange(i ?? null), n.setValue(t.id, i ?? null);
31
31
  },
32
- placeholder: r.placeholder,
32
+ placeholder: t.placeholder,
33
33
  minDate: o(e.minDate),
34
34
  maxDate: o(e.maxDate),
35
35
  startMonth: o(e.startMonth),
36
36
  endMonth: o(e.endMonth),
37
- required: r.isRequired,
37
+ required: t.isRequired,
38
38
  disabled: u,
39
39
  error: s,
40
- helperText: s ? l.error?.message : r.helpText,
40
+ helperText: s ? l.error?.message : t.helpText,
41
41
  showFooter: e.showFooter,
42
42
  showIntervalCaption: e.showIntervalCaption,
43
43
  calendarKind: e.calendarKind,
44
44
  fiscalMode: e.fiscalMode,
45
45
  fiscalYearStartMonth: e.fiscalYearStartMonth,
46
46
  fiscalMonthPattern: e.fiscalMonthPattern,
47
+ weekStartsOn: e.weekStartsOn,
47
48
  showPresets: e.showPresets,
48
49
  ...e.componentProps
49
50
  }
@@ -1,9 +1,9 @@
1
- import { jsx as t } from "react/jsx-runtime";
1
+ import { jsx as o } from "react/jsx-runtime";
2
2
  import { Controller as m } from "react-hook-form";
3
3
  import { YearPicker as p } from "../../components/forms/date-picker/year-picker.js";
4
4
  import { getFieldTestId as M } from "../utils/fieldTestIds.js";
5
- import { toLocalDate as o } from "../utils/calendar-boundary.js";
6
- const C = ({
5
+ import { toLocalDate as t } from "../utils/calendar-boundary.js";
6
+ const x = ({
7
7
  field: r,
8
8
  validationRules: d,
9
9
  isDisabled: h,
@@ -12,7 +12,7 @@ const C = ({
12
12
  const e = r.fieldType === "year_picker" ? r : null;
13
13
  if (!e) return null;
14
14
  const c = a.form.control;
15
- return /* @__PURE__ */ t(
15
+ return /* @__PURE__ */ o(
16
16
  m,
17
17
  {
18
18
  name: r.id,
@@ -21,7 +21,7 @@ const C = ({
21
21
  rules: d,
22
22
  render: ({ field: n, fieldState: l }) => {
23
23
  const s = !!l.error, u = n.value;
24
- return /* @__PURE__ */ t("div", { "data-testid": M(r.id), children: /* @__PURE__ */ t(
24
+ return /* @__PURE__ */ o("div", { "data-testid": M(r.id), children: /* @__PURE__ */ o(
25
25
  p,
26
26
  {
27
27
  label: r.label,
@@ -30,10 +30,10 @@ const C = ({
30
30
  n.onChange(i ?? null), a.setValue(r.id, i ?? null);
31
31
  },
32
32
  placeholder: r.placeholder,
33
- minDate: o(e.minDate),
34
- maxDate: o(e.maxDate),
35
- startMonth: o(e.startMonth),
36
- endMonth: o(e.endMonth),
33
+ minDate: t(e.minDate),
34
+ maxDate: t(e.maxDate),
35
+ startMonth: t(e.startMonth),
36
+ endMonth: t(e.endMonth),
37
37
  required: r.isRequired,
38
38
  disabled: h,
39
39
  error: s,
@@ -44,6 +44,7 @@ const C = ({
44
44
  fiscalMode: e.fiscalMode,
45
45
  fiscalYearStartMonth: e.fiscalYearStartMonth,
46
46
  fiscalMonthPattern: e.fiscalMonthPattern,
47
+ weekStartsOn: e.weekStartsOn,
47
48
  showPresets: e.showPresets,
48
49
  ...e.componentProps
49
50
  }
@@ -53,5 +54,5 @@ const C = ({
53
54
  );
54
55
  };
55
56
  export {
56
- C as YearPickerField
57
+ x as YearPickerField
57
58
  };
@@ -1,4 +1,4 @@
1
- import { jsx as o } from "react/jsx-runtime";
1
+ import { jsx as a } from "react/jsx-runtime";
2
2
  import { Controller as p } from "react-hook-form";
3
3
  import { YearRangePicker as g } from "../../components/forms/date-picker/year-range-picker.js";
4
4
  import { getFieldTestId as f } from "../utils/fieldTestIds.js";
@@ -7,12 +7,12 @@ const C = ({
7
7
  field: r,
8
8
  validationRules: d,
9
9
  isDisabled: h,
10
- formHelpers: a
10
+ formHelpers: o
11
11
  }) => {
12
12
  const e = r.fieldType === "year_range" ? r : null;
13
13
  if (!e) return null;
14
- const c = a.form.control, u = e.defaultRange ? { from: { year: e.defaultRange.start }, to: { year: e.defaultRange.end } } : void 0;
15
- return /* @__PURE__ */ o(
14
+ const c = o.form.control, u = e.defaultRange ? { from: { year: e.defaultRange.start }, to: { year: e.defaultRange.end } } : void 0;
15
+ return /* @__PURE__ */ a(
16
16
  p,
17
17
  {
18
18
  name: r.id,
@@ -21,13 +21,13 @@ const C = ({
21
21
  rules: d,
22
22
  render: ({ field: n, fieldState: l }) => {
23
23
  const s = !!l.error, m = n.value;
24
- return /* @__PURE__ */ o("div", { "data-testid": f(r.id), children: /* @__PURE__ */ o(
24
+ return /* @__PURE__ */ a("div", { "data-testid": f(r.id), children: /* @__PURE__ */ a(
25
25
  g,
26
26
  {
27
27
  label: r.label,
28
28
  value: m ?? void 0,
29
29
  onChange: (i) => {
30
- n.onChange(i ?? null), a.setValue(r.id, i ?? null);
30
+ n.onChange(i ?? null), o.setValue(r.id, i ?? null);
31
31
  },
32
32
  placeholder: r.placeholder,
33
33
  minDate: t(e.minDate),
@@ -44,6 +44,7 @@ const C = ({
44
44
  fiscalMode: e.fiscalMode,
45
45
  fiscalYearStartMonth: e.fiscalYearStartMonth,
46
46
  fiscalMonthPattern: e.fiscalMonthPattern,
47
+ weekStartsOn: e.weekStartsOn,
47
48
  showPresets: e.showPresets,
48
49
  ...e.componentProps
49
50
  }
@@ -297,6 +297,7 @@ export type YearPickerField = BaseField & {
297
297
  fiscalMode?: "basic" | "advanced" | "custom";
298
298
  fiscalYearStartMonth?: number;
299
299
  fiscalMonthPattern?: number[];
300
+ weekStartsOn?: 0 | 1 | 2 | 3 | 4 | 5 | 6;
300
301
  showPresets?: boolean;
301
302
  /** Additional props forwarded directly to the underlying YearPicker component */
302
303
  componentProps?: Record<string, unknown>;
@@ -314,6 +315,7 @@ export type MultiYearPickerField = BaseField & {
314
315
  fiscalMode?: "basic" | "advanced" | "custom";
315
316
  fiscalYearStartMonth?: number;
316
317
  fiscalMonthPattern?: number[];
318
+ weekStartsOn?: 0 | 1 | 2 | 3 | 4 | 5 | 6;
317
319
  showPresets?: boolean;
318
320
  /** Additional props forwarded directly to the underlying MultiYearPicker component */
319
321
  componentProps?: Record<string, unknown>;
@@ -334,6 +336,7 @@ export type YearRangePickerField = BaseField & {
334
336
  fiscalMode?: "basic" | "advanced" | "custom";
335
337
  fiscalYearStartMonth?: number;
336
338
  fiscalMonthPattern?: number[];
339
+ weekStartsOn?: 0 | 1 | 2 | 3 | 4 | 5 | 6;
337
340
  showPresets?: boolean;
338
341
  /** Additional props forwarded directly to the underlying YearRangePicker component */
339
342
  componentProps?: Record<string, unknown>;