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.
- package/dist/components/data/data-table/build-column-tree-from-grid.d.ts +1 -0
- package/dist/components/data/data-table/build-column-tree-from-grid.js +55 -50
- package/dist/components/data/data-table/column-picker-authority.d.ts +34 -0
- package/dist/components/data/data-table/column-picker-authority.js +116 -0
- package/dist/components/data/data-table/column-picker-drop-validation.d.ts +7 -0
- package/dist/components/data/data-table/column-picker-drop-validation.js +37 -0
- package/dist/components/data/data-table/data-table-column-apply.d.ts +2 -0
- package/dist/components/data/data-table/data-table-column-apply.js +84 -73
- package/dist/components/data/data-table/data-table-column-list-tree-apply.d.ts +10 -0
- package/dist/components/data/data-table/data-table-column-list-tree-apply.js +79 -0
- package/dist/components/data/data-table/data-table-column-list.js +94 -64
- package/dist/components/data/data-table/data-table-column-tree-cache.d.ts +12 -6
- package/dist/components/data/data-table/data-table-column-tree-cache.js +250 -131
- package/dist/components/data/data-table/data-table-flat-column-virtual-rows.d.ts +26 -0
- package/dist/components/data/data-table/data-table-flat-column-virtual-rows.js +195 -0
- package/dist/components/data/data-table/data-table-picker-column-eligibility.d.ts +1 -0
- package/dist/components/data/data-table/data-table-picker-column-eligibility.js +7 -0
- package/dist/components/data/data-table/patch-column-tree-indicators-from-grid.d.ts +5 -0
- package/dist/components/data/data-table/patch-column-tree-indicators-from-grid.js +28 -11
- package/dist/components/data/data-table/reconcile-column-tree-from-grid.d.ts +12 -0
- package/dist/components/data/data-table/reconcile-column-tree-from-grid.js +12 -0
- package/dist/components/data/data-table/use-data-table-column-list-sync.d.ts +10 -0
- package/dist/components/data/data-table/use-data-table-column-list-sync.js +250 -196
- package/dist/components/data/nested-list/components/NestedListContent.d.ts +10 -2
- package/dist/components/data/nested-list/components/NestedListContent.js +253 -138
- package/dist/components/data/nested-list/components/SortableItem.d.ts +2 -1
- package/dist/components/data/nested-list/components/SortableItem.js +62 -60
- package/dist/components/data/nested-list/hooks/useNestedListDragDrop.d.ts +10 -20
- package/dist/components/data/nested-list/hooks/useNestedListDragDrop.js +44 -233
- package/dist/components/data/nested-list/hooks/useVirtualNestedListDrag.d.ts +24 -0
- package/dist/components/data/nested-list/hooks/useVirtualNestedListDrag.js +128 -0
- package/dist/components/data/nested-list/nested-list-constants.d.ts +4 -1
- package/dist/components/data/nested-list/nested-list-constants.js +10 -4
- package/dist/components/data/nested-list/nested-list-display-utils.d.ts +11 -0
- package/dist/components/data/nested-list/nested-list-display-utils.js +74 -0
- package/dist/components/data/nested-list/nested-list-drop-engine.d.ts +31 -0
- package/dist/components/data/nested-list/nested-list-drop-engine.js +209 -0
- package/dist/components/data/nested-list/nested-list-flat-virtual-handlers.d.ts +26 -0
- package/dist/components/data/nested-list/nested-list-flat-virtual-handlers.js +67 -0
- package/dist/components/data/nested-list/nested-list-item-tree-mutations.d.ts +4 -0
- package/dist/components/data/nested-list/nested-list-item-tree-mutations.js +43 -0
- package/dist/components/data/nested-list/nested-list-lazy-flat-rows.d.ts +3 -0
- package/dist/components/data/nested-list/nested-list-lazy-flat-rows.js +34 -0
- package/dist/components/data/nested-list/nested-list-row-estimates.d.ts +9 -0
- package/dist/components/data/nested-list/nested-list-row-estimates.js +14 -0
- package/dist/components/data/nested-list/nested-list-scroll-anchor.d.ts +36 -0
- package/dist/components/data/nested-list/nested-list-scroll-anchor.js +47 -0
- package/dist/components/data/nested-list/nested-list-virtual-drop.d.ts +59 -0
- package/dist/components/data/nested-list/nested-list-virtual-drop.js +341 -0
- package/dist/components/data/nested-list/nested-list.js +322 -336
- package/dist/components/data/nested-list/nested-list.types.d.ts +17 -0
- package/dist/form-react/Fields/MultiYearPickerField.js +14 -13
- package/dist/form-react/Fields/YearPickerField.js +11 -10
- package/dist/form-react/Fields/YearRangePickerField.js +7 -6
- package/dist/form-react/types/fields.types.d.ts +3 -0
- package/dist/impact-nova.css +1 -1
- package/dist/lib/hash/fnv1a128.d.ts +16 -0
- package/dist/lib/hash/fnv1a128.js +21 -0
- package/dist/llms/rules/ag-grid.js +1 -1
- package/dist/llms/rules/installation.js +1 -1
- package/dist/llms/rules/requirements.js +1 -1
- 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
|
|
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:
|
|
7
|
+
field: t,
|
|
8
8
|
validationRules: h,
|
|
9
9
|
isDisabled: u,
|
|
10
10
|
formHelpers: n
|
|
11
11
|
}) => {
|
|
12
|
-
const e =
|
|
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((
|
|
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:
|
|
18
|
+
name: t.id,
|
|
19
19
|
control: c,
|
|
20
20
|
defaultValue: d,
|
|
21
21
|
rules: h,
|
|
22
|
-
render: ({ field:
|
|
23
|
-
const s = !!l.error, m =
|
|
24
|
-
return /* @__PURE__ */ a("div", { "data-testid":
|
|
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:
|
|
27
|
+
label: t.label,
|
|
28
28
|
value: m ?? void 0,
|
|
29
29
|
onChange: (i) => {
|
|
30
|
-
|
|
30
|
+
r.onChange(i ?? null), n.setValue(t.id, i ?? null);
|
|
31
31
|
},
|
|
32
|
-
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:
|
|
37
|
+
required: t.isRequired,
|
|
38
38
|
disabled: u,
|
|
39
39
|
error: s,
|
|
40
|
-
helperText: s ? l.error?.message :
|
|
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
|
|
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
|
|
6
|
-
const
|
|
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__ */
|
|
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__ */
|
|
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:
|
|
34
|
-
maxDate:
|
|
35
|
-
startMonth:
|
|
36
|
-
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
|
-
|
|
57
|
+
x as YearPickerField
|
|
57
58
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { jsx as
|
|
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:
|
|
10
|
+
formHelpers: o
|
|
11
11
|
}) => {
|
|
12
12
|
const e = r.fieldType === "year_range" ? r : null;
|
|
13
13
|
if (!e) return null;
|
|
14
|
-
const c =
|
|
15
|
-
return /* @__PURE__ */
|
|
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__ */
|
|
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),
|
|
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>;
|