@magic-xpa/engine 4.1100.0-dev4110.20 → 4.1100.0-dev4110.202

Sign up to get free protection for your applications and to get access to all the features.
Files changed (515) 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 +409 -0
  5. package/esm2022/src/CommandsProcessorBase.mjs +56 -0
  6. package/esm2022/src/CommandsProcessorManager.mjs +26 -0
  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 +157 -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/{esm2020 → esm2022}/src/bridge/MagicBridge.mjs +40 -40
  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/{esm2020 → esm2022}/src/commands/ClientToServer/BrowserEscEventCommand.mjs +23 -23
  23. package/{esm2020 → esm2022}/src/commands/ClientToServer/ClientOriginatedCommand.mjs +14 -14
  24. package/esm2022/src/commands/ClientToServer/ClientOriginatedCommandSerializer.mjs +60 -0
  25. package/{esm2020 → esm2022}/src/commands/ClientToServer/ColumnSortEventCommand.mjs +26 -26
  26. package/esm2022/src/commands/ClientToServer/CommandFactory.mjs +260 -0
  27. package/esm2022/src/commands/ClientToServer/CommandSerializationHelper.mjs +67 -0
  28. package/{esm2020 → esm2022}/src/commands/ClientToServer/ComputeEventCommand.mjs +23 -23
  29. package/{esm2020 → esm2022}/src/commands/ClientToServer/ContextTerminationEventCommand.mjs +20 -20
  30. package/{esm2020 → esm2022}/src/commands/ClientToServer/ContextTimeoutResetCommand.mjs +19 -19
  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 +37 -0
  35. package/esm2022/src/commands/ClientToServer/EventCommand.mjs +40 -0
  36. package/esm2022/src/commands/ClientToServer/ExecOperCommand.mjs +67 -0
  37. package/esm2022/src/commands/ClientToServer/FetchDataControlValuesEventCommand.mjs +22 -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/{esm2020 → esm2022}/src/commands/ClientToServer/IndexChangeEventCommand.mjs +21 -21
  41. package/esm2022/src/commands/ClientToServer/IniputForceWriteCommand.mjs +23 -0
  42. package/{esm2020 → esm2022}/src/commands/ClientToServer/NonReversibleExitEventCommand.mjs +23 -23
  43. package/{esm2020 → esm2022}/src/commands/ClientToServer/QueryCommand.mjs +20 -20
  44. package/esm2022/src/commands/ClientToServer/RecomputeCommand.mjs +27 -0
  45. package/esm2022/src/commands/ClientToServer/RefreshEventCommand.mjs +27 -0
  46. package/esm2022/src/commands/ClientToServer/RefreshScreenEventCommand.mjs +24 -0
  47. package/esm2022/src/commands/ClientToServer/RollbackEventCommand.mjs +40 -0
  48. package/{esm2020 → esm2022}/src/commands/ClientToServer/SelectProgramCommand.mjs +14 -14
  49. package/{esm2020 → esm2022}/src/commands/ClientToServer/SetTransactionStateDataviewCommand.mjs +9 -9
  50. package/{esm2020 → esm2022}/src/commands/ClientToServer/SubformOpenEventCommand.mjs +21 -21
  51. package/esm2022/src/commands/ClientToServer/SubformRefreshEventCommand.mjs +24 -0
  52. package/esm2022/src/commands/ClientToServer/TransactionCommand.mjs +30 -0
  53. package/{esm2020 → esm2022}/src/commands/ClientToServer/UnloadCommand.mjs +14 -14
  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 +1 -1
  59. package/esm2022/src/commands/ServerToClient/AbortCommand.mjs +65 -0
  60. package/{esm2020 → esm2022}/src/commands/ServerToClient/AddLocateCommand.mjs +21 -21
  61. package/esm2022/src/commands/ServerToClient/AddRangeCommand.mjs +62 -0
  62. package/esm2022/src/commands/ServerToClient/AddSortCommand.mjs +33 -0
  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/esm2022/src/commands/ServerToClient/XMLBasedCommandBuilder.mjs +132 -0
  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/esm2022/src/data/Key.mjs +88 -0
  86. package/esm2022/src/data/Record.mjs +866 -0
  87. package/{esm2020 → esm2022}/src/data/RecordOutOfDataViewException.mjs +15 -15
  88. package/esm2022/src/data/RecordsTable.mjs +267 -0
  89. package/esm2022/src/data/TaskTransactionManager.mjs +103 -0
  90. package/esm2022/src/data/XMLBasedDcValuesBuilder.mjs +74 -0
  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/esm2022/src/env/MirrorString.mjs +65 -0
  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/esm2022/src/exp/GlobalParamsTable.mjs +85 -0
  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 +1181 -0
  117. package/esm2022/src/http/HttpManager.mjs +97 -0
  118. package/esm2022/src/http/client/HttpClientAsync.mjs +68 -0
  119. package/esm2022/src/http/client/HttpClientBase.mjs +132 -0
  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/esm2022/src/remote/AddUserLocateRemoteDataViewCommand.mjs +18 -0
  125. package/esm2022/src/remote/AddUserRangeRemoteDataViewCommand.mjs +18 -0
  126. package/esm2022/src/remote/AddUserSortRemoteDataViewCommand.mjs +18 -0
  127. package/esm2022/src/remote/RemoteCommandsProcessor.mjs +882 -0
  128. package/esm2022/src/remote/RemoteControlItemsRefreshCommand.mjs +25 -0
  129. package/esm2022/src/remote/RemoteDataViewCommandBase.mjs +24 -0
  130. package/esm2022/src/remote/RemoteDataViewCommandFactory.mjs +61 -0
  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/esm2022/src/remote/ResetUserLocateRemoteDataviewCommand.mjs +17 -0
  135. package/{esm2020 → esm2022}/src/remote/ResetUserRangeRemoteDataviewCommand.mjs +12 -12
  136. package/esm2022/src/remote/ResetUserSortRemoteDataviewCommand.mjs +16 -0
  137. package/esm2022/src/remote/ServerError.mjs +40 -0
  138. package/esm2022/src/remote/SetTransactionStateRemoteDataViewCommand.mjs +20 -0
  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/{esm2020 → esm2022}/src/rt/DataviewHeaderBase.mjs +98 -96
  144. package/{esm2020 → esm2022}/src/rt/DataviewHeaderFactory.mjs +6 -6
  145. package/esm2022/src/rt/DataviewHeaders.mjs +53 -0
  146. package/esm2022/src/rt/DataviewHeadersSaxHandler.mjs +38 -0
  147. package/esm2022/src/rt/ExecutionStack.mjs +94 -0
  148. package/{esm2020 → esm2022}/src/rt/ExecutionStackEntry.mjs +17 -17
  149. package/esm2022/src/rt/HandlersTable.mjs +96 -0
  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/esm2022/src/rt/RecomputeTable.mjs +63 -0
  158. package/esm2022/src/rt/RemoteDataviewHeader.mjs +108 -0
  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/esm2022/src/tasks/RemoteTaskService.mjs +45 -0
  169. package/esm2022/src/tasks/Task.mjs +2498 -0
  170. package/esm2022/src/tasks/TaskBase.mjs +83 -0
  171. package/esm2022/src/tasks/TaskServiceBase.mjs +25 -0
  172. package/esm2022/src/tasks/TasksTable.mjs +80 -0
  173. package/esm2022/src/tasks/sort/Sort.mjs +5 -0
  174. package/esm2022/src/tasks/sort/SortCollection.mjs +67 -0
  175. package/esm2022/src/util/ConstUtils.mjs +14 -0
  176. package/esm2022/src/util/FlowMonitorQueue.mjs +451 -0
  177. package/esm2022/src/util/HeapSort.mjs +70 -0
  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/esm2022/src/util/cookie.service.mjs +92 -0
  190. package/{fesm2020 → fesm2022}/magic-xpa-engine.mjs +29750 -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 +34 -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 +8 -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 +10 -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 +8 -8
  220. package/src/commands/ClientToServer/ContextTerminationEventCommand.d.ts +7 -7
  221. package/src/commands/ClientToServer/ContextTimeoutResetCommand.d.ts +7 -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 +15 -15
  226. package/src/commands/ClientToServer/EventCommand.d.ts +15 -15
  227. package/src/commands/ClientToServer/ExecOperCommand.d.ts +23 -23
  228. package/src/commands/ClientToServer/FetchDataControlValuesEventCommand.d.ts +8 -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 +8 -8
  232. package/src/commands/ClientToServer/IniputForceWriteCommand.d.ts +10 -10
  233. package/src/commands/ClientToServer/NonReversibleExitEventCommand.d.ts +8 -8
  234. package/src/commands/ClientToServer/QueryCommand.d.ts +8 -8
  235. package/src/commands/ClientToServer/RecomputeCommand.d.ts +11 -11
  236. package/src/commands/ClientToServer/RefreshEventCommand.d.ts +12 -12
  237. package/src/commands/ClientToServer/RefreshScreenEventCommand.d.ts +10 -10
  238. package/src/commands/ClientToServer/RollbackEventCommand.d.ts +14 -14
  239. package/src/commands/ClientToServer/SelectProgramCommand.d.ts +6 -6
  240. package/src/commands/ClientToServer/SetTransactionStateDataviewCommand.d.ts +5 -5
  241. package/src/commands/ClientToServer/SubformOpenEventCommand.d.ts +8 -8
  242. package/src/commands/ClientToServer/SubformRefreshEventCommand.d.ts +9 -9
  243. package/src/commands/ClientToServer/TransactionCommand.d.ts +12 -12
  244. package/src/commands/ClientToServer/UnloadCommand.d.ts +7 -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 +3 -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 +156 -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 +93 -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/CommandsProcessorManager.mjs +0 -26
  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/commands/ClientOriginatedCommandTaskTag.mjs +0 -11
  393. package/esm2020/src/commands/ClientToServer/ClientOriginatedCommandSerializer.mjs +0 -60
  394. package/esm2020/src/commands/ClientToServer/CommandFactory.mjs +0 -260
  395. package/esm2020/src/commands/ClientToServer/CommandSerializationHelper.mjs +0 -69
  396. package/esm2020/src/commands/ClientToServer/DataViewOutputCommand.mjs +0 -13
  397. package/esm2020/src/commands/ClientToServer/EvaluateCommand.mjs +0 -36
  398. package/esm2020/src/commands/ClientToServer/EventCommand.mjs +0 -40
  399. package/esm2020/src/commands/ClientToServer/ExecOperCommand.mjs +0 -67
  400. package/esm2020/src/commands/ClientToServer/FetchDataControlValuesEventCommand.mjs +0 -22
  401. package/esm2020/src/commands/ClientToServer/IniputForceWriteCommand.mjs +0 -23
  402. package/esm2020/src/commands/ClientToServer/RecomputeCommand.mjs +0 -27
  403. package/esm2020/src/commands/ClientToServer/RefreshEventCommand.mjs +0 -27
  404. package/esm2020/src/commands/ClientToServer/RefreshScreenEventCommand.mjs +0 -24
  405. package/esm2020/src/commands/ClientToServer/RollbackEventCommand.mjs +0 -39
  406. package/esm2020/src/commands/ClientToServer/SubformRefreshEventCommand.mjs +0 -24
  407. package/esm2020/src/commands/ClientToServer/TransactionCommand.mjs +0 -28
  408. package/esm2020/src/commands/ClientToServer/WriteMessageToServerLogCommand.mjs +0 -18
  409. package/esm2020/src/commands/DataViewCommandBase.mjs +0 -10
  410. package/esm2020/src/commands/IClientTargetedCommand.mjs +0 -9
  411. package/esm2020/src/commands/ServerToClient/AbortCommand.mjs +0 -65
  412. package/esm2020/src/commands/ServerToClient/AddRangeCommand.mjs +0 -62
  413. package/esm2020/src/commands/ServerToClient/AddSortCommand.mjs +0 -33
  414. package/esm2020/src/commands/ServerToClient/ClientRefreshCommand.mjs +0 -25
  415. package/esm2020/src/commands/ServerToClient/ClientTargetedCommandBase.mjs +0 -27
  416. package/esm2020/src/commands/ServerToClient/EnhancedVerifyCommand.mjs +0 -45
  417. package/esm2020/src/commands/ServerToClient/OpenURLCommand.mjs +0 -221
  418. package/esm2020/src/commands/ServerToClient/ResultCommand.mjs +0 -37
  419. package/esm2020/src/commands/ServerToClient/VerifyCommand.mjs +0 -83
  420. package/esm2020/src/commands/ServerToClient/XMLBasedCommandBuilder.mjs +0 -132
  421. package/esm2020/src/communications/InteractiveCommunicationsFailureHandler.mjs +0 -17
  422. package/esm2020/src/data/DataView.mjs +0 -1610
  423. package/esm2020/src/data/DataviewManager.mjs +0 -28
  424. package/esm2020/src/data/DataviewManagerBase.mjs +0 -15
  425. package/esm2020/src/data/DvCache.mjs +0 -67
  426. package/esm2020/src/data/Field.mjs +0 -646
  427. package/esm2020/src/data/FieldBase.mjs +0 -18
  428. package/esm2020/src/data/FieldsTable.mjs +0 -103
  429. package/esm2020/src/data/Key.mjs +0 -88
  430. package/esm2020/src/data/Record.mjs +0 -846
  431. package/esm2020/src/data/RecordsTable.mjs +0 -267
  432. package/esm2020/src/data/TaskTransactionManager.mjs +0 -103
  433. package/esm2020/src/data/XMLBasedDcValuesBuilder.mjs +0 -74
  434. package/esm2020/src/env/EnvVariablesTable.mjs +0 -340
  435. package/esm2020/src/env/Environment.mjs +0 -489
  436. package/esm2020/src/env/LanguageData.mjs +0 -226
  437. package/esm2020/src/env/MirrorString.mjs +0 -65
  438. package/esm2020/src/event/ActionManager.mjs +0 -91
  439. package/esm2020/src/event/Event.mjs +0 -1333
  440. package/esm2020/src/event/EventHandler.mjs +0 -766
  441. package/esm2020/src/event/EventHandlerPosition.mjs +0 -204
  442. package/esm2020/src/event/EventsManager.mjs +0 -2975
  443. package/esm2020/src/event/RunTimeEvent.mjs +0 -392
  444. package/esm2020/src/event/UserEventsTable.mjs +0 -47
  445. package/esm2020/src/exp/ExpTable.mjs +0 -59
  446. package/esm2020/src/exp/Expression.mjs +0 -200
  447. package/esm2020/src/exp/ExpressionDict.mjs +0 -727
  448. package/esm2020/src/exp/ExpressionEvaluator.mjs +0 -4212
  449. package/esm2020/src/exp/ExpressionLocalJpn.mjs +0 -314
  450. package/esm2020/src/exp/GlobalParamsTable.mjs +0 -85
  451. package/esm2020/src/exp/YesNoExp.mjs +0 -36
  452. package/esm2020/src/gui/CreatedFormVector.mjs +0 -23
  453. package/esm2020/src/gui/FormsTable.mjs +0 -66
  454. package/esm2020/src/gui/MgControl.mjs +0 -353
  455. package/esm2020/src/gui/MgForm.mjs +0 -1181
  456. package/esm2020/src/http/HttpManager.mjs +0 -97
  457. package/esm2020/src/http/client/HttpClientAsync.mjs +0 -67
  458. package/esm2020/src/http/client/HttpClientBase.mjs +0 -132
  459. package/esm2020/src/http/client/HttpClientEvents.mjs +0 -39
  460. package/esm2020/src/http/client/HttpClientSync.mjs +0 -42
  461. package/esm2020/src/http/client/HttpUtility.mjs +0 -84
  462. package/esm2020/src/remote/AddUserLocateRemoteDataViewCommand.mjs +0 -18
  463. package/esm2020/src/remote/AddUserRangeRemoteDataViewCommand.mjs +0 -18
  464. package/esm2020/src/remote/AddUserSortRemoteDataViewCommand.mjs +0 -18
  465. package/esm2020/src/remote/RemoteCommandsProcessor.mjs +0 -880
  466. package/esm2020/src/remote/RemoteControlItemsRefreshCommand.mjs +0 -25
  467. package/esm2020/src/remote/RemoteDataViewCommandBase.mjs +0 -24
  468. package/esm2020/src/remote/RemoteDataViewCommandFactory.mjs +0 -61
  469. package/esm2020/src/remote/ResetUserLocateRemoteDataviewCommand.mjs +0 -17
  470. package/esm2020/src/remote/ResetUserSortRemoteDataviewCommand.mjs +0 -16
  471. package/esm2020/src/remote/ServerError.mjs +0 -40
  472. package/esm2020/src/remote/SetTransactionStateRemoteDataViewCommand.mjs +0 -20
  473. package/esm2020/src/rt/Argument.mjs +0 -265
  474. package/esm2020/src/rt/ArgumentsList.mjs +0 -103
  475. package/esm2020/src/rt/Boundary.mjs +0 -152
  476. package/esm2020/src/rt/CompMainPrgTable.mjs +0 -65
  477. package/esm2020/src/rt/DataviewHeaders.mjs +0 -53
  478. package/esm2020/src/rt/DataviewHeadersSaxHandler.mjs +0 -38
  479. package/esm2020/src/rt/ExecutionStack.mjs +0 -94
  480. package/esm2020/src/rt/HandlersTable.mjs +0 -96
  481. package/esm2020/src/rt/LastFocusedManager.mjs +0 -67
  482. package/esm2020/src/rt/Operation.mjs +0 -735
  483. package/esm2020/src/rt/OperationTable.mjs +0 -67
  484. package/esm2020/src/rt/Recompute.mjs +0 -355
  485. package/esm2020/src/rt/RecomputeTable.mjs +0 -63
  486. package/esm2020/src/rt/RemoteDataviewHeader.mjs +0 -108
  487. package/esm2020/src/rt/ResultValue.mjs +0 -12
  488. package/esm2020/src/rt/TableCache.mjs +0 -177
  489. package/esm2020/src/rt/TableCacheManager.mjs +0 -67
  490. package/esm2020/src/rt/Transaction.mjs +0 -53
  491. package/esm2020/src/security/UserDetails.mjs +0 -71
  492. package/esm2020/src/tasks/MGData.mjs +0 -552
  493. package/esm2020/src/tasks/MGDataCollection.mjs +0 -252
  494. package/esm2020/src/tasks/RCTimer.mjs +0 -63
  495. package/esm2020/src/tasks/RemoteTaskService.mjs +0 -45
  496. package/esm2020/src/tasks/Task.mjs +0 -2495
  497. package/esm2020/src/tasks/TaskBase.mjs +0 -87
  498. package/esm2020/src/tasks/TaskServiceBase.mjs +0 -25
  499. package/esm2020/src/tasks/TasksTable.mjs +0 -80
  500. package/esm2020/src/tasks/sort/Sort.mjs +0 -7
  501. package/esm2020/src/tasks/sort/SortCollection.mjs +0 -67
  502. package/esm2020/src/util/ConstUtils.mjs +0 -14
  503. package/esm2020/src/util/FlowMonitorQueue.mjs +0 -453
  504. package/esm2020/src/util/HeapSort.mjs +0 -70
  505. package/esm2020/src/util/MgPriorityBlockingQueue.mjs +0 -74
  506. package/esm2020/src/util/MgPriorityQueue.mjs +0 -66
  507. package/esm2020/src/util/PrmMap.mjs +0 -151
  508. package/esm2020/src/util/ReturnResult.mjs +0 -46
  509. package/esm2020/src/util/ReturnResultBase.mjs +0 -18
  510. package/esm2020/src/util/Scrambler.mjs +0 -89
  511. package/esm2020/src/util/UniqueIDUtils.mjs +0 -12
  512. package/esm2020/src/util/cookie.service.mjs +0 -92
  513. package/fesm2015/magic-xpa-engine.mjs +0 -30835
  514. package/fesm2015/magic-xpa-engine.mjs.map +0 -1
  515. package/fesm2020/magic-xpa-engine.mjs.map +0 -1
@@ -1,67 +0,0 @@
1
- import { ApplicationException, Int32, List } from "@magic-xpa/mscorelib";
2
- import { Operation } from "./Operation";
3
- import { ConstInterface } from "../ConstInterface";
4
- export class OperationTable {
5
- constructor() {
6
- this._operations = new List();
7
- this._firstBlockOperIdx = Int32.MaxValue;
8
- }
9
- fillData(taskRef, evtHandler, parser) {
10
- while (this.initInnerObjects(parser.getNextTag(), taskRef, evtHandler, parser)) {
11
- }
12
- for (let i = this._firstBlockOperIdx; i < this._operations.length; i = i + 1) {
13
- let operation = this._operations.get_Item(i);
14
- let operType = operation.getType();
15
- if (operType === ConstInterface.MG_OPER_LOOP || operType === ConstInterface.MG_OPER_BLOCK ||
16
- operType === ConstInterface.MG_OPER_ELSE) {
17
- let operIdx = this.serverId2operIdx(operation.getBlockClose(), i + 1);
18
- operation.setBlockClose(operIdx);
19
- operIdx = this.serverId2operIdx(operation.getBlockEnd(), operIdx);
20
- operation.setBlockEnd(operIdx);
21
- }
22
- }
23
- }
24
- initInnerObjects(foundTagName, taskRef, evtHandler, parser) {
25
- if (foundTagName != null && foundTagName === (ConstInterface.MG_TAG_OPER)) {
26
- let oper = new Operation();
27
- oper.fillData(taskRef, evtHandler, parser);
28
- this._operations.push(oper);
29
- if (this._firstBlockOperIdx === Int32.MaxValue
30
- && (oper.getType() === ConstInterface.MG_OPER_LOOP || oper.getType() === ConstInterface.MG_OPER_BLOCK))
31
- this._firstBlockOperIdx = this._operations.length - 1;
32
- return true;
33
- }
34
- return false;
35
- }
36
- getSize() {
37
- return this._operations.length;
38
- }
39
- getOperation(idx) {
40
- if (idx >= 0 && idx < this._operations.length)
41
- return this._operations.get_Item(idx);
42
- throw new ApplicationException("in OperationTable.getOperation() index out of bounds: " + idx);
43
- }
44
- serverId2operIdx(id, startFrom) {
45
- let operIdx = -1;
46
- for (let i = startFrom; i < this._operations.length; i = i + 1) {
47
- let operation = this._operations.get_Item(i);
48
- if (id === operation.getServerId()) {
49
- operIdx = i;
50
- break;
51
- }
52
- }
53
- return operIdx;
54
- }
55
- serverId2FollowingOperIdx(id, startFrom) {
56
- let operIdx = -1;
57
- for (let i = startFrom; i < this._operations.length; i = i + 1) {
58
- let operation = this._operations.get_Item(i);
59
- if (id < operation.getServerId()) {
60
- operIdx = i;
61
- break;
62
- }
63
- }
64
- return operIdx;
65
- }
66
- }
67
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiT3BlcmF0aW9uVGFibGUuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi9wcm9qZWN0cy9lbmdpbmUvc3JjL3J0L09wZXJhdGlvblRhYmxlLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFBQyxvQkFBb0IsRUFBRSxLQUFLLEVBQUUsSUFBSSxFQUFDLE1BQU0sc0JBQXNCLENBQUM7QUFFdkUsT0FBTyxFQUFDLFNBQVMsRUFBQyxNQUFNLGFBQWEsQ0FBQztBQUd0QyxPQUFPLEVBQUMsY0FBYyxFQUFDLE1BQU0sbUJBQW1CLENBQUM7QUFHakQsTUFBTSxPQUFPLGNBQWM7SUFJekI7UUFIUSxnQkFBVyxHQUFvQixJQUFJLElBQUksRUFBYSxDQUFDO1FBQ3JELHVCQUFrQixHQUFXLEtBQUssQ0FBQyxRQUFRLENBQUM7SUFHcEQsQ0FBQztJQVFELFFBQVEsQ0FBQyxPQUFhLEVBQUUsVUFBd0IsRUFBRSxNQUFpQjtRQUNqRSxPQUFPLElBQUksQ0FB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W1iZXIgPSBzdGFydEZyb207IGkgPCB0aGlzLl9vcGVyYXRpb25zLmxlbmd0aDsgaSA9IGkgKyAxKSB7XHJcbiAgICAgIGxldCBvcGVyYXRpb246IE9wZXJhdGlvbiA9IHRoaXMuX29wZXJhdGlvbnMuZ2V0X0l0ZW0oaSk7XHJcblxyXG4gICAgICBpZiAoaWQgPCBvcGVyYXRpb24uZ2V0U2VydmVySWQoKSkge1xyXG4gICAgICAgIG9wZXJJZHggPSBpO1xyXG4gICAgICAgIGJyZWFrO1xyXG4gICAgICB9XHJcbiAgICB9XHJcbiAgICByZXR1cm4gb3BlcklkeDtcclxuICB9XHJcbn1cclxuIl19
@@ -1,355 +0,0 @@
1
- import { PropInterface, PropTable } from "@magic-xpa/gui";
2
- import { FieldBase } from "../data/FieldBase";
3
- import { List } from "@magic-xpa/mscorelib";
4
- import { CommandsProcessorBase_SendingInstruction } from "../CommandsProcessorBase";
5
- import { Constants, InternalInterface, Logger, XMLConstants, XmlParser } from "@magic-xpa/utils";
6
- import { Record } from "../data/Record";
7
- import { CommandFactory } from "../commands/ClientToServer/CommandFactory";
8
- import { RemoteCommandsProcessor } from "../remote/RemoteCommandsProcessor";
9
- import { DataviewHeaderBase } from "./DataviewHeaderBase";
10
- import { FlowMonitorQueue } from "../util/FlowMonitorQueue";
11
- import { ConstInterface } from "../ConstInterface";
12
- import { Environment } from "../env/Environment";
13
- import { AccessHelper } from "../AccessHelper";
14
- export var Recompute_RcmpBy;
15
- (function (Recompute_RcmpBy) {
16
- Recompute_RcmpBy["CLIENT"] = "C";
17
- Recompute_RcmpBy["SERVER_ON_CHANGE"] = "O";
18
- })(Recompute_RcmpBy || (Recompute_RcmpBy = {}));
19
- export class Recompute {
20
- constructor() {
21
- this._ctrlProps = null;
22
- this._formProps = null;
23
- this._isOwnerFld = true;
24
- this.OwnerFld = null;
25
- this._rcmpOrder = null;
26
- this._subForms = null;
27
- this._subFormsOnlyRecomp = false;
28
- this._hasServerLinksRecomputes = false;
29
- this.RcmpMode = null;
30
- this.Task = null;
31
- }
32
- fillData(dataView, taskRef, parser) {
33
- this.Task = taskRef;
34
- this._isOwnerFld = true;
35
- while (this.initInnerObjects(parser, parser.getNextTag(), dataView)) {
36
- }
37
- }
38
- initInnerObjects(parser, foundTagName, dataView) {
39
- switch (foundTagName) {
40
- case XMLConstants.MG_TAG_FLD:
41
- if (this._isOwnerFld) {
42
- this.fillFldField(parser, dataView);
43
- this._isOwnerFld = false;
44
- }
45
- else
46
- this.fillFldField(parser, dataView);
47
- break;
48
- case ConstInterface.MG_TAG_LINK:
49
- this.fillLink(parser, dataView);
50
- break;
51
- case XMLConstants.MG_TAG_CONTROL:
52
- if (this._ctrlProps == null)
53
- this._ctrlProps = new PropTable();
54
- this._ctrlProps.fillDataByExists(this.Task, parser);
55
- if (this._ctrlProps.getCtrlRef() != null && this._ctrlProps.getCtrlRef().IsRepeatable && this.OwnerFld.IsVirtual &&
56
- !(this.OwnerFld.hasInitExp()))
57
- this.OwnerFld.causeTableInvalidation(true);
58
- break;
59
- case XMLConstants.MG_TAG_FORM_PROPERTIES:
60
- if (this._formProps == null)
61
- this._formProps = new PropTable();
62
- this._formProps.fillDataByExists(this.Task, parser);
63
- break;
64
- case ConstInterface.MG_TAG_FLD_END:
65
- parser.setCurrIndex2EndOfTag();
66
- return false;
67
- default:
68
- Logger.Instance.WriteExceptionToLogWithMsg("There is no such tag in Recompute. Insert else if to Recompute.initInnerObjects for " + foundTagName);
69
- return false;
70
- }
71
- return true;
72
- }
73
- AddRecomputeItem(item) {
74
- if (this._rcmpOrder === null)
75
- this._rcmpOrder = new List();
76
- this._rcmpOrder.push(item);
77
- }
78
- fillLink(parser, dataView) {
79
- let endContext = parser.getXMLdata().indexOf(XMLConstants.TAG_TERM, parser.getCurrIndex());
80
- if (endContext !== -1 && endContext < parser.getXMLdata().length) {
81
- let tag = parser.getXMLsubstring(endContext);
82
- parser.add2CurrIndex(tag.indexOf(ConstInterface.MG_TAG_LINK) + ConstInterface.MG_TAG_LINK.length);
83
- let tokensVector = XmlParser.getTokens(parser.getXMLsubstring(endContext), XMLConstants.XML_ATTR_DELIM);
84
- for (let j = 0; j < tokensVector.length; j += 2) {
85
- let attribute = (tokensVector.get_Item(j));
86
- let valueStr = (tokensVector.get_Item(j + 1));
87
- if (attribute === XMLConstants.MG_ATTR_ID)
88
- this.AddRecomputeItem(dataView.getTask().getDataviewHeaders().getDataviewHeaderById(XmlParser.getInt(valueStr)));
89
- else
90
- Logger.Instance.WriteExceptionToLogWithMsg("There is no such tag in Recompute class. Insert case to Recompute.fillLink for " + attribute);
91
- }
92
- parser.setCurrIndex(endContext + XMLConstants.TAG_TERM.length);
93
- return;
94
- }
95
- else
96
- Logger.Instance.WriteExceptionToLogWithMsg("in Recompute.fillLink() out of bounds");
97
- }
98
- fillFldField(parser, dataView) {
99
- let endContext = parser.getXMLdata().indexOf(this._isOwnerFld
100
- ? XMLConstants.TAG_CLOSE
101
- : XMLConstants.TAG_TERM, parser.getCurrIndex());
102
- if (endContext !== -1 && endContext < parser.getXMLdata().length) {
103
- let tag = parser.getXMLsubstring(endContext);
104
- parser.add2CurrIndex(tag.indexOf(XMLConstants.MG_TAG_FLD) + XMLConstants.MG_TAG_FLD.length);
105
- let tokensVector = XmlParser.getTokens(parser.getXMLsubstring(endContext), XMLConstants.XML_ATTR_DELIM);
106
- this.initElements(tokensVector, dataView);
107
- if (this._isOwnerFld) {
108
- parser.setCurrIndex(++endContext);
109
- return;
110
- }
111
- parser.setCurrIndex(endContext + XMLConstants.TAG_TERM.length);
112
- return;
113
- }
114
- Logger.Instance.WriteExceptionToLogWithMsg("in Command.FillData() out of bounds");
115
- }
116
- initElements(tokensVector, dataView) {
117
- for (let j = 0; j < tokensVector.length; j += 2) {
118
- let attribute = (tokensVector.get_Item(j));
119
- let valueStr = (tokensVector.get_Item(j + 1));
120
- switch (attribute) {
121
- case XMLConstants.MG_ATTR_ID: {
122
- let fldId = XmlParser.getInt(valueStr);
123
- let fld = dataView.getField(fldId);
124
- if (this._isOwnerFld) {
125
- this.OwnerFld = fld;
126
- this.OwnerFld.setRecompute(this);
127
- }
128
- else {
129
- fld.setRecomputed();
130
- this.AddRecomputeItem(fld);
131
- }
132
- break;
133
- }
134
- case ConstInterface.MG_ATTR_RECOMPUTEBY:
135
- this.RcmpMode = valueStr[0];
136
- break;
137
- case ConstInterface.MG_ATTR_SUB_FORM_RCMP:
138
- this._subFormsOnlyRecomp = true;
139
- break;
140
- case ConstInterface.MG_ATTR_HAS_LINK_RECOMPUTES:
141
- this._hasServerLinksRecomputes = true;
142
- break;
143
- case XMLConstants.MG_ATTR_NAME:
144
- break;
145
- default:
146
- Logger.Instance.WriteExceptionToLogWithMsg("There is no such tag in Recompute class. Insert case to Recompute.initElements for " + attribute);
147
- break;
148
- }
149
- }
150
- }
151
- async execute(rec) {
152
- let i;
153
- let fld;
154
- let cmdsToServer = this.Task.getMGData().CmdsToServer;
155
- let cmd;
156
- try {
157
- rec.setInRecompute(true);
158
- this.Task.SetInRecompute(true);
159
- this.SetSubformsInRecompute(true);
160
- let allowServerRecompute = this._hasServerLinksRecomputes ||
161
- (this.Task.getForm().AllowedSubformRecompute && await this.checkRefreshSubForms());
162
- if (this.RcmpMode !== Recompute_RcmpBy.CLIENT && allowServerRecompute) {
163
- let inClient = this._subFormsOnlyRecomp;
164
- this.Task.ExecuteClientSubformRefresh = false;
165
- if (inClient) {
166
- inClient = await this.Task.prepareCache(true);
167
- if (inClient)
168
- inClient = await this.Task.testAndSet(true);
169
- }
170
- if (!inClient) {
171
- this.Task.DataView.GetFieldsTab().setServerRcmp(true);
172
- cmd = CommandFactory.CreateRecomputeCommand(this.Task.getTaskTag(), this.OwnerFld.getId(), !this.Task.getForm().AllowedSubformRecompute);
173
- cmdsToServer.Add(cmd);
174
- await RemoteCommandsProcessor.GetInstance().Execute(CommandsProcessorBase_SendingInstruction.TASKS_AND_COMMANDS);
175
- }
176
- if (this.Task.ExecuteClientSubformRefresh)
177
- await this.RefreshSubforms();
178
- else {
179
- if (await this.recPrefixSubForms())
180
- await this.recSuffixSubForms();
181
- this.Task.CleanDoSubformPrefixSuffix();
182
- }
183
- }
184
- else {
185
- try {
186
- FlowMonitorQueue.Instance.addRecompute(this.OwnerFld.getVarName(), this.Task.GetTaskDetails());
187
- if (this._formProps != null)
188
- await this._formProps.RefreshDisplay(false, false);
189
- if (this._ctrlProps != null)
190
- await this._ctrlProps.RefreshDisplay(false, false);
191
- if (this._rcmpOrder != null) {
192
- for (i = 0; i < this._rcmpOrder.length; i++) {
193
- if (this._rcmpOrder.get_Item(i) instanceof FieldBase) {
194
- fld = this._rcmpOrder.get_Item(i);
195
- await this.fldRcmp(fld, true);
196
- }
197
- else if (this._rcmpOrder.get_Item(i) instanceof DataviewHeaderBase) {
198
- let curLnk = this._rcmpOrder.get_Item(i);
199
- await curLnk.getLinkedRecord(rec);
200
- let linkFields = this.Task.DataView.GetFieldsTab().getLinkFields(curLnk.Id);
201
- rec.setInCompute(true);
202
- let saveInForceUpdate = rec.InForceUpdate;
203
- rec.InForceUpdate = false;
204
- for (let j = 0; j < linkFields.length; j++) {
205
- await this.fldRcmp(linkFields.get_Item(j), false);
206
- rec.clearFlag((linkFields.get_Item(j)).getId(), Record.FLAG_UPDATED);
207
- rec.clearFlag((linkFields.get_Item(j)).getId(), Record.FLAG_MODIFIED);
208
- rec.clearFlag((linkFields.get_Item(j)).getId(), Record.FLAG_CRSR_MODIFIED);
209
- rec.clearHistoryFlag((linkFields.get_Item(j)).getId());
210
- }
211
- rec.InForceUpdate = saveInForceUpdate;
212
- let retFld = curLnk.ReturnField;
213
- if (retFld != null)
214
- await this.fldRcmp(retFld, false);
215
- rec.setInCompute(false);
216
- rec.setForceSaveOrg(true);
217
- }
218
- }
219
- }
220
- await this.RefreshSubforms();
221
- }
222
- catch (e) {
223
- Logger.Instance.WriteExceptionToLogWithMsg("in Recompute.execute(): " + e.Message);
224
- }
225
- }
226
- this.Task.SetInRecompute(false);
227
- this.SetSubformsInRecompute(false);
228
- }
229
- finally {
230
- rec.buildLinksPosStr();
231
- rec.setInRecompute(false);
232
- }
233
- }
234
- async RefreshSubforms() {
235
- if (this.Task.getForm().AllowedSubformRecompute) {
236
- let subformsToRefresh = await this.GetSubformsToRefresh();
237
- for (let i = 0; i < subformsToRefresh.length; i++) {
238
- let subformTask = subformsToRefresh.get_Item(i);
239
- await this.Task.SubformRefresh(subformTask, true);
240
- }
241
- }
242
- }
243
- async SetSubformsInRecompute(inRecompute) {
244
- let subformsToRefresh = await this.GetSubformsToRefresh();
245
- for (let i = 0; i < subformsToRefresh.length; i++) {
246
- let subformTask = subformsToRefresh.get_Item(i);
247
- subformTask.SetInRecompute(inRecompute);
248
- }
249
- }
250
- async fldRcmp(fld, computeField) {
251
- if (fld.IsVirtual
252
- || ((this.Task.getMode() !== Constants.TASK_MODE_QUERY ||
253
- Environment.Instance.allowUpdateInQueryMode(this.Task.getCompIdx())))) {
254
- if (!fld.isInEvalProcess()) {
255
- if (computeField)
256
- await fld.compute(true);
257
- else
258
- await fld.setValueAndStartRecompute(fld.getValue(false), fld.isNull(), true, false, false);
259
- await fld.updateDisplay();
260
- }
261
- }
262
- }
263
- buildSubFormList() {
264
- if (this._subForms === null) {
265
- this._subForms = new List();
266
- let subTasksTab = this.Task.getSubTasks();
267
- if (subTasksTab !== null) {
268
- for (let i = 0; i < subTasksTab.getSize(); i = i + 1) {
269
- let subForm = subTasksTab.getTask(i);
270
- if (subForm.getForm().getSubFormCtrl() !== null && subForm.refreshesOn(this.OwnerFld.getId())) {
271
- this._subForms.push(subForm);
272
- }
273
- }
274
- }
275
- }
276
- }
277
- RemoveSubform(subformTask) {
278
- this._subForms.Remove(subformTask);
279
- }
280
- AddSubform(subformTask) {
281
- if (this._subForms === null)
282
- this._subForms = new List();
283
- if (!this._subForms.Contains(subformTask))
284
- this._subForms.push(subformTask);
285
- }
286
- async recSuffixSubForms() {
287
- let i;
288
- let subForm;
289
- let successful = true;
290
- let subformCtrl;
291
- this.buildSubFormList();
292
- for (i = 0; successful && i < this._subForms.length; i++) {
293
- subForm = this._subForms.get_Item(i);
294
- subformCtrl = subForm.getForm().getSubFormCtrl();
295
- if (subForm.isStarted() && !subformCtrl.RefreshOnVisible &&
296
- await subformCtrl.checkProp(PropInterface.PROP_TYPE_AUTO_REFRESH, true) && !subForm.InSelect
297
- && subForm.DoSubformPrefixSuffix) {
298
- await AccessHelper.eventsManager.handleInternalEventWithTask(subForm, InternalInterface.MG_ACT_REC_SUFFIX);
299
- successful = !AccessHelper.eventsManager.GetStopExecutionFlag();
300
- }
301
- }
302
- this.Task.DataView.setPrevCurrRec();
303
- return (successful);
304
- }
305
- async checkRefreshSubForms() {
306
- let refresh = !this._subFormsOnlyRecomp;
307
- let subformsToRefresh = await this.GetSubformsToRefresh();
308
- if (subformsToRefresh.length > 0)
309
- refresh = true;
310
- return refresh;
311
- }
312
- async GetSubformsToRefresh() {
313
- let subTasks = new List();
314
- let subformCtrl;
315
- this.buildSubFormList();
316
- for (let i = 0; i < this._subForms.length; i++) {
317
- let subTask = this._subForms[i];
318
- subformCtrl = subTask.getForm().getSubFormCtrl();
319
- if (subTask.isStarted() && await subformCtrl.checkProp(PropInterface.PROP_TYPE_AUTO_REFRESH, true) &&
320
- !subTask.InSelect && !subTask.InEndTask) {
321
- await subformCtrl.checkProp(PropInterface.PROP_TYPE_VISIBLE, true);
322
- if (!subformCtrl.isVisible() && !await subformCtrl.checkProp(PropInterface.PROP_TYPE_REFRESH_WHEN_HIDDEN, false))
323
- subformCtrl.RefreshOnVisible = true;
324
- else
325
- subTasks.push(subTask);
326
- }
327
- }
328
- return subTasks;
329
- }
330
- async recPrefixSubForms() {
331
- let i;
332
- let subForm;
333
- let successful = true;
334
- let subformCtrl;
335
- this.buildSubFormList();
336
- for (i = 0; successful && i < this._subForms.length; i++) {
337
- subForm = this._subForms.get_Item(i);
338
- subformCtrl = subForm.getForm().getSubFormCtrl();
339
- if (subForm.isStarted() && !subformCtrl.RefreshOnVisible
340
- && await subformCtrl.checkProp(PropInterface.PROP_TYPE_AUTO_REFRESH, true)
341
- && !subForm.InSelect && subForm.DoSubformPrefixSuffix) {
342
- await AccessHelper.eventsManager.handleInternalEventWithTaskAndSubformRefresh(subForm, InternalInterface.MG_ACT_REC_PREFIX, true);
343
- successful = !AccessHelper.eventsManager.GetStopExecutionFlag();
344
- }
345
- }
346
- return successful;
347
- }
348
- notifyServerOnChange() {
349
- return this.RcmpMode === Recompute_RcmpBy.SERVER_ON_CHANGE;
350
- }
351
- isServerRcmp() {
352
- return this.RcmpMode !== Recompute_RcmpBy.CLIENT;
353
- }
354
- }
355
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiUmVjb21wdXRlLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vcHJvamVjdHMvZW5naW5lL3NyYy9ydC9SZWNvbXB1dGUudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUFDLGFBQWEsRUFBRSxTQUFTLEVBQUMsTUFBTSxnQkFBZ0IsQ0FBQztBQUN4RCxPQUFPLEVBQUMsU0FBUyxFQUFDLE1BQU0sbUJBQW1CLENBQUM7QUFDNUMsT0FBTyxFQUFDLElBQUksRUFBQyxNQUFNLHNCQUFzQixDQUFDO0FBRTFDLE9BQU8sRUFBQyx3Q0FBd0MsRUFBQyxNQUFNLDBCQUEwQixDQUFDO0FBQ2xGLE9BQU8sRUFBQyxTQUFTLEVBQUUsaUJBQWlCLEVBQUUsTUFBTSxFQUFFLFlBQVksRUFBRSxTQUFTLEVBQUMsTUFBTSxrQkFBa0IsQ0FBQztBQUMvRixPQUFPLEVBQUMsTUFBTSxFQUFDLE1BQU0sZ0JBQWdCLENBQUM7QUFHdEMsT0FBTyxFQUFDLGNBQWMsRUFBQyxNQUFNLDJDQUEyQyxDQUFDO0FBQ3pFLE9BQU8sRUFBQyx1QkFBd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gdG8gZmllbGQgb2JqZWN0cywgZm9yIDxmbGQgaWQgPSAuLi4+XHJcbiAgLy8vICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKChEYXRhVmlldylkYXRhVmlldyk9PW51bGw9PiBpdCdzIGZpcnN0IGZvdW5kIGZpZWxkLCBuZWVkIHRvIGluaXQgcmVmZXJlbmNlXHJcbiAgLy8vICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZnJvbSB0aGUgRmllbGRSb290XHJcbiAgLy8vICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKChEYXRhVmlldylkYXRhVmlldykhPW51bGw9PiBhZGQgdGhlIGRhdGEgdG8gY3VycmllbnQgUmVjb3JkLCBpdCdzIG5vdCBmaXJzdCA8ZmxkPlxyXG4gIC8vLyA8L3BhcmFtPlxyXG4gIHByaXZhdGUgaW5pdEVsZW1lbnRzKHRva2Vuc1ZlY3RvcjogTGlzdDxzdHJpbmc+LCBkYXRhVmlldzogRGF0YVZpZXcpOiB2b2lkIHtcclxuICAgIGZvciAobGV0IGo6IG51bWJlciA9IDA7IGogPCB0b2tlbnNWZWN0b3IubGVuZ3RoOyBqICs9IDIpIHtcclxuICAgICAgbGV0IGF0dHJpYnV0ZTogc3RyaW5nID0gKHRva2Vuc1ZlY3Rvci5nZXRfSXRlbShqKSk7XHJcbiAgICAgIGxldCB2YWx1ZVN0cjogc3RyaW5nID0gKHRva2Vuc1ZlY3Rvci5nZXRfSXRlbShqICsgMSkpO1xyXG5cclxuICAgICAgc3dpdGNoIChhdHRyaWJ1dGUpIHtcclxuICAgICAgICBjYXNlIFhNTENvbnN0YW50cy5NR19BVFRSX0lEOiB7XHJcbiAgICAgICAgICBsZXQgZmxkSWQ6IG51bWJlciA9IFhtbFBhcnNlci5nZXRJbnQodmFsdWVTdHIpO1xyXG4gICAgICAgICAgbGV0IGZsZCA9IDxGaWVsZEJhc2U+ZGF0YVZpZXcuZ2V0RmllbGQoZmxkSWQpO1xyXG4gICAgICAgICAgaWYgKHRoaXMuX2lzT3duZXJGbGQpIHtcclxuICAgICAgICAgICAgdGhpcy5Pd25lckZsZCA9IGZsZDtcclxuICAgICAgICAgICAgdGhpcy5Pd25lckZsZC5zZXRSZWNvbXB1dGUodGhpcyk7XHJcbiAgICAgICAgICB9XHJcbiAgICAgICAgICBlbHNlIHtcclxuICAgICAgICAgICAgZmxkLnNldFJlY29tcHV0ZWQoKTtcclxuICAgICAgICAgICAgdGhpcy5BZGRSZWNvbXB1dGVJdGVtKGZsZCk7XHJcbiAgICAgICAgICB9XHJcbiAgICAgICAgICBicmVhaztcclxuICAgICAgICB9XHJcbiAgICAgICAgY2FzZSBDb25zdEludGVyZmFjZS5NR19BVFRSX1JFQ09NUFVURUJZOlxyXG4gICAgICAgICAgdGhpcy5SY21wTW9kZSA9IDxSZWNvbXB1dGVfUmNtcEJ5PnZhbHVlU3RyWzBdO1xyXG4gICAgICAgICAgYnJlYWs7XHJcblxyXG4gICAgICAgIGNhc2UgQ29uc3RJbnRlcmZhY2UuTUdfQVRUUl9TVUJfRk9STV9SQ01QOlxyXG4gICAgICAgICAgdGhpcy5fc3ViRm9ybXNPbmx5UmVjb21wID0gdHJ1ZTtcclxuICAgICAgICAgIGJyZWFrO1xyXG5cclxuICAgICAgICBjYXNlIENvbnN0SW50ZXJmYWNlLk1HX0FUVFJfSEFTX0xJTktfUkVDT01QVVRFUzpcclxuICAgICAgICAgIHRoaXMuX2hhc1NlcnZlckxpbmtzUmVjb21wdXRlcyA9IHRydWU7XHJcbiAgICAgICAgICBicmVhaztcclxuXHJcbiAgICAgICAgY2FzZSBYTUxDb25zdGFudHMuTUdfQVRUUl9OQU1FOlxyXG4gICAgICAgICAgLyogaWdub3JlIHRoZSBuYW1lICovXHJcbiAgICAgICAgICBicmVhaztcclxuXHJcbiAgIC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gICAgICAgIHJlYy5jbGVhckhpc3RvcnlGbGFnKChsaW5rRmllbGRzLmdldF9JdGVtKGopKS5nZXRJZCgpKTtcclxuICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgIHJlYy5JbkZvcmNlVXBkYXRlID0gc2F2ZUluRm9yY2VVcGRhdGU7XHJcblxyXG4gICAgICAgICAgICAgICAgLy8gc3RhcnQgcmVjb21wdXRlIHByb2Nlc3Mgb24gdGhlIHJldCB2YWwgb2YgdGhlIGxpbmtcclxuICAgICAgICAgICAgICAgIGxldCByZXRGbGQ6IEZpZWxkQmFzZSA9IGN1ckxuay5SZXR1cm5GaWVsZDtcclxuICAgICAgICAgICAgICAgIGlmIChyZXRGbGQgIT0gbnVsbClcclxuICAgICAgICAgICAgICAgICAgYXdhaXQgdGhpcy5mbGRSY21wKHJldEZsZCwgZmFsc2UpO1xyXG5cclxuICAgICAgICAgICAgICAgIHJlYy5zZXRJbkNvbXB1dGUoZmFsc2UpO1xyXG4gICAgICAgICAgICAgICAgcmVjLnNldEZvcmNlU2F2ZU9yZyh0cnVlKTtcclxuICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICAgIH1cclxuICAgICAgICAgIGF3YWl0IHRoaXMuUmVmcmVzaFN1YmZvcm1zKCk7XHJcbiAgICAgICAgfVxyXG4gICAgICAgIGNhdGNoIChlKSB7XHJcbiAgICAgICAgICBMb2dnZXIuSW5zdGFuY2UuV3JpdGVFeGNlcHRpb25Ub0xvZ1dpdGhNc2coXCJpbiBSZWNvbXB1dGUuZXhlY3V0ZSgpOiBcIiArIGUuTWVzc2FnZSk7XHJcbiAgICAgICAgfVxyXG5cclxuICAgICAgfSAgLy8gRU5EIENMSUVOVCBCTE9DS1xyXG4gICAgICB0aGlzLlRhc2suU2V0SW5SZWNvbXB1dGUgKGZhbHNlKTtcclxuICAgICAgdGhpcy5TZXRTdWJmb3Jtc0luUmVjb21wdXRlKGZhbHNlKTtcclxuICAgIH1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NtcEJ5LkNMSUVOVDtcclxuICB9XHJcblxyXG59XHJcbiJdfQ==
@@ -1,63 +0,0 @@
1
- import { NString } from "@magic-xpa/mscorelib";
2
- import { Base64, Logger, XMLConstants, XmlParser } from "@magic-xpa/utils";
3
- import { Recompute } from "./Recompute";
4
- import { AccessHelper } from "../AccessHelper";
5
- export class RecomputeTable {
6
- fillAttributes(parser) {
7
- let endContext = parser.getXMLdata().indexOf(XMLConstants.TAG_CLOSE, parser.getCurrIndex());
8
- let Index = parser.getXMLdata().indexOf(XMLConstants.MG_TAG_RECOMPUTE, parser.getCurrIndex()) + XMLConstants.MG_TAG_RECOMPUTE.length;
9
- let task = null;
10
- let tokensVector = XmlParser.getTokens(parser.getXMLdata().substr(Index, endContext - Index), '"');
11
- for (let j = 0; j < tokensVector.length; j += 2) {
12
- let attribute = (tokensVector.get_Item(j));
13
- let valueStr = (tokensVector.get_Item(j + 1));
14
- if (attribute === XMLConstants.MG_ATTR_TASKID)
15
- task = AccessHelper.mgDataTable.GetTaskByID(valueStr);
16
- else
17
- Logger.Instance.WriteExceptionToLogWithMsg(NString.Format("Unrecognized attribute: '{0}'", attribute));
18
- }
19
- parser.setCurrIndex(parser.getXMLdata().indexOf(XMLConstants.TAG_CLOSE, parser.getCurrIndex()) + 1);
20
- return task;
21
- }
22
- fillData(parser) {
23
- let task = this.fillAttributes(parser);
24
- if (task !== null) {
25
- Logger.Instance.WriteDevToLog("goes to refill recompute");
26
- this.fillData_1(task.DataView, task, parser);
27
- }
28
- else
29
- parser.setCurrIndex(parser.getXMLdata().indexOf(XMLConstants.TAG_CLOSE, parser.getCurrIndex()) + 1);
30
- }
31
- fillData_1(dataView, task, parser) {
32
- if (parser.getNextTag() == XMLConstants.MG_TAG_RECOMPUTE) {
33
- let currrentIndex = parser.getCurrIndex();
34
- let encoded = parser.ReadContentOfCurrentElement().trim();
35
- let decoded = Base64.decode(encoded.substr(0, encoded.length).trim());
36
- let newXmlData = parser.getXMLdata().replace(encoded.trim(), decoded);
37
- parser.setXMLdata(newXmlData);
38
- parser.setCurrIndex(currrentIndex);
39
- }
40
- while (this.initInnerObjects(parser, parser.getNextTag(), dataView, task)) {
41
- }
42
- }
43
- initInnerObjects(parser, nameOfFound, dataView, task) {
44
- if (nameOfFound === null)
45
- return false;
46
- if (nameOfFound === XMLConstants.MG_TAG_RECOMPUTE)
47
- parser.setCurrIndex(parser.getXMLdata().indexOf(XMLConstants.TAG_CLOSE, parser.getCurrIndex()) + 1);
48
- else if (nameOfFound === XMLConstants.MG_TAG_FLD) {
49
- let recompute = new Recompute();
50
- recompute.fillData(dataView, task, parser);
51
- }
52
- else if (nameOfFound === '/' + XMLConstants.MG_TAG_RECOMPUTE) {
53
- parser.setCurrIndex2EndOfTag();
54
- return false;
55
- }
56
- else {
57
- Logger.Instance.WriteExceptionToLogWithMsg("There is no such tag in <recompute>, add case to RecomputeTable.initInnerObjects for " + nameOfFound);
58
- return false;
59
- }
60
- return true;
61
- }
62
- }
63
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiUmVjb21wdXRlVGFibGUuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi9wcm9qZWN0cy9lbmdpbmUvc3JjL3J0L1JlY29tcHV0ZVRhYmxlLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFBTyxPQUFPLEVBQUMsTUFBTSxzQkFBc0IsQ0FBQztBQUNuRCxPQUFPLEVBQUMsTUFBTSxFQUFFLE1BQU0sRUFBRSxZQUFZLEVBQUUsU0FBUyxFQUFDLE1BQU0sa0JBQWtCLENBQUM7QUFHekUsT0FBTyxFQUFDLFNBQVMsRUFBQyxNQUFNLGFBQWEsQ0FBQztBQUN0QyxPQUFPLEVBQUUsWUFBWSxFQUFFLE1BQU0saUJBQWlCLENBQUM7QUFPL0MsTUFBTSxPQUFPLGNBQWM7SUFLakIsY0FBYyx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