@elliemae/ds-zoom 2.0.0-next.8 → 2.0.0-rc.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/cjs/DSZoom.js +13 -6
- package/esm/DSZoom.js +12 -4
- package/package.json +8 -5
- package/types/DSZoom.d.ts +55 -7
package/cjs/DSZoom.js
CHANGED
|
@@ -5,11 +5,18 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
5
5
|
var _defineProperty = require('@babel/runtime/helpers/defineProperty');
|
|
6
6
|
var _jsx = require('@babel/runtime/helpers/jsx');
|
|
7
7
|
var _objectWithoutProperties = require('@babel/runtime/helpers/objectWithoutProperties');
|
|
8
|
+
require('core-js/modules/esnext.async-iterator.find.js');
|
|
9
|
+
require('core-js/modules/esnext.iterator.constructor.js');
|
|
10
|
+
require('core-js/modules/esnext.iterator.find.js');
|
|
8
11
|
require('core-js/modules/web.dom-collections.iterator.js');
|
|
12
|
+
require('core-js/modules/esnext.async-iterator.filter.js');
|
|
13
|
+
require('core-js/modules/esnext.iterator.filter.js');
|
|
14
|
+
require('core-js/modules/esnext.async-iterator.for-each.js');
|
|
15
|
+
require('core-js/modules/esnext.iterator.for-each.js');
|
|
9
16
|
var react = require('react');
|
|
10
17
|
var reactDesc = require('react-desc');
|
|
11
18
|
var dsClassnames = require('@elliemae/ds-classnames');
|
|
12
|
-
var
|
|
19
|
+
var dsForm = require('@elliemae/ds-form');
|
|
13
20
|
var zoomOptions = require('./components/zoomOptions.js');
|
|
14
21
|
var utils = require('./components/utils.js');
|
|
15
22
|
var jsxRuntime = require('react/jsx-runtime');
|
|
@@ -19,7 +26,6 @@ function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'defau
|
|
|
19
26
|
var _defineProperty__default = /*#__PURE__*/_interopDefaultLegacy(_defineProperty);
|
|
20
27
|
var _jsx__default = /*#__PURE__*/_interopDefaultLegacy(_jsx);
|
|
21
28
|
var _objectWithoutProperties__default = /*#__PURE__*/_interopDefaultLegacy(_objectWithoutProperties);
|
|
22
|
-
var DSComboBox__default = /*#__PURE__*/_interopDefaultLegacy(DSComboBox);
|
|
23
29
|
|
|
24
30
|
const _excluded = ["className", "disabled", "value", "onChange", "containerProps", "zoomOptions"];
|
|
25
31
|
|
|
@@ -56,13 +62,14 @@ const DSZoom = _ref => {
|
|
|
56
62
|
return /*#__PURE__*/jsxRuntime.jsx("div", _objectSpread(_objectSpread(_objectSpread({
|
|
57
63
|
className: "".concat(cssClassName)
|
|
58
64
|
}, containerProps), otherProps), {}, {
|
|
59
|
-
children: /*#__PURE__*/_jsx__default["default"](
|
|
65
|
+
children: /*#__PURE__*/_jsx__default["default"](dsForm.DSComboBox, {
|
|
60
66
|
searchable: true,
|
|
61
67
|
disabled: disabled,
|
|
62
68
|
menuIsOpen: menuIsOpen,
|
|
63
|
-
onChange: (valueChange, {
|
|
64
|
-
|
|
65
|
-
|
|
69
|
+
onChange: (valueChange, _ref2) => {
|
|
70
|
+
let {
|
|
71
|
+
action
|
|
72
|
+
} = _ref2;
|
|
66
73
|
const op = options.find(option => option.value === valueChange);
|
|
67
74
|
setSelectedOption(op);
|
|
68
75
|
onChange(op);
|
package/esm/DSZoom.js
CHANGED
|
@@ -1,11 +1,18 @@
|
|
|
1
1
|
import _defineProperty from '@babel/runtime/helpers/esm/defineProperty';
|
|
2
2
|
import _jsx from '@babel/runtime/helpers/esm/jsx';
|
|
3
3
|
import _objectWithoutProperties from '@babel/runtime/helpers/esm/objectWithoutProperties';
|
|
4
|
+
import 'core-js/modules/esnext.async-iterator.find.js';
|
|
5
|
+
import 'core-js/modules/esnext.iterator.constructor.js';
|
|
6
|
+
import 'core-js/modules/esnext.iterator.find.js';
|
|
4
7
|
import 'core-js/modules/web.dom-collections.iterator.js';
|
|
8
|
+
import 'core-js/modules/esnext.async-iterator.filter.js';
|
|
9
|
+
import 'core-js/modules/esnext.iterator.filter.js';
|
|
10
|
+
import 'core-js/modules/esnext.async-iterator.for-each.js';
|
|
11
|
+
import 'core-js/modules/esnext.iterator.for-each.js';
|
|
5
12
|
import { useState } from 'react';
|
|
6
13
|
import { PropTypes, describe } from 'react-desc';
|
|
7
14
|
import { convertPropToCssClassName } from '@elliemae/ds-classnames';
|
|
8
|
-
import DSComboBox from '@elliemae/ds-form
|
|
15
|
+
import { DSComboBox } from '@elliemae/ds-form';
|
|
9
16
|
import zoomDefaultOptions from './components/zoomOptions.js';
|
|
10
17
|
import { clean } from './components/utils.js';
|
|
11
18
|
import { jsx } from 'react/jsx-runtime';
|
|
@@ -49,9 +56,10 @@ const DSZoom = _ref => {
|
|
|
49
56
|
searchable: true,
|
|
50
57
|
disabled: disabled,
|
|
51
58
|
menuIsOpen: menuIsOpen,
|
|
52
|
-
onChange: (valueChange, {
|
|
53
|
-
|
|
54
|
-
|
|
59
|
+
onChange: (valueChange, _ref2) => {
|
|
60
|
+
let {
|
|
61
|
+
action
|
|
62
|
+
} = _ref2;
|
|
55
63
|
const op = options.find(option => option.value === valueChange);
|
|
56
64
|
setSelectedOption(op);
|
|
57
65
|
onChange(op);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@elliemae/ds-zoom",
|
|
3
|
-
"version": "2.0.0-
|
|
3
|
+
"version": "2.0.0-rc.11",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"description": "ICE MT - Dimsum - Zoom",
|
|
6
6
|
"module": "./esm/index.js",
|
|
@@ -44,10 +44,13 @@
|
|
|
44
44
|
"build": "node ../../scripts/build/build.js"
|
|
45
45
|
},
|
|
46
46
|
"dependencies": {
|
|
47
|
-
"@elliemae/ds-classnames": "2.0.0-
|
|
48
|
-
"@elliemae/ds-
|
|
49
|
-
"
|
|
50
|
-
|
|
47
|
+
"@elliemae/ds-classnames": "2.0.0-rc.11",
|
|
48
|
+
"@elliemae/ds-form": "2.0.0-rc.11",
|
|
49
|
+
"react-desc": "~4.1.3"
|
|
50
|
+
},
|
|
51
|
+
"devDependencies": {
|
|
52
|
+
"@testing-library/jest-dom": "~5.15.0",
|
|
53
|
+
"@testing-library/react": "~12.1.2"
|
|
51
54
|
},
|
|
52
55
|
"peerDependencies": {
|
|
53
56
|
"react": "^17.0.2",
|
package/types/DSZoom.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
/// <reference path="../../../../shared/typings/react-desc.d.ts" />
|
|
1
2
|
/// <reference types="react" />
|
|
2
3
|
declare const DSZoom: {
|
|
3
4
|
({ className, disabled, value, onChange, containerProps, zoomOptions, ...otherProps }: {
|
|
@@ -18,14 +19,61 @@ declare const DSZoom: {
|
|
|
18
19
|
})[] | undefined;
|
|
19
20
|
}): JSX.Element;
|
|
20
21
|
propTypes: {
|
|
21
|
-
className:
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
22
|
+
className: {
|
|
23
|
+
defaultValue<T = unknown>(arg: T): {
|
|
24
|
+
deprecated: import("react-desc").PropTypesDescValidator;
|
|
25
|
+
};
|
|
26
|
+
isRequired: import("react-desc").PropTypesDescValidator;
|
|
27
|
+
};
|
|
28
|
+
containerProps: {
|
|
29
|
+
defaultValue<T = unknown>(arg: T): {
|
|
30
|
+
deprecated: import("react-desc").PropTypesDescValidator;
|
|
31
|
+
};
|
|
32
|
+
isRequired: import("react-desc").PropTypesDescValidator;
|
|
33
|
+
};
|
|
34
|
+
disabled: {
|
|
35
|
+
deprecated: import("react-desc").PropTypesDescValidator;
|
|
36
|
+
};
|
|
37
|
+
value: {
|
|
38
|
+
defaultValue<T = unknown>(arg: T): {
|
|
39
|
+
deprecated: import("react-desc").PropTypesDescValidator;
|
|
40
|
+
};
|
|
41
|
+
isRequired: import("react-desc").PropTypesDescValidator;
|
|
42
|
+
};
|
|
43
|
+
onChange: {
|
|
44
|
+
defaultValue<T = unknown>(arg: T): {
|
|
45
|
+
deprecated: import("react-desc").PropTypesDescValidator;
|
|
46
|
+
};
|
|
47
|
+
isRequired: import("react-desc").PropTypesDescValidator;
|
|
48
|
+
};
|
|
49
|
+
zoomOptions: {
|
|
50
|
+
defaultValue<T = unknown>(arg: T): {
|
|
51
|
+
deprecated: import("react-desc").PropTypesDescValidator;
|
|
52
|
+
};
|
|
53
|
+
isRequired: import("react-desc").PropTypesDescValidator;
|
|
54
|
+
};
|
|
27
55
|
};
|
|
28
56
|
};
|
|
29
|
-
declare const ZoomWithSchema:
|
|
57
|
+
declare const ZoomWithSchema: {
|
|
58
|
+
(props?: {
|
|
59
|
+
[x: string]: any;
|
|
60
|
+
className?: string | undefined;
|
|
61
|
+
disabled?: boolean | undefined;
|
|
62
|
+
value?: undefined;
|
|
63
|
+
onChange?: (() => null) | undefined;
|
|
64
|
+
containerProps?: {} | undefined;
|
|
65
|
+
zoomOptions?: ({
|
|
66
|
+
label: string;
|
|
67
|
+
value: string;
|
|
68
|
+
default?: undefined;
|
|
69
|
+
} | {
|
|
70
|
+
label: string;
|
|
71
|
+
value: string;
|
|
72
|
+
default: boolean;
|
|
73
|
+
})[] | undefined;
|
|
74
|
+
} | undefined): JSX.Element;
|
|
75
|
+
propTypes: unknown;
|
|
76
|
+
toTypescript: () => import("react-desc").TypescriptSchema;
|
|
77
|
+
};
|
|
30
78
|
export { DSZoom, ZoomWithSchema };
|
|
31
79
|
export default DSZoom;
|