@elliemae/ds-number-range-field 3.27.0-next.1 → 3.27.0-next.2
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/index.js +4 -4
- package/dist/cjs/index.js.map +2 -2
- package/dist/esm/index.js +2 -3
- package/dist/esm/index.js.map +2 -2
- package/dist/types/index.d.ts +2 -1
- package/package.json +8 -18
- package/dist/cjs/DSNumberRangeField.js +0 -95
- package/dist/cjs/DSNumberRangeField.js.map +0 -7
- package/dist/cjs/impl/NumberRangeFieldImpl.js +0 -117
- package/dist/cjs/impl/NumberRangeFieldImpl.js.map +0 -7
- package/dist/esm/DSNumberRangeField.js +0 -65
- package/dist/esm/DSNumberRangeField.js.map +0 -7
- package/dist/esm/impl/NumberRangeFieldImpl.js +0 -87
- package/dist/esm/impl/NumberRangeFieldImpl.js.map +0 -7
- package/dist/types/DSNumberRangeField.d.ts +0 -53
- package/dist/types/impl/NumberRangeFieldImpl.d.ts +0 -17
package/dist/cjs/index.js
CHANGED
|
@@ -17,6 +17,7 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
17
17
|
}
|
|
18
18
|
return to;
|
|
19
19
|
};
|
|
20
|
+
var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
|
|
20
21
|
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
22
|
// If the importer is in node compatibility mode or this is not an ESM
|
|
22
23
|
// file that has been converted to a CommonJS file using a Babel-
|
|
@@ -28,11 +29,10 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
28
29
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
30
|
var src_exports = {};
|
|
30
31
|
__export(src_exports, {
|
|
31
|
-
|
|
32
|
-
NumberRangeFieldWithSchema: () => import_DSNumberRangeField.NumberRangeFieldWithSchema,
|
|
33
|
-
default: () => import_DSNumberRangeField.default
|
|
32
|
+
default: () => import_ds_legacy_number_range_field.default
|
|
34
33
|
});
|
|
35
34
|
module.exports = __toCommonJS(src_exports);
|
|
36
35
|
var React = __toESM(require("react"));
|
|
37
|
-
|
|
36
|
+
__reExport(src_exports, require("@elliemae/ds-legacy-number-range-field"), module.exports);
|
|
37
|
+
var import_ds_legacy_number_range_field = __toESM(require("@elliemae/ds-legacy-number-range-field"));
|
|
38
38
|
//# sourceMappingURL=index.js.map
|
package/dist/cjs/index.js.map
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/index.tsx", "../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
-
"sourcesContent": ["export { default
|
|
5
|
-
"mappings": "
|
|
4
|
+
"sourcesContent": ["export * from '@elliemae/ds-legacy-number-range-field';\nexport { default } from '@elliemae/ds-legacy-number-range-field';\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,wBAAc,mDAAd;AACA,0CAAwB;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
package/dist/esm/index.js
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
|
-
|
|
2
|
+
export * from "@elliemae/ds-legacy-number-range-field";
|
|
3
|
+
import { default as default2 } from "@elliemae/ds-legacy-number-range-field";
|
|
3
4
|
export {
|
|
4
|
-
DSNumberRangeField,
|
|
5
|
-
NumberRangeFieldWithSchema,
|
|
6
5
|
default2 as default
|
|
7
6
|
};
|
|
8
7
|
//# sourceMappingURL=index.js.map
|
package/dist/esm/index.js.map
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../src/index.tsx"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "export { default
|
|
5
|
-
"mappings": "AAAA,YAAY,WAAW;ACAvB,SAAS,WAAAA,
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "export * from '@elliemae/ds-legacy-number-range-field';\nexport { default } from '@elliemae/ds-legacy-number-range-field';\n"],
|
|
5
|
+
"mappings": "AAAA,YAAY,WAAW;ACAvB,cAAc;AACd,SAAS,WAAAA,gBAAe;",
|
|
6
6
|
"names": ["default"]
|
|
7
7
|
}
|
package/dist/types/index.d.ts
CHANGED
|
@@ -1 +1,2 @@
|
|
|
1
|
-
export
|
|
1
|
+
export * from '@elliemae/ds-legacy-number-range-field';
|
|
2
|
+
export { default } from '@elliemae/ds-legacy-number-range-field';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@elliemae/ds-number-range-field",
|
|
3
|
-
"version": "3.27.0-next.
|
|
3
|
+
"version": "3.27.0-next.2",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"description": "ICE MT - Dimsum - Number Range Field",
|
|
6
6
|
"files": [
|
|
@@ -13,14 +13,6 @@
|
|
|
13
13
|
".": {
|
|
14
14
|
"import": "./dist/esm/index.js",
|
|
15
15
|
"require": "./dist/cjs/index.js"
|
|
16
|
-
},
|
|
17
|
-
"./impl/NumberRangeFieldImpl": {
|
|
18
|
-
"import": "./dist/esm/impl/NumberRangeFieldImpl.js",
|
|
19
|
-
"require": "./dist/cjs/impl/NumberRangeFieldImpl.js"
|
|
20
|
-
},
|
|
21
|
-
"./DSNumberRangeField": {
|
|
22
|
-
"import": "./dist/esm/DSNumberRangeField.js",
|
|
23
|
-
"require": "./dist/cjs/DSNumberRangeField.js"
|
|
24
16
|
}
|
|
25
17
|
},
|
|
26
18
|
"sideEffects": [
|
|
@@ -43,14 +35,12 @@
|
|
|
43
35
|
"indent": 4
|
|
44
36
|
},
|
|
45
37
|
"dependencies": {
|
|
46
|
-
"@elliemae/ds-
|
|
47
|
-
"@elliemae/ds-form": "3.27.0-next.1",
|
|
48
|
-
"@elliemae/ds-props-helpers": "3.27.0-next.1"
|
|
38
|
+
"@elliemae/ds-legacy-number-range-field": "1.0.1"
|
|
49
39
|
},
|
|
50
40
|
"devDependencies": {
|
|
51
41
|
"@elliemae/pui-cli": "~9.0.0-next.31",
|
|
52
42
|
"styled-components": "~5.3.9",
|
|
53
|
-
"@elliemae/ds-monorepo-devops": "3.27.0-next.
|
|
43
|
+
"@elliemae/ds-monorepo-devops": "3.27.0-next.2"
|
|
54
44
|
},
|
|
55
45
|
"peerDependencies": {
|
|
56
46
|
"lodash": "^4.17.21",
|
|
@@ -63,13 +53,13 @@
|
|
|
63
53
|
},
|
|
64
54
|
"scripts": {
|
|
65
55
|
"dev": "cross-env NODE_ENV=development node ../../../scripts/build/build.mjs --watch",
|
|
66
|
-
"test": "
|
|
67
|
-
"lint": "
|
|
68
|
-
"eslint:fix": "
|
|
69
|
-
"dts": "
|
|
56
|
+
"test": "exit 0 | echo",
|
|
57
|
+
"lint": "exit 0 | echo",
|
|
58
|
+
"eslint:fix": "exit 0 | echo",
|
|
59
|
+
"dts": "exit 0 | echo",
|
|
70
60
|
"build": "cross-env NODE_ENV=production node ../../../scripts/build/build.mjs",
|
|
71
61
|
"dev:build": "pnpm --filter {.}... build",
|
|
72
62
|
"dev:install": "pnpm --filter {.}... i --no-lockfile && pnpm run dev:build",
|
|
73
|
-
"checkDeps": "
|
|
63
|
+
"checkDeps": "exit 0 | echo"
|
|
74
64
|
}
|
|
75
65
|
}
|
|
@@ -1,95 +0,0 @@
|
|
|
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 DSNumberRangeField_exports = {};
|
|
30
|
-
__export(DSNumberRangeField_exports, {
|
|
31
|
-
DSNumberRangeField: () => DSNumberRangeField,
|
|
32
|
-
NumberRangeFieldWithSchema: () => NumberRangeFieldWithSchema,
|
|
33
|
-
default: () => DSNumberRangeField_default
|
|
34
|
-
});
|
|
35
|
-
module.exports = __toCommonJS(DSNumberRangeField_exports);
|
|
36
|
-
var React = __toESM(require("react"));
|
|
37
|
-
var import_jsx_runtime = require("react/jsx-runtime");
|
|
38
|
-
var import_ds_props_helpers = require("@elliemae/ds-props-helpers");
|
|
39
|
-
var import_NumberRangeFieldImpl = __toESM(require("./impl/NumberRangeFieldImpl.js"));
|
|
40
|
-
const DSNumberRangeField = ({
|
|
41
|
-
containerProps = {},
|
|
42
|
-
maxFrom = null,
|
|
43
|
-
minFrom = 0,
|
|
44
|
-
maxTo = null,
|
|
45
|
-
minTo = 0,
|
|
46
|
-
onChange = () => null,
|
|
47
|
-
placeholderFrom = "From",
|
|
48
|
-
placeholderTo = "To",
|
|
49
|
-
stepFrom = 1,
|
|
50
|
-
stepTo = 1,
|
|
51
|
-
value = [],
|
|
52
|
-
separator = "-",
|
|
53
|
-
maskOptions,
|
|
54
|
-
type
|
|
55
|
-
}) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
56
|
-
import_NumberRangeFieldImpl.default,
|
|
57
|
-
{
|
|
58
|
-
containerProps,
|
|
59
|
-
maxFrom,
|
|
60
|
-
maxTo,
|
|
61
|
-
minFrom,
|
|
62
|
-
minTo,
|
|
63
|
-
onChange,
|
|
64
|
-
placeholderFrom,
|
|
65
|
-
placeholderTo,
|
|
66
|
-
separator,
|
|
67
|
-
stepFrom,
|
|
68
|
-
stepTo,
|
|
69
|
-
value,
|
|
70
|
-
maskOptions,
|
|
71
|
-
type
|
|
72
|
-
}
|
|
73
|
-
);
|
|
74
|
-
const numberRangeFieldProps = {
|
|
75
|
-
containerProps: import_ds_props_helpers.PropTypes.object.description("Set of Properties attached to the main container"),
|
|
76
|
-
maxFrom: import_ds_props_helpers.PropTypes.number.description("Maximum number accepted in `From` field").defaultValue(null),
|
|
77
|
-
minFrom: import_ds_props_helpers.PropTypes.number.description("Minimum number accepted in `From` field").defaultValue(0),
|
|
78
|
-
maxTo: import_ds_props_helpers.PropTypes.number.description("Maximum number accepted in `To` field").defaultValue(null),
|
|
79
|
-
minTo: import_ds_props_helpers.PropTypes.number.description("Minimum number accepted in `To` field").defaultValue(0),
|
|
80
|
-
onChange: import_ds_props_helpers.PropTypes.func.description("Function executed when the value on the fields changes"),
|
|
81
|
-
placeholderFrom: import_ds_props_helpers.PropTypes.string.description("Placeholder value for the `From` field").defaultValue("From"),
|
|
82
|
-
placeholderTo: import_ds_props_helpers.PropTypes.string.description("Placeholder value for the `To` field").defaultValue("To"),
|
|
83
|
-
stepFrom: import_ds_props_helpers.PropTypes.number.description("Amount of units the `From` field value increases/decreases"),
|
|
84
|
-
stepTo: import_ds_props_helpers.PropTypes.number.description("Amount of units the `To` field value increases/decreases"),
|
|
85
|
-
value: import_ds_props_helpers.PropTypes.shape([import_ds_props_helpers.PropTypes.number, import_ds_props_helpers.PropTypes.number]).description("Array with the values of both fields"),
|
|
86
|
-
separator: import_ds_props_helpers.PropTypes.string.description("Character that separates fields").defaultValue("-"),
|
|
87
|
-
maskOptions: import_ds_props_helpers.PropTypes.object.description("Object with mask configurations"),
|
|
88
|
-
type: import_ds_props_helpers.PropTypes.string.description("Type of input")
|
|
89
|
-
};
|
|
90
|
-
DSNumberRangeField.propTypes = numberRangeFieldProps;
|
|
91
|
-
DSNumberRangeField.displayName = "DSNumberRangeField";
|
|
92
|
-
const NumberRangeFieldWithSchema = (0, import_ds_props_helpers.describe)(DSNumberRangeField);
|
|
93
|
-
NumberRangeFieldWithSchema.propTypes = numberRangeFieldProps;
|
|
94
|
-
var DSNumberRangeField_default = DSNumberRangeField;
|
|
95
|
-
//# sourceMappingURL=DSNumberRangeField.js.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../src/DSNumberRangeField.tsx", "../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
-
"sourcesContent": ["import React from 'react';\nimport { describe, PropTypes } from '@elliemae/ds-props-helpers';\nimport NumberRangeFieldImpl from './impl/NumberRangeFieldImpl.js';\n\nconst DSNumberRangeField = ({\n containerProps = {},\n maxFrom = null,\n minFrom = 0,\n maxTo = null,\n minTo = 0,\n onChange = () => null,\n placeholderFrom = 'From',\n placeholderTo = 'To',\n stepFrom = 1,\n stepTo = 1,\n value = [],\n separator = '-',\n maskOptions,\n type,\n}) => (\n <NumberRangeFieldImpl\n containerProps={containerProps}\n maxFrom={maxFrom}\n maxTo={maxTo}\n minFrom={minFrom}\n minTo={minTo}\n onChange={onChange}\n placeholderFrom={placeholderFrom}\n placeholderTo={placeholderTo}\n separator={separator}\n stepFrom={stepFrom}\n stepTo={stepTo}\n value={value}\n maskOptions={maskOptions}\n type={type}\n />\n);\n\nconst numberRangeFieldProps = {\n containerProps: PropTypes.object.description('Set of Properties attached to the main container'),\n maxFrom: PropTypes.number.description('Maximum number accepted in `From` field').defaultValue(null),\n minFrom: PropTypes.number.description('Minimum number accepted in `From` field').defaultValue(0),\n maxTo: PropTypes.number.description('Maximum number accepted in `To` field').defaultValue(null),\n minTo: PropTypes.number.description('Minimum number accepted in `To` field').defaultValue(0),\n onChange: PropTypes.func.description('Function executed when the value on the fields changes'),\n placeholderFrom: PropTypes.string.description('Placeholder value for the `From` field').defaultValue('From'),\n placeholderTo: PropTypes.string.description('Placeholder value for the `To` field').defaultValue('To'),\n stepFrom: PropTypes.number.description('Amount of units the `From` field value increases/decreases'),\n stepTo: PropTypes.number.description('Amount of units the `To` field value increases/decreases'),\n value: PropTypes.shape([PropTypes.number, PropTypes.number]).description('Array with the values of both fields'),\n separator: PropTypes.string.description('Character that separates fields').defaultValue('-'),\n maskOptions: PropTypes.object.description('Object with mask configurations'),\n type: PropTypes.string.description('Type of input'),\n};\n\nDSNumberRangeField.propTypes = numberRangeFieldProps;\nDSNumberRangeField.displayName = 'DSNumberRangeField';\nconst NumberRangeFieldWithSchema = describe(DSNumberRangeField);\nNumberRangeFieldWithSchema.propTypes = numberRangeFieldProps;\n\nexport { NumberRangeFieldWithSchema, DSNumberRangeField };\nexport default DSNumberRangeField;\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;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C/G,WAAW,kCAAU,OAAO,YAAY,iCAAiC,EAAE,aAAa,GAAG;AAAA,EAC3F,aAAa,kCAAU,OAAO,YAAY,iCAAiC;AAAA,EAC3E,MAAM,kCAAU,OAAO,YAAY,eAAe;AACpD;AAEA,mBAAmB,YAAY;AAC/B,mBAAmB,cAAc;AACjC,MAAM,iCAA6B,kCAAS,kBAAkB;AAC9D,2BAA2B,YAAY;AAGvC,IAAO,6BAAQ;",
|
|
6
|
-
"names": ["NumberRangeFieldImpl"]
|
|
7
|
-
}
|
|
@@ -1,117 +0,0 @@
|
|
|
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 NumberRangeFieldImpl_exports = {};
|
|
30
|
-
__export(NumberRangeFieldImpl_exports, {
|
|
31
|
-
default: () => NumberRangeFieldImpl_default
|
|
32
|
-
});
|
|
33
|
-
module.exports = __toCommonJS(NumberRangeFieldImpl_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_classnames = require("@elliemae/ds-classnames");
|
|
38
|
-
var import_ds_form = require("@elliemae/ds-form");
|
|
39
|
-
const { cssClassName, classNameElement, classNameBlock } = (0, import_ds_classnames.convertPropToCssClassName)(
|
|
40
|
-
"query-builder-addon-number-range-field"
|
|
41
|
-
);
|
|
42
|
-
const DSSearchFieldImpl = ({
|
|
43
|
-
onChange,
|
|
44
|
-
containerProps,
|
|
45
|
-
maxFrom,
|
|
46
|
-
maxTo,
|
|
47
|
-
minFrom,
|
|
48
|
-
minTo,
|
|
49
|
-
placeholderFrom,
|
|
50
|
-
placeholderTo,
|
|
51
|
-
separator,
|
|
52
|
-
stepFrom,
|
|
53
|
-
stepTo,
|
|
54
|
-
value,
|
|
55
|
-
maskOptions,
|
|
56
|
-
type
|
|
57
|
-
}) => {
|
|
58
|
-
const [valueFrom, setValueFrom] = (0, import_react.useState)();
|
|
59
|
-
const [valueTo, setValueTo] = (0, import_react.useState)();
|
|
60
|
-
(0, import_react.useEffect)(() => {
|
|
61
|
-
if (Array.isArray(value)) {
|
|
62
|
-
setValueFrom(value[0]);
|
|
63
|
-
setValueTo(value[1]);
|
|
64
|
-
} else {
|
|
65
|
-
setValueFrom(value);
|
|
66
|
-
}
|
|
67
|
-
}, [value]);
|
|
68
|
-
const handleOnChange = (newValueFrom, newValueTo) => {
|
|
69
|
-
setValueFrom(newValueFrom);
|
|
70
|
-
setValueTo(newValueTo);
|
|
71
|
-
onChange([newValueFrom, newValueTo]);
|
|
72
|
-
};
|
|
73
|
-
const maskConfig = {
|
|
74
|
-
prefix: "",
|
|
75
|
-
includeThousandsSeparator: false,
|
|
76
|
-
...maskOptions
|
|
77
|
-
};
|
|
78
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { ...containerProps, className: `${cssClassName}`, children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: classNameBlock("wrapper"), children: [
|
|
79
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
80
|
-
import_ds_form.DSInputMask,
|
|
81
|
-
{
|
|
82
|
-
type,
|
|
83
|
-
max: maxFrom,
|
|
84
|
-
min: minFrom,
|
|
85
|
-
step: stepFrom,
|
|
86
|
-
value: valueFrom?.toString(),
|
|
87
|
-
placeholder: placeholderFrom,
|
|
88
|
-
mask: (number) => import_ds_form.MASK_TYPES.NUMBER(maskConfig)(number),
|
|
89
|
-
onChange: (e) => {
|
|
90
|
-
const newValueFrom = e.target.value;
|
|
91
|
-
handleOnChange(newValueFrom, valueTo);
|
|
92
|
-
},
|
|
93
|
-
"data-testid": "ds-number-range-field__from-input"
|
|
94
|
-
}
|
|
95
|
-
),
|
|
96
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: classNameElement("separator"), children: separator }),
|
|
97
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
98
|
-
import_ds_form.DSInputMask,
|
|
99
|
-
{
|
|
100
|
-
type,
|
|
101
|
-
max: maxTo,
|
|
102
|
-
min: minTo,
|
|
103
|
-
step: stepTo,
|
|
104
|
-
value: valueTo?.toString(),
|
|
105
|
-
placeholder: placeholderTo,
|
|
106
|
-
mask: (number) => import_ds_form.MASK_TYPES.NUMBER(maskConfig)(number),
|
|
107
|
-
onChange: (e) => {
|
|
108
|
-
const newValueTo = e.target.value;
|
|
109
|
-
handleOnChange(valueFrom, newValueTo);
|
|
110
|
-
},
|
|
111
|
-
"data-testid": "ds-number-range-field__to-input"
|
|
112
|
-
}
|
|
113
|
-
)
|
|
114
|
-
] }) });
|
|
115
|
-
};
|
|
116
|
-
var NumberRangeFieldImpl_default = DSSearchFieldImpl;
|
|
117
|
-
//# sourceMappingURL=NumberRangeFieldImpl.js.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../src/impl/NumberRangeFieldImpl.tsx", "../../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
-
"sourcesContent": ["/* eslint-disable react/prop-types */\nimport React, { useState, useEffect } from 'react';\nimport { convertPropToCssClassName } from '@elliemae/ds-classnames';\nimport { DSInputMask, MASK_TYPES } from '@elliemae/ds-form';\n\nconst { cssClassName, classNameElement, classNameBlock } = convertPropToCssClassName(\n 'query-builder-addon-number-range-field',\n);\n\nconst DSSearchFieldImpl = ({\n onChange,\n containerProps,\n maxFrom,\n maxTo,\n minFrom,\n minTo,\n placeholderFrom,\n placeholderTo,\n separator,\n stepFrom,\n stepTo,\n value,\n maskOptions,\n type,\n}) => {\n const [valueFrom, setValueFrom] = useState();\n const [valueTo, setValueTo] = useState();\n\n useEffect(() => {\n if (Array.isArray(value)) {\n setValueFrom(value[0]);\n setValueTo(value[1]);\n } else {\n setValueFrom(value);\n }\n }, [value]);\n\n const handleOnChange = (newValueFrom, newValueTo) => {\n setValueFrom(newValueFrom);\n setValueTo(newValueTo);\n onChange([newValueFrom, newValueTo]);\n };\n\n const maskConfig = {\n prefix: '',\n includeThousandsSeparator: false,\n ...maskOptions,\n };\n\n return (\n <div {...containerProps} className={`${cssClassName}`}>\n <div className={classNameBlock('wrapper')}>\n <DSInputMask\n type={type}\n max={maxFrom}\n min={minFrom}\n step={stepFrom}\n value={valueFrom?.toString()}\n placeholder={placeholderFrom}\n mask={(number) => MASK_TYPES.NUMBER(maskConfig)(number)}\n onChange={(e) => {\n const newValueFrom = e.target.value;\n handleOnChange(newValueFrom, valueTo);\n }}\n data-testid=\"ds-number-range-field__from-input\"\n />\n <div className={classNameElement('separator')}>{separator}</div>\n <DSInputMask\n type={type}\n max={maxTo}\n min={minTo}\n step={stepTo}\n value={valueTo?.toString()}\n placeholder={placeholderTo}\n mask={(number) => MASK_TYPES.NUMBER(maskConfig)(number)}\n onChange={(e) => {\n const newValueTo = e.target.value;\n handleOnChange(valueFrom, newValueTo);\n }}\n data-testid=\"ds-number-range-field__to-input\"\n />\n </div>\n </div>\n );\n};\n\nexport default DSSearchFieldImpl;\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADmDjB;AAlDN,mBAA2C;AAC3C,2BAA0C;AAC1C,qBAAwC;AAExC,MAAM,EAAE,cAAc,kBAAkB,eAAe,QAAI;AAAA,EACzD;AACF;AAEA,MAAM,oBAAoB,CAAC;AAAA,EACzB;AAAA,EACA;AAAA,EACA;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,CAAC,WAAW,YAAY,QAAI,uBAAS;AAC3C,QAAM,CAAC,SAAS,UAAU,QAAI,uBAAS;AAEvC,8BAAU,MAAM;AACd,QAAI,MAAM,QAAQ,KAAK,GAAG;AACxB,mBAAa,MAAM,CAAC,CAAC;AACrB,iBAAW,MAAM,CAAC,CAAC;AAAA,IACrB,OAAO;AACL,mBAAa,KAAK;AAAA,IACpB;AAAA,EACF,GAAG,CAAC,KAAK,CAAC;AAEV,QAAM,iBAAiB,CAAC,cAAc,eAAe;AACnD,iBAAa,YAAY;AACzB,eAAW,UAAU;AACrB,aAAS,CAAC,cAAc,UAAU,CAAC;AAAA,EACrC;AAEA,QAAM,aAAa;AAAA,IACjB,QAAQ;AAAA,IACR,2BAA2B;AAAA,IAC3B,GAAG;AAAA,EACL;AAEA,SACE,4CAAC,SAAK,GAAG,gBAAgB,WAAW,GAAG,gBACrC,uDAAC,SAAI,WAAW,eAAe,SAAS,GACtC;AAAA;AAAA,MAAC;AAAA;AAAA,QACC;AAAA,QACA,KAAK;AAAA,QACL,KAAK;AAAA,QACL,MAAM;AAAA,QACN,OAAO,WAAW,SAAS;AAAA,QAC3B,aAAa;AAAA,QACb,MAAM,CAAC,WAAW,0BAAW,OAAO,UAAU,EAAE,MAAM;AAAA,QACtD,UAAU,CAAC,MAAM;AACf,gBAAM,eAAe,EAAE,OAAO;AAC9B,yBAAe,cAAc,OAAO;AAAA,QACtC;AAAA,QACA,eAAY;AAAA;AAAA,IACd;AAAA,IACA,4CAAC,SAAI,WAAW,iBAAiB,WAAW,GAAI,qBAAU;AAAA,IAC1D;AAAA,MAAC;AAAA;AAAA,QACC;AAAA,QACA,KAAK;AAAA,QACL,KAAK;AAAA,QACL,MAAM;AAAA,QACN,OAAO,SAAS,SAAS;AAAA,QACzB,aAAa;AAAA,QACb,MAAM,CAAC,WAAW,0BAAW,OAAO,UAAU,EAAE,MAAM;AAAA,QACtD,UAAU,CAAC,MAAM;AACf,gBAAM,aAAa,EAAE,OAAO;AAC5B,yBAAe,WAAW,UAAU;AAAA,QACtC;AAAA,QACA,eAAY;AAAA;AAAA,IACd;AAAA,KACF,GACF;AAEJ;AAEA,IAAO,+BAAQ;",
|
|
6
|
-
"names": []
|
|
7
|
-
}
|
|
@@ -1,65 +0,0 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
|
-
import { jsx } from "react/jsx-runtime";
|
|
3
|
-
import { describe, PropTypes } from "@elliemae/ds-props-helpers";
|
|
4
|
-
import NumberRangeFieldImpl from "./impl/NumberRangeFieldImpl.js";
|
|
5
|
-
const DSNumberRangeField = ({
|
|
6
|
-
containerProps = {},
|
|
7
|
-
maxFrom = null,
|
|
8
|
-
minFrom = 0,
|
|
9
|
-
maxTo = null,
|
|
10
|
-
minTo = 0,
|
|
11
|
-
onChange = () => null,
|
|
12
|
-
placeholderFrom = "From",
|
|
13
|
-
placeholderTo = "To",
|
|
14
|
-
stepFrom = 1,
|
|
15
|
-
stepTo = 1,
|
|
16
|
-
value = [],
|
|
17
|
-
separator = "-",
|
|
18
|
-
maskOptions,
|
|
19
|
-
type
|
|
20
|
-
}) => /* @__PURE__ */ jsx(
|
|
21
|
-
NumberRangeFieldImpl,
|
|
22
|
-
{
|
|
23
|
-
containerProps,
|
|
24
|
-
maxFrom,
|
|
25
|
-
maxTo,
|
|
26
|
-
minFrom,
|
|
27
|
-
minTo,
|
|
28
|
-
onChange,
|
|
29
|
-
placeholderFrom,
|
|
30
|
-
placeholderTo,
|
|
31
|
-
separator,
|
|
32
|
-
stepFrom,
|
|
33
|
-
stepTo,
|
|
34
|
-
value,
|
|
35
|
-
maskOptions,
|
|
36
|
-
type
|
|
37
|
-
}
|
|
38
|
-
);
|
|
39
|
-
const numberRangeFieldProps = {
|
|
40
|
-
containerProps: PropTypes.object.description("Set of Properties attached to the main container"),
|
|
41
|
-
maxFrom: PropTypes.number.description("Maximum number accepted in `From` field").defaultValue(null),
|
|
42
|
-
minFrom: PropTypes.number.description("Minimum number accepted in `From` field").defaultValue(0),
|
|
43
|
-
maxTo: PropTypes.number.description("Maximum number accepted in `To` field").defaultValue(null),
|
|
44
|
-
minTo: PropTypes.number.description("Minimum number accepted in `To` field").defaultValue(0),
|
|
45
|
-
onChange: PropTypes.func.description("Function executed when the value on the fields changes"),
|
|
46
|
-
placeholderFrom: PropTypes.string.description("Placeholder value for the `From` field").defaultValue("From"),
|
|
47
|
-
placeholderTo: PropTypes.string.description("Placeholder value for the `To` field").defaultValue("To"),
|
|
48
|
-
stepFrom: PropTypes.number.description("Amount of units the `From` field value increases/decreases"),
|
|
49
|
-
stepTo: PropTypes.number.description("Amount of units the `To` field value increases/decreases"),
|
|
50
|
-
value: PropTypes.shape([PropTypes.number, PropTypes.number]).description("Array with the values of both fields"),
|
|
51
|
-
separator: PropTypes.string.description("Character that separates fields").defaultValue("-"),
|
|
52
|
-
maskOptions: PropTypes.object.description("Object with mask configurations"),
|
|
53
|
-
type: PropTypes.string.description("Type of input")
|
|
54
|
-
};
|
|
55
|
-
DSNumberRangeField.propTypes = numberRangeFieldProps;
|
|
56
|
-
DSNumberRangeField.displayName = "DSNumberRangeField";
|
|
57
|
-
const NumberRangeFieldWithSchema = describe(DSNumberRangeField);
|
|
58
|
-
NumberRangeFieldWithSchema.propTypes = numberRangeFieldProps;
|
|
59
|
-
var DSNumberRangeField_default = DSNumberRangeField;
|
|
60
|
-
export {
|
|
61
|
-
DSNumberRangeField,
|
|
62
|
-
NumberRangeFieldWithSchema,
|
|
63
|
-
DSNumberRangeField_default as default
|
|
64
|
-
};
|
|
65
|
-
//# sourceMappingURL=DSNumberRangeField.js.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../src/DSNumberRangeField.tsx"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React from 'react';\nimport { describe, PropTypes } from '@elliemae/ds-props-helpers';\nimport NumberRangeFieldImpl from './impl/NumberRangeFieldImpl.js';\n\nconst DSNumberRangeField = ({\n containerProps = {},\n maxFrom = null,\n minFrom = 0,\n maxTo = null,\n minTo = 0,\n onChange = () => null,\n placeholderFrom = 'From',\n placeholderTo = 'To',\n stepFrom = 1,\n stepTo = 1,\n value = [],\n separator = '-',\n maskOptions,\n type,\n}) => (\n <NumberRangeFieldImpl\n containerProps={containerProps}\n maxFrom={maxFrom}\n maxTo={maxTo}\n minFrom={minFrom}\n minTo={minTo}\n onChange={onChange}\n placeholderFrom={placeholderFrom}\n placeholderTo={placeholderTo}\n separator={separator}\n stepFrom={stepFrom}\n stepTo={stepTo}\n value={value}\n maskOptions={maskOptions}\n type={type}\n />\n);\n\nconst numberRangeFieldProps = {\n containerProps: PropTypes.object.description('Set of Properties attached to the main container'),\n maxFrom: PropTypes.number.description('Maximum number accepted in `From` field').defaultValue(null),\n minFrom: PropTypes.number.description('Minimum number accepted in `From` field').defaultValue(0),\n maxTo: PropTypes.number.description('Maximum number accepted in `To` field').defaultValue(null),\n minTo: PropTypes.number.description('Minimum number accepted in `To` field').defaultValue(0),\n onChange: PropTypes.func.description('Function executed when the value on the fields changes'),\n placeholderFrom: PropTypes.string.description('Placeholder value for the `From` field').defaultValue('From'),\n placeholderTo: PropTypes.string.description('Placeholder value for the `To` field').defaultValue('To'),\n stepFrom: PropTypes.number.description('Amount of units the `From` field value increases/decreases'),\n stepTo: PropTypes.number.description('Amount of units the `To` field value increases/decreases'),\n value: PropTypes.shape([PropTypes.number, PropTypes.number]).description('Array with the values of both fields'),\n separator: PropTypes.string.description('Character that separates fields').defaultValue('-'),\n maskOptions: PropTypes.object.description('Object with mask configurations'),\n type: PropTypes.string.description('Type of input'),\n};\n\nDSNumberRangeField.propTypes = numberRangeFieldProps;\nDSNumberRangeField.displayName = 'DSNumberRangeField';\nconst NumberRangeFieldWithSchema = describe(DSNumberRangeField);\nNumberRangeFieldWithSchema.propTypes = numberRangeFieldProps;\n\nexport { NumberRangeFieldWithSchema, DSNumberRangeField };\nexport default DSNumberRangeField;\n"],
|
|
5
|
-
"mappings": "AAAA,YAAY,WAAW;ACoBrB;AAnBF,SAAS,UAAU,iBAAiB;AACpC,OAAO,0BAA0B;AAEjC,MAAM,qBAAqB,CAAC;AAAA,EAC1B,iBAAiB,CAAC;AAAA,EAClB,UAAU;AAAA,EACV,UAAU;AAAA,EACV,QAAQ;AAAA,EACR,QAAQ;AAAA,EACR,WAAW,MAAM;AAAA,EACjB,kBAAkB;AAAA,EAClB,gBAAgB;AAAA,EAChB,WAAW;AAAA,EACX,SAAS;AAAA,EACT,QAAQ,CAAC;AAAA,E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0 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
|
-
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
|
-
import { useState, useEffect } from "react";
|
|
4
|
-
import { convertPropToCssClassName } from "@elliemae/ds-classnames";
|
|
5
|
-
import { DSInputMask, MASK_TYPES } from "@elliemae/ds-form";
|
|
6
|
-
const { cssClassName, classNameElement, classNameBlock } = convertPropToCssClassName(
|
|
7
|
-
"query-builder-addon-number-range-field"
|
|
8
|
-
);
|
|
9
|
-
const DSSearchFieldImpl = ({
|
|
10
|
-
onChange,
|
|
11
|
-
containerProps,
|
|
12
|
-
maxFrom,
|
|
13
|
-
maxTo,
|
|
14
|
-
minFrom,
|
|
15
|
-
minTo,
|
|
16
|
-
placeholderFrom,
|
|
17
|
-
placeholderTo,
|
|
18
|
-
separator,
|
|
19
|
-
stepFrom,
|
|
20
|
-
stepTo,
|
|
21
|
-
value,
|
|
22
|
-
maskOptions,
|
|
23
|
-
type
|
|
24
|
-
}) => {
|
|
25
|
-
const [valueFrom, setValueFrom] = useState();
|
|
26
|
-
const [valueTo, setValueTo] = useState();
|
|
27
|
-
useEffect(() => {
|
|
28
|
-
if (Array.isArray(value)) {
|
|
29
|
-
setValueFrom(value[0]);
|
|
30
|
-
setValueTo(value[1]);
|
|
31
|
-
} else {
|
|
32
|
-
setValueFrom(value);
|
|
33
|
-
}
|
|
34
|
-
}, [value]);
|
|
35
|
-
const handleOnChange = (newValueFrom, newValueTo) => {
|
|
36
|
-
setValueFrom(newValueFrom);
|
|
37
|
-
setValueTo(newValueTo);
|
|
38
|
-
onChange([newValueFrom, newValueTo]);
|
|
39
|
-
};
|
|
40
|
-
const maskConfig = {
|
|
41
|
-
prefix: "",
|
|
42
|
-
includeThousandsSeparator: false,
|
|
43
|
-
...maskOptions
|
|
44
|
-
};
|
|
45
|
-
return /* @__PURE__ */ jsx("div", { ...containerProps, className: `${cssClassName}`, children: /* @__PURE__ */ jsxs("div", { className: classNameBlock("wrapper"), children: [
|
|
46
|
-
/* @__PURE__ */ jsx(
|
|
47
|
-
DSInputMask,
|
|
48
|
-
{
|
|
49
|
-
type,
|
|
50
|
-
max: maxFrom,
|
|
51
|
-
min: minFrom,
|
|
52
|
-
step: stepFrom,
|
|
53
|
-
value: valueFrom?.toString(),
|
|
54
|
-
placeholder: placeholderFrom,
|
|
55
|
-
mask: (number) => MASK_TYPES.NUMBER(maskConfig)(number),
|
|
56
|
-
onChange: (e) => {
|
|
57
|
-
const newValueFrom = e.target.value;
|
|
58
|
-
handleOnChange(newValueFrom, valueTo);
|
|
59
|
-
},
|
|
60
|
-
"data-testid": "ds-number-range-field__from-input"
|
|
61
|
-
}
|
|
62
|
-
),
|
|
63
|
-
/* @__PURE__ */ jsx("div", { className: classNameElement("separator"), children: separator }),
|
|
64
|
-
/* @__PURE__ */ jsx(
|
|
65
|
-
DSInputMask,
|
|
66
|
-
{
|
|
67
|
-
type,
|
|
68
|
-
max: maxTo,
|
|
69
|
-
min: minTo,
|
|
70
|
-
step: stepTo,
|
|
71
|
-
value: valueTo?.toString(),
|
|
72
|
-
placeholder: placeholderTo,
|
|
73
|
-
mask: (number) => MASK_TYPES.NUMBER(maskConfig)(number),
|
|
74
|
-
onChange: (e) => {
|
|
75
|
-
const newValueTo = e.target.value;
|
|
76
|
-
handleOnChange(valueFrom, newValueTo);
|
|
77
|
-
},
|
|
78
|
-
"data-testid": "ds-number-range-field__to-input"
|
|
79
|
-
}
|
|
80
|
-
)
|
|
81
|
-
] }) });
|
|
82
|
-
};
|
|
83
|
-
var NumberRangeFieldImpl_default = DSSearchFieldImpl;
|
|
84
|
-
export {
|
|
85
|
-
NumberRangeFieldImpl_default as default
|
|
86
|
-
};
|
|
87
|
-
//# sourceMappingURL=NumberRangeFieldImpl.js.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../src/impl/NumberRangeFieldImpl.tsx"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable react/prop-types */\nimport React, { useState, useEffect } from 'react';\nimport { convertPropToCssClassName } from '@elliemae/ds-classnames';\nimport { DSInputMask, MASK_TYPES } from '@elliemae/ds-form';\n\nconst { cssClassName, classNameElement, classNameBlock } = convertPropToCssClassName(\n 'query-builder-addon-number-range-field',\n);\n\nconst DSSearchFieldImpl = ({\n onChange,\n containerProps,\n maxFrom,\n maxTo,\n minFrom,\n minTo,\n placeholderFrom,\n placeholderTo,\n separator,\n stepFrom,\n stepTo,\n value,\n maskOptions,\n type,\n}) => {\n const [valueFrom, setValueFrom] = useState();\n const [valueTo, setValueTo] = useState();\n\n useEffect(() => {\n if (Array.isArray(value)) {\n setValueFrom(value[0]);\n setValueTo(value[1]);\n } else {\n setValueFrom(value);\n }\n }, [value]);\n\n const handleOnChange = (newValueFrom, newValueTo) => {\n setValueFrom(newValueFrom);\n setValueTo(newValueTo);\n onChange([newValueFrom, newValueTo]);\n };\n\n const maskConfig = {\n prefix: '',\n includeThousandsSeparator: false,\n ...maskOptions,\n };\n\n return (\n <div {...containerProps} className={`${cssClassName}`}>\n <div className={classNameBlock('wrapper')}>\n <DSInputMask\n type={type}\n max={maxFrom}\n min={minFrom}\n step={stepFrom}\n value={valueFrom?.toString()}\n placeholder={placeholderFrom}\n mask={(number) => MASK_TYPES.NUMBER(maskConfig)(number)}\n onChange={(e) => {\n const newValueFrom = e.target.value;\n handleOnChange(newValueFrom, valueTo);\n }}\n data-testid=\"ds-number-range-field__from-input\"\n />\n <div className={classNameElement('separator')}>{separator}</div>\n <DSInputMask\n type={type}\n max={maxTo}\n min={minTo}\n step={stepTo}\n value={valueTo?.toString()}\n placeholder={placeholderTo}\n mask={(number) => MASK_TYPES.NUMBER(maskConfig)(number)}\n onChange={(e) => {\n const newValueTo = e.target.value;\n handleOnChange(valueFrom, newValueTo);\n }}\n data-testid=\"ds-number-range-field__to-input\"\n />\n </div>\n </div>\n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;AACf,gBAAM,eAAe,EAAE,OAAO;AAC9B,yBAAe,cAAc,OAAO;AAAA,QACtC;AAAA,QACA,eAAY;AAAA;AAAA,IACd;AAAA,IACA,oBAAC,SAAI,WAAW,iBAAiB,WAAW,GAAI,qBAAU;AAAA,IAC1D;AAAA,MAAC;AAAA;AAAA,QACC;AAAA,QACA,KAAK;AAAA,QACL,KAAK;AAAA,QACL,MAAM;AAAA,QACN,OAAO,SAAS,SAAS;AAAA,QACzB,aAAa;AAAA,QACb,MAAM,CAAC,WAAW,WAAW,OAAO,UAAU,EAAE,MAAM;AAAA,QACtD,UAAU,CAAC,MAAM;AACf,gBAAM,aAAa,EAAE,OAAO;AAC5B,yBAAe,WAAW,UAAU;AAAA,QACtC;AAAA,QACA,eAAY;AAAA;AAAA,IACd;AAAA,KACF,GACF;AAEJ;AAEA,IAAO,+BAAQ;",
|
|
6
|
-
"names": []
|
|
7
|
-
}
|
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
declare const DSNumberRangeField: {
|
|
2
|
-
({ containerProps, maxFrom, minFrom, maxTo, minTo, onChange, placeholderFrom, placeholderTo, stepFrom, stepTo, value, separator, maskOptions, type, }: {
|
|
3
|
-
containerProps?: {} | undefined;
|
|
4
|
-
maxFrom?: null | undefined;
|
|
5
|
-
minFrom?: number | undefined;
|
|
6
|
-
maxTo?: null | undefined;
|
|
7
|
-
minTo?: number | undefined;
|
|
8
|
-
onChange?: (() => null) | undefined;
|
|
9
|
-
placeholderFrom?: string | undefined;
|
|
10
|
-
placeholderTo?: string | undefined;
|
|
11
|
-
stepFrom?: number | undefined;
|
|
12
|
-
stepTo?: number | undefined;
|
|
13
|
-
value?: never[] | undefined;
|
|
14
|
-
separator?: string | undefined;
|
|
15
|
-
maskOptions: any;
|
|
16
|
-
type: any;
|
|
17
|
-
}): import("react/jsx-runtime.js").JSX.Element;
|
|
18
|
-
propTypes: {
|
|
19
|
-
containerProps: import("@elliemae/ds-props-helpers/dist/types/propTypes/types.js").ReactDescT;
|
|
20
|
-
maxFrom: import("@elliemae/ds-props-helpers/dist/types/propTypes/types.js").ReactDescT;
|
|
21
|
-
minFrom: import("@elliemae/ds-props-helpers/dist/types/propTypes/types.js").ReactDescT;
|
|
22
|
-
maxTo: import("@elliemae/ds-props-helpers/dist/types/propTypes/types.js").ReactDescT;
|
|
23
|
-
minTo: import("@elliemae/ds-props-helpers/dist/types/propTypes/types.js").ReactDescT;
|
|
24
|
-
onChange: import("@elliemae/ds-props-helpers/dist/types/propTypes/types.js").ReactDescT;
|
|
25
|
-
placeholderFrom: import("@elliemae/ds-props-helpers/dist/types/propTypes/types.js").ReactDescT;
|
|
26
|
-
placeholderTo: import("@elliemae/ds-props-helpers/dist/types/propTypes/types.js").ReactDescT;
|
|
27
|
-
stepFrom: import("@elliemae/ds-props-helpers/dist/types/propTypes/types.js").ReactDescT;
|
|
28
|
-
stepTo: import("@elliemae/ds-props-helpers/dist/types/propTypes/types.js").ReactDescT;
|
|
29
|
-
value: import("@elliemae/ds-props-helpers/dist/types/propTypes/types.js").ReactDescT;
|
|
30
|
-
separator: import("@elliemae/ds-props-helpers/dist/types/propTypes/types.js").ReactDescT;
|
|
31
|
-
maskOptions: import("@elliemae/ds-props-helpers/dist/types/propTypes/types.js").ReactDescT;
|
|
32
|
-
type: import("@elliemae/ds-props-helpers/dist/types/propTypes/types.js").ReactDescT;
|
|
33
|
-
};
|
|
34
|
-
displayName: string;
|
|
35
|
-
};
|
|
36
|
-
declare const NumberRangeFieldWithSchema: import("@elliemae/ds-props-helpers/dist/types/propTypes/types.js").DocumentedReactComponent<{
|
|
37
|
-
containerProps?: {} | undefined;
|
|
38
|
-
maxFrom?: null | undefined;
|
|
39
|
-
minFrom?: number | undefined;
|
|
40
|
-
maxTo?: null | undefined;
|
|
41
|
-
minTo?: number | undefined;
|
|
42
|
-
onChange?: (() => null) | undefined;
|
|
43
|
-
placeholderFrom?: string | undefined;
|
|
44
|
-
placeholderTo?: string | undefined;
|
|
45
|
-
stepFrom?: number | undefined;
|
|
46
|
-
stepTo?: number | undefined;
|
|
47
|
-
value?: never[] | undefined;
|
|
48
|
-
separator?: string | undefined;
|
|
49
|
-
maskOptions: any;
|
|
50
|
-
type: any;
|
|
51
|
-
}>;
|
|
52
|
-
export { NumberRangeFieldWithSchema, DSNumberRangeField };
|
|
53
|
-
export default DSNumberRangeField;
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
declare const DSSearchFieldImpl: ({ onChange, containerProps, maxFrom, maxTo, minFrom, minTo, placeholderFrom, placeholderTo, separator, stepFrom, stepTo, value, maskOptions, type, }: {
|
|
2
|
-
onChange: any;
|
|
3
|
-
containerProps: any;
|
|
4
|
-
maxFrom: any;
|
|
5
|
-
maxTo: any;
|
|
6
|
-
minFrom: any;
|
|
7
|
-
minTo: any;
|
|
8
|
-
placeholderFrom: any;
|
|
9
|
-
placeholderTo: any;
|
|
10
|
-
separator: any;
|
|
11
|
-
stepFrom: any;
|
|
12
|
-
stepTo: any;
|
|
13
|
-
value: any;
|
|
14
|
-
maskOptions: any;
|
|
15
|
-
type: any;
|
|
16
|
-
}) => import("react/jsx-runtime").JSX.Element;
|
|
17
|
-
export default DSSearchFieldImpl;
|