@flexem/fc-gui 3.0.0-alpha.76 → 3.0.0-alpha.77

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.
@@ -34,6 +34,7 @@ export class AlarmElement extends ConditionalDisplayElement {
34
34
  this.variableCommunicator = variableCommunicator;
35
35
  this.timePeriods = this.getValidTimePeriods();
36
36
  this.pageSize = this.model.generalSetting.pageSize;
37
+ localStorage.setItem('simulate-time', moment().valueOf() + '');
37
38
  if (this.model.filterSetting) {
38
39
  this.alarmNames = this.model.filterSetting.detailsData.map(item => item.name);
39
40
  this.currentTimePeriod = (_a = this.model.filterSetting) === null || _a === void 0 ? void 0 : _a.displayPeriod;
@@ -287,8 +288,10 @@ export class AlarmElement extends ConditionalDisplayElement {
287
288
  }
288
289
  }
289
290
  loadFirstPage() {
290
- this.page = 0;
291
- this.init();
291
+ if (this.page > 0) {
292
+ this.page = 0;
293
+ this.init();
294
+ }
292
295
  }
293
296
  loadNextPage() {
294
297
  let last_page = Math.ceil(this.totalCount / this.pageSize);
@@ -296,20 +299,22 @@ export class AlarmElement extends ConditionalDisplayElement {
296
299
  last_page--;
297
300
  if (this.page < last_page) {
298
301
  this.page++;
302
+ this.init();
299
303
  }
300
- this.init();
301
304
  }
302
305
  loadPreviousPage() {
303
306
  if (this.page > 0) {
304
307
  this.page--;
308
+ this.init();
305
309
  }
306
- this.init();
307
310
  }
308
311
  loadLastPage() {
309
312
  let last_page = Math.ceil(this.totalCount / this.pageSize);
310
313
  if (last_page)
311
314
  last_page--;
312
- this.page = last_page;
313
- this.init();
315
+ if (this.page !== last_page) {
316
+ this.page = last_page;
317
+ this.init();
318
+ }
314
319
  }
315
320
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "main": "bundles/fc-gui.umd.js",
3
- "version": "3.0.0-alpha.76",
3
+ "version": "3.0.0-alpha.77",
4
4
  "module": "public_api.js",
5
5
  "typings": "public_api.d.ts",
6
6
  "license": "UNLICENSED",