@magic-xpa/engine 4.1100.0-dev4110.25 → 4.1100.0-dev4110.250
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/esm2022/src/commands/ClientToServer/BrowserEscEventCommand.mjs +26 -0
- package/{esm2020 → esm2022}/src/commands/ClientToServer/ClientOriginatedCommand.mjs +14 -14
- package/esm2022/src/commands/ClientToServer/ClientOriginatedCommandSerializer.mjs +60 -0
- 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/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 +880 -0
- package/{esm2020 → esm2022}/src/data/RecordOutOfDataViewException.mjs +15 -15
- package/esm2022/src/data/RecordsTable.mjs +267 -0
- package/esm2022/src/data/TaskTransactionManager.mjs +107 -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 +883 -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 +29883 -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/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/BrowserEscEventCommand.mjs +0 -23
- package/esm2020/src/commands/ClientToServer/ClientOriginatedCommandSerializer.mjs +0 -60
- 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/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,252 @@
|
|
1
|
+
import { ApplicationException, Debug, List } from "@magic-xpa/mscorelib";
|
2
|
+
import { InternalInterface, XMLConstants } from "@magic-xpa/utils";
|
3
|
+
import { Commands } from "@magic-xpa/gui";
|
4
|
+
import { FlowMonitorQueue } from "../util/FlowMonitorQueue";
|
5
|
+
import { LastFocusedManager } from "../rt/LastFocusedManager";
|
6
|
+
import { CommandsProcessorBase_SendingInstruction, CommandsProcessorBase_SessionStage } from "../CommandsProcessorBase";
|
7
|
+
import { CommandsProcessorManager } from "../CommandsProcessorManager";
|
8
|
+
import { AccessHelper } from "../AccessHelper";
|
9
|
+
import { ConstInterface } from "../ConstInterface";
|
10
|
+
export class MGDataCollection {
|
11
|
+
static _instance = null;
|
12
|
+
_mgDataTab = new List();
|
13
|
+
_iteratorMgdIdx = 0;
|
14
|
+
_iteratorTaskIdx = 0;
|
15
|
+
currMgdID = 0;
|
16
|
+
StartupMgData = null;
|
17
|
+
_lastRouteSentToServer = "";
|
18
|
+
constructor() {
|
19
|
+
}
|
20
|
+
GetTaskByID(id) {
|
21
|
+
let task = null;
|
22
|
+
for (let i = 0; i < this.getSize() && task == null; i++) {
|
23
|
+
let mgd = this.getMGData(i);
|
24
|
+
if (mgd == null)
|
25
|
+
continue;
|
26
|
+
task = mgd.getTask(id);
|
27
|
+
}
|
28
|
+
return task;
|
29
|
+
}
|
30
|
+
static get Instance() {
|
31
|
+
if (MGDataCollection._instance == null) {
|
32
|
+
if (MGDataCollection._instance == null)
|
33
|
+
MGDataCollection._instance = new MGDataCollection();
|
34
|
+
}
|
35
|
+
return MGDataCollection._instance;
|
36
|
+
}
|
37
|
+
async addMGData(mgd, idx, isStartup) {
|
38
|
+
if (idx < 0 || idx > this.getSize())
|
39
|
+
throw new ApplicationException("Illegal MGData requested");
|
40
|
+
if (isStartup)
|
41
|
+
this.StartupMgData = mgd;
|
42
|
+
if (idx === this.getSize())
|
43
|
+
this._mgDataTab.push(mgd);
|
44
|
+
else {
|
45
|
+
let oldMgd = this.getMGData(idx);
|
46
|
+
if (oldMgd != null && !oldMgd.IsAborting) {
|
47
|
+
await oldMgd.getFirstTask().stop();
|
48
|
+
oldMgd.abort();
|
49
|
+
}
|
50
|
+
this._mgDataTab.set_Item(idx, mgd);
|
51
|
+
}
|
52
|
+
}
|
53
|
+
getMGData(idx) {
|
54
|
+
let mgd = null;
|
55
|
+
if (idx >= 0 && idx < this.getSize()) {
|
56
|
+
mgd = this._mgDataTab.get_Item(idx);
|
57
|
+
}
|
58
|
+
return mgd;
|
59
|
+
}
|
60
|
+
getAvailableIdx() {
|
61
|
+
let i;
|
62
|
+
for (i = 0; i < this._mgDataTab.length; i = i + 1) {
|
63
|
+
if (this._mgDataTab.get_Item(i) === null)
|
64
|
+
break;
|
65
|
+
}
|
66
|
+
return i;
|
67
|
+
}
|
68
|
+
getMgDataIdx(mgd) {
|
69
|
+
return this._mgDataTab.indexOf(mgd);
|
70
|
+
}
|
71
|
+
deleteMGDataTree(index) {
|
72
|
+
let mgd, childMgd;
|
73
|
+
let i;
|
74
|
+
if (index < 0 || index >= this.getSize())
|
75
|
+
throw new ApplicationException("in deleteMGData() illegal index: " + index);
|
76
|
+
mgd = this.getMGData(index);
|
77
|
+
if (mgd != null) {
|
78
|
+
if (index > 0 && mgd.getParentMGdata() != null) {
|
79
|
+
this._mgDataTab.set_Item(index, null);
|
80
|
+
}
|
81
|
+
LastFocusedManager.Instance.clean(index);
|
82
|
+
for (i = 0; i < this.getSize(); i++) {
|
83
|
+
childMgd = this.getMGData(i);
|
84
|
+
if (childMgd != null && childMgd.getParentMGdata() === mgd)
|
85
|
+
this.deleteMGDataTree(i);
|
86
|
+
}
|
87
|
+
}
|
88
|
+
}
|
89
|
+
getCurrMGData() {
|
90
|
+
return this.getMGData(this.currMgdID);
|
91
|
+
}
|
92
|
+
GetMainProgByCtlIdx(contextIDOrCtlIdx, ctlIdx) {
|
93
|
+
if (arguments.length === 2)
|
94
|
+
return this.GetMainProgByCtlIdx_0(ctlIdx);
|
95
|
+
else
|
96
|
+
return this.GetMainProgByCtlIdx_1(contextIDOrCtlIdx);
|
97
|
+
}
|
98
|
+
GetMainProgByCtlIdx_0(ctlIdx) {
|
99
|
+
let task = null;
|
100
|
+
for (let i = 0; i < this.getSize() && task == null; i++) {
|
101
|
+
let mgd = this.getMGData(i);
|
102
|
+
if (mgd == null)
|
103
|
+
continue;
|
104
|
+
task = mgd.getMainProg(ctlIdx);
|
105
|
+
}
|
106
|
+
return task;
|
107
|
+
}
|
108
|
+
GetMainProgByCtlIdx_1(ctlIdx) {
|
109
|
+
return this.GetMainProgByCtlIdx(-1, ctlIdx);
|
110
|
+
}
|
111
|
+
startTasksIteration() {
|
112
|
+
this._iteratorMgdIdx = 0;
|
113
|
+
this._iteratorTaskIdx = 0;
|
114
|
+
}
|
115
|
+
getNextTask() {
|
116
|
+
let task;
|
117
|
+
let mgd = this.getMGData(this._iteratorMgdIdx);
|
118
|
+
if (mgd == null)
|
119
|
+
return null;
|
120
|
+
task = mgd.getTask(this._iteratorTaskIdx);
|
121
|
+
if (task == null) {
|
122
|
+
do {
|
123
|
+
this._iteratorMgdIdx++;
|
124
|
+
} while (this._iteratorMgdIdx < this.getSize() && this.getMGData(this._iteratorMgdIdx) == null);
|
125
|
+
this._iteratorTaskIdx = 0;
|
126
|
+
return this.getNextTask();
|
127
|
+
}
|
128
|
+
this._iteratorTaskIdx++;
|
129
|
+
return task;
|
130
|
+
}
|
131
|
+
async buildXML(message, serializeTasks) {
|
132
|
+
let lastRoute = Commands.getLastRoute();
|
133
|
+
if (lastRoute !== this._lastRouteSentToServer) {
|
134
|
+
message.Append(XMLConstants.START_TAG + ConstInterface.MG_TAG_LAST_ROUTE);
|
135
|
+
message.Append(" " + ConstInterface.MG_ATTR_ENV_VALUE + "=\"" + lastRoute + "\"");
|
136
|
+
message.Append(XMLConstants.TAG_TERM);
|
137
|
+
this._lastRouteSentToServer = lastRoute;
|
138
|
+
}
|
139
|
+
for (let i = 0; i < this.getSize(); i = i + 1) {
|
140
|
+
let mgd = this.getMGData(i);
|
141
|
+
if (mgd !== null && !mgd.IsAborting) {
|
142
|
+
await mgd.buildXML(message, serializeTasks);
|
143
|
+
}
|
144
|
+
}
|
145
|
+
FlowMonitorQueue.Instance.buildXML(message);
|
146
|
+
}
|
147
|
+
getSize() {
|
148
|
+
return this._mgDataTab.length;
|
149
|
+
}
|
150
|
+
async processRecovery() {
|
151
|
+
for (let i = 0; i < this.getSize(); i = i + 1) {
|
152
|
+
let mgd = this.getMGData(i);
|
153
|
+
if (mgd !== null) {
|
154
|
+
for (let j = 0; j < mgd.getTasksCount(); j = j + 1) {
|
155
|
+
let task = mgd.getTask(j);
|
156
|
+
if (task !== null)
|
157
|
+
await task.DataView.processRecovery();
|
158
|
+
}
|
159
|
+
}
|
160
|
+
}
|
161
|
+
}
|
162
|
+
getTriggeredTasks(triggeringTask) {
|
163
|
+
let list = new List();
|
164
|
+
let task;
|
165
|
+
let tag = triggeringTask.getTaskTag();
|
166
|
+
this.startTasksIteration();
|
167
|
+
while ((task = this.getNextTask()) !== null) {
|
168
|
+
if (tag === task.PreviouslyActiveTaskId)
|
169
|
+
list.push(task);
|
170
|
+
}
|
171
|
+
return list;
|
172
|
+
}
|
173
|
+
GetTasks(p) {
|
174
|
+
let taskList = new List();
|
175
|
+
this._mgDataTab.forEach(mgd => {
|
176
|
+
if (mgd !== null && !mgd.IsAborting) {
|
177
|
+
for (let i = 0; i < mgd.getTasksCount(); i = i + 1) {
|
178
|
+
let task = mgd.getTask(i);
|
179
|
+
if (task !== null && p(task)) {
|
180
|
+
taskList.push(task);
|
181
|
+
}
|
182
|
+
}
|
183
|
+
}
|
184
|
+
});
|
185
|
+
return taskList;
|
186
|
+
}
|
187
|
+
getTaskIdById(taskId) {
|
188
|
+
let task = this.GetTaskByID(taskId);
|
189
|
+
let tag = taskId;
|
190
|
+
if (task != null)
|
191
|
+
tag = task.getTaskTag();
|
192
|
+
return tag;
|
193
|
+
}
|
194
|
+
GetTopMostForms() {
|
195
|
+
let task;
|
196
|
+
let forms = new List();
|
197
|
+
this.startTasksIteration();
|
198
|
+
while ((task = this.getNextTask()) != null) {
|
199
|
+
let form = task.getForm();
|
200
|
+
if (!task.isAborting() && form != null && !form.isSubForm())
|
201
|
+
forms.push(form);
|
202
|
+
}
|
203
|
+
return forms;
|
204
|
+
}
|
205
|
+
GetMGDataForStartupProgram() {
|
206
|
+
Debug.Assert(this._mgDataTab.length > 0, "The main program must be processed before invoking this method.");
|
207
|
+
let mainProgByCtlIdx = this.GetMainProgByCtlIdx(0);
|
208
|
+
Debug.Assert(mainProgByCtlIdx !== null, "The main program must be processed before invoking this method.");
|
209
|
+
Debug.Assert(mainProgByCtlIdx.getMgdID() === 0, "Main program is expected to be on MGData 0. Is this an error?");
|
210
|
+
return this._mgDataTab.get_Item(0);
|
211
|
+
}
|
212
|
+
async execRequestWithSubformRecordCycle(cmdsToServer, cmdToServer, exp) {
|
213
|
+
this.cleanDoSubformPrefixSuffix();
|
214
|
+
cmdsToServer.Add(cmdToServer);
|
215
|
+
if (!(MGDataCollection.Instance.StartupMgData.getFirstTask().InEndTask && MGDataCollection.Instance.StartupMgData.getFirstTask().ClosingFormUI))
|
216
|
+
await CommandsProcessorManager.GetCommandsProcessor().Execute(CommandsProcessorBase_SendingInstruction.TASKS_AND_COMMANDS, CommandsProcessorBase_SessionStage.NORMAL, exp);
|
217
|
+
await this.execAllSubformRecordCycle();
|
218
|
+
}
|
219
|
+
cleanDoSubformPrefixSuffix() {
|
220
|
+
for (let i = 0; i < this.getSize(); i++) {
|
221
|
+
let mgd = this.getMGData(i);
|
222
|
+
if (mgd === null || mgd.IsAborting)
|
223
|
+
continue;
|
224
|
+
let tasksCount = mgd.getTasksCount();
|
225
|
+
for (let j = 0; j < tasksCount; j++) {
|
226
|
+
let task = mgd.getTask(j);
|
227
|
+
task.DoSubformPrefixSuffix = false;
|
228
|
+
}
|
229
|
+
}
|
230
|
+
}
|
231
|
+
async execAllSubformRecordCycle() {
|
232
|
+
for (let i = 0; i < this.getSize(); i = i + 1) {
|
233
|
+
let mgd = this.getMGData(i);
|
234
|
+
if (mgd === null || mgd.IsAborting)
|
235
|
+
continue;
|
236
|
+
let tasksCount = mgd.getTasksCount();
|
237
|
+
for (let j = 0; j < tasksCount; j = j + 1) {
|
238
|
+
let task = mgd.getTask(j);
|
239
|
+
if (task.IsSubForm && task.DoSubformPrefixSuffix) {
|
240
|
+
task.PerformParentRecordPrefix = false;
|
241
|
+
AccessHelper.eventsManager.pushNewExecStacks();
|
242
|
+
await AccessHelper.eventsManager.handleInternalEventWithTaskAndSubformRefresh(task, InternalInterface.MG_ACT_REC_PREFIX, true);
|
243
|
+
if (!AccessHelper.eventsManager.GetStopExecutionFlag())
|
244
|
+
await AccessHelper.eventsManager.handleInternalEventWithTask(task, InternalInterface.MG_ACT_REC_SUFFIX);
|
245
|
+
AccessHelper.eventsManager.popNewExecStacks();
|
246
|
+
task.PerformParentRecordPrefix = true;
|
247
|
+
}
|
248
|
+
}
|
249
|
+
}
|
250
|
+
}
|
251
|
+
}
|
252
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiTUdEYXRhQ29sbGV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HJlY29yZCBwcmVmaXggb2YgYWxsIGZhdGhlcnMuXHJcbiAgICAgICAgICAvLyBCdXQgd2hlbiB3ZSByZXR1cm4gZnJvbSB0aGUgc2VydmVyIHdlIGRvIG5vdCBuZWVkIGl0LiBTbyB3ZSBwcmV2ZW50IGZhdGhlciByZWNvcmQgcHJlZml4IGV4ZWN1dGlvbi5cclxuICAgICAgICAgIHRhc2suUGVyZm9ybVBhcmVudFJlY29yZFByZWZpeCA9IGZhbHNlO1xyXG4gICAgICAgICAgQWNjZXNzSGVscGVyLmV2ZW50c01hbmFnZXIucHVzaE5ld0V4ZWNTdGFja3MoKTtcclxuICAgICAgICAgIGF3YWl0IEFjY2Vzc0hlbHBlci5ldmVudHNNYW5hZ2VyLmhhbmRsZUludGVybmFsRXZlbnRXaXRoVGFza0FuZFN1YmZvcm1SZWZyZXNoKHRhc2ssIEludGVybmFsSW50ZXJmYWNlLk1HX0FDVF9SRUNfUFJFRklYLCB0cnVlKTtcclxuXHJcbiAgICAgICAgICBpZiAoIUFjY2Vzc0hlbHBlci5ldmVudHNNYW5hZ2VyLkdldFN0b3BFeGVjdXRpb25GbGFnKCkpXHJcbiAgICAgICAgICAgIGF3YWl0IEFjY2Vzc0hlbHBlci5ldmVudHNNYW5hZ2VyLmhhbmRsZUludGVybmFsRXZlbnRXaXRoVGFzayh0YXNrLCBJbnRlcm5hbEludGVyZmFjZS5NR19BQ1RfUkVDX1NVRkZJWCk7XHJcblxyXG4gICAgICAgICAgQWNjZXNzSGVscGVyLmV2ZW50c01hbmFnZXIucG9wTmV3RXhlY1N0YWNrcygpO1xyXG4gICAgICAgICAgdGFzay5QZXJmb3JtUGFyZW50UmVjb3JkUHJlZml4ID0gdHJ1ZTtcclxuICAgICAgICB9XHJcbiAgICAgIH1cclxuICAgIH1cclxuICB9XHJcblxyXG59XHJcbiJdfQ==
|
@@ -0,0 +1,63 @@
|
|
1
|
+
import { Dictionary, List } from '@magic-xpa/mscorelib';
|
2
|
+
import { MgTimer } from '@magic-xpa/gui';
|
3
|
+
class TimerObjectCollection {
|
4
|
+
static MgDataToTimerObjList = new Dictionary();
|
5
|
+
}
|
6
|
+
export class RCTimer extends MgTimer {
|
7
|
+
_mgData = null;
|
8
|
+
_isIdle = false;
|
9
|
+
get TimerIntervalMiliSeconds() {
|
10
|
+
return this._timerIntervalMilliSeconds;
|
11
|
+
}
|
12
|
+
set IsIdleTimer(value) {
|
13
|
+
this._isIdle = value;
|
14
|
+
}
|
15
|
+
get IsIdleTimer() {
|
16
|
+
return this._isIdle;
|
17
|
+
}
|
18
|
+
constructor(mgData, milliseconds, isIdle) {
|
19
|
+
super(milliseconds);
|
20
|
+
this._mgData = mgData;
|
21
|
+
this.IsIdleTimer = isIdle;
|
22
|
+
let mgDataId = this._mgData.GetId().toString();
|
23
|
+
if (!TimerObjectCollection.MgDataToTimerObjList.ContainsKey(mgDataId))
|
24
|
+
TimerObjectCollection.MgDataToTimerObjList.Add(mgDataId, new List());
|
25
|
+
TimerObjectCollection.MgDataToTimerObjList.get_Item(mgDataId).push(this);
|
26
|
+
}
|
27
|
+
GetMgdata() {
|
28
|
+
return this._mgData;
|
29
|
+
}
|
30
|
+
static StopTimer(mgData, milliseconds, isIdle) {
|
31
|
+
let timers = null;
|
32
|
+
let timer = null;
|
33
|
+
let mgDataId = mgData.GetId().toString();
|
34
|
+
if (TimerObjectCollection.MgDataToTimerObjList.ContainsKey(mgDataId)) {
|
35
|
+
timers = TimerObjectCollection.MgDataToTimerObjList.get_Item(mgDataId);
|
36
|
+
timer = timers.find(rcTimer => {
|
37
|
+
return (rcTimer !== null) && (rcTimer._timerIntervalMilliSeconds === milliseconds && rcTimer._isIdle === isIdle);
|
38
|
+
});
|
39
|
+
if (timer != null) {
|
40
|
+
timer.Stop();
|
41
|
+
timers.Remove(timer);
|
42
|
+
}
|
43
|
+
if (timers.length === 0)
|
44
|
+
TimerObjectCollection.MgDataToTimerObjList.Remove(mgDataId);
|
45
|
+
}
|
46
|
+
}
|
47
|
+
static StopAll(mgData) {
|
48
|
+
let timers = null;
|
49
|
+
let mgDataId = mgData.GetId().toString();
|
50
|
+
if (TimerObjectCollection.MgDataToTimerObjList.ContainsKey(mgDataId))
|
51
|
+
timers = TimerObjectCollection.MgDataToTimerObjList.get_Item(mgDataId);
|
52
|
+
if (timers !== null) {
|
53
|
+
timers.forEach(rcTimer => {
|
54
|
+
if (rcTimer !== null) {
|
55
|
+
rcTimer.Stop();
|
56
|
+
}
|
57
|
+
});
|
58
|
+
timers.Clear();
|
59
|
+
TimerObjectCollection.MgDataToTimerObjList.Remove(mgDataId);
|
60
|
+
}
|
61
|
+
}
|
62
|
+
}
|
63
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiUkNUaW1lci5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uL3Byb2plY3RzL2VuZ2luZS9zcmMvdGFza3MvUkNUaW1lci50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBQUUsVUFBVSxFQUFFLElBQUksRUFBRSxNQUFNLHNCQUFzQixDQUFDO0FBQ3hELE9BQU8sRUFBRSxPQUFPLEVBQUUsTUFBTSxnQkFBZ0IsQ0FBQztBQUl6QyxNQUFNLHFCQUFxQjtJQUN6QixNQUFNLENBQUMsb0JBQW9CLEdBQThCLElBQUksVUFBVSxFQUFpQixDQUFDOztBQUczRixNQUFNLE9BQU8sT0FBUSxTQUFRLE9BQU87SUFDMUIsT0FBTyxHQUFXLElBQUksQ0FBQztJQUN2QixPQUFPLEdBQVksS0FBSyxDQUFDO0lBR2pDLElBQUksd0JBQXdCO1FBQzFCLE9BQU8sSUFBSSxDQUFDLDBCQUEwQixDQUFDO0lBQ3pDLENBQUM7SUFHRCxJQUFJLFdBQVcsQ0FBQyxLQUFjO1FBQzVCLElBQUksQ0FBQyxPQUFPLEdBQUcsS0FBSyxDQUFDO0lBQ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gICB0aW1lcnMgPSBUaW1lck9iamVjdENvbGxlY3Rpb24uTWdEYXRhVG9UaW1lck9iakxpc3QuZ2V0X0l0ZW0obWdEYXRhSWQpO1xyXG5cclxuICAgIGlmICh0aW1lcnMgIT09IG51bGwpIHtcclxuICAgICAgdGltZXJzLmZvckVhY2gocmNUaW1lciA9PiB7XHJcbiAgICAgICAgaWYgKHJjVGltZXIgIT09IG51bGwpIHtcclxuICAgICAgICAgIC8vIFBsYWNpbmcgU1RPUF9USU1FUiBjb21tYW5kIGluIHF1ZXVlLlxyXG4gICAgICAgICAgcmNUaW1lci5TdG9wKCk7XHJcbiAgICAgICAgfVxyXG4gICAgICB9KTtcclxuXHJcbiAgICAgIHRpbWVycy5DbGVhcigpO1xyXG5cclxuICAgICAgLy8gUmVtb3ZpbmcgdGhlIGtleSBmcm9tIHRoZSBoYXNoIHRhYmxlLCBhZnRlciB0aGUgbGlzdCBvZiB0aW1lciBvYmplY3RzIGFyZSBjbGVhcmVkLlxyXG4gICAgICBUaW1lck9iamVjdENvbGxlY3Rpb24uTWdEYXRhVG9UaW1lck9iakxpc3QuUmVtb3ZlKG1nRGF0YUlkKTtcclxuICAgIH1cclxuICB9XHJcbn1cclxuIl19
|
@@ -0,0 +1,45 @@
|
|
1
|
+
import { TaskServiceBase } from './TaskServiceBase';
|
2
|
+
import { ReturnResult } from '../util/ReturnResult';
|
3
|
+
import { MsgInterface, WindowType } from '@magic-xpa/utils';
|
4
|
+
export class RemoteTaskService extends TaskServiceBase {
|
5
|
+
constructor() {
|
6
|
+
super();
|
7
|
+
}
|
8
|
+
GetTaskTag(defaultValue) {
|
9
|
+
return defaultValue;
|
10
|
+
}
|
11
|
+
GetDataviewManagerForVirtuals(task) {
|
12
|
+
return task.DataviewManager.RemoteDataviewManager;
|
13
|
+
}
|
14
|
+
PrepareTask(task) {
|
15
|
+
task.DataViewWasRetrieved = true;
|
16
|
+
let result = super.PrepareTask(task);
|
17
|
+
if (task.getMGData().IsModal && task.getForm() !== null) {
|
18
|
+
task.getForm().ConcreteWindowType = WindowType.Overlay;
|
19
|
+
}
|
20
|
+
return result;
|
21
|
+
}
|
22
|
+
GetEventTaskId(originalTaskId) {
|
23
|
+
return originalTaskId;
|
24
|
+
}
|
25
|
+
ShouldEvaluatePropertyLocally(propId) {
|
26
|
+
return false;
|
27
|
+
}
|
28
|
+
InitTaskPrefixExecutedFlag(task) {
|
29
|
+
task.TaskPrefixExecuted = true;
|
30
|
+
}
|
31
|
+
RemoveRecomputes(parentTask) {
|
32
|
+
parentTask.DataView.GetFieldsTab().resetRecomp();
|
33
|
+
}
|
34
|
+
GetOwnerTransactionTask(task) {
|
35
|
+
let OwnerTransactionTask = task;
|
36
|
+
if (task.DataviewManager.RemoteDataviewManager.Transaction !== null)
|
37
|
+
OwnerTransactionTask = task.DataviewManager.RemoteDataviewManager.Transaction.OwnerTask;
|
38
|
+
return OwnerTransactionTask;
|
39
|
+
}
|
40
|
+
static async PreparePropMainDisplay(task) {
|
41
|
+
await task.ComputeMainDisplay();
|
42
|
+
return task.FormIsLegal() ? ReturnResult.SuccessfulResult : new ReturnResult(MsgInterface.BRKTAB_STR_ERR_FORM);
|
43
|
+
}
|
44
|
+
}
|
45
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiUmVtb3RlVGFza1NlcnZpY2UuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi9wcm9qZWN0cy9lbmdpbmUvc3JjL3Rhc2tzL1JlbW90ZVRhc2tTZXJ2aWNlLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFBQyxlQUFlLEVBQUMsTUFBTSxtQkFBbUIsQ0FBQztBQUVsRCxPQUFPLEVBQUMsWUFBWSxFQUFDLE1BQU0sc0JBQXNCLENBQUM7QUFDbEQsT0FBTyxFQUFDLFlBQVksRUFBRSxVQUFVLEVBQUMsTUFBTSx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