impact-ui 4.0.1-alpha.4 → 4.0.1-alpha.6
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/App.d.ts +3 -0
- package/dist/App.d.ts.map +1 -0
- package/dist/_virtual/_commonjsHelpers.js +1 -1
- package/dist/_virtual/index2.js +2 -2
- package/dist/_virtual/index3.js +2 -2
- package/dist/_virtual/index4.js +4 -2
- package/dist/_virtual/index5.js +3 -3
- package/dist/_virtual/index6.js +2 -4
- package/dist/components/DateRangePicker/dateRangePickerCustom.d.ts +1 -5
- package/dist/components/DateRangePicker/dateRangePickerCustom.d.ts.map +1 -1
- package/dist/components/DateRangePicker/dateRangePickerCustom.js +2 -2
- package/dist/components/DateRangePicker/dateRangePickerDropdown.d.ts +1 -44
- package/dist/components/DateRangePicker/dateRangePickerDropdown.d.ts.map +1 -1
- package/dist/components/DateRangePicker/dateRangePickerDropdown.js +219 -162
- package/dist/components/DateRangePicker/dateRangePickerFooter.d.ts +1 -11
- package/dist/components/DateRangePicker/dateRangePickerFooter.d.ts.map +1 -1
- package/dist/components/DateRangePicker/dateRangePickerFooter.js +7 -6
- package/dist/components/DateRangePicker/dateRangePickerInput.d.ts +1 -30
- package/dist/components/DateRangePicker/dateRangePickerInput.d.ts.map +1 -1
- package/dist/components/DateRangePicker/dateRangePickerInput.js +240 -186
- package/dist/components/DateRangePicker/index.d.ts +2 -6
- package/dist/components/DateRangePicker/index.d.ts.map +1 -1
- package/dist/components/DateRangePicker/index.js +233 -227
- package/dist/components/DateRangePicker/showMonthYearSelect.d.ts +1 -12
- package/dist/components/DateRangePicker/showMonthYearSelect.d.ts.map +1 -1
- package/dist/components/DateRangePicker/showMonthYearSelect.js +46 -55
- package/dist/components/DateRangePicker/utils.d.ts +13 -39
- package/dist/components/DateRangePicker/utils.d.ts.map +1 -1
- package/dist/components/DateRangePicker/utils.js +26 -27
- package/dist/components/Select/index.js +1 -1
- package/dist/components/Table/AgGridHeader.js +0 -2
- package/dist/components/Table/NewAdvanceSearchModal/NewAdvanceSearchModal.d.ts.map +1 -1
- package/dist/components/Table/NewAdvanceSearchModal/NewAdvanceSearchModal.js +5 -1
- package/dist/components/Table/NewAdvanceSearchModal/NewAdvanceSearchModalItem.d.ts.map +1 -1
- package/dist/components/Table/NewAdvanceSearchModal/NewAdvanceSearchModalItem.js +3 -0
- package/dist/components/Table/index.d.ts +1 -2
- package/dist/components/Table/index.d.ts.map +1 -1
- package/dist/components/Table/index.js +153 -111
- package/dist/components/TableOld/AgGridHeader.js +0 -1
- package/dist/components/TableOld/index.js +1 -1
- package/dist/mcp-component-registry.json +1 -1
- package/dist/node_modules/@mui/system/colorManipulator.js +2 -2
- package/dist/node_modules/global-cache/index.js +4 -5
- package/dist/node_modules/is-callable/index.js +1 -1
- package/dist/node_modules/lodash/lodash.js +1 -1
- package/dist/node_modules/object-inspect/index.js +1 -2
- package/dist/node_modules/prop-types/index.js +1 -1
- package/dist/node_modules/prop-types/node_modules/react-is/index.js +1 -1
- package/dist/node_modules/react-is/index.js +1 -1
- package/package.json +1 -1
package/dist/App.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"App.d.ts","sourceRoot":"","sources":["../src/App.tsx"],"names":[],"mappings":"AAmQA,QAAA,MAAM,GAAG,+CA0IR,CAAC;AAEF,eAAe,GAAG,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var commonjsGlobal = typeof globalThis !== "undefined" ? globalThis : typeof window !== "undefined" ? window : typeof
|
|
1
|
+
var commonjsGlobal = typeof globalThis !== "undefined" ? globalThis : typeof window !== "undefined" ? window : typeof globalThis !== "undefined" ? globalThis : typeof self !== "undefined" ? self : {};
|
|
2
2
|
function getDefaultExportFromCjs(x) {
|
|
3
3
|
return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, "default") ? x["default"] : x;
|
|
4
4
|
}
|
package/dist/_virtual/index2.js
CHANGED
package/dist/_virtual/index3.js
CHANGED
package/dist/_virtual/index4.js
CHANGED
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
|
|
1
|
+
import { getAugmentedNamespace } from "./_commonjsHelpers.js";
|
|
2
|
+
import * as index from "../node_modules/@mui/system/node_modules/@mui/utils/esm/formatMuiErrorMessage/index.js";
|
|
3
|
+
const require$$1 = /* @__PURE__ */ getAugmentedNamespace(index);
|
|
2
4
|
export {
|
|
3
|
-
|
|
5
|
+
require$$1 as default
|
|
4
6
|
};
|
package/dist/_virtual/index5.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { getAugmentedNamespace } from "./_commonjsHelpers.js";
|
|
2
|
-
import * as index from "../node_modules/@mui/system/node_modules/@mui/utils/esm/
|
|
3
|
-
const require$$
|
|
2
|
+
import * as index from "../node_modules/@mui/system/node_modules/@mui/utils/esm/clamp/index.js";
|
|
3
|
+
const require$$2 = /* @__PURE__ */ getAugmentedNamespace(index);
|
|
4
4
|
export {
|
|
5
|
-
require$$
|
|
5
|
+
require$$2 as default
|
|
6
6
|
};
|
package/dist/_virtual/index6.js
CHANGED
|
@@ -1,6 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
import * as index from "../node_modules/@mui/system/node_modules/@mui/utils/esm/clamp/index.js";
|
|
3
|
-
const require$$2 = /* @__PURE__ */ getAugmentedNamespace(index);
|
|
1
|
+
var reactIs = { exports: {} };
|
|
4
2
|
export {
|
|
5
|
-
|
|
3
|
+
reactIs as __module
|
|
6
4
|
};
|
|
@@ -1,6 +1,2 @@
|
|
|
1
|
-
export
|
|
2
|
-
handleRangeSelectorChange: (event: React.ChangeEvent<HTMLInputElement>) => void;
|
|
3
|
-
selectedRange: string;
|
|
4
|
-
}
|
|
5
|
-
export declare function DateRangePickerCustom({ handleRangeSelectorChange, selectedRange, }: DateRangePickerCustomProps): import("react/jsx-runtime").JSX.Element;
|
|
1
|
+
export declare function DateRangePickerCustom({ handleRangeSelectorChange, selectedRange, }: any): import("react/jsx-runtime").JSX.Element;
|
|
6
2
|
//# sourceMappingURL=dateRangePickerCustom.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dateRangePickerCustom.d.ts","sourceRoot":"","sources":["../../../src/components/DateRangePicker/dateRangePickerCustom.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"dateRangePickerCustom.d.ts","sourceRoot":"","sources":["../../../src/components/DateRangePicker/dateRangePickerCustom.tsx"],"names":[],"mappings":"AAKA,wBAAgB,qBAAqB,CAAC,EACpC,yBAAyB,EACzB,aAAa,GACd,EAAE,GAAG,2CAcL"}
|
|
@@ -12,8 +12,8 @@ function DateRangePickerCustom({
|
|
|
12
12
|
{
|
|
13
13
|
className: "dateRangePicker-shortcut-list-item",
|
|
14
14
|
options: rangeSelectorTypes,
|
|
15
|
-
|
|
16
|
-
|
|
15
|
+
onChange: handleRangeSelectorChange,
|
|
16
|
+
value: selectedRange
|
|
17
17
|
}
|
|
18
18
|
) })
|
|
19
19
|
] });
|
|
@@ -1,45 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
export interface DateRangePickerDropdownProps {
|
|
4
|
-
dropDownContainerRef: React.RefObject<HTMLDivElement | null>;
|
|
5
|
-
withPortal?: boolean;
|
|
6
|
-
portalContainer?: HTMLElement;
|
|
7
|
-
containerRef: React.RefObject<HTMLDivElement | null>;
|
|
8
|
-
onDatesChange: ({ startDate, endDate, }: {
|
|
9
|
-
startDate: Moment | null;
|
|
10
|
-
endDate: Moment | null;
|
|
11
|
-
}) => void;
|
|
12
|
-
onFocusChange: (focusedInput: string | null) => void;
|
|
13
|
-
focusedInput: string | null;
|
|
14
|
-
startDate: Moment | null;
|
|
15
|
-
endDate: Moment | null;
|
|
16
|
-
showWeekNumbers?: boolean;
|
|
17
|
-
selectedRange: string;
|
|
18
|
-
selectedDaysNumber: number;
|
|
19
|
-
handleResetDates: () => void;
|
|
20
|
-
handleCancelDates: () => void;
|
|
21
|
-
onSecondaryButtonClick?: () => void;
|
|
22
|
-
tertiaryButtonProps?: Record<string, unknown>;
|
|
23
|
-
handleApplyDates: () => void;
|
|
24
|
-
primaryButtonProps?: Record<string, unknown>;
|
|
25
|
-
showRangeSelector?: boolean;
|
|
26
|
-
handleRangeSelectorChange: (event: React.ChangeEvent<HTMLInputElement>) => void;
|
|
27
|
-
showMonthYearSelect?: boolean;
|
|
28
|
-
customYears?: {
|
|
29
|
-
label: string;
|
|
30
|
-
value: string;
|
|
31
|
-
}[];
|
|
32
|
-
customWeekNumberData?: unknown;
|
|
33
|
-
suppressClickOnWeekNumber?: boolean;
|
|
34
|
-
setIsOpen: (open: boolean) => void;
|
|
35
|
-
startDateOffset?: (date: Moment) => Moment;
|
|
36
|
-
endDateOffset?: (date: Moment) => Moment;
|
|
37
|
-
hasInputErrors?: boolean;
|
|
38
|
-
portalClassName?: string;
|
|
39
|
-
minDate?: Moment | null;
|
|
40
|
-
maxDate?: Moment | null;
|
|
41
|
-
isOutsideRange?: (day: Moment) => boolean;
|
|
42
|
-
[key: string]: unknown;
|
|
43
|
-
}
|
|
44
|
-
export declare function DateRangePickerDropdown({ dropDownContainerRef, withPortal, portalContainer, containerRef, onDatesChange, onFocusChange, focusedInput, startDate, endDate, showWeekNumbers, selectedRange, selectedDaysNumber, handleResetDates, handleCancelDates, onSecondaryButtonClick, tertiaryButtonProps, handleApplyDates, primaryButtonProps, showRangeSelector, handleRangeSelectorChange, showMonthYearSelect, customYears, customWeekNumberData, suppressClickOnWeekNumber, setIsOpen, startDateOffset: startDateOffsetProp, endDateOffset: endDateOffsetProp, hasInputErrors, portalClassName, minDate, maxDate, isOutsideRange, ...calendarProps }: DateRangePickerDropdownProps): import("react/jsx-runtime").JSX.Element;
|
|
1
|
+
export declare function DateRangePickerDropdown({ dropDownContainerRef, withPortal, portalContainer, containerRef, onDatesChange, onFocusChange, focusedInput, startDate, endDate, showWeekNumbers, selectedRange, setStartDateOffset, setEndDateOffset, selectedDaysNumber, handleResetDates, handleCancelDates, onSecondaryButtonClick, tertiaryButtonProps, handleApplyDates, primaryButtonProps, showRangeSelector, handleRangeSelectorChange, showMonthYearSelect, customYears, customWeekNumberData, suppressClickOnWeekNumber, setIsOpen, startDateOffset, endDateOffset, hasInputErrors, portalClassName, ...args }: any): import("react/jsx-runtime").JSX.Element;
|
|
45
2
|
//# sourceMappingURL=dateRangePickerDropdown.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dateRangePickerDropdown.d.ts","sourceRoot":"","sources":["../../../src/components/DateRangePicker/dateRangePickerDropdown.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"dateRangePickerDropdown.d.ts","sourceRoot":"","sources":["../../../src/components/DateRangePicker/dateRangePickerDropdown.tsx"],"names":[],"mappings":"AAUA,wBAAgB,uBAAuB,CAAC,EACtC,oBAAoB,EACpB,UAAU,EACV,eAAe,EACf,YAAY,EACZ,aAAa,EACb,aAAa,EACb,YAAY,EACZ,SAAS,EACT,OAAO,EACP,eAAe,EACf,aAAa,EACb,kBAAkB,EAClB,gBAAgB,EAChB,kBAAkB,EAClB,gBAAgB,EAChB,iBAAiB,EACjB,sBAAsB,EACtB,mBAAmB,EACnB,gBAAgB,EAChB,kBAAkB,EAClB,iBAAiB,EACjB,yBAAyB,EACzB,mBAAmB,EACnB,WAAW,EACX,oBAAoB,EACpB,yBAAyB,EACzB,SAAS,EACT,eAAe,EACf,aAAa,EACb,cAAc,EACd,eAAe,EACf,GAAG,IAAI,EACR,EAAE,GAAG,2CA4TL"}
|
|
@@ -1,19 +1,16 @@
|
|
|
1
|
-
!function(){"use strict";try{if("undefined"!=typeof document){var e=document.createElement("style");e.appendChild(document.createTextNode('.PresetDateRangePicker_panel{padding:0 22px 11px}.PresetDateRangePicker_button{background:0 0;border:2px solid #00a699;-moz-box-sizing:border-box;box-sizing:border-box;color:#00a699;cursor:pointer;font:inherit;font-weight:700;height:100%;line-height:normal;margin-right:8px;overflow:visible;padding:4px 12px;position:relative;text-align:center}.PresetDateRangePicker_button:active{outline:0}.PresetDateRangePicker_button__selected{background:#00a699;color:#fff}.SingleDatePickerInput{background-color:#fff;display:inline-block}.SingleDatePickerInput__withBorder{border:1px solid #dbdbdb;border-radius:2px}.SingleDatePickerInput__rtl{direction:rtl}.SingleDatePickerInput__disabled{background-color:#f2f2f2}.SingleDatePickerInput__block{display:block}.SingleDatePickerInput__showClearDate{padding-right:30px}.SingleDatePickerInput_clearDate{background:0 0;border:0;color:inherit;cursor:pointer;font:inherit;line-height:normal;margin:0 10px 0 5px;overflow:visible;padding:10px;position:absolute;right:0;top:50%;-webkit-transform:translateY(-50%);-ms-transform:translateY(-50%);transform:translateY(-50%)}.SingleDatePickerInput_clearDate__default:focus,.SingleDatePickerInput_clearDate__default:hover{background:#dbdbdb;border-radius:50%}.SingleDatePickerInput_clearDate__small{padding:6px}.SingleDatePickerInput_clearDate__hide{visibility:hidden}.SingleDatePickerInput_clearDate_svg{fill:#82888a;height:12px;vertical-align:middle;width:15px}.SingleDatePickerInput_clearDate_svg__small{height:9px}.SingleDatePickerInput_calendarIcon{background:0 0;border:0;color:inherit;cursor:pointer;display:inline-block;font:inherit;line-height:normal;margin:0 5px 0 10px;overflow:visible;padding:10px;vertical-align:middle}.SingleDatePickerInput_calendarIcon_svg{fill:#82888a;height:15px;vertical-align:middle;width:14px}.SingleDatePicker{display:inline-block;position:relative}.SingleDatePicker__block{display:block}.SingleDatePicker_picker{background-color:#fff;position:absolute;z-index:1}.SingleDatePicker_picker__rtl{direction:rtl}.SingleDatePicker_picker__directionLeft{left:0}.SingleDatePicker_picker__directionRight{right:0}.SingleDatePicker_picker__portal{background-color:#0000004d;height:100%;left:0;position:fixed;top:0;width:100%}.SingleDatePicker_picker__fullScreenPortal{background-color:#fff}.SingleDatePicker_closeButton{background:0 0;border:0;color:inherit;cursor:pointer;font:inherit;line-height:normal;overflow:visible;padding:15px;position:absolute;right:0;top:0;z-index:2}.SingleDatePicker_closeButton:focus,.SingleDatePicker_closeButton:hover{color:darken(#cacccd,10%);text-decoration:none}.SingleDatePicker_closeButton_svg{fill:#cacccd;height:15px;width:15px}.DayPickerKeyboardShortcuts_buttonReset{background:0 0;border:0;border-radius:0;color:inherit;cursor:pointer;font:inherit;font-size:14px;line-height:normal;overflow:visible;padding:0}.DayPickerKeyboardShortcuts_buttonReset:active{outline:0}.DayPickerKeyboardShortcuts_show{height:26px;position:absolute;width:33px;z-index:2}.DayPickerKeyboardShortcuts_show:before{content:"";display:block;position:absolute}.DayPickerKeyboardShortcuts_show__bottomRight{bottom:0;right:0}.DayPickerKeyboardShortcuts_show__bottomRight:before{border-right:33px solid #00a699;border-top:26px solid #0000;bottom:0;right:0}.DayPickerKeyboardShortcuts_show__bottomRight:hover:before{border-right:33px solid #008489}.DayPickerKeyboardShortcuts_show__topRight{right:0;top:0}.DayPickerKeyboardShortcuts_show__topRight:before{border-bottom:26px solid #0000;border-right:33px solid #00a699;right:0;top:0}.DayPickerKeyboardShortcuts_show__topRight:hover:before{border-right:33px solid #008489}.DayPickerKeyboardShortcuts_show__topLeft{left:0;top:0}.DayPickerKeyboardShortcuts_show__topLeft:before{border-bottom:26px solid #0000;border-left:33px solid #00a699;left:0;top:0}.DayPickerKeyboardShortcuts_show__topLeft:hover:before{border-left:33px solid #008489}.DayPickerKeyboardShortcuts_showSpan{color:#fff;position:absolute}.DayPickerKeyboardShortcuts_showSpan__bottomRight{bottom:0;right:5px}.DayPickerKeyboardShortcuts_showSpan__topRight{right:5px;top:1px}.DayPickerKeyboardShortcuts_showSpan__topLeft{left:5px;top:1px}.DayPickerKeyboardShortcuts_panel{background:#fff;border:1px solid #dbdbdb;border-radius:2px;bottom:0;left:0;margin:33px;overflow:auto;padding:22px;position:absolute;right:0;text-align:left;top:0;z-index:2}.DayPickerKeyboardShortcuts_title{font-size:16px;font-weight:700;margin:0}.DayPickerKeyboardShortcuts_list{font-size:14px;list-style:none;padding:0}.DayPickerKeyboardShortcuts_close{position:absolute;right:22px;top:22px;z-index:2}.DayPickerKeyboardShortcuts_close:active{outline:0}.DayPickerKeyboardShortcuts_closeSvg{fill:#cacccd;height:15px;width:15px}.DayPickerKeyboardShortcuts_closeSvg:focus,.DayPickerKeyboardShortcuts_closeSvg:hover{fill:#82888a}.CalendarDay{-moz-box-sizing:border-box;box-sizing:border-box;cursor:pointer;font-size:14px;text-align:center}.CalendarDay:active{outline:0}.CalendarDay__defaultCursor{cursor:default}.CalendarDay__default{background:#fff;border:1px solid #e4e7e7;color:#484848}.CalendarDay__default:hover{background:#e4e7e7;border:1px solid #e4e7e7;color:inherit}.CalendarDay__hovered_offset{background:#f4f5f5;border:1px double #e4e7e7;color:inherit}.CalendarDay__outside{background:#fff;border:0;color:#484848}.CalendarDay__outside:hover{border:0}.CalendarDay__blocked_minimum_nights{background:#fff;border:1px solid #eceeee;color:#cacccd}.CalendarDay__blocked_minimum_nights:active,.CalendarDay__blocked_minimum_nights:hover{background:#fff;color:#cacccd}.CalendarDay__highlighted_calendar{background:#ffe8bc;color:#484848}.CalendarDay__highlighted_calendar:active,.CalendarDay__highlighted_calendar:hover{background:#ffce71;color:#484848}.CalendarDay__selected_span{background:#66e2da;border:1px double #33dacd;color:#fff}.CalendarDay__selected_span:active,.CalendarDay__selected_span:hover{background:#33dacd;border:1px double #33dacd;color:#fff}.CalendarDay__selected,.CalendarDay__selected:active,.CalendarDay__selected:hover{background:#00a699;border:1px double #00a699;color:#fff}.CalendarDay__hovered_span,.CalendarDay__hovered_span:hover{background:#b2f1ec;border:1px double #80e8e0;color:#007a87}.CalendarDay__hovered_span:active{background:#80e8e0;border:1px double #80e8e0;color:#007a87}.CalendarDay__blocked_calendar,.CalendarDay__blocked_calendar:active,.CalendarDay__blocked_calendar:hover{background:#cacccd;border:1px solid #cacccd;color:#82888a}.CalendarDay__blocked_out_of_range,.CalendarDay__blocked_out_of_range:active,.CalendarDay__blocked_out_of_range:hover{background:#fff;border:1px solid #e4e7e7;color:#cacccd}.CalendarDay__hovered_start_first_possible_end{background:#eceeee;border:1px double #eceeee}.CalendarDay__hovered_start_blocked_min_nights{background:#eceeee;border:1px double #e4e7e7}.CalendarMonth{background:#fff;text-align:center;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;vertical-align:top}.CalendarMonth_table{border-collapse:collapse;border-spacing:0}.CalendarMonth_verticalSpacing{border-collapse:initial}.CalendarMonth_caption{caption-side:top;color:#484848;font-size:18px;padding-bottom:37px;padding-top:22px;text-align:center}.CalendarMonth_caption__verticalScrollable{padding-bottom:7px;padding-top:12px}.CalendarMonthGrid{background:#fff;text-align:left;z-index:0}.CalendarMonthGrid__animating{z-index:1}.CalendarMonthGrid__horizontal{left:9px;position:absolute}.CalendarMonthGrid__vertical,.CalendarMonthGrid__vertical_scrollable{margin:0 auto}.CalendarMonthGrid_month__horizontal{display:inline-block;min-height:100%;vertical-align:top}.CalendarMonthGrid_month__hideForAnimation{opacity:0;pointer-events:none;position:absolute;z-index:-1}.CalendarMonthGrid_month__hidden{visibility:hidden}.DayPickerNavigation{position:relative;z-index:2}.DayPickerNavigation__horizontal{height:0}.DayPickerNavigation__verticalScrollable_prevNav{z-index:1}.DayPickerNavigation__verticalDefault{bottom:0;height:52px;left:0;position:absolute;width:100%}.DayPickerNavigation__verticalScrollableDefault{position:relative}.DayPickerNavigation__bottom{height:auto}.DayPickerNavigation__bottomDefault{-webkit-box-pack:justify;-ms-flex-pack:justify;display:-webkit-box;display:-moz-box;display:-ms-flexbox;display:-webkit-flex;display:flex;-webkit-justify-content:space-between;justify-content:space-between}.DayPickerNavigation_button{border:0;cursor:pointer;margin:0;padding:0;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.DayPickerNavigation_button__default{background-color:#fff;border:1px solid #e4e7e7;color:#757575}.DayPickerNavigation_button__default:focus,.DayPickerNavigation_button__default:hover{border:1px solid #c4c4c4}.DayPickerNavigation_button__default:active{background:#f2f2f2}.DayPickerNavigation_button__disabled{border:1px solid #f2f2f2;cursor:default}.DayPickerNavigation_button__disabled:focus,.DayPickerNavigation_button__disabled:hover{border:1px solid #f2f2f2}.DayPickerNavigation_button__disabled:active{background:0 0}.DayPickerNavigation_button__horizontalDefault{border-radius:3px;line-height:.78;padding:6px 9px;position:absolute;top:18px}.DayPickerNavigation_bottomButton__horizontalDefault{margin:-10px 22px 30px;position:static}.DayPickerNavigation_leftButton__horizontalDefault{left:22px}.DayPickerNavigation_rightButton__horizontalDefault{right:22px}.DayPickerNavigation_button__verticalDefault{background:#fff;box-shadow:0 0 5px 2px #0000001a;display:inline-block;height:100%;padding:5px;position:relative;text-align:center;width:50%}.DayPickerNavigation_nextButton__verticalDefault{border-left:0}.DayPickerNavigation_nextButton__verticalScrollableDefault,.DayPickerNavigation_prevButton__verticalScrollableDefault{width:100%}.DayPickerNavigation_svg__horizontal{display:block;fill:#82888a;height:19px;width:19px}.DayPickerNavigation_svg__vertical{fill:#484848;height:42px;width:42px}.DayPickerNavigation_svg__disabled{fill:#f2f2f2}.DayPicker{position:relative;text-align:left}.DayPicker,.DayPicker__horizontal{background:#fff}.DayPicker__verticalScrollable{height:100%}.DayPicker__hidden{visibility:hidden}.DayPicker__withBorder{border-radius:3px;box-shadow:0 2px 6px #0000000d,0 0 0 1px #00000012}.DayPicker_portal__horizontal{box-shadow:none;left:50%;position:absolute;top:50%}.DayPicker_portal__vertical{position:static}.DayPicker_focusRegion{outline:0}.DayPicker_calendarInfo__horizontal,.DayPicker_wrapper__horizontal{display:inline-block;vertical-align:top}.DayPicker_weekHeaders{position:relative}.DayPicker_weekHeaders__horizontal{margin-left:9px}.DayPicker_weekHeader{color:#757575;position:absolute;text-align:left;top:62px;z-index:2}.DayPicker_weekHeader__vertical{left:50%}.DayPicker_weekHeader__verticalScrollable{background:#fff;border-bottom:1px solid #dbdbdb;display:table-row;left:0;margin-left:0;text-align:center;top:0;width:100%}.DayPicker_weekHeader_ul{font-size:14px;list-style:none;margin:1px 0;padding-left:0;padding-right:0}.DayPicker_weekHeader_li{display:inline-block;text-align:center}.DayPicker_transitionContainer{border-radius:3px;overflow:hidden;position:relative}.DayPicker_transitionContainer__horizontal{-webkit-transition:height .2s ease-in-out;-moz-transition:height .2s ease-in-out;transition:height .2s ease-in-out}.DayPicker_transitionContainer__vertical{width:100%}.DayPicker_transitionContainer__verticalScrollable{bottom:0;height:100%;left:0;overflow-y:scroll;padding-top:20px;position:absolute;right:0;top:0}.DateInput{background:#fff;display:inline-block;margin:0;padding:0;position:relative;vertical-align:middle;width:130px}.DateInput__small{width:97px}.DateInput__block{width:100%}.DateInput__disabled{background:#f2f2f2;color:#dbdbdb}.DateInput_input{background-color:#fff;border:0;border-bottom:2px solid #0000;border-radius:0;color:#484848;font-size:19px;font-weight:200;line-height:24px;padding:11px 11px 9px;width:100%}.DateInput_input__small{font-size:15px;letter-spacing:.2px;line-height:18px;padding:7px 7px 5px}.DateInput_input__regular{font-weight:auto}.DateInput_input__readOnly{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.DateInput_input__focused{background:#fff;border:0;border-bottom:2px solid #008489;outline:0}.DateInput_input__disabled{background:#f2f2f2;font-style:italic}.DateInput_screenReaderMessage{border:0;clip:rect(0,0,0,0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px}.DateInput_fang{height:10px;left:22px;position:absolute;width:20px;z-index:2}.DateInput_fangShape{fill:#fff}.DateInput_fangStroke{fill:#0000;stroke:#dbdbdb}.DateRangePickerInput{background-color:#fff;display:inline-block}.DateRangePickerInput__disabled{background:#f2f2f2}.DateRangePickerInput__withBorder{border:1px solid #dbdbdb;border-radius:2px}.DateRangePickerInput__rtl{direction:rtl}.DateRangePickerInput__block{display:block}.DateRangePickerInput__showClearDates{padding-right:30px}.DateRangePickerInput_arrow{color:#484848;display:inline-block;vertical-align:middle}.DateRangePickerInput_arrow_svg{fill:#484848;height:24px;vertical-align:middle;width:24px}.DateRangePickerInput_clearDates{background:0 0;border:0;color:inherit;cursor:pointer;font:inherit;line-height:normal;margin:0 10px 0 5px;overflow:visible;padding:10px;position:absolute;right:0;top:50%;-webkit-transform:translateY(-50%);-ms-transform:translateY(-50%);transform:translateY(-50%)}.DateRangePickerInput_clearDates__small{padding:6px}.DateRangePickerInput_clearDates_default:focus,.DateRangePickerInput_clearDates_default:hover{background:#dbdbdb;border-radius:50%}.DateRangePickerInput_clearDates__hide{visibility:hidden}.DateRangePickerInput_clearDates_svg{fill:#82888a;height:12px;vertical-align:middle;width:15px}.DateRangePickerInput_clearDates_svg__small{height:9px}.DateRangePickerInput_calendarIcon{background:0 0;border:0;color:inherit;cursor:pointer;display:inline-block;font:inherit;line-height:normal;margin:0 5px 0 10px;overflow:visible;padding:10px;vertical-align:middle}.DateRangePickerInput_calendarIcon_svg{fill:#82888a;height:15px;vertical-align:middle;width:14px}.DateRangePicker{display:inline-block;position:relative}.DateRangePicker__block{display:block}.DateRangePicker_picker{background-color:#fff;position:absolute;z-index:1}.DateRangePicker_picker__rtl{direction:rtl}.DateRangePicker_picker__directionLeft{left:0}.DateRangePicker_picker__directionRight{right:0}.DateRangePicker_picker__portal{background-color:#0000004d;height:100%;left:0;position:fixed;top:0;width:100%}.DateRangePicker_picker__fullScreenPortal{background-color:#fff}.DateRangePicker_closeButton{background:0 0;border:0;color:inherit;cursor:pointer;font:inherit;line-height:normal;overflow:visible;padding:15px;position:absolute;right:0;top:0;z-index:2}.DateRangePicker_closeButton:focus,.DateRangePicker_closeButton:hover{color:darken(#cacccd,10%);text-decoration:none}.DateRangePicker_closeButton_svg{fill:#cacccd;height:15px;width:15px}')),document.head.appendChild(e)}}catch(t){console.error("vite-plugin-css-injected-by-js",t)}}();
|
|
2
1
|
import { jsxs, Fragment, jsx } from "react/jsx-runtime";
|
|
3
|
-
import { useState, useLayoutEffect
|
|
4
|
-
import moment from "moment";
|
|
5
|
-
import "../../node_modules/react-dates/lib/initialize.js";
|
|
2
|
+
import React__default, { useState, useLayoutEffect } from "react";
|
|
6
3
|
import { DayPickerRangeController } from "react-dates";
|
|
7
|
-
import {
|
|
8
|
-
import { Portal } from "../Portal/index.js";
|
|
9
|
-
import { DateRangePickerCustom } from "./dateRangePickerCustom.js";
|
|
4
|
+
import { ShowMonthYearSelect } from "./showMonthYearSelect.js";
|
|
10
5
|
import { DateRangePickerFooter } from "./dateRangePickerFooter.js";
|
|
11
|
-
import {
|
|
12
|
-
|
|
6
|
+
import { DateRangePickerCustom } from "./dateRangePickerCustom.js";
|
|
7
|
+
import { calculatePosition, formatMomentDate } from "./utils.js";
|
|
8
|
+
import moment from "moment";
|
|
9
|
+
import { Portal } from "../Portal/index.js";
|
|
13
10
|
function DateRangePickerDropdown({
|
|
14
11
|
dropDownContainerRef,
|
|
15
12
|
withPortal,
|
|
16
|
-
portalContainer
|
|
13
|
+
portalContainer,
|
|
17
14
|
containerRef,
|
|
18
15
|
onDatesChange,
|
|
19
16
|
onFocusChange,
|
|
@@ -22,6 +19,8 @@ function DateRangePickerDropdown({
|
|
|
22
19
|
endDate,
|
|
23
20
|
showWeekNumbers,
|
|
24
21
|
selectedRange,
|
|
22
|
+
setStartDateOffset,
|
|
23
|
+
setEndDateOffset,
|
|
25
24
|
selectedDaysNumber,
|
|
26
25
|
handleResetDates,
|
|
27
26
|
handleCancelDates,
|
|
@@ -36,24 +35,17 @@ function DateRangePickerDropdown({
|
|
|
36
35
|
customWeekNumberData,
|
|
37
36
|
suppressClickOnWeekNumber,
|
|
38
37
|
setIsOpen,
|
|
39
|
-
startDateOffset
|
|
40
|
-
endDateOffset
|
|
38
|
+
startDateOffset,
|
|
39
|
+
endDateOffset,
|
|
41
40
|
hasInputErrors,
|
|
42
41
|
portalClassName,
|
|
43
|
-
|
|
44
|
-
maxDate,
|
|
45
|
-
isOutsideRange,
|
|
46
|
-
...calendarProps
|
|
42
|
+
...args
|
|
47
43
|
}) {
|
|
48
44
|
const [position, setPosition] = useState({
|
|
49
45
|
x: 0,
|
|
50
46
|
y: 0,
|
|
51
47
|
offsetHeight: 0,
|
|
52
|
-
offsetWidth: 0
|
|
53
|
-
left: 0,
|
|
54
|
-
right: "auto",
|
|
55
|
-
bottom: void 0,
|
|
56
|
-
top: void 0
|
|
48
|
+
offsetWidth: 0
|
|
57
49
|
});
|
|
58
50
|
const [customPosition, setCustomPosition] = useState({
|
|
59
51
|
left: 0,
|
|
@@ -61,66 +53,68 @@ function DateRangePickerDropdown({
|
|
|
61
53
|
});
|
|
62
54
|
useLayoutEffect(() => {
|
|
63
55
|
if (withPortal && containerRef.current) {
|
|
64
|
-
const scrollY =
|
|
56
|
+
const scrollY = window.scrollY || document.documentElement.scrollTop;
|
|
65
57
|
const {
|
|
66
58
|
x,
|
|
67
59
|
y,
|
|
68
60
|
height: offsetHeight,
|
|
69
61
|
width: offsetWidth
|
|
70
62
|
} = containerRef.current.getBoundingClientRect();
|
|
71
|
-
calculatePosition({
|
|
72
|
-
|
|
73
|
-
|
|
63
|
+
calculatePosition({
|
|
64
|
+
containerRef,
|
|
65
|
+
setCustomPosition,
|
|
66
|
+
showRangeSelector
|
|
67
|
+
});
|
|
68
|
+
setPosition({
|
|
74
69
|
x,
|
|
75
70
|
y: y + scrollY,
|
|
76
71
|
offsetHeight,
|
|
77
|
-
offsetWidth
|
|
78
|
-
|
|
72
|
+
offsetWidth,
|
|
73
|
+
...customPosition
|
|
74
|
+
});
|
|
79
75
|
} else if (!withPortal && containerRef.current && dropDownContainerRef.current) {
|
|
80
|
-
calculatePosition({
|
|
76
|
+
calculatePosition({
|
|
77
|
+
containerRef,
|
|
78
|
+
setCustomPosition,
|
|
79
|
+
showRangeSelector
|
|
80
|
+
});
|
|
81
81
|
}
|
|
82
|
-
}, [
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
(weekData == null ? void 0 : weekData.calendar_year_week) ?? ""
|
|
97
|
-
]
|
|
98
|
-
}
|
|
99
|
-
);
|
|
100
|
-
} else {
|
|
101
|
-
const startOfMonth = momentInstance.clone().startOf("month");
|
|
102
|
-
const weekNumber = Math.ceil((momentInstance.date() - 1 + startOfMonth.day()) / 7);
|
|
103
|
-
content = /* @__PURE__ */ jsxs(
|
|
104
|
-
"span",
|
|
105
|
-
{
|
|
106
|
-
className: `CalendarDayWeekNumber ${suppressClickOnWeekNumber ? "suppress-click-on-week-number" : ""}`,
|
|
107
|
-
children: [
|
|
108
|
-
"W",
|
|
109
|
-
weekNumber + 1
|
|
110
|
-
]
|
|
111
|
-
}
|
|
112
|
-
);
|
|
113
|
-
}
|
|
82
|
+
}, [
|
|
83
|
+
containerRef.current,
|
|
84
|
+
dropDownContainerRef.current,
|
|
85
|
+
withPortal,
|
|
86
|
+
showRangeSelector
|
|
87
|
+
]);
|
|
88
|
+
const renderDayContents = React__default.useCallback((momentInstance, modifiers) => {
|
|
89
|
+
let currentWeek = null;
|
|
90
|
+
let currentWeekNumber = null;
|
|
91
|
+
if (customWeekNumberData) {
|
|
92
|
+
if (modifiers.has("first-day-of-week")) {
|
|
93
|
+
currentWeek = customWeekNumberData.find((weekNumberData) => {
|
|
94
|
+
return (weekNumberData == null ? void 0 : weekNumberData.calendar_week_start_date) === formatMomentDate(momentInstance);
|
|
95
|
+
});
|
|
114
96
|
}
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
97
|
+
} else {
|
|
98
|
+
const startOfMonth = momentInstance.clone().startOf("month");
|
|
99
|
+
const weekNumber = Math.ceil(
|
|
100
|
+
(momentInstance.date() - 1 + startOfMonth.day()) / 7
|
|
101
|
+
);
|
|
102
|
+
currentWeekNumber = weekNumber;
|
|
103
|
+
}
|
|
104
|
+
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
105
|
+
showWeekNumbers && modifiers.has("first-day-of-week") && /* @__PURE__ */ jsxs(
|
|
106
|
+
"span",
|
|
107
|
+
{
|
|
108
|
+
className: `CalendarDayWeekNumber ${suppressClickOnWeekNumber ? "suppress-click-on-week-number" : ""}`,
|
|
109
|
+
children: [
|
|
110
|
+
"W",
|
|
111
|
+
customWeekNumberData ? currentWeek == null ? void 0 : currentWeek.calendar_year_week : currentWeekNumber + 1
|
|
112
|
+
]
|
|
113
|
+
}
|
|
114
|
+
),
|
|
115
|
+
/* @__PURE__ */ jsx("span", { className: "CalendarDayNumber", children: momentInstance.format("D") })
|
|
116
|
+
] });
|
|
117
|
+
}, []);
|
|
124
118
|
const onPrevMonthClick = (params) => {
|
|
125
119
|
var _a, _b;
|
|
126
120
|
const isNavButtonFocused = (_a = document.activeElement) == null ? void 0 : _a.classList.contains(
|
|
@@ -135,7 +129,7 @@ function DateRangePickerDropdown({
|
|
|
135
129
|
btn == null ? void 0 : btn.focus();
|
|
136
130
|
}, 0);
|
|
137
131
|
}
|
|
138
|
-
(_b =
|
|
132
|
+
(_b = args.onPrevMonthClick) == null ? void 0 : _b.call(args, params);
|
|
139
133
|
};
|
|
140
134
|
const onNextMonthClick = (params) => {
|
|
141
135
|
var _a, _b;
|
|
@@ -151,117 +145,180 @@ function DateRangePickerDropdown({
|
|
|
151
145
|
btn == null ? void 0 : btn.focus();
|
|
152
146
|
}, 0);
|
|
153
147
|
}
|
|
154
|
-
(_b =
|
|
148
|
+
(_b = args.onNextMonthClick) == null ? void 0 : _b.call(args, params);
|
|
155
149
|
};
|
|
156
|
-
|
|
157
|
-
if (minDate == null && maxDate == null) {
|
|
158
|
-
return isOutsideRange;
|
|
159
|
-
}
|
|
160
|
-
return (day) => {
|
|
161
|
-
if (minDate != null && day.isBefore(minDate, "day")) return true;
|
|
162
|
-
if (maxDate != null && day.isAfter(maxDate, "day")) return true;
|
|
163
|
-
if (isOutsideRange == null ? void 0 : isOutsideRange(day)) return true;
|
|
164
|
-
return false;
|
|
165
|
-
};
|
|
166
|
-
}, [minDate, maxDate, isOutsideRange]);
|
|
167
|
-
const rangeSelector = showRangeSelector ? /* @__PURE__ */ jsx(
|
|
168
|
-
DateRangePickerCustom,
|
|
169
|
-
{
|
|
170
|
-
handleRangeSelectorChange,
|
|
171
|
-
selectedRange
|
|
172
|
-
}
|
|
173
|
-
) : null;
|
|
174
|
-
const leftContainer = /* @__PURE__ */ jsxs("div", { className: `dateRangePicker-left-container ${showWeekNumbers ? "showWeekNumbers" : ""}`, children: [
|
|
175
|
-
/* @__PURE__ */ jsx(
|
|
176
|
-
DayPickerRangeController,
|
|
177
|
-
{
|
|
178
|
-
hideKeyboardShortcutsPanel: true,
|
|
179
|
-
daySize: 26,
|
|
180
|
-
endDate,
|
|
181
|
-
endDateOffset: endOffsetFn,
|
|
182
|
-
focusedInput,
|
|
183
|
-
horizontalMonthPadding: showWeekNumbers ? 16 : 12,
|
|
184
|
-
initialVisibleMonth: () => startDate ?? endDate ?? moment(),
|
|
185
|
-
isOutsideRange: isDayOutsideRange,
|
|
186
|
-
numberOfMonths: 2,
|
|
187
|
-
renderDayContents: showWeekNumbers ? renderDayContents : void 0,
|
|
188
|
-
renderMonthElement: showMonthYearSelect ? ({
|
|
189
|
-
month,
|
|
190
|
-
onMonthSelect,
|
|
191
|
-
onYearSelect
|
|
192
|
-
}) => /* @__PURE__ */ jsx(
|
|
193
|
-
DateRangePickerShowMonthYearSelect,
|
|
194
|
-
{
|
|
195
|
-
customYears,
|
|
196
|
-
month,
|
|
197
|
-
onMonthSelect,
|
|
198
|
-
onYearSelect
|
|
199
|
-
}
|
|
200
|
-
) : void 0,
|
|
201
|
-
startDate,
|
|
202
|
-
startDateOffset: startOffsetFn,
|
|
203
|
-
onDatesChange,
|
|
204
|
-
onFocusChange,
|
|
205
|
-
onNextMonthClick,
|
|
206
|
-
onPrevMonthClick,
|
|
207
|
-
...calendarProps
|
|
208
|
-
}
|
|
209
|
-
),
|
|
210
|
-
/* @__PURE__ */ jsx(
|
|
211
|
-
DateRangePickerFooter,
|
|
212
|
-
{
|
|
213
|
-
handleApplyDates,
|
|
214
|
-
handleCancelDates,
|
|
215
|
-
handleResetDates,
|
|
216
|
-
hasInputErrors,
|
|
217
|
-
primaryButtonProps,
|
|
218
|
-
selectedDaysNumber,
|
|
219
|
-
tertiaryButtonProps,
|
|
220
|
-
onSecondaryButtonClick
|
|
221
|
-
}
|
|
222
|
-
)
|
|
223
|
-
] });
|
|
224
|
-
const dropdownContent = /* @__PURE__ */ jsxs(
|
|
225
|
-
"div",
|
|
226
|
-
{
|
|
227
|
-
ref: dropDownContainerRef,
|
|
228
|
-
className: `impact-dateRangePicker-dropdown-container ${showRangeSelector ? "showRangeSelector" : ""}`,
|
|
229
|
-
style: customPosition,
|
|
230
|
-
children: [
|
|
231
|
-
leftContainer,
|
|
232
|
-
withPortal ? /* @__PURE__ */ jsx("div", { className: "dateRangePicker-right-container", children: rangeSelector }) : rangeSelector
|
|
233
|
-
]
|
|
234
|
-
}
|
|
235
|
-
);
|
|
236
|
-
if (withPortal && portalContainer) {
|
|
150
|
+
if (withPortal) {
|
|
237
151
|
return /* @__PURE__ */ jsxs(Portal, { container: portalContainer, children: [
|
|
238
152
|
/* @__PURE__ */ jsx(
|
|
239
153
|
"div",
|
|
240
154
|
{
|
|
241
|
-
className: `impact-portal-container ${portalClassName
|
|
155
|
+
className: `impact-portal-container ${portalClassName}`,
|
|
242
156
|
style: {
|
|
243
|
-
top: position.y
|
|
244
|
-
left: position.x
|
|
157
|
+
top: position.y || position.top,
|
|
158
|
+
left: position.x || position.left,
|
|
245
159
|
bottom: position.bottom,
|
|
246
160
|
right: position.right,
|
|
247
|
-
width: position.offsetWidth
|
|
161
|
+
width: position.offsetWidth || "0px"
|
|
248
162
|
},
|
|
249
|
-
children:
|
|
163
|
+
children: /* @__PURE__ */ jsxs(
|
|
164
|
+
"div",
|
|
165
|
+
{
|
|
166
|
+
className: `impact-dateRangePicker-dropdown-container ${showRangeSelector ? "showRangeSelector" : ""}`,
|
|
167
|
+
style: {
|
|
168
|
+
...customPosition
|
|
169
|
+
},
|
|
170
|
+
ref: dropDownContainerRef,
|
|
171
|
+
children: [
|
|
172
|
+
/* @__PURE__ */ jsxs(
|
|
173
|
+
"div",
|
|
174
|
+
{
|
|
175
|
+
className: `dateRangePicker-left-container ${showWeekNumbers ? "showWeekNumbers" : ""}`,
|
|
176
|
+
children: [
|
|
177
|
+
/* @__PURE__ */ jsx(
|
|
178
|
+
DayPickerRangeController,
|
|
179
|
+
{
|
|
180
|
+
...args,
|
|
181
|
+
onDatesChange,
|
|
182
|
+
onFocusChange,
|
|
183
|
+
focusedInput,
|
|
184
|
+
startDate,
|
|
185
|
+
endDate,
|
|
186
|
+
hideKeyboardShortcutsPanel: true,
|
|
187
|
+
daySize: 26,
|
|
188
|
+
horizontalMonthPadding: showWeekNumbers ? 16 : 12,
|
|
189
|
+
startDateOffset: startDateOffset ? startDateOffset : selectedRange === "custom" ? void 0 : setStartDateOffset,
|
|
190
|
+
endDateOffset: endDateOffset ? endDateOffset : selectedRange === "custom" ? void 0 : setEndDateOffset,
|
|
191
|
+
renderDayContents: showWeekNumbers ? renderDayContents : null,
|
|
192
|
+
renderMonthElement: showMonthYearSelect ? ({ month, onMonthSelect, onYearSelect }) => /* @__PURE__ */ jsx(
|
|
193
|
+
ShowMonthYearSelect,
|
|
194
|
+
{
|
|
195
|
+
customYears,
|
|
196
|
+
month,
|
|
197
|
+
onMonthSelect,
|
|
198
|
+
onYearSelect
|
|
199
|
+
}
|
|
200
|
+
) : null,
|
|
201
|
+
numberOfMonths: 2,
|
|
202
|
+
initialVisibleMonth: () => {
|
|
203
|
+
if (startDate) return startDate;
|
|
204
|
+
if (endDate) return endDate;
|
|
205
|
+
return moment();
|
|
206
|
+
},
|
|
207
|
+
onPrevMonthClick,
|
|
208
|
+
onNextMonthClick
|
|
209
|
+
}
|
|
210
|
+
),
|
|
211
|
+
/* @__PURE__ */ jsx(
|
|
212
|
+
DateRangePickerFooter,
|
|
213
|
+
{
|
|
214
|
+
selectedDaysNumber,
|
|
215
|
+
handleResetDates,
|
|
216
|
+
handleCancelDates,
|
|
217
|
+
onSecondaryButtonClick,
|
|
218
|
+
tertiaryButtonProps,
|
|
219
|
+
handleApplyDates,
|
|
220
|
+
primaryButtonProps,
|
|
221
|
+
hasInputErrors
|
|
222
|
+
}
|
|
223
|
+
)
|
|
224
|
+
]
|
|
225
|
+
}
|
|
226
|
+
),
|
|
227
|
+
/* @__PURE__ */ jsx("div", { className: "dateRangePicker-right-container", children: showRangeSelector ? /* @__PURE__ */ jsx(
|
|
228
|
+
DateRangePickerCustom,
|
|
229
|
+
{
|
|
230
|
+
handleRangeSelectorChange,
|
|
231
|
+
selectedRange
|
|
232
|
+
}
|
|
233
|
+
) : null })
|
|
234
|
+
]
|
|
235
|
+
}
|
|
236
|
+
)
|
|
250
237
|
}
|
|
251
238
|
),
|
|
252
239
|
/* @__PURE__ */ jsx(
|
|
253
240
|
"div",
|
|
254
241
|
{
|
|
255
|
-
"aria-hidden": true,
|
|
256
242
|
className: "ia-select-container-v3-blanket",
|
|
257
|
-
onClick: () =>
|
|
258
|
-
setIsOpen(false);
|
|
259
|
-
}
|
|
243
|
+
onClick: () => setIsOpen(false)
|
|
260
244
|
}
|
|
261
245
|
)
|
|
262
246
|
] });
|
|
263
247
|
}
|
|
264
|
-
return
|
|
248
|
+
return /* @__PURE__ */ jsxs(
|
|
249
|
+
"div",
|
|
250
|
+
{
|
|
251
|
+
className: `impact-dateRangePicker-dropdown-container ${showRangeSelector ? "showRangeSelector" : ""}`,
|
|
252
|
+
ref: dropDownContainerRef,
|
|
253
|
+
style: {
|
|
254
|
+
...customPosition
|
|
255
|
+
},
|
|
256
|
+
children: [
|
|
257
|
+
/* @__PURE__ */ jsxs(
|
|
258
|
+
"div",
|
|
259
|
+
{
|
|
260
|
+
className: `dateRangePicker-left-container ${showWeekNumbers ? "showWeekNumbers" : ""}`,
|
|
261
|
+
children: [
|
|
262
|
+
/* @__PURE__ */ jsx(
|
|
263
|
+
DayPickerRangeController,
|
|
264
|
+
{
|
|
265
|
+
...args,
|
|
266
|
+
onDatesChange,
|
|
267
|
+
onFocusChange,
|
|
268
|
+
focusedInput,
|
|
269
|
+
startDate,
|
|
270
|
+
endDate,
|
|
271
|
+
hideKeyboardShortcutsPanel: true,
|
|
272
|
+
daySize: 26,
|
|
273
|
+
horizontalMonthPadding: showWeekNumbers ? 16 : 12,
|
|
274
|
+
startDateOffset: startDateOffset ? startDateOffset : selectedRange === "custom" ? void 0 : (day) => setStartDateOffset(selectedRange, day),
|
|
275
|
+
endDateOffset: endDateOffset ? endDateOffset : selectedRange === "custom" ? void 0 : (day) => setEndDateOffset(selectedRange, day),
|
|
276
|
+
renderDayContents: showWeekNumbers ? renderDayContents : null,
|
|
277
|
+
renderMonthElement: showMonthYearSelect ? ({ month, onMonthSelect, onYearSelect }) => /* @__PURE__ */ jsx(
|
|
278
|
+
ShowMonthYearSelect,
|
|
279
|
+
{
|
|
280
|
+
customYears,
|
|
281
|
+
month,
|
|
282
|
+
onMonthSelect,
|
|
283
|
+
onYearSelect
|
|
284
|
+
}
|
|
285
|
+
) : null,
|
|
286
|
+
numberOfMonths: 2,
|
|
287
|
+
initialVisibleMonth: () => {
|
|
288
|
+
if (startDate) return startDate;
|
|
289
|
+
if (endDate) return endDate;
|
|
290
|
+
return moment();
|
|
291
|
+
},
|
|
292
|
+
onPrevMonthClick,
|
|
293
|
+
onNextMonthClick
|
|
294
|
+
}
|
|
295
|
+
),
|
|
296
|
+
/* @__PURE__ */ jsx(
|
|
297
|
+
DateRangePickerFooter,
|
|
298
|
+
{
|
|
299
|
+
selectedDaysNumber,
|
|
300
|
+
handleResetDates,
|
|
301
|
+
handleCancelDates,
|
|
302
|
+
onSecondaryButtonClick,
|
|
303
|
+
tertiaryButtonProps,
|
|
304
|
+
handleApplyDates,
|
|
305
|
+
primaryButtonProps,
|
|
306
|
+
hasInputErrors
|
|
307
|
+
}
|
|
308
|
+
)
|
|
309
|
+
]
|
|
310
|
+
}
|
|
311
|
+
),
|
|
312
|
+
showRangeSelector ? /* @__PURE__ */ jsx(
|
|
313
|
+
DateRangePickerCustom,
|
|
314
|
+
{
|
|
315
|
+
handleRangeSelectorChange,
|
|
316
|
+
selectedRange
|
|
317
|
+
}
|
|
318
|
+
) : null
|
|
319
|
+
]
|
|
320
|
+
}
|
|
321
|
+
);
|
|
265
322
|
}
|
|
266
323
|
export {
|
|
267
324
|
DateRangePickerDropdown
|
|
@@ -1,12 +1,2 @@
|
|
|
1
|
-
export
|
|
2
|
-
selectedDaysNumber: number;
|
|
3
|
-
handleResetDates: () => void;
|
|
4
|
-
handleCancelDates: () => void;
|
|
5
|
-
onSecondaryButtonClick?: () => void;
|
|
6
|
-
tertiaryButtonProps?: Record<string, unknown>;
|
|
7
|
-
handleApplyDates: () => void;
|
|
8
|
-
primaryButtonProps?: Record<string, unknown>;
|
|
9
|
-
hasInputErrors?: boolean;
|
|
10
|
-
}
|
|
11
|
-
export declare function DateRangePickerFooter({ selectedDaysNumber, handleResetDates, handleCancelDates, onSecondaryButtonClick, tertiaryButtonProps, handleApplyDates, primaryButtonProps, hasInputErrors, }: DateRangePickerFooterProps): import("react/jsx-runtime").JSX.Element;
|
|
1
|
+
export declare function DateRangePickerFooter({ selectedDaysNumber, handleResetDates, handleCancelDates, onSecondaryButtonClick, tertiaryButtonProps, handleApplyDates, primaryButtonProps, hasInputErrors, }: any): import("react/jsx-runtime").JSX.Element;
|
|
12
2
|
//# sourceMappingURL=dateRangePickerFooter.d.ts.map
|