@elliemae/ds-zipcode-search 2.0.0-next.8 → 2.0.0-rc.11

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.
@@ -5,10 +5,15 @@ Object.defineProperty(exports, '__esModule', { value: true });
5
5
  var _defineProperty = require('@babel/runtime/helpers/defineProperty');
6
6
  var _jsx = require('@babel/runtime/helpers/jsx');
7
7
  require('core-js/modules/web.dom-collections.iterator.js');
8
+ require('core-js/modules/esnext.async-iterator.filter.js');
9
+ require('core-js/modules/esnext.iterator.constructor.js');
10
+ require('core-js/modules/esnext.iterator.filter.js');
11
+ require('core-js/modules/esnext.async-iterator.for-each.js');
12
+ require('core-js/modules/esnext.iterator.for-each.js');
8
13
  var react = require('react');
9
14
  var reactDesc = require('react-desc');
10
15
  var DSDropdownMenu = require('@elliemae/ds-dropdownmenu');
11
- var DSInputMask = require('@elliemae/ds-form/InputMask');
16
+ var dsForm = require('@elliemae/ds-form');
12
17
  var blocks = require('./components/blocks.js');
13
18
  var helper = require('./components/helper.js');
14
19
  var props = require('./props.js');
@@ -19,26 +24,26 @@ function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'defau
19
24
  var _defineProperty__default = /*#__PURE__*/_interopDefaultLegacy(_defineProperty);
20
25
  var _jsx__default = /*#__PURE__*/_interopDefaultLegacy(_jsx);
21
26
  var DSDropdownMenu__default = /*#__PURE__*/_interopDefaultLegacy(DSDropdownMenu);
22
- var DSInputMask__default = /*#__PURE__*/_interopDefaultLegacy(DSInputMask);
23
27
 
24
28
  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; }
25
29
 
26
30
  function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty__default["default"](target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
27
31
 
28
- const DSZipCodeSearch = ({
29
- disabled,
30
- value,
31
- placeholder,
32
- mask,
33
- onBlur,
34
- onChange,
35
- onSearch,
36
- containerProps,
37
- selectRightOptions,
38
- activeCount,
39
- options,
40
- tabIndex
41
- }) => {
32
+ const DSZipCodeSearch = _ref2 => {
33
+ let {
34
+ disabled,
35
+ value,
36
+ placeholder,
37
+ mask,
38
+ onBlur,
39
+ onChange,
40
+ onSearch,
41
+ containerProps,
42
+ selectRightOptions,
43
+ activeCount,
44
+ options,
45
+ tabIndex
46
+ } = _ref2;
42
47
  const ref = react.useRef(null);
43
48
  const [searchValue, setSearchValue] = react.useState(value);
44
49
  const [isOpen, setIsOpen] = react.useState(false);
@@ -92,7 +97,7 @@ const DSZipCodeSearch = ({
92
97
  maxHeight: 200
93
98
  },
94
99
  options: options.length > 0 ? [helper.createDisabledOption(selectRightOptions), ...helper.noAddonOptions(options)] : [],
95
- triggerComponent: /*#__PURE__*/_jsx__default["default"]("div", {}, void 0, /*#__PURE__*/_jsx__default["default"](DSInputMask__default["default"], {
100
+ triggerComponent: /*#__PURE__*/_jsx__default["default"]("div", {}, void 0, /*#__PURE__*/_jsx__default["default"](dsForm.DSInputMask, {
96
101
  disabled: disabled,
97
102
  innerRef: _ref => ref.current = _ref,
98
103
  mask: mask,
@@ -3,6 +3,13 @@
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  var _defineProperty = require('@babel/runtime/helpers/defineProperty');
6
+ require('core-js/modules/esnext.async-iterator.map.js');
7
+ require('core-js/modules/esnext.iterator.map.js');
8
+ require('core-js/modules/esnext.async-iterator.filter.js');
9
+ require('core-js/modules/esnext.iterator.constructor.js');
10
+ require('core-js/modules/esnext.iterator.filter.js');
11
+ require('core-js/modules/esnext.async-iterator.for-each.js');
12
+ require('core-js/modules/esnext.iterator.for-each.js');
6
13
 
7
14
  function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
8
15
 
@@ -11,7 +18,6 @@ var _defineProperty__default = /*#__PURE__*/_interopDefaultLegacy(_definePropert
11
18
  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; }
12
19
 
13
20
  function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty__default["default"](target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
14
-
15
21
  function createDisabledOption(label) {
16
22
  return {
17
23
  id: 'no-option',
package/cjs/props.js CHANGED
@@ -3,7 +3,7 @@
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  var reactDesc = require('react-desc');
6
- var DSInputMask = require('@elliemae/ds-form/InputMask');
6
+ var dsForm = require('@elliemae/ds-form');
7
7
 
8
8
  const zipcodeSearchProps = {
9
9
  /** html class attribute */
@@ -52,7 +52,7 @@ const defaultProps = {
52
52
  disabled: false,
53
53
  value: '',
54
54
  placeholder: '_____-____',
55
- mask: DSInputMask.MASK_TYPES.ZIP_CODE_SEARCH,
55
+ mask: dsForm.MASK_TYPES.ZIP_CODE_SEARCH,
56
56
  onBlur: () => null,
57
57
  onChange: () => null,
58
58
  onSearch: () => null,
@@ -1,10 +1,15 @@
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 _defineProperty from '@babel/runtime/helpers/esm/defineProperty';
2
7
  import _jsx from '@babel/runtime/helpers/esm/jsx';
3
8
  import 'core-js/modules/web.dom-collections.iterator.js';
4
9
  import { useRef, useState, useEffect, useCallback } from 'react';
5
10
  import { describe } from 'react-desc';
6
11
  import DSDropdownMenu from '@elliemae/ds-dropdownmenu';
7
- import DSInputMask from '@elliemae/ds-form/InputMask';
12
+ import { DSInputMask } from '@elliemae/ds-form';
8
13
  import { InputSearchWrapper } from './components/blocks.js';
9
14
  import { createDisabledOption, noAddonOptions } from './components/helper.js';
10
15
  import { zipcodeSearchProps, defaultProps } from './props.js';
@@ -14,20 +19,21 @@ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (O
14
19
 
15
20
  function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
16
21
 
17
- const DSZipCodeSearch = ({
18
- disabled,
19
- value,
20
- placeholder,
21
- mask,
22
- onBlur,
23
- onChange,
24
- onSearch,
25
- containerProps,
26
- selectRightOptions,
27
- activeCount,
28
- options,
29
- tabIndex
30
- }) => {
22
+ const DSZipCodeSearch = _ref2 => {
23
+ let {
24
+ disabled,
25
+ value,
26
+ placeholder,
27
+ mask,
28
+ onBlur,
29
+ onChange,
30
+ onSearch,
31
+ containerProps,
32
+ selectRightOptions,
33
+ activeCount,
34
+ options,
35
+ tabIndex
36
+ } = _ref2;
31
37
  const ref = useRef(null);
32
38
  const [searchValue, setSearchValue] = useState(value);
33
39
  const [isOpen, setIsOpen] = useState(false);
@@ -1,9 +1,15 @@
1
1
  import _defineProperty from '@babel/runtime/helpers/esm/defineProperty';
2
+ import 'core-js/modules/esnext.async-iterator.map.js';
3
+ import 'core-js/modules/esnext.iterator.map.js';
4
+ import 'core-js/modules/esnext.async-iterator.filter.js';
5
+ import 'core-js/modules/esnext.iterator.constructor.js';
6
+ import 'core-js/modules/esnext.iterator.filter.js';
7
+ import 'core-js/modules/esnext.async-iterator.for-each.js';
8
+ import 'core-js/modules/esnext.iterator.for-each.js';
2
9
 
3
10
  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; }
4
11
 
5
12
  function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
6
-
7
13
  function createDisabledOption(label) {
8
14
  return {
9
15
  id: 'no-option',
package/esm/props.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import { PropTypes } from 'react-desc';
2
- import { MASK_TYPES } from '@elliemae/ds-form/InputMask';
2
+ import { MASK_TYPES } from '@elliemae/ds-form';
3
3
 
4
4
  const zipcodeSearchProps = {
5
5
  /** html class attribute */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@elliemae/ds-zipcode-search",
3
- "version": "2.0.0-next.8",
3
+ "version": "2.0.0-rc.11",
4
4
  "license": "MIT",
5
5
  "description": "ICE MT - Dimsum - Zipcode Search",
6
6
  "module": "./esm/index.js",
@@ -48,10 +48,15 @@
48
48
  "build": "node ../../scripts/build/build.js"
49
49
  },
50
50
  "dependencies": {
51
- "@elliemae/ds-classnames": "2.0.0-next.8",
52
- "@elliemae/ds-dropdownmenu": "2.0.0-next.8",
53
- "@elliemae/ds-form": "2.0.0-next.8",
54
- "react-desc": "^4.1.3"
51
+ "@elliemae/ds-classnames": "2.0.0-rc.11",
52
+ "@elliemae/ds-dropdownmenu": "2.0.0-rc.11",
53
+ "@elliemae/ds-form": "2.0.0-rc.11",
54
+ "react-desc": "~4.1.3"
55
+ },
56
+ "devDependencies": {
57
+ "@testing-library/jest-dom": "~5.15.0",
58
+ "@testing-library/react": "~12.1.2",
59
+ "@testing-library/user-event": "~13.5.0"
55
60
  },
56
61
  "peerDependencies": {
57
62
  "react": "^17.0.2",
@@ -1,3 +1,4 @@
1
+ /// <reference path="../../../../shared/typings/react-desc.d.ts" />
1
2
  /// <reference types="react" />
2
3
  declare const DSZipCodeSearch: {
3
4
  ({ disabled, value, placeholder, mask, onBlur, onChange, onSearch, containerProps, selectRightOptions, activeCount, options, tabIndex, }: {
@@ -15,25 +16,85 @@ declare const DSZipCodeSearch: {
15
16
  tabIndex: any;
16
17
  }): JSX.Element;
17
18
  propTypes: {
18
- className: any;
19
- containerProps: any;
20
- tabIndex: any;
21
- disabled: any;
22
- value: any;
23
- onBlur: any;
24
- onChange: any;
25
- options: any;
26
- placeholder: any;
27
- mask: any;
28
- onSearch: any;
29
- selectRightOptions: any;
30
- activeCount: any;
19
+ className: {
20
+ defaultValue<T = unknown>(arg: T): {
21
+ deprecated: import("react-desc").PropTypesDescValidator;
22
+ };
23
+ isRequired: import("react-desc").PropTypesDescValidator;
24
+ };
25
+ containerProps: {
26
+ defaultValue<T = unknown>(arg: T): {
27
+ deprecated: import("react-desc").PropTypesDescValidator;
28
+ };
29
+ isRequired: import("react-desc").PropTypesDescValidator;
30
+ };
31
+ tabIndex: {
32
+ defaultValue<T = unknown>(arg: T): {
33
+ deprecated: import("react-desc").PropTypesDescValidator;
34
+ };
35
+ isRequired: import("react-desc").PropTypesDescValidator;
36
+ };
37
+ disabled: {
38
+ defaultValue<T = unknown>(arg: T): {
39
+ deprecated: import("react-desc").PropTypesDescValidator;
40
+ };
41
+ isRequired: import("react-desc").PropTypesDescValidator;
42
+ };
43
+ value: import("react-desc").PropTypesDescValidator;
44
+ onBlur: {
45
+ defaultValue<T = unknown>(arg: T): {
46
+ deprecated: import("react-desc").PropTypesDescValidator;
47
+ };
48
+ isRequired: import("react-desc").PropTypesDescValidator;
49
+ };
50
+ onChange: {
51
+ defaultValue<T = unknown>(arg: T): {
52
+ deprecated: import("react-desc").PropTypesDescValidator;
53
+ };
54
+ isRequired: import("react-desc").PropTypesDescValidator;
55
+ };
56
+ options: {
57
+ defaultValue<T = unknown>(arg: T): {
58
+ deprecated: import("react-desc").PropTypesDescValidator;
59
+ };
60
+ isRequired: import("react-desc").PropTypesDescValidator;
61
+ };
62
+ placeholder: {
63
+ defaultValue<T = unknown>(arg: T): {
64
+ deprecated: import("react-desc").PropTypesDescValidator;
65
+ };
66
+ isRequired: import("react-desc").PropTypesDescValidator;
67
+ };
68
+ mask: {
69
+ defaultValue<T = unknown>(arg: T): {
70
+ deprecated: import("react-desc").PropTypesDescValidator;
71
+ };
72
+ isRequired: import("react-desc").PropTypesDescValidator;
73
+ };
74
+ onSearch: {
75
+ defaultValue<T = unknown>(arg: T): {
76
+ deprecated: import("react-desc").PropTypesDescValidator;
77
+ };
78
+ isRequired: import("react-desc").PropTypesDescValidator;
79
+ };
80
+ selectRightOptions: {
81
+ defaultValue<T = unknown>(arg: T): {
82
+ deprecated: import("react-desc").PropTypesDescValidator;
83
+ };
84
+ isRequired: import("react-desc").PropTypesDescValidator;
85
+ };
86
+ activeCount: {
87
+ defaultValue<T = unknown>(arg: T): {
88
+ deprecated: import("react-desc").PropTypesDescValidator;
89
+ };
90
+ isRequired: import("react-desc").PropTypesDescValidator;
91
+ };
31
92
  };
32
93
  defaultProps: {
33
94
  disabled: boolean;
34
95
  value: string;
35
96
  placeholder: string;
36
- mask: any;
97
+ mask: string;
37
98
  onBlur: () => null;
38
99
  onChange: () => null;
39
100
  onSearch: () => null;
@@ -43,6 +104,23 @@ declare const DSZipCodeSearch: {
43
104
  options: never[];
44
105
  };
45
106
  };
46
- declare const ZipCodeSearchWithSchema: any;
107
+ declare const ZipCodeSearchWithSchema: {
108
+ (props?: {
109
+ disabled: any;
110
+ value: any;
111
+ placeholder: any;
112
+ mask: any;
113
+ onBlur: any;
114
+ onChange: any;
115
+ onSearch: any;
116
+ containerProps: any;
117
+ selectRightOptions: any;
118
+ activeCount: any;
119
+ options: any;
120
+ tabIndex: any;
121
+ } | undefined): JSX.Element;
122
+ propTypes: unknown;
123
+ toTypescript: () => import("react-desc").TypescriptSchema;
124
+ };
47
125
  export { DSZipCodeSearch, ZipCodeSearchWithSchema };
48
126
  export default DSZipCodeSearch;
package/types/props.d.ts CHANGED
@@ -1,36 +1,97 @@
1
+ /// <reference path="../../../../shared/typings/react-desc.d.ts" />
1
2
  export declare const zipcodeSearchProps: {
2
3
  /** html class attribute */
3
- className: any;
4
+ className: {
5
+ defaultValue<T = unknown>(arg: T): {
6
+ deprecated: import("react-desc").PropTypesDescValidator;
7
+ };
8
+ isRequired: import("react-desc").PropTypesDescValidator;
9
+ };
4
10
  /** Set of Properties attached to the main container */
5
- containerProps: any;
11
+ containerProps: {
12
+ defaultValue<T = unknown>(arg: T): {
13
+ deprecated: import("react-desc").PropTypesDescValidator;
14
+ };
15
+ isRequired: import("react-desc").PropTypesDescValidator;
16
+ };
6
17
  /** native tabindex property to handle focus order */
7
- tabIndex: any;
18
+ tabIndex: {
19
+ defaultValue<T = unknown>(arg: T): {
20
+ deprecated: import("react-desc").PropTypesDescValidator;
21
+ };
22
+ isRequired: import("react-desc").PropTypesDescValidator;
23
+ };
8
24
  /** disable component */
9
- disabled: any;
25
+ disabled: {
26
+ defaultValue<T = unknown>(arg: T): {
27
+ deprecated: import("react-desc").PropTypesDescValidator;
28
+ };
29
+ isRequired: import("react-desc").PropTypesDescValidator;
30
+ };
10
31
  /** input value */
11
- value: any;
32
+ value: import("react-desc").PropTypesDescValidator;
12
33
  /** function called on blur */
13
- onBlur: any;
34
+ onBlur: {
35
+ defaultValue<T = unknown>(arg: T): {
36
+ deprecated: import("react-desc").PropTypesDescValidator;
37
+ };
38
+ isRequired: import("react-desc").PropTypesDescValidator;
39
+ };
14
40
  /** function called on change */
15
- onChange: any;
41
+ onChange: {
42
+ defaultValue<T = unknown>(arg: T): {
43
+ deprecated: import("react-desc").PropTypesDescValidator;
44
+ };
45
+ isRequired: import("react-desc").PropTypesDescValidator;
46
+ };
16
47
  /** options to display */
17
- options: any;
48
+ options: {
49
+ defaultValue<T = unknown>(arg: T): {
50
+ deprecated: import("react-desc").PropTypesDescValidator;
51
+ };
52
+ isRequired: import("react-desc").PropTypesDescValidator;
53
+ };
18
54
  /** placeholder value */
19
- placeholder: any;
55
+ placeholder: {
56
+ defaultValue<T = unknown>(arg: T): {
57
+ deprecated: import("react-desc").PropTypesDescValidator;
58
+ };
59
+ isRequired: import("react-desc").PropTypesDescValidator;
60
+ };
20
61
  /** format mask to apply */
21
- mask: any;
62
+ mask: {
63
+ defaultValue<T = unknown>(arg: T): {
64
+ deprecated: import("react-desc").PropTypesDescValidator;
65
+ };
66
+ isRequired: import("react-desc").PropTypesDescValidator;
67
+ };
22
68
  /** function called onsearch */
23
- onSearch: any;
69
+ onSearch: {
70
+ defaultValue<T = unknown>(arg: T): {
71
+ deprecated: import("react-desc").PropTypesDescValidator;
72
+ };
73
+ isRequired: import("react-desc").PropTypesDescValidator;
74
+ };
24
75
  /** Correction messange */
25
- selectRightOptions: any;
76
+ selectRightOptions: {
77
+ defaultValue<T = unknown>(arg: T): {
78
+ deprecated: import("react-desc").PropTypesDescValidator;
79
+ };
80
+ isRequired: import("react-desc").PropTypesDescValidator;
81
+ };
26
82
  /** current amount */
27
- activeCount: any;
83
+ activeCount: {
84
+ defaultValue<T = unknown>(arg: T): {
85
+ deprecated: import("react-desc").PropTypesDescValidator;
86
+ };
87
+ isRequired: import("react-desc").PropTypesDescValidator;
88
+ };
28
89
  };
29
90
  export declare const defaultProps: {
30
91
  disabled: boolean;
31
92
  value: string;
32
93
  placeholder: string;
33
- mask: any;
94
+ mask: string;
34
95
  onBlur: () => null;
35
96
  onChange: () => null;
36
97
  onSearch: () => null;