@flexem/fc-gui 3.0.0-alpha.120 → 3.0.0-alpha.121

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.
@@ -22011,7 +22011,8 @@ GuiConsts.components = {
22011
22011
  tableKey: 'Table',
22012
22012
  weatherKey: 'Weather',
22013
22013
  airQualityKey: 'AirQualityIndex',
22014
- alarmKey: 'Alarm'
22014
+ alarmKey: 'Alarm',
22015
+ scrollAlarmKey: 'ScrollAlarm'
22015
22016
  };
22016
22017
 
22017
22018
  // EXTERNAL MODULE: ./.tmp/shared/graph-extended-style.ts
@@ -22114,7 +22115,7 @@ class ConsoleLoggerService {
22114
22115
 
22115
22116
  "use strict";
22116
22117
  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return VariableUtil; });
22117
- /* harmony import */ var _config__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(13);
22118
+ /* harmony import */ var _config__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(11);
22118
22119
 
22119
22120
  class VariableUtil {
22120
22121
  static getConvertedVariableName(variableStore, variable) {
@@ -22229,6 +22230,170 @@ class VariableDefinition {
22229
22230
  /* 11 */
22230
22231
  /***/ (function(module, __webpack_exports__, __webpack_require__) {
22231
22232
 
22233
+ "use strict";
22234
+
22235
+ // EXTERNAL MODULE: ./.tmp/config/config-store.ts
22236
+ var config_store = __webpack_require__(252);
22237
+
22238
+ // CONCATENATED MODULE: ./.tmp/config/graph/graph.ts
22239
+ class Graph {
22240
+ constructor(graphType, source) {
22241
+ this.graphType = graphType;
22242
+ this.source = source;
22243
+ }
22244
+ }
22245
+
22246
+ // CONCATENATED MODULE: ./.tmp/config/graph/graph-result.ts
22247
+ class GraphResult {
22248
+ constructor(graph, failed) {
22249
+ this.graph = graph;
22250
+ this.failed = failed;
22251
+ }
22252
+ static failed() {
22253
+ return GraphResult.failedResult;
22254
+ }
22255
+ static success(graph) {
22256
+ return new GraphResult(graph);
22257
+ }
22258
+ }
22259
+ GraphResult.failedResult = new GraphResult(null, true);
22260
+
22261
+ // CONCATENATED MODULE: ./.tmp/config/graph/graph-type.ts
22262
+ var GraphType;
22263
+ (function (GraphType) {
22264
+ GraphType[GraphType["SVG"] = 0] = "SVG";
22265
+ GraphType[GraphType["Image"] = 1] = "Image";
22266
+ })(GraphType || (GraphType = {}));
22267
+
22268
+ // EXTERNAL MODULE: ./.tmp/config/graph/graph-store.ts
22269
+ var graph_store = __webpack_require__(251);
22270
+
22271
+ // EXTERNAL MODULE: ./.tmp/config/view/view-store.ts
22272
+ var view_store = __webpack_require__(250);
22273
+
22274
+ // EXTERNAL MODULE: ./.tmp/config/view/view.model.ts
22275
+ var view_model = __webpack_require__(30);
22276
+
22277
+ // EXTERNAL MODULE: ./.tmp/config/image/image-store.ts
22278
+ var image_store = __webpack_require__(249);
22279
+
22280
+ // EXTERNAL MODULE: ./.tmp/config/history-data/history-data.store.ts
22281
+ var history_data_store = __webpack_require__(248);
22282
+
22283
+ // CONCATENATED MODULE: ./.tmp/config/history-data/history-data.model.ts
22284
+ class HistoryDataModel {
22285
+ constructor(error, isUnbind, values) {
22286
+ this.error = error;
22287
+ this.isUnbind = isUnbind;
22288
+ this.values = values;
22289
+ }
22290
+ }
22291
+
22292
+ // CONCATENATED MODULE: ./.tmp/config/history-data/history-data-value.ts
22293
+ class HistoryDataValue {
22294
+ constructor(time, values) {
22295
+ this.time = time;
22296
+ this.values = values;
22297
+ }
22298
+ }
22299
+
22300
+ // CONCATENATED MODULE: ./.tmp/config/history-data/get-history-data-args.ts
22301
+ class GetHistoryDataArgs {
22302
+ /**
22303
+ * 获取历史数据参数
22304
+ * @param dataSourceCode 数据源编码
22305
+ * @param dataItemName 历史数据条目名称
22306
+ * @param channelNames 通道名称
22307
+ * @param startTime 开始时间
22308
+ * @param endTime 结束时间
22309
+ * @param limit 获取数据数量,为负数则倒叙
22310
+ * @param rangeType 区间类型
22311
+ */
22312
+ constructor(dataSourceCode, dataItemName, channelNames, startTime, endTime, limit, rangeType) {
22313
+ this.dataSourceCode = dataSourceCode;
22314
+ this.dataItemName = dataItemName;
22315
+ this.channelNames = channelNames;
22316
+ this.startTime = startTime;
22317
+ this.endTime = endTime;
22318
+ this.limit = limit;
22319
+ this.rangeType = rangeType;
22320
+ }
22321
+ }
22322
+
22323
+ // CONCATENATED MODULE: ./.tmp/config/history-data/index.ts
22324
+
22325
+
22326
+
22327
+
22328
+
22329
+ // EXTERNAL MODULE: ./.tmp/config/variable/variable-store.ts
22330
+ var variable_store = __webpack_require__(247);
22331
+
22332
+ // CONCATENATED MODULE: ./.tmp/config/variable/get-variable-name-args.ts
22333
+ class GetVariableNameArgs {
22334
+ constructor(name, groupName, code) {
22335
+ this.name = name;
22336
+ this.groupName = groupName;
22337
+ this.code = code;
22338
+ }
22339
+ }
22340
+
22341
+ // CONCATENATED MODULE: ./.tmp/config/variable/index.ts
22342
+
22343
+
22344
+
22345
+ // EXTERNAL MODULE: ./.tmp/config/alarm/alarm.store.ts
22346
+ var alarm_store = __webpack_require__(246);
22347
+
22348
+ // CONCATENATED MODULE: ./.tmp/config/alarm/get-alarms-args.ts
22349
+ class GetAlarmsArgs {
22350
+ constructor(alarmNames, triggeredStartTime, triggeredEndTime, maxResultCount, skipCount) {
22351
+ this.alarmNames = alarmNames;
22352
+ this.triggeredStartTime = triggeredStartTime;
22353
+ this.triggeredEndTime = triggeredEndTime;
22354
+ this.maxResultCount = maxResultCount;
22355
+ this.skipCount = skipCount;
22356
+ }
22357
+ }
22358
+
22359
+ // CONCATENATED MODULE: ./.tmp/config/alarm/index.ts
22360
+
22361
+
22362
+
22363
+ // CONCATENATED MODULE: ./.tmp/config/index.ts
22364
+ /* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "b", function() { return config_store["ConfigStore"]; });
22365
+ /* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "f", function() { return Graph; });
22366
+ /* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "g", function() { return GraphResult; });
22367
+ /* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "i", function() { return GraphType; });
22368
+ /* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "h", function() { return graph_store["GraphStore"]; });
22369
+ /* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "p", function() { return view_store["ViewStore"]; });
22370
+ /* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "o", function() { return view_model["a" /* ViewModel */]; });
22371
+ /* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "m", function() { return image_store["ImageStore"]; });
22372
+ /* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "k", function() { return history_data_store["HistoryDataStore"]; });
22373
+ /* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "j", function() { return HistoryDataModel; });
22374
+ /* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "l", function() { return HistoryDataValue; });
22375
+ /* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "d", function() { return GetHistoryDataArgs; });
22376
+ /* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "n", function() { return variable_store["VariableStore"]; });
22377
+ /* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "e", function() { return GetVariableNameArgs; });
22378
+ /* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "a", function() { return alarm_store["AlarmsStore"]; });
22379
+ /* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "c", function() { return GetAlarmsArgs; });
22380
+
22381
+
22382
+
22383
+
22384
+
22385
+
22386
+
22387
+
22388
+
22389
+
22390
+
22391
+
22392
+
22393
+ /***/ }),
22394
+ /* 12 */
22395
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
22396
+
22232
22397
  "use strict";
22233
22398
  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return VariableValueType; });
22234
22399
  var VariableValueType;
@@ -22239,7 +22404,7 @@ var VariableValueType;
22239
22404
 
22240
22405
 
22241
22406
  /***/ }),
22242
- /* 12 */
22407
+ /* 13 */
22243
22408
  /***/ (function(module, __webpack_exports__, __webpack_require__) {
22244
22409
 
22245
22410
  "use strict";
@@ -22450,170 +22615,6 @@ function __importDefault(mod) {
22450
22615
  }
22451
22616
 
22452
22617
 
22453
- /***/ }),
22454
- /* 13 */
22455
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
22456
-
22457
- "use strict";
22458
-
22459
- // EXTERNAL MODULE: ./.tmp/config/config-store.ts
22460
- var config_store = __webpack_require__(252);
22461
-
22462
- // CONCATENATED MODULE: ./.tmp/config/graph/graph.ts
22463
- class Graph {
22464
- constructor(graphType, source) {
22465
- this.graphType = graphType;
22466
- this.source = source;
22467
- }
22468
- }
22469
-
22470
- // CONCATENATED MODULE: ./.tmp/config/graph/graph-result.ts
22471
- class GraphResult {
22472
- constructor(graph, failed) {
22473
- this.graph = graph;
22474
- this.failed = failed;
22475
- }
22476
- static failed() {
22477
- return GraphResult.failedResult;
22478
- }
22479
- static success(graph) {
22480
- return new GraphResult(graph);
22481
- }
22482
- }
22483
- GraphResult.failedResult = new GraphResult(null, true);
22484
-
22485
- // CONCATENATED MODULE: ./.tmp/config/graph/graph-type.ts
22486
- var GraphType;
22487
- (function (GraphType) {
22488
- GraphType[GraphType["SVG"] = 0] = "SVG";
22489
- GraphType[GraphType["Image"] = 1] = "Image";
22490
- })(GraphType || (GraphType = {}));
22491
-
22492
- // EXTERNAL MODULE: ./.tmp/config/graph/graph-store.ts
22493
- var graph_store = __webpack_require__(251);
22494
-
22495
- // EXTERNAL MODULE: ./.tmp/config/view/view-store.ts
22496
- var view_store = __webpack_require__(250);
22497
-
22498
- // EXTERNAL MODULE: ./.tmp/config/view/view.model.ts
22499
- var view_model = __webpack_require__(30);
22500
-
22501
- // EXTERNAL MODULE: ./.tmp/config/image/image-store.ts
22502
- var image_store = __webpack_require__(249);
22503
-
22504
- // EXTERNAL MODULE: ./.tmp/config/history-data/history-data.store.ts
22505
- var history_data_store = __webpack_require__(248);
22506
-
22507
- // CONCATENATED MODULE: ./.tmp/config/history-data/history-data.model.ts
22508
- class HistoryDataModel {
22509
- constructor(error, isUnbind, values) {
22510
- this.error = error;
22511
- this.isUnbind = isUnbind;
22512
- this.values = values;
22513
- }
22514
- }
22515
-
22516
- // CONCATENATED MODULE: ./.tmp/config/history-data/history-data-value.ts
22517
- class HistoryDataValue {
22518
- constructor(time, values) {
22519
- this.time = time;
22520
- this.values = values;
22521
- }
22522
- }
22523
-
22524
- // CONCATENATED MODULE: ./.tmp/config/history-data/get-history-data-args.ts
22525
- class GetHistoryDataArgs {
22526
- /**
22527
- * 获取历史数据参数
22528
- * @param dataSourceCode 数据源编码
22529
- * @param dataItemName 历史数据条目名称
22530
- * @param channelNames 通道名称
22531
- * @param startTime 开始时间
22532
- * @param endTime 结束时间
22533
- * @param limit 获取数据数量,为负数则倒叙
22534
- * @param rangeType 区间类型
22535
- */
22536
- constructor(dataSourceCode, dataItemName, channelNames, startTime, endTime, limit, rangeType) {
22537
- this.dataSourceCode = dataSourceCode;
22538
- this.dataItemName = dataItemName;
22539
- this.channelNames = channelNames;
22540
- this.startTime = startTime;
22541
- this.endTime = endTime;
22542
- this.limit = limit;
22543
- this.rangeType = rangeType;
22544
- }
22545
- }
22546
-
22547
- // CONCATENATED MODULE: ./.tmp/config/history-data/index.ts
22548
-
22549
-
22550
-
22551
-
22552
-
22553
- // EXTERNAL MODULE: ./.tmp/config/variable/variable-store.ts
22554
- var variable_store = __webpack_require__(247);
22555
-
22556
- // CONCATENATED MODULE: ./.tmp/config/variable/get-variable-name-args.ts
22557
- class GetVariableNameArgs {
22558
- constructor(name, groupName, code) {
22559
- this.name = name;
22560
- this.groupName = groupName;
22561
- this.code = code;
22562
- }
22563
- }
22564
-
22565
- // CONCATENATED MODULE: ./.tmp/config/variable/index.ts
22566
-
22567
-
22568
-
22569
- // EXTERNAL MODULE: ./.tmp/config/alarm/alarm.store.ts
22570
- var alarm_store = __webpack_require__(246);
22571
-
22572
- // CONCATENATED MODULE: ./.tmp/config/alarm/get-alarms-args.ts
22573
- class GetAlarmsArgs {
22574
- constructor(alarmNames, triggeredStartTime, triggeredEndTime, maxResultCount, skipCount) {
22575
- this.alarmNames = alarmNames;
22576
- this.triggeredStartTime = triggeredStartTime;
22577
- this.triggeredEndTime = triggeredEndTime;
22578
- this.maxResultCount = maxResultCount;
22579
- this.skipCount = skipCount;
22580
- }
22581
- }
22582
-
22583
- // CONCATENATED MODULE: ./.tmp/config/alarm/index.ts
22584
-
22585
-
22586
-
22587
- // CONCATENATED MODULE: ./.tmp/config/index.ts
22588
- /* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "b", function() { return config_store["ConfigStore"]; });
22589
- /* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "f", function() { return Graph; });
22590
- /* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "g", function() { return GraphResult; });
22591
- /* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "i", function() { return GraphType; });
22592
- /* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "h", function() { return graph_store["GraphStore"]; });
22593
- /* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "p", function() { return view_store["ViewStore"]; });
22594
- /* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "o", function() { return view_model["a" /* ViewModel */]; });
22595
- /* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "m", function() { return image_store["ImageStore"]; });
22596
- /* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "k", function() { return history_data_store["HistoryDataStore"]; });
22597
- /* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "j", function() { return HistoryDataModel; });
22598
- /* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "l", function() { return HistoryDataValue; });
22599
- /* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "d", function() { return GetHistoryDataArgs; });
22600
- /* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "n", function() { return variable_store["VariableStore"]; });
22601
- /* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "e", function() { return GetVariableNameArgs; });
22602
- /* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "a", function() { return alarm_store["AlarmsStore"]; });
22603
- /* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "c", function() { return GetAlarmsArgs; });
22604
-
22605
-
22606
-
22607
-
22608
-
22609
-
22610
-
22611
-
22612
-
22613
-
22614
-
22615
-
22616
-
22617
22618
  /***/ }),
22618
22619
  /* 14 */
22619
22620
  /***/ (function(module, __webpack_exports__, __webpack_require__) {
@@ -22700,7 +22701,7 @@ function pipeFromArray(fns) {
22700
22701
  //# sourceMappingURL=pipe.js.map
22701
22702
 
22702
22703
  // EXTERNAL MODULE: ./node_modules/rxjs/_esm5/internal/config.js
22703
- var config = __webpack_require__(22);
22704
+ var config = __webpack_require__(23);
22704
22705
 
22705
22706
  // CONCATENATED MODULE: ./node_modules/rxjs/_esm5/internal/Observable.js
22706
22707
  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return Observable_Observable; });
@@ -23114,219 +23115,6 @@ AlertModalComponent = __decorate([
23114
23115
 
23115
23116
  /***/ }),
23116
23117
  /* 21 */
23117
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
23118
-
23119
- "use strict";
23120
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return RelationType; });
23121
- var RelationType;
23122
- (function (RelationType) {
23123
- RelationType[RelationType["None"] = 0] = "None";
23124
- RelationType[RelationType["And"] = 1] = "And";
23125
- RelationType[RelationType["Or"] = 2] = "Or";
23126
- })(RelationType || (RelationType = {}));
23127
-
23128
-
23129
- /***/ }),
23130
- /* 22 */
23131
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
23132
-
23133
- "use strict";
23134
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return config; });
23135
- /** PURE_IMPORTS_START PURE_IMPORTS_END */
23136
- var _enable_super_gross_mode_that_will_cause_bad_things = false;
23137
- var config = {
23138
- Promise: undefined,
23139
- set useDeprecatedSynchronousErrorHandling(value) {
23140
- if (value) {
23141
- var error = /*@__PURE__*/ new Error();
23142
- /*@__PURE__*/ console.warn('DEPRECATED! RxJS was set to use deprecated synchronous error handling behavior by code at: \n' + error.stack);
23143
- }
23144
- else if (_enable_super_gross_mode_that_will_cause_bad_things) {
23145
- /*@__PURE__*/ console.log('RxJS: Back to a better error behavior. Thank you. <3');
23146
- }
23147
- _enable_super_gross_mode_that_will_cause_bad_things = value;
23148
- },
23149
- get useDeprecatedSynchronousErrorHandling() {
23150
- return _enable_super_gross_mode_that_will_cause_bad_things;
23151
- },
23152
- };
23153
- //# sourceMappingURL=config.js.map
23154
-
23155
-
23156
- /***/ }),
23157
- /* 23 */
23158
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
23159
-
23160
- "use strict";
23161
-
23162
- // EXTERNAL MODULE: ./node_modules/rxjs/_esm5/internal/util/isArray.js
23163
- var isArray = __webpack_require__(55);
23164
-
23165
- // EXTERNAL MODULE: ./node_modules/rxjs/_esm5/internal/util/isObject.js
23166
- var isObject = __webpack_require__(271);
23167
-
23168
- // EXTERNAL MODULE: ./node_modules/rxjs/_esm5/internal/util/isFunction.js
23169
- var isFunction = __webpack_require__(51);
23170
-
23171
- // CONCATENATED MODULE: ./node_modules/rxjs/_esm5/internal/util/UnsubscriptionError.js
23172
- /** PURE_IMPORTS_START PURE_IMPORTS_END */
23173
- var UnsubscriptionErrorImpl = /*@__PURE__*/ (function () {
23174
- function UnsubscriptionErrorImpl(errors) {
23175
- Error.call(this);
23176
- this.message = errors ?
23177
- errors.length + " errors occurred during unsubscription:\n" + errors.map(function (err, i) { return i + 1 + ") " + err.toString(); }).join('\n ') : '';
23178
- this.name = 'UnsubscriptionError';
23179
- this.errors = errors;
23180
- return this;
23181
- }
23182
- UnsubscriptionErrorImpl.prototype = /*@__PURE__*/ Object.create(Error.prototype);
23183
- return UnsubscriptionErrorImpl;
23184
- })();
23185
- var UnsubscriptionError = UnsubscriptionErrorImpl;
23186
- //# sourceMappingURL=UnsubscriptionError.js.map
23187
-
23188
- // CONCATENATED MODULE: ./node_modules/rxjs/_esm5/internal/Subscription.js
23189
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return Subscription_Subscription; });
23190
- /** PURE_IMPORTS_START _util_isArray,_util_isObject,_util_isFunction,_util_UnsubscriptionError PURE_IMPORTS_END */
23191
-
23192
-
23193
-
23194
-
23195
- var Subscription_Subscription = /*@__PURE__*/ (function () {
23196
- function Subscription(unsubscribe) {
23197
- this.closed = false;
23198
- this._parentOrParents = null;
23199
- this._subscriptions = null;
23200
- if (unsubscribe) {
23201
- this._unsubscribe = unsubscribe;
23202
- }
23203
- }
23204
- Subscription.prototype.unsubscribe = function () {
23205
- var errors;
23206
- if (this.closed) {
23207
- return;
23208
- }
23209
- var _a = this, _parentOrParents = _a._parentOrParents, _unsubscribe = _a._unsubscribe, _subscriptions = _a._subscriptions;
23210
- this.closed = true;
23211
- this._parentOrParents = null;
23212
- this._subscriptions = null;
23213
- if (_parentOrParents instanceof Subscription) {
23214
- _parentOrParents.remove(this);
23215
- }
23216
- else if (_parentOrParents !== null) {
23217
- for (var index = 0; index < _parentOrParents.length; ++index) {
23218
- var parent_1 = _parentOrParents[index];
23219
- parent_1.remove(this);
23220
- }
23221
- }
23222
- if (Object(isFunction["a" /* isFunction */])(_unsubscribe)) {
23223
- try {
23224
- _unsubscribe.call(this);
23225
- }
23226
- catch (e) {
23227
- errors = e instanceof UnsubscriptionError ? flattenUnsubscriptionErrors(e.errors) : [e];
23228
- }
23229
- }
23230
- if (Object(isArray["a" /* isArray */])(_subscriptions)) {
23231
- var index = -1;
23232
- var len = _subscriptions.length;
23233
- while (++index < len) {
23234
- var sub = _subscriptions[index];
23235
- if (Object(isObject["a" /* isObject */])(sub)) {
23236
- try {
23237
- sub.unsubscribe();
23238
- }
23239
- catch (e) {
23240
- errors = errors || [];
23241
- if (e instanceof UnsubscriptionError) {
23242
- errors = errors.concat(flattenUnsubscriptionErrors(e.errors));
23243
- }
23244
- else {
23245
- errors.push(e);
23246
- }
23247
- }
23248
- }
23249
- }
23250
- }
23251
- if (errors) {
23252
- throw new UnsubscriptionError(errors);
23253
- }
23254
- };
23255
- Subscription.prototype.add = function (teardown) {
23256
- var subscription = teardown;
23257
- if (!teardown) {
23258
- return Subscription.EMPTY;
23259
- }
23260
- switch (typeof teardown) {
23261
- case 'function':
23262
- subscription = new Subscription(teardown);
23263
- case 'object':
23264
- if (subscription === this || subscription.closed || typeof subscription.unsubscribe !== 'function') {
23265
- return subscription;
23266
- }
23267
- else if (this.closed) {
23268
- subscription.unsubscribe();
23269
- return subscription;
23270
- }
23271
- else if (!(subscription instanceof Subscription)) {
23272
- var tmp = subscription;
23273
- subscription = new Subscription();
23274
- subscription._subscriptions = [tmp];
23275
- }
23276
- break;
23277
- default: {
23278
- throw new Error('unrecognized teardown ' + teardown + ' added to Subscription.');
23279
- }
23280
- }
23281
- var _parentOrParents = subscription._parentOrParents;
23282
- if (_parentOrParents === null) {
23283
- subscription._parentOrParents = this;
23284
- }
23285
- else if (_parentOrParents instanceof Subscription) {
23286
- if (_parentOrParents === this) {
23287
- return subscription;
23288
- }
23289
- subscription._parentOrParents = [_parentOrParents, this];
23290
- }
23291
- else if (_parentOrParents.indexOf(this) === -1) {
23292
- _parentOrParents.push(this);
23293
- }
23294
- else {
23295
- return subscription;
23296
- }
23297
- var subscriptions = this._subscriptions;
23298
- if (subscriptions === null) {
23299
- this._subscriptions = [subscription];
23300
- }
23301
- else {
23302
- subscriptions.push(subscription);
23303
- }
23304
- return subscription;
23305
- };
23306
- Subscription.prototype.remove = function (subscription) {
23307
- var subscriptions = this._subscriptions;
23308
- if (subscriptions) {
23309
- var subscriptionIndex = subscriptions.indexOf(subscription);
23310
- if (subscriptionIndex !== -1) {
23311
- subscriptions.splice(subscriptionIndex, 1);
23312
- }
23313
- }
23314
- };
23315
- Subscription.EMPTY = (function (empty) {
23316
- empty.closed = true;
23317
- return empty;
23318
- }(new Subscription()));
23319
- return Subscription;
23320
- }());
23321
-
23322
- function flattenUnsubscriptionErrors(errors) {
23323
- return errors.reduce(function (errs, err) { return errs.concat((err instanceof UnsubscriptionError) ? err.errors : err); }, []);
23324
- }
23325
- //# sourceMappingURL=Subscription.js.map
23326
-
23327
-
23328
- /***/ }),
23329
- /* 24 */
23330
23118
  /***/ (function(module, exports, __webpack_require__) {
23331
23119
 
23332
23120
  var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_RESULT__;!function() {
@@ -32887,6 +32675,219 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_RESULT__;!function() {
32887
32675
  __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); else {}
32888
32676
  }();
32889
32677
 
32678
+ /***/ }),
32679
+ /* 22 */
32680
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
32681
+
32682
+ "use strict";
32683
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return RelationType; });
32684
+ var RelationType;
32685
+ (function (RelationType) {
32686
+ RelationType[RelationType["None"] = 0] = "None";
32687
+ RelationType[RelationType["And"] = 1] = "And";
32688
+ RelationType[RelationType["Or"] = 2] = "Or";
32689
+ })(RelationType || (RelationType = {}));
32690
+
32691
+
32692
+ /***/ }),
32693
+ /* 23 */
32694
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
32695
+
32696
+ "use strict";
32697
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return config; });
32698
+ /** PURE_IMPORTS_START PURE_IMPORTS_END */
32699
+ var _enable_super_gross_mode_that_will_cause_bad_things = false;
32700
+ var config = {
32701
+ Promise: undefined,
32702
+ set useDeprecatedSynchronousErrorHandling(value) {
32703
+ if (value) {
32704
+ var error = /*@__PURE__*/ new Error();
32705
+ /*@__PURE__*/ console.warn('DEPRECATED! RxJS was set to use deprecated synchronous error handling behavior by code at: \n' + error.stack);
32706
+ }
32707
+ else if (_enable_super_gross_mode_that_will_cause_bad_things) {
32708
+ /*@__PURE__*/ console.log('RxJS: Back to a better error behavior. Thank you. <3');
32709
+ }
32710
+ _enable_super_gross_mode_that_will_cause_bad_things = value;
32711
+ },
32712
+ get useDeprecatedSynchronousErrorHandling() {
32713
+ return _enable_super_gross_mode_that_will_cause_bad_things;
32714
+ },
32715
+ };
32716
+ //# sourceMappingURL=config.js.map
32717
+
32718
+
32719
+ /***/ }),
32720
+ /* 24 */
32721
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
32722
+
32723
+ "use strict";
32724
+
32725
+ // EXTERNAL MODULE: ./node_modules/rxjs/_esm5/internal/util/isArray.js
32726
+ var isArray = __webpack_require__(55);
32727
+
32728
+ // EXTERNAL MODULE: ./node_modules/rxjs/_esm5/internal/util/isObject.js
32729
+ var isObject = __webpack_require__(271);
32730
+
32731
+ // EXTERNAL MODULE: ./node_modules/rxjs/_esm5/internal/util/isFunction.js
32732
+ var isFunction = __webpack_require__(51);
32733
+
32734
+ // CONCATENATED MODULE: ./node_modules/rxjs/_esm5/internal/util/UnsubscriptionError.js
32735
+ /** PURE_IMPORTS_START PURE_IMPORTS_END */
32736
+ var UnsubscriptionErrorImpl = /*@__PURE__*/ (function () {
32737
+ function UnsubscriptionErrorImpl(errors) {
32738
+ Error.call(this);
32739
+ this.message = errors ?
32740
+ errors.length + " errors occurred during unsubscription:\n" + errors.map(function (err, i) { return i + 1 + ") " + err.toString(); }).join('\n ') : '';
32741
+ this.name = 'UnsubscriptionError';
32742
+ this.errors = errors;
32743
+ return this;
32744
+ }
32745
+ UnsubscriptionErrorImpl.prototype = /*@__PURE__*/ Object.create(Error.prototype);
32746
+ return UnsubscriptionErrorImpl;
32747
+ })();
32748
+ var UnsubscriptionError = UnsubscriptionErrorImpl;
32749
+ //# sourceMappingURL=UnsubscriptionError.js.map
32750
+
32751
+ // CONCATENATED MODULE: ./node_modules/rxjs/_esm5/internal/Subscription.js
32752
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return Subscription_Subscription; });
32753
+ /** PURE_IMPORTS_START _util_isArray,_util_isObject,_util_isFunction,_util_UnsubscriptionError PURE_IMPORTS_END */
32754
+
32755
+
32756
+
32757
+
32758
+ var Subscription_Subscription = /*@__PURE__*/ (function () {
32759
+ function Subscription(unsubscribe) {
32760
+ this.closed = false;
32761
+ this._parentOrParents = null;
32762
+ this._subscriptions = null;
32763
+ if (unsubscribe) {
32764
+ this._unsubscribe = unsubscribe;
32765
+ }
32766
+ }
32767
+ Subscription.prototype.unsubscribe = function () {
32768
+ var errors;
32769
+ if (this.closed) {
32770
+ return;
32771
+ }
32772
+ var _a = this, _parentOrParents = _a._parentOrParents, _unsubscribe = _a._unsubscribe, _subscriptions = _a._subscriptions;
32773
+ this.closed = true;
32774
+ this._parentOrParents = null;
32775
+ this._subscriptions = null;
32776
+ if (_parentOrParents instanceof Subscription) {
32777
+ _parentOrParents.remove(this);
32778
+ }
32779
+ else if (_parentOrParents !== null) {
32780
+ for (var index = 0; index < _parentOrParents.length; ++index) {
32781
+ var parent_1 = _parentOrParents[index];
32782
+ parent_1.remove(this);
32783
+ }
32784
+ }
32785
+ if (Object(isFunction["a" /* isFunction */])(_unsubscribe)) {
32786
+ try {
32787
+ _unsubscribe.call(this);
32788
+ }
32789
+ catch (e) {
32790
+ errors = e instanceof UnsubscriptionError ? flattenUnsubscriptionErrors(e.errors) : [e];
32791
+ }
32792
+ }
32793
+ if (Object(isArray["a" /* isArray */])(_subscriptions)) {
32794
+ var index = -1;
32795
+ var len = _subscriptions.length;
32796
+ while (++index < len) {
32797
+ var sub = _subscriptions[index];
32798
+ if (Object(isObject["a" /* isObject */])(sub)) {
32799
+ try {
32800
+ sub.unsubscribe();
32801
+ }
32802
+ catch (e) {
32803
+ errors = errors || [];
32804
+ if (e instanceof UnsubscriptionError) {
32805
+ errors = errors.concat(flattenUnsubscriptionErrors(e.errors));
32806
+ }
32807
+ else {
32808
+ errors.push(e);
32809
+ }
32810
+ }
32811
+ }
32812
+ }
32813
+ }
32814
+ if (errors) {
32815
+ throw new UnsubscriptionError(errors);
32816
+ }
32817
+ };
32818
+ Subscription.prototype.add = function (teardown) {
32819
+ var subscription = teardown;
32820
+ if (!teardown) {
32821
+ return Subscription.EMPTY;
32822
+ }
32823
+ switch (typeof teardown) {
32824
+ case 'function':
32825
+ subscription = new Subscription(teardown);
32826
+ case 'object':
32827
+ if (subscription === this || subscription.closed || typeof subscription.unsubscribe !== 'function') {
32828
+ return subscription;
32829
+ }
32830
+ else if (this.closed) {
32831
+ subscription.unsubscribe();
32832
+ return subscription;
32833
+ }
32834
+ else if (!(subscription instanceof Subscription)) {
32835
+ var tmp = subscription;
32836
+ subscription = new Subscription();
32837
+ subscription._subscriptions = [tmp];
32838
+ }
32839
+ break;
32840
+ default: {
32841
+ throw new Error('unrecognized teardown ' + teardown + ' added to Subscription.');
32842
+ }
32843
+ }
32844
+ var _parentOrParents = subscription._parentOrParents;
32845
+ if (_parentOrParents === null) {
32846
+ subscription._parentOrParents = this;
32847
+ }
32848
+ else if (_parentOrParents instanceof Subscription) {
32849
+ if (_parentOrParents === this) {
32850
+ return subscription;
32851
+ }
32852
+ subscription._parentOrParents = [_parentOrParents, this];
32853
+ }
32854
+ else if (_parentOrParents.indexOf(this) === -1) {
32855
+ _parentOrParents.push(this);
32856
+ }
32857
+ else {
32858
+ return subscription;
32859
+ }
32860
+ var subscriptions = this._subscriptions;
32861
+ if (subscriptions === null) {
32862
+ this._subscriptions = [subscription];
32863
+ }
32864
+ else {
32865
+ subscriptions.push(subscription);
32866
+ }
32867
+ return subscription;
32868
+ };
32869
+ Subscription.prototype.remove = function (subscription) {
32870
+ var subscriptions = this._subscriptions;
32871
+ if (subscriptions) {
32872
+ var subscriptionIndex = subscriptions.indexOf(subscription);
32873
+ if (subscriptionIndex !== -1) {
32874
+ subscriptions.splice(subscriptionIndex, 1);
32875
+ }
32876
+ }
32877
+ };
32878
+ Subscription.EMPTY = (function (empty) {
32879
+ empty.closed = true;
32880
+ return empty;
32881
+ }(new Subscription()));
32882
+ return Subscription;
32883
+ }());
32884
+
32885
+ function flattenUnsubscriptionErrors(errors) {
32886
+ return errors.reduce(function (errs, err) { return errs.concat((err instanceof UnsubscriptionError) ? err.errors : err); }, []);
32887
+ }
32888
+ //# sourceMappingURL=Subscription.js.map
32889
+
32890
+
32890
32891
  /***/ }),
32891
32892
  /* 25 */
32892
32893
  /***/ (function(module, exports) {
@@ -32961,12 +32962,12 @@ class Guid {
32961
32962
  "use strict";
32962
32963
  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return Subscriber; });
32963
32964
  /* unused harmony export SafeSubscriber */
32964
- /* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(12);
32965
+ /* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(13);
32965
32966
  /* harmony import */ var _util_isFunction__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(51);
32966
32967
  /* harmony import */ var _Observer__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(53);
32967
- /* harmony import */ var _Subscription__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(23);
32968
+ /* harmony import */ var _Subscription__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(24);
32968
32969
  /* harmony import */ var _internal_symbol_rxSubscriber__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(52);
32969
- /* harmony import */ var _config__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(22);
32970
+ /* harmony import */ var _config__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(23);
32970
32971
  /* harmony import */ var _util_hostReportError__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(34);
32971
32972
  /** PURE_IMPORTS_START tslib,_util_isFunction,_Observer,_Subscription,_internal_symbol_rxSubscriber,_config,_util_hostReportError PURE_IMPORTS_END */
32972
32973
 
@@ -35372,7 +35373,7 @@ function degreesToRadians(degrees) {
35372
35373
  }
35373
35374
 
35374
35375
  // EXTERNAL MODULE: ./.tmp/model/shared/condition/variable-value-type.ts
35375
- var variable_value_type = __webpack_require__(11);
35376
+ var variable_value_type = __webpack_require__(12);
35376
35377
 
35377
35378
  // CONCATENATED MODULE: ./.tmp/elements/bar-graph-element.ts
35378
35379
 
@@ -35626,7 +35627,7 @@ bar_graph_element_BarGraphElement.DEFAULT_MAX_VALUE = 100;
35626
35627
 
35627
35628
 
35628
35629
  // EXTERNAL MODULE: ./.tmp/config/index.ts + 11 modules
35629
- var _tmp_config = __webpack_require__(13);
35630
+ var _tmp_config = __webpack_require__(11);
35630
35631
 
35631
35632
  // EXTERNAL MODULE: ./.tmp/modal/alert/alert-modal.component.ts
35632
35633
  var alert_modal_component = __webpack_require__(20);
@@ -36934,7 +36935,7 @@ class datetime_display_element_DatetimeDisplayElement extends conditional_displa
36934
36935
  }
36935
36936
 
36936
36937
  // EXTERNAL MODULE: ./node_modules/d3/d3.js
36937
- var d3 = __webpack_require__(24);
36938
+ var d3 = __webpack_require__(21);
36938
36939
 
36939
36940
  // EXTERNAL MODULE: ./node_modules/nvd3/build/nv.d3.js
36940
36941
  var nv_d3 = __webpack_require__(38);
@@ -38165,7 +38166,7 @@ class numerical_display_element_NumericalDisplayElement extends readable_element
38165
38166
  var condition_type = __webpack_require__(33);
38166
38167
 
38167
38168
  // EXTERNAL MODULE: ./.tmp/model/shared/condition/relation-type.ts
38168
- var relation_type = __webpack_require__(21);
38169
+ var relation_type = __webpack_require__(22);
38169
38170
 
38170
38171
  // CONCATENATED MODULE: ./.tmp/elements/base/conditional-control-element.ts
38171
38172
 
@@ -41331,6 +41332,429 @@ class alarm_element_AlarmElement extends conditional_display_element_Conditional
41331
41332
  }
41332
41333
  }
41333
41334
 
41335
+ // CONCATENATED MODULE: ./.tmp/elements/scroll-alarm/scroll-alarm-element.ts
41336
+
41337
+
41338
+
41339
+
41340
+
41341
+ var ScrollAlarmElementStatus;
41342
+ (function (ScrollAlarmElementStatus) {
41343
+ ScrollAlarmElementStatus[ScrollAlarmElementStatus["Normal"] = 0] = "Normal";
41344
+ ScrollAlarmElementStatus[ScrollAlarmElementStatus["Loading"] = 1] = "Loading"; // 加载中
41345
+ })(ScrollAlarmElementStatus || (ScrollAlarmElementStatus = {}));
41346
+ class scroll_alarm_element_ScrollAlarmElement extends conditional_dynamic_display_element_ConditionalDynamicDisplayElement {
41347
+ constructor(element, injector, permissionChecker, variableCommunicator, variableStore, alarmsStore, signalRAppId) {
41348
+ var _a, _b, _c, _d, _e;
41349
+ super(element, permissionChecker, variableCommunicator, variableStore, signalRAppId);
41350
+ this.alarmsStore = alarmsStore;
41351
+ this.elementStatus = ScrollAlarmElementStatus.Loading;
41352
+ this.alarmNames = [];
41353
+ this.isScrolling = false;
41354
+ this.isDisposed = false;
41355
+ // 新的分页和滚动逻辑变量
41356
+ this.currentPage = 1;
41357
+ this.maxResultCount = 3; // 每页数据量
41358
+ this.displayedItems = []; // 当前显示的所有数据
41359
+ this.pageWidths = []; // 存储每页的宽度
41360
+ this.totalWidth = 0; // 所有显示数据的总宽度
41361
+ this.currentLeft = 0;
41362
+ this.autoCycle = true;
41363
+ this.hasMoreData = true;
41364
+ this.isLoadingNextPage = false;
41365
+ this.rootElement.selectAll('*').remove();
41366
+ this.setStatusAsLoading();
41367
+ this.logger = injector.get(logger["b" /* LOGGER_SERVICE_TOKEN */]);
41368
+ this.variableCommunicator = variableCommunicator;
41369
+ this.autoCycle = (_b = (_a = this.model.generalSetting) === null || _a === void 0 ? void 0 : _a.autoCycle) !== null && _b !== void 0 ? _b : true;
41370
+ this.maxResultCount = (_d = (_c = this.model.generalSetting) === null || _c === void 0 ? void 0 : _c.pageSize) !== null && _d !== void 0 ? _d : 3;
41371
+ if (this.model.filterSetting) {
41372
+ this.alarmNames = this.model.filterSetting.detailsData.map(item => item.name);
41373
+ this.updateQueryTimeRange();
41374
+ // 监听告警更新
41375
+ // variableCommunicator.subscribeUserDeviceAlarms(signalRAppId).subscribe(alarms => {
41376
+ // alarms.forEach(alarm => {
41377
+ // if (this.alarmNames.indexOf(alarm.name) !== -1) {
41378
+ // this.getAlarmData();
41379
+ // return;
41380
+ // }
41381
+ // });
41382
+ // });
41383
+ // 初始化显示容器
41384
+ this.initDisplayContainer();
41385
+ // 获取字体设置
41386
+ this.headerFont = ((_e = this.model.generalSetting) === null || _e === void 0 ? void 0 : _e.headerFont) || {};
41387
+ const fontStyle = [];
41388
+ if (this.headerFont.isBold)
41389
+ fontStyle.push('bold');
41390
+ if (this.headerFont.isItalic)
41391
+ fontStyle.push('italic');
41392
+ if (this.headerFont.isUnderline)
41393
+ fontStyle.push('underline');
41394
+ fontStyle.push(`${this.headerFont.fontSize || '16px'}`);
41395
+ fontStyle.push(`${this.headerFont.fontFamily || 'Microsoft YaHei'}`);
41396
+ this.fontString = fontStyle.join(' ');
41397
+ this.getAlarmData();
41398
+ }
41399
+ else {
41400
+ this.displayedItems = [];
41401
+ if (this.allAlarmsContainer) {
41402
+ this.allAlarmsContainer.innerHTML = '';
41403
+ this.totalWidth = 0;
41404
+ this.pageWidths = [];
41405
+ }
41406
+ }
41407
+ }
41408
+ dispose() {
41409
+ this.isDisposed = true;
41410
+ clearInterval(this.scrollIntervalId);
41411
+ clearTimeout(this.getAlarmDataId);
41412
+ if (this.element && this.element.tooltip) {
41413
+ this.element.tooltip.hidden(true);
41414
+ }
41415
+ this.logger.debug(`[GUI]Dispose Scroll Alarm Refresh Interval:${d3["time"].format('%x %X')(new Date())}`);
41416
+ // 重置所有状态
41417
+ this.isScrolling = false;
41418
+ }
41419
+ getAlarmData() {
41420
+ if (this.isDisposed || this.isLoadingNextPage)
41421
+ return;
41422
+ this.isLoadingNextPage = true;
41423
+ // Only show loading for the first page load
41424
+ if (this.currentPage === 1 && this.displayedItems.length === 0) {
41425
+ this.setStatusAsLoading();
41426
+ }
41427
+ clearTimeout(this.getAlarmDataId);
41428
+ this.getAlarmDataId = setTimeout(() => {
41429
+ this.updateQueryTimeRange();
41430
+ const skipCount = (this.currentPage - 1) * this.maxResultCount;
41431
+ const input = new _tmp_config["c" /* GetAlarmsArgs */](this.alarmNames, this.startTime, this.endTime, this.maxResultCount, skipCount);
41432
+ this.alarmsStore.getHistoryAlarms(input).subscribe(result => {
41433
+ this.isLoadingNextPage = false;
41434
+ if (!result.error && result.items && result.items.length > 0) {
41435
+ const newPage = result.items;
41436
+ // 检查是否还有更多数据
41437
+ if (!this.autoCycle && newPage.length < this.maxResultCount) {
41438
+ this.hasMoreData = false;
41439
+ }
41440
+ else {
41441
+ this.hasMoreData = true;
41442
+ }
41443
+ // 添加新页数据
41444
+ this.displayedItems = this.displayedItems.concat(newPage);
41445
+ // 渲染新页
41446
+ this.renderNewPage(newPage);
41447
+ // 更新页码
41448
+ this.currentPage++;
41449
+ // 检查是否需要删除旧页(保持最多3页)
41450
+ if (this.currentPage > 4) {
41451
+ this.removeOldestPage();
41452
+ }
41453
+ // 如果是首次加载或还没有开始滚动,初始化滚动
41454
+ if (!this.isScrolling && this.displayedItems.length > 0) {
41455
+ this.initScrolling();
41456
+ }
41457
+ this.setStatusAsNormal();
41458
+ }
41459
+ else {
41460
+ // 如果没有数据且自动循环开启,循环回到第一页而不清空数据
41461
+ if (this.autoCycle) {
41462
+ // 直接跳转到第一页
41463
+ this.currentPage = 1;
41464
+ // 继续加载数据(会自动添加到末尾)
41465
+ this.getAlarmData();
41466
+ }
41467
+ else {
41468
+ this.hasMoreData = false;
41469
+ this.setStatusAsNormal();
41470
+ }
41471
+ }
41472
+ }, error => {
41473
+ this.isLoadingNextPage = false;
41474
+ this.setStatusAsNormal();
41475
+ this.logger.error('Failed to get alarm data:', error);
41476
+ });
41477
+ }, 500);
41478
+ }
41479
+ initDisplayContainer() {
41480
+ var _a;
41481
+ const elementHeight = this.model.size.height;
41482
+ const elementWidth = this.model.size.width;
41483
+ // 创建foreignObject作为容器
41484
+ this.element = document.createElementNS('http://www.w3.org/2000/svg', 'foreignObject');
41485
+ this.element.setAttribute('width', elementWidth.toString());
41486
+ this.element.setAttribute('height', elementHeight.toString());
41487
+ this.$element.append(this.element);
41488
+ // 创建背景容器,应用headerFillColor背景色
41489
+ this.container = document.createElement('div');
41490
+ this.container.style.cssText = `
41491
+ height: ${elementHeight}px;
41492
+ width: 100%;
41493
+ background-color: ${((_a = this.model.generalSetting) === null || _a === void 0 ? void 0 : _a.headerFillColor) || '#ffffff'};
41494
+ display: flex;
41495
+ align-items: center;
41496
+ overflow: hidden;
41497
+ position: relative;
41498
+ border: 1px solid #8ea0aa;
41499
+ `;
41500
+ this.element.appendChild(this.container);
41501
+ // 创建一个大容器来包含所有告警项,初始位置在左侧
41502
+ this.allAlarmsContainer = document.createElement('div');
41503
+ this.allAlarmsContainer.style.cssText = `
41504
+ position: absolute;
41505
+ left: 0px;
41506
+ top: 50%;
41507
+ transform: translateY(-50%);
41508
+ display: flex;
41509
+ align-items: center;
41510
+ gap: 80px;
41511
+ `;
41512
+ this.container.appendChild(this.allAlarmsContainer);
41513
+ // 添加鼠标悬停暂停和恢复滚动功能
41514
+ this.container.addEventListener('mouseenter', () => this.pauseScroll());
41515
+ this.container.addEventListener('mouseleave', () => this.resumeScroll());
41516
+ }
41517
+ renderNewPage(pageData) {
41518
+ let pageWidth = 0;
41519
+ // 为每个告警数据创建文本容器
41520
+ pageData.forEach((alarm) => {
41521
+ var _a, _b, _c, _d, _e, _f, _g, _h;
41522
+ // 创建告警文本容器
41523
+ const textContainer = document.createElement('div');
41524
+ textContainer.style.cssText = `
41525
+ font: ${this.fontString};
41526
+ color: ${this.headerFont.color || '#E95F5F'};
41527
+ white-space: nowrap;
41528
+ overflow: visible;
41529
+ `;
41530
+ // 构建告警信息内容,根据配置决定显示哪些字段
41531
+ const contentParts = [];
41532
+ // 显示触发时间
41533
+ if (((_a = this.model.generalSetting) === null || _a === void 0 ? void 0 : _a.showTriggerTime) && alarm.triggeredTime) {
41534
+ const formattedTime = moment(alarm.triggeredTime).format('YYYY/MM/DD HH:mm:ss');
41535
+ contentParts.push(formattedTime);
41536
+ }
41537
+ // 获取当前语言环境
41538
+ const language = ((_d = (_c = (_b = window.abp) === null || _b === void 0 ? void 0 : _b.localization) === null || _c === void 0 ? void 0 : _c.currentLanguage) === null || _d === void 0 ? void 0 : _d.name) || 'zh-Hans';
41539
+ const isChinese = language === 'zh-Hans' || language === 'zh';
41540
+ // 显示告警等级
41541
+ if (((_e = this.model.generalSetting) === null || _e === void 0 ? void 0 : _e.showAlarmLevel) && alarm.alarmLevel !== undefined) {
41542
+ const levelMap = isChinese ? ['警告', '次要', '主要', '严重'] : ['Warning', 'Minor', 'Major', 'Critical'];
41543
+ const alarmLevel = levelMap[alarm.alarmLevel] || (isChinese ? '警告' : 'Warning');
41544
+ contentParts.push(alarmLevel);
41545
+ }
41546
+ // 显示告警名称
41547
+ if (((_f = this.model.generalSetting) === null || _f === void 0 ? void 0 : _f.showAlarmName) && alarm.name) {
41548
+ contentParts.push(alarm.name);
41549
+ }
41550
+ // 显示告警状态
41551
+ if (((_g = this.model.generalSetting) === null || _g === void 0 ? void 0 : _g.showAlarmState) && alarm.state !== undefined) {
41552
+ const stateMap = isChinese ? ['触发/未确认', '触发/已确认', '恢复/未确认', '恢复/已确认'] : ['Triggered/Unconfirmed', 'Triggered/Confirmed', 'Restored/Unconfirmed', 'Restored/Confirmed'];
41553
+ const alarmState = stateMap[alarm.state] || (isChinese ? '触发/未确认' : 'Triggered/Unconfirmed');
41554
+ contentParts.push(alarmState);
41555
+ }
41556
+ // 显示告警内容
41557
+ if (((_h = this.model.generalSetting) === null || _h === void 0 ? void 0 : _h.showAlarmContent) && alarm.message) {
41558
+ contentParts.push(alarm.message);
41559
+ }
41560
+ // 将所有显示字段用空格连接,确保一行显示
41561
+ const textContent = contentParts.join(' ');
41562
+ textContainer.textContent = textContent;
41563
+ this.allAlarmsContainer.appendChild(textContainer);
41564
+ // 计算文本宽度
41565
+ const textWidth = textContainer.offsetWidth;
41566
+ pageWidth += textWidth + 80; // 80是gap大小
41567
+ });
41568
+ // 移除最后一个gap
41569
+ if (pageWidth > 0) {
41570
+ pageWidth -= 80;
41571
+ }
41572
+ // 保存页宽度
41573
+ this.pageWidths.push(pageWidth);
41574
+ this.totalWidth += pageWidth;
41575
+ }
41576
+ removeOldestPage() {
41577
+ // 移除最旧的一页数据
41578
+ this.displayedItems.splice(0, this.maxResultCount);
41579
+ const oldPageWidth = this.pageWidths.shift() || 0;
41580
+ // 更新总宽度
41581
+ this.totalWidth -= oldPageWidth;
41582
+ // 从DOM中移除最旧的元素
41583
+ const elementsToRemove = Array.from(this.allAlarmsContainer.children).slice(0, this.maxResultCount);
41584
+ elementsToRemove.forEach(element => {
41585
+ this.allAlarmsContainer.removeChild(element);
41586
+ });
41587
+ // 调整当前left位置(保持视觉位置不变)- 这里需要等DOM更新完成后再调整
41588
+ requestAnimationFrame(() => {
41589
+ this.currentLeft += oldPageWidth;
41590
+ this.allAlarmsContainer.style.left = `${this.currentLeft}px`;
41591
+ });
41592
+ }
41593
+ resetToFirstPage() {
41594
+ // 重置到第一页,但保持现有数据和位置(无缝循环)
41595
+ this.currentPage = 1;
41596
+ this.hasMoreData = true;
41597
+ // 直接加载第一页数据,不需要清空现有内容
41598
+ this.getAlarmData();
41599
+ }
41600
+ scrollContent() {
41601
+ if (this.displayedItems.length <= 0)
41602
+ return;
41603
+ // 每次滚动的距离
41604
+ const scrollStep = 2; // 减小滚动步长,使滚动更平滑
41605
+ // 更新位置 - 从右往左滚动
41606
+ this.currentLeft -= scrollStep;
41607
+ // 检查是否需要加载下一页
41608
+ if (this.hasMoreData && !this.isLoadingNextPage) {
41609
+ const currentPosition = Math.abs(this.currentLeft);
41610
+ const loadedWidth = this.totalWidth - (this.pageWidths[this.pageWidths.length - 1] || 0);
41611
+ // 当滚动到已加载内容的60%时,加载下一页(提前预加载,确保无缝衔接)
41612
+ if (currentPosition > loadedWidth * 0.6) {
41613
+ this.getAlarmData();
41614
+ }
41615
+ }
41616
+ // 如果所有内容完全滚动出容器左侧,根据autoCycle决定是否重置
41617
+ // 添加额外的偏移量(比如100px),确保最后两个字也能完全滚出视图
41618
+ if (Math.abs(this.currentLeft) > this.totalWidth + 100) {
41619
+ if (this.autoCycle) {
41620
+ if (this.hasMoreData) {
41621
+ // 加载下一页
41622
+ this.getAlarmData();
41623
+ }
41624
+ else {
41625
+ // 重置到第一页
41626
+ this.resetToFirstPage();
41627
+ }
41628
+ // 计算新加载页面的宽度(如果有)
41629
+ const newPageWidth = this.pageWidths[this.pageWidths.length - 1] || 0;
41630
+ // 设置位置到新加载页面的起始位置,实现无缝衔接
41631
+ this.currentLeft = -(this.totalWidth - newPageWidth);
41632
+ this.allAlarmsContainer.style.left = `${this.currentLeft}px`;
41633
+ }
41634
+ else {
41635
+ // 非循环滚动:停止滚动
41636
+ clearInterval(this.scrollIntervalId);
41637
+ this.isScrolling = false;
41638
+ }
41639
+ }
41640
+ else {
41641
+ this.allAlarmsContainer.style.left = `${this.currentLeft}px`;
41642
+ }
41643
+ }
41644
+ initScrolling() {
41645
+ clearInterval(this.scrollIntervalId);
41646
+ // 如果没有滚动设置或自动播放为false,则不启动滚动
41647
+ if (this.displayedItems.length === 0) {
41648
+ return;
41649
+ }
41650
+ const scrollInterval = 100; // 默认100ms,滚动更流畅
41651
+ // 如果当前位置在容器右侧,延迟启动滚动确保内容渲染完成
41652
+ if (this.currentLeft > this.container.clientWidth * 0.5) {
41653
+ setTimeout(() => {
41654
+ this.isScrolling = true;
41655
+ this.scrollIntervalId = setInterval(() => {
41656
+ if (this.isScrolling) {
41657
+ this.scrollContent();
41658
+ }
41659
+ }, scrollInterval);
41660
+ }, 500);
41661
+ }
41662
+ else {
41663
+ this.isScrolling = true;
41664
+ this.scrollIntervalId = setInterval(() => {
41665
+ if (this.isScrolling) {
41666
+ this.scrollContent();
41667
+ }
41668
+ }, scrollInterval);
41669
+ }
41670
+ }
41671
+ pauseScroll() {
41672
+ this.isScrolling = false;
41673
+ }
41674
+ resumeScroll() {
41675
+ this.isScrolling = true;
41676
+ }
41677
+ updateQueryTimeRange() {
41678
+ this.endTime = moment();
41679
+ console.log(this.model.generalSetting, 1);
41680
+ switch (this.model.generalSetting.displayPeriod) {
41681
+ case 1:
41682
+ this.startTime = moment().subtract(1, 'hours');
41683
+ break;
41684
+ case 3:
41685
+ this.startTime = moment().subtract(7, 'days');
41686
+ break;
41687
+ case 4:
41688
+ this.startTime = moment().subtract(30, 'days');
41689
+ break;
41690
+ case 5:
41691
+ this.startTime = moment().subtract(1, 'years');
41692
+ break;
41693
+ case 6:
41694
+ this.startTime = moment().subtract(30, 'minutes');
41695
+ break;
41696
+ case 7:
41697
+ this.startTime = moment().subtract(8, 'hours');
41698
+ break;
41699
+ default:
41700
+ this.startTime = moment().subtract(1, 'days');
41701
+ }
41702
+ }
41703
+ setStatusAsNormal() {
41704
+ this.elementStatus = ScrollAlarmElementStatus.Normal;
41705
+ this.clearStatus();
41706
+ }
41707
+ setStatusAsLoading() {
41708
+ this.elementStatus = ScrollAlarmElementStatus.Loading;
41709
+ this.renderStatus('assets/img/loading.svg', '#226abc');
41710
+ }
41711
+ renderStatus(icon, stroke) {
41712
+ if (this.elementStatus === ScrollAlarmElementStatus.Normal) {
41713
+ this.clearStatus();
41714
+ return;
41715
+ }
41716
+ this.rootElement.append('rect').attr('id', 'StateFrame').attr('fill', 'transparent')
41717
+ .attr('width', this.model.size.width)
41718
+ .attr('height', this.model.size.height);
41719
+ const document = this.$element[0].ownerDocument;
41720
+ const currentRect = this.$element.find('rect#StateFrame').first();
41721
+ if (!currentRect.length) {
41722
+ return;
41723
+ }
41724
+ this.$element.find('image#StateImage').remove();
41725
+ const imgObj = document.createElementNS('http://www.w3.org/2000/svg', 'image');
41726
+ if (imgObj) {
41727
+ let x = Number(currentRect[0].getAttribute('width')) - 20;
41728
+ const currentRectX = currentRect[0].getAttribute('x');
41729
+ if (currentRectX !== null) {
41730
+ x += Number(currentRectX);
41731
+ }
41732
+ currentRect[0].setAttribute('stroke', stroke);
41733
+ currentRect[0].setAttribute('stroke-opacity', '0.5');
41734
+ imgObj.href.baseVal = icon;
41735
+ imgObj.setAttributeNS(null, 'id', 'StateImage');
41736
+ imgObj.setAttributeNS(null, 'x', x.toString());
41737
+ imgObj.setAttributeNS(null, 'y', '0');
41738
+ imgObj.setAttributeNS(null, 'height', '20px');
41739
+ imgObj.setAttributeNS(null, 'width', '20px');
41740
+ const titleElement = document.createElementNS('http://www.w3.org/2000/svg', 'title');
41741
+ imgObj.appendChild(titleElement);
41742
+ this.$element.append(imgObj);
41743
+ }
41744
+ }
41745
+ clearStatus() {
41746
+ const currentRect = this.$element.find('rect#StateFrame').first();
41747
+ if (!currentRect.length) {
41748
+ return;
41749
+ }
41750
+ const stroke = currentRect[0].getAttribute('stroke');
41751
+ if (stroke) {
41752
+ currentRect[0].removeAttribute('stroke');
41753
+ }
41754
+ this.$element.find('image#StateImage').remove();
41755
+ }
41756
+ }
41757
+
41334
41758
  // CONCATENATED MODULE: ./.tmp/elements/main-element.ts
41335
41759
 
41336
41760
 
@@ -41361,6 +41785,7 @@ class alarm_element_AlarmElement extends conditional_display_element_Conditional
41361
41785
 
41362
41786
 
41363
41787
 
41788
+
41364
41789
 
41365
41790
 
41366
41791
  class main_element_MainElement {
@@ -41467,6 +41892,9 @@ class main_element_MainElement {
41467
41892
  case shared["d" /* GuiConsts */].components.alarmKey:
41468
41893
  this.elements.push(new alarm_element_AlarmElement(element, this.injector, this.context.permissionChecker, this.variableCommunicator, this.context.configStore.variableStore, this.context.configStore.alarmsStore, this.signalRAppId));
41469
41894
  break;
41895
+ case shared["d" /* GuiConsts */].components.scrollAlarmKey:
41896
+ this.elements.push(new scroll_alarm_element_ScrollAlarmElement(element, this.injector, this.context.permissionChecker, this.variableCommunicator, this.context.configStore.variableStore, this.context.configStore.alarmsStore, this.signalRAppId));
41897
+ break;
41470
41898
  }
41471
41899
  });
41472
41900
  this.initBackground();
@@ -41632,7 +42060,7 @@ class main_element_MainElement {
41632
42060
  Object(lodash["each"])(this.elements, e => {
41633
42061
  if (e instanceof historical_curve_element_HistoricalCurveElement || e instanceof video_element_VideoElement
41634
42062
  || e instanceof weater_element_WeatherElement || e instanceof numerical_display_element_NumericalDisplayElement || e instanceof text_element_TextElement
41635
- || e instanceof air_quality_element_AirQualityElement) {
42063
+ || e instanceof air_quality_element_AirQualityElement || e instanceof scroll_alarm_element_ScrollAlarmElement) {
41636
42064
  e.dispose();
41637
42065
  }
41638
42066
  });
@@ -42073,7 +42501,7 @@ var shared = __webpack_require__(5);
42073
42501
  // EXTERNAL MODULE: ./.tmp/view/view.service.ts
42074
42502
  var view_service = __webpack_require__(26);
42075
42503
 
42076
- // EXTERNAL MODULE: ./.tmp/gui/gui-view.ts + 125 modules
42504
+ // EXTERNAL MODULE: ./.tmp/gui/gui-view.ts + 126 modules
42077
42505
  var gui_view = __webpack_require__(31);
42078
42506
 
42079
42507
  // EXTERNAL MODULE: external "rxjs/operators"
@@ -42820,7 +43248,7 @@ nv.dom = {}; //DOM manipulation functions
42820
43248
 
42821
43249
  // Node/CommonJS - require D3
42822
43250
  if (typeof(module) !== 'undefined' && typeof(exports) !== 'undefined' && typeof(d3) == 'undefined') {
42823
- d3 = __webpack_require__(24);
43251
+ d3 = __webpack_require__(21);
42824
43252
  }
42825
43253
 
42826
43254
  nv.dispatch = d3.dispatch('render_start', 'render_end');
@@ -62287,7 +62715,7 @@ nv.version = "1.8.6-dev";
62287
62715
  "use strict";
62288
62716
 
62289
62717
  // EXTERNAL MODULE: ./node_modules/rxjs/node_modules/tslib/tslib.es6.js
62290
- var tslib_es6 = __webpack_require__(12);
62718
+ var tslib_es6 = __webpack_require__(13);
62291
62719
 
62292
62720
  // EXTERNAL MODULE: ./node_modules/rxjs/_esm5/internal/Observable.js + 3 modules
62293
62721
  var Observable = __webpack_require__(14);
@@ -62296,7 +62724,7 @@ var Observable = __webpack_require__(14);
62296
62724
  var Subscriber = __webpack_require__(28);
62297
62725
 
62298
62726
  // EXTERNAL MODULE: ./node_modules/rxjs/_esm5/internal/Subscription.js + 1 modules
62299
- var Subscription = __webpack_require__(23);
62727
+ var Subscription = __webpack_require__(24);
62300
62728
 
62301
62729
  // CONCATENATED MODULE: ./node_modules/rxjs/_esm5/internal/util/ObjectUnsubscribedError.js
62302
62730
  /** PURE_IMPORTS_START PURE_IMPORTS_END */
@@ -63702,7 +64130,7 @@ var $$rxSubscriber = rxSubscriber;
63702
64130
 
63703
64131
  "use strict";
63704
64132
  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return empty; });
63705
- /* harmony import */ var _config__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(22);
64133
+ /* harmony import */ var _config__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(23);
63706
64134
  /* harmony import */ var _util_hostReportError__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(34);
63707
64135
  /** PURE_IMPORTS_START _config,_util_hostReportError PURE_IMPORTS_END */
63708
64136
 
@@ -63730,7 +64158,7 @@ var empty = {
63730
64158
  "use strict";
63731
64159
  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return scheduleArray; });
63732
64160
  /* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(14);
63733
- /* harmony import */ var _Subscription__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(23);
64161
+ /* harmony import */ var _Subscription__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(24);
63734
64162
  /** PURE_IMPORTS_START _Observable,_Subscription PURE_IMPORTS_END */
63735
64163
 
63736
64164
 
@@ -64055,7 +64483,7 @@ var Subject = __webpack_require__(39);
64055
64483
  var operators_ = __webpack_require__(16);
64056
64484
 
64057
64485
  // EXTERNAL MODULE: ./.tmp/config/index.ts + 11 modules
64058
- var _tmp_config = __webpack_require__(13);
64486
+ var _tmp_config = __webpack_require__(11);
64059
64487
 
64060
64488
  // EXTERNAL MODULE: ./.tmp/core/stringifying-map.ts
64061
64489
  var stringifying_map = __webpack_require__(29);
@@ -64809,10 +65237,10 @@ class RelationConditionResult {
64809
65237
  }
64810
65238
 
64811
65239
  // EXTERNAL MODULE: ./.tmp/model/shared/condition/variable-value-type.ts
64812
- var variable_value_type = __webpack_require__(11);
65240
+ var variable_value_type = __webpack_require__(12);
64813
65241
 
64814
65242
  // EXTERNAL MODULE: ./.tmp/model/shared/condition/relation-type.ts
64815
- var relation_type = __webpack_require__(21);
65243
+ var relation_type = __webpack_require__(22);
64816
65244
 
64817
65245
  // CONCATENATED MODULE: ./.tmp/model/shared/condition/word-condition-item-observer.ts
64818
65246
 
@@ -66323,7 +66751,7 @@ var Observable = __webpack_require__(14);
66323
66751
  var isScheduler = __webpack_require__(50);
66324
66752
 
66325
66753
  // EXTERNAL MODULE: ./node_modules/rxjs/node_modules/tslib/tslib.es6.js
66326
- var tslib_es6 = __webpack_require__(12);
66754
+ var tslib_es6 = __webpack_require__(13);
66327
66755
 
66328
66756
  // EXTERNAL MODULE: ./node_modules/rxjs/_esm5/internal/Subscriber.js
66329
66757
  var Subscriber = __webpack_require__(28);
@@ -66579,7 +67007,7 @@ var map_MapSubscriber = /*@__PURE__*/ (function (_super) {
66579
67007
  //# sourceMappingURL=map.js.map
66580
67008
 
66581
67009
  // EXTERNAL MODULE: ./node_modules/rxjs/_esm5/internal/Subscription.js + 1 modules
66582
- var Subscription = __webpack_require__(23);
67010
+ var Subscription = __webpack_require__(24);
66583
67011
 
66584
67012
  // CONCATENATED MODULE: ./node_modules/rxjs/_esm5/internal/scheduled/scheduleObservable.js
66585
67013
  /** PURE_IMPORTS_START _Observable,_Subscription,_symbol_observable PURE_IMPORTS_END */
@@ -84759,7 +85187,7 @@ __webpack_require__.r(__webpack_exports__);
84759
85187
  /* harmony import */ var _core__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(43);
84760
85188
  /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "StringifyingMap", function() { return _core__WEBPACK_IMPORTED_MODULE_3__["a"]; });
84761
85189
 
84762
- /* harmony import */ var _config__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(13);
85190
+ /* harmony import */ var _config__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(11);
84763
85191
  /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ConfigStore", function() { return _config__WEBPACK_IMPORTED_MODULE_4__["b"]; });
84764
85192
 
84765
85193
  /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Graph", function() { return _config__WEBPACK_IMPORTED_MODULE_4__["f"]; });