@elliemae/ds-form-date-range-picker 3.80.0-next.49 → 3.80.0-next.50
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/ControlledDateRangePicker.js +2 -2
- package/dist/cjs/ControlledDateRangePicker.js.map +2 -2
- package/dist/cjs/{exported-related/theming.js → constants/index.js} +13 -8
- package/dist/cjs/constants/index.js.map +7 -0
- package/dist/cjs/index.js +6 -4
- package/dist/cjs/index.js.map +2 -2
- package/dist/cjs/parts/ControlledDateRangeContent.js +3 -3
- package/dist/cjs/parts/ControlledDateRangeContent.js.map +2 -2
- package/dist/cjs/react-desc-prop-types.js +2 -2
- package/dist/cjs/react-desc-prop-types.js.map +2 -2
- package/dist/cjs/typescript-testing/slot-props.js +32 -0
- package/dist/cjs/typescript-testing/slot-props.js.map +7 -0
- package/dist/esm/ControlledDateRangePicker.js +1 -1
- package/dist/esm/ControlledDateRangePicker.js.map +1 -1
- package/dist/esm/constants/index.js +20 -0
- package/dist/esm/constants/index.js.map +7 -0
- package/dist/esm/index.js +5 -1
- package/dist/esm/index.js.map +2 -2
- package/dist/esm/parts/ControlledDateRangeContent.js +2 -2
- package/dist/esm/parts/ControlledDateRangeContent.js.map +2 -2
- package/dist/esm/react-desc-prop-types.js +2 -2
- package/dist/esm/react-desc-prop-types.js.map +2 -2
- package/dist/esm/typescript-testing/slot-props.js +9 -0
- package/dist/esm/typescript-testing/slot-props.js.map +7 -0
- package/dist/types/constants/index.d.ts +13 -0
- package/dist/types/index.d.ts +1 -1
- package/dist/types/react-desc-prop-types.d.ts +5 -2
- package/package.json +7 -7
- package/dist/cjs/exported-related/theming.js.map +0 -7
- package/dist/esm/exported-related/theming.js +0 -15
- package/dist/esm/exported-related/theming.js.map +0 -7
- package/dist/types/exported-related/theming.d.ts +0 -7
|
@@ -37,14 +37,14 @@ var import_jsx_runtime = require("react/jsx-runtime");
|
|
|
37
37
|
var import_ds_props_helpers = require("@elliemae/ds-props-helpers");
|
|
38
38
|
var import_useControlledDateRangePicker = require("./config/useControlledDateRangePicker.js");
|
|
39
39
|
var import_ControlledDateRangePickerCTX = require("./ControlledDateRangePickerCTX.js");
|
|
40
|
-
var
|
|
40
|
+
var import_constants = require("./constants/index.js");
|
|
41
41
|
var import_ControlledDateRangeContent = require("./parts/ControlledDateRangeContent.js");
|
|
42
42
|
var import_react_desc_prop_types = require("./react-desc-prop-types.js");
|
|
43
43
|
const DSControlledDateRangePicker = (props) => {
|
|
44
44
|
const ctx = (0, import_useControlledDateRangePicker.useControlledDateRangePicker)(props);
|
|
45
45
|
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ControlledDateRangePickerCTX.ControlledDateRangePickerContext.Provider, { value: ctx, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ControlledDateRangeContent.ControlledDateRangeContent, {}) });
|
|
46
46
|
};
|
|
47
|
-
DSControlledDateRangePicker.displayName =
|
|
47
|
+
DSControlledDateRangePicker.displayName = import_constants.DSControlledDateRangePickerName;
|
|
48
48
|
const DSControlledDateRangePickerWithSchema = (0, import_ds_props_helpers.describe)(DSControlledDateRangePicker);
|
|
49
49
|
DSControlledDateRangePickerWithSchema.propTypes = import_react_desc_prop_types.DSControlledDateRangePickerPropTypesWithSchema;
|
|
50
50
|
//# sourceMappingURL=ControlledDateRangePicker.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/ControlledDateRangePicker.tsx", "../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
-
"sourcesContent": ["/* eslint-disable max-lines */\nimport { describe } from '@elliemae/ds-props-helpers';\nimport { useControlledDateRangePicker } from './config/useControlledDateRangePicker.js';\nimport { ControlledDateRangePickerContext } from './ControlledDateRangePickerCTX.js';\nimport { DSControlledDateRangePickerName } from './
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADajB;AAZN,8BAAyB;AACzB,0CAA6C;AAC7C,0CAAiD;AACjD,
|
|
4
|
+
"sourcesContent": ["/* eslint-disable max-lines */\nimport { describe } from '@elliemae/ds-props-helpers';\nimport { useControlledDateRangePicker } from './config/useControlledDateRangePicker.js';\nimport { ControlledDateRangePickerContext } from './ControlledDateRangePickerCTX.js';\nimport { DSControlledDateRangePickerName } from './constants/index.js';\nimport { ControlledDateRangeContent } from './parts/ControlledDateRangeContent.js';\nimport type { DSControlledDateRangePickerT } from './react-desc-prop-types.js';\nimport { DSControlledDateRangePickerPropTypesWithSchema } from './react-desc-prop-types.js';\n\nconst DSControlledDateRangePicker = (props: DSControlledDateRangePickerT.Props): JSX.Element => {\n const ctx = useControlledDateRangePicker(props);\n return (\n <ControlledDateRangePickerContext.Provider value={ctx}>\n <ControlledDateRangeContent />\n </ControlledDateRangePickerContext.Provider>\n );\n};\n\nDSControlledDateRangePicker.displayName = DSControlledDateRangePickerName;\nconst DSControlledDateRangePickerWithSchema = describe(DSControlledDateRangePicker);\nDSControlledDateRangePickerWithSchema.propTypes = DSControlledDateRangePickerPropTypesWithSchema;\n\nexport { DSControlledDateRangePicker, DSControlledDateRangePickerWithSchema };\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADajB;AAZN,8BAAyB;AACzB,0CAA6C;AAC7C,0CAAiD;AACjD,uBAAgD;AAChD,wCAA2C;AAE3C,mCAA+D;AAE/D,MAAM,8BAA8B,CAAC,UAA2D;AAC9F,QAAM,UAAM,kEAA6B,KAAK;AAC9C,SACE,4CAAC,qEAAiC,UAAjC,EAA0C,OAAO,KAChD,sDAAC,gEAA2B,GAC9B;AAEJ;AAEA,4BAA4B,cAAc;AAC1C,MAAM,4CAAwC,kCAAS,2BAA2B;AAClF,sCAAsC,YAAY;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -26,20 +26,25 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
26
26
|
mod
|
|
27
27
|
));
|
|
28
28
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
|
-
var
|
|
30
|
-
__export(
|
|
29
|
+
var constants_exports = {};
|
|
30
|
+
__export(constants_exports, {
|
|
31
31
|
ControlledDateRangePickerDatatestid: () => ControlledDateRangePickerDatatestid,
|
|
32
|
+
DATE_RANGE_PICKER_DATA_TESTID: () => DATE_RANGE_PICKER_DATA_TESTID,
|
|
33
|
+
DATE_RANGE_PICKER_SLOTS: () => DATE_RANGE_PICKER_SLOTS,
|
|
32
34
|
DSControlledDateRangePickerName: () => DSControlledDateRangePickerName,
|
|
33
35
|
DSControlledDateRangePickerSlots: () => DSControlledDateRangePickerSlots
|
|
34
36
|
});
|
|
35
|
-
module.exports = __toCommonJS(
|
|
37
|
+
module.exports = __toCommonJS(constants_exports);
|
|
36
38
|
var React = __toESM(require("react"));
|
|
37
39
|
var import_ds_system = require("@elliemae/ds-system");
|
|
38
40
|
const DSControlledDateRangePickerName = "DSControlleddaterangepicker";
|
|
39
|
-
const
|
|
41
|
+
const DATE_RANGE_PICKER_SLOTS = {
|
|
40
42
|
CONTAINER: "root"
|
|
41
43
|
};
|
|
42
|
-
const
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
44
|
+
const DATE_RANGE_PICKER_DATA_TESTID = (0, import_ds_system.slotObjectToDataTestIds)(
|
|
45
|
+
DSControlledDateRangePickerName,
|
|
46
|
+
DATE_RANGE_PICKER_SLOTS
|
|
47
|
+
);
|
|
48
|
+
const DSControlledDateRangePickerSlots = DATE_RANGE_PICKER_SLOTS;
|
|
49
|
+
const ControlledDateRangePickerDatatestid = DATE_RANGE_PICKER_DATA_TESTID;
|
|
50
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/constants/index.ts", "../../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
+
"sourcesContent": ["import { slotObjectToDataTestIds } from '@elliemae/ds-system';\n\nexport const DSControlledDateRangePickerName = 'DSControlleddaterangepicker';\n\n// we are naming this with the ${component_name}_slots convention to namespace & avoid errors on duplicate exports variables in aggregators\nexport const DATE_RANGE_PICKER_SLOTS = {\n CONTAINER: 'root',\n} as const;\n\n// we are naming this with the ${component_name}_data_testid convention to namespace & avoid errors on duplicate exports variables in aggregators\nexport const DATE_RANGE_PICKER_DATA_TESTID = slotObjectToDataTestIds(\n DSControlledDateRangePickerName,\n DATE_RANGE_PICKER_SLOTS,\n);\n\n/* ******************************************************************************************\n START OF LEGACY CODE (kept to avoid breaking changes)\n****************************************************************************************** */\nexport const DSControlledDateRangePickerSlots = DATE_RANGE_PICKER_SLOTS;\nexport const ControlledDateRangePickerDatatestid = DATE_RANGE_PICKER_DATA_TESTID;\n/* ******************************************************************************************\n END OF LEGACY CODE (kept to avoid breaking changes)\n****************************************************************************************** */\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,uBAAwC;AAEjC,MAAM,kCAAkC;AAGxC,MAAM,0BAA0B;AAAA,EACrC,WAAW;AACb;AAGO,MAAM,oCAAgC;AAAA,EAC3C;AAAA,EACA;AACF;AAKO,MAAM,mCAAmC;AACzC,MAAM,sCAAsC;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
package/dist/cjs/index.js
CHANGED
|
@@ -29,10 +29,12 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
29
29
|
var index_exports = {};
|
|
30
30
|
__export(index_exports, {
|
|
31
31
|
CONTROLLED_DATE_RANGE_PICKER_TYPES: () => import_ControlledDateRangePickerTypes.CONTROLLED_DATE_RANGE_PICKER_TYPES,
|
|
32
|
-
ControlledDateRangePickerDatatestid: () =>
|
|
32
|
+
ControlledDateRangePickerDatatestid: () => import_constants.ControlledDateRangePickerDatatestid,
|
|
33
|
+
DATE_RANGE_PICKER_DATA_TESTID: () => import_constants.DATE_RANGE_PICKER_DATA_TESTID,
|
|
34
|
+
DATE_RANGE_PICKER_SLOTS: () => import_constants.DATE_RANGE_PICKER_SLOTS,
|
|
33
35
|
DSControlledDateRangePicker: () => import_ControlledDateRangePicker.DSControlledDateRangePicker,
|
|
34
|
-
DSControlledDateRangePickerName: () =>
|
|
35
|
-
DSControlledDateRangePickerSlots: () =>
|
|
36
|
+
DSControlledDateRangePickerName: () => import_constants.DSControlledDateRangePickerName,
|
|
37
|
+
DSControlledDateRangePickerSlots: () => import_constants.DSControlledDateRangePickerSlots,
|
|
36
38
|
DSControlledDateRangePickerWithSchema: () => import_ControlledDateRangePicker.DSControlledDateRangePickerWithSchema,
|
|
37
39
|
getDateStringFromDay: () => import_ds_form_date_time_picker.getDateStringFromDay,
|
|
38
40
|
getDateValuesFromDate: () => import_ds_form_date_time_picker.getDateValuesFromDate,
|
|
@@ -46,5 +48,5 @@ var React = __toESM(require("react"));
|
|
|
46
48
|
var import_ds_form_date_time_picker = require("@elliemae/ds-form-date-time-picker");
|
|
47
49
|
var import_ControlledDateRangePicker = require("./ControlledDateRangePicker.js");
|
|
48
50
|
var import_ControlledDateRangePickerTypes = require("./ControlledDateRangePickerTypes.js");
|
|
49
|
-
var
|
|
51
|
+
var import_constants = require("./constants/index.js");
|
|
50
52
|
//# sourceMappingURL=index.js.map
|
package/dist/cjs/index.js.map
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/index.ts", "../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
-
"sourcesContent": ["export {\n getDateStringFromDay,\n getDateValuesFromDate,\n getDayFromDateString,\n getValidationDateStringMetaInfo,\n getValidationDateTimeStringMetaInfo,\n getValidationTimeStringMetaInfo,\n} from '@elliemae/ds-form-date-time-picker';\n\nexport { DSControlledDateRangePicker, DSControlledDateRangePickerWithSchema } from './ControlledDateRangePicker.js';\nexport { CONTROLLED_DATE_RANGE_PICKER_TYPES } from './ControlledDateRangePickerTypes.js';\nexport {\n ControlledDateRangePickerDatatestid,\n DSControlledDateRangePickerName,\n DSControlledDateRangePickerSlots,\n} from './
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,sCAOO;AAEP,uCAAmF;AACnF,4CAAmD;AACnD,
|
|
4
|
+
"sourcesContent": ["export {\n getDateStringFromDay,\n getDateValuesFromDate,\n getDayFromDateString,\n getValidationDateStringMetaInfo,\n getValidationDateTimeStringMetaInfo,\n getValidationTimeStringMetaInfo,\n} from '@elliemae/ds-form-date-time-picker';\n\nexport { DSControlledDateRangePicker, DSControlledDateRangePickerWithSchema } from './ControlledDateRangePicker.js';\nexport { CONTROLLED_DATE_RANGE_PICKER_TYPES } from './ControlledDateRangePickerTypes.js';\nexport {\n ControlledDateRangePickerDatatestid,\n DATE_RANGE_PICKER_DATA_TESTID,\n DATE_RANGE_PICKER_SLOTS,\n DSControlledDateRangePickerName,\n DSControlledDateRangePickerSlots,\n} from './constants/index.js';\nexport { type DSControlledDateRangePickerT } from './react-desc-prop-types.js';\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,sCAOO;AAEP,uCAAmF;AACnF,4CAAmD;AACnD,uBAMO;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -36,14 +36,14 @@ var import_jsx_runtime = require("react/jsx-runtime");
|
|
|
36
36
|
var import_ds_system = require("@elliemae/ds-system");
|
|
37
37
|
var import_react = require("react");
|
|
38
38
|
var import_ControlledDateRangePickerCTX = require("../ControlledDateRangePickerCTX.js");
|
|
39
|
-
var
|
|
39
|
+
var import_constants = require("../constants/index.js");
|
|
40
40
|
var import_utils = require("../utils/utils.js");
|
|
41
41
|
var import_ControlledDateRangeCalendar = require("./ControlledDateRangeCalendar.js");
|
|
42
42
|
var import_ControlledDateRangeFromDate = require("./ControlledDateRangeFromDate.js");
|
|
43
43
|
var import_ControlledDateRangeToDate = require("./ControlledDateRangeToDate.js");
|
|
44
44
|
const StyledWrapper = (0, import_ds_system.styled)("div", {
|
|
45
|
-
name:
|
|
46
|
-
slot:
|
|
45
|
+
name: import_constants.DSControlledDateRangePickerName,
|
|
46
|
+
slot: import_constants.DATE_RANGE_PICKER_SLOTS.CONTAINER
|
|
47
47
|
})`
|
|
48
48
|
display: grid;
|
|
49
49
|
grid-template-columns: ${({ type }) => import_utils.gridMap[type]};
|
|
@@ -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,
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADqDf;AArDR,uBAA2C;AAC3C,mBAA2B;AAC3B,0CAAiD;AACjD,
|
|
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 {...globalAttrs}\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;ADqDf;AArDR,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,KAAK;AAAA,IACd;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF,QAAI,yBAAW,oEAAgC;AAE/C,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
|
}
|
|
@@ -35,7 +35,7 @@ __export(react_desc_prop_types_exports, {
|
|
|
35
35
|
module.exports = __toCommonJS(react_desc_prop_types_exports);
|
|
36
36
|
var React = __toESM(require("react"));
|
|
37
37
|
var import_ds_props_helpers = require("@elliemae/ds-props-helpers");
|
|
38
|
-
var
|
|
38
|
+
var import_constants = require("./constants/index.js");
|
|
39
39
|
const noop = () => {
|
|
40
40
|
};
|
|
41
41
|
const defaultReturnFalse = () => false;
|
|
@@ -62,7 +62,7 @@ const defaultProps = {
|
|
|
62
62
|
readOnly: false
|
|
63
63
|
};
|
|
64
64
|
const DSControlledDateRangePickerPropTypes = {
|
|
65
|
-
...(0, import_ds_props_helpers.getPropsPerSlotPropTypes)(
|
|
65
|
+
...(0, import_ds_props_helpers.getPropsPerSlotPropTypes)(import_constants.DSControlledDateRangePickerName, import_constants.DATE_RANGE_PICKER_SLOTS),
|
|
66
66
|
...import_ds_props_helpers.globalAttributesPropTypes,
|
|
67
67
|
...import_ds_props_helpers.xstyledPropTypes,
|
|
68
68
|
type: import_ds_props_helpers.PropTypes.oneOf([
|
|
@@ -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,
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADCvB,8BAKO;AAIP,
|
|
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('Makes the component non-editable while remaining accessible')\n .defaultValue(false),\n applyAriaDisabled: PropTypes.bool.description(\n 'Whether to apply disabled styling and announce as disabled in SR. CAN STILL RECEIVE FOCUS. PREVENTS ONLY MAIN ACTION.',\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;A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U,kCAAU,OAAO,YAAY,kDAAkD;AAAA,EACzF,UAAU,kCAAU,KACjB,YAAY,6DAA6D,EACzE,aAAa,KAAK;AAAA,EACrB,mBAAmB,kCAAU,KAAK;AAAA,IAChC;AAAA,EACF;AAAA,EACA,yBAAyB,kCAAU,OAAO,YAAY,yCAAyC;AAAA,EAC/F,uBAAuB,kCAAU,OAAO,YAAY,uCAAuC;AAC7F;AAEO,MAAM,iDACX;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __create = Object.create;
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
+
var __copyProps = (to, from, except, desc) => {
|
|
9
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
10
|
+
for (let key of __getOwnPropNames(from))
|
|
11
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
12
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
13
|
+
}
|
|
14
|
+
return to;
|
|
15
|
+
};
|
|
16
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
17
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
18
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
19
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
20
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
21
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
22
|
+
mod
|
|
23
|
+
));
|
|
24
|
+
var React = __toESM(require("react"));
|
|
25
|
+
const SlotPropsAsObject = {
|
|
26
|
+
dsControlleddaterangepickerRoot: { "aria-label": "just a typescript test" }
|
|
27
|
+
};
|
|
28
|
+
const SlotPropsAsFunctions = {
|
|
29
|
+
dsControlleddaterangepickerRoot: () => ({ "aria-label": "just a typescript test" })
|
|
30
|
+
};
|
|
31
|
+
const EnsureAllSlotsExistInSlotFunctionArguments = SlotPropsAsFunctions;
|
|
32
|
+
//# sourceMappingURL=slot-props.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../src/typescript-testing/slot-props.ts"],
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable @typescript-eslint/no-unused-vars, no-unused-vars */\nimport { type TypescriptHelpersT } from '@elliemae/ds-typescript-helpers';\nimport type { DSControlledDateRangePickerT } from '../index.js';\nimport type { DSControlledDateRangePickerName, DATE_RANGE_PICKER_SLOTS } from '../constants/index.js';\n\n// Slot props can be passed in two forms \u2014 object (static) and function (dynamic).\nconst SlotPropsAsObject: Partial<DSControlledDateRangePickerT.Props> = {\n dsControlleddaterangepickerRoot: { 'aria-label': 'just a typescript test' },\n};\n\nconst SlotPropsAsFunctions: DSControlledDateRangePickerT.SlotFunctionArguments = {\n dsControlleddaterangepickerRoot: () => ({ 'aria-label': 'just a typescript test' }),\n};\n\n// Exhaustiveness check \u2014 fails compilation if a slot is missing from SlotFunctionArguments.\nconst EnsureAllSlotsExistInSlotFunctionArguments: Required<\n TypescriptHelpersT.PropsForSlots<typeof DSControlledDateRangePickerName, typeof DATE_RANGE_PICKER_SLOTS>\n> = SlotPropsAsFunctions;\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;AAAA,YAAuB;ACMvB,MAAM,oBAAiE;AAAA,EACrE,iCAAiC,EAAE,cAAc,yBAAyB;AAC5E;AAEA,MAAM,uBAA2E;AAAA,EAC/E,iCAAiC,OAAO,EAAE,cAAc,yBAAyB;AACnF;AAGA,MAAM,6CAEF;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -3,7 +3,7 @@ import { jsx } from "react/jsx-runtime";
|
|
|
3
3
|
import { describe } from "@elliemae/ds-props-helpers";
|
|
4
4
|
import { useControlledDateRangePicker } from "./config/useControlledDateRangePicker.js";
|
|
5
5
|
import { ControlledDateRangePickerContext } from "./ControlledDateRangePickerCTX.js";
|
|
6
|
-
import { DSControlledDateRangePickerName } from "./
|
|
6
|
+
import { DSControlledDateRangePickerName } from "./constants/index.js";
|
|
7
7
|
import { ControlledDateRangeContent } from "./parts/ControlledDateRangeContent.js";
|
|
8
8
|
import { DSControlledDateRangePickerPropTypesWithSchema } from "./react-desc-prop-types.js";
|
|
9
9
|
const DSControlledDateRangePicker = (props) => {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../src/ControlledDateRangePicker.tsx"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable max-lines */\nimport { describe } from '@elliemae/ds-props-helpers';\nimport { useControlledDateRangePicker } from './config/useControlledDateRangePicker.js';\nimport { ControlledDateRangePickerContext } from './ControlledDateRangePickerCTX.js';\nimport { DSControlledDateRangePickerName } from './
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable max-lines */\nimport { describe } from '@elliemae/ds-props-helpers';\nimport { useControlledDateRangePicker } from './config/useControlledDateRangePicker.js';\nimport { ControlledDateRangePickerContext } from './ControlledDateRangePickerCTX.js';\nimport { DSControlledDateRangePickerName } from './constants/index.js';\nimport { ControlledDateRangeContent } from './parts/ControlledDateRangeContent.js';\nimport type { DSControlledDateRangePickerT } from './react-desc-prop-types.js';\nimport { DSControlledDateRangePickerPropTypesWithSchema } from './react-desc-prop-types.js';\n\nconst DSControlledDateRangePicker = (props: DSControlledDateRangePickerT.Props): JSX.Element => {\n const ctx = useControlledDateRangePicker(props);\n return (\n <ControlledDateRangePickerContext.Provider value={ctx}>\n <ControlledDateRangeContent />\n </ControlledDateRangePickerContext.Provider>\n );\n};\n\nDSControlledDateRangePicker.displayName = DSControlledDateRangePickerName;\nconst DSControlledDateRangePickerWithSchema = describe(DSControlledDateRangePicker);\nDSControlledDateRangePickerWithSchema.propTypes = DSControlledDateRangePickerPropTypesWithSchema;\n\nexport { DSControlledDateRangePicker, DSControlledDateRangePickerWithSchema };\n"],
|
|
5
5
|
"mappings": "AAAA,YAAY,WAAW;ACajB;AAZN,SAAS,gBAAgB;AACzB,SAAS,oCAAoC;AAC7C,SAAS,wCAAwC;AACjD,SAAS,uCAAuC;AAChD,SAAS,kCAAkC;AAE3C,SAAS,sDAAsD;AAE/D,MAAM,8BAA8B,CAAC,UAA2D;AAC9F,QAAM,MAAM,6BAA6B,KAAK;AAC9C,SACE,oBAAC,iCAAiC,UAAjC,EAA0C,OAAO,KAChD,8BAAC,8BAA2B,GAC9B;AAEJ;AAEA,4BAA4B,cAAc;AAC1C,MAAM,wCAAwC,SAAS,2BAA2B;AAClF,sCAAsC,YAAY;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { slotObjectToDataTestIds } from "@elliemae/ds-system";
|
|
3
|
+
const DSControlledDateRangePickerName = "DSControlleddaterangepicker";
|
|
4
|
+
const DATE_RANGE_PICKER_SLOTS = {
|
|
5
|
+
CONTAINER: "root"
|
|
6
|
+
};
|
|
7
|
+
const DATE_RANGE_PICKER_DATA_TESTID = slotObjectToDataTestIds(
|
|
8
|
+
DSControlledDateRangePickerName,
|
|
9
|
+
DATE_RANGE_PICKER_SLOTS
|
|
10
|
+
);
|
|
11
|
+
const DSControlledDateRangePickerSlots = DATE_RANGE_PICKER_SLOTS;
|
|
12
|
+
const ControlledDateRangePickerDatatestid = DATE_RANGE_PICKER_DATA_TESTID;
|
|
13
|
+
export {
|
|
14
|
+
ControlledDateRangePickerDatatestid,
|
|
15
|
+
DATE_RANGE_PICKER_DATA_TESTID,
|
|
16
|
+
DATE_RANGE_PICKER_SLOTS,
|
|
17
|
+
DSControlledDateRangePickerName,
|
|
18
|
+
DSControlledDateRangePickerSlots
|
|
19
|
+
};
|
|
20
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../src/constants/index.ts"],
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import { slotObjectToDataTestIds } from '@elliemae/ds-system';\n\nexport const DSControlledDateRangePickerName = 'DSControlleddaterangepicker';\n\n// we are naming this with the ${component_name}_slots convention to namespace & avoid errors on duplicate exports variables in aggregators\nexport const DATE_RANGE_PICKER_SLOTS = {\n CONTAINER: 'root',\n} as const;\n\n// we are naming this with the ${component_name}_data_testid convention to namespace & avoid errors on duplicate exports variables in aggregators\nexport const DATE_RANGE_PICKER_DATA_TESTID = slotObjectToDataTestIds(\n DSControlledDateRangePickerName,\n DATE_RANGE_PICKER_SLOTS,\n);\n\n/* ******************************************************************************************\n START OF LEGACY CODE (kept to avoid breaking changes)\n****************************************************************************************** */\nexport const DSControlledDateRangePickerSlots = DATE_RANGE_PICKER_SLOTS;\nexport const ControlledDateRangePickerDatatestid = DATE_RANGE_PICKER_DATA_TESTID;\n/* ******************************************************************************************\n END OF LEGACY CODE (kept to avoid breaking changes)\n****************************************************************************************** */\n"],
|
|
5
|
+
"mappings": "AAAA,YAAY,WAAW;ACAvB,SAAS,+BAA+B;AAEjC,MAAM,kCAAkC;AAGxC,MAAM,0BAA0B;AAAA,EACrC,WAAW;AACb;AAGO,MAAM,gCAAgC;AAAA,EAC3C;AAAA,EACA;AACF;AAKO,MAAM,mCAAmC;AACzC,MAAM,sCAAsC;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
package/dist/esm/index.js
CHANGED
|
@@ -11,12 +11,16 @@ import { DSControlledDateRangePicker, DSControlledDateRangePickerWithSchema } fr
|
|
|
11
11
|
import { CONTROLLED_DATE_RANGE_PICKER_TYPES } from "./ControlledDateRangePickerTypes.js";
|
|
12
12
|
import {
|
|
13
13
|
ControlledDateRangePickerDatatestid,
|
|
14
|
+
DATE_RANGE_PICKER_DATA_TESTID,
|
|
15
|
+
DATE_RANGE_PICKER_SLOTS,
|
|
14
16
|
DSControlledDateRangePickerName,
|
|
15
17
|
DSControlledDateRangePickerSlots
|
|
16
|
-
} from "./
|
|
18
|
+
} from "./constants/index.js";
|
|
17
19
|
export {
|
|
18
20
|
CONTROLLED_DATE_RANGE_PICKER_TYPES,
|
|
19
21
|
ControlledDateRangePickerDatatestid,
|
|
22
|
+
DATE_RANGE_PICKER_DATA_TESTID,
|
|
23
|
+
DATE_RANGE_PICKER_SLOTS,
|
|
20
24
|
DSControlledDateRangePicker,
|
|
21
25
|
DSControlledDateRangePickerName,
|
|
22
26
|
DSControlledDateRangePickerSlots,
|
package/dist/esm/index.js.map
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../src/index.ts"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "export {\n getDateStringFromDay,\n getDateValuesFromDate,\n getDayFromDateString,\n getValidationDateStringMetaInfo,\n getValidationDateTimeStringMetaInfo,\n getValidationTimeStringMetaInfo,\n} from '@elliemae/ds-form-date-time-picker';\n\nexport { DSControlledDateRangePicker, DSControlledDateRangePickerWithSchema } from './ControlledDateRangePicker.js';\nexport { CONTROLLED_DATE_RANGE_PICKER_TYPES } from './ControlledDateRangePickerTypes.js';\nexport {\n ControlledDateRangePickerDatatestid,\n DSControlledDateRangePickerName,\n DSControlledDateRangePickerSlots,\n} from './
|
|
5
|
-
"mappings": "AAAA,YAAY,WAAW;ACAvB;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AAEP,SAAS,6BAA6B,6CAA6C;AACnF,SAAS,0CAA0C;AACnD;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,OACK;",
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "export {\n getDateStringFromDay,\n getDateValuesFromDate,\n getDayFromDateString,\n getValidationDateStringMetaInfo,\n getValidationDateTimeStringMetaInfo,\n getValidationTimeStringMetaInfo,\n} from '@elliemae/ds-form-date-time-picker';\n\nexport { DSControlledDateRangePicker, DSControlledDateRangePickerWithSchema } from './ControlledDateRangePicker.js';\nexport { CONTROLLED_DATE_RANGE_PICKER_TYPES } from './ControlledDateRangePickerTypes.js';\nexport {\n ControlledDateRangePickerDatatestid,\n DATE_RANGE_PICKER_DATA_TESTID,\n DATE_RANGE_PICKER_SLOTS,\n DSControlledDateRangePickerName,\n DSControlledDateRangePickerSlots,\n} from './constants/index.js';\nexport { type DSControlledDateRangePickerT } from './react-desc-prop-types.js';\n"],
|
|
5
|
+
"mappings": "AAAA,YAAY,WAAW;ACAvB;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AAEP,SAAS,6BAA6B,6CAA6C;AACnF,SAAS,0CAA0C;AACnD;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -3,14 +3,14 @@ import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
|
3
3
|
import { styled, xStyledCommonProps } from "@elliemae/ds-system";
|
|
4
4
|
import { useContext } from "react";
|
|
5
5
|
import { ControlledDateRangePickerContext } from "../ControlledDateRangePickerCTX.js";
|
|
6
|
-
import { DSControlledDateRangePickerName,
|
|
6
|
+
import { DSControlledDateRangePickerName, DATE_RANGE_PICKER_SLOTS } from "../constants/index.js";
|
|
7
7
|
import { gridMap } from "../utils/utils.js";
|
|
8
8
|
import { ControlledDateRangeCalendar } from "./ControlledDateRangeCalendar.js";
|
|
9
9
|
import { ControlledDateRangeFromDate } from "./ControlledDateRangeFromDate.js";
|
|
10
10
|
import { ControlledDateRangeToDate } from "./ControlledDateRangeToDate.js";
|
|
11
11
|
const StyledWrapper = styled("div", {
|
|
12
12
|
name: DSControlledDateRangePickerName,
|
|
13
|
-
slot:
|
|
13
|
+
slot: DATE_RANGE_PICKER_SLOTS.CONTAINER
|
|
14
14
|
})`
|
|
15
15
|
display: grid;
|
|
16
16
|
grid-template-columns: ${({ type }) => gridMap[type]};
|
|
@@ -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,
|
|
5
|
-
"mappings": "AAAA,YAAY,WAAW;ACqDf,mBACE,KADF;AArDR,SAAS,QAAQ,0BAA0B;AAC3C,SAAS,kBAAkB;AAC3B,SAAS,wCAAwC;AACjD,SAAS,iCAAiC
|
|
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 {...globalAttrs}\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"],
|
|
5
|
+
"mappings": "AAAA,YAAY,WAAW;ACqDf,mBACE,KADF;AArDR,SAAS,QAAQ,0BAA0B;AAC3C,SAAS,kBAAkB;AAC3B,SAAS,wCAAwC;AACjD,SAAS,iCAAiC,+BAA+B;AAEzE,SAAS,eAAe;AACxB,SAAS,mCAAmC;AAC5C,SAAS,mCAAmC;AAC5C,SAAS,iCAAiC;AAQ1C,MAAM,gBAAgB,OAAO,OAAO;AAAA,EAClC,MAAM;AAAA,EACN,MAAM,wBAAwB;AAChC,CAAC;AAAA;AAAA,2BAE0B,CAAC,EAAE,KAAK,MAAM,QAAQ,IAAI,CAAC;AAAA;AAAA,IAElD,CAAC,EAAE,kBAAkB,aAAa,MAAO,oBAAoB,eAAe,KAAK,eAAgB;AAAA;AAAA;AAAA;AAAA;AAAA,IAKjG,kBAAkB;AAAA;AAGf,MAAM,6BAA6B,MAAmB;AAC3D,QAAM;AAAA,IACJ,OAAO,EAAE,KAAK;AAAA,IACd;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF,IAAI,WAAW,gCAAgC;AAE/C,SACE;AAAA,IAAC;AAAA;AAAA,MACC;AAAA,MACA;AAAA,MACA;AAAA,MACC,GAAG;AAAA,MACH,GAAG;AAAA,MACH,GAAG;AAAA,MAEH;AAAA,qBACC,iCACE;AAAA,8BAAC,+BAA4B;AAAA,UAC7B,oBAAC,6BAA0B;AAAA,WAC7B,IACE;AAAA,QACH,YAAY,mBAAmB,oBAAC,+BAA4B,IAAK;AAAA;AAAA;AAAA,EACpE;AAEJ;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -5,7 +5,7 @@ import {
|
|
|
5
5
|
xstyledPropTypes,
|
|
6
6
|
getPropsPerSlotPropTypes
|
|
7
7
|
} from "@elliemae/ds-props-helpers";
|
|
8
|
-
import { DSControlledDateRangePickerName,
|
|
8
|
+
import { DSControlledDateRangePickerName, DATE_RANGE_PICKER_SLOTS } from "./constants/index.js";
|
|
9
9
|
const noop = () => {
|
|
10
10
|
};
|
|
11
11
|
const defaultReturnFalse = () => false;
|
|
@@ -32,7 +32,7 @@ const defaultProps = {
|
|
|
32
32
|
readOnly: false
|
|
33
33
|
};
|
|
34
34
|
const DSControlledDateRangePickerPropTypes = {
|
|
35
|
-
...getPropsPerSlotPropTypes(DSControlledDateRangePickerName,
|
|
35
|
+
...getPropsPerSlotPropTypes(DSControlledDateRangePickerName, DATE_RANGE_PICKER_SLOTS),
|
|
36
36
|
...globalAttributesPropTypes,
|
|
37
37
|
...xstyledPropTypes,
|
|
38
38
|
type: PropTypes.oneOf([
|
|
@@ -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,
|
|
5
|
-
"mappings": "AAAA,YAAY,WAAW;ACCvB;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AAIP,SAAS,iCAAiC
|
|
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('Makes the component non-editable while remaining accessible')\n .defaultValue(false),\n applyAriaDisabled: PropTypes.bool.description(\n 'Whether to apply disabled styling and announce as disabled in SR. CAN STILL RECEIVE FOCUS. PREVENTS ONLY MAIN ACTION.',\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,eAAe;AAAA,EACf,gBAAgB;AAAA,EAChB,cAAc;AAAA,EACd,eAAe;AAAA,EACf,kBAAkB;AAAA,EAClB,oBAAoB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
+
const SlotPropsAsObject = {
|
|
3
|
+
dsControlleddaterangepickerRoot: { "aria-label": "just a typescript test" }
|
|
4
|
+
};
|
|
5
|
+
const SlotPropsAsFunctions = {
|
|
6
|
+
dsControlleddaterangepickerRoot: () => ({ "aria-label": "just a typescript test" })
|
|
7
|
+
};
|
|
8
|
+
const EnsureAllSlotsExistInSlotFunctionArguments = SlotPropsAsFunctions;
|
|
9
|
+
//# sourceMappingURL=slot-props.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../src/typescript-testing/slot-props.ts"],
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable @typescript-eslint/no-unused-vars, no-unused-vars */\nimport { type TypescriptHelpersT } from '@elliemae/ds-typescript-helpers';\nimport type { DSControlledDateRangePickerT } from '../index.js';\nimport type { DSControlledDateRangePickerName, DATE_RANGE_PICKER_SLOTS } from '../constants/index.js';\n\n// Slot props can be passed in two forms \u2014 object (static) and function (dynamic).\nconst SlotPropsAsObject: Partial<DSControlledDateRangePickerT.Props> = {\n dsControlleddaterangepickerRoot: { 'aria-label': 'just a typescript test' },\n};\n\nconst SlotPropsAsFunctions: DSControlledDateRangePickerT.SlotFunctionArguments = {\n dsControlleddaterangepickerRoot: () => ({ 'aria-label': 'just a typescript test' }),\n};\n\n// Exhaustiveness check \u2014 fails compilation if a slot is missing from SlotFunctionArguments.\nconst EnsureAllSlotsExistInSlotFunctionArguments: Required<\n TypescriptHelpersT.PropsForSlots<typeof DSControlledDateRangePickerName, typeof DATE_RANGE_PICKER_SLOTS>\n> = SlotPropsAsFunctions;\n"],
|
|
5
|
+
"mappings": "AAAA,YAAY,WAAW;ACMvB,MAAM,oBAAiE;AAAA,EACrE,iCAAiC,EAAE,cAAc,yBAAyB;AAC5E;AAEA,MAAM,uBAA2E;AAAA,EAC/E,iCAAiC,OAAO,EAAE,cAAc,yBAAyB;AACnF;AAGA,MAAM,6CAEF;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export declare const DSControlledDateRangePickerName = "DSControlleddaterangepicker";
|
|
2
|
+
export declare const DATE_RANGE_PICKER_SLOTS: {
|
|
3
|
+
readonly CONTAINER: "root";
|
|
4
|
+
};
|
|
5
|
+
export declare const DATE_RANGE_PICKER_DATA_TESTID: {
|
|
6
|
+
readonly CONTAINER: "ds-controlleddaterangepicker-root";
|
|
7
|
+
};
|
|
8
|
+
export declare const DSControlledDateRangePickerSlots: {
|
|
9
|
+
readonly CONTAINER: "root";
|
|
10
|
+
};
|
|
11
|
+
export declare const ControlledDateRangePickerDatatestid: {
|
|
12
|
+
readonly CONTAINER: "ds-controlleddaterangepicker-root";
|
|
13
|
+
};
|
package/dist/types/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export { getDateStringFromDay, getDateValuesFromDate, getDayFromDateString, getValidationDateStringMetaInfo, getValidationDateTimeStringMetaInfo, getValidationTimeStringMetaInfo, } from '@elliemae/ds-form-date-time-picker';
|
|
2
2
|
export { DSControlledDateRangePicker, DSControlledDateRangePickerWithSchema } from './ControlledDateRangePicker.js';
|
|
3
3
|
export { CONTROLLED_DATE_RANGE_PICKER_TYPES } from './ControlledDateRangePickerTypes.js';
|
|
4
|
-
export { ControlledDateRangePickerDatatestid, DSControlledDateRangePickerName, DSControlledDateRangePickerSlots, } from './
|
|
4
|
+
export { ControlledDateRangePickerDatatestid, DATE_RANGE_PICKER_DATA_TESTID, DATE_RANGE_PICKER_SLOTS, DSControlledDateRangePickerName, DSControlledDateRangePickerSlots, } from './constants/index.js';
|
|
5
5
|
export { type DSControlledDateRangePickerT } from './react-desc-prop-types.js';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { ValidationMap, GlobalAttributesT, DSPropTypesSchema, XstyledProps } from '@elliemae/ds-props-helpers';
|
|
2
2
|
import { type DSControlledDateTimePickerT } from '@elliemae/ds-form-date-time-picker';
|
|
3
3
|
import { type TypescriptHelpersT } from '@elliemae/ds-typescript-helpers';
|
|
4
|
-
import { DSControlledDateRangePickerName,
|
|
4
|
+
import { DSControlledDateRangePickerName, DATE_RANGE_PICKER_SLOTS } from './constants/index.js';
|
|
5
5
|
export declare namespace DSControlledDateRangePickerT {
|
|
6
6
|
interface RangePickerMetaInfoT extends DSControlledDateTimePickerT.InternalInputsChangeMetaInfo {
|
|
7
7
|
rangeDateChangeType?: 'from' | 'to';
|
|
@@ -11,6 +11,9 @@ export declare namespace DSControlledDateRangePickerT {
|
|
|
11
11
|
type RangeOnDateChange = (val: string, metaInfo: RangePickerMetaInfoT) => void;
|
|
12
12
|
type AppOnInputChange = DSControlledDateTimePickerT.AppOnInputChange;
|
|
13
13
|
type ControlledDateRangeType = 'full-date-range' | 'date-range-picker-controller-only' | 'date-range-picker' | 'date-range-inputs';
|
|
14
|
+
type SlotFunctionArguments = {
|
|
15
|
+
dsControlleddaterangepickerRoot: () => object;
|
|
16
|
+
};
|
|
14
17
|
interface RequiredProps {
|
|
15
18
|
}
|
|
16
19
|
interface DefaultProps {
|
|
@@ -35,7 +38,7 @@ export declare namespace DSControlledDateRangePickerT {
|
|
|
35
38
|
autoFocus: boolean;
|
|
36
39
|
readOnly: boolean;
|
|
37
40
|
}
|
|
38
|
-
interface OptionalProps extends TypescriptHelpersT.PropsForGlobalOnSlots<typeof DSControlledDateRangePickerName, typeof
|
|
41
|
+
interface OptionalProps extends TypescriptHelpersT.PropsForGlobalOnSlots<typeof DSControlledDateRangePickerName, typeof DATE_RANGE_PICKER_SLOTS> {
|
|
39
42
|
emptyPickerStartingMonth?: string;
|
|
40
43
|
onCalendarOpenFocusedDay?: string;
|
|
41
44
|
innerRef?: React.MutableRefObject<HTMLInputElement | HTMLButtonElement | null> | ((ref: HTMLInputElement | HTMLButtonElement | null) => void);
|
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.50",
|
|
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.50",
|
|
40
|
+
"@elliemae/ds-props-helpers": "3.80.0-next.50",
|
|
41
|
+
"@elliemae/ds-system": "3.80.0-next.50",
|
|
42
|
+
"@elliemae/ds-typescript-helpers": "3.80.0-next.50",
|
|
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.50",
|
|
47
|
+
"@elliemae/ds-test-utils": "3.80.0-next.50",
|
|
48
48
|
"@elliemae/pui-theme": "~2.13.0",
|
|
49
49
|
"jest": "^30.0.0",
|
|
50
50
|
"styled-components": "~5.3.11",
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../src/exported-related/theming.ts", "../../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
-
"sourcesContent": ["import { slotObjectToDataTestIds } from '@elliemae/ds-system';\n\nexport const DSControlledDateRangePickerName = 'DSControlleddaterangepicker';\n\nexport const DSControlledDateRangePickerSlots = {\n CONTAINER: 'root',\n};\n\nexport const ControlledDateRangePickerDatatestid = {\n ...slotObjectToDataTestIds(DSControlledDateRangePickerName, DSControlledDateRangePickerSlots),\n};\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,uBAAwC;AAEjC,MAAM,kCAAkC;AAExC,MAAM,mCAAmC;AAAA,EAC9C,WAAW;AACb;AAEO,MAAM,sCAAsC;AAAA,EACjD,OAAG,0CAAwB,iCAAiC,gCAAgC;AAC9F;",
|
|
6
|
-
"names": []
|
|
7
|
-
}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
|
-
import { slotObjectToDataTestIds } from "@elliemae/ds-system";
|
|
3
|
-
const DSControlledDateRangePickerName = "DSControlleddaterangepicker";
|
|
4
|
-
const DSControlledDateRangePickerSlots = {
|
|
5
|
-
CONTAINER: "root"
|
|
6
|
-
};
|
|
7
|
-
const ControlledDateRangePickerDatatestid = {
|
|
8
|
-
...slotObjectToDataTestIds(DSControlledDateRangePickerName, DSControlledDateRangePickerSlots)
|
|
9
|
-
};
|
|
10
|
-
export {
|
|
11
|
-
ControlledDateRangePickerDatatestid,
|
|
12
|
-
DSControlledDateRangePickerName,
|
|
13
|
-
DSControlledDateRangePickerSlots
|
|
14
|
-
};
|
|
15
|
-
//# sourceMappingURL=theming.js.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../src/exported-related/theming.ts"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import { slotObjectToDataTestIds } from '@elliemae/ds-system';\n\nexport const DSControlledDateRangePickerName = 'DSControlleddaterangepicker';\n\nexport const DSControlledDateRangePickerSlots = {\n CONTAINER: 'root',\n};\n\nexport const ControlledDateRangePickerDatatestid = {\n ...slotObjectToDataTestIds(DSControlledDateRangePickerName, DSControlledDateRangePickerSlots),\n};\n"],
|
|
5
|
-
"mappings": "AAAA,YAAY,WAAW;ACAvB,SAAS,+BAA+B;AAEjC,MAAM,kCAAkC;AAExC,MAAM,mCAAmC;AAAA,EAC9C,WAAW;AACb;AAEO,MAAM,sCAAsC;AAAA,EACjD,GAAG,wBAAwB,iCAAiC,gCAAgC;AAC9F;",
|
|
6
|
-
"names": []
|
|
7
|
-
}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
export declare const DSControlledDateRangePickerName = "DSControlleddaterangepicker";
|
|
2
|
-
export declare const DSControlledDateRangePickerSlots: {
|
|
3
|
-
CONTAINER: string;
|
|
4
|
-
};
|
|
5
|
-
export declare const ControlledDateRangePickerDatatestid: {
|
|
6
|
-
CONTAINER: `ds-controlleddaterangepicker-${string}`;
|
|
7
|
-
};
|