@elliemae/ds-date-range-selector 3.16.0-next.2 → 3.16.0-next.20

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.
@@ -18,6 +18,10 @@ var __copyProps = (to, from, except, desc) => {
18
18
  return to;
19
19
  };
20
20
  var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
+ // If the importer is in node compatibility mode or this is not an ESM
22
+ // file that has been converted to a CommonJS file using a Babel-
23
+ // compatible transform (i.e. "__esModule" has not been set), then set
24
+ // "default" to the CommonJS "module.exports" for node compatibility.
21
25
  isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
22
26
  mod
23
27
  ));
@@ -35,10 +39,11 @@ module.exports = __toCommonJS(DSDateRangeSelector_exports);
35
39
  var React = __toESM(require("react"));
36
40
  var import_jsx_runtime = require("react/jsx-runtime");
37
41
  var import_ds_utilities = require("@elliemae/ds-utilities");
42
+ var import_ds_props_helpers = require("@elliemae/ds-props-helpers");
38
43
  var import_moment = __toESM(require("moment"));
39
- var import_DateRangeSelectorImpl = __toESM(require("./components/DateRangeSelectorImpl"));
40
- var import_dropdownPreselectedOptions = require("./options/dropdownPreselectedOptions");
41
- var import_CustomOptionRender = __toESM(require("./components/CustomOptionRender/CustomOptionRender"));
44
+ var import_DateRangeSelectorImpl = __toESM(require("./components/DateRangeSelectorImpl.js"));
45
+ var import_dropdownPreselectedOptions = require("./options/dropdownPreselectedOptions.js");
46
+ var import_CustomOptionRender = __toESM(require("./components/CustomOptionRender/CustomOptionRender.js"));
42
47
  const DSDateRangeSelector = ({
43
48
  containerProps = {},
44
49
  className = "",
@@ -52,44 +57,47 @@ const DSDateRangeSelector = ({
52
57
  displayFormatDay = "D",
53
58
  disableCustomOption = false,
54
59
  hasError = false
55
- }) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
56
- import_DateRangeSelectorImpl.default,
57
- {
58
- className,
59
- containerProps,
60
- customOptionRender,
61
- disableCustomOption,
62
- displayFormatDay,
63
- dropdownPreselectedOptions: preselectedOptions,
64
- endDate,
65
- onChange,
66
- placeholder,
67
- startDate,
68
- value,
69
- hasError
70
- }
71
- );
60
+ }) => {
61
+ (0, import_ds_utilities.useDeprecateComponent)({ componentName: "ds-date-range-selector", version: "TBD Date: 2023 Q1" });
62
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
63
+ import_DateRangeSelectorImpl.default,
64
+ {
65
+ className,
66
+ containerProps,
67
+ customOptionRender,
68
+ disableCustomOption,
69
+ displayFormatDay,
70
+ dropdownPreselectedOptions: preselectedOptions,
71
+ endDate,
72
+ onChange,
73
+ placeholder,
74
+ startDate,
75
+ value,
76
+ hasError
77
+ }
78
+ );
79
+ };
72
80
  const dateRangeRecurrenceSelectorProps = {
73
- containerProps: import_ds_utilities.PropTypes.object.description("Set of properties attached to the main container"),
74
- className: import_ds_utilities.PropTypes.string.description("html class attribute"),
75
- preselectedOptions: import_ds_utilities.PropTypes.arrayOf(
76
- import_ds_utilities.PropTypes.shape({
77
- label: import_ds_utilities.PropTypes.string,
78
- value: import_ds_utilities.PropTypes.string
81
+ containerProps: import_ds_props_helpers.PropTypes.object.description("Set of properties attached to the main container"),
82
+ className: import_ds_props_helpers.PropTypes.string.description("html class attribute"),
83
+ preselectedOptions: import_ds_props_helpers.PropTypes.arrayOf(
84
+ import_ds_props_helpers.PropTypes.shape({
85
+ label: import_ds_props_helpers.PropTypes.string,
86
+ value: import_ds_props_helpers.PropTypes.string
79
87
  })
80
88
  ).description("options to display in dropdown menu"),
81
- onChange: import_ds_utilities.PropTypes.func.description("function executed when selection changes"),
82
- placeholder: import_ds_utilities.PropTypes.string.description("inputs placeholder").defaultValue("Select Range"),
83
- value: import_ds_utilities.PropTypes.oneOf([import_ds_utilities.PropTypes.string, import_ds_utilities.PropTypes.number]).description("selected value"),
84
- customOptionRender: import_ds_utilities.PropTypes.element.description("custom renderer for options"),
85
- startDate: import_ds_utilities.PropTypes.instanceOf(Date, import_moment.default).description("moment object of start date"),
86
- endDate: import_ds_utilities.PropTypes.instanceOf(Date, import_moment.default).description("moment object of end date"),
87
- displayFormatDay: import_ds_utilities.PropTypes.string.description("format to display date").defaultValue("D"),
88
- disableCustomOption: import_ds_utilities.PropTypes.bool.description("disables custom options").defaultValue(false)
89
+ onChange: import_ds_props_helpers.PropTypes.func.description("function executed when selection changes"),
90
+ placeholder: import_ds_props_helpers.PropTypes.string.description("inputs placeholder").defaultValue("Select Range"),
91
+ value: import_ds_props_helpers.PropTypes.oneOf([import_ds_props_helpers.PropTypes.string, import_ds_props_helpers.PropTypes.number]).description("selected value"),
92
+ customOptionRender: import_ds_props_helpers.PropTypes.element.description("custom renderer for options"),
93
+ startDate: import_ds_props_helpers.PropTypes.instanceOf(Date, import_moment.default).description("moment object of start date"),
94
+ endDate: import_ds_props_helpers.PropTypes.instanceOf(Date, import_moment.default).description("moment object of end date"),
95
+ displayFormatDay: import_ds_props_helpers.PropTypes.string.description("format to display date").defaultValue("D"),
96
+ disableCustomOption: import_ds_props_helpers.PropTypes.bool.description("disables custom options").defaultValue(false)
89
97
  };
90
98
  DSDateRangeSelector.propTypes = dateRangeRecurrenceSelectorProps;
91
99
  DSDateRangeSelector.displayName = "DSDateRangeSelector";
92
- const DateRangeRecurrenceSelectorWithSchema = (0, import_ds_utilities.describe)(DSDateRangeSelector);
100
+ const DateRangeRecurrenceSelectorWithSchema = (0, import_ds_props_helpers.describe)(DSDateRangeSelector);
93
101
  DateRangeRecurrenceSelectorWithSchema.propTypes = dateRangeRecurrenceSelectorProps;
94
102
  var DSDateRangeSelector_default = DSDateRangeSelector;
95
103
  //# sourceMappingURL=DSDateRangeSelector.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/DSDateRangeSelector.tsx", "../../../../scripts/build/transpile/react-shim.js"],
4
- "sourcesContent": ["import React from 'react';\nimport { PropTypes, describe } from '@elliemae/ds-utilities';\nimport moment from 'moment';\nimport DateRangeSelectorImpl from './components/DateRangeSelectorImpl';\nimport {\n DropdownOptionsTypes,\n dropdownPreselectedOptions,\n CUSTOM_OPTION_VALUE,\n} from './options/dropdownPreselectedOptions';\nimport CustomOptionRender from './components/CustomOptionRender/CustomOptionRender';\n\nconst DSDateRangeSelector = ({\n containerProps = {},\n className = '',\n preselectedOptions = dropdownPreselectedOptions,\n onChange = () => null,\n placeholder = 'Select Range',\n value = null,\n customOptionRender = CustomOptionRender,\n startDate = null,\n endDate = null,\n displayFormatDay = 'D',\n disableCustomOption = false,\n hasError = false,\n}) => (\n <DateRangeSelectorImpl\n className={className}\n containerProps={containerProps}\n customOptionRender={customOptionRender}\n disableCustomOption={disableCustomOption}\n displayFormatDay={displayFormatDay}\n dropdownPreselectedOptions={preselectedOptions}\n endDate={endDate}\n onChange={onChange}\n placeholder={placeholder}\n startDate={startDate}\n value={value}\n hasError={hasError}\n />\n);\n\nexport { CUSTOM_OPTION_VALUE, dropdownPreselectedOptions, DropdownOptionsTypes };\n\nconst dateRangeRecurrenceSelectorProps = {\n containerProps: PropTypes.object.description('Set of properties attached to the main container'),\n className: PropTypes.string.description('html class attribute'),\n preselectedOptions: PropTypes.arrayOf(\n PropTypes.shape({\n label: PropTypes.string,\n value: PropTypes.string,\n }),\n ).description('options to display in dropdown menu'),\n onChange: PropTypes.func.description('function executed when selection changes'),\n placeholder: PropTypes.string.description('inputs placeholder').defaultValue('Select Range'),\n value: PropTypes.oneOf([PropTypes.string, PropTypes.number]).description('selected value'),\n customOptionRender: PropTypes.element.description('custom renderer for options'),\n startDate: PropTypes.instanceOf(Date, moment).description('moment object of start date'),\n endDate: PropTypes.instanceOf(Date, moment).description('moment object of end date'),\n displayFormatDay: PropTypes.string.description('format to display date').defaultValue('D'),\n disableCustomOption: PropTypes.bool.description('disables custom options').defaultValue(false),\n};\n\nDSDateRangeSelector.propTypes = dateRangeRecurrenceSelectorProps;\nDSDateRangeSelector.displayName = 'DSDateRangeSelector';\nconst DateRangeRecurrenceSelectorWithSchema = describe(DSDateRangeSelector);\nDateRangeRecurrenceSelectorWithSchema.propTypes = dateRangeRecurrenceSelectorProps;\n\nexport { DateRangeRecurrenceSelectorWithSchema, DSDateRangeSelector };\nexport default DSDateRangeSelector;\n", "import * as React from 'react';\nexport { React };\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADyBrB;AAxBF,0BAAoC;AACpC,oBAAmB;AACnB,mCAAkC;AAClC,wCAIO;AACP,gCAA+B;AAE/B,MAAM,sBAAsB,CAAC;AAAA,EAC3B,iBAAiB,CAAC;AAAA,EAClB,YAAY;AAAA,EACZ,qBAAqB;AAAA,EACrB,WAAW,MAAM;AAAA,EACjB,cAAc;AAAA,EACd,QAAQ;AAAA,EACR,qBAAqB,0BAAAA;AAAA,EACrB,YAAY;AAAA,EACZ,UAAU;AAAA,EACV,mBAAmB;AAAA,EACnB,sBAAsB;AAAA,EACtB,WAAW;AACb,MACE;AAAA,EAAC,6BAAAC;AAAA,EAAA;AAAA,IACC;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA,4BAA4B;AAAA,IAC5B;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA;AACF;AAKF,MAAM,mCAAmC;AAAA,EACvC,gBAAgB,8BAAU,OAAO,YAAY,kDAAkD;AAAA,EAC/F,WAAW,8BAAU,OAAO,YAAY,sBAAsB;AAAA,EAC9D,oBAAoB,8BAAU;AAAA,IAC5B,8BAAU,MAAM;AAAA,MACd,OAAO,8BAAU;AAAA,MACjB,OAAO,8BAAU;AAAA,IACnB,CAAC;AAAA,EACH,EAAE,YAAY,qCAAqC;AAAA,EACnD,UAAU,8BAAU,KAAK,YAAY,0CAA0C;AAAA,EAC/E,aAAa,8BAAU,OAAO,YAAY,oBAAoB,EAAE,aAAa,cAAc;AAAA,EAC3F,OAAO,8BAAU,MAAM,CAAC,8BAAU,QAAQ,8BAAU,MAAM,CAAC,EAAE,YAAY,gBAAgB;AAAA,EACzF,oBAAoB,8BAAU,QAAQ,YAAY,6BAA6B;AAAA,EAC/E,WAAW,8BAAU,WAAW,MAAM,cAAAC,OAAM,EAAE,YAAY,6BAA6B;AAAA,EACvF,SAAS,8BAAU,WAAW,MAAM,cAAAA,OAAM,EAAE,YAAY,2BAA2B;AAAA,EACnF,kBAAkB,8BAAU,OAAO,YAAY,wBAAwB,EAAE,aAAa,GAAG;AAAA,EACzF,qBAAqB,8BAAU,KAAK,YAAY,yBAAyB,EAAE,aAAa,KAAK;AAC/F;AAEA,oBAAoB,YAAY;AAChC,oBAAoB,cAAc;AAClC,MAAM,4CAAwC,8BAAS,mBAAmB;AAC1E,sCAAsC,YAAY;AAGlD,IAAO,8BAAQ;",
4
+ "sourcesContent": ["import React from 'react';\nimport { useDeprecateComponent } from '@elliemae/ds-utilities';\nimport { PropTypes, describe } from '@elliemae/ds-props-helpers';\nimport moment from 'moment';\nimport DateRangeSelectorImpl from './components/DateRangeSelectorImpl.js';\nimport {\n DropdownOptionsTypes,\n dropdownPreselectedOptions,\n CUSTOM_OPTION_VALUE,\n} from './options/dropdownPreselectedOptions.js';\nimport CustomOptionRender from './components/CustomOptionRender/CustomOptionRender.js';\n\nconst DSDateRangeSelector = ({\n containerProps = {},\n className = '',\n preselectedOptions = dropdownPreselectedOptions,\n onChange = () => null,\n placeholder = 'Select Range',\n value = null,\n customOptionRender = CustomOptionRender,\n startDate = null,\n endDate = null,\n displayFormatDay = 'D',\n disableCustomOption = false,\n hasError = false,\n}) => {\n useDeprecateComponent({ componentName: 'ds-date-range-selector', version: 'TBD Date: 2023 Q1' });\n\n return (\n <DateRangeSelectorImpl\n className={className}\n containerProps={containerProps}\n customOptionRender={customOptionRender}\n disableCustomOption={disableCustomOption}\n displayFormatDay={displayFormatDay}\n dropdownPreselectedOptions={preselectedOptions}\n endDate={endDate}\n onChange={onChange}\n placeholder={placeholder}\n startDate={startDate}\n value={value}\n hasError={hasError}\n />\n );\n};\n\nexport { CUSTOM_OPTION_VALUE, dropdownPreselectedOptions, DropdownOptionsTypes };\n\nconst dateRangeRecurrenceSelectorProps = {\n containerProps: PropTypes.object.description('Set of properties attached to the main container'),\n className: PropTypes.string.description('html class attribute'),\n preselectedOptions: PropTypes.arrayOf(\n PropTypes.shape({\n label: PropTypes.string,\n value: PropTypes.string,\n }),\n ).description('options to display in dropdown menu'),\n onChange: PropTypes.func.description('function executed when selection changes'),\n placeholder: PropTypes.string.description('inputs placeholder').defaultValue('Select Range'),\n value: PropTypes.oneOf([PropTypes.string, PropTypes.number]).description('selected value'),\n customOptionRender: PropTypes.element.description('custom renderer for options'),\n startDate: PropTypes.instanceOf(Date, moment).description('moment object of start date'),\n endDate: PropTypes.instanceOf(Date, moment).description('moment object of end date'),\n displayFormatDay: PropTypes.string.description('format to display date').defaultValue('D'),\n disableCustomOption: PropTypes.bool.description('disables custom options').defaultValue(false),\n};\n\nDSDateRangeSelector.propTypes = dateRangeRecurrenceSelectorProps;\nDSDateRangeSelector.displayName = 'DSDateRangeSelector';\nconst DateRangeRecurrenceSelectorWithSchema = describe(DSDateRangeSelector);\nDateRangeRecurrenceSelectorWithSchema.propTypes = dateRangeRecurrenceSelectorProps;\n\nexport { DateRangeRecurrenceSelectorWithSchema, DSDateRangeSelector };\nexport default DSDateRangeSelector;\n", "import * as React from 'react';\nexport { React };\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;AD6BnB;AA5BJ,0BAAsC;AACtC,8BAAoC;AACpC,oBAAmB;AACnB,mCAAkC;AAClC,wCAIO;AACP,gCAA+B;AAE/B,MAAM,sBAAsB,CAAC;AAAA,EAC3B,iBAAiB,CAAC;AAAA,EA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BAAqB,kCAAU,KAAK,YAAY,yBAAyB,EAAE,aAAa,KAAK;AAC/F;AAEA,oBAAoB,YAAY;AAChC,oBAAoB,cAAc;AAClC,MAAM,4CAAwC,kCAAS,mBAAmB;AAC1E,sCAAsC,YAAY;AAGlD,IAAO,8BAAQ;",
6
6
  "names": ["CustomOptionRender", "DateRangeSelectorImpl", "moment"]
7
7
  }
@@ -18,6 +18,10 @@ var __copyProps = (to, from, except, desc) => {
18
18
  return to;
19
19
  };
20
20
  var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
+ // If the importer is in node compatibility mode or this is not an ESM
22
+ // file that has been converted to a CommonJS file using a Babel-
23
+ // compatible transform (i.e. "__esModule" has not been set), then set
24
+ // "default" to the CommonJS "module.exports" for node compatibility.
21
25
  isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
22
26
  mod
23
27
  ));
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["../../../../src/components/CustomOptionRender/CustomOptionRender.tsx", "../../../../../../scripts/build/transpile/react-shim.js"],
4
4
  "sourcesContent": ["import React from 'react';\nimport { convertPropToCssClassName } from '@elliemae/ds-classnames';\n\nconst { cssClassName } = convertPropToCssClassName('date-range-selector-customoption');\n/**\n * @param root0\n * @param root0.customRange\n * @param root0.customRange.startDate\n * @param root0.customRange.endDate\n * @customRange {\nendDate\nstartDate\n}\n */\nconst CustomOptionRender = ({ customRange: { startDate, endDate } }) => {\n const start = startDate ? startDate.format('MM/DD/YYYY') : null;\n const end = endDate ? endDate.format('MM/DD/YYYY') : null;\n const display = `From ${start} to ${end}` || 'Custom';\n return <em className={cssClassName}>{display}</em>;\n};\n\nexport default CustomOptionRender;\n", "import * as React from 'react';\nexport { React };\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADkBd;AAjBT,2BAA0C;AAE1C,MAAM,EAAE,aAAa,QAAI,gDAA0B,kCAAkC;AAWrF,MAAM,qBAAqB,CAAC,EAAE,aAAa,EAAE,WAAW,QAAQ,EAAE,MAAM;AACtE,QAAM,QAAQ,YAAY,UAAU,OAAO,YAAY,IAAI;AAC3D,QAAM,MAAM,UAAU,QAAQ,OAAO,YAAY,IAAI;AACrD,QAAM,UAAU,QAAQ,YAAY,SAAS;AAC7C,SAAO,4CAAC,QAAG,WAAW,cAAe,mBAAQ;AAC/C;AAEA,IAAO,6BAAQ;",
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADkBd;AAjBT,2BAA0C;AAE1C,MAAM,EAAE,aAAa,QAAI,gDAA0B,kCAAkC;AAWrF,MAAM,qBAAqB,CAAC,EAAE,aAAa,EAAE,WAAW,QAAQ,EAAE,MAAM;AACtE,QAAM,QAAQ,YAAY,UAAU,OAAO,YAAY,IAAI;AAC3D,QAAM,MAAM,UAAU,QAAQ,OAAO,YAAY,IAAI;AACrD,QAAM,UAAU,QAAQ,YAAY,SAAS;AAC7C,SAAO,4CAAC,QAAG,WAAW,cAAe,mBAAQ;AAC/C;AAEA,IAAO,6BAAQ;",
6
6
  "names": []
7
7
  }
@@ -18,6 +18,10 @@ var __copyProps = (to, from, except, desc) => {
18
18
  return to;
19
19
  };
20
20
  var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
+ // If the importer is in node compatibility mode or this is not an ESM
22
+ // file that has been converted to a CommonJS file using a Babel-
23
+ // compatible transform (i.e. "__esModule" has not been set), then set
24
+ // "default" to the CommonJS "module.exports" for node compatibility.
21
25
  isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
22
26
  mod
23
27
  ));
@@ -32,14 +36,14 @@ var import_jsx_runtime = require("react/jsx-runtime");
32
36
  var import_react = require("react");
33
37
  var import_moment = __toESM(require("moment"));
34
38
  var import_react_select = require("react-select");
35
- var import_initialize = require("react-dates/initialize");
39
+ var import_initialize = require("react-dates/initialize.js");
36
40
  var import_react_dates = require("react-dates");
37
41
  var import_ds_classnames = require("@elliemae/ds-classnames");
38
42
  var import_ds_form = require("@elliemae/ds-form");
39
43
  var import_ds_popper = __toESM(require("@elliemae/ds-popper"));
40
44
  var import_ds_date_picker = require("@elliemae/ds-date-picker");
41
45
  var import_ds_icons = require("@elliemae/ds-icons");
42
- var import_dropdownPreselectedOptions = require("../options/dropdownPreselectedOptions");
46
+ var import_dropdownPreselectedOptions = require("../options/dropdownPreselectedOptions.js");
43
47
  const START_DATE = "startDate";
44
48
  const END_DATE = "endDate";
45
49
  const advanceOption = {
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/components/DateRangeSelectorImpl.tsx", "../../../../../scripts/build/transpile/react-shim.js"],
4
- "sourcesContent": ["/* eslint-disable react/prop-types */\nimport React, { Component } from 'react';\nimport moment from 'moment';\nimport { components } from 'react-select';\nimport 'react-dates/initialize';\nimport { DayPickerRangeController } from 'react-dates';\nimport { convertPropToCssClassName } from '@elliemae/ds-classnames';\nimport { DSComboBox } from '@elliemae/ds-form';\nimport DSPopper from '@elliemae/ds-popper';\nimport { DatePickerDay, DatePickerNavigation } from '@elliemae/ds-date-picker';\nimport { ChevronLeft } from '@elliemae/ds-icons';\nimport { CUSTOM_OPTION_VALUE } from '../options/dropdownPreselectedOptions';\n\nconst START_DATE = 'startDate';\nconst END_DATE = 'endDate';\n\nconst advanceOption = {\n label: 'Custom',\n value: CUSTOM_OPTION_VALUE,\n isAdvance: true,\n};\nconst { cssClassName, classNameElement, classNameBlock } = convertPropToCssClassName('date-range-selector');\n\nconst { classNameElement: pickerNameElement } = convertPropToCssClassName('datepicker');\n\nclass DateTimeRecurenceSelectorImpl extends Component {\n constructor(props) {\n super(props);\n\n const customRange = {\n startDate: props.startDate ? moment(props.startDate) : moment(),\n endDate: props.endDate ? moment(props.endDate) : moment(),\n };\n this.state = {\n openModal: false,\n selected: props.value,\n focusedInput: START_DATE,\n customRange,\n };\n\n this.onDatesChange = this.onDatesChange.bind(this);\n this.onFocusChange = this.onFocusChange.bind(this);\n\n const { customOptionRender: CustomOptionRender } = props;\n advanceOption.label = <CustomOptionRender customRange={customRange} />;\n }\n\n onChange = () => {\n const { onChange } = this.props;\n const { customRange, selected } = this.state;\n onChange(selected, customRange);\n };\n\n onChangeDropdown = (value) => {\n const { dropdownPreselectedOptions } = this.props;\n const selected = dropdownPreselectedOptions.find((op) => op.value === value);\n const { onChange } = this.props;\n if (!selected) {\n this.setState({ selected: value });\n this.handleOpenModal();\n } else if (selected) {\n onChange(value);\n this.setState({ selected: value, openModal: false });\n }\n };\n\n onDatesChange({ startDate, endDate }) {\n this.setState(\n {\n customRange: {\n startDate,\n endDate,\n },\n },\n () => {\n this.onChange();\n },\n );\n }\n\n onFocusChange() {\n this.setState(({ focusedInput }) => ({\n focusedInput: focusedInput === START_DATE ? END_DATE : START_DATE,\n }));\n }\n\n handleConfirm = () => {\n const { customOptionRender: CustomOptionRender } = this.props;\n const { customRange } = this.state;\n advanceOption.label = <CustomOptionRender customRange={customRange} />;\n this.onChange();\n this.handleCloseModal();\n };\n\n handleOpenModal = () => this.setState({ openModal: true });\n\n handleCloseModal = () => this.setState({ openModal: false });\n\n render() {\n const {\n placeholder,\n dropdownPreselectedOptions,\n displayFormatDay,\n className,\n disableCustomOption,\n containerProps,\n hasError,\n } = this.props;\n const {\n selected,\n openModal,\n focusedInput,\n customRange: { startDate, endDate },\n } = this.state;\n\n let options = [...dropdownPreselectedOptions];\n if (!disableCustomOption) {\n options = [...options, advanceOption];\n // eslint-disable-next-line max-lines\n }\n\n return (\n <div {...containerProps} className={`${cssClassName} ${className}`}>\n <div className={`${classNameBlock('container-selector')}`}>\n <DSComboBox\n className={`${classNameElement('dropdown-field-selector')}`}\n components={{\n Option: (props) => <components.Option {...props} />,\n IndicatorSeparator: () => null,\n }}\n onChange={this.onChangeDropdown}\n onKeyDown={this.onKeyDown}\n options={options}\n placeholder={placeholder}\n value={selected}\n hasError={hasError}\n keepTypedValue={false} // TEMPORARY FIX\n />\n </div>\n <DSPopper\n contentComponent={\n <div className={classNameBlock('wrap-day-picker')}>\n <DayPickerRangeController\n endDate={endDate}\n focusedInput={focusedInput}\n hideKeyboardShortcutsPanel\n navNext={<DatePickerNavigation className={pickerNameElement('navigation-next')} />}\n navPrev={<DatePickerNavigation className={pickerNameElement('navigation-prev')} icon={ChevronLeft} />}\n onDatesChange={this.onDatesChange}\n onFocusChange={this.onFocusChange}\n onOutsideClick={this.handleConfirm}\n renderDayContents={(date) => (\n <DatePickerDay className={pickerNameElement('day-contents')} date={date.format(displayFormatDay)} />\n )}\n startDate={startDate}\n />\n </div>\n }\n isOpen={openModal}\n showArrow={false}\n triggerComponent={<div />}\n />\n </div>\n );\n }\n}\n\nexport default DateTimeRecurenceSelectorImpl;\n", "import * as React from 'react';\nexport { React };\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;AD4CG;AA3C1B,mBAAiC;AACjC,oBAAmB;AACnB,0BAA2B;AAC3B,wBAAO;AACP,yBAAyC;AACzC,2BAA0C;AAC1C,qBAA2B;AAC3B,uBAAqB;AACrB,4BAAoD;AACpD,sBAA4B;AAC5B,wCAAoC;AAEpC,MAAM,aAAa;AACnB,MAAM,WAAW;AAEjB,MAAM,gBAAgB;AAAA,EACpB,OAAO;AAAA,EACP,OAAO;AAAA,EACP,WAAW;AACb;AACA,MAAM,EAAE,cAAc,kBAAkB,eAAe,QAAI,gDAA0B,qBAAqB;AAE1G,MAAM,EAAE,kBAAkB,kBAAkB,QAAI,gDAA0B,YAAY;AAEtF,MAAM,sCAAsC,uBAAU;AAAA,EACpD,YAAY,OAAO;AACjB,UAAM,KAAK;AAoBb,oBAAW,MAAM;AACf,YAAM,EAAE,SAAS,IA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A,YAAC;AAAA;AAAA,cACC;AAAA,cACA;AAAA,cACA,4BAA0B;AAAA,cAC1B,SAAS,4CAAC,8CAAqB,WAAW,kBAAkB,iBAAiB,GAAG;AAAA,cAChF,SAAS,4CAAC,8CAAqB,WAAW,kBAAkB,iBAAiB,GAAG,MAAM,6BAAa;AAAA,cACnG,eAAe,KAAK;AAAA,cACpB,eAAe,KAAK;AAAA,cACpB,gBAAgB,KAAK;AAAA,cACrB,mBAAmB,CAAC,SAClB,4CAAC,uCAAc,WAAW,kBAAkB,cAAc,GAAG,MAAM,KAAK,OAAO,gBAAgB,GAAG;AAAA,cAEpG;AAAA;AAAA,UACF,GACF;AAAA,UAEF,QAAQ;AAAA,UACR,WAAW;AAAA,UACX,kBAAkB,4CAAC,SAAI;AAAA;AAAA,MACzB;AAAA,OACF;AAAA,EAEJ;AACF;AAEA,IAAO,gCAAQ;",
4
+ "sourcesContent": ["/* eslint-disable react/prop-types */\nimport React, { Component } from 'react';\nimport moment from 'moment';\nimport { components } from 'react-select';\nimport 'react-dates/initialize.js';\nimport { DayPickerRangeController } from 'react-dates';\nimport { convertPropToCssClassName } from '@elliemae/ds-classnames';\nimport { DSComboBox } from '@elliemae/ds-form';\nimport DSPopper from '@elliemae/ds-popper';\nimport { DatePickerDay, DatePickerNavigation } from '@elliemae/ds-date-picker';\nimport { ChevronLeft } from '@elliemae/ds-icons';\nimport { CUSTOM_OPTION_VALUE } from '../options/dropdownPreselectedOptions.js';\n\nconst START_DATE = 'startDate';\nconst END_DATE = 'endDate';\n\nconst advanceOption = {\n label: 'Custom',\n value: CUSTOM_OPTION_VALUE,\n isAdvance: true,\n};\nconst { cssClassName, classNameElement, classNameBlock } = convertPropToCssClassName('date-range-selector');\n\nconst { classNameElement: pickerNameElement } = convertPropToCssClassName('datepicker');\n\nclass DateTimeRecurenceSelectorImpl extends Component {\n constructor(props) {\n super(props);\n\n const customRange = {\n startDate: props.startDate ? moment(props.startDate) : moment(),\n endDate: props.endDate ? moment(props.endDate) : moment(),\n };\n this.state = {\n openModal: false,\n selected: props.value,\n focusedInput: START_DATE,\n customRange,\n };\n\n this.onDatesChange = this.onDatesChange.bind(this);\n this.onFocusChange = this.onFocusChange.bind(this);\n\n const { customOptionRender: CustomOptionRender } = props;\n advanceOption.label = <CustomOptionRender customRange={customRange} />;\n }\n\n onChange = () => {\n const { onChange } = this.props;\n const { customRange, selected } = this.state;\n onChange(selected, customRange);\n };\n\n onChangeDropdown = (value) => {\n const { dropdownPreselectedOptions } = this.props;\n const selected = dropdownPreselectedOptions.find((op) => op.value === value);\n const { onChange } = this.props;\n if (!selected) {\n this.setState({ selected: value });\n this.handleOpenModal();\n } else if (selected) {\n onChange(value);\n this.setState({ selected: value, openModal: false });\n }\n };\n\n onDatesChange({ startDate, endDate }) {\n this.setState(\n {\n customRange: {\n startDate,\n endDate,\n },\n },\n () => {\n this.onChange();\n },\n );\n }\n\n onFocusChange() {\n this.setState(({ focusedInput }) => ({\n focusedInput: focusedInput === START_DATE ? END_DATE : START_DATE,\n }));\n }\n\n handleConfirm = () => {\n const { customOptionRender: CustomOptionRender } = this.props;\n const { customRange } = this.state;\n advanceOption.label = <CustomOptionRender customRange={customRange} />;\n this.onChange();\n this.handleCloseModal();\n };\n\n handleOpenModal = () => this.setState({ openModal: true });\n\n handleCloseModal = () => this.setState({ openModal: false });\n\n render() {\n const {\n placeholder,\n dropdownPreselectedOptions,\n displayFormatDay,\n className,\n disableCustomOption,\n containerProps,\n hasError,\n } = this.props;\n const {\n selected,\n openModal,\n focusedInput,\n customRange: { startDate, endDate },\n } = this.state;\n\n let options = [...dropdownPreselectedOptions];\n if (!disableCustomOption) {\n options = [...options, advanceOption];\n // eslint-disable-next-line max-lines\n }\n\n return (\n <div {...containerProps} className={`${cssClassName} ${className}`}>\n <div className={`${classNameBlock('container-selector')}`}>\n <DSComboBox\n className={`${classNameElement('dropdown-field-selector')}`}\n components={{\n Option: (props) => <components.Option {...props} />,\n IndicatorSeparator: () => null,\n }}\n onChange={this.onChangeDropdown}\n onKeyDown={this.onKeyDown}\n options={options}\n placeholder={placeholder}\n value={selected}\n hasError={hasError}\n keepTypedValue={false} // TEMPORARY FIX\n />\n </div>\n <DSPopper\n contentComponent={\n <div className={classNameBlock('wrap-day-picker')}>\n <DayPickerRangeController\n endDate={endDate}\n focusedInput={focusedInput}\n hideKeyboardShortcutsPanel\n navNext={<DatePickerNavigation className={pickerNameElement('navigation-next')} />}\n navPrev={<DatePickerNavigation className={pickerNameElement('navigation-prev')} icon={ChevronLeft} />}\n onDatesChange={this.onDatesChange}\n onFocusChange={this.onFocusChange}\n onOutsideClick={this.handleConfirm}\n renderDayContents={(date) => (\n <DatePickerDay className={pickerNameElement('day-contents')} date={date.format(displayFormatDay)} />\n )}\n startDate={startDate}\n />\n </div>\n }\n isOpen={openModal}\n showArrow={false}\n triggerComponent={<div />}\n />\n </div>\n );\n }\n}\n\nexport default DateTimeRecurenceSelectorImpl;\n", "import * as React from 'react';\nexport { React };\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;AD4CG;AA3C1B,mBAAiC;AACjC,oBAAmB;AACnB,0BAA2B;AAC3B,wBAAO;AACP,yBAAyC;AACzC,2BAA0C;AAC1C,qBAA2B;AAC3B,uBAAqB;AACrB,4BAAoD;AACpD,sBAA4B;AAC5B,wCAAoC;AAEpC,MAAM,aAAa;AACnB,MAAM,WAAW;AAEjB,MAAM,gBAAgB;AAAA,EACpB,OAAO;AAAA,EACP,OAAO;AAAA,EACP,WAAW;AACb;AACA,MAAM,EAAE,cAAc,kBAAkB,eAAe,QAAI,gDAA0B,qBAAqB;AAE1G,MAAM,EAAE,kBAAkB,kBAAkB,QAAI,gDAA0B,YAAY;AAEtF,MAAM,sCAAsC,uBAAU;AAAA,EACpD,YAAY,OAAO;AACjB,UAAM,KAAK;AAoBb,oBAAW,MAAM;AACf,YAAM,EAAE,SAAS,IAAI,KAAK;A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AA;AAAA,cACC;AAAA,cACA;AAAA,cACA,4BAA0B;AAAA,cAC1B,SAAS,4CAAC,8CAAqB,WAAW,kBAAkB,iBAAiB,GAAG;AAAA,cAChF,SAAS,4CAAC,8CAAqB,WAAW,kBAAkB,iBAAiB,GAAG,MAAM,6BAAa;AAAA,cACnG,eAAe,KAAK;AAAA,cACpB,eAAe,KAAK;AAAA,cACpB,gBAAgB,KAAK;AAAA,cACrB,mBAAmB,CAAC,SAClB,4CAAC,uCAAc,WAAW,kBAAkB,cAAc,GAAG,MAAM,KAAK,OAAO,gBAAgB,GAAG;AAAA,cAEpG;AAAA;AAAA,UACF,GACF;AAAA,UAEF,QAAQ;AAAA,UACR,WAAW;AAAA,UACX,kBAAkB,4CAAC,SAAI;AAAA;AAAA,MACzB;AAAA,OACF;AAAA,EAEJ;AACF;AAEA,IAAO,gCAAQ;",
6
6
  "names": ["moment", "DSPopper"]
7
7
  }
package/dist/cjs/index.js CHANGED
@@ -18,6 +18,10 @@ var __copyProps = (to, from, except, desc) => {
18
18
  return to;
19
19
  };
20
20
  var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
+ // If the importer is in node compatibility mode or this is not an ESM
22
+ // file that has been converted to a CommonJS file using a Babel-
23
+ // compatible transform (i.e. "__esModule" has not been set), then set
24
+ // "default" to the CommonJS "module.exports" for node compatibility.
21
25
  isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
22
26
  mod
23
27
  ));
@@ -31,6 +35,6 @@ __export(src_exports, {
31
35
  });
32
36
  module.exports = __toCommonJS(src_exports);
33
37
  var React = __toESM(require("react"));
34
- var import_DSDateRangeSelector = __toESM(require("./DSDateRangeSelector"));
35
- var import_DSDateRangeSelector2 = require("./DSDateRangeSelector");
38
+ var import_DSDateRangeSelector = __toESM(require("./DSDateRangeSelector.js"));
39
+ var import_DSDateRangeSelector2 = require("./DSDateRangeSelector.js");
36
40
  //# sourceMappingURL=index.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/index.tsx", "../../../../scripts/build/transpile/react-shim.js"],
4
- "sourcesContent": ["export { default, DateRangeRecurrenceSelectorWithSchema, DSDateRangeSelector } from './DSDateRangeSelector';\nexport { CUSTOM_OPTION_VALUE } from './DSDateRangeSelector';\n", "import * as React from 'react';\nexport { React };\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,iCAAoF;AACpF,IAAAA,8BAAoC;",
4
+ "sourcesContent": ["export { default, DateRangeRecurrenceSelectorWithSchema, DSDateRangeSelector } from './DSDateRangeSelector.js';\nexport { CUSTOM_OPTION_VALUE } from './DSDateRangeSelector.js';\n", "import * as React from 'react';\nexport { React };\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,iCAAoF;AACpF,IAAAA,8BAAoC;",
6
6
  "names": ["import_DSDateRangeSelector"]
7
7
  }
@@ -18,6 +18,10 @@ var __copyProps = (to, from, except, desc) => {
18
18
  return to;
19
19
  };
20
20
  var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
+ // If the importer is in node compatibility mode or this is not an ESM
22
+ // file that has been converted to a CommonJS file using a Babel-
23
+ // compatible transform (i.e. "__esModule" has not been set), then set
24
+ // "default" to the CommonJS "module.exports" for node compatibility.
21
25
  isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
22
26
  mod
23
27
  ));
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["../../../src/options/dropdownPreselectedOptions.tsx", "../../../../../scripts/build/transpile/react-shim.js"],
4
4
  "sourcesContent": ["export const DropdownOptionsTypes = {\n TODAY: 'today',\n YESTERDAY: 'yesterday',\n LAST_7_DAYS: '7days',\n LAST_30_DAYS: '30days',\n THIS_MONTH: 'thismonth',\n LAST_MONTH: 'lastmonth',\n};\nexport const dropdownPreselectedOptions = [\n {\n label: 'Today',\n value: DropdownOptionsTypes.TODAY,\n },\n {\n label: 'Yesterday',\n value: DropdownOptionsTypes.YESTERDAY,\n },\n {\n label: 'Last 7 Days',\n value: DropdownOptionsTypes.LAST_7_DAYS,\n },\n {\n label: 'Last 30 days',\n value: DropdownOptionsTypes.LAST_30_DAYS,\n },\n {\n label: 'This month',\n value: DropdownOptionsTypes.THIS_MONTH,\n },\n {\n label: 'Last month',\n value: DropdownOptionsTypes.LAST_MONTH,\n },\n];\n\nexport const CUSTOM_OPTION_VALUE = 'custom-option-value';\n", "import * as React from 'react';\nexport { React };\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAhB,MAAM,uBAAuB;AAAA,EAClC,OAAO;AAAA,EACP,WAAW;AAAA,EACX,aAAa;AAAA,EACb,cAAc;AAAA,EACd,YAAY;AAAA,EACZ,YAAY;AACd;AACO,MAAM,6BAA6B;AAAA,EACxC;AAAA,IACE,OAAO;AAAA,IACP,OAAO,qBAAqB;AAAA,EAC9B;AAAA,EACA;AAAA,IACE,OAAO;AAAA,IACP,OAAO,qBAAqB;AAAA,EAC9B;AAAA,EACA;AAAA,IACE,OAAO;AAAA,IACP,OAAO,qBAAqB;AAAA,EAC9B;AAAA,EACA;AAAA,IACE,OAAO;AAAA,IACP,OAAO,qBAAqB;AAAA,EAC9B;AAAA,EACA;AAAA,IACE,OAAO;AAAA,IACP,OAAO,qBAAqB;AAAA,EAC9B;AAAA,EACA;AAAA,IACE,OAAO;AAAA,IACP,OAAO,qBAAqB;AAAA,EAC9B;AACF;AAEO,MAAM,sBAAsB;",
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAhB,MAAM,uBAAuB;AAAA,EAClC,OAAO;AAAA,EACP,WAAW;AAAA,EACX,aAAa;AAAA,EACb,cAAc;AAAA,EACd,YAAY;AAAA,EACZ,YAAY;AACd;AACO,MAAM,6BAA6B;AAAA,EACxC;AAAA,IACE,OAAO;AAAA,IACP,OAAO,qBAAqB;AAAA,EAC9B;AAAA,EACA;AAAA,IACE,OAAO;AAAA,IACP,OAAO,qBAAqB;AAAA,EAC9B;AAAA,EACA;AAAA,IACE,OAAO;AAAA,IACP,OAAO,qBAAqB;AAAA,EAC9B;AAAA,EACA;AAAA,IACE,OAAO;AAAA,IACP,OAAO,qBAAqB;AAAA,EAC9B;AAAA,EACA;AAAA,IACE,OAAO;AAAA,IACP,OAAO,qBAAqB;AAAA,EAC9B;AAAA,EACA;AAAA,IACE,OAAO;AAAA,IACP,OAAO,qBAAqB;AAAA,EAC9B;AACF;AAEO,MAAM,sBAAsB;",
6
6
  "names": []
7
7
  }
@@ -0,0 +1,7 @@
1
+ {
2
+ "type": "commonjs",
3
+ "sideEffects": [
4
+ "*.css",
5
+ "*.scss"
6
+ ]
7
+ }
@@ -1,14 +1,15 @@
1
1
  import * as React from "react";
2
2
  import { jsx } from "react/jsx-runtime";
3
- import { PropTypes, describe } from "@elliemae/ds-utilities";
3
+ import { useDeprecateComponent } from "@elliemae/ds-utilities";
4
+ import { PropTypes, describe } from "@elliemae/ds-props-helpers";
4
5
  import moment from "moment";
5
- import DateRangeSelectorImpl from "./components/DateRangeSelectorImpl";
6
+ import DateRangeSelectorImpl from "./components/DateRangeSelectorImpl.js";
6
7
  import {
7
8
  DropdownOptionsTypes,
8
9
  dropdownPreselectedOptions,
9
10
  CUSTOM_OPTION_VALUE
10
- } from "./options/dropdownPreselectedOptions";
11
- import CustomOptionRender from "./components/CustomOptionRender/CustomOptionRender";
11
+ } from "./options/dropdownPreselectedOptions.js";
12
+ import CustomOptionRender from "./components/CustomOptionRender/CustomOptionRender.js";
12
13
  const DSDateRangeSelector = ({
13
14
  containerProps = {},
14
15
  className = "",
@@ -22,23 +23,26 @@ const DSDateRangeSelector = ({
22
23
  displayFormatDay = "D",
23
24
  disableCustomOption = false,
24
25
  hasError = false
25
- }) => /* @__PURE__ */ jsx(
26
- DateRangeSelectorImpl,
27
- {
28
- className,
29
- containerProps,
30
- customOptionRender,
31
- disableCustomOption,
32
- displayFormatDay,
33
- dropdownPreselectedOptions: preselectedOptions,
34
- endDate,
35
- onChange,
36
- placeholder,
37
- startDate,
38
- value,
39
- hasError
40
- }
41
- );
26
+ }) => {
27
+ useDeprecateComponent({ componentName: "ds-date-range-selector", version: "TBD Date: 2023 Q1" });
28
+ return /* @__PURE__ */ jsx(
29
+ DateRangeSelectorImpl,
30
+ {
31
+ className,
32
+ containerProps,
33
+ customOptionRender,
34
+ disableCustomOption,
35
+ displayFormatDay,
36
+ dropdownPreselectedOptions: preselectedOptions,
37
+ endDate,
38
+ onChange,
39
+ placeholder,
40
+ startDate,
41
+ value,
42
+ hasError
43
+ }
44
+ );
45
+ };
42
46
  const dateRangeRecurrenceSelectorProps = {
43
47
  containerProps: PropTypes.object.description("Set of properties attached to the main container"),
44
48
  className: PropTypes.string.description("html class attribute"),
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../scripts/build/transpile/react-shim.js", "../../src/DSDateRangeSelector.tsx"],
4
- "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React from 'react';\nimport { PropTypes, describe } from '@elliemae/ds-utilities';\nimport moment from 'moment';\nimport DateRangeSelectorImpl from './components/DateRangeSelectorImpl';\nimport {\n DropdownOptionsTypes,\n dropdownPreselectedOptions,\n CUSTOM_OPTION_VALUE,\n} from './options/dropdownPreselectedOptions';\nimport CustomOptionRender from './components/CustomOptionRender/CustomOptionRender';\n\nconst DSDateRangeSelector = ({\n containerProps = {},\n className = '',\n preselectedOptions = dropdownPreselectedOptions,\n onChange = () => null,\n placeholder = 'Select Range',\n value = null,\n customOptionRender = CustomOptionRender,\n startDate = null,\n endDate = null,\n displayFormatDay = 'D',\n disableCustomOption = false,\n hasError = false,\n}) => (\n <DateRangeSelectorImpl\n className={className}\n containerProps={containerProps}\n customOptionRender={customOptionRender}\n disableCustomOption={disableCustomOption}\n displayFormatDay={displayFormatDay}\n dropdownPreselectedOptions={preselectedOptions}\n endDate={endDate}\n onChange={onChange}\n placeholder={placeholder}\n startDate={startDate}\n value={value}\n hasError={hasError}\n />\n);\n\nexport { CUSTOM_OPTION_VALUE, dropdownPreselectedOptions, DropdownOptionsTypes };\n\nconst dateRangeRecurrenceSelectorProps = {\n containerProps: PropTypes.object.description('Set of properties attached to the main container'),\n className: PropTypes.string.description('html class attribute'),\n preselectedOptions: PropTypes.arrayOf(\n PropTypes.shape({\n label: PropTypes.string,\n value: PropTypes.string,\n }),\n ).description('options to display in dropdown menu'),\n onChange: PropTypes.func.description('function executed when selection changes'),\n placeholder: PropTypes.string.description('inputs placeholder').defaultValue('Select Range'),\n value: PropTypes.oneOf([PropTypes.string, PropTypes.number]).description('selected value'),\n customOptionRender: PropTypes.element.description('custom renderer for options'),\n startDate: PropTypes.instanceOf(Date, moment).description('moment object of start date'),\n endDate: PropTypes.instanceOf(Date, moment).description('moment object of end date'),\n displayFormatDay: PropTypes.string.description('format to display date').defaultValue('D'),\n disableCustomOption: PropTypes.bool.description('disables custom options').defaultValue(false),\n};\n\nDSDateRangeSelector.propTypes = dateRangeRecurrenceSelectorProps;\nDSDateRangeSelector.displayName = 'DSDateRangeSelector';\nconst DateRangeRecurrenceSelectorWithSchema = describe(DSDateRangeSelector);\nDateRangeRecurrenceSelectorWithSchema.propTypes = dateRangeRecurrenceSelectorProps;\n\nexport { DateRangeRecurrenceSelectorWithSchema, DSDateRangeSelector };\nexport default DSDateRangeSelector;\n"],
5
- "mappings": "AAAA,YAAY,WAAW;ACyBrB;AAxBF,SAAS,WAAW,gBAAgB;AAC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EAAE,aAAa,GAAG;AAAA,EACzF,qBAAqB,UAAU,KAAK,YAAY,yBAAyB,EAAE,aAAa,KAAK;AAC/F;AAEA,oBAAoB,YAAY;AAChC,oBAAoB,cAAc;AAClC,MAAM,wCAAwC,SAAS,mBAAmB;AAC1E,sCAAsC,YAAY;AAGlD,IAAO,8BAAQ;",
4
+ "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React from 'react';\nimport { useDeprecateComponent } from '@elliemae/ds-utilities';\nimport { PropTypes, describe } from '@elliemae/ds-props-helpers';\nimport moment from 'moment';\nimport DateRangeSelectorImpl from './components/DateRangeSelectorImpl.js';\nimport {\n DropdownOptionsTypes,\n dropdownPreselectedOptions,\n CUSTOM_OPTION_VALUE,\n} from './options/dropdownPreselectedOptions.js';\nimport CustomOptionRender from './components/CustomOptionRender/CustomOptionRender.js';\n\nconst DSDateRangeSelector = ({\n containerProps = {},\n className = '',\n preselectedOptions = dropdownPreselectedOptions,\n onChange = () => null,\n placeholder = 'Select Range',\n value = null,\n customOptionRender = CustomOptionRender,\n startDate = null,\n endDate = null,\n displayFormatDay = 'D',\n disableCustomOption = false,\n hasError = false,\n}) => {\n useDeprecateComponent({ componentName: 'ds-date-range-selector', version: 'TBD Date: 2023 Q1' });\n\n return (\n <DateRangeSelectorImpl\n className={className}\n containerProps={containerProps}\n customOptionRender={customOptionRender}\n disableCustomOption={disableCustomOption}\n displayFormatDay={displayFormatDay}\n dropdownPreselectedOptions={preselectedOptions}\n endDate={endDate}\n onChange={onChange}\n placeholder={placeholder}\n startDate={startDate}\n value={value}\n hasError={hasError}\n />\n );\n};\n\nexport { CUSTOM_OPTION_VALUE, dropdownPreselectedOptions, DropdownOptionsTypes };\n\nconst dateRangeRecurrenceSelectorProps = {\n containerProps: PropTypes.object.description('Set of properties attached to the main container'),\n className: PropTypes.string.description('html class attribute'),\n preselectedOptions: PropTypes.arrayOf(\n PropTypes.shape({\n label: PropTypes.string,\n value: PropTypes.string,\n }),\n ).description('options to display in dropdown menu'),\n onChange: PropTypes.func.description('function executed when selection changes'),\n placeholder: PropTypes.string.description('inputs placeholder').defaultValue('Select Range'),\n value: PropTypes.oneOf([PropTypes.string, PropTypes.number]).description('selected value'),\n customOptionRender: PropTypes.element.description('custom renderer for options'),\n startDate: PropTypes.instanceOf(Date, moment).description('moment object of start date'),\n endDate: PropTypes.instanceOf(Date, moment).description('moment object of end date'),\n displayFormatDay: PropTypes.string.description('format to display date').defaultValue('D'),\n disableCustomOption: PropTypes.bool.description('disables custom options').defaultValue(false),\n};\n\nDSDateRangeSelector.propTypes = dateRangeRecurrenceSelectorProps;\nDSDateRangeSelector.displayName = 'DSDateRangeSelector';\nconst DateRangeRecurrenceSelectorWithSchema = describe(DSDateRangeSelector);\nDateRangeRecurrenceSelectorWithSchema.propTypes = dateRangeRecurrenceSelectorProps;\n\nexport { DateRangeRecurrenceSelectorWithSchema, DSDateRangeSelector };\nexport default DSDateRangeSelector;\n"],
5
+ "mappings": "AAAA,YAAY,WAAW;AC6BnB;AA5BJ,SAAS,6BAA6B;AACtC,SAAS,WAAW,gBAAgB;AACpC,OAAO,YAAY;AACnB,OAAO,2BAA2B;AAClC;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,OACK;AACP,OAAO,wBAAwB;AAE/B,MAAM,sBAAsB,CAAC;AAAA,EAC3B,iBAAiB,CAAC;AAAA,EAClB,YAAY;AAAA,EACZ,qBAAqB;AAAA,EACrB,WAAW,MAAM;AAAA,EACjB,cAAc;AAAA,EACd,QAAQ;AAAA,EACR,qBAAqB;AAAA,EACrB,YAAY;AAAA,EACZ,UAAU;AAAA,EACV,mBAAmB;AAAA,EACnB,sBAAsB;AAAA,EACtB,WAAW;AACb,MAAM;AACJ,wBAAsB,EAAE,eAAe,0BAA0B,SAAS,oBAAoB,CAAC;AAE/F,SACE;AAAA,IAAC;AAAA;AAAA,MACC;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA,4BAA4B;AAAA,MAC5B;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA;AAAA,EACF;AAEJ;AAIA,MAAM,mCAAmC;AAAA,EACvC,gBAAgB,UAAU,OAAO,YAAY,kDAAkD;AAAA,EAC/F,WAAW,UAAU,OAAO,YAAY,sBAAsB;AAAA,EAC9D,oBAAoB,UAAU;AAAA,IAC5B,UAAU,MAAM;AAAA,MACd,OAAO,UAAU;AAAA,MACjB,OAAO,UAAU;AAAA,IACnB,CAAC;AAAA,EACH,EAAE,YAAY,qCAAqC;AAAA,EACnD,UAAU,UAAU,KAAK,YAAY,0CAA0C;AAAA,EAC/E,aAAa,UAAU,OAAO,YAAY,oBAAoB,EAAE,aAAa,cAAc;AAAA,EAC3F,OAAO,UAAU,MAAM,CAAC,UAAU,QAAQ,UAAU,MAAM,CAAC,EAAE,YAAY,gBAAgB;AAAA,EACzF,oBAAoB,UAAU,QAAQ,YAAY,6BAA6B;AAAA,EAC/E,WAAW,UAAU,WAAW,MAAM,MAAM,EAAE,YAAY,6BAA6B;AAAA,EACvF,SAAS,UAAU,WAAW,MAAM,MAAM,EAAE,YAAY,2BAA2B;AAAA,EACnF,kBAAkB,UAAU,OAAO,YAAY,wBAAwB,EAAE,aAAa,GAAG;AAAA,EACzF,qBAAqB,UAAU,KAAK,YAAY,yBAAyB,EAAE,aAAa,KAAK;AAC/F;AAEA,oBAAoB,YAAY;AAChC,oBAAoB,cAAc;AAClC,MAAM,wCAAwC,SAAS,mBAAmB;AAC1E,sCAAsC,YAAY;AAGlD,IAAO,8BAAQ;",
6
6
  "names": []
7
7
  }
@@ -3,14 +3,14 @@ import { jsx, jsxs } from "react/jsx-runtime";
3
3
  import { Component } from "react";
4
4
  import moment from "moment";
5
5
  import { components } from "react-select";
6
- import "react-dates/initialize";
6
+ import "react-dates/initialize.js";
7
7
  import { DayPickerRangeController } from "react-dates";
8
8
  import { convertPropToCssClassName } from "@elliemae/ds-classnames";
9
9
  import { DSComboBox } from "@elliemae/ds-form";
10
10
  import DSPopper from "@elliemae/ds-popper";
11
11
  import { DatePickerDay, DatePickerNavigation } from "@elliemae/ds-date-picker";
12
12
  import { ChevronLeft } from "@elliemae/ds-icons";
13
- import { CUSTOM_OPTION_VALUE } from "../options/dropdownPreselectedOptions";
13
+ import { CUSTOM_OPTION_VALUE } from "../options/dropdownPreselectedOptions.js";
14
14
  const START_DATE = "startDate";
15
15
  const END_DATE = "endDate";
16
16
  const advanceOption = {
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../../src/components/DateRangeSelectorImpl.tsx"],
4
- "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable react/prop-types */\nimport React, { Component } from 'react';\nimport moment from 'moment';\nimport { components } from 'react-select';\nimport 'react-dates/initialize';\nimport { DayPickerRangeController } from 'react-dates';\nimport { convertPropToCssClassName } from '@elliemae/ds-classnames';\nimport { DSComboBox } from '@elliemae/ds-form';\nimport DSPopper from '@elliemae/ds-popper';\nimport { DatePickerDay, DatePickerNavigation } from '@elliemae/ds-date-picker';\nimport { ChevronLeft } from '@elliemae/ds-icons';\nimport { CUSTOM_OPTION_VALUE } from '../options/dropdownPreselectedOptions';\n\nconst START_DATE = 'startDate';\nconst END_DATE = 'endDate';\n\nconst advanceOption = {\n label: 'Custom',\n value: CUSTOM_OPTION_VALUE,\n isAdvance: true,\n};\nconst { cssClassName, classNameElement, classNameBlock } = convertPropToCssClassName('date-range-selector');\n\nconst { classNameElement: pickerNameElement } = convertPropToCssClassName('datepicker');\n\nclass DateTimeRecurenceSelectorImpl extends Component {\n constructor(props) {\n super(props);\n\n const customRange = {\n startDate: props.startDate ? moment(props.startDate) : moment(),\n endDate: props.endDate ? moment(props.endDate) : moment(),\n };\n this.state = {\n openModal: false,\n selected: props.value,\n focusedInput: START_DATE,\n customRange,\n };\n\n this.onDatesChange = this.onDatesChange.bind(this);\n this.onFocusChange = this.onFocusChange.bind(this);\n\n const { customOptionRender: CustomOptionRender } = props;\n advanceOption.label = <CustomOptionRender customRange={customRange} />;\n }\n\n onChange = () => {\n const { onChange } = this.props;\n const { customRange, selected } = this.state;\n onChange(selected, customRange);\n };\n\n onChangeDropdown = (value) => {\n const { dropdownPreselectedOptions } = this.props;\n const selected = dropdownPreselectedOptions.find((op) => op.value === value);\n const { onChange } = this.props;\n if (!selected) {\n this.setState({ selected: value });\n this.handleOpenModal();\n } else if (selected) {\n onChange(value);\n this.setState({ selected: value, openModal: false });\n }\n };\n\n onDatesChange({ startDate, endDate }) {\n this.setState(\n {\n customRange: {\n startDate,\n endDate,\n },\n },\n () => {\n this.onChange();\n },\n );\n }\n\n onFocusChange() {\n this.setState(({ focusedInput }) => ({\n focusedInput: focusedInput === START_DATE ? END_DATE : START_DATE,\n }));\n }\n\n handleConfirm = () => {\n const { customOptionRender: CustomOptionRender } = this.props;\n const { customRange } = this.state;\n advanceOption.label = <CustomOptionRender customRange={customRange} />;\n this.onChange();\n this.handleCloseModal();\n };\n\n handleOpenModal = () => this.setState({ openModal: true });\n\n handleCloseModal = () => this.setState({ openModal: false });\n\n render() {\n const {\n placeholder,\n dropdownPreselectedOptions,\n displayFormatDay,\n className,\n disableCustomOption,\n containerProps,\n hasError,\n } = this.props;\n const {\n selected,\n openModal,\n focusedInput,\n customRange: { startDate, endDate },\n } = this.state;\n\n let options = [...dropdownPreselectedOptions];\n if (!disableCustomOption) {\n options = [...options, advanceOption];\n // eslint-disable-next-line max-lines\n }\n\n return (\n <div {...containerProps} className={`${cssClassName} ${className}`}>\n <div className={`${classNameBlock('container-selector')}`}>\n <DSComboBox\n className={`${classNameElement('dropdown-field-selector')}`}\n components={{\n Option: (props) => <components.Option {...props} />,\n IndicatorSeparator: () => null,\n }}\n onChange={this.onChangeDropdown}\n onKeyDown={this.onKeyDown}\n options={options}\n placeholder={placeholder}\n value={selected}\n hasError={hasError}\n keepTypedValue={false} // TEMPORARY FIX\n />\n </div>\n <DSPopper\n contentComponent={\n <div className={classNameBlock('wrap-day-picker')}>\n <DayPickerRangeController\n endDate={endDate}\n focusedInput={focusedInput}\n hideKeyboardShortcutsPanel\n navNext={<DatePickerNavigation className={pickerNameElement('navigation-next')} />}\n navPrev={<DatePickerNavigation className={pickerNameElement('navigation-prev')} icon={ChevronLeft} />}\n onDatesChange={this.onDatesChange}\n onFocusChange={this.onFocusChange}\n onOutsideClick={this.handleConfirm}\n renderDayContents={(date) => (\n <DatePickerDay className={pickerNameElement('day-contents')} date={date.format(displayFormatDay)} />\n )}\n startDate={startDate}\n />\n </div>\n }\n isOpen={openModal}\n showArrow={false}\n triggerComponent={<div />}\n />\n </div>\n );\n }\n}\n\nexport default DateTimeRecurenceSelectorImpl;\n"],
4
+ "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable react/prop-types */\nimport React, { Component } from 'react';\nimport moment from 'moment';\nimport { components } from 'react-select';\nimport 'react-dates/initialize.js';\nimport { DayPickerRangeController } from 'react-dates';\nimport { convertPropToCssClassName } from '@elliemae/ds-classnames';\nimport { DSComboBox } from '@elliemae/ds-form';\nimport DSPopper from '@elliemae/ds-popper';\nimport { DatePickerDay, DatePickerNavigation } from '@elliemae/ds-date-picker';\nimport { ChevronLeft } from '@elliemae/ds-icons';\nimport { CUSTOM_OPTION_VALUE } from '../options/dropdownPreselectedOptions.js';\n\nconst START_DATE = 'startDate';\nconst END_DATE = 'endDate';\n\nconst advanceOption = {\n label: 'Custom',\n value: CUSTOM_OPTION_VALUE,\n isAdvance: true,\n};\nconst { cssClassName, classNameElement, classNameBlock } = convertPropToCssClassName('date-range-selector');\n\nconst { classNameElement: pickerNameElement } = convertPropToCssClassName('datepicker');\n\nclass DateTimeRecurenceSelectorImpl extends Component {\n constructor(props) {\n super(props);\n\n const customRange = {\n startDate: props.startDate ? moment(props.startDate) : moment(),\n endDate: props.endDate ? moment(props.endDate) : moment(),\n };\n this.state = {\n openModal: false,\n selected: props.value,\n focusedInput: START_DATE,\n customRange,\n };\n\n this.onDatesChange = this.onDatesChange.bind(this);\n this.onFocusChange = this.onFocusChange.bind(this);\n\n const { customOptionRender: CustomOptionRender } = props;\n advanceOption.label = <CustomOptionRender customRange={customRange} />;\n }\n\n onChange = () => {\n const { onChange } = this.props;\n const { customRange, selected } = this.state;\n onChange(selected, customRange);\n };\n\n onChangeDropdown = (value) => {\n const { dropdownPreselectedOptions } = this.props;\n const selected = dropdownPreselectedOptions.find((op) => op.value === value);\n const { onChange } = this.props;\n if (!selected) {\n this.setState({ selected: value });\n this.handleOpenModal();\n } else if (selected) {\n onChange(value);\n this.setState({ selected: value, openModal: false });\n }\n };\n\n onDatesChange({ startDate, endDate }) {\n this.setState(\n {\n customRange: {\n startDate,\n endDate,\n },\n },\n () => {\n this.onChange();\n },\n );\n }\n\n onFocusChange() {\n this.setState(({ focusedInput }) => ({\n focusedInput: focusedInput === START_DATE ? END_DATE : START_DATE,\n }));\n }\n\n handleConfirm = () => {\n const { customOptionRender: CustomOptionRender } = this.props;\n const { customRange } = this.state;\n advanceOption.label = <CustomOptionRender customRange={customRange} />;\n this.onChange();\n this.handleCloseModal();\n };\n\n handleOpenModal = () => this.setState({ openModal: true });\n\n handleCloseModal = () => this.setState({ openModal: false });\n\n render() {\n const {\n placeholder,\n dropdownPreselectedOptions,\n displayFormatDay,\n className,\n disableCustomOption,\n containerProps,\n hasError,\n } = this.props;\n const {\n selected,\n openModal,\n focusedInput,\n customRange: { startDate, endDate },\n } = this.state;\n\n let options = [...dropdownPreselectedOptions];\n if (!disableCustomOption) {\n options = [...options, advanceOption];\n // eslint-disable-next-line max-lines\n }\n\n return (\n <div {...containerProps} className={`${cssClassName} ${className}`}>\n <div className={`${classNameBlock('container-selector')}`}>\n <DSComboBox\n className={`${classNameElement('dropdown-field-selector')}`}\n components={{\n Option: (props) => <components.Option {...props} />,\n IndicatorSeparator: () => null,\n }}\n onChange={this.onChangeDropdown}\n onKeyDown={this.onKeyDown}\n options={options}\n placeholder={placeholder}\n value={selected}\n hasError={hasError}\n keepTypedValue={false} // TEMPORARY FIX\n />\n </div>\n <DSPopper\n contentComponent={\n <div className={classNameBlock('wrap-day-picker')}>\n <DayPickerRangeController\n endDate={endDate}\n focusedInput={focusedInput}\n hideKeyboardShortcutsPanel\n navNext={<DatePickerNavigation className={pickerNameElement('navigation-next')} />}\n navPrev={<DatePickerNavigation className={pickerNameElement('navigation-prev')} icon={ChevronLeft} />}\n onDatesChange={this.onDatesChange}\n onFocusChange={this.onFocusChange}\n onOutsideClick={this.handleConfirm}\n renderDayContents={(date) => (\n <DatePickerDay className={pickerNameElement('day-contents')} date={date.format(displayFormatDay)} />\n )}\n startDate={startDate}\n />\n </div>\n }\n isOpen={openModal}\n showArrow={false}\n triggerComponent={<div />}\n />\n </div>\n );\n }\n}\n\nexport default DateTimeRecurenceSelectorImpl;\n"],
5
5
  "mappings": "AAAA,YAAY,WAAW;AC4CG,cA8EpB,YA9EoB;AA3C1B,SAAgB,iBAAiB;AACjC,OAAO,YAAY;AACnB,SAAS,kBAAkB;AAC3B,OAAO;AACP,SAAS,gCAAgC;AACzC,SAAS,iCAAiC;AAC1C,SAAS,kBAAkB;AAC3B,OAAO,cAAc;AACrB,SAAS,eAAe,4BAA4B;AACpD,SAAS,mBAAmB;AAC5B,SAAS,2BAA2B;AAEpC,MAAM,aAAa;AACnB,MAAM,WAAW;AAEjB,MAAM,gBAAgB;AAAA,EACpB,OAAO;AAAA,EACP,OAAO;AAAA,EACP,WAAW;AACb;AACA,MAAM,EAAE,cAAc,kBAAkB,eAAe,IAAI,0BAA0B,qBAAqB;AAE1G,MAAM,EAAE,kBAAkB,kBAAkB,IAAI,0BAA0B,YAAY;AAEtF,MAAM,sCAAsC,UAAU;AAAA,EACpD,YAAY,OAAO;AACjB,UAAM,KAAK;AAoBb,oBAAW,MAAM;AACf,YAAM,EAAE,SAAS,IAAI,KAAK;AAC1B,YAAM,EAAE,aAAa,SAAS,IAAI,KAAK;AACvC,eAAS,UAAU,WAAW;AAA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AChF,SAAS,oBAAC,wBAAqB,WAAW,kBAAkB,iBAAiB,GAAG,MAAM,aAAa;AAAA,cACnG,eAAe,KAAK;AAAA,cACpB,eAAe,KAAK;AAAA,cACpB,gBAAgB,KAAK;AAAA,cACrB,mBAAmB,CAAC,SAClB,oBAAC,iBAAc,WAAW,kBAAkB,cAAc,GAAG,MAAM,KAAK,OAAO,gBAAgB,GAAG;AAAA,cAEpG;AAAA;AAAA,UACF,GACF;AAAA,UAEF,QAAQ;AAAA,UACR,WAAW;AAAA,UACX,kBAAkB,oBAAC,SAAI;AAAA;AAAA,MACzB;AAAA,OACF;AAAA,EAEJ;AACF;AAEA,IAAO,gCAAQ;",
6
6
  "names": []
7
7
  }
package/dist/esm/index.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import * as React from "react";
2
- import { default as default2, DateRangeRecurrenceSelectorWithSchema, DSDateRangeSelector } from "./DSDateRangeSelector";
3
- import { CUSTOM_OPTION_VALUE } from "./DSDateRangeSelector";
2
+ import { default as default2, DateRangeRecurrenceSelectorWithSchema, DSDateRangeSelector } from "./DSDateRangeSelector.js";
3
+ import { CUSTOM_OPTION_VALUE } from "./DSDateRangeSelector.js";
4
4
  export {
5
5
  CUSTOM_OPTION_VALUE,
6
6
  DSDateRangeSelector,
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../scripts/build/transpile/react-shim.js", "../../src/index.tsx"],
4
- "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "export { default, DateRangeRecurrenceSelectorWithSchema, DSDateRangeSelector } from './DSDateRangeSelector';\nexport { CUSTOM_OPTION_VALUE } from './DSDateRangeSelector';\n"],
4
+ "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "export { default, DateRangeRecurrenceSelectorWithSchema, DSDateRangeSelector } from './DSDateRangeSelector.js';\nexport { CUSTOM_OPTION_VALUE } from './DSDateRangeSelector.js';\n"],
5
5
  "mappings": "AAAA,YAAY,WAAW;ACAvB,SAAS,WAAAA,UAAS,uCAAuC,2BAA2B;AACpF,SAAS,2BAA2B;",
6
6
  "names": ["default"]
7
7
  }
@@ -0,0 +1,7 @@
1
+ {
2
+ "type": "module",
3
+ "sideEffects": [
4
+ "*.css",
5
+ "*.scss"
6
+ ]
7
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@elliemae/ds-date-range-selector",
3
- "version": "3.16.0-next.2",
3
+ "version": "3.16.0-next.20",
4
4
  "license": "MIT",
5
5
  "description": "ICE MT - Dimsum - Date Range Selector",
6
6
  "files": [
@@ -51,15 +51,16 @@
51
51
  "indent": 4
52
52
  },
53
53
  "dependencies": {
54
- "moment": "~2.29.3",
54
+ "moment": "~2.29.4",
55
55
  "react-dates": "~21.8.0",
56
56
  "react-select": "4.3.1",
57
- "@elliemae/ds-classnames": "3.16.0-next.2",
58
- "@elliemae/ds-date-picker": "3.16.0-next.2",
59
- "@elliemae/ds-form": "3.16.0-next.2",
60
- "@elliemae/ds-icons": "3.16.0-next.2",
61
- "@elliemae/ds-popper": "3.16.0-next.2",
62
- "@elliemae/ds-utilities": "3.16.0-next.2"
57
+ "@elliemae/ds-classnames": "3.16.0-next.20",
58
+ "@elliemae/ds-date-picker": "3.16.0-next.20",
59
+ "@elliemae/ds-form": "3.16.0-next.20",
60
+ "@elliemae/ds-icons": "3.16.0-next.20",
61
+ "@elliemae/ds-popper": "3.16.0-next.20",
62
+ "@elliemae/ds-props-helpers": "3.16.0-next.20",
63
+ "@elliemae/ds-utilities": "3.16.0-next.20"
63
64
  },
64
65
  "peerDependencies": {
65
66
  "lodash": "^4.17.21",
@@ -74,10 +75,10 @@
74
75
  "dev": "cross-env NODE_ENV=development node ../../scripts/build/build.mjs --watch",
75
76
  "test": "node ../../scripts/testing/test.mjs",
76
77
  "lint": "node ../../scripts/lint.mjs",
77
- "eslint:fix": "eslint --ext='.js,.jsx,.test.js,.ts,.tsx' --fix --config='../../.eslintrc.js' src/",
78
- "dts": "node ../../scripts/dts.mjs",
78
+ "eslint:fix": "exit 0",
79
+ "dts": "exit 0",
79
80
  "build": "cross-env NODE_ENV=production node ../../scripts/build/build.mjs",
80
- "dev:build": "pnpm --filter {.}... build && pnpm --filter {.}... dts",
81
+ "dev:build": "pnpm --filter {.}... build",
81
82
  "dev:install": "pnpm --filter {.}... i --no-lockfile && pnpm run dev:build",
82
83
  "checkDeps": "npx -yes ../ds-codemods check-missing-packages --projectFolderPath=\"./\" --ignorePackagesGlobPattern=\"\" --ignoreFilesGlobPattern=\"**/test-ables/*,**/tests/*\""
83
84
  }
@@ -1,64 +0,0 @@
1
- import { DropdownOptionsTypes, dropdownPreselectedOptions, CUSTOM_OPTION_VALUE } from './options/dropdownPreselectedOptions';
2
- declare const DSDateRangeSelector: {
3
- ({ containerProps, className, preselectedOptions, onChange, placeholder, value, customOptionRender, startDate, endDate, displayFormatDay, disableCustomOption, hasError, }: {
4
- containerProps?: {} | undefined;
5
- className?: string | undefined;
6
- preselectedOptions?: {
7
- label: string;
8
- value: string;
9
- }[] | undefined;
10
- onChange?: (() => null) | undefined;
11
- placeholder?: string | undefined;
12
- value?: null | undefined;
13
- customOptionRender?: (({ customRange: { startDate, endDate } }: {
14
- customRange: {
15
- startDate: any;
16
- endDate: any;
17
- };
18
- }) => JSX.Element) | undefined;
19
- startDate?: null | undefined;
20
- endDate?: null | undefined;
21
- displayFormatDay?: string | undefined;
22
- disableCustomOption?: boolean | undefined;
23
- hasError?: boolean | undefined;
24
- }): JSX.Element;
25
- propTypes: {
26
- containerProps: import("@elliemae/ds-utilities/dist/types/props-helpers/propTypes/types").ReactDescT;
27
- className: import("@elliemae/ds-utilities/dist/types/props-helpers/propTypes/types").ReactDescT;
28
- preselectedOptions: import("@elliemae/ds-utilities/dist/types/props-helpers/propTypes/types").ReactDescT;
29
- onChange: import("@elliemae/ds-utilities/dist/types/props-helpers/propTypes/types").ReactDescT;
30
- placeholder: import("@elliemae/ds-utilities/dist/types/props-helpers/propTypes/types").ReactDescT;
31
- value: import("@elliemae/ds-utilities/dist/types/props-helpers/propTypes/types").ReactDescT;
32
- customOptionRender: import("@elliemae/ds-utilities/dist/types/props-helpers/propTypes/types").ReactDescT;
33
- startDate: import("@elliemae/ds-utilities/dist/types/props-helpers/propTypes/types").ReactDescT;
34
- endDate: import("@elliemae/ds-utilities/dist/types/props-helpers/propTypes/types").ReactDescT;
35
- displayFormatDay: import("@elliemae/ds-utilities/dist/types/props-helpers/propTypes/types").ReactDescT;
36
- disableCustomOption: import("@elliemae/ds-utilities/dist/types/props-helpers/propTypes/types").ReactDescT;
37
- };
38
- displayName: string;
39
- };
40
- export { CUSTOM_OPTION_VALUE, dropdownPreselectedOptions, DropdownOptionsTypes };
41
- declare const DateRangeRecurrenceSelectorWithSchema: import("@elliemae/ds-utilities/dist/types/props-helpers/propTypes/types").DocumentedReactComponent<{
42
- containerProps?: {} | undefined;
43
- className?: string | undefined;
44
- preselectedOptions?: {
45
- label: string;
46
- value: string;
47
- }[] | undefined;
48
- onChange?: (() => null) | undefined;
49
- placeholder?: string | undefined;
50
- value?: null | undefined;
51
- customOptionRender?: (({ customRange: { startDate, endDate } }: {
52
- customRange: {
53
- startDate: any;
54
- endDate: any;
55
- };
56
- }) => JSX.Element) | undefined;
57
- startDate?: null | undefined;
58
- endDate?: null | undefined;
59
- displayFormatDay?: string | undefined;
60
- disableCustomOption?: boolean | undefined;
61
- hasError?: boolean | undefined;
62
- }>;
63
- export { DateRangeRecurrenceSelectorWithSchema, DSDateRangeSelector };
64
- export default DSDateRangeSelector;
@@ -1,17 +0,0 @@
1
- /**
2
- * @param root0
3
- * @param root0.customRange
4
- * @param root0.customRange.startDate
5
- * @param root0.customRange.endDate
6
- * @customRange {
7
- endDate
8
- startDate
9
- }
10
- */
11
- declare const CustomOptionRender: ({ customRange: { startDate, endDate } }: {
12
- customRange: {
13
- startDate: any;
14
- endDate: any;
15
- };
16
- }) => JSX.Element;
17
- export default CustomOptionRender;
@@ -1,17 +0,0 @@
1
- import { Component } from 'react';
2
- import 'react-dates/initialize';
3
- declare class DateTimeRecurenceSelectorImpl extends Component {
4
- constructor(props: any);
5
- onChange: () => void;
6
- onChangeDropdown: (value: any) => void;
7
- onDatesChange({ startDate, endDate }: {
8
- startDate: any;
9
- endDate: any;
10
- }): void;
11
- onFocusChange(): void;
12
- handleConfirm: () => void;
13
- handleOpenModal: () => void;
14
- handleCloseModal: () => void;
15
- render(): JSX.Element;
16
- }
17
- export default DateTimeRecurenceSelectorImpl;
@@ -1,2 +0,0 @@
1
- export { default, DateRangeRecurrenceSelectorWithSchema, DSDateRangeSelector } from './DSDateRangeSelector';
2
- export { CUSTOM_OPTION_VALUE } from './DSDateRangeSelector';
@@ -1,13 +0,0 @@
1
- export declare const DropdownOptionsTypes: {
2
- TODAY: string;
3
- YESTERDAY: string;
4
- LAST_7_DAYS: string;
5
- LAST_30_DAYS: string;
6
- THIS_MONTH: string;
7
- LAST_MONTH: string;
8
- };
9
- export declare const dropdownPreselectedOptions: {
10
- label: string;
11
- value: string;
12
- }[];
13
- export declare const CUSTOM_OPTION_VALUE = "custom-option-value";