@flexem/fc-gui 3.0.0-alpha.14 → 3.0.0-alpha.140
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 +433 -0
- 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/bundles/@flexem/fc-gui.umd.js +38624 -34602
- 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 +4 -0
- 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/index.d.ts +1 -0
- package/config/index.js +1 -0
- package/config/index.metadata.json +1 -1
- 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 +64 -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 +3 -0
- 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 +33 -3
- package/elements/historical-curve/historical-curve.element.js +353 -26
- package/elements/historical-curve/historical-curve.element.metadata.json +1 -1
- package/elements/main-element.d.ts +1 -0
- package/elements/main-element.js +59 -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 +16 -3
- package/elements/numerical-display/numerical-display-element.js +83 -11
- package/elements/numerical-display/numerical-display-element.metadata.json +1 -1
- package/elements/per-view-variable-communicator.d.ts +3 -0
- package/elements/per-view-variable-communicator.js +11 -0
- 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 +71 -0
- package/elements/scroll-alarm/scroll-alarm-element.js +799 -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 -4
- package/elements/shared/graph/graph-state-element.metadata.json +1 -1
- package/elements/shared/text/text-element.d.ts +9 -0
- package/elements/shared/text/text-element.js +33 -2
- package/elements/shared/text/text-element.metadata.json +1 -1
- package/elements/shared/text/text-state-element.d.ts +27 -2
- package/elements/shared/text/text-state-element.js +161 -63
- package/elements/shared/text/text-state-element.metadata.json +1 -1
- package/elements/static-elements/hyperlink-element.d.ts +24 -2
- package/elements/static-elements/hyperlink-element.js +131 -3
- package/elements/static-elements/hyperlink-element.metadata.json +1 -1
- package/elements/static-elements/text-element.d.ts +24 -2
- package/elements/static-elements/text-element.js +127 -3
- package/elements/static-elements/text-element.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 +49 -10
- package/elements/switch-indicator-light/switch-indicator-light-element.metadata.json +1 -1
- package/elements/video/video-element.d.ts +4 -0
- package/elements/video/video-element.js +81 -21
- package/elements/video/video-element.metadata.json +1 -1
- package/elements/view-operation/view-operation.element.d.ts +23 -2
- package/elements/view-operation/view-operation.element.js +130 -1
- 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 +12 -2
- package/gui/gui-host.d.ts +1 -1
- package/gui/gui-view.d.ts +2 -0
- package/gui/gui-view.js +38 -2
- 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 +7 -0
- package/localization/localization.service.js +10 -3
- package/localization/localization.service.metadata.json +1 -1
- package/localization/localization.service.zh_CN.js +8 -1
- package/localization/localization.service.zh_CN.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 +12 -7
- package/modal/write-value/write-value-modal.component.html +9 -4
- package/modal/write-value/write-value-modal.component.js +73 -15
- 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 +12 -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/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/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 +22 -0
- package/remote/communication/variable/remote-variable-communicator.js +122 -2
- package/remote/communication/variable/remote-variable-communicator.metadata.json +1 -1
- package/remote/communication/variable/remote-variable-protocol.d.ts +5 -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 +76 -0
- package/service/system-text-library.service.js +28 -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
|
@@ -3,12 +3,17 @@ import { GraphStateElement } from '../shared/graph/graph-state-element';
|
|
|
3
3
|
import { LOGGER_SERVICE_TOKEN } from '../../logger';
|
|
4
4
|
import { TextElementModal } from '../shared/text/text-element';
|
|
5
5
|
export class HyperlinkElement extends ConditionalDynamicDisplayElement {
|
|
6
|
-
constructor(element, injector, permissionChecker, variableCommunicator, variableStore, graphStore, signalRAppId) {
|
|
6
|
+
constructor(element, injector, permissionChecker, variableCommunicator, variableStore, graphStore, signalRAppId, textLibraryService, languageService, guiContext) {
|
|
7
7
|
super(element, permissionChecker, variableCommunicator, variableStore, signalRAppId);
|
|
8
8
|
this.graphStore = graphStore;
|
|
9
|
+
this.textLibraryService = textLibraryService;
|
|
10
|
+
this.languageService = languageService;
|
|
11
|
+
this.guiContext = guiContext;
|
|
9
12
|
this.logger = injector.get(LOGGER_SERVICE_TOKEN);
|
|
10
13
|
if (this.model.size) {
|
|
11
14
|
this.initGraphAndText();
|
|
15
|
+
// 订阅语种变化
|
|
16
|
+
this.subscribeLanguageChange();
|
|
12
17
|
}
|
|
13
18
|
if (this.model && this.model.linkAddress) {
|
|
14
19
|
this.rootElement.style('cursor', 'hand');
|
|
@@ -22,6 +27,40 @@ export class HyperlinkElement extends ConditionalDynamicDisplayElement {
|
|
|
22
27
|
});
|
|
23
28
|
}
|
|
24
29
|
}
|
|
30
|
+
dispose() {
|
|
31
|
+
// 取消语种变化订阅
|
|
32
|
+
if (this.languageChangeSubscription) {
|
|
33
|
+
this.languageChangeSubscription.unsubscribe();
|
|
34
|
+
this.languageChangeSubscription = undefined;
|
|
35
|
+
}
|
|
36
|
+
if (this.$element) {
|
|
37
|
+
this.$element.remove();
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* 订阅语种变化事件
|
|
42
|
+
* 当设备的语种ID改变时,重新渲染文本
|
|
43
|
+
*/
|
|
44
|
+
subscribeLanguageChange() {
|
|
45
|
+
if (this.guiContext && this.guiContext.languageChanged$) {
|
|
46
|
+
this.languageChangeSubscription = this.guiContext.languageChanged$.subscribe(() => {
|
|
47
|
+
// 重新渲染文本
|
|
48
|
+
this.reRenderText();
|
|
49
|
+
});
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
/**
|
|
53
|
+
* 重新渲染文本
|
|
54
|
+
*/
|
|
55
|
+
reRenderText() {
|
|
56
|
+
if (!this.textElementModal || !this.model.size) {
|
|
57
|
+
return;
|
|
58
|
+
}
|
|
59
|
+
// 获取新的显示文本
|
|
60
|
+
const displayText = this.getDisplayText();
|
|
61
|
+
// 直接更新文本内容,而不是重新创建元素
|
|
62
|
+
this.textElementModal.updateText(displayText);
|
|
63
|
+
}
|
|
25
64
|
initGraphAndText() {
|
|
26
65
|
this.rootElement.selectAll('*').remove();
|
|
27
66
|
const size = this.model.size;
|
|
@@ -42,7 +81,96 @@ export class HyperlinkElement extends ConditionalDynamicDisplayElement {
|
|
|
42
81
|
color: this.model.stroke,
|
|
43
82
|
textAlign: this.model.textAlign
|
|
44
83
|
};
|
|
45
|
-
|
|
46
|
-
this
|
|
84
|
+
// 获取显示文本(支持文本库)
|
|
85
|
+
const displayText = this.getDisplayText();
|
|
86
|
+
this.textElementModal = new TextElementModal(displayText, font, width, height);
|
|
87
|
+
this.$element.append(this.textElementModal.Element);
|
|
88
|
+
}
|
|
89
|
+
/**
|
|
90
|
+
* 获取显示文本
|
|
91
|
+
* 如果配置了文本库,则从文本库中获取对应语种的文本
|
|
92
|
+
* 否则返回默认文本
|
|
93
|
+
*/
|
|
94
|
+
getDisplayText() {
|
|
95
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q;
|
|
96
|
+
// 检查是否使用文本库
|
|
97
|
+
if (this.model.textLibrary && this.model.textLibrary.labelType === 'textLibrary') {
|
|
98
|
+
const textLibraryId = this.model.textLibrary.selectedTextLibraryItem;
|
|
99
|
+
const textItem = this.model.textLibrary.selectedTextItem;
|
|
100
|
+
if (textLibraryId && textItem && this.textLibraryService) {
|
|
101
|
+
// 获取文本库数据
|
|
102
|
+
const textLibraryData = this.textLibraryService.getTextLibraryById(typeof textLibraryId === 'string' ? parseInt(textLibraryId, 10) : textLibraryId);
|
|
103
|
+
if (textLibraryData && textLibraryData.data) {
|
|
104
|
+
// 查找对应的文本条目
|
|
105
|
+
const textEntry = textLibraryData.data.find(entry => entry.key === textItem.toString());
|
|
106
|
+
if (textEntry) {
|
|
107
|
+
// 获取当前语种ID
|
|
108
|
+
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;
|
|
109
|
+
// 确定要使用的语种代码(culture)
|
|
110
|
+
let targetLanguage;
|
|
111
|
+
const defaultLanguage = ((_d = this.languageService) === null || _d === void 0 ? void 0 : _d.getDefaultLanguage()) || 'zh-CN';
|
|
112
|
+
if (currentLanguageId === null || currentLanguageId === undefined) {
|
|
113
|
+
// 设备未设置当前语种,使用默认语种
|
|
114
|
+
targetLanguage = defaultLanguage;
|
|
115
|
+
}
|
|
116
|
+
else {
|
|
117
|
+
// 设备已设置当前语种,获取对应的语种代码
|
|
118
|
+
const currentLanguage = (_f = (_e = this.guiContext) === null || _e === void 0 ? void 0 : _e.getLanguageCultureById) === null || _f === void 0 ? void 0 : _f.call(_e, currentLanguageId);
|
|
119
|
+
if (currentLanguage) {
|
|
120
|
+
targetLanguage = currentLanguage;
|
|
121
|
+
}
|
|
122
|
+
else {
|
|
123
|
+
// 无法获取语种代码,使用默认语种
|
|
124
|
+
targetLanguage = defaultLanguage;
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
// 返回对应语种的文本
|
|
128
|
+
if (textEntry.cultures && textEntry.cultures[targetLanguage]) {
|
|
129
|
+
return textEntry.cultures[targetLanguage];
|
|
130
|
+
}
|
|
131
|
+
// 如果没有对应语种,返回空字符串
|
|
132
|
+
return '';
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
// 文本库配置但未找到数据,返回空字符串
|
|
137
|
+
return '';
|
|
138
|
+
}
|
|
139
|
+
// 处理自定义文本(支持多语种)
|
|
140
|
+
if (this.model.text) {
|
|
141
|
+
// 检查是否为多语种格式
|
|
142
|
+
if (typeof this.model.text === 'object' && this.model.text.cultures) {
|
|
143
|
+
// 新格式:多语种对象
|
|
144
|
+
// 获取当前语种ID
|
|
145
|
+
const currentLanguageId = (_j = (_h = (_g = this.guiContext) === null || _g === void 0 ? void 0 : _g.getCurrentLanguageId) === null || _h === void 0 ? void 0 : _h.call(_g)) !== null && _j !== void 0 ? _j : null;
|
|
146
|
+
// 确定要使用的语种代码(culture)
|
|
147
|
+
let targetLanguage;
|
|
148
|
+
const defaultLanguage = ((_k = this.languageService) === null || _k === void 0 ? void 0 : _k.getDefaultLanguage()) || 'zh-CN';
|
|
149
|
+
if (currentLanguageId === null || currentLanguageId === undefined) {
|
|
150
|
+
// 设备未设置当前语种,使用默认语种
|
|
151
|
+
targetLanguage = defaultLanguage;
|
|
152
|
+
}
|
|
153
|
+
else {
|
|
154
|
+
// 设备已设置当前语种,获取对应的语种代码
|
|
155
|
+
const currentLanguage = (_m = (_l = this.guiContext) === null || _l === void 0 ? void 0 : _l.getLanguageCultureById) === null || _m === void 0 ? void 0 : _m.call(_l, currentLanguageId);
|
|
156
|
+
if (currentLanguage) {
|
|
157
|
+
targetLanguage = currentLanguage;
|
|
158
|
+
}
|
|
159
|
+
else {
|
|
160
|
+
targetLanguage = defaultLanguage;
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
// 返回对应语种的文本,如果没有则根据当前语言环境显示默认文本
|
|
164
|
+
// 获取当前语言环境
|
|
165
|
+
const language = ((_q = (_p = (_o = window.abp) === null || _o === void 0 ? void 0 : _o.localization) === null || _p === void 0 ? void 0 : _p.currentLanguage) === null || _q === void 0 ? void 0 : _q.name) || 'zh-Hans';
|
|
166
|
+
const isChinese = language === 'zh-Hans' || language === 'zh';
|
|
167
|
+
return this.model.text.cultures[targetLanguage] || (isChinese ? '超链接' : 'Hyperlink');
|
|
168
|
+
}
|
|
169
|
+
else if (typeof this.model.text === 'string') {
|
|
170
|
+
// 旧格式:字符串
|
|
171
|
+
return this.model.text;
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
return '';
|
|
47
175
|
}
|
|
48
176
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
[{"__symbolic":"module","version":4,"metadata":{"HyperlinkElement":{"__symbolic":"class","extends":{"__symbolic":"reference","module":"../base/conditional-dynamic-display-element","name":"ConditionalDynamicDisplayElement","line":
|
|
1
|
+
[{"__symbolic":"module","version":4,"metadata":{"HyperlinkElement":{"__symbolic":"class","extends":{"__symbolic":"reference","module":"../base/conditional-dynamic-display-element","name":"ConditionalDynamicDisplayElement","line":14,"character":38},"members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"error","message":"Could not resolve type","line":21,"character":25,"context":{"typeName":"HTMLElement"}},{"__symbolic":"reference","module":"@angular/core","name":"Injector","line":21,"character":48},{"__symbolic":"reference","module":"../../service","name":"PermissionChecker","line":21,"character":77},{"__symbolic":"reference","module":"../../communication","name":"VariableCommunicator","line":22,"character":30},{"__symbolic":"reference","module":"../../config","name":"VariableStore","line":22,"character":67},{"__symbolic":"reference","module":"../../config","name":"GraphStore","line":22,"character":111},{"__symbolic":"reference","name":"string"},{"__symbolic":"reference","module":"../../service","name":"TextLibraryService","line":24,"character":46},{"__symbolic":"reference","module":"../../service","name":"LanguageService","line":25,"character":43},{"__symbolic":"reference","module":"../../gui/gui-context","name":"GuiContext","line":26,"character":38}]}],"dispose":[{"__symbolic":"method"}],"subscribeLanguageChange":[{"__symbolic":"method"}],"reRenderText":[{"__symbolic":"method"}],"initGraphAndText":[{"__symbolic":"method"}],"getDisplayText":[{"__symbolic":"method"}]}}}}]
|
|
@@ -4,13 +4,35 @@ import { ConditionalDynamicDisplayElement } from '../base/conditional-dynamic-di
|
|
|
4
4
|
import { GraphStore, VariableStore } from '../../config';
|
|
5
5
|
import { LoggerService } from '../../logger';
|
|
6
6
|
import { Injector } from '@angular/core';
|
|
7
|
-
import { PermissionChecker } from '../../service';
|
|
7
|
+
import { PermissionChecker, TextLibraryService, LanguageService } from '../../service';
|
|
8
|
+
import { GuiContext } from '../../gui/gui-context';
|
|
8
9
|
export declare class TextElement extends ConditionalDynamicDisplayElement {
|
|
9
10
|
private readonly graphStore;
|
|
11
|
+
private readonly textLibraryService?;
|
|
12
|
+
private readonly languageService?;
|
|
13
|
+
private readonly guiContext?;
|
|
10
14
|
protected readonly model: TextModel;
|
|
11
15
|
protected readonly logger: LoggerService;
|
|
12
|
-
|
|
16
|
+
private languageChangeSubscription?;
|
|
17
|
+
private textElementModal?;
|
|
18
|
+
constructor(element: HTMLElement, injector: Injector, permissionChecker: PermissionChecker, variableCommunicator: VariableCommunicator, variableStore: VariableStore, graphStore: GraphStore, signalRAppId: string, textLibraryService?: TextLibraryService, languageService?: LanguageService, guiContext?: GuiContext);
|
|
13
19
|
dispose(): void;
|
|
20
|
+
/**
|
|
21
|
+
* 订阅语种变化事件
|
|
22
|
+
* 当设备的语种ID改变时,重新渲染文本
|
|
23
|
+
*/
|
|
24
|
+
private subscribeLanguageChange;
|
|
25
|
+
/**
|
|
26
|
+
* 重新渲染文本
|
|
27
|
+
*/
|
|
28
|
+
private reRenderText;
|
|
29
|
+
/**
|
|
30
|
+
* 获取显示文本
|
|
31
|
+
* 如果配置了文本库,则从文本库中获取对应语种的文本
|
|
32
|
+
* 如果是多语种自定义文本,则根据当前语种ID获取对应语种的文本
|
|
33
|
+
* 否则返回默认文本
|
|
34
|
+
*/
|
|
35
|
+
private getDisplayText;
|
|
14
36
|
private handleTextValue;
|
|
15
37
|
private initGraph;
|
|
16
38
|
}
|
|
@@ -3,9 +3,12 @@ import { GraphStateElement } from '../shared/graph/graph-state-element';
|
|
|
3
3
|
import { LOGGER_SERVICE_TOKEN } from '../../logger';
|
|
4
4
|
import { TextElementModal } from '../shared/text/text-element';
|
|
5
5
|
export class TextElement extends ConditionalDynamicDisplayElement {
|
|
6
|
-
constructor(element, injector, permissionChecker, variableCommunicator, variableStore, graphStore, signalRAppId) {
|
|
6
|
+
constructor(element, injector, permissionChecker, variableCommunicator, variableStore, graphStore, signalRAppId, textLibraryService, languageService, guiContext) {
|
|
7
7
|
super(element, permissionChecker, variableCommunicator, variableStore, signalRAppId);
|
|
8
8
|
this.graphStore = graphStore;
|
|
9
|
+
this.textLibraryService = textLibraryService;
|
|
10
|
+
this.languageService = languageService;
|
|
11
|
+
this.guiContext = guiContext;
|
|
9
12
|
this.logger = injector.get(LOGGER_SERVICE_TOKEN);
|
|
10
13
|
if (this.model.text && this.model.size) {
|
|
11
14
|
const width = this.model.size.width;
|
|
@@ -26,8 +29,12 @@ export class TextElement extends ConditionalDynamicDisplayElement {
|
|
|
26
29
|
color: this.model.stroke,
|
|
27
30
|
textAlign: this.model.textAlign
|
|
28
31
|
};
|
|
29
|
-
|
|
30
|
-
this
|
|
32
|
+
// 获取显示文本(支持文本库)
|
|
33
|
+
const displayText = this.getDisplayText();
|
|
34
|
+
this.textElementModal = new TextElementModal(displayText, font, width, height);
|
|
35
|
+
this.$element.append(this.textElementModal.Element);
|
|
36
|
+
// 订阅语种变化
|
|
37
|
+
this.subscribeLanguageChange();
|
|
31
38
|
}
|
|
32
39
|
else {
|
|
33
40
|
this.handleTextValue();
|
|
@@ -37,10 +44,127 @@ export class TextElement extends ConditionalDynamicDisplayElement {
|
|
|
37
44
|
}
|
|
38
45
|
}
|
|
39
46
|
dispose() {
|
|
47
|
+
// 取消语种变化订阅
|
|
48
|
+
if (this.languageChangeSubscription) {
|
|
49
|
+
this.languageChangeSubscription.unsubscribe();
|
|
50
|
+
this.languageChangeSubscription = undefined;
|
|
51
|
+
}
|
|
40
52
|
if (this.$element) {
|
|
41
53
|
this.$element.remove();
|
|
42
54
|
}
|
|
43
55
|
}
|
|
56
|
+
/**
|
|
57
|
+
* 订阅语种变化事件
|
|
58
|
+
* 当设备的语种ID改变时,重新渲染文本
|
|
59
|
+
*/
|
|
60
|
+
subscribeLanguageChange() {
|
|
61
|
+
if (this.guiContext && this.guiContext.languageChanged$) {
|
|
62
|
+
this.languageChangeSubscription = this.guiContext.languageChanged$.subscribe(() => {
|
|
63
|
+
// 重新渲染文本
|
|
64
|
+
this.reRenderText();
|
|
65
|
+
});
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
/**
|
|
69
|
+
* 重新渲染文本
|
|
70
|
+
*/
|
|
71
|
+
reRenderText() {
|
|
72
|
+
if (!this.textElementModal || !this.model.size) {
|
|
73
|
+
return;
|
|
74
|
+
}
|
|
75
|
+
// 获取新的显示文本
|
|
76
|
+
const displayText = this.getDisplayText();
|
|
77
|
+
// 直接更新文本内容,而不是重新创建元素
|
|
78
|
+
this.textElementModal.updateText(displayText);
|
|
79
|
+
}
|
|
80
|
+
/**
|
|
81
|
+
* 获取显示文本
|
|
82
|
+
* 如果配置了文本库,则从文本库中获取对应语种的文本
|
|
83
|
+
* 如果是多语种自定义文本,则根据当前语种ID获取对应语种的文本
|
|
84
|
+
* 否则返回默认文本
|
|
85
|
+
*/
|
|
86
|
+
getDisplayText() {
|
|
87
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q;
|
|
88
|
+
// 检查是否使用文本库
|
|
89
|
+
if (this.model.textLibrary && this.model.textLibrary.labelType === 'textLibrary') {
|
|
90
|
+
const textLibraryId = this.model.textLibrary.selectedTextLibraryItem;
|
|
91
|
+
const textItem = this.model.textLibrary.selectedTextItem;
|
|
92
|
+
if (textLibraryId && textItem && this.textLibraryService) {
|
|
93
|
+
// 获取文本库数据
|
|
94
|
+
const textLibraryData = this.textLibraryService.getTextLibraryById(typeof textLibraryId === 'string' ? parseInt(textLibraryId, 10) : textLibraryId);
|
|
95
|
+
if (textLibraryData && textLibraryData.data) {
|
|
96
|
+
// 查找对应的文本条目
|
|
97
|
+
const textEntry = textLibraryData.data.find(entry => entry.key === textItem.toString());
|
|
98
|
+
if (textEntry) {
|
|
99
|
+
// 获取当前语种ID
|
|
100
|
+
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;
|
|
101
|
+
// 确定要使用的语种代码(culture)
|
|
102
|
+
let targetLanguage;
|
|
103
|
+
const defaultLanguage = ((_d = this.languageService) === null || _d === void 0 ? void 0 : _d.getDefaultLanguage()) || 'zh-CN';
|
|
104
|
+
if (currentLanguageId === null || currentLanguageId === undefined) {
|
|
105
|
+
// 设备未设置当前语种,使用默认语种
|
|
106
|
+
targetLanguage = defaultLanguage;
|
|
107
|
+
}
|
|
108
|
+
else {
|
|
109
|
+
// 设备已设置当前语种,获取对应的语种代码
|
|
110
|
+
const currentLanguage = (_f = (_e = this.guiContext) === null || _e === void 0 ? void 0 : _e.getLanguageCultureById) === null || _f === void 0 ? void 0 : _f.call(_e, currentLanguageId);
|
|
111
|
+
if (currentLanguage) {
|
|
112
|
+
targetLanguage = currentLanguage;
|
|
113
|
+
}
|
|
114
|
+
else {
|
|
115
|
+
// 无法获取语种代码,使用默认语种
|
|
116
|
+
targetLanguage = defaultLanguage;
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
// 返回对应语种的文本
|
|
120
|
+
if (textEntry.cultures && textEntry.cultures[targetLanguage]) {
|
|
121
|
+
return textEntry.cultures[targetLanguage];
|
|
122
|
+
}
|
|
123
|
+
// 如果没有对应语种,返回空字符串
|
|
124
|
+
return '';
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
// 文本库配置但未找到数据,返回空字符串
|
|
129
|
+
return '';
|
|
130
|
+
}
|
|
131
|
+
// 处理自定义文本(支持多语种)
|
|
132
|
+
if (this.model.text) {
|
|
133
|
+
// 检查是否为多语种格式
|
|
134
|
+
if (typeof this.model.text === 'object' && this.model.text.cultures) {
|
|
135
|
+
// 新格式:多语种对象
|
|
136
|
+
// 获取当前语种ID
|
|
137
|
+
const currentLanguageId = (_j = (_h = (_g = this.guiContext) === null || _g === void 0 ? void 0 : _g.getCurrentLanguageId) === null || _h === void 0 ? void 0 : _h.call(_g)) !== null && _j !== void 0 ? _j : null;
|
|
138
|
+
// 确定要使用的语种代码(culture)
|
|
139
|
+
let targetLanguage;
|
|
140
|
+
const defaultLanguage = ((_k = this.languageService) === null || _k === void 0 ? void 0 : _k.getDefaultLanguage()) || 'zh-CN';
|
|
141
|
+
if (currentLanguageId === null || currentLanguageId === undefined) {
|
|
142
|
+
// 设备未设置当前语种,使用默认语种
|
|
143
|
+
targetLanguage = defaultLanguage;
|
|
144
|
+
}
|
|
145
|
+
else {
|
|
146
|
+
// 设备已设置当前语种,获取对应的语种代码
|
|
147
|
+
const currentLanguage = (_m = (_l = this.guiContext) === null || _l === void 0 ? void 0 : _l.getLanguageCultureById) === null || _m === void 0 ? void 0 : _m.call(_l, currentLanguageId);
|
|
148
|
+
if (currentLanguage) {
|
|
149
|
+
targetLanguage = currentLanguage;
|
|
150
|
+
}
|
|
151
|
+
else {
|
|
152
|
+
targetLanguage = defaultLanguage;
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
// 返回对应语种的文本,如果没有则根据当前语言环境显示默认文本
|
|
156
|
+
// 获取当前语言环境
|
|
157
|
+
const language = ((_q = (_p = (_o = window.abp) === null || _o === void 0 ? void 0 : _o.localization) === null || _p === void 0 ? void 0 : _p.currentLanguage) === null || _q === void 0 ? void 0 : _q.name) || 'zh-Hans';
|
|
158
|
+
const isChinese = language === 'zh-Hans' || language === 'zh';
|
|
159
|
+
return this.model.text.cultures[targetLanguage] || (isChinese ? '文本' : 'Text');
|
|
160
|
+
}
|
|
161
|
+
else if (typeof this.model.text === 'string') {
|
|
162
|
+
// 旧格式:字符串
|
|
163
|
+
return this.model.text;
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
return '';
|
|
167
|
+
}
|
|
44
168
|
handleTextValue() {
|
|
45
169
|
const allText = this.$element.find('text');
|
|
46
170
|
for (let i = 0; i < allText.length; i++) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
[{"__symbolic":"module","version":4,"metadata":{"TextElement":{"__symbolic":"class","extends":{"__symbolic":"reference","module":"../base/conditional-dynamic-display-element","name":"ConditionalDynamicDisplayElement","line":
|
|
1
|
+
[{"__symbolic":"module","version":4,"metadata":{"TextElement":{"__symbolic":"class","extends":{"__symbolic":"reference","module":"../base/conditional-dynamic-display-element","name":"ConditionalDynamicDisplayElement","line":12,"character":33},"members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"error","message":"Could not resolve type","line":19,"character":25,"context":{"typeName":"HTMLElement"}},{"__symbolic":"reference","module":"@angular/core","name":"Injector","line":19,"character":48},{"__symbolic":"reference","module":"../../service","name":"PermissionChecker","line":19,"character":77},{"__symbolic":"reference","module":"../../communication","name":"VariableCommunicator","line":20,"character":30},{"__symbolic":"reference","module":"../../config","name":"VariableStore","line":20,"character":67},{"__symbolic":"reference","module":"../../config","name":"GraphStore","line":20,"character":111},{"__symbolic":"reference","name":"string"},{"__symbolic":"reference","module":"../../service","name":"TextLibraryService","line":22,"character":46},{"__symbolic":"reference","module":"../../service","name":"LanguageService","line":23,"character":43},{"__symbolic":"reference","module":"../../gui/gui-context","name":"GuiContext","line":24,"character":38}]}],"dispose":[{"__symbolic":"method"}],"subscribeLanguageChange":[{"__symbolic":"method"}],"reRenderText":[{"__symbolic":"method"}],"getDisplayText":[{"__symbolic":"method"}],"handleTextValue":[{"__symbolic":"method"}],"initGraph":[{"__symbolic":"method"}]}}}}]
|
|
@@ -3,15 +3,19 @@ import { BsModalService } from 'ngx-bootstrap/modal';
|
|
|
3
3
|
import { GraphStore, VariableStore } from '../../config';
|
|
4
4
|
import { Localization } from '../../localization';
|
|
5
5
|
import { SwitchIndicatorLight } from '../../model';
|
|
6
|
-
import { PermissionChecker, OperationRecordService } from '../../service';
|
|
6
|
+
import { PermissionChecker, OperationRecordService, TextLibraryService, LanguageService } from '../../service';
|
|
7
7
|
import { VariableCommunicator } from '../../communication';
|
|
8
8
|
import { ConditionalEnableElement } from '../base/conditional-enable-element';
|
|
9
9
|
import { SecurityChecker } from '../../security';
|
|
10
|
+
import { GuiContext } from '../../gui/gui-context';
|
|
10
11
|
export declare class SwitchIndicatorLightElement extends ConditionalEnableElement {
|
|
11
12
|
private readonly modalService;
|
|
12
13
|
private readonly graphStore;
|
|
13
14
|
private readonly operationRecordService;
|
|
14
15
|
private readonly securityChecker;
|
|
16
|
+
private readonly textLibraryService?;
|
|
17
|
+
private readonly languageService?;
|
|
18
|
+
private readonly guiContext?;
|
|
15
19
|
protected readonly model: SwitchIndicatorLight;
|
|
16
20
|
private readonly logger;
|
|
17
21
|
private switchOperator;
|
|
@@ -24,7 +28,8 @@ export declare class SwitchIndicatorLightElement extends ConditionalEnableElemen
|
|
|
24
28
|
private restorationTimer;
|
|
25
29
|
private isWriteRestorationDownValue;
|
|
26
30
|
private onDocMouseUp;
|
|
27
|
-
|
|
31
|
+
private indicatorLightSubscription;
|
|
32
|
+
constructor(element: HTMLElement, injector: Injector, modalService: BsModalService, variableCommunicator: VariableCommunicator, graphStore: GraphStore, permissionChecker: PermissionChecker, operationRecordService: OperationRecordService, securityChecker: SecurityChecker, variableStore: VariableStore, localization: Localization, signalRAppId: string, textLibraryService?: TextLibraryService, languageService?: LanguageService, guiContext?: GuiContext);
|
|
28
33
|
handleMouseUp(): void;
|
|
29
34
|
private initOnDocMouseUpEvent;
|
|
30
35
|
private checkElementPassword;
|
|
@@ -35,5 +40,9 @@ export declare class SwitchIndicatorLightElement extends ConditionalEnableElemen
|
|
|
35
40
|
private currentStateIdChange;
|
|
36
41
|
private switchToState;
|
|
37
42
|
private initGraphAndText;
|
|
43
|
+
/**
|
|
44
|
+
* 释放资源
|
|
45
|
+
*/
|
|
46
|
+
dispose(): void;
|
|
38
47
|
private checkState;
|
|
39
48
|
}
|
|
@@ -17,12 +17,15 @@ import { DisplayMode, GlobalSettings } from '../../settings';
|
|
|
17
17
|
import { VariableUtil } from '../../utils/variable-util';
|
|
18
18
|
import { VariableDefinition } from '../../communication/variable/variable-definition';
|
|
19
19
|
export class SwitchIndicatorLightElement extends ConditionalEnableElement {
|
|
20
|
-
constructor(element, injector, modalService, variableCommunicator, graphStore, permissionChecker, operationRecordService, securityChecker, variableStore, localization, signalRAppId) {
|
|
20
|
+
constructor(element, injector, modalService, variableCommunicator, graphStore, permissionChecker, operationRecordService, securityChecker, variableStore, localization, signalRAppId, textLibraryService, languageService, guiContext) {
|
|
21
21
|
super(element, permissionChecker, variableCommunicator, variableStore, localization, signalRAppId);
|
|
22
22
|
this.modalService = modalService;
|
|
23
23
|
this.graphStore = graphStore;
|
|
24
24
|
this.operationRecordService = operationRecordService;
|
|
25
25
|
this.securityChecker = securityChecker;
|
|
26
|
+
this.textLibraryService = textLibraryService;
|
|
27
|
+
this.languageService = languageService;
|
|
28
|
+
this.guiContext = guiContext;
|
|
26
29
|
this.isBitRestoration = false; // 是否是 位设定且执行设置是复位
|
|
27
30
|
this.isVerifiedForRestoration = false; // 位设定且执行设置是复位情况下,是否已经完成了验证
|
|
28
31
|
this.isWriteRestorationDownValue = false;
|
|
@@ -32,7 +35,8 @@ export class SwitchIndicatorLightElement extends ConditionalEnableElement {
|
|
|
32
35
|
if (this.model.useSwitch) {
|
|
33
36
|
this.initSwitchOperator();
|
|
34
37
|
this.rootElement.style('cursor', 'hand');
|
|
35
|
-
|
|
38
|
+
const isMobile = navigator.userAgent.match(/(phone|pad|pod|iPhone|iPod|ios|iPad|Android|Mobile|BlackBerry|IEMobile|MQQBrowser|JUC|Fennec|wOSBrowser|BrowserNG|WebOS|Symbian|Windows Phone)/i);
|
|
39
|
+
this.rootElement.on(this.isMobileMode && isMobile ? 'touchstart' : 'mousedown', () => {
|
|
36
40
|
if (!this.isInitialized) {
|
|
37
41
|
return;
|
|
38
42
|
}
|
|
@@ -59,13 +63,13 @@ export class SwitchIndicatorLightElement extends ConditionalEnableElement {
|
|
|
59
63
|
}
|
|
60
64
|
else {
|
|
61
65
|
this.checkElementPassword(false);
|
|
62
|
-
if (!this.model.useIndicatorLight
|
|
66
|
+
if (!this.model.useIndicatorLight) {
|
|
63
67
|
this.switchToState(1);
|
|
64
68
|
}
|
|
65
69
|
}
|
|
66
70
|
}
|
|
67
71
|
else {
|
|
68
|
-
document.addEventListener('mouseup', this.onDocMouseUp);
|
|
72
|
+
document.addEventListener(this.isMobileMode ? 'touchend' : 'mouseup', this.onDocMouseUp);
|
|
69
73
|
this.restorationTimer = setTimeout(() => {
|
|
70
74
|
this.writeValue(1);
|
|
71
75
|
this.isWriteRestorationDownValue = true;
|
|
@@ -74,7 +78,7 @@ export class SwitchIndicatorLightElement extends ConditionalEnableElement {
|
|
|
74
78
|
d3.event.preventDefault();
|
|
75
79
|
}
|
|
76
80
|
});
|
|
77
|
-
this.rootElement.on('mouseup', () => {
|
|
81
|
+
this.rootElement.on(this.isMobileMode && isMobile ? 'touchend' : 'mouseup', () => {
|
|
78
82
|
this.handleMouseUp();
|
|
79
83
|
d3.event.stopPropagation();
|
|
80
84
|
});
|
|
@@ -96,10 +100,10 @@ export class SwitchIndicatorLightElement extends ConditionalEnableElement {
|
|
|
96
100
|
if (this.isBitRestoration && this.isWriteRestorationDownValue) {
|
|
97
101
|
this.writeValue(0);
|
|
98
102
|
}
|
|
99
|
-
document.removeEventListener('mouseup', this.onDocMouseUp);
|
|
103
|
+
document.removeEventListener(this.isMobileMode ? 'touchend' : 'mouseup', this.onDocMouseUp);
|
|
100
104
|
this.isVerifiedForRestoration = false;
|
|
101
105
|
this.isWriteRestorationDownValue = false;
|
|
102
|
-
if (!this.model.useIndicatorLight
|
|
106
|
+
if (!this.model.useIndicatorLight) {
|
|
103
107
|
this.switchToState(0);
|
|
104
108
|
if (d3.event) {
|
|
105
109
|
d3.event.preventDefault();
|
|
@@ -137,7 +141,7 @@ export class SwitchIndicatorLightElement extends ConditionalEnableElement {
|
|
|
137
141
|
}
|
|
138
142
|
else {
|
|
139
143
|
this.isVerifiedForRestoration = true;
|
|
140
|
-
document.addEventListener('mouseup', this.onDocMouseUp);
|
|
144
|
+
document.addEventListener(this.isMobileMode ? 'touchend' : 'mouseup', this.onDocMouseUp);
|
|
141
145
|
this.restorationTimer = setTimeout(() => {
|
|
142
146
|
this.writeValue(1);
|
|
143
147
|
this.isWriteRestorationDownValue = true;
|
|
@@ -207,7 +211,7 @@ export class SwitchIndicatorLightElement extends ConditionalEnableElement {
|
|
|
207
211
|
default:
|
|
208
212
|
throw new Error(`Unknown switchType:${settings.type}`);
|
|
209
213
|
}
|
|
210
|
-
this.indicatorLightOperator.currentStateIdChanged.subscribe(statusIdValue => {
|
|
214
|
+
this.indicatorLightSubscription = this.indicatorLightOperator.currentStateIdChanged.subscribe(statusIdValue => {
|
|
211
215
|
this.currentStateIdChange(statusIdValue);
|
|
212
216
|
});
|
|
213
217
|
this.indicatorLightOperator.requestData(this.signalRAppId);
|
|
@@ -237,9 +241,44 @@ export class SwitchIndicatorLightElement extends ConditionalEnableElement {
|
|
|
237
241
|
this.graphStateElement = new GraphStateElement(this.model.graphSetting, width, height, this.graphStore, this.logger, this.model.version, this.model.states);
|
|
238
242
|
this.$element.append(this.graphStateElement.Element);
|
|
239
243
|
}
|
|
240
|
-
this.textStateElement = new TextStateElement(this.model.states, width, height, this.logger, this.model.version, this.model.states);
|
|
244
|
+
this.textStateElement = new TextStateElement(this.model.states, width, height, this.logger, this.model.version, this.model.states, this.model.textLibrary, this.textLibraryService, this.languageService, this.guiContext, true);
|
|
241
245
|
this.$element.append(this.textStateElement.Element);
|
|
242
246
|
}
|
|
247
|
+
/**
|
|
248
|
+
* 释放资源
|
|
249
|
+
*/
|
|
250
|
+
dispose() {
|
|
251
|
+
// 释放文本元素资源(取消语种变化订阅等)
|
|
252
|
+
if (this.textStateElement) {
|
|
253
|
+
this.textStateElement.dispose();
|
|
254
|
+
}
|
|
255
|
+
// 释放指示灯操作器资源
|
|
256
|
+
if (this.indicatorLightOperator) {
|
|
257
|
+
// indicatorLightOperator 可能有自己的dispose方法
|
|
258
|
+
}
|
|
259
|
+
// 清除定时器
|
|
260
|
+
if (this.restorationTimer) {
|
|
261
|
+
clearTimeout(this.restorationTimer);
|
|
262
|
+
this.restorationTimer = undefined;
|
|
263
|
+
}
|
|
264
|
+
// 移除事件监听
|
|
265
|
+
if (this.onDocMouseUp) {
|
|
266
|
+
document.removeEventListener(this.isMobileMode ? 'touchend' : 'mouseup', this.onDocMouseUp);
|
|
267
|
+
}
|
|
268
|
+
// 清理 indicatorLightOperator 订阅
|
|
269
|
+
if (this.indicatorLightSubscription) {
|
|
270
|
+
this.indicatorLightSubscription.unsubscribe();
|
|
271
|
+
}
|
|
272
|
+
// 清理图形元素(释放 SVG 内存)
|
|
273
|
+
if (this.graphStateElement) {
|
|
274
|
+
this.graphStateElement.dispose();
|
|
275
|
+
}
|
|
276
|
+
// 清理文本元素
|
|
277
|
+
if (this.textStateElement) {
|
|
278
|
+
// TextStateElement 可能也需要 dispose,暂时先清理引用
|
|
279
|
+
this.textStateElement = null;
|
|
280
|
+
}
|
|
281
|
+
}
|
|
243
282
|
checkState() {
|
|
244
283
|
if (!this.model.states) {
|
|
245
284
|
throw new Error('The switch indicator light\'s states is undefined.');
|
|
@@ -1 +1 @@
|
|
|
1
|
-
[{"__symbolic":"module","version":4,"metadata":{"SwitchIndicatorLightElement":{"__symbolic":"class","extends":{"__symbolic":"reference","module":"../base/conditional-enable-element","name":"ConditionalEnableElement","line":
|
|
1
|
+
[{"__symbolic":"module","version":4,"metadata":{"SwitchIndicatorLightElement":{"__symbolic":"class","extends":{"__symbolic":"reference","module":"../base/conditional-enable-element","name":"ConditionalEnableElement","line":33,"character":49},"members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"error","message":"Could not resolve type","line":52,"character":25,"context":{"typeName":"HTMLElement"}},{"__symbolic":"reference","module":"@angular/core","name":"Injector","line":53,"character":18},{"__symbolic":"reference","module":"ngx-bootstrap/modal","name":"BsModalService","line":54,"character":39},{"__symbolic":"reference","module":"../../communication","name":"VariableCommunicator","line":55,"character":30},{"__symbolic":"reference","module":"../../config","name":"GraphStore","line":56,"character":37},{"__symbolic":"reference","module":"../../service","name":"PermissionChecker","line":57,"character":27},{"__symbolic":"reference","module":"../../service","name":"OperationRecordService","line":58,"character":49},{"__symbolic":"reference","module":"../../security","name":"SecurityChecker","line":59,"character":42},{"__symbolic":"reference","module":"../../config","name":"VariableStore","line":60,"character":23},{"__symbolic":"reference","module":"../../localization","name":"Localization","line":61,"character":22},{"__symbolic":"reference","name":"string"},{"__symbolic":"reference","module":"../../service","name":"TextLibraryService","line":63,"character":46},{"__symbolic":"reference","module":"../../service","name":"LanguageService","line":64,"character":43},{"__symbolic":"reference","module":"../../gui/gui-context","name":"GuiContext","line":65,"character":38}]}],"handleMouseUp":[{"__symbolic":"method"}],"initOnDocMouseUpEvent":[{"__symbolic":"method"}],"checkElementPassword":[{"__symbolic":"method"}],"doSwitchOperator":[{"__symbolic":"method"}],"writeValue":[{"__symbolic":"method"}],"initSwitchOperator":[{"__symbolic":"method"}],"initIndictorLightOperator":[{"__symbolic":"method"}],"currentStateIdChange":[{"__symbolic":"method"}],"switchToState":[{"__symbolic":"method"}],"initGraphAndText":[{"__symbolic":"method"}],"dispose":[{"__symbolic":"method"}],"checkState":[{"__symbolic":"method"}]}}}}]
|
|
@@ -16,6 +16,9 @@ export declare class VideoElement extends ConditionalDisplayElement {
|
|
|
16
16
|
private videoId;
|
|
17
17
|
private isShow;
|
|
18
18
|
private videoPlayer;
|
|
19
|
+
private refreshTimer;
|
|
20
|
+
private isFullscreen;
|
|
21
|
+
private videoUrl;
|
|
19
22
|
constructor(element: HTMLElement, injector: Injector, permissionChecker: PermissionChecker, variableCommunicator: VariableCommunicator, variableStore: VariableStore, videoService: VideoService, guiSize: Size, svgRootClass: string, signalRAppId: string);
|
|
20
23
|
dispose(): void;
|
|
21
24
|
hide(): void;
|
|
@@ -24,4 +27,5 @@ export declare class VideoElement extends ConditionalDisplayElement {
|
|
|
24
27
|
private initVideo;
|
|
25
28
|
private addVideoAddressToolTip;
|
|
26
29
|
private setAndroidVideo;
|
|
30
|
+
private setIosVideo;
|
|
27
31
|
}
|