@magic-xpa/engine 4.1100.0-dev4110.23 → 4.1100.0-dev4110.236
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,552 @@
|
|
1
|
+
import { HandlersTable } from "../rt/HandlersTable";
|
2
|
+
import { TasksTable } from "./TasksTable";
|
3
|
+
import { CompMainPrgTable } from "../rt/CompMainPrgTable";
|
4
|
+
import { Task } from "./Task";
|
5
|
+
import { Logger, XMLConstants, XmlParser } from "@magic-xpa/utils";
|
6
|
+
import { RecomputeTable } from "../rt/RecomputeTable";
|
7
|
+
import { Debug, NNumber } from "@magic-xpa/mscorelib";
|
8
|
+
import { RuntimeContextBase } from "@magic-xpa/gui";
|
9
|
+
import { GUIManager } from "../GUIManager";
|
10
|
+
import { HttpManager } from "../http/HttpManager";
|
11
|
+
import { FlowMonitorQueue } from "../util/FlowMonitorQueue";
|
12
|
+
import { RunTimeEvent } from "../event/RunTimeEvent";
|
13
|
+
import { ConstInterface } from "../ConstInterface";
|
14
|
+
import { LanguageData } from "../env/LanguageData";
|
15
|
+
import { EnvParamsTable } from "../env/EnvVariablesTable";
|
16
|
+
import { GlobalParams } from "../exp/GlobalParamsTable";
|
17
|
+
import { Environment } from "../env/Environment";
|
18
|
+
import { GlobalCommandsManager } from "../GlobalCommandsManager";
|
19
|
+
import { ServerConfig } from "../ServerConfig";
|
20
|
+
import { AccessHelper } from "../AccessHelper";
|
21
|
+
import { UserDetails } from "../security/UserDetails";
|
22
|
+
import { RemoteCommandsProcessor } from "../remote/RemoteCommandsProcessor";
|
23
|
+
export class MGData {
|
24
|
+
_expHandlers = null;
|
25
|
+
_id = 0;
|
26
|
+
_parent = null;
|
27
|
+
_mprgTab = null;
|
28
|
+
_tasksTab = null;
|
29
|
+
_timerHandlers = null;
|
30
|
+
_timersStarted = false;
|
31
|
+
forceModal = false;
|
32
|
+
CmdsToClient = null;
|
33
|
+
CmdsToServer = null;
|
34
|
+
IsModal = false;
|
35
|
+
IsAborting = false;
|
36
|
+
get ForceModal() {
|
37
|
+
return this.forceModal;
|
38
|
+
}
|
39
|
+
constructor(toClient, toServer, id, parent, isModal, forceModal) {
|
40
|
+
this.CmdsToServer = toClient;
|
41
|
+
this.CmdsToClient = toServer;
|
42
|
+
if (arguments.length === 5)
|
43
|
+
this.constructor_0(id, parent, isModal);
|
44
|
+
else
|
45
|
+
this.constructor_1(id, parent, isModal, forceModal);
|
46
|
+
}
|
47
|
+
constructor_0(id, parent, isModal) {
|
48
|
+
this._timerHandlers = new HandlersTable();
|
49
|
+
this._expHandlers = new HandlersTable();
|
50
|
+
this._mprgTab = new TasksTable();
|
51
|
+
this._tasksTab = new TasksTable();
|
52
|
+
this._id = id;
|
53
|
+
this._parent = parent;
|
54
|
+
if (AccessHelper.eventsManager.getCompMainPrgTab() === null) {
|
55
|
+
let compMainPrgTab = new CompMainPrgTable();
|
56
|
+
AccessHelper.eventsManager.setCompMainPrgTab(compMainPrgTab);
|
57
|
+
}
|
58
|
+
this.IsModal = isModal;
|
59
|
+
}
|
60
|
+
constructor_1(id, parent, isModal, forceModal) {
|
61
|
+
this.constructor_0(id, parent, isModal);
|
62
|
+
this.forceModal = forceModal;
|
63
|
+
}
|
64
|
+
GetId() {
|
65
|
+
return this._id;
|
66
|
+
}
|
67
|
+
AlreadyMovedToFirstControl() {
|
68
|
+
let alreadyMoved = false;
|
69
|
+
let tasksCount = this.getTasksCount();
|
70
|
+
for (let i = 0; i < tasksCount; i = i + 1) {
|
71
|
+
let mgForm = this.getTask(i).getForm();
|
72
|
+
if (mgForm !== null && mgForm.MovedToFirstControl) {
|
73
|
+
alreadyMoved = true;
|
74
|
+
break;
|
75
|
+
}
|
76
|
+
}
|
77
|
+
return alreadyMoved;
|
78
|
+
}
|
79
|
+
StartTimers() {
|
80
|
+
if (this._timerHandlers !== null && !this._timersStarted) {
|
81
|
+
this._timerHandlers.startTimers(this);
|
82
|
+
this._timersStarted = true;
|
83
|
+
}
|
84
|
+
}
|
85
|
+
async fillData(openingTaskDetails, parser) {
|
86
|
+
let canContinue;
|
87
|
+
do {
|
88
|
+
let nextTag = parser.getNextTag();
|
89
|
+
canContinue = await this.initInnerObjects(parser, nextTag, openingTaskDetails);
|
90
|
+
} while (canContinue);
|
91
|
+
Logger.Instance.WriteDevToLog("MGData.FillData(): THE END of the parsing " + parser.getCurrIndex() + " characters");
|
92
|
+
}
|
93
|
+
async initInnerObjects(parser, foundTagName, openingTaskDetails) {
|
94
|
+
if (foundTagName == null)
|
95
|
+
return false;
|
96
|
+
switch (foundTagName) {
|
97
|
+
case XMLConstants.MG_TAG_XML:
|
98
|
+
parser.setCurrIndex(parser.getXMLdata().indexOf(XMLConstants.TAG_CLOSE, parser.getCurrIndex()) + 1);
|
99
|
+
break;
|
100
|
+
case ConstInterface.MG_TAG_DATAVIEW:
|
101
|
+
if (!await this.insertDataView(parser)) {
|
102
|
+
let endContext = parser.getXMLdata().indexOf('/' + ConstInterface.MG_TAG_DATAVIEW, parser.getCurrIndex());
|
103
|
+
parser.setCurrIndex(endContext);
|
104
|
+
parser.setCurrIndex2EndOfTag();
|
105
|
+
}
|
106
|
+
break;
|
107
|
+
case ConstInterface.MG_TAG_COMPLETE_DV:
|
108
|
+
{
|
109
|
+
let task = null;
|
110
|
+
let endContext = parser.getXMLdata().indexOf(XMLConstants.TAG_CLOSE, parser.getCurrIndex());
|
111
|
+
let index = parser.getXMLdata().indexOf(ConstInterface.MG_TAG_COMPLETE_DV, parser.getCurrIndex()) + ConstInterface.MG_TAG_COMPLETE_DV.length;
|
112
|
+
let tokensVector = XmlParser.getTokens(parser.getXMLdata().substr(index, endContext - index), '"');
|
113
|
+
let attribute = (tokensVector.get_Item(0));
|
114
|
+
let valueStr;
|
115
|
+
if (attribute === XMLConstants.MG_ATTR_TASKID) {
|
116
|
+
valueStr = (tokensVector.get_Item(1));
|
117
|
+
let taskId = valueStr;
|
118
|
+
if (this.getTask(taskId) === null)
|
119
|
+
task = AccessHelper.mgDataTable.GetTaskByID(taskId);
|
120
|
+
else
|
121
|
+
task = this.getTask(taskId);
|
122
|
+
}
|
123
|
+
let start = endContext + 1;
|
124
|
+
endContext = parser.getXMLdata().indexOf(XMLConstants.END_TAG + ConstInterface.MG_TAG_COMPLETE_DV, parser.getCurrIndex());
|
125
|
+
let dataViewContent = parser.getXMLdata().substr(start, endContext - start);
|
126
|
+
task.dataViewContent = dataViewContent;
|
127
|
+
parser.setCurrIndex(endContext);
|
128
|
+
parser.setCurrIndex2EndOfTag();
|
129
|
+
}
|
130
|
+
break;
|
131
|
+
case ConstInterface.MG_TAG_CONTEXT: {
|
132
|
+
let endContext = parser.getXMLdata().indexOf(XMLConstants.TAG_TERM, parser.getCurrIndex());
|
133
|
+
if (endContext !== -1 && endContext < parser.getXMLdata().length) {
|
134
|
+
let tag = parser.getXMLsubstring(endContext);
|
135
|
+
parser.add2CurrIndex(tag.indexOf(ConstInterface.MG_TAG_CONTEXT) + ConstInterface.MG_TAG_CONTEXT.length);
|
136
|
+
parser.setCurrIndex(endContext + XMLConstants.TAG_TERM.length);
|
137
|
+
}
|
138
|
+
break;
|
139
|
+
}
|
140
|
+
case XMLConstants.MG_TAG_RECOMPUTE:
|
141
|
+
let recompTab = new RecomputeTable();
|
142
|
+
recompTab.fillData(parser);
|
143
|
+
break;
|
144
|
+
case ConstInterface.MG_TAG_COMMAND:
|
145
|
+
Logger.Instance.WriteDevToLog("goes to command");
|
146
|
+
this.CmdsToClient.fillData(parser);
|
147
|
+
break;
|
148
|
+
case ConstInterface.MG_TAG_LANGUAGE:
|
149
|
+
Logger.Instance.WriteDevToLog("goes to language data");
|
150
|
+
await LanguageData.Instance.fillData(parser);
|
151
|
+
break;
|
152
|
+
case ConstInterface.MG_TAG_KBDMAP_URL:
|
153
|
+
Logger.Instance.WriteDevToLog("goes to keyBoard");
|
154
|
+
await Environment.Instance.fillFromUrl(foundTagName, parser);
|
155
|
+
break;
|
156
|
+
case ConstInterface.MG_TAG_KBDMAP:
|
157
|
+
break;
|
158
|
+
case ConstInterface.MG_TAG_COMPMAINPRG:
|
159
|
+
Logger.Instance.WriteDevToLog("goes to compmainprg");
|
160
|
+
AccessHelper.eventsManager.getCompMainPrgTab().fillData(parser);
|
161
|
+
break;
|
162
|
+
case ConstInterface.MG_TAG_EVENTS_QUEUE:
|
163
|
+
Logger.Instance.WriteDevToLog("goes to eventsqueue");
|
164
|
+
this.fillEventsQueue(parser);
|
165
|
+
break;
|
166
|
+
case ConstInterface.MG_TAG_TASKURL:
|
167
|
+
await Task.ProcessTaskURL();
|
168
|
+
break;
|
169
|
+
case XMLConstants.MG_TAG_TASK:
|
170
|
+
Logger.Instance.WriteDevToLog("goes to task");
|
171
|
+
let taskCountBefore = this._mprgTab.getSize();
|
172
|
+
await this._mprgTab.fillData(this, openingTaskDetails, parser);
|
173
|
+
if (this._id !== 0) {
|
174
|
+
let taskCountAfter = this._mprgTab.getSize();
|
175
|
+
let mgd0 = AccessHelper.mgDataTable.getMGData(0);
|
176
|
+
for (let taskIndex = taskCountBefore; taskIndex < taskCountAfter; taskIndex++) {
|
177
|
+
let newTask = this._mprgTab.getTask(taskIndex);
|
178
|
+
if (newTask.isMainProg() && mgd0._mprgTab.getTask(newTask.getTaskTag()) == null) {
|
179
|
+
mgd0._mprgTab.addTask(newTask);
|
180
|
+
mgd0.addTask(newTask);
|
181
|
+
}
|
182
|
+
}
|
183
|
+
}
|
184
|
+
break;
|
185
|
+
case ConstInterface.MG_TAG_ENV:
|
186
|
+
Logger.Instance.WriteDevToLog("goes to environment");
|
187
|
+
Environment.Instance.fillData(parser);
|
188
|
+
break;
|
189
|
+
case ConstInterface.MG_TAG_FLWMTR_CONFIG:
|
190
|
+
FlowMonitorQueue.Instance.fillData(parser);
|
191
|
+
break;
|
192
|
+
case XMLConstants.MG_TAG_XML_END:
|
193
|
+
parser.setCurrIndex2EndOfTag();
|
194
|
+
return false;
|
195
|
+
case ConstInterface.MG_TAG_USER_DETAILS:
|
196
|
+
UserDetails.Instance.fillData(parser);
|
197
|
+
break;
|
198
|
+
case ConstInterface.MG_TAG_DBH_REAL_IDXS:
|
199
|
+
parser.SkipXMLElement();
|
200
|
+
break;
|
201
|
+
case ConstInterface.MG_TAG_GLOBALPARAMSCHANGES:
|
202
|
+
Logger.Instance.WriteDevToLog("applying global params changes from the server (Set/GetParams)");
|
203
|
+
GlobalParams.Instance.fillData(parser);
|
204
|
+
break;
|
205
|
+
case ConstInterface.MG_TAG_GLOBALPARAMS:
|
206
|
+
Logger.Instance.WriteDevToLog("processing base64 encoded image of all global params from the server");
|
207
|
+
this.fillGlobalParams(parser);
|
208
|
+
break;
|
209
|
+
case ConstInterface.MG_TAG_ENV_PARAM_URL:
|
210
|
+
Logger.Instance.WriteDevToLog("goes to env params name ");
|
211
|
+
await Environment.Instance.fillFromUrl(foundTagName, parser);
|
212
|
+
break;
|
213
|
+
case ConstInterface.MG_TAG_ENV_PARAM:
|
214
|
+
Logger.Instance.WriteDevToLog("goes to env params name ");
|
215
|
+
EnvParamsTable.Instance.fillData(parser);
|
216
|
+
break;
|
217
|
+
case ConstInterface.MG_TAG_CONTEXT_ID:
|
218
|
+
{
|
219
|
+
let ctxId;
|
220
|
+
let ctxEndIdx;
|
221
|
+
parser.setCurrIndex(parser.getXMLdata().indexOf(XMLConstants.TAG_CLOSE, parser.getCurrIndex()) + 1);
|
222
|
+
ctxEndIdx = parser.getXMLdata().indexOf(XMLConstants.TAG_OPEN, parser.getCurrIndex());
|
223
|
+
ctxId = parser.getXMLsubstring(ctxEndIdx).trim();
|
224
|
+
parser.setCurrIndex(ctxEndIdx);
|
225
|
+
parser.setCurrIndex2EndOfTag();
|
226
|
+
RuntimeContextBase.Instance.ContextID = ctxId;
|
227
|
+
}
|
228
|
+
break;
|
229
|
+
case ConstInterface.MG_TAG_SESSION_ID:
|
230
|
+
let sessionIdEndIdx;
|
231
|
+
parser.setCurrIndex(parser.getXMLdata().indexOf(XMLConstants.TAG_CLOSE, parser.getCurrIndex()) + 1);
|
232
|
+
sessionIdEndIdx = parser.getXMLdata().indexOf(XMLConstants.TAG_OPEN, parser.getCurrIndex());
|
233
|
+
RemoteCommandsProcessor.GetInstance().SessionId = parser.getXMLsubstring(sessionIdEndIdx).trim();
|
234
|
+
parser.setCurrIndex(sessionIdEndIdx);
|
235
|
+
parser.setCurrIndex2EndOfTag();
|
236
|
+
break;
|
237
|
+
case ConstInterface.MG_TAG_HTTP_COMMUNICATION_TIMEOUT:
|
238
|
+
{
|
239
|
+
let httpCommunicationTimeout;
|
240
|
+
let httpCommunicationTimeoutIdx;
|
241
|
+
parser.setCurrIndex(parser.getXMLdata().indexOf(XMLConstants.TAG_CLOSE, parser.getCurrIndex()) + 1);
|
242
|
+
httpCommunicationTimeoutIdx = parser.getXMLdata().indexOf(XMLConstants.TAG_OPEN, parser.getCurrIndex());
|
243
|
+
httpCommunicationTimeout = NNumber.Parse(parser.getXMLsubstring(httpCommunicationTimeoutIdx));
|
244
|
+
parser.setCurrIndex(httpCommunicationTimeoutIdx);
|
245
|
+
parser.setCurrIndex2EndOfTag();
|
246
|
+
HttpManager.GetInstance().HttpCommunicationTimeoutMS = httpCommunicationTimeout * 1000;
|
247
|
+
}
|
248
|
+
break;
|
249
|
+
case ConstInterface.MG_TAG_DATABASE_URL:
|
250
|
+
case ConstInterface.MG_TAG_DATABASES_HEADER:
|
251
|
+
case ConstInterface.MG_TAG_TASKDEFINITION_IDS_URL:
|
252
|
+
case ConstInterface.MG_TAG_DBH_DATA_IDS_URL:
|
253
|
+
case ConstInterface.MG_TAG_DBHS_END:
|
254
|
+
case ConstInterface.MG_TAG_OFFLINE_SNIPPETS_URL:
|
255
|
+
parser.SkipXMLElement();
|
256
|
+
break;
|
257
|
+
case ConstInterface.MG_TAG_DBHS:
|
258
|
+
case ConstInterface.MG_TAG_STARTUP_PROGRAM:
|
259
|
+
parser.ReadContentOfCurrentElement();
|
260
|
+
break;
|
261
|
+
case XMLConstants.MG_TAG_MENUS_OPEN:
|
262
|
+
break;
|
263
|
+
default:
|
264
|
+
Logger.Instance.WriteExceptionToLogWithMsg("There is no such tag name in MGData, add case to MGData.initInnerObjects and case to while of MGData.FillData " + foundTagName);
|
265
|
+
return false;
|
266
|
+
}
|
267
|
+
return true;
|
268
|
+
}
|
269
|
+
async insertDataView(parser) {
|
270
|
+
let task = null;
|
271
|
+
let endContext = parser.getXMLdata().indexOf(XMLConstants.TAG_CLOSE, parser.getCurrIndex());
|
272
|
+
let index = parser.getXMLdata().indexOf(ConstInterface.MG_TAG_DATAVIEW, parser.getCurrIndex()) + ConstInterface.MG_TAG_DATAVIEW.length;
|
273
|
+
let tokensVector = XmlParser.getTokens(parser.getXMLdata().substr(index, endContext - index), '"');
|
274
|
+
let invalidate = false;
|
275
|
+
for (let i = 0; i < tokensVector.length; i = i + 2) {
|
276
|
+
let attribute = tokensVector.get_Item(i);
|
277
|
+
if (attribute === XMLConstants.MG_ATTR_TASKID) {
|
278
|
+
let valueStr = tokensVector.get_Item(i + 1);
|
279
|
+
let taskId = valueStr;
|
280
|
+
task = (this.getTask(taskId) || AccessHelper.mgDataTable.GetTaskByID(taskId));
|
281
|
+
}
|
282
|
+
if (attribute === ConstInterface.MG_ATTR_INVALIDATE) {
|
283
|
+
let valueStr = tokensVector.get_Item(i + 1);
|
284
|
+
invalidate = XmlParser.getBoolean(valueStr);
|
285
|
+
break;
|
286
|
+
}
|
287
|
+
}
|
288
|
+
let result;
|
289
|
+
if (task !== null) {
|
290
|
+
await task.insertRecordTable(invalidate, parser);
|
291
|
+
result = true;
|
292
|
+
}
|
293
|
+
else {
|
294
|
+
result = false;
|
295
|
+
}
|
296
|
+
return result;
|
297
|
+
}
|
298
|
+
addTask(newTask) {
|
299
|
+
this._tasksTab.addTask(newTask);
|
300
|
+
}
|
301
|
+
removeTask(task) {
|
302
|
+
this._tasksTab.removeTask(task);
|
303
|
+
this._mprgTab.removeTask(task);
|
304
|
+
}
|
305
|
+
getTasksCount() {
|
306
|
+
let result;
|
307
|
+
if (this._tasksTab !== null) {
|
308
|
+
result = this._tasksTab.getSize();
|
309
|
+
}
|
310
|
+
else {
|
311
|
+
result = 0;
|
312
|
+
}
|
313
|
+
return result;
|
314
|
+
}
|
315
|
+
getTask(taskIdOrIdx) {
|
316
|
+
if (arguments.length === 1 && (taskIdOrIdx === null || typeof taskIdOrIdx === "undefined" || taskIdOrIdx.constructor === String)) {
|
317
|
+
return this.getTask_0(taskIdOrIdx);
|
318
|
+
}
|
319
|
+
return this.getTask_1(taskIdOrIdx);
|
320
|
+
}
|
321
|
+
getTask_0(taskId) {
|
322
|
+
let result;
|
323
|
+
if (this._tasksTab !== null && typeof this._tasksTab !== "undefined") {
|
324
|
+
result = this._tasksTab.getTask(taskId);
|
325
|
+
}
|
326
|
+
else {
|
327
|
+
result = null;
|
328
|
+
}
|
329
|
+
return result;
|
330
|
+
}
|
331
|
+
getTask_1(idx) {
|
332
|
+
return this._tasksTab.getTask(idx);
|
333
|
+
}
|
334
|
+
async buildXML(message, serializeTasks) {
|
335
|
+
if (this.CmdsToServer !== null) {
|
336
|
+
this.CmdsToServer.buildXML(message);
|
337
|
+
}
|
338
|
+
if (serializeTasks && this._tasksTab !== null) {
|
339
|
+
await this._tasksTab.buildXML(message);
|
340
|
+
}
|
341
|
+
}
|
342
|
+
getFirstTask() {
|
343
|
+
let task = null;
|
344
|
+
let MDIFrameTask = null;
|
345
|
+
for (let i = 0; i < this._tasksTab.getSize(); i = i + 1) {
|
346
|
+
task = this._tasksTab.getTask(i);
|
347
|
+
if (!task.isMainProg()) {
|
348
|
+
break;
|
349
|
+
}
|
350
|
+
task = null;
|
351
|
+
}
|
352
|
+
if (task === null && this._id === 0) {
|
353
|
+
task = MDIFrameTask;
|
354
|
+
}
|
355
|
+
return task;
|
356
|
+
}
|
357
|
+
getMainProg(ctlIdx) {
|
358
|
+
for (let i = 0; i < this._mprgTab.getSize(); i = i + 1) {
|
359
|
+
let task = this._mprgTab.getTask(i);
|
360
|
+
if (task.getCtlIdx() === ctlIdx && task.isMainProg()) {
|
361
|
+
return task;
|
362
|
+
}
|
363
|
+
}
|
364
|
+
return null;
|
365
|
+
}
|
366
|
+
getNextMainProg(ctlIdx) {
|
367
|
+
let compMainPrgTab = AccessHelper.eventsManager.getCompMainPrgTab();
|
368
|
+
let currSearchIndex = compMainPrgTab.getIndexOf(ctlIdx);
|
369
|
+
let nextCtlIdx = compMainPrgTab.getCtlIdx(currSearchIndex + 1);
|
370
|
+
let result;
|
371
|
+
if (nextCtlIdx === -1) {
|
372
|
+
result = null;
|
373
|
+
}
|
374
|
+
else {
|
375
|
+
result = this.getMainProg(nextCtlIdx);
|
376
|
+
}
|
377
|
+
return result;
|
378
|
+
}
|
379
|
+
clientTransactionCacheExists() {
|
380
|
+
let task;
|
381
|
+
for (let i = 0; i < this._tasksTab.getSize(); i = i + 1) {
|
382
|
+
task = this._tasksTab.getTask(i);
|
383
|
+
if (!task.isMainProg() && task.DataView.modifiedRecordsNumber() > 0) {
|
384
|
+
return true;
|
385
|
+
}
|
386
|
+
}
|
387
|
+
return false;
|
388
|
+
}
|
389
|
+
serverTransactionCacheExists() {
|
390
|
+
let task;
|
391
|
+
for (let i = 0; i < this._tasksTab.getSize(); i = i + 1) {
|
392
|
+
task = this._tasksTab.getTask(i);
|
393
|
+
if (!task.isMainProg() && !task.DataView.ServerTransactionCacheEmpty) {
|
394
|
+
return true;
|
395
|
+
}
|
396
|
+
}
|
397
|
+
return false;
|
398
|
+
}
|
399
|
+
getTaskByTaskDefinitionID(taskDefinitionID) {
|
400
|
+
let task;
|
401
|
+
for (let i = 0; i < this._tasksTab.getSize(); i = i + 1) {
|
402
|
+
task = this._tasksTab.getTask(i);
|
403
|
+
if (task.TaskDefinitionId.Equals(taskDefinitionID)) {
|
404
|
+
return task;
|
405
|
+
}
|
406
|
+
}
|
407
|
+
return null;
|
408
|
+
}
|
409
|
+
getTimerHandlers() {
|
410
|
+
return this._timerHandlers;
|
411
|
+
}
|
412
|
+
addTimerHandler(handler) {
|
413
|
+
this._timerHandlers.add(handler);
|
414
|
+
}
|
415
|
+
removeTimerHandler(task) {
|
416
|
+
for (let i = 0; i < this._timerHandlers.getSize();) {
|
417
|
+
let timerTask = this._timerHandlers.getHandler(i).getTask();
|
418
|
+
if (timerTask.isDescendentOf(task) && timerTask.getMGData() === this)
|
419
|
+
this._timerHandlers.remove(i);
|
420
|
+
else
|
421
|
+
i++;
|
422
|
+
}
|
423
|
+
}
|
424
|
+
removeExpressionHandler(task) {
|
425
|
+
for (let i = 0; i < this._expHandlers.getSize();) {
|
426
|
+
let timerTask = this._expHandlers.getHandler(i).getTask();
|
427
|
+
if (timerTask.isDescendentOf(task) && timerTask.getMGData() === this)
|
428
|
+
this._expHandlers.remove(i);
|
429
|
+
else
|
430
|
+
i++;
|
431
|
+
}
|
432
|
+
}
|
433
|
+
getExpHandlers() {
|
434
|
+
return this._expHandlers;
|
435
|
+
}
|
436
|
+
addExpHandler(handler, idx) {
|
437
|
+
this._expHandlers.insertAfter(handler, idx);
|
438
|
+
}
|
439
|
+
changeTimers(oldTimers, newTimers) {
|
440
|
+
let i = 0;
|
441
|
+
let j = 0;
|
442
|
+
let guiManager = GUIManager.Instance;
|
443
|
+
oldTimers.sort();
|
444
|
+
newTimers.sort();
|
445
|
+
while (i < oldTimers.length && j < newTimers.length) {
|
446
|
+
if (oldTimers.get_Item(i) > newTimers.get_Item(j)) {
|
447
|
+
guiManager.startTimer(this, newTimers.get_Item(j), false);
|
448
|
+
j = j + 1;
|
449
|
+
}
|
450
|
+
else {
|
451
|
+
if (oldTimers.get_Item(i) < newTimers.get_Item(j)) {
|
452
|
+
guiManager.stopTimer(this, oldTimers.get_Item(i), false);
|
453
|
+
i = i + 1;
|
454
|
+
}
|
455
|
+
else {
|
456
|
+
i = i + 1;
|
457
|
+
j = j + 1;
|
458
|
+
}
|
459
|
+
}
|
460
|
+
}
|
461
|
+
while (i < oldTimers.length) {
|
462
|
+
guiManager.stopTimer(this, oldTimers.get_Item(i), false);
|
463
|
+
i = i + 1;
|
464
|
+
}
|
465
|
+
while (j < newTimers.length) {
|
466
|
+
guiManager.startTimer(this, newTimers.get_Item(j), false);
|
467
|
+
j = j + 1;
|
468
|
+
}
|
469
|
+
}
|
470
|
+
fillEventsQueue(parser) {
|
471
|
+
while (this.initEvents(parser, parser.getNextTag())) {
|
472
|
+
}
|
473
|
+
}
|
474
|
+
initEvents(parser, foundTagName) {
|
475
|
+
let result;
|
476
|
+
if (foundTagName === null) {
|
477
|
+
result = false;
|
478
|
+
}
|
479
|
+
else {
|
480
|
+
if (foundTagName === ConstInterface.MG_TAG_EVENT) {
|
481
|
+
let evt = new RunTimeEvent(null);
|
482
|
+
evt.fillData(parser, null);
|
483
|
+
evt.convertParamsToArgs();
|
484
|
+
evt.setTask(null);
|
485
|
+
evt.setFromServer();
|
486
|
+
AccessHelper.eventsManager.addToTail(evt);
|
487
|
+
}
|
488
|
+
else {
|
489
|
+
if (foundTagName === ConstInterface.MG_TAG_EVENTS_QUEUE) {
|
490
|
+
parser.setCurrIndex(parser.getXMLdata().indexOf(">", parser.getCurrIndex()) + 1);
|
491
|
+
}
|
492
|
+
else {
|
493
|
+
if (foundTagName === "/" + ConstInterface.MG_TAG_EVENTS_QUEUE) {
|
494
|
+
parser.setCurrIndex2EndOfTag();
|
495
|
+
result = false;
|
496
|
+
return result;
|
497
|
+
}
|
498
|
+
Logger.Instance.WriteExceptionToLogWithMsg("There is no such tag in EventsQueue: " + foundTagName);
|
499
|
+
result = false;
|
500
|
+
return result;
|
501
|
+
}
|
502
|
+
}
|
503
|
+
result = true;
|
504
|
+
}
|
505
|
+
return result;
|
506
|
+
}
|
507
|
+
isMainWindow() {
|
508
|
+
return this._parent === null;
|
509
|
+
}
|
510
|
+
getParentMGdata() {
|
511
|
+
return this._parent;
|
512
|
+
}
|
513
|
+
abort() {
|
514
|
+
this.IsAborting = true;
|
515
|
+
}
|
516
|
+
copyUnframedCmds() {
|
517
|
+
let unframedCmds = GlobalCommandsManager.Instance.getUnframedCmds();
|
518
|
+
for (let i = 0; i < unframedCmds.length; i = i + 1) {
|
519
|
+
this.CmdsToClient.Add(unframedCmds.get_Item(i));
|
520
|
+
}
|
521
|
+
unframedCmds.SetSize(0);
|
522
|
+
}
|
523
|
+
getValidAncestor() {
|
524
|
+
return this._parent;
|
525
|
+
}
|
526
|
+
getMaxCtlIdx() {
|
527
|
+
let rc = 0;
|
528
|
+
for (let i = 0; i < this._tasksTab.getSize(); i = i + 1) {
|
529
|
+
let task = this._tasksTab.getTask(i);
|
530
|
+
if (task !== null) {
|
531
|
+
rc = Math.max(rc, task.getCtlIdx());
|
532
|
+
}
|
533
|
+
}
|
534
|
+
return rc;
|
535
|
+
}
|
536
|
+
fillGlobalParams(parser) {
|
537
|
+
let XMLdata = parser.getXMLdata();
|
538
|
+
let endContext = parser.getXMLdata().indexOf(XMLConstants.TAG_TERM, parser.getCurrIndex());
|
539
|
+
if (endContext !== -1 && endContext < XMLdata.length) {
|
540
|
+
let tag = parser.getXMLsubstring(endContext);
|
541
|
+
parser.add2CurrIndex(tag.indexOf(ConstInterface.MG_TAG_GLOBALPARAMS) + ConstInterface.MG_TAG_GLOBALPARAMS.length);
|
542
|
+
let tokens = XmlParser.getTokens(RuntimeContextBase.Instance.Parser.getXMLsubstring(endContext), XMLConstants.XML_ATTR_DELIM);
|
543
|
+
Debug.Assert(tokens.get_Item(0) === XMLConstants.MG_ATTR_VALUE);
|
544
|
+
ServerConfig.Instance.setGlobalParams(tokens.get_Item(1));
|
545
|
+
endContext = XMLdata.indexOf(XMLConstants.TAG_OPEN, endContext);
|
546
|
+
if (endContext === -1)
|
547
|
+
endContext = XMLdata.length;
|
548
|
+
parser.setCurrIndex(endContext);
|
549
|
+
}
|
550
|
+
}
|
551
|
+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