@elliemae/ds-form-select 3.26.0-next.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/Select.js +62 -0
- package/dist/cjs/Select.js.map +7 -0
- package/dist/cjs/index.js +30 -0
- package/dist/cjs/index.js.map +7 -0
- package/dist/cjs/package.json +7 -0
- package/dist/esm/Select.js +32 -0
- package/dist/esm/Select.js.map +7 -0
- package/dist/esm/index.js +3 -0
- package/dist/esm/index.js.map +7 -0
- package/dist/esm/package.json +7 -0
- package/dist/types/Select.d.ts +7 -0
- package/dist/types/index.d.ts +1 -0
- package/package.json +70 -0
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __create = Object.create;
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
+
var __export = (target, all) => {
|
|
9
|
+
for (var name in all)
|
|
10
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
|
+
};
|
|
12
|
+
var __copyProps = (to, from, except, desc) => {
|
|
13
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
14
|
+
for (let key of __getOwnPropNames(from))
|
|
15
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
16
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
17
|
+
}
|
|
18
|
+
return to;
|
|
19
|
+
};
|
|
20
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
22
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
23
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
24
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
25
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
26
|
+
mod
|
|
27
|
+
));
|
|
28
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
|
+
var Select_exports = {};
|
|
30
|
+
__export(Select_exports, {
|
|
31
|
+
DSSelect: () => DSSelect
|
|
32
|
+
});
|
|
33
|
+
module.exports = __toCommonJS(Select_exports);
|
|
34
|
+
var React = __toESM(require("react"));
|
|
35
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
36
|
+
var import_react = require("react");
|
|
37
|
+
var import_ds_props_helpers = require("@elliemae/ds-props-helpers");
|
|
38
|
+
var import_ds_form_combobox = require("@elliemae/ds-form-combobox");
|
|
39
|
+
const DSSelect = (props) => {
|
|
40
|
+
const { selectedValues: selectedValues2, selectedValue } = props;
|
|
41
|
+
const currentSelectedValue = (0, import_react.useMemo)(() => {
|
|
42
|
+
if (selectedValue !== void 0)
|
|
43
|
+
return selectedValue;
|
|
44
|
+
return selectedValues2;
|
|
45
|
+
}, [selectedValue, selectedValues2]);
|
|
46
|
+
if (Array.isArray(currentSelectedValue))
|
|
47
|
+
throw new Error("DSSelect cannot be used with selectedValues as an array. Use DSMultiCombobox instead.");
|
|
48
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ds_form_combobox.DSComboBox, { ...props, selectedValues: currentSelectedValue, onlySelectable: true });
|
|
49
|
+
};
|
|
50
|
+
const { selectedValues, ...restComboBoxPropTypes } = import_ds_form_combobox.ComboboxPropTypes;
|
|
51
|
+
const SelectPropTypes = {
|
|
52
|
+
...restComboBoxPropTypes,
|
|
53
|
+
selectedValue: import_ds_props_helpers.PropTypes.shape({
|
|
54
|
+
label: import_ds_props_helpers.PropTypes.string.isRequired,
|
|
55
|
+
value: import_ds_props_helpers.PropTypes.string.isRequired
|
|
56
|
+
})
|
|
57
|
+
};
|
|
58
|
+
DSSelect.propTypes = SelectPropTypes;
|
|
59
|
+
DSSelect.displayName = "DSSelect";
|
|
60
|
+
const DSSelectWithSchema = (0, import_ds_props_helpers.describe)(DSSelect);
|
|
61
|
+
DSSelectWithSchema.propTypes = SelectPropTypes;
|
|
62
|
+
//# sourceMappingURL=Select.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 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.propTypes = SelectPropTypes as WeakValidationMap<unknown>;\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;AAAW,aAAO;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,YAAY;AACrB,SAAS,cAAc;AACvB,MAAM,yBAAqB,kCAAS,QAAQ;AAE5C,mBAAmB,YAAY;",
|
|
6
|
+
"names": ["selectedValues"]
|
|
7
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __create = Object.create;
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
+
var __copyProps = (to, from, except, desc) => {
|
|
9
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
10
|
+
for (let key of __getOwnPropNames(from))
|
|
11
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
12
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
13
|
+
}
|
|
14
|
+
return to;
|
|
15
|
+
};
|
|
16
|
+
var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
|
|
17
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
18
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
19
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
20
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
21
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
22
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
23
|
+
mod
|
|
24
|
+
));
|
|
25
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
26
|
+
var src_exports = {};
|
|
27
|
+
module.exports = __toCommonJS(src_exports);
|
|
28
|
+
var React = __toESM(require("react"));
|
|
29
|
+
__reExport(src_exports, require("./Select.js"), module.exports);
|
|
30
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/index.ts", "../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
+
"sourcesContent": ["export * from './Select.js';\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;ACAA,YAAuB;ADAvB,wBAAc,wBAAd;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { jsx } from "react/jsx-runtime";
|
|
3
|
+
import { useMemo } from "react";
|
|
4
|
+
import { describe, PropTypes } from "@elliemae/ds-props-helpers";
|
|
5
|
+
import { DSComboBox, ComboboxPropTypes } from "@elliemae/ds-form-combobox";
|
|
6
|
+
const DSSelect = (props) => {
|
|
7
|
+
const { selectedValues: selectedValues2, selectedValue } = props;
|
|
8
|
+
const currentSelectedValue = useMemo(() => {
|
|
9
|
+
if (selectedValue !== void 0)
|
|
10
|
+
return selectedValue;
|
|
11
|
+
return selectedValues2;
|
|
12
|
+
}, [selectedValue, selectedValues2]);
|
|
13
|
+
if (Array.isArray(currentSelectedValue))
|
|
14
|
+
throw new Error("DSSelect cannot be used with selectedValues as an array. Use DSMultiCombobox instead.");
|
|
15
|
+
return /* @__PURE__ */ jsx(DSComboBox, { ...props, selectedValues: currentSelectedValue, onlySelectable: true });
|
|
16
|
+
};
|
|
17
|
+
const { selectedValues, ...restComboBoxPropTypes } = ComboboxPropTypes;
|
|
18
|
+
const SelectPropTypes = {
|
|
19
|
+
...restComboBoxPropTypes,
|
|
20
|
+
selectedValue: PropTypes.shape({
|
|
21
|
+
label: PropTypes.string.isRequired,
|
|
22
|
+
value: PropTypes.string.isRequired
|
|
23
|
+
})
|
|
24
|
+
};
|
|
25
|
+
DSSelect.propTypes = SelectPropTypes;
|
|
26
|
+
DSSelect.displayName = "DSSelect";
|
|
27
|
+
const DSSelectWithSchema = describe(DSSelect);
|
|
28
|
+
DSSelectWithSchema.propTypes = SelectPropTypes;
|
|
29
|
+
export {
|
|
30
|
+
DSSelect
|
|
31
|
+
};
|
|
32
|
+
//# sourceMappingURL=Select.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 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.propTypes = SelectPropTypes as WeakValidationMap<unknown>;\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;AAAW,aAAO;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,YAAY;AACrB,SAAS,cAAc;AACvB,MAAM,qBAAqB,SAAS,QAAQ;AAE5C,mBAAmB,YAAY;",
|
|
6
|
+
"names": ["selectedValues"]
|
|
7
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../src/index.ts"],
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "export * from './Select.js';\n"],
|
|
5
|
+
"mappings": "AAAA,YAAY,WAAW;ACAvB,cAAc;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './Select.js';
|
package/package.json
ADDED
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@elliemae/ds-form-select",
|
|
3
|
+
"version": "3.26.0-next.11",
|
|
4
|
+
"license": "MIT",
|
|
5
|
+
"description": "ICE MT - Dimsum - Controlled Form Select",
|
|
6
|
+
"files": [
|
|
7
|
+
"dist"
|
|
8
|
+
],
|
|
9
|
+
"module": "./dist/esm/index.js",
|
|
10
|
+
"main": "./dist/cjs/index.js",
|
|
11
|
+
"types": "./dist/types/index.d.ts",
|
|
12
|
+
"exports": {
|
|
13
|
+
".": {
|
|
14
|
+
"import": "./dist/esm/index.js",
|
|
15
|
+
"require": "./dist/cjs/index.js"
|
|
16
|
+
}
|
|
17
|
+
},
|
|
18
|
+
"sideEffects": [
|
|
19
|
+
"*.css",
|
|
20
|
+
"*.scss"
|
|
21
|
+
],
|
|
22
|
+
"repository": {
|
|
23
|
+
"type": "git",
|
|
24
|
+
"url": "https://git.elliemae.io/platform-ui/dimsum.git"
|
|
25
|
+
},
|
|
26
|
+
"engines": {
|
|
27
|
+
"pnpm": ">=6",
|
|
28
|
+
"node": ">=16"
|
|
29
|
+
},
|
|
30
|
+
"author": "ICE MT",
|
|
31
|
+
"jestSonar": {
|
|
32
|
+
"sonar56x": true,
|
|
33
|
+
"reportPath": "reports",
|
|
34
|
+
"reportFile": "tests.xml",
|
|
35
|
+
"indent": 4
|
|
36
|
+
},
|
|
37
|
+
"dependencies": {
|
|
38
|
+
"@elliemae/ds-form-combobox": "3.26.0-next.11",
|
|
39
|
+
"@elliemae/ds-props-helpers": "3.26.0-next.11"
|
|
40
|
+
},
|
|
41
|
+
"devDependencies": {
|
|
42
|
+
"@elliemae/pui-cli": "~9.0.0-next.31",
|
|
43
|
+
"@elliemae/pui-theme": "~2.7.0",
|
|
44
|
+
"styled-components": "~5.3.9",
|
|
45
|
+
"styled-system": "~5.1.5",
|
|
46
|
+
"@elliemae/ds-monorepo-devops": "3.26.0-next.11"
|
|
47
|
+
},
|
|
48
|
+
"peerDependencies": {
|
|
49
|
+
"@elliemae/pui-theme": "~2.7.0",
|
|
50
|
+
"react": "^17.0.2",
|
|
51
|
+
"react-dom": "^17.0.2",
|
|
52
|
+
"styled-components": "~5.3.9",
|
|
53
|
+
"styled-system": "^5.1.5"
|
|
54
|
+
},
|
|
55
|
+
"publishConfig": {
|
|
56
|
+
"access": "public",
|
|
57
|
+
"typeSafety": false
|
|
58
|
+
},
|
|
59
|
+
"scripts": {
|
|
60
|
+
"dev": "cross-env NODE_ENV=development node ../../../scripts/build/build.mjs --watch",
|
|
61
|
+
"test": "pui-cli test --passWithNoTests",
|
|
62
|
+
"lint": "node ../../../scripts/lint.mjs",
|
|
63
|
+
"eslint:fix": "eslint --ext='.js,.jsx,.test.js,.ts,.tsx' --fix --config='../../../.eslintrc.js' src/",
|
|
64
|
+
"dts": "node ../../../scripts/dts.mjs",
|
|
65
|
+
"build": "cross-env NODE_ENV=production node ../../../scripts/build/build.mjs",
|
|
66
|
+
"dev:build": "pnpm --filter {.}... build",
|
|
67
|
+
"dev:install": "pnpm --filter {.}... i --no-lockfile && pnpm run dev:build",
|
|
68
|
+
"checkDeps": "npm exec ../../util/ds-codemods -- check-missing-packages --projectFolderPath=\"./\" --ignorePackagesGlobPattern=\"\" --ignoreFilesGlobPattern=\"**/test-ables/*,**/tests/*\""
|
|
69
|
+
}
|
|
70
|
+
}
|