impact-nova 1.7.38 → 1.7.40

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 (42) hide show
  1. package/dist/components/ui/ag-grid-react/cell-renderers/editors/date-cell-editor.js +58 -48
  2. package/dist/components/ui/ag-grid-react/headers/advanced-filter/advanced-filter-dialog.d.ts +0 -2
  3. package/dist/components/ui/ag-grid-react/headers/advanced-filter/advanced-filter-dialog.js +212 -218
  4. package/dist/components/ui/ag-grid-react/headers/advanced-filter/column-filter-section.d.ts +2 -2
  5. package/dist/components/ui/ag-grid-react/headers/advanced-filter/column-filter-section.js +97 -127
  6. package/dist/components/ui/ag-grid-react/headers/components/date-filter-picker.d.ts +39 -0
  7. package/dist/components/ui/ag-grid-react/headers/header-search-input.js +433 -299
  8. package/dist/components/ui/ag-grid-react/headers/utils/date-utils.d.ts +33 -1
  9. package/dist/components/ui/ag-grid-react/headers/utils/date-utils.js +60 -26
  10. package/dist/components/ui/ag-grid-react/headers/utils/filter-utils.d.ts +11 -10
  11. package/dist/components/ui/ag-grid-react/headers/utils/filter-utils.js +284 -260
  12. package/dist/components/ui/ag-grid-react/index.js +24 -25
  13. package/dist/components/ui/create-item-flow/create-item-flow.js +1 -1
  14. package/dist/components/ui/data-table/column-indicator.d.ts +17 -0
  15. package/dist/components/ui/data-table/column-indicator.js +30 -0
  16. package/dist/components/ui/data-table/data-table-column-list.js +210 -154
  17. package/dist/components/ui/data-table/data-table.js +60 -59
  18. package/dist/components/ui/data-table/index.d.ts +3 -0
  19. package/dist/components/ui/data-table/index.js +34 -28
  20. package/dist/components/ui/data-table/indicator-legend.d.ts +8 -0
  21. package/dist/components/ui/data-table/indicator-legend.js +20 -0
  22. package/dist/components/ui/data-table/pin-switch.d.ts +30 -0
  23. package/dist/components/ui/data-table/pin-switch.js +75 -0
  24. package/dist/components/ui/date-picker/date-picker.js +65 -63
  25. package/dist/components/ui/date-picker/date-range-picker.js +77 -75
  26. package/dist/components/ui/nested-list/components/NestedListContent.js +7 -7
  27. package/dist/components/ui/nested-list/components/SortableItem.d.ts +10 -0
  28. package/dist/components/ui/nested-list/components/SortableItem.js +91 -83
  29. package/dist/components/ui/nested-list/nested-list.js +184 -178
  30. package/dist/components/ui/types/ag-grid.types.d.ts +16 -2
  31. package/dist/components/ui/types/date-picker.types.d.ts +4 -0
  32. package/dist/components/ui/types/nested-list.types.d.ts +12 -0
  33. package/dist/i18n/defaultMessages.d.ts +10 -0
  34. package/dist/i18n/defaultMessages.js +16 -8
  35. package/dist/i18n/locales/de.js +8 -0
  36. package/dist/i18n/locales/es.js +8 -0
  37. package/dist/i18n/locales/hi.js +8 -0
  38. package/dist/i18n/locales/kn.js +8 -0
  39. package/dist/impact-nova.css +1 -1
  40. package/dist/index.js +180 -174
  41. package/package.json +1 -1
  42. package/tailwind.config.js +16 -0
@@ -1,4 +1,6 @@
1
- import { MonthSelection } from '../../../calendar';
1
+ import { MonthSelection, WeekSelection } from '../../../calendar';
2
+ /** Default display format used across AG Grid date filters */
3
+ export declare const DEFAULT_DATE_DISPLAY_FORMAT = "MM/dd/yyyy";
2
4
  /**
3
5
  * Convert a MonthSelection to an AG Grid inRange date filter range.
4
6
  * Returns { dateFrom: 'YYYY-MM-01', dateTo: 'YYYY-MM-lastDay' }.
@@ -39,6 +41,22 @@ export declare function getTodayStr(): string;
39
41
  * Get Yesterday as YYYY-MM-DD
40
42
  */
41
43
  export declare function getYesterdayStr(): string;
44
+ /**
45
+ * Convert a display-format date string to ISO (YYYY-MM-DD).
46
+ * Uses date-fns parse() for format-aware conversion.
47
+ * @param displayStr - The display string typed by user (e.g. "02/06/2026" or "06-02-2026")
48
+ * @param dateFormat - The date-fns format pattern the string is in (e.g. "MM/dd/yyyy", "dd/MM/yyyy")
49
+ * @returns ISO string "YYYY-MM-DD" or null if invalid
50
+ */
51
+ export declare function displayDateToIso(displayStr: string, dateFormat?: string): string | null;
52
+ /**
53
+ * Convert an ISO date string (YYYY-MM-DD) to display format.
54
+ * Uses date-fns format() for format-aware conversion.
55
+ * @param isoStr - ISO date string (e.g. "2026-06-02")
56
+ * @param dateFormat - The target display format (e.g. "MM/dd/yyyy", "dd-MM-yyyy")
57
+ * @returns Formatted display string or empty string if invalid
58
+ */
59
+ export declare function isoToDisplay(isoStr: string | null | undefined, dateFormat?: string): string;
42
60
  /**
43
61
  * Get range for a whole year
44
62
  */
@@ -54,3 +72,17 @@ export declare function getMonthRange(month: number, year: number): {
54
72
  from: string;
55
73
  to: string;
56
74
  };
75
+ /**
76
+ * Convert a WeekSelection to an AG Grid inRange date filter range.
77
+ * Returns { dateFrom: 'YYYY-MM-DD', dateTo: 'YYYY-MM-DD' } using the week's start and end dates.
78
+ */
79
+ export declare function serializeWeek(week: WeekSelection): {
80
+ dateFrom: string;
81
+ dateTo: string;
82
+ };
83
+ /**
84
+ * Reconstruct a WeekSelection from dateFrom and dateTo strings.
85
+ * Note: This creates a minimal WeekSelection with startDate and endDate.
86
+ * The year, month, weekOfMonth fields are derived from startDate.
87
+ */
88
+ export declare function deserializeWeek(dateFrom: string | null, dateTo: string | null): WeekSelection | null;
@@ -1,52 +1,86 @@
1
- function o(t) {
2
- const n = t.year, e = t.month + 1, r = new Date(n, e, 0).getDate(), a = String(e).padStart(2, "0");
1
+ import { parse as s, isValid as u, format as l } from "date-fns";
2
+ const c = "MM/dd/yyyy";
3
+ function D(t) {
4
+ const e = t.year, n = t.month + 1, r = new Date(e, n, 0).getDate(), a = String(n).padStart(2, "0");
3
5
  return {
4
- dateFrom: `${n}-${a}-01`,
5
- dateTo: `${n}-${a}-${String(r).padStart(2, "0")}`
6
+ dateFrom: `${e}-${a}-01`,
7
+ dateTo: `${e}-${a}-${String(r).padStart(2, "0")}`
6
8
  };
7
9
  }
8
- function s(t) {
10
+ function y(t) {
9
11
  if (!t || typeof t != "string") return null;
10
- const n = t.split(" ")[0].split("T")[0], [e, r] = n.split("-").map(Number);
11
- return isNaN(e) || isNaN(r) ? null : { year: e, month: r - 1 };
12
+ const e = t.split(" ")[0].split("T")[0], [n, r] = e.split("-").map(Number);
13
+ return isNaN(n) || isNaN(r) ? null : { year: n, month: r - 1 };
12
14
  }
13
15
  function i(t) {
14
16
  if (!t) return null;
15
- const n = t.getFullYear(), e = String(t.getMonth() + 1).padStart(2, "0"), r = String(t.getDate()).padStart(2, "0");
16
- return `${n}-${e}-${r}`;
17
+ const e = t.getFullYear(), n = String(t.getMonth() + 1).padStart(2, "0"), r = String(t.getDate()).padStart(2, "0");
18
+ return `${e}-${n}-${r}`;
17
19
  }
18
- function u(t) {
20
+ function o(t) {
19
21
  if (!t || typeof t != "string") return null;
20
- const n = t.split(" ")[0].split("T")[0], [e, r, a] = n.split("-").map(Number);
21
- return isNaN(e) || isNaN(r) || isNaN(a) ? null : new Date(e, r - 1, a);
22
+ const e = t.split(" ")[0].split("T")[0], [n, r, a] = e.split("-").map(Number);
23
+ return isNaN(n) || isNaN(r) || isNaN(a) ? null : new Date(n, r - 1, a);
22
24
  }
23
- function l() {
25
+ function g() {
24
26
  return i(/* @__PURE__ */ new Date());
25
27
  }
26
- function c() {
28
+ function p() {
27
29
  const t = /* @__PURE__ */ new Date();
28
30
  return t.setDate(t.getDate() - 1), i(t);
29
31
  }
30
- function g(t) {
32
+ function d(t, e = c) {
33
+ if (!t || typeof t != "string") return null;
34
+ const n = s(t, e, /* @__PURE__ */ new Date());
35
+ return u(n) ? l(n, "yyyy-MM-dd") : null;
36
+ }
37
+ function m(t, e = c) {
38
+ if (!t || typeof t != "string") return "";
39
+ const n = t.split(" ")[0].split("T")[0], r = s(n, "yyyy-MM-dd", /* @__PURE__ */ new Date());
40
+ return u(r) ? l(r, e) : "";
41
+ }
42
+ function $(t) {
31
43
  return {
32
44
  from: `${t}-01-01`,
33
45
  to: `${t}-12-31`
34
46
  };
35
47
  }
36
- function f(t, n) {
37
- const e = new Date(n, t, 0).getDate(), r = String(t).padStart(2, "0");
48
+ function M(t, e) {
49
+ const n = new Date(e, t, 0).getDate(), r = String(t).padStart(2, "0");
38
50
  return {
39
- from: `${n}-${r}-01`,
40
- to: `${n}-${r}-${e}`
51
+ from: `${e}-${r}-01`,
52
+ to: `${e}-${r}-${n}`
53
+ };
54
+ }
55
+ function N(t) {
56
+ return {
57
+ dateFrom: i(t.startDate),
58
+ dateTo: i(t.endDate)
59
+ };
60
+ }
61
+ function h(t, e) {
62
+ if (!t || !e) return null;
63
+ const n = o(t), r = o(e);
64
+ return !n || !r ? null : {
65
+ year: n.getFullYear(),
66
+ month: n.getMonth(),
67
+ weekOfMonth: Math.ceil(n.getDate() / 7),
68
+ startDate: n,
69
+ endDate: r
41
70
  };
42
71
  }
43
72
  export {
44
- u as deserializeDate,
45
- s as deserializeMonth,
46
- f as getMonthRange,
47
- l as getTodayStr,
48
- g as getYearRange,
49
- c as getYesterdayStr,
73
+ c as DEFAULT_DATE_DISPLAY_FORMAT,
74
+ o as deserializeDate,
75
+ y as deserializeMonth,
76
+ h as deserializeWeek,
77
+ d as displayDateToIso,
78
+ M as getMonthRange,
79
+ g as getTodayStr,
80
+ $ as getYearRange,
81
+ p as getYesterdayStr,
82
+ m as isoToDisplay,
50
83
  i as serializeDate,
51
- o as serializeMonth
84
+ D as serializeMonth,
85
+ N as serializeWeek
52
86
  };
@@ -62,14 +62,18 @@ export declare function hasAdvancedPatternSyntax(input: string): boolean;
62
62
  /**
63
63
  * Format a single filter rule for display in the header.
64
64
  * Returns a compact representation based on the operator.
65
- * Detects ISO date strings and formats them as MM/DD.
65
+ * Detects ISO date strings and formats them using the given dateFormat.
66
+ *
67
+ * @param rule - The filter rule to format
68
+ * @param dateFormat - The date-fns display format for date values (default: MM/dd/yyyy)
66
69
  *
67
70
  * @example
68
71
  * formatRuleForDisplay({ operator: 'contains', value: 'john' }) // 'john'
69
72
  * formatRuleForDisplay({ operator: 'startsWith', value: 'Dr' }) // 'Dr*'
70
- * formatRuleForDisplay({ operator: 'greaterThan', value: '2026-02-02T...' }) // '>02/02'
73
+ * formatRuleForDisplay({ operator: 'greaterThan', value: '2026-02-02' }) // '>02/02/2026'
74
+ * formatRuleForDisplay({ operator: 'greaterThanOrEqual', value: '100' }) // '>=100'
71
75
  */
72
- export declare function formatRuleForDisplay(rule: AdvancedFilterRule): string;
76
+ export declare function formatRuleForDisplay(rule: AdvancedFilterRule, dateFormat?: string): string;
73
77
  /**
74
78
  * Get display string for a specific column from the advanced filter model.
75
79
  * Handles nested groups and concatenates multiple rules for the same column.
@@ -78,19 +82,16 @@ export declare function formatRuleForDisplay(rule: AdvancedFilterRule): string;
78
82
  * getColumnDisplayString(model, 'name') // 'John* + *Smith' (if AND logic)
79
83
  * getColumnDisplayString(model, 'name') // 'John*, *Smith' (if OR logic)
80
84
  */
81
- export declare function getColumnDisplayString(model: AdvancedFilterModel | null, columnId: string): string;
85
+ export declare function getColumnDisplayString(model: AdvancedFilterModel | null, columnId: string, dateFormat?: string): string;
82
86
  /**
83
87
  * Check if a column has any rules in the advanced filter model.
84
88
  */
85
89
  export declare function isColumnInAdvancedFilter(model: AdvancedFilterModel | null, columnId: string): boolean;
86
- export declare function getDisplayStringFromFilterModel(columnId: string, model: GridFilterModel | null): string;
87
90
  /**
88
- * Pre-compute display values for all columns.
89
- * Returns a map of columnId -> display string.
90
- *
91
- * This is more efficient than calling getColumnDisplayString for each header,
92
- * especially with many columns (50,000+).
91
+ * Map AG Grid native operator to our internal operator names for formatting.
93
92
  */
93
+ export declare const agToInternalOperator: Record<string, FilterOperator>;
94
+ export declare function getDisplayStringFromFilterModel(columnId: string, model: GridFilterModel | null, dateFormat?: string): string;
94
95
  /**
95
96
  * Generate a unique ID for filter rules/groups.
96
97
  */