@magic-xpa/engine 4.1100.0-dev4110.25 → 4.1100.0-dev4110.252

Sign up to get free protection for your applications and to get access to all the features.
Files changed (521) hide show
  1. package/{esm2020 → esm2022}/index.mjs +188 -188
  2. package/{esm2020 → esm2022}/magic-xpa-engine.mjs +1 -1
  3. package/esm2022/src/AccessHelper.mjs +15 -0
  4. package/esm2022/src/ClientManager.mjs +416 -0
  5. package/esm2022/src/CommandsProcessorBase.mjs +56 -0
  6. package/esm2022/src/CommandsProcessorManager.mjs +26 -0
  7. package/esm2022/src/CommandsTable.mjs +162 -0
  8. package/esm2022/src/ConstInterface.mjs +517 -0
  9. package/{esm2020 → esm2022}/src/CurrentClientVersion.mjs +2 -2
  10. package/esm2022/src/FlowMonitorInterface.mjs +16 -0
  11. package/esm2022/src/GUIManager.mjs +62 -0
  12. package/esm2022/src/GlobalCommandsManager.mjs +34 -0
  13. package/esm2022/src/GuiEventsProcessor.mjs +156 -0
  14. package/{esm2020 → esm2022}/src/ICommandsTable.mjs +1 -1
  15. package/esm2022/src/ServerConfig.mjs +122 -0
  16. package/{esm2020 → esm2022}/src/bridge/IGuiEvent.mjs +19 -19
  17. package/esm2022/src/bridge/MagicBridge.mjs +41 -0
  18. package/esm2022/src/commands/ClientOriginatedCommandTaskTag.mjs +12 -0
  19. package/{esm2020 → esm2022}/src/commands/ClientToServer/AddUserLocateDataViewCommand.mjs +8 -8
  20. package/{esm2020 → esm2022}/src/commands/ClientToServer/AddUserRangeDataviewCommand.mjs +9 -9
  21. package/{esm2020 → esm2022}/src/commands/ClientToServer/AddUserSortDataViewCommand.mjs +9 -9
  22. package/esm2022/src/commands/ClientToServer/BrowserEscEventCommand.mjs +26 -0
  23. package/{esm2020 → esm2022}/src/commands/ClientToServer/ClientOriginatedCommand.mjs +14 -14
  24. package/esm2022/src/commands/ClientToServer/ClientOriginatedCommandSerializer.mjs +60 -0
  25. package/esm2022/src/commands/ClientToServer/ColumnSortEventCommand.mjs +29 -0
  26. package/esm2022/src/commands/ClientToServer/CommandFactory.mjs +261 -0
  27. package/esm2022/src/commands/ClientToServer/CommandSerializationHelper.mjs +67 -0
  28. package/esm2022/src/commands/ClientToServer/ComputeEventCommand.mjs +26 -0
  29. package/{esm2020 → esm2022}/src/commands/ClientToServer/ContextTerminationEventCommand.mjs +24 -21
  30. package/{esm2020 → esm2022}/src/commands/ClientToServer/ContextTimeoutResetCommand.mjs +23 -20
  31. package/{esm2020 → esm2022}/src/commands/ClientToServer/ControlItemsRefreshCommand.mjs +8 -8
  32. package/esm2022/src/commands/ClientToServer/DataViewOutputCommand.mjs +13 -0
  33. package/{esm2020 → esm2022}/src/commands/ClientToServer/DataviewCommand.mjs +44 -44
  34. package/esm2022/src/commands/ClientToServer/EvaluateCommand.mjs +40 -0
  35. package/{esm2020 → esm2022}/src/commands/ClientToServer/EventCommand.mjs +43 -40
  36. package/esm2022/src/commands/ClientToServer/ExecOperCommand.mjs +70 -0
  37. package/esm2022/src/commands/ClientToServer/FetchDataControlValuesEventCommand.mjs +25 -0
  38. package/{esm2020 → esm2022}/src/commands/ClientToServer/GlobalParamsQueryCommand.mjs +10 -10
  39. package/{esm2020 → esm2022}/src/commands/ClientToServer/ICommandTaskTag.mjs +1 -1
  40. package/esm2022/src/commands/ClientToServer/IndexChangeEventCommand.mjs +24 -0
  41. package/esm2022/src/commands/ClientToServer/IniputForceWriteCommand.mjs +26 -0
  42. package/{esm2020 → esm2022}/src/commands/ClientToServer/NonReversibleExitEventCommand.mjs +26 -23
  43. package/{esm2020 → esm2022}/src/commands/ClientToServer/QueryCommand.mjs +20 -20
  44. package/esm2022/src/commands/ClientToServer/RecomputeCommand.mjs +30 -0
  45. package/esm2022/src/commands/ClientToServer/RefreshEventCommand.mjs +30 -0
  46. package/esm2022/src/commands/ClientToServer/RefreshScreenEventCommand.mjs +27 -0
  47. package/esm2022/src/commands/ClientToServer/RollbackEventCommand.mjs +43 -0
  48. package/esm2022/src/commands/ClientToServer/SelectProgramCommand.mjs +19 -0
  49. package/{esm2020 → esm2022}/src/commands/ClientToServer/SetTransactionStateDataviewCommand.mjs +9 -9
  50. package/esm2022/src/commands/ClientToServer/SubformOpenEventCommand.mjs +24 -0
  51. package/esm2022/src/commands/ClientToServer/SubformRefreshEventCommand.mjs +27 -0
  52. package/esm2022/src/commands/ClientToServer/TransactionCommand.mjs +34 -0
  53. package/{esm2020 → esm2022}/src/commands/ClientToServer/UnloadCommand.mjs +18 -15
  54. package/esm2022/src/commands/ClientToServer/WriteMessageToServerLogCommand.mjs +18 -0
  55. package/esm2022/src/commands/DataViewCommandBase.mjs +8 -0
  56. package/{esm2020 → esm2022}/src/commands/IClientCommand.mjs +1 -1
  57. package/esm2022/src/commands/IClientTargetedCommand.mjs +13 -0
  58. package/{esm2020 → esm2022}/src/commands/IClientToServerCommandInfo.mjs +2 -2
  59. package/esm2022/src/commands/ServerToClient/AbortCommand.mjs +65 -0
  60. package/{esm2020 → esm2022}/src/commands/ServerToClient/AddLocateCommand.mjs +21 -21
  61. package/esm2022/src/commands/ServerToClient/AddRangeCommand.mjs +62 -0
  62. package/esm2022/src/commands/ServerToClient/AddSortCommand.mjs +33 -0
  63. package/esm2022/src/commands/ServerToClient/ClientRefreshCommand.mjs +25 -0
  64. package/esm2022/src/commands/ServerToClient/ClientTargetedCommandBase.mjs +24 -0
  65. package/esm2022/src/commands/ServerToClient/EnhancedVerifyCommand.mjs +45 -0
  66. package/esm2022/src/commands/ServerToClient/OpenURLCommand.mjs +221 -0
  67. package/{esm2020 → esm2022}/src/commands/ServerToClient/ResetLocateCommand.mjs +14 -14
  68. package/{esm2020 → esm2022}/src/commands/ServerToClient/ResetRangeCommand.mjs +14 -14
  69. package/{esm2020 → esm2022}/src/commands/ServerToClient/ResetSortCommand.mjs +14 -14
  70. package/esm2022/src/commands/ServerToClient/ResultCommand.mjs +37 -0
  71. package/esm2022/src/commands/ServerToClient/VerifyCommand.mjs +83 -0
  72. package/esm2022/src/commands/ServerToClient/XMLBasedCommandBuilder.mjs +132 -0
  73. package/{esm2020 → esm2022}/src/communications/IConnectionStateManager.mjs +1 -1
  74. package/esm2022/src/communications/InteractiveCommunicationsFailureHandler.mjs +15 -0
  75. package/{esm2020 → esm2022}/src/data/DataSourceIdKey.mjs +2 -2
  76. package/esm2022/src/data/DataView.mjs +1613 -0
  77. package/{esm2020 → esm2022}/src/data/DataViewBase.mjs +3 -3
  78. package/esm2022/src/data/DataviewManager.mjs +28 -0
  79. package/esm2022/src/data/DataviewManagerBase.mjs +15 -0
  80. package/esm2022/src/data/DvCache.mjs +67 -0
  81. package/esm2022/src/data/Field.mjs +646 -0
  82. package/esm2022/src/data/FieldBase.mjs +15 -0
  83. package/esm2022/src/data/FieldsTable.mjs +103 -0
  84. package/{esm2020 → esm2022}/src/data/IRecordsTable.mjs +1 -1
  85. package/esm2022/src/data/Key.mjs +88 -0
  86. package/esm2022/src/data/Record.mjs +880 -0
  87. package/{esm2020 → esm2022}/src/data/RecordOutOfDataViewException.mjs +15 -15
  88. package/esm2022/src/data/RecordsTable.mjs +267 -0
  89. package/esm2022/src/data/TaskTransactionManager.mjs +107 -0
  90. package/esm2022/src/data/XMLBasedDcValuesBuilder.mjs +74 -0
  91. package/{esm2020 → esm2022}/src/enums.mjs +23 -23
  92. package/esm2022/src/env/EnvVariablesTable.mjs +340 -0
  93. package/esm2022/src/env/Environment.mjs +487 -0
  94. package/{esm2020 → esm2022}/src/env/ILanguageData.mjs +1 -1
  95. package/esm2022/src/env/LanguageData.mjs +227 -0
  96. package/esm2022/src/env/MirrorString.mjs +65 -0
  97. package/esm2022/src/event/ActionManager.mjs +91 -0
  98. package/esm2022/src/event/Event.mjs +1333 -0
  99. package/esm2022/src/event/EventHandler.mjs +766 -0
  100. package/esm2022/src/event/EventHandlerPosition.mjs +204 -0
  101. package/esm2022/src/event/EventsManager.mjs +2988 -0
  102. package/{esm2020 → esm2022}/src/event/IEventsManager.mjs +6 -6
  103. package/esm2022/src/event/RunTimeEvent.mjs +399 -0
  104. package/{esm2020 → esm2022}/src/event/RunTimeEventBase.mjs +3 -3
  105. package/esm2022/src/event/UserEventsTable.mjs +47 -0
  106. package/esm2022/src/exp/ExpTable.mjs +57 -0
  107. package/esm2022/src/exp/Expression.mjs +200 -0
  108. package/esm2022/src/exp/ExpressionDict.mjs +727 -0
  109. package/esm2022/src/exp/ExpressionEvaluator.mjs +4206 -0
  110. package/esm2022/src/exp/ExpressionLocalJpn.mjs +314 -0
  111. package/esm2022/src/exp/GlobalParamsTable.mjs +85 -0
  112. package/esm2022/src/exp/YesNoExp.mjs +36 -0
  113. package/esm2022/src/gui/CreatedFormVector.mjs +23 -0
  114. package/esm2022/src/gui/FormsTable.mjs +66 -0
  115. package/esm2022/src/gui/MgControl.mjs +363 -0
  116. package/esm2022/src/gui/MgForm.mjs +1224 -0
  117. package/esm2022/src/http/HttpManager.mjs +97 -0
  118. package/esm2022/src/http/client/HttpClientAsync.mjs +68 -0
  119. package/esm2022/src/http/client/HttpClientBase.mjs +132 -0
  120. package/esm2022/src/http/client/HttpClientEvents.mjs +39 -0
  121. package/esm2022/src/http/client/HttpClientSync.mjs +42 -0
  122. package/esm2022/src/http/client/HttpUtility.mjs +84 -0
  123. package/{esm2020 → esm2022}/src/http/client/ICommunicationsFailureHandler.mjs +1 -1
  124. package/esm2022/src/remote/AddUserLocateRemoteDataViewCommand.mjs +18 -0
  125. package/esm2022/src/remote/AddUserRangeRemoteDataViewCommand.mjs +18 -0
  126. package/esm2022/src/remote/AddUserSortRemoteDataViewCommand.mjs +18 -0
  127. package/esm2022/src/remote/RemoteCommandsProcessor.mjs +883 -0
  128. package/esm2022/src/remote/RemoteControlItemsRefreshCommand.mjs +25 -0
  129. package/esm2022/src/remote/RemoteDataViewCommandBase.mjs +24 -0
  130. package/esm2022/src/remote/RemoteDataViewCommandFactory.mjs +61 -0
  131. package/{esm2020 → esm2022}/src/remote/RemoteDataViewCommandUpdateNonModifiable.mjs +15 -15
  132. package/{esm2020 → esm2022}/src/remote/RemoteDataviewManager.mjs +17 -17
  133. package/{esm2020 → esm2022}/src/remote/RemoteInitDataViewCommand.mjs +10 -10
  134. package/esm2022/src/remote/ResetUserLocateRemoteDataviewCommand.mjs +17 -0
  135. package/{esm2020 → esm2022}/src/remote/ResetUserRangeRemoteDataviewCommand.mjs +12 -12
  136. package/esm2022/src/remote/ResetUserSortRemoteDataviewCommand.mjs +16 -0
  137. package/esm2022/src/remote/ServerError.mjs +40 -0
  138. package/esm2022/src/remote/SetTransactionStateRemoteDataViewCommand.mjs +20 -0
  139. package/esm2022/src/rt/Argument.mjs +265 -0
  140. package/esm2022/src/rt/ArgumentsList.mjs +103 -0
  141. package/esm2022/src/rt/Boundary.mjs +152 -0
  142. package/esm2022/src/rt/CompMainPrgTable.mjs +63 -0
  143. package/{esm2020 → esm2022}/src/rt/DataviewHeaderBase.mjs +98 -96
  144. package/{esm2020 → esm2022}/src/rt/DataviewHeaderFactory.mjs +6 -6
  145. package/esm2022/src/rt/DataviewHeaders.mjs +53 -0
  146. package/esm2022/src/rt/DataviewHeadersSaxHandler.mjs +38 -0
  147. package/esm2022/src/rt/ExecutionStack.mjs +94 -0
  148. package/{esm2020 → esm2022}/src/rt/ExecutionStackEntry.mjs +17 -17
  149. package/esm2022/src/rt/HandlersTable.mjs +96 -0
  150. package/{esm2020 → esm2022}/src/rt/IDataSourceViewDefinition.mjs +1 -1
  151. package/{esm2020 → esm2022}/src/rt/IDataviewHeader.mjs +1 -1
  152. package/{esm2020 → esm2022}/src/rt/IResultValue.mjs +1 -1
  153. package/esm2022/src/rt/LastFocusedManager.mjs +65 -0
  154. package/esm2022/src/rt/Operation.mjs +735 -0
  155. package/esm2022/src/rt/OperationTable.mjs +67 -0
  156. package/esm2022/src/rt/Recompute.mjs +355 -0
  157. package/esm2022/src/rt/RecomputeTable.mjs +63 -0
  158. package/esm2022/src/rt/RemoteDataviewHeader.mjs +108 -0
  159. package/esm2022/src/rt/ResultValue.mjs +10 -0
  160. package/esm2022/src/rt/TableCache.mjs +177 -0
  161. package/esm2022/src/rt/TableCacheManager.mjs +67 -0
  162. package/esm2022/src/rt/Transaction.mjs +53 -0
  163. package/esm2022/src/security/UserDetails.mjs +71 -0
  164. package/{esm2020 → esm2022}/src/tasks/IMGDataCollection.mjs +1 -1
  165. package/esm2022/src/tasks/MGData.mjs +552 -0
  166. package/esm2022/src/tasks/MGDataCollection.mjs +252 -0
  167. package/esm2022/src/tasks/RCTimer.mjs +63 -0
  168. package/esm2022/src/tasks/RemoteTaskService.mjs +45 -0
  169. package/esm2022/src/tasks/Task.mjs +2499 -0
  170. package/esm2022/src/tasks/TaskBase.mjs +83 -0
  171. package/esm2022/src/tasks/TaskServiceBase.mjs +25 -0
  172. package/esm2022/src/tasks/TasksTable.mjs +80 -0
  173. package/esm2022/src/tasks/sort/Sort.mjs +5 -0
  174. package/esm2022/src/tasks/sort/SortCollection.mjs +67 -0
  175. package/esm2022/src/util/ConstUtils.mjs +14 -0
  176. package/esm2022/src/util/FlowMonitorQueue.mjs +451 -0
  177. package/esm2022/src/util/HeapSort.mjs +70 -0
  178. package/{esm2020 → esm2022}/src/util/IMirrorXML.mjs +1 -1
  179. package/{esm2020 → esm2022}/src/util/IServerConfig.mjs +1 -1
  180. package/{esm2020 → esm2022}/src/util/MgBlockingQueue.mjs +1 -1
  181. package/esm2022/src/util/MgPriorityBlockingQueue.mjs +74 -0
  182. package/esm2022/src/util/MgPriorityQueue.mjs +66 -0
  183. package/{esm2020 → esm2022}/src/util/ParamParseResult.mjs +7 -7
  184. package/esm2022/src/util/PrmMap.mjs +152 -0
  185. package/esm2022/src/util/ReturnResult.mjs +46 -0
  186. package/esm2022/src/util/ReturnResultBase.mjs +18 -0
  187. package/esm2022/src/util/Scrambler.mjs +89 -0
  188. package/esm2022/src/util/UniqueIDUtils.mjs +13 -0
  189. package/esm2022/src/util/cookie.service.mjs +92 -0
  190. package/{fesm2020 → fesm2022}/magic-xpa-engine.mjs +29883 -29693
  191. package/fesm2022/magic-xpa-engine.mjs.map +1 -0
  192. package/index.d.ts +187 -187
  193. package/package.json +8 -14
  194. package/src/AccessHelper.d.ts +20 -20
  195. package/src/ClientManager.d.ts +35 -32
  196. package/src/CommandsProcessorBase.d.ts +23 -23
  197. package/src/CommandsProcessorManager.d.ts +6 -6
  198. package/src/CommandsTable.d.ts +22 -22
  199. package/src/ConstInterface.d.ts +516 -515
  200. package/src/CurrentClientVersion.d.ts +1 -1
  201. package/src/FlowMonitorInterface.d.ts +15 -15
  202. package/src/GUIManager.d.ts +17 -17
  203. package/src/GlobalCommandsManager.d.ts +17 -17
  204. package/src/GuiEventsProcessor.d.ts +24 -24
  205. package/src/ICommandsTable.d.ts +9 -9
  206. package/src/ServerConfig.d.ts +35 -34
  207. package/src/bridge/IGuiEvent.d.ts +19 -19
  208. package/src/bridge/MagicBridge.d.ts +16 -16
  209. package/src/commands/ClientOriginatedCommandTaskTag.d.ts +8 -8
  210. package/src/commands/ClientToServer/AddUserLocateDataViewCommand.d.ts +4 -4
  211. package/src/commands/ClientToServer/AddUserRangeDataviewCommand.d.ts +6 -6
  212. package/src/commands/ClientToServer/AddUserSortDataViewCommand.d.ts +6 -6
  213. package/src/commands/ClientToServer/BrowserEscEventCommand.d.ts +9 -8
  214. package/src/commands/ClientToServer/ClientOriginatedCommand.d.ts +8 -8
  215. package/src/commands/ClientToServer/ClientOriginatedCommandSerializer.d.ts +6 -6
  216. package/src/commands/ClientToServer/ColumnSortEventCommand.d.ts +11 -10
  217. package/src/commands/ClientToServer/CommandFactory.d.ts +64 -64
  218. package/src/commands/ClientToServer/CommandSerializationHelper.d.ts +20 -20
  219. package/src/commands/ClientToServer/ComputeEventCommand.d.ts +9 -8
  220. package/src/commands/ClientToServer/ContextTerminationEventCommand.d.ts +8 -7
  221. package/src/commands/ClientToServer/ContextTimeoutResetCommand.d.ts +8 -7
  222. package/src/commands/ClientToServer/ControlItemsRefreshCommand.d.ts +6 -6
  223. package/src/commands/ClientToServer/DataViewOutputCommand.d.ts +9 -9
  224. package/src/commands/ClientToServer/DataviewCommand.d.ts +32 -32
  225. package/src/commands/ClientToServer/EvaluateCommand.d.ts +16 -15
  226. package/src/commands/ClientToServer/EventCommand.d.ts +16 -15
  227. package/src/commands/ClientToServer/ExecOperCommand.d.ts +24 -23
  228. package/src/commands/ClientToServer/FetchDataControlValuesEventCommand.d.ts +9 -8
  229. package/src/commands/ClientToServer/GlobalParamsQueryCommand.d.ts +5 -5
  230. package/src/commands/ClientToServer/ICommandTaskTag.d.ts +3 -3
  231. package/src/commands/ClientToServer/IndexChangeEventCommand.d.ts +9 -8
  232. package/src/commands/ClientToServer/IniputForceWriteCommand.d.ts +11 -10
  233. package/src/commands/ClientToServer/NonReversibleExitEventCommand.d.ts +9 -8
  234. package/src/commands/ClientToServer/QueryCommand.d.ts +8 -8
  235. package/src/commands/ClientToServer/RecomputeCommand.d.ts +12 -11
  236. package/src/commands/ClientToServer/RefreshEventCommand.d.ts +13 -12
  237. package/src/commands/ClientToServer/RefreshScreenEventCommand.d.ts +11 -10
  238. package/src/commands/ClientToServer/RollbackEventCommand.d.ts +15 -14
  239. package/src/commands/ClientToServer/SelectProgramCommand.d.ts +7 -6
  240. package/src/commands/ClientToServer/SetTransactionStateDataviewCommand.d.ts +5 -5
  241. package/src/commands/ClientToServer/SubformOpenEventCommand.d.ts +9 -8
  242. package/src/commands/ClientToServer/SubformRefreshEventCommand.d.ts +10 -9
  243. package/src/commands/ClientToServer/TransactionCommand.d.ts +14 -12
  244. package/src/commands/ClientToServer/UnloadCommand.d.ts +8 -7
  245. package/src/commands/ClientToServer/WriteMessageToServerLogCommand.d.ts +6 -6
  246. package/src/commands/DataViewCommandBase.d.ts +6 -6
  247. package/src/commands/IClientCommand.d.ts +2 -2
  248. package/src/commands/IClientTargetedCommand.d.ts +12 -12
  249. package/src/commands/IClientToServerCommandInfo.d.ts +4 -3
  250. package/src/commands/ServerToClient/AbortCommand.d.ts +11 -11
  251. package/src/commands/ServerToClient/AddLocateCommand.d.ts +6 -6
  252. package/src/commands/ServerToClient/AddRangeCommand.d.ts +10 -10
  253. package/src/commands/ServerToClient/AddSortCommand.d.ts +9 -9
  254. package/src/commands/ServerToClient/ClientRefreshCommand.d.ts +7 -7
  255. package/src/commands/ServerToClient/ClientTargetedCommandBase.d.ts +12 -12
  256. package/src/commands/ServerToClient/EnhancedVerifyCommand.d.ts +13 -13
  257. package/src/commands/ServerToClient/OpenURLCommand.d.ts +21 -21
  258. package/src/commands/ServerToClient/ResetLocateCommand.d.ts +6 -6
  259. package/src/commands/ServerToClient/ResetRangeCommand.d.ts +6 -6
  260. package/src/commands/ServerToClient/ResetSortCommand.d.ts +6 -6
  261. package/src/commands/ServerToClient/ResultCommand.d.ts +10 -10
  262. package/src/commands/ServerToClient/VerifyCommand.d.ts +17 -17
  263. package/src/commands/ServerToClient/XMLBasedCommandBuilder.d.ts +11 -11
  264. package/src/communications/IConnectionStateManager.d.ts +4 -4
  265. package/src/communications/InteractiveCommunicationsFailureHandler.d.ts +6 -6
  266. package/src/data/DataSourceIdKey.d.ts +2 -2
  267. package/src/data/DataView.d.ts +162 -162
  268. package/src/data/DataViewBase.d.ts +12 -12
  269. package/src/data/DataviewManager.d.ts +14 -14
  270. package/src/data/DataviewManagerBase.d.ts +11 -11
  271. package/src/data/DvCache.d.ts +15 -15
  272. package/src/data/Field.d.ts +103 -103
  273. package/src/data/FieldBase.d.ts +23 -23
  274. package/src/data/FieldsTable.d.ts +27 -27
  275. package/src/data/IRecordsTable.d.ts +7 -7
  276. package/src/data/Key.d.ts +15 -15
  277. package/src/data/Record.d.ts +157 -156
  278. package/src/data/RecordOutOfDataViewException.d.ts +10 -10
  279. package/src/data/RecordsTable.d.ts +38 -38
  280. package/src/data/TaskTransactionManager.d.ts +17 -17
  281. package/src/data/XMLBasedDcValuesBuilder.d.ts +11 -11
  282. package/src/enums.d.ts +21 -21
  283. package/src/env/EnvVariablesTable.d.ts +17 -17
  284. package/src/env/Environment.d.ts +118 -118
  285. package/src/env/ILanguageData.d.ts +3 -3
  286. package/src/env/LanguageData.d.ts +20 -20
  287. package/src/env/MirrorString.d.ts +15 -15
  288. package/src/event/ActionManager.d.ts +14 -14
  289. package/src/event/Event.d.ts +79 -79
  290. package/src/event/EventHandler.d.ts +66 -66
  291. package/src/event/EventHandlerPosition.d.ts +25 -25
  292. package/src/event/EventsManager.d.ts +205 -204
  293. package/src/event/IEventsManager.d.ts +77 -77
  294. package/src/event/RunTimeEvent.d.ts +126 -123
  295. package/src/event/RunTimeEventBase.d.ts +5 -5
  296. package/src/event/UserEventsTable.d.ts +11 -11
  297. package/src/exp/ExpTable.d.ts +11 -11
  298. package/src/exp/Expression.d.ts +37 -37
  299. package/src/exp/ExpressionDict.d.ts +12 -12
  300. package/src/exp/ExpressionEvaluator.d.ts +198 -198
  301. package/src/exp/ExpressionLocalJpn.d.ts +18 -18
  302. package/src/exp/GlobalParamsTable.d.ts +19 -19
  303. package/src/exp/YesNoExp.d.ts +9 -9
  304. package/src/gui/CreatedFormVector.d.ts +10 -10
  305. package/src/gui/FormsTable.d.ts +15 -15
  306. package/src/gui/MgControl.d.ts +60 -60
  307. package/src/gui/MgForm.d.ts +96 -93
  308. package/src/http/HttpManager.d.ts +25 -25
  309. package/src/http/client/HttpClientAsync.d.ts +16 -16
  310. package/src/http/client/HttpClientBase.d.ts +30 -30
  311. package/src/http/client/HttpClientEvents.d.ts +18 -18
  312. package/src/http/client/HttpClientSync.d.ts +17 -17
  313. package/src/http/client/HttpUtility.d.ts +10 -10
  314. package/src/http/client/ICommunicationsFailureHandler.d.ts +5 -5
  315. package/src/remote/AddUserLocateRemoteDataViewCommand.d.ts +8 -8
  316. package/src/remote/AddUserRangeRemoteDataViewCommand.d.ts +8 -8
  317. package/src/remote/AddUserSortRemoteDataViewCommand.d.ts +8 -8
  318. package/src/remote/RemoteCommandsProcessor.d.ts +51 -51
  319. package/src/remote/RemoteControlItemsRefreshCommand.d.ts +8 -8
  320. package/src/remote/RemoteDataViewCommandBase.d.ts +10 -10
  321. package/src/remote/RemoteDataViewCommandFactory.d.ts +6 -6
  322. package/src/remote/RemoteDataViewCommandUpdateNonModifiable.d.ts +8 -8
  323. package/src/remote/RemoteDataviewManager.d.ts +9 -9
  324. package/src/remote/RemoteInitDataViewCommand.d.ts +7 -7
  325. package/src/remote/ResetUserLocateRemoteDataviewCommand.d.ts +7 -7
  326. package/src/remote/ResetUserRangeRemoteDataviewCommand.d.ts +7 -7
  327. package/src/remote/ResetUserSortRemoteDataviewCommand.d.ts +7 -7
  328. package/src/remote/ServerError.d.ts +16 -16
  329. package/src/remote/SetTransactionStateRemoteDataViewCommand.d.ts +8 -8
  330. package/src/rt/Argument.d.ts +36 -36
  331. package/src/rt/ArgumentsList.d.ts +24 -24
  332. package/src/rt/Boundary.d.ts +27 -27
  333. package/src/rt/CompMainPrgTable.d.ts +10 -10
  334. package/src/rt/DataviewHeaderBase.d.ts +34 -34
  335. package/src/rt/DataviewHeaderFactory.d.ts +5 -5
  336. package/src/rt/DataviewHeaders.d.ts +12 -12
  337. package/src/rt/DataviewHeadersSaxHandler.d.ts +10 -10
  338. package/src/rt/ExecutionStack.d.ts +22 -22
  339. package/src/rt/ExecutionStackEntry.d.ts +7 -7
  340. package/src/rt/HandlersTable.d.ts +19 -19
  341. package/src/rt/IDataSourceViewDefinition.d.ts +6 -6
  342. package/src/rt/IDataviewHeader.d.ts +10 -10
  343. package/src/rt/IResultValue.d.ts +4 -4
  344. package/src/rt/LastFocusedManager.d.ts +23 -23
  345. package/src/rt/Operation.d.ts +97 -97
  346. package/src/rt/OperationTable.d.ts +15 -15
  347. package/src/rt/Recompute.d.ts +41 -41
  348. package/src/rt/RecomputeTable.d.ts +9 -9
  349. package/src/rt/RemoteDataviewHeader.d.ts +14 -14
  350. package/src/rt/ResultValue.d.ts +7 -7
  351. package/src/rt/TableCache.d.ts +29 -29
  352. package/src/rt/TableCacheManager.d.ts +10 -10
  353. package/src/rt/Transaction.d.ts +23 -23
  354. package/src/security/UserDetails.d.ts +16 -16
  355. package/src/tasks/IMGDataCollection.d.ts +26 -26
  356. package/src/tasks/MGData.d.ts +63 -63
  357. package/src/tasks/MGDataCollection.d.ts +42 -42
  358. package/src/tasks/RCTimer.d.ts +13 -13
  359. package/src/tasks/RemoteTaskService.d.ts +16 -16
  360. package/src/tasks/Task.d.ts +312 -312
  361. package/src/tasks/TaskBase.d.ts +123 -123
  362. package/src/tasks/TaskServiceBase.d.ts +16 -16
  363. package/src/tasks/TasksTable.d.ts +21 -21
  364. package/src/tasks/sort/Sort.d.ts +4 -4
  365. package/src/tasks/sort/SortCollection.d.ts +11 -11
  366. package/src/util/ConstUtils.d.ts +3 -3
  367. package/src/util/FlowMonitorQueue.d.ts +70 -70
  368. package/src/util/HeapSort.d.ts +6 -6
  369. package/src/util/IMirrorXML.d.ts +6 -6
  370. package/src/util/IServerConfig.d.ts +11 -11
  371. package/src/util/MgBlockingQueue.d.ts +5 -5
  372. package/src/util/MgPriorityBlockingQueue.d.ts +17 -17
  373. package/src/util/MgPriorityQueue.d.ts +13 -13
  374. package/src/util/ParamParseResult.d.ts +6 -6
  375. package/src/util/PrmMap.d.ts +28 -28
  376. package/src/util/ReturnResult.d.ts +18 -18
  377. package/src/util/ReturnResultBase.d.ts +11 -11
  378. package/src/util/Scrambler.d.ts +10 -10
  379. package/src/util/UniqueIDUtils.d.ts +4 -4
  380. package/src/util/cookie.service.d.ts +8 -8
  381. package/esm2020/src/AccessHelper.mjs +0 -9
  382. package/esm2020/src/ClientManager.mjs +0 -399
  383. package/esm2020/src/CommandsProcessorBase.mjs +0 -58
  384. package/esm2020/src/CommandsProcessorManager.mjs +0 -26
  385. package/esm2020/src/CommandsTable.mjs +0 -162
  386. package/esm2020/src/ConstInterface.mjs +0 -516
  387. package/esm2020/src/FlowMonitorInterface.mjs +0 -16
  388. package/esm2020/src/GUIManager.mjs +0 -62
  389. package/esm2020/src/GlobalCommandsManager.mjs +0 -34
  390. package/esm2020/src/GuiEventsProcessor.mjs +0 -154
  391. package/esm2020/src/ServerConfig.mjs +0 -117
  392. package/esm2020/src/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/ClientOriginatedCommandSerializer.mjs +0 -60
  396. package/esm2020/src/commands/ClientToServer/ColumnSortEventCommand.mjs +0 -26
  397. package/esm2020/src/commands/ClientToServer/CommandFactory.mjs +0 -260
  398. package/esm2020/src/commands/ClientToServer/CommandSerializationHelper.mjs +0 -69
  399. package/esm2020/src/commands/ClientToServer/ComputeEventCommand.mjs +0 -23
  400. package/esm2020/src/commands/ClientToServer/DataViewOutputCommand.mjs +0 -13
  401. package/esm2020/src/commands/ClientToServer/EvaluateCommand.mjs +0 -36
  402. package/esm2020/src/commands/ClientToServer/ExecOperCommand.mjs +0 -67
  403. package/esm2020/src/commands/ClientToServer/FetchDataControlValuesEventCommand.mjs +0 -22
  404. package/esm2020/src/commands/ClientToServer/IndexChangeEventCommand.mjs +0 -21
  405. package/esm2020/src/commands/ClientToServer/IniputForceWriteCommand.mjs +0 -23
  406. package/esm2020/src/commands/ClientToServer/RecomputeCommand.mjs +0 -27
  407. package/esm2020/src/commands/ClientToServer/RefreshEventCommand.mjs +0 -27
  408. package/esm2020/src/commands/ClientToServer/RefreshScreenEventCommand.mjs +0 -24
  409. package/esm2020/src/commands/ClientToServer/RollbackEventCommand.mjs +0 -39
  410. package/esm2020/src/commands/ClientToServer/SelectProgramCommand.mjs +0 -15
  411. package/esm2020/src/commands/ClientToServer/SubformOpenEventCommand.mjs +0 -21
  412. package/esm2020/src/commands/ClientToServer/SubformRefreshEventCommand.mjs +0 -24
  413. package/esm2020/src/commands/ClientToServer/TransactionCommand.mjs +0 -28
  414. package/esm2020/src/commands/ClientToServer/WriteMessageToServerLogCommand.mjs +0 -18
  415. package/esm2020/src/commands/DataViewCommandBase.mjs +0 -10
  416. package/esm2020/src/commands/IClientTargetedCommand.mjs +0 -9
  417. package/esm2020/src/commands/ServerToClient/AbortCommand.mjs +0 -65
  418. package/esm2020/src/commands/ServerToClient/AddRangeCommand.mjs +0 -62
  419. package/esm2020/src/commands/ServerToClient/AddSortCommand.mjs +0 -33
  420. package/esm2020/src/commands/ServerToClient/ClientRefreshCommand.mjs +0 -25
  421. package/esm2020/src/commands/ServerToClient/ClientTargetedCommandBase.mjs +0 -27
  422. package/esm2020/src/commands/ServerToClient/EnhancedVerifyCommand.mjs +0 -45
  423. package/esm2020/src/commands/ServerToClient/OpenURLCommand.mjs +0 -221
  424. package/esm2020/src/commands/ServerToClient/ResultCommand.mjs +0 -37
  425. package/esm2020/src/commands/ServerToClient/VerifyCommand.mjs +0 -83
  426. package/esm2020/src/commands/ServerToClient/XMLBasedCommandBuilder.mjs +0 -132
  427. package/esm2020/src/communications/InteractiveCommunicationsFailureHandler.mjs +0 -17
  428. package/esm2020/src/data/DataView.mjs +0 -1610
  429. package/esm2020/src/data/DataviewManager.mjs +0 -28
  430. package/esm2020/src/data/DataviewManagerBase.mjs +0 -15
  431. package/esm2020/src/data/DvCache.mjs +0 -67
  432. package/esm2020/src/data/Field.mjs +0 -646
  433. package/esm2020/src/data/FieldBase.mjs +0 -18
  434. package/esm2020/src/data/FieldsTable.mjs +0 -103
  435. package/esm2020/src/data/Key.mjs +0 -88
  436. package/esm2020/src/data/Record.mjs +0 -846
  437. package/esm2020/src/data/RecordsTable.mjs +0 -267
  438. package/esm2020/src/data/TaskTransactionManager.mjs +0 -103
  439. package/esm2020/src/data/XMLBasedDcValuesBuilder.mjs +0 -74
  440. package/esm2020/src/env/EnvVariablesTable.mjs +0 -340
  441. package/esm2020/src/env/Environment.mjs +0 -489
  442. package/esm2020/src/env/LanguageData.mjs +0 -226
  443. package/esm2020/src/env/MirrorString.mjs +0 -65
  444. package/esm2020/src/event/ActionManager.mjs +0 -91
  445. package/esm2020/src/event/Event.mjs +0 -1333
  446. package/esm2020/src/event/EventHandler.mjs +0 -766
  447. package/esm2020/src/event/EventHandlerPosition.mjs +0 -204
  448. package/esm2020/src/event/EventsManager.mjs +0 -2975
  449. package/esm2020/src/event/RunTimeEvent.mjs +0 -392
  450. package/esm2020/src/event/UserEventsTable.mjs +0 -47
  451. package/esm2020/src/exp/ExpTable.mjs +0 -59
  452. package/esm2020/src/exp/Expression.mjs +0 -200
  453. package/esm2020/src/exp/ExpressionDict.mjs +0 -727
  454. package/esm2020/src/exp/ExpressionEvaluator.mjs +0 -4212
  455. package/esm2020/src/exp/ExpressionLocalJpn.mjs +0 -314
  456. package/esm2020/src/exp/GlobalParamsTable.mjs +0 -85
  457. package/esm2020/src/exp/YesNoExp.mjs +0 -36
  458. package/esm2020/src/gui/CreatedFormVector.mjs +0 -23
  459. package/esm2020/src/gui/FormsTable.mjs +0 -66
  460. package/esm2020/src/gui/MgControl.mjs +0 -353
  461. package/esm2020/src/gui/MgForm.mjs +0 -1181
  462. package/esm2020/src/http/HttpManager.mjs +0 -97
  463. package/esm2020/src/http/client/HttpClientAsync.mjs +0 -67
  464. package/esm2020/src/http/client/HttpClientBase.mjs +0 -132
  465. package/esm2020/src/http/client/HttpClientEvents.mjs +0 -39
  466. package/esm2020/src/http/client/HttpClientSync.mjs +0 -42
  467. package/esm2020/src/http/client/HttpUtility.mjs +0 -84
  468. package/esm2020/src/remote/AddUserLocateRemoteDataViewCommand.mjs +0 -18
  469. package/esm2020/src/remote/AddUserRangeRemoteDataViewCommand.mjs +0 -18
  470. package/esm2020/src/remote/AddUserSortRemoteDataViewCommand.mjs +0 -18
  471. package/esm2020/src/remote/RemoteCommandsProcessor.mjs +0 -880
  472. package/esm2020/src/remote/RemoteControlItemsRefreshCommand.mjs +0 -25
  473. package/esm2020/src/remote/RemoteDataViewCommandBase.mjs +0 -24
  474. package/esm2020/src/remote/RemoteDataViewCommandFactory.mjs +0 -61
  475. package/esm2020/src/remote/ResetUserLocateRemoteDataviewCommand.mjs +0 -17
  476. package/esm2020/src/remote/ResetUserSortRemoteDataviewCommand.mjs +0 -16
  477. package/esm2020/src/remote/ServerError.mjs +0 -40
  478. package/esm2020/src/remote/SetTransactionStateRemoteDataViewCommand.mjs +0 -20
  479. package/esm2020/src/rt/Argument.mjs +0 -265
  480. package/esm2020/src/rt/ArgumentsList.mjs +0 -103
  481. package/esm2020/src/rt/Boundary.mjs +0 -152
  482. package/esm2020/src/rt/CompMainPrgTable.mjs +0 -65
  483. package/esm2020/src/rt/DataviewHeaders.mjs +0 -53
  484. package/esm2020/src/rt/DataviewHeadersSaxHandler.mjs +0 -38
  485. package/esm2020/src/rt/ExecutionStack.mjs +0 -94
  486. package/esm2020/src/rt/HandlersTable.mjs +0 -96
  487. package/esm2020/src/rt/LastFocusedManager.mjs +0 -67
  488. package/esm2020/src/rt/Operation.mjs +0 -735
  489. package/esm2020/src/rt/OperationTable.mjs +0 -67
  490. package/esm2020/src/rt/Recompute.mjs +0 -355
  491. package/esm2020/src/rt/RecomputeTable.mjs +0 -63
  492. package/esm2020/src/rt/RemoteDataviewHeader.mjs +0 -108
  493. package/esm2020/src/rt/ResultValue.mjs +0 -12
  494. package/esm2020/src/rt/TableCache.mjs +0 -177
  495. package/esm2020/src/rt/TableCacheManager.mjs +0 -67
  496. package/esm2020/src/rt/Transaction.mjs +0 -53
  497. package/esm2020/src/security/UserDetails.mjs +0 -71
  498. package/esm2020/src/tasks/MGData.mjs +0 -552
  499. package/esm2020/src/tasks/MGDataCollection.mjs +0 -252
  500. package/esm2020/src/tasks/RCTimer.mjs +0 -63
  501. package/esm2020/src/tasks/RemoteTaskService.mjs +0 -45
  502. package/esm2020/src/tasks/Task.mjs +0 -2495
  503. package/esm2020/src/tasks/TaskBase.mjs +0 -87
  504. package/esm2020/src/tasks/TaskServiceBase.mjs +0 -25
  505. package/esm2020/src/tasks/TasksTable.mjs +0 -80
  506. package/esm2020/src/tasks/sort/Sort.mjs +0 -7
  507. package/esm2020/src/tasks/sort/SortCollection.mjs +0 -67
  508. package/esm2020/src/util/ConstUtils.mjs +0 -14
  509. package/esm2020/src/util/FlowMonitorQueue.mjs +0 -453
  510. package/esm2020/src/util/HeapSort.mjs +0 -70
  511. package/esm2020/src/util/MgPriorityBlockingQueue.mjs +0 -74
  512. package/esm2020/src/util/MgPriorityQueue.mjs +0 -66
  513. package/esm2020/src/util/PrmMap.mjs +0 -151
  514. package/esm2020/src/util/ReturnResult.mjs +0 -46
  515. package/esm2020/src/util/ReturnResultBase.mjs +0 -18
  516. package/esm2020/src/util/Scrambler.mjs +0 -89
  517. package/esm2020/src/util/UniqueIDUtils.mjs +0 -12
  518. package/esm2020/src/util/cookie.service.mjs +0 -92
  519. package/fesm2015/magic-xpa-engine.mjs +0 -30835
  520. package/fesm2015/magic-xpa-engine.mjs.map +0 -1
  521. package/fesm2020/magic-xpa-engine.mjs.map +0 -1
@@ -1,108 +0,0 @@
1
- import { List } from "@magic-xpa/mscorelib";
2
- import { StorageAttribute } from "@magic-xpa/utils";
3
- import { DisplayConvertor, PIC } from "@magic-xpa/gui";
4
- import { DataviewHeaderBase } from "./DataviewHeaderBase";
5
- import { TableCache } from "./TableCache";
6
- import { Record } from "../data/Record";
7
- import { ConstInterface } from "../ConstInterface";
8
- import { TableCacheManager } from "./TableCacheManager";
9
- import { AccessHelper } from "../AccessHelper";
10
- export class RemoteDataviewHeader extends DataviewHeaderBase {
11
- constructor(task) {
12
- super(task);
13
- this._table = null;
14
- this._lastFetchRecPos = null;
15
- }
16
- setAttribute(attribute, valueStr) {
17
- switch (attribute) {
18
- case ConstInterface.MG_ATTR_CACHED_TABLE:
19
- if (valueStr != "") {
20
- if (TableCacheManager.Instance.TableExists(valueStr))
21
- this._table = TableCacheManager.Instance.GetTableById(valueStr);
22
- else {
23
- this._table = new TableCache(valueStr);
24
- TableCacheManager.Instance.InsertTable(this._table);
25
- }
26
- }
27
- break;
28
- case ConstInterface.MG_ATTR_IDENT:
29
- if (valueStr != "")
30
- this._table.SetTableIdent(valueStr);
31
- break;
32
- default:
33
- super.setAttribute(attribute, valueStr);
34
- break;
35
- }
36
- }
37
- async getLinkedRecord(curRec) {
38
- let lnkFlds = this._task.DataView.GetFieldsTab().getLinkFields(this._id);
39
- let ret = false;
40
- if (this._cond.getVal()) {
41
- if (this.Loc == null) {
42
- this.Loc = new List();
43
- for (let i = 0; i < lnkFlds.length; i++) {
44
- let currLoc = lnkFlds.get_Item(i).Locate;
45
- if (currLoc != null) {
46
- this.Loc.push(currLoc);
47
- await currLoc.compute(false);
48
- }
49
- }
50
- }
51
- else {
52
- for (let i = 0; i < this.Loc.length; i++)
53
- await this.Loc.get_Item(i).compute(false);
54
- }
55
- await this._table.SortTable(this._keyIdx, this._dir);
56
- let res = this._table.Fetch(this.Loc);
57
- if (res == null)
58
- await this.initRec(curRec, false);
59
- else {
60
- ret = true;
61
- await this.copyLinkFldToRec(curRec, lnkFlds, res, true);
62
- }
63
- }
64
- else
65
- await this.initRec(curRec, false);
66
- return ret;
67
- }
68
- async copyLinkFldToRec(curRec, linkFlds, tableRec, ret) {
69
- this._lastFetchRecPos = tableRec.getDbPosVal();
70
- for (let i = 0; i < linkFlds.length; i++) {
71
- let curFld = linkFlds.get_Item(i);
72
- curRec.setFieldValue(curFld.getId(), tableRec.GetFieldValue(curFld.CacheTableFldIdx), false);
73
- curRec.clearFlag(curFld.getId(), Record.FLAG_INVALID);
74
- curFld.invalidate(true, false);
75
- }
76
- await this.SetReturnValue(ret, true);
77
- }
78
- async initRec(currRec, ret) {
79
- this._lastFetchRecPos = "#";
80
- await this.InitLinkFields(currRec);
81
- let retFld = this.ReturnField;
82
- if (retFld != null) {
83
- currRec.setFieldValue(retFld.getId(), (ret ? "1" : "0"), false);
84
- retFld.invalidate(true, false);
85
- }
86
- }
87
- getLastFetchedDbPos() {
88
- return this._lastFetchRecPos;
89
- }
90
- async SetReturnValue(ret, recompute) {
91
- let returnField = this.ReturnField;
92
- if (returnField !== null) {
93
- let enforceVariableChange = returnField.getTask() !== this.Task;
94
- AccessHelper.eventsManager.pushNewExecStacks();
95
- let result = ret ? "1" : "0";
96
- if (returnField.getType() === StorageAttribute.NUMERIC)
97
- result = DisplayConvertor.Instance.toNum(result, new PIC(returnField.getPicture(), StorageAttribute.NUMERIC, 0), 0);
98
- await returnField.setValueAndStartRecompute(result, false, recompute, false, false, enforceVariableChange);
99
- AccessHelper.eventsManager.popNewExecStacks();
100
- if (!recompute)
101
- returnField.setModified();
102
- returnField.invalidate(true, false);
103
- if (returnField.getTask() !== this.Task)
104
- await returnField.updateDisplay();
105
- }
106
- }
107
- }
108
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiUmVtb3RlRGF0YXZpZXdIZWFkZXIuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi9wcm9qZWN0cy9lbmdpbmUvc3JjL3J0L1JlbW90ZURhdGF2aWV3SGVhZGVyLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFBQyxJQUFJLEVBQUMsTUFBTSxzQkFBc0IsQ0FBQztBQUMxQyxPQUFPLEVBQUMsZ0JBQWdCLEVBQUMsTUFBTSxrQkFBa0IsQ0FBQztBQUNsRCxPQUFPLEVBQUMsZ0JBQWdCLEVBQUUsR0FBRyxFQUFDLE1BQU0sZ0JBQWdCLENBQUM7QUFDckQsT0FBTyxFQUFDLGtCQUFrQixFQUFDLE1BQU0sc0JBQXNCLENBQUM7QUFDeEQsT0FBTyxFQUFDLFVBQVUsRUFBQyxNQUFNLGNBQWMsQ0FBQztBQUV4QyxPQUFPLEVBQUMsTUFBTSxFQUFDLE1BQU0sZ0JBQWdCLENBQUM7QUFJdEMsT0FBTyxFQUFDLGNBQWMsRUFBQyxNQUFNLG1CQUFtQixDQUFDO0FBQ2pELE9BQU8sRUFBQyxpQkFBaUIsRUFBQyxNQUFNLHFCQUFxQixDQUFDO0FBQ3RELE9BQU8sRUFBQyxZQUFZLEVBQUMsTUFBTSxpQ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3RvcmFnZUF0dHJpYnV0ZS5OVU1FUklDLCAwKSwgMCk7XHJcblxyXG4gICAgICBhd2FpdCByZXR1cm5GaWVsZC5zZXRWYWx1ZUFuZFN0YXJ0UmVjb21wdXRlKHJlc3VsdCwgZmFsc2UsIHJlY29tcHV0ZSwgZmFsc2UsIGZhbHNlLCBlbmZvcmNlVmFyaWFibGVDaGFuZ2UpO1xyXG5cclxuICAgICAgQWNjZXNzSGVscGVyLmV2ZW50c01hbmFnZXIucG9wTmV3RXhlY1N0YWNrcygpO1xyXG5cclxuICAgICAgaWYgKCFyZWNvbXB1dGUpXHJcbiAgICAgICAgcmV0dXJuRmllbGQuc2V0TW9kaWZpZWQoKTtcclxuXHJcbiAgICAgIHJldHVybkZpZWxkLmludmFsaWRhdGUodHJ1ZSwgZmFsc2UpO1xyXG5cclxuICAgICAgLy8gSWYgZmllbGQgaXMgZnJvbSBhbm90aGVyIHRhc2ssIG5lZWQgdG8gdXBkYXRlIHRoZSBkaXNwbGF5IGFzIHdlbGxcclxuICAgICAgaWYgKHJldHVybkZpZWxkLmdldFRhc2soKSAhPT0gdGhpcy5UYXNrKVxyXG4gICAgICAgIGF3YWl0IHJldHVybkZpZWxkLnVwZGF0ZURpc3BsYXkoKTtcclxuICAgIH1cclxuICB9XHJcbn1cclxuIl19
@@ -1,12 +0,0 @@
1
- import { StorageAttribute } from "@magic-xpa/utils";
2
- export class ResultValue {
3
- constructor() {
4
- this.Value = null;
5
- this.Type = StorageAttribute.NONE;
6
- }
7
- SetResultValue(result, type) {
8
- this.Value = result;
9
- this.Type = type;
10
- }
11
- }
12
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiUmVzdWx0VmFsdWUuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi9wcm9qZWN0cy9lbmdpbmUvc3JjL3J0L1Jlc3VsdFZhbHVlLnRzIl0sIm5hbWVzIjpbXSwibWFw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sdCB2YWx1ZSBieSB0aGUgUmVzdWx0IGNvbW1hbmRcclxuICAvLy8gPC9zdW1tYXJ5PlxyXG4gIC8vLyA8cGFyYW0gbmFtZSA9IFwicmVzdWx0XCI+dGhlIHJlc3VsdCBjb21wdXRlZCBieSB0aGUgc2VydmVyIDwvcGFyYW0+XHJcbiAgLy8vIDxwYXJhbSBuYW1lID0gXCJ0eXBlXCI+dGhlIHR5cGUgb2YgdGhlIHJlc3VsdCB3aGljaCB3YXMgY29tcHV0ZWQgYnkgdGhlIHNlcnZlciA8L3BhcmFtPlxyXG4gIFNldFJlc3VsdFZhbHVlKHJlc3VsdDogc3RyaW5nLCB0eXBlOiBTdG9yYWdlQXR0cmlidXRlKTogdm9pZCB7XHJcbiAgICB0aGlzLlZhbHVlID0gcmVzdWx0O1xyXG4gICAgdGhpcy5UeXBlID0gdHlwZTtcclxuICB9XHJcbn1cclxuIl19
@@ -1,177 +0,0 @@
1
- import { List, NString } from "@magic-xpa/mscorelib";
2
- import { Key } from "../data/Key";
3
- import { FieldsTableExt as FieldsTable } from "../data/FieldsTable";
4
- import { Logger, XMLConstants, XmlParser } from "@magic-xpa/utils";
5
- import { RuntimeContextBase } from "@magic-xpa/gui";
6
- import { Record } from "../data/Record";
7
- import { HeapSort } from "../util/HeapSort";
8
- import { ConstInterface } from "../ConstInterface";
9
- import { TableCacheManager } from "./TableCacheManager";
10
- export class TableCache {
11
- constructor(tableId) {
12
- this._keys = null;
13
- this._records = null;
14
- this._currSortDir = '\0';
15
- this._currSortKey = 0;
16
- this.FldsTab = null;
17
- this._isLoaded = false;
18
- this._tableIdent = null;
19
- this._tableUId = null;
20
- this._tableUId = tableId;
21
- this._keys = new List();
22
- this._records = new List();
23
- this._isLoaded = false;
24
- }
25
- SetTableIdent(ident) {
26
- if (this._tableIdent === null)
27
- this._tableIdent = ident;
28
- else if (this._tableIdent !== ident) {
29
- Logger.Instance.WriteExceptionToLogWithMsg("in TableCache.setTableIdent() already set and table identifier does not match");
30
- }
31
- }
32
- FillData() {
33
- let parser = RuntimeContextBase.Instance.Parser;
34
- this.FillAttributes(parser);
35
- while (this.InitInnerObjects(parser, parser.getNextTag())) {
36
- }
37
- }
38
- FillAttributes(parser) {
39
- let endContext = parser.getXMLdata().indexOf(XMLConstants.TAG_CLOSE, parser.getCurrIndex());
40
- if (endContext !== -1 && endContext < parser.getXMLdata().length) {
41
- let tag = parser.getXMLsubstring(endContext);
42
- parser.add2CurrIndex(tag.indexOf(ConstInterface.MG_TAG_CACHED_TABLE) + ConstInterface.MG_TAG_CACHED_TABLE.length);
43
- let tokensVector = XmlParser.getTokens(parser.getXMLsubstring(endContext), XMLConstants.XML_ATTR_DELIM);
44
- for (let j = 0; j < tokensVector.length; j += 2) {
45
- let attribute = (tokensVector.get_Item(j));
46
- let valueStr = (tokensVector.get_Item(j + 1));
47
- switch (attribute) {
48
- case XMLConstants.MG_ATTR_ID:
49
- if (this._tableUId.indexOf(valueStr) === -1) {
50
- this._tableUId = valueStr;
51
- Logger.Instance.WriteExceptionToLogWithMsg("in TableCache.fillAttributes() table unique id does not match");
52
- }
53
- break;
54
- case XMLConstants.MG_ATTR_NAME:
55
- break;
56
- case ConstInterface.MG_ATTR_IDENT:
57
- if (this._tableIdent !== valueStr) {
58
- this._tableIdent = valueStr;
59
- Logger.Instance.WriteExceptionToLogWithMsg("in TableCache.fillAttributes() table identifier id does not match");
60
- }
61
- break;
62
- default:
63
- Logger.Instance.WriteExceptionToLogWithMsg(NString.Format("Unrecognized attribute: '{0}'", attribute));
64
- break;
65
- }
66
- }
67
- parser.setCurrIndex(++endContext);
68
- return;
69
- }
70
- Logger.Instance.WriteExceptionToLogWithMsg("in TableCache.fillAttributes() out of string bounds");
71
- }
72
- InitInnerObjects(parser, foundTagName) {
73
- if (foundTagName == null)
74
- return false;
75
- switch (foundTagName) {
76
- case XMLConstants.MG_TAG_FLDH:
77
- this.FldsTab = new FieldsTable();
78
- this.FldsTab.fillData(parser);
79
- break;
80
- case ConstInterface.MG_ATTR_KEY: {
81
- let current = new Key(this);
82
- current.FillData(parser);
83
- this._keys.push(current);
84
- break;
85
- }
86
- case ConstInterface.MG_TAG_RECORDS:
87
- parser.setCurrIndex(parser.getXMLdata().indexOf(XMLConstants.TAG_CLOSE, parser.getCurrIndex()) + 1);
88
- break;
89
- case ConstInterface.MG_TAG_RECORDS_END:
90
- parser.setCurrIndex2EndOfTag();
91
- break;
92
- case ConstInterface.MG_TAG_CACHED_TABLE_END:
93
- parser.setCurrIndex2EndOfTag();
94
- return false;
95
- case ConstInterface.MG_TAG_REC: {
96
- let current = new Record(this);
97
- current.Initialize();
98
- current.fillData(parser);
99
- this._records.push(current);
100
- break;
101
- }
102
- }
103
- return true;
104
- }
105
- GetTableUniqueId() {
106
- return this._tableUId;
107
- }
108
- GetTableCommonIdentifier() {
109
- return this._tableIdent;
110
- }
111
- GetCurrSortKey() {
112
- return this._currSortKey;
113
- }
114
- GetKeyById(keyId) {
115
- for (let i = 0; i < this._keys.length; i = i + 1) {
116
- if (this._keys.get_Item(i).GetKeyId() === keyId)
117
- return this._keys.get_Item(i);
118
- }
119
- return null;
120
- }
121
- async Load() {
122
- if (!this._isLoaded) {
123
- await TableCacheManager.Instance.LoadTable(this._tableUId);
124
- this._isLoaded = true;
125
- }
126
- }
127
- async SortTable(sortKeyId, sortDir) {
128
- if (!this._isLoaded)
129
- await this.Load();
130
- if (sortKeyId !== this._currSortKey || sortDir !== this._currSortDir) {
131
- this._currSortDir = sortDir;
132
- this._currSortKey = sortKeyId;
133
- let recordsArr = this._records.ToArray();
134
- HeapSort.sort(recordsArr);
135
- if (this._currSortDir === 'D')
136
- this.ReverseVector(recordsArr);
137
- for (let i = 0; i < this._records.length; i = i + 1) {
138
- this._records.set_Item(i, recordsArr[i]);
139
- }
140
- }
141
- }
142
- Fetch(loc) {
143
- let checkLoc = loc.length > 0;
144
- if (this._isLoaded) {
145
- if (!checkLoc) {
146
- return ((this._records.length !== 0) ? this._records.get_Item(0) : null);
147
- }
148
- for (let i = 0; i < this._records.length; i = i + 1) {
149
- let currRec = this._records.get_Item(i);
150
- if (TableCache.validateRec(currRec, loc)) {
151
- return currRec;
152
- }
153
- }
154
- }
155
- return null;
156
- }
157
- static validateRec(currRec, rangeCond) {
158
- let result = true;
159
- for (let i = 0; i < rangeCond.length; i = i + 1) {
160
- let currCnd = rangeCond.get_Item(i);
161
- if (!currCnd.checkRange(currRec.GetFieldValue(currCnd.getCacheTableFldId()), currRec.IsNull(currCnd.getCacheTableFldId()))) {
162
- result = false;
163
- break;
164
- }
165
- }
166
- return result;
167
- }
168
- ReverseVector(array) {
169
- let right = array.length - 1;
170
- for (let left = 0; left < Math.floor((array.length - 1) / 2); left++, right--) {
171
- let tmp = array[left];
172
- array[left] = array[right];
173
- array[right] = tmp;
174
- }
175
- }
176
- }
177
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiVGFibGVDYWNoZS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uL3Byb2plY3RzL2VuZ2luZS9zcmMvcnQvVGFibGVDYWNoZS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBQUMsSUFBSSxFQUFFLE9BQU8sRUFBQyxNQUFNLHNCQUFzQixDQUFDO0FBQ25ELE9BQU8sRUFBQyxHQUFHLEVBQUMsTUFBTSxhQUFhLENBQUM7QUFDaEMsT0FBTyxFQUFDLGNBQWMsSUFBSSxXQUFXLEVBQUUsTUFBTSxxQkFBcUIsQ0FBQztBQUNuRSxPQUFPLEVBQUMsTUFBTSxFQUFFLFlBQVksRUFBRSxTQUFTLEVBQUMsTUFBTSxrQkFBa0IsQ0FBQztBQUNqRSxPQUFPLEVBQUMsa0JBQWtCLEVBQUMsTUFBTSxnQkFBZ0IsQ0FBQztBQUNsRCxPQUFPLEVBQUMsTUFBTSxFQUFDLE1BQU0sZ0JBQWdCLENBQUM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xyXG4gICAgICBpZiAoIWN1cnJDbmQuY2hlY2tSYW5nZShjdXJyUmVjLkdldEZpZWxkVmFsdWUoY3VyckNuZC5nZXRDYWNoZVRhYmxlRmxkSWQoKSksIGN1cnJSZWMuSXNOdWxsKGN1cnJDbmQuZ2V0Q2FjaGVUYWJsZUZsZElkKCkpKSkge1xyXG4gICAgICAgIHJlc3VsdCA9IGZhbHNlO1xyXG4gICAgICAgIGJyZWFrO1xyXG4gICAgICB9XHJcbiAgICB9XHJcbiAgICByZXR1cm4gcmVzdWx0O1xyXG4gIH1cclxuXHJcbiAgLy8vIDxzdW1tYXJ5PlxyXG4gIC8vL1xyXG4gIC8vLyA8L3N1bW1hcnk+XHJcbiAgLy8vIDxwYXJhbSBuYW1lPVwiYXJyYXlcIj48L3BhcmFtPlxyXG4gIHByb3RlY3RlZCBSZXZlcnNlVmVjdG9yKGFycmF5OiBPYmplY3RbXSk6IHZvaWQge1xyXG4gICAgbGV0IHJpZ2h0OiBudW1iZXIgPSBhcnJheS5sZW5ndGggLSAxO1xyXG4gICAgZm9yIChsZXQgbGVmdDogbnVtYmVyID0gMDsgbGVmdCA8IE1hdGguZmxvb3IoKGFycmF5Lmxlbmd0aCAtIDEpIC8gMik7IGxlZnQrKyAsIHJpZ2h0LS0pIHtcclxuICAgICAgbGV0IHRtcDogT2JqZWN0ID0gYXJyYXlbbGVmdF07XHJcbiAgICAgIGFycmF5W2xlZnRdID0gYXJyYXlbcmlnaHRdO1xyXG4gICAgICBhcnJheVtyaWdodF0gPSB0bXA7XHJcbiAgICB9XHJcbiAgfVxyXG59XHJcbiJdfQ==
@@ -1,67 +0,0 @@
1
- import { Misc } from '@magic-xpa/utils';
2
- import { ApplicationException, Exception, Hashtable, List } from '@magic-xpa/mscorelib';
3
- import { RuntimeContextBase } from '@magic-xpa/gui';
4
- import { RemoteCommandsProcessor } from '../remote/RemoteCommandsProcessor';
5
- export class TableCacheManager {
6
- constructor() {
7
- this._tables = null;
8
- this._tables = new Hashtable();
9
- }
10
- GetTableById(tableUId) {
11
- return this._tables.get_Item(tableUId);
12
- }
13
- TableExists(tableUId) {
14
- let result = true;
15
- if (this.GetTableById(tableUId) === null)
16
- result = false;
17
- return result;
18
- }
19
- InsertTable(table) {
20
- let result = false;
21
- if (!this.TableExists(table.GetTableUniqueId())) {
22
- this._tables.set_Item(table.GetTableUniqueId(), table);
23
- result = true;
24
- }
25
- return result;
26
- }
27
- async LoadTable(tableUId) {
28
- let server = RemoteCommandsProcessor.GetInstance();
29
- if (this.TableExists(tableUId)) {
30
- let current = this._tables.get_Item(tableUId);
31
- try {
32
- let residentTableContentStr = await server.GetContent(tableUId, true);
33
- try {
34
- RuntimeContextBase.Instance.Parser.loadTableCacheData(residentTableContentStr);
35
- }
36
- catch (innerException) {
37
- if (innerException instanceof Exception) {
38
- throw new ApplicationException("Unable to parse resident table " + tableUId + ", due to unsupported encoding.", innerException);
39
- }
40
- else
41
- throw innerException;
42
- }
43
- }
44
- catch (throwable) {
45
- if (throwable instanceof Exception) {
46
- Misc.WriteStackTrace(throwable);
47
- }
48
- else
49
- throw throwable;
50
- }
51
- current.FillData();
52
- let deletedUids = new List();
53
- let enumerator = this._tables.Values;
54
- while (enumerator.MoveNext()) {
55
- let tbl = enumerator.Current;
56
- let currIdent = tbl.GetTableCommonIdentifier();
57
- if (currIdent === current.GetTableCommonIdentifier() && tbl.GetTableUniqueId() !== tableUId)
58
- deletedUids.push(tbl.GetTableUniqueId());
59
- }
60
- for (let i = 0; i < deletedUids.length; i = i + 1) {
61
- this._tables.Remove(deletedUids.get_Item(i));
62
- }
63
- }
64
- }
65
- }
66
- TableCacheManager.Instance = new TableCacheManager();
67
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiVGFibGVDYWNoZU1hbmFnZXIuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi9wcm9qZWN0cy9lbmdpbmUvc3JjL3J0L1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JsZUNhY2hlID0gPFRhYmxlQ2FjaGU+ZW51bWVyYXRvci5DdXJyZW50O1xyXG4gICAgICAgIGxldCBjdXJySWRlbnQ6IHN0cmluZyA9IHRibC5HZXRUYWJsZUNvbW1vbklkZW50aWZpZXIoKTtcclxuICAgICAgICBpZiAoY3VycklkZW50ID09PSBjdXJyZW50LkdldFRhYmxlQ29tbW9uSWRlbnRpZmllcigpICYmIHRibC5HZXRUYWJsZVVuaXF1ZUlkKCkgIT09IHRhYmxlVUlkKVxyXG4gICAgICAgICAgZGVsZXRlZFVpZHMucHVzaCh0YmwuR2V0VGFibGVVbmlxdWVJZCgpKTtcclxuICAgICAgfVxyXG4gICAgICAvLyBkZWxldGVcclxuICAgICAgZm9yIChsZXQgaTogbnVtYmVyID0gMDsgaSA8IGRlbGV0ZWRVaWRzLmxlbmd0aDsgaSA9IGkgKyAxKSB7XHJcbiAgICAgICAgdGhpcy5fdGFibGVzLlJlbW92ZShkZWxldGVkVWlkcy5nZXRfSXRlbShpKSk7XHJcbiAgICAgIH1cclxuICAgIH1cclxuICB9XHJcbn1cclxuIl19
@@ -1,53 +0,0 @@
1
- import { ConstInterface } from "../ConstInterface";
2
- export class Transaction {
3
- constructor(task, setTransId) {
4
- this._transId = null;
5
- this._afterTransRetry = ConstInterface.RECOVERY_NONE;
6
- this._transBegin = '\0';
7
- this.Opened = false;
8
- this.OwnerTask = null;
9
- this.OwnerTask = task;
10
- this._transId = setTransId;
11
- this._transBegin = ConstInterface.TRANS_TASK_PREFIX;
12
- }
13
- isOwner(task) {
14
- return task === this.OwnerTask;
15
- }
16
- close() {
17
- this.Opened = false;
18
- }
19
- open() {
20
- this.Opened = true;
21
- }
22
- isOpened() {
23
- return this.Opened;
24
- }
25
- setAfterRetry(val) {
26
- this._afterTransRetry = val;
27
- }
28
- getAfterRetry(recovery) {
29
- if (arguments.length === 0) {
30
- return this.getAfterRetry_0();
31
- }
32
- return this.getAfterRetry_1(recovery);
33
- }
34
- getAfterRetry_0() {
35
- return this._afterTransRetry !== ConstInterface.RECOVERY_NONE;
36
- }
37
- getAfterRetry_1(recovery) {
38
- return this._afterTransRetry === recovery;
39
- }
40
- getLevel() {
41
- return this._transBegin;
42
- }
43
- setTransBegin(val) {
44
- this._transBegin = val;
45
- }
46
- getTransId() {
47
- return this._transId;
48
- }
49
- setOwnerTask(task) {
50
- this.OwnerTask = task;
51
- }
52
- }
53
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiVHJhbnNhY3Rpb24uanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi9wcm9qZWN0cy9lbmdpbmUvc3JjL3J0L1RyYW5zYWN0aW9uLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUNBLE9BQU8sRUFBQyxjQUFjLEVBQUMsTUFBTSxtQkFBbUIsQ0FBQztBQUdqRCxNQUFNLE9BQU8sV0FBVztJQWdCdEIsWUFBWSxJQUFjLEVBQUUsVUFBa0I7UUFmdEMsYUFBUSxHQUFXLElBQUksQ0FBQztRQUd4QixxQkFBZ0IsR0FBVyxjQUFjLENBQUMsYUFBYSxDQUFDO1FBRXhELGdCQUFXLEdBQVcsSUFBSSxDQUFDO1FBQ25DLFdBQU0sR0FBWSxLQUFLLENBQUM7UUFDeEIsY0FBUyxHQUFTLElBQUksQ0FBQztRQVNyQixJQUFJLENBQUMsU0FBUyxHQUFTLElBQUksQ0FBQztRQUM1QixJQUFJLENBQUMsUUFBUSxHQUFHLFVBQVUsQ0FBQztRQUMzQixJQUFJLENBQUMsV0FBVyxHQUFHLGNBQWMsQ0FBQyxpQkFBaUIsQ0FBUztJQUM5RCxDQUFDO0lBTUQsT0FBTyxDQUFDLElBQVU7UUFDaEIsT0FBTyxJQUFJLEtBQUssSUFBSSxDQUFDLFNBQVMsQ0FBQztJQUNqQyxDQUFDO0lBS0QsS0FBSztRQUNILElBQUksQ0FBQyxNQUFNLEdBQ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yA8L3N1bW1hcnk+XHJcbiAgcHJpdmF0ZSBnZXRBZnRlclJldHJ5XzEocmVjb3Zlcnk6IHN0cmluZyk6IGJvb2xlYW4ge1xyXG4gICAgcmV0dXJuIHRoaXMuX2FmdGVyVHJhbnNSZXRyeSA9PT0gcmVjb3Zlcnk7XHJcbiAgfVxyXG5cclxuICAvLy8gPHN1bW1hcnk+XHJcbiAgLy8vICAgcmV0dXJucyB0aGUgdHJhbnNhY3Rpb24gbGV2ZWwgKFRhc2svUmVjb3JkKVxyXG4gIC8vLyA8L3N1bW1hcnk+XHJcbiAgZ2V0TGV2ZWwoKTogc3RyaW5nIHtcclxuICAgIHJldHVybiB0aGlzLl90cmFuc0JlZ2luO1xyXG4gIH1cclxuXHJcbiAgLy8vIDxzdW1tYXJ5PlxyXG4gIC8vLyAgIHNldHMgdGhlIGxldmVsIG9mIHRoZSBUcmFuc2FjdGlvblxyXG4gIC8vLyA8L3N1bW1hcnk+XHJcbiAgc2V0VHJhbnNCZWdpbih2YWw6IHN0cmluZyk6IHZvaWQge1xyXG4gICAgdGhpcy5fdHJhbnNCZWdpbiA9IHZhbDtcclxuICB9XHJcblxyXG4gIC8vLyA8c3VtbWFyeT5cclxuICAvLy8gICBnZXRzIHRyYW5zSWRcclxuICAvLy8gPC9zdW1tYXJ5PlxyXG4gIGdldFRyYW5zSWQoKTogc3RyaW5nIHtcclxuICAgIHJldHVybiB0aGlzLl90cmFuc0lkO1xyXG4gIH1cclxuXHJcbiAgLy8vIDxzdW1tYXJ5PlxyXG4gIC8vLyAgIHNldHMgT3duZXIgdGFza1xyXG4gIC8vLyA8L3N1bW1hcnk+XHJcbiAgc2V0T3duZXJUYXNrKHRhc2s6IFRhc2spOiB2b2lkIHtcclxuICAgIHRoaXMuT3duZXJUYXNrID0gdGFzaztcclxuICB9XHJcbn1cclxuIl19
@@ -1,71 +0,0 @@
1
- import { NString } from '@magic-xpa/mscorelib';
2
- import { Logger, XMLConstants, XmlParser } from '@magic-xpa/utils';
3
- import { ConstInterface } from '../ConstInterface';
4
- import { Commands } from '@magic-xpa/gui';
5
- export class UserDetails {
6
- setIsLoggedIn(value) {
7
- this.IsLoggedIn = value;
8
- }
9
- getIsLoggedIn() {
10
- return this.IsLoggedIn;
11
- }
12
- setUserID(userId) {
13
- this.UserID = userId;
14
- if (this.UserID.length == 0 || this.UserID === NString.Empty) {
15
- this.setIsLoggedIn(false);
16
- }
17
- else
18
- this.setIsLoggedIn(true);
19
- }
20
- static get Instance() {
21
- if (UserDetails._instance === null)
22
- UserDetails._instance = new UserDetails();
23
- return UserDetails._instance;
24
- }
25
- constructor() {
26
- this.UserName = null;
27
- this.UserID = null;
28
- this.UserInfo = null;
29
- this.Password = null;
30
- this.IsLoggedIn = false;
31
- this.UserName = NString.Empty;
32
- this.UserInfo = NString.Empty;
33
- this.IsLoggedIn = false;
34
- this.setUserID(NString.Empty);
35
- }
36
- fillData(parser) {
37
- let tokensVector;
38
- let endContext = parser.getXMLdata().indexOf(XMLConstants.TAG_TERM, parser.getCurrIndex());
39
- if (endContext !== -1 && endContext < parser.getXMLdata().length) {
40
- let tag = parser.getXMLsubstring(endContext);
41
- parser.add2CurrIndex(tag.indexOf(ConstInterface.MG_TAG_USER_DETAILS) + ConstInterface.MG_TAG_USER_DETAILS.length);
42
- tokensVector = XmlParser.getTokens(parser.getXMLsubstring(endContext), XMLConstants.XML_ATTR_DELIM);
43
- this.initElements(tokensVector);
44
- parser.setCurrIndex(endContext + XMLConstants.TAG_TERM.length);
45
- }
46
- else
47
- Logger.Instance.WriteExceptionToLogWithMsg("in UserDetails.fillData(): out of bounds");
48
- }
49
- initElements(tokensVector) {
50
- let attribute, valueStr;
51
- let isSuccess = true;
52
- let j;
53
- for (j = 0; j < tokensVector.length; j += 2) {
54
- attribute = tokensVector.get_Item(j);
55
- valueStr = tokensVector.get_Item(j + 1);
56
- switch (attribute) {
57
- case ConstInterface.MG_TAG_IS_LOGGED_IN:
58
- this.setIsLoggedIn(valueStr[0] === '1');
59
- Commands.addIsLoggedIn(this.getIsLoggedIn());
60
- break;
61
- default:
62
- Logger.Instance.WriteExceptionToLogWithMsg("in UserDetails.initElements(): unknown attribute: " + attribute);
63
- isSuccess = false;
64
- break;
65
- }
66
- }
67
- return isSuccess;
68
- }
69
- }
70
- UserDetails._instance = null;
71
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiVXNlckRldGFpbHMuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi9wcm9qZWN0cy9lbmdpbmUvc3JjL3NlY3VyaXR5L1VzZXJEZXRhaWxzLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFBUSxPQUFPLEVBQUUsTUFBTSxzQkFBc0IsQ0FBQztBQUNyRCxPQUFPLEVBQUUsTUFBTSxFQUFFLFlBQVksRUFBRSxTQUFTLEVBQUUsTUFBTSxrQkFBa0IsQ0FBQztBQUNuRSxPQUFPLEVBQUUsY0FBYyxFQUFFLE1BQU0sbUJBQW1CLENBQUM7QUFDbkQsT0FBTyxFQUFFLFFBQVEsRUFBRSxNQUFNLGdCQUFnQixDQUFDO0FBSzFDLE1BQU0sT0FBTyxXQUFXO0lBUWQsYUFBYSxDQUFDLEtBQWM7UUFDbEMsSUFBSSxDQUFDLFVBQVUsR0FBRyxLQUFLLENBQUM7SUFDMUIsQ0FBQztJQUVELGFBQWE7UUFDWCxPQUFPLElBQUksQ0FBQyxVQUFVLENBQUM7SUFDekIsQ0FBQztJQUVPLFNBQVMsQ0FBQyxNQUFlO1FBRS9CLElBQUksQ0FBQyxNQUFNLEdBQUcsTUFBTSxDQUFDO1FBQ3JCLElBQUssSUFBSSxDQUFDLE1BQU0sQ0FBQyxNQUFNLElBQUksQ0FBQyxJQUFJLElBQUksQ0FBQyxNQUFNLEtBQUssT0FBTyxDQUFDLEtBQUssRUFBQztZQUM1RCxJQUFJLENBQUMsYUF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