@magic-xpa/engine 4.1100.0-dev4110.98 → 4.1100.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (492) hide show
  1. package/README.md +7 -7
  2. package/{esm2020 → esm2022}/index.mjs +188 -188
  3. package/{esm2020 → esm2022}/magic-xpa-engine.mjs +1 -1
  4. package/esm2022/src/AccessHelper.mjs +15 -0
  5. package/esm2022/src/ClientManager.mjs +421 -0
  6. package/esm2022/src/CommandsProcessorBase.mjs +56 -0
  7. package/{esm2020 → esm2022}/src/CommandsProcessorManager.mjs +25 -25
  8. package/esm2022/src/CommandsTable.mjs +162 -0
  9. package/esm2022/src/ConstInterface.mjs +517 -0
  10. package/{esm2020 → esm2022}/src/CurrentClientVersion.mjs +2 -2
  11. package/esm2022/src/FlowMonitorInterface.mjs +16 -0
  12. package/esm2022/src/GUIManager.mjs +62 -0
  13. package/esm2022/src/GlobalCommandsManager.mjs +34 -0
  14. package/esm2022/src/GuiEventsProcessor.mjs +156 -0
  15. package/{esm2020 → esm2022}/src/ICommandsTable.mjs +1 -1
  16. package/esm2022/src/ServerConfig.mjs +122 -0
  17. package/{esm2020 → esm2022}/src/bridge/IGuiEvent.mjs +19 -19
  18. package/esm2022/src/bridge/MagicBridge.mjs +41 -0
  19. package/esm2022/src/commands/ClientOriginatedCommandTaskTag.mjs +12 -0
  20. package/{esm2020 → esm2022}/src/commands/ClientToServer/AddUserLocateDataViewCommand.mjs +8 -8
  21. package/{esm2020 → esm2022}/src/commands/ClientToServer/AddUserRangeDataviewCommand.mjs +9 -9
  22. package/{esm2020 → esm2022}/src/commands/ClientToServer/AddUserSortDataViewCommand.mjs +9 -9
  23. package/esm2022/src/commands/ClientToServer/BrowserEscEventCommand.mjs +26 -0
  24. package/{esm2020 → esm2022}/src/commands/ClientToServer/ClientOriginatedCommand.mjs +14 -14
  25. package/{esm2020 → esm2022}/src/commands/ClientToServer/ClientOriginatedCommandSerializer.mjs +59 -59
  26. package/esm2022/src/commands/ClientToServer/ColumnSortEventCommand.mjs +29 -0
  27. package/esm2022/src/commands/ClientToServer/CommandFactory.mjs +261 -0
  28. package/esm2022/src/commands/ClientToServer/CommandSerializationHelper.mjs +67 -0
  29. package/esm2022/src/commands/ClientToServer/ComputeEventCommand.mjs +26 -0
  30. package/{esm2020 → esm2022}/src/commands/ClientToServer/ContextTerminationEventCommand.mjs +24 -21
  31. package/{esm2020 → esm2022}/src/commands/ClientToServer/ContextTimeoutResetCommand.mjs +23 -20
  32. package/{esm2020 → esm2022}/src/commands/ClientToServer/ControlItemsRefreshCommand.mjs +8 -8
  33. package/esm2022/src/commands/ClientToServer/DataViewOutputCommand.mjs +13 -0
  34. package/{esm2020 → esm2022}/src/commands/ClientToServer/DataviewCommand.mjs +44 -44
  35. package/esm2022/src/commands/ClientToServer/EvaluateCommand.mjs +40 -0
  36. package/{esm2020 → esm2022}/src/commands/ClientToServer/EventCommand.mjs +43 -40
  37. package/esm2022/src/commands/ClientToServer/ExecOperCommand.mjs +70 -0
  38. package/esm2022/src/commands/ClientToServer/FetchDataControlValuesEventCommand.mjs +25 -0
  39. package/{esm2020 → esm2022}/src/commands/ClientToServer/GlobalParamsQueryCommand.mjs +10 -10
  40. package/{esm2020 → esm2022}/src/commands/ClientToServer/ICommandTaskTag.mjs +1 -1
  41. package/esm2022/src/commands/ClientToServer/IndexChangeEventCommand.mjs +24 -0
  42. package/esm2022/src/commands/ClientToServer/IniputForceWriteCommand.mjs +26 -0
  43. package/{esm2020 → esm2022}/src/commands/ClientToServer/NonReversibleExitEventCommand.mjs +26 -23
  44. package/{esm2020 → esm2022}/src/commands/ClientToServer/QueryCommand.mjs +20 -20
  45. package/esm2022/src/commands/ClientToServer/RecomputeCommand.mjs +30 -0
  46. package/esm2022/src/commands/ClientToServer/RefreshEventCommand.mjs +30 -0
  47. package/esm2022/src/commands/ClientToServer/RefreshScreenEventCommand.mjs +27 -0
  48. package/esm2022/src/commands/ClientToServer/RollbackEventCommand.mjs +43 -0
  49. package/esm2022/src/commands/ClientToServer/SelectProgramCommand.mjs +19 -0
  50. package/{esm2020 → esm2022}/src/commands/ClientToServer/SetTransactionStateDataviewCommand.mjs +9 -9
  51. package/esm2022/src/commands/ClientToServer/SubformOpenEventCommand.mjs +24 -0
  52. package/esm2022/src/commands/ClientToServer/SubformRefreshEventCommand.mjs +27 -0
  53. package/esm2022/src/commands/ClientToServer/TransactionCommand.mjs +34 -0
  54. package/{esm2020 → esm2022}/src/commands/ClientToServer/UnloadCommand.mjs +18 -15
  55. package/esm2022/src/commands/ClientToServer/WriteMessageToServerLogCommand.mjs +18 -0
  56. package/esm2022/src/commands/DataViewCommandBase.mjs +8 -0
  57. package/{esm2020 → esm2022}/src/commands/IClientCommand.mjs +1 -1
  58. package/esm2022/src/commands/IClientTargetedCommand.mjs +13 -0
  59. package/{esm2020 → esm2022}/src/commands/IClientToServerCommandInfo.mjs +2 -2
  60. package/esm2022/src/commands/ServerToClient/AbortCommand.mjs +65 -0
  61. package/{esm2020 → esm2022}/src/commands/ServerToClient/AddLocateCommand.mjs +21 -21
  62. package/{esm2020 → esm2022}/src/commands/ServerToClient/AddRangeCommand.mjs +62 -62
  63. package/{esm2020 → esm2022}/src/commands/ServerToClient/AddSortCommand.mjs +33 -33
  64. package/esm2022/src/commands/ServerToClient/ClientRefreshCommand.mjs +25 -0
  65. package/esm2022/src/commands/ServerToClient/ClientTargetedCommandBase.mjs +24 -0
  66. package/esm2022/src/commands/ServerToClient/EnhancedVerifyCommand.mjs +45 -0
  67. package/esm2022/src/commands/ServerToClient/OpenURLCommand.mjs +221 -0
  68. package/{esm2020 → esm2022}/src/commands/ServerToClient/ResetLocateCommand.mjs +14 -14
  69. package/{esm2020 → esm2022}/src/commands/ServerToClient/ResetRangeCommand.mjs +14 -14
  70. package/{esm2020 → esm2022}/src/commands/ServerToClient/ResetSortCommand.mjs +14 -14
  71. package/esm2022/src/commands/ServerToClient/ResultCommand.mjs +37 -0
  72. package/esm2022/src/commands/ServerToClient/VerifyCommand.mjs +83 -0
  73. package/{esm2020 → esm2022}/src/commands/ServerToClient/XMLBasedCommandBuilder.mjs +132 -132
  74. package/{esm2020 → esm2022}/src/communications/IConnectionStateManager.mjs +1 -1
  75. package/esm2022/src/communications/InteractiveCommunicationsFailureHandler.mjs +15 -0
  76. package/{esm2020 → esm2022}/src/data/DataSourceIdKey.mjs +2 -2
  77. package/esm2022/src/data/DataView.mjs +1613 -0
  78. package/{esm2020 → esm2022}/src/data/DataViewBase.mjs +3 -3
  79. package/esm2022/src/data/DataviewManager.mjs +28 -0
  80. package/esm2022/src/data/DataviewManagerBase.mjs +15 -0
  81. package/esm2022/src/data/DvCache.mjs +67 -0
  82. package/esm2022/src/data/Field.mjs +646 -0
  83. package/esm2022/src/data/FieldBase.mjs +15 -0
  84. package/esm2022/src/data/FieldsTable.mjs +103 -0
  85. package/{esm2020 → esm2022}/src/data/IRecordsTable.mjs +1 -1
  86. package/{esm2020 → esm2022}/src/data/Key.mjs +88 -88
  87. package/esm2022/src/data/Record.mjs +880 -0
  88. package/{esm2020 → esm2022}/src/data/RecordOutOfDataViewException.mjs +15 -15
  89. package/esm2022/src/data/RecordsTable.mjs +267 -0
  90. package/{esm2020 → esm2022}/src/data/TaskTransactionManager.mjs +107 -103
  91. package/{esm2020 → esm2022}/src/data/XMLBasedDcValuesBuilder.mjs +74 -74
  92. package/{esm2020 → esm2022}/src/enums.mjs +23 -23
  93. package/esm2022/src/env/EnvVariablesTable.mjs +340 -0
  94. package/esm2022/src/env/Environment.mjs +487 -0
  95. package/{esm2020 → esm2022}/src/env/ILanguageData.mjs +1 -1
  96. package/esm2022/src/env/LanguageData.mjs +227 -0
  97. package/{esm2020 → esm2022}/src/env/MirrorString.mjs +65 -65
  98. package/esm2022/src/event/ActionManager.mjs +91 -0
  99. package/esm2022/src/event/Event.mjs +1333 -0
  100. package/esm2022/src/event/EventHandler.mjs +766 -0
  101. package/esm2022/src/event/EventHandlerPosition.mjs +204 -0
  102. package/esm2022/src/event/EventsManager.mjs +2988 -0
  103. package/{esm2020 → esm2022}/src/event/IEventsManager.mjs +6 -6
  104. package/esm2022/src/event/RunTimeEvent.mjs +399 -0
  105. package/{esm2020 → esm2022}/src/event/RunTimeEventBase.mjs +3 -3
  106. package/esm2022/src/event/UserEventsTable.mjs +47 -0
  107. package/esm2022/src/exp/ExpTable.mjs +57 -0
  108. package/esm2022/src/exp/Expression.mjs +200 -0
  109. package/esm2022/src/exp/ExpressionDict.mjs +727 -0
  110. package/esm2022/src/exp/ExpressionEvaluator.mjs +4206 -0
  111. package/esm2022/src/exp/ExpressionLocalJpn.mjs +314 -0
  112. package/{esm2020 → esm2022}/src/exp/GlobalParamsTable.mjs +85 -85
  113. package/esm2022/src/exp/YesNoExp.mjs +36 -0
  114. package/esm2022/src/gui/CreatedFormVector.mjs +23 -0
  115. package/esm2022/src/gui/FormsTable.mjs +66 -0
  116. package/esm2022/src/gui/MgControl.mjs +363 -0
  117. package/esm2022/src/gui/MgForm.mjs +1224 -0
  118. package/esm2022/src/http/HttpManager.mjs +97 -0
  119. package/esm2022/src/http/client/HttpClientAsync.mjs +68 -0
  120. package/{esm2020 → esm2022}/src/http/client/HttpClientBase.mjs +132 -132
  121. package/esm2022/src/http/client/HttpClientEvents.mjs +39 -0
  122. package/esm2022/src/http/client/HttpClientSync.mjs +42 -0
  123. package/esm2022/src/http/client/HttpUtility.mjs +84 -0
  124. package/{esm2020 → esm2022}/src/http/client/ICommunicationsFailureHandler.mjs +1 -1
  125. package/{esm2020 → esm2022}/src/remote/AddUserLocateRemoteDataViewCommand.mjs +18 -18
  126. package/{esm2020 → esm2022}/src/remote/AddUserRangeRemoteDataViewCommand.mjs +18 -18
  127. package/{esm2020 → esm2022}/src/remote/AddUserSortRemoteDataViewCommand.mjs +18 -18
  128. package/esm2022/src/remote/RemoteCommandsProcessor.mjs +883 -0
  129. package/{esm2020 → esm2022}/src/remote/RemoteControlItemsRefreshCommand.mjs +25 -25
  130. package/{esm2020 → esm2022}/src/remote/RemoteDataViewCommandBase.mjs +24 -24
  131. package/{esm2020 → esm2022}/src/remote/RemoteDataViewCommandFactory.mjs +60 -60
  132. package/{esm2020 → esm2022}/src/remote/RemoteDataViewCommandUpdateNonModifiable.mjs +15 -15
  133. package/{esm2020 → esm2022}/src/remote/RemoteDataviewManager.mjs +17 -17
  134. package/{esm2020 → esm2022}/src/remote/RemoteInitDataViewCommand.mjs +10 -10
  135. package/{esm2020 → esm2022}/src/remote/ResetUserLocateRemoteDataviewCommand.mjs +16 -16
  136. package/{esm2020 → esm2022}/src/remote/ResetUserRangeRemoteDataviewCommand.mjs +12 -12
  137. package/{esm2020 → esm2022}/src/remote/ResetUserSortRemoteDataviewCommand.mjs +15 -15
  138. package/esm2022/src/remote/ServerError.mjs +40 -0
  139. package/{esm2020 → esm2022}/src/remote/SetTransactionStateRemoteDataViewCommand.mjs +19 -19
  140. package/esm2022/src/rt/Argument.mjs +265 -0
  141. package/esm2022/src/rt/ArgumentsList.mjs +103 -0
  142. package/esm2022/src/rt/Boundary.mjs +152 -0
  143. package/esm2022/src/rt/CompMainPrgTable.mjs +63 -0
  144. package/esm2022/src/rt/DataviewHeaderBase.mjs +98 -0
  145. package/{esm2020 → esm2022}/src/rt/DataviewHeaderFactory.mjs +6 -6
  146. package/esm2022/src/rt/DataviewHeaders.mjs +53 -0
  147. package/{esm2020 → esm2022}/src/rt/DataviewHeadersSaxHandler.mjs +38 -38
  148. package/{esm2020 → esm2022}/src/rt/ExecutionStack.mjs +94 -94
  149. package/{esm2020 → esm2022}/src/rt/ExecutionStackEntry.mjs +17 -17
  150. package/{esm2020 → esm2022}/src/rt/HandlersTable.mjs +96 -96
  151. package/{esm2020 → esm2022}/src/rt/IDataSourceViewDefinition.mjs +1 -1
  152. package/{esm2020 → esm2022}/src/rt/IDataviewHeader.mjs +1 -1
  153. package/{esm2020 → esm2022}/src/rt/IResultValue.mjs +1 -1
  154. package/esm2022/src/rt/LastFocusedManager.mjs +65 -0
  155. package/esm2022/src/rt/Operation.mjs +735 -0
  156. package/esm2022/src/rt/OperationTable.mjs +67 -0
  157. package/esm2022/src/rt/Recompute.mjs +355 -0
  158. package/{esm2020 → esm2022}/src/rt/RecomputeTable.mjs +62 -62
  159. package/{esm2020 → esm2022}/src/rt/RemoteDataviewHeader.mjs +108 -108
  160. package/esm2022/src/rt/ResultValue.mjs +10 -0
  161. package/esm2022/src/rt/TableCache.mjs +177 -0
  162. package/esm2022/src/rt/TableCacheManager.mjs +67 -0
  163. package/esm2022/src/rt/Transaction.mjs +53 -0
  164. package/esm2022/src/security/UserDetails.mjs +71 -0
  165. package/{esm2020 → esm2022}/src/tasks/IMGDataCollection.mjs +1 -1
  166. package/esm2022/src/tasks/MGData.mjs +552 -0
  167. package/esm2022/src/tasks/MGDataCollection.mjs +252 -0
  168. package/esm2022/src/tasks/RCTimer.mjs +63 -0
  169. package/{esm2020 → esm2022}/src/tasks/RemoteTaskService.mjs +44 -44
  170. package/esm2022/src/tasks/Task.mjs +2499 -0
  171. package/esm2022/src/tasks/TaskBase.mjs +83 -0
  172. package/{esm2020 → esm2022}/src/tasks/TaskServiceBase.mjs +24 -24
  173. package/esm2022/src/tasks/TasksTable.mjs +80 -0
  174. package/esm2022/src/tasks/sort/Sort.mjs +5 -0
  175. package/{esm2020 → esm2022}/src/tasks/sort/SortCollection.mjs +67 -67
  176. package/{esm2020 → esm2022}/src/util/ConstUtils.mjs +13 -13
  177. package/esm2022/src/util/FlowMonitorQueue.mjs +451 -0
  178. package/{esm2020 → esm2022}/src/util/HeapSort.mjs +69 -69
  179. package/{esm2020 → esm2022}/src/util/IMirrorXML.mjs +1 -1
  180. package/{esm2020 → esm2022}/src/util/IServerConfig.mjs +1 -1
  181. package/{esm2020 → esm2022}/src/util/MgBlockingQueue.mjs +1 -1
  182. package/esm2022/src/util/MgPriorityBlockingQueue.mjs +74 -0
  183. package/esm2022/src/util/MgPriorityQueue.mjs +66 -0
  184. package/{esm2020 → esm2022}/src/util/ParamParseResult.mjs +7 -7
  185. package/esm2022/src/util/PrmMap.mjs +152 -0
  186. package/esm2022/src/util/ReturnResult.mjs +46 -0
  187. package/esm2022/src/util/ReturnResultBase.mjs +18 -0
  188. package/esm2022/src/util/Scrambler.mjs +89 -0
  189. package/esm2022/src/util/UniqueIDUtils.mjs +13 -0
  190. package/{esm2020 → esm2022}/src/util/cookie.service.mjs +92 -92
  191. package/{fesm2020 → fesm2022}/magic-xpa-engine.mjs +29888 -29690
  192. package/fesm2022/magic-xpa-engine.mjs.map +1 -0
  193. package/index.d.ts +187 -187
  194. package/package.json +8 -14
  195. package/src/AccessHelper.d.ts +20 -20
  196. package/src/ClientManager.d.ts +35 -32
  197. package/src/CommandsProcessorBase.d.ts +23 -23
  198. package/src/CommandsProcessorManager.d.ts +6 -6
  199. package/src/CommandsTable.d.ts +22 -22
  200. package/src/ConstInterface.d.ts +516 -515
  201. package/src/CurrentClientVersion.d.ts +1 -1
  202. package/src/FlowMonitorInterface.d.ts +15 -15
  203. package/src/GUIManager.d.ts +17 -17
  204. package/src/GlobalCommandsManager.d.ts +17 -17
  205. package/src/GuiEventsProcessor.d.ts +24 -24
  206. package/src/ICommandsTable.d.ts +9 -9
  207. package/src/ServerConfig.d.ts +35 -34
  208. package/src/bridge/IGuiEvent.d.ts +19 -19
  209. package/src/bridge/MagicBridge.d.ts +16 -16
  210. package/src/commands/ClientOriginatedCommandTaskTag.d.ts +8 -8
  211. package/src/commands/ClientToServer/AddUserLocateDataViewCommand.d.ts +4 -4
  212. package/src/commands/ClientToServer/AddUserRangeDataviewCommand.d.ts +6 -6
  213. package/src/commands/ClientToServer/AddUserSortDataViewCommand.d.ts +6 -6
  214. package/src/commands/ClientToServer/BrowserEscEventCommand.d.ts +9 -8
  215. package/src/commands/ClientToServer/ClientOriginatedCommand.d.ts +8 -8
  216. package/src/commands/ClientToServer/ClientOriginatedCommandSerializer.d.ts +6 -6
  217. package/src/commands/ClientToServer/ColumnSortEventCommand.d.ts +11 -10
  218. package/src/commands/ClientToServer/CommandFactory.d.ts +64 -64
  219. package/src/commands/ClientToServer/CommandSerializationHelper.d.ts +20 -20
  220. package/src/commands/ClientToServer/ComputeEventCommand.d.ts +9 -8
  221. package/src/commands/ClientToServer/ContextTerminationEventCommand.d.ts +8 -7
  222. package/src/commands/ClientToServer/ContextTimeoutResetCommand.d.ts +8 -7
  223. package/src/commands/ClientToServer/ControlItemsRefreshCommand.d.ts +6 -6
  224. package/src/commands/ClientToServer/DataViewOutputCommand.d.ts +9 -9
  225. package/src/commands/ClientToServer/DataviewCommand.d.ts +32 -32
  226. package/src/commands/ClientToServer/EvaluateCommand.d.ts +16 -15
  227. package/src/commands/ClientToServer/EventCommand.d.ts +16 -15
  228. package/src/commands/ClientToServer/ExecOperCommand.d.ts +24 -23
  229. package/src/commands/ClientToServer/FetchDataControlValuesEventCommand.d.ts +9 -8
  230. package/src/commands/ClientToServer/GlobalParamsQueryCommand.d.ts +5 -5
  231. package/src/commands/ClientToServer/ICommandTaskTag.d.ts +3 -3
  232. package/src/commands/ClientToServer/IndexChangeEventCommand.d.ts +9 -8
  233. package/src/commands/ClientToServer/IniputForceWriteCommand.d.ts +11 -10
  234. package/src/commands/ClientToServer/NonReversibleExitEventCommand.d.ts +9 -8
  235. package/src/commands/ClientToServer/QueryCommand.d.ts +8 -8
  236. package/src/commands/ClientToServer/RecomputeCommand.d.ts +12 -11
  237. package/src/commands/ClientToServer/RefreshEventCommand.d.ts +13 -12
  238. package/src/commands/ClientToServer/RefreshScreenEventCommand.d.ts +11 -10
  239. package/src/commands/ClientToServer/RollbackEventCommand.d.ts +15 -14
  240. package/src/commands/ClientToServer/SelectProgramCommand.d.ts +7 -6
  241. package/src/commands/ClientToServer/SetTransactionStateDataviewCommand.d.ts +5 -5
  242. package/src/commands/ClientToServer/SubformOpenEventCommand.d.ts +9 -8
  243. package/src/commands/ClientToServer/SubformRefreshEventCommand.d.ts +10 -9
  244. package/src/commands/ClientToServer/TransactionCommand.d.ts +14 -12
  245. package/src/commands/ClientToServer/UnloadCommand.d.ts +8 -7
  246. package/src/commands/ClientToServer/WriteMessageToServerLogCommand.d.ts +6 -6
  247. package/src/commands/DataViewCommandBase.d.ts +6 -6
  248. package/src/commands/IClientCommand.d.ts +2 -2
  249. package/src/commands/IClientTargetedCommand.d.ts +12 -12
  250. package/src/commands/IClientToServerCommandInfo.d.ts +4 -3
  251. package/src/commands/ServerToClient/AbortCommand.d.ts +11 -11
  252. package/src/commands/ServerToClient/AddLocateCommand.d.ts +6 -6
  253. package/src/commands/ServerToClient/AddRangeCommand.d.ts +10 -10
  254. package/src/commands/ServerToClient/AddSortCommand.d.ts +9 -9
  255. package/src/commands/ServerToClient/ClientRefreshCommand.d.ts +7 -7
  256. package/src/commands/ServerToClient/ClientTargetedCommandBase.d.ts +12 -12
  257. package/src/commands/ServerToClient/EnhancedVerifyCommand.d.ts +13 -13
  258. package/src/commands/ServerToClient/OpenURLCommand.d.ts +21 -21
  259. package/src/commands/ServerToClient/ResetLocateCommand.d.ts +6 -6
  260. package/src/commands/ServerToClient/ResetRangeCommand.d.ts +6 -6
  261. package/src/commands/ServerToClient/ResetSortCommand.d.ts +6 -6
  262. package/src/commands/ServerToClient/ResultCommand.d.ts +10 -10
  263. package/src/commands/ServerToClient/VerifyCommand.d.ts +17 -17
  264. package/src/commands/ServerToClient/XMLBasedCommandBuilder.d.ts +11 -11
  265. package/src/communications/IConnectionStateManager.d.ts +4 -4
  266. package/src/communications/InteractiveCommunicationsFailureHandler.d.ts +6 -6
  267. package/src/data/DataSourceIdKey.d.ts +2 -2
  268. package/src/data/DataView.d.ts +162 -162
  269. package/src/data/DataViewBase.d.ts +12 -12
  270. package/src/data/DataviewManager.d.ts +14 -14
  271. package/src/data/DataviewManagerBase.d.ts +11 -11
  272. package/src/data/DvCache.d.ts +15 -15
  273. package/src/data/Field.d.ts +103 -103
  274. package/src/data/FieldBase.d.ts +23 -23
  275. package/src/data/FieldsTable.d.ts +27 -27
  276. package/src/data/IRecordsTable.d.ts +7 -7
  277. package/src/data/Key.d.ts +15 -15
  278. package/src/data/Record.d.ts +157 -156
  279. package/src/data/RecordOutOfDataViewException.d.ts +10 -10
  280. package/src/data/RecordsTable.d.ts +38 -38
  281. package/src/data/TaskTransactionManager.d.ts +17 -17
  282. package/src/data/XMLBasedDcValuesBuilder.d.ts +11 -11
  283. package/src/enums.d.ts +21 -21
  284. package/src/env/EnvVariablesTable.d.ts +17 -17
  285. package/src/env/Environment.d.ts +118 -118
  286. package/src/env/ILanguageData.d.ts +3 -3
  287. package/src/env/LanguageData.d.ts +20 -20
  288. package/src/env/MirrorString.d.ts +15 -15
  289. package/src/event/ActionManager.d.ts +14 -14
  290. package/src/event/Event.d.ts +79 -79
  291. package/src/event/EventHandler.d.ts +66 -66
  292. package/src/event/EventHandlerPosition.d.ts +25 -25
  293. package/src/event/EventsManager.d.ts +205 -204
  294. package/src/event/IEventsManager.d.ts +77 -77
  295. package/src/event/RunTimeEvent.d.ts +126 -123
  296. package/src/event/RunTimeEventBase.d.ts +5 -5
  297. package/src/event/UserEventsTable.d.ts +11 -11
  298. package/src/exp/ExpTable.d.ts +11 -11
  299. package/src/exp/Expression.d.ts +37 -37
  300. package/src/exp/ExpressionDict.d.ts +12 -12
  301. package/src/exp/ExpressionEvaluator.d.ts +198 -198
  302. package/src/exp/ExpressionLocalJpn.d.ts +18 -18
  303. package/src/exp/GlobalParamsTable.d.ts +19 -19
  304. package/src/exp/YesNoExp.d.ts +9 -9
  305. package/src/gui/CreatedFormVector.d.ts +10 -10
  306. package/src/gui/FormsTable.d.ts +15 -15
  307. package/src/gui/MgControl.d.ts +60 -60
  308. package/src/gui/MgForm.d.ts +96 -93
  309. package/src/http/HttpManager.d.ts +25 -25
  310. package/src/http/client/HttpClientAsync.d.ts +16 -16
  311. package/src/http/client/HttpClientBase.d.ts +30 -30
  312. package/src/http/client/HttpClientEvents.d.ts +18 -18
  313. package/src/http/client/HttpClientSync.d.ts +17 -17
  314. package/src/http/client/HttpUtility.d.ts +10 -10
  315. package/src/http/client/ICommunicationsFailureHandler.d.ts +5 -5
  316. package/src/remote/AddUserLocateRemoteDataViewCommand.d.ts +8 -8
  317. package/src/remote/AddUserRangeRemoteDataViewCommand.d.ts +8 -8
  318. package/src/remote/AddUserSortRemoteDataViewCommand.d.ts +8 -8
  319. package/src/remote/RemoteCommandsProcessor.d.ts +51 -51
  320. package/src/remote/RemoteControlItemsRefreshCommand.d.ts +8 -8
  321. package/src/remote/RemoteDataViewCommandBase.d.ts +10 -10
  322. package/src/remote/RemoteDataViewCommandFactory.d.ts +6 -6
  323. package/src/remote/RemoteDataViewCommandUpdateNonModifiable.d.ts +8 -8
  324. package/src/remote/RemoteDataviewManager.d.ts +9 -9
  325. package/src/remote/RemoteInitDataViewCommand.d.ts +7 -7
  326. package/src/remote/ResetUserLocateRemoteDataviewCommand.d.ts +7 -7
  327. package/src/remote/ResetUserRangeRemoteDataviewCommand.d.ts +7 -7
  328. package/src/remote/ResetUserSortRemoteDataviewCommand.d.ts +7 -7
  329. package/src/remote/ServerError.d.ts +16 -16
  330. package/src/remote/SetTransactionStateRemoteDataViewCommand.d.ts +8 -8
  331. package/src/rt/Argument.d.ts +36 -36
  332. package/src/rt/ArgumentsList.d.ts +24 -24
  333. package/src/rt/Boundary.d.ts +27 -27
  334. package/src/rt/CompMainPrgTable.d.ts +10 -10
  335. package/src/rt/DataviewHeaderBase.d.ts +34 -34
  336. package/src/rt/DataviewHeaderFactory.d.ts +5 -5
  337. package/src/rt/DataviewHeaders.d.ts +12 -12
  338. package/src/rt/DataviewHeadersSaxHandler.d.ts +10 -10
  339. package/src/rt/ExecutionStack.d.ts +22 -22
  340. package/src/rt/ExecutionStackEntry.d.ts +7 -7
  341. package/src/rt/HandlersTable.d.ts +19 -19
  342. package/src/rt/IDataSourceViewDefinition.d.ts +6 -6
  343. package/src/rt/IDataviewHeader.d.ts +10 -10
  344. package/src/rt/IResultValue.d.ts +4 -4
  345. package/src/rt/LastFocusedManager.d.ts +23 -23
  346. package/src/rt/Operation.d.ts +97 -97
  347. package/src/rt/OperationTable.d.ts +15 -15
  348. package/src/rt/Recompute.d.ts +41 -41
  349. package/src/rt/RecomputeTable.d.ts +9 -9
  350. package/src/rt/RemoteDataviewHeader.d.ts +14 -14
  351. package/src/rt/ResultValue.d.ts +7 -7
  352. package/src/rt/TableCache.d.ts +29 -29
  353. package/src/rt/TableCacheManager.d.ts +10 -10
  354. package/src/rt/Transaction.d.ts +23 -23
  355. package/src/security/UserDetails.d.ts +16 -16
  356. package/src/tasks/IMGDataCollection.d.ts +26 -26
  357. package/src/tasks/MGData.d.ts +63 -63
  358. package/src/tasks/MGDataCollection.d.ts +42 -42
  359. package/src/tasks/RCTimer.d.ts +13 -13
  360. package/src/tasks/RemoteTaskService.d.ts +16 -16
  361. package/src/tasks/Task.d.ts +312 -312
  362. package/src/tasks/TaskBase.d.ts +123 -123
  363. package/src/tasks/TaskServiceBase.d.ts +16 -16
  364. package/src/tasks/TasksTable.d.ts +21 -21
  365. package/src/tasks/sort/Sort.d.ts +4 -4
  366. package/src/tasks/sort/SortCollection.d.ts +11 -11
  367. package/src/util/ConstUtils.d.ts +3 -3
  368. package/src/util/FlowMonitorQueue.d.ts +70 -70
  369. package/src/util/HeapSort.d.ts +6 -6
  370. package/src/util/IMirrorXML.d.ts +6 -6
  371. package/src/util/IServerConfig.d.ts +11 -11
  372. package/src/util/MgBlockingQueue.d.ts +5 -5
  373. package/src/util/MgPriorityBlockingQueue.d.ts +17 -17
  374. package/src/util/MgPriorityQueue.d.ts +13 -13
  375. package/src/util/ParamParseResult.d.ts +6 -6
  376. package/src/util/PrmMap.d.ts +28 -28
  377. package/src/util/ReturnResult.d.ts +18 -18
  378. package/src/util/ReturnResultBase.d.ts +11 -11
  379. package/src/util/Scrambler.d.ts +10 -10
  380. package/src/util/UniqueIDUtils.d.ts +4 -4
  381. package/src/util/cookie.service.d.ts +8 -8
  382. package/esm2020/src/AccessHelper.mjs +0 -9
  383. package/esm2020/src/ClientManager.mjs +0 -399
  384. package/esm2020/src/CommandsProcessorBase.mjs +0 -58
  385. package/esm2020/src/CommandsTable.mjs +0 -162
  386. package/esm2020/src/ConstInterface.mjs +0 -516
  387. package/esm2020/src/FlowMonitorInterface.mjs +0 -16
  388. package/esm2020/src/GUIManager.mjs +0 -62
  389. package/esm2020/src/GlobalCommandsManager.mjs +0 -34
  390. package/esm2020/src/GuiEventsProcessor.mjs +0 -154
  391. package/esm2020/src/ServerConfig.mjs +0 -117
  392. package/esm2020/src/bridge/MagicBridge.mjs +0 -41
  393. package/esm2020/src/commands/ClientOriginatedCommandTaskTag.mjs +0 -11
  394. package/esm2020/src/commands/ClientToServer/BrowserEscEventCommand.mjs +0 -23
  395. package/esm2020/src/commands/ClientToServer/ColumnSortEventCommand.mjs +0 -26
  396. package/esm2020/src/commands/ClientToServer/CommandFactory.mjs +0 -260
  397. package/esm2020/src/commands/ClientToServer/CommandSerializationHelper.mjs +0 -69
  398. package/esm2020/src/commands/ClientToServer/ComputeEventCommand.mjs +0 -23
  399. package/esm2020/src/commands/ClientToServer/DataViewOutputCommand.mjs +0 -13
  400. package/esm2020/src/commands/ClientToServer/EvaluateCommand.mjs +0 -36
  401. package/esm2020/src/commands/ClientToServer/ExecOperCommand.mjs +0 -67
  402. package/esm2020/src/commands/ClientToServer/FetchDataControlValuesEventCommand.mjs +0 -22
  403. package/esm2020/src/commands/ClientToServer/IndexChangeEventCommand.mjs +0 -21
  404. package/esm2020/src/commands/ClientToServer/IniputForceWriteCommand.mjs +0 -23
  405. package/esm2020/src/commands/ClientToServer/RecomputeCommand.mjs +0 -27
  406. package/esm2020/src/commands/ClientToServer/RefreshEventCommand.mjs +0 -27
  407. package/esm2020/src/commands/ClientToServer/RefreshScreenEventCommand.mjs +0 -24
  408. package/esm2020/src/commands/ClientToServer/RollbackEventCommand.mjs +0 -39
  409. package/esm2020/src/commands/ClientToServer/SelectProgramCommand.mjs +0 -15
  410. package/esm2020/src/commands/ClientToServer/SubformOpenEventCommand.mjs +0 -21
  411. package/esm2020/src/commands/ClientToServer/SubformRefreshEventCommand.mjs +0 -24
  412. package/esm2020/src/commands/ClientToServer/TransactionCommand.mjs +0 -28
  413. package/esm2020/src/commands/ClientToServer/WriteMessageToServerLogCommand.mjs +0 -18
  414. package/esm2020/src/commands/DataViewCommandBase.mjs +0 -10
  415. package/esm2020/src/commands/IClientTargetedCommand.mjs +0 -9
  416. package/esm2020/src/commands/ServerToClient/AbortCommand.mjs +0 -65
  417. package/esm2020/src/commands/ServerToClient/ClientRefreshCommand.mjs +0 -25
  418. package/esm2020/src/commands/ServerToClient/ClientTargetedCommandBase.mjs +0 -27
  419. package/esm2020/src/commands/ServerToClient/EnhancedVerifyCommand.mjs +0 -45
  420. package/esm2020/src/commands/ServerToClient/OpenURLCommand.mjs +0 -221
  421. package/esm2020/src/commands/ServerToClient/ResultCommand.mjs +0 -37
  422. package/esm2020/src/commands/ServerToClient/VerifyCommand.mjs +0 -83
  423. package/esm2020/src/communications/InteractiveCommunicationsFailureHandler.mjs +0 -17
  424. package/esm2020/src/data/DataView.mjs +0 -1610
  425. package/esm2020/src/data/DataviewManager.mjs +0 -28
  426. package/esm2020/src/data/DataviewManagerBase.mjs +0 -15
  427. package/esm2020/src/data/DvCache.mjs +0 -67
  428. package/esm2020/src/data/Field.mjs +0 -646
  429. package/esm2020/src/data/FieldBase.mjs +0 -18
  430. package/esm2020/src/data/FieldsTable.mjs +0 -103
  431. package/esm2020/src/data/Record.mjs +0 -846
  432. package/esm2020/src/data/RecordsTable.mjs +0 -267
  433. package/esm2020/src/env/EnvVariablesTable.mjs +0 -340
  434. package/esm2020/src/env/Environment.mjs +0 -489
  435. package/esm2020/src/env/LanguageData.mjs +0 -226
  436. package/esm2020/src/event/ActionManager.mjs +0 -91
  437. package/esm2020/src/event/Event.mjs +0 -1333
  438. package/esm2020/src/event/EventHandler.mjs +0 -766
  439. package/esm2020/src/event/EventHandlerPosition.mjs +0 -204
  440. package/esm2020/src/event/EventsManager.mjs +0 -2975
  441. package/esm2020/src/event/RunTimeEvent.mjs +0 -392
  442. package/esm2020/src/event/UserEventsTable.mjs +0 -47
  443. package/esm2020/src/exp/ExpTable.mjs +0 -59
  444. package/esm2020/src/exp/Expression.mjs +0 -200
  445. package/esm2020/src/exp/ExpressionDict.mjs +0 -727
  446. package/esm2020/src/exp/ExpressionEvaluator.mjs +0 -4208
  447. package/esm2020/src/exp/ExpressionLocalJpn.mjs +0 -314
  448. package/esm2020/src/exp/YesNoExp.mjs +0 -36
  449. package/esm2020/src/gui/CreatedFormVector.mjs +0 -23
  450. package/esm2020/src/gui/FormsTable.mjs +0 -66
  451. package/esm2020/src/gui/MgControl.mjs +0 -353
  452. package/esm2020/src/gui/MgForm.mjs +0 -1181
  453. package/esm2020/src/http/HttpManager.mjs +0 -97
  454. package/esm2020/src/http/client/HttpClientAsync.mjs +0 -67
  455. package/esm2020/src/http/client/HttpClientEvents.mjs +0 -39
  456. package/esm2020/src/http/client/HttpClientSync.mjs +0 -42
  457. package/esm2020/src/http/client/HttpUtility.mjs +0 -84
  458. package/esm2020/src/remote/RemoteCommandsProcessor.mjs +0 -880
  459. package/esm2020/src/remote/ServerError.mjs +0 -40
  460. package/esm2020/src/rt/Argument.mjs +0 -265
  461. package/esm2020/src/rt/ArgumentsList.mjs +0 -103
  462. package/esm2020/src/rt/Boundary.mjs +0 -152
  463. package/esm2020/src/rt/CompMainPrgTable.mjs +0 -65
  464. package/esm2020/src/rt/DataviewHeaderBase.mjs +0 -96
  465. package/esm2020/src/rt/DataviewHeaders.mjs +0 -53
  466. package/esm2020/src/rt/LastFocusedManager.mjs +0 -67
  467. package/esm2020/src/rt/Operation.mjs +0 -735
  468. package/esm2020/src/rt/OperationTable.mjs +0 -67
  469. package/esm2020/src/rt/Recompute.mjs +0 -355
  470. package/esm2020/src/rt/ResultValue.mjs +0 -12
  471. package/esm2020/src/rt/TableCache.mjs +0 -177
  472. package/esm2020/src/rt/TableCacheManager.mjs +0 -67
  473. package/esm2020/src/rt/Transaction.mjs +0 -53
  474. package/esm2020/src/security/UserDetails.mjs +0 -71
  475. package/esm2020/src/tasks/MGData.mjs +0 -552
  476. package/esm2020/src/tasks/MGDataCollection.mjs +0 -252
  477. package/esm2020/src/tasks/RCTimer.mjs +0 -63
  478. package/esm2020/src/tasks/Task.mjs +0 -2496
  479. package/esm2020/src/tasks/TaskBase.mjs +0 -87
  480. package/esm2020/src/tasks/TasksTable.mjs +0 -80
  481. package/esm2020/src/tasks/sort/Sort.mjs +0 -7
  482. package/esm2020/src/util/FlowMonitorQueue.mjs +0 -453
  483. package/esm2020/src/util/MgPriorityBlockingQueue.mjs +0 -74
  484. package/esm2020/src/util/MgPriorityQueue.mjs +0 -66
  485. package/esm2020/src/util/PrmMap.mjs +0 -151
  486. package/esm2020/src/util/ReturnResult.mjs +0 -46
  487. package/esm2020/src/util/ReturnResultBase.mjs +0 -18
  488. package/esm2020/src/util/Scrambler.mjs +0 -89
  489. package/esm2020/src/util/UniqueIDUtils.mjs +0 -12
  490. package/fesm2015/magic-xpa-engine.mjs +0 -30837
  491. package/fesm2015/magic-xpa-engine.mjs.map +0 -1
  492. package/fesm2020/magic-xpa-engine.mjs.map +0 -1
@@ -0,0 +1,552 @@
1
+ import { HandlersTable } from "../rt/HandlersTable";
2
+ import { TasksTable } from "./TasksTable";
3
+ import { CompMainPrgTable } from "../rt/CompMainPrgTable";
4
+ import { Task } from "./Task";
5
+ import { Logger, XMLConstants, XmlParser } from "@magic-xpa/utils";
6
+ import { RecomputeTable } from "../rt/RecomputeTable";
7
+ import { Debug, NNumber } from "@magic-xpa/mscorelib";
8
+ import { RuntimeContextBase } from "@magic-xpa/gui";
9
+ import { GUIManager } from "../GUIManager";
10
+ import { HttpManager } from "../http/HttpManager";
11
+ import { FlowMonitorQueue } from "../util/FlowMonitorQueue";
12
+ import { RunTimeEvent } from "../event/RunTimeEvent";
13
+ import { ConstInterface } from "../ConstInterface";
14
+ import { LanguageData } from "../env/LanguageData";
15
+ import { EnvParamsTable } from "../env/EnvVariablesTable";
16
+ import { GlobalParams } from "../exp/GlobalParamsTable";
17
+ import { Environment } from "../env/Environment";
18
+ import { GlobalCommandsManager } from "../GlobalCommandsManager";
19
+ import { ServerConfig } from "../ServerConfig";
20
+ import { AccessHelper } from "../AccessHelper";
21
+ import { UserDetails } from "../security/UserDetails";
22
+ import { RemoteCommandsProcessor } from "../remote/RemoteCommandsProcessor";
23
+ export class MGData {
24
+ _expHandlers = null;
25
+ _id = 0;
26
+ _parent = null;
27
+ _mprgTab = null;
28
+ _tasksTab = null;
29
+ _timerHandlers = null;
30
+ _timersStarted = false;
31
+ forceModal = false;
32
+ CmdsToClient = null;
33
+ CmdsToServer = null;
34
+ IsModal = false;
35
+ IsAborting = false;
36
+ get ForceModal() {
37
+ return this.forceModal;
38
+ }
39
+ constructor(toClient, toServer, id, parent, isModal, forceModal) {
40
+ this.CmdsToServer = toClient;
41
+ this.CmdsToClient = toServer;
42
+ if (arguments.length === 5)
43
+ this.constructor_0(id, parent, isModal);
44
+ else
45
+ this.constructor_1(id, parent, isModal, forceModal);
46
+ }
47
+ constructor_0(id, parent, isModal) {
48
+ this._timerHandlers = new HandlersTable();
49
+ this._expHandlers = new HandlersTable();
50
+ this._mprgTab = new TasksTable();
51
+ this._tasksTab = new TasksTable();
52
+ this._id = id;
53
+ this._parent = parent;
54
+ if (AccessHelper.eventsManager.getCompMainPrgTab() === null) {
55
+ let compMainPrgTab = new CompMainPrgTable();
56
+ AccessHelper.eventsManager.setCompMainPrgTab(compMainPrgTab);
57
+ }
58
+ this.IsModal = isModal;
59
+ }
60
+ constructor_1(id, parent, isModal, forceModal) {
61
+ this.constructor_0(id, parent, isModal);
62
+ this.forceModal = forceModal;
63
+ }
64
+ GetId() {
65
+ return this._id;
66
+ }
67
+ AlreadyMovedToFirstControl() {
68
+ let alreadyMoved = false;
69
+ let tasksCount = this.getTasksCount();
70
+ for (let i = 0; i < tasksCount; i = i + 1) {
71
+ let mgForm = this.getTask(i).getForm();
72
+ if (mgForm !== null && mgForm.MovedToFirstControl) {
73
+ alreadyMoved = true;
74
+ break;
75
+ }
76
+ }
77
+ return alreadyMoved;
78
+ }
79
+ StartTimers() {
80
+ if (this._timerHandlers !== null && !this._timersStarted) {
81
+ this._timerHandlers.startTimers(this);
82
+ this._timersStarted = true;
83
+ }
84
+ }
85
+ async fillData(openingTaskDetails, parser) {
86
+ let canContinue;
87
+ do {
88
+ let nextTag = parser.getNextTag();
89
+ canContinue = await this.initInnerObjects(parser, nextTag, openingTaskDetails);
90
+ } while (canContinue);
91
+ Logger.Instance.WriteDevToLog("MGData.FillData(): THE END of the parsing " + parser.getCurrIndex() + " characters");
92
+ }
93
+ async initInnerObjects(parser, foundTagName, openingTaskDetails) {
94
+ if (foundTagName == null)
95
+ return false;
96
+ switch (foundTagName) {
97
+ case XMLConstants.MG_TAG_XML:
98
+ parser.setCurrIndex(parser.getXMLdata().indexOf(XMLConstants.TAG_CLOSE, parser.getCurrIndex()) + 1);
99
+ break;
100
+ case ConstInterface.MG_TAG_DATAVIEW:
101
+ if (!await this.insertDataView(parser)) {
102
+ let endContext = parser.getXMLdata().indexOf('/' + ConstInterface.MG_TAG_DATAVIEW, parser.getCurrIndex());
103
+ parser.setCurrIndex(endContext);
104
+ parser.setCurrIndex2EndOfTag();
105
+ }
106
+ break;
107
+ case ConstInterface.MG_TAG_COMPLETE_DV:
108
+ {
109
+ let task = null;
110
+ let endContext = parser.getXMLdata().indexOf(XMLConstants.TAG_CLOSE, parser.getCurrIndex());
111
+ let index = parser.getXMLdata().indexOf(ConstInterface.MG_TAG_COMPLETE_DV, parser.getCurrIndex()) + ConstInterface.MG_TAG_COMPLETE_DV.length;
112
+ let tokensVector = XmlParser.getTokens(parser.getXMLdata().substr(index, endContext - index), '"');
113
+ let attribute = (tokensVector.get_Item(0));
114
+ let valueStr;
115
+ if (attribute === XMLConstants.MG_ATTR_TASKID) {
116
+ valueStr = (tokensVector.get_Item(1));
117
+ let taskId = valueStr;
118
+ if (this.getTask(taskId) === null)
119
+ task = AccessHelper.mgDataTable.GetTaskByID(taskId);
120
+ else
121
+ task = this.getTask(taskId);
122
+ }
123
+ let start = endContext + 1;
124
+ endContext = parser.getXMLdata().indexOf(XMLConstants.END_TAG + ConstInterface.MG_TAG_COMPLETE_DV, parser.getCurrIndex());
125
+ let dataViewContent = parser.getXMLdata().substr(start, endContext - start);
126
+ task.dataViewContent = dataViewContent;
127
+ parser.setCurrIndex(endContext);
128
+ parser.setCurrIndex2EndOfTag();
129
+ }
130
+ break;
131
+ case ConstInterface.MG_TAG_CONTEXT: {
132
+ let endContext = parser.getXMLdata().indexOf(XMLConstants.TAG_TERM, parser.getCurrIndex());
133
+ if (endContext !== -1 && endContext < parser.getXMLdata().length) {
134
+ let tag = parser.getXMLsubstring(endContext);
135
+ parser.add2CurrIndex(tag.indexOf(ConstInterface.MG_TAG_CONTEXT) + ConstInterface.MG_TAG_CONTEXT.length);
136
+ parser.setCurrIndex(endContext + XMLConstants.TAG_TERM.length);
137
+ }
138
+ break;
139
+ }
140
+ case XMLConstants.MG_TAG_RECOMPUTE:
141
+ let recompTab = new RecomputeTable();
142
+ recompTab.fillData(parser);
143
+ break;
144
+ case ConstInterface.MG_TAG_COMMAND:
145
+ Logger.Instance.WriteDevToLog("goes to command");
146
+ this.CmdsToClient.fillData(parser);
147
+ break;
148
+ case ConstInterface.MG_TAG_LANGUAGE:
149
+ Logger.Instance.WriteDevToLog("goes to language data");
150
+ await LanguageData.Instance.fillData(parser);
151
+ break;
152
+ case ConstInterface.MG_TAG_KBDMAP_URL:
153
+ Logger.Instance.WriteDevToLog("goes to keyBoard");
154
+ await Environment.Instance.fillFromUrl(foundTagName, parser);
155
+ break;
156
+ case ConstInterface.MG_TAG_KBDMAP:
157
+ break;
158
+ case ConstInterface.MG_TAG_COMPMAINPRG:
159
+ Logger.Instance.WriteDevToLog("goes to compmainprg");
160
+ AccessHelper.eventsManager.getCompMainPrgTab().fillData(parser);
161
+ break;
162
+ case ConstInterface.MG_TAG_EVENTS_QUEUE:
163
+ Logger.Instance.WriteDevToLog("goes to eventsqueue");
164
+ this.fillEventsQueue(parser);
165
+ break;
166
+ case ConstInterface.MG_TAG_TASKURL:
167
+ await Task.ProcessTaskURL();
168
+ break;
169
+ case XMLConstants.MG_TAG_TASK:
170
+ Logger.Instance.WriteDevToLog("goes to task");
171
+ let taskCountBefore = this._mprgTab.getSize();
172
+ await this._mprgTab.fillData(this, openingTaskDetails, parser);
173
+ if (this._id !== 0) {
174
+ let taskCountAfter = this._mprgTab.getSize();
175
+ let mgd0 = AccessHelper.mgDataTable.getMGData(0);
176
+ for (let taskIndex = taskCountBefore; taskIndex < taskCountAfter; taskIndex++) {
177
+ let newTask = this._mprgTab.getTask(taskIndex);
178
+ if (newTask.isMainProg() && mgd0._mprgTab.getTask(newTask.getTaskTag()) == null) {
179
+ mgd0._mprgTab.addTask(newTask);
180
+ mgd0.addTask(newTask);
181
+ }
182
+ }
183
+ }
184
+ break;
185
+ case ConstInterface.MG_TAG_ENV:
186
+ Logger.Instance.WriteDevToLog("goes to environment");
187
+ Environment.Instance.fillData(parser);
188
+ break;
189
+ case ConstInterface.MG_TAG_FLWMTR_CONFIG:
190
+ FlowMonitorQueue.Instance.fillData(parser);
191
+ break;
192
+ case XMLConstants.MG_TAG_XML_END:
193
+ parser.setCurrIndex2EndOfTag();
194
+ return false;
195
+ case ConstInterface.MG_TAG_USER_DETAILS:
196
+ UserDetails.Instance.fillData(parser);
197
+ break;
198
+ case ConstInterface.MG_TAG_DBH_REAL_IDXS:
199
+ parser.SkipXMLElement();
200
+ break;
201
+ case ConstInterface.MG_TAG_GLOBALPARAMSCHANGES:
202
+ Logger.Instance.WriteDevToLog("applying global params changes from the server (Set/GetParams)");
203
+ GlobalParams.Instance.fillData(parser);
204
+ break;
205
+ case ConstInterface.MG_TAG_GLOBALPARAMS:
206
+ Logger.Instance.WriteDevToLog("processing base64 encoded image of all global params from the server");
207
+ this.fillGlobalParams(parser);
208
+ break;
209
+ case ConstInterface.MG_TAG_ENV_PARAM_URL:
210
+ Logger.Instance.WriteDevToLog("goes to env params name ");
211
+ await Environment.Instance.fillFromUrl(foundTagName, parser);
212
+ break;
213
+ case ConstInterface.MG_TAG_ENV_PARAM:
214
+ Logger.Instance.WriteDevToLog("goes to env params name ");
215
+ EnvParamsTable.Instance.fillData(parser);
216
+ break;
217
+ case ConstInterface.MG_TAG_CONTEXT_ID:
218
+ {
219
+ let ctxId;
220
+ let ctxEndIdx;
221
+ parser.setCurrIndex(parser.getXMLdata().indexOf(XMLConstants.TAG_CLOSE, parser.getCurrIndex()) + 1);
222
+ ctxEndIdx = parser.getXMLdata().indexOf(XMLConstants.TAG_OPEN, parser.getCurrIndex());
223
+ ctxId = parser.getXMLsubstring(ctxEndIdx).trim();
224
+ parser.setCurrIndex(ctxEndIdx);
225
+ parser.setCurrIndex2EndOfTag();
226
+ RuntimeContextBase.Instance.ContextID = ctxId;
227
+ }
228
+ break;
229
+ case ConstInterface.MG_TAG_SESSION_ID:
230
+ let sessionIdEndIdx;
231
+ parser.setCurrIndex(parser.getXMLdata().indexOf(XMLConstants.TAG_CLOSE, parser.getCurrIndex()) + 1);
232
+ sessionIdEndIdx = parser.getXMLdata().indexOf(XMLConstants.TAG_OPEN, parser.getCurrIndex());
233
+ RemoteCommandsProcessor.GetInstance().SessionId = parser.getXMLsubstring(sessionIdEndIdx).trim();
234
+ parser.setCurrIndex(sessionIdEndIdx);
235
+ parser.setCurrIndex2EndOfTag();
236
+ break;
237
+ case ConstInterface.MG_TAG_HTTP_COMMUNICATION_TIMEOUT:
238
+ {
239
+ let httpCommunicationTimeout;
240
+ let httpCommunicationTimeoutIdx;
241
+ parser.setCurrIndex(parser.getXMLdata().indexOf(XMLConstants.TAG_CLOSE, parser.getCurrIndex()) + 1);
242
+ httpCommunicationTimeoutIdx = parser.getXMLdata().indexOf(XMLConstants.TAG_OPEN, parser.getCurrIndex());
243
+ httpCommunicationTimeout = NNumber.Parse(parser.getXMLsubstring(httpCommunicationTimeoutIdx));
244
+ parser.setCurrIndex(httpCommunicationTimeoutIdx);
245
+ parser.setCurrIndex2EndOfTag();
246
+ HttpManager.GetInstance().HttpCommunicationTimeoutMS = httpCommunicationTimeout * 1000;
247
+ }
248
+ break;
249
+ case ConstInterface.MG_TAG_DATABASE_URL:
250
+ case ConstInterface.MG_TAG_DATABASES_HEADER:
251
+ case ConstInterface.MG_TAG_TASKDEFINITION_IDS_URL:
252
+ case ConstInterface.MG_TAG_DBH_DATA_IDS_URL:
253
+ case ConstInterface.MG_TAG_DBHS_END:
254
+ case ConstInterface.MG_TAG_OFFLINE_SNIPPETS_URL:
255
+ parser.SkipXMLElement();
256
+ break;
257
+ case ConstInterface.MG_TAG_DBHS:
258
+ case ConstInterface.MG_TAG_STARTUP_PROGRAM:
259
+ parser.ReadContentOfCurrentElement();
260
+ break;
261
+ case XMLConstants.MG_TAG_MENUS_OPEN:
262
+ break;
263
+ default:
264
+ Logger.Instance.WriteExceptionToLogWithMsg("There is no such tag name in MGData, add case to MGData.initInnerObjects and case to while of MGData.FillData " + foundTagName);
265
+ return false;
266
+ }
267
+ return true;
268
+ }
269
+ async insertDataView(parser) {
270
+ let task = null;
271
+ let endContext = parser.getXMLdata().indexOf(XMLConstants.TAG_CLOSE, parser.getCurrIndex());
272
+ let index = parser.getXMLdata().indexOf(ConstInterface.MG_TAG_DATAVIEW, parser.getCurrIndex()) + ConstInterface.MG_TAG_DATAVIEW.length;
273
+ let tokensVector = XmlParser.getTokens(parser.getXMLdata().substr(index, endContext - index), '"');
274
+ let invalidate = false;
275
+ for (let i = 0; i < tokensVector.length; i = i + 2) {
276
+ let attribute = tokensVector.get_Item(i);
277
+ if (attribute === XMLConstants.MG_ATTR_TASKID) {
278
+ let valueStr = tokensVector.get_Item(i + 1);
279
+ let taskId = valueStr;
280
+ task = (this.getTask(taskId) || AccessHelper.mgDataTable.GetTaskByID(taskId));
281
+ }
282
+ if (attribute === ConstInterface.MG_ATTR_INVALIDATE) {
283
+ let valueStr = tokensVector.get_Item(i + 1);
284
+ invalidate = XmlParser.getBoolean(valueStr);
285
+ break;
286
+ }
287
+ }
288
+ let result;
289
+ if (task !== null) {
290
+ await task.insertRecordTable(invalidate, parser);
291
+ result = true;
292
+ }
293
+ else {
294
+ result = false;
295
+ }
296
+ return result;
297
+ }
298
+ addTask(newTask) {
299
+ this._tasksTab.addTask(newTask);
300
+ }
301
+ removeTask(task) {
302
+ this._tasksTab.removeTask(task);
303
+ this._mprgTab.removeTask(task);
304
+ }
305
+ getTasksCount() {
306
+ let result;
307
+ if (this._tasksTab !== null) {
308
+ result = this._tasksTab.getSize();
309
+ }
310
+ else {
311
+ result = 0;
312
+ }
313
+ return result;
314
+ }
315
+ getTask(taskIdOrIdx) {
316
+ if (arguments.length === 1 && (taskIdOrIdx === null || typeof taskIdOrIdx === "undefined" || taskIdOrIdx.constructor === String)) {
317
+ return this.getTask_0(taskIdOrIdx);
318
+ }
319
+ return this.getTask_1(taskIdOrIdx);
320
+ }
321
+ getTask_0(taskId) {
322
+ let result;
323
+ if (this._tasksTab !== null && typeof this._tasksTab !== "undefined") {
324
+ result = this._tasksTab.getTask(taskId);
325
+ }
326
+ else {
327
+ result = null;
328
+ }
329
+ return result;
330
+ }
331
+ getTask_1(idx) {
332
+ return this._tasksTab.getTask(idx);
333
+ }
334
+ async buildXML(message, serializeTasks) {
335
+ if (this.CmdsToServer !== null) {
336
+ this.CmdsToServer.buildXML(message);
337
+ }
338
+ if (serializeTasks && this._tasksTab !== null) {
339
+ await this._tasksTab.buildXML(message);
340
+ }
341
+ }
342
+ getFirstTask() {
343
+ let task = null;
344
+ let MDIFrameTask = null;
345
+ for (let i = 0; i < this._tasksTab.getSize(); i = i + 1) {
346
+ task = this._tasksTab.getTask(i);
347
+ if (!task.isMainProg()) {
348
+ break;
349
+ }
350
+ task = null;
351
+ }
352
+ if (task === null && this._id === 0) {
353
+ task = MDIFrameTask;
354
+ }
355
+ return task;
356
+ }
357
+ getMainProg(ctlIdx) {
358
+ for (let i = 0; i < this._mprgTab.getSize(); i = i + 1) {
359
+ let task = this._mprgTab.getTask(i);
360
+ if (task.getCtlIdx() === ctlIdx && task.isMainProg()) {
361
+ return task;
362
+ }
363
+ }
364
+ return null;
365
+ }
366
+ getNextMainProg(ctlIdx) {
367
+ let compMainPrgTab = AccessHelper.eventsManager.getCompMainPrgTab();
368
+ let currSearchIndex = compMainPrgTab.getIndexOf(ctlIdx);
369
+ let nextCtlIdx = compMainPrgTab.getCtlIdx(currSearchIndex + 1);
370
+ let result;
371
+ if (nextCtlIdx === -1) {
372
+ result = null;
373
+ }
374
+ else {
375
+ result = this.getMainProg(nextCtlIdx);
376
+ }
377
+ return result;
378
+ }
379
+ clientTransactionCacheExists() {
380
+ let task;
381
+ for (let i = 0; i < this._tasksTab.getSize(); i = i + 1) {
382
+ task = this._tasksTab.getTask(i);
383
+ if (!task.isMainProg() && task.DataView.modifiedRecordsNumber() > 0) {
384
+ return true;
385
+ }
386
+ }
387
+ return false;
388
+ }
389
+ serverTransactionCacheExists() {
390
+ let task;
391
+ for (let i = 0; i < this._tasksTab.getSize(); i = i + 1) {
392
+ task = this._tasksTab.getTask(i);
393
+ if (!task.isMainProg() && !task.DataView.ServerTransactionCacheEmpty) {
394
+ return true;
395
+ }
396
+ }
397
+ return false;
398
+ }
399
+ getTaskByTaskDefinitionID(taskDefinitionID) {
400
+ let task;
401
+ for (let i = 0; i < this._tasksTab.getSize(); i = i + 1) {
402
+ task = this._tasksTab.getTask(i);
403
+ if (task.TaskDefinitionId.Equals(taskDefinitionID)) {
404
+ return task;
405
+ }
406
+ }
407
+ return null;
408
+ }
409
+ getTimerHandlers() {
410
+ return this._timerHandlers;
411
+ }
412
+ addTimerHandler(handler) {
413
+ this._timerHandlers.add(handler);
414
+ }
415
+ removeTimerHandler(task) {
416
+ for (let i = 0; i < this._timerHandlers.getSize();) {
417
+ let timerTask = this._timerHandlers.getHandler(i).getTask();
418
+ if (timerTask.isDescendentOf(task) && timerTask.getMGData() === this)
419
+ this._timerHandlers.remove(i);
420
+ else
421
+ i++;
422
+ }
423
+ }
424
+ removeExpressionHandler(task) {
425
+ for (let i = 0; i < this._expHandlers.getSize();) {
426
+ let timerTask = this._expHandlers.getHandler(i).getTask();
427
+ if (timerTask.isDescendentOf(task) && timerTask.getMGData() === this)
428
+ this._expHandlers.remove(i);
429
+ else
430
+ i++;
431
+ }
432
+ }
433
+ getExpHandlers() {
434
+ return this._expHandlers;
435
+ }
436
+ addExpHandler(handler, idx) {
437
+ this._expHandlers.insertAfter(handler, idx);
438
+ }
439
+ changeTimers(oldTimers, newTimers) {
440
+ let i = 0;
441
+ let j = 0;
442
+ let guiManager = GUIManager.Instance;
443
+ oldTimers.sort();
444
+ newTimers.sort();
445
+ while (i < oldTimers.length && j < newTimers.length) {
446
+ if (oldTimers.get_Item(i) > newTimers.get_Item(j)) {
447
+ guiManager.startTimer(this, newTimers.get_Item(j), false);
448
+ j = j + 1;
449
+ }
450
+ else {
451
+ if (oldTimers.get_Item(i) < newTimers.get_Item(j)) {
452
+ guiManager.stopTimer(this, oldTimers.get_Item(i), false);
453
+ i = i + 1;
454
+ }
455
+ else {
456
+ i = i + 1;
457
+ j = j + 1;
458
+ }
459
+ }
460
+ }
461
+ while (i < oldTimers.length) {
462
+ guiManager.stopTimer(this, oldTimers.get_Item(i), false);
463
+ i = i + 1;
464
+ }
465
+ while (j < newTimers.length) {
466
+ guiManager.startTimer(this, newTimers.get_Item(j), false);
467
+ j = j + 1;
468
+ }
469
+ }
470
+ fillEventsQueue(parser) {
471
+ while (this.initEvents(parser, parser.getNextTag())) {
472
+ }
473
+ }
474
+ initEvents(parser, foundTagName) {
475
+ let result;
476
+ if (foundTagName === null) {
477
+ result = false;
478
+ }
479
+ else {
480
+ if (foundTagName === ConstInterface.MG_TAG_EVENT) {
481
+ let evt = new RunTimeEvent(null);
482
+ evt.fillData(parser, null);
483
+ evt.convertParamsToArgs();
484
+ evt.setTask(null);
485
+ evt.setFromServer();
486
+ AccessHelper.eventsManager.addToTail(evt);
487
+ }
488
+ else {
489
+ if (foundTagName === ConstInterface.MG_TAG_EVENTS_QUEUE) {
490
+ parser.setCurrIndex(parser.getXMLdata().indexOf(">", parser.getCurrIndex()) + 1);
491
+ }
492
+ else {
493
+ if (foundTagName === "/" + ConstInterface.MG_TAG_EVENTS_QUEUE) {
494
+ parser.setCurrIndex2EndOfTag();
495
+ result = false;
496
+ return result;
497
+ }
498
+ Logger.Instance.WriteExceptionToLogWithMsg("There is no such tag in EventsQueue: " + foundTagName);
499
+ result = false;
500
+ return result;
501
+ }
502
+ }
503
+ result = true;
504
+ }
505
+ return result;
506
+ }
507
+ isMainWindow() {
508
+ return this._parent === null;
509
+ }
510
+ getParentMGdata() {
511
+ return this._parent;
512
+ }
513
+ abort() {
514
+ this.IsAborting = true;
515
+ }
516
+ copyUnframedCmds() {
517
+ let unframedCmds = GlobalCommandsManager.Instance.getUnframedCmds();
518
+ for (let i = 0; i < unframedCmds.length; i = i + 1) {
519
+ this.CmdsToClient.Add(unframedCmds.get_Item(i));
520
+ }
521
+ unframedCmds.SetSize(0);
522
+ }
523
+ getValidAncestor() {
524
+ return this._parent;
525
+ }
526
+ getMaxCtlIdx() {
527
+ let rc = 0;
528
+ for (let i = 0; i < this._tasksTab.getSize(); i = i + 1) {
529
+ let task = this._tasksTab.getTask(i);
530
+ if (task !== null) {
531
+ rc = Math.max(rc, task.getCtlIdx());
532
+ }
533
+ }
534
+ return rc;
535
+ }
536
+ fillGlobalParams(parser) {
537
+ let XMLdata = parser.getXMLdata();
538
+ let endContext = parser.getXMLdata().indexOf(XMLConstants.TAG_TERM, parser.getCurrIndex());
539
+ if (endContext !== -1 && endContext < XMLdata.length) {
540
+ let tag = parser.getXMLsubstring(endContext);
541
+ parser.add2CurrIndex(tag.indexOf(ConstInterface.MG_TAG_GLOBALPARAMS) + ConstInterface.MG_TAG_GLOBALPARAMS.length);
542
+ let tokens = XmlParser.getTokens(RuntimeContextBase.Instance.Parser.getXMLsubstring(endContext), XMLConstants.XML_ATTR_DELIM);
543
+ Debug.Assert(tokens.get_Item(0) === XMLConstants.MG_ATTR_VALUE);
544
+ ServerConfig.Instance.setGlobalParams(tokens.get_Item(1));
545
+ endContext = XMLdata.indexOf(XMLConstants.TAG_OPEN, endContext);
546
+ if (endContext === -1)
547
+ endContext = XMLdata.length;
548
+ parser.setCurrIndex(endContext);
549
+ }
550
+ }
551
+ }
552
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiTUdEYXRhLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vcHJvamVjdHMvZW5naW5lL3NyYy90YXNrcy9NR0RhdGEudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUFDLGFBQWEsRUFBQyxNQUFNLHFCQUFxQixDQUFDO0FBQ2xELE9BQU8sRUFBQyxVQUFVLEVBQUMsTUFBTSxjQUFjLENBQUM7QUFFeEMsT0FBTyxFQUFDLGdCQUFnQixFQUFDLE1BQU0sd0JBQXdCLENBQUM7QUFFeEQsT0FBTyxFQUFDLElBQUksRUFBQyxNQUFNLFFBQVEsQ0FBQztBQUU1QixPQUFPLEVBQUMsTUFBTSxFQUFFLFlBQVksRUFBRSxTQUFTLEVBQUMsTUFBTSxrQkFBa0IsQ0FBQztBQUNqRSxPQUFPLEVBQUMsY0FBYyxFQUFDLE1BQU0sc0JBQXNCLENBQUM7QUFDcEQsT0FBTyxFQUFDLEtBQUssRUFBUSxPQUFPLEVBQWdCLE1BQU0sc0JBQXNCLENBQUM7QUFDekUsT0FBTyxFQUFDLGtCQUFrQixFQUFtQixNQUFNLGdCQUFnQixDQUFDO0FBRXBFLE9BQU8sRUFBQyxVQUFVLEVBQUMsTUFBTSxlQUFlLENBQUM7QUFFekMsT0FBTyxFQUFDLFdBQVcsRUFBQyxNQUFNLHFCQUFxQixDQUFDO0FBQ2hELE9BQU8sRU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