@elliemae/ds-date-picker 2.2.0-next.4 → 2.3.0-alpha.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/cjs/DSDatePicker.js +219 -221
- package/cjs/DSDatePicker.js.map +7 -0
- package/cjs/components/DSDatePickerImpl.js +128 -208
- package/cjs/components/DSDatePickerImpl.js.map +7 -0
- package/cjs/components/DatePickerController/DatePickerController.js +204 -242
- package/cjs/components/DatePickerController/DatePickerController.js.map +7 -0
- package/cjs/components/DatePickerDay/DatePickerDay.js +48 -23
- package/cjs/components/DatePickerDay/DatePickerDay.js.map +7 -0
- package/cjs/components/DatePickerDropdown.js +74 -54
- package/cjs/components/DatePickerDropdown.js.map +7 -0
- package/cjs/components/DatePickerHeader/DatePickerHeader.js +62 -44
- package/cjs/components/DatePickerHeader/DatePickerHeader.js.map +7 -0
- package/cjs/components/DatePickerNavigation/DatePickerNavigation.js +62 -31
- package/cjs/components/DatePickerNavigation/DatePickerNavigation.js.map +7 -0
- package/cjs/components/DatePickerPicker/DatePickerPicker.js +82 -71
- package/cjs/components/DatePickerPicker/DatePickerPicker.js.map +7 -0
- package/cjs/components/DatePickerRange/DatePickerRange.js +84 -93
- package/cjs/components/DatePickerRange/DatePickerRange.js.map +7 -0
- package/cjs/components/DatePickerRangeHeader/DatePickerRangeHeader.js +91 -97
- package/cjs/components/DatePickerRangeHeader/DatePickerRangeHeader.js.map +7 -0
- package/cjs/components/DatePickerRenderMonth/DatePickerRenderMonth.js +60 -45
- package/cjs/components/DatePickerRenderMonth/DatePickerRenderMonth.js.map +7 -0
- package/cjs/components/DatePickerSingleDate/DatePickerSingleDate.js +88 -77
- package/cjs/components/DatePickerSingleDate/DatePickerSingleDate.js.map +7 -0
- package/cjs/components/SingleRangeDateSwitcher/SingleRangeDateSwitcher.js +69 -48
- package/cjs/components/SingleRangeDateSwitcher/SingleRangeDateSwitcher.js.map +7 -0
- package/cjs/components/index.js +53 -27
- package/cjs/components/index.js.map +7 -0
- package/cjs/defaultPhrases.js +77 -92
- package/cjs/defaultPhrases.js.map +7 -0
- package/cjs/index.js +38 -35
- package/cjs/index.js.map +7 -0
- package/esm/DSDatePicker.js +171 -169
- package/esm/DSDatePicker.js.map +7 -0
- package/esm/components/DSDatePickerImpl.js +88 -189
- package/esm/components/DSDatePickerImpl.js.map +7 -0
- package/esm/components/DatePickerController/DatePickerController.js +141 -198
- package/esm/components/DatePickerController/DatePickerController.js.map +7 -0
- package/esm/components/DatePickerDay/DatePickerDay.js +19 -17
- package/esm/components/DatePickerDay/DatePickerDay.js.map +7 -0
- package/esm/components/DatePickerDropdown.js +45 -46
- package/esm/components/DatePickerDropdown.js.map +7 -0
- package/esm/components/DatePickerHeader/DatePickerHeader.js +31 -35
- package/esm/components/DatePickerHeader/DatePickerHeader.js.map +7 -0
- package/esm/components/DatePickerNavigation/DatePickerNavigation.js +36 -24
- package/esm/components/DatePickerNavigation/DatePickerNavigation.js.map +7 -0
- package/esm/components/DatePickerPicker/DatePickerPicker.js +44 -48
- package/esm/components/DatePickerPicker/DatePickerPicker.js.map +7 -0
- package/esm/components/DatePickerRange/DatePickerRange.js +49 -79
- package/esm/components/DatePickerRange/DatePickerRange.js.map +7 -0
- package/esm/components/DatePickerRangeHeader/DatePickerRangeHeader.js +50 -78
- package/esm/components/DatePickerRangeHeader/DatePickerRangeHeader.js.map +7 -0
- package/esm/components/DatePickerRenderMonth/DatePickerRenderMonth.js +31 -37
- package/esm/components/DatePickerRenderMonth/DatePickerRenderMonth.js.map +7 -0
- package/esm/components/DatePickerSingleDate/DatePickerSingleDate.js +56 -66
- package/esm/components/DatePickerSingleDate/DatePickerSingleDate.js.map +7 -0
- package/esm/components/SingleRangeDateSwitcher/SingleRangeDateSwitcher.js +40 -42
- package/esm/components/SingleRangeDateSwitcher/SingleRangeDateSwitcher.js.map +7 -0
- package/esm/components/index.js +24 -10
- package/esm/components/index.js.map +7 -0
- package/esm/defaultPhrases.js +48 -80
- package/esm/defaultPhrases.js.map +7 -0
- package/esm/index.js +9 -13
- package/esm/index.js.map +7 -0
- package/package.json +10 -10
- package/types/components/DSDatePickerImpl.d.ts +2 -1
- package/types/components/DatePickerController/DatePickerController.d.ts +1 -1
- package/types/components/DatePickerDay/DatePickerDay.d.ts +1 -0
- package/types/components/DatePickerDropdown.d.ts +1 -0
- package/types/components/DatePickerHeader/DatePickerHeader.d.ts +1 -0
- package/types/components/DatePickerNavigation/DatePickerNavigation.d.ts +4 -3
- package/types/components/DatePickerPicker/DatePickerPicker.d.ts +2 -1
- package/types/components/DatePickerRange/DatePickerRange.d.ts +1 -0
- package/types/components/DatePickerRangeHeader/DatePickerRangeHeader.d.ts +1 -0
- package/types/components/DatePickerSingleDate/DatePickerSingleDate.d.ts +1 -0
- package/types/components/SingleRangeDateSwitcher/SingleRangeDateSwitcher.d.ts +1 -0
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/defaultPhrases.tsx", "../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
+
"sourcesContent": ["const calendarLabel = 'Calendar';\nconst roleDescription = 'datepicker';\nconst closeDatePicker = 'Close';\nconst focusStartDate =\n 'Interact with the calendar and add the check-in date for your trip.';\nconst clearDate = 'Clear Date';\nconst clearDates = 'Clear Dates';\nconst jumpToPrevMonth = 'Move backward to switch to the previous month.';\nconst jumpToNextMonth = 'Move forward to switch to the next month.';\nconst keyboardShortcuts = 'Keyboard Shortcuts';\nconst showKeyboardShortcutsPanel = 'Open the keyboard shortcuts panel.';\nconst hideKeyboardShortcutsPanel = 'Close the shortcuts panel.';\nconst openThisPanel = 'Open this panel.';\nconst enterKey = 'Enter key';\nconst leftArrowRightArrow = 'Right and left arrow keys';\nconst upArrowDownArrow = 'up and down arrow keys';\nconst pageUpPageDown = 'page up and page down keys';\nconst homeEnd = 'Home and end keys';\nconst escape = 'Escape key';\nconst questionMark = 'Question mark';\nconst selectFocusedDate = 'Select the date in focus.';\nconst moveFocusByOneDay =\n 'Move backward (left) and forward (right) by one day.';\nconst moveFocusByOneWeek = 'Move backward (up) and forward (down) by one week.';\nconst moveFocusByOneMonth = 'Switch months.';\nconst moveFocustoStartAndEndOfWeek = 'Go to the first or last day of a week.';\nconst returnFocusToInput = 'Return to the date input field.';\nconst keyboardForwardNavigationInstructions =\n 'Navigate forward to interact with the calendar and select a date. Press the question mark key to get the keyboard shortcuts for changing dates.';\nconst keyboardBackwardNavigationInstructions =\n 'Navigate backward to interact with the calendar and select a date. Press the question mark key to get the keyboard shortcuts for changing dates.';\n\nconst chooseAvailableStartDate = ({ date }) =>\n `Choose ${date} as your check-in date. It\u2019s available.`;\nconst chooseAvailableEndDate = ({ date }) =>\n `Choose ${date} as your check-out date. It\u2019s available.`;\nconst chooseAvailableDate = ({ date }) => date;\nconst dateIsUnavailable = ({ date }) => `Not available. ${date}`;\nconst dateIsSelected = ({ date }) => `Selected. ${date}`;\nconst dateIsSelectedAsStartDate = ({ date }) =>\n `Selected as start date. ${date}`;\nconst dateIsSelectedAsEndDate = ({ date }) => `Selected as end date. ${date}`;\n\nexport default {\n calendarLabel,\n roleDescription,\n closeDatePicker,\n focusStartDate,\n clearDate,\n clearDates,\n jumpToPrevMonth,\n jumpToNextMonth,\n keyboardShortcuts,\n showKeyboardShortcutsPanel,\n hideKeyboardShortcutsPanel,\n openThisPanel,\n enterKey,\n leftArrowRightArrow,\n upArrowDownArrow,\n pageUpPageDown,\n homeEnd,\n escape,\n questionMark,\n selectFocusedDate,\n moveFocusByOneDay,\n moveFocusByOneWeek,\n moveFocusByOneMonth,\n moveFocustoStartAndEndOfWeek,\n returnFocusToInput,\n keyboardForwardNavigationInstructions,\n keyboardBackwardNavigationInstructions,\n\n chooseAvailableStartDate,\n chooseAvailableEndDate,\n dateIsUnavailable,\n dateIsSelected,\n dateIsSelectedAsStartDate,\n dateIsSelectedAsEndDate,\n};\n\nexport const DateRangePickerPhrases = {\n calendarLabel,\n roleDescription,\n closeDatePicker,\n clearDates,\n focusStartDate,\n jumpToPrevMonth,\n jumpToNextMonth,\n keyboardShortcuts,\n showKeyboardShortcutsPanel,\n hideKeyboardShortcutsPanel,\n openThisPanel,\n enterKey,\n leftArrowRightArrow,\n upArrowDownArrow,\n pageUpPageDown,\n homeEnd,\n escape,\n questionMark,\n selectFocusedDate,\n moveFocusByOneDay,\n moveFocusByOneWeek,\n moveFocusByOneMonth,\n moveFocustoStartAndEndOfWeek,\n returnFocusToInput,\n keyboardForwardNavigationInstructions,\n keyboardBackwardNavigationInstructions,\n chooseAvailableStartDate,\n chooseAvailableEndDate,\n dateIsUnavailable,\n dateIsSelected,\n dateIsSelectedAsStartDate,\n dateIsSelectedAsEndDate,\n};\n\nexport const DateRangePickerInputPhrases = {\n focusStartDate,\n clearDates,\n keyboardForwardNavigationInstructions,\n keyboardBackwardNavigationInstructions,\n};\n\nexport const SingleDatePickerPhrases = {\n calendarLabel,\n roleDescription,\n closeDatePicker,\n clearDate,\n jumpToPrevMonth,\n jumpToNextMonth,\n keyboardShortcuts,\n showKeyboardShortcutsPanel,\n hideKeyboardShortcutsPanel,\n openThisPanel,\n enterKey,\n leftArrowRightArrow,\n upArrowDownArrow,\n pageUpPageDown,\n homeEnd,\n escape,\n questionMark,\n selectFocusedDate,\n moveFocusByOneDay,\n moveFocusByOneWeek,\n moveFocusByOneMonth,\n moveFocustoStartAndEndOfWeek,\n returnFocusToInput,\n keyboardForwardNavigationInstructions,\n keyboardBackwardNavigationInstructions,\n chooseAvailableDate,\n dateIsUnavailable,\n dateIsSelected,\n};\n\nexport const SingleDatePickerInputPhrases = {\n clearDate,\n keyboardForwardNavigationInstructions,\n keyboardBackwardNavigationInstructions,\n};\n\nexport const DayPickerPhrases = {\n calendarLabel,\n roleDescription,\n jumpToPrevMonth,\n jumpToNextMonth,\n keyboardShortcuts,\n showKeyboardShortcutsPanel,\n hideKeyboardShortcutsPanel,\n openThisPanel,\n enterKey,\n leftArrowRightArrow,\n upArrowDownArrow,\n pageUpPageDown,\n homeEnd,\n escape,\n questionMark,\n selectFocusedDate,\n moveFocusByOneDay,\n moveFocusByOneWeek,\n moveFocusByOneMonth,\n moveFocustoStartAndEndOfWeek,\n returnFocusToInput,\n chooseAvailableStartDate,\n chooseAvailableEndDate,\n chooseAvailableDate,\n dateIsUnavailable,\n dateIsSelected,\n dateIsSelectedAsStartDate,\n dateIsSelectedAsEndDate,\n};\n\nexport const DayPickerKeyboardShortcutsPhrases = {\n keyboardShortcuts,\n showKeyboardShortcutsPanel,\n hideKeyboardShortcutsPanel,\n openThisPanel,\n enterKey,\n leftArrowRightArrow,\n upArrowDownArrow,\n pageUpPageDown,\n homeEnd,\n escape,\n questionMark,\n selectFocusedDate,\n moveFocusByOneDay,\n moveFocusByOneWeek,\n moveFocusByOneMonth,\n moveFocustoStartAndEndOfWeek,\n returnFocusToInput,\n};\n\nexport const DayPickerNavigationPhrases = {\n jumpToPrevMonth,\n jumpToNextMonth,\n};\n\nexport const CalendarDayPhrases = {\n chooseAvailableDate,\n dateIsUnavailable,\n dateIsSelected,\n dateIsSelectedAsStartDate,\n dateIsSelectedAsEndDate,\n};\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,MAAM,gBAAgB;AACtB,MAAM,kBAAkB;AACxB,MAAM,kBAAkB;AACxB,MAAM,iBACJ;AACF,MAAM,YAAY;AAClB,MAAM,aAAa;AACnB,MAAM,kBAAkB;AACxB,MAAM,kBAAkB;AACxB,MAAM,oBAAoB;AAC1B,MAAM,6BAA6B;AACnC,MAAM,6BAA6B;AACnC,MAAM,gBAAgB;AACtB,MAAM,WAAW;AACjB,MAAM,sBAAsB;AAC5B,MAAM,mBAAmB;AACzB,MAAM,iBAAiB;AACvB,MAAM,UAAU;AAChB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AAA,EACA;AAAA,EACA;AAAA,EACA;AAAA;AAGK,MAAM,8BAA8B;AAAA,EACzC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA;AAGK,MAAM,0BAA0B;AAAA,EACrC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA;AAGK,MAAM,+BAA+B;AAAA,EAC1C;AAAA,EACA;AAAA,EACA;AAAA;AAGK,MAAM,mBAAmB;AAAA,EAC9B;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA;AAGK,MAAM,oCAAoC;AAAA,EAC/C;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA;AAGK,MAAM,6BAA6B;AAAA,EACxC;AAAA,EACA;AAAA;AAGK,MAAM,qBAAqB;AAAA,EAChC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
package/cjs/index.js
CHANGED
|
@@ -1,35 +1,38 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
var
|
|
6
|
-
var
|
|
7
|
-
var
|
|
8
|
-
var
|
|
9
|
-
var
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
var
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
1
|
+
var __create = Object.create;
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __markAsModule = (target) => __defProp(target, "__esModule", { value: true });
|
|
8
|
+
var __export = (target, all) => {
|
|
9
|
+
for (var name in all)
|
|
10
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
|
+
};
|
|
12
|
+
var __reExport = (target, module2, copyDefault, desc) => {
|
|
13
|
+
if (module2 && typeof module2 === "object" || typeof module2 === "function") {
|
|
14
|
+
for (let key of __getOwnPropNames(module2))
|
|
15
|
+
if (!__hasOwnProp.call(target, key) && (copyDefault || key !== "default"))
|
|
16
|
+
__defProp(target, key, { get: () => module2[key], enumerable: !(desc = __getOwnPropDesc(module2, key)) || desc.enumerable });
|
|
17
|
+
}
|
|
18
|
+
return target;
|
|
19
|
+
};
|
|
20
|
+
var __toESM = (module2, isNodeMode) => {
|
|
21
|
+
return __reExport(__markAsModule(__defProp(module2 != null ? __create(__getProtoOf(module2)) : {}, "default", !isNodeMode && module2 && module2.__esModule ? { get: () => module2.default, enumerable: true } : { value: module2, enumerable: true })), module2);
|
|
22
|
+
};
|
|
23
|
+
var __toCommonJS = /* @__PURE__ */ ((cache) => {
|
|
24
|
+
return (module2, temp) => {
|
|
25
|
+
return cache && cache.get(module2) || (temp = __reExport(__markAsModule({}), module2, 1), cache && cache.set(module2, temp), temp);
|
|
26
|
+
};
|
|
27
|
+
})(typeof WeakMap !== "undefined" ? /* @__PURE__ */ new WeakMap() : 0);
|
|
28
|
+
var src_exports = {};
|
|
29
|
+
__export(src_exports, {
|
|
30
|
+
SingleDatePickerPhrases: () => import_defaultPhrases.SingleDatePickerPhrases,
|
|
31
|
+
default: () => import_DSDatePicker.default
|
|
32
|
+
});
|
|
33
|
+
var React = __toESM(require("react"));
|
|
34
|
+
var import_DSDatePicker = __toESM(require("./DSDatePicker"));
|
|
35
|
+
__reExport(src_exports, require("./DSDatePicker"));
|
|
36
|
+
var import_defaultPhrases = require("./defaultPhrases");
|
|
37
|
+
module.exports = __toCommonJS(src_exports);
|
|
38
|
+
//# sourceMappingURL=index.js.map
|
package/cjs/index.js.map
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/index.tsx", "../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
+
"sourcesContent": ["export { default } from './DSDatePicker';\nexport * from './DSDatePicker';\nexport { SingleDatePickerPhrases } from './defaultPhrases';\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,0BAAwB;AACxB,wBAAc;AACd,4BAAwC;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
package/esm/DSDatePicker.js
CHANGED
|
@@ -1,163 +1,149 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
isOutsideRange = () => false,
|
|
67
|
-
isDayHighlighted = () => false,
|
|
68
|
-
numberOfMonths = 1,
|
|
69
|
-
openDirection = 'down',
|
|
70
|
-
tabIndex = '',
|
|
71
|
-
zIndex = 1,
|
|
72
|
-
pickerProps = {},
|
|
73
|
-
calendarProps = {},
|
|
74
|
-
autoClear = false,
|
|
75
|
-
focusCurrentDate = false
|
|
76
|
-
} = _ref;
|
|
77
|
-
const {
|
|
78
|
-
cssClassName
|
|
79
|
-
} = convertPropToCssClassName('datepicker', className, {
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import React2 from "react";
|
|
3
|
+
import { PropTypes, describe } from "react-desc";
|
|
4
|
+
import "react-dates/initialize";
|
|
5
|
+
import { convertPropToCssClassName } from "@elliemae/ds-classnames";
|
|
6
|
+
import moment from "moment";
|
|
7
|
+
import { SingleDatePickerPhrases } from "./defaultPhrases";
|
|
8
|
+
import {
|
|
9
|
+
DatePickerNavigation,
|
|
10
|
+
DatePickerDay,
|
|
11
|
+
DatePickerPicker,
|
|
12
|
+
DatePickerDropdown,
|
|
13
|
+
DatePickerSingleDate,
|
|
14
|
+
DatePickerHeader,
|
|
15
|
+
DatePickerRange,
|
|
16
|
+
DatePickerRangeHeader,
|
|
17
|
+
SingleRangeDateSwitcher,
|
|
18
|
+
renderMonthElement
|
|
19
|
+
} from "./components";
|
|
20
|
+
import { DSDatePickerImpl } from "./components/DSDatePickerImpl";
|
|
21
|
+
import { DSDatePickerController } from "./components/DatePickerController/DatePickerController";
|
|
22
|
+
import { PickerPropsTypes, Picker } from "./components/DatePickerPicker/DatePickerPicker";
|
|
23
|
+
const DSDatePicker = ({
|
|
24
|
+
containerProps = {},
|
|
25
|
+
id = "",
|
|
26
|
+
appendToBody = true,
|
|
27
|
+
className = "",
|
|
28
|
+
date,
|
|
29
|
+
value,
|
|
30
|
+
placeholder = "",
|
|
31
|
+
disabled = false,
|
|
32
|
+
required = false,
|
|
33
|
+
readOnly = false,
|
|
34
|
+
hasError = false,
|
|
35
|
+
screenReaderInputMessage = "Select date",
|
|
36
|
+
enableOutsideDays = true,
|
|
37
|
+
initialVisibleMonth = moment(),
|
|
38
|
+
firstDayOfWeek = 0,
|
|
39
|
+
keepOpenOnDateSelect = false,
|
|
40
|
+
hideKeyboardShortcutsPanel = true,
|
|
41
|
+
onChange = () => null,
|
|
42
|
+
onDateChange = void 0,
|
|
43
|
+
onPrevMonthClick = () => null,
|
|
44
|
+
onNextMonthClick = () => null,
|
|
45
|
+
onClose = () => null,
|
|
46
|
+
onFocus = () => null,
|
|
47
|
+
onBlur = () => null,
|
|
48
|
+
phrases = SingleDatePickerPhrases,
|
|
49
|
+
displayFormat = "L",
|
|
50
|
+
displayFormatDay = "D",
|
|
51
|
+
transitionDuration = 0,
|
|
52
|
+
verticalSpacing = 0,
|
|
53
|
+
isDayBlocked = () => false,
|
|
54
|
+
isOutsideRange = () => false,
|
|
55
|
+
isDayHighlighted = () => false,
|
|
56
|
+
numberOfMonths = 1,
|
|
57
|
+
openDirection = "down",
|
|
58
|
+
tabIndex = "",
|
|
59
|
+
zIndex = 1,
|
|
60
|
+
pickerProps = {},
|
|
61
|
+
calendarProps = {},
|
|
62
|
+
autoClear = false,
|
|
63
|
+
focusCurrentDate = false
|
|
64
|
+
}) => {
|
|
65
|
+
const { cssClassName } = convertPropToCssClassName("datepicker", className, {
|
|
80
66
|
hasError,
|
|
81
67
|
readOnly,
|
|
82
68
|
disabled,
|
|
83
69
|
id
|
|
84
70
|
});
|
|
85
71
|
const safeDate = date || value;
|
|
86
|
-
return
|
|
87
|
-
className: cssClassName
|
|
88
|
-
|
|
89
|
-
style: {
|
|
90
|
-
|
|
72
|
+
return /* @__PURE__ */ React2.createElement("div", {
|
|
73
|
+
className: cssClassName,
|
|
74
|
+
...containerProps,
|
|
75
|
+
style: { minWidth: "140px" }
|
|
76
|
+
}, /* @__PURE__ */ React2.createElement(DSDatePickerImpl, {
|
|
77
|
+
appendToBody,
|
|
78
|
+
autoClear,
|
|
79
|
+
date: safeDate,
|
|
80
|
+
disabled,
|
|
81
|
+
displayFormat,
|
|
82
|
+
displayFormatDay,
|
|
83
|
+
enableOutsideDays,
|
|
84
|
+
firstDayOfWeek,
|
|
85
|
+
hideKeyboardShortcutsPanel,
|
|
86
|
+
initialVisibleMonth: () => initialVisibleMonth ? moment(initialVisibleMonth) : moment(safeDate),
|
|
87
|
+
isDayBlocked,
|
|
88
|
+
isDayHighlighted,
|
|
89
|
+
isOutsideRange: isOutsideRange === true || isOutsideRange === false ? () => isOutsideRange : isOutsideRange,
|
|
90
|
+
keepOpenOnDateSelect,
|
|
91
|
+
numberOfMonths,
|
|
92
|
+
onBlur,
|
|
93
|
+
onClose,
|
|
94
|
+
onChange,
|
|
95
|
+
onDateChange: (...args) => {
|
|
96
|
+
if (onDateChange)
|
|
97
|
+
onDateChange(...args);
|
|
91
98
|
},
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
onClose: onClose,
|
|
110
|
-
onChange: onChange,
|
|
111
|
-
onDateChange: function () {
|
|
112
|
-
if (onDateChange) onDateChange(...arguments);
|
|
113
|
-
},
|
|
114
|
-
onFocus: onFocus,
|
|
115
|
-
onNextMonthClick: onNextMonthClick,
|
|
116
|
-
onPrevMonthClick: onPrevMonthClick,
|
|
117
|
-
openDirection: openDirection,
|
|
118
|
-
phrases: phrases,
|
|
119
|
-
placeholder: placeholder,
|
|
120
|
-
readOnly: readOnly,
|
|
121
|
-
required: required,
|
|
122
|
-
screenReaderInputMessage: screenReaderInputMessage,
|
|
123
|
-
transitionDuration: transitionDuration,
|
|
124
|
-
value: safeDate,
|
|
125
|
-
verticalSpacing: verticalSpacing,
|
|
126
|
-
tabIndex: tabIndex,
|
|
127
|
-
zIndex: zIndex,
|
|
128
|
-
pickerProps: pickerProps,
|
|
129
|
-
calendarProps: calendarProps,
|
|
130
|
-
focusCurrentDate: focusCurrentDate
|
|
131
|
-
})
|
|
99
|
+
onFocus,
|
|
100
|
+
onNextMonthClick,
|
|
101
|
+
onPrevMonthClick,
|
|
102
|
+
openDirection,
|
|
103
|
+
phrases,
|
|
104
|
+
placeholder,
|
|
105
|
+
readOnly,
|
|
106
|
+
required,
|
|
107
|
+
screenReaderInputMessage,
|
|
108
|
+
transitionDuration,
|
|
109
|
+
value: safeDate,
|
|
110
|
+
verticalSpacing,
|
|
111
|
+
tabIndex,
|
|
112
|
+
zIndex,
|
|
113
|
+
pickerProps,
|
|
114
|
+
calendarProps,
|
|
115
|
+
focusCurrentDate
|
|
132
116
|
}));
|
|
133
117
|
};
|
|
134
|
-
|
|
135
118
|
const datePickerProps = {
|
|
136
|
-
containerProps: PropTypes.shape({}).description(
|
|
137
|
-
id: PropTypes.string.description(
|
|
138
|
-
appendToBody: PropTypes.bool.description(
|
|
139
|
-
className: PropTypes.string.description(
|
|
140
|
-
date: PropTypes.instanceOf(Date, moment).description(
|
|
141
|
-
value: PropTypes.instanceOf(Date, moment).description(
|
|
142
|
-
placeholder: PropTypes.string.description(
|
|
143
|
-
autoClear: PropTypes.bool.description(
|
|
144
|
-
disabled: PropTypes.bool.description(
|
|
145
|
-
required: PropTypes.bool.description(
|
|
146
|
-
readOnly: PropTypes.bool.description(
|
|
147
|
-
hasError: PropTypes.bool.description(
|
|
148
|
-
screenReaderInputMessage: PropTypes.string.description(
|
|
149
|
-
enableOutsideDays: PropTypes.bool.description(
|
|
150
|
-
initialVisibleMonth: PropTypes.instanceOf(Date, moment).description(
|
|
151
|
-
firstDayOfWeek: PropTypes.number.description(
|
|
152
|
-
keepOpenOnDateSelect: PropTypes.bool.description(
|
|
153
|
-
hideKeyboardShortcutsPanel: PropTypes.bool.description(
|
|
154
|
-
onChange: PropTypes.func.description(
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
119
|
+
containerProps: PropTypes.shape({}).description("Set of Properties attached to the main container"),
|
|
120
|
+
id: PropTypes.string.description("components id"),
|
|
121
|
+
appendToBody: PropTypes.bool.description("append component to body or not").defaultValue(true),
|
|
122
|
+
className: PropTypes.string.description("html class attribute"),
|
|
123
|
+
date: PropTypes.instanceOf(Date, moment).description("selected date").defaultValue(void 0),
|
|
124
|
+
value: PropTypes.instanceOf(Date, moment).description("value"),
|
|
125
|
+
placeholder: PropTypes.string.description("input placeholder value"),
|
|
126
|
+
autoClear: PropTypes.bool.description("autoclears the input onblur if the date is not completely set").defaultValue(false),
|
|
127
|
+
disabled: PropTypes.bool.description("disable component or not").defaultValue(false),
|
|
128
|
+
required: PropTypes.bool.description("value is required or not").defaultValue(false),
|
|
129
|
+
readOnly: PropTypes.bool.description("is read only or not").defaultValue(false),
|
|
130
|
+
hasError: PropTypes.bool.description("set error state").defaultValue(false),
|
|
131
|
+
screenReaderInputMessage: PropTypes.string.description("message to anounce by screen reader").defaultValue("select date"),
|
|
132
|
+
enableOutsideDays: PropTypes.bool.description("enable days oustide month or not").defaultValue(true),
|
|
133
|
+
initialVisibleMonth: PropTypes.instanceOf(Date, moment).description("initial month to display"),
|
|
134
|
+
firstDayOfWeek: PropTypes.number.description("first day of week").defaultValue(0),
|
|
135
|
+
keepOpenOnDateSelect: PropTypes.bool.description("keep picker open when a date is selected").defaultValue(false),
|
|
136
|
+
hideKeyboardShortcutsPanel: PropTypes.bool.description("hide keyabord shortcut panel or not").defaultValue(true),
|
|
137
|
+
onChange: PropTypes.func.description(`
|
|
138
|
+
function executed when input changes. This could trigger with invalid dates. It returns a string and a moment
|
|
139
|
+
if the date is valid.
|
|
140
|
+
`),
|
|
141
|
+
onDateChange: PropTypes.func.description("function executed when date changes. This doesnt trigger with invalid dates. It returns a moment object"),
|
|
142
|
+
onPrevMonthClick: PropTypes.func.description("function executed when clicking on prev month button"),
|
|
143
|
+
onNextMonthClick: PropTypes.func.description("function executed when clicking on next month button"),
|
|
144
|
+
onBlur: PropTypes.func.description("function executed when component loses focus"),
|
|
145
|
+
onClose: PropTypes.func.description("function executed when component closes"),
|
|
146
|
+
onFocus: PropTypes.func.description("function executed when component gains focus"),
|
|
161
147
|
phrases: PropTypes.shape({
|
|
162
148
|
calendarLabel: PropTypes.string,
|
|
163
149
|
closeDatePicker: PropTypes.string,
|
|
@@ -187,25 +173,41 @@ const datePickerProps = {
|
|
|
187
173
|
chooseAvailableEndDate: PropTypes.func,
|
|
188
174
|
dateIsUnavailable: PropTypes.func,
|
|
189
175
|
dateIsSelected: PropTypes.func
|
|
190
|
-
}).description(
|
|
191
|
-
displayFormat: PropTypes.string.description(
|
|
192
|
-
displayFormatDay: PropTypes.string.description(
|
|
193
|
-
transitionDuration: PropTypes.number.description(
|
|
194
|
-
verticalSpacing: PropTypes.number.description(
|
|
195
|
-
isDayBlocked: PropTypes.func.description(
|
|
196
|
-
isOutsideRange: PropTypes.func.description(
|
|
197
|
-
isDayHighlighted: PropTypes.func.description(
|
|
198
|
-
numberOfMonths: PropTypes.number.description(
|
|
199
|
-
openDirection: PropTypes.string.description(
|
|
200
|
-
tabIndex: PropTypes.number.description(
|
|
201
|
-
zIndex: PropTypes.string.description(
|
|
202
|
-
pickerProps: PropTypes.shape(PickerPropsTypes).description(
|
|
203
|
-
calendarProps: PropTypes.shape({
|
|
204
|
-
|
|
205
|
-
}).description('props to be passes to the calendar container'),
|
|
206
|
-
focusCurrentDate: PropTypes.bool.description('Wheter to focus current date on calendar').defaultValue(false)
|
|
176
|
+
}).description("react-dates phrases").defaultValue(SingleDatePickerPhrases),
|
|
177
|
+
displayFormat: PropTypes.string.description("display format").defaultValue("L"),
|
|
178
|
+
displayFormatDay: PropTypes.string.description("display format day").defaultValue("D"),
|
|
179
|
+
transitionDuration: PropTypes.number.description("transition duration").defaultValue(0),
|
|
180
|
+
verticalSpacing: PropTypes.number.description("vertical spacing"),
|
|
181
|
+
isDayBlocked: PropTypes.func.description("function that returns each day and disables desired dates"),
|
|
182
|
+
isOutsideRange: PropTypes.func.description("function that returns each day and disables outisde range dates"),
|
|
183
|
+
isDayHighlighted: PropTypes.func.description("function that returns each day and higlights desired dates"),
|
|
184
|
+
numberOfMonths: PropTypes.number.description("amount of months"),
|
|
185
|
+
openDirection: PropTypes.string.description("open direction of the popup").defaultValue("down"),
|
|
186
|
+
tabIndex: PropTypes.number.description("overrides tab index of the element"),
|
|
187
|
+
zIndex: PropTypes.string.description("overrides z-index of the element"),
|
|
188
|
+
pickerProps: PropTypes.shape(PickerPropsTypes).description("props to be passed to the picker container"),
|
|
189
|
+
calendarProps: PropTypes.shape({ tabIndex: PropTypes.number }).description("props to be passes to the calendar container"),
|
|
190
|
+
focusCurrentDate: PropTypes.bool.description("Wheter to focus current date on calendar").defaultValue(false)
|
|
207
191
|
};
|
|
192
|
+
DSDatePicker.propTypes = datePickerProps;
|
|
208
193
|
const DatePickerWithSchema = describe(DSDatePicker);
|
|
209
194
|
DatePickerWithSchema.propTypes = datePickerProps;
|
|
210
|
-
|
|
211
|
-
export {
|
|
195
|
+
var DSDatePicker_default = DSDatePicker;
|
|
196
|
+
export {
|
|
197
|
+
DSDatePicker,
|
|
198
|
+
DSDatePickerController,
|
|
199
|
+
DatePickerDay,
|
|
200
|
+
DatePickerDropdown,
|
|
201
|
+
DatePickerHeader,
|
|
202
|
+
DatePickerNavigation,
|
|
203
|
+
DatePickerPicker,
|
|
204
|
+
DatePickerRange,
|
|
205
|
+
DatePickerRangeHeader,
|
|
206
|
+
DatePickerSingleDate,
|
|
207
|
+
DatePickerWithSchema,
|
|
208
|
+
Picker,
|
|
209
|
+
SingleRangeDateSwitcher,
|
|
210
|
+
DSDatePicker_default as default,
|
|
211
|
+
renderMonthElement
|
|
212
|
+
};
|
|
213
|
+
//# sourceMappingURL=DSDatePicker.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../scripts/build/transpile/react-shim.js", "../../src/DSDatePicker.tsx"],
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable max-lines */\nimport React from 'react';\nimport { PropTypes, describe } from 'react-desc';\nimport 'react-dates/initialize';\nimport { convertPropToCssClassName } from '@elliemae/ds-classnames';\nimport moment from 'moment';\nimport { SingleDatePickerPhrases } from './defaultPhrases';\nimport {\n DatePickerNavigation,\n DatePickerDay,\n DatePickerPicker,\n DatePickerDropdown,\n DatePickerSingleDate,\n DatePickerHeader,\n DatePickerRange,\n DatePickerRangeHeader,\n SingleRangeDateSwitcher,\n renderMonthElement,\n} from './components';\nimport { DSDatePickerImpl } from './components/DSDatePickerImpl';\nimport { DSDatePickerController } from './components/DatePickerController/DatePickerController';\nimport { PickerPropsTypes, Picker } from './components/DatePickerPicker/DatePickerPicker';\n\ninterface DSDatePickerPropsType {\n containerProps: {};\n id: string;\n appendToBody: boolean;\n className: string;\n date: any;\n value: any;\n placeholder: string;\n disabled: boolean;\n required: boolean;\n readOnly: boolean;\n hasError: boolean;\n screenReaderInputMessage: boolean;\n enableOutsideDays: boolean;\n initialVisibleMonth: moment.Moment;\n firstDayOfWeek: number;\n keepOpenOnDateSelect: boolean;\n hideKeyboardShortcutsPanel: boolean;\n onChange: () => void;\n onDateChange: undefined | (() => void);\n onPrevMonthClick: () => void;\n onNextMonthClick: () => void;\n onClose: () => void;\n onFocus: () => void;\n onBlur: () => void;\n phrases: SingleDatePickerPhrases;\n displayFormat: boolean;\n displayFormatDay: boolean;\n transitionDuration: number;\n verticalSpacing: number;\n isDayBlocked: () => boolean;\n isOutsideRange: () => boolean;\n isDayHighlighted: () => boolean;\n numberOfMonths: number;\n openDirection: boolean;\n tabIndex: boolean;\n zIndex: boolean;\n pickerProps: {};\n calendarProps: {};\n autoClear: boolean;\n focusCurrentDate: boolean;\n}\ntype DSDatePickerType = React.ComponentType<DSDatePickerPropsType>;\n\nconst DSDatePicker: DSDatePickerType = ({\n containerProps = {},\n id = '',\n appendToBody = true,\n className = '',\n date,\n value,\n placeholder = '',\n disabled = false,\n required = false,\n readOnly = false,\n hasError = false,\n screenReaderInputMessage = 'Select date',\n enableOutsideDays = true,\n initialVisibleMonth = moment(),\n firstDayOfWeek = 0,\n keepOpenOnDateSelect = false,\n hideKeyboardShortcutsPanel = true,\n onChange = () => null,\n onDateChange = undefined,\n onPrevMonthClick = () => null,\n onNextMonthClick = () => null,\n onClose = () => null,\n onFocus = () => null,\n onBlur = () => 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 openDirection = 'down',\n tabIndex = '',\n zIndex = 1,\n pickerProps = {},\n calendarProps = {},\n autoClear = false,\n focusCurrentDate = false,\n}) => {\n const { cssClassName } = convertPropToCssClassName('datepicker', className, {\n hasError,\n readOnly,\n disabled,\n id,\n });\n const safeDate = date || value;\n return (\n <div className={cssClassName} {...containerProps} style={{ minWidth: '140px' }}>\n <DSDatePickerImpl\n appendToBody={appendToBody}\n autoClear={autoClear}\n date={safeDate}\n disabled={disabled}\n displayFormat={displayFormat}\n displayFormatDay={displayFormatDay}\n enableOutsideDays={enableOutsideDays}\n firstDayOfWeek={firstDayOfWeek}\n hideKeyboardShortcutsPanel={hideKeyboardShortcutsPanel}\n initialVisibleMonth={() => (initialVisibleMonth ? moment(initialVisibleMonth) : moment(safeDate))}\n isDayBlocked={isDayBlocked}\n isDayHighlighted={isDayHighlighted}\n isOutsideRange={isOutsideRange === true || isOutsideRange === false ? () => isOutsideRange : isOutsideRange}\n keepOpenOnDateSelect={keepOpenOnDateSelect}\n numberOfMonths={numberOfMonths}\n onBlur={onBlur}\n onClose={onClose}\n onChange={onChange}\n onDateChange={(...args) => {\n if (onDateChange) onDateChange(...args);\n }}\n onFocus={onFocus}\n onNextMonthClick={onNextMonthClick}\n onPrevMonthClick={onPrevMonthClick}\n openDirection={openDirection}\n phrases={phrases}\n placeholder={placeholder}\n readOnly={readOnly}\n required={required}\n screenReaderInputMessage={screenReaderInputMessage}\n transitionDuration={transitionDuration}\n value={safeDate}\n verticalSpacing={verticalSpacing}\n tabIndex={tabIndex}\n zIndex={zIndex}\n pickerProps={pickerProps}\n calendarProps={calendarProps}\n focusCurrentDate={focusCurrentDate}\n />\n </div>\n );\n};\n\nconst datePickerProps = {\n containerProps: PropTypes.shape({}).description('Set of Properties attached to the main container'),\n id: PropTypes.string.description('components id'),\n appendToBody: PropTypes.bool.description('append component to body or not').defaultValue(true),\n className: PropTypes.string.description('html class attribute'),\n date: PropTypes.instanceOf(Date, moment).description('selected date').defaultValue(undefined),\n value: PropTypes.instanceOf(Date, moment).description('value'),\n placeholder: PropTypes.string.description('input placeholder value'),\n autoClear: PropTypes.bool\n .description('autoclears the input onblur if the date is not completely set')\n .defaultValue(false),\n disabled: PropTypes.bool.description('disable component or not').defaultValue(false),\n required: PropTypes.bool.description('value is required or not').defaultValue(false),\n readOnly: PropTypes.bool.description('is read only or not').defaultValue(false),\n hasError: PropTypes.bool.description('set error state').defaultValue(false),\n screenReaderInputMessage: PropTypes.string\n .description('message to anounce by screen reader')\n .defaultValue('select date'),\n enableOutsideDays: PropTypes.bool.description('enable days oustide month or not').defaultValue(true),\n initialVisibleMonth: PropTypes.instanceOf(Date, moment).description('initial month to display'),\n firstDayOfWeek: PropTypes.number.description('first day of week').defaultValue(0),\n keepOpenOnDateSelect: PropTypes.bool.description('keep picker open when a date is selected').defaultValue(false),\n hideKeyboardShortcutsPanel: PropTypes.bool.description('hide keyabord shortcut panel or not').defaultValue(true),\n onChange: PropTypes.func.description(\n `\n function executed when input changes. This could trigger with invalid dates. It returns a string and a moment\n if the date is valid.\n `,\n ),\n onDateChange: PropTypes.func.description(\n 'function executed when date changes. This doesnt trigger with invalid dates. It returns a moment object',\n ),\n onPrevMonthClick: PropTypes.func.description('function executed when clicking on prev month button'),\n onNextMonthClick: PropTypes.func.description('function executed when clicking on next month button'),\n onBlur: PropTypes.func.description('function executed when component loses focus'),\n onClose: PropTypes.func.description('function executed when component closes'),\n onFocus: PropTypes.func.description('function executed when component gains focus'),\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 .description('react-dates phrases')\n .defaultValue(SingleDatePickerPhrases),\n displayFormat: PropTypes.string.description('display format').defaultValue('L'),\n displayFormatDay: PropTypes.string.description('display format day').defaultValue('D'),\n transitionDuration: PropTypes.number.description('transition duration').defaultValue(0),\n verticalSpacing: PropTypes.number.description('vertical spacing'),\n isDayBlocked: PropTypes.func.description('function that returns each day and disables desired dates'),\n isOutsideRange: PropTypes.func.description('function that returns each day and disables outisde range dates'),\n isDayHighlighted: PropTypes.func.description('function that returns each day and higlights desired dates'),\n numberOfMonths: PropTypes.number.description('amount of months'),\n openDirection: PropTypes.string.description('open direction of the popup').defaultValue('down'),\n tabIndex: PropTypes.number.description('overrides tab index of the element'),\n zIndex: PropTypes.string.description('overrides z-index of the element'),\n pickerProps: PropTypes.shape(PickerPropsTypes).description('props to be passed to the picker container'),\n calendarProps: PropTypes.shape({ tabIndex: PropTypes.number }).description(\n 'props to be passes to the calendar container',\n ),\n focusCurrentDate: PropTypes.bool.description('Wheter to focus current date on calendar').defaultValue(false),\n};\n\nDSDatePicker.propTypes = datePickerProps;\n\nconst DatePickerWithSchema = describe(DSDatePicker);\nDatePickerWithSchema.propTypes = datePickerProps;\n\nexport {\n DatePickerNavigation,\n DatePickerDay,\n DatePickerPicker,\n DSDatePickerController,\n DatePickerDropdown,\n DatePickerSingleDate,\n DatePickerHeader,\n DatePickerRange,\n DatePickerRangeHeader,\n SingleRangeDateSwitcher,\n Picker,\n renderMonthElement,\n DatePickerWithSchema,\n};\n\nexport { DSDatePicker };\nexport default DSDatePicker;\n"],
|
|
5
|
+
"mappings": "AAAA;ACCA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAYA;AACA;AACA;AA8CA,MAAM,eAAiC,CAAC;AAAA,EACtC,iBAAiB;AAAA,EACjB,KAAK;AAAA,EACL,eAAe;AAAA,EACf,YAAY;AAAA,EACZ;AAAA,EACA;AAAA,EACA,cAAc;AAAA,EACd,WAAW;AAAA,EACX,WAAW;AAAA,EACX,WAAW;AAAA,EACX,WAAW;AAAA,EACX,2BAA2B;AAAA,EAC3B,oBAAoB;AAAA,EACpB,sBAAsB;AAAA,EACtB,iBAAiB;AAAA,EACjB,uBAAuB;AAAA,EACvB,6BAA6B;AAAA,EAC7B,WAAW,MAAM;AAAA,EACjB,eAAe;AAAA,EACf,mBAAmB,MAAM;AAAA,EACzB,mBAAmB,MAAM;AAAA,EACzB,UAAU,MAAM;AAAA,EAChB,UAAU,MAAM;AAAA,EAChB,SAAS,MAAM;AAAA,EACf,UAAU;AAAA,EACV,gBAAgB;AAAA,EAChB,mBAAmB;AAAA,EACnB,qBAAqB;AAAA,EACrB,kBAAkB;AAAA,EAClB,eAAe,MAAM;AAAA,EACrB,iBAAiB,MAAM;AAAA,EACvB,mBAAmB,MAAM;AAAA,EACzB,iBAAiB;AAAA,EACjB,gBAAgB;AAAA,EAChB,WAAW;AAAA,EACX,SAAS;AAAA,EACT,cAAc;AAAA,EACd,gBAAgB;AAAA,EAChB,YAAY;AAAA,EACZ,mBAAmB;AAAA,MACf;AACJ,QAAM,EAAE,iBAAiB,0BAA0B,cAAc,WAAW;AAAA,IAC1E;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA;AAEF,QAAM,WAAW,QAAQ;A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