@widergy/energy-ui 3.16.0 → 3.16.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/CHANGELOG.md CHANGED
@@ -1,3 +1,17 @@
1
+ ## [3.16.2](https://github.com/widergy/energy-ui/compare/v3.16.1...v3.16.2) (2024-08-14)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * add bottle gas plus icon ([5baad99](https://github.com/widergy/energy-ui/commit/5baad99614e53079ba5f94e9ca4a213a9bcdbe33))
7
+
8
+ ## [3.16.1](https://github.com/widergy/energy-ui/compare/v3.16.0...v3.16.1) (2024-08-13)
9
+
10
+
11
+ ### Bug Fixes
12
+
13
+ * should reset select fixes ([#471](https://github.com/widergy/energy-ui/issues/471)) ([5c6b395](https://github.com/widergy/energy-ui/commit/5c6b39587758862178c6d83eb4f397c91cf50bd5))
14
+
1
15
  # [3.16.0](https://github.com/widergy/energy-ui/compare/v3.15.2...v3.16.0) (2024-08-13)
2
16
 
3
17
 
@@ -0,0 +1,4 @@
1
+ <svg width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" xmlns="http://www.w3.org/2000/svg">
2
+ <path d="M6.78571 9.35714V6.31275C6.78571 5.86368 7.14646 5.5 7.59194 5.5H10.6938C11.1392 5.5 11.5 5.86368 11.5 6.31275V9.35714M5.71429 18.7857V19.6569C5.71429 20.1221 6.06361 20.5 6.49519 20.5H11.7905C12.2214 20.5 12.5714 20.1229 12.5714 19.6569V18.7857M4 12.7857H14.2857M11.6756 9.35714H6.61009C5.16858 9.35714 4 10.519 4 11.9521V16.1907C4 17.6239 5.16858 18.7857 6.61009 18.7857H11.6756C13.1172 18.7857 14.2857 17.6239 14.2857 16.1907V11.9521C14.2857 10.519 13.1172 9.35714 11.6756 9.35714Z" stroke-width="1.5" stroke-miterlimit="10"/>
3
+ <path d="M15 6H21M18 3V9" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
4
+ </svg>
@@ -25,6 +25,26 @@ EnergyIconBottledGas.defaultProps = {
25
25
  strokeWidth: "1.5",
26
26
  xmlns: "http://www.w3.org/2000/svg"
27
27
  };
28
+ var EnergyIconBottledGasPlus = function EnergyIconBottledGasPlus(props) {
29
+ return /*#__PURE__*/_react.default.createElement("svg", props, /*#__PURE__*/_react.default.createElement("path", {
30
+ d: "M6.786 9.357V6.313c0-.45.36-.813.806-.813h3.102a.81.81 0 0 1 .806.813v3.044m-5.786 9.429v.87c0 .466.35.844.781.844h5.295c.431 0 .781-.377.781-.843v-.871m-8.571-6h10.286m-2.61-3.429H6.61A2.603 2.603 0 0 0 4 11.952v4.239a2.603 2.603 0 0 0 2.61 2.595h5.066a2.603 2.603 0 0 0 2.61-2.595v-4.239a2.603 2.603 0 0 0-2.61-2.595Z",
31
+ strokeWidth: "1.5",
32
+ strokeMiterlimit: "10"
33
+ }), /*#__PURE__*/_react.default.createElement("path", {
34
+ d: "M15 6h6m-3-3v6",
35
+ strokeWidth: "1.5",
36
+ strokeLinecap: "round",
37
+ strokeLinejoin: "round"
38
+ }));
39
+ };
40
+ EnergyIconBottledGasPlus.defaultProps = {
41
+ width: "24",
42
+ height: "24",
43
+ viewBox: "0 0 24 24",
44
+ fill: "none",
45
+ stroke: "currentColor",
46
+ xmlns: "http://www.w3.org/2000/svg"
47
+ };
28
48
  var EnergyIconCar = function EnergyIconCar(props) {
29
49
  return /*#__PURE__*/_react.default.createElement("svg", props, /*#__PURE__*/_react.default.createElement("path", {
30
50
  d: "M0 0h24v24H0z",
@@ -124,6 +144,7 @@ const FILLED_ICON_SUFIX = exports.FILLED_ICON_SUFIX = 'Filled';
124
144
  const ENERGY_ICON_PREFIX = exports.ENERGY_ICON_PREFIX = 'Energy';
125
145
  const ENERGY_ICONS = exports.ENERGY_ICONS = {
126
146
  EnergyIconBottledGas,
147
+ EnergyIconBottledGasPlus,
127
148
  EnergyIconCar,
128
149
  EnergyIconCart,
129
150
  EnergyIconHome,
@@ -22,7 +22,7 @@ const Option = _ref => {
22
22
  const OptionIcon = optionProps.icon;
23
23
  return /*#__PURE__*/_react.default.createElement(_react.Fragment, null, isMultiple && /*#__PURE__*/_react.default.createElement(_Checkbox.default, {
24
24
  color: "primary",
25
- checked: value.indexOf(optionProps[valueKey]) > -1
25
+ checked: value?.indexOf(optionProps[valueKey]) > -1
26
26
  }), OptionIcon ? /*#__PURE__*/_react.default.createElement("div", {
27
27
  className: classes.labelContainer
28
28
  }, /*#__PURE__*/_react.default.createElement(OptionIcon, {
@@ -5,8 +5,8 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports.shouldReset = void 0;
7
7
  var _array = require("@widergy/web-utils/lib/array");
8
- const shouldResetMultipleSelect = (value, options, valueKey) => !(0, _array.isEmpty)(value) && ((0, _array.isEmpty)(options) || value.some(el => !options.some(opt => opt[valueKey] === el)));
9
- const shouldResetSimpleSelect = (value, options, valueKey) => value && ((0, _array.isEmpty)(options) || !options.some(el => el[valueKey] === value));
8
+ const shouldResetMultipleSelect = (value, options, valueKey) => !(0, _array.isEmpty)(value) && ((0, _array.isEmpty)(options) || value.some(el => !options.some(opt => opt[valueKey] === el) && !options.some(opt => opt.subOptions && opt.subOptions.some(sub => sub[valueKey] === el))));
9
+ const shouldResetSimpleSelect = (value, options, valueKey) => value && ((0, _array.isEmpty)(options) || !options.some(el => el[valueKey] === value) && !options.some(el => el.subOptions && el.subOptions.some(sub => sub[valueKey] === value)));
10
10
  const shouldReset = (value, options, valueKey, isMultiple) => {
11
11
  if (isMultiple) return shouldResetMultipleSelect(value, options, valueKey);
12
12
  return shouldResetSimpleSelect(value, options, valueKey);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@widergy/energy-ui",
3
- "version": "3.16.0",
3
+ "version": "3.16.2",
4
4
  "description": "Widergy Web Components",
5
5
  "author": "widergy",
6
6
  "license": "MIT",