@xelto.npm/xc2-lib 0.1.1 → 0.1.3

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/dist/index.cjs.js CHANGED
@@ -71,15 +71,6 @@ function _objectSpread2(target) {
71
71
  }
72
72
  return target;
73
73
  }
74
- function _typeof$I(obj) {
75
- "@babel/helpers - typeof";
76
-
77
- return _typeof$I = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) {
78
- return typeof obj;
79
- } : function (obj) {
80
- return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
81
- }, _typeof$I(obj);
82
- }
83
74
  function _defineProperty$C(obj, key, value) {
84
75
  key = _toPropertyKey(key);
85
76
  if (key in obj) {
@@ -97900,17 +97891,9 @@ var CustomStepper = function CustomStepper(_ref4) {
97900
97891
  label = _ref4.label,
97901
97892
  withIcon = _ref4.withIcon,
97902
97893
  currentStep = _ref4.currentStep;
97903
- console.log(currentStep + _typeof$I(currentStep));
97904
97894
  var currentStepIndex = steps.indexOf(currentStep);
97905
- console.log('currentStepIndex ' + currentStepIndex);
97906
- var _useState = React.useState(currentStepIndex),
97907
- _useState2 = _slicedToArray$a(_useState, 2),
97908
- activeStepIndex = _useState2[0];
97909
- _useState2[1];
97910
- // const [completed, setCompleted] = useState({});
97911
97895
  var totalSteps = steps.length;
97912
- // const completedSteps = Object.keys(completed).length;
97913
- var allStepsCompleted = activeStepIndex + 1 === totalSteps;
97896
+ var allStepsCompleted = currentStepIndex + 1 === totalSteps;
97914
97897
  return /*#__PURE__*/React.createElement(StyledStepperContainer, null, /*#__PURE__*/React.createElement(Box$1, {
97915
97898
  sx: {
97916
97899
  width: '100%'
@@ -97918,17 +97901,17 @@ var CustomStepper = function CustomStepper(_ref4) {
97918
97901
  }, /*#__PURE__*/React.createElement(React.Fragment, null, allStepsCompleted ? /*#__PURE__*/React.createElement(StyledLabelAndIconWrapper, null, /*#__PURE__*/React.createElement(StepLabel$1, null, label, " (", steps.length, "/", steps.length, ")"), withIcon && /*#__PURE__*/React.createElement(Icon, {
97919
97902
  iconName: 'icon_wf_no_barcodrinter',
97920
97903
  size: 'responsive'
97921
- })) : /*#__PURE__*/React.createElement(StyledLabelAndIconWrapper, null, /*#__PURE__*/React.createElement(StepLabel$1, null, label, " (", activeStepIndex + 1, "/", steps.length, ")"), withIcon && /*#__PURE__*/React.createElement(Icon, {
97904
+ })) : /*#__PURE__*/React.createElement(StyledLabelAndIconWrapper, null, /*#__PURE__*/React.createElement(StepLabel$1, null, label, " (", currentStepIndex + 1, "/", steps.length, ")"), withIcon && /*#__PURE__*/React.createElement(Icon, {
97922
97905
  iconName: 'icon_wf_no_barcode_printer',
97923
97906
  size: 'responsive'
97924
97907
  }))), /*#__PURE__*/React.createElement(StyledStepper, {
97925
- activeStep: activeStepIndex,
97908
+ activeStep: currentStepIndex,
97926
97909
  numberOfSteps: steps.length
97927
97910
  }, steps.map(function (step, index) {
97928
97911
  return /*#__PURE__*/React.createElement(StyledStep, {
97929
97912
  key: step,
97930
- completed: index < activeStepIndex,
97931
- className: activeStepIndex === index ? 'active' : ''
97913
+ completed: index < currentStepIndex,
97914
+ className: currentStepIndex === index ? 'active' : ''
97932
97915
  });
97933
97916
  }))));
97934
97917
  };
package/dist/index.esm.js CHANGED
@@ -51,15 +51,6 @@ function _objectSpread2(target) {
51
51
  }
52
52
  return target;
53
53
  }
54
- function _typeof$I(obj) {
55
- "@babel/helpers - typeof";
56
-
57
- return _typeof$I = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) {
58
- return typeof obj;
59
- } : function (obj) {
60
- return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
61
- }, _typeof$I(obj);
62
- }
63
54
  function _defineProperty$C(obj, key, value) {
64
55
  key = _toPropertyKey(key);
65
56
  if (key in obj) {
@@ -97880,17 +97871,9 @@ var CustomStepper = function CustomStepper(_ref4) {
97880
97871
  label = _ref4.label,
97881
97872
  withIcon = _ref4.withIcon,
97882
97873
  currentStep = _ref4.currentStep;
97883
- console.log(currentStep + _typeof$I(currentStep));
97884
97874
  var currentStepIndex = steps.indexOf(currentStep);
97885
- console.log('currentStepIndex ' + currentStepIndex);
97886
- var _useState = useState(currentStepIndex),
97887
- _useState2 = _slicedToArray$a(_useState, 2),
97888
- activeStepIndex = _useState2[0];
97889
- _useState2[1];
97890
- // const [completed, setCompleted] = useState({});
97891
97875
  var totalSteps = steps.length;
97892
- // const completedSteps = Object.keys(completed).length;
97893
- var allStepsCompleted = activeStepIndex + 1 === totalSteps;
97876
+ var allStepsCompleted = currentStepIndex + 1 === totalSteps;
97894
97877
  return /*#__PURE__*/React__default.createElement(StyledStepperContainer, null, /*#__PURE__*/React__default.createElement(Box$1, {
97895
97878
  sx: {
97896
97879
  width: '100%'
@@ -97898,17 +97881,17 @@ var CustomStepper = function CustomStepper(_ref4) {
97898
97881
  }, /*#__PURE__*/React__default.createElement(React__default.Fragment, null, allStepsCompleted ? /*#__PURE__*/React__default.createElement(StyledLabelAndIconWrapper, null, /*#__PURE__*/React__default.createElement(StepLabel$1, null, label, " (", steps.length, "/", steps.length, ")"), withIcon && /*#__PURE__*/React__default.createElement(Icon, {
97899
97882
  iconName: 'icon_wf_no_barcodrinter',
97900
97883
  size: 'responsive'
97901
- })) : /*#__PURE__*/React__default.createElement(StyledLabelAndIconWrapper, null, /*#__PURE__*/React__default.createElement(StepLabel$1, null, label, " (", activeStepIndex + 1, "/", steps.length, ")"), withIcon && /*#__PURE__*/React__default.createElement(Icon, {
97884
+ })) : /*#__PURE__*/React__default.createElement(StyledLabelAndIconWrapper, null, /*#__PURE__*/React__default.createElement(StepLabel$1, null, label, " (", currentStepIndex + 1, "/", steps.length, ")"), withIcon && /*#__PURE__*/React__default.createElement(Icon, {
97902
97885
  iconName: 'icon_wf_no_barcode_printer',
97903
97886
  size: 'responsive'
97904
97887
  }))), /*#__PURE__*/React__default.createElement(StyledStepper, {
97905
- activeStep: activeStepIndex,
97888
+ activeStep: currentStepIndex,
97906
97889
  numberOfSteps: steps.length
97907
97890
  }, steps.map(function (step, index) {
97908
97891
  return /*#__PURE__*/React__default.createElement(StyledStep, {
97909
97892
  key: step,
97910
- completed: index < activeStepIndex,
97911
- className: activeStepIndex === index ? 'active' : ''
97893
+ completed: index < currentStepIndex,
97894
+ className: currentStepIndex === index ? 'active' : ''
97912
97895
  });
97913
97896
  }))));
97914
97897
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xelto.npm/xc2-lib",
3
- "version": "0.1.1",
3
+ "version": "0.1.3",
4
4
  "author": "XELTO",
5
5
  "description": "React component library based on MUI",
6
6
  "license": "ISC",