@flexem/fc-gui 3.0.0-alpha.180 → 3.0.0-alpha.182

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.
Files changed (52) hide show
  1. package/bundles/@flexem/fc-gui.umd.js +727 -293
  2. package/bundles/@flexem/fc-gui.umd.js.map +1 -1
  3. package/bundles/@flexem/fc-gui.umd.min.js +4 -4
  4. package/bundles/@flexem/fc-gui.umd.min.js.map +1 -1
  5. package/config/variable/variable-store.d.ts +4 -0
  6. package/elements/alarm/alarm-element.d.ts +20 -0
  7. package/elements/alarm/alarm-element.js +312 -70
  8. package/elements/alarm/alarm-element.metadata.json +1 -1
  9. package/elements/base/state-control-element.d.ts +10 -0
  10. package/elements/base/state-control-element.js +21 -3
  11. package/elements/base/state-control-element.metadata.json +1 -1
  12. package/elements/character-display/character-display-element.d.ts +12 -2
  13. package/elements/character-display/character-display-element.js +30 -3
  14. package/elements/character-display/character-display-element.metadata.json +1 -1
  15. package/elements/historical-curve/historical-curve.element.d.ts +1 -0
  16. package/elements/historical-curve/historical-curve.element.js +35 -22
  17. package/elements/historical-curve/historical-curve.element.metadata.json +1 -1
  18. package/elements/main-element.js +3 -2
  19. package/elements/numerical-display/numerical-display-element.d.ts +9 -0
  20. package/elements/numerical-display/numerical-display-element.js +19 -1
  21. package/elements/numerical-display/numerical-display-element.metadata.json +1 -1
  22. package/elements/switch-indicator-light/switch-indicator-light-element.d.ts +9 -0
  23. package/elements/switch-indicator-light/switch-indicator-light-element.js +20 -1
  24. package/elements/switch-indicator-light/switch-indicator-light-element.metadata.json +1 -1
  25. package/elements/view-operation/view-operation.element.js +7 -2
  26. package/gui/gui-view.d.ts +15 -1
  27. package/gui/gui-view.js +78 -4
  28. package/gui/gui-view.metadata.json +1 -1
  29. package/modal/verify-password/verify-password-modal.component.d.ts +6 -2
  30. package/modal/verify-password/verify-password-modal.component.html +2 -2
  31. package/modal/verify-password/verify-password-modal.component.js +11 -5
  32. package/modal/verify-password/verify-password-modal.component.less +9 -0
  33. package/modal/verify-password/verify-password-modal.component.metadata.json +1 -1
  34. package/modal/write-character/write-character-modal-args.d.ts +3 -1
  35. package/modal/write-character/write-character-modal-args.js +2 -1
  36. package/modal/write-character/write-character-modal-args.metadata.json +1 -1
  37. package/modal/write-character/write-character-modal.component.d.ts +1 -0
  38. package/modal/write-character/write-character-modal.component.js +5 -1
  39. package/modal/write-character/write-character-modal.component.metadata.json +1 -1
  40. package/modal/write-value/write-value-modal.component.d.ts +1 -0
  41. package/modal/write-value/write-value-modal.component.js +5 -1
  42. package/modal/write-value/write-value-modal.component.metadata.json +1 -1
  43. package/model/alarm/alarm.model.d.ts +1 -0
  44. package/model/character-display/character-display.d.ts +1 -0
  45. package/model/historical-curve/historical-curve.display-settings.d.ts +1 -0
  46. package/model/numerical-display/numerical-display.d.ts +1 -0
  47. package/model/settings/popup/view-popup-location-type.d.ts +2 -1
  48. package/model/settings/popup/view-popup-location-type.js +1 -0
  49. package/model/settings/popup/view-popup-location-type.metadata.json +1 -1
  50. package/model/switch-indicator-light/switch-indicator-light.d.ts +1 -0
  51. package/package.json +1 -1
  52. package/view/popup-view.service.d.ts +1 -1
@@ -21923,121 +21923,6 @@ var VariableStateEnum;
21923
21923
 
21924
21924
  "use strict";
21925
21925
 
21926
- // EXTERNAL MODULE: ./.tmp/shared/disposable.ts
21927
- var disposable = __webpack_require__(270);
21928
-
21929
- // CONCATENATED MODULE: ./.tmp/shared/config-is-empty-error.ts
21930
- class ConfigIsEmptyError extends Error {
21931
- constructor() {
21932
- super('The config is empty.');
21933
- // Todo: Only works in Chrome and FireFox, does not work in IE
21934
- Object.setPrototypeOf(this, ConfigIsEmptyError.prototype);
21935
- }
21936
- }
21937
-
21938
- // EXTERNAL MODULE: ./.tmp/model/shared/data-type/fcloud-data-Type.ts
21939
- var fcloud_data_Type = __webpack_require__(7);
21940
-
21941
- // EXTERNAL MODULE: ./node_modules/lodash/lodash.js
21942
- var lodash = __webpack_require__(2);
21943
-
21944
- // CONCATENATED MODULE: ./.tmp/shared/operation-helper.ts
21945
-
21946
-
21947
- class operation_helper_OperationHelper {
21948
- static add(value, operand, dataType, maxValue) {
21949
- if (!dataType) {
21950
- return value + operand;
21951
- }
21952
- if (!Object(lodash["isNil"])(maxValue)) {
21953
- return Math.min(value + operand, maxValue);
21954
- }
21955
- return Math.min(value + operand, operation_helper_OperationHelper.getMax(dataType));
21956
- }
21957
- static subtract(value, operand, dataType, minValue) {
21958
- if (!dataType) {
21959
- return value - operand;
21960
- }
21961
- if (!Object(lodash["isNil"])(minValue)) {
21962
- return Math.max(value - operand, minValue);
21963
- }
21964
- return Math.max(value - operand, operation_helper_OperationHelper.getMin(dataType));
21965
- }
21966
- static getMax(dataType) {
21967
- switch (dataType) {
21968
- case fcloud_data_Type["a" /* FCloudDataType */].Int32:
21969
- return 2147483647;
21970
- case fcloud_data_Type["a" /* FCloudDataType */].Float:
21971
- return 3.402823E+38;
21972
- }
21973
- }
21974
- static getMin(dataType) {
21975
- switch (dataType) {
21976
- case fcloud_data_Type["a" /* FCloudDataType */].Int32:
21977
- return -2147483648;
21978
- case fcloud_data_Type["a" /* FCloudDataType */].Float:
21979
- return -3.402823E+38;
21980
- }
21981
- }
21982
- }
21983
-
21984
- // CONCATENATED MODULE: ./.tmp/shared/gui-consts.ts
21985
- class GuiConsts {
21986
- }
21987
- GuiConsts.components = {
21988
- imageKey: 'Image',
21989
- numericalDisplayKey: 'NumericalDisplay',
21990
- textKey: 'Text',
21991
- hyperlinkKey: 'Hyperlink',
21992
- meterKey: 'Meter',
21993
- pipeKey: 'Pipe',
21994
- switchIndicatorLightKey: 'SwitchIndicatorLight',
21995
- barGraphKey: 'BarGraph',
21996
- /**
21997
- * 切换画面已经改为画面操作
21998
- */
21999
- toggleViewKey: 'ToggleView',
22000
- characterKey: 'Character',
22001
- straightLineKey: 'StraightLine',
22002
- polyLineKey: 'PolyLine',
22003
- rectangleKey: 'Rectangle',
22004
- sectorkey: 'Sector',
22005
- ellipseKey: 'Ellipse',
22006
- datetimeDisplayKey: 'DatetimeDisplay',
22007
- historicalCurveKey: 'HistoricalCurve',
22008
- ringGraphKey: 'RingGraph',
22009
- viewOperationElement: 'ViewOperation',
22010
- polygonKey: 'Polygon',
22011
- videokey: 'Video',
22012
- tableKey: 'Table',
22013
- weatherKey: 'Weather',
22014
- airQualityKey: 'AirQualityIndex',
22015
- alarmKey: 'Alarm',
22016
- scrollAlarmKey: 'ScrollAlarm'
22017
- };
22018
-
22019
- // EXTERNAL MODULE: ./.tmp/shared/graph-extended-style.ts
22020
- var graph_extended_style = __webpack_require__(269);
22021
-
22022
- // CONCATENATED MODULE: ./.tmp/shared/index.ts
22023
- /* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "b", function() { return disposable["Disposable"]; });
22024
- /* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "a", function() { return ConfigIsEmptyError; });
22025
- /* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "e", function() { return operation_helper_OperationHelper; });
22026
- /* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "d", function() { return GuiConsts; });
22027
- /* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "c", function() { return graph_extended_style["GraphExtendedStyle"]; });
22028
-
22029
-
22030
-
22031
-
22032
-
22033
-
22034
-
22035
- /***/ }),
22036
- /* 6 */
22037
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
22038
-
22039
- "use strict";
22040
-
22041
21926
  // EXTERNAL MODULE: ./.tmp/config/config-store.ts
22042
21927
  var config_store = __webpack_require__(258);
22043
21928
 
@@ -22207,6 +22092,121 @@ class GetAlarmsArgs {
22207
22092
 
22208
22093
 
22209
22094
 
22095
+ /***/ }),
22096
+ /* 6 */
22097
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
22098
+
22099
+ "use strict";
22100
+
22101
+ // EXTERNAL MODULE: ./.tmp/shared/disposable.ts
22102
+ var disposable = __webpack_require__(270);
22103
+
22104
+ // CONCATENATED MODULE: ./.tmp/shared/config-is-empty-error.ts
22105
+ class ConfigIsEmptyError extends Error {
22106
+ constructor() {
22107
+ super('The config is empty.');
22108
+ // Todo: Only works in Chrome and FireFox, does not work in IE
22109
+ Object.setPrototypeOf(this, ConfigIsEmptyError.prototype);
22110
+ }
22111
+ }
22112
+
22113
+ // EXTERNAL MODULE: ./.tmp/model/shared/data-type/fcloud-data-Type.ts
22114
+ var fcloud_data_Type = __webpack_require__(7);
22115
+
22116
+ // EXTERNAL MODULE: ./node_modules/lodash/lodash.js
22117
+ var lodash = __webpack_require__(2);
22118
+
22119
+ // CONCATENATED MODULE: ./.tmp/shared/operation-helper.ts
22120
+
22121
+
22122
+ class operation_helper_OperationHelper {
22123
+ static add(value, operand, dataType, maxValue) {
22124
+ if (!dataType) {
22125
+ return value + operand;
22126
+ }
22127
+ if (!Object(lodash["isNil"])(maxValue)) {
22128
+ return Math.min(value + operand, maxValue);
22129
+ }
22130
+ return Math.min(value + operand, operation_helper_OperationHelper.getMax(dataType));
22131
+ }
22132
+ static subtract(value, operand, dataType, minValue) {
22133
+ if (!dataType) {
22134
+ return value - operand;
22135
+ }
22136
+ if (!Object(lodash["isNil"])(minValue)) {
22137
+ return Math.max(value - operand, minValue);
22138
+ }
22139
+ return Math.max(value - operand, operation_helper_OperationHelper.getMin(dataType));
22140
+ }
22141
+ static getMax(dataType) {
22142
+ switch (dataType) {
22143
+ case fcloud_data_Type["a" /* FCloudDataType */].Int32:
22144
+ return 2147483647;
22145
+ case fcloud_data_Type["a" /* FCloudDataType */].Float:
22146
+ return 3.402823E+38;
22147
+ }
22148
+ }
22149
+ static getMin(dataType) {
22150
+ switch (dataType) {
22151
+ case fcloud_data_Type["a" /* FCloudDataType */].Int32:
22152
+ return -2147483648;
22153
+ case fcloud_data_Type["a" /* FCloudDataType */].Float:
22154
+ return -3.402823E+38;
22155
+ }
22156
+ }
22157
+ }
22158
+
22159
+ // CONCATENATED MODULE: ./.tmp/shared/gui-consts.ts
22160
+ class GuiConsts {
22161
+ }
22162
+ GuiConsts.components = {
22163
+ imageKey: 'Image',
22164
+ numericalDisplayKey: 'NumericalDisplay',
22165
+ textKey: 'Text',
22166
+ hyperlinkKey: 'Hyperlink',
22167
+ meterKey: 'Meter',
22168
+ pipeKey: 'Pipe',
22169
+ switchIndicatorLightKey: 'SwitchIndicatorLight',
22170
+ barGraphKey: 'BarGraph',
22171
+ /**
22172
+ * 切换画面已经改为画面操作
22173
+ */
22174
+ toggleViewKey: 'ToggleView',
22175
+ characterKey: 'Character',
22176
+ straightLineKey: 'StraightLine',
22177
+ polyLineKey: 'PolyLine',
22178
+ rectangleKey: 'Rectangle',
22179
+ sectorkey: 'Sector',
22180
+ ellipseKey: 'Ellipse',
22181
+ datetimeDisplayKey: 'DatetimeDisplay',
22182
+ historicalCurveKey: 'HistoricalCurve',
22183
+ ringGraphKey: 'RingGraph',
22184
+ viewOperationElement: 'ViewOperation',
22185
+ polygonKey: 'Polygon',
22186
+ videokey: 'Video',
22187
+ tableKey: 'Table',
22188
+ weatherKey: 'Weather',
22189
+ airQualityKey: 'AirQualityIndex',
22190
+ alarmKey: 'Alarm',
22191
+ scrollAlarmKey: 'ScrollAlarm'
22192
+ };
22193
+
22194
+ // EXTERNAL MODULE: ./.tmp/shared/graph-extended-style.ts
22195
+ var graph_extended_style = __webpack_require__(269);
22196
+
22197
+ // CONCATENATED MODULE: ./.tmp/shared/index.ts
22198
+ /* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "b", function() { return disposable["Disposable"]; });
22199
+ /* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "a", function() { return ConfigIsEmptyError; });
22200
+ /* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "e", function() { return operation_helper_OperationHelper; });
22201
+ /* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "d", function() { return GuiConsts; });
22202
+ /* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "c", function() { return graph_extended_style["GraphExtendedStyle"]; });
22203
+
22204
+
22205
+
22206
+
22207
+
22208
+
22209
+
22210
22210
  /***/ }),
22211
22211
  /* 7 */
22212
22212
  /***/ (function(module, __webpack_exports__, __webpack_require__) {
@@ -22291,7 +22291,7 @@ class ConsoleLoggerService {
22291
22291
 
22292
22292
  "use strict";
22293
22293
  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return VariableUtil; });
22294
- /* harmony import */ var _config__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(6);
22294
+ /* harmony import */ var _config__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(5);
22295
22295
 
22296
22296
  class VariableUtil {
22297
22297
  static getConvertedVariableName(variableStore, variable) {
@@ -22413,6 +22413,50 @@ class VariableDefinition {
22413
22413
  /* 12 */
22414
22414
  /***/ (function(module, __webpack_exports__, __webpack_require__) {
22415
22415
 
22416
+ "use strict";
22417
+
22418
+ // CONCATENATED MODULE: ./.tmp/settings/view-resize-mode.ts
22419
+ var ViewResizeMode;
22420
+ (function (ViewResizeMode) {
22421
+ /**
22422
+ * 在保持纵横比的同时等比缩放显示所有内容
22423
+ */
22424
+ ViewResizeMode[ViewResizeMode["Uniform"] = 0] = "Uniform";
22425
+ /**
22426
+ * 在保持纵横比的同时保证横向显示尽可能多的空间,
22427
+ */
22428
+ ViewResizeMode[ViewResizeMode["HorizontalUniform"] = 1] = "HorizontalUniform";
22429
+ })(ViewResizeMode || (ViewResizeMode = {}));
22430
+
22431
+ // CONCATENATED MODULE: ./.tmp/settings/display-mode.ts
22432
+ var DisplayMode;
22433
+ (function (DisplayMode) {
22434
+ /**
22435
+ * 网页版显示模式
22436
+ */
22437
+ DisplayMode[DisplayMode["Web"] = 0] = "Web";
22438
+ /**
22439
+ * 移动端显示,优化部分元件在移动端中的显示效果
22440
+ */
22441
+ DisplayMode[DisplayMode["Mobile"] = 1] = "Mobile";
22442
+ })(DisplayMode || (DisplayMode = {}));
22443
+
22444
+ // EXTERNAL MODULE: ./.tmp/settings/global-settings.ts
22445
+ var global_settings = __webpack_require__(48);
22446
+
22447
+ // CONCATENATED MODULE: ./.tmp/settings/index.ts
22448
+ /* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "c", function() { return ViewResizeMode; });
22449
+ /* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "a", function() { return DisplayMode; });
22450
+ /* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "b", function() { return global_settings["a" /* GlobalSettings */]; });
22451
+
22452
+
22453
+
22454
+
22455
+
22456
+ /***/ }),
22457
+ /* 13 */
22458
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
22459
+
22416
22460
  "use strict";
22417
22461
  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return VariableValueType; });
22418
22462
  var VariableValueType;
@@ -22423,7 +22467,7 @@ var VariableValueType;
22423
22467
 
22424
22468
 
22425
22469
  /***/ }),
22426
- /* 13 */
22470
+ /* 14 */
22427
22471
  /***/ (function(module, __webpack_exports__, __webpack_require__) {
22428
22472
 
22429
22473
  "use strict";
@@ -22635,7 +22679,7 @@ function __importDefault(mod) {
22635
22679
 
22636
22680
 
22637
22681
  /***/ }),
22638
- /* 14 */
22682
+ /* 15 */
22639
22683
  /***/ (function(module, __webpack_exports__, __webpack_require__) {
22640
22684
 
22641
22685
  "use strict";
@@ -22686,50 +22730,6 @@ __webpack_require__.r(__webpack_exports__);
22686
22730
 
22687
22731
 
22688
22732
 
22689
- /***/ }),
22690
- /* 15 */
22691
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
22692
-
22693
- "use strict";
22694
-
22695
- // CONCATENATED MODULE: ./.tmp/settings/view-resize-mode.ts
22696
- var ViewResizeMode;
22697
- (function (ViewResizeMode) {
22698
- /**
22699
- * 在保持纵横比的同时等比缩放显示所有内容
22700
- */
22701
- ViewResizeMode[ViewResizeMode["Uniform"] = 0] = "Uniform";
22702
- /**
22703
- * 在保持纵横比的同时保证横向显示尽可能多的空间,
22704
- */
22705
- ViewResizeMode[ViewResizeMode["HorizontalUniform"] = 1] = "HorizontalUniform";
22706
- })(ViewResizeMode || (ViewResizeMode = {}));
22707
-
22708
- // CONCATENATED MODULE: ./.tmp/settings/display-mode.ts
22709
- var DisplayMode;
22710
- (function (DisplayMode) {
22711
- /**
22712
- * 网页版显示模式
22713
- */
22714
- DisplayMode[DisplayMode["Web"] = 0] = "Web";
22715
- /**
22716
- * 移动端显示,优化部分元件在移动端中的显示效果
22717
- */
22718
- DisplayMode[DisplayMode["Mobile"] = 1] = "Mobile";
22719
- })(DisplayMode || (DisplayMode = {}));
22720
-
22721
- // EXTERNAL MODULE: ./.tmp/settings/global-settings.ts
22722
- var global_settings = __webpack_require__(48);
22723
-
22724
- // CONCATENATED MODULE: ./.tmp/settings/index.ts
22725
- /* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "c", function() { return ViewResizeMode; });
22726
- /* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "a", function() { return DisplayMode; });
22727
- /* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "b", function() { return global_settings["a" /* GlobalSettings */]; });
22728
-
22729
-
22730
-
22731
-
22732
-
22733
22733
  /***/ }),
22734
22734
  /* 16 */
22735
22735
  /***/ (function(module, __webpack_exports__, __webpack_require__) {
@@ -32593,6 +32593,7 @@ const DefaultLocalization = {
32593
32593
  /* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(2);
32594
32594
  /* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_2__);
32595
32595
  /* harmony import */ var _localization__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(10);
32596
+ /* harmony import */ var _settings__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(12);
32596
32597
  var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
32597
32598
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
32598
32599
  if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
@@ -32606,16 +32607,22 @@ var __param = (undefined && undefined.__param) || function (paramIndex, decorato
32606
32607
 
32607
32608
 
32608
32609
 
32610
+
32609
32611
  let VerifyPasswordModalComponent = class VerifyPasswordModalComponent {
32610
- constructor(localization) {
32612
+ constructor(localization, injector) {
32611
32613
  this.localization = localization;
32612
32614
  this._onClosed = new rxjs__WEBPACK_IMPORTED_MODULE_1__[/* Subject */ "a"]();
32613
32615
  this.passwordError = false;
32616
+ this.isMobileMode = false;
32617
+ this.isDisplayModeMobile = _settings__WEBPACK_IMPORTED_MODULE_4__[/* DisplayMode */ "a"].Mobile === injector.get(_settings__WEBPACK_IMPORTED_MODULE_4__[/* GlobalSettings */ "b"]).displayMode;
32614
32618
  }
32615
32619
  get onClosed() {
32616
32620
  return this._onClosed;
32617
32621
  }
32618
32622
  ngOnInit() {
32623
+ // 画面模拟(SimulateRemoteGuiContext)下 releasedVariableService 恒为空,
32624
+ // 借此和真实移动端区分开,避免在 PC 浏览器模拟移动端时套用移动端专属样式
32625
+ this.isMobileMode = this.isDisplayModeMobile && !!this.releasedVariableService;
32619
32626
  this.validate();
32620
32627
  }
32621
32628
  validate() {
@@ -32649,8 +32656,8 @@ let VerifyPasswordModalComponent = class VerifyPasswordModalComponent {
32649
32656
  VerifyPasswordModalComponent = __decorate([
32650
32657
  Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Component"])({
32651
32658
  selector: 'verify-password',
32652
- template: "<form #verifyPasswordForm=\"ngForm\" novalidate (ngSubmit)=\"checkSecurity()\" bs-modal-drag> <div class=\"modal-header\"> <h4 class=\"modal-title\"> <span>{{localization.passwordVerify}}</span> </h4> <button type=\"button\" class=\"close pull-right\" aria-label=\"Close\" (click)=\"close()\"> <span aria-hidden=\"true\">&times;</span> </button> </div> <div class=\"modal-body\"> <span class=\"password-span\">{{localization.password}}: </span> <input type=\"password\" name=\"password\" autoFocus class=\"form-control element-password\" [(ngModel)]=\"password\" (keyup)=\"validate()\" autocomplete=\"off\"> <span class=\"help-block text-danger\" [hidden]=\"!passwordError\">{{validationErrorText}}</span> </div> <div class=\"modal-footer\"> <button type=\"button\" class=\"btn md-skip btn-cancel\" (click)=\"close()\">{{localization.cancel}} </button> <button type=\"submit\" class=\"btn md-skip btn-primary\" [disabled]=\"passwordError\">{{localization.submit}}</button> </div> </form> ",
32653
- styles: [".modal-header { padding: 10px; border-color: transparent; } .modal-body { position: relative; padding: 0px 5px !important; padding-top: 10px !important; } .modal-title { display: unset; margin-left: -6px; font-size: 16px !important; } .form-control { margin: 0 5%; float: none; width: 90%; } .modal-footer { padding: 10px 4px 20px 5px !important; text-align: right; border-color: transparent; color: #fff; } .text-danger { display: block; color: #ed6b75; font-size: 14px; margin: 5px 0px 0px 15px; } .btn-primary { color: #fff; height: 32px; margin-right: 10px; line-height: 0px } .password-span { color: #7f939e; font-size: 14px; margin-left: 15px; } .btn-cancel { color: #fff; height: 32px; min-width: 71px; margin-right: 6px; background-color: #dddddd; line-height: 0px } .element-password { padding-left: 8px; height: 32px; min-width: 71px; margin-left: 16px; } "]
32659
+ template: "<form #verifyPasswordForm=\"ngForm\" novalidate (ngSubmit)=\"checkSecurity()\" bs-modal-drag> <div class=\"modal-header\"> <h4 class=\"modal-title\"> <span>{{localization.passwordVerify}}</span> </h4> <button type=\"button\" class=\"close pull-right\" aria-label=\"Close\" (click)=\"close()\"> <span aria-hidden=\"true\">&times;</span> </button> </div> <div class=\"modal-body\"> <span class=\"password-span\">{{localization.password}}: </span> <input type=\"password\" name=\"password\" autoFocus [class.verify-password-input]=\"!isMobileMode\" class=\"form-control element-password\" [(ngModel)]=\"password\" (keyup)=\"validate()\" autocomplete=\"off\"> <span class=\"help-block text-danger\" [hidden]=\"!passwordError\">{{validationErrorText}}</span> </div> <div class=\"modal-footer\" [class.verify-password-footer]=\"!isMobileMode\"> <button type=\"button\" class=\"btn md-skip btn-cancel\" (click)=\"close()\">{{localization.cancel}} </button> <button type=\"submit\" class=\"btn md-skip btn-primary\" [disabled]=\"passwordError\">{{localization.submit}}</button> </div> </form> ",
32660
+ styles: [".modal-header { padding: 10px; border-color: transparent; } .modal-body { position: relative; padding: 0px 5px !important; padding-top: 10px !important; } .modal-title { display: unset; margin-left: -6px; font-size: 16px !important; } .form-control { margin: 0 5%; float: none; width: 90%; } .modal-footer { padding: 10px 4px 20px 5px !important; text-align: right; border-color: transparent; color: #fff; } .text-danger { display: block; color: #ed6b75; font-size: 14px; margin: 5px 0px 0px 15px; } .btn-primary { color: #fff; height: 32px; min-width: 71px; margin-right: 10px; line-height: 0px } .password-span { color: #7f939e; font-size: 14px; margin-left: 15px; } .btn-cancel { color: #fff; height: 32px; min-width: 71px; margin-right: 6px; background-color: #dddddd; line-height: 0px } .element-password { padding-left: 8px; height: 32px; min-width: 71px; margin-left: 16px; } .verify-password-input { width: 600px; } .verify-password-footer { padding-right: 18px !important; }"]
32654
32661
  }),
32655
32662
  __param(0, Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Inject"])(_localization__WEBPACK_IMPORTED_MODULE_3__[/* LOCALIZATION */ "b"]))
32656
32663
  ], VerifyPasswordModalComponent);
@@ -33040,7 +33047,7 @@ class Guid {
33040
33047
  "use strict";
33041
33048
  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return Subscriber; });
33042
33049
  /* unused harmony export SafeSubscriber */
33043
- /* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(13);
33050
+ /* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(14);
33044
33051
  /* harmony import */ var _util_isFunction__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(52);
33045
33052
  /* harmony import */ var _Observer__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(54);
33046
33053
  /* harmony import */ var _Subscription__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(25);
@@ -34485,7 +34492,7 @@ var ViewBackgroundFillType;
34485
34492
  })(ViewBackgroundFillType || (ViewBackgroundFillType = {}));
34486
34493
 
34487
34494
  // EXTERNAL MODULE: ./.tmp/shared/index.ts + 3 modules
34488
- var shared = __webpack_require__(5);
34495
+ var shared = __webpack_require__(6);
34489
34496
 
34490
34497
  // CONCATENATED MODULE: ./.tmp/model/shared/dynamic-display/dynamic-behavior-type.ts
34491
34498
  var DynamicBehaviorType;
@@ -35046,6 +35053,13 @@ class state_control_element_StateControlElement extends conditional_dynamic_disp
35046
35053
  this.isEnable = true;
35047
35054
  this.elementStates = [];
35048
35055
  }
35056
+ /**
35057
+ * 子类可覆盖此方法提供元件当前大小和初始大小,用于状态图标缩放计算
35058
+ * @returns {{ width: number, height: number, initWidth?: number, initHeight?: number }}
35059
+ */
35060
+ getElementSizeForIconScale() {
35061
+ return null;
35062
+ }
35049
35063
  initState() {
35050
35064
  if (!this.elementStates.length) {
35051
35065
  return;
@@ -35196,7 +35210,18 @@ class state_control_element_StateControlElement extends conditional_dynamic_disp
35196
35210
  const imgObj = document.createElementNS('http://www.w3.org/2000/svg', 'image');
35197
35211
  if (imgObj) {
35198
35212
  const currentRectElement = this.currentRect[0];
35199
- let x = Number(currentRectElement.getAttribute('width')) - 20;
35213
+ // 计算图标缩放比例
35214
+ const baseIconSize = 20;
35215
+ let iconSize = baseIconSize;
35216
+ const sizeInfo = this.getElementSizeForIconScale();
35217
+ if (sizeInfo && sizeInfo.initWidth && sizeInfo.initHeight) {
35218
+ const scaleX = sizeInfo.width / sizeInfo.initWidth;
35219
+ const scaleY = sizeInfo.height / sizeInfo.initHeight;
35220
+ // 取较小值,避免图标超出元件边界
35221
+ const scale = Math.min(scaleX, scaleY);
35222
+ iconSize = baseIconSize * scale;
35223
+ }
35224
+ let x = Number(currentRectElement.getAttribute('width')) - iconSize;
35200
35225
  const currentRectX = currentRectElement.getAttribute('x');
35201
35226
  if (currentRectX !== null) {
35202
35227
  x += Number(currentRectX);
@@ -35207,8 +35232,8 @@ class state_control_element_StateControlElement extends conditional_dynamic_disp
35207
35232
  imgObj.setAttributeNS(null, 'id', 'StateImage');
35208
35233
  imgObj.setAttributeNS(null, 'x', x.toString());
35209
35234
  imgObj.setAttributeNS(null, 'y', '0');
35210
- imgObj.setAttributeNS(null, 'height', '20px');
35211
- imgObj.setAttributeNS(null, 'width', '20px');
35235
+ imgObj.setAttributeNS(null, 'height', iconSize + 'px');
35236
+ imgObj.setAttributeNS(null, 'width', iconSize + 'px');
35212
35237
  const titleElement = document.createElementNS('http://www.w3.org/2000/svg', 'title');
35213
35238
  const text = document.createTextNode(title);
35214
35239
  titleElement.appendChild(text);
@@ -35335,7 +35360,7 @@ class conditional_enable_element_ConditionalEnableElement extends state_control_
35335
35360
  }
35336
35361
 
35337
35362
  // EXTERNAL MODULE: ./.tmp/config/index.ts + 12 modules
35338
- var _tmp_config = __webpack_require__(6);
35363
+ var _tmp_config = __webpack_require__(5);
35339
35364
 
35340
35365
  // CONCATENATED MODULE: ./.tmp/elements/base/readable-element.ts
35341
35366
 
@@ -35481,7 +35506,7 @@ function degreesToRadians(degrees) {
35481
35506
  }
35482
35507
 
35483
35508
  // EXTERNAL MODULE: ./.tmp/model/shared/condition/variable-value-type.ts
35484
- var variable_value_type = __webpack_require__(12);
35509
+ var variable_value_type = __webpack_require__(13);
35485
35510
 
35486
35511
  // CONCATENATED MODULE: ./.tmp/elements/bar-graph-element.ts
35487
35512
 
@@ -35742,11 +35767,12 @@ var confirm_operation_modal_component = __webpack_require__(21);
35742
35767
 
35743
35768
  // CONCATENATED MODULE: ./.tmp/modal/write-character/write-character-modal-args.ts
35744
35769
  class WriteCharacterModalArgs {
35745
- constructor(variableName, isPassword, charCount, originValue) {
35770
+ constructor(variableName, isPassword, charCount, originValue, releasedVariableService) {
35746
35771
  this.variableName = variableName;
35747
35772
  this.isPassword = isPassword;
35748
35773
  this.charCount = charCount;
35749
35774
  this.originValue = originValue;
35775
+ this.releasedVariableService = releasedVariableService;
35750
35776
  }
35751
35777
  }
35752
35778
 
@@ -35927,12 +35953,13 @@ class text_element_TextElementModal {
35927
35953
 
35928
35954
 
35929
35955
  class character_display_element_CharacterDisplayElement extends readable_element_ReadableElement {
35930
- constructor(element, injector, modalService, variableCommunicator, graphStore, permissionChecker, operationRecordService, securityChecker, variableStore, localization, signalRAppId) {
35956
+ constructor(element, injector, modalService, variableCommunicator, graphStore, permissionChecker, operationRecordService, securityChecker, variableStore, localization, signalRAppId, releasedVariableService) {
35931
35957
  super(element, permissionChecker, variableCommunicator, variableStore, localization, signalRAppId);
35932
35958
  this.modalService = modalService;
35933
35959
  this.graphStore = graphStore;
35934
35960
  this.operationRecordService = operationRecordService;
35935
35961
  this.securityChecker = securityChecker;
35962
+ this.releasedVariableService = releasedVariableService;
35936
35963
  this.displayValue = '';
35937
35964
  this.graphs = new Map();
35938
35965
  this.logger = injector.get(logger["b" /* LOGGER_SERVICE_TOKEN */]);
@@ -36162,7 +36189,10 @@ class character_display_element_CharacterDisplayElement extends readable_element
36162
36189
  }
36163
36190
  checkElementPassword() {
36164
36191
  if (this.model.enablePassword) {
36165
- const modalRef = this.modalService.show(verify_password_modal_component["a" /* VerifyPasswordModalComponent */], { initialState: { securityChecker: this.securityChecker }, backdrop: 'static', class: 'gui-modal-dialog-position', animated: false });
36192
+ const modalRef = this.modalService.show(verify_password_modal_component["a" /* VerifyPasswordModalComponent */], {
36193
+ initialState: { securityChecker: this.securityChecker, releasedVariableService: this.releasedVariableService },
36194
+ backdrop: 'static', class: 'gui-modal-dialog-position', animated: false
36195
+ });
36166
36196
  const onClosedSub = modalRef.content.onClosed.subscribe(result => {
36167
36197
  modalRef.hide();
36168
36198
  onClosedSub.unsubscribe();
@@ -36179,7 +36209,15 @@ class character_display_element_CharacterDisplayElement extends readable_element
36179
36209
  if (null == this.writeVariableName) {
36180
36210
  return;
36181
36211
  }
36182
- const args = new WriteCharacterModalArgs(this.writeVariableName, this.model.isPassword, this.model.charCount, this.displayValue);
36212
+ // 优先使用接口返回的实时字符长度,如果获取不到则使用页面配置中的长度
36213
+ let charCount = this.model.charCount;
36214
+ if (this.variableStore.getCharCountByVariableName) {
36215
+ const runtimeCharCount = this.variableStore.getCharCountByVariableName(this.writeVariableName);
36216
+ if (runtimeCharCount !== undefined) {
36217
+ charCount = runtimeCharCount;
36218
+ }
36219
+ }
36220
+ const args = new WriteCharacterModalArgs(this.writeVariableName, this.model.isPassword, charCount, this.displayValue, this.releasedVariableService);
36183
36221
  const modalRef = this.modalService.show(write_character_modal_component["a" /* WriteCharacterModalComponent */], {
36184
36222
  initialState: { args: args }, backdrop: 'static', class: 'gui-modal-dialog-position gui-modal-write', animated: false
36185
36223
  });
@@ -36224,6 +36262,21 @@ class character_display_element_CharacterDisplayElement extends readable_element
36224
36262
  this.rootElement.select('image').attr('xlink:href', null);
36225
36263
  }
36226
36264
  }
36265
+ /**
36266
+ * 提供元件尺寸信息用于状态图标缩放
36267
+ */
36268
+ getElementSizeForIconScale() {
36269
+ var _a, _b;
36270
+ if (this.model.size) {
36271
+ return {
36272
+ width: this.model.size.width,
36273
+ height: this.model.size.height,
36274
+ initWidth: (_a = this.model.initSize) === null || _a === void 0 ? void 0 : _a.width,
36275
+ initHeight: (_b = this.model.initSize) === null || _b === void 0 ? void 0 : _b.height
36276
+ };
36277
+ }
36278
+ return null;
36279
+ }
36227
36280
  }
36228
36281
 
36229
36282
  // EXTERNAL MODULE: ./node_modules/moment/moment.js
@@ -37124,7 +37177,7 @@ var HistoricalCurveTimeRange;
37124
37177
  })(HistoricalCurveTimeRange || (HistoricalCurveTimeRange = {}));
37125
37178
 
37126
37179
  // EXTERNAL MODULE: ./.tmp/service/index.ts
37127
- var service = __webpack_require__(14);
37180
+ var service = __webpack_require__(15);
37128
37181
 
37129
37182
  // CONCATENATED MODULE: ./.tmp/elements/historical-curve/historical-curve-element-status.ts
37130
37183
  var HistoricalCurveElementStatus;
@@ -37136,7 +37189,7 @@ var HistoricalCurveElementStatus;
37136
37189
  })(HistoricalCurveElementStatus || (HistoricalCurveElementStatus = {}));
37137
37190
 
37138
37191
  // EXTERNAL MODULE: ./.tmp/settings/index.ts + 2 modules
37139
- var _tmp_settings = __webpack_require__(15);
37192
+ var _tmp_settings = __webpack_require__(12);
37140
37193
 
37141
37194
  // CONCATENATED MODULE: ./.tmp/model/historical-curve/curve-type.ts
37142
37195
  var CurveType;
@@ -37228,6 +37281,16 @@ class historical_curve_element_HistoricalCurveElement extends conditional_displa
37228
37281
  // 订阅语种变化事件 和 文本库缓存更新事件
37229
37282
  this.subscribeLanguageChange();
37230
37283
  }
37284
+ getIconScale() {
37285
+ const initSize = this.model.displaySetting.initSize;
37286
+ const size = this.model.displaySetting.size;
37287
+ if (!initSize || !initSize.width || !initSize.height) {
37288
+ return 1;
37289
+ }
37290
+ const scaleX = size.width / initSize.width;
37291
+ const scaleY = size.height / initSize.height;
37292
+ return Math.min(scaleX, scaleY);
37293
+ }
37231
37294
  dispose() {
37232
37295
  clearInterval(this.refreshIntervalId);
37233
37296
  if (this.chartElement) {
@@ -37493,7 +37556,10 @@ class historical_curve_element_HistoricalCurveElement extends conditional_displa
37493
37556
  }
37494
37557
  renderChart(result) {
37495
37558
  const chartWidth = this.model.displaySetting.size.width;
37496
- const chartHeight = this.model.displaySetting.size.height - this.displayOption.operationAreaHeight - this.displayOption.operationAreaMarginTop;
37559
+ const scale = this.getIconScale();
37560
+ // 图表主体与底部操作区之间的预留高度,需要与操作区渲染时使用的同一个 scale 保持一致,
37561
+ // 否则图表按未缩放高度占满后,缩放后的操作区会超出元件整体高度
37562
+ const chartHeight = this.model.displaySetting.size.height - (this.displayOption.operationAreaHeight + this.displayOption.operationAreaMarginTop) * scale;
37497
37563
  const data = new Array();
37498
37564
  Object(lodash["each"])(this.model.dataSetting.channels, (channel, key) => {
37499
37565
  const values = new Array();
@@ -37503,10 +37569,10 @@ class historical_curve_element_HistoricalCurveElement extends conditional_displa
37503
37569
  this.data = data;
37504
37570
  let chart;
37505
37571
  if (this.model.displaySetting.curveType === CurveType.BarGroup || this.model.displaySetting.curveType === CurveType.BarStack) {
37506
- chart = this.getMultiBarWithFocusChart(chartWidth, chartHeight, data);
37572
+ chart = this.getMultiBarWithFocusChart(chartWidth, chartHeight, data, scale);
37507
37573
  }
37508
37574
  else {
37509
- chart = this.getLineChart(chartWidth, chartHeight, data);
37575
+ chart = this.getLineChart(chartWidth, chartHeight, data, scale);
37510
37576
  }
37511
37577
  // 设置 tooltip 自动隐藏逻辑
37512
37578
  this.setupTooltipAutoHide(chart);
@@ -37556,7 +37622,7 @@ class historical_curve_element_HistoricalCurveElement extends conditional_displa
37556
37622
  console.log(e);
37557
37623
  }
37558
37624
  }
37559
- getLineChart(chartWidth, chartHeight, data) {
37625
+ getLineChart(chartWidth, chartHeight, data, scale = 1) {
37560
37626
  const chart = nv_d3["models"].lineChart().showLegend(true)
37561
37627
  .margin({ top: 0, bottom: 0, left: this.displayOption.marginLeft, right: this.displayOption.marginRight })
37562
37628
  .noData(this.localization.chartNoData);
@@ -37570,7 +37636,7 @@ class historical_curve_element_HistoricalCurveElement extends conditional_displa
37570
37636
  chart.focus.showXAxis(false);
37571
37637
  }
37572
37638
  this.renderCommonProperty(chart, chartWidth, chartHeight, data);
37573
- this.renderOperationArea(chartWidth, chartHeight);
37639
+ this.renderOperationArea(chartWidth, chartHeight, scale);
37574
37640
  this.initPoint();
37575
37641
  chart.legend.dispatch.on('legendClick', () => {
37576
37642
  setTimeout(() => {
@@ -37586,7 +37652,7 @@ class historical_curve_element_HistoricalCurveElement extends conditional_displa
37586
37652
  });
37587
37653
  return chart;
37588
37654
  }
37589
- getMultiBarWithFocusChart(chartWidth, chartHeight, data) {
37655
+ getMultiBarWithFocusChart(chartWidth, chartHeight, data, scale = 1) {
37590
37656
  const chart = nv_d3["models"].multiBarWithFocusChart()
37591
37657
  .margin({
37592
37658
  top: 0, bottom: 0, left: this.displayOption.marginLeft, right: this.displayOption.marginRight
@@ -37609,7 +37675,7 @@ class historical_curve_element_HistoricalCurveElement extends conditional_displa
37609
37675
  }
37610
37676
  chart.xAxis.tickFormat(d => this.timeFormat(d, '%x %X'));
37611
37677
  this.renderCommonProperty(chart, chartWidth, chartHeight, data);
37612
- this.renderOperationArea(chartWidth, chartHeight);
37678
+ this.renderOperationArea(chartWidth, chartHeight, scale);
37613
37679
  const focusContext = this.rootElement.select('.nv-context');
37614
37680
  focusContext.select('.nv-barsWrap.nvd3-svg').attr('transform', 'translate(0,30)');
37615
37681
  focusContext.select('.nv-brushBackground').attr('transform', 'translate(0,30)');
@@ -37770,17 +37836,17 @@ class historical_curve_element_HistoricalCurveElement extends conditional_displa
37770
37836
  .remove();
37771
37837
  }
37772
37838
  }
37773
- renderOperationArea(chartWidth, chartHeight) {
37839
+ renderOperationArea(chartWidth, chartHeight, scale = 1) {
37774
37840
  const backgroundColor = this.model.displaySetting.axisSetting.filterBackgroudColor || 'inherit';
37775
- const operationArea = this.rootElement.append('g').attr('transform', `translate(0,${chartHeight + this.displayOption.operationAreaMarginTop})`)
37776
- .append('foreignObject').attr('width', chartWidth).attr('height', this.displayOption.operationAreaHeight).attr('fill', 'none')
37777
- .append('xhtml:div').style('height', (this.displayOption.operationAreaHeight - 4) + 'px').style('overflow', 'hidden').style('margin-top', '4px');
37841
+ const operationArea = this.rootElement.append('g').attr('transform', `translate(0,${chartHeight + this.displayOption.operationAreaMarginTop * scale})`)
37842
+ .append('foreignObject').attr('width', chartWidth).attr('height', this.displayOption.operationAreaHeight * scale).attr('fill', 'none')
37843
+ .append('xhtml:div').style('height', (this.displayOption.operationAreaHeight * scale - 4) + 'px').style('overflow', 'hidden').style('margin-top', '4px');
37778
37844
  const rect = this.$element.parent().parent().find('rect');
37779
37845
  const fillColor = rect.attr('fill');
37780
37846
  const dropdownBg = this.model.displaySetting.axisSetting.filterBackgroudColor || fillColor || '#fff';
37781
37847
  const dropdownWrapper = operationArea.append('div')
37782
37848
  .style('display', 'inline-block')
37783
- .style('margin-left', this.displayOption.marginLeft + 'px')
37849
+ .style('margin-left', (this.displayOption.marginLeft * scale) + 'px')
37784
37850
  .style('vertical-align', 'middle');
37785
37851
  const selectedText = this.timePeriods.find(t => t.key === Number(this.currentTimePeriod));
37786
37852
  const arrowIconUrl = 'url("data:image/svg+xml,'
@@ -37792,14 +37858,14 @@ class historical_curve_element_HistoricalCurveElement extends conditional_displa
37792
37858
  .style('background-image', arrowIconUrl)
37793
37859
  .style('background-repeat', 'no-repeat')
37794
37860
  .style('background-position', 'right 4px center')
37795
- .style('font-size', this.displayOption.operationSelectFontSize)
37861
+ .style('font-size', (parseFloat(this.displayOption.operationSelectFontSize) * scale) + 'px')
37796
37862
  .style('cursor', 'pointer')
37797
37863
  .style('padding', '0 18px 0 4px')
37798
37864
  .style('border', '1px solid #ccc')
37799
37865
  .style('border-radius', '2px')
37800
37866
  .style('white-space', 'nowrap')
37801
- .style('line-height', (this.displayOption.operationAreaHeight - 8) + 'px')
37802
- .style('min-height', (this.displayOption.operationAreaHeight - 8) + 'px')
37867
+ .style('line-height', (this.displayOption.operationAreaHeight * scale - 8) + 'px')
37868
+ .style('min-height', (this.displayOption.operationAreaHeight * scale - 8) + 'px')
37803
37869
  .text(selectedText ? selectedText.name : '');
37804
37870
  const dropdownListEl = document.createElement('div');
37805
37871
  dropdownListEl.style.cssText = 'display:none;position:fixed;background:' + dropdownBg
@@ -37814,9 +37880,9 @@ class historical_curve_element_HistoricalCurveElement extends conditional_displa
37814
37880
  .style('padding', '4px 8px')
37815
37881
  .style('cursor', 'pointer')
37816
37882
  .style('white-space', 'nowrap')
37817
- .style('font-size', this.displayOption.operationSelectFontSize)
37818
- .style('line-height', (this.displayOption.operationAreaHeight - 8) + 'px')
37819
- .style('min-height', (this.displayOption.operationAreaHeight - 8) + 'px')
37883
+ .style('font-size', (parseFloat(this.displayOption.operationSelectFontSize) * scale) + 'px')
37884
+ .style('line-height', (this.displayOption.operationAreaHeight * scale - 8) + 'px')
37885
+ .style('min-height', (this.displayOption.operationAreaHeight * scale - 8) + 'px')
37820
37886
  .style('background', tp.key === Number(this.currentTimePeriod) ? '#1890ff' : 'transparent')
37821
37887
  .style('color', tp.key === Number(this.currentTimePeriod) ? '#fff' : '#333')
37822
37888
  .text(tp.name)
@@ -37911,24 +37977,24 @@ class historical_curve_element_HistoricalCurveElement extends conditional_displa
37911
37977
  window.addEventListener('resize', this._resizeHideHandler);
37912
37978
  // 滚动时收起
37913
37979
  document.addEventListener('scroll', hideDropdown, true);
37914
- const buttonWidth = this.displayOption.operationButtonWidth + 'px', buttonHeight = this.displayOption.operationButtonHeight + 'px';
37980
+ const buttonWidth = (this.displayOption.operationButtonWidth * scale) + 'px', buttonHeight = (this.displayOption.operationButtonHeight * scale) + 'px';
37915
37981
  operationArea.append('button').style('width', buttonWidth).style('height', buttonHeight).style('border', 'none')
37916
37982
  .style('float', 'right').style('background-image', 'url(assets/img/black_last_page.png)')
37917
37983
  .style('background-color', backgroundColor).style('background-size', 'cover')
37918
37984
  .on('click', () => { this.loadLastPage(); });
37919
37985
  operationArea.append('button').style('width', buttonWidth).style('height', buttonHeight).style('border', 'none')
37920
37986
  .style('float', 'right').style('background-image', 'url(assets/img/black_next_page.png)')
37921
- .style('margin', `0 ${this.displayOption.operationButtonMargin}px 0 0`)
37987
+ .style('margin', `0 ${this.displayOption.operationButtonMargin * scale}px 0 0`)
37922
37988
  .style('background-color', backgroundColor).style('background-size', 'cover')
37923
37989
  .on('click', () => { this.loadNextPage(); });
37924
37990
  operationArea.append('button').style('width', buttonWidth).style('height', buttonHeight).style('border', 'none')
37925
37991
  .style('float', 'right').style('background-image', 'url(assets/img/black_previous_page.png)')
37926
- .style('margin', `0 ${this.displayOption.operationButtonMargin}px 0 0`)
37992
+ .style('margin', `0 ${this.displayOption.operationButtonMargin * scale}px 0 0`)
37927
37993
  .style('background-color', backgroundColor).style('background-size', 'cover')
37928
37994
  .on('click', () => { this.loadPreviousPage(); });
37929
37995
  operationArea.append('button').style('width', buttonWidth).style('height', buttonHeight).style('border', 'none')
37930
37996
  .style('float', 'right').style('background-image', 'url(assets/img/black_first_page.png)')
37931
- .style('margin', `0 ${this.displayOption.operationButtonMargin}px 0 0`)
37997
+ .style('margin', `0 ${this.displayOption.operationButtonMargin * scale}px 0 0`)
37932
37998
  .style('background-color', backgroundColor).style('background-size', 'cover')
37933
37999
  .on('click', () => { this.loadFirstPage(); });
37934
38000
  }
@@ -38513,7 +38579,10 @@ class numerical_display_element_NumericalDisplayElement extends readable_element
38513
38579
  }
38514
38580
  checkElementPassword() {
38515
38581
  if (this.model.enablePassword) {
38516
- const modalRef = this.modalService.show(verify_password_modal_component["a" /* VerifyPasswordModalComponent */], { initialState: { securityChecker: this.securityChecker }, backdrop: 'static', class: 'gui-modal-dialog-position', animated: false });
38582
+ const modalRef = this.modalService.show(verify_password_modal_component["a" /* VerifyPasswordModalComponent */], {
38583
+ initialState: { securityChecker: this.securityChecker, releasedVariableService: this.releasedVariableService },
38584
+ backdrop: 'static', class: 'gui-modal-dialog-position', animated: false
38585
+ });
38517
38586
  const onClosedSub = modalRef.content.onClosed.subscribe(result => {
38518
38587
  modalRef.hide();
38519
38588
  onClosedSub.unsubscribe();
@@ -38840,6 +38909,21 @@ class numerical_display_element_NumericalDisplayElement extends readable_element
38840
38909
  }
38841
38910
  return displayText;
38842
38911
  }
38912
+ /**
38913
+ * 提供元件尺寸信息用于状态图标缩放
38914
+ */
38915
+ getElementSizeForIconScale() {
38916
+ var _a, _b;
38917
+ if (this.model.size) {
38918
+ return {
38919
+ width: this.model.size.width,
38920
+ height: this.model.size.height,
38921
+ initWidth: (_a = this.model.initSize) === null || _a === void 0 ? void 0 : _a.width,
38922
+ initHeight: (_b = this.model.initSize) === null || _b === void 0 ? void 0 : _b.height
38923
+ };
38924
+ }
38925
+ return null;
38926
+ }
38843
38927
  }
38844
38928
 
38845
38929
  // EXTERNAL MODULE: ./.tmp/model/shared/condition/condition-type.ts
@@ -40516,8 +40600,12 @@ class switch_indicator_light_element_SwitchIndicatorLightElement extends conditi
40516
40600
  };
40517
40601
  }
40518
40602
  checkElementPassword(afterConfirm) {
40603
+ var _a;
40519
40604
  if (this.model.enablePassword) {
40520
- const modalRef = this.modalService.show(verify_password_modal_component["a" /* VerifyPasswordModalComponent */], { initialState: { securityChecker: this.securityChecker }, backdrop: 'static', class: 'gui-modal-dialog-position', animated: false });
40605
+ const modalRef = this.modalService.show(verify_password_modal_component["a" /* VerifyPasswordModalComponent */], {
40606
+ initialState: { securityChecker: this.securityChecker, releasedVariableService: (_a = this.guiContext) === null || _a === void 0 ? void 0 : _a.releasedVariableService },
40607
+ backdrop: 'static', class: 'gui-modal-dialog-position', animated: false
40608
+ });
40521
40609
  const onClosedSub = modalRef.content.onClosed.subscribe(result => {
40522
40610
  modalRef.hide();
40523
40611
  onClosedSub.unsubscribe();
@@ -40663,6 +40751,21 @@ class switch_indicator_light_element_SwitchIndicatorLightElement extends conditi
40663
40751
  this.textStateElement = new text_state_element_TextStateElement(this.model.states, width, height, this.logger, this.model.version, this.model.states, this.model.textLibrary, this.textLibraryService, this.languageService, this.guiContext, true, this.model.fontStyleCultures);
40664
40752
  this.$element.append(this.textStateElement.Element);
40665
40753
  }
40754
+ /**
40755
+ * 提供元件尺寸信息用于状态图标缩放
40756
+ */
40757
+ getElementSizeForIconScale() {
40758
+ var _a, _b;
40759
+ if (this.model.size) {
40760
+ return {
40761
+ width: this.model.size.width,
40762
+ height: this.model.size.height,
40763
+ initWidth: (_a = this.model.initSize) === null || _a === void 0 ? void 0 : _a.width,
40764
+ initHeight: (_b = this.model.initSize) === null || _b === void 0 ? void 0 : _b.height
40765
+ };
40766
+ }
40767
+ return null;
40768
+ }
40666
40769
  /**
40667
40770
  * 释放资源
40668
40771
  */
@@ -41200,8 +41303,12 @@ class view_operation_element_ViewOperationElement extends conditional_enable_ele
41200
41303
  }
41201
41304
  }
41202
41305
  checkElementPassword() {
41306
+ var _a;
41203
41307
  if (this.model.enablePassword) {
41204
- const modalRef = this.modalService.show(verify_password_modal_component["a" /* VerifyPasswordModalComponent */], { initialState: { securityChecker: this.securityChecker }, backdrop: 'static', class: 'gui-modal-dialog-position', animated: false });
41308
+ const modalRef = this.modalService.show(verify_password_modal_component["a" /* VerifyPasswordModalComponent */], {
41309
+ initialState: { securityChecker: this.securityChecker, releasedVariableService: (_a = this.guiContext) === null || _a === void 0 ? void 0 : _a.releasedVariableService },
41310
+ backdrop: 'static', class: 'gui-modal-dialog-position', animated: false
41311
+ });
41205
41312
  const onClosedSub = modalRef.content.onClosed.subscribe(result => {
41206
41313
  modalRef.hide();
41207
41314
  onClosedSub.unsubscribe();
@@ -41245,7 +41352,8 @@ class view_operation_element_ViewOperationElement extends conditional_enable_ele
41245
41352
  popView() {
41246
41353
  const viewIndex = this.model.viewIndex;
41247
41354
  if (null != viewIndex) {
41248
- this.popupViewService.popView(viewIndex, this.hostContainerId, this.el).subscribe(() => this.recordViewOperation(), error => this.logger.error(`ToggleView(${viewIndex}) failed. ${error}`));
41355
+ const triggerRect = this.$element[0].getBoundingClientRect();
41356
+ this.popupViewService.popView(viewIndex, this.hostContainerId, this.el, triggerRect).subscribe(() => this.recordViewOperation(), error => this.logger.error(`ToggleView(${viewIndex}) failed. ${error}`));
41249
41357
  $(`#${this.hostContainerId} video`)
41250
41358
  .addClass('video-hidden')
41251
41359
  .css('visibility', 'hidden');
@@ -42440,6 +42548,15 @@ class alarm_element_AlarmElement extends conditional_display_element_Conditional
42440
42548
  this.page = 0;
42441
42549
  this.totalCount = 0;
42442
42550
  this.pageSize = 5;
42551
+ this.maxVisibleRows = 15;
42552
+ this.rowHeight = 0;
42553
+ this.isDisposed = false;
42554
+ this.handleScrollMouseEnter = () => {
42555
+ clearInterval(this.scrollIntervalId);
42556
+ };
42557
+ this.handleScrollMouseLeave = () => {
42558
+ this.startAutoScroll();
42559
+ };
42443
42560
  this.rootElement.selectAll('*').remove();
42444
42561
  this.setStatusAsLoading();
42445
42562
  this.logger = injector.get(logger["b" /* LOGGER_SERVICE_TOKEN */]);
@@ -42454,7 +42571,14 @@ class alarm_element_AlarmElement extends conditional_display_element_Conditional
42454
42571
  this.updateQueryTimeRange();
42455
42572
  if (this.model.filterSetting.alarmType) {
42456
42573
  this.refreshIntervalId = setInterval(() => {
42457
- this.loadFirstPage();
42574
+ if (this.model.generalSetting.autoScroll) {
42575
+ // 开启滚动时,仅更新数据不重渲染,保持滚动进度
42576
+ this.refreshCurrentPageData();
42577
+ }
42578
+ else {
42579
+ // 未开启滚动时,返回第一页
42580
+ this.loadFirstPage();
42581
+ }
42458
42582
  this.logger.debug(`[GUI]Refresh Alarm Table:${d3["time"].format('%x %X')(new Date())}`);
42459
42583
  }, this.model.filterSetting.refreshCycle * 60 * 1000);
42460
42584
  }
@@ -42462,7 +42586,14 @@ class alarm_element_AlarmElement extends conditional_display_element_Conditional
42462
42586
  variableCommunicator.subscribeUserDeviceAlarms(signalRAppId).subscribe(alarms => {
42463
42587
  alarms.forEach(alarm => {
42464
42588
  if (this.alarmNames.indexOf(alarm.name) !== -1) {
42465
- this.getAlarmData();
42589
+ if (this.model.generalSetting.autoScroll) {
42590
+ // 开启滚动时,刷新当前页并保持滚动进度
42591
+ this.refreshCurrentPageData();
42592
+ }
42593
+ else {
42594
+ // 未开启滚动时,刷新当前页(原有逻辑)
42595
+ this.getAlarmData();
42596
+ }
42466
42597
  return;
42467
42598
  }
42468
42599
  });
@@ -42477,10 +42608,11 @@ class alarm_element_AlarmElement extends conditional_display_element_Conditional
42477
42608
  }
42478
42609
  }
42479
42610
  dispose() {
42611
+ this.isDisposed = true;
42480
42612
  clearInterval(this.refreshIntervalId);
42481
- if (this.element) {
42482
- this.element.tooltip.hidden(true);
42483
- }
42613
+ clearInterval(this.scrollIntervalId);
42614
+ clearTimeout(this.getAlarmDataId);
42615
+ this.unbindScrollHoverEvents();
42484
42616
  // 取消语种变化订阅
42485
42617
  if (this.languageChangeSubscription) {
42486
42618
  this.languageChangeSubscription.unsubscribe();
@@ -42602,15 +42734,21 @@ class alarm_element_AlarmElement extends conditional_display_element_Conditional
42602
42734
  return '';
42603
42735
  }
42604
42736
  getAlarmData() {
42737
+ clearInterval(this.scrollIntervalId);
42738
+ this.unbindScrollHoverEvents();
42605
42739
  this.rootElement.selectAll('*').remove();
42606
42740
  this.setStatusAsLoading();
42607
42741
  clearTimeout(this.getAlarmDataId);
42608
42742
  this.getAlarmDataId = setTimeout(() => {
42743
+ if (this.isDisposed)
42744
+ return;
42609
42745
  this.timePeriods = this.getValidTimePeriods();
42610
42746
  if (this.model.filterSetting.alarmType) {
42611
42747
  this.updateQueryTimeRange();
42612
42748
  const input = new _tmp_config["c" /* GetAlarmsArgs */](this.alarmNames, this.startTime, this.endTime, this.pageSize, this.page * this.pageSize);
42613
42749
  this.alarmsStore.getHistoryAlarms(input).subscribe(result => {
42750
+ if (this.isDisposed)
42751
+ return;
42614
42752
  if (!result.error) {
42615
42753
  this.totalCount = result.totalCount;
42616
42754
  this.alarmList = result.items.map(item => [
@@ -42626,6 +42764,8 @@ class alarm_element_AlarmElement extends conditional_display_element_Conditional
42626
42764
  else {
42627
42765
  const input = new _tmp_config["c" /* GetAlarmsArgs */](this.alarmNames, undefined, undefined, this.pageSize, this.page * this.pageSize);
42628
42766
  this.alarmsStore.getCurrentAlarms(input).subscribe(result => {
42767
+ if (this.isDisposed)
42768
+ return;
42629
42769
  if (!result.error) {
42630
42770
  this.totalCount = result.totalCount;
42631
42771
  this.currentAlarmList = result.items;
@@ -42646,16 +42786,124 @@ class alarm_element_AlarmElement extends conditional_display_element_Conditional
42646
42786
  }
42647
42787
  }, 500);
42648
42788
  }
42789
+ refreshCurrentPageData() {
42790
+ var _a;
42791
+ if (this.isDisposed)
42792
+ return;
42793
+ const currentScrollTop = ((_a = this.scrollContainer) === null || _a === void 0 ? void 0 : _a.scrollTop) || 0;
42794
+ if (this.model.filterSetting.alarmType) {
42795
+ this.updateQueryTimeRange();
42796
+ const input = new _tmp_config["c" /* GetAlarmsArgs */](this.alarmNames, this.startTime, this.endTime, this.pageSize, this.page * this.pageSize);
42797
+ this.alarmsStore.getHistoryAlarms(input).subscribe(result => {
42798
+ if (this.isDisposed)
42799
+ return;
42800
+ if (!result.error) {
42801
+ this.totalCount = result.totalCount;
42802
+ this.alarmList = result.items.map(item => [
42803
+ item.name,
42804
+ item.message,
42805
+ item.alarmLevel,
42806
+ item.triggeredTime.format('YYYY-MM-DD HH:mm:ss')
42807
+ ]);
42808
+ this.updateTableContent();
42809
+ if (this.scrollContainer) {
42810
+ this.scrollContainer.scrollTop = currentScrollTop;
42811
+ }
42812
+ }
42813
+ });
42814
+ }
42815
+ else {
42816
+ const input = new _tmp_config["c" /* GetAlarmsArgs */](this.alarmNames, undefined, undefined, this.pageSize, this.page * this.pageSize);
42817
+ this.alarmsStore.getCurrentAlarms(input).subscribe(result => {
42818
+ if (this.isDisposed)
42819
+ return;
42820
+ if (!result.error) {
42821
+ this.totalCount = result.totalCount;
42822
+ this.currentAlarmList = result.items;
42823
+ if (!result.items.length && result.totalCount) {
42824
+ this.page = 0;
42825
+ this.refreshCurrentPageData();
42826
+ return;
42827
+ }
42828
+ this.alarmList = this.currentAlarmList.map(item => [
42829
+ item.name,
42830
+ item.message,
42831
+ item.alarmLevel,
42832
+ item.triggeredTime.format('YYYY-MM-DD HH:mm:ss')
42833
+ ]);
42834
+ this.updateTableContent();
42835
+ if (this.scrollContainer) {
42836
+ this.scrollContainer.scrollTop = currentScrollTop;
42837
+ }
42838
+ }
42839
+ });
42840
+ }
42841
+ }
42842
+ updateTableContent() {
42843
+ if (!this.element)
42844
+ return;
42845
+ const useScroll = this.pageSize > this.maxVisibleRows;
42846
+ const dataRowHeight = this.model.heights[1] || this.model.heights[0];
42847
+ // 查找表格主体
42848
+ let tbody;
42849
+ if (useScroll) {
42850
+ const bodyContainer = this.element.querySelector('div > div:nth-child(2)');
42851
+ if (!bodyContainer)
42852
+ return;
42853
+ const bodyTable = bodyContainer.querySelector('table');
42854
+ if (!bodyTable)
42855
+ return;
42856
+ tbody = bodyTable;
42857
+ }
42858
+ else {
42859
+ const table = this.element.querySelector('table');
42860
+ if (!table)
42861
+ return;
42862
+ tbody = table;
42863
+ }
42864
+ // 清除现有数据行(保留表头)
42865
+ const rows = Array.from(tbody.querySelectorAll('tr'));
42866
+ rows.forEach((row, index) => {
42867
+ if (index > 0 || useScroll) { // 对于 scrollable 模式,表头在另一个 table,所以这里全部清除
42868
+ row.remove();
42869
+ }
42870
+ });
42871
+ // 重新生成数据行
42872
+ for (let row = 0; row < this.pageSize; row++) {
42873
+ const rowHeight = useScroll ? dataRowHeight : this.model.heights[row + 1];
42874
+ tbody.appendChild(this.buildDataRow(row, rowHeight));
42875
+ }
42876
+ }
42877
+ getIconScale() {
42878
+ const initSize = this.model.initSize;
42879
+ if (!initSize || !initSize.width || !initSize.height) {
42880
+ return 1;
42881
+ }
42882
+ const scaleX = this.model.size.width / initSize.width;
42883
+ const scaleY = this.model.size.height / initSize.height;
42884
+ return Math.min(scaleX, scaleY);
42885
+ }
42649
42886
  renderElement() {
42650
42887
  const elementHeight = this.model.size.height;
42651
42888
  this.element = document.createElementNS('http://www.w3.org/2000/svg', 'foreignObject');
42652
42889
  this.element.setAttribute('width', this.model.size.width.toString());
42653
42890
  this.element.setAttribute('height', elementHeight.toString());
42654
42891
  this.$element.append(this.element);
42655
- const table = document.createElement('table');
42656
- table.style.cssText = `border: 2px solid ${this.model.generalSetting.stroke};
42657
- height: ${elementHeight - 39}`;
42658
- let tr = document.createElement('tr');
42892
+ const scale = this.getIconScale();
42893
+ // 表格与底部操作区之间的预留高度,需要与操作区渲染时使用的同一个 scale 保持一致,
42894
+ // 否则表格按未缩放高度占满后,缩放后的操作区会超出元件整体高度
42895
+ const operationAreaReservedHeight = 39 * scale;
42896
+ const useScroll = this.pageSize > this.maxVisibleRows;
42897
+ if (useScroll) {
42898
+ this.renderScrollableTable(elementHeight, operationAreaReservedHeight);
42899
+ }
42900
+ else {
42901
+ this.renderPlainTable(elementHeight, operationAreaReservedHeight);
42902
+ }
42903
+ this.renderOperationArea(this.model.size.width, elementHeight - operationAreaReservedHeight, scale);
42904
+ }
42905
+ buildHeaderRow() {
42906
+ const tr = document.createElement('tr');
42659
42907
  let fontString = '';
42660
42908
  if (this.model.generalSetting.headerFont.isItalic) {
42661
42909
  fontString += 'italic ';
@@ -42680,56 +42928,34 @@ class alarm_element_AlarmElement extends conditional_display_element_Conditional
42680
42928
  border-left-width: ${!col || this.model.generalSetting.isHiddenColumnSplitLine ? 0 : 1}px;`;
42681
42929
  tr.appendChild(th);
42682
42930
  }
42683
- table.appendChild(tr);
42931
+ return tr;
42932
+ }
42933
+ buildDataRow(row, rowHeight) {
42684
42934
  const levelColors = ['#3695FF', '#FFE900', '#FFA800', '#E84F4F'];
42685
- for (let row = 0; row < this.pageSize; row++) {
42686
- tr = document.createElement('tr');
42687
- tr.style.cssText = `height: ${this.model.heights[row + 1]}px;
42688
- background: ${this.model.generalSetting.tableFillColor};
42689
- font: ${this.model.generalSetting.fontStyle};
42690
- color: ${this.model.generalSetting.fontColor};
42691
- text-align: ${this.model.generalSetting.textAlign};
42692
- vertical-align: middle;`;
42693
- for (let col = 0; col < 4; col++) {
42694
- const td = document.createElement('td');
42695
- td.style.cssText = `border-style: solid;
42696
- border-color: ${this.model.generalSetting.splitLine};
42697
- border-top-width: ${this.model.generalSetting.isHiddenColumnSplitLine ? 0 : 1}px;
42698
- border-left-width: ${!col || this.model.generalSetting.isHiddenColumnSplitLine ? 0 : 1}px;`;
42699
- if (this.alarmList[row]) {
42700
- if (col !== 2) {
42701
- td.innerHTML = this.alarmList[row][col];
42702
- td.style.cssText += `${this.model.generalSetting.isUnderline ? 'text-decoration: underline' : ''};`;
42703
- }
42704
- else {
42705
- const alarmLevel = document.createElement('div');
42706
- let alarmHeight = parseInt(this.model.generalSetting.fontSize) + 15;
42707
- if (alarmHeight > this.model.heights[row + 1])
42708
- alarmHeight = this.model.heights[row + 1];
42709
- let margin = '0 15px';
42710
- if (this.model.generalSetting.textAlign === 'left') {
42711
- margin = '0 30px 0 0';
42712
- }
42713
- else if (this.model.generalSetting.textAlign === 'right') {
42714
- margin = '0 0 0 30px';
42715
- }
42716
- alarmLevel.style.cssText = `margin: ${margin};
42717
- border-radius: 5px;
42718
- background: ${levelColors[this.alarmList[row][col]]};
42719
- color: #ffffff;
42720
- width: ${this.model.widths[col] - 30}px;
42721
- height: ${alarmHeight}px;
42722
- max-height: ${this.model.heights[row + 1]}px;
42723
- display: flex;
42724
- justify-content: center;
42725
- align-items: center;
42726
- ${this.model.generalSetting.isUnderline ? 'text-decoration: underline' : ''};`;
42727
- alarmLevel.innerHTML = this.model.levelText[this.alarmList[row][col]];
42728
- td.appendChild(alarmLevel);
42729
- }
42935
+ const tr = document.createElement('tr');
42936
+ tr.style.cssText = `height: ${rowHeight}px;
42937
+ background: ${this.model.generalSetting.tableFillColor};
42938
+ font: ${this.model.generalSetting.fontStyle};
42939
+ color: ${this.model.generalSetting.fontColor};
42940
+ text-align: ${this.model.generalSetting.textAlign};
42941
+ vertical-align: middle;`;
42942
+ for (let col = 0; col < 4; col++) {
42943
+ const td = document.createElement('td');
42944
+ td.style.cssText = `width: ${this.model.widths[col] / this.model.size.width * 100}%;
42945
+ border-style: solid;
42946
+ border-color: ${this.model.generalSetting.splitLine};
42947
+ border-top-width: ${this.model.generalSetting.isHiddenColumnSplitLine ? 0 : 1}px;
42948
+ border-left-width: ${!col || this.model.generalSetting.isHiddenColumnSplitLine ? 0 : 1}px;`;
42949
+ if (this.alarmList[row]) {
42950
+ if (col !== 2) {
42951
+ td.innerHTML = this.alarmList[row][col];
42952
+ td.style.cssText += `${this.model.generalSetting.isUnderline ? 'text-decoration: underline' : ''};`;
42730
42953
  }
42731
- else if (col === 2) {
42954
+ else {
42732
42955
  const alarmLevel = document.createElement('div');
42956
+ let alarmHeight = parseInt(this.model.generalSetting.fontSize) + 15;
42957
+ if (alarmHeight > rowHeight)
42958
+ alarmHeight = rowHeight;
42733
42959
  let margin = '0 15px';
42734
42960
  if (this.model.generalSetting.textAlign === 'left') {
42735
42961
  margin = '0 30px 0 0';
@@ -42738,24 +42964,144 @@ class alarm_element_AlarmElement extends conditional_display_element_Conditional
42738
42964
  margin = '0 0 0 30px';
42739
42965
  }
42740
42966
  alarmLevel.style.cssText = `margin: ${margin};
42741
- width: ${this.model.widths[col] - 30}px;`;
42967
+ border-radius: 5px;
42968
+ background: ${levelColors[this.alarmList[row][col]]};
42969
+ color: #ffffff;
42970
+ width: ${this.model.widths[col] - 30}px;
42971
+ height: ${alarmHeight}px;
42972
+ max-height: ${rowHeight}px;
42973
+ display: flex;
42974
+ justify-content: center;
42975
+ align-items: center;
42976
+ ${this.model.generalSetting.isUnderline ? 'text-decoration: underline' : ''};`;
42977
+ alarmLevel.innerHTML = this.model.levelText[this.alarmList[row][col]];
42742
42978
  td.appendChild(alarmLevel);
42743
42979
  }
42744
- tr.appendChild(td);
42745
42980
  }
42746
- table.appendChild(tr);
42981
+ else if (col === 2) {
42982
+ const alarmLevel = document.createElement('div');
42983
+ let margin = '0 15px';
42984
+ if (this.model.generalSetting.textAlign === 'left') {
42985
+ margin = '0 30px 0 0';
42986
+ }
42987
+ else if (this.model.generalSetting.textAlign === 'right') {
42988
+ margin = '0 0 0 30px';
42989
+ }
42990
+ alarmLevel.style.cssText = `margin: ${margin};
42991
+ width: ${this.model.widths[col] - 30}px;`;
42992
+ td.appendChild(alarmLevel);
42993
+ }
42994
+ tr.appendChild(td);
42995
+ }
42996
+ return tr;
42997
+ }
42998
+ renderPlainTable(elementHeight, operationAreaReservedHeight) {
42999
+ this.scrollContainer = null;
43000
+ const table = document.createElement('table');
43001
+ table.style.cssText = `border: 2px solid ${this.model.generalSetting.stroke};
43002
+ height: ${elementHeight - operationAreaReservedHeight}px;`;
43003
+ table.appendChild(this.buildHeaderRow());
43004
+ for (let row = 0; row < this.pageSize; row++) {
43005
+ table.appendChild(this.buildDataRow(row, this.model.heights[row + 1]));
42747
43006
  }
42748
43007
  this.element.appendChild(table);
42749
- this.renderOperationArea(this.model.size.width, elementHeight - 39);
43008
+ this.hoverTarget = table;
43009
+ this.bindScrollHoverEvents();
43010
+ this.startAutoScroll();
43011
+ }
43012
+ renderScrollableTable(elementHeight, operationAreaReservedHeight) {
43013
+ const dataRowHeight = this.model.heights[1] || this.model.heights[0];
43014
+ this.rowHeight = dataRowHeight;
43015
+ const wrapper = document.createElement('div');
43016
+ wrapper.style.cssText = `display: flex;
43017
+ flex-direction: column;
43018
+ box-sizing: border-box;
43019
+ border: 2px solid ${this.model.generalSetting.stroke};
43020
+ height: ${elementHeight - operationAreaReservedHeight}px;
43021
+ overflow: hidden;`;
43022
+ const headerWrapper = document.createElement('div');
43023
+ headerWrapper.style.cssText = 'flex: none; box-sizing: border-box; overflow: hidden;';
43024
+ const headerTable = document.createElement('table');
43025
+ headerTable.style.cssText = 'width: 100%; table-layout: fixed;';
43026
+ headerTable.appendChild(this.buildHeaderRow());
43027
+ headerWrapper.appendChild(headerTable);
43028
+ const bodyContainer = document.createElement('div');
43029
+ bodyContainer.style.cssText = `flex: none;
43030
+ overflow-y: auto;
43031
+ overflow-x: hidden;
43032
+ height: ${dataRowHeight * this.maxVisibleRows}px;`;
43033
+ const bodyTable = document.createElement('table');
43034
+ bodyTable.style.cssText = 'width: 100%; table-layout: fixed;';
43035
+ for (let row = 0; row < this.pageSize; row++) {
43036
+ bodyTable.appendChild(this.buildDataRow(row, dataRowHeight));
43037
+ }
43038
+ bodyContainer.appendChild(bodyTable);
43039
+ wrapper.appendChild(headerWrapper);
43040
+ wrapper.appendChild(bodyContainer);
43041
+ this.element.appendChild(wrapper);
43042
+ this.scrollContainer = bodyContainer;
43043
+ requestAnimationFrame(() => {
43044
+ const scrollbarWidth = bodyContainer.offsetWidth - bodyContainer.clientWidth;
43045
+ if (scrollbarWidth > 0) {
43046
+ headerWrapper.style.paddingRight = scrollbarWidth + 'px';
43047
+ }
43048
+ });
43049
+ this.hoverTarget = bodyContainer;
43050
+ this.bindScrollHoverEvents();
43051
+ this.startAutoScroll();
43052
+ }
43053
+ bindScrollHoverEvents() {
43054
+ if (!this.hoverTarget)
43055
+ return;
43056
+ this.hoverTarget.addEventListener('mouseenter', this.handleScrollMouseEnter);
43057
+ this.hoverTarget.addEventListener('mouseleave', this.handleScrollMouseLeave);
42750
43058
  }
42751
- renderOperationArea(chartWidth, chartHeight) {
43059
+ unbindScrollHoverEvents() {
43060
+ if (!this.hoverTarget)
43061
+ return;
43062
+ this.hoverTarget.removeEventListener('mouseenter', this.handleScrollMouseEnter);
43063
+ this.hoverTarget.removeEventListener('mouseleave', this.handleScrollMouseLeave);
43064
+ this.hoverTarget = null;
43065
+ }
43066
+ startAutoScroll() {
43067
+ clearInterval(this.scrollIntervalId);
43068
+ if (!this.model.generalSetting.autoScroll)
43069
+ return;
43070
+ const totalPages = Math.max(1, Math.ceil(this.totalCount / this.pageSize));
43071
+ if (totalPages <= 1 && !this.scrollContainer)
43072
+ return;
43073
+ const duration = (this.model.generalSetting.scrollDuration || 10) * 1000;
43074
+ this.scrollIntervalId = setInterval(() => this.scrollOneRow(), duration);
43075
+ }
43076
+ scrollOneRow() {
43077
+ const el = this.scrollContainer;
43078
+ if (!el) {
43079
+ this.autoNextPage();
43080
+ return;
43081
+ }
43082
+ const maxScrollTop = el.scrollHeight - el.clientHeight;
43083
+ if (maxScrollTop <= 1 || el.scrollTop >= maxScrollTop - 1) {
43084
+ this.autoNextPage();
43085
+ return;
43086
+ }
43087
+ el.scrollTop = Math.min(el.scrollTop + this.rowHeight, maxScrollTop);
43088
+ }
43089
+ autoNextPage() {
43090
+ const totalPages = Math.max(1, Math.ceil(this.totalCount / this.pageSize));
43091
+ if (totalPages <= 1)
43092
+ return;
43093
+ const lastPage = totalPages - 1;
43094
+ this.page = this.page < lastPage ? this.page + 1 : 0;
43095
+ this.getAlarmData();
43096
+ }
43097
+ renderOperationArea(chartWidth, chartHeight, scale = 1) {
42752
43098
  var _a;
42753
- const operationArea = this.rootElement.append('g').attr('transform', `translate(0,${chartHeight + this.displayOption.operationAreaMarginTop})`)
42754
- .append('foreignObject').attr('width', chartWidth).attr('height', this.displayOption.operationAreaHeight).attr('fill', 'none')
42755
- .append('xhtml:div').style('height', (this.displayOption.operationAreaHeight - 4) + 'px').style('overflow', 'hidden').style('margin-top', '4px');
43099
+ const operationArea = this.rootElement.append('g').attr('transform', `translate(0,${chartHeight + this.displayOption.operationAreaMarginTop * scale})`)
43100
+ .append('foreignObject').attr('width', chartWidth).attr('height', this.displayOption.operationAreaHeight * scale).attr('fill', 'none')
43101
+ .append('xhtml:div').style('height', (this.displayOption.operationAreaHeight * scale - 4) + 'px').style('overflow', 'hidden').style('margin-top', '4px');
42756
43102
  if ((_a = this.model.filterSetting) === null || _a === void 0 ? void 0 : _a.alarmType) {
42757
- const selectElement = operationArea.append('select').style('margin-left', this.displayOption.marginLeft + 'px')
42758
- .style('font-size', this.displayOption.operationSelectFontSize).on('change', () => {
43103
+ const selectElement = operationArea.append('select').style('margin-left', (this.displayOption.marginLeft * scale) + 'px')
43104
+ .style('font-size', (parseFloat(this.displayOption.operationSelectFontSize) * scale) + 'px').on('change', () => {
42759
43105
  const displayTimePeriod = this.rootElement.select('select').property('value');
42760
43106
  this.updateTimeRange(displayTimePeriod);
42761
43107
  this.getAlarmData();
@@ -42763,24 +43109,28 @@ class alarm_element_AlarmElement extends conditional_display_element_Conditional
42763
43109
  const options = selectElement.selectAll('option').data(this.timePeriods).enter().append('option');
42764
43110
  options.text(d => d.name).attr('value', d => d.key).property('selected', d => d.key === Number(this.currentTimePeriod));
42765
43111
  }
42766
- const buttonWidth = this.displayOption.operationButtonWidth + 'px', buttonHeight = this.displayOption.operationButtonHeight + 'px';
43112
+ const buttonWidth = (this.displayOption.operationButtonWidth * scale) + 'px', buttonHeight = (this.displayOption.operationButtonHeight * scale) + 'px';
42767
43113
  operationArea.append('button').style('width', buttonWidth).style('height', buttonHeight).style('border', 'none')
42768
43114
  .style('float', 'right').style('background-image', 'url(assets/img/last_page.svg)')
43115
+ .style('background-size', 'contain').style('background-repeat', 'no-repeat').style('background-position', 'center')
42769
43116
  .style('background-color', 'inherit')
42770
43117
  .on('click', () => { this.loadLastPage(); });
42771
43118
  operationArea.append('button').style('width', buttonWidth).style('height', buttonHeight).style('border', 'none')
42772
43119
  .style('float', 'right').style('background-image', 'url(assets/img/next_page.svg)')
42773
- .style('margin', `0 ${this.displayOption.operationButtonMargin}px 0 0`)
43120
+ .style('background-size', 'contain').style('background-repeat', 'no-repeat').style('background-position', 'center')
43121
+ .style('margin', `0 ${this.displayOption.operationButtonMargin * scale}px 0 0`)
42774
43122
  .style('background-color', 'inherit')
42775
43123
  .on('click', () => { this.loadNextPage(); });
42776
43124
  operationArea.append('button').style('width', buttonWidth).style('height', buttonHeight).style('border', 'none')
42777
43125
  .style('float', 'right').style('background-image', 'url(assets/img/previous_page.svg)')
42778
- .style('margin', `0 ${this.displayOption.operationButtonMargin}px 0 0`)
43126
+ .style('background-size', 'contain').style('background-repeat', 'no-repeat').style('background-position', 'center')
43127
+ .style('margin', `0 ${this.displayOption.operationButtonMargin * scale}px 0 0`)
42779
43128
  .style('background-color', 'inherit')
42780
43129
  .on('click', () => { this.loadPreviousPage(); });
42781
43130
  operationArea.append('button').style('width', buttonWidth).style('height', buttonHeight).style('border', 'none')
42782
43131
  .style('float', 'right').style('background-image', 'url(assets/img/first_page.svg)')
42783
- .style('margin', `0 ${this.displayOption.operationButtonMargin}px 0 0`)
43132
+ .style('background-size', 'contain').style('background-repeat', 'no-repeat').style('background-position', 'center')
43133
+ .style('margin', `0 ${this.displayOption.operationButtonMargin * scale}px 0 0`)
42784
43134
  .style('background-color', 'inherit')
42785
43135
  .on('click', () => { this.loadFirstPage(); });
42786
43136
  this.setStatusAsNormal();
@@ -43833,7 +44183,7 @@ class main_element_MainElement {
43833
44183
  this.elements.push(new view_operation_element_ViewOperationElement(element, this.injector, this.bsModalService, this.variableCommunicator, this.context.configStore.variableStore, this.context.configStore.graphStore, this.context.permissionChecker, this.context.operationRecordService, this.context.securityChecker, this.injector.get(_tmp_localization["b" /* LOCALIZATION */]), this.popupViewService, guiOptions.hostContainerId, guiOptions.el, this.signalRAppId, this.context.textLibraryService, this.context.languageService, this.context));
43834
44184
  break;
43835
44185
  case shared["d" /* GuiConsts */].components.characterKey:
43836
- this.elements.push(new character_display_element_CharacterDisplayElement(element, this.injector, this.bsModalService, this.variableCommunicator, this.context.configStore.graphStore, this.context.permissionChecker, this.context.operationRecordService, this.context.securityChecker, this.context.configStore.variableStore, this.injector.get(_tmp_localization["b" /* LOCALIZATION */]), this.signalRAppId));
44186
+ this.elements.push(new character_display_element_CharacterDisplayElement(element, this.injector, this.bsModalService, this.variableCommunicator, this.context.configStore.graphStore, this.context.permissionChecker, this.context.operationRecordService, this.context.securityChecker, this.context.configStore.variableStore, this.injector.get(_tmp_localization["b" /* LOCALIZATION */]), this.signalRAppId, this.context.releasedVariableService));
43837
44187
  break;
43838
44188
  case shared["d" /* GuiConsts */].components.textKey:
43839
44189
  this.elements.push(new text_element_TextElement(element, this.injector, this.context.permissionChecker, this.variableCommunicator, this.context.configStore.variableStore, this.context.configStore.graphStore, this.signalRAppId, this.context.textLibraryService, this.context.languageService, this.context));
@@ -44067,7 +44417,8 @@ class main_element_MainElement {
44067
44417
  Object(lodash["each"])(this.elements, e => {
44068
44418
  if (e instanceof historical_curve_element_HistoricalCurveElement || e instanceof video_element_VideoElement
44069
44419
  || e instanceof weater_element_WeatherElement || e instanceof numerical_display_element_NumericalDisplayElement || e instanceof text_element_TextElement
44070
- || e instanceof air_quality_element_AirQualityElement || e instanceof switch_indicator_light_element_SwitchIndicatorLightElement || e instanceof scroll_alarm_element_ScrollAlarmElement) {
44420
+ || e instanceof air_quality_element_AirQualityElement || e instanceof switch_indicator_light_element_SwitchIndicatorLightElement || e instanceof scroll_alarm_element_ScrollAlarmElement
44421
+ || e instanceof alarm_element_AlarmElement) {
44071
44422
  e.dispose();
44072
44423
  }
44073
44424
  });
@@ -44336,7 +44687,7 @@ class gui_view_GuiView {
44336
44687
  }
44337
44688
  });
44338
44689
  }
44339
- popView(viewIndex, hostContainerId, el) {
44690
+ popView(viewIndex, hostContainerId, el, triggerRect) {
44340
44691
  return this.context.configStore.viewStore.getViewConfig(viewIndex).pipe(Object(operators_["map"])(view => {
44341
44692
  if (!view.config || !view.config.length) {
44342
44693
  throw new shared["a" /* ConfigIsEmptyError */]();
@@ -44357,6 +44708,10 @@ class gui_view_GuiView {
44357
44708
  x = settings.popup.location.x;
44358
44709
  y = settings.popup.location.y;
44359
44710
  }
44711
+ else if (settings.popup.locationType === _tmp_model["ViewPopupLocationType"].NearButton && triggerRect) {
44712
+ const hasShadow = settings.popup.backdropType === _tmp_model["ViewPopupBackdropType"].Shadow && !this.isMobileMode;
44713
+ ({ x, y } = this.getNearButtonPosition(popView, triggerRect, hasShadow));
44714
+ }
44360
44715
  else {
44361
44716
  x = (this.rawWidth - popView.rawWidth) / 2;
44362
44717
  y = (this.rawHeight - popView.rawHeight) / 2;
@@ -44376,6 +44731,73 @@ class gui_view_GuiView {
44376
44731
  this.element.appendChild(popView.element);
44377
44732
  }));
44378
44733
  }
44734
+ /**
44735
+ * 把屏幕像素矩形(如按钮的 getBoundingClientRect)换算为当前画面 SVG 坐标系下的矩形。
44736
+ * 用 getScreenCTM 而不是简单的宽高比换算,因为画面容器宽高比与 rawWidth/rawHeight 不一致时
44737
+ * SVG 会按 preserveAspectRatio 留白(letterbox),线性比例换算会有偏差。
44738
+ */
44739
+ toLocalRect(rect) {
44740
+ const svgRoot = this.element;
44741
+ const ctm = svgRoot.getScreenCTM && svgRoot.getScreenCTM();
44742
+ if (ctm) {
44743
+ const inverse = ctm.inverse();
44744
+ const toLocal = (clientX, clientY) => {
44745
+ const pt = svgRoot.createSVGPoint();
44746
+ pt.x = clientX;
44747
+ pt.y = clientY;
44748
+ return pt.matrixTransform(inverse);
44749
+ };
44750
+ const topLeft = toLocal(rect.left, rect.top);
44751
+ const bottomRight = toLocal(rect.right, rect.bottom);
44752
+ return {
44753
+ x: topLeft.x,
44754
+ y: topLeft.y,
44755
+ width: bottomRight.x - topLeft.x,
44756
+ height: bottomRight.y - topLeft.y
44757
+ };
44758
+ }
44759
+ const viewRect = this.element.getBoundingClientRect();
44760
+ const scaleX = viewRect.width ? this.rawWidth / viewRect.width : 1;
44761
+ const scaleY = viewRect.height ? this.rawHeight / viewRect.height : 1;
44762
+ return {
44763
+ x: (rect.left - viewRect.left) * scaleX,
44764
+ y: (rect.top - viewRect.top) * scaleY,
44765
+ width: rect.width * scaleX,
44766
+ height: rect.height * scaleY
44767
+ };
44768
+ }
44769
+ /**
44770
+ * 按钮附近:按钮与弹出画面之间留缝隙,两侧都放得下时默认放右侧,放不下时放在放得下的一侧;
44771
+ * 竖直方向默认与按钮顶部对齐,下方放不下时改为与按钮底部对齐;
44772
+ * 左右两侧都放不下(弹窗比画面还宽)时直接退化为画面居中,不再跟随按钮
44773
+ */
44774
+ getNearButtonPosition(popView, triggerRect, hasShadow) {
44775
+ const gap = 20;
44776
+ const { x: buttonX, y: buttonY, width: buttonWidth, height: buttonHeight } = this.toLocalRect(triggerRect);
44777
+ const rightX = buttonX + buttonWidth + gap;
44778
+ const leftX = buttonX - gap - popView.rawWidth;
44779
+ const fitsRight = rightX + popView.rawWidth <= this.rawWidth;
44780
+ const fitsLeft = leftX >= 0;
44781
+ let x;
44782
+ let y;
44783
+ if (!fitsRight && !fitsLeft) {
44784
+ x = (this.rawWidth - popView.rawWidth) / 2;
44785
+ y = (this.rawHeight - popView.rawHeight) / 2;
44786
+ }
44787
+ else {
44788
+ x = fitsRight ? rightX : leftX;
44789
+ const fitsBelow = buttonY + popView.rawHeight <= this.rawHeight;
44790
+ y = fitsBelow ? buttonY : buttonY + buttonHeight - popView.rawHeight;
44791
+ if (hasShadow) {
44792
+ // 阴影会把可见内容整体右下偏移 SHADOW_INSET,这里反向补偏移让可见内容而不是容器本身对齐按钮
44793
+ x -= gui_view_GuiView.SHADOW_INSET;
44794
+ y -= gui_view_GuiView.SHADOW_INSET;
44795
+ }
44796
+ }
44797
+ x = Math.max(0, Math.min(x, this.rawWidth - popView.rawWidth));
44798
+ y = Math.max(0, Math.min(y, this.rawHeight - popView.rawHeight));
44799
+ return { x, y };
44800
+ }
44379
44801
  closeView() {
44380
44802
  if (!this.parentView) {
44381
44803
  return;
@@ -44413,10 +44835,11 @@ class gui_view_GuiView {
44413
44835
  if (!container) {
44414
44836
  return;
44415
44837
  }
44838
+ const inset = gui_view_GuiView.SHADOW_INSET;
44416
44839
  container.setAttribute('filter', `url(#${filterId})`);
44417
- container.setAttribute('x', '6');
44418
- container.setAttribute('y', '6');
44419
- $(this.element).children('g').attr('transform', 'matrix(1, 0, 0, 1, 6, 6)');
44840
+ container.setAttribute('x', String(inset));
44841
+ container.setAttribute('y', String(inset));
44842
+ $(this.element).children('g').attr('transform', `matrix(1, 0, 0, 1, ${inset}, ${inset})`);
44420
44843
  }
44421
44844
  hideMusk() {
44422
44845
  if (this.muskElement) {
@@ -44458,6 +44881,8 @@ class gui_view_GuiView {
44458
44881
  }
44459
44882
  }
44460
44883
  }
44884
+ /** showShadow() 给阴影留白,内容整体右下偏移的量,"按钮附近"定位需要据此修正才能让可见内容与按钮对齐 */
44885
+ gui_view_GuiView.SHADOW_INSET = 5;
44461
44886
 
44462
44887
 
44463
44888
  /***/ }),
@@ -44547,13 +44972,13 @@ var lodash = __webpack_require__(2);
44547
44972
  var _tmp_localization = __webpack_require__(10);
44548
44973
 
44549
44974
  // EXTERNAL MODULE: ./.tmp/settings/index.ts + 2 modules
44550
- var settings = __webpack_require__(15);
44975
+ var settings = __webpack_require__(12);
44551
44976
 
44552
44977
  // EXTERNAL MODULE: ./.tmp/logger/index.ts + 2 modules
44553
44978
  var logger = __webpack_require__(8);
44554
44979
 
44555
44980
  // EXTERNAL MODULE: ./.tmp/shared/index.ts + 3 modules
44556
- var shared = __webpack_require__(5);
44981
+ var shared = __webpack_require__(6);
44557
44982
 
44558
44983
  // EXTERNAL MODULE: ./.tmp/view/view.service.ts
44559
44984
  var view_service = __webpack_require__(27);
@@ -44984,7 +45409,7 @@ gui_component_GuiComponent = __decorate([
44984
45409
  /* harmony import */ var _localization__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(10);
44985
45410
  /* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(2);
44986
45411
  /* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_2__);
44987
- /* harmony import */ var _settings__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(15);
45412
+ /* harmony import */ var _settings__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(12);
44988
45413
  var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
44989
45414
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
44990
45415
  if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
@@ -45005,15 +45430,19 @@ let WriteValueModalComponent = class WriteValueModalComponent {
45005
45430
  this.fractionDigitService = fractionDigitService;
45006
45431
  this.numericalOperationService = numericalOperationService;
45007
45432
  this.bsModalRef = bsModalRef;
45433
+ this.isMobileMode = false;
45008
45434
  this.displayVariableName = '';
45009
45435
  this.writeValueRangeText = '';
45010
45436
  this.isSubmitting = false;
45011
- this.isMobileMode = _settings__WEBPACK_IMPORTED_MODULE_3__[/* DisplayMode */ "a"].Mobile === injector.get(_settings__WEBPACK_IMPORTED_MODULE_3__[/* GlobalSettings */ "b"]).displayMode;
45437
+ this.isDisplayModeMobile = _settings__WEBPACK_IMPORTED_MODULE_3__[/* DisplayMode */ "a"].Mobile === injector.get(_settings__WEBPACK_IMPORTED_MODULE_3__[/* GlobalSettings */ "b"]).displayMode;
45012
45438
  }
45013
45439
  get invalidErrorText() {
45014
45440
  return this.localization.loadFailed;
45015
45441
  }
45016
45442
  ngOnInit() {
45443
+ // 画面模拟(SimulateRemoteGuiContext)下 releasedVariableService 恒为空,
45444
+ // 借此和真实移动端区分开,避免在 PC 浏览器模拟移动端时套用移动端专属样式
45445
+ this.isMobileMode = this.isDisplayModeMobile && !!this.args.releasedVariableService;
45017
45446
  this.initData(this.args);
45018
45447
  this.validate();
45019
45448
  }
@@ -45265,7 +45694,7 @@ WriteValueModalComponent = __decorate([
45265
45694
  /* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_angular_core__WEBPACK_IMPORTED_MODULE_0__);
45266
45695
  /* harmony import */ var rxjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(39);
45267
45696
  /* harmony import */ var _localization__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(10);
45268
- /* harmony import */ var _settings__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(15);
45697
+ /* harmony import */ var _settings__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(12);
45269
45698
  var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
45270
45699
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
45271
45700
  if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
@@ -45283,7 +45712,8 @@ let WriteCharacterModalComponent = class WriteCharacterModalComponent {
45283
45712
  constructor(localization, injector) {
45284
45713
  this.localization = localization;
45285
45714
  this._onClosed = new rxjs__WEBPACK_IMPORTED_MODULE_1__[/* Subject */ "a"]();
45286
- this.isMobileMode = _settings__WEBPACK_IMPORTED_MODULE_3__[/* DisplayMode */ "a"].Mobile === injector.get(_settings__WEBPACK_IMPORTED_MODULE_3__[/* GlobalSettings */ "b"]).displayMode;
45715
+ this.isMobileMode = false;
45716
+ this.isDisplayModeMobile = _settings__WEBPACK_IMPORTED_MODULE_3__[/* DisplayMode */ "a"].Mobile === injector.get(_settings__WEBPACK_IMPORTED_MODULE_3__[/* GlobalSettings */ "b"]).displayMode;
45287
45717
  }
45288
45718
  get onClosed() {
45289
45719
  return this._onClosed;
@@ -45292,6 +45722,9 @@ let WriteCharacterModalComponent = class WriteCharacterModalComponent {
45292
45722
  return this.localization.loadFailed;
45293
45723
  }
45294
45724
  ngOnInit() {
45725
+ // 画面模拟(SimulateRemoteGuiContext)下 releasedVariableService 恒为空,
45726
+ // 借此和真实移动端区分开,避免在 PC 浏览器模拟移动端时套用移动端专属样式
45727
+ this.isMobileMode = this.isDisplayModeMobile && !!this.args.releasedVariableService;
45295
45728
  this.variableName = this.args.variableName;
45296
45729
  this.isPassword = this.args.isPassword ? this.args.isPassword : false;
45297
45730
  this.charCount = this.args.charCount;
@@ -45345,7 +45778,7 @@ WriteCharacterModalComponent = __decorate([
45345
45778
  "use strict";
45346
45779
 
45347
45780
  // EXTERNAL MODULE: ./node_modules/rxjs/node_modules/tslib/tslib.es6.js
45348
- var tslib_es6 = __webpack_require__(13);
45781
+ var tslib_es6 = __webpack_require__(14);
45349
45782
 
45350
45783
  // EXTERNAL MODULE: ./node_modules/rxjs/_esm5/internal/Observable.js + 3 modules
45351
45784
  var Observable = __webpack_require__(16);
@@ -66447,6 +66880,7 @@ var ViewPopupLocationType;
66447
66880
  (function (ViewPopupLocationType) {
66448
66881
  ViewPopupLocationType[ViewPopupLocationType["Center"] = 0] = "Center";
66449
66882
  ViewPopupLocationType[ViewPopupLocationType["Custom"] = 1] = "Custom";
66883
+ ViewPopupLocationType[ViewPopupLocationType["NearButton"] = 2] = "NearButton";
66450
66884
  })(ViewPopupLocationType || (ViewPopupLocationType = {}));
66451
66885
 
66452
66886
  // CONCATENATED MODULE: ./.tmp/model/settings/popup/view-popup-backdrop-type.ts
@@ -66560,7 +66994,7 @@ var Subject = __webpack_require__(39);
66560
66994
  var operators_ = __webpack_require__(17);
66561
66995
 
66562
66996
  // EXTERNAL MODULE: ./.tmp/config/index.ts + 12 modules
66563
- var _tmp_config = __webpack_require__(6);
66997
+ var _tmp_config = __webpack_require__(5);
66564
66998
 
66565
66999
  // EXTERNAL MODULE: ./.tmp/core/stringifying-map.ts
66566
67000
  var stringifying_map = __webpack_require__(30);
@@ -67461,7 +67895,7 @@ class RelationConditionResult {
67461
67895
  }
67462
67896
 
67463
67897
  // EXTERNAL MODULE: ./.tmp/model/shared/condition/variable-value-type.ts
67464
- var variable_value_type = __webpack_require__(12);
67898
+ var variable_value_type = __webpack_require__(13);
67465
67899
 
67466
67900
  // EXTERNAL MODULE: ./.tmp/model/shared/condition/relation-type.ts
67467
67901
  var relation_type = __webpack_require__(23);
@@ -68976,7 +69410,7 @@ var Observable = __webpack_require__(16);
68976
69410
  var isScheduler = __webpack_require__(51);
68977
69411
 
68978
69412
  // EXTERNAL MODULE: ./node_modules/rxjs/node_modules/tslib/tslib.es6.js
68979
- var tslib_es6 = __webpack_require__(13);
69413
+ var tslib_es6 = __webpack_require__(14);
68980
69414
 
68981
69415
  // EXTERNAL MODULE: ./node_modules/rxjs/_esm5/internal/Subscriber.js
68982
69416
  var Subscriber = __webpack_require__(29);
@@ -87514,7 +87948,7 @@ __webpack_require__.r(__webpack_exports__);
87514
87948
  /* harmony import */ var _core__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(43);
87515
87949
  /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "StringifyingMap", function() { return _core__WEBPACK_IMPORTED_MODULE_3__["a"]; });
87516
87950
 
87517
- /* harmony import */ var _config__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(6);
87951
+ /* harmony import */ var _config__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(5);
87518
87952
  /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ConfigStore", function() { return _config__WEBPACK_IMPORTED_MODULE_4__["b"]; });
87519
87953
 
87520
87954
  /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "GuiFeatureConfig", function() { return _config__WEBPACK_IMPORTED_MODULE_4__["j"]; });
@@ -87574,7 +88008,7 @@ __webpack_require__.r(__webpack_exports__);
87574
88008
  /* harmony import */ var _security__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(77);
87575
88009
  /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "SecurityChecker", function() { return _security__WEBPACK_IMPORTED_MODULE_8__["a"]; });
87576
88010
 
87577
- /* harmony import */ var _shared__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(5);
88011
+ /* harmony import */ var _shared__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(6);
87578
88012
  /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Disposable", function() { return _shared__WEBPACK_IMPORTED_MODULE_9__["b"]; });
87579
88013
 
87580
88014
  /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ConfigIsEmptyError", function() { return _shared__WEBPACK_IMPORTED_MODULE_9__["a"]; });
@@ -87617,7 +88051,7 @@ __webpack_require__.r(__webpack_exports__);
87617
88051
 
87618
88052
  /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "RemoteVariableProtocol", function() { return _remote__WEBPACK_IMPORTED_MODULE_11__["k"]; });
87619
88053
 
87620
- /* harmony import */ var _service__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(14);
88054
+ /* harmony import */ var _service__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(15);
87621
88055
  /* harmony reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in _service__WEBPACK_IMPORTED_MODULE_12__) if(["GuiComponent","GuiView","GuiContext","GuiModule","LOGGER_SERVICE_TOKEN","LoggerService","ConsoleLoggerService","StringifyingMap","ConfigStore","GuiFeatureConfig","Graph","GraphResult","GraphType","GraphStore","ViewStore","ViewModel","ImageStore","HistoryDataStore","HistoryDataModel","HistoryDataValue","GetHistoryDataArgs","VariableStore","GetVariableNameArgs","AlarmsStore","GetAlarmsArgs","VariableCommunicator","VariableValue","VariableState","VariableDefinition","VariableStateEnum","Localization","LOCALIZATION","DefaultLocalization","Localization_zh_CN","SecurityChecker","Disposable","ConfigIsEmptyError","OperationHelper","GuiConsts","GraphExtendedStyle","GetReleasedGraphStateResult","GraphStateResult","GetReleasedGraphStates","GraphStateKey","GraphState","RemoteGraphProtocol","RemoteGraphStore","RemoteViewProtocol","RemoteViewStore","ViewResult","RemoteImageProtocol","RemoteImageStore","RemoteVariableCommunicator","RemoteVariableProtocol","default"].indexOf(__WEBPACK_IMPORT_KEY__) < 0) (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return _service__WEBPACK_IMPORTED_MODULE_12__[key]; }) }(__WEBPACK_IMPORT_KEY__));
87622
88056
  /* harmony import */ var _logger__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(8);
87623
88057
  /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "LOGGER_SERVICE_TOKEN", function() { return _logger__WEBPACK_IMPORTED_MODULE_13__["b"]; });