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

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 +23330 -19502
  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 +499 -39
  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 +54 -0
  74. package/elements/scroll-alarm/scroll-alarm-element.js +517 -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
@@ -1 +1 @@
1
- [{"__symbolic":"module","version":4,"metadata":{"TextElement":{"__symbolic":"class","extends":{"__symbolic":"reference","module":"../base/conditional-dynamic-display-element","name":"ConditionalDynamicDisplayElement","line":10,"character":33},"members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"error","message":"Could not resolve type","line":15,"character":25,"context":{"typeName":"HTMLElement"}},{"__symbolic":"reference","module":"@angular/core","name":"Injector","line":15,"character":48},{"__symbolic":"reference","module":"../../service","name":"PermissionChecker","line":15,"character":77},{"__symbolic":"reference","module":"../../communication","name":"VariableCommunicator","line":16,"character":30},{"__symbolic":"reference","module":"../../config","name":"VariableStore","line":16,"character":67},{"__symbolic":"reference","module":"../../config","name":"GraphStore","line":16,"character":111},{"__symbolic":"reference","name":"string"}]}],"dispose":[{"__symbolic":"method"}],"handleTextValue":[{"__symbolic":"method"}],"initGraph":[{"__symbolic":"method"}]}}}}]
1
+ [{"__symbolic":"module","version":4,"metadata":{"TextElement":{"__symbolic":"class","extends":{"__symbolic":"reference","module":"../base/conditional-dynamic-display-element","name":"ConditionalDynamicDisplayElement","line":12,"character":33},"members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"error","message":"Could not resolve type","line":19,"character":25,"context":{"typeName":"HTMLElement"}},{"__symbolic":"reference","module":"@angular/core","name":"Injector","line":19,"character":48},{"__symbolic":"reference","module":"../../service","name":"PermissionChecker","line":19,"character":77},{"__symbolic":"reference","module":"../../communication","name":"VariableCommunicator","line":20,"character":30},{"__symbolic":"reference","module":"../../config","name":"VariableStore","line":20,"character":67},{"__symbolic":"reference","module":"../../config","name":"GraphStore","line":20,"character":111},{"__symbolic":"reference","name":"string"},{"__symbolic":"reference","module":"../../service","name":"TextLibraryService","line":22,"character":46},{"__symbolic":"reference","module":"../../service","name":"LanguageService","line":23,"character":43},{"__symbolic":"reference","module":"../../gui/gui-context","name":"GuiContext","line":24,"character":38}]}],"dispose":[{"__symbolic":"method"}],"subscribeLanguageChange":[{"__symbolic":"method"}],"reRenderText":[{"__symbolic":"method"}],"getDisplayText":[{"__symbolic":"method"}],"handleTextValue":[{"__symbolic":"method"}],"initGraph":[{"__symbolic":"method"}]}}}}]
@@ -15,4 +15,5 @@ export declare class BitSwitchOperator implements SwitchOperator {
15
15
  constructor(settings: BitSwitchSettings, variableCommunicator: VariableCommunicator, variableStore: VariableStore, signalRAppId: string);
16
16
  canExecute(): boolean;
17
17
  execute(): Promise<VariableOptionModel>;
18
+ writeValue(value: any): Promise<VariableOptionModel>;
18
19
  }
@@ -72,6 +72,8 @@ export class BitSwitchOperator {
72
72
  }
73
73
  }
74
74
  break;
75
+ case BitSwitchOperation.Restoration:
76
+ break;
75
77
  default:
76
78
  throw new Error(`Unknown BitSwitchOperation:${settings.operation}`);
77
79
  }
@@ -85,4 +87,21 @@ export class BitSwitchOperator {
85
87
  newValue: newValue
86
88
  });
87
89
  }
90
+ writeValue(value) {
91
+ if (this.settings.isBitwiseIndex) {
92
+ this.variableCommunicator.writeWordByBit(this.variableName, this.settings.bitIndex, value).subscribe();
93
+ }
94
+ else {
95
+ this.variableCommunicator.write(this.variableName, value).subscribe();
96
+ }
97
+ let originValue;
98
+ if (this.currentValue && this.currentValue.value !== undefined) {
99
+ originValue = this.currentValue.value;
100
+ }
101
+ return Promise.resolve({
102
+ variableName: this.variableName,
103
+ originValue: originValue,
104
+ newValue: value
105
+ });
106
+ }
88
107
  }
@@ -1 +1 @@
1
- [{"__symbolic":"module","version":4,"metadata":{"BitSwitchOperator":{"__symbolic":"class","members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","module":"../../model","name":"BitSwitchSettings","line":21,"character":43},{"__symbolic":"reference","module":"../../communication","name":"VariableCommunicator","line":21,"character":101},{"__symbolic":"reference","module":"../../config","name":"VariableStore","line":22,"character":40},{"__symbolic":"reference","name":"string"}]}],"canExecute":[{"__symbolic":"method"}],"execute":[{"__symbolic":"method"}]}}}}]
1
+ [{"__symbolic":"module","version":4,"metadata":{"BitSwitchOperator":{"__symbolic":"class","members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","module":"../../model","name":"BitSwitchSettings","line":21,"character":43},{"__symbolic":"reference","module":"../../communication","name":"VariableCommunicator","line":21,"character":101},{"__symbolic":"reference","module":"../../config","name":"VariableStore","line":22,"character":40},{"__symbolic":"reference","name":"string"}]}],"canExecute":[{"__symbolic":"method"}],"execute":[{"__symbolic":"method"}],"writeValue":[{"__symbolic":"method"}]}}}}]
@@ -3,15 +3,19 @@ import { BsModalService } from 'ngx-bootstrap/modal';
3
3
  import { GraphStore, VariableStore } from '../../config';
4
4
  import { Localization } from '../../localization';
5
5
  import { SwitchIndicatorLight } from '../../model';
6
- import { PermissionChecker, OperationRecordService } from '../../service';
6
+ import { PermissionChecker, OperationRecordService, TextLibraryService, LanguageService } from '../../service';
7
7
  import { VariableCommunicator } from '../../communication';
8
8
  import { ConditionalEnableElement } from '../base/conditional-enable-element';
9
9
  import { SecurityChecker } from '../../security';
10
+ import { GuiContext } from '../../gui/gui-context';
10
11
  export declare class SwitchIndicatorLightElement extends ConditionalEnableElement {
11
12
  private readonly modalService;
12
13
  private readonly graphStore;
13
14
  private readonly operationRecordService;
14
15
  private readonly securityChecker;
16
+ private readonly textLibraryService?;
17
+ private readonly languageService?;
18
+ private readonly guiContext?;
15
19
  protected readonly model: SwitchIndicatorLight;
16
20
  private readonly logger;
17
21
  private switchOperator;
@@ -19,13 +23,25 @@ export declare class SwitchIndicatorLightElement extends ConditionalEnableElemen
19
23
  private graphStateElement?;
20
24
  private textStateElement;
21
25
  private isMobileMode;
22
- constructor(element: HTMLElement, injector: Injector, modalService: BsModalService, variableCommunicator: VariableCommunicator, graphStore: GraphStore, permissionChecker: PermissionChecker, operationRecordService: OperationRecordService, securityChecker: SecurityChecker, variableStore: VariableStore, localization: Localization, signalRAppId: string);
26
+ private isBitRestoration;
27
+ private isVerifiedForRestoration;
28
+ private restorationTimer;
29
+ private isWriteRestorationDownValue;
30
+ private onDocMouseUp;
31
+ constructor(element: HTMLElement, injector: Injector, modalService: BsModalService, variableCommunicator: VariableCommunicator, graphStore: GraphStore, permissionChecker: PermissionChecker, operationRecordService: OperationRecordService, securityChecker: SecurityChecker, variableStore: VariableStore, localization: Localization, signalRAppId: string, textLibraryService?: TextLibraryService, languageService?: LanguageService, guiContext?: GuiContext);
32
+ handleMouseUp(): void;
33
+ private initOnDocMouseUpEvent;
23
34
  private checkElementPassword;
24
35
  private doSwitchOperator;
36
+ private writeValue;
25
37
  private initSwitchOperator;
26
38
  private initIndictorLightOperator;
27
39
  private currentStateIdChange;
28
40
  private switchToState;
29
41
  private initGraphAndText;
42
+ /**
43
+ * 释放资源
44
+ */
45
+ dispose(): void;
30
46
  private checkState;
31
47
  }
@@ -1,7 +1,7 @@
1
1
  import { LOGGER_SERVICE_TOKEN } from '../../logger';
2
2
  import * as d3 from 'd3-selection';
3
3
  import { isUndefined } from 'lodash';
4
- import { IndicatorLightType, SwitchType, State } from '../../model';
4
+ import { IndicatorLightType, SwitchType, State, BitSwitchOperation } from '../../model';
5
5
  import { VariableState } from '../../communication';
6
6
  import { ConditionalEnableElement } from '../base/conditional-enable-element';
7
7
  import { GraphStateElement } from '../shared/graph/graph-state-element';
@@ -17,19 +17,26 @@ import { DisplayMode, GlobalSettings } from '../../settings';
17
17
  import { VariableUtil } from '../../utils/variable-util';
18
18
  import { VariableDefinition } from '../../communication/variable/variable-definition';
19
19
  export class SwitchIndicatorLightElement extends ConditionalEnableElement {
20
- constructor(element, injector, modalService, variableCommunicator, graphStore, permissionChecker, operationRecordService, securityChecker, variableStore, localization, signalRAppId) {
20
+ constructor(element, injector, modalService, variableCommunicator, graphStore, permissionChecker, operationRecordService, securityChecker, variableStore, localization, signalRAppId, textLibraryService, languageService, guiContext) {
21
21
  super(element, permissionChecker, variableCommunicator, variableStore, localization, signalRAppId);
22
22
  this.modalService = modalService;
23
23
  this.graphStore = graphStore;
24
24
  this.operationRecordService = operationRecordService;
25
25
  this.securityChecker = securityChecker;
26
+ this.textLibraryService = textLibraryService;
27
+ this.languageService = languageService;
28
+ this.guiContext = guiContext;
29
+ this.isBitRestoration = false; // 是否是 位设定且执行设置是复位
30
+ this.isVerifiedForRestoration = false; // 位设定且执行设置是复位情况下,是否已经完成了验证
31
+ this.isWriteRestorationDownValue = false;
26
32
  this.logger = injector.get(LOGGER_SERVICE_TOKEN);
27
33
  this.isMobileMode = DisplayMode.Mobile === injector.get(GlobalSettings).displayMode;
28
34
  this.checkState();
29
35
  if (this.model.useSwitch) {
30
36
  this.initSwitchOperator();
31
37
  this.rootElement.style('cursor', 'hand');
32
- this.rootElement.on('mousedown', () => {
38
+ const isMobile = navigator.userAgent.match(/(phone|pad|pod|iPhone|iPod|ios|iPad|Android|Mobile|BlackBerry|IEMobile|MQQBrowser|JUC|Fennec|wOSBrowser|BrowserNG|WebOS|Symbian|Windows Phone)/i);
39
+ this.rootElement.on(this.isMobileMode && isMobile ? 'touchstart' : 'mousedown', () => {
33
40
  if (!this.isInitialized) {
34
41
  return;
35
42
  }
@@ -43,31 +50,39 @@ export class SwitchIndicatorLightElement extends ConditionalEnableElement {
43
50
  return;
44
51
  }
45
52
  if (this.switchOperator.canExecute()) {
46
- if (this.model.useSecurity) {
47
- const modalRef = this.modalService.show(ConfirmOperationModalComponent, { backdrop: 'static', class: 'gui-modal-dialog-position', animated: false });
48
- const onClosedSub = modalRef.content.onClosed.subscribe(result => {
49
- modalRef.hide();
50
- onClosedSub.unsubscribe();
51
- if (result) {
52
- this.checkElementPassword();
53
+ if (!this.isBitRestoration || !this.isVerifiedForRestoration) {
54
+ if (this.model.useSecurity) {
55
+ const modalRef = this.modalService.show(ConfirmOperationModalComponent, { backdrop: 'static', class: 'gui-modal-dialog-position', animated: false });
56
+ const onClosedSub = modalRef.content.onClosed.subscribe(result => {
57
+ modalRef.hide();
58
+ onClosedSub.unsubscribe();
59
+ if (result) {
60
+ this.checkElementPassword(true);
61
+ }
62
+ });
63
+ }
64
+ else {
65
+ this.checkElementPassword(false);
66
+ if (!this.model.useIndicatorLight) {
67
+ this.switchToState(1);
53
68
  }
54
- });
69
+ }
55
70
  }
56
71
  else {
57
- this.checkElementPassword();
58
- if (!this.model.useIndicatorLight && !this.isMobileMode) {
59
- this.switchToState(1);
60
- }
72
+ document.addEventListener(this.isMobileMode ? 'touchend' : 'mouseup', this.onDocMouseUp);
73
+ this.restorationTimer = setTimeout(() => {
74
+ this.writeValue(1);
75
+ this.isWriteRestorationDownValue = true;
76
+ }, 1000);
61
77
  }
62
78
  d3.event.preventDefault();
63
79
  }
64
80
  });
65
- if (!this.model.useIndicatorLight && !this.isMobileMode) {
66
- this.rootElement.on('mouseup', () => {
67
- this.switchToState(0);
68
- d3.event.preventDefault();
69
- });
70
- }
81
+ this.rootElement.on(this.isMobileMode && isMobile ? 'touchend' : 'mouseup', () => {
82
+ this.handleMouseUp();
83
+ d3.event.stopPropagation();
84
+ });
85
+ this.initOnDocMouseUpEvent();
71
86
  }
72
87
  this.initGraphAndText();
73
88
  if (this.model.useIndicatorLight) {
@@ -77,19 +92,62 @@ export class SwitchIndicatorLightElement extends ConditionalEnableElement {
77
92
  this.switchToState(0);
78
93
  }
79
94
  }
80
- checkElementPassword() {
95
+ handleMouseUp() {
96
+ if (this.restorationTimer) {
97
+ clearTimeout(this.restorationTimer);
98
+ this.restorationTimer = undefined;
99
+ }
100
+ if (this.isBitRestoration && this.isWriteRestorationDownValue) {
101
+ this.writeValue(0);
102
+ }
103
+ document.removeEventListener(this.isMobileMode ? 'touchend' : 'mouseup', this.onDocMouseUp);
104
+ this.isVerifiedForRestoration = false;
105
+ this.isWriteRestorationDownValue = false;
106
+ if (!this.model.useIndicatorLight) {
107
+ this.switchToState(0);
108
+ if (d3.event) {
109
+ d3.event.preventDefault();
110
+ }
111
+ }
112
+ }
113
+ initOnDocMouseUpEvent() {
114
+ this.onDocMouseUp = () => {
115
+ this.handleMouseUp();
116
+ };
117
+ }
118
+ checkElementPassword(afterConfirm) {
81
119
  if (this.model.enablePassword) {
82
120
  const modalRef = this.modalService.show(VerifyPasswordModalComponent, { initialState: { securityChecker: this.securityChecker }, backdrop: 'static', class: 'gui-modal-dialog-position', animated: false });
83
121
  const onClosedSub = modalRef.content.onClosed.subscribe(result => {
84
122
  modalRef.hide();
85
123
  onClosedSub.unsubscribe();
86
124
  if (result) {
87
- this.doSwitchOperator();
125
+ if (!this.isBitRestoration) {
126
+ this.doSwitchOperator();
127
+ }
128
+ else {
129
+ this.isVerifiedForRestoration = true;
130
+ }
88
131
  }
89
132
  });
90
133
  }
91
134
  else {
92
- this.doSwitchOperator();
135
+ if (!this.isBitRestoration) {
136
+ this.doSwitchOperator();
137
+ }
138
+ else {
139
+ if (afterConfirm) {
140
+ this.isVerifiedForRestoration = true;
141
+ }
142
+ else {
143
+ this.isVerifiedForRestoration = true;
144
+ document.addEventListener(this.isMobileMode ? 'touchend' : 'mouseup', this.onDocMouseUp);
145
+ this.restorationTimer = setTimeout(() => {
146
+ this.writeValue(1);
147
+ this.isWriteRestorationDownValue = true;
148
+ }, 1000);
149
+ }
150
+ }
93
151
  }
94
152
  }
95
153
  doSwitchOperator() {
@@ -106,12 +164,27 @@ export class SwitchIndicatorLightElement extends ConditionalEnableElement {
106
164
  throw new Error('Failure of the operation record:switchOperator');
107
165
  });
108
166
  }
167
+ writeValue(value) {
168
+ this.switchOperator.writeValue(value).then(args => {
169
+ if (this.model.isRecordOperation || this.model.isRecordOperation === undefined) {
170
+ if (args.newValue !== undefined || args.originValue !== undefined) {
171
+ this.operationRecordService.record({
172
+ variableOptionModel: args,
173
+ operationDescription: this.model.operationDescription
174
+ });
175
+ }
176
+ }
177
+ }).catch(() => {
178
+ throw new Error('Failure of the operation record:switchOperator');
179
+ });
180
+ }
109
181
  initSwitchOperator() {
110
182
  const settings = this.model.switchSettings;
111
183
  switch (settings.type) {
112
184
  case SwitchType.Bit:
113
185
  this.switchOperator =
114
186
  new BitSwitchOperator(settings.settings, this.variableCommunicator, this.variableStore, this.signalRAppId);
187
+ this.isBitRestoration = settings.settings.operation === BitSwitchOperation.Restoration;
115
188
  break;
116
189
  case SwitchType.Word:
117
190
  this.switchOperator =
@@ -168,9 +241,31 @@ export class SwitchIndicatorLightElement extends ConditionalEnableElement {
168
241
  this.graphStateElement = new GraphStateElement(this.model.graphSetting, width, height, this.graphStore, this.logger, this.model.version, this.model.states);
169
242
  this.$element.append(this.graphStateElement.Element);
170
243
  }
171
- this.textStateElement = new TextStateElement(this.model.states, width, height, this.logger, this.model.version, this.model.states);
244
+ this.textStateElement = new TextStateElement(this.model.states, width, height, this.logger, this.model.version, this.model.states, this.model.textLibrary, this.textLibraryService, this.languageService, this.guiContext);
172
245
  this.$element.append(this.textStateElement.Element);
173
246
  }
247
+ /**
248
+ * 释放资源
249
+ */
250
+ dispose() {
251
+ // 释放文本元素资源(取消语种变化订阅等)
252
+ if (this.textStateElement) {
253
+ this.textStateElement.dispose();
254
+ }
255
+ // 释放指示灯操作器资源
256
+ if (this.indicatorLightOperator) {
257
+ // indicatorLightOperator 可能有自己的dispose方法
258
+ }
259
+ // 清除定时器
260
+ if (this.restorationTimer) {
261
+ clearTimeout(this.restorationTimer);
262
+ this.restorationTimer = undefined;
263
+ }
264
+ // 移除事件监听
265
+ if (this.onDocMouseUp) {
266
+ document.removeEventListener(this.isMobileMode ? 'touchend' : 'mouseup', this.onDocMouseUp);
267
+ }
268
+ }
174
269
  checkState() {
175
270
  if (!this.model.states) {
176
271
  throw new Error('The switch indicator light\'s states is undefined.');
@@ -1 +1 @@
1
- [{"__symbolic":"module","version":4,"metadata":{"SwitchIndicatorLightElement":{"__symbolic":"class","extends":{"__symbolic":"reference","module":"../base/conditional-enable-element","name":"ConditionalEnableElement","line":32,"character":49},"members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"error","message":"Could not resolve type","line":44,"character":25,"context":{"typeName":"HTMLElement"}},{"__symbolic":"reference","module":"@angular/core","name":"Injector","line":45,"character":18},{"__symbolic":"reference","module":"ngx-bootstrap/modal","name":"BsModalService","line":46,"character":39},{"__symbolic":"reference","module":"../../communication","name":"VariableCommunicator","line":47,"character":30},{"__symbolic":"reference","module":"../../config","name":"GraphStore","line":48,"character":37},{"__symbolic":"reference","module":"../../service","name":"PermissionChecker","line":49,"character":27},{"__symbolic":"reference","module":"../../service","name":"OperationRecordService","line":50,"character":49},{"__symbolic":"reference","module":"../../security","name":"SecurityChecker","line":51,"character":42},{"__symbolic":"reference","module":"../../config","name":"VariableStore","line":52,"character":23},{"__symbolic":"reference","module":"../../localization","name":"Localization","line":53,"character":22},{"__symbolic":"reference","name":"string"}]}],"checkElementPassword":[{"__symbolic":"method"}],"doSwitchOperator":[{"__symbolic":"method"}],"initSwitchOperator":[{"__symbolic":"method"}],"initIndictorLightOperator":[{"__symbolic":"method"}],"currentStateIdChange":[{"__symbolic":"method"}],"switchToState":[{"__symbolic":"method"}],"initGraphAndText":[{"__symbolic":"method"}],"checkState":[{"__symbolic":"method"}]}}}}]
1
+ [{"__symbolic":"module","version":4,"metadata":{"SwitchIndicatorLightElement":{"__symbolic":"class","extends":{"__symbolic":"reference","module":"../base/conditional-enable-element","name":"ConditionalEnableElement","line":33,"character":49},"members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"error","message":"Could not resolve type","line":51,"character":25,"context":{"typeName":"HTMLElement"}},{"__symbolic":"reference","module":"@angular/core","name":"Injector","line":52,"character":18},{"__symbolic":"reference","module":"ngx-bootstrap/modal","name":"BsModalService","line":53,"character":39},{"__symbolic":"reference","module":"../../communication","name":"VariableCommunicator","line":54,"character":30},{"__symbolic":"reference","module":"../../config","name":"GraphStore","line":55,"character":37},{"__symbolic":"reference","module":"../../service","name":"PermissionChecker","line":56,"character":27},{"__symbolic":"reference","module":"../../service","name":"OperationRecordService","line":57,"character":49},{"__symbolic":"reference","module":"../../security","name":"SecurityChecker","line":58,"character":42},{"__symbolic":"reference","module":"../../config","name":"VariableStore","line":59,"character":23},{"__symbolic":"reference","module":"../../localization","name":"Localization","line":60,"character":22},{"__symbolic":"reference","name":"string"},{"__symbolic":"reference","module":"../../service","name":"TextLibraryService","line":62,"character":46},{"__symbolic":"reference","module":"../../service","name":"LanguageService","line":63,"character":43},{"__symbolic":"reference","module":"../../gui/gui-context","name":"GuiContext","line":64,"character":38}]}],"handleMouseUp":[{"__symbolic":"method"}],"initOnDocMouseUpEvent":[{"__symbolic":"method"}],"checkElementPassword":[{"__symbolic":"method"}],"doSwitchOperator":[{"__symbolic":"method"}],"writeValue":[{"__symbolic":"method"}],"initSwitchOperator":[{"__symbolic":"method"}],"initIndictorLightOperator":[{"__symbolic":"method"}],"currentStateIdChange":[{"__symbolic":"method"}],"switchToState":[{"__symbolic":"method"}],"initGraphAndText":[{"__symbolic":"method"}],"dispose":[{"__symbolic":"method"}],"checkState":[{"__symbolic":"method"}]}}}}]
@@ -2,4 +2,5 @@ import { VariableOptionModel } from '../../service';
2
2
  export interface SwitchOperator {
3
3
  canExecute(): boolean;
4
4
  execute(): Promise<VariableOptionModel>;
5
+ writeValue(value: number): Promise<VariableOptionModel>;
5
6
  }
@@ -14,4 +14,5 @@ export declare class WordSwitchOperator implements SwitchOperator {
14
14
  constructor(settings: WordSwitchSettings, variableCommunicator: VariableCommunicator, variableStore: VariableStore, signalRAppId: string);
15
15
  canExecute(): boolean;
16
16
  execute(): Promise<VariableOptionModel>;
17
+ writeValue(value: any): Promise<VariableOptionModel>;
17
18
  }
@@ -66,4 +66,10 @@ export class WordSwitchOperator {
66
66
  newValue: newValue
67
67
  });
68
68
  }
69
+ // 此方法为 位设定添加的,字设定目前不会用到,为了解决接口error,添加一个空实现
70
+ writeValue(value) {
71
+ return Promise.resolve({
72
+ newValue: value
73
+ });
74
+ }
69
75
  }
@@ -1 +1 @@
1
- [{"__symbolic":"module","version":4,"metadata":{"WordSwitchOperator":{"__symbolic":"class","members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","module":"../../model","name":"WordSwitchSettings","line":20,"character":43},{"__symbolic":"reference","module":"../../communication","name":"VariableCommunicator","line":20,"character":102},{"__symbolic":"reference","module":"../../config","name":"VariableStore","line":21,"character":40},{"__symbolic":"reference","name":"string"}]}],"canExecute":[{"__symbolic":"method"}],"execute":[{"__symbolic":"method"}]}}}}]
1
+ [{"__symbolic":"module","version":4,"metadata":{"WordSwitchOperator":{"__symbolic":"class","members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","module":"../../model","name":"WordSwitchSettings","line":20,"character":43},{"__symbolic":"reference","module":"../../communication","name":"VariableCommunicator","line":20,"character":102},{"__symbolic":"reference","module":"../../config","name":"VariableStore","line":21,"character":40},{"__symbolic":"reference","name":"string"}]}],"canExecute":[{"__symbolic":"method"}],"execute":[{"__symbolic":"method"}],"writeValue":[{"__symbolic":"method"}]}}}}]
@@ -16,6 +16,9 @@ export declare class VideoElement extends ConditionalDisplayElement {
16
16
  private videoId;
17
17
  private isShow;
18
18
  private videoPlayer;
19
+ private refreshTimer;
20
+ private isFullscreen;
21
+ private videoUrl;
19
22
  constructor(element: HTMLElement, injector: Injector, permissionChecker: PermissionChecker, variableCommunicator: VariableCommunicator, variableStore: VariableStore, videoService: VideoService, guiSize: Size, svgRootClass: string, signalRAppId: string);
20
23
  dispose(): void;
21
24
  hide(): void;
@@ -24,4 +27,5 @@ export declare class VideoElement extends ConditionalDisplayElement {
24
27
  private initVideo;
25
28
  private addVideoAddressToolTip;
26
29
  private setAndroidVideo;
30
+ private setIosVideo;
27
31
  }
@@ -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
  }