@flexem/fc-gui 3.0.0-alpha.18 → 3.0.0-alpha.181

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 (194) hide show
  1. package/CHANGELOG.md +419 -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 +37413 -32291
  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.js +3 -4
  36. package/elements/alarm/alarm-element.d.ts +89 -0
  37. package/elements/alarm/alarm-element.js +739 -0
  38. package/elements/alarm/alarm-element.metadata.json +1 -0
  39. package/elements/bar-graph-element.d.ts +10 -2
  40. package/elements/bar-graph-element.js +135 -5
  41. package/elements/bar-graph-element.metadata.json +1 -1
  42. package/elements/base/readable-element.d.ts +6 -1
  43. package/elements/base/readable-element.js +69 -2
  44. package/elements/base/readable-element.metadata.json +1 -1
  45. package/elements/base/state-control-element.d.ts +13 -1
  46. package/elements/base/state-control-element.js +42 -8
  47. package/elements/base/state-control-element.metadata.json +1 -1
  48. package/elements/character-display/character-display-element.d.ts +9 -0
  49. package/elements/character-display/character-display-element.js +18 -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 +45 -3
  57. package/elements/historical-curve/historical-curve.element.js +722 -45
  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 +71 -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 +31 -3
  66. package/elements/numerical-display/numerical-display-element.js +160 -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 +79 -0
  75. package/elements/scroll-alarm/scroll-alarm-element.js +845 -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 +20 -2
  96. package/elements/switch-indicator-light/switch-indicator-light-element.js +85 -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 +139 -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 +165 -5
  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 +19 -2
  111. package/gui/gui-view.js +147 -12
  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 +11 -0
  117. package/localization/localization.service.js +16 -5
  118. package/localization/localization.service.metadata.json +1 -1
  119. package/localization/localization.service.zh_CN.js +12 -1
  120. package/localization/localization.service.zh_CN.metadata.json +1 -1
  121. package/modal/write-character/write-character-modal.component.d.ts +3 -2
  122. package/modal/write-character/write-character-modal.component.html +4 -4
  123. package/modal/write-character/write-character-modal.component.js +7 -5
  124. package/modal/write-character/write-character-modal.component.less +15 -0
  125. package/modal/write-character/write-character-modal.component.metadata.json +1 -1
  126. package/modal/write-value/write-value-modal-args.d.ts +5 -1
  127. package/modal/write-value/write-value-modal-args.js +3 -1
  128. package/modal/write-value/write-value-modal-args.metadata.json +1 -1
  129. package/modal/write-value/write-value-modal.component.d.ts +15 -8
  130. package/modal/write-value/write-value-modal.component.html +10 -5
  131. package/modal/write-value/write-value-modal.component.js +99 -21
  132. package/modal/write-value/write-value-modal.component.less +16 -1
  133. package/modal/write-value/write-value-modal.component.metadata.json +1 -1
  134. package/model/alarm/alarm.model.d.ts +14 -0
  135. package/model/alarm/alarm.model.js +0 -0
  136. package/model/alarm/alarm.model.metadata.json +1 -0
  137. package/model/bar-graph/bar-graph.d.ts +4 -0
  138. package/model/base/font-setting-model.d.ts +22 -1
  139. package/model/base/font-setting-model.metadata.json +1 -1
  140. package/model/base/readable-model.d.ts +4 -0
  141. package/model/character-display/character-display.d.ts +1 -0
  142. package/model/datetime-display/datetime-display.d.ts +1 -0
  143. package/model/historical-curve/historical-curve-axis-settings.d.ts +11 -0
  144. package/model/historical-curve/historical-curve-axis-settings.js +5 -0
  145. package/model/historical-curve/historical-curve-axis-settings.metadata.json +1 -1
  146. package/model/historical-curve/historical-curve-chanel.model.d.ts +8 -0
  147. package/model/historical-curve/historical-curve.display-settings.d.ts +1 -0
  148. package/model/meter/meter.d.ts +4 -0
  149. package/model/numerical-display/numerical-display.d.ts +1 -0
  150. package/model/numerical-display/numerical-operation.d.ts +10 -2
  151. package/model/ring-graph/ring-graph.model.d.ts +8 -0
  152. package/model/scroll-alarm/scroll-alarm.model.d.ts +21 -0
  153. package/model/scroll-alarm/scroll-alarm.model.js +0 -0
  154. package/model/scroll-alarm/scroll-alarm.model.metadata.json +1 -0
  155. package/model/settings/popup/view-popup-location-type.d.ts +2 -1
  156. package/model/settings/popup/view-popup-location-type.js +1 -0
  157. package/model/settings/popup/view-popup-location-type.metadata.json +1 -1
  158. package/model/shared/state/state.d.ts +1 -0
  159. package/model/shared/state/state.js +1 -0
  160. package/model/shared/state/state.metadata.json +1 -1
  161. package/model/shared/text/font.d.ts +1 -1
  162. package/model/shared/text/text.d.ts +3 -0
  163. package/model/switch-indicator-light/switch-indicator-light.d.ts +3 -0
  164. package/model/view-operation/view-operation-element.model.d.ts +7 -1
  165. package/package.json +1 -1
  166. package/public_api.js +1 -0
  167. package/remote/communication/variable/remote-variable-communicator.d.ts +30 -0
  168. package/remote/communication/variable/remote-variable-communicator.js +193 -3
  169. package/remote/communication/variable/remote-variable-communicator.metadata.json +1 -1
  170. package/remote/communication/variable/remote-variable-protocol.d.ts +8 -0
  171. package/service/index.d.ts +4 -0
  172. package/service/index.js +1 -0
  173. package/service/index.metadata.json +1 -1
  174. package/service/language.service.d.ts +37 -0
  175. package/service/language.service.js +0 -0
  176. package/service/language.service.metadata.json +1 -0
  177. package/service/released-variable/index.d.ts +1 -0
  178. package/service/released-variable/index.js +0 -0
  179. package/service/released-variable/index.metadata.json +1 -0
  180. package/service/released-variable/released-variable.service.d.ts +4 -0
  181. package/service/released-variable/released-variable.service.js +0 -0
  182. package/service/released-variable/released-variable.service.metadata.json +1 -0
  183. package/service/system-text-library.service.d.ts +77 -0
  184. package/service/system-text-library.service.js +29 -0
  185. package/service/system-text-library.service.metadata.json +1 -0
  186. package/service/text-library.service.d.ts +49 -0
  187. package/service/text-library.service.js +0 -0
  188. package/service/text-library.service.metadata.json +1 -0
  189. package/shared/gui-consts.d.ts +2 -0
  190. package/shared/gui-consts.js +3 -1
  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
  194. package/view/popup-view.service.d.ts +1 -1
@@ -2,6 +2,7 @@ import { LOGGER_SERVICE_TOKEN } from '../../logger';
2
2
  import * as d3 from 'd3-selection';
3
3
  import { drag } from 'd3-drag';
4
4
  import { ViewOperationType } from '../../model';
5
+ import { TextElementModal } from '../shared/text/text-element';
5
6
  import { ConditionalEnableElement } from '../base/conditional-enable-element';
6
7
  import { GraphStateElement } from '../shared/graph/graph-state-element';
7
8
  import { AlertModalComponent } from '../../modal/alert/alert-modal.component';
@@ -9,7 +10,7 @@ import { ConfirmOperationModalComponent } from '../../modal/confirm-operation/co
9
10
  import { VerifyPasswordModalComponent } from '../../modal/verify-password/verify-password-modal.component';
10
11
  import { ViewService } from '../../view/view.service';
11
12
  export class ViewOperationElement extends ConditionalEnableElement {
12
- constructor(element, injector, modalService, variableCommunicator, variableStore, graphStore, permissionChecker, operationRecordService, securityChecker, localization, popupViewService, hostContainerId, el, signalRAppId) {
13
+ constructor(element, injector, modalService, variableCommunicator, variableStore, graphStore, permissionChecker, operationRecordService, securityChecker, localization, popupViewService, hostContainerId, el, signalRAppId, textLibraryService, languageService, guiContext) {
13
14
  super(element, permissionChecker, variableCommunicator, variableStore, localization, signalRAppId);
14
15
  this.modalService = modalService;
15
16
  this.graphStore = graphStore;
@@ -18,20 +19,27 @@ export class ViewOperationElement extends ConditionalEnableElement {
18
19
  this.popupViewService = popupViewService;
19
20
  this.hostContainerId = hostContainerId;
20
21
  this.el = el;
22
+ this.textLibraryService = textLibraryService;
23
+ this.languageService = languageService;
24
+ this.guiContext = guiContext;
21
25
  this.touchedScreenX = 0;
22
26
  this.touchedScreenY = 0;
23
27
  this.logger = injector.get(LOGGER_SERVICE_TOKEN);
24
28
  this.viewService = injector.get(ViewService);
25
29
  this.initElement();
30
+ this.subscribeLanguageChange();
26
31
  }
27
32
  initElement() {
28
33
  const width = this.model.size.width;
29
34
  const height = this.model.size.height;
35
+ // 在 initGraph 之前移除模板原有的 SVG <text>(改用 foreignObject 渲染,支持换行居中)
36
+ // 必须在 initGraph 前执行,否则会误删图形状态内部后续添加的文字节点
37
+ this.$element.find('text').remove();
30
38
  this.initGraph(width, height);
31
39
  this.rootElement.append('rect').attr('id', 'StateFrame').attr('width', width).attr('height', height).attr('fill', 'transparent');
32
- const $dateTimeText = this.$element.find('text').last();
33
- const fontStyle = this.model.label.font.fontStyle;
34
- $dateTimeText.css('font', fontStyle + ',msyh');
40
+ const font = this.getFontStyle();
41
+ this.textElementModal = new TextElementModal(this.getDisplayText(), font, width, height);
42
+ this.$element.append(this.textElementModal.Element);
35
43
  this.switchToState(0);
36
44
  this.rootElement.on('mousedown', () => {
37
45
  if (!this.isInitialized) {
@@ -169,7 +177,11 @@ export class ViewOperationElement extends ConditionalEnableElement {
169
177
  popView() {
170
178
  const viewIndex = this.model.viewIndex;
171
179
  if (null != viewIndex) {
172
- this.popupViewService.popView(viewIndex, this.hostContainerId, this.el).subscribe(() => this.recordViewOperation(), error => this.logger.error(`ToggleView(${viewIndex}) failed. ${error}`));
180
+ const triggerRect = this.$element[0].getBoundingClientRect();
181
+ this.popupViewService.popView(viewIndex, this.hostContainerId, this.el, triggerRect).subscribe(() => this.recordViewOperation(), error => this.logger.error(`ToggleView(${viewIndex}) failed. ${error}`));
182
+ $(`#${this.hostContainerId} video`)
183
+ .addClass('video-hidden')
184
+ .css('visibility', 'hidden');
173
185
  }
174
186
  else {
175
187
  this.logger.error('[GUI]Toggle View:invalid view index');
@@ -177,6 +189,11 @@ export class ViewOperationElement extends ConditionalEnableElement {
177
189
  }
178
190
  closeView() {
179
191
  this.popupViewService.closeView();
192
+ if ($(`#${this.hostContainerId} > svg > svg`).length === 0) {
193
+ $(`#${this.hostContainerId} .video-hidden`)
194
+ .removeClass('video-hidden')
195
+ .css('visibility', 'visible');
196
+ }
180
197
  this.recordViewOperation();
181
198
  }
182
199
  moveView(movementX, movementY) {
@@ -191,4 +208,147 @@ export class ViewOperationElement extends ConditionalEnableElement {
191
208
  this.operationRecordService.record({ operationDescription: this.model.operationDescription });
192
209
  }
193
210
  }
211
+ /**
212
+ * 订阅语种变化事件
213
+ */
214
+ subscribeLanguageChange() {
215
+ if (this.guiContext && this.guiContext.languageChanged$) {
216
+ this.languageChangeSubscription = this.guiContext.languageChanged$.subscribe(() => {
217
+ this.updateTextContent();
218
+ });
219
+ }
220
+ }
221
+ /**
222
+ * 获取当前语种的字体样式
223
+ */
224
+ getFontStyle() {
225
+ const getTargetLanguage = () => {
226
+ var _a, _b, _c, _d, _e, _f;
227
+ 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;
228
+ const defaultLanguage = ((_d = this.languageService) === null || _d === void 0 ? void 0 : _d.getDefaultLanguage()) || 'zh-CN';
229
+ if (currentLanguageId === null || currentLanguageId === undefined) {
230
+ return defaultLanguage;
231
+ }
232
+ return ((_f = (_e = this.guiContext) === null || _e === void 0 ? void 0 : _e.getLanguageCultureById) === null || _f === void 0 ? void 0 : _f.call(_e, currentLanguageId)) || defaultLanguage;
233
+ };
234
+ const targetLanguage = getTargetLanguage();
235
+ if (this.model.fontStyleCultures && this.model.fontStyleCultures[targetLanguage]) {
236
+ const style = this.model.fontStyleCultures[targetLanguage];
237
+ const fs = style.fontStyle || '';
238
+ const isBold = fs.indexOf('bold') !== -1;
239
+ const isItalic = fs.indexOf('Italic') !== -1;
240
+ const parts = fs.split(' ');
241
+ const familyIndex = (isBold ? 1 : 0) + (isItalic ? 1 : 0) + 1;
242
+ const fontFamily = parts.length > familyIndex ? parts[familyIndex] : null;
243
+ return {
244
+ isUnderline: style.isUnderline,
245
+ isBold,
246
+ isItalic,
247
+ fontSize: style.fontSize,
248
+ fontFamily: fontFamily || 'msyh',
249
+ color: style.color
250
+ };
251
+ }
252
+ return Object.assign(Object.assign({}, this.model.label.font), { fontFamily: this.model.label.font.fontFamily || 'msyh' });
253
+ }
254
+ /**
255
+ * 更新文本内容(支持文本库和语种切换)
256
+ */
257
+ updateTextContent() {
258
+ if (this.textElementModal) {
259
+ const font = this.getFontStyle();
260
+ this.textElementModal.updateFont(font);
261
+ this.textElementModal.updateText(this.getDisplayText());
262
+ }
263
+ }
264
+ /**
265
+ * 获取显示文本
266
+ */
267
+ getDisplayText() {
268
+ var _a, _b, _c, _d, _e, _f;
269
+ // 检查是否使用文本库
270
+ if (this.model.textLibrary && this.model.textLibrary.labelType === 'textLibrary') {
271
+ const textLibraryId = this.model.textLibrary.selectedTextLibraryItem;
272
+ const textItem = this.model.textLibrary.selectedTextItem;
273
+ if (textLibraryId && textItem && this.textLibraryService) {
274
+ // 获取文本库数据
275
+ const textLibraryData = this.textLibraryService.getTextLibraryById(typeof textLibraryId === 'string' ? parseInt(textLibraryId, 10) : textLibraryId);
276
+ if (textLibraryData && textLibraryData.data) {
277
+ // 查找对应的文本条目
278
+ const textEntry = textLibraryData.data.find(entry => entry.key === textItem.toString());
279
+ if (textEntry) {
280
+ // 获取当前语种ID
281
+ 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;
282
+ // 确定要使用的语种代码(culture)
283
+ let targetLanguage;
284
+ const defaultLanguage = ((_d = this.languageService) === null || _d === void 0 ? void 0 : _d.getDefaultLanguage()) || 'zh-CN';
285
+ if (currentLanguageId === null || currentLanguageId === undefined) {
286
+ // 设备未设置当前语种,使用默认语种
287
+ targetLanguage = defaultLanguage;
288
+ }
289
+ else {
290
+ // 设备已设置当前语种,获取对应的语种代码
291
+ const currentLanguage = (_f = (_e = this.guiContext) === null || _e === void 0 ? void 0 : _e.getLanguageCultureById) === null || _f === void 0 ? void 0 : _f.call(_e, currentLanguageId);
292
+ if (currentLanguage) {
293
+ targetLanguage = currentLanguage;
294
+ }
295
+ else {
296
+ // 无法获取语种代码,使用默认语种
297
+ targetLanguage = defaultLanguage;
298
+ }
299
+ }
300
+ // 返回对应语种的文本
301
+ if (textEntry.cultures && textEntry.cultures[targetLanguage]) {
302
+ return textEntry.cultures[targetLanguage];
303
+ }
304
+ // 如果没有对应语种,返回空字符串
305
+ return '';
306
+ }
307
+ }
308
+ }
309
+ // 文本库配置但未找到数据,返回空字符串
310
+ return '';
311
+ }
312
+ // 处理自定义文本(支持多语种)
313
+ if (this.model.label) {
314
+ // 获取目标语种(公共逻辑)
315
+ const getTargetLanguage = () => {
316
+ var _a, _b, _c, _d, _e, _f;
317
+ 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;
318
+ const defaultLanguage = ((_d = this.languageService) === null || _d === void 0 ? void 0 : _d.getDefaultLanguage()) || 'zh-CN';
319
+ if (currentLanguageId === null || currentLanguageId === undefined) {
320
+ return defaultLanguage;
321
+ }
322
+ return ((_f = (_e = this.guiContext) === null || _e === void 0 ? void 0 : _e.getLanguageCultureById) === null || _f === void 0 ? void 0 : _f.call(_e, currentLanguageId)) || defaultLanguage;
323
+ };
324
+ // 新格式:cultures 在 label 顶层
325
+ if (this.model.label.cultures && typeof this.model.label.cultures === 'object') {
326
+ return this.model.label.cultures[getTargetLanguage()] || '';
327
+ }
328
+ if (this.model.label.content) {
329
+ // 中间格式(兼容):content 为 { cultures: {...} }
330
+ if (typeof this.model.label.content === 'object' && this.model.label.content.cultures) {
331
+ return this.model.label.content.cultures[getTargetLanguage()] || '';
332
+ }
333
+ // 旧格式:字符串
334
+ if (typeof this.model.label.content === 'string') {
335
+ return this.model.label.content;
336
+ }
337
+ }
338
+ }
339
+ return '';
340
+ }
341
+ /**
342
+ * 释放资源
343
+ */
344
+ dispose() {
345
+ // 取消语种变化订阅
346
+ if (this.languageChangeSubscription) {
347
+ this.languageChangeSubscription.unsubscribe();
348
+ this.languageChangeSubscription = undefined;
349
+ }
350
+ if (this.$element) {
351
+ this.$element.remove();
352
+ }
353
+ }
194
354
  }
@@ -1 +1 @@
1
- [{"__symbolic":"module","version":4,"metadata":{"ViewOperationElement":{"__symbolic":"class","extends":{"__symbolic":"reference","module":"../base/conditional-enable-element","name":"ConditionalEnableElement","line":20,"character":42},"members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"error","message":"Could not resolve type","line":31,"character":25,"context":{"typeName":"HTMLElement"}},{"__symbolic":"reference","module":"@angular/core","name":"Injector","line":31,"character":48},{"__symbolic":"reference","module":"ngx-bootstrap/modal","name":"BsModalService","line":32,"character":39},{"__symbolic":"reference","module":"../../communication","name":"VariableCommunicator","line":33,"character":30},{"__symbolic":"reference","module":"../../config","name":"VariableStore","line":34,"character":23},{"__symbolic":"reference","module":"../../config","name":"GraphStore","line":35,"character":37},{"__symbolic":"reference","module":"../../service","name":"PermissionChecker","line":36,"character":27},{"__symbolic":"reference","module":"../../service","name":"OperationRecordService","line":37,"character":49},{"__symbolic":"reference","module":"../../security","name":"SecurityChecker","line":38,"character":42},{"__symbolic":"reference","module":"../../localization","name":"Localization","line":39,"character":22},{"__symbolic":"reference","module":"../../view/popup-view.service","name":"PopupViewService","line":40,"character":43},{"__symbolic":"reference","name":"string"},{"__symbolic":"reference","module":"@angular/core","name":"ElementRef","line":42,"character":29},{"__symbolic":"reference","name":"string"}]}],"initElement":[{"__symbolic":"method"}],"switchToState":[{"__symbolic":"method"}],"initGraph":[{"__symbolic":"method"}],"checkElementPassword":[{"__symbolic":"method"}],"executeViewOperation":[{"__symbolic":"method"}],"toggleView":[{"__symbolic":"method"}],"popView":[{"__symbolic":"method"}],"closeView":[{"__symbolic":"method"}],"moveView":[{"__symbolic":"method"}],"recordViewOperation":[{"__symbolic":"method"}]}}}}]
1
+ [{"__symbolic":"module","version":4,"metadata":{"ViewOperationElement":{"__symbolic":"class","extends":{"__symbolic":"reference","module":"../base/conditional-enable-element","name":"ConditionalEnableElement","line":23,"character":42},"members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"error","message":"Could not resolve type","line":36,"character":25,"context":{"typeName":"HTMLElement"}},{"__symbolic":"reference","module":"@angular/core","name":"Injector","line":36,"character":48},{"__symbolic":"reference","module":"ngx-bootstrap/modal","name":"BsModalService","line":37,"character":39},{"__symbolic":"reference","module":"../../communication","name":"VariableCommunicator","line":38,"character":30},{"__symbolic":"reference","module":"../../config","name":"VariableStore","line":39,"character":23},{"__symbolic":"reference","module":"../../config","name":"GraphStore","line":40,"character":37},{"__symbolic":"reference","module":"../../service","name":"PermissionChecker","line":41,"character":27},{"__symbolic":"reference","module":"../../service","name":"OperationRecordService","line":42,"character":49},{"__symbolic":"reference","module":"../../security","name":"SecurityChecker","line":43,"character":42},{"__symbolic":"reference","module":"../../localization","name":"Localization","line":44,"character":22},{"__symbolic":"reference","module":"../../view/popup-view.service","name":"PopupViewService","line":45,"character":43},{"__symbolic":"reference","name":"string"},{"__symbolic":"reference","module":"@angular/core","name":"ElementRef","line":47,"character":29},{"__symbolic":"reference","name":"string"},{"__symbolic":"reference","module":"../../service","name":"TextLibraryService","line":49,"character":46},{"__symbolic":"reference","module":"../../service","name":"LanguageService","line":50,"character":43},{"__symbolic":"reference","module":"../../gui/gui-context","name":"GuiContext","line":51,"character":38}]}],"initElement":[{"__symbolic":"method"}],"switchToState":[{"__symbolic":"method"}],"initGraph":[{"__symbolic":"method"}],"checkElementPassword":[{"__symbolic":"method"}],"executeViewOperation":[{"__symbolic":"method"}],"toggleView":[{"__symbolic":"method"}],"popView":[{"__symbolic":"method"}],"closeView":[{"__symbolic":"method"}],"moveView":[{"__symbolic":"method"}],"recordViewOperation":[{"__symbolic":"method"}],"subscribeLanguageChange":[{"__symbolic":"method"}],"getFontStyle":[{"__symbolic":"method"}],"updateTextContent":[{"__symbolic":"method"}],"getDisplayText":[{"__symbolic":"method"}],"dispose":[{"__symbolic":"method"}]}}}}]
@@ -45,7 +45,6 @@ export class WeatherElement extends ConditionalDisplayElement {
45
45
  }
46
46
  handleGettingAddress() {
47
47
  this.handleUnusualCommon(this.localization.weatherNotAvailable);
48
- setTimeout(() => this.initWeatherInfo(), 1000 * 60);
49
48
  }
50
49
  handleNoAddress() {
51
50
  this.handleUnusualCommon(this.localization.weatherNotAddress);
@@ -1,16 +1,39 @@
1
1
  import { ConfigStore } from '../config';
2
2
  import { VariableCommunicator } from '../communication';
3
3
  import { SecurityChecker } from '../security';
4
- import { VideoService, WeatherService, PermissionChecker, OperationRecordService } from '../service';
4
+ import { VideoService, WeatherService, PermissionChecker, OperationRecordService, ReleasedVariableService, TextLibraryService, LanguageService, SystemTextLibraryService } from '../service';
5
+ import { Subject } from 'rxjs';
5
6
  export interface GuiContext {
6
7
  readonly configStore: ConfigStore;
7
8
  readonly variableCommunicator: VariableCommunicator;
8
9
  readonly permissionChecker: PermissionChecker;
9
10
  readonly operationRecordService: OperationRecordService;
11
+ readonly releasedVariableService: ReleasedVariableService;
10
12
  readonly securityChecker: SecurityChecker;
11
13
  readonly videoService: VideoService;
12
14
  readonly weatherService: WeatherService;
15
+ readonly textLibraryService?: TextLibraryService;
16
+ readonly languageService?: LanguageService;
17
+ readonly systemTextLibraryService?: SystemTextLibraryService;
13
18
  readonly configureViewId?: number;
14
19
  readonly configureViewCode?: string;
15
- dispose(): any;
20
+ /**
21
+ * 模拟模式下由后端 GetVariablesForDesigner 查询出的"有效变量"名集合
22
+ * (IncludeCalculationVariable=true, HasRefVariable=true,即绑定了 manager 的变量)。
23
+ * 运行模式不填充,元件会回退到 variableStore.getAllVariableNames()。
24
+ */
25
+ readonly validVariableNames?: string[];
26
+ readonly languageChanged$?: Subject<number | null>;
27
+ getCurrentLanguageId?(): number | null;
28
+ getDefaultLanguageId?(): number;
29
+ getLanguageCultureById?(languageId: number | null): string | null;
30
+ updateCurrentLanguageId?(languageId: number | null): Promise<void>;
31
+ showCustomTimeRangeModal?(config: {
32
+ startTime?: Date;
33
+ endTime?: Date;
34
+ }): Promise<{
35
+ startTime: Date;
36
+ endTime: Date;
37
+ } | null>;
38
+ dispose(): void;
16
39
  }
package/gui/gui-host.d.ts CHANGED
@@ -13,7 +13,7 @@ export declare class GuiHost implements Disposable {
13
13
  readonly el: ElementRef;
14
14
  private isLoaded;
15
15
  private currentView;
16
- private currentViewIndex;
16
+ currentViewIndex: number;
17
17
  private containerEl;
18
18
  private currentViewSize;
19
19
  private currentViewReiszeMode;
package/gui/gui-view.d.ts CHANGED
@@ -12,6 +12,8 @@ export declare class GuiView implements PopupViewService {
12
12
  private readonly bsModalService;
13
13
  private readonly context;
14
14
  private readonly parentView?;
15
+ /** showShadow() 给阴影留白,内容整体右下偏移的量,"按钮附近"定位需要据此修正才能让可见内容与按钮对齐 */
16
+ private static readonly SHADOW_INSET;
15
17
  get element(): HTMLElement;
16
18
  get rawWidth(): number;
17
19
  get rawHeight(): number;
@@ -21,7 +23,10 @@ export declare class GuiView implements PopupViewService {
21
23
  private mainElement;
22
24
  private muskElement;
23
25
  private openVariableStatesSubscription;
24
- private openVariablesSubscription;
26
+ private requestVirtualDeviceState;
27
+ private virtualDeviceStatesChanged;
28
+ private openVariablesSubscriptions;
29
+ private openedVariableNamesForValues;
25
30
  private openedVariableNames;
26
31
  private perViewVariableCommunicator;
27
32
  private svgRootClass;
@@ -31,7 +36,19 @@ export declare class GuiView implements PopupViewService {
31
36
  resize(size: Size, resizeMode: ViewResizeMode, svgRootClass: string): void;
32
37
  load(config: ViewModel, guiOptions: GuiOptions): void;
33
38
  loadElementState(): void;
34
- popView(viewIndex: number, hostContainerId: string, el: ElementRef): Observable<void>;
39
+ popView(viewIndex: number, hostContainerId: string, el: ElementRef, triggerRect?: DOMRect): Observable<void>;
40
+ /**
41
+ * 把屏幕像素矩形(如按钮的 getBoundingClientRect)换算为当前画面 SVG 坐标系下的矩形。
42
+ * 用 getScreenCTM 而不是简单的宽高比换算,因为画面容器宽高比与 rawWidth/rawHeight 不一致时
43
+ * SVG 会按 preserveAspectRatio 留白(letterbox),线性比例换算会有偏差。
44
+ */
45
+ private toLocalRect;
46
+ /**
47
+ * 按钮附近:按钮与弹出画面之间留缝隙,两侧都放得下时默认放右侧,放不下时放在放得下的一侧;
48
+ * 竖直方向默认与按钮顶部对齐,下方放不下时改为与按钮底部对齐;
49
+ * 左右两侧都放不下(弹窗比画面还宽)时直接退化为画面居中,不再跟随按钮
50
+ */
51
+ private getNearButtonPosition;
35
52
  closeView(): void;
36
53
  moveView(movementX: number, movementY: number): void;
37
54
  showMusk(): void;
package/gui/gui-view.js CHANGED
@@ -2,13 +2,14 @@ import { LOGGER_SERVICE_TOKEN } from '../logger';
2
2
  import * as d3 from 'd3-selection';
3
3
  import { each, forEach } from 'lodash';
4
4
  import { map } from 'rxjs/operators';
5
- import { VariableStateEnum } from '../communication';
5
+ import { VariableStateEnum, VariableState } from '../communication';
6
6
  import { MainElement } from '../elements/main-element';
7
7
  import { PerViewVariableCommunicator } from '../elements/per-view-variable-communicator';
8
8
  import { ViewPopupBackdropType, ViewPopupLocationType } from '../model';
9
9
  import { ViewResizeMode, DisplayMode, GlobalSettings } from '../settings';
10
10
  import { ConfigIsEmptyError } from '../shared';
11
11
  import { Guid } from '../utils/guid';
12
+ import { GuiFeatureConfig } from '../config';
12
13
  export class GuiView {
13
14
  constructor(injector, bsModalService, context, parentView) {
14
15
  this.injector = injector;
@@ -16,6 +17,8 @@ export class GuiView {
16
17
  this.context = context;
17
18
  this.parentView = parentView;
18
19
  this.viewId = Guid.newGuid().toString('n');
20
+ this.openVariablesSubscriptions = [];
21
+ this.openedVariableNamesForValues = new Set();
19
22
  this.logger = injector.get(LOGGER_SERVICE_TOKEN);
20
23
  this.childViews = new Array();
21
24
  if (parentView) {
@@ -61,6 +64,7 @@ export class GuiView {
61
64
  this.logger.debug('[GUI] View loaded.');
62
65
  }
63
66
  loadElementState() {
67
+ var _a, _b, _c;
64
68
  if (!this.mainElement) {
65
69
  return;
66
70
  }
@@ -71,16 +75,64 @@ export class GuiView {
71
75
  if (this.openVariableStatesSubscription) {
72
76
  this.openVariableStatesSubscription.unsubscribe();
73
77
  }
78
+ this.openVariablesSubscriptions.forEach(s => s.unsubscribe());
79
+ this.openVariablesSubscriptions = [];
80
+ this.openedVariableNamesForValues.clear();
74
81
  this.openedVariableNames = this.mainElement.getVariableNames();
75
- if (this.openedVariableNames.length === 0) {
82
+ // 分离系统变量和普通变量
83
+ const systemVariables = [];
84
+ const normalVariablesForState = [];
85
+ this.openedVariableNames.forEach(variableName => {
86
+ if (variableName === '当前语种ID') {
87
+ // 系统变量直接订阅,不需要等待状态
88
+ systemVariables.push(variableName);
89
+ }
90
+ else {
91
+ normalVariablesForState.push(variableName);
92
+ }
93
+ });
94
+ // 立即订阅系统变量
95
+ if (systemVariables.length > 0) {
96
+ this.normalOpenedVariableNames(systemVariables);
97
+ }
98
+ if (normalVariablesForState.indexOf('设备状态') !== -1) {
99
+ if (this.requestVirtualDeviceState) {
100
+ this.requestVirtualDeviceState.unsubscribe();
101
+ }
102
+ if (this.requestVirtualDeviceState) {
103
+ this.requestVirtualDeviceState.unsubscribe();
104
+ }
105
+ this.normalOpenedVariableNames(['设备状态']);
106
+ this.requestVirtualDeviceState =
107
+ this.perViewVariableCommunicator.requestVirtualDeviceState().subscribe({
108
+ complete: () => { }
109
+ });
110
+ normalVariablesForState.splice(normalVariablesForState.indexOf('设备状态'), 1);
111
+ }
112
+ const validVariableNames = (_a = this.context.validVariableNames) !== null && _a !== void 0 ? _a : (_c = (_b = this.context.configStore.variableStore).getAllVariableNames) === null || _c === void 0 ? void 0 : _c.call(_b);
113
+ if (validVariableNames) {
114
+ const invalidVariables = normalVariablesForState.filter(name => !validVariableNames.includes(name));
115
+ if (invalidVariables.length > 0) {
116
+ const unbindStates = invalidVariables.map(name => new VariableState(name, VariableStateEnum.InvalidMonitor));
117
+ this.mainElement.reportVariableStates(unbindStates);
118
+ invalidVariables.forEach(name => {
119
+ const idx = normalVariablesForState.indexOf(name);
120
+ if (idx !== -1) {
121
+ normalVariablesForState.splice(idx, 1);
122
+ }
123
+ });
124
+ }
125
+ }
126
+ if (normalVariablesForState.length === 0) {
76
127
  return;
77
128
  }
78
129
  this.openVariableStatesSubscription =
79
- this.perViewVariableCommunicator.subscribeVariableStates(this.openedVariableNames).subscribe((states) => {
130
+ this.perViewVariableCommunicator.subscribeVariableStates(normalVariablesForState).subscribe((states) => {
80
131
  this.mainElement.reportVariableStates(states);
81
132
  const normalVariableNames = [];
82
133
  each(states, v => {
83
- if (v.state === VariableStateEnum.Normal && normalVariableNames.indexOf(v.variableName) === -1) {
134
+ if ((v.state === VariableStateEnum.Normal || (GuiFeatureConfig.isOfflineDisplayEnabled && v.state === VariableStateEnum.Offline))
135
+ && normalVariableNames.indexOf(v.variableName) === -1) {
84
136
  normalVariableNames.push(v.variableName);
85
137
  }
86
138
  });
@@ -89,7 +141,7 @@ export class GuiView {
89
141
  }
90
142
  });
91
143
  }
92
- popView(viewIndex, hostContainerId, el) {
144
+ popView(viewIndex, hostContainerId, el, triggerRect) {
93
145
  return this.context.configStore.viewStore.getViewConfig(viewIndex).pipe(map(view => {
94
146
  if (!view.config || !view.config.length) {
95
147
  throw new ConfigIsEmptyError();
@@ -110,6 +162,10 @@ export class GuiView {
110
162
  x = settings.popup.location.x;
111
163
  y = settings.popup.location.y;
112
164
  }
165
+ else if (settings.popup.locationType === ViewPopupLocationType.NearButton && triggerRect) {
166
+ const hasShadow = settings.popup.backdropType === ViewPopupBackdropType.Shadow && !this.isMobileMode;
167
+ ({ x, y } = this.getNearButtonPosition(popView, triggerRect, hasShadow));
168
+ }
113
169
  else {
114
170
  x = (this.rawWidth - popView.rawWidth) / 2;
115
171
  y = (this.rawHeight - popView.rawHeight) / 2;
@@ -129,6 +185,73 @@ export class GuiView {
129
185
  this.element.appendChild(popView.element);
130
186
  }));
131
187
  }
188
+ /**
189
+ * 把屏幕像素矩形(如按钮的 getBoundingClientRect)换算为当前画面 SVG 坐标系下的矩形。
190
+ * 用 getScreenCTM 而不是简单的宽高比换算,因为画面容器宽高比与 rawWidth/rawHeight 不一致时
191
+ * SVG 会按 preserveAspectRatio 留白(letterbox),线性比例换算会有偏差。
192
+ */
193
+ toLocalRect(rect) {
194
+ const svgRoot = this.element;
195
+ const ctm = svgRoot.getScreenCTM && svgRoot.getScreenCTM();
196
+ if (ctm) {
197
+ const inverse = ctm.inverse();
198
+ const toLocal = (clientX, clientY) => {
199
+ const pt = svgRoot.createSVGPoint();
200
+ pt.x = clientX;
201
+ pt.y = clientY;
202
+ return pt.matrixTransform(inverse);
203
+ };
204
+ const topLeft = toLocal(rect.left, rect.top);
205
+ const bottomRight = toLocal(rect.right, rect.bottom);
206
+ return {
207
+ x: topLeft.x,
208
+ y: topLeft.y,
209
+ width: bottomRight.x - topLeft.x,
210
+ height: bottomRight.y - topLeft.y
211
+ };
212
+ }
213
+ const viewRect = this.element.getBoundingClientRect();
214
+ const scaleX = viewRect.width ? this.rawWidth / viewRect.width : 1;
215
+ const scaleY = viewRect.height ? this.rawHeight / viewRect.height : 1;
216
+ return {
217
+ x: (rect.left - viewRect.left) * scaleX,
218
+ y: (rect.top - viewRect.top) * scaleY,
219
+ width: rect.width * scaleX,
220
+ height: rect.height * scaleY
221
+ };
222
+ }
223
+ /**
224
+ * 按钮附近:按钮与弹出画面之间留缝隙,两侧都放得下时默认放右侧,放不下时放在放得下的一侧;
225
+ * 竖直方向默认与按钮顶部对齐,下方放不下时改为与按钮底部对齐;
226
+ * 左右两侧都放不下(弹窗比画面还宽)时直接退化为画面居中,不再跟随按钮
227
+ */
228
+ getNearButtonPosition(popView, triggerRect, hasShadow) {
229
+ const gap = 20;
230
+ const { x: buttonX, y: buttonY, width: buttonWidth, height: buttonHeight } = this.toLocalRect(triggerRect);
231
+ const rightX = buttonX + buttonWidth + gap;
232
+ const leftX = buttonX - gap - popView.rawWidth;
233
+ const fitsRight = rightX + popView.rawWidth <= this.rawWidth;
234
+ const fitsLeft = leftX >= 0;
235
+ let x;
236
+ let y;
237
+ if (!fitsRight && !fitsLeft) {
238
+ x = (this.rawWidth - popView.rawWidth) / 2;
239
+ y = (this.rawHeight - popView.rawHeight) / 2;
240
+ }
241
+ else {
242
+ x = fitsRight ? rightX : leftX;
243
+ const fitsBelow = buttonY + popView.rawHeight <= this.rawHeight;
244
+ y = fitsBelow ? buttonY : buttonY + buttonHeight - popView.rawHeight;
245
+ if (hasShadow) {
246
+ // 阴影会把可见内容整体右下偏移 SHADOW_INSET,这里反向补偏移让可见内容而不是容器本身对齐按钮
247
+ x -= GuiView.SHADOW_INSET;
248
+ y -= GuiView.SHADOW_INSET;
249
+ }
250
+ }
251
+ x = Math.max(0, Math.min(x, this.rawWidth - popView.rawWidth));
252
+ y = Math.max(0, Math.min(y, this.rawHeight - popView.rawHeight));
253
+ return { x, y };
254
+ }
132
255
  closeView() {
133
256
  if (!this.parentView) {
134
257
  return;
@@ -166,10 +289,11 @@ export class GuiView {
166
289
  if (!container) {
167
290
  return;
168
291
  }
292
+ const inset = GuiView.SHADOW_INSET;
169
293
  container.setAttribute('filter', `url(#${filterId})`);
170
- container.setAttribute('x', '6');
171
- container.setAttribute('y', '6');
172
- $(this.element).children('g').attr('transform', 'matrix(1, 0, 0, 1, 6, 6)');
294
+ container.setAttribute('x', String(inset));
295
+ container.setAttribute('y', String(inset));
296
+ $(this.element).children('g').attr('transform', `matrix(1, 0, 0, 1, ${inset}, ${inset})`);
173
297
  }
174
298
  hideMusk() {
175
299
  if (this.muskElement) {
@@ -181,8 +305,14 @@ export class GuiView {
181
305
  if (this.openVariableStatesSubscription) {
182
306
  this.openVariableStatesSubscription.unsubscribe();
183
307
  }
184
- if (this.openVariablesSubscription) {
185
- this.openVariablesSubscription.unsubscribe();
308
+ if (this.requestVirtualDeviceState) {
309
+ this.requestVirtualDeviceState.unsubscribe();
310
+ }
311
+ if (this.virtualDeviceStatesChanged) {
312
+ this.virtualDeviceStatesChanged.unsubscribe();
313
+ }
314
+ if (this.openVariablesSubscriptions) {
315
+ this.openVariablesSubscriptions.forEach(s => s.unsubscribe());
186
316
  }
187
317
  if (this.perViewVariableCommunicator) {
188
318
  this.perViewVariableCommunicator.dispose();
@@ -196,9 +326,14 @@ export class GuiView {
196
326
  this.logger.debug('[GUI] View disposed.');
197
327
  }
198
328
  normalOpenedVariableNames(normalVariableNames) {
199
- if (normalVariableNames.length > 0) {
200
- this.openVariablesSubscription = this.perViewVariableCommunicator.openVariables(normalVariableNames, this.signalRAppId)
329
+ const newVariables = normalVariableNames.filter(v => !this.openedVariableNamesForValues.has(v));
330
+ if (newVariables.length > 0) {
331
+ newVariables.forEach(v => this.openedVariableNamesForValues.add(v));
332
+ const sub = this.perViewVariableCommunicator.openVariables(newVariables, this.signalRAppId)
201
333
  .subscribe(variableValues => this.mainElement.reportVariableValues(variableValues));
334
+ this.openVariablesSubscriptions.push(sub);
202
335
  }
203
336
  }
204
337
  }
338
+ /** showShadow() 给阴影留白,内容整体右下偏移的量,"按钮附近"定位需要据此修正才能让可见内容与按钮对齐 */
339
+ GuiView.SHADOW_INSET = 5;
@@ -1 +1 @@
1
- [{"__symbolic":"module","version":4,"metadata":{"GuiView":{"__symbolic":"class","members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","module":"@angular/core","name":"Injector","line":47,"character":43},{"__symbolic":"reference","module":"ngx-bootstrap/modal","name":"BsModalService","line":48,"character":41},{"__symbolic":"reference","module":"./gui-context","name":"GuiContext","line":49,"character":34},{"__symbolic":"reference","name":"GuiView"}]}],"resize":[{"__symbolic":"method"}],"load":[{"__symbolic":"method"}],"loadElementState":[{"__symbolic":"method"}],"popView":[{"__symbolic":"method"}],"closeView":[{"__symbolic":"method"}],"moveView":[{"__symbolic":"method"}],"showMusk":[{"__symbolic":"method"}],"showShadow":[{"__symbolic":"method"}],"hideMusk":[{"__symbolic":"method"}],"dispose":[{"__symbolic":"method"}],"normalOpenedVariableNames":[{"__symbolic":"method"}]}}}}]
1
+ [{"__symbolic":"module","version":4,"metadata":{"GuiView":{"__symbolic":"class","members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","module":"@angular/core","name":"Injector","line":54,"character":43},{"__symbolic":"reference","module":"ngx-bootstrap/modal","name":"BsModalService","line":55,"character":41},{"__symbolic":"reference","module":"./gui-context","name":"GuiContext","line":56,"character":34},{"__symbolic":"reference","name":"GuiView"}]}],"resize":[{"__symbolic":"method"}],"load":[{"__symbolic":"method"}],"loadElementState":[{"__symbolic":"method"}],"popView":[{"__symbolic":"method"}],"toLocalRect":[{"__symbolic":"method"}],"getNearButtonPosition":[{"__symbolic":"method"}],"closeView":[{"__symbolic":"method"}],"moveView":[{"__symbolic":"method"}],"showMusk":[{"__symbolic":"method"}],"showShadow":[{"__symbolic":"method"}],"hideMusk":[{"__symbolic":"method"}],"dispose":[{"__symbolic":"method"}],"normalOpenedVariableNames":[{"__symbolic":"method"}]},"statics":{"SHADOW_INSET":5}}}}]
@@ -24,10 +24,12 @@ export declare class GuiComponent implements OnChanges, OnDestroy {
24
24
  initHeight: number;
25
25
  lastScale: number;
26
26
  isMobileMode: boolean;
27
+ hostContainerId: string;
27
28
  private $svg;
28
29
  private host;
29
30
  private get viewResizeMode();
30
31
  private readonly globalSettings;
32
+ private readonly viewService;
31
33
  constructor(el: ElementRef, localization: Localization, injector: Injector, bsModalService: BsModalService);
32
34
  ngOnChanges(changes: {
33
35
  [propKey: string]: SimpleChange;
@@ -39,4 +41,5 @@ export declare class GuiComponent implements OnChanges, OnDestroy {
39
41
  private onSizeChanged;
40
42
  private onResizeModeChanged;
41
43
  private onDisplayModeChanged;
44
+ refreshCurrentPage(): boolean;
42
45
  }