@flexem/fc-gui 3.0.0-alpha.177 → 3.0.0-alpha.179
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.
- package/bundles/@flexem/fc-gui.umd.js +28 -16
- package/bundles/@flexem/fc-gui.umd.js.map +1 -1
- package/bundles/@flexem/fc-gui.umd.min.js +4 -4
- package/bundles/@flexem/fc-gui.umd.min.js.map +1 -1
- package/elements/scroll-alarm/scroll-alarm-element.d.ts +1 -0
- package/elements/scroll-alarm/scroll-alarm-element.js +16 -14
- package/elements/scroll-alarm/scroll-alarm-element.metadata.json +1 -1
- package/modal/write-character/write-character-modal.component.d.ts +1 -0
- package/modal/write-character/write-character-modal.component.html +1 -1
- package/modal/write-character/write-character-modal.component.js +6 -1
- package/modal/write-character/write-character-modal.component.metadata.json +1 -1
- package/modal/write-value/write-value-modal.component.d.ts +1 -0
- package/modal/write-value/write-value-modal.component.html +1 -1
- package/modal/write-value/write-value-modal.component.js +6 -1
- package/modal/write-value/write-value-modal.component.metadata.json +1 -1
- package/package.json +1 -1
|
@@ -42884,6 +42884,7 @@ class alarm_element_AlarmElement extends conditional_display_element_Conditional
|
|
|
42884
42884
|
|
|
42885
42885
|
|
|
42886
42886
|
|
|
42887
|
+
|
|
42887
42888
|
var ScrollAlarmElementStatus;
|
|
42888
42889
|
(function (ScrollAlarmElementStatus) {
|
|
42889
42890
|
ScrollAlarmElementStatus[ScrollAlarmElementStatus["Normal"] = 0] = "Normal";
|
|
@@ -42916,6 +42917,7 @@ class scroll_alarm_element_ScrollAlarmElement extends conditional_dynamic_displa
|
|
|
42916
42917
|
this.rootElement.selectAll('*').remove();
|
|
42917
42918
|
this.setStatusAsLoading();
|
|
42918
42919
|
this.logger = injector.get(logger["b" /* LOGGER_SERVICE_TOKEN */]);
|
|
42920
|
+
this.localization = injector.get(_tmp_localization["b" /* LOCALIZATION */]);
|
|
42919
42921
|
this.variableCommunicator = variableCommunicator;
|
|
42920
42922
|
this.autoCycle = (_b = (_a = this.model.generalSetting) === null || _a === void 0 ? void 0 : _a.autoCycle) !== null && _b !== void 0 ? _b : true;
|
|
42921
42923
|
this.maxResultCount = (_d = (_c = this.model.generalSetting) === null || _c === void 0 ? void 0 : _c.pageSize) !== null && _d !== void 0 ? _d : 500;
|
|
@@ -43246,24 +43248,24 @@ class scroll_alarm_element_ScrollAlarmElement extends conditional_dynamic_displa
|
|
|
43246
43248
|
// 新页的起始 x = 已有总宽度 + gap(如果已有内容)
|
|
43247
43249
|
let xOffset = this.totalWidth > 0 ? this.totalWidth + GAP : 0;
|
|
43248
43250
|
pageData.forEach((alarm) => {
|
|
43249
|
-
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
43251
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
43250
43252
|
const contentParts = [];
|
|
43251
43253
|
if (((_a = this.model.generalSetting) === null || _a === void 0 ? void 0 : _a.showTriggerTime) && alarm.triggeredTime) {
|
|
43252
43254
|
contentParts.push(moment(alarm.triggeredTime).format('YYYY/MM/DD HH:mm:ss'));
|
|
43253
43255
|
}
|
|
43254
|
-
const language = ((_d = (_c = (_b = window.abp) === null || _b === void 0 ? void 0 : _b.localization) === null || _c === void 0 ? void 0 : _c.currentLanguage) === null || _d === void 0 ? void 0 : _d.name) ||
|
|
43256
|
+
const language = ((_d = (_c = (_b = window.abp) === null || _b === void 0 ? void 0 : _b.localization) === null || _c === void 0 ? void 0 : _c.currentLanguage) === null || _d === void 0 ? void 0 : _d.name) || ((_f = (_e = this.localization.localizationService) === null || _e === void 0 ? void 0 : _e.translate) === null || _f === void 0 ? void 0 : _f.currentLang);
|
|
43255
43257
|
const isChinese = language === 'zh-Hans' || language === 'zh';
|
|
43256
|
-
if (((
|
|
43258
|
+
if (((_g = this.model.generalSetting) === null || _g === void 0 ? void 0 : _g.showAlarmLevel) && alarm.alarmLevel !== undefined) {
|
|
43257
43259
|
const levelMap = isChinese ? ['警告', '次要', '主要', '严重'] : ['Warning', 'Minor', 'Major', 'Critical'];
|
|
43258
43260
|
contentParts.push(levelMap[alarm.alarmLevel] || (isChinese ? '警告' : 'Warning'));
|
|
43259
43261
|
}
|
|
43260
|
-
if (((
|
|
43262
|
+
if (((_h = this.model.generalSetting) === null || _h === void 0 ? void 0 : _h.showAlarmName) && alarm.name) {
|
|
43261
43263
|
contentParts.push(alarm.name);
|
|
43262
43264
|
}
|
|
43263
|
-
if (((
|
|
43265
|
+
if (((_j = this.model.generalSetting) === null || _j === void 0 ? void 0 : _j.showAlarmContent) && alarm.message) {
|
|
43264
43266
|
contentParts.push(alarm.message);
|
|
43265
43267
|
}
|
|
43266
|
-
if (((
|
|
43268
|
+
if (((_k = this.model.generalSetting) === null || _k === void 0 ? void 0 : _k.showAlarmState) && alarm.state !== undefined) {
|
|
43267
43269
|
const stateMap = isChinese
|
|
43268
43270
|
? ['触发/未确认', '触发/已确认', '恢复/未确认', '恢复/已确认']
|
|
43269
43271
|
: ['Triggered/Unconfirmed', 'Triggered/Confirmed', 'Restored/Unconfirmed', 'Restored/Confirmed'];
|
|
@@ -43488,7 +43490,7 @@ class scroll_alarm_element_ScrollAlarmElement extends conditional_dynamic_displa
|
|
|
43488
43490
|
* 模拟运行时的静态显示逻辑:只显示字段标签,不查询数据
|
|
43489
43491
|
*/
|
|
43490
43492
|
renderStaticDisplay() {
|
|
43491
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s;
|
|
43493
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0;
|
|
43492
43494
|
// 根据配置构建显示的字段标签
|
|
43493
43495
|
const textParts = [];
|
|
43494
43496
|
if (((_a = this.model.generalSetting) === null || _a === void 0 ? void 0 : _a.showTriggerTime) !== false) {
|
|
@@ -43498,25 +43500,25 @@ class scroll_alarm_element_ScrollAlarmElement extends conditional_dynamic_displa
|
|
|
43498
43500
|
}
|
|
43499
43501
|
if (((_b = this.model.generalSetting) === null || _b === void 0 ? void 0 : _b.showAlarmLevel) !== false) {
|
|
43500
43502
|
// 获取当前语言环境
|
|
43501
|
-
const language = ((_e = (_d = (_c = window.abp) === null || _c === void 0 ? void 0 : _c.localization) === null || _d === void 0 ? void 0 : _d.currentLanguage) === null || _e === void 0 ? void 0 : _e.name) ||
|
|
43503
|
+
const language = ((_e = (_d = (_c = window.abp) === null || _c === void 0 ? void 0 : _c.localization) === null || _d === void 0 ? void 0 : _d.currentLanguage) === null || _e === void 0 ? void 0 : _e.name) || ((_g = (_f = this.localization.localizationService) === null || _f === void 0 ? void 0 : _f.translate) === null || _g === void 0 ? void 0 : _g.currentLang);
|
|
43502
43504
|
const isChinese = language === 'zh-Hans' || language === 'zh';
|
|
43503
43505
|
textParts.push(isChinese ? '严重' : 'Critical');
|
|
43504
43506
|
}
|
|
43505
|
-
if (((
|
|
43507
|
+
if (((_h = this.model.generalSetting) === null || _h === void 0 ? void 0 : _h.showAlarmName) === true) {
|
|
43506
43508
|
// 获取当前语言环境
|
|
43507
|
-
const language = ((
|
|
43509
|
+
const language = ((_l = (_k = (_j = window.abp) === null || _j === void 0 ? void 0 : _j.localization) === null || _k === void 0 ? void 0 : _k.currentLanguage) === null || _l === void 0 ? void 0 : _l.name) || ((_o = (_m = this.localization.localizationService) === null || _m === void 0 ? void 0 : _m.translate) === null || _o === void 0 ? void 0 : _o.currentLang);
|
|
43508
43510
|
const isChinese = language === 'zh-Hans' || language === 'zh';
|
|
43509
43511
|
textParts.push(isChinese ? '室内温度' : 'Indoor Temperature');
|
|
43510
43512
|
}
|
|
43511
|
-
if (((
|
|
43513
|
+
if (((_p = this.model.generalSetting) === null || _p === void 0 ? void 0 : _p.showAlarmContent) !== false) {
|
|
43512
43514
|
// 获取当前语言环境
|
|
43513
|
-
const language = ((
|
|
43515
|
+
const language = ((_s = (_r = (_q = window.abp) === null || _q === void 0 ? void 0 : _q.localization) === null || _r === void 0 ? void 0 : _r.currentLanguage) === null || _s === void 0 ? void 0 : _s.name) || ((_u = (_t = this.localization.localizationService) === null || _t === void 0 ? void 0 : _t.translate) === null || _u === void 0 ? void 0 : _u.currentLang);
|
|
43514
43516
|
const isChinese = language === 'zh-Hans' || language === 'zh';
|
|
43515
43517
|
textParts.push(isChinese ? '室内温度高于30°C或小于10°C' : 'Indoor temperature is higher than 30℃ or lower than 10℃');
|
|
43516
43518
|
}
|
|
43517
|
-
if (((
|
|
43519
|
+
if (((_v = this.model.generalSetting) === null || _v === void 0 ? void 0 : _v.showAlarmState) === true) {
|
|
43518
43520
|
// 获取当前语言环境
|
|
43519
|
-
const language = ((
|
|
43521
|
+
const language = ((_y = (_x = (_w = window.abp) === null || _w === void 0 ? void 0 : _w.localization) === null || _x === void 0 ? void 0 : _x.currentLanguage) === null || _y === void 0 ? void 0 : _y.name) || ((_0 = (_z = this.localization.localizationService) === null || _z === void 0 ? void 0 : _z.translate) === null || _0 === void 0 ? void 0 : _0.currentLang);
|
|
43520
43522
|
const isChinese = language === 'zh-Hans' || language === 'zh';
|
|
43521
43523
|
textParts.push(isChinese ? '触发/未确认' : 'Triggered/Unconfirmed');
|
|
43522
43524
|
}
|
|
@@ -44991,6 +44993,11 @@ let WriteValueModalComponent = class WriteValueModalComponent {
|
|
|
44991
44993
|
get invalidErrorText() {
|
|
44992
44994
|
return this.localization.loadFailed;
|
|
44993
44995
|
}
|
|
44996
|
+
get isEnglish() {
|
|
44997
|
+
var _a, _b, _c, _d, _e;
|
|
44998
|
+
const language = ((_c = (_b = (_a = window.abp) === null || _a === void 0 ? void 0 : _a.localization) === null || _b === void 0 ? void 0 : _b.currentLanguage) === null || _c === void 0 ? void 0 : _c.name) || ((_e = (_d = this.localization.localizationService) === null || _d === void 0 ? void 0 : _d.translate) === null || _e === void 0 ? void 0 : _e.currentLang);
|
|
44999
|
+
return !!language && !language.toLowerCase().startsWith('zh');
|
|
45000
|
+
}
|
|
44994
45001
|
ngOnInit() {
|
|
44995
45002
|
this.initData(this.args);
|
|
44996
45003
|
this.validate();
|
|
@@ -45225,7 +45232,7 @@ __decorate([
|
|
|
45225
45232
|
WriteValueModalComponent = __decorate([
|
|
45226
45233
|
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Component"])({
|
|
45227
45234
|
selector: 'writeValueModal',
|
|
45228
|
-
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\">×</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-write]=\"!isMobileMode\" class=\"form-control write-value\" [(ngModel)]=\"value\" (keyup)=\"validate($event)\" autocomplete=\"off\"> <span class=\"help-block text-danger\" [hidden]=\"!validationError\">{{validationErrorText}}</span> </div> <div class=\"modal-footer\" [class.modal-footer-write]=\"!isMobileMode\"> <button type=\"submit\" [class.btn-primary-write]=\"!isMobileMode\" class=\"btn md-skip btn-primary btn-block\" [disabled]=\"validationError || isSubmitting\"> <ng-container *ngIf=\"!isSubmitting\">{{localization.submit}}</ng-container> <ng-container *ngIf=\"isSubmitting\">{{localization.submitting}}</ng-container> </button> </div> </form> ",
|
|
45235
|
+
template: "<form #writeValueForm=\"ngForm\" novalidate (ngSubmit)=\"save()\" bs-modal-drag> <div class=\"modal-header\"> <h4 class=\"modal-title\"> <span>{{localization.setting}}{{isEnglish ? ' ' : ''}}</span> <span>{{displayVariableName}}</span> </h4> <button type=\"button\" class=\"close pull-right\" aria-label=\"Close\" (click)=\"close()\"> <span aria-hidden=\"true\">×</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-write]=\"!isMobileMode\" class=\"form-control write-value\" [(ngModel)]=\"value\" (keyup)=\"validate($event)\" autocomplete=\"off\"> <span class=\"help-block text-danger\" [hidden]=\"!validationError\">{{validationErrorText}}</span> </div> <div class=\"modal-footer\" [class.modal-footer-write]=\"!isMobileMode\"> <button type=\"submit\" [class.btn-primary-write]=\"!isMobileMode\" class=\"btn md-skip btn-primary btn-block\" [disabled]=\"validationError || isSubmitting\"> <ng-container *ngIf=\"!isSubmitting\">{{localization.submit}}</ng-container> <ng-container *ngIf=\"isSubmitting\">{{localization.submitting}}</ng-container> </button> </div> </form> ",
|
|
45229
45236
|
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; } "]
|
|
45230
45237
|
}),
|
|
45231
45238
|
__param(0, Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Inject"])(_localization__WEBPACK_IMPORTED_MODULE_1__[/* LOCALIZATION */ "b"]))
|
|
@@ -45269,6 +45276,11 @@ let WriteCharacterModalComponent = class WriteCharacterModalComponent {
|
|
|
45269
45276
|
get invalidErrorText() {
|
|
45270
45277
|
return this.localization.loadFailed;
|
|
45271
45278
|
}
|
|
45279
|
+
get isEnglish() {
|
|
45280
|
+
var _a, _b, _c, _d, _e;
|
|
45281
|
+
const language = ((_c = (_b = (_a = window.abp) === null || _a === void 0 ? void 0 : _a.localization) === null || _b === void 0 ? void 0 : _b.currentLanguage) === null || _c === void 0 ? void 0 : _c.name) || ((_e = (_d = this.localization.localizationService) === null || _d === void 0 ? void 0 : _d.translate) === null || _e === void 0 ? void 0 : _e.currentLang);
|
|
45282
|
+
return !!language && !language.toLowerCase().startsWith('zh');
|
|
45283
|
+
}
|
|
45272
45284
|
ngOnInit() {
|
|
45273
45285
|
this.variableName = this.args.variableName;
|
|
45274
45286
|
this.isPassword = this.args.isPassword ? this.args.isPassword : false;
|
|
@@ -45308,7 +45320,7 @@ __decorate([
|
|
|
45308
45320
|
WriteCharacterModalComponent = __decorate([
|
|
45309
45321
|
Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Component"])({
|
|
45310
45322
|
selector: 'writeCharacterModal',
|
|
45311
|
-
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\">×</span> </button> </div> <div class=\"modal-body\"> <input type=\"text\" name=\"characterInput\" autoFocus [class.form-control-write]=\"!isMobileMode\" class=\"form-control write-character-value\" [(ngModel)]=\"value\" (keyup)=\"validate()\" *ngIf=\"!isPassword\" autocomplete=\"off\"> <input type=\"password\" name=\"passwordInput\" autoFocus [class.form-control-write]=\"!isMobileMode\" 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\" [class.modal-footer-write]=\"!isMobileMode\"> <button type=\"submit\" [class.btn-primary-write]=\"!isMobileMode\" class=\"btn md-skip btn-primary btn-block\" [disabled]=\"validationError\">{{localization.submit}}</button> </div> </form> ",
|
|
45323
|
+
template: "<form #writeValueForm=\"ngForm\" novalidate (ngSubmit)=\"save()\" bs-modal-drag> <div class=\"modal-header\"> <h4 class=\"modal-title\"> <span>{{localization.setting}}{{isEnglish ? ' ' : ''}}</span> <span>{{variableName}}</span> </h4> <button type=\"button\" class=\"close pull-right\" aria-label=\"Close\" (click)=\"close()\"> <span aria-hidden=\"true\">×</span> </button> </div> <div class=\"modal-body\"> <input type=\"text\" name=\"characterInput\" autoFocus [class.form-control-write]=\"!isMobileMode\" class=\"form-control write-character-value\" [(ngModel)]=\"value\" (keyup)=\"validate()\" *ngIf=\"!isPassword\" autocomplete=\"off\"> <input type=\"password\" name=\"passwordInput\" autoFocus [class.form-control-write]=\"!isMobileMode\" 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\" [class.modal-footer-write]=\"!isMobileMode\"> <button type=\"submit\" [class.btn-primary-write]=\"!isMobileMode\" class=\"btn md-skip btn-primary btn-block\" [disabled]=\"validationError\">{{localization.submit}}</button> </div> </form> ",
|
|
45312
45324
|
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; } "]
|
|
45313
45325
|
}),
|
|
45314
45326
|
__param(0, Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Inject"])(_localization__WEBPACK_IMPORTED_MODULE_2__[/* LOCALIZATION */ "b"]))
|