@dexteel/mesf-core 6.1.0 → 6.1.1

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.
@@ -16,36 +16,3 @@ jobs:
16
16
  token: ${{ secrets.GITHUB_TOKEN }}
17
17
  target-branch: 'next-ng'
18
18
  default-branch: 'next-ng'
19
-
20
- - uses: actions/checkout@v4
21
- if: ${{ steps.release.outputs.release_created }}
22
-
23
- - name: Setup Node.js
24
- if: ${{ steps.release.outputs.release_created }}
25
- uses: actions/setup-node@v4
26
- with:
27
- node-version: 'lts/hydrogen' # Adjust this to your Node.js version
28
-
29
- - name: Update Node.js package versions
30
- if: ${{ steps.release.outputs.release_created }}
31
- run: |
32
- version="${{ steps.release.outputs.version }}"
33
- find . -name "package.json" -type f -print0 | while IFS= read -r -d '' file; do
34
- jq ".version = \"${version}\"" "$file" > temp.json && mv temp.json "$file"
35
- done
36
-
37
- - name: Update CHANGELOG.md
38
- if: ${{ steps.release.outputs.release_created }}
39
- run: |
40
- version="${{ steps.release.outputs.version }}"
41
- date=$(date +"%Y-%m-%d")
42
- echo -e "# Changelog\n\n## [${version}] - ${date}\n\n${{ steps.release.outputs.changelog }}\n\n$(cat CHANGELOG.md)" > CHANGELOG.md
43
-
44
- - name: Commit changes
45
- if: ${{ steps.release.outputs.release_created }}
46
- run: |
47
- git config --local user.email "action@github.com"
48
- git config --local user.name "GitHub Action"
49
- git add .
50
- git commit -m "chore: update versions and CHANGELOG for ${{ steps.release.outputs.version }}" || echo "No changes to commit"
51
- git push
@@ -1,3 +1,3 @@
1
1
  {
2
- ".": "6.1.0"
2
+ ".": "6.1.1"
3
3
  }
package/CHANGELOG.md CHANGED
@@ -1,3 +1,17 @@
1
+ # Changelog
2
+
3
+ ## [6.1.1](https://github.com/dexteel/mesf-core-frontend/compare/@dexteel/mesf-core-v6.1.0...@dexteel/mesf-core-v6.1.1) (2025-10-15)
4
+
5
+
6
+ ### Bug Fixes
7
+
8
+ * **devops:** remove unnecessary code from release-please yaml ([51f15d2](https://github.com/dexteel/mesf-core-frontend/commit/51f15d20b3c0130ce47375294b77eb59d3e42aa1))
9
+ * **Trendings:** optimize chart updates and add request cancellation for zoom/pan ([#504](https://github.com/dexteel/mesf-core-frontend/issues/504)) ([2277a65](https://github.com/dexteel/mesf-core-frontend/commit/2277a653360ab379d18b1ead252ff480f9eb16f9))
10
+
11
+ ## [6.1.0] - 2025-10-13
12
+
13
+
14
+
1
15
  # Changelog
2
16
 
3
17
  ## [6.1.0](https://github.com/dexteel/mesf-core-frontend/compare/@dexteel/mesf-core-v6.0.5...@dexteel/mesf-core-v6.1.0) (2025-10-13)
package/dist/index.d.ts CHANGED
@@ -26,6 +26,9 @@ export * from "./MESFMain";
26
26
  export { logbookNavbar, logbookRoutesMESF } from "./pages/logbook";
27
27
  export { MESFLogbookEntry } from "./pages/logbook/entry/index";
28
28
  export { routeLogbookEntry } from "./pages/logbook/entry/LogbookPage";
29
+ export type { Entry } from "./pages/logbook/entry/models/Entry";
30
+ export { ENTRY_INITIAL_VALUES } from "./pages/logbook/entry/models/Entry";
31
+ export { getEntries } from "./pages/logbook/entry/repository/LogbookRepository";
29
32
  export { MESFLogbookReport } from "./pages/logbook/report/index";
30
33
  export { routeLogbookReport } from "./pages/logbook/report/LogbookPage";
31
34
  export * from "./pages/trendings/TrendingsPage";
package/dist/index.esm.js CHANGED
@@ -11930,7 +11930,8 @@ var TrendingProvider = function (_a) {
11930
11930
  initialState: TrendingsReducer.getInitialState(),
11931
11931
  reducers: TrendingsReducer.caseReducers,
11932
11932
  }), state = _b[0], actions = _b[1];
11933
- return (React__default.createElement(TrendingContext.Provider, { value: { state: state, actions: actions } }, children));
11933
+ var contextValue = useMemo(function () { return ({ state: state, actions: actions }); }, [state, actions]);
11934
+ return (React__default.createElement(TrendingContext.Provider, { value: contextValue }, children));
11934
11935
  };
11935
11936
 
11936
11937
  var useTrendingStyles = makeStyles(function (theme) { return ({
@@ -13410,51 +13411,42 @@ var TableComponent = function (_a) {
13410
13411
  cursorData: cursorData,
13411
13412
  });
13412
13413
  var handleChange = function (tagId, value, property) {
13413
- var newTags = structuredClone(viewTags);
13414
- newTags[tagId]["viewTag"][property] = value;
13415
- newTags[tagId]["viewTag"]["IsAutoScale"] = false;
13416
- setViewTags(newTags);
13414
+ var _a, _b;
13415
+ setViewTags(__assign(__assign({}, viewTags), (_a = {}, _a[tagId] = __assign(__assign({}, viewTags[tagId]), { viewTag: __assign(__assign({}, viewTags[tagId].viewTag), (_b = {}, _b[property] = value, _b.IsAutoScale = false, _b)) }), _a)));
13417
13416
  };
13418
13417
  var handleChangeScale = function (value, scale, tagId) {
13419
13418
  handleChange(tagId, value, scale);
13420
13419
  };
13421
13420
  var handleChangeAlias = function (tagId, newName) {
13422
- var newTags = structuredClone(viewTags);
13423
- newTags[tagId]["viewTag"]["Alias"] = newName;
13424
- setViewTags(newTags);
13421
+ var _a;
13422
+ setViewTags(__assign(__assign({}, viewTags), (_a = {}, _a[tagId] = __assign(__assign({}, viewTags[tagId]), { viewTag: __assign(__assign({}, viewTags[tagId].viewTag), { Alias: newName }) }), _a)));
13425
13423
  };
13426
13424
  var handleVisibilityChange = function (tagId, value) {
13427
- var newTags = structuredClone(viewTags);
13428
- newTags[tagId]["viewTag"]["IsVisible"] = value;
13429
- setViewTags(newTags);
13425
+ var _a;
13426
+ setViewTags(__assign(__assign({}, viewTags), (_a = {}, _a[tagId] = __assign(__assign({}, viewTags[tagId]), { viewTag: __assign(__assign({}, viewTags[tagId].viewTag), { IsVisible: value }) }), _a)));
13430
13427
  };
13431
13428
  var handleUnitChange = function (tagId, newUnit) {
13432
- var newTags = structuredClone(viewTags);
13433
- newTags[tagId]["viewTag"]["Unit"] = newUnit;
13434
- setViewTags(newTags);
13429
+ var _a;
13430
+ setViewTags(__assign(__assign({}, viewTags), (_a = {}, _a[tagId] = __assign(__assign({}, viewTags[tagId]), { viewTag: __assign(__assign({}, viewTags[tagId].viewTag), { Unit: newUnit }) }), _a)));
13435
13431
  };
13436
13432
  var handleAutoScaleChange = function (tagId, checked) {
13437
- var newTags = structuredClone(viewTags);
13438
- newTags[tagId]["viewTag"]["IsAutoScale"] = !checked;
13439
- setViewTags(newTags);
13433
+ var _a;
13434
+ setViewTags(__assign(__assign({}, viewTags), (_a = {}, _a[tagId] = __assign(__assign({}, viewTags[tagId]), { viewTag: __assign(__assign({}, viewTags[tagId].viewTag), { IsAutoScale: !checked }) }), _a)));
13440
13435
  };
13441
13436
  var handleColorChange = function (tagId, value) {
13442
- var newTags = structuredClone(viewTags);
13443
- newTags[tagId]["viewTag"]["Color"] = value;
13444
- setViewTags(newTags);
13437
+ var _a;
13438
+ setViewTags(__assign(__assign({}, viewTags), (_a = {}, _a[tagId] = __assign(__assign({}, viewTags[tagId]), { viewTag: __assign(__assign({}, viewTags[tagId].viewTag), { Color: value }) }), _a)));
13445
13439
  };
13446
13440
  var handleDeleteTag = function (tagId) {
13447
- var newTags = structuredClone(viewTags);
13448
- delete newTags[tagId];
13441
+ var _a = viewTags, _b = tagId; _a[_b]; var newTags = __rest(_a, [typeof _b === "symbol" ? _b : _b + ""]);
13449
13442
  setViewTagsAndRefetch(newTags);
13450
13443
  };
13451
13444
  var handleAddTag = function (newTag) {
13452
- var newTags = structuredClone(viewTags);
13453
- newTags[newTag.TagId] = {
13445
+ var _a;
13446
+ setViewTagsAndRefetch(__assign(__assign({}, viewTags), (_a = {}, _a[newTag.TagId] = {
13454
13447
  viewTag: __assign(__assign({}, newTag), { IsVisible: true, TagType: newTag.TagTypeCode, Color: newTag.Color || getRandomColor(), IsAutoScale: newTag.MinScale || newTag.MaxScale ? false : true }),
13455
13448
  order: Object.keys(viewTags).length,
13456
- };
13457
- setViewTagsAndRefetch(newTags);
13449
+ }, _a)));
13458
13450
  };
13459
13451
  var handleAbleScales = function (tagId, checked) {
13460
13452
  if (checked) {
@@ -13581,7 +13573,6 @@ var TableComponent = function (_a) {
13581
13573
  return __generator(this, function (_b) {
13582
13574
  switch (_b.label) {
13583
13575
  case 0:
13584
- debugger;
13585
13576
  if (!(viewSelected && selectedRowTagId !== null)) return [3 /*break*/, 3];
13586
13577
  _a = viewTags[selectedRowTagId].viewTag, TagId = _a.TagId, Alias = _a.Alias, Color = _a.Color, MinScale = _a.MinScale, MaxScale = _a.MaxScale, Unit = _a.Unit, IsVisible = _a.IsVisible, IsAutoScale = _a.IsAutoScale;
13587
13578
  return [4 /*yield*/, saveTags.mutate({
@@ -13873,7 +13864,7 @@ var formatDateTimeToString = function (date) {
13873
13864
  var useChartOptions = function () {
13874
13865
  var _a = useTrendingContext(); _a.state; var actions = _a.actions;
13875
13866
  var debounceTimerRef = useRef(null);
13876
- var handleZoom = function (_a) {
13867
+ var handleZoom = useCallback(function (_a) {
13877
13868
  var chart = _a.chart;
13878
13869
  if (debounceTimerRef.current) {
13879
13870
  clearTimeout(debounceTimerRef.current);
@@ -13887,8 +13878,8 @@ var useChartOptions = function () {
13887
13878
  end: newEnd,
13888
13879
  });
13889
13880
  }, 1000);
13890
- };
13891
- var handlePan = function (_a) {
13881
+ }, [actions]);
13882
+ var handlePan = useCallback(function (_a) {
13892
13883
  var chart = _a.chart;
13893
13884
  if (debounceTimerRef.current) {
13894
13885
  clearTimeout(debounceTimerRef.current);
@@ -13903,8 +13894,8 @@ var useChartOptions = function () {
13903
13894
  graphPan: true,
13904
13895
  });
13905
13896
  }, 1000);
13906
- };
13907
- return useState({
13897
+ }, [actions]);
13898
+ var initialOptions = useMemo(function () { return ({
13908
13899
  animation: {
13909
13900
  duration: 0, // No animation
13910
13901
  },
@@ -13972,7 +13963,8 @@ var useChartOptions = function () {
13972
13963
  },
13973
13964
  },
13974
13965
  },
13975
- });
13966
+ }); }, [handleZoom, handlePan]);
13967
+ return useState(initialOptions);
13976
13968
  };
13977
13969
 
13978
13970
  var CustomOptionsComponent = function (_a) {
@@ -14032,7 +14024,7 @@ var dateNavigator = function (startDate, endDate, scope, operator, current) {
14032
14024
  return { newStartDate: newStartDate, newEndDate: newEndDate };
14033
14025
  };
14034
14026
 
14035
- var Header = function (_a) {
14027
+ var Header = React__default.memo(function (_a) {
14036
14028
  var setChartOptions = _a.setChartOptions, autoRefresh = _a.autoRefresh, setAutoRefresh = _a.setAutoRefresh;
14037
14029
  var classes = useTrendingStyles();
14038
14030
  var _b = useTrendingContext(), state = _b.state, actions = _b.actions;
@@ -14128,9 +14120,10 @@ var Header = function (_a) {
14128
14120
  }
14129
14121
  setAutoRefresh(autoRefresh);
14130
14122
  } }))))));
14131
- };
14123
+ });
14124
+ Header.displayName = "Header";
14132
14125
 
14133
- var DraggableLineControl = function (_a) {
14126
+ var DraggableLineControl = React__default.memo(function (_a) {
14134
14127
  var initialLeft = _a.initialLeft, otherLineCoord = _a.otherLineCoord, onUpdate = _a.onUpdate, color = _a.color, chartArea = _a.chartArea;
14135
14128
  var _b = useState(false), isDragging = _b[0], setIsDragging = _b[1];
14136
14129
  var _c = useState(initialLeft), left = _c[0], setLeft = _c[1];
@@ -14189,10 +14182,11 @@ var DraggableLineControl = function (_a) {
14189
14182
  right: 0,
14190
14183
  margin: "auto",
14191
14184
  } })));
14192
- };
14185
+ });
14186
+ DraggableLineControl.displayName = "DraggableLineControl";
14193
14187
 
14194
14188
  var useGetVerticalLinePlugin = function (setChartArea, setCoords) {
14195
- var chartPlugin = {
14189
+ var chartPlugin = useMemo(function () { return ({
14196
14190
  id: "verticalLinePlugin",
14197
14191
  afterUpdate: function (chart) {
14198
14192
  if (chart.chartArea) {
@@ -14218,7 +14212,7 @@ var useGetVerticalLinePlugin = function (setChartArea, setCoords) {
14218
14212
  setChartArea(chart.chartArea);
14219
14213
  setCoords({ x1: x1, x2: x2 });
14220
14214
  },
14221
- };
14215
+ }); }, [setChartArea, setCoords]);
14222
14216
  return chartPlugin;
14223
14217
  };
14224
14218
 
@@ -14256,7 +14250,7 @@ var updateCursorData = function (chart, setCursorData) {
14256
14250
  };
14257
14251
 
14258
14252
  var useXAxisDatePlugin = function () {
14259
- var chartPlugin = {
14253
+ var chartPlugin = useMemo(function () { return ({
14260
14254
  id: "xAxisDatePlugin",
14261
14255
  afterBuildTicks: function (chart) {
14262
14256
  var oldTicks = chart.scales.x.ticks;
@@ -14282,14 +14276,14 @@ var useXAxisDatePlugin = function () {
14282
14276
  }
14283
14277
  chart.scales.x.ticks = newTicks;
14284
14278
  },
14285
- };
14279
+ }); }, []);
14286
14280
  return chartPlugin;
14287
14281
  };
14288
14282
 
14289
14283
  var useYAxisPlugin = function () {
14290
- var chartPlugin = {
14284
+ var chartPlugin = useMemo(function () { return ({
14291
14285
  id: "yAxisPlugin",
14292
- };
14286
+ }); }, []);
14293
14287
  return chartPlugin;
14294
14288
  };
14295
14289
 
@@ -14311,7 +14305,7 @@ var areRangesSimilar = function (tag1, tag2) {
14311
14305
  return isSignificantOverlap;
14312
14306
  };
14313
14307
 
14314
- var TrendingChart = function (_a) {
14308
+ var TrendingChart = React__default.memo(function (_a) {
14315
14309
  var series = _a.series, chartOptions = _a.chartOptions, setChartOptions = _a.setChartOptions, chartData = _a.chartData, setCursorData = _a.setCursorData, setChartData = _a.setChartData;
14316
14310
  var _b = useTrendingContext(), state = _b.state, viewTags = _b.state.viewTags; _b.actions;
14317
14311
  var _c = useState(null), lineTabCoords = _c[0], setLineTabCoords = _c[1];
@@ -14365,9 +14359,9 @@ var TrendingChart = function (_a) {
14365
14359
  id: "y-axis-".concat(axis.TagId),
14366
14360
  type: "linear",
14367
14361
  display: axis.IsVisible,
14368
- scaleLabel: {
14362
+ title: {
14369
14363
  display: true,
14370
- labelString: axis.TagName,
14364
+ text: axis.TagName,
14371
14365
  },
14372
14366
  min: axis.IsAutoScale ? undefined : min,
14373
14367
  max: axis.IsAutoScale ? undefined : max,
@@ -14433,13 +14427,18 @@ var TrendingChart = function (_a) {
14433
14427
  });
14434
14428
  }, 1000));
14435
14429
  var _e = useState(false), chartShouldInitCursors = _e[0], setChartShouldInitCursors = _e[1];
14436
- var verticalLinePlugin = useGetVerticalLinePlugin(setChartArea, setLineTabCoords);
14430
+ var memoizedSetChartArea = useCallback(function (area) { return setChartArea(area); }, []);
14431
+ var memoizedSetLineTabCoords = useCallback(function (coords) { return setLineTabCoords(coords); }, []);
14432
+ var verticalLinePlugin = useGetVerticalLinePlugin(memoizedSetChartArea, memoizedSetLineTabCoords);
14437
14433
  var xAxisDatePlugin = useXAxisDatePlugin();
14438
14434
  var yAxisPlugin = useYAxisPlugin();
14435
+ var plugins = useMemo(function () { return [verticalLinePlugin, xAxisDatePlugin, yAxisPlugin]; }, [verticalLinePlugin, xAxisDatePlugin, yAxisPlugin]);
14439
14436
  var seriesVsTags = useRef({});
14440
14437
  useEffect(function () {
14438
+ // Only run debounced update when series data actually changes
14439
+ // Display property changes (color, visibility, scales) are handled by immediate useEffects
14441
14440
  debouncedUpdateChartBasedOnData.current();
14442
- }, [state.graphShouldUpdate, series]);
14441
+ }, [series]); // Removed state.graphShouldUpdate to prevent running on display-only changes
14443
14442
  useEffect(function () {
14444
14443
  if (chartShouldInitCursors) {
14445
14444
  if (chartRef.current) {
@@ -14448,6 +14447,85 @@ var TrendingChart = function (_a) {
14448
14447
  }
14449
14448
  }
14450
14449
  }, [chartShouldInitCursors, state.graphShouldUpdate]);
14450
+ // Update colors and visibility immediately without debounce
14451
+ useEffect(function () {
14452
+ setChartData(function (prevData) {
14453
+ if (!prevData.datasets || !prevData.datasets.length)
14454
+ return prevData;
14455
+ var updatedDatasets = prevData.datasets.map(function (dataset) {
14456
+ var tag = viewTags[dataset.tagId];
14457
+ if (tag) {
14458
+ return __assign(__assign({}, dataset), { borderColor: tag.viewTag.Color, hidden: !tag.viewTag.IsVisible });
14459
+ }
14460
+ return dataset;
14461
+ });
14462
+ return __assign(__assign({}, prevData), { datasets: updatedDatasets });
14463
+ });
14464
+ }, [viewTags, setChartData]);
14465
+ // Update Y-axis scales immediately when AutoScale or Min/Max changes
14466
+ useEffect(function () {
14467
+ var axes = [];
14468
+ Object.values(viewTags).forEach(function (_a) {
14469
+ var tag = _a.viewTag;
14470
+ var existingAxis = axes.findIndex(function (existingTag) {
14471
+ return areRangesSimilar(existingTag, tag);
14472
+ });
14473
+ if (existingAxis === -1) {
14474
+ axes.push(tag);
14475
+ }
14476
+ });
14477
+ var yAxesConfig = axes.map(function (axis) {
14478
+ var min = Number(axis.MinScale);
14479
+ var max = Number(axis.MaxScale);
14480
+ if (!min && !max) {
14481
+ max = 1;
14482
+ }
14483
+ return {
14484
+ id: "y-axis-".concat(axis.TagId),
14485
+ type: "linear",
14486
+ display: axis.IsVisible,
14487
+ title: {
14488
+ display: true,
14489
+ text: axis.TagName,
14490
+ },
14491
+ min: axis.IsAutoScale ? undefined : min,
14492
+ max: axis.IsAutoScale ? undefined : max,
14493
+ suggestedMin: axis.IsAutoScale ? undefined : min,
14494
+ suggestedMax: axis.IsAutoScale ? undefined : max,
14495
+ stepSize: 10,
14496
+ grid: {
14497
+ display: true,
14498
+ },
14499
+ afterUpdate: function (a) {
14500
+ var chart = a.chart;
14501
+ var keys = Object.keys(chart.scales).filter(function (sc) { return sc !== "x"; });
14502
+ var counterOfDefaultsScales = 0;
14503
+ if (keys.length > 1) {
14504
+ for (var scaleKey in chart.scales) {
14505
+ var scale = chart.scales[scaleKey];
14506
+ if (scale.max === 1 && scale.min === 0) {
14507
+ chart.scales[scaleKey].display = false;
14508
+ chart.scales[scaleKey].options.display = false;
14509
+ counterOfDefaultsScales++;
14510
+ }
14511
+ else {
14512
+ chart.scales[scaleKey].display = true;
14513
+ chart.scales[scaleKey].options.display = true;
14514
+ }
14515
+ if (counterOfDefaultsScales === keys.length) {
14516
+ chart.scales[keys[0]].display = true;
14517
+ chart.scales[keys[0]].options.display = true;
14518
+ }
14519
+ }
14520
+ }
14521
+ },
14522
+ };
14523
+ });
14524
+ setChartOptions(function (prevOptions) { return (__assign(__assign({}, prevOptions), { scales: __assign({ x: __assign({}, prevOptions.scales.x) }, yAxesConfig.reduce(function (acc, cur) {
14525
+ var _a;
14526
+ return (__assign(__assign({}, acc), (_a = {}, _a[cur.id] = cur, _a)));
14527
+ }, {})) })); });
14528
+ }, [viewTags, setChartOptions]);
14451
14529
  return (React__default.createElement(Paper, { style: { height: "100%", position: "relative" } },
14452
14530
  lineTabCoords && chartArea ? (React__default.createElement(DraggableLineControl, { color: "red", chartArea: chartArea, initialLeft: lineTabCoords === null || lineTabCoords === void 0 ? void 0 : lineTabCoords.x1, otherLineCoord: lineTabCoords === null || lineTabCoords === void 0 ? void 0 : lineTabCoords.x2, onUpdate: function (newLeft) {
14453
14531
  setLineTabCoords(function (prevCoords) {
@@ -14467,11 +14545,12 @@ var TrendingChart = function (_a) {
14467
14545
  chartRef.current.secondLineX = newLeft;
14468
14546
  debouncedUpdateChart.current();
14469
14547
  } })) : null,
14470
- React__default.createElement(Line, { ref: chartRef, data: chartData, options: chartOptions, plugins: [verticalLinePlugin, xAxisDatePlugin, yAxisPlugin] })));
14471
- };
14548
+ React__default.createElement(Line, { ref: chartRef, data: chartData, options: chartOptions, plugins: plugins })));
14549
+ });
14550
+ TrendingChart.displayName = "TrendingChart";
14472
14551
 
14473
14552
  Chart.register(CategoryScale, LinearScale, PointElement, LineElement, Title, Tooltip$1, Legend, TimeScale, zoomPlugin);
14474
- var Trending = function (_a) {
14553
+ var Trending = React__default.memo(function (_a) {
14475
14554
  _a.title; var autoRefresh = _a.autoRefresh, setAutoRefresh = _a.setAutoRefresh;
14476
14555
  var _b = useTrendingContext(), state = _b.state, _c = _b.state, viewTags = _c.viewTags; _c.shouldRefetchSeries;
14477
14556
  var _d = useState(""), error = _d[0], setError = _d[1];
@@ -14529,7 +14608,8 @@ var Trending = function (_a) {
14529
14608
  React__default.createElement(CircularProgress, { size: "2rem" }))),
14530
14609
  React__default.createElement(TableComponent, { chartData: chartData, cursorData: cursorData, viewTagForDelete: viewTagForDelete, setViewTagForDelete: setViewTagForDelete, selectedRowTagId: selectedRowTagId, setSelectedRowTagId: setSelectedRowTagId }))),
14531
14610
  React__default.createElement(ErrorModal, { error: error, onHide: function () { return setError(""); }, title: "ERROR" })));
14532
- };
14611
+ });
14612
+ Trending.displayName = "Trending";
14533
14613
 
14534
14614
  var searchViews = function (_a) {
14535
14615
  var _b = _a.autoRefresh, autoRefresh = _b === void 0 ? false : _b;
@@ -14563,23 +14643,30 @@ var searchSeries = function (_a) {
14563
14643
  var start = _a.start, end = _a.end, tagIds = _a.tagIds, _b = _a.autoRefresh, autoRefresh = _b === void 0 ? false : _b;
14564
14644
  return useQuery({
14565
14645
  queryKey: ["series", start, end, tagIds],
14566
- queryFn: function () { return __awaiter(void 0, void 0, void 0, function () {
14646
+ queryFn: function (_a) { return __awaiter(void 0, [_a], void 0, function (_b) {
14567
14647
  var resp, error_1;
14568
- return __generator(this, function (_a) {
14569
- switch (_a.label) {
14648
+ var signal = _b.signal;
14649
+ return __generator(this, function (_c) {
14650
+ switch (_c.label) {
14570
14651
  case 0:
14571
- _a.trys.push([0, 2, , 3]);
14652
+ _c.trys.push([0, 2, , 3]);
14572
14653
  return [4 /*yield*/, axios.post("/series?nodeName=null", {
14573
14654
  start: start,
14574
14655
  end: end ? end : new Date().getTime(),
14575
14656
  tagIds: tagIds,
14576
14657
  sampleCount: 1000,
14658
+ }, {
14659
+ signal: signal,
14577
14660
  })];
14578
14661
  case 1:
14579
- resp = _a.sent();
14662
+ resp = _c.sent();
14580
14663
  return [2 /*return*/, get(resp, "data", [])];
14581
14664
  case 2:
14582
- error_1 = _a.sent();
14665
+ error_1 = _c.sent();
14666
+ // Ignore abort errors
14667
+ if (axios.isCancel(error_1) || error_1.name === "AbortError") {
14668
+ return [2 /*return*/, []];
14669
+ }
14583
14670
  throw new Error(getError(error_1));
14584
14671
  case 3: return [2 /*return*/];
14585
14672
  }
@@ -17675,5 +17762,5 @@ var areaSelector = /*#__PURE__*/Object.freeze({
17675
17762
  AreaSelector: AreaSelector
17676
17763
  });
17677
17764
 
17678
- export { Account, AssetProvider, AssetTreePicker, AuthContext, AuthProvider, BarChartControl, ButtonWithLoading, ChangePassword, CheckBoxControl, Configuration$1 as Configuration, ContextMenu$1 as ContextMenu, ContextMenuMESFProvider, CreateNewAssetDialog, CurrencyFormatter, DataGridControl, DateFormatter, DateTimeFormatter, EditAssetDialog, ErrorModal, FetchError, FilterPanel, GenericPanel, GenericTable, GetCrewColor, GetShiftColor, HelmetDexteel, IntegerFormatter, LogbookSettingsInitialState, LogbookSettingsProvider, Login, Logout, LongFilterPanel, MESApiService, MESFLogbookEntry, MESFLogbookReport, MESFMain, MESSAGE_API, MESSAGE_ERRORS, MasterDetailPanel, MesfModal, ModalTreeFilterControl, MultipleSelectorControl, NumberFormatter, RemoveAssetDialog, ShiftDayNavigatorControl, ShiftNavigatorProvider, ShiftPeriodNavigatorControl, SimplePasswordControl, SimpleSelectorControl, TimeAndUserMenu, TimeFormatter, TimeService, TreePickerControl, TreePickerControlV2, TrendingsPage, USER_LABELS, UTLSettingsProvider, UserProvider, axiosInstance, deleteUser, dxtServerTimeZone, dxtToLocalServerTime, dxtToUTC, formatNumber, getAuthTypes, getCrewStyle, getDataUser, getError, getMomentTz, getShiftByParameters, getShiftStyle, getShiftsRangeByParameters, getTokenFromLS, getUserPermissionsFromAPI, getUsers, logbookNavbar, logbookRoutesMESF, renewToken, routeLogbookEntry, routeLogbookReport, searchAssets, searchSeries, searchTagsTree, searchViewTags, searchViews, setPassword, setProfilesToUser, themeDXT, themeMESF, upsertUser, useAssetContext, useContextMenuMESF, useHasPermission, useHasProfile, useLogbookSettings, useMesfRealtime, useShiftNavigator, useShiftNavigatorManager, useStyles$i as useStyles, useToken, useUTLSettingsContext, useUserContext };
17765
+ export { Account, AssetProvider, AssetTreePicker, AuthContext, AuthProvider, BarChartControl, ButtonWithLoading, ChangePassword, CheckBoxControl, Configuration$1 as Configuration, ContextMenu$1 as ContextMenu, ContextMenuMESFProvider, CreateNewAssetDialog, CurrencyFormatter, DataGridControl, DateFormatter, DateTimeFormatter, ENTRY_INITIAL_VALUES, EditAssetDialog, ErrorModal, FetchError, FilterPanel, GenericPanel, GenericTable, GetCrewColor, GetShiftColor, HelmetDexteel, IntegerFormatter, LogbookSettingsInitialState, LogbookSettingsProvider, Login, Logout, LongFilterPanel, MESApiService, MESFLogbookEntry, MESFLogbookReport, MESFMain, MESSAGE_API, MESSAGE_ERRORS, MasterDetailPanel, MesfModal, ModalTreeFilterControl, MultipleSelectorControl, NumberFormatter, RemoveAssetDialog, ShiftDayNavigatorControl, ShiftNavigatorProvider, ShiftPeriodNavigatorControl, SimplePasswordControl, SimpleSelectorControl, TimeAndUserMenu, TimeFormatter, TimeService, TreePickerControl, TreePickerControlV2, TrendingsPage, USER_LABELS, UTLSettingsProvider, UserProvider, axiosInstance, deleteUser, dxtServerTimeZone, dxtToLocalServerTime, dxtToUTC, formatNumber, getAuthTypes, getCrewStyle, getDataUser, getEntries, getError, getMomentTz, getShiftByParameters, getShiftStyle, getShiftsRangeByParameters, getTokenFromLS, getUserPermissionsFromAPI, getUsers, logbookNavbar, logbookRoutesMESF, renewToken, routeLogbookEntry, routeLogbookReport, searchAssets, searchSeries, searchTagsTree, searchViewTags, searchViews, setPassword, setProfilesToUser, themeDXT, themeMESF, upsertUser, useAssetContext, useContextMenuMESF, useHasPermission, useHasProfile, useLogbookSettings, useMesfRealtime, useShiftNavigator, useShiftNavigatorManager, useStyles$i as useStyles, useToken, useUTLSettingsContext, useUserContext };
17679
17766
  //# sourceMappingURL=index.esm.js.map