@magic-xpa/engine 4.1100.0-dev4110.26 → 4.1100.0-dev4110.260

Sign up to get free protection for your applications and to get access to all the features.
Files changed (491) hide show
  1. package/{esm2020 → esm2022}/index.mjs +188 -188
  2. package/{esm2020 → esm2022}/magic-xpa-engine.mjs +1 -1
  3. package/esm2022/src/AccessHelper.mjs +15 -0
  4. package/esm2022/src/ClientManager.mjs +418 -0
  5. package/esm2022/src/CommandsProcessorBase.mjs +56 -0
  6. package/{esm2020 → esm2022}/src/CommandsProcessorManager.mjs +25 -25
  7. package/esm2022/src/CommandsTable.mjs +162 -0
  8. package/esm2022/src/ConstInterface.mjs +517 -0
  9. package/{esm2020 → esm2022}/src/CurrentClientVersion.mjs +2 -2
  10. package/esm2022/src/FlowMonitorInterface.mjs +16 -0
  11. package/esm2022/src/GUIManager.mjs +62 -0
  12. package/esm2022/src/GlobalCommandsManager.mjs +34 -0
  13. package/esm2022/src/GuiEventsProcessor.mjs +156 -0
  14. package/{esm2020 → esm2022}/src/ICommandsTable.mjs +1 -1
  15. package/esm2022/src/ServerConfig.mjs +122 -0
  16. package/{esm2020 → esm2022}/src/bridge/IGuiEvent.mjs +19 -19
  17. package/esm2022/src/bridge/MagicBridge.mjs +41 -0
  18. package/esm2022/src/commands/ClientOriginatedCommandTaskTag.mjs +12 -0
  19. package/{esm2020 → esm2022}/src/commands/ClientToServer/AddUserLocateDataViewCommand.mjs +8 -8
  20. package/{esm2020 → esm2022}/src/commands/ClientToServer/AddUserRangeDataviewCommand.mjs +9 -9
  21. package/{esm2020 → esm2022}/src/commands/ClientToServer/AddUserSortDataViewCommand.mjs +9 -9
  22. package/esm2022/src/commands/ClientToServer/BrowserEscEventCommand.mjs +26 -0
  23. package/{esm2020 → esm2022}/src/commands/ClientToServer/ClientOriginatedCommand.mjs +14 -14
  24. package/{esm2020 → esm2022}/src/commands/ClientToServer/ClientOriginatedCommandSerializer.mjs +59 -59
  25. package/esm2022/src/commands/ClientToServer/ColumnSortEventCommand.mjs +29 -0
  26. package/esm2022/src/commands/ClientToServer/CommandFactory.mjs +261 -0
  27. package/esm2022/src/commands/ClientToServer/CommandSerializationHelper.mjs +67 -0
  28. package/esm2022/src/commands/ClientToServer/ComputeEventCommand.mjs +26 -0
  29. package/{esm2020 → esm2022}/src/commands/ClientToServer/ContextTerminationEventCommand.mjs +24 -21
  30. package/{esm2020 → esm2022}/src/commands/ClientToServer/ContextTimeoutResetCommand.mjs +23 -20
  31. package/{esm2020 → esm2022}/src/commands/ClientToServer/ControlItemsRefreshCommand.mjs +8 -8
  32. package/esm2022/src/commands/ClientToServer/DataViewOutputCommand.mjs +13 -0
  33. package/{esm2020 → esm2022}/src/commands/ClientToServer/DataviewCommand.mjs +44 -44
  34. package/esm2022/src/commands/ClientToServer/EvaluateCommand.mjs +40 -0
  35. package/{esm2020 → esm2022}/src/commands/ClientToServer/EventCommand.mjs +43 -40
  36. package/esm2022/src/commands/ClientToServer/ExecOperCommand.mjs +70 -0
  37. package/esm2022/src/commands/ClientToServer/FetchDataControlValuesEventCommand.mjs +25 -0
  38. package/{esm2020 → esm2022}/src/commands/ClientToServer/GlobalParamsQueryCommand.mjs +10 -10
  39. package/{esm2020 → esm2022}/src/commands/ClientToServer/ICommandTaskTag.mjs +1 -1
  40. package/esm2022/src/commands/ClientToServer/IndexChangeEventCommand.mjs +24 -0
  41. package/esm2022/src/commands/ClientToServer/IniputForceWriteCommand.mjs +26 -0
  42. package/{esm2020 → esm2022}/src/commands/ClientToServer/NonReversibleExitEventCommand.mjs +26 -23
  43. package/{esm2020 → esm2022}/src/commands/ClientToServer/QueryCommand.mjs +20 -20
  44. package/esm2022/src/commands/ClientToServer/RecomputeCommand.mjs +30 -0
  45. package/esm2022/src/commands/ClientToServer/RefreshEventCommand.mjs +30 -0
  46. package/esm2022/src/commands/ClientToServer/RefreshScreenEventCommand.mjs +27 -0
  47. package/esm2022/src/commands/ClientToServer/RollbackEventCommand.mjs +43 -0
  48. package/esm2022/src/commands/ClientToServer/SelectProgramCommand.mjs +19 -0
  49. package/{esm2020 → esm2022}/src/commands/ClientToServer/SetTransactionStateDataviewCommand.mjs +9 -9
  50. package/esm2022/src/commands/ClientToServer/SubformOpenEventCommand.mjs +24 -0
  51. package/esm2022/src/commands/ClientToServer/SubformRefreshEventCommand.mjs +27 -0
  52. package/esm2022/src/commands/ClientToServer/TransactionCommand.mjs +34 -0
  53. package/{esm2020 → esm2022}/src/commands/ClientToServer/UnloadCommand.mjs +18 -15
  54. package/esm2022/src/commands/ClientToServer/WriteMessageToServerLogCommand.mjs +18 -0
  55. package/esm2022/src/commands/DataViewCommandBase.mjs +8 -0
  56. package/{esm2020 → esm2022}/src/commands/IClientCommand.mjs +1 -1
  57. package/esm2022/src/commands/IClientTargetedCommand.mjs +13 -0
  58. package/{esm2020 → esm2022}/src/commands/IClientToServerCommandInfo.mjs +2 -2
  59. package/esm2022/src/commands/ServerToClient/AbortCommand.mjs +65 -0
  60. package/{esm2020 → esm2022}/src/commands/ServerToClient/AddLocateCommand.mjs +21 -21
  61. package/{esm2020 → esm2022}/src/commands/ServerToClient/AddRangeCommand.mjs +62 -62
  62. package/{esm2020 → esm2022}/src/commands/ServerToClient/AddSortCommand.mjs +33 -33
  63. package/esm2022/src/commands/ServerToClient/ClientRefreshCommand.mjs +25 -0
  64. package/esm2022/src/commands/ServerToClient/ClientTargetedCommandBase.mjs +24 -0
  65. package/esm2022/src/commands/ServerToClient/EnhancedVerifyCommand.mjs +45 -0
  66. package/esm2022/src/commands/ServerToClient/OpenURLCommand.mjs +221 -0
  67. package/{esm2020 → esm2022}/src/commands/ServerToClient/ResetLocateCommand.mjs +14 -14
  68. package/{esm2020 → esm2022}/src/commands/ServerToClient/ResetRangeCommand.mjs +14 -14
  69. package/{esm2020 → esm2022}/src/commands/ServerToClient/ResetSortCommand.mjs +14 -14
  70. package/esm2022/src/commands/ServerToClient/ResultCommand.mjs +37 -0
  71. package/esm2022/src/commands/ServerToClient/VerifyCommand.mjs +83 -0
  72. package/{esm2020 → esm2022}/src/commands/ServerToClient/XMLBasedCommandBuilder.mjs +132 -132
  73. package/{esm2020 → esm2022}/src/communications/IConnectionStateManager.mjs +1 -1
  74. package/esm2022/src/communications/InteractiveCommunicationsFailureHandler.mjs +15 -0
  75. package/{esm2020 → esm2022}/src/data/DataSourceIdKey.mjs +2 -2
  76. package/esm2022/src/data/DataView.mjs +1613 -0
  77. package/{esm2020 → esm2022}/src/data/DataViewBase.mjs +3 -3
  78. package/esm2022/src/data/DataviewManager.mjs +28 -0
  79. package/esm2022/src/data/DataviewManagerBase.mjs +15 -0
  80. package/esm2022/src/data/DvCache.mjs +67 -0
  81. package/esm2022/src/data/Field.mjs +646 -0
  82. package/esm2022/src/data/FieldBase.mjs +15 -0
  83. package/esm2022/src/data/FieldsTable.mjs +103 -0
  84. package/{esm2020 → esm2022}/src/data/IRecordsTable.mjs +1 -1
  85. package/{esm2020 → esm2022}/src/data/Key.mjs +88 -88
  86. package/esm2022/src/data/Record.mjs +880 -0
  87. package/{esm2020 → esm2022}/src/data/RecordOutOfDataViewException.mjs +15 -15
  88. package/esm2022/src/data/RecordsTable.mjs +267 -0
  89. package/{esm2020 → esm2022}/src/data/TaskTransactionManager.mjs +107 -103
  90. package/{esm2020 → esm2022}/src/data/XMLBasedDcValuesBuilder.mjs +74 -74
  91. package/{esm2020 → esm2022}/src/enums.mjs +23 -23
  92. package/esm2022/src/env/EnvVariablesTable.mjs +340 -0
  93. package/esm2022/src/env/Environment.mjs +487 -0
  94. package/{esm2020 → esm2022}/src/env/ILanguageData.mjs +1 -1
  95. package/esm2022/src/env/LanguageData.mjs +227 -0
  96. package/{esm2020 → esm2022}/src/env/MirrorString.mjs +65 -65
  97. package/esm2022/src/event/ActionManager.mjs +91 -0
  98. package/esm2022/src/event/Event.mjs +1333 -0
  99. package/esm2022/src/event/EventHandler.mjs +766 -0
  100. package/esm2022/src/event/EventHandlerPosition.mjs +204 -0
  101. package/esm2022/src/event/EventsManager.mjs +2988 -0
  102. package/{esm2020 → esm2022}/src/event/IEventsManager.mjs +6 -6
  103. package/esm2022/src/event/RunTimeEvent.mjs +399 -0
  104. package/{esm2020 → esm2022}/src/event/RunTimeEventBase.mjs +3 -3
  105. package/esm2022/src/event/UserEventsTable.mjs +47 -0
  106. package/esm2022/src/exp/ExpTable.mjs +57 -0
  107. package/esm2022/src/exp/Expression.mjs +200 -0
  108. package/esm2022/src/exp/ExpressionDict.mjs +727 -0
  109. package/esm2022/src/exp/ExpressionEvaluator.mjs +4206 -0
  110. package/esm2022/src/exp/ExpressionLocalJpn.mjs +314 -0
  111. package/{esm2020 → esm2022}/src/exp/GlobalParamsTable.mjs +85 -85
  112. package/esm2022/src/exp/YesNoExp.mjs +36 -0
  113. package/esm2022/src/gui/CreatedFormVector.mjs +23 -0
  114. package/esm2022/src/gui/FormsTable.mjs +66 -0
  115. package/esm2022/src/gui/MgControl.mjs +363 -0
  116. package/esm2022/src/gui/MgForm.mjs +1224 -0
  117. package/esm2022/src/http/HttpManager.mjs +97 -0
  118. package/esm2022/src/http/client/HttpClientAsync.mjs +68 -0
  119. package/{esm2020 → esm2022}/src/http/client/HttpClientBase.mjs +132 -132
  120. package/esm2022/src/http/client/HttpClientEvents.mjs +39 -0
  121. package/esm2022/src/http/client/HttpClientSync.mjs +42 -0
  122. package/esm2022/src/http/client/HttpUtility.mjs +84 -0
  123. package/{esm2020 → esm2022}/src/http/client/ICommunicationsFailureHandler.mjs +1 -1
  124. package/{esm2020 → esm2022}/src/remote/AddUserLocateRemoteDataViewCommand.mjs +18 -18
  125. package/{esm2020 → esm2022}/src/remote/AddUserRangeRemoteDataViewCommand.mjs +18 -18
  126. package/{esm2020 → esm2022}/src/remote/AddUserSortRemoteDataViewCommand.mjs +18 -18
  127. package/esm2022/src/remote/RemoteCommandsProcessor.mjs +883 -0
  128. package/{esm2020 → esm2022}/src/remote/RemoteControlItemsRefreshCommand.mjs +25 -25
  129. package/{esm2020 → esm2022}/src/remote/RemoteDataViewCommandBase.mjs +24 -24
  130. package/{esm2020 → esm2022}/src/remote/RemoteDataViewCommandFactory.mjs +60 -60
  131. package/{esm2020 → esm2022}/src/remote/RemoteDataViewCommandUpdateNonModifiable.mjs +15 -15
  132. package/{esm2020 → esm2022}/src/remote/RemoteDataviewManager.mjs +17 -17
  133. package/{esm2020 → esm2022}/src/remote/RemoteInitDataViewCommand.mjs +10 -10
  134. package/{esm2020 → esm2022}/src/remote/ResetUserLocateRemoteDataviewCommand.mjs +16 -16
  135. package/{esm2020 → esm2022}/src/remote/ResetUserRangeRemoteDataviewCommand.mjs +12 -12
  136. package/{esm2020 → esm2022}/src/remote/ResetUserSortRemoteDataviewCommand.mjs +15 -15
  137. package/esm2022/src/remote/ServerError.mjs +40 -0
  138. package/{esm2020 → esm2022}/src/remote/SetTransactionStateRemoteDataViewCommand.mjs +19 -19
  139. package/esm2022/src/rt/Argument.mjs +265 -0
  140. package/esm2022/src/rt/ArgumentsList.mjs +103 -0
  141. package/esm2022/src/rt/Boundary.mjs +152 -0
  142. package/esm2022/src/rt/CompMainPrgTable.mjs +63 -0
  143. package/esm2022/src/rt/DataviewHeaderBase.mjs +98 -0
  144. package/{esm2020 → esm2022}/src/rt/DataviewHeaderFactory.mjs +6 -6
  145. package/esm2022/src/rt/DataviewHeaders.mjs +53 -0
  146. package/{esm2020 → esm2022}/src/rt/DataviewHeadersSaxHandler.mjs +38 -38
  147. package/{esm2020 → esm2022}/src/rt/ExecutionStack.mjs +94 -94
  148. package/{esm2020 → esm2022}/src/rt/ExecutionStackEntry.mjs +17 -17
  149. package/{esm2020 → esm2022}/src/rt/HandlersTable.mjs +96 -96
  150. package/{esm2020 → esm2022}/src/rt/IDataSourceViewDefinition.mjs +1 -1
  151. package/{esm2020 → esm2022}/src/rt/IDataviewHeader.mjs +1 -1
  152. package/{esm2020 → esm2022}/src/rt/IResultValue.mjs +1 -1
  153. package/esm2022/src/rt/LastFocusedManager.mjs +65 -0
  154. package/esm2022/src/rt/Operation.mjs +735 -0
  155. package/esm2022/src/rt/OperationTable.mjs +67 -0
  156. package/esm2022/src/rt/Recompute.mjs +355 -0
  157. package/{esm2020 → esm2022}/src/rt/RecomputeTable.mjs +62 -62
  158. package/{esm2020 → esm2022}/src/rt/RemoteDataviewHeader.mjs +108 -108
  159. package/esm2022/src/rt/ResultValue.mjs +10 -0
  160. package/esm2022/src/rt/TableCache.mjs +177 -0
  161. package/esm2022/src/rt/TableCacheManager.mjs +67 -0
  162. package/esm2022/src/rt/Transaction.mjs +53 -0
  163. package/esm2022/src/security/UserDetails.mjs +71 -0
  164. package/{esm2020 → esm2022}/src/tasks/IMGDataCollection.mjs +1 -1
  165. package/esm2022/src/tasks/MGData.mjs +552 -0
  166. package/esm2022/src/tasks/MGDataCollection.mjs +252 -0
  167. package/esm2022/src/tasks/RCTimer.mjs +63 -0
  168. package/{esm2020 → esm2022}/src/tasks/RemoteTaskService.mjs +44 -44
  169. package/esm2022/src/tasks/Task.mjs +2499 -0
  170. package/esm2022/src/tasks/TaskBase.mjs +83 -0
  171. package/{esm2020 → esm2022}/src/tasks/TaskServiceBase.mjs +24 -24
  172. package/esm2022/src/tasks/TasksTable.mjs +80 -0
  173. package/esm2022/src/tasks/sort/Sort.mjs +5 -0
  174. package/{esm2020 → esm2022}/src/tasks/sort/SortCollection.mjs +67 -67
  175. package/{esm2020 → esm2022}/src/util/ConstUtils.mjs +13 -13
  176. package/esm2022/src/util/FlowMonitorQueue.mjs +451 -0
  177. package/{esm2020 → esm2022}/src/util/HeapSort.mjs +69 -69
  178. package/{esm2020 → esm2022}/src/util/IMirrorXML.mjs +1 -1
  179. package/{esm2020 → esm2022}/src/util/IServerConfig.mjs +1 -1
  180. package/{esm2020 → esm2022}/src/util/MgBlockingQueue.mjs +1 -1
  181. package/esm2022/src/util/MgPriorityBlockingQueue.mjs +74 -0
  182. package/esm2022/src/util/MgPriorityQueue.mjs +66 -0
  183. package/{esm2020 → esm2022}/src/util/ParamParseResult.mjs +7 -7
  184. package/esm2022/src/util/PrmMap.mjs +152 -0
  185. package/esm2022/src/util/ReturnResult.mjs +46 -0
  186. package/esm2022/src/util/ReturnResultBase.mjs +18 -0
  187. package/esm2022/src/util/Scrambler.mjs +89 -0
  188. package/esm2022/src/util/UniqueIDUtils.mjs +13 -0
  189. package/{esm2020 → esm2022}/src/util/cookie.service.mjs +91 -91
  190. package/{fesm2020 → fesm2022}/magic-xpa-engine.mjs +29885 -29693
  191. package/fesm2022/magic-xpa-engine.mjs.map +1 -0
  192. package/index.d.ts +187 -187
  193. package/package.json +8 -14
  194. package/src/AccessHelper.d.ts +20 -20
  195. package/src/ClientManager.d.ts +35 -32
  196. package/src/CommandsProcessorBase.d.ts +23 -23
  197. package/src/CommandsProcessorManager.d.ts +6 -6
  198. package/src/CommandsTable.d.ts +22 -22
  199. package/src/ConstInterface.d.ts +516 -515
  200. package/src/CurrentClientVersion.d.ts +1 -1
  201. package/src/FlowMonitorInterface.d.ts +15 -15
  202. package/src/GUIManager.d.ts +17 -17
  203. package/src/GlobalCommandsManager.d.ts +17 -17
  204. package/src/GuiEventsProcessor.d.ts +24 -24
  205. package/src/ICommandsTable.d.ts +9 -9
  206. package/src/ServerConfig.d.ts +35 -34
  207. package/src/bridge/IGuiEvent.d.ts +19 -19
  208. package/src/bridge/MagicBridge.d.ts +16 -16
  209. package/src/commands/ClientOriginatedCommandTaskTag.d.ts +8 -8
  210. package/src/commands/ClientToServer/AddUserLocateDataViewCommand.d.ts +4 -4
  211. package/src/commands/ClientToServer/AddUserRangeDataviewCommand.d.ts +6 -6
  212. package/src/commands/ClientToServer/AddUserSortDataViewCommand.d.ts +6 -6
  213. package/src/commands/ClientToServer/BrowserEscEventCommand.d.ts +9 -8
  214. package/src/commands/ClientToServer/ClientOriginatedCommand.d.ts +8 -8
  215. package/src/commands/ClientToServer/ClientOriginatedCommandSerializer.d.ts +6 -6
  216. package/src/commands/ClientToServer/ColumnSortEventCommand.d.ts +11 -10
  217. package/src/commands/ClientToServer/CommandFactory.d.ts +64 -64
  218. package/src/commands/ClientToServer/CommandSerializationHelper.d.ts +20 -20
  219. package/src/commands/ClientToServer/ComputeEventCommand.d.ts +9 -8
  220. package/src/commands/ClientToServer/ContextTerminationEventCommand.d.ts +8 -7
  221. package/src/commands/ClientToServer/ContextTimeoutResetCommand.d.ts +8 -7
  222. package/src/commands/ClientToServer/ControlItemsRefreshCommand.d.ts +6 -6
  223. package/src/commands/ClientToServer/DataViewOutputCommand.d.ts +9 -9
  224. package/src/commands/ClientToServer/DataviewCommand.d.ts +32 -32
  225. package/src/commands/ClientToServer/EvaluateCommand.d.ts +16 -15
  226. package/src/commands/ClientToServer/EventCommand.d.ts +16 -15
  227. package/src/commands/ClientToServer/ExecOperCommand.d.ts +24 -23
  228. package/src/commands/ClientToServer/FetchDataControlValuesEventCommand.d.ts +9 -8
  229. package/src/commands/ClientToServer/GlobalParamsQueryCommand.d.ts +5 -5
  230. package/src/commands/ClientToServer/ICommandTaskTag.d.ts +3 -3
  231. package/src/commands/ClientToServer/IndexChangeEventCommand.d.ts +9 -8
  232. package/src/commands/ClientToServer/IniputForceWriteCommand.d.ts +11 -10
  233. package/src/commands/ClientToServer/NonReversibleExitEventCommand.d.ts +9 -8
  234. package/src/commands/ClientToServer/QueryCommand.d.ts +8 -8
  235. package/src/commands/ClientToServer/RecomputeCommand.d.ts +12 -11
  236. package/src/commands/ClientToServer/RefreshEventCommand.d.ts +13 -12
  237. package/src/commands/ClientToServer/RefreshScreenEventCommand.d.ts +11 -10
  238. package/src/commands/ClientToServer/RollbackEventCommand.d.ts +15 -14
  239. package/src/commands/ClientToServer/SelectProgramCommand.d.ts +7 -6
  240. package/src/commands/ClientToServer/SetTransactionStateDataviewCommand.d.ts +5 -5
  241. package/src/commands/ClientToServer/SubformOpenEventCommand.d.ts +9 -8
  242. package/src/commands/ClientToServer/SubformRefreshEventCommand.d.ts +10 -9
  243. package/src/commands/ClientToServer/TransactionCommand.d.ts +14 -12
  244. package/src/commands/ClientToServer/UnloadCommand.d.ts +8 -7
  245. package/src/commands/ClientToServer/WriteMessageToServerLogCommand.d.ts +6 -6
  246. package/src/commands/DataViewCommandBase.d.ts +6 -6
  247. package/src/commands/IClientCommand.d.ts +2 -2
  248. package/src/commands/IClientTargetedCommand.d.ts +12 -12
  249. package/src/commands/IClientToServerCommandInfo.d.ts +4 -3
  250. package/src/commands/ServerToClient/AbortCommand.d.ts +11 -11
  251. package/src/commands/ServerToClient/AddLocateCommand.d.ts +6 -6
  252. package/src/commands/ServerToClient/AddRangeCommand.d.ts +10 -10
  253. package/src/commands/ServerToClient/AddSortCommand.d.ts +9 -9
  254. package/src/commands/ServerToClient/ClientRefreshCommand.d.ts +7 -7
  255. package/src/commands/ServerToClient/ClientTargetedCommandBase.d.ts +12 -12
  256. package/src/commands/ServerToClient/EnhancedVerifyCommand.d.ts +13 -13
  257. package/src/commands/ServerToClient/OpenURLCommand.d.ts +21 -21
  258. package/src/commands/ServerToClient/ResetLocateCommand.d.ts +6 -6
  259. package/src/commands/ServerToClient/ResetRangeCommand.d.ts +6 -6
  260. package/src/commands/ServerToClient/ResetSortCommand.d.ts +6 -6
  261. package/src/commands/ServerToClient/ResultCommand.d.ts +10 -10
  262. package/src/commands/ServerToClient/VerifyCommand.d.ts +17 -17
  263. package/src/commands/ServerToClient/XMLBasedCommandBuilder.d.ts +11 -11
  264. package/src/communications/IConnectionStateManager.d.ts +4 -4
  265. package/src/communications/InteractiveCommunicationsFailureHandler.d.ts +6 -6
  266. package/src/data/DataSourceIdKey.d.ts +2 -2
  267. package/src/data/DataView.d.ts +162 -162
  268. package/src/data/DataViewBase.d.ts +12 -12
  269. package/src/data/DataviewManager.d.ts +14 -14
  270. package/src/data/DataviewManagerBase.d.ts +11 -11
  271. package/src/data/DvCache.d.ts +15 -15
  272. package/src/data/Field.d.ts +103 -103
  273. package/src/data/FieldBase.d.ts +23 -23
  274. package/src/data/FieldsTable.d.ts +27 -27
  275. package/src/data/IRecordsTable.d.ts +7 -7
  276. package/src/data/Key.d.ts +15 -15
  277. package/src/data/Record.d.ts +157 -156
  278. package/src/data/RecordOutOfDataViewException.d.ts +10 -10
  279. package/src/data/RecordsTable.d.ts +38 -38
  280. package/src/data/TaskTransactionManager.d.ts +17 -17
  281. package/src/data/XMLBasedDcValuesBuilder.d.ts +11 -11
  282. package/src/enums.d.ts +21 -21
  283. package/src/env/EnvVariablesTable.d.ts +17 -17
  284. package/src/env/Environment.d.ts +118 -118
  285. package/src/env/ILanguageData.d.ts +3 -3
  286. package/src/env/LanguageData.d.ts +20 -20
  287. package/src/env/MirrorString.d.ts +15 -15
  288. package/src/event/ActionManager.d.ts +14 -14
  289. package/src/event/Event.d.ts +79 -79
  290. package/src/event/EventHandler.d.ts +66 -66
  291. package/src/event/EventHandlerPosition.d.ts +25 -25
  292. package/src/event/EventsManager.d.ts +205 -204
  293. package/src/event/IEventsManager.d.ts +77 -77
  294. package/src/event/RunTimeEvent.d.ts +126 -123
  295. package/src/event/RunTimeEventBase.d.ts +5 -5
  296. package/src/event/UserEventsTable.d.ts +11 -11
  297. package/src/exp/ExpTable.d.ts +11 -11
  298. package/src/exp/Expression.d.ts +37 -37
  299. package/src/exp/ExpressionDict.d.ts +12 -12
  300. package/src/exp/ExpressionEvaluator.d.ts +198 -198
  301. package/src/exp/ExpressionLocalJpn.d.ts +18 -18
  302. package/src/exp/GlobalParamsTable.d.ts +19 -19
  303. package/src/exp/YesNoExp.d.ts +9 -9
  304. package/src/gui/CreatedFormVector.d.ts +10 -10
  305. package/src/gui/FormsTable.d.ts +15 -15
  306. package/src/gui/MgControl.d.ts +60 -60
  307. package/src/gui/MgForm.d.ts +96 -93
  308. package/src/http/HttpManager.d.ts +25 -25
  309. package/src/http/client/HttpClientAsync.d.ts +16 -16
  310. package/src/http/client/HttpClientBase.d.ts +30 -30
  311. package/src/http/client/HttpClientEvents.d.ts +18 -18
  312. package/src/http/client/HttpClientSync.d.ts +17 -17
  313. package/src/http/client/HttpUtility.d.ts +10 -10
  314. package/src/http/client/ICommunicationsFailureHandler.d.ts +5 -5
  315. package/src/remote/AddUserLocateRemoteDataViewCommand.d.ts +8 -8
  316. package/src/remote/AddUserRangeRemoteDataViewCommand.d.ts +8 -8
  317. package/src/remote/AddUserSortRemoteDataViewCommand.d.ts +8 -8
  318. package/src/remote/RemoteCommandsProcessor.d.ts +51 -51
  319. package/src/remote/RemoteControlItemsRefreshCommand.d.ts +8 -8
  320. package/src/remote/RemoteDataViewCommandBase.d.ts +10 -10
  321. package/src/remote/RemoteDataViewCommandFactory.d.ts +6 -6
  322. package/src/remote/RemoteDataViewCommandUpdateNonModifiable.d.ts +8 -8
  323. package/src/remote/RemoteDataviewManager.d.ts +9 -9
  324. package/src/remote/RemoteInitDataViewCommand.d.ts +7 -7
  325. package/src/remote/ResetUserLocateRemoteDataviewCommand.d.ts +7 -7
  326. package/src/remote/ResetUserRangeRemoteDataviewCommand.d.ts +7 -7
  327. package/src/remote/ResetUserSortRemoteDataviewCommand.d.ts +7 -7
  328. package/src/remote/ServerError.d.ts +16 -16
  329. package/src/remote/SetTransactionStateRemoteDataViewCommand.d.ts +8 -8
  330. package/src/rt/Argument.d.ts +36 -36
  331. package/src/rt/ArgumentsList.d.ts +24 -24
  332. package/src/rt/Boundary.d.ts +27 -27
  333. package/src/rt/CompMainPrgTable.d.ts +10 -10
  334. package/src/rt/DataviewHeaderBase.d.ts +34 -34
  335. package/src/rt/DataviewHeaderFactory.d.ts +5 -5
  336. package/src/rt/DataviewHeaders.d.ts +12 -12
  337. package/src/rt/DataviewHeadersSaxHandler.d.ts +10 -10
  338. package/src/rt/ExecutionStack.d.ts +22 -22
  339. package/src/rt/ExecutionStackEntry.d.ts +7 -7
  340. package/src/rt/HandlersTable.d.ts +19 -19
  341. package/src/rt/IDataSourceViewDefinition.d.ts +6 -6
  342. package/src/rt/IDataviewHeader.d.ts +10 -10
  343. package/src/rt/IResultValue.d.ts +4 -4
  344. package/src/rt/LastFocusedManager.d.ts +23 -23
  345. package/src/rt/Operation.d.ts +97 -97
  346. package/src/rt/OperationTable.d.ts +15 -15
  347. package/src/rt/Recompute.d.ts +41 -41
  348. package/src/rt/RecomputeTable.d.ts +9 -9
  349. package/src/rt/RemoteDataviewHeader.d.ts +14 -14
  350. package/src/rt/ResultValue.d.ts +7 -7
  351. package/src/rt/TableCache.d.ts +29 -29
  352. package/src/rt/TableCacheManager.d.ts +10 -10
  353. package/src/rt/Transaction.d.ts +23 -23
  354. package/src/security/UserDetails.d.ts +16 -16
  355. package/src/tasks/IMGDataCollection.d.ts +26 -26
  356. package/src/tasks/MGData.d.ts +63 -63
  357. package/src/tasks/MGDataCollection.d.ts +42 -42
  358. package/src/tasks/RCTimer.d.ts +13 -13
  359. package/src/tasks/RemoteTaskService.d.ts +16 -16
  360. package/src/tasks/Task.d.ts +312 -312
  361. package/src/tasks/TaskBase.d.ts +123 -123
  362. package/src/tasks/TaskServiceBase.d.ts +16 -16
  363. package/src/tasks/TasksTable.d.ts +21 -21
  364. package/src/tasks/sort/Sort.d.ts +4 -4
  365. package/src/tasks/sort/SortCollection.d.ts +11 -11
  366. package/src/util/ConstUtils.d.ts +3 -3
  367. package/src/util/FlowMonitorQueue.d.ts +70 -70
  368. package/src/util/HeapSort.d.ts +6 -6
  369. package/src/util/IMirrorXML.d.ts +6 -6
  370. package/src/util/IServerConfig.d.ts +11 -11
  371. package/src/util/MgBlockingQueue.d.ts +5 -5
  372. package/src/util/MgPriorityBlockingQueue.d.ts +17 -17
  373. package/src/util/MgPriorityQueue.d.ts +13 -13
  374. package/src/util/ParamParseResult.d.ts +6 -6
  375. package/src/util/PrmMap.d.ts +28 -28
  376. package/src/util/ReturnResult.d.ts +18 -18
  377. package/src/util/ReturnResultBase.d.ts +11 -11
  378. package/src/util/Scrambler.d.ts +10 -10
  379. package/src/util/UniqueIDUtils.d.ts +4 -4
  380. package/src/util/cookie.service.d.ts +8 -8
  381. package/esm2020/src/AccessHelper.mjs +0 -9
  382. package/esm2020/src/ClientManager.mjs +0 -399
  383. package/esm2020/src/CommandsProcessorBase.mjs +0 -58
  384. package/esm2020/src/CommandsTable.mjs +0 -162
  385. package/esm2020/src/ConstInterface.mjs +0 -516
  386. package/esm2020/src/FlowMonitorInterface.mjs +0 -16
  387. package/esm2020/src/GUIManager.mjs +0 -62
  388. package/esm2020/src/GlobalCommandsManager.mjs +0 -34
  389. package/esm2020/src/GuiEventsProcessor.mjs +0 -154
  390. package/esm2020/src/ServerConfig.mjs +0 -117
  391. package/esm2020/src/bridge/MagicBridge.mjs +0 -41
  392. package/esm2020/src/commands/ClientOriginatedCommandTaskTag.mjs +0 -11
  393. package/esm2020/src/commands/ClientToServer/BrowserEscEventCommand.mjs +0 -23
  394. package/esm2020/src/commands/ClientToServer/ColumnSortEventCommand.mjs +0 -26
  395. package/esm2020/src/commands/ClientToServer/CommandFactory.mjs +0 -260
  396. package/esm2020/src/commands/ClientToServer/CommandSerializationHelper.mjs +0 -69
  397. package/esm2020/src/commands/ClientToServer/ComputeEventCommand.mjs +0 -23
  398. package/esm2020/src/commands/ClientToServer/DataViewOutputCommand.mjs +0 -13
  399. package/esm2020/src/commands/ClientToServer/EvaluateCommand.mjs +0 -36
  400. package/esm2020/src/commands/ClientToServer/ExecOperCommand.mjs +0 -67
  401. package/esm2020/src/commands/ClientToServer/FetchDataControlValuesEventCommand.mjs +0 -22
  402. package/esm2020/src/commands/ClientToServer/IndexChangeEventCommand.mjs +0 -21
  403. package/esm2020/src/commands/ClientToServer/IniputForceWriteCommand.mjs +0 -23
  404. package/esm2020/src/commands/ClientToServer/RecomputeCommand.mjs +0 -27
  405. package/esm2020/src/commands/ClientToServer/RefreshEventCommand.mjs +0 -27
  406. package/esm2020/src/commands/ClientToServer/RefreshScreenEventCommand.mjs +0 -24
  407. package/esm2020/src/commands/ClientToServer/RollbackEventCommand.mjs +0 -39
  408. package/esm2020/src/commands/ClientToServer/SelectProgramCommand.mjs +0 -15
  409. package/esm2020/src/commands/ClientToServer/SubformOpenEventCommand.mjs +0 -21
  410. package/esm2020/src/commands/ClientToServer/SubformRefreshEventCommand.mjs +0 -24
  411. package/esm2020/src/commands/ClientToServer/TransactionCommand.mjs +0 -28
  412. package/esm2020/src/commands/ClientToServer/WriteMessageToServerLogCommand.mjs +0 -18
  413. package/esm2020/src/commands/DataViewCommandBase.mjs +0 -10
  414. package/esm2020/src/commands/IClientTargetedCommand.mjs +0 -9
  415. package/esm2020/src/commands/ServerToClient/AbortCommand.mjs +0 -65
  416. package/esm2020/src/commands/ServerToClient/ClientRefreshCommand.mjs +0 -25
  417. package/esm2020/src/commands/ServerToClient/ClientTargetedCommandBase.mjs +0 -27
  418. package/esm2020/src/commands/ServerToClient/EnhancedVerifyCommand.mjs +0 -45
  419. package/esm2020/src/commands/ServerToClient/OpenURLCommand.mjs +0 -221
  420. package/esm2020/src/commands/ServerToClient/ResultCommand.mjs +0 -37
  421. package/esm2020/src/commands/ServerToClient/VerifyCommand.mjs +0 -83
  422. package/esm2020/src/communications/InteractiveCommunicationsFailureHandler.mjs +0 -17
  423. package/esm2020/src/data/DataView.mjs +0 -1610
  424. package/esm2020/src/data/DataviewManager.mjs +0 -28
  425. package/esm2020/src/data/DataviewManagerBase.mjs +0 -15
  426. package/esm2020/src/data/DvCache.mjs +0 -67
  427. package/esm2020/src/data/Field.mjs +0 -646
  428. package/esm2020/src/data/FieldBase.mjs +0 -18
  429. package/esm2020/src/data/FieldsTable.mjs +0 -103
  430. package/esm2020/src/data/Record.mjs +0 -846
  431. package/esm2020/src/data/RecordsTable.mjs +0 -267
  432. package/esm2020/src/env/EnvVariablesTable.mjs +0 -340
  433. package/esm2020/src/env/Environment.mjs +0 -489
  434. package/esm2020/src/env/LanguageData.mjs +0 -226
  435. package/esm2020/src/event/ActionManager.mjs +0 -91
  436. package/esm2020/src/event/Event.mjs +0 -1333
  437. package/esm2020/src/event/EventHandler.mjs +0 -766
  438. package/esm2020/src/event/EventHandlerPosition.mjs +0 -204
  439. package/esm2020/src/event/EventsManager.mjs +0 -2975
  440. package/esm2020/src/event/RunTimeEvent.mjs +0 -392
  441. package/esm2020/src/event/UserEventsTable.mjs +0 -47
  442. package/esm2020/src/exp/ExpTable.mjs +0 -59
  443. package/esm2020/src/exp/Expression.mjs +0 -200
  444. package/esm2020/src/exp/ExpressionDict.mjs +0 -727
  445. package/esm2020/src/exp/ExpressionEvaluator.mjs +0 -4212
  446. package/esm2020/src/exp/ExpressionLocalJpn.mjs +0 -314
  447. package/esm2020/src/exp/YesNoExp.mjs +0 -36
  448. package/esm2020/src/gui/CreatedFormVector.mjs +0 -23
  449. package/esm2020/src/gui/FormsTable.mjs +0 -66
  450. package/esm2020/src/gui/MgControl.mjs +0 -353
  451. package/esm2020/src/gui/MgForm.mjs +0 -1181
  452. package/esm2020/src/http/HttpManager.mjs +0 -97
  453. package/esm2020/src/http/client/HttpClientAsync.mjs +0 -67
  454. package/esm2020/src/http/client/HttpClientEvents.mjs +0 -39
  455. package/esm2020/src/http/client/HttpClientSync.mjs +0 -42
  456. package/esm2020/src/http/client/HttpUtility.mjs +0 -84
  457. package/esm2020/src/remote/RemoteCommandsProcessor.mjs +0 -880
  458. package/esm2020/src/remote/ServerError.mjs +0 -40
  459. package/esm2020/src/rt/Argument.mjs +0 -265
  460. package/esm2020/src/rt/ArgumentsList.mjs +0 -103
  461. package/esm2020/src/rt/Boundary.mjs +0 -152
  462. package/esm2020/src/rt/CompMainPrgTable.mjs +0 -65
  463. package/esm2020/src/rt/DataviewHeaderBase.mjs +0 -96
  464. package/esm2020/src/rt/DataviewHeaders.mjs +0 -53
  465. package/esm2020/src/rt/LastFocusedManager.mjs +0 -67
  466. package/esm2020/src/rt/Operation.mjs +0 -735
  467. package/esm2020/src/rt/OperationTable.mjs +0 -67
  468. package/esm2020/src/rt/Recompute.mjs +0 -355
  469. package/esm2020/src/rt/ResultValue.mjs +0 -12
  470. package/esm2020/src/rt/TableCache.mjs +0 -177
  471. package/esm2020/src/rt/TableCacheManager.mjs +0 -67
  472. package/esm2020/src/rt/Transaction.mjs +0 -53
  473. package/esm2020/src/security/UserDetails.mjs +0 -71
  474. package/esm2020/src/tasks/MGData.mjs +0 -552
  475. package/esm2020/src/tasks/MGDataCollection.mjs +0 -252
  476. package/esm2020/src/tasks/RCTimer.mjs +0 -63
  477. package/esm2020/src/tasks/Task.mjs +0 -2495
  478. package/esm2020/src/tasks/TaskBase.mjs +0 -87
  479. package/esm2020/src/tasks/TasksTable.mjs +0 -80
  480. package/esm2020/src/tasks/sort/Sort.mjs +0 -7
  481. package/esm2020/src/util/FlowMonitorQueue.mjs +0 -453
  482. package/esm2020/src/util/MgPriorityBlockingQueue.mjs +0 -74
  483. package/esm2020/src/util/MgPriorityQueue.mjs +0 -66
  484. package/esm2020/src/util/PrmMap.mjs +0 -151
  485. package/esm2020/src/util/ReturnResult.mjs +0 -46
  486. package/esm2020/src/util/ReturnResultBase.mjs +0 -18
  487. package/esm2020/src/util/Scrambler.mjs +0 -89
  488. package/esm2020/src/util/UniqueIDUtils.mjs +0 -12
  489. package/fesm2015/magic-xpa-engine.mjs +0 -30835
  490. package/fesm2015/magic-xpa-engine.mjs.map +0 -1
  491. package/fesm2020/magic-xpa-engine.mjs.map +0 -1
@@ -0,0 +1,646 @@
1
+ import { ApplicationException, Debug, List, NNumber, NString, RefParam, isNullOrUndefined } from "@magic-xpa/mscorelib";
2
+ import { Constants, InternalInterface, Logger, MsgInterface, PICInterface, StorageAttribute, StrUtil, UtilStrByteMode, XMLConstants, XmlParser } from "@magic-xpa/utils";
3
+ import { BlobType, DisplayConvertor, ExpVal, FieldDef, NUM_TYPE, PIC, VectorType } from "@magic-xpa/gui";
4
+ import { YesNoExp } from "../exp/YesNoExp";
5
+ import { ExpressionEvaluator } from "../exp/ExpressionEvaluator";
6
+ import { Recompute, Recompute_RcmpBy } from "../rt/Recompute";
7
+ import { Boundary } from "../rt/Boundary";
8
+ import { ArgumentsList } from "../rt/ArgumentsList";
9
+ import { ConstInterface } from "../ConstInterface";
10
+ import { RunTimeEvent } from "../event/RunTimeEvent";
11
+ import { Record } from "./Record";
12
+ import { Environment } from "../env/Environment";
13
+ import { FieldBase } from "./FieldBase";
14
+ import { LastFocusedManager } from "../rt/LastFocusedManager";
15
+ import { LanguageData } from "../env/LanguageData";
16
+ import { AccessHelper } from "../AccessHelper";
17
+ export class Field extends FieldBase {
18
+ static LEAVE_FLAGS = false;
19
+ static NUM0 = null;
20
+ static NUM1 = null;
21
+ _linkExp = null;
22
+ _recompute = null;
23
+ CacheTableFldIdx = 0;
24
+ _causeTableInvalidation = false;
25
+ _form = null;
26
+ _hasChangeEvent = false;
27
+ _hasZoomHandler = false;
28
+ _inEvalProcess = false;
29
+ _initExp = null;
30
+ _invalidValue = true;
31
+ _isLinkFld = false;
32
+ _isVirtual = false;
33
+ _dataviewHeaderId = -1;
34
+ _linkCreate = false;
35
+ Locate = null;
36
+ Range = null;
37
+ _isParam = false;
38
+ _isExposedRouteParam = false;
39
+ _isExposedToClient = true;
40
+ _prevIsNull = false;
41
+ _prevValue = null;
42
+ _tableName = null;
43
+ _indexInTable = -1;
44
+ _virAsReal = false;
45
+ _val = null;
46
+ modifiedAtLeastOnce = false;
47
+ _isNull = false;
48
+ _clearVectorType = true;
49
+ _vectorType = null;
50
+ static _variableChangeEvts = new List();
51
+ constructor(dataview, id) {
52
+ super(id);
53
+ if (Field.NUM0 === null) {
54
+ Field.NUM0 = new NUM_TYPE();
55
+ Field.NUM1 = new NUM_TYPE();
56
+ Field.NUM0.NUM_4_LONG(0);
57
+ Field.NUM1.NUM_4_LONG(1);
58
+ }
59
+ this._dataview = dataview;
60
+ this._linkExp = new YesNoExp(false);
61
+ FieldDef._default_date = DisplayConvertor.Instance.disp2mg(PICInterface.DEFAULT_DATE, new PIC("6", StorageAttribute.NUMERIC, super.getTask().getCompIdx()), super.getTask().getCompIdx(), BlobType.CONTENT_TYPE_UNKNOWN);
62
+ }
63
+ get VirAsReal() {
64
+ return this._virAsReal;
65
+ }
66
+ get IsVirtual() {
67
+ return this._isVirtual;
68
+ }
69
+ get IsExposedRouteParam() {
70
+ return this._isExposedRouteParam;
71
+ }
72
+ get IsExposedToClient() {
73
+ return this._isExposedToClient;
74
+ }
75
+ get IndexInTable() {
76
+ return this._indexInTable;
77
+ }
78
+ setAttribute(attribute, valueStr) {
79
+ let isTagProcessed = super.setAttribute(attribute, valueStr);
80
+ if (!isTagProcessed) {
81
+ let data = StrUtil.tokenize(valueStr, ",");
82
+ isTagProcessed = true;
83
+ switch (attribute) {
84
+ case ConstInterface.MG_ATTR_VIRTUAL:
85
+ this._isVirtual = (XmlParser.getInt(valueStr) !== 0);
86
+ break;
87
+ case ConstInterface.MG_ATTR_PARAM:
88
+ this._isParam = (XmlParser.getInt(valueStr) !== 0);
89
+ if (!this._isVirtual && this._isParam)
90
+ throw new ApplicationException("in Field.initElements(): non virtual field is defined as a parameter");
91
+ break;
92
+ case ConstInterface.MG_ATTR_EXPOSED_ROUTE_PARAMS:
93
+ this._isExposedRouteParam = (XmlParser.getInt(valueStr) !== 0);
94
+ if (!this._isParam && this._isExposedRouteParam)
95
+ throw new ApplicationException("in Field.initElements(): non parameter field is defined as a exposed route parameter");
96
+ break;
97
+ case ConstInterface.MG_ATTR_EXPOSED_TO_CLIENT:
98
+ if (XmlParser.getInt(valueStr) == 0)
99
+ this._isExposedToClient = false;
100
+ break;
101
+ case ConstInterface.MG_ATTR_VIR_AS_REAL:
102
+ this._virAsReal = XmlParser.getBoolean(valueStr);
103
+ break;
104
+ case ConstInterface.MG_ATTR_LNK_CREATE:
105
+ this._linkCreate = XmlParser.getBoolean(valueStr);
106
+ break;
107
+ case ConstInterface.MG_ATTR_LNKEXP:
108
+ this._linkExp.setVal((this.getTask()), valueStr);
109
+ break;
110
+ case ConstInterface.MG_ATTR_TABLE_NAME:
111
+ this._tableName = XmlParser.unescape(valueStr);
112
+ break;
113
+ case ConstInterface.MG_ATTR_INDEX_IN_TABLE:
114
+ this._indexInTable = XmlParser.getInt(valueStr);
115
+ break;
116
+ case ConstInterface.MG_ATTR_INIT:
117
+ let expNum = XmlParser.getInt(valueStr);
118
+ this._initExp = this.getTask().getExpById(expNum);
119
+ break;
120
+ case XMLConstants.MG_ATTR_NAME:
121
+ {
122
+ }
123
+ break;
124
+ case ConstInterface.MG_ATTR_CHACHED_FLD_ID:
125
+ if (data[0] != "")
126
+ this.CacheTableFldIdx = NNumber.Parse(data[1]);
127
+ break;
128
+ case ConstInterface.MG_ATTR_LOCATE:
129
+ this.Locate = new Boundary(this.getTask(), NNumber.Parse(data[1]), NNumber.Parse(data[0]), this.getType(), this.getSize(), this.CacheTableFldIdx);
130
+ break;
131
+ case ConstInterface.MG_ATTR_RANGE:
132
+ this.Range = new Boundary(this.getTask(), NNumber.Parse(data[1]), NNumber.Parse(data[0]), this.getType(), this.getSize(), this.CacheTableFldIdx);
133
+ break;
134
+ case ConstInterface.MG_ATTR_LINK:
135
+ this._dataviewHeaderId = NNumber.Parse(valueStr);
136
+ break;
137
+ case ConstInterface.MG_ATTR_IS_LINK_FIELD:
138
+ this._isLinkFld = XmlParser.getBoolean(valueStr);
139
+ break;
140
+ default:
141
+ isTagProcessed = false;
142
+ Logger.Instance.WriteExceptionToLogWithMsg(NString.Format("Unrecognized attribute: '{0}'", attribute));
143
+ break;
144
+ }
145
+ }
146
+ return isTagProcessed;
147
+ }
148
+ setRecompute(recompRef) {
149
+ this._recompute = recompRef;
150
+ }
151
+ RemoveSubformFromRecompute(subformTask) {
152
+ if (this._recompute !== null) {
153
+ this._recompute.RemoveSubform(subformTask);
154
+ }
155
+ }
156
+ AddSubformRecompute(subformTask) {
157
+ if (this._recompute === null) {
158
+ this._recompute = new Recompute();
159
+ this._recompute.Task = super.getTask();
160
+ this._recompute.OwnerFld = this;
161
+ this._recompute.RcmpMode = Recompute_RcmpBy.CLIENT;
162
+ }
163
+ this._recompute.AddSubform(subformTask);
164
+ }
165
+ SetControl(ctrl) {
166
+ super.SetControl(ctrl);
167
+ if (this._isVirtual && ctrl.IsRepeatable && this._initExp === null) {
168
+ this._causeTableInvalidation = true;
169
+ }
170
+ }
171
+ async compute(recompute) {
172
+ let result = new RefParam(this.getValue(false));
173
+ let isNullFld = new RefParam(this._isNull);
174
+ let rec = this._dataview.getCurrRec();
175
+ let task = super.getTask();
176
+ let zeroReal = this._linkCreate && rec.InCompute && !recompute && task.getMode() === Constants.TASK_MODE_CREATE;
177
+ if (this._form == null)
178
+ this._form = task.getForm();
179
+ if ((this._form != null && this._form.InRestore) || AccessHelper.eventsManager.GetStopExecutionFlag())
180
+ zeroReal = false;
181
+ let rtEvt = AccessHelper.eventsManager.getLastRtEvent();
182
+ let computeOnCancelEvent = false;
183
+ if (rtEvt != null)
184
+ computeOnCancelEvent = rtEvt.getInternalCode() === InternalInterface.MG_ACT_CANCEL;
185
+ if (!this._virAsReal && (this._form == null || !this._form.InRestore) &&
186
+ ((this._isVirtual || (task.getMode() === Constants.TASK_MODE_CREATE && computeOnCancelEvent)) || recompute ||
187
+ zeroReal || rec.isNewRec() && !rec.isComputed())) {
188
+ if (!task.DataView.isEmptyDataview() || (task.DataView.isEmptyDataview() && !this.PartOfDataview)) {
189
+ if ((this._isVirtual || task.getMode() === Constants.TASK_MODE_CREATE) || this._dataview.computeByClient() ||
190
+ !rec.InCompute || zeroReal || rec.lateCompute()) {
191
+ if (this._initExp != null) {
192
+ await this.EvaluateInitExpression(result, isNullFld);
193
+ }
194
+ else if (zeroReal)
195
+ result.value = this.getDefaultValue();
196
+ }
197
+ }
198
+ }
199
+ if (this._invalidValue) {
200
+ this._prevValue = result.value;
201
+ this._prevIsNull = isNullFld.value;
202
+ }
203
+ await this.setValue(result.value, isNullFld.value, recompute, false, recompute && !this._isVirtual, false, false);
204
+ }
205
+ async EvaluateInitExpression(result, isNullFld) {
206
+ Debug.Assert(this._initExp !== null);
207
+ try {
208
+ this._inEvalProcess = true;
209
+ result.value = await this._initExp.evaluateWithResultTypeAndLength(this._type, this._size);
210
+ }
211
+ finally {
212
+ this._inEvalProcess = false;
213
+ }
214
+ isNullFld.value = (result.value === null);
215
+ if (isNullFld.value && this.NullAllowed) {
216
+ result.value = this.getValue(false);
217
+ }
218
+ }
219
+ getValue(checkNullArithmetic) {
220
+ if (super.getTask().getEvalOldValues())
221
+ return this.getOriginalValue();
222
+ if (this._invalidValue)
223
+ this.takeValFromRec();
224
+ if (this._isNull)
225
+ this._val = this.getValueForNull(checkNullArithmetic);
226
+ return this._val;
227
+ }
228
+ isChanged(newValue, isNull) {
229
+ return this._prevValue !== null && (!(this._prevValue === newValue) || this._prevIsNull !== isNull);
230
+ }
231
+ takeValFromRec() {
232
+ let rec = this._dataview.getCurrRec();
233
+ if (rec !== null) {
234
+ this._val = rec.GetFieldValue(this._id);
235
+ this._isNull = rec.IsNull(this._id);
236
+ }
237
+ if (this._invalidValue) {
238
+ if (rec !== null && this._causeTableInvalidation && this.isChanged(this._val, this._isNull) && this._form !== null) {
239
+ rec.setCauseInvalidation(true);
240
+ }
241
+ this._prevValue = this._val;
242
+ this._prevIsNull = this._isNull;
243
+ this._invalidValue = false;
244
+ }
245
+ this._vectorType = null;
246
+ }
247
+ getOriginalValue() {
248
+ let originalRec = this._dataview.getOriginalRec();
249
+ if (originalRec.IsNull(this._id))
250
+ return this.getMagicDefaultValue();
251
+ return originalRec.GetFieldValue(this._id);
252
+ }
253
+ isOriginalValueNull() {
254
+ let originalRec = this._dataview.getOriginalRec();
255
+ return originalRec.IsNull(this._id);
256
+ }
257
+ getValueByRecIdx(idx) {
258
+ let rec = this._dataview.getRecByIdx(idx);
259
+ let fieldValue = rec.GetFieldValue(this._id);
260
+ return rec.IsNull(this._id) ? this.getValueForNull(false) : fieldValue;
261
+ }
262
+ getModifiedAtLeastOnce() {
263
+ return this.modifiedAtLeastOnce;
264
+ }
265
+ isNullByRecIdx(idx) {
266
+ let rec = this._dataview.getRecByIdx(idx);
267
+ return rec.IsNull(this._id);
268
+ }
269
+ isEqual(mgValue, isNullFld, type, recIdx) {
270
+ let rec = (this._dataview.getRecByIdx(recIdx));
271
+ let valsEqual = false;
272
+ if (rec != null) {
273
+ let fieldValue = rec.GetFieldValue(this._id);
274
+ let fielsIsNull = rec.IsNull(this._id);
275
+ valsEqual = ExpressionEvaluator.mgValsEqual(fieldValue, fielsIsNull, this._type, mgValue, isNullFld, type);
276
+ }
277
+ return valsEqual;
278
+ }
279
+ getNewRecValue(clobberedOnly) {
280
+ if (this._isVirtual && this._initExp == null)
281
+ return this._val;
282
+ return !clobberedOnly ? this.getDefaultValue() : null;
283
+ }
284
+ async setValueAndStartRecompute(val, isNullFld, recompute, setRecordUpdated, isArgUpdate, enforceVariableChange) {
285
+ if (isNullOrUndefined(enforceVariableChange))
286
+ enforceVariableChange = false;
287
+ await this.setValueAndStartRecompute_1(val, isNullFld, recompute, setRecordUpdated, isArgUpdate, false);
288
+ }
289
+ async setValueAndStartRecompute_1(val, isNullFld, recompute, setRecordUpdated, isArgUpdate, enforceVariableChange) {
290
+ let task = this.getTask();
291
+ if (task != null)
292
+ task.VewFirst++;
293
+ let valueWasUpdated = await this.setValue(val, isNullFld, recompute, setRecordUpdated, !this._isVirtual, isArgUpdate, enforceVariableChange);
294
+ if (task !== null && task.VewFirst === 1 && this._form !== null && !this.IsEventHandlerField) {
295
+ if (recompute && valueWasUpdated)
296
+ await this._form.refreshOnExpressions();
297
+ }
298
+ if (task != null)
299
+ task.VewFirst--;
300
+ }
301
+ async setValue(newVal, isNullFld, recompute, setRecordModified, setCrsrModified, isArgUpdate, enforceValiableChange) {
302
+ let rec;
303
+ let recFldVal;
304
+ let valsEqual = false;
305
+ let remainder;
306
+ let zeroReal;
307
+ let args = null;
308
+ let mainCtrl = this.getCtrl();
309
+ let pendingEvents;
310
+ let evts;
311
+ let forceUpdate = false;
312
+ let checkForVariableChange = recompute || enforceValiableChange;
313
+ let task = this.getTask();
314
+ if (this._form === null)
315
+ this._form = task.getForm();
316
+ if (isNullFld && !this.NullAllowed && this._type !== StorageAttribute.BLOB_VECTOR) {
317
+ newVal = this.getDefaultValue();
318
+ isNullFld = false;
319
+ }
320
+ if (this._type === StorageAttribute.NUMERIC && newVal != null && !NUM_TYPE.numHexStrIsLong(newVal)) {
321
+ let numVal = new NUM_TYPE(newVal);
322
+ let pic = new PIC(this._picture, this._type, super.getTask().getCompIdx());
323
+ let decs = pic.getDec();
324
+ numVal.round(decs);
325
+ newVal = numVal.toXMLrecord();
326
+ }
327
+ rec = this._dataview.getCurrRec();
328
+ if (rec == null)
329
+ throw new ApplicationException(LanguageData.Instance.getConstMessage(MsgInterface.RT_STR_NO_RECS_IN_RNG));
330
+ if (!this.IsVirtual &&
331
+ (task.getMode() === Constants.TASK_MODE_QUERY &&
332
+ !Environment.Instance.allowUpdateInQueryMode(task.getCompIdx())
333
+ || rec.InForceUpdate && rec.InCompute))
334
+ return !valsEqual;
335
+ if (checkForVariableChange && this.getHasChangeEvent()) {
336
+ let argsList = new Array(2);
337
+ argsList[0] = new ExpVal(StorageAttribute.NUMERIC, false, (mainCtrl !== null && mainCtrl.IsInteractiveUpdate
338
+ ? Field.NUM0.toXMLrecord()
339
+ : Field.NUM1.toXMLrecord()));
340
+ argsList[1] = new ExpVal(this.getType(), this.isNull(), this.getValue(false));
341
+ args = new ArgumentsList(argsList);
342
+ }
343
+ if (mainCtrl != null)
344
+ mainCtrl.IsInteractiveUpdate = false;
345
+ if (this._type !== StorageAttribute.UNICODE && UtilStrByteMode.isLocaleDefLangDBCS()) {
346
+ if (newVal != null)
347
+ remainder = this._size - UtilStrByteMode.lenB(newVal);
348
+ else
349
+ remainder = 0;
350
+ if (newVal != null && this._type !== StorageAttribute.BLOB && this._type !== StorageAttribute.BLOB_VECTOR &&
351
+ remainder < 0)
352
+ this._val = UtilStrByteMode.leftB(newVal, this._size);
353
+ else if (this._type === StorageAttribute.ALPHA && remainder > 0)
354
+ this._val = newVal + NString.FromChars(this._spaces, 0, remainder);
355
+ else if (this._type === StorageAttribute.BLOB)
356
+ this._val = BlobType.copyBlob(this._val, newVal);
357
+ else
358
+ this._val = newVal;
359
+ }
360
+ else {
361
+ if (newVal != null)
362
+ remainder = this._size - newVal.length;
363
+ else
364
+ remainder = 0;
365
+ if (newVal != null && this._type !== StorageAttribute.BLOB && this._type !== StorageAttribute.BLOB_VECTOR && remainder < 0)
366
+ this._val = newVal.substr(0, this._size);
367
+ else if ((this._type === StorageAttribute.ALPHA || this._type === StorageAttribute.UNICODE) && remainder > 0)
368
+ this._val = newVal + NString.FromChars(this._spaces, 0, remainder);
369
+ else if (this._type === StorageAttribute.BLOB) {
370
+ if (this._val === null)
371
+ this._val = this.getMagicDefaultValue();
372
+ this._val = BlobType.copyBlob(this._val, newVal);
373
+ }
374
+ else
375
+ this._val = newVal;
376
+ }
377
+ {
378
+ recFldVal = rec.GetFieldValue(this._id);
379
+ let oldNullVal = this._isNull;
380
+ if (!recompute && !isArgUpdate && this._initExp == null)
381
+ oldNullVal = rec.IsNull(this._id);
382
+ try {
383
+ valsEqual = ExpressionEvaluator.mgValsEqual(this._val, isNullFld, this._type, recFldVal, oldNullVal, this._type);
384
+ }
385
+ catch (exception) {
386
+ this._val = this.getMagicDefaultValue();
387
+ valsEqual = false;
388
+ }
389
+ }
390
+ if (this._clearVectorType)
391
+ this._vectorType = null;
392
+ if (this._invalidValue) {
393
+ this._invalidValue = false;
394
+ rec.clearFlag(this._id, Record.FLAG_UPDATED);
395
+ rec.clearFlag(this._id, Record.FLAG_MODIFIED);
396
+ }
397
+ zeroReal = this._linkCreate && rec.InCompute && !recompute && (this._form == null || !this._form.InRestore) &&
398
+ !AccessHelper.eventsManager.GetStopExecutionFlag();
399
+ if ((this._isVirtual || zeroReal) && !rec.isNewRec() && !valsEqual)
400
+ forceUpdate = true;
401
+ if (checkForVariableChange || forceUpdate || rec.isNewRec()) {
402
+ this.UpdateNull(isNullFld, rec);
403
+ if (setCrsrModified)
404
+ rec.setFlag(this._id, Record.FLAG_CRSR_MODIFIED);
405
+ rec.setFieldValue(this._id, this._val, setRecordModified);
406
+ evts = Field._variableChangeEvts;
407
+ pendingEvents = evts.length;
408
+ if (checkForVariableChange && this.getHasChangeEvent() && !evts.Contains(this) && !valsEqual) {
409
+ let rtEvt = new RunTimeEvent(this);
410
+ rtEvt.setInternal(InternalInterface.MG_ACT_VARIABLE);
411
+ rtEvt.setArgList(args);
412
+ evts.push(this);
413
+ evts.push(rtEvt);
414
+ }
415
+ if (this._recompute != null && (recompute || forceUpdate) && !this._dataview.InLocalDataviewCommand) {
416
+ try {
417
+ if (forceUpdate)
418
+ rec.InForceUpdate = true;
419
+ await this._recompute.execute(rec);
420
+ }
421
+ finally {
422
+ if (forceUpdate)
423
+ rec.InForceUpdate = false;
424
+ }
425
+ }
426
+ if (this._causeTableInvalidation && this.isChanged(this._val, isNullFld))
427
+ rec.setCauseInvalidation(true);
428
+ if ((recompute || forceUpdate) && !this._dataview.InLocalDataviewCommand && mainCtrl != null) {
429
+ if (mainCtrl.isChoiceControl())
430
+ await this.updateDisplay();
431
+ }
432
+ if (pendingEvents === 0 && checkForVariableChange && this.getHasChangeEvent()) {
433
+ while (evts.length > 0) {
434
+ let evt = evts.get_Item(1);
435
+ evts.RemoveAt(0);
436
+ evts.RemoveAt(0);
437
+ if (LastFocusedManager.Instance.getLastFocusedTask() == null)
438
+ evt.setTask(this.getTask());
439
+ else {
440
+ let taskRef = LastFocusedManager.Instance.getLastFocusedTask();
441
+ if (taskRef.TaskSuffixExecuted) {
442
+ taskRef = (taskRef.PathParentTask != null) ? taskRef.PathParentTask : taskRef;
443
+ }
444
+ evt.setTask(taskRef);
445
+ }
446
+ evt.setCtrl(LastFocusedManager.getLastFocusedControl());
447
+ await AccessHelper.eventsManager.handleEvent(evt, false);
448
+ }
449
+ }
450
+ }
451
+ if (recompute && !valsEqual)
452
+ this.setModified();
453
+ return !valsEqual;
454
+ }
455
+ UpdateNull(isNullFld, rec) {
456
+ if (isNullFld)
457
+ rec.setFlag(this._id, Record.FLAG_NULL);
458
+ else
459
+ rec.clearFlag(this._id, Record.FLAG_NULL);
460
+ this._isNull = isNullFld;
461
+ }
462
+ async setCellVecValue(idx, newVal, valIsNull) {
463
+ let res = false;
464
+ if (this._type === StorageAttribute.BLOB_VECTOR) {
465
+ if (this._vectorType == null) {
466
+ this._vectorType = this.isNull()
467
+ ? new VectorType(this._vecCellsType, this._vecCellsContentType, this.DefaultValue, this.isNullDefault(), this.NullAllowed, this._vecCellsSize)
468
+ : new VectorType(this._val);
469
+ }
470
+ if (this._vecCellsType === StorageAttribute.BLOB) {
471
+ let tmpNewVal = this.getCellDefualtValue();
472
+ newVal = BlobType.copyBlob(tmpNewVal, newVal);
473
+ }
474
+ res = this._vectorType.setVecCell(idx, newVal, valIsNull);
475
+ if (res) {
476
+ this._clearVectorType = false;
477
+ await this.setValueAndStartRecompute(this._vectorType.toString(), false, true, false, false);
478
+ this._clearVectorType = true;
479
+ }
480
+ }
481
+ return res;
482
+ }
483
+ getVecCellValue(idx) {
484
+ if (this._type === StorageAttribute.BLOB_VECTOR) {
485
+ if (this._vectorType == null)
486
+ this._vectorType = new VectorType(this._val);
487
+ return this._vectorType.getVecCell(idx);
488
+ }
489
+ return null;
490
+ }
491
+ setRecomputed() {
492
+ }
493
+ invalidate(forceInvalidate, clearFlags) {
494
+ let rec = this._dataview.getCurrRec();
495
+ if (!this._isVirtual || this._virAsReal || this._initExp !== null || forceInvalidate) {
496
+ this._invalidValue = true;
497
+ }
498
+ if (clearFlags && rec !== null) {
499
+ rec.clearFlag(this._id, Record.FLAG_UPDATED);
500
+ rec.clearFlag(this._id, Record.FLAG_MODIFIED);
501
+ }
502
+ }
503
+ getTableName() {
504
+ if (this._tableName == null)
505
+ return "";
506
+ return this._tableName;
507
+ }
508
+ getName() {
509
+ if (this._isParam)
510
+ return "Parameter." + this.getVarName();
511
+ else if (this._isVirtual)
512
+ return "Virtual." + this.getVarName();
513
+ else
514
+ return this.getTableName() + "." + this.getVarName();
515
+ }
516
+ isNull() {
517
+ if (super.getTask().getEvalOldValues())
518
+ return this.isOriginalValueNull();
519
+ else if (this._invalidValue)
520
+ this.takeValFromRec();
521
+ return this._isNull;
522
+ }
523
+ PrevIsNull() {
524
+ return this._prevIsNull;
525
+ }
526
+ isModified() {
527
+ let currRec = this._dataview.getCurrRec();
528
+ return currRec.isFldModified(this._id);
529
+ }
530
+ setModified() {
531
+ let rec = (this._dataview.getCurrRec());
532
+ rec.setFlag(this._id, Record.FLAG_MODIFIED);
533
+ rec.setFlag(this._id, Record.FLAG_MODIFIED_ATLEAST_ONCE);
534
+ if (this.IsVirtual)
535
+ this.modifiedAtLeastOnce = true;
536
+ }
537
+ setUpdated() {
538
+ let currRec = this._dataview.getCurrRec();
539
+ currRec.setFlag(this._id, Record.FLAG_UPDATED);
540
+ currRec.setUpdated();
541
+ }
542
+ isParam() {
543
+ return this._isParam;
544
+ }
545
+ isInEvalProcess() {
546
+ return this._inEvalProcess;
547
+ }
548
+ hasInitExp() {
549
+ return this._initExp !== null;
550
+ }
551
+ isServerRcmp() {
552
+ return this._recompute !== null && this._recompute.isServerRcmp();
553
+ }
554
+ getPicture() {
555
+ return this._picture;
556
+ }
557
+ getDataviewHeaderId() {
558
+ return this._dataviewHeaderId;
559
+ }
560
+ get IsLinkField() {
561
+ return this._isLinkFld;
562
+ }
563
+ async getInitExpVal(res, isNull) {
564
+ if (this._initExp != null)
565
+ await this.EvaluateInitExpression(res, isNull);
566
+ else
567
+ res.value = this.getDefaultValue();
568
+ }
569
+ setHasChangeEvent() {
570
+ this._hasChangeEvent = true;
571
+ }
572
+ getHasChangeEvent() {
573
+ return this._hasChangeEvent;
574
+ }
575
+ setHasZoomHandler() {
576
+ this._hasZoomHandler = true;
577
+ }
578
+ getHasZoomHandler() {
579
+ return this._hasZoomHandler;
580
+ }
581
+ isCauseTableInvalidation() {
582
+ return this._causeTableInvalidation;
583
+ }
584
+ causeTableInvalidation(causeTableInvalidation) {
585
+ this._causeTableInvalidation = causeTableInvalidation;
586
+ }
587
+ getValueForNull(checkNullArithmetic) {
588
+ let val;
589
+ if (this.NullAllowed) {
590
+ if (checkNullArithmetic && super.getTask().getNullArithmetic() === Constants.NULL_ARITH_NULLIFY) {
591
+ val = null;
592
+ }
593
+ else {
594
+ if (this._nullValue === null) {
595
+ this._nullValue = super.getMagicDefaultValue();
596
+ }
597
+ val = this._nullValue;
598
+ }
599
+ }
600
+ else {
601
+ val = super.getMagicDefaultValue();
602
+ }
603
+ return val;
604
+ }
605
+ getCtrl() {
606
+ let ctrl;
607
+ if (this._controls != null) {
608
+ for (let i = 0; i < this._controls.length; i++) {
609
+ ctrl = this._controls.get_Item(i);
610
+ if (ctrl.getForm().getTask() === this.getTask())
611
+ return ctrl;
612
+ }
613
+ }
614
+ return null;
615
+ }
616
+ async updateDisplay() {
617
+ await super.updateDisplayWithValue(this.getDispValue(), this.isNull());
618
+ }
619
+ getDispValue() {
620
+ if (this.isNull()) {
621
+ if (this._nullDisplay != null)
622
+ return this.getNullDisplay();
623
+ else
624
+ return super.getMagicDefaultValue();
625
+ }
626
+ else
627
+ return this.getValue(false);
628
+ }
629
+ get ShouldCheckRangeInCompute() {
630
+ return this.IsLinkField || (this.IsVirtual && this._dataview.HasMainTable);
631
+ }
632
+ IsForArgument(taskHasParameters) {
633
+ if (taskHasParameters) {
634
+ if (!this.isParam()) {
635
+ return false;
636
+ }
637
+ }
638
+ else {
639
+ if (!this.IsVirtual) {
640
+ return false;
641
+ }
642
+ }
643
+ return true;
644
+ }
645
+ }
646
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiRmllbGQuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi9wcm9qZWN0cy9lbmdpbmUvc3JjL2RhdGEvRmllbGQudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUFDLG9CQUFvQixFQUFFLEtBQUssRUFBRSxJQUFJLEVBQUUsT0FBTyxFQUFFLE9BQU8sRUFBRSxRQUFRLEVBQUUsaUJBQWlCLEVBQUMsTUFBTSxzQkFBc0I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