@magic-xpa/engine 4.1100.0-dev4110.19 → 4.1100.0-dev4110.190

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