@elliemae/ds-zipcode-search 3.0.0-next.9 → 3.0.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 +10 -16
- package/dist/cjs/DSZipCodeSearch.js.map +2 -2
- package/dist/cjs/components/blocks.js +9 -16
- package/dist/cjs/components/blocks.js.map +1 -1
- package/dist/cjs/components/helper.js +9 -16
- package/dist/cjs/components/helper.js.map +1 -1
- package/dist/cjs/index.js +11 -17
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/props.js +9 -16
- package/dist/cjs/props.js.map +1 -1
- package/dist/esm/DSZipCodeSearch.js +1 -0
- package/dist/esm/DSZipCodeSearch.js.map +2 -2
- package/dist/esm/components/blocks.js.map +1 -1
- package/dist/esm/components/helper.js.map +1 -1
- package/dist/esm/props.js.map +1 -1
- package/package.json +12 -12
|
@@ -18,33 +18,27 @@ var __spreadValues = (a, b) => {
|
|
|
18
18
|
}
|
|
19
19
|
return a;
|
|
20
20
|
};
|
|
21
|
-
var __markAsModule = (target) => __defProp(target, "__esModule", { value: true });
|
|
22
21
|
var __export = (target, all) => {
|
|
23
22
|
for (var name in all)
|
|
24
23
|
__defProp(target, name, { get: all[name], enumerable: true });
|
|
25
24
|
};
|
|
26
|
-
var
|
|
27
|
-
if (
|
|
28
|
-
for (let key of __getOwnPropNames(
|
|
29
|
-
if (!__hasOwnProp.call(
|
|
30
|
-
__defProp(
|
|
25
|
+
var __copyProps = (to, from, except, desc) => {
|
|
26
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
27
|
+
for (let key of __getOwnPropNames(from))
|
|
28
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
29
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
31
30
|
}
|
|
32
|
-
return
|
|
31
|
+
return to;
|
|
33
32
|
};
|
|
34
|
-
var __toESM = (
|
|
35
|
-
|
|
36
|
-
};
|
|
37
|
-
var __toCommonJS = /* @__PURE__ */ ((cache) => {
|
|
38
|
-
return (module2, temp) => {
|
|
39
|
-
return cache && cache.get(module2) || (temp = __reExport(__markAsModule({}), module2, 1), cache && cache.set(module2, temp), temp);
|
|
40
|
-
};
|
|
41
|
-
})(typeof WeakMap !== "undefined" ? /* @__PURE__ */ new WeakMap() : 0);
|
|
33
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, mod));
|
|
34
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
42
35
|
var DSZipCodeSearch_exports = {};
|
|
43
36
|
__export(DSZipCodeSearch_exports, {
|
|
44
37
|
DSZipCodeSearch: () => DSZipCodeSearch,
|
|
45
38
|
ZipCodeSearchWithSchema: () => ZipCodeSearchWithSchema,
|
|
46
39
|
default: () => DSZipCodeSearch_default
|
|
47
40
|
});
|
|
41
|
+
module.exports = __toCommonJS(DSZipCodeSearch_exports);
|
|
48
42
|
var React = __toESM(require("react"));
|
|
49
43
|
var import_react = __toESM(require("react"));
|
|
50
44
|
var import_react_desc = require("react-desc");
|
|
@@ -132,8 +126,8 @@ const DSZipCodeSearch = ({
|
|
|
132
126
|
};
|
|
133
127
|
DSZipCodeSearch.propTypes = import_props.zipcodeSearchProps;
|
|
134
128
|
DSZipCodeSearch.defaultProps = import_props.defaultProps;
|
|
129
|
+
DSZipCodeSearch.displayName = "DSZipCodeSearch";
|
|
135
130
|
const ZipCodeSearchWithSchema = (0, import_react_desc.describe)(DSZipCodeSearch);
|
|
136
131
|
ZipCodeSearchWithSchema.propTypes = import_props.zipcodeSearchProps;
|
|
137
132
|
var DSZipCodeSearch_default = DSZipCodeSearch;
|
|
138
|
-
module.exports = __toCommonJS(DSZipCodeSearch_exports);
|
|
139
133
|
//# sourceMappingURL=DSZipCodeSearch.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/DSZipCodeSearch.tsx", "../../../../scripts/build/transpile/react-shim.js"],
|
|
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;\
|
|
5
|
-
"mappings": "
|
|
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;\nDSZipCodeSearch.displayName = 'DSZipCodeSearch';\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": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;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,IAAI;AACvB,QAAM,CAAC,aAAa,kBAAkB,2BAAS,KAAK;AACpD,QAAM,CAAC,QAAQ,aAAa,2BAAS,KAAK;AAC1C,QAAM,CAAC,UAAU,eAAe,2BAAS,KAAK;AAC9C,QAAM,CAAC,cAAc,mBAAmB,2BAAS,KAAK;AACtD,QAAM,CAAC,YAAY,iBAAiB,2BAAS,KAAK;AAElD,8BAAU,MAAM;AACd,QAAI,gBAAgB,eAAe,YAAY,UAAU,CAAC,YAAY;AACpE,gBAAU,IAAI;AACd,kBAAY,IAAI;AAAA,IAClB,WAAW,CAAC,YAAY,cAAc,YAAY,QAAQ;AACxD,gBAAU,KAAK;AAAA,IACjB;AAAA,EACF,GAAG,CAAC,cAAc,UAAU,aAAa,aAAa,UAAU,CAAC;AACjE,8BAAU,MAAM;AACd,mBAAe,SAAS,EAAE;AAAA,EAC5B,GAAG,CAAC,KAAK,CAAC;AAEV,QAAM,gBAAgB,8BACpB,CAAC,MAAM;AACL,UAAM,WAAW,EAAE,OAAO;AAC1B,aAAS,QAAQ;AACjB,mBAAe,QAAQ;AACvB,kBAAc,KAAK;AAAA,EACrB,GACA,CAAC,QAAQ,CACX;AAEA,QAAM,eAAe,8BAAY,MAAM;AACrC,oBAAgB,IAAI;AAAA,EACtB,GAAG,CAAC,CAAC;AAEL,QAAM,cAAc,8BAClB,CAAC,MAAM;AACL,oBAAgB,KAAK;AACrB,WAAO,CAAC;AAAA,EACV,GACA,CAAC,MAAM,CACT;AACA,QAAM,UAAU,8BAAY,MAAM;AAChC,gBAAY,KAAK;AAAA,EACnB,GAAG,CAAC,CAAC;AACL,QAAM,eAAe,8BACnB,CAAC,SAAS;AACR,mBAAe,KAAK,KAAK;AACzB,aAAS,IAAI;AACb,kBAAc,IAAI;AAClB,QAAI,QAAQ,MAAM;AAClB,cAAU,KAAK;AACf,YAAQ;AAAA,EACV,GACA,CAAC,UAAU,OAAO,CACpB;AAEA,SACE,mDAAC,qDAAuB,iBACtB,mDAAC;AAAA,IACC,QAAQ,UAAU,QAAQ,SAAS;AAAA,IACnC,WAAW,EAAE,WAAW,oBAAoB;AAAA,IAC5C;AAAA,IACA,kBAAkB;AAAA,IAClB,cAAc;AAAA,MACZ,WAAW;AAAA,IACb;AAAA,IACA,SAAS,QAAQ,SAAS,IAAI,CAAC,wCAAqB,kBAAkB,GAAG,GAAG,kCAAe,OAAO,CAAC,IAAI,CAAC;AAAA,IACxG,kBACE,mDAAC,aACC,mDAAC;AAAA,MACC;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,KACF,CACF;AAAA,GAEJ,CACF;AAEJ;AAEA,gBAAgB,YAAY;AAE5B,gBAAgB,eAAe;AAC/B,gBAAgB,cAAc;AAC9B,MAAM,0BAA0B,gCAAS,eAAe;AACxD,wBAAwB,YAAY;AAGpC,IAAO,0BAAQ;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -4,34 +4,27 @@ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
|
4
4
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
5
|
var __getProtoOf = Object.getPrototypeOf;
|
|
6
6
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
-
var __markAsModule = (target) => __defProp(target, "__esModule", { value: true });
|
|
8
7
|
var __export = (target, all) => {
|
|
9
8
|
for (var name in all)
|
|
10
9
|
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
10
|
};
|
|
12
|
-
var
|
|
13
|
-
if (
|
|
14
|
-
for (let key of __getOwnPropNames(
|
|
15
|
-
if (!__hasOwnProp.call(
|
|
16
|
-
__defProp(
|
|
11
|
+
var __copyProps = (to, from, except, desc) => {
|
|
12
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
13
|
+
for (let key of __getOwnPropNames(from))
|
|
14
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
15
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
17
16
|
}
|
|
18
|
-
return
|
|
17
|
+
return to;
|
|
19
18
|
};
|
|
20
|
-
var __toESM = (
|
|
21
|
-
|
|
22
|
-
};
|
|
23
|
-
var __toCommonJS = /* @__PURE__ */ ((cache) => {
|
|
24
|
-
return (module2, temp) => {
|
|
25
|
-
return cache && cache.get(module2) || (temp = __reExport(__markAsModule({}), module2, 1), cache && cache.set(module2, temp), temp);
|
|
26
|
-
};
|
|
27
|
-
})(typeof WeakMap !== "undefined" ? /* @__PURE__ */ new WeakMap() : 0);
|
|
19
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, mod));
|
|
20
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
28
21
|
var blocks_exports = {};
|
|
29
22
|
__export(blocks_exports, {
|
|
30
23
|
InputSearchWrapper: () => InputSearchWrapper
|
|
31
24
|
});
|
|
25
|
+
module.exports = __toCommonJS(blocks_exports);
|
|
32
26
|
var React = __toESM(require("react"));
|
|
33
27
|
var import_ds_classnames = require("@elliemae/ds-classnames");
|
|
34
28
|
const blockName = "input-search";
|
|
35
29
|
const InputSearchWrapper = (0, import_ds_classnames.aggregatedClasses)("div")(blockName);
|
|
36
|
-
module.exports = __toCommonJS(blocks_exports);
|
|
37
30
|
//# sourceMappingURL=blocks.js.map
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/components/blocks.tsx", "../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
4
|
"sourcesContent": ["import { aggregatedClasses } from '@elliemae/ds-classnames';\n\nconst blockName = 'input-search';\n\nexport const InputSearchWrapper = aggregatedClasses('div')(blockName);\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
-
"mappings": "
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,2BAAkC;AAElC,MAAM,YAAY;AAEX,MAAM,qBAAqB,4CAAkB,KAAK,EAAE,SAAS;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -21,32 +21,26 @@ var __spreadValues = (a, b) => {
|
|
|
21
21
|
return a;
|
|
22
22
|
};
|
|
23
23
|
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
24
|
-
var __markAsModule = (target) => __defProp(target, "__esModule", { value: true });
|
|
25
24
|
var __export = (target, all) => {
|
|
26
25
|
for (var name in all)
|
|
27
26
|
__defProp(target, name, { get: all[name], enumerable: true });
|
|
28
27
|
};
|
|
29
|
-
var
|
|
30
|
-
if (
|
|
31
|
-
for (let key of __getOwnPropNames(
|
|
32
|
-
if (!__hasOwnProp.call(
|
|
33
|
-
__defProp(
|
|
28
|
+
var __copyProps = (to, from, except, desc) => {
|
|
29
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
30
|
+
for (let key of __getOwnPropNames(from))
|
|
31
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
32
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
34
33
|
}
|
|
35
|
-
return
|
|
34
|
+
return to;
|
|
36
35
|
};
|
|
37
|
-
var __toESM = (
|
|
38
|
-
|
|
39
|
-
};
|
|
40
|
-
var __toCommonJS = /* @__PURE__ */ ((cache) => {
|
|
41
|
-
return (module2, temp) => {
|
|
42
|
-
return cache && cache.get(module2) || (temp = __reExport(__markAsModule({}), module2, 1), cache && cache.set(module2, temp), temp);
|
|
43
|
-
};
|
|
44
|
-
})(typeof WeakMap !== "undefined" ? /* @__PURE__ */ new WeakMap() : 0);
|
|
36
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, mod));
|
|
37
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
45
38
|
var helper_exports = {};
|
|
46
39
|
__export(helper_exports, {
|
|
47
40
|
createDisabledOption: () => createDisabledOption,
|
|
48
41
|
noAddonOptions: () => noAddonOptions
|
|
49
42
|
});
|
|
43
|
+
module.exports = __toCommonJS(helper_exports);
|
|
50
44
|
var React = __toESM(require("react"));
|
|
51
45
|
function createDisabledOption(label) {
|
|
52
46
|
return {
|
|
@@ -62,5 +56,4 @@ function createDisabledOption(label) {
|
|
|
62
56
|
function noAddonOptions(options) {
|
|
63
57
|
return options.map((op) => __spreadProps(__spreadValues({}, op), { noAddon: true }));
|
|
64
58
|
}
|
|
65
|
-
module.exports = __toCommonJS(helper_exports);
|
|
66
59
|
//# 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;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,EACZ;AACF;AAEO,wBAAwB,SAAS;AACtC,SAAO,QAAQ,IAAI,QAAO,iCAAK,KAAL,EAAS,SAAS,KAAK,EAAE;AACrD;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
package/dist/cjs/index.js
CHANGED
|
@@ -4,33 +4,27 @@ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
|
4
4
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
5
|
var __getProtoOf = Object.getPrototypeOf;
|
|
6
6
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
-
var __markAsModule = (target) => __defProp(target, "__esModule", { value: true });
|
|
8
7
|
var __export = (target, all) => {
|
|
9
8
|
for (var name in all)
|
|
10
9
|
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
10
|
};
|
|
12
|
-
var
|
|
13
|
-
if (
|
|
14
|
-
for (let key of __getOwnPropNames(
|
|
15
|
-
if (!__hasOwnProp.call(
|
|
16
|
-
__defProp(
|
|
11
|
+
var __copyProps = (to, from, except, desc) => {
|
|
12
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
13
|
+
for (let key of __getOwnPropNames(from))
|
|
14
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
15
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
17
16
|
}
|
|
18
|
-
return
|
|
17
|
+
return to;
|
|
19
18
|
};
|
|
20
|
-
var
|
|
21
|
-
|
|
22
|
-
};
|
|
23
|
-
var __toCommonJS = /* @__PURE__ */ ((cache) => {
|
|
24
|
-
return (module2, temp) => {
|
|
25
|
-
return cache && cache.get(module2) || (temp = __reExport(__markAsModule({}), module2, 1), cache && cache.set(module2, temp), temp);
|
|
26
|
-
};
|
|
27
|
-
})(typeof WeakMap !== "undefined" ? /* @__PURE__ */ new WeakMap() : 0);
|
|
19
|
+
var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
|
|
20
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, mod));
|
|
21
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
28
22
|
var src_exports = {};
|
|
29
23
|
__export(src_exports, {
|
|
30
24
|
default: () => import_DSZipCodeSearch.default
|
|
31
25
|
});
|
|
26
|
+
module.exports = __toCommonJS(src_exports);
|
|
32
27
|
var React = __toESM(require("react"));
|
|
33
|
-
__reExport(src_exports, require("./DSZipCodeSearch"));
|
|
28
|
+
__reExport(src_exports, require("./DSZipCodeSearch"), module.exports);
|
|
34
29
|
var import_DSZipCodeSearch = __toESM(require("./DSZipCodeSearch"));
|
|
35
|
-
module.exports = __toCommonJS(src_exports);
|
|
36
30
|
//# sourceMappingURL=index.js.map
|
package/dist/cjs/index.js.map
CHANGED
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/index.tsx", "../../../../scripts/build/transpile/react-shim.js"],
|
|
4
4
|
"sourcesContent": ["export * from './DSZipCodeSearch';\n\nexport { default } from './DSZipCodeSearch';\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
-
"mappings": "
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,wBAAc,8BAAd;AAEA,6BAAwB;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
package/dist/cjs/props.js
CHANGED
|
@@ -4,32 +4,26 @@ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
|
4
4
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
5
|
var __getProtoOf = Object.getPrototypeOf;
|
|
6
6
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
-
var __markAsModule = (target) => __defProp(target, "__esModule", { value: true });
|
|
8
7
|
var __export = (target, all) => {
|
|
9
8
|
for (var name in all)
|
|
10
9
|
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
10
|
};
|
|
12
|
-
var
|
|
13
|
-
if (
|
|
14
|
-
for (let key of __getOwnPropNames(
|
|
15
|
-
if (!__hasOwnProp.call(
|
|
16
|
-
__defProp(
|
|
11
|
+
var __copyProps = (to, from, except, desc) => {
|
|
12
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
13
|
+
for (let key of __getOwnPropNames(from))
|
|
14
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
15
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
17
16
|
}
|
|
18
|
-
return
|
|
17
|
+
return to;
|
|
19
18
|
};
|
|
20
|
-
var __toESM = (
|
|
21
|
-
|
|
22
|
-
};
|
|
23
|
-
var __toCommonJS = /* @__PURE__ */ ((cache) => {
|
|
24
|
-
return (module2, temp) => {
|
|
25
|
-
return cache && cache.get(module2) || (temp = __reExport(__markAsModule({}), module2, 1), cache && cache.set(module2, temp), temp);
|
|
26
|
-
};
|
|
27
|
-
})(typeof WeakMap !== "undefined" ? /* @__PURE__ */ new WeakMap() : 0);
|
|
19
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, mod));
|
|
20
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
28
21
|
var props_exports = {};
|
|
29
22
|
__export(props_exports, {
|
|
30
23
|
defaultProps: () => defaultProps,
|
|
31
24
|
zipcodeSearchProps: () => zipcodeSearchProps
|
|
32
25
|
});
|
|
26
|
+
module.exports = __toCommonJS(props_exports);
|
|
33
27
|
var React = __toESM(require("react"));
|
|
34
28
|
var import_react_desc = require("react-desc");
|
|
35
29
|
var import_ds_form = require("@elliemae/ds-form");
|
|
@@ -64,5 +58,4 @@ const defaultProps = {
|
|
|
64
58
|
activeCount: 5,
|
|
65
59
|
options: []
|
|
66
60
|
};
|
|
67
|
-
module.exports = __toCommonJS(props_exports);
|
|
68
61
|
//# sourceMappingURL=props.js.map
|
package/dist/cjs/props.js.map
CHANGED
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/props.tsx", "../../../../scripts/build/transpile/react-shim.js"],
|
|
4
4
|
"sourcesContent": ["import { PropTypes } from 'react-desc';\nimport { MASK_TYPES } from '@elliemae/ds-form';\n\nexport const zipcodeSearchProps = {\n /** html class attribute */\n className: PropTypes.string.description('html class attribute'),\n /** Set of Properties attached to the main container */\n containerProps: PropTypes.object.description('Set of Properties attached to the main container'),\n /** native tabindex property to handle focus order */\n tabIndex: PropTypes.number.description('native tabindex property to handle focus order'),\n /** disable component */\n disabled: PropTypes.bool.description('disable component'),\n /** input value */\n value: PropTypes.oneOfType([PropTypes.string, PropTypes.number, PropTypes.object]).description('input value')\n .isRequired,\n /** function called on blur */\n onBlur: PropTypes.func.description('function called on blur'),\n /** function called on change */\n onChange: PropTypes.func.description('function called on change'),\n /** options to display */\n options: PropTypes.arrayOf(\n PropTypes.shape({\n label: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),\n value: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),\n }),\n ).description('options to display'),\n /** placeholder value */\n placeholder: PropTypes.string.description('placeholder value'),\n /** format mask to apply */\n mask: PropTypes.arrayOf(PropTypes.any).description('format mask to apply'),\n /** function called onsearch */\n onSearch: PropTypes.func.description('function called onsearch'),\n /** Correction messange */\n selectRightOptions: PropTypes.string.description('Correction messange'),\n /** current amount */\n activeCount: PropTypes.number.description('current amount'),\n};\n\nexport const defaultProps = {\n disabled: false,\n value: '',\n placeholder: '_____-____',\n mask: MASK_TYPES.ZIP_CODE_SEARCH,\n onBlur: () => null,\n onChange: () => null,\n onSearch: () => null,\n containerProps: {},\n selectRightOptions: 'Please select the appropriate city',\n activeCount: 5,\n options: [],\n};\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
-
"mappings": "
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,wBAA0B;AAC1B,qBAA2B;AAEpB,MAAM,qBAAqB;AAAA,EAEhC,WAAW,4BAAU,OAAO,YAAY,sBAAsB;AAAA,EAE9D,gBAAgB,4BAAU,OAAO,YAAY,kDAAkD;AAAA,EAE/F,UAAU,4BAAU,OAAO,YAAY,gDAAgD;AAAA,EAEvF,UAAU,4BAAU,KAAK,YAAY,mBAAmB;AAAA,EAExD,OAAO,4BAAU,UAAU,CAAC,4BAAU,QAAQ,4BAAU,QAAQ,4BAAU,MAAM,CAAC,EAAE,YAAY,aAAa,EACzG;AAAA,EAEH,QAAQ,4BAAU,KAAK,YAAY,yBAAyB;AAAA,EAE5D,UAAU,4BAAU,KAAK,YAAY,2BAA2B;AAAA,EAEhE,SAAS,4BAAU,QACjB,4BAAU,MAAM;AAAA,IACd,OAAO,4BAAU,UAAU,CAAC,4BAAU,QAAQ,4BAAU,MAAM,CAAC;AAAA,IAC/D,OAAO,4BAAU,UAAU,CAAC,4BAAU,QAAQ,4BAAU,MAAM,CAAC;AAAA,EACjE,CAAC,CACH,EAAE,YAAY,oBAAoB;AAAA,EAElC,aAAa,4BAAU,OAAO,YAAY,mBAAmB;AAAA,EAE7D,MAAM,4BAAU,QAAQ,4BAAU,GAAG,EAAE,YAAY,sBAAsB;AAAA,EAEzE,UAAU,4BAAU,KAAK,YAAY,0BAA0B;AAAA,EAE/D,oBAAoB,4BAAU,OAAO,YAAY,qBAAqB;AAAA,EAEtE,aAAa,4BAAU,OAAO,YAAY,gBAAgB;AAC5D;AAEO,MAAM,eAAe;AAAA,EAC1B,UAAU;AAAA,EACV,OAAO;AAAA,EACP,aAAa;AAAA,EACb,MAAM,0BAAW;AAAA,EACjB,QAAQ,MAAM;AAAA,EACd,UAAU,MAAM;AAAA,EAChB,UAAU,MAAM;AAAA,EAChB,gBAAgB,CAAC;AAAA,EACjB,oBAAoB;AAAA,EACpB,aAAa;AAAA,EACb,SAAS,CAAC;AACZ;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -101,6 +101,7 @@ const DSZipCodeSearch = ({
|
|
|
101
101
|
};
|
|
102
102
|
DSZipCodeSearch.propTypes = zipcodeSearchProps;
|
|
103
103
|
DSZipCodeSearch.defaultProps = defaultProps;
|
|
104
|
+
DSZipCodeSearch.displayName = "DSZipCodeSearch";
|
|
104
105
|
const ZipCodeSearchWithSchema = describe(DSZipCodeSearch);
|
|
105
106
|
ZipCodeSearchWithSchema.propTypes = zipcodeSearchProps;
|
|
106
107
|
var DSZipCodeSearch_default = DSZipCodeSearch;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../scripts/build/transpile/react-shim.js", "../../src/DSZipCodeSearch.tsx"],
|
|
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;\
|
|
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,OAAO;
|
|
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;\nDSZipCodeSearch.displayName = 'DSZipCodeSearch';\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,OAAO,IAAI;AACvB,QAAM,CAAC,aAAa,kBAAkB,SAAS,KAAK;AACpD,QAAM,CAAC,QAAQ,aAAa,SAAS,KAAK;AAC1C,QAAM,CAAC,UAAU,eAAe,SAAS,KAAK;AAC9C,QAAM,CAAC,cAAc,mBAAmB,SAAS,KAAK;AACtD,QAAM,CAAC,YAAY,iBAAiB,SAAS,KAAK;AAElD,YAAU,MAAM;AACd,QAAI,gBAAgB,eAAe,YAAY,UAAU,CAAC,YAAY;AACpE,gBAAU,IAAI;AACd,kBAAY,IAAI;AAAA,IAClB,WAAW,CAAC,YAAY,cAAc,YAAY,QAAQ;AACxD,gBAAU,KAAK;AAAA,IACjB;AAAA,EACF,GAAG,CAAC,cAAc,UAAU,aAAa,aAAa,UAAU,CAAC;AACjE,YAAU,MAAM;AACd,mBAAe,SAAS,EAAE;AAAA,EAC5B,GAAG,CAAC,KAAK,CAAC;AAEV,QAAM,gBAAgB,YACpB,CAAC,MAAM;AACL,UAAM,WAAW,EAAE,OAAO;AAC1B,aAAS,QAAQ;AACjB,mBAAe,QAAQ;AACvB,kBAAc,KAAK;AAAA,EACrB,GACA,CAAC,QAAQ,CACX;AAEA,QAAM,eAAe,YAAY,MAAM;AACrC,oBAAgB,IAAI;AAAA,EACtB,GAAG,CAAC,CAAC;AAEL,QAAM,cAAc,YAClB,CAAC,MAAM;AACL,oBAAgB,KAAK;AACrB,WAAO,CAAC;AAAA,EACV,GACA,CAAC,MAAM,CACT;AACA,QAAM,UAAU,YAAY,MAAM;AAChC,gBAAY,KAAK;AAAA,EACnB,GAAG,CAAC,CAAC;AACL,QAAM,eAAe,YACnB,CAAC,SAAS;AACR,mBAAe,KAAK,KAAK;AACzB,aAAS,IAAI;AACb,kBAAc,IAAI;AAClB,QAAI,QAAQ,MAAM;AAClB,cAAU,KAAK;AACf,YAAQ;AAAA,EACV,GACA,CAAC,UAAU,OAAO,CACpB;AAEA,SACE,qCAAC,uCAAuB,iBACtB,qCAAC;AAAA,IACC,QAAQ,UAAU,QAAQ,SAAS;AAAA,IACnC,WAAW,EAAE,WAAW,oBAAoB;AAAA,IAC5C;AAAA,IACA,kBAAkB;AAAA,IAClB,cAAc;AAAA,MACZ,WAAW;AAAA,IACb;AAAA,IACA,SAAS,QAAQ,SAAS,IAAI,CAAC,qBAAqB,kBAAkB,GAAG,GAAG,eAAe,OAAO,CAAC,IAAI,CAAC;AAAA,IACxG,kBACE,qCAAC,aACC,qCAAC;AAAA,MACC;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,KACF,CACF;AAAA,GAEJ,CACF;AAEJ;AAEA,gBAAgB,YAAY;AAE5B,gBAAgB,eAAe;AAC/B,gBAAgB,cAAc;AAC9B,MAAM,0BAA0B,SAAS,eAAe;AACxD,wBAAwB,YAAY;AAGpC,IAAO,0BAAQ;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../../src/components/blocks.tsx"],
|
|
4
4
|
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import { aggregatedClasses } from '@elliemae/ds-classnames';\n\nconst blockName = 'input-search';\n\nexport const InputSearchWrapper = aggregatedClasses('div')(blockName);\n"],
|
|
5
|
-
"mappings": "AAAA;ACAA;AAEA,MAAM,YAAY;AAEX,MAAM,qBAAqB,kBAAkB,
|
|
5
|
+
"mappings": "AAAA;ACAA;AAEA,MAAM,YAAY;AAEX,MAAM,qBAAqB,kBAAkB,KAAK,EAAE,SAAS;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -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;
|
|
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,EACZ;AACF;AAEO,wBAAwB,SAAS;AACtC,SAAO,QAAQ,IAAI,QAAO,iCAAK,KAAL,EAAS,SAAS,KAAK,EAAE;AACrD;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
package/dist/esm/props.js.map
CHANGED
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../scripts/build/transpile/react-shim.js", "../../src/props.tsx"],
|
|
4
4
|
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import { PropTypes } from 'react-desc';\nimport { MASK_TYPES } from '@elliemae/ds-form';\n\nexport const zipcodeSearchProps = {\n /** html class attribute */\n className: PropTypes.string.description('html class attribute'),\n /** Set of Properties attached to the main container */\n containerProps: PropTypes.object.description('Set of Properties attached to the main container'),\n /** native tabindex property to handle focus order */\n tabIndex: PropTypes.number.description('native tabindex property to handle focus order'),\n /** disable component */\n disabled: PropTypes.bool.description('disable component'),\n /** input value */\n value: PropTypes.oneOfType([PropTypes.string, PropTypes.number, PropTypes.object]).description('input value')\n .isRequired,\n /** function called on blur */\n onBlur: PropTypes.func.description('function called on blur'),\n /** function called on change */\n onChange: PropTypes.func.description('function called on change'),\n /** options to display */\n options: PropTypes.arrayOf(\n PropTypes.shape({\n label: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),\n value: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),\n }),\n ).description('options to display'),\n /** placeholder value */\n placeholder: PropTypes.string.description('placeholder value'),\n /** format mask to apply */\n mask: PropTypes.arrayOf(PropTypes.any).description('format mask to apply'),\n /** function called onsearch */\n onSearch: PropTypes.func.description('function called onsearch'),\n /** Correction messange */\n selectRightOptions: PropTypes.string.description('Correction messange'),\n /** current amount */\n activeCount: PropTypes.number.description('current amount'),\n};\n\nexport const defaultProps = {\n disabled: false,\n value: '',\n placeholder: '_____-____',\n mask: MASK_TYPES.ZIP_CODE_SEARCH,\n onBlur: () => null,\n onChange: () => null,\n onSearch: () => null,\n containerProps: {},\n selectRightOptions: 'Please select the appropriate city',\n activeCount: 5,\n options: [],\n};\n"],
|
|
5
|
-
"mappings": "AAAA;ACAA;AACA;AAEO,MAAM,qBAAqB;AAAA,EAEhC,WAAW,UAAU,OAAO,YAAY;AAAA,
|
|
5
|
+
"mappings": "AAAA;ACAA;AACA;AAEO,MAAM,qBAAqB;AAAA,EAEhC,WAAW,UAAU,OAAO,YAAY,sBAAsB;AAAA,EAE9D,gBAAgB,UAAU,OAAO,YAAY,kDAAkD;AAAA,EAE/F,UAAU,UAAU,OAAO,YAAY,gDAAgD;AAAA,EAEvF,UAAU,UAAU,KAAK,YAAY,mBAAmB;AAAA,EAExD,OAAO,UAAU,UAAU,CAAC,UAAU,QAAQ,UAAU,QAAQ,UAAU,MAAM,CAAC,EAAE,YAAY,aAAa,EACzG;AAAA,EAEH,QAAQ,UAAU,KAAK,YAAY,yBAAyB;AAAA,EAE5D,UAAU,UAAU,KAAK,YAAY,2BAA2B;AAAA,EAEhE,SAAS,UAAU,QACjB,UAAU,MAAM;AAAA,IACd,OAAO,UAAU,UAAU,CAAC,UAAU,QAAQ,UAAU,MAAM,CAAC;AAAA,IAC/D,OAAO,UAAU,UAAU,CAAC,UAAU,QAAQ,UAAU,MAAM,CAAC;AAAA,EACjE,CAAC,CACH,EAAE,YAAY,oBAAoB;AAAA,EAElC,aAAa,UAAU,OAAO,YAAY,mBAAmB;AAAA,EAE7D,MAAM,UAAU,QAAQ,UAAU,GAAG,EAAE,YAAY,sBAAsB;AAAA,EAEzE,UAAU,UAAU,KAAK,YAAY,0BAA0B;AAAA,EAE/D,oBAAoB,UAAU,OAAO,YAAY,qBAAqB;AAAA,EAEtE,aAAa,UAAU,OAAO,YAAY,gBAAgB;AAC5D;AAEO,MAAM,eAAe;AAAA,EAC1B,UAAU;AAAA,EACV,OAAO;AAAA,EACP,aAAa;AAAA,EACb,MAAM,WAAW;AAAA,EACjB,QAAQ,MAAM;AAAA,EACd,UAAU,MAAM;AAAA,EAChB,UAAU,MAAM;AAAA,EAChB,gBAAgB,CAAC;AAAA,EACjB,oBAAoB;AAAA,EACpB,aAAa;AAAA,EACb,SAAS,CAAC;AACZ;",
|
|
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.
|
|
3
|
+
"version": "3.0.1",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"description": "ICE MT - Dimsum - Zipcode Search",
|
|
6
6
|
"files": [
|
|
@@ -50,10 +50,17 @@
|
|
|
50
50
|
"reportFile": "tests.xml",
|
|
51
51
|
"indent": 4
|
|
52
52
|
},
|
|
53
|
+
"scripts": {
|
|
54
|
+
"dev": "cross-env NODE_ENV=development node ../../scripts/build/build.mjs --watch",
|
|
55
|
+
"test": "node ../../scripts/testing/test.mjs",
|
|
56
|
+
"lint": "node ../../scripts/lint.mjs",
|
|
57
|
+
"dts": "node ../../scripts/dts.mjs",
|
|
58
|
+
"build": "cross-env NODE_ENV=production node ../../scripts/build/build.mjs"
|
|
59
|
+
},
|
|
53
60
|
"dependencies": {
|
|
54
|
-
"@elliemae/ds-classnames": "
|
|
55
|
-
"@elliemae/ds-dropdownmenu": "
|
|
56
|
-
"@elliemae/ds-form": "
|
|
61
|
+
"@elliemae/ds-classnames": "workspace:*",
|
|
62
|
+
"@elliemae/ds-dropdownmenu": "workspace:*",
|
|
63
|
+
"@elliemae/ds-form": "workspace:*",
|
|
57
64
|
"react-desc": "~4.1.3"
|
|
58
65
|
},
|
|
59
66
|
"devDependencies": {
|
|
@@ -68,12 +75,5 @@
|
|
|
68
75
|
"publishConfig": {
|
|
69
76
|
"access": "public",
|
|
70
77
|
"typeSafety": false
|
|
71
|
-
},
|
|
72
|
-
"scripts": {
|
|
73
|
-
"dev": "cross-env NODE_ENV=development node ../../scripts/build/build.mjs --watch",
|
|
74
|
-
"test": "node ../../scripts/testing/test.mjs",
|
|
75
|
-
"lint": "node ../../scripts/lint.mjs",
|
|
76
|
-
"dts": "node ../../scripts/dts.mjs",
|
|
77
|
-
"build": "cross-env NODE_ENV=production node ../../scripts/build/build.mjs"
|
|
78
78
|
}
|
|
79
|
-
}
|
|
79
|
+
}
|