@oliasoft-open-source/charts-library 3.4.4 → 3.4.5-beta-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/dist/index.js
CHANGED
|
@@ -23734,18 +23734,17 @@ const reducer = (state, action) => {
|
|
|
23734
23734
|
return state;
|
|
23735
23735
|
}
|
|
23736
23736
|
};
|
|
23737
|
-
const AxesOptionsPopover = (
|
|
23737
|
+
const AxesOptionsPopover = ({
|
|
23738
|
+
initialAxesRanges,
|
|
23739
|
+
axes,
|
|
23740
|
+
controlsAxesLabels,
|
|
23741
|
+
onUpdateAxes,
|
|
23742
|
+
onResetAxes,
|
|
23743
|
+
close,
|
|
23744
|
+
depthType,
|
|
23745
|
+
translations
|
|
23746
|
+
}) => {
|
|
23738
23747
|
var _a2;
|
|
23739
|
-
const {
|
|
23740
|
-
initialAxesRanges,
|
|
23741
|
-
axes,
|
|
23742
|
-
controlsAxesLabels,
|
|
23743
|
-
onUpdateAxes,
|
|
23744
|
-
onResetAxes,
|
|
23745
|
-
close,
|
|
23746
|
-
depthType,
|
|
23747
|
-
translations
|
|
23748
|
-
} = optionsPopover;
|
|
23749
23748
|
const [depthTypeState, setDepthTypeState] = useState(
|
|
23750
23749
|
depthType == null ? void 0 : depthType.selectedDepthType
|
|
23751
23750
|
);
|
|
@@ -23760,20 +23759,14 @@ const AxesOptionsPopover = (optionsPopover) => {
|
|
|
23760
23759
|
const { errors, valid } = validateAxes(formState);
|
|
23761
23760
|
const onEditValue = ({ name: name2, value, id }) => {
|
|
23762
23761
|
dispatch({
|
|
23763
|
-
type: actionTypes.
|
|
23764
|
-
payload: { name: name2, value, id }
|
|
23765
|
-
});
|
|
23766
|
-
};
|
|
23767
|
-
const onEditUnit = ({ name: name2, value, id }) => {
|
|
23768
|
-
dispatch({
|
|
23769
|
-
type: actionTypes.UnitUpdated,
|
|
23762
|
+
type: actionTypes.valueUpdated,
|
|
23770
23763
|
payload: { name: name2, value, id }
|
|
23771
23764
|
});
|
|
23772
23765
|
};
|
|
23773
23766
|
const onDone = (e2) => {
|
|
23774
23767
|
e2.preventDefault();
|
|
23775
23768
|
if (valid) {
|
|
23776
|
-
const sanitizedFormState = formState.map((axis) => ({
|
|
23769
|
+
const sanitizedFormState = formState.map((axis, i2) => ({
|
|
23777
23770
|
...axis,
|
|
23778
23771
|
min: toNum(axis.min),
|
|
23779
23772
|
max: toNum(axis.max)
|
|
@@ -23781,13 +23774,6 @@ const AxesOptionsPopover = (optionsPopover) => {
|
|
|
23781
23774
|
onUpdateAxes({
|
|
23782
23775
|
axes: sanitizedFormState
|
|
23783
23776
|
});
|
|
23784
|
-
sanitizedFormState.forEach((el, i2) => {
|
|
23785
|
-
var _a3, _b2, _c2;
|
|
23786
|
-
const selectedUnit = (_a3 = el.unit) == null ? void 0 : _a3.selectedUnit;
|
|
23787
|
-
if (selectedUnit) {
|
|
23788
|
-
(_c2 = (_b2 = axes == null ? void 0 : axes[i2]) == null ? void 0 : _b2.unit) == null ? void 0 : _c2.setSelectedUnit(selectedUnit);
|
|
23789
|
-
}
|
|
23790
|
-
});
|
|
23791
23777
|
if (depthType) {
|
|
23792
23778
|
depthType.setSelectedDepthType(depthTypeState);
|
|
23793
23779
|
}
|
|
@@ -23796,14 +23782,13 @@ const AxesOptionsPopover = (optionsPopover) => {
|
|
|
23796
23782
|
};
|
|
23797
23783
|
const onReset = () => {
|
|
23798
23784
|
dispatch({
|
|
23799
|
-
type: actionTypes.
|
|
23785
|
+
type: actionTypes.reset,
|
|
23800
23786
|
payload: { axes, initialAxesRanges }
|
|
23801
23787
|
});
|
|
23802
|
-
initialAxesRanges.
|
|
23803
|
-
var _a3
|
|
23804
|
-
|
|
23805
|
-
|
|
23806
|
-
(_c2 = (_b2 = axes == null ? void 0 : axes[i2]) == null ? void 0 : _b2.unit) == null ? void 0 : _c2.setSelectedUnit(selectedUnit);
|
|
23788
|
+
initialAxesRanges.map((el, i2) => {
|
|
23789
|
+
var _a3;
|
|
23790
|
+
if ((_a3 = el == null ? void 0 : el.unit) == null ? void 0 : _a3.selectedUnit) {
|
|
23791
|
+
axes[i2].unit.setSelectedUnit(el.unit.selectedUnit);
|
|
23807
23792
|
}
|
|
23808
23793
|
});
|
|
23809
23794
|
onResetAxes();
|
|
@@ -23862,15 +23847,10 @@ const AxesOptionsPopover = (optionsPopover) => {
|
|
|
23862
23847
|
name: "selectedUnit",
|
|
23863
23848
|
options: (_i2 = axis == null ? void 0 : axis.unit) == null ? void 0 : _i2.options,
|
|
23864
23849
|
value: unit == null ? void 0 : unit.selectedUnit,
|
|
23865
|
-
onChange:
|
|
23866
|
-
onEditUnit({
|
|
23867
|
-
name: e2.target.name,
|
|
23868
|
-
value: e2.target.value,
|
|
23869
|
-
id: axis.id
|
|
23870
|
-
});
|
|
23871
|
-
},
|
|
23850
|
+
onChange: unit == null ? void 0 : unit.setSelectedUnit,
|
|
23872
23851
|
autoLayerWidth: true,
|
|
23873
|
-
width: "15%"
|
|
23852
|
+
width: "15%",
|
|
23853
|
+
native: true
|
|
23874
23854
|
}
|
|
23875
23855
|
) : null
|
|
23876
23856
|
] }) }, i2);
|
|
@@ -23917,16 +23897,15 @@ const AxesOptionsPopover = (optionsPopover) => {
|
|
|
23917
23897
|
] })
|
|
23918
23898
|
] });
|
|
23919
23899
|
};
|
|
23920
|
-
const AxesOptions = (
|
|
23921
|
-
|
|
23922
|
-
|
|
23923
|
-
|
|
23924
|
-
|
|
23925
|
-
|
|
23926
|
-
|
|
23927
|
-
|
|
23928
|
-
|
|
23929
|
-
} = optionsPopover;
|
|
23900
|
+
const AxesOptions = ({
|
|
23901
|
+
initialAxesRanges,
|
|
23902
|
+
axes,
|
|
23903
|
+
controlsAxesLabels,
|
|
23904
|
+
onUpdateAxes,
|
|
23905
|
+
onResetAxes,
|
|
23906
|
+
depthType,
|
|
23907
|
+
translations
|
|
23908
|
+
}) => {
|
|
23930
23909
|
return /* @__PURE__ */ jsx(
|
|
23931
23910
|
Popover,
|
|
23932
23911
|
{
|