@elliemae/ds-zipcode-search 3.0.0-alpha.0 → 3.0.0-alpha.1
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/DSZipCodeSearch.js +15 -3
- package/dist/cjs/DSZipCodeSearch.js.map +1 -1
- package/dist/cjs/components/helper.js +18 -1
- package/dist/cjs/components/helper.js.map +1 -1
- package/dist/esm/DSZipCodeSearch.js +17 -3
- package/dist/esm/DSZipCodeSearch.js.map +1 -1
- package/dist/esm/components/helper.js +20 -1
- package/dist/esm/components/helper.js.map +1 -1
- package/package.json +5 -4
- package/dist/types/DSZipCodeSearch.d.ts +0 -113
- package/dist/types/components/blocks.d.ts +0 -2
- package/dist/types/components/helper.d.ts +0 -10
- package/dist/types/index.d.ts +0 -2
- package/dist/types/props.d.ts +0 -102
- package/dist/types/tests/DSZipCodeSearch.test.d.ts +0 -1
|
@@ -2,8 +2,22 @@ var __create = Object.create;
|
|
|
2
2
|
var __defProp = Object.defineProperty;
|
|
3
3
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
4
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
5
6
|
var __getProtoOf = Object.getPrototypeOf;
|
|
6
7
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
+
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
9
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
10
|
+
var __spreadValues = (a, b) => {
|
|
11
|
+
for (var prop in b || (b = {}))
|
|
12
|
+
if (__hasOwnProp.call(b, prop))
|
|
13
|
+
__defNormalProp(a, prop, b[prop]);
|
|
14
|
+
if (__getOwnPropSymbols)
|
|
15
|
+
for (var prop of __getOwnPropSymbols(b)) {
|
|
16
|
+
if (__propIsEnum.call(b, prop))
|
|
17
|
+
__defNormalProp(a, prop, b[prop]);
|
|
18
|
+
}
|
|
19
|
+
return a;
|
|
20
|
+
};
|
|
7
21
|
var __markAsModule = (target) => __defProp(target, "__esModule", { value: true });
|
|
8
22
|
var __export = (target, all) => {
|
|
9
23
|
for (var name in all)
|
|
@@ -94,9 +108,7 @@ const DSZipCodeSearch = ({
|
|
|
94
108
|
setIsOpen(false);
|
|
95
109
|
onClose();
|
|
96
110
|
}, [onChange, onClose]);
|
|
97
|
-
return /* @__PURE__ */ import_react.default.createElement(import_blocks.InputSearchWrapper, {
|
|
98
|
-
...containerProps
|
|
99
|
-
}, /* @__PURE__ */ import_react.default.createElement(import_ds_dropdownmenu.default, {
|
|
111
|
+
return /* @__PURE__ */ import_react.default.createElement(import_blocks.InputSearchWrapper, __spreadValues({}, containerProps), /* @__PURE__ */ import_react.default.createElement(import_ds_dropdownmenu.default, {
|
|
100
112
|
isOpen: isOpen && options.length > 0,
|
|
101
113
|
menuProps: { className: "input-search-menu" },
|
|
102
114
|
onClose,
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/DSZipCodeSearch.tsx", "../../../../scripts/build/transpile/react-shim.js"],
|
|
4
4
|
"sourcesContent": ["/* eslint-disable no-useless-escape */\n/* eslint-disable max-lines */\n/* eslint-disable indent */\nimport React, { useState, useEffect, useRef, useCallback } from 'react';\nimport { describe } from 'react-desc';\nimport DSDropdownMenu from '@elliemae/ds-dropdownmenu';\nimport { DSInputMask } from '@elliemae/ds-form';\nimport { InputSearchWrapper } from './components/blocks';\nimport { createDisabledOption, noAddonOptions } from './components/helper';\nimport { zipcodeSearchProps, defaultProps } from './props';\n\nconst DSZipCodeSearch = ({\n disabled,\n value,\n placeholder,\n mask,\n onBlur,\n onChange,\n onSearch,\n containerProps,\n selectRightOptions,\n activeCount,\n options,\n tabIndex,\n}) => {\n const ref = useRef(null);\n const [searchValue, setSearchValue] = useState(value);\n const [isOpen, setIsOpen] = useState(false);\n const [isActive, setIsActive] = useState(false);\n const [isInputFocus, setIsInputFocus] = useState(false);\n const [isSelected, setIsSelected] = useState(false);\n\n useEffect(() => {\n if (isInputFocus && activeCount <= searchValue.length && !isSelected) {\n setIsOpen(true);\n setIsActive(true);\n } else if (!isActive || activeCount > searchValue.length) {\n setIsOpen(false);\n }\n }, [isInputFocus, isActive, activeCount, searchValue, isSelected]);\n useEffect(() => {\n setSearchValue(value || '');\n }, [value]);\n\n const onTypeInInput = useCallback(\n (e) => {\n const finalVal = e.target.value;\n onSearch(finalVal);\n setSearchValue(finalVal);\n setIsSelected(false);\n },\n [onSearch],\n );\n\n const onFocusInput = useCallback(() => {\n setIsInputFocus(true);\n }, []);\n\n const onInnerBlur = useCallback(\n (e) => {\n setIsInputFocus(false);\n onBlur(e);\n },\n [onBlur],\n );\n const onClose = useCallback(() => {\n setIsActive(false);\n }, []);\n const onSelectItem = useCallback(\n (item) => {\n setSearchValue(item.value);\n onChange(item);\n setIsSelected(true);\n ref.current.focus();\n setIsOpen(false);\n onClose();\n },\n [onChange, onClose],\n );\n\n return (\n <InputSearchWrapper {...containerProps}>\n <DSDropdownMenu\n isOpen={isOpen && options.length > 0}\n menuProps={{ className: 'input-search-menu' }}\n onClose={onClose}\n onSelectMenuItem={onSelectItem}\n contentStyle={{\n maxHeight: 200,\n }}\n options={options.length > 0 ? [createDisabledOption(selectRightOptions), ...noAddonOptions(options)] : []}\n triggerComponent={\n <div>\n <DSInputMask\n disabled={disabled}\n innerRef={(_ref) => (ref.current = _ref)}\n mask={mask}\n onBlur={onInnerBlur}\n onChange={onTypeInInput}\n onFocus={onFocusInput}\n placeholder={placeholder}\n value={searchValue}\n tabIndex={tabIndex}\n />\n </div>\n }\n />\n </InputSearchWrapper>\n );\n};\n\nDSZipCodeSearch.propTypes = zipcodeSearchProps;\n\nDSZipCodeSearch.defaultProps = defaultProps;\n\nconst ZipCodeSearchWithSchema = describe(DSZipCodeSearch);\nZipCodeSearchWithSchema.propTypes = zipcodeSearchProps;\n\nexport { DSZipCodeSearch, ZipCodeSearchWithSchema };\nexport default DSZipCodeSearch;\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
-
"mappings": "
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADGvB,mBAAgE;AAChE,wBAAyB;AACzB,6BAA2B;AAC3B,qBAA4B;AAC5B,oBAAmC;AACnC,oBAAqD;AACrD,mBAAiD;AAEjD,MAAM,kBAAkB,CAAC;AAAA,EACvB;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,MACI;AACJ,QAAM,MAAM,yBAAO;AACnB,QAAM,CAAC,aAAa,kBAAkB,2BAAS;AAC/C,QAAM,CAAC,QAAQ,aAAa,2BAAS;AACrC,QAAM,CAAC,UAAU,eAAe,2BAAS;AACzC,QAAM,CAAC,cAAc,mBAAmB,2BAAS;AACjD,QAAM,CAAC,YAAY,iBAAiB,2BAAS;AAE7C,8BAAU,MAAM;AACd,QAAI,gBAAgB,eAAe,YAAY,UAAU,CAAC,YAAY;AACpE,gBAAU;AACV,kBAAY;AAAA,eACH,CAAC,YAAY,cAAc,YAAY,QAAQ;AACxD,gBAAU;AAAA;AAAA,KAEX,CAAC,cAAc,UAAU,aAAa,aAAa;AACtD,8BAAU,MAAM;AACd,mBAAe,SAAS;AAAA,KACvB,CAAC;AAEJ,QAAM,gBAAgB,8BACpB,CAAC,MAAM;AACL,UAAM,WAAW,EAAE,OAAO;AAC1B,aAAS;AACT,mBAAe;AACf,kBAAc;AAAA,KAEhB,CAAC;AAGH,QAAM,eAAe,8BAAY,MAAM;AACrC,oBAAgB;AAAA,KACf;AAEH,QAAM,cAAc,8BAClB,CAAC,MAAM;AACL,oBAAgB;AAChB,WAAO;AAAA,KAET,CAAC;AAEH,QAAM,UAAU,8BAAY,MAAM;AAChC,gBAAY;AAAA,KACX;AACH,QAAM,eAAe,8BACnB,CAAC,SAAS;AACR,mBAAe,KAAK;AACpB,aAAS;AACT,kBAAc;AACd,QAAI,QAAQ;AACZ,cAAU;AACV;AAAA,KAEF,CAAC,UAAU;AAGb,SACE,mDAAC,kCAAD,mBAAwB,iBACtB,mDAAC,gCAAD;AAAA,IACE,QAAQ,UAAU,QAAQ,SAAS;AAAA,IACnC,WAAW,EAAE,WAAW;AAAA,IACxB;AAAA,IACA,kBAAkB;AAAA,IAClB,cAAc;AAAA,MACZ,WAAW;AAAA;AAAA,IAEb,SAAS,QAAQ,SAAS,IAAI,CAAC,wCAAqB,qBAAqB,GAAG,kCAAe,YAAY;AAAA,IACvG,kBACE,mDAAC,OAAD,MACE,mDAAC,4BAAD;AAAA,MACE;AAAA,MACA,UAAU,CAAC,SAAU,IAAI,UAAU;AAAA,MACnC;AAAA,MACA,QAAQ;AAAA,MACR,UAAU;AAAA,MACV,SAAS;AAAA,MACT;AAAA,MACA,OAAO;AAAA,MACP;AAAA;AAAA;AAAA;AASd,gBAAgB,YAAY;AAE5B,gBAAgB,eAAe;AAE/B,MAAM,0BAA0B,gCAAS;AACzC,wBAAwB,YAAY;AAGpC,IAAO,0BAAQ;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,9 +1,26 @@
|
|
|
1
1
|
var __create = Object.create;
|
|
2
2
|
var __defProp = Object.defineProperty;
|
|
3
|
+
var __defProps = Object.defineProperties;
|
|
3
4
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
4
6
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
7
|
+
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
5
8
|
var __getProtoOf = Object.getPrototypeOf;
|
|
6
9
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
10
|
+
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
11
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
12
|
+
var __spreadValues = (a, b) => {
|
|
13
|
+
for (var prop in b || (b = {}))
|
|
14
|
+
if (__hasOwnProp.call(b, prop))
|
|
15
|
+
__defNormalProp(a, prop, b[prop]);
|
|
16
|
+
if (__getOwnPropSymbols)
|
|
17
|
+
for (var prop of __getOwnPropSymbols(b)) {
|
|
18
|
+
if (__propIsEnum.call(b, prop))
|
|
19
|
+
__defNormalProp(a, prop, b[prop]);
|
|
20
|
+
}
|
|
21
|
+
return a;
|
|
22
|
+
};
|
|
23
|
+
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
7
24
|
var __markAsModule = (target) => __defProp(target, "__esModule", { value: true });
|
|
8
25
|
var __export = (target, all) => {
|
|
9
26
|
for (var name in all)
|
|
@@ -43,7 +60,7 @@ function createDisabledOption(label) {
|
|
|
43
60
|
};
|
|
44
61
|
}
|
|
45
62
|
function noAddonOptions(options) {
|
|
46
|
-
return options.map((op) => ({
|
|
63
|
+
return options.map((op) => __spreadProps(__spreadValues({}, op), { noAddon: true }));
|
|
47
64
|
}
|
|
48
65
|
module.exports = __toCommonJS(helper_exports);
|
|
49
66
|
//# sourceMappingURL=helper.js.map
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/components/helper.tsx", "../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
4
|
"sourcesContent": ["export function createDisabledOption(label) {\n return {\n id: 'no-option',\n type: 'disabled',\n label,\n noAddon: true,\n 'aria-disabled': true,\n className: 'no-options',\n tabIndex: -1,\n };\n}\n\nexport function noAddonOptions(options) {\n return options.map(op => ({ ...op, noAddon: true }));\n}\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
-
"mappings": "
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAhB,8BAA8B,OAAO;AAC1C,SAAO;AAAA,IACL,IAAI;AAAA,IACJ,MAAM;AAAA,IACN;AAAA,IACA,SAAS;AAAA,IACT,iBAAiB;AAAA,IACjB,WAAW;AAAA,IACX,UAAU;AAAA;AAAA;AAIP,wBAAwB,SAAS;AACtC,SAAO,QAAQ,IAAI,QAAO,iCAAK,KAAL,EAAS,SAAS;AAAA;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,3 +1,19 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
3
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
4
|
+
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
5
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
6
|
+
var __spreadValues = (a, b) => {
|
|
7
|
+
for (var prop in b || (b = {}))
|
|
8
|
+
if (__hasOwnProp.call(b, prop))
|
|
9
|
+
__defNormalProp(a, prop, b[prop]);
|
|
10
|
+
if (__getOwnPropSymbols)
|
|
11
|
+
for (var prop of __getOwnPropSymbols(b)) {
|
|
12
|
+
if (__propIsEnum.call(b, prop))
|
|
13
|
+
__defNormalProp(a, prop, b[prop]);
|
|
14
|
+
}
|
|
15
|
+
return a;
|
|
16
|
+
};
|
|
1
17
|
import * as React from "react";
|
|
2
18
|
import React2, { useState, useEffect, useRef, useCallback } from "react";
|
|
3
19
|
import { describe } from "react-desc";
|
|
@@ -61,9 +77,7 @@ const DSZipCodeSearch = ({
|
|
|
61
77
|
setIsOpen(false);
|
|
62
78
|
onClose();
|
|
63
79
|
}, [onChange, onClose]);
|
|
64
|
-
return /* @__PURE__ */ React2.createElement(InputSearchWrapper, {
|
|
65
|
-
...containerProps
|
|
66
|
-
}, /* @__PURE__ */ React2.createElement(DSDropdownMenu, {
|
|
80
|
+
return /* @__PURE__ */ React2.createElement(InputSearchWrapper, __spreadValues({}, containerProps), /* @__PURE__ */ React2.createElement(DSDropdownMenu, {
|
|
67
81
|
isOpen: isOpen && options.length > 0,
|
|
68
82
|
menuProps: { className: "input-search-menu" },
|
|
69
83
|
onClose,
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../scripts/build/transpile/react-shim.js", "../../src/DSZipCodeSearch.tsx"],
|
|
4
4
|
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable no-useless-escape */\n/* eslint-disable max-lines */\n/* eslint-disable indent */\nimport React, { useState, useEffect, useRef, useCallback } from 'react';\nimport { describe } from 'react-desc';\nimport DSDropdownMenu from '@elliemae/ds-dropdownmenu';\nimport { DSInputMask } from '@elliemae/ds-form';\nimport { InputSearchWrapper } from './components/blocks';\nimport { createDisabledOption, noAddonOptions } from './components/helper';\nimport { zipcodeSearchProps, defaultProps } from './props';\n\nconst DSZipCodeSearch = ({\n disabled,\n value,\n placeholder,\n mask,\n onBlur,\n onChange,\n onSearch,\n containerProps,\n selectRightOptions,\n activeCount,\n options,\n tabIndex,\n}) => {\n const ref = useRef(null);\n const [searchValue, setSearchValue] = useState(value);\n const [isOpen, setIsOpen] = useState(false);\n const [isActive, setIsActive] = useState(false);\n const [isInputFocus, setIsInputFocus] = useState(false);\n const [isSelected, setIsSelected] = useState(false);\n\n useEffect(() => {\n if (isInputFocus && activeCount <= searchValue.length && !isSelected) {\n setIsOpen(true);\n setIsActive(true);\n } else if (!isActive || activeCount > searchValue.length) {\n setIsOpen(false);\n }\n }, [isInputFocus, isActive, activeCount, searchValue, isSelected]);\n useEffect(() => {\n setSearchValue(value || '');\n }, [value]);\n\n const onTypeInInput = useCallback(\n (e) => {\n const finalVal = e.target.value;\n onSearch(finalVal);\n setSearchValue(finalVal);\n setIsSelected(false);\n },\n [onSearch],\n );\n\n const onFocusInput = useCallback(() => {\n setIsInputFocus(true);\n }, []);\n\n const onInnerBlur = useCallback(\n (e) => {\n setIsInputFocus(false);\n onBlur(e);\n },\n [onBlur],\n );\n const onClose = useCallback(() => {\n setIsActive(false);\n }, []);\n const onSelectItem = useCallback(\n (item) => {\n setSearchValue(item.value);\n onChange(item);\n setIsSelected(true);\n ref.current.focus();\n setIsOpen(false);\n onClose();\n },\n [onChange, onClose],\n );\n\n return (\n <InputSearchWrapper {...containerProps}>\n <DSDropdownMenu\n isOpen={isOpen && options.length > 0}\n menuProps={{ className: 'input-search-menu' }}\n onClose={onClose}\n onSelectMenuItem={onSelectItem}\n contentStyle={{\n maxHeight: 200,\n }}\n options={options.length > 0 ? [createDisabledOption(selectRightOptions), ...noAddonOptions(options)] : []}\n triggerComponent={\n <div>\n <DSInputMask\n disabled={disabled}\n innerRef={(_ref) => (ref.current = _ref)}\n mask={mask}\n onBlur={onInnerBlur}\n onChange={onTypeInInput}\n onFocus={onFocusInput}\n placeholder={placeholder}\n value={searchValue}\n tabIndex={tabIndex}\n />\n </div>\n }\n />\n </InputSearchWrapper>\n );\n};\n\nDSZipCodeSearch.propTypes = zipcodeSearchProps;\n\nDSZipCodeSearch.defaultProps = defaultProps;\n\nconst ZipCodeSearchWithSchema = describe(DSZipCodeSearch);\nZipCodeSearchWithSchema.propTypes = zipcodeSearchProps;\n\nexport { DSZipCodeSearch, ZipCodeSearchWithSchema };\nexport default DSZipCodeSearch;\n"],
|
|
5
|
-
"mappings": "AAAA;ACGA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA,MAAM,kBAAkB,CAAC;AAAA,EACvB;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,MACI;AACJ,QAAM,MAAM,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,MACnC;AAAA,MACA,QAAQ;AAAA,MACR,UAAU;AAAA,MACV,SAAS;AAAA,MACT;AAAA,MACA,OAAO;AAAA,MACP;AAAA;AAAA;AAAA;AASd,gBAAgB,YAAY;AAE5B,gBAAgB,eAAe;AAE/B,MAAM,0BAA0B,SAAS;AACzC,wBAAwB,YAAY;AAGpC,IAAO,0BAAQ;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,3 +1,22 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __defProps = Object.defineProperties;
|
|
3
|
+
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
4
|
+
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
7
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
8
|
+
var __spreadValues = (a, b) => {
|
|
9
|
+
for (var prop in b || (b = {}))
|
|
10
|
+
if (__hasOwnProp.call(b, prop))
|
|
11
|
+
__defNormalProp(a, prop, b[prop]);
|
|
12
|
+
if (__getOwnPropSymbols)
|
|
13
|
+
for (var prop of __getOwnPropSymbols(b)) {
|
|
14
|
+
if (__propIsEnum.call(b, prop))
|
|
15
|
+
__defNormalProp(a, prop, b[prop]);
|
|
16
|
+
}
|
|
17
|
+
return a;
|
|
18
|
+
};
|
|
19
|
+
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
1
20
|
import * as React from "react";
|
|
2
21
|
function createDisabledOption(label) {
|
|
3
22
|
return {
|
|
@@ -11,7 +30,7 @@ function createDisabledOption(label) {
|
|
|
11
30
|
};
|
|
12
31
|
}
|
|
13
32
|
function noAddonOptions(options) {
|
|
14
|
-
return options.map((op) => ({
|
|
33
|
+
return options.map((op) => __spreadProps(__spreadValues({}, op), { noAddon: true }));
|
|
15
34
|
}
|
|
16
35
|
export {
|
|
17
36
|
createDisabledOption,
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../../src/components/helper.tsx"],
|
|
4
4
|
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "export function createDisabledOption(label) {\n return {\n id: 'no-option',\n type: 'disabled',\n label,\n noAddon: true,\n 'aria-disabled': true,\n className: 'no-options',\n tabIndex: -1,\n };\n}\n\nexport function noAddonOptions(options) {\n return options.map(op => ({ ...op, noAddon: true }));\n}\n"],
|
|
5
|
-
"mappings": "AAAA;ACAO,8BAA8B,OAAO;AAC1C,SAAO;AAAA,IACL,IAAI;AAAA,IACJ,MAAM;AAAA,IACN;AAAA,IACA,SAAS;AAAA,IACT,iBAAiB;AAAA,IACjB,WAAW;AAAA,IACX,UAAU;AAAA;AAAA;AAIP,wBAAwB,SAAS;AACtC,SAAO,QAAQ,IAAI,QAAO,
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;AAAA;ACAO,8BAA8B,OAAO;AAC1C,SAAO;AAAA,IACL,IAAI;AAAA,IACJ,MAAM;AAAA,IACN;AAAA,IACA,SAAS;AAAA,IACT,iBAAiB;AAAA,IACjB,WAAW;AAAA,IACX,UAAU;AAAA;AAAA;AAIP,wBAAwB,SAAS;AACtC,SAAO,QAAQ,IAAI,QAAO,iCAAK,KAAL,EAAS,SAAS;AAAA;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@elliemae/ds-zipcode-search",
|
|
3
|
-
"version": "3.0.0-alpha.
|
|
3
|
+
"version": "3.0.0-alpha.1",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"description": "ICE MT - Dimsum - Zipcode Search",
|
|
6
6
|
"files": [
|
|
@@ -51,9 +51,9 @@
|
|
|
51
51
|
"indent": 4
|
|
52
52
|
},
|
|
53
53
|
"dependencies": {
|
|
54
|
-
"@elliemae/ds-classnames": "3.0.0-alpha.
|
|
55
|
-
"@elliemae/ds-dropdownmenu": "3.0.0-alpha.
|
|
56
|
-
"@elliemae/ds-form": "3.0.0-alpha.
|
|
54
|
+
"@elliemae/ds-classnames": "3.0.0-alpha.1",
|
|
55
|
+
"@elliemae/ds-dropdownmenu": "3.0.0-alpha.1",
|
|
56
|
+
"@elliemae/ds-form": "3.0.0-alpha.1",
|
|
57
57
|
"react-desc": "~4.1.3"
|
|
58
58
|
},
|
|
59
59
|
"devDependencies": {
|
|
@@ -73,6 +73,7 @@
|
|
|
73
73
|
"dev": "cross-env NODE_ENV=development node ../../scripts/build/build.mjs --watch",
|
|
74
74
|
"test": "node ../../scripts/testing/test.mjs",
|
|
75
75
|
"lint": "node ../../scripts/lint.mjs",
|
|
76
|
+
"dts": "node ../../scripts/dts.mjs",
|
|
76
77
|
"build": "cross-env NODE_ENV=production node ../../scripts/build/build.mjs"
|
|
77
78
|
}
|
|
78
79
|
}
|
|
@@ -1,113 +0,0 @@
|
|
|
1
|
-
/// <reference path="../../../../shared/typings/react-desc.d.ts" />
|
|
2
|
-
/// <reference types="react" />
|
|
3
|
-
declare const DSZipCodeSearch: {
|
|
4
|
-
({ disabled, value, placeholder, mask, onBlur, onChange, onSearch, containerProps, selectRightOptions, activeCount, options, tabIndex, }: {
|
|
5
|
-
disabled: any;
|
|
6
|
-
value: any;
|
|
7
|
-
placeholder: any;
|
|
8
|
-
mask: any;
|
|
9
|
-
onBlur: any;
|
|
10
|
-
onChange: any;
|
|
11
|
-
onSearch: any;
|
|
12
|
-
containerProps: any;
|
|
13
|
-
selectRightOptions: any;
|
|
14
|
-
activeCount: any;
|
|
15
|
-
options: any;
|
|
16
|
-
tabIndex: any;
|
|
17
|
-
}): JSX.Element;
|
|
18
|
-
propTypes: {
|
|
19
|
-
className: {
|
|
20
|
-
defaultValue(arg: import("react-desc").ReactDescPossibleDefaultValues): {
|
|
21
|
-
deprecated: import("react-desc").PropTypesDescValidator;
|
|
22
|
-
};
|
|
23
|
-
isRequired: import("react-desc").PropTypesDescValue;
|
|
24
|
-
};
|
|
25
|
-
containerProps: {
|
|
26
|
-
defaultValue(arg: import("react-desc").ReactDescPossibleDefaultValues): {
|
|
27
|
-
deprecated: import("react-desc").PropTypesDescValidator;
|
|
28
|
-
};
|
|
29
|
-
isRequired: import("react-desc").PropTypesDescValue;
|
|
30
|
-
};
|
|
31
|
-
tabIndex: {
|
|
32
|
-
defaultValue(arg: import("react-desc").ReactDescPossibleDefaultValues): {
|
|
33
|
-
deprecated: import("react-desc").PropTypesDescValidator;
|
|
34
|
-
};
|
|
35
|
-
isRequired: import("react-desc").PropTypesDescValue;
|
|
36
|
-
};
|
|
37
|
-
disabled: {
|
|
38
|
-
defaultValue(arg: import("react-desc").ReactDescPossibleDefaultValues): {
|
|
39
|
-
deprecated: import("react-desc").PropTypesDescValidator;
|
|
40
|
-
};
|
|
41
|
-
isRequired: import("react-desc").PropTypesDescValue;
|
|
42
|
-
};
|
|
43
|
-
value: import("react-desc").PropTypesDescValue;
|
|
44
|
-
onBlur: {
|
|
45
|
-
defaultValue(arg: import("react-desc").ReactDescPossibleDefaultValues): {
|
|
46
|
-
deprecated: import("react-desc").PropTypesDescValidator;
|
|
47
|
-
};
|
|
48
|
-
isRequired: import("react-desc").PropTypesDescValue;
|
|
49
|
-
};
|
|
50
|
-
onChange: {
|
|
51
|
-
defaultValue(arg: import("react-desc").ReactDescPossibleDefaultValues): {
|
|
52
|
-
deprecated: import("react-desc").PropTypesDescValidator;
|
|
53
|
-
};
|
|
54
|
-
isRequired: import("react-desc").PropTypesDescValue;
|
|
55
|
-
};
|
|
56
|
-
options: {
|
|
57
|
-
defaultValue(arg: import("react-desc").ReactDescPossibleDefaultValues): {
|
|
58
|
-
deprecated: import("react-desc").PropTypesDescValidator;
|
|
59
|
-
};
|
|
60
|
-
isRequired: import("react-desc").PropTypesDescValue;
|
|
61
|
-
};
|
|
62
|
-
placeholder: {
|
|
63
|
-
defaultValue(arg: import("react-desc").ReactDescPossibleDefaultValues): {
|
|
64
|
-
deprecated: import("react-desc").PropTypesDescValidator;
|
|
65
|
-
};
|
|
66
|
-
isRequired: import("react-desc").PropTypesDescValue;
|
|
67
|
-
};
|
|
68
|
-
mask: {
|
|
69
|
-
defaultValue(arg: import("react-desc").ReactDescPossibleDefaultValues): {
|
|
70
|
-
deprecated: import("react-desc").PropTypesDescValidator;
|
|
71
|
-
};
|
|
72
|
-
isRequired: import("react-desc").PropTypesDescValue;
|
|
73
|
-
};
|
|
74
|
-
onSearch: {
|
|
75
|
-
defaultValue(arg: import("react-desc").ReactDescPossibleDefaultValues): {
|
|
76
|
-
deprecated: import("react-desc").PropTypesDescValidator;
|
|
77
|
-
};
|
|
78
|
-
isRequired: import("react-desc").PropTypesDescValue;
|
|
79
|
-
};
|
|
80
|
-
selectRightOptions: {
|
|
81
|
-
defaultValue(arg: import("react-desc").ReactDescPossibleDefaultValues): {
|
|
82
|
-
deprecated: import("react-desc").PropTypesDescValidator;
|
|
83
|
-
};
|
|
84
|
-
isRequired: import("react-desc").PropTypesDescValue;
|
|
85
|
-
};
|
|
86
|
-
activeCount: {
|
|
87
|
-
defaultValue(arg: import("react-desc").ReactDescPossibleDefaultValues): {
|
|
88
|
-
deprecated: import("react-desc").PropTypesDescValidator;
|
|
89
|
-
};
|
|
90
|
-
isRequired: import("react-desc").PropTypesDescValue;
|
|
91
|
-
};
|
|
92
|
-
};
|
|
93
|
-
defaultProps: {
|
|
94
|
-
disabled: boolean;
|
|
95
|
-
value: string;
|
|
96
|
-
placeholder: string;
|
|
97
|
-
mask: string;
|
|
98
|
-
onBlur: () => null;
|
|
99
|
-
onChange: () => null;
|
|
100
|
-
onSearch: () => null;
|
|
101
|
-
containerProps: {};
|
|
102
|
-
selectRightOptions: string;
|
|
103
|
-
activeCount: number;
|
|
104
|
-
options: never[];
|
|
105
|
-
};
|
|
106
|
-
};
|
|
107
|
-
declare const ZipCodeSearchWithSchema: {
|
|
108
|
-
(props?: unknown): JSX.Element;
|
|
109
|
-
propTypes: unknown;
|
|
110
|
-
toTypescript: () => import("react-desc").TypescriptSchema;
|
|
111
|
-
};
|
|
112
|
-
export { DSZipCodeSearch, ZipCodeSearchWithSchema };
|
|
113
|
-
export default DSZipCodeSearch;
|
package/dist/types/index.d.ts
DELETED
package/dist/types/props.d.ts
DELETED
|
@@ -1,102 +0,0 @@
|
|
|
1
|
-
/// <reference path="../../../../shared/typings/react-desc.d.ts" />
|
|
2
|
-
export declare const zipcodeSearchProps: {
|
|
3
|
-
/** html class attribute */
|
|
4
|
-
className: {
|
|
5
|
-
defaultValue(arg: import("react-desc").ReactDescPossibleDefaultValues): {
|
|
6
|
-
deprecated: import("react-desc").PropTypesDescValidator;
|
|
7
|
-
};
|
|
8
|
-
isRequired: import("react-desc").PropTypesDescValue;
|
|
9
|
-
};
|
|
10
|
-
/** Set of Properties attached to the main container */
|
|
11
|
-
containerProps: {
|
|
12
|
-
defaultValue(arg: import("react-desc").ReactDescPossibleDefaultValues): {
|
|
13
|
-
deprecated: import("react-desc").PropTypesDescValidator;
|
|
14
|
-
};
|
|
15
|
-
isRequired: import("react-desc").PropTypesDescValue;
|
|
16
|
-
};
|
|
17
|
-
/** native tabindex property to handle focus order */
|
|
18
|
-
tabIndex: {
|
|
19
|
-
defaultValue(arg: import("react-desc").ReactDescPossibleDefaultValues): {
|
|
20
|
-
deprecated: import("react-desc").PropTypesDescValidator;
|
|
21
|
-
};
|
|
22
|
-
isRequired: import("react-desc").PropTypesDescValue;
|
|
23
|
-
};
|
|
24
|
-
/** disable component */
|
|
25
|
-
disabled: {
|
|
26
|
-
defaultValue(arg: import("react-desc").ReactDescPossibleDefaultValues): {
|
|
27
|
-
deprecated: import("react-desc").PropTypesDescValidator;
|
|
28
|
-
};
|
|
29
|
-
isRequired: import("react-desc").PropTypesDescValue;
|
|
30
|
-
};
|
|
31
|
-
/** input value */
|
|
32
|
-
value: import("react-desc").PropTypesDescValue;
|
|
33
|
-
/** function called on blur */
|
|
34
|
-
onBlur: {
|
|
35
|
-
defaultValue(arg: import("react-desc").ReactDescPossibleDefaultValues): {
|
|
36
|
-
deprecated: import("react-desc").PropTypesDescValidator;
|
|
37
|
-
};
|
|
38
|
-
isRequired: import("react-desc").PropTypesDescValue;
|
|
39
|
-
};
|
|
40
|
-
/** function called on change */
|
|
41
|
-
onChange: {
|
|
42
|
-
defaultValue(arg: import("react-desc").ReactDescPossibleDefaultValues): {
|
|
43
|
-
deprecated: import("react-desc").PropTypesDescValidator;
|
|
44
|
-
};
|
|
45
|
-
isRequired: import("react-desc").PropTypesDescValue;
|
|
46
|
-
};
|
|
47
|
-
/** options to display */
|
|
48
|
-
options: {
|
|
49
|
-
defaultValue(arg: import("react-desc").ReactDescPossibleDefaultValues): {
|
|
50
|
-
deprecated: import("react-desc").PropTypesDescValidator;
|
|
51
|
-
};
|
|
52
|
-
isRequired: import("react-desc").PropTypesDescValue;
|
|
53
|
-
};
|
|
54
|
-
/** placeholder value */
|
|
55
|
-
placeholder: {
|
|
56
|
-
defaultValue(arg: import("react-desc").ReactDescPossibleDefaultValues): {
|
|
57
|
-
deprecated: import("react-desc").PropTypesDescValidator;
|
|
58
|
-
};
|
|
59
|
-
isRequired: import("react-desc").PropTypesDescValue;
|
|
60
|
-
};
|
|
61
|
-
/** format mask to apply */
|
|
62
|
-
mask: {
|
|
63
|
-
defaultValue(arg: import("react-desc").ReactDescPossibleDefaultValues): {
|
|
64
|
-
deprecated: import("react-desc").PropTypesDescValidator;
|
|
65
|
-
};
|
|
66
|
-
isRequired: import("react-desc").PropTypesDescValue;
|
|
67
|
-
};
|
|
68
|
-
/** function called onsearch */
|
|
69
|
-
onSearch: {
|
|
70
|
-
defaultValue(arg: import("react-desc").ReactDescPossibleDefaultValues): {
|
|
71
|
-
deprecated: import("react-desc").PropTypesDescValidator;
|
|
72
|
-
};
|
|
73
|
-
isRequired: import("react-desc").PropTypesDescValue;
|
|
74
|
-
};
|
|
75
|
-
/** Correction messange */
|
|
76
|
-
selectRightOptions: {
|
|
77
|
-
defaultValue(arg: import("react-desc").ReactDescPossibleDefaultValues): {
|
|
78
|
-
deprecated: import("react-desc").PropTypesDescValidator;
|
|
79
|
-
};
|
|
80
|
-
isRequired: import("react-desc").PropTypesDescValue;
|
|
81
|
-
};
|
|
82
|
-
/** current amount */
|
|
83
|
-
activeCount: {
|
|
84
|
-
defaultValue(arg: import("react-desc").ReactDescPossibleDefaultValues): {
|
|
85
|
-
deprecated: import("react-desc").PropTypesDescValidator;
|
|
86
|
-
};
|
|
87
|
-
isRequired: import("react-desc").PropTypesDescValue;
|
|
88
|
-
};
|
|
89
|
-
};
|
|
90
|
-
export declare const defaultProps: {
|
|
91
|
-
disabled: boolean;
|
|
92
|
-
value: string;
|
|
93
|
-
placeholder: string;
|
|
94
|
-
mask: string;
|
|
95
|
-
onBlur: () => null;
|
|
96
|
-
onChange: () => null;
|
|
97
|
-
onSearch: () => null;
|
|
98
|
-
containerProps: {};
|
|
99
|
-
selectRightOptions: string;
|
|
100
|
-
activeCount: number;
|
|
101
|
-
options: never[];
|
|
102
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|