impact-nova 2.1.0-alpha.9 → 2.2.1
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/README.md +6 -0
- package/dist/components/data/ag-grid-react/cell-renderers/editors/split-cell-editor.js +73 -94
- package/dist/components/data/ag-grid-react/cell-renderers/editors/split-cell-focus.d.ts +53 -0
- package/dist/components/data/ag-grid-react/cell-renderers/editors/split-cell-focus.js +98 -0
- package/dist/components/data/ag-grid-react/headers/column-menu/column-settings-menu.js +15 -13
- package/dist/components/data/ag-grid-react/headers/custom-header.js +56 -58
- package/dist/components/data/ag-grid-react/headers/custom-inner-header-group.d.ts +12 -0
- package/dist/components/data/ag-grid-react/headers/custom-inner-header-group.js +31 -0
- package/dist/components/data/ag-grid-react/headers/header-search-active-state.d.ts +10 -0
- package/dist/components/data/ag-grid-react/headers/header-search-active-state.js +38 -0
- package/dist/components/data/ag-grid-react/index.js +166 -163
- package/dist/components/data/ag-grid-react/notify-column-indicator-sync.d.ts +3 -4
- package/dist/components/data/ag-grid-react/theme.js +0 -2
- package/dist/components/data/data-table/data-table-column-list.js +1 -1
- package/dist/components/data/data-table/data-table-saved-views.js +1 -1
- package/dist/components/data/expandable-list-item/expandable-list-item-attributes.js +7 -6
- package/dist/components/data/nested-list/components/SortableItem.d.ts +3 -1
- package/dist/components/data/nested-list/components/SortableItem.js +111 -109
- package/dist/components/data-display/calendar/calendar-footer-emphasis.d.ts +28 -0
- package/dist/components/data-display/calendar/calendar-footer-emphasis.js +8 -0
- package/dist/components/data-display/calendar/calendar-footer.d.ts +4 -1
- package/dist/components/data-display/calendar/calendar-footer.js +60 -38
- package/dist/components/data-display/calendar/calendar.js +86 -82
- package/dist/components/data-display/calendar/calendar.types.d.ts +2 -0
- package/dist/components/data-display/calendar/use-calendar-state.d.ts +3 -0
- package/dist/components/feedback/tooltip/tab-tooltip-render.js +3 -2
- package/dist/components/flows/filter-strip/filter-strip.js +36 -29
- package/dist/components/flows/filter-strip/filter-summary.js +2 -2
- package/dist/components/forms/date-picker/date-input-behavior.d.ts +118 -0
- package/dist/components/forms/date-picker/date-input-behavior.js +164 -0
- package/dist/components/forms/date-picker/date-picker.js +202 -138
- package/dist/components/forms/date-picker/date-range-picker.js +302 -215
- package/dist/components/forms/date-picker/month-picker.js +160 -119
- package/dist/components/forms/date-picker/month-range-picker.js +302 -245
- package/dist/components/forms/date-picker/multi-date-picker.js +94 -80
- package/dist/components/forms/date-picker/multi-month-picker.js +97 -83
- package/dist/components/forms/date-picker/multi-week-picker.js +107 -93
- package/dist/components/forms/date-picker/week-picker.js +230 -140
- package/dist/components/forms/date-picker/week-range-picker.js +332 -226
- package/dist/components/forms/file-upload/file-upload.js +312 -174
- package/dist/components/forms/file-upload/file-upload.types.d.ts +17 -2
- package/dist/components/layout/dynamic-layout/dynamic-layout.variants.d.ts +1 -1
- package/dist/components/layout/header/header.js +45 -38
- package/dist/components/layout/horizontal-scroller/index.d.ts +1 -0
- package/dist/components/layout/horizontal-scroller/index.js +3 -2
- package/dist/components/ui/local-raster-icons/assets/excel-error-icon.webp.js +4 -0
- package/dist/components/ui/local-raster-icons/assets/file-upload-error.webp.js +4 -0
- package/dist/components/ui/local-raster-icons/rasterIcons.d.ts +2 -0
- package/dist/components/ui/local-raster-icons/rasterIcons.js +32 -22
- package/dist/components/ui/show.d.ts +10 -0
- package/dist/components/ui/show.js +7 -0
- package/dist/components/ui/show.types.d.ts +5 -0
- package/dist/i18n/defaultMessages.d.ts +17 -0
- package/dist/i18n/defaultMessages.js +29 -17
- package/dist/i18n/index.d.ts +1 -1
- package/dist/i18n/locales/de.js +12 -0
- package/dist/i18n/locales/es.js +12 -0
- package/dist/i18n/locales/hi.js +12 -0
- package/dist/i18n/locales/kn.js +12 -0
- package/dist/impact-nova-base.scss +6 -2
- package/dist/impact-nova-components.css +141 -16
- package/dist/impact-nova-tokens.scss +12 -0
- package/dist/impact-nova.css +1 -1
- package/dist/index.d.ts +2 -0
- package/dist/index.js +273 -271
- package/dist/lib/utils.js +40 -24
- package/dist/llms/rules/ag-grid.js +1 -1
- package/dist/llms/rules/installation.js +1 -1
- package/dist/llms/rules/requirements.js +1 -1
- package/dist/tailwind.config.js +36 -4
- package/dist/theme/tailwind-colors.js +3 -1
- package/package.json +15 -6
- package/tailwind.config.d.ts +3 -0
- package/dist/components/data/ag-grid-react/headers/custom-header-group.d.ts +0 -10
- package/dist/components/data/ag-grid-react/headers/custom-header-group.js +0 -58
|
@@ -1,140 +1,154 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import * as
|
|
3
|
-
import { Cross as
|
|
4
|
-
import { format as
|
|
5
|
-
import { cn as
|
|
6
|
-
import { Input as
|
|
7
|
-
import { Popover as
|
|
8
|
-
import { Calendar as
|
|
9
|
-
import { Tooltip as
|
|
10
|
-
import { useImpactNovaI18n as
|
|
11
|
-
import { getDateFnsLocale as
|
|
12
|
-
import { coerceWeekArrayApply as
|
|
13
|
-
import {
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
}
|
|
1
|
+
import { jsxs as u, jsx as r } from "react/jsx-runtime";
|
|
2
|
+
import * as n from "react";
|
|
3
|
+
import { Cross as Z, CalendarMonth as _ } from "impact-nova-icons";
|
|
4
|
+
import { format as b } from "date-fns";
|
|
5
|
+
import { cn as ee } from "../../../lib/utils.js";
|
|
6
|
+
import { Input as te } from "../input/input.js";
|
|
7
|
+
import { Popover as re, PopoverAnchor as ne, PopoverContent as oe } from "../../feedback/popover/popover.js";
|
|
8
|
+
import { Calendar as se } from "../../data-display/calendar/calendar.js";
|
|
9
|
+
import { Tooltip as x, TooltipTrigger as A, TooltipContent as M } from "../../feedback/tooltip/tooltip.js";
|
|
10
|
+
import { useImpactNovaI18n as ae } from "../../../i18n/use-impact-nova-i18n.js";
|
|
11
|
+
import { getDateFnsLocale as ce } from "../../../i18n/getDateFnsLocale.js";
|
|
12
|
+
import { coerceWeekArrayApply as ie, coerceWeekArray as le } from "./calendar-selection-adapters.js";
|
|
13
|
+
import { usePickerDismissActionsRef as pe, usePickerFooterDismissNudge as de } from "./date-input-behavior.js";
|
|
14
|
+
import { buildDateBoundsMatcher as fe } from "../../../lib/date-bounds-matcher.js";
|
|
15
|
+
const me = (t, a = "MM/dd/yyyy", c) => {
|
|
16
|
+
const h = b(t.startDate, a, c ? { locale: c } : {}), y = b(t.endDate, a, c ? { locale: c } : {});
|
|
17
|
+
return `${h} - ${y}`;
|
|
18
|
+
}, ue = n.forwardRef(
|
|
18
19
|
({
|
|
19
20
|
value: t,
|
|
20
21
|
onChange: a,
|
|
21
22
|
format: c = "MM/dd/yyyy",
|
|
22
|
-
placeholder:
|
|
23
|
-
minDate:
|
|
24
|
-
maxDate:
|
|
25
|
-
startMonth:
|
|
26
|
-
endMonth:
|
|
27
|
-
showFooter:
|
|
28
|
-
calendarType:
|
|
29
|
-
fiscalMode:
|
|
30
|
-
selectionMode:
|
|
31
|
-
fiscalMonthPattern:
|
|
32
|
-
fiscalYearStartMonth:
|
|
33
|
-
weekStartsOn:
|
|
34
|
-
disabled:
|
|
35
|
-
className:
|
|
36
|
-
...
|
|
37
|
-
},
|
|
38
|
-
const { locale:
|
|
39
|
-
|
|
40
|
-
|
|
23
|
+
placeholder: h,
|
|
24
|
+
minDate: y,
|
|
25
|
+
maxDate: N,
|
|
26
|
+
startMonth: T,
|
|
27
|
+
endMonth: R,
|
|
28
|
+
showFooter: d = !0,
|
|
29
|
+
calendarType: v = "calendar",
|
|
30
|
+
fiscalMode: S = "basic",
|
|
31
|
+
selectionMode: w = "week",
|
|
32
|
+
fiscalMonthPattern: I,
|
|
33
|
+
fiscalYearStartMonth: L = 1,
|
|
34
|
+
weekStartsOn: j = 1,
|
|
35
|
+
disabled: o,
|
|
36
|
+
className: O,
|
|
37
|
+
...E
|
|
38
|
+
}, F) => {
|
|
39
|
+
const { locale: g, t: i } = ae(), K = n.useMemo(() => ce(g), [g]), $ = h ?? i("datePicker.selectWeeks"), [l, s] = n.useState(!1), k = n.useRef(!1), C = n.useRef(null), P = pe(), { footerFlashKey: z, footerFlashTarget: V, popoverHandlers: B } = de(d, l, P, C), [f, m] = n.useState(t);
|
|
40
|
+
n.useEffect(() => {
|
|
41
|
+
m(t);
|
|
41
42
|
}, [l, t]);
|
|
42
|
-
const
|
|
43
|
-
const
|
|
44
|
-
p
|
|
45
|
-
},
|
|
46
|
-
const
|
|
47
|
-
a?.(
|
|
48
|
-
},
|
|
49
|
-
|
|
50
|
-
},
|
|
51
|
-
|
|
52
|
-
},
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
43
|
+
const H = (e) => {
|
|
44
|
+
const p = le(e);
|
|
45
|
+
m(p), d || a?.(p);
|
|
46
|
+
}, q = (e) => {
|
|
47
|
+
const p = ie(e, f);
|
|
48
|
+
a?.(p), s(!1);
|
|
49
|
+
}, D = () => {
|
|
50
|
+
m(t), s(!1);
|
|
51
|
+
}, W = () => {
|
|
52
|
+
m(void 0), a?.(void 0), d || s(!1);
|
|
53
|
+
}, G = t && t.length > 0 ? t.length === 1 ? me(t[0], c, K) : `${t.length} weeks selected` : "", J = (e) => {
|
|
54
|
+
o || !e && d || s(e);
|
|
55
|
+
}, Q = n.useCallback(() => {
|
|
56
|
+
const e = f?.length ?? 0, p = t?.length ?? 0, U = e === p && (f ?? []).every(
|
|
57
|
+
(X, Y) => X.startDate.getTime() === t?.[Y]?.startDate.getTime()
|
|
58
|
+
);
|
|
59
|
+
return e > 0 && !U ? "apply" : "cancel";
|
|
60
|
+
}, [f, t]);
|
|
61
|
+
return n.useLayoutEffect(() => {
|
|
62
|
+
P.current = {
|
|
63
|
+
onDismiss: D,
|
|
64
|
+
resolveFlash: Q
|
|
65
|
+
};
|
|
66
|
+
}), /* @__PURE__ */ u(re, { open: o ? !1 : l, onOpenChange: J, children: [
|
|
67
|
+
/* @__PURE__ */ r(ne, { asChild: !0, children: /* @__PURE__ */ r("div", { ref: C, children: /* @__PURE__ */ r(
|
|
68
|
+
te,
|
|
58
69
|
{
|
|
59
|
-
ref:
|
|
60
|
-
value:
|
|
70
|
+
ref: F,
|
|
71
|
+
value: G,
|
|
61
72
|
placeholder: $,
|
|
62
73
|
readOnly: !0,
|
|
63
|
-
disabled:
|
|
74
|
+
disabled: o,
|
|
64
75
|
onClick: () => {
|
|
65
|
-
!
|
|
76
|
+
!o && !l && s(!0);
|
|
66
77
|
},
|
|
67
|
-
className:
|
|
68
|
-
suffix: /* @__PURE__ */
|
|
69
|
-
t && t.length > 0 && !
|
|
70
|
-
/* @__PURE__ */ r(
|
|
78
|
+
className: ee("cursor-pointer", O),
|
|
79
|
+
suffix: /* @__PURE__ */ u("div", { className: "flex items-center gap-1", children: [
|
|
80
|
+
t && t.length > 0 && !o && /* @__PURE__ */ u(x, { children: [
|
|
81
|
+
/* @__PURE__ */ r(A, { asChild: !0, children: /* @__PURE__ */ r(
|
|
71
82
|
"button",
|
|
72
83
|
{
|
|
73
84
|
type: "button",
|
|
74
85
|
tabIndex: 0,
|
|
75
|
-
"aria-label":
|
|
86
|
+
"aria-label": i("calendar.clear"),
|
|
76
87
|
onClick: (e) => {
|
|
77
|
-
e.stopPropagation(),
|
|
88
|
+
e.stopPropagation(), W();
|
|
78
89
|
},
|
|
79
90
|
className: "inline-flex size-4 items-center justify-center bg-transparent border-none p-0 cursor-pointer",
|
|
80
|
-
children: /* @__PURE__ */ r(
|
|
91
|
+
children: /* @__PURE__ */ r(Z, { className: "size-3 hover:text-content" })
|
|
81
92
|
}
|
|
82
93
|
) }),
|
|
83
|
-
/* @__PURE__ */ r(
|
|
94
|
+
/* @__PURE__ */ r(M, { variant: "tertiary", side: "top", children: i("calendar.clear") })
|
|
84
95
|
] }),
|
|
85
|
-
/* @__PURE__ */
|
|
86
|
-
/* @__PURE__ */ r(
|
|
96
|
+
/* @__PURE__ */ u(x, { children: [
|
|
97
|
+
/* @__PURE__ */ r(A, { asChild: !0, children: /* @__PURE__ */ r(
|
|
87
98
|
"button",
|
|
88
99
|
{
|
|
89
100
|
type: "button",
|
|
90
101
|
tabIndex: 0,
|
|
91
102
|
"data-component": "calendar-trigger",
|
|
92
|
-
"aria-label":
|
|
103
|
+
"aria-label": i("datePicker.selectWeeks"),
|
|
93
104
|
onPointerDown: (e) => {
|
|
94
|
-
e.preventDefault(), e.stopPropagation(),
|
|
105
|
+
e.preventDefault(), e.stopPropagation(), o || s(!l);
|
|
95
106
|
},
|
|
96
107
|
onKeyDown: (e) => {
|
|
97
|
-
(e.key === "Enter" || e.key === " ") && (e.preventDefault(), e.stopPropagation(),
|
|
108
|
+
(e.key === "Enter" || e.key === " ") && (e.preventDefault(), e.stopPropagation(), o || (k.current = !0, s(!l)));
|
|
98
109
|
},
|
|
99
110
|
className: "inline-flex items-center justify-center bg-transparent border-none p-0 cursor-pointer",
|
|
100
|
-
children: /* @__PURE__ */ r(
|
|
111
|
+
children: /* @__PURE__ */ r(_, { className: "h-4 w-4 text-secondary-foreground" })
|
|
101
112
|
}
|
|
102
113
|
) }),
|
|
103
|
-
/* @__PURE__ */ r(
|
|
114
|
+
/* @__PURE__ */ r(M, { variant: "tertiary", side: "top", children: i("datePicker.selectWeeks") })
|
|
104
115
|
] })
|
|
105
116
|
] }),
|
|
106
|
-
...
|
|
117
|
+
...E
|
|
107
118
|
}
|
|
108
119
|
) }) }),
|
|
109
120
|
/* @__PURE__ */ r(
|
|
110
|
-
|
|
121
|
+
oe,
|
|
111
122
|
{
|
|
112
123
|
className: "w-auto p-0",
|
|
113
124
|
align: "start",
|
|
114
|
-
"aria-label":
|
|
125
|
+
"aria-label": i("datePicker.selectWeeks"),
|
|
115
126
|
onOpenAutoFocus: (e) => {
|
|
116
|
-
|
|
127
|
+
k.current || e.preventDefault(), k.current = !1;
|
|
117
128
|
},
|
|
129
|
+
...B,
|
|
118
130
|
children: /* @__PURE__ */ r(
|
|
119
|
-
|
|
131
|
+
se,
|
|
120
132
|
{
|
|
121
133
|
pickerType: "week",
|
|
122
134
|
weekMode: "multiple",
|
|
123
|
-
selectedWeeks:
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
135
|
+
selectedWeeks: f,
|
|
136
|
+
footerFlashKey: z,
|
|
137
|
+
footerFlashTarget: V,
|
|
138
|
+
onWeekSelect: H,
|
|
139
|
+
disabled: fe(y, N),
|
|
140
|
+
startMonth: T,
|
|
141
|
+
endMonth: R,
|
|
142
|
+
showFooter: d,
|
|
143
|
+
calendarType: v,
|
|
144
|
+
fiscalMode: S,
|
|
145
|
+
selectionMode: w,
|
|
146
|
+
fiscalMonthPattern: I,
|
|
147
|
+
fiscalYearStartMonth: L,
|
|
148
|
+
weekStartsOn: j,
|
|
149
|
+
onApply: q,
|
|
150
|
+
onCancel: D,
|
|
151
|
+
onClear: W,
|
|
138
152
|
captionLayout: "dropdown"
|
|
139
153
|
}
|
|
140
154
|
)
|
|
@@ -143,7 +157,7 @@ const te = (t, a = "MM/dd/yyyy", c) => {
|
|
|
143
157
|
] });
|
|
144
158
|
}
|
|
145
159
|
);
|
|
146
|
-
|
|
160
|
+
ue.displayName = "MultiWeekPicker";
|
|
147
161
|
export {
|
|
148
|
-
|
|
162
|
+
ue as MultiWeekPicker
|
|
149
163
|
};
|