@elliemae/ds-form-select 3.35.0 → 3.36.0-next.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/Select.js +1 -3
- package/dist/cjs/Select.js.map +2 -2
- package/dist/esm/Select.js +1 -3
- package/dist/esm/Select.js.map +2 -2
- package/package.json +4 -4
package/dist/cjs/Select.js
CHANGED
|
@@ -39,8 +39,7 @@ var import_ds_form_combobox = require("@elliemae/ds-form-combobox");
|
|
|
39
39
|
const DSSelect = (props) => {
|
|
40
40
|
const { selectedValues: selectedValues2, selectedValue } = props;
|
|
41
41
|
const currentSelectedValue = (0, import_react.useMemo)(() => {
|
|
42
|
-
if (selectedValue !== void 0)
|
|
43
|
-
return selectedValue;
|
|
42
|
+
if (selectedValue !== void 0) return selectedValue;
|
|
44
43
|
return selectedValues2;
|
|
45
44
|
}, [selectedValue, selectedValues2]);
|
|
46
45
|
if (Array.isArray(currentSelectedValue))
|
|
@@ -55,7 +54,6 @@ const SelectPropTypes = {
|
|
|
55
54
|
value: import_ds_props_helpers.PropTypes.string.isRequired
|
|
56
55
|
})
|
|
57
56
|
};
|
|
58
|
-
DSSelect.propTypes = SelectPropTypes;
|
|
59
57
|
DSSelect.displayName = "DSSelect";
|
|
60
58
|
const DSSelectWithSchema = (0, import_ds_props_helpers.describe)(DSSelect);
|
|
61
59
|
DSSelectWithSchema.propTypes = SelectPropTypes;
|
package/dist/cjs/Select.js.map
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/Select.tsx", "../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
-
"sourcesContent": ["/* eslint-disable no-unused-vars */\nimport React, { useMemo, type WeakValidationMap } from 'react';\nimport { describe, PropTypes } from '@elliemae/ds-props-helpers';\nimport { DSComboBox, type DSComboboxT, ComboboxPropTypes } from '@elliemae/ds-form-combobox';\n\ninterface Props extends DSComboboxT.Props {\n selectedValue: DSComboboxT.ItemOption;\n}\n\nexport const DSSelect: React.ComponentType<Props> = (props) => {\n const { selectedValues, selectedValue } = props;\n const currentSelectedValue = useMemo(() => {\n if (selectedValue !== undefined) return selectedValue;\n return selectedValues;\n }, [selectedValue, selectedValues]);\n if (Array.isArray(currentSelectedValue))\n throw new Error('DSSelect cannot be used with selectedValues as an array. Use DSMultiCombobox instead.');\n\n return <DSComboBox {...props} selectedValues={currentSelectedValue} onlySelectable />;\n};\n\nconst { selectedValues, ...restComboBoxPropTypes } = ComboboxPropTypes;\n\nconst SelectPropTypes = {\n ...restComboBoxPropTypes,\n selectedValue: PropTypes.shape({\n label: PropTypes.string.isRequired,\n value: PropTypes.string.isRequired,\n }),\n};\n\nDSSelect.
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADkBd;AAjBT,mBAAuD;AACvD,8BAAoC;AACpC,8BAAgE;AAMzD,MAAM,WAAuC,CAAC,UAAU;AAC7D,QAAM,EAAE,gBAAAA,iBAAgB,cAAc,IAAI;AAC1C,QAAM,2BAAuB,sBAAQ,MAAM;AACzC,QAAI,kBAAkB
|
|
4
|
+
"sourcesContent": ["/* eslint-disable no-unused-vars */\nimport React, { useMemo, type WeakValidationMap } from 'react';\nimport { describe, PropTypes } from '@elliemae/ds-props-helpers';\nimport { DSComboBox, type DSComboboxT, ComboboxPropTypes } from '@elliemae/ds-form-combobox';\n\ninterface Props extends DSComboboxT.Props {\n selectedValue: DSComboboxT.ItemOption;\n}\n\nexport const DSSelect: React.ComponentType<Props> = (props) => {\n const { selectedValues, selectedValue } = props;\n const currentSelectedValue = useMemo(() => {\n if (selectedValue !== undefined) return selectedValue;\n return selectedValues;\n }, [selectedValue, selectedValues]);\n if (Array.isArray(currentSelectedValue))\n throw new Error('DSSelect cannot be used with selectedValues as an array. Use DSMultiCombobox instead.');\n\n return <DSComboBox {...props} selectedValues={currentSelectedValue} onlySelectable />;\n};\n\nconst { selectedValues, ...restComboBoxPropTypes } = ComboboxPropTypes;\n\nconst SelectPropTypes = {\n ...restComboBoxPropTypes,\n selectedValue: PropTypes.shape({\n label: PropTypes.string.isRequired,\n value: PropTypes.string.isRequired,\n }),\n};\n\nDSSelect.displayName = 'DSSelect';\nconst DSSelectWithSchema = describe(DSSelect);\n\nDSSelectWithSchema.propTypes = SelectPropTypes as WeakValidationMap<unknown>;\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADkBd;AAjBT,mBAAuD;AACvD,8BAAoC;AACpC,8BAAgE;AAMzD,MAAM,WAAuC,CAAC,UAAU;AAC7D,QAAM,EAAE,gBAAAA,iBAAgB,cAAc,IAAI;AAC1C,QAAM,2BAAuB,sBAAQ,MAAM;AACzC,QAAI,kBAAkB,OAAW,QAAO;AACxC,WAAOA;AAAA,EACT,GAAG,CAAC,eAAeA,eAAc,CAAC;AAClC,MAAI,MAAM,QAAQ,oBAAoB;AACpC,UAAM,IAAI,MAAM,uFAAuF;AAEzG,SAAO,4CAAC,sCAAY,GAAG,OAAO,gBAAgB,sBAAsB,gBAAc,MAAC;AACrF;AAEA,MAAM,EAAE,gBAAgB,GAAG,sBAAsB,IAAI;AAErD,MAAM,kBAAkB;AAAA,EACtB,GAAG;AAAA,EACH,eAAe,kCAAU,MAAM;AAAA,IAC7B,OAAO,kCAAU,OAAO;AAAA,IACxB,OAAO,kCAAU,OAAO;AAAA,EAC1B,CAAC;AACH;AAEA,SAAS,cAAc;AACvB,MAAM,yBAAqB,kCAAS,QAAQ;AAE5C,mBAAmB,YAAY;",
|
|
6
6
|
"names": ["selectedValues"]
|
|
7
7
|
}
|
package/dist/esm/Select.js
CHANGED
|
@@ -6,8 +6,7 @@ import { DSComboBox, ComboboxPropTypes } from "@elliemae/ds-form-combobox";
|
|
|
6
6
|
const DSSelect = (props) => {
|
|
7
7
|
const { selectedValues: selectedValues2, selectedValue } = props;
|
|
8
8
|
const currentSelectedValue = useMemo(() => {
|
|
9
|
-
if (selectedValue !== void 0)
|
|
10
|
-
return selectedValue;
|
|
9
|
+
if (selectedValue !== void 0) return selectedValue;
|
|
11
10
|
return selectedValues2;
|
|
12
11
|
}, [selectedValue, selectedValues2]);
|
|
13
12
|
if (Array.isArray(currentSelectedValue))
|
|
@@ -22,7 +21,6 @@ const SelectPropTypes = {
|
|
|
22
21
|
value: PropTypes.string.isRequired
|
|
23
22
|
})
|
|
24
23
|
};
|
|
25
|
-
DSSelect.propTypes = SelectPropTypes;
|
|
26
24
|
DSSelect.displayName = "DSSelect";
|
|
27
25
|
const DSSelectWithSchema = describe(DSSelect);
|
|
28
26
|
DSSelectWithSchema.propTypes = SelectPropTypes;
|
package/dist/esm/Select.js.map
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../src/Select.tsx"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable no-unused-vars */\nimport React, { useMemo, type WeakValidationMap } from 'react';\nimport { describe, PropTypes } from '@elliemae/ds-props-helpers';\nimport { DSComboBox, type DSComboboxT, ComboboxPropTypes } from '@elliemae/ds-form-combobox';\n\ninterface Props extends DSComboboxT.Props {\n selectedValue: DSComboboxT.ItemOption;\n}\n\nexport const DSSelect: React.ComponentType<Props> = (props) => {\n const { selectedValues, selectedValue } = props;\n const currentSelectedValue = useMemo(() => {\n if (selectedValue !== undefined) return selectedValue;\n return selectedValues;\n }, [selectedValue, selectedValues]);\n if (Array.isArray(currentSelectedValue))\n throw new Error('DSSelect cannot be used with selectedValues as an array. Use DSMultiCombobox instead.');\n\n return <DSComboBox {...props} selectedValues={currentSelectedValue} onlySelectable />;\n};\n\nconst { selectedValues, ...restComboBoxPropTypes } = ComboboxPropTypes;\n\nconst SelectPropTypes = {\n ...restComboBoxPropTypes,\n selectedValue: PropTypes.shape({\n label: PropTypes.string.isRequired,\n value: PropTypes.string.isRequired,\n }),\n};\n\nDSSelect.
|
|
5
|
-
"mappings": "AAAA,YAAY,WAAW;ACkBd;AAjBT,SAAgB,eAAuC;AACvD,SAAS,UAAU,iBAAiB;AACpC,SAAS,YAA8B,yBAAyB;AAMzD,MAAM,WAAuC,CAAC,UAAU;AAC7D,QAAM,EAAE,gBAAAA,iBAAgB,cAAc,IAAI;AAC1C,QAAM,uBAAuB,QAAQ,MAAM;AACzC,QAAI,kBAAkB
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable no-unused-vars */\nimport React, { useMemo, type WeakValidationMap } from 'react';\nimport { describe, PropTypes } from '@elliemae/ds-props-helpers';\nimport { DSComboBox, type DSComboboxT, ComboboxPropTypes } from '@elliemae/ds-form-combobox';\n\ninterface Props extends DSComboboxT.Props {\n selectedValue: DSComboboxT.ItemOption;\n}\n\nexport const DSSelect: React.ComponentType<Props> = (props) => {\n const { selectedValues, selectedValue } = props;\n const currentSelectedValue = useMemo(() => {\n if (selectedValue !== undefined) return selectedValue;\n return selectedValues;\n }, [selectedValue, selectedValues]);\n if (Array.isArray(currentSelectedValue))\n throw new Error('DSSelect cannot be used with selectedValues as an array. Use DSMultiCombobox instead.');\n\n return <DSComboBox {...props} selectedValues={currentSelectedValue} onlySelectable />;\n};\n\nconst { selectedValues, ...restComboBoxPropTypes } = ComboboxPropTypes;\n\nconst SelectPropTypes = {\n ...restComboBoxPropTypes,\n selectedValue: PropTypes.shape({\n label: PropTypes.string.isRequired,\n value: PropTypes.string.isRequired,\n }),\n};\n\nDSSelect.displayName = 'DSSelect';\nconst DSSelectWithSchema = describe(DSSelect);\n\nDSSelectWithSchema.propTypes = SelectPropTypes as WeakValidationMap<unknown>;\n"],
|
|
5
|
+
"mappings": "AAAA,YAAY,WAAW;ACkBd;AAjBT,SAAgB,eAAuC;AACvD,SAAS,UAAU,iBAAiB;AACpC,SAAS,YAA8B,yBAAyB;AAMzD,MAAM,WAAuC,CAAC,UAAU;AAC7D,QAAM,EAAE,gBAAAA,iBAAgB,cAAc,IAAI;AAC1C,QAAM,uBAAuB,QAAQ,MAAM;AACzC,QAAI,kBAAkB,OAAW,QAAO;AACxC,WAAOA;AAAA,EACT,GAAG,CAAC,eAAeA,eAAc,CAAC;AAClC,MAAI,MAAM,QAAQ,oBAAoB;AACpC,UAAM,IAAI,MAAM,uFAAuF;AAEzG,SAAO,oBAAC,cAAY,GAAG,OAAO,gBAAgB,sBAAsB,gBAAc,MAAC;AACrF;AAEA,MAAM,EAAE,gBAAgB,GAAG,sBAAsB,IAAI;AAErD,MAAM,kBAAkB;AAAA,EACtB,GAAG;AAAA,EACH,eAAe,UAAU,MAAM;AAAA,IAC7B,OAAO,UAAU,OAAO;AAAA,IACxB,OAAO,UAAU,OAAO;AAAA,EAC1B,CAAC;AACH;AAEA,SAAS,cAAc;AACvB,MAAM,qBAAqB,SAAS,QAAQ;AAE5C,mBAAmB,YAAY;",
|
|
6
6
|
"names": ["selectedValues"]
|
|
7
7
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@elliemae/ds-form-select",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.36.0-next.1",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"description": "ICE MT - Dimsum - Controlled Form Select",
|
|
6
6
|
"files": [
|
|
@@ -36,15 +36,15 @@
|
|
|
36
36
|
"indent": 4
|
|
37
37
|
},
|
|
38
38
|
"dependencies": {
|
|
39
|
-
"@elliemae/ds-form-combobox": "3.
|
|
40
|
-
"@elliemae/ds-props-helpers": "3.
|
|
39
|
+
"@elliemae/ds-form-combobox": "3.36.0-next.1",
|
|
40
|
+
"@elliemae/ds-props-helpers": "3.36.0-next.1"
|
|
41
41
|
},
|
|
42
42
|
"devDependencies": {
|
|
43
43
|
"@elliemae/pui-cli": "~9.0.0-next.31",
|
|
44
44
|
"@elliemae/pui-theme": "~2.9.3",
|
|
45
45
|
"styled-components": "~5.3.9",
|
|
46
46
|
"styled-system": "~5.1.5",
|
|
47
|
-
"@elliemae/ds-monorepo-devops": "3.
|
|
47
|
+
"@elliemae/ds-monorepo-devops": "3.36.0-next.1"
|
|
48
48
|
},
|
|
49
49
|
"peerDependencies": {
|
|
50
50
|
"@elliemae/pui-theme": "~2.9.3",
|