@magic-xpa/engine 4.1100.0-dev4110.19 → 4.1100.0-dev4110.191
Sign up to get free protection for your applications and to get access to all the features.
- package/{esm2020 → esm2022}/index.mjs +188 -188
- package/{esm2020 → esm2022}/magic-xpa-engine.mjs +1 -1
- package/esm2022/src/AccessHelper.mjs +15 -0
- package/esm2022/src/ClientManager.mjs +399 -0
- package/esm2022/src/CommandsProcessorBase.mjs +56 -0
- package/esm2022/src/CommandsProcessorManager.mjs +26 -0
- package/esm2022/src/CommandsTable.mjs +162 -0
- package/esm2022/src/ConstInterface.mjs +516 -0
- package/{esm2020 → esm2022}/src/CurrentClientVersion.mjs +2 -2
- package/esm2022/src/FlowMonitorInterface.mjs +16 -0
- package/esm2022/src/GUIManager.mjs +62 -0
- package/esm2022/src/GlobalCommandsManager.mjs +34 -0
- package/esm2022/src/GuiEventsProcessor.mjs +154 -0
- package/{esm2020 → esm2022}/src/ICommandsTable.mjs +1 -1
- package/esm2022/src/ServerConfig.mjs +118 -0
- package/{esm2020 → esm2022}/src/bridge/IGuiEvent.mjs +19 -19
- package/{esm2020 → esm2022}/src/bridge/MagicBridge.mjs +40 -40
- package/esm2022/src/commands/ClientOriginatedCommandTaskTag.mjs +12 -0
- package/{esm2020 → esm2022}/src/commands/ClientToServer/AddUserLocateDataViewCommand.mjs +8 -8
- package/{esm2020 → esm2022}/src/commands/ClientToServer/AddUserRangeDataviewCommand.mjs +9 -9
- package/{esm2020 → esm2022}/src/commands/ClientToServer/AddUserSortDataViewCommand.mjs +9 -9
- package/{esm2020 → esm2022}/src/commands/ClientToServer/BrowserEscEventCommand.mjs +23 -23
- package/{esm2020 → esm2022}/src/commands/ClientToServer/ClientOriginatedCommand.mjs +14 -14
- package/esm2022/src/commands/ClientToServer/ClientOriginatedCommandSerializer.mjs +60 -0
- package/{esm2020 → esm2022}/src/commands/ClientToServer/ColumnSortEventCommand.mjs +26 -26
- package/esm2022/src/commands/ClientToServer/CommandFactory.mjs +260 -0
- package/esm2022/src/commands/ClientToServer/CommandSerializationHelper.mjs +67 -0
- package/{esm2020 → esm2022}/src/commands/ClientToServer/ComputeEventCommand.mjs +23 -23
- package/{esm2020 → esm2022}/src/commands/ClientToServer/ContextTerminationEventCommand.mjs +20 -20
- package/{esm2020 → esm2022}/src/commands/ClientToServer/ContextTimeoutResetCommand.mjs +19 -19
- package/{esm2020 → esm2022}/src/commands/ClientToServer/ControlItemsRefreshCommand.mjs +8 -8
- package/esm2022/src/commands/ClientToServer/DataViewOutputCommand.mjs +13 -0
- package/{esm2020 → esm2022}/src/commands/ClientToServer/DataviewCommand.mjs +44 -44
- package/esm2022/src/commands/ClientToServer/EvaluateCommand.mjs +37 -0
- package/esm2022/src/commands/ClientToServer/EventCommand.mjs +40 -0
- package/esm2022/src/commands/ClientToServer/ExecOperCommand.mjs +67 -0
- package/esm2022/src/commands/ClientToServer/FetchDataControlValuesEventCommand.mjs +22 -0
- package/{esm2020 → esm2022}/src/commands/ClientToServer/GlobalParamsQueryCommand.mjs +10 -10
- package/{esm2020 → esm2022}/src/commands/ClientToServer/ICommandTaskTag.mjs +1 -1
- package/{esm2020 → esm2022}/src/commands/ClientToServer/IndexChangeEventCommand.mjs +21 -21
- package/esm2022/src/commands/ClientToServer/IniputForceWriteCommand.mjs +23 -0
- package/{esm2020 → esm2022}/src/commands/ClientToServer/NonReversibleExitEventCommand.mjs +23 -23
- package/{esm2020 → esm2022}/src/commands/ClientToServer/QueryCommand.mjs +20 -20
- package/esm2022/src/commands/ClientToServer/RecomputeCommand.mjs +27 -0
- package/esm2022/src/commands/ClientToServer/RefreshEventCommand.mjs +27 -0
- package/esm2022/src/commands/ClientToServer/RefreshScreenEventCommand.mjs +24 -0
- package/esm2022/src/commands/ClientToServer/RollbackEventCommand.mjs +40 -0
- package/{esm2020 → esm2022}/src/commands/ClientToServer/SelectProgramCommand.mjs +14 -14
- package/{esm2020 → esm2022}/src/commands/ClientToServer/SetTransactionStateDataviewCommand.mjs +9 -9
- package/{esm2020 → esm2022}/src/commands/ClientToServer/SubformOpenEventCommand.mjs +21 -21
- package/esm2022/src/commands/ClientToServer/SubformRefreshEventCommand.mjs +24 -0
- package/esm2022/src/commands/ClientToServer/TransactionCommand.mjs +30 -0
- package/{esm2020 → esm2022}/src/commands/ClientToServer/UnloadCommand.mjs +14 -14
- package/esm2022/src/commands/ClientToServer/WriteMessageToServerLogCommand.mjs +18 -0
- package/esm2022/src/commands/DataViewCommandBase.mjs +8 -0
- package/{esm2020 → esm2022}/src/commands/IClientCommand.mjs +1 -1
- package/esm2022/src/commands/IClientTargetedCommand.mjs +13 -0
- package/{esm2020 → esm2022}/src/commands/IClientToServerCommandInfo.mjs +1 -1
- package/esm2022/src/commands/ServerToClient/AbortCommand.mjs +65 -0
- package/{esm2020 → esm2022}/src/commands/ServerToClient/AddLocateCommand.mjs +21 -21
- package/esm2022/src/commands/ServerToClient/AddRangeCommand.mjs +62 -0
- package/esm2022/src/commands/ServerToClient/AddSortCommand.mjs +33 -0
- package/esm2022/src/commands/ServerToClient/ClientRefreshCommand.mjs +25 -0
- package/esm2022/src/commands/ServerToClient/ClientTargetedCommandBase.mjs +24 -0
- package/esm2022/src/commands/ServerToClient/EnhancedVerifyCommand.mjs +45 -0
- package/esm2022/src/commands/ServerToClient/OpenURLCommand.mjs +221 -0
- package/{esm2020 → esm2022}/src/commands/ServerToClient/ResetLocateCommand.mjs +14 -14
- package/{esm2020 → esm2022}/src/commands/ServerToClient/ResetRangeCommand.mjs +14 -14
- package/{esm2020 → esm2022}/src/commands/ServerToClient/ResetSortCommand.mjs +14 -14
- package/esm2022/src/commands/ServerToClient/ResultCommand.mjs +37 -0
- package/esm2022/src/commands/ServerToClient/VerifyCommand.mjs +83 -0
- package/esm2022/src/commands/ServerToClient/XMLBasedCommandBuilder.mjs +132 -0
- package/{esm2020 → esm2022}/src/communications/IConnectionStateManager.mjs +1 -1
- package/esm2022/src/communications/InteractiveCommunicationsFailureHandler.mjs +15 -0
- package/{esm2020 → esm2022}/src/data/DataSourceIdKey.mjs +2 -2
- package/esm2022/src/data/DataView.mjs +1613 -0
- package/{esm2020 → esm2022}/src/data/DataViewBase.mjs +3 -3
- package/esm2022/src/data/DataviewManager.mjs +28 -0
- package/esm2022/src/data/DataviewManagerBase.mjs +15 -0
- package/esm2022/src/data/DvCache.mjs +67 -0
- package/esm2022/src/data/Field.mjs +646 -0
- package/esm2022/src/data/FieldBase.mjs +15 -0
- package/esm2022/src/data/FieldsTable.mjs +103 -0
- package/{esm2020 → esm2022}/src/data/IRecordsTable.mjs +1 -1
- package/esm2022/src/data/Key.mjs +88 -0
- package/esm2022/src/data/Record.mjs +866 -0
- package/{esm2020 → esm2022}/src/data/RecordOutOfDataViewException.mjs +15 -15
- package/esm2022/src/data/RecordsTable.mjs +267 -0
- package/esm2022/src/data/TaskTransactionManager.mjs +103 -0
- package/esm2022/src/data/XMLBasedDcValuesBuilder.mjs +74 -0
- package/{esm2020 → esm2022}/src/enums.mjs +23 -23
- package/esm2022/src/env/EnvVariablesTable.mjs +340 -0
- package/esm2022/src/env/Environment.mjs +487 -0
- package/{esm2020 → esm2022}/src/env/ILanguageData.mjs +1 -1
- package/esm2022/src/env/LanguageData.mjs +226 -0
- package/esm2022/src/env/MirrorString.mjs +65 -0
- package/esm2022/src/event/ActionManager.mjs +91 -0
- package/esm2022/src/event/Event.mjs +1333 -0
- package/esm2022/src/event/EventHandler.mjs +766 -0
- package/esm2022/src/event/EventHandlerPosition.mjs +204 -0
- package/esm2022/src/event/EventsManager.mjs +2975 -0
- package/{esm2020 → esm2022}/src/event/IEventsManager.mjs +6 -6
- package/esm2022/src/event/RunTimeEvent.mjs +392 -0
- package/{esm2020 → esm2022}/src/event/RunTimeEventBase.mjs +3 -3
- package/esm2022/src/event/UserEventsTable.mjs +47 -0
- package/esm2022/src/exp/ExpTable.mjs +57 -0
- package/esm2022/src/exp/Expression.mjs +200 -0
- package/esm2022/src/exp/ExpressionDict.mjs +727 -0
- package/esm2022/src/exp/ExpressionEvaluator.mjs +4206 -0
- package/esm2022/src/exp/ExpressionLocalJpn.mjs +314 -0
- package/esm2022/src/exp/GlobalParamsTable.mjs +85 -0
- package/esm2022/src/exp/YesNoExp.mjs +36 -0
- package/esm2022/src/gui/CreatedFormVector.mjs +23 -0
- package/esm2022/src/gui/FormsTable.mjs +66 -0
- package/esm2022/src/gui/MgControl.mjs +363 -0
- package/esm2022/src/gui/MgForm.mjs +1181 -0
- package/esm2022/src/http/HttpManager.mjs +97 -0
- package/esm2022/src/http/client/HttpClientAsync.mjs +68 -0
- package/esm2022/src/http/client/HttpClientBase.mjs +132 -0
- package/esm2022/src/http/client/HttpClientEvents.mjs +39 -0
- package/esm2022/src/http/client/HttpClientSync.mjs +42 -0
- package/esm2022/src/http/client/HttpUtility.mjs +84 -0
- package/{esm2020 → esm2022}/src/http/client/ICommunicationsFailureHandler.mjs +1 -1
- package/esm2022/src/remote/AddUserLocateRemoteDataViewCommand.mjs +18 -0
- package/esm2022/src/remote/AddUserRangeRemoteDataViewCommand.mjs +18 -0
- package/esm2022/src/remote/AddUserSortRemoteDataViewCommand.mjs +18 -0
- package/esm2022/src/remote/RemoteCommandsProcessor.mjs +882 -0
- package/esm2022/src/remote/RemoteControlItemsRefreshCommand.mjs +25 -0
- package/esm2022/src/remote/RemoteDataViewCommandBase.mjs +24 -0
- package/esm2022/src/remote/RemoteDataViewCommandFactory.mjs +61 -0
- package/{esm2020 → esm2022}/src/remote/RemoteDataViewCommandUpdateNonModifiable.mjs +15 -15
- package/{esm2020 → esm2022}/src/remote/RemoteDataviewManager.mjs +17 -17
- package/{esm2020 → esm2022}/src/remote/RemoteInitDataViewCommand.mjs +10 -10
- package/esm2022/src/remote/ResetUserLocateRemoteDataviewCommand.mjs +17 -0
- package/{esm2020 → esm2022}/src/remote/ResetUserRangeRemoteDataviewCommand.mjs +12 -12
- package/esm2022/src/remote/ResetUserSortRemoteDataviewCommand.mjs +16 -0
- package/esm2022/src/remote/ServerError.mjs +40 -0
- package/esm2022/src/remote/SetTransactionStateRemoteDataViewCommand.mjs +20 -0
- package/esm2022/src/rt/Argument.mjs +265 -0
- package/esm2022/src/rt/ArgumentsList.mjs +103 -0
- package/esm2022/src/rt/Boundary.mjs +152 -0
- package/esm2022/src/rt/CompMainPrgTable.mjs +63 -0
- package/{esm2020 → esm2022}/src/rt/DataviewHeaderBase.mjs +98 -96
- package/{esm2020 → esm2022}/src/rt/DataviewHeaderFactory.mjs +6 -6
- package/esm2022/src/rt/DataviewHeaders.mjs +53 -0
- package/esm2022/src/rt/DataviewHeadersSaxHandler.mjs +38 -0
- package/esm2022/src/rt/ExecutionStack.mjs +94 -0
- package/{esm2020 → esm2022}/src/rt/ExecutionStackEntry.mjs +17 -17
- package/esm2022/src/rt/HandlersTable.mjs +96 -0
- package/{esm2020 → esm2022}/src/rt/IDataSourceViewDefinition.mjs +1 -1
- package/{esm2020 → esm2022}/src/rt/IDataviewHeader.mjs +1 -1
- package/{esm2020 → esm2022}/src/rt/IResultValue.mjs +1 -1
- package/esm2022/src/rt/LastFocusedManager.mjs +65 -0
- package/esm2022/src/rt/Operation.mjs +735 -0
- package/esm2022/src/rt/OperationTable.mjs +67 -0
- package/esm2022/src/rt/Recompute.mjs +355 -0
- package/esm2022/src/rt/RecomputeTable.mjs +63 -0
- package/esm2022/src/rt/RemoteDataviewHeader.mjs +108 -0
- package/esm2022/src/rt/ResultValue.mjs +10 -0
- package/esm2022/src/rt/TableCache.mjs +177 -0
- package/esm2022/src/rt/TableCacheManager.mjs +67 -0
- package/esm2022/src/rt/Transaction.mjs +53 -0
- package/esm2022/src/security/UserDetails.mjs +71 -0
- package/{esm2020 → esm2022}/src/tasks/IMGDataCollection.mjs +1 -1
- package/esm2022/src/tasks/MGData.mjs +552 -0
- package/esm2022/src/tasks/MGDataCollection.mjs +252 -0
- package/esm2022/src/tasks/RCTimer.mjs +63 -0
- package/esm2022/src/tasks/RemoteTaskService.mjs +45 -0
- package/esm2022/src/tasks/Task.mjs +2497 -0
- package/esm2022/src/tasks/TaskBase.mjs +83 -0
- package/esm2022/src/tasks/TaskServiceBase.mjs +25 -0
- package/esm2022/src/tasks/TasksTable.mjs +80 -0
- package/esm2022/src/tasks/sort/Sort.mjs +5 -0
- package/esm2022/src/tasks/sort/SortCollection.mjs +67 -0
- package/esm2022/src/util/ConstUtils.mjs +14 -0
- package/esm2022/src/util/FlowMonitorQueue.mjs +451 -0
- package/esm2022/src/util/HeapSort.mjs +70 -0
- package/{esm2020 → esm2022}/src/util/IMirrorXML.mjs +1 -1
- package/{esm2020 → esm2022}/src/util/IServerConfig.mjs +1 -1
- package/{esm2020 → esm2022}/src/util/MgBlockingQueue.mjs +1 -1
- package/esm2022/src/util/MgPriorityBlockingQueue.mjs +74 -0
- package/esm2022/src/util/MgPriorityQueue.mjs +66 -0
- package/{esm2020 → esm2022}/src/util/ParamParseResult.mjs +7 -7
- package/esm2022/src/util/PrmMap.mjs +152 -0
- package/esm2022/src/util/ReturnResult.mjs +46 -0
- package/esm2022/src/util/ReturnResultBase.mjs +18 -0
- package/esm2022/src/util/Scrambler.mjs +89 -0
- package/esm2022/src/util/UniqueIDUtils.mjs +13 -0
- package/esm2022/src/util/cookie.service.mjs +92 -0
- package/{fesm2020 → fesm2022}/magic-xpa-engine.mjs +29713 -29693
- package/fesm2022/magic-xpa-engine.mjs.map +1 -0
- package/index.d.ts +187 -187
- package/package.json +8 -14
- package/src/AccessHelper.d.ts +20 -20
- package/src/ClientManager.d.ts +32 -32
- package/src/CommandsProcessorBase.d.ts +23 -23
- package/src/CommandsProcessorManager.d.ts +6 -6
- package/src/CommandsTable.d.ts +22 -22
- package/src/ConstInterface.d.ts +515 -515
- package/src/CurrentClientVersion.d.ts +1 -1
- package/src/FlowMonitorInterface.d.ts +15 -15
- package/src/GUIManager.d.ts +17 -17
- package/src/GlobalCommandsManager.d.ts +17 -17
- package/src/GuiEventsProcessor.d.ts +24 -24
- package/src/ICommandsTable.d.ts +9 -9
- package/src/ServerConfig.d.ts +34 -34
- package/src/bridge/IGuiEvent.d.ts +19 -19
- package/src/bridge/MagicBridge.d.ts +16 -16
- package/src/commands/ClientOriginatedCommandTaskTag.d.ts +8 -8
- package/src/commands/ClientToServer/AddUserLocateDataViewCommand.d.ts +4 -4
- package/src/commands/ClientToServer/AddUserRangeDataviewCommand.d.ts +6 -6
- package/src/commands/ClientToServer/AddUserSortDataViewCommand.d.ts +6 -6
- package/src/commands/ClientToServer/BrowserEscEventCommand.d.ts +8 -8
- package/src/commands/ClientToServer/ClientOriginatedCommand.d.ts +8 -8
- package/src/commands/ClientToServer/ClientOriginatedCommandSerializer.d.ts +6 -6
- package/src/commands/ClientToServer/ColumnSortEventCommand.d.ts +10 -10
- package/src/commands/ClientToServer/CommandFactory.d.ts +64 -64
- package/src/commands/ClientToServer/CommandSerializationHelper.d.ts +20 -20
- package/src/commands/ClientToServer/ComputeEventCommand.d.ts +8 -8
- package/src/commands/ClientToServer/ContextTerminationEventCommand.d.ts +7 -7
- package/src/commands/ClientToServer/ContextTimeoutResetCommand.d.ts +7 -7
- package/src/commands/ClientToServer/ControlItemsRefreshCommand.d.ts +6 -6
- package/src/commands/ClientToServer/DataViewOutputCommand.d.ts +9 -9
- package/src/commands/ClientToServer/DataviewCommand.d.ts +32 -32
- package/src/commands/ClientToServer/EvaluateCommand.d.ts +15 -15
- package/src/commands/ClientToServer/EventCommand.d.ts +15 -15
- package/src/commands/ClientToServer/ExecOperCommand.d.ts +23 -23
- package/src/commands/ClientToServer/FetchDataControlValuesEventCommand.d.ts +8 -8
- package/src/commands/ClientToServer/GlobalParamsQueryCommand.d.ts +5 -5
- package/src/commands/ClientToServer/ICommandTaskTag.d.ts +3 -3
- package/src/commands/ClientToServer/IndexChangeEventCommand.d.ts +8 -8
- package/src/commands/ClientToServer/IniputForceWriteCommand.d.ts +10 -10
- package/src/commands/ClientToServer/NonReversibleExitEventCommand.d.ts +8 -8
- package/src/commands/ClientToServer/QueryCommand.d.ts +8 -8
- package/src/commands/ClientToServer/RecomputeCommand.d.ts +11 -11
- package/src/commands/ClientToServer/RefreshEventCommand.d.ts +12 -12
- package/src/commands/ClientToServer/RefreshScreenEventCommand.d.ts +10 -10
- package/src/commands/ClientToServer/RollbackEventCommand.d.ts +14 -14
- package/src/commands/ClientToServer/SelectProgramCommand.d.ts +6 -6
- package/src/commands/ClientToServer/SetTransactionStateDataviewCommand.d.ts +5 -5
- package/src/commands/ClientToServer/SubformOpenEventCommand.d.ts +8 -8
- package/src/commands/ClientToServer/SubformRefreshEventCommand.d.ts +9 -9
- package/src/commands/ClientToServer/TransactionCommand.d.ts +12 -12
- package/src/commands/ClientToServer/UnloadCommand.d.ts +7 -7
- package/src/commands/ClientToServer/WriteMessageToServerLogCommand.d.ts +6 -6
- package/src/commands/DataViewCommandBase.d.ts +6 -6
- package/src/commands/IClientCommand.d.ts +2 -2
- package/src/commands/IClientTargetedCommand.d.ts +12 -12
- package/src/commands/IClientToServerCommandInfo.d.ts +3 -3
- package/src/commands/ServerToClient/AbortCommand.d.ts +11 -11
- package/src/commands/ServerToClient/AddLocateCommand.d.ts +6 -6
- package/src/commands/ServerToClient/AddRangeCommand.d.ts +10 -10
- package/src/commands/ServerToClient/AddSortCommand.d.ts +9 -9
- package/src/commands/ServerToClient/ClientRefreshCommand.d.ts +7 -7
- package/src/commands/ServerToClient/ClientTargetedCommandBase.d.ts +12 -12
- package/src/commands/ServerToClient/EnhancedVerifyCommand.d.ts +13 -13
- package/src/commands/ServerToClient/OpenURLCommand.d.ts +21 -21
- package/src/commands/ServerToClient/ResetLocateCommand.d.ts +6 -6
- package/src/commands/ServerToClient/ResetRangeCommand.d.ts +6 -6
- package/src/commands/ServerToClient/ResetSortCommand.d.ts +6 -6
- package/src/commands/ServerToClient/ResultCommand.d.ts +10 -10
- package/src/commands/ServerToClient/VerifyCommand.d.ts +17 -17
- package/src/commands/ServerToClient/XMLBasedCommandBuilder.d.ts +11 -11
- package/src/communications/IConnectionStateManager.d.ts +4 -4
- package/src/communications/InteractiveCommunicationsFailureHandler.d.ts +6 -6
- package/src/data/DataSourceIdKey.d.ts +2 -2
- package/src/data/DataView.d.ts +162 -162
- package/src/data/DataViewBase.d.ts +12 -12
- package/src/data/DataviewManager.d.ts +14 -14
- package/src/data/DataviewManagerBase.d.ts +11 -11
- package/src/data/DvCache.d.ts +15 -15
- package/src/data/Field.d.ts +103 -103
- package/src/data/FieldBase.d.ts +23 -23
- package/src/data/FieldsTable.d.ts +27 -27
- package/src/data/IRecordsTable.d.ts +7 -7
- package/src/data/Key.d.ts +15 -15
- package/src/data/Record.d.ts +156 -156
- package/src/data/RecordOutOfDataViewException.d.ts +10 -10
- package/src/data/RecordsTable.d.ts +38 -38
- package/src/data/TaskTransactionManager.d.ts +17 -17
- package/src/data/XMLBasedDcValuesBuilder.d.ts +11 -11
- package/src/enums.d.ts +21 -21
- package/src/env/EnvVariablesTable.d.ts +17 -17
- package/src/env/Environment.d.ts +118 -118
- package/src/env/ILanguageData.d.ts +3 -3
- package/src/env/LanguageData.d.ts +20 -20
- package/src/env/MirrorString.d.ts +15 -15
- package/src/event/ActionManager.d.ts +14 -14
- package/src/event/Event.d.ts +79 -79
- package/src/event/EventHandler.d.ts +66 -66
- package/src/event/EventHandlerPosition.d.ts +25 -25
- package/src/event/EventsManager.d.ts +204 -204
- package/src/event/IEventsManager.d.ts +77 -77
- package/src/event/RunTimeEvent.d.ts +123 -123
- package/src/event/RunTimeEventBase.d.ts +5 -5
- package/src/event/UserEventsTable.d.ts +11 -11
- package/src/exp/ExpTable.d.ts +11 -11
- package/src/exp/Expression.d.ts +37 -37
- package/src/exp/ExpressionDict.d.ts +12 -12
- package/src/exp/ExpressionEvaluator.d.ts +198 -198
- package/src/exp/ExpressionLocalJpn.d.ts +18 -18
- package/src/exp/GlobalParamsTable.d.ts +19 -19
- package/src/exp/YesNoExp.d.ts +9 -9
- package/src/gui/CreatedFormVector.d.ts +10 -10
- package/src/gui/FormsTable.d.ts +15 -15
- package/src/gui/MgControl.d.ts +60 -60
- package/src/gui/MgForm.d.ts +93 -93
- package/src/http/HttpManager.d.ts +25 -25
- package/src/http/client/HttpClientAsync.d.ts +16 -16
- package/src/http/client/HttpClientBase.d.ts +30 -30
- package/src/http/client/HttpClientEvents.d.ts +18 -18
- package/src/http/client/HttpClientSync.d.ts +17 -17
- package/src/http/client/HttpUtility.d.ts +10 -10
- package/src/http/client/ICommunicationsFailureHandler.d.ts +5 -5
- package/src/remote/AddUserLocateRemoteDataViewCommand.d.ts +8 -8
- package/src/remote/AddUserRangeRemoteDataViewCommand.d.ts +8 -8
- package/src/remote/AddUserSortRemoteDataViewCommand.d.ts +8 -8
- package/src/remote/RemoteCommandsProcessor.d.ts +51 -51
- package/src/remote/RemoteControlItemsRefreshCommand.d.ts +8 -8
- package/src/remote/RemoteDataViewCommandBase.d.ts +10 -10
- package/src/remote/RemoteDataViewCommandFactory.d.ts +6 -6
- package/src/remote/RemoteDataViewCommandUpdateNonModifiable.d.ts +8 -8
- package/src/remote/RemoteDataviewManager.d.ts +9 -9
- package/src/remote/RemoteInitDataViewCommand.d.ts +7 -7
- package/src/remote/ResetUserLocateRemoteDataviewCommand.d.ts +7 -7
- package/src/remote/ResetUserRangeRemoteDataviewCommand.d.ts +7 -7
- package/src/remote/ResetUserSortRemoteDataviewCommand.d.ts +7 -7
- package/src/remote/ServerError.d.ts +16 -16
- package/src/remote/SetTransactionStateRemoteDataViewCommand.d.ts +8 -8
- package/src/rt/Argument.d.ts +36 -36
- package/src/rt/ArgumentsList.d.ts +24 -24
- package/src/rt/Boundary.d.ts +27 -27
- package/src/rt/CompMainPrgTable.d.ts +10 -10
- package/src/rt/DataviewHeaderBase.d.ts +34 -34
- package/src/rt/DataviewHeaderFactory.d.ts +5 -5
- package/src/rt/DataviewHeaders.d.ts +12 -12
- package/src/rt/DataviewHeadersSaxHandler.d.ts +10 -10
- package/src/rt/ExecutionStack.d.ts +22 -22
- package/src/rt/ExecutionStackEntry.d.ts +7 -7
- package/src/rt/HandlersTable.d.ts +19 -19
- package/src/rt/IDataSourceViewDefinition.d.ts +6 -6
- package/src/rt/IDataviewHeader.d.ts +10 -10
- package/src/rt/IResultValue.d.ts +4 -4
- package/src/rt/LastFocusedManager.d.ts +23 -23
- package/src/rt/Operation.d.ts +97 -97
- package/src/rt/OperationTable.d.ts +15 -15
- package/src/rt/Recompute.d.ts +41 -41
- package/src/rt/RecomputeTable.d.ts +9 -9
- package/src/rt/RemoteDataviewHeader.d.ts +14 -14
- package/src/rt/ResultValue.d.ts +7 -7
- package/src/rt/TableCache.d.ts +29 -29
- package/src/rt/TableCacheManager.d.ts +10 -10
- package/src/rt/Transaction.d.ts +23 -23
- package/src/security/UserDetails.d.ts +16 -16
- package/src/tasks/IMGDataCollection.d.ts +26 -26
- package/src/tasks/MGData.d.ts +63 -63
- package/src/tasks/MGDataCollection.d.ts +42 -42
- package/src/tasks/RCTimer.d.ts +13 -13
- package/src/tasks/RemoteTaskService.d.ts +16 -16
- package/src/tasks/Task.d.ts +312 -312
- package/src/tasks/TaskBase.d.ts +123 -123
- package/src/tasks/TaskServiceBase.d.ts +16 -16
- package/src/tasks/TasksTable.d.ts +21 -21
- package/src/tasks/sort/Sort.d.ts +4 -4
- package/src/tasks/sort/SortCollection.d.ts +11 -11
- package/src/util/ConstUtils.d.ts +3 -3
- package/src/util/FlowMonitorQueue.d.ts +70 -70
- package/src/util/HeapSort.d.ts +6 -6
- package/src/util/IMirrorXML.d.ts +6 -6
- package/src/util/IServerConfig.d.ts +11 -11
- package/src/util/MgBlockingQueue.d.ts +5 -5
- package/src/util/MgPriorityBlockingQueue.d.ts +17 -17
- package/src/util/MgPriorityQueue.d.ts +13 -13
- package/src/util/ParamParseResult.d.ts +6 -6
- package/src/util/PrmMap.d.ts +28 -28
- package/src/util/ReturnResult.d.ts +18 -18
- package/src/util/ReturnResultBase.d.ts +11 -11
- package/src/util/Scrambler.d.ts +10 -10
- package/src/util/UniqueIDUtils.d.ts +4 -4
- package/src/util/cookie.service.d.ts +8 -8
- package/esm2020/src/AccessHelper.mjs +0 -9
- package/esm2020/src/ClientManager.mjs +0 -399
- package/esm2020/src/CommandsProcessorBase.mjs +0 -58
- package/esm2020/src/CommandsProcessorManager.mjs +0 -26
- package/esm2020/src/CommandsTable.mjs +0 -162
- package/esm2020/src/ConstInterface.mjs +0 -516
- package/esm2020/src/FlowMonitorInterface.mjs +0 -16
- package/esm2020/src/GUIManager.mjs +0 -62
- package/esm2020/src/GlobalCommandsManager.mjs +0 -34
- package/esm2020/src/GuiEventsProcessor.mjs +0 -154
- package/esm2020/src/ServerConfig.mjs +0 -117
- package/esm2020/src/commands/ClientOriginatedCommandTaskTag.mjs +0 -11
- package/esm2020/src/commands/ClientToServer/ClientOriginatedCommandSerializer.mjs +0 -60
- package/esm2020/src/commands/ClientToServer/CommandFactory.mjs +0 -260
- package/esm2020/src/commands/ClientToServer/CommandSerializationHelper.mjs +0 -69
- package/esm2020/src/commands/ClientToServer/DataViewOutputCommand.mjs +0 -13
- package/esm2020/src/commands/ClientToServer/EvaluateCommand.mjs +0 -36
- package/esm2020/src/commands/ClientToServer/EventCommand.mjs +0 -40
- package/esm2020/src/commands/ClientToServer/ExecOperCommand.mjs +0 -67
- package/esm2020/src/commands/ClientToServer/FetchDataControlValuesEventCommand.mjs +0 -22
- package/esm2020/src/commands/ClientToServer/IniputForceWriteCommand.mjs +0 -23
- package/esm2020/src/commands/ClientToServer/RecomputeCommand.mjs +0 -27
- package/esm2020/src/commands/ClientToServer/RefreshEventCommand.mjs +0 -27
- package/esm2020/src/commands/ClientToServer/RefreshScreenEventCommand.mjs +0 -24
- package/esm2020/src/commands/ClientToServer/RollbackEventCommand.mjs +0 -39
- package/esm2020/src/commands/ClientToServer/SubformRefreshEventCommand.mjs +0 -24
- package/esm2020/src/commands/ClientToServer/TransactionCommand.mjs +0 -28
- package/esm2020/src/commands/ClientToServer/WriteMessageToServerLogCommand.mjs +0 -18
- package/esm2020/src/commands/DataViewCommandBase.mjs +0 -10
- package/esm2020/src/commands/IClientTargetedCommand.mjs +0 -9
- package/esm2020/src/commands/ServerToClient/AbortCommand.mjs +0 -65
- package/esm2020/src/commands/ServerToClient/AddRangeCommand.mjs +0 -62
- package/esm2020/src/commands/ServerToClient/AddSortCommand.mjs +0 -33
- package/esm2020/src/commands/ServerToClient/ClientRefreshCommand.mjs +0 -25
- package/esm2020/src/commands/ServerToClient/ClientTargetedCommandBase.mjs +0 -27
- package/esm2020/src/commands/ServerToClient/EnhancedVerifyCommand.mjs +0 -45
- package/esm2020/src/commands/ServerToClient/OpenURLCommand.mjs +0 -221
- package/esm2020/src/commands/ServerToClient/ResultCommand.mjs +0 -37
- package/esm2020/src/commands/ServerToClient/VerifyCommand.mjs +0 -83
- package/esm2020/src/commands/ServerToClient/XMLBasedCommandBuilder.mjs +0 -132
- package/esm2020/src/communications/InteractiveCommunicationsFailureHandler.mjs +0 -17
- package/esm2020/src/data/DataView.mjs +0 -1610
- package/esm2020/src/data/DataviewManager.mjs +0 -28
- package/esm2020/src/data/DataviewManagerBase.mjs +0 -15
- package/esm2020/src/data/DvCache.mjs +0 -67
- package/esm2020/src/data/Field.mjs +0 -646
- package/esm2020/src/data/FieldBase.mjs +0 -18
- package/esm2020/src/data/FieldsTable.mjs +0 -103
- package/esm2020/src/data/Key.mjs +0 -88
- package/esm2020/src/data/Record.mjs +0 -846
- package/esm2020/src/data/RecordsTable.mjs +0 -267
- package/esm2020/src/data/TaskTransactionManager.mjs +0 -103
- package/esm2020/src/data/XMLBasedDcValuesBuilder.mjs +0 -74
- package/esm2020/src/env/EnvVariablesTable.mjs +0 -340
- package/esm2020/src/env/Environment.mjs +0 -489
- package/esm2020/src/env/LanguageData.mjs +0 -226
- package/esm2020/src/env/MirrorString.mjs +0 -65
- package/esm2020/src/event/ActionManager.mjs +0 -91
- package/esm2020/src/event/Event.mjs +0 -1333
- package/esm2020/src/event/EventHandler.mjs +0 -766
- package/esm2020/src/event/EventHandlerPosition.mjs +0 -204
- package/esm2020/src/event/EventsManager.mjs +0 -2975
- package/esm2020/src/event/RunTimeEvent.mjs +0 -392
- package/esm2020/src/event/UserEventsTable.mjs +0 -47
- package/esm2020/src/exp/ExpTable.mjs +0 -59
- package/esm2020/src/exp/Expression.mjs +0 -200
- package/esm2020/src/exp/ExpressionDict.mjs +0 -727
- package/esm2020/src/exp/ExpressionEvaluator.mjs +0 -4212
- package/esm2020/src/exp/ExpressionLocalJpn.mjs +0 -314
- package/esm2020/src/exp/GlobalParamsTable.mjs +0 -85
- package/esm2020/src/exp/YesNoExp.mjs +0 -36
- package/esm2020/src/gui/CreatedFormVector.mjs +0 -23
- package/esm2020/src/gui/FormsTable.mjs +0 -66
- package/esm2020/src/gui/MgControl.mjs +0 -353
- package/esm2020/src/gui/MgForm.mjs +0 -1181
- package/esm2020/src/http/HttpManager.mjs +0 -97
- package/esm2020/src/http/client/HttpClientAsync.mjs +0 -67
- package/esm2020/src/http/client/HttpClientBase.mjs +0 -132
- package/esm2020/src/http/client/HttpClientEvents.mjs +0 -39
- package/esm2020/src/http/client/HttpClientSync.mjs +0 -42
- package/esm2020/src/http/client/HttpUtility.mjs +0 -84
- package/esm2020/src/remote/AddUserLocateRemoteDataViewCommand.mjs +0 -18
- package/esm2020/src/remote/AddUserRangeRemoteDataViewCommand.mjs +0 -18
- package/esm2020/src/remote/AddUserSortRemoteDataViewCommand.mjs +0 -18
- package/esm2020/src/remote/RemoteCommandsProcessor.mjs +0 -880
- package/esm2020/src/remote/RemoteControlItemsRefreshCommand.mjs +0 -25
- package/esm2020/src/remote/RemoteDataViewCommandBase.mjs +0 -24
- package/esm2020/src/remote/RemoteDataViewCommandFactory.mjs +0 -61
- package/esm2020/src/remote/ResetUserLocateRemoteDataviewCommand.mjs +0 -17
- package/esm2020/src/remote/ResetUserSortRemoteDataviewCommand.mjs +0 -16
- package/esm2020/src/remote/ServerError.mjs +0 -40
- package/esm2020/src/remote/SetTransactionStateRemoteDataViewCommand.mjs +0 -20
- package/esm2020/src/rt/Argument.mjs +0 -265
- package/esm2020/src/rt/ArgumentsList.mjs +0 -103
- package/esm2020/src/rt/Boundary.mjs +0 -152
- package/esm2020/src/rt/CompMainPrgTable.mjs +0 -65
- package/esm2020/src/rt/DataviewHeaders.mjs +0 -53
- package/esm2020/src/rt/DataviewHeadersSaxHandler.mjs +0 -38
- package/esm2020/src/rt/ExecutionStack.mjs +0 -94
- package/esm2020/src/rt/HandlersTable.mjs +0 -96
- package/esm2020/src/rt/LastFocusedManager.mjs +0 -67
- package/esm2020/src/rt/Operation.mjs +0 -735
- package/esm2020/src/rt/OperationTable.mjs +0 -67
- package/esm2020/src/rt/Recompute.mjs +0 -355
- package/esm2020/src/rt/RecomputeTable.mjs +0 -63
- package/esm2020/src/rt/RemoteDataviewHeader.mjs +0 -108
- package/esm2020/src/rt/ResultValue.mjs +0 -12
- package/esm2020/src/rt/TableCache.mjs +0 -177
- package/esm2020/src/rt/TableCacheManager.mjs +0 -67
- package/esm2020/src/rt/Transaction.mjs +0 -53
- package/esm2020/src/security/UserDetails.mjs +0 -71
- package/esm2020/src/tasks/MGData.mjs +0 -552
- package/esm2020/src/tasks/MGDataCollection.mjs +0 -252
- package/esm2020/src/tasks/RCTimer.mjs +0 -63
- package/esm2020/src/tasks/RemoteTaskService.mjs +0 -45
- package/esm2020/src/tasks/Task.mjs +0 -2495
- package/esm2020/src/tasks/TaskBase.mjs +0 -87
- package/esm2020/src/tasks/TaskServiceBase.mjs +0 -25
- package/esm2020/src/tasks/TasksTable.mjs +0 -80
- package/esm2020/src/tasks/sort/Sort.mjs +0 -7
- package/esm2020/src/tasks/sort/SortCollection.mjs +0 -67
- package/esm2020/src/util/ConstUtils.mjs +0 -14
- package/esm2020/src/util/FlowMonitorQueue.mjs +0 -453
- package/esm2020/src/util/HeapSort.mjs +0 -70
- package/esm2020/src/util/MgPriorityBlockingQueue.mjs +0 -74
- package/esm2020/src/util/MgPriorityQueue.mjs +0 -66
- package/esm2020/src/util/PrmMap.mjs +0 -151
- package/esm2020/src/util/ReturnResult.mjs +0 -46
- package/esm2020/src/util/ReturnResultBase.mjs +0 -18
- package/esm2020/src/util/Scrambler.mjs +0 -89
- package/esm2020/src/util/UniqueIDUtils.mjs +0 -12
- package/esm2020/src/util/cookie.service.mjs +0 -92
- package/fesm2015/magic-xpa-engine.mjs +0 -30835
- package/fesm2015/magic-xpa-engine.mjs.map +0 -1
- package/fesm2020/magic-xpa-engine.mjs.map +0 -1
@@ -0,0 +1,399 @@
|
|
1
|
+
import { ApplicationException, DateTime, NString, RefParam } from '@magic-xpa/mscorelib';
|
2
|
+
import { DateTimeUtils, InternalInterface, Logger, Misc, OSEnvironment, StorageAttribute, XMLConstants } from '@magic-xpa/utils';
|
3
|
+
import { Commands, CommandType, DisplayConvertor, Events, GuiDataCollection, GuiEnvironment, Manager, PIC, PropInterface, RuntimeContextBase, Styles } from '@magic-xpa/gui';
|
4
|
+
import { EventsManager } from './event/EventsManager';
|
5
|
+
import { GuiEventsProcessor } from './GuiEventsProcessor';
|
6
|
+
import { Environment } from './env/Environment';
|
7
|
+
import { LanguageData } from './env/LanguageData';
|
8
|
+
import { TasksTable } from './tasks/TasksTable';
|
9
|
+
import { Task } from './tasks/Task';
|
10
|
+
import { MGDataCollection } from './tasks/MGDataCollection';
|
11
|
+
import { UniqueIDUtils } from './util/UniqueIDUtils';
|
12
|
+
import { HttpManager } from './http/HttpManager';
|
13
|
+
import { CommandsTable } from './CommandsTable';
|
14
|
+
import { RemoteCommandsProcessor } from './remote/RemoteCommandsProcessor';
|
15
|
+
import { CommandsProcessorBase_SendingInstruction } from './CommandsProcessorBase';
|
16
|
+
import { CommandsProcessorManager } from './CommandsProcessorManager';
|
17
|
+
import { MGData } from './tasks/MGData';
|
18
|
+
import { ServerError } from './remote/ServerError';
|
19
|
+
import { HttpClientEvents } from './http/client/HttpClientEvents';
|
20
|
+
import { CommandFactory } from './commands/ClientToServer/CommandFactory';
|
21
|
+
import { CurrentClientVersion } from './CurrentClientVersion';
|
22
|
+
import { LastFocusedManager } from './rt/LastFocusedManager';
|
23
|
+
import { EnvParamsTable } from './env/EnvVariablesTable';
|
24
|
+
import { GlobalParams } from './exp/GlobalParamsTable';
|
25
|
+
import { OpenURLCommand } from './commands/ServerToClient/OpenURLCommand';
|
26
|
+
import { ServerConfig } from './ServerConfig';
|
27
|
+
import { AccessHelper } from './AccessHelper';
|
28
|
+
import { GUIManager } from "./GUIManager";
|
29
|
+
export class ClientManager {
|
30
|
+
static _instance = null;
|
31
|
+
_globalUniqueSessionId = null;
|
32
|
+
_buttonIsClicked = false;
|
33
|
+
static _executionPropertiesFileName = "./assets/server-config.json";
|
34
|
+
static get Instance() {
|
35
|
+
if (ClientManager._instance === null)
|
36
|
+
ClientManager._instance = new ClientManager();
|
37
|
+
return ClientManager._instance;
|
38
|
+
}
|
39
|
+
AddEvent(guiEvent) {
|
40
|
+
let task = MGDataCollection.Instance.GetTaskByID(guiEvent.TaskID);
|
41
|
+
let lineIdx = +guiEvent.Line;
|
42
|
+
let dvRowIdx = 0;
|
43
|
+
if (task != null) {
|
44
|
+
let control = null;
|
45
|
+
if (guiEvent.ControlName !== null)
|
46
|
+
control = task.getForm().GetCtrl(guiEvent.ControlName);
|
47
|
+
if (control != null) {
|
48
|
+
let dv = task.DataView;
|
49
|
+
if (control.IsTableChild) {
|
50
|
+
lineIdx -= dv.RecordsBeforeCurrentView;
|
51
|
+
}
|
52
|
+
switch (guiEvent.EventType) {
|
53
|
+
case "columnSort":
|
54
|
+
if (control.isColumnSortable()) {
|
55
|
+
Events.OnColumnClick(control, guiEvent.Line, guiEvent.ControlName);
|
56
|
+
}
|
57
|
+
break;
|
58
|
+
case "mousedown":
|
59
|
+
if (control.isButton()) {
|
60
|
+
this._buttonIsClicked = true;
|
61
|
+
}
|
62
|
+
else if (!control.isSubform())
|
63
|
+
Events.GetRuntimeContext(Manager.GetCurrentContextID()).LastClickedCtrlName = control.getName();
|
64
|
+
break;
|
65
|
+
case "click":
|
66
|
+
if (control.isButton() || (control.ConnectedControl && guiEvent.fromButton)) {
|
67
|
+
Events.OnSelection("", control, lineIdx, true);
|
68
|
+
Events.GetRuntimeContext(Manager.GetCurrentContextID()).LastClickedCtrlName = control.getName();
|
69
|
+
this._buttonIsClicked = false;
|
70
|
+
}
|
71
|
+
else {
|
72
|
+
Events.OnFocus(control, lineIdx, true, false);
|
73
|
+
let produceClick = control.isButton() || control.isTextControl() || control.isLabel() || control.isTabControl() || control.isTableControl() || control.isComboBox() || control.isImageControl();
|
74
|
+
Events.OnMouseDown(control.getForm(), control, null, true, lineIdx, false, produceClick);
|
75
|
+
}
|
76
|
+
break;
|
77
|
+
case "focus":
|
78
|
+
if (this._buttonIsClicked)
|
79
|
+
return;
|
80
|
+
Events.OnFocus(control, lineIdx, true, false);
|
81
|
+
break;
|
82
|
+
case "dblclick":
|
83
|
+
Events.OnDblClick(control, lineIdx);
|
84
|
+
break;
|
85
|
+
case "selectionchanged":
|
86
|
+
Events.OnSelection(guiEvent.Value, control, lineIdx, true);
|
87
|
+
break;
|
88
|
+
case "keydown":
|
89
|
+
Events.OnKeyDown(task.getForm(), control, guiEvent.modifiers, guiEvent.keyCode, 0, 0, '', false, '', true);
|
90
|
+
break;
|
91
|
+
case "setexternalvalue":
|
92
|
+
EventsManager.Instance.AddExternalValueEvent(control, guiEvent.externalValue, guiEvent.param);
|
93
|
+
break;
|
94
|
+
default:
|
95
|
+
break;
|
96
|
+
}
|
97
|
+
}
|
98
|
+
else {
|
99
|
+
switch (guiEvent.EventType) {
|
100
|
+
case "focusOnNonMagicControl":
|
101
|
+
control = LastFocusedManager.getLastFocusedControl();
|
102
|
+
if (control !== null) {
|
103
|
+
Events.OnFocusOnNonMagicControl(control);
|
104
|
+
}
|
105
|
+
break;
|
106
|
+
case "click":
|
107
|
+
if (guiEvent.ControlName === "magicRow") {
|
108
|
+
dvRowIdx = guiEvent.Line - task.DataView.RecordsBeforeCurrentView;
|
109
|
+
EventsManager.Instance.addGuiTriggeredEventWithTaskAndCodeAndLine(task, InternalInterface.MG_ACT_REC_PREFIX, dvRowIdx);
|
110
|
+
}
|
111
|
+
break;
|
112
|
+
case "navigateInTable":
|
113
|
+
if (guiEvent.ControlName === "magicRow")
|
114
|
+
this.handleNavigateInRowEvent(task, guiEvent.Value);
|
115
|
+
break;
|
116
|
+
case "close":
|
117
|
+
if (task.IsRoute())
|
118
|
+
EventsManager.Instance.AddRouterClosedEvent(task);
|
119
|
+
else
|
120
|
+
Events.CloseFormEvent(task.getForm());
|
121
|
+
break;
|
122
|
+
case "dispose":
|
123
|
+
MGDataCollection.Instance.deleteMGDataTree(task.getMgdID());
|
124
|
+
break;
|
125
|
+
case "resize":
|
126
|
+
Events.TableResizeEvent(task.getForm().getTableCtrl(), guiEvent.PageSize);
|
127
|
+
case "getRows":
|
128
|
+
dvRowIdx = lineIdx - task.DataView.RecordsBeforeCurrentView;
|
129
|
+
let lastFocusedVal = { guiMgControl: task.getForm().getTableCtrl(), Line: dvRowIdx, Val: "" };
|
130
|
+
Events.OnGetRowsData(task.getForm().getTableCtrl(), dvRowIdx, true, lastFocusedVal);
|
131
|
+
break;
|
132
|
+
case "RouterNavigate":
|
133
|
+
EventsManager.Instance.AddRouteEvent(task, InternalInterface.MG_ACT_WEBCLIENT_ROUTE, guiEvent.RouterPath, guiEvent.RouterOutletName, guiEvent.RouterParams);
|
134
|
+
break;
|
135
|
+
case "setexternalvalue":
|
136
|
+
Logger.Instance.WriteErrorToLog(NString.Format("Unable to find {0}: Trying to set value for a non-existing control.", guiEvent.ControlName));
|
137
|
+
break;
|
138
|
+
default:
|
139
|
+
break;
|
140
|
+
}
|
141
|
+
}
|
142
|
+
}
|
143
|
+
else
|
144
|
+
switch (guiEvent.EventType) {
|
145
|
+
case "confirmationClosed":
|
146
|
+
this.ConfirmationClosed(guiEvent.keyCode);
|
147
|
+
break;
|
148
|
+
}
|
149
|
+
}
|
150
|
+
handleNavigateInRowEvent(task, evt) {
|
151
|
+
let internalEvt = InternalInterface.MG_ACT_NONE;
|
152
|
+
evt = evt.toLowerCase();
|
153
|
+
switch (evt) {
|
154
|
+
case "begin-page":
|
155
|
+
internalEvt = InternalInterface.MG_ACT_TBL_BEGPAGE;
|
156
|
+
break;
|
157
|
+
case "previous-page":
|
158
|
+
internalEvt = InternalInterface.MG_ACT_TBL_PRVPAGE;
|
159
|
+
break;
|
160
|
+
case "end-page":
|
161
|
+
internalEvt = InternalInterface.MG_ACT_TBL_ENDPAGE;
|
162
|
+
break;
|
163
|
+
case "next-page":
|
164
|
+
internalEvt = InternalInterface.MG_ACT_TBL_NXTPAGE;
|
165
|
+
break;
|
166
|
+
case "previous-line":
|
167
|
+
internalEvt = InternalInterface.MG_ACT_TBL_PRVLINE;
|
168
|
+
break;
|
169
|
+
case "next-line":
|
170
|
+
internalEvt = InternalInterface.MG_ACT_TBL_NXTLINE;
|
171
|
+
break;
|
172
|
+
case "begin-table":
|
173
|
+
internalEvt = InternalInterface.MG_ACT_TBL_BEGTBL;
|
174
|
+
break;
|
175
|
+
case "end-table":
|
176
|
+
internalEvt = InternalInterface.MG_ACT_TBL_ENDTBL;
|
177
|
+
break;
|
178
|
+
}
|
179
|
+
if (internalEvt != InternalInterface.MG_ACT_NONE)
|
180
|
+
EventsManager.Instance.addGuiTriggeredEventWithTaskAndCode(task, internalEvt);
|
181
|
+
}
|
182
|
+
ConfirmationClosed(res) {
|
183
|
+
Commands.ResolvePromise(res);
|
184
|
+
}
|
185
|
+
async WorkThreadExecution() {
|
186
|
+
if (Logger.Instance.ShouldLog()) {
|
187
|
+
Logger.Instance.WriteToLog("", true);
|
188
|
+
Logger.Instance.WriteToLog("Started on " + DateTimeUtils.ToString(DateTime.Now, XMLConstants.ERROR_LOG_DATE_FORMAT, Logger.Instance), true);
|
189
|
+
this.WriteExecutionPropertiesToLog();
|
190
|
+
}
|
191
|
+
try {
|
192
|
+
if (await CommandsProcessorManager.StartSession()) {
|
193
|
+
let mgDataTab = MGDataCollection.Instance;
|
194
|
+
let startupMgData = mgDataTab.StartupMgData;
|
195
|
+
mgDataTab.currMgdID = startupMgData.GetId();
|
196
|
+
let nonInteractiveTask = null;
|
197
|
+
if (!startupMgData.IsAborting)
|
198
|
+
nonInteractiveTask = await Task.StartProgram(false, false);
|
199
|
+
if (nonInteractiveTask === null)
|
200
|
+
await EventsManager.Instance.EventsLoop(startupMgData);
|
201
|
+
else
|
202
|
+
await EventsManager.Instance.NonInteractiveEventsLoop(startupMgData, nonInteractiveTask);
|
203
|
+
EventsManager.Instance.setEndOfWork(true);
|
204
|
+
}
|
205
|
+
}
|
206
|
+
catch (ex) {
|
207
|
+
if (ex instanceof ApplicationException) {
|
208
|
+
let isNoResultError = false;
|
209
|
+
if (ex instanceof ServerError && ex.GetCode() === ServerError.INF_NO_RESULT)
|
210
|
+
isNoResultError = true;
|
211
|
+
if (!isNoResultError)
|
212
|
+
await EventsManager.Instance.ProcessAbortingError(ex);
|
213
|
+
EventsManager.Instance.setEndOfWork(true);
|
214
|
+
}
|
215
|
+
else
|
216
|
+
throw ex;
|
217
|
+
}
|
218
|
+
finally {
|
219
|
+
await EventsManager.Instance.CheckAndShowSpinner(false);
|
220
|
+
Commands.addGlobalCommand(CommandType.EXIT_MAGIC);
|
221
|
+
Commands.beginInvoke();
|
222
|
+
}
|
223
|
+
}
|
224
|
+
WriteExecutionPropertiesToLog() {
|
225
|
+
if (Logger.Instance.ShouldLogServerRelatedMessages()) {
|
226
|
+
Logger.Instance.WriteToLog("-----------------------------------------------------------------------------", true);
|
227
|
+
Logger.Instance.WriteToLog("Execution Properties:", true);
|
228
|
+
let propsString = JSON.stringify(ServerConfig.Instance);
|
229
|
+
Logger.Instance.WriteToLog(propsString, true);
|
230
|
+
Logger.Instance.WriteToLog("-----------------------------------------------------------------------------", true);
|
231
|
+
}
|
232
|
+
}
|
233
|
+
constructor() {
|
234
|
+
RuntimeContextBase.Instance.Init(RemoteCommandsProcessor.RC_NO_CONTEXT_ID);
|
235
|
+
LastFocusedManager.Instance.Init(MGDataCollection.Instance);
|
236
|
+
LastFocusedManager.Instance.LastActionTime = Misc.getSystemMilliseconds();
|
237
|
+
RemoteCommandsProcessor.ShouldScrambleAndUnscrambleMessages = true;
|
238
|
+
this._globalUniqueSessionId = UniqueIDUtils.GetUniqueMachineID() + "_";
|
239
|
+
this.RegisterDelegates();
|
240
|
+
}
|
241
|
+
InitGuiManager() {
|
242
|
+
Manager.EventsManager = EventsManager.Instance;
|
243
|
+
Manager.DefaultServerName = ServerConfig.Instance.getServer();
|
244
|
+
Manager.DefaultProtocol = ServerConfig.Instance.getProtocol();
|
245
|
+
GuiEnvironment.Environment = Environment.Instance;
|
246
|
+
GuiDataCollection.MGDataTable = MGDataCollection.Instance;
|
247
|
+
RuntimeContextBase.noContextId = RemoteCommandsProcessor.RC_NO_CONTEXT_ID;
|
248
|
+
}
|
249
|
+
InitCircularReferencesBypasses() {
|
250
|
+
TasksTable.createNewtask = Task.CreateTask;
|
251
|
+
OpenURLCommand.createNewCommandsTable = CommandsTable.createCommandsTable;
|
252
|
+
AccessHelper.eventsManager = EventsManager.Instance;
|
253
|
+
AccessHelper.mgDataTable = MGDataCollection.Instance;
|
254
|
+
AccessHelper.envParamsTable = EnvParamsTable.Instance;
|
255
|
+
AccessHelper.globalParams = GlobalParams.Instance;
|
256
|
+
AccessHelper.languageData = LanguageData.Instance;
|
257
|
+
AccessHelper.environment = Environment.Instance;
|
258
|
+
}
|
259
|
+
static Main(httpClient) {
|
260
|
+
ClientManager.StartExecution(httpClient);
|
261
|
+
Logger.Instance.Flush();
|
262
|
+
}
|
263
|
+
static async StopExecution() {
|
264
|
+
try {
|
265
|
+
HttpManager.GetInstance().IsAbortingMagicEngine = true;
|
266
|
+
MGDataCollection.Instance.StartupMgData.getFirstTask().ClosingFormUI = true;
|
267
|
+
await MGDataCollection.Instance.StartupMgData.getFirstTask().endTask(true, false, false);
|
268
|
+
}
|
269
|
+
catch (ex3) {
|
270
|
+
if (ex3 instanceof ApplicationException) {
|
271
|
+
Logger.Instance.WriteExceptionToLog(ex3);
|
272
|
+
}
|
273
|
+
else
|
274
|
+
throw ex3;
|
275
|
+
}
|
276
|
+
}
|
277
|
+
static async StartExecution(httpClient) {
|
278
|
+
HttpManager.setNativeHttpClient(httpClient);
|
279
|
+
let loaded = await ClientManager.Instance.LoadExecutionProps();
|
280
|
+
if (loaded) {
|
281
|
+
new GuiEventsProcessor();
|
282
|
+
ClientManager.Instance.InitGuiManager();
|
283
|
+
ClientManager.Instance.InitCircularReferencesBypasses();
|
284
|
+
let versionString = CurrentClientVersion === '0.0.0.0' ? "Development mode" : "Version : " + CurrentClientVersion;
|
285
|
+
console.log("Magic Web Client. " + versionString);
|
286
|
+
HttpManager.GetInstance().HttpCommunicationTimeoutMS = ServerConfig.Instance.GetFirstHttpRequestTimeout();
|
287
|
+
EventsManager.Instance.Init();
|
288
|
+
Logger.Instance.Initialize(RemoteCommandsProcessor.GetInstance().parseLogLevel(ServerConfig.Instance.getInternalLogLevel()), false);
|
289
|
+
let mgd = new MGData(new CommandsTable(), new CommandsTable(), 0, null, false);
|
290
|
+
await MGDataCollection.Instance.addMGData(mgd, 0, true);
|
291
|
+
await ClientManager.Instance.WorkThreadExecution();
|
292
|
+
if (Logger.Instance.ShouldLog()) {
|
293
|
+
Logger.Instance.WriteToLog(OSEnvironment.EolSeq + "Ended on " + DateTimeUtils.ToString(DateTime.Now, XMLConstants.ERROR_LOG_DATE_FORMAT, Logger.Instance) + OSEnvironment.EolSeq + OSEnvironment.EolSeq, false);
|
294
|
+
}
|
295
|
+
}
|
296
|
+
else {
|
297
|
+
await GUIManager.Instance.MessageBox("Error", "Failed to load server configuration file (" + this._executionPropertiesFileName + ")", Styles.MSGBOX_ICON_ERROR | Styles.MSGBOX_BUTTON_OK);
|
298
|
+
}
|
299
|
+
}
|
300
|
+
async LoadExecutionProps() {
|
301
|
+
let response = "";
|
302
|
+
let succeeded = true;
|
303
|
+
try {
|
304
|
+
let isError = new RefParam(false);
|
305
|
+
response = await HttpManager.GetInstance().GetContent(ClientManager._executionPropertiesFileName, null, false, isError);
|
306
|
+
ServerConfig.Instance.Init(JSON.parse(response));
|
307
|
+
}
|
308
|
+
catch (ex) {
|
309
|
+
succeeded = false;
|
310
|
+
}
|
311
|
+
return succeeded;
|
312
|
+
}
|
313
|
+
GetGlobalUniqueSessionID() {
|
314
|
+
return this._globalUniqueSessionId;
|
315
|
+
}
|
316
|
+
static GetControlPictureMask(taskId, controlName) {
|
317
|
+
let pic = null;
|
318
|
+
let task = MGDataCollection.Instance.GetTaskByID(taskId);
|
319
|
+
let control = null;
|
320
|
+
if (controlName !== null && task != null) {
|
321
|
+
control = task.getForm().GetCtrl(controlName);
|
322
|
+
pic = control.getPIC();
|
323
|
+
}
|
324
|
+
return pic;
|
325
|
+
}
|
326
|
+
static GetFormattedValue(taskId, controlName, value, rowId) {
|
327
|
+
let pic = null;
|
328
|
+
let task = MGDataCollection.Instance.GetTaskByID(taskId);
|
329
|
+
let control = null;
|
330
|
+
let newValue = value;
|
331
|
+
if (controlName !== null && task !== null)
|
332
|
+
control = task.getForm().GetCtrl(controlName);
|
333
|
+
if (control != null && control.DataType == StorageAttribute.NUMERIC) {
|
334
|
+
if (control.isRepeatable() && control.getProp(PropInterface.PROP_TYPE_FORMAT).isExpression()) {
|
335
|
+
let picval = control.getProp(PropInterface.PROP_TYPE_FORMAT).getPrevValue(+rowId);
|
336
|
+
pic = new PIC(picval, StorageAttribute.NUMERIC, control.getForm().getTask().getCompIdx());
|
337
|
+
}
|
338
|
+
else
|
339
|
+
pic = control.getPIC();
|
340
|
+
let dispValue = String(value);
|
341
|
+
let newPic = pic.getUnformattedNumericPic();
|
342
|
+
let num = DisplayConvertor.Instance.toNum(dispValue, newPic, 0);
|
343
|
+
newValue = DisplayConvertor.Instance.fromNum(num, pic);
|
344
|
+
}
|
345
|
+
return newValue;
|
346
|
+
}
|
347
|
+
static GetRangedValue(taskId, controlName, value) {
|
348
|
+
let task = MGDataCollection.Instance.GetTaskByID(taskId);
|
349
|
+
let control = null;
|
350
|
+
if (controlName !== null) {
|
351
|
+
control = task.getForm().GetCtrl(controlName);
|
352
|
+
return control.getRangedValue(value);
|
353
|
+
}
|
354
|
+
return null;
|
355
|
+
}
|
356
|
+
static ValidateControlValue(taskId, controlName, value) {
|
357
|
+
let task = MGDataCollection.Instance.GetTaskByID(taskId);
|
358
|
+
let control = null;
|
359
|
+
if (controlName !== null) {
|
360
|
+
control = task.getForm().GetCtrl(controlName);
|
361
|
+
return control.validate(value);
|
362
|
+
}
|
363
|
+
return null;
|
364
|
+
}
|
365
|
+
static GetFldRanges(taskId, controlName) {
|
366
|
+
let task = MGDataCollection.Instance.GetTaskByID(taskId);
|
367
|
+
let control = null;
|
368
|
+
if (controlName !== null) {
|
369
|
+
control = task.getForm().GetCtrl(controlName);
|
370
|
+
return control.getRanges();
|
371
|
+
}
|
372
|
+
return null;
|
373
|
+
}
|
374
|
+
static TransCacheExists() {
|
375
|
+
let clientTransCacheExists = AccessHelper.mgDataTable.getCurrMGData().clientTransactionCacheExists();
|
376
|
+
let serverTransactionCacheExists = AccessHelper.mgDataTable.getCurrMGData().serverTransactionCacheExists();
|
377
|
+
return clientTransCacheExists || serverTransactionCacheExists;
|
378
|
+
}
|
379
|
+
RegisterDelegates() {
|
380
|
+
HttpClientEvents.GetExecutionProperty_Event = ServerConfig.Instance.GetExecutionProperty.bind(ServerConfig.Instance);
|
381
|
+
HttpClientEvents.GetRuntimeCtxID_Event = this.GetRuntimeCtxID.bind(this);
|
382
|
+
HttpClientEvents.GetGlobalUniqueSessionID_Event = this.GetGlobalUniqueSessionID.bind(this);
|
383
|
+
HttpClientEvents.ShouldDisplayGenericError_Event = ServerConfig.Instance.ShouldDisplayGenericError.bind(ServerConfig.Instance);
|
384
|
+
}
|
385
|
+
GetRuntimeCtxID() {
|
386
|
+
return RuntimeContextBase.Instance.ContextID;
|
387
|
+
}
|
388
|
+
static TerminateContextUsingFetchAPI() {
|
389
|
+
if (RemoteCommandsProcessor.IsSessionReInitializing)
|
390
|
+
return;
|
391
|
+
HttpManager.GetInstance().IsAbortingMagicEngine = true;
|
392
|
+
MGDataCollection.Instance.getCurrMGData().CmdsToServer.Clear();
|
393
|
+
let contextTerminationEventCommand = CommandFactory.
|
394
|
+
CreateContextTerminationEventCommand(MGDataCollection.Instance.StartupMgData.getFirstTask().getTaskTag());
|
395
|
+
MGDataCollection.Instance.getCurrMGData().CmdsToServer.Add(contextTerminationEventCommand);
|
396
|
+
RemoteCommandsProcessor.GetInstance().Execute(CommandsProcessorBase_SendingInstruction.ONLY_COMMANDS);
|
397
|
+
}
|
398
|
+
}
|
399
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiQ2xpZW50TWFuYWdlci5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uL3Byb2plY3RzL2VuZ2luZS9zcmMvQ2xpZW50TWFuYWdlci50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBQUMsb0JBQW9CLEVBQUUsUUFBUSxFQUFFLE9BQU8sRUFBRSxRQUFRLEVBQUMsTUFBTSxzQkFBc0IsQ0FBQztBQUV2RixPQUFPLEVBQ0wsYUFBYSxFQUNiLGlCQUFpQixFQUNqQixNQUFNLEVBQ04sSUFBSSxFQUNKLGFBQWEsRUFDYixnQkFBZ0IsRUFDaEIsWUFBWSxFQUNiLE1BQU0sa0JBQWtCLENBQUM7QUFDMUIsT0FBTyxFQUNMLFFBQVEsRUFDUixXQUFXLEVBQ1gsZ0JBQWdCLEVBQ2hCLE1BQU0sRUFDTixpQkFBaUIsRUFDakIsY0FBYyxFQUVkLE9BQU8sRUFFUCxHQUFHLEVBQUUsYUFBYSxFQUNsQixrQkFBa0IsRUFDbEIsTUFBTSxFQUNQLE1BQU0sZ0JBQWdCLENBQUM7QUFDeEIsT0FBTyxFQUFDLGFBQWEsRUFBQyxNQUFNLHVCQUF1QixDQUFDO0FBQ3BELE9BQU8sRUFBQ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7XHJcbiAgICAgICAgICAgICAgRXZlbnRzLkdldFJ1bnRpbWVDb250ZXh0KE1hbmFnZXIuR2V0Q3VycmVudENvbnRleHRJRCgpKS5MYXN0Q2xpY2tlZEN0cmxOYW1lID0gY29udHJvbC5nZXROYW1lKCk7XHJcbiAgICAgICAgICAgICAgdGhpcy5fYnV0dG9uSXNDbGlja2VkID0gZmFsc2U7XHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgLy8gc29ydGluZyBzaG91bGQgYmUgaGFuZGxlZCBvbmx5IG9uIGNvbHVtbiBjbGljayBhbmQgbm90IG9uIHJvd0RhdGFcclxuICAgICAgICAgICAgLy8gZWxzZSBpZiAoY29udHJvbC5UeXBlID09PSBNZ0NvbnRyb2xUeXBlLkNUUkxfVFlQRV9DT0xVTU4pIHtcclxuICAgICAgICAgICAgLy8gICBFdmVudHMuT25Db2x1bW5DbGljayhjb250cm9sLCBndWlFdmVudC5MaW5lLCBndWlFdmVudC5Db250cm9sTmFtZSk7XHJcbiAgICAgICAgICAgIC8vIH1cclxuICAgICAgICAgICAgZWxzZSB7XHJcbiAgICAgICAgICAgICAgRXZlbnRzLk9uRm9jdXMoY29udHJvbCwgbGluZUlkeCwgdHJ1ZSwgZmFsc2UpO1xyXG4gICAgICAgICAgICAgIGxldCBwcm9kdWNlQ2xpY2s6IGJvb2xlYW4gPSBjb250cm9sLmlzQnV0dG9uKCkgfHwgY29udHJvbC5pc1RleHRDb250cm9sKCkgfHwgY29udHJvbC5pc0xhYmVsKCkgfHwgY29udHJvbC5pc1RhYkNvbnRyb2woKSB8fCBjb250cm9sLmlzVGFibGVDb250cm9sKCkgfHwgY29udHJvbC5pc0NvbWJvQm94KCkgfHwgY29udHJvbC5pc0ltYWdlQ29udHJvbCgpO1xyXG4gICAgICAgICAgICAgIEV2ZW50cy5Pbk1vdXNlRG93bihjb250cm9sLmdldEZvcm0oKSwgY29udHJvbCwgbnVsbCwgdHJ1ZSwgbGluZUlkeCwgZmFsc2UsI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B9XHJcbiAgICAgICAgICAgIC8vXHJcbiAgICAgICAgICAgIC8vIHRoaXMuX2xhc3RGYWlsZWRGb2N1c2VkQ29udHJvbCA9IG51bGw7XHJcblxyXG4gICAgICAgICAgICBFdmVudHMuT25Gb2N1cyhjb250cm9sLCBsaW5lSWR4LCB0cnVlLCBmYWxzZSk7XHJcblxyXG4gICAgICAgICAgICBicmVhaztcclxuICAgICAgICAgIGNhc2UgXCJkYmxjbGlja1wiOlxyXG4gICAgICAgICAgICBFdmVudHMuT25EYmxDbGljayhjb250cm9sLCBsaW5lSWR4KTtcclxuICAgICAgICAgICAgYnJlYWs7XHJcblxyXG4gICAgICAgICAgY2FzZSBcInNlbGVjdGlvbmNoYW5nZWRcIjpcclxuICAgICAgICAgICAgRXZlbnRzLk9uU2VsZWN0aW9uKGd1aUV2ZW50LlZhbHVlLCBjb250cm9sLCBsaW5lSWR4LCB0cnVlKTtcclxuICAgICAgICAgICAgYnJlYWs7XHJcbiAgICAgICAgICBjYXNlIFwia2V5ZG93blwiOlxyXG4gICAgICAgICAgICBFdmVudHMuT25LZXlEb3duKCB0YXNrLmdldEZvcm0oKSwgY29udHJvbCwgZ3VpRXZlbnQubW9kaWZpZXJzLCBndWlFdmVudC5rZXlDb2RlLCAwLDAsICcnLGZhbHNlLCcnLHRydWUgKTtcclxuICAgICAgICAgICAgYnJlYWs7XHJcbiAgICAgICAgICBjYXNlIFwic2V0ZXh0ZXJuYWx2YWx1ZVwiOlxyXG4gICAgICAgICAgICBFdmVudHNNYW5hZ2VyLkluc3RhbmNlLkFkZEV4dGVybmFsVmFsdWVFdmVudCgoPE1nQ29udHJvbD5jb250cm9sKSwgZ3VpRXZlbnQuZXh0ZXJuYWxWYWx1ZSwgZ3VpRXZlbnQucGFyYW0pO1xyXG4gICAgICAgICAgICBicmVhaztcclxuICAgICAgICAgIGRlZmF1bHQ6XHJcbiAgICAgICAgICAgIC8vIGNvbnNvbGUubG9nKFwidW5oYW5kbGVkIGV2ZW50OiBcXFwiXCIgKyBndWlFdmVudC5FdmVudFR5cGUgKyBcIlxcXCJcIik7XHJcbiAgICAgICAgICAgIGJyZWFrO1xyXG4gICAgICAgIH1cclxuICAgICAgfVxyXG4gICAgICBlbHNlIHtcclxuICAgICAgICBzd2l0Y2ggKGd1aUV2ZW50LkV2ZW50VHlwZSkge1xyXG4gICAgICAgICAgY2FzZSBcImZvY3VzT25Ob25NYWdpY0NvbnRyb2xcIjpcclxuICAgICAgICAgICAgY29udHJvbCA9IExhc3RGb2N1c2VkTWFuYWdlci5nZXRMYXN0Rm9jdXNlZENvbnRyb2woKTtcclxuICAgICAgICAgICAgaWYgKGNvbnRyb2wgIT09IG51bGwpIHtcclxuICAgICAgICAgICAgICBFdmVudHMuT25Gb2N1c09uTm9uTWFnaWNDb250cm9sKGNvbnRyb2wpO1xyXG4gICAgICAgICAgICB9XHJcbiAgICAgICAgICAgIGJyZWFrO1xyXG4gICAgICAgICAgY2FzZSBcImNsaWNrXCI6XHJcbiAgICAgICAgICAgIGlmKGd1aUV2ZW50LkNvbnRyb2xOYW1lID09PSBcIm1hZ2ljUm93XCIpIHtcclxuICAgICAgICAgICAgICBkdlJvd0lkeCA9IGd1aUV2ZW50LkxpbmUgLSAoPERhdGFWaWV3PnRhc2suRGF0YVZpZXcpLlJlY29yZHNCZWZvcmVDdXJyZW50VmlldztcclxuICAgICAgICAgICAgICBFdmVudHNNYW5hZ2VyLkluc3RhbmNlLmFkZEd1aVRyaWdnZXJlZEV2ZW50V2l0aFRhc2tBbmRDb2RlQW5kTGluZSh0YXNrLCBJbnRlcm5hbEludGVyZmFjZS5NR19BQ1RfUkVDX1BSRUZJWCwgZHZSb3dJZHgpO1xyXG4gICAgICAgICAgICB9XHJcbiAgICAgICAgICAgIGJyZWFrO1xyXG4gICAgICAgICAgY2FzZSBcIm5hdmlnYXRlSW5UYWJsZVwiOlxyXG4gICAgICAgICAgICBpZiAoZ3VpRXZlbnQuQ29udHJvbE5hbWUgPT09IFwibWFnaWNS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iAgICBDcmVhdGVDb250ZXh0VGVybWluYXRpb25FdmVudENvbW1hbmQoTUdEYXRhQ29sbGVjdGlvbi5JbnN0YW5jZS5TdGFydHVwTWdEYXRhLmdldEZpcnN0VGFzaygpLmdldFRhc2tUYWcoKSk7XHJcblxyXG4gICAgTUdEYXRhQ29sbGVjdGlvbi5JbnN0YW5jZS5nZXRDdXJyTUdEYXRhKCkuQ21kc1RvU2VydmVyLkFkZCg8SUNsaWVudENvbW1hbmQ+Y29udGV4dFRlcm1pbmF0aW9uRXZlbnRDb21tYW5kKTtcclxuXHJcbiAgICAvLyByZXNwb25zZSBuZWVkIG5vdCB0byBiZSBoYW5kbGVkIGFzIHRoZSBicm93c2VyIHVubG9hZCBjYW5ub3QgYmUgc3RvcHBlZCwgc28gbm8gbmVlZCB0byB3YWl0XHJcbiAgICBSZW1vdGVDb21tYW5kc1Byb2Nlc3Nvci5HZXRJbnN0YW5jZSgpLkV4ZWN1dGUoQ29tbWFuZHNQcm9jZXNzb3JCYXNlX1NlbmRpbmdJbnN0cnVjdGlvbi5PTkxZX0NPTU1BTkRTKTtcclxuICB9XHJcbn1cclxuIl19
|
@@ -0,0 +1,56 @@
|
|
1
|
+
import { XMLConstants } from '@magic-xpa/utils';
|
2
|
+
import { Scrambler } from './util/Scrambler';
|
3
|
+
import { isNullOrUndefined } from '@magic-xpa/mscorelib';
|
4
|
+
export var CommandsProcessorBase_SessionStage;
|
5
|
+
(function (CommandsProcessorBase_SessionStage) {
|
6
|
+
CommandsProcessorBase_SessionStage[CommandsProcessorBase_SessionStage["HANDSHAKE"] = 1] = "HANDSHAKE";
|
7
|
+
CommandsProcessorBase_SessionStage[CommandsProcessorBase_SessionStage["INITIAL"] = 2] = "INITIAL";
|
8
|
+
CommandsProcessorBase_SessionStage[CommandsProcessorBase_SessionStage["NORMAL"] = 3] = "NORMAL";
|
9
|
+
})(CommandsProcessorBase_SessionStage || (CommandsProcessorBase_SessionStage = {}));
|
10
|
+
export var CommandsProcessorBase_SendingInstruction;
|
11
|
+
(function (CommandsProcessorBase_SendingInstruction) {
|
12
|
+
CommandsProcessorBase_SendingInstruction[CommandsProcessorBase_SendingInstruction["NO_TASKS_OR_COMMANDS"] = 0] = "NO_TASKS_OR_COMMANDS";
|
13
|
+
CommandsProcessorBase_SendingInstruction[CommandsProcessorBase_SendingInstruction["ONLY_COMMANDS"] = 1] = "ONLY_COMMANDS";
|
14
|
+
CommandsProcessorBase_SendingInstruction[CommandsProcessorBase_SendingInstruction["TASKS_AND_COMMANDS"] = 2] = "TASKS_AND_COMMANDS";
|
15
|
+
})(CommandsProcessorBase_SendingInstruction || (CommandsProcessorBase_SendingInstruction = {}));
|
16
|
+
export class CommandsProcessorBase {
|
17
|
+
_sessionCounter = 0;
|
18
|
+
GetSessionCounter() {
|
19
|
+
return this._sessionCounter;
|
20
|
+
}
|
21
|
+
async StartSession() {
|
22
|
+
return Promise.resolve(true);
|
23
|
+
}
|
24
|
+
async Execute(sendingInstruction, sessionStage, res) {
|
25
|
+
if (isNullOrUndefined(sessionStage)) {
|
26
|
+
await this.Execute_0(sendingInstruction);
|
27
|
+
return;
|
28
|
+
}
|
29
|
+
await this.Execute_1(sendingInstruction, sessionStage, res);
|
30
|
+
}
|
31
|
+
async Execute_0(sendingInstruction) {
|
32
|
+
await this.Execute_1(sendingInstruction, CommandsProcessorBase_SessionStage.NORMAL, null);
|
33
|
+
}
|
34
|
+
async Execute_1(sendingInstruction, sessionStage, res) {
|
35
|
+
return Promise.resolve();
|
36
|
+
}
|
37
|
+
async GetContent(requestedURL, useCache) {
|
38
|
+
return Promise.resolve('');
|
39
|
+
}
|
40
|
+
static UnScramble(respBuf) {
|
41
|
+
let openTagLocation = respBuf.indexOf(XMLConstants.MG_TAG_OPEN);
|
42
|
+
let core;
|
43
|
+
if (openTagLocation !== -1) {
|
44
|
+
let start = openTagLocation + XMLConstants.MG_TAG_OPEN.length;
|
45
|
+
let openTag = respBuf.substr(0, start);
|
46
|
+
let finish = respBuf.lastIndexOf(XMLConstants.TAG_OPEN);
|
47
|
+
let closeTag = respBuf.substr(finish);
|
48
|
+
core = openTag + Scrambler.UnScramble(respBuf, start, finish - 1) + closeTag;
|
49
|
+
}
|
50
|
+
else {
|
51
|
+
core = Scrambler.UnScramble(respBuf, 0, respBuf.length - 1);
|
52
|
+
}
|
53
|
+
return core;
|
54
|
+
}
|
55
|
+
}
|
56
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiQ29tbWFuZHNQcm9jZXNzb3JCYXNlLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vcHJvamVjdHMvZW5naW5lL3NyYy9Db21tYW5kc1Byb2Nlc3NvckJhc2UudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUFFLFlBQVksRUFBRSxNQUFNLGtCQUFrQixDQUFDO0FBRWhELE9BQU8sRUFBRSxTQUFTLEVBQUUsTUFBTSxrQkFBa0IsQ0FBQztBQUM3QyxPQUFPLEVBQUUsaUJBQWlCLEVBQUUsTUFBTSxzQkFBc0IsQ0FBQztBQUd6RCxNQUFNLENBQU4sSUFBWSxrQ0FLWDtBQUxELFdBQVksa0NBQWtDO0lBRTVDLHFHQUFhLENBQUE7SUFDYixpR0FBTyxDQUFBO0lBQ1AsK0ZBQU0sQ0FBQTtBQUNSLENBQUMsRUFMVyxrQ0FBa0MsS0FBbEMsa0NBQWtDLFFBSzdDO0FBR0QsTUFBTSxDQUFOLElBQVksd0NBSVg7QUFKRCxXQUFZLHdDQUF3QztJQUNsRCx1SUFBb0IsQ0FBQTtJQUNwQix5SEFBYSxDQUFBO0lBQ2IsbUlBQWtCLENBQUE7QUFDcEIsQ0FBQyxFQUpXLHdDQUF3QyxLQUF4Qyx3Q0FBd0MsUUFJbkQ7QUFHRCxNQUFNLE9BQWdCLHFCQUFxQjtJQUN6QyxlQUFlLEdBQVcsQ0FBQyxDQ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tMSkge1xyXG4gICAgICBsZXQgc3RhcnQ6IG51bWJlciA9IG9wZW5UYWdMb2NhdGlvbiArIFhNTENvbnN0YW50cy5NR19UQUdfT1BFTi5sZW5ndGg7XHJcbiAgICAgIGxldCBvcGVuVGFnOiBzdHJpbmcgPSByZXNwQnVmLnN1YnN0cigwLCBzdGFydCk7XHJcblxyXG4gICAgICBsZXQgZmluaXNoOiBudW1iZXIgPSByZXNwQnVmLmxhc3RJbmRleE9mKFhNTENvbnN0YW50cy5UQUdfT1BFTik7XHJcbiAgICAgIGxldCBjbG9zZVRhZzogc3RyaW5nID0gcmVzcEJ1Zi5zdWJzdHIoZmluaXNoKTtcclxuXHJcbiAgICAgIGNvcmUgPSBvcGVuVGFnICsgU2NyYW1ibGVyLlVuU2NyYW1ibGUocmVzcEJ1Ziwgc3RhcnQsIGZpbmlzaCAtIDEpICsgY2xvc2VUYWc7XHJcbiAgICB9XHJcbiAgICBlbHNlIHtcclxuICAgICAgLy8gV2UgZ290IGEgc2NyYW1ibGVkIGVycm9yIG1lc3NhZ2UsIHRoZXJlIGlzIG5vIG9wZW4gdGFnXHJcbiAgICAgIGNvcmUgPSBTY3JhbWJsZXIuVW5TY3JhbWJsZShyZXNwQnVmLCAwLCByZXNwQnVmLmxlbmd0aCAtIDEpO1xyXG4gICAgfVxyXG4gICAgcmV0dXJuIGNvcmU7XHJcbiAgfVxyXG59XHJcbiJdfQ==
|
@@ -0,0 +1,26 @@
|
|
1
|
+
import { Logger, StrUtil } from "@magic-xpa/utils";
|
2
|
+
import { RemoteCommandsProcessor } from "./remote/RemoteCommandsProcessor";
|
3
|
+
import { HttpManager } from "./http/HttpManager";
|
4
|
+
import { InteractiveCommunicationsFailureHandler } from "./communications/InteractiveCommunicationsFailureHandler";
|
5
|
+
export class CommandsProcessorManager {
|
6
|
+
static GetCommandsProcessor() {
|
7
|
+
return RemoteCommandsProcessor.GetInstance();
|
8
|
+
}
|
9
|
+
static async GetContent(requestedURL, useCache) {
|
10
|
+
let ret = await (CommandsProcessorManager.GetCommandsProcessor().GetContent(requestedURL, useCache));
|
11
|
+
return ret;
|
12
|
+
}
|
13
|
+
static async StartSession() {
|
14
|
+
let succeeded = false;
|
15
|
+
try {
|
16
|
+
HttpManager.GetInstance().SetCommunicationsFailureHandler(new InteractiveCommunicationsFailureHandler());
|
17
|
+
succeeded = await RemoteCommandsProcessor.GetInstance().StartSession();
|
18
|
+
}
|
19
|
+
catch (ex) {
|
20
|
+
Logger.Instance.WriteServerToLog("Failed connecting to the server: " + StrUtil.getConsoleErorString(ex.Message));
|
21
|
+
throw ex;
|
22
|
+
}
|
23
|
+
return succeeded;
|
24
|
+
}
|
25
|
+
}
|
26
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiQ29tbWFuZHNQcm9jZXNzb3JNYW5hZ2VyLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vcHJvamVjdHMvZW5naW5lL3NyYy9Db21tYW5kc1Byb2Nlc3Nvck1hbmFnZXIudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUFFLE1BQU0sRUFBRSxPQUFPLEVBQUUsTUFBTSxrQkFBa0IsQ0FBQztBQUVuRCxPQUFPLEVBQUMsdUJBQXVCLEVBQUMsTUFBTSxrQ0FBa0MsQ0FBQztBQUN6RSxPQUFPLEVBQUMsV0FBVyxFQUFDLE1BQU0sb0JBQW9CLENBQUM7QUFDL0MsT0FBTyxFQUFDLHVDQUF1QyxFQUFDLE1BQU0sMERBQTBELENBQUM7QUFHakgsTUFBTSxPQUFPLHdCQUF3QjtJQUtuQyxNQUFNLENBQUMsb0JBQW9CO1FBQ3pCLE9BQU8sdUJBQXVCLENBQUMsV0FBVyxFQUFFLENBQUM7SUFDL0MsQ0FBQztJQU9ELE1BQU0sQ0FBQyxLQUFLLENBQUMsVUFBVSxDQUFDLFlBQW9CLEVBQUUsUU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