@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.
Files changed (193) hide show
  1. package/CHANGELOG.md +424 -1
  2. package/assets/img/black_first_page.png +0 -0
  3. package/assets/img/black_last_page.png +0 -0
  4. package/assets/img/black_next_page.png +0 -0
  5. package/assets/img/black_previous_page.png +0 -0
  6. package/assets/img/exclamation-outline-circle.png +0 -0
  7. package/bundles/@flexem/fc-gui.umd.js +39304 -34437
  8. package/bundles/@flexem/fc-gui.umd.js.map +1 -1
  9. package/bundles/@flexem/fc-gui.umd.min.js +5 -5
  10. package/bundles/@flexem/fc-gui.umd.min.js.map +1 -1
  11. package/communication/variable/variable-communicator.d.ts +5 -0
  12. package/communication/variable/variable-state-enum.d.ts +1 -0
  13. package/communication/variable/variable-state-enum.js +1 -0
  14. package/communication/variable/variable-state-enum.metadata.json +1 -1
  15. package/communication/variable/variable-value.d.ts +4 -1
  16. package/communication/variable/variable-value.js +4 -1
  17. package/communication/variable/variable-value.metadata.json +1 -1
  18. package/config/alarm/alarm.store.d.ts +6 -0
  19. package/config/alarm/alarm.store.js +0 -0
  20. package/config/alarm/alarm.store.metadata.json +1 -0
  21. package/config/alarm/get-alarms-args.d.ts +12 -0
  22. package/config/alarm/get-alarms-args.js +13 -0
  23. package/config/alarm/get-alarms-args.metadata.json +1 -0
  24. package/config/alarm/index.d.ts +2 -0
  25. package/config/alarm/index.js +1 -0
  26. package/config/alarm/index.metadata.json +1 -0
  27. package/config/config-store.d.ts +2 -0
  28. package/config/gui-feature-config.d.ts +3 -0
  29. package/config/gui-feature-config.js +3 -0
  30. package/config/gui-feature-config.metadata.json +1 -0
  31. package/config/index.d.ts +2 -0
  32. package/config/index.js +2 -0
  33. package/config/index.metadata.json +1 -1
  34. package/config/variable/variable-store.d.ts +1 -0
  35. package/elements/air-quality/air-quality-element.d.ts +31 -0
  36. package/elements/air-quality/air-quality-element.js +194 -0
  37. package/elements/air-quality/air-quality-element.metadata.json +1 -0
  38. package/elements/alarm/alarm-element.d.ts +69 -0
  39. package/elements/alarm/alarm-element.js +497 -0
  40. package/elements/alarm/alarm-element.metadata.json +1 -0
  41. package/elements/bar-graph-element.d.ts +10 -2
  42. package/elements/bar-graph-element.js +135 -5
  43. package/elements/bar-graph-element.metadata.json +1 -1
  44. package/elements/base/readable-element.d.ts +6 -1
  45. package/elements/base/readable-element.js +66 -2
  46. package/elements/base/readable-element.metadata.json +1 -1
  47. package/elements/base/state-control-element.d.ts +3 -1
  48. package/elements/base/state-control-element.js +21 -5
  49. package/elements/character-display/character-display-element.js +3 -2
  50. package/elements/character-display/character-display-element.metadata.json +1 -1
  51. package/elements/datetime-display/datetime-display-element.d.ts +1 -0
  52. package/elements/datetime-display/datetime-display-element.js +10 -2
  53. package/elements/datetime-display/datetime-display-element.metadata.json +1 -1
  54. package/elements/datetime-display/time-zone-select-json.d.ts +8 -0
  55. package/elements/datetime-display/time-zone-select-json.js +558 -0
  56. package/elements/historical-curve/historical-curve.element.d.ts +41 -3
  57. package/elements/historical-curve/historical-curve.element.js +662 -32
  58. package/elements/historical-curve/historical-curve.element.metadata.json +1 -1
  59. package/elements/main-element.d.ts +1 -0
  60. package/elements/main-element.js +75 -9
  61. package/elements/main-element.metadata.json +1 -1
  62. package/elements/meter-element.d.ts +7 -1
  63. package/elements/meter-element.js +76 -7
  64. package/elements/meter-element.metadata.json +1 -1
  65. package/elements/numerical-display/numerical-display-element.d.ts +22 -3
  66. package/elements/numerical-display/numerical-display-element.js +145 -12
  67. package/elements/numerical-display/numerical-display-element.metadata.json +1 -1
  68. package/elements/per-view-variable-communicator.d.ts +4 -0
  69. package/elements/per-view-variable-communicator.js +21 -1
  70. package/elements/per-view-variable-communicator.metadata.json +1 -1
  71. package/elements/ring-graph/ring-graph-element.d.ts +13 -1
  72. package/elements/ring-graph/ring-graph-element.js +164 -3
  73. package/elements/ring-graph/ring-graph-element.metadata.json +1 -1
  74. package/elements/scroll-alarm/scroll-alarm-element.d.ts +78 -0
  75. package/elements/scroll-alarm/scroll-alarm-element.js +843 -0
  76. package/elements/scroll-alarm/scroll-alarm-element.metadata.json +1 -0
  77. package/elements/shared/graph/graph-state-element.d.ts +1 -0
  78. package/elements/shared/graph/graph-state-element.js +30 -1
  79. package/elements/shared/graph/graph-state-element.metadata.json +1 -1
  80. package/elements/shared/text/text-element.d.ts +14 -0
  81. package/elements/shared/text/text-element.js +42 -4
  82. package/elements/shared/text/text-element.metadata.json +1 -1
  83. package/elements/shared/text/text-state-element.d.ts +39 -2
  84. package/elements/shared/text/text-state-element.js +242 -67
  85. package/elements/shared/text/text-state-element.metadata.json +1 -1
  86. package/elements/static-elements/hyperlink-element.d.ts +28 -2
  87. package/elements/static-elements/hyperlink-element.js +153 -4
  88. package/elements/static-elements/hyperlink-element.metadata.json +1 -1
  89. package/elements/static-elements/text-element.d.ts +28 -2
  90. package/elements/static-elements/text-element.js +162 -12
  91. package/elements/static-elements/text-element.metadata.json +1 -1
  92. package/elements/switch-indicator-light/bit-indicator-light-operator.d.ts +1 -0
  93. package/elements/switch-indicator-light/bit-indicator-light-operator.js +10 -3
  94. package/elements/switch-indicator-light/bit-indicator-light-operator.metadata.json +1 -1
  95. package/elements/switch-indicator-light/switch-indicator-light-element.d.ts +11 -2
  96. package/elements/switch-indicator-light/switch-indicator-light-element.js +70 -12
  97. package/elements/switch-indicator-light/switch-indicator-light-element.metadata.json +1 -1
  98. package/elements/switch-indicator-light/word-indicator-light-operator.d.ts +1 -0
  99. package/elements/switch-indicator-light/word-indicator-light-operator.js +10 -3
  100. package/elements/switch-indicator-light/word-indicator-light-operator.metadata.json +1 -1
  101. package/elements/video/video-element.d.ts +10 -0
  102. package/elements/video/video-element.js +119 -21
  103. package/elements/video/video-element.metadata.json +1 -1
  104. package/elements/view-operation/view-operation.element.d.ts +28 -2
  105. package/elements/view-operation/view-operation.element.js +163 -4
  106. package/elements/view-operation/view-operation.element.metadata.json +1 -1
  107. package/elements/weather/weater-element.js +0 -1
  108. package/gui/gui-context.d.ts +25 -2
  109. package/gui/gui-host.d.ts +1 -1
  110. package/gui/gui-view.d.ts +4 -1
  111. package/gui/gui-view.js +69 -8
  112. package/gui/gui-view.metadata.json +1 -1
  113. package/gui/gui.component.d.ts +3 -0
  114. package/gui/gui.component.js +15 -2
  115. package/gui/gui.component.metadata.json +1 -1
  116. package/localization/localization.service.d.ts +12 -0
  117. package/localization/localization.service.js +16 -4
  118. package/localization/localization.service.metadata.json +1 -1
  119. package/localization/localization.service.zh_CN.js +14 -2
  120. package/localization/localization.service.zh_CN.metadata.json +1 -1
  121. package/modal/write-character/write-character-modal.component.html +4 -4
  122. package/modal/write-character/write-character-modal.component.js +2 -2
  123. package/modal/write-character/write-character-modal.component.less +15 -0
  124. package/modal/write-character/write-character-modal.component.metadata.json +1 -1
  125. package/modal/write-value/write-value-modal-args.d.ts +5 -1
  126. package/modal/write-value/write-value-modal-args.js +3 -1
  127. package/modal/write-value/write-value-modal-args.metadata.json +1 -1
  128. package/modal/write-value/write-value-modal.component.d.ts +13 -7
  129. package/modal/write-value/write-value-modal.component.html +10 -5
  130. package/modal/write-value/write-value-modal.component.js +95 -20
  131. package/modal/write-value/write-value-modal.component.less +16 -1
  132. package/modal/write-value/write-value-modal.component.metadata.json +1 -1
  133. package/model/air-quality/air-quality-info.d.ts +23 -0
  134. package/model/air-quality/air-quality-info.js +4 -0
  135. package/model/air-quality/air-quality-info.metadata.json +1 -0
  136. package/model/air-quality/air-quality.model.d.ts +7 -0
  137. package/model/air-quality/air-quality.model.js +0 -0
  138. package/model/air-quality/air-quality.model.metadata.json +1 -0
  139. package/model/alarm/alarm.model.d.ts +13 -0
  140. package/model/alarm/alarm.model.js +0 -0
  141. package/model/alarm/alarm.model.metadata.json +1 -0
  142. package/model/bar-graph/bar-graph.d.ts +4 -0
  143. package/model/base/font-setting-model.d.ts +22 -1
  144. package/model/base/font-setting-model.metadata.json +1 -1
  145. package/model/base/readable-model.d.ts +4 -0
  146. package/model/datetime-display/datetime-display.d.ts +1 -0
  147. package/model/historical-curve/historical-curve-axis-settings.d.ts +11 -0
  148. package/model/historical-curve/historical-curve-axis-settings.js +5 -0
  149. package/model/historical-curve/historical-curve-axis-settings.metadata.json +1 -1
  150. package/model/historical-curve/historical-curve-chanel.model.d.ts +8 -0
  151. package/model/meter/meter.d.ts +4 -0
  152. package/model/numerical-display/numerical-operation.d.ts +10 -2
  153. package/model/ring-graph/ring-graph.model.d.ts +8 -0
  154. package/model/scroll-alarm/scroll-alarm.model.d.ts +21 -0
  155. package/model/scroll-alarm/scroll-alarm.model.js +0 -0
  156. package/model/scroll-alarm/scroll-alarm.model.metadata.json +1 -0
  157. package/model/shared/state/state.d.ts +1 -0
  158. package/model/shared/state/state.js +1 -0
  159. package/model/shared/state/state.metadata.json +1 -1
  160. package/model/shared/text/font.d.ts +1 -1
  161. package/model/shared/text/text.d.ts +3 -0
  162. package/model/switch-indicator-light/switch-indicator-light.d.ts +2 -0
  163. package/model/view-operation/view-operation-element.model.d.ts +7 -1
  164. package/package.json +1 -1
  165. package/public_api.js +1 -0
  166. package/remote/communication/variable/remote-variable-communicator.d.ts +30 -0
  167. package/remote/communication/variable/remote-variable-communicator.js +193 -3
  168. package/remote/communication/variable/remote-variable-communicator.metadata.json +1 -1
  169. package/remote/communication/variable/remote-variable-protocol.d.ts +8 -0
  170. package/service/index.d.ts +4 -0
  171. package/service/index.js +1 -0
  172. package/service/index.metadata.json +1 -1
  173. package/service/language.service.d.ts +37 -0
  174. package/service/language.service.js +0 -0
  175. package/service/language.service.metadata.json +1 -0
  176. package/service/released-variable/index.d.ts +1 -0
  177. package/service/released-variable/index.js +0 -0
  178. package/service/released-variable/index.metadata.json +1 -0
  179. package/service/released-variable/released-variable.service.d.ts +4 -0
  180. package/service/released-variable/released-variable.service.js +0 -0
  181. package/service/released-variable/released-variable.service.metadata.json +1 -0
  182. package/service/system-text-library.service.d.ts +77 -0
  183. package/service/system-text-library.service.js +29 -0
  184. package/service/system-text-library.service.metadata.json +1 -0
  185. package/service/text-library.service.d.ts +49 -0
  186. package/service/text-library.service.js +0 -0
  187. package/service/text-library.service.metadata.json +1 -0
  188. package/service/weather.service.d.ts +1 -0
  189. package/shared/gui-consts.d.ts +3 -0
  190. package/shared/gui-consts.js +3 -0
  191. package/shared/gui-consts.metadata.json +1 -1
  192. package/utils/data-type/fbox-data-type.service.js +40 -0
  193. package/utils/numerical-operation.service.js +28 -4
@@ -1,14 +1,40 @@
1
- import { PermissionChecker } from '../../service';
1
+ import { PermissionChecker, TextLibraryService, LanguageService } from '../../service';
2
2
  import { VariableCommunicator } from '../../communication';
3
3
  import { ConditionalDynamicDisplayElement } from '../base/conditional-dynamic-display-element';
4
4
  import { GraphStore, VariableStore } from '../../config';
5
5
  import { LoggerService } from '../../logger';
6
6
  import { Injector } from '@angular/core';
7
7
  import { HyperlinkModel } from '../../model/hyperlink/hyperlink.model';
8
+ import { GuiContext } from '../../gui/gui-context';
8
9
  export declare class HyperlinkElement extends ConditionalDynamicDisplayElement {
9
10
  private readonly graphStore;
11
+ private readonly textLibraryService?;
12
+ private readonly languageService?;
13
+ private readonly guiContext?;
10
14
  protected readonly model: HyperlinkModel;
11
15
  protected readonly logger: LoggerService;
12
- constructor(element: HTMLElement, injector: Injector, permissionChecker: PermissionChecker, variableCommunicator: VariableCommunicator, variableStore: VariableStore, graphStore: GraphStore, signalRAppId: string);
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);
19
+ dispose(): void;
20
+ /**
21
+ * 订阅语种变化事件
22
+ * 当设备的语种ID改变时,重新渲染文本
23
+ */
24
+ private subscribeLanguageChange;
25
+ /**
26
+ * 重新渲染文本
27
+ */
28
+ private reRenderText;
13
29
  private initGraphAndText;
30
+ /**
31
+ * 获取当前语种的字体样式
32
+ */
33
+ private getFontStyle;
34
+ /**
35
+ * 获取显示文本
36
+ * 如果配置了文本库,则从文本库中获取对应语种的文本
37
+ * 否则返回默认文本
38
+ */
39
+ private getDisplayText;
14
40
  }
@@ -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
+ const displayText = this.getDisplayText();
60
+ const font = this.getFontStyle();
61
+ this.textElementModal.updateFont(font);
62
+ this.textElementModal.updateText(displayText);
63
+ }
25
64
  initGraphAndText() {
26
65
  this.rootElement.selectAll('*').remove();
27
66
  const size = this.model.size;
@@ -33,7 +72,39 @@ export class HyperlinkElement extends ConditionalDynamicDisplayElement {
33
72
  graphStateElement.switchToState(0);
34
73
  this.$element.prepend(graphStateElement.Element);
35
74
  }
36
- const font = {
75
+ const font = this.getFontStyle();
76
+ // 获取显示文本(支持文本库)
77
+ const displayText = this.getDisplayText();
78
+ this.textElementModal = new TextElementModal(displayText, font, width, height);
79
+ this.$element.append(this.textElementModal.Element);
80
+ }
81
+ /**
82
+ * 获取当前语种的字体样式
83
+ */
84
+ getFontStyle() {
85
+ const getTargetLanguage = () => {
86
+ var _a, _b, _c, _d, _e, _f;
87
+ 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;
88
+ const defaultLanguage = ((_d = this.languageService) === null || _d === void 0 ? void 0 : _d.getDefaultLanguage()) || 'zh-CN';
89
+ if (currentLanguageId === null || currentLanguageId === undefined) {
90
+ return defaultLanguage;
91
+ }
92
+ return ((_f = (_e = this.guiContext) === null || _e === void 0 ? void 0 : _e.getLanguageCultureById) === null || _f === void 0 ? void 0 : _f.call(_e, currentLanguageId)) || defaultLanguage;
93
+ };
94
+ const targetLanguage = getTargetLanguage();
95
+ if (this.model.fontStyleCultures && this.model.fontStyleCultures[targetLanguage]) {
96
+ const style = this.model.fontStyleCultures[targetLanguage];
97
+ return {
98
+ isUnderline: style.isUnderline,
99
+ isBold: this.isBold(style.fontStyle),
100
+ isItalic: this.isItalic(style.fontStyle),
101
+ fontSize: style.fontSize,
102
+ fontFamily: this.fontFamily(style.fontStyle),
103
+ color: style.fontColor,
104
+ textAlign: style.textAlign
105
+ };
106
+ }
107
+ return {
37
108
  isUnderline: this.model.isUnderline,
38
109
  isBold: this.isBold(this.model.font),
39
110
  isItalic: this.isItalic(this.model.font),
@@ -42,7 +113,85 @@ export class HyperlinkElement extends ConditionalDynamicDisplayElement {
42
113
  color: this.model.stroke,
43
114
  textAlign: this.model.textAlign
44
115
  };
45
- const textElement = new TextElementModal(this.model.text, font, width, height);
46
- this.$element.append(textElement.Element);
116
+ }
117
+ /**
118
+ * 获取显示文本
119
+ * 如果配置了文本库,则从文本库中获取对应语种的文本
120
+ * 否则返回默认文本
121
+ */
122
+ getDisplayText() {
123
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j;
124
+ // 检查是否使用文本库
125
+ if (this.model.textLibrary && this.model.textLibrary.labelType === 'textLibrary') {
126
+ const textLibraryId = this.model.textLibrary.selectedTextLibraryItem;
127
+ const textItem = this.model.textLibrary.selectedTextItem;
128
+ if (textLibraryId && textItem && this.textLibraryService) {
129
+ // 获取文本库数据
130
+ const textLibraryData = this.textLibraryService.getTextLibraryById(typeof textLibraryId === 'string' ? parseInt(textLibraryId, 10) : textLibraryId);
131
+ if (textLibraryData && textLibraryData.data) {
132
+ // 查找对应的文本条目
133
+ const textEntry = textLibraryData.data.find(entry => entry.key === textItem.toString());
134
+ if (textEntry) {
135
+ // 获取当前语种ID
136
+ 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;
137
+ // 确定要使用的语种代码(culture)
138
+ let targetLanguage;
139
+ const defaultLanguage = ((_d = this.languageService) === null || _d === void 0 ? void 0 : _d.getDefaultLanguage()) || 'zh-CN';
140
+ if (currentLanguageId === null || currentLanguageId === undefined) {
141
+ // 设备未设置当前语种,使用默认语种
142
+ targetLanguage = defaultLanguage;
143
+ }
144
+ else {
145
+ // 设备已设置当前语种,获取对应的语种代码
146
+ const currentLanguage = (_f = (_e = this.guiContext) === null || _e === void 0 ? void 0 : _e.getLanguageCultureById) === null || _f === void 0 ? void 0 : _f.call(_e, currentLanguageId);
147
+ if (currentLanguage) {
148
+ targetLanguage = currentLanguage;
149
+ }
150
+ else {
151
+ // 无法获取语种代码,使用默认语种
152
+ targetLanguage = defaultLanguage;
153
+ }
154
+ }
155
+ // 返回对应语种的文本
156
+ if (textEntry.cultures && textEntry.cultures[targetLanguage]) {
157
+ return textEntry.cultures[targetLanguage];
158
+ }
159
+ // 如果没有对应语种,返回空字符串
160
+ return '';
161
+ }
162
+ }
163
+ }
164
+ // 文本库配置但未找到数据,返回空字符串
165
+ return '';
166
+ }
167
+ // 处理自定义文本(支持多语种)
168
+ if (this.model.text || this.model.textCultures) {
169
+ // 获取目标语种(公共逻辑)
170
+ const getTargetLanguage = () => {
171
+ var _a, _b, _c, _d, _e, _f;
172
+ 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;
173
+ const defaultLanguage = ((_d = this.languageService) === null || _d === void 0 ? void 0 : _d.getDefaultLanguage()) || 'zh-CN';
174
+ if (currentLanguageId === null || currentLanguageId === undefined) {
175
+ return defaultLanguage;
176
+ }
177
+ return ((_f = (_e = this.guiContext) === null || _e === void 0 ? void 0 : _e.getLanguageCultureById) === null || _f === void 0 ? void 0 : _f.call(_e, currentLanguageId)) || defaultLanguage;
178
+ };
179
+ const language = ((_j = (_h = (_g = window.abp) === null || _g === void 0 ? void 0 : _g.localization) === null || _h === void 0 ? void 0 : _h.currentLanguage) === null || _j === void 0 ? void 0 : _j.name) || 'zh-Hans';
180
+ const isChinese = language === 'zh-Hans' || language === 'zh';
181
+ const fallback = isChinese ? '超链接' : 'Hyperlink';
182
+ // 新格式:textCultures 在顶层(与 text 字段并列)
183
+ if (this.model.textCultures && typeof this.model.textCultures === 'object') {
184
+ return this.model.textCultures[getTargetLanguage()] || fallback;
185
+ }
186
+ // 中间格式(兼容):text 为 { cultures: {...} }
187
+ if (typeof this.model.text === 'object' && this.model.text.cultures) {
188
+ return this.model.text.cultures[getTargetLanguage()] || fallback;
189
+ }
190
+ // 旧格式:字符串
191
+ if (typeof this.model.text === 'string') {
192
+ return this.model.text;
193
+ }
194
+ }
195
+ return '';
47
196
  }
48
197
  }
@@ -1 +1 @@
1
- [{"__symbolic":"module","version":4,"metadata":{"HyperlinkElement":{"__symbolic":"class","extends":{"__symbolic":"reference","module":"../base/conditional-dynamic-display-element","name":"ConditionalDynamicDisplayElement","line":12,"character":38},"members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"error","message":"Could not resolve type","line":17,"character":25,"context":{"typeName":"HTMLElement"}},{"__symbolic":"reference","module":"@angular/core","name":"Injector","line":17,"character":48},{"__symbolic":"reference","module":"../../service","name":"PermissionChecker","line":17,"character":77},{"__symbolic":"reference","module":"../../communication","name":"VariableCommunicator","line":18,"character":30},{"__symbolic":"reference","module":"../../config","name":"VariableStore","line":18,"character":67},{"__symbolic":"reference","module":"../../config","name":"GraphStore","line":18,"character":111},{"__symbolic":"reference","name":"string"}]}],"initGraphAndText":[{"__symbolic":"method"}]}}}}]
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"}],"getFontStyle":[{"__symbolic":"method"}],"getDisplayText":[{"__symbolic":"method"}]}}}}]
@@ -4,13 +4,39 @@ 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
- constructor(element: HTMLElement, injector: Injector, permissionChecker: PermissionChecker, variableCommunicator: VariableCommunicator, variableStore: VariableStore, graphStore: GraphStore, signalRAppId: string);
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
+ private getFontStyle;
33
+ /**
34
+ * 获取显示文本
35
+ * 如果配置了文本库,则从文本库中获取对应语种的文本
36
+ * 如果是多语种自定义文本,则根据当前语种ID获取对应语种的文本
37
+ * 否则返回默认文本
38
+ */
39
+ private getDisplayText;
14
40
  private handleTextValue;
15
41
  private initGraph;
16
42
  }
@@ -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;
@@ -17,17 +20,13 @@ export class TextElement extends ConditionalDynamicDisplayElement {
17
20
  graphStateElement.switchToState(0);
18
21
  this.$element.prepend(graphStateElement.Element);
19
22
  }
20
- const font = {
21
- isUnderline: this.model.isUnderline,
22
- isBold: this.isBold(this.model.font),
23
- isItalic: this.isItalic(this.model.font),
24
- fontSize: this.model.fontSize,
25
- fontFamily: this.fontFamily(this.model.font),
26
- color: this.model.stroke,
27
- textAlign: this.model.textAlign
28
- };
29
- const textElement = new TextElementModal(this.model.text, font, width, height);
30
- this.$element.append(textElement.Element);
23
+ const font = this.getFontStyle();
24
+ // 获取显示文本(支持文本库)
25
+ const displayText = this.getDisplayText();
26
+ this.textElementModal = new TextElementModal(displayText, font, width, height);
27
+ this.$element.append(this.textElementModal.Element);
28
+ // 订阅语种变化
29
+ this.subscribeLanguageChange();
31
30
  }
32
31
  else {
33
32
  this.handleTextValue();
@@ -37,10 +36,161 @@ export class TextElement extends ConditionalDynamicDisplayElement {
37
36
  }
38
37
  }
39
38
  dispose() {
39
+ // 取消语种变化订阅
40
+ if (this.languageChangeSubscription) {
41
+ this.languageChangeSubscription.unsubscribe();
42
+ this.languageChangeSubscription = undefined;
43
+ }
40
44
  if (this.$element) {
41
45
  this.$element.remove();
42
46
  }
43
47
  }
48
+ /**
49
+ * 订阅语种变化事件
50
+ * 当设备的语种ID改变时,重新渲染文本
51
+ */
52
+ subscribeLanguageChange() {
53
+ if (this.guiContext && this.guiContext.languageChanged$) {
54
+ this.languageChangeSubscription = this.guiContext.languageChanged$.subscribe(() => {
55
+ // 重新渲染文本
56
+ this.reRenderText();
57
+ });
58
+ }
59
+ }
60
+ /**
61
+ * 重新渲染文本
62
+ */
63
+ reRenderText() {
64
+ if (!this.textElementModal || !this.model.size) {
65
+ return;
66
+ }
67
+ // 获取新的显示文本和样式
68
+ const displayText = this.getDisplayText();
69
+ const font = this.getFontStyle();
70
+ // 更新样式和文本内容
71
+ this.textElementModal.updateFont(font);
72
+ this.textElementModal.updateText(displayText);
73
+ }
74
+ /**
75
+ * 获取当前语种的字体样式
76
+ */
77
+ getFontStyle() {
78
+ // 获取目标语种
79
+ const getTargetLanguage = () => {
80
+ var _a, _b, _c, _d, _e, _f;
81
+ 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;
82
+ const defaultLanguage = ((_d = this.languageService) === null || _d === void 0 ? void 0 : _d.getDefaultLanguage()) || 'zh-CN';
83
+ if (currentLanguageId === null || currentLanguageId === undefined) {
84
+ return defaultLanguage;
85
+ }
86
+ return ((_f = (_e = this.guiContext) === null || _e === void 0 ? void 0 : _e.getLanguageCultureById) === null || _f === void 0 ? void 0 : _f.call(_e, currentLanguageId)) || defaultLanguage;
87
+ };
88
+ const targetLanguage = getTargetLanguage();
89
+ // 如果有多语种样式配置,优先使用
90
+ if (this.model.fontStyleCultures && this.model.fontStyleCultures[targetLanguage]) {
91
+ const style = this.model.fontStyleCultures[targetLanguage];
92
+ return {
93
+ isUnderline: style.isUnderline,
94
+ isBold: this.isBold(style.fontStyle),
95
+ isItalic: this.isItalic(style.fontStyle),
96
+ fontSize: style.fontSize,
97
+ fontFamily: this.fontFamily(style.fontStyle),
98
+ color: style.fontColor,
99
+ textAlign: style.textAlign
100
+ };
101
+ }
102
+ // 回退到全局样式
103
+ return {
104
+ isUnderline: this.model.isUnderline,
105
+ isBold: this.isBold(this.model.font),
106
+ isItalic: this.isItalic(this.model.font),
107
+ fontSize: this.model.fontSize,
108
+ fontFamily: this.fontFamily(this.model.font),
109
+ color: this.model.stroke,
110
+ textAlign: this.model.textAlign
111
+ };
112
+ }
113
+ /**
114
+ * 获取显示文本
115
+ * 如果配置了文本库,则从文本库中获取对应语种的文本
116
+ * 如果是多语种自定义文本,则根据当前语种ID获取对应语种的文本
117
+ * 否则返回默认文本
118
+ */
119
+ getDisplayText() {
120
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j;
121
+ // 检查是否使用文本库
122
+ if (this.model.textLibrary && this.model.textLibrary.labelType === 'textLibrary') {
123
+ const textLibraryId = this.model.textLibrary.selectedTextLibraryItem;
124
+ const textItem = this.model.textLibrary.selectedTextItem;
125
+ if (textLibraryId && textItem && this.textLibraryService) {
126
+ // 获取文本库数据
127
+ const textLibraryData = this.textLibraryService.getTextLibraryById(typeof textLibraryId === 'string' ? parseInt(textLibraryId, 10) : textLibraryId);
128
+ if (textLibraryData && textLibraryData.data) {
129
+ // 查找对应的文本条目
130
+ const textEntry = textLibraryData.data.find(entry => entry.key === textItem.toString());
131
+ if (textEntry) {
132
+ // 获取当前语种ID
133
+ 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;
134
+ // 确定要使用的语种代码(culture)
135
+ let targetLanguage;
136
+ const defaultLanguage = ((_d = this.languageService) === null || _d === void 0 ? void 0 : _d.getDefaultLanguage()) || 'zh-CN';
137
+ if (currentLanguageId === null || currentLanguageId === undefined) {
138
+ // 设备未设置当前语种,使用默认语种
139
+ targetLanguage = defaultLanguage;
140
+ }
141
+ else {
142
+ // 设备已设置当前语种,获取对应的语种代码
143
+ const currentLanguage = (_f = (_e = this.guiContext) === null || _e === void 0 ? void 0 : _e.getLanguageCultureById) === null || _f === void 0 ? void 0 : _f.call(_e, currentLanguageId);
144
+ if (currentLanguage) {
145
+ targetLanguage = currentLanguage;
146
+ }
147
+ else {
148
+ // 无法获取语种代码,使用默认语种
149
+ targetLanguage = defaultLanguage;
150
+ }
151
+ }
152
+ // 返回对应语种的文本
153
+ if (textEntry.cultures && textEntry.cultures[targetLanguage]) {
154
+ return textEntry.cultures[targetLanguage];
155
+ }
156
+ // 如果没有对应语种,返回空字符串
157
+ return '';
158
+ }
159
+ }
160
+ }
161
+ // 文本库配置但未找到数据,返回空字符串
162
+ return '';
163
+ }
164
+ // 处理自定义文本(支持多语种)
165
+ if (this.model.text || this.model.textCultures) {
166
+ // 获取目标语种(公共逻辑)
167
+ const getTargetLanguage = () => {
168
+ var _a, _b, _c, _d, _e, _f;
169
+ 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;
170
+ const defaultLanguage = ((_d = this.languageService) === null || _d === void 0 ? void 0 : _d.getDefaultLanguage()) || 'zh-CN';
171
+ if (currentLanguageId === null || currentLanguageId === undefined) {
172
+ return defaultLanguage;
173
+ }
174
+ return ((_f = (_e = this.guiContext) === null || _e === void 0 ? void 0 : _e.getLanguageCultureById) === null || _f === void 0 ? void 0 : _f.call(_e, currentLanguageId)) || defaultLanguage;
175
+ };
176
+ const language = ((_j = (_h = (_g = window.abp) === null || _g === void 0 ? void 0 : _g.localization) === null || _h === void 0 ? void 0 : _h.currentLanguage) === null || _j === void 0 ? void 0 : _j.name) || 'zh-Hans';
177
+ const isChinese = language === 'zh-Hans' || language === 'zh';
178
+ const fallback = isChinese ? '文本' : 'Text';
179
+ // 新格式:textCultures 在顶层(与 text 字段并列)
180
+ if (this.model.textCultures && typeof this.model.textCultures === 'object') {
181
+ return this.model.textCultures[getTargetLanguage()] || fallback;
182
+ }
183
+ // 中间格式(兼容):text 为 { cultures: {...} }
184
+ if (typeof this.model.text === 'object' && this.model.text.cultures) {
185
+ return this.model.text.cultures[getTargetLanguage()] || fallback;
186
+ }
187
+ // 旧格式:字符串
188
+ if (typeof this.model.text === 'string') {
189
+ return this.model.text;
190
+ }
191
+ }
192
+ return '';
193
+ }
44
194
  handleTextValue() {
45
195
  const allText = this.$element.find('text');
46
196
  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":10,"character":33},"members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"error","message":"Could not resolve type","line":15,"character":25,"context":{"typeName":"HTMLElement"}},{"__symbolic":"reference","module":"@angular/core","name":"Injector","line":15,"character":48},{"__symbolic":"reference","module":"../../service","name":"PermissionChecker","line":15,"character":77},{"__symbolic":"reference","module":"../../communication","name":"VariableCommunicator","line":16,"character":30},{"__symbolic":"reference","module":"../../config","name":"VariableStore","line":16,"character":67},{"__symbolic":"reference","module":"../../config","name":"GraphStore","line":16,"character":111},{"__symbolic":"reference","name":"string"}]}],"dispose":[{"__symbolic":"method"}],"handleTextValue":[{"__symbolic":"method"}],"initGraph":[{"__symbolic":"method"}]}}}}]
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"}],"getFontStyle":[{"__symbolic":"method"}],"getDisplayText":[{"__symbolic":"method"}],"handleTextValue":[{"__symbolic":"method"}],"initGraph":[{"__symbolic":"method"}]}}}}]
@@ -11,6 +11,7 @@ export declare class BitIndicatorLightOperator implements IndicatorLightOperator
11
11
  private binary;
12
12
  currentStateId?: number;
13
13
  currentStateIdChanged: EventEmitter<CurrentStateIdValue>;
14
+ private valueSubscription;
14
15
  private offStateId?;
15
16
  private onStateId?;
16
17
  get variableName(): string;
@@ -6,6 +6,7 @@ import { CurrentStateIdValue } from './current-stateId-value';
6
6
  import { Binary } from '../../model/shared/binary';
7
7
  import { VariableUtil } from '../../utils/variable-util';
8
8
  import { VariableDefinition } from '../../communication/variable/variable-definition';
9
+ import { GuiFeatureConfig } from '../../config';
9
10
  export class BitIndicatorLightOperator {
10
11
  constructor(settings, states, variableCommunicator, variableStore) {
11
12
  this.settings = settings;
@@ -48,15 +49,21 @@ export class BitIndicatorLightOperator {
48
49
  if (variableStete.state === VariableStateEnum.Normal) {
49
50
  this.requestCurrentSateIdValue(this.variableCommunicator, appId);
50
51
  }
52
+ else if (GuiFeatureConfig.isOfflineDisplayEnabled && variableStete.state === VariableStateEnum.Offline && !this.valueSubscription) {
53
+ this.requestCurrentSateIdValue(this.variableCommunicator, appId);
54
+ }
51
55
  else {
52
- this.currentStateIdChanged.emit(new CurrentStateIdValue(new VariableState(this.variableName, variableStete.state)));
56
+ this.currentStateIdChanged.emit(new CurrentStateIdValue(new VariableState(this.variableName, variableStete.state), this.currentStateId));
53
57
  }
54
58
  });
55
59
  }
56
60
  }
57
61
  requestCurrentSateIdValue(variableCommunicator, appId = '') {
58
- variableCommunicator.openVariable(this.variableName, appId).subscribe(value => {
59
- if (value.state === VariableStateEnum.DataNormal) {
62
+ if (this.valueSubscription) {
63
+ return;
64
+ }
65
+ this.valueSubscription = variableCommunicator.openVariable(this.variableName, appId).subscribe(value => {
66
+ if (value.state === VariableStateEnum.DataNormal || (GuiFeatureConfig.isOfflineDisplayEnabled && value.state === VariableStateEnum.Offline)) {
60
67
  if (this.settings.isBitwiseIndex) {
61
68
  const maxBitIndex = 31;
62
69
  this.binary = new Binary(value.value, maxBitIndex + 1);
@@ -1 +1 @@
1
- [{"__symbolic":"module","version":4,"metadata":{"BitIndicatorLightOperator":{"__symbolic":"class","members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","module":"../../model","name":"BitIndicatorLightSettings","line":26,"character":43},{"__symbolic":"reference","name":"Array","arguments":[{"__symbolic":"reference","module":"../../model","name":"SwitchIndicatorState","line":27,"character":16}]},{"__symbolic":"reference","module":"../../communication","name":"VariableCommunicator","line":28,"character":47},{"__symbolic":"reference","module":"../../config","name":"VariableStore","line":29,"character":40}]}],"requestData":[{"__symbolic":"method"}],"requestCurrentSateIdValue":[{"__symbolic":"method"}]}}}}]
1
+ [{"__symbolic":"module","version":4,"metadata":{"BitIndicatorLightOperator":{"__symbolic":"class","members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","module":"../../model","name":"BitIndicatorLightSettings","line":28,"character":43},{"__symbolic":"reference","name":"Array","arguments":[{"__symbolic":"reference","module":"../../model","name":"SwitchIndicatorState","line":29,"character":16}]},{"__symbolic":"reference","module":"../../communication","name":"VariableCommunicator","line":30,"character":47},{"__symbolic":"reference","module":"../../config","name":"VariableStore","line":31,"character":40}]}],"requestData":[{"__symbolic":"method"}],"requestCurrentSateIdValue":[{"__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
- constructor(element: HTMLElement, injector: Injector, modalService: BsModalService, variableCommunicator: VariableCommunicator, graphStore: GraphStore, permissionChecker: PermissionChecker, operationRecordService: OperationRecordService, securityChecker: SecurityChecker, variableStore: VariableStore, localization: Localization, signalRAppId: string);
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
  }