impact-nova 2.5.10 → 2.5.11
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 +3 -2
- package/dist/components/data/expandable-list-item/expandable-list-item-metrics.js +3 -2
- 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-day-picker-components.d.ts +4 -2
- package/dist/components/data-display/calendar/calendar-day-picker-components.js +163 -152
- package/dist/components/data-display/calendar/calendar-day-picker-view.js +77 -76
- 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-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-selection-appearance.d.ts +1 -0
- package/dist/components/data-display/calendar/calendar-selection-appearance.js +31 -30
- 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 +55 -41
- package/dist/components/data-display/calendar/calendar-year-panes.d.ts +2 -0
- package/dist/components/data-display/calendar/calendar-year-panes.js +3 -1
- 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 +403 -325
- 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/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 +46 -44
- package/dist/components/forms/date-picker/multi-week-picker.js +53 -51
- package/dist/components/forms/date-picker/multi-year-picker.js +48 -46
- package/dist/components/forms/date-picker/quarter-picker.js +46 -44
- package/dist/components/forms/date-picker/quarter-range-picker.js +45 -43
- package/dist/components/forms/date-picker/week-picker.js +68 -66
- package/dist/components/forms/date-picker/week-range-picker.js +82 -80
- package/dist/components/forms/date-picker/year-picker.js +47 -45
- package/dist/components/forms/date-picker/year-range-picker.js +47 -45
- 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 +18 -17
- package/dist/form-react/Fields/WeekRangePicker.js +22 -21
- package/dist/form-react/types/fields.types.d.ts +12 -0
- package/dist/impact-nova.css +1 -1
- package/dist/llms/rules/installation.js +1 -1
- package/dist/llms/rules/requirements.js +1 -1
- package/package.json +1 -1
|
@@ -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
|
-
|
|
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
|
-
|
|
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
|
|
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
|
-
|
|
54
|
+
f as ExpandableListItemMetrics
|
|
54
55
|
};
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
import { DateRange } from 'react-day-picker';
|
|
2
|
+
import { Granularity } from '../../../lib/fiscal-calendar';
|
|
2
3
|
import { MonthRange, MonthSelection, QuarterRange, QuarterSelection, WeekRange, WeekSelection, YearRange, YearSelection } from './calendar.types';
|
|
3
4
|
export declare function isCalendarApplyDisabled(params: {
|
|
4
5
|
showFooter: boolean;
|
|
5
6
|
pickerType: "date" | "week" | "month" | "quarter" | "year";
|
|
7
|
+
granularity?: Granularity;
|
|
6
8
|
disabled?: unknown;
|
|
7
9
|
pendingSelection?: Date | Date[] | DateRange;
|
|
8
10
|
pendingWeekSelection?: WeekSelection | WeekSelection[] | WeekRange;
|
|
@@ -1,96 +1,93 @@
|
|
|
1
|
-
import { isMonthDisabled as S, isDateIntervalDisabled as
|
|
2
|
-
function
|
|
3
|
-
return new Date(
|
|
1
|
+
import { isMonthDisabled as S, isWeekSelectableInBounds as O, isDateIntervalDisabled as A } from "./calendar-month-utils.js";
|
|
2
|
+
function d(r) {
|
|
3
|
+
return new Date(r.getFullYear(), r.getMonth(), r.getDate());
|
|
4
4
|
}
|
|
5
|
-
function
|
|
6
|
-
const
|
|
5
|
+
function l(r, i, n) {
|
|
6
|
+
const a = d(r);
|
|
7
7
|
if (i) {
|
|
8
|
-
const
|
|
9
|
-
if (
|
|
8
|
+
const f = d(i);
|
|
9
|
+
if (a < f) return !0;
|
|
10
10
|
}
|
|
11
|
-
if (
|
|
12
|
-
const
|
|
13
|
-
if (
|
|
11
|
+
if (n) {
|
|
12
|
+
const f = d(n);
|
|
13
|
+
if (a > f) return !0;
|
|
14
14
|
}
|
|
15
15
|
return !1;
|
|
16
16
|
}
|
|
17
|
-
function
|
|
18
|
-
|
|
19
|
-
return !!(t && g < u(t) || f && o > u(f));
|
|
17
|
+
function D(r, i, n) {
|
|
18
|
+
return !r || !i ? !1 : A(r, i, n);
|
|
20
19
|
}
|
|
21
|
-
function
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
if (typeof e == "object" && e !== null && "from" in e) {
|
|
27
|
-
const t = e;
|
|
28
|
-
return !!(t.from && i(t.from) || t.to && i(t.to));
|
|
20
|
+
function c(r, i) {
|
|
21
|
+
if (Array.isArray(r)) return r.some(i);
|
|
22
|
+
if (typeof r == "object" && r !== null && "from" in r) {
|
|
23
|
+
const n = r;
|
|
24
|
+
return !!(n.from && i(n.from) || n.to && i(n.to));
|
|
29
25
|
}
|
|
30
|
-
return i(
|
|
26
|
+
return i(r);
|
|
31
27
|
}
|
|
32
|
-
function
|
|
28
|
+
function I(r) {
|
|
33
29
|
const {
|
|
34
30
|
showFooter: i,
|
|
35
|
-
pickerType:
|
|
31
|
+
pickerType: n,
|
|
32
|
+
granularity: a,
|
|
36
33
|
disabled: f,
|
|
37
|
-
pendingSelection:
|
|
38
|
-
pendingWeekSelection:
|
|
34
|
+
pendingSelection: g,
|
|
35
|
+
pendingWeekSelection: m,
|
|
39
36
|
pendingMonthSelection: y,
|
|
40
|
-
pendingQuarterSelection:
|
|
41
|
-
pendingYearSelection:
|
|
42
|
-
} =
|
|
37
|
+
pendingQuarterSelection: p,
|
|
38
|
+
pendingYearSelection: b
|
|
39
|
+
} = r;
|
|
43
40
|
if (!i) return !1;
|
|
44
|
-
const
|
|
45
|
-
if (!
|
|
46
|
-
const
|
|
47
|
-
if (
|
|
48
|
-
const
|
|
49
|
-
return
|
|
50
|
-
|
|
51
|
-
(
|
|
41
|
+
const o = f;
|
|
42
|
+
if (!o || typeof o != "object" || !("before" in o) && !("after" in o)) return !1;
|
|
43
|
+
const u = o.before, s = o.after;
|
|
44
|
+
if (n === "month") {
|
|
45
|
+
const e = y;
|
|
46
|
+
return e ? c(
|
|
47
|
+
e,
|
|
48
|
+
(t) => S(t.year, t.month, f)
|
|
52
49
|
) : !1;
|
|
53
50
|
}
|
|
54
|
-
if (
|
|
55
|
-
const
|
|
56
|
-
return
|
|
57
|
-
|
|
58
|
-
(
|
|
51
|
+
if (n === "quarter") {
|
|
52
|
+
const e = p;
|
|
53
|
+
return e ? c(
|
|
54
|
+
e,
|
|
55
|
+
(t) => D(t.start, t.end, f)
|
|
59
56
|
) : !1;
|
|
60
57
|
}
|
|
61
|
-
if (
|
|
62
|
-
const
|
|
63
|
-
return
|
|
64
|
-
|
|
65
|
-
(
|
|
58
|
+
if (n === "year") {
|
|
59
|
+
const e = b;
|
|
60
|
+
return e ? c(
|
|
61
|
+
e,
|
|
62
|
+
(t) => D(t.start, t.end, f)
|
|
66
63
|
) : !1;
|
|
67
64
|
}
|
|
68
|
-
if (
|
|
69
|
-
const
|
|
70
|
-
return
|
|
71
|
-
|
|
72
|
-
(
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
65
|
+
if (n === "week") {
|
|
66
|
+
const e = m;
|
|
67
|
+
return e ? c(
|
|
68
|
+
e,
|
|
69
|
+
(t) => !O(
|
|
70
|
+
t.startDate,
|
|
71
|
+
t.endDate,
|
|
72
|
+
f,
|
|
73
|
+
a
|
|
77
74
|
)
|
|
78
75
|
) : !1;
|
|
79
76
|
}
|
|
80
|
-
if (
|
|
81
|
-
const
|
|
82
|
-
if (!
|
|
83
|
-
if (Array.isArray(
|
|
84
|
-
return
|
|
85
|
-
if (
|
|
86
|
-
return
|
|
87
|
-
if ("from" in
|
|
88
|
-
const
|
|
89
|
-
if (
|
|
77
|
+
if (n === "date") {
|
|
78
|
+
const e = g;
|
|
79
|
+
if (!e) return !1;
|
|
80
|
+
if (Array.isArray(e))
|
|
81
|
+
return e.some((t) => l(t, u, s));
|
|
82
|
+
if (e instanceof Date)
|
|
83
|
+
return l(e, u, s);
|
|
84
|
+
if ("from" in e) {
|
|
85
|
+
const t = e;
|
|
86
|
+
if (t.from && l(t.from, u, s) || t.to && l(t.to, u, s)) return !0;
|
|
90
87
|
}
|
|
91
88
|
}
|
|
92
89
|
return !1;
|
|
93
90
|
}
|
|
94
91
|
export {
|
|
95
|
-
|
|
92
|
+
I as isCalendarApplyDisabled
|
|
96
93
|
};
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
export type AvailableViewPickerType = "date" | "week" | "month" | "quarter" | "year";
|
|
2
|
+
export declare const DEFAULT_YEAR_PAGE_SIZE = 12;
|
|
3
|
+
export interface ResolveAvailableViewMonthOptions {
|
|
4
|
+
seed: Date;
|
|
5
|
+
pickerType: AvailableViewPickerType;
|
|
6
|
+
minDate?: Date;
|
|
7
|
+
maxDate?: Date;
|
|
8
|
+
numberOfMonths?: number;
|
|
9
|
+
hasSelection?: boolean;
|
|
10
|
+
autoNavigateToAvailable?: boolean;
|
|
11
|
+
yearPageSize?: number;
|
|
12
|
+
}
|
|
13
|
+
export declare function startOfDayDate(date: Date): Date;
|
|
14
|
+
export declare function startOfMonthDate(date: Date): Date;
|
|
15
|
+
export declare function isSameCalendarMonth(left: Date, right: Date): boolean;
|
|
16
|
+
export declare function boundsFromDisabled(disabled?: unknown): {
|
|
17
|
+
minDate?: Date;
|
|
18
|
+
maxDate?: Date;
|
|
19
|
+
};
|
|
20
|
+
export declare function hasCalendarValue(value: unknown): boolean;
|
|
21
|
+
/** Clamp `from` into `[minDate, maxDate]`. O(1). */
|
|
22
|
+
export declare function firstAvailableDate(minDate?: Date, maxDate?: Date, from?: Date): Date;
|
|
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.
|
|
26
|
+
*/
|
|
27
|
+
export declare function resolveAvailableViewMonth(options: ResolveAvailableViewMonthOptions): Date;
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
const F = 12;
|
|
2
|
+
function u(t) {
|
|
3
|
+
return new Date(t.getFullYear(), t.getMonth(), t.getDate());
|
|
4
|
+
}
|
|
5
|
+
function f(t) {
|
|
6
|
+
return new Date(t.getFullYear(), t.getMonth(), 1);
|
|
7
|
+
}
|
|
8
|
+
function h(t, e) {
|
|
9
|
+
return t.getFullYear() === e.getFullYear() && t.getMonth() === e.getMonth();
|
|
10
|
+
}
|
|
11
|
+
function A(t) {
|
|
12
|
+
if (!t || typeof t != "object" || Array.isArray(t))
|
|
13
|
+
return {};
|
|
14
|
+
const e = t;
|
|
15
|
+
return {
|
|
16
|
+
...e.before instanceof Date ? { minDate: e.before } : {},
|
|
17
|
+
...e.after instanceof Date ? { maxDate: e.after } : {}
|
|
18
|
+
};
|
|
19
|
+
}
|
|
20
|
+
function Y(t) {
|
|
21
|
+
if (t == null) return !1;
|
|
22
|
+
if (Array.isArray(t)) return t.length > 0;
|
|
23
|
+
if (t instanceof Date) return !0;
|
|
24
|
+
if (typeof t == "object") {
|
|
25
|
+
if ("from" in t || "to" in t) {
|
|
26
|
+
const e = t;
|
|
27
|
+
return e.from != null || e.to != null;
|
|
28
|
+
}
|
|
29
|
+
return !0;
|
|
30
|
+
}
|
|
31
|
+
return !1;
|
|
32
|
+
}
|
|
33
|
+
function g(t, e, n = /* @__PURE__ */ new Date()) {
|
|
34
|
+
const r = u(n);
|
|
35
|
+
if (t) {
|
|
36
|
+
const a = u(t);
|
|
37
|
+
if (r < a) return a;
|
|
38
|
+
}
|
|
39
|
+
if (e) {
|
|
40
|
+
const a = u(e);
|
|
41
|
+
if (r > a) return a;
|
|
42
|
+
}
|
|
43
|
+
return r;
|
|
44
|
+
}
|
|
45
|
+
function D(t, e, n) {
|
|
46
|
+
const r = f(t), a = new Date(
|
|
47
|
+
t.getFullYear(),
|
|
48
|
+
t.getMonth() + e,
|
|
49
|
+
0,
|
|
50
|
+
23,
|
|
51
|
+
59,
|
|
52
|
+
59,
|
|
53
|
+
999
|
|
54
|
+
), i = u(n).getTime();
|
|
55
|
+
return i >= r.getTime() && i <= a.getTime();
|
|
56
|
+
}
|
|
57
|
+
function m(t, e, n) {
|
|
58
|
+
const r = Math.floor(t / n) * n;
|
|
59
|
+
return e >= r && e <= r + n - 1;
|
|
60
|
+
}
|
|
61
|
+
function w(t) {
|
|
62
|
+
const {
|
|
63
|
+
seed: e,
|
|
64
|
+
pickerType: n,
|
|
65
|
+
minDate: r,
|
|
66
|
+
maxDate: a,
|
|
67
|
+
numberOfMonths: i = 1,
|
|
68
|
+
hasSelection: l = !1,
|
|
69
|
+
autoNavigateToAvailable: c = !1,
|
|
70
|
+
yearPageSize: s = 12
|
|
71
|
+
} = 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);
|
|
75
|
+
}
|
|
76
|
+
export {
|
|
77
|
+
F as DEFAULT_YEAR_PAGE_SIZE,
|
|
78
|
+
A as boundsFromDisabled,
|
|
79
|
+
g as firstAvailableDate,
|
|
80
|
+
Y as hasCalendarValue,
|
|
81
|
+
h as isSameCalendarMonth,
|
|
82
|
+
w as resolveAvailableViewMonth,
|
|
83
|
+
u as startOfDayDate,
|
|
84
|
+
f as startOfMonthDate
|
|
85
|
+
};
|
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
import { DayPicker } from 'react-day-picker';
|
|
2
2
|
import { Button } from '../../primitives/button/button';
|
|
3
3
|
import { Option } from '../../forms/select';
|
|
4
|
-
import { FiscalCalendarConfig, FiscalPeriod, CalendarKind } from '../../../lib/fiscal-calendar';
|
|
4
|
+
import { FiscalCalendarConfig, FiscalPeriod, CalendarKind, Granularity } from '../../../lib/fiscal-calendar';
|
|
5
5
|
import { WeekPickerInput } from './calendar-week-utils';
|
|
6
6
|
import * as React from "react";
|
|
7
7
|
export interface BuildCalendarDayPickerComponentsParams {
|
|
8
8
|
buttonVariant: React.ComponentProps<typeof Button>["variant"];
|
|
9
9
|
pickerType: "date" | "week" | "month";
|
|
10
10
|
calendarKind: CalendarKind;
|
|
11
|
+
granularity?: Granularity;
|
|
11
12
|
currentMonth: Date;
|
|
12
13
|
monthsFull: string[];
|
|
13
14
|
monthsShort: string[];
|
|
@@ -32,6 +33,7 @@ export interface BuildCalendarDayPickerComponentsParams {
|
|
|
32
33
|
periodRowHover?: boolean;
|
|
33
34
|
weekMode?: "single" | "multiple" | "range" | "multi-range";
|
|
34
35
|
showPeriodBoundaries?: boolean;
|
|
36
|
+
disabled?: unknown;
|
|
35
37
|
components?: React.ComponentProps<typeof DayPicker>["components"];
|
|
36
38
|
}
|
|
37
|
-
export declare function buildCalendarDayPickerComponents({ buttonVariant, pickerType, calendarKind, currentMonth, monthsFull, monthsShort, resolvedStartMonth, resolvedEndMonth, availableYears, fiscalPeriods, fiscalConfig, weekStartsOn, previousMonthLabel, nextMonthLabel, monthPlaceholder, yearPlaceholder, weekNumberLabel, weekNumberHeader, weekLabel, fiscalWeekNumberLabel, fiscalWeekAriaLabel, getCellMeta, onMonthChange, onWeekSelect, periodRowHover, weekMode, showPeriodBoundaries, components, }: BuildCalendarDayPickerComponentsParams): React.ComponentProps<typeof DayPicker>["components"];
|
|
39
|
+
export declare function buildCalendarDayPickerComponents({ buttonVariant, pickerType, calendarKind, granularity, currentMonth, monthsFull, monthsShort, resolvedStartMonth, resolvedEndMonth, availableYears, fiscalPeriods, fiscalConfig, weekStartsOn, previousMonthLabel, nextMonthLabel, monthPlaceholder, yearPlaceholder, weekNumberLabel, weekNumberHeader, weekLabel, fiscalWeekNumberLabel, fiscalWeekAriaLabel, getCellMeta, onMonthChange, onWeekSelect, periodRowHover, weekMode, showPeriodBoundaries, disabled, components, }: BuildCalendarDayPickerComponentsParams): React.ComponentProps<typeof DayPicker>["components"];
|