@flexem/fc-gui 3.0.0-alpha.181 → 3.0.0-alpha.183

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 (31) hide show
  1. package/bundles/@flexem/fc-gui.umd.js +335 -144
  2. package/bundles/@flexem/fc-gui.umd.js.map +1 -1
  3. package/bundles/@flexem/fc-gui.umd.min.js +3 -3
  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 +22 -1
  7. package/elements/alarm/alarm-element.js +225 -67
  8. package/elements/alarm/alarm-element.metadata.json +1 -1
  9. package/elements/character-display/character-display-element.d.ts +3 -2
  10. package/elements/character-display/character-display-element.js +15 -3
  11. package/elements/character-display/character-display-element.metadata.json +1 -1
  12. package/elements/main-element.js +1 -1
  13. package/elements/numerical-display/numerical-display-element.js +4 -1
  14. package/elements/shared/text/text-element.js +1 -7
  15. package/elements/switch-indicator-light/switch-indicator-light-element.js +5 -1
  16. package/elements/view-operation/view-operation.element.js +5 -1
  17. package/modal/verify-password/verify-password-modal.component.d.ts +6 -2
  18. package/modal/verify-password/verify-password-modal.component.html +2 -2
  19. package/modal/verify-password/verify-password-modal.component.js +11 -5
  20. package/modal/verify-password/verify-password-modal.component.less +9 -0
  21. package/modal/verify-password/verify-password-modal.component.metadata.json +1 -1
  22. package/modal/write-character/write-character-modal-args.d.ts +3 -1
  23. package/modal/write-character/write-character-modal-args.js +2 -1
  24. package/modal/write-character/write-character-modal-args.metadata.json +1 -1
  25. package/modal/write-character/write-character-modal.component.d.ts +1 -0
  26. package/modal/write-character/write-character-modal.component.js +5 -1
  27. package/modal/write-character/write-character-modal.component.metadata.json +1 -1
  28. package/modal/write-value/write-value-modal.component.d.ts +1 -0
  29. package/modal/write-value/write-value-modal.component.js +5 -1
  30. package/modal/write-value/write-value-modal.component.metadata.json +1 -1
  31. package/package.json +1 -1
@@ -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);
@@ -35499,7 +35506,7 @@ function degreesToRadians(degrees) {
35499
35506
  }
35500
35507
 
35501
35508
  // EXTERNAL MODULE: ./.tmp/model/shared/condition/variable-value-type.ts
35502
- var variable_value_type = __webpack_require__(12);
35509
+ var variable_value_type = __webpack_require__(13);
35503
35510
 
35504
35511
  // CONCATENATED MODULE: ./.tmp/elements/bar-graph-element.ts
35505
35512
 
@@ -35760,11 +35767,12 @@ var confirm_operation_modal_component = __webpack_require__(21);
35760
35767
 
35761
35768
  // CONCATENATED MODULE: ./.tmp/modal/write-character/write-character-modal-args.ts
35762
35769
  class WriteCharacterModalArgs {
35763
- constructor(variableName, isPassword, charCount, originValue) {
35770
+ constructor(variableName, isPassword, charCount, originValue, releasedVariableService) {
35764
35771
  this.variableName = variableName;
35765
35772
  this.isPassword = isPassword;
35766
35773
  this.charCount = charCount;
35767
35774
  this.originValue = originValue;
35775
+ this.releasedVariableService = releasedVariableService;
35768
35776
  }
35769
35777
  }
35770
35778
 
@@ -35831,9 +35839,6 @@ class text_element_TextElementModal {
35831
35839
  this.width = width;
35832
35840
  this.height = height;
35833
35841
  this.isVariableText = isVariableText;
35834
- if (/iPhone|iPod/i.test(navigator.userAgent)) {
35835
- width += 10;
35836
- }
35837
35842
  this._element = this.getforeignObjectElement(width, height);
35838
35843
  this._element.innerHTML = '';
35839
35844
  const text = this.createNewForeignObjectText(content, font, width, height, isVariableText);
@@ -35857,10 +35862,7 @@ class text_element_TextElementModal {
35857
35862
  // 清空现有内容
35858
35863
  this._element.innerHTML = '';
35859
35864
  // 创建新的文本元素
35860
- let width = this.width;
35861
- if (/iPhone|iPod/i.test(navigator.userAgent)) {
35862
- width += 10;
35863
- }
35865
+ const width = this.width;
35864
35866
  const text = this.createNewForeignObjectText(content, this.font, width, this.height, this.isVariableText);
35865
35867
  this._element.appendChild(text);
35866
35868
  }
@@ -35945,12 +35947,13 @@ class text_element_TextElementModal {
35945
35947
 
35946
35948
 
35947
35949
  class character_display_element_CharacterDisplayElement extends readable_element_ReadableElement {
35948
- constructor(element, injector, modalService, variableCommunicator, graphStore, permissionChecker, operationRecordService, securityChecker, variableStore, localization, signalRAppId) {
35950
+ constructor(element, injector, modalService, variableCommunicator, graphStore, permissionChecker, operationRecordService, securityChecker, variableStore, localization, signalRAppId, releasedVariableService) {
35949
35951
  super(element, permissionChecker, variableCommunicator, variableStore, localization, signalRAppId);
35950
35952
  this.modalService = modalService;
35951
35953
  this.graphStore = graphStore;
35952
35954
  this.operationRecordService = operationRecordService;
35953
35955
  this.securityChecker = securityChecker;
35956
+ this.releasedVariableService = releasedVariableService;
35954
35957
  this.displayValue = '';
35955
35958
  this.graphs = new Map();
35956
35959
  this.logger = injector.get(logger["b" /* LOGGER_SERVICE_TOKEN */]);
@@ -36180,7 +36183,10 @@ class character_display_element_CharacterDisplayElement extends readable_element
36180
36183
  }
36181
36184
  checkElementPassword() {
36182
36185
  if (this.model.enablePassword) {
36183
- const modalRef = this.modalService.show(verify_password_modal_component["a" /* VerifyPasswordModalComponent */], { initialState: { securityChecker: this.securityChecker }, backdrop: 'static', class: 'gui-modal-dialog-position', animated: false });
36186
+ const modalRef = this.modalService.show(verify_password_modal_component["a" /* VerifyPasswordModalComponent */], {
36187
+ initialState: { securityChecker: this.securityChecker, releasedVariableService: this.releasedVariableService },
36188
+ backdrop: 'static', class: 'gui-modal-dialog-position', animated: false
36189
+ });
36184
36190
  const onClosedSub = modalRef.content.onClosed.subscribe(result => {
36185
36191
  modalRef.hide();
36186
36192
  onClosedSub.unsubscribe();
@@ -36197,7 +36203,15 @@ class character_display_element_CharacterDisplayElement extends readable_element
36197
36203
  if (null == this.writeVariableName) {
36198
36204
  return;
36199
36205
  }
36200
- const args = new WriteCharacterModalArgs(this.writeVariableName, this.model.isPassword, this.model.charCount, this.displayValue);
36206
+ // 优先使用接口返回的实时字符长度,如果获取不到则使用页面配置中的长度
36207
+ let charCount = this.model.charCount;
36208
+ if (this.variableStore.getCharCountByVariableName) {
36209
+ const runtimeCharCount = this.variableStore.getCharCountByVariableName(this.writeVariableName);
36210
+ if (runtimeCharCount !== undefined) {
36211
+ charCount = runtimeCharCount;
36212
+ }
36213
+ }
36214
+ const args = new WriteCharacterModalArgs(this.writeVariableName, this.model.isPassword, charCount, this.displayValue, this.releasedVariableService);
36201
36215
  const modalRef = this.modalService.show(write_character_modal_component["a" /* WriteCharacterModalComponent */], {
36202
36216
  initialState: { args: args }, backdrop: 'static', class: 'gui-modal-dialog-position gui-modal-write', animated: false
36203
36217
  });
@@ -37157,7 +37171,7 @@ var HistoricalCurveTimeRange;
37157
37171
  })(HistoricalCurveTimeRange || (HistoricalCurveTimeRange = {}));
37158
37172
 
37159
37173
  // EXTERNAL MODULE: ./.tmp/service/index.ts
37160
- var service = __webpack_require__(14);
37174
+ var service = __webpack_require__(15);
37161
37175
 
37162
37176
  // CONCATENATED MODULE: ./.tmp/elements/historical-curve/historical-curve-element-status.ts
37163
37177
  var HistoricalCurveElementStatus;
@@ -37169,7 +37183,7 @@ var HistoricalCurveElementStatus;
37169
37183
  })(HistoricalCurveElementStatus || (HistoricalCurveElementStatus = {}));
37170
37184
 
37171
37185
  // EXTERNAL MODULE: ./.tmp/settings/index.ts + 2 modules
37172
- var _tmp_settings = __webpack_require__(15);
37186
+ var _tmp_settings = __webpack_require__(12);
37173
37187
 
37174
37188
  // CONCATENATED MODULE: ./.tmp/model/historical-curve/curve-type.ts
37175
37189
  var CurveType;
@@ -38559,7 +38573,10 @@ class numerical_display_element_NumericalDisplayElement extends readable_element
38559
38573
  }
38560
38574
  checkElementPassword() {
38561
38575
  if (this.model.enablePassword) {
38562
- const modalRef = this.modalService.show(verify_password_modal_component["a" /* VerifyPasswordModalComponent */], { initialState: { securityChecker: this.securityChecker }, backdrop: 'static', class: 'gui-modal-dialog-position', animated: false });
38576
+ const modalRef = this.modalService.show(verify_password_modal_component["a" /* VerifyPasswordModalComponent */], {
38577
+ initialState: { securityChecker: this.securityChecker, releasedVariableService: this.releasedVariableService },
38578
+ backdrop: 'static', class: 'gui-modal-dialog-position', animated: false
38579
+ });
38563
38580
  const onClosedSub = modalRef.content.onClosed.subscribe(result => {
38564
38581
  modalRef.hide();
38565
38582
  onClosedSub.unsubscribe();
@@ -40577,8 +40594,12 @@ class switch_indicator_light_element_SwitchIndicatorLightElement extends conditi
40577
40594
  };
40578
40595
  }
40579
40596
  checkElementPassword(afterConfirm) {
40597
+ var _a;
40580
40598
  if (this.model.enablePassword) {
40581
- const modalRef = this.modalService.show(verify_password_modal_component["a" /* VerifyPasswordModalComponent */], { initialState: { securityChecker: this.securityChecker }, backdrop: 'static', class: 'gui-modal-dialog-position', animated: false });
40599
+ const modalRef = this.modalService.show(verify_password_modal_component["a" /* VerifyPasswordModalComponent */], {
40600
+ initialState: { securityChecker: this.securityChecker, releasedVariableService: (_a = this.guiContext) === null || _a === void 0 ? void 0 : _a.releasedVariableService },
40601
+ backdrop: 'static', class: 'gui-modal-dialog-position', animated: false
40602
+ });
40582
40603
  const onClosedSub = modalRef.content.onClosed.subscribe(result => {
40583
40604
  modalRef.hide();
40584
40605
  onClosedSub.unsubscribe();
@@ -41276,8 +41297,12 @@ class view_operation_element_ViewOperationElement extends conditional_enable_ele
41276
41297
  }
41277
41298
  }
41278
41299
  checkElementPassword() {
41300
+ var _a;
41279
41301
  if (this.model.enablePassword) {
41280
- const modalRef = this.modalService.show(verify_password_modal_component["a" /* VerifyPasswordModalComponent */], { initialState: { securityChecker: this.securityChecker }, backdrop: 'static', class: 'gui-modal-dialog-position', animated: false });
41302
+ const modalRef = this.modalService.show(verify_password_modal_component["a" /* VerifyPasswordModalComponent */], {
41303
+ initialState: { securityChecker: this.securityChecker, releasedVariableService: (_a = this.guiContext) === null || _a === void 0 ? void 0 : _a.releasedVariableService },
41304
+ backdrop: 'static', class: 'gui-modal-dialog-position', animated: false
41305
+ });
41281
41306
  const onClosedSub = modalRef.content.onClosed.subscribe(result => {
41282
41307
  modalRef.hide();
41283
41308
  onClosedSub.unsubscribe();
@@ -42518,14 +42543,102 @@ class alarm_element_AlarmElement extends conditional_display_element_Conditional
42518
42543
  this.totalCount = 0;
42519
42544
  this.pageSize = 5;
42520
42545
  this.maxVisibleRows = 15;
42546
+ this.scrollWindowStart = 0;
42521
42547
  this.rowHeight = 0;
42548
+ this.touchStartY = 0;
42549
+ this.touchScrollAccumulator = 0;
42550
+ this.thumbDragStartY = 0;
42551
+ this.thumbDragStartWindow = 0;
42552
+ this.thumbDragging = false;
42522
42553
  this.isDisposed = false;
42554
+ this.handleScrollWheel = (event) => {
42555
+ if (!this.rowHeight)
42556
+ return;
42557
+ event.preventDefault();
42558
+ this.touchScrollAccumulator += event.deltaY;
42559
+ const rowDelta = Math.trunc(this.touchScrollAccumulator / this.rowHeight);
42560
+ if (rowDelta !== 0) {
42561
+ this.touchScrollAccumulator -= rowDelta * this.rowHeight;
42562
+ this.moveScrollWindowBy(rowDelta);
42563
+ }
42564
+ };
42565
+ this.handleScrollTouchStart = (event) => {
42566
+ this.touchStartY = event.touches[0].clientY;
42567
+ this.touchScrollAccumulator = 0;
42568
+ };
42569
+ this.handleScrollTouchMove = (event) => {
42570
+ if (!this.rowHeight)
42571
+ return;
42572
+ event.preventDefault();
42573
+ const currentY = event.touches[0].clientY;
42574
+ const deltaY = this.touchStartY - currentY;
42575
+ this.touchStartY = currentY;
42576
+ this.touchScrollAccumulator += deltaY;
42577
+ const rowDelta = Math.trunc(this.touchScrollAccumulator / this.rowHeight);
42578
+ if (rowDelta !== 0) {
42579
+ this.touchScrollAccumulator -= rowDelta * this.rowHeight;
42580
+ this.moveScrollWindowBy(rowDelta);
42581
+ }
42582
+ };
42523
42583
  this.handleScrollMouseEnter = () => {
42524
42584
  clearInterval(this.scrollIntervalId);
42525
42585
  };
42526
42586
  this.handleScrollMouseLeave = () => {
42587
+ if (!this.thumbDragging)
42588
+ this.startAutoScroll();
42589
+ };
42590
+ // 拖拽滑块时挂全局 mousemove/mouseup,允许拖出滚动条区域也能继续跟手,松开时才解绑
42591
+ this.handleThumbDragStart = (event) => {
42592
+ event.preventDefault();
42593
+ event.stopPropagation();
42594
+ this.thumbDragging = true;
42595
+ clearInterval(this.scrollIntervalId);
42596
+ this.thumbDragStartY = this.getClientY(event);
42597
+ this.thumbDragStartWindow = this.scrollWindowStart;
42598
+ document.addEventListener('mousemove', this.handleThumbDragMove);
42599
+ document.addEventListener('mouseup', this.handleThumbDragEnd);
42600
+ document.addEventListener('touchmove', this.handleThumbDragMove, { passive: false });
42601
+ document.addEventListener('touchend', this.handleThumbDragEnd);
42602
+ };
42603
+ this.handleThumbDragMove = (event) => {
42604
+ if (!this.thumbDragging || !this.scrollTrack)
42605
+ return;
42606
+ event.preventDefault();
42607
+ const maxWindowStart = Math.max(0, this.pageSize - this.maxVisibleRows);
42608
+ if (maxWindowStart <= 0)
42609
+ return;
42610
+ const trackHeight = this.scrollTrack.clientHeight;
42611
+ const thumbHeightRatio = Math.min(1, this.maxVisibleRows / this.pageSize);
42612
+ const thumbHeight = Math.max(20, trackHeight * thumbHeightRatio);
42613
+ const maxThumbTop = trackHeight - thumbHeight;
42614
+ if (maxThumbTop <= 0)
42615
+ return;
42616
+ const deltaY = this.getClientY(event) - this.thumbDragStartY;
42617
+ const deltaWindow = Math.round((deltaY / maxThumbTop) * maxWindowStart);
42618
+ const nextStart = Math.min(maxWindowStart, Math.max(0, this.thumbDragStartWindow + deltaWindow));
42619
+ if (nextStart === this.scrollWindowStart)
42620
+ return;
42621
+ this.scrollWindowStart = nextStart;
42622
+ this.renderScrollWindow(this.scrollWindowStart);
42623
+ };
42624
+ this.handleThumbDragEnd = () => {
42625
+ this.thumbDragging = false;
42626
+ document.removeEventListener('mousemove', this.handleThumbDragMove);
42627
+ document.removeEventListener('mouseup', this.handleThumbDragEnd);
42628
+ document.removeEventListener('touchmove', this.handleThumbDragMove);
42629
+ document.removeEventListener('touchend', this.handleThumbDragEnd);
42527
42630
  this.startAutoScroll();
42528
42631
  };
42632
+ // 点击轨道空白处(非滑块)时整页跳转,方向取决于点击位置在滑块上方还是下方
42633
+ this.handleTrackClick = (event) => {
42634
+ if (event.target !== this.scrollTrack || !this.scrollTrack)
42635
+ return;
42636
+ const trackRect = this.scrollTrack.getBoundingClientRect();
42637
+ const clickTop = event.clientY - trackRect.top;
42638
+ const thumbTop = parseFloat(this.scrollThumb.style.top) || 0;
42639
+ const rowDelta = clickTop < thumbTop ? -this.maxVisibleRows : this.maxVisibleRows;
42640
+ this.moveScrollWindowBy(rowDelta);
42641
+ };
42529
42642
  this.rootElement.selectAll('*').remove();
42530
42643
  this.setStatusAsLoading();
42531
42644
  this.logger = injector.get(logger["b" /* LOGGER_SERVICE_TOKEN */]);
@@ -42756,10 +42869,8 @@ class alarm_element_AlarmElement extends conditional_display_element_Conditional
42756
42869
  }, 500);
42757
42870
  }
42758
42871
  refreshCurrentPageData() {
42759
- var _a;
42760
42872
  if (this.isDisposed)
42761
42873
  return;
42762
- const currentScrollTop = ((_a = this.scrollContainer) === null || _a === void 0 ? void 0 : _a.scrollTop) || 0;
42763
42874
  if (this.model.filterSetting.alarmType) {
42764
42875
  this.updateQueryTimeRange();
42765
42876
  const input = new _tmp_config["c" /* GetAlarmsArgs */](this.alarmNames, this.startTime, this.endTime, this.pageSize, this.page * this.pageSize);
@@ -42775,9 +42886,6 @@ class alarm_element_AlarmElement extends conditional_display_element_Conditional
42775
42886
  item.triggeredTime.format('YYYY-MM-DD HH:mm:ss')
42776
42887
  ]);
42777
42888
  this.updateTableContent();
42778
- if (this.scrollContainer) {
42779
- this.scrollContainer.scrollTop = currentScrollTop;
42780
- }
42781
42889
  }
42782
42890
  });
42783
42891
  }
@@ -42801,9 +42909,6 @@ class alarm_element_AlarmElement extends conditional_display_element_Conditional
42801
42909
  item.triggeredTime.format('YYYY-MM-DD HH:mm:ss')
42802
42910
  ]);
42803
42911
  this.updateTableContent();
42804
- if (this.scrollContainer) {
42805
- this.scrollContainer.scrollTop = currentScrollTop;
42806
- }
42807
42912
  }
42808
42913
  });
42809
42914
  }
@@ -42812,37 +42917,63 @@ class alarm_element_AlarmElement extends conditional_display_element_Conditional
42812
42917
  if (!this.element)
42813
42918
  return;
42814
42919
  const useScroll = this.pageSize > this.maxVisibleRows;
42815
- const dataRowHeight = this.model.heights[1] || this.model.heights[0];
42816
- // 查找表格主体
42817
- let tbody;
42818
42920
  if (useScroll) {
42819
- const bodyContainer = this.element.querySelector('div > div:nth-child(2)');
42820
- if (!bodyContainer)
42921
+ if (!this.scrollContent)
42821
42922
  return;
42822
- const bodyTable = bodyContainer.querySelector('table');
42823
- if (!bodyTable)
42824
- return;
42825
- tbody = bodyTable;
42826
- }
42827
- else {
42828
- const table = this.element.querySelector('table');
42829
- if (!table)
42830
- return;
42831
- tbody = table;
42923
+ this.scrollWindowStart = Math.min(this.scrollWindowStart, Math.max(0, this.pageSize - this.maxVisibleRows));
42924
+ this.renderScrollWindow(this.scrollWindowStart);
42925
+ return;
42832
42926
  }
42927
+ const table = this.element.querySelector('table');
42928
+ if (!table)
42929
+ return;
42833
42930
  // 清除现有数据行(保留表头)
42834
- const rows = Array.from(tbody.querySelectorAll('tr'));
42931
+ const rows = Array.from(table.querySelectorAll('tr'));
42835
42932
  rows.forEach((row, index) => {
42836
- if (index > 0 || useScroll) { // 对于 scrollable 模式,表头在另一个 table,所以这里全部清除
42933
+ if (index > 0) {
42837
42934
  row.remove();
42838
42935
  }
42839
42936
  });
42840
42937
  // 重新生成数据行
42841
42938
  for (let row = 0; row < this.pageSize; row++) {
42842
- const rowHeight = useScroll ? dataRowHeight : this.model.heights[row + 1];
42843
- tbody.appendChild(this.buildDataRow(row, rowHeight));
42939
+ table.appendChild(this.buildDataRow(row, this.model.heights[row + 1]));
42844
42940
  }
42845
42941
  }
42942
+ renderScrollWindow(startRow) {
42943
+ const table = this.scrollContent;
42944
+ if (!table)
42945
+ return;
42946
+ // 清除现有数据行(保留表头,即第一个 <tr>)
42947
+ const rows = Array.from(table.querySelectorAll('tr'));
42948
+ rows.forEach((row, index) => {
42949
+ if (index > 0) {
42950
+ row.remove();
42951
+ }
42952
+ });
42953
+ for (let i = 0; i < this.maxVisibleRows; i++) {
42954
+ table.appendChild(this.buildDataRow(startRow + i, this.rowHeight));
42955
+ }
42956
+ this.updateScrollThumb();
42957
+ }
42958
+ // 滑块高度按"可见行数/总行数"的比例算,位置按当前窗口起始行占可滚动范围的比例算,
42959
+ // 只用 top/height 两个数值属性更新,不涉及 transform,不会触发合成层
42960
+ updateScrollThumb() {
42961
+ if (!this.scrollTrack || !this.scrollThumb)
42962
+ return;
42963
+ const maxWindowStart = Math.max(0, this.pageSize - this.maxVisibleRows);
42964
+ if (maxWindowStart <= 0) {
42965
+ this.scrollThumb.style.display = 'none';
42966
+ return;
42967
+ }
42968
+ this.scrollThumb.style.display = 'block';
42969
+ const trackHeight = this.scrollTrack.clientHeight;
42970
+ const thumbHeightRatio = Math.min(1, this.maxVisibleRows / this.pageSize);
42971
+ const thumbHeight = Math.max(20, trackHeight * thumbHeightRatio);
42972
+ const maxThumbTop = trackHeight - thumbHeight;
42973
+ const thumbTop = maxThumbTop * (this.scrollWindowStart / maxWindowStart);
42974
+ this.scrollThumb.style.height = `${thumbHeight}px`;
42975
+ this.scrollThumb.style.top = `${thumbTop}px`;
42976
+ }
42846
42977
  getIconScale() {
42847
42978
  const initSize = this.model.initSize;
42848
42979
  if (!initSize || !initSize.width || !initSize.height) {
@@ -42965,7 +43096,8 @@ class alarm_element_AlarmElement extends conditional_display_element_Conditional
42965
43096
  return tr;
42966
43097
  }
42967
43098
  renderPlainTable(elementHeight, operationAreaReservedHeight) {
42968
- this.scrollContainer = null;
43099
+ this.scrollContent = null;
43100
+ this.scrollWindowStart = 0;
42969
43101
  const table = document.createElement('table');
42970
43102
  table.style.cssText = `border: 2px solid ${this.model.generalSetting.stroke};
42971
43103
  height: ${elementHeight - operationAreaReservedHeight}px;`;
@@ -42981,42 +43113,41 @@ class alarm_element_AlarmElement extends conditional_display_element_Conditional
42981
43113
  renderScrollableTable(elementHeight, operationAreaReservedHeight) {
42982
43114
  const dataRowHeight = this.model.heights[1] || this.model.heights[0];
42983
43115
  this.rowHeight = dataRowHeight;
43116
+ this.scrollWindowStart = 0;
43117
+ // 之前用"表头/表体分两个 table + flex 包裹容器 + overflow/transform 滚动"的结构,
43118
+ // 在 iOS WKWebView 上表体会明显放大错位,换了两种滚动实现方式(原生 overflow:auto、
43119
+ // JS transform 平移)都复现同样的问题,怀疑是这套多层 div + 双 table 结构本身的问题。
43120
+ // 这里改成和 renderPlainTable() 完全同构的单 table 结构(已验证在所有平台上都正常),
43121
+ // DOM 里始终只保留 maxVisibleRows 行数据,滚动时只增删 <tr> 内容,不做任何位移/滚动。
43122
+ // 自定义滚动条(轨道+滑块)只用 position + top/height 定位,不用 overflow/transform/
43123
+ // will-change,这些属性都不会触发 WebKit 合成层提升,不会重新引入 iOS 缩放错位问题。
43124
+ const scrollbarWidth = 6;
42984
43125
  const wrapper = document.createElement('div');
42985
- wrapper.style.cssText = `display: flex;
42986
- flex-direction: column;
42987
- box-sizing: border-box;
42988
- border: 2px solid ${this.model.generalSetting.stroke};
43126
+ wrapper.style.cssText = `position: relative; width: ${this.model.size.width}px;
43127
+ height: ${elementHeight - operationAreaReservedHeight}px;`;
43128
+ const table = document.createElement('table');
43129
+ table.style.cssText = `border: 2px solid ${this.model.generalSetting.stroke};
42989
43130
  height: ${elementHeight - operationAreaReservedHeight}px;
42990
- overflow: hidden;`;
42991
- const headerWrapper = document.createElement('div');
42992
- headerWrapper.style.cssText = 'flex: none; box-sizing: border-box; overflow: hidden;';
42993
- const headerTable = document.createElement('table');
42994
- headerTable.style.cssText = 'width: 100%; table-layout: fixed;';
42995
- headerTable.appendChild(this.buildHeaderRow());
42996
- headerWrapper.appendChild(headerTable);
42997
- const bodyContainer = document.createElement('div');
42998
- bodyContainer.style.cssText = `flex: none;
42999
- overflow-y: auto;
43000
- overflow-x: hidden;
43001
- height: ${dataRowHeight * this.maxVisibleRows}px;`;
43002
- const bodyTable = document.createElement('table');
43003
- bodyTable.style.cssText = 'width: 100%; table-layout: fixed;';
43004
- for (let row = 0; row < this.pageSize; row++) {
43005
- bodyTable.appendChild(this.buildDataRow(row, dataRowHeight));
43006
- }
43007
- bodyContainer.appendChild(bodyTable);
43008
- wrapper.appendChild(headerWrapper);
43009
- wrapper.appendChild(bodyContainer);
43131
+ width: calc(100% - ${scrollbarWidth}px);`;
43132
+ table.appendChild(this.buildHeaderRow());
43133
+ wrapper.appendChild(table);
43134
+ const track = document.createElement('div');
43135
+ track.style.cssText = `position: absolute; top: 0; right: 0; width: ${scrollbarWidth}px;
43136
+ height: 100%; background: rgba(0,0,0,0.06); border-radius: ${scrollbarWidth / 2}px;`;
43137
+ const thumb = document.createElement('div');
43138
+ thumb.style.cssText = `position: absolute; left: 0; width: 100%;
43139
+ background: rgba(0,0,0,0.35); border-radius: ${scrollbarWidth / 2}px; cursor: pointer;`;
43140
+ track.appendChild(thumb);
43141
+ wrapper.appendChild(track);
43010
43142
  this.element.appendChild(wrapper);
43011
- this.scrollContainer = bodyContainer;
43012
- requestAnimationFrame(() => {
43013
- const scrollbarWidth = bodyContainer.offsetWidth - bodyContainer.clientWidth;
43014
- if (scrollbarWidth > 0) {
43015
- headerWrapper.style.paddingRight = scrollbarWidth + 'px';
43016
- }
43017
- });
43018
- this.hoverTarget = bodyContainer;
43143
+ this.scrollContent = table;
43144
+ this.scrollTrack = track;
43145
+ this.scrollThumb = thumb;
43146
+ this.renderScrollWindow(0);
43147
+ this.updateScrollThumb();
43148
+ this.hoverTarget = table;
43019
43149
  this.bindScrollHoverEvents();
43150
+ this.bindScrollbarEvents();
43020
43151
  this.startAutoScroll();
43021
43152
  }
43022
43153
  bindScrollHoverEvents() {
@@ -43024,41 +43155,93 @@ class alarm_element_AlarmElement extends conditional_display_element_Conditional
43024
43155
  return;
43025
43156
  this.hoverTarget.addEventListener('mouseenter', this.handleScrollMouseEnter);
43026
43157
  this.hoverTarget.addEventListener('mouseleave', this.handleScrollMouseLeave);
43158
+ if (this.scrollContent) {
43159
+ this.hoverTarget.addEventListener('wheel', this.handleScrollWheel, { passive: false });
43160
+ this.hoverTarget.addEventListener('touchstart', this.handleScrollTouchStart, { passive: true });
43161
+ this.hoverTarget.addEventListener('touchmove', this.handleScrollTouchMove, { passive: false });
43162
+ }
43027
43163
  }
43028
43164
  unbindScrollHoverEvents() {
43165
+ this.unbindScrollbarEvents();
43029
43166
  if (!this.hoverTarget)
43030
43167
  return;
43031
43168
  this.hoverTarget.removeEventListener('mouseenter', this.handleScrollMouseEnter);
43032
43169
  this.hoverTarget.removeEventListener('mouseleave', this.handleScrollMouseLeave);
43170
+ this.hoverTarget.removeEventListener('wheel', this.handleScrollWheel);
43171
+ this.hoverTarget.removeEventListener('touchstart', this.handleScrollTouchStart);
43172
+ this.hoverTarget.removeEventListener('touchmove', this.handleScrollTouchMove);
43033
43173
  this.hoverTarget = null;
43034
43174
  }
43175
+ // 手动滚动只在当前可见窗口范围内移动(不触发翻页),到顶/到底停住,
43176
+ // 和自动滚动定时器(会在到底后自动翻页)职责区分开
43177
+ moveScrollWindowBy(rowDelta) {
43178
+ if (!this.scrollContent)
43179
+ return;
43180
+ const maxWindowStart = Math.max(0, this.pageSize - this.maxVisibleRows);
43181
+ const nextStart = Math.min(maxWindowStart, Math.max(0, this.scrollWindowStart + rowDelta));
43182
+ if (nextStart === this.scrollWindowStart)
43183
+ return;
43184
+ this.scrollWindowStart = nextStart;
43185
+ this.renderScrollWindow(this.scrollWindowStart);
43186
+ }
43187
+ bindScrollbarEvents() {
43188
+ if (!this.scrollTrack || !this.scrollThumb)
43189
+ return;
43190
+ this.scrollThumb.addEventListener('mousedown', this.handleThumbDragStart);
43191
+ this.scrollThumb.addEventListener('touchstart', this.handleThumbDragStart, { passive: true });
43192
+ this.scrollTrack.addEventListener('mousedown', this.handleTrackClick);
43193
+ }
43194
+ unbindScrollbarEvents() {
43195
+ if (this.scrollThumb) {
43196
+ this.scrollThumb.removeEventListener('mousedown', this.handleThumbDragStart);
43197
+ this.scrollThumb.removeEventListener('touchstart', this.handleThumbDragStart);
43198
+ }
43199
+ if (this.scrollTrack) {
43200
+ this.scrollTrack.removeEventListener('mousedown', this.handleTrackClick);
43201
+ }
43202
+ document.removeEventListener('mousemove', this.handleThumbDragMove);
43203
+ document.removeEventListener('mouseup', this.handleThumbDragEnd);
43204
+ document.removeEventListener('touchmove', this.handleThumbDragMove);
43205
+ document.removeEventListener('touchend', this.handleThumbDragEnd);
43206
+ this.scrollTrack = null;
43207
+ this.scrollThumb = null;
43208
+ }
43209
+ getClientY(event) {
43210
+ return 'touches' in event ? event.touches[0].clientY : event.clientY;
43211
+ }
43035
43212
  startAutoScroll() {
43036
43213
  clearInterval(this.scrollIntervalId);
43037
43214
  if (!this.model.generalSetting.autoScroll)
43038
43215
  return;
43039
43216
  const totalPages = Math.max(1, Math.ceil(this.totalCount / this.pageSize));
43040
- if (totalPages <= 1 && !this.scrollContainer)
43217
+ if (totalPages <= 1 && !this.scrollContent)
43041
43218
  return;
43042
43219
  const duration = (this.model.generalSetting.scrollDuration || 10) * 1000;
43043
43220
  this.scrollIntervalId = setInterval(() => this.scrollOneRow(), duration);
43044
43221
  }
43045
43222
  scrollOneRow() {
43046
- const el = this.scrollContainer;
43047
- if (!el) {
43223
+ if (!this.scrollContent) {
43048
43224
  this.autoNextPage();
43049
43225
  return;
43050
43226
  }
43051
- const maxScrollTop = el.scrollHeight - el.clientHeight;
43052
- if (maxScrollTop <= 1 || el.scrollTop >= maxScrollTop - 1) {
43227
+ const maxWindowStart = this.pageSize - this.maxVisibleRows;
43228
+ if (maxWindowStart <= 0 || this.scrollWindowStart >= maxWindowStart) {
43053
43229
  this.autoNextPage();
43054
43230
  return;
43055
43231
  }
43056
- el.scrollTop = Math.min(el.scrollTop + this.rowHeight, maxScrollTop);
43232
+ this.scrollWindowStart += 1;
43233
+ this.renderScrollWindow(this.scrollWindowStart);
43057
43234
  }
43058
43235
  autoNextPage() {
43059
43236
  const totalPages = Math.max(1, Math.ceil(this.totalCount / this.pageSize));
43060
- if (totalPages <= 1)
43237
+ if (totalPages <= 1) {
43238
+ // 只有一页数据:没有下一页可翻,循环回本页顶部继续滚动
43239
+ if (this.scrollContent) {
43240
+ this.scrollWindowStart = 0;
43241
+ this.renderScrollWindow(0);
43242
+ }
43061
43243
  return;
43244
+ }
43062
43245
  const lastPage = totalPages - 1;
43063
43246
  this.page = this.page < lastPage ? this.page + 1 : 0;
43064
43247
  this.getAlarmData();
@@ -44152,7 +44335,7 @@ class main_element_MainElement {
44152
44335
  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));
44153
44336
  break;
44154
44337
  case shared["d" /* GuiConsts */].components.characterKey:
44155
- 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));
44338
+ 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));
44156
44339
  break;
44157
44340
  case shared["d" /* GuiConsts */].components.textKey:
44158
44341
  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));
@@ -44941,7 +45124,7 @@ var lodash = __webpack_require__(2);
44941
45124
  var _tmp_localization = __webpack_require__(10);
44942
45125
 
44943
45126
  // EXTERNAL MODULE: ./.tmp/settings/index.ts + 2 modules
44944
- var settings = __webpack_require__(15);
45127
+ var settings = __webpack_require__(12);
44945
45128
 
44946
45129
  // EXTERNAL MODULE: ./.tmp/logger/index.ts + 2 modules
44947
45130
  var logger = __webpack_require__(8);
@@ -45378,7 +45561,7 @@ gui_component_GuiComponent = __decorate([
45378
45561
  /* harmony import */ var _localization__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(10);
45379
45562
  /* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(2);
45380
45563
  /* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_2__);
45381
- /* harmony import */ var _settings__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(15);
45564
+ /* harmony import */ var _settings__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(12);
45382
45565
  var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
45383
45566
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
45384
45567
  if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
@@ -45399,15 +45582,19 @@ let WriteValueModalComponent = class WriteValueModalComponent {
45399
45582
  this.fractionDigitService = fractionDigitService;
45400
45583
  this.numericalOperationService = numericalOperationService;
45401
45584
  this.bsModalRef = bsModalRef;
45585
+ this.isMobileMode = false;
45402
45586
  this.displayVariableName = '';
45403
45587
  this.writeValueRangeText = '';
45404
45588
  this.isSubmitting = false;
45405
- this.isMobileMode = _settings__WEBPACK_IMPORTED_MODULE_3__[/* DisplayMode */ "a"].Mobile === injector.get(_settings__WEBPACK_IMPORTED_MODULE_3__[/* GlobalSettings */ "b"]).displayMode;
45589
+ this.isDisplayModeMobile = _settings__WEBPACK_IMPORTED_MODULE_3__[/* DisplayMode */ "a"].Mobile === injector.get(_settings__WEBPACK_IMPORTED_MODULE_3__[/* GlobalSettings */ "b"]).displayMode;
45406
45590
  }
45407
45591
  get invalidErrorText() {
45408
45592
  return this.localization.loadFailed;
45409
45593
  }
45410
45594
  ngOnInit() {
45595
+ // 画面模拟(SimulateRemoteGuiContext)下 releasedVariableService 恒为空,
45596
+ // 借此和真实移动端区分开,避免在 PC 浏览器模拟移动端时套用移动端专属样式
45597
+ this.isMobileMode = this.isDisplayModeMobile && !!this.args.releasedVariableService;
45411
45598
  this.initData(this.args);
45412
45599
  this.validate();
45413
45600
  }
@@ -45659,7 +45846,7 @@ WriteValueModalComponent = __decorate([
45659
45846
  /* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_angular_core__WEBPACK_IMPORTED_MODULE_0__);
45660
45847
  /* harmony import */ var rxjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(39);
45661
45848
  /* harmony import */ var _localization__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(10);
45662
- /* harmony import */ var _settings__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(15);
45849
+ /* harmony import */ var _settings__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(12);
45663
45850
  var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
45664
45851
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
45665
45852
  if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
@@ -45677,7 +45864,8 @@ let WriteCharacterModalComponent = class WriteCharacterModalComponent {
45677
45864
  constructor(localization, injector) {
45678
45865
  this.localization = localization;
45679
45866
  this._onClosed = new rxjs__WEBPACK_IMPORTED_MODULE_1__[/* Subject */ "a"]();
45680
- this.isMobileMode = _settings__WEBPACK_IMPORTED_MODULE_3__[/* DisplayMode */ "a"].Mobile === injector.get(_settings__WEBPACK_IMPORTED_MODULE_3__[/* GlobalSettings */ "b"]).displayMode;
45867
+ this.isMobileMode = false;
45868
+ this.isDisplayModeMobile = _settings__WEBPACK_IMPORTED_MODULE_3__[/* DisplayMode */ "a"].Mobile === injector.get(_settings__WEBPACK_IMPORTED_MODULE_3__[/* GlobalSettings */ "b"]).displayMode;
45681
45869
  }
45682
45870
  get onClosed() {
45683
45871
  return this._onClosed;
@@ -45686,6 +45874,9 @@ let WriteCharacterModalComponent = class WriteCharacterModalComponent {
45686
45874
  return this.localization.loadFailed;
45687
45875
  }
45688
45876
  ngOnInit() {
45877
+ // 画面模拟(SimulateRemoteGuiContext)下 releasedVariableService 恒为空,
45878
+ // 借此和真实移动端区分开,避免在 PC 浏览器模拟移动端时套用移动端专属样式
45879
+ this.isMobileMode = this.isDisplayModeMobile && !!this.args.releasedVariableService;
45689
45880
  this.variableName = this.args.variableName;
45690
45881
  this.isPassword = this.args.isPassword ? this.args.isPassword : false;
45691
45882
  this.charCount = this.args.charCount;
@@ -45739,7 +45930,7 @@ WriteCharacterModalComponent = __decorate([
45739
45930
  "use strict";
45740
45931
 
45741
45932
  // EXTERNAL MODULE: ./node_modules/rxjs/node_modules/tslib/tslib.es6.js
45742
- var tslib_es6 = __webpack_require__(13);
45933
+ var tslib_es6 = __webpack_require__(14);
45743
45934
 
45744
45935
  // EXTERNAL MODULE: ./node_modules/rxjs/_esm5/internal/Observable.js + 3 modules
45745
45936
  var Observable = __webpack_require__(16);
@@ -67856,7 +68047,7 @@ class RelationConditionResult {
67856
68047
  }
67857
68048
 
67858
68049
  // EXTERNAL MODULE: ./.tmp/model/shared/condition/variable-value-type.ts
67859
- var variable_value_type = __webpack_require__(12);
68050
+ var variable_value_type = __webpack_require__(13);
67860
68051
 
67861
68052
  // EXTERNAL MODULE: ./.tmp/model/shared/condition/relation-type.ts
67862
68053
  var relation_type = __webpack_require__(23);
@@ -69371,7 +69562,7 @@ var Observable = __webpack_require__(16);
69371
69562
  var isScheduler = __webpack_require__(51);
69372
69563
 
69373
69564
  // EXTERNAL MODULE: ./node_modules/rxjs/node_modules/tslib/tslib.es6.js
69374
- var tslib_es6 = __webpack_require__(13);
69565
+ var tslib_es6 = __webpack_require__(14);
69375
69566
 
69376
69567
  // EXTERNAL MODULE: ./node_modules/rxjs/_esm5/internal/Subscriber.js
69377
69568
  var Subscriber = __webpack_require__(29);
@@ -88012,7 +88203,7 @@ __webpack_require__.r(__webpack_exports__);
88012
88203
 
88013
88204
  /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "RemoteVariableProtocol", function() { return _remote__WEBPACK_IMPORTED_MODULE_11__["k"]; });
88014
88205
 
88015
- /* harmony import */ var _service__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(14);
88206
+ /* harmony import */ var _service__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(15);
88016
88207
  /* 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__));
88017
88208
  /* harmony import */ var _logger__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(8);
88018
88209
  /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "LOGGER_SERVICE_TOKEN", function() { return _logger__WEBPACK_IMPORTED_MODULE_13__["b"]; });