@widergy/energy-ui 2.3.10 → 2.3.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/CHANGELOG.md CHANGED
@@ -1,3 +1,10 @@
1
+ ## [2.3.11](https://github.com/widergy/energy-ui/compare/v2.3.10...v2.3.11) (2023-08-02)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * current step ([#362](https://github.com/widergy/energy-ui/issues/362)) ([db3509f](https://github.com/widergy/energy-ui/commit/db3509f1054dacca7e2762a858115aaa834499e0))
7
+
1
8
  ## [2.3.10](https://github.com/widergy/energy-ui/compare/v2.3.9...v2.3.10) (2023-07-18)
2
9
 
3
10
 
@@ -29,25 +29,27 @@ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len
29
29
  function _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"]; if (null != _i) { var _s, _e, _x, _r, _arr = [], _n = !0, _d = !1; try { if (_x = (_i = _i.call(arr)).next, 0 === i) { if (Object(_i) !== _i) return; _n = !1; } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0); } catch (err) { _d = !0, _e = err; } finally { try { if (!_n && null != _i.return && (_r = _i.return(), Object(_r) !== _r)) return; } finally { if (_d) throw _e; } } return _arr; } }
30
30
  function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
31
31
  var UTWorkflowContainer = function UTWorkflowContainer(_ref) {
32
- var _ref$actionsPosition = _ref.actionsPosition,
32
+ var TitleIcon = _ref.TitleIcon,
33
+ _ref$actionsPosition = _ref.actionsPosition,
33
34
  actionsPosition = _ref$actionsPosition === void 0 ? _constants.ACTIONS_POSITIONS.TOP : _ref$actionsPosition,
34
35
  backButton = _ref.backButton,
35
- currentStep = _ref.currentStep,
36
36
  children = _ref.children,
37
+ classNames = _ref.classNames,
37
38
  _ref$classes = _ref.classes,
38
39
  themeClasses = _ref$classes === void 0 ? {} : _ref$classes,
39
- classNames = _ref.classNames,
40
+ currentStep = _ref.currentStep,
40
41
  extraActions = _ref.extraActions,
42
+ _ref$forceStepNumber = _ref.forceStepNumber,
43
+ forceStepNumber = _ref$forceStepNumber === void 0 ? false : _ref$forceStepNumber,
41
44
  hideStepCounter = _ref.hideStepCounter,
42
45
  nextButton = _ref.nextButton,
43
46
  onExit = _ref.onExit,
44
- StepCounter = _ref.stepCounter,
45
47
  _ref$smallButtons = _ref.smallButtons,
46
48
  smallButtons = _ref$smallButtons === void 0 ? false : _ref$smallButtons,
49
+ StepCounter = _ref.stepCounter,
47
50
  stepsCount = _ref.stepsCount,
48
51
  subtitle = _ref.subtitle,
49
52
  title = _ref.title,
50
- TitleIcon = _ref.TitleIcon,
51
53
  _ref$withIcon = _ref.withIcon,
52
54
  withIcon = _ref$withIcon === void 0 ? false : _ref$withIcon;
53
55
  (0, _react.useEffect)(function () {
@@ -97,7 +99,7 @@ var UTWorkflowContainer = function UTWorkflowContainer(_ref) {
97
99
  }, !smallButtons && (backButton.label || _constants.BACK)), !hideStepCounter && actionsPosition === _constants.ACTIONS_POSITIONS.TOP && visibleStepNumber && (StepCounter ? /*#__PURE__*/_react.default.createElement(StepCounter, null) : /*#__PURE__*/_react.default.createElement(_UTLabel.default, {
98
100
  className: "".concat(_stylesModule.default.stepInfo, " ").concat(classes.stepCounter),
99
101
  weight: "medium"
100
- }, "".concat(_constants.STEP, " ").concat(visibleStepNumber))), extraActions, /*#__PURE__*/_react.default.createElement(_ActionButton.default, {
102
+ }, "".concat(_constants.STEP, " ").concat(forceStepNumber ? currentStep : visibleStepNumber))), extraActions, /*#__PURE__*/_react.default.createElement(_ActionButton.default, {
101
103
  isHidden: nextButton.isHidden,
102
104
  button: nextButton,
103
105
  className: "".concat(classes.nextButton, " ").concat(_stylesModule.default.nextButton),
@@ -125,13 +127,15 @@ var UTWorkflowContainer = function UTWorkflowContainer(_ref) {
125
127
  }, subtitle)), children)));
126
128
  };
127
129
  UTWorkflowContainer.propTypes = {
130
+ TitleIcon: _propTypes.element,
128
131
  actionsPosition: _propTypes.bool,
129
132
  backButton: _types.buttonTypes,
130
133
  children: _propTypes.element,
131
- classes: (0, _propTypes.objectOf)(_propTypes.string),
132
134
  classNames: (0, _propTypes.objectOf)(_propTypes.string),
135
+ classes: (0, _propTypes.objectOf)(_propTypes.string),
133
136
  currentStep: _propTypes.number.isRequired,
134
137
  extraActions: _propTypes.element,
138
+ forceStepNumber: _propTypes.bool,
135
139
  hideStepCounter: _propTypes.bool,
136
140
  nextButton: _types.buttonTypes,
137
141
  onExit: _propTypes.func,
@@ -140,7 +144,6 @@ UTWorkflowContainer.propTypes = {
140
144
  stepsCount: _propTypes.number,
141
145
  subtitle: _propTypes.string,
142
146
  title: _propTypes.string,
143
- TitleIcon: _propTypes.element,
144
147
  withIcon: _propTypes.bool
145
148
  };
146
149
  var _default = (0, _WithTheme.default)(_theme.retrieveStyle)(UTWorkflowContainer);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@widergy/energy-ui",
3
- "version": "2.3.10",
3
+ "version": "2.3.11",
4
4
  "description": "Widergy Web Components",
5
5
  "author": "widergy",
6
6
  "license": "MIT",