@magic-xpa/engine 4.1100.0-dev4110.99 → 4.1101.0-dev4111.271

Sign up to get free protection for your applications and to get access to all the features.
Files changed (492) hide show
  1. package/README.md +7 -7
  2. package/{esm2020 → esm2022}/index.mjs +188 -188
  3. package/{esm2020 → esm2022}/magic-xpa-engine.mjs +1 -1
  4. package/esm2022/src/AccessHelper.mjs +15 -0
  5. package/esm2022/src/ClientManager.mjs +421 -0
  6. package/esm2022/src/CommandsProcessorBase.mjs +56 -0
  7. package/{esm2020 → esm2022}/src/CommandsProcessorManager.mjs +25 -25
  8. package/esm2022/src/CommandsTable.mjs +162 -0
  9. package/esm2022/src/ConstInterface.mjs +517 -0
  10. package/{esm2020 → esm2022}/src/CurrentClientVersion.mjs +2 -2
  11. package/esm2022/src/FlowMonitorInterface.mjs +16 -0
  12. package/esm2022/src/GUIManager.mjs +62 -0
  13. package/esm2022/src/GlobalCommandsManager.mjs +34 -0
  14. package/esm2022/src/GuiEventsProcessor.mjs +156 -0
  15. package/{esm2020 → esm2022}/src/ICommandsTable.mjs +1 -1
  16. package/esm2022/src/ServerConfig.mjs +122 -0
  17. package/{esm2020 → esm2022}/src/bridge/IGuiEvent.mjs +19 -19
  18. package/esm2022/src/bridge/MagicBridge.mjs +41 -0
  19. package/esm2022/src/commands/ClientOriginatedCommandTaskTag.mjs +12 -0
  20. package/{esm2020 → esm2022}/src/commands/ClientToServer/AddUserLocateDataViewCommand.mjs +8 -8
  21. package/{esm2020 → esm2022}/src/commands/ClientToServer/AddUserRangeDataviewCommand.mjs +9 -9
  22. package/{esm2020 → esm2022}/src/commands/ClientToServer/AddUserSortDataViewCommand.mjs +9 -9
  23. package/esm2022/src/commands/ClientToServer/BrowserEscEventCommand.mjs +26 -0
  24. package/{esm2020 → esm2022}/src/commands/ClientToServer/ClientOriginatedCommand.mjs +14 -14
  25. package/{esm2020 → esm2022}/src/commands/ClientToServer/ClientOriginatedCommandSerializer.mjs +59 -59
  26. package/esm2022/src/commands/ClientToServer/ColumnSortEventCommand.mjs +29 -0
  27. package/esm2022/src/commands/ClientToServer/CommandFactory.mjs +261 -0
  28. package/esm2022/src/commands/ClientToServer/CommandSerializationHelper.mjs +67 -0
  29. package/esm2022/src/commands/ClientToServer/ComputeEventCommand.mjs +26 -0
  30. package/{esm2020 → esm2022}/src/commands/ClientToServer/ContextTerminationEventCommand.mjs +24 -21
  31. package/{esm2020 → esm2022}/src/commands/ClientToServer/ContextTimeoutResetCommand.mjs +23 -20
  32. package/{esm2020 → esm2022}/src/commands/ClientToServer/ControlItemsRefreshCommand.mjs +8 -8
  33. package/esm2022/src/commands/ClientToServer/DataViewOutputCommand.mjs +13 -0
  34. package/{esm2020 → esm2022}/src/commands/ClientToServer/DataviewCommand.mjs +44 -44
  35. package/esm2022/src/commands/ClientToServer/EvaluateCommand.mjs +40 -0
  36. package/{esm2020 → esm2022}/src/commands/ClientToServer/EventCommand.mjs +43 -40
  37. package/esm2022/src/commands/ClientToServer/ExecOperCommand.mjs +70 -0
  38. package/esm2022/src/commands/ClientToServer/FetchDataControlValuesEventCommand.mjs +25 -0
  39. package/{esm2020 → esm2022}/src/commands/ClientToServer/GlobalParamsQueryCommand.mjs +10 -10
  40. package/{esm2020 → esm2022}/src/commands/ClientToServer/ICommandTaskTag.mjs +1 -1
  41. package/esm2022/src/commands/ClientToServer/IndexChangeEventCommand.mjs +24 -0
  42. package/esm2022/src/commands/ClientToServer/IniputForceWriteCommand.mjs +26 -0
  43. package/{esm2020 → esm2022}/src/commands/ClientToServer/NonReversibleExitEventCommand.mjs +26 -23
  44. package/{esm2020 → esm2022}/src/commands/ClientToServer/QueryCommand.mjs +20 -20
  45. package/esm2022/src/commands/ClientToServer/RecomputeCommand.mjs +30 -0
  46. package/esm2022/src/commands/ClientToServer/RefreshEventCommand.mjs +30 -0
  47. package/esm2022/src/commands/ClientToServer/RefreshScreenEventCommand.mjs +27 -0
  48. package/esm2022/src/commands/ClientToServer/RollbackEventCommand.mjs +43 -0
  49. package/esm2022/src/commands/ClientToServer/SelectProgramCommand.mjs +19 -0
  50. package/{esm2020 → esm2022}/src/commands/ClientToServer/SetTransactionStateDataviewCommand.mjs +9 -9
  51. package/esm2022/src/commands/ClientToServer/SubformOpenEventCommand.mjs +24 -0
  52. package/esm2022/src/commands/ClientToServer/SubformRefreshEventCommand.mjs +27 -0
  53. package/esm2022/src/commands/ClientToServer/TransactionCommand.mjs +34 -0
  54. package/{esm2020 → esm2022}/src/commands/ClientToServer/UnloadCommand.mjs +18 -15
  55. package/esm2022/src/commands/ClientToServer/WriteMessageToServerLogCommand.mjs +18 -0
  56. package/esm2022/src/commands/DataViewCommandBase.mjs +8 -0
  57. package/{esm2020 → esm2022}/src/commands/IClientCommand.mjs +1 -1
  58. package/esm2022/src/commands/IClientTargetedCommand.mjs +13 -0
  59. package/{esm2020 → esm2022}/src/commands/IClientToServerCommandInfo.mjs +2 -2
  60. package/esm2022/src/commands/ServerToClient/AbortCommand.mjs +65 -0
  61. package/{esm2020 → esm2022}/src/commands/ServerToClient/AddLocateCommand.mjs +21 -21
  62. package/{esm2020 → esm2022}/src/commands/ServerToClient/AddRangeCommand.mjs +62 -62
  63. package/{esm2020 → esm2022}/src/commands/ServerToClient/AddSortCommand.mjs +33 -33
  64. package/esm2022/src/commands/ServerToClient/ClientRefreshCommand.mjs +25 -0
  65. package/esm2022/src/commands/ServerToClient/ClientTargetedCommandBase.mjs +24 -0
  66. package/esm2022/src/commands/ServerToClient/EnhancedVerifyCommand.mjs +45 -0
  67. package/esm2022/src/commands/ServerToClient/OpenURLCommand.mjs +221 -0
  68. package/{esm2020 → esm2022}/src/commands/ServerToClient/ResetLocateCommand.mjs +14 -14
  69. package/{esm2020 → esm2022}/src/commands/ServerToClient/ResetRangeCommand.mjs +14 -14
  70. package/{esm2020 → esm2022}/src/commands/ServerToClient/ResetSortCommand.mjs +14 -14
  71. package/esm2022/src/commands/ServerToClient/ResultCommand.mjs +37 -0
  72. package/esm2022/src/commands/ServerToClient/VerifyCommand.mjs +83 -0
  73. package/{esm2020 → esm2022}/src/commands/ServerToClient/XMLBasedCommandBuilder.mjs +132 -132
  74. package/{esm2020 → esm2022}/src/communications/IConnectionStateManager.mjs +1 -1
  75. package/esm2022/src/communications/InteractiveCommunicationsFailureHandler.mjs +15 -0
  76. package/{esm2020 → esm2022}/src/data/DataSourceIdKey.mjs +2 -2
  77. package/esm2022/src/data/DataView.mjs +1613 -0
  78. package/{esm2020 → esm2022}/src/data/DataViewBase.mjs +3 -3
  79. package/esm2022/src/data/DataviewManager.mjs +28 -0
  80. package/esm2022/src/data/DataviewManagerBase.mjs +15 -0
  81. package/esm2022/src/data/DvCache.mjs +67 -0
  82. package/esm2022/src/data/Field.mjs +646 -0
  83. package/esm2022/src/data/FieldBase.mjs +15 -0
  84. package/esm2022/src/data/FieldsTable.mjs +103 -0
  85. package/{esm2020 → esm2022}/src/data/IRecordsTable.mjs +1 -1
  86. package/{esm2020 → esm2022}/src/data/Key.mjs +88 -88
  87. package/esm2022/src/data/Record.mjs +880 -0
  88. package/{esm2020 → esm2022}/src/data/RecordOutOfDataViewException.mjs +15 -15
  89. package/esm2022/src/data/RecordsTable.mjs +267 -0
  90. package/{esm2020 → esm2022}/src/data/TaskTransactionManager.mjs +107 -103
  91. package/{esm2020 → esm2022}/src/data/XMLBasedDcValuesBuilder.mjs +74 -74
  92. package/{esm2020 → esm2022}/src/enums.mjs +23 -23
  93. package/esm2022/src/env/EnvVariablesTable.mjs +340 -0
  94. package/esm2022/src/env/Environment.mjs +487 -0
  95. package/{esm2020 → esm2022}/src/env/ILanguageData.mjs +1 -1
  96. package/esm2022/src/env/LanguageData.mjs +227 -0
  97. package/{esm2020 → esm2022}/src/env/MirrorString.mjs +65 -65
  98. package/esm2022/src/event/ActionManager.mjs +91 -0
  99. package/esm2022/src/event/Event.mjs +1333 -0
  100. package/esm2022/src/event/EventHandler.mjs +766 -0
  101. package/esm2022/src/event/EventHandlerPosition.mjs +204 -0
  102. package/esm2022/src/event/EventsManager.mjs +2988 -0
  103. package/{esm2020 → esm2022}/src/event/IEventsManager.mjs +6 -6
  104. package/esm2022/src/event/RunTimeEvent.mjs +399 -0
  105. package/{esm2020 → esm2022}/src/event/RunTimeEventBase.mjs +3 -3
  106. package/esm2022/src/event/UserEventsTable.mjs +47 -0
  107. package/esm2022/src/exp/ExpTable.mjs +57 -0
  108. package/esm2022/src/exp/Expression.mjs +200 -0
  109. package/esm2022/src/exp/ExpressionDict.mjs +727 -0
  110. package/esm2022/src/exp/ExpressionEvaluator.mjs +4206 -0
  111. package/esm2022/src/exp/ExpressionLocalJpn.mjs +314 -0
  112. package/{esm2020 → esm2022}/src/exp/GlobalParamsTable.mjs +85 -85
  113. package/esm2022/src/exp/YesNoExp.mjs +36 -0
  114. package/esm2022/src/gui/CreatedFormVector.mjs +23 -0
  115. package/esm2022/src/gui/FormsTable.mjs +66 -0
  116. package/esm2022/src/gui/MgControl.mjs +363 -0
  117. package/esm2022/src/gui/MgForm.mjs +1224 -0
  118. package/esm2022/src/http/HttpManager.mjs +97 -0
  119. package/esm2022/src/http/client/HttpClientAsync.mjs +68 -0
  120. package/{esm2020 → esm2022}/src/http/client/HttpClientBase.mjs +132 -132
  121. package/esm2022/src/http/client/HttpClientEvents.mjs +39 -0
  122. package/esm2022/src/http/client/HttpClientSync.mjs +42 -0
  123. package/esm2022/src/http/client/HttpUtility.mjs +84 -0
  124. package/{esm2020 → esm2022}/src/http/client/ICommunicationsFailureHandler.mjs +1 -1
  125. package/{esm2020 → esm2022}/src/remote/AddUserLocateRemoteDataViewCommand.mjs +18 -18
  126. package/{esm2020 → esm2022}/src/remote/AddUserRangeRemoteDataViewCommand.mjs +18 -18
  127. package/{esm2020 → esm2022}/src/remote/AddUserSortRemoteDataViewCommand.mjs +18 -18
  128. package/esm2022/src/remote/RemoteCommandsProcessor.mjs +883 -0
  129. package/{esm2020 → esm2022}/src/remote/RemoteControlItemsRefreshCommand.mjs +25 -25
  130. package/{esm2020 → esm2022}/src/remote/RemoteDataViewCommandBase.mjs +24 -24
  131. package/{esm2020 → esm2022}/src/remote/RemoteDataViewCommandFactory.mjs +60 -60
  132. package/{esm2020 → esm2022}/src/remote/RemoteDataViewCommandUpdateNonModifiable.mjs +15 -15
  133. package/{esm2020 → esm2022}/src/remote/RemoteDataviewManager.mjs +17 -17
  134. package/{esm2020 → esm2022}/src/remote/RemoteInitDataViewCommand.mjs +10 -10
  135. package/{esm2020 → esm2022}/src/remote/ResetUserLocateRemoteDataviewCommand.mjs +16 -16
  136. package/{esm2020 → esm2022}/src/remote/ResetUserRangeRemoteDataviewCommand.mjs +12 -12
  137. package/{esm2020 → esm2022}/src/remote/ResetUserSortRemoteDataviewCommand.mjs +15 -15
  138. package/esm2022/src/remote/ServerError.mjs +40 -0
  139. package/{esm2020 → esm2022}/src/remote/SetTransactionStateRemoteDataViewCommand.mjs +19 -19
  140. package/esm2022/src/rt/Argument.mjs +265 -0
  141. package/esm2022/src/rt/ArgumentsList.mjs +103 -0
  142. package/esm2022/src/rt/Boundary.mjs +152 -0
  143. package/esm2022/src/rt/CompMainPrgTable.mjs +63 -0
  144. package/esm2022/src/rt/DataviewHeaderBase.mjs +98 -0
  145. package/{esm2020 → esm2022}/src/rt/DataviewHeaderFactory.mjs +6 -6
  146. package/esm2022/src/rt/DataviewHeaders.mjs +53 -0
  147. package/{esm2020 → esm2022}/src/rt/DataviewHeadersSaxHandler.mjs +38 -38
  148. package/{esm2020 → esm2022}/src/rt/ExecutionStack.mjs +94 -94
  149. package/{esm2020 → esm2022}/src/rt/ExecutionStackEntry.mjs +17 -17
  150. package/{esm2020 → esm2022}/src/rt/HandlersTable.mjs +96 -96
  151. package/{esm2020 → esm2022}/src/rt/IDataSourceViewDefinition.mjs +1 -1
  152. package/{esm2020 → esm2022}/src/rt/IDataviewHeader.mjs +1 -1
  153. package/{esm2020 → esm2022}/src/rt/IResultValue.mjs +1 -1
  154. package/esm2022/src/rt/LastFocusedManager.mjs +65 -0
  155. package/esm2022/src/rt/Operation.mjs +735 -0
  156. package/esm2022/src/rt/OperationTable.mjs +67 -0
  157. package/esm2022/src/rt/Recompute.mjs +355 -0
  158. package/{esm2020 → esm2022}/src/rt/RecomputeTable.mjs +62 -62
  159. package/{esm2020 → esm2022}/src/rt/RemoteDataviewHeader.mjs +108 -108
  160. package/esm2022/src/rt/ResultValue.mjs +10 -0
  161. package/esm2022/src/rt/TableCache.mjs +177 -0
  162. package/esm2022/src/rt/TableCacheManager.mjs +67 -0
  163. package/esm2022/src/rt/Transaction.mjs +53 -0
  164. package/esm2022/src/security/UserDetails.mjs +71 -0
  165. package/{esm2020 → esm2022}/src/tasks/IMGDataCollection.mjs +1 -1
  166. package/esm2022/src/tasks/MGData.mjs +552 -0
  167. package/esm2022/src/tasks/MGDataCollection.mjs +252 -0
  168. package/esm2022/src/tasks/RCTimer.mjs +63 -0
  169. package/{esm2020 → esm2022}/src/tasks/RemoteTaskService.mjs +44 -44
  170. package/esm2022/src/tasks/Task.mjs +2499 -0
  171. package/esm2022/src/tasks/TaskBase.mjs +83 -0
  172. package/{esm2020 → esm2022}/src/tasks/TaskServiceBase.mjs +24 -24
  173. package/esm2022/src/tasks/TasksTable.mjs +80 -0
  174. package/esm2022/src/tasks/sort/Sort.mjs +5 -0
  175. package/{esm2020 → esm2022}/src/tasks/sort/SortCollection.mjs +67 -67
  176. package/{esm2020 → esm2022}/src/util/ConstUtils.mjs +13 -13
  177. package/esm2022/src/util/FlowMonitorQueue.mjs +451 -0
  178. package/{esm2020 → esm2022}/src/util/HeapSort.mjs +69 -69
  179. package/{esm2020 → esm2022}/src/util/IMirrorXML.mjs +1 -1
  180. package/{esm2020 → esm2022}/src/util/IServerConfig.mjs +1 -1
  181. package/{esm2020 → esm2022}/src/util/MgBlockingQueue.mjs +1 -1
  182. package/esm2022/src/util/MgPriorityBlockingQueue.mjs +74 -0
  183. package/esm2022/src/util/MgPriorityQueue.mjs +66 -0
  184. package/{esm2020 → esm2022}/src/util/ParamParseResult.mjs +7 -7
  185. package/esm2022/src/util/PrmMap.mjs +152 -0
  186. package/esm2022/src/util/ReturnResult.mjs +46 -0
  187. package/esm2022/src/util/ReturnResultBase.mjs +18 -0
  188. package/esm2022/src/util/Scrambler.mjs +89 -0
  189. package/esm2022/src/util/UniqueIDUtils.mjs +13 -0
  190. package/{esm2020 → esm2022}/src/util/cookie.service.mjs +92 -92
  191. package/{fesm2020 → fesm2022}/magic-xpa-engine.mjs +29888 -29690
  192. package/fesm2022/magic-xpa-engine.mjs.map +1 -0
  193. package/index.d.ts +187 -187
  194. package/package.json +8 -14
  195. package/src/AccessHelper.d.ts +20 -20
  196. package/src/ClientManager.d.ts +35 -32
  197. package/src/CommandsProcessorBase.d.ts +23 -23
  198. package/src/CommandsProcessorManager.d.ts +6 -6
  199. package/src/CommandsTable.d.ts +22 -22
  200. package/src/ConstInterface.d.ts +516 -515
  201. package/src/CurrentClientVersion.d.ts +1 -1
  202. package/src/FlowMonitorInterface.d.ts +15 -15
  203. package/src/GUIManager.d.ts +17 -17
  204. package/src/GlobalCommandsManager.d.ts +17 -17
  205. package/src/GuiEventsProcessor.d.ts +24 -24
  206. package/src/ICommandsTable.d.ts +9 -9
  207. package/src/ServerConfig.d.ts +35 -34
  208. package/src/bridge/IGuiEvent.d.ts +19 -19
  209. package/src/bridge/MagicBridge.d.ts +16 -16
  210. package/src/commands/ClientOriginatedCommandTaskTag.d.ts +8 -8
  211. package/src/commands/ClientToServer/AddUserLocateDataViewCommand.d.ts +4 -4
  212. package/src/commands/ClientToServer/AddUserRangeDataviewCommand.d.ts +6 -6
  213. package/src/commands/ClientToServer/AddUserSortDataViewCommand.d.ts +6 -6
  214. package/src/commands/ClientToServer/BrowserEscEventCommand.d.ts +9 -8
  215. package/src/commands/ClientToServer/ClientOriginatedCommand.d.ts +8 -8
  216. package/src/commands/ClientToServer/ClientOriginatedCommandSerializer.d.ts +6 -6
  217. package/src/commands/ClientToServer/ColumnSortEventCommand.d.ts +11 -10
  218. package/src/commands/ClientToServer/CommandFactory.d.ts +64 -64
  219. package/src/commands/ClientToServer/CommandSerializationHelper.d.ts +20 -20
  220. package/src/commands/ClientToServer/ComputeEventCommand.d.ts +9 -8
  221. package/src/commands/ClientToServer/ContextTerminationEventCommand.d.ts +8 -7
  222. package/src/commands/ClientToServer/ContextTimeoutResetCommand.d.ts +8 -7
  223. package/src/commands/ClientToServer/ControlItemsRefreshCommand.d.ts +6 -6
  224. package/src/commands/ClientToServer/DataViewOutputCommand.d.ts +9 -9
  225. package/src/commands/ClientToServer/DataviewCommand.d.ts +32 -32
  226. package/src/commands/ClientToServer/EvaluateCommand.d.ts +16 -15
  227. package/src/commands/ClientToServer/EventCommand.d.ts +16 -15
  228. package/src/commands/ClientToServer/ExecOperCommand.d.ts +24 -23
  229. package/src/commands/ClientToServer/FetchDataControlValuesEventCommand.d.ts +9 -8
  230. package/src/commands/ClientToServer/GlobalParamsQueryCommand.d.ts +5 -5
  231. package/src/commands/ClientToServer/ICommandTaskTag.d.ts +3 -3
  232. package/src/commands/ClientToServer/IndexChangeEventCommand.d.ts +9 -8
  233. package/src/commands/ClientToServer/IniputForceWriteCommand.d.ts +11 -10
  234. package/src/commands/ClientToServer/NonReversibleExitEventCommand.d.ts +9 -8
  235. package/src/commands/ClientToServer/QueryCommand.d.ts +8 -8
  236. package/src/commands/ClientToServer/RecomputeCommand.d.ts +12 -11
  237. package/src/commands/ClientToServer/RefreshEventCommand.d.ts +13 -12
  238. package/src/commands/ClientToServer/RefreshScreenEventCommand.d.ts +11 -10
  239. package/src/commands/ClientToServer/RollbackEventCommand.d.ts +15 -14
  240. package/src/commands/ClientToServer/SelectProgramCommand.d.ts +7 -6
  241. package/src/commands/ClientToServer/SetTransactionStateDataviewCommand.d.ts +5 -5
  242. package/src/commands/ClientToServer/SubformOpenEventCommand.d.ts +9 -8
  243. package/src/commands/ClientToServer/SubformRefreshEventCommand.d.ts +10 -9
  244. package/src/commands/ClientToServer/TransactionCommand.d.ts +14 -12
  245. package/src/commands/ClientToServer/UnloadCommand.d.ts +8 -7
  246. package/src/commands/ClientToServer/WriteMessageToServerLogCommand.d.ts +6 -6
  247. package/src/commands/DataViewCommandBase.d.ts +6 -6
  248. package/src/commands/IClientCommand.d.ts +2 -2
  249. package/src/commands/IClientTargetedCommand.d.ts +12 -12
  250. package/src/commands/IClientToServerCommandInfo.d.ts +4 -3
  251. package/src/commands/ServerToClient/AbortCommand.d.ts +11 -11
  252. package/src/commands/ServerToClient/AddLocateCommand.d.ts +6 -6
  253. package/src/commands/ServerToClient/AddRangeCommand.d.ts +10 -10
  254. package/src/commands/ServerToClient/AddSortCommand.d.ts +9 -9
  255. package/src/commands/ServerToClient/ClientRefreshCommand.d.ts +7 -7
  256. package/src/commands/ServerToClient/ClientTargetedCommandBase.d.ts +12 -12
  257. package/src/commands/ServerToClient/EnhancedVerifyCommand.d.ts +13 -13
  258. package/src/commands/ServerToClient/OpenURLCommand.d.ts +21 -21
  259. package/src/commands/ServerToClient/ResetLocateCommand.d.ts +6 -6
  260. package/src/commands/ServerToClient/ResetRangeCommand.d.ts +6 -6
  261. package/src/commands/ServerToClient/ResetSortCommand.d.ts +6 -6
  262. package/src/commands/ServerToClient/ResultCommand.d.ts +10 -10
  263. package/src/commands/ServerToClient/VerifyCommand.d.ts +17 -17
  264. package/src/commands/ServerToClient/XMLBasedCommandBuilder.d.ts +11 -11
  265. package/src/communications/IConnectionStateManager.d.ts +4 -4
  266. package/src/communications/InteractiveCommunicationsFailureHandler.d.ts +6 -6
  267. package/src/data/DataSourceIdKey.d.ts +2 -2
  268. package/src/data/DataView.d.ts +162 -162
  269. package/src/data/DataViewBase.d.ts +12 -12
  270. package/src/data/DataviewManager.d.ts +14 -14
  271. package/src/data/DataviewManagerBase.d.ts +11 -11
  272. package/src/data/DvCache.d.ts +15 -15
  273. package/src/data/Field.d.ts +103 -103
  274. package/src/data/FieldBase.d.ts +23 -23
  275. package/src/data/FieldsTable.d.ts +27 -27
  276. package/src/data/IRecordsTable.d.ts +7 -7
  277. package/src/data/Key.d.ts +15 -15
  278. package/src/data/Record.d.ts +157 -156
  279. package/src/data/RecordOutOfDataViewException.d.ts +10 -10
  280. package/src/data/RecordsTable.d.ts +38 -38
  281. package/src/data/TaskTransactionManager.d.ts +17 -17
  282. package/src/data/XMLBasedDcValuesBuilder.d.ts +11 -11
  283. package/src/enums.d.ts +21 -21
  284. package/src/env/EnvVariablesTable.d.ts +17 -17
  285. package/src/env/Environment.d.ts +118 -118
  286. package/src/env/ILanguageData.d.ts +3 -3
  287. package/src/env/LanguageData.d.ts +20 -20
  288. package/src/env/MirrorString.d.ts +15 -15
  289. package/src/event/ActionManager.d.ts +14 -14
  290. package/src/event/Event.d.ts +79 -79
  291. package/src/event/EventHandler.d.ts +66 -66
  292. package/src/event/EventHandlerPosition.d.ts +25 -25
  293. package/src/event/EventsManager.d.ts +205 -204
  294. package/src/event/IEventsManager.d.ts +77 -77
  295. package/src/event/RunTimeEvent.d.ts +126 -123
  296. package/src/event/RunTimeEventBase.d.ts +5 -5
  297. package/src/event/UserEventsTable.d.ts +11 -11
  298. package/src/exp/ExpTable.d.ts +11 -11
  299. package/src/exp/Expression.d.ts +37 -37
  300. package/src/exp/ExpressionDict.d.ts +12 -12
  301. package/src/exp/ExpressionEvaluator.d.ts +198 -198
  302. package/src/exp/ExpressionLocalJpn.d.ts +18 -18
  303. package/src/exp/GlobalParamsTable.d.ts +19 -19
  304. package/src/exp/YesNoExp.d.ts +9 -9
  305. package/src/gui/CreatedFormVector.d.ts +10 -10
  306. package/src/gui/FormsTable.d.ts +15 -15
  307. package/src/gui/MgControl.d.ts +60 -60
  308. package/src/gui/MgForm.d.ts +96 -93
  309. package/src/http/HttpManager.d.ts +25 -25
  310. package/src/http/client/HttpClientAsync.d.ts +16 -16
  311. package/src/http/client/HttpClientBase.d.ts +30 -30
  312. package/src/http/client/HttpClientEvents.d.ts +18 -18
  313. package/src/http/client/HttpClientSync.d.ts +17 -17
  314. package/src/http/client/HttpUtility.d.ts +10 -10
  315. package/src/http/client/ICommunicationsFailureHandler.d.ts +5 -5
  316. package/src/remote/AddUserLocateRemoteDataViewCommand.d.ts +8 -8
  317. package/src/remote/AddUserRangeRemoteDataViewCommand.d.ts +8 -8
  318. package/src/remote/AddUserSortRemoteDataViewCommand.d.ts +8 -8
  319. package/src/remote/RemoteCommandsProcessor.d.ts +51 -51
  320. package/src/remote/RemoteControlItemsRefreshCommand.d.ts +8 -8
  321. package/src/remote/RemoteDataViewCommandBase.d.ts +10 -10
  322. package/src/remote/RemoteDataViewCommandFactory.d.ts +6 -6
  323. package/src/remote/RemoteDataViewCommandUpdateNonModifiable.d.ts +8 -8
  324. package/src/remote/RemoteDataviewManager.d.ts +9 -9
  325. package/src/remote/RemoteInitDataViewCommand.d.ts +7 -7
  326. package/src/remote/ResetUserLocateRemoteDataviewCommand.d.ts +7 -7
  327. package/src/remote/ResetUserRangeRemoteDataviewCommand.d.ts +7 -7
  328. package/src/remote/ResetUserSortRemoteDataviewCommand.d.ts +7 -7
  329. package/src/remote/ServerError.d.ts +16 -16
  330. package/src/remote/SetTransactionStateRemoteDataViewCommand.d.ts +8 -8
  331. package/src/rt/Argument.d.ts +36 -36
  332. package/src/rt/ArgumentsList.d.ts +24 -24
  333. package/src/rt/Boundary.d.ts +27 -27
  334. package/src/rt/CompMainPrgTable.d.ts +10 -10
  335. package/src/rt/DataviewHeaderBase.d.ts +34 -34
  336. package/src/rt/DataviewHeaderFactory.d.ts +5 -5
  337. package/src/rt/DataviewHeaders.d.ts +12 -12
  338. package/src/rt/DataviewHeadersSaxHandler.d.ts +10 -10
  339. package/src/rt/ExecutionStack.d.ts +22 -22
  340. package/src/rt/ExecutionStackEntry.d.ts +7 -7
  341. package/src/rt/HandlersTable.d.ts +19 -19
  342. package/src/rt/IDataSourceViewDefinition.d.ts +6 -6
  343. package/src/rt/IDataviewHeader.d.ts +10 -10
  344. package/src/rt/IResultValue.d.ts +4 -4
  345. package/src/rt/LastFocusedManager.d.ts +23 -23
  346. package/src/rt/Operation.d.ts +97 -97
  347. package/src/rt/OperationTable.d.ts +15 -15
  348. package/src/rt/Recompute.d.ts +41 -41
  349. package/src/rt/RecomputeTable.d.ts +9 -9
  350. package/src/rt/RemoteDataviewHeader.d.ts +14 -14
  351. package/src/rt/ResultValue.d.ts +7 -7
  352. package/src/rt/TableCache.d.ts +29 -29
  353. package/src/rt/TableCacheManager.d.ts +10 -10
  354. package/src/rt/Transaction.d.ts +23 -23
  355. package/src/security/UserDetails.d.ts +16 -16
  356. package/src/tasks/IMGDataCollection.d.ts +26 -26
  357. package/src/tasks/MGData.d.ts +63 -63
  358. package/src/tasks/MGDataCollection.d.ts +42 -42
  359. package/src/tasks/RCTimer.d.ts +13 -13
  360. package/src/tasks/RemoteTaskService.d.ts +16 -16
  361. package/src/tasks/Task.d.ts +312 -312
  362. package/src/tasks/TaskBase.d.ts +123 -123
  363. package/src/tasks/TaskServiceBase.d.ts +16 -16
  364. package/src/tasks/TasksTable.d.ts +21 -21
  365. package/src/tasks/sort/Sort.d.ts +4 -4
  366. package/src/tasks/sort/SortCollection.d.ts +11 -11
  367. package/src/util/ConstUtils.d.ts +3 -3
  368. package/src/util/FlowMonitorQueue.d.ts +70 -70
  369. package/src/util/HeapSort.d.ts +6 -6
  370. package/src/util/IMirrorXML.d.ts +6 -6
  371. package/src/util/IServerConfig.d.ts +11 -11
  372. package/src/util/MgBlockingQueue.d.ts +5 -5
  373. package/src/util/MgPriorityBlockingQueue.d.ts +17 -17
  374. package/src/util/MgPriorityQueue.d.ts +13 -13
  375. package/src/util/ParamParseResult.d.ts +6 -6
  376. package/src/util/PrmMap.d.ts +28 -28
  377. package/src/util/ReturnResult.d.ts +18 -18
  378. package/src/util/ReturnResultBase.d.ts +11 -11
  379. package/src/util/Scrambler.d.ts +10 -10
  380. package/src/util/UniqueIDUtils.d.ts +4 -4
  381. package/src/util/cookie.service.d.ts +8 -8
  382. package/esm2020/src/AccessHelper.mjs +0 -9
  383. package/esm2020/src/ClientManager.mjs +0 -399
  384. package/esm2020/src/CommandsProcessorBase.mjs +0 -58
  385. package/esm2020/src/CommandsTable.mjs +0 -162
  386. package/esm2020/src/ConstInterface.mjs +0 -516
  387. package/esm2020/src/FlowMonitorInterface.mjs +0 -16
  388. package/esm2020/src/GUIManager.mjs +0 -62
  389. package/esm2020/src/GlobalCommandsManager.mjs +0 -34
  390. package/esm2020/src/GuiEventsProcessor.mjs +0 -154
  391. package/esm2020/src/ServerConfig.mjs +0 -117
  392. package/esm2020/src/bridge/MagicBridge.mjs +0 -41
  393. package/esm2020/src/commands/ClientOriginatedCommandTaskTag.mjs +0 -11
  394. package/esm2020/src/commands/ClientToServer/BrowserEscEventCommand.mjs +0 -23
  395. package/esm2020/src/commands/ClientToServer/ColumnSortEventCommand.mjs +0 -26
  396. package/esm2020/src/commands/ClientToServer/CommandFactory.mjs +0 -260
  397. package/esm2020/src/commands/ClientToServer/CommandSerializationHelper.mjs +0 -69
  398. package/esm2020/src/commands/ClientToServer/ComputeEventCommand.mjs +0 -23
  399. package/esm2020/src/commands/ClientToServer/DataViewOutputCommand.mjs +0 -13
  400. package/esm2020/src/commands/ClientToServer/EvaluateCommand.mjs +0 -36
  401. package/esm2020/src/commands/ClientToServer/ExecOperCommand.mjs +0 -67
  402. package/esm2020/src/commands/ClientToServer/FetchDataControlValuesEventCommand.mjs +0 -22
  403. package/esm2020/src/commands/ClientToServer/IndexChangeEventCommand.mjs +0 -21
  404. package/esm2020/src/commands/ClientToServer/IniputForceWriteCommand.mjs +0 -23
  405. package/esm2020/src/commands/ClientToServer/RecomputeCommand.mjs +0 -27
  406. package/esm2020/src/commands/ClientToServer/RefreshEventCommand.mjs +0 -27
  407. package/esm2020/src/commands/ClientToServer/RefreshScreenEventCommand.mjs +0 -24
  408. package/esm2020/src/commands/ClientToServer/RollbackEventCommand.mjs +0 -39
  409. package/esm2020/src/commands/ClientToServer/SelectProgramCommand.mjs +0 -15
  410. package/esm2020/src/commands/ClientToServer/SubformOpenEventCommand.mjs +0 -21
  411. package/esm2020/src/commands/ClientToServer/SubformRefreshEventCommand.mjs +0 -24
  412. package/esm2020/src/commands/ClientToServer/TransactionCommand.mjs +0 -28
  413. package/esm2020/src/commands/ClientToServer/WriteMessageToServerLogCommand.mjs +0 -18
  414. package/esm2020/src/commands/DataViewCommandBase.mjs +0 -10
  415. package/esm2020/src/commands/IClientTargetedCommand.mjs +0 -9
  416. package/esm2020/src/commands/ServerToClient/AbortCommand.mjs +0 -65
  417. package/esm2020/src/commands/ServerToClient/ClientRefreshCommand.mjs +0 -25
  418. package/esm2020/src/commands/ServerToClient/ClientTargetedCommandBase.mjs +0 -27
  419. package/esm2020/src/commands/ServerToClient/EnhancedVerifyCommand.mjs +0 -45
  420. package/esm2020/src/commands/ServerToClient/OpenURLCommand.mjs +0 -221
  421. package/esm2020/src/commands/ServerToClient/ResultCommand.mjs +0 -37
  422. package/esm2020/src/commands/ServerToClient/VerifyCommand.mjs +0 -83
  423. package/esm2020/src/communications/InteractiveCommunicationsFailureHandler.mjs +0 -17
  424. package/esm2020/src/data/DataView.mjs +0 -1610
  425. package/esm2020/src/data/DataviewManager.mjs +0 -28
  426. package/esm2020/src/data/DataviewManagerBase.mjs +0 -15
  427. package/esm2020/src/data/DvCache.mjs +0 -67
  428. package/esm2020/src/data/Field.mjs +0 -646
  429. package/esm2020/src/data/FieldBase.mjs +0 -18
  430. package/esm2020/src/data/FieldsTable.mjs +0 -103
  431. package/esm2020/src/data/Record.mjs +0 -846
  432. package/esm2020/src/data/RecordsTable.mjs +0 -267
  433. package/esm2020/src/env/EnvVariablesTable.mjs +0 -340
  434. package/esm2020/src/env/Environment.mjs +0 -489
  435. package/esm2020/src/env/LanguageData.mjs +0 -226
  436. package/esm2020/src/event/ActionManager.mjs +0 -91
  437. package/esm2020/src/event/Event.mjs +0 -1333
  438. package/esm2020/src/event/EventHandler.mjs +0 -766
  439. package/esm2020/src/event/EventHandlerPosition.mjs +0 -204
  440. package/esm2020/src/event/EventsManager.mjs +0 -2975
  441. package/esm2020/src/event/RunTimeEvent.mjs +0 -392
  442. package/esm2020/src/event/UserEventsTable.mjs +0 -47
  443. package/esm2020/src/exp/ExpTable.mjs +0 -59
  444. package/esm2020/src/exp/Expression.mjs +0 -200
  445. package/esm2020/src/exp/ExpressionDict.mjs +0 -727
  446. package/esm2020/src/exp/ExpressionEvaluator.mjs +0 -4208
  447. package/esm2020/src/exp/ExpressionLocalJpn.mjs +0 -314
  448. package/esm2020/src/exp/YesNoExp.mjs +0 -36
  449. package/esm2020/src/gui/CreatedFormVector.mjs +0 -23
  450. package/esm2020/src/gui/FormsTable.mjs +0 -66
  451. package/esm2020/src/gui/MgControl.mjs +0 -353
  452. package/esm2020/src/gui/MgForm.mjs +0 -1181
  453. package/esm2020/src/http/HttpManager.mjs +0 -97
  454. package/esm2020/src/http/client/HttpClientAsync.mjs +0 -67
  455. package/esm2020/src/http/client/HttpClientEvents.mjs +0 -39
  456. package/esm2020/src/http/client/HttpClientSync.mjs +0 -42
  457. package/esm2020/src/http/client/HttpUtility.mjs +0 -84
  458. package/esm2020/src/remote/RemoteCommandsProcessor.mjs +0 -880
  459. package/esm2020/src/remote/ServerError.mjs +0 -40
  460. package/esm2020/src/rt/Argument.mjs +0 -265
  461. package/esm2020/src/rt/ArgumentsList.mjs +0 -103
  462. package/esm2020/src/rt/Boundary.mjs +0 -152
  463. package/esm2020/src/rt/CompMainPrgTable.mjs +0 -65
  464. package/esm2020/src/rt/DataviewHeaderBase.mjs +0 -96
  465. package/esm2020/src/rt/DataviewHeaders.mjs +0 -53
  466. package/esm2020/src/rt/LastFocusedManager.mjs +0 -67
  467. package/esm2020/src/rt/Operation.mjs +0 -735
  468. package/esm2020/src/rt/OperationTable.mjs +0 -67
  469. package/esm2020/src/rt/Recompute.mjs +0 -355
  470. package/esm2020/src/rt/ResultValue.mjs +0 -12
  471. package/esm2020/src/rt/TableCache.mjs +0 -177
  472. package/esm2020/src/rt/TableCacheManager.mjs +0 -67
  473. package/esm2020/src/rt/Transaction.mjs +0 -53
  474. package/esm2020/src/security/UserDetails.mjs +0 -71
  475. package/esm2020/src/tasks/MGData.mjs +0 -552
  476. package/esm2020/src/tasks/MGDataCollection.mjs +0 -252
  477. package/esm2020/src/tasks/RCTimer.mjs +0 -63
  478. package/esm2020/src/tasks/Task.mjs +0 -2496
  479. package/esm2020/src/tasks/TaskBase.mjs +0 -87
  480. package/esm2020/src/tasks/TasksTable.mjs +0 -80
  481. package/esm2020/src/tasks/sort/Sort.mjs +0 -7
  482. package/esm2020/src/util/FlowMonitorQueue.mjs +0 -453
  483. package/esm2020/src/util/MgPriorityBlockingQueue.mjs +0 -74
  484. package/esm2020/src/util/MgPriorityQueue.mjs +0 -66
  485. package/esm2020/src/util/PrmMap.mjs +0 -151
  486. package/esm2020/src/util/ReturnResult.mjs +0 -46
  487. package/esm2020/src/util/ReturnResultBase.mjs +0 -18
  488. package/esm2020/src/util/Scrambler.mjs +0 -89
  489. package/esm2020/src/util/UniqueIDUtils.mjs +0 -12
  490. package/fesm2015/magic-xpa-engine.mjs +0 -30837
  491. package/fesm2015/magic-xpa-engine.mjs.map +0 -1
  492. package/fesm2020/magic-xpa-engine.mjs.map +0 -1
@@ -1,1610 +0,0 @@
1
- import { ApplicationException, Debug, Int32, Int64, isNullOrUndefined, List, NNumber } from '@magic-xpa/mscorelib';
2
- import { Constants, InternalInterface, Logger, Misc, StorageAttribute, XMLConstants, XmlParser } from '@magic-xpa/utils';
3
- import { DataModificationTypes, DisplayConvertor, PIC, PropInterface } from '@magic-xpa/gui';
4
- import { ConstInterface } from '../ConstInterface';
5
- import { RecordsTable } from './RecordsTable';
6
- import { Record } from './Record';
7
- import { TaskBase } from '../tasks/TaskBase';
8
- import { FieldsTableExt as FieldsTable } from './FieldsTable';
9
- import { RecordOutOfDataViewException, RecordOutOfDataViewException_ExceptionType } from './RecordOutOfDataViewException';
10
- import { CommandFactory } from '../commands/ClientToServer/CommandFactory';
11
- import { XMLBasedDcValuesBuilder } from './XMLBasedDcValuesBuilder';
12
- import { Field } from './Field';
13
- import { EventSubType } from '../enums';
14
- import { RemoteCommandsProcessor } from '../remote/RemoteCommandsProcessor';
15
- import { FieldBase } from './FieldBase';
16
- import { CommandsProcessorManager } from '../CommandsProcessorManager';
17
- import { DataViewBase } from './DataViewBase';
18
- import { AccessHelper, ClearEventsOnStopExecution } from '../AccessHelper';
19
- import { MGDataCollection } from '../tasks/MGDataCollection';
20
- export const SET_DISPLAYLINE_BY_DV = Int32.MinValue;
21
- const COMPUTE_NEWREC_ON_CLIENT = 'C';
22
- const UNKNOWN_RCMPS_NOT_INITED = 'M';
23
- const UNKNOWN_RCMPS_FOUND = 'Y';
24
- const INVOKED_FROM_OFFLINE_TASK = '-99999';
25
- const CHUNK_CACHE_NEXT = 'N';
26
- const CHUNK_CACHE_PREV = 'P';
27
- const CHUNK_DV_BOTTOM = 'B';
28
- const CHUNK_DV_TOP = 'T';
29
- const COMPUTE_FLUSH_UPDATES = 'H';
30
- const COMPUTE_NEWREC_ON_SERVER = 'S';
31
- const END_DV_TAG = '</' + ConstInterface.MG_TAG_DATAVIEW + '>';
32
- const RECOVERY_ACT_BEGIN_SCREEN = 'S';
33
- const RECOVERY_ACT_BEGIN_TABLE = 'T';
34
- const RECOVERY_ACT_CANCEL = 'C';
35
- const RECOVERY_ACT_MOVE_DIRECTION_BEGIN = 'B';
36
- const RECOVERY_ACT_NONE = 'N';
37
- const TRANS_STAT_CLOSED = 'C';
38
- const TRANS_STAT_OPENED = 'O';
39
- export class DataView extends DataViewBase {
40
- set InsertAt(value) {
41
- this._insertAt = value;
42
- }
43
- get InsertAt() {
44
- return this._insertAt;
45
- }
46
- get CurrRec() {
47
- return this._currRec_DO_NOT_USE_DIRECTLY_USE_SETTER_GETTER;
48
- }
49
- set CurrRec(value) {
50
- if (this._currRec_DO_NOT_USE_DIRECTLY_USE_SETTER_GETTER !== null && value === null) {
51
- this._currRec_DO_NOT_USE_DIRECTLY_USE_SETTER_GETTER.resetDcValueId();
52
- }
53
- this._currRec_DO_NOT_USE_DIRECTLY_USE_SETTER_GETTER = value;
54
- if (this._currRec_DO_NOT_USE_DIRECTLY_USE_SETTER_GETTER !== null) {
55
- this._currRec_DO_NOT_USE_DIRECTLY_USE_SETTER_GETTER.SetDcValueId();
56
- }
57
- }
58
- get FlushUpdates() {
59
- return this._flushUpdates;
60
- }
61
- get HasMainTable() {
62
- return this._hasMainTable;
63
- }
64
- get CurrentRecId() {
65
- return this._currRecId;
66
- }
67
- get FirstRecord() {
68
- return this._recordsTab.getRecByIdx(0);
69
- }
70
- get LastRecord() {
71
- return this._recordsTab.getRecByIdx(this._recordsTab.getSize() - 1);
72
- }
73
- constructor(taskOrDataView) {
74
- super();
75
- this._cacheLruTimeStamp = 0;
76
- this._changed = false;
77
- this._chunkSize = 30;
78
- this._computeBy = '\0';
79
- this._currRecId = 0;
80
- this._currRecIdx = 0;
81
- this._dvPosValue = 0;
82
- this._firstDv = true;
83
- this._flushUpdates = false;
84
- this._hasMainTable = true;
85
- this._insertAt = ' ';
86
- this.InLocalDataviewCommand = false;
87
- this._lastCreatedRecId = 0;
88
- this._lastSessionCounter = Int64.MinValue;
89
- this._locateFirstRec = -1;
90
- this._modifiedRecordsTab = null;
91
- this._oldTopRecIdx = Int32.MinValue;
92
- this._original = null;
93
- this._pendingRecovery = RECOVERY_ACT_NONE;
94
- this._prevCurrRec = null;
95
- this._recordsTab = null;
96
- this._recovery = ConstInterface.RECOVERY_NONE;
97
- this._rmIdx = 0;
98
- this._rmSize = 0;
99
- this._skipParsing = false;
100
- this._topRecId = 0;
101
- this._topRecIdx = Int32.MinValue;
102
- this._topRecIdxModified = false;
103
- this._transCleared = false;
104
- this._unknownRcmp = UNKNOWN_RCMPS_NOT_INITED;
105
- this.IsOneWayKey = false;
106
- this._includesFirst = false;
107
- this._includesLast = false;
108
- this._serverTransCacheEmpty = true;
109
- this._currRec_DO_NOT_USE_DIRECTLY_USE_SETTER_GETTER = null;
110
- this.DBViewSize = 0;
111
- this.Dvcount = 0;
112
- this.TotalRecordsCount = 0;
113
- this.RecordsBeforeCurrentView = 0;
114
- if (taskOrDataView instanceof TaskBase) {
115
- this._task = taskOrDataView;
116
- this._fieldsTab = new FieldsTable();
117
- this._recordsTab = new RecordsTable(true);
118
- this._modifiedRecordsTab = new RecordsTable(false);
119
- }
120
- else {
121
- Object.assign(this, taskOrDataView);
122
- }
123
- }
124
- Init() {
125
- this.init();
126
- }
127
- IncludesFirst() {
128
- return this._includesFirst;
129
- }
130
- get ServerTransactionCacheEmpty() {
131
- return this._serverTransCacheEmpty;
132
- }
133
- IncludesLast() {
134
- return this._includesLast;
135
- }
136
- fillHeaderData(parser) {
137
- while (this.initHeaderInnerObjects(parser, parser.getNextTag())) {
138
- }
139
- this.Dvcount = this._task.ctl_itm_4_parent_vee(0, 1);
140
- }
141
- initHeaderInnerObjects(parser, foundTagName) {
142
- if (foundTagName === null)
143
- return false;
144
- if (foundTagName === XMLConstants.MG_TAG_DVHEADER) {
145
- Logger.Instance.WriteDevToLog('dvheader found');
146
- this.getHeaderAttributes(parser);
147
- this._fieldsTab.fillData(parser, this);
148
- this._fieldsTab.setRMPos(this._rmSize, this._rmIdx);
149
- }
150
- else if (foundTagName === ('/' + XMLConstants.MG_TAG_DVHEADER)) {
151
- parser.setCurrIndex2EndOfTag();
152
- return false;
153
- }
154
- else
155
- return false;
156
- return true;
157
- }
158
- getHeaderAttributes(parser) {
159
- let tokensVector;
160
- let tag;
161
- let attribute;
162
- let valueStr;
163
- let endContext = parser.getXMLdata().indexOf(XMLConstants.TAG_CLOSE, parser.getCurrIndex());
164
- if (endContext !== -1 && endContext < parser.getXMLdata().length) {
165
- tag = parser.getXMLsubstring(endContext);
166
- parser.add2CurrIndex(tag.indexOf(XMLConstants.MG_TAG_DVHEADER) + XMLConstants.MG_TAG_DVHEADER.length);
167
- tokensVector = XmlParser.getTokens(parser.getXMLsubstring(endContext), XMLConstants.XML_ATTR_DELIM);
168
- for (let j = 0; j < tokensVector.length; j += 2) {
169
- attribute = (tokensVector.get_Item(j));
170
- valueStr = (tokensVector.get_Item(j + 1));
171
- switch (attribute) {
172
- case ConstInterface.MG_ATTR_RMPOS: {
173
- let i = valueStr.indexOf(',');
174
- if (i > -1) {
175
- this._rmSize = NNumber.Parse(valueStr.substr(0, i));
176
- this._rmIdx = NNumber.Parse(valueStr.substr(i + 1));
177
- }
178
- break;
179
- }
180
- case ConstInterface.MG_ATTR_COMPUTE_BY:
181
- this._computeBy = valueStr[0];
182
- if (this._computeBy === COMPUTE_FLUSH_UPDATES) {
183
- this._computeBy = COMPUTE_NEWREC_ON_SERVER;
184
- this._flushUpdates = true;
185
- }
186
- else
187
- this._flushUpdates = false;
188
- break;
189
- case ConstInterface.MG_ATTR_HAS_MAIN_TBL:
190
- this._hasMainTable = XmlParser.getBoolean(valueStr);
191
- break;
192
- case ConstInterface.MG_ATTR_CHUNK_SIZE:
193
- this._chunkSize = XmlParser.getInt(valueStr);
194
- break;
195
- case ConstInterface.MG_ATTR_CHUNK_SIZE_EXPRESSION:
196
- break;
197
- default:
198
- Logger.Instance.WriteExceptionToLogWithMsg('Unknown attribute for <' + XMLConstants.MG_TAG_DVHEADER + '> tag: ' +
199
- attribute);
200
- break;
201
- }
202
- }
203
- parser.setCurrIndex(++endContext);
204
- return;
205
- }
206
- Logger.Instance.WriteExceptionToLogWithMsg('in DataView.getHeaderAttributes(): out of bounds');
207
- }
208
- async fillData(parser) {
209
- this._skipParsing = false;
210
- while (await this.initInnerObjects(parser, parser.getNextTag())) {
211
- }
212
- this.ResetFirstDv();
213
- }
214
- GetTransactionBegin() {
215
- let transBegin = '\0';
216
- let transBeginProp = this._task.getProp(PropInterface.PROP_TYPE_TRASACTION_BEGIN);
217
- if (transBeginProp !== null) {
218
- transBegin = (transBeginProp.GetComputedValue()).charAt(0);
219
- }
220
- return transBegin;
221
- }
222
- async initInnerObjects(parser, foundTagName) {
223
- let form = this._task.getForm();
224
- if (foundTagName == null)
225
- return false;
226
- if (foundTagName === (ConstInterface.MG_TAG_DATAVIEW)) {
227
- let invalidate = await this.getAttributes(parser);
228
- if (this._skipParsing) {
229
- let endContext = parser.getXMLdata().indexOf(END_DV_TAG, parser.getCurrIndex());
230
- parser.setCurrIndex(endContext + END_DV_TAG.length);
231
- }
232
- else {
233
- this.fillExecStack(parser);
234
- this.fillDataDc(parser);
235
- if (invalidate && form != null)
236
- form.SetTableItemsCount(0, true);
237
- let taskRefreshType = this._recordsTab.fillData(this, this._insertAt, parser);
238
- if (form != null) {
239
- if (form.Opened) {
240
- if (this._insertAt === 'B' && (invalidate || this._recordsTab.InsertedRecordsCount > 0)) {
241
- if (invalidate || !this._task.getForm().isTableWithPagination()) {
242
- form.SetTableItemsCount(0, true);
243
- form.setTableItemsCount(false);
244
- }
245
- else
246
- form.InsertTableItems(0, this._recordsTab.InsertedRecordsCount);
247
- }
248
- else
249
- form.setTableItemsCount(false);
250
- }
251
- }
252
- if (this.CurrRec != null && this.CurrRec.InRecompute && taskRefreshType === Constants.TASK_REFRESH_NONE)
253
- taskRefreshType = Constants.TASK_REFRESH_CURR_REC;
254
- if (invalidate) {
255
- taskRefreshType = Constants.TASK_REFRESH_FORM;
256
- if (this._task.IsSubForm)
257
- this.getTask().DoSubformPrefixSuffix = true;
258
- }
259
- this.getTask().SetRefreshType(taskRefreshType);
260
- this.UpdateDataviewAfterInsert();
261
- let newRecId = this._recordsTab.getInitialCurrRecId();
262
- if (newRecId !== Int32.MinValue && (this._recovery === ConstInterface.RECOVERY_NONE || this._firstDv)) {
263
- if (this._firstDv && this._recovery === ConstInterface.RECOVERY_NONE &&
264
- (this._task.getLevel().charCodeAt(0) === 0 || this._task.getLevel() === Constants.TASK_LEVEL_TASK))
265
- this._task.setLevel(Constants.TASK_LEVEL_TASK);
266
- this._fieldsTab.invalidate(true, Field.LEAVE_FLAGS);
267
- if (newRecId !== this._currRecId) {
268
- await this.setCurrRec(newRecId, !this._firstDv);
269
- this._original = this.CurrRec.replicate();
270
- if (this._firstDv)
271
- this.takeFldValsFromCurrRec();
272
- if (this._task.getForm() != null)
273
- (this._task.getForm()).updateDisplayLineByDV();
274
- }
275
- else
276
- this.takeFldValsFromCurrRec();
277
- }
278
- else if (invalidate && this._recordsTab.getSize() > 0) {
279
- if (form == null || form.isScreenMode()) {
280
- try {
281
- await this.setCurrRecByIdx(0, false, true, false, 0);
282
- }
283
- catch (exception) {
284
- if (exception instanceof RecordOutOfDataViewException) {
285
- }
286
- else
287
- throw exception;
288
- }
289
- }
290
- else {
291
- this._fieldsTab.invalidate(true, Field.LEAVE_FLAGS);
292
- this.setTopRecIdx(0);
293
- if (this._task.getForm() != null)
294
- this._task.getForm().SetTableTopIndex();
295
- try {
296
- await this.setCurrRecByIdx(0, false, true, true, 0);
297
- if (this._task.getForm() != null)
298
- (this._task.getForm()).updateDisplayLineByDV();
299
- }
300
- catch (exception) {
301
- if (exception instanceof RecordOutOfDataViewException) {
302
- }
303
- else
304
- throw exception;
305
- }
306
- if (this._task.getLevel() === Constants.TASK_LEVEL_CONTROL && this._task.getLastParkedCtrl() != null)
307
- this._task.getLastParkedCtrl().resetPrevVal();
308
- }
309
- this.saveOriginal();
310
- this._fieldsTab.invalidate(true, FieldBase.CLEAR_FLAGS);
311
- }
312
- if (this._firstDv)
313
- this.setPrevCurrRec();
314
- if (invalidate && this._task.IsSubForm)
315
- this._task.getForm().getSubFormCtrl().RefreshOnVisible = false;
316
- if (this._recovery === ConstInterface.RECOVERY_NONE) {
317
- if (this.getTask().getAfterRetry(ConstInterface.RECOVERY_RETRY) &&
318
- !this.getTask().IsAfterRetryBeforeBuildXML)
319
- this._task.setLevel(Constants.TASK_LEVEL_RECORD);
320
- }
321
- else {
322
- let transBegin = this.GetTransactionBegin();
323
- let stopExecution = true;
324
- switch (this._recovery) {
325
- case ConstInterface.RECOVERY_ROLLBACK:
326
- if (transBegin === ConstInterface.TRANS_RECORD_PREFIX) {
327
- if (this._task.getMode() === Constants.TASK_MODE_DELETE ||
328
- !this._task.IsInteractive)
329
- stopExecution = false;
330
- else {
331
- this.getTask().setAfterRetry(ConstInterface.RECOVERY_ROLLBACK);
332
- this.CurrRec.restart(this.CurrRec.getMode());
333
- this.CurrRec.resetModified();
334
- this._original = this.CurrRec.replicate();
335
- this._pendingRecovery = RECOVERY_ACT_CANCEL;
336
- }
337
- }
338
- else if (transBegin !== ConstInterface.TRANS_NONE) {
339
- this._task.setLevel(Constants.TASK_LEVEL_TASK);
340
- this._pendingRecovery = RECOVERY_ACT_BEGIN_TABLE;
341
- this.getTask().setAfterRetry(ConstInterface.RECOVERY_ROLLBACK);
342
- }
343
- break;
344
- case ConstInterface.RECOVERY_RETRY:
345
- this.RecoveryRetry(transBegin);
346
- break;
347
- }
348
- if (stopExecution) {
349
- AccessHelper.eventsManager.setStopExecution(true);
350
- this.getTask().TaskSuffixExecuted = false;
351
- }
352
- }
353
- }
354
- }
355
- else if (foundTagName === '/' + ConstInterface.MG_TAG_DATAVIEW) {
356
- if (this._includesFirst && this._includesLast && this.isEmpty()) {
357
- this._currRecId = Int32.MinValue;
358
- this._currRecIdx = Int32.MinValue;
359
- this.CurrRec = null;
360
- this.setTopRecIdx(Int32.MinValue);
361
- }
362
- parser.setCurrIndex2EndOfTag();
363
- return false;
364
- }
365
- else
366
- return false;
367
- return true;
368
- }
369
- RecoveryRetry(transBegin) {
370
- if (transBegin === ConstInterface.TRANS_RECORD_PREFIX) {
371
- this._task.setLevel(Constants.TASK_LEVEL_RECORD);
372
- this.getTask().setTransactionFailed(true);
373
- this.getTask().setAfterRetry(ConstInterface.RECOVERY_RETRY);
374
- this.CurrRec.restart(this.CurrRec.getMode());
375
- if (!this._firstDv) {
376
- this.takeFldValsFromCurrRec();
377
- this._pendingRecovery = RECOVERY_ACT_MOVE_DIRECTION_BEGIN;
378
- }
379
- }
380
- else if (transBegin !== ConstInterface.TRANS_NONE) {
381
- this._task.setLevel(Constants.TASK_LEVEL_TASK);
382
- this._pendingRecovery = RECOVERY_ACT_BEGIN_SCREEN;
383
- this.getTask().setAfterRetry(ConstInterface.RECOVERY_RETRY);
384
- this.getTask().setTransactionFailed(true);
385
- }
386
- }
387
- UpdateDataviewAfterInsert() {
388
- if (this._insertAt === 'B') {
389
- let newRecs = this._recordsTab.InsertedRecordsCount;
390
- if (this._currRecIdx !== Int32.MinValue)
391
- this._currRecIdx += newRecs;
392
- if (this._topRecIdx !== Int32.MinValue)
393
- this._topRecIdx += newRecs;
394
- if (this._oldTopRecIdx !== Int32.MinValue)
395
- this._oldTopRecIdx += newRecs;
396
- }
397
- }
398
- async getAttributes(parser) {
399
- let tokensVector;
400
- let tag;
401
- let boolVal;
402
- let dataViewCommand = null;
403
- let isEmptyDataview = false;
404
- this._recovery = ConstInterface.RECOVERY_NONE;
405
- let endContext = parser.getXMLdata().indexOf(XMLConstants.TAG_CLOSE, parser.getCurrIndex());
406
- if (endContext !== -1 && endContext < parser.getXMLdata().length) {
407
- tag = parser.getXMLsubstring(endContext);
408
- parser.add2CurrIndex(tag.indexOf(ConstInterface.MG_TAG_DATAVIEW) + ConstInterface.MG_TAG_DATAVIEW.length);
409
- tokensVector = XmlParser.getTokens(parser.getXMLsubstring(endContext), XMLConstants.XML_ATTR_DELIM);
410
- this._insertAt = ' ';
411
- let invalidate = this.peekInvalidate(tokensVector);
412
- this._locateFirstRec = 0;
413
- for (let j = 0; j < tokensVector.length; j += 2) {
414
- let attribute = (tokensVector.get_Item(j));
415
- let valueStr = (tokensVector.get_Item(j + 1));
416
- switch (attribute) {
417
- case ConstInterface.MG_ATTR_INSERT_AT:
418
- this._insertAt = valueStr[0];
419
- break;
420
- case ConstInterface.MG_ATTR_INCLUDE_FIRST:
421
- boolVal = XmlParser.getBoolean(valueStr);
422
- this.SetIncludesFirst(boolVal);
423
- break;
424
- case ConstInterface.MG_ATTR_INCLUDE_LAST:
425
- boolVal = XmlParser.getBoolean(valueStr);
426
- this.SetIncludesLast(boolVal);
427
- break;
428
- case ConstInterface.MG_ATTR_IS_ONEWAY_KEY:
429
- boolVal = XmlParser.getBoolean(valueStr);
430
- this.SetOneWayKey(boolVal);
431
- break;
432
- case ConstInterface.MG_ATTR_DBVIEWSIZE:
433
- this.DBViewSize = XmlParser.getInt(valueStr);
434
- break;
435
- case ConstInterface.MG_ATTR_INVALIDATE:
436
- {
437
- }
438
- break;
439
- case ConstInterface.MG_ATTR_TOP_REC_ID:
440
- this._topRecId = NNumber.Parse(valueStr);
441
- break;
442
- case ConstInterface.MG_ATTR_TASKMODE:
443
- if (this._task.getOriginalTaskMode() === Constants.TASK_MODE_NONE || invalidate)
444
- this._task.setOriginalTaskMode(valueStr);
445
- this._task.setProp(PropInterface.PROP_TYPE_TASK_MODE, valueStr);
446
- break;
447
- case ConstInterface.MG_ATTR_EMPTY_DATAVIEW:
448
- isEmptyDataview = true;
449
- break;
450
- case XMLConstants.MG_ATTR_TASKID:
451
- continue;
452
- case ConstInterface.MG_ATTR_LOW_ID:
453
- this._lastCreatedRecId = NNumber.Parse(valueStr);
454
- break;
455
- case ConstInterface.MG_ATTR_TRANS_STAT:
456
- let transStat = valueStr[0];
457
- switch (transStat) {
458
- case TRANS_STAT_OPENED:
459
- dataViewCommand = CommandFactory.CreateSetTransactionStateDataviewCommand(this.getTask().getTaskTag(), true);
460
- await this.getTask().DataviewManager.RemoteDataviewManager.Execute(dataViewCommand);
461
- break;
462
- case TRANS_STAT_CLOSED:
463
- dataViewCommand = CommandFactory.CreateSetTransactionStateDataviewCommand(this.getTask().getTaskTag(), false);
464
- await this.getTask().DataviewManager.RemoteDataviewManager.Execute(dataViewCommand);
465
- this.getTask().setTransactionFailed(false);
466
- break;
467
- default:
468
- break;
469
- }
470
- break;
471
- case ConstInterface.MG_ATTR_RECOVERY:
472
- if (this._task.IsTryingToStop)
473
- this.getTask().setTryingToStop(false);
474
- this.getTask().resetExecEndTask();
475
- this._recovery = valueStr[0];
476
- break;
477
- case ConstInterface.MG_ATTR_DVPOS_VALUE:
478
- this._dvPosValue = NNumber.Parse(valueStr);
479
- break;
480
- case ConstInterface.MG_ATTR_LOCATE_FIRST_ID:
481
- this._locateFirstRec = NNumber.Parse(valueStr);
482
- break;
483
- case ConstInterface.MG_ATTR_OFFSET:
484
- break;
485
- case ConstInterface.MG_ATTR_USER_SORT:
486
- let form = this._task.getForm();
487
- form.clearTableColumnSortMark(XmlParser.getBoolean(valueStr));
488
- break;
489
- case ConstInterface.MG_ATTR_VAL_TOTAL_RECORDS_COUNT:
490
- this.TotalRecordsCount = XmlParser.getInt(valueStr);
491
- break;
492
- case ConstInterface.MG_ATTR_VAL_RECORDS_BEFORE_CURRENT_VIEW:
493
- this.RecordsBeforeCurrentView = XmlParser.getInt(valueStr);
494
- break;
495
- case ConstInterface.MG_ATTR_VAL_SERVER_TRANS_CACHE_EMPTY:
496
- this._serverTransCacheEmpty = XmlParser.getBoolean(valueStr);
497
- break;
498
- default:
499
- Logger.Instance.WriteExceptionToLogWithMsg('Unknown attribute for <' + ConstInterface.MG_TAG_DATAVIEW + '> tag: ' + attribute);
500
- break;
501
- }
502
- }
503
- this.setEmptyDataview(isEmptyDataview);
504
- parser.setCurrIndex(++endContext);
505
- return invalidate;
506
- }
507
- Logger.Instance.WriteExceptionToLogWithMsg('in DataView.getAttributes(): out of bounds');
508
- return false;
509
- }
510
- SetOneWayKey(val) {
511
- this.IsOneWayKey = val;
512
- }
513
- SetIncludesLast(val) {
514
- this._includesLast = val;
515
- }
516
- SetIncludesFirst(val) {
517
- let prevIncludeFirst = this._includesFirst;
518
- this._includesFirst = val;
519
- if (this._includesFirst !== prevIncludeFirst) {
520
- let form = this._task.getForm();
521
- if (form !== null) {
522
- form.SetTableItemsCount(0, true);
523
- }
524
- }
525
- }
526
- fillDataDc(parser) {
527
- let dcvBuilder = new XMLBasedDcValuesBuilder();
528
- let foundTagName = parser.getNextTag();
529
- while (foundTagName !== null && foundTagName === ConstInterface.MG_TAG_DC_VALS) {
530
- let dcValsPosition = parser.getCurrIndex();
531
- dcvBuilder.SerializedDCVals = parser.ReadToEndOfCurrentElement();
532
- let dcv = dcvBuilder.Build();
533
- if (dcv !== null)
534
- this.AddDcValues(dcv);
535
- else
536
- Logger.Instance.WriteExceptionToLogWithMsg('Error while parsing DC values at position ' + dcValsPosition);
537
- foundTagName = parser.getNextTag();
538
- }
539
- }
540
- AddDcValues(dcv) {
541
- this._dcValsCollection.Add(dcv.getId().toString(), dcv);
542
- }
543
- fillExecStack(parser) {
544
- let foundTagName = parser.getNextTag();
545
- let execStackTagExists = false;
546
- while (foundTagName !== null && foundTagName === ConstInterface.MG_TAG_EXEC_STACK_ENTRY) {
547
- this.fillInnerExecStack(parser);
548
- foundTagName = parser.getNextTag();
549
- execStackTagExists = true;
550
- }
551
- if (execStackTagExists) {
552
- AccessHelper.eventsManager.reverseServerExecStack();
553
- }
554
- }
555
- fillInnerExecStack(parser) {
556
- let tokensVector;
557
- const endContext = parser.getXMLdata().indexOf(XMLConstants.TAG_TERM, parser.getCurrIndex());
558
- let attribute;
559
- let taskId = '';
560
- let handlerId = '';
561
- let operIdx = 0;
562
- if (endContext !== -1 && endContext < parser.getXMLdata().length) {
563
- let tag = parser.getXMLsubstring(endContext);
564
- parser.add2CurrIndex(tag.indexOf(ConstInterface.MG_TAG_EXEC_STACK_ENTRY) + ConstInterface.MG_TAG_EXEC_STACK_ENTRY.length);
565
- tokensVector = XmlParser.getTokens(parser.getXMLsubstring(endContext), XMLConstants.XML_ATTR_DELIM);
566
- for (let j = 0; j < tokensVector.length; j += 2) {
567
- attribute = (tokensVector.get_Item(j));
568
- let valueStr = (tokensVector.get_Item(j + 1));
569
- switch (attribute) {
570
- case XMLConstants.MG_ATTR_TASKID:
571
- taskId = valueStr;
572
- break;
573
- case ConstInterface.MG_ATTR_HANDLERID:
574
- handlerId = valueStr;
575
- break;
576
- case ConstInterface.MG_ATTR_OPER_IDX:
577
- operIdx = XmlParser.getInt(valueStr);
578
- break;
579
- }
580
- }
581
- AccessHelper.eventsManager.pushServerExecStack(taskId, handlerId, operIdx);
582
- parser.setCurrIndex(endContext + XMLConstants.TAG_TERM.length);
583
- }
584
- else
585
- Logger.Instance.WriteExceptionToLogWithMsg('in DataView.fillInnerExecStack() out of bounds');
586
- }
587
- peekInvalidate(tokensVector) {
588
- let sessionCounter = CommandsProcessorManager.GetCommandsProcessor().GetSessionCounter();
589
- for (let j = 0; j < tokensVector.length; j += 2) {
590
- let attribute = tokensVector.get_Item(j);
591
- if (attribute === (ConstInterface.MG_ATTR_INVALIDATE)) {
592
- let valueStr = tokensVector.get_Item(j + 1);
593
- if (XmlParser.getBoolean(valueStr)) {
594
- if (sessionCounter < this._lastSessionCounter)
595
- this._skipParsing = true;
596
- else {
597
- this._lastSessionCounter = sessionCounter;
598
- this.clear();
599
- return true;
600
- }
601
- }
602
- return false;
603
- }
604
- }
605
- return false;
606
- }
607
- getFieldByName(fldName) {
608
- if (this._fieldsTab !== null)
609
- return this._fieldsTab.getField(fldName);
610
- Logger.Instance.WriteExceptionToLogWithMsg('in DataView.getField(String): There is no fieldsTab object');
611
- return null;
612
- }
613
- async buildXML(message) {
614
- let dcv;
615
- let taskTag = this._task.getTaskTag();
616
- let brkLevelIndex = this._task.getBrkLevelIndex();
617
- let currRecDeleted = false;
618
- let serverParent;
619
- let contextTask = (this.getTask().GetContextTask());
620
- let invokingTaskTag = contextTask.IsOffline ? INVOKED_FROM_OFFLINE_TASK : contextTask.getTaskTag();
621
- message.Append('\n <' + ConstInterface.MG_TAG_DATAVIEW + ' ' + XMLConstants.MG_ATTR_TASKID + '="' +
622
- taskTag + '"');
623
- message.Append(' ' + ConstInterface.MG_ATTR_TASKLEVEL + '="' + brkLevelIndex + '"');
624
- serverParent = '0';
625
- let triggeringTask = this.getTask().getTriggeringTask();
626
- if (triggeringTask != null) {
627
- if (triggeringTask.IsOffline) {
628
- let ctlIdx = triggeringTask.getCtlIdx();
629
- let mainPrg = AccessHelper.mgDataTable.GetMainProgByCtlIdx(-1, ctlIdx);
630
- serverParent = mainPrg.getTaskTag();
631
- }
632
- else
633
- serverParent = triggeringTask.getTaskTag();
634
- }
635
- if (this._currRecId > Int32.MinValue) {
636
- if (this.CurrRec != null)
637
- message.Append(' ' + ConstInterface.MG_ATTR_CURR_REC + '="' + this._currRecId + '"');
638
- message.Append(' ' + ConstInterface.MG_ATTR_TASKMODE + '="' + this._task.getMode() + '"');
639
- if (this._transCleared && !(MGDataCollection.Instance.StartupMgData.getFirstTask().InEndTask && MGDataCollection.Instance.StartupMgData.getFirstTask().ClosingFormUI)) {
640
- message.Append(' ' + ConstInterface.MG_ATTR_TRANS_CLEARED + '="1"');
641
- this._transCleared = false;
642
- }
643
- message.Append(' ' + ConstInterface.MG_ATTR_INVOKER_ID + '="' + invokingTaskTag + ',' + serverParent + '"');
644
- if (await this.getTask().isCached())
645
- message.Append(' ' + ConstInterface.MG_ATTR_DVPOS_VALUE + '="' + this._dvPosValue + '"');
646
- message.Append(' ' + ConstInterface.MG_ATTR_LOOP_COUNTER + '="' + this.getTask().getLoopCounter() + '"');
647
- if (this._task.IsSubForm) {
648
- let subformCtrl = this._task.getForm().getSubFormCtrl();
649
- if (!subformCtrl.isVisible() &&
650
- !await subformCtrl.checkProp(PropInterface.PROP_TYPE_REFRESH_WHEN_HIDDEN, false))
651
- message.Append(' ' + ConstInterface.MG_ATTR_SUBFORM_VISIBLE + '="0"');
652
- }
653
- if (!this._task.IsInteractive)
654
- message.Append(' ' + ConstInterface.MG_ATTR_TASK_COUNTER + '="' + this.getTask().getCounter() + '"');
655
- if (this._task != null && this._task.GetComputedProperty(PropInterface.PROP_TYPE_PRELOAD_VIEW).GetComputedValueBoolean()) {
656
- message.Append(' ' + ConstInterface.MG_ATTR_LAST_REC_ID + '="' +
657
- (this._recordsTab.getRecByIdx(this.getSize() - 1).getId()) + '"');
658
- message.Append(' ' + ConstInterface.MG_ATTR_OLD_FIRST_REC_ID + '="' +
659
- this._recordsTab.getRecByIdx(0).getId() + '"');
660
- }
661
- if (this._task.IsInteractive) {
662
- let form = this._task.getForm();
663
- if (form != null && this._recordsTab.getSize() > 1) {
664
- message.Append(' ' + ConstInterface.MG_ATTR_CURR_REC_POS_IN_FORM + '="' +
665
- form.getCurrRecPosInForm() + '"');
666
- }
667
- }
668
- message.Append(XMLConstants.TAG_CLOSE);
669
- if (this.getTask().ResetRange || this.getTask().UserRngs != null) {
670
- message.Append(XMLConstants.START_TAG + ConstInterface.USER_RANGES);
671
- if (this.getTask().ResetRange) {
672
- message.Append(' ' + ConstInterface.CLEAR_RANGE + '="1"');
673
- this.getTask().ResetRange = false;
674
- }
675
- if (this.getTask().UserRngs != null) {
676
- this.getTask().buildXMLForRngs(message, this.getTask().UserRngs, false);
677
- this.getTask().UserRngs.Clear();
678
- this.getTask().UserRngs = null;
679
- }
680
- else
681
- message.Append(XMLConstants.TAG_TERM);
682
- }
683
- if (this.getTask().ResetLocate || this.getTask().UserLocs != null) {
684
- message.Append(XMLConstants.START_TAG + ConstInterface.USER_LOCATES);
685
- if (this.getTask().ResetLocate) {
686
- message.Append(' ' + ConstInterface.CLEAR_LOCATES + '="1"');
687
- this.getTask().ResetLocate = false;
688
- }
689
- if (this.getTask().UserLocs != null) {
690
- this.getTask().buildXMLForRngs(message, this.getTask().UserLocs, true);
691
- this.getTask().UserLocs.Clear();
692
- this.getTask().UserLocs = null;
693
- }
694
- else
695
- message.Append(XMLConstants.TAG_TERM);
696
- }
697
- if (this.getTask().ResetSort || this.getTask().UserSorts != null) {
698
- message.Append(XMLConstants.START_TAG + ConstInterface.MG_TAG_SORTS);
699
- if (this.getTask().ResetSort) {
700
- message.Append(' ' + ConstInterface.CLEAR_SORTS + '="1"');
701
- this.getTask().ResetSort = false;
702
- }
703
- if (this.getTask().UserSorts != null)
704
- this.getTask().buildXMLForSorts(message);
705
- else
706
- message.Append(XMLConstants.TAG_TERM);
707
- }
708
- if (await this.getTask().isCached()) {
709
- let delList = this.getTask().getTaskCache().getDeletedListToXML();
710
- if (delList !== '') {
711
- message.Append(XMLConstants.START_TAG + ConstInterface.MG_TAG_DEL_LIST);
712
- message.Append(' ' + XMLConstants.MG_ATTR_ID + '="' + this._task.getTaskTag() + '"');
713
- message.Append(' ' + ConstInterface.MG_ATTR_REMOVE + '="' + delList + '"');
714
- message.Append(XMLConstants.TAG_TERM);
715
- if (this.getTask().getTaskCache().isDeleted(this._dvPosValue))
716
- this.setChanged(true);
717
- this.getTask().getTaskCache().clearDeletedList();
718
- }
719
- }
720
- let dcValKeys = this._dcValsCollection.Keys;
721
- dcValKeys.forEach((dcValKey) => {
722
- dcv = this._dcValsCollection.get_Item(dcValKey);
723
- if (!dcv.HasReferences) {
724
- message.Append(XMLConstants.START_TAG + ConstInterface.MG_TAG_DC_VALS);
725
- message.Append(' ' + XMLConstants.MG_ATTR_ID + '="' + dcv.getId() + '"');
726
- message.Append(' ' + ConstInterface.MG_ATTR_REMOVE + '="1"');
727
- message.Append(XMLConstants.TAG_TERM);
728
- this._dcValsCollection.Remove(dcValKey);
729
- }
730
- });
731
- if (this.CurrRec != null)
732
- currRecDeleted = (this.CurrRec.getMode() === DataModificationTypes.Delete
733
- && this._modifiedRecordsTab.getRecord(this.CurrRec.getId()) != null && this.CurrRec.SendToServer);
734
- let skipCurrRec = false;
735
- if (this.CurrRec != null && this._modifiedRecordsTab.getRecord(this.CurrRec.getId()) != null)
736
- skipCurrRec = AccessHelper.eventsManager.isForceExitPreRecordUpdate(this.getTask());
737
- this._modifiedRecordsTab.buildXML(message, skipCurrRec, this.CurrRec.getId());
738
- if (this._original != null)
739
- this._original.clearMode();
740
- for (let i = this._modifiedRecordsTab.getSize() - 1; i >= 0; i--) {
741
- if (skipCurrRec && this._modifiedRecordsTab.getRecByIdx(i).getId() === this.CurrRec.getId())
742
- continue;
743
- this._modifiedRecordsTab.getRecByIdx(i).clearFlagsHistory();
744
- this._modifiedRecordsTab.removeRecord(i);
745
- }
746
- if (this.CurrRec != null && !currRecDeleted) {
747
- let forceBuild = (this._task.isMainProg() && (RemoteCommandsProcessor.IsSessionReInitializing));
748
- this.CurrRec.buildXML(message, true, forceBuild);
749
- }
750
- }
751
- else {
752
- message.Append(' ' + ConstInterface.MG_ATTR_INVOKER_ID + '="' + invokingTaskTag + ',' + serverParent + '"' +
753
- XMLConstants.TAG_CLOSE);
754
- }
755
- message.Append('\n </' + ConstInterface.MG_TAG_DATAVIEW + XMLConstants.TAG_CLOSE);
756
- }
757
- getCurrRec() {
758
- if (this.CurrRec === null && this._currRecId > Int32.MinValue) {
759
- Logger.Instance.WriteExceptionToLogWithMsg('DataView.getCurrRec(): record ' + this._currRecId + ' not found');
760
- }
761
- return this.CurrRec;
762
- }
763
- getPrevCurrRec() {
764
- return this._prevCurrRec;
765
- }
766
- getOriginalRec() {
767
- if (this._original === null || this._original.getId() !== this.CurrRec.getId())
768
- return this.CurrRec;
769
- return this._original;
770
- }
771
- async setCurrRec(id, compute) {
772
- let oldRecId = this._currRecId;
773
- if (id > Int32.MinValue) {
774
- let newIdx = this._recordsTab.getRecIdx(id);
775
- if (newIdx === -1)
776
- this._original = null;
777
- else {
778
- try {
779
- let ignoreCurrRec = this._currRecId === Int32.MinValue;
780
- await this.setCurrRecByIdx(newIdx, !ignoreCurrRec, ignoreCurrRec, compute, Int32.MinValue);
781
- if (id !== oldRecId)
782
- this.saveOriginal();
783
- return true;
784
- }
785
- catch (exception) {
786
- if (exception instanceof RecordOutOfDataViewException) {
787
- }
788
- else
789
- throw exception;
790
- }
791
- }
792
- }
793
- else {
794
- this.CurrRec = null;
795
- this._original = null;
796
- this._currRecId = Int32.MinValue;
797
- }
798
- return false;
799
- }
800
- async setCurrRecByIdx(newIdx, doSuffix, ignoreCurrRec, compute, newDisplayLine) {
801
- let lastRecIdx = this._recordsTab.getSize() - 1;
802
- let oldFirstRec, nextRec;
803
- let recordSuff = false;
804
- if (newIdx === Constants.MG_DATAVIEW_FIRST_RECORD) {
805
- if (this.getTask().isTableWithAbsolutesScrollbar()) {
806
- this.RecordsBeforeCurrentView = 0;
807
- }
808
- if (this._includesFirst) {
809
- if (this._currRecIdx >= 0 || this._currRecIdx === Int32.MinValue) {
810
- newIdx = 0;
811
- recordSuff = true;
812
- }
813
- else
814
- throw new RecordOutOfDataViewException(RecordOutOfDataViewException_ExceptionType.TOP);
815
- }
816
- else {
817
- await this.fetchChunkFromServer(CHUNK_DV_TOP, doSuffix);
818
- await this.setCurrRecByIdx(newIdx, false, ignoreCurrRec, compute, SET_DISPLAYLINE_BY_DV);
819
- return;
820
- }
821
- }
822
- else if (newIdx === Constants.MG_DATAVIEW_LAST_RECORD) {
823
- if (this._includesLast) {
824
- if (this._currRecIdx <= lastRecIdx) {
825
- newIdx = lastRecIdx;
826
- recordSuff = true;
827
- }
828
- else
829
- throw new RecordOutOfDataViewException(RecordOutOfDataViewException_ExceptionType.BOTTOM);
830
- }
831
- else {
832
- if (this.getTask().isTableWithAbsolutesScrollbar())
833
- this.RecordsBeforeCurrentView = this.TotalRecordsCount;
834
- await this.fetchChunkFromServer(CHUNK_DV_BOTTOM, doSuffix);
835
- if (!this._includesLast)
836
- throw new RecordOutOfDataViewException(RecordOutOfDataViewException_ExceptionType.BOTTOM);
837
- let form = this._task.getForm();
838
- if (form != null) {
839
- while (!this._includesFirst && form.getRowsInPage() >= this.getSize()) {
840
- await this.fetchChunkFromServer(CHUNK_CACHE_PREV, false);
841
- }
842
- }
843
- await this.setCurrRecByIdx(newIdx, false, ignoreCurrRec, compute, SET_DISPLAYLINE_BY_DV);
844
- return;
845
- }
846
- }
847
- else if (newIdx < 0) {
848
- if (this._includesFirst)
849
- throw new RecordOutOfDataViewException(RecordOutOfDataViewException_ExceptionType.TOP);
850
- oldFirstRec = this._recordsTab.getRecByIdx(0);
851
- if (this._recordsTab.getSize() > 0 || this.IncludesLast())
852
- await this.fetchChunkFromServer(CHUNK_CACHE_PREV, doSuffix);
853
- else if (this._recordsTab.getSize() === 0 && this.IncludesFirst())
854
- await this.fetchChunkFromServer(CHUNK_DV_TOP, doSuffix);
855
- else
856
- Logger.Instance.WriteExceptionToLogWithMsg('in DataView.fetchChunkFromServer() wrong option');
857
- let oldFirstNewIdx = oldFirstRec != null
858
- ? this._recordsTab.getRecIdx(oldFirstRec.getId())
859
- : this._recordsTab.getSize();
860
- if (oldFirstNewIdx !== 0)
861
- await this.setCurrRecByIdx(oldFirstNewIdx + newIdx, false, ignoreCurrRec, compute, SET_DISPLAYLINE_BY_DV);
862
- return;
863
- }
864
- else if (newIdx > lastRecIdx) {
865
- if (this._includesLast)
866
- throw new RecordOutOfDataViewException(RecordOutOfDataViewException_ExceptionType.BOTTOM);
867
- if (this.getForm().isRowCreated(newIdx))
868
- this.getForm().markRowNOTCreated(newIdx);
869
- await this.fetchChunkFromServer(CHUNK_CACHE_NEXT, doSuffix);
870
- await this.setCurrRecByIdx(newIdx, false, ignoreCurrRec, compute, SET_DISPLAYLINE_BY_DV);
871
- return;
872
- }
873
- let isCreateLineAboveAct = false;
874
- let lastEvent = isNullOrUndefined(AccessHelper.eventsManager.getLastRtEvent()) ? 0 :
875
- AccessHelper.eventsManager.getLastRtEvent().getInternalCode();
876
- if (newIdx >= 0 && !this.getTask().transactionFailed(ConstInterface.TRANS_RECORD_PREFIX) &&
877
- lastEvent === InternalInterface.MG_ACT_CRELINE_ABOVE) {
878
- if ((this.getTask().getInCreateLine()) && newIdx == this._currRecIdx) {
879
- let newRec = this._recordsTab.getRecByIdx(newIdx);
880
- if (newRec.getMode() == DataModificationTypes.Insert)
881
- isCreateLineAboveAct = true;
882
- }
883
- }
884
- if (recordSuff || isCreateLineAboveAct || newIdx !== this._currRecIdx || ignoreCurrRec && compute) {
885
- if (!ignoreCurrRec && doSuffix && this.CurrRec != null) {
886
- let oldRecTabSize = this._recordsTab.getSize();
887
- nextRec = this._recordsTab.getRecByIdx(newIdx);
888
- if (nextRec.isNewRec()) {
889
- if (this._task.getMode() !== Constants.TASK_MODE_CREATE &&
890
- !await this._task.checkProp(PropInterface.PROP_TYPE_ALLOW_CREATE, true))
891
- AccessHelper.eventsManager.setStopExecution(true);
892
- }
893
- if (!AccessHelper.eventsManager.GetStopExecutionFlag()) {
894
- let orgTopRecIdx = 0;
895
- if (this._topRecIdxModified) {
896
- orgTopRecIdx = this.getTopRecIdx();
897
- this.restoreTopRecIdx();
898
- }
899
- await AccessHelper.eventsManager.handleInternalEventWithTask(this._task, InternalInterface.MG_ACT_REC_SUFFIX);
900
- if (this._topRecIdxModified)
901
- this.setTopRecIdx(orgTopRecIdx);
902
- }
903
- if (AccessHelper.eventsManager.GetStopExecutionFlag())
904
- throw new RecordOutOfDataViewException(RecordOutOfDataViewException_ExceptionType.REC_SUFFIX_FAILED);
905
- if (nextRec !== this.CurrRec && this.getTask().getAfterRetry())
906
- this._task.setLevel(Constants.TASK_LEVEL_TASK);
907
- if (oldRecTabSize - 1 === this._recordsTab.getSize() && this._currRecIdx < newIdx)
908
- newIdx--;
909
- if (newIdx === this._currRecIdx) {
910
- if (this._task.getMode() === Constants.TASK_MODE_CREATE && !this.CurrRec.isNewRec() &&
911
- !this._task.getForm().inRefreshDisplay())
912
- this._task.setMode(Constants.TASK_MODE_MODIFY);
913
- return;
914
- }
915
- }
916
- this.CurrRec = this._recordsTab.getRecByIdx(newIdx);
917
- if (this.CurrRec == null)
918
- throw new ApplicationException('in DataView.setCurrRecByIdx() current record not found!');
919
- this._currRecId = this.CurrRec.getId();
920
- this._currRecIdx = newIdx;
921
- if (this._task.getForm() != null) {
922
- if (newDisplayLine === SET_DISPLAYLINE_BY_DV) {
923
- (this._task.getForm()).updateDisplayLineByDV();
924
- }
925
- else
926
- this._task.getForm().DisplayLine = newDisplayLine;
927
- }
928
- if (this._task.getMode() === Constants.TASK_MODE_CREATE && !this.CurrRec.isNewRec() &&
929
- !this._task.getForm().inRefreshDisplay())
930
- this._task.setMode(Constants.TASK_MODE_MODIFY);
931
- if (compute)
932
- await this.currRecCompute(false);
933
- }
934
- }
935
- async currRecCompute(forceClientCompute) {
936
- this._fieldsTab.invalidate(false, true);
937
- await this.compute(false, forceClientCompute);
938
- }
939
- saveOriginal() {
940
- if (!this.CurrRec.Modified)
941
- this._original = this.CurrRec.replicate();
942
- }
943
- async fetchChunkFromServer(chunkId, doSuffix) {
944
- this._task.getForm().FormRefreshed = true;
945
- if (doSuffix && this.CurrRec != null) {
946
- await AccessHelper.eventsManager.handleInternalEventWithTask(this._task, InternalInterface.MG_ACT_REC_SUFFIX);
947
- if (AccessHelper.eventsManager.GetStopExecutionFlag() || this._task.isAborting())
948
- throw new RecordOutOfDataViewException(RecordOutOfDataViewException_ExceptionType.REC_SUFFIX_FAILED);
949
- this._task.getForm().setSuffixDone();
950
- }
951
- let eventCode;
952
- let clientRecId = this._currRecId;
953
- switch (chunkId) {
954
- case CHUNK_DV_TOP:
955
- eventCode = InternalInterface.MG_ACT_DATAVIEW_TOP;
956
- break;
957
- case CHUNK_DV_BOTTOM:
958
- eventCode = InternalInterface.MG_ACT_DATAVIEW_BOTTOM;
959
- break;
960
- case CHUNK_CACHE_PREV:
961
- clientRecId = this.FirstRecord == null ? 0 : this.FirstRecord.getId();
962
- eventCode = InternalInterface.MG_ACT_CACHE_PREV;
963
- break;
964
- case CHUNK_CACHE_NEXT:
965
- eventCode = InternalInterface.MG_ACT_CACHE_NEXT;
966
- clientRecId = this.LastRecord == null ? 0 : this.LastRecord.getId();
967
- break;
968
- default:
969
- Logger.Instance.WriteExceptionToLogWithMsg('in DataView.fetchChunkFromServer() unknown chunk id: ' + chunkId);
970
- return;
971
- }
972
- let cmd = CommandFactory.CreateEventCommand(this._task.getTaskTag(), eventCode);
973
- cmd.ClientRecId = clientRecId;
974
- await this.getTask().DataviewManager.Execute(cmd);
975
- }
976
- async FetchRecordsAheadFromServer() {
977
- if (!this._includesLast)
978
- await this.fetchChunkFromServer(CHUNK_CACHE_NEXT, false);
979
- else if (!this._includesFirst)
980
- await this.fetchChunkFromServer(CHUNK_CACHE_PREV, false);
981
- }
982
- recExists(recIdx) {
983
- let lastRecIdx = this._recordsTab.getSize() - 1;
984
- return recIdx >= 0 && recIdx <= lastRecIdx;
985
- }
986
- checkFirst(locateFirst) {
987
- return this._recordsTab.getRecord(locateFirst) !== null;
988
- }
989
- getCurrRecIdx() {
990
- if (this._currRecIdx === Int32.MinValue) {
991
- if (!this.setCurrRec(this._currRecId, true)) {
992
- Logger.Instance.WriteWarningToLogWithMsg('DataView.getCurrRecIdx(): _task ' +
993
- (this.getTask()).PreviouslyActiveTaskId +
994
- ', record ' + this._currRecId + ' not found');
995
- }
996
- }
997
- return this._currRecIdx;
998
- }
999
- getCurrDBViewRowIdx() {
1000
- return this.CurrRec.getDBViewRowIdx();
1001
- }
1002
- setTopRecIdx(newTopRecIdx) {
1003
- this._oldTopRecIdx = this.getTopRecIdx();
1004
- this._topRecIdx = newTopRecIdx;
1005
- }
1006
- getTopRecIdx() {
1007
- return this._topRecIdx;
1008
- }
1009
- setTopRecIdxModified(val) {
1010
- this._topRecIdxModified = val;
1011
- }
1012
- getChunkSize() {
1013
- return this._chunkSize;
1014
- }
1015
- restoreTopRecIdx() {
1016
- this._topRecIdx = this._oldTopRecIdx;
1017
- }
1018
- clear() {
1019
- this._recordsTab.removeAll();
1020
- this._original = null;
1021
- let mgForm = this._task.getForm();
1022
- if (mgForm !== null) {
1023
- this._task.getForm().SetTableItemsCount(0, true);
1024
- }
1025
- this._modifiedRecordsTab.removeAll();
1026
- this.init();
1027
- }
1028
- init() {
1029
- this._currRecId = Int32.MinValue;
1030
- this._currRecIdx = Int32.MinValue;
1031
- this.CurrRec = null;
1032
- this._prevCurrRec = null;
1033
- this._includesFirst = false;
1034
- this._includesLast = false;
1035
- this.IsOneWayKey = false;
1036
- this.setTopRecIdx(Int32.MinValue);
1037
- this._fieldsTab.invalidate(false, true);
1038
- }
1039
- async computeSubForms() {
1040
- if (await this.getTask().prepareCache(true)) {
1041
- if (!await this.getTask().testAndSet(true))
1042
- await this.compute(true, false);
1043
- }
1044
- else
1045
- await this.compute(true, false);
1046
- }
1047
- async compute(subForms, forceClientCompute) {
1048
- let tmpRec = null;
1049
- let computeByServer = !this.computeByClient();
1050
- let orgComputeBy = this._computeBy;
1051
- if (forceClientCompute)
1052
- this._computeBy = COMPUTE_NEWREC_ON_CLIENT;
1053
- try {
1054
- this.CurrRec.setInCompute(true);
1055
- if (!subForms) {
1056
- if (this.CurrRec.isNewRec()) {
1057
- if (this._task.getMode() !== Constants.TASK_MODE_CREATE && !super.isEmptyDataview()) {
1058
- this._task.setMode(Constants.TASK_MODE_CREATE);
1059
- }
1060
- }
1061
- else if (this._task.getMode() === Constants.TASK_MODE_CREATE) {
1062
- this._task.setMode(Constants.TASK_MODE_MODIFY);
1063
- }
1064
- }
1065
- let getRecordData = computeByServer;
1066
- if (subForms || (getRecordData && !this.CurrRec.isComputed() && !forceClientCompute)) {
1067
- let command = CommandFactory.CreateComputeEventCommand(this._task.getTaskTag(), subForms, this._currRecId);
1068
- await this._task.DataviewManager.Execute(command);
1069
- }
1070
- else {
1071
- if (getRecordData) {
1072
- tmpRec = new Record(this.CurrRec.getId(), this);
1073
- tmpRec.Initialize();
1074
- tmpRec.setInitialFldVals(true, true);
1075
- }
1076
- this._fieldsTab.setServerRcmp(false);
1077
- let from = this._fieldsTab.getRMIdx();
1078
- let size = this._fieldsTab.getRMSize();
1079
- for (let i = from; i < from + size; i = i + 1) {
1080
- let fld = this._fieldsTab.getField(i);
1081
- if (getRecordData && this._fieldsTab.serverRcmpDone() && fld.IsVirtual && !fld.VirAsReal && !fld.hasInitExp()) {
1082
- let currRec2 = this.CurrRec;
1083
- this.CurrRec = tmpRec;
1084
- try {
1085
- fld.takeValFromRec();
1086
- }
1087
- finally {
1088
- this.CurrRec = currRec2;
1089
- }
1090
- }
1091
- if (!this._task.getForm().TransferringDataToGUI)
1092
- await fld.compute(false);
1093
- }
1094
- }
1095
- }
1096
- finally {
1097
- this.CurrRec.setInCompute(false);
1098
- this.CurrRec.setLateCompute(false);
1099
- this._computeBy = orgComputeBy;
1100
- }
1101
- }
1102
- async addRecord(doSuffix, ignoreCurrRec, isCrelineAbove) {
1103
- let newCurrRecId = (--this._lastCreatedRecId);
1104
- let mode = DataModificationTypes.Insert;
1105
- return await this.addRecord_1(doSuffix, ignoreCurrRec, false, newCurrRecId, mode, isCrelineAbove);
1106
- }
1107
- async addRecord_1(doSuffix, ignoreCurrRec, isFirstRecord, newCurrRecId, mode, isCrelineAbove) {
1108
- let rec = new Record(newCurrRecId, this);
1109
- rec.Initialize();
1110
- rec.setInitialFldVals(false, !isFirstRecord);
1111
- let newCurrRecIdx = 0;
1112
- if (isCrelineAbove) {
1113
- newCurrRecIdx = (this._currRecIdx >= 0
1114
- ? this._currRecIdx
1115
- : 0);
1116
- }
1117
- else
1118
- newCurrRecIdx = (this._currRecIdx != Int32.MinValue
1119
- ? this._currRecIdx + 1
1120
- : 0);
1121
- this._recordsTab.insertRecord(rec, newCurrRecIdx);
1122
- rec.setMode(mode);
1123
- try {
1124
- let compute = !isFirstRecord;
1125
- await this.setCurrRecByIdx(newCurrRecIdx, doSuffix, ignoreCurrRec, compute, Int32.MinValue);
1126
- if (isFirstRecord && this.getTask().getMode() !== Constants.TASK_MODE_CREATE)
1127
- rec.setOldRec();
1128
- }
1129
- catch (execption) {
1130
- if (execption instanceof RecordOutOfDataViewException) {
1131
- if (AccessHelper.eventsManager.GetStopExecutionFlag())
1132
- newCurrRecIdx = -1;
1133
- else
1134
- throw new ApplicationException('in DataView.addRecord() invalid exception');
1135
- }
1136
- else
1137
- throw execption;
1138
- }
1139
- return newCurrRecIdx;
1140
- }
1141
- async removeCurrRec() {
1142
- let mgForm = this._task.getForm();
1143
- let onDelete;
1144
- if (this.CurrRec.getMode() === DataModificationTypes.Insert &&
1145
- !this.getTask().transactionFailed(ConstInterface.TRANS_RECORD_PREFIX)) {
1146
- this._modifiedRecordsTab.removeRecord(this.CurrRec);
1147
- onDelete = false;
1148
- }
1149
- else {
1150
- this.CurrRec.clearMode();
1151
- this.CurrRec.setMode(DataModificationTypes.Delete);
1152
- onDelete = true;
1153
- }
1154
- this.CurrRec.removeRecFromDc();
1155
- this._recordsTab.removeRecord(this._currRecIdx);
1156
- this.setChanged(true);
1157
- if (this.isEmpty() && !this._task.IsTryingToStop) {
1158
- await this.MoveToEmptyDataviewIfAllowed();
1159
- }
1160
- let newDisplayLine = this.calcLineToMove(onDelete);
1161
- try {
1162
- if (mgForm.isScreenMode()) {
1163
- await this.setCurrRecByIdx(newDisplayLine, false, false, true, SET_DISPLAYLINE_BY_DV);
1164
- }
1165
- else {
1166
- await mgForm.setCurrRowByDisplayLine(newDisplayLine, false, true);
1167
- }
1168
- }
1169
- catch (exception) {
1170
- if (exception instanceof RecordOutOfDataViewException) {
1171
- try {
1172
- if (!super.isEmptyDataview())
1173
- newDisplayLine = mgForm.getPrevLine(newDisplayLine);
1174
- if (mgForm.isScreenMode())
1175
- await this.setCurrRecByIdx(newDisplayLine, false, false, true, SET_DISPLAYLINE_BY_DV);
1176
- else
1177
- await mgForm.setCurrRowByDisplayLine(newDisplayLine, false, true);
1178
- }
1179
- catch (exception) {
1180
- if (exception instanceof RecordOutOfDataViewException) {
1181
- this.reset();
1182
- }
1183
- else
1184
- throw exception;
1185
- }
1186
- }
1187
- else
1188
- throw exception;
1189
- }
1190
- }
1191
- RemoveRecord(record) {
1192
- let recIdx = this._recordsTab.getRecIdx(record.getId());
1193
- if (this._topRecIdx > recIdx)
1194
- this._topRecIdx--;
1195
- if (this._oldTopRecIdx > recIdx)
1196
- this._oldTopRecIdx--;
1197
- if (this._currRecIdx > recIdx)
1198
- this._currRecIdx--;
1199
- this._recordsTab.removeRecord(record);
1200
- }
1201
- async MoveToEmptyDataviewIfAllowed() {
1202
- if (!super.isEmptyDataview() && this._task.getMode() !== Constants.TASK_MODE_CREATE) {
1203
- if (await this._task.checkProp(PropInterface.PROP_TYPE_ALLOW_EMPTY_DATAVIEW, true))
1204
- super.setEmptyDataview(true);
1205
- }
1206
- else {
1207
- if (this._task.getMode() === Constants.TASK_MODE_CREATE && super.isEmptyDataview())
1208
- super.setEmptyDataview(false);
1209
- }
1210
- }
1211
- calcLineToMove(onDelete) {
1212
- let newDisplayLine;
1213
- if (onDelete)
1214
- newDisplayLine = this._currRecIdx;
1215
- else {
1216
- if (this._currRecIdx > 0)
1217
- newDisplayLine = this._currRecIdx - 1;
1218
- else
1219
- newDisplayLine = this._currRecIdx;
1220
- }
1221
- return newDisplayLine;
1222
- }
1223
- reset() {
1224
- this._currRecId = Int32.MinValue;
1225
- this._currRecIdx = Int32.MinValue;
1226
- this.CurrRec = null;
1227
- this.setTopRecIdx(Int32.MinValue);
1228
- this.SetIncludesFirst(true);
1229
- this.SetIncludesLast(true);
1230
- }
1231
- async cancelEdit(onlyReal, recomputeUnknowns) {
1232
- let tempCurrRec = null;
1233
- let recRemoved = false;
1234
- let inEndTask = this._task.InEndTask;
1235
- if (inEndTask)
1236
- onlyReal = true;
1237
- if (this.CurrRec.getMode() === DataModificationTypes.Insert && this.CurrRec.isNewRec()) {
1238
- if ((this._includesFirst && this._includesLast && (this._recordsTab === null || this._recordsTab.getSize() === 1)) || !this.HasMainTable) {
1239
- if (this._original !== null) {
1240
- this.CurrRec.setSameAs(this._original, onlyReal);
1241
- }
1242
- }
1243
- else {
1244
- await this.removeCurrRec();
1245
- recRemoved = true;
1246
- this._original = this.CurrRec.replicate();
1247
- }
1248
- }
1249
- else {
1250
- if (!this.CurrRec.Modified) {
1251
- let currCtrl = this._task.getLastParkedCtrl();
1252
- if (currCtrl !== null)
1253
- currCtrl.resetPrevVal();
1254
- }
1255
- if (recomputeUnknowns)
1256
- tempCurrRec = this.CurrRec.replicate();
1257
- if (this._original !== null)
1258
- this.CurrRec.setSameAs(this._original, onlyReal);
1259
- if ((this._original !== null && recomputeUnknowns) && !this.CurrRec.isSameRecData(tempCurrRec, false, false))
1260
- await this.execUnknownRcmps(this._original);
1261
- this.takeFldValsFromCurrRec();
1262
- this._original = this.CurrRec.replicate();
1263
- }
1264
- return recRemoved;
1265
- }
1266
- isEmpty() {
1267
- return this._includesFirst && this._includesLast && (this._recordsTab === null || this._recordsTab.getSize() === 0);
1268
- }
1269
- async addCurrToModified(setRecToOld) {
1270
- if (isNullOrUndefined(setRecToOld)) {
1271
- await this.addCurrToModified_0();
1272
- return;
1273
- }
1274
- await this.addCurrToModified_1(setRecToOld);
1275
- }
1276
- async addCurrToModified_0() {
1277
- await this.addCurrToModified(true);
1278
- }
1279
- async addCurrToModified_1(setRecToOld) {
1280
- this._modifiedRecordsTab.addRecord(this.CurrRec);
1281
- if (setRecToOld) {
1282
- this.CurrRec.setOldRec();
1283
- }
1284
- let command = CommandFactory.CreateSetTransactionStateDataviewCommand(this.getTask().getTaskTag(), true);
1285
- await this.getTask().DataviewManager.RemoteDataviewManager.Execute(command);
1286
- }
1287
- takeFldValsFromCurrRec() {
1288
- this._fieldsTab.takeValsFromRec();
1289
- }
1290
- currEqualsPrev(fldList) {
1291
- if (this.CurrRec !== null && this._prevCurrRec !== null) {
1292
- if (this.CurrRec === this._prevCurrRec)
1293
- return true;
1294
- for (let i = 0; i < fldList.length; i = i + 1) {
1295
- if (!this.CurrRec.fldValsEqual(this._prevCurrRec, fldList[i]))
1296
- return false;
1297
- }
1298
- }
1299
- else if (this.CurrRec !== this._prevCurrRec)
1300
- return false;
1301
- return true;
1302
- }
1303
- getTask() {
1304
- Debug.Assert(this._task instanceof TaskBase);
1305
- return this._task;
1306
- }
1307
- getForm() {
1308
- return this._task.getForm();
1309
- }
1310
- modifiedRecordsNumber() {
1311
- return this._modifiedRecordsTab.getSize();
1312
- }
1313
- getSize() {
1314
- return this._recordsTab.getSize();
1315
- }
1316
- computeByClient() {
1317
- return this._computeBy === COMPUTE_NEWREC_ON_CLIENT;
1318
- }
1319
- recExistsById(id) {
1320
- return this._recordsTab.getRecord(id) !== null;
1321
- }
1322
- ParametersExist(iPos, iLen) {
1323
- if (arguments.length === 2)
1324
- return this.ParametersExist_0(iPos, iLen);
1325
- return this.ParametersExist_1();
1326
- }
1327
- ParametersExist_0(iPos, iLen) {
1328
- for (let i = iPos; i < iPos + iLen; i = i + 1) {
1329
- if (super.getField(i).isParam())
1330
- return true;
1331
- }
1332
- return false;
1333
- }
1334
- ParametersExist_1() {
1335
- return this.ParametersExist(this._rmIdx, this._rmSize);
1336
- }
1337
- recInModifiedTab(id) {
1338
- let record = this._modifiedRecordsTab.getRecord(id);
1339
- return record !== null;
1340
- }
1341
- setPrevCurrRec(rec) {
1342
- if (arguments.length === 0) {
1343
- this.setPrevCurrRec_0();
1344
- return;
1345
- }
1346
- this.setPrevCurrRec_1(rec);
1347
- }
1348
- setPrevCurrRec_0() {
1349
- this._prevCurrRec = this.CurrRec;
1350
- }
1351
- setPrevCurrRec_1(rec) {
1352
- this._prevCurrRec = rec;
1353
- }
1354
- isPrevCurrRecNull() {
1355
- return this._prevCurrRec === null;
1356
- }
1357
- async execUnknownRcmps(orgRec) {
1358
- let i;
1359
- let from = this._fieldsTab.getRMIdx();
1360
- let size = this._fieldsTab.getRMSize();
1361
- let rec = this.getCurrRec();
1362
- if (this._unknownRcmp === UNKNOWN_RCMPS_NOT_INITED) {
1363
- for (i = from; i < from + size && this._unknownRcmp === UNKNOWN_RCMPS_NOT_INITED; i++) {
1364
- let field = this._fieldsTab.getField(i);
1365
- if (field.IsVirtual && !field.hasInitExp() && field.isServerRcmp())
1366
- this._unknownRcmp = UNKNOWN_RCMPS_FOUND;
1367
- }
1368
- }
1369
- if (this._unknownRcmp === UNKNOWN_RCMPS_FOUND && rec !== null) {
1370
- for (i = from; i < from + size; i = i + 1) {
1371
- let field = this._fieldsTab.getField(i);
1372
- if (field.IsVirtual && !field.hasInitExp() && field.isServerRcmp() && !rec.fldValsEqual(orgRec, i)) {
1373
- let fieldValue = rec.GetFieldValue(i);
1374
- let isNullFld = rec.IsNull(i);
1375
- rec.setFieldValue(i, orgRec.GetFieldValue(i), false);
1376
- await field.setValueAndStartRecompute(fieldValue, isNullFld, false, false, false);
1377
- }
1378
- }
1379
- }
1380
- }
1381
- setTransCleared() {
1382
- this._transCleared = true;
1383
- }
1384
- async processRecovery() {
1385
- if (!this._task.isAborting()) {
1386
- let orgAction = this._pendingRecovery;
1387
- let orgStopExecution = AccessHelper.eventsManager.GetStopExecutionFlag();
1388
- this._pendingRecovery = RECOVERY_ACT_NONE;
1389
- if (orgStopExecution)
1390
- AccessHelper.eventsManager.setStopExecution(false);
1391
- let temporaryResetInCtrlPrefix = this._task.InCtrlPrefix;
1392
- if (temporaryResetInCtrlPrefix)
1393
- this._task.InCtrlPrefix = false;
1394
- switch (orgAction) {
1395
- case RECOVERY_ACT_CANCEL:
1396
- (this._task.DataView.getCurrRec()).resetUpdated();
1397
- this.getTask().getTaskCache().clearCache();
1398
- if (this.getSize() === 1 && this._task.getMode() === Constants.TASK_MODE_CREATE) {
1399
- this.CurrRec.resetModified();
1400
- this.CurrRec.clearMode();
1401
- this.CurrRec.setMode(DataModificationTypes.Insert);
1402
- this.CurrRec.setNewRec();
1403
- this._original.setSameAs(this.CurrRec, false);
1404
- }
1405
- await AccessHelper.eventsManager.handleInternalEventWithTaskAndEventSubtype(this.getTask(), InternalInterface.MG_ACT_CANCEL, EventSubType.CancelWithNoRollback);
1406
- break;
1407
- case RECOVERY_ACT_MOVE_DIRECTION_BEGIN:
1408
- let lastParkedControl = this._task.getLastParkedCtrl();
1409
- if (lastParkedControl !== null)
1410
- await lastParkedControl.invoke();
1411
- break;
1412
- case RECOVERY_ACT_BEGIN_SCREEN:
1413
- this.getTask().setPreventRecordSuffix(true);
1414
- await AccessHelper.eventsManager.handleInternalEventWithTask(this._task, InternalInterface.MG_ACT_TBL_BEGPAGE);
1415
- this.getTask().setPreventRecordSuffix(false);
1416
- break;
1417
- case RECOVERY_ACT_BEGIN_TABLE:
1418
- this._task.ActionManager.enable(InternalInterface.MG_ACT_TBL_BEGTBL, true);
1419
- await AccessHelper.eventsManager.handleInternalEventWithTask(this._task, InternalInterface.MG_ACT_TBL_BEGTBL);
1420
- this.getTask().getTaskCache().clearCache();
1421
- break;
1422
- default:
1423
- AccessHelper.eventsManager.setStopExecution(orgStopExecution);
1424
- break;
1425
- }
1426
- if (temporaryResetInCtrlPrefix)
1427
- this._task.InCtrlPrefix = true;
1428
- if (orgAction !== RECOVERY_ACT_NONE)
1429
- AccessHelper.eventsManager.setStopExecution(true, orgAction !== RECOVERY_ACT_BEGIN_TABLE ? ClearEventsOnStopExecution.ALL : ClearEventsOnStopExecution.SERVER);
1430
- }
1431
- }
1432
- replicate() {
1433
- let rep = new DataView(this);
1434
- rep._recordsTab = this._recordsTab.replicate();
1435
- rep._currRecId = rep._recordsTab.getRecByIdx(0).getId();
1436
- rep._currRecIdx = 0;
1437
- rep.CurrRec = rep._recordsTab.getRecByIdx(0);
1438
- rep._prevCurrRec = rep._recordsTab.getRecByIdx(0);
1439
- rep._original = rep._recordsTab.getRecByIdx(0);
1440
- rep.setTopRecIdx(Int32.MinValue);
1441
- return rep;
1442
- }
1443
- getDvPosValue() {
1444
- return this._dvPosValue;
1445
- }
1446
- getFirstDv() {
1447
- return this._firstDv;
1448
- }
1449
- ResetFirstDv() {
1450
- this._firstDv = false;
1451
- }
1452
- getCacheLRU() {
1453
- return this._cacheLruTimeStamp;
1454
- }
1455
- setCacheLRU() {
1456
- this._cacheLruTimeStamp = Misc.getSystemMilliseconds();
1457
- }
1458
- async setSameAs(newDv) {
1459
- this._rmSize = newDv._rmSize;
1460
- this._rmIdx = newDv._rmIdx;
1461
- this._computeBy = newDv._computeBy;
1462
- this._flushUpdates = newDv._flushUpdates;
1463
- this._currRecId = newDv._currRecId;
1464
- this._currRecIdx = newDv._currRecIdx;
1465
- this._topRecId = newDv._topRecId;
1466
- this.CurrRec = newDv.CurrRec;
1467
- this._original = newDv._original;
1468
- this._prevCurrRec = null;
1469
- this._fieldsTab = newDv._fieldsTab;
1470
- this._recordsTab = newDv._recordsTab;
1471
- this._modifiedRecordsTab = newDv._modifiedRecordsTab;
1472
- this._includesFirst = newDv._includesFirst;
1473
- this._includesLast = newDv._includesLast;
1474
- this._insertAt = newDv._insertAt;
1475
- this._lastCreatedRecId = newDv._lastCreatedRecId;
1476
- this._task = newDv._task;
1477
- this._dcValsCollection = newDv._dcValsCollection;
1478
- this._recovery = newDv._recovery;
1479
- this._pendingRecovery = newDv._pendingRecovery;
1480
- this._hasMainTable = newDv._hasMainTable;
1481
- this._chunkSize = newDv._chunkSize;
1482
- this._firstDv = newDv._firstDv;
1483
- this._lastSessionCounter = newDv._lastSessionCounter;
1484
- this._skipParsing = newDv._skipParsing;
1485
- this._unknownRcmp = newDv._unknownRcmp;
1486
- this._transCleared = newDv._transCleared;
1487
- this._dvPosValue = newDv._dvPosValue;
1488
- this._cacheLruTimeStamp = newDv._cacheLruTimeStamp;
1489
- this._changed = newDv._changed;
1490
- this._locateFirstRec = newDv._locateFirstRec;
1491
- super.setEmptyDataview(newDv.isEmptyDataview());
1492
- this._task.setMode(newDv.taskModeFromCache);
1493
- try {
1494
- if (this.getTask().HasLoacte()) {
1495
- await this.setCurrRec(this._locateFirstRec, true);
1496
- this.setTopRecIdx(this._recordsTab.getRecIdx(this._locateFirstRec));
1497
- }
1498
- else {
1499
- this.getTask().setPreventRecordSuffix(true);
1500
- await this.setCurrRecByIdx(Int32.MinValue, true, false, true, Int32.MinValue);
1501
- this.getTask().setPreventRecordSuffix(false);
1502
- this.setTopRecIdx(0);
1503
- }
1504
- if (!this._task.getForm().isScreenMode()) {
1505
- if (this._task.getForm().isTableWithPagination()) {
1506
- this.TotalRecordsCount = newDv.TotalRecordsCount;
1507
- this.RecordsBeforeCurrentView = newDv.RecordsBeforeCurrentView;
1508
- }
1509
- await this.setCurrRecByIdx(this._topRecIdx, true, false, true, Int32.MinValue);
1510
- }
1511
- if (this._task.getForm() !== null)
1512
- this._task.getForm().updateDisplayLineByDV();
1513
- }
1514
- catch (ex) {
1515
- if (ex instanceof RecordOutOfDataViewException) {
1516
- Logger.Instance.WriteDevToLog('wrong top record idx in DataView.setSameAs' + ex.Message);
1517
- }
1518
- else
1519
- throw ex;
1520
- }
1521
- }
1522
- setChanged(val) {
1523
- this._changed = val;
1524
- }
1525
- getChanged() {
1526
- return this._changed;
1527
- }
1528
- getLocateFirstRec() {
1529
- return this._locateFirstRec;
1530
- }
1531
- setLocateFirstRec(newFirst) {
1532
- this._locateFirstRec = newFirst;
1533
- }
1534
- getRecByIdx(idx) {
1535
- return this._recordsTab.getRecByIdx(idx);
1536
- }
1537
- getServerCurrRec() {
1538
- return this._recordsTab.getServerCurrRec();
1539
- }
1540
- zeroServerCurrRec() {
1541
- this._recordsTab.zeroServerCurrRec();
1542
- }
1543
- inRollback() {
1544
- let inRollback = false;
1545
- if (this._recovery === ConstInterface.RECOVERY_ROLLBACK && this.getTask().isTransactionOwner()) {
1546
- inRollback = true;
1547
- }
1548
- return inRollback;
1549
- }
1550
- getRecIdx(id) {
1551
- return this._recordsTab.getRecIdx(id);
1552
- }
1553
- backupCurrent() {
1554
- return this.CurrRec.replicate();
1555
- }
1556
- restoreCurrent(recBackup) {
1557
- Debug.Assert(recBackup !== null);
1558
- this._currRecId = recBackup.getId();
1559
- this._currRecIdx = this._recordsTab.getRecIdx(this._currRecId);
1560
- this.CurrRec = this._recordsTab.getRecByIdx(this._currRecIdx);
1561
- this.CurrRec.setSameAs(recBackup, false);
1562
- this.takeFldValsFromCurrRec();
1563
- }
1564
- GetCurrentRecId() {
1565
- return this._currRecId;
1566
- }
1567
- DataviewBoundriesAreChanged(orgIncludesFirst, orgIncludesLast) {
1568
- return orgIncludesFirst !== this.IncludesFirst() || orgIncludesLast !== this.IncludesLast();
1569
- }
1570
- GetRouteParams() {
1571
- let params = new List();
1572
- for (let i = 0; i < this._fieldsTab.getSize(); i++) {
1573
- let field = this._fieldsTab.getField(i);
1574
- let val;
1575
- if (field.IsExposedRouteParam && !field.isNull()) {
1576
- switch (field.getType()) {
1577
- case StorageAttribute.ALPHA:
1578
- case StorageAttribute.UNICODE:
1579
- {
1580
- val = field.getDispValue();
1581
- if (field.isNull())
1582
- val = field.getNullDisplay();
1583
- val = val.trim();
1584
- params.push(val.length === 0 ? ' ' : val);
1585
- }
1586
- break;
1587
- case StorageAttribute.BOOLEAN:
1588
- {
1589
- if (field.isNull())
1590
- params.push(false);
1591
- else
1592
- params.push((field.getDispValue()).charAt(0) === '1');
1593
- }
1594
- break;
1595
- case StorageAttribute.NUMERIC: {
1596
- val = field.getDispValue();
1597
- if (field.isNull())
1598
- val = field.getNullDisplay();
1599
- let pic = new PIC(field.getPicture(), field.getType(), this.getTask().getCompIdx());
1600
- val = DisplayConvertor.Instance.mg2disp(val, '', pic, true, 0, false);
1601
- params.push(val);
1602
- break;
1603
- }
1604
- }
1605
- }
1606
- }
1607
- return (params.length > 0) ? params : null;
1608
- }
1609
- }
1610
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiRGF0YVZpZXcuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi9wcm9qZWN0cy9lbmdpbmUvc3JjL2RhdGEvRGF0YVZpZXcudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUNMLG9CQUFvQixFQUNwQixLQUFLLEVBQ0wsS0FBSyxFQUNMLEtBQUssRUFDTCxpQkFBaUIsRUFDakIsSUFBSSxFQUNKLE9BQU8sRUFFUixNQUFNLHNCQUFzQixDQUFDO0FBQzlCLE9BQU8sRUFDTCxTQUFTLEVBQ1QsaUJBQWlCLEVBQ2pCLE1BQU0sRUFDTixJQUFJLEVBQ0osZ0JBQWdCLEVBQ2hCLFlBQVksRUFDWixTQUFTLEVBQ1YsTUFBTSxrQkFBa0IsQ0FBQztBQUMxQixPQUFPLEVBQ0wscUJBQXFCLEVBRXJCLGdCQUFnQixFQUloQixHQUFHLEVBRUgsYUFBYSxFQUNkLE1BQU0sZ0JBQWdCLENBQUM7QUFDeEIsT0FBTyxFQUFFLGNBQWMsRUFBRSxNQUFNLG1CQUFtQixDQUFDO0FBQ25ELE9BQU8sRUFBRSxZQUFZLEVBQUUsTUFBTSxnQkFBZ0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mFjZS5NR19BVFRSX1JNUE9TOiB7XHJcbiAgICAgICAgICAgIGxldCBpOiBudW1iZXIgPSB2YWx1ZVN0ci5pbmRleE9mKCcsJyk7XHJcblxyXG4gICAgICAgICAgICBpZiAoaSA+IC0xKSB7XHJcbiAgICAgICAgICAgICAgdGhpcy5fcm1TaXplID0gTk51bWJlci5QYXJzZSh2YWx1ZVN0ci5zdWJzdHIoMCwgaSkpO1xyXG4gICAgICAgICAgICAgIHRoaXMuX3JtSWR4ID0gTk51bWJlci5QYXJzZSh2YWx1ZVN0ci5zdWJzdHIoaSArIDEpKTtcclxuICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICBicmVhaztcclxuICAgICAgICAgIH1cclxuICAgICAgICAgIGNhc2UgQ29uc3RJbnRlcmZhY2UuTUdfQVRUUl9DT01QVVRFX0JZOlxyXG4gICAgICAgICAgICB0aGlzLl9jb21wdXRlQnkgPSB2YWx1ZVN0clswXTtcclxuXHJcbiAgICAgICAgICAgIGlmICh0aGlzLl9jb21wdXRlQnkgPT09IENPTVBVVEVfRkxVU0hfVVBEQVRFUykge1xyXG4gICAgICAgICAgICAgIHRoaXMuX2NvbXB1dGVCeSA9IENPTVBVVEVfTkVXUkVDX09OX1NFUlZFUjtcclxuICAgICAgICAgICAgICB0aGlzLl9mbHVzaFVwZGF0ZXMgPSB0cnVlO1xyXG4gICAgICAgICAgICB9IGVsc2VcclxuICAgICAgICAgICAgICB0aGlzLl9mbHVzaFVwZGF0ZXMgPSBmYWxzZTtcclxuXHJcbiAgICAgICAgICAgIGJyZWFrO1xyXG4gICAgICAgICAgY2FzZSBDb25zdEludGVyZmFjZS5NR19BVFRSX0hBU19NQUlOX1RCTDpcclxuICAgICAgICAgICAgdGhpcy5faGFzTWFpblRhYmxlID0gWG1sUGFyc2VyLmdldEJvb2xlYW4odmFsdWVTdHIpO1xyXG4gICAgICAgICAgICBicmVhaztcclxuICAgICAgICAgIGNhc2UgQ29uc3RJbnRlcmZhY2UuTUdfQVRUU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mllbGQuTEVBVkVfRkxBR1MpO1xyXG4gICAgICAgICAgICB0aGlzLnNldFRvcFJlY0lkeCgwKTtcclxuXHJcbiAgICAgICAgICAgIGlmICh0aGlzLl90YXNrLmdldEZvcm0oKSAhPSBudWxsKVxyXG4gICAgICAgICAgICAgICg8TWdGb3JtPnRoaXMuX3Rhc2suZ2V0Rm9ybSgpKS5TZXRUYWJsZVRvcEluZGV4KCk7XHJcblxyXG4gICAgICAgICAgICB0cnkge1xyXG4gICAgICAgICAgICAgIGF3YWl0IHRoaXMuc2V0Q3VyclJlY0J5SWR4KDAsIGZhbHNlLCB0cnVlLCB0cnVlLCAwKTtcclxuICAgICAgICAgICAgICBpZiAodGhpcy5fdGFzay5nZXRGb3JtKCkgIT0gbnVsbClcclxuICAgICAgICAgICAgICAvLyB0byB1cGRhdGUgdHJlZSB3ZSBuZWVkIHRvIGxvYWQgbm9kZXMgZmlyc3RcclxuICAgICAgICAgICAgICAgICg8TWdGb3JtPih0aGlzLl90YXNrLmdldEZvcm0oKSkpLnVwZGF0ZURpc3BsYXlMaW5lQnlEVigpO1xyXG4gICAgICAgICAgICB9XHJcbiAgICAgICAgICAgIGNhdGNoIChleGNlcHRpb24pIHtcclxuICAgICAgICAgICAgICBpZiAoZXhjZXB0aW9uIGluc3RhbmNlb2YgUmVjb3JkT3V0T2ZEYXRhVmlld0V4Y2VwdGlvbikge1xyXG4gICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICBlbHNlXHJcbiAgICAgICAgICAgICAgICB0aHJvdyBleGNlcHRpb247XHJcbiAgICAgICAgICAgIH1cclxuXHJcbiAgICAgICAgICAgIGlmICh0aGlzLl90YXNrLmdldExldmVsKCkgPT09IENvbnN0YW50cy5UQVNLX0xFVkVMX0NPTlRST0wgJiYgdGhpcy5fdGFzay5nZXRMYXN0UGFya2VkQ3RybCgpICE9IG51bGwpXHJcbiAgICAgICAgICAgICAgdGhpcy5fdGFzay5nZXRMYXN0UGFya2VkQ3RybCgpLnJlc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ICAgICAgICAgICAgdGhpcy5faW5zZXJ0QXQgPSB2YWx1ZVN0clswXTtcclxuICAgICAgICAgICAgYnJlYWs7XHJcbiAgICAgICAgICBjYXNlIENvbnN0SW50ZXJmYWNlLk1HX0FUVFJfSU5DTFVERV9GSVJTVDpcclxuICAgICAgICAgICAgYm9vbFZhbCA9IFhtbFBhcnNlci5nZXRCb29sZWFuKHZhbHVlU3RyKTtcclxuICAgICAgICAgICAgdGhpcy5TZXRJbmNsdWRlc0ZpcnN0KGJvb2xWYWwpO1xyXG4gICAgICAgICAgICBicmVhaztcclxuICAgICAgICAgIGNhc2UgQ29uc3RJbnRlcmZhY2UuTUdfQVRUUl9JTkNMVURFX0xBU1Q6XHJcbiAgICAgICAgICAgIGJvb2xWYWwgPSBYbWxQYXJzZXIuZ2V0Qm9vbGVhbih2YWx1ZVN0cik7XHJcbiAgICAgICAgICAgIHRoaXMuU2V0SW5jbHVkZXNMYXN0KGJvb2xWYWwpO1xyXG4gICAgICAgICAgICBicmVhaztcclxuICAgICAgICAgIGNhc2UgQ29uc3RJbnRlcmZhY2UuTUdfQVRUUl9JU19PTkVXQVlfS0VZOlxyXG4gICAgICAgICAgICBib29sVmFsID0gWG1sUGFyc2VyLmdldEJvb2xlYW4odmFsdWVTdHIpO1xyXG4gICAgICAgICAgICB0aGlzLlNldE9uZVdheUtleShib29sVmFsKTtcclxuICAgICAgICAgICAgYnJlYWs7XHJcbiAgICAgICAgICBjYXNlIENvbnN0SW50ZXJmYWNlLk1HX0FUVFJfREJWSUVXU0laRTpcclxuICAgICAgICAgICAgdGhpcy5EQlZpZXdTaXplID0gWG1sUGFyc2VyLmdldEludCh2YWx1ZVN0cik7XHJcbiAgICAgICAgICAgIGJyZWFrO1xyXG4gICAgICAgICAgY2FzZSBDb25zdEludGVyZmFjZS5NR19BVFRSX0lOVkFMSURBVEU6IHtcclxuXHJcbiAgICAgICAgICB9XHJcbiAgICAgICAgICAgIGJyZWFrO1xyXG4gICAgICAgICAgY2FzZ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B2YWw6IGFueTtcclxuICAgICAgaWYgKGZpZWxkLklzRXhwb3NlZFJvdXRlUGFyYW0gJiYgIWZpZWxkLmlzTnVsbCgpKSB7XHJcbiAgICAgICAgc3dpdGNoIChmaWVsZC5nZXRUeXBlKCkpXHJcbiAgICAgICAge1xyXG4gICAgICAgICAgY2FzZSBTdG9yYWdlQXR0cmlidXRlLkFMUEhBOlxyXG4gICAgICAgICAgY2FzZSBTdG9yYWdlQXR0cmlidXRlLlVOSUNPREU6IHtcclxuICAgICAgICAgICAgdmFsID0gZmllbGQuZ2V0RGlzcFZhbHVlKCk7XHJcbiAgICAgICAgICAgIGlmIChmaWVsZC5pc051bGwoKSlcclxuICAgICAgICAgICAgICB2YWwgPSBmaWVsZC5nZXROdWxsRGlzcGxheSgpO1xyXG4gICAgICAgICAgICB2YWwgPSB2YWwudHJpbSgpO1xyXG4gICAgICAgICAgICBwYXJhbXMucHVzaCgoPHN0cmluZz52YWwpLmxlbmd0aCA9PT0gMCA/ICcgJyA6IHZhbCk7XHJcbiAgICAgICAgICB9XHJcbiAgICAgICAgICBicmVhaztcclxuXHJcbiAgICAgICAgICBjYXNlIFN0b3JhZ2VBdHRyaWJ1dGUuQk9PTEVBTjoge1xyXG4gICAgICAgICAgICBpZiAoZmllbGQuaXNOdWxsKCkpXHJcbiAgICAgICAgICAgICAgcGFyYW1zLnB1c2goZmFsc2UpO1xyXG4gICAgICAgICAgICBlbHNlXHJcbiAgICAgICAgICAgICAgcGFyYW1zLnB1c2goKGZpZWxkLmdldERpc3BWYWx1ZSgpKS5jaGFyQXQoMCkgPT09ICcxJyk7XHJcbiAgICAgICAgICB9XHJcbiAgICAgICAgICAgIGJyZWFrO1xyXG5cclxuICAgICAgICAgIGNhc2UgU3RvcmFnZUF0dHJpYnV0ZS5OVU1FUklDOiB7XHJcbiAgICAgICAgICAgIHZhbCA9IGZpZWxkLmdldERpc3BWYWx1ZSgpO1xyXG4gICAgICAgICAgICBpZiAoZmllbGQuaXNOdWxsKCkpXHJcbiAgICAgICAgICAgICAgdmFsID0gZmllbGQuZ2V0TnVsbERpc3BsYXkoKTtcclxuICAgICAgICAgICAgbGV0IHBpYzogUElDID0gbmV3IFBJQyhmaWVsZC5nZXRQaWN0dXJlKCksIGZpZWxkLmdldFR5cGUoKSwgdGhpcy5nZXRUYXNrKCkuZ2V0Q29tcElkeCgpKTtcclxuICAgICAgICAgICAgdmFsID0gRGlzcGxheUNvbnZlcnRvci5JbnN0YW5jZS5tZzJkaXNwKHZhbCwgJycsIHBpYywgdHJ1ZSwgMCwgZmFsc2UpO1xyXG4gICAgICAgICAgICBwYXJhbXMucHVzaCh2YWwpO1xyXG4gICAgICAgICAgICBicmVhaztcclxuICAgICAgICAgIH1cclxuICAgICAgICB9XHJcbiAgICAgIH1cclxuICAgIH1cclxuICAgIHJldHVybiAocGFyYW1zLmxlbmd0aCA+IDApID8gcGFyYW1zIDogbnVsbDtcclxuICB9XHJcbn1cclxuIl19