@flexem/fc-gui 3.0.0-alpha.166 → 3.0.0-alpha.168

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.
@@ -22355,7 +22355,7 @@ const Localization_zh_CN = {
22355
22355
  lastTwentyFourHours: '最近24小时',
22356
22356
  lastSevenDays: '最近7天',
22357
22357
  lastThirtyDays: '最近30天',
22358
- lastOneYear: '最近1年',
22358
+ lastOneYear: '最近半年',
22359
22359
  customTimeRange: '自定义',
22360
22360
  startTime: '开始时间',
22361
22361
  endTime: '结束时间',
@@ -32555,7 +32555,7 @@ const DefaultLocalization = {
32555
32555
  lastTwentyFourHours: 'Last 24 hours',
32556
32556
  lastSevenDays: 'Last 7 days',
32557
32557
  lastThirtyDays: 'Last 30 days',
32558
- lastOneYear: 'Last 1 year',
32558
+ lastOneYear: 'Last 6 months',
32559
32559
  customTimeRange: 'Custom',
32560
32560
  startTime: 'Start Time',
32561
32561
  endTime: 'End Time',
@@ -36174,7 +36174,7 @@ class character_display_element_CharacterDisplayElement extends readable_element
36174
36174
  }
36175
36175
  const args = new WriteCharacterModalArgs(this.writeVariableName, this.model.isPassword, this.model.charCount, this.displayValue);
36176
36176
  const modalRef = this.modalService.show(write_character_modal_component["a" /* WriteCharacterModalComponent */], {
36177
- initialState: { args: args }, backdrop: 'static', class: 'gui-modal-dialog-position', animated: false
36177
+ initialState: { args: args }, backdrop: 'static', class: 'gui-modal-dialog-position gui-modal-write', animated: false
36178
36178
  });
36179
36179
  const onClosedSub = modalRef.content.onClosed.subscribe(result => {
36180
36180
  modalRef.hide();
@@ -37162,12 +37162,13 @@ var AxisRangeType;
37162
37162
 
37163
37163
 
37164
37164
  class historical_curve_element_HistoricalCurveElement extends conditional_display_element_ConditionalDisplayElement {
37165
- constructor(element, injector, permissionChecker, variableCommunicator, variableStore, historyDataStore, signalRAppId, systemTextLibraryService, languageService, guiContext) {
37165
+ constructor(element, injector, permissionChecker, variableCommunicator, variableStore, historyDataStore, signalRAppId, systemTextLibraryService, languageService, guiContext, releasedVariableService) {
37166
37166
  super(element, permissionChecker, variableCommunicator, variableStore, signalRAppId);
37167
37167
  this.historyDataStore = historyDataStore;
37168
37168
  this.systemTextLibraryService = systemTextLibraryService;
37169
37169
  this.languageService = languageService;
37170
37170
  this.guiContext = guiContext;
37171
+ this.releasedVariableService = releasedVariableService;
37171
37172
  this.displayOption = {
37172
37173
  dataLimit: 500,
37173
37174
  dataZoomHeight: 32,
@@ -37343,13 +37344,13 @@ class historical_curve_element_HistoricalCurveElement extends conditional_displa
37343
37344
  timePeriods.push({ key: 3, name: this.getTimePeriodText(service["TIME_PERIOD_KEYS"].LAST_SEVEN_DAYS) });
37344
37345
  timePeriods.push({ key: 4, name: this.getTimePeriodText(service["TIME_PERIOD_KEYS"].LAST_THIRTY_DAYS) });
37345
37346
  timePeriods.push({ key: 5, name: this.getTimePeriodText(service["TIME_PERIOD_KEYS"].LAST_ONE_YEAR) });
37346
- timePeriods.push({ key: 8, name: this.getTimePeriodText(service["TIME_PERIOD_KEYS"].CUSTOM, this.localization.customTimeRange) });
37347
+ timePeriods.push({ key: 8, name: this.getTimePeriodText(service["TIME_PERIOD_KEYS"].CUSTOM) });
37347
37348
  return timePeriods;
37348
37349
  }
37349
37350
  /**
37350
- * 获取时间段文案(从系统文本库获取多语种翻译,fallback 到 localization)
37351
+ * 获取时间段文案(从系统文本库获取多语种翻译)
37351
37352
  */
37352
- getTimePeriodText(textKey, fallback = '') {
37353
+ getTimePeriodText(textKey) {
37353
37354
  const currentCulture = this.getCurrentCulture();
37354
37355
  const systemType = service["SYSTEM_TEXT_LIBRARY_TYPES"].COMPONENT_BUILTIN;
37355
37356
  if (this.systemTextLibraryService) {
@@ -37358,7 +37359,7 @@ class historical_curve_element_HistoricalCurveElement extends conditional_displa
37358
37359
  return translation;
37359
37360
  }
37360
37361
  }
37361
- return fallback;
37362
+ return '';
37362
37363
  }
37363
37364
  updateTimeRange(timePeriodType) {
37364
37365
  this.currentTimePeriod = +timePeriodType;
@@ -37831,7 +37832,10 @@ class historical_curve_element_HistoricalCurveElement extends conditional_displa
37831
37832
  .style('background', '#1890ff')
37832
37833
  .style('color', '#fff');
37833
37834
  if (tp.key === 8) {
37834
- this.showCustomTimeRangeModal();
37835
+ const isSimulation = !this.releasedVariableService;
37836
+ if (!isSimulation) {
37837
+ this.showCustomTimeRangeModal();
37838
+ }
37835
37839
  return;
37836
37840
  }
37837
37841
  this.updateTimeRange(tp.key);
@@ -37950,7 +37954,7 @@ class historical_curve_element_HistoricalCurveElement extends conditional_displa
37950
37954
  header.style.cssText = 'display:flex;align-items:center;justify-content:space-between;padding:12px 16px;border-bottom:1px solid #e8e8e8;';
37951
37955
  const title = document.createElement('span');
37952
37956
  title.style.cssText = 'font-size:16px;font-weight:500;color:#333;';
37953
- title.textContent = this.localization.customTimeRange || '自定义';
37957
+ title.textContent = this.getTimePeriodText(service["TIME_PERIOD_KEYS"].CUSTOM);
37954
37958
  const closeBtn = document.createElement('span');
37955
37959
  closeBtn.style.cssText = 'cursor:pointer;font-size:18px;color:#999;line-height:1;';
37956
37960
  closeBtn.textContent = '×';
@@ -38387,16 +38391,22 @@ class numerical_display_element_NumericalDisplayElement extends readable_element
38387
38391
  */
38388
38392
  reportValueChanged(value) {
38389
38393
  var _a, _b, _c;
38390
- // 拦截上下限变量推送,更新缓存值
38394
+ // 更新上下限变量缓存(不阻断后续处理)
38391
38395
  if (this.upperLimitVariableName && value.variableName === this.upperLimitVariableName) {
38392
38396
  const num = Number(value.value);
38393
38397
  this._resolvedUpperLimitValue = (value.value != null && !isNaN(num)) ? num : undefined;
38394
- return;
38398
+ // 如果上限变量不是主显示变量,直接返回
38399
+ if (value.variableName !== this.readVariableName) {
38400
+ return;
38401
+ }
38395
38402
  }
38396
38403
  if (this.lowerLimitVariableName && value.variableName === this.lowerLimitVariableName) {
38397
38404
  const num = Number(value.value);
38398
38405
  this._resolvedLowerLimitValue = (value.value != null && !isNaN(num)) ? num : undefined;
38399
- return;
38406
+ // 如果下限变量不是主显示变量,直接返回
38407
+ if (value.variableName !== this.readVariableName) {
38408
+ return;
38409
+ }
38400
38410
  }
38401
38411
  // 处理系统变量"当前语种ID"
38402
38412
  if (value.variableName === '当前语种ID') {
@@ -38537,15 +38547,27 @@ class numerical_display_element_NumericalDisplayElement extends readable_element
38537
38547
  // 获取数值操作配置,上下限变量类型已在 reportValueChanged 中实时更新到缓存
38538
38548
  const numericalOperation = this.numericalOperationService.getNumericalOperations(this.model);
38539
38549
  // 用缓存的实时值替换变量类型上下限
38550
+ // 模拟模式下(releasedVariableService 为空)变量无实时值,直接使用数据类型默认范围
38551
+ const isSimulation = !this.releasedVariableService;
38540
38552
  if (typeof numericalOperation.numericalUpperLimit === 'object' && numericalOperation.numericalUpperLimit.type === 1) {
38541
- numericalOperation.numericalUpperLimit = this._resolvedUpperLimitValue != null
38542
- ? this._resolvedUpperLimitValue
38543
- : (this.dataTypeService.getMaxValue(this.model.version || 0, this.model.dataType || 0, this.model.fBoxDataType || 0) || 0);
38553
+ if (isSimulation) {
38554
+ numericalOperation.numericalUpperLimit = this.dataTypeService.getMaxValue(this.model.version || 0, this.model.dataType || 0, this.model.fBoxDataType || 0, this.model.integerDigits || undefined, this.model.fractionDigits || undefined);
38555
+ }
38556
+ else {
38557
+ numericalOperation.numericalUpperLimit = this._resolvedUpperLimitValue != null
38558
+ ? this._resolvedUpperLimitValue
38559
+ : (this.dataTypeService.getMaxValue(this.model.version || 0, this.model.dataType || 0, this.model.fBoxDataType || 0) || 0);
38560
+ }
38544
38561
  }
38545
38562
  if (typeof numericalOperation.numericalLowerLimit === 'object' && numericalOperation.numericalLowerLimit.type === 1) {
38546
- numericalOperation.numericalLowerLimit = this._resolvedLowerLimitValue != null
38547
- ? this._resolvedLowerLimitValue
38548
- : (this.dataTypeService.getMinValue(this.model.version || 0, this.model.dataType || 0, this.model.fBoxDataType || 0) || 0);
38563
+ if (isSimulation) {
38564
+ numericalOperation.numericalLowerLimit = this.dataTypeService.getMinValue(this.model.version || 0, this.model.dataType || 0, this.model.fBoxDataType || 0, this.model.integerDigits || undefined, this.model.fractionDigits || undefined);
38565
+ }
38566
+ else {
38567
+ numericalOperation.numericalLowerLimit = this._resolvedLowerLimitValue != null
38568
+ ? this._resolvedLowerLimitValue
38569
+ : (this.dataTypeService.getMinValue(this.model.version || 0, this.model.dataType || 0, this.model.fBoxDataType || 0) || 0);
38570
+ }
38549
38571
  }
38550
38572
  const args = new WriteValueModalArgs(this.writeVariableName, this.model.dataType, this.model.fBoxDataType, this.model.integerDigits, this.model.fractionDigits, numericalOperation, this.model.version, this.enableDataParsed, this.releasedVariableService, this.guiContext);
38551
38573
  this.writeValueMmodalRef = this.modalService.show(write_value_modal_component["a" /* WriteValueModalComponent */], {
@@ -43692,7 +43714,7 @@ class main_element_MainElement {
43692
43714
  this.elements.push(new datetime_display_element_DatetimeDisplayElement(element, this.injector, this.context.permissionChecker, this.variableCommunicator, this.context.configStore.variableStore, this.context.configStore.graphStore, this.signalRAppId));
43693
43715
  break;
43694
43716
  case shared["d" /* GuiConsts */].components.historicalCurveKey:
43695
- this.elements.push(new historical_curve_element_HistoricalCurveElement(element, this.injector, this.context.permissionChecker, this.variableCommunicator, this.context.configStore.variableStore, this.context.configStore.historyDataStore, this.signalRAppId, this.context.systemTextLibraryService, this.context.languageService, this.context));
43717
+ this.elements.push(new historical_curve_element_HistoricalCurveElement(element, this.injector, this.context.permissionChecker, this.variableCommunicator, this.context.configStore.variableStore, this.context.configStore.historyDataStore, this.signalRAppId, this.context.systemTextLibraryService, this.context.languageService, this.context, this.context.releasedVariableService));
43696
43718
  break;
43697
43719
  case shared["d" /* GuiConsts */].components.ringGraphKey:
43698
43720
  this.elements.push(new ring_graph_element_RingGraphElement(element, this.context.permissionChecker, this.variableCommunicator, this.context.configStore.variableStore, this.injector.get(_tmp_localization["b" /* LOCALIZATION */]), this.signalRAppId));
@@ -45071,7 +45093,7 @@ WriteValueModalComponent = __decorate([
45071
45093
  Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Component"])({
45072
45094
  selector: 'writeValueModal',
45073
45095
  template: "<form #writeValueForm=\"ngForm\" novalidate (ngSubmit)=\"save()\" bs-modal-drag> <div class=\"modal-header\"> <h4 class=\"modal-title\"> <span>{{localization.setting}}</span> <span>{{displayVariableName}}</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=\"write-value-range\">{{localization.writeValueRange}}:</span> <span> {{writeValueRangeText}} <span *ngIf=\"valueType\">({{valueType}})</span> </span> <input type=\"text\" name=\"valueInput\" autoFocus class=\"form-control form-control-write write-value\" [(ngModel)]=\"value\" (keyup)=\"validate($event)\" autocomplete=\"off\"> <span class=\"help-block text-danger\" [hidden]=\"!validationError\">{{validationErrorText}}</span> </div> <div class=\"modal-footer modal-footer-write\"> <button type=\"submit\" class=\"btn md-skip btn-primary btn-primary-write btn-block\" [disabled]=\"validationError || isSubmitting\"> <ng-container *ngIf=\"!isSubmitting\">{{localization.submit}}</ng-container> <ng-container *ngIf=\"isSubmitting\">{{localization.submitting}}</ng-container> </button> </div> </form> ",
45074
- 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%; } .form-control-write { margin: 0 20px; width: 410px; } .modal-footer { padding: 10px 5px 20px 5px !important; text-align: right; border-color: transparent; } .modal-footer-write { padding: 10px 5px 20px 5px !important; } .text-danger { display: block; color: #ed6b75; font-size: 14px; margin: 5px 0px 0px 15px; } .btn-primary { background-color: #3B97FC; border-color: #3B97FC; padding: 5px 30px; width: 90%; margin: 0 5%; height: 32px; } .btn-primary-write { width: 410px; margin: 0 15px; } .write-value-range { color: #7f939e; font-size: 14px; margin-left: 15px; } .write-value { padding-left: 8px; margin-left: 16px; height: 32px; } "]
45096
+ 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%; } .form-control-write { margin: 0 20px; width: 585px; } .modal-footer { padding: 10px 5px 20px 5px !important; text-align: right; border-color: transparent; } .modal-footer-write { margin-right: 4px; padding: 10px 5px 20px 5px !important; } .text-danger { display: block; color: #ed6b75; font-size: 14px; margin: 5px 0px 0px 15px; } .btn-primary { background-color: #3B97FC; border-color: #3B97FC; padding: 5px 30px; width: 90%; margin: 0 5%; height: 32px; } .btn-primary-write { width: 585px; margin: 0 15px 0 0; } .write-value-range { color: #7f939e; font-size: 14px; margin-left: 15px; } .write-value { padding-left: 8px; margin-left: 16px; height: 32px; } "]
45075
45097
  }),
45076
45098
  __param(0, Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Inject"])(_localization__WEBPACK_IMPORTED_MODULE_1__[/* LOCALIZATION */ "b"]))
45077
45099
  ], WriteValueModalComponent);
@@ -45150,8 +45172,8 @@ __decorate([
45150
45172
  WriteCharacterModalComponent = __decorate([
45151
45173
  Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Component"])({
45152
45174
  selector: 'writeCharacterModal',
45153
- template: "<form #writeValueForm=\"ngForm\" novalidate (ngSubmit)=\"save()\" bs-modal-drag> <div class=\"modal-header\"> <h4 class=\"modal-title\"> <span>{{localization.setting}}</span> <span>{{variableName}}</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\"> <input type=\"text\" name=\"characterInput\" autoFocus class=\"form-control write-character-value\" [(ngModel)]=\"value\" (keyup)=\"validate()\" *ngIf=\"!isPassword\" autocomplete=\"off\"> <input type=\"password\" name=\"passwordInput\" autoFocus class=\"form-control write-character-value\" [(ngModel)]=\"value\" (keyup)=\"validate()\" *ngIf=\"isPassword\" autocomplete=\"off\"> <span class=\"help-block text-danger\" [hidden]=\"!validationError\">{{validationErrorText}}</span> </div> <div class=\"modal-footer\"> <button type=\"submit\" class=\"btn md-skip btn-primary btn-block\" [disabled]=\"validationError\">{{localization.submit}}</button> </div> </form> ",
45154
- styles: [".modal-header { padding: 10px; border-color: transparent; } .modal-body { position: relative; padding: 0px 5px !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; } .text-danger { display: block; color: #ed6b75; font-size: 14px; margin: 10px 0px 0px 15px; } .btn-primary { background-color: #3B97FC; border-color: #3B97FC; padding: 5px 30px; width: 90%; margin: 0 5%; height: 32px; } .write-character-value { padding-left: 8px; height: 32px; margin-left: 16px; } "]
45175
+ template: "<form #writeValueForm=\"ngForm\" novalidate (ngSubmit)=\"save()\" bs-modal-drag> <div class=\"modal-header\"> <h4 class=\"modal-title\"> <span>{{localization.setting}}</span> <span>{{variableName}}</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\"> <input type=\"text\" name=\"characterInput\" autoFocus class=\"form-control form-control-write write-character-value\" [(ngModel)]=\"value\" (keyup)=\"validate()\" *ngIf=\"!isPassword\" autocomplete=\"off\"> <input type=\"password\" name=\"passwordInput\" autoFocus class=\"form-control form-control-write write-character-value\" [(ngModel)]=\"value\" (keyup)=\"validate()\" *ngIf=\"isPassword\" autocomplete=\"off\"> <span class=\"help-block text-danger\" [hidden]=\"!validationError\">{{validationErrorText}}</span> </div> <div class=\"modal-footer modal-footer-write\"> <button type=\"submit\" class=\"btn md-skip btn-primary btn-primary-write btn-block\" [disabled]=\"validationError\">{{localization.submit}}</button> </div> </form> ",
45176
+ styles: [".modal-header { padding: 10px; border-color: transparent; } .modal-body { position: relative; padding: 0px 5px !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; } .text-danger { display: block; color: #ed6b75; font-size: 14px; margin: 10px 0px 0px 15px; } .btn-primary { background-color: #3B97FC; border-color: #3B97FC; padding: 5px 30px; width: 90%; margin: 0 5%; height: 32px; } .write-character-value { padding-left: 8px; height: 32px; margin-left: 16px; } .modal-footer-write { margin-right: 4px; padding: 10px 5px 20px 5px !important; } .btn-primary-write { width: 585px; margin: 0 15px 0 0; } .form-control-write { margin: 0 16px; width: 585px; } "]
45155
45177
  }),
45156
45178
  __param(0, Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Inject"])(_localization__WEBPACK_IMPORTED_MODULE_2__[/* LOCALIZATION */ "b"]))
45157
45179
  ], WriteCharacterModalComponent);