@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.
- 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 +416 -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 +517 -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 +156 -0
- package/{esm2020 → esm2022}/src/ICommandsTable.mjs +1 -1
- package/esm2022/src/ServerConfig.mjs +122 -0
- package/{esm2020 → esm2022}/src/bridge/IGuiEvent.mjs +19 -19
- package/esm2022/src/bridge/MagicBridge.mjs +41 -0
- 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 +227 -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 +2988 -0
- package/{esm2020 → esm2022}/src/event/IEventsManager.mjs +6 -6
- package/esm2022/src/event/RunTimeEvent.mjs +399 -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 +1224 -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 +880 -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 +2499 -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 +29797 -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 +35 -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 +516 -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 +35 -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 +205 -204
- package/src/event/IEventsManager.d.ts +77 -77
- package/src/event/RunTimeEvent.d.ts +126 -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 +96 -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/bridge/MagicBridge.mjs +0 -41
- 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,416 @@
|
|
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, ExpVal } 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, MirrorExpVal } 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 handlingFirstParkableControl = false;
|
34
|
+
static _executionPropertiesFileName = null;
|
35
|
+
static assetsURL = "./assets";
|
36
|
+
static get Instance() {
|
37
|
+
if (ClientManager._instance === null)
|
38
|
+
ClientManager._instance = new ClientManager();
|
39
|
+
return ClientManager._instance;
|
40
|
+
}
|
41
|
+
AddEvent(guiEvent) {
|
42
|
+
let task = MGDataCollection.Instance.GetTaskByID(guiEvent.TaskID);
|
43
|
+
let lineIdx = +guiEvent.Line;
|
44
|
+
let dvRowIdx = 0;
|
45
|
+
if (task != null) {
|
46
|
+
let control = null;
|
47
|
+
if (guiEvent.ControlName !== null)
|
48
|
+
control = task.getForm().GetCtrl(guiEvent.ControlName);
|
49
|
+
if (control != null) {
|
50
|
+
let dv = task.DataView;
|
51
|
+
if (control.IsTableChild) {
|
52
|
+
lineIdx -= dv.RecordsBeforeCurrentView;
|
53
|
+
}
|
54
|
+
switch (guiEvent.EventType) {
|
55
|
+
case "columnSort":
|
56
|
+
if (control.isColumnSortable()) {
|
57
|
+
Events.OnColumnClick(control, guiEvent.Line, guiEvent.ControlName);
|
58
|
+
}
|
59
|
+
break;
|
60
|
+
case "mousedown":
|
61
|
+
if (control.isButton() || control.isCheckBox() || (control.ConnectedControl && guiEvent.fromButton)) {
|
62
|
+
this._buttonIsClicked = true;
|
63
|
+
}
|
64
|
+
else if (!control.isSubform())
|
65
|
+
Events.GetRuntimeContext(Manager.GetCurrentContextID()).LastClickedCtrlName = control.getName();
|
66
|
+
break;
|
67
|
+
case "click":
|
68
|
+
if (control.isButton() || (control.ConnectedControl && guiEvent.fromButton)) {
|
69
|
+
Events.OnSelection("", control, lineIdx, true);
|
70
|
+
Events.GetRuntimeContext(Manager.GetCurrentContextID()).LastClickedCtrlName = control.getName();
|
71
|
+
this._buttonIsClicked = false;
|
72
|
+
}
|
73
|
+
else {
|
74
|
+
Events.OnFocus(control, lineIdx, true, false);
|
75
|
+
let produceClick = control.isButton() || control.isTextControl() || control.isLabel() || control.isTabControl() || control.isTableControl() || control.isComboBox() || control.isImageControl();
|
76
|
+
Events.OnMouseDown(control.getForm(), control, null, true, lineIdx, false, produceClick);
|
77
|
+
}
|
78
|
+
break;
|
79
|
+
case "focus":
|
80
|
+
if (this._buttonIsClicked || (control.ConnectedControl && guiEvent.fromButton))
|
81
|
+
return;
|
82
|
+
if (!ClientManager.handlingFirstParkableControl)
|
83
|
+
Events.OnFocus(control, lineIdx, true, false);
|
84
|
+
break;
|
85
|
+
case "dblclick":
|
86
|
+
Events.OnDblClick(control, lineIdx);
|
87
|
+
break;
|
88
|
+
case "selectionchanged":
|
89
|
+
Events.OnSelection(guiEvent.Value, control, lineIdx, true);
|
90
|
+
break;
|
91
|
+
case "keydown":
|
92
|
+
Events.OnKeyDown(task.getForm(), control, guiEvent.modifiers, guiEvent.keyCode, 0, 0, '', false, '', true);
|
93
|
+
break;
|
94
|
+
case "setexternalvalue":
|
95
|
+
EventsManager.Instance.AddExternalValueEvent(control, guiEvent.externalValue, guiEvent.param);
|
96
|
+
break;
|
97
|
+
default:
|
98
|
+
break;
|
99
|
+
}
|
100
|
+
}
|
101
|
+
else {
|
102
|
+
switch (guiEvent.EventType) {
|
103
|
+
case "focusOnNonMagicControl":
|
104
|
+
control = LastFocusedManager.getLastFocusedControl();
|
105
|
+
if (control !== null) {
|
106
|
+
Events.OnFocusOnNonMagicControl(control);
|
107
|
+
}
|
108
|
+
break;
|
109
|
+
case "click":
|
110
|
+
if (guiEvent.ControlName === "magicRow") {
|
111
|
+
dvRowIdx = guiEvent.Line - task.DataView.RecordsBeforeCurrentView;
|
112
|
+
EventsManager.Instance.addGuiTriggeredEventWithTaskAndCodeAndLine(task, InternalInterface.MG_ACT_REC_PREFIX, dvRowIdx);
|
113
|
+
}
|
114
|
+
break;
|
115
|
+
case "navigateInTable":
|
116
|
+
if (guiEvent.ControlName === "magicRow")
|
117
|
+
this.handleNavigateInRowEvent(task, guiEvent.Value);
|
118
|
+
break;
|
119
|
+
case "close":
|
120
|
+
if (task.IsRoute())
|
121
|
+
EventsManager.Instance.AddRouterClosedEvent(task);
|
122
|
+
else
|
123
|
+
Events.CloseFormEvent(task.getForm());
|
124
|
+
break;
|
125
|
+
case "dispose":
|
126
|
+
MGDataCollection.Instance.deleteMGDataTree(task.getMgdID());
|
127
|
+
break;
|
128
|
+
case "resize":
|
129
|
+
Events.TableResizeEvent(task.getForm().getTableCtrl(), guiEvent.PageSize);
|
130
|
+
case "getRows":
|
131
|
+
dvRowIdx = lineIdx - task.DataView.RecordsBeforeCurrentView;
|
132
|
+
let lastFocusedVal = { guiMgControl: task.getForm().getTableCtrl(), Line: dvRowIdx, Val: "" };
|
133
|
+
Events.OnGetRowsData(task.getForm().getTableCtrl(), dvRowIdx, true, lastFocusedVal);
|
134
|
+
break;
|
135
|
+
case "RouterNavigate":
|
136
|
+
EventsManager.Instance.AddRouteEvent(task, InternalInterface.MG_ACT_WEBCLIENT_ROUTE, guiEvent.RouterPath, guiEvent.RouterOutletName, guiEvent.RouterParams);
|
137
|
+
break;
|
138
|
+
case "setexternalvalue":
|
139
|
+
Logger.Instance.WriteErrorToLog(NString.Format("Unable to find {0}: Trying to set value for a non-existing control.", guiEvent.ControlName));
|
140
|
+
break;
|
141
|
+
default:
|
142
|
+
break;
|
143
|
+
}
|
144
|
+
}
|
145
|
+
}
|
146
|
+
else
|
147
|
+
switch (guiEvent.EventType) {
|
148
|
+
case "confirmationClosed":
|
149
|
+
this.ConfirmationClosed(guiEvent.keyCode);
|
150
|
+
break;
|
151
|
+
}
|
152
|
+
}
|
153
|
+
handleNavigateInRowEvent(task, evt) {
|
154
|
+
let internalEvt = InternalInterface.MG_ACT_NONE;
|
155
|
+
evt = evt.toLowerCase();
|
156
|
+
switch (evt) {
|
157
|
+
case "begin-page":
|
158
|
+
internalEvt = InternalInterface.MG_ACT_TBL_BEGPAGE;
|
159
|
+
break;
|
160
|
+
case "previous-page":
|
161
|
+
internalEvt = InternalInterface.MG_ACT_TBL_PRVPAGE;
|
162
|
+
break;
|
163
|
+
case "end-page":
|
164
|
+
internalEvt = InternalInterface.MG_ACT_TBL_ENDPAGE;
|
165
|
+
break;
|
166
|
+
case "next-page":
|
167
|
+
internalEvt = InternalInterface.MG_ACT_TBL_NXTPAGE;
|
168
|
+
break;
|
169
|
+
case "previous-line":
|
170
|
+
internalEvt = InternalInterface.MG_ACT_TBL_PRVLINE;
|
171
|
+
break;
|
172
|
+
case "next-line":
|
173
|
+
internalEvt = InternalInterface.MG_ACT_TBL_NXTLINE;
|
174
|
+
break;
|
175
|
+
case "begin-table":
|
176
|
+
internalEvt = InternalInterface.MG_ACT_TBL_BEGTBL;
|
177
|
+
break;
|
178
|
+
case "end-table":
|
179
|
+
internalEvt = InternalInterface.MG_ACT_TBL_ENDTBL;
|
180
|
+
break;
|
181
|
+
}
|
182
|
+
if (internalEvt != InternalInterface.MG_ACT_NONE)
|
183
|
+
EventsManager.Instance.addGuiTriggeredEventWithTaskAndCode(task, internalEvt);
|
184
|
+
}
|
185
|
+
ConfirmationClosed(res) {
|
186
|
+
Commands.ResolvePromise(res);
|
187
|
+
}
|
188
|
+
async WorkThreadExecution() {
|
189
|
+
if (Logger.Instance.ShouldLog()) {
|
190
|
+
Logger.Instance.WriteToLog("", true);
|
191
|
+
Logger.Instance.WriteToLog("Started on " + DateTimeUtils.ToString(DateTime.Now, XMLConstants.ERROR_LOG_DATE_FORMAT, Logger.Instance), true);
|
192
|
+
this.WriteExecutionPropertiesToLog();
|
193
|
+
}
|
194
|
+
try {
|
195
|
+
if (await CommandsProcessorManager.StartSession()) {
|
196
|
+
let mgDataTab = MGDataCollection.Instance;
|
197
|
+
let startupMgData = mgDataTab.StartupMgData;
|
198
|
+
mgDataTab.currMgdID = startupMgData.GetId();
|
199
|
+
let nonInteractiveTask = null;
|
200
|
+
if (!startupMgData.IsAborting)
|
201
|
+
nonInteractiveTask = await Task.StartProgram(false, false);
|
202
|
+
if (nonInteractiveTask === null)
|
203
|
+
await EventsManager.Instance.EventsLoop(startupMgData);
|
204
|
+
else
|
205
|
+
await EventsManager.Instance.NonInteractiveEventsLoop(startupMgData, nonInteractiveTask);
|
206
|
+
EventsManager.Instance.setEndOfWork(true);
|
207
|
+
}
|
208
|
+
}
|
209
|
+
catch (ex) {
|
210
|
+
if (ex instanceof ApplicationException) {
|
211
|
+
let isNoResultError = false;
|
212
|
+
if (ex instanceof ServerError && ex.GetCode() === ServerError.INF_NO_RESULT)
|
213
|
+
isNoResultError = true;
|
214
|
+
if (!isNoResultError)
|
215
|
+
await EventsManager.Instance.ProcessAbortingError(ex);
|
216
|
+
EventsManager.Instance.setEndOfWork(true);
|
217
|
+
}
|
218
|
+
else
|
219
|
+
throw ex;
|
220
|
+
}
|
221
|
+
finally {
|
222
|
+
await EventsManager.Instance.CheckAndShowSpinner(false);
|
223
|
+
Commands.addGlobalCommand(CommandType.EXIT_MAGIC);
|
224
|
+
Commands.beginInvoke();
|
225
|
+
}
|
226
|
+
}
|
227
|
+
WriteExecutionPropertiesToLog() {
|
228
|
+
if (Logger.Instance.ShouldLogServerRelatedMessages()) {
|
229
|
+
Logger.Instance.WriteToLog("-----------------------------------------------------------------------------", true);
|
230
|
+
Logger.Instance.WriteToLog("Execution Properties:", true);
|
231
|
+
let propsString = JSON.stringify(ServerConfig.Instance);
|
232
|
+
Logger.Instance.WriteToLog(propsString, true);
|
233
|
+
Logger.Instance.WriteToLog("-----------------------------------------------------------------------------", true);
|
234
|
+
}
|
235
|
+
}
|
236
|
+
constructor() {
|
237
|
+
ClientManager._executionPropertiesFileName = localStorage.getItem("ServerConfigURL") ?? "./assets/server-config.json";
|
238
|
+
RuntimeContextBase.Instance.Init(RemoteCommandsProcessor.RC_NO_CONTEXT_ID);
|
239
|
+
LastFocusedManager.Instance.Init(MGDataCollection.Instance);
|
240
|
+
LastFocusedManager.Instance.LastActionTime = Misc.getSystemMilliseconds();
|
241
|
+
RemoteCommandsProcessor.ShouldScrambleAndUnscrambleMessages = true;
|
242
|
+
this._globalUniqueSessionId = UniqueIDUtils.GetUniqueMachineID() + "_";
|
243
|
+
this.RegisterDelegates();
|
244
|
+
}
|
245
|
+
InitGuiManager() {
|
246
|
+
Manager.EventsManager = EventsManager.Instance;
|
247
|
+
Manager.DefaultServerName = ServerConfig.Instance.getServer();
|
248
|
+
Manager.DefaultProtocol = ServerConfig.Instance.getProtocol();
|
249
|
+
GuiEnvironment.Environment = Environment.Instance;
|
250
|
+
GuiDataCollection.MGDataTable = MGDataCollection.Instance;
|
251
|
+
RuntimeContextBase.noContextId = RemoteCommandsProcessor.RC_NO_CONTEXT_ID;
|
252
|
+
}
|
253
|
+
InitCircularReferencesBypasses() {
|
254
|
+
TasksTable.createNewtask = Task.CreateTask;
|
255
|
+
OpenURLCommand.createNewCommandsTable = CommandsTable.createCommandsTable;
|
256
|
+
AccessHelper.eventsManager = EventsManager.Instance;
|
257
|
+
AccessHelper.mgDataTable = MGDataCollection.Instance;
|
258
|
+
AccessHelper.envParamsTable = EnvParamsTable.Instance;
|
259
|
+
AccessHelper.globalParams = GlobalParams.Instance;
|
260
|
+
AccessHelper.languageData = LanguageData.Instance;
|
261
|
+
AccessHelper.environment = Environment.Instance;
|
262
|
+
}
|
263
|
+
static Main(httpClient, args) {
|
264
|
+
let val;
|
265
|
+
args.forEach((value, key) => {
|
266
|
+
val = new ExpVal(StorageAttribute.UNICODE, false, value);
|
267
|
+
GlobalParams.Instance.setValue(key, new MirrorExpVal(val), true);
|
268
|
+
});
|
269
|
+
ClientManager.StartExecution(httpClient);
|
270
|
+
Logger.Instance.Flush();
|
271
|
+
}
|
272
|
+
static async StopExecution() {
|
273
|
+
try {
|
274
|
+
HttpManager.GetInstance().IsAbortingMagicEngine = true;
|
275
|
+
MGDataCollection.Instance.StartupMgData.getFirstTask().ClosingFormUI = true;
|
276
|
+
await MGDataCollection.Instance.StartupMgData.getFirstTask().endTask(true, false, false);
|
277
|
+
}
|
278
|
+
catch (ex3) {
|
279
|
+
if (ex3 instanceof ApplicationException) {
|
280
|
+
Logger.Instance.WriteExceptionToLog(ex3);
|
281
|
+
}
|
282
|
+
else
|
283
|
+
throw ex3;
|
284
|
+
}
|
285
|
+
}
|
286
|
+
static async StartExecution(httpClient) {
|
287
|
+
HttpManager.setNativeHttpClient(httpClient);
|
288
|
+
let loaded = await ClientManager.Instance.LoadExecutionProps();
|
289
|
+
if (loaded) {
|
290
|
+
new GuiEventsProcessor();
|
291
|
+
ClientManager.Instance.InitGuiManager();
|
292
|
+
ClientManager.Instance.InitCircularReferencesBypasses();
|
293
|
+
let versionString = CurrentClientVersion === '0.0.0.0' ? "Development mode" : "Version : " + CurrentClientVersion;
|
294
|
+
console.log("Magic Web Client. " + versionString);
|
295
|
+
HttpManager.GetInstance().HttpCommunicationTimeoutMS = ServerConfig.Instance.GetFirstHttpRequestTimeout();
|
296
|
+
EventsManager.Instance.Init();
|
297
|
+
Logger.Instance.Initialize(RemoteCommandsProcessor.GetInstance().parseLogLevel(ServerConfig.Instance.getInternalLogLevel()), false);
|
298
|
+
let mgd = new MGData(new CommandsTable(), new CommandsTable(), 0, null, false);
|
299
|
+
await MGDataCollection.Instance.addMGData(mgd, 0, true);
|
300
|
+
await ClientManager.Instance.WorkThreadExecution();
|
301
|
+
if (Logger.Instance.ShouldLog()) {
|
302
|
+
Logger.Instance.WriteToLog(OSEnvironment.EolSeq + "Ended on " + DateTimeUtils.ToString(DateTime.Now, XMLConstants.ERROR_LOG_DATE_FORMAT, Logger.Instance) + OSEnvironment.EolSeq + OSEnvironment.EolSeq, false);
|
303
|
+
}
|
304
|
+
}
|
305
|
+
else {
|
306
|
+
await GUIManager.Instance.MessageBox("Error", "Failed to load server configuration file (" + this._executionPropertiesFileName + ")", Styles.MSGBOX_ICON_ERROR | Styles.MSGBOX_BUTTON_OK);
|
307
|
+
}
|
308
|
+
}
|
309
|
+
async LoadExecutionProps() {
|
310
|
+
let response = "";
|
311
|
+
let succeeded = true;
|
312
|
+
try {
|
313
|
+
let isError = new RefParam(false);
|
314
|
+
response = await HttpManager.GetInstance().GetContent(ClientManager._executionPropertiesFileName, null, false, isError);
|
315
|
+
ServerConfig.Instance.Init(JSON.parse(response));
|
316
|
+
let assetsURL = ServerConfig.Instance.getAssetsURL();
|
317
|
+
if (assetsURL !== null) {
|
318
|
+
ClientManager.assetsURL = assetsURL;
|
319
|
+
}
|
320
|
+
window.assetsURL = ClientManager.assetsURL;
|
321
|
+
}
|
322
|
+
catch (ex) {
|
323
|
+
succeeded = false;
|
324
|
+
}
|
325
|
+
return succeeded;
|
326
|
+
}
|
327
|
+
GetGlobalUniqueSessionID() {
|
328
|
+
return this._globalUniqueSessionId;
|
329
|
+
}
|
330
|
+
static GetControlPictureMask(taskId, controlName) {
|
331
|
+
let pic = null;
|
332
|
+
let task = MGDataCollection.Instance.GetTaskByID(taskId);
|
333
|
+
let control = null;
|
334
|
+
if (controlName !== null && task != null) {
|
335
|
+
control = task.getForm().GetCtrl(controlName);
|
336
|
+
pic = control.getPIC();
|
337
|
+
}
|
338
|
+
return pic;
|
339
|
+
}
|
340
|
+
static GetFormattedValue(taskId, controlName, value, rowId) {
|
341
|
+
let pic = null;
|
342
|
+
let task = MGDataCollection.Instance.GetTaskByID(taskId);
|
343
|
+
let control = null;
|
344
|
+
let newValue = value;
|
345
|
+
if (controlName !== null && task !== null)
|
346
|
+
control = task.getForm().GetCtrl(controlName);
|
347
|
+
if (control != null && control.DataType == StorageAttribute.NUMERIC) {
|
348
|
+
if (control.isRepeatable() && control.getProp(PropInterface.PROP_TYPE_FORMAT).isExpression()) {
|
349
|
+
let picval = control.getProp(PropInterface.PROP_TYPE_FORMAT).getPrevValue(+rowId);
|
350
|
+
pic = new PIC(picval, StorageAttribute.NUMERIC, control.getForm().getTask().getCompIdx());
|
351
|
+
}
|
352
|
+
else
|
353
|
+
pic = control.getPIC();
|
354
|
+
let dispValue = String(value);
|
355
|
+
let newPic = pic.getUnformattedNumericPic();
|
356
|
+
let num = DisplayConvertor.Instance.toNum(dispValue, newPic, 0);
|
357
|
+
newValue = DisplayConvertor.Instance.fromNum(num, pic);
|
358
|
+
}
|
359
|
+
return newValue;
|
360
|
+
}
|
361
|
+
static GetRangedValue(taskId, controlName, value) {
|
362
|
+
let task = MGDataCollection.Instance.GetTaskByID(taskId);
|
363
|
+
let control = null;
|
364
|
+
if (controlName !== null) {
|
365
|
+
control = task.getForm().GetCtrl(controlName);
|
366
|
+
return control.getRangedValue(value);
|
367
|
+
}
|
368
|
+
return null;
|
369
|
+
}
|
370
|
+
static ValidateControlValue(taskId, controlName, value) {
|
371
|
+
let task = MGDataCollection.Instance.GetTaskByID(taskId);
|
372
|
+
let control = null;
|
373
|
+
if (controlName !== null) {
|
374
|
+
control = task.getForm().GetCtrl(controlName);
|
375
|
+
return control.validate(value);
|
376
|
+
}
|
377
|
+
return null;
|
378
|
+
}
|
379
|
+
static GetFldRanges(taskId, controlName) {
|
380
|
+
let task = MGDataCollection.Instance.GetTaskByID(taskId);
|
381
|
+
let control = null;
|
382
|
+
if (controlName !== null) {
|
383
|
+
control = task.getForm().GetCtrl(controlName);
|
384
|
+
return control.getRanges();
|
385
|
+
}
|
386
|
+
return null;
|
387
|
+
}
|
388
|
+
static TransCacheExists() {
|
389
|
+
let clientTransCacheExists = AccessHelper.mgDataTable.getCurrMGData().clientTransactionCacheExists();
|
390
|
+
let serverTransactionCacheExists = AccessHelper.mgDataTable.getCurrMGData().serverTransactionCacheExists();
|
391
|
+
return clientTransCacheExists || serverTransactionCacheExists;
|
392
|
+
}
|
393
|
+
RegisterDelegates() {
|
394
|
+
HttpClientEvents.GetExecutionProperty_Event = ServerConfig.Instance.GetExecutionProperty.bind(ServerConfig.Instance);
|
395
|
+
HttpClientEvents.GetRuntimeCtxID_Event = this.GetRuntimeCtxID.bind(this);
|
396
|
+
HttpClientEvents.GetGlobalUniqueSessionID_Event = this.GetGlobalUniqueSessionID.bind(this);
|
397
|
+
HttpClientEvents.ShouldDisplayGenericError_Event = ServerConfig.Instance.ShouldDisplayGenericError.bind(ServerConfig.Instance);
|
398
|
+
}
|
399
|
+
GetRuntimeCtxID() {
|
400
|
+
return RuntimeContextBase.Instance.ContextID;
|
401
|
+
}
|
402
|
+
static TerminateContextUsingFetchAPI() {
|
403
|
+
if (RemoteCommandsProcessor.IsSessionReInitializing)
|
404
|
+
return;
|
405
|
+
HttpManager.GetInstance().IsAbortingMagicEngine = true;
|
406
|
+
MGDataCollection.Instance.getCurrMGData().CmdsToServer.Clear();
|
407
|
+
let contextTerminationEventCommand = CommandFactory.
|
408
|
+
CreateContextTerminationEventCommand(MGDataCollection.Instance.StartupMgData.getFirstTask().getTaskTag());
|
409
|
+
MGDataCollection.Instance.getCurrMGData().CmdsToServer.Add(contextTerminationEventCommand);
|
410
|
+
RemoteCommandsProcessor.GetInstance().Execute(CommandsProcessorBase_SendingInstruction.ONLY_COMMANDS);
|
411
|
+
}
|
412
|
+
static GetAssetsURL() {
|
413
|
+
return ClientManager.assetsURL;
|
414
|
+
}
|
415
|
+
}
|
416
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiQ2xpZW50TWFuYWdlci5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uL3Byb2plY3RzL2VuZ2luZS9zcmMvQ2xpZW50TWFuYWdlci50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQ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5fbGFzdEZhaWxlZEZvY3VzZWRDb250cm9sID0gY29udHJvbDtcclxuICAgICAgICAgICAgLy8gICAgIHJldHVybjtcclxuICAgICAgICAgICAgLy8gICB9XHJcbiAgICAgICAgICAgIC8vIH1cclxuICAgICAgICAgICAgLy9cclxuICAgICAgICAgICAgLy8gdGhpcy5fbGFzdEZhaWxlZEZvY3VzZWRDb250cm9sID0gbnVsbDtcclxuXHJcbiAgICAgICAgICAgIGlmICghQ2xpZW50TWFuYWdlci5oYW5kbGluZ0ZpcnN0UGFya2FibGVDb250cm9sKVxyXG4gICAgICAgICAgICAgIEV2ZW50cy5PbkZvY3VzKGNvbnRyb2wsIGxpbmVJZHgsIHRydWUsIGZhbHNlKTtcclxuXHJcbiAgICAgICAgICAgIGJyZWFrO1xyXG4gICAgICAgICAgY2FzZSBcImRibGNsaWNrXCI6XHJcbiAgICAgICAgICAgIEV2ZW50cy5PbkRibENsaWNrKGNvbnRyb2wsIGxpbmVJZHgpO1xyXG4gICAgICAgICAgICBicmVhaztcclxuXHJcbiAgICAgICAgICBjYXNlIFwic2VsZWN0aW9uY2hhbmdlZFwiOlxyXG4gICAgICAgICAgICBFdmVudHMuT25TZWxlY3Rpb24oZ3VpRXZlbnQuVmFsdWUsIGNvbnRyb2wsIGxpbmVJZHgsIHRydWUpO1xyXG4gICAgICAgICAgICBicmVhaztcclxuICAgICAgICAgIGNhc2UgXCJrZXlkb3duXCI6XHJcbiAgICAgICAgICAgIEV2ZW50cy5PbktleURvd24oIHRhc2suZ2V0Rm9ybSgpLCBjb250cm9sLCBndWlFdmVudC5tb2RpZmllcnMsIGd1aUV2ZW50LmtleUNvZGUsIDAsMCwgJycsZmFsc2UsJycsdHJ1ZSApO1xyXG4gICAgICAgICAgICBicmVhaztcclxuICAgICAgICAgIGNhc2UgXCJzZXRleHRlcm5hbHZhbHVlXCI6XHJcbiAgICAgICAgICAgIEV2ZW50c01hbmFnZXIuSW5zdGFuY2UuQWRkRXh0ZXJuYWxWYWx1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udC5Db250cm9sTmFtZSkpO1xyXG4gICAgICAgICAgICBicmVhaztcclxuICAgICAgICAgIGRlZmF1bHQ6XHJcbiAgICAgICAgICAgIC8vIGNvbnNvbGUubG9nKCBcInVuaGFuZGxlZCBldmVudDogXFxcIlwiICsgZ3VpRXZlbnQuRXZlbnRUeXBlICsgXCJcXFwiXCIpO1xyXG4gICAgICAgICAgICBicmVhaztcclxuICAgICAgICB9XHJcbiAgICAgIH1cclxuICAgIH1cclxuICAgIGVsc2UgLy90YXNrID09IG51bGxcclxuICAgICAgc3dpdGNoIChndWlFdmVudC5FdmVudFR5cGUpIHtcclxuICAgICAgICBjYXNlIFwiY29uZmlybWF0aW9uQ2xvc2VkXCI6XHJcbiAgICAgICAgICB0aGlzLkNvbmZpcm1hdGlvbkNsb3NlZChndWlFdmVudC5rZXlDb2RlKTtcclxuICAgICAgICAgIGJyZWFrO1xyXG4gICAgICB9XHJcbiAgfVxyXG5cclxuICBwcml2YXRlIGhhbmRsZU5hdmlnYXRlSW5Sb3dFdmVudCh0YXNrOiBUYXNrLCBldnQ6IHN0cmluZykge1xyXG4gICAgbGV0IGludGVybmFsRXZ0ID0gSW50ZXJuYWxJbnRlcmZhY2UuTUdfQUNUX05PTkU7XHJcbiAgICBldnQgPSBldnQudG9Mb3dlckNhc2UoKTtcclxuXHJcbiAgICBzd2l0Y2ggKGV2dCkge1xyXG4gICAgICBjYXNlIFwiYmVnaW4tcGFnZVwiOlxyXG4gICAgICAgIGludGVybmFsRXZ0ID0gSW50ZXJuYWxJbnRlcmZhY2UuTUdfQUNUX1RCTF9CRUdQQUdFO1xyXG4gICAgICAgIGJyZWFrO1xyXG5cclxuICAgICAgY2FzZSBcInByZXZpb3VzLXBhZ2VcIjpcclxuICAgICAgICBpbnRlcm5hbEV2dCA9IEludGVybmFsSW50ZXJmYWNlLk1HX0FDVF9UQkxfUFJWUEFHRTtcclxuICAgICAgICBicmVhaztcclxuXHJcbiAgICAgIGNhc2UgXCJlbmQtcGFnZV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2V0Rmlyc3RUYXNrKCkuZ2V0VGFza1RhZygpKTtcclxuXHJcbiAgICBNR0RhdGFDb2xsZWN0aW9uLkluc3RhbmNlLmdldEN1cnJNR0RhdGEoKS5DbWRzVG9TZXJ2ZXIuQWRkKDxJQ2xpZW50Q29tbWFuZD5jb250ZXh0VGVybWluYXRpb25FdmVudENvbW1hbmQpO1xyXG5cclxuICAgIC8vIHJlc3BvbnNlIG5lZWQgbm90IHRvIGJlIGhhbmRsZWQgYXMgdGhlIGJyb3dzZXIgdW5sb2FkIGNhbm5vdCBiZSBzdG9wcGVkLCBzbyBubyBuZWVkIHRvIHdhaXRcclxuICAgIFJlbW90ZUNvbW1hbmRzUHJvY2Vzc29yLkdldEluc3RhbmNlKCkuRXhlY3V0ZShDb21tYW5kc1Byb2Nlc3NvckJhc2VfU2VuZGluZ0luc3RydWN0aW9uLk9OTFlfQ09NTUFORFMpO1xyXG4gIH1cclxuXHJcbiAgcHVibGljIHN0YXRpYyBHZXRBc3NldHNVUkwoKTogc3RyaW5ne1xyXG4gICAgcmV0dXJuIENsaWVudE1hbmFnZXIuYXNzZXRzVVJMO1xyXG4gIH1cclxuXHJcbn1cclxuIl19
|
@@ -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,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiQ29tbWFuZHNQcm9jZXNzb3JCYXNlLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vcHJvamVjdHMvZW5naW5lL3NyYy9Db21tYW5kc1Byb2Nlc3NvckJhc2UudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUFFLFlBQVksRUFBRSxNQUFNLGtCQUFrQixDQUFDO0FBRWhELE9BQU8sRUFBRSxTQUFTLEVBQUUsTUFBTSxrQkFBa0IsQ0FBQztBQUM3QyxPQUFPLEVBQUUsaUJBQWlCLEVBQUUsTUFBTSxzQkFBc0IsQ0FBQztBQUd6RCxNQUFNLENBQU4sSUFBWSxrQ0FLWDtBQUxELFdBQVksa0NBQWtDO0lBRTVDLHFHQUFhLENBQUE7SUFDYixpR0FBTyxDQUFBO0lBQ1AsK0ZBQU0sQ0FBQTtBQUNSLENBQUMsRUFMVyxrQ0FBa0MsS0FBbEMsa0NBQWtDLFFBSzdDO0FBR0QsTUFBTSxDQUFOLElBQVksd0NBSVg7QUFKRCxXQUFZLHdDQUF3QztJQUNsRCx1SUFBb0IsQ0FBQTtJQUNwQix5SEFBYSxDQUFBO0lBQ2IsbUlBQWtCLENBQUE7QUFDcEIsQ0FBQyxFQUpXLHdDQUF3QyxLQUF4Qyx3Q0FBd0MsUUFJbkQ7QUFHRCxNQUFNLE9BQWdCLHFCQUFxQjtJQUN6QyxlQU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