impact-nova 2.5.13 → 2.5.14
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 +0 -1
- package/dist/components/data/data-table/build-column-tree-from-grid.js +50 -55
- package/dist/components/data/data-table/data-table-column-apply.d.ts +0 -2
- package/dist/components/data/data-table/data-table-column-apply.js +73 -84
- package/dist/components/data/data-table/data-table-column-list.js +64 -94
- package/dist/components/data/data-table/data-table-column-tree-cache.d.ts +6 -12
- package/dist/components/data/data-table/data-table-column-tree-cache.js +131 -250
- package/dist/components/data/data-table/patch-column-tree-indicators-from-grid.d.ts +0 -5
- package/dist/components/data/data-table/patch-column-tree-indicators-from-grid.js +11 -28
- package/dist/components/data/data-table/use-data-table-column-list-sync.d.ts +0 -10
- package/dist/components/data/data-table/use-data-table-column-list-sync.js +196 -250
- package/dist/components/data/expandable-list-item/expandable-list-item-attributes.js +3 -2
- package/dist/components/data/expandable-list-item/expandable-list-item-metrics.js +3 -2
- package/dist/components/data/nested-list/components/NestedListContent.d.ts +2 -10
- package/dist/components/data/nested-list/components/NestedListContent.js +138 -253
- package/dist/components/data/nested-list/components/SortableItem.d.ts +1 -2
- package/dist/components/data/nested-list/components/SortableItem.js +60 -62
- package/dist/components/data/nested-list/hooks/useNestedListDragDrop.d.ts +20 -10
- package/dist/components/data/nested-list/hooks/useNestedListDragDrop.js +233 -44
- package/dist/components/data/nested-list/nested-list-constants.d.ts +1 -4
- package/dist/components/data/nested-list/nested-list-constants.js +4 -10
- package/dist/components/data/nested-list/nested-list.js +336 -322
- package/dist/components/data/nested-list/nested-list.types.d.ts +0 -17
- package/dist/components/data-display/calendar/calendar-apply-validation.d.ts +2 -0
- package/dist/components/data-display/calendar/calendar-apply-validation.js +64 -67
- package/dist/components/data-display/calendar/calendar-available-view.d.ts +27 -0
- package/dist/components/data-display/calendar/calendar-available-view.js +85 -0
- package/dist/components/data-display/calendar/calendar-config.js +1 -1
- package/dist/components/data-display/calendar/calendar-day-picker-components.d.ts +4 -2
- package/dist/components/data-display/calendar/calendar-day-picker-components.js +234 -164
- package/dist/components/data-display/calendar/calendar-day-picker-view.js +77 -76
- package/dist/components/data-display/calendar/calendar-fiscal-day-cell.d.ts +9 -0
- package/dist/components/data-display/calendar/calendar-fiscal-day-cell.js +45 -0
- package/dist/components/data-display/calendar/calendar-fiscal-period-nav.d.ts +6 -0
- package/dist/components/data-display/calendar/calendar-fiscal-period-nav.js +34 -18
- package/dist/components/data-display/calendar/calendar-footer.js +21 -21
- package/dist/components/data-display/calendar/calendar-injected-week-row.d.ts +5 -0
- package/dist/components/data-display/calendar/calendar-injected-week-row.js +92 -0
- package/dist/components/data-display/calendar/calendar-leading-week.utils.d.ts +16 -0
- package/dist/components/data-display/calendar/calendar-leading-week.utils.js +51 -0
- package/dist/components/data-display/calendar/calendar-month-picker-panel.js +50 -49
- package/dist/components/data-display/calendar/calendar-month-utils.d.ts +5 -0
- package/dist/components/data-display/calendar/calendar-month-utils.js +85 -64
- package/dist/components/data-display/calendar/calendar-orphan-week.d.ts +23 -0
- package/dist/components/data-display/calendar/calendar-padding-week.utils.d.ts +3 -1
- package/dist/components/data-display/calendar/calendar-padding-week.utils.js +7 -5
- package/dist/components/data-display/calendar/calendar-period-cell.js +45 -46
- package/dist/components/data-display/calendar/calendar-quarter-panes.js +33 -31
- package/dist/components/data-display/calendar/calendar-selection-appearance.d.ts +10 -0
- package/dist/components/data-display/calendar/calendar-selection-appearance.js +53 -39
- package/dist/components/data-display/calendar/calendar-selection.d.ts +25 -0
- package/dist/components/data-display/calendar/calendar-selection.js +52 -23
- package/dist/components/data-display/calendar/calendar-week-number-cell.d.ts +2 -1
- package/dist/components/data-display/calendar/calendar-week-number-cell.js +59 -45
- package/dist/components/data-display/calendar/calendar-week-utils.d.ts +15 -4
- package/dist/components/data-display/calendar/calendar-week-utils.js +59 -50
- package/dist/components/data-display/calendar/calendar-year-panes.d.ts +3 -0
- package/dist/components/data-display/calendar/calendar-year-panes.js +53 -49
- package/dist/components/data-display/calendar/calendar.js +146 -143
- package/dist/components/data-display/calendar/calendar.types.d.ts +5 -0
- package/dist/components/data-display/calendar/use-calendar-day-picker-config.d.ts +2 -1
- package/dist/components/data-display/calendar/use-calendar-day-picker-config.js +79 -74
- package/dist/components/data-display/calendar/use-calendar-state.d.ts +3 -1
- package/dist/components/data-display/calendar/use-calendar-state.js +394 -314
- package/dist/components/feedback/tooltip/tab-tooltip-render.js +3 -2
- 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/forms/date-picker/date-picker.js +60 -58
- package/dist/components/forms/date-picker/date-picker.types.d.ts +5 -0
- package/dist/components/forms/date-picker/date-range-picker.js +66 -64
- package/dist/components/forms/date-picker/fiscal-pass-through.d.ts +1 -0
- package/dist/components/forms/date-picker/fiscal-pass-through.js +3 -2
- package/dist/components/forms/date-picker/fiscal-picker-fixtures.d.ts +17 -0
- package/dist/components/forms/date-picker/month-picker.js +61 -59
- package/dist/components/forms/date-picker/month-range-picker.js +63 -61
- package/dist/components/forms/date-picker/multi-date-picker.js +51 -49
- package/dist/components/forms/date-picker/multi-month-picker.js +49 -47
- package/dist/components/forms/date-picker/multi-quarter-picker.js +51 -47
- package/dist/components/forms/date-picker/multi-week-picker.js +53 -51
- package/dist/components/forms/date-picker/multi-year-picker.js +53 -49
- package/dist/components/forms/date-picker/quarter-picker.js +51 -47
- package/dist/components/forms/date-picker/quarter-range-picker.js +50 -46
- package/dist/components/forms/date-picker/week-picker.js +130 -126
- package/dist/components/forms/date-picker/week-range-picker.js +159 -155
- package/dist/components/forms/date-picker/year-picker.js +52 -48
- package/dist/components/forms/date-picker/year-range-picker.js +52 -48
- package/dist/components/forms/select/components/SelectTriggerValue.js +3 -2
- package/dist/components/forms/select/components/Submenu.js +3 -2
- package/dist/form-react/Fields/DateInputField.js +51 -50
- package/dist/form-react/Fields/DateRangeField.js +14 -13
- package/dist/form-react/Fields/MonthRangeField.js +29 -28
- package/dist/form-react/Fields/MultiMonthPickerField.js +13 -12
- package/dist/form-react/Fields/MultiWeekPickerField.js +35 -27
- package/dist/form-react/Fields/MultiYearPickerField.d.ts +8 -0
- package/dist/form-react/Fields/MultiYearPickerField.js +57 -0
- package/dist/form-react/Fields/WeekRangePicker.js +33 -32
- package/dist/form-react/Fields/YearPickerField.d.ts +8 -0
- package/dist/form-react/Fields/YearPickerField.js +57 -0
- package/dist/form-react/Fields/YearRangePickerField.d.ts +8 -0
- package/dist/form-react/Fields/YearRangePickerField.js +57 -0
- package/dist/form-react/registry/defaultFieldRegistrations.d.ts +1 -1
- package/dist/form-react/registry/defaultFieldRegistrations.js +16 -13
- package/dist/form-react/types/fields.types.d.ts +69 -1
- package/dist/form-react/types/fieldsOutput.types.d.ts +8 -2
- package/dist/form-react/utils/fieldDefaults.utils.js +1 -1
- package/dist/impact-nova-components.css +13 -6
- package/dist/impact-nova.css +1 -1
- package/dist/lib/fiscal-calendar/index.d.ts +2 -2
- package/dist/lib/fiscal-calendar/index.js +26 -28
- package/dist/lib/fiscal-calendar/types.d.ts +0 -7
- package/dist/lib/fiscal-calendar/week-selection.d.ts +3 -4
- package/dist/lib/fiscal-calendar/week-selection.js +52 -79
- 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
- package/dist/components/data/data-table/column-picker-authority.d.ts +0 -34
- package/dist/components/data/data-table/column-picker-authority.js +0 -116
- package/dist/components/data/data-table/column-picker-drop-validation.d.ts +0 -7
- package/dist/components/data/data-table/column-picker-drop-validation.js +0 -37
- package/dist/components/data/data-table/data-table-column-list-tree-apply.d.ts +0 -10
- package/dist/components/data/data-table/data-table-column-list-tree-apply.js +0 -79
- package/dist/components/data/data-table/data-table-flat-column-virtual-rows.d.ts +0 -26
- package/dist/components/data/data-table/data-table-flat-column-virtual-rows.js +0 -195
- package/dist/components/data/data-table/data-table-picker-column-eligibility.d.ts +0 -1
- package/dist/components/data/data-table/data-table-picker-column-eligibility.js +0 -7
- package/dist/components/data/data-table/reconcile-column-tree-from-grid.d.ts +0 -12
- package/dist/components/data/data-table/reconcile-column-tree-from-grid.js +0 -12
- package/dist/components/data/nested-list/hooks/useVirtualNestedListDrag.d.ts +0 -24
- package/dist/components/data/nested-list/hooks/useVirtualNestedListDrag.js +0 -128
- package/dist/components/data/nested-list/nested-list-display-utils.d.ts +0 -11
- package/dist/components/data/nested-list/nested-list-display-utils.js +0 -74
- package/dist/components/data/nested-list/nested-list-drop-engine.d.ts +0 -31
- package/dist/components/data/nested-list/nested-list-drop-engine.js +0 -209
- package/dist/components/data/nested-list/nested-list-flat-virtual-handlers.d.ts +0 -26
- package/dist/components/data/nested-list/nested-list-flat-virtual-handlers.js +0 -67
- package/dist/components/data/nested-list/nested-list-item-tree-mutations.d.ts +0 -4
- package/dist/components/data/nested-list/nested-list-item-tree-mutations.js +0 -43
- package/dist/components/data/nested-list/nested-list-lazy-flat-rows.d.ts +0 -3
- package/dist/components/data/nested-list/nested-list-lazy-flat-rows.js +0 -34
- package/dist/components/data/nested-list/nested-list-row-estimates.d.ts +0 -9
- package/dist/components/data/nested-list/nested-list-row-estimates.js +0 -14
- package/dist/components/data/nested-list/nested-list-scroll-anchor.d.ts +0 -36
- package/dist/components/data/nested-list/nested-list-scroll-anchor.js +0 -47
- package/dist/components/data/nested-list/nested-list-virtual-drop.d.ts +0 -59
- package/dist/components/data/nested-list/nested-list-virtual-drop.js +0 -341
- package/dist/lib/hash/fnv1a128.d.ts +0 -16
- package/dist/lib/hash/fnv1a128.js +0 -21
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export type { CalendarInterval, CalendarKind, CalendarSelection, CalendarSelectionMode, CivilDate, DateCellMeta, FiscalCalendarConfig, FiscalMode,
|
|
1
|
+
export type { CalendarInterval, CalendarKind, CalendarSelection, CalendarSelectionMode, CivilDate, DateCellMeta, FiscalCalendarConfig, FiscalMode, FiscalMonthPattern, FiscalPeriod, FiscalQuarter, FiscalWeek, FiscalYearModel, FyLabelStyle, Granularity, LeapWeekPolicy, RetailPatternId, WeekSelection, Weekday, } from './types';
|
|
2
2
|
export { DEFAULT_FY_LABEL, DEFAULT_LEAP_WEEK_POLICY, FISCAL_PATTERNS, } from './types';
|
|
3
3
|
export { addDays, civilFromLocalDate, compareCivil, diffDays, formatCivilRange, lastDayOfMonth, localDateFromCivil, parseCivilDate, toCivilDate, weekStart, weekday, } from './civil-date';
|
|
4
4
|
export { buildFiscalYear, clearFiscalYearCache, formatFyLabel, resolvePattern, shiftedFyForDate, } from './build-year';
|
|
@@ -6,5 +6,5 @@ export { getCellMeta, getFiscalYearForDate, clearFiscalLookupCache } from './loo
|
|
|
6
6
|
export { getFiscalPresets } from './presets';
|
|
7
7
|
export type { FiscalPreset } from './presets';
|
|
8
8
|
export { isSameInterval, nextIntervalSelection } from './selection';
|
|
9
|
-
export {
|
|
9
|
+
export { getCalendarWeekSelection, getFiscalWeekSelection, resolveWeekSelection, toFiscalCalendarConfig, } from './week-selection';
|
|
10
10
|
export type { ResolveWeekSelectionOptions } from './week-selection';
|
|
@@ -1,40 +1,38 @@
|
|
|
1
|
-
import { DEFAULT_FY_LABEL as t, DEFAULT_LEAP_WEEK_POLICY as
|
|
2
|
-
import { addDays as i, civilFromLocalDate as c, compareCivil as s, diffDays as F, formatCivilRange as
|
|
3
|
-
import { buildFiscalYear as
|
|
4
|
-
import { clearFiscalLookupCache as
|
|
5
|
-
import { getFiscalPresets as
|
|
6
|
-
import { isSameInterval as I, nextIntervalSelection as
|
|
7
|
-
import {
|
|
1
|
+
import { DEFAULT_FY_LABEL as t, DEFAULT_LEAP_WEEK_POLICY as r, FISCAL_PATTERNS as o } from "./types.js";
|
|
2
|
+
import { addDays as i, civilFromLocalDate as c, compareCivil as s, diffDays as F, formatCivilRange as f, lastDayOfMonth as m, localDateFromCivil as n, parseCivilDate as C, toCivilDate as D, weekStart as p, weekday as v } from "./civil-date.js";
|
|
3
|
+
import { buildFiscalYear as d, clearFiscalYearCache as x, formatFyLabel as S, resolvePattern as g, shiftedFyForDate as E } from "./build-year.js";
|
|
4
|
+
import { clearFiscalLookupCache as y, getCellMeta as A, getFiscalYearForDate as _ } from "./lookup.js";
|
|
5
|
+
import { getFiscalPresets as Y } from "./presets.js";
|
|
6
|
+
import { isSameInterval as I, nextIntervalSelection as T } from "./selection.js";
|
|
7
|
+
import { getCalendarWeekSelection as b, getFiscalWeekSelection as u, resolveWeekSelection as w, toFiscalCalendarConfig as M } from "./week-selection.js";
|
|
8
8
|
export {
|
|
9
9
|
t as DEFAULT_FY_LABEL,
|
|
10
|
-
|
|
10
|
+
r as DEFAULT_LEAP_WEEK_POLICY,
|
|
11
11
|
o as FISCAL_PATTERNS,
|
|
12
12
|
i as addDays,
|
|
13
|
-
|
|
14
|
-
L as buildFiscalYear,
|
|
13
|
+
d as buildFiscalYear,
|
|
15
14
|
c as civilFromLocalDate,
|
|
16
|
-
|
|
17
|
-
|
|
15
|
+
y as clearFiscalLookupCache,
|
|
16
|
+
x as clearFiscalYearCache,
|
|
18
17
|
s as compareCivil,
|
|
19
18
|
F as diffDays,
|
|
20
|
-
|
|
21
|
-
|
|
19
|
+
f as formatCivilRange,
|
|
20
|
+
S as formatFyLabel,
|
|
22
21
|
b as getCalendarWeekSelection,
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
A as getFiscalYearForDate,
|
|
22
|
+
A as getCellMeta,
|
|
23
|
+
Y as getFiscalPresets,
|
|
24
|
+
u as getFiscalWeekSelection,
|
|
25
|
+
_ as getFiscalYearForDate,
|
|
28
26
|
I as isSameInterval,
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
27
|
+
m as lastDayOfMonth,
|
|
28
|
+
n as localDateFromCivil,
|
|
29
|
+
T as nextIntervalSelection,
|
|
30
|
+
C as parseCivilDate,
|
|
31
|
+
g as resolvePattern,
|
|
32
|
+
w as resolveWeekSelection,
|
|
35
33
|
E as shiftedFyForDate,
|
|
36
34
|
D as toCivilDate,
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
35
|
+
M as toFiscalCalendarConfig,
|
|
36
|
+
p as weekStart,
|
|
37
|
+
v as weekday
|
|
40
38
|
};
|
|
@@ -133,13 +133,6 @@ export interface WeekSelection {
|
|
|
133
133
|
startDate: Date;
|
|
134
134
|
endDate: Date;
|
|
135
135
|
}
|
|
136
|
-
/** Legacy fiscal-month block described as a WeekSelection (weekOfMonth = period index). */
|
|
137
|
-
export interface FiscalMonth {
|
|
138
|
-
index: number;
|
|
139
|
-
startDate: Date;
|
|
140
|
-
endDate: Date;
|
|
141
|
-
weekCount: number;
|
|
142
|
-
}
|
|
143
136
|
export declare const FISCAL_PATTERNS: Record<RetailPatternId, FiscalMonthPattern>;
|
|
144
137
|
export declare const DEFAULT_LEAP_WEEK_POLICY: LeapWeekPolicy;
|
|
145
138
|
export declare const DEFAULT_FY_LABEL: FyLabelStyle;
|
|
@@ -1,8 +1,6 @@
|
|
|
1
|
-
import { CalendarKind, FiscalMode,
|
|
2
|
-
export type { FiscalMode,
|
|
1
|
+
import { CalendarKind, FiscalMode, FiscalMonthPattern, Granularity, WeekSelection, FiscalCalendarConfig, Weekday } from './types';
|
|
2
|
+
export type { FiscalMode, FiscalMonthPattern };
|
|
3
3
|
export declare function getFiscalWeekSelection(date: Date, weekStartsOn: Weekday): WeekSelection;
|
|
4
|
-
export declare function buildFiscalMonthCalendar(civilYear: number, pattern: FiscalMonthPattern, weekStartsOn: Weekday, fiscalYearStartMonth?: number): FiscalMonth[];
|
|
5
|
-
export declare function getFiscalMonthSelection(date: Date, fiscalCalendar: FiscalMonth[]): WeekSelection | undefined;
|
|
6
4
|
export declare function getCalendarWeekSelection(date: Date, weekStartsOn: Weekday): WeekSelection;
|
|
7
5
|
export interface ResolveWeekSelectionOptions {
|
|
8
6
|
calendarKind?: CalendarKind;
|
|
@@ -11,6 +9,7 @@ export interface ResolveWeekSelectionOptions {
|
|
|
11
9
|
fiscalMonthPattern?: FiscalMonthPattern;
|
|
12
10
|
fiscalYearStartMonth?: number;
|
|
13
11
|
weekStartsOn?: Weekday;
|
|
12
|
+
fiscalConfig?: FiscalCalendarConfig;
|
|
14
13
|
}
|
|
15
14
|
export declare function resolveWeekSelection(date: Date, options?: ResolveWeekSelectionOptions): WeekSelection;
|
|
16
15
|
export declare function toFiscalCalendarConfig(options: {
|
|
@@ -1,107 +1,80 @@
|
|
|
1
1
|
import { FISCAL_PATTERNS as y } from "./types.js";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
2
|
+
import { buildFiscalYear as d } from "./build-year.js";
|
|
3
|
+
import { civilFromLocalDate as m, parseCivilDate as w, localDateFromCivil as l } from "./civil-date.js";
|
|
4
|
+
import { getCellMeta as k } from "./lookup.js";
|
|
5
|
+
function D(t, n) {
|
|
6
|
+
const e = new Date(t), r = (e.getDay() + 7 - n) % 7;
|
|
7
|
+
return e.setDate(e.getDate() - r), e.setHours(0, 0, 0, 0), e;
|
|
5
8
|
}
|
|
6
|
-
function
|
|
9
|
+
function h(t, n) {
|
|
7
10
|
const e = new Date(t);
|
|
8
|
-
return e.setDate(e.getDate() +
|
|
11
|
+
return e.setDate(e.getDate() + n), e;
|
|
9
12
|
}
|
|
10
|
-
function
|
|
11
|
-
const e =
|
|
13
|
+
function c(t, n) {
|
|
14
|
+
const e = D(t, n), a = h(e, 6), o = new Date(t.getFullYear(), t.getMonth(), 1).getDay(), i = e.getDate(), s = e.getMonth() === t.getMonth() ? i : 1, f = Math.ceil((s + o) / 7);
|
|
12
15
|
return {
|
|
13
16
|
year: t.getFullYear(),
|
|
14
17
|
month: t.getMonth(),
|
|
15
|
-
weekOfMonth: Math.max(1,
|
|
18
|
+
weekOfMonth: Math.max(1, f),
|
|
16
19
|
startDate: e,
|
|
17
|
-
endDate:
|
|
20
|
+
endDate: a
|
|
18
21
|
};
|
|
19
22
|
}
|
|
20
|
-
function
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
}
|
|
30
|
-
return o;
|
|
31
|
-
}
|
|
32
|
-
function w(t, a) {
|
|
33
|
-
const e = new Date(t);
|
|
34
|
-
e.setHours(0, 0, 0, 0);
|
|
35
|
-
for (const n of a) {
|
|
36
|
-
const s = new Date(n.startDate);
|
|
37
|
-
s.setHours(0, 0, 0, 0);
|
|
38
|
-
const c = new Date(n.endDate);
|
|
39
|
-
if (c.setHours(23, 59, 59, 999), e >= s && e <= c)
|
|
40
|
-
return {
|
|
41
|
-
year: n.startDate.getFullYear(),
|
|
42
|
-
month: n.startDate.getMonth(),
|
|
43
|
-
weekOfMonth: n.index + 1,
|
|
44
|
-
startDate: n.startDate,
|
|
45
|
-
endDate: n.endDate
|
|
46
|
-
};
|
|
47
|
-
}
|
|
23
|
+
function O(t, n) {
|
|
24
|
+
const e = D(t, n), a = h(e, 6), r = new Date(t.getFullYear(), t.getMonth(), 1), o = new Date(t.getFullYear(), t.getMonth() + 1, 0), i = e < r ? new Date(r) : new Date(e), s = a > o ? new Date(o) : new Date(a), u = new Date(i.getFullYear(), i.getMonth(), 1).getDay(), g = i.getDate(), M = Math.ceil((g + u) / 7);
|
|
25
|
+
return {
|
|
26
|
+
year: i.getFullYear(),
|
|
27
|
+
month: i.getMonth(),
|
|
28
|
+
weekOfMonth: Math.max(1, M),
|
|
29
|
+
startDate: i,
|
|
30
|
+
endDate: s
|
|
31
|
+
};
|
|
48
32
|
}
|
|
49
|
-
function
|
|
50
|
-
const
|
|
33
|
+
function F(t, n, e) {
|
|
34
|
+
const a = k(t, m(n));
|
|
35
|
+
if (a?.fy == null || a.fiscalPeriod == null)
|
|
36
|
+
return c(n, e);
|
|
37
|
+
const r = d(t, a.fy).periods.find(
|
|
38
|
+
(i) => i.period === a.fiscalPeriod
|
|
39
|
+
);
|
|
40
|
+
if (!r) return c(n, e);
|
|
41
|
+
const o = w(r.start);
|
|
51
42
|
return {
|
|
52
|
-
year: o.
|
|
53
|
-
month: o.
|
|
54
|
-
weekOfMonth:
|
|
55
|
-
startDate:
|
|
56
|
-
endDate: r
|
|
43
|
+
year: o.y,
|
|
44
|
+
month: o.m - 1,
|
|
45
|
+
weekOfMonth: r.period,
|
|
46
|
+
startDate: l(r.start),
|
|
47
|
+
endDate: l(r.end)
|
|
57
48
|
};
|
|
58
49
|
}
|
|
59
|
-
function
|
|
50
|
+
function v(t, n = {}) {
|
|
60
51
|
const {
|
|
61
52
|
calendarKind: e = "gregorian",
|
|
62
|
-
fiscalMode:
|
|
63
|
-
granularity:
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
} = a;
|
|
53
|
+
fiscalMode: a = "basic",
|
|
54
|
+
granularity: r,
|
|
55
|
+
weekStartsOn: o = 1,
|
|
56
|
+
fiscalConfig: i
|
|
57
|
+
} = n;
|
|
68
58
|
if (e !== "fiscal")
|
|
69
|
-
return
|
|
70
|
-
if (
|
|
71
|
-
return
|
|
72
|
-
const
|
|
73
|
-
|
|
74
|
-
return u(t, r);
|
|
75
|
-
const f = M(
|
|
76
|
-
t.getFullYear(),
|
|
77
|
-
i,
|
|
78
|
-
r,
|
|
79
|
-
o
|
|
80
|
-
), l = w(t, f);
|
|
81
|
-
if (l) return l;
|
|
82
|
-
const h = M(
|
|
83
|
-
t.getFullYear() - 1,
|
|
84
|
-
i,
|
|
85
|
-
r,
|
|
86
|
-
o
|
|
87
|
-
);
|
|
88
|
-
return w(t, h) ?? u(t, r);
|
|
59
|
+
return O(t, o);
|
|
60
|
+
if (a === "basic" || r !== "period")
|
|
61
|
+
return c(t, o);
|
|
62
|
+
const s = i ?? S(n);
|
|
63
|
+
return s ? F(s, t, o) : c(t, o);
|
|
89
64
|
}
|
|
90
65
|
function S(t) {
|
|
91
66
|
if (t.calendarKind !== "fiscal") return;
|
|
92
|
-
const
|
|
67
|
+
const n = t.weekStartsOn ?? 1, e = t.fiscalYearStartMonth ?? 1;
|
|
93
68
|
return {
|
|
94
69
|
kind: "retail",
|
|
95
|
-
pattern: t.fiscalMonthPattern ?? y["4-4
|
|
96
|
-
weekStartsOn:
|
|
70
|
+
pattern: t.fiscalMonthPattern ?? y["4-5-4"],
|
|
71
|
+
weekStartsOn: n,
|
|
97
72
|
fyAnchor: { month: e, day: 1, rule: "on-or-before" }
|
|
98
73
|
};
|
|
99
74
|
}
|
|
100
75
|
export {
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
u as getFiscalWeekSelection,
|
|
105
|
-
F as resolveWeekSelection,
|
|
76
|
+
O as getCalendarWeekSelection,
|
|
77
|
+
c as getFiscalWeekSelection,
|
|
78
|
+
v as resolveWeekSelection,
|
|
106
79
|
S as toFiscalCalendarConfig
|
|
107
80
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export default "# AG Grid & Data Table — Mandatory Rules\n\n**When working with DataTable, or any data table that uses AG Grid (including Impact Nova's grid components), the following rules are mandatory. Do not deviate.**\n\n---\n\n## 1. Use AG Grid documentation only\n\n- **Refer only to AG Grid's official documentation** for grid behavior, APIs, column definitions, filtering, sorting, and all grid features.\n- Do not rely on third-party tutorials or generic \"data grid\" patterns that contradict or bypass AG Grid's docs.\n- Official docs: [ag-grid.com/documentation](https://www.ag-grid.com/documentation/) (React: [AG Grid React](https://www.ag-grid.com/react-data-grid/)).\n\n---\n\n## 2. Follow AG Grid recommended patterns\n\n- **Always follow AG Grid's recommended patterns** for:\n - Column definitions (`ColDef`, `ColGroupDef`)\n - Cell renderers and editors\n - Filtering, sorting, and row selection\n - API ref access (`gridRef.current?.api`)\n - Theming and styling (AG Grid theme / CSS variables)\n- Do not invent custom patterns that bypass or replace AG Grid's intended usage.\n\n---\n\n## 3. Use the AG Grid API only\n\n- **Rely on the AG Grid API only** for all grid operations:\n - Getting/setting data, refreshing cells, updating columns\n - Export (CSV/Excel if using Enterprise)\n - Filter/sort state, row selection, pinned columns\n - Any behavior that AG Grid exposes via its API\n- Do not manipulate the DOM or internal structure of the grid directly. Do not use non-API workarounds unless AG Grid docs explicitly suggest them.\n\n---\n\n## 4. Collaboration with ag-mcp (when installed)\n\n- **If the user has installed the ag-mcp server** (AG Grid MCP), this MCP can collaborate with it:\n - Use **ag-mcp** for AG Grid–specific questions: API reference, column config, React integration, and official examples.\n - Use **impact-nova-mcp** for Impact Nova wrappers (`DataTable`, `DataTableContent`, `processBackendColumnDefs`, `BackendColDef`, cell renderers from `impact-nova/ag-grid-react/cell-renderers`).\n - When generating or editing grid code: prefer fetching AG Grid details from ag-mcp when available, and combine with Impact Nova's DataTable/column/cell-renderer patterns from this MCP.\n- If ag-mcp is not installed, still follow rules 1–3 using AG Grid's official documentation only.\n\n---\n\n**Summary:** For any code or design involving AG Grid or Impact Nova's DataTable (which uses AG Grid), use **only** AG Grid documentation, **only** AG Grid recommended patterns, and **only** the AG Grid API—with no deviation. When ag-mcp is available, use it to get accurate AG Grid API and docs; use this MCP for Impact Nova–specific integration.\n\n---\n\n## 5. Mandatory Data Table component usage\n\n**CRITICAL RULE:** If you see a table in a screenshot, or if the user asks for a table by default, you **MUST** use **Impact Nova DataTable** from `impact-nova/data-table`. **Do not build a raw AG Grid or HTML table.**\n\n```tsx\nimport {\n DataTable,\n DataTableContent,\n DataTableToolbar,\n useDataTable,\n} from 'impact-nova/data-table';\n```\n\nA typical Default Data Table in Impact Nova features this exact structure:\n\n```tsx\nconst DataTableWithFilters = () => {\n const { tStory } = useStorybookStoryI18n();\n const [sheetOpen, setSheetOpen] = useState(false);\n const [activeTab, setActiveTab] = useState(\"columns\");\n const [showFilterStrip, setShowFilterStrip] = useState(false);\n\n return (\n <div className=\"h-[800px] w-full p-8 bg-slate-50 flex flex-col items-center justify-center\">\n <div className=\"w-full max-w-[1200px] h-[600px] bg-white rounded-lg overflow-hidden flex flex-col [box-shadow:0px_0px_4px_0px_rgba(0,0,0,0.12)]\">\n <DataTable className=\"h-full\">\n <DataTableToolbar className=\"border-b border-[#e6e8f0]\">\n <div className=\"flex items-center gap-2\">\n <h2 className=\"font-bold text-sm text-slate-800\">Sales Report</h2>\n </div>\n \n <div className=\"flex items-center gap-2\">\n <Button \n variant=\"secondary\" \n size=\"icon\" \n onClick={() => setShowFilterStrip(!showFilterStrip)}\n aria-label={showFilterStrip ? tStory('filterStrip.hideFilters') : tStory('filterStrip.showFilters')}\n >\n {showFilterStrip ? <FunnelHide size=\"xs\" /> : <FunnelShow size=\"xs\" />}\n </Button>\n\n <div className=\"h-4 w-[1px] bg-[#e6e8f0] mx-1\" />\n\n {/* Scoped Sheet for Settings - Renders inside this relative container */}\n <DataTableSheet open={sheetOpen} onOpenChange={setSheetOpen}>\n <DropdownMenu>\n <DataTableViewMenuTrigger />\n <DataTableViewMenuContent>\n <DataTableViewMenuSettingsItem />\n <DataTableViewMenuDensity />\n </DataTableViewMenuContent>\n </DropdownMenu>\n \n <DataTableSheetContent>\n <DataTableSheetHeader title=\"Table Settings\" />\n <Tabs value={activeTab} onValueChange={setActiveTab} variant=\"line\" hideInactiveLabel tooltipClassName=\"z-[110]\" className=\"flex-1 flex flex-col min-h-0 w-full px-4\">\n <TabsList>\n <TabsTrigger \n value=\"columns\" \n icon={<Column size={16} />}\n >\n Columns\n </TabsTrigger>\n <TabsTrigger \n value=\"format\" \n icon={<Font size={16} />}\n >\n Format\n </TabsTrigger>\n <TabsTrigger \n value=\"custom-filters\" \n icon={<Filter size={16} />}\n >\n Filters\n </TabsTrigger>\n </TabsList>\n \n <TabsContent value=\"columns\" className=\"flex-1 min-h-0 relative p-0 data-[state=inactive]:hidden mt-0\">\n <div className=\"flex-1 h-full p-2\">\n <DataTableColumnList />\n </div>\n </TabsContent>\n <TabsContent value=\"format\" className=\"flex-1 min-h-0 relative p-4 pt-1 data-[state=inactive]:hidden overflow-y-auto mt-0\">\n <DataTableFormatOptions />\n </TabsContent>\n <TabsContent value=\"custom-filters\" className=\"flex-1 min-h-0 relative p-4 pt-1 data-[state=inactive]:hidden overflow-y-auto mt-0\">\n <div className=\"flex flex-col gap-4 text-sm text-[#60697d]\">\n <p>Custom filter configuration would go here.</p>\n <Button variant=\"outline\" className=\"w-full justify-start\">\n + Add Condition\n </Button>\n </div>\n </TabsContent>\n </Tabs>\n </DataTableSheetContent>\n </DataTableSheet>\n </div>\n </DataTableToolbar>\n \n <DataTableContent\n rowData={rowData}\n columnDefs={columnDefs}\n // Standard AG Grid props work here\n pagination={true}\n paginationPageSize={20}\n />\n </DataTable>\n </div>\n <p className=\"mt-4 text-slate-400 text-sm\">\n Note: The settings panel opens *inside* the table container, respecting its boundaries.\n </p>\n </div>\n );\n};\n```\nNote: This component (`DataTable`) internally uses `ag-grid-react` as a customized version. Rely on it rather than naked AG Grid.\n\n---\n\n## 6. Built-in Clipboard Handlers for JSON Objects\n\n**All DataTable and AG Grid instances in Impact Nova automatically support copying and pasting JSON objects.**\n\nThe `AgGridWrapper` component includes built-in clipboard handlers that:\n- **When copying**: Automatically stringify object values to JSON format\n- **When pasting**: Automatically parse JSON strings back to objects\n\n### How it works\n\n```tsx\n// When you copy a cell with an object value like:\n{ \n wp: { value: 6479, _isDisabled: true, cellMetadata: {...} },\n iaf: { value: 6090, _isDisabled: true, cellMetadata: {...} }\n}\n\n// It's automatically converted and split into separate Excel columns:\n// Column 1 Column 2\n// WP: 6479 IAF: 6090\n\n// Technical metadata (_isDisabled, cellMetadata) is hidden for clarity\n// Only the meaningful \"value\" is shown - perfect for PMs and non-technical users\n// Tab-separated format automatically expands into multiple columns in Excel\n```\n\n**Example with simple properties:**\n```tsx\n// Copy this object:\n{ name: \"John\", age: 30, status: \"active\" }\n\n// Expands into 3 Excel columns:\n// Column 1 Column 2 Column 3\n// name: John age: 30 status: active\n```\n\n**When pasting:**\n```tsx\n// You can paste JSON strings and they'll be parsed back to objects:\n'{\"name\":\"Jane\",\"age\":25}' → { name: \"Jane\", age: 25 }\n```\n\n**Benefits:**\n- ✅ Simple and readable for non-technical users (PMs, stakeholders)\n- ✅ Extracts only meaningful values, hides technical metadata\n- ✅ Automatically expands object properties into separate Excel columns\n- ✅ Perfect for analysis - each property gets its own column\n- ✅ Works seamlessly for both single-cell and multi-cell copy operations\n- ✅ Still supports pasting JSON back for developers\n\n### Usage\n\n**No configuration needed!** This works automatically for all DataTable instances:\n\n```tsx\n<DataTable>\n <DataTableContent\n rowData={data}\n columnDefs={columns}\n // Clipboard handlers are already active ✅\n />\n</DataTable>\n```\n\n### Override if needed\n\nYou can override the default behavior by passing your own handlers:\n\n```tsx\n<DataTableContent\n rowData={data}\n columnDefs={columns}\n processCellForClipboard={(params) => {\n // Custom copy logic\n return customFormat(params.value);\n }}\n processCellFromClipboard={(params) => {\n // Custom paste logic\n return customParse(params.value);\n }}\n/>\n```\n\n**Key benefits:**\n- ✅ Works automatically for all tables\n- ✅ No code duplication needed\n- ✅ Handles complex object structures\n- ✅ Gracefully falls back to string if JSON parsing fails\n- ✅ Can be overridden when custom behavior is needed\n\n---\n\n## 6. Column autosize on container resize\n\n**AgGridWrapper** (from `impact-nova/ag-grid-react`) automatically re-runs `autoSizeStrategy` when the grid container width changes (accordion expand, viewport resize, responsive layout).\n\n- Pass `autoSizeStrategy` to DataTable/AgGridWrapper props (e.g. `{ type: 'fitCellContents', scaleUpToFitGridWidth: true }`).\n- **Do not** add app-level ResizeObserver hacks or deferred grid mount delays — the framework handles this.\n- When applying saved column views, wait for `firstDataRendered` or `newColumnsLoaded` grid events before applying column state — not `setTimeout(0)`.\n- Strip `width`/`flex` from saved column state when applying structural views so autosize can recalculate correctly.\n\n---\n\n## 6b. Truncated text in custom cell renderers\n\n**Do not** use `OverflowTooltip` inside AG Grid cells. Use the grid-native tooltip API via **`useAgGridTruncationTooltip`** from `impact-nova/ag-grid-react`:\n\n```tsx\nimport { useAgGridTruncationTooltip } from 'impact-nova/ag-grid-react';\n\nconst MyCellRenderer = (params: ICellRendererParams) => {\n const textRef = useRef<HTMLSpanElement>(null);\n const displayValue = String(params.value ?? '');\n\n useAgGridTruncationTooltip(\n params.setTooltip,\n displayValue,\n textRef,\n 'ellipsis',\n 'cell',\n );\n\n return (\n <span ref={textRef} className=\"truncate\">\n {displayValue}\n </span>\n );\n};\n```\n\n- Pass AG Grid's `setTooltip` callback (from `ICellRendererParams` / header APIs).\n- Apply `truncate` (or `line-clamp`) on the measured element.\n- `location` is `'cell' | 'leaf' | 'group'` — affects tooltip show mode wiring.\n- For general (non-grid) truncated labels, use `OverflowTooltip` from `impact-nova/tooltip` instead.\n\n---\n\n## 7. AG Grid v36 version pin (mandatory)\n\nImpact Nova **2.2.0+** targets **AG Grid v36**. Consumer apps must install all three packages at the **exact same version**:\n\n```bash\nnpm install ag-grid-community@36.0.1 ag-grid-react@36.0.1 ag-grid-enterprise@36.0.1\n```\n\n**Rules:**\n\n- Pin `36.0.1` in `package.json` — do not float `^36` across community/react/enterprise.\n- Vite/webpack: `resolve.dedupe: ['ag-grid-community', 'ag-grid-enterprise', 'ag-grid-react']` (see `create-impact-nova` template).\n- **Do not** import legacy AG Grid CSS theme files (`ag-grid.css`, `ag-theme-*`). Impact Nova `AgGridWrapper` applies the v36 Quartz theme (`themeQuartz.withPart(iconSetMaterial)`) via the `theme` prop.\n- Column settings (`DataTableColumnList`) sync pin/sort/filter from the live `GridApi` — do not mirror column state in app-level React state.\n\n**Column settings sheet pattern (scroll-safe — use compound layout components):**\n\n```tsx\n<DataTableSheet open={sheetOpen} onOpenChange={setSheetOpen}>\n <DataTableSheetContent>\n <DataTableSheetHeader title=\"Table Settings\" />\n <DataTableSheetBody>\n <DataTableSheetSection>{savedViews}</DataTableSheetSection>\n <DataTableSheetTabs value={tab} onValueChange={setTab} variant=\"line\" className=\"px-4\">\n <DataTableSheetTabsList>\n <TabsTrigger value=\"columns\">Columns</TabsTrigger>\n <TabsTrigger value=\"format\">Format</TabsTrigger>\n </DataTableSheetTabsList>\n <DataTableSheetTabPanel layout=\"list\" value=\"columns\" className=\"p-0 pt-2\">\n <DataTableColumnList />\n </DataTableSheetTabPanel>\n <DataTableSheetTabPanel layout=\"scroll\" value=\"format\" className=\"p-4 pt-1\">\n <DataTableFormatOptions />\n </DataTableSheetTabPanel>\n </DataTableSheetTabs>\n </DataTableSheetBody>\n </DataTableSheetContent>\n</DataTableSheet>\n```\n\nDo **not** use raw `Tabs` + manual `overflow-y-auto` in sheet bodies — see `impact-nova://data-table-sheet-layout`.\n\nStorybook reference: `Data Display/DataTable/Sheet layout` (`CanonicalComposition`) and `Column settings scenarios` (`PinSortSearchAndReset`).\n\n---\n\n## 8. 50k+ Column Consumer Settings\n\nWhen building grids with **10,000+ columns** (planning grids, large attribute tables), apply these settings:\n\n### Required grid props\n\n```tsx\n<DataTableContent\n ensureDomOrder={false} // Skip DOM reordering for screen readers — critical at 10k+\n maintainColumnOrder={true} // Preserve column ordering after runtime column defs changes\n suppressColumnVirtualisation={false} // Ensure column virtualization is ON (default)\n/>\n```\n\n### Column picker (DataTableColumnList)\n\n- At 80+ visible items, `DataTableColumnList` automatically switches to **virtual-index drag mode** (pointer-based reorder with TanStack Virtual) instead of dnd-kit sortable (50k useSortable hooks + DOM nodes).\n- No consumer configuration needed — the switch is automatic.\n- Drag-and-drop, search, select-all, pin switches, apply/discard all remain functional.\n\n### Saved views and state management\n\n- **Use `applyColumnState({ state, applyOrder: true })` for restoring saved column views** — this is the AG Grid recommended pattern for partial column state application.\n- **Evaluate `gridApi.getState()` / `gridApi.setState()` for full grid snapshots** (includes sort, filter, column state, grouping) when persisting complex view configurations.\n- Keep `mergePartialOrderedColumnState` for picker-initiated partial edits (picker only modifies a subset of columns).\n- **Do not** manually diff columnDefs for saved views — AG Grid's state APIs handle runtime-calculated columns.\n\n### Column runtime state guard\n\n- After `newColumnsLoaded` events, Impact Nova's `columnRuntimeStateGuard` automatically restores hide/pin/order from the cached tree to prevent column-def refreshes from resetting user layout.\n- **Use `deferColumnRuntimeStateGuard(gridApi)`** when your app applies external state (e.g., from a backend save) — this skips the guard for that cycle and rebuilds the cache from your new live state.\n\n### Performance budget (CI ratchet)\n\n| Operation | Target at 50k |\n|-----------|---------------|\n| Hash fingerprint (3x) | < 200ms |\n| Tree build from grid | < 2s |\n| Cache resolve skip path | < 300ms |\n| Indicator patch (sort/filter badges) | < 500ms |\n| Authority build + fingerprint | < 500ms |\n| Authority reorder (splice) | < 50ms |\n| Column sheet open (collapsed groups) | < 500ms |\n| Drag frame time (virtual-index) | < 16ms |\n\n---\n";
|
|
1
|
+
export default "# AG Grid & Data Table — Mandatory Rules\n\n**When working with DataTable, or any data table that uses AG Grid (including Impact Nova's grid components), the following rules are mandatory. Do not deviate.**\n\n---\n\n## 1. Use AG Grid documentation only\n\n- **Refer only to AG Grid's official documentation** for grid behavior, APIs, column definitions, filtering, sorting, and all grid features.\n- Do not rely on third-party tutorials or generic \"data grid\" patterns that contradict or bypass AG Grid's docs.\n- Official docs: [ag-grid.com/documentation](https://www.ag-grid.com/documentation/) (React: [AG Grid React](https://www.ag-grid.com/react-data-grid/)).\n\n---\n\n## 2. Follow AG Grid recommended patterns\n\n- **Always follow AG Grid's recommended patterns** for:\n - Column definitions (`ColDef`, `ColGroupDef`)\n - Cell renderers and editors\n - Filtering, sorting, and row selection\n - API ref access (`gridRef.current?.api`)\n - Theming and styling (AG Grid theme / CSS variables)\n- Do not invent custom patterns that bypass or replace AG Grid's intended usage.\n\n---\n\n## 3. Use the AG Grid API only\n\n- **Rely on the AG Grid API only** for all grid operations:\n - Getting/setting data, refreshing cells, updating columns\n - Export (CSV/Excel if using Enterprise)\n - Filter/sort state, row selection, pinned columns\n - Any behavior that AG Grid exposes via its API\n- Do not manipulate the DOM or internal structure of the grid directly. Do not use non-API workarounds unless AG Grid docs explicitly suggest them.\n\n---\n\n## 4. Collaboration with ag-mcp (when installed)\n\n- **If the user has installed the ag-mcp server** (AG Grid MCP), this MCP can collaborate with it:\n - Use **ag-mcp** for AG Grid–specific questions: API reference, column config, React integration, and official examples.\n - Use **impact-nova-mcp** for Impact Nova wrappers (`DataTable`, `DataTableContent`, `processBackendColumnDefs`, `BackendColDef`, cell renderers from `impact-nova/ag-grid-react/cell-renderers`).\n - When generating or editing grid code: prefer fetching AG Grid details from ag-mcp when available, and combine with Impact Nova's DataTable/column/cell-renderer patterns from this MCP.\n- If ag-mcp is not installed, still follow rules 1–3 using AG Grid's official documentation only.\n\n---\n\n**Summary:** For any code or design involving AG Grid or Impact Nova's DataTable (which uses AG Grid), use **only** AG Grid documentation, **only** AG Grid recommended patterns, and **only** the AG Grid API—with no deviation. When ag-mcp is available, use it to get accurate AG Grid API and docs; use this MCP for Impact Nova–specific integration.\n\n---\n\n## 5. Mandatory Data Table component usage\n\n**CRITICAL RULE:** If you see a table in a screenshot, or if the user asks for a table by default, you **MUST** use **Impact Nova DataTable** from `impact-nova/data-table`. **Do not build a raw AG Grid or HTML table.**\n\n```tsx\nimport {\n DataTable,\n DataTableContent,\n DataTableToolbar,\n useDataTable,\n} from 'impact-nova/data-table';\n```\n\nA typical Default Data Table in Impact Nova features this exact structure:\n\n```tsx\nconst DataTableWithFilters = () => {\n const { tStory } = useStorybookStoryI18n();\n const [sheetOpen, setSheetOpen] = useState(false);\n const [activeTab, setActiveTab] = useState(\"columns\");\n const [showFilterStrip, setShowFilterStrip] = useState(false);\n\n return (\n <div className=\"h-[800px] w-full p-8 bg-slate-50 flex flex-col items-center justify-center\">\n <div className=\"w-full max-w-[1200px] h-[600px] bg-white rounded-lg overflow-hidden flex flex-col [box-shadow:0px_0px_4px_0px_rgba(0,0,0,0.12)]\">\n <DataTable className=\"h-full\">\n <DataTableToolbar className=\"border-b border-[#e6e8f0]\">\n <div className=\"flex items-center gap-2\">\n <h2 className=\"font-bold text-sm text-slate-800\">Sales Report</h2>\n </div>\n \n <div className=\"flex items-center gap-2\">\n <Button \n variant=\"secondary\" \n size=\"icon\" \n onClick={() => setShowFilterStrip(!showFilterStrip)}\n aria-label={showFilterStrip ? tStory('filterStrip.hideFilters') : tStory('filterStrip.showFilters')}\n >\n {showFilterStrip ? <FunnelHide size=\"xs\" /> : <FunnelShow size=\"xs\" />}\n </Button>\n\n <div className=\"h-4 w-[1px] bg-[#e6e8f0] mx-1\" />\n\n {/* Scoped Sheet for Settings - Renders inside this relative container */}\n <DataTableSheet open={sheetOpen} onOpenChange={setSheetOpen}>\n <DropdownMenu>\n <DataTableViewMenuTrigger />\n <DataTableViewMenuContent>\n <DataTableViewMenuSettingsItem />\n <DataTableViewMenuDensity />\n </DataTableViewMenuContent>\n </DropdownMenu>\n \n <DataTableSheetContent>\n <DataTableSheetHeader title=\"Table Settings\" />\n <Tabs value={activeTab} onValueChange={setActiveTab} variant=\"line\" hideInactiveLabel tooltipClassName=\"z-[110]\" className=\"flex-1 flex flex-col min-h-0 w-full px-4\">\n <TabsList>\n <TabsTrigger \n value=\"columns\" \n icon={<Column size={16} />}\n >\n Columns\n </TabsTrigger>\n <TabsTrigger \n value=\"format\" \n icon={<Font size={16} />}\n >\n Format\n </TabsTrigger>\n <TabsTrigger \n value=\"custom-filters\" \n icon={<Filter size={16} />}\n >\n Filters\n </TabsTrigger>\n </TabsList>\n \n <TabsContent value=\"columns\" className=\"flex-1 min-h-0 relative p-0 data-[state=inactive]:hidden mt-0\">\n <div className=\"flex-1 h-full p-2\">\n <DataTableColumnList />\n </div>\n </TabsContent>\n <TabsContent value=\"format\" className=\"flex-1 min-h-0 relative p-4 pt-1 data-[state=inactive]:hidden overflow-y-auto mt-0\">\n <DataTableFormatOptions />\n </TabsContent>\n <TabsContent value=\"custom-filters\" className=\"flex-1 min-h-0 relative p-4 pt-1 data-[state=inactive]:hidden overflow-y-auto mt-0\">\n <div className=\"flex flex-col gap-4 text-sm text-[#60697d]\">\n <p>Custom filter configuration would go here.</p>\n <Button variant=\"outline\" className=\"w-full justify-start\">\n + Add Condition\n </Button>\n </div>\n </TabsContent>\n </Tabs>\n </DataTableSheetContent>\n </DataTableSheet>\n </div>\n </DataTableToolbar>\n \n <DataTableContent\n rowData={rowData}\n columnDefs={columnDefs}\n // Standard AG Grid props work here\n pagination={true}\n paginationPageSize={20}\n />\n </DataTable>\n </div>\n <p className=\"mt-4 text-slate-400 text-sm\">\n Note: The settings panel opens *inside* the table container, respecting its boundaries.\n </p>\n </div>\n );\n};\n```\nNote: This component (`DataTable`) internally uses `ag-grid-react` as a customized version. Rely on it rather than naked AG Grid.\n\n---\n\n## 6. Built-in Clipboard Handlers for JSON Objects\n\n**All DataTable and AG Grid instances in Impact Nova automatically support copying and pasting JSON objects.**\n\nThe `AgGridWrapper` component includes built-in clipboard handlers that:\n- **When copying**: Automatically stringify object values to JSON format\n- **When pasting**: Automatically parse JSON strings back to objects\n\n### How it works\n\n```tsx\n// When you copy a cell with an object value like:\n{ \n wp: { value: 6479, _isDisabled: true, cellMetadata: {...} },\n iaf: { value: 6090, _isDisabled: true, cellMetadata: {...} }\n}\n\n// It's automatically converted and split into separate Excel columns:\n// Column 1 Column 2\n// WP: 6479 IAF: 6090\n\n// Technical metadata (_isDisabled, cellMetadata) is hidden for clarity\n// Only the meaningful \"value\" is shown - perfect for PMs and non-technical users\n// Tab-separated format automatically expands into multiple columns in Excel\n```\n\n**Example with simple properties:**\n```tsx\n// Copy this object:\n{ name: \"John\", age: 30, status: \"active\" }\n\n// Expands into 3 Excel columns:\n// Column 1 Column 2 Column 3\n// name: John age: 30 status: active\n```\n\n**When pasting:**\n```tsx\n// You can paste JSON strings and they'll be parsed back to objects:\n'{\"name\":\"Jane\",\"age\":25}' → { name: \"Jane\", age: 25 }\n```\n\n**Benefits:**\n- ✅ Simple and readable for non-technical users (PMs, stakeholders)\n- ✅ Extracts only meaningful values, hides technical metadata\n- ✅ Automatically expands object properties into separate Excel columns\n- ✅ Perfect for analysis - each property gets its own column\n- ✅ Works seamlessly for both single-cell and multi-cell copy operations\n- ✅ Still supports pasting JSON back for developers\n\n### Usage\n\n**No configuration needed!** This works automatically for all DataTable instances:\n\n```tsx\n<DataTable>\n <DataTableContent\n rowData={data}\n columnDefs={columns}\n // Clipboard handlers are already active ✅\n />\n</DataTable>\n```\n\n### Override if needed\n\nYou can override the default behavior by passing your own handlers:\n\n```tsx\n<DataTableContent\n rowData={data}\n columnDefs={columns}\n processCellForClipboard={(params) => {\n // Custom copy logic\n return customFormat(params.value);\n }}\n processCellFromClipboard={(params) => {\n // Custom paste logic\n return customParse(params.value);\n }}\n/>\n```\n\n**Key benefits:**\n- ✅ Works automatically for all tables\n- ✅ No code duplication needed\n- ✅ Handles complex object structures\n- ✅ Gracefully falls back to string if JSON parsing fails\n- ✅ Can be overridden when custom behavior is needed\n\n---\n\n## 6. Column autosize on container resize\n\n**AgGridWrapper** (from `impact-nova/ag-grid-react`) automatically re-runs `autoSizeStrategy` when the grid container width changes (accordion expand, viewport resize, responsive layout).\n\n- Pass `autoSizeStrategy` to DataTable/AgGridWrapper props (e.g. `{ type: 'fitCellContents', scaleUpToFitGridWidth: true }`).\n- **Do not** add app-level ResizeObserver hacks or deferred grid mount delays — the framework handles this.\n- When applying saved column views, wait for `firstDataRendered` or `newColumnsLoaded` grid events before applying column state — not `setTimeout(0)`.\n- Strip `width`/`flex` from saved column state when applying structural views so autosize can recalculate correctly.\n\n---\n\n## 6b. Truncated text in custom cell renderers\n\n**Do not** use `OverflowTooltip` inside AG Grid cells. Use the grid-native tooltip API via **`useAgGridTruncationTooltip`** from `impact-nova/ag-grid-react`:\n\n```tsx\nimport { useAgGridTruncationTooltip } from 'impact-nova/ag-grid-react';\n\nconst MyCellRenderer = (params: ICellRendererParams) => {\n const textRef = useRef<HTMLSpanElement>(null);\n const displayValue = String(params.value ?? '');\n\n useAgGridTruncationTooltip(\n params.setTooltip,\n displayValue,\n textRef,\n 'ellipsis',\n 'cell',\n );\n\n return (\n <span ref={textRef} className=\"truncate\">\n {displayValue}\n </span>\n );\n};\n```\n\n- Pass AG Grid's `setTooltip` callback (from `ICellRendererParams` / header APIs).\n- Apply `truncate` (or `line-clamp`) on the measured element.\n- `location` is `'cell' | 'leaf' | 'group'` — affects tooltip show mode wiring.\n- For general (non-grid) truncated labels, use `OverflowTooltip` from `impact-nova/tooltip` instead.\n\n---\n\n## 7. AG Grid v36 version pin (mandatory)\n\nImpact Nova **2.2.0+** targets **AG Grid v36**. Consumer apps must install all three packages at the **exact same version**:\n\n```bash\nnpm install ag-grid-community@36.0.1 ag-grid-react@36.0.1 ag-grid-enterprise@36.0.1\n```\n\n**Rules:**\n\n- Pin `36.0.1` in `package.json` — do not float `^36` across community/react/enterprise.\n- Vite/webpack: `resolve.dedupe: ['ag-grid-community', 'ag-grid-enterprise', 'ag-grid-react']` (see `create-impact-nova` template).\n- **Do not** import legacy AG Grid CSS theme files (`ag-grid.css`, `ag-theme-*`). Impact Nova `AgGridWrapper` applies the v36 Quartz theme (`themeQuartz.withPart(iconSetMaterial)`) via the `theme` prop.\n- Column settings (`DataTableColumnList`) sync pin/sort/filter from the live `GridApi` — do not mirror column state in app-level React state.\n\n**Column settings sheet pattern (scroll-safe — use compound layout components):**\n\n```tsx\n<DataTableSheet open={sheetOpen} onOpenChange={setSheetOpen}>\n <DataTableSheetContent>\n <DataTableSheetHeader title=\"Table Settings\" />\n <DataTableSheetBody>\n <DataTableSheetSection>{savedViews}</DataTableSheetSection>\n <DataTableSheetTabs value={tab} onValueChange={setTab} variant=\"line\" className=\"px-4\">\n <DataTableSheetTabsList>\n <TabsTrigger value=\"columns\">Columns</TabsTrigger>\n <TabsTrigger value=\"format\">Format</TabsTrigger>\n </DataTableSheetTabsList>\n <DataTableSheetTabPanel layout=\"list\" value=\"columns\" className=\"p-0 pt-2\">\n <DataTableColumnList />\n </DataTableSheetTabPanel>\n <DataTableSheetTabPanel layout=\"scroll\" value=\"format\" className=\"p-4 pt-1\">\n <DataTableFormatOptions />\n </DataTableSheetTabPanel>\n </DataTableSheetTabs>\n </DataTableSheetBody>\n </DataTableSheetContent>\n</DataTableSheet>\n```\n\nDo **not** use raw `Tabs` + manual `overflow-y-auto` in sheet bodies — see `impact-nova://data-table-sheet-layout`.\n\nStorybook reference: `Data Display/DataTable/Sheet layout` (`CanonicalComposition`) and `Column settings scenarios` (`PinSortSearchAndReset`).\n\n---\n";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export default "# Install and configure Impact Nova\n\nUse these steps to add Impact Nova to an existing project. Run the commands in your project root and apply the code changes to your entry file and layout.\n\n## 0. Scaffold a new app (recommended)\n\n**`create-impact-nova@^1.4.9`** is on npm. Scaffold auto-detects dependency mode:\n\n| Where you run | `impact-nova` dependency |\n|---------------|--------------------------|\n| Published CLI / MCP (outside monorepo) | `impact-nova@^2.5.
|
|
1
|
+
export default "# Install and configure Impact Nova\n\nUse these steps to add Impact Nova to an existing project. Run the commands in your project root and apply the code changes to your entry file and layout.\n\n## 0. Scaffold a new app (recommended)\n\n**`create-impact-nova@^1.4.9`** is on npm. Scaffold auto-detects dependency mode:\n\n| Where you run | `impact-nova` dependency |\n|---------------|--------------------------|\n| Published CLI / MCP (outside monorepo) | `impact-nova@^2.5.13` from npm (`latest` tag) |\n| Inside impact-nova monorepo | `file:` link to repo root |\n\n```bash\nnpx create-impact-nova my-dashboard\ncd my-dashboard\nnpm run dev\n```\n\nMCP: **`scaffold_impact_nova_app`** with `projectName` and optional `modules[]` from the user prompt.\n\n**Overrides:** CLI `--from-npm` · `--link-monorepo` · MCP `usePublishedPackages: true | false`\n\n```bash\nnpx create-impact-nova my-dashboard --from-npm\n```\n\nBase template is shell-only (Home + shared primitives). Feature pages come from recipes — see `create-impact-nova/recipes/README.md`.\n\n**Local link in an existing app** (manual):\n\n```bash\nnpm install impact-nova@file:../path-to-impact-nova-repo\n```\n\nRun `npm run build` in the impact-nova repo after design-system changes.\n\n## 1. Install the package and peer dependencies\n\n```bash\nnpm install impact-nova impact-nova-icons\nnpm install react@^19 react-dom@^19\n```\n\n**Required peers:** `react@^19`, `react-dom@^19`, `impact-nova-icons@^0.1.1`\n\n**Optional peers** (install when you use these features):\n\n| Package | Version | When needed |\n|---------|---------|-------------|\n| `ag-grid-community` | `36.0.1` | AG Grid types/API (pin with react + enterprise) |\n| `ag-grid-react` | `36.0.1` | DataTable / AG Grid |\n| `ag-grid-enterprise` | `36.0.1` | Enterprise grid features |\n| `highcharts` | `^12` | Chart component |\n| `highcharts-react-official` | `^3` | Chart component |\n| `highcharts-border-radius` | `^0.0.4` | Rounded chart corners |\n\nIf you use AG Grid or Highcharts in your app, also install:\n\n```bash\nnpm install ag-grid-community@36.0.1 ag-grid-react@36.0.1 ag-grid-enterprise@36.0.1\n# Optional, for charts:\nnpm install highcharts@^12 highcharts-react-official@^3 highcharts-border-radius@^0.0.4\n```\n\n## 2. Import styles in your root entry\n\nIn your app root (e.g. `main.tsx`, `App.tsx`, or `layout.tsx`), **import the CSS before your app component**:\n\n```tsx\nimport 'impact-nova/dist/impact-nova.css';\nimport App from './App';\n// ... rest of your bootstrap\n```\n\n## 3. Add Manrope font (recommended)\n\nIn your `index.html` or layout:\n\n```html\n<link href=\"https://fonts.googleapis.com/css2?family=Manrope:wght@200..800&display=swap\" rel=\"stylesheet\" />\n```\n\nIn your global CSS or Tailwind base:\n\n```css\n@layer base {\n body {\n font-family: 'Manrope', sans-serif;\n }\n}\n```\n\n## 4. Wrap your app with providers (recommended)\n\nMount **`ImpactNovaProviders`** once at the app root. It bundles i18n (`ImpactNovaI18nProvider`) and `TooltipProvider` (required for tooltips since v2.0.8):\n\n```tsx\nimport { ImpactNovaProviders } from 'impact-nova/form';\n\nfunction Root() {\n return (\n <ImpactNovaProviders locale=\"en\">\n <App />\n </ImpactNovaProviders>\n );\n}\n```\n\nFor another locale, pass a locale pack:\n\n```tsx\nimport { ImpactNovaProviders } from 'impact-nova/form';\nimport { de } from 'impact-nova/locale/de';\n\n<ImpactNovaProviders locale=\"de\" messages={de}>\n <App />\n</ImpactNovaProviders>\n```\n\n**Barrel exception:** locale packs may use `import { de } from 'impact-nova'`. All UI components still use subpaths (see §5).\n\n## 5. Subpath imports (recommended)\n\nPrefer subpath imports in feature code for tree-shaking:\n\n```tsx\nimport { Button } from 'impact-nova/button';\nimport { Card, CardContent } from 'impact-nova/card';\nimport { DataTable, DataTableContent, useDataTable } from 'impact-nova/data-table';\nimport { CheckCircle } from 'impact-nova-icons';\n```\n\nThe barrel `import { Button } from 'impact-nova'` still works but pulls a larger module graph. **Use subpaths for all UI components**; reserve the barrel for locale packs at app root only. Use `ImpactNovaProviders` from `impact-nova/form` for app setup.\n\n## 6. Using Impact Nova with CSS or SCSS (no Tailwind)\n\nIf your app uses **plain CSS or SCSS** and does **not** use Tailwind, you can still use Impact Nova. Tailwind is optional. Impact Nova ships a single built CSS file (no SCSS source).\n\n- **Import the library CSS** in your app root (e.g. `main.tsx`, `App.tsx`):\n ```tsx\n import 'impact-nova/dist/impact-nova.css';\n ```\n **CSS split exports** (optional, for layered theming): `impact-nova/impact-nova-tokens.scss`, `impact-nova/impact-nova-base.scss`, `impact-nova/impact-nova-components.css`\n Or from your main stylesheet: `@import 'impact-nova/dist/impact-nova.css';` in your main.css or main.scss.\n- **Component styling** comes from Impact Nova's CSS. Use each component's `variant` and `size` props; no Tailwind classes are required.\n- **Your layout and spacing** stay in your CSS or SCSS (margins, padding, flexbox, grid). Use your usual class names; the design system does not require Tailwind utilities.\n- **Manrope font:** Add the font link in `index.html` and in your CSS/SCSS set `body { font-family: 'Manrope', sans-serif; }` (see section 3).\n- **Summary:** No Tailwind, no Tailwind config. Load `impact-nova.css` once; use components with their props; use your existing CSS/SCSS for the rest.\n\n## 6b. Theming in consumer apps\n\n| Surface | What ships |\n|---------|------------|\n| **npm / consumer apps** | **Impact Light** only — `import 'impact-nova/dist/impact-nova.css'` (from `src/theme/tokens/light.json`) |\n| **Storybook / dev** | 10 curated **theme presets** (Impact Dark, Midnight, Ocean, …) — preview switcher only |\n\n**Do not** copy Storybook preset JSON or `theme-presets.ts` into consumer apps. Presets are not in the published package.\n\n**Custom branding:** override CSS variables on `:root` or a scoped class (e.g. `.my-brand`). Use Storybook **Theme Builder** / **Token Catalog** to explore tokens, then export CSS/JSON for your overrides.\n\n## 7. Using Impact Nova with Webpack\n\nIf your app is built with **Webpack** (including Create React App, which uses Webpack):\n\n- **CSS import:** Webpack will bundle the library CSS as long as you have a rule for `.css`. Ensure your config includes something like:\n ```js\n module: {\n rules: [\n {\n test: /\\.css$/,\n use: ['style-loader', 'css-loader'],\n // or with MiniCssExtractPlugin:\n // use: [MiniCssExtractPlugin.loader, 'css-loader'],\n },\n // ... other rules (e.g. for .tsx, .js)\n ],\n },\n ```\n Then in your root component or entry:\n ```tsx\n import 'impact-nova/dist/impact-nova.css';\n ```\n- **Create React App (CRA):** No extra config. Add `import 'impact-nova/dist/impact-nova.css';` in `index.tsx` or `App.tsx`.\n- **Dedupe React / AG Grid:** If you see “multiple copies of React” or AG Grid issues, use Webpack’s `resolve.alias` so the app uses a single version:\n ```js\n resolve: {\n alias: {\n react: path.resolve(__dirname, 'node_modules/react'),\n 'react-dom': path.resolve(__dirname, 'node_modules/react-dom'),\n // If using AG Grid:\n 'ag-grid-react': path.resolve(__dirname, 'node_modules/ag-grid-react'),\n 'ag-grid-community': path.resolve(__dirname, 'node_modules/ag-grid-community'),\n 'ag-grid-enterprise': path.resolve(__dirname, 'node_modules/ag-grid-enterprise'),\n },\n },\n ```\n- **Tailwind + Webpack:** If you use Tailwind, add the Impact Nova preset and include the package in `content` (see section 7 below).\n\n## 8. Optional: extend Tailwind with Impact Nova preset\n\nIf your project uses Tailwind and you want the same theme (colors, radius), extend your `tailwind.config.js` with the preset from the package:\n\n```js\n// tailwind.config.js\nimport impactNovaPreset from 'impact-nova/tailwind.config.js';\n// → dist/tailwind.config.js (bundled theme; no package src/ required)\n\nexport default {\n presets: [impactNovaPreset],\n content: [\n './index.html',\n './src/**/*.{js,ts,jsx,tsx}',\n './node_modules/impact-nova/dist/**/*.js',\n ],\n // ... rest of your config\n};\n```\n\n## Summary checklist\n\n- [ ] `npm install impact-nova impact-nova-icons` (and react, react-dom; optional: ag-grid, highcharts)\n- [ ] `import 'impact-nova/dist/impact-nova.css'` in root entry (or @import in main.css/main.scss if using CSS or SCSS without Tailwind; see §6)\n- [ ] Add Manrope font link and body font-family\n- [ ] Wrap app with `<ImpactNovaProviders locale=\"en\">` from `impact-nova/form`\n- [ ] Use subpath imports in feature code (see §5)\n- [ ] (Optional) Add Tailwind preset and content path for impact-nova\n- [ ] **Webpack:** Ensure a CSS rule (style-loader + css-loader) and, if needed, resolve.alias for React/AG Grid\n\nAfter this, import components via subpaths: `import { Button } from 'impact-nova/button';`\n\n## 9. Dashboard app shell (optional)\n\nTo scaffold a full dashboard (sidebar, header, breadcrumb, filters), read resource **`impact-nova://layout`** or call `get_real_world_patterns` with `topic: \"layout\"`. Use `Layout` from `impact-nova/layout` — not `DynamicLayout` (grid/flex utility only).\n";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export default "# Impact Nova — baseline\n\nUse **Impact Nova** design-system components and tokens. Prefer subpath imports (e.g. `impact-nova/button`) when you only need a few modules. For live component lists, specs, and codegen, use the **impact-nova-mcp** MCP server (see npm `impact-nova-mcp`). Browse **Storybook**: https://impact-nova.iaproducts.ai/\n\n## Peer dependency summary\n\n```json\n{\n \"impactNova\": {\n \"package\": \"impact-nova\",\n \"recommendedVersion\": \"2.5.
|
|
1
|
+
export default "# Impact Nova — baseline\n\nUse **Impact Nova** design-system components and tokens. Prefer subpath imports (e.g. `impact-nova/button`) when you only need a few modules. For live component lists, specs, and codegen, use the **impact-nova-mcp** MCP server (see npm `impact-nova-mcp`). Browse **Storybook**: https://impact-nova.iaproducts.ai/\n\n## Peer dependency summary\n\n```json\n{\n \"impactNova\": {\n \"package\": \"impact-nova\",\n \"recommendedVersion\": \"2.5.13\",\n \"recommendedDistTag\": \"latest\",\n \"description\": \"Design system package — ESM with 90+ subpath exports. Install: npm install impact-nova@latest\"\n },\n \"createImpactNova\": {\n \"package\": \"create-impact-nova\",\n \"recommendedVersion\": \"^1.4.9\",\n \"description\": \"Vite + React scaffold with recipe-based modules\"\n },\n \"localDevelopment\": {\n \"defaultScaffoldDependency\": \"auto\",\n \"description\": \"create-impact-nova auto-detects: file: link when run inside the impact-nova monorepo; npm (impact-nova@^2.5.13) otherwise. CLI: --from-npm or --link-monorepo to override. Rebuild impact-nova (npm run build) after DS changes when using file: link.\",\n \"cliFlagForNpm\": \"--from-npm\",\n \"cliFlagForMonorepo\": \"--link-monorepo\",\n \"mcpScaffoldFlag\": \"usePublishedPackages: true | false (omit for auto-detect)\"\n },\n \"mandatoryRules\": {\n \"componentsOnly\": \"Use Impact Nova components only — never create new custom UI components\",\n \"tables\": \"Any table/grid/spreadsheet → DataTable from impact-nova/data-table (not HTML table, not raw ag-grid-react)\",\n \"validateBeforeDone\": \"Call validate_snippet on generated UI code\",\n \"resource\": \"impact-nova://design-system-mandate\"\n },\n \"requiredPeers\": [\n {\n \"package\": \"react\",\n \"recommendedVersion\": \"^19.0.0\",\n \"description\": \"React 19 required\"\n },\n {\n \"package\": \"react-dom\",\n \"recommendedVersion\": \"^19.0.0\",\n \"description\": \"React DOM 19 required\"\n },\n {\n \"package\": \"impact-nova-icons\",\n \"recommendedVersion\": \">=0.1.0\",\n \"description\": \"Icons peer — not bundled in impact-nova; 0.1.x and 0.2.x supported\"\n }\n ],\n \"optionalPeers\": [\n {\n \"package\": \"ag-grid-community\",\n \"recommendedVersion\": \"36.0.1\",\n \"description\": \"AG Grid community types/API; pin to the same version as ag-grid-react\"\n },\n {\n \"package\": \"ag-grid-react\",\n \"recommendedVersion\": \"36.0.1\",\n \"description\": \"For DataTable and grid components; use exact version to match Impact Nova\"\n },\n {\n \"package\": \"ag-grid-enterprise\",\n \"recommendedVersion\": \"36.0.1\",\n \"description\": \"Required if using ag-grid-react with enterprise features\"\n },\n {\n \"package\": \"highcharts\",\n \"recommendedVersion\": \"^12.0.0\",\n \"description\": \"For Chart component\"\n },\n {\n \"package\": \"highcharts-react-official\",\n \"recommendedVersion\": \"^3.0.0\",\n \"description\": \"For Chart component\"\n },\n {\n \"package\": \"highcharts-border-radius\",\n \"recommendedVersion\": \"^0.0.4\",\n \"description\": \"Optional Highcharts plugin for rounded corners\"\n }\n ]\n}\n```\n";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "impact-nova",
|
|
3
|
-
"version": "2.5.
|
|
3
|
+
"version": "2.5.14",
|
|
4
4
|
"description": "Enterprise-grade React design system built with React 19, Vite, Tailwind CSS, and Radix UI. Built-in internationalization (i18n) and comprehensive UI component library for scalable, accessible, and performant applications.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"workspaces": [
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
import { ColumnState, GridApi } from 'ag-grid-community';
|
|
2
|
-
import { NormalizedColumnPin } from './data-table-column-apply';
|
|
3
|
-
export interface GroupNodeMeta {
|
|
4
|
-
groupId: string;
|
|
5
|
-
label: string;
|
|
6
|
-
parentGroupId: string | null;
|
|
7
|
-
}
|
|
8
|
-
export interface ColumnLeafMeta {
|
|
9
|
-
columnId: string;
|
|
10
|
-
label: string;
|
|
11
|
-
groupChain: string[];
|
|
12
|
-
}
|
|
13
|
-
export interface ColumnPickerAuthority {
|
|
14
|
-
readonly orderedColumnIds: readonly string[];
|
|
15
|
-
readonly visibilityByColumnId: ReadonlyMap<string, boolean>;
|
|
16
|
-
readonly pinByColumnId: ReadonlyMap<string, NormalizedColumnPin>;
|
|
17
|
-
readonly labelByColumnId: ReadonlyMap<string, string>;
|
|
18
|
-
readonly groupMetadata: ReadonlyMap<string, GroupNodeMeta>;
|
|
19
|
-
readonly columnGroupChain: ReadonlyMap<string, string[]>;
|
|
20
|
-
readonly sortAppliedByColumnId: ReadonlyMap<string, boolean>;
|
|
21
|
-
readonly filterAppliedByColumnId: ReadonlyMap<string, boolean>;
|
|
22
|
-
readonly revision: number;
|
|
23
|
-
}
|
|
24
|
-
export declare function buildAuthorityFromGrid(gridApi: GridApi): ColumnPickerAuthority | null;
|
|
25
|
-
export declare function toggleColumnVisibility(authority: ColumnPickerAuthority, columnId: string, isVisible: boolean): ColumnPickerAuthority;
|
|
26
|
-
export declare function toggleAllColumnsVisibility(authority: ColumnPickerAuthority, isVisible: boolean): ColumnPickerAuthority;
|
|
27
|
-
export declare function toggleColumnsVisibility(authority: ColumnPickerAuthority, columnIds: readonly string[], isVisible: boolean): ColumnPickerAuthority;
|
|
28
|
-
export declare function reorderColumn(authority: ColumnPickerAuthority, fromIndex: number, toIndex: number): ColumnPickerAuthority;
|
|
29
|
-
export declare function updateColumnPin(authority: ColumnPickerAuthority, columnId: string, pin: NormalizedColumnPin): ColumnPickerAuthority;
|
|
30
|
-
export declare function buildColumnStateFromAuthority(authority: ColumnPickerAuthority): ColumnState[];
|
|
31
|
-
export declare function fingerprintAuthority(authority: ColumnPickerAuthority): {
|
|
32
|
-
layout: string;
|
|
33
|
-
visibility: string;
|
|
34
|
-
};
|
|
@@ -1,116 +0,0 @@
|
|
|
1
|
-
import { resolveColumnPinnedFromGridState as D } from "./data-table-column-apply.js";
|
|
2
|
-
import { isPickerEligibleColumnId as P } from "./data-table-picker-column-eligibility.js";
|
|
3
|
-
import { buildColumnIndicatorMapsFromGrid as F } from "./patch-column-tree-indicators-from-grid.js";
|
|
4
|
-
import { Fnv1a128Hasher as G } from "../../../lib/hash/fnv1a128.js";
|
|
5
|
-
let u = 0;
|
|
6
|
-
function O(n) {
|
|
7
|
-
const o = n.getColumnState(), i = n.getAllGridColumns?.() ?? n.getColumns?.() ?? [], e = new Map(
|
|
8
|
-
i.map((t) => [t.getColId(), t])
|
|
9
|
-
), l = [], g = /* @__PURE__ */ new Map(), y = /* @__PURE__ */ new Map(), b = /* @__PURE__ */ new Map(), c = /* @__PURE__ */ new Map(), v = /* @__PURE__ */ new Map();
|
|
10
|
-
for (const t of o) {
|
|
11
|
-
const d = e.get(t.colId) ?? n.getColumn(t.colId);
|
|
12
|
-
if (!d) continue;
|
|
13
|
-
const a = d.getColDef(), p = a.headerName;
|
|
14
|
-
if (p != null && p.trim() === "" || !P(t.colId))
|
|
15
|
-
continue;
|
|
16
|
-
const C = a.headerName;
|
|
17
|
-
let r = typeof C == "string" && C.trim() !== "" ? C : n.getDisplayNameForColumn(d, "header");
|
|
18
|
-
if ((!r || r.trim() === "") && (r = a.field ?? t.colId), !r || r.trim() === "")
|
|
19
|
-
continue;
|
|
20
|
-
const N = D(t, d);
|
|
21
|
-
l.push(t.colId), g.set(t.colId, !t.hide), y.set(t.colId, N), b.set(t.colId, r);
|
|
22
|
-
const w = [];
|
|
23
|
-
let s = d.getOriginalParent();
|
|
24
|
-
for (; s; ) {
|
|
25
|
-
const f = s.getColGroupDef();
|
|
26
|
-
if (f?.headerName && f?.children) {
|
|
27
|
-
const m = s.getGroupId();
|
|
28
|
-
if (w.unshift(m), !c.has(m)) {
|
|
29
|
-
const I = s.getOriginalParent();
|
|
30
|
-
let h = null;
|
|
31
|
-
for (; I; ) {
|
|
32
|
-
const M = I.getColGroupDef();
|
|
33
|
-
if (M?.headerName && M?.children) {
|
|
34
|
-
h = I.getGroupId();
|
|
35
|
-
break;
|
|
36
|
-
}
|
|
37
|
-
}
|
|
38
|
-
c.set(m, {
|
|
39
|
-
groupId: m,
|
|
40
|
-
label: f.headerName,
|
|
41
|
-
parentGroupId: h
|
|
42
|
-
});
|
|
43
|
-
}
|
|
44
|
-
}
|
|
45
|
-
s = s.getOriginalParent();
|
|
46
|
-
}
|
|
47
|
-
v.set(t.colId, w);
|
|
48
|
-
}
|
|
49
|
-
if (l.length === 0)
|
|
50
|
-
return null;
|
|
51
|
-
const B = F(n);
|
|
52
|
-
return {
|
|
53
|
-
orderedColumnIds: l,
|
|
54
|
-
visibilityByColumnId: g,
|
|
55
|
-
pinByColumnId: y,
|
|
56
|
-
labelByColumnId: b,
|
|
57
|
-
groupMetadata: c,
|
|
58
|
-
columnGroupChain: v,
|
|
59
|
-
sortAppliedByColumnId: B.sortAppliedByColumnId,
|
|
60
|
-
filterAppliedByColumnId: B.filterAppliedByColumnId,
|
|
61
|
-
revision: ++u
|
|
62
|
-
};
|
|
63
|
-
}
|
|
64
|
-
function S(n, o, i) {
|
|
65
|
-
const e = new Map(n.visibilityByColumnId);
|
|
66
|
-
return e.set(o, i), { ...n, visibilityByColumnId: e, revision: ++u };
|
|
67
|
-
}
|
|
68
|
-
function k(n, o) {
|
|
69
|
-
const i = /* @__PURE__ */ new Map();
|
|
70
|
-
for (const e of n.orderedColumnIds)
|
|
71
|
-
i.set(e, o);
|
|
72
|
-
return { ...n, visibilityByColumnId: i, revision: ++u };
|
|
73
|
-
}
|
|
74
|
-
function E(n, o, i) {
|
|
75
|
-
const e = new Map(n.visibilityByColumnId);
|
|
76
|
-
for (const l of o)
|
|
77
|
-
e.set(l, i);
|
|
78
|
-
return { ...n, visibilityByColumnId: e, revision: ++u };
|
|
79
|
-
}
|
|
80
|
-
function j(n, o, i) {
|
|
81
|
-
if (o === i) return n;
|
|
82
|
-
const e = [...n.orderedColumnIds], [l] = e.splice(o, 1);
|
|
83
|
-
return e.splice(i, 0, l), { ...n, orderedColumnIds: e, revision: ++u };
|
|
84
|
-
}
|
|
85
|
-
function q(n, o, i) {
|
|
86
|
-
const e = new Map(n.pinByColumnId);
|
|
87
|
-
return e.set(o, i), { ...n, pinByColumnId: e, revision: ++u };
|
|
88
|
-
}
|
|
89
|
-
function z(n) {
|
|
90
|
-
return n.orderedColumnIds.map((o) => ({
|
|
91
|
-
colId: o,
|
|
92
|
-
hide: !n.visibilityByColumnId.get(o),
|
|
93
|
-
pinned: n.pinByColumnId.get(o) ?? null
|
|
94
|
-
}));
|
|
95
|
-
}
|
|
96
|
-
function J(n) {
|
|
97
|
-
const o = new G(), i = new G();
|
|
98
|
-
for (const e of n.orderedColumnIds) {
|
|
99
|
-
const l = n.pinByColumnId.get(e) ?? "0";
|
|
100
|
-
o.update(e).update(":").update(l === null ? "0" : l).update("|"), i.update(e).update(":").update(n.visibilityByColumnId.get(e) ? "1" : "0").update("|");
|
|
101
|
-
}
|
|
102
|
-
return {
|
|
103
|
-
layout: o.digest(),
|
|
104
|
-
visibility: i.digest()
|
|
105
|
-
};
|
|
106
|
-
}
|
|
107
|
-
export {
|
|
108
|
-
O as buildAuthorityFromGrid,
|
|
109
|
-
z as buildColumnStateFromAuthority,
|
|
110
|
-
J as fingerprintAuthority,
|
|
111
|
-
j as reorderColumn,
|
|
112
|
-
k as toggleAllColumnsVisibility,
|
|
113
|
-
S as toggleColumnVisibility,
|
|
114
|
-
E as toggleColumnsVisibility,
|
|
115
|
-
q as updateColumnPin
|
|
116
|
-
};
|