@elliemae/ds-form-date-time-picker 3.0.0-next.44 → 3.0.0-next.47
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/ControlledDateTimePicker.js +9 -16
- package/dist/cjs/ControlledDateTimePicker.js.map +1 -1
- package/dist/cjs/ControlledDateTimePickerCTX.js +9 -16
- package/dist/cjs/ControlledDateTimePickerCTX.js.map +1 -1
- package/dist/cjs/ControlledDateTimePickerDatatestid.js +9 -16
- package/dist/cjs/ControlledDateTimePickerDatatestid.js.map +1 -1
- package/dist/cjs/ControlledDateTimePickerTypes.js +9 -16
- package/dist/cjs/ControlledDateTimePickerTypes.js.map +1 -1
- package/dist/cjs/config/useChangeHandlers.js +9 -16
- package/dist/cjs/config/useChangeHandlers.js.map +1 -1
- package/dist/cjs/config/useControlledDateTimePicker.js +9 -16
- package/dist/cjs/config/useControlledDateTimePicker.js.map +1 -1
- package/dist/cjs/config/useFocusTracker.js +9 -16
- package/dist/cjs/config/useFocusTracker.js.map +1 -1
- package/dist/cjs/config/useGetDestructuredValues.js +9 -16
- package/dist/cjs/config/useGetDestructuredValues.js.map +1 -1
- package/dist/cjs/config/useGetFlags.js +9 -16
- package/dist/cjs/config/useGetFlags.js.map +1 -1
- package/dist/cjs/config/useGetPropsBasedOnType.js +9 -16
- package/dist/cjs/config/useGetPropsBasedOnType.js.map +1 -1
- package/dist/cjs/config/useGetPropsWithDefault.js +9 -16
- package/dist/cjs/config/useGetPropsWithDefault.js.map +1 -1
- package/dist/cjs/config/useGetReferences.js +9 -16
- package/dist/cjs/config/useGetReferences.js.map +1 -1
- package/dist/cjs/config/useGlobalKeyHandlers.js +9 -16
- package/dist/cjs/config/useGlobalKeyHandlers.js.map +1 -1
- package/dist/cjs/config/useRelevantValueFromProps.js +9 -16
- package/dist/cjs/config/useRelevantValueFromProps.js.map +1 -1
- package/dist/cjs/config/useValidateProps.js +9 -16
- package/dist/cjs/config/useValidateProps.js.map +1 -1
- package/dist/cjs/index.js +9 -16
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/parts/ClearButton/ClearButton.js +9 -16
- package/dist/cjs/parts/ClearButton/ClearButton.js.map +1 -1
- package/dist/cjs/parts/ClearButton/useClearButton.js +9 -16
- package/dist/cjs/parts/ClearButton/useClearButton.js.map +1 -1
- package/dist/cjs/parts/ControlledDateTimePickerContent.js +9 -16
- package/dist/cjs/parts/ControlledDateTimePickerContent.js.map +1 -1
- package/dist/cjs/parts/DateInputs/DDInput.js +9 -16
- package/dist/cjs/parts/DateInputs/DDInput.js.map +1 -1
- package/dist/cjs/parts/DateInputs/DateInputs.js +9 -16
- package/dist/cjs/parts/DateInputs/DateInputs.js.map +1 -1
- package/dist/cjs/parts/DateInputs/MMInput.js +9 -16
- package/dist/cjs/parts/DateInputs/MMInput.js.map +1 -1
- package/dist/cjs/parts/DateInputs/YYYYInput.js +9 -16
- package/dist/cjs/parts/DateInputs/YYYYInput.js.map +1 -1
- package/dist/cjs/parts/DateInputs/useDateInputs.js +9 -16
- package/dist/cjs/parts/DateInputs/useDateInputs.js.map +1 -1
- package/dist/cjs/parts/Pickers/Calendar/Calendar.js +9 -16
- package/dist/cjs/parts/Pickers/Calendar/Calendar.js.map +1 -1
- package/dist/cjs/parts/Pickers/Calendar/CalendarBody.js +9 -16
- package/dist/cjs/parts/Pickers/Calendar/CalendarBody.js.map +1 -1
- package/dist/cjs/parts/Pickers/Calendar/CalendarContent.js +9 -16
- package/dist/cjs/parts/Pickers/Calendar/CalendarContent.js.map +1 -1
- package/dist/cjs/parts/Pickers/Calendar/CalendarContext.js +9 -16
- package/dist/cjs/parts/Pickers/Calendar/CalendarContext.js.map +1 -1
- package/dist/cjs/parts/Pickers/Calendar/CalendarDaysList.js +9 -16
- package/dist/cjs/parts/Pickers/Calendar/CalendarDaysList.js.map +1 -1
- package/dist/cjs/parts/Pickers/Calendar/CalendarFooter.js +9 -16
- package/dist/cjs/parts/Pickers/Calendar/CalendarFooter.js.map +1 -1
- package/dist/cjs/parts/Pickers/Calendar/CalendarHead.js +9 -16
- package/dist/cjs/parts/Pickers/Calendar/CalendarHead.js.map +1 -1
- package/dist/cjs/parts/Pickers/Calendar/CalendarIconTrigger.js +9 -16
- package/dist/cjs/parts/Pickers/Calendar/CalendarIconTrigger.js.map +1 -1
- package/dist/cjs/parts/Pickers/Calendar/CalendarMonthDays.js +9 -16
- package/dist/cjs/parts/Pickers/Calendar/CalendarMonthDays.js.map +1 -1
- package/dist/cjs/parts/Pickers/Calendar/CalendarWeekDays.js +9 -16
- package/dist/cjs/parts/Pickers/Calendar/CalendarWeekDays.js.map +1 -1
- package/dist/cjs/parts/Pickers/Calendar/CalendarWrapper.js +9 -16
- package/dist/cjs/parts/Pickers/Calendar/CalendarWrapper.js.map +1 -1
- package/dist/cjs/parts/Pickers/Calendar/Day.js +9 -16
- package/dist/cjs/parts/Pickers/Calendar/Day.js.map +1 -1
- package/dist/cjs/parts/Pickers/Calendar/Styleds.js +9 -16
- package/dist/cjs/parts/Pickers/Calendar/Styleds.js.map +1 -1
- package/dist/cjs/parts/Pickers/Calendar/useConfigCalendarCTX.js +9 -16
- package/dist/cjs/parts/Pickers/Calendar/useConfigCalendarCTX.js.map +1 -1
- package/dist/cjs/parts/Pickers/Calendar/useCurrentDisplayedMonthYearLogic.js +9 -16
- package/dist/cjs/parts/Pickers/Calendar/useCurrentDisplayedMonthYearLogic.js.map +1 -1
- package/dist/cjs/parts/Pickers/Calendar/useFocusLogic.js +9 -16
- package/dist/cjs/parts/Pickers/Calendar/useFocusLogic.js.map +1 -1
- package/dist/cjs/parts/Pickers/Calendar/useKeyboardHandlers.js +9 -16
- package/dist/cjs/parts/Pickers/Calendar/useKeyboardHandlers.js.map +1 -1
- package/dist/cjs/parts/Pickers/Calendar/usePopperTriggerLogic.js +9 -16
- package/dist/cjs/parts/Pickers/Calendar/usePopperTriggerLogic.js.map +1 -1
- package/dist/cjs/parts/Pickers/CalendarWithTimeWheel/CalendarWithTimeWheel.js +9 -16
- package/dist/cjs/parts/Pickers/CalendarWithTimeWheel/CalendarWithTimeWheel.js.map +1 -1
- package/dist/cjs/parts/Pickers/CalendarWithTimeWheel/CalendarWithTimeWheelContent.js +9 -16
- package/dist/cjs/parts/Pickers/CalendarWithTimeWheel/CalendarWithTimeWheelContent.js.map +1 -1
- package/dist/cjs/parts/Pickers/CalendarWithTimeWheel/CalendarWithTimeWheelContext.js +9 -16
- package/dist/cjs/parts/Pickers/CalendarWithTimeWheel/CalendarWithTimeWheelContext.js.map +1 -1
- package/dist/cjs/parts/Pickers/CalendarWithTimeWheel/CalendarWithTimeWheelFooter.js +9 -16
- package/dist/cjs/parts/Pickers/CalendarWithTimeWheel/CalendarWithTimeWheelFooter.js.map +1 -1
- package/dist/cjs/parts/Pickers/CalendarWithTimeWheel/CalendarWithTimeWheelIconTrigger.js +9 -16
- package/dist/cjs/parts/Pickers/CalendarWithTimeWheel/CalendarWithTimeWheelIconTrigger.js.map +1 -1
- package/dist/cjs/parts/Pickers/CalendarWithTimeWheel/CalendarWithTimeWheelWrapper.js +9 -16
- package/dist/cjs/parts/Pickers/CalendarWithTimeWheel/CalendarWithTimeWheelWrapper.js.map +1 -1
- package/dist/cjs/parts/Pickers/CalendarWithTimeWheel/Styleds.js +9 -16
- package/dist/cjs/parts/Pickers/CalendarWithTimeWheel/Styleds.js.map +1 -1
- package/dist/cjs/parts/Pickers/CalendarWithTimeWheel/useConfigCalendarWithTimeWheelCTX.js +9 -16
- package/dist/cjs/parts/Pickers/CalendarWithTimeWheel/useConfigCalendarWithTimeWheelCTX.js.map +1 -1
- package/dist/cjs/parts/Pickers/PickersIcons.js +9 -16
- package/dist/cjs/parts/Pickers/PickersIcons.js.map +1 -1
- package/dist/cjs/parts/Pickers/TimeWheel/HoursList.js +15 -18
- package/dist/cjs/parts/Pickers/TimeWheel/HoursList.js.map +2 -2
- package/dist/cjs/parts/Pickers/TimeWheel/MeridiemList.js +15 -18
- package/dist/cjs/parts/Pickers/TimeWheel/MeridiemList.js.map +2 -2
- package/dist/cjs/parts/Pickers/TimeWheel/MinutesList.js +15 -18
- package/dist/cjs/parts/Pickers/TimeWheel/MinutesList.js.map +2 -2
- package/dist/cjs/parts/Pickers/TimeWheel/Styleds.js +9 -16
- package/dist/cjs/parts/Pickers/TimeWheel/Styleds.js.map +1 -1
- package/dist/cjs/parts/Pickers/TimeWheel/TimeWheel.js +9 -16
- package/dist/cjs/parts/Pickers/TimeWheel/TimeWheel.js.map +1 -1
- package/dist/cjs/parts/Pickers/TimeWheel/TimeWheelContent.js +10 -19
- package/dist/cjs/parts/Pickers/TimeWheel/TimeWheelContent.js.map +2 -2
- package/dist/cjs/parts/Pickers/TimeWheel/TimeWheelContext.js +9 -16
- package/dist/cjs/parts/Pickers/TimeWheel/TimeWheelContext.js.map +1 -1
- package/dist/cjs/parts/Pickers/TimeWheel/TimeWheelFooter.js +9 -16
- package/dist/cjs/parts/Pickers/TimeWheel/TimeWheelFooter.js.map +1 -1
- package/dist/cjs/parts/Pickers/TimeWheel/TimeWheelIconTrigger.js +9 -16
- package/dist/cjs/parts/Pickers/TimeWheel/TimeWheelIconTrigger.js.map +1 -1
- package/dist/cjs/parts/Pickers/TimeWheel/TimeWheelWrapper.js +9 -16
- package/dist/cjs/parts/Pickers/TimeWheel/TimeWheelWrapper.js.map +1 -1
- package/dist/cjs/parts/Pickers/TimeWheel/useConfigTimePickerCTX.js +9 -16
- package/dist/cjs/parts/Pickers/TimeWheel/useConfigTimePickerCTX.js.map +1 -1
- package/dist/cjs/parts/Pickers/TimeWheel/useCurrentDisplayedWheelsLogic.js +9 -16
- package/dist/cjs/parts/Pickers/TimeWheel/useCurrentDisplayedWheelsLogic.js.map +1 -1
- package/dist/cjs/parts/Pickers/TimeWheel/useKeyboardHandlers.js +9 -16
- package/dist/cjs/parts/Pickers/TimeWheel/useKeyboardHandlers.js.map +1 -1
- package/dist/cjs/parts/Pickers/TimeWheel/usePopperTriggerLogic.js +9 -16
- package/dist/cjs/parts/Pickers/TimeWheel/usePopperTriggerLogic.js.map +1 -1
- package/dist/cjs/parts/Styleds.js +9 -16
- package/dist/cjs/parts/Styleds.js.map +1 -1
- package/dist/cjs/parts/TimeInputs/HHInput.js +9 -16
- package/dist/cjs/parts/TimeInputs/HHInput.js.map +1 -1
- package/dist/cjs/parts/TimeInputs/MeridiemInput.js +9 -16
- package/dist/cjs/parts/TimeInputs/MeridiemInput.js.map +1 -1
- package/dist/cjs/parts/TimeInputs/MinutesInput.js +9 -16
- package/dist/cjs/parts/TimeInputs/MinutesInput.js.map +1 -1
- package/dist/cjs/parts/TimeInputs/TimeInputs.js +9 -16
- package/dist/cjs/parts/TimeInputs/TimeInputs.js.map +1 -1
- package/dist/cjs/parts/TimeInputs/useTimeInputs.js +9 -16
- package/dist/cjs/parts/TimeInputs/useTimeInputs.js.map +1 -1
- package/dist/cjs/parts/config.js +9 -16
- package/dist/cjs/parts/config.js.map +1 -1
- package/dist/cjs/propTypes.js +9 -16
- package/dist/cjs/propTypes.js.map +1 -1
- package/dist/cjs/sharedTypes.js +9 -16
- package/dist/cjs/sharedTypes.js.map +1 -1
- package/dist/cjs/utils/constants.js +9 -16
- package/dist/cjs/utils/constants.js.map +1 -1
- package/dist/cjs/utils/dateHelpers.js +9 -16
- package/dist/cjs/utils/dateHelpers.js.map +1 -1
- package/dist/cjs/utils/dateTimeHelpers.js +9 -16
- package/dist/cjs/utils/dateTimeHelpers.js.map +1 -1
- package/dist/cjs/utils/hooks/useGetDayFromDateString.js +9 -16
- package/dist/cjs/utils/hooks/useGetDayFromDateString.js.map +1 -1
- package/dist/cjs/utils/hooks/useGetMonthYearFromDateStringOrEmptyStartingMonth.js +9 -16
- package/dist/cjs/utils/hooks/useGetMonthYearFromDateStringOrEmptyStartingMonth.js.map +1 -1
- package/dist/cjs/utils/hooks/useGetStartingFocusedDay.js +9 -16
- package/dist/cjs/utils/hooks/useGetStartingFocusedDay.js.map +1 -1
- package/dist/cjs/utils/hooks/useOnClickOutside.js +9 -16
- package/dist/cjs/utils/hooks/useOnClickOutside.js.map +1 -1
- package/dist/cjs/utils/numberHelpers.js +9 -16
- package/dist/cjs/utils/numberHelpers.js.map +1 -1
- package/dist/cjs/utils/stringHelpers.js +9 -16
- package/dist/cjs/utils/stringHelpers.js.map +1 -1
- package/dist/cjs/utils/timeHelpers.js +9 -16
- package/dist/cjs/utils/timeHelpers.js.map +1 -1
- package/dist/cjs/utils/typeGuards.js +9 -16
- package/dist/cjs/utils/typeGuards.js.map +1 -1
- package/dist/esm/parts/Pickers/TimeWheel/HoursList.js +6 -2
- package/dist/esm/parts/Pickers/TimeWheel/HoursList.js.map +2 -2
- package/dist/esm/parts/Pickers/TimeWheel/MeridiemList.js +6 -2
- package/dist/esm/parts/Pickers/TimeWheel/MeridiemList.js.map +2 -2
- package/dist/esm/parts/Pickers/TimeWheel/MinutesList.js +6 -2
- package/dist/esm/parts/Pickers/TimeWheel/MinutesList.js.map +2 -2
- package/dist/esm/parts/Pickers/TimeWheel/TimeWheelContent.js +1 -3
- package/dist/esm/parts/Pickers/TimeWheel/TimeWheelContent.js.map +2 -2
- package/package.json +7 -7
|
@@ -18,31 +18,25 @@ var __spreadValues = (a, b) => {
|
|
|
18
18
|
}
|
|
19
19
|
return a;
|
|
20
20
|
};
|
|
21
|
-
var __markAsModule = (target) => __defProp(target, "__esModule", { value: true });
|
|
22
21
|
var __export = (target, all) => {
|
|
23
22
|
for (var name in all)
|
|
24
23
|
__defProp(target, name, { get: all[name], enumerable: true });
|
|
25
24
|
};
|
|
26
|
-
var
|
|
27
|
-
if (
|
|
28
|
-
for (let key of __getOwnPropNames(
|
|
29
|
-
if (!__hasOwnProp.call(
|
|
30
|
-
__defProp(
|
|
25
|
+
var __copyProps = (to, from, except, desc) => {
|
|
26
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
27
|
+
for (let key of __getOwnPropNames(from))
|
|
28
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
29
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
31
30
|
}
|
|
32
|
-
return
|
|
31
|
+
return to;
|
|
33
32
|
};
|
|
34
|
-
var __toESM = (
|
|
35
|
-
|
|
36
|
-
};
|
|
37
|
-
var __toCommonJS = /* @__PURE__ */ ((cache) => {
|
|
38
|
-
return (module2, temp) => {
|
|
39
|
-
return cache && cache.get(module2) || (temp = __reExport(__markAsModule({}), module2, 1), cache && cache.set(module2, temp), temp);
|
|
40
|
-
};
|
|
41
|
-
})(typeof WeakMap !== "undefined" ? /* @__PURE__ */ new WeakMap() : 0);
|
|
33
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, mod));
|
|
34
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
42
35
|
var useGetFlags_exports = {};
|
|
43
36
|
__export(useGetFlags_exports, {
|
|
44
37
|
useGetFlags: () => useGetFlags
|
|
45
38
|
});
|
|
39
|
+
module.exports = __toCommonJS(useGetFlags_exports);
|
|
46
40
|
var React = __toESM(require("react"));
|
|
47
41
|
var import_react = require("react");
|
|
48
42
|
var import_ControlledDateTimePickerTypes = require("../ControlledDateTimePickerTypes");
|
|
@@ -170,5 +164,4 @@ const useGetFlags = (props) => (0, import_react.useMemo)(() => {
|
|
|
170
164
|
}
|
|
171
165
|
return getTimeFlags(props);
|
|
172
166
|
}, [props]);
|
|
173
|
-
module.exports = __toCommonJS(useGetFlags_exports);
|
|
174
167
|
//# sourceMappingURL=useGetFlags.js.map
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/config/useGetFlags.tsx", "../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
4
|
"sourcesContent": ["/* eslint-disable complexity */\n/* eslint-disable max-statements */\nimport { useMemo } from 'react';\nimport { CONTROLLED_DATE_TIME_PICKER_TYPES } from '../ControlledDateTimePickerTypes';\nimport { getIsDateTime, getIsDate } from '../utils/typeGuards';\nimport type { DSControlledDateTimePickerT } from '../propTypes';\n\nconst getDateTimeFlags = (props: DSControlledDateTimePickerT.InternalDateTimePickerProps) => {\n const { type, isClearable, dateTime, autoFocus } = props;\n const constants = {\n hideDatePicker: true,\n hideTimePicker: true,\n isDateSelector: false,\n isTimeSelector: false,\n isDateTimeSelector: true,\n isWithDateInputsOnly: false,\n isWithTimeInputsOnly: false,\n autoFocusHourInput: false,\n autoFocusHourTimeWheel: false,\n };\n const withAnyInputs =\n type === CONTROLLED_DATE_TIME_PICKER_TYPES.DATE_TIME.FULL ||\n type === CONTROLLED_DATE_TIME_PICKER_TYPES.DATE_TIME.INPUTS;\n const hideDateTimePicker =\n type !== CONTROLLED_DATE_TIME_PICKER_TYPES.DATE_TIME.FULL &&\n type !== CONTROLLED_DATE_TIME_PICKER_TYPES.DATE_TIME.PICKER &&\n type !== CONTROLLED_DATE_TIME_PICKER_TYPES.DATE_TIME.CONTROLLER_ONLY;\n const isControllerOnly = type === CONTROLLED_DATE_TIME_PICKER_TYPES.DATE_TIME.CONTROLLER_ONLY;\n const withAnyPicker = !hideDateTimePicker;\n const withClearBtn = withAnyInputs && isClearable && dateTime !== '' && dateTime !== '__/__/____ __:__ __';\n const shouldPreserveClearableSpace = isClearable && withAnyInputs;\n const finalFlags = {\n hideDate: !withAnyInputs,\n hideTime: !withAnyInputs,\n hideDateTimePicker,\n isControllerOnly,\n isWithTimeWheelToo: !hideDateTimePicker,\n isWithCalendarToo: !hideDateTimePicker,\n withAnyInputs,\n withAnyPicker,\n withClearBtn,\n isWithDateInputs: withAnyInputs,\n isWithTimeInputs: withAnyInputs,\n autoFocusMonthInput: withAnyInputs && autoFocus,\n autoFocusPrevMonthArrow: isControllerOnly && autoFocus,\n shouldPreserveClearableSpace,\n withAnyRightController: withAnyPicker || withClearBtn || shouldPreserveClearableSpace,\n ...constants,\n };\n return finalFlags;\n};\nconst getDateFlags = (props: DSControlledDateTimePickerT.InternalDatePickerProps) => {\n const { type, isClearable, date, autoFocus } = props;\n\n const constants = {\n isDateSelector: true,\n hideTime: true,\n hideDateTimePicker: true,\n hideTimePicker: true,\n isTimeSelector: false,\n isDateTimeSelector: false,\n isWithCalendarToo: false,\n isWithTimeWheelToo: false,\n isWithTimeInputs: false,\n isWithTimeInputsOnly: false,\n autoFocusHourTimeWheel: false,\n autoFocusHourInput: false,\n };\n\n const withAnyInputs =\n type === CONTROLLED_DATE_TIME_PICKER_TYPES.DATE.FULL || type === CONTROLLED_DATE_TIME_PICKER_TYPES.DATE.INPUTS;\n const hideDatePicker =\n type !== CONTROLLED_DATE_TIME_PICKER_TYPES.DATE.FULL &&\n type !== CONTROLLED_DATE_TIME_PICKER_TYPES.DATE.PICKER &&\n type !== CONTROLLED_DATE_TIME_PICKER_TYPES.DATE.CONTROLLER_ONLY;\n const isControllerOnly = type === CONTROLLED_DATE_TIME_PICKER_TYPES.DATE.CONTROLLER_ONLY;\n\n const withAnyPicker = !hideDatePicker;\n const withClearBtn = withAnyInputs && isClearable && date !== '' && date !== '__/__/____';\n const shouldPreserveClearableSpace = isClearable && withAnyInputs;\n\n const finalFlags = {\n hideDate: !withAnyInputs,\n hideDatePicker,\n isControllerOnly,\n withAnyInputs,\n withAnyPicker,\n withClearBtn,\n isWithDateInputs: withAnyInputs,\n isWithDateInputsOnly: withAnyInputs,\n autoFocusMonthInput: withAnyInputs && autoFocus,\n autoFocusPrevMonthArrow: isControllerOnly && autoFocus,\n shouldPreserveClearableSpace,\n withAnyRightController: withAnyPicker || withClearBtn || shouldPreserveClearableSpace,\n ...constants,\n };\n return finalFlags;\n};\nconst getTimeFlags = (props: DSControlledDateTimePickerT.InternalTimePickerProps) => {\n const { type, isClearable, time, autoFocus } = props;\n const constants = {\n hideDate: true,\n hideDateTimePicker: true,\n hideDatePicker: true,\n isDateSelector: false,\n isDateTimeSelector: false,\n isWithDateInputs: false,\n isWithDateInputsOnly: false,\n isTimeSelector: true,\n isWithTimeWheelToo: false,\n isWithCalendarToo: false,\n autoFocusMonthInput: false,\n autoFocusPrevMonthArrow: false,\n };\n const withAnyInputs =\n type === CONTROLLED_DATE_TIME_PICKER_TYPES.TIME.FULL || type === CONTROLLED_DATE_TIME_PICKER_TYPES.TIME.INPUTS;\n const hideTimePicker =\n type !== CONTROLLED_DATE_TIME_PICKER_TYPES.TIME.FULL &&\n type !== CONTROLLED_DATE_TIME_PICKER_TYPES.TIME.PICKER &&\n type !== CONTROLLED_DATE_TIME_PICKER_TYPES.TIME.CONTROLLER_ONLY;\n const isControllerOnly = type === CONTROLLED_DATE_TIME_PICKER_TYPES.TIME.CONTROLLER_ONLY;\n const withClearBtn = withAnyInputs && isClearable && time !== '' && time !== '__:__ __';\n const shouldPreserveClearableSpace = isClearable && withAnyInputs;\n const withAnyPicker = !hideTimePicker;\n const finalFlags = {\n hideTime: !withAnyInputs,\n hideTimePicker,\n isControllerOnly,\n withAnyInputs,\n withAnyPicker,\n withClearBtn,\n isWithTimeInputs: withAnyInputs,\n isWithTimeInputsOnly: withAnyInputs,\n autoFocusHourInput: withAnyInputs && autoFocus,\n autoFocusHourTimeWheel: isControllerOnly && autoFocus,\n shouldPreserveClearableSpace,\n withAnyRightController: withAnyPicker || withClearBtn || shouldPreserveClearableSpace,\n ...constants,\n };\n return finalFlags;\n};\n\nexport const useGetFlags = (props: DSControlledDateTimePickerT.InternalProps) =>\n useMemo(() => {\n if (getIsDateTime(props)) {\n return getDateTimeFlags(props);\n }\n if (getIsDate(props)) {\n return getDateFlags(props);\n }\n return getTimeFlags(props);\n }, [props]);\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
-
"mappings": "
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADEvB,mBAAwB;A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iBAAiB,eAAe,SAAS,MAAM,SAAS;AAC7E,QAAM,+BAA+B,eAAe;AACpD,QAAM,gBAAgB,CAAC;AACvB,QAAM,aAAa;AAAA,IACjB,UAAU,CAAC;AAAA,IACX;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA,kBAAkB;AAAA,IAClB,sBAAsB;AAAA,IACtB,oBAAoB,iBAAiB;AAAA,IACrC,wBAAwB,oBAAoB;AAAA,IAC5C;AAAA,IACA,wBAAwB,iBAAiB,gBAAgB;AAAA,KACtD;AAEL,SAAO;AACT;AAEO,MAAM,cAAc,CAAC,UAC1B,0BAAQ,MAAM;AACZ,MAAI,qCAAc,KAAK,GAAG;AACxB,WAAO,iBAAiB,KAAK;AAAA,EAC/B;AACA,MAAI,iCAAU,KAAK,GAAG;AACpB,WAAO,aAAa,KAAK;AAAA,EAC3B;AACA,SAAO,aAAa,KAAK;AAC3B,GAAG,CAAC,KAAK,CAAC;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -4,31 +4,25 @@ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
|
4
4
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
5
|
var __getProtoOf = Object.getPrototypeOf;
|
|
6
6
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
-
var __markAsModule = (target) => __defProp(target, "__esModule", { value: true });
|
|
8
7
|
var __export = (target, all) => {
|
|
9
8
|
for (var name in all)
|
|
10
9
|
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
10
|
};
|
|
12
|
-
var
|
|
13
|
-
if (
|
|
14
|
-
for (let key of __getOwnPropNames(
|
|
15
|
-
if (!__hasOwnProp.call(
|
|
16
|
-
__defProp(
|
|
11
|
+
var __copyProps = (to, from, except, desc) => {
|
|
12
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
13
|
+
for (let key of __getOwnPropNames(from))
|
|
14
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
15
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
17
16
|
}
|
|
18
|
-
return
|
|
17
|
+
return to;
|
|
19
18
|
};
|
|
20
|
-
var __toESM = (
|
|
21
|
-
|
|
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);
|
|
19
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, mod));
|
|
20
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
28
21
|
var useGetPropsBasedOnType_exports = {};
|
|
29
22
|
__export(useGetPropsBasedOnType_exports, {
|
|
30
23
|
useGetPropsBasedOnType: () => useGetPropsBasedOnType
|
|
31
24
|
});
|
|
25
|
+
module.exports = __toCommonJS(useGetPropsBasedOnType_exports);
|
|
32
26
|
var React = __toESM(require("react"));
|
|
33
27
|
var import_react = require("react");
|
|
34
28
|
var import_typeGuards = require("../utils/typeGuards");
|
|
@@ -116,5 +110,4 @@ const useGetPropsBasedOnType = (propsWithDefaults) => {
|
|
|
116
110
|
isDateTime
|
|
117
111
|
]);
|
|
118
112
|
};
|
|
119
|
-
module.exports = __toCommonJS(useGetPropsBasedOnType_exports);
|
|
120
113
|
//# sourceMappingURL=useGetPropsBasedOnType.js.map
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/config/useGetPropsBasedOnType.tsx", "../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
4
|
"sourcesContent": ["/* eslint-disable max-lines */\n/* eslint-disable complexity */\n/* eslint-disable max-statements */\nimport { useMemo } from 'react';\nimport { getIsDateTime, getIsDate, getIsTime } from '../utils/typeGuards';\nimport type { DSControlledDateTimePickerT } from '../propTypes';\n\n// eslint-disable-next-line @typescript-eslint/no-empty-function\nconst noop = () => {};\nconst defaultReturnFalse = () => false;\n\nexport const useGetPropsBasedOnType = (propsWithDefaults: DSControlledDateTimePickerT.InternalProps) => {\n const isDateTime = getIsDateTime(propsWithDefaults);\n const isDate = getIsDate(propsWithDefaults);\n const isTime = getIsTime(propsWithDefaults);\n\n /* -------------------------- -------------- --------------------------*/\n /* -------------------------- DATE OPTIONALS --------------------------*/\n /* -------------------------- -------------- --------------------------*/\n const getIsDisabledDay =\n (isDateTime || isDate) && propsWithDefaults.getIsDisabledDay\n ? propsWithDefaults.getIsDisabledDay\n : defaultReturnFalse;\n const getIsOutOfRangeDay =\n (isDateTime || isDate) && propsWithDefaults.getIsOutOfRangeDay\n ? propsWithDefaults.getIsOutOfRangeDay\n : defaultReturnFalse;\n const appOnMonthChange =\n (isDateTime || isDate) && propsWithDefaults.onMonthChange ? propsWithDefaults.onMonthChange : noop;\n const appOnDayChange = (isDateTime || isDate) && propsWithDefaults.onDayChange ? propsWithDefaults.onDayChange : noop;\n const appOnYearChange =\n (isDateTime || isDate) && propsWithDefaults.onYearChange ? propsWithDefaults.onYearChange : noop;\n\n const emptyPickerStartingMonthDefault = `${new Date().getMonth() + 1}/__/${new Date().getFullYear()}`;\n const emptyPickerStartingMonth =\n (isDateTime || isDate) && propsWithDefaults.emptyPickerStartingMonth\n ? propsWithDefaults.emptyPickerStartingMonth\n : emptyPickerStartingMonthDefault;\n const onCalendarOpenFocusedDay =\n (isDateTime || isDate) && propsWithDefaults.onCalendarOpenFocusedDay\n ? propsWithDefaults.onCalendarOpenFocusedDay\n : undefined;\n /* -------------------------- -------------- --------------------------*/\n /* -------------------------- TIME OPTIONALS --------------------------*/\n /* -------------------------- -------------- --------------------------*/\n const getIsDisabledTime =\n (isDateTime || isTime) && propsWithDefaults.getIsDisabledTime\n ? propsWithDefaults.getIsDisabledTime\n : defaultReturnFalse;\n const appOnHourChange =\n (isDateTime || isTime) && propsWithDefaults.onHourChange ? propsWithDefaults.onHourChange : noop;\n const appOnMinuteChange =\n (isDateTime || isTime) && propsWithDefaults.onMinuteChange ? propsWithDefaults.onMinuteChange : noop;\n const appOnMeridiemChange =\n (isDateTime || isTime) && propsWithDefaults.onMeridiemChange ? propsWithDefaults.onMeridiemChange : noop;\n const minutesInterval =\n (isDateTime || isTime) && propsWithDefaults.minutesInterval ? propsWithDefaults.minutesInterval : 1;\n const onTimeWheelOpenStartingTime =\n (isDateTime || isTime) && propsWithDefaults.onTimeWheelOpenStartingTime\n ? propsWithDefaults.onTimeWheelOpenStartingTime\n : '01:00 AM';\n\n /* --------- ------------------------------------ ---------------------*/\n /* --------- SPECIFIC REQUIRED DATETIME OPTIONALS ---------------------*/\n /* --------- ------------------------------------ ---------------------*/\n const appOnDateChange =\n (isDateTime || isDate) && propsWithDefaults.onDateChange ? propsWithDefaults.onDateChange : noop;\n const appOnTimeChange =\n (isDateTime || isTime) && propsWithDefaults.onTimeChange ? propsWithDefaults.onTimeChange : noop;\n /* ---------------------- ---------------------- ----------------------*/\n /* ---------------------- DATE-RELATED OPTIONALS ----------------------*/\n /* ---------------------- ---------------------- ----------------------*/\n const getIsStartRangeDay =\n (isDateTime || isDate) && propsWithDefaults.getIsStartRangeDay ? propsWithDefaults.getIsStartRangeDay : noop;\n const getIsDayInRange =\n (isDateTime || isDate) && propsWithDefaults.getIsDayInRange ? propsWithDefaults.getIsDayInRange : noop;\n const getIsEndRangeDay =\n (isDateTime || isDate) && propsWithDefaults.getIsEndRangeDay ? propsWithDefaults.getIsEndRangeDay : noop;\n\n /* --------------------- ----------------------- ------------------------*/\n /* --------------------- TYPE SPECIFIC REQUIREDS ------------------------*/\n /* --------------------- ----------------------- ------------------------*/\n const appDate = isDate ? propsWithDefaults.date : '';\n const appTime = isTime ? propsWithDefaults.time : '';\n const appDateTime = isDateTime ? propsWithDefaults.dateTime : '';\n const appOnDateTimeChange = isDateTime ? propsWithDefaults.onDateTimeChange : noop;\n\n return useMemo(\n () => ({\n getIsDisabledDay,\n getIsOutOfRangeDay,\n getIsStartRangeDay,\n getIsDayInRange,\n getIsEndRangeDay,\n appOnDateChange,\n appOnMonthChange,\n appOnDayChange,\n appOnYearChange,\n appDate,\n getIsDisabledTime,\n appOnTimeChange,\n appOnHourChange,\n appOnMinuteChange,\n appOnMeridiemChange,\n appTime,\n appDateTime,\n appOnDateTimeChange,\n emptyPickerStartingMonth,\n onCalendarOpenFocusedDay,\n minutesInterval,\n onTimeWheelOpenStartingTime,\n isDate,\n isTime,\n isDateTime,\n }),\n [\n getIsDisabledDay,\n getIsOutOfRangeDay,\n getIsStartRangeDay,\n getIsDayInRange,\n getIsEndRangeDay,\n appOnDateChange,\n appOnMonthChange,\n appOnDayChange,\n appOnYearChange,\n appDate,\n getIsDisabledTime,\n appOnTimeChange,\n appOnHourChange,\n appOnMinuteChange,\n appOnMeridiemChange,\n appTime,\n appDateTime,\n appOnDateTimeChange,\n emptyPickerStartingMonth,\n onCalendarOpenFocusedDay,\n minutesInterval,\n onTimeWheelOpenStartingTime,\n isDate,\n isTime,\n isDateTime,\n ],\n );\n};\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
-
"mappings": "
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADGvB,mBAAwB;AACxB,wBAAoD;AAIpD,MAAM,OAAO,MAAM;AAAC;AACpB,MAAM,qBAAqB,MAAM;AAE1B,MAAM,yBAAyB,CAAC,sBAAiE;AACtG,QAAM,aAAa,qCAAc,iBAAiB;AAClD,QAAM,SAAS,iCAAU,iBAAiB;AAC1C,QAAM,SAAS,iCAAU,iBAAiB;AAK1C,QAAM,mBACH,eAAc,WAAW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AS,kBAAkB,OAAO;AAClD,QAAM,cAAc,aAAa,kBAAkB,WAAW;AAC9D,QAAM,sBAAsB,aAAa,kBAAkB,mBAAmB;AAE9E,SAAO,0BACL,MAAO;AAAA,IACL;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF,IACA;AAAA,IACE;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF,CACF;AACF;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -4,34 +4,27 @@ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
|
4
4
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
5
|
var __getProtoOf = Object.getPrototypeOf;
|
|
6
6
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
-
var __markAsModule = (target) => __defProp(target, "__esModule", { value: true });
|
|
8
7
|
var __export = (target, all) => {
|
|
9
8
|
for (var name in all)
|
|
10
9
|
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
10
|
};
|
|
12
|
-
var
|
|
13
|
-
if (
|
|
14
|
-
for (let key of __getOwnPropNames(
|
|
15
|
-
if (!__hasOwnProp.call(
|
|
16
|
-
__defProp(
|
|
11
|
+
var __copyProps = (to, from, except, desc) => {
|
|
12
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
13
|
+
for (let key of __getOwnPropNames(from))
|
|
14
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
15
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
17
16
|
}
|
|
18
|
-
return
|
|
17
|
+
return to;
|
|
19
18
|
};
|
|
20
|
-
var __toESM = (
|
|
21
|
-
|
|
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);
|
|
19
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, mod));
|
|
20
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
28
21
|
var useGetPropsWithDefault_exports = {};
|
|
29
22
|
__export(useGetPropsWithDefault_exports, {
|
|
30
23
|
useGetDatePickerWithDefaultsProps: () => useGetDatePickerWithDefaultsProps
|
|
31
24
|
});
|
|
25
|
+
module.exports = __toCommonJS(useGetPropsWithDefault_exports);
|
|
32
26
|
var React = __toESM(require("react"));
|
|
33
27
|
var import_ds_utilities = require("@elliemae/ds-utilities");
|
|
34
28
|
var import_propTypes = require("../propTypes");
|
|
35
29
|
const useGetDatePickerWithDefaultsProps = (props) => (0, import_ds_utilities.useMemoMergePropsWithDefault)(props, import_propTypes.defaultProps);
|
|
36
|
-
module.exports = __toCommonJS(useGetPropsWithDefault_exports);
|
|
37
30
|
//# sourceMappingURL=useGetPropsWithDefault.js.map
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/config/useGetPropsWithDefault.tsx", "../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
4
|
"sourcesContent": ["import { useMemoMergePropsWithDefault } from '@elliemae/ds-utilities';\nimport { defaultProps, DSControlledDateTimePickerT } from '../propTypes';\n// we have to merge the \"default\" nested default values with what the user gives us...\nexport const useGetDatePickerWithDefaultsProps = (\n props: DSControlledDateTimePickerT.Props,\n): DSControlledDateTimePickerT.InternalProps =>\n useMemoMergePropsWithDefault<DSControlledDateTimePickerT.InternalProps>(props, defaultProps);\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
-
"mappings": "
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,0BAA6C;AAC7C,uBAA0D;AAEnD,MAAM,oCAAoC,CAC/C,UAEA,sDAAwE,OAAO,6BAAY;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -4,31 +4,25 @@ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
|
4
4
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
5
|
var __getProtoOf = Object.getPrototypeOf;
|
|
6
6
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
-
var __markAsModule = (target) => __defProp(target, "__esModule", { value: true });
|
|
8
7
|
var __export = (target, all) => {
|
|
9
8
|
for (var name in all)
|
|
10
9
|
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
10
|
};
|
|
12
|
-
var
|
|
13
|
-
if (
|
|
14
|
-
for (let key of __getOwnPropNames(
|
|
15
|
-
if (!__hasOwnProp.call(
|
|
16
|
-
__defProp(
|
|
11
|
+
var __copyProps = (to, from, except, desc) => {
|
|
12
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
13
|
+
for (let key of __getOwnPropNames(from))
|
|
14
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
15
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
17
16
|
}
|
|
18
|
-
return
|
|
17
|
+
return to;
|
|
19
18
|
};
|
|
20
|
-
var __toESM = (
|
|
21
|
-
|
|
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);
|
|
19
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, mod));
|
|
20
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
28
21
|
var useGetReferences_exports = {};
|
|
29
22
|
__export(useGetReferences_exports, {
|
|
30
23
|
useGetReferences: () => useGetReferences
|
|
31
24
|
});
|
|
25
|
+
module.exports = __toCommonJS(useGetReferences_exports);
|
|
32
26
|
var React = __toESM(require("react"));
|
|
33
27
|
var import_react = require("react");
|
|
34
28
|
const useGetReferences = ({
|
|
@@ -133,5 +127,4 @@ const useGetReferences = ({
|
|
|
133
127
|
lastSegment
|
|
134
128
|
}), [firstSegment, lastSegment]);
|
|
135
129
|
};
|
|
136
|
-
module.exports = __toCommonJS(useGetReferences_exports);
|
|
137
130
|
//# sourceMappingURL=useGetReferences.js.map
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/config/useGetReferences.tsx", "../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
4
|
"sourcesContent": ["/* eslint-disable complexity */\n/* eslint-disable max-statements */\nimport { useRef, useMemo, useState } from 'react';\nimport { useGetFlags } from './useGetFlags';\ntype FirstSegment =\n | 'month-input'\n | 'hour-input'\n | 'date-picker-icon'\n | 'time-picker-icon'\n | 'datetime-picker-icon'\n | '';\ntype LastSegment =\n | 'year-input'\n | 'meridiem-input'\n | 'clear-btn'\n | 'date-picker-icon'\n | 'time-picker-icon'\n | 'datetime-picker-icon'\n | '';\nexport const useGetReferences = ({\n isWithDateInputs,\n isWithTimeInputs,\n isDateSelector,\n isTimeSelector,\n isDateTimeSelector,\n withAnyPicker,\n withClearBtn,\n}: ReturnType<typeof useGetFlags>) => {\n // those 2 states are needed for focus tracking\n const [firstSegment, setFirstSegment] = useState<FirstSegment>('');\n const [lastSegment, setLastSegment] = useState<LastSegment>('');\n // refs are used for \"auto-advance\" feature\n const monthInputRef = useRef<HTMLInputElement>(null) as React.MutableRefObject<HTMLInputElement>;\n const dayInputRef = useRef<HTMLInputElement>(null) as React.MutableRefObject<HTMLInputElement>;\n const yearInputRef = useRef<HTMLInputElement>(null) as React.MutableRefObject<HTMLInputElement>;\n const hourInputRef = useRef<HTMLInputElement>(null) as React.MutableRefObject<HTMLInputElement>;\n const minutesInputRef = useRef<HTMLInputElement>(null) as React.MutableRefObject<HTMLInputElement>;\n const meridiemInputRef = useRef<HTMLInputElement>(null) as React.MutableRefObject<HTMLInputElement>;\n const clearButtonRef = useRef<HTMLButtonElement>(null) as React.MutableRefObject<HTMLButtonElement>;\n const pickerButtonRef = useRef<HTMLButtonElement>(null) as React.MutableRefObject<HTMLButtonElement>;\n\n const prevYearBtnRef = useRef<HTMLButtonElement>(null) as React.MutableRefObject<HTMLButtonElement>;\n const prevMonthBtnRef = useRef<HTMLButtonElement>(null) as React.MutableRefObject<HTMLButtonElement>;\n const nextMonthBtnRef = useRef<HTMLButtonElement>(null) as React.MutableRefObject<HTMLButtonElement>;\n const nextYearBtnRef = useRef<HTMLButtonElement>(null) as React.MutableRefObject<HTMLButtonElement>;\n const calendarDaysWrapperRef = useRef<HTMLDivElement>(null) as React.MutableRefObject<HTMLDivElement>;\n\n const prevHourBtnRef = useRef<HTMLButtonElement>(null) as React.MutableRefObject<HTMLButtonElement>;\n const currHourBtnRef = useRef<HTMLButtonElement>(null) as React.MutableRefObject<HTMLButtonElement>;\n const nextHourBtnRef = useRef<HTMLButtonElement>(null) as React.MutableRefObject<HTMLButtonElement>;\n const prevMinutesBtnRef = useRef<HTMLButtonElement>(null) as React.MutableRefObject<HTMLButtonElement>;\n const currMinutesBtnRef = useRef<HTMLButtonElement>(null) as React.MutableRefObject<HTMLButtonElement>;\n const nextMinutesBtnRef = useRef<HTMLButtonElement>(null) as React.MutableRefObject<HTMLButtonElement>;\n const prevMeridiemBtnRef = useRef<HTMLButtonElement>(null) as React.MutableRefObject<HTMLButtonElement>;\n const currMeridiemBtnRef = useRef<HTMLButtonElement>(null) as React.MutableRefObject<HTMLButtonElement>;\n const nextMeridiemBtnRef = useRef<HTMLButtonElement>(null) as React.MutableRefObject<HTMLButtonElement>;\n\n let firstSegmentRef = useRef<HTMLInputElement | HTMLButtonElement>(null) as React.MutableRefObject<\n HTMLInputElement | HTMLButtonElement\n >;\n if (isWithDateInputs) {\n firstSegmentRef = monthInputRef;\n if (firstSegment !== 'month-input') setFirstSegment('month-input');\n } else if (isWithTimeInputs) {\n firstSegmentRef = hourInputRef;\n if (firstSegment !== 'hour-input') setFirstSegment('hour-input');\n } else if (withAnyPicker) {\n firstSegmentRef = pickerButtonRef;\n if (isDateSelector && firstSegment !== 'date-picker-icon') setFirstSegment('date-picker-icon');\n if (isTimeSelector && firstSegment !== 'time-picker-icon') setFirstSegment('time-picker-icon');\n if (isDateTimeSelector && firstSegment !== 'datetime-picker-icon') setFirstSegment('datetime-picker-icon');\n }\n\n let lastSegmentRef = useRef<HTMLInputElement | HTMLButtonElement>(null) as React.MutableRefObject<\n HTMLInputElement | HTMLButtonElement\n >;\n if (withAnyPicker) {\n lastSegmentRef = pickerButtonRef;\n if (isDateSelector && lastSegment !== 'date-picker-icon') setLastSegment('date-picker-icon');\n if (isTimeSelector && lastSegment !== 'time-picker-icon') setLastSegment('time-picker-icon');\n if (isDateTimeSelector && lastSegment !== 'datetime-picker-icon') setLastSegment('datetime-picker-icon');\n } else if (withClearBtn) {\n lastSegmentRef = clearButtonRef;\n if (lastSegment !== 'clear-btn') setLastSegment('clear-btn');\n } else if (isWithTimeInputs) {\n lastSegmentRef = meridiemInputRef;\n if (lastSegment !== 'meridiem-input') setLastSegment('meridiem-input');\n } else if (isWithDateInputs) {\n lastSegmentRef = yearInputRef;\n if (lastSegment !== 'year-input') setLastSegment('year-input');\n }\n\n return useMemo(\n () => ({\n monthInputRef,\n dayInputRef,\n yearInputRef,\n hourInputRef,\n minutesInputRef,\n meridiemInputRef,\n clearButtonRef,\n pickerButtonRef,\n prevYearBtnRef,\n prevMonthBtnRef,\n nextMonthBtnRef,\n nextYearBtnRef,\n calendarDaysWrapperRef,\n prevHourBtnRef,\n currHourBtnRef,\n nextHourBtnRef,\n prevMinutesBtnRef,\n currMinutesBtnRef,\n nextMinutesBtnRef,\n prevMeridiemBtnRef,\n currMeridiemBtnRef,\n nextMeridiemBtnRef,\n firstSegmentRef,\n lastSegmentRef,\n firstSegment,\n lastSegment,\n }),\n [firstSegment, lastSegment],\n );\n};\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
-
"mappings": "
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADEvB,mBAA0C;AAiBnC,MAAM,mBAAmB,CAAC;AAAA,EAC/B;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,MACoC;AAEpC,QAAM,CAAC,cAAc,mBAAmB,2BAAuB,EAAE;AACjE,QAAM,CAAC,aAAa,kBAAkB,2BAAsB,EAAE;AAE9D,QAAM,gBAAgB,yBAAyB,IAAI;AACnD,QAAM,cAAc,yBAAyB,IAAI;AACjD,QAAM,eAAe,yBAAyB,IA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,qBAAe,kBAAkB;AAC3F,QAAI,sBAAsB,gBAAgB;AAAwB,qBAAe,sBAAsB;AAAA,EACzG,WAAW,cAAc;AACvB,qBAAiB;AACjB,QAAI,gBAAgB;AAAa,qBAAe,WAAW;AAAA,EAC7D,WAAW,kBAAkB;AAC3B,qBAAiB;AACjB,QAAI,gBAAgB;AAAkB,qBAAe,gBAAgB;AAAA,EACvE,WAAW,kBAAkB;AAC3B,qBAAiB;AACjB,QAAI,gBAAgB;AAAc,qBAAe,YAAY;AAAA,EAC/D;AAEA,SAAO,0BACL,MAAO;AAAA,IACL;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF,IACA,CAAC,cAAc,WAAW,CAC5B;AACF;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -21,31 +21,25 @@ var __spreadValues = (a, b) => {
|
|
|
21
21
|
return a;
|
|
22
22
|
};
|
|
23
23
|
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
24
|
-
var __markAsModule = (target) => __defProp(target, "__esModule", { value: true });
|
|
25
24
|
var __export = (target, all) => {
|
|
26
25
|
for (var name in all)
|
|
27
26
|
__defProp(target, name, { get: all[name], enumerable: true });
|
|
28
27
|
};
|
|
29
|
-
var
|
|
30
|
-
if (
|
|
31
|
-
for (let key of __getOwnPropNames(
|
|
32
|
-
if (!__hasOwnProp.call(
|
|
33
|
-
__defProp(
|
|
28
|
+
var __copyProps = (to, from, except, desc) => {
|
|
29
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
30
|
+
for (let key of __getOwnPropNames(from))
|
|
31
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
32
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
34
33
|
}
|
|
35
|
-
return
|
|
34
|
+
return to;
|
|
36
35
|
};
|
|
37
|
-
var __toESM = (
|
|
38
|
-
|
|
39
|
-
};
|
|
40
|
-
var __toCommonJS = /* @__PURE__ */ ((cache) => {
|
|
41
|
-
return (module2, temp) => {
|
|
42
|
-
return cache && cache.get(module2) || (temp = __reExport(__markAsModule({}), module2, 1), cache && cache.set(module2, temp), temp);
|
|
43
|
-
};
|
|
44
|
-
})(typeof WeakMap !== "undefined" ? /* @__PURE__ */ new WeakMap() : 0);
|
|
36
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, mod));
|
|
37
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
45
38
|
var useGlobalKeyHandlers_exports = {};
|
|
46
39
|
__export(useGlobalKeyHandlers_exports, {
|
|
47
40
|
useGlobalKeyHandlers: () => useGlobalKeyHandlers
|
|
48
41
|
});
|
|
42
|
+
module.exports = __toCommonJS(useGlobalKeyHandlers_exports);
|
|
49
43
|
var React = __toESM(require("react"));
|
|
50
44
|
var import_react = require("react");
|
|
51
45
|
var import_dateHelpers = require("../utils/dateHelpers");
|
|
@@ -114,5 +108,4 @@ const useGlobalKeyHandlers = ({ propsBasedOnType, changeHandlers, flags, focusTr
|
|
|
114
108
|
onGlobalKeyDown
|
|
115
109
|
}), [onFillWithCurrentDateKeys, onGlobalKeyDown]);
|
|
116
110
|
};
|
|
117
|
-
module.exports = __toCommonJS(useGlobalKeyHandlers_exports);
|
|
118
111
|
//# sourceMappingURL=useGlobalKeyHandlers.js.map
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/config/useGlobalKeyHandlers.tsx", "../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
4
|
"sourcesContent": ["/* eslint-disable no-nested-ternary */\n/* eslint-disable max-lines */\n/* eslint-disable import/prefer-default-export */\n/* eslint-disable complexity */\n/* eslint-disable max-statements */\nimport { useCallback, useMemo } from 'react';\nimport { useChangeHandlers } from './useChangeHandlers';\nimport { useGetPropsBasedOnType } from './useGetPropsBasedOnType';\nimport { useGetReferences } from './useGetReferences';\nimport { useGetFlags } from './useGetFlags';\nimport { useFocusTracker } from './useFocusTracker';\nimport { getValidationDateStringMetaInfo, getDateStringFromDay, getTimeStringFromDay } from '../utils/dateHelpers';\nimport { getValidationTimeStringMetaInfo } from '../utils/timeHelpers';\nimport { deconstructValuesFromDateString, deconstructValuesFromTimeString } from '../utils/stringHelpers';\nimport type { DSControlledDateTimePickerT } from '../propTypes';\n\ninterface Config {\n propsBasedOnType: ReturnType<typeof useGetPropsBasedOnType>;\n changeHandlers: ReturnType<typeof useChangeHandlers>;\n DOMRefs: ReturnType<typeof useGetReferences>;\n flags: ReturnType<typeof useGetFlags>;\n focusTrackers: ReturnType<typeof useFocusTracker>;\n}\n\nexport const useGlobalKeyHandlers = ({ propsBasedOnType, changeHandlers, flags, focusTrackers }: Config) => {\n const {\n getIsOutOfRangeDay,\n getIsDisabledDay,\n getIsDisabledTime,\n appOnMonthChange,\n appOnDayChange,\n appOnYearChange,\n appOnHourChange,\n appOnMinuteChange,\n appOnMeridiemChange,\n } = propsBasedOnType;\n const { handleChangeComposedDateTimeString, handleClearAll } = changeHandlers;\n const { shouldPreserveClearableSpace } = flags;\n const { trackFocusClearBtn, trackFocusLastSegment } = focusTrackers;\n\n const onFillWithCurrentDateKeys = useCallback(\n (\n e: React.KeyboardEvent<HTMLInputElement | HTMLButtonElement>,\n metaInfo: Partial<DSControlledDateTimePickerT.InternalInputsChangeMetaInfo> = { isAutomaticFillTrigger: true },\n ) => {\n const now = new Date();\n const nowDateString = getDateStringFromDay(now);\n const nowTimeString = getTimeStringFromDay(now);\n const finalMetaInfo: DSControlledDateTimePickerT.InternalInputsChangeMetaInfo = {\n ...metaInfo,\n ...getValidationDateStringMetaInfo(nowDateString, getIsOutOfRangeDay, getIsDisabledDay),\n ...getValidationTimeStringMetaInfo(nowTimeString, getIsDisabledTime),\n newDateString: nowDateString,\n };\n const { month, day, year } = deconstructValuesFromDateString(nowDateString);\n appOnMonthChange(month, e, metaInfo);\n appOnDayChange(day, e, metaInfo);\n appOnYearChange(year, e, metaInfo);\n const { hours, minutes, meridiem } = deconstructValuesFromTimeString(nowTimeString);\n appOnHourChange(hours, e, metaInfo);\n appOnMinuteChange(minutes, e, metaInfo);\n appOnMeridiemChange(meridiem, e, metaInfo);\n handleChangeComposedDateTimeString(nowDateString, nowTimeString, finalMetaInfo);\n if (shouldPreserveClearableSpace) trackFocusClearBtn();\n else trackFocusLastSegment();\n },\n [\n appOnDayChange,\n appOnHourChange,\n appOnMeridiemChange,\n appOnMinuteChange,\n appOnMonthChange,\n appOnYearChange,\n getIsDisabledDay,\n getIsDisabledTime,\n getIsOutOfRangeDay,\n handleChangeComposedDateTimeString,\n shouldPreserveClearableSpace,\n trackFocusClearBtn,\n trackFocusLastSegment,\n ],\n );\n\n const onGlobalKeyDown = useCallback(\n (e: React.KeyboardEvent<HTMLInputElement | HTMLButtonElement>) => {\n const { key, ctrlKey, metaKey } = e;\n if ((ctrlKey || metaKey) && key === ';') {\n onFillWithCurrentDateKeys(e);\n }\n if ((ctrlKey || metaKey) && (key === 'Delete' || key === 'Backspace')) handleClearAll(e);\n },\n [handleClearAll, onFillWithCurrentDateKeys],\n );\n\n return useMemo(\n () => ({\n onFillWithCurrentDateKeys,\n onGlobalKeyDown,\n }),\n [onFillWithCurrentDateKeys, onGlobalKeyDown],\n );\n};\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
-
"mappings": "
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;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AAAA,IACA;AAAA,IACA;AAAA,EACF,CACF;AAEA,QAAM,kBAAkB,8BACtB,CAAC,MAAiE;AAChE,UAAM,EAAE,KAAK,SAAS,YAAY;AAClC,QAAK,YAAW,YAAY,QAAQ,KAAK;AACvC,gCAA0B,CAAC;AAAA,IAC7B;AACA,QAAK,YAAW,YAAa,SAAQ,YAAY,QAAQ;AAAc,qBAAe,CAAC;AAAA,EACzF,GACA,CAAC,gBAAgB,yBAAyB,CAC5C;AAEA,SAAO,0BACL,MAAO;AAAA,IACL;AAAA,IACA;AAAA,EACF,IACA,CAAC,2BAA2B,eAAe,CAC7C;AACF;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -4,31 +4,25 @@ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
|
4
4
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
5
|
var __getProtoOf = Object.getPrototypeOf;
|
|
6
6
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
-
var __markAsModule = (target) => __defProp(target, "__esModule", { value: true });
|
|
8
7
|
var __export = (target, all) => {
|
|
9
8
|
for (var name in all)
|
|
10
9
|
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
10
|
};
|
|
12
|
-
var
|
|
13
|
-
if (
|
|
14
|
-
for (let key of __getOwnPropNames(
|
|
15
|
-
if (!__hasOwnProp.call(
|
|
16
|
-
__defProp(
|
|
11
|
+
var __copyProps = (to, from, except, desc) => {
|
|
12
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
13
|
+
for (let key of __getOwnPropNames(from))
|
|
14
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
15
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
17
16
|
}
|
|
18
|
-
return
|
|
17
|
+
return to;
|
|
19
18
|
};
|
|
20
|
-
var __toESM = (
|
|
21
|
-
|
|
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);
|
|
19
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, mod));
|
|
20
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
28
21
|
var useRelevantValueFromProps_exports = {};
|
|
29
22
|
__export(useRelevantValueFromProps_exports, {
|
|
30
23
|
useRelevantValueFromProps: () => useRelevantValueFromProps
|
|
31
24
|
});
|
|
25
|
+
module.exports = __toCommonJS(useRelevantValueFromProps_exports);
|
|
32
26
|
var React = __toESM(require("react"));
|
|
33
27
|
var import_react = require("react");
|
|
34
28
|
var import_typeGuards = require("../utils/typeGuards");
|
|
@@ -59,5 +53,4 @@ const useRelevantValueFromProps = (props) => {
|
|
|
59
53
|
setTimeString
|
|
60
54
|
}), [dateStringFromProps, tempDateString, tempTimeString, timeStringFromProps]);
|
|
61
55
|
};
|
|
62
|
-
module.exports = __toCommonJS(useRelevantValueFromProps_exports);
|
|
63
56
|
//# sourceMappingURL=useRelevantValueFromProps.js.map
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/config/useRelevantValueFromProps.tsx", "../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
4
|
"sourcesContent": ["/* eslint-disable complexity */\n/* eslint-disable max-statements */\nimport { useMemo, useState } from 'react';\nimport { getIsDateTime, getIsDate, getIsTime } from '../utils/typeGuards';\nimport { dateTimeToTime, dateTimeToDate } from '../utils/stringHelpers';\nimport type { DSControlledDateTimePickerT } from '../propTypes';\n\nexport const useRelevantValueFromProps = (props: DSControlledDateTimePickerT.InternalProps) => {\n const dateStringFromProps = useMemo(() => {\n if (getIsDateTime(props)) return props.dateTime !== '' ? dateTimeToDate(props.dateTime) : '__/__/____';\n if (getIsDate(props)) return props.date !== '' ? props.date : '__/__/____';\n return '__/__/____';\n }, [props]);\n const timeStringFromProps = useMemo(() => {\n if (getIsDateTime(props)) return props.dateTime !== '' ? dateTimeToTime(props.dateTime) : '__:__ __';\n if (getIsTime(props)) return props.time !== '' ? props.time : '__:__ __';\n return '__:__ __';\n }, [props]);\n\n // don't use tempDateString to trigger useEffect for onDateChange\n // that is an anti-pattern and leads to a lot of issue\n // if you don't believe me, check date-time-picker v1 which is doing it\n const [tempDateString, setTempDateString] = useState(dateStringFromProps);\n // don't use tempTimeString to trigger useEffect for onTimeChange\n // that is an anti-pattern and leads to a lot of issue\n // if you don't believe me, check date-time-picker v1 which is doing it\n const [tempTimeString, setTimeString] = useState(timeStringFromProps);\n\n return useMemo(\n () => ({\n dateStringFromProps,\n timeStringFromProps,\n tempDateString,\n setTempDateString,\n tempTimeString,\n setTimeString,\n }),\n [dateStringFromProps, tempDateString, tempTimeString, timeStringFromProps],\n );\n};\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
-
"mappings": "
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADEvB,mBAAkC;AAClC,wBAAoD;AACpD,2BAA+C;AAGxC,MAAM,4BAA4B,CAAC,UAAqD;AAC7F,QAAM,sBAAsB,0BAAQ,MAAM;AACxC,QAAI,qCAAc,KAAK;AAAG,aAAO,MAAM,aAAa,KAAK,yCAAe,MAAM,QAAQ,IAAI;AAC1F,QAAI,iCAAU,KAAK;AAAG,aAAO,MAAM,SAAS,KAAK,MAAM,OAAO;AAC9D,WAAO;AAAA,EACT,GAAG,CAAC,KAAK,CAAC;AACV,QAAM,sBAAsB,0BAAQ,MAAM;AACxC,QAAI,qCAAc,KAAK;AAAG,aAAO,MAAM,aAAa,KAAK,yCAAe,MAAM,QAAQ,IAAI;AAC1F,QAAI,iCAAU,KAAK;AAAG,aAAO,MAAM,SAAS,KAAK,MAAM,OAAO;AAC9D,WAAO;AAAA,EACT,GAAG,CAAC,KAAK,CAAC;AAKV,QAAM,CAAC,gBAAgB,qBAAqB,2BAAS,mBAAmB;AAIxE,QAAM,CAAC,gBAAgB,iBAAiB,2BAAS,mBAAmB;AAEpE,SAAO,0BACL,MAAO;AAAA,IACL;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF,IACA,CAAC,qBAAqB,gBAAgB,gBAAgB,mBAAmB,CAC3E;AACF;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -4,31 +4,25 @@ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
|
4
4
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
5
|
var __getProtoOf = Object.getPrototypeOf;
|
|
6
6
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
-
var __markAsModule = (target) => __defProp(target, "__esModule", { value: true });
|
|
8
7
|
var __export = (target, all) => {
|
|
9
8
|
for (var name in all)
|
|
10
9
|
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
10
|
};
|
|
12
|
-
var
|
|
13
|
-
if (
|
|
14
|
-
for (let key of __getOwnPropNames(
|
|
15
|
-
if (!__hasOwnProp.call(
|
|
16
|
-
__defProp(
|
|
11
|
+
var __copyProps = (to, from, except, desc) => {
|
|
12
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
13
|
+
for (let key of __getOwnPropNames(from))
|
|
14
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
15
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
17
16
|
}
|
|
18
|
-
return
|
|
17
|
+
return to;
|
|
19
18
|
};
|
|
20
|
-
var __toESM = (
|
|
21
|
-
|
|
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);
|
|
19
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, mod));
|
|
20
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
28
21
|
var useValidateProps_exports = {};
|
|
29
22
|
__export(useValidateProps_exports, {
|
|
30
23
|
useValidateProps: () => useValidateProps
|
|
31
24
|
});
|
|
25
|
+
module.exports = __toCommonJS(useValidateProps_exports);
|
|
32
26
|
var React = __toESM(require("react"));
|
|
33
27
|
var import_stringHelpers = require("../utils/stringHelpers");
|
|
34
28
|
var import_numberHelpers = require("../utils/numberHelpers");
|
|
@@ -139,5 +133,4 @@ const useValidateProps = (props) => {
|
|
|
139
133
|
throwInvalidTimerror(time);
|
|
140
134
|
}
|
|
141
135
|
};
|
|
142
|
-
module.exports = __toCommonJS(useValidateProps_exports);
|
|
143
136
|
//# sourceMappingURL=useValidateProps.js.map
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/config/useValidateProps.tsx", "../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
4
|
"sourcesContent": ["/* eslint-disable max-statements */\n/* eslint-disable complexity */\nimport { DSControlledDateTimePickerT } from '../propTypes';\nimport {\n dateTimeToDate,\n isValidDateString,\n dateTimeToTime,\n isValidTimeString,\n deconstructValuesFromDateString,\n} from '../utils/stringHelpers';\nimport { convertToPositiveNumberIfPossible } from '../utils/numberHelpers';\nimport { getIsDateTime, getIsDate, getIsTime } from '../utils/typeGuards';\nconst PREPEND = `ControlledDateTimePicker:\n Invalid configuration detected::\n \n `;\nconst NOT_A_DEFECT = '';\n// '\\n\\n\\t\\tThis is not a defect, please check\\n\\n\\t\\thttps://qa.dimsum.rd.elliemae.io/?path=/story/components-desktop-components-d-controlledform-date-time-picker--basic\\n\\n\\t\\tfor instructions on how to use the component correctly\\n\\n';\nconst INLINE_RECEIVED_PREPEND = `\n\n Received:`;\nconst throwInvalidDateTimeError = (invalidValue: string) => {\n throw new Error(\n `${PREPEND}the \"dateTime\" you are providing is not respecting the format it must respect.${INLINE_RECEIVED_PREPEND}${invalidValue}(${typeof invalidValue})${NOT_A_DEFECT}`,\n );\n};\nconst throwInvalidDaterror = (invalidValue: string) => {\n throw new Error(\n `${PREPEND}the \"date\" you are providing is not respecting the format it must respect.${INLINE_RECEIVED_PREPEND}${invalidValue}(${typeof invalidValue})${NOT_A_DEFECT}`,\n );\n};\nconst throwInvalidTimerror = (invalidValue: string) => {\n throw new Error(\n `${PREPEND}the \"time\" you are providing is not respecting the format it must respect.${INLINE_RECEIVED_PREPEND}${invalidValue}(${typeof invalidValue})${NOT_A_DEFECT}`,\n );\n};\nconst throwUncontrolledDateError = (date: string, onDateChange: unknown) => {\n throw new Error(\n `${PREPEND}you are trying to use a date selector while providing a non-string \"date\" or providing a non-function to \"onDateChange\"\n the full-controlled pattern must be used\\n\\tcheck https://reactjs.org/docs/forms.html#controlled-components for more informations\n\n Received:\n date: ${date}(${typeof date})\n onDateChange: (${typeof onDateChange})\n ${NOT_A_DEFECT}`,\n );\n};\nconst throwUncontrolledTimeError = (time: string, onTimeChange: unknown) => {\n throw new Error(\n `${PREPEND}you are trying to use a time selector while providing a non-string \"time\" or providing a non-function to \"onTimeChange\"\n the full-controlled pattern must be used\\n\\tcheck https://reactjs.org/docs/forms.html#controlled-components for more informations\n\n Received:\n time: ${time}(${typeof time})\n onTimeChange: (${typeof onTimeChange})\n ${NOT_A_DEFECT}`,\n );\n};\n\nconst throwUncontrolledDateTimeError = (dateTime: string, onDateTimeChange: unknown) => {\n throw new Error(\n `${PREPEND}you are trying to use a date-time selector while providing a non-string \"dateTime\" or providing a non-function to \"onDateTimeChange\"\n the full-controlled pattern must be used\\n\\tcheck https://reactjs.org/docs/forms.html#controlled-components for more informations\n\n Received:\n dateTime: ${dateTime}(${typeof dateTime})\n onDateTimeChange: (${typeof onDateTimeChange})\n ${NOT_A_DEFECT}`,\n );\n};\nconst throwInvalidEmptyPickerStartingMonthError = (emptyPickerStartingMonth: string) => {\n throw new Error(\n `${PREPEND}the provided emptyPickerStartingMonth props is invalid. please provide a string with the format mm/__/yyyy, (mm 01~12, yyyy 0001~9999) \n\n Received:\n ${emptyPickerStartingMonth}(${typeof emptyPickerStartingMonth})\n ${NOT_A_DEFECT}`,\n );\n};\nconst throwInvalidOnCalendarOpenFocusedDayError = (onCalendarOpenFocusedDay: string) => {\n throw new Error(\n `${PREPEND}the provided onCalendarOpenFocusedDay props is invalid. please provide a string with the format mm/dd/yyyy, (mm 01~12, dd 01~31, yyyy 0001~9999) \n\n Received:\n ${onCalendarOpenFocusedDay}(${typeof onCalendarOpenFocusedDay})\n ${NOT_A_DEFECT}`,\n );\n};\nexport const useValidateProps = (props: DSControlledDateTimePickerT.Props): void => {\n // validate date-related props\n if (getIsDateTime(props) || getIsDate(props)) {\n const { emptyPickerStartingMonth, onCalendarOpenFocusedDay } = props;\n\n // validate generic use-cases\n if (emptyPickerStartingMonth) {\n const { month: stringMonthVal, year: stringYearVal } = deconstructValuesFromDateString(emptyPickerStartingMonth);\n const monthNum = convertToPositiveNumberIfPossible(stringMonthVal);\n const yearNum = convertToPositiveNumberIfPossible(stringYearVal);\n if (monthNum <= 0 || monthNum >= 13 || yearNum <= 0 || yearNum > 9999)\n throwInvalidEmptyPickerStartingMonthError(emptyPickerStartingMonth);\n }\n if (onCalendarOpenFocusedDay) {\n const {\n month: stringMonthVal,\n day: stringDayVal,\n year: stringYearVal,\n } = deconstructValuesFromDateString(onCalendarOpenFocusedDay);\n const monthNum = convertToPositiveNumberIfPossible(stringMonthVal);\n const dayNum = convertToPositiveNumberIfPossible(stringDayVal);\n const yearNum = convertToPositiveNumberIfPossible(stringYearVal);\n if (monthNum <= 0 || monthNum >= 13 || dayNum <= 0 || dayNum >= 31 || yearNum <= 0 || yearNum > 9999)\n throwInvalidOnCalendarOpenFocusedDayError(onCalendarOpenFocusedDay);\n }\n }\n // validate full datetime cases\n if (getIsDateTime(props)) {\n const { dateTime, onDateTimeChange } = props;\n if (typeof dateTime !== 'string' || typeof onDateTimeChange !== 'function')\n throwUncontrolledDateTimeError(dateTime, onDateTimeChange);\n else if (!isValidDateString(dateTimeToDate(dateTime)) || !isValidTimeString(dateTimeToTime(dateTime)))\n throwInvalidDateTimeError(dateTimeToTime(dateTime));\n }\n\n // validate date-only cases\n if (getIsDate(props)) {\n const { date, onDateChange } = props;\n if (typeof date !== 'string' || typeof onDateChange !== 'function') throwUncontrolledDateError(date, onDateChange);\n else if (!isValidDateString(date)) throwInvalidDaterror(date);\n }\n\n // validate time-only cases\n\n if (getIsTime(props)) {\n const { time, onTimeChange } = props;\n if (typeof time !== 'string' || typeof onTimeChange !== 'function') throwUncontrolledTimeError(time, onTimeChange);\n else if (!isValidTimeString(time)) throwInvalidTimerror(time);\n }\n};\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
-
"mappings": "
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADGvB,2BAMO;AACP,2BAAkD;AAClD,wBAAoD;AACpD,MAAM,UAAU;AAAA;AAAA;AAAA;AAIhB,MAAM,eAAe;AAErB,MAAM,0BAA0B;AAAA;AAAA;AAGhC,MAAM,4BAA4B,CAAC,iBAAyB;AAC1D,QAAM,IAAI,MACR,GAAG,wFAAwF,0BAA0B,gBAAgB,OAAO,gBAAgB,cAC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|
|
|
4
4
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
5
|
var __getProtoOf = Object.getPrototypeOf;
|
|
6
6
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
-
var __markAsModule = (target) => __defProp(target, "__esModule", { value: true });
|
|
8
7
|
var __export = (target, all) => {
|
|
9
8
|
for (var name in all)
|
|
10
9
|
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
10
|
};
|
|
12
|
-
var
|
|
13
|
-
if (
|
|
14
|
-
for (let key of __getOwnPropNames(
|
|
15
|
-
if (!__hasOwnProp.call(
|
|
16
|
-
__defProp(
|
|
11
|
+
var __copyProps = (to, from, except, desc) => {
|
|
12
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
13
|
+
for (let key of __getOwnPropNames(from))
|
|
14
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
15
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
17
16
|
}
|
|
18
|
-
return
|
|
17
|
+
return to;
|
|
19
18
|
};
|
|
20
|
-
var __toESM = (
|
|
21
|
-
|
|
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);
|
|
19
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, mod));
|
|
20
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
28
21
|
var src_exports = {};
|
|
29
22
|
__export(src_exports, {
|
|
30
23
|
CONTROLLED_DATE_TIME_PICKER_TYPES: () => import_ControlledDateTimePickerTypes.CONTROLLED_DATE_TIME_PICKER_TYPES,
|
|
@@ -40,6 +33,7 @@ __export(src_exports, {
|
|
|
40
33
|
getValidationTimeStringMetaInfo: () => import_timeHelpers.getValidationTimeStringMetaInfo,
|
|
41
34
|
prependStringWithPlaceHolders: () => import_stringHelpers.prependStringWithPlaceHolders
|
|
42
35
|
});
|
|
36
|
+
module.exports = __toCommonJS(src_exports);
|
|
43
37
|
var React = __toESM(require("react"));
|
|
44
38
|
var import_ControlledDateTimePicker = require("./ControlledDateTimePicker");
|
|
45
39
|
var import_ControlledDateTimePickerDatatestid = require("./ControlledDateTimePickerDatatestid");
|
|
@@ -48,5 +42,4 @@ var import_stringHelpers = require("./utils/stringHelpers");
|
|
|
48
42
|
var import_dateTimeHelpers = require("./utils/dateTimeHelpers");
|
|
49
43
|
var import_dateHelpers = require("./utils/dateHelpers");
|
|
50
44
|
var import_timeHelpers = require("./utils/timeHelpers");
|
|
51
|
-
module.exports = __toCommonJS(src_exports);
|
|
52
45
|
//# sourceMappingURL=index.js.map
|
package/dist/cjs/index.js.map
CHANGED
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/index.ts", "../../../../scripts/build/transpile/react-shim.js"],
|
|
4
4
|
"sourcesContent": ["export { DSControlledDateTimePickerWithSchema, DSControlledDateTimePicker } from './ControlledDateTimePicker';\nexport { ControlledDateTimePickerDatatestid } from './ControlledDateTimePickerDatatestid';\nexport { CONTROLLED_DATE_TIME_PICKER_TYPES } from './ControlledDateTimePickerTypes';\nexport { deconstructValuesFromDateString, prependStringWithPlaceHolders } from './utils/stringHelpers';\nexport { getValidationDateTimeStringMetaInfo } from './utils/dateTimeHelpers';\nexport {\n getValidationDateStringMetaInfo,\n getDateStringFromDay,\n getDayFromDateString,\n getDateValuesFromDate,\n} from './utils/dateHelpers';\nexport { getValidationTimeStringMetaInfo } from './utils/timeHelpers';\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
-
"mappings": "
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,sCAAiF;AACjF,gDAAmD;AACnD,2CAAkD;AAClD,2BAA+E;AAC/E,6BAAoD;AACpD,yBAKO;AACP,yBAAgD;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|