impact-nova 2.1.0-alpha.9 → 2.2.0
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/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/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/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 +11 -3
- 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,12 +1,12 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { createComponent as
|
|
3
|
-
import { CALENDAR_DEFAULT_END_MONTH as
|
|
4
|
-
import { CalendarDayPickerView as
|
|
5
|
-
import { CalendarFooter as
|
|
6
|
-
import { CalendarMonthPanes as
|
|
7
|
-
import { useCalendarI18n as
|
|
8
|
-
import { useCalendarState as
|
|
9
|
-
const
|
|
1
|
+
import { jsxs as ue, jsx as h } from "react/jsx-runtime";
|
|
2
|
+
import { createComponent as be } from "../../../lib/primitives/create-component.js";
|
|
3
|
+
import { CALENDAR_DEFAULT_END_MONTH as Ce, CALENDAR_DEFAULT_START_MONTH as ge, getCalendarDayLayoutAttr as pe, getCalendarMonthLayoutAttr as Le, resolveFiscalPattern as ve } from "./calendar-config.js";
|
|
4
|
+
import { CalendarDayPickerView as Ae } from "./calendar-day-picker-view.js";
|
|
5
|
+
import { CalendarFooter as Se } from "./calendar-footer.js";
|
|
6
|
+
import { CalendarMonthPanes as Me } from "./calendar-month-panes.js";
|
|
7
|
+
import { useCalendarI18n as Pe } from "./use-calendar-i18n.js";
|
|
8
|
+
import { useCalendarState as fe } from "./use-calendar-state.js";
|
|
9
|
+
const Re = be(
|
|
10
10
|
"Calendar",
|
|
11
11
|
({
|
|
12
12
|
className: P,
|
|
@@ -17,99 +17,101 @@ const xe = me(
|
|
|
17
17
|
formatters: y,
|
|
18
18
|
components: N,
|
|
19
19
|
showFooter: l = !0,
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
20
|
+
footerFlashKey: F = 0,
|
|
21
|
+
footerFlashTarget: x,
|
|
22
|
+
disableApply: E = !1,
|
|
23
|
+
onApply: R,
|
|
24
|
+
onCancel: W,
|
|
25
|
+
onClear: _,
|
|
24
26
|
mode: d = "single",
|
|
25
27
|
selected: m,
|
|
26
|
-
onSelect:
|
|
28
|
+
onSelect: I,
|
|
27
29
|
pickerType: n = "date",
|
|
28
30
|
weekMode: r = "single",
|
|
29
|
-
selectedWeeks:
|
|
30
|
-
onWeekSelect:
|
|
31
|
+
selectedWeeks: j,
|
|
32
|
+
onWeekSelect: w,
|
|
31
33
|
calendarType: t = "calendar",
|
|
32
34
|
fiscalMode: u = "basic",
|
|
33
35
|
selectionMode: b = "week",
|
|
34
|
-
fiscalMonthPattern:
|
|
35
|
-
fiscalYearStartMonth:
|
|
36
|
+
fiscalMonthPattern: H,
|
|
37
|
+
fiscalYearStartMonth: O = 1,
|
|
36
38
|
weekStartsOn: C = 1,
|
|
37
39
|
monthMode: o = "single",
|
|
38
40
|
selectedMonths: g,
|
|
39
|
-
onMonthSelect:
|
|
40
|
-
month:
|
|
41
|
-
defaultMonth:
|
|
42
|
-
onMonthChange:
|
|
43
|
-
startMonth:
|
|
44
|
-
endMonth:
|
|
41
|
+
onMonthSelect: U,
|
|
42
|
+
month: V,
|
|
43
|
+
defaultMonth: q,
|
|
44
|
+
onMonthChange: z,
|
|
45
|
+
startMonth: B,
|
|
46
|
+
endMonth: G,
|
|
45
47
|
...c
|
|
46
|
-
},
|
|
47
|
-
const { t: e, intlLocale:
|
|
48
|
+
}, J) => {
|
|
49
|
+
const { t: e, intlLocale: K, dateFnsLocale: Q, monthsFull: X, monthsShort: Z } = Pe(), p = ve({
|
|
48
50
|
calendarType: t,
|
|
49
51
|
fiscalMode: u,
|
|
50
|
-
fiscalMonthPattern:
|
|
51
|
-
}), s =
|
|
52
|
+
fiscalMonthPattern: H
|
|
53
|
+
}), s = B ?? ge, i = G ?? Ce, {
|
|
52
54
|
pendingSelection: L,
|
|
53
55
|
currentMonth: v,
|
|
54
|
-
pendingWeekSelection:
|
|
56
|
+
pendingWeekSelection: $,
|
|
55
57
|
pendingMonthSelection: A,
|
|
56
|
-
monthPickerYear:
|
|
58
|
+
monthPickerYear: T,
|
|
57
59
|
handleMonthChangeInternal: S,
|
|
58
|
-
resolveWeekFromInput:
|
|
59
|
-
handleWeekClick:
|
|
60
|
-
handleMonthClick:
|
|
60
|
+
resolveWeekFromInput: ee,
|
|
61
|
+
handleWeekClick: ae,
|
|
62
|
+
handleMonthClick: ne,
|
|
61
63
|
availableYears: M,
|
|
62
|
-
selectedDaysFromWeeks:
|
|
63
|
-
weekRangeModifiers:
|
|
64
|
-
handleInternalSelect:
|
|
65
|
-
handleApply:
|
|
66
|
-
handleCancel:
|
|
67
|
-
handleClear:
|
|
68
|
-
isMonthSelected:
|
|
69
|
-
getMonthRangeProps:
|
|
70
|
-
isMonthDisabled:
|
|
71
|
-
isApplyDisabledInternal:
|
|
72
|
-
} =
|
|
64
|
+
selectedDaysFromWeeks: le,
|
|
65
|
+
weekRangeModifiers: re,
|
|
66
|
+
handleInternalSelect: te,
|
|
67
|
+
handleApply: oe,
|
|
68
|
+
handleCancel: de,
|
|
69
|
+
handleClear: ce,
|
|
70
|
+
isMonthSelected: se,
|
|
71
|
+
getMonthRangeProps: ie,
|
|
72
|
+
isMonthDisabled: he,
|
|
73
|
+
isApplyDisabledInternal: me
|
|
74
|
+
} = fe({
|
|
73
75
|
showFooter: l,
|
|
74
76
|
selected: m,
|
|
75
|
-
onSelect:
|
|
77
|
+
onSelect: I,
|
|
76
78
|
pickerType: n,
|
|
77
79
|
weekMode: r,
|
|
78
|
-
selectedWeeks:
|
|
79
|
-
onWeekSelect:
|
|
80
|
+
selectedWeeks: j,
|
|
81
|
+
onWeekSelect: w,
|
|
80
82
|
calendarType: t,
|
|
81
83
|
fiscalMode: u,
|
|
82
84
|
selectionMode: b,
|
|
83
85
|
resolvedFiscalPattern: p,
|
|
84
|
-
fiscalYearStartMonth:
|
|
86
|
+
fiscalYearStartMonth: O,
|
|
85
87
|
weekStartsOn: C,
|
|
86
88
|
monthMode: o,
|
|
87
89
|
selectedMonths: g,
|
|
88
|
-
onMonthSelect:
|
|
89
|
-
month:
|
|
90
|
-
defaultMonth:
|
|
91
|
-
onMonthChange:
|
|
90
|
+
onMonthSelect: U,
|
|
91
|
+
month: V,
|
|
92
|
+
defaultMonth: q,
|
|
93
|
+
onMonthChange: z,
|
|
92
94
|
resolvedStartMonth: s,
|
|
93
95
|
resolvedEndMonth: i,
|
|
94
96
|
disabled: c.disabled,
|
|
95
|
-
onApply:
|
|
96
|
-
onCancel:
|
|
97
|
-
onClear:
|
|
97
|
+
onApply: R,
|
|
98
|
+
onCancel: W,
|
|
99
|
+
onClear: _
|
|
98
100
|
});
|
|
99
|
-
return /* @__PURE__ */
|
|
101
|
+
return /* @__PURE__ */ ue(
|
|
100
102
|
"div",
|
|
101
103
|
{
|
|
102
|
-
ref:
|
|
104
|
+
ref: J,
|
|
103
105
|
"data-component": "calendar",
|
|
104
|
-
"data-month-layout":
|
|
105
|
-
"data-day-layout":
|
|
106
|
+
"data-month-layout": Le(n, o),
|
|
107
|
+
"data-day-layout": pe(n, d, r),
|
|
106
108
|
children: [
|
|
107
109
|
n === "month" ? /* @__PURE__ */ h(
|
|
108
|
-
|
|
110
|
+
Me,
|
|
109
111
|
{
|
|
110
112
|
monthMode: o,
|
|
111
|
-
monthPickerYear:
|
|
112
|
-
monthsShort:
|
|
113
|
+
monthPickerYear: T,
|
|
114
|
+
monthsShort: Z,
|
|
113
115
|
showFooter: l,
|
|
114
116
|
pendingMonthSelection: A,
|
|
115
117
|
selectedMonths: g,
|
|
@@ -119,14 +121,14 @@ const xe = me(
|
|
|
119
121
|
previousYearLabel: e("calendar.previousYear"),
|
|
120
122
|
nextYearLabel: e("calendar.nextYear"),
|
|
121
123
|
currentMonth: v,
|
|
122
|
-
isMonthSelected:
|
|
123
|
-
getMonthRangeProps:
|
|
124
|
-
isMonthDisabled:
|
|
124
|
+
isMonthSelected: se,
|
|
125
|
+
getMonthRangeProps: ie,
|
|
126
|
+
isMonthDisabled: he,
|
|
125
127
|
onMonthChange: S,
|
|
126
|
-
onMonthClick:
|
|
128
|
+
onMonthClick: ne
|
|
127
129
|
}
|
|
128
130
|
) : /* @__PURE__ */ h(
|
|
129
|
-
|
|
131
|
+
Ae,
|
|
130
132
|
{
|
|
131
133
|
className: P,
|
|
132
134
|
pickerType: n,
|
|
@@ -143,18 +145,18 @@ const xe = me(
|
|
|
143
145
|
selected: m,
|
|
144
146
|
showFooter: l,
|
|
145
147
|
pendingSelection: L,
|
|
146
|
-
selectedDaysFromWeeks:
|
|
148
|
+
selectedDaysFromWeeks: le,
|
|
147
149
|
currentMonth: v,
|
|
148
|
-
monthsFull:
|
|
150
|
+
monthsFull: X,
|
|
149
151
|
resolvedStartMonth: s,
|
|
150
152
|
resolvedEndMonth: i,
|
|
151
153
|
availableYears: M,
|
|
152
|
-
dateFnsLocale:
|
|
153
|
-
intlLocale:
|
|
154
|
-
weekRangeModifiers:
|
|
155
|
-
onSelect:
|
|
154
|
+
dateFnsLocale: Q,
|
|
155
|
+
intlLocale: K,
|
|
156
|
+
weekRangeModifiers: re,
|
|
157
|
+
onSelect: te,
|
|
156
158
|
onMonthChange: S,
|
|
157
|
-
onWeekSelect: (a) =>
|
|
159
|
+
onWeekSelect: (a) => ae(ee(a)),
|
|
158
160
|
previousMonthLabel: e("calendar.previousMonth"),
|
|
159
161
|
nextMonthLabel: e("calendar.nextMonth"),
|
|
160
162
|
monthPlaceholder: e("calendar.monthPlaceholder"),
|
|
@@ -167,7 +169,7 @@ const xe = me(
|
|
|
167
169
|
}
|
|
168
170
|
),
|
|
169
171
|
l ? /* @__PURE__ */ h(
|
|
170
|
-
|
|
172
|
+
Se,
|
|
171
173
|
{
|
|
172
174
|
pickerType: n,
|
|
173
175
|
mode: d,
|
|
@@ -177,10 +179,12 @@ const xe = me(
|
|
|
177
179
|
selectionMode: b,
|
|
178
180
|
resolvedFiscalPattern: p,
|
|
179
181
|
pendingSelection: L,
|
|
180
|
-
pendingWeekSelection:
|
|
182
|
+
pendingWeekSelection: $,
|
|
181
183
|
pendingMonthSelection: A,
|
|
182
|
-
disableApply:
|
|
183
|
-
isApplyDisabled:
|
|
184
|
+
disableApply: E,
|
|
185
|
+
isApplyDisabled: me,
|
|
186
|
+
footerFlashKey: F,
|
|
187
|
+
footerFlashTarget: x,
|
|
184
188
|
labels: {
|
|
185
189
|
clear: e("calendar.clear"),
|
|
186
190
|
cancel: e("calendar.cancel"),
|
|
@@ -189,9 +193,9 @@ const xe = me(
|
|
|
189
193
|
monthSingle: e("calendar.monthRange"),
|
|
190
194
|
monthPlural: (a) => e("calendar.monthRangePlural", { count: a })
|
|
191
195
|
},
|
|
192
|
-
onClear:
|
|
193
|
-
onCancel:
|
|
194
|
-
onApply:
|
|
196
|
+
onClear: ce,
|
|
197
|
+
onCancel: de,
|
|
198
|
+
onApply: oe
|
|
195
199
|
}
|
|
196
200
|
) : null
|
|
197
201
|
]
|
|
@@ -200,5 +204,5 @@ const xe = me(
|
|
|
200
204
|
}
|
|
201
205
|
);
|
|
202
206
|
export {
|
|
203
|
-
|
|
207
|
+
Re as Calendar
|
|
204
208
|
};
|
|
@@ -30,6 +30,8 @@ export type CalendarApplyValue = Date | Date[] | DateRange | WeekSelection | Wee
|
|
|
30
30
|
export interface CalendarProps extends Omit<React.ComponentProps<typeof DayPicker>, "mode" | "selected" | "onSelect"> {
|
|
31
31
|
buttonVariant?: React.ComponentProps<typeof Button>["variant"];
|
|
32
32
|
showFooter?: boolean;
|
|
33
|
+
footerFlashKey?: number;
|
|
34
|
+
footerFlashTarget?: import('./calendar-footer-emphasis').FooterFlashTarget;
|
|
33
35
|
disableApply?: boolean;
|
|
34
36
|
onApply?: (value: CalendarApplyValue) => void;
|
|
35
37
|
onCancel?: () => void;
|
|
@@ -3,6 +3,7 @@ import { FiscalMode, FiscalMonthPattern } from '../../../lib/fiscal-calendar';
|
|
|
3
3
|
import { CalendarApplyValue, MonthRange, MonthSelection, WeekRange, WeekSelection } from './calendar.types';
|
|
4
4
|
export interface UseCalendarStateOptions {
|
|
5
5
|
showFooter: boolean;
|
|
6
|
+
mode: "single" | "multiple" | "range";
|
|
6
7
|
selected?: Date | Date[] | DateRange;
|
|
7
8
|
onSelect?: (date: Date | Date[] | DateRange | undefined) => void;
|
|
8
9
|
pickerType: "date" | "week" | "month";
|
|
@@ -27,6 +28,8 @@ export interface UseCalendarStateOptions {
|
|
|
27
28
|
onApply?: (value: CalendarApplyValue) => void;
|
|
28
29
|
onCancel?: () => void;
|
|
29
30
|
onClear?: () => void;
|
|
31
|
+
footerFlashKey?: number;
|
|
32
|
+
footerFlashTarget?: import('./calendar-footer-emphasis').FooterFlashTarget;
|
|
30
33
|
}
|
|
31
34
|
export declare function useCalendarState({ showFooter, selected, onSelect, pickerType, weekMode, selectedWeeks, onWeekSelect, calendarType, fiscalMode, selectionMode, resolvedFiscalPattern, fiscalYearStartMonth, weekStartsOn, monthMode, selectedMonths, onMonthSelect, month, defaultMonth, onMonthChange, resolvedStartMonth, resolvedEndMonth, disabled, onApply, onCancel, onClear, }: UseCalendarStateOptions): {
|
|
32
35
|
pendingSelection: Date | DateRange | Date[] | undefined;
|
|
@@ -1,12 +1,13 @@
|
|
|
1
|
-
import { jsx as e, jsxs as i, Fragment as
|
|
2
|
-
import { ListFilter as
|
|
1
|
+
import { jsx as e, jsxs as i, Fragment as B } from "react/jsx-runtime";
|
|
2
|
+
import { ListFilter as L } from "impact-nova-icons";
|
|
3
3
|
import { cn as l } from "../../../lib/utils.js";
|
|
4
|
-
import { Button as
|
|
4
|
+
import { Button as T } from "../../primitives/button/button.js";
|
|
5
|
+
import { ButtonIconTooltip as A } from "../../feedback/tooltip/button-icon-tooltip.js";
|
|
5
6
|
import { Skeleton as t } from "../../data-display/skeleton/skeleton.js";
|
|
6
7
|
import { useImpactNovaI18n as C } from "../../../i18n/use-impact-nova-i18n.js";
|
|
7
|
-
import { FilterSummary as
|
|
8
|
-
import { FilterTagList as
|
|
9
|
-
const
|
|
8
|
+
import { FilterSummary as M } from "./filter-summary.js";
|
|
9
|
+
import { FilterTagList as q } from "./filter-tag-list.js";
|
|
10
|
+
const Q = ({
|
|
10
11
|
filters: s,
|
|
11
12
|
onFilterRemove: n,
|
|
12
13
|
onAllFiltersClick: m,
|
|
@@ -14,8 +15,8 @@ const O = ({
|
|
|
14
15
|
recentFilters: c,
|
|
15
16
|
onApplySavedFilter: p,
|
|
16
17
|
onSavedFilterSearch: h,
|
|
17
|
-
onSavedFiltersScroll:
|
|
18
|
-
onViewAll:
|
|
18
|
+
onSavedFiltersScroll: f,
|
|
19
|
+
onViewAll: d,
|
|
19
20
|
onOverflowClick: w,
|
|
20
21
|
selectedFilter: x,
|
|
21
22
|
onSelectedFilterChange: N,
|
|
@@ -28,8 +29,8 @@ const O = ({
|
|
|
28
29
|
className: a,
|
|
29
30
|
allFiltersKeybinding: S,
|
|
30
31
|
allFiltersShortcutId: y,
|
|
31
|
-
showAllFiltersButton:
|
|
32
|
-
showSavedFilters:
|
|
32
|
+
showAllFiltersButton: I = !0,
|
|
33
|
+
showSavedFilters: j = !0
|
|
33
34
|
}) => {
|
|
34
35
|
const { t: r } = C();
|
|
35
36
|
return u ? /* @__PURE__ */ e(
|
|
@@ -73,9 +74,9 @@ const O = ({
|
|
|
73
74
|
a
|
|
74
75
|
),
|
|
75
76
|
children: [
|
|
76
|
-
|
|
77
|
+
j && /* @__PURE__ */ i(B, { children: [
|
|
77
78
|
/* @__PURE__ */ e(
|
|
78
|
-
|
|
79
|
+
M,
|
|
79
80
|
{
|
|
80
81
|
selectedFilter: x,
|
|
81
82
|
onSelectedFilterChange: N,
|
|
@@ -83,7 +84,7 @@ const O = ({
|
|
|
83
84
|
recentFilters: c,
|
|
84
85
|
onApplySavedFilter: p,
|
|
85
86
|
onSavedFilterSearch: h,
|
|
86
|
-
onSavedFiltersScroll:
|
|
87
|
+
onSavedFiltersScroll: f,
|
|
87
88
|
onDropdownOpenChange: v,
|
|
88
89
|
isLoadingFilterPreferencesList: g,
|
|
89
90
|
onEditSavedFilter: k,
|
|
@@ -94,28 +95,34 @@ const O = ({
|
|
|
94
95
|
/* @__PURE__ */ e("div", { className: "h-4 w-[1px] bg-stroke-hairline mx-1 shrink-0" })
|
|
95
96
|
] }),
|
|
96
97
|
/* @__PURE__ */ e(
|
|
97
|
-
|
|
98
|
+
q,
|
|
98
99
|
{
|
|
99
100
|
filters: s,
|
|
100
101
|
onFilterRemove: n,
|
|
101
102
|
onOverflowClick: w,
|
|
102
|
-
onViewAll:
|
|
103
|
+
onViewAll: d
|
|
103
104
|
}
|
|
104
105
|
),
|
|
105
|
-
|
|
106
|
-
|
|
106
|
+
I && /* @__PURE__ */ e(
|
|
107
|
+
A,
|
|
107
108
|
{
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
109
|
+
label: r("filterStrip.allFilters"),
|
|
110
|
+
side: "bottom",
|
|
111
|
+
keybinding: S,
|
|
112
|
+
children: /* @__PURE__ */ i(
|
|
113
|
+
T,
|
|
114
|
+
{
|
|
115
|
+
variant: "tertiary",
|
|
116
|
+
onClick: m,
|
|
117
|
+
"data-component": "filter-strip-all-filters",
|
|
118
|
+
"aria-label": r("filterStrip.allFilters"),
|
|
119
|
+
"data-shortcut-id": y,
|
|
120
|
+
children: [
|
|
121
|
+
/* @__PURE__ */ e(L, { className: "h-4 w-4" }),
|
|
122
|
+
r("filterStrip.allFilters")
|
|
123
|
+
]
|
|
124
|
+
}
|
|
125
|
+
)
|
|
119
126
|
}
|
|
120
127
|
)
|
|
121
128
|
]
|
|
@@ -123,5 +130,5 @@ const O = ({
|
|
|
123
130
|
);
|
|
124
131
|
};
|
|
125
132
|
export {
|
|
126
|
-
|
|
133
|
+
Q as FilterStrip
|
|
127
134
|
};
|
|
@@ -262,8 +262,8 @@ const Ie = ({
|
|
|
262
262
|
{
|
|
263
263
|
color: "primary",
|
|
264
264
|
variant: "outline",
|
|
265
|
-
className: "font-['Manrope'] max-w-[140px]
|
|
266
|
-
children:
|
|
265
|
+
className: "font-['Manrope'] max-w-[140px]",
|
|
266
|
+
children: u || n("filterStrip.notSelected")
|
|
267
267
|
}
|
|
268
268
|
) }),
|
|
269
269
|
/* @__PURE__ */ e(m, { variant: "tertiary", side: "top", children: u || n("filterStrip.notSelected") })
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
import { Locale } from 'date-fns';
|
|
2
|
+
import { RefObject } from 'react';
|
|
3
|
+
import { FooterFlashTarget } from '../../data-display/calendar/calendar-footer-emphasis';
|
|
4
|
+
import * as React from "react";
|
|
5
|
+
export interface DateInputParseResult {
|
|
6
|
+
padded: string;
|
|
7
|
+
parsed: Date | undefined;
|
|
8
|
+
isComplete: boolean;
|
|
9
|
+
isValid: boolean;
|
|
10
|
+
}
|
|
11
|
+
export declare function maskDateInput(rawValue: string, format: string, previousValue: string): string;
|
|
12
|
+
export declare function parseDateInput(value: string, format: string, locale?: Locale): DateInputParseResult;
|
|
13
|
+
/** True when the field has a full-length value that does not parse. */
|
|
14
|
+
export declare function isDateInputInvalid(value: string, format: string, locale?: Locale): boolean;
|
|
15
|
+
export interface BlurDateInputResult {
|
|
16
|
+
display: string;
|
|
17
|
+
parsed: Date | undefined;
|
|
18
|
+
resetToCommitted: boolean;
|
|
19
|
+
}
|
|
20
|
+
export declare function isFocusInsidePicker(container: RefObject<HTMLElement | null>, popoverContent: RefObject<HTMLElement | null>): boolean;
|
|
21
|
+
export declare function createRangePickerOpenChangeHandler(options: {
|
|
22
|
+
disabled?: boolean;
|
|
23
|
+
showFooter?: boolean;
|
|
24
|
+
containerRef: RefObject<HTMLElement | null>;
|
|
25
|
+
popoverContentRef: RefObject<HTMLElement | null>;
|
|
26
|
+
setOpen: (open: boolean) => void;
|
|
27
|
+
}): (newOpen: boolean) => void;
|
|
28
|
+
/** True when the outside-dismiss event originated on the picker field chrome (not a real outside click). */
|
|
29
|
+
export declare function isEventOnPickerSurface(event: Event, surfaceRef: RefObject<HTMLElement | null>): boolean;
|
|
30
|
+
/** Block Radix outside-dismiss when the calendar footer requires explicit Apply/Cancel. */
|
|
31
|
+
export declare function preventOutsideDismissWhenFooter(showFooter: boolean, dismissActionsRef?: RefObject<{
|
|
32
|
+
onDismiss: () => void;
|
|
33
|
+
resolveFlash: () => FooterFlashTarget;
|
|
34
|
+
}>, triggerOutsideFlash?: (target: FooterFlashTarget) => void, surfaceRef?: RefObject<HTMLElement | null>): {
|
|
35
|
+
onInteractOutside?: (event: Event) => void;
|
|
36
|
+
onPointerDownOutside?: (event: Event) => void;
|
|
37
|
+
onEscapeKeyDown?: (event: KeyboardEvent) => void;
|
|
38
|
+
};
|
|
39
|
+
export type { FooterFlashTarget } from '../../data-display/calendar/calendar-footer-emphasis';
|
|
40
|
+
export declare function resolveRangePickerDismissFlash<TFrom, TTo>(params: {
|
|
41
|
+
startInput: string;
|
|
42
|
+
endInput: string;
|
|
43
|
+
committedStart: string;
|
|
44
|
+
committedEnd: string;
|
|
45
|
+
committedRange: {
|
|
46
|
+
from?: TFrom;
|
|
47
|
+
to?: TTo;
|
|
48
|
+
} | undefined;
|
|
49
|
+
computeEffectiveRange: () => {
|
|
50
|
+
from?: TFrom;
|
|
51
|
+
to?: TTo;
|
|
52
|
+
} | undefined;
|
|
53
|
+
rangesEqual: (a: {
|
|
54
|
+
from?: TFrom;
|
|
55
|
+
to?: TTo;
|
|
56
|
+
} | undefined, b: {
|
|
57
|
+
from?: TFrom;
|
|
58
|
+
to?: TTo;
|
|
59
|
+
} | undefined) => boolean;
|
|
60
|
+
}): FooterFlashTarget;
|
|
61
|
+
export declare function usePickerDismissActionsRef(): React.RefObject<{
|
|
62
|
+
onDismiss: () => void;
|
|
63
|
+
resolveFlash: () => FooterFlashTarget;
|
|
64
|
+
}>;
|
|
65
|
+
export declare function usePickerFooterDismissNudge(showFooter: boolean, open: boolean, dismissActionsRef: React.RefObject<{
|
|
66
|
+
onDismiss: () => void;
|
|
67
|
+
resolveFlash: () => FooterFlashTarget;
|
|
68
|
+
}>, surfaceRef?: RefObject<HTMLElement | null>): {
|
|
69
|
+
footerFlashKey: number;
|
|
70
|
+
footerFlashTarget: FooterFlashTarget | undefined;
|
|
71
|
+
triggerFooterFlash: (target: FooterFlashTarget) => void;
|
|
72
|
+
popoverHandlers: {
|
|
73
|
+
onInteractOutside?: (event: Event) => void;
|
|
74
|
+
onPointerDownOutside?: (event: Event) => void;
|
|
75
|
+
onEscapeKeyDown?: (event: KeyboardEvent) => void;
|
|
76
|
+
};
|
|
77
|
+
};
|
|
78
|
+
export declare function deferRangeInputBlur(containerRef: RefObject<HTMLElement | null>, popoverContentRef: RefObject<HTMLElement | null>, callback: () => void): void;
|
|
79
|
+
/**
|
|
80
|
+
* Normalize typed input on blur when the popover is closed.
|
|
81
|
+
* Pads partial dates, reverts invalid complete input, preserves in-progress typing.
|
|
82
|
+
*/
|
|
83
|
+
export declare function resolveDateInputOnBlur(value: string, format: string, committedDisplay: string, locale?: Locale): BlurDateInputResult;
|
|
84
|
+
export interface RangeFieldBlurState {
|
|
85
|
+
display: string;
|
|
86
|
+
parsed: Date | undefined;
|
|
87
|
+
resetToCommitted: boolean;
|
|
88
|
+
isPartial: boolean;
|
|
89
|
+
}
|
|
90
|
+
export declare function resolveRangeFieldBlur(value: string, format: string, committedDisplay: string, locale?: Locale): RangeFieldBlurState;
|
|
91
|
+
export interface EnterDateInputResult {
|
|
92
|
+
parsed: Date | undefined;
|
|
93
|
+
shouldOpenPopover: boolean;
|
|
94
|
+
}
|
|
95
|
+
/**
|
|
96
|
+
* Enter commits a complete valid date when closed; otherwise opens the popover.
|
|
97
|
+
*/
|
|
98
|
+
export declare function resolveDateInputOnEnter(value: string, format: string, locale?: Locale): EnterDateInputResult;
|
|
99
|
+
export interface OrderedRangeResult<T> {
|
|
100
|
+
from: T | undefined;
|
|
101
|
+
to: T | undefined;
|
|
102
|
+
swapped: boolean;
|
|
103
|
+
}
|
|
104
|
+
/** Chronological order — swap only when both ends exist and from > to. */
|
|
105
|
+
export declare function normalizeOrderedRange<T>(from: T | undefined, to: T | undefined, compare: (a: T, b: T) => number): OrderedRangeResult<T>;
|
|
106
|
+
export declare function compareMonthSelection(a: {
|
|
107
|
+
month: number;
|
|
108
|
+
year: number;
|
|
109
|
+
}, b: {
|
|
110
|
+
month: number;
|
|
111
|
+
year: number;
|
|
112
|
+
}): number;
|
|
113
|
+
export declare function compareDates(a: Date, b: Date): number;
|
|
114
|
+
/**
|
|
115
|
+
* Brief cross-nudge when a range was reordered. Web Animations API — no extra DOM/state.
|
|
116
|
+
* Skipped when prefers-reduced-motion is set.
|
|
117
|
+
*/
|
|
118
|
+
export declare function flashRangeReorder(container: HTMLElement | null): void;
|