@magic-xpa/engine 4.1100.0-dev4110.24 → 4.1100.0-dev4110.241

Sign up to get free protection for your applications and to get access to all the features.
Files changed (516) hide show
  1. package/{esm2020 → esm2022}/index.mjs +188 -188
  2. package/{esm2020 → esm2022}/magic-xpa-engine.mjs +1 -1
  3. package/esm2022/src/AccessHelper.mjs +15 -0
  4. package/esm2022/src/ClientManager.mjs +416 -0
  5. package/esm2022/src/CommandsProcessorBase.mjs +56 -0
  6. package/esm2022/src/CommandsProcessorManager.mjs +26 -0
  7. package/esm2022/src/CommandsTable.mjs +162 -0
  8. package/esm2022/src/ConstInterface.mjs +517 -0
  9. package/{esm2020 → esm2022}/src/CurrentClientVersion.mjs +2 -2
  10. package/esm2022/src/FlowMonitorInterface.mjs +16 -0
  11. package/esm2022/src/GUIManager.mjs +62 -0
  12. package/esm2022/src/GlobalCommandsManager.mjs +34 -0
  13. package/esm2022/src/GuiEventsProcessor.mjs +156 -0
  14. package/{esm2020 → esm2022}/src/ICommandsTable.mjs +1 -1
  15. package/esm2022/src/ServerConfig.mjs +122 -0
  16. package/{esm2020 → esm2022}/src/bridge/IGuiEvent.mjs +19 -19
  17. package/esm2022/src/bridge/MagicBridge.mjs +41 -0
  18. package/esm2022/src/commands/ClientOriginatedCommandTaskTag.mjs +12 -0
  19. package/{esm2020 → esm2022}/src/commands/ClientToServer/AddUserLocateDataViewCommand.mjs +8 -8
  20. package/{esm2020 → esm2022}/src/commands/ClientToServer/AddUserRangeDataviewCommand.mjs +9 -9
  21. package/{esm2020 → esm2022}/src/commands/ClientToServer/AddUserSortDataViewCommand.mjs +9 -9
  22. package/{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 +227 -0
  96. package/esm2022/src/env/MirrorString.mjs +65 -0
  97. package/esm2022/src/event/ActionManager.mjs +91 -0
  98. package/esm2022/src/event/Event.mjs +1333 -0
  99. package/esm2022/src/event/EventHandler.mjs +766 -0
  100. package/esm2022/src/event/EventHandlerPosition.mjs +204 -0
  101. package/esm2022/src/event/EventsManager.mjs +2988 -0
  102. package/{esm2020 → esm2022}/src/event/IEventsManager.mjs +6 -6
  103. package/esm2022/src/event/RunTimeEvent.mjs +399 -0
  104. package/{esm2020 → esm2022}/src/event/RunTimeEventBase.mjs +3 -3
  105. package/esm2022/src/event/UserEventsTable.mjs +47 -0
  106. package/esm2022/src/exp/ExpTable.mjs +57 -0
  107. package/esm2022/src/exp/Expression.mjs +200 -0
  108. package/esm2022/src/exp/ExpressionDict.mjs +727 -0
  109. package/esm2022/src/exp/ExpressionEvaluator.mjs +4206 -0
  110. package/esm2022/src/exp/ExpressionLocalJpn.mjs +314 -0
  111. package/esm2022/src/exp/GlobalParamsTable.mjs +85 -0
  112. package/esm2022/src/exp/YesNoExp.mjs +36 -0
  113. package/esm2022/src/gui/CreatedFormVector.mjs +23 -0
  114. package/esm2022/src/gui/FormsTable.mjs +66 -0
  115. package/esm2022/src/gui/MgControl.mjs +363 -0
  116. package/esm2022/src/gui/MgForm.mjs +1224 -0
  117. package/esm2022/src/http/HttpManager.mjs +97 -0
  118. package/esm2022/src/http/client/HttpClientAsync.mjs +68 -0
  119. package/esm2022/src/http/client/HttpClientBase.mjs +132 -0
  120. package/esm2022/src/http/client/HttpClientEvents.mjs +39 -0
  121. package/esm2022/src/http/client/HttpClientSync.mjs +42 -0
  122. package/esm2022/src/http/client/HttpUtility.mjs +84 -0
  123. package/{esm2020 → esm2022}/src/http/client/ICommunicationsFailureHandler.mjs +1 -1
  124. package/esm2022/src/remote/AddUserLocateRemoteDataViewCommand.mjs +18 -0
  125. package/esm2022/src/remote/AddUserRangeRemoteDataViewCommand.mjs +18 -0
  126. package/esm2022/src/remote/AddUserSortRemoteDataViewCommand.mjs +18 -0
  127. package/esm2022/src/remote/RemoteCommandsProcessor.mjs +880 -0
  128. package/esm2022/src/remote/RemoteControlItemsRefreshCommand.mjs +25 -0
  129. package/esm2022/src/remote/RemoteDataViewCommandBase.mjs +24 -0
  130. package/esm2022/src/remote/RemoteDataViewCommandFactory.mjs +61 -0
  131. package/{esm2020 → esm2022}/src/remote/RemoteDataViewCommandUpdateNonModifiable.mjs +15 -15
  132. package/{esm2020 → esm2022}/src/remote/RemoteDataviewManager.mjs +17 -17
  133. package/{esm2020 → esm2022}/src/remote/RemoteInitDataViewCommand.mjs +10 -10
  134. package/esm2022/src/remote/ResetUserLocateRemoteDataviewCommand.mjs +17 -0
  135. package/{esm2020 → esm2022}/src/remote/ResetUserRangeRemoteDataviewCommand.mjs +12 -12
  136. package/esm2022/src/remote/ResetUserSortRemoteDataviewCommand.mjs +16 -0
  137. package/esm2022/src/remote/ServerError.mjs +40 -0
  138. package/esm2022/src/remote/SetTransactionStateRemoteDataViewCommand.mjs +20 -0
  139. package/esm2022/src/rt/Argument.mjs +265 -0
  140. package/esm2022/src/rt/ArgumentsList.mjs +103 -0
  141. package/esm2022/src/rt/Boundary.mjs +152 -0
  142. package/esm2022/src/rt/CompMainPrgTable.mjs +63 -0
  143. package/{esm2020 → esm2022}/src/rt/DataviewHeaderBase.mjs +98 -96
  144. package/{esm2020 → esm2022}/src/rt/DataviewHeaderFactory.mjs +6 -6
  145. package/esm2022/src/rt/DataviewHeaders.mjs +53 -0
  146. package/esm2022/src/rt/DataviewHeadersSaxHandler.mjs +38 -0
  147. package/esm2022/src/rt/ExecutionStack.mjs +94 -0
  148. package/{esm2020 → esm2022}/src/rt/ExecutionStackEntry.mjs +17 -17
  149. package/esm2022/src/rt/HandlersTable.mjs +96 -0
  150. package/{esm2020 → esm2022}/src/rt/IDataSourceViewDefinition.mjs +1 -1
  151. package/{esm2020 → esm2022}/src/rt/IDataviewHeader.mjs +1 -1
  152. package/{esm2020 → esm2022}/src/rt/IResultValue.mjs +1 -1
  153. package/esm2022/src/rt/LastFocusedManager.mjs +65 -0
  154. package/esm2022/src/rt/Operation.mjs +735 -0
  155. package/esm2022/src/rt/OperationTable.mjs +67 -0
  156. package/esm2022/src/rt/Recompute.mjs +355 -0
  157. package/esm2022/src/rt/RecomputeTable.mjs +63 -0
  158. package/esm2022/src/rt/RemoteDataviewHeader.mjs +108 -0
  159. package/esm2022/src/rt/ResultValue.mjs +10 -0
  160. package/esm2022/src/rt/TableCache.mjs +177 -0
  161. package/esm2022/src/rt/TableCacheManager.mjs +67 -0
  162. package/esm2022/src/rt/Transaction.mjs +53 -0
  163. package/esm2022/src/security/UserDetails.mjs +71 -0
  164. package/{esm2020 → esm2022}/src/tasks/IMGDataCollection.mjs +1 -1
  165. package/esm2022/src/tasks/MGData.mjs +552 -0
  166. package/esm2022/src/tasks/MGDataCollection.mjs +252 -0
  167. package/esm2022/src/tasks/RCTimer.mjs +63 -0
  168. package/esm2022/src/tasks/RemoteTaskService.mjs +45 -0
  169. package/esm2022/src/tasks/Task.mjs +2499 -0
  170. package/esm2022/src/tasks/TaskBase.mjs +83 -0
  171. package/esm2022/src/tasks/TaskServiceBase.mjs +25 -0
  172. package/esm2022/src/tasks/TasksTable.mjs +80 -0
  173. package/esm2022/src/tasks/sort/Sort.mjs +5 -0
  174. package/esm2022/src/tasks/sort/SortCollection.mjs +67 -0
  175. package/esm2022/src/util/ConstUtils.mjs +14 -0
  176. package/esm2022/src/util/FlowMonitorQueue.mjs +451 -0
  177. package/esm2022/src/util/HeapSort.mjs +70 -0
  178. package/{esm2020 → esm2022}/src/util/IMirrorXML.mjs +1 -1
  179. package/{esm2020 → esm2022}/src/util/IServerConfig.mjs +1 -1
  180. package/{esm2020 → esm2022}/src/util/MgBlockingQueue.mjs +1 -1
  181. package/esm2022/src/util/MgPriorityBlockingQueue.mjs +74 -0
  182. package/esm2022/src/util/MgPriorityQueue.mjs +66 -0
  183. package/{esm2020 → esm2022}/src/util/ParamParseResult.mjs +7 -7
  184. package/esm2022/src/util/PrmMap.mjs +152 -0
  185. package/esm2022/src/util/ReturnResult.mjs +46 -0
  186. package/esm2022/src/util/ReturnResultBase.mjs +18 -0
  187. package/esm2022/src/util/Scrambler.mjs +89 -0
  188. package/esm2022/src/util/UniqueIDUtils.mjs +13 -0
  189. package/esm2022/src/util/cookie.service.mjs +92 -0
  190. package/{fesm2020 → fesm2022}/magic-xpa-engine.mjs +29797 -29693
  191. package/fesm2022/magic-xpa-engine.mjs.map +1 -0
  192. package/index.d.ts +187 -187
  193. package/package.json +8 -14
  194. package/src/AccessHelper.d.ts +20 -20
  195. package/src/ClientManager.d.ts +35 -32
  196. package/src/CommandsProcessorBase.d.ts +23 -23
  197. package/src/CommandsProcessorManager.d.ts +6 -6
  198. package/src/CommandsTable.d.ts +22 -22
  199. package/src/ConstInterface.d.ts +516 -515
  200. package/src/CurrentClientVersion.d.ts +1 -1
  201. package/src/FlowMonitorInterface.d.ts +15 -15
  202. package/src/GUIManager.d.ts +17 -17
  203. package/src/GlobalCommandsManager.d.ts +17 -17
  204. package/src/GuiEventsProcessor.d.ts +24 -24
  205. package/src/ICommandsTable.d.ts +9 -9
  206. package/src/ServerConfig.d.ts +35 -34
  207. package/src/bridge/IGuiEvent.d.ts +19 -19
  208. package/src/bridge/MagicBridge.d.ts +16 -16
  209. package/src/commands/ClientOriginatedCommandTaskTag.d.ts +8 -8
  210. package/src/commands/ClientToServer/AddUserLocateDataViewCommand.d.ts +4 -4
  211. package/src/commands/ClientToServer/AddUserRangeDataviewCommand.d.ts +6 -6
  212. package/src/commands/ClientToServer/AddUserSortDataViewCommand.d.ts +6 -6
  213. package/src/commands/ClientToServer/BrowserEscEventCommand.d.ts +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 +205 -204
  293. package/src/event/IEventsManager.d.ts +77 -77
  294. package/src/event/RunTimeEvent.d.ts +126 -123
  295. package/src/event/RunTimeEventBase.d.ts +5 -5
  296. package/src/event/UserEventsTable.d.ts +11 -11
  297. package/src/exp/ExpTable.d.ts +11 -11
  298. package/src/exp/Expression.d.ts +37 -37
  299. package/src/exp/ExpressionDict.d.ts +12 -12
  300. package/src/exp/ExpressionEvaluator.d.ts +198 -198
  301. package/src/exp/ExpressionLocalJpn.d.ts +18 -18
  302. package/src/exp/GlobalParamsTable.d.ts +19 -19
  303. package/src/exp/YesNoExp.d.ts +9 -9
  304. package/src/gui/CreatedFormVector.d.ts +10 -10
  305. package/src/gui/FormsTable.d.ts +15 -15
  306. package/src/gui/MgControl.d.ts +60 -60
  307. package/src/gui/MgForm.d.ts +96 -93
  308. package/src/http/HttpManager.d.ts +25 -25
  309. package/src/http/client/HttpClientAsync.d.ts +16 -16
  310. package/src/http/client/HttpClientBase.d.ts +30 -30
  311. package/src/http/client/HttpClientEvents.d.ts +18 -18
  312. package/src/http/client/HttpClientSync.d.ts +17 -17
  313. package/src/http/client/HttpUtility.d.ts +10 -10
  314. package/src/http/client/ICommunicationsFailureHandler.d.ts +5 -5
  315. package/src/remote/AddUserLocateRemoteDataViewCommand.d.ts +8 -8
  316. package/src/remote/AddUserRangeRemoteDataViewCommand.d.ts +8 -8
  317. package/src/remote/AddUserSortRemoteDataViewCommand.d.ts +8 -8
  318. package/src/remote/RemoteCommandsProcessor.d.ts +51 -51
  319. package/src/remote/RemoteControlItemsRefreshCommand.d.ts +8 -8
  320. package/src/remote/RemoteDataViewCommandBase.d.ts +10 -10
  321. package/src/remote/RemoteDataViewCommandFactory.d.ts +6 -6
  322. package/src/remote/RemoteDataViewCommandUpdateNonModifiable.d.ts +8 -8
  323. package/src/remote/RemoteDataviewManager.d.ts +9 -9
  324. package/src/remote/RemoteInitDataViewCommand.d.ts +7 -7
  325. package/src/remote/ResetUserLocateRemoteDataviewCommand.d.ts +7 -7
  326. package/src/remote/ResetUserRangeRemoteDataviewCommand.d.ts +7 -7
  327. package/src/remote/ResetUserSortRemoteDataviewCommand.d.ts +7 -7
  328. package/src/remote/ServerError.d.ts +16 -16
  329. package/src/remote/SetTransactionStateRemoteDataViewCommand.d.ts +8 -8
  330. package/src/rt/Argument.d.ts +36 -36
  331. package/src/rt/ArgumentsList.d.ts +24 -24
  332. package/src/rt/Boundary.d.ts +27 -27
  333. package/src/rt/CompMainPrgTable.d.ts +10 -10
  334. package/src/rt/DataviewHeaderBase.d.ts +34 -34
  335. package/src/rt/DataviewHeaderFactory.d.ts +5 -5
  336. package/src/rt/DataviewHeaders.d.ts +12 -12
  337. package/src/rt/DataviewHeadersSaxHandler.d.ts +10 -10
  338. package/src/rt/ExecutionStack.d.ts +22 -22
  339. package/src/rt/ExecutionStackEntry.d.ts +7 -7
  340. package/src/rt/HandlersTable.d.ts +19 -19
  341. package/src/rt/IDataSourceViewDefinition.d.ts +6 -6
  342. package/src/rt/IDataviewHeader.d.ts +10 -10
  343. package/src/rt/IResultValue.d.ts +4 -4
  344. package/src/rt/LastFocusedManager.d.ts +23 -23
  345. package/src/rt/Operation.d.ts +97 -97
  346. package/src/rt/OperationTable.d.ts +15 -15
  347. package/src/rt/Recompute.d.ts +41 -41
  348. package/src/rt/RecomputeTable.d.ts +9 -9
  349. package/src/rt/RemoteDataviewHeader.d.ts +14 -14
  350. package/src/rt/ResultValue.d.ts +7 -7
  351. package/src/rt/TableCache.d.ts +29 -29
  352. package/src/rt/TableCacheManager.d.ts +10 -10
  353. package/src/rt/Transaction.d.ts +23 -23
  354. package/src/security/UserDetails.d.ts +16 -16
  355. package/src/tasks/IMGDataCollection.d.ts +26 -26
  356. package/src/tasks/MGData.d.ts +63 -63
  357. package/src/tasks/MGDataCollection.d.ts +42 -42
  358. package/src/tasks/RCTimer.d.ts +13 -13
  359. package/src/tasks/RemoteTaskService.d.ts +16 -16
  360. package/src/tasks/Task.d.ts +312 -312
  361. package/src/tasks/TaskBase.d.ts +123 -123
  362. package/src/tasks/TaskServiceBase.d.ts +16 -16
  363. package/src/tasks/TasksTable.d.ts +21 -21
  364. package/src/tasks/sort/Sort.d.ts +4 -4
  365. package/src/tasks/sort/SortCollection.d.ts +11 -11
  366. package/src/util/ConstUtils.d.ts +3 -3
  367. package/src/util/FlowMonitorQueue.d.ts +70 -70
  368. package/src/util/HeapSort.d.ts +6 -6
  369. package/src/util/IMirrorXML.d.ts +6 -6
  370. package/src/util/IServerConfig.d.ts +11 -11
  371. package/src/util/MgBlockingQueue.d.ts +5 -5
  372. package/src/util/MgPriorityBlockingQueue.d.ts +17 -17
  373. package/src/util/MgPriorityQueue.d.ts +13 -13
  374. package/src/util/ParamParseResult.d.ts +6 -6
  375. package/src/util/PrmMap.d.ts +28 -28
  376. package/src/util/ReturnResult.d.ts +18 -18
  377. package/src/util/ReturnResultBase.d.ts +11 -11
  378. package/src/util/Scrambler.d.ts +10 -10
  379. package/src/util/UniqueIDUtils.d.ts +4 -4
  380. package/src/util/cookie.service.d.ts +8 -8
  381. package/esm2020/src/AccessHelper.mjs +0 -9
  382. package/esm2020/src/ClientManager.mjs +0 -399
  383. package/esm2020/src/CommandsProcessorBase.mjs +0 -58
  384. package/esm2020/src/CommandsProcessorManager.mjs +0 -26
  385. package/esm2020/src/CommandsTable.mjs +0 -162
  386. package/esm2020/src/ConstInterface.mjs +0 -516
  387. package/esm2020/src/FlowMonitorInterface.mjs +0 -16
  388. package/esm2020/src/GUIManager.mjs +0 -62
  389. package/esm2020/src/GlobalCommandsManager.mjs +0 -34
  390. package/esm2020/src/GuiEventsProcessor.mjs +0 -154
  391. package/esm2020/src/ServerConfig.mjs +0 -117
  392. package/esm2020/src/bridge/MagicBridge.mjs +0 -41
  393. package/esm2020/src/commands/ClientOriginatedCommandTaskTag.mjs +0 -11
  394. package/esm2020/src/commands/ClientToServer/ClientOriginatedCommandSerializer.mjs +0 -60
  395. package/esm2020/src/commands/ClientToServer/CommandFactory.mjs +0 -260
  396. package/esm2020/src/commands/ClientToServer/CommandSerializationHelper.mjs +0 -69
  397. package/esm2020/src/commands/ClientToServer/DataViewOutputCommand.mjs +0 -13
  398. package/esm2020/src/commands/ClientToServer/EvaluateCommand.mjs +0 -36
  399. package/esm2020/src/commands/ClientToServer/EventCommand.mjs +0 -40
  400. package/esm2020/src/commands/ClientToServer/ExecOperCommand.mjs +0 -67
  401. package/esm2020/src/commands/ClientToServer/FetchDataControlValuesEventCommand.mjs +0 -22
  402. package/esm2020/src/commands/ClientToServer/IniputForceWriteCommand.mjs +0 -23
  403. package/esm2020/src/commands/ClientToServer/RecomputeCommand.mjs +0 -27
  404. package/esm2020/src/commands/ClientToServer/RefreshEventCommand.mjs +0 -27
  405. package/esm2020/src/commands/ClientToServer/RefreshScreenEventCommand.mjs +0 -24
  406. package/esm2020/src/commands/ClientToServer/RollbackEventCommand.mjs +0 -39
  407. package/esm2020/src/commands/ClientToServer/SubformRefreshEventCommand.mjs +0 -24
  408. package/esm2020/src/commands/ClientToServer/TransactionCommand.mjs +0 -28
  409. package/esm2020/src/commands/ClientToServer/WriteMessageToServerLogCommand.mjs +0 -18
  410. package/esm2020/src/commands/DataViewCommandBase.mjs +0 -10
  411. package/esm2020/src/commands/IClientTargetedCommand.mjs +0 -9
  412. package/esm2020/src/commands/ServerToClient/AbortCommand.mjs +0 -65
  413. package/esm2020/src/commands/ServerToClient/AddRangeCommand.mjs +0 -62
  414. package/esm2020/src/commands/ServerToClient/AddSortCommand.mjs +0 -33
  415. package/esm2020/src/commands/ServerToClient/ClientRefreshCommand.mjs +0 -25
  416. package/esm2020/src/commands/ServerToClient/ClientTargetedCommandBase.mjs +0 -27
  417. package/esm2020/src/commands/ServerToClient/EnhancedVerifyCommand.mjs +0 -45
  418. package/esm2020/src/commands/ServerToClient/OpenURLCommand.mjs +0 -221
  419. package/esm2020/src/commands/ServerToClient/ResultCommand.mjs +0 -37
  420. package/esm2020/src/commands/ServerToClient/VerifyCommand.mjs +0 -83
  421. package/esm2020/src/commands/ServerToClient/XMLBasedCommandBuilder.mjs +0 -132
  422. package/esm2020/src/communications/InteractiveCommunicationsFailureHandler.mjs +0 -17
  423. package/esm2020/src/data/DataView.mjs +0 -1610
  424. package/esm2020/src/data/DataviewManager.mjs +0 -28
  425. package/esm2020/src/data/DataviewManagerBase.mjs +0 -15
  426. package/esm2020/src/data/DvCache.mjs +0 -67
  427. package/esm2020/src/data/Field.mjs +0 -646
  428. package/esm2020/src/data/FieldBase.mjs +0 -18
  429. package/esm2020/src/data/FieldsTable.mjs +0 -103
  430. package/esm2020/src/data/Key.mjs +0 -88
  431. package/esm2020/src/data/Record.mjs +0 -846
  432. package/esm2020/src/data/RecordsTable.mjs +0 -267
  433. package/esm2020/src/data/TaskTransactionManager.mjs +0 -103
  434. package/esm2020/src/data/XMLBasedDcValuesBuilder.mjs +0 -74
  435. package/esm2020/src/env/EnvVariablesTable.mjs +0 -340
  436. package/esm2020/src/env/Environment.mjs +0 -489
  437. package/esm2020/src/env/LanguageData.mjs +0 -226
  438. package/esm2020/src/env/MirrorString.mjs +0 -65
  439. package/esm2020/src/event/ActionManager.mjs +0 -91
  440. package/esm2020/src/event/Event.mjs +0 -1333
  441. package/esm2020/src/event/EventHandler.mjs +0 -766
  442. package/esm2020/src/event/EventHandlerPosition.mjs +0 -204
  443. package/esm2020/src/event/EventsManager.mjs +0 -2975
  444. package/esm2020/src/event/RunTimeEvent.mjs +0 -392
  445. package/esm2020/src/event/UserEventsTable.mjs +0 -47
  446. package/esm2020/src/exp/ExpTable.mjs +0 -59
  447. package/esm2020/src/exp/Expression.mjs +0 -200
  448. package/esm2020/src/exp/ExpressionDict.mjs +0 -727
  449. package/esm2020/src/exp/ExpressionEvaluator.mjs +0 -4212
  450. package/esm2020/src/exp/ExpressionLocalJpn.mjs +0 -314
  451. package/esm2020/src/exp/GlobalParamsTable.mjs +0 -85
  452. package/esm2020/src/exp/YesNoExp.mjs +0 -36
  453. package/esm2020/src/gui/CreatedFormVector.mjs +0 -23
  454. package/esm2020/src/gui/FormsTable.mjs +0 -66
  455. package/esm2020/src/gui/MgControl.mjs +0 -353
  456. package/esm2020/src/gui/MgForm.mjs +0 -1181
  457. package/esm2020/src/http/HttpManager.mjs +0 -97
  458. package/esm2020/src/http/client/HttpClientAsync.mjs +0 -67
  459. package/esm2020/src/http/client/HttpClientBase.mjs +0 -132
  460. package/esm2020/src/http/client/HttpClientEvents.mjs +0 -39
  461. package/esm2020/src/http/client/HttpClientSync.mjs +0 -42
  462. package/esm2020/src/http/client/HttpUtility.mjs +0 -84
  463. package/esm2020/src/remote/AddUserLocateRemoteDataViewCommand.mjs +0 -18
  464. package/esm2020/src/remote/AddUserRangeRemoteDataViewCommand.mjs +0 -18
  465. package/esm2020/src/remote/AddUserSortRemoteDataViewCommand.mjs +0 -18
  466. package/esm2020/src/remote/RemoteCommandsProcessor.mjs +0 -880
  467. package/esm2020/src/remote/RemoteControlItemsRefreshCommand.mjs +0 -25
  468. package/esm2020/src/remote/RemoteDataViewCommandBase.mjs +0 -24
  469. package/esm2020/src/remote/RemoteDataViewCommandFactory.mjs +0 -61
  470. package/esm2020/src/remote/ResetUserLocateRemoteDataviewCommand.mjs +0 -17
  471. package/esm2020/src/remote/ResetUserSortRemoteDataviewCommand.mjs +0 -16
  472. package/esm2020/src/remote/ServerError.mjs +0 -40
  473. package/esm2020/src/remote/SetTransactionStateRemoteDataViewCommand.mjs +0 -20
  474. package/esm2020/src/rt/Argument.mjs +0 -265
  475. package/esm2020/src/rt/ArgumentsList.mjs +0 -103
  476. package/esm2020/src/rt/Boundary.mjs +0 -152
  477. package/esm2020/src/rt/CompMainPrgTable.mjs +0 -65
  478. package/esm2020/src/rt/DataviewHeaders.mjs +0 -53
  479. package/esm2020/src/rt/DataviewHeadersSaxHandler.mjs +0 -38
  480. package/esm2020/src/rt/ExecutionStack.mjs +0 -94
  481. package/esm2020/src/rt/HandlersTable.mjs +0 -96
  482. package/esm2020/src/rt/LastFocusedManager.mjs +0 -67
  483. package/esm2020/src/rt/Operation.mjs +0 -735
  484. package/esm2020/src/rt/OperationTable.mjs +0 -67
  485. package/esm2020/src/rt/Recompute.mjs +0 -355
  486. package/esm2020/src/rt/RecomputeTable.mjs +0 -63
  487. package/esm2020/src/rt/RemoteDataviewHeader.mjs +0 -108
  488. package/esm2020/src/rt/ResultValue.mjs +0 -12
  489. package/esm2020/src/rt/TableCache.mjs +0 -177
  490. package/esm2020/src/rt/TableCacheManager.mjs +0 -67
  491. package/esm2020/src/rt/Transaction.mjs +0 -53
  492. package/esm2020/src/security/UserDetails.mjs +0 -71
  493. package/esm2020/src/tasks/MGData.mjs +0 -552
  494. package/esm2020/src/tasks/MGDataCollection.mjs +0 -252
  495. package/esm2020/src/tasks/RCTimer.mjs +0 -63
  496. package/esm2020/src/tasks/RemoteTaskService.mjs +0 -45
  497. package/esm2020/src/tasks/Task.mjs +0 -2495
  498. package/esm2020/src/tasks/TaskBase.mjs +0 -87
  499. package/esm2020/src/tasks/TaskServiceBase.mjs +0 -25
  500. package/esm2020/src/tasks/TasksTable.mjs +0 -80
  501. package/esm2020/src/tasks/sort/Sort.mjs +0 -7
  502. package/esm2020/src/tasks/sort/SortCollection.mjs +0 -67
  503. package/esm2020/src/util/ConstUtils.mjs +0 -14
  504. package/esm2020/src/util/FlowMonitorQueue.mjs +0 -453
  505. package/esm2020/src/util/HeapSort.mjs +0 -70
  506. package/esm2020/src/util/MgPriorityBlockingQueue.mjs +0 -74
  507. package/esm2020/src/util/MgPriorityQueue.mjs +0 -66
  508. package/esm2020/src/util/PrmMap.mjs +0 -151
  509. package/esm2020/src/util/ReturnResult.mjs +0 -46
  510. package/esm2020/src/util/ReturnResultBase.mjs +0 -18
  511. package/esm2020/src/util/Scrambler.mjs +0 -89
  512. package/esm2020/src/util/UniqueIDUtils.mjs +0 -12
  513. package/esm2020/src/util/cookie.service.mjs +0 -92
  514. package/fesm2015/magic-xpa-engine.mjs +0 -30835
  515. package/fesm2015/magic-xpa-engine.mjs.map +0 -1
  516. package/fesm2020/magic-xpa-engine.mjs.map +0 -1
@@ -1,24 +1,24 @@
1
- export var EventSubType;
2
- (function (EventSubType) {
3
- EventSubType[EventSubType["Normal"] = 0] = "Normal";
4
- EventSubType[EventSubType["CancelWithNoRollback"] = 1] = "CancelWithNoRollback";
5
- EventSubType[EventSubType["CancelIsQuit"] = 2] = "CancelIsQuit";
6
- EventSubType[EventSubType["RtRefreshViewUseCurrentRow"] = 3] = "RtRefreshViewUseCurrentRow";
7
- EventSubType[EventSubType["ExitDueToError"] = 4] = "ExitDueToError";
8
- })(EventSubType || (EventSubType = {}));
9
- export var ClientTargetedCommandType;
10
- (function (ClientTargetedCommandType) {
11
- ClientTargetedCommandType["Abort"] = "A";
12
- ClientTargetedCommandType["OpenURL"] = "P";
13
- ClientTargetedCommandType["Verify"] = "V";
14
- ClientTargetedCommandType["EnhancedVerify"] = "E";
15
- ClientTargetedCommandType["Result"] = "S";
16
- ClientTargetedCommandType["AddRange"] = "R";
17
- ClientTargetedCommandType["ClientRefresh"] = "C";
18
- ClientTargetedCommandType["AddLocate"] = "L";
19
- ClientTargetedCommandType["AddSort"] = "T";
20
- ClientTargetedCommandType["ResetRange"] = "G";
21
- ClientTargetedCommandType["ResetLocate"] = "O";
22
- ClientTargetedCommandType["ResetSort"] = "U";
23
- })(ClientTargetedCommandType || (ClientTargetedCommandType = {}));
1
+ export var EventSubType;
2
+ (function (EventSubType) {
3
+ EventSubType[EventSubType["Normal"] = 0] = "Normal";
4
+ EventSubType[EventSubType["CancelWithNoRollback"] = 1] = "CancelWithNoRollback";
5
+ EventSubType[EventSubType["CancelIsQuit"] = 2] = "CancelIsQuit";
6
+ EventSubType[EventSubType["RtRefreshViewUseCurrentRow"] = 3] = "RtRefreshViewUseCurrentRow";
7
+ EventSubType[EventSubType["ExitDueToError"] = 4] = "ExitDueToError";
8
+ })(EventSubType || (EventSubType = {}));
9
+ export var ClientTargetedCommandType;
10
+ (function (ClientTargetedCommandType) {
11
+ ClientTargetedCommandType["Abort"] = "A";
12
+ ClientTargetedCommandType["OpenURL"] = "P";
13
+ ClientTargetedCommandType["Verify"] = "V";
14
+ ClientTargetedCommandType["EnhancedVerify"] = "E";
15
+ ClientTargetedCommandType["Result"] = "S";
16
+ ClientTargetedCommandType["AddRange"] = "R";
17
+ ClientTargetedCommandType["ClientRefresh"] = "C";
18
+ ClientTargetedCommandType["AddLocate"] = "L";
19
+ ClientTargetedCommandType["AddSort"] = "T";
20
+ ClientTargetedCommandType["ResetRange"] = "G";
21
+ ClientTargetedCommandType["ResetLocate"] = "O";
22
+ ClientTargetedCommandType["ResetSort"] = "U";
23
+ })(ClientTargetedCommandType || (ClientTargetedCommandType = {}));
24
24
  //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZW51bXMuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi9wcm9qZWN0cy9lbmdpbmUvc3JjL2VudW1zLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE1BQU0sQ0FBTixJQUFZLFlBU1g7QUFURCxXQUFZLFlBQVk7SUFFdEIsbURBQU0sQ0FBQTtJQUNOLCtFQUFvQixDQUFBO0lBQ3BCLCtEQUFZLENBQUE7SUFFWiwyRkFBMEIsQ0FBQTtJQUUxQixtRUFBYyxDQUFBO0FBQ2hCLENBQUMsRUFUVyxZQUFZLEtBQVosWUFBWSxRQVN2QjtBQUdELE1BQU0sQ0FBTixJQUFZLHlCQWFYO0FBYkQsV0FBWSx5QkFBeUI7SU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csXHJcbiAgQWRkU29ydCA9ICdUJyxcclxuICBSZXNldFJhbmdlID0gJ0cnLFxyXG4gIFJlc2V0TG9jYXRlID0gJ08nLFxyXG4gIFJlc2V0U29ydCA9ICdVJ1xyXG59XHJcbiJdfQ==
@@ -0,0 +1,340 @@
1
+ import { CommandsProcessorBase_SendingInstruction } from "../CommandsProcessorBase";
2
+ import { MirrorPrmMap } from "../util/PrmMap";
3
+ import { NNumber, NString, StringBuilder } from "@magic-xpa/mscorelib";
4
+ import { DisplayConvertor } from "@magic-xpa/gui";
5
+ import { ConstInterface } from "../ConstInterface";
6
+ import { CommandFactory } from "../commands/ClientToServer/CommandFactory";
7
+ import { RemoteCommandsProcessor } from "../remote/RemoteCommandsProcessor";
8
+ import { Environment } from "./Environment";
9
+ import { LastFocusedManager } from "../rt/LastFocusedManager";
10
+ import { AccessHelper } from "../AccessHelper";
11
+ import { MirrorString } from "./MirrorString";
12
+ export class EnvParamsTable extends MirrorPrmMap {
13
+ static Instance = new EnvParamsTable();
14
+ constructor() {
15
+ super(MirrorString);
16
+ this.mirroredID = ConstInterface.MG_TAG_ENV_PARAM;
17
+ }
18
+ get(s) {
19
+ let valName = null;
20
+ let ret = null;
21
+ if (s.charAt(0) !== '[') {
22
+ valName = s;
23
+ s = NString.Insert(s, 0, ConstInterface.INI_SECTION_MAGIC_ENV_BRACKETS);
24
+ }
25
+ else if (s.startsWith(ConstInterface.INI_SECTION_MAGIC_ENV_BRACKETS))
26
+ valName = s.substr(ConstInterface.INI_SECTION_MAGIC_ENV_BRACKETS.length);
27
+ if (!s.startsWith(ConstInterface.INI_SECTION_LOGICAL_NAMES_BRACKETS))
28
+ s = s.toUpperCase();
29
+ if (valName !== null)
30
+ ret = this.getFromEnvironment(valName);
31
+ if (ret !== null)
32
+ return ret;
33
+ try {
34
+ let resultObject = super.getvalue(s);
35
+ if (resultObject !== null) {
36
+ ret = resultObject.ToString();
37
+ if (valName !== null) {
38
+ ret = this.getProcessedValue(valName, ret);
39
+ }
40
+ }
41
+ }
42
+ catch (ex_BE) {
43
+ }
44
+ return ret;
45
+ }
46
+ getln(section, number) {
47
+ section = section.toUpperCase().trim();
48
+ let sectionFound = false;
49
+ let keys = this.values.Keys;
50
+ for (let i = 0; i < keys.length; i++) {
51
+ let key = keys[i];
52
+ if (key.startsWith(section)) {
53
+ sectionFound = true;
54
+ if (number > 1)
55
+ number--;
56
+ else
57
+ return key.substr(section.length) + "=" + this.values.get_Item(key);
58
+ }
59
+ else if (sectionFound)
60
+ break;
61
+ }
62
+ return null;
63
+ }
64
+ getFromEnvironment(valName) {
65
+ switch (valName.toLowerCase()) {
66
+ case ConstInterface.MG_ATTR_DECIMAL_SEPARATOR:
67
+ return Environment.Instance.GetDecimal();
68
+ case ConstInterface.MG_ATTR_DATE:
69
+ return DisplayConvertor.Instance.getDateChar().toString();
70
+ case ConstInterface.MG_ATTR_TIME:
71
+ return Environment.Instance.GetTime();
72
+ case ConstInterface.MG_ATTR_OWNER:
73
+ return Environment.Instance.getOwner();
74
+ case ConstInterface.MG_ATTR_DATEMODE:
75
+ return Environment.Instance.GetDateMode(LastFocusedManager.Instance.getCurrTask().getCompIdx());
76
+ case ConstInterface.MG_ATTR_CENTURY:
77
+ return Environment.Instance.GetCentury(LastFocusedManager.Instance.getCurrTask().getCompIdx()).toString();
78
+ case ConstInterface.MG_ATTR_IDLETIME:
79
+ return Environment.Instance.getIdleTime(LastFocusedManager.Instance.getCurrTask().getCompIdx()).toString();
80
+ case ConstInterface.MG_ATTR_UPD_IN_QUERY:
81
+ return Environment.Instance.allowUpdateInQueryMode(LastFocusedManager.Instance.getCurrTask().getCompIdx()).toString();
82
+ case ConstInterface.MG_ATTR_CRE_IN_MODIFY:
83
+ return Environment.Instance.allowCreateInModifyMode(LastFocusedManager.Instance.getCurrTask().getCompIdx()).toString();
84
+ case ConstInterface.MG_ATTR_CONTEXT_INACTIVITY_TIMEOUT:
85
+ return Environment.Instance.getContextInactivityTimeout().toString();
86
+ case ConstInterface.MG_ATTR_CONTEXT_UNLOAD_TIMEOUT:
87
+ return Environment.Instance.getContextUnloadTimeout().toString();
88
+ case ConstInterface.MG_ATTR_TERMINAL:
89
+ return Environment.Instance.getTerminal().toString();
90
+ case ConstInterface.MG_ATTR_WEBCLIENT_REINIT_SESSION:
91
+ return Environment.Instance.getWebClientReinitSession();
92
+ }
93
+ return null;
94
+ }
95
+ getProcessedValue(valName, val) {
96
+ switch (valName.toLowerCase()) {
97
+ case ConstInterface.MG_ATTR_HTTP_TIMEOUT:
98
+ case ConstInterface.MG_ATTR_RTF_BUFFER_SIZE:
99
+ case ConstInterface.MG_ATTR_RANGE_POP_TIME:
100
+ case ConstInterface.MG_ATTR_TEMP_POP_TIME:
101
+ case ConstInterface.MG_ATTR_BATCH_PAINT_TIME:
102
+ return NNumber.Parse(val).toString();
103
+ case ConstInterface.MG_ATTR_USE_SIGNED_BROWSER_CLIENT:
104
+ case ConstInterface.MG_ATTR_CLOSE_PRINTED_TABLES_IN_SUBTASKS:
105
+ case ConstInterface.MG_ATTR_GENERIC_TEXT_PRINTING:
106
+ case ConstInterface.MG_ATTR_HIGH_RESOLUTION_PRINT:
107
+ case ConstInterface.MG_ATTR_MERGE_TRIM:
108
+ case ConstInterface.MG_ATTR_ORIGINAL_IMAGE_LOAD:
109
+ case ConstInterface.MG_ATTR_PRINT_DATA_TRIM:
110
+ case ConstInterface.MG_ATTR_PSCRIPT_PRINT_NT:
111
+ case ConstInterface.MG_ATTR_SPECIAL_CONV_ADD_SLASH:
112
+ case ConstInterface.MG_ATTR_SPECIAL_FULL_EXPAND_PRINT:
113
+ case ConstInterface.MG_ATTR_SPECIAL_FULL_TEXT:
114
+ case ConstInterface.MG_ATTR_SPECIAL_LAST_LINE_PRINT:
115
+ case ConstInterface.MG_ATTR_SPECIAL_PRINTER_OEM:
116
+ case ConstInterface.MG_ATTR_EMBED_FONTS:
117
+ case ConstInterface.MG_ATTR_CENTER_SCREEN_IN_ONLINE:
118
+ case ConstInterface.MG_ATTR_REPOSITION_AFTER_MODIFY:
119
+ case ConstInterface.MG_ATTR_ISAM_TRANSACTION:
120
+ return (val[0] === 'Y' || val[0] === '1') ? "Y" : "N";
121
+ case ConstInterface.MG_ATTR_TIME_SEPARATOR:
122
+ case ConstInterface.MG_ATTR_IOTIMING:
123
+ case ConstInterface.MG_ATTR_THOUSAND_SEPARATOR:
124
+ return val[0].toString();
125
+ default:
126
+ return val;
127
+ }
128
+ }
129
+ async set(s, updateIni) {
130
+ let allOK = true;
131
+ let sendToServer = false;
132
+ let name, val;
133
+ let i;
134
+ let serverVal = s;
135
+ let offsets = new Array(s.length + 1);
136
+ let offsetsChars = new Array(s.length + 1);
137
+ offsets[0] = 0;
138
+ offsetsChars[0] = 's';
139
+ let nextOffset = 1;
140
+ for (i = 1; i < s.length; i++) {
141
+ if ((s[i] === '=' || s[i] === ',') && s[i - 1] !== '\\') {
142
+ offsets[nextOffset] = i + 1;
143
+ offsetsChars[nextOffset] = s[i];
144
+ nextOffset++;
145
+ }
146
+ if (s[i] === '*') {
147
+ s = NString.Remove(s, i, 1);
148
+ break;
149
+ }
150
+ if (s[i] === '\\') {
151
+ s = NString.Remove(s, i, 1);
152
+ }
153
+ }
154
+ offsets[nextOffset] = s.length + 1;
155
+ offsetsChars[nextOffset] = '\0';
156
+ nextOffset++;
157
+ for (i = 0; i < nextOffset - 1; i++) {
158
+ name = s.substr(offsets[i], offsets[i + 1] - offsets[i] - 1);
159
+ if (s[offsets[i + 1] - 1] === '=') {
160
+ i++;
161
+ let valInit = i;
162
+ let allowedSeparators = this.getAllowedSeparators(name);
163
+ for (let sep = 0; sep < allowedSeparators; sep++) {
164
+ if (offsetsChars[i + 1] === ',')
165
+ i++;
166
+ else
167
+ break;
168
+ }
169
+ val = s.substr(offsets[valInit], offsets[i + 1] - offsets[valInit] - 1);
170
+ }
171
+ else
172
+ val = null;
173
+ if (this.isReservedLogicalName(name)) {
174
+ allOK = false;
175
+ continue;
176
+ }
177
+ if (name[0] !== '[')
178
+ name = NString.Insert(name, 0, ConstInterface.INI_SECTION_MAGIC_ENV_BRACKETS);
179
+ if (!name.startsWith(ConstInterface.INI_SECTION_LOGICAL_NAMES_BRACKETS))
180
+ name = name.toUpperCase();
181
+ name = name.trim();
182
+ val = val.trim();
183
+ sendToServer = true;
184
+ if (!NString.IsNullOrEmpty(val) ||
185
+ name.startsWith(ConstInterface.INI_SECTION_LOGICAL_NAMES_BRACKETS)) {
186
+ super.setValue(name, new MirrorString(val), !updateIni);
187
+ this.checkSetInEnvironment(name, val);
188
+ }
189
+ else
190
+ super.remove(name);
191
+ }
192
+ if (updateIni && sendToServer) {
193
+ let cmd = CommandFactory.CreateIniputForceWriteCommand(serverVal);
194
+ AccessHelper.mgDataTable.getMGData(0).CmdsToServer.Add(cmd);
195
+ await RemoteCommandsProcessor.GetInstance().Execute(CommandsProcessorBase_SendingInstruction.ONLY_COMMANDS);
196
+ }
197
+ return allOK;
198
+ }
199
+ isReservedLogicalName(name) {
200
+ if (!name.startsWith("[")) {
201
+ name = NString.Insert(name, 0, ConstInterface.INI_SECTION_LOGICAL_NAMES_BRACKETS);
202
+ if (this.values.ContainsKey(name) && this.values.get_Item(name).isReserved())
203
+ return true;
204
+ }
205
+ return false;
206
+ }
207
+ getAllowedSeparators(name) {
208
+ if (name.charAt(0) !== '[')
209
+ return 0;
210
+ let section = name.substr(1, name.indexOf(']') - 1);
211
+ let param = name.substr(name.indexOf(']') + 1);
212
+ switch (section.toUpperCase()) {
213
+ case ConstInterface.INI_SECTION_MAGIC_ENV:
214
+ if (param.toUpperCase() === ConstInterface.MG_ATTR_LANGUAGE.toUpperCase())
215
+ return 999;
216
+ else
217
+ return 0;
218
+ case ConstInterface.INI_SECTION_MAGIC_SYSTEMS:
219
+ return 8;
220
+ case ConstInterface.INI_SECTION_MAGIC_DBMS:
221
+ return 13;
222
+ case ConstInterface.INI_SECTION_MAGIC_SERVERS:
223
+ return 6;
224
+ case ConstInterface.INI_SECTION_MAGIC_COMMS:
225
+ return 2;
226
+ case ConstInterface.INI_SECTION_MAGIC_PRINTERS:
227
+ return 3;
228
+ case ConstInterface.INI_SECTION_MAGIC_SYSTEM_MENU:
229
+ return 11;
230
+ case ConstInterface.INI_SECTION_MAGIC_DATABASES:
231
+ return 21;
232
+ case ConstInterface.INI_SECTION_MAGIC_LANGUAGE:
233
+ return 1;
234
+ case ConstInterface.INI_SECTION_MAGIC_SERVICES:
235
+ return 8;
236
+ case ConstInterface.INI_SECTION_TOOLS_MENU:
237
+ return 7;
238
+ default:
239
+ return 0;
240
+ }
241
+ }
242
+ checkSetInEnvironment(name, val) {
243
+ if (name.startsWith(ConstInterface.INI_SECTION_MAGIC_ENV_BRACKETS)) {
244
+ name = name.substr(ConstInterface.INI_SECTION_MAGIC_ENV_BRACKETS.length);
245
+ switch (name.toLowerCase()) {
246
+ case ConstInterface.MG_ATTR_DECIMAL_SEPARATOR:
247
+ Environment.Instance.setDecimalSeparator(val[0]);
248
+ break;
249
+ case ConstInterface.MG_ATTR_DATE:
250
+ DisplayConvertor.Instance.setDateChar(val[0].charCodeAt(0));
251
+ break;
252
+ case ConstInterface.MG_ATTR_TIME:
253
+ Environment.Instance.setTimeSeparator(val[0]);
254
+ break;
255
+ case ConstInterface.MG_ATTR_OWNER:
256
+ Environment.Instance.setOwner(val);
257
+ break;
258
+ case ConstInterface.MG_ATTR_DATEMODE:
259
+ Environment.Instance.setDateMode(LastFocusedManager.Instance.getCurrTask().getCompIdx(), val[0]);
260
+ break;
261
+ case ConstInterface.MG_ATTR_CENTURY:
262
+ Environment.Instance.setCentury(LastFocusedManager.Instance.getCurrTask().getCompIdx(), NNumber.Parse(val));
263
+ break;
264
+ case ConstInterface.MG_ATTR_IDLETIME:
265
+ Environment.Instance.setIdleTime(LastFocusedManager.Instance.getCurrTask().getCompIdx(), NNumber.Parse(val));
266
+ break;
267
+ case ConstInterface.MG_ATTR_UPD_IN_QUERY_LOWER:
268
+ Environment.Instance.setAllowUpdateInQueryMode(LastFocusedManager.Instance.getCurrTask().getCompIdx(), val[0] === '1');
269
+ break;
270
+ case ConstInterface.MG_ATTR_CRE_IN_MODIFY_LOWER:
271
+ Environment.Instance.setAllowCreateInModifyMode(LastFocusedManager.Instance.getCurrTask().getCompIdx(), val[0] === '1');
272
+ break;
273
+ case ConstInterface.MG_ATTR_CONTEXT_INACTIVITY_TIMEOUT_LOWER:
274
+ Environment.Instance.setContextInactivityTimeout(NNumber.Parse(val));
275
+ break;
276
+ case ConstInterface.MG_ATTR_CONTEXT_INACTIVITY_WARNING_TIME_LOWER:
277
+ Environment.Instance.setContextInactivityWarningTime(NNumber.Parse(val));
278
+ break;
279
+ case ConstInterface.MG_ATTR_CONTEXT_UNLOAD_TIMEOUT_LOWER:
280
+ Environment.Instance.setContextUnloadTimeout(NNumber.Parse(val));
281
+ break;
282
+ case ConstInterface.MG_ATTR_TERMINAL:
283
+ Environment.Instance.setTerminal(NNumber.Parse(val));
284
+ break;
285
+ }
286
+ }
287
+ }
288
+ translate(logicalName) {
289
+ let stringBuilder = new StringBuilder(logicalName);
290
+ this.log(stringBuilder);
291
+ return stringBuilder.ToString();
292
+ }
293
+ log(stringBldr) {
294
+ let finished;
295
+ do {
296
+ let offset = 0;
297
+ finished = true;
298
+ while (offset < stringBldr.Length && stringBldr.get_Item(offset) > '\0') {
299
+ if (stringBldr.get_Item(offset) === '%') {
300
+ let oldLength = stringBldr.Length;
301
+ offset = this.log_trans(stringBldr, offset);
302
+ if (oldLength !== stringBldr.Length)
303
+ finished = false;
304
+ }
305
+ else
306
+ offset = offset + 1;
307
+ }
308
+ } while (!finished);
309
+ }
310
+ log_trans(stringBldr, offset) {
311
+ let ignoreTrans = false;
312
+ let startSym = offset;
313
+ let endSym = offset + 1;
314
+ while (endSym < stringBldr.Length) {
315
+ if (stringBldr.get_Item(endSym) === '%')
316
+ break;
317
+ endSym++;
318
+ }
319
+ if (endSym >= stringBldr.Length) {
320
+ offset = endSym;
321
+ ignoreTrans = true;
322
+ }
323
+ else if (stringBldr.get_Item(endSym) !== '%')
324
+ offset++;
325
+ if (!ignoreTrans) {
326
+ let sym = ConstInterface.INI_SECTION_LOGICAL_NAMES_BRACKETS +
327
+ stringBldr.ToString(startSym + 1, endSym - startSym - 1);
328
+ let trans = this.get(sym);
329
+ if (trans === null) {
330
+ stringBldr.Replace(stringBldr.ToString(offset, endSym + 1 - offset), "", offset, endSym + 1 - offset);
331
+ offset += 1;
332
+ }
333
+ else {
334
+ stringBldr.Replace(stringBldr.ToString(startSym, endSym + 1 - startSym), trans, startSym, endSym + 1 - startSym);
335
+ }
336
+ }
337
+ return offset;
338
+ }
339
+ }
340
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiRW52VmFyaWFibGVzVGFibGUuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi9wcm9qZWN0cy9lbmdpbmUvc3JjL2Vudi9FbnZWYXJpYWJsZXNUYWJsZS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBQUMsd0NBQXdDLEVBQUMsTUFBTSwwQkFBMEIsQ0FBQztBQUNsRixPQUFPLEVBQUMsWUFBWSxFQUFDLE1BQU0sZ0JBQWdCLENBQUM7QUFDNUMsT0FBTyxFQUFDLE9BQU8sRUFBRSxPQUFPLEVBQUUsYUFBYSxFQUFDLE1BQU0sc0JBQXNCLENBQUM7QUFFckUsT0FBTyxFQUFDLGdCQUFnQixFQUFDLE1BQU0sZ0JBQWdCLENBQUM7QUFDaEQsT0FBTyxFQUFDLGNBQWMsRUFBQyxNQUFNLG1CQUFtQixDQUFDO0FBRWpELE9BQU8sRUFBQyxjQUFjLEVBQUMsTUFBTSwyQ0FBMkMsQ0FBQztBQUN6RSxPQUFPLEVBQUMsdUJBQXVCLEVBQUMsTUFBTSxtQ0FBbUMsQ0FBQztBQUMxRSxPQUFPLEVBQUMsV0FBVyxFQUFDLE1BQU0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