@elliemae/ds-zoom 2.0.0-alpha.9 → 2.0.0-next.12

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 CHANGED
@@ -5,10 +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');
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');
8
16
  var react = require('react');
9
17
  var reactDesc = require('react-desc');
10
18
  var dsClassnames = require('@elliemae/ds-classnames');
11
- var DSComboBox = require('@elliemae/ds-form/ComboBox');
19
+ var dsForm = require('@elliemae/ds-form');
12
20
  var zoomOptions = require('./components/zoomOptions.js');
13
21
  var utils = require('./components/utils.js');
14
22
  var jsxRuntime = require('react/jsx-runtime');
@@ -18,7 +26,6 @@ function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'defau
18
26
  var _defineProperty__default = /*#__PURE__*/_interopDefaultLegacy(_defineProperty);
19
27
  var _jsx__default = /*#__PURE__*/_interopDefaultLegacy(_jsx);
20
28
  var _objectWithoutProperties__default = /*#__PURE__*/_interopDefaultLegacy(_objectWithoutProperties);
21
- var DSComboBox__default = /*#__PURE__*/_interopDefaultLegacy(DSComboBox);
22
29
 
23
30
  const _excluded = ["className", "disabled", "value", "onChange", "containerProps", "zoomOptions"];
24
31
 
@@ -46,22 +53,23 @@ const DSZoom = _ref => {
46
53
  const [menuIsOpen, setMenuIsOpen] = react.useState(false);
47
54
  const [selectedOption, setSelectedOption] = react.useState(defaultOption);
48
55
  const [custom, setCustom] = react.useState(!value ? defaultOption : {
49
- label: `${utils.clean(value)}%`,
56
+ label: "".concat(utils.clean(value), "%"),
50
57
  value: utils.clean(value),
51
58
  id: 'custom'
52
59
  });
53
60
  const options = [custom, ...zoomOptions$1.filter(option => !option.default)];
54
61
  const currentValue = value || (selectedOption === null || selectedOption === void 0 ? void 0 : selectedOption.value) || (custom === null || custom === void 0 ? void 0 : custom.value) || (defaultOption === null || defaultOption === void 0 ? void 0 : defaultOption.value);
55
62
  return /*#__PURE__*/jsxRuntime.jsx("div", _objectSpread(_objectSpread(_objectSpread({
56
- className: `${cssClassName}`
63
+ className: "".concat(cssClassName)
57
64
  }, containerProps), otherProps), {}, {
58
- children: /*#__PURE__*/_jsx__default["default"](DSComboBox__default["default"], {
65
+ children: /*#__PURE__*/_jsx__default["default"](dsForm.DSComboBox, {
59
66
  searchable: true,
60
67
  disabled: disabled,
61
68
  menuIsOpen: menuIsOpen,
62
- onChange: (valueChange, {
63
- action
64
- }) => {
69
+ onChange: (valueChange, _ref2) => {
70
+ let {
71
+ action
72
+ } = _ref2;
65
73
  const op = options.find(option => option.value === valueChange);
66
74
  setSelectedOption(op);
67
75
  onChange(op);
@@ -80,8 +88,8 @@ const DSZoom = _ref => {
80
88
  } else if (!Number.isNaN(parseInt(valueInput, 10))) {
81
89
  const cleanValue = parseInt(valueInput, 10);
82
90
  const newOption = {
83
- label: `${cleanValue}%`,
84
- value: `${cleanValue}%`,
91
+ label: "".concat(cleanValue, "%"),
92
+ value: "".concat(cleanValue, "%"),
85
93
  id: 'custom'
86
94
  };
87
95
  setCustom(newOption);
@@ -5,7 +5,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
5
5
  require('core-js/modules/es.string.replace.js');
6
6
 
7
7
  const getCurrentFont = () => Number(window.getComputedStyle(document.querySelector(':root')).getPropertyValue('font-size').match(/\d+/)[0]);
8
- const setSize = size => document.querySelector(':root').setAttribute('style', `font-size: ${size}px`);
8
+ const setSize = size => document.querySelector(':root').setAttribute('style', "font-size: ".concat(size, "px"));
9
9
  const getFactor = value => value / 100;
10
10
  const clean = value => value.replace(/\D/g, '').substring(0, 3);
11
11
 
package/esm/DSZoom.js CHANGED
@@ -1,10 +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';
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';
4
12
  import { useState } from 'react';
5
13
  import { PropTypes, describe } from 'react-desc';
6
14
  import { convertPropToCssClassName } from '@elliemae/ds-classnames';
7
- import DSComboBox from '@elliemae/ds-form/ComboBox';
15
+ import { DSComboBox } from '@elliemae/ds-form';
8
16
  import zoomDefaultOptions from './components/zoomOptions.js';
9
17
  import { clean } from './components/utils.js';
10
18
  import { jsx } from 'react/jsx-runtime';
@@ -35,22 +43,23 @@ const DSZoom = _ref => {
35
43
  const [menuIsOpen, setMenuIsOpen] = useState(false);
36
44
  const [selectedOption, setSelectedOption] = useState(defaultOption);
37
45
  const [custom, setCustom] = useState(!value ? defaultOption : {
38
- label: `${clean(value)}%`,
46
+ label: "".concat(clean(value), "%"),
39
47
  value: clean(value),
40
48
  id: 'custom'
41
49
  });
42
50
  const options = [custom, ...zoomOptions.filter(option => !option.default)];
43
51
  const currentValue = value || (selectedOption === null || selectedOption === void 0 ? void 0 : selectedOption.value) || (custom === null || custom === void 0 ? void 0 : custom.value) || (defaultOption === null || defaultOption === void 0 ? void 0 : defaultOption.value);
44
52
  return /*#__PURE__*/jsx("div", _objectSpread(_objectSpread(_objectSpread({
45
- className: `${cssClassName}`
53
+ className: "".concat(cssClassName)
46
54
  }, containerProps), otherProps), {}, {
47
55
  children: /*#__PURE__*/_jsx(DSComboBox, {
48
56
  searchable: true,
49
57
  disabled: disabled,
50
58
  menuIsOpen: menuIsOpen,
51
- onChange: (valueChange, {
52
- action
53
- }) => {
59
+ onChange: (valueChange, _ref2) => {
60
+ let {
61
+ action
62
+ } = _ref2;
54
63
  const op = options.find(option => option.value === valueChange);
55
64
  setSelectedOption(op);
56
65
  onChange(op);
@@ -69,8 +78,8 @@ const DSZoom = _ref => {
69
78
  } else if (!Number.isNaN(parseInt(valueInput, 10))) {
70
79
  const cleanValue = parseInt(valueInput, 10);
71
80
  const newOption = {
72
- label: `${cleanValue}%`,
73
- value: `${cleanValue}%`,
81
+ label: "".concat(cleanValue, "%"),
82
+ value: "".concat(cleanValue, "%"),
74
83
  id: 'custom'
75
84
  };
76
85
  setCustom(newOption);
@@ -1,7 +1,7 @@
1
1
  import 'core-js/modules/es.string.replace.js';
2
2
 
3
3
  const getCurrentFont = () => Number(window.getComputedStyle(document.querySelector(':root')).getPropertyValue('font-size').match(/\d+/)[0]);
4
- const setSize = size => document.querySelector(':root').setAttribute('style', `font-size: ${size}px`);
4
+ const setSize = size => document.querySelector(':root').setAttribute('style', "font-size: ".concat(size, "px"));
5
5
  const getFactor = value => value / 100;
6
6
  const clean = value => value.replace(/\D/g, '').substring(0, 3);
7
7
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@elliemae/ds-zoom",
3
- "version": "2.0.0-alpha.9",
3
+ "version": "2.0.0-next.12",
4
4
  "license": "MIT",
5
5
  "description": "ICE MT - Dimsum - Zoom",
6
6
  "module": "./esm/index.js",
@@ -44,10 +44,9 @@
44
44
  "build": "node ../../scripts/build/build.js"
45
45
  },
46
46
  "dependencies": {
47
- "@elliemae/ds-classnames": "2.0.0-alpha.9",
48
- "@elliemae/ds-dropdownmenu": "2.0.0-alpha.9",
49
- "@elliemae/ds-form": "2.0.0-alpha.9",
50
- "react-desc": "^4.1.3"
47
+ "@elliemae/ds-classnames": "2.0.0-next.12",
48
+ "@elliemae/ds-form": "2.0.0-next.12",
49
+ "react-desc": "~4.1.3"
51
50
  },
52
51
  "peerDependencies": {
53
52
  "react": "^17.0.2",
package/cjs/package.json DELETED
@@ -1,7 +0,0 @@
1
- {
2
- "type": "commonjs",
3
- "sideEffects": [
4
- "*.css",
5
- "*.scss"
6
- ]
7
- }
package/esm/package.json DELETED
@@ -1,7 +0,0 @@
1
- {
2
- "type": "module",
3
- "sideEffects": [
4
- "*.css",
5
- "*.scss"
6
- ]
7
- }