@elliemae/ds-zoom 2.4.2-rc.9 → 2.4.3-rc.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/cjs/DSZoom.js CHANGED
@@ -8,7 +8,6 @@ var _objectWithoutProperties = require('@babel/runtime/helpers/objectWithoutProp
8
8
  require('core-js/modules/esnext.async-iterator.find.js');
9
9
  require('core-js/modules/esnext.iterator.constructor.js');
10
10
  require('core-js/modules/esnext.iterator.find.js');
11
- require('core-js/modules/web.dom-collections.iterator.js');
12
11
  require('core-js/modules/esnext.async-iterator.filter.js');
13
12
  require('core-js/modules/esnext.iterator.filter.js');
14
13
  require('core-js/modules/esnext.async-iterator.for-each.js');
@@ -53,14 +52,14 @@ const DSZoom = _ref => {
53
52
  const [menuIsOpen, setMenuIsOpen] = react.useState(false);
54
53
  const [selectedOption, setSelectedOption] = react.useState(defaultOption);
55
54
  const [custom, setCustom] = react.useState(!value ? defaultOption : {
56
- label: "".concat(utils.clean(value), "%"),
55
+ label: `${utils.clean(value)}%`,
57
56
  value: utils.clean(value),
58
57
  id: 'custom'
59
58
  });
60
59
  const options = [custom, ...zoomOptions$1.filter(option => !option.default)];
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);
60
+ const currentValue = value || selectedOption?.value || custom?.value || defaultOption?.value;
62
61
  return /*#__PURE__*/jsxRuntime.jsx("div", _objectSpread(_objectSpread(_objectSpread({
63
- className: "".concat(cssClassName)
62
+ className: `${cssClassName}`
64
63
  }, containerProps), otherProps), {}, {
65
64
  children: /*#__PURE__*/_jsx__default["default"](dsForm.DSComboBox, {
66
65
  searchable: true,
@@ -88,8 +87,8 @@ const DSZoom = _ref => {
88
87
  } else if (!Number.isNaN(parseInt(valueInput, 10))) {
89
88
  const cleanValue = parseInt(valueInput, 10);
90
89
  const newOption = {
91
- label: "".concat(cleanValue, "%"),
92
- value: "".concat(cleanValue, "%"),
90
+ label: `${cleanValue}%`,
91
+ value: `${cleanValue}%`,
93
92
  id: 'custom'
94
93
  };
95
94
  setCustom(newOption);
@@ -2,10 +2,8 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- require('core-js/modules/es.string.replace.js');
6
-
7
5
  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: ".concat(size, "px"));
6
+ const setSize = size => document.querySelector(':root').setAttribute('style', `font-size: ${size}px`);
9
7
  const getFactor = value => value / 100;
10
8
  const clean = value => value.replace(/\D/g, '').substring(0, 3);
11
9
 
package/esm/DSZoom.js CHANGED
@@ -4,7 +4,6 @@ import _objectWithoutProperties from '@babel/runtime/helpers/esm/objectWithoutPr
4
4
  import 'core-js/modules/esnext.async-iterator.find.js';
5
5
  import 'core-js/modules/esnext.iterator.constructor.js';
6
6
  import 'core-js/modules/esnext.iterator.find.js';
7
- import 'core-js/modules/web.dom-collections.iterator.js';
8
7
  import 'core-js/modules/esnext.async-iterator.filter.js';
9
8
  import 'core-js/modules/esnext.iterator.filter.js';
10
9
  import 'core-js/modules/esnext.async-iterator.for-each.js';
@@ -43,14 +42,14 @@ const DSZoom = _ref => {
43
42
  const [menuIsOpen, setMenuIsOpen] = useState(false);
44
43
  const [selectedOption, setSelectedOption] = useState(defaultOption);
45
44
  const [custom, setCustom] = useState(!value ? defaultOption : {
46
- label: "".concat(clean(value), "%"),
45
+ label: `${clean(value)}%`,
47
46
  value: clean(value),
48
47
  id: 'custom'
49
48
  });
50
49
  const options = [custom, ...zoomOptions.filter(option => !option.default)];
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);
50
+ const currentValue = value || selectedOption?.value || custom?.value || defaultOption?.value;
52
51
  return /*#__PURE__*/jsx("div", _objectSpread(_objectSpread(_objectSpread({
53
- className: "".concat(cssClassName)
52
+ className: `${cssClassName}`
54
53
  }, containerProps), otherProps), {}, {
55
54
  children: /*#__PURE__*/_jsx(DSComboBox, {
56
55
  searchable: true,
@@ -78,8 +77,8 @@ const DSZoom = _ref => {
78
77
  } else if (!Number.isNaN(parseInt(valueInput, 10))) {
79
78
  const cleanValue = parseInt(valueInput, 10);
80
79
  const newOption = {
81
- label: "".concat(cleanValue, "%"),
82
- value: "".concat(cleanValue, "%"),
80
+ label: `${cleanValue}%`,
81
+ value: `${cleanValue}%`,
83
82
  id: 'custom'
84
83
  };
85
84
  setCustom(newOption);
@@ -1,7 +1,5 @@
1
- import 'core-js/modules/es.string.replace.js';
2
-
3
1
  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: ".concat(size, "px"));
2
+ const setSize = size => document.querySelector(':root').setAttribute('style', `font-size: ${size}px`);
5
3
  const getFactor = value => value / 100;
6
4
  const clean = value => value.replace(/\D/g, '').substring(0, 3);
7
5
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@elliemae/ds-zoom",
3
- "version": "2.4.2-rc.9",
3
+ "version": "2.4.3-rc.2",
4
4
  "license": "MIT",
5
5
  "description": "ICE MT - Dimsum - Zoom",
6
6
  "module": "./esm/index.js",
@@ -44,8 +44,8 @@
44
44
  "build": "node ../../scripts/build/build.js"
45
45
  },
46
46
  "dependencies": {
47
- "@elliemae/ds-classnames": "2.4.2-rc.9",
48
- "@elliemae/ds-form": "2.4.2-rc.9",
47
+ "@elliemae/ds-classnames": "2.4.3-rc.2",
48
+ "@elliemae/ds-form": "2.4.3-rc.2",
49
49
  "react-desc": "~4.1.3"
50
50
  },
51
51
  "devDependencies": {