@elliemae/ds-form-date-range-picker 3.80.0-next.72 → 3.80.0-next.75
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/parts/ControlledDateRangeContent.js +7 -2
- package/dist/cjs/parts/ControlledDateRangeContent.js.map +2 -2
- package/dist/cjs/parts/ControlledDateRangeFromDate.js +3 -3
- package/dist/cjs/parts/ControlledDateRangeFromDate.js.map +2 -2
- package/dist/cjs/parts/ControlledDateRangeToDate.js +3 -3
- package/dist/cjs/parts/ControlledDateRangeToDate.js.map +2 -2
- package/dist/cjs/react-desc-prop-types.js +4 -2
- package/dist/cjs/react-desc-prop-types.js.map +2 -2
- package/dist/esm/parts/ControlledDateRangeContent.js +7 -2
- package/dist/esm/parts/ControlledDateRangeContent.js.map +2 -2
- package/dist/esm/parts/ControlledDateRangeFromDate.js +3 -3
- package/dist/esm/parts/ControlledDateRangeFromDate.js.map +2 -2
- package/dist/esm/parts/ControlledDateRangeToDate.js +3 -3
- package/dist/esm/parts/ControlledDateRangeToDate.js.map +2 -2
- package/dist/esm/react-desc-prop-types.js +4 -2
- package/dist/esm/react-desc-prop-types.js.map +2 -2
- package/package.json +7 -7
|
@@ -33,6 +33,7 @@ __export(ControlledDateRangeContent_exports, {
|
|
|
33
33
|
module.exports = __toCommonJS(ControlledDateRangeContent_exports);
|
|
34
34
|
var React = __toESM(require("react"));
|
|
35
35
|
var import_jsx_runtime = require("react/jsx-runtime");
|
|
36
|
+
var import_ds_props_helpers = require("@elliemae/ds-props-helpers");
|
|
36
37
|
var import_ds_system = require("@elliemae/ds-system");
|
|
37
38
|
var import_react = require("react");
|
|
38
39
|
var import_ControlledDateRangePickerCTX = require("../ControlledDateRangePickerCTX.js");
|
|
@@ -57,7 +58,7 @@ const StyledWrapper = (0, import_ds_system.styled)("div", {
|
|
|
57
58
|
`;
|
|
58
59
|
const ControlledDateRangeContent = () => {
|
|
59
60
|
const {
|
|
60
|
-
props: { type },
|
|
61
|
+
props: { type, disabled, applyAriaDisabled, readOnly },
|
|
61
62
|
withIcon,
|
|
62
63
|
withInputs,
|
|
63
64
|
isControllerOnly,
|
|
@@ -66,13 +67,17 @@ const ControlledDateRangeContent = () => {
|
|
|
66
67
|
globalAttrs,
|
|
67
68
|
ownerPropsConfig
|
|
68
69
|
} = (0, import_react.useContext)(import_ControlledDateRangePickerCTX.ControlledDateRangePickerContext);
|
|
70
|
+
const globalAttrsWithoutLock = (0, import_ds_props_helpers.omitLockedHandlers)(
|
|
71
|
+
(0, import_ds_props_helpers.omitLockAttributes)(globalAttrs),
|
|
72
|
+
(0, import_ds_props_helpers.isLocked)({ disabled, applyAriaDisabled, readOnly })
|
|
73
|
+
);
|
|
69
74
|
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
|
|
70
75
|
StyledWrapper,
|
|
71
76
|
{
|
|
72
77
|
isControllerOnly,
|
|
73
78
|
isPickerOnly,
|
|
74
79
|
type,
|
|
75
|
-
...
|
|
80
|
+
...globalAttrsWithoutLock,
|
|
76
81
|
...xstyledAttrs,
|
|
77
82
|
...ownerPropsConfig,
|
|
78
83
|
children: [
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/parts/ControlledDateRangeContent.tsx", "../../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
-
"sourcesContent": ["import { styled, xStyledCommonProps } from '@elliemae/ds-system';\nimport { useContext } from 'react';\nimport { ControlledDateRangePickerContext } from '../ControlledDateRangePickerCTX.js';\nimport { DSControlledDateRangePickerName, DATE_RANGE_PICKER_SLOTS } from '../constants/index.js';\nimport type { DSControlledDateRangePickerT } from '../react-desc-prop-types.js';\nimport { gridMap } from '../utils/utils.js';\nimport { ControlledDateRangeCalendar } from './ControlledDateRangeCalendar.js';\nimport { ControlledDateRangeFromDate } from './ControlledDateRangeFromDate.js';\nimport { ControlledDateRangeToDate } from './ControlledDateRangeToDate.js';\n\ninterface StyledWrapperT {\n isControllerOnly: boolean;\n isPickerOnly: boolean;\n type: DSControlledDateRangePickerT.ControlledDateRangeType;\n}\n\nconst StyledWrapper = styled('div', {\n name: DSControlledDateRangePickerName,\n slot: DATE_RANGE_PICKER_SLOTS.CONTAINER,\n})<StyledWrapperT>`\n display: grid;\n grid-template-columns: ${({ type }) => gridMap[type]};\n grid-template-rows: auto;\n ${({ isControllerOnly, isPickerOnly }) => (isControllerOnly || isPickerOnly ? '' : 'gap: 0px 8px;')}\n grid-auto-flow: row;\n grid-template-areas: '. .';\n justify-content: center;\n align-items: center;\n ${xStyledCommonProps}\n`;\n\nexport const ControlledDateRangeContent = (): JSX.Element => {\n const {\n props: { type },\n withIcon,\n withInputs,\n isControllerOnly,\n isPickerOnly,\n xstyledAttrs,\n globalAttrs,\n ownerPropsConfig,\n } = useContext(ControlledDateRangePickerContext);\n\n return (\n <StyledWrapper\n isControllerOnly={isControllerOnly}\n isPickerOnly={isPickerOnly}\n type={type}\n {...
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;
|
|
4
|
+
"sourcesContent": ["import { isLocked, omitLockAttributes, omitLockedHandlers } from '@elliemae/ds-props-helpers';\nimport { styled, xStyledCommonProps } from '@elliemae/ds-system';\nimport { useContext } from 'react';\nimport { ControlledDateRangePickerContext } from '../ControlledDateRangePickerCTX.js';\nimport { DSControlledDateRangePickerName, DATE_RANGE_PICKER_SLOTS } from '../constants/index.js';\nimport type { DSControlledDateRangePickerT } from '../react-desc-prop-types.js';\nimport { gridMap } from '../utils/utils.js';\nimport { ControlledDateRangeCalendar } from './ControlledDateRangeCalendar.js';\nimport { ControlledDateRangeFromDate } from './ControlledDateRangeFromDate.js';\nimport { ControlledDateRangeToDate } from './ControlledDateRangeToDate.js';\n\ninterface StyledWrapperT {\n isControllerOnly: boolean;\n isPickerOnly: boolean;\n type: DSControlledDateRangePickerT.ControlledDateRangeType;\n}\n\nconst StyledWrapper = styled('div', {\n name: DSControlledDateRangePickerName,\n slot: DATE_RANGE_PICKER_SLOTS.CONTAINER,\n})<StyledWrapperT>`\n display: grid;\n grid-template-columns: ${({ type }) => gridMap[type]};\n grid-template-rows: auto;\n ${({ isControllerOnly, isPickerOnly }) => (isControllerOnly || isPickerOnly ? '' : 'gap: 0px 8px;')}\n grid-auto-flow: row;\n grid-template-areas: '. .';\n justify-content: center;\n align-items: center;\n ${xStyledCommonProps}\n`;\n\nexport const ControlledDateRangeContent = (): JSX.Element => {\n const {\n props: { type, disabled, applyAriaDisabled, readOnly },\n withIcon,\n withInputs,\n isControllerOnly,\n isPickerOnly,\n xstyledAttrs,\n globalAttrs,\n ownerPropsConfig,\n } = useContext(ControlledDateRangePickerContext);\n // disabled and readOnly are global attributes too: the root is a div, so they are not spread onto it\n // a locked range picker withholds the consumer's action handlers on its root too\n const globalAttrsWithoutLock = omitLockedHandlers(\n omitLockAttributes(globalAttrs),\n isLocked({ disabled, applyAriaDisabled, readOnly }),\n );\n\n return (\n <StyledWrapper\n isControllerOnly={isControllerOnly}\n isPickerOnly={isPickerOnly}\n type={type}\n {...globalAttrsWithoutLock}\n {...xstyledAttrs}\n {...ownerPropsConfig}\n >\n {withInputs ? (\n <>\n <ControlledDateRangeFromDate />\n <ControlledDateRangeToDate />\n </>\n ) : null}\n {withIcon || isControllerOnly ? <ControlledDateRangeCalendar /> : null}\n </StyledWrapper>\n );\n};\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;AD4Df;AA5DR,8BAAiE;AACjE,uBAA2C;AAC3C,mBAA2B;AAC3B,0CAAiD;AACjD,uBAAyE;AAEzE,mBAAwB;AACxB,yCAA4C;AAC5C,yCAA4C;AAC5C,uCAA0C;AAQ1C,MAAM,oBAAgB,yBAAO,OAAO;AAAA,EAClC,MAAM;AAAA,EACN,MAAM,yCAAwB;AAChC,CAAC;AAAA;AAAA,2BAE0B,CAAC,EAAE,KAAK,MAAM,qBAAQ,IAAI,CAAC;AAAA;AAAA,IAElD,CAAC,EAAE,kBAAkB,aAAa,MAAO,oBAAoB,eAAe,KAAK,eAAgB;AAAA;AAAA;AAAA;AAAA;AAAA,IAKjG,mCAAkB;AAAA;AAGf,MAAM,6BAA6B,MAAmB;AAC3D,QAAM;AAAA,IACJ,OAAO,EAAE,MAAM,UAAU,mBAAmB,SAAS;AAAA,IACrD;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF,QAAI,yBAAW,oEAAgC;AAG/C,QAAM,6BAAyB;AAAA,QAC7B,4CAAmB,WAAW;AAAA,QAC9B,kCAAS,EAAE,UAAU,mBAAmB,SAAS,CAAC;AAAA,EACpD;AAEA,SACE;AAAA,IAAC;AAAA;AAAA,MACC;AAAA,MACA;AAAA,MACA;AAAA,MACC,GAAG;AAAA,MACH,GAAG;AAAA,MACH,GAAG;AAAA,MAEH;AAAA,qBACC,4EACE;AAAA,sDAAC,kEAA4B;AAAA,UAC7B,4CAAC,8DAA0B;AAAA,WAC7B,IACE;AAAA,QACH,YAAY,mBAAmB,4CAAC,kEAA4B,IAAK;AAAA;AAAA;AAAA,EACpE;AAEJ;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -72,10 +72,10 @@ const ControlledDateRangeFromDate = () => {
|
|
|
72
72
|
autoFocus,
|
|
73
73
|
innerRef,
|
|
74
74
|
tabIndex,
|
|
75
|
-
disabled,
|
|
76
|
-
readOnly,
|
|
77
|
-
applyAriaDisabled,
|
|
78
75
|
...dateTimePickerFromProps,
|
|
76
|
+
disabled: Boolean(disabled || dateTimePickerFromProps?.disabled),
|
|
77
|
+
readOnly: Boolean(readOnly || dateTimePickerFromProps?.readOnly),
|
|
78
|
+
applyAriaDisabled: Boolean(applyAriaDisabled || dateTimePickerFromProps?.applyAriaDisabled),
|
|
79
79
|
type: import_ds_form_date_time_picker.CONTROLLED_DATE_TIME_PICKER_TYPES.DATE.INPUTS,
|
|
80
80
|
dsControlleddatetimepickerTimePickerMonthInput: { "aria-label": "Start date month" },
|
|
81
81
|
dsControlleddatetimepickerTimePickerDayInput: { "aria-label": "Start date day" },
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/parts/ControlledDateRangeFromDate.tsx", "../../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
-
"sourcesContent": ["import React, { useContext } from 'react';\nimport { CONTROLLED_DATE_TIME_PICKER_TYPES, DSControlledDateTimePicker } from '@elliemae/ds-form-date-time-picker';\nimport { ControlledDateRangePickerContext } from '../ControlledDateRangePickerCTX.js';\n\nexport const ControlledDateRangeFromDate = (): JSX.Element => {\n const {\n props: {\n fromDate,\n onMonthFromChange,\n onDayFromChange,\n onYearFromChange,\n isClearable,\n getIsDisabledDay,\n getIsOutOfRangeDay,\n hasError,\n autoFocus,\n innerRef,\n tabIndex,\n disabled,\n readOnly,\n applyAriaDisabled,\n dateTimePickerFromProps,\n },\n rangePickerLogic: { handleFromDateChange },\n } = useContext(ControlledDateRangePickerContext);\n return (\n <DSControlledDateTimePicker\n date={fromDate}\n onDateChange={handleFromDateChange}\n onMonthChange={onMonthFromChange}\n onDayChange={onDayFromChange}\n onYearChange={onYearFromChange}\n isClearable={isClearable}\n getIsDisabledDay={getIsDisabledDay}\n getIsOutOfRangeDay={getIsOutOfRangeDay}\n hasError={hasError}\n autoFocus={autoFocus}\n innerRef={innerRef}\n tabIndex={tabIndex}\n disabled={disabled}\n readOnly={readOnly}\n applyAriaDisabled={applyAriaDisabled
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;AD0BnB;AA1BJ,mBAAkC;AAClC,sCAA8E;AAC9E,0CAAiD;AAE1C,MAAM,8BAA8B,MAAmB;AAC5D,QAAM;AAAA,IACJ,OAAO;AAAA,MACL;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,IACF;AAAA,IACA,kBAAkB,EAAE,qBAAqB;AAAA,EAC3C,QAAI,yBAAW,oEAAgC;AAC/C,SACE;AAAA,IAAC;AAAA;AAAA,MACC,MAAM;AAAA,MACN,cAAc;AAAA,MACd,eAAe;AAAA,MACf,aAAa;AAAA,MACb,cAAc;AAAA,MACd;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,
|
|
4
|
+
"sourcesContent": ["import React, { useContext } from 'react';\nimport { CONTROLLED_DATE_TIME_PICKER_TYPES, DSControlledDateTimePicker } from '@elliemae/ds-form-date-time-picker';\nimport { ControlledDateRangePickerContext } from '../ControlledDateRangePickerCTX.js';\n\nexport const ControlledDateRangeFromDate = (): JSX.Element => {\n const {\n props: {\n fromDate,\n onMonthFromChange,\n onDayFromChange,\n onYearFromChange,\n isClearable,\n getIsDisabledDay,\n getIsOutOfRangeDay,\n hasError,\n autoFocus,\n innerRef,\n tabIndex,\n disabled,\n readOnly,\n applyAriaDisabled,\n dateTimePickerFromProps,\n },\n rangePickerLogic: { handleFromDateChange },\n } = useContext(ControlledDateRangePickerContext);\n return (\n <DSControlledDateTimePicker\n date={fromDate}\n onDateChange={handleFromDateChange}\n onMonthChange={onMonthFromChange}\n onDayChange={onDayFromChange}\n onYearChange={onYearFromChange}\n isClearable={isClearable}\n getIsDisabledDay={getIsDisabledDay}\n getIsOutOfRangeDay={getIsOutOfRangeDay}\n hasError={hasError}\n autoFocus={autoFocus}\n innerRef={innerRef}\n tabIndex={tabIndex}\n {...dateTimePickerFromProps}\n // PUI-16695: the range lock wins over the per-picker spread, and a per-picker lock still applies\n disabled={Boolean(disabled || dateTimePickerFromProps?.disabled)}\n readOnly={Boolean(readOnly || dateTimePickerFromProps?.readOnly)}\n applyAriaDisabled={Boolean(applyAriaDisabled || dateTimePickerFromProps?.applyAriaDisabled)}\n type={CONTROLLED_DATE_TIME_PICKER_TYPES.DATE.INPUTS}\n // Name each spinbutton with the \"Start date\" context instead of wrapping the inputs in a\n // named role=\"group\". A nested named group collides with the DSFormLayoutBlockItem fieldset\n // legend that announces the feedback/validation message (PUI-17322 kept 1.3.1 via naming).\n dsControlleddatetimepickerTimePickerMonthInput={{ 'aria-label': 'Start date month' }}\n dsControlleddatetimepickerTimePickerDayInput={{ 'aria-label': 'Start date day' }}\n dsControlleddatetimepickerTimePickerYearInput={{ 'aria-label': 'Start date year' }}\n />\n );\n};\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;AD0BnB;AA1BJ,mBAAkC;AAClC,sCAA8E;AAC9E,0CAAiD;AAE1C,MAAM,8BAA8B,MAAmB;AAC5D,QAAM;AAAA,IACJ,OAAO;AAAA,MACL;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,IACF;AAAA,IACA,kBAAkB,EAAE,qBAAqB;AAAA,EAC3C,QAAI,yBAAW,oEAAgC;AAC/C,SACE;AAAA,IAAC;AAAA;AAAA,MACC,MAAM;AAAA,MACN,cAAc;AAAA,MACd,eAAe;AAAA,MACf,aAAa;AAAA,MACb,cAAc;AAAA,MACd;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACC,GAAG;AAAA,MAEJ,UAAU,QAAQ,YAAY,yBAAyB,QAAQ;AAAA,MAC/D,UAAU,QAAQ,YAAY,yBAAyB,QAAQ;AAAA,MAC/D,mBAAmB,QAAQ,qBAAqB,yBAAyB,iBAAiB;AAAA,MAC1F,MAAM,kEAAkC,KAAK;AAAA,MAI7C,gDAAgD,EAAE,cAAc,mBAAmB;AAAA,MACnF,8CAA8C,EAAE,cAAc,iBAAiB;AAAA,MAC/E,+CAA+C,EAAE,cAAc,kBAAkB;AAAA;AAAA,EACnF;AAEJ;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -68,10 +68,10 @@ const ControlledDateRangeToDate = () => {
|
|
|
68
68
|
getIsOutOfRangeDay,
|
|
69
69
|
hasError,
|
|
70
70
|
tabIndex,
|
|
71
|
-
disabled,
|
|
72
|
-
readOnly,
|
|
73
|
-
applyAriaDisabled,
|
|
74
71
|
...dateTimePickerToProps,
|
|
72
|
+
disabled: Boolean(disabled || dateTimePickerToProps?.disabled),
|
|
73
|
+
readOnly: Boolean(readOnly || dateTimePickerToProps?.readOnly),
|
|
74
|
+
applyAriaDisabled: Boolean(applyAriaDisabled || dateTimePickerToProps?.applyAriaDisabled),
|
|
75
75
|
type: import_ds_form_date_time_picker.CONTROLLED_DATE_TIME_PICKER_TYPES.DATE.INPUTS,
|
|
76
76
|
dsControlleddatetimepickerTimePickerMonthInput: { "aria-label": "End date month" },
|
|
77
77
|
dsControlleddatetimepickerTimePickerDayInput: { "aria-label": "End date day" },
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/parts/ControlledDateRangeToDate.tsx", "../../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
-
"sourcesContent": ["import React, { useContext } from 'react';\nimport { CONTROLLED_DATE_TIME_PICKER_TYPES, DSControlledDateTimePicker } from '@elliemae/ds-form-date-time-picker';\nimport { ControlledDateRangePickerContext } from '../ControlledDateRangePickerCTX.js';\n\nexport const ControlledDateRangeToDate = (): JSX.Element => {\n const {\n props: {\n toDate,\n onMonthToChange,\n onDayToChange,\n onYearToChange,\n isClearable,\n getIsDisabledDay,\n getIsOutOfRangeDay,\n hasError,\n tabIndex,\n disabled,\n readOnly,\n applyAriaDisabled,\n dateTimePickerToProps,\n },\n rangePickerLogic: { handleToDateChange },\n } = useContext(ControlledDateRangePickerContext);\n return (\n <DSControlledDateTimePicker\n date={toDate}\n onDateChange={handleToDateChange}\n onMonthChange={onMonthToChange}\n onDayChange={onDayToChange}\n onYearChange={onYearToChange}\n isClearable={isClearable}\n getIsDisabledDay={getIsDisabledDay}\n getIsOutOfRangeDay={getIsOutOfRangeDay}\n hasError={hasError}\n tabIndex={tabIndex}\n disabled={disabled}\n readOnly={readOnly}\n applyAriaDisabled={applyAriaDisabled
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADwBnB;AAxBJ,mBAAkC;AAClC,sCAA8E;AAC9E,0CAAiD;AAE1C,MAAM,4BAA4B,MAAmB;AAC1D,QAAM;AAAA,IACJ,OAAO;AAAA,MACL;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,IACF;AAAA,IACA,kBAAkB,EAAE,mBAAmB;AAAA,EACzC,QAAI,yBAAW,oEAAgC;AAC/C,SACE;AAAA,IAAC;AAAA;AAAA,MACC,MAAM;AAAA,MACN,cAAc;AAAA,MACd,eAAe;AAAA,MACf,aAAa;AAAA,MACb,cAAc;AAAA,MACd;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,
|
|
4
|
+
"sourcesContent": ["import React, { useContext } from 'react';\nimport { CONTROLLED_DATE_TIME_PICKER_TYPES, DSControlledDateTimePicker } from '@elliemae/ds-form-date-time-picker';\nimport { ControlledDateRangePickerContext } from '../ControlledDateRangePickerCTX.js';\n\nexport const ControlledDateRangeToDate = (): JSX.Element => {\n const {\n props: {\n toDate,\n onMonthToChange,\n onDayToChange,\n onYearToChange,\n isClearable,\n getIsDisabledDay,\n getIsOutOfRangeDay,\n hasError,\n tabIndex,\n disabled,\n readOnly,\n applyAriaDisabled,\n dateTimePickerToProps,\n },\n rangePickerLogic: { handleToDateChange },\n } = useContext(ControlledDateRangePickerContext);\n return (\n <DSControlledDateTimePicker\n date={toDate}\n onDateChange={handleToDateChange}\n onMonthChange={onMonthToChange}\n onDayChange={onDayToChange}\n onYearChange={onYearToChange}\n isClearable={isClearable}\n getIsDisabledDay={getIsDisabledDay}\n getIsOutOfRangeDay={getIsOutOfRangeDay}\n hasError={hasError}\n tabIndex={tabIndex}\n {...dateTimePickerToProps}\n // PUI-16695: the range lock wins over the per-picker spread, and a per-picker lock still applies\n disabled={Boolean(disabled || dateTimePickerToProps?.disabled)}\n readOnly={Boolean(readOnly || dateTimePickerToProps?.readOnly)}\n applyAriaDisabled={Boolean(applyAriaDisabled || dateTimePickerToProps?.applyAriaDisabled)}\n type={CONTROLLED_DATE_TIME_PICKER_TYPES.DATE.INPUTS}\n // Name each spinbutton with the \"End date\" context instead of wrapping the inputs in a\n // named role=\"group\". A nested named group collides with the DSFormLayoutBlockItem fieldset\n // legend that announces the feedback/validation message (PUI-17322 kept 1.3.1 via naming).\n dsControlleddatetimepickerTimePickerMonthInput={{ 'aria-label': 'End date month' }}\n dsControlleddatetimepickerTimePickerDayInput={{ 'aria-label': 'End date day' }}\n dsControlleddatetimepickerTimePickerYearInput={{ 'aria-label': 'End date year' }}\n />\n );\n};\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADwBnB;AAxBJ,mBAAkC;AAClC,sCAA8E;AAC9E,0CAAiD;AAE1C,MAAM,4BAA4B,MAAmB;AAC1D,QAAM;AAAA,IACJ,OAAO;AAAA,MACL;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,IACF;AAAA,IACA,kBAAkB,EAAE,mBAAmB;AAAA,EACzC,QAAI,yBAAW,oEAAgC;AAC/C,SACE;AAAA,IAAC;AAAA;AAAA,MACC,MAAM;AAAA,MACN,cAAc;AAAA,MACd,eAAe;AAAA,MACf,aAAa;AAAA,MACb,cAAc;AAAA,MACd;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACC,GAAG;AAAA,MAEJ,UAAU,QAAQ,YAAY,uBAAuB,QAAQ;AAAA,MAC7D,UAAU,QAAQ,YAAY,uBAAuB,QAAQ;AAAA,MAC7D,mBAAmB,QAAQ,qBAAqB,uBAAuB,iBAAiB;AAAA,MACxF,MAAM,kEAAkC,KAAK;AAAA,MAI7C,gDAAgD,EAAE,cAAc,iBAAiB;AAAA,MACjF,8CAA8C,EAAE,cAAc,eAAe;AAAA,MAC7E,+CAA+C,EAAE,cAAc,gBAAgB;AAAA;AAAA,EACjF;AAEJ;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -110,9 +110,11 @@ const DSControlledDateRangePickerPropTypes = {
|
|
|
110
110
|
"ref for the last focusable element in the component based on its configuration, used for focus management in focus trap logic"
|
|
111
111
|
),
|
|
112
112
|
tabIndex: import_ds_props_helpers.PropTypes.string.description('tabIndex to be applied to the "from" month input'),
|
|
113
|
-
readOnly: import_ds_props_helpers.PropTypes.bool.description(
|
|
113
|
+
readOnly: import_ds_props_helpers.PropTypes.bool.description(
|
|
114
|
+
'Soft lock, same as applyAriaDisabled: aria-disabled="true", CAN STILL RECEIVE FOCUS, WITHHOLDS THE CHANGE: the value does not change and onDateChange is not called. The picker still opens its calendar and time wheel to show the value (a view-only popup). Dimsum never writes aria-readonly.'
|
|
115
|
+
).defaultValue(false),
|
|
114
116
|
applyAriaDisabled: import_ds_props_helpers.PropTypes.bool.description(
|
|
115
|
-
"Whether to apply disabled styling and announce as disabled in SR. CAN STILL RECEIVE FOCUS.
|
|
117
|
+
"Whether to apply disabled styling and announce as disabled in SR. CAN STILL RECEIVE FOCUS. WITHHOLDS THE CHANGE: the value does not change and onDateChange is not called. The picker still opens its calendar and time wheel to show the value (a view-only popup)."
|
|
116
118
|
),
|
|
117
119
|
dateTimePickerFromProps: import_ds_props_helpers.PropTypes.object.description('props to pass to the "from" date picker'),
|
|
118
120
|
dateTimePickerToProps: import_ds_props_helpers.PropTypes.object.description('props to pass to the "to" date picker')
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/react-desc-prop-types.tsx", "../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
-
"sourcesContent": ["/* eslint-disable max-lines */\nimport {\n PropTypes,\n globalAttributesPropTypes,\n xstyledPropTypes,\n getPropsPerSlotPropTypes,\n} from '@elliemae/ds-props-helpers';\nimport type { ValidationMap, GlobalAttributesT, DSPropTypesSchema, XstyledProps } from '@elliemae/ds-props-helpers';\nimport { type DSControlledDateTimePickerT } from '@elliemae/ds-form-date-time-picker';\nimport { type TypescriptHelpersT } from '@elliemae/ds-typescript-helpers';\nimport { DSControlledDateRangePickerName, DATE_RANGE_PICKER_SLOTS } from './constants/index.js';\n\n// eslint-disable-next-line @typescript-eslint/no-empty-function\nconst noop = (): void => {};\n\nconst defaultReturnFalse = (): boolean => false;\n\nexport declare namespace DSControlledDateRangePickerT {\n export interface RangePickerMetaInfoT extends DSControlledDateTimePickerT.InternalInputsChangeMetaInfo {\n rangeDateChangeType?: 'from' | 'to';\n automaticSwitchedDates?: boolean;\n isIncorrectOrder?: boolean;\n }\n\n export type RangeOnDateChange = (val: string, metaInfo: RangePickerMetaInfoT) => void;\n\n export type AppOnInputChange = DSControlledDateTimePickerT.AppOnInputChange;\n\n export type ControlledDateRangeType =\n 'full-date-range' | 'date-range-picker-controller-only' | 'date-range-picker' | 'date-range-inputs';\n\n export type SlotFunctionArguments = {\n dsControlleddaterangepickerRoot: () => object;\n };\n\n export interface RequiredProps {}\n\n export interface DefaultProps {\n type: ControlledDateRangeType;\n fromDate: string;\n onFromDateChange: RangeOnDateChange;\n onMonthFromChange: AppOnInputChange;\n onDayFromChange: AppOnInputChange;\n onYearFromChange: AppOnInputChange;\n hasError: boolean;\n pickerFooterMsg: string;\n\n toDate: string;\n onToDateChange: RangeOnDateChange;\n onMonthToChange: AppOnInputChange;\n onDayToChange: AppOnInputChange;\n onYearToChange: AppOnInputChange;\n\n onPickerOpen: TypescriptHelpersT.VoidGenericFunc;\n onPickerClose: TypescriptHelpersT.VoidGenericFunc;\n\n isClearable: boolean;\n getIsDisabledDay: (day: string) => boolean;\n getIsOutOfRangeDay: (day: string) => boolean;\n autoFocus: boolean;\n readOnly: boolean;\n }\n\n export interface OptionalProps extends TypescriptHelpersT.PropsForGlobalOnSlots<\n typeof DSControlledDateRangePickerName,\n typeof DATE_RANGE_PICKER_SLOTS\n > {\n emptyPickerStartingMonth?: string;\n onCalendarOpenFocusedDay?: string;\n innerRef?:\n | React.MutableRefObject<HTMLInputElement | HTMLButtonElement | null>\n | ((ref: HTMLInputElement | HTMLButtonElement | null) => void);\n lastElementRef?: React.MutableRefObject<HTMLElement | null>;\n tabIndex?: TypescriptHelpersT.WCAGTabIndex;\n applyAriaDisabled?: boolean;\n dateTimePickerFromProps?: Partial<DSControlledDateTimePickerT.Props>;\n dateTimePickerToProps?: Partial<DSControlledDateTimePickerT.Props>;\n }\n\n export interface Props\n extends\n Partial<DefaultProps>,\n Omit<GlobalAttributesT<HTMLDivElement>, keyof DefaultProps | keyof OptionalProps>,\n OptionalProps,\n XstyledProps,\n RequiredProps {}\n\n export interface InternalProps\n extends\n DefaultProps,\n Omit<GlobalAttributesT<HTMLDivElement>, keyof DefaultProps | keyof OptionalProps>,\n Omit<OptionalProps, `dsControlleddaterangepicker${Capitalize<string>}`>,\n XstyledProps,\n RequiredProps {}\n}\n\nexport const defaultProps: DSControlledDateRangePickerT.DefaultProps = {\n type: 'full-date-range',\n fromDate: '',\n onFromDateChange: noop,\n onMonthFromChange: noop,\n onDayFromChange: noop,\n onYearFromChange: noop,\n pickerFooterMsg: '',\n toDate: '',\n onToDateChange: noop,\n onMonthToChange: noop,\n onDayToChange: noop,\n onYearToChange: noop,\n onPickerOpen: noop,\n onPickerClose: noop,\n getIsDisabledDay: defaultReturnFalse,\n getIsOutOfRangeDay: defaultReturnFalse,\n hasError: false,\n isClearable: false,\n autoFocus: false,\n readOnly: false,\n};\n\nexport const DSControlledDateRangePickerPropTypes: DSPropTypesSchema<DSControlledDateRangePickerT.Props> = {\n ...getPropsPerSlotPropTypes(DSControlledDateRangePickerName, DATE_RANGE_PICKER_SLOTS),\n ...globalAttributesPropTypes,\n ...xstyledPropTypes,\n type: PropTypes.oneOf([\n 'full-date-range',\n 'date-range-picker-controller-only',\n 'date-range-picker',\n 'date-range-inputs',\n ])\n .description('Type of date range form control to use')\n .defaultValue('full-date-range'),\n fromDate: PropTypes.string.description(`strictly formatted string representing user's selected \"from\" date`)\n .isRequired,\n onFromDateChange: PropTypes.func\n .description('function to react to \"from\" date changing')\n .signature('(( newVal: string, e: React.SyntheticEvent, metaInfo: Record<string,unknown> ) => void )').isRequired,\n onMonthFromChange: PropTypes.func\n .description('function to react to \"from\" month changing')\n .defaultValue(() => {})\n .signature('(( newVal: string, e: React.SyntheticEvent, metaInfo: Record<string,unknown> ) => void )'),\n onDayFromChange: PropTypes.func\n .description('function to react to \"from\" day changing')\n .defaultValue(() => {})\n .signature('(( newVal: string, e: React.SyntheticEvent, metaInfo: Record<string,unknown> ) => void )'),\n onYearFromChange: PropTypes.func\n .description('function to react to \"from\" year changing')\n .defaultValue(() => {})\n .signature('(( newVal: string, e: React.SyntheticEvent, metaInfo: Record<string,unknown> ) => void )'),\n toDate: PropTypes.string.description(`strictly formatted string representing user's selected \"to\" date`).isRequired,\n onToDateChange: PropTypes.func\n .description('function to react to \"to\" date changing')\n .signature('(( newVal: string, e: React.SyntheticEvent, metaInfo: Record<string,unknown> ) => void )').isRequired,\n onMonthToChange: PropTypes.func\n .description('function to react to \"to\" month changing')\n .defaultValue(() => {})\n .signature('(( newVal: string, e: React.SyntheticEvent, metaInfo: Record<string,unknown> ) => void )'),\n onDayToChange: PropTypes.func\n .description('function to react to \"to\" day changing')\n .defaultValue(() => {})\n .signature('(( newVal: string, e: React.SyntheticEvent, metaInfo: Record<string,unknown> ) => void )'),\n onYearToChange: PropTypes.func\n .description('function to react to \"to\" year changing')\n .defaultValue(() => {})\n .signature('(( newVal: string, e: React.SyntheticEvent, metaInfo: Record<string,unknown> ) => void )'),\n onPickerOpen: PropTypes.func\n .description('function to react to the calendar context menu being opened')\n .defaultValue(() => {})\n .signature('(() => void)'),\n onPickerClose: PropTypes.func\n .description('function to react to the calendar context menu being closed')\n .defaultValue(() => {})\n .signature('(() => void)'),\n getIsDisabledDay: PropTypes.func\n .description('function used to mark day as \"disable\"')\n .defaultValue(() => false)\n .signature('(( day: string ) => boolean )'),\n getIsOutOfRangeDay: PropTypes.func\n .description('function used to mark day as \"out of range\"')\n .defaultValue(() => false)\n .signature('(( day: string ) => boolean )'),\n pickerFooterMsg: PropTypes.string.description(''),\n hasError: PropTypes.bool\n .description('boolean indicating wheter the selected range is to be marked as wrong')\n .defaultValue(false),\n isClearable: PropTypes.bool\n .description('boolean to optionally activate \"clearable\" icons in the inputs')\n .defaultValue(false),\n autoFocus: PropTypes.bool\n .description('boolean to auto-focus the \"from\" date month on render as per html auto-focus propriety')\n .defaultValue(false),\n emptyPickerStartingMonth: PropTypes.string.description(\n 'strictly formatted string representing the starting month to be displayed when calendar context menu is invoked without any selected dates',\n ),\n onCalendarOpenFocusedDay: PropTypes.string.description(\n 'strictly formatted string representing the day to be focused when calendar context menu is invoked without any selected dates',\n ),\n innerRef: PropTypes.oneOfType([PropTypes.func, PropTypes.object]).description(\n '\"from\" month input html node reference',\n ),\n lastElementRef: PropTypes.oneOfType([PropTypes.func, PropTypes.object]).description(\n 'ref for the last focusable element in the component based on its configuration, used for focus management in focus trap logic',\n ),\n tabIndex: PropTypes.string.description('tabIndex to be applied to the \"from\" month input'),\n readOnly: PropTypes.bool\n .description('
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADCvB,8BAKO;AAIP,uBAAyE;AAGzE,MAAM,OAAO,MAAY;AAAC;AAE1B,MAAM,qBAAqB,MAAe;AAiFnC,MAAM,eAA0D;AAAA,EACrE,MAAM;AAAA,EACN,UAAU;AAAA,EACV,kBAAkB;AAAA,EAClB,mBAAmB;AAAA,EACnB,iBAAiB;AAAA,EACjB,kBAAkB;AAAA,EAClB,iBAAiB;AAAA,EACjB,QAAQ;AAAA,EACR,gBAAgB;AAAA,EAChB,iBAAiB;AAAA,EACjB,eAAe;AAAA,EACf,gBAAgB;AAAA,EAChB,cAAc;AAAA,EACd,eAAe;AAAA,EACf,kBAAkB;AAAA,EAClB,oBAAoB;AAAA,EACpB,UAAU;AAAA,EACV,aAAa;AAAA,EACb,WAAW;AAAA,EACX,UAAU;AACZ;AAEO,MAAM,uCAA8F;AAAA,EACzG,OAAG,kDAAyB,kDAAiC,wCAAuB;AAAA,EACpF,GAAG;AAAA,EACH,GAAG;AAAA,EACH,MAAM,kCAAU,MAAM;AAAA,IACpB;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF,CAAC,EACE,YAAY,wCAAwC,EACpD,aAAa,iBAAiB;AAAA,EACjC,UAAU,kCAAU,OAAO,YAAY,oEAAoE,EACxG;AAAA,EACH,kBAAkB,kCAAU,KACzB,YAAY,2CAA2C,EACvD,UAAU,0FAA0F,EAAE;AAAA,EACzG,mBAAmB,kCAAU,KAC1B,YA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Aa,kCAAU,KACpB,YAAY,gEAAgE,EAC5E,aAAa,KAAK;AAAA,EACrB,WAAW,kCAAU,KAClB,YAAY,wFAAwF,EACpG,aAAa,KAAK;AAAA,EACrB,0BAA0B,kCAAU,OAAO;AAAA,IACzC;AAAA,EACF;AAAA,EACA,0BAA0B,kCAAU,OAAO;AAAA,IACzC;AAAA,EACF;AAAA,EACA,UAAU,kCAAU,UAAU,CAAC,kCAAU,MAAM,kCAAU,MAAM,CAAC,EAAE;AAAA,IAChE;AAAA,EACF;AAAA,EACA,gBAAgB,kCAAU,UAAU,CAAC,kCAAU,MAAM,kCAAU,MAAM,CAAC,EAAE;AAAA,IACtE;AAAA,EACF;AAAA,EACA,UAAU,kCAAU,OAAO,YAAY,kDAAkD;AAAA,EACzF,UAAU,kCAAU,KACjB,
|
|
4
|
+
"sourcesContent": ["/* eslint-disable max-lines */\nimport {\n PropTypes,\n globalAttributesPropTypes,\n xstyledPropTypes,\n getPropsPerSlotPropTypes,\n} from '@elliemae/ds-props-helpers';\nimport type { ValidationMap, GlobalAttributesT, DSPropTypesSchema, XstyledProps } from '@elliemae/ds-props-helpers';\nimport { type DSControlledDateTimePickerT } from '@elliemae/ds-form-date-time-picker';\nimport { type TypescriptHelpersT } from '@elliemae/ds-typescript-helpers';\nimport { DSControlledDateRangePickerName, DATE_RANGE_PICKER_SLOTS } from './constants/index.js';\n\n// eslint-disable-next-line @typescript-eslint/no-empty-function\nconst noop = (): void => {};\n\nconst defaultReturnFalse = (): boolean => false;\n\nexport declare namespace DSControlledDateRangePickerT {\n export interface RangePickerMetaInfoT extends DSControlledDateTimePickerT.InternalInputsChangeMetaInfo {\n rangeDateChangeType?: 'from' | 'to';\n automaticSwitchedDates?: boolean;\n isIncorrectOrder?: boolean;\n }\n\n export type RangeOnDateChange = (val: string, metaInfo: RangePickerMetaInfoT) => void;\n\n export type AppOnInputChange = DSControlledDateTimePickerT.AppOnInputChange;\n\n export type ControlledDateRangeType =\n 'full-date-range' | 'date-range-picker-controller-only' | 'date-range-picker' | 'date-range-inputs';\n\n export type SlotFunctionArguments = {\n dsControlleddaterangepickerRoot: () => object;\n };\n\n export interface RequiredProps {}\n\n export interface DefaultProps {\n type: ControlledDateRangeType;\n fromDate: string;\n onFromDateChange: RangeOnDateChange;\n onMonthFromChange: AppOnInputChange;\n onDayFromChange: AppOnInputChange;\n onYearFromChange: AppOnInputChange;\n hasError: boolean;\n pickerFooterMsg: string;\n\n toDate: string;\n onToDateChange: RangeOnDateChange;\n onMonthToChange: AppOnInputChange;\n onDayToChange: AppOnInputChange;\n onYearToChange: AppOnInputChange;\n\n onPickerOpen: TypescriptHelpersT.VoidGenericFunc;\n onPickerClose: TypescriptHelpersT.VoidGenericFunc;\n\n isClearable: boolean;\n getIsDisabledDay: (day: string) => boolean;\n getIsOutOfRangeDay: (day: string) => boolean;\n autoFocus: boolean;\n readOnly: boolean;\n }\n\n export interface OptionalProps extends TypescriptHelpersT.PropsForGlobalOnSlots<\n typeof DSControlledDateRangePickerName,\n typeof DATE_RANGE_PICKER_SLOTS\n > {\n emptyPickerStartingMonth?: string;\n onCalendarOpenFocusedDay?: string;\n innerRef?:\n | React.MutableRefObject<HTMLInputElement | HTMLButtonElement | null>\n | ((ref: HTMLInputElement | HTMLButtonElement | null) => void);\n lastElementRef?: React.MutableRefObject<HTMLElement | null>;\n tabIndex?: TypescriptHelpersT.WCAGTabIndex;\n applyAriaDisabled?: boolean;\n dateTimePickerFromProps?: Partial<DSControlledDateTimePickerT.Props>;\n dateTimePickerToProps?: Partial<DSControlledDateTimePickerT.Props>;\n }\n\n export interface Props\n extends\n Partial<DefaultProps>,\n Omit<GlobalAttributesT<HTMLDivElement>, keyof DefaultProps | keyof OptionalProps>,\n OptionalProps,\n XstyledProps,\n RequiredProps {}\n\n export interface InternalProps\n extends\n DefaultProps,\n Omit<GlobalAttributesT<HTMLDivElement>, keyof DefaultProps | keyof OptionalProps>,\n Omit<OptionalProps, `dsControlleddaterangepicker${Capitalize<string>}`>,\n XstyledProps,\n RequiredProps {}\n}\n\nexport const defaultProps: DSControlledDateRangePickerT.DefaultProps = {\n type: 'full-date-range',\n fromDate: '',\n onFromDateChange: noop,\n onMonthFromChange: noop,\n onDayFromChange: noop,\n onYearFromChange: noop,\n pickerFooterMsg: '',\n toDate: '',\n onToDateChange: noop,\n onMonthToChange: noop,\n onDayToChange: noop,\n onYearToChange: noop,\n onPickerOpen: noop,\n onPickerClose: noop,\n getIsDisabledDay: defaultReturnFalse,\n getIsOutOfRangeDay: defaultReturnFalse,\n hasError: false,\n isClearable: false,\n autoFocus: false,\n readOnly: false,\n};\n\nexport const DSControlledDateRangePickerPropTypes: DSPropTypesSchema<DSControlledDateRangePickerT.Props> = {\n ...getPropsPerSlotPropTypes(DSControlledDateRangePickerName, DATE_RANGE_PICKER_SLOTS),\n ...globalAttributesPropTypes,\n ...xstyledPropTypes,\n type: PropTypes.oneOf([\n 'full-date-range',\n 'date-range-picker-controller-only',\n 'date-range-picker',\n 'date-range-inputs',\n ])\n .description('Type of date range form control to use')\n .defaultValue('full-date-range'),\n fromDate: PropTypes.string.description(`strictly formatted string representing user's selected \"from\" date`)\n .isRequired,\n onFromDateChange: PropTypes.func\n .description('function to react to \"from\" date changing')\n .signature('(( newVal: string, e: React.SyntheticEvent, metaInfo: Record<string,unknown> ) => void )').isRequired,\n onMonthFromChange: PropTypes.func\n .description('function to react to \"from\" month changing')\n .defaultValue(() => {})\n .signature('(( newVal: string, e: React.SyntheticEvent, metaInfo: Record<string,unknown> ) => void )'),\n onDayFromChange: PropTypes.func\n .description('function to react to \"from\" day changing')\n .defaultValue(() => {})\n .signature('(( newVal: string, e: React.SyntheticEvent, metaInfo: Record<string,unknown> ) => void )'),\n onYearFromChange: PropTypes.func\n .description('function to react to \"from\" year changing')\n .defaultValue(() => {})\n .signature('(( newVal: string, e: React.SyntheticEvent, metaInfo: Record<string,unknown> ) => void )'),\n toDate: PropTypes.string.description(`strictly formatted string representing user's selected \"to\" date`).isRequired,\n onToDateChange: PropTypes.func\n .description('function to react to \"to\" date changing')\n .signature('(( newVal: string, e: React.SyntheticEvent, metaInfo: Record<string,unknown> ) => void )').isRequired,\n onMonthToChange: PropTypes.func\n .description('function to react to \"to\" month changing')\n .defaultValue(() => {})\n .signature('(( newVal: string, e: React.SyntheticEvent, metaInfo: Record<string,unknown> ) => void )'),\n onDayToChange: PropTypes.func\n .description('function to react to \"to\" day changing')\n .defaultValue(() => {})\n .signature('(( newVal: string, e: React.SyntheticEvent, metaInfo: Record<string,unknown> ) => void )'),\n onYearToChange: PropTypes.func\n .description('function to react to \"to\" year changing')\n .defaultValue(() => {})\n .signature('(( newVal: string, e: React.SyntheticEvent, metaInfo: Record<string,unknown> ) => void )'),\n onPickerOpen: PropTypes.func\n .description('function to react to the calendar context menu being opened')\n .defaultValue(() => {})\n .signature('(() => void)'),\n onPickerClose: PropTypes.func\n .description('function to react to the calendar context menu being closed')\n .defaultValue(() => {})\n .signature('(() => void)'),\n getIsDisabledDay: PropTypes.func\n .description('function used to mark day as \"disable\"')\n .defaultValue(() => false)\n .signature('(( day: string ) => boolean )'),\n getIsOutOfRangeDay: PropTypes.func\n .description('function used to mark day as \"out of range\"')\n .defaultValue(() => false)\n .signature('(( day: string ) => boolean )'),\n pickerFooterMsg: PropTypes.string.description(''),\n hasError: PropTypes.bool\n .description('boolean indicating wheter the selected range is to be marked as wrong')\n .defaultValue(false),\n isClearable: PropTypes.bool\n .description('boolean to optionally activate \"clearable\" icons in the inputs')\n .defaultValue(false),\n autoFocus: PropTypes.bool\n .description('boolean to auto-focus the \"from\" date month on render as per html auto-focus propriety')\n .defaultValue(false),\n emptyPickerStartingMonth: PropTypes.string.description(\n 'strictly formatted string representing the starting month to be displayed when calendar context menu is invoked without any selected dates',\n ),\n onCalendarOpenFocusedDay: PropTypes.string.description(\n 'strictly formatted string representing the day to be focused when calendar context menu is invoked without any selected dates',\n ),\n innerRef: PropTypes.oneOfType([PropTypes.func, PropTypes.object]).description(\n '\"from\" month input html node reference',\n ),\n lastElementRef: PropTypes.oneOfType([PropTypes.func, PropTypes.object]).description(\n 'ref for the last focusable element in the component based on its configuration, used for focus management in focus trap logic',\n ),\n tabIndex: PropTypes.string.description('tabIndex to be applied to the \"from\" month input'),\n readOnly: PropTypes.bool\n .description(\n 'Soft lock, same as applyAriaDisabled: aria-disabled=\"true\", CAN STILL RECEIVE FOCUS, WITHHOLDS THE CHANGE: the value does not change and onDateChange is not called. The picker still opens its calendar and time wheel to show the value (a view-only popup). Dimsum never writes aria-readonly.',\n )\n .defaultValue(false),\n applyAriaDisabled: PropTypes.bool.description(\n 'Whether to apply disabled styling and announce as disabled in SR. CAN STILL RECEIVE FOCUS. WITHHOLDS THE CHANGE: the value does not change and onDateChange is not called. The picker still opens its calendar and time wheel to show the value (a view-only popup).',\n ),\n dateTimePickerFromProps: PropTypes.object.description('props to pass to the \"from\" date picker'),\n dateTimePickerToProps: PropTypes.object.description('props to pass to the \"to\" date picker'),\n};\n\nexport const DSControlledDateRangePickerPropTypesWithSchema =\n DSControlledDateRangePickerPropTypes as unknown as ValidationMap<DSControlledDateRangePickerT.Props>;\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADCvB,8BAKO;AAIP,uBAAyE;AAGzE,MAAM,OAAO,MAAY;AAAC;AAE1B,MAAM,qBAAqB,MAAe;AAiFnC,MAAM,eAA0D;AAAA,EACrE,MAAM;AAAA,EACN,UAAU;AAAA,EACV,kBAAkB;AAAA,EAClB,mBAAmB;AAAA,EACnB,iBAAiB;AAAA,EACjB,kBAAkB;AAAA,EAClB,iBAAiB;AAAA,EACjB,QAAQ;AAAA,EACR,gBAAgB;AAAA,EAChB,iBAAiB;AAAA,EACjB,eAAe;AAAA,EACf,gBAAgB;AAAA,EAChB,cAAc;AAAA,EACd,eAAe;AAAA,EACf,kBAAkB;AAA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}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { isLocked, omitLockAttributes, omitLockedHandlers } from "@elliemae/ds-props-helpers";
|
|
3
4
|
import { styled, xStyledCommonProps } from "@elliemae/ds-system";
|
|
4
5
|
import { useContext } from "react";
|
|
5
6
|
import { ControlledDateRangePickerContext } from "../ControlledDateRangePickerCTX.js";
|
|
@@ -24,7 +25,7 @@ const StyledWrapper = styled("div", {
|
|
|
24
25
|
`;
|
|
25
26
|
const ControlledDateRangeContent = () => {
|
|
26
27
|
const {
|
|
27
|
-
props: { type },
|
|
28
|
+
props: { type, disabled, applyAriaDisabled, readOnly },
|
|
28
29
|
withIcon,
|
|
29
30
|
withInputs,
|
|
30
31
|
isControllerOnly,
|
|
@@ -33,13 +34,17 @@ const ControlledDateRangeContent = () => {
|
|
|
33
34
|
globalAttrs,
|
|
34
35
|
ownerPropsConfig
|
|
35
36
|
} = useContext(ControlledDateRangePickerContext);
|
|
37
|
+
const globalAttrsWithoutLock = omitLockedHandlers(
|
|
38
|
+
omitLockAttributes(globalAttrs),
|
|
39
|
+
isLocked({ disabled, applyAriaDisabled, readOnly })
|
|
40
|
+
);
|
|
36
41
|
return /* @__PURE__ */ jsxs(
|
|
37
42
|
StyledWrapper,
|
|
38
43
|
{
|
|
39
44
|
isControllerOnly,
|
|
40
45
|
isPickerOnly,
|
|
41
46
|
type,
|
|
42
|
-
...
|
|
47
|
+
...globalAttrsWithoutLock,
|
|
43
48
|
...xstyledAttrs,
|
|
44
49
|
...ownerPropsConfig,
|
|
45
50
|
children: [
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../src/parts/ControlledDateRangeContent.tsx"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import { styled, xStyledCommonProps } from '@elliemae/ds-system';\nimport { useContext } from 'react';\nimport { ControlledDateRangePickerContext } from '../ControlledDateRangePickerCTX.js';\nimport { DSControlledDateRangePickerName, DATE_RANGE_PICKER_SLOTS } from '../constants/index.js';\nimport type { DSControlledDateRangePickerT } from '../react-desc-prop-types.js';\nimport { gridMap } from '../utils/utils.js';\nimport { ControlledDateRangeCalendar } from './ControlledDateRangeCalendar.js';\nimport { ControlledDateRangeFromDate } from './ControlledDateRangeFromDate.js';\nimport { ControlledDateRangeToDate } from './ControlledDateRangeToDate.js';\n\ninterface StyledWrapperT {\n isControllerOnly: boolean;\n isPickerOnly: boolean;\n type: DSControlledDateRangePickerT.ControlledDateRangeType;\n}\n\nconst StyledWrapper = styled('div', {\n name: DSControlledDateRangePickerName,\n slot: DATE_RANGE_PICKER_SLOTS.CONTAINER,\n})<StyledWrapperT>`\n display: grid;\n grid-template-columns: ${({ type }) => gridMap[type]};\n grid-template-rows: auto;\n ${({ isControllerOnly, isPickerOnly }) => (isControllerOnly || isPickerOnly ? '' : 'gap: 0px 8px;')}\n grid-auto-flow: row;\n grid-template-areas: '. .';\n justify-content: center;\n align-items: center;\n ${xStyledCommonProps}\n`;\n\nexport const ControlledDateRangeContent = (): JSX.Element => {\n const {\n props: { type },\n withIcon,\n withInputs,\n isControllerOnly,\n isPickerOnly,\n xstyledAttrs,\n globalAttrs,\n ownerPropsConfig,\n } = useContext(ControlledDateRangePickerContext);\n\n return (\n <StyledWrapper\n isControllerOnly={isControllerOnly}\n isPickerOnly={isPickerOnly}\n type={type}\n {...
|
|
5
|
-
"mappings": "AAAA,YAAY,WAAW;
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import { isLocked, omitLockAttributes, omitLockedHandlers } from '@elliemae/ds-props-helpers';\nimport { styled, xStyledCommonProps } from '@elliemae/ds-system';\nimport { useContext } from 'react';\nimport { ControlledDateRangePickerContext } from '../ControlledDateRangePickerCTX.js';\nimport { DSControlledDateRangePickerName, DATE_RANGE_PICKER_SLOTS } from '../constants/index.js';\nimport type { DSControlledDateRangePickerT } from '../react-desc-prop-types.js';\nimport { gridMap } from '../utils/utils.js';\nimport { ControlledDateRangeCalendar } from './ControlledDateRangeCalendar.js';\nimport { ControlledDateRangeFromDate } from './ControlledDateRangeFromDate.js';\nimport { ControlledDateRangeToDate } from './ControlledDateRangeToDate.js';\n\ninterface StyledWrapperT {\n isControllerOnly: boolean;\n isPickerOnly: boolean;\n type: DSControlledDateRangePickerT.ControlledDateRangeType;\n}\n\nconst StyledWrapper = styled('div', {\n name: DSControlledDateRangePickerName,\n slot: DATE_RANGE_PICKER_SLOTS.CONTAINER,\n})<StyledWrapperT>`\n display: grid;\n grid-template-columns: ${({ type }) => gridMap[type]};\n grid-template-rows: auto;\n ${({ isControllerOnly, isPickerOnly }) => (isControllerOnly || isPickerOnly ? '' : 'gap: 0px 8px;')}\n grid-auto-flow: row;\n grid-template-areas: '. .';\n justify-content: center;\n align-items: center;\n ${xStyledCommonProps}\n`;\n\nexport const ControlledDateRangeContent = (): JSX.Element => {\n const {\n props: { type, disabled, applyAriaDisabled, readOnly },\n withIcon,\n withInputs,\n isControllerOnly,\n isPickerOnly,\n xstyledAttrs,\n globalAttrs,\n ownerPropsConfig,\n } = useContext(ControlledDateRangePickerContext);\n // disabled and readOnly are global attributes too: the root is a div, so they are not spread onto it\n // a locked range picker withholds the consumer's action handlers on its root too\n const globalAttrsWithoutLock = omitLockedHandlers(\n omitLockAttributes(globalAttrs),\n isLocked({ disabled, applyAriaDisabled, readOnly }),\n );\n\n return (\n <StyledWrapper\n isControllerOnly={isControllerOnly}\n isPickerOnly={isPickerOnly}\n type={type}\n {...globalAttrsWithoutLock}\n {...xstyledAttrs}\n {...ownerPropsConfig}\n >\n {withInputs ? (\n <>\n <ControlledDateRangeFromDate />\n <ControlledDateRangeToDate />\n </>\n ) : null}\n {withIcon || isControllerOnly ? <ControlledDateRangeCalendar /> : null}\n </StyledWrapper>\n );\n};\n"],
|
|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= () => {
|
|
|
39
39
|
autoFocus,
|
|
40
40
|
innerRef,
|
|
41
41
|
tabIndex,
|
|
42
|
-
disabled,
|
|
43
|
-
readOnly,
|
|
44
|
-
applyAriaDisabled,
|
|
45
42
|
...dateTimePickerFromProps,
|
|
43
|
+
disabled: Boolean(disabled || dateTimePickerFromProps?.disabled),
|
|
44
|
+
readOnly: Boolean(readOnly || dateTimePickerFromProps?.readOnly),
|
|
45
|
+
applyAriaDisabled: Boolean(applyAriaDisabled || dateTimePickerFromProps?.applyAriaDisabled),
|
|
46
46
|
type: CONTROLLED_DATE_TIME_PICKER_TYPES.DATE.INPUTS,
|
|
47
47
|
dsControlleddatetimepickerTimePickerMonthInput: { "aria-label": "Start date month" },
|
|
48
48
|
dsControlleddatetimepickerTimePickerDayInput: { "aria-label": "Start date day" },
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../src/parts/ControlledDateRangeFromDate.tsx"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React, { useContext } from 'react';\nimport { CONTROLLED_DATE_TIME_PICKER_TYPES, DSControlledDateTimePicker } from '@elliemae/ds-form-date-time-picker';\nimport { ControlledDateRangePickerContext } from '../ControlledDateRangePickerCTX.js';\n\nexport const ControlledDateRangeFromDate = (): JSX.Element => {\n const {\n props: {\n fromDate,\n onMonthFromChange,\n onDayFromChange,\n onYearFromChange,\n isClearable,\n getIsDisabledDay,\n getIsOutOfRangeDay,\n hasError,\n autoFocus,\n innerRef,\n tabIndex,\n disabled,\n readOnly,\n applyAriaDisabled,\n dateTimePickerFromProps,\n },\n rangePickerLogic: { handleFromDateChange },\n } = useContext(ControlledDateRangePickerContext);\n return (\n <DSControlledDateTimePicker\n date={fromDate}\n onDateChange={handleFromDateChange}\n onMonthChange={onMonthFromChange}\n onDayChange={onDayFromChange}\n onYearChange={onYearFromChange}\n isClearable={isClearable}\n getIsDisabledDay={getIsDisabledDay}\n getIsOutOfRangeDay={getIsOutOfRangeDay}\n hasError={hasError}\n autoFocus={autoFocus}\n innerRef={innerRef}\n tabIndex={tabIndex}\n disabled={disabled}\n readOnly={readOnly}\n applyAriaDisabled={applyAriaDisabled
|
|
5
|
-
"mappings": "AAAA,YAAY,WAAW;AC0BnB;AA1BJ,SAAgB,kBAAkB;AAClC,SAAS,mCAAmC,kCAAkC;AAC9E,SAAS,wCAAwC;AAE1C,MAAM,8BAA8B,MAAmB;AAC5D,QAAM;AAAA,IACJ,OAAO;AAAA,MACL;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,IACF;AAAA,IACA,kBAAkB,EAAE,qBAAqB;AAAA,EAC3C,IAAI,WAAW,gCAAgC;AAC/C,SACE;AAAA,IAAC;AAAA;AAAA,MACC,MAAM;AAAA,MACN,cAAc;AAAA,MACd,eAAe;AAAA,MACf,aAAa;AAAA,MACb,cAAc;AAAA,MACd;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React, { useContext } from 'react';\nimport { CONTROLLED_DATE_TIME_PICKER_TYPES, DSControlledDateTimePicker } from '@elliemae/ds-form-date-time-picker';\nimport { ControlledDateRangePickerContext } from '../ControlledDateRangePickerCTX.js';\n\nexport const ControlledDateRangeFromDate = (): JSX.Element => {\n const {\n props: {\n fromDate,\n onMonthFromChange,\n onDayFromChange,\n onYearFromChange,\n isClearable,\n getIsDisabledDay,\n getIsOutOfRangeDay,\n hasError,\n autoFocus,\n innerRef,\n tabIndex,\n disabled,\n readOnly,\n applyAriaDisabled,\n dateTimePickerFromProps,\n },\n rangePickerLogic: { handleFromDateChange },\n } = useContext(ControlledDateRangePickerContext);\n return (\n <DSControlledDateTimePicker\n date={fromDate}\n onDateChange={handleFromDateChange}\n onMonthChange={onMonthFromChange}\n onDayChange={onDayFromChange}\n onYearChange={onYearFromChange}\n isClearable={isClearable}\n getIsDisabledDay={getIsDisabledDay}\n getIsOutOfRangeDay={getIsOutOfRangeDay}\n hasError={hasError}\n autoFocus={autoFocus}\n innerRef={innerRef}\n tabIndex={tabIndex}\n {...dateTimePickerFromProps}\n // PUI-16695: the range lock wins over the per-picker spread, and a per-picker lock still applies\n disabled={Boolean(disabled || dateTimePickerFromProps?.disabled)}\n readOnly={Boolean(readOnly || dateTimePickerFromProps?.readOnly)}\n applyAriaDisabled={Boolean(applyAriaDisabled || dateTimePickerFromProps?.applyAriaDisabled)}\n type={CONTROLLED_DATE_TIME_PICKER_TYPES.DATE.INPUTS}\n // Name each spinbutton with the \"Start date\" context instead of wrapping the inputs in a\n // named role=\"group\". A nested named group collides with the DSFormLayoutBlockItem fieldset\n // legend that announces the feedback/validation message (PUI-17322 kept 1.3.1 via naming).\n dsControlleddatetimepickerTimePickerMonthInput={{ 'aria-label': 'Start date month' }}\n dsControlleddatetimepickerTimePickerDayInput={{ 'aria-label': 'Start date day' }}\n dsControlleddatetimepickerTimePickerYearInput={{ 'aria-label': 'Start date year' }}\n />\n );\n};\n"],
|
|
5
|
+
"mappings": "AAAA,YAAY,WAAW;AC0BnB;AA1BJ,SAAgB,kBAAkB;AAClC,SAAS,mCAAmC,kCAAkC;AAC9E,SAAS,wCAAwC;AAE1C,MAAM,8BAA8B,MAAmB;AAC5D,QAAM;AAAA,IACJ,OAAO;AAAA,MACL;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,IACF;AAAA,IACA,kBAAkB,EAAE,qBAAqB;AAAA,EAC3C,IAAI,WAAW,gCAAgC;AAC/C,SACE;AAAA,IAAC;AAAA;AAAA,MACC,MAAM;AAAA,MACN,cAAc;AAAA,MACd,eAAe;AAAA,MACf,aAAa;AAAA,MACb,cAAc;AAAA,MACd;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACC,GAAG;AAAA,MAEJ,UAAU,QAAQ,YAAY,yBAAyB,QAAQ;AAAA,MAC/D,UAAU,QAAQ,YAAY,yBAAyB,QAAQ;AAAA,MAC/D,mBAAmB,QAAQ,qBAAqB,yBAAyB,iBAAiB;AAAA,MAC1F,MAAM,kCAAkC,KAAK;AAAA,MAI7C,gDAAgD,EAAE,cAAc,mBAAmB;AAAA,MACnF,8CAA8C,EAAE,cAAc,iBAAiB;AAAA,MAC/E,+CAA+C,EAAE,cAAc,kBAAkB;AAAA;AAAA,EACnF;AAEJ;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -35,10 +35,10 @@ const ControlledDateRangeToDate = () => {
|
|
|
35
35
|
getIsOutOfRangeDay,
|
|
36
36
|
hasError,
|
|
37
37
|
tabIndex,
|
|
38
|
-
disabled,
|
|
39
|
-
readOnly,
|
|
40
|
-
applyAriaDisabled,
|
|
41
38
|
...dateTimePickerToProps,
|
|
39
|
+
disabled: Boolean(disabled || dateTimePickerToProps?.disabled),
|
|
40
|
+
readOnly: Boolean(readOnly || dateTimePickerToProps?.readOnly),
|
|
41
|
+
applyAriaDisabled: Boolean(applyAriaDisabled || dateTimePickerToProps?.applyAriaDisabled),
|
|
42
42
|
type: CONTROLLED_DATE_TIME_PICKER_TYPES.DATE.INPUTS,
|
|
43
43
|
dsControlleddatetimepickerTimePickerMonthInput: { "aria-label": "End date month" },
|
|
44
44
|
dsControlleddatetimepickerTimePickerDayInput: { "aria-label": "End date day" },
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../src/parts/ControlledDateRangeToDate.tsx"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React, { useContext } from 'react';\nimport { CONTROLLED_DATE_TIME_PICKER_TYPES, DSControlledDateTimePicker } from '@elliemae/ds-form-date-time-picker';\nimport { ControlledDateRangePickerContext } from '../ControlledDateRangePickerCTX.js';\n\nexport const ControlledDateRangeToDate = (): JSX.Element => {\n const {\n props: {\n toDate,\n onMonthToChange,\n onDayToChange,\n onYearToChange,\n isClearable,\n getIsDisabledDay,\n getIsOutOfRangeDay,\n hasError,\n tabIndex,\n disabled,\n readOnly,\n applyAriaDisabled,\n dateTimePickerToProps,\n },\n rangePickerLogic: { handleToDateChange },\n } = useContext(ControlledDateRangePickerContext);\n return (\n <DSControlledDateTimePicker\n date={toDate}\n onDateChange={handleToDateChange}\n onMonthChange={onMonthToChange}\n onDayChange={onDayToChange}\n onYearChange={onYearToChange}\n isClearable={isClearable}\n getIsDisabledDay={getIsDisabledDay}\n getIsOutOfRangeDay={getIsOutOfRangeDay}\n hasError={hasError}\n tabIndex={tabIndex}\n disabled={disabled}\n readOnly={readOnly}\n applyAriaDisabled={applyAriaDisabled
|
|
5
|
-
"mappings": "AAAA,YAAY,WAAW;ACwBnB;AAxBJ,SAAgB,kBAAkB;AAClC,SAAS,mCAAmC,kCAAkC;AAC9E,SAAS,wCAAwC;AAE1C,MAAM,4BAA4B,MAAmB;AAC1D,QAAM;AAAA,IACJ,OAAO;AAAA,MACL;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,IACF;AAAA,IACA,kBAAkB,EAAE,mBAAmB;AAAA,EACzC,IAAI,WAAW,gCAAgC;AAC/C,SACE;AAAA,IAAC;AAAA;AAAA,MACC,MAAM;AAAA,MACN,cAAc;AAAA,MACd,eAAe;AAAA,MACf,aAAa;AAAA,MACb,cAAc;AAAA,MACd;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React, { useContext } from 'react';\nimport { CONTROLLED_DATE_TIME_PICKER_TYPES, DSControlledDateTimePicker } from '@elliemae/ds-form-date-time-picker';\nimport { ControlledDateRangePickerContext } from '../ControlledDateRangePickerCTX.js';\n\nexport const ControlledDateRangeToDate = (): JSX.Element => {\n const {\n props: {\n toDate,\n onMonthToChange,\n onDayToChange,\n onYearToChange,\n isClearable,\n getIsDisabledDay,\n getIsOutOfRangeDay,\n hasError,\n tabIndex,\n disabled,\n readOnly,\n applyAriaDisabled,\n dateTimePickerToProps,\n },\n rangePickerLogic: { handleToDateChange },\n } = useContext(ControlledDateRangePickerContext);\n return (\n <DSControlledDateTimePicker\n date={toDate}\n onDateChange={handleToDateChange}\n onMonthChange={onMonthToChange}\n onDayChange={onDayToChange}\n onYearChange={onYearToChange}\n isClearable={isClearable}\n getIsDisabledDay={getIsDisabledDay}\n getIsOutOfRangeDay={getIsOutOfRangeDay}\n hasError={hasError}\n tabIndex={tabIndex}\n {...dateTimePickerToProps}\n // PUI-16695: the range lock wins over the per-picker spread, and a per-picker lock still applies\n disabled={Boolean(disabled || dateTimePickerToProps?.disabled)}\n readOnly={Boolean(readOnly || dateTimePickerToProps?.readOnly)}\n applyAriaDisabled={Boolean(applyAriaDisabled || dateTimePickerToProps?.applyAriaDisabled)}\n type={CONTROLLED_DATE_TIME_PICKER_TYPES.DATE.INPUTS}\n // Name each spinbutton with the \"End date\" context instead of wrapping the inputs in a\n // named role=\"group\". A nested named group collides with the DSFormLayoutBlockItem fieldset\n // legend that announces the feedback/validation message (PUI-17322 kept 1.3.1 via naming).\n dsControlleddatetimepickerTimePickerMonthInput={{ 'aria-label': 'End date month' }}\n dsControlleddatetimepickerTimePickerDayInput={{ 'aria-label': 'End date day' }}\n dsControlleddatetimepickerTimePickerYearInput={{ 'aria-label': 'End date year' }}\n />\n );\n};\n"],
|
|
5
|
+
"mappings": "AAAA,YAAY,WAAW;ACwBnB;AAxBJ,SAAgB,kBAAkB;AAClC,SAAS,mCAAmC,kCAAkC;AAC9E,SAAS,wCAAwC;AAE1C,MAAM,4BAA4B,MAAmB;AAC1D,QAAM;AAAA,IACJ,OAAO;AAAA,MACL;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,IACF;AAAA,IACA,kBAAkB,EAAE,mBAAmB;AAAA,EACzC,IAAI,WAAW,gCAAgC;AAC/C,SACE;AAAA,IAAC;AAAA;AAAA,MACC,MAAM;AAAA,MACN,cAAc;AAAA,MACd,eAAe;AAAA,MACf,aAAa;AAAA,MACb,cAAc;AAAA,MACd;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACC,GAAG;AAAA,MAEJ,UAAU,QAAQ,YAAY,uBAAuB,QAAQ;AAAA,MAC7D,UAAU,QAAQ,YAAY,uBAAuB,QAAQ;AAAA,MAC7D,mBAAmB,QAAQ,qBAAqB,uBAAuB,iBAAiB;AAAA,MACxF,MAAM,kCAAkC,KAAK;AAAA,MAI7C,gDAAgD,EAAE,cAAc,iBAAiB;AAAA,MACjF,8CAA8C,EAAE,cAAc,eAAe;AAAA,MAC7E,+CAA+C,EAAE,cAAc,gBAAgB;AAAA;AAAA,EACjF;AAEJ;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -80,9 +80,11 @@ const DSControlledDateRangePickerPropTypes = {
|
|
|
80
80
|
"ref for the last focusable element in the component based on its configuration, used for focus management in focus trap logic"
|
|
81
81
|
),
|
|
82
82
|
tabIndex: PropTypes.string.description('tabIndex to be applied to the "from" month input'),
|
|
83
|
-
readOnly: PropTypes.bool.description(
|
|
83
|
+
readOnly: PropTypes.bool.description(
|
|
84
|
+
'Soft lock, same as applyAriaDisabled: aria-disabled="true", CAN STILL RECEIVE FOCUS, WITHHOLDS THE CHANGE: the value does not change and onDateChange is not called. The picker still opens its calendar and time wheel to show the value (a view-only popup). Dimsum never writes aria-readonly.'
|
|
85
|
+
).defaultValue(false),
|
|
84
86
|
applyAriaDisabled: PropTypes.bool.description(
|
|
85
|
-
"Whether to apply disabled styling and announce as disabled in SR. CAN STILL RECEIVE FOCUS.
|
|
87
|
+
"Whether to apply disabled styling and announce as disabled in SR. CAN STILL RECEIVE FOCUS. WITHHOLDS THE CHANGE: the value does not change and onDateChange is not called. The picker still opens its calendar and time wheel to show the value (a view-only popup)."
|
|
86
88
|
),
|
|
87
89
|
dateTimePickerFromProps: PropTypes.object.description('props to pass to the "from" date picker'),
|
|
88
90
|
dateTimePickerToProps: PropTypes.object.description('props to pass to the "to" date picker')
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../src/react-desc-prop-types.tsx"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable max-lines */\nimport {\n PropTypes,\n globalAttributesPropTypes,\n xstyledPropTypes,\n getPropsPerSlotPropTypes,\n} from '@elliemae/ds-props-helpers';\nimport type { ValidationMap, GlobalAttributesT, DSPropTypesSchema, XstyledProps } from '@elliemae/ds-props-helpers';\nimport { type DSControlledDateTimePickerT } from '@elliemae/ds-form-date-time-picker';\nimport { type TypescriptHelpersT } from '@elliemae/ds-typescript-helpers';\nimport { DSControlledDateRangePickerName, DATE_RANGE_PICKER_SLOTS } from './constants/index.js';\n\n// eslint-disable-next-line @typescript-eslint/no-empty-function\nconst noop = (): void => {};\n\nconst defaultReturnFalse = (): boolean => false;\n\nexport declare namespace DSControlledDateRangePickerT {\n export interface RangePickerMetaInfoT extends DSControlledDateTimePickerT.InternalInputsChangeMetaInfo {\n rangeDateChangeType?: 'from' | 'to';\n automaticSwitchedDates?: boolean;\n isIncorrectOrder?: boolean;\n }\n\n export type RangeOnDateChange = (val: string, metaInfo: RangePickerMetaInfoT) => void;\n\n export type AppOnInputChange = DSControlledDateTimePickerT.AppOnInputChange;\n\n export type ControlledDateRangeType =\n 'full-date-range' | 'date-range-picker-controller-only' | 'date-range-picker' | 'date-range-inputs';\n\n export type SlotFunctionArguments = {\n dsControlleddaterangepickerRoot: () => object;\n };\n\n export interface RequiredProps {}\n\n export interface DefaultProps {\n type: ControlledDateRangeType;\n fromDate: string;\n onFromDateChange: RangeOnDateChange;\n onMonthFromChange: AppOnInputChange;\n onDayFromChange: AppOnInputChange;\n onYearFromChange: AppOnInputChange;\n hasError: boolean;\n pickerFooterMsg: string;\n\n toDate: string;\n onToDateChange: RangeOnDateChange;\n onMonthToChange: AppOnInputChange;\n onDayToChange: AppOnInputChange;\n onYearToChange: AppOnInputChange;\n\n onPickerOpen: TypescriptHelpersT.VoidGenericFunc;\n onPickerClose: TypescriptHelpersT.VoidGenericFunc;\n\n isClearable: boolean;\n getIsDisabledDay: (day: string) => boolean;\n getIsOutOfRangeDay: (day: string) => boolean;\n autoFocus: boolean;\n readOnly: boolean;\n }\n\n export interface OptionalProps extends TypescriptHelpersT.PropsForGlobalOnSlots<\n typeof DSControlledDateRangePickerName,\n typeof DATE_RANGE_PICKER_SLOTS\n > {\n emptyPickerStartingMonth?: string;\n onCalendarOpenFocusedDay?: string;\n innerRef?:\n | React.MutableRefObject<HTMLInputElement | HTMLButtonElement | null>\n | ((ref: HTMLInputElement | HTMLButtonElement | null) => void);\n lastElementRef?: React.MutableRefObject<HTMLElement | null>;\n tabIndex?: TypescriptHelpersT.WCAGTabIndex;\n applyAriaDisabled?: boolean;\n dateTimePickerFromProps?: Partial<DSControlledDateTimePickerT.Props>;\n dateTimePickerToProps?: Partial<DSControlledDateTimePickerT.Props>;\n }\n\n export interface Props\n extends\n Partial<DefaultProps>,\n Omit<GlobalAttributesT<HTMLDivElement>, keyof DefaultProps | keyof OptionalProps>,\n OptionalProps,\n XstyledProps,\n RequiredProps {}\n\n export interface InternalProps\n extends\n DefaultProps,\n Omit<GlobalAttributesT<HTMLDivElement>, keyof DefaultProps | keyof OptionalProps>,\n Omit<OptionalProps, `dsControlleddaterangepicker${Capitalize<string>}`>,\n XstyledProps,\n RequiredProps {}\n}\n\nexport const defaultProps: DSControlledDateRangePickerT.DefaultProps = {\n type: 'full-date-range',\n fromDate: '',\n onFromDateChange: noop,\n onMonthFromChange: noop,\n onDayFromChange: noop,\n onYearFromChange: noop,\n pickerFooterMsg: '',\n toDate: '',\n onToDateChange: noop,\n onMonthToChange: noop,\n onDayToChange: noop,\n onYearToChange: noop,\n onPickerOpen: noop,\n onPickerClose: noop,\n getIsDisabledDay: defaultReturnFalse,\n getIsOutOfRangeDay: defaultReturnFalse,\n hasError: false,\n isClearable: false,\n autoFocus: false,\n readOnly: false,\n};\n\nexport const DSControlledDateRangePickerPropTypes: DSPropTypesSchema<DSControlledDateRangePickerT.Props> = {\n ...getPropsPerSlotPropTypes(DSControlledDateRangePickerName, DATE_RANGE_PICKER_SLOTS),\n ...globalAttributesPropTypes,\n ...xstyledPropTypes,\n type: PropTypes.oneOf([\n 'full-date-range',\n 'date-range-picker-controller-only',\n 'date-range-picker',\n 'date-range-inputs',\n ])\n .description('Type of date range form control to use')\n .defaultValue('full-date-range'),\n fromDate: PropTypes.string.description(`strictly formatted string representing user's selected \"from\" date`)\n .isRequired,\n onFromDateChange: PropTypes.func\n .description('function to react to \"from\" date changing')\n .signature('(( newVal: string, e: React.SyntheticEvent, metaInfo: Record<string,unknown> ) => void )').isRequired,\n onMonthFromChange: PropTypes.func\n .description('function to react to \"from\" month changing')\n .defaultValue(() => {})\n .signature('(( newVal: string, e: React.SyntheticEvent, metaInfo: Record<string,unknown> ) => void )'),\n onDayFromChange: PropTypes.func\n .description('function to react to \"from\" day changing')\n .defaultValue(() => {})\n .signature('(( newVal: string, e: React.SyntheticEvent, metaInfo: Record<string,unknown> ) => void )'),\n onYearFromChange: PropTypes.func\n .description('function to react to \"from\" year changing')\n .defaultValue(() => {})\n .signature('(( newVal: string, e: React.SyntheticEvent, metaInfo: Record<string,unknown> ) => void )'),\n toDate: PropTypes.string.description(`strictly formatted string representing user's selected \"to\" date`).isRequired,\n onToDateChange: PropTypes.func\n .description('function to react to \"to\" date changing')\n .signature('(( newVal: string, e: React.SyntheticEvent, metaInfo: Record<string,unknown> ) => void )').isRequired,\n onMonthToChange: PropTypes.func\n .description('function to react to \"to\" month changing')\n .defaultValue(() => {})\n .signature('(( newVal: string, e: React.SyntheticEvent, metaInfo: Record<string,unknown> ) => void )'),\n onDayToChange: PropTypes.func\n .description('function to react to \"to\" day changing')\n .defaultValue(() => {})\n .signature('(( newVal: string, e: React.SyntheticEvent, metaInfo: Record<string,unknown> ) => void )'),\n onYearToChange: PropTypes.func\n .description('function to react to \"to\" year changing')\n .defaultValue(() => {})\n .signature('(( newVal: string, e: React.SyntheticEvent, metaInfo: Record<string,unknown> ) => void )'),\n onPickerOpen: PropTypes.func\n .description('function to react to the calendar context menu being opened')\n .defaultValue(() => {})\n .signature('(() => void)'),\n onPickerClose: PropTypes.func\n .description('function to react to the calendar context menu being closed')\n .defaultValue(() => {})\n .signature('(() => void)'),\n getIsDisabledDay: PropTypes.func\n .description('function used to mark day as \"disable\"')\n .defaultValue(() => false)\n .signature('(( day: string ) => boolean )'),\n getIsOutOfRangeDay: PropTypes.func\n .description('function used to mark day as \"out of range\"')\n .defaultValue(() => false)\n .signature('(( day: string ) => boolean )'),\n pickerFooterMsg: PropTypes.string.description(''),\n hasError: PropTypes.bool\n .description('boolean indicating wheter the selected range is to be marked as wrong')\n .defaultValue(false),\n isClearable: PropTypes.bool\n .description('boolean to optionally activate \"clearable\" icons in the inputs')\n .defaultValue(false),\n autoFocus: PropTypes.bool\n .description('boolean to auto-focus the \"from\" date month on render as per html auto-focus propriety')\n .defaultValue(false),\n emptyPickerStartingMonth: PropTypes.string.description(\n 'strictly formatted string representing the starting month to be displayed when calendar context menu is invoked without any selected dates',\n ),\n onCalendarOpenFocusedDay: PropTypes.string.description(\n 'strictly formatted string representing the day to be focused when calendar context menu is invoked without any selected dates',\n ),\n innerRef: PropTypes.oneOfType([PropTypes.func, PropTypes.object]).description(\n '\"from\" month input html node reference',\n ),\n lastElementRef: PropTypes.oneOfType([PropTypes.func, PropTypes.object]).description(\n 'ref for the last focusable element in the component based on its configuration, used for focus management in focus trap logic',\n ),\n tabIndex: PropTypes.string.description('tabIndex to be applied to the \"from\" month input'),\n readOnly: PropTypes.bool\n .description('
|
|
5
|
-
"mappings": "AAAA,YAAY,WAAW;ACCvB;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AAIP,SAAS,iCAAiC,+BAA+B;AAGzE,MAAM,OAAO,MAAY;AAAC;AAE1B,MAAM,qBAAqB,MAAe;AAiFnC,MAAM,eAA0D;AAAA,EACrE,MAAM;AAAA,EACN,UAAU;AAAA,EACV,kBAAkB;AAAA,EAClB,mBAAmB;AAAA,EACnB,iBAAiB;AAAA,EACjB,kBAAkB;AAAA,EAClB,iBAAiB;AAAA,EACjB,QAAQ;AAAA,EACR,gBAAgB;AAAA,EAChB,iBAAiB;AAAA,EACjB,eAAe;AAAA,EACf,gBAAgB;AAAA,EAChB,cAAc;AAAA,EACd,eAAe;AAAA,EACf,kBAAkB;AAAA,EAClB,oBAAoB;AAAA,EACpB,UAAU;AAAA,EACV,aAAa;AAAA,EACb,WAAW;AAAA,EACX,UAAU;AACZ;AAEO,MAAM,uCAA8F;AAAA,EACzG,GAAG,yBAAyB,iCAAiC,uBAAuB;AAAA,EACpF,GAAG;AAAA,EACH,GAAG;AAAA,EACH,MAAM,UAAU,MAAM;AAAA,IACpB;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF,CAAC,EACE,YAAY,wCAAwC,EACpD,aAAa,iBAAiB;AAAA,EACjC,UAAU,UAAU,OAAO,YAAY,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AAiB,UAAU,OAAO,YAAY,EAAE;AAAA,EAChD,UAAU,UAAU,KACjB,YAAY,uEAAuE,EACnF,aAAa,KAAK;AAAA,EACrB,aAAa,UAAU,KACpB,YAAY,gEAAgE,EAC5E,aAAa,KAAK;AAAA,EACrB,WAAW,UAAU,KAClB,YAAY,wFAAwF,EACpG,aAAa,KAAK;AAAA,EACrB,0BAA0B,UAAU,OAAO;AAAA,IACzC;AAAA,EACF;AAAA,EACA,0BAA0B,UAAU,OAAO;AAAA,IACzC;AAAA,EACF;AAAA,EACA,UAAU,UAAU,UAAU,CAAC,UAAU,MAAM,UAAU,MAAM,CAAC,EAAE;AAAA,IAChE;AAAA,EACF;AAAA,EACA,gBAAgB,UAAU,UAAU,CAAC,UAAU,MAAM,UAAU,MAAM,CAAC,EAAE;AAAA,IACtE;AAAA,EACF;AAAA,EACA,UAAU,UAAU,OAAO,YAAY,kDAAkD;AAAA,EACzF,UAAU,UAAU,KACjB,
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable max-lines */\nimport {\n PropTypes,\n globalAttributesPropTypes,\n xstyledPropTypes,\n getPropsPerSlotPropTypes,\n} from '@elliemae/ds-props-helpers';\nimport type { ValidationMap, GlobalAttributesT, DSPropTypesSchema, XstyledProps } from '@elliemae/ds-props-helpers';\nimport { type DSControlledDateTimePickerT } from '@elliemae/ds-form-date-time-picker';\nimport { type TypescriptHelpersT } from '@elliemae/ds-typescript-helpers';\nimport { DSControlledDateRangePickerName, DATE_RANGE_PICKER_SLOTS } from './constants/index.js';\n\n// eslint-disable-next-line @typescript-eslint/no-empty-function\nconst noop = (): void => {};\n\nconst defaultReturnFalse = (): boolean => false;\n\nexport declare namespace DSControlledDateRangePickerT {\n export interface RangePickerMetaInfoT extends DSControlledDateTimePickerT.InternalInputsChangeMetaInfo {\n rangeDateChangeType?: 'from' | 'to';\n automaticSwitchedDates?: boolean;\n isIncorrectOrder?: boolean;\n }\n\n export type RangeOnDateChange = (val: string, metaInfo: RangePickerMetaInfoT) => void;\n\n export type AppOnInputChange = DSControlledDateTimePickerT.AppOnInputChange;\n\n export type ControlledDateRangeType =\n 'full-date-range' | 'date-range-picker-controller-only' | 'date-range-picker' | 'date-range-inputs';\n\n export type SlotFunctionArguments = {\n dsControlleddaterangepickerRoot: () => object;\n };\n\n export interface RequiredProps {}\n\n export interface DefaultProps {\n type: ControlledDateRangeType;\n fromDate: string;\n onFromDateChange: RangeOnDateChange;\n onMonthFromChange: AppOnInputChange;\n onDayFromChange: AppOnInputChange;\n onYearFromChange: AppOnInputChange;\n hasError: boolean;\n pickerFooterMsg: string;\n\n toDate: string;\n onToDateChange: RangeOnDateChange;\n onMonthToChange: AppOnInputChange;\n onDayToChange: AppOnInputChange;\n onYearToChange: AppOnInputChange;\n\n onPickerOpen: TypescriptHelpersT.VoidGenericFunc;\n onPickerClose: TypescriptHelpersT.VoidGenericFunc;\n\n isClearable: boolean;\n getIsDisabledDay: (day: string) => boolean;\n getIsOutOfRangeDay: (day: string) => boolean;\n autoFocus: boolean;\n readOnly: boolean;\n }\n\n export interface OptionalProps extends TypescriptHelpersT.PropsForGlobalOnSlots<\n typeof DSControlledDateRangePickerName,\n typeof DATE_RANGE_PICKER_SLOTS\n > {\n emptyPickerStartingMonth?: string;\n onCalendarOpenFocusedDay?: string;\n innerRef?:\n | React.MutableRefObject<HTMLInputElement | HTMLButtonElement | null>\n | ((ref: HTMLInputElement | HTMLButtonElement | null) => void);\n lastElementRef?: React.MutableRefObject<HTMLElement | null>;\n tabIndex?: TypescriptHelpersT.WCAGTabIndex;\n applyAriaDisabled?: boolean;\n dateTimePickerFromProps?: Partial<DSControlledDateTimePickerT.Props>;\n dateTimePickerToProps?: Partial<DSControlledDateTimePickerT.Props>;\n }\n\n export interface Props\n extends\n Partial<DefaultProps>,\n Omit<GlobalAttributesT<HTMLDivElement>, keyof DefaultProps | keyof OptionalProps>,\n OptionalProps,\n XstyledProps,\n RequiredProps {}\n\n export interface InternalProps\n extends\n DefaultProps,\n Omit<GlobalAttributesT<HTMLDivElement>, keyof DefaultProps | keyof OptionalProps>,\n Omit<OptionalProps, `dsControlleddaterangepicker${Capitalize<string>}`>,\n XstyledProps,\n RequiredProps {}\n}\n\nexport const defaultProps: DSControlledDateRangePickerT.DefaultProps = {\n type: 'full-date-range',\n fromDate: '',\n onFromDateChange: noop,\n onMonthFromChange: noop,\n onDayFromChange: noop,\n onYearFromChange: noop,\n pickerFooterMsg: '',\n toDate: '',\n onToDateChange: noop,\n onMonthToChange: noop,\n onDayToChange: noop,\n onYearToChange: noop,\n onPickerOpen: noop,\n onPickerClose: noop,\n getIsDisabledDay: defaultReturnFalse,\n getIsOutOfRangeDay: defaultReturnFalse,\n hasError: false,\n isClearable: false,\n autoFocus: false,\n readOnly: false,\n};\n\nexport const DSControlledDateRangePickerPropTypes: DSPropTypesSchema<DSControlledDateRangePickerT.Props> = {\n ...getPropsPerSlotPropTypes(DSControlledDateRangePickerName, DATE_RANGE_PICKER_SLOTS),\n ...globalAttributesPropTypes,\n ...xstyledPropTypes,\n type: PropTypes.oneOf([\n 'full-date-range',\n 'date-range-picker-controller-only',\n 'date-range-picker',\n 'date-range-inputs',\n ])\n .description('Type of date range form control to use')\n .defaultValue('full-date-range'),\n fromDate: PropTypes.string.description(`strictly formatted string representing user's selected \"from\" date`)\n .isRequired,\n onFromDateChange: PropTypes.func\n .description('function to react to \"from\" date changing')\n .signature('(( newVal: string, e: React.SyntheticEvent, metaInfo: Record<string,unknown> ) => void )').isRequired,\n onMonthFromChange: PropTypes.func\n .description('function to react to \"from\" month changing')\n .defaultValue(() => {})\n .signature('(( newVal: string, e: React.SyntheticEvent, metaInfo: Record<string,unknown> ) => void )'),\n onDayFromChange: PropTypes.func\n .description('function to react to \"from\" day changing')\n .defaultValue(() => {})\n .signature('(( newVal: string, e: React.SyntheticEvent, metaInfo: Record<string,unknown> ) => void )'),\n onYearFromChange: PropTypes.func\n .description('function to react to \"from\" year changing')\n .defaultValue(() => {})\n .signature('(( newVal: string, e: React.SyntheticEvent, metaInfo: Record<string,unknown> ) => void )'),\n toDate: PropTypes.string.description(`strictly formatted string representing user's selected \"to\" date`).isRequired,\n onToDateChange: PropTypes.func\n .description('function to react to \"to\" date changing')\n .signature('(( newVal: string, e: React.SyntheticEvent, metaInfo: Record<string,unknown> ) => void )').isRequired,\n onMonthToChange: PropTypes.func\n .description('function to react to \"to\" month changing')\n .defaultValue(() => {})\n .signature('(( newVal: string, e: React.SyntheticEvent, metaInfo: Record<string,unknown> ) => void )'),\n onDayToChange: PropTypes.func\n .description('function to react to \"to\" day changing')\n .defaultValue(() => {})\n .signature('(( newVal: string, e: React.SyntheticEvent, metaInfo: Record<string,unknown> ) => void )'),\n onYearToChange: PropTypes.func\n .description('function to react to \"to\" year changing')\n .defaultValue(() => {})\n .signature('(( newVal: string, e: React.SyntheticEvent, metaInfo: Record<string,unknown> ) => void )'),\n onPickerOpen: PropTypes.func\n .description('function to react to the calendar context menu being opened')\n .defaultValue(() => {})\n .signature('(() => void)'),\n onPickerClose: PropTypes.func\n .description('function to react to the calendar context menu being closed')\n .defaultValue(() => {})\n .signature('(() => void)'),\n getIsDisabledDay: PropTypes.func\n .description('function used to mark day as \"disable\"')\n .defaultValue(() => false)\n .signature('(( day: string ) => boolean )'),\n getIsOutOfRangeDay: PropTypes.func\n .description('function used to mark day as \"out of range\"')\n .defaultValue(() => false)\n .signature('(( day: string ) => boolean )'),\n pickerFooterMsg: PropTypes.string.description(''),\n hasError: PropTypes.bool\n .description('boolean indicating wheter the selected range is to be marked as wrong')\n .defaultValue(false),\n isClearable: PropTypes.bool\n .description('boolean to optionally activate \"clearable\" icons in the inputs')\n .defaultValue(false),\n autoFocus: PropTypes.bool\n .description('boolean to auto-focus the \"from\" date month on render as per html auto-focus propriety')\n .defaultValue(false),\n emptyPickerStartingMonth: PropTypes.string.description(\n 'strictly formatted string representing the starting month to be displayed when calendar context menu is invoked without any selected dates',\n ),\n onCalendarOpenFocusedDay: PropTypes.string.description(\n 'strictly formatted string representing the day to be focused when calendar context menu is invoked without any selected dates',\n ),\n innerRef: PropTypes.oneOfType([PropTypes.func, PropTypes.object]).description(\n '\"from\" month input html node reference',\n ),\n lastElementRef: PropTypes.oneOfType([PropTypes.func, PropTypes.object]).description(\n 'ref for the last focusable element in the component based on its configuration, used for focus management in focus trap logic',\n ),\n tabIndex: PropTypes.string.description('tabIndex to be applied to the \"from\" month input'),\n readOnly: PropTypes.bool\n .description(\n 'Soft lock, same as applyAriaDisabled: aria-disabled=\"true\", CAN STILL RECEIVE FOCUS, WITHHOLDS THE CHANGE: the value does not change and onDateChange is not called. The picker still opens its calendar and time wheel to show the value (a view-only popup). Dimsum never writes aria-readonly.',\n )\n .defaultValue(false),\n applyAriaDisabled: PropTypes.bool.description(\n 'Whether to apply disabled styling and announce as disabled in SR. CAN STILL RECEIVE FOCUS. WITHHOLDS THE CHANGE: the value does not change and onDateChange is not called. The picker still opens its calendar and time wheel to show the value (a view-only popup).',\n ),\n dateTimePickerFromProps: PropTypes.object.description('props to pass to the \"from\" date picker'),\n dateTimePickerToProps: PropTypes.object.description('props to pass to the \"to\" date picker'),\n};\n\nexport const DSControlledDateRangePickerPropTypesWithSchema =\n DSControlledDateRangePickerPropTypes as unknown as ValidationMap<DSControlledDateRangePickerT.Props>;\n"],
|
|
5
|
+
"mappings": "AAAA,YAAY,WAAW;ACCvB;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AAIP,SAAS,iCAAiC,+BAA+B;AAGzE,MAAM,OAAO,MAAY;AAAC;AAE1B,MAAM,qBAAqB,MAAe;AAiFnC,MAAM,eAA0D;AAAA,EACrE,MAAM;AAAA,EACN,UAAU;AAAA,EACV,kBAAkB;AAAA,EAClB,mBAAmB;AAAA,EACnB,iBAAiB;AAAA,EACjB,kBAAkB;AAAA,EAClB,iBAAiB;AAAA,EACjB,QAAQ;AAAA,EACR,gBAAgB;AAAA,EAChB,iBAAiB;AAAA,EACjB,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MAAM,iDACX;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@elliemae/ds-form-date-range-picker",
|
|
3
|
-
"version": "3.80.0-next.
|
|
3
|
+
"version": "3.80.0-next.75",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"description": "ICE MT - Dimsum - Controlled Form Date Range Picker",
|
|
6
6
|
"files": [
|
|
@@ -36,15 +36,15 @@
|
|
|
36
36
|
"indent": 4
|
|
37
37
|
},
|
|
38
38
|
"dependencies": {
|
|
39
|
-
"@elliemae/ds-form-date-time-picker": "3.80.0-next.
|
|
40
|
-
"@elliemae/ds-props-helpers": "3.80.0-next.
|
|
41
|
-
"@elliemae/ds-system": "3.80.0-next.
|
|
42
|
-
"@elliemae/ds-typescript-helpers": "3.80.0-next.
|
|
39
|
+
"@elliemae/ds-form-date-time-picker": "3.80.0-next.75",
|
|
40
|
+
"@elliemae/ds-props-helpers": "3.80.0-next.75",
|
|
41
|
+
"@elliemae/ds-system": "3.80.0-next.75",
|
|
42
|
+
"@elliemae/ds-typescript-helpers": "3.80.0-next.75",
|
|
43
43
|
"uid": "^2.0.2"
|
|
44
44
|
},
|
|
45
45
|
"devDependencies": {
|
|
46
|
-
"@elliemae/ds-monorepo-devops": "3.80.0-next.
|
|
47
|
-
"@elliemae/ds-test-utils": "3.80.0-next.
|
|
46
|
+
"@elliemae/ds-monorepo-devops": "3.80.0-next.75",
|
|
47
|
+
"@elliemae/ds-test-utils": "3.80.0-next.75",
|
|
48
48
|
"@elliemae/pui-theme": "~2.13.0",
|
|
49
49
|
"jest": "^30.0.0",
|
|
50
50
|
"styled-components": "~5.3.11",
|