impact-nova 2.5.7 → 2.5.8
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/ag-grid-react/ag-grid.types.d.ts +2 -2
- package/dist/components/data/ag-grid-react/headers/components/date-filter-picker.d.ts +4 -2
- package/dist/components/data/ag-grid-react/headers/header-search-input.js +65 -65
- package/dist/components/data/ag-grid-react/headers/utils/date-utils.js +55 -48
- package/dist/components/data-display/calendar/calendar-apply-validation.d.ts +4 -2
- package/dist/components/data-display/calendar/calendar-apply-validation.js +80 -61
- package/dist/components/data-display/calendar/calendar-config.d.ts +13 -5
- package/dist/components/data-display/calendar/calendar-config.js +31 -20
- package/dist/components/data-display/calendar/calendar-day-button.js +43 -35
- package/dist/components/data-display/calendar/calendar-day-hover.d.ts +8 -0
- package/dist/components/data-display/calendar/calendar-day-hover.js +20 -0
- package/dist/components/data-display/calendar/calendar-day-picker-classnames.d.ts +8 -1
- package/dist/components/data-display/calendar/calendar-day-picker-classnames.js +40 -20
- package/dist/components/data-display/calendar/calendar-day-picker-components.d.ts +12 -1
- package/dist/components/data-display/calendar/calendar-day-picker-components.js +201 -108
- package/dist/components/data-display/calendar/calendar-day-picker-view.d.ts +11 -3
- package/dist/components/data-display/calendar/calendar-day-picker-view.js +136 -92
- package/dist/components/data-display/calendar/calendar-fiscal-labels.d.ts +38 -0
- package/dist/components/data-display/calendar/calendar-fiscal-labels.js +90 -0
- package/dist/components/data-display/calendar/calendar-footer-summary.d.ts +13 -4
- package/dist/components/data-display/calendar/calendar-footer-summary.js +101 -50
- package/dist/components/data-display/calendar/calendar-footer.d.ts +16 -7
- package/dist/components/data-display/calendar/calendar-footer.js +88 -66
- package/dist/components/data-display/calendar/calendar-gregorian-presets.d.ts +2 -0
- package/dist/components/data-display/calendar/calendar-gregorian-presets.js +26 -0
- package/dist/components/data-display/calendar/calendar-interval-caption.d.ts +1 -0
- package/dist/components/data-display/calendar/calendar-interval-caption.js +10 -0
- package/dist/components/data-display/calendar/calendar-interval-utils.d.ts +23 -0
- package/dist/components/data-display/calendar/calendar-interval-utils.js +154 -0
- package/dist/components/data-display/calendar/calendar-month-panes.d.ts +5 -1
- package/dist/components/data-display/calendar/calendar-month-panes.js +9 -7
- package/dist/components/data-display/calendar/calendar-month-picker-panel.d.ts +5 -1
- package/dist/components/data-display/calendar/calendar-month-picker-panel.js +76 -77
- package/dist/components/data-display/calendar/calendar-month-utils.d.ts +2 -0
- package/dist/components/data-display/calendar/calendar-month-utils.js +69 -60
- package/dist/components/data-display/calendar/calendar-padding-week.utils.d.ts +15 -0
- package/dist/components/data-display/calendar/calendar-padding-week.utils.js +22 -3
- package/dist/components/data-display/calendar/calendar-panel-context.d.ts +1 -1
- package/dist/components/data-display/calendar/calendar-period-cell.d.ts +18 -0
- package/dist/components/data-display/calendar/calendar-period-cell.js +89 -0
- package/dist/components/data-display/calendar/calendar-period-keyboard.d.ts +2 -0
- package/dist/components/data-display/calendar/calendar-period-keyboard.js +18 -0
- package/dist/components/data-display/calendar/calendar-preset-strip.d.ts +6 -0
- package/dist/components/data-display/calendar/calendar-preset-strip.js +26 -0
- package/dist/components/data-display/calendar/calendar-quarter-panes.d.ts +24 -0
- package/dist/components/data-display/calendar/calendar-quarter-panes.js +115 -0
- package/dist/components/data-display/calendar/calendar-quarter-utils.d.ts +19 -0
- package/dist/components/data-display/calendar/calendar-quarter-utils.js +95 -0
- package/dist/components/data-display/calendar/calendar-selection-appearance.d.ts +38 -0
- package/dist/components/data-display/calendar/calendar-selection-appearance.js +72 -0
- package/dist/components/data-display/calendar/calendar-selection.d.ts +20 -0
- package/dist/components/data-display/calendar/calendar-selection.js +31 -0
- package/dist/components/data-display/calendar/calendar-week-number-cell.d.ts +6 -1
- package/dist/components/data-display/calendar/calendar-week-number-cell.js +53 -38
- package/dist/components/data-display/calendar/calendar-week-number-header.d.ts +4 -0
- package/dist/components/data-display/calendar/calendar-week-number-header.js +15 -0
- package/dist/components/data-display/calendar/calendar-week-utils.d.ts +11 -3
- package/dist/components/data-display/calendar/calendar-week-utils.js +49 -42
- package/dist/components/data-display/calendar/calendar-year-panes.d.ts +18 -0
- package/dist/components/data-display/calendar/calendar-year-panes.js +98 -0
- package/dist/components/data-display/calendar/calendar-year-utils.d.ts +17 -0
- package/dist/components/data-display/calendar/calendar-year-utils.js +75 -0
- package/dist/components/data-display/calendar/calendar.d.ts +1 -1
- package/dist/components/data-display/calendar/calendar.js +303 -181
- package/dist/components/data-display/calendar/calendar.types.d.ts +53 -16
- package/dist/components/data-display/calendar/fiscal-period-caption-select.d.ts +7 -0
- package/dist/components/data-display/calendar/fiscal-period-caption-select.js +63 -0
- package/dist/components/data-display/calendar/index.d.ts +1 -1
- package/dist/components/data-display/calendar/use-calendar-day-picker-config.d.ts +12 -2
- package/dist/components/data-display/calendar/use-calendar-day-picker-config.js +92 -62
- package/dist/components/data-display/calendar/use-calendar-state.d.ts +31 -11
- package/dist/components/data-display/calendar/use-calendar-state.js +370 -163
- package/dist/components/data-display/calendar/use-fiscal-calendar.d.ts +5 -0
- package/dist/components/data-display/calendar/use-fiscal-calendar.js +24 -0
- package/dist/components/feedback/tooltip/overflow-tooltip.js +57 -57
- package/dist/components/forms/date-picker/date-input-behavior.d.ts +7 -0
- package/dist/components/forms/date-picker/date-input-behavior.js +28 -24
- package/dist/components/forms/date-picker/date-picker-shell.d.ts +13 -0
- package/dist/components/forms/date-picker/date-picker-shell.js +31 -0
- package/dist/components/forms/date-picker/date-picker.js +187 -167
- package/dist/components/forms/date-picker/date-picker.types.d.ts +90 -43
- package/dist/components/forms/date-picker/date-range-picker.js +273 -224
- package/dist/components/forms/date-picker/fiscal-pass-through.d.ts +13 -0
- package/dist/components/forms/date-picker/fiscal-pass-through.js +17 -0
- package/dist/components/forms/date-picker/fiscal-period-format.d.ts +9 -0
- package/dist/components/forms/date-picker/fiscal-period-format.js +50 -0
- package/dist/components/forms/date-picker/index.d.ts +12 -0
- package/dist/components/forms/date-picker/index.js +19 -7
- package/dist/components/forms/date-picker/month-picker.js +225 -182
- package/dist/components/forms/date-picker/month-range-picker.js +134 -110
- package/dist/components/forms/date-picker/multi-date-picker.js +77 -56
- package/dist/components/forms/date-picker/multi-month-picker.js +78 -57
- package/dist/components/forms/date-picker/multi-quarter-picker.d.ts +3 -0
- package/dist/components/forms/date-picker/multi-quarter-picker.js +177 -0
- package/dist/components/forms/date-picker/multi-week-picker.js +81 -70
- package/dist/components/forms/date-picker/multi-year-picker.d.ts +3 -0
- package/dist/components/forms/date-picker/multi-year-picker.js +179 -0
- package/dist/components/forms/date-picker/quarter-picker.d.ts +3 -0
- package/dist/components/forms/date-picker/quarter-picker.js +176 -0
- package/dist/components/forms/date-picker/quarter-range-picker.d.ts +3 -0
- package/dist/components/forms/date-picker/quarter-range-picker.js +177 -0
- package/dist/components/forms/date-picker/week-picker.js +148 -137
- package/dist/components/forms/date-picker/week-range-picker.js +216 -205
- package/dist/components/forms/date-picker/year-picker.d.ts +3 -0
- package/dist/components/forms/date-picker/year-picker.js +176 -0
- package/dist/components/forms/date-picker/year-range-picker.d.ts +3 -0
- package/dist/components/forms/date-picker/year-range-picker.js +179 -0
- package/dist/form-react/Fields/DateInputField.js +63 -58
- package/dist/form-react/Fields/DateRangeField.js +42 -37
- package/dist/form-react/Fields/MonthRangeField.js +50 -45
- package/dist/form-react/Fields/MultiWeekPickerField.js +7 -7
- package/dist/form-react/Fields/WeekRangePicker.js +44 -45
- package/dist/form-react/components/FieldRenderer.js +21 -23
- package/dist/form-react/registry/defaultFieldRegistrations.d.ts +9 -1
- package/dist/form-react/registry/defaultFieldRegistrations.js +27 -36
- package/dist/form-react/registry/resolveFieldComponent.d.ts +3 -2
- package/dist/form-react/registry/resolveFieldComponent.js +9 -133
- package/dist/form-react/types/fields.types.d.ts +19 -4
- package/dist/form-react/utils/date.utils.d.ts +1 -1
- package/dist/form-react/utils/date.utils.js +38 -38
- package/dist/i18n/defaultMessages.d.ts +19 -1
- package/dist/i18n/defaultMessages.js +37 -20
- package/dist/i18n/locales/de.js +18 -1
- package/dist/i18n/locales/es.js +18 -1
- package/dist/i18n/locales/hi.js +18 -1
- package/dist/i18n/locales/kn.js +18 -1
- package/dist/impact-nova-components.css +379 -3
- package/dist/impact-nova.css +1 -1
- package/dist/index.js +528 -516
- package/dist/lib/fiscal-calendar/build-year.d.ts +8 -0
- package/dist/lib/fiscal-calendar/build-year.js +173 -0
- package/dist/lib/fiscal-calendar/civil-date.d.ts +21 -0
- package/dist/lib/fiscal-calendar/civil-date.js +94 -0
- package/dist/lib/fiscal-calendar/index.d.ts +10 -0
- package/dist/lib/fiscal-calendar/index.js +40 -0
- package/dist/lib/fiscal-calendar/lookup.d.ts +4 -0
- package/dist/lib/fiscal-calendar/lookup.js +70 -0
- package/dist/lib/fiscal-calendar/presets.d.ts +8 -0
- package/dist/lib/fiscal-calendar/presets.js +99 -0
- package/dist/lib/fiscal-calendar/selection.d.ts +18 -0
- package/dist/lib/fiscal-calendar/selection.js +32 -0
- package/dist/lib/fiscal-calendar/types.d.ts +145 -0
- package/dist/lib/fiscal-calendar/types.js +10 -0
- package/dist/lib/fiscal-calendar/week-selection.d.ts +22 -0
- package/dist/lib/fiscal-calendar/week-selection.js +107 -0
- package/package.json +5 -1
- package/dist/lib/fiscal-calendar.d.ts +0 -62
- package/dist/lib/fiscal-calendar.js +0 -99
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
import { jsxs as s, jsx as i } from "react/jsx-runtime";
|
|
2
|
+
import { ChevronRight as p } from "impact-nova-icons";
|
|
3
|
+
import { Button as u } from "../../primitives/button/button.js";
|
|
4
|
+
import { Select as W } from "../../forms/select/select.js";
|
|
5
|
+
import { CalendarPeriodCell as Y } from "./calendar-period-cell.js";
|
|
6
|
+
import { getQuarterRangeProps as y, isQuarterRangeSelection as A } from "./calendar-quarter-utils.js";
|
|
7
|
+
function L({
|
|
8
|
+
quarterMode: n,
|
|
9
|
+
pickerYear: g,
|
|
10
|
+
showFooter: h,
|
|
11
|
+
pendingQuarterSelection: v,
|
|
12
|
+
selectedQuarters: x,
|
|
13
|
+
resolvedStartYear: w,
|
|
14
|
+
resolvedEndYear: N,
|
|
15
|
+
yearOptions: d,
|
|
16
|
+
previousYearLabel: b,
|
|
17
|
+
nextYearLabel: f,
|
|
18
|
+
currentMonth: t,
|
|
19
|
+
quarterLabelsForYear: S,
|
|
20
|
+
isQuarterSelected: k,
|
|
21
|
+
isQuarterDisabled: C,
|
|
22
|
+
onMonthChange: o,
|
|
23
|
+
onQuarterClick: z
|
|
24
|
+
}) {
|
|
25
|
+
const c = h ? v : x, R = n === "range" || n === "multiple" || n === "multi-range", m = (l = 0) => {
|
|
26
|
+
const e = g + l;
|
|
27
|
+
return /* @__PURE__ */ s(
|
|
28
|
+
"div",
|
|
29
|
+
{
|
|
30
|
+
"data-slot": "quarter-pane",
|
|
31
|
+
className: "flex w-[280px] min-w-[280px] max-w-[280px] shrink-0 flex-col gap-4 overflow-hidden p-3",
|
|
32
|
+
children: [
|
|
33
|
+
/* @__PURE__ */ s("div", { className: "flex items-center justify-between", children: [
|
|
34
|
+
l === 0 ? /* @__PURE__ */ i(
|
|
35
|
+
u,
|
|
36
|
+
{
|
|
37
|
+
variant: "ghost",
|
|
38
|
+
size: "icon",
|
|
39
|
+
className: "h-7 w-7 shrink-0",
|
|
40
|
+
"aria-label": b,
|
|
41
|
+
disabled: e <= w,
|
|
42
|
+
onClick: () => o(new Date(e - 1, t.getMonth(), 1)),
|
|
43
|
+
children: /* @__PURE__ */ i(p, { size: 16, className: "rotate-180" })
|
|
44
|
+
}
|
|
45
|
+
) : /* @__PURE__ */ i("span", { className: "size-7 shrink-0", "aria-hidden": !0 }),
|
|
46
|
+
/* @__PURE__ */ i(
|
|
47
|
+
W,
|
|
48
|
+
{
|
|
49
|
+
value: d.find((a) => a.value === String(e)) ?? {
|
|
50
|
+
label: String(e),
|
|
51
|
+
value: String(e)
|
|
52
|
+
},
|
|
53
|
+
onChange: (a) => {
|
|
54
|
+
a && "value" in a && o(new Date(Number(a.value) - l, t.getMonth(), 1));
|
|
55
|
+
},
|
|
56
|
+
scrollToSelectedOnOpen: !0,
|
|
57
|
+
options: d,
|
|
58
|
+
parentClassName: "flex flex-1 items-center justify-center",
|
|
59
|
+
className: "w-[200px]",
|
|
60
|
+
menuWidth: "140px"
|
|
61
|
+
}
|
|
62
|
+
),
|
|
63
|
+
(n === "single" || l === 1) && /* @__PURE__ */ i(
|
|
64
|
+
u,
|
|
65
|
+
{
|
|
66
|
+
variant: "ghost",
|
|
67
|
+
size: "icon",
|
|
68
|
+
className: "h-7 w-7",
|
|
69
|
+
"aria-label": f,
|
|
70
|
+
disabled: e >= N,
|
|
71
|
+
onClick: () => o(new Date(e + 1, t.getMonth(), 1)),
|
|
72
|
+
children: /* @__PURE__ */ i(p, { className: "h-4 w-4" })
|
|
73
|
+
}
|
|
74
|
+
)
|
|
75
|
+
] }),
|
|
76
|
+
/* @__PURE__ */ i("div", { "data-period-grid": "", className: "grid min-w-0 grid-cols-2 gap-2", children: S(e).map((a, j) => {
|
|
77
|
+
const r = j + 1, P = k(e, r), D = C(e, r), Q = n === "range", { isStart: B, isEnd: E, isMiddle: T } = y(
|
|
78
|
+
e,
|
|
79
|
+
r,
|
|
80
|
+
c
|
|
81
|
+
), q = A(c) && !!c.to;
|
|
82
|
+
return /* @__PURE__ */ i(
|
|
83
|
+
Y,
|
|
84
|
+
{
|
|
85
|
+
selected: P,
|
|
86
|
+
disabled: D,
|
|
87
|
+
isRange: Q,
|
|
88
|
+
isStart: B,
|
|
89
|
+
isEnd: E,
|
|
90
|
+
isMiddle: T,
|
|
91
|
+
hasRangeEnd: !!q,
|
|
92
|
+
size: "quarter",
|
|
93
|
+
columns: 2,
|
|
94
|
+
onClick: () => z(e, r),
|
|
95
|
+
caption: a.caption,
|
|
96
|
+
children: a.label
|
|
97
|
+
},
|
|
98
|
+
a.label
|
|
99
|
+
);
|
|
100
|
+
}) })
|
|
101
|
+
]
|
|
102
|
+
}
|
|
103
|
+
);
|
|
104
|
+
};
|
|
105
|
+
return /* @__PURE__ */ s("div", { "data-slot": "quarter-panes", children: [
|
|
106
|
+
m(0),
|
|
107
|
+
R ? /* @__PURE__ */ s("div", { "data-slot": "quarter-pane-divider-group", children: [
|
|
108
|
+
/* @__PURE__ */ i("div", { className: "my-4 w-[1px] bg-stroke-hairline" }),
|
|
109
|
+
m(1)
|
|
110
|
+
] }) : null
|
|
111
|
+
] });
|
|
112
|
+
}
|
|
113
|
+
export {
|
|
114
|
+
L as CalendarQuarterPanes
|
|
115
|
+
};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { FiscalCalendarConfig } from '../../../lib/fiscal-calendar';
|
|
2
|
+
import { QuarterRange, QuarterSelection } from './calendar.types';
|
|
3
|
+
export declare function quarterPaneYear(item: Pick<QuarterSelection, "year" | "fy">): number;
|
|
4
|
+
export declare function viewMonthFromQuarter(item?: Pick<QuarterSelection, "year" | "fy">): Date;
|
|
5
|
+
export declare function quarterRank(item: Pick<QuarterSelection, "year" | "quarter" | "fy">): number;
|
|
6
|
+
export declare function isSameQuarter(left: QuarterSelection, right: QuarterSelection): boolean;
|
|
7
|
+
export declare function isQuarterRangeSelection(value: QuarterSelection | QuarterSelection[] | QuarterRange | undefined): value is QuarterRange;
|
|
8
|
+
export declare function isQuarterRangeEndpoint(item: QuarterSelection | undefined, year: number, quarter: 1 | 2 | 3 | 4): boolean;
|
|
9
|
+
export declare function getQuarterRangeProps(year: number, quarter: 1 | 2 | 3 | 4, currentSelection: QuarterSelection | QuarterSelection[] | QuarterRange | undefined): {
|
|
10
|
+
isStart: boolean;
|
|
11
|
+
isEnd: boolean;
|
|
12
|
+
isMiddle: boolean;
|
|
13
|
+
};
|
|
14
|
+
export declare function nextQuarterSelection(selection: QuarterSelection, prev: QuarterSelection | QuarterSelection[] | QuarterRange | undefined, quarterMode: "single" | "multiple" | "range" | "multi-range"): QuarterSelection | QuarterSelection[] | QuarterRange | undefined;
|
|
15
|
+
export declare function isQuarterSelected(year: number, quarter: 1 | 2 | 3 | 4, currentSelection: QuarterSelection | QuarterSelection[] | QuarterRange | undefined): boolean;
|
|
16
|
+
export declare function isQuarterDisabledForBounds(year: number, quarter: 1 | 2 | 3 | 4, disabled?: unknown, options?: {
|
|
17
|
+
calendarKind?: "gregorian" | "fiscal";
|
|
18
|
+
fiscalConfig?: FiscalCalendarConfig;
|
|
19
|
+
}): boolean;
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
import { localDateFromCivil as m } from "../../../lib/fiscal-calendar/civil-date.js";
|
|
2
|
+
import { buildFiscalYear as Q } from "../../../lib/fiscal-calendar/build-year.js";
|
|
3
|
+
import { isDateIntervalDisabled as D } from "./calendar-month-utils.js";
|
|
4
|
+
function E(r) {
|
|
5
|
+
return r.fy ?? r.year;
|
|
6
|
+
}
|
|
7
|
+
function x(r) {
|
|
8
|
+
return r ? new Date(E(r), 0, 1) : /* @__PURE__ */ new Date();
|
|
9
|
+
}
|
|
10
|
+
function u(r) {
|
|
11
|
+
return (r.fy ?? r.year) * 4 + r.quarter;
|
|
12
|
+
}
|
|
13
|
+
function e(r, n) {
|
|
14
|
+
return r.fy != null && n.fy != null ? r.fy === n.fy && r.quarter === n.quarter : r.year === n.year && r.quarter === n.quarter;
|
|
15
|
+
}
|
|
16
|
+
function c(r) {
|
|
17
|
+
return !!(r && !Array.isArray(r) && ("from" in r || "to" in r));
|
|
18
|
+
}
|
|
19
|
+
function y(r, n, f) {
|
|
20
|
+
return r ? (r.fy ?? r.year) === n && r.quarter === f : !1;
|
|
21
|
+
}
|
|
22
|
+
function A(r, n, f) {
|
|
23
|
+
if (!c(f))
|
|
24
|
+
return { isStart: !1, isEnd: !1, isMiddle: !1 };
|
|
25
|
+
const s = f.from, t = f.to;
|
|
26
|
+
if (!s && !t) return { isStart: !1, isEnd: !1, isMiddle: !1 };
|
|
27
|
+
const a = u({ year: r, quarter: n, fy: r });
|
|
28
|
+
if (!s)
|
|
29
|
+
return { isStart: !1, isEnd: t ? y(t, r, n) : !1, isMiddle: !1 };
|
|
30
|
+
const i = u(s);
|
|
31
|
+
if (!t) return { isStart: a === i, isEnd: !1, isMiddle: !1 };
|
|
32
|
+
const o = u(t);
|
|
33
|
+
return {
|
|
34
|
+
isStart: a === i,
|
|
35
|
+
isEnd: a === o,
|
|
36
|
+
isMiddle: a > i && a < o
|
|
37
|
+
};
|
|
38
|
+
}
|
|
39
|
+
function F(r, n, f) {
|
|
40
|
+
if (f === "single") return r;
|
|
41
|
+
if (f === "multiple") {
|
|
42
|
+
const t = n || [];
|
|
43
|
+
return t.some((i) => e(i, r)) ? t.filter((i) => !e(i, r)) : [...t, r];
|
|
44
|
+
}
|
|
45
|
+
const s = n;
|
|
46
|
+
return !s?.from || s.to ? { from: r } : e(r, s.from) ? s : u(r) < u(s.from) ? { from: r, to: s.from } : { from: s.from, to: r };
|
|
47
|
+
}
|
|
48
|
+
function R(r, n, f) {
|
|
49
|
+
if (!f) return !1;
|
|
50
|
+
const s = { year: r, quarter: n, fy: r };
|
|
51
|
+
if (Array.isArray(f))
|
|
52
|
+
return f.some(
|
|
53
|
+
(t) => t.fy != null ? e(t, s) : t.year === r && t.quarter === n
|
|
54
|
+
);
|
|
55
|
+
if (c(f)) {
|
|
56
|
+
const t = f.from, a = f.to;
|
|
57
|
+
if (!t) return a ? y(a, r, n) : !1;
|
|
58
|
+
const i = u(s), o = u(t);
|
|
59
|
+
if (!a) return i === o;
|
|
60
|
+
const d = u(a);
|
|
61
|
+
return i >= o && i <= d;
|
|
62
|
+
}
|
|
63
|
+
return f.fy != null ? e(f, s) : f.year === r && f.quarter === n;
|
|
64
|
+
}
|
|
65
|
+
function l(r, n) {
|
|
66
|
+
return {
|
|
67
|
+
start: new Date(r, (n - 1) * 3, 1),
|
|
68
|
+
end: new Date(r, n * 3, 0, 23, 59, 59, 999)
|
|
69
|
+
};
|
|
70
|
+
}
|
|
71
|
+
function b(r, n, f, s) {
|
|
72
|
+
let t, a;
|
|
73
|
+
if (s?.calendarKind === "fiscal" && s.fiscalConfig)
|
|
74
|
+
try {
|
|
75
|
+
const o = Q(s.fiscalConfig, r).quarters.find((d) => d.quarter === n);
|
|
76
|
+
o ? (t = m(o.start), a = m(o.end)) : { start: t, end: a } = l(r, n);
|
|
77
|
+
} catch {
|
|
78
|
+
({ start: t, end: a } = l(r, n));
|
|
79
|
+
}
|
|
80
|
+
else
|
|
81
|
+
({ start: t, end: a } = l(r, n));
|
|
82
|
+
return D(t, a, f);
|
|
83
|
+
}
|
|
84
|
+
export {
|
|
85
|
+
A as getQuarterRangeProps,
|
|
86
|
+
b as isQuarterDisabledForBounds,
|
|
87
|
+
y as isQuarterRangeEndpoint,
|
|
88
|
+
c as isQuarterRangeSelection,
|
|
89
|
+
R as isQuarterSelected,
|
|
90
|
+
e as isSameQuarter,
|
|
91
|
+
F as nextQuarterSelection,
|
|
92
|
+
E as quarterPaneYear,
|
|
93
|
+
u as quarterRank,
|
|
94
|
+
x as viewMonthFromQuarter
|
|
95
|
+
};
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { SelectionKind } from './calendar-selection';
|
|
2
|
+
export declare const DAY_CELL_SIZE = "h-9 w-9 min-h-9 min-w-9";
|
|
3
|
+
export declare const DAY_MONTH_MIN_WIDTH = "min-w-[292px]";
|
|
4
|
+
export declare const WEEK_GUTTER_RULE = "w-9 flex-shrink-0";
|
|
5
|
+
export declare const INTERVAL_TRACK = "bg-accent";
|
|
6
|
+
export declare const POINT_FILL = "bg-brand text-brand-foreground";
|
|
7
|
+
export declare const POINT_FILL_HOVER = "hover:bg-brand-strong hover:text-brand-foreground hover:border-transparent";
|
|
8
|
+
export declare const SELECTION_RADIUS = "rounded-lg";
|
|
9
|
+
export declare const SELECTION_RADIUS_START = "rounded-l-lg";
|
|
10
|
+
export declare const SELECTION_RADIUS_END = "rounded-r-lg";
|
|
11
|
+
export declare const dayButtonBaseClassName: string;
|
|
12
|
+
export declare const dayButtonHoverClassName = "hover:bg-accent hover:text-accent-foreground hover:border-transparent";
|
|
13
|
+
export declare const dayButtonWeekHoverClassName = "hover:bg-transparent hover:text-inherit hover:border-transparent";
|
|
14
|
+
export declare const dayButtonPointClassName: string;
|
|
15
|
+
export declare const dayButtonMiddleClassName = "text-accent-foreground rounded-none border-transparent";
|
|
16
|
+
export declare const dayCellBaseClassName: string;
|
|
17
|
+
export declare const rangeStartCellClassName = "calendar-interval-cap-start";
|
|
18
|
+
export declare const rangeMiddleCellClassName: string;
|
|
19
|
+
export declare const rangeEndCellClassName = "calendar-interval-cap-end";
|
|
20
|
+
export declare const previewCellClassName: string;
|
|
21
|
+
export declare const previewCapStartCellClassName = "calendar-interval-cap-start";
|
|
22
|
+
export declare const previewCapEndCellClassName = "calendar-interval-cap-end";
|
|
23
|
+
export declare const weekNumberTypeClassName = "text-[11px] font-medium text-content-icon";
|
|
24
|
+
export declare const weekNumberInteractiveClassName = "text-brand group-has-[.rdp-selected]/week:text-brand group-hover/week:text-brand";
|
|
25
|
+
export declare const weekNumberBaseClassName: string;
|
|
26
|
+
export declare const weekNumberSelectedFillClassName = "group-data-[week-selected]/week:bg-accent";
|
|
27
|
+
export declare const weekNumberFocusClassName = "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-focus-ring";
|
|
28
|
+
export declare const periodTileBaseClassName: string;
|
|
29
|
+
export declare const periodTilePointClassName: string;
|
|
30
|
+
export declare const periodTileHoverClassName = "hover:border-brand hover:bg-accent hover:text-accent-foreground";
|
|
31
|
+
export declare const periodTileMiddleClassName = "text-accent-foreground";
|
|
32
|
+
export declare const periodTileDisabledClassName = "cursor-not-allowed text-content-placeholder opacity-50";
|
|
33
|
+
export declare const periodRangeTrackClassName = "bg-accent";
|
|
34
|
+
export declare function dayButtonAppearanceClassName(kind: SelectionKind, pickerType: "date" | "week"): string;
|
|
35
|
+
export declare function periodTileAppearanceClassName(params: {
|
|
36
|
+
kind: SelectionKind;
|
|
37
|
+
disabled: boolean;
|
|
38
|
+
}): string;
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import { cn as e } from "../../../lib/utils.js";
|
|
2
|
+
const l = "h-9 w-9 min-h-9 min-w-9", y = "min-w-[292px]", d = "w-9 flex-shrink-0", s = "bg-accent", i = "bg-brand text-brand-foreground", c = "hover:bg-brand-strong hover:text-brand-foreground hover:border-transparent", a = "rounded-lg", I = "rounded-l-lg", k = "rounded-r-lg", u = e(
|
|
3
|
+
"flex items-center justify-center p-0 font-normal text-sm transition-colors",
|
|
4
|
+
"border border-transparent",
|
|
5
|
+
a,
|
|
6
|
+
"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-focus-ring",
|
|
7
|
+
"disabled:pointer-events-none",
|
|
8
|
+
l,
|
|
9
|
+
"rdp-day rdp-day_button"
|
|
10
|
+
), p = "hover:bg-accent hover:text-accent-foreground hover:border-transparent", m = "hover:bg-transparent hover:text-inherit hover:border-transparent", v = e(
|
|
11
|
+
i,
|
|
12
|
+
c,
|
|
13
|
+
a,
|
|
14
|
+
"border-transparent"
|
|
15
|
+
), b = "text-accent-foreground rounded-none border-transparent", L = e(
|
|
16
|
+
"group/day relative select-none p-0 text-center flex-1 flex items-center justify-center",
|
|
17
|
+
"h-9 [&:nth-child(2)]:pl-2 rdp-day"
|
|
18
|
+
), C = "calendar-interval-cap-start", S = e(s, "rounded-none"), N = "calendar-interval-cap-end", A = e(s, "rounded-none"), B = C, R = N, f = "text-[11px] font-medium text-content-icon", D = "text-brand group-has-[.rdp-selected]/week:text-brand group-hover/week:text-brand", O = e(
|
|
19
|
+
"select-none flex items-center justify-center",
|
|
20
|
+
f,
|
|
21
|
+
l,
|
|
22
|
+
d,
|
|
23
|
+
"rdp-week_number"
|
|
24
|
+
), H = "group-data-[week-selected]/week:bg-accent", M = "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-focus-ring", o = e(
|
|
25
|
+
"relative z-10 border border-transparent p-0 text-sm font-normal transition-colors",
|
|
26
|
+
a,
|
|
27
|
+
"focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-focus-ring focus-visible:ring-offset-0"
|
|
28
|
+
), g = e(i, c), h = "hover:border-brand hover:bg-accent hover:text-accent-foreground", x = "text-accent-foreground", T = "cursor-not-allowed text-content-placeholder opacity-50", P = s;
|
|
29
|
+
function U(n, t) {
|
|
30
|
+
const r = n === "point" || n === "interval-start" || n === "interval-end";
|
|
31
|
+
return e(u, r ? v : n === "interval-middle" ? b : void 0, t === "week" ? r ? void 0 : m : n === "none" ? p : void 0);
|
|
32
|
+
}
|
|
33
|
+
function F(n) {
|
|
34
|
+
const { kind: t, disabled: r } = n;
|
|
35
|
+
return r ? e(o, T) : t === "point" || t === "interval-start" || t === "interval-end" ? e(o, g) : t === "interval-middle" ? e(o, x) : e(o, h);
|
|
36
|
+
}
|
|
37
|
+
export {
|
|
38
|
+
l as DAY_CELL_SIZE,
|
|
39
|
+
y as DAY_MONTH_MIN_WIDTH,
|
|
40
|
+
s as INTERVAL_TRACK,
|
|
41
|
+
i as POINT_FILL,
|
|
42
|
+
c as POINT_FILL_HOVER,
|
|
43
|
+
a as SELECTION_RADIUS,
|
|
44
|
+
k as SELECTION_RADIUS_END,
|
|
45
|
+
I as SELECTION_RADIUS_START,
|
|
46
|
+
d as WEEK_GUTTER_RULE,
|
|
47
|
+
U as dayButtonAppearanceClassName,
|
|
48
|
+
u as dayButtonBaseClassName,
|
|
49
|
+
p as dayButtonHoverClassName,
|
|
50
|
+
b as dayButtonMiddleClassName,
|
|
51
|
+
v as dayButtonPointClassName,
|
|
52
|
+
m as dayButtonWeekHoverClassName,
|
|
53
|
+
L as dayCellBaseClassName,
|
|
54
|
+
P as periodRangeTrackClassName,
|
|
55
|
+
F as periodTileAppearanceClassName,
|
|
56
|
+
o as periodTileBaseClassName,
|
|
57
|
+
T as periodTileDisabledClassName,
|
|
58
|
+
h as periodTileHoverClassName,
|
|
59
|
+
x as periodTileMiddleClassName,
|
|
60
|
+
g as periodTilePointClassName,
|
|
61
|
+
R as previewCapEndCellClassName,
|
|
62
|
+
B as previewCapStartCellClassName,
|
|
63
|
+
A as previewCellClassName,
|
|
64
|
+
N as rangeEndCellClassName,
|
|
65
|
+
S as rangeMiddleCellClassName,
|
|
66
|
+
C as rangeStartCellClassName,
|
|
67
|
+
O as weekNumberBaseClassName,
|
|
68
|
+
M as weekNumberFocusClassName,
|
|
69
|
+
D as weekNumberInteractiveClassName,
|
|
70
|
+
H as weekNumberSelectedFillClassName,
|
|
71
|
+
f as weekNumberTypeClassName
|
|
72
|
+
};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
export type SelectionKind = "none" | "point" | "interval-start" | "interval-middle" | "interval-end";
|
|
2
|
+
export interface SelectionModifiers {
|
|
3
|
+
selected?: boolean;
|
|
4
|
+
range_start?: boolean;
|
|
5
|
+
range_end?: boolean;
|
|
6
|
+
range_middle?: boolean;
|
|
7
|
+
preview?: boolean;
|
|
8
|
+
preview_cap?: boolean;
|
|
9
|
+
}
|
|
10
|
+
export declare function selectionKindFromModifiers(modifiers: SelectionModifiers): SelectionKind;
|
|
11
|
+
export declare function dayKey(date: Date): number;
|
|
12
|
+
export declare function isPreviewMiddle(date: Date, from: Date, hovered: Date): boolean;
|
|
13
|
+
export declare function isPreviewCap(date: Date, from: Date, hovered: Date): boolean;
|
|
14
|
+
export declare function periodCellKind(params: {
|
|
15
|
+
selected: boolean;
|
|
16
|
+
isRange: boolean;
|
|
17
|
+
isStart: boolean;
|
|
18
|
+
isEnd: boolean;
|
|
19
|
+
isMiddle: boolean;
|
|
20
|
+
}): SelectionKind;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
function c(n) {
|
|
2
|
+
const e = !!n.range_start, t = !!n.range_end;
|
|
3
|
+
return e && t ? "point" : e ? "interval-start" : t ? "interval-end" : n.range_middle ? "interval-middle" : n.preview_cap ? "interval-end" : n.preview ? "interval-middle" : n.selected ? "point" : "none";
|
|
4
|
+
}
|
|
5
|
+
function o(n) {
|
|
6
|
+
return n.getFullYear() * 1e4 + (n.getMonth() + 1) * 100 + n.getDate();
|
|
7
|
+
}
|
|
8
|
+
function d(n, e, t) {
|
|
9
|
+
const r = o(n), i = o(e), a = o(t), l = i < a ? i : a, u = i > a ? i : a;
|
|
10
|
+
return r > l && r < u;
|
|
11
|
+
}
|
|
12
|
+
function s(n, e, t) {
|
|
13
|
+
const r = o(n);
|
|
14
|
+
return r === o(t) && r !== o(e);
|
|
15
|
+
}
|
|
16
|
+
function g(n) {
|
|
17
|
+
const { selected: e, isRange: t, isStart: r, isEnd: i, isMiddle: a } = n;
|
|
18
|
+
return t ? c({
|
|
19
|
+
selected: e,
|
|
20
|
+
range_start: r,
|
|
21
|
+
range_end: i,
|
|
22
|
+
range_middle: a
|
|
23
|
+
}) : e ? "point" : "none";
|
|
24
|
+
}
|
|
25
|
+
export {
|
|
26
|
+
o as dayKey,
|
|
27
|
+
s as isPreviewCap,
|
|
28
|
+
d as isPreviewMiddle,
|
|
29
|
+
g as periodCellKind,
|
|
30
|
+
c as selectionKindFromModifiers
|
|
31
|
+
};
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { CalendarKind, DateCellMeta } from '../../../lib/fiscal-calendar';
|
|
1
2
|
import { WeekPickerInput } from './calendar-week-utils';
|
|
2
3
|
import * as React from "react";
|
|
3
4
|
export interface CalendarWeekNumberCellProps {
|
|
@@ -9,9 +10,13 @@ export interface CalendarWeekNumberCellProps {
|
|
|
9
10
|
};
|
|
10
11
|
weekStartsOn: 0 | 1 | 2 | 3 | 4 | 5 | 6;
|
|
11
12
|
pickerType: "date" | "week" | "month";
|
|
13
|
+
calendarKind?: CalendarKind;
|
|
12
14
|
weekNumberLabel: (weekOfMonth: number) => string;
|
|
13
15
|
weekLabel: (weekOfMonth: number) => string;
|
|
16
|
+
fiscalWeekNumberLabel?: (week: number) => string;
|
|
17
|
+
fiscalWeekAriaLabel?: (meta: DateCellMeta) => string;
|
|
18
|
+
getCellMeta?: (date: Date) => DateCellMeta | undefined;
|
|
14
19
|
onWeekSelect: (input: WeekPickerInput) => void;
|
|
15
20
|
className?: string;
|
|
16
21
|
}
|
|
17
|
-
export declare function CalendarWeekNumberCell({ week, weekStartsOn, pickerType, weekNumberLabel, weekLabel, onWeekSelect, className, ...weekProps }: CalendarWeekNumberCellProps & React.HTMLAttributes<HTMLElement>): import("react/jsx-runtime").JSX.Element;
|
|
22
|
+
export declare function CalendarWeekNumberCell({ week, weekStartsOn, pickerType, calendarKind, weekNumberLabel, weekLabel, fiscalWeekNumberLabel, fiscalWeekAriaLabel, getCellMeta, onWeekSelect, className, ...weekProps }: CalendarWeekNumberCellProps & React.HTMLAttributes<HTMLElement>): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,72 +1,87 @@
|
|
|
1
1
|
import { jsx as n } from "react/jsx-runtime";
|
|
2
2
|
import "react";
|
|
3
|
-
import { cn as
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
3
|
+
import { cn as k } from "../../../lib/utils.js";
|
|
4
|
+
import { weekNumberBaseClassName as h, weekNumberInteractiveClassName as C, weekNumberSelectedFillClassName as M, weekNumberFocusClassName as v } from "./calendar-selection-appearance.js";
|
|
5
|
+
function F(e, s) {
|
|
6
|
+
const o = e.getFullYear(), u = e.getMonth(), c = (new Date(o, u, 1).getDay() + 7 - s) % 7, i = new Date(o, u, 1 - c), l = new Date(e), r = (e.getDay() + 7 - s) % 7;
|
|
7
|
+
return l.setDate(e.getDate() - r), Math.round(
|
|
8
|
+
(l.getTime() - i.getTime()) / (10080 * 60 * 1e3)
|
|
9
|
+
) + 1;
|
|
10
|
+
}
|
|
11
|
+
function O({
|
|
12
|
+
week: e,
|
|
13
|
+
weekStartsOn: s,
|
|
14
|
+
pickerType: o,
|
|
15
|
+
calendarKind: u = "gregorian",
|
|
16
|
+
weekNumberLabel: y,
|
|
17
|
+
weekLabel: D,
|
|
18
|
+
fiscalWeekNumberLabel: c,
|
|
19
|
+
fiscalWeekAriaLabel: i,
|
|
20
|
+
getCellMeta: l,
|
|
21
|
+
onWeekSelect: g,
|
|
22
|
+
className: r,
|
|
23
|
+
...N
|
|
13
24
|
}) {
|
|
14
|
-
const
|
|
15
|
-
if (!
|
|
25
|
+
const d = e.days.find((f) => !f.outside)?.date;
|
|
26
|
+
if (!d)
|
|
16
27
|
return /* @__PURE__ */ n(
|
|
17
28
|
"th",
|
|
18
29
|
{
|
|
19
30
|
scope: "row",
|
|
20
31
|
"aria-hidden": "true",
|
|
21
|
-
className:
|
|
22
|
-
|
|
23
|
-
|
|
32
|
+
className: k(
|
|
33
|
+
h,
|
|
34
|
+
r
|
|
24
35
|
)
|
|
25
36
|
}
|
|
26
37
|
);
|
|
27
|
-
const
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
(d.getTime() - w.getTime()) / (10080 * 60 * 1e3)
|
|
31
|
-
) + 1, u = h(r);
|
|
32
|
-
if (p === "week") {
|
|
33
|
-
const o = () => y(e);
|
|
38
|
+
const m = l?.(d), a = m?.fiscalWeek, w = F(d, s), p = a ?? w, b = a && c ? c(a) : y(p), x = a && m && i ? i(m) : D(w);
|
|
39
|
+
if (o === "week") {
|
|
40
|
+
const f = () => g(d);
|
|
34
41
|
return /* @__PURE__ */ n(
|
|
35
42
|
"td",
|
|
36
43
|
{
|
|
37
|
-
"aria-label":
|
|
38
|
-
"data-week-index":
|
|
39
|
-
"data-week-number":
|
|
44
|
+
"aria-label": x,
|
|
45
|
+
"data-week-index": w,
|
|
46
|
+
"data-week-number": p,
|
|
47
|
+
"data-fiscal-week": a,
|
|
48
|
+
"data-selection": "period-row",
|
|
40
49
|
tabIndex: 0,
|
|
41
50
|
role: "button",
|
|
42
|
-
className:
|
|
43
|
-
|
|
44
|
-
|
|
51
|
+
className: k(
|
|
52
|
+
h,
|
|
53
|
+
v,
|
|
54
|
+
M,
|
|
55
|
+
C,
|
|
56
|
+
"cursor-pointer transition-colors",
|
|
57
|
+
r
|
|
45
58
|
),
|
|
46
59
|
onClick: (t) => {
|
|
47
|
-
t.preventDefault(), t.stopPropagation(),
|
|
60
|
+
t.preventDefault(), t.stopPropagation(), f();
|
|
48
61
|
},
|
|
49
62
|
onKeyDown: (t) => {
|
|
50
|
-
(t.key === "Enter" || t.key === " ") && (t.preventDefault(), t.stopPropagation(),
|
|
63
|
+
(t.key === "Enter" || t.key === " ") && (t.preventDefault(), t.stopPropagation(), f());
|
|
51
64
|
},
|
|
52
|
-
children: /* @__PURE__ */ n("div", { className: "flex h-
|
|
65
|
+
children: /* @__PURE__ */ n("div", { className: "flex h-9 w-full items-center justify-center text-center", children: b })
|
|
53
66
|
}
|
|
54
67
|
);
|
|
55
68
|
}
|
|
56
69
|
return /* @__PURE__ */ n(
|
|
57
70
|
"th",
|
|
58
71
|
{
|
|
59
|
-
...
|
|
60
|
-
"aria-label":
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
72
|
+
...N,
|
|
73
|
+
"aria-label": x,
|
|
74
|
+
"data-week-number": p,
|
|
75
|
+
"data-fiscal-week": a,
|
|
76
|
+
className: k(
|
|
77
|
+
h,
|
|
78
|
+
r
|
|
64
79
|
),
|
|
65
80
|
scope: "row",
|
|
66
|
-
children: /* @__PURE__ */ n("div", { className: "flex h-
|
|
81
|
+
children: /* @__PURE__ */ n("div", { className: "flex h-9 w-full items-center justify-center text-center whitespace-nowrap", children: b })
|
|
67
82
|
}
|
|
68
83
|
);
|
|
69
84
|
}
|
|
70
85
|
export {
|
|
71
|
-
|
|
86
|
+
O as CalendarWeekNumberCell
|
|
72
87
|
};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { CalendarKind } from '../../../lib/fiscal-calendar';
|
|
2
|
+
export declare function paddedWeekNumber(week: number): string;
|
|
3
|
+
export declare function paneCivilMonthIndex(calendarKind: CalendarKind, currentMonth: Date, panelIndex: number): number | undefined;
|
|
4
|
+
export declare function paneCivilMonthLabel(calendarKind: CalendarKind, currentMonth: Date, panelIndex: number, months: readonly string[]): string | undefined;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
function r(e) {
|
|
2
|
+
return String(e).padStart(2, "0");
|
|
3
|
+
}
|
|
4
|
+
function i(e, t, n) {
|
|
5
|
+
if (e === "fiscal")
|
|
6
|
+
return new Date(
|
|
7
|
+
t.getFullYear(),
|
|
8
|
+
t.getMonth() + n,
|
|
9
|
+
1
|
|
10
|
+
).getMonth();
|
|
11
|
+
}
|
|
12
|
+
export {
|
|
13
|
+
r as paddedWeekNumber,
|
|
14
|
+
i as paneCivilMonthIndex
|
|
15
|
+
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { CalendarKind, FiscalMode, FiscalMonthPattern, Granularity } from '../../../lib/fiscal-calendar';
|
|
2
2
|
import { WeekRange, WeekSelection } from './calendar.types';
|
|
3
3
|
export type WeekPickerInput = Date | {
|
|
4
4
|
days: Array<{
|
|
@@ -6,11 +6,19 @@ export type WeekPickerInput = Date | {
|
|
|
6
6
|
outside?: boolean;
|
|
7
7
|
}>;
|
|
8
8
|
};
|
|
9
|
+
export declare function fiscalPeriodForWeek(week: {
|
|
10
|
+
days: Array<{
|
|
11
|
+
date: Date;
|
|
12
|
+
outside?: boolean;
|
|
13
|
+
}>;
|
|
14
|
+
}, getCellMeta?: (date: Date) => {
|
|
15
|
+
fiscalPeriod?: number;
|
|
16
|
+
} | undefined): number | undefined;
|
|
9
17
|
export declare function isSameWeek(w1: WeekSelection, w2: WeekSelection): boolean;
|
|
10
18
|
export declare function calculateWeekSelection(weekOrDate: WeekPickerInput, options: {
|
|
11
|
-
|
|
19
|
+
calendarKind: CalendarKind;
|
|
12
20
|
fiscalMode: FiscalMode;
|
|
13
|
-
|
|
21
|
+
granularity?: Granularity;
|
|
14
22
|
fiscalMonthPattern?: FiscalMonthPattern;
|
|
15
23
|
fiscalYearStartMonth: number;
|
|
16
24
|
weekStartsOn: 0 | 1 | 2 | 3 | 4 | 5 | 6;
|