@magic-xpa/engine 4.1100.0-dev4110.20 → 4.1100.0-dev4110.202
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 +409 -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 +157 -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/{esm2020 → esm2022}/src/bridge/MagicBridge.mjs +40 -40
- package/esm2022/src/commands/ClientOriginatedCommandTaskTag.mjs +12 -0
- package/{esm2020 → esm2022}/src/commands/ClientToServer/AddUserLocateDataViewCommand.mjs +8 -8
- package/{esm2020 → esm2022}/src/commands/ClientToServer/AddUserRangeDataviewCommand.mjs +9 -9
- package/{esm2020 → esm2022}/src/commands/ClientToServer/AddUserSortDataViewCommand.mjs +9 -9
- package/{esm2020 → esm2022}/src/commands/ClientToServer/BrowserEscEventCommand.mjs +23 -23
- package/{esm2020 → esm2022}/src/commands/ClientToServer/ClientOriginatedCommand.mjs +14 -14
- package/esm2022/src/commands/ClientToServer/ClientOriginatedCommandSerializer.mjs +60 -0
- package/{esm2020 → esm2022}/src/commands/ClientToServer/ColumnSortEventCommand.mjs +26 -26
- package/esm2022/src/commands/ClientToServer/CommandFactory.mjs +260 -0
- package/esm2022/src/commands/ClientToServer/CommandSerializationHelper.mjs +67 -0
- package/{esm2020 → esm2022}/src/commands/ClientToServer/ComputeEventCommand.mjs +23 -23
- package/{esm2020 → esm2022}/src/commands/ClientToServer/ContextTerminationEventCommand.mjs +20 -20
- package/{esm2020 → esm2022}/src/commands/ClientToServer/ContextTimeoutResetCommand.mjs +19 -19
- package/{esm2020 → esm2022}/src/commands/ClientToServer/ControlItemsRefreshCommand.mjs +8 -8
- package/esm2022/src/commands/ClientToServer/DataViewOutputCommand.mjs +13 -0
- package/{esm2020 → esm2022}/src/commands/ClientToServer/DataviewCommand.mjs +44 -44
- package/esm2022/src/commands/ClientToServer/EvaluateCommand.mjs +37 -0
- package/esm2022/src/commands/ClientToServer/EventCommand.mjs +40 -0
- package/esm2022/src/commands/ClientToServer/ExecOperCommand.mjs +67 -0
- package/esm2022/src/commands/ClientToServer/FetchDataControlValuesEventCommand.mjs +22 -0
- package/{esm2020 → esm2022}/src/commands/ClientToServer/GlobalParamsQueryCommand.mjs +10 -10
- package/{esm2020 → esm2022}/src/commands/ClientToServer/ICommandTaskTag.mjs +1 -1
- package/{esm2020 → esm2022}/src/commands/ClientToServer/IndexChangeEventCommand.mjs +21 -21
- package/esm2022/src/commands/ClientToServer/IniputForceWriteCommand.mjs +23 -0
- package/{esm2020 → esm2022}/src/commands/ClientToServer/NonReversibleExitEventCommand.mjs +23 -23
- package/{esm2020 → esm2022}/src/commands/ClientToServer/QueryCommand.mjs +20 -20
- package/esm2022/src/commands/ClientToServer/RecomputeCommand.mjs +27 -0
- package/esm2022/src/commands/ClientToServer/RefreshEventCommand.mjs +27 -0
- package/esm2022/src/commands/ClientToServer/RefreshScreenEventCommand.mjs +24 -0
- package/esm2022/src/commands/ClientToServer/RollbackEventCommand.mjs +40 -0
- package/{esm2020 → esm2022}/src/commands/ClientToServer/SelectProgramCommand.mjs +14 -14
- package/{esm2020 → esm2022}/src/commands/ClientToServer/SetTransactionStateDataviewCommand.mjs +9 -9
- package/{esm2020 → esm2022}/src/commands/ClientToServer/SubformOpenEventCommand.mjs +21 -21
- package/esm2022/src/commands/ClientToServer/SubformRefreshEventCommand.mjs +24 -0
- package/esm2022/src/commands/ClientToServer/TransactionCommand.mjs +30 -0
- package/{esm2020 → esm2022}/src/commands/ClientToServer/UnloadCommand.mjs +14 -14
- package/esm2022/src/commands/ClientToServer/WriteMessageToServerLogCommand.mjs +18 -0
- package/esm2022/src/commands/DataViewCommandBase.mjs +8 -0
- package/{esm2020 → esm2022}/src/commands/IClientCommand.mjs +1 -1
- package/esm2022/src/commands/IClientTargetedCommand.mjs +13 -0
- package/{esm2020 → esm2022}/src/commands/IClientToServerCommandInfo.mjs +1 -1
- package/esm2022/src/commands/ServerToClient/AbortCommand.mjs +65 -0
- package/{esm2020 → esm2022}/src/commands/ServerToClient/AddLocateCommand.mjs +21 -21
- package/esm2022/src/commands/ServerToClient/AddRangeCommand.mjs +62 -0
- package/esm2022/src/commands/ServerToClient/AddSortCommand.mjs +33 -0
- package/esm2022/src/commands/ServerToClient/ClientRefreshCommand.mjs +25 -0
- package/esm2022/src/commands/ServerToClient/ClientTargetedCommandBase.mjs +24 -0
- package/esm2022/src/commands/ServerToClient/EnhancedVerifyCommand.mjs +45 -0
- package/esm2022/src/commands/ServerToClient/OpenURLCommand.mjs +221 -0
- package/{esm2020 → esm2022}/src/commands/ServerToClient/ResetLocateCommand.mjs +14 -14
- package/{esm2020 → esm2022}/src/commands/ServerToClient/ResetRangeCommand.mjs +14 -14
- package/{esm2020 → esm2022}/src/commands/ServerToClient/ResetSortCommand.mjs +14 -14
- package/esm2022/src/commands/ServerToClient/ResultCommand.mjs +37 -0
- package/esm2022/src/commands/ServerToClient/VerifyCommand.mjs +83 -0
- package/esm2022/src/commands/ServerToClient/XMLBasedCommandBuilder.mjs +132 -0
- package/{esm2020 → esm2022}/src/communications/IConnectionStateManager.mjs +1 -1
- package/esm2022/src/communications/InteractiveCommunicationsFailureHandler.mjs +15 -0
- package/{esm2020 → esm2022}/src/data/DataSourceIdKey.mjs +2 -2
- package/esm2022/src/data/DataView.mjs +1613 -0
- package/{esm2020 → esm2022}/src/data/DataViewBase.mjs +3 -3
- package/esm2022/src/data/DataviewManager.mjs +28 -0
- package/esm2022/src/data/DataviewManagerBase.mjs +15 -0
- package/esm2022/src/data/DvCache.mjs +67 -0
- package/esm2022/src/data/Field.mjs +646 -0
- package/esm2022/src/data/FieldBase.mjs +15 -0
- package/esm2022/src/data/FieldsTable.mjs +103 -0
- package/{esm2020 → esm2022}/src/data/IRecordsTable.mjs +1 -1
- package/esm2022/src/data/Key.mjs +88 -0
- package/esm2022/src/data/Record.mjs +866 -0
- package/{esm2020 → esm2022}/src/data/RecordOutOfDataViewException.mjs +15 -15
- package/esm2022/src/data/RecordsTable.mjs +267 -0
- package/esm2022/src/data/TaskTransactionManager.mjs +103 -0
- package/esm2022/src/data/XMLBasedDcValuesBuilder.mjs +74 -0
- package/{esm2020 → esm2022}/src/enums.mjs +23 -23
- package/esm2022/src/env/EnvVariablesTable.mjs +340 -0
- package/esm2022/src/env/Environment.mjs +487 -0
- package/{esm2020 → esm2022}/src/env/ILanguageData.mjs +1 -1
- package/esm2022/src/env/LanguageData.mjs +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 +1181 -0
- package/esm2022/src/http/HttpManager.mjs +97 -0
- package/esm2022/src/http/client/HttpClientAsync.mjs +68 -0
- package/esm2022/src/http/client/HttpClientBase.mjs +132 -0
- package/esm2022/src/http/client/HttpClientEvents.mjs +39 -0
- package/esm2022/src/http/client/HttpClientSync.mjs +42 -0
- package/esm2022/src/http/client/HttpUtility.mjs +84 -0
- package/{esm2020 → esm2022}/src/http/client/ICommunicationsFailureHandler.mjs +1 -1
- package/esm2022/src/remote/AddUserLocateRemoteDataViewCommand.mjs +18 -0
- package/esm2022/src/remote/AddUserRangeRemoteDataViewCommand.mjs +18 -0
- package/esm2022/src/remote/AddUserSortRemoteDataViewCommand.mjs +18 -0
- package/esm2022/src/remote/RemoteCommandsProcessor.mjs +882 -0
- package/esm2022/src/remote/RemoteControlItemsRefreshCommand.mjs +25 -0
- package/esm2022/src/remote/RemoteDataViewCommandBase.mjs +24 -0
- package/esm2022/src/remote/RemoteDataViewCommandFactory.mjs +61 -0
- package/{esm2020 → esm2022}/src/remote/RemoteDataViewCommandUpdateNonModifiable.mjs +15 -15
- package/{esm2020 → esm2022}/src/remote/RemoteDataviewManager.mjs +17 -17
- package/{esm2020 → esm2022}/src/remote/RemoteInitDataViewCommand.mjs +10 -10
- package/esm2022/src/remote/ResetUserLocateRemoteDataviewCommand.mjs +17 -0
- package/{esm2020 → esm2022}/src/remote/ResetUserRangeRemoteDataviewCommand.mjs +12 -12
- package/esm2022/src/remote/ResetUserSortRemoteDataviewCommand.mjs +16 -0
- package/esm2022/src/remote/ServerError.mjs +40 -0
- package/esm2022/src/remote/SetTransactionStateRemoteDataViewCommand.mjs +20 -0
- package/esm2022/src/rt/Argument.mjs +265 -0
- package/esm2022/src/rt/ArgumentsList.mjs +103 -0
- package/esm2022/src/rt/Boundary.mjs +152 -0
- package/esm2022/src/rt/CompMainPrgTable.mjs +63 -0
- package/{esm2020 → esm2022}/src/rt/DataviewHeaderBase.mjs +98 -96
- package/{esm2020 → esm2022}/src/rt/DataviewHeaderFactory.mjs +6 -6
- package/esm2022/src/rt/DataviewHeaders.mjs +53 -0
- package/esm2022/src/rt/DataviewHeadersSaxHandler.mjs +38 -0
- package/esm2022/src/rt/ExecutionStack.mjs +94 -0
- package/{esm2020 → esm2022}/src/rt/ExecutionStackEntry.mjs +17 -17
- package/esm2022/src/rt/HandlersTable.mjs +96 -0
- package/{esm2020 → esm2022}/src/rt/IDataSourceViewDefinition.mjs +1 -1
- package/{esm2020 → esm2022}/src/rt/IDataviewHeader.mjs +1 -1
- package/{esm2020 → esm2022}/src/rt/IResultValue.mjs +1 -1
- package/esm2022/src/rt/LastFocusedManager.mjs +65 -0
- package/esm2022/src/rt/Operation.mjs +735 -0
- package/esm2022/src/rt/OperationTable.mjs +67 -0
- package/esm2022/src/rt/Recompute.mjs +355 -0
- package/esm2022/src/rt/RecomputeTable.mjs +63 -0
- package/esm2022/src/rt/RemoteDataviewHeader.mjs +108 -0
- package/esm2022/src/rt/ResultValue.mjs +10 -0
- package/esm2022/src/rt/TableCache.mjs +177 -0
- package/esm2022/src/rt/TableCacheManager.mjs +67 -0
- package/esm2022/src/rt/Transaction.mjs +53 -0
- package/esm2022/src/security/UserDetails.mjs +71 -0
- package/{esm2020 → esm2022}/src/tasks/IMGDataCollection.mjs +1 -1
- package/esm2022/src/tasks/MGData.mjs +552 -0
- package/esm2022/src/tasks/MGDataCollection.mjs +252 -0
- package/esm2022/src/tasks/RCTimer.mjs +63 -0
- package/esm2022/src/tasks/RemoteTaskService.mjs +45 -0
- package/esm2022/src/tasks/Task.mjs +2498 -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 +29750 -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 +34 -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 +93 -93
- package/src/http/HttpManager.d.ts +25 -25
- package/src/http/client/HttpClientAsync.d.ts +16 -16
- package/src/http/client/HttpClientBase.d.ts +30 -30
- package/src/http/client/HttpClientEvents.d.ts +18 -18
- package/src/http/client/HttpClientSync.d.ts +17 -17
- package/src/http/client/HttpUtility.d.ts +10 -10
- package/src/http/client/ICommunicationsFailureHandler.d.ts +5 -5
- package/src/remote/AddUserLocateRemoteDataViewCommand.d.ts +8 -8
- package/src/remote/AddUserRangeRemoteDataViewCommand.d.ts +8 -8
- package/src/remote/AddUserSortRemoteDataViewCommand.d.ts +8 -8
- package/src/remote/RemoteCommandsProcessor.d.ts +51 -51
- package/src/remote/RemoteControlItemsRefreshCommand.d.ts +8 -8
- package/src/remote/RemoteDataViewCommandBase.d.ts +10 -10
- package/src/remote/RemoteDataViewCommandFactory.d.ts +6 -6
- package/src/remote/RemoteDataViewCommandUpdateNonModifiable.d.ts +8 -8
- package/src/remote/RemoteDataviewManager.d.ts +9 -9
- package/src/remote/RemoteInitDataViewCommand.d.ts +7 -7
- package/src/remote/ResetUserLocateRemoteDataviewCommand.d.ts +7 -7
- package/src/remote/ResetUserRangeRemoteDataviewCommand.d.ts +7 -7
- package/src/remote/ResetUserSortRemoteDataviewCommand.d.ts +7 -7
- package/src/remote/ServerError.d.ts +16 -16
- package/src/remote/SetTransactionStateRemoteDataViewCommand.d.ts +8 -8
- package/src/rt/Argument.d.ts +36 -36
- package/src/rt/ArgumentsList.d.ts +24 -24
- package/src/rt/Boundary.d.ts +27 -27
- package/src/rt/CompMainPrgTable.d.ts +10 -10
- package/src/rt/DataviewHeaderBase.d.ts +34 -34
- package/src/rt/DataviewHeaderFactory.d.ts +5 -5
- package/src/rt/DataviewHeaders.d.ts +12 -12
- package/src/rt/DataviewHeadersSaxHandler.d.ts +10 -10
- package/src/rt/ExecutionStack.d.ts +22 -22
- package/src/rt/ExecutionStackEntry.d.ts +7 -7
- package/src/rt/HandlersTable.d.ts +19 -19
- package/src/rt/IDataSourceViewDefinition.d.ts +6 -6
- package/src/rt/IDataviewHeader.d.ts +10 -10
- package/src/rt/IResultValue.d.ts +4 -4
- package/src/rt/LastFocusedManager.d.ts +23 -23
- package/src/rt/Operation.d.ts +97 -97
- package/src/rt/OperationTable.d.ts +15 -15
- package/src/rt/Recompute.d.ts +41 -41
- package/src/rt/RecomputeTable.d.ts +9 -9
- package/src/rt/RemoteDataviewHeader.d.ts +14 -14
- package/src/rt/ResultValue.d.ts +7 -7
- package/src/rt/TableCache.d.ts +29 -29
- package/src/rt/TableCacheManager.d.ts +10 -10
- package/src/rt/Transaction.d.ts +23 -23
- package/src/security/UserDetails.d.ts +16 -16
- package/src/tasks/IMGDataCollection.d.ts +26 -26
- package/src/tasks/MGData.d.ts +63 -63
- package/src/tasks/MGDataCollection.d.ts +42 -42
- package/src/tasks/RCTimer.d.ts +13 -13
- package/src/tasks/RemoteTaskService.d.ts +16 -16
- package/src/tasks/Task.d.ts +312 -312
- package/src/tasks/TaskBase.d.ts +123 -123
- package/src/tasks/TaskServiceBase.d.ts +16 -16
- package/src/tasks/TasksTable.d.ts +21 -21
- package/src/tasks/sort/Sort.d.ts +4 -4
- package/src/tasks/sort/SortCollection.d.ts +11 -11
- package/src/util/ConstUtils.d.ts +3 -3
- package/src/util/FlowMonitorQueue.d.ts +70 -70
- package/src/util/HeapSort.d.ts +6 -6
- package/src/util/IMirrorXML.d.ts +6 -6
- package/src/util/IServerConfig.d.ts +11 -11
- package/src/util/MgBlockingQueue.d.ts +5 -5
- package/src/util/MgPriorityBlockingQueue.d.ts +17 -17
- package/src/util/MgPriorityQueue.d.ts +13 -13
- package/src/util/ParamParseResult.d.ts +6 -6
- package/src/util/PrmMap.d.ts +28 -28
- package/src/util/ReturnResult.d.ts +18 -18
- package/src/util/ReturnResultBase.d.ts +11 -11
- package/src/util/Scrambler.d.ts +10 -10
- package/src/util/UniqueIDUtils.d.ts +4 -4
- package/src/util/cookie.service.d.ts +8 -8
- package/esm2020/src/AccessHelper.mjs +0 -9
- package/esm2020/src/ClientManager.mjs +0 -399
- package/esm2020/src/CommandsProcessorBase.mjs +0 -58
- package/esm2020/src/CommandsProcessorManager.mjs +0 -26
- package/esm2020/src/CommandsTable.mjs +0 -162
- package/esm2020/src/ConstInterface.mjs +0 -516
- package/esm2020/src/FlowMonitorInterface.mjs +0 -16
- package/esm2020/src/GUIManager.mjs +0 -62
- package/esm2020/src/GlobalCommandsManager.mjs +0 -34
- package/esm2020/src/GuiEventsProcessor.mjs +0 -154
- package/esm2020/src/ServerConfig.mjs +0 -117
- package/esm2020/src/commands/ClientOriginatedCommandTaskTag.mjs +0 -11
- package/esm2020/src/commands/ClientToServer/ClientOriginatedCommandSerializer.mjs +0 -60
- package/esm2020/src/commands/ClientToServer/CommandFactory.mjs +0 -260
- package/esm2020/src/commands/ClientToServer/CommandSerializationHelper.mjs +0 -69
- package/esm2020/src/commands/ClientToServer/DataViewOutputCommand.mjs +0 -13
- package/esm2020/src/commands/ClientToServer/EvaluateCommand.mjs +0 -36
- package/esm2020/src/commands/ClientToServer/EventCommand.mjs +0 -40
- package/esm2020/src/commands/ClientToServer/ExecOperCommand.mjs +0 -67
- package/esm2020/src/commands/ClientToServer/FetchDataControlValuesEventCommand.mjs +0 -22
- package/esm2020/src/commands/ClientToServer/IniputForceWriteCommand.mjs +0 -23
- package/esm2020/src/commands/ClientToServer/RecomputeCommand.mjs +0 -27
- package/esm2020/src/commands/ClientToServer/RefreshEventCommand.mjs +0 -27
- package/esm2020/src/commands/ClientToServer/RefreshScreenEventCommand.mjs +0 -24
- package/esm2020/src/commands/ClientToServer/RollbackEventCommand.mjs +0 -39
- package/esm2020/src/commands/ClientToServer/SubformRefreshEventCommand.mjs +0 -24
- package/esm2020/src/commands/ClientToServer/TransactionCommand.mjs +0 -28
- package/esm2020/src/commands/ClientToServer/WriteMessageToServerLogCommand.mjs +0 -18
- package/esm2020/src/commands/DataViewCommandBase.mjs +0 -10
- package/esm2020/src/commands/IClientTargetedCommand.mjs +0 -9
- package/esm2020/src/commands/ServerToClient/AbortCommand.mjs +0 -65
- package/esm2020/src/commands/ServerToClient/AddRangeCommand.mjs +0 -62
- package/esm2020/src/commands/ServerToClient/AddSortCommand.mjs +0 -33
- package/esm2020/src/commands/ServerToClient/ClientRefreshCommand.mjs +0 -25
- package/esm2020/src/commands/ServerToClient/ClientTargetedCommandBase.mjs +0 -27
- package/esm2020/src/commands/ServerToClient/EnhancedVerifyCommand.mjs +0 -45
- package/esm2020/src/commands/ServerToClient/OpenURLCommand.mjs +0 -221
- package/esm2020/src/commands/ServerToClient/ResultCommand.mjs +0 -37
- package/esm2020/src/commands/ServerToClient/VerifyCommand.mjs +0 -83
- package/esm2020/src/commands/ServerToClient/XMLBasedCommandBuilder.mjs +0 -132
- package/esm2020/src/communications/InteractiveCommunicationsFailureHandler.mjs +0 -17
- package/esm2020/src/data/DataView.mjs +0 -1610
- package/esm2020/src/data/DataviewManager.mjs +0 -28
- package/esm2020/src/data/DataviewManagerBase.mjs +0 -15
- package/esm2020/src/data/DvCache.mjs +0 -67
- package/esm2020/src/data/Field.mjs +0 -646
- package/esm2020/src/data/FieldBase.mjs +0 -18
- package/esm2020/src/data/FieldsTable.mjs +0 -103
- package/esm2020/src/data/Key.mjs +0 -88
- package/esm2020/src/data/Record.mjs +0 -846
- package/esm2020/src/data/RecordsTable.mjs +0 -267
- package/esm2020/src/data/TaskTransactionManager.mjs +0 -103
- package/esm2020/src/data/XMLBasedDcValuesBuilder.mjs +0 -74
- package/esm2020/src/env/EnvVariablesTable.mjs +0 -340
- package/esm2020/src/env/Environment.mjs +0 -489
- package/esm2020/src/env/LanguageData.mjs +0 -226
- package/esm2020/src/env/MirrorString.mjs +0 -65
- package/esm2020/src/event/ActionManager.mjs +0 -91
- package/esm2020/src/event/Event.mjs +0 -1333
- package/esm2020/src/event/EventHandler.mjs +0 -766
- package/esm2020/src/event/EventHandlerPosition.mjs +0 -204
- package/esm2020/src/event/EventsManager.mjs +0 -2975
- package/esm2020/src/event/RunTimeEvent.mjs +0 -392
- package/esm2020/src/event/UserEventsTable.mjs +0 -47
- package/esm2020/src/exp/ExpTable.mjs +0 -59
- package/esm2020/src/exp/Expression.mjs +0 -200
- package/esm2020/src/exp/ExpressionDict.mjs +0 -727
- package/esm2020/src/exp/ExpressionEvaluator.mjs +0 -4212
- package/esm2020/src/exp/ExpressionLocalJpn.mjs +0 -314
- package/esm2020/src/exp/GlobalParamsTable.mjs +0 -85
- package/esm2020/src/exp/YesNoExp.mjs +0 -36
- package/esm2020/src/gui/CreatedFormVector.mjs +0 -23
- package/esm2020/src/gui/FormsTable.mjs +0 -66
- package/esm2020/src/gui/MgControl.mjs +0 -353
- package/esm2020/src/gui/MgForm.mjs +0 -1181
- package/esm2020/src/http/HttpManager.mjs +0 -97
- package/esm2020/src/http/client/HttpClientAsync.mjs +0 -67
- package/esm2020/src/http/client/HttpClientBase.mjs +0 -132
- package/esm2020/src/http/client/HttpClientEvents.mjs +0 -39
- package/esm2020/src/http/client/HttpClientSync.mjs +0 -42
- package/esm2020/src/http/client/HttpUtility.mjs +0 -84
- package/esm2020/src/remote/AddUserLocateRemoteDataViewCommand.mjs +0 -18
- package/esm2020/src/remote/AddUserRangeRemoteDataViewCommand.mjs +0 -18
- package/esm2020/src/remote/AddUserSortRemoteDataViewCommand.mjs +0 -18
- package/esm2020/src/remote/RemoteCommandsProcessor.mjs +0 -880
- package/esm2020/src/remote/RemoteControlItemsRefreshCommand.mjs +0 -25
- package/esm2020/src/remote/RemoteDataViewCommandBase.mjs +0 -24
- package/esm2020/src/remote/RemoteDataViewCommandFactory.mjs +0 -61
- package/esm2020/src/remote/ResetUserLocateRemoteDataviewCommand.mjs +0 -17
- package/esm2020/src/remote/ResetUserSortRemoteDataviewCommand.mjs +0 -16
- package/esm2020/src/remote/ServerError.mjs +0 -40
- package/esm2020/src/remote/SetTransactionStateRemoteDataViewCommand.mjs +0 -20
- package/esm2020/src/rt/Argument.mjs +0 -265
- package/esm2020/src/rt/ArgumentsList.mjs +0 -103
- package/esm2020/src/rt/Boundary.mjs +0 -152
- package/esm2020/src/rt/CompMainPrgTable.mjs +0 -65
- package/esm2020/src/rt/DataviewHeaders.mjs +0 -53
- package/esm2020/src/rt/DataviewHeadersSaxHandler.mjs +0 -38
- package/esm2020/src/rt/ExecutionStack.mjs +0 -94
- package/esm2020/src/rt/HandlersTable.mjs +0 -96
- package/esm2020/src/rt/LastFocusedManager.mjs +0 -67
- package/esm2020/src/rt/Operation.mjs +0 -735
- package/esm2020/src/rt/OperationTable.mjs +0 -67
- package/esm2020/src/rt/Recompute.mjs +0 -355
- package/esm2020/src/rt/RecomputeTable.mjs +0 -63
- package/esm2020/src/rt/RemoteDataviewHeader.mjs +0 -108
- package/esm2020/src/rt/ResultValue.mjs +0 -12
- package/esm2020/src/rt/TableCache.mjs +0 -177
- package/esm2020/src/rt/TableCacheManager.mjs +0 -67
- package/esm2020/src/rt/Transaction.mjs +0 -53
- package/esm2020/src/security/UserDetails.mjs +0 -71
- package/esm2020/src/tasks/MGData.mjs +0 -552
- package/esm2020/src/tasks/MGDataCollection.mjs +0 -252
- package/esm2020/src/tasks/RCTimer.mjs +0 -63
- package/esm2020/src/tasks/RemoteTaskService.mjs +0 -45
- package/esm2020/src/tasks/Task.mjs +0 -2495
- package/esm2020/src/tasks/TaskBase.mjs +0 -87
- package/esm2020/src/tasks/TaskServiceBase.mjs +0 -25
- package/esm2020/src/tasks/TasksTable.mjs +0 -80
- package/esm2020/src/tasks/sort/Sort.mjs +0 -7
- package/esm2020/src/tasks/sort/SortCollection.mjs +0 -67
- package/esm2020/src/util/ConstUtils.mjs +0 -14
- package/esm2020/src/util/FlowMonitorQueue.mjs +0 -453
- package/esm2020/src/util/HeapSort.mjs +0 -70
- package/esm2020/src/util/MgPriorityBlockingQueue.mjs +0 -74
- package/esm2020/src/util/MgPriorityQueue.mjs +0 -66
- package/esm2020/src/util/PrmMap.mjs +0 -151
- package/esm2020/src/util/ReturnResult.mjs +0 -46
- package/esm2020/src/util/ReturnResultBase.mjs +0 -18
- package/esm2020/src/util/Scrambler.mjs +0 -89
- package/esm2020/src/util/UniqueIDUtils.mjs +0 -12
- package/esm2020/src/util/cookie.service.mjs +0 -92
- package/fesm2015/magic-xpa-engine.mjs +0 -30835
- package/fesm2015/magic-xpa-engine.mjs.map +0 -1
- package/fesm2020/magic-xpa-engine.mjs.map +0 -1
@@ -1,252 +0,0 @@
|
|
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
|
-
constructor() {
|
12
|
-
this._mgDataTab = new List();
|
13
|
-
this._iteratorMgdIdx = 0;
|
14
|
-
this._iteratorTaskIdx = 0;
|
15
|
-
this.currMgdID = 0;
|
16
|
-
this.StartupMgData = null;
|
17
|
-
this._lastRouteSentToServer = "";
|
18
|
-
}
|
19
|
-
GetTaskByID(id) {
|
20
|
-
let task = null;
|
21
|
-
for (let i = 0; i < this.getSize() && task == null; i++) {
|
22
|
-
let mgd = this.getMGData(i);
|
23
|
-
if (mgd == null)
|
24
|
-
continue;
|
25
|
-
task = mgd.getTask(id);
|
26
|
-
}
|
27
|
-
return task;
|
28
|
-
}
|
29
|
-
static get Instance() {
|
30
|
-
if (MGDataCollection._instance == null) {
|
31
|
-
if (MGDataCollection._instance == null)
|
32
|
-
MGDataCollection._instance = new MGDataCollection();
|
33
|
-
}
|
34
|
-
return MGDataCollection._instance;
|
35
|
-
}
|
36
|
-
async addMGData(mgd, idx, isStartup) {
|
37
|
-
if (idx < 0 || idx > this.getSize())
|
38
|
-
throw new ApplicationException("Illegal MGData requested");
|
39
|
-
if (isStartup)
|
40
|
-
this.StartupMgData = mgd;
|
41
|
-
if (idx === this.getSize())
|
42
|
-
this._mgDataTab.push(mgd);
|
43
|
-
else {
|
44
|
-
let oldMgd = this.getMGData(idx);
|
45
|
-
if (oldMgd != null && !oldMgd.IsAborting) {
|
46
|
-
await oldMgd.getFirstTask().stop();
|
47
|
-
oldMgd.abort();
|
48
|
-
}
|
49
|
-
this._mgDataTab.set_Item(idx, mgd);
|
50
|
-
}
|
51
|
-
}
|
52
|
-
getMGData(idx) {
|
53
|
-
let mgd = null;
|
54
|
-
if (idx >= 0 && idx < this.getSize()) {
|
55
|
-
mgd = this._mgDataTab.get_Item(idx);
|
56
|
-
}
|
57
|
-
return mgd;
|
58
|
-
}
|
59
|
-
getAvailableIdx() {
|
60
|
-
let i;
|
61
|
-
for (i = 0; i < this._mgDataTab.length; i = i + 1) {
|
62
|
-
if (this._mgDataTab.get_Item(i) === null)
|
63
|
-
break;
|
64
|
-
}
|
65
|
-
return i;
|
66
|
-
}
|
67
|
-
getMgDataIdx(mgd) {
|
68
|
-
return this._mgDataTab.indexOf(mgd);
|
69
|
-
}
|
70
|
-
deleteMGDataTree(index) {
|
71
|
-
let mgd, childMgd;
|
72
|
-
let i;
|
73
|
-
if (index < 0 || index >= this.getSize())
|
74
|
-
throw new ApplicationException("in deleteMGData() illegal index: " + index);
|
75
|
-
mgd = this.getMGData(index);
|
76
|
-
if (mgd != null) {
|
77
|
-
if (index > 0 && mgd.getParentMGdata() != null) {
|
78
|
-
this._mgDataTab.set_Item(index, null);
|
79
|
-
}
|
80
|
-
LastFocusedManager.Instance.clean(index);
|
81
|
-
for (i = 0; i < this.getSize(); i++) {
|
82
|
-
childMgd = this.getMGData(i);
|
83
|
-
if (childMgd != null && childMgd.getParentMGdata() === mgd)
|
84
|
-
this.deleteMGDataTree(i);
|
85
|
-
}
|
86
|
-
}
|
87
|
-
}
|
88
|
-
getCurrMGData() {
|
89
|
-
return this.getMGData(this.currMgdID);
|
90
|
-
}
|
91
|
-
GetMainProgByCtlIdx(contextIDOrCtlIdx, ctlIdx) {
|
92
|
-
if (arguments.length === 2)
|
93
|
-
return this.GetMainProgByCtlIdx_0(ctlIdx);
|
94
|
-
else
|
95
|
-
return this.GetMainProgByCtlIdx_1(contextIDOrCtlIdx);
|
96
|
-
}
|
97
|
-
GetMainProgByCtlIdx_0(ctlIdx) {
|
98
|
-
let task = null;
|
99
|
-
for (let i = 0; i < this.getSize() && task == null; i++) {
|
100
|
-
let mgd = this.getMGData(i);
|
101
|
-
if (mgd == null)
|
102
|
-
continue;
|
103
|
-
task = mgd.getMainProg(ctlIdx);
|
104
|
-
}
|
105
|
-
return task;
|
106
|
-
}
|
107
|
-
GetMainProgByCtlIdx_1(ctlIdx) {
|
108
|
-
return this.GetMainProgByCtlIdx(-1, ctlIdx);
|
109
|
-
}
|
110
|
-
startTasksIteration() {
|
111
|
-
this._iteratorMgdIdx = 0;
|
112
|
-
this._iteratorTaskIdx = 0;
|
113
|
-
}
|
114
|
-
getNextTask() {
|
115
|
-
let task;
|
116
|
-
let mgd = this.getMGData(this._iteratorMgdIdx);
|
117
|
-
if (mgd == null)
|
118
|
-
return null;
|
119
|
-
task = mgd.getTask(this._iteratorTaskIdx);
|
120
|
-
if (task == null) {
|
121
|
-
do {
|
122
|
-
this._iteratorMgdIdx++;
|
123
|
-
} while (this._iteratorMgdIdx < this.getSize() && this.getMGData(this._iteratorMgdIdx) == null);
|
124
|
-
this._iteratorTaskIdx = 0;
|
125
|
-
return this.getNextTask();
|
126
|
-
}
|
127
|
-
this._iteratorTaskIdx++;
|
128
|
-
return task;
|
129
|
-
}
|
130
|
-
async buildXML(message, serializeTasks) {
|
131
|
-
let lastRoute = Commands.getLastRoute();
|
132
|
-
if (lastRoute !== this._lastRouteSentToServer) {
|
133
|
-
message.Append(XMLConstants.START_TAG + ConstInterface.MG_TAG_LAST_ROUTE);
|
134
|
-
message.Append(" " + ConstInterface.MG_ATTR_ENV_VALUE + "=\"" + lastRoute + "\"");
|
135
|
-
message.Append(XMLConstants.TAG_TERM);
|
136
|
-
this._lastRouteSentToServer = lastRoute;
|
137
|
-
}
|
138
|
-
for (let i = 0; i < this.getSize(); i = i + 1) {
|
139
|
-
let mgd = this.getMGData(i);
|
140
|
-
if (mgd !== null && !mgd.IsAborting) {
|
141
|
-
await mgd.buildXML(message, serializeTasks);
|
142
|
-
}
|
143
|
-
}
|
144
|
-
FlowMonitorQueue.Instance.buildXML(message);
|
145
|
-
}
|
146
|
-
getSize() {
|
147
|
-
return this._mgDataTab.length;
|
148
|
-
}
|
149
|
-
async processRecovery() {
|
150
|
-
for (let i = 0; i < this.getSize(); i = i + 1) {
|
151
|
-
let mgd = this.getMGData(i);
|
152
|
-
if (mgd !== null) {
|
153
|
-
for (let j = 0; j < mgd.getTasksCount(); j = j + 1) {
|
154
|
-
let task = mgd.getTask(j);
|
155
|
-
if (task !== null)
|
156
|
-
await task.DataView.processRecovery();
|
157
|
-
}
|
158
|
-
}
|
159
|
-
}
|
160
|
-
}
|
161
|
-
getTriggeredTasks(triggeringTask) {
|
162
|
-
let list = new List();
|
163
|
-
let task;
|
164
|
-
let tag = triggeringTask.getTaskTag();
|
165
|
-
this.startTasksIteration();
|
166
|
-
while ((task = this.getNextTask()) !== null) {
|
167
|
-
if (tag === task.PreviouslyActiveTaskId)
|
168
|
-
list.push(task);
|
169
|
-
}
|
170
|
-
return list;
|
171
|
-
}
|
172
|
-
GetTasks(p) {
|
173
|
-
let taskList = new List();
|
174
|
-
this._mgDataTab.forEach(mgd => {
|
175
|
-
if (mgd !== null && !mgd.IsAborting) {
|
176
|
-
for (let i = 0; i < mgd.getTasksCount(); i = i + 1) {
|
177
|
-
let task = mgd.getTask(i);
|
178
|
-
if (task !== null && p(task)) {
|
179
|
-
taskList.push(task);
|
180
|
-
}
|
181
|
-
}
|
182
|
-
}
|
183
|
-
});
|
184
|
-
return taskList;
|
185
|
-
}
|
186
|
-
getTaskIdById(taskId) {
|
187
|
-
let task = this.GetTaskByID(taskId);
|
188
|
-
let tag = taskId;
|
189
|
-
if (task != null)
|
190
|
-
tag = task.getTaskTag();
|
191
|
-
return tag;
|
192
|
-
}
|
193
|
-
GetTopMostForms() {
|
194
|
-
let task;
|
195
|
-
let forms = new List();
|
196
|
-
this.startTasksIteration();
|
197
|
-
while ((task = this.getNextTask()) != null) {
|
198
|
-
let form = task.getForm();
|
199
|
-
if (!task.isAborting() && form != null && !form.isSubForm())
|
200
|
-
forms.push(form);
|
201
|
-
}
|
202
|
-
return forms;
|
203
|
-
}
|
204
|
-
GetMGDataForStartupProgram() {
|
205
|
-
Debug.Assert(this._mgDataTab.length > 0, "The main program must be processed before invoking this method.");
|
206
|
-
let mainProgByCtlIdx = this.GetMainProgByCtlIdx(0);
|
207
|
-
Debug.Assert(mainProgByCtlIdx !== null, "The main program must be processed before invoking this method.");
|
208
|
-
Debug.Assert(mainProgByCtlIdx.getMgdID() === 0, "Main program is expected to be on MGData 0. Is this an error?");
|
209
|
-
return this._mgDataTab.get_Item(0);
|
210
|
-
}
|
211
|
-
async execRequestWithSubformRecordCycle(cmdsToServer, cmdToServer, exp) {
|
212
|
-
this.cleanDoSubformPrefixSuffix();
|
213
|
-
cmdsToServer.Add(cmdToServer);
|
214
|
-
if (!(MGDataCollection.Instance.StartupMgData.getFirstTask().InEndTask && MGDataCollection.Instance.StartupMgData.getFirstTask().ClosingFormUI))
|
215
|
-
await CommandsProcessorManager.GetCommandsProcessor().Execute(CommandsProcessorBase_SendingInstruction.TASKS_AND_COMMANDS, CommandsProcessorBase_SessionStage.NORMAL, exp);
|
216
|
-
await this.execAllSubformRecordCycle();
|
217
|
-
}
|
218
|
-
cleanDoSubformPrefixSuffix() {
|
219
|
-
for (let i = 0; i < this.getSize(); i++) {
|
220
|
-
let mgd = this.getMGData(i);
|
221
|
-
if (mgd === null || mgd.IsAborting)
|
222
|
-
continue;
|
223
|
-
let tasksCount = mgd.getTasksCount();
|
224
|
-
for (let j = 0; j < tasksCount; j++) {
|
225
|
-
let task = mgd.getTask(j);
|
226
|
-
task.DoSubformPrefixSuffix = false;
|
227
|
-
}
|
228
|
-
}
|
229
|
-
}
|
230
|
-
async execAllSubformRecordCycle() {
|
231
|
-
for (let i = 0; i < this.getSize(); i = i + 1) {
|
232
|
-
let mgd = this.getMGData(i);
|
233
|
-
if (mgd === null || mgd.IsAborting)
|
234
|
-
continue;
|
235
|
-
let tasksCount = mgd.getTasksCount();
|
236
|
-
for (let j = 0; j < tasksCount; j = j + 1) {
|
237
|
-
let task = mgd.getTask(j);
|
238
|
-
if (task.IsSubForm && task.DoSubformPrefixSuffix) {
|
239
|
-
task.PerformParentRecordPrefix = false;
|
240
|
-
AccessHelper.eventsManager.pushNewExecStacks();
|
241
|
-
await AccessHelper.eventsManager.handleInternalEventWithTaskAndSubformRefresh(task, InternalInterface.MG_ACT_REC_PREFIX, true);
|
242
|
-
if (!AccessHelper.eventsManager.GetStopExecutionFlag())
|
243
|
-
await AccessHelper.eventsManager.handleInternalEventWithTask(task, InternalInterface.MG_ACT_REC_SUFFIX);
|
244
|
-
AccessHelper.eventsManager.popNewExecStacks();
|
245
|
-
task.PerformParentRecordPrefix = true;
|
246
|
-
}
|
247
|
-
}
|
248
|
-
}
|
249
|
-
}
|
250
|
-
}
|
251
|
-
MGDataCollection._instance = null;
|
252
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiTUdEYXRhQ29sbGVjdGlvbi5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uL3Byb2plY3RzL2VuZ2luZS9zcmMvdGFza3MvTUdEYXRhQ29sbGVjdGlvbi50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUF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3V0aW9uRmxhZygpKVxyXG4gICAgICAgICAgICBhd2FpdCBBY2Nlc3NIZWxwZXIuZXZlbnRzTWFuYWdlci5oYW5kbGVJbnRlcm5hbEV2ZW50V2l0aFRhc2sodGFzaywgSW50ZXJuYWxJbnRlcmZhY2UuTUdfQUNUX1JFQ19TVUZGSVgpO1xyXG5cclxuICAgICAgICAgIEFjY2Vzc0hlbHBlci5ldmVudHNNYW5hZ2VyLnBvcE5ld0V4ZWNTdGFja3MoKTtcclxuICAgICAgICAgIHRhc2suUGVyZm9ybVBhcmVudFJlY29yZFByZWZpeCA9IHRydWU7XHJcbiAgICAgICAgfVxyXG4gICAgICB9XHJcbiAgICB9XHJcbiAgfVxyXG5cclxufVxyXG4iXX0=
|
@@ -1,63 +0,0 @@
|
|
1
|
-
import { Dictionary, List } from '@magic-xpa/mscorelib';
|
2
|
-
import { MgTimer } from '@magic-xpa/gui';
|
3
|
-
class TimerObjectCollection {
|
4
|
-
}
|
5
|
-
TimerObjectCollection.MgDataToTimerObjList = new Dictionary();
|
6
|
-
export class RCTimer extends MgTimer {
|
7
|
-
get TimerIntervalMiliSeconds() {
|
8
|
-
return this._timerIntervalMilliSeconds;
|
9
|
-
}
|
10
|
-
set IsIdleTimer(value) {
|
11
|
-
this._isIdle = value;
|
12
|
-
}
|
13
|
-
get IsIdleTimer() {
|
14
|
-
return this._isIdle;
|
15
|
-
}
|
16
|
-
constructor(mgData, milliseconds, isIdle) {
|
17
|
-
super(milliseconds);
|
18
|
-
this._mgData = null;
|
19
|
-
this._isIdle = false;
|
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,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiUkNUaW1lci5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uL3Byb2plY3RzL2VuZ2luZS9zcmMvdGFza3MvUkNUaW1lci50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEV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TGlzdC5SZW1vdmUobWdEYXRhSWQpO1xyXG4gICAgfVxyXG4gIH1cclxufVxyXG4iXX0=
|
@@ -1,45 +0,0 @@
|
|
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.Successful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