@oliasoft-open-source/charts-library 3.5.4-beta-1 → 3.5.4-beta-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 +13 -7
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -22275,12 +22275,9 @@ const initialState = ({ options, persistenceId }) => {
|
|
|
22275
22275
|
} = options;
|
|
22276
22276
|
const getStateAxesByType = (axisType, customAxesRange2) => {
|
|
22277
22277
|
var _a2, _b2, _c2, _d2, _e2;
|
|
22278
|
-
console.log("axisType", axisType);
|
|
22279
|
-
console.log("axes", axes);
|
|
22280
22278
|
if (!axes[axisType]) {
|
|
22281
22279
|
return [];
|
|
22282
22280
|
}
|
|
22283
|
-
console.log("getStateAxesByType");
|
|
22284
22281
|
if (((_a2 = axes[axisType]) == null ? void 0 : _a2.length) > 1) {
|
|
22285
22282
|
return axes[axisType].map(
|
|
22286
22283
|
(axisObj, index2) => {
|
|
@@ -22303,7 +22300,6 @@ const initialState = ({ options, persistenceId }) => {
|
|
|
22303
22300
|
const customMin = (_b2 = customAxesRange2 == null ? void 0 : customAxesRange2[id]) == null ? void 0 : _b2.min;
|
|
22304
22301
|
const customMax = (_c2 = customAxesRange2 == null ? void 0 : customAxesRange2[id]) == null ? void 0 : _c2.max;
|
|
22305
22302
|
const unit = (_e2 = (_d2 = axes == null ? void 0 : axes[id]) == null ? void 0 : _d2[0]) == null ? void 0 : _e2.unit;
|
|
22306
|
-
console.log("id", id);
|
|
22307
22303
|
return [
|
|
22308
22304
|
{
|
|
22309
22305
|
id,
|
|
@@ -22318,7 +22314,6 @@ const initialState = ({ options, persistenceId }) => {
|
|
|
22318
22314
|
const xStateAxes = getStateAxesByType(AxisType.X, customAxesRange);
|
|
22319
22315
|
const yStateAxes = getStateAxesByType(AxisType.Y, customAxesRange);
|
|
22320
22316
|
const stateAxes = [...xStateAxes, ...yStateAxes];
|
|
22321
|
-
console.log("stateAxes", stateAxes);
|
|
22322
22317
|
const {
|
|
22323
22318
|
zoomEnabled,
|
|
22324
22319
|
panEnabled,
|
|
@@ -23744,7 +23739,12 @@ const initializeFormState = ({
|
|
|
23744
23739
|
axes = []
|
|
23745
23740
|
}) => {
|
|
23746
23741
|
return (initialAxesRanges == null ? void 0 : initialAxesRanges.map((initialAxisRange) => {
|
|
23742
|
+
console.log("initializeFormState");
|
|
23743
|
+
console.log("-------------------");
|
|
23747
23744
|
const currentAxisRange = axes.find((a2) => a2.id === initialAxisRange.id);
|
|
23745
|
+
console.log("currentAxisRange", currentAxisRange);
|
|
23746
|
+
console.log("id: initialAxisRange.id,", initialAxisRange.id);
|
|
23747
|
+
console.log("-------------------");
|
|
23748
23748
|
return {
|
|
23749
23749
|
id: initialAxisRange.id,
|
|
23750
23750
|
min: (currentAxisRange == null ? void 0 : currentAxisRange.min) ?? (initialAxisRange == null ? void 0 : initialAxisRange.min),
|
|
@@ -23794,7 +23794,13 @@ const reducer = (state, action) => {
|
|
|
23794
23794
|
return produce(state, (draft) => {
|
|
23795
23795
|
const { name: name2, value, id } = action.payload;
|
|
23796
23796
|
const axis = draft.find((a2) => a2.id === id);
|
|
23797
|
-
|
|
23797
|
+
console.log("actionTypes.ValueUpdated:");
|
|
23798
|
+
console.log("1-----------------------");
|
|
23799
|
+
console.log("axis", axis);
|
|
23800
|
+
console.log("name", name2);
|
|
23801
|
+
console.log("value", value);
|
|
23802
|
+
if (axis && value) {
|
|
23803
|
+
console.log("2------------------------");
|
|
23798
23804
|
axis[name2] = value;
|
|
23799
23805
|
}
|
|
23800
23806
|
});
|
|
@@ -25431,6 +25437,7 @@ const useUpdateAxesRanges = (range, dispatch) => {
|
|
|
25431
25437
|
const prevRange = useRef();
|
|
25432
25438
|
const updateAxesRanges = useCallback(() => {
|
|
25433
25439
|
if (range && isRangeValid(range) && !isEqual(range, prevRange.current)) {
|
|
25440
|
+
console.log("WRONG", range);
|
|
25434
25441
|
const axes = Object.entries(range).map(([key, { min, max }]) => ({
|
|
25435
25442
|
id: key,
|
|
25436
25443
|
min: min ?? 0,
|
|
@@ -25452,7 +25459,6 @@ const useSaveInitialAxesRanges = (chartRef, axes, generatedDatasets, dispatch) =
|
|
|
25452
25459
|
const saveInitialAxesRanges = useCallback(() => {
|
|
25453
25460
|
if (chartRef && !isEqual(generatedDatasets, prevGeneratedDatasets.current)) {
|
|
25454
25461
|
const initialAxesRanges = getAxesRangesFromChart(chartRef, axes);
|
|
25455
|
-
console.log("initialAxesRanges", initialAxesRanges);
|
|
25456
25462
|
dispatch({
|
|
25457
25463
|
type: SAVE_INITIAL_AXES_RANGES,
|
|
25458
25464
|
payload: { initialAxesRanges }
|