@flexem/fc-gui 3.0.0-alpha.17 → 3.0.0-alpha.171
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/CHANGELOG.md +424 -1
- package/assets/img/black_first_page.png +0 -0
- package/assets/img/black_last_page.png +0 -0
- package/assets/img/black_next_page.png +0 -0
- package/assets/img/black_previous_page.png +0 -0
- package/assets/img/exclamation-outline-circle.png +0 -0
- package/bundles/@flexem/fc-gui.umd.js +39304 -34437
- package/bundles/@flexem/fc-gui.umd.js.map +1 -1
- package/bundles/@flexem/fc-gui.umd.min.js +5 -5
- package/bundles/@flexem/fc-gui.umd.min.js.map +1 -1
- package/communication/variable/variable-communicator.d.ts +5 -0
- package/communication/variable/variable-state-enum.d.ts +1 -0
- package/communication/variable/variable-state-enum.js +1 -0
- package/communication/variable/variable-state-enum.metadata.json +1 -1
- package/communication/variable/variable-value.d.ts +4 -1
- package/communication/variable/variable-value.js +4 -1
- package/communication/variable/variable-value.metadata.json +1 -1
- package/config/alarm/alarm.store.d.ts +6 -0
- package/config/alarm/alarm.store.js +0 -0
- package/config/alarm/alarm.store.metadata.json +1 -0
- package/config/alarm/get-alarms-args.d.ts +12 -0
- package/config/alarm/get-alarms-args.js +13 -0
- package/config/alarm/get-alarms-args.metadata.json +1 -0
- package/config/alarm/index.d.ts +2 -0
- package/config/alarm/index.js +1 -0
- package/config/alarm/index.metadata.json +1 -0
- package/config/config-store.d.ts +2 -0
- package/config/gui-feature-config.d.ts +3 -0
- package/config/gui-feature-config.js +3 -0
- package/config/gui-feature-config.metadata.json +1 -0
- package/config/index.d.ts +2 -0
- package/config/index.js +2 -0
- package/config/index.metadata.json +1 -1
- package/config/variable/variable-store.d.ts +1 -0
- package/elements/air-quality/air-quality-element.d.ts +31 -0
- package/elements/air-quality/air-quality-element.js +194 -0
- package/elements/air-quality/air-quality-element.metadata.json +1 -0
- package/elements/alarm/alarm-element.d.ts +69 -0
- package/elements/alarm/alarm-element.js +497 -0
- package/elements/alarm/alarm-element.metadata.json +1 -0
- package/elements/bar-graph-element.d.ts +10 -2
- package/elements/bar-graph-element.js +135 -5
- package/elements/bar-graph-element.metadata.json +1 -1
- package/elements/base/readable-element.d.ts +6 -1
- package/elements/base/readable-element.js +66 -2
- package/elements/base/readable-element.metadata.json +1 -1
- package/elements/base/state-control-element.d.ts +3 -1
- package/elements/base/state-control-element.js +21 -5
- package/elements/character-display/character-display-element.js +3 -2
- package/elements/character-display/character-display-element.metadata.json +1 -1
- package/elements/datetime-display/datetime-display-element.d.ts +1 -0
- package/elements/datetime-display/datetime-display-element.js +10 -2
- package/elements/datetime-display/datetime-display-element.metadata.json +1 -1
- package/elements/datetime-display/time-zone-select-json.d.ts +8 -0
- package/elements/datetime-display/time-zone-select-json.js +558 -0
- package/elements/historical-curve/historical-curve.element.d.ts +41 -3
- package/elements/historical-curve/historical-curve.element.js +662 -32
- package/elements/historical-curve/historical-curve.element.metadata.json +1 -1
- package/elements/main-element.d.ts +1 -0
- package/elements/main-element.js +75 -9
- package/elements/main-element.metadata.json +1 -1
- package/elements/meter-element.d.ts +7 -1
- package/elements/meter-element.js +76 -7
- package/elements/meter-element.metadata.json +1 -1
- package/elements/numerical-display/numerical-display-element.d.ts +22 -3
- package/elements/numerical-display/numerical-display-element.js +145 -12
- package/elements/numerical-display/numerical-display-element.metadata.json +1 -1
- package/elements/per-view-variable-communicator.d.ts +4 -0
- package/elements/per-view-variable-communicator.js +21 -1
- package/elements/per-view-variable-communicator.metadata.json +1 -1
- package/elements/ring-graph/ring-graph-element.d.ts +13 -1
- package/elements/ring-graph/ring-graph-element.js +164 -3
- package/elements/ring-graph/ring-graph-element.metadata.json +1 -1
- package/elements/scroll-alarm/scroll-alarm-element.d.ts +78 -0
- package/elements/scroll-alarm/scroll-alarm-element.js +843 -0
- package/elements/scroll-alarm/scroll-alarm-element.metadata.json +1 -0
- package/elements/shared/graph/graph-state-element.d.ts +1 -0
- package/elements/shared/graph/graph-state-element.js +30 -1
- package/elements/shared/graph/graph-state-element.metadata.json +1 -1
- package/elements/shared/text/text-element.d.ts +14 -0
- package/elements/shared/text/text-element.js +42 -4
- package/elements/shared/text/text-element.metadata.json +1 -1
- package/elements/shared/text/text-state-element.d.ts +39 -2
- package/elements/shared/text/text-state-element.js +242 -67
- package/elements/shared/text/text-state-element.metadata.json +1 -1
- package/elements/static-elements/hyperlink-element.d.ts +28 -2
- package/elements/static-elements/hyperlink-element.js +153 -4
- package/elements/static-elements/hyperlink-element.metadata.json +1 -1
- package/elements/static-elements/text-element.d.ts +28 -2
- package/elements/static-elements/text-element.js +162 -12
- package/elements/static-elements/text-element.metadata.json +1 -1
- package/elements/switch-indicator-light/bit-indicator-light-operator.d.ts +1 -0
- package/elements/switch-indicator-light/bit-indicator-light-operator.js +10 -3
- package/elements/switch-indicator-light/bit-indicator-light-operator.metadata.json +1 -1
- package/elements/switch-indicator-light/switch-indicator-light-element.d.ts +11 -2
- package/elements/switch-indicator-light/switch-indicator-light-element.js +70 -12
- package/elements/switch-indicator-light/switch-indicator-light-element.metadata.json +1 -1
- package/elements/switch-indicator-light/word-indicator-light-operator.d.ts +1 -0
- package/elements/switch-indicator-light/word-indicator-light-operator.js +10 -3
- package/elements/switch-indicator-light/word-indicator-light-operator.metadata.json +1 -1
- package/elements/video/video-element.d.ts +10 -0
- package/elements/video/video-element.js +119 -21
- package/elements/video/video-element.metadata.json +1 -1
- package/elements/view-operation/view-operation.element.d.ts +28 -2
- package/elements/view-operation/view-operation.element.js +163 -4
- package/elements/view-operation/view-operation.element.metadata.json +1 -1
- package/elements/weather/weater-element.js +0 -1
- package/gui/gui-context.d.ts +25 -2
- package/gui/gui-host.d.ts +1 -1
- package/gui/gui-view.d.ts +4 -1
- package/gui/gui-view.js +69 -8
- package/gui/gui-view.metadata.json +1 -1
- package/gui/gui.component.d.ts +3 -0
- package/gui/gui.component.js +15 -2
- package/gui/gui.component.metadata.json +1 -1
- package/localization/localization.service.d.ts +12 -0
- package/localization/localization.service.js +16 -4
- package/localization/localization.service.metadata.json +1 -1
- package/localization/localization.service.zh_CN.js +14 -2
- package/localization/localization.service.zh_CN.metadata.json +1 -1
- package/modal/write-character/write-character-modal.component.html +4 -4
- package/modal/write-character/write-character-modal.component.js +2 -2
- package/modal/write-character/write-character-modal.component.less +15 -0
- package/modal/write-character/write-character-modal.component.metadata.json +1 -1
- package/modal/write-value/write-value-modal-args.d.ts +5 -1
- package/modal/write-value/write-value-modal-args.js +3 -1
- package/modal/write-value/write-value-modal-args.metadata.json +1 -1
- package/modal/write-value/write-value-modal.component.d.ts +13 -7
- package/modal/write-value/write-value-modal.component.html +10 -5
- package/modal/write-value/write-value-modal.component.js +95 -20
- package/modal/write-value/write-value-modal.component.less +16 -1
- package/modal/write-value/write-value-modal.component.metadata.json +1 -1
- package/model/air-quality/air-quality-info.d.ts +23 -0
- package/model/air-quality/air-quality-info.js +4 -0
- package/model/air-quality/air-quality-info.metadata.json +1 -0
- package/model/air-quality/air-quality.model.d.ts +7 -0
- package/model/air-quality/air-quality.model.js +0 -0
- package/model/air-quality/air-quality.model.metadata.json +1 -0
- package/model/alarm/alarm.model.d.ts +13 -0
- package/model/alarm/alarm.model.js +0 -0
- package/model/alarm/alarm.model.metadata.json +1 -0
- package/model/bar-graph/bar-graph.d.ts +4 -0
- package/model/base/font-setting-model.d.ts +22 -1
- package/model/base/font-setting-model.metadata.json +1 -1
- package/model/base/readable-model.d.ts +4 -0
- package/model/datetime-display/datetime-display.d.ts +1 -0
- package/model/historical-curve/historical-curve-axis-settings.d.ts +11 -0
- package/model/historical-curve/historical-curve-axis-settings.js +5 -0
- package/model/historical-curve/historical-curve-axis-settings.metadata.json +1 -1
- package/model/historical-curve/historical-curve-chanel.model.d.ts +8 -0
- package/model/meter/meter.d.ts +4 -0
- package/model/numerical-display/numerical-operation.d.ts +10 -2
- package/model/ring-graph/ring-graph.model.d.ts +8 -0
- package/model/scroll-alarm/scroll-alarm.model.d.ts +21 -0
- package/model/scroll-alarm/scroll-alarm.model.js +0 -0
- package/model/scroll-alarm/scroll-alarm.model.metadata.json +1 -0
- package/model/shared/state/state.d.ts +1 -0
- package/model/shared/state/state.js +1 -0
- package/model/shared/state/state.metadata.json +1 -1
- package/model/shared/text/font.d.ts +1 -1
- package/model/shared/text/text.d.ts +3 -0
- package/model/switch-indicator-light/switch-indicator-light.d.ts +2 -0
- package/model/view-operation/view-operation-element.model.d.ts +7 -1
- package/package.json +1 -1
- package/public_api.js +1 -0
- package/remote/communication/variable/remote-variable-communicator.d.ts +30 -0
- package/remote/communication/variable/remote-variable-communicator.js +193 -3
- package/remote/communication/variable/remote-variable-communicator.metadata.json +1 -1
- package/remote/communication/variable/remote-variable-protocol.d.ts +8 -0
- package/service/index.d.ts +4 -0
- package/service/index.js +1 -0
- package/service/index.metadata.json +1 -1
- package/service/language.service.d.ts +37 -0
- package/service/language.service.js +0 -0
- package/service/language.service.metadata.json +1 -0
- package/service/released-variable/index.d.ts +1 -0
- package/service/released-variable/index.js +0 -0
- package/service/released-variable/index.metadata.json +1 -0
- package/service/released-variable/released-variable.service.d.ts +4 -0
- package/service/released-variable/released-variable.service.js +0 -0
- package/service/released-variable/released-variable.service.metadata.json +1 -0
- package/service/system-text-library.service.d.ts +77 -0
- package/service/system-text-library.service.js +29 -0
- package/service/system-text-library.service.metadata.json +1 -0
- package/service/text-library.service.d.ts +49 -0
- package/service/text-library.service.js +0 -0
- package/service/text-library.service.metadata.json +1 -0
- package/service/weather.service.d.ts +1 -0
- package/shared/gui-consts.d.ts +3 -0
- package/shared/gui-consts.js +3 -0
- package/shared/gui-consts.metadata.json +1 -1
- package/utils/data-type/fbox-data-type.service.js +40 -0
- package/utils/numerical-operation.service.js +28 -4
|
@@ -2,6 +2,7 @@ import { LOGGER_SERVICE_TOKEN } from '../../logger';
|
|
|
2
2
|
import * as d3 from 'd3-selection';
|
|
3
3
|
import { drag } from 'd3-drag';
|
|
4
4
|
import { ViewOperationType } from '../../model';
|
|
5
|
+
import { TextElementModal } from '../shared/text/text-element';
|
|
5
6
|
import { ConditionalEnableElement } from '../base/conditional-enable-element';
|
|
6
7
|
import { GraphStateElement } from '../shared/graph/graph-state-element';
|
|
7
8
|
import { AlertModalComponent } from '../../modal/alert/alert-modal.component';
|
|
@@ -9,7 +10,7 @@ import { ConfirmOperationModalComponent } from '../../modal/confirm-operation/co
|
|
|
9
10
|
import { VerifyPasswordModalComponent } from '../../modal/verify-password/verify-password-modal.component';
|
|
10
11
|
import { ViewService } from '../../view/view.service';
|
|
11
12
|
export class ViewOperationElement extends ConditionalEnableElement {
|
|
12
|
-
constructor(element, injector, modalService, variableCommunicator, variableStore, graphStore, permissionChecker, operationRecordService, securityChecker, localization, popupViewService, hostContainerId, el, signalRAppId) {
|
|
13
|
+
constructor(element, injector, modalService, variableCommunicator, variableStore, graphStore, permissionChecker, operationRecordService, securityChecker, localization, popupViewService, hostContainerId, el, signalRAppId, textLibraryService, languageService, guiContext) {
|
|
13
14
|
super(element, permissionChecker, variableCommunicator, variableStore, localization, signalRAppId);
|
|
14
15
|
this.modalService = modalService;
|
|
15
16
|
this.graphStore = graphStore;
|
|
@@ -18,20 +19,27 @@ export class ViewOperationElement extends ConditionalEnableElement {
|
|
|
18
19
|
this.popupViewService = popupViewService;
|
|
19
20
|
this.hostContainerId = hostContainerId;
|
|
20
21
|
this.el = el;
|
|
22
|
+
this.textLibraryService = textLibraryService;
|
|
23
|
+
this.languageService = languageService;
|
|
24
|
+
this.guiContext = guiContext;
|
|
21
25
|
this.touchedScreenX = 0;
|
|
22
26
|
this.touchedScreenY = 0;
|
|
23
27
|
this.logger = injector.get(LOGGER_SERVICE_TOKEN);
|
|
24
28
|
this.viewService = injector.get(ViewService);
|
|
25
29
|
this.initElement();
|
|
30
|
+
this.subscribeLanguageChange();
|
|
26
31
|
}
|
|
27
32
|
initElement() {
|
|
28
33
|
const width = this.model.size.width;
|
|
29
34
|
const height = this.model.size.height;
|
|
35
|
+
// 在 initGraph 之前移除模板原有的 SVG <text>(改用 foreignObject 渲染,支持换行居中)
|
|
36
|
+
// 必须在 initGraph 前执行,否则会误删图形状态内部后续添加的文字节点
|
|
37
|
+
this.$element.find('text').remove();
|
|
30
38
|
this.initGraph(width, height);
|
|
31
39
|
this.rootElement.append('rect').attr('id', 'StateFrame').attr('width', width).attr('height', height).attr('fill', 'transparent');
|
|
32
|
-
const
|
|
33
|
-
|
|
34
|
-
|
|
40
|
+
const font = this.getFontStyle();
|
|
41
|
+
this.textElementModal = new TextElementModal(this.getDisplayText(), font, width, height);
|
|
42
|
+
this.$element.append(this.textElementModal.Element);
|
|
35
43
|
this.switchToState(0);
|
|
36
44
|
this.rootElement.on('mousedown', () => {
|
|
37
45
|
if (!this.isInitialized) {
|
|
@@ -170,6 +178,9 @@ export class ViewOperationElement extends ConditionalEnableElement {
|
|
|
170
178
|
const viewIndex = this.model.viewIndex;
|
|
171
179
|
if (null != viewIndex) {
|
|
172
180
|
this.popupViewService.popView(viewIndex, this.hostContainerId, this.el).subscribe(() => this.recordViewOperation(), error => this.logger.error(`ToggleView(${viewIndex}) failed. ${error}`));
|
|
181
|
+
$(`#${this.hostContainerId} video`)
|
|
182
|
+
.addClass('video-hidden')
|
|
183
|
+
.css('visibility', 'hidden');
|
|
173
184
|
}
|
|
174
185
|
else {
|
|
175
186
|
this.logger.error('[GUI]Toggle View:invalid view index');
|
|
@@ -177,6 +188,11 @@ export class ViewOperationElement extends ConditionalEnableElement {
|
|
|
177
188
|
}
|
|
178
189
|
closeView() {
|
|
179
190
|
this.popupViewService.closeView();
|
|
191
|
+
if ($(`#${this.hostContainerId} > svg > svg`).length === 0) {
|
|
192
|
+
$(`#${this.hostContainerId} .video-hidden`)
|
|
193
|
+
.removeClass('video-hidden')
|
|
194
|
+
.css('visibility', 'visible');
|
|
195
|
+
}
|
|
180
196
|
this.recordViewOperation();
|
|
181
197
|
}
|
|
182
198
|
moveView(movementX, movementY) {
|
|
@@ -191,4 +207,147 @@ export class ViewOperationElement extends ConditionalEnableElement {
|
|
|
191
207
|
this.operationRecordService.record({ operationDescription: this.model.operationDescription });
|
|
192
208
|
}
|
|
193
209
|
}
|
|
210
|
+
/**
|
|
211
|
+
* 订阅语种变化事件
|
|
212
|
+
*/
|
|
213
|
+
subscribeLanguageChange() {
|
|
214
|
+
if (this.guiContext && this.guiContext.languageChanged$) {
|
|
215
|
+
this.languageChangeSubscription = this.guiContext.languageChanged$.subscribe(() => {
|
|
216
|
+
this.updateTextContent();
|
|
217
|
+
});
|
|
218
|
+
}
|
|
219
|
+
}
|
|
220
|
+
/**
|
|
221
|
+
* 获取当前语种的字体样式
|
|
222
|
+
*/
|
|
223
|
+
getFontStyle() {
|
|
224
|
+
const getTargetLanguage = () => {
|
|
225
|
+
var _a, _b, _c, _d, _e, _f;
|
|
226
|
+
const currentLanguageId = (_c = (_b = (_a = this.guiContext) === null || _a === void 0 ? void 0 : _a.getCurrentLanguageId) === null || _b === void 0 ? void 0 : _b.call(_a)) !== null && _c !== void 0 ? _c : null;
|
|
227
|
+
const defaultLanguage = ((_d = this.languageService) === null || _d === void 0 ? void 0 : _d.getDefaultLanguage()) || 'zh-CN';
|
|
228
|
+
if (currentLanguageId === null || currentLanguageId === undefined) {
|
|
229
|
+
return defaultLanguage;
|
|
230
|
+
}
|
|
231
|
+
return ((_f = (_e = this.guiContext) === null || _e === void 0 ? void 0 : _e.getLanguageCultureById) === null || _f === void 0 ? void 0 : _f.call(_e, currentLanguageId)) || defaultLanguage;
|
|
232
|
+
};
|
|
233
|
+
const targetLanguage = getTargetLanguage();
|
|
234
|
+
if (this.model.fontStyleCultures && this.model.fontStyleCultures[targetLanguage]) {
|
|
235
|
+
const style = this.model.fontStyleCultures[targetLanguage];
|
|
236
|
+
const fs = style.fontStyle || '';
|
|
237
|
+
const isBold = fs.indexOf('bold') !== -1;
|
|
238
|
+
const isItalic = fs.indexOf('Italic') !== -1;
|
|
239
|
+
const parts = fs.split(' ');
|
|
240
|
+
const familyIndex = (isBold ? 1 : 0) + (isItalic ? 1 : 0) + 1;
|
|
241
|
+
const fontFamily = parts.length > familyIndex ? parts[familyIndex] : null;
|
|
242
|
+
return {
|
|
243
|
+
isUnderline: style.isUnderline,
|
|
244
|
+
isBold,
|
|
245
|
+
isItalic,
|
|
246
|
+
fontSize: style.fontSize,
|
|
247
|
+
fontFamily: fontFamily || 'msyh',
|
|
248
|
+
color: style.color
|
|
249
|
+
};
|
|
250
|
+
}
|
|
251
|
+
return Object.assign(Object.assign({}, this.model.label.font), { fontFamily: this.model.label.font.fontFamily || 'msyh' });
|
|
252
|
+
}
|
|
253
|
+
/**
|
|
254
|
+
* 更新文本内容(支持文本库和语种切换)
|
|
255
|
+
*/
|
|
256
|
+
updateTextContent() {
|
|
257
|
+
if (this.textElementModal) {
|
|
258
|
+
const font = this.getFontStyle();
|
|
259
|
+
this.textElementModal.updateFont(font);
|
|
260
|
+
this.textElementModal.updateText(this.getDisplayText());
|
|
261
|
+
}
|
|
262
|
+
}
|
|
263
|
+
/**
|
|
264
|
+
* 获取显示文本
|
|
265
|
+
*/
|
|
266
|
+
getDisplayText() {
|
|
267
|
+
var _a, _b, _c, _d, _e, _f;
|
|
268
|
+
// 检查是否使用文本库
|
|
269
|
+
if (this.model.textLibrary && this.model.textLibrary.labelType === 'textLibrary') {
|
|
270
|
+
const textLibraryId = this.model.textLibrary.selectedTextLibraryItem;
|
|
271
|
+
const textItem = this.model.textLibrary.selectedTextItem;
|
|
272
|
+
if (textLibraryId && textItem && this.textLibraryService) {
|
|
273
|
+
// 获取文本库数据
|
|
274
|
+
const textLibraryData = this.textLibraryService.getTextLibraryById(typeof textLibraryId === 'string' ? parseInt(textLibraryId, 10) : textLibraryId);
|
|
275
|
+
if (textLibraryData && textLibraryData.data) {
|
|
276
|
+
// 查找对应的文本条目
|
|
277
|
+
const textEntry = textLibraryData.data.find(entry => entry.key === textItem.toString());
|
|
278
|
+
if (textEntry) {
|
|
279
|
+
// 获取当前语种ID
|
|
280
|
+
const currentLanguageId = (_c = (_b = (_a = this.guiContext) === null || _a === void 0 ? void 0 : _a.getCurrentLanguageId) === null || _b === void 0 ? void 0 : _b.call(_a)) !== null && _c !== void 0 ? _c : null;
|
|
281
|
+
// 确定要使用的语种代码(culture)
|
|
282
|
+
let targetLanguage;
|
|
283
|
+
const defaultLanguage = ((_d = this.languageService) === null || _d === void 0 ? void 0 : _d.getDefaultLanguage()) || 'zh-CN';
|
|
284
|
+
if (currentLanguageId === null || currentLanguageId === undefined) {
|
|
285
|
+
// 设备未设置当前语种,使用默认语种
|
|
286
|
+
targetLanguage = defaultLanguage;
|
|
287
|
+
}
|
|
288
|
+
else {
|
|
289
|
+
// 设备已设置当前语种,获取对应的语种代码
|
|
290
|
+
const currentLanguage = (_f = (_e = this.guiContext) === null || _e === void 0 ? void 0 : _e.getLanguageCultureById) === null || _f === void 0 ? void 0 : _f.call(_e, currentLanguageId);
|
|
291
|
+
if (currentLanguage) {
|
|
292
|
+
targetLanguage = currentLanguage;
|
|
293
|
+
}
|
|
294
|
+
else {
|
|
295
|
+
// 无法获取语种代码,使用默认语种
|
|
296
|
+
targetLanguage = defaultLanguage;
|
|
297
|
+
}
|
|
298
|
+
}
|
|
299
|
+
// 返回对应语种的文本
|
|
300
|
+
if (textEntry.cultures && textEntry.cultures[targetLanguage]) {
|
|
301
|
+
return textEntry.cultures[targetLanguage];
|
|
302
|
+
}
|
|
303
|
+
// 如果没有对应语种,返回空字符串
|
|
304
|
+
return '';
|
|
305
|
+
}
|
|
306
|
+
}
|
|
307
|
+
}
|
|
308
|
+
// 文本库配置但未找到数据,返回空字符串
|
|
309
|
+
return '';
|
|
310
|
+
}
|
|
311
|
+
// 处理自定义文本(支持多语种)
|
|
312
|
+
if (this.model.label) {
|
|
313
|
+
// 获取目标语种(公共逻辑)
|
|
314
|
+
const getTargetLanguage = () => {
|
|
315
|
+
var _a, _b, _c, _d, _e, _f;
|
|
316
|
+
const currentLanguageId = (_c = (_b = (_a = this.guiContext) === null || _a === void 0 ? void 0 : _a.getCurrentLanguageId) === null || _b === void 0 ? void 0 : _b.call(_a)) !== null && _c !== void 0 ? _c : null;
|
|
317
|
+
const defaultLanguage = ((_d = this.languageService) === null || _d === void 0 ? void 0 : _d.getDefaultLanguage()) || 'zh-CN';
|
|
318
|
+
if (currentLanguageId === null || currentLanguageId === undefined) {
|
|
319
|
+
return defaultLanguage;
|
|
320
|
+
}
|
|
321
|
+
return ((_f = (_e = this.guiContext) === null || _e === void 0 ? void 0 : _e.getLanguageCultureById) === null || _f === void 0 ? void 0 : _f.call(_e, currentLanguageId)) || defaultLanguage;
|
|
322
|
+
};
|
|
323
|
+
// 新格式:cultures 在 label 顶层
|
|
324
|
+
if (this.model.label.cultures && typeof this.model.label.cultures === 'object') {
|
|
325
|
+
return this.model.label.cultures[getTargetLanguage()] || '';
|
|
326
|
+
}
|
|
327
|
+
if (this.model.label.content) {
|
|
328
|
+
// 中间格式(兼容):content 为 { cultures: {...} }
|
|
329
|
+
if (typeof this.model.label.content === 'object' && this.model.label.content.cultures) {
|
|
330
|
+
return this.model.label.content.cultures[getTargetLanguage()] || '';
|
|
331
|
+
}
|
|
332
|
+
// 旧格式:字符串
|
|
333
|
+
if (typeof this.model.label.content === 'string') {
|
|
334
|
+
return this.model.label.content;
|
|
335
|
+
}
|
|
336
|
+
}
|
|
337
|
+
}
|
|
338
|
+
return '';
|
|
339
|
+
}
|
|
340
|
+
/**
|
|
341
|
+
* 释放资源
|
|
342
|
+
*/
|
|
343
|
+
dispose() {
|
|
344
|
+
// 取消语种变化订阅
|
|
345
|
+
if (this.languageChangeSubscription) {
|
|
346
|
+
this.languageChangeSubscription.unsubscribe();
|
|
347
|
+
this.languageChangeSubscription = undefined;
|
|
348
|
+
}
|
|
349
|
+
if (this.$element) {
|
|
350
|
+
this.$element.remove();
|
|
351
|
+
}
|
|
352
|
+
}
|
|
194
353
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
[{"__symbolic":"module","version":4,"metadata":{"ViewOperationElement":{"__symbolic":"class","extends":{"__symbolic":"reference","module":"../base/conditional-enable-element","name":"ConditionalEnableElement","line":
|
|
1
|
+
[{"__symbolic":"module","version":4,"metadata":{"ViewOperationElement":{"__symbolic":"class","extends":{"__symbolic":"reference","module":"../base/conditional-enable-element","name":"ConditionalEnableElement","line":23,"character":42},"members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"error","message":"Could not resolve type","line":36,"character":25,"context":{"typeName":"HTMLElement"}},{"__symbolic":"reference","module":"@angular/core","name":"Injector","line":36,"character":48},{"__symbolic":"reference","module":"ngx-bootstrap/modal","name":"BsModalService","line":37,"character":39},{"__symbolic":"reference","module":"../../communication","name":"VariableCommunicator","line":38,"character":30},{"__symbolic":"reference","module":"../../config","name":"VariableStore","line":39,"character":23},{"__symbolic":"reference","module":"../../config","name":"GraphStore","line":40,"character":37},{"__symbolic":"reference","module":"../../service","name":"PermissionChecker","line":41,"character":27},{"__symbolic":"reference","module":"../../service","name":"OperationRecordService","line":42,"character":49},{"__symbolic":"reference","module":"../../security","name":"SecurityChecker","line":43,"character":42},{"__symbolic":"reference","module":"../../localization","name":"Localization","line":44,"character":22},{"__symbolic":"reference","module":"../../view/popup-view.service","name":"PopupViewService","line":45,"character":43},{"__symbolic":"reference","name":"string"},{"__symbolic":"reference","module":"@angular/core","name":"ElementRef","line":47,"character":29},{"__symbolic":"reference","name":"string"},{"__symbolic":"reference","module":"../../service","name":"TextLibraryService","line":49,"character":46},{"__symbolic":"reference","module":"../../service","name":"LanguageService","line":50,"character":43},{"__symbolic":"reference","module":"../../gui/gui-context","name":"GuiContext","line":51,"character":38}]}],"initElement":[{"__symbolic":"method"}],"switchToState":[{"__symbolic":"method"}],"initGraph":[{"__symbolic":"method"}],"checkElementPassword":[{"__symbolic":"method"}],"executeViewOperation":[{"__symbolic":"method"}],"toggleView":[{"__symbolic":"method"}],"popView":[{"__symbolic":"method"}],"closeView":[{"__symbolic":"method"}],"moveView":[{"__symbolic":"method"}],"recordViewOperation":[{"__symbolic":"method"}],"subscribeLanguageChange":[{"__symbolic":"method"}],"getFontStyle":[{"__symbolic":"method"}],"updateTextContent":[{"__symbolic":"method"}],"getDisplayText":[{"__symbolic":"method"}],"dispose":[{"__symbolic":"method"}]}}}}]
|
|
@@ -45,7 +45,6 @@ export class WeatherElement extends ConditionalDisplayElement {
|
|
|
45
45
|
}
|
|
46
46
|
handleGettingAddress() {
|
|
47
47
|
this.handleUnusualCommon(this.localization.weatherNotAvailable);
|
|
48
|
-
setTimeout(() => this.initWeatherInfo(), 1000 * 60);
|
|
49
48
|
}
|
|
50
49
|
handleNoAddress() {
|
|
51
50
|
this.handleUnusualCommon(this.localization.weatherNotAddress);
|
package/gui/gui-context.d.ts
CHANGED
|
@@ -1,16 +1,39 @@
|
|
|
1
1
|
import { ConfigStore } from '../config';
|
|
2
2
|
import { VariableCommunicator } from '../communication';
|
|
3
3
|
import { SecurityChecker } from '../security';
|
|
4
|
-
import { VideoService, WeatherService, PermissionChecker, OperationRecordService } from '../service';
|
|
4
|
+
import { VideoService, WeatherService, PermissionChecker, OperationRecordService, ReleasedVariableService, TextLibraryService, LanguageService, SystemTextLibraryService } from '../service';
|
|
5
|
+
import { Subject } from 'rxjs';
|
|
5
6
|
export interface GuiContext {
|
|
6
7
|
readonly configStore: ConfigStore;
|
|
7
8
|
readonly variableCommunicator: VariableCommunicator;
|
|
8
9
|
readonly permissionChecker: PermissionChecker;
|
|
9
10
|
readonly operationRecordService: OperationRecordService;
|
|
11
|
+
readonly releasedVariableService: ReleasedVariableService;
|
|
10
12
|
readonly securityChecker: SecurityChecker;
|
|
11
13
|
readonly videoService: VideoService;
|
|
12
14
|
readonly weatherService: WeatherService;
|
|
15
|
+
readonly textLibraryService?: TextLibraryService;
|
|
16
|
+
readonly languageService?: LanguageService;
|
|
17
|
+
readonly systemTextLibraryService?: SystemTextLibraryService;
|
|
13
18
|
readonly configureViewId?: number;
|
|
14
19
|
readonly configureViewCode?: string;
|
|
15
|
-
|
|
20
|
+
/**
|
|
21
|
+
* 模拟模式下由后端 GetVariablesForDesigner 查询出的"有效变量"名集合
|
|
22
|
+
* (IncludeCalculationVariable=true, HasRefVariable=true,即绑定了 manager 的变量)。
|
|
23
|
+
* 运行模式不填充,元件会回退到 variableStore.getAllVariableNames()。
|
|
24
|
+
*/
|
|
25
|
+
readonly validVariableNames?: string[];
|
|
26
|
+
readonly languageChanged$?: Subject<number | null>;
|
|
27
|
+
getCurrentLanguageId?(): number | null;
|
|
28
|
+
getDefaultLanguageId?(): number;
|
|
29
|
+
getLanguageCultureById?(languageId: number | null): string | null;
|
|
30
|
+
updateCurrentLanguageId?(languageId: number | null): Promise<void>;
|
|
31
|
+
showCustomTimeRangeModal?(config: {
|
|
32
|
+
startTime?: Date;
|
|
33
|
+
endTime?: Date;
|
|
34
|
+
}): Promise<{
|
|
35
|
+
startTime: Date;
|
|
36
|
+
endTime: Date;
|
|
37
|
+
} | null>;
|
|
38
|
+
dispose(): void;
|
|
16
39
|
}
|
package/gui/gui-host.d.ts
CHANGED
|
@@ -13,7 +13,7 @@ export declare class GuiHost implements Disposable {
|
|
|
13
13
|
readonly el: ElementRef;
|
|
14
14
|
private isLoaded;
|
|
15
15
|
private currentView;
|
|
16
|
-
|
|
16
|
+
currentViewIndex: number;
|
|
17
17
|
private containerEl;
|
|
18
18
|
private currentViewSize;
|
|
19
19
|
private currentViewReiszeMode;
|
package/gui/gui-view.d.ts
CHANGED
|
@@ -21,7 +21,10 @@ export declare class GuiView implements PopupViewService {
|
|
|
21
21
|
private mainElement;
|
|
22
22
|
private muskElement;
|
|
23
23
|
private openVariableStatesSubscription;
|
|
24
|
-
private
|
|
24
|
+
private requestVirtualDeviceState;
|
|
25
|
+
private virtualDeviceStatesChanged;
|
|
26
|
+
private openVariablesSubscriptions;
|
|
27
|
+
private openedVariableNamesForValues;
|
|
25
28
|
private openedVariableNames;
|
|
26
29
|
private perViewVariableCommunicator;
|
|
27
30
|
private svgRootClass;
|
package/gui/gui-view.js
CHANGED
|
@@ -2,13 +2,14 @@ import { LOGGER_SERVICE_TOKEN } from '../logger';
|
|
|
2
2
|
import * as d3 from 'd3-selection';
|
|
3
3
|
import { each, forEach } from 'lodash';
|
|
4
4
|
import { map } from 'rxjs/operators';
|
|
5
|
-
import { VariableStateEnum } from '../communication';
|
|
5
|
+
import { VariableStateEnum, VariableState } from '../communication';
|
|
6
6
|
import { MainElement } from '../elements/main-element';
|
|
7
7
|
import { PerViewVariableCommunicator } from '../elements/per-view-variable-communicator';
|
|
8
8
|
import { ViewPopupBackdropType, ViewPopupLocationType } from '../model';
|
|
9
9
|
import { ViewResizeMode, DisplayMode, GlobalSettings } from '../settings';
|
|
10
10
|
import { ConfigIsEmptyError } from '../shared';
|
|
11
11
|
import { Guid } from '../utils/guid';
|
|
12
|
+
import { GuiFeatureConfig } from '../config';
|
|
12
13
|
export class GuiView {
|
|
13
14
|
constructor(injector, bsModalService, context, parentView) {
|
|
14
15
|
this.injector = injector;
|
|
@@ -16,6 +17,8 @@ export class GuiView {
|
|
|
16
17
|
this.context = context;
|
|
17
18
|
this.parentView = parentView;
|
|
18
19
|
this.viewId = Guid.newGuid().toString('n');
|
|
20
|
+
this.openVariablesSubscriptions = [];
|
|
21
|
+
this.openedVariableNamesForValues = new Set();
|
|
19
22
|
this.logger = injector.get(LOGGER_SERVICE_TOKEN);
|
|
20
23
|
this.childViews = new Array();
|
|
21
24
|
if (parentView) {
|
|
@@ -61,6 +64,7 @@ export class GuiView {
|
|
|
61
64
|
this.logger.debug('[GUI] View loaded.');
|
|
62
65
|
}
|
|
63
66
|
loadElementState() {
|
|
67
|
+
var _a, _b, _c;
|
|
64
68
|
if (!this.mainElement) {
|
|
65
69
|
return;
|
|
66
70
|
}
|
|
@@ -71,16 +75,64 @@ export class GuiView {
|
|
|
71
75
|
if (this.openVariableStatesSubscription) {
|
|
72
76
|
this.openVariableStatesSubscription.unsubscribe();
|
|
73
77
|
}
|
|
78
|
+
this.openVariablesSubscriptions.forEach(s => s.unsubscribe());
|
|
79
|
+
this.openVariablesSubscriptions = [];
|
|
80
|
+
this.openedVariableNamesForValues.clear();
|
|
74
81
|
this.openedVariableNames = this.mainElement.getVariableNames();
|
|
75
|
-
|
|
82
|
+
// 分离系统变量和普通变量
|
|
83
|
+
const systemVariables = [];
|
|
84
|
+
const normalVariablesForState = [];
|
|
85
|
+
this.openedVariableNames.forEach(variableName => {
|
|
86
|
+
if (variableName === '当前语种ID') {
|
|
87
|
+
// 系统变量直接订阅,不需要等待状态
|
|
88
|
+
systemVariables.push(variableName);
|
|
89
|
+
}
|
|
90
|
+
else {
|
|
91
|
+
normalVariablesForState.push(variableName);
|
|
92
|
+
}
|
|
93
|
+
});
|
|
94
|
+
// 立即订阅系统变量
|
|
95
|
+
if (systemVariables.length > 0) {
|
|
96
|
+
this.normalOpenedVariableNames(systemVariables);
|
|
97
|
+
}
|
|
98
|
+
if (normalVariablesForState.indexOf('设备状态') !== -1) {
|
|
99
|
+
if (this.requestVirtualDeviceState) {
|
|
100
|
+
this.requestVirtualDeviceState.unsubscribe();
|
|
101
|
+
}
|
|
102
|
+
if (this.requestVirtualDeviceState) {
|
|
103
|
+
this.requestVirtualDeviceState.unsubscribe();
|
|
104
|
+
}
|
|
105
|
+
this.normalOpenedVariableNames(['设备状态']);
|
|
106
|
+
this.requestVirtualDeviceState =
|
|
107
|
+
this.perViewVariableCommunicator.requestVirtualDeviceState().subscribe({
|
|
108
|
+
complete: () => { }
|
|
109
|
+
});
|
|
110
|
+
normalVariablesForState.splice(normalVariablesForState.indexOf('设备状态'), 1);
|
|
111
|
+
}
|
|
112
|
+
const validVariableNames = (_a = this.context.validVariableNames) !== null && _a !== void 0 ? _a : (_c = (_b = this.context.configStore.variableStore).getAllVariableNames) === null || _c === void 0 ? void 0 : _c.call(_b);
|
|
113
|
+
if (validVariableNames) {
|
|
114
|
+
const invalidVariables = normalVariablesForState.filter(name => !validVariableNames.includes(name));
|
|
115
|
+
if (invalidVariables.length > 0) {
|
|
116
|
+
const unbindStates = invalidVariables.map(name => new VariableState(name, VariableStateEnum.InvalidMonitor));
|
|
117
|
+
this.mainElement.reportVariableStates(unbindStates);
|
|
118
|
+
invalidVariables.forEach(name => {
|
|
119
|
+
const idx = normalVariablesForState.indexOf(name);
|
|
120
|
+
if (idx !== -1) {
|
|
121
|
+
normalVariablesForState.splice(idx, 1);
|
|
122
|
+
}
|
|
123
|
+
});
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
if (normalVariablesForState.length === 0) {
|
|
76
127
|
return;
|
|
77
128
|
}
|
|
78
129
|
this.openVariableStatesSubscription =
|
|
79
|
-
this.perViewVariableCommunicator.subscribeVariableStates(
|
|
130
|
+
this.perViewVariableCommunicator.subscribeVariableStates(normalVariablesForState).subscribe((states) => {
|
|
80
131
|
this.mainElement.reportVariableStates(states);
|
|
81
132
|
const normalVariableNames = [];
|
|
82
133
|
each(states, v => {
|
|
83
|
-
if (v.state === VariableStateEnum.Normal &&
|
|
134
|
+
if ((v.state === VariableStateEnum.Normal || (GuiFeatureConfig.isOfflineDisplayEnabled && v.state === VariableStateEnum.Offline))
|
|
135
|
+
&& normalVariableNames.indexOf(v.variableName) === -1) {
|
|
84
136
|
normalVariableNames.push(v.variableName);
|
|
85
137
|
}
|
|
86
138
|
});
|
|
@@ -181,8 +233,14 @@ export class GuiView {
|
|
|
181
233
|
if (this.openVariableStatesSubscription) {
|
|
182
234
|
this.openVariableStatesSubscription.unsubscribe();
|
|
183
235
|
}
|
|
184
|
-
if (this.
|
|
185
|
-
this.
|
|
236
|
+
if (this.requestVirtualDeviceState) {
|
|
237
|
+
this.requestVirtualDeviceState.unsubscribe();
|
|
238
|
+
}
|
|
239
|
+
if (this.virtualDeviceStatesChanged) {
|
|
240
|
+
this.virtualDeviceStatesChanged.unsubscribe();
|
|
241
|
+
}
|
|
242
|
+
if (this.openVariablesSubscriptions) {
|
|
243
|
+
this.openVariablesSubscriptions.forEach(s => s.unsubscribe());
|
|
186
244
|
}
|
|
187
245
|
if (this.perViewVariableCommunicator) {
|
|
188
246
|
this.perViewVariableCommunicator.dispose();
|
|
@@ -196,9 +254,12 @@ export class GuiView {
|
|
|
196
254
|
this.logger.debug('[GUI] View disposed.');
|
|
197
255
|
}
|
|
198
256
|
normalOpenedVariableNames(normalVariableNames) {
|
|
199
|
-
|
|
200
|
-
|
|
257
|
+
const newVariables = normalVariableNames.filter(v => !this.openedVariableNamesForValues.has(v));
|
|
258
|
+
if (newVariables.length > 0) {
|
|
259
|
+
newVariables.forEach(v => this.openedVariableNamesForValues.add(v));
|
|
260
|
+
const sub = this.perViewVariableCommunicator.openVariables(newVariables, this.signalRAppId)
|
|
201
261
|
.subscribe(variableValues => this.mainElement.reportVariableValues(variableValues));
|
|
262
|
+
this.openVariablesSubscriptions.push(sub);
|
|
202
263
|
}
|
|
203
264
|
}
|
|
204
265
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
[{"__symbolic":"module","version":4,"metadata":{"GuiView":{"__symbolic":"class","members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","module":"@angular/core","name":"Injector","line":
|
|
1
|
+
[{"__symbolic":"module","version":4,"metadata":{"GuiView":{"__symbolic":"class","members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","module":"@angular/core","name":"Injector","line":51,"character":43},{"__symbolic":"reference","module":"ngx-bootstrap/modal","name":"BsModalService","line":52,"character":41},{"__symbolic":"reference","module":"./gui-context","name":"GuiContext","line":53,"character":34},{"__symbolic":"reference","name":"GuiView"}]}],"resize":[{"__symbolic":"method"}],"load":[{"__symbolic":"method"}],"loadElementState":[{"__symbolic":"method"}],"popView":[{"__symbolic":"method"}],"closeView":[{"__symbolic":"method"}],"moveView":[{"__symbolic":"method"}],"showMusk":[{"__symbolic":"method"}],"showShadow":[{"__symbolic":"method"}],"hideMusk":[{"__symbolic":"method"}],"dispose":[{"__symbolic":"method"}],"normalOpenedVariableNames":[{"__symbolic":"method"}]}}}}]
|
package/gui/gui.component.d.ts
CHANGED
|
@@ -24,10 +24,12 @@ export declare class GuiComponent implements OnChanges, OnDestroy {
|
|
|
24
24
|
initHeight: number;
|
|
25
25
|
lastScale: number;
|
|
26
26
|
isMobileMode: boolean;
|
|
27
|
+
hostContainerId: string;
|
|
27
28
|
private $svg;
|
|
28
29
|
private host;
|
|
29
30
|
private get viewResizeMode();
|
|
30
31
|
private readonly globalSettings;
|
|
32
|
+
private readonly viewService;
|
|
31
33
|
constructor(el: ElementRef, localization: Localization, injector: Injector, bsModalService: BsModalService);
|
|
32
34
|
ngOnChanges(changes: {
|
|
33
35
|
[propKey: string]: SimpleChange;
|
|
@@ -39,4 +41,5 @@ export declare class GuiComponent implements OnChanges, OnDestroy {
|
|
|
39
41
|
private onSizeChanged;
|
|
40
42
|
private onResizeModeChanged;
|
|
41
43
|
private onDisplayModeChanged;
|
|
44
|
+
refreshCurrentPage(): boolean;
|
|
42
45
|
}
|
package/gui/gui.component.js
CHANGED
|
@@ -18,6 +18,7 @@ import { Size } from '../model';
|
|
|
18
18
|
import { DisplayMode, GlobalSettings, ViewResizeMode } from '../settings';
|
|
19
19
|
import { GuiHost } from './gui-host';
|
|
20
20
|
import { Guid } from '../utils/guid';
|
|
21
|
+
import { ViewService } from '../view/view.service';
|
|
21
22
|
let GuiComponent = class GuiComponent {
|
|
22
23
|
constructor(el, localization, injector, bsModalService) {
|
|
23
24
|
this.el = el;
|
|
@@ -29,6 +30,7 @@ let GuiComponent = class GuiComponent {
|
|
|
29
30
|
this.lastScale = 1;
|
|
30
31
|
this.isMobileMode = false;
|
|
31
32
|
this.globalSettings = this.injector.get(GlobalSettings);
|
|
33
|
+
this.viewService = injector.get(ViewService);
|
|
32
34
|
}
|
|
33
35
|
get viewResizeMode() {
|
|
34
36
|
switch (this.resizeMode) {
|
|
@@ -131,11 +133,11 @@ let GuiComponent = class GuiComponent {
|
|
|
131
133
|
this.$svg = $(this.el.nativeElement).find('div.svgView').first();
|
|
132
134
|
this.$svg.empty();
|
|
133
135
|
const svgRootClass = 'S' + Guid.newGuid().toString('n');
|
|
134
|
-
|
|
136
|
+
this.hostContainerId = 'H' + Guid.newGuid().toString('n');
|
|
135
137
|
this.$svg.addClass(svgRootClass);
|
|
136
138
|
const guiOptions = {
|
|
137
139
|
svgRootClass: svgRootClass,
|
|
138
|
-
hostContainerId: hostContainerId,
|
|
140
|
+
hostContainerId: this.hostContainerId,
|
|
139
141
|
el: this.el
|
|
140
142
|
};
|
|
141
143
|
const host = new GuiHost(this.injector, this.bsModalService, newValue, guiOptions, this.el);
|
|
@@ -190,6 +192,17 @@ let GuiComponent = class GuiComponent {
|
|
|
190
192
|
this.isMobileMode = this.displayMode === 'Mobile';
|
|
191
193
|
this.globalSettings.displayMode = this.isMobileMode ? DisplayMode.Mobile : DisplayMode.Web;
|
|
192
194
|
}
|
|
195
|
+
refreshCurrentPage() {
|
|
196
|
+
if (this.host.currentViewIndex === undefined) {
|
|
197
|
+
return false;
|
|
198
|
+
}
|
|
199
|
+
const toggleView = this.viewService.toggleViews.get(this.el);
|
|
200
|
+
if (!toggleView) {
|
|
201
|
+
return false;
|
|
202
|
+
}
|
|
203
|
+
toggleView(this.host.currentViewIndex, this.hostContainerId, this.el).subscribe();
|
|
204
|
+
return true;
|
|
205
|
+
}
|
|
193
206
|
};
|
|
194
207
|
__decorate([
|
|
195
208
|
Input(),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
[{"__symbolic":"module","version":4,"metadata":{"GuiComponent":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Component","line":
|
|
1
|
+
[{"__symbolic":"module","version":4,"metadata":{"GuiComponent":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Component","line":12,"character":1},"arguments":[{"selector":"fc-gui","template":"<div> <div class='svgView' style=\"position: relative;display: flex;justify-content: center;align-items: center;\"></div> </div> "}]}],"members":{"context":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":18,"character":5}}]}],"size":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":19,"character":5}}]}],"resizeMode":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":20,"character":5}}]}],"displayMode":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":21,"character":5}}]}],"loadFailed":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output","line":22,"character":5}}]}],"loaded":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output","line":23,"character":5}}]}],"__ctor__":[{"__symbolic":"constructor","parameterDecorators":[null,[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Inject","line":50,"character":9},"arguments":[{"__symbolic":"reference","module":"../localization","name":"LOCALIZATION","line":50,"character":16}]}],null,null],"parameters":[{"__symbolic":"reference","module":"@angular/core","name":"ElementRef","line":49,"character":37},{"__symbolic":"reference","module":"../localization","name":"Localization","line":50,"character":61},{"__symbolic":"reference","module":"@angular/core","name":"Injector","line":51,"character":35},{"__symbolic":"reference","module":"ngx-bootstrap/modal","name":"BsModalService","line":52,"character":41}]}],"ngOnChanges":[{"__symbolic":"method"}],"doubleFingerZooming":[{"__symbolic":"method"}],"getDistance":[{"__symbolic":"method"}],"ngOnDestroy":[{"__symbolic":"method"}],"onProviderChanged":[{"__symbolic":"method"}],"onSizeChanged":[{"__symbolic":"method"}],"onResizeModeChanged":[{"__symbolic":"method"}],"onDisplayModeChanged":[{"__symbolic":"method"}],"refreshCurrentPage":[{"__symbolic":"method"}]}}}}]
|
|
@@ -4,8 +4,10 @@ export interface Localization {
|
|
|
4
4
|
loadFailed: any;
|
|
5
5
|
setting: any;
|
|
6
6
|
submit: any;
|
|
7
|
+
submitting: any;
|
|
7
8
|
numericalValueRequired: any;
|
|
8
9
|
invalidNumericalValue: any;
|
|
10
|
+
writeValueTimeout: any;
|
|
9
11
|
binaryType: any;
|
|
10
12
|
decimalType: any;
|
|
11
13
|
hexadecimalType: any;
|
|
@@ -27,14 +29,21 @@ export interface Localization {
|
|
|
27
29
|
offline: any;
|
|
28
30
|
abnormal: any;
|
|
29
31
|
disable: any;
|
|
32
|
+
invalidMonitor: any;
|
|
33
|
+
variableChanged: any;
|
|
30
34
|
permissiontip: any;
|
|
31
35
|
conditionIsNotMetTip: any;
|
|
32
36
|
chartNoData: any;
|
|
37
|
+
lastThirtyMinutes: any;
|
|
33
38
|
lastOneHour: any;
|
|
39
|
+
lastEightHour: any;
|
|
34
40
|
lastTwentyFourHours: any;
|
|
35
41
|
lastSevenDays: any;
|
|
36
42
|
lastThirtyDays: any;
|
|
37
43
|
lastOneYear: any;
|
|
44
|
+
customTimeRange: any;
|
|
45
|
+
startTime: any;
|
|
46
|
+
endTime: any;
|
|
38
47
|
grouped: any;
|
|
39
48
|
stacked: any;
|
|
40
49
|
passwordVerify: any;
|
|
@@ -47,5 +56,8 @@ export interface Localization {
|
|
|
47
56
|
weatherNotSupport: any;
|
|
48
57
|
weatherNotAddress: any;
|
|
49
58
|
weatherNotAvailable: any;
|
|
59
|
+
airQualityNotSupport: any;
|
|
60
|
+
airQualityNotAddress: any;
|
|
61
|
+
airQualityNotAvailable: any;
|
|
50
62
|
}
|
|
51
63
|
export declare const DefaultLocalization: Localization;
|
|
@@ -4,8 +4,10 @@ export const DefaultLocalization = {
|
|
|
4
4
|
loadFailed: 'Load failed.',
|
|
5
5
|
setting: 'Setting',
|
|
6
6
|
submit: 'Submit',
|
|
7
|
+
submitting: 'Submitting···',
|
|
7
8
|
numericalValueRequired: 'Numerical value can\'t be emtpy',
|
|
8
9
|
invalidNumericalValue: 'Numerical value is not valid',
|
|
10
|
+
writeValueTimeout: 'Write value error: Timeout',
|
|
9
11
|
binaryType: 'Binary',
|
|
10
12
|
decimalType: 'Decimal',
|
|
11
13
|
hexadecimalType: 'Hexadecimal',
|
|
@@ -15,7 +17,7 @@ export const DefaultLocalization = {
|
|
|
15
17
|
canNotBeNegative: 'Can not be negative',
|
|
16
18
|
valueOutOfRange: 'Numerical value is out of range',
|
|
17
19
|
timeout: 'timeout',
|
|
18
|
-
confirmOperationPrompt: '
|
|
20
|
+
confirmOperationPrompt: 'Are you sure you want to perform this operation?',
|
|
19
21
|
confirm: 'Yes',
|
|
20
22
|
cancel: 'Cancel',
|
|
21
23
|
characterInputRequired: 'Character input can\'t be empty',
|
|
@@ -27,14 +29,21 @@ export const DefaultLocalization = {
|
|
|
27
29
|
offline: 'Offline',
|
|
28
30
|
abnormal: 'Data abnormal',
|
|
29
31
|
disable: 'Disable',
|
|
32
|
+
invalidMonitor: 'Element binding monitor point is invalid',
|
|
33
|
+
variableChanged: 'Variable changed, please re-import the device template',
|
|
30
34
|
permissiontip: 'You have no permission to operate.',
|
|
31
|
-
conditionIsNotMetTip: '
|
|
35
|
+
conditionIsNotMetTip: 'Operation conditions not met or variable anomalies.',
|
|
32
36
|
chartNoData: 'No Data Available',
|
|
37
|
+
lastThirtyMinutes: 'Last thirty minutes',
|
|
33
38
|
lastOneHour: 'Last one hour',
|
|
39
|
+
lastEightHour: 'Last eight hours',
|
|
34
40
|
lastTwentyFourHours: 'Last 24 hours',
|
|
35
41
|
lastSevenDays: 'Last 7 days',
|
|
36
42
|
lastThirtyDays: 'Last 30 days',
|
|
37
|
-
lastOneYear: 'Last
|
|
43
|
+
lastOneYear: 'Last 6 months',
|
|
44
|
+
customTimeRange: 'Custom',
|
|
45
|
+
startTime: 'Start Time',
|
|
46
|
+
endTime: 'End Time',
|
|
38
47
|
grouped: 'Grouped',
|
|
39
48
|
stacked: 'Stacked',
|
|
40
49
|
passwordVerify: 'Password verifiers',
|
|
@@ -46,5 +55,8 @@ export const DefaultLocalization = {
|
|
|
46
55
|
unconfiguredVideoAddress: 'Unconfigured Video Address',
|
|
47
56
|
weatherNotSupport: 'Location not supported',
|
|
48
57
|
weatherNotAddress: 'Address not configured',
|
|
49
|
-
weatherNotAvailable: 'Address not yet available'
|
|
58
|
+
weatherNotAvailable: 'Address not yet available',
|
|
59
|
+
airQualityNotSupport: 'Location not supported',
|
|
60
|
+
airQualityNotAddress: 'Address not configured',
|
|
61
|
+
airQualityNotAvailable: 'Address not yet available'
|
|
50
62
|
};
|