@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
@@ -0,0 +1,63 @@
1
+ import { Logger, StrUtil, XMLConstants, XmlParser } from "@magic-xpa/utils";
2
+ import { NString, NNumber } from "@magic-xpa/mscorelib";
3
+ import { ConstInterface } from "../ConstInterface";
4
+ export class CompMainPrgTable {
5
+ _ctlIdxTab = null;
6
+ fillData(parser) {
7
+ let endContext = parser.getXMLdata().indexOf(XMLConstants.TAG_TERM, parser.getCurrIndex());
8
+ if (endContext !== -1 && endContext < parser.getXMLdata().length) {
9
+ let tag = parser.getXMLsubstring(endContext);
10
+ parser.add2CurrIndex(tag.indexOf(ConstInterface.MG_TAG_COMPMAINPRG) + ConstInterface.MG_TAG_COMPMAINPRG.length);
11
+ let tokensVector = XmlParser.getTokens(parser.getXMLsubstring(endContext), XMLConstants.XML_ATTR_DELIM);
12
+ Logger.Instance.WriteDevToLog("in CompMainPrg.FillData: " + tokensVector.toString());
13
+ this.initElements(tokensVector);
14
+ parser.setCurrIndex(endContext + XMLConstants.TAG_TERM.length);
15
+ return;
16
+ }
17
+ Logger.Instance.WriteExceptionToLogWithMsg("in CompMainPrg.FillData() out of string bounds");
18
+ }
19
+ initElements(tokensVector) {
20
+ for (let j = 0; j < tokensVector.length; j += 2) {
21
+ let attribute = (tokensVector.get_Item(j));
22
+ let valueStr = (tokensVector.get_Item(j + 1));
23
+ if (attribute === XMLConstants.MG_ATTR_VALUE) {
24
+ valueStr = StrUtil.DeleteStringsFromEnds(valueStr, "\"");
25
+ this.initCtlIdxTab(valueStr);
26
+ }
27
+ else
28
+ Logger.Instance.WriteExceptionToLogWithMsg(NString.Format("There is no such index in CompMainPrg. Add case to CompMainPrg.initElements for {0}", attribute));
29
+ }
30
+ Logger.Instance.WriteDevToLog("End CompMainPrg ");
31
+ }
32
+ initCtlIdxTab(val) {
33
+ if (NString.IsNullOrEmpty(val))
34
+ return;
35
+ if (val.indexOf(",") !== -1)
36
+ this._ctlIdxTab = StrUtil.tokenize(val, ",");
37
+ else {
38
+ this._ctlIdxTab = new Array(1);
39
+ this._ctlIdxTab[0] = val;
40
+ }
41
+ }
42
+ getCtlIdx(idx) {
43
+ if (idx >= 0 && idx < this.getSize()) {
44
+ let s = this._ctlIdxTab[idx];
45
+ return NNumber.Parse(s);
46
+ }
47
+ return -1;
48
+ }
49
+ getIndexOf(ctlIdx) {
50
+ let i;
51
+ for (i = 0; i < this.getSize(); i++) {
52
+ if (ctlIdx === this.getCtlIdx(i))
53
+ return i;
54
+ }
55
+ return -1;
56
+ }
57
+ getSize() {
58
+ if (this._ctlIdxTab === null)
59
+ return 0;
60
+ return this._ctlIdxTab.length;
61
+ }
62
+ }
63
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiQ29tcE1haW5QcmdUYWJsZS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy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A9IHZhbDtcclxuICAgIH1cclxuICB9XHJcblxyXG4gIGdldEN0bElkeChpZHg6IG51bWJlcik6IG51bWJlciB7XHJcbiAgICBpZiAoaWR4ID49IDAgJiYgaWR4IDwgdGhpcy5nZXRTaXplKCkpIHtcclxuICAgICAgbGV0IHM6IHN0cmluZyA9IHRoaXMuX2N0bElkeFRhYltpZHhdO1xyXG4gICAgICByZXR1cm4gTk51bWJlci5QYXJzZShzKTtcclxuICAgIH1cclxuICAgIHJldHVybiAtMTtcclxuICB9XHJcblxyXG4gIHB1YmxpYyBnZXRJbmRleE9mKGN0bElkeDogbnVtYmVyKTogbnVtYmVyIHtcclxuICAgIGxldCBpOiBudW1iZXI7XHJcbiAgICBmb3IgKGkgPSAwOyBpIDwgdGhpcy5nZXRTaXplKCk7IGkrKykge1xyXG4gICAgICBpZiAoY3RsSWR4ID09PSB0aGlzLmdldEN0bElkeChpKSlcclxuICAgICAgICByZXR1cm4gaTtcclxuICAgIH1cclxuICAgIHJldHVybiAtMTtcclxuICB9XHJcblxyXG4gIGdldFNpemUoKTogbnVtYmVyIHtcclxuICAgIGlmICh0aGlzLl9jdGxJZHhUYWIgPT09IG51bGwpXHJcbiAgICAgIHJldHVybiAwO1xyXG4gICAgcmV0dXJuIHRoaXMuX2N0bElkeFRhYi5sZW5ndGg7XHJcbiAgfVxyXG59XHJcbiJdfQ==
@@ -0,0 +1,98 @@
1
+ import { YesNoExp } from '../exp/YesNoExp';
2
+ import { NString, RefParam } from '@magic-xpa/mscorelib';
3
+ import { Logger, XMLConstants, XmlParser } from '@magic-xpa/utils';
4
+ import { ConstInterface } from '../ConstInterface';
5
+ export class DataviewHeaderBase {
6
+ _cond = null;
7
+ _task = null;
8
+ Loc = null;
9
+ _dir = '\0';
10
+ _id = 0;
11
+ _keyIdx = 0;
12
+ _retVal = null;
13
+ returnfield = null;
14
+ _linkEvalCondition;
15
+ get ReturnField() {
16
+ if (this.returnfield === null && this._retVal !== null)
17
+ this.returnfield = this.Task.getFieldByValueStr(this._retVal);
18
+ return this.returnfield;
19
+ }
20
+ Mode;
21
+ LinkStartAfterField = 0;
22
+ KeyExpression = 0;
23
+ get IsMainSource() {
24
+ return this._id === -1;
25
+ }
26
+ get Task() {
27
+ return this._task;
28
+ }
29
+ get Fields() {
30
+ return this._task.DataView.GetFieldsTab().getLinkFields(this._id);
31
+ }
32
+ get Id() {
33
+ return this._id;
34
+ }
35
+ get LinkEvaluateCondition() {
36
+ return this._linkEvalCondition;
37
+ }
38
+ constructor(task) {
39
+ this._task = task;
40
+ this._keyIdx = -1;
41
+ this._cond = new YesNoExp(true);
42
+ }
43
+ SetAttributes(attributes) {
44
+ let keys = attributes.Keys;
45
+ keys.forEach((text) => {
46
+ this.setAttribute(text, attributes.get_Item(text));
47
+ });
48
+ }
49
+ setAttribute(attribute, valueStr) {
50
+ switch (attribute) {
51
+ case XMLConstants.MG_ATTR_ID:
52
+ this._id = XmlParser.getInt(valueStr);
53
+ break;
54
+ case ConstInterface.MG_ATTR_KEY:
55
+ this._keyIdx = XmlParser.getInt(valueStr);
56
+ break;
57
+ case ConstInterface.MG_ATTR_KEY_EXP:
58
+ this.KeyExpression = XmlParser.getInt(valueStr);
59
+ break;
60
+ case ConstInterface.MG_ATTR_DIR:
61
+ this._dir = valueStr[0];
62
+ break;
63
+ case ConstInterface.MG_ATTR_COND:
64
+ case ConstInterface.MG_ATTR_COND_RES:
65
+ this._cond.setVal(this._task, valueStr);
66
+ break;
67
+ case ConstInterface.MG_ATTR_RET_VAL:
68
+ this._retVal = valueStr;
69
+ break;
70
+ case ConstInterface.MG_ATTR_LINK_EVAL_CONDITION:
71
+ this._linkEvalCondition = valueStr[0];
72
+ break;
73
+ case ConstInterface.MG_ATTR_LINK_MODE:
74
+ this.Mode = valueStr[0];
75
+ break;
76
+ case ConstInterface.MG_ATTR_LINK_START:
77
+ this.LinkStartAfterField = XmlParser.getInt(valueStr);
78
+ break;
79
+ default:
80
+ Logger.Instance.WriteExceptionToLogWithMsg(NString.Format("Unrecognized attribute: '{0}'", attribute));
81
+ break;
82
+ }
83
+ }
84
+ async getLinkedRecord(curRec) {
85
+ return Promise.resolve(true);
86
+ }
87
+ async InitLinkFields(currRec) {
88
+ for (let i = 0; i < this.Fields.length; i++) {
89
+ let field = this.Fields.get_Item(i);
90
+ let isNull = new RefParam(field.isNull());
91
+ let result = new RefParam(field.getValue(false));
92
+ await field.getInitExpVal(result, isNull);
93
+ currRec.SetFieldValue(field.getId(), isNull.value, result.value);
94
+ field.invalidate(true, false);
95
+ }
96
+ }
97
+ }
98
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiRGF0YXZpZXdIZWFkZXJCYXNlLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vcHJvamVjdHMvZW5naW5lL3NyYy9ydC9EYXRhdmlld0hlYWRlckJhc2UudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUFDLFFBQVEsRUFBQyxNQUFNLGlCQUFpQixDQUFDO0FBRXpDLE9BQU8sRUFBbUIsT0FBTyxFQUFFLFFBQVEsRUFBQyxNQUFNLHNCQUFzQixDQUFDO0FBR3pFLE9BQU8sRUFBd0IsTUFBTSxFQUFFLFlBQVksRUFBRSxTQUFTLEVBQUMsTUFBTSxrQkFBa0IsQ0FBQztBQUl4RixPQUFPLEVBQUMsY0FBYyxFQUFDLE1BQU0sbUJBQW1CLENBQUM7QUFLakQsTUFBTSxPQUFnQixrQkFBa0I7SUFDdEMsS0FBSyxHQUFhLElBQUksQ0FBQztJQUN2QixLQUFLLEdBQVMsSUFBSSxDQUFDO0lBQ25CLEdBQUcsR0FBbUIsSUFBSSxDQUFDO0lBQzNCLElBQUksR0FBVyxJQUFJLENBQUM7SUFDcEIsR0FBRyxHQUFXLENBQUMsQ0FBQztJQUNoQixPQUFPLEdBQVcsQ0FBQyxDQUFDO0lBRVosT0FBTy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SBudWxsIHZhbHVlIG9yIHRoZSBkZWZ1YWx0IHZhbHVlXHJcbiAgICAgICg8UmVjb3JkPmN1cnJSZWMpLlNldEZpZWxkVmFsdWUoZmllbGQuZ2V0SWQoKSwgaXNOdWxsLnZhbHVlLCByZXN1bHQudmFsdWUpO1xyXG4gICAgICBmaWVsZC5pbnZhbGlkYXRlKHRydWUsIGZhbHNlKTtcclxuICAgIH1cclxuICB9XHJcbn1cclxuIl19
@@ -1,7 +1,7 @@
1
- import { RemoteDataviewHeader } from "./RemoteDataviewHeader";
2
- export class DataviewHeaderFactory {
3
- CreateDataviewHeaders(task) {
4
- return new RemoteDataviewHeader(task);
5
- }
6
- }
1
+ import { RemoteDataviewHeader } from "./RemoteDataviewHeader";
2
+ export class DataviewHeaderFactory {
3
+ CreateDataviewHeaders(task) {
4
+ return new RemoteDataviewHeader(task);
5
+ }
6
+ }
7
7
  //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiRGF0YXZpZXdIZWFkZXJGYWN0b3J5LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vcHJvamVjdHMvZW5naW5lL3NyYy9ydC9EYXRhdmlld0hlYWRlckZhY3RvcnkudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQ0EsT0FBTyxFQUFDLG9CQUFvQixFQUFDLE1BQU0sd0JBQXdCLENBQUM7QUFNNUQsTUFBTSxPQUFPLHFCQUFxQjtJQUNoQyxxQkFBcUIsQ0FBQyxJQUFVO1FBQzlCLE9BQU8sSUFBSSxvQkFBb0IsQ0FBQyxJQUFJLENBQUMsQ0FBQztJQUN4QyxDQUFDO0NBQ0YiLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQge0RhdGF2aWV3SGVhZGVyQmFzZX0gZnJvbSBcIi4vRGF0YXZpZXdIZWFkZXJCYXNlXCI7XHJcbmltcG9ydCB7UmVtb3RlRGF0YXZpZXdIZWFkZXJ9IGZyb20gXCIuL1JlbW90ZURhdGF2aWV3SGVhZGVyXCI7XHJcbmltcG9ydCB7VGFza30gZnJvbSBcIi4uL3Rhc2tzL1Rhc2tcIjtcclxuXHJcbi8vLyA8c3VtbWFyeT5cclxuLy8vIGxpbmsgZmFjdG9yeVxyXG4vLy8gPC9zdW1tYXJ5PlxyXG5leHBvcnQgY2xhc3MgRGF0YXZpZXdIZWFkZXJGYWN0b3J5IHtcclxuICBDcmVhdGVEYXRhdmlld0hlYWRlcnModGFzazogVGFzayk6IERhdGF2aWV3SGVhZGVyQmFzZSB7XHJcbiAgICByZXR1cm4gbmV3IFJlbW90ZURhdGF2aWV3SGVhZGVyKHRhc2spO1xyXG4gIH1cclxufVxyXG4iXX0=
@@ -0,0 +1,53 @@
1
+ import { Hashtable, StringBuilder } from "@magic-xpa/mscorelib";
2
+ import { Logger, XMLConstants, XmlParser } from "@magic-xpa/utils";
3
+ import { DataviewHeadersSaxHandler } from "./DataviewHeadersSaxHandler";
4
+ import { RemoteDataviewHeader } from "./RemoteDataviewHeader";
5
+ import { ConstInterface } from "../ConstInterface";
6
+ export class DataviewHeaders {
7
+ _dataviewHeaders = null;
8
+ _task = null;
9
+ constructor(task) {
10
+ this._task = task;
11
+ this._dataviewHeaders = new Hashtable();
12
+ }
13
+ fillData(parser) {
14
+ while (this.initInnerObjects(parser, parser.getNextTag())) {
15
+ }
16
+ }
17
+ initInnerObjects(parser, foundTagName) {
18
+ if (foundTagName === null)
19
+ return false;
20
+ if (foundTagName === ConstInterface.MG_TAG_LINKS) {
21
+ let endContext = parser.getXMLdata().indexOf(ConstInterface.MG_TAG_LINKS_END, parser.getCurrIndex()) + ConstInterface.MG_TAG_LINKS_END.length + 1;
22
+ let xml = parser.getXMLsubstring(endContext);
23
+ xml = XmlParser.escapeUrl(xml);
24
+ new DataviewHeadersSaxHandler(this._task, this._dataviewHeaders, xml);
25
+ parser.setCurrIndex(endContext + XMLConstants.TAG_CLOSE.length);
26
+ }
27
+ else
28
+ Logger.Instance.WriteExceptionToLogWithMsg("There is no such tag in LinksTable.initInnerObjects(): " + foundTagName);
29
+ }
30
+ getDataviewHeaderById(linkId) {
31
+ return this._dataviewHeaders.get_Item(linkId);
32
+ }
33
+ buildDbPosString() {
34
+ if (this._dataviewHeaders.Count === 0) {
35
+ return null;
36
+ }
37
+ let buf = new StringBuilder();
38
+ let dataviewHeaders = this._dataviewHeaders.Values;
39
+ while (dataviewHeaders.MoveNext()) {
40
+ let curr = ((dataviewHeaders.Current instanceof RemoteDataviewHeader) ? dataviewHeaders.Current : null);
41
+ if (curr !== null) {
42
+ let currDbPosVal = curr.getLastFetchedDbPos();
43
+ buf.Append("@");
44
+ if (currDbPosVal !== null) {
45
+ buf.Append(currDbPosVal);
46
+ }
47
+ }
48
+ }
49
+ buf.Append("@");
50
+ return buf.ToString();
51
+ }
52
+ }
53
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiRGF0YXZpZXdIZWFkZXJzLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vcHJvamVjdHMvZW5naW5lL3NyYy9ydC9EYXRhdmlld0hlYWRlcnMudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUFtQixTQUFTLEVBQUUsYUFBYSxFQUFDLE1BQU0sc0JBQXNCLENBQUM7QUFDaEYsT0FBTyxFQUFDLE1BQU0sRUFBRSxZQUFZLEVBQUUsU0FBUyxFQUFDLE1BQU0sa0JBQWtCLENBQUM7QUFFakUsT0FBTyxFQUFDLHlCQUF5QixFQUFDLE1BQU0sNkJBQTZCLENBQUM7QUFDdEUsT0FBTyxFQUFDLG9CQUFvQixFQUFDLE1BQU0sd0JBQXdCLENBQUM7QUFFNUQsT0FBTyxFQUFDLGNBQWMsRUFBQyxNQUFNLG1CQUFtQixDQUFDO0FBS2pELE1BQU0sT0FBTyxlQUF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hlIGxhc3QgZmV0Y2ggZGIgcG9zIG9mIHRoZSBsaW5rIGlzIG51bGwgaXQgbWVhbnMgdGhhdCB3ZSBuZXZlciBmZXRjaGVkIGEgcmVjb3JkIGZyb20gdGhlIGxpbmtcclxuICAgICAgICBpZiAoY3VyckRiUG9zVmFsICE9PSBudWxsKSB7XHJcbiAgICAgICAgICBidWYuQXBwZW5kKGN1cnJEYlBvc1ZhbCk7XHJcbiAgICAgICAgfVxyXG4gICAgICB9XHJcbiAgICB9XHJcbiAgICBidWYuQXBwZW5kKFwiQFwiKTtcclxuICAgIHJldHVybiBidWYuVG9TdHJpbmcoKTtcclxuICB9XHJcblxyXG59XHJcbiJdfQ==
@@ -1,38 +1,38 @@
1
- import { Dictionary, isNullOrUndefined } from "@magic-xpa/mscorelib";
2
- import { JSON_Utils } from "@magic-xpa/utils";
3
- import { DataviewHeaderFactory } from "./DataviewHeaderFactory";
4
- import { ConstInterface } from "../ConstInterface";
5
- export class DataviewHeadersSaxHandler {
6
- constructor(task, dataviewHeaders, xmlData) {
7
- this._dataviewHeaders = null;
8
- this._task = null;
9
- this._dataviewHeadersFactory = null;
10
- this._dataviewHeaders = dataviewHeaders;
11
- this._task = task;
12
- this._dataviewHeadersFactory = new DataviewHeaderFactory();
13
- JSON_Utils.JSONFromXML(xmlData, this.FillFromJSON.bind(this));
14
- }
15
- FillFromJSON(error, result) {
16
- if (error != null) {
17
- throw error;
18
- }
19
- let links = result[ConstInterface.MG_TAG_LINKS][ConstInterface.MG_TAG_LINK];
20
- if (!isNullOrUndefined(links) && links.constructor === Array) {
21
- for (let i = 0; i < links.length; i++) {
22
- let link = links[i]['$'];
23
- if (!isNullOrUndefined(link[ConstInterface.MG_ATTR_TABLE_INDEX])) {
24
- let dataviewHeader = this._dataviewHeadersFactory.CreateDataviewHeaders(this._task);
25
- let attributes = new Dictionary();
26
- for (let key in link) {
27
- if (key !== ConstInterface.MG_ATTR_TABLE_INDEX) {
28
- attributes.Add(key, link[key]);
29
- }
30
- }
31
- dataviewHeader.SetAttributes(attributes);
32
- this._dataviewHeaders.set_Item(dataviewHeader.Id, dataviewHeader);
33
- }
34
- }
35
- }
36
- }
37
- }
38
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiRGF0YXZpZXdIZWFkZXJzU2F4SGFuZGxlci5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uL3Byb2plY3RzL2VuZ2luZS9zcmMvcnQvRGF0YXZpZXdIZWFkZXJzU2F4SGFuZGxlci50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBQUMsVUFBVSxFQUFhLGlCQUFpQixFQUFDLE1BQU0sc0JBQXNCLENBQUM7QUFDOUUsT0FBTyxFQUFDLFVBQVUsRUFBQyxNQUFNLGtCQUFrQixDQUFDO0FBQzVDLE9BQU8sRUFBQyxxQkFBcUIsRUFBQyxNQUFNLHlCQUF5QixDQUFDO0FBQzlELE9BQU8sRUFBQyxjQUFjLEVBQUMsTUFBTSxtQkFBbUIsQ0FBQztBQU9qRCxNQUFNLE9BQU8seUJBQXlCO0lBV3BDLFlBQVksSUFBVSxFQUFFLGVBQXNELEVBQUUsT0FBZTtRQVZ2RixxQkFBZ0IsR0FBMEMsSUFBSSxDQUFDO1FBQy9ELFVBQUssR0FBUyxJQUFJLENBQUM7UUFDbkIsNEJBQXVCLEdBQTBCLElBQUksQ0FBQztRQVM1RCxJQUFJLENBQUMsZ0JBQWdCLEdBQUcsZUFBZSxDQUFDO1FBQ3hDLElBQUksQ0FBQyxLQUFLLEdBQUcsSUFBSSxDQUFDO1FBQ2xCLElBQUksQ0FBQyx1QkFBdUIsR0FBRyxJQUFJLHFCQUFxQixFQUFFLENBQUM7UUFFM0QsVUFBVSxDQUFDLFdBQVcsQ0FBQyxPQUFPLEVBQUUsSUFBSSxDQUFDLFlBQVksQ0FBQyxJQUFJLENBQUMsSU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fQ==
1
+ import { Dictionary, isNullOrUndefined } from "@magic-xpa/mscorelib";
2
+ import { JSON_Utils } from "@magic-xpa/utils";
3
+ import { DataviewHeaderFactory } from "./DataviewHeaderFactory";
4
+ import { ConstInterface } from "../ConstInterface";
5
+ export class DataviewHeadersSaxHandler {
6
+ _dataviewHeaders = null;
7
+ _task = null;
8
+ _dataviewHeadersFactory = null;
9
+ constructor(task, dataviewHeaders, xmlData) {
10
+ this._dataviewHeaders = dataviewHeaders;
11
+ this._task = task;
12
+ this._dataviewHeadersFactory = new DataviewHeaderFactory();
13
+ JSON_Utils.JSONFromXML(xmlData, this.FillFromJSON.bind(this));
14
+ }
15
+ FillFromJSON(error, result) {
16
+ if (error != null) {
17
+ throw error;
18
+ }
19
+ let links = result[ConstInterface.MG_TAG_LINKS][ConstInterface.MG_TAG_LINK];
20
+ if (!isNullOrUndefined(links) && links.constructor === Array) {
21
+ for (let i = 0; i < links.length; i++) {
22
+ let link = links[i]['$'];
23
+ if (!isNullOrUndefined(link[ConstInterface.MG_ATTR_TABLE_INDEX])) {
24
+ let dataviewHeader = this._dataviewHeadersFactory.CreateDataviewHeaders(this._task);
25
+ let attributes = new Dictionary();
26
+ for (let key in link) {
27
+ if (key !== ConstInterface.MG_ATTR_TABLE_INDEX) {
28
+ attributes.Add(key, link[key]);
29
+ }
30
+ }
31
+ dataviewHeader.SetAttributes(attributes);
32
+ this._dataviewHeaders.set_Item(dataviewHeader.Id, dataviewHeader);
33
+ }
34
+ }
35
+ }
36
+ }
37
+ }
38
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiRGF0YXZpZXdIZWFkZXJzU2F4SGFuZGxlci5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uL3Byb2plY3RzL2VuZ2luZS9zcmMvcnQvRGF0YXZpZXdIZWFkZXJzU2F4SGFuZGxlci50cyJdLCJuYW1lcyI6W10sIm1hc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sZXQgZGF0YXZpZXdIZWFkZXI6IERhdGF2aWV3SGVhZGVyQmFzZSA9IHRoaXMuX2RhdGF2aWV3SGVhZGVyc0ZhY3RvcnkuQ3JlYXRlRGF0YXZpZXdIZWFkZXJzKHRoaXMuX3Rhc2spO1xyXG5cclxuICAgICAgICAgIGxldCBhdHRyaWJ1dGVzOiBEaWN0aW9uYXJ5PHN0cmluZz4gPSBuZXcgRGljdGlvbmFyeSgpO1xyXG5cclxuICAgICAgICAgIGZvciAobGV0IGtleSBpbiBsaW5rKSB7XHJcbiAgICAgICAgICAgIGlmIChrZXkgIT09IENvbnN0SW50ZXJmYWNlLk1HX0FUVFJfVEFCTEVfSU5ERVgpIHtcclxuICAgICAgICAgICAgICBhdHRyaWJ1dGVzLkFkZChrZXksIGxpbmtba2V5XSk7XHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICAgIH1cclxuXHJcbiAgICAgICAgICBkYXRhdmlld0hlYWRlci5TZXRBdHRyaWJ1dGVzKGF0dHJpYnV0ZXMpO1xyXG4gICAgICAgICAgdGhpcy5fZGF0YXZpZXdIZWFkZXJzLnNldF9JdGVtKGRhdGF2aWV3SGVhZGVyLklkLCBkYXRhdmlld0hlYWRlcik7XHJcbiAgICAgICAgfVxyXG4gICAgICB9XHJcbiAgICB9XHJcbiAgfVxyXG59XHJcbiJdfQ==
@@ -1,94 +1,94 @@
1
- import { NNumber, Stack, StringBuilder } from "@magic-xpa/mscorelib";
2
- import { ExecutionStackEntry } from "./ExecutionStackEntry";
3
- import { ConstInterface } from "../ConstInterface";
4
- import { XMLConstants } from "@magic-xpa/utils";
5
- export class ExecutionStack {
6
- constructor(inExecStack) {
7
- this._execStack = null;
8
- if (arguments.length === 0) {
9
- this.constructor_0();
10
- return;
11
- }
12
- this.constructor_1(inExecStack);
13
- }
14
- constructor_0() {
15
- this._execStack = new Stack();
16
- }
17
- constructor_1(inExecStack) {
18
- this._execStack = inExecStack.getStack().Clone();
19
- }
20
- getStack() {
21
- return this._execStack;
22
- }
23
- push(execEntryOrTaskId, handlerId, operIdx) {
24
- if (arguments.length === 1)
25
- this.push_0(execEntryOrTaskId);
26
- else
27
- this.push_1(execEntryOrTaskId, handlerId, operIdx);
28
- }
29
- push_0(execEntry) {
30
- this._execStack.push(execEntry);
31
- }
32
- push_1(taskId, handlerId, operIdx) {
33
- let execEntry = new ExecutionStackEntry(taskId, handlerId, operIdx);
34
- this._execStack.push(execEntry);
35
- }
36
- pop() {
37
- return this._execStack.pop();
38
- }
39
- empty() {
40
- return this._execStack.count() === 0;
41
- }
42
- clear() {
43
- this._execStack.Clear();
44
- }
45
- size() {
46
- return this._execStack.count();
47
- }
48
- Equals(execStackCmp) {
49
- let tmpExecStack = new ExecutionStack(this);
50
- let tmpExecStackCmp = new ExecutionStack(execStackCmp);
51
- let equalStacks = false;
52
- if (tmpExecStack.size() === tmpExecStackCmp.size()) {
53
- equalStacks = true;
54
- while (!tmpExecStack.empty() && equalStacks) {
55
- if (!tmpExecStack.pop().Equals(tmpExecStackCmp.pop()))
56
- equalStacks = false;
57
- }
58
- }
59
- return equalStacks;
60
- }
61
- pushUpSideDown(inExecStack) {
62
- let tmpStack = new ExecutionStack(inExecStack);
63
- while (!tmpStack.empty()) {
64
- let tmpStackEntry = tmpStack.pop();
65
- this._execStack.push(tmpStackEntry);
66
- }
67
- }
68
- reverse() {
69
- let tmpExecStack = new ExecutionStack(this);
70
- this.clear();
71
- while (!tmpExecStack.empty()) {
72
- let tmpExecStackEntry = tmpExecStack.pop();
73
- this.push(tmpExecStackEntry);
74
- }
75
- }
76
- buildXML(message) {
77
- let forMessage = new StringBuilder();
78
- while (this._execStack.count() !== 0) {
79
- let ExecEntry = this._execStack.pop();
80
- let taskTag = NNumber.Parse(ExecEntry.TaskId);
81
- if (taskTag > ConstInterface.INITIAL_OFFLINE_TASK_TAG) {
82
- forMessage.Remove(0, forMessage.Length);
83
- continue;
84
- }
85
- forMessage.Append("\n " + XMLConstants.TAG_OPEN + ConstInterface.MG_TAG_EXEC_STACK_ENTRY);
86
- forMessage.Append(" " + XMLConstants.MG_ATTR_TASKID + "=\"" + ExecEntry.TaskId + "\"");
87
- forMessage.Append(" " + ConstInterface.MG_ATTR_HANDLERID + "=\"" + ExecEntry.HandlerId + "\"");
88
- forMessage.Append(" " + ConstInterface.MG_ATTR_OPER_IDX + "=\"" + ExecEntry.OperIdx + "\"");
89
- forMessage.Append(" " + XMLConstants.TAG_TERM);
90
- }
91
- message.Append(forMessage.ToString());
92
- }
93
- }
94
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiRXhlY3V0aW9uU3RhY2suanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi9wcm9qZWN0cy9lbmdpbmUvc3JjL3J0L0V4ZWN1dGlvblN0YWNrLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFBQyxPQUFPLEVBQUUsS0FBSyxFQUFFLGFBQWEsRUFBQyxNQUFNLHNCQUFzQixDQUFDO0FBQ25FLE9BQU8sRUFBQyxtQkFBbUIsRUFBQyxNQUFNLHVCQUF1QixDQUFDO0FBQzFELE9BQU8sRUFBQyxjQUFjLEVBQUMsTUFBTSxtQkFBbUIsQ0FBQztBQUNqRCxPQUFPLEVBQUMsWUFBWSxFQUFDLE1BQU0sa0JBQWtCLENBQUM7QUFLOUMsTUFBTSxPQUFPLGNBQWM7SUFLekIsWUFBWSxXQUE0QjtRQUpoQyxlQUFVLEdBQStCLElBQUksQ0FBQztRQUtwRCxJQUFJLFNBQVMsQ0FBQyxNQUFNLEtBQUssQ0FBQyxFQUFFO1lBQzFCLElBQUksQ0FBQyxhQUFhLEVBQUUsQ0FBQztZQUNyQixPQUFPO1NBQ1I7UUFDRCxJQUFJLENBQUMsYUFBYSxDQUFDLFdBQVcsQ0FBQyxDQUFDO0lBQ2xDLENBQUM7SUFHTyxhQUFhO1FBQ25CLElBQ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gICAgZm9yTWVzc2FnZS5BcHBlbmQoXCIgXCIgKyBDb25zdEludGVyZmFjZS5NR19BVFRSX09QRVJfSURYICsgXCI9XFxcIlwiICsgRXhlY0VudHJ5Lk9wZXJJZHggKyBcIlxcXCJcIik7XHJcbiAgICAgIGZvck1lc3NhZ2UuQXBwZW5kKFwiIFwiICsgWE1MQ29uc3RhbnRzLlRBR19URVJNKTtcclxuICAgIH1cclxuICAgIG1lc3NhZ2UuQXBwZW5kKGZvck1lc3NhZ2UuVG9TdHJpbmcoKSk7XHJcbiAgfVxyXG59XHJcbiJdfQ==
1
+ import { NNumber, Stack, StringBuilder } from "@magic-xpa/mscorelib";
2
+ import { ExecutionStackEntry } from "./ExecutionStackEntry";
3
+ import { ConstInterface } from "../ConstInterface";
4
+ import { XMLConstants } from "@magic-xpa/utils";
5
+ export class ExecutionStack {
6
+ _execStack = null;
7
+ constructor(inExecStack) {
8
+ if (arguments.length === 0) {
9
+ this.constructor_0();
10
+ return;
11
+ }
12
+ this.constructor_1(inExecStack);
13
+ }
14
+ constructor_0() {
15
+ this._execStack = new Stack();
16
+ }
17
+ constructor_1(inExecStack) {
18
+ this._execStack = inExecStack.getStack().Clone();
19
+ }
20
+ getStack() {
21
+ return this._execStack;
22
+ }
23
+ push(execEntryOrTaskId, handlerId, operIdx) {
24
+ if (arguments.length === 1)
25
+ this.push_0(execEntryOrTaskId);
26
+ else
27
+ this.push_1(execEntryOrTaskId, handlerId, operIdx);
28
+ }
29
+ push_0(execEntry) {
30
+ this._execStack.push(execEntry);
31
+ }
32
+ push_1(taskId, handlerId, operIdx) {
33
+ let execEntry = new ExecutionStackEntry(taskId, handlerId, operIdx);
34
+ this._execStack.push(execEntry);
35
+ }
36
+ pop() {
37
+ return this._execStack.pop();
38
+ }
39
+ empty() {
40
+ return this._execStack.count() === 0;
41
+ }
42
+ clear() {
43
+ this._execStack.Clear();
44
+ }
45
+ size() {
46
+ return this._execStack.count();
47
+ }
48
+ Equals(execStackCmp) {
49
+ let tmpExecStack = new ExecutionStack(this);
50
+ let tmpExecStackCmp = new ExecutionStack(execStackCmp);
51
+ let equalStacks = false;
52
+ if (tmpExecStack.size() === tmpExecStackCmp.size()) {
53
+ equalStacks = true;
54
+ while (!tmpExecStack.empty() && equalStacks) {
55
+ if (!tmpExecStack.pop().Equals(tmpExecStackCmp.pop()))
56
+ equalStacks = false;
57
+ }
58
+ }
59
+ return equalStacks;
60
+ }
61
+ pushUpSideDown(inExecStack) {
62
+ let tmpStack = new ExecutionStack(inExecStack);
63
+ while (!tmpStack.empty()) {
64
+ let tmpStackEntry = tmpStack.pop();
65
+ this._execStack.push(tmpStackEntry);
66
+ }
67
+ }
68
+ reverse() {
69
+ let tmpExecStack = new ExecutionStack(this);
70
+ this.clear();
71
+ while (!tmpExecStack.empty()) {
72
+ let tmpExecStackEntry = tmpExecStack.pop();
73
+ this.push(tmpExecStackEntry);
74
+ }
75
+ }
76
+ buildXML(message) {
77
+ let forMessage = new StringBuilder();
78
+ while (this._execStack.count() !== 0) {
79
+ let ExecEntry = this._execStack.pop();
80
+ let taskTag = NNumber.Parse(ExecEntry.TaskId);
81
+ if (taskTag > ConstInterface.INITIAL_OFFLINE_TASK_TAG) {
82
+ forMessage.Remove(0, forMessage.Length);
83
+ continue;
84
+ }
85
+ forMessage.Append("\n " + XMLConstants.TAG_OPEN + ConstInterface.MG_TAG_EXEC_STACK_ENTRY);
86
+ forMessage.Append(" " + XMLConstants.MG_ATTR_TASKID + "=\"" + ExecEntry.TaskId + "\"");
87
+ forMessage.Append(" " + ConstInterface.MG_ATTR_HANDLERID + "=\"" + ExecEntry.HandlerId + "\"");
88
+ forMessage.Append(" " + ConstInterface.MG_ATTR_OPER_IDX + "=\"" + ExecEntry.OperIdx + "\"");
89
+ forMessage.Append(" " + XMLConstants.TAG_TERM);
90
+ }
91
+ message.Append(forMessage.ToString());
92
+ }
93
+ }
94
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoi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