@magic-xpa/engine 4.1100.0-dev4110.26 → 4.1100.0-dev4110.260

Sign up to get free protection for your applications and to get access to all the features.
Files changed (491) hide show
  1. package/{esm2020 → esm2022}/index.mjs +188 -188
  2. package/{esm2020 → esm2022}/magic-xpa-engine.mjs +1 -1
  3. package/esm2022/src/AccessHelper.mjs +15 -0
  4. package/esm2022/src/ClientManager.mjs +418 -0
  5. package/esm2022/src/CommandsProcessorBase.mjs +56 -0
  6. package/{esm2020 → esm2022}/src/CommandsProcessorManager.mjs +25 -25
  7. package/esm2022/src/CommandsTable.mjs +162 -0
  8. package/esm2022/src/ConstInterface.mjs +517 -0
  9. package/{esm2020 → esm2022}/src/CurrentClientVersion.mjs +2 -2
  10. package/esm2022/src/FlowMonitorInterface.mjs +16 -0
  11. package/esm2022/src/GUIManager.mjs +62 -0
  12. package/esm2022/src/GlobalCommandsManager.mjs +34 -0
  13. package/esm2022/src/GuiEventsProcessor.mjs +156 -0
  14. package/{esm2020 → esm2022}/src/ICommandsTable.mjs +1 -1
  15. package/esm2022/src/ServerConfig.mjs +122 -0
  16. package/{esm2020 → esm2022}/src/bridge/IGuiEvent.mjs +19 -19
  17. package/esm2022/src/bridge/MagicBridge.mjs +41 -0
  18. package/esm2022/src/commands/ClientOriginatedCommandTaskTag.mjs +12 -0
  19. package/{esm2020 → esm2022}/src/commands/ClientToServer/AddUserLocateDataViewCommand.mjs +8 -8
  20. package/{esm2020 → esm2022}/src/commands/ClientToServer/AddUserRangeDataviewCommand.mjs +9 -9
  21. package/{esm2020 → esm2022}/src/commands/ClientToServer/AddUserSortDataViewCommand.mjs +9 -9
  22. package/esm2022/src/commands/ClientToServer/BrowserEscEventCommand.mjs +26 -0
  23. package/{esm2020 → esm2022}/src/commands/ClientToServer/ClientOriginatedCommand.mjs +14 -14
  24. package/{esm2020 → esm2022}/src/commands/ClientToServer/ClientOriginatedCommandSerializer.mjs +59 -59
  25. package/esm2022/src/commands/ClientToServer/ColumnSortEventCommand.mjs +29 -0
  26. package/esm2022/src/commands/ClientToServer/CommandFactory.mjs +261 -0
  27. package/esm2022/src/commands/ClientToServer/CommandSerializationHelper.mjs +67 -0
  28. package/esm2022/src/commands/ClientToServer/ComputeEventCommand.mjs +26 -0
  29. package/{esm2020 → esm2022}/src/commands/ClientToServer/ContextTerminationEventCommand.mjs +24 -21
  30. package/{esm2020 → esm2022}/src/commands/ClientToServer/ContextTimeoutResetCommand.mjs +23 -20
  31. package/{esm2020 → esm2022}/src/commands/ClientToServer/ControlItemsRefreshCommand.mjs +8 -8
  32. package/esm2022/src/commands/ClientToServer/DataViewOutputCommand.mjs +13 -0
  33. package/{esm2020 → esm2022}/src/commands/ClientToServer/DataviewCommand.mjs +44 -44
  34. package/esm2022/src/commands/ClientToServer/EvaluateCommand.mjs +40 -0
  35. package/{esm2020 → esm2022}/src/commands/ClientToServer/EventCommand.mjs +43 -40
  36. package/esm2022/src/commands/ClientToServer/ExecOperCommand.mjs +70 -0
  37. package/esm2022/src/commands/ClientToServer/FetchDataControlValuesEventCommand.mjs +25 -0
  38. package/{esm2020 → esm2022}/src/commands/ClientToServer/GlobalParamsQueryCommand.mjs +10 -10
  39. package/{esm2020 → esm2022}/src/commands/ClientToServer/ICommandTaskTag.mjs +1 -1
  40. package/esm2022/src/commands/ClientToServer/IndexChangeEventCommand.mjs +24 -0
  41. package/esm2022/src/commands/ClientToServer/IniputForceWriteCommand.mjs +26 -0
  42. package/{esm2020 → esm2022}/src/commands/ClientToServer/NonReversibleExitEventCommand.mjs +26 -23
  43. package/{esm2020 → esm2022}/src/commands/ClientToServer/QueryCommand.mjs +20 -20
  44. package/esm2022/src/commands/ClientToServer/RecomputeCommand.mjs +30 -0
  45. package/esm2022/src/commands/ClientToServer/RefreshEventCommand.mjs +30 -0
  46. package/esm2022/src/commands/ClientToServer/RefreshScreenEventCommand.mjs +27 -0
  47. package/esm2022/src/commands/ClientToServer/RollbackEventCommand.mjs +43 -0
  48. package/esm2022/src/commands/ClientToServer/SelectProgramCommand.mjs +19 -0
  49. package/{esm2020 → esm2022}/src/commands/ClientToServer/SetTransactionStateDataviewCommand.mjs +9 -9
  50. package/esm2022/src/commands/ClientToServer/SubformOpenEventCommand.mjs +24 -0
  51. package/esm2022/src/commands/ClientToServer/SubformRefreshEventCommand.mjs +27 -0
  52. package/esm2022/src/commands/ClientToServer/TransactionCommand.mjs +34 -0
  53. package/{esm2020 → esm2022}/src/commands/ClientToServer/UnloadCommand.mjs +18 -15
  54. package/esm2022/src/commands/ClientToServer/WriteMessageToServerLogCommand.mjs +18 -0
  55. package/esm2022/src/commands/DataViewCommandBase.mjs +8 -0
  56. package/{esm2020 → esm2022}/src/commands/IClientCommand.mjs +1 -1
  57. package/esm2022/src/commands/IClientTargetedCommand.mjs +13 -0
  58. package/{esm2020 → esm2022}/src/commands/IClientToServerCommandInfo.mjs +2 -2
  59. package/esm2022/src/commands/ServerToClient/AbortCommand.mjs +65 -0
  60. package/{esm2020 → esm2022}/src/commands/ServerToClient/AddLocateCommand.mjs +21 -21
  61. package/{esm2020 → esm2022}/src/commands/ServerToClient/AddRangeCommand.mjs +62 -62
  62. package/{esm2020 → esm2022}/src/commands/ServerToClient/AddSortCommand.mjs +33 -33
  63. package/esm2022/src/commands/ServerToClient/ClientRefreshCommand.mjs +25 -0
  64. package/esm2022/src/commands/ServerToClient/ClientTargetedCommandBase.mjs +24 -0
  65. package/esm2022/src/commands/ServerToClient/EnhancedVerifyCommand.mjs +45 -0
  66. package/esm2022/src/commands/ServerToClient/OpenURLCommand.mjs +221 -0
  67. package/{esm2020 → esm2022}/src/commands/ServerToClient/ResetLocateCommand.mjs +14 -14
  68. package/{esm2020 → esm2022}/src/commands/ServerToClient/ResetRangeCommand.mjs +14 -14
  69. package/{esm2020 → esm2022}/src/commands/ServerToClient/ResetSortCommand.mjs +14 -14
  70. package/esm2022/src/commands/ServerToClient/ResultCommand.mjs +37 -0
  71. package/esm2022/src/commands/ServerToClient/VerifyCommand.mjs +83 -0
  72. package/{esm2020 → esm2022}/src/commands/ServerToClient/XMLBasedCommandBuilder.mjs +132 -132
  73. package/{esm2020 → esm2022}/src/communications/IConnectionStateManager.mjs +1 -1
  74. package/esm2022/src/communications/InteractiveCommunicationsFailureHandler.mjs +15 -0
  75. package/{esm2020 → esm2022}/src/data/DataSourceIdKey.mjs +2 -2
  76. package/esm2022/src/data/DataView.mjs +1613 -0
  77. package/{esm2020 → esm2022}/src/data/DataViewBase.mjs +3 -3
  78. package/esm2022/src/data/DataviewManager.mjs +28 -0
  79. package/esm2022/src/data/DataviewManagerBase.mjs +15 -0
  80. package/esm2022/src/data/DvCache.mjs +67 -0
  81. package/esm2022/src/data/Field.mjs +646 -0
  82. package/esm2022/src/data/FieldBase.mjs +15 -0
  83. package/esm2022/src/data/FieldsTable.mjs +103 -0
  84. package/{esm2020 → esm2022}/src/data/IRecordsTable.mjs +1 -1
  85. package/{esm2020 → esm2022}/src/data/Key.mjs +88 -88
  86. package/esm2022/src/data/Record.mjs +880 -0
  87. package/{esm2020 → esm2022}/src/data/RecordOutOfDataViewException.mjs +15 -15
  88. package/esm2022/src/data/RecordsTable.mjs +267 -0
  89. package/{esm2020 → esm2022}/src/data/TaskTransactionManager.mjs +107 -103
  90. package/{esm2020 → esm2022}/src/data/XMLBasedDcValuesBuilder.mjs +74 -74
  91. package/{esm2020 → esm2022}/src/enums.mjs +23 -23
  92. package/esm2022/src/env/EnvVariablesTable.mjs +340 -0
  93. package/esm2022/src/env/Environment.mjs +487 -0
  94. package/{esm2020 → esm2022}/src/env/ILanguageData.mjs +1 -1
  95. package/esm2022/src/env/LanguageData.mjs +227 -0
  96. package/{esm2020 → esm2022}/src/env/MirrorString.mjs +65 -65
  97. package/esm2022/src/event/ActionManager.mjs +91 -0
  98. package/esm2022/src/event/Event.mjs +1333 -0
  99. package/esm2022/src/event/EventHandler.mjs +766 -0
  100. package/esm2022/src/event/EventHandlerPosition.mjs +204 -0
  101. package/esm2022/src/event/EventsManager.mjs +2988 -0
  102. package/{esm2020 → esm2022}/src/event/IEventsManager.mjs +6 -6
  103. package/esm2022/src/event/RunTimeEvent.mjs +399 -0
  104. package/{esm2020 → esm2022}/src/event/RunTimeEventBase.mjs +3 -3
  105. package/esm2022/src/event/UserEventsTable.mjs +47 -0
  106. package/esm2022/src/exp/ExpTable.mjs +57 -0
  107. package/esm2022/src/exp/Expression.mjs +200 -0
  108. package/esm2022/src/exp/ExpressionDict.mjs +727 -0
  109. package/esm2022/src/exp/ExpressionEvaluator.mjs +4206 -0
  110. package/esm2022/src/exp/ExpressionLocalJpn.mjs +314 -0
  111. package/{esm2020 → esm2022}/src/exp/GlobalParamsTable.mjs +85 -85
  112. package/esm2022/src/exp/YesNoExp.mjs +36 -0
  113. package/esm2022/src/gui/CreatedFormVector.mjs +23 -0
  114. package/esm2022/src/gui/FormsTable.mjs +66 -0
  115. package/esm2022/src/gui/MgControl.mjs +363 -0
  116. package/esm2022/src/gui/MgForm.mjs +1224 -0
  117. package/esm2022/src/http/HttpManager.mjs +97 -0
  118. package/esm2022/src/http/client/HttpClientAsync.mjs +68 -0
  119. package/{esm2020 → esm2022}/src/http/client/HttpClientBase.mjs +132 -132
  120. package/esm2022/src/http/client/HttpClientEvents.mjs +39 -0
  121. package/esm2022/src/http/client/HttpClientSync.mjs +42 -0
  122. package/esm2022/src/http/client/HttpUtility.mjs +84 -0
  123. package/{esm2020 → esm2022}/src/http/client/ICommunicationsFailureHandler.mjs +1 -1
  124. package/{esm2020 → esm2022}/src/remote/AddUserLocateRemoteDataViewCommand.mjs +18 -18
  125. package/{esm2020 → esm2022}/src/remote/AddUserRangeRemoteDataViewCommand.mjs +18 -18
  126. package/{esm2020 → esm2022}/src/remote/AddUserSortRemoteDataViewCommand.mjs +18 -18
  127. package/esm2022/src/remote/RemoteCommandsProcessor.mjs +883 -0
  128. package/{esm2020 → esm2022}/src/remote/RemoteControlItemsRefreshCommand.mjs +25 -25
  129. package/{esm2020 → esm2022}/src/remote/RemoteDataViewCommandBase.mjs +24 -24
  130. package/{esm2020 → esm2022}/src/remote/RemoteDataViewCommandFactory.mjs +60 -60
  131. package/{esm2020 → esm2022}/src/remote/RemoteDataViewCommandUpdateNonModifiable.mjs +15 -15
  132. package/{esm2020 → esm2022}/src/remote/RemoteDataviewManager.mjs +17 -17
  133. package/{esm2020 → esm2022}/src/remote/RemoteInitDataViewCommand.mjs +10 -10
  134. package/{esm2020 → esm2022}/src/remote/ResetUserLocateRemoteDataviewCommand.mjs +16 -16
  135. package/{esm2020 → esm2022}/src/remote/ResetUserRangeRemoteDataviewCommand.mjs +12 -12
  136. package/{esm2020 → esm2022}/src/remote/ResetUserSortRemoteDataviewCommand.mjs +15 -15
  137. package/esm2022/src/remote/ServerError.mjs +40 -0
  138. package/{esm2020 → esm2022}/src/remote/SetTransactionStateRemoteDataViewCommand.mjs +19 -19
  139. package/esm2022/src/rt/Argument.mjs +265 -0
  140. package/esm2022/src/rt/ArgumentsList.mjs +103 -0
  141. package/esm2022/src/rt/Boundary.mjs +152 -0
  142. package/esm2022/src/rt/CompMainPrgTable.mjs +63 -0
  143. package/esm2022/src/rt/DataviewHeaderBase.mjs +98 -0
  144. package/{esm2020 → esm2022}/src/rt/DataviewHeaderFactory.mjs +6 -6
  145. package/esm2022/src/rt/DataviewHeaders.mjs +53 -0
  146. package/{esm2020 → esm2022}/src/rt/DataviewHeadersSaxHandler.mjs +38 -38
  147. package/{esm2020 → esm2022}/src/rt/ExecutionStack.mjs +94 -94
  148. package/{esm2020 → esm2022}/src/rt/ExecutionStackEntry.mjs +17 -17
  149. package/{esm2020 → esm2022}/src/rt/HandlersTable.mjs +96 -96
  150. package/{esm2020 → esm2022}/src/rt/IDataSourceViewDefinition.mjs +1 -1
  151. package/{esm2020 → esm2022}/src/rt/IDataviewHeader.mjs +1 -1
  152. package/{esm2020 → esm2022}/src/rt/IResultValue.mjs +1 -1
  153. package/esm2022/src/rt/LastFocusedManager.mjs +65 -0
  154. package/esm2022/src/rt/Operation.mjs +735 -0
  155. package/esm2022/src/rt/OperationTable.mjs +67 -0
  156. package/esm2022/src/rt/Recompute.mjs +355 -0
  157. package/{esm2020 → esm2022}/src/rt/RecomputeTable.mjs +62 -62
  158. package/{esm2020 → esm2022}/src/rt/RemoteDataviewHeader.mjs +108 -108
  159. package/esm2022/src/rt/ResultValue.mjs +10 -0
  160. package/esm2022/src/rt/TableCache.mjs +177 -0
  161. package/esm2022/src/rt/TableCacheManager.mjs +67 -0
  162. package/esm2022/src/rt/Transaction.mjs +53 -0
  163. package/esm2022/src/security/UserDetails.mjs +71 -0
  164. package/{esm2020 → esm2022}/src/tasks/IMGDataCollection.mjs +1 -1
  165. package/esm2022/src/tasks/MGData.mjs +552 -0
  166. package/esm2022/src/tasks/MGDataCollection.mjs +252 -0
  167. package/esm2022/src/tasks/RCTimer.mjs +63 -0
  168. package/{esm2020 → esm2022}/src/tasks/RemoteTaskService.mjs +44 -44
  169. package/esm2022/src/tasks/Task.mjs +2499 -0
  170. package/esm2022/src/tasks/TaskBase.mjs +83 -0
  171. package/{esm2020 → esm2022}/src/tasks/TaskServiceBase.mjs +24 -24
  172. package/esm2022/src/tasks/TasksTable.mjs +80 -0
  173. package/esm2022/src/tasks/sort/Sort.mjs +5 -0
  174. package/{esm2020 → esm2022}/src/tasks/sort/SortCollection.mjs +67 -67
  175. package/{esm2020 → esm2022}/src/util/ConstUtils.mjs +13 -13
  176. package/esm2022/src/util/FlowMonitorQueue.mjs +451 -0
  177. package/{esm2020 → esm2022}/src/util/HeapSort.mjs +69 -69
  178. package/{esm2020 → esm2022}/src/util/IMirrorXML.mjs +1 -1
  179. package/{esm2020 → esm2022}/src/util/IServerConfig.mjs +1 -1
  180. package/{esm2020 → esm2022}/src/util/MgBlockingQueue.mjs +1 -1
  181. package/esm2022/src/util/MgPriorityBlockingQueue.mjs +74 -0
  182. package/esm2022/src/util/MgPriorityQueue.mjs +66 -0
  183. package/{esm2020 → esm2022}/src/util/ParamParseResult.mjs +7 -7
  184. package/esm2022/src/util/PrmMap.mjs +152 -0
  185. package/esm2022/src/util/ReturnResult.mjs +46 -0
  186. package/esm2022/src/util/ReturnResultBase.mjs +18 -0
  187. package/esm2022/src/util/Scrambler.mjs +89 -0
  188. package/esm2022/src/util/UniqueIDUtils.mjs +13 -0
  189. package/{esm2020 → esm2022}/src/util/cookie.service.mjs +91 -91
  190. package/{fesm2020 → fesm2022}/magic-xpa-engine.mjs +29885 -29693
  191. package/fesm2022/magic-xpa-engine.mjs.map +1 -0
  192. package/index.d.ts +187 -187
  193. package/package.json +8 -14
  194. package/src/AccessHelper.d.ts +20 -20
  195. package/src/ClientManager.d.ts +35 -32
  196. package/src/CommandsProcessorBase.d.ts +23 -23
  197. package/src/CommandsProcessorManager.d.ts +6 -6
  198. package/src/CommandsTable.d.ts +22 -22
  199. package/src/ConstInterface.d.ts +516 -515
  200. package/src/CurrentClientVersion.d.ts +1 -1
  201. package/src/FlowMonitorInterface.d.ts +15 -15
  202. package/src/GUIManager.d.ts +17 -17
  203. package/src/GlobalCommandsManager.d.ts +17 -17
  204. package/src/GuiEventsProcessor.d.ts +24 -24
  205. package/src/ICommandsTable.d.ts +9 -9
  206. package/src/ServerConfig.d.ts +35 -34
  207. package/src/bridge/IGuiEvent.d.ts +19 -19
  208. package/src/bridge/MagicBridge.d.ts +16 -16
  209. package/src/commands/ClientOriginatedCommandTaskTag.d.ts +8 -8
  210. package/src/commands/ClientToServer/AddUserLocateDataViewCommand.d.ts +4 -4
  211. package/src/commands/ClientToServer/AddUserRangeDataviewCommand.d.ts +6 -6
  212. package/src/commands/ClientToServer/AddUserSortDataViewCommand.d.ts +6 -6
  213. package/src/commands/ClientToServer/BrowserEscEventCommand.d.ts +9 -8
  214. package/src/commands/ClientToServer/ClientOriginatedCommand.d.ts +8 -8
  215. package/src/commands/ClientToServer/ClientOriginatedCommandSerializer.d.ts +6 -6
  216. package/src/commands/ClientToServer/ColumnSortEventCommand.d.ts +11 -10
  217. package/src/commands/ClientToServer/CommandFactory.d.ts +64 -64
  218. package/src/commands/ClientToServer/CommandSerializationHelper.d.ts +20 -20
  219. package/src/commands/ClientToServer/ComputeEventCommand.d.ts +9 -8
  220. package/src/commands/ClientToServer/ContextTerminationEventCommand.d.ts +8 -7
  221. package/src/commands/ClientToServer/ContextTimeoutResetCommand.d.ts +8 -7
  222. package/src/commands/ClientToServer/ControlItemsRefreshCommand.d.ts +6 -6
  223. package/src/commands/ClientToServer/DataViewOutputCommand.d.ts +9 -9
  224. package/src/commands/ClientToServer/DataviewCommand.d.ts +32 -32
  225. package/src/commands/ClientToServer/EvaluateCommand.d.ts +16 -15
  226. package/src/commands/ClientToServer/EventCommand.d.ts +16 -15
  227. package/src/commands/ClientToServer/ExecOperCommand.d.ts +24 -23
  228. package/src/commands/ClientToServer/FetchDataControlValuesEventCommand.d.ts +9 -8
  229. package/src/commands/ClientToServer/GlobalParamsQueryCommand.d.ts +5 -5
  230. package/src/commands/ClientToServer/ICommandTaskTag.d.ts +3 -3
  231. package/src/commands/ClientToServer/IndexChangeEventCommand.d.ts +9 -8
  232. package/src/commands/ClientToServer/IniputForceWriteCommand.d.ts +11 -10
  233. package/src/commands/ClientToServer/NonReversibleExitEventCommand.d.ts +9 -8
  234. package/src/commands/ClientToServer/QueryCommand.d.ts +8 -8
  235. package/src/commands/ClientToServer/RecomputeCommand.d.ts +12 -11
  236. package/src/commands/ClientToServer/RefreshEventCommand.d.ts +13 -12
  237. package/src/commands/ClientToServer/RefreshScreenEventCommand.d.ts +11 -10
  238. package/src/commands/ClientToServer/RollbackEventCommand.d.ts +15 -14
  239. package/src/commands/ClientToServer/SelectProgramCommand.d.ts +7 -6
  240. package/src/commands/ClientToServer/SetTransactionStateDataviewCommand.d.ts +5 -5
  241. package/src/commands/ClientToServer/SubformOpenEventCommand.d.ts +9 -8
  242. package/src/commands/ClientToServer/SubformRefreshEventCommand.d.ts +10 -9
  243. package/src/commands/ClientToServer/TransactionCommand.d.ts +14 -12
  244. package/src/commands/ClientToServer/UnloadCommand.d.ts +8 -7
  245. package/src/commands/ClientToServer/WriteMessageToServerLogCommand.d.ts +6 -6
  246. package/src/commands/DataViewCommandBase.d.ts +6 -6
  247. package/src/commands/IClientCommand.d.ts +2 -2
  248. package/src/commands/IClientTargetedCommand.d.ts +12 -12
  249. package/src/commands/IClientToServerCommandInfo.d.ts +4 -3
  250. package/src/commands/ServerToClient/AbortCommand.d.ts +11 -11
  251. package/src/commands/ServerToClient/AddLocateCommand.d.ts +6 -6
  252. package/src/commands/ServerToClient/AddRangeCommand.d.ts +10 -10
  253. package/src/commands/ServerToClient/AddSortCommand.d.ts +9 -9
  254. package/src/commands/ServerToClient/ClientRefreshCommand.d.ts +7 -7
  255. package/src/commands/ServerToClient/ClientTargetedCommandBase.d.ts +12 -12
  256. package/src/commands/ServerToClient/EnhancedVerifyCommand.d.ts +13 -13
  257. package/src/commands/ServerToClient/OpenURLCommand.d.ts +21 -21
  258. package/src/commands/ServerToClient/ResetLocateCommand.d.ts +6 -6
  259. package/src/commands/ServerToClient/ResetRangeCommand.d.ts +6 -6
  260. package/src/commands/ServerToClient/ResetSortCommand.d.ts +6 -6
  261. package/src/commands/ServerToClient/ResultCommand.d.ts +10 -10
  262. package/src/commands/ServerToClient/VerifyCommand.d.ts +17 -17
  263. package/src/commands/ServerToClient/XMLBasedCommandBuilder.d.ts +11 -11
  264. package/src/communications/IConnectionStateManager.d.ts +4 -4
  265. package/src/communications/InteractiveCommunicationsFailureHandler.d.ts +6 -6
  266. package/src/data/DataSourceIdKey.d.ts +2 -2
  267. package/src/data/DataView.d.ts +162 -162
  268. package/src/data/DataViewBase.d.ts +12 -12
  269. package/src/data/DataviewManager.d.ts +14 -14
  270. package/src/data/DataviewManagerBase.d.ts +11 -11
  271. package/src/data/DvCache.d.ts +15 -15
  272. package/src/data/Field.d.ts +103 -103
  273. package/src/data/FieldBase.d.ts +23 -23
  274. package/src/data/FieldsTable.d.ts +27 -27
  275. package/src/data/IRecordsTable.d.ts +7 -7
  276. package/src/data/Key.d.ts +15 -15
  277. package/src/data/Record.d.ts +157 -156
  278. package/src/data/RecordOutOfDataViewException.d.ts +10 -10
  279. package/src/data/RecordsTable.d.ts +38 -38
  280. package/src/data/TaskTransactionManager.d.ts +17 -17
  281. package/src/data/XMLBasedDcValuesBuilder.d.ts +11 -11
  282. package/src/enums.d.ts +21 -21
  283. package/src/env/EnvVariablesTable.d.ts +17 -17
  284. package/src/env/Environment.d.ts +118 -118
  285. package/src/env/ILanguageData.d.ts +3 -3
  286. package/src/env/LanguageData.d.ts +20 -20
  287. package/src/env/MirrorString.d.ts +15 -15
  288. package/src/event/ActionManager.d.ts +14 -14
  289. package/src/event/Event.d.ts +79 -79
  290. package/src/event/EventHandler.d.ts +66 -66
  291. package/src/event/EventHandlerPosition.d.ts +25 -25
  292. package/src/event/EventsManager.d.ts +205 -204
  293. package/src/event/IEventsManager.d.ts +77 -77
  294. package/src/event/RunTimeEvent.d.ts +126 -123
  295. package/src/event/RunTimeEventBase.d.ts +5 -5
  296. package/src/event/UserEventsTable.d.ts +11 -11
  297. package/src/exp/ExpTable.d.ts +11 -11
  298. package/src/exp/Expression.d.ts +37 -37
  299. package/src/exp/ExpressionDict.d.ts +12 -12
  300. package/src/exp/ExpressionEvaluator.d.ts +198 -198
  301. package/src/exp/ExpressionLocalJpn.d.ts +18 -18
  302. package/src/exp/GlobalParamsTable.d.ts +19 -19
  303. package/src/exp/YesNoExp.d.ts +9 -9
  304. package/src/gui/CreatedFormVector.d.ts +10 -10
  305. package/src/gui/FormsTable.d.ts +15 -15
  306. package/src/gui/MgControl.d.ts +60 -60
  307. package/src/gui/MgForm.d.ts +96 -93
  308. package/src/http/HttpManager.d.ts +25 -25
  309. package/src/http/client/HttpClientAsync.d.ts +16 -16
  310. package/src/http/client/HttpClientBase.d.ts +30 -30
  311. package/src/http/client/HttpClientEvents.d.ts +18 -18
  312. package/src/http/client/HttpClientSync.d.ts +17 -17
  313. package/src/http/client/HttpUtility.d.ts +10 -10
  314. package/src/http/client/ICommunicationsFailureHandler.d.ts +5 -5
  315. package/src/remote/AddUserLocateRemoteDataViewCommand.d.ts +8 -8
  316. package/src/remote/AddUserRangeRemoteDataViewCommand.d.ts +8 -8
  317. package/src/remote/AddUserSortRemoteDataViewCommand.d.ts +8 -8
  318. package/src/remote/RemoteCommandsProcessor.d.ts +51 -51
  319. package/src/remote/RemoteControlItemsRefreshCommand.d.ts +8 -8
  320. package/src/remote/RemoteDataViewCommandBase.d.ts +10 -10
  321. package/src/remote/RemoteDataViewCommandFactory.d.ts +6 -6
  322. package/src/remote/RemoteDataViewCommandUpdateNonModifiable.d.ts +8 -8
  323. package/src/remote/RemoteDataviewManager.d.ts +9 -9
  324. package/src/remote/RemoteInitDataViewCommand.d.ts +7 -7
  325. package/src/remote/ResetUserLocateRemoteDataviewCommand.d.ts +7 -7
  326. package/src/remote/ResetUserRangeRemoteDataviewCommand.d.ts +7 -7
  327. package/src/remote/ResetUserSortRemoteDataviewCommand.d.ts +7 -7
  328. package/src/remote/ServerError.d.ts +16 -16
  329. package/src/remote/SetTransactionStateRemoteDataViewCommand.d.ts +8 -8
  330. package/src/rt/Argument.d.ts +36 -36
  331. package/src/rt/ArgumentsList.d.ts +24 -24
  332. package/src/rt/Boundary.d.ts +27 -27
  333. package/src/rt/CompMainPrgTable.d.ts +10 -10
  334. package/src/rt/DataviewHeaderBase.d.ts +34 -34
  335. package/src/rt/DataviewHeaderFactory.d.ts +5 -5
  336. package/src/rt/DataviewHeaders.d.ts +12 -12
  337. package/src/rt/DataviewHeadersSaxHandler.d.ts +10 -10
  338. package/src/rt/ExecutionStack.d.ts +22 -22
  339. package/src/rt/ExecutionStackEntry.d.ts +7 -7
  340. package/src/rt/HandlersTable.d.ts +19 -19
  341. package/src/rt/IDataSourceViewDefinition.d.ts +6 -6
  342. package/src/rt/IDataviewHeader.d.ts +10 -10
  343. package/src/rt/IResultValue.d.ts +4 -4
  344. package/src/rt/LastFocusedManager.d.ts +23 -23
  345. package/src/rt/Operation.d.ts +97 -97
  346. package/src/rt/OperationTable.d.ts +15 -15
  347. package/src/rt/Recompute.d.ts +41 -41
  348. package/src/rt/RecomputeTable.d.ts +9 -9
  349. package/src/rt/RemoteDataviewHeader.d.ts +14 -14
  350. package/src/rt/ResultValue.d.ts +7 -7
  351. package/src/rt/TableCache.d.ts +29 -29
  352. package/src/rt/TableCacheManager.d.ts +10 -10
  353. package/src/rt/Transaction.d.ts +23 -23
  354. package/src/security/UserDetails.d.ts +16 -16
  355. package/src/tasks/IMGDataCollection.d.ts +26 -26
  356. package/src/tasks/MGData.d.ts +63 -63
  357. package/src/tasks/MGDataCollection.d.ts +42 -42
  358. package/src/tasks/RCTimer.d.ts +13 -13
  359. package/src/tasks/RemoteTaskService.d.ts +16 -16
  360. package/src/tasks/Task.d.ts +312 -312
  361. package/src/tasks/TaskBase.d.ts +123 -123
  362. package/src/tasks/TaskServiceBase.d.ts +16 -16
  363. package/src/tasks/TasksTable.d.ts +21 -21
  364. package/src/tasks/sort/Sort.d.ts +4 -4
  365. package/src/tasks/sort/SortCollection.d.ts +11 -11
  366. package/src/util/ConstUtils.d.ts +3 -3
  367. package/src/util/FlowMonitorQueue.d.ts +70 -70
  368. package/src/util/HeapSort.d.ts +6 -6
  369. package/src/util/IMirrorXML.d.ts +6 -6
  370. package/src/util/IServerConfig.d.ts +11 -11
  371. package/src/util/MgBlockingQueue.d.ts +5 -5
  372. package/src/util/MgPriorityBlockingQueue.d.ts +17 -17
  373. package/src/util/MgPriorityQueue.d.ts +13 -13
  374. package/src/util/ParamParseResult.d.ts +6 -6
  375. package/src/util/PrmMap.d.ts +28 -28
  376. package/src/util/ReturnResult.d.ts +18 -18
  377. package/src/util/ReturnResultBase.d.ts +11 -11
  378. package/src/util/Scrambler.d.ts +10 -10
  379. package/src/util/UniqueIDUtils.d.ts +4 -4
  380. package/src/util/cookie.service.d.ts +8 -8
  381. package/esm2020/src/AccessHelper.mjs +0 -9
  382. package/esm2020/src/ClientManager.mjs +0 -399
  383. package/esm2020/src/CommandsProcessorBase.mjs +0 -58
  384. package/esm2020/src/CommandsTable.mjs +0 -162
  385. package/esm2020/src/ConstInterface.mjs +0 -516
  386. package/esm2020/src/FlowMonitorInterface.mjs +0 -16
  387. package/esm2020/src/GUIManager.mjs +0 -62
  388. package/esm2020/src/GlobalCommandsManager.mjs +0 -34
  389. package/esm2020/src/GuiEventsProcessor.mjs +0 -154
  390. package/esm2020/src/ServerConfig.mjs +0 -117
  391. package/esm2020/src/bridge/MagicBridge.mjs +0 -41
  392. package/esm2020/src/commands/ClientOriginatedCommandTaskTag.mjs +0 -11
  393. package/esm2020/src/commands/ClientToServer/BrowserEscEventCommand.mjs +0 -23
  394. package/esm2020/src/commands/ClientToServer/ColumnSortEventCommand.mjs +0 -26
  395. package/esm2020/src/commands/ClientToServer/CommandFactory.mjs +0 -260
  396. package/esm2020/src/commands/ClientToServer/CommandSerializationHelper.mjs +0 -69
  397. package/esm2020/src/commands/ClientToServer/ComputeEventCommand.mjs +0 -23
  398. package/esm2020/src/commands/ClientToServer/DataViewOutputCommand.mjs +0 -13
  399. package/esm2020/src/commands/ClientToServer/EvaluateCommand.mjs +0 -36
  400. package/esm2020/src/commands/ClientToServer/ExecOperCommand.mjs +0 -67
  401. package/esm2020/src/commands/ClientToServer/FetchDataControlValuesEventCommand.mjs +0 -22
  402. package/esm2020/src/commands/ClientToServer/IndexChangeEventCommand.mjs +0 -21
  403. package/esm2020/src/commands/ClientToServer/IniputForceWriteCommand.mjs +0 -23
  404. package/esm2020/src/commands/ClientToServer/RecomputeCommand.mjs +0 -27
  405. package/esm2020/src/commands/ClientToServer/RefreshEventCommand.mjs +0 -27
  406. package/esm2020/src/commands/ClientToServer/RefreshScreenEventCommand.mjs +0 -24
  407. package/esm2020/src/commands/ClientToServer/RollbackEventCommand.mjs +0 -39
  408. package/esm2020/src/commands/ClientToServer/SelectProgramCommand.mjs +0 -15
  409. package/esm2020/src/commands/ClientToServer/SubformOpenEventCommand.mjs +0 -21
  410. package/esm2020/src/commands/ClientToServer/SubformRefreshEventCommand.mjs +0 -24
  411. package/esm2020/src/commands/ClientToServer/TransactionCommand.mjs +0 -28
  412. package/esm2020/src/commands/ClientToServer/WriteMessageToServerLogCommand.mjs +0 -18
  413. package/esm2020/src/commands/DataViewCommandBase.mjs +0 -10
  414. package/esm2020/src/commands/IClientTargetedCommand.mjs +0 -9
  415. package/esm2020/src/commands/ServerToClient/AbortCommand.mjs +0 -65
  416. package/esm2020/src/commands/ServerToClient/ClientRefreshCommand.mjs +0 -25
  417. package/esm2020/src/commands/ServerToClient/ClientTargetedCommandBase.mjs +0 -27
  418. package/esm2020/src/commands/ServerToClient/EnhancedVerifyCommand.mjs +0 -45
  419. package/esm2020/src/commands/ServerToClient/OpenURLCommand.mjs +0 -221
  420. package/esm2020/src/commands/ServerToClient/ResultCommand.mjs +0 -37
  421. package/esm2020/src/commands/ServerToClient/VerifyCommand.mjs +0 -83
  422. package/esm2020/src/communications/InteractiveCommunicationsFailureHandler.mjs +0 -17
  423. package/esm2020/src/data/DataView.mjs +0 -1610
  424. package/esm2020/src/data/DataviewManager.mjs +0 -28
  425. package/esm2020/src/data/DataviewManagerBase.mjs +0 -15
  426. package/esm2020/src/data/DvCache.mjs +0 -67
  427. package/esm2020/src/data/Field.mjs +0 -646
  428. package/esm2020/src/data/FieldBase.mjs +0 -18
  429. package/esm2020/src/data/FieldsTable.mjs +0 -103
  430. package/esm2020/src/data/Record.mjs +0 -846
  431. package/esm2020/src/data/RecordsTable.mjs +0 -267
  432. package/esm2020/src/env/EnvVariablesTable.mjs +0 -340
  433. package/esm2020/src/env/Environment.mjs +0 -489
  434. package/esm2020/src/env/LanguageData.mjs +0 -226
  435. package/esm2020/src/event/ActionManager.mjs +0 -91
  436. package/esm2020/src/event/Event.mjs +0 -1333
  437. package/esm2020/src/event/EventHandler.mjs +0 -766
  438. package/esm2020/src/event/EventHandlerPosition.mjs +0 -204
  439. package/esm2020/src/event/EventsManager.mjs +0 -2975
  440. package/esm2020/src/event/RunTimeEvent.mjs +0 -392
  441. package/esm2020/src/event/UserEventsTable.mjs +0 -47
  442. package/esm2020/src/exp/ExpTable.mjs +0 -59
  443. package/esm2020/src/exp/Expression.mjs +0 -200
  444. package/esm2020/src/exp/ExpressionDict.mjs +0 -727
  445. package/esm2020/src/exp/ExpressionEvaluator.mjs +0 -4212
  446. package/esm2020/src/exp/ExpressionLocalJpn.mjs +0 -314
  447. package/esm2020/src/exp/YesNoExp.mjs +0 -36
  448. package/esm2020/src/gui/CreatedFormVector.mjs +0 -23
  449. package/esm2020/src/gui/FormsTable.mjs +0 -66
  450. package/esm2020/src/gui/MgControl.mjs +0 -353
  451. package/esm2020/src/gui/MgForm.mjs +0 -1181
  452. package/esm2020/src/http/HttpManager.mjs +0 -97
  453. package/esm2020/src/http/client/HttpClientAsync.mjs +0 -67
  454. package/esm2020/src/http/client/HttpClientEvents.mjs +0 -39
  455. package/esm2020/src/http/client/HttpClientSync.mjs +0 -42
  456. package/esm2020/src/http/client/HttpUtility.mjs +0 -84
  457. package/esm2020/src/remote/RemoteCommandsProcessor.mjs +0 -880
  458. package/esm2020/src/remote/ServerError.mjs +0 -40
  459. package/esm2020/src/rt/Argument.mjs +0 -265
  460. package/esm2020/src/rt/ArgumentsList.mjs +0 -103
  461. package/esm2020/src/rt/Boundary.mjs +0 -152
  462. package/esm2020/src/rt/CompMainPrgTable.mjs +0 -65
  463. package/esm2020/src/rt/DataviewHeaderBase.mjs +0 -96
  464. package/esm2020/src/rt/DataviewHeaders.mjs +0 -53
  465. package/esm2020/src/rt/LastFocusedManager.mjs +0 -67
  466. package/esm2020/src/rt/Operation.mjs +0 -735
  467. package/esm2020/src/rt/OperationTable.mjs +0 -67
  468. package/esm2020/src/rt/Recompute.mjs +0 -355
  469. package/esm2020/src/rt/ResultValue.mjs +0 -12
  470. package/esm2020/src/rt/TableCache.mjs +0 -177
  471. package/esm2020/src/rt/TableCacheManager.mjs +0 -67
  472. package/esm2020/src/rt/Transaction.mjs +0 -53
  473. package/esm2020/src/security/UserDetails.mjs +0 -71
  474. package/esm2020/src/tasks/MGData.mjs +0 -552
  475. package/esm2020/src/tasks/MGDataCollection.mjs +0 -252
  476. package/esm2020/src/tasks/RCTimer.mjs +0 -63
  477. package/esm2020/src/tasks/Task.mjs +0 -2495
  478. package/esm2020/src/tasks/TaskBase.mjs +0 -87
  479. package/esm2020/src/tasks/TasksTable.mjs +0 -80
  480. package/esm2020/src/tasks/sort/Sort.mjs +0 -7
  481. package/esm2020/src/util/FlowMonitorQueue.mjs +0 -453
  482. package/esm2020/src/util/MgPriorityBlockingQueue.mjs +0 -74
  483. package/esm2020/src/util/MgPriorityQueue.mjs +0 -66
  484. package/esm2020/src/util/PrmMap.mjs +0 -151
  485. package/esm2020/src/util/ReturnResult.mjs +0 -46
  486. package/esm2020/src/util/ReturnResultBase.mjs +0 -18
  487. package/esm2020/src/util/Scrambler.mjs +0 -89
  488. package/esm2020/src/util/UniqueIDUtils.mjs +0 -12
  489. package/fesm2015/magic-xpa-engine.mjs +0 -30835
  490. package/fesm2015/magic-xpa-engine.mjs.map +0 -1
  491. package/fesm2020/magic-xpa-engine.mjs.map +0 -1
@@ -1,766 +0,0 @@
1
- import { ApplicationException, Exception, NString, RefParam, StringBuilder, isNullOrUndefined } from "@magic-xpa/mscorelib";
2
- import { BrkScope, Constants, InternalInterface, Logger, Logger_LogLevels, StorageAttributeCheck, XMLConstants, XmlParser } from "@magic-xpa/utils";
3
- import { Event } from "./Event";
4
- import { FieldBase } from "../data/FieldBase";
5
- import { OperationTable } from "../rt/OperationTable";
6
- import { FlowMonitorQueue } from "../util/FlowMonitorQueue";
7
- import { ServerError } from "../remote/ServerError";
8
- import { YesNoExp } from "../exp/YesNoExp";
9
- import { ConstInterface } from "../ConstInterface";
10
- import { FlowMonitorInterface } from "../FlowMonitorInterface";
11
- import { LastFocusedManager } from "../rt/LastFocusedManager";
12
- import { AccessHelper } from "../AccessHelper";
13
- import { RemoteCommandsProcessor } from "../remote/RemoteCommandsProcessor";
14
- import { Environment } from "../env/Environment";
15
- export class EventHandler {
16
- constructor() {
17
- this._enabledExp = new YesNoExp(true);
18
- this._operationTab = null;
19
- this._propagateExp = new YesNoExp(true);
20
- this._isHandlerOnForm = false;
21
- this._ctrl = null;
22
- this._ctrlName = null;
23
- this._dvLen = 0;
24
- this._dvPos = 0;
25
- this._evt = null;
26
- this._handledByClient = false;
27
- this._handlerFld = null;
28
- this._hasParameters = false;
29
- this._id = 0;
30
- this._level = '\0';
31
- this._scope = null;
32
- this._task = null;
33
- this._taskMgdID = -1;
34
- this._operationTab = new OperationTable();
35
- }
36
- getCtrlName() {
37
- return this._ctrlName;
38
- }
39
- fillData(taskRef, parser) {
40
- if (this._task === null) {
41
- this._task = taskRef;
42
- this._taskMgdID = this._task.getMgdID();
43
- }
44
- while (this.initInnerObjects(parser, parser.getNextTag())) {
45
- }
46
- let dataView = this._task.DataView;
47
- this._hasParameters = dataView.ParametersExist(this._dvPos, this._dvLen);
48
- }
49
- initInnerObjects(parser, foundTagName) {
50
- if (foundTagName === null)
51
- return false;
52
- if (foundTagName === ConstInterface.MG_TAG_HANDLER)
53
- this.initInnerElements(parser, this._task);
54
- else if (foundTagName === ConstInterface.MG_TAG_OPER)
55
- this._operationTab.fillData(this._task, this, parser);
56
- else if (foundTagName === ConstInterface.MG_TAG_EVENT && this._evt === null) {
57
- this._evt = new Event();
58
- this._evt.fillData(parser, this._task);
59
- if (this._evt.getType() === ConstInterface.EVENT_TYPE_TIMER ||
60
- (this._evt.getType() === ConstInterface.EVENT_TYPE_USER && this._evt.getUserEventType() === ConstInterface.EVENT_TYPE_TIMER))
61
- this._task.getMGData().addTimerHandler(this);
62
- if (((this._evt.getType() === ConstInterface.EVENT_TYPE_INTERNAL && this._evt.getInternalCode() === InternalInterface.MG_ACT_ZOOM) || (this._evt.getType() === ConstInterface.EVENT_TYPE_USER && this._evt.getUserEvent() !== null && this._evt.getUserEventType() === ConstInterface.EVENT_TYPE_INTERNAL && this._evt.getUserEvent().getInternalCode() === InternalInterface.MG_ACT_ZOOM)) && !this._task.getEnableZoomHandler()) {
63
- if (this._handlerFld !== null)
64
- this._handlerFld.setHasZoomHandler();
65
- else if (this._ctrl !== null)
66
- this._ctrl.HasZoomHandler = true;
67
- else
68
- this._task.setEnableZoomHandler();
69
- }
70
- }
71
- else if (foundTagName === '/' + ConstInterface.MG_TAG_HANDLER) {
72
- parser.setCurrIndex2EndOfTag();
73
- return false;
74
- }
75
- else {
76
- Logger.Instance.WriteExceptionToLogWithMsg("there is no such tag in EventHandler.initInnerObjects() " + foundTagName);
77
- return false;
78
- }
79
- return true;
80
- }
81
- initInnerElements(parser, taskRef) {
82
- let endContext = parser.getXMLdata().indexOf(XMLConstants.TAG_CLOSE, parser.getCurrIndex());
83
- if (endContext !== -1 && endContext < parser.getXMLdata().length) {
84
- let tag = parser.getXMLsubstring(endContext);
85
- parser.add2CurrIndex(tag.indexOf(ConstInterface.MG_TAG_HANDLER) + ConstInterface.MG_TAG_HANDLER.length);
86
- let tokensVector = XmlParser.getTokens(parser.getXMLsubstring(endContext), XMLConstants.XML_ATTR_DELIM);
87
- this.initElements(tokensVector, taskRef);
88
- parser.setCurrIndex(++endContext);
89
- return;
90
- }
91
- Logger.Instance.WriteExceptionToLogWithMsg("in Handler.FillData() out of string bounds");
92
- }
93
- initElements(tokensVector, taskRef) {
94
- for (let j = 0; j < tokensVector.length; j += 2) {
95
- let attribute = (tokensVector.get_Item(j));
96
- let valueStr = (tokensVector.get_Item(j + 1));
97
- switch (attribute) {
98
- case ConstInterface.MG_ATTR_HANDLEDBY:
99
- this._handledByClient = (valueStr.toUpperCase() === "C".toUpperCase());
100
- break;
101
- case XMLConstants.MG_ATTR_ID:
102
- this._id = XmlParser.getInt(valueStr);
103
- break;
104
- case ConstInterface.MG_ATTR_LEVEL:
105
- this._level = valueStr[0];
106
- break;
107
- case ConstInterface.MG_ATTR_OBJECT:
108
- let valueStringCtrlName = XmlParser.unescape(valueStr);
109
- this._ctrlName = XmlParser.unescape(valueStringCtrlName).toUpperCase();
110
- this.calculateCtrlFromControlName(taskRef);
111
- break;
112
- case ConstInterface.MG_ATTR_VARIABLE:
113
- this._handlerFld = this._task.DataView.getField(XmlParser.getInt(valueStr));
114
- this._handlerFld.setHasChangeEvent();
115
- break;
116
- case ConstInterface.MG_ATTR_SCOPE:
117
- this._scope = valueStr[0];
118
- break;
119
- case ConstInterface.MG_ATTR_PROPAGATE:
120
- this._propagateExp.setVal(taskRef, valueStr);
121
- break;
122
- case ConstInterface.MG_ATTR_ENABLED:
123
- this._enabledExp.setVal(taskRef, valueStr);
124
- break;
125
- case ConstInterface.MG_ATTR_DVPOS:
126
- let i = valueStr.indexOf(",");
127
- if (i > -1) {
128
- this._dvLen = XmlParser.getInt(valueStr.substr(0, i));
129
- this._dvPos = XmlParser.getInt(valueStr.substr(i + 1));
130
- for (let fldIdx = this._dvPos; fldIdx < this._dvPos + this._dvLen; fldIdx++) {
131
- let field = this._task.DataView.getField(fldIdx);
132
- field.IsEventHandlerField = true;
133
- }
134
- }
135
- break;
136
- case ConstInterface.MG_ATTR_HANDLER_ONFORM:
137
- this._isHandlerOnForm = XmlParser.getBoolean(valueStr);
138
- break;
139
- default:
140
- Logger.Instance.WriteExceptionToLogWithMsg("There is no such tag in EventHandler class. Insert case to EventHandler.initElements for " + attribute);
141
- break;
142
- }
143
- }
144
- }
145
- calculateCtrlFromControlName(taskRef) {
146
- if (!NString.IsNullOrEmpty(this._ctrlName)) {
147
- this._ctrl = ((taskRef.getForm() !== null) ? taskRef.getForm().getCtrlByCtrlName(this._ctrlName) : null);
148
- }
149
- }
150
- isSpecificHandlerOf(rtEvt) {
151
- if (this._ctrl === null && this._ctrlName === null && this._handlerFld === null && !this._isHandlerOnForm)
152
- return false;
153
- if (this._scope === BrkScope.Task && this._task !== rtEvt.getTask())
154
- return false;
155
- if (this._evt.equals(rtEvt)) {
156
- if (this._handlerFld !== null) {
157
- return (this._handlerFld === rtEvt.getFld());
158
- }
159
- if (rtEvt.Control !== null && !this._isHandlerOnForm) {
160
- let eventCtrlName = rtEvt.Control.getControlNameForHandlerSearch();
161
- if (eventCtrlName !== null && this._ctrlName.toLowerCase() === eventCtrlName.toLowerCase())
162
- return true;
163
- }
164
- else if (rtEvt.Control === null && this._isHandlerOnForm)
165
- return true;
166
- }
167
- return false;
168
- }
169
- isNonSpecificHandlerOf(rtEvt) {
170
- if (this._ctrl !== null || this._ctrlName !== null || this._handlerFld !== null || this._isHandlerOnForm)
171
- return false;
172
- if (this._scope === BrkScope.Task && this._task !== rtEvt.getTask() && rtEvt.getType() !== ConstInterface.EVENT_TYPE_TIMER)
173
- return false;
174
- if (this._scope === BrkScope.Global && this._task !== rtEvt.getTask())
175
- return false;
176
- if (this._evt.getType() === ConstInterface.EVENT_TYPE_USER && this._evt.getUserEventType() === ConstInterface.EVENT_TYPE_NOTINITED) {
177
- try {
178
- this._evt.findUserEvent();
179
- }
180
- catch (applicationException) {
181
- if (applicationException instanceof ApplicationException) {
182
- }
183
- else
184
- throw applicationException;
185
- }
186
- }
187
- return this._evt.equals(rtEvt);
188
- }
189
- isGlobalHandlerOf(rtEvt) {
190
- if (this._scope !== BrkScope.Global)
191
- return false;
192
- if (this._ctrl != null || this._ctrlName != null || this._handlerFld != null || this._isHandlerOnForm)
193
- return false;
194
- return this._evt.equals(rtEvt);
195
- }
196
- isGlobalSpecificHandlerOf(rtEvt) {
197
- if (this._scope !== BrkScope.Global)
198
- return false;
199
- if (this._ctrl == null && this._ctrlName == null && this._handlerFld == null)
200
- return false;
201
- return (this._ctrlName != null && this._evt.equals(rtEvt) &&
202
- NString.Equals(this._ctrlName, rtEvt.Control.Name, true));
203
- }
204
- async execute(rtEvt, returnedFromServer, enabledCndCheckedAndTrue) {
205
- let ctrl = null;
206
- let retVal;
207
- let depth = 0;
208
- let taskEnd = false;
209
- let brkLevel = this._task.getBrkLevel();
210
- let brkLevelIndex = this._task.getBrkLevelIndex();
211
- let initialLoopStackSize = 0;
212
- if (taskEnd !== null && this._evt.getType() !== ConstInterface.EVENT_TYPE_EXPRESSION && (this._evt.getType() !== ConstInterface.EVENT_TYPE_USER || (this._evt.getUserEvent().getType() !== ConstInterface.EVENT_TYPE_EXPRESSION && this._evt.getUserEvent().getType() !== ConstInterface.EVENT_TYPE_TIMER))) {
213
- if (this._evt.getType() !== ConstInterface.EVENT_TYPE_USER_FUNC)
214
- this._task.setBrkLevel(rtEvt.getBrkLevel(), this._id);
215
- }
216
- else
217
- this._task.setBrkLevel(this._evt.getBrkLevel(), this._id);
218
- let args = rtEvt.getArgList();
219
- try {
220
- let flowMonitor = FlowMonitorQueue.Instance;
221
- if (rtEvt.getType() === ConstInterface.EVENT_TYPE_INTERNAL && rtEvt.getInternalCode() === InternalInterface.MG_ACT_WEBCLIENT_ROUTE) {
222
- if (!this._task.IsRoute() && this._task !== AccessHelper.mgDataTable.StartupMgData.getFirstTask()) {
223
- return new RetVals(true, true);
224
- }
225
- }
226
- let nextOperIdx = -1;
227
- if (returnedFromServer) {
228
- nextOperIdx = AccessHelper.eventsManager.getNextOperIdx(this._operationTab.getOperation(0), false);
229
- }
230
- if (nextOperIdx === -1 && !enabledCndCheckedAndTrue && !await this.isEnabled())
231
- return new RetVals(true, false);
232
- if (this._scope === BrkScope.Task && (rtEvt.getType() === ConstInterface.EVENT_TYPE_TIMER || rtEvt.getType() === ConstInterface.EVENT_TYPE_EXPRESSION)) {
233
- let currTask = LastFocusedManager.Instance.getLastFocusedTask();
234
- if (this._task !== currTask)
235
- return new RetVals(true, true);
236
- }
237
- if (!this._handledByClient) {
238
- return new RetVals(false, true);
239
- }
240
- if (rtEvt.getType() !== ConstInterface.EVENT_TYPE_USER && !await this._evt.dataEventIsTrue())
241
- return new RetVals(false, true);
242
- if (rtEvt.getType() === ConstInterface.EVENT_TYPE_INTERNAL && rtEvt.getInternalCode() === InternalInterface.MG_ACT_TASK_SUFFIX)
243
- taskEnd = true;
244
- if (rtEvt.getType() === ConstInterface.EVENT_TYPE_INTERNAL) {
245
- switch (rtEvt.getInternalCode()) {
246
- case InternalInterface.MG_ACT_REC_PREFIX:
247
- flowMonitor.addTaskFlowRec(InternalInterface.MG_ACT_REC_PREFIX, FlowMonitorInterface.FLWMTR_START, this._task.GetTaskDetails());
248
- break;
249
- case InternalInterface.MG_ACT_REC_SUFFIX:
250
- flowMonitor.addTaskFlowRec(InternalInterface.MG_ACT_REC_SUFFIX, FlowMonitorInterface.FLWMTR_START, this._task.GetTaskDetails());
251
- break;
252
- case InternalInterface.MG_ACT_CTRL_SUFFIX:
253
- flowMonitor.addTaskFlowCtrl(InternalInterface.MG_ACT_CTRL_SUFFIX, rtEvt.Control.Name, FlowMonitorInterface.FLWMTR_START, this._task.GetTaskDetails());
254
- break;
255
- case InternalInterface.MG_ACT_CTRL_PREFIX:
256
- flowMonitor.addTaskFlowCtrl(InternalInterface.MG_ACT_CTRL_PREFIX, rtEvt.Control.Name, FlowMonitorInterface.FLWMTR_START, this._task.GetTaskDetails());
257
- break;
258
- case InternalInterface.MG_ACT_VARIABLE:
259
- flowMonitor.addTaskFlowFld(InternalInterface.MG_ACT_VARIABLE, rtEvt.getFld().getName(), FlowMonitorInterface.FLWMTR_START, this._task.GetTaskDetails());
260
- break;
261
- case InternalInterface.MG_ACT_CTRL_VERIFICATION:
262
- flowMonitor.addTaskFlowCtrl(InternalInterface.MG_ACT_CTRL_VERIFICATION, rtEvt.Control.Name, FlowMonitorInterface.FLWMTR_START, this._task.GetTaskDetails());
263
- break;
264
- case InternalInterface.MG_ACT_TASK_PREFIX:
265
- flowMonitor.addTaskFlowRec(InternalInterface.MG_ACT_TASK_PREFIX, FlowMonitorInterface.FLWMTR_START, this._task.GetTaskDetails());
266
- break;
267
- case InternalInterface.MG_ACT_TASK_SUFFIX:
268
- flowMonitor.addTaskFlowRec(InternalInterface.MG_ACT_TASK_SUFFIX, FlowMonitorInterface.FLWMTR_START, this._task.GetTaskDetails());
269
- break;
270
- default:
271
- flowMonitor.addTaskFlowHandler(this._evt.getBrkLevel(true), FlowMonitorInterface.FLWMTR_START, this._task.GetTaskDetails());
272
- break;
273
- }
274
- }
275
- else
276
- flowMonitor.addTaskFlowHandler(this._evt.getBrkLevel(true), FlowMonitorInterface.FLWMTR_START, this._task.GetTaskDetails());
277
- try {
278
- if (taskEnd !== null)
279
- ctrl = rtEvt.Control;
280
- let mgdID = AccessHelper.mgDataTable.currMgdID;
281
- let isChangedCurrWnd = false;
282
- let isChangedCurrWndRef = new RefParam(isChangedCurrWnd);
283
- if (this._evt.getType() === ConstInterface.EVENT_TYPE_TIMER && mgdID !== rtEvt.getMgdID()) {
284
- AccessHelper.mgDataTable.currMgdID = rtEvt.getMgdID();
285
- isChangedCurrWndRef.value = true;
286
- }
287
- await this.resetLocalVariables(args);
288
- initialLoopStackSize = this._task.getLoopStackSize();
289
- let retVals = null;
290
- if (this._operationTab.getSize() > 0)
291
- retVals = await this.executeOperations(0, this._operationTab.getSize() - 1, taskEnd, mgdID, depth, isChangedCurrWndRef, false, false, -1);
292
- isChangedCurrWnd = isChangedCurrWndRef.value;
293
- if (retVals !== null)
294
- return retVals;
295
- if (!taskEnd)
296
- await this._task.evalEndCond(ConstInterface.END_COND_EVAL_IMMIDIATE);
297
- if (isChangedCurrWnd) {
298
- let oldMgd = AccessHelper.mgDataTable.getMGData(mgdID);
299
- if (oldMgd !== null && !oldMgd.IsAborting)
300
- AccessHelper.mgDataTable.currMgdID = mgdID;
301
- }
302
- }
303
- catch (ex) {
304
- if (ex instanceof ServerError) {
305
- if (Logger.Instance.LogLevel !== Logger_LogLevels.Basic)
306
- Logger.Instance.WriteExceptionToLog(ex);
307
- throw ex;
308
- }
309
- else if (ex instanceof Exception) {
310
- Logger.Instance.WriteExceptionToLog(ex);
311
- return new RetVals(false, true);
312
- }
313
- else
314
- throw ex;
315
- }
316
- finally {
317
- retVal = await this._propagateExp.getVal();
318
- let currLoopStackSize = this._task.getLoopStackSize();
319
- for (; currLoopStackSize > initialLoopStackSize; currLoopStackSize = currLoopStackSize--)
320
- this._task.popLoopCounter();
321
- }
322
- if (args !== null)
323
- await this.getArgValsFromFlds(args);
324
- if (rtEvt.getType() === ConstInterface.EVENT_TYPE_INTERNAL) {
325
- switch (rtEvt.getInternalCode()) {
326
- case InternalInterface.MG_ACT_REC_PREFIX:
327
- flowMonitor.addTaskFlowRec(InternalInterface.MG_ACT_REC_PREFIX, FlowMonitorInterface.FLWMTR_END, this._task.GetTaskDetails());
328
- break;
329
- case InternalInterface.MG_ACT_REC_SUFFIX:
330
- flowMonitor.addTaskFlowRec(InternalInterface.MG_ACT_REC_SUFFIX, FlowMonitorInterface.FLWMTR_END, this._task.GetTaskDetails());
331
- break;
332
- case InternalInterface.MG_ACT_TASK_PREFIX:
333
- flowMonitor.addTaskFlowRec(InternalInterface.MG_ACT_TASK_PREFIX, FlowMonitorInterface.FLWMTR_END, this._task.GetTaskDetails());
334
- break;
335
- case InternalInterface.MG_ACT_TASK_SUFFIX:
336
- flowMonitor.addTaskFlowRec(InternalInterface.MG_ACT_TASK_SUFFIX, FlowMonitorInterface.FLWMTR_END, this._task.GetTaskDetails());
337
- break;
338
- case InternalInterface.MG_ACT_CTRL_SUFFIX:
339
- flowMonitor.addTaskFlowCtrl(InternalInterface.MG_ACT_CTRL_SUFFIX, ctrl.Name, FlowMonitorInterface.FLWMTR_END, this._task.GetTaskDetails());
340
- break;
341
- case InternalInterface.MG_ACT_CTRL_PREFIX:
342
- flowMonitor.addTaskFlowCtrl(InternalInterface.MG_ACT_CTRL_PREFIX, ctrl.Name, FlowMonitorInterface.FLWMTR_END, this._task.GetTaskDetails());
343
- break;
344
- case InternalInterface.MG_ACT_VARIABLE:
345
- flowMonitor.addTaskFlowFld(InternalInterface.MG_ACT_VARIABLE, rtEvt.getFld().getName(), FlowMonitorInterface.FLWMTR_END, this._task.GetTaskDetails());
346
- break;
347
- case InternalInterface.MG_ACT_CTRL_VERIFICATION:
348
- flowMonitor.addTaskFlowCtrl(InternalInterface.MG_ACT_CTRL_VERIFICATION, ctrl.Name, FlowMonitorInterface.FLWMTR_END, this._task.GetTaskDetails());
349
- break;
350
- default:
351
- flowMonitor.addTaskFlowHandler(this._evt.getBrkLevel(true), FlowMonitorInterface.FLWMTR_END, this._task.GetTaskDetails());
352
- break;
353
- }
354
- }
355
- else
356
- flowMonitor.addTaskFlowHandler(this._evt.getBrkLevel(true), 1, this._task.GetTaskDetails());
357
- }
358
- finally {
359
- this._task.setBrkLevel(brkLevel, brkLevelIndex);
360
- }
361
- return new RetVals(retVal, true);
362
- }
363
- async executeOperations(fromIdx, toIdx, taskEnd, mgdID, depth, isChangedCurrWndRef, inBlockIf, inReturnedFromServer, inNextOperIdx) {
364
- let oper;
365
- let operType;
366
- let nextOperIdx = -1;
367
- let returnedFromServer = false;
368
- let mgd = this._task.getMGData();
369
- let execFlowIdx = fromIdx;
370
- let retvals;
371
- let blockIfReturnedFromServer = false;
372
- let executeBlock;
373
- let blockLoopExeconServer;
374
- let flowMonitor = FlowMonitorQueue.Instance;
375
- let routeOperationExecuted = false;
376
- if (!inReturnedFromServer) {
377
- oper = this._operationTab.getOperation(execFlowIdx);
378
- nextOperIdx = AccessHelper.eventsManager.getNextOperIdx(oper, true);
379
- if (nextOperIdx > -1) {
380
- returnedFromServer = true;
381
- if (inBlockIf)
382
- blockIfReturnedFromServer = true;
383
- }
384
- else
385
- returnedFromServer = false;
386
- }
387
- else {
388
- returnedFromServer = inReturnedFromServer;
389
- nextOperIdx = inNextOperIdx;
390
- }
391
- for (; execFlowIdx <= toIdx &&
392
- (!AccessHelper.eventsManager.GetStopExecutionFlag()) &&
393
- !mgd.IsAborting && !routeOperationExecuted; execFlowIdx += 1) {
394
- if (inBlockIf && blockIfReturnedFromServer && this._operationTab.getOperation(toIdx).getServerId() < nextOperIdx)
395
- break;
396
- oper = this._operationTab.getOperation(execFlowIdx);
397
- operType = oper.getType();
398
- blockIfReturnedFromServer = false;
399
- if (RemoteCommandsProcessor.GetInstance().DelayCommandExecution) {
400
- this._task.setUseLoopStack(depth > 0);
401
- await oper.operServer(null);
402
- break;
403
- }
404
- if (returnedFromServer && oper.getServerId() < nextOperIdx)
405
- if (operType !== ConstInterface.MG_OPER_BLOCK)
406
- continue;
407
- else if (this._operationTab.getOperation(oper.getBlockEnd()).getServerId() < nextOperIdx)
408
- continue;
409
- if (!taskEnd) {
410
- let mainLevel = this._task.getMainLevel().toLowerCase();
411
- if (await this._task.evalEndCond(ConstInterface.END_COND_EVAL_IMMIDIATE) && Environment.Instance.getSpecialImmediateHandlerEnd() &&
412
- mainLevel != "RP".toLowerCase() && mainLevel != "TP".toLowerCase() && mainLevel != "RS".toLowerCase() && mainLevel != "TS".toLowerCase())
413
- break;
414
- }
415
- if (this._taskMgdID !== mgdID)
416
- isChangedCurrWndRef.value = true;
417
- if (!this._task.isMainProg() && this._task.isOpenWin())
418
- AccessHelper.mgDataTable.currMgdID = this._taskMgdID;
419
- await AccessHelper.eventsManager.CheckAndShowSpinner(true);
420
- switch (operType) {
421
- case ConstInterface.MG_OPER_VERIFY:
422
- if (await oper.execute(returnedFromServer)) {
423
- if (!(this._task.getBrkLevel() === "TS")) {
424
- AccessHelper.eventsManager.setStopExecution(true);
425
- }
426
- if (this._task.getInRecordSuffix() && this._task.getLevel() === Constants.TASK_LEVEL_TASK)
427
- this._task.setLevel(Constants.TASK_LEVEL_RECORD);
428
- return new RetVals(false, true);
429
- }
430
- break;
431
- case ConstInterface.MG_OPER_LOOP:
432
- this._task.enterLoop();
433
- this._task.increaseLoopCounter();
434
- this._task.setUseLoopStack(true);
435
- await flowMonitor.addFlowFieldOperation(oper, true, this._task.GetTaskDetails());
436
- blockLoopExeconServer = false;
437
- if (!oper.getExecOnServer()) {
438
- while (await oper.execute(false)) {
439
- retvals = await this.executeOperations(execFlowIdx + 1, oper.getBlockClose() - 1, taskEnd, mgdID, depth + 1, isChangedCurrWndRef, false, false, -1);
440
- if (retvals !== null)
441
- return retvals;
442
- if ((mgd.IsAborting || AccessHelper.eventsManager.GetStopExecutionFlag()))
443
- break;
444
- this._task.increaseLoopCounter();
445
- this._task.setUseLoopStack(true);
446
- }
447
- }
448
- else {
449
- if (await oper.execute(false))
450
- blockLoopExeconServer = true;
451
- }
452
- if (!blockLoopExeconServer)
453
- execFlowIdx = oper.getBlockEnd() - 1;
454
- this._task.leaveLoop();
455
- break;
456
- case ConstInterface.MG_OPER_BLOCK:
457
- if (!oper.getExecOnServer() || (returnedFromServer && oper.getServerId() < nextOperIdx)) {
458
- this._task.setUseLoopStack(true);
459
- if (!returnedFromServer || oper.getServerId() >= nextOperIdx)
460
- execFlowIdx = await this.getSignificantBlock(execFlowIdx, oper.getBlockEnd());
461
- else
462
- execFlowIdx = this.getStartBlockIfIdxByOper(execFlowIdx, nextOperIdx);
463
- }
464
- else {
465
- this._task.setUseLoopStack(depth > 0);
466
- await oper.operServer(null);
467
- nextOperIdx = AccessHelper.eventsManager.getNextOperIdx(oper, true);
468
- if (nextOperIdx > -1) {
469
- returnedFromServer = true;
470
- if (inBlockIf)
471
- blockIfReturnedFromServer = true;
472
- if (nextOperIdx < this._operationTab.getOperation(oper.getBlockEnd()).getServerId()) {
473
- while (this._operationTab.getOperation(oper.getBlockClose()).getServerId() < nextOperIdx) {
474
- execFlowIdx = oper.getBlockClose();
475
- oper = this._operationTab.getOperation(execFlowIdx);
476
- }
477
- }
478
- }
479
- else {
480
- returnedFromServer = false;
481
- execFlowIdx = -1;
482
- }
483
- }
484
- if (execFlowIdx !== -1) {
485
- executeBlock = true;
486
- oper = this._operationTab.getOperation(execFlowIdx);
487
- if (returnedFromServer) {
488
- if (this._operationTab.getOperation(oper.getBlockClose()).getServerId() <= nextOperIdx) {
489
- executeBlock = false;
490
- blockIfReturnedFromServer = true;
491
- }
492
- }
493
- if (executeBlock) {
494
- retvals = await this.executeOperations(execFlowIdx + 1, oper.getBlockClose() - 1, taskEnd, mgdID, depth + 1, isChangedCurrWndRef, true, returnedFromServer, nextOperIdx);
495
- if (retvals !== null)
496
- if (!retvals.ReturnedFromServer)
497
- return retvals;
498
- else {
499
- returnedFromServer = retvals.ReturnedFromServer;
500
- nextOperIdx = retvals.NextOperIdx;
501
- blockIfReturnedFromServer = retvals.BlockIfReturnedFromServer;
502
- execFlowIdx = oper.getBlockEnd() - 1;
503
- continue;
504
- }
505
- }
506
- }
507
- execFlowIdx = oper.getBlockEnd() - 1;
508
- break;
509
- case ConstInterface.MG_OPER_ENDBLOCK:
510
- await flowMonitor.addFlowFieldOperation(oper, true, this._task.GetTaskDetails());
511
- break;
512
- case ConstInterface.MG_OPER_CALL:
513
- this._task.setUseLoopStack(depth > 0);
514
- routeOperationExecuted = await oper.execute(returnedFromServer);
515
- break;
516
- default:
517
- this._task.setUseLoopStack(depth > 0);
518
- await oper.execute(returnedFromServer);
519
- break;
520
- }
521
- if (!blockIfReturnedFromServer) {
522
- nextOperIdx = AccessHelper.eventsManager.getNextOperIdx(oper, true);
523
- if (nextOperIdx > -1) {
524
- returnedFromServer = true;
525
- if (inBlockIf)
526
- blockIfReturnedFromServer = true;
527
- }
528
- else
529
- returnedFromServer = false;
530
- }
531
- }
532
- if (routeOperationExecuted)
533
- retvals = new RetVals(false, true);
534
- else if (blockIfReturnedFromServer)
535
- retvals = new RetVals(nextOperIdx, returnedFromServer, blockIfReturnedFromServer);
536
- else
537
- retvals = null;
538
- return retvals;
539
- }
540
- async getSignificantBlock(startBlockIdx, endIdx) {
541
- let retIdx = -1;
542
- while (startBlockIdx < endIdx) {
543
- let oper = this._operationTab.getOperation(startBlockIdx);
544
- let operType = oper.getType();
545
- if (operType !== ConstInterface.MG_OPER_BLOCK && operType !== ConstInterface.MG_OPER_ELSE && operType !== ConstInterface.MG_OPER_SERVER)
546
- break;
547
- if (await oper.execute(false)) {
548
- retIdx = startBlockIdx;
549
- break;
550
- }
551
- else
552
- startBlockIdx = oper.getBlockClose();
553
- }
554
- return retIdx;
555
- }
556
- getStartBlockIdxByEnd(endIdx) {
557
- let retIdx = -1;
558
- let found = false;
559
- let j;
560
- for (j = endIdx - 1; j >= 0 && !found; j--) {
561
- let oper = this._operationTab.getOperation(j);
562
- let operType = oper.getType();
563
- if (operType === ConstInterface.MG_OPER_BLOCK || operType === ConstInterface.MG_OPER_LOOP) {
564
- if (oper.getBlockEnd() === endIdx) {
565
- retIdx = j;
566
- found = true;
567
- }
568
- }
569
- }
570
- return retIdx;
571
- }
572
- getStartBlockIdxByElse(elseIdx) {
573
- let retIdx = -1;
574
- let found = false;
575
- let elseBlockEnd = this._operationTab.getOperation(elseIdx).getBlockEnd();
576
- let j;
577
- for (j = elseIdx - 1; j >= 0 && !found; j--) {
578
- let oper = this._operationTab.getOperation(j);
579
- let operType = oper.getType();
580
- if (operType === ConstInterface.MG_OPER_BLOCK) {
581
- if (oper.getBlockEnd() === elseBlockEnd) {
582
- retIdx = j;
583
- found = true;
584
- }
585
- }
586
- }
587
- return retIdx;
588
- }
589
- getStartBlockIfIdxByOper(blockOperIdx, srvrOperIdx) {
590
- let retIdx = -1;
591
- let found = false;
592
- let j = this._operationTab.serverId2operIdx(srvrOperIdx, blockOperIdx) - 1;
593
- if (j === -2) {
594
- j = this._operationTab.serverId2FollowingOperIdx(srvrOperIdx, blockOperIdx) - 1;
595
- }
596
- while (j >= 0 && !found) {
597
- let oper = this._operationTab.getOperation(j);
598
- let operType = oper.getType();
599
- if (operType === ConstInterface.MG_OPER_BLOCK) {
600
- if (j === blockOperIdx) {
601
- retIdx = j;
602
- found = true;
603
- }
604
- else
605
- j--;
606
- }
607
- else if (operType === ConstInterface.MG_OPER_ELSE) {
608
- let blockStrt = this.getStartBlockIdxByElse(j);
609
- if (blockStrt === blockOperIdx) {
610
- retIdx = j;
611
- found = true;
612
- }
613
- else
614
- j = blockStrt - 1;
615
- }
616
- else if (operType === ConstInterface.MG_OPER_ENDBLOCK)
617
- j = this.getStartBlockIdxByEnd(j) - 1;
618
- else
619
- j--;
620
- }
621
- return retIdx;
622
- }
623
- getLevel() {
624
- return this._level;
625
- }
626
- getEvent() {
627
- return this._evt;
628
- }
629
- getId() {
630
- return this._id;
631
- }
632
- async isEnabled() {
633
- return await this._enabledExp.getVal();
634
- }
635
- async resetLocalVariables(args) {
636
- let dv = this._task.DataView;
637
- let argIdx = 0;
638
- try {
639
- for (let fieldIdx = this._dvPos; fieldIdx < this._dvPos + this._dvLen; fieldIdx++) {
640
- let aField = dv.getField(fieldIdx);
641
- let varIsParm = !this._hasParameters || aField.isParam();
642
- if ((args !== null && argIdx < args.getSize()) && varIsParm) {
643
- if (!args.getArg(argIdx).skipArg()) {
644
- await args.getArg(argIdx).setValueToField(aField);
645
- }
646
- else {
647
- aField.invalidate(true, FieldBase.CLEAR_FLAGS);
648
- await aField.compute(false);
649
- }
650
- argIdx++;
651
- }
652
- else {
653
- aField.invalidate(true, FieldBase.CLEAR_FLAGS);
654
- await aField.compute(false);
655
- }
656
- await aField.updateDisplay();
657
- }
658
- }
659
- catch (exception) {
660
- throw exception;
661
- }
662
- }
663
- async getArgValsFromFlds(args) {
664
- let dv = this._task.DataView;
665
- let k = 0;
666
- let j;
667
- for (j = this._dvPos; j < this._dvPos + this._dvLen && k < args.getSize(); j++) {
668
- let aField = dv.getField(j);
669
- if (!this._hasParameters || aField.isParam()) {
670
- let arg = args.getArg(k);
671
- if (arg.getType() === ConstInterface.ARG_TYPE_FIELD) {
672
- let argFld = arg.getField();
673
- if (argFld.getTask() !== null && !argFld.getTask().isAborting()) {
674
- let val = aField.getValue(false);
675
- await argFld.setValueAndStartRecompute(val, aField.isNull(), true, aField.isModified(), false);
676
- await argFld.updateDisplay();
677
- }
678
- }
679
- k++;
680
- }
681
- }
682
- }
683
- getTask() {
684
- return this._task;
685
- }
686
- argsMatch(Exp_params) {
687
- let argsMatched = true;
688
- let dv = this._task.DataView;
689
- let j = 0;
690
- let paramCount = 0;
691
- for (let i = this._dvPos; i < this._dvPos + this._dvLen; i++) {
692
- let field = dv.getField(i);
693
- if (field.isParam()) {
694
- paramCount++;
695
- if (j < Exp_params.length) {
696
- let fieldAttr = field.getType();
697
- let argAttr = Exp_params[j].Attr;
698
- if (!Exp_params[j].IsNull && !StorageAttributeCheck.isTheSameType(fieldAttr, argAttr) && !StorageAttributeCheck.StorageFldAlphaUnicodeOrBlob(fieldAttr, argAttr)) {
699
- argsMatched = false;
700
- break;
701
- }
702
- j++;
703
- }
704
- }
705
- }
706
- if (paramCount !== Exp_params.length) {
707
- argsMatched = false;
708
- }
709
- return argsMatched;
710
- }
711
- getOperationTab() {
712
- return this._operationTab;
713
- }
714
- getControlNameForControlHeader() {
715
- if (this.getEvent().getType() == ConstInterface.EVENT_TYPE_INTERNAL) {
716
- if (this.getEvent().isControlHeader() && !isNullOrUndefined(this._ctrl))
717
- return this.getCtrlName();
718
- }
719
- return NString.Empty;
720
- }
721
- getVarNameForVariableHeader() {
722
- if (this.getEvent().isVariableHeader() && !isNullOrUndefined(this._handlerFld))
723
- return this._handlerFld.getVarName().toUpperCase();
724
- return NString.Empty;
725
- }
726
- getEventHandlerInfo() {
727
- let eventDescription = new StringBuilder();
728
- this.getEvent().AppendDescription(eventDescription);
729
- let headerAdditionalInfo = this.getControlNameForControlHeader() + this.getVarNameForVariableHeader();
730
- eventDescription.Append(headerAdditionalInfo);
731
- if (!NString.IsNullOrEmpty(eventDescription.toString()))
732
- eventDescription = new StringBuilder(' ' + eventDescription.toString(), eventDescription.toString().length + 1);
733
- return NString.Format("Handler {0}{1}", this.getEvent().getEventType(), eventDescription);
734
- }
735
- toString() {
736
- return NString.Format("(Handler for {0} on task {1}, scope {2})", this._evt, this._task, this._scope);
737
- }
738
- }
739
- export class RetVals {
740
- constructor(pOrOperIdx, eOrInReturnedFromServer, inBlockIfReturnedFromServer) {
741
- this.BlockIfReturnedFromServer = false;
742
- this.Enabled = false;
743
- this.NextOperIdx = 0;
744
- this.Propagate = false;
745
- this.ReturnedFromServer = false;
746
- if (arguments.length === 2)
747
- this.constructor_0(pOrOperIdx, eOrInReturnedFromServer);
748
- else
749
- this.constructor_1(pOrOperIdx, eOrInReturnedFromServer, inBlockIfReturnedFromServer);
750
- }
751
- constructor_0(p, e) {
752
- this.Propagate = p;
753
- this.Enabled = e;
754
- this.NextOperIdx = 0;
755
- this.ReturnedFromServer = false;
756
- this.BlockIfReturnedFromServer = false;
757
- }
758
- constructor_1(operIdx, inReturnedFromServer, inBlockIfReturnedFromServer) {
759
- this.Propagate = false;
760
- this.Enabled = true;
761
- this.NextOperIdx = operIdx;
762
- this.ReturnedFromServer = inReturnedFromServer;
763
- this.BlockIfReturnedFromServer = inBlockIfReturnedFromServer;
764
- }
765
- }
766
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiRXZlbnRIYW5kbGVyLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vcHJvamVjdHMvZW5naW5lL3NyYy9ldmVudC9FdmVudEhhbmRsZXIudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUFDLG9CQUFvQixFQUFFLFNBQVMsRUFBUSxPQUFPLEVBQUUsUUFBUSxFQUFFLGFBQWEsRUFBRSxpQkFBaUIsRUFBQyxNQUFNLHNCQUFzQixDQUFDO0FBQ2hJLE9BQU8sRUFDTCxRQUFRLEVBQ1IsU0FBUyxFQUNULGlCQUFpQixFQUNqQixNQUFNLEVBQ04sZ0JBQWdCLEVBRWhCLHFCQUFxQixFQUNyQixZQUFZLEVBQ1osU0FBUyxFQUNWLE1BQU0sa0JBQWtCLENBQUM7QUFFMUIsT0FBTyxFQUFDLEtBQUssRUFBQyxNQUFNLFNBQVMsQ0FBQztBQUM5QixPQUFPLEVBQUMsU0FBUyxFQUFDLE1BQU0sbUJBQW1CLENBQUM7QUFDNUMsT0FBTyxFQUFDLGNBQWMsRUFBQyxNQUFNLHNCQUFzQixDQUFDO0FBS3BELE9BQU8sRUFBQyxnQkFBZ0IsRUFBQyxNQUFNLDBCQUEwQixDQUFDO0FBRTFELE9BQU8sRUFBQyxX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F9DVFJMX1NVRkZJWCwgcnRFdnQuQ29udHJvbC5OYW1lLFxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgRmxvd01vbml0b3JJbnRlcmZhY2UuRkxXTVRSX1NUQVJULCAgdGhpcy5fdGFzay5HZXRUYXNrRGV0YWlscygpKTtcclxuICAgICAgICAgICAgYnJlYWs7XHJcblxyXG4gICAgICAgICAgY2FzZSBJbnRlcm5hbEludGVyZmFjZS5NR19BQ1RfQ1RSTF9QUkVGSVg6XHJcbiAgICAgICAgICAgIGZsb3dNb25pdG9yLmFkZFRhc2tGbG93Q3RybChJbnRlcm5hbEludGVyZmFjZS5NR19BQ1RfQ1RSTF9QUkVGSVgsIHJ0RXZ0LkNvbnRyb2wuTmFtZSxcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIEZsb3dNb25pdG9ySW50ZXJmYWNlLkZMV01UUl9TVEFSVCwgIHRoaXMuX3Rhc2suR2V0VGFza0RldGFpbHMoKSk7XHJcbiAgICAgICAgICAgIGJyZWFrO1xyXG5cclxuICAgICAgICAgIGNhc2UgSW50ZXJuYWxJbnRlcmZhY2UuTUdfQUNUX1ZBUklBQkxFOlxyXG4gICAgICAgICAgICBmbG93TW9uaXRvci5hZGRUYXNrRmxvd0ZsZChJbnRlcm5hbEludGVyZmFjZS5NR19BQ1RfVkFSSUFCTEUsIHJ0RXZ0LmdldEZsZCgpLmdldE5hbWUoKSxcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgRmxvd01vbml0b3JJbnRlcmZhY2UuRkxXTVRSX1NUQVJULCAgdGhpcy5fdGFzay5HZXRUYXNrRGV0YWlscygpKTtcclxuICAgICAgICAgICAgYnJlYWs7XHJcblxyXG4gICAgICAgICAgY2FzZSBJbnRlcm5hbEludGVyZmFjZS5NR19BQ1RfQ1RSTF9WRVJJRklDQVRJT046XHJcbiAgICAgICAgICAgIGZsb3dNb25pdG9yLmFkZFRhc2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4gICAgICAgICAgICAgICAgICBvcGVyID0gdGhpcy5fb3BlcmF0aW9uVGFiLmdldE9wZXJhdGlvbihleGVjRmxvd0lkeCk7XHJcbiAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICB9XHJcbiAgICAgICAgICAgIGVsc2Uge1xyXG4gICAgICAgICAgICAgIHJldHVybmVkRnJvbVNlcnZlciA9IGZhbHNlO1xyXG4gICAgICAgICAgICAgIGV4ZWNGbG93SWR4ID0gLTE7XHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICAgIH1cclxuICAgICAgICAgIGlmIChleGVjRmxvd0lkeCAhPT0gLTEpIHtcclxuICAgICAgICAgICAgZXhlY3V0ZUJsb2NrID0gdHJ1ZTtcclxuICAgICAgICAgICAgb3BlciA9IHRoaXMuX29wZXJhdGlvblRhYi5nZXRPcGVyYXRpb24oZXhlY0Zsb3dJZHgpO1xyXG5cclxuICAgICAgICAgICAgaWYgKHJldHVybmVkRnJvbVNlcnZlcikge1xyXG4gICAgICAgICAgICAgIGlmICh0aGlzLl9vcGVyYXRpb25UYWIuZ2V0T3BlcmF0aW9uKG9wZXIuZ2V0QmxvY2tDbG9zZSgpKS5nZXRTZXJ2ZXJJZCgpIDw9IG5leHRPcGVySWR4KSB7XHJcbiAgICAgICAgICAgICAgICBleGVjdXRlQmxvY2sgPSBmYWxzZTtcclxuICAgICAgICAgICAgICAgIGJsb2NrSWZSZXR1cm5lZEZyb21TZXJ2ZXIgPSB0cnVlO1xyXG4gICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgfVxyXG5cclxuICAgICAgICAgICAgaWYgKGV4ZWN1dGVCbG9jaykge1xyXG4gICAgICAgICAgICAgIC8vIGNhbGwgZXhlY3V0ZU9wZXJhdGlvbnMoKSB0byBleGVjdXRlIHRoZSBvcGVyYXRpb25zIGluIHRoZSBleGVjdXRhYmxlIGJsb2NrXHJcbiAgICAgICAgICAgICAgcmV0dmFscyA9IGF3YWl0IHRoaXMuZXhlY3V0ZU9wZXJhdGlvbnMoZXhlY0Zsb3dJZHggKyAxLCBvcGVyLmdldEJsb2NrQ2xvc2UoKSAtIDEsIHRhc2tFbmQsIG1nZElELCBkZXB0aCArIDEsXHJcbiAgICAgICAgICAgICAgICBpc0NoYW5nZWRDdXJyV25kUmVmLCB0cnVlLCByZXR1cm5lZEZyb21TZXJ2ZXIsIG5leHRPcGVySWR4KTtcclxuICAgICAgICAgICAgICBpZiAocmV0dmFscyAhPT0gbnVsbClcclxuICAgICAgICAgICAgICAgIGlmICghcmV0dmFscy5SZXR1cm5lZEZyb21TZXJ2ZXIpXHJcbiAgICAgICAgICAgICAgICAgIHJldHVybiByZXR2YWxzO1xyXG4gICAgICAgICAgICAgICAgZWxzZSB7XHJcbiAgICAgICAgICAgICAgICAgIHJldHVybmVkRnJvbVNlcnZlciA9IHJldHZhbHMuUmV0dXJuZWRGcm9tU2VydmVyO1xyXG4gICAgICAgICAgICAgICAgICBuZXh0T3BlcklkeCA9IHJldHZhbHMuTmV4dE9wZXJJZHg7XHJcbiAgICAgICAgICAgICAgICAgIGJsb2NrSWZSZXR1cm5lZEZyb21TZXJ2ZXIgPSByZXR2YWxzLkJsb2NrSWZSZXR1cm5lZEZyb21TZXJ2ZXI7XHJcbiAgICAgICAgICAgICAgICAgIGV4ZWNGbG93SWR4ID0gb3Blci5nZXRCbG9ja0VuZCgpIC0gMTtcclxuICAgICAgICAgICAgICAgICAgY29udGludWU7XHJcbiAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICAgIH1cclxuXHJcbiAgICAgICAgICAvKlxyXG4gICAgICAgICAgICogT25jZSB3ZSBmaW5pc2ggZXhlY3V0aW5nIHRoZSBibG9jayxcclxuICAgICAgICAgICAqIGlmIHdlIGFyZSBtb3ZpbmcgaW4gdGhlIGZvcndhcmQgZGlyZWN0aW9uLCBtb3ZlIHRvIEJsb2NrRW5kLlxyXG4gICAgICAgICAgICogb3RoZX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