@magic-xpa/engine 4.1100.0-dev4110.99 → 4.1101.0-dev4111.271
Sign up to get free protection for your applications and to get access to all the features.
- package/README.md +7 -7
- 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 +421 -0
- package/esm2022/src/CommandsProcessorBase.mjs +56 -0
- package/{esm2020 → esm2022}/src/CommandsProcessorManager.mjs +25 -25
- package/esm2022/src/CommandsTable.mjs +162 -0
- package/esm2022/src/ConstInterface.mjs +517 -0
- package/{esm2020 → esm2022}/src/CurrentClientVersion.mjs +2 -2
- package/esm2022/src/FlowMonitorInterface.mjs +16 -0
- package/esm2022/src/GUIManager.mjs +62 -0
- package/esm2022/src/GlobalCommandsManager.mjs +34 -0
- package/esm2022/src/GuiEventsProcessor.mjs +156 -0
- package/{esm2020 → esm2022}/src/ICommandsTable.mjs +1 -1
- package/esm2022/src/ServerConfig.mjs +122 -0
- package/{esm2020 → esm2022}/src/bridge/IGuiEvent.mjs +19 -19
- package/esm2022/src/bridge/MagicBridge.mjs +41 -0
- package/esm2022/src/commands/ClientOriginatedCommandTaskTag.mjs +12 -0
- package/{esm2020 → esm2022}/src/commands/ClientToServer/AddUserLocateDataViewCommand.mjs +8 -8
- package/{esm2020 → esm2022}/src/commands/ClientToServer/AddUserRangeDataviewCommand.mjs +9 -9
- package/{esm2020 → esm2022}/src/commands/ClientToServer/AddUserSortDataViewCommand.mjs +9 -9
- package/esm2022/src/commands/ClientToServer/BrowserEscEventCommand.mjs +26 -0
- package/{esm2020 → esm2022}/src/commands/ClientToServer/ClientOriginatedCommand.mjs +14 -14
- package/{esm2020 → esm2022}/src/commands/ClientToServer/ClientOriginatedCommandSerializer.mjs +59 -59
- package/esm2022/src/commands/ClientToServer/ColumnSortEventCommand.mjs +29 -0
- package/esm2022/src/commands/ClientToServer/CommandFactory.mjs +261 -0
- package/esm2022/src/commands/ClientToServer/CommandSerializationHelper.mjs +67 -0
- package/esm2022/src/commands/ClientToServer/ComputeEventCommand.mjs +26 -0
- package/{esm2020 → esm2022}/src/commands/ClientToServer/ContextTerminationEventCommand.mjs +24 -21
- package/{esm2020 → esm2022}/src/commands/ClientToServer/ContextTimeoutResetCommand.mjs +23 -20
- package/{esm2020 → esm2022}/src/commands/ClientToServer/ControlItemsRefreshCommand.mjs +8 -8
- package/esm2022/src/commands/ClientToServer/DataViewOutputCommand.mjs +13 -0
- package/{esm2020 → esm2022}/src/commands/ClientToServer/DataviewCommand.mjs +44 -44
- package/esm2022/src/commands/ClientToServer/EvaluateCommand.mjs +40 -0
- package/{esm2020 → esm2022}/src/commands/ClientToServer/EventCommand.mjs +43 -40
- package/esm2022/src/commands/ClientToServer/ExecOperCommand.mjs +70 -0
- package/esm2022/src/commands/ClientToServer/FetchDataControlValuesEventCommand.mjs +25 -0
- package/{esm2020 → esm2022}/src/commands/ClientToServer/GlobalParamsQueryCommand.mjs +10 -10
- package/{esm2020 → esm2022}/src/commands/ClientToServer/ICommandTaskTag.mjs +1 -1
- package/esm2022/src/commands/ClientToServer/IndexChangeEventCommand.mjs +24 -0
- package/esm2022/src/commands/ClientToServer/IniputForceWriteCommand.mjs +26 -0
- package/{esm2020 → esm2022}/src/commands/ClientToServer/NonReversibleExitEventCommand.mjs +26 -23
- package/{esm2020 → esm2022}/src/commands/ClientToServer/QueryCommand.mjs +20 -20
- package/esm2022/src/commands/ClientToServer/RecomputeCommand.mjs +30 -0
- package/esm2022/src/commands/ClientToServer/RefreshEventCommand.mjs +30 -0
- package/esm2022/src/commands/ClientToServer/RefreshScreenEventCommand.mjs +27 -0
- package/esm2022/src/commands/ClientToServer/RollbackEventCommand.mjs +43 -0
- package/esm2022/src/commands/ClientToServer/SelectProgramCommand.mjs +19 -0
- package/{esm2020 → esm2022}/src/commands/ClientToServer/SetTransactionStateDataviewCommand.mjs +9 -9
- package/esm2022/src/commands/ClientToServer/SubformOpenEventCommand.mjs +24 -0
- package/esm2022/src/commands/ClientToServer/SubformRefreshEventCommand.mjs +27 -0
- package/esm2022/src/commands/ClientToServer/TransactionCommand.mjs +34 -0
- package/{esm2020 → esm2022}/src/commands/ClientToServer/UnloadCommand.mjs +18 -15
- package/esm2022/src/commands/ClientToServer/WriteMessageToServerLogCommand.mjs +18 -0
- package/esm2022/src/commands/DataViewCommandBase.mjs +8 -0
- package/{esm2020 → esm2022}/src/commands/IClientCommand.mjs +1 -1
- package/esm2022/src/commands/IClientTargetedCommand.mjs +13 -0
- package/{esm2020 → esm2022}/src/commands/IClientToServerCommandInfo.mjs +2 -2
- package/esm2022/src/commands/ServerToClient/AbortCommand.mjs +65 -0
- package/{esm2020 → esm2022}/src/commands/ServerToClient/AddLocateCommand.mjs +21 -21
- package/{esm2020 → esm2022}/src/commands/ServerToClient/AddRangeCommand.mjs +62 -62
- package/{esm2020 → esm2022}/src/commands/ServerToClient/AddSortCommand.mjs +33 -33
- package/esm2022/src/commands/ServerToClient/ClientRefreshCommand.mjs +25 -0
- package/esm2022/src/commands/ServerToClient/ClientTargetedCommandBase.mjs +24 -0
- package/esm2022/src/commands/ServerToClient/EnhancedVerifyCommand.mjs +45 -0
- package/esm2022/src/commands/ServerToClient/OpenURLCommand.mjs +221 -0
- package/{esm2020 → esm2022}/src/commands/ServerToClient/ResetLocateCommand.mjs +14 -14
- package/{esm2020 → esm2022}/src/commands/ServerToClient/ResetRangeCommand.mjs +14 -14
- package/{esm2020 → esm2022}/src/commands/ServerToClient/ResetSortCommand.mjs +14 -14
- package/esm2022/src/commands/ServerToClient/ResultCommand.mjs +37 -0
- package/esm2022/src/commands/ServerToClient/VerifyCommand.mjs +83 -0
- package/{esm2020 → esm2022}/src/commands/ServerToClient/XMLBasedCommandBuilder.mjs +132 -132
- package/{esm2020 → esm2022}/src/communications/IConnectionStateManager.mjs +1 -1
- package/esm2022/src/communications/InteractiveCommunicationsFailureHandler.mjs +15 -0
- package/{esm2020 → esm2022}/src/data/DataSourceIdKey.mjs +2 -2
- package/esm2022/src/data/DataView.mjs +1613 -0
- package/{esm2020 → esm2022}/src/data/DataViewBase.mjs +3 -3
- package/esm2022/src/data/DataviewManager.mjs +28 -0
- package/esm2022/src/data/DataviewManagerBase.mjs +15 -0
- package/esm2022/src/data/DvCache.mjs +67 -0
- package/esm2022/src/data/Field.mjs +646 -0
- package/esm2022/src/data/FieldBase.mjs +15 -0
- package/esm2022/src/data/FieldsTable.mjs +103 -0
- package/{esm2020 → esm2022}/src/data/IRecordsTable.mjs +1 -1
- package/{esm2020 → esm2022}/src/data/Key.mjs +88 -88
- package/esm2022/src/data/Record.mjs +880 -0
- package/{esm2020 → esm2022}/src/data/RecordOutOfDataViewException.mjs +15 -15
- package/esm2022/src/data/RecordsTable.mjs +267 -0
- package/{esm2020 → esm2022}/src/data/TaskTransactionManager.mjs +107 -103
- package/{esm2020 → esm2022}/src/data/XMLBasedDcValuesBuilder.mjs +74 -74
- package/{esm2020 → esm2022}/src/enums.mjs +23 -23
- package/esm2022/src/env/EnvVariablesTable.mjs +340 -0
- package/esm2022/src/env/Environment.mjs +487 -0
- package/{esm2020 → esm2022}/src/env/ILanguageData.mjs +1 -1
- package/esm2022/src/env/LanguageData.mjs +227 -0
- package/{esm2020 → esm2022}/src/env/MirrorString.mjs +65 -65
- package/esm2022/src/event/ActionManager.mjs +91 -0
- package/esm2022/src/event/Event.mjs +1333 -0
- package/esm2022/src/event/EventHandler.mjs +766 -0
- package/esm2022/src/event/EventHandlerPosition.mjs +204 -0
- package/esm2022/src/event/EventsManager.mjs +2988 -0
- package/{esm2020 → esm2022}/src/event/IEventsManager.mjs +6 -6
- package/esm2022/src/event/RunTimeEvent.mjs +399 -0
- package/{esm2020 → esm2022}/src/event/RunTimeEventBase.mjs +3 -3
- package/esm2022/src/event/UserEventsTable.mjs +47 -0
- package/esm2022/src/exp/ExpTable.mjs +57 -0
- package/esm2022/src/exp/Expression.mjs +200 -0
- package/esm2022/src/exp/ExpressionDict.mjs +727 -0
- package/esm2022/src/exp/ExpressionEvaluator.mjs +4206 -0
- package/esm2022/src/exp/ExpressionLocalJpn.mjs +314 -0
- package/{esm2020 → esm2022}/src/exp/GlobalParamsTable.mjs +85 -85
- package/esm2022/src/exp/YesNoExp.mjs +36 -0
- package/esm2022/src/gui/CreatedFormVector.mjs +23 -0
- package/esm2022/src/gui/FormsTable.mjs +66 -0
- package/esm2022/src/gui/MgControl.mjs +363 -0
- package/esm2022/src/gui/MgForm.mjs +1224 -0
- package/esm2022/src/http/HttpManager.mjs +97 -0
- package/esm2022/src/http/client/HttpClientAsync.mjs +68 -0
- package/{esm2020 → esm2022}/src/http/client/HttpClientBase.mjs +132 -132
- package/esm2022/src/http/client/HttpClientEvents.mjs +39 -0
- package/esm2022/src/http/client/HttpClientSync.mjs +42 -0
- package/esm2022/src/http/client/HttpUtility.mjs +84 -0
- package/{esm2020 → esm2022}/src/http/client/ICommunicationsFailureHandler.mjs +1 -1
- package/{esm2020 → esm2022}/src/remote/AddUserLocateRemoteDataViewCommand.mjs +18 -18
- package/{esm2020 → esm2022}/src/remote/AddUserRangeRemoteDataViewCommand.mjs +18 -18
- package/{esm2020 → esm2022}/src/remote/AddUserSortRemoteDataViewCommand.mjs +18 -18
- package/esm2022/src/remote/RemoteCommandsProcessor.mjs +883 -0
- package/{esm2020 → esm2022}/src/remote/RemoteControlItemsRefreshCommand.mjs +25 -25
- package/{esm2020 → esm2022}/src/remote/RemoteDataViewCommandBase.mjs +24 -24
- package/{esm2020 → esm2022}/src/remote/RemoteDataViewCommandFactory.mjs +60 -60
- package/{esm2020 → esm2022}/src/remote/RemoteDataViewCommandUpdateNonModifiable.mjs +15 -15
- package/{esm2020 → esm2022}/src/remote/RemoteDataviewManager.mjs +17 -17
- package/{esm2020 → esm2022}/src/remote/RemoteInitDataViewCommand.mjs +10 -10
- package/{esm2020 → esm2022}/src/remote/ResetUserLocateRemoteDataviewCommand.mjs +16 -16
- package/{esm2020 → esm2022}/src/remote/ResetUserRangeRemoteDataviewCommand.mjs +12 -12
- package/{esm2020 → esm2022}/src/remote/ResetUserSortRemoteDataviewCommand.mjs +15 -15
- package/esm2022/src/remote/ServerError.mjs +40 -0
- package/{esm2020 → esm2022}/src/remote/SetTransactionStateRemoteDataViewCommand.mjs +19 -19
- package/esm2022/src/rt/Argument.mjs +265 -0
- package/esm2022/src/rt/ArgumentsList.mjs +103 -0
- package/esm2022/src/rt/Boundary.mjs +152 -0
- package/esm2022/src/rt/CompMainPrgTable.mjs +63 -0
- package/esm2022/src/rt/DataviewHeaderBase.mjs +98 -0
- package/{esm2020 → esm2022}/src/rt/DataviewHeaderFactory.mjs +6 -6
- package/esm2022/src/rt/DataviewHeaders.mjs +53 -0
- package/{esm2020 → esm2022}/src/rt/DataviewHeadersSaxHandler.mjs +38 -38
- package/{esm2020 → esm2022}/src/rt/ExecutionStack.mjs +94 -94
- package/{esm2020 → esm2022}/src/rt/ExecutionStackEntry.mjs +17 -17
- package/{esm2020 → esm2022}/src/rt/HandlersTable.mjs +96 -96
- package/{esm2020 → esm2022}/src/rt/IDataSourceViewDefinition.mjs +1 -1
- package/{esm2020 → esm2022}/src/rt/IDataviewHeader.mjs +1 -1
- package/{esm2020 → esm2022}/src/rt/IResultValue.mjs +1 -1
- package/esm2022/src/rt/LastFocusedManager.mjs +65 -0
- package/esm2022/src/rt/Operation.mjs +735 -0
- package/esm2022/src/rt/OperationTable.mjs +67 -0
- package/esm2022/src/rt/Recompute.mjs +355 -0
- package/{esm2020 → esm2022}/src/rt/RecomputeTable.mjs +62 -62
- package/{esm2020 → esm2022}/src/rt/RemoteDataviewHeader.mjs +108 -108
- package/esm2022/src/rt/ResultValue.mjs +10 -0
- package/esm2022/src/rt/TableCache.mjs +177 -0
- package/esm2022/src/rt/TableCacheManager.mjs +67 -0
- package/esm2022/src/rt/Transaction.mjs +53 -0
- package/esm2022/src/security/UserDetails.mjs +71 -0
- package/{esm2020 → esm2022}/src/tasks/IMGDataCollection.mjs +1 -1
- package/esm2022/src/tasks/MGData.mjs +552 -0
- package/esm2022/src/tasks/MGDataCollection.mjs +252 -0
- package/esm2022/src/tasks/RCTimer.mjs +63 -0
- package/{esm2020 → esm2022}/src/tasks/RemoteTaskService.mjs +44 -44
- package/esm2022/src/tasks/Task.mjs +2499 -0
- package/esm2022/src/tasks/TaskBase.mjs +83 -0
- package/{esm2020 → esm2022}/src/tasks/TaskServiceBase.mjs +24 -24
- package/esm2022/src/tasks/TasksTable.mjs +80 -0
- package/esm2022/src/tasks/sort/Sort.mjs +5 -0
- package/{esm2020 → esm2022}/src/tasks/sort/SortCollection.mjs +67 -67
- package/{esm2020 → esm2022}/src/util/ConstUtils.mjs +13 -13
- package/esm2022/src/util/FlowMonitorQueue.mjs +451 -0
- package/{esm2020 → esm2022}/src/util/HeapSort.mjs +69 -69
- package/{esm2020 → esm2022}/src/util/IMirrorXML.mjs +1 -1
- package/{esm2020 → esm2022}/src/util/IServerConfig.mjs +1 -1
- package/{esm2020 → esm2022}/src/util/MgBlockingQueue.mjs +1 -1
- package/esm2022/src/util/MgPriorityBlockingQueue.mjs +74 -0
- package/esm2022/src/util/MgPriorityQueue.mjs +66 -0
- package/{esm2020 → esm2022}/src/util/ParamParseResult.mjs +7 -7
- package/esm2022/src/util/PrmMap.mjs +152 -0
- package/esm2022/src/util/ReturnResult.mjs +46 -0
- package/esm2022/src/util/ReturnResultBase.mjs +18 -0
- package/esm2022/src/util/Scrambler.mjs +89 -0
- package/esm2022/src/util/UniqueIDUtils.mjs +13 -0
- package/{esm2020 → esm2022}/src/util/cookie.service.mjs +92 -92
- package/{fesm2020 → fesm2022}/magic-xpa-engine.mjs +29888 -29690
- package/fesm2022/magic-xpa-engine.mjs.map +1 -0
- package/index.d.ts +187 -187
- package/package.json +8 -14
- package/src/AccessHelper.d.ts +20 -20
- package/src/ClientManager.d.ts +35 -32
- package/src/CommandsProcessorBase.d.ts +23 -23
- package/src/CommandsProcessorManager.d.ts +6 -6
- package/src/CommandsTable.d.ts +22 -22
- package/src/ConstInterface.d.ts +516 -515
- package/src/CurrentClientVersion.d.ts +1 -1
- package/src/FlowMonitorInterface.d.ts +15 -15
- package/src/GUIManager.d.ts +17 -17
- package/src/GlobalCommandsManager.d.ts +17 -17
- package/src/GuiEventsProcessor.d.ts +24 -24
- package/src/ICommandsTable.d.ts +9 -9
- package/src/ServerConfig.d.ts +35 -34
- package/src/bridge/IGuiEvent.d.ts +19 -19
- package/src/bridge/MagicBridge.d.ts +16 -16
- package/src/commands/ClientOriginatedCommandTaskTag.d.ts +8 -8
- package/src/commands/ClientToServer/AddUserLocateDataViewCommand.d.ts +4 -4
- package/src/commands/ClientToServer/AddUserRangeDataviewCommand.d.ts +6 -6
- package/src/commands/ClientToServer/AddUserSortDataViewCommand.d.ts +6 -6
- package/src/commands/ClientToServer/BrowserEscEventCommand.d.ts +9 -8
- package/src/commands/ClientToServer/ClientOriginatedCommand.d.ts +8 -8
- package/src/commands/ClientToServer/ClientOriginatedCommandSerializer.d.ts +6 -6
- package/src/commands/ClientToServer/ColumnSortEventCommand.d.ts +11 -10
- package/src/commands/ClientToServer/CommandFactory.d.ts +64 -64
- package/src/commands/ClientToServer/CommandSerializationHelper.d.ts +20 -20
- package/src/commands/ClientToServer/ComputeEventCommand.d.ts +9 -8
- package/src/commands/ClientToServer/ContextTerminationEventCommand.d.ts +8 -7
- package/src/commands/ClientToServer/ContextTimeoutResetCommand.d.ts +8 -7
- package/src/commands/ClientToServer/ControlItemsRefreshCommand.d.ts +6 -6
- package/src/commands/ClientToServer/DataViewOutputCommand.d.ts +9 -9
- package/src/commands/ClientToServer/DataviewCommand.d.ts +32 -32
- package/src/commands/ClientToServer/EvaluateCommand.d.ts +16 -15
- package/src/commands/ClientToServer/EventCommand.d.ts +16 -15
- package/src/commands/ClientToServer/ExecOperCommand.d.ts +24 -23
- package/src/commands/ClientToServer/FetchDataControlValuesEventCommand.d.ts +9 -8
- package/src/commands/ClientToServer/GlobalParamsQueryCommand.d.ts +5 -5
- package/src/commands/ClientToServer/ICommandTaskTag.d.ts +3 -3
- package/src/commands/ClientToServer/IndexChangeEventCommand.d.ts +9 -8
- package/src/commands/ClientToServer/IniputForceWriteCommand.d.ts +11 -10
- package/src/commands/ClientToServer/NonReversibleExitEventCommand.d.ts +9 -8
- package/src/commands/ClientToServer/QueryCommand.d.ts +8 -8
- package/src/commands/ClientToServer/RecomputeCommand.d.ts +12 -11
- package/src/commands/ClientToServer/RefreshEventCommand.d.ts +13 -12
- package/src/commands/ClientToServer/RefreshScreenEventCommand.d.ts +11 -10
- package/src/commands/ClientToServer/RollbackEventCommand.d.ts +15 -14
- package/src/commands/ClientToServer/SelectProgramCommand.d.ts +7 -6
- package/src/commands/ClientToServer/SetTransactionStateDataviewCommand.d.ts +5 -5
- package/src/commands/ClientToServer/SubformOpenEventCommand.d.ts +9 -8
- package/src/commands/ClientToServer/SubformRefreshEventCommand.d.ts +10 -9
- package/src/commands/ClientToServer/TransactionCommand.d.ts +14 -12
- package/src/commands/ClientToServer/UnloadCommand.d.ts +8 -7
- package/src/commands/ClientToServer/WriteMessageToServerLogCommand.d.ts +6 -6
- package/src/commands/DataViewCommandBase.d.ts +6 -6
- package/src/commands/IClientCommand.d.ts +2 -2
- package/src/commands/IClientTargetedCommand.d.ts +12 -12
- package/src/commands/IClientToServerCommandInfo.d.ts +4 -3
- package/src/commands/ServerToClient/AbortCommand.d.ts +11 -11
- package/src/commands/ServerToClient/AddLocateCommand.d.ts +6 -6
- package/src/commands/ServerToClient/AddRangeCommand.d.ts +10 -10
- package/src/commands/ServerToClient/AddSortCommand.d.ts +9 -9
- package/src/commands/ServerToClient/ClientRefreshCommand.d.ts +7 -7
- package/src/commands/ServerToClient/ClientTargetedCommandBase.d.ts +12 -12
- package/src/commands/ServerToClient/EnhancedVerifyCommand.d.ts +13 -13
- package/src/commands/ServerToClient/OpenURLCommand.d.ts +21 -21
- package/src/commands/ServerToClient/ResetLocateCommand.d.ts +6 -6
- package/src/commands/ServerToClient/ResetRangeCommand.d.ts +6 -6
- package/src/commands/ServerToClient/ResetSortCommand.d.ts +6 -6
- package/src/commands/ServerToClient/ResultCommand.d.ts +10 -10
- package/src/commands/ServerToClient/VerifyCommand.d.ts +17 -17
- package/src/commands/ServerToClient/XMLBasedCommandBuilder.d.ts +11 -11
- package/src/communications/IConnectionStateManager.d.ts +4 -4
- package/src/communications/InteractiveCommunicationsFailureHandler.d.ts +6 -6
- package/src/data/DataSourceIdKey.d.ts +2 -2
- package/src/data/DataView.d.ts +162 -162
- package/src/data/DataViewBase.d.ts +12 -12
- package/src/data/DataviewManager.d.ts +14 -14
- package/src/data/DataviewManagerBase.d.ts +11 -11
- package/src/data/DvCache.d.ts +15 -15
- package/src/data/Field.d.ts +103 -103
- package/src/data/FieldBase.d.ts +23 -23
- package/src/data/FieldsTable.d.ts +27 -27
- package/src/data/IRecordsTable.d.ts +7 -7
- package/src/data/Key.d.ts +15 -15
- package/src/data/Record.d.ts +157 -156
- package/src/data/RecordOutOfDataViewException.d.ts +10 -10
- package/src/data/RecordsTable.d.ts +38 -38
- package/src/data/TaskTransactionManager.d.ts +17 -17
- package/src/data/XMLBasedDcValuesBuilder.d.ts +11 -11
- package/src/enums.d.ts +21 -21
- package/src/env/EnvVariablesTable.d.ts +17 -17
- package/src/env/Environment.d.ts +118 -118
- package/src/env/ILanguageData.d.ts +3 -3
- package/src/env/LanguageData.d.ts +20 -20
- package/src/env/MirrorString.d.ts +15 -15
- package/src/event/ActionManager.d.ts +14 -14
- package/src/event/Event.d.ts +79 -79
- package/src/event/EventHandler.d.ts +66 -66
- package/src/event/EventHandlerPosition.d.ts +25 -25
- package/src/event/EventsManager.d.ts +205 -204
- package/src/event/IEventsManager.d.ts +77 -77
- package/src/event/RunTimeEvent.d.ts +126 -123
- package/src/event/RunTimeEventBase.d.ts +5 -5
- package/src/event/UserEventsTable.d.ts +11 -11
- package/src/exp/ExpTable.d.ts +11 -11
- package/src/exp/Expression.d.ts +37 -37
- package/src/exp/ExpressionDict.d.ts +12 -12
- package/src/exp/ExpressionEvaluator.d.ts +198 -198
- package/src/exp/ExpressionLocalJpn.d.ts +18 -18
- package/src/exp/GlobalParamsTable.d.ts +19 -19
- package/src/exp/YesNoExp.d.ts +9 -9
- package/src/gui/CreatedFormVector.d.ts +10 -10
- package/src/gui/FormsTable.d.ts +15 -15
- package/src/gui/MgControl.d.ts +60 -60
- package/src/gui/MgForm.d.ts +96 -93
- package/src/http/HttpManager.d.ts +25 -25
- package/src/http/client/HttpClientAsync.d.ts +16 -16
- package/src/http/client/HttpClientBase.d.ts +30 -30
- package/src/http/client/HttpClientEvents.d.ts +18 -18
- package/src/http/client/HttpClientSync.d.ts +17 -17
- package/src/http/client/HttpUtility.d.ts +10 -10
- package/src/http/client/ICommunicationsFailureHandler.d.ts +5 -5
- package/src/remote/AddUserLocateRemoteDataViewCommand.d.ts +8 -8
- package/src/remote/AddUserRangeRemoteDataViewCommand.d.ts +8 -8
- package/src/remote/AddUserSortRemoteDataViewCommand.d.ts +8 -8
- package/src/remote/RemoteCommandsProcessor.d.ts +51 -51
- package/src/remote/RemoteControlItemsRefreshCommand.d.ts +8 -8
- package/src/remote/RemoteDataViewCommandBase.d.ts +10 -10
- package/src/remote/RemoteDataViewCommandFactory.d.ts +6 -6
- package/src/remote/RemoteDataViewCommandUpdateNonModifiable.d.ts +8 -8
- package/src/remote/RemoteDataviewManager.d.ts +9 -9
- package/src/remote/RemoteInitDataViewCommand.d.ts +7 -7
- package/src/remote/ResetUserLocateRemoteDataviewCommand.d.ts +7 -7
- package/src/remote/ResetUserRangeRemoteDataviewCommand.d.ts +7 -7
- package/src/remote/ResetUserSortRemoteDataviewCommand.d.ts +7 -7
- package/src/remote/ServerError.d.ts +16 -16
- package/src/remote/SetTransactionStateRemoteDataViewCommand.d.ts +8 -8
- package/src/rt/Argument.d.ts +36 -36
- package/src/rt/ArgumentsList.d.ts +24 -24
- package/src/rt/Boundary.d.ts +27 -27
- package/src/rt/CompMainPrgTable.d.ts +10 -10
- package/src/rt/DataviewHeaderBase.d.ts +34 -34
- package/src/rt/DataviewHeaderFactory.d.ts +5 -5
- package/src/rt/DataviewHeaders.d.ts +12 -12
- package/src/rt/DataviewHeadersSaxHandler.d.ts +10 -10
- package/src/rt/ExecutionStack.d.ts +22 -22
- package/src/rt/ExecutionStackEntry.d.ts +7 -7
- package/src/rt/HandlersTable.d.ts +19 -19
- package/src/rt/IDataSourceViewDefinition.d.ts +6 -6
- package/src/rt/IDataviewHeader.d.ts +10 -10
- package/src/rt/IResultValue.d.ts +4 -4
- package/src/rt/LastFocusedManager.d.ts +23 -23
- package/src/rt/Operation.d.ts +97 -97
- package/src/rt/OperationTable.d.ts +15 -15
- package/src/rt/Recompute.d.ts +41 -41
- package/src/rt/RecomputeTable.d.ts +9 -9
- package/src/rt/RemoteDataviewHeader.d.ts +14 -14
- package/src/rt/ResultValue.d.ts +7 -7
- package/src/rt/TableCache.d.ts +29 -29
- package/src/rt/TableCacheManager.d.ts +10 -10
- package/src/rt/Transaction.d.ts +23 -23
- package/src/security/UserDetails.d.ts +16 -16
- package/src/tasks/IMGDataCollection.d.ts +26 -26
- package/src/tasks/MGData.d.ts +63 -63
- package/src/tasks/MGDataCollection.d.ts +42 -42
- package/src/tasks/RCTimer.d.ts +13 -13
- package/src/tasks/RemoteTaskService.d.ts +16 -16
- package/src/tasks/Task.d.ts +312 -312
- package/src/tasks/TaskBase.d.ts +123 -123
- package/src/tasks/TaskServiceBase.d.ts +16 -16
- package/src/tasks/TasksTable.d.ts +21 -21
- package/src/tasks/sort/Sort.d.ts +4 -4
- package/src/tasks/sort/SortCollection.d.ts +11 -11
- package/src/util/ConstUtils.d.ts +3 -3
- package/src/util/FlowMonitorQueue.d.ts +70 -70
- package/src/util/HeapSort.d.ts +6 -6
- package/src/util/IMirrorXML.d.ts +6 -6
- package/src/util/IServerConfig.d.ts +11 -11
- package/src/util/MgBlockingQueue.d.ts +5 -5
- package/src/util/MgPriorityBlockingQueue.d.ts +17 -17
- package/src/util/MgPriorityQueue.d.ts +13 -13
- package/src/util/ParamParseResult.d.ts +6 -6
- package/src/util/PrmMap.d.ts +28 -28
- package/src/util/ReturnResult.d.ts +18 -18
- package/src/util/ReturnResultBase.d.ts +11 -11
- package/src/util/Scrambler.d.ts +10 -10
- package/src/util/UniqueIDUtils.d.ts +4 -4
- package/src/util/cookie.service.d.ts +8 -8
- package/esm2020/src/AccessHelper.mjs +0 -9
- package/esm2020/src/ClientManager.mjs +0 -399
- package/esm2020/src/CommandsProcessorBase.mjs +0 -58
- package/esm2020/src/CommandsTable.mjs +0 -162
- package/esm2020/src/ConstInterface.mjs +0 -516
- package/esm2020/src/FlowMonitorInterface.mjs +0 -16
- package/esm2020/src/GUIManager.mjs +0 -62
- package/esm2020/src/GlobalCommandsManager.mjs +0 -34
- package/esm2020/src/GuiEventsProcessor.mjs +0 -154
- package/esm2020/src/ServerConfig.mjs +0 -117
- package/esm2020/src/bridge/MagicBridge.mjs +0 -41
- package/esm2020/src/commands/ClientOriginatedCommandTaskTag.mjs +0 -11
- package/esm2020/src/commands/ClientToServer/BrowserEscEventCommand.mjs +0 -23
- package/esm2020/src/commands/ClientToServer/ColumnSortEventCommand.mjs +0 -26
- package/esm2020/src/commands/ClientToServer/CommandFactory.mjs +0 -260
- package/esm2020/src/commands/ClientToServer/CommandSerializationHelper.mjs +0 -69
- package/esm2020/src/commands/ClientToServer/ComputeEventCommand.mjs +0 -23
- package/esm2020/src/commands/ClientToServer/DataViewOutputCommand.mjs +0 -13
- package/esm2020/src/commands/ClientToServer/EvaluateCommand.mjs +0 -36
- package/esm2020/src/commands/ClientToServer/ExecOperCommand.mjs +0 -67
- package/esm2020/src/commands/ClientToServer/FetchDataControlValuesEventCommand.mjs +0 -22
- package/esm2020/src/commands/ClientToServer/IndexChangeEventCommand.mjs +0 -21
- package/esm2020/src/commands/ClientToServer/IniputForceWriteCommand.mjs +0 -23
- package/esm2020/src/commands/ClientToServer/RecomputeCommand.mjs +0 -27
- package/esm2020/src/commands/ClientToServer/RefreshEventCommand.mjs +0 -27
- package/esm2020/src/commands/ClientToServer/RefreshScreenEventCommand.mjs +0 -24
- package/esm2020/src/commands/ClientToServer/RollbackEventCommand.mjs +0 -39
- package/esm2020/src/commands/ClientToServer/SelectProgramCommand.mjs +0 -15
- package/esm2020/src/commands/ClientToServer/SubformOpenEventCommand.mjs +0 -21
- package/esm2020/src/commands/ClientToServer/SubformRefreshEventCommand.mjs +0 -24
- package/esm2020/src/commands/ClientToServer/TransactionCommand.mjs +0 -28
- package/esm2020/src/commands/ClientToServer/WriteMessageToServerLogCommand.mjs +0 -18
- package/esm2020/src/commands/DataViewCommandBase.mjs +0 -10
- package/esm2020/src/commands/IClientTargetedCommand.mjs +0 -9
- package/esm2020/src/commands/ServerToClient/AbortCommand.mjs +0 -65
- package/esm2020/src/commands/ServerToClient/ClientRefreshCommand.mjs +0 -25
- package/esm2020/src/commands/ServerToClient/ClientTargetedCommandBase.mjs +0 -27
- package/esm2020/src/commands/ServerToClient/EnhancedVerifyCommand.mjs +0 -45
- package/esm2020/src/commands/ServerToClient/OpenURLCommand.mjs +0 -221
- package/esm2020/src/commands/ServerToClient/ResultCommand.mjs +0 -37
- package/esm2020/src/commands/ServerToClient/VerifyCommand.mjs +0 -83
- package/esm2020/src/communications/InteractiveCommunicationsFailureHandler.mjs +0 -17
- package/esm2020/src/data/DataView.mjs +0 -1610
- package/esm2020/src/data/DataviewManager.mjs +0 -28
- package/esm2020/src/data/DataviewManagerBase.mjs +0 -15
- package/esm2020/src/data/DvCache.mjs +0 -67
- package/esm2020/src/data/Field.mjs +0 -646
- package/esm2020/src/data/FieldBase.mjs +0 -18
- package/esm2020/src/data/FieldsTable.mjs +0 -103
- package/esm2020/src/data/Record.mjs +0 -846
- package/esm2020/src/data/RecordsTable.mjs +0 -267
- package/esm2020/src/env/EnvVariablesTable.mjs +0 -340
- package/esm2020/src/env/Environment.mjs +0 -489
- package/esm2020/src/env/LanguageData.mjs +0 -226
- package/esm2020/src/event/ActionManager.mjs +0 -91
- package/esm2020/src/event/Event.mjs +0 -1333
- package/esm2020/src/event/EventHandler.mjs +0 -766
- package/esm2020/src/event/EventHandlerPosition.mjs +0 -204
- package/esm2020/src/event/EventsManager.mjs +0 -2975
- package/esm2020/src/event/RunTimeEvent.mjs +0 -392
- package/esm2020/src/event/UserEventsTable.mjs +0 -47
- package/esm2020/src/exp/ExpTable.mjs +0 -59
- package/esm2020/src/exp/Expression.mjs +0 -200
- package/esm2020/src/exp/ExpressionDict.mjs +0 -727
- package/esm2020/src/exp/ExpressionEvaluator.mjs +0 -4208
- package/esm2020/src/exp/ExpressionLocalJpn.mjs +0 -314
- package/esm2020/src/exp/YesNoExp.mjs +0 -36
- package/esm2020/src/gui/CreatedFormVector.mjs +0 -23
- package/esm2020/src/gui/FormsTable.mjs +0 -66
- package/esm2020/src/gui/MgControl.mjs +0 -353
- package/esm2020/src/gui/MgForm.mjs +0 -1181
- package/esm2020/src/http/HttpManager.mjs +0 -97
- package/esm2020/src/http/client/HttpClientAsync.mjs +0 -67
- package/esm2020/src/http/client/HttpClientEvents.mjs +0 -39
- package/esm2020/src/http/client/HttpClientSync.mjs +0 -42
- package/esm2020/src/http/client/HttpUtility.mjs +0 -84
- package/esm2020/src/remote/RemoteCommandsProcessor.mjs +0 -880
- package/esm2020/src/remote/ServerError.mjs +0 -40
- package/esm2020/src/rt/Argument.mjs +0 -265
- package/esm2020/src/rt/ArgumentsList.mjs +0 -103
- package/esm2020/src/rt/Boundary.mjs +0 -152
- package/esm2020/src/rt/CompMainPrgTable.mjs +0 -65
- package/esm2020/src/rt/DataviewHeaderBase.mjs +0 -96
- package/esm2020/src/rt/DataviewHeaders.mjs +0 -53
- package/esm2020/src/rt/LastFocusedManager.mjs +0 -67
- package/esm2020/src/rt/Operation.mjs +0 -735
- package/esm2020/src/rt/OperationTable.mjs +0 -67
- package/esm2020/src/rt/Recompute.mjs +0 -355
- package/esm2020/src/rt/ResultValue.mjs +0 -12
- package/esm2020/src/rt/TableCache.mjs +0 -177
- package/esm2020/src/rt/TableCacheManager.mjs +0 -67
- package/esm2020/src/rt/Transaction.mjs +0 -53
- package/esm2020/src/security/UserDetails.mjs +0 -71
- package/esm2020/src/tasks/MGData.mjs +0 -552
- package/esm2020/src/tasks/MGDataCollection.mjs +0 -252
- package/esm2020/src/tasks/RCTimer.mjs +0 -63
- package/esm2020/src/tasks/Task.mjs +0 -2496
- package/esm2020/src/tasks/TaskBase.mjs +0 -87
- package/esm2020/src/tasks/TasksTable.mjs +0 -80
- package/esm2020/src/tasks/sort/Sort.mjs +0 -7
- package/esm2020/src/util/FlowMonitorQueue.mjs +0 -453
- package/esm2020/src/util/MgPriorityBlockingQueue.mjs +0 -74
- package/esm2020/src/util/MgPriorityQueue.mjs +0 -66
- package/esm2020/src/util/PrmMap.mjs +0 -151
- package/esm2020/src/util/ReturnResult.mjs +0 -46
- package/esm2020/src/util/ReturnResultBase.mjs +0 -18
- package/esm2020/src/util/Scrambler.mjs +0 -89
- package/esm2020/src/util/UniqueIDUtils.mjs +0 -12
- package/fesm2015/magic-xpa-engine.mjs +0 -30837
- 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,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiTUdEYXRhQ29sbGVjdGlvbi5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uL3Byb2plY3RzL2VuZ2luZS9zcmMvdGFza3MvTUdEYXRhQ29sbGVjdGlvbi50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBQUMsb0JBQW9CLEVBQUUsS0FBSyxFQUFFLElBQUksRUFBZ0IsTUFBTSxzQkFBc0IsQ0FBQztBQUN0RixPQUFPLEVBQUMsaUJBQWlCLEVBQUUsWUFBWSxFQUFDLE1BQU0sa0JBQWtCLENBQUM7QUFDakUsT0FBTyxFQUFDLFFBQVEsRUFBb0IsTUFBTSxnQkFBZ0IsQ0FBQztBQUUzRCxPQUFPLEVBQUMsZ0JBQWdCLEVBQUMsTUFBTSwwQkFBMEIsQ0FBQztBQUsxRCxPQUFPLEVBQUMsa0JBQWtCLEVBQUMsTUFBTSwwQkFBMEIsQ0FBQztBQUM1RCxPQUFPLEVBQUMsd0NBQXdDLEVBQUUsa0NBQWtDLEVBQUMsTUFBTSwwQkFBMEIsQ0FBQztBQUd0SCxPQUFPLEVBQUMsd0JBQXdCLEVBQUMsTUFBTSw2QkFBNkIsQ0FBQztBQUNyRSxPQUFPLEVBQUMsWUFBWSxFQUFDLE1BQU0saUJBQWlCLENBQUM7QUFDN0MsT0FBTyxFQUFDLGNBQWMsRUFBQyxNQUFNLG1CQUFtQixDQUFDO0FBTWpELE1BQU0sT0FBTyxnQkFBZ0I7SUFDbkIs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BmYXRoZXIgcmVjb3JkIHByZWZpeCBleGVjdXRpb24uXHJcbiAgICAgICAgICB0YXNrLlBlcmZvcm1QYXJlbnRSZWNvcmRQcmVmaXggPSBmYWxzZTtcclxuICAgICAgICAgIEFjY2Vzc0hlbHBlci5ldmVudHNNYW5hZ2VyLnB1c2hOZXdFeGVjU3RhY2tzKCk7XHJcbiAgICAgICAgICBhd2FpdCBBY2Nlc3NIZWxwZXIuZXZlbnRzTWFuYWdlci5oYW5kbGVJbnRlcm5hbEV2ZW50V2l0aFRhc2tBbmRTdWJmb3JtUmVmcmVzaCh0YXNrLCBJbnRlcm5hbEludGVyZmFjZS5NR19BQ1RfUkVDX1BSRUZJWCwgdHJ1ZSk7XHJcblxyXG4gICAgICAgICAgaWYgKCFBY2Nlc3NIZWxwZXIuZXZlbnRzTWFuYWdlci5HZXRTdG9wRXhlY3V0aW9uRmxhZygpKVxyXG4gICAgICAgICAgICBhd2FpdCBBY2Nlc3NIZWxwZXIuZXZlbnRzTWFuYWdlci5oYW5kbGVJbnRlcm5hbEV2ZW50V2l0aFRhc2sodGFzaywgSW50ZXJuYWxJbnRlcmZhY2UuTUdfQUNUX1JFQ19TVUZGSVgpO1xyXG5cclxuICAgICAgICAgIEFjY2Vzc0hlbHBlci5ldmVudHNNYW5hZ2VyLnBvcE5ld0V4ZWNTdGFja3MoKTtcclxuICAgICAgICAgIHRhc2suUGVyZm9ybVBhcmVudFJlY29yZFByZWZpeCA9IHRydWU7XHJcbiAgICAgICAgfVxyXG4gICAgICB9XHJcbiAgICB9XHJcbiAgfVxyXG5cclxufVxyXG4iXX0=
|
@@ -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,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiUkNUaW1lci5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uL3Byb2plY3RzL2VuZ2luZS9zcmMvdGFza3MvUkNUaW1lci50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBQUUsVUFBVSxFQUFFLElBQUksRUFBRSxNQUFNLHNCQUFzQixDQUFDO0FBQ3hELE9BQU8sRUFBRSxPQUFPLEVBQUUsTUFBTSxnQkFBZ0IsQ0FBQztBQUl6QyxNQUFNLHFCQUFxQjtJQUN6QixNQUFNLENBQUMsb0JBQW9CLEdBQThCLElBQUksVUFBVSxFQUFpQixDQUFDOztBQUczRixNQUFNLE9BQU8sT0FBUSxTQUFRLE9BQU87SUFDMUIsT0FBTyxHQUFXLElBQUksQ0FBQztJQUN2QixPQUFPLEdBQVksS0FBSyxDQUFDO0lBR2pDLElBQUksd0JBQXdCO1FBQzFCLE9BQU8sSUFBSSxDQUFDLDBCQUEwQixDQUFDO0lBQ3pDLENBQUM7SUFHRCxJQUFJLFdBQVcsQ0FBQyxLQUFjO1FBQzVCLElBQUksQ0FBQyxPQUFPLEdBQUcsS0FBSyxDQUFDO0lBQ3ZCLENBQUM7SUFFRCxJQUFJLFdBQVc7UUFDYixPQUFPLElBQUksQ0FBQyxPQUFPLENBQUM7SUFDdEIsQ0FBQztJQUVELFlBQVksTUFBYyxFQUFFLFlBQW9CLEVBQUUsTUFB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Ckge1xyXG4gICAgICB0aW1lcnMuZm9yRWFjaChyY1RpbWVyID0+IHtcclxuICAgICAgICBpZiAocmNUaW1lciAhPT0gbnVsbCkge1xyXG4gICAgICAgICAgLy8gUGxhY2luZyBTVE9QX1RJTUVSIGNvbW1hbmQgaW4gcXVldWUuXHJcbiAgICAgICAgICByY1RpbWVyLlN0b3AoKTtcclxuICAgICAgICB9XHJcbiAgICAgIH0pO1xyXG5cclxuICAgICAgdGltZXJzLkNsZWFyKCk7XHJcblxyXG4gICAgICAvLyBSZW1vdmluZyB0aGUga2V5IGZyb20gdGhlIGhhc2ggdGFibGUsIGFmdGVyIHRoZSBsaXN0IG9mIHRpbWVyIG9iamVjdHMgYXJlIGNsZWFyZWQuXHJcbiAgICAgIFRpbWVyT2JqZWN0Q29sbGVjdGlvbi5NZ0RhdGFUb1RpbWVyT2JqTGlzdC5SZW1vdmUobWdEYXRhSWQpO1xyXG4gICAgfVxyXG4gIH1cclxufVxyXG4iXX0=
|
@@ -1,45 +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
|
-
}
|
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
45
|
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiUmVtb3RlVGFza1NlcnZpY2UuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi9wcm9qZWN0cy9lbmdpbmUvc3JjL3Rhc2tzL1JlbW90ZVRhc2tTZXJ2aWNlLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFBQyxlQUFlLEVBQUMsTUFBTSxtQkFBbUIsQ0FBQztBQUVsRCxPQUFPLEVBQUMsWUFBWSxFQUFDLE1BQU0sc0JBQXNCLENBQUM7QUFDbEQsT0FBTyxFQUFDLFlBQVksRUFBRSxVQUFVLEVBQUMsTUFBTSxrQkFBa0IsQ0FBQztBQUkxRCxNQUFNLE9BQU8saUJBQWtCLFNBQVEsZUFBZTtJQUNwRDtRQUNFLEtBQUssRUFBRSxDQUFDO0lBQ1YsQ0FBQztJQU9ELFVBQVUsQ0FBQyxZQUFvQjtRQUM3QixPQUFPLF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