impact-nova 2.5.20 → 2.5.22

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 (33) hide show
  1. package/dist/components/data/data-table/build-column-tree-from-grid.d.ts +1 -0
  2. package/dist/components/data/data-table/build-column-tree-from-grid.js +52 -50
  3. package/dist/components/data/data-table/column-picker-authority.d.ts +1 -0
  4. package/dist/components/data/data-table/column-picker-authority.js +61 -59
  5. package/dist/components/data/data-table/column-savability.d.ts +3 -0
  6. package/dist/components/data/data-table/column-savability.js +10 -0
  7. package/dist/components/data/data-table/data-table-column-list.js +117 -89
  8. package/dist/components/data/data-table/data-table-flat-column-virtual-rows.d.ts +1 -0
  9. package/dist/components/data/data-table/data-table-flat-column-virtual-rows.js +23 -22
  10. package/dist/components/data/data-table/index.d.ts +2 -0
  11. package/dist/components/data/data-table/index.js +32 -28
  12. package/dist/components/data/data-table/patch-column-tree-indicators-from-grid.js +14 -13
  13. package/dist/components/data/expandable-list-item/expandable-list-item-attributes.js +3 -2
  14. package/dist/components/data/expandable-list-item/expandable-list-item-metrics.js +3 -2
  15. package/dist/components/data-display/calendar/calendar-available-view.d.ts +6 -2
  16. package/dist/components/data-display/calendar/calendar-available-view.js +18 -19
  17. package/dist/components/data-display/calendar/calendar-week-utils.d.ts +6 -0
  18. package/dist/components/data-display/calendar/calendar-week-utils.js +33 -33
  19. package/dist/components/data-display/calendar/calendar-year-panes.js +68 -58
  20. package/dist/components/data-display/calendar/calendar-year-utils.d.ts +13 -0
  21. package/dist/components/data-display/calendar/calendar-year-utils.js +60 -51
  22. package/dist/components/feedback/tooltip/tab-tooltip-render.js +3 -2
  23. package/dist/components/flows/command-palette/shortcut-settings.js +10 -10
  24. package/dist/components/flows/filter-panel/filter-panel.js +4 -4
  25. package/dist/components/forms/select/components/SelectTriggerValue.js +3 -2
  26. package/dist/components/forms/select/components/Submenu.js +3 -2
  27. package/dist/form-react/Fields/TextFieldWithBackendValidation.js +27 -26
  28. package/dist/form-react/types/fields.types.d.ts +5 -0
  29. package/dist/index.js +273 -269
  30. package/dist/llms/rules/ag-grid.js +1 -1
  31. package/dist/llms/rules/installation.js +1 -1
  32. package/dist/llms/rules/requirements.js +1 -1
  33. package/package.json +1 -1
@@ -1,13 +1,13 @@
1
1
  import { getSectionIdFromDroppable as S } from "../nested-list/nested-list-drop-engine.js";
2
2
  import { NESTED_LIST_ROOT_FROZEN_ID as d, NESTED_LIST_ROOT_SCROLLABLE_ID as u } from "../nested-list/nested-list-constants.js";
3
- import { updateColumnPin as h, reorderColumn as k } from "./column-picker-authority.js";
3
+ import { updateColumnPin as b, reorderColumn as k } from "./column-picker-authority.js";
4
4
  function g(e) {
5
5
  const n = [], t = [];
6
6
  for (const l of e.orderedColumnIds)
7
7
  e.pinByColumnId.get(l) ? n.push(l) : t.push(l);
8
8
  return { frozenColumnIds: n, scrollableColumnIds: t };
9
9
  }
10
- function b(e, n, t) {
10
+ function h(e, n, t) {
11
11
  const l = t.trim().toLowerCase();
12
12
  return l === "" ? [...n] : n.filter((r) => (e.labelByColumnId.get(r) ?? r).toLowerCase().includes(l));
13
13
  }
@@ -23,7 +23,7 @@ function C(e, n) {
23
23
  };
24
24
  }
25
25
  function D(e, n, t) {
26
- const l = t.searchQuery ?? "", { frozenColumnIds: r, scrollableColumnIds: c } = g(e), s = b(e, r, l), o = b(e, c, l), i = C(s, e), f = C(o, e), m = [
26
+ const l = t.searchQuery ?? "", { frozenColumnIds: r, scrollableColumnIds: c } = g(e), s = h(e, r, l), o = h(e, c, l), i = C(s, e), m = C(o, e), f = [
27
27
  {
28
28
  kind: "structure",
29
29
  sectionId: d,
@@ -34,21 +34,21 @@ function D(e, n, t) {
34
34
  }
35
35
  ];
36
36
  for (const a of s)
37
- m.push({ kind: "column", columnId: a, sectionId: d });
38
- m.push({
37
+ f.push({ kind: "column", columnId: a, sectionId: d });
38
+ f.push({
39
39
  kind: "structure",
40
40
  sectionId: u,
41
41
  label: n.scrollableColumns,
42
- checked: f.checked,
43
- indeterminate: f.indeterminate,
42
+ checked: m.checked,
43
+ indeterminate: m.indeterminate,
44
44
  hasVirtualColumnChildren: o.length > 0
45
45
  });
46
46
  for (const a of o)
47
- m.push({ kind: "column", columnId: a, sectionId: u });
48
- return m;
47
+ f.push({ kind: "column", columnId: a, sectionId: u });
48
+ return f;
49
49
  }
50
50
  function z(e, n, t) {
51
- const l = e.pinByColumnId.get(n) ?? null, r = e.visibilityByColumnId.get(n) ?? !0, c = e.labelByColumnId.get(n) ?? n, s = t.sortAppliedByColumnId?.get(n) ?? !1, o = t.filterAppliedByColumnId?.get(n) ?? !1;
51
+ const l = e.pinByColumnId.get(n) ?? null, r = e.visibilityByColumnId.get(n) ?? !0, c = e.labelByColumnId.get(n) ?? n, s = t.sortAppliedByColumnId?.get(n) ?? !1, o = t.filterAppliedByColumnId?.get(n) ?? !1, i = t.nonSavableByColumnId?.get(n) ?? !1;
52
52
  return {
53
53
  item: {
54
54
  id: n,
@@ -57,6 +57,7 @@ function z(e, n, t) {
57
57
  data: {
58
58
  hasSortApplied: s,
59
59
  hasFilterApplied: o,
60
+ isNonSavable: i,
60
61
  pinned: l
61
62
  }
62
63
  },
@@ -64,7 +65,7 @@ function z(e, n, t) {
64
65
  indentLevel: 1
65
66
  };
66
67
  }
67
- function F(e) {
68
+ function B(e) {
68
69
  return {
69
70
  item: {
70
71
  id: e.sectionId,
@@ -80,7 +81,7 @@ function F(e) {
80
81
  indentLevel: 0
81
82
  };
82
83
  }
83
- function v(e, n, t = {}) {
84
+ function L(e, n, t = {}) {
84
85
  const l = D(e, n, t), r = /* @__PURE__ */ new Map();
85
86
  for (let o = 0; o < l.length; o += 1) {
86
87
  const i = l[o];
@@ -95,7 +96,7 @@ function v(e, n, t = {}) {
95
96
  const i = l[o];
96
97
  if (!i)
97
98
  throw new RangeError(`Flat column virtual row index out of bounds: ${o}`);
98
- return i.kind === "structure" ? F(i) : z(e, i.columnId, t);
99
+ return i.kind === "structure" ? B(i) : z(e, i.columnId, t);
99
100
  },
100
101
  getColumnIdAt: (o) => {
101
102
  const i = l[o];
@@ -137,16 +138,16 @@ function V(e, n) {
137
138
  }
138
139
  return !0;
139
140
  }
140
- function A(e, n) {
141
+ function F(e, n) {
141
142
  const t = e.pinByColumnId.get(n);
142
143
  return t === "left" || t === "right";
143
144
  }
144
- function B(e, n) {
145
+ function A(e, n) {
145
146
  if (n === d)
146
147
  return 0;
147
148
  for (let t = 0; t < e.orderedColumnIds.length; t += 1) {
148
149
  const l = e.orderedColumnIds[t];
149
- if (!A(e, l))
150
+ if (!F(e, l))
150
151
  return t;
151
152
  }
152
153
  return e.orderedColumnIds.length;
@@ -163,7 +164,7 @@ function R(e, n, t, l) {
163
164
  const i = l ? o + 1 : o;
164
165
  return s.splice(i, 0, n), r === i ? e : k(e, r, i);
165
166
  }
166
- function O(e, n) {
167
+ function v(e, n) {
167
168
  const t = S(e);
168
169
  return t === d || t === u ? t : e === d || e === u ? e : n.frozenColumnIds.includes(e) ? d : n.scrollableColumnIds.includes(e) ? u : null;
169
170
  }
@@ -171,15 +172,15 @@ function _(e, n, t) {
171
172
  const { draggedColumnId: l, overId: r, insertAfter: c } = t;
172
173
  if (l === r || !e.orderedColumnIds.includes(l))
173
174
  return null;
174
- const s = O(r, n);
175
+ const s = v(r, n);
175
176
  if (s) {
176
177
  if (S(r) !== null || r === d || r === u) {
177
- const I = h(e, l, s === d ? "left" : null), x = B(I, s), p = I.orderedColumnIds.indexOf(l);
178
+ const I = b(e, l, s === d ? "left" : null), x = A(I, s), p = I.orderedColumnIds.indexOf(l);
178
179
  return p === -1 ? null : k(I, p, x);
179
180
  }
180
- const i = n.frozenColumnIds.includes(l), f = s === d ? "left" : null, m = i === (f === "left") ? e : h(e, l, f);
181
+ const i = n.frozenColumnIds.includes(l), m = s === d ? "left" : null, f = i === (m === "left") ? e : b(e, l, m);
181
182
  return R(
182
- m,
183
+ f,
183
184
  l,
184
185
  r,
185
186
  c
@@ -190,6 +191,6 @@ function _(e, n, t) {
190
191
  export {
191
192
  _ as applyFlatVirtualDropToAuthority,
192
193
  P as buildAuthorityFlatShellItems,
193
- v as buildFlatColumnVirtualRowModel,
194
+ L as buildFlatColumnVirtualRowModel,
194
195
  V as isFlatLargeColumnPicker
195
196
  };
@@ -12,4 +12,6 @@ export * from './data-table-saved-views';
12
12
  export * from './pin-switch';
13
13
  export * from './column-indicator';
14
14
  export * from './indicator-legend';
15
+ export * from './column-savability';
16
+ export { mergePartialOrderedColumnState } from './data-table-column-state';
15
17
  export type { SavedTableViewItem, TableViewTypeOption, DataTableSavedViewsProps, DataTableSavedViewsActionContext, DataTableSavedViewsCancelContext, } from '../data-table/data-table-saved-views.types';
@@ -1,54 +1,58 @@
1
- import { DataTable as t, DataTableContent as o, DataTableToolbar as r } from "./data-table.js";
2
- import { deferColumnRuntimeStateGuard as l, isColumnRuntimeStateGuardDeferred as n, isColumnRuntimeStateGuardUpdating as D, rebuildColumnTreeCacheFromGrid as S, scheduleColumnRuntimeStateGuard as b } from "./column-runtime-state-guard.js";
3
- import { DATA_TABLE_SCOPED_SHEET_HOST_MIN_HEIGHT_PX as m, DATA_TABLE_SHEET_SLIDE_TRANSITION_MS as u, TABLE_VIEWPORT_SHELL_EXPANDED_CLASS as p } from "./data-table-constants.js";
4
- import { DataTableColumnList as h } from "./data-table-column-list.js";
5
- import { DataTableContext as f, DataTableSheetPortalStoreContext as s, useDataTable as _, useDataTableSheetPortal as C, useDataTableSheetPortalStore as E } from "./data-table-context.js";
1
+ import { DataTable as t, DataTableContent as r, DataTableToolbar as o } from "./data-table.js";
2
+ import { deferColumnRuntimeStateGuard as T, isColumnRuntimeStateGuardDeferred as n, isColumnRuntimeStateGuardUpdating as S, rebuildColumnTreeCacheFromGrid as D, scheduleColumnRuntimeStateGuard as b } from "./column-runtime-state-guard.js";
3
+ import { DATA_TABLE_SCOPED_SHEET_HOST_MIN_HEIGHT_PX as i, DATA_TABLE_SHEET_SLIDE_TRANSITION_MS as u, TABLE_VIEWPORT_SHELL_EXPANDED_CLASS as p } from "./data-table-constants.js";
4
+ import { DataTableColumnList as x } from "./data-table-column-list.js";
5
+ import { DataTableContext as h, DataTableSheetPortalStoreContext as s, useDataTable as C, useDataTableSheetPortal as _, useDataTableSheetPortalStore as E } from "./data-table-context.js";
6
6
  import { DataTableFormatOptions as L } from "./data-table-format-options.js";
7
- import { DataTableSheet as P, DataTableSheetContent as w, DataTableSheetHeader as V, DataTableSheetTrigger as g } from "./data-table-sheet.js";
8
- import { DataTableSheetBody as M, DataTableSheetSection as c, DataTableSheetTabPanel as G, DataTableSheetTabs as R, DataTableSheetTabsList as O } from "./data-table-sheet-layout.js";
9
- import { useDataTableSheet as N, useDataTableSheetApi as y } from "./data-table-sheet-context.js";
10
- import { DataTableViewMenuContent as X, DataTableViewMenuDensity as v, DataTableViewMenuSettingsItem as U, DataTableViewMenuTrigger as W, DataTableViewMenuViewportExpand as j } from "./data-table-view-menu.js";
7
+ import { DataTableSheet as I, DataTableSheetContent as g, DataTableSheetHeader as w, DataTableSheetTrigger as V } from "./data-table-sheet.js";
8
+ import { DataTableSheetBody as M, DataTableSheetSection as c, DataTableSheetTabPanel as G, DataTableSheetTabs as O, DataTableSheetTabsList as R } from "./data-table-sheet-layout.js";
9
+ import { useDataTableSheet as N, useDataTableSheetApi as v } from "./data-table-sheet-context.js";
10
+ import { DataTableViewMenuContent as F, DataTableViewMenuDensity as X, DataTableViewMenuSettingsItem as U, DataTableViewMenuTrigger as W, DataTableViewMenuViewportExpand as j } from "./data-table-view-menu.js";
11
11
  import { DataTableSavedViews as q } from "./data-table-saved-views.js";
12
12
  import { PinSwitch as J } from "./pin-switch.js";
13
13
  import { ColumnIndicator as Q } from "./column-indicator.js";
14
14
  import { IndicatorLegend as Z } from "./indicator-legend.js";
15
+ import { resolveColumnSavability as ee } from "./column-savability.js";
16
+ import { mergePartialOrderedColumnState as te } from "./data-table-column-state.js";
15
17
  export {
16
18
  Q as ColumnIndicator,
17
- m as DATA_TABLE_SCOPED_SHEET_HOST_MIN_HEIGHT_PX,
19
+ i as DATA_TABLE_SCOPED_SHEET_HOST_MIN_HEIGHT_PX,
18
20
  u as DATA_TABLE_SHEET_SLIDE_TRANSITION_MS,
19
21
  t as DataTable,
20
- h as DataTableColumnList,
21
- o as DataTableContent,
22
- f as DataTableContext,
22
+ x as DataTableColumnList,
23
+ r as DataTableContent,
24
+ h as DataTableContext,
23
25
  L as DataTableFormatOptions,
24
26
  q as DataTableSavedViews,
25
- P as DataTableSheet,
27
+ I as DataTableSheet,
26
28
  M as DataTableSheetBody,
27
- w as DataTableSheetContent,
28
- V as DataTableSheetHeader,
29
+ g as DataTableSheetContent,
30
+ w as DataTableSheetHeader,
29
31
  s as DataTableSheetPortalStoreContext,
30
32
  c as DataTableSheetSection,
31
33
  G as DataTableSheetTabPanel,
32
- R as DataTableSheetTabs,
33
- O as DataTableSheetTabsList,
34
- g as DataTableSheetTrigger,
35
- r as DataTableToolbar,
36
- X as DataTableViewMenuContent,
37
- v as DataTableViewMenuDensity,
34
+ O as DataTableSheetTabs,
35
+ R as DataTableSheetTabsList,
36
+ V as DataTableSheetTrigger,
37
+ o as DataTableToolbar,
38
+ F as DataTableViewMenuContent,
39
+ X as DataTableViewMenuDensity,
38
40
  U as DataTableViewMenuSettingsItem,
39
41
  W as DataTableViewMenuTrigger,
40
42
  j as DataTableViewMenuViewportExpand,
41
43
  Z as IndicatorLegend,
42
44
  J as PinSwitch,
43
45
  p as TABLE_VIEWPORT_SHELL_EXPANDED_CLASS,
44
- l as deferColumnRuntimeStateGuard,
46
+ T as deferColumnRuntimeStateGuard,
45
47
  n as isColumnRuntimeStateGuardDeferred,
46
- D as isColumnRuntimeStateGuardUpdating,
47
- S as rebuildColumnTreeCacheFromGrid,
48
+ S as isColumnRuntimeStateGuardUpdating,
49
+ te as mergePartialOrderedColumnState,
50
+ D as rebuildColumnTreeCacheFromGrid,
51
+ ee as resolveColumnSavability,
48
52
  b as scheduleColumnRuntimeStateGuard,
49
- _ as useDataTable,
53
+ C as useDataTable,
50
54
  N as useDataTableSheet,
51
- y as useDataTableSheetApi,
52
- C as useDataTableSheetPortal,
55
+ v as useDataTableSheetApi,
56
+ _ as useDataTableSheetPortal,
53
57
  E as useDataTableSheetPortalStore
54
58
  };
@@ -1,35 +1,36 @@
1
1
  function p(l) {
2
- const o = l.getGridOption("context"), r = typeof o?.activeSearchColumnId == "string" ? o.activeSearchColumnId : null, s = /* @__PURE__ */ new Map();
2
+ const o = l.getGridOption("context"), r = typeof o?.activeSearchColumnId == "string" ? o.activeSearchColumnId : null, a = /* @__PURE__ */ new Map();
3
3
  for (const n of l.getColumnState())
4
- s.set(n.colId, !!n.sort);
5
- const a = /* @__PURE__ */ new Map(), u = l.getAllGridColumns?.() ?? l.getColumns?.() ?? [];
6
- for (const n of u) {
4
+ a.set(n.colId, !!n.sort);
5
+ const s = /* @__PURE__ */ new Map(), i = l.getAllGridColumns?.() ?? l.getColumns?.() ?? [];
6
+ for (const n of i) {
7
7
  const c = n.getColId();
8
- a.set(
8
+ s.set(
9
9
  c,
10
10
  n.isFilterActive() === !0 || r === c
11
11
  );
12
12
  }
13
- return { sortAppliedByColumnId: s, filterAppliedByColumnId: a };
13
+ return { sortAppliedByColumnId: a, filterAppliedByColumnId: s };
14
14
  }
15
15
  function I(l, o) {
16
- const r = o.getGridOption("context"), s = typeof r?.activeSearchColumnId == "string" ? r.activeSearchColumnId : null, a = new Map(
16
+ const r = o.getGridOption("context"), a = typeof r?.activeSearchColumnId == "string" ? r.activeSearchColumnId : null, s = new Map(
17
17
  o.getColumnState().map((e) => [e.colId, e])
18
- ), u = o.getAllGridColumns?.() ?? o.getColumns?.() ?? [], n = new Map(
19
- u.map((e) => [e.getColId(), e])
18
+ ), i = o.getAllGridColumns?.() ?? o.getColumns?.() ?? [], n = new Map(
19
+ i.map((e) => [e.getColId(), e])
20
20
  ), c = (e) => e.map((t) => {
21
21
  if ((t.category === "group" || t.children && t.children.length > 0) && t.children)
22
22
  return {
23
23
  ...t,
24
24
  children: c(t.children)
25
25
  };
26
- const i = n.get(t.id), m = a.get(t.id), d = t.data;
26
+ const m = n.get(t.id), d = s.get(t.id), u = t.data;
27
27
  return {
28
28
  ...t,
29
29
  data: {
30
- ...d,
31
- hasSortApplied: !!m?.sort,
32
- hasFilterApplied: i?.isFilterActive() === !0 || s === t.id
30
+ ...u,
31
+ hasSortApplied: !!d?.sort,
32
+ hasFilterApplied: m?.isFilterActive() === !0 || a === t.id,
33
+ isNonSavable: u?.isNonSavable
33
34
  }
34
35
  };
35
36
  });
@@ -3,7 +3,8 @@ import { Badge as s } from "../../data-display/badge/badge.js";
3
3
  import { FilterPopoverContent as u } from "../../flows/filter-strip/filter-tag-list.js";
4
4
  import { Popover as b, PopoverTrigger as f } from "../../feedback/popover/popover.js";
5
5
  import { Tooltip as g, TooltipTrigger as v, TooltipContent as x } from "../../feedback/tooltip/tooltip.js";
6
- function w({
6
+ import "react";
7
+ function I({
7
8
  tags: o,
8
9
  title: l = "Attributes",
9
10
  maxVisibleTags: n = 4,
@@ -70,5 +71,5 @@ function w({
70
71
  );
71
72
  }
72
73
  export {
73
- w as ExpandableListItemAttributes
74
+ I as ExpandableListItemAttributes
74
75
  };
@@ -1,8 +1,9 @@
1
1
  import { jsx as e, jsxs as s } from "react/jsx-runtime";
2
2
  import { ScrollOverflowAffordance as o } from "../../layout/horizontal-scroller/scroll-overflow-affordance.js";
3
+ import "react";
3
4
  import { OverflowTooltip as r } from "../../feedback/tooltip/overflow-tooltip.js";
4
5
  const m = 128;
5
- function x({
6
+ function f({
6
7
  columns: i,
7
8
  sectionId: l = "metrics"
8
9
  }) {
@@ -50,5 +51,5 @@ function x({
50
51
  );
51
52
  }
52
53
  export {
53
- x as ExpandableListItemMetrics
54
+ f as ExpandableListItemMetrics
54
55
  };
@@ -21,7 +21,11 @@ export declare function hasCalendarValue(value: unknown): boolean;
21
21
  /** Clamp `from` into `[minDate, maxDate]`. O(1). */
22
22
  export declare function firstAvailableDate(minDate?: Date, maxDate?: Date, from?: Date): Date;
23
23
  /**
24
- * When auto-navigate is on and there is no selection, land the visible pane on the
25
- * first enabled period. Does not write a selected value.
24
+ * When auto-navigate is on and there is no selection, land the **left** pane on
25
+ * the first enabled period. Does not write a selected value.
26
+ *
27
+ * For dual-month date/week pickers, "already visible on the right pane" is not
28
+ * enough — the first enabled month must become the left pane so users do not
29
+ * open onto a disabled neighbor month.
26
30
  */
27
31
  export declare function resolveAvailableViewMonth(options: ResolveAvailableViewMonthOptions): Date;
@@ -1,11 +1,11 @@
1
- const F = 12;
1
+ const m = 12;
2
2
  function u(t) {
3
3
  return new Date(t.getFullYear(), t.getMonth(), t.getDate());
4
4
  }
5
5
  function f(t) {
6
6
  return new Date(t.getFullYear(), t.getMonth(), 1);
7
7
  }
8
- function h(t, e) {
8
+ function F(t, e) {
9
9
  return t.getFullYear() === e.getFullYear() && t.getMonth() === e.getMonth();
10
10
  }
11
11
  function A(t) {
@@ -17,7 +17,7 @@ function A(t) {
17
17
  ...e.after instanceof Date ? { maxDate: e.after } : {}
18
18
  };
19
19
  }
20
- function Y(t) {
20
+ function h(t) {
21
21
  if (t == null) return !1;
22
22
  if (Array.isArray(t)) return t.length > 0;
23
23
  if (t instanceof Date) return !0;
@@ -30,7 +30,7 @@ function Y(t) {
30
30
  }
31
31
  return !1;
32
32
  }
33
- function g(t, e, n = /* @__PURE__ */ new Date()) {
33
+ function s(t, e, n = /* @__PURE__ */ new Date()) {
34
34
  const r = u(n);
35
35
  if (t) {
36
36
  const a = u(t);
@@ -42,7 +42,7 @@ function g(t, e, n = /* @__PURE__ */ new Date()) {
42
42
  }
43
43
  return r;
44
44
  }
45
- function D(t, e, n) {
45
+ function g(t, e, n) {
46
46
  const r = f(t), a = new Date(
47
47
  t.getFullYear(),
48
48
  t.getMonth() + e,
@@ -54,32 +54,31 @@ function D(t, e, n) {
54
54
  ), i = u(n).getTime();
55
55
  return i >= r.getTime() && i <= a.getTime();
56
56
  }
57
- function m(t, e, n) {
57
+ function D(t, e, n) {
58
58
  const r = Math.floor(t / n) * n;
59
59
  return e >= r && e <= r + n - 1;
60
60
  }
61
- function w(t) {
61
+ function Y(t) {
62
62
  const {
63
63
  seed: e,
64
64
  pickerType: n,
65
65
  minDate: r,
66
66
  maxDate: a,
67
- numberOfMonths: i = 1,
68
- hasSelection: l = !1,
69
- autoNavigateToAvailable: c = !1,
70
- yearPageSize: s = 12
67
+ hasSelection: i = !1,
68
+ autoNavigateToAvailable: l = !1,
69
+ yearPageSize: c = 12
71
70
  } = t;
72
- if (!c || l) return e;
73
- const o = g(r, a, e);
74
- return n === "date" || n === "week" ? D(e, i, o) ? e : f(o) : n === "month" || n === "quarter" ? e.getFullYear() === o.getFullYear() ? e : new Date(o.getFullYear(), 0, 1) : m(e.getFullYear(), o.getFullYear(), s) ? e : new Date(o.getFullYear(), 0, 1);
71
+ if (!l || i) return e;
72
+ const o = s(r, a, e);
73
+ return n === "date" || n === "week" ? g(e, 1, o) ? e : f(o) : n === "month" || n === "quarter" ? e.getFullYear() === o.getFullYear() ? e : new Date(o.getFullYear(), 0, 1) : D(e.getFullYear(), o.getFullYear(), c) ? e : new Date(o.getFullYear(), 0, 1);
75
74
  }
76
75
  export {
77
- F as DEFAULT_YEAR_PAGE_SIZE,
76
+ m as DEFAULT_YEAR_PAGE_SIZE,
78
77
  A as boundsFromDisabled,
79
- g as firstAvailableDate,
80
- Y as hasCalendarValue,
81
- h as isSameCalendarMonth,
82
- w as resolveAvailableViewMonth,
78
+ s as firstAvailableDate,
79
+ h as hasCalendarValue,
80
+ F as isSameCalendarMonth,
81
+ Y as resolveAvailableViewMonth,
83
82
  u as startOfDayDate,
84
83
  f as startOfMonthDate
85
84
  };
@@ -29,6 +29,12 @@ export declare function shouldHideCalendarWeekRow(week: {
29
29
  outside?: boolean;
30
30
  }>;
31
31
  }, options: FiscalWeekRowOptions): boolean;
32
+ /**
33
+ * Weeks are the same when they share a start day.
34
+ * Do not use year/month/weekOfMonth — that civil week-of-month key can collide for
35
+ * boundary weeks (e.g. 26 Oct–1 Nov vs 2–8 Nov both become "Nov week 1").
36
+ * Same rule as WeekRangePicker `weekSelectionEqual`.
37
+ */
32
38
  export declare function isSameWeek(w1: WeekSelection, w2: WeekSelection): boolean;
33
39
  export declare function calculateWeekSelection(weekOrDate: WeekPickerInput, options: {
34
40
  calendarKind: CalendarKind;
@@ -1,34 +1,34 @@
1
1
  import { civilFromLocalDate as l } from "../../../lib/fiscal-calendar/civil-date.js";
2
2
  import { resolveWeekSelection as S } from "../../../lib/fiscal-calendar/week-selection.js";
3
- import { isCalendarPaddingWeek as y } from "./calendar-padding-week.utils.js";
4
- function _(e, r) {
3
+ import { isCalendarPaddingWeek as T } from "./calendar-padding-week.utils.js";
4
+ function k(e, n) {
5
5
  const a = e.days[0]?.date;
6
6
  if (a)
7
- return r?.(a)?.fiscalPeriod;
7
+ return n?.(a)?.fiscalPeriod;
8
8
  }
9
- function T(e) {
9
+ function w(e) {
10
10
  return e.calendarKind !== "fiscal" || e.weekPeriod == null || e.panePeriod == null ? !1 : e.weekPeriod !== e.panePeriod;
11
11
  }
12
- function k(e) {
12
+ function y(e) {
13
13
  return e.calendarKind !== "fiscal" || e.weekPeriod == null || e.panePeriod == null ? !1 : e.weekPeriod === e.panePeriod;
14
14
  }
15
- function E(e, r) {
16
- return k(r) ? !1 : y(e) || T(r);
15
+ function E(e, n) {
16
+ return y(n) ? !1 : T(e) || w(n);
17
17
  }
18
- function d(e, r) {
19
- return e.year === r.year && e.month === r.month && e.weekOfMonth === r.weekOfMonth;
18
+ function d(e, n) {
19
+ return e.startDate.getTime() === n.startDate.getTime();
20
20
  }
21
- function F(e, r) {
21
+ function F(e, n) {
22
22
  const a = e instanceof Date ? e : e.days.find((t) => !t.outside)?.date ?? e.days[0]?.date ?? /* @__PURE__ */ new Date();
23
- return S(a, r);
23
+ return S(a, n);
24
24
  }
25
- function H(e, r, a) {
25
+ function H(e, n, a) {
26
26
  if (a === "single") return e;
27
27
  if (a === "multiple") {
28
- const i = r || [];
28
+ const i = n || [];
29
29
  return i.some((f) => d(f, e)) ? i.filter((f) => !d(f, e)) : [...i, e];
30
30
  }
31
- const t = r;
31
+ const t = n;
32
32
  if (!t?.from || t.to) return { from: e };
33
33
  if (d(e, t.from)) return t;
34
34
  const s = { from: t.from, to: e };
@@ -36,12 +36,12 @@ function H(e, r, a) {
36
36
  }
37
37
  function R(e) {
38
38
  if (!e) return;
39
- const r = [], a = (t) => {
39
+ const n = [], a = (t) => {
40
40
  const s = new Date(t.startDate);
41
41
  s.setHours(0, 0, 0, 0);
42
42
  const i = new Date(t.endDate);
43
43
  for (i.setHours(0, 0, 0, 0); s <= i; )
44
- r.push(new Date(s)), s.setDate(s.getDate() + 1);
44
+ n.push(new Date(s)), s.setDate(s.getDate() + 1);
45
45
  };
46
46
  if (Array.isArray(e))
47
47
  e.forEach(a);
@@ -54,39 +54,39 @@ function R(e) {
54
54
  t.setHours(0, 0, 0, 0);
55
55
  const s = new Date(e.to.endDate);
56
56
  for (s.setHours(0, 0, 0, 0); t <= s; )
57
- r.push(new Date(t)), t.setDate(t.getDate() + 1);
57
+ n.push(new Date(t)), t.setDate(t.getDate() + 1);
58
58
  }
59
59
  } else
60
60
  a(e);
61
- return r;
61
+ return n;
62
62
  }
63
- function x(e, r, a) {
63
+ function x(e, n, a) {
64
64
  if (!e || e.length === 0)
65
65
  return { range_start: [], range_middle: [], range_end: [] };
66
- const t = [...e].sort((n, o) => n.getTime() - o.getTime()), s = [], i = [], u = [], f = /* @__PURE__ */ new Set(), m = /* @__PURE__ */ new Set();
67
- r === "multiple" && Array.isArray(a) && a.forEach((n) => {
68
- f.add(l(n.startDate)), m.add(l(n.endDate));
66
+ const t = [...e].sort((r, o) => r.getTime() - o.getTime()), s = [], i = [], u = [], f = /* @__PURE__ */ new Set(), m = /* @__PURE__ */ new Set();
67
+ n === "multiple" && Array.isArray(a) && a.forEach((r) => {
68
+ f.add(l(r.startDate)), m.add(l(r.endDate));
69
69
  });
70
- const D = (n, o) => {
70
+ const h = (r, o) => {
71
71
  if (o === 0) return !1;
72
72
  const c = t[o - 1];
73
- return n.getTime() - c.getTime() <= 1440 * 60 * 1e3;
74
- }, p = (n, o) => o === t.length - 1 ? !1 : t[o + 1].getTime() - n.getTime() <= 1440 * 60 * 1e3;
75
- return t.forEach((n, o) => {
76
- const c = l(n), W = f.has(c), P = m.has(c), h = D(n, o), g = p(n, o);
77
- if (r === "multiple") {
78
- W ? s.push(n) : P ? u.push(n) : i.push(n);
73
+ return r.getTime() - c.getTime() <= 1440 * 60 * 1e3;
74
+ }, p = (r, o) => o === t.length - 1 ? !1 : t[o + 1].getTime() - r.getTime() <= 1440 * 60 * 1e3;
75
+ return t.forEach((r, o) => {
76
+ const c = l(r), W = f.has(c), P = m.has(c), g = h(r, o), D = p(r, o);
77
+ if (n === "multiple") {
78
+ W ? s.push(r) : P ? u.push(r) : i.push(r);
79
79
  return;
80
80
  }
81
- !h && !g ? (s.push(n), u.push(n)) : h ? g ? i.push(n) : u.push(n) : s.push(n);
81
+ !g && !D ? (s.push(r), u.push(r)) : g ? D ? i.push(r) : u.push(r) : s.push(r);
82
82
  }), { range_start: s, range_middle: i, range_end: u };
83
83
  }
84
84
  export {
85
85
  F as calculateWeekSelection,
86
86
  x as computeWeekRangeModifiers,
87
- _ as fiscalPeriodForWeek,
88
- T as isForeignFiscalWeekRow,
89
- k as isOwnedFiscalWeekRow,
87
+ k as fiscalPeriodForWeek,
88
+ w as isForeignFiscalWeekRow,
89
+ y as isOwnedFiscalWeekRow,
90
90
  d as isSameWeek,
91
91
  H as nextWeekSelection,
92
92
  E as shouldHideCalendarWeekRow,