impact-nova 2.5.19 → 2.5.21
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/expandable-list-item/expandable-list-item-attributes.js +2 -3
- package/dist/components/data/expandable-list-item/expandable-list-item-metrics.js +2 -3
- package/dist/components/data-display/calendar/calendar-available-view.d.ts +6 -2
- package/dist/components/data-display/calendar/calendar-available-view.js +18 -19
- package/dist/components/data-display/calendar/calendar-week-utils.d.ts +6 -0
- package/dist/components/data-display/calendar/calendar-week-utils.js +33 -33
- package/dist/components/data-display/calendar/calendar.js +194 -190
- package/dist/components/feedback/tooltip/tab-tooltip-render.js +2 -3
- 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/fiscal-pass-through.d.ts +6 -6
- package/dist/components/forms/date-picker/fiscal-pass-through.js +7 -3
- package/dist/components/forms/date-picker/multi-week-picker.js +1 -1
- package/dist/components/forms/date-picker/week-picker.js +123 -123
- package/dist/components/forms/date-picker/week-range-picker.js +188 -188
- package/dist/components/forms/select/components/SelectTriggerValue.js +2 -3
- package/dist/components/forms/select/components/Submenu.js +2 -3
- package/dist/form-react/Fields/MultiWeekPickerField.js +16 -15
- package/dist/form-react/Fields/TextFieldWithBackendValidation.js +27 -26
- package/dist/form-react/Fields/WeekRangePicker.js +18 -16
- package/dist/form-react/types/fields.types.d.ts +9 -0
- package/dist/form-react/utils/date.utils.d.ts +1 -0
- package/dist/form-react/utils/date.utils.js +38 -34
- package/dist/lib/fiscal-calendar/index.d.ts +2 -2
- package/dist/lib/fiscal-calendar/index.js +26 -24
- package/dist/lib/fiscal-calendar/week-selection.d.ts +5 -0
- package/dist/lib/fiscal-calendar/week-selection.js +56 -49
- package/dist/llms/rules/installation.js +1 -1
- package/dist/llms/rules/requirements.js +1 -1
- package/package.json +1 -1
|
@@ -3,8 +3,7 @@ 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
|
-
|
|
7
|
-
function I({
|
|
6
|
+
function w({
|
|
8
7
|
tags: o,
|
|
9
8
|
title: l = "Attributes",
|
|
10
9
|
maxVisibleTags: n = 4,
|
|
@@ -71,5 +70,5 @@ function I({
|
|
|
71
70
|
);
|
|
72
71
|
}
|
|
73
72
|
export {
|
|
74
|
-
|
|
73
|
+
w as ExpandableListItemAttributes
|
|
75
74
|
};
|
|
@@ -1,9 +1,8 @@
|
|
|
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";
|
|
4
3
|
import { OverflowTooltip as r } from "../../feedback/tooltip/overflow-tooltip.js";
|
|
5
4
|
const m = 128;
|
|
6
|
-
function
|
|
5
|
+
function x({
|
|
7
6
|
columns: i,
|
|
8
7
|
sectionId: l = "metrics"
|
|
9
8
|
}) {
|
|
@@ -51,5 +50,5 @@ function f({
|
|
|
51
50
|
);
|
|
52
51
|
}
|
|
53
52
|
export {
|
|
54
|
-
|
|
53
|
+
x as ExpandableListItemMetrics
|
|
55
54
|
};
|
|
@@ -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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
61
|
+
function Y(t) {
|
|
62
62
|
const {
|
|
63
63
|
seed: e,
|
|
64
64
|
pickerType: n,
|
|
65
65
|
minDate: r,
|
|
66
66
|
maxDate: a,
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
yearPageSize: s = 12
|
|
67
|
+
hasSelection: i = !1,
|
|
68
|
+
autoNavigateToAvailable: l = !1,
|
|
69
|
+
yearPageSize: c = 12
|
|
71
70
|
} = t;
|
|
72
|
-
if (!
|
|
73
|
-
const o =
|
|
74
|
-
return n === "date" || n === "week" ?
|
|
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
|
-
|
|
76
|
+
m as DEFAULT_YEAR_PAGE_SIZE,
|
|
78
77
|
A as boundsFromDisabled,
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
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
|
|
4
|
-
function
|
|
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
|
|
7
|
+
return n?.(a)?.fiscalPeriod;
|
|
8
8
|
}
|
|
9
|
-
function
|
|
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
|
|
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,
|
|
16
|
-
return
|
|
15
|
+
function E(e, n) {
|
|
16
|
+
return y(n) ? !1 : T(e) || w(n);
|
|
17
17
|
}
|
|
18
|
-
function d(e,
|
|
19
|
-
return e.
|
|
18
|
+
function d(e, n) {
|
|
19
|
+
return e.startDate.getTime() === n.startDate.getTime();
|
|
20
20
|
}
|
|
21
|
-
function F(e,
|
|
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,
|
|
23
|
+
return S(a, n);
|
|
24
24
|
}
|
|
25
|
-
function H(e,
|
|
25
|
+
function H(e, n, a) {
|
|
26
26
|
if (a === "single") return e;
|
|
27
27
|
if (a === "multiple") {
|
|
28
|
-
const i =
|
|
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 =
|
|
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
|
|
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
|
-
|
|
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
|
-
|
|
57
|
+
n.push(new Date(t)), t.setDate(t.getDate() + 1);
|
|
58
58
|
}
|
|
59
59
|
} else
|
|
60
60
|
a(e);
|
|
61
|
-
return
|
|
61
|
+
return n;
|
|
62
62
|
}
|
|
63
|
-
function x(e,
|
|
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((
|
|
67
|
-
|
|
68
|
-
f.add(l(
|
|
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
|
|
70
|
+
const h = (r, o) => {
|
|
71
71
|
if (o === 0) return !1;
|
|
72
72
|
const c = t[o - 1];
|
|
73
|
-
return
|
|
74
|
-
}, p = (
|
|
75
|
-
return t.forEach((
|
|
76
|
-
const c = l(
|
|
77
|
-
if (
|
|
78
|
-
W ? s.push(
|
|
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
|
-
!
|
|
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
|
-
|
|
88
|
-
|
|
89
|
-
|
|
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,
|