@magic-xpa/engine 4.1100.0-dev4110.98 → 4.1100.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (492) hide show
  1. package/README.md +7 -7
  2. package/{esm2020 → esm2022}/index.mjs +188 -188
  3. package/{esm2020 → esm2022}/magic-xpa-engine.mjs +1 -1
  4. package/esm2022/src/AccessHelper.mjs +15 -0
  5. package/esm2022/src/ClientManager.mjs +421 -0
  6. package/esm2022/src/CommandsProcessorBase.mjs +56 -0
  7. package/{esm2020 → esm2022}/src/CommandsProcessorManager.mjs +25 -25
  8. package/esm2022/src/CommandsTable.mjs +162 -0
  9. package/esm2022/src/ConstInterface.mjs +517 -0
  10. package/{esm2020 → esm2022}/src/CurrentClientVersion.mjs +2 -2
  11. package/esm2022/src/FlowMonitorInterface.mjs +16 -0
  12. package/esm2022/src/GUIManager.mjs +62 -0
  13. package/esm2022/src/GlobalCommandsManager.mjs +34 -0
  14. package/esm2022/src/GuiEventsProcessor.mjs +156 -0
  15. package/{esm2020 → esm2022}/src/ICommandsTable.mjs +1 -1
  16. package/esm2022/src/ServerConfig.mjs +122 -0
  17. package/{esm2020 → esm2022}/src/bridge/IGuiEvent.mjs +19 -19
  18. package/esm2022/src/bridge/MagicBridge.mjs +41 -0
  19. package/esm2022/src/commands/ClientOriginatedCommandTaskTag.mjs +12 -0
  20. package/{esm2020 → esm2022}/src/commands/ClientToServer/AddUserLocateDataViewCommand.mjs +8 -8
  21. package/{esm2020 → esm2022}/src/commands/ClientToServer/AddUserRangeDataviewCommand.mjs +9 -9
  22. package/{esm2020 → esm2022}/src/commands/ClientToServer/AddUserSortDataViewCommand.mjs +9 -9
  23. package/esm2022/src/commands/ClientToServer/BrowserEscEventCommand.mjs +26 -0
  24. package/{esm2020 → esm2022}/src/commands/ClientToServer/ClientOriginatedCommand.mjs +14 -14
  25. package/{esm2020 → esm2022}/src/commands/ClientToServer/ClientOriginatedCommandSerializer.mjs +59 -59
  26. package/esm2022/src/commands/ClientToServer/ColumnSortEventCommand.mjs +29 -0
  27. package/esm2022/src/commands/ClientToServer/CommandFactory.mjs +261 -0
  28. package/esm2022/src/commands/ClientToServer/CommandSerializationHelper.mjs +67 -0
  29. package/esm2022/src/commands/ClientToServer/ComputeEventCommand.mjs +26 -0
  30. package/{esm2020 → esm2022}/src/commands/ClientToServer/ContextTerminationEventCommand.mjs +24 -21
  31. package/{esm2020 → esm2022}/src/commands/ClientToServer/ContextTimeoutResetCommand.mjs +23 -20
  32. package/{esm2020 → esm2022}/src/commands/ClientToServer/ControlItemsRefreshCommand.mjs +8 -8
  33. package/esm2022/src/commands/ClientToServer/DataViewOutputCommand.mjs +13 -0
  34. package/{esm2020 → esm2022}/src/commands/ClientToServer/DataviewCommand.mjs +44 -44
  35. package/esm2022/src/commands/ClientToServer/EvaluateCommand.mjs +40 -0
  36. package/{esm2020 → esm2022}/src/commands/ClientToServer/EventCommand.mjs +43 -40
  37. package/esm2022/src/commands/ClientToServer/ExecOperCommand.mjs +70 -0
  38. package/esm2022/src/commands/ClientToServer/FetchDataControlValuesEventCommand.mjs +25 -0
  39. package/{esm2020 → esm2022}/src/commands/ClientToServer/GlobalParamsQueryCommand.mjs +10 -10
  40. package/{esm2020 → esm2022}/src/commands/ClientToServer/ICommandTaskTag.mjs +1 -1
  41. package/esm2022/src/commands/ClientToServer/IndexChangeEventCommand.mjs +24 -0
  42. package/esm2022/src/commands/ClientToServer/IniputForceWriteCommand.mjs +26 -0
  43. package/{esm2020 → esm2022}/src/commands/ClientToServer/NonReversibleExitEventCommand.mjs +26 -23
  44. package/{esm2020 → esm2022}/src/commands/ClientToServer/QueryCommand.mjs +20 -20
  45. package/esm2022/src/commands/ClientToServer/RecomputeCommand.mjs +30 -0
  46. package/esm2022/src/commands/ClientToServer/RefreshEventCommand.mjs +30 -0
  47. package/esm2022/src/commands/ClientToServer/RefreshScreenEventCommand.mjs +27 -0
  48. package/esm2022/src/commands/ClientToServer/RollbackEventCommand.mjs +43 -0
  49. package/esm2022/src/commands/ClientToServer/SelectProgramCommand.mjs +19 -0
  50. package/{esm2020 → esm2022}/src/commands/ClientToServer/SetTransactionStateDataviewCommand.mjs +9 -9
  51. package/esm2022/src/commands/ClientToServer/SubformOpenEventCommand.mjs +24 -0
  52. package/esm2022/src/commands/ClientToServer/SubformRefreshEventCommand.mjs +27 -0
  53. package/esm2022/src/commands/ClientToServer/TransactionCommand.mjs +34 -0
  54. package/{esm2020 → esm2022}/src/commands/ClientToServer/UnloadCommand.mjs +18 -15
  55. package/esm2022/src/commands/ClientToServer/WriteMessageToServerLogCommand.mjs +18 -0
  56. package/esm2022/src/commands/DataViewCommandBase.mjs +8 -0
  57. package/{esm2020 → esm2022}/src/commands/IClientCommand.mjs +1 -1
  58. package/esm2022/src/commands/IClientTargetedCommand.mjs +13 -0
  59. package/{esm2020 → esm2022}/src/commands/IClientToServerCommandInfo.mjs +2 -2
  60. package/esm2022/src/commands/ServerToClient/AbortCommand.mjs +65 -0
  61. package/{esm2020 → esm2022}/src/commands/ServerToClient/AddLocateCommand.mjs +21 -21
  62. package/{esm2020 → esm2022}/src/commands/ServerToClient/AddRangeCommand.mjs +62 -62
  63. package/{esm2020 → esm2022}/src/commands/ServerToClient/AddSortCommand.mjs +33 -33
  64. package/esm2022/src/commands/ServerToClient/ClientRefreshCommand.mjs +25 -0
  65. package/esm2022/src/commands/ServerToClient/ClientTargetedCommandBase.mjs +24 -0
  66. package/esm2022/src/commands/ServerToClient/EnhancedVerifyCommand.mjs +45 -0
  67. package/esm2022/src/commands/ServerToClient/OpenURLCommand.mjs +221 -0
  68. package/{esm2020 → esm2022}/src/commands/ServerToClient/ResetLocateCommand.mjs +14 -14
  69. package/{esm2020 → esm2022}/src/commands/ServerToClient/ResetRangeCommand.mjs +14 -14
  70. package/{esm2020 → esm2022}/src/commands/ServerToClient/ResetSortCommand.mjs +14 -14
  71. package/esm2022/src/commands/ServerToClient/ResultCommand.mjs +37 -0
  72. package/esm2022/src/commands/ServerToClient/VerifyCommand.mjs +83 -0
  73. package/{esm2020 → esm2022}/src/commands/ServerToClient/XMLBasedCommandBuilder.mjs +132 -132
  74. package/{esm2020 → esm2022}/src/communications/IConnectionStateManager.mjs +1 -1
  75. package/esm2022/src/communications/InteractiveCommunicationsFailureHandler.mjs +15 -0
  76. package/{esm2020 → esm2022}/src/data/DataSourceIdKey.mjs +2 -2
  77. package/esm2022/src/data/DataView.mjs +1613 -0
  78. package/{esm2020 → esm2022}/src/data/DataViewBase.mjs +3 -3
  79. package/esm2022/src/data/DataviewManager.mjs +28 -0
  80. package/esm2022/src/data/DataviewManagerBase.mjs +15 -0
  81. package/esm2022/src/data/DvCache.mjs +67 -0
  82. package/esm2022/src/data/Field.mjs +646 -0
  83. package/esm2022/src/data/FieldBase.mjs +15 -0
  84. package/esm2022/src/data/FieldsTable.mjs +103 -0
  85. package/{esm2020 → esm2022}/src/data/IRecordsTable.mjs +1 -1
  86. package/{esm2020 → esm2022}/src/data/Key.mjs +88 -88
  87. package/esm2022/src/data/Record.mjs +880 -0
  88. package/{esm2020 → esm2022}/src/data/RecordOutOfDataViewException.mjs +15 -15
  89. package/esm2022/src/data/RecordsTable.mjs +267 -0
  90. package/{esm2020 → esm2022}/src/data/TaskTransactionManager.mjs +107 -103
  91. package/{esm2020 → esm2022}/src/data/XMLBasedDcValuesBuilder.mjs +74 -74
  92. package/{esm2020 → esm2022}/src/enums.mjs +23 -23
  93. package/esm2022/src/env/EnvVariablesTable.mjs +340 -0
  94. package/esm2022/src/env/Environment.mjs +487 -0
  95. package/{esm2020 → esm2022}/src/env/ILanguageData.mjs +1 -1
  96. package/esm2022/src/env/LanguageData.mjs +227 -0
  97. package/{esm2020 → esm2022}/src/env/MirrorString.mjs +65 -65
  98. package/esm2022/src/event/ActionManager.mjs +91 -0
  99. package/esm2022/src/event/Event.mjs +1333 -0
  100. package/esm2022/src/event/EventHandler.mjs +766 -0
  101. package/esm2022/src/event/EventHandlerPosition.mjs +204 -0
  102. package/esm2022/src/event/EventsManager.mjs +2988 -0
  103. package/{esm2020 → esm2022}/src/event/IEventsManager.mjs +6 -6
  104. package/esm2022/src/event/RunTimeEvent.mjs +399 -0
  105. package/{esm2020 → esm2022}/src/event/RunTimeEventBase.mjs +3 -3
  106. package/esm2022/src/event/UserEventsTable.mjs +47 -0
  107. package/esm2022/src/exp/ExpTable.mjs +57 -0
  108. package/esm2022/src/exp/Expression.mjs +200 -0
  109. package/esm2022/src/exp/ExpressionDict.mjs +727 -0
  110. package/esm2022/src/exp/ExpressionEvaluator.mjs +4206 -0
  111. package/esm2022/src/exp/ExpressionLocalJpn.mjs +314 -0
  112. package/{esm2020 → esm2022}/src/exp/GlobalParamsTable.mjs +85 -85
  113. package/esm2022/src/exp/YesNoExp.mjs +36 -0
  114. package/esm2022/src/gui/CreatedFormVector.mjs +23 -0
  115. package/esm2022/src/gui/FormsTable.mjs +66 -0
  116. package/esm2022/src/gui/MgControl.mjs +363 -0
  117. package/esm2022/src/gui/MgForm.mjs +1224 -0
  118. package/esm2022/src/http/HttpManager.mjs +97 -0
  119. package/esm2022/src/http/client/HttpClientAsync.mjs +68 -0
  120. package/{esm2020 → esm2022}/src/http/client/HttpClientBase.mjs +132 -132
  121. package/esm2022/src/http/client/HttpClientEvents.mjs +39 -0
  122. package/esm2022/src/http/client/HttpClientSync.mjs +42 -0
  123. package/esm2022/src/http/client/HttpUtility.mjs +84 -0
  124. package/{esm2020 → esm2022}/src/http/client/ICommunicationsFailureHandler.mjs +1 -1
  125. package/{esm2020 → esm2022}/src/remote/AddUserLocateRemoteDataViewCommand.mjs +18 -18
  126. package/{esm2020 → esm2022}/src/remote/AddUserRangeRemoteDataViewCommand.mjs +18 -18
  127. package/{esm2020 → esm2022}/src/remote/AddUserSortRemoteDataViewCommand.mjs +18 -18
  128. package/esm2022/src/remote/RemoteCommandsProcessor.mjs +883 -0
  129. package/{esm2020 → esm2022}/src/remote/RemoteControlItemsRefreshCommand.mjs +25 -25
  130. package/{esm2020 → esm2022}/src/remote/RemoteDataViewCommandBase.mjs +24 -24
  131. package/{esm2020 → esm2022}/src/remote/RemoteDataViewCommandFactory.mjs +60 -60
  132. package/{esm2020 → esm2022}/src/remote/RemoteDataViewCommandUpdateNonModifiable.mjs +15 -15
  133. package/{esm2020 → esm2022}/src/remote/RemoteDataviewManager.mjs +17 -17
  134. package/{esm2020 → esm2022}/src/remote/RemoteInitDataViewCommand.mjs +10 -10
  135. package/{esm2020 → esm2022}/src/remote/ResetUserLocateRemoteDataviewCommand.mjs +16 -16
  136. package/{esm2020 → esm2022}/src/remote/ResetUserRangeRemoteDataviewCommand.mjs +12 -12
  137. package/{esm2020 → esm2022}/src/remote/ResetUserSortRemoteDataviewCommand.mjs +15 -15
  138. package/esm2022/src/remote/ServerError.mjs +40 -0
  139. package/{esm2020 → esm2022}/src/remote/SetTransactionStateRemoteDataViewCommand.mjs +19 -19
  140. package/esm2022/src/rt/Argument.mjs +265 -0
  141. package/esm2022/src/rt/ArgumentsList.mjs +103 -0
  142. package/esm2022/src/rt/Boundary.mjs +152 -0
  143. package/esm2022/src/rt/CompMainPrgTable.mjs +63 -0
  144. package/esm2022/src/rt/DataviewHeaderBase.mjs +98 -0
  145. package/{esm2020 → esm2022}/src/rt/DataviewHeaderFactory.mjs +6 -6
  146. package/esm2022/src/rt/DataviewHeaders.mjs +53 -0
  147. package/{esm2020 → esm2022}/src/rt/DataviewHeadersSaxHandler.mjs +38 -38
  148. package/{esm2020 → esm2022}/src/rt/ExecutionStack.mjs +94 -94
  149. package/{esm2020 → esm2022}/src/rt/ExecutionStackEntry.mjs +17 -17
  150. package/{esm2020 → esm2022}/src/rt/HandlersTable.mjs +96 -96
  151. package/{esm2020 → esm2022}/src/rt/IDataSourceViewDefinition.mjs +1 -1
  152. package/{esm2020 → esm2022}/src/rt/IDataviewHeader.mjs +1 -1
  153. package/{esm2020 → esm2022}/src/rt/IResultValue.mjs +1 -1
  154. package/esm2022/src/rt/LastFocusedManager.mjs +65 -0
  155. package/esm2022/src/rt/Operation.mjs +735 -0
  156. package/esm2022/src/rt/OperationTable.mjs +67 -0
  157. package/esm2022/src/rt/Recompute.mjs +355 -0
  158. package/{esm2020 → esm2022}/src/rt/RecomputeTable.mjs +62 -62
  159. package/{esm2020 → esm2022}/src/rt/RemoteDataviewHeader.mjs +108 -108
  160. package/esm2022/src/rt/ResultValue.mjs +10 -0
  161. package/esm2022/src/rt/TableCache.mjs +177 -0
  162. package/esm2022/src/rt/TableCacheManager.mjs +67 -0
  163. package/esm2022/src/rt/Transaction.mjs +53 -0
  164. package/esm2022/src/security/UserDetails.mjs +71 -0
  165. package/{esm2020 → esm2022}/src/tasks/IMGDataCollection.mjs +1 -1
  166. package/esm2022/src/tasks/MGData.mjs +552 -0
  167. package/esm2022/src/tasks/MGDataCollection.mjs +252 -0
  168. package/esm2022/src/tasks/RCTimer.mjs +63 -0
  169. package/{esm2020 → esm2022}/src/tasks/RemoteTaskService.mjs +44 -44
  170. package/esm2022/src/tasks/Task.mjs +2499 -0
  171. package/esm2022/src/tasks/TaskBase.mjs +83 -0
  172. package/{esm2020 → esm2022}/src/tasks/TaskServiceBase.mjs +24 -24
  173. package/esm2022/src/tasks/TasksTable.mjs +80 -0
  174. package/esm2022/src/tasks/sort/Sort.mjs +5 -0
  175. package/{esm2020 → esm2022}/src/tasks/sort/SortCollection.mjs +67 -67
  176. package/{esm2020 → esm2022}/src/util/ConstUtils.mjs +13 -13
  177. package/esm2022/src/util/FlowMonitorQueue.mjs +451 -0
  178. package/{esm2020 → esm2022}/src/util/HeapSort.mjs +69 -69
  179. package/{esm2020 → esm2022}/src/util/IMirrorXML.mjs +1 -1
  180. package/{esm2020 → esm2022}/src/util/IServerConfig.mjs +1 -1
  181. package/{esm2020 → esm2022}/src/util/MgBlockingQueue.mjs +1 -1
  182. package/esm2022/src/util/MgPriorityBlockingQueue.mjs +74 -0
  183. package/esm2022/src/util/MgPriorityQueue.mjs +66 -0
  184. package/{esm2020 → esm2022}/src/util/ParamParseResult.mjs +7 -7
  185. package/esm2022/src/util/PrmMap.mjs +152 -0
  186. package/esm2022/src/util/ReturnResult.mjs +46 -0
  187. package/esm2022/src/util/ReturnResultBase.mjs +18 -0
  188. package/esm2022/src/util/Scrambler.mjs +89 -0
  189. package/esm2022/src/util/UniqueIDUtils.mjs +13 -0
  190. package/{esm2020 → esm2022}/src/util/cookie.service.mjs +92 -92
  191. package/{fesm2020 → fesm2022}/magic-xpa-engine.mjs +29888 -29690
  192. package/fesm2022/magic-xpa-engine.mjs.map +1 -0
  193. package/index.d.ts +187 -187
  194. package/package.json +8 -14
  195. package/src/AccessHelper.d.ts +20 -20
  196. package/src/ClientManager.d.ts +35 -32
  197. package/src/CommandsProcessorBase.d.ts +23 -23
  198. package/src/CommandsProcessorManager.d.ts +6 -6
  199. package/src/CommandsTable.d.ts +22 -22
  200. package/src/ConstInterface.d.ts +516 -515
  201. package/src/CurrentClientVersion.d.ts +1 -1
  202. package/src/FlowMonitorInterface.d.ts +15 -15
  203. package/src/GUIManager.d.ts +17 -17
  204. package/src/GlobalCommandsManager.d.ts +17 -17
  205. package/src/GuiEventsProcessor.d.ts +24 -24
  206. package/src/ICommandsTable.d.ts +9 -9
  207. package/src/ServerConfig.d.ts +35 -34
  208. package/src/bridge/IGuiEvent.d.ts +19 -19
  209. package/src/bridge/MagicBridge.d.ts +16 -16
  210. package/src/commands/ClientOriginatedCommandTaskTag.d.ts +8 -8
  211. package/src/commands/ClientToServer/AddUserLocateDataViewCommand.d.ts +4 -4
  212. package/src/commands/ClientToServer/AddUserRangeDataviewCommand.d.ts +6 -6
  213. package/src/commands/ClientToServer/AddUserSortDataViewCommand.d.ts +6 -6
  214. package/src/commands/ClientToServer/BrowserEscEventCommand.d.ts +9 -8
  215. package/src/commands/ClientToServer/ClientOriginatedCommand.d.ts +8 -8
  216. package/src/commands/ClientToServer/ClientOriginatedCommandSerializer.d.ts +6 -6
  217. package/src/commands/ClientToServer/ColumnSortEventCommand.d.ts +11 -10
  218. package/src/commands/ClientToServer/CommandFactory.d.ts +64 -64
  219. package/src/commands/ClientToServer/CommandSerializationHelper.d.ts +20 -20
  220. package/src/commands/ClientToServer/ComputeEventCommand.d.ts +9 -8
  221. package/src/commands/ClientToServer/ContextTerminationEventCommand.d.ts +8 -7
  222. package/src/commands/ClientToServer/ContextTimeoutResetCommand.d.ts +8 -7
  223. package/src/commands/ClientToServer/ControlItemsRefreshCommand.d.ts +6 -6
  224. package/src/commands/ClientToServer/DataViewOutputCommand.d.ts +9 -9
  225. package/src/commands/ClientToServer/DataviewCommand.d.ts +32 -32
  226. package/src/commands/ClientToServer/EvaluateCommand.d.ts +16 -15
  227. package/src/commands/ClientToServer/EventCommand.d.ts +16 -15
  228. package/src/commands/ClientToServer/ExecOperCommand.d.ts +24 -23
  229. package/src/commands/ClientToServer/FetchDataControlValuesEventCommand.d.ts +9 -8
  230. package/src/commands/ClientToServer/GlobalParamsQueryCommand.d.ts +5 -5
  231. package/src/commands/ClientToServer/ICommandTaskTag.d.ts +3 -3
  232. package/src/commands/ClientToServer/IndexChangeEventCommand.d.ts +9 -8
  233. package/src/commands/ClientToServer/IniputForceWriteCommand.d.ts +11 -10
  234. package/src/commands/ClientToServer/NonReversibleExitEventCommand.d.ts +9 -8
  235. package/src/commands/ClientToServer/QueryCommand.d.ts +8 -8
  236. package/src/commands/ClientToServer/RecomputeCommand.d.ts +12 -11
  237. package/src/commands/ClientToServer/RefreshEventCommand.d.ts +13 -12
  238. package/src/commands/ClientToServer/RefreshScreenEventCommand.d.ts +11 -10
  239. package/src/commands/ClientToServer/RollbackEventCommand.d.ts +15 -14
  240. package/src/commands/ClientToServer/SelectProgramCommand.d.ts +7 -6
  241. package/src/commands/ClientToServer/SetTransactionStateDataviewCommand.d.ts +5 -5
  242. package/src/commands/ClientToServer/SubformOpenEventCommand.d.ts +9 -8
  243. package/src/commands/ClientToServer/SubformRefreshEventCommand.d.ts +10 -9
  244. package/src/commands/ClientToServer/TransactionCommand.d.ts +14 -12
  245. package/src/commands/ClientToServer/UnloadCommand.d.ts +8 -7
  246. package/src/commands/ClientToServer/WriteMessageToServerLogCommand.d.ts +6 -6
  247. package/src/commands/DataViewCommandBase.d.ts +6 -6
  248. package/src/commands/IClientCommand.d.ts +2 -2
  249. package/src/commands/IClientTargetedCommand.d.ts +12 -12
  250. package/src/commands/IClientToServerCommandInfo.d.ts +4 -3
  251. package/src/commands/ServerToClient/AbortCommand.d.ts +11 -11
  252. package/src/commands/ServerToClient/AddLocateCommand.d.ts +6 -6
  253. package/src/commands/ServerToClient/AddRangeCommand.d.ts +10 -10
  254. package/src/commands/ServerToClient/AddSortCommand.d.ts +9 -9
  255. package/src/commands/ServerToClient/ClientRefreshCommand.d.ts +7 -7
  256. package/src/commands/ServerToClient/ClientTargetedCommandBase.d.ts +12 -12
  257. package/src/commands/ServerToClient/EnhancedVerifyCommand.d.ts +13 -13
  258. package/src/commands/ServerToClient/OpenURLCommand.d.ts +21 -21
  259. package/src/commands/ServerToClient/ResetLocateCommand.d.ts +6 -6
  260. package/src/commands/ServerToClient/ResetRangeCommand.d.ts +6 -6
  261. package/src/commands/ServerToClient/ResetSortCommand.d.ts +6 -6
  262. package/src/commands/ServerToClient/ResultCommand.d.ts +10 -10
  263. package/src/commands/ServerToClient/VerifyCommand.d.ts +17 -17
  264. package/src/commands/ServerToClient/XMLBasedCommandBuilder.d.ts +11 -11
  265. package/src/communications/IConnectionStateManager.d.ts +4 -4
  266. package/src/communications/InteractiveCommunicationsFailureHandler.d.ts +6 -6
  267. package/src/data/DataSourceIdKey.d.ts +2 -2
  268. package/src/data/DataView.d.ts +162 -162
  269. package/src/data/DataViewBase.d.ts +12 -12
  270. package/src/data/DataviewManager.d.ts +14 -14
  271. package/src/data/DataviewManagerBase.d.ts +11 -11
  272. package/src/data/DvCache.d.ts +15 -15
  273. package/src/data/Field.d.ts +103 -103
  274. package/src/data/FieldBase.d.ts +23 -23
  275. package/src/data/FieldsTable.d.ts +27 -27
  276. package/src/data/IRecordsTable.d.ts +7 -7
  277. package/src/data/Key.d.ts +15 -15
  278. package/src/data/Record.d.ts +157 -156
  279. package/src/data/RecordOutOfDataViewException.d.ts +10 -10
  280. package/src/data/RecordsTable.d.ts +38 -38
  281. package/src/data/TaskTransactionManager.d.ts +17 -17
  282. package/src/data/XMLBasedDcValuesBuilder.d.ts +11 -11
  283. package/src/enums.d.ts +21 -21
  284. package/src/env/EnvVariablesTable.d.ts +17 -17
  285. package/src/env/Environment.d.ts +118 -118
  286. package/src/env/ILanguageData.d.ts +3 -3
  287. package/src/env/LanguageData.d.ts +20 -20
  288. package/src/env/MirrorString.d.ts +15 -15
  289. package/src/event/ActionManager.d.ts +14 -14
  290. package/src/event/Event.d.ts +79 -79
  291. package/src/event/EventHandler.d.ts +66 -66
  292. package/src/event/EventHandlerPosition.d.ts +25 -25
  293. package/src/event/EventsManager.d.ts +205 -204
  294. package/src/event/IEventsManager.d.ts +77 -77
  295. package/src/event/RunTimeEvent.d.ts +126 -123
  296. package/src/event/RunTimeEventBase.d.ts +5 -5
  297. package/src/event/UserEventsTable.d.ts +11 -11
  298. package/src/exp/ExpTable.d.ts +11 -11
  299. package/src/exp/Expression.d.ts +37 -37
  300. package/src/exp/ExpressionDict.d.ts +12 -12
  301. package/src/exp/ExpressionEvaluator.d.ts +198 -198
  302. package/src/exp/ExpressionLocalJpn.d.ts +18 -18
  303. package/src/exp/GlobalParamsTable.d.ts +19 -19
  304. package/src/exp/YesNoExp.d.ts +9 -9
  305. package/src/gui/CreatedFormVector.d.ts +10 -10
  306. package/src/gui/FormsTable.d.ts +15 -15
  307. package/src/gui/MgControl.d.ts +60 -60
  308. package/src/gui/MgForm.d.ts +96 -93
  309. package/src/http/HttpManager.d.ts +25 -25
  310. package/src/http/client/HttpClientAsync.d.ts +16 -16
  311. package/src/http/client/HttpClientBase.d.ts +30 -30
  312. package/src/http/client/HttpClientEvents.d.ts +18 -18
  313. package/src/http/client/HttpClientSync.d.ts +17 -17
  314. package/src/http/client/HttpUtility.d.ts +10 -10
  315. package/src/http/client/ICommunicationsFailureHandler.d.ts +5 -5
  316. package/src/remote/AddUserLocateRemoteDataViewCommand.d.ts +8 -8
  317. package/src/remote/AddUserRangeRemoteDataViewCommand.d.ts +8 -8
  318. package/src/remote/AddUserSortRemoteDataViewCommand.d.ts +8 -8
  319. package/src/remote/RemoteCommandsProcessor.d.ts +51 -51
  320. package/src/remote/RemoteControlItemsRefreshCommand.d.ts +8 -8
  321. package/src/remote/RemoteDataViewCommandBase.d.ts +10 -10
  322. package/src/remote/RemoteDataViewCommandFactory.d.ts +6 -6
  323. package/src/remote/RemoteDataViewCommandUpdateNonModifiable.d.ts +8 -8
  324. package/src/remote/RemoteDataviewManager.d.ts +9 -9
  325. package/src/remote/RemoteInitDataViewCommand.d.ts +7 -7
  326. package/src/remote/ResetUserLocateRemoteDataviewCommand.d.ts +7 -7
  327. package/src/remote/ResetUserRangeRemoteDataviewCommand.d.ts +7 -7
  328. package/src/remote/ResetUserSortRemoteDataviewCommand.d.ts +7 -7
  329. package/src/remote/ServerError.d.ts +16 -16
  330. package/src/remote/SetTransactionStateRemoteDataViewCommand.d.ts +8 -8
  331. package/src/rt/Argument.d.ts +36 -36
  332. package/src/rt/ArgumentsList.d.ts +24 -24
  333. package/src/rt/Boundary.d.ts +27 -27
  334. package/src/rt/CompMainPrgTable.d.ts +10 -10
  335. package/src/rt/DataviewHeaderBase.d.ts +34 -34
  336. package/src/rt/DataviewHeaderFactory.d.ts +5 -5
  337. package/src/rt/DataviewHeaders.d.ts +12 -12
  338. package/src/rt/DataviewHeadersSaxHandler.d.ts +10 -10
  339. package/src/rt/ExecutionStack.d.ts +22 -22
  340. package/src/rt/ExecutionStackEntry.d.ts +7 -7
  341. package/src/rt/HandlersTable.d.ts +19 -19
  342. package/src/rt/IDataSourceViewDefinition.d.ts +6 -6
  343. package/src/rt/IDataviewHeader.d.ts +10 -10
  344. package/src/rt/IResultValue.d.ts +4 -4
  345. package/src/rt/LastFocusedManager.d.ts +23 -23
  346. package/src/rt/Operation.d.ts +97 -97
  347. package/src/rt/OperationTable.d.ts +15 -15
  348. package/src/rt/Recompute.d.ts +41 -41
  349. package/src/rt/RecomputeTable.d.ts +9 -9
  350. package/src/rt/RemoteDataviewHeader.d.ts +14 -14
  351. package/src/rt/ResultValue.d.ts +7 -7
  352. package/src/rt/TableCache.d.ts +29 -29
  353. package/src/rt/TableCacheManager.d.ts +10 -10
  354. package/src/rt/Transaction.d.ts +23 -23
  355. package/src/security/UserDetails.d.ts +16 -16
  356. package/src/tasks/IMGDataCollection.d.ts +26 -26
  357. package/src/tasks/MGData.d.ts +63 -63
  358. package/src/tasks/MGDataCollection.d.ts +42 -42
  359. package/src/tasks/RCTimer.d.ts +13 -13
  360. package/src/tasks/RemoteTaskService.d.ts +16 -16
  361. package/src/tasks/Task.d.ts +312 -312
  362. package/src/tasks/TaskBase.d.ts +123 -123
  363. package/src/tasks/TaskServiceBase.d.ts +16 -16
  364. package/src/tasks/TasksTable.d.ts +21 -21
  365. package/src/tasks/sort/Sort.d.ts +4 -4
  366. package/src/tasks/sort/SortCollection.d.ts +11 -11
  367. package/src/util/ConstUtils.d.ts +3 -3
  368. package/src/util/FlowMonitorQueue.d.ts +70 -70
  369. package/src/util/HeapSort.d.ts +6 -6
  370. package/src/util/IMirrorXML.d.ts +6 -6
  371. package/src/util/IServerConfig.d.ts +11 -11
  372. package/src/util/MgBlockingQueue.d.ts +5 -5
  373. package/src/util/MgPriorityBlockingQueue.d.ts +17 -17
  374. package/src/util/MgPriorityQueue.d.ts +13 -13
  375. package/src/util/ParamParseResult.d.ts +6 -6
  376. package/src/util/PrmMap.d.ts +28 -28
  377. package/src/util/ReturnResult.d.ts +18 -18
  378. package/src/util/ReturnResultBase.d.ts +11 -11
  379. package/src/util/Scrambler.d.ts +10 -10
  380. package/src/util/UniqueIDUtils.d.ts +4 -4
  381. package/src/util/cookie.service.d.ts +8 -8
  382. package/esm2020/src/AccessHelper.mjs +0 -9
  383. package/esm2020/src/ClientManager.mjs +0 -399
  384. package/esm2020/src/CommandsProcessorBase.mjs +0 -58
  385. package/esm2020/src/CommandsTable.mjs +0 -162
  386. package/esm2020/src/ConstInterface.mjs +0 -516
  387. package/esm2020/src/FlowMonitorInterface.mjs +0 -16
  388. package/esm2020/src/GUIManager.mjs +0 -62
  389. package/esm2020/src/GlobalCommandsManager.mjs +0 -34
  390. package/esm2020/src/GuiEventsProcessor.mjs +0 -154
  391. package/esm2020/src/ServerConfig.mjs +0 -117
  392. package/esm2020/src/bridge/MagicBridge.mjs +0 -41
  393. package/esm2020/src/commands/ClientOriginatedCommandTaskTag.mjs +0 -11
  394. package/esm2020/src/commands/ClientToServer/BrowserEscEventCommand.mjs +0 -23
  395. package/esm2020/src/commands/ClientToServer/ColumnSortEventCommand.mjs +0 -26
  396. package/esm2020/src/commands/ClientToServer/CommandFactory.mjs +0 -260
  397. package/esm2020/src/commands/ClientToServer/CommandSerializationHelper.mjs +0 -69
  398. package/esm2020/src/commands/ClientToServer/ComputeEventCommand.mjs +0 -23
  399. package/esm2020/src/commands/ClientToServer/DataViewOutputCommand.mjs +0 -13
  400. package/esm2020/src/commands/ClientToServer/EvaluateCommand.mjs +0 -36
  401. package/esm2020/src/commands/ClientToServer/ExecOperCommand.mjs +0 -67
  402. package/esm2020/src/commands/ClientToServer/FetchDataControlValuesEventCommand.mjs +0 -22
  403. package/esm2020/src/commands/ClientToServer/IndexChangeEventCommand.mjs +0 -21
  404. package/esm2020/src/commands/ClientToServer/IniputForceWriteCommand.mjs +0 -23
  405. package/esm2020/src/commands/ClientToServer/RecomputeCommand.mjs +0 -27
  406. package/esm2020/src/commands/ClientToServer/RefreshEventCommand.mjs +0 -27
  407. package/esm2020/src/commands/ClientToServer/RefreshScreenEventCommand.mjs +0 -24
  408. package/esm2020/src/commands/ClientToServer/RollbackEventCommand.mjs +0 -39
  409. package/esm2020/src/commands/ClientToServer/SelectProgramCommand.mjs +0 -15
  410. package/esm2020/src/commands/ClientToServer/SubformOpenEventCommand.mjs +0 -21
  411. package/esm2020/src/commands/ClientToServer/SubformRefreshEventCommand.mjs +0 -24
  412. package/esm2020/src/commands/ClientToServer/TransactionCommand.mjs +0 -28
  413. package/esm2020/src/commands/ClientToServer/WriteMessageToServerLogCommand.mjs +0 -18
  414. package/esm2020/src/commands/DataViewCommandBase.mjs +0 -10
  415. package/esm2020/src/commands/IClientTargetedCommand.mjs +0 -9
  416. package/esm2020/src/commands/ServerToClient/AbortCommand.mjs +0 -65
  417. package/esm2020/src/commands/ServerToClient/ClientRefreshCommand.mjs +0 -25
  418. package/esm2020/src/commands/ServerToClient/ClientTargetedCommandBase.mjs +0 -27
  419. package/esm2020/src/commands/ServerToClient/EnhancedVerifyCommand.mjs +0 -45
  420. package/esm2020/src/commands/ServerToClient/OpenURLCommand.mjs +0 -221
  421. package/esm2020/src/commands/ServerToClient/ResultCommand.mjs +0 -37
  422. package/esm2020/src/commands/ServerToClient/VerifyCommand.mjs +0 -83
  423. package/esm2020/src/communications/InteractiveCommunicationsFailureHandler.mjs +0 -17
  424. package/esm2020/src/data/DataView.mjs +0 -1610
  425. package/esm2020/src/data/DataviewManager.mjs +0 -28
  426. package/esm2020/src/data/DataviewManagerBase.mjs +0 -15
  427. package/esm2020/src/data/DvCache.mjs +0 -67
  428. package/esm2020/src/data/Field.mjs +0 -646
  429. package/esm2020/src/data/FieldBase.mjs +0 -18
  430. package/esm2020/src/data/FieldsTable.mjs +0 -103
  431. package/esm2020/src/data/Record.mjs +0 -846
  432. package/esm2020/src/data/RecordsTable.mjs +0 -267
  433. package/esm2020/src/env/EnvVariablesTable.mjs +0 -340
  434. package/esm2020/src/env/Environment.mjs +0 -489
  435. package/esm2020/src/env/LanguageData.mjs +0 -226
  436. package/esm2020/src/event/ActionManager.mjs +0 -91
  437. package/esm2020/src/event/Event.mjs +0 -1333
  438. package/esm2020/src/event/EventHandler.mjs +0 -766
  439. package/esm2020/src/event/EventHandlerPosition.mjs +0 -204
  440. package/esm2020/src/event/EventsManager.mjs +0 -2975
  441. package/esm2020/src/event/RunTimeEvent.mjs +0 -392
  442. package/esm2020/src/event/UserEventsTable.mjs +0 -47
  443. package/esm2020/src/exp/ExpTable.mjs +0 -59
  444. package/esm2020/src/exp/Expression.mjs +0 -200
  445. package/esm2020/src/exp/ExpressionDict.mjs +0 -727
  446. package/esm2020/src/exp/ExpressionEvaluator.mjs +0 -4208
  447. package/esm2020/src/exp/ExpressionLocalJpn.mjs +0 -314
  448. package/esm2020/src/exp/YesNoExp.mjs +0 -36
  449. package/esm2020/src/gui/CreatedFormVector.mjs +0 -23
  450. package/esm2020/src/gui/FormsTable.mjs +0 -66
  451. package/esm2020/src/gui/MgControl.mjs +0 -353
  452. package/esm2020/src/gui/MgForm.mjs +0 -1181
  453. package/esm2020/src/http/HttpManager.mjs +0 -97
  454. package/esm2020/src/http/client/HttpClientAsync.mjs +0 -67
  455. package/esm2020/src/http/client/HttpClientEvents.mjs +0 -39
  456. package/esm2020/src/http/client/HttpClientSync.mjs +0 -42
  457. package/esm2020/src/http/client/HttpUtility.mjs +0 -84
  458. package/esm2020/src/remote/RemoteCommandsProcessor.mjs +0 -880
  459. package/esm2020/src/remote/ServerError.mjs +0 -40
  460. package/esm2020/src/rt/Argument.mjs +0 -265
  461. package/esm2020/src/rt/ArgumentsList.mjs +0 -103
  462. package/esm2020/src/rt/Boundary.mjs +0 -152
  463. package/esm2020/src/rt/CompMainPrgTable.mjs +0 -65
  464. package/esm2020/src/rt/DataviewHeaderBase.mjs +0 -96
  465. package/esm2020/src/rt/DataviewHeaders.mjs +0 -53
  466. package/esm2020/src/rt/LastFocusedManager.mjs +0 -67
  467. package/esm2020/src/rt/Operation.mjs +0 -735
  468. package/esm2020/src/rt/OperationTable.mjs +0 -67
  469. package/esm2020/src/rt/Recompute.mjs +0 -355
  470. package/esm2020/src/rt/ResultValue.mjs +0 -12
  471. package/esm2020/src/rt/TableCache.mjs +0 -177
  472. package/esm2020/src/rt/TableCacheManager.mjs +0 -67
  473. package/esm2020/src/rt/Transaction.mjs +0 -53
  474. package/esm2020/src/security/UserDetails.mjs +0 -71
  475. package/esm2020/src/tasks/MGData.mjs +0 -552
  476. package/esm2020/src/tasks/MGDataCollection.mjs +0 -252
  477. package/esm2020/src/tasks/RCTimer.mjs +0 -63
  478. package/esm2020/src/tasks/Task.mjs +0 -2496
  479. package/esm2020/src/tasks/TaskBase.mjs +0 -87
  480. package/esm2020/src/tasks/TasksTable.mjs +0 -80
  481. package/esm2020/src/tasks/sort/Sort.mjs +0 -7
  482. package/esm2020/src/util/FlowMonitorQueue.mjs +0 -453
  483. package/esm2020/src/util/MgPriorityBlockingQueue.mjs +0 -74
  484. package/esm2020/src/util/MgPriorityQueue.mjs +0 -66
  485. package/esm2020/src/util/PrmMap.mjs +0 -151
  486. package/esm2020/src/util/ReturnResult.mjs +0 -46
  487. package/esm2020/src/util/ReturnResultBase.mjs +0 -18
  488. package/esm2020/src/util/Scrambler.mjs +0 -89
  489. package/esm2020/src/util/UniqueIDUtils.mjs +0 -12
  490. package/fesm2015/magic-xpa-engine.mjs +0 -30837
  491. package/fesm2015/magic-xpa-engine.mjs.map +0 -1
  492. package/fesm2020/magic-xpa-engine.mjs.map +0 -1
@@ -0,0 +1,363 @@
1
+ import { Commands, CommandType, GuiDataCollection, HtmlProperties, MgControlBase, PropInterface } from '@magic-xpa/gui';
2
+ import { InternalInterface, Logger, MgControlType, ScrollBarThumbType, StorageAttribute, SubformType, TableBehaviour } from '@magic-xpa/utils';
3
+ import { Debug, NString } from '@magic-xpa/mscorelib';
4
+ import { ArgumentsList } from '../rt/ArgumentsList';
5
+ import { TaskBase } from '../tasks/TaskBase';
6
+ import { ConstInterface } from '../ConstInterface';
7
+ import { AccessHelper } from '../AccessHelper';
8
+ export class MgControl extends MgControlBase {
9
+ _focusedStopExecution;
10
+ _inControlSuffix;
11
+ _rtEvtTask;
12
+ _subformTaskId;
13
+ _subformTask;
14
+ IsInteractiveUpdate;
15
+ refreshOnString;
16
+ SubformLoaded;
17
+ HasZoomHandler;
18
+ ArgList;
19
+ static ReturnToCtrl = null;
20
+ initialize() {
21
+ this._focusedStopExecution = false;
22
+ this._inControlSuffix = false;
23
+ this._rtEvtTask = null;
24
+ this._subformTaskId = null;
25
+ this._subformTask = null;
26
+ this.IsInteractiveUpdate = false;
27
+ this.refreshOnString = null;
28
+ this.SubformLoaded = false;
29
+ this.HasZoomHandler = false;
30
+ this.ArgList = null;
31
+ }
32
+ constructor(type, taskOrParentMgForm, parentControlOrParentControlIdx) {
33
+ if (arguments.length === 0)
34
+ super();
35
+ else if (arguments.length === 3 && (type === null || type.constructor === Number) && (taskOrParentMgForm === null || taskOrParentMgForm instanceof TaskBase) && (parentControlOrParentControlIdx === null || parentControlOrParentControlIdx.constructor === Number))
36
+ super(type, taskOrParentMgForm.getForm(), parentControlOrParentControlIdx);
37
+ else
38
+ super(type, taskOrParentMgForm, parentControlOrParentControlIdx);
39
+ this.initialize();
40
+ }
41
+ GetVarIndex() {
42
+ return super.getForm().getTask().DataView.Dvcount + this.veeIndx;
43
+ }
44
+ async fillData(mgForm, ditIdx, parser) {
45
+ super.fillData(mgForm, ditIdx, parser);
46
+ this.ArgList = await this.GetArgumentList();
47
+ }
48
+ SetAttribute(attribute, valueStr) {
49
+ let isTagProcessed = super.SetAttribute(attribute, valueStr);
50
+ if (!isTagProcessed) {
51
+ switch (attribute) {
52
+ case ConstInterface.MG_ATTR_SUBFORM_TASK:
53
+ if (valueStr.trim() != "")
54
+ this._subformTaskId = valueStr;
55
+ break;
56
+ case ConstInterface.MG_ATTR_REFRESHON:
57
+ this.refreshOnString = valueStr.trim();
58
+ break;
59
+ default:
60
+ isTagProcessed = false;
61
+ Logger.Instance.WriteExceptionToLogWithMsg(NString.Format("Unrecognized attribute: '{0}'", attribute));
62
+ break;
63
+ }
64
+ }
65
+ return isTagProcessed;
66
+ }
67
+ async GetArgumentList() {
68
+ let argList = null;
69
+ if (this._propTab === null)
70
+ return argList;
71
+ let ArgListProp = this._propTab.getPropById(PropInterface.PROP_TYPE_PARAMETERS);
72
+ if (ArgListProp === null)
73
+ return argList;
74
+ let parms = await ArgListProp.getValue();
75
+ if (parms !== null) {
76
+ argList = new ArgumentsList();
77
+ argList.fillList(parms, super.getForm().getTask());
78
+ if (this.refreshOnString !== null)
79
+ argList.RefreshOnString = this.refreshOnString;
80
+ }
81
+ return argList;
82
+ }
83
+ isDescendent(parentForm) {
84
+ let isDescendent = false;
85
+ let checkCurrentForm = super.getForm();
86
+ Debug.Assert(parentForm !== null);
87
+ while (!isDescendent && checkCurrentForm !== null) {
88
+ if (parentForm === checkCurrentForm)
89
+ isDescendent = true;
90
+ else {
91
+ let currTask = checkCurrentForm.getTask();
92
+ if (currTask.getParent() !== null)
93
+ checkCurrentForm = currTask.getParent().getForm();
94
+ else
95
+ break;
96
+ }
97
+ }
98
+ return isDescendent;
99
+ }
100
+ async refreshOnExpression() {
101
+ let i;
102
+ let size = (this._propTab === null ? 0 : this._propTab.getSize());
103
+ let prop;
104
+ let refresh = false;
105
+ for (i = 0; i < size && !refresh; i++) {
106
+ prop = this._propTab.getProp(i);
107
+ switch (prop.getID()) {
108
+ case PropInterface.PROP_TYPE_DATA:
109
+ if (!prop.isExpression() && this._field !== null && this._field.getTask() !== this.getForm().getTask()) {
110
+ refresh = true;
111
+ break;
112
+ }
113
+ case PropInterface.PROP_TYPE_FORMAT:
114
+ case PropInterface.PROP_TYPE_VISIBLE:
115
+ case PropInterface.PROP_TYPE_ENABLED:
116
+ case PropInterface.PROP_TYPE_RANGE:
117
+ case PropInterface.PROP_TYPE_TRANSLATOR:
118
+ if (prop.isExpression())
119
+ refresh = true;
120
+ break;
121
+ default:
122
+ break;
123
+ }
124
+ if (refresh)
125
+ await this.RefreshDisplay();
126
+ }
127
+ }
128
+ async invoke() {
129
+ let invoked = false;
130
+ if (await this.isParkable(true)) {
131
+ await AccessHelper.eventsManager.handleInternalEventWithMgControlBase(this, InternalInterface.MG_ACT_CTRL_PREFIX);
132
+ invoked = true;
133
+ }
134
+ return invoked;
135
+ }
136
+ async isParkable(checkEnabledAndVisible) {
137
+ let result = !super.isImageControl();
138
+ if (result) {
139
+ await super.checkProp(PropInterface.PROP_TYPE_ENABLED, true);
140
+ await super.checkProp(PropInterface.PROP_TYPE_VISIBLE, true);
141
+ result = await super.isParkable(checkEnabledAndVisible);
142
+ }
143
+ return result;
144
+ }
145
+ getSubformTaskId() {
146
+ return this._subformTaskId;
147
+ }
148
+ initSubformTask() {
149
+ if (super.isSubform())
150
+ this._subformTask = GuiDataCollection.MGDataTable.GetTaskByID(this._subformTaskId);
151
+ }
152
+ getParentTable() {
153
+ return this._parentTable;
154
+ }
155
+ async restoreOldValue() {
156
+ if (this._field !== null)
157
+ await this._field.updateDisplay();
158
+ else {
159
+ super.resetPrevVal();
160
+ await super.SetAndRefreshDisplayValue(await this.getMgValue(this.Value), this.IsNull);
161
+ }
162
+ }
163
+ setRtEvtTask(curTask) {
164
+ this._rtEvtTask = curTask;
165
+ }
166
+ getRtEvtTask() {
167
+ return this._rtEvtTask;
168
+ }
169
+ setSubformTaskId(taskId) {
170
+ this._subformTaskId = taskId;
171
+ }
172
+ isFocusedStopExecution() {
173
+ return this._focusedStopExecution;
174
+ }
175
+ setFocusedStopExecution(focusedStopExecution) {
176
+ this._focusedStopExecution = focusedStopExecution;
177
+ }
178
+ onTheSameSubFormControl(ctrl) {
179
+ let retValue = false;
180
+ if (ctrl !== null) {
181
+ if (super.getForm().isSubForm() && ctrl.getForm().isSubForm()) {
182
+ if (super.getForm().getTask() === ctrl.getForm().getTask())
183
+ retValue = true;
184
+ }
185
+ }
186
+ return retValue;
187
+ }
188
+ onDiffForm(ctrl) {
189
+ let isSubform = super.getForm().isSubForm() || ctrl.getForm().isSubForm();
190
+ let isOnDiffForm = (isSubform) && !this.onTheSameSubFormControl(ctrl);
191
+ return isOnDiffForm;
192
+ }
193
+ isInControlSuffix() {
194
+ return this._inControlSuffix;
195
+ }
196
+ setInControlSuffix(inControlSuffix) {
197
+ this._inControlSuffix = inControlSuffix;
198
+ }
199
+ HasSelectProgram() {
200
+ let HasSelectProgram = false;
201
+ let selectProgProp = super.GetComputedProperty(PropInterface.PROP_TYPE_SELECT_PROGRAM);
202
+ if (selectProgProp !== null && selectProgProp.GetComputedValue() !== null)
203
+ HasSelectProgram = true;
204
+ return HasSelectProgram;
205
+ }
206
+ useZoomHandler() {
207
+ return this.HasZoomHandler || (super.getField() !== null && (super.getField().getHasZoomHandler() || (this.HasSelectProgram())));
208
+ }
209
+ async updatePropertyLogicNesting(propId, commandType, val, updateThis) {
210
+ if (val && super.haveToCheckParentValue())
211
+ val = super.isParentPropValue(propId);
212
+ if (val && super.isSubform() && commandType === CommandType.PROP_SET_VISIBLE && this.ShouldSetSubformInvisible())
213
+ val = false;
214
+ if (updateThis) {
215
+ Commands.addOperationWithLine(CommandType.SET_PROPERTY, this, super.getDisplayLine(false), commandType === CommandType.PROP_SET_VISIBLE ? HtmlProperties.Visible : HtmlProperties.Enabled, val);
216
+ }
217
+ await super.updateChildrenPropValue(propId, commandType, val);
218
+ }
219
+ ShouldSetSubformInvisible() {
220
+ let setInvisible = false;
221
+ let subformType = super.GetComputedProperty(PropInterface.PROP_TYPE_SUBFORM_TYPE).GetComputedValueInteger();
222
+ if (subformType === SubformType.None && this.getSubformTaskId() === null)
223
+ setInvisible = true;
224
+ return setInvisible;
225
+ }
226
+ async updateSubformChildrenPropValue(propId, commandType, val) {
227
+ Debug.Assert(super.isSubform());
228
+ if (!super.getForm().getTask().AfterFirstRecordPrefix)
229
+ return;
230
+ let subformType = super.GetComputedProperty(PropInterface.PROP_TYPE_SUBFORM_TYPE).GetComputedValueInteger();
231
+ if (this._subformTaskId !== null || subformType === SubformType.None) {
232
+ if (this._subformTask !== null && this._subformTask.isStarted()) {
233
+ this.SubformLoaded = true;
234
+ if (commandType === CommandType.PROP_SET_VISIBLE && val && this.RefreshOnVisible) {
235
+ this.RefreshOnVisible = false;
236
+ await super.getForm().getTask().SubformRefresh(this._subformTask, true);
237
+ }
238
+ let subformForm = this._subformTask.getForm();
239
+ for (let i = 0; i < subformForm.getCtrlCount(); i++) {
240
+ let child = subformForm.getCtrl(i);
241
+ if (!child.isColumnControl())
242
+ continue;
243
+ let childValue = await child.checkProp(propId, true) && val;
244
+ if (childValue)
245
+ childValue = child.isParentPropValue(propId);
246
+ await child.updateChildrenPropValue(propId, commandType, childValue);
247
+ }
248
+ }
249
+ }
250
+ else if ((commandType === CommandType.PROP_SET_VISIBLE && val) && !this.SubformLoaded) {
251
+ this.SubformLoaded = true;
252
+ await AccessHelper.eventsManager.handleInternalEventWithMgControlBase(this, InternalInterface.MG_ACT_SUBFORM_OPEN);
253
+ }
254
+ }
255
+ Init() {
256
+ this.initSubformTask();
257
+ }
258
+ GetTableBehaviour() {
259
+ return TableBehaviour.UnlimitedItems;
260
+ }
261
+ async validateAndSetValue(NewValue, updateCtrl) {
262
+ super.UpdateModifiedByUser(NewValue);
263
+ if (this.ModifiedByUser) {
264
+ let ctrlCurrValue = this.Value;
265
+ let vd;
266
+ if (super.getPIC() === null)
267
+ return true;
268
+ vd = super.buildPicture(ctrlCurrValue, NewValue);
269
+ vd.evaluate();
270
+ if (vd.ValidationFailed) {
271
+ this.ModifiedByUser = false;
272
+ return false;
273
+ }
274
+ this.IsInteractiveUpdate = true;
275
+ super.getForm().getTask().setDataSynced(false);
276
+ if (updateCtrl) {
277
+ if (this._field !== null && this._field.getType() === StorageAttribute.NUMERIC && typeof NewValue === 'string' && NewValue.trim().length > 0)
278
+ vd.setValue(NewValue);
279
+ await this.setValue(vd);
280
+ }
281
+ }
282
+ return true;
283
+ }
284
+ async setValue(vd) {
285
+ let isNull = vd.getIsNull();
286
+ let newValue = vd.getDispValue();
287
+ let mgVal;
288
+ if (!isNull || !this._field.hasNullDisplayValue())
289
+ mgVal = await super.getMgValue(newValue);
290
+ else
291
+ mgVal = ((this._field.getType() === StorageAttribute.BLOB_VECTOR) ? this._field.getCellDefualtValue() : this._field.getDefaultValue());
292
+ if (mgVal !== null) {
293
+ if (this._field !== null && (!(newValue === this.Value) || this.KeyStrokeOn || this.IsNull !== isNull)) {
294
+ await this._field.setValueAndStartRecompute(mgVal, isNull, true, true, false);
295
+ if (super.isCheckBox()) {
296
+ this.forceRefresh = true;
297
+ mgVal = this._field.getValue(false);
298
+ }
299
+ }
300
+ if ((this._field !== null && isNull) && this._field.hasNullDisplayValue())
301
+ mgVal = newValue;
302
+ await super.SetAndRefreshDisplayValue(mgVal, isNull);
303
+ this.forceRefresh = false;
304
+ this.KeyStrokeOn = false;
305
+ }
306
+ }
307
+ getSubformTask() {
308
+ return this._subformTask;
309
+ }
310
+ resetSubformTask() {
311
+ this._subformTask = null;
312
+ this._subformTaskId = "0";
313
+ }
314
+ GetSubformMgForm() {
315
+ let form = null;
316
+ if (this._subformTask !== null)
317
+ form = this._subformTask.getForm();
318
+ return form;
319
+ }
320
+ IsTableWithAbsoluteScrollbar() {
321
+ let tableWithAbsoluteScrollbar = false;
322
+ Debug.Assert(this.Type === MgControlType.CTRL_TYPE_TABLE, "In MgControl.IsTableWithAbsoluteScrollbar(): Not a table control.");
323
+ if (this._propTab.propExists(PropInterface.PROP_TYPE_SCROLL_BAR_THUMB))
324
+ tableWithAbsoluteScrollbar = (this._propTab.getPropById(PropInterface.PROP_TYPE_SCROLL_BAR_THUMB).GetComputedValueInteger() === ScrollBarThumbType.Absolute);
325
+ return tableWithAbsoluteScrollbar;
326
+ }
327
+ static validReturnToCtrl() {
328
+ if (MgControl.ReturnToCtrl !== null && MgControl.ReturnToCtrl.getForm().getTask().isAborting())
329
+ return false;
330
+ return true;
331
+ }
332
+ maySetValue() {
333
+ switch (this.Type) {
334
+ case MgControlType.CTRL_TYPE_CHECKBOX:
335
+ case MgControlType.CTRL_TYPE_TEXT:
336
+ case MgControlType.CTRL_TYPE_COMBO:
337
+ case MgControlType.CTRL_TYPE_LIST:
338
+ case MgControlType.CTRL_TYPE_RADIO:
339
+ case MgControlType.CTRL_TYPE_TAB:
340
+ break;
341
+ default:
342
+ return false;
343
+ }
344
+ if (this._field === null || this._valExpId > 0)
345
+ return false;
346
+ return this.isModifiable();
347
+ }
348
+ async validateAndSetValueIfAllowed(NewValue, refreshDisplay) {
349
+ if (!this.maySetValue()) {
350
+ Logger.Instance.WriteErrorToLog(NString.Format("Unable to change value of control {0}: The control is read-only.", this.Name));
351
+ return false;
352
+ }
353
+ let retVal = await this.validateAndSetValue(NewValue, true);
354
+ if (!retVal)
355
+ Logger.Instance.WriteErrorToLog(NString.Format("Value validation failed for {0}.", this.Name));
356
+ if (refreshDisplay) {
357
+ Commands.addNoParameters(CommandType.REFRESH_TASK, this.getForm());
358
+ Commands.invoke();
359
+ }
360
+ return retVal;
361
+ }
362
+ }
363
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiTWdDb250cm9sLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vcHJvamVjdHMvZW5naW5lL3NyYy9ndWkvTWdDb250cm9sLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFDTCxRQUFRLEVBQ1IsV0FBVyxFQUNYLGlCQUFpQixFQUNqQixjQUFjLEVBQ2QsYUFBYSxFQUdiLGFBQWEsRUFHZCxNQUFNLGdCQUFnQixDQUFDO0FBQ3hCLE9BQU8sRUFDTCxpQkFBaUIsRUFDakIsTUFBTSxFQUNOLGFBQWEsRUFDYixrQkFBa0IsRUFDbEIsZ0JBQWdCLEVBQ2hCLFdBQVcsRUFDWCxjQUFjLEVBRWYsTUFBTSxrQkFBa0IsQ0FBQztBQUMxQixPQUFPLEVBQUMsS0FBSyxFQUFFLE9BQU8sRUFBQyxNQUFNLHNCQUFzQixDQUFDO0FBQ3BELE9BQU8sRUFBQyxhQUFhLEVBQUMsTUFBTSxxQkFBcUIsQ0FBQztBQUNsRCxPQUFPLEVBQUMsUUFBUSxFQUFDLE1BQU0sbUJBQW1CLENBQUM7QUFJM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