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