@elliemae/ds-date-picker 3.26.1-rc.1 → 3.27.0-next.2
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/cjs/index.js +3 -5
- package/dist/cjs/index.js.map +2 -2
- package/dist/esm/index.js +2 -4
- package/dist/esm/index.js.map +2 -2
- package/dist/types/index.d.ts +2 -3
- package/package.json +6 -79
- package/dist/cjs/DSDatePicker.js +0 -240
- package/dist/cjs/DSDatePicker.js.map +0 -7
- package/dist/cjs/components/DSDatePickerImpl.js +0 -293
- package/dist/cjs/components/DSDatePickerImpl.js.map +0 -7
- package/dist/cjs/components/DatePickerController/DatePickerController.js +0 -338
- package/dist/cjs/components/DatePickerController/DatePickerController.js.map +0 -7
- package/dist/cjs/components/DatePickerDay/DatePickerDay.js +0 -44
- package/dist/cjs/components/DatePickerDay/DatePickerDay.js.map +0 -7
- package/dist/cjs/components/DatePickerDropdown.js +0 -90
- package/dist/cjs/components/DatePickerDropdown.js.map +0 -7
- package/dist/cjs/components/DatePickerHeader/DatePickerHeader.js +0 -79
- package/dist/cjs/components/DatePickerHeader/DatePickerHeader.js.map +0 -7
- package/dist/cjs/components/DatePickerNavigation/DatePickerNavigation.js +0 -56
- package/dist/cjs/components/DatePickerNavigation/DatePickerNavigation.js.map +0 -7
- package/dist/cjs/components/DatePickerPicker/DatePickerPicker.js +0 -89
- package/dist/cjs/components/DatePickerPicker/DatePickerPicker.js.map +0 -7
- package/dist/cjs/components/DatePickerRange/DatePickerRange.js +0 -110
- package/dist/cjs/components/DatePickerRange/DatePickerRange.js.map +0 -7
- package/dist/cjs/components/DatePickerRangeHeader/DatePickerRangeHeader.js +0 -149
- package/dist/cjs/components/DatePickerRangeHeader/DatePickerRangeHeader.js.map +0 -7
- package/dist/cjs/components/DatePickerRenderMonth/DatePickerRenderMonth.js +0 -61
- package/dist/cjs/components/DatePickerRenderMonth/DatePickerRenderMonth.js.map +0 -7
- package/dist/cjs/components/DatePickerSingleDate/DatePickerSingleDate.js +0 -96
- package/dist/cjs/components/DatePickerSingleDate/DatePickerSingleDate.js.map +0 -7
- package/dist/cjs/components/SingleRangeDateSwitcher/SingleRangeDateSwitcher.js +0 -91
- package/dist/cjs/components/SingleRangeDateSwitcher/SingleRangeDateSwitcher.js.map +0 -7
- package/dist/cjs/components/index.js +0 -54
- package/dist/cjs/components/index.js.map +0 -7
- package/dist/cjs/defaultPhrases.js +0 -247
- package/dist/cjs/defaultPhrases.js.map +0 -7
- package/dist/esm/DSDatePicker.js +0 -221
- package/dist/esm/DSDatePicker.js.map +0 -7
- package/dist/esm/components/DSDatePickerImpl.js +0 -263
- package/dist/esm/components/DSDatePickerImpl.js.map +0 -7
- package/dist/esm/components/DatePickerController/DatePickerController.js +0 -308
- package/dist/esm/components/DatePickerController/DatePickerController.js.map +0 -7
- package/dist/esm/components/DatePickerDay/DatePickerDay.js +0 -14
- package/dist/esm/components/DatePickerDay/DatePickerDay.js.map +0 -7
- package/dist/esm/components/DatePickerDropdown.js +0 -60
- package/dist/esm/components/DatePickerDropdown.js.map +0 -7
- package/dist/esm/components/DatePickerHeader/DatePickerHeader.js +0 -49
- package/dist/esm/components/DatePickerHeader/DatePickerHeader.js.map +0 -7
- package/dist/esm/components/DatePickerNavigation/DatePickerNavigation.js +0 -26
- package/dist/esm/components/DatePickerNavigation/DatePickerNavigation.js.map +0 -7
- package/dist/esm/components/DatePickerPicker/DatePickerPicker.js +0 -59
- package/dist/esm/components/DatePickerPicker/DatePickerPicker.js.map +0 -7
- package/dist/esm/components/DatePickerRange/DatePickerRange.js +0 -80
- package/dist/esm/components/DatePickerRange/DatePickerRange.js.map +0 -7
- package/dist/esm/components/DatePickerRangeHeader/DatePickerRangeHeader.js +0 -119
- package/dist/esm/components/DatePickerRangeHeader/DatePickerRangeHeader.js.map +0 -7
- package/dist/esm/components/DatePickerRenderMonth/DatePickerRenderMonth.js +0 -31
- package/dist/esm/components/DatePickerRenderMonth/DatePickerRenderMonth.js.map +0 -7
- package/dist/esm/components/DatePickerSingleDate/DatePickerSingleDate.js +0 -66
- package/dist/esm/components/DatePickerSingleDate/DatePickerSingleDate.js.map +0 -7
- package/dist/esm/components/SingleRangeDateSwitcher/SingleRangeDateSwitcher.js +0 -61
- package/dist/esm/components/SingleRangeDateSwitcher/SingleRangeDateSwitcher.js.map +0 -7
- package/dist/esm/components/index.js +0 -24
- package/dist/esm/components/index.js.map +0 -7
- package/dist/esm/defaultPhrases.js +0 -217
- package/dist/esm/defaultPhrases.js.map +0 -7
- package/dist/types/components/DSDatePickerImpl.d.ts +0 -21
- package/dist/types/components/DatePickerController/DatePickerController.d.ts +0 -80
- package/dist/types/components/DatePickerDay/DatePickerDay.d.ts +0 -13
- package/dist/types/components/DatePickerDropdown.d.ts +0 -27
- package/dist/types/components/DatePickerHeader/DatePickerHeader.d.ts +0 -15
- package/dist/types/components/DatePickerNavigation/DatePickerNavigation.d.ts +0 -19
- package/dist/types/components/DatePickerPicker/DatePickerPicker.d.ts +0 -43
- package/dist/types/components/DatePickerRange/DatePickerRange.d.ts +0 -9
- package/dist/types/components/DatePickerRangeHeader/DatePickerRangeHeader.d.ts +0 -23
- package/dist/types/components/DatePickerRangeHeader/tests/DatePickerRangeHeader.test.d.ts +0 -1
- package/dist/types/components/DatePickerRenderMonth/DatePickerRenderMonth.d.ts +0 -4
- package/dist/types/components/DatePickerSingleDate/DatePickerSingleDate.d.ts +0 -11
- package/dist/types/components/SingleRangeDateSwitcher/SingleRangeDateSwitcher.d.ts +0 -16
- package/dist/types/components/index.d.ts +0 -10
- package/dist/types/components/tests/DatePickerHeader.test.d.ts +0 -1
- package/dist/types/components/tests/DatePickerRange.test.d.ts +0 -1
- package/dist/types/components/tests/DatePickerRangeHeader.test.d.ts +0 -1
- package/dist/types/components/tests/DatePickerSelectedDate.test.d.ts +0 -1
- package/dist/types/components/tests/DatePickerSingleDate.test.d.ts +0 -1
- package/dist/types/components/tests/SingleRangeDateSwitcher.test.d.ts +0 -1
- package/dist/types/defaultPhrases.d.ts +0 -225
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../../src/components/DatePickerController/DatePickerController.tsx", "../../../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
-
"sourcesContent": ["/* eslint-disable react/prop-types */\n/* eslint-disable max-lines */\nimport React from 'react';\nimport { debounce } from 'lodash';\nimport PropTypes from 'prop-types';\nimport moment from 'moment';\nimport 'react-dates/initialize.js';\nimport { DayPickerSingleDateController } from 'react-dates';\nimport { convertPropToCssClassName } from '@elliemae/ds-classnames';\nimport { ChevronLeft } from '@elliemae/ds-icons';\nimport { SingleDatePickerPhrases } from '../../defaultPhrases.js';\nimport { renderMonthElement } from '../DatePickerRenderMonth/DatePickerRenderMonth.js';\nimport { DatePickerNavigation } from '../DatePickerNavigation/DatePickerNavigation.js';\nimport { DatePickerDay } from '../DatePickerDay/DatePickerDay.js';\n\ninterface DSDatePickerControllerStateType {\n selectedDate: any;\n firstFocusableItem: React.RefObject<HTMLElement>;\n datePicker: React.RefObject<HTMLElement>;\n}\n\nconst { classNameElement, classNameBlock } = convertPropToCssClassName('datepicker-range');\n\nconst focusElementOnOpen = debounce((datePickerDom, firstFocusableItemDom, focusCurrentDate) => {\n if (datePickerDom) {\n const currentDay = Array.from(datePickerDom?.getElementsByClassName('CalendarDay__today')).filter(\n (el) => !el.className.includes('CalendarDay__outside'),\n )[0];\n const [calendarDaySelected] = datePickerDom?.getElementsByClassName('CalendarDay__selected');\n if (calendarDaySelected) {\n calendarDaySelected?.focus?.();\n } else if (focusCurrentDate && !calendarDaySelected) currentDay.focus();\n else {\n const navButton = firstFocusableItemDom?.closest('.DayPickerNavigation_button>div');\n navButton?.focus?.();\n }\n }\n}, 100);\n\nexport default class DSDatePickerController extends React.Component<any, DSDatePickerControllerStateType> {\n // eslint-disable-next-line react/static-property-placement\n static defaultProps = {\n date: '',\n value: '',\n enableOutsideDays: false,\n initialVisibleMonth: moment(),\n firstDayOfWeek: 0,\n keepOpenOnDateSelect: true,\n hideKeyboardShortcutsPanel: true,\n onPrevMonthClick: () => null,\n onNextMonthClick: () => null,\n onClose: () => null,\n onChange: () => null,\n onClickEscape: () => null,\n onDateChange: () => null,\n phrases: SingleDatePickerPhrases,\n // displayFormat: 'L',\n displayFormatDay: 'D',\n transitionDuration: 0,\n // verticalSpacing: 0,\n isDayBlocked: () => false,\n isOutsideRange: () => false,\n isDayHighlighted: () => false,\n numberOfMonths: 1,\n };\n\n constructor(props) {\n super(props);\n this.state = {\n selectedDate: null,\n firstFocusableItem: React.createRef(),\n datePicker: React.createRef(),\n };\n }\n\n componentDidMount() {\n const { datePicker, firstFocusableItem } = this.state;\n datePicker.current.addEventListener('mouseup', this.handleMouseUp, false);\n document.addEventListener('keydown', this.handleKeyDown, false);\n setTimeout(() => {\n focusElementOnOpen(datePicker?.current, firstFocusableItem?.current, this.props.focusCurrentDate);\n }, 400);\n }\n\n componentWillUnmount() {\n const { datePicker } = this.state;\n datePicker.current.removeEventListener('mouseup', this.handleMouseUp, false);\n document.removeEventListener('keydown', this.handleKeyDown, false);\n }\n\n handleMouseUp = () => {\n const focusedElement = document.activeElement;\n\n focusedElement?.blur?.();\n };\n\n handleKeyDown = (event) => {\n const [firstDay, ...restOfDays] = document\n .getElementsByClassName('CalendarMonthGrid_month__horizontal')[1]\n .getElementsByClassName('CalendarDay');\n const [lastDay] = restOfDays.slice(-1);\n const { onClickEscape } = this.props;\n\n switch (event.key) {\n case 'Home':\n firstDay.focus();\n break;\n case 'End':\n lastDay.focus();\n break;\n case 'Escape':\n onClickEscape();\n break;\n default:\n break;\n }\n };\n\n getSafeValue = () => {\n const { value, date, defaultValue } = this.props;\n const { selectedDate } = this.state;\n\n if (value) return moment(value);\n if (date) return moment(date);\n if (defaultValue) return moment(defaultValue);\n if (selectedDate) return moment(selectedDate);\n\n return null;\n };\n\n isControlled = () => {\n const { value, date } = this.props;\n return Boolean(value) || Boolean(date);\n };\n\n handleDateChange = (date) => {\n const { readOnly, onDateChange, onChange } = this.props;\n if (!readOnly) {\n if (!this.isControlled()) {\n this.setState({ selectedDate: date });\n }\n onDateChange(date);\n onChange(date);\n }\n };\n\n handleChange = (dataInput) => {\n const { onDateChange, onChange } = this.props;\n const momentvalue = moment(dataInput.target.value);\n this.setState({ selectedDate: momentvalue });\n onDateChange(momentvalue);\n onChange(momentvalue);\n };\n\n handleNavClick = (date, nav) => {\n const [prev, next] = document.getElementsByClassName('DayPickerNavigation_button');\n const { onPrevMonthClick, onNextMonthClick } = this.props;\n\n if (nav === 'prev') {\n prev?.focus?.();\n onPrevMonthClick(date);\n } else {\n next?.focus?.();\n onNextMonthClick(date);\n }\n };\n\n insideBlur = (event) => {\n const { datePicker } = this.state;\n if (!datePicker.current.contains(event.currentTarget)) {\n this.props.onClose();\n }\n };\n\n render() {\n const {\n numberOfMonths,\n enableOutsideDays,\n transitionDuration,\n initialVisibleMonth,\n firstDayOfWeek,\n keepOpenOnDateSelect,\n hideKeyboardShortcutsPanel,\n onClose,\n phrases,\n displayFormatDay,\n isDayBlocked,\n isOutsideRange,\n isDayHighlighted,\n onOutsideClick,\n key,\n calendarProps,\n } = this.props;\n const { datePicker, firstFocusableItem } = this.state;\n\n const safedate = this.getSafeValue();\n const safeinitialMonth = safedate && safedate.isValid() ? () => safedate : () => initialVisibleMonth;\n\n return (\n <div>\n <div\n onBlur={this.insideBlur}\n ref={datePicker}\n className={classNameBlock('wrapper-day-picker-single-date-controller')}\n data-testid=\"calendar-wrapper\"\n {...calendarProps}\n >\n <DayPickerSingleDateController\n key={key}\n date={safedate}\n enableOutsideDays={enableOutsideDays}\n firstDayOfWeek={firstDayOfWeek}\n focused\n hideKeyboardShortcutsPanel={hideKeyboardShortcutsPanel}\n initialVisibleMonth={safeinitialMonth}\n isDayBlocked={isDayBlocked}\n isDayHighlighted={isDayHighlighted}\n isOutsideRange={isOutsideRange}\n keepOpenOnDateSelect={keepOpenOnDateSelect}\n navNext={<DatePickerNavigation className={classNameElement('navigation-next')} />}\n navPrev={\n <DatePickerNavigation\n className={classNameElement('navigation-prev')}\n icon={ChevronLeft}\n innerRef={firstFocusableItem}\n />\n }\n renderMonthElement={renderMonthElement}\n numberOfMonths={numberOfMonths}\n onClose={onClose}\n onDateChange={this.handleDateChange}\n onNextMonthClick={this.handleNavClick('next')}\n onOutsideClick={onOutsideClick}\n onPrevMonthClick={this.handleNavClick('prev')}\n phrases={phrases}\n renderDayContents={(date) => (\n <DatePickerDay className={classNameElement('day-contents')} date={date.format(displayFormatDay)} />\n )}\n transitionDuration={transitionDuration}\n onTab={(e) => {\n if (e.target.classList.contains('CalendarDay')) {\n e.preventDefault();\n onClose();\n }\n }}\n />\n </div>\n </div>\n );\n }\n}\n\nDSDatePickerController.propTypes = {\n date: PropTypes.instanceOf(Date, moment),\n value: PropTypes.oneOf([PropTypes.instanceOf(Date), PropTypes.instanceOf(moment)]),\n enableOutsideDays: PropTypes.bool,\n initialVisibleMonth: PropTypes.instanceOf(Date, moment),\n firstDayOfWeek: PropTypes.number,\n keepOpenOnDateSelect: PropTypes.bool,\n hideKeyboardShortcutsPanel: PropTypes.bool,\n onPrevMonthClick: PropTypes.func,\n onNextMonthClick: PropTypes.func,\n onClose: PropTypes.func,\n onClickEscape: PropTypes.func,\n onChange: PropTypes.func,\n onDateChange: PropTypes.func,\n phrases: SingleDatePickerPhrases,\n // displayFormat: PropTypes.string,\n displayFormatDay: PropTypes.string,\n transitionDuration: PropTypes.number,\n // verticalSpacing: PropTypes.number,\n isDayBlocked: PropTypes.func,\n isOutsideRange: PropTypes.func,\n isDayHighlighted: PropTypes.func,\n numberOfMonths: PropTypes.number,\n};\n\nDSDatePickerController.defaultProps = {\n date: '',\n value: '',\n enableOutsideDays: false,\n initialVisibleMonth: moment(),\n firstDayOfWeek: 0,\n keepOpenOnDateSelect: true,\n hideKeyboardShortcutsPanel: true,\n onPrevMonthClick: () => null,\n onNextMonthClick: () => null,\n onClose: () => null,\n onClickEscape: () => null,\n onChange: () => null,\n onDateChange: () => null,\n phrases: PropTypes.shape({\n calendarLabel: PropTypes.string,\n closeDatePicker: PropTypes.string,\n clearDates: PropTypes.string,\n focusStartDate: PropTypes.string,\n jumpToPrevMonth: PropTypes.string,\n jumpToNextMonth: PropTypes.string,\n keyboardShortcuts: PropTypes.string,\n showKeyboardShortcutsPanel: PropTypes.string,\n hideKeyboardShortcutsPanel: PropTypes.string,\n openThisPanel: PropTypes.string,\n enterKey: PropTypes.string,\n leftArrowRightArrow: PropTypes.string,\n upArrowDownArrow: PropTypes.string,\n pageUpPageDown: PropTypes.string,\n homeEnd: PropTypes.string,\n escape: PropTypes.string,\n questionMark: PropTypes.string,\n selectFocusedDate: PropTypes.string,\n moveFocusByOneDay: PropTypes.string,\n moveFocusByOneWeek: PropTypes.string,\n moveFocusByOneMonth: PropTypes.string,\n moveFocustoStartAndEndOfWeek: PropTypes.string,\n returnFocusToInput: PropTypes.string,\n keyboardNavigationInstructions: PropTypes.string,\n chooseAvailableStartDate: PropTypes.func,\n chooseAvailableEndDate: PropTypes.func,\n dateIsUnavailable: PropTypes.func,\n dateIsSelected: PropTypes.func,\n }),\n // displayFormat: 'L',\n displayFormatDay: 'D',\n transitionDuration: 0,\n // verticalSpacing: 0,\n isDayBlocked: () => false,\n isOutsideRange: () => false,\n isDayHighlighted: () => false,\n numberOfMonths: 1,\n};\n\nexport { DSDatePickerController };\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;AD2NF;AAzNrB,mBAAkB;AAClB,oBAAyB;AACzB,wBAAsB;AACtB,oBAAmB;AACnB,wBAAO;AACP,yBAA8C;AAC9C,2BAA0C;AAC1C,sBAA4B;AAC5B,4BAAwC;AACxC,mCAAmC;AACnC,kCAAqC;AACrC,2BAA8B;AAQ9B,MAAM,EAAE,kBAAkB,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__getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
-
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
-
var __export = (target, all) => {
|
|
9
|
-
for (var name in all)
|
|
10
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
|
-
};
|
|
12
|
-
var __copyProps = (to, from, except, desc) => {
|
|
13
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
14
|
-
for (let key of __getOwnPropNames(from))
|
|
15
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
16
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
17
|
-
}
|
|
18
|
-
return to;
|
|
19
|
-
};
|
|
20
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
-
// If the importer is in node compatibility mode or this is not an ESM
|
|
22
|
-
// file that has been converted to a CommonJS file using a Babel-
|
|
23
|
-
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
24
|
-
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
25
|
-
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
26
|
-
mod
|
|
27
|
-
));
|
|
28
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
|
-
var DatePickerDay_exports = {};
|
|
30
|
-
__export(DatePickerDay_exports, {
|
|
31
|
-
DatePickerDay: () => Day,
|
|
32
|
-
default: () => DatePickerDay_default
|
|
33
|
-
});
|
|
34
|
-
module.exports = __toCommonJS(DatePickerDay_exports);
|
|
35
|
-
var React = __toESM(require("react"));
|
|
36
|
-
var import_jsx_runtime = require("react/jsx-runtime");
|
|
37
|
-
var import_prop_types = __toESM(require("prop-types"));
|
|
38
|
-
const Day = ({ className = "date-picker-content-day", date = "" }) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className, "data-testid": `datepicker-day-${date}`, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: `${className}-half`, "data-testid": "datepicker-day", children: date }) });
|
|
39
|
-
Day.propTypes = {
|
|
40
|
-
className: import_prop_types.default.string,
|
|
41
|
-
date: import_prop_types.default.oneOfType([import_prop_types.default.string, import_prop_types.default.number])
|
|
42
|
-
};
|
|
43
|
-
var DatePickerDay_default = Day;
|
|
44
|
-
//# sourceMappingURL=DatePickerDay.js.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../../src/components/DatePickerDay/DatePickerDay.tsx", "../../../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
-
"sourcesContent": ["import React from 'react';\nimport PropTypes from 'prop-types';\n\nconst Day = ({ className = 'date-picker-content-day', date = '' }) => (\n <div className={className} data-testid={`datepicker-day-${date}`}>\n <div className={`${className}-half`} data-testid=\"datepicker-day\">\n {date}\n </div>\n </div>\n);\nDay.propTypes = {\n className: PropTypes.string,\n date: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),\n};\n\nexport { Day as DatePickerDay };\nexport default Day;\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADKnB;AAJJ,wBAAsB;AAEtB,MAAM,MAAM,CAAC,EAAE,YAAY,2BAA2B,OAAO,GAAG,MAC9D,4CAAC,SAAI,WAAsB,eAAa,kBAAkB,QACxD,sDAAC,SAAI,WAAW,GAAG,kBAAkB,eAAY,kBAC9C,gBACH,GACF;AAEF,IAAI,YAAY;AAAA,EACd,WAAW,kBAAAA,QAAU;AAAA,EACrB,MAAM,kBAAAA,QAAU,UAAU,CAAC,kBAAAA,QAAU,QAAQ,kBAAAA,QAAU,MAAM,CAAC;AAChE;AAGA,IAAO,wBAAQ;",
|
|
6
|
-
"names": ["PropTypes"]
|
|
7
|
-
}
|
|
@@ -1,90 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __create = Object.create;
|
|
3
|
-
var __defProp = Object.defineProperty;
|
|
4
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
-
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
-
var __export = (target, all) => {
|
|
9
|
-
for (var name in all)
|
|
10
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
|
-
};
|
|
12
|
-
var __copyProps = (to, from, except, desc) => {
|
|
13
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
14
|
-
for (let key of __getOwnPropNames(from))
|
|
15
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
16
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
17
|
-
}
|
|
18
|
-
return to;
|
|
19
|
-
};
|
|
20
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
-
// If the importer is in node compatibility mode or this is not an ESM
|
|
22
|
-
// file that has been converted to a CommonJS file using a Babel-
|
|
23
|
-
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
24
|
-
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
25
|
-
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
26
|
-
mod
|
|
27
|
-
));
|
|
28
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
|
-
var DatePickerDropdown_exports = {};
|
|
30
|
-
__export(DatePickerDropdown_exports, {
|
|
31
|
-
DatePickerDropdown: () => DatePickerDropdown,
|
|
32
|
-
default: () => DatePickerDropdown_default
|
|
33
|
-
});
|
|
34
|
-
module.exports = __toCommonJS(DatePickerDropdown_exports);
|
|
35
|
-
var React = __toESM(require("react"));
|
|
36
|
-
var import_jsx_runtime = require("react/jsx-runtime");
|
|
37
|
-
var import_prop_types = __toESM(require("prop-types"));
|
|
38
|
-
var import_ds_classnames = require("@elliemae/ds-classnames");
|
|
39
|
-
var import_ds_popper = require("@elliemae/ds-popper");
|
|
40
|
-
var import_DatePickerPicker = require("./DatePickerPicker/DatePickerPicker.js");
|
|
41
|
-
const { classNameElement } = (0, import_ds_classnames.convertPropToCssClassName)("datepicker-range");
|
|
42
|
-
const noop = () => null;
|
|
43
|
-
const DatePickerDropdown = ({
|
|
44
|
-
disabled = false,
|
|
45
|
-
readOnly,
|
|
46
|
-
onClick = noop,
|
|
47
|
-
isOpen,
|
|
48
|
-
menu,
|
|
49
|
-
zIndex = 1,
|
|
50
|
-
pickerProps,
|
|
51
|
-
pickerRef
|
|
52
|
-
}) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
53
|
-
import_ds_popper.DSPopper,
|
|
54
|
-
{
|
|
55
|
-
contentComponent: menu,
|
|
56
|
-
isOpen,
|
|
57
|
-
modifiers: {
|
|
58
|
-
preventOverflow: {
|
|
59
|
-
enabled: true,
|
|
60
|
-
padding: 0,
|
|
61
|
-
boundariesElement: "window"
|
|
62
|
-
}
|
|
63
|
-
},
|
|
64
|
-
showArrow: false,
|
|
65
|
-
triggerComponent: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
66
|
-
import_DatePickerPicker.DatePickerPicker,
|
|
67
|
-
{
|
|
68
|
-
innerRef: pickerRef,
|
|
69
|
-
...pickerProps,
|
|
70
|
-
className: classNameElement("picker"),
|
|
71
|
-
disabled,
|
|
72
|
-
onClick,
|
|
73
|
-
readOnly
|
|
74
|
-
}
|
|
75
|
-
) }),
|
|
76
|
-
zIndex
|
|
77
|
-
}
|
|
78
|
-
);
|
|
79
|
-
DatePickerDropdown.propTypes = {
|
|
80
|
-
pickerRef: import_prop_types.default.oneOfType([import_prop_types.default.func, import_prop_types.default.shape({ current: import_prop_types.default.any })]),
|
|
81
|
-
disabled: import_prop_types.default.bool,
|
|
82
|
-
readOnly: import_prop_types.default.bool,
|
|
83
|
-
onClick: import_prop_types.default.func,
|
|
84
|
-
isOpen: import_prop_types.default.bool,
|
|
85
|
-
menu: import_prop_types.default.element,
|
|
86
|
-
zIndex: import_prop_types.default.number,
|
|
87
|
-
pickerProps: import_prop_types.default.shape(import_DatePickerPicker.PickerPropsTypes)
|
|
88
|
-
};
|
|
89
|
-
var DatePickerDropdown_default = DatePickerDropdown;
|
|
90
|
-
//# sourceMappingURL=DatePickerDropdown.js.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../src/components/DatePickerDropdown.tsx", "../../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
-
"sourcesContent": ["import React from 'react';\nimport PropTypes from 'prop-types';\nimport { convertPropToCssClassName } from '@elliemae/ds-classnames';\nimport { DSPopper } from '@elliemae/ds-popper';\nimport { DatePickerPicker, PickerPropsTypes } from './DatePickerPicker/DatePickerPicker.js';\nconst { classNameElement } = convertPropToCssClassName('datepicker-range');\n\nconst noop = () => null;\nconst DatePickerDropdown = ({\n disabled = false,\n readOnly,\n onClick = noop,\n isOpen,\n menu,\n zIndex = 1,\n pickerProps,\n pickerRef,\n}) => (\n <DSPopper\n contentComponent={menu}\n isOpen={isOpen}\n modifiers={{\n preventOverflow: {\n enabled: true,\n padding: 0,\n boundariesElement: 'window',\n },\n }}\n showArrow={false}\n triggerComponent={\n <div>\n <DatePickerPicker\n innerRef={pickerRef}\n {...pickerProps}\n className={classNameElement('picker')}\n disabled={disabled}\n onClick={onClick}\n readOnly={readOnly}\n />\n </div>\n }\n zIndex={zIndex}\n />\n);\n\nDatePickerDropdown.propTypes = {\n pickerRef: PropTypes.oneOfType([PropTypes.func, PropTypes.shape({ current: PropTypes.any })]),\n disabled: PropTypes.bool,\n readOnly: PropTypes.bool,\n onClick: PropTypes.func,\n isOpen: PropTypes.bool,\n menu: PropTypes.element,\n zIndex: PropTypes.number,\n pickerProps: PropTypes.shape(PickerPropsTypes),\n};\n\nexport { DatePickerDropdown };\nexport default DatePickerDropdown;\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;AD+Bf;AA9BR,wBAAsB;AACtB,2BAA0C;AAC1C,uBAAyB;AACzB,8BAAmD;AACnD,MAAM,EAAE,iBAAiB,QAAI,gDAA0B,kBAAkB;AAEzE,MAAM,OAAO,MAAM;AACnB,MAAM,qBAAqB,CAAC;AAAA,EAC1B,WAAW;AAAA,EACX;AAAA,EACA,UAAU;AAAA,EACV;AAAA,EACA;AAAA,EACA,SAAS;AAAA,EACT;AAAA,EACA;AACF,MACE;AAAA,EAAC;AAAA;AAAA,IACC,kBAAkB;AAAA,IAClB;AAAA,IACA,WAAW;AAAA,MACT,iBAAiB;AAAA,QACf,SAAS;AAAA,QACT,SAAS;AAAA,QACT,mBAAmB;AAAA,MACrB;AAAA,IACF;AAAA,IACA,WAAW;AAAA,IACX,kBACE,4CAAC,SACC;AAAA,MAAC;AAAA;AAAA,QACC,UAAU;AAAA,QACT,GAAG;AAAA,QACJ,WAAW,iBAAiB,QAAQ;AAAA,QACpC;AAAA,QACA;AAAA,QACA;AAAA;AAAA,IACF,GACF;AAAA,IAEF;AAAA;AACF;AAGF,mBAAmB,YAAY;AAAA,EAC7B,WAAW,kBAAAA,QAAU,UAAU,CAAC,kBAAAA,QAAU,MAAM,kBAAAA,QAAU,MAAM,EAAE,SAAS,kBAAAA,QAAU,IAAI,CAAC,CAAC,CAAC;AAAA,EAC5F,UAAU,kBAAAA,QAAU;AAAA,EACpB,UAAU,kBAAAA,QAAU;AAAA,EACpB,SAAS,kBAAAA,QAAU;AAAA,EACnB,QAAQ,kBAAAA,QAAU;AAAA,EAClB,MAAM,kBAAAA,QAAU;AAAA,EAChB,QAAQ,kBAAAA,QAAU;AAAA,EAClB,aAAa,kBAAAA,QAAU,MAAM,wCAAgB;AAC/C;AAGA,IAAO,6BAAQ;",
|
|
6
|
-
"names": ["PropTypes"]
|
|
7
|
-
}
|
|
@@ -1,79 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __create = Object.create;
|
|
3
|
-
var __defProp = Object.defineProperty;
|
|
4
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
-
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
-
var __export = (target, all) => {
|
|
9
|
-
for (var name in all)
|
|
10
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
|
-
};
|
|
12
|
-
var __copyProps = (to, from, except, desc) => {
|
|
13
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
14
|
-
for (let key of __getOwnPropNames(from))
|
|
15
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
16
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
17
|
-
}
|
|
18
|
-
return to;
|
|
19
|
-
};
|
|
20
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
-
// If the importer is in node compatibility mode or this is not an ESM
|
|
22
|
-
// file that has been converted to a CommonJS file using a Babel-
|
|
23
|
-
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
24
|
-
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
25
|
-
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
26
|
-
mod
|
|
27
|
-
));
|
|
28
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
|
-
var DatePickerHeader_exports = {};
|
|
30
|
-
__export(DatePickerHeader_exports, {
|
|
31
|
-
DatePickerHeader: () => DatePickerHeader,
|
|
32
|
-
default: () => DatePickerHeader_default
|
|
33
|
-
});
|
|
34
|
-
module.exports = __toCommonJS(DatePickerHeader_exports);
|
|
35
|
-
var React = __toESM(require("react"));
|
|
36
|
-
var import_jsx_runtime = require("react/jsx-runtime");
|
|
37
|
-
var import_react = require("react");
|
|
38
|
-
var import_prop_types = __toESM(require("prop-types"));
|
|
39
|
-
var import_moment = __toESM(require("moment"));
|
|
40
|
-
var import_ds_form = require("@elliemae/ds-form");
|
|
41
|
-
var import_ds_classnames = require("@elliemae/ds-classnames");
|
|
42
|
-
const DATE_FORMAT = "MMDDYYYY";
|
|
43
|
-
const blockname = "date-picker-header";
|
|
44
|
-
const Header = (0, import_ds_classnames.aggregatedClasses)("div")(blockname);
|
|
45
|
-
const isFn = (variable) => typeof variable === "function";
|
|
46
|
-
const DatePickerHeader = ({ onInputChange = () => null, selectedDate, updateKeyDate }) => {
|
|
47
|
-
const [value, setValue] = (0, import_react.useState)(isFn(selectedDate?.format) ? selectedDate.format(DATE_FORMAT) : "");
|
|
48
|
-
(0, import_react.useEffect)(() => {
|
|
49
|
-
if (isFn(selectedDate?.format)) {
|
|
50
|
-
setValue(selectedDate?.format(DATE_FORMAT));
|
|
51
|
-
}
|
|
52
|
-
}, [selectedDate]);
|
|
53
|
-
const handleOnChange = (newDate) => {
|
|
54
|
-
setValue(newDate);
|
|
55
|
-
};
|
|
56
|
-
const handleOnKeyDown = (e) => {
|
|
57
|
-
if (e.key === "Enter" && value.length === DATE_FORMAT.length) {
|
|
58
|
-
const momentValue = (0, import_moment.default)(value, DATE_FORMAT);
|
|
59
|
-
onInputChange(momentValue);
|
|
60
|
-
updateKeyDate(momentValue);
|
|
61
|
-
}
|
|
62
|
-
};
|
|
63
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Header, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ds_form.DSInputGroup, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
64
|
-
import_ds_form.DSDateInputV2,
|
|
65
|
-
{
|
|
66
|
-
onChange: handleOnChange,
|
|
67
|
-
onKeyDown: handleOnKeyDown,
|
|
68
|
-
value,
|
|
69
|
-
containerProps: { "data-testid": "start-date" }
|
|
70
|
-
}
|
|
71
|
-
) }) });
|
|
72
|
-
};
|
|
73
|
-
DatePickerHeader.propTypes = {
|
|
74
|
-
onInputChange: import_prop_types.default.func,
|
|
75
|
-
selectedDate: import_prop_types.default.any,
|
|
76
|
-
updateKeyDate: import_prop_types.default.any
|
|
77
|
-
};
|
|
78
|
-
var DatePickerHeader_default = DatePickerHeader;
|
|
79
|
-
//# sourceMappingURL=DatePickerHeader.js.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../../src/components/DatePickerHeader/DatePickerHeader.tsx", "../../../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
-
"sourcesContent": ["/* eslint-disable no-console */\nimport React, { useState, useEffect } from 'react';\nimport PropTypes from 'prop-types';\nimport moment from 'moment';\nimport { DSDateInputV2, DSInputGroup } from '@elliemae/ds-form';\nimport { aggregatedClasses } from '@elliemae/ds-classnames';\n\nconst DATE_FORMAT = 'MMDDYYYY';\nconst blockname = 'date-picker-header';\nconst Header = aggregatedClasses('div')(blockname);\n\nconst isFn = (variable) => typeof variable === 'function';\n\nconst DatePickerHeader = ({ onInputChange = () => null, selectedDate, updateKeyDate }) => {\n const [value, setValue] = useState(isFn(selectedDate?.format) ? selectedDate.format(DATE_FORMAT) : '');\n\n useEffect(() => {\n if (isFn(selectedDate?.format)) {\n setValue(selectedDate?.format(DATE_FORMAT));\n }\n }, [selectedDate]);\n\n const handleOnChange = (newDate) => {\n setValue(newDate);\n };\n\n const handleOnKeyDown = (e) => {\n if (e.key === 'Enter' && value.length === DATE_FORMAT.length) {\n const momentValue = moment(value, DATE_FORMAT);\n onInputChange(momentValue);\n updateKeyDate(momentValue);\n }\n };\n\n return (\n <Header>\n <DSInputGroup>\n <DSDateInputV2\n onChange={handleOnChange}\n onKeyDown={handleOnKeyDown}\n value={value}\n containerProps={{ 'data-testid': 'start-date' }}\n />\n </DSInputGroup>\n </Header>\n );\n};\n\nDatePickerHeader.propTypes = {\n onInputChange: PropTypes.func,\n selectedDate: PropTypes.any,\n updateKeyDate: PropTypes.any,\n};\n\nexport { DatePickerHeader };\nexport default DatePickerHeader;\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADqCf;AApCR,mBAA2C;AAC3C,wBAAsB;AACtB,oBAAmB;AACnB,qBAA4C;AAC5C,2BAAkC;AAElC,MAAM,cAAc;AACpB,MAAM,YAAY;AAClB,MAAM,aAAS,wCAAkB,KAAK,EAAE,SAAS;AAEjD,MAAM,OAAO,CAAC,aAAa,OAAO,aAAa;AAE/C,MAAM,mBAAmB,CAAC,EAAE,gBAAgB,MAAM,MAAM,cAAc,cAAc,MAAM;AACxF,QAAM,CAAC,OAAO,QAAQ,QAAI,uBAAS,KAAK,cAAc,MAAM,IAAI,aAAa,OAAO,WAAW,IAAI,EAAE;AAErG,8BAAU,MAAM;AACd,QAAI,KAAK,cAAc,MAAM,GAAG;AAC9B,eAAS,cAAc,OAAO,WAAW,CAAC;AAAA,IAC5C;AAAA,EACF,GAAG,CAAC,YAAY,CAAC;AAEjB,QAAM,iBAAiB,CAAC,YAAY;AAClC,aAAS,OAAO;AAAA,EAClB;AAEA,QAAM,kBAAkB,CAAC,MAAM;AAC7B,QAAI,EAAE,QAAQ,WAAW,MAAM,WAAW,YAAY,QAAQ;AAC5D,YAAM,kBAAc,cAAAA,SAAO,OAAO,WAAW;AAC7C,oBAAc,WAAW;AACzB,oBAAc,WAAW;AAAA,IAC3B;AAAA,EACF;AAEA,SACE,4CAAC,UACC,sDAAC,+BACC;AAAA,IAAC;AAAA;AAAA,MACC,UAAU;AAAA,MACV,WAAW;AAAA,MACX;AAAA,MACA,gBAAgB,EAAE,eAAe,aAAa;AAAA;AAAA,EAChD,GACF,GACF;AAEJ;AAEA,iBAAiB,YAAY;AAAA,EAC3B,eAAe,kBAAAC,QAAU;AAAA,EACzB,cAAc,kBAAAA,QAAU;AAAA,EACxB,eAAe,kBAAAA,QAAU;AAC3B;AAGA,IAAO,2BAAQ;",
|
|
6
|
-
"names": ["moment", "PropTypes"]
|
|
7
|
-
}
|
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __create = Object.create;
|
|
3
|
-
var __defProp = Object.defineProperty;
|
|
4
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
-
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
-
var __export = (target, all) => {
|
|
9
|
-
for (var name in all)
|
|
10
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
|
-
};
|
|
12
|
-
var __copyProps = (to, from, except, desc) => {
|
|
13
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
14
|
-
for (let key of __getOwnPropNames(from))
|
|
15
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
16
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
17
|
-
}
|
|
18
|
-
return to;
|
|
19
|
-
};
|
|
20
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
-
// If the importer is in node compatibility mode or this is not an ESM
|
|
22
|
-
// file that has been converted to a CommonJS file using a Babel-
|
|
23
|
-
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
24
|
-
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
25
|
-
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
26
|
-
mod
|
|
27
|
-
));
|
|
28
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
|
-
var DatePickerNavigation_exports = {};
|
|
30
|
-
__export(DatePickerNavigation_exports, {
|
|
31
|
-
DatePickerNavigation: () => Navigation,
|
|
32
|
-
default: () => DatePickerNavigation_default
|
|
33
|
-
});
|
|
34
|
-
module.exports = __toCommonJS(DatePickerNavigation_exports);
|
|
35
|
-
var React = __toESM(require("react"));
|
|
36
|
-
var import_jsx_runtime = require("react/jsx-runtime");
|
|
37
|
-
var import_prop_types = __toESM(require("prop-types"));
|
|
38
|
-
var import_ds_icons = require("@elliemae/ds-icons");
|
|
39
|
-
var import_ds_icon = require("@elliemae/ds-icon");
|
|
40
|
-
var import_ds_shared = require("@elliemae/ds-shared");
|
|
41
|
-
const Navigation = ({
|
|
42
|
-
className = "date-picker-navigation",
|
|
43
|
-
icon: Icon = import_ds_icons.ChevronRight,
|
|
44
|
-
color = import_ds_icon.DSIconColors.NEUTRAL,
|
|
45
|
-
size = import_ds_icon.DSIconSizes.S,
|
|
46
|
-
innerRef
|
|
47
|
-
}) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { tabIndex: 0, "data-testid": "date-picker-nav", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Icon, { className, color, innerRef, size }) });
|
|
48
|
-
Navigation.propTypes = {
|
|
49
|
-
className: "date-picker-navigation",
|
|
50
|
-
icon: import_prop_types.default.element,
|
|
51
|
-
color: import_prop_types.default.oneOf(import_ds_shared.iconColors),
|
|
52
|
-
size: import_prop_types.default.oneOf(import_ds_shared.iconSizes),
|
|
53
|
-
innerRef: import_prop_types.default.any
|
|
54
|
-
};
|
|
55
|
-
var DatePickerNavigation_default = Navigation;
|
|
56
|
-
//# sourceMappingURL=DatePickerNavigation.js.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../../src/components/DatePickerNavigation/DatePickerNavigation.tsx", "../../../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
-
"sourcesContent": ["import React from 'react';\nimport PropTypes from 'prop-types';\nimport { ChevronRight } from '@elliemae/ds-icons';\nimport { DSIconColors, DSIconSizes } from '@elliemae/ds-icon';\nimport { iconSizes, iconColors } from '@elliemae/ds-shared';\n\nconst Navigation = ({\n className = 'date-picker-navigation',\n icon: Icon = ChevronRight,\n color = DSIconColors.NEUTRAL,\n size = DSIconSizes.S,\n innerRef,\n}) => (\n <div tabIndex={0} data-testid=\"date-picker-nav\">\n <Icon className={className} color={color} innerRef={innerRef} size={size} />\n </div>\n);\nNavigation.propTypes = {\n className: 'date-picker-navigation',\n icon: PropTypes.element,\n color: PropTypes.oneOf(iconColors),\n size: PropTypes.oneOf(iconSizes),\n innerRef: PropTypes.any,\n};\n\nexport { Navigation as DatePickerNavigation };\nexport default Navigation;\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADcnB;AAbJ,wBAAsB;AACtB,sBAA6B;AAC7B,qBAA0C;AAC1C,uBAAsC;AAEtC,MAAM,aAAa,CAAC;AAAA,EAClB,YAAY;AAAA,EACZ,MAAM,OAAO;AAAA,EACb,QAAQ,4BAAa;AAAA,EACrB,OAAO,2BAAY;AAAA,EACnB;AACF,MACE,4CAAC,SAAI,UAAU,GAAG,eAAY,mBAC5B,sDAAC,QAAK,WAAsB,OAAc,UAAoB,MAAY,GAC5E;AAEF,WAAW,YAAY;AAAA,EACrB,WAAW;AAAA,EACX,MAAM,kBAAAA,QAAU;AAAA,EAChB,OAAO,kBAAAA,QAAU,MAAM,2BAAU;AAAA,EACjC,MAAM,kBAAAA,QAAU,MAAM,0BAAS;AAAA,EAC/B,UAAU,kBAAAA,QAAU;AACtB;AAGA,IAAO,+BAAQ;",
|
|
6
|
-
"names": ["PropTypes"]
|
|
7
|
-
}
|
|
@@ -1,89 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __create = Object.create;
|
|
3
|
-
var __defProp = Object.defineProperty;
|
|
4
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
-
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
-
var __export = (target, all) => {
|
|
9
|
-
for (var name in all)
|
|
10
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
|
-
};
|
|
12
|
-
var __copyProps = (to, from, except, desc) => {
|
|
13
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
14
|
-
for (let key of __getOwnPropNames(from))
|
|
15
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
16
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
17
|
-
}
|
|
18
|
-
return to;
|
|
19
|
-
};
|
|
20
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
-
// If the importer is in node compatibility mode or this is not an ESM
|
|
22
|
-
// file that has been converted to a CommonJS file using a Babel-
|
|
23
|
-
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
24
|
-
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
25
|
-
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
26
|
-
mod
|
|
27
|
-
));
|
|
28
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
|
-
var DatePickerPicker_exports = {};
|
|
30
|
-
__export(DatePickerPicker_exports, {
|
|
31
|
-
DatePickerPicker: () => Picker,
|
|
32
|
-
Picker: () => Picker,
|
|
33
|
-
PickerPropsTypes: () => PickerPropsTypes,
|
|
34
|
-
default: () => DatePickerPicker_default
|
|
35
|
-
});
|
|
36
|
-
module.exports = __toCommonJS(DatePickerPicker_exports);
|
|
37
|
-
var React = __toESM(require("react"));
|
|
38
|
-
var import_jsx_runtime = require("react/jsx-runtime");
|
|
39
|
-
var import_ds_props_helpers = require("@elliemae/ds-props-helpers");
|
|
40
|
-
var import_ds_icon = require("@elliemae/ds-icon");
|
|
41
|
-
var import_ds_icons = require("@elliemae/ds-icons");
|
|
42
|
-
var import_ds_button = require("@elliemae/ds-button");
|
|
43
|
-
var import_ds_shared = require("@elliemae/ds-shared");
|
|
44
|
-
const Picker = ({
|
|
45
|
-
className = "date-picker-icon",
|
|
46
|
-
disabled = false,
|
|
47
|
-
icon = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ds_icons.DatePicker, {}),
|
|
48
|
-
size = import_ds_icon.DSIconSizes.M,
|
|
49
|
-
buttonActionType = "secondary",
|
|
50
|
-
onClick = () => null,
|
|
51
|
-
onBlur = () => null,
|
|
52
|
-
readOnly = false,
|
|
53
|
-
tabIndex = 0,
|
|
54
|
-
innerRef,
|
|
55
|
-
...rest
|
|
56
|
-
}) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
57
|
-
import_ds_button.DSButton,
|
|
58
|
-
{
|
|
59
|
-
innerRef,
|
|
60
|
-
"aria-label": rest["aria-label"] || "Date Picker Button",
|
|
61
|
-
buttonType: buttonActionType,
|
|
62
|
-
className,
|
|
63
|
-
color: !disabled ? import_ds_icon.DSIconColors.PRIMARY : import_ds_icon.DSIconColors.NEUTRAL,
|
|
64
|
-
disabled,
|
|
65
|
-
icon,
|
|
66
|
-
onBlur,
|
|
67
|
-
onClick,
|
|
68
|
-
readOnly,
|
|
69
|
-
size,
|
|
70
|
-
tabIndex,
|
|
71
|
-
"data-testid": "btn-date-picker"
|
|
72
|
-
}
|
|
73
|
-
);
|
|
74
|
-
const PickerPropsTypes = {
|
|
75
|
-
innerRef: import_ds_props_helpers.PropTypes.oneOfType([import_ds_props_helpers.PropTypes.func, import_ds_props_helpers.PropTypes.shape({ current: import_ds_props_helpers.PropTypes.any })]),
|
|
76
|
-
className: import_ds_props_helpers.PropTypes.string,
|
|
77
|
-
disabled: import_ds_props_helpers.PropTypes.bool,
|
|
78
|
-
icon: import_ds_props_helpers.PropTypes.element,
|
|
79
|
-
size: import_ds_props_helpers.PropTypes.oneOf(import_ds_shared.iconSizes),
|
|
80
|
-
buttonActionType: import_ds_props_helpers.PropTypes.oneOf(import_ds_button.buttonTypes),
|
|
81
|
-
onClick: import_ds_props_helpers.PropTypes.func,
|
|
82
|
-
onFocus: import_ds_props_helpers.PropTypes.func,
|
|
83
|
-
onBlur: import_ds_props_helpers.PropTypes.func,
|
|
84
|
-
readOnly: import_ds_props_helpers.PropTypes.bool,
|
|
85
|
-
tabIndex: import_ds_props_helpers.PropTypes.number
|
|
86
|
-
};
|
|
87
|
-
Picker.propTypes = PickerPropsTypes;
|
|
88
|
-
var DatePickerPicker_default = Picker;
|
|
89
|
-
//# sourceMappingURL=DatePickerPicker.js.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../../src/components/DatePickerPicker/DatePickerPicker.tsx", "../../../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
-
"sourcesContent": ["import React from 'react';\nimport { PropTypes } from '@elliemae/ds-props-helpers';\nimport { DSIconColors, DSIconSizes } from '@elliemae/ds-icon';\nimport { DatePicker } from '@elliemae/ds-icons';\nimport { DSButton, buttonTypes } from '@elliemae/ds-button';\nimport { iconSizes } from '@elliemae/ds-shared';\n\nexport const Picker = ({\n className = 'date-picker-icon',\n disabled = false,\n icon = <DatePicker />,\n size = DSIconSizes.M,\n buttonActionType = 'secondary',\n onClick = () => null,\n onBlur = () => null,\n readOnly = false,\n tabIndex = 0,\n innerRef,\n ...rest\n}) => (\n <DSButton\n innerRef={innerRef}\n aria-label={rest['aria-label'] || 'Date Picker Button'}\n buttonType={buttonActionType}\n className={className}\n color={!disabled ? DSIconColors.PRIMARY : DSIconColors.NEUTRAL}\n disabled={disabled}\n icon={icon}\n onBlur={onBlur}\n onClick={onClick}\n readOnly={readOnly}\n size={size}\n tabIndex={tabIndex}\n data-testid=\"btn-date-picker\"\n />\n);\n\nexport const PickerPropsTypes = {\n innerRef: PropTypes.oneOfType([PropTypes.func, PropTypes.shape({ current: PropTypes.any })]),\n className: PropTypes.string,\n disabled: PropTypes.bool,\n icon: PropTypes.element,\n size: PropTypes.oneOf(iconSizes),\n buttonActionType: PropTypes.oneOf(buttonTypes),\n onClick: PropTypes.func,\n onFocus: PropTypes.func,\n onBlur: PropTypes.func,\n readOnly: PropTypes.bool,\n tabIndex: PropTypes.number,\n};\n\nPicker.propTypes = PickerPropsTypes;\n\nexport { Picker as DatePickerPicker };\nexport default Picker;\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADUd;AATT,8BAA0B;AAC1B,qBAA0C;AAC1C,sBAA2B;AAC3B,uBAAsC;AACtC,uBAA0B;AAEnB,MAAM,SAAS,CAAC;AAAA,EACrB,YAAY;AAAA,EACZ,WAAW;AAAA,EACX,OAAO,4CAAC,8BAAW;AAAA,EACnB,OAAO,2BAAY;AAAA,EACnB,mBAAmB;AAAA,EACnB,UAAU,MAAM;AAAA,EAChB,SAAS,MAAM;AAAA,EACf,WAAW;AAAA,EACX,WAAW;AAAA,EACX;AAAA,EACA,GAAG;AACL,MACE;AAAA,EAAC;AAAA;AAAA,IACC;AAAA,IACA,cAAY,KAAK,YAAY,KAAK;AAAA,IAClC,YAAY;AAAA,IACZ;AAAA,IACA,OAAO,CAAC,WAAW,4BAAa,UAAU,4BAAa;AAAA,IACvD;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA,eAAY;AAAA;AACd;AAGK,MAAM,mBAAmB;AAAA,EAC9B,UAAU,kCAAU,UAAU,CAAC,kCAAU,MAAM,kCAAU,MAAM,EAAE,SAAS,kCAAU,IAAI,CAAC,CAAC,CAAC;AAAA,EAC3F,WAAW,kCAAU;AAAA,EACrB,UAAU,kCAAU;AAAA,EACpB,MAAM,kCAAU;AAAA,EAChB,MAAM,kCAAU,MAAM,0BAAS;AAAA,EAC/B,kBAAkB,kCAAU,MAAM,4BAAW;AAAA,EAC7C,SAAS,kCAAU;AAAA,EACnB,SAAS,kCAAU;AAAA,EACnB,QAAQ,kCAAU;AAAA,EAClB,UAAU,kCAAU;AAAA,EACpB,UAAU,kCAAU;AACtB;AAEA,OAAO,YAAY;AAGnB,IAAO,2BAAQ;",
|
|
6
|
-
"names": []
|
|
7
|
-
}
|
|
@@ -1,110 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __create = Object.create;
|
|
3
|
-
var __defProp = Object.defineProperty;
|
|
4
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
-
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
-
var __export = (target, all) => {
|
|
9
|
-
for (var name in all)
|
|
10
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
|
-
};
|
|
12
|
-
var __copyProps = (to, from, except, desc) => {
|
|
13
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
14
|
-
for (let key of __getOwnPropNames(from))
|
|
15
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
16
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
17
|
-
}
|
|
18
|
-
return to;
|
|
19
|
-
};
|
|
20
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
-
// If the importer is in node compatibility mode or this is not an ESM
|
|
22
|
-
// file that has been converted to a CommonJS file using a Babel-
|
|
23
|
-
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
24
|
-
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
25
|
-
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
26
|
-
mod
|
|
27
|
-
));
|
|
28
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
|
-
var DatePickerRange_exports = {};
|
|
30
|
-
__export(DatePickerRange_exports, {
|
|
31
|
-
DatePickerRangeDate: () => DatePickerRangeDate,
|
|
32
|
-
default: () => DatePickerRange_default
|
|
33
|
-
});
|
|
34
|
-
module.exports = __toCommonJS(DatePickerRange_exports);
|
|
35
|
-
var React = __toESM(require("react"));
|
|
36
|
-
var import_jsx_runtime = require("react/jsx-runtime");
|
|
37
|
-
var import_react = require("react");
|
|
38
|
-
var import_react_dates = require("react-dates");
|
|
39
|
-
var import_moment = __toESM(require("moment"));
|
|
40
|
-
var import_ds_classnames = require("@elliemae/ds-classnames");
|
|
41
|
-
var import_ds_icons = require("@elliemae/ds-icons");
|
|
42
|
-
var import_DatePickerDay = require("../DatePickerDay/DatePickerDay.js");
|
|
43
|
-
var import_DatePickerNavigation = require("../DatePickerNavigation/DatePickerNavigation.js");
|
|
44
|
-
var import_DatePickerRangeHeader = require("../DatePickerRangeHeader/DatePickerRangeHeader.js");
|
|
45
|
-
const blockname = "date-range";
|
|
46
|
-
const Wrapper = (0, import_ds_classnames.aggregatedClasses)("div")(blockname, "wrapper");
|
|
47
|
-
const { classNameElement, classNameBlock } = (0, import_ds_classnames.convertPropToCssClassName)("datepicker");
|
|
48
|
-
const START_DATE = "startDate";
|
|
49
|
-
const END_DATE = "endDate";
|
|
50
|
-
const DatePickerRangeDate = ({ dateStart, dateEnd, displayFormatDay = "D", showHeader = true, otherProps }) => {
|
|
51
|
-
const [selectedDateStart, setSelectedDateStart] = (0, import_react.useState)(dateStart);
|
|
52
|
-
const [selectedDateEnd, setSelectedDateEnd] = (0, import_react.useState)(dateEnd);
|
|
53
|
-
const [focusedInput, setFocusedInput] = (0, import_react.useState)(START_DATE);
|
|
54
|
-
const datePickerRef = (0, import_react.useRef)();
|
|
55
|
-
const handleFocusChange = () => {
|
|
56
|
-
setFocusedInput(focusedInput === START_DATE ? END_DATE : START_DATE);
|
|
57
|
-
};
|
|
58
|
-
const handleDatesChange = ({ startDate, endDate }) => {
|
|
59
|
-
setSelectedDateStart(startDate);
|
|
60
|
-
setSelectedDateEnd(endDate);
|
|
61
|
-
};
|
|
62
|
-
const handleStartInputChange = (newDate) => {
|
|
63
|
-
setSelectedDateStart(newDate);
|
|
64
|
-
};
|
|
65
|
-
const handleEndInputChange = (newDate) => {
|
|
66
|
-
setSelectedDateEnd(newDate);
|
|
67
|
-
};
|
|
68
|
-
const getSafeDateStartValue = () => {
|
|
69
|
-
if (selectedDateStart) {
|
|
70
|
-
return (0, import_moment.default)(selectedDateStart);
|
|
71
|
-
}
|
|
72
|
-
};
|
|
73
|
-
const getSafeDateEndValue = () => {
|
|
74
|
-
if (selectedDateEnd) {
|
|
75
|
-
return (0, import_moment.default)(selectedDateEnd);
|
|
76
|
-
}
|
|
77
|
-
};
|
|
78
|
-
const safeStartDate = getSafeDateStartValue();
|
|
79
|
-
const safeEndDate = getSafeDateEndValue();
|
|
80
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(Wrapper, { children: [
|
|
81
|
-
showHeader && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
82
|
-
import_DatePickerRangeHeader.DatePickerRangeHeader,
|
|
83
|
-
{
|
|
84
|
-
onEndInputChange: handleEndInputChange,
|
|
85
|
-
onStartInputChange: handleStartInputChange,
|
|
86
|
-
selectedEndDate: safeEndDate,
|
|
87
|
-
selectedStartDate: safeStartDate
|
|
88
|
-
}
|
|
89
|
-
),
|
|
90
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { ref: datePickerRef, className: classNameBlock("wrapper-day-picker-single-date-controller"), children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
91
|
-
import_react_dates.DayPickerRangeController,
|
|
92
|
-
{
|
|
93
|
-
...otherProps,
|
|
94
|
-
enableOutsideDays: true,
|
|
95
|
-
endDate: safeEndDate,
|
|
96
|
-
focused: true,
|
|
97
|
-
focusedInput,
|
|
98
|
-
hideKeyboardShortcutsPanel: true,
|
|
99
|
-
navNext: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_DatePickerNavigation.DatePickerNavigation, { className: classNameElement("navigation-next") }),
|
|
100
|
-
navPrev: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_DatePickerNavigation.DatePickerNavigation, { className: classNameElement("navigation-prev"), icon: import_ds_icons.ChevronLeft }),
|
|
101
|
-
onDatesChange: handleDatesChange,
|
|
102
|
-
onFocusChange: handleFocusChange,
|
|
103
|
-
renderDayContents: (date) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_DatePickerDay.DatePickerDay, { className: classNameElement("day-contents"), date: date.format(displayFormatDay) }),
|
|
104
|
-
startDate: safeStartDate
|
|
105
|
-
}
|
|
106
|
-
) })
|
|
107
|
-
] });
|
|
108
|
-
};
|
|
109
|
-
var DatePickerRange_default = DatePickerRangeDate;
|
|
110
|
-
//# sourceMappingURL=DatePickerRange.js.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../../src/components/DatePickerRange/DatePickerRange.tsx", "../../../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
-
"sourcesContent": ["/* eslint-disable react/prop-types */\n/* eslint-disable consistent-return */\nimport React, { useState, useRef } from 'react';\nimport { DayPickerRangeController } from 'react-dates';\nimport moment from 'moment';\nimport { aggregatedClasses, convertPropToCssClassName } from '@elliemae/ds-classnames';\nimport { ChevronLeft } from '@elliemae/ds-icons';\nimport { DatePickerDay } from '../DatePickerDay/DatePickerDay.js';\nimport { DatePickerNavigation } from '../DatePickerNavigation/DatePickerNavigation.js';\nimport { DatePickerRangeHeader } from '../DatePickerRangeHeader/DatePickerRangeHeader.js';\n\nconst blockname = 'date-range';\nconst Wrapper = aggregatedClasses('div')(blockname, 'wrapper');\n\nconst { classNameElement, classNameBlock } = convertPropToCssClassName('datepicker');\n\nconst START_DATE = 'startDate';\nconst END_DATE = 'endDate';\n\nconst DatePickerRangeDate = ({ dateStart, dateEnd, displayFormatDay = 'D', showHeader = true, otherProps }) => {\n const [selectedDateStart, setSelectedDateStart] = useState(dateStart);\n const [selectedDateEnd, setSelectedDateEnd] = useState(dateEnd);\n const [focusedInput, setFocusedInput] = useState(START_DATE);\n const datePickerRef = useRef();\n\n const handleFocusChange = () => {\n setFocusedInput(focusedInput === START_DATE ? END_DATE : START_DATE);\n };\n\n const handleDatesChange = ({ startDate, endDate }) => {\n setSelectedDateStart(startDate);\n setSelectedDateEnd(endDate);\n };\n\n const handleStartInputChange = (newDate) => {\n setSelectedDateStart(newDate);\n };\n\n const handleEndInputChange = (newDate) => {\n setSelectedDateEnd(newDate);\n };\n\n const getSafeDateStartValue = () => {\n if (selectedDateStart) {\n return moment(selectedDateStart);\n }\n };\n\n const getSafeDateEndValue = () => {\n if (selectedDateEnd) {\n return moment(selectedDateEnd);\n }\n };\n\n const safeStartDate = getSafeDateStartValue();\n const safeEndDate = getSafeDateEndValue();\n\n return (\n <Wrapper>\n {showHeader && (\n <DatePickerRangeHeader\n onEndInputChange={handleEndInputChange}\n onStartInputChange={handleStartInputChange}\n selectedEndDate={safeEndDate}\n selectedStartDate={safeStartDate}\n />\n )}\n <div ref={datePickerRef} className={classNameBlock('wrapper-day-picker-single-date-controller')}>\n <DayPickerRangeController\n {...otherProps}\n enableOutsideDays\n endDate={safeEndDate}\n focused\n focusedInput={focusedInput}\n hideKeyboardShortcutsPanel\n navNext={<DatePickerNavigation className={classNameElement('navigation-next')} />}\n navPrev={<DatePickerNavigation className={classNameElement('navigation-prev')} icon={ChevronLeft} />}\n onDatesChange={handleDatesChange}\n onFocusChange={handleFocusChange}\n renderDayContents={(date) => (\n <DatePickerDay className={classNameElement('day-contents')} date={date.format(displayFormatDay)} />\n )}\n startDate={safeStartDate}\n />\n </div>\n </Wrapper>\n );\n};\n\nexport { DatePickerRangeDate };\nexport default DatePickerRangeDate;\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;AD0DnB;AAxDJ,mBAAwC;AACxC,yBAAyC;AACzC,oBAAmB;AACnB,2BAA6D;AAC7D,sBAA4B;AAC5B,2BAA8B;AAC9B,kCAAqC;AACrC,mCAAsC;AAEtC,MAAM,YAAY;AAClB,MAAM,cAAU,wCAAkB,KAAK,EAAE,WAAW,SAAS;AAE7D,MAAM,EAAE,kBAAkB,eAAe,QAAI,gDAA0B,YAAY;AAEnF,MAAM,aAAa;AACnB,MAAM,WAAW;AAEjB,MAAM,sBAAsB,CAAC,EAAE,WAAW,SAAS,mBAAmB,KAAK,aAAa,MAAM,WAAW,MAAM;AAC7G,QAAM,CAAC,mBAAmB,oBAAoB,QAAI,uBAAS,SAAS;AACpE,QAAM,CAAC,iBAAiB,kBAAkB,QAAI,uBAAS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