@flexem/fc-gui 3.0.0-alpha.123 → 3.0.0-alpha.125
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 +2860 -1471
- 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/communication/variable/variable-communicator.d.ts +2 -0
- package/config/alarm/get-alarms-args.d.ts +4 -1
- package/config/alarm/get-alarms-args.js +5 -1
- package/config/alarm/get-alarms-args.metadata.json +1 -1
- package/config/history-data/get-history-data-args.d.ts +14 -3
- package/config/history-data/get-history-data-args.js +5 -3
- package/config/history-data/get-history-data-args.metadata.json +1 -1
- package/elements/alarm/alarm-element.d.ts +28 -3
- package/elements/alarm/alarm-element.js +124 -14
- package/elements/alarm/alarm-element.metadata.json +1 -1
- package/elements/base/readable-element.js +14 -5
- package/elements/base/state-control-element.js +2 -2
- package/elements/historical-curve/historical-curve.element.d.ts +24 -2
- package/elements/historical-curve/historical-curve.element.js +180 -34
- package/elements/historical-curve/historical-curve.element.metadata.json +1 -1
- package/elements/main-element.js +12 -8
- package/elements/main-element.metadata.json +1 -1
- package/elements/numerical-display/numerical-display-element.d.ts +9 -2
- package/elements/numerical-display/numerical-display-element.js +22 -2
- package/elements/numerical-display/numerical-display-element.metadata.json +1 -1
- package/elements/scroll-alarm/scroll-alarm-element.d.ts +54 -0
- package/elements/scroll-alarm/scroll-alarm-element.js +517 -0
- package/elements/scroll-alarm/scroll-alarm-element.metadata.json +1 -0
- package/elements/shared/graph/graph-state-element.d.ts +0 -1
- package/elements/shared/graph/graph-state-element.js +1 -30
- 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 +20 -0
- package/elements/shared/text/text-element.metadata.json +1 -1
- package/elements/shared/text/text-state-element.d.ts +25 -1
- package/elements/shared/text/text-state-element.js +100 -2
- 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 +101 -3
- package/elements/static-elements/hyperlink-element.metadata.json +1 -1
- package/elements/static-elements/text-element.d.ts +23 -2
- package/elements/static-elements/text-element.js +96 -3
- package/elements/static-elements/text-element.metadata.json +1 -1
- package/elements/switch-indicator-light/switch-indicator-light-element.d.ts +10 -4
- package/elements/switch-indicator-light/switch-indicator-light-element.js +26 -25
- package/elements/switch-indicator-light/switch-indicator-light-element.metadata.json +1 -1
- package/elements/view-operation/view-operation.element.d.ts +23 -2
- package/elements/view-operation/view-operation.element.js +95 -1
- package/elements/view-operation/view-operation.element.metadata.json +1 -1
- package/gui/gui-context.d.ts +11 -2
- package/gui/gui-view.js +20 -4
- package/modal/write-value/write-value-modal-args.d.ts +3 -1
- package/modal/write-value/write-value-modal-args.js +2 -1
- package/modal/write-value/write-value-modal-args.metadata.json +1 -1
- package/modal/write-value/write-value-modal.component.d.ts +4 -0
- package/modal/write-value/write-value-modal.component.js +25 -0
- package/modal/write-value/write-value-modal.component.metadata.json +1 -1
- package/model/base/font-setting-model.d.ts +6 -0
- package/model/base/font-setting-model.metadata.json +1 -1
- package/model/historical-curve/historical-curve.data-settings.d.ts +18 -1
- package/model/historical-curve/historical-curve.data-settings.metadata.json +1 -1
- 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 +15 -0
- package/remote/communication/variable/remote-variable-communicator.js +76 -2
- package/remote/communication/variable/remote-variable-communicator.metadata.json +1 -1
- package/service/index.d.ts +3 -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/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/shared/gui-consts.d.ts +1 -0
- package/shared/gui-consts.js +2 -1
- package/shared/gui-consts.metadata.json +1 -1
package/public_api.js
CHANGED
|
@@ -20,6 +20,7 @@ export declare class RemoteVariableCommunicator implements VariableCommunicator
|
|
|
20
20
|
private variableStatesToBeClosed;
|
|
21
21
|
private alarmObservers;
|
|
22
22
|
private alarmChangedSubscription;
|
|
23
|
+
private systemVariableHandlers;
|
|
23
24
|
constructor(remoteVariableProtocol: RemoteVariableProtocol, logger: LoggerService);
|
|
24
25
|
private doAlarmChanged;
|
|
25
26
|
private doVariableValuesChanged;
|
|
@@ -33,5 +34,19 @@ export declare class RemoteVariableCommunicator implements VariableCommunicator
|
|
|
33
34
|
write(variableName: string, value: any): Observable<VariableValue>;
|
|
34
35
|
writeWordByBit(variableName: string, index: number, value: number): Observable<VariableValue>;
|
|
35
36
|
subscribeUserDeviceAlarms(appId?: string): Observable<any[]>;
|
|
37
|
+
/**
|
|
38
|
+
* 注册系统变量处理器
|
|
39
|
+
* @param variableName 变量名(如"当前语种ID")
|
|
40
|
+
* @param getValue 获取值的函数
|
|
41
|
+
* @param setValue 设置值的函数
|
|
42
|
+
*/
|
|
43
|
+
registerSystemVariableHandler(variableName: string, getValue: () => Promise<any>, setValue: (value: any) => Promise<void>): void;
|
|
44
|
+
/**
|
|
45
|
+
* 通知系统变量值变化
|
|
46
|
+
* 用于在系统变量值改变时通知所有订阅者
|
|
47
|
+
* @param variableName 变量名
|
|
48
|
+
* @param value 新值
|
|
49
|
+
*/
|
|
50
|
+
notifySystemVariableChange(variableName: string, value: any): void;
|
|
36
51
|
dispose(): void;
|
|
37
52
|
}
|
|
@@ -11,6 +11,8 @@ export class RemoteVariableCommunicator {
|
|
|
11
11
|
this.variableStateObservers = new Map();
|
|
12
12
|
this.variableStateCache = new Map();
|
|
13
13
|
this.alarmObservers = [];
|
|
14
|
+
// 系统变量处理器
|
|
15
|
+
this.systemVariableHandlers = new Map();
|
|
14
16
|
this.variableValueCache = new StringifyingMap(k => JSON.stringify(k));
|
|
15
17
|
this.connectedSubscription = this.remoteVariableProtocol.connected.subscribe(() => {
|
|
16
18
|
const variableNamesToStart = [];
|
|
@@ -175,7 +177,33 @@ export class RemoteVariableCommunicator {
|
|
|
175
177
|
}
|
|
176
178
|
}
|
|
177
179
|
});
|
|
178
|
-
|
|
180
|
+
// 过滤掉系统变量,它们不需要通过SignalR订阅
|
|
181
|
+
const normalVariables = variablesToStart.filter(v => !this.systemVariableHandlers.has(v));
|
|
182
|
+
const systemVariables = variablesToStart.filter(v => this.systemVariableHandlers.has(v));
|
|
183
|
+
// 处理系统变量的初始值
|
|
184
|
+
systemVariables.forEach(variableName => {
|
|
185
|
+
const handler = this.systemVariableHandlers.get(variableName);
|
|
186
|
+
if (handler && handler.getValue) {
|
|
187
|
+
void handler.getValue().then(value => {
|
|
188
|
+
const variableValue = {
|
|
189
|
+
variableName: variableName,
|
|
190
|
+
value: value,
|
|
191
|
+
state: 1 // Normal state
|
|
192
|
+
};
|
|
193
|
+
this.variableValueCache.set(variableName, variableValue);
|
|
194
|
+
if (this.observers.has(variableName)) {
|
|
195
|
+
each(this.observers.get(variableName), ob => {
|
|
196
|
+
ob.next([variableValue]);
|
|
197
|
+
});
|
|
198
|
+
}
|
|
199
|
+
}).catch(error => {
|
|
200
|
+
if (this.logger) {
|
|
201
|
+
this.logger.error(`[RemoteVariableCommunicator] Failed to get system variable "${variableName}" value:`, error);
|
|
202
|
+
}
|
|
203
|
+
});
|
|
204
|
+
}
|
|
205
|
+
});
|
|
206
|
+
variablesToStart = uniq(normalVariables);
|
|
179
207
|
if (variablesToStart && variablesToStart.length > 0) {
|
|
180
208
|
if (!this.variablesToBeOpened) {
|
|
181
209
|
this.variablesToBeOpened = [];
|
|
@@ -220,8 +248,24 @@ export class RemoteVariableCommunicator {
|
|
|
220
248
|
}
|
|
221
249
|
write(variableName, value) {
|
|
222
250
|
if (!variableName) {
|
|
223
|
-
return
|
|
251
|
+
return new Observable(observer => {
|
|
252
|
+
observer.complete();
|
|
253
|
+
});
|
|
224
254
|
}
|
|
255
|
+
// 检查是否为系统变量
|
|
256
|
+
if (this.systemVariableHandlers.has(variableName)) {
|
|
257
|
+
const handler = this.systemVariableHandlers.get(variableName);
|
|
258
|
+
// 调用系统变量的setValue处理器
|
|
259
|
+
void handler.setValue(value).catch(error => {
|
|
260
|
+
if (this.logger) {
|
|
261
|
+
this.logger.error('[RemoteVariableCommunicator] Failed to set system variable value:', error);
|
|
262
|
+
}
|
|
263
|
+
});
|
|
264
|
+
return new Observable(__ => {
|
|
265
|
+
/* 系统变量通过自己的机制通知变化 */
|
|
266
|
+
});
|
|
267
|
+
}
|
|
268
|
+
// 普通变量通过SignalR写入
|
|
225
269
|
this.remoteVariableProtocol.writeVariable(variableName, value);
|
|
226
270
|
return new Observable(__ => {
|
|
227
271
|
/* do nothing right now, if want value change immediately, can use this code below:
|
|
@@ -247,6 +291,36 @@ export class RemoteVariableCommunicator {
|
|
|
247
291
|
};
|
|
248
292
|
});
|
|
249
293
|
}
|
|
294
|
+
/**
|
|
295
|
+
* 注册系统变量处理器
|
|
296
|
+
* @param variableName 变量名(如"当前语种ID")
|
|
297
|
+
* @param getValue 获取值的函数
|
|
298
|
+
* @param setValue 设置值的函数
|
|
299
|
+
*/
|
|
300
|
+
registerSystemVariableHandler(variableName, getValue, setValue) {
|
|
301
|
+
this.systemVariableHandlers.set(variableName, { getValue, setValue });
|
|
302
|
+
}
|
|
303
|
+
/**
|
|
304
|
+
* 通知系统变量值变化
|
|
305
|
+
* 用于在系统变量值改变时通知所有订阅者
|
|
306
|
+
* @param variableName 变量名
|
|
307
|
+
* @param value 新值
|
|
308
|
+
*/
|
|
309
|
+
notifySystemVariableChange(variableName, value) {
|
|
310
|
+
const variableValue = {
|
|
311
|
+
variableName: variableName,
|
|
312
|
+
value: value,
|
|
313
|
+
state: 1 // Normal state
|
|
314
|
+
};
|
|
315
|
+
// 更新缓存
|
|
316
|
+
this.variableValueCache.set(variableName, variableValue);
|
|
317
|
+
// 通知所有订阅者
|
|
318
|
+
if (this.observers.has(variableName)) {
|
|
319
|
+
each(this.observers.get(variableName), ob => {
|
|
320
|
+
ob.next([variableValue]);
|
|
321
|
+
});
|
|
322
|
+
}
|
|
323
|
+
}
|
|
250
324
|
dispose() {
|
|
251
325
|
// TODO调用所有的ob.complete()。
|
|
252
326
|
this.connectedSubscription.unsubscribe();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
[{"__symbolic":"module","version":4,"metadata":{"RemoteVariableCommunicator":{"__symbolic":"class","members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","module":"./remote-variable-protocol","name":"RemoteVariableProtocol","line":
|
|
1
|
+
[{"__symbolic":"module","version":4,"metadata":{"RemoteVariableCommunicator":{"__symbolic":"class","members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","module":"./remote-variable-protocol","name":"RemoteVariableProtocol","line":34,"character":57},{"__symbolic":"reference","module":"../../../logger","name":"LoggerService","line":34,"character":106}]}],"doAlarmChanged":[{"__symbolic":"method"}],"doVariableValuesChanged":[{"__symbolic":"method"}],"doVirtualDeviceStatesChanged":[{"__symbolic":"method"}],"doVariableStatesChanged":[{"__symbolic":"method"}],"subscribeVariableStates":[{"__symbolic":"method"}],"subscribeVariableState":[{"__symbolic":"method"}],"requestVirtualDeviceState":[{"__symbolic":"method"}],"openVariables":[{"__symbolic":"method"}],"openVariable":[{"__symbolic":"method"}],"write":[{"__symbolic":"method"}],"writeWordByBit":[{"__symbolic":"method"}],"subscribeUserDeviceAlarms":[{"__symbolic":"method"}],"registerSystemVariableHandler":[{"__symbolic":"method"}],"notifySystemVariableChange":[{"__symbolic":"method"}],"dispose":[{"__symbolic":"method"}]}}}}]
|
package/service/index.d.ts
CHANGED
|
@@ -3,3 +3,6 @@ export { PermissionChecker } from './permission-checker';
|
|
|
3
3
|
export { ReleasedVariableService } from './released-variable';
|
|
4
4
|
export * from './operation-record';
|
|
5
5
|
export * from './video';
|
|
6
|
+
export * from './text-library.service';
|
|
7
|
+
export * from './language.service';
|
|
8
|
+
export * from './system-text-library.service';
|
package/service/index.js
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './system-text-library.service';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
[{"__symbolic":"module","version":4,"metadata":{},"exports":[{"from":"./weather.service","export":["WeatherService"]},{"from":"./permission-checker","export":["PermissionChecker"]},{"from":"./released-variable","export":["ReleasedVariableService"]},{"from":"./operation-record"},{"from":"./video"}]}]
|
|
1
|
+
[{"__symbolic":"module","version":4,"metadata":{},"exports":[{"from":"./weather.service","export":["WeatherService"]},{"from":"./permission-checker","export":["PermissionChecker"]},{"from":"./released-variable","export":["ReleasedVariableService"]},{"from":"./operation-record"},{"from":"./video"},{"from":"./text-library.service"},{"from":"./language.service"},{"from":"./system-text-library.service"}]}]
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { Observable } from 'rxjs';
|
|
2
|
+
/**
|
|
3
|
+
* 语种 DTO 接口 - 与 Designer 中的 API 返回格式保持一致
|
|
4
|
+
*/
|
|
5
|
+
export interface ConfigureLanguageDto {
|
|
6
|
+
name: string;
|
|
7
|
+
displayName: string;
|
|
8
|
+
icon: string;
|
|
9
|
+
isDefault: boolean;
|
|
10
|
+
isSystem: boolean;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* 语种服务接口
|
|
14
|
+
* 提供语种的查询能力,供 GUI 组件使用
|
|
15
|
+
*/
|
|
16
|
+
export interface LanguageService {
|
|
17
|
+
/**
|
|
18
|
+
* 获取所有语种
|
|
19
|
+
*/
|
|
20
|
+
getLanguages(): ConfigureLanguageDto[];
|
|
21
|
+
/**
|
|
22
|
+
* 获取默认语言代码
|
|
23
|
+
*/
|
|
24
|
+
getDefaultLanguage(): string;
|
|
25
|
+
/**
|
|
26
|
+
* 根据语种代码获取语种信息
|
|
27
|
+
*/
|
|
28
|
+
getLanguageByCode(code: string): ConfigureLanguageDto | null;
|
|
29
|
+
/**
|
|
30
|
+
* 检查是否有缓存数据
|
|
31
|
+
*/
|
|
32
|
+
hasCache(): boolean;
|
|
33
|
+
/**
|
|
34
|
+
* 缓存更新事件 (可选)
|
|
35
|
+
*/
|
|
36
|
+
readonly cacheUpdated?: Observable<void>;
|
|
37
|
+
}
|
|
File without changes
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
[{"__symbolic":"module","version":4,"metadata":{"ConfigureLanguageDto":{"__symbolic":"interface"},"LanguageService":{"__symbolic":"interface"}}}]
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
import { Observable } from 'rxjs';
|
|
2
|
+
/**
|
|
3
|
+
* 系统文本条目接口
|
|
4
|
+
*/
|
|
5
|
+
export interface SystemTextEntry {
|
|
6
|
+
key: string;
|
|
7
|
+
value: string;
|
|
8
|
+
referenceLocation: string;
|
|
9
|
+
isKeyReadOnly: boolean;
|
|
10
|
+
cultures: {
|
|
11
|
+
[key: string]: string;
|
|
12
|
+
};
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* 系统文本库缓存数据接口
|
|
16
|
+
*/
|
|
17
|
+
export interface SystemTextLibraryCacheData {
|
|
18
|
+
id: number;
|
|
19
|
+
name: string;
|
|
20
|
+
systemType: string;
|
|
21
|
+
data: SystemTextEntry[];
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* 系统文本库类型常量
|
|
25
|
+
*/
|
|
26
|
+
export declare const SYSTEM_TEXT_LIBRARY_TYPES: {
|
|
27
|
+
COMPONENT_BUILTIN: string;
|
|
28
|
+
};
|
|
29
|
+
/**
|
|
30
|
+
* 告警表表头 key 常量
|
|
31
|
+
*/
|
|
32
|
+
export declare const ALARM_TABLE_HEADER_KEYS: {
|
|
33
|
+
ALARM_NAME: string;
|
|
34
|
+
ALARM_MESSAGE: string;
|
|
35
|
+
ALARM_LEVEL: string;
|
|
36
|
+
TIME: string;
|
|
37
|
+
};
|
|
38
|
+
/**
|
|
39
|
+
* 时间段 key 常量(用于告警表和历史曲线下拉选择)
|
|
40
|
+
* 对应 localization 中的: lastThirtyMinutes, lastOneHour, lastEightHour, lastTwentyFourHours, lastSevenDays, lastThirtyDays, lastOneYear
|
|
41
|
+
*/
|
|
42
|
+
export declare const TIME_PERIOD_KEYS: {
|
|
43
|
+
LAST_THIRTY_MINUTES: string;
|
|
44
|
+
LAST_ONE_HOUR: string;
|
|
45
|
+
LAST_EIGHT_HOURS: string;
|
|
46
|
+
LAST_TWENTY_FOUR_HOURS: string;
|
|
47
|
+
LAST_SEVEN_DAYS: string;
|
|
48
|
+
LAST_THIRTY_DAYS: string;
|
|
49
|
+
LAST_ONE_YEAR: string;
|
|
50
|
+
};
|
|
51
|
+
/**
|
|
52
|
+
* 系统文本库服务接口
|
|
53
|
+
* 提供系统文本库的查询能力,供 GUI 组件使用
|
|
54
|
+
*/
|
|
55
|
+
export interface SystemTextLibraryService {
|
|
56
|
+
/**
|
|
57
|
+
* 根据 systemType 获取系统文本库
|
|
58
|
+
*/
|
|
59
|
+
getSystemTextLibrary(systemType: string): SystemTextLibraryCacheData | null;
|
|
60
|
+
/**
|
|
61
|
+
* 根据 systemType 和 key 获取系统文本条目
|
|
62
|
+
*/
|
|
63
|
+
getSystemTextEntry(systemType: string, entryKey: string): SystemTextEntry | null;
|
|
64
|
+
/**
|
|
65
|
+
* 根据 systemType、key 和语言获取系统文本值
|
|
66
|
+
*/
|
|
67
|
+
getSystemTextValue(systemType: string, entryKey: string, culture?: string): string | null;
|
|
68
|
+
/**
|
|
69
|
+
* 检查系统文本库缓存是否存在
|
|
70
|
+
*/
|
|
71
|
+
hasSystemTextLibraryCache(systemType: string): boolean;
|
|
72
|
+
/**
|
|
73
|
+
* 缓存更新事件 (可选)
|
|
74
|
+
*/
|
|
75
|
+
readonly cacheUpdated?: Observable<void>;
|
|
76
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 系统文本库类型常量
|
|
3
|
+
*/
|
|
4
|
+
export const SYSTEM_TEXT_LIBRARY_TYPES = {
|
|
5
|
+
COMPONENT_BUILTIN: 'ComponentBuiltIn'
|
|
6
|
+
};
|
|
7
|
+
/**
|
|
8
|
+
* 告警表表头 key 常量
|
|
9
|
+
*/
|
|
10
|
+
export const ALARM_TABLE_HEADER_KEYS = {
|
|
11
|
+
ALARM_NAME: 'AlarmTable.Header.AlarmName',
|
|
12
|
+
ALARM_MESSAGE: 'AlarmTable.Header.AlarmMessage',
|
|
13
|
+
ALARM_LEVEL: 'AlarmTable.Header.AlarmLevel',
|
|
14
|
+
TIME: 'AlarmTable.Header.Time'
|
|
15
|
+
};
|
|
16
|
+
/**
|
|
17
|
+
* 时间段 key 常量(用于告警表和历史曲线下拉选择)
|
|
18
|
+
* 对应 localization 中的: lastThirtyMinutes, lastOneHour, lastEightHour, lastTwentyFourHours, lastSevenDays, lastThirtyDays, lastOneYear
|
|
19
|
+
*/
|
|
20
|
+
export const TIME_PERIOD_KEYS = {
|
|
21
|
+
LAST_THIRTY_MINUTES: 'HistoricalCurve.TimeFilter.Last30Minutes',
|
|
22
|
+
LAST_ONE_HOUR: 'HistoricalCurve.TimeFilter.Last1Hour',
|
|
23
|
+
LAST_EIGHT_HOURS: 'HistoricalCurve.TimeFilter.Last8Hours',
|
|
24
|
+
LAST_TWENTY_FOUR_HOURS: 'HistoricalCurve.TimeFilter.Last24Hours',
|
|
25
|
+
LAST_SEVEN_DAYS: 'HistoricalCurve.TimeFilter.Last7Days',
|
|
26
|
+
LAST_THIRTY_DAYS: 'HistoricalCurve.TimeFilter.Last30Days',
|
|
27
|
+
LAST_ONE_YEAR: 'HistoricalCurve.TimeFilter.Last1Year'
|
|
28
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
[{"__symbolic":"module","version":4,"metadata":{"SystemTextEntry":{"__symbolic":"interface"},"SystemTextLibraryCacheData":{"__symbolic":"interface"},"SYSTEM_TEXT_LIBRARY_TYPES":{"COMPONENT_BUILTIN":"ComponentBuiltIn"},"ALARM_TABLE_HEADER_KEYS":{"ALARM_NAME":"AlarmTable.Header.AlarmName","ALARM_MESSAGE":"AlarmTable.Header.AlarmMessage","ALARM_LEVEL":"AlarmTable.Header.AlarmLevel","TIME":"AlarmTable.Header.Time"},"TIME_PERIOD_KEYS":{"LAST_THIRTY_MINUTES":"HistoricalCurve.TimeFilter.Last30Minutes","LAST_ONE_HOUR":"HistoricalCurve.TimeFilter.Last1Hour","LAST_EIGHT_HOURS":"HistoricalCurve.TimeFilter.Last8Hours","LAST_TWENTY_FOUR_HOURS":"HistoricalCurve.TimeFilter.Last24Hours","LAST_SEVEN_DAYS":"HistoricalCurve.TimeFilter.Last7Days","LAST_THIRTY_DAYS":"HistoricalCurve.TimeFilter.Last30Days","LAST_ONE_YEAR":"HistoricalCurve.TimeFilter.Last1Year"},"SystemTextLibraryService":{"__symbolic":"interface"}}}]
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { Observable } from 'rxjs';
|
|
2
|
+
/**
|
|
3
|
+
* 文本条目接口
|
|
4
|
+
*/
|
|
5
|
+
export interface TextEntry {
|
|
6
|
+
key: string;
|
|
7
|
+
value: string;
|
|
8
|
+
cultures: {
|
|
9
|
+
[key: string]: string;
|
|
10
|
+
};
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* 文本库缓存数据接口
|
|
14
|
+
*/
|
|
15
|
+
export interface TextLibraryCacheData {
|
|
16
|
+
id: number;
|
|
17
|
+
name: string;
|
|
18
|
+
data: TextEntry[];
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* 文本库服务接口
|
|
22
|
+
* 提供文本库的查询能力,供 GUI 组件使用
|
|
23
|
+
*/
|
|
24
|
+
export interface TextLibraryService {
|
|
25
|
+
/**
|
|
26
|
+
* 获取所有文本库
|
|
27
|
+
*/
|
|
28
|
+
getAllTextLibraries(): TextLibraryCacheData[];
|
|
29
|
+
/**
|
|
30
|
+
* 根据ID获取文本库
|
|
31
|
+
*/
|
|
32
|
+
getTextLibraryById(id: number): TextLibraryCacheData | null;
|
|
33
|
+
/**
|
|
34
|
+
* 根据文本库ID和条目key获取文本条目
|
|
35
|
+
*/
|
|
36
|
+
getTextEntry(textLibraryId: number, entryKey: string): TextEntry | null;
|
|
37
|
+
/**
|
|
38
|
+
* 根据文本库ID、条目key和语言获取文本值
|
|
39
|
+
*/
|
|
40
|
+
getTextValue(textLibraryId: number, entryKey: string, culture?: string): string | null;
|
|
41
|
+
/**
|
|
42
|
+
* 检查是否有缓存数据
|
|
43
|
+
*/
|
|
44
|
+
hasCache(): boolean;
|
|
45
|
+
/**
|
|
46
|
+
* 缓存更新事件 (可选)
|
|
47
|
+
*/
|
|
48
|
+
readonly cacheUpdated?: Observable<void>;
|
|
49
|
+
}
|
|
File without changes
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
[{"__symbolic":"module","version":4,"metadata":{"TextEntry":{"__symbolic":"interface"},"TextLibraryCacheData":{"__symbolic":"interface"},"TextLibraryService":{"__symbolic":"interface"}}}]
|
package/shared/gui-consts.d.ts
CHANGED
package/shared/gui-consts.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
[{"__symbolic":"module","version":4,"metadata":{"GuiConsts":{"__symbolic":"class","statics":{"components":{"imageKey":"Image","numericalDisplayKey":"NumericalDisplay","textKey":"Text","hyperlinkKey":"Hyperlink","meterKey":"Meter","pipeKey":"Pipe","switchIndicatorLightKey":"SwitchIndicatorLight","barGraphKey":"BarGraph","toggleViewKey":"ToggleView","characterKey":"Character","straightLineKey":"StraightLine","polyLineKey":"PolyLine","rectangleKey":"Rectangle","sectorkey":"Sector","ellipseKey":"Ellipse","datetimeDisplayKey":"DatetimeDisplay","historicalCurveKey":"HistoricalCurve","ringGraphKey":"RingGraph","viewOperationElement":"ViewOperation","polygonKey":"Polygon","videokey":"Video","tableKey":"Table","weatherKey":"Weather","airQualityKey":"AirQualityIndex","alarmKey":"Alarm"}}}}}]
|
|
1
|
+
[{"__symbolic":"module","version":4,"metadata":{"GuiConsts":{"__symbolic":"class","statics":{"components":{"imageKey":"Image","numericalDisplayKey":"NumericalDisplay","textKey":"Text","hyperlinkKey":"Hyperlink","meterKey":"Meter","pipeKey":"Pipe","switchIndicatorLightKey":"SwitchIndicatorLight","barGraphKey":"BarGraph","toggleViewKey":"ToggleView","characterKey":"Character","straightLineKey":"StraightLine","polyLineKey":"PolyLine","rectangleKey":"Rectangle","sectorkey":"Sector","ellipseKey":"Ellipse","datetimeDisplayKey":"DatetimeDisplay","historicalCurveKey":"HistoricalCurve","ringGraphKey":"RingGraph","viewOperationElement":"ViewOperation","polygonKey":"Polygon","videokey":"Video","tableKey":"Table","weatherKey":"Weather","airQualityKey":"AirQualityIndex","alarmKey":"Alarm","scrollAlarmKey":"ScrollAlarm"}}}}}]
|