@flexem/fc-gui 3.0.0-alpha.13 → 3.0.0-alpha.131

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 (184) hide show
  1. package/CHANGELOG.md +439 -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/bundles/@flexem/fc-gui.umd.js +38522 -34542
  7. package/bundles/@flexem/fc-gui.umd.js.map +1 -1
  8. package/bundles/@flexem/fc-gui.umd.min.js +5 -5
  9. package/bundles/@flexem/fc-gui.umd.min.js.map +1 -1
  10. package/communication/variable/variable-communicator.d.ts +4 -0
  11. package/communication/variable/variable-value.d.ts +4 -1
  12. package/communication/variable/variable-value.js +4 -1
  13. package/communication/variable/variable-value.metadata.json +1 -1
  14. package/config/alarm/alarm.store.d.ts +6 -0
  15. package/config/alarm/alarm.store.js +0 -0
  16. package/config/alarm/alarm.store.metadata.json +1 -0
  17. package/config/alarm/get-alarms-args.d.ts +12 -0
  18. package/config/alarm/get-alarms-args.js +13 -0
  19. package/config/alarm/get-alarms-args.metadata.json +1 -0
  20. package/config/alarm/index.d.ts +2 -0
  21. package/config/alarm/index.js +1 -0
  22. package/config/alarm/index.metadata.json +1 -0
  23. package/config/config-store.d.ts +2 -0
  24. package/config/history-data/get-history-data-args.d.ts +14 -3
  25. package/config/history-data/get-history-data-args.js +5 -3
  26. package/config/history-data/get-history-data-args.metadata.json +1 -1
  27. package/config/history-data/history-data.model.d.ts +7 -1
  28. package/config/history-data/history-data.model.js +9 -1
  29. package/config/history-data/history-data.model.metadata.json +1 -1
  30. package/config/history-data/index.d.ts +1 -1
  31. package/config/history-data/index.js +1 -1
  32. package/config/history-data/index.metadata.json +1 -1
  33. package/config/index.d.ts +1 -0
  34. package/config/index.js +1 -0
  35. package/config/index.metadata.json +1 -1
  36. package/elements/air-quality/air-quality-element.d.ts +31 -0
  37. package/elements/air-quality/air-quality-element.js +194 -0
  38. package/elements/air-quality/air-quality-element.metadata.json +1 -0
  39. package/elements/alarm/alarm-element.d.ts +69 -0
  40. package/elements/alarm/alarm-element.js +497 -0
  41. package/elements/alarm/alarm-element.metadata.json +1 -0
  42. package/elements/bar-graph-element.d.ts +10 -2
  43. package/elements/bar-graph-element.js +135 -5
  44. package/elements/bar-graph-element.metadata.json +1 -1
  45. package/elements/base/readable-element.d.ts +6 -1
  46. package/elements/base/readable-element.js +64 -2
  47. package/elements/base/readable-element.metadata.json +1 -1
  48. package/elements/base/state-control-element.d.ts +3 -1
  49. package/elements/base/state-control-element.js +3 -0
  50. package/elements/datetime-display/datetime-display-element.d.ts +1 -0
  51. package/elements/datetime-display/datetime-display-element.js +10 -2
  52. package/elements/datetime-display/datetime-display-element.metadata.json +1 -1
  53. package/elements/datetime-display/time-zone-select-json.d.ts +8 -0
  54. package/elements/datetime-display/time-zone-select-json.js +558 -0
  55. package/elements/historical-curve/historical-curve.element.d.ts +39 -3
  56. package/elements/historical-curve/historical-curve.element.js +509 -43
  57. package/elements/historical-curve/historical-curve.element.metadata.json +1 -1
  58. package/elements/main-element.d.ts +1 -0
  59. package/elements/main-element.js +59 -9
  60. package/elements/main-element.metadata.json +1 -1
  61. package/elements/meter-element.d.ts +7 -1
  62. package/elements/meter-element.js +76 -7
  63. package/elements/meter-element.metadata.json +1 -1
  64. package/elements/numerical-display/numerical-display-element.d.ts +16 -3
  65. package/elements/numerical-display/numerical-display-element.js +83 -11
  66. package/elements/numerical-display/numerical-display-element.metadata.json +1 -1
  67. package/elements/per-view-variable-communicator.d.ts +3 -0
  68. package/elements/per-view-variable-communicator.js +11 -0
  69. package/elements/per-view-variable-communicator.metadata.json +1 -1
  70. package/elements/ring-graph/ring-graph-element.d.ts +13 -1
  71. package/elements/ring-graph/ring-graph-element.js +164 -3
  72. package/elements/ring-graph/ring-graph-element.metadata.json +1 -1
  73. package/elements/scroll-alarm/scroll-alarm-element.d.ts +67 -0
  74. package/elements/scroll-alarm/scroll-alarm-element.js +663 -0
  75. package/elements/scroll-alarm/scroll-alarm-element.metadata.json +1 -0
  76. package/elements/shared/graph/graph-state-element.js +0 -3
  77. package/elements/shared/text/text-element.d.ts +9 -0
  78. package/elements/shared/text/text-element.js +33 -2
  79. package/elements/shared/text/text-element.metadata.json +1 -1
  80. package/elements/shared/text/text-state-element.d.ts +25 -2
  81. package/elements/shared/text/text-state-element.js +138 -63
  82. package/elements/shared/text/text-state-element.metadata.json +1 -1
  83. package/elements/static-elements/hyperlink-element.d.ts +24 -2
  84. package/elements/static-elements/hyperlink-element.js +101 -3
  85. package/elements/static-elements/hyperlink-element.metadata.json +1 -1
  86. package/elements/static-elements/text-element.d.ts +23 -2
  87. package/elements/static-elements/text-element.js +96 -3
  88. package/elements/static-elements/text-element.metadata.json +1 -1
  89. package/elements/switch-indicator-light/bit-switch-operator.d.ts +1 -0
  90. package/elements/switch-indicator-light/bit-switch-operator.js +19 -0
  91. package/elements/switch-indicator-light/bit-switch-operator.metadata.json +1 -1
  92. package/elements/switch-indicator-light/switch-indicator-light-element.d.ts +18 -2
  93. package/elements/switch-indicator-light/switch-indicator-light-element.js +120 -25
  94. package/elements/switch-indicator-light/switch-indicator-light-element.metadata.json +1 -1
  95. package/elements/switch-indicator-light/switch-operator.d.ts +1 -0
  96. package/elements/switch-indicator-light/word-switch-operator.d.ts +1 -0
  97. package/elements/switch-indicator-light/word-switch-operator.js +6 -0
  98. package/elements/switch-indicator-light/word-switch-operator.metadata.json +1 -1
  99. package/elements/video/video-element.d.ts +4 -0
  100. package/elements/video/video-element.js +81 -21
  101. package/elements/video/video-element.metadata.json +1 -1
  102. package/elements/view-operation/view-operation.element.d.ts +23 -2
  103. package/elements/view-operation/view-operation.element.js +103 -1
  104. package/elements/view-operation/view-operation.element.metadata.json +1 -1
  105. package/elements/weather/weater-element.js +0 -1
  106. package/gui/gui-context.d.ts +12 -2
  107. package/gui/gui-host.d.ts +1 -1
  108. package/gui/gui-view.d.ts +2 -0
  109. package/gui/gui-view.js +38 -2
  110. package/gui/gui-view.metadata.json +1 -1
  111. package/gui/gui.component.d.ts +3 -0
  112. package/gui/gui.component.js +15 -2
  113. package/gui/gui.component.metadata.json +1 -1
  114. package/localization/localization.service.d.ts +7 -0
  115. package/localization/localization.service.js +10 -3
  116. package/localization/localization.service.metadata.json +1 -1
  117. package/localization/localization.service.zh_CN.js +8 -1
  118. package/localization/localization.service.zh_CN.metadata.json +1 -1
  119. package/modal/write-value/write-value-modal-args.d.ts +5 -1
  120. package/modal/write-value/write-value-modal-args.js +3 -1
  121. package/modal/write-value/write-value-modal-args.metadata.json +1 -1
  122. package/modal/write-value/write-value-modal.component.d.ts +12 -7
  123. package/modal/write-value/write-value-modal.component.html +9 -4
  124. package/modal/write-value/write-value-modal.component.js +73 -15
  125. package/modal/write-value/write-value-modal.component.metadata.json +1 -1
  126. package/model/air-quality/air-quality-info.d.ts +23 -0
  127. package/model/air-quality/air-quality-info.js +4 -0
  128. package/model/air-quality/air-quality-info.metadata.json +1 -0
  129. package/model/air-quality/air-quality.model.d.ts +7 -0
  130. package/model/air-quality/air-quality.model.js +0 -0
  131. package/model/air-quality/air-quality.model.metadata.json +1 -0
  132. package/model/alarm/alarm.model.d.ts +13 -0
  133. package/model/alarm/alarm.model.js +0 -0
  134. package/model/alarm/alarm.model.metadata.json +1 -0
  135. package/model/bar-graph/bar-graph.d.ts +4 -0
  136. package/model/base/font-setting-model.d.ts +6 -0
  137. package/model/base/font-setting-model.metadata.json +1 -1
  138. package/model/base/readable-model.d.ts +4 -0
  139. package/model/datetime-display/datetime-display.d.ts +1 -0
  140. package/model/historical-curve/historical-curve-axis-settings.d.ts +11 -0
  141. package/model/historical-curve/historical-curve-axis-settings.js +5 -0
  142. package/model/historical-curve/historical-curve-axis-settings.metadata.json +1 -1
  143. package/model/historical-curve/historical-curve-chanel.model.d.ts +8 -0
  144. package/model/historical-curve/historical-curve.data-settings.d.ts +18 -1
  145. package/model/historical-curve/historical-curve.data-settings.metadata.json +1 -1
  146. package/model/meter/meter.d.ts +4 -0
  147. package/model/ring-graph/ring-graph.model.d.ts +8 -0
  148. package/model/scroll-alarm/scroll-alarm.model.d.ts +21 -0
  149. package/model/scroll-alarm/scroll-alarm.model.js +0 -0
  150. package/model/scroll-alarm/scroll-alarm.model.metadata.json +1 -0
  151. package/model/switch-indicator-light/bit-switch-operation.d.ts +2 -1
  152. package/model/switch-indicator-light/bit-switch-operation.js +1 -0
  153. package/model/switch-indicator-light/bit-switch-operation.metadata.json +1 -1
  154. package/model/switch-indicator-light/switch-indicator-light.d.ts +2 -0
  155. package/model/view-operation/view-operation-element.model.d.ts +7 -1
  156. package/package.json +1 -1
  157. package/public_api.js +1 -0
  158. package/remote/communication/variable/remote-variable-communicator.d.ts +22 -0
  159. package/remote/communication/variable/remote-variable-communicator.js +122 -2
  160. package/remote/communication/variable/remote-variable-communicator.metadata.json +1 -1
  161. package/remote/communication/variable/remote-variable-protocol.d.ts +5 -0
  162. package/service/index.d.ts +4 -0
  163. package/service/index.js +1 -0
  164. package/service/index.metadata.json +1 -1
  165. package/service/language.service.d.ts +37 -0
  166. package/service/language.service.js +0 -0
  167. package/service/language.service.metadata.json +1 -0
  168. package/service/released-variable/index.d.ts +1 -0
  169. package/service/released-variable/index.js +0 -0
  170. package/service/released-variable/index.metadata.json +1 -0
  171. package/service/released-variable/released-variable.service.d.ts +4 -0
  172. package/service/released-variable/released-variable.service.js +0 -0
  173. package/service/released-variable/released-variable.service.metadata.json +1 -0
  174. package/service/system-text-library.service.d.ts +76 -0
  175. package/service/system-text-library.service.js +28 -0
  176. package/service/system-text-library.service.metadata.json +1 -0
  177. package/service/text-library.service.d.ts +49 -0
  178. package/service/text-library.service.js +0 -0
  179. package/service/text-library.service.metadata.json +1 -0
  180. package/service/weather.service.d.ts +1 -0
  181. package/shared/gui-consts.d.ts +3 -0
  182. package/shared/gui-consts.js +3 -0
  183. package/shared/gui-consts.metadata.json +1 -1
  184. package/utils/data-type/fbox-data-type.service.js +40 -0
@@ -11,6 +11,7 @@ export class VideoElement extends ConditionalDisplayElement {
11
11
  this.guiSize = guiSize;
12
12
  this.svgRootClass = svgRootClass;
13
13
  this.videoId = '';
14
+ this.isFullscreen = false;
14
15
  this.isMobileMode = DisplayMode.Mobile === injector.get(GlobalSettings).displayMode;
15
16
  this.localization = injector.get(LOCALIZATION);
16
17
  this.init();
@@ -50,12 +51,13 @@ export class VideoElement extends ConditionalDisplayElement {
50
51
  .attr('width', this.model.size.width)
51
52
  .attr('height', this.model.size.height);
52
53
  this.videoService.getVideoUrl(this.model.videoTag).then(result => {
53
- this.initVideo(result.url, result.isMobileType, this.videoId);
54
+ this.videoUrl = result.url;
55
+ this.initVideo(result.url, this.videoId);
54
56
  }).catch(() => {
55
57
  throw new Error('Failure of the videoService');
56
58
  });
57
59
  }
58
- initVideo(videoUrl, isMobileType, videoId) {
60
+ initVideo(videoUrl, videoId) {
59
61
  const patt = /https:.+.m3u8/;
60
62
  if (videoUrl.indexOf('http:') !== -1) {
61
63
  videoUrl = videoUrl.replace('http:', 'https:');
@@ -68,6 +70,8 @@ export class VideoElement extends ConditionalDisplayElement {
68
70
  this.addVideoAddressToolTip(videoToolTip);
69
71
  return;
70
72
  }
73
+ const isAndroid = !!navigator.userAgent.match(/(Android)/i);
74
+ const isIos = !!navigator.userAgent.match(/(Mac)/i);
71
75
  const currentRect = this.$element.find('rect#rect' + videoId).first();
72
76
  if (!currentRect.length) {
73
77
  return;
@@ -77,17 +81,19 @@ export class VideoElement extends ConditionalDisplayElement {
77
81
  const chartHeight = clientRect.height;
78
82
  const left = this.model.location.x / this.guiSize.width * $('.' + this.svgRootClass).find('.svg-content').width();
79
83
  const top = this.model.location.y / this.guiSize.height * $('.' + this.svgRootClass).find('.svg-content').height();
80
- let videoHtml = `<video scareX="${this.model.location.x / this.guiSize.width}"
81
- scareY="${this.model.location.y / this.guiSize.height}" id="${videoId}" src="${videoUrl}" style="
82
- position: absolute;top:${top}px;left:${left}px;width:${chartWidth}px;height:${chartHeight}px;object-fit:fill;z-index:0"
83
- playsInline webkit-playsinline `;
84
- const isAndroid = !!navigator.userAgent.match(/(Android)/i);
84
+ const scareX = this.model.location.x / this.guiSize.width;
85
+ const scareY = this.model.location.y / this.guiSize.height;
86
+ if (isIos) {
87
+ videoUrl = videoUrl + '#t=1';
88
+ }
89
+ const preload = isIos ? ' preload=\'metadata\'' : '';
90
+ let videoHtml = `<video scareX="${scareX}"
91
+ scareY="${scareY}" id="${videoId}" ${preload} src="${videoUrl}" width="${chartWidth}" height="${chartHeight}"
92
+ style="position: absolute;top:${top}px;left:${left}px;object-fit:fill;z-index:0;"
93
+ playsInline webkit-playsinline `;
85
94
  if (this.isMobileMode) {
86
95
  if (isAndroid) {
87
- if (isMobileType) {
88
- videoHtml += ' controls ';
89
- }
90
- videoHtml += ' autoplay muted></video>';
96
+ videoHtml += ' muted></video>';
91
97
  }
92
98
  else {
93
99
  videoHtml += ' controls muted></video>';
@@ -100,10 +106,31 @@ export class VideoElement extends ConditionalDisplayElement {
100
106
  if (this.isShow === false) {
101
107
  $('#' + this.videoId).hide();
102
108
  }
103
- this.videoPlayer = new EZUIPlayer(videoId);
104
- if (isAndroid && !isMobileType) {
105
- this.setAndroidVideo(videoId);
106
- }
109
+ setTimeout(() => {
110
+ if (isAndroid) {
111
+ this.setAndroidVideo(videoId);
112
+ }
113
+ else if (isIos) {
114
+ this.setIosVideo(this.videoUrl, videoId);
115
+ }
116
+ try {
117
+ this.videoPlayer = new EZUIPlayer(videoId);
118
+ if (isAndroid) {
119
+ // 确保在 EZUIPlayer 初始化后才调用 play 方法
120
+ this.videoPlayer.on('canplay', () => {
121
+ this.videoPlayer.play();
122
+ });
123
+ }
124
+ }
125
+ catch (err) {
126
+ console.log(err);
127
+ }
128
+ }, 1000);
129
+ const style = document.createElement('style');
130
+ style.innerHTML = `#${videoId}::-webkit-media-controls-enclosure {
131
+ display: none;
132
+ }`;
133
+ document.head.append();
107
134
  }
108
135
  addVideoAddressToolTip(videoToolTip) {
109
136
  const size = this.model.size;
@@ -126,35 +153,68 @@ export class VideoElement extends ConditionalDisplayElement {
126
153
  this.$element.append(textElement.Element);
127
154
  }
128
155
  setAndroidVideo(videoId) {
129
- let isFullscreen = false;
130
156
  const videoElement = $('#' + videoId);
131
157
  let preHeight = videoElement.height();
132
158
  let preWidth = videoElement.width();
133
159
  let preTop = videoElement.css('top');
134
160
  let preLeft = videoElement.css('left');
161
+ const { StatusBar } = window;
135
162
  videoElement.on('click', () => {
136
- if (!isFullscreen) {
163
+ if (!this.isFullscreen) {
164
+ if (StatusBar) {
165
+ StatusBar.hide();
166
+ }
137
167
  preHeight = videoElement.height();
138
168
  preWidth = videoElement.width();
139
169
  preTop = videoElement.css('top');
140
170
  preLeft = videoElement.css('left');
141
- const width = document.body.clientWidth;
142
- const height = width * 9 / 16;
171
+ const width = document.documentElement.clientWidth;
172
+ const height = document.documentElement.clientHeight;
173
+ videoElement.css('object-fit', 'contain');
174
+ videoElement.css('background', '#000000');
143
175
  videoElement.css('width', width + 'px');
144
176
  videoElement.css('height', height + 'px');
145
177
  videoElement.css('left', '0px');
146
178
  videoElement.css('top', '0px');
147
179
  videoElement.css('z-index', '99');
148
- isFullscreen = true;
180
+ videoElement.css('position', 'fixed');
181
+ this.isFullscreen = true;
182
+ try {
183
+ screen.orientation.lock(screen.orientation.type);
184
+ }
185
+ catch (error) {
186
+ console.error(error);
187
+ }
149
188
  }
150
189
  else {
190
+ videoElement.css('object-fit', 'fill');
151
191
  videoElement.css('width', preWidth + 'px');
152
192
  videoElement.css('height', preHeight + 'px');
153
193
  videoElement.css('left', preLeft);
154
194
  videoElement.css('top', preTop);
155
195
  videoElement.css('z-index', '0');
156
- isFullscreen = false;
196
+ videoElement.css('position', 'absolute');
197
+ this.isFullscreen = false;
198
+ try {
199
+ if (screen.orientation.type.includes('portrait')) {
200
+ StatusBar.show();
201
+ }
202
+ }
203
+ catch (error) {
204
+ console.error(error);
205
+ }
157
206
  }
158
207
  });
159
208
  }
209
+ setIosVideo(videoUrl, videoId) {
210
+ const video = $('#' + this.videoId);
211
+ video.on('webkitendfullscreen', () => {
212
+ video.remove();
213
+ clearTimeout(this.refreshTimer);
214
+ this.refreshTimer = null;
215
+ this.refreshTimer = setTimeout(() => {
216
+ this.initVideo(videoUrl, videoId);
217
+ }, 500);
218
+ });
219
+ }
160
220
  }
@@ -1 +1 @@
1
- [{"__symbolic":"module","version":4,"metadata":{"VideoElement":{"__symbolic":"class","extends":{"__symbolic":"reference","module":"../base/conditional-display-element","name":"ConditionalDisplayElement","line":15,"character":34},"members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"error","message":"Could not resolve type","line":23,"character":25,"context":{"typeName":"HTMLElement"}},{"__symbolic":"reference","module":"@angular/core","name":"Injector","line":24,"character":18},{"__symbolic":"reference","module":"../../service","name":"PermissionChecker","line":25,"character":27},{"__symbolic":"reference","module":"../../communication","name":"VariableCommunicator","line":26,"character":30},{"__symbolic":"reference","module":"../../config","name":"VariableStore","line":27,"character":23},{"__symbolic":"reference","module":"../../service","name":"VideoService","line":28,"character":39},{"__symbolic":"reference","module":"../../model","name":"Size","line":29,"character":34},{"__symbolic":"reference","name":"string"},{"__symbolic":"reference","name":"string"}]}],"dispose":[{"__symbolic":"method"}],"hide":[{"__symbolic":"method"}],"show":[{"__symbolic":"method"}],"init":[{"__symbolic":"method"}],"initVideo":[{"__symbolic":"method"}],"addVideoAddressToolTip":[{"__symbolic":"method"}],"setAndroidVideo":[{"__symbolic":"method"}]}}}}]
1
+ [{"__symbolic":"module","version":4,"metadata":{"VideoElement":{"__symbolic":"class","extends":{"__symbolic":"reference","module":"../base/conditional-display-element","name":"ConditionalDisplayElement","line":15,"character":34},"members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"error","message":"Could not resolve type","line":27,"character":25,"context":{"typeName":"HTMLElement"}},{"__symbolic":"reference","module":"@angular/core","name":"Injector","line":28,"character":18},{"__symbolic":"reference","module":"../../service","name":"PermissionChecker","line":29,"character":27},{"__symbolic":"reference","module":"../../communication","name":"VariableCommunicator","line":30,"character":30},{"__symbolic":"reference","module":"../../config","name":"VariableStore","line":31,"character":23},{"__symbolic":"reference","module":"../../service","name":"VideoService","line":32,"character":39},{"__symbolic":"reference","module":"../../model","name":"Size","line":33,"character":34},{"__symbolic":"reference","name":"string"},{"__symbolic":"reference","name":"string"}]}],"dispose":[{"__symbolic":"method"}],"hide":[{"__symbolic":"method"}],"show":[{"__symbolic":"method"}],"init":[{"__symbolic":"method"}],"initVideo":[{"__symbolic":"method"}],"addVideoAddressToolTip":[{"__symbolic":"method"}],"setAndroidVideo":[{"__symbolic":"method"}],"setIosVideo":[{"__symbolic":"method"}]}}}}]
@@ -3,11 +3,12 @@ import { BsModalService } from 'ngx-bootstrap/modal';
3
3
  import { Localization } from '../../localization';
4
4
  import { GraphStore, VariableStore } from '../../config';
5
5
  import { ViewOperationElementModel } 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 { PopupViewService } from '../../view/popup-view.service';
10
10
  import { SecurityChecker } from '../../security';
11
+ import { GuiContext } from '../../gui/gui-context';
11
12
  export declare class ViewOperationElement extends ConditionalEnableElement {
12
13
  private readonly modalService;
13
14
  private readonly graphStore;
@@ -16,13 +17,17 @@ export declare class ViewOperationElement extends ConditionalEnableElement {
16
17
  private readonly popupViewService;
17
18
  private readonly hostContainerId;
18
19
  private readonly el;
20
+ private readonly textLibraryService?;
21
+ private readonly languageService?;
22
+ private readonly guiContext?;
19
23
  protected model: ViewOperationElementModel;
20
24
  private readonly logger;
21
25
  private readonly viewService;
22
26
  private graphStateElement?;
27
+ private languageChangeSubscription?;
23
28
  private touchedScreenX;
24
29
  private touchedScreenY;
25
- constructor(element: HTMLElement, injector: Injector, modalService: BsModalService, variableCommunicator: VariableCommunicator, variableStore: VariableStore, graphStore: GraphStore, permissionChecker: PermissionChecker, operationRecordService: OperationRecordService, securityChecker: SecurityChecker, localization: Localization, popupViewService: PopupViewService, hostContainerId: string, el: ElementRef, signalRAppId: string);
30
+ constructor(element: HTMLElement, injector: Injector, modalService: BsModalService, variableCommunicator: VariableCommunicator, variableStore: VariableStore, graphStore: GraphStore, permissionChecker: PermissionChecker, operationRecordService: OperationRecordService, securityChecker: SecurityChecker, localization: Localization, popupViewService: PopupViewService, hostContainerId: string, el: ElementRef, signalRAppId: string, textLibraryService?: TextLibraryService, languageService?: LanguageService, guiContext?: GuiContext);
26
31
  private initElement;
27
32
  private switchToState;
28
33
  private initGraph;
@@ -33,4 +38,20 @@ export declare class ViewOperationElement extends ConditionalEnableElement {
33
38
  private closeView;
34
39
  private moveView;
35
40
  private recordViewOperation;
41
+ /**
42
+ * 订阅语种变化事件
43
+ */
44
+ private subscribeLanguageChange;
45
+ /**
46
+ * 更新文本内容(支持文本库和语种切换)
47
+ */
48
+ private updateTextContent;
49
+ /**
50
+ * 获取显示文本
51
+ */
52
+ private getDisplayText;
53
+ /**
54
+ * 释放资源
55
+ */
56
+ dispose(): void;
36
57
  }
@@ -9,7 +9,7 @@ import { ConfirmOperationModalComponent } from '../../modal/confirm-operation/co
9
9
  import { VerifyPasswordModalComponent } from '../../modal/verify-password/verify-password-modal.component';
10
10
  import { ViewService } from '../../view/view.service';
11
11
  export class ViewOperationElement extends ConditionalEnableElement {
12
- constructor(element, injector, modalService, variableCommunicator, variableStore, graphStore, permissionChecker, operationRecordService, securityChecker, localization, popupViewService, hostContainerId, el, signalRAppId) {
12
+ constructor(element, injector, modalService, variableCommunicator, variableStore, graphStore, permissionChecker, operationRecordService, securityChecker, localization, popupViewService, hostContainerId, el, signalRAppId, textLibraryService, languageService, guiContext) {
13
13
  super(element, permissionChecker, variableCommunicator, variableStore, localization, signalRAppId);
14
14
  this.modalService = modalService;
15
15
  this.graphStore = graphStore;
@@ -18,20 +18,27 @@ export class ViewOperationElement extends ConditionalEnableElement {
18
18
  this.popupViewService = popupViewService;
19
19
  this.hostContainerId = hostContainerId;
20
20
  this.el = el;
21
+ this.textLibraryService = textLibraryService;
22
+ this.languageService = languageService;
23
+ this.guiContext = guiContext;
21
24
  this.touchedScreenX = 0;
22
25
  this.touchedScreenY = 0;
23
26
  this.logger = injector.get(LOGGER_SERVICE_TOKEN);
24
27
  this.viewService = injector.get(ViewService);
25
28
  this.initElement();
29
+ this.subscribeLanguageChange();
26
30
  }
27
31
  initElement() {
28
32
  const width = this.model.size.width;
29
33
  const height = this.model.size.height;
30
34
  this.initGraph(width, height);
31
35
  this.rootElement.append('rect').attr('id', 'StateFrame').attr('width', width).attr('height', height).attr('fill', 'transparent');
36
+ // 初始化文本显示
32
37
  const $dateTimeText = this.$element.find('text').last();
33
38
  const fontStyle = this.model.label.font.fontStyle;
34
39
  $dateTimeText.css('font', fontStyle + ',msyh');
40
+ // 设置初始文本内容(支持文本库)
41
+ this.updateTextContent($dateTimeText);
35
42
  this.switchToState(0);
36
43
  this.rootElement.on('mousedown', () => {
37
44
  if (!this.isInitialized) {
@@ -170,6 +177,9 @@ export class ViewOperationElement extends ConditionalEnableElement {
170
177
  const viewIndex = this.model.viewIndex;
171
178
  if (null != viewIndex) {
172
179
  this.popupViewService.popView(viewIndex, this.hostContainerId, this.el).subscribe(() => this.recordViewOperation(), error => this.logger.error(`ToggleView(${viewIndex}) failed. ${error}`));
180
+ $(`#${this.hostContainerId} video`)
181
+ .addClass('video-hidden')
182
+ .css('visibility', 'hidden');
173
183
  }
174
184
  else {
175
185
  this.logger.error('[GUI]Toggle View:invalid view index');
@@ -177,6 +187,11 @@ export class ViewOperationElement extends ConditionalEnableElement {
177
187
  }
178
188
  closeView() {
179
189
  this.popupViewService.closeView();
190
+ if ($(`#${this.hostContainerId} > svg > svg`).length === 0) {
191
+ $(`#${this.hostContainerId} .video-hidden`)
192
+ .removeClass('video-hidden')
193
+ .css('visibility', 'visible');
194
+ }
180
195
  this.recordViewOperation();
181
196
  }
182
197
  moveView(movementX, movementY) {
@@ -191,4 +206,91 @@ export class ViewOperationElement extends ConditionalEnableElement {
191
206
  this.operationRecordService.record({ operationDescription: this.model.operationDescription });
192
207
  }
193
208
  }
209
+ /**
210
+ * 订阅语种变化事件
211
+ */
212
+ subscribeLanguageChange() {
213
+ // 只有使用文本库时才需要订阅语种变化
214
+ if (!this.model.textLibrary || this.model.textLibrary.labelType !== 'textLibrary') {
215
+ return;
216
+ }
217
+ if (this.guiContext && this.guiContext.languageChanged$) {
218
+ this.languageChangeSubscription = this.guiContext.languageChanged$.subscribe(() => {
219
+ // 更新文本内容
220
+ const $dateTimeText = this.$element.find('text').last();
221
+ this.updateTextContent($dateTimeText);
222
+ });
223
+ }
224
+ }
225
+ /**
226
+ * 更新文本内容(支持文本库和语种切换)
227
+ */
228
+ updateTextContent($textElement) {
229
+ const displayText = this.getDisplayText();
230
+ $textElement.text(displayText);
231
+ }
232
+ /**
233
+ * 获取显示文本
234
+ */
235
+ getDisplayText() {
236
+ var _a, _b, _c, _d, _e, _f;
237
+ // 检查是否使用文本库
238
+ if (this.model.textLibrary && this.model.textLibrary.labelType === 'textLibrary') {
239
+ const textLibraryId = this.model.textLibrary.selectedTextLibraryItem;
240
+ const textItem = this.model.textLibrary.selectedTextItem;
241
+ if (textLibraryId && textItem && this.textLibraryService) {
242
+ // 获取文本库数据
243
+ const textLibraryData = this.textLibraryService.getTextLibraryById(typeof textLibraryId === 'string' ? parseInt(textLibraryId, 10) : textLibraryId);
244
+ if (textLibraryData && textLibraryData.data) {
245
+ // 查找对应的文本条目
246
+ const textEntry = textLibraryData.data.find(entry => entry.key === textItem.toString());
247
+ if (textEntry) {
248
+ // 获取当前语种ID
249
+ 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;
250
+ // 确定要使用的语种代码(culture)
251
+ let targetLanguage;
252
+ const defaultLanguage = ((_d = this.languageService) === null || _d === void 0 ? void 0 : _d.getDefaultLanguage()) || 'zh-CN';
253
+ if (currentLanguageId === null || currentLanguageId === undefined) {
254
+ // 设备未设置当前语种,使用默认语种
255
+ targetLanguage = defaultLanguage;
256
+ }
257
+ else {
258
+ // 设备已设置当前语种,获取对应的语种代码
259
+ const currentLanguage = (_f = (_e = this.guiContext) === null || _e === void 0 ? void 0 : _e.getLanguageCultureById) === null || _f === void 0 ? void 0 : _f.call(_e, currentLanguageId);
260
+ if (currentLanguage) {
261
+ targetLanguage = currentLanguage;
262
+ }
263
+ else {
264
+ // 无法获取语种代码,使用默认语种
265
+ targetLanguage = defaultLanguage;
266
+ }
267
+ }
268
+ // 返回对应语种的文本
269
+ if (textEntry.cultures && textEntry.cultures[targetLanguage]) {
270
+ return textEntry.cultures[targetLanguage];
271
+ }
272
+ // 如果没有对应语种,返回空字符串
273
+ return '';
274
+ }
275
+ }
276
+ }
277
+ // 文本库配置但未找到数据,返回空字符串
278
+ return '';
279
+ }
280
+ // 默认返回文本内容
281
+ return this.model.label.content || '';
282
+ }
283
+ /**
284
+ * 释放资源
285
+ */
286
+ dispose() {
287
+ // 取消语种变化订阅
288
+ if (this.languageChangeSubscription) {
289
+ this.languageChangeSubscription.unsubscribe();
290
+ this.languageChangeSubscription = undefined;
291
+ }
292
+ if (this.$element) {
293
+ this.$element.remove();
294
+ }
295
+ }
194
296
  }
@@ -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":22,"character":42},"members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"error","message":"Could not resolve type","line":34,"character":25,"context":{"typeName":"HTMLElement"}},{"__symbolic":"reference","module":"@angular/core","name":"Injector","line":34,"character":48},{"__symbolic":"reference","module":"ngx-bootstrap/modal","name":"BsModalService","line":35,"character":39},{"__symbolic":"reference","module":"../../communication","name":"VariableCommunicator","line":36,"character":30},{"__symbolic":"reference","module":"../../config","name":"VariableStore","line":37,"character":23},{"__symbolic":"reference","module":"../../config","name":"GraphStore","line":38,"character":37},{"__symbolic":"reference","module":"../../service","name":"PermissionChecker","line":39,"character":27},{"__symbolic":"reference","module":"../../service","name":"OperationRecordService","line":40,"character":49},{"__symbolic":"reference","module":"../../security","name":"SecurityChecker","line":41,"character":42},{"__symbolic":"reference","module":"../../localization","name":"Localization","line":42,"character":22},{"__symbolic":"reference","module":"../../view/popup-view.service","name":"PopupViewService","line":43,"character":43},{"__symbolic":"reference","name":"string"},{"__symbolic":"reference","module":"@angular/core","name":"ElementRef","line":45,"character":29},{"__symbolic":"reference","name":"string"},{"__symbolic":"reference","module":"../../service","name":"TextLibraryService","line":47,"character":46},{"__symbolic":"reference","module":"../../service","name":"LanguageService","line":48,"character":43},{"__symbolic":"reference","module":"../../gui/gui-context","name":"GuiContext","line":49,"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"}],"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,26 @@
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
+ readonly languageChanged$?: Subject<number | null>;
21
+ getCurrentLanguageId?(): number | null;
22
+ getDefaultLanguageId?(): number;
23
+ getLanguageCultureById?(languageId: number | null): string | null;
24
+ updateCurrentLanguageId?(languageId: number | null): Promise<void>;
25
+ dispose(): void;
16
26
  }
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
@@ -21,6 +21,8 @@ export declare class GuiView implements PopupViewService {
21
21
  private mainElement;
22
22
  private muskElement;
23
23
  private openVariableStatesSubscription;
24
+ private requestVirtualDeviceState;
25
+ private virtualDeviceStatesChanged;
24
26
  private openVariablesSubscription;
25
27
  private openedVariableNames;
26
28
  private perViewVariableCommunicator;
package/gui/gui-view.js CHANGED
@@ -72,11 +72,41 @@ export class GuiView {
72
72
  this.openVariableStatesSubscription.unsubscribe();
73
73
  }
74
74
  this.openedVariableNames = this.mainElement.getVariableNames();
75
- if (this.openedVariableNames.length === 0) {
75
+ // 分离系统变量和普通变量
76
+ const systemVariables = [];
77
+ const normalVariablesForState = [];
78
+ this.openedVariableNames.forEach(variableName => {
79
+ if (variableName === '当前语种ID') {
80
+ // 系统变量直接订阅,不需要等待状态
81
+ systemVariables.push(variableName);
82
+ }
83
+ else {
84
+ normalVariablesForState.push(variableName);
85
+ }
86
+ });
87
+ // 立即订阅系统变量
88
+ if (systemVariables.length > 0) {
89
+ this.normalOpenedVariableNames(systemVariables);
90
+ }
91
+ if (normalVariablesForState.indexOf('设备状态') !== -1) {
92
+ if (this.requestVirtualDeviceState) {
93
+ this.requestVirtualDeviceState.unsubscribe();
94
+ }
95
+ if (this.requestVirtualDeviceState) {
96
+ this.requestVirtualDeviceState.unsubscribe();
97
+ }
98
+ this.normalOpenedVariableNames(['设备状态']);
99
+ this.requestVirtualDeviceState =
100
+ this.perViewVariableCommunicator.requestVirtualDeviceState().subscribe({
101
+ complete: () => { }
102
+ });
103
+ normalVariablesForState.splice(normalVariablesForState.indexOf('设备状态'), 1);
104
+ }
105
+ if (normalVariablesForState.length === 0) {
76
106
  return;
77
107
  }
78
108
  this.openVariableStatesSubscription =
79
- this.perViewVariableCommunicator.subscribeVariableStates(this.openedVariableNames).subscribe((states) => {
109
+ this.perViewVariableCommunicator.subscribeVariableStates(normalVariablesForState).subscribe((states) => {
80
110
  this.mainElement.reportVariableStates(states);
81
111
  const normalVariableNames = [];
82
112
  each(states, v => {
@@ -181,6 +211,12 @@ export class GuiView {
181
211
  if (this.openVariableStatesSubscription) {
182
212
  this.openVariableStatesSubscription.unsubscribe();
183
213
  }
214
+ if (this.requestVirtualDeviceState) {
215
+ this.requestVirtualDeviceState.unsubscribe();
216
+ }
217
+ if (this.virtualDeviceStatesChanged) {
218
+ this.virtualDeviceStatesChanged.unsubscribe();
219
+ }
184
220
  if (this.openVariablesSubscription) {
185
221
  this.openVariablesSubscription.unsubscribe();
186
222
  }
@@ -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":49,"character":43},{"__symbolic":"reference","module":"ngx-bootstrap/modal","name":"BsModalService","line":50,"character":41},{"__symbolic":"reference","module":"./gui-context","name":"GuiContext","line":51,"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"}]}}}}]
@@ -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
  }
@@ -18,6 +18,7 @@ import { Size } from '../model';
18
18
  import { DisplayMode, GlobalSettings, ViewResizeMode } from '../settings';
19
19
  import { GuiHost } from './gui-host';
20
20
  import { Guid } from '../utils/guid';
21
+ import { ViewService } from '../view/view.service';
21
22
  let GuiComponent = class GuiComponent {
22
23
  constructor(el, localization, injector, bsModalService) {
23
24
  this.el = el;
@@ -29,6 +30,7 @@ let GuiComponent = class GuiComponent {
29
30
  this.lastScale = 1;
30
31
  this.isMobileMode = false;
31
32
  this.globalSettings = this.injector.get(GlobalSettings);
33
+ this.viewService = injector.get(ViewService);
32
34
  }
33
35
  get viewResizeMode() {
34
36
  switch (this.resizeMode) {
@@ -131,11 +133,11 @@ let GuiComponent = class GuiComponent {
131
133
  this.$svg = $(this.el.nativeElement).find('div.svgView').first();
132
134
  this.$svg.empty();
133
135
  const svgRootClass = 'S' + Guid.newGuid().toString('n');
134
- const hostContainerId = 'H' + Guid.newGuid().toString('n');
136
+ this.hostContainerId = 'H' + Guid.newGuid().toString('n');
135
137
  this.$svg.addClass(svgRootClass);
136
138
  const guiOptions = {
137
139
  svgRootClass: svgRootClass,
138
- hostContainerId: hostContainerId,
140
+ hostContainerId: this.hostContainerId,
139
141
  el: this.el
140
142
  };
141
143
  const host = new GuiHost(this.injector, this.bsModalService, newValue, guiOptions, this.el);
@@ -190,6 +192,17 @@ let GuiComponent = class GuiComponent {
190
192
  this.isMobileMode = this.displayMode === 'Mobile';
191
193
  this.globalSettings.displayMode = this.isMobileMode ? DisplayMode.Mobile : DisplayMode.Web;
192
194
  }
195
+ refreshCurrentPage() {
196
+ if (this.host.currentViewIndex === undefined) {
197
+ return false;
198
+ }
199
+ const toggleView = this.viewService.toggleViews.get(this.el);
200
+ if (!toggleView) {
201
+ return false;
202
+ }
203
+ toggleView(this.host.currentViewIndex, this.hostContainerId, this.el).subscribe();
204
+ return true;
205
+ }
193
206
  };
194
207
  __decorate([
195
208
  Input(),
@@ -1 +1 @@
1
- [{"__symbolic":"module","version":4,"metadata":{"GuiComponent":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Component","line":11,"character":1},"arguments":[{"selector":"fc-gui","template":"<div> <div class='svgView' style=\"position: relative;display: flex;justify-content: center;align-items: center;\"></div> </div> "}]}],"members":{"context":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":17,"character":5}}]}],"size":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":18,"character":5}}]}],"resizeMode":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":19,"character":5}}]}],"displayMode":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":20,"character":5}}]}],"loadFailed":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output","line":21,"character":5}}]}],"loaded":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output","line":22,"character":5}}]}],"__ctor__":[{"__symbolic":"constructor","parameterDecorators":[null,[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Inject","line":46,"character":9},"arguments":[{"__symbolic":"reference","module":"../localization","name":"LOCALIZATION","line":46,"character":16}]}],null,null],"parameters":[{"__symbolic":"reference","module":"@angular/core","name":"ElementRef","line":45,"character":37},{"__symbolic":"reference","module":"../localization","name":"Localization","line":46,"character":61},{"__symbolic":"reference","module":"@angular/core","name":"Injector","line":47,"character":35},{"__symbolic":"reference","module":"ngx-bootstrap/modal","name":"BsModalService","line":48,"character":41}]}],"ngOnChanges":[{"__symbolic":"method"}],"doubleFingerZooming":[{"__symbolic":"method"}],"getDistance":[{"__symbolic":"method"}],"ngOnDestroy":[{"__symbolic":"method"}],"onProviderChanged":[{"__symbolic":"method"}],"onSizeChanged":[{"__symbolic":"method"}],"onResizeModeChanged":[{"__symbolic":"method"}],"onDisplayModeChanged":[{"__symbolic":"method"}]}}}}]
1
+ [{"__symbolic":"module","version":4,"metadata":{"GuiComponent":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Component","line":12,"character":1},"arguments":[{"selector":"fc-gui","template":"<div> <div class='svgView' style=\"position: relative;display: flex;justify-content: center;align-items: center;\"></div> </div> "}]}],"members":{"context":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":18,"character":5}}]}],"size":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":19,"character":5}}]}],"resizeMode":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":20,"character":5}}]}],"displayMode":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":21,"character":5}}]}],"loadFailed":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output","line":22,"character":5}}]}],"loaded":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output","line":23,"character":5}}]}],"__ctor__":[{"__symbolic":"constructor","parameterDecorators":[null,[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Inject","line":50,"character":9},"arguments":[{"__symbolic":"reference","module":"../localization","name":"LOCALIZATION","line":50,"character":16}]}],null,null],"parameters":[{"__symbolic":"reference","module":"@angular/core","name":"ElementRef","line":49,"character":37},{"__symbolic":"reference","module":"../localization","name":"Localization","line":50,"character":61},{"__symbolic":"reference","module":"@angular/core","name":"Injector","line":51,"character":35},{"__symbolic":"reference","module":"ngx-bootstrap/modal","name":"BsModalService","line":52,"character":41}]}],"ngOnChanges":[{"__symbolic":"method"}],"doubleFingerZooming":[{"__symbolic":"method"}],"getDistance":[{"__symbolic":"method"}],"ngOnDestroy":[{"__symbolic":"method"}],"onProviderChanged":[{"__symbolic":"method"}],"onSizeChanged":[{"__symbolic":"method"}],"onResizeModeChanged":[{"__symbolic":"method"}],"onDisplayModeChanged":[{"__symbolic":"method"}],"refreshCurrentPage":[{"__symbolic":"method"}]}}}}]