@elliemae/ds-number-range-field 2.0.0-next.0 → 2.0.0-next.13

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.
@@ -11,37 +11,40 @@ function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'defau
11
11
 
12
12
  var _jsx__default = /*#__PURE__*/_interopDefaultLegacy(_jsx);
13
13
 
14
- const DSNumberRangeField = ({
15
- containerProps = {},
16
- maxFrom = null,
17
- minFrom = 0,
18
- maxTo = null,
19
- minTo = 0,
20
- onChange = () => null,
21
- placeholderFrom = 'From',
22
- placeholderTo = 'To',
23
- stepFrom = 1,
24
- stepTo = 1,
25
- value = [],
26
- separator = '-',
27
- maskOptions,
28
- type
29
- }) => /*#__PURE__*/_jsx__default["default"](NumberRangeFieldImpl, {
30
- containerProps: containerProps,
31
- maxFrom: maxFrom,
32
- maxTo: maxTo,
33
- minFrom: minFrom,
34
- minTo: minTo,
35
- onChange: onChange,
36
- placeholderFrom: placeholderFrom,
37
- placeholderTo: placeholderTo,
38
- separator: separator,
39
- stepFrom: stepFrom,
40
- stepTo: stepTo,
41
- value: value,
42
- maskOptions: maskOptions,
43
- type: type
44
- });
14
+ const DSNumberRangeField = _ref => {
15
+ let {
16
+ containerProps = {},
17
+ maxFrom = null,
18
+ minFrom = 0,
19
+ maxTo = null,
20
+ minTo = 0,
21
+ onChange = () => null,
22
+ placeholderFrom = 'From',
23
+ placeholderTo = 'To',
24
+ stepFrom = 1,
25
+ stepTo = 1,
26
+ value = [],
27
+ separator = '-',
28
+ maskOptions,
29
+ type
30
+ } = _ref;
31
+ return /*#__PURE__*/_jsx__default["default"](NumberRangeFieldImpl, {
32
+ containerProps: containerProps,
33
+ maxFrom: maxFrom,
34
+ maxTo: maxTo,
35
+ minFrom: minFrom,
36
+ minTo: minTo,
37
+ onChange: onChange,
38
+ placeholderFrom: placeholderFrom,
39
+ placeholderTo: placeholderTo,
40
+ separator: separator,
41
+ stepFrom: stepFrom,
42
+ stepTo: stepTo,
43
+ value: value,
44
+ maskOptions: maskOptions,
45
+ type: type
46
+ });
47
+ };
45
48
 
46
49
  const numberRangeFieldProps = {
47
50
  containerProps: reactDesc.PropTypes.object.description('Set of Properties attached to the main container'),
@@ -2,16 +2,21 @@
2
2
 
3
3
  var _jsx = require('@babel/runtime/helpers/jsx');
4
4
  var _defineProperty = require('@babel/runtime/helpers/defineProperty');
5
+ require('core-js/modules/web.dom-collections.iterator.js');
6
+ require('core-js/modules/esnext.async-iterator.filter.js');
7
+ require('core-js/modules/esnext.iterator.constructor.js');
8
+ require('core-js/modules/esnext.iterator.filter.js');
9
+ require('core-js/modules/esnext.async-iterator.for-each.js');
10
+ require('core-js/modules/esnext.iterator.for-each.js');
5
11
  var react = require('react');
6
12
  var dsClassnames = require('@elliemae/ds-classnames');
7
- var DSInputMask = require('@elliemae/ds-basic/form/InputMask');
13
+ var dsForm = require('@elliemae/ds-form');
8
14
  var jsxRuntime = require('react/jsx-runtime');
9
15
 
10
16
  function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
11
17
 
12
18
  var _jsx__default = /*#__PURE__*/_interopDefaultLegacy(_jsx);
13
19
  var _defineProperty__default = /*#__PURE__*/_interopDefaultLegacy(_defineProperty);
14
- var DSInputMask__default = /*#__PURE__*/_interopDefaultLegacy(DSInputMask);
15
20
 
16
21
  function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; }
17
22
 
@@ -22,22 +27,23 @@ const {
22
27
  classNameBlock
23
28
  } = dsClassnames.convertPropToCssClassName('query-builder-addon-number-range-field');
24
29
 
25
- const DSSearchFieldImpl = ({
26
- onChange,
27
- containerProps,
28
- maxFrom,
29
- maxTo,
30
- minFrom,
31
- minTo,
32
- placeholderFrom,
33
- placeholderTo,
34
- separator,
35
- stepFrom,
36
- stepTo,
37
- value,
38
- maskOptions,
39
- type
40
- }) => {
30
+ const DSSearchFieldImpl = _ref => {
31
+ let {
32
+ onChange,
33
+ containerProps,
34
+ maxFrom,
35
+ maxTo,
36
+ minFrom,
37
+ minTo,
38
+ placeholderFrom,
39
+ placeholderTo,
40
+ separator,
41
+ stepFrom,
42
+ stepTo,
43
+ value,
44
+ maskOptions,
45
+ type
46
+ } = _ref;
41
47
  const [valueFrom, setValueFrom] = react.useState();
42
48
  const [valueTo, setValueTo] = react.useState();
43
49
  react.useEffect(() => {
@@ -61,17 +67,17 @@ const DSSearchFieldImpl = ({
61
67
  }, maskOptions);
62
68
 
63
69
  return /*#__PURE__*/jsxRuntime.jsx("div", _objectSpread(_objectSpread({}, containerProps), {}, {
64
- className: `${cssClassName}`,
70
+ className: "".concat(cssClassName),
65
71
  children: /*#__PURE__*/_jsx__default["default"]("div", {
66
72
  className: classNameBlock('wrapper')
67
- }, void 0, /*#__PURE__*/_jsx__default["default"](DSInputMask__default["default"], {
73
+ }, void 0, /*#__PURE__*/_jsx__default["default"](dsForm.DSInputMask, {
68
74
  type: type,
69
75
  max: maxFrom,
70
76
  min: minFrom,
71
77
  step: stepFrom,
72
78
  value: valueFrom === null || valueFrom === void 0 ? void 0 : valueFrom.toString(),
73
79
  placeholder: placeholderFrom,
74
- mask: number => DSInputMask.MASK_TYPES.NUMBER(maskConfig)(number),
80
+ mask: number => dsForm.MASK_TYPES.NUMBER(maskConfig)(number),
75
81
  onChange: e => {
76
82
  const newValueFrom = e.target.value;
77
83
  handleOnChange(newValueFrom, valueTo);
@@ -79,14 +85,14 @@ const DSSearchFieldImpl = ({
79
85
  "data-testid": "ds-number-range-field__from-input"
80
86
  }), /*#__PURE__*/_jsx__default["default"]("div", {
81
87
  className: classNameElement('separator')
82
- }, void 0, separator), /*#__PURE__*/_jsx__default["default"](DSInputMask__default["default"], {
88
+ }, void 0, separator), /*#__PURE__*/_jsx__default["default"](dsForm.DSInputMask, {
83
89
  type: type,
84
90
  max: maxTo,
85
91
  min: minTo,
86
92
  step: stepTo,
87
93
  value: valueTo === null || valueTo === void 0 ? void 0 : valueTo.toString(),
88
94
  placeholder: placeholderTo,
89
- mask: number => DSInputMask.MASK_TYPES.NUMBER(maskConfig)(number),
95
+ mask: number => dsForm.MASK_TYPES.NUMBER(maskConfig)(number),
90
96
  onChange: e => {
91
97
  const newValueTo = e.target.value;
92
98
  handleOnChange(valueFrom, newValueTo);
@@ -3,6 +3,7 @@
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  var _jsx = require('@babel/runtime/helpers/jsx');
6
+ require('core-js/modules/web.dom-collections.iterator.js');
6
7
  var react = require('react');
7
8
  var DSNumberRangeField = require('@elliemae/ds-number-range-field');
8
9
 
@@ -3,37 +3,40 @@ import 'react';
3
3
  import { PropTypes, describe } from 'react-desc';
4
4
  import DSSearchFieldImpl from './impl/NumberRangeFieldImpl.js';
5
5
 
6
- const DSNumberRangeField = ({
7
- containerProps = {},
8
- maxFrom = null,
9
- minFrom = 0,
10
- maxTo = null,
11
- minTo = 0,
12
- onChange = () => null,
13
- placeholderFrom = 'From',
14
- placeholderTo = 'To',
15
- stepFrom = 1,
16
- stepTo = 1,
17
- value = [],
18
- separator = '-',
19
- maskOptions,
20
- type
21
- }) => /*#__PURE__*/_jsx(DSSearchFieldImpl, {
22
- containerProps: containerProps,
23
- maxFrom: maxFrom,
24
- maxTo: maxTo,
25
- minFrom: minFrom,
26
- minTo: minTo,
27
- onChange: onChange,
28
- placeholderFrom: placeholderFrom,
29
- placeholderTo: placeholderTo,
30
- separator: separator,
31
- stepFrom: stepFrom,
32
- stepTo: stepTo,
33
- value: value,
34
- maskOptions: maskOptions,
35
- type: type
36
- });
6
+ const DSNumberRangeField = _ref => {
7
+ let {
8
+ containerProps = {},
9
+ maxFrom = null,
10
+ minFrom = 0,
11
+ maxTo = null,
12
+ minTo = 0,
13
+ onChange = () => null,
14
+ placeholderFrom = 'From',
15
+ placeholderTo = 'To',
16
+ stepFrom = 1,
17
+ stepTo = 1,
18
+ value = [],
19
+ separator = '-',
20
+ maskOptions,
21
+ type
22
+ } = _ref;
23
+ return /*#__PURE__*/_jsx(DSSearchFieldImpl, {
24
+ containerProps: containerProps,
25
+ maxFrom: maxFrom,
26
+ maxTo: maxTo,
27
+ minFrom: minFrom,
28
+ minTo: minTo,
29
+ onChange: onChange,
30
+ placeholderFrom: placeholderFrom,
31
+ placeholderTo: placeholderTo,
32
+ separator: separator,
33
+ stepFrom: stepFrom,
34
+ stepTo: stepTo,
35
+ value: value,
36
+ maskOptions: maskOptions,
37
+ type: type
38
+ });
39
+ };
37
40
 
38
41
  const numberRangeFieldProps = {
39
42
  containerProps: PropTypes.object.description('Set of Properties attached to the main container'),
@@ -1,8 +1,14 @@
1
+ import 'core-js/modules/esnext.async-iterator.filter.js';
2
+ import 'core-js/modules/esnext.iterator.constructor.js';
3
+ import 'core-js/modules/esnext.iterator.filter.js';
4
+ import 'core-js/modules/esnext.async-iterator.for-each.js';
5
+ import 'core-js/modules/esnext.iterator.for-each.js';
1
6
  import _jsx from '@babel/runtime/helpers/esm/jsx';
2
7
  import _defineProperty from '@babel/runtime/helpers/esm/defineProperty';
8
+ import 'core-js/modules/web.dom-collections.iterator.js';
3
9
  import { useState, useEffect } from 'react';
4
10
  import { convertPropToCssClassName } from '@elliemae/ds-classnames';
5
- import DSInputMask, { MASK_TYPES } from '@elliemae/ds-basic/form/InputMask';
11
+ import { DSInputMask, MASK_TYPES } from '@elliemae/ds-form';
6
12
  import { jsx } from 'react/jsx-runtime';
7
13
 
8
14
  function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; }
@@ -14,22 +20,23 @@ const {
14
20
  classNameBlock
15
21
  } = convertPropToCssClassName('query-builder-addon-number-range-field');
16
22
 
17
- const DSSearchFieldImpl = ({
18
- onChange,
19
- containerProps,
20
- maxFrom,
21
- maxTo,
22
- minFrom,
23
- minTo,
24
- placeholderFrom,
25
- placeholderTo,
26
- separator,
27
- stepFrom,
28
- stepTo,
29
- value,
30
- maskOptions,
31
- type
32
- }) => {
23
+ const DSSearchFieldImpl = _ref => {
24
+ let {
25
+ onChange,
26
+ containerProps,
27
+ maxFrom,
28
+ maxTo,
29
+ minFrom,
30
+ minTo,
31
+ placeholderFrom,
32
+ placeholderTo,
33
+ separator,
34
+ stepFrom,
35
+ stepTo,
36
+ value,
37
+ maskOptions,
38
+ type
39
+ } = _ref;
33
40
  const [valueFrom, setValueFrom] = useState();
34
41
  const [valueTo, setValueTo] = useState();
35
42
  useEffect(() => {
@@ -53,7 +60,7 @@ const DSSearchFieldImpl = ({
53
60
  }, maskOptions);
54
61
 
55
62
  return /*#__PURE__*/jsx("div", _objectSpread(_objectSpread({}, containerProps), {}, {
56
- className: `${cssClassName}`,
63
+ className: "".concat(cssClassName),
57
64
  children: /*#__PURE__*/_jsx("div", {
58
65
  className: classNameBlock('wrapper')
59
66
  }, void 0, /*#__PURE__*/_jsx(DSInputMask, {
@@ -1,4 +1,5 @@
1
1
  import _jsx from '@babel/runtime/helpers/esm/jsx';
2
+ import 'core-js/modules/web.dom-collections.iterator.js';
2
3
  import { useState } from 'react';
3
4
  import DSNumberRangeField from '@elliemae/ds-number-range-field';
4
5
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@elliemae/ds-number-range-field",
3
- "version": "2.0.0-next.0",
3
+ "version": "2.0.0-next.13",
4
4
  "license": "MIT",
5
5
  "description": "ICE MT - Dimsum - Number Range Field",
6
6
  "module": "./esm/index.js",
@@ -40,8 +40,10 @@
40
40
  "build": "node ../../scripts/build/build.js"
41
41
  },
42
42
  "dependencies": {
43
- "@elliemae/ds-basic": "2.0.0-next.0",
44
- "@elliemae/ds-classnames": "2.0.0-next.0"
43
+ "@elliemae/ds-basic": "2.0.0-next.13",
44
+ "@elliemae/ds-classnames": "2.0.0-next.13",
45
+ "@elliemae/ds-number-range-field": "2.0.0-next.13",
46
+ "react-desc": "~4.1.3"
45
47
  },
46
48
  "peerDependencies": {
47
49
  "lodash": "^4.17.21",
package/cjs/package.json DELETED
@@ -1,7 +0,0 @@
1
- {
2
- "type": "commonjs",
3
- "sideEffects": [
4
- "*.css",
5
- "*.scss"
6
- ]
7
- }
package/esm/package.json DELETED
@@ -1,7 +0,0 @@
1
- {
2
- "type": "module",
3
- "sideEffects": [
4
- "*.css",
5
- "*.scss"
6
- ]
7
- }