@elliemae/ds-zipcode-search 3.16.0-next.2 → 3.16.0-next.4
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 +2 -2
- package/dist/cjs/DSZipCodeSearch.js.map +2 -2
- package/dist/cjs/package.json +7 -0
- package/dist/cjs/props.js +17 -17
- package/dist/cjs/props.js.map +2 -2
- package/dist/esm/DSZipCodeSearch.js +1 -1
- package/dist/esm/DSZipCodeSearch.js.map +1 -1
- package/dist/esm/package.json +7 -0
- package/dist/esm/props.js +1 -1
- package/dist/esm/props.js.map +1 -1
- package/dist/types/DSZipCodeSearch.d.ts +14 -14
- package/dist/types/props.d.ts +13 -13
- package/package.json +8 -7
|
@@ -32,7 +32,7 @@ module.exports = __toCommonJS(DSZipCodeSearch_exports);
|
|
|
32
32
|
var React = __toESM(require("react"));
|
|
33
33
|
var import_jsx_runtime = require("react/jsx-runtime");
|
|
34
34
|
var import_react = require("react");
|
|
35
|
-
var
|
|
35
|
+
var import_ds_props_helpers = require("@elliemae/ds-props-helpers");
|
|
36
36
|
var import_ds_dropdownmenu = __toESM(require("@elliemae/ds-dropdownmenu"));
|
|
37
37
|
var import_ds_form = require("@elliemae/ds-form");
|
|
38
38
|
var import_blocks = require("./components/blocks");
|
|
@@ -133,7 +133,7 @@ const DSZipCodeSearch = ({
|
|
|
133
133
|
DSZipCodeSearch.propTypes = import_props.zipcodeSearchProps;
|
|
134
134
|
DSZipCodeSearch.defaultProps = import_props.defaultProps;
|
|
135
135
|
DSZipCodeSearch.displayName = "DSZipCodeSearch";
|
|
136
|
-
const ZipCodeSearchWithSchema = (0,
|
|
136
|
+
const ZipCodeSearchWithSchema = (0, import_ds_props_helpers.describe)(DSZipCodeSearch);
|
|
137
137
|
ZipCodeSearchWithSchema.propTypes = import_props.zipcodeSearchProps;
|
|
138
138
|
var DSZipCodeSearch_default = DSZipCodeSearch;
|
|
139
139
|
//# 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 '@elliemae/ds-
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;AD6FX;AA1FZ,mBAAgE;AAChE,
|
|
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 '@elliemae/ds-props-helpers';\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(String(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(String(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;AD6FX;AA1FZ,mBAAgE;AAChE,8BAAyB;AACzB,6BAA2B;AAC3B,qBAA4B;AA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AACA,QAAM,cAAU,0BAAY,MAAM;AAChC,gBAAY,KAAK;AAAA,EACnB,GAAG,CAAC,CAAC;AACL,QAAM,mBAAe;AAAA,IACnB,CAAC,SAAS;AACR,qBAAe,KAAK,KAAK;AACzB,eAAS,IAAI;AACb,oBAAc,IAAI;AAClB,UAAI,QAAQ,MAAM;AAClB,gBAAU,KAAK;AACf,cAAQ;AAAA,IACV;AAAA,IACA,CAAC,UAAU,OAAO;AAAA,EACpB;AAEA,SACE,4CAAC,oCAAoB,GAAG,gBACtB;AAAA,IAAC,uBAAAA;AAAA,IAAA;AAAA,MACC,QAAQ,UAAU,QAAQ,SAAS;AAAA,MACnC,WAAW,EAAE,WAAW,oBAAoB;AAAA,MAC5C;AAAA,MACA,kBAAkB;AAAA,MAClB,cAAc;AAAA,QACZ,WAAW;AAAA,MACb;AAAA,MACA,SAAS,QAAQ,SAAS,IAAI,KAAC,oCAAqB,kBAAkB,GAAG,OAAG,8BAAe,OAAO,CAAC,IAAI,CAAC;AAAA,MACxG,kBACE,4CAAC,SACC;AAAA,QAAC;AAAA;AAAA,UACC;AAAA,UACA,UAAU,CAAC,SAAU,IAAI,UAAU;AAAA,UACnC;AAAA,UACA,QAAQ;AAAA,UACR,UAAU;AAAA,UACV,SAAS;AAAA,UACT;AAAA,UACA,OAAO;AAAA,UACP;AAAA;AAAA,MACF,GACF;AAAA;AAAA,EAEJ,GACF;AAEJ;AAEA,gBAAgB,YAAY;AAE5B,gBAAgB,eAAe;AAC/B,gBAAgB,cAAc;AAC9B,MAAM,8BAA0B,kCAAS,eAAe;AACxD,wBAAwB,YAAY;AAGpC,IAAO,0BAAQ;",
|
|
6
6
|
"names": ["DSDropdownMenu"]
|
|
7
7
|
}
|
package/dist/cjs/props.js
CHANGED
|
@@ -29,27 +29,27 @@ __export(props_exports, {
|
|
|
29
29
|
});
|
|
30
30
|
module.exports = __toCommonJS(props_exports);
|
|
31
31
|
var React = __toESM(require("react"));
|
|
32
|
-
var
|
|
32
|
+
var import_ds_props_helpers = require("@elliemae/ds-props-helpers");
|
|
33
33
|
var import_ds_form = require("@elliemae/ds-form");
|
|
34
34
|
const zipcodeSearchProps = {
|
|
35
|
-
className:
|
|
36
|
-
containerProps:
|
|
37
|
-
tabIndex:
|
|
38
|
-
disabled:
|
|
39
|
-
value:
|
|
40
|
-
onBlur:
|
|
41
|
-
onChange:
|
|
42
|
-
options:
|
|
43
|
-
|
|
44
|
-
label:
|
|
45
|
-
value:
|
|
35
|
+
className: import_ds_props_helpers.PropTypes.string.description("html class attribute"),
|
|
36
|
+
containerProps: import_ds_props_helpers.PropTypes.object.description("Set of Properties attached to the main container"),
|
|
37
|
+
tabIndex: import_ds_props_helpers.PropTypes.number.description("native tabindex property to handle focus order"),
|
|
38
|
+
disabled: import_ds_props_helpers.PropTypes.bool.description("disable component"),
|
|
39
|
+
value: import_ds_props_helpers.PropTypes.oneOfType([import_ds_props_helpers.PropTypes.string, import_ds_props_helpers.PropTypes.number, import_ds_props_helpers.PropTypes.object]).description("input value").isRequired,
|
|
40
|
+
onBlur: import_ds_props_helpers.PropTypes.func.description("function called on blur"),
|
|
41
|
+
onChange: import_ds_props_helpers.PropTypes.func.description("function called on change"),
|
|
42
|
+
options: import_ds_props_helpers.PropTypes.arrayOf(
|
|
43
|
+
import_ds_props_helpers.PropTypes.shape({
|
|
44
|
+
label: import_ds_props_helpers.PropTypes.oneOfType([import_ds_props_helpers.PropTypes.string, import_ds_props_helpers.PropTypes.number]),
|
|
45
|
+
value: import_ds_props_helpers.PropTypes.oneOfType([import_ds_props_helpers.PropTypes.string, import_ds_props_helpers.PropTypes.number])
|
|
46
46
|
})
|
|
47
47
|
).description("options to display"),
|
|
48
|
-
placeholder:
|
|
49
|
-
mask:
|
|
50
|
-
onSearch:
|
|
51
|
-
selectRightOptions:
|
|
52
|
-
activeCount:
|
|
48
|
+
placeholder: import_ds_props_helpers.PropTypes.string.description("placeholder value"),
|
|
49
|
+
mask: import_ds_props_helpers.PropTypes.arrayOf(import_ds_props_helpers.PropTypes.any).description("format mask to apply"),
|
|
50
|
+
onSearch: import_ds_props_helpers.PropTypes.func.description("function called onsearch"),
|
|
51
|
+
selectRightOptions: import_ds_props_helpers.PropTypes.string.description("Correction messange"),
|
|
52
|
+
activeCount: import_ds_props_helpers.PropTypes.number.description("current amount")
|
|
53
53
|
};
|
|
54
54
|
const defaultProps = {
|
|
55
55
|
disabled: false,
|
package/dist/cjs/props.js.map
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/props.tsx", "../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
-
"sourcesContent": ["import { PropTypes } from '@elliemae/ds-
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,
|
|
4
|
+
"sourcesContent": ["import { PropTypes } from '@elliemae/ds-props-helpers';\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": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,8BAA0B;AAC1B,qBAA2B;AAEpB,MAAM,qBAAqB;AAAA,EAEhC,WAAW,kCAAU,OAAO,YAAY,sBAAsB;AAAA,EAE9D,gBAAgB,kCAAU,OAAO,YAAY,kDAAkD;AAAA,EAE/F,UAAU,kCAAU,OAAO,YAAY,gDAAgD;AAAA,EAEvF,UAAU,kCAAU,KAAK,YAAY,mBAAmB;AAAA,EAExD,OAAO,kCAAU,UAAU,CAAC,kCAAU,QAAQ,kCAAU,QAAQ,kCAAU,MAAM,CAAC,EAAE,YAAY,aAAa,EACzG;AAAA,EAEH,QAAQ,kCAAU,KAAK,YAAY,yBAAyB;AAAA,EAE5D,UAAU,kCAAU,KAAK,YAAY,2BAA2B;AAAA,EAEhE,SAAS,kCAAU;AAAA,IACjB,kCAAU,MAAM;AAAA,MACd,OAAO,kCAAU,UAAU,CAAC,kCAAU,QAAQ,kCAAU,MAAM,CAAC;AAAA,MAC/D,OAAO,kCAAU,UAAU,CAAC,kCAAU,QAAQ,kCAAU,MAAM,CAAC;AAAA,IACjE,CAAC;AAAA,EACH,EAAE,YAAY,oBAAoB;AAAA,EAElC,aAAa,kCAAU,OAAO,YAAY,mBAAmB;AAAA,EAE7D,MAAM,kCAAU,QAAQ,kCAAU,GAAG,EAAE,YAAY,sBAAsB;AAAA,EAEzE,UAAU,kCAAU,KAAK,YAAY,0BAA0B;AAAA,EAE/D,oBAAoB,kCAAU,OAAO,YAAY,qBAAqB;AAAA,EAEtE,aAAa,kCAAU,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
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
import { jsx } from "react/jsx-runtime";
|
|
3
3
|
import { useState, useEffect, useRef, useCallback } from "react";
|
|
4
|
-
import { describe } from "@elliemae/ds-
|
|
4
|
+
import { describe } from "@elliemae/ds-props-helpers";
|
|
5
5
|
import DSDropdownMenu from "@elliemae/ds-dropdownmenu";
|
|
6
6
|
import { DSInputMask } from "@elliemae/ds-form";
|
|
7
7
|
import { InputSearchWrapper } from "./components/blocks";
|
|
@@ -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 '@elliemae/ds-
|
|
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 '@elliemae/ds-props-helpers';\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(String(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(String(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
5
|
"mappings": "AAAA,YAAY,WAAW;AC6FX;AA1FZ,SAAgB,UAAU,WAAW,QAAQ,mBAAmB;AAChE,SAAS,gBAAgB;AACzB,OAAO,oBAAoB;AAC3B,SAAS,mBAAmB;AAC5B,SAAS,0BAA0B;AACnC,SAAS,sBAAsB,sBAAsB;AACrD,SAAS,oBAAoB,oBAAoB;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;AACF,MAAM;AACJ,QAAM,MAAM,OAAO,IAAI;AACvB,QAAM,CAAC,aAAa,cAAc,IAAI,SAAS,OAAO,KAAK,CAAC;AAC5D,QAAM,CAAC,QAAQ,SAAS,IAAI,SAAS,KAAK;AAC1C,QAAM,CAAC,UAAU,WAAW,IAAI,SAAS,KAAK;AAC9C,QAAM,CAAC,cAAc,eAAe,IAAI,SAAS,KAAK;AACtD,QAAM,CAAC,YAAY,aAAa,IAAI,SAAS,KAAK;AAElD,YAAU,MAAM;AACd,QAAI,gBAAgB,eAAe,YAAY,UAAU,CAAC,YAAY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AAO,CAAC,IAAI,CAAC;AAAA,MACxG,kBACE,oBAAC,SACC;AAAA,QAAC;AAAA;AAAA,UACC;AAAA,UACA,UAAU,CAAC,SAAU,IAAI,UAAU;AAAA,UACnC;AAAA,UACA,QAAQ;AAAA,UACR,UAAU;AAAA,UACV,SAAS;AAAA,UACT;AAAA,UACA,OAAO;AAAA,UACP;AAAA;AAAA,MACF,GACF;AAAA;AAAA,EAEJ,GACF;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
|
}
|
package/dist/esm/props.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
|
-
import { PropTypes } from "@elliemae/ds-
|
|
2
|
+
import { PropTypes } from "@elliemae/ds-props-helpers";
|
|
3
3
|
import { MASK_TYPES } from "@elliemae/ds-form";
|
|
4
4
|
const zipcodeSearchProps = {
|
|
5
5
|
className: PropTypes.string.description("html class attribute"),
|
package/dist/esm/props.js.map
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../scripts/build/transpile/react-shim.js", "../../src/props.tsx"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import { PropTypes } from '@elliemae/ds-
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import { PropTypes } from '@elliemae/ds-props-helpers';\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
5
|
"mappings": "AAAA,YAAY,WAAW;ACAvB,SAAS,iBAAiB;AAC1B,SAAS,kBAAkB;AAEpB,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;AAAA,IACjB,UAAU,MAAM;AAAA,MACd,OAAO,UAAU,UAAU,CAAC,UAAU,QAAQ,UAAU,MAAM,CAAC;AAAA,MAC/D,OAAO,UAAU,UAAU,CAAC,UAAU,QAAQ,UAAU,MAAM,CAAC;AAAA,IACjE,CAAC;AAAA,EACH,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
|
}
|
|
@@ -14,19 +14,19 @@ declare const DSZipCodeSearch: {
|
|
|
14
14
|
tabIndex: any;
|
|
15
15
|
}): JSX.Element;
|
|
16
16
|
propTypes: {
|
|
17
|
-
className: import("@elliemae/ds-
|
|
18
|
-
containerProps: import("@elliemae/ds-
|
|
19
|
-
tabIndex: import("@elliemae/ds-
|
|
20
|
-
disabled: import("@elliemae/ds-
|
|
21
|
-
value: import("@elliemae/ds-
|
|
22
|
-
onBlur: import("@elliemae/ds-
|
|
23
|
-
onChange: import("@elliemae/ds-
|
|
24
|
-
options: import("@elliemae/ds-
|
|
25
|
-
placeholder: import("@elliemae/ds-
|
|
26
|
-
mask: import("@elliemae/ds-
|
|
27
|
-
onSearch: import("@elliemae/ds-
|
|
28
|
-
selectRightOptions: import("@elliemae/ds-
|
|
29
|
-
activeCount: import("@elliemae/ds-
|
|
17
|
+
className: import("@elliemae/ds-props-helpers/dist/types/propTypes/types").ReactDescT;
|
|
18
|
+
containerProps: import("@elliemae/ds-props-helpers/dist/types/propTypes/types").ReactDescT;
|
|
19
|
+
tabIndex: import("@elliemae/ds-props-helpers/dist/types/propTypes/types").ReactDescT;
|
|
20
|
+
disabled: import("@elliemae/ds-props-helpers/dist/types/propTypes/types").ReactDescT;
|
|
21
|
+
value: import("@elliemae/ds-props-helpers/dist/types/propTypes/types").ReactDescT;
|
|
22
|
+
onBlur: import("@elliemae/ds-props-helpers/dist/types/propTypes/types").ReactDescT;
|
|
23
|
+
onChange: import("@elliemae/ds-props-helpers/dist/types/propTypes/types").ReactDescT;
|
|
24
|
+
options: import("@elliemae/ds-props-helpers/dist/types/propTypes/types").ReactDescT;
|
|
25
|
+
placeholder: import("@elliemae/ds-props-helpers/dist/types/propTypes/types").ReactDescT;
|
|
26
|
+
mask: import("@elliemae/ds-props-helpers/dist/types/propTypes/types").ReactDescT;
|
|
27
|
+
onSearch: import("@elliemae/ds-props-helpers/dist/types/propTypes/types").ReactDescT;
|
|
28
|
+
selectRightOptions: import("@elliemae/ds-props-helpers/dist/types/propTypes/types").ReactDescT;
|
|
29
|
+
activeCount: import("@elliemae/ds-props-helpers/dist/types/propTypes/types").ReactDescT;
|
|
30
30
|
};
|
|
31
31
|
defaultProps: {
|
|
32
32
|
disabled: boolean;
|
|
@@ -43,7 +43,7 @@ declare const DSZipCodeSearch: {
|
|
|
43
43
|
};
|
|
44
44
|
displayName: string;
|
|
45
45
|
};
|
|
46
|
-
declare const ZipCodeSearchWithSchema: import("@elliemae/ds-
|
|
46
|
+
declare const ZipCodeSearchWithSchema: import("@elliemae/ds-props-helpers/dist/types/propTypes/types").DocumentedReactComponent<{
|
|
47
47
|
disabled: any;
|
|
48
48
|
value: any;
|
|
49
49
|
placeholder: any;
|
package/dist/types/props.d.ts
CHANGED
|
@@ -1,30 +1,30 @@
|
|
|
1
1
|
export declare const zipcodeSearchProps: {
|
|
2
2
|
/** html class attribute */
|
|
3
|
-
className: import("@elliemae/ds-
|
|
3
|
+
className: import("@elliemae/ds-props-helpers/dist/types/propTypes/types").ReactDescT;
|
|
4
4
|
/** Set of Properties attached to the main container */
|
|
5
|
-
containerProps: import("@elliemae/ds-
|
|
5
|
+
containerProps: import("@elliemae/ds-props-helpers/dist/types/propTypes/types").ReactDescT;
|
|
6
6
|
/** native tabindex property to handle focus order */
|
|
7
|
-
tabIndex: import("@elliemae/ds-
|
|
7
|
+
tabIndex: import("@elliemae/ds-props-helpers/dist/types/propTypes/types").ReactDescT;
|
|
8
8
|
/** disable component */
|
|
9
|
-
disabled: import("@elliemae/ds-
|
|
9
|
+
disabled: import("@elliemae/ds-props-helpers/dist/types/propTypes/types").ReactDescT;
|
|
10
10
|
/** input value */
|
|
11
|
-
value: import("@elliemae/ds-
|
|
11
|
+
value: import("@elliemae/ds-props-helpers/dist/types/propTypes/types").ReactDescT;
|
|
12
12
|
/** function called on blur */
|
|
13
|
-
onBlur: import("@elliemae/ds-
|
|
13
|
+
onBlur: import("@elliemae/ds-props-helpers/dist/types/propTypes/types").ReactDescT;
|
|
14
14
|
/** function called on change */
|
|
15
|
-
onChange: import("@elliemae/ds-
|
|
15
|
+
onChange: import("@elliemae/ds-props-helpers/dist/types/propTypes/types").ReactDescT;
|
|
16
16
|
/** options to display */
|
|
17
|
-
options: import("@elliemae/ds-
|
|
17
|
+
options: import("@elliemae/ds-props-helpers/dist/types/propTypes/types").ReactDescT;
|
|
18
18
|
/** placeholder value */
|
|
19
|
-
placeholder: import("@elliemae/ds-
|
|
19
|
+
placeholder: import("@elliemae/ds-props-helpers/dist/types/propTypes/types").ReactDescT;
|
|
20
20
|
/** format mask to apply */
|
|
21
|
-
mask: import("@elliemae/ds-
|
|
21
|
+
mask: import("@elliemae/ds-props-helpers/dist/types/propTypes/types").ReactDescT;
|
|
22
22
|
/** function called onsearch */
|
|
23
|
-
onSearch: import("@elliemae/ds-
|
|
23
|
+
onSearch: import("@elliemae/ds-props-helpers/dist/types/propTypes/types").ReactDescT;
|
|
24
24
|
/** Correction messange */
|
|
25
|
-
selectRightOptions: import("@elliemae/ds-
|
|
25
|
+
selectRightOptions: import("@elliemae/ds-props-helpers/dist/types/propTypes/types").ReactDescT;
|
|
26
26
|
/** current amount */
|
|
27
|
-
activeCount: import("@elliemae/ds-
|
|
27
|
+
activeCount: import("@elliemae/ds-props-helpers/dist/types/propTypes/types").ReactDescT;
|
|
28
28
|
};
|
|
29
29
|
export declare const defaultProps: {
|
|
30
30
|
disabled: boolean;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@elliemae/ds-zipcode-search",
|
|
3
|
-
"version": "3.16.0-next.
|
|
3
|
+
"version": "3.16.0-next.4",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"description": "ICE MT - Dimsum - Zipcode Search",
|
|
6
6
|
"files": [
|
|
@@ -51,11 +51,12 @@
|
|
|
51
51
|
"indent": 4
|
|
52
52
|
},
|
|
53
53
|
"dependencies": {
|
|
54
|
-
"@elliemae/ds-classnames": "3.16.0-next.
|
|
55
|
-
"@elliemae/ds-dropdownmenu": "3.16.0-next.
|
|
56
|
-
"@elliemae/ds-form": "3.16.0-next.
|
|
57
|
-
"@elliemae/ds-
|
|
58
|
-
"@elliemae/ds-
|
|
54
|
+
"@elliemae/ds-classnames": "3.16.0-next.4",
|
|
55
|
+
"@elliemae/ds-dropdownmenu": "3.16.0-next.4",
|
|
56
|
+
"@elliemae/ds-form": "3.16.0-next.4",
|
|
57
|
+
"@elliemae/ds-props-helpers": "3.16.0-next.4",
|
|
58
|
+
"@elliemae/ds-system": "3.16.0-next.4",
|
|
59
|
+
"@elliemae/ds-utilities": "3.16.0-next.4"
|
|
59
60
|
},
|
|
60
61
|
"devDependencies": {
|
|
61
62
|
"@testing-library/jest-dom": "~5.16.4",
|
|
@@ -77,7 +78,7 @@
|
|
|
77
78
|
"eslint:fix": "eslint --ext='.js,.jsx,.test.js,.ts,.tsx' --fix --config='../../.eslintrc.js' src/",
|
|
78
79
|
"dts": "node ../../scripts/dts.mjs",
|
|
79
80
|
"build": "cross-env NODE_ENV=production node ../../scripts/build/build.mjs",
|
|
80
|
-
"dev:build": "pnpm --filter {.}... build
|
|
81
|
+
"dev:build": "pnpm --filter {.}... build",
|
|
81
82
|
"dev:install": "pnpm --filter {.}... i --no-lockfile && pnpm run dev:build",
|
|
82
83
|
"checkDeps": "npx -yes ../ds-codemods check-missing-packages --projectFolderPath=\"./\" --ignorePackagesGlobPattern=\"\" --ignoreFilesGlobPattern=\"**/test-ables/*,**/tests/*\""
|
|
83
84
|
}
|