@elliemae/ds-date-range-selector 3.0.0-next.4 → 3.0.0-next.43
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/DSDateRangeSelector.js +1 -0
- package/dist/cjs/DSDateRangeSelector.js.map +2 -2
- package/dist/cjs/components/CustomOptionRender/CustomOptionRender.js.map +1 -1
- package/dist/cjs/components/DateRangeSelectorImpl.js.map +1 -1
- package/dist/cjs/index.js +1 -0
- package/dist/cjs/index.js.map +2 -2
- package/dist/cjs/options/dropdownPreselectedOptions.js.map +1 -1
- package/dist/esm/DSDateRangeSelector.js +1 -0
- package/dist/esm/DSDateRangeSelector.js.map +2 -2
- package/dist/esm/components/CustomOptionRender/CustomOptionRender.js.map +1 -1
- package/dist/esm/components/DateRangeSelectorImpl.js.map +1 -1
- package/dist/esm/index.js +3 -1
- package/dist/esm/index.js.map +2 -2
- package/dist/esm/options/dropdownPreselectedOptions.js.map +1 -1
- package/package.json +6 -6
|
@@ -28,6 +28,7 @@ var __toCommonJS = /* @__PURE__ */ ((cache) => {
|
|
|
28
28
|
var DSDateRangeSelector_exports = {};
|
|
29
29
|
__export(DSDateRangeSelector_exports, {
|
|
30
30
|
CUSTOM_OPTION_VALUE: () => import_dropdownPreselectedOptions.CUSTOM_OPTION_VALUE,
|
|
31
|
+
DSDateRangeSelector: () => DSDateRangeSelector,
|
|
31
32
|
DateRangeRecurrenceSelectorWithSchema: () => DateRangeRecurrenceSelectorWithSchema,
|
|
32
33
|
DropdownOptionsTypes: () => import_dropdownPreselectedOptions.DropdownOptionsTypes,
|
|
33
34
|
default: () => DSDateRangeSelector_default,
|
|
@@ -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 'react-desc';\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}) => (\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 />\n);\n\nexport {\n CUSTOM_OPTION_VALUE,\n dropdownPreselectedOptions,\n DropdownOptionsTypes,\n};\n\nconst dateRangeRecurrenceSelectorProps = {\n containerProps: PropTypes.object.description(\n 'Set of properties attached to the main container',\n ),\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(\n 'function executed when selection changes',\n ),\n placeholder: PropTypes.string\n .description('inputs placeholder')\n .defaultValue('Select Range'),\n value: PropTypes.oneOf([PropTypes.string, PropTypes.number]).description(\n 'selected value',\n ),\n customOptionRender: PropTypes.element.description(\n 'custom renderer for options',\n ),\n startDate: PropTypes.instanceOf(Date, moment).description(\n 'moment object of start date',\n ),\n endDate: PropTypes.instanceOf(Date, moment).description(\n 'moment object of end date',\n ),\n displayFormatDay: PropTypes.string\n .description('format to display date')\n .defaultValue('D'),\n disableCustomOption: PropTypes.bool\n .description('disables custom options')\n .defaultValue(false),\n};\n\nDSDateRangeSelector.propTypes = dateRangeRecurrenceSelectorProps;\n\nconst DateRangeRecurrenceSelectorWithSchema = describe(DSDateRangeSelector);\nDateRangeRecurrenceSelectorWithSchema.propTypes = dateRangeRecurrenceSelectorProps;\n\nexport { DateRangeRecurrenceSelectorWithSchema };\nexport default DSDateRangeSelector;\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,mBAAkB;AAClB,wBAAoC;AACpC,oBAAmB;AACnB,mCAAkC;AAClC,wCAIO;AACP,gCAA+B;AAE/B,MAAM,sBAAsB,CAAC;AAAA,EAC3B,iBAAiB;AAAA,
|
|
4
|
+
"sourcesContent": ["import React from 'react';\nimport { PropTypes, describe } from 'react-desc';\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}) => (\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 />\n);\n\nexport {\n CUSTOM_OPTION_VALUE,\n dropdownPreselectedOptions,\n DropdownOptionsTypes,\n};\n\nconst dateRangeRecurrenceSelectorProps = {\n containerProps: PropTypes.object.description(\n 'Set of properties attached to the main container',\n ),\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(\n 'function executed when selection changes',\n ),\n placeholder: PropTypes.string\n .description('inputs placeholder')\n .defaultValue('Select Range'),\n value: PropTypes.oneOf([PropTypes.string, PropTypes.number]).description(\n 'selected value',\n ),\n customOptionRender: PropTypes.element.description(\n 'custom renderer for options',\n ),\n startDate: PropTypes.instanceOf(Date, moment).description(\n 'moment object of start date',\n ),\n endDate: PropTypes.instanceOf(Date, moment).description(\n 'moment object of end date',\n ),\n displayFormatDay: PropTypes.string\n .description('format to display date')\n .defaultValue('D'),\n disableCustomOption: PropTypes.bool\n .description('disables custom options')\n .defaultValue(false),\n};\n\nDSDateRangeSelector.propTypes = dateRangeRecurrenceSelectorProps;\n\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;ACAA,YAAuB;ADAvB,mBAAkB;AAClB,wBAAoC;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;AAAA,EACrB,YAAY;AAAA,EACZ,UAAU;AAAA,EACV,mBAAmB;AAAA,EACnB,sBAAsB;AAAA,MAEtB,mDAAC;AAAA,EACC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,4BAA4B;AAAA,EAC5B;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,CACF;AASF,MAAM,mCAAmC;AAAA,EACvC,gBAAgB,4BAAU,OAAO,YAC/B,kDACF;AAAA,EACA,WAAW,4BAAU,OAAO,YAAY,sBAAsB;AAAA,EAC9D,oBAAoB,4BAAU,QAC5B,4BAAU,MAAM;AAAA,IACd,OAAO,4BAAU;AAAA,IACjB,OAAO,4BAAU;AAAA,EACnB,CAAC,CACH,EAAE,YAAY,qCAAqC;AAAA,EACnD,UAAU,4BAAU,KAAK,YACvB,0CACF;AAAA,EACA,aAAa,4BAAU,OACpB,YAAY,oBAAoB,EAChC,aAAa,cAAc;AAAA,EAC9B,OAAO,4BAAU,MAAM,CAAC,4BAAU,QAAQ,4BAAU,MAAM,CAAC,EAAE,YAC3D,gBACF;AAAA,EACA,oBAAoB,4BAAU,QAAQ,YACpC,6BACF;AAAA,EACA,WAAW,4BAAU,WAAW,MAAM,qBAAM,EAAE,YAC5C,6BACF;AAAA,EACA,SAAS,4BAAU,WAAW,MAAM,qBAAM,EAAE,YAC1C,2BACF;AAAA,EACA,kBAAkB,4BAAU,OACzB,YAAY,wBAAwB,EACpC,aAAa,GAAG;AAAA,EACnB,qBAAqB,4BAAU,KAC5B,YAAY,yBAAyB,EACrC,aAAa,KAAK;AACvB;AAEA,oBAAoB,YAAY;AAEhC,MAAM,wCAAwC,gCAAS,mBAAmB;AAC1E,sCAAsC,YAAY;AAGlD,IAAO,8BAAQ;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -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(\n 'date-range-selector-customoption',\n);\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;ACAA,YAAuB;ADAvB,mBAAkB;AAClB,2BAA0C;AAE1C,MAAM,EAAE,iBAAiB,oDACvB;
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,mBAAkB;AAClB,2BAA0C;AAE1C,MAAM,EAAE,iBAAiB,oDACvB,kCACF;AAWA,MAAM,qBAAqB,CAAC,EAAE,aAAa,EAAE,WAAW,gBAAgB;AACtE,QAAM,QAAQ,YAAY,UAAU,OAAO,YAAY,IAAI;AAC3D,QAAM,MAAM,UAAU,QAAQ,OAAO,YAAY,IAAI;AACrD,QAAM,UAAU,QAAQ,YAAY,SAAS;AAC7C,SAAO,mDAAC;AAAA,IAAG,WAAW;AAAA,KAAe,OAAQ;AAC/C;AAEA,IAAO,6BAAQ;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/components/DateRangeSelectorImpl.tsx", "../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
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 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 } = 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 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;ACAA,YAAuB;ADCvB,mBAAiC;AACjC,oBA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
package/dist/cjs/index.js
CHANGED
|
@@ -28,6 +28,7 @@ var __toCommonJS = /* @__PURE__ */ ((cache) => {
|
|
|
28
28
|
var src_exports = {};
|
|
29
29
|
__export(src_exports, {
|
|
30
30
|
CUSTOM_OPTION_VALUE: () => import_DSDateRangeSelector2.CUSTOM_OPTION_VALUE,
|
|
31
|
+
DSDateRangeSelector: () => import_DSDateRangeSelector.DSDateRangeSelector,
|
|
31
32
|
DateRangeRecurrenceSelectorWithSchema: () => import_DSDateRangeSelector.DateRangeRecurrenceSelectorWithSchema,
|
|
32
33
|
default: () => import_DSDateRangeSelector.default
|
|
33
34
|
});
|
package/dist/cjs/index.js.map
CHANGED
|
@@ -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 {\n default,\n DateRangeRecurrenceSelectorWithSchema,\n} 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;ACAA,YAAuB;ADAvB,
|
|
4
|
+
"sourcesContent": ["export {\n default,\n DateRangeRecurrenceSelectorWithSchema,\n DSDateRangeSelector,\n} 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;ACAA,YAAuB;ADAvB,iCAIO;AACP,kCAAoC;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -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;ACAA,YAAuB;ADAhB,MAAM,uBAAuB;AAAA,EAClC,OAAO;AAAA,EACP,WAAW;AAAA,EACX,aAAa;AAAA,EACb,cAAc;AAAA,EACd,YAAY;AAAA,EACZ,YAAY;
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;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
|
}
|
|
@@ -56,6 +56,7 @@ DateRangeRecurrenceSelectorWithSchema.propTypes = dateRangeRecurrenceSelectorPro
|
|
|
56
56
|
var DSDateRangeSelector_default = DSDateRangeSelector;
|
|
57
57
|
export {
|
|
58
58
|
CUSTOM_OPTION_VALUE,
|
|
59
|
+
DSDateRangeSelector,
|
|
59
60
|
DateRangeRecurrenceSelectorWithSchema,
|
|
60
61
|
DropdownOptionsTypes,
|
|
61
62
|
DSDateRangeSelector_default as default,
|
|
@@ -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 'react-desc';\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}) => (\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 />\n);\n\nexport {\n CUSTOM_OPTION_VALUE,\n dropdownPreselectedOptions,\n DropdownOptionsTypes,\n};\n\nconst dateRangeRecurrenceSelectorProps = {\n containerProps: PropTypes.object.description(\n 'Set of properties attached to the main container',\n ),\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(\n 'function executed when selection changes',\n ),\n placeholder: PropTypes.string\n .description('inputs placeholder')\n .defaultValue('Select Range'),\n value: PropTypes.oneOf([PropTypes.string, PropTypes.number]).description(\n 'selected value',\n ),\n customOptionRender: PropTypes.element.description(\n 'custom renderer for options',\n ),\n startDate: PropTypes.instanceOf(Date, moment).description(\n 'moment object of start date',\n ),\n endDate: PropTypes.instanceOf(Date, moment).description(\n 'moment object of end date',\n ),\n displayFormatDay: PropTypes.string\n .description('format to display date')\n .defaultValue('D'),\n disableCustomOption: PropTypes.bool\n .description('disables custom options')\n .defaultValue(false),\n};\n\nDSDateRangeSelector.propTypes = dateRangeRecurrenceSelectorProps;\n\nconst DateRangeRecurrenceSelectorWithSchema = describe(DSDateRangeSelector);\nDateRangeRecurrenceSelectorWithSchema.propTypes = dateRangeRecurrenceSelectorProps;\n\nexport { DateRangeRecurrenceSelectorWithSchema };\nexport default DSDateRangeSelector;\n"],
|
|
5
|
-
"mappings": "AAAA;ACAA;AACA;AACA;AACA;AACA;AAAA;AAAA;AAAA;AAAA;AAKA;AAEA,MAAM,sBAAsB,CAAC;AAAA,EAC3B,iBAAiB;AAAA,
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React from 'react';\nimport { PropTypes, describe } from 'react-desc';\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}) => (\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 />\n);\n\nexport {\n CUSTOM_OPTION_VALUE,\n dropdownPreselectedOptions,\n DropdownOptionsTypes,\n};\n\nconst dateRangeRecurrenceSelectorProps = {\n containerProps: PropTypes.object.description(\n 'Set of properties attached to the main container',\n ),\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(\n 'function executed when selection changes',\n ),\n placeholder: PropTypes.string\n .description('inputs placeholder')\n .defaultValue('Select Range'),\n value: PropTypes.oneOf([PropTypes.string, PropTypes.number]).description(\n 'selected value',\n ),\n customOptionRender: PropTypes.element.description(\n 'custom renderer for options',\n ),\n startDate: PropTypes.instanceOf(Date, moment).description(\n 'moment object of start date',\n ),\n endDate: PropTypes.instanceOf(Date, moment).description(\n 'moment object of end date',\n ),\n displayFormatDay: PropTypes.string\n .description('format to display date')\n .defaultValue('D'),\n disableCustomOption: PropTypes.bool\n .description('disables custom options')\n .defaultValue(false),\n};\n\nDSDateRangeSelector.propTypes = dateRangeRecurrenceSelectorProps;\n\nconst DateRangeRecurrenceSelectorWithSchema = describe(DSDateRangeSelector);\nDateRangeRecurrenceSelectorWithSchema.propTypes = dateRangeRecurrenceSelectorProps;\n\nexport { DateRangeRecurrenceSelectorWithSchema, DSDateRangeSelector };\nexport default DSDateRangeSelector;\n"],
|
|
5
|
+
"mappings": "AAAA;ACAA;AACA;AACA;AACA;AACA;AAAA;AAAA;AAAA;AAAA;AAKA;AAEA,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,MAEtB,qCAAC;AAAA,EACC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,4BAA4B;AAAA,EAC5B;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,CACF;AASF,MAAM,mCAAmC;AAAA,EACvC,gBAAgB,UAAU,OAAO,YAC/B,kDACF;AAAA,EACA,WAAW,UAAU,OAAO,YAAY,sBAAsB;AAAA,EAC9D,oBAAoB,UAAU,QAC5B,UAAU,MAAM;AAAA,IACd,OAAO,UAAU;AAAA,IACjB,OAAO,UAAU;AAAA,EACnB,CAAC,CACH,EAAE,YAAY,qCAAqC;AAAA,EACnD,UAAU,UAAU,KAAK,YACvB,0CACF;AAAA,EACA,aAAa,UAAU,OACpB,YAAY,oBAAoB,EAChC,aAAa,cAAc;AAAA,EAC9B,OAAO,UAAU,MAAM,CAAC,UAAU,QAAQ,UAAU,MAAM,CAAC,EAAE,YAC3D,gBACF;AAAA,EACA,oBAAoB,UAAU,QAAQ,YACpC,6BACF;AAAA,EACA,WAAW,UAAU,WAAW,MAAM,MAAM,EAAE,YAC5C,6BACF;AAAA,EACA,SAAS,UAAU,WAAW,MAAM,MAAM,EAAE,YAC1C,2BACF;AAAA,EACA,kBAAkB,UAAU,OACzB,YAAY,wBAAwB,EACpC,aAAa,GAAG;AAAA,EACnB,qBAAqB,UAAU,KAC5B,YAAY,yBAAyB,EACrC,aAAa,KAAK;AACvB;AAEA,oBAAoB,YAAY;AAEhC,MAAM,wCAAwC,SAAS,mBAAmB;AAC1E,sCAAsC,YAAY;AAGlD,IAAO,8BAAQ;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../../src/components/CustomOptionRender/CustomOptionRender.tsx"],
|
|
4
4
|
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React from 'react';\nimport { convertPropToCssClassName } from '@elliemae/ds-classnames';\n\nconst { cssClassName } = convertPropToCssClassName(\n 'date-range-selector-customoption',\n);\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"],
|
|
5
|
-
"mappings": "AAAA;ACAA;AACA;AAEA,MAAM,EAAE,iBAAiB,0BACvB;
|
|
5
|
+
"mappings": "AAAA;ACAA;AACA;AAEA,MAAM,EAAE,iBAAiB,0BACvB,kCACF;AAWA,MAAM,qBAAqB,CAAC,EAAE,aAAa,EAAE,WAAW,gBAAgB;AACtE,QAAM,QAAQ,YAAY,UAAU,OAAO,YAAY,IAAI;AAC3D,QAAM,MAAM,UAAU,QAAQ,OAAO,YAAY,IAAI;AACrD,QAAM,UAAU,QAAQ,YAAY,SAAS;AAC7C,SAAO,qCAAC;AAAA,IAAG,WAAW;AAAA,KAAe,OAAQ;AAC/C;AAEA,IAAO,6BAAQ;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../../src/components/DateRangeSelectorImpl.tsx"],
|
|
4
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 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 } = 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 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
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;AAAA;ACCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA,MAAM,aAAa;AACnB,MAAM,WAAW;AAEjB,MAAM,gBAAgB;AAAA,EACpB,OAAO;AAAA,EACP,OAAO;AAAA,EACP,WAAW;
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;AAAA;ACCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA,MAAM,aAAa;AACnB,MAAM,WAAW;AAEjB,MAAM,gBAAgB;AAAA,EACpB,OAAO;AAAA,EACP,OAAO;AAAA,EACP,WAAW;AACb;AACA,MAAM,EAAE,cAAc,kBAAkB,mBAAmB,0BAA0B,qBAAqB;AAE1G,MAAM,EAAE,kBAAkB,sBAAsB,0BAA0B,YAAY;AAEtF,MAAM,sCAAsC,UAAU;AAAA,EACpD,YAAY,OAAO;AACjB,UAAM,KAAK;AAgBb,oBAAW,MAAM;AACf,YAAM,EAAE,aAAa,KAAK;AAC1B,YAAM,EAAE,aAAa,aAAa,KAAK;AACvC,eAAS,UAAU,WAAW;AAAA,IAChC;AAEA,4BAAmB,CAAC,UAAU;AAC5B,YAAM,EAAE,+BAA+B,KAAK;AAC5C,YAAM,WAAW,2BAA2B,KAAK,CAAC,OAAO,GAAG,UAAU,KAAK;AAC3E,YAAM,EAAE,aAAa,KAAK;AAC1B,UAAI,CAAC,UAAU;AACb,aAAK,SAAS,EAAE,UAAU,MAAM,CAAC;AACjC,aAAK,gBAAgB;AAAA,MACvB,WAAW,UAAU;AACnB,iBAAS,KAAK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
}
|
package/dist/esm/index.js
CHANGED
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
import {
|
|
3
3
|
default as default2,
|
|
4
|
-
DateRangeRecurrenceSelectorWithSchema
|
|
4
|
+
DateRangeRecurrenceSelectorWithSchema,
|
|
5
|
+
DSDateRangeSelector
|
|
5
6
|
} from "./DSDateRangeSelector";
|
|
6
7
|
import { CUSTOM_OPTION_VALUE } from "./DSDateRangeSelector";
|
|
7
8
|
export {
|
|
8
9
|
CUSTOM_OPTION_VALUE,
|
|
10
|
+
DSDateRangeSelector,
|
|
9
11
|
DateRangeRecurrenceSelectorWithSchema,
|
|
10
12
|
default2 as default
|
|
11
13
|
};
|
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.tsx"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "export {\n default,\n DateRangeRecurrenceSelectorWithSchema,\n} from './DSDateRangeSelector';\nexport { CUSTOM_OPTION_VALUE } from './DSDateRangeSelector';\n"],
|
|
5
|
-
"mappings": "AAAA;ACAA;AAAA;AAAA;AAAA;
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "export {\n default,\n DateRangeRecurrenceSelectorWithSchema,\n DSDateRangeSelector,\n} from './DSDateRangeSelector';\nexport { CUSTOM_OPTION_VALUE } from './DSDateRangeSelector';\n"],
|
|
5
|
+
"mappings": "AAAA;ACAA;AAAA;AAAA;AAAA;AAAA;AAKA;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../../src/options/dropdownPreselectedOptions.tsx"],
|
|
4
4
|
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "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"],
|
|
5
|
-
"mappings": "AAAA;ACAO,MAAM,uBAAuB;AAAA,EAClC,OAAO;AAAA,EACP,WAAW;AAAA,EACX,aAAa;AAAA,EACb,cAAc;AAAA,EACd,YAAY;AAAA,EACZ,YAAY;
|
|
5
|
+
"mappings": "AAAA;ACAO,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
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@elliemae/ds-date-range-selector",
|
|
3
|
-
"version": "3.0.0-next.
|
|
3
|
+
"version": "3.0.0-next.43",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"description": "ICE MT - Dimsum - Date Range Selector",
|
|
6
6
|
"files": [
|
|
@@ -51,11 +51,11 @@
|
|
|
51
51
|
"indent": 4
|
|
52
52
|
},
|
|
53
53
|
"dependencies": {
|
|
54
|
-
"@elliemae/ds-classnames": "3.0.0-next.
|
|
55
|
-
"@elliemae/ds-date-picker": "3.0.0-next.
|
|
56
|
-
"@elliemae/ds-form": "3.0.0-next.
|
|
57
|
-
"@elliemae/ds-icons": "3.0.0-next.
|
|
58
|
-
"@elliemae/ds-popper": "3.0.0-next.
|
|
54
|
+
"@elliemae/ds-classnames": "3.0.0-next.43",
|
|
55
|
+
"@elliemae/ds-date-picker": "3.0.0-next.43",
|
|
56
|
+
"@elliemae/ds-form": "3.0.0-next.43",
|
|
57
|
+
"@elliemae/ds-icons": "3.0.0-next.43",
|
|
58
|
+
"@elliemae/ds-popper": "3.0.0-next.43",
|
|
59
59
|
"moment": "~2.29.1",
|
|
60
60
|
"react-dates": "~21.8.0",
|
|
61
61
|
"react-desc": "~4.1.3",
|