@oliasoft-open-source/charts-library 3.4.2 → 3.4.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.js CHANGED
@@ -23731,17 +23731,18 @@ const reducer = (state, action) => {
23731
23731
  return state;
23732
23732
  }
23733
23733
  };
23734
- const AxesOptionsPopover = ({
23735
- initialAxesRanges,
23736
- axes,
23737
- controlsAxesLabels,
23738
- onUpdateAxes,
23739
- onResetAxes,
23740
- close,
23741
- depthType,
23742
- translations
23743
- }) => {
23734
+ const AxesOptionsPopover = (optionsPopover) => {
23744
23735
  var _a2;
23736
+ const {
23737
+ initialAxesRanges,
23738
+ axes,
23739
+ controlsAxesLabels,
23740
+ onUpdateAxes,
23741
+ onResetAxes,
23742
+ close,
23743
+ depthType,
23744
+ translations
23745
+ } = optionsPopover;
23745
23746
  const [depthTypeState, setDepthTypeState] = useState(
23746
23747
  depthType == null ? void 0 : depthType.selectedDepthType
23747
23748
  );
@@ -23756,13 +23757,13 @@ const AxesOptionsPopover = ({
23756
23757
  const { errors, valid } = validateAxes(formState);
23757
23758
  const onEditValue = ({ name: name2, value, id }) => {
23758
23759
  dispatch({
23759
- type: actionTypes.valueUpdated,
23760
+ type: actionTypes.ValueUpdated,
23760
23761
  payload: { name: name2, value, id }
23761
23762
  });
23762
23763
  };
23763
23764
  const onEditUnit = ({ name: name2, value, id }) => {
23764
23765
  dispatch({
23765
- type: actionTypes.unitUpdated,
23766
+ type: actionTypes.UnitUpdated,
23766
23767
  payload: { name: name2, value, id }
23767
23768
  });
23768
23769
  };
@@ -23777,10 +23778,11 @@ const AxesOptionsPopover = ({
23777
23778
  onUpdateAxes({
23778
23779
  axes: sanitizedFormState
23779
23780
  });
23780
- sanitizedFormState.map((el, i2) => {
23781
- var _a3;
23782
- if ((_a3 = el.unit) == null ? void 0 : _a3.selectedUnit) {
23783
- axes[i2].unit.setSelectedUnit(el.unit.selectedUnit);
23781
+ sanitizedFormState.forEach((el, i2) => {
23782
+ var _a3, _b2, _c2;
23783
+ const selectedUnit = (_a3 = el.unit) == null ? void 0 : _a3.selectedUnit;
23784
+ if (selectedUnit) {
23785
+ (_c2 = (_b2 = axes == null ? void 0 : axes[i2]) == null ? void 0 : _b2.unit) == null ? void 0 : _c2.setSelectedUnit(selectedUnit);
23784
23786
  }
23785
23787
  });
23786
23788
  if (depthType) {
@@ -23791,13 +23793,14 @@ const AxesOptionsPopover = ({
23791
23793
  };
23792
23794
  const onReset = () => {
23793
23795
  dispatch({
23794
- type: actionTypes.reset,
23796
+ type: actionTypes.Reset,
23795
23797
  payload: { axes, initialAxesRanges }
23796
23798
  });
23797
- initialAxesRanges.map((el, i2) => {
23798
- var _a3;
23799
- if ((_a3 = el == null ? void 0 : el.unit) == null ? void 0 : _a3.selectedUnit) {
23800
- axes[i2].unit.setSelectedUnit(el.unit.selectedUnit);
23799
+ initialAxesRanges.forEach((el, i2) => {
23800
+ var _a3, _b2, _c2;
23801
+ const selectedUnit = (_a3 = el == null ? void 0 : el.unit) == null ? void 0 : _a3.selectedUnit;
23802
+ if (selectedUnit) {
23803
+ (_c2 = (_b2 = axes == null ? void 0 : axes[i2]) == null ? void 0 : _b2.unit) == null ? void 0 : _c2.setSelectedUnit(selectedUnit);
23801
23804
  }
23802
23805
  });
23803
23806
  onResetAxes();
@@ -23911,15 +23914,16 @@ const AxesOptionsPopover = ({
23911
23914
  ] })
23912
23915
  ] });
23913
23916
  };
23914
- const AxesOptions = ({
23915
- initialAxesRanges,
23916
- axes,
23917
- controlsAxesLabels,
23918
- onUpdateAxes,
23919
- onResetAxes,
23920
- depthType,
23921
- translations
23922
- }) => {
23917
+ const AxesOptions = (optionsPopover) => {
23918
+ const {
23919
+ initialAxesRanges,
23920
+ axes,
23921
+ controlsAxesLabels,
23922
+ onUpdateAxes,
23923
+ onResetAxes,
23924
+ depthType,
23925
+ translations
23926
+ } = optionsPopover;
23923
23927
  return /* @__PURE__ */ jsx(
23924
23928
  Popover,
23925
23929
  {