@magic-xpa/engine 4.1100.0-dev4110.26 → 4.1100.0-dev4110.260
Sign up to get free protection for your applications and to get access to all the features.
- package/{esm2020 → esm2022}/index.mjs +188 -188
- package/{esm2020 → esm2022}/magic-xpa-engine.mjs +1 -1
- package/esm2022/src/AccessHelper.mjs +15 -0
- package/esm2022/src/ClientManager.mjs +418 -0
- package/esm2022/src/CommandsProcessorBase.mjs +56 -0
- package/{esm2020 → esm2022}/src/CommandsProcessorManager.mjs +25 -25
- package/esm2022/src/CommandsTable.mjs +162 -0
- package/esm2022/src/ConstInterface.mjs +517 -0
- package/{esm2020 → esm2022}/src/CurrentClientVersion.mjs +2 -2
- package/esm2022/src/FlowMonitorInterface.mjs +16 -0
- package/esm2022/src/GUIManager.mjs +62 -0
- package/esm2022/src/GlobalCommandsManager.mjs +34 -0
- package/esm2022/src/GuiEventsProcessor.mjs +156 -0
- package/{esm2020 → esm2022}/src/ICommandsTable.mjs +1 -1
- package/esm2022/src/ServerConfig.mjs +122 -0
- package/{esm2020 → esm2022}/src/bridge/IGuiEvent.mjs +19 -19
- package/esm2022/src/bridge/MagicBridge.mjs +41 -0
- package/esm2022/src/commands/ClientOriginatedCommandTaskTag.mjs +12 -0
- package/{esm2020 → esm2022}/src/commands/ClientToServer/AddUserLocateDataViewCommand.mjs +8 -8
- package/{esm2020 → esm2022}/src/commands/ClientToServer/AddUserRangeDataviewCommand.mjs +9 -9
- package/{esm2020 → esm2022}/src/commands/ClientToServer/AddUserSortDataViewCommand.mjs +9 -9
- package/esm2022/src/commands/ClientToServer/BrowserEscEventCommand.mjs +26 -0
- package/{esm2020 → esm2022}/src/commands/ClientToServer/ClientOriginatedCommand.mjs +14 -14
- package/{esm2020 → esm2022}/src/commands/ClientToServer/ClientOriginatedCommandSerializer.mjs +59 -59
- package/esm2022/src/commands/ClientToServer/ColumnSortEventCommand.mjs +29 -0
- package/esm2022/src/commands/ClientToServer/CommandFactory.mjs +261 -0
- package/esm2022/src/commands/ClientToServer/CommandSerializationHelper.mjs +67 -0
- package/esm2022/src/commands/ClientToServer/ComputeEventCommand.mjs +26 -0
- package/{esm2020 → esm2022}/src/commands/ClientToServer/ContextTerminationEventCommand.mjs +24 -21
- package/{esm2020 → esm2022}/src/commands/ClientToServer/ContextTimeoutResetCommand.mjs +23 -20
- package/{esm2020 → esm2022}/src/commands/ClientToServer/ControlItemsRefreshCommand.mjs +8 -8
- package/esm2022/src/commands/ClientToServer/DataViewOutputCommand.mjs +13 -0
- package/{esm2020 → esm2022}/src/commands/ClientToServer/DataviewCommand.mjs +44 -44
- package/esm2022/src/commands/ClientToServer/EvaluateCommand.mjs +40 -0
- package/{esm2020 → esm2022}/src/commands/ClientToServer/EventCommand.mjs +43 -40
- package/esm2022/src/commands/ClientToServer/ExecOperCommand.mjs +70 -0
- package/esm2022/src/commands/ClientToServer/FetchDataControlValuesEventCommand.mjs +25 -0
- package/{esm2020 → esm2022}/src/commands/ClientToServer/GlobalParamsQueryCommand.mjs +10 -10
- package/{esm2020 → esm2022}/src/commands/ClientToServer/ICommandTaskTag.mjs +1 -1
- package/esm2022/src/commands/ClientToServer/IndexChangeEventCommand.mjs +24 -0
- package/esm2022/src/commands/ClientToServer/IniputForceWriteCommand.mjs +26 -0
- package/{esm2020 → esm2022}/src/commands/ClientToServer/NonReversibleExitEventCommand.mjs +26 -23
- package/{esm2020 → esm2022}/src/commands/ClientToServer/QueryCommand.mjs +20 -20
- package/esm2022/src/commands/ClientToServer/RecomputeCommand.mjs +30 -0
- package/esm2022/src/commands/ClientToServer/RefreshEventCommand.mjs +30 -0
- package/esm2022/src/commands/ClientToServer/RefreshScreenEventCommand.mjs +27 -0
- package/esm2022/src/commands/ClientToServer/RollbackEventCommand.mjs +43 -0
- package/esm2022/src/commands/ClientToServer/SelectProgramCommand.mjs +19 -0
- package/{esm2020 → esm2022}/src/commands/ClientToServer/SetTransactionStateDataviewCommand.mjs +9 -9
- package/esm2022/src/commands/ClientToServer/SubformOpenEventCommand.mjs +24 -0
- package/esm2022/src/commands/ClientToServer/SubformRefreshEventCommand.mjs +27 -0
- package/esm2022/src/commands/ClientToServer/TransactionCommand.mjs +34 -0
- package/{esm2020 → esm2022}/src/commands/ClientToServer/UnloadCommand.mjs +18 -15
- package/esm2022/src/commands/ClientToServer/WriteMessageToServerLogCommand.mjs +18 -0
- package/esm2022/src/commands/DataViewCommandBase.mjs +8 -0
- package/{esm2020 → esm2022}/src/commands/IClientCommand.mjs +1 -1
- package/esm2022/src/commands/IClientTargetedCommand.mjs +13 -0
- package/{esm2020 → esm2022}/src/commands/IClientToServerCommandInfo.mjs +2 -2
- package/esm2022/src/commands/ServerToClient/AbortCommand.mjs +65 -0
- package/{esm2020 → esm2022}/src/commands/ServerToClient/AddLocateCommand.mjs +21 -21
- package/{esm2020 → esm2022}/src/commands/ServerToClient/AddRangeCommand.mjs +62 -62
- package/{esm2020 → esm2022}/src/commands/ServerToClient/AddSortCommand.mjs +33 -33
- package/esm2022/src/commands/ServerToClient/ClientRefreshCommand.mjs +25 -0
- package/esm2022/src/commands/ServerToClient/ClientTargetedCommandBase.mjs +24 -0
- package/esm2022/src/commands/ServerToClient/EnhancedVerifyCommand.mjs +45 -0
- package/esm2022/src/commands/ServerToClient/OpenURLCommand.mjs +221 -0
- package/{esm2020 → esm2022}/src/commands/ServerToClient/ResetLocateCommand.mjs +14 -14
- package/{esm2020 → esm2022}/src/commands/ServerToClient/ResetRangeCommand.mjs +14 -14
- package/{esm2020 → esm2022}/src/commands/ServerToClient/ResetSortCommand.mjs +14 -14
- package/esm2022/src/commands/ServerToClient/ResultCommand.mjs +37 -0
- package/esm2022/src/commands/ServerToClient/VerifyCommand.mjs +83 -0
- package/{esm2020 → esm2022}/src/commands/ServerToClient/XMLBasedCommandBuilder.mjs +132 -132
- package/{esm2020 → esm2022}/src/communications/IConnectionStateManager.mjs +1 -1
- package/esm2022/src/communications/InteractiveCommunicationsFailureHandler.mjs +15 -0
- package/{esm2020 → esm2022}/src/data/DataSourceIdKey.mjs +2 -2
- package/esm2022/src/data/DataView.mjs +1613 -0
- package/{esm2020 → esm2022}/src/data/DataViewBase.mjs +3 -3
- package/esm2022/src/data/DataviewManager.mjs +28 -0
- package/esm2022/src/data/DataviewManagerBase.mjs +15 -0
- package/esm2022/src/data/DvCache.mjs +67 -0
- package/esm2022/src/data/Field.mjs +646 -0
- package/esm2022/src/data/FieldBase.mjs +15 -0
- package/esm2022/src/data/FieldsTable.mjs +103 -0
- package/{esm2020 → esm2022}/src/data/IRecordsTable.mjs +1 -1
- package/{esm2020 → esm2022}/src/data/Key.mjs +88 -88
- package/esm2022/src/data/Record.mjs +880 -0
- package/{esm2020 → esm2022}/src/data/RecordOutOfDataViewException.mjs +15 -15
- package/esm2022/src/data/RecordsTable.mjs +267 -0
- package/{esm2020 → esm2022}/src/data/TaskTransactionManager.mjs +107 -103
- package/{esm2020 → esm2022}/src/data/XMLBasedDcValuesBuilder.mjs +74 -74
- package/{esm2020 → esm2022}/src/enums.mjs +23 -23
- package/esm2022/src/env/EnvVariablesTable.mjs +340 -0
- package/esm2022/src/env/Environment.mjs +487 -0
- package/{esm2020 → esm2022}/src/env/ILanguageData.mjs +1 -1
- package/esm2022/src/env/LanguageData.mjs +227 -0
- package/{esm2020 → esm2022}/src/env/MirrorString.mjs +65 -65
- package/esm2022/src/event/ActionManager.mjs +91 -0
- package/esm2022/src/event/Event.mjs +1333 -0
- package/esm2022/src/event/EventHandler.mjs +766 -0
- package/esm2022/src/event/EventHandlerPosition.mjs +204 -0
- package/esm2022/src/event/EventsManager.mjs +2988 -0
- package/{esm2020 → esm2022}/src/event/IEventsManager.mjs +6 -6
- package/esm2022/src/event/RunTimeEvent.mjs +399 -0
- package/{esm2020 → esm2022}/src/event/RunTimeEventBase.mjs +3 -3
- package/esm2022/src/event/UserEventsTable.mjs +47 -0
- package/esm2022/src/exp/ExpTable.mjs +57 -0
- package/esm2022/src/exp/Expression.mjs +200 -0
- package/esm2022/src/exp/ExpressionDict.mjs +727 -0
- package/esm2022/src/exp/ExpressionEvaluator.mjs +4206 -0
- package/esm2022/src/exp/ExpressionLocalJpn.mjs +314 -0
- package/{esm2020 → esm2022}/src/exp/GlobalParamsTable.mjs +85 -85
- package/esm2022/src/exp/YesNoExp.mjs +36 -0
- package/esm2022/src/gui/CreatedFormVector.mjs +23 -0
- package/esm2022/src/gui/FormsTable.mjs +66 -0
- package/esm2022/src/gui/MgControl.mjs +363 -0
- package/esm2022/src/gui/MgForm.mjs +1224 -0
- package/esm2022/src/http/HttpManager.mjs +97 -0
- package/esm2022/src/http/client/HttpClientAsync.mjs +68 -0
- package/{esm2020 → esm2022}/src/http/client/HttpClientBase.mjs +132 -132
- package/esm2022/src/http/client/HttpClientEvents.mjs +39 -0
- package/esm2022/src/http/client/HttpClientSync.mjs +42 -0
- package/esm2022/src/http/client/HttpUtility.mjs +84 -0
- package/{esm2020 → esm2022}/src/http/client/ICommunicationsFailureHandler.mjs +1 -1
- package/{esm2020 → esm2022}/src/remote/AddUserLocateRemoteDataViewCommand.mjs +18 -18
- package/{esm2020 → esm2022}/src/remote/AddUserRangeRemoteDataViewCommand.mjs +18 -18
- package/{esm2020 → esm2022}/src/remote/AddUserSortRemoteDataViewCommand.mjs +18 -18
- package/esm2022/src/remote/RemoteCommandsProcessor.mjs +883 -0
- package/{esm2020 → esm2022}/src/remote/RemoteControlItemsRefreshCommand.mjs +25 -25
- package/{esm2020 → esm2022}/src/remote/RemoteDataViewCommandBase.mjs +24 -24
- package/{esm2020 → esm2022}/src/remote/RemoteDataViewCommandFactory.mjs +60 -60
- package/{esm2020 → esm2022}/src/remote/RemoteDataViewCommandUpdateNonModifiable.mjs +15 -15
- package/{esm2020 → esm2022}/src/remote/RemoteDataviewManager.mjs +17 -17
- package/{esm2020 → esm2022}/src/remote/RemoteInitDataViewCommand.mjs +10 -10
- package/{esm2020 → esm2022}/src/remote/ResetUserLocateRemoteDataviewCommand.mjs +16 -16
- package/{esm2020 → esm2022}/src/remote/ResetUserRangeRemoteDataviewCommand.mjs +12 -12
- package/{esm2020 → esm2022}/src/remote/ResetUserSortRemoteDataviewCommand.mjs +15 -15
- package/esm2022/src/remote/ServerError.mjs +40 -0
- package/{esm2020 → esm2022}/src/remote/SetTransactionStateRemoteDataViewCommand.mjs +19 -19
- package/esm2022/src/rt/Argument.mjs +265 -0
- package/esm2022/src/rt/ArgumentsList.mjs +103 -0
- package/esm2022/src/rt/Boundary.mjs +152 -0
- package/esm2022/src/rt/CompMainPrgTable.mjs +63 -0
- package/esm2022/src/rt/DataviewHeaderBase.mjs +98 -0
- package/{esm2020 → esm2022}/src/rt/DataviewHeaderFactory.mjs +6 -6
- package/esm2022/src/rt/DataviewHeaders.mjs +53 -0
- package/{esm2020 → esm2022}/src/rt/DataviewHeadersSaxHandler.mjs +38 -38
- package/{esm2020 → esm2022}/src/rt/ExecutionStack.mjs +94 -94
- package/{esm2020 → esm2022}/src/rt/ExecutionStackEntry.mjs +17 -17
- package/{esm2020 → esm2022}/src/rt/HandlersTable.mjs +96 -96
- package/{esm2020 → esm2022}/src/rt/IDataSourceViewDefinition.mjs +1 -1
- package/{esm2020 → esm2022}/src/rt/IDataviewHeader.mjs +1 -1
- package/{esm2020 → esm2022}/src/rt/IResultValue.mjs +1 -1
- package/esm2022/src/rt/LastFocusedManager.mjs +65 -0
- package/esm2022/src/rt/Operation.mjs +735 -0
- package/esm2022/src/rt/OperationTable.mjs +67 -0
- package/esm2022/src/rt/Recompute.mjs +355 -0
- package/{esm2020 → esm2022}/src/rt/RecomputeTable.mjs +62 -62
- package/{esm2020 → esm2022}/src/rt/RemoteDataviewHeader.mjs +108 -108
- package/esm2022/src/rt/ResultValue.mjs +10 -0
- package/esm2022/src/rt/TableCache.mjs +177 -0
- package/esm2022/src/rt/TableCacheManager.mjs +67 -0
- package/esm2022/src/rt/Transaction.mjs +53 -0
- package/esm2022/src/security/UserDetails.mjs +71 -0
- package/{esm2020 → esm2022}/src/tasks/IMGDataCollection.mjs +1 -1
- package/esm2022/src/tasks/MGData.mjs +552 -0
- package/esm2022/src/tasks/MGDataCollection.mjs +252 -0
- package/esm2022/src/tasks/RCTimer.mjs +63 -0
- package/{esm2020 → esm2022}/src/tasks/RemoteTaskService.mjs +44 -44
- package/esm2022/src/tasks/Task.mjs +2499 -0
- package/esm2022/src/tasks/TaskBase.mjs +83 -0
- package/{esm2020 → esm2022}/src/tasks/TaskServiceBase.mjs +24 -24
- package/esm2022/src/tasks/TasksTable.mjs +80 -0
- package/esm2022/src/tasks/sort/Sort.mjs +5 -0
- package/{esm2020 → esm2022}/src/tasks/sort/SortCollection.mjs +67 -67
- package/{esm2020 → esm2022}/src/util/ConstUtils.mjs +13 -13
- package/esm2022/src/util/FlowMonitorQueue.mjs +451 -0
- package/{esm2020 → esm2022}/src/util/HeapSort.mjs +69 -69
- package/{esm2020 → esm2022}/src/util/IMirrorXML.mjs +1 -1
- package/{esm2020 → esm2022}/src/util/IServerConfig.mjs +1 -1
- package/{esm2020 → esm2022}/src/util/MgBlockingQueue.mjs +1 -1
- package/esm2022/src/util/MgPriorityBlockingQueue.mjs +74 -0
- package/esm2022/src/util/MgPriorityQueue.mjs +66 -0
- package/{esm2020 → esm2022}/src/util/ParamParseResult.mjs +7 -7
- package/esm2022/src/util/PrmMap.mjs +152 -0
- package/esm2022/src/util/ReturnResult.mjs +46 -0
- package/esm2022/src/util/ReturnResultBase.mjs +18 -0
- package/esm2022/src/util/Scrambler.mjs +89 -0
- package/esm2022/src/util/UniqueIDUtils.mjs +13 -0
- package/{esm2020 → esm2022}/src/util/cookie.service.mjs +91 -91
- package/{fesm2020 → fesm2022}/magic-xpa-engine.mjs +29885 -29693
- package/fesm2022/magic-xpa-engine.mjs.map +1 -0
- package/index.d.ts +187 -187
- package/package.json +8 -14
- package/src/AccessHelper.d.ts +20 -20
- package/src/ClientManager.d.ts +35 -32
- package/src/CommandsProcessorBase.d.ts +23 -23
- package/src/CommandsProcessorManager.d.ts +6 -6
- package/src/CommandsTable.d.ts +22 -22
- package/src/ConstInterface.d.ts +516 -515
- package/src/CurrentClientVersion.d.ts +1 -1
- package/src/FlowMonitorInterface.d.ts +15 -15
- package/src/GUIManager.d.ts +17 -17
- package/src/GlobalCommandsManager.d.ts +17 -17
- package/src/GuiEventsProcessor.d.ts +24 -24
- package/src/ICommandsTable.d.ts +9 -9
- package/src/ServerConfig.d.ts +35 -34
- package/src/bridge/IGuiEvent.d.ts +19 -19
- package/src/bridge/MagicBridge.d.ts +16 -16
- package/src/commands/ClientOriginatedCommandTaskTag.d.ts +8 -8
- package/src/commands/ClientToServer/AddUserLocateDataViewCommand.d.ts +4 -4
- package/src/commands/ClientToServer/AddUserRangeDataviewCommand.d.ts +6 -6
- package/src/commands/ClientToServer/AddUserSortDataViewCommand.d.ts +6 -6
- package/src/commands/ClientToServer/BrowserEscEventCommand.d.ts +9 -8
- package/src/commands/ClientToServer/ClientOriginatedCommand.d.ts +8 -8
- package/src/commands/ClientToServer/ClientOriginatedCommandSerializer.d.ts +6 -6
- package/src/commands/ClientToServer/ColumnSortEventCommand.d.ts +11 -10
- package/src/commands/ClientToServer/CommandFactory.d.ts +64 -64
- package/src/commands/ClientToServer/CommandSerializationHelper.d.ts +20 -20
- package/src/commands/ClientToServer/ComputeEventCommand.d.ts +9 -8
- package/src/commands/ClientToServer/ContextTerminationEventCommand.d.ts +8 -7
- package/src/commands/ClientToServer/ContextTimeoutResetCommand.d.ts +8 -7
- package/src/commands/ClientToServer/ControlItemsRefreshCommand.d.ts +6 -6
- package/src/commands/ClientToServer/DataViewOutputCommand.d.ts +9 -9
- package/src/commands/ClientToServer/DataviewCommand.d.ts +32 -32
- package/src/commands/ClientToServer/EvaluateCommand.d.ts +16 -15
- package/src/commands/ClientToServer/EventCommand.d.ts +16 -15
- package/src/commands/ClientToServer/ExecOperCommand.d.ts +24 -23
- package/src/commands/ClientToServer/FetchDataControlValuesEventCommand.d.ts +9 -8
- package/src/commands/ClientToServer/GlobalParamsQueryCommand.d.ts +5 -5
- package/src/commands/ClientToServer/ICommandTaskTag.d.ts +3 -3
- package/src/commands/ClientToServer/IndexChangeEventCommand.d.ts +9 -8
- package/src/commands/ClientToServer/IniputForceWriteCommand.d.ts +11 -10
- package/src/commands/ClientToServer/NonReversibleExitEventCommand.d.ts +9 -8
- package/src/commands/ClientToServer/QueryCommand.d.ts +8 -8
- package/src/commands/ClientToServer/RecomputeCommand.d.ts +12 -11
- package/src/commands/ClientToServer/RefreshEventCommand.d.ts +13 -12
- package/src/commands/ClientToServer/RefreshScreenEventCommand.d.ts +11 -10
- package/src/commands/ClientToServer/RollbackEventCommand.d.ts +15 -14
- package/src/commands/ClientToServer/SelectProgramCommand.d.ts +7 -6
- package/src/commands/ClientToServer/SetTransactionStateDataviewCommand.d.ts +5 -5
- package/src/commands/ClientToServer/SubformOpenEventCommand.d.ts +9 -8
- package/src/commands/ClientToServer/SubformRefreshEventCommand.d.ts +10 -9
- package/src/commands/ClientToServer/TransactionCommand.d.ts +14 -12
- package/src/commands/ClientToServer/UnloadCommand.d.ts +8 -7
- package/src/commands/ClientToServer/WriteMessageToServerLogCommand.d.ts +6 -6
- package/src/commands/DataViewCommandBase.d.ts +6 -6
- package/src/commands/IClientCommand.d.ts +2 -2
- package/src/commands/IClientTargetedCommand.d.ts +12 -12
- package/src/commands/IClientToServerCommandInfo.d.ts +4 -3
- package/src/commands/ServerToClient/AbortCommand.d.ts +11 -11
- package/src/commands/ServerToClient/AddLocateCommand.d.ts +6 -6
- package/src/commands/ServerToClient/AddRangeCommand.d.ts +10 -10
- package/src/commands/ServerToClient/AddSortCommand.d.ts +9 -9
- package/src/commands/ServerToClient/ClientRefreshCommand.d.ts +7 -7
- package/src/commands/ServerToClient/ClientTargetedCommandBase.d.ts +12 -12
- package/src/commands/ServerToClient/EnhancedVerifyCommand.d.ts +13 -13
- package/src/commands/ServerToClient/OpenURLCommand.d.ts +21 -21
- package/src/commands/ServerToClient/ResetLocateCommand.d.ts +6 -6
- package/src/commands/ServerToClient/ResetRangeCommand.d.ts +6 -6
- package/src/commands/ServerToClient/ResetSortCommand.d.ts +6 -6
- package/src/commands/ServerToClient/ResultCommand.d.ts +10 -10
- package/src/commands/ServerToClient/VerifyCommand.d.ts +17 -17
- package/src/commands/ServerToClient/XMLBasedCommandBuilder.d.ts +11 -11
- package/src/communications/IConnectionStateManager.d.ts +4 -4
- package/src/communications/InteractiveCommunicationsFailureHandler.d.ts +6 -6
- package/src/data/DataSourceIdKey.d.ts +2 -2
- package/src/data/DataView.d.ts +162 -162
- package/src/data/DataViewBase.d.ts +12 -12
- package/src/data/DataviewManager.d.ts +14 -14
- package/src/data/DataviewManagerBase.d.ts +11 -11
- package/src/data/DvCache.d.ts +15 -15
- package/src/data/Field.d.ts +103 -103
- package/src/data/FieldBase.d.ts +23 -23
- package/src/data/FieldsTable.d.ts +27 -27
- package/src/data/IRecordsTable.d.ts +7 -7
- package/src/data/Key.d.ts +15 -15
- package/src/data/Record.d.ts +157 -156
- package/src/data/RecordOutOfDataViewException.d.ts +10 -10
- package/src/data/RecordsTable.d.ts +38 -38
- package/src/data/TaskTransactionManager.d.ts +17 -17
- package/src/data/XMLBasedDcValuesBuilder.d.ts +11 -11
- package/src/enums.d.ts +21 -21
- package/src/env/EnvVariablesTable.d.ts +17 -17
- package/src/env/Environment.d.ts +118 -118
- package/src/env/ILanguageData.d.ts +3 -3
- package/src/env/LanguageData.d.ts +20 -20
- package/src/env/MirrorString.d.ts +15 -15
- package/src/event/ActionManager.d.ts +14 -14
- package/src/event/Event.d.ts +79 -79
- package/src/event/EventHandler.d.ts +66 -66
- package/src/event/EventHandlerPosition.d.ts +25 -25
- package/src/event/EventsManager.d.ts +205 -204
- package/src/event/IEventsManager.d.ts +77 -77
- package/src/event/RunTimeEvent.d.ts +126 -123
- package/src/event/RunTimeEventBase.d.ts +5 -5
- package/src/event/UserEventsTable.d.ts +11 -11
- package/src/exp/ExpTable.d.ts +11 -11
- package/src/exp/Expression.d.ts +37 -37
- package/src/exp/ExpressionDict.d.ts +12 -12
- package/src/exp/ExpressionEvaluator.d.ts +198 -198
- package/src/exp/ExpressionLocalJpn.d.ts +18 -18
- package/src/exp/GlobalParamsTable.d.ts +19 -19
- package/src/exp/YesNoExp.d.ts +9 -9
- package/src/gui/CreatedFormVector.d.ts +10 -10
- package/src/gui/FormsTable.d.ts +15 -15
- package/src/gui/MgControl.d.ts +60 -60
- package/src/gui/MgForm.d.ts +96 -93
- package/src/http/HttpManager.d.ts +25 -25
- package/src/http/client/HttpClientAsync.d.ts +16 -16
- package/src/http/client/HttpClientBase.d.ts +30 -30
- package/src/http/client/HttpClientEvents.d.ts +18 -18
- package/src/http/client/HttpClientSync.d.ts +17 -17
- package/src/http/client/HttpUtility.d.ts +10 -10
- package/src/http/client/ICommunicationsFailureHandler.d.ts +5 -5
- package/src/remote/AddUserLocateRemoteDataViewCommand.d.ts +8 -8
- package/src/remote/AddUserRangeRemoteDataViewCommand.d.ts +8 -8
- package/src/remote/AddUserSortRemoteDataViewCommand.d.ts +8 -8
- package/src/remote/RemoteCommandsProcessor.d.ts +51 -51
- package/src/remote/RemoteControlItemsRefreshCommand.d.ts +8 -8
- package/src/remote/RemoteDataViewCommandBase.d.ts +10 -10
- package/src/remote/RemoteDataViewCommandFactory.d.ts +6 -6
- package/src/remote/RemoteDataViewCommandUpdateNonModifiable.d.ts +8 -8
- package/src/remote/RemoteDataviewManager.d.ts +9 -9
- package/src/remote/RemoteInitDataViewCommand.d.ts +7 -7
- package/src/remote/ResetUserLocateRemoteDataviewCommand.d.ts +7 -7
- package/src/remote/ResetUserRangeRemoteDataviewCommand.d.ts +7 -7
- package/src/remote/ResetUserSortRemoteDataviewCommand.d.ts +7 -7
- package/src/remote/ServerError.d.ts +16 -16
- package/src/remote/SetTransactionStateRemoteDataViewCommand.d.ts +8 -8
- package/src/rt/Argument.d.ts +36 -36
- package/src/rt/ArgumentsList.d.ts +24 -24
- package/src/rt/Boundary.d.ts +27 -27
- package/src/rt/CompMainPrgTable.d.ts +10 -10
- package/src/rt/DataviewHeaderBase.d.ts +34 -34
- package/src/rt/DataviewHeaderFactory.d.ts +5 -5
- package/src/rt/DataviewHeaders.d.ts +12 -12
- package/src/rt/DataviewHeadersSaxHandler.d.ts +10 -10
- package/src/rt/ExecutionStack.d.ts +22 -22
- package/src/rt/ExecutionStackEntry.d.ts +7 -7
- package/src/rt/HandlersTable.d.ts +19 -19
- package/src/rt/IDataSourceViewDefinition.d.ts +6 -6
- package/src/rt/IDataviewHeader.d.ts +10 -10
- package/src/rt/IResultValue.d.ts +4 -4
- package/src/rt/LastFocusedManager.d.ts +23 -23
- package/src/rt/Operation.d.ts +97 -97
- package/src/rt/OperationTable.d.ts +15 -15
- package/src/rt/Recompute.d.ts +41 -41
- package/src/rt/RecomputeTable.d.ts +9 -9
- package/src/rt/RemoteDataviewHeader.d.ts +14 -14
- package/src/rt/ResultValue.d.ts +7 -7
- package/src/rt/TableCache.d.ts +29 -29
- package/src/rt/TableCacheManager.d.ts +10 -10
- package/src/rt/Transaction.d.ts +23 -23
- package/src/security/UserDetails.d.ts +16 -16
- package/src/tasks/IMGDataCollection.d.ts +26 -26
- package/src/tasks/MGData.d.ts +63 -63
- package/src/tasks/MGDataCollection.d.ts +42 -42
- package/src/tasks/RCTimer.d.ts +13 -13
- package/src/tasks/RemoteTaskService.d.ts +16 -16
- package/src/tasks/Task.d.ts +312 -312
- package/src/tasks/TaskBase.d.ts +123 -123
- package/src/tasks/TaskServiceBase.d.ts +16 -16
- package/src/tasks/TasksTable.d.ts +21 -21
- package/src/tasks/sort/Sort.d.ts +4 -4
- package/src/tasks/sort/SortCollection.d.ts +11 -11
- package/src/util/ConstUtils.d.ts +3 -3
- package/src/util/FlowMonitorQueue.d.ts +70 -70
- package/src/util/HeapSort.d.ts +6 -6
- package/src/util/IMirrorXML.d.ts +6 -6
- package/src/util/IServerConfig.d.ts +11 -11
- package/src/util/MgBlockingQueue.d.ts +5 -5
- package/src/util/MgPriorityBlockingQueue.d.ts +17 -17
- package/src/util/MgPriorityQueue.d.ts +13 -13
- package/src/util/ParamParseResult.d.ts +6 -6
- package/src/util/PrmMap.d.ts +28 -28
- package/src/util/ReturnResult.d.ts +18 -18
- package/src/util/ReturnResultBase.d.ts +11 -11
- package/src/util/Scrambler.d.ts +10 -10
- package/src/util/UniqueIDUtils.d.ts +4 -4
- package/src/util/cookie.service.d.ts +8 -8
- package/esm2020/src/AccessHelper.mjs +0 -9
- package/esm2020/src/ClientManager.mjs +0 -399
- package/esm2020/src/CommandsProcessorBase.mjs +0 -58
- package/esm2020/src/CommandsTable.mjs +0 -162
- package/esm2020/src/ConstInterface.mjs +0 -516
- package/esm2020/src/FlowMonitorInterface.mjs +0 -16
- package/esm2020/src/GUIManager.mjs +0 -62
- package/esm2020/src/GlobalCommandsManager.mjs +0 -34
- package/esm2020/src/GuiEventsProcessor.mjs +0 -154
- package/esm2020/src/ServerConfig.mjs +0 -117
- package/esm2020/src/bridge/MagicBridge.mjs +0 -41
- package/esm2020/src/commands/ClientOriginatedCommandTaskTag.mjs +0 -11
- package/esm2020/src/commands/ClientToServer/BrowserEscEventCommand.mjs +0 -23
- package/esm2020/src/commands/ClientToServer/ColumnSortEventCommand.mjs +0 -26
- package/esm2020/src/commands/ClientToServer/CommandFactory.mjs +0 -260
- package/esm2020/src/commands/ClientToServer/CommandSerializationHelper.mjs +0 -69
- package/esm2020/src/commands/ClientToServer/ComputeEventCommand.mjs +0 -23
- package/esm2020/src/commands/ClientToServer/DataViewOutputCommand.mjs +0 -13
- package/esm2020/src/commands/ClientToServer/EvaluateCommand.mjs +0 -36
- package/esm2020/src/commands/ClientToServer/ExecOperCommand.mjs +0 -67
- package/esm2020/src/commands/ClientToServer/FetchDataControlValuesEventCommand.mjs +0 -22
- package/esm2020/src/commands/ClientToServer/IndexChangeEventCommand.mjs +0 -21
- package/esm2020/src/commands/ClientToServer/IniputForceWriteCommand.mjs +0 -23
- package/esm2020/src/commands/ClientToServer/RecomputeCommand.mjs +0 -27
- package/esm2020/src/commands/ClientToServer/RefreshEventCommand.mjs +0 -27
- package/esm2020/src/commands/ClientToServer/RefreshScreenEventCommand.mjs +0 -24
- package/esm2020/src/commands/ClientToServer/RollbackEventCommand.mjs +0 -39
- package/esm2020/src/commands/ClientToServer/SelectProgramCommand.mjs +0 -15
- package/esm2020/src/commands/ClientToServer/SubformOpenEventCommand.mjs +0 -21
- package/esm2020/src/commands/ClientToServer/SubformRefreshEventCommand.mjs +0 -24
- package/esm2020/src/commands/ClientToServer/TransactionCommand.mjs +0 -28
- package/esm2020/src/commands/ClientToServer/WriteMessageToServerLogCommand.mjs +0 -18
- package/esm2020/src/commands/DataViewCommandBase.mjs +0 -10
- package/esm2020/src/commands/IClientTargetedCommand.mjs +0 -9
- package/esm2020/src/commands/ServerToClient/AbortCommand.mjs +0 -65
- package/esm2020/src/commands/ServerToClient/ClientRefreshCommand.mjs +0 -25
- package/esm2020/src/commands/ServerToClient/ClientTargetedCommandBase.mjs +0 -27
- package/esm2020/src/commands/ServerToClient/EnhancedVerifyCommand.mjs +0 -45
- package/esm2020/src/commands/ServerToClient/OpenURLCommand.mjs +0 -221
- package/esm2020/src/commands/ServerToClient/ResultCommand.mjs +0 -37
- package/esm2020/src/commands/ServerToClient/VerifyCommand.mjs +0 -83
- package/esm2020/src/communications/InteractiveCommunicationsFailureHandler.mjs +0 -17
- package/esm2020/src/data/DataView.mjs +0 -1610
- package/esm2020/src/data/DataviewManager.mjs +0 -28
- package/esm2020/src/data/DataviewManagerBase.mjs +0 -15
- package/esm2020/src/data/DvCache.mjs +0 -67
- package/esm2020/src/data/Field.mjs +0 -646
- package/esm2020/src/data/FieldBase.mjs +0 -18
- package/esm2020/src/data/FieldsTable.mjs +0 -103
- package/esm2020/src/data/Record.mjs +0 -846
- package/esm2020/src/data/RecordsTable.mjs +0 -267
- package/esm2020/src/env/EnvVariablesTable.mjs +0 -340
- package/esm2020/src/env/Environment.mjs +0 -489
- package/esm2020/src/env/LanguageData.mjs +0 -226
- package/esm2020/src/event/ActionManager.mjs +0 -91
- package/esm2020/src/event/Event.mjs +0 -1333
- package/esm2020/src/event/EventHandler.mjs +0 -766
- package/esm2020/src/event/EventHandlerPosition.mjs +0 -204
- package/esm2020/src/event/EventsManager.mjs +0 -2975
- package/esm2020/src/event/RunTimeEvent.mjs +0 -392
- package/esm2020/src/event/UserEventsTable.mjs +0 -47
- package/esm2020/src/exp/ExpTable.mjs +0 -59
- package/esm2020/src/exp/Expression.mjs +0 -200
- package/esm2020/src/exp/ExpressionDict.mjs +0 -727
- package/esm2020/src/exp/ExpressionEvaluator.mjs +0 -4212
- package/esm2020/src/exp/ExpressionLocalJpn.mjs +0 -314
- package/esm2020/src/exp/YesNoExp.mjs +0 -36
- package/esm2020/src/gui/CreatedFormVector.mjs +0 -23
- package/esm2020/src/gui/FormsTable.mjs +0 -66
- package/esm2020/src/gui/MgControl.mjs +0 -353
- package/esm2020/src/gui/MgForm.mjs +0 -1181
- package/esm2020/src/http/HttpManager.mjs +0 -97
- package/esm2020/src/http/client/HttpClientAsync.mjs +0 -67
- package/esm2020/src/http/client/HttpClientEvents.mjs +0 -39
- package/esm2020/src/http/client/HttpClientSync.mjs +0 -42
- package/esm2020/src/http/client/HttpUtility.mjs +0 -84
- package/esm2020/src/remote/RemoteCommandsProcessor.mjs +0 -880
- package/esm2020/src/remote/ServerError.mjs +0 -40
- package/esm2020/src/rt/Argument.mjs +0 -265
- package/esm2020/src/rt/ArgumentsList.mjs +0 -103
- package/esm2020/src/rt/Boundary.mjs +0 -152
- package/esm2020/src/rt/CompMainPrgTable.mjs +0 -65
- package/esm2020/src/rt/DataviewHeaderBase.mjs +0 -96
- package/esm2020/src/rt/DataviewHeaders.mjs +0 -53
- package/esm2020/src/rt/LastFocusedManager.mjs +0 -67
- package/esm2020/src/rt/Operation.mjs +0 -735
- package/esm2020/src/rt/OperationTable.mjs +0 -67
- package/esm2020/src/rt/Recompute.mjs +0 -355
- package/esm2020/src/rt/ResultValue.mjs +0 -12
- package/esm2020/src/rt/TableCache.mjs +0 -177
- package/esm2020/src/rt/TableCacheManager.mjs +0 -67
- package/esm2020/src/rt/Transaction.mjs +0 -53
- package/esm2020/src/security/UserDetails.mjs +0 -71
- package/esm2020/src/tasks/MGData.mjs +0 -552
- package/esm2020/src/tasks/MGDataCollection.mjs +0 -252
- package/esm2020/src/tasks/RCTimer.mjs +0 -63
- package/esm2020/src/tasks/Task.mjs +0 -2495
- package/esm2020/src/tasks/TaskBase.mjs +0 -87
- package/esm2020/src/tasks/TasksTable.mjs +0 -80
- package/esm2020/src/tasks/sort/Sort.mjs +0 -7
- package/esm2020/src/util/FlowMonitorQueue.mjs +0 -453
- package/esm2020/src/util/MgPriorityBlockingQueue.mjs +0 -74
- package/esm2020/src/util/MgPriorityQueue.mjs +0 -66
- package/esm2020/src/util/PrmMap.mjs +0 -151
- package/esm2020/src/util/ReturnResult.mjs +0 -46
- package/esm2020/src/util/ReturnResultBase.mjs +0 -18
- package/esm2020/src/util/Scrambler.mjs +0 -89
- package/esm2020/src/util/UniqueIDUtils.mjs +0 -12
- package/fesm2015/magic-xpa-engine.mjs +0 -30835
- package/fesm2015/magic-xpa-engine.mjs.map +0 -1
- package/fesm2020/magic-xpa-engine.mjs.map +0 -1
@@ -0,0 +1,67 @@
|
|
1
|
+
import { ApplicationException, Int32, List } from "@magic-xpa/mscorelib";
|
2
|
+
import { Operation } from "./Operation";
|
3
|
+
import { ConstInterface } from "../ConstInterface";
|
4
|
+
export class OperationTable {
|
5
|
+
_operations = new List();
|
6
|
+
_firstBlockOperIdx = Int32.MaxValue;
|
7
|
+
constructor() {
|
8
|
+
}
|
9
|
+
fillData(taskRef, evtHandler, parser) {
|
10
|
+
while (this.initInnerObjects(parser.getNextTag(), taskRef, evtHandler, parser)) {
|
11
|
+
}
|
12
|
+
for (let i = this._firstBlockOperIdx; i < this._operations.length; i = i + 1) {
|
13
|
+
let operation = this._operations.get_Item(i);
|
14
|
+
let operType = operation.getType();
|
15
|
+
if (operType === ConstInterface.MG_OPER_LOOP || operType === ConstInterface.MG_OPER_BLOCK ||
|
16
|
+
operType === ConstInterface.MG_OPER_ELSE) {
|
17
|
+
let operIdx = this.serverId2operIdx(operation.getBlockClose(), i + 1);
|
18
|
+
operation.setBlockClose(operIdx);
|
19
|
+
operIdx = this.serverId2operIdx(operation.getBlockEnd(), operIdx);
|
20
|
+
operation.setBlockEnd(operIdx);
|
21
|
+
}
|
22
|
+
}
|
23
|
+
}
|
24
|
+
initInnerObjects(foundTagName, taskRef, evtHandler, parser) {
|
25
|
+
if (foundTagName != null && foundTagName === (ConstInterface.MG_TAG_OPER)) {
|
26
|
+
let oper = new Operation();
|
27
|
+
oper.fillData(taskRef, evtHandler, parser);
|
28
|
+
this._operations.push(oper);
|
29
|
+
if (this._firstBlockOperIdx === Int32.MaxValue
|
30
|
+
&& (oper.getType() === ConstInterface.MG_OPER_LOOP || oper.getType() === ConstInterface.MG_OPER_BLOCK))
|
31
|
+
this._firstBlockOperIdx = this._operations.length - 1;
|
32
|
+
return true;
|
33
|
+
}
|
34
|
+
return false;
|
35
|
+
}
|
36
|
+
getSize() {
|
37
|
+
return this._operations.length;
|
38
|
+
}
|
39
|
+
getOperation(idx) {
|
40
|
+
if (idx >= 0 && idx < this._operations.length)
|
41
|
+
return this._operations.get_Item(idx);
|
42
|
+
throw new ApplicationException("in OperationTable.getOperation() index out of bounds: " + idx);
|
43
|
+
}
|
44
|
+
serverId2operIdx(id, startFrom) {
|
45
|
+
let operIdx = -1;
|
46
|
+
for (let i = startFrom; i < this._operations.length; i = i + 1) {
|
47
|
+
let operation = this._operations.get_Item(i);
|
48
|
+
if (id === operation.getServerId()) {
|
49
|
+
operIdx = i;
|
50
|
+
break;
|
51
|
+
}
|
52
|
+
}
|
53
|
+
return operIdx;
|
54
|
+
}
|
55
|
+
serverId2FollowingOperIdx(id, startFrom) {
|
56
|
+
let operIdx = -1;
|
57
|
+
for (let i = startFrom; i < this._operations.length; i = i + 1) {
|
58
|
+
let operation = this._operations.get_Item(i);
|
59
|
+
if (id < oper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gIH1cclxuICAgIH1cclxuICAgIHJldHVybiBvcGVySWR4O1xyXG4gIH1cclxufVxyXG4iXX0=
|
@@ -0,0 +1,355 @@
|
|
1
|
+
import { PropInterface, PropTable } from "@magic-xpa/gui";
|
2
|
+
import { FieldBase } from "../data/FieldBase";
|
3
|
+
import { List } from "@magic-xpa/mscorelib";
|
4
|
+
import { CommandsProcessorBase_SendingInstruction } from "../CommandsProcessorBase";
|
5
|
+
import { Constants, InternalInterface, Logger, XMLConstants, XmlParser } from "@magic-xpa/utils";
|
6
|
+
import { Record } from "../data/Record";
|
7
|
+
import { CommandFactory } from "../commands/ClientToServer/CommandFactory";
|
8
|
+
import { RemoteCommandsProcessor } from "../remote/RemoteCommandsProcessor";
|
9
|
+
import { DataviewHeaderBase } from "./DataviewHeaderBase";
|
10
|
+
import { FlowMonitorQueue } from "../util/FlowMonitorQueue";
|
11
|
+
import { ConstInterface } from "../ConstInterface";
|
12
|
+
import { Environment } from "../env/Environment";
|
13
|
+
import { AccessHelper } from "../AccessHelper";
|
14
|
+
export var Recompute_RcmpBy;
|
15
|
+
(function (Recompute_RcmpBy) {
|
16
|
+
Recompute_RcmpBy["CLIENT"] = "C";
|
17
|
+
Recompute_RcmpBy["SERVER_ON_CHANGE"] = "O";
|
18
|
+
})(Recompute_RcmpBy || (Recompute_RcmpBy = {}));
|
19
|
+
export class Recompute {
|
20
|
+
_ctrlProps = null;
|
21
|
+
_formProps = null;
|
22
|
+
_isOwnerFld = true;
|
23
|
+
OwnerFld = null;
|
24
|
+
_rcmpOrder = null;
|
25
|
+
_subForms = null;
|
26
|
+
_subFormsOnlyRecomp = false;
|
27
|
+
_hasServerLinksRecomputes = false;
|
28
|
+
RcmpMode = null;
|
29
|
+
Task = null;
|
30
|
+
constructor() {
|
31
|
+
}
|
32
|
+
fillData(dataView, taskRef, parser) {
|
33
|
+
this.Task = taskRef;
|
34
|
+
this._isOwnerFld = true;
|
35
|
+
while (this.initInnerObjects(parser, parser.getNextTag(), dataView)) {
|
36
|
+
}
|
37
|
+
}
|
38
|
+
initInnerObjects(parser, foundTagName, dataView) {
|
39
|
+
switch (foundTagName) {
|
40
|
+
case XMLConstants.MG_TAG_FLD:
|
41
|
+
if (this._isOwnerFld) {
|
42
|
+
this.fillFldField(parser, dataView);
|
43
|
+
this._isOwnerFld = false;
|
44
|
+
}
|
45
|
+
else
|
46
|
+
this.fillFldField(parser, dataView);
|
47
|
+
break;
|
48
|
+
case ConstInterface.MG_TAG_LINK:
|
49
|
+
this.fillLink(parser, dataView);
|
50
|
+
break;
|
51
|
+
case XMLConstants.MG_TAG_CONTROL:
|
52
|
+
if (this._ctrlProps == null)
|
53
|
+
this._ctrlProps = new PropTable();
|
54
|
+
this._ctrlProps.fillDataByExists(this.Task, parser);
|
55
|
+
if (this._ctrlProps.getCtrlRef() != null && this._ctrlProps.getCtrlRef().IsRepeatable && this.OwnerFld.IsVirtual &&
|
56
|
+
!(this.OwnerFld.hasInitExp()))
|
57
|
+
this.OwnerFld.causeTableInvalidation(true);
|
58
|
+
break;
|
59
|
+
case XMLConstants.MG_TAG_FORM_PROPERTIES:
|
60
|
+
if (this._formProps == null)
|
61
|
+
this._formProps = new PropTable();
|
62
|
+
this._formProps.fillDataByExists(this.Task, parser);
|
63
|
+
break;
|
64
|
+
case ConstInterface.MG_TAG_FLD_END:
|
65
|
+
parser.setCurrIndex2EndOfTag();
|
66
|
+
return false;
|
67
|
+
default:
|
68
|
+
Logger.Instance.WriteExceptionToLogWithMsg("There is no such tag in Recompute. Insert else if to Recompute.initInnerObjects for " + foundTagName);
|
69
|
+
return false;
|
70
|
+
}
|
71
|
+
return true;
|
72
|
+
}
|
73
|
+
AddRecomputeItem(item) {
|
74
|
+
if (this._rcmpOrder === null)
|
75
|
+
this._rcmpOrder = new List();
|
76
|
+
this._rcmpOrder.push(item);
|
77
|
+
}
|
78
|
+
fillLink(parser, dataView) {
|
79
|
+
let endContext = parser.getXMLdata().indexOf(XMLConstants.TAG_TERM, parser.getCurrIndex());
|
80
|
+
if (endContext !== -1 && endContext < parser.getXMLdata().length) {
|
81
|
+
let tag = parser.getXMLsubstring(endContext);
|
82
|
+
parser.add2CurrIndex(tag.indexOf(ConstInterface.MG_TAG_LINK) + ConstInterface.MG_TAG_LINK.length);
|
83
|
+
let tokensVector = XmlParser.getTokens(parser.getXMLsubstring(endContext), XMLConstants.XML_ATTR_DELIM);
|
84
|
+
for (let j = 0; j < tokensVector.length; j += 2) {
|
85
|
+
let attribute = (tokensVector.get_Item(j));
|
86
|
+
let valueStr = (tokensVector.get_Item(j + 1));
|
87
|
+
if (attribute === XMLConstants.MG_ATTR_ID)
|
88
|
+
this.AddRecomputeItem(dataView.getTask().getDataviewHeaders().getDataviewHeaderById(XmlParser.getInt(valueStr)));
|
89
|
+
else
|
90
|
+
Logger.Instance.WriteExceptionToLogWithMsg("There is no such tag in Recompute class. Insert case to Recompute.fillLink for " + attribute);
|
91
|
+
}
|
92
|
+
parser.setCurrIndex(endContext + XMLConstants.TAG_TERM.length);
|
93
|
+
return;
|
94
|
+
}
|
95
|
+
else
|
96
|
+
Logger.Instance.WriteExceptionToLogWithMsg("in Recompute.fillLink() out of bounds");
|
97
|
+
}
|
98
|
+
fillFldField(parser, dataView) {
|
99
|
+
let endContext = parser.getXMLdata().indexOf(this._isOwnerFld
|
100
|
+
? XMLConstants.TAG_CLOSE
|
101
|
+
: XMLConstants.TAG_TERM, parser.getCurrIndex());
|
102
|
+
if (endContext !== -1 && endContext < parser.getXMLdata().length) {
|
103
|
+
let tag = parser.getXMLsubstring(endContext);
|
104
|
+
parser.add2CurrIndex(tag.indexOf(XMLConstants.MG_TAG_FLD) + XMLConstants.MG_TAG_FLD.length);
|
105
|
+
let tokensVector = XmlParser.getTokens(parser.getXMLsubstring(endContext), XMLConstants.XML_ATTR_DELIM);
|
106
|
+
this.initElements(tokensVector, dataView);
|
107
|
+
if (this._isOwnerFld) {
|
108
|
+
parser.setCurrIndex(++endContext);
|
109
|
+
return;
|
110
|
+
}
|
111
|
+
parser.setCurrIndex(endContext + XMLConstants.TAG_TERM.length);
|
112
|
+
return;
|
113
|
+
}
|
114
|
+
Logger.Instance.WriteExceptionToLogWithMsg("in Command.FillData() out of bounds");
|
115
|
+
}
|
116
|
+
initElements(tokensVector, dataView) {
|
117
|
+
for (let j = 0; j < tokensVector.length; j += 2) {
|
118
|
+
let attribute = (tokensVector.get_Item(j));
|
119
|
+
let valueStr = (tokensVector.get_Item(j + 1));
|
120
|
+
switch (attribute) {
|
121
|
+
case XMLConstants.MG_ATTR_ID: {
|
122
|
+
let fldId = XmlParser.getInt(valueStr);
|
123
|
+
let fld = dataView.getField(fldId);
|
124
|
+
if (this._isOwnerFld) {
|
125
|
+
this.OwnerFld = fld;
|
126
|
+
this.OwnerFld.setRecompute(this);
|
127
|
+
}
|
128
|
+
else {
|
129
|
+
fld.setRecomputed();
|
130
|
+
this.AddRecomputeItem(fld);
|
131
|
+
}
|
132
|
+
break;
|
133
|
+
}
|
134
|
+
case ConstInterface.MG_ATTR_RECOMPUTEBY:
|
135
|
+
this.RcmpMode = valueStr[0];
|
136
|
+
break;
|
137
|
+
case ConstInterface.MG_ATTR_SUB_FORM_RCMP:
|
138
|
+
this._subFormsOnlyRecomp = true;
|
139
|
+
break;
|
140
|
+
case ConstInterface.MG_ATTR_HAS_LINK_RECOMPUTES:
|
141
|
+
this._hasServerLinksRecomputes = true;
|
142
|
+
break;
|
143
|
+
case XMLConstants.MG_ATTR_NAME:
|
144
|
+
break;
|
145
|
+
default:
|
146
|
+
Logger.Instance.WriteExceptionToLogWithMsg("There is no such tag in Recompute class. Insert case to Recompute.initElements for " + attribute);
|
147
|
+
break;
|
148
|
+
}
|
149
|
+
}
|
150
|
+
}
|
151
|
+
async execute(rec) {
|
152
|
+
let i;
|
153
|
+
let fld;
|
154
|
+
let cmdsToServer = this.Task.getMGData().CmdsToServer;
|
155
|
+
let cmd;
|
156
|
+
try {
|
157
|
+
rec.setInRecompute(true);
|
158
|
+
this.Task.SetInRecompute(true);
|
159
|
+
this.SetSubformsInRecompute(true);
|
160
|
+
let allowServerRecompute = this._hasServerLinksRecomputes ||
|
161
|
+
(this.Task.getForm().AllowedSubformRecompute && await this.checkRefreshSubForms());
|
162
|
+
if (this.RcmpMode !== Recompute_RcmpBy.CLIENT && allowServerRecompute) {
|
163
|
+
let inClient = this._subFormsOnlyRecomp;
|
164
|
+
this.Task.ExecuteClientSubformRefresh = false;
|
165
|
+
if (inClient) {
|
166
|
+
inClient = await this.Task.prepareCache(true);
|
167
|
+
if (inClient)
|
168
|
+
inClient = await this.Task.testAndSet(true);
|
169
|
+
}
|
170
|
+
if (!inClient) {
|
171
|
+
this.Task.DataView.GetFieldsTab().setServerRcmp(true);
|
172
|
+
cmd = CommandFactory.CreateRecomputeCommand(this.Task.getTaskTag(), this.OwnerFld.getId(), !this.Task.getForm().AllowedSubformRecompute);
|
173
|
+
cmdsToServer.Add(cmd);
|
174
|
+
await RemoteCommandsProcessor.GetInstance().Execute(CommandsProcessorBase_SendingInstruction.TASKS_AND_COMMANDS);
|
175
|
+
}
|
176
|
+
if (this.Task.ExecuteClientSubformRefresh)
|
177
|
+
await this.RefreshSubforms();
|
178
|
+
else {
|
179
|
+
if (await this.recPrefixSubForms())
|
180
|
+
await this.recSuffixSubForms();
|
181
|
+
this.Task.CleanDoSubformPrefixSuffix();
|
182
|
+
}
|
183
|
+
}
|
184
|
+
else {
|
185
|
+
try {
|
186
|
+
FlowMonitorQueue.Instance.addRecompute(this.OwnerFld.getVarName(), this.Task.GetTaskDetails());
|
187
|
+
if (this._formProps != null)
|
188
|
+
await this._formProps.RefreshDisplay(false, false);
|
189
|
+
if (this._ctrlProps != null)
|
190
|
+
await this._ctrlProps.RefreshDisplay(false, false);
|
191
|
+
if (this._rcmpOrder != null) {
|
192
|
+
for (i = 0; i < this._rcmpOrder.length; i++) {
|
193
|
+
if (this._rcmpOrder.get_Item(i) instanceof FieldBase) {
|
194
|
+
fld = this._rcmpOrder.get_Item(i);
|
195
|
+
await this.fldRcmp(fld, true);
|
196
|
+
}
|
197
|
+
else if (this._rcmpOrder.get_Item(i) instanceof DataviewHeaderBase) {
|
198
|
+
let curLnk = this._rcmpOrder.get_Item(i);
|
199
|
+
await curLnk.getLinkedRecord(rec);
|
200
|
+
let linkFields = this.Task.DataView.GetFieldsTab().getLinkFields(curLnk.Id);
|
201
|
+
rec.setInCompute(true);
|
202
|
+
let saveInForceUpdate = rec.InForceUpdate;
|
203
|
+
rec.InForceUpdate = false;
|
204
|
+
for (let j = 0; j < linkFields.length; j++) {
|
205
|
+
await this.fldRcmp(linkFields.get_Item(j), false);
|
206
|
+
rec.clearFlag((linkFields.get_Item(j)).getId(), Record.FLAG_UPDATED);
|
207
|
+
rec.clearFlag((linkFields.get_Item(j)).getId(), Record.FLAG_MODIFIED);
|
208
|
+
rec.clearFlag((linkFields.get_Item(j)).getId(), Record.FLAG_CRSR_MODIFIED);
|
209
|
+
rec.clearHistoryFlag((linkFields.get_Item(j)).getId());
|
210
|
+
}
|
211
|
+
rec.InForceUpdate = saveInForceUpdate;
|
212
|
+
let retFld = curLnk.ReturnField;
|
213
|
+
if (retFld != null)
|
214
|
+
await this.fldRcmp(retFld, false);
|
215
|
+
rec.setInCompute(false);
|
216
|
+
rec.setForceSaveOrg(true);
|
217
|
+
}
|
218
|
+
}
|
219
|
+
}
|
220
|
+
await this.RefreshSubforms();
|
221
|
+
}
|
222
|
+
catch (e) {
|
223
|
+
Logger.Instance.WriteExceptionToLogWithMsg("in Recompute.execute(): " + e.Message);
|
224
|
+
}
|
225
|
+
}
|
226
|
+
this.Task.SetInRecompute(false);
|
227
|
+
this.SetSubformsInRecompute(false);
|
228
|
+
}
|
229
|
+
finally {
|
230
|
+
rec.buildLinksPosStr();
|
231
|
+
rec.setInRecompute(false);
|
232
|
+
}
|
233
|
+
}
|
234
|
+
async RefreshSubforms() {
|
235
|
+
if (this.Task.getForm().AllowedSubformRecompute) {
|
236
|
+
let subformsToRefresh = await this.GetSubformsToRefresh();
|
237
|
+
for (let i = 0; i < subformsToRefresh.length; i++) {
|
238
|
+
let subformTask = subformsToRefresh.get_Item(i);
|
239
|
+
await this.Task.SubformRefresh(subformTask, true);
|
240
|
+
}
|
241
|
+
}
|
242
|
+
}
|
243
|
+
async SetSubformsInRecompute(inRecompute) {
|
244
|
+
let subformsToRefresh = await this.GetSubformsToRefresh();
|
245
|
+
for (let i = 0; i < subformsToRefresh.length; i++) {
|
246
|
+
let subformTask = subformsToRefresh.get_Item(i);
|
247
|
+
subformTask.SetInRecompute(inRecompute);
|
248
|
+
}
|
249
|
+
}
|
250
|
+
async fldRcmp(fld, computeField) {
|
251
|
+
if (fld.IsVirtual
|
252
|
+
|| ((this.Task.getMode() !== Constants.TASK_MODE_QUERY ||
|
253
|
+
Environment.Instance.allowUpdateInQueryMode(this.Task.getCompIdx())))) {
|
254
|
+
if (!fld.isInEvalProcess()) {
|
255
|
+
if (computeField)
|
256
|
+
await fld.compute(true);
|
257
|
+
else
|
258
|
+
await fld.setValueAndStartRecompute(fld.getValue(false), fld.isNull(), true, false, false);
|
259
|
+
await fld.updateDisplay();
|
260
|
+
}
|
261
|
+
}
|
262
|
+
}
|
263
|
+
buildSubFormList() {
|
264
|
+
if (this._subForms === null) {
|
265
|
+
this._subForms = new List();
|
266
|
+
let subTasksTab = this.Task.getSubTasks();
|
267
|
+
if (subTasksTab !== null) {
|
268
|
+
for (let i = 0; i < subTasksTab.getSize(); i = i + 1) {
|
269
|
+
let subForm = subTasksTab.getTask(i);
|
270
|
+
if (subForm.getForm().getSubFormCtrl() !== null && subForm.refreshesOn(this.OwnerFld.getId())) {
|
271
|
+
this._subForms.push(subForm);
|
272
|
+
}
|
273
|
+
}
|
274
|
+
}
|
275
|
+
}
|
276
|
+
}
|
277
|
+
RemoveSubform(subformTask) {
|
278
|
+
this._subForms.Remove(subformTask);
|
279
|
+
}
|
280
|
+
AddSubform(subformTask) {
|
281
|
+
if (this._subForms === null)
|
282
|
+
this._subForms = new List();
|
283
|
+
if (!this._subForms.Contains(subformTask))
|
284
|
+
this._subForms.push(subformTask);
|
285
|
+
}
|
286
|
+
async recSuffixSubForms() {
|
287
|
+
let i;
|
288
|
+
let subForm;
|
289
|
+
let successful = true;
|
290
|
+
let subformCtrl;
|
291
|
+
this.buildSubFormList();
|
292
|
+
for (i = 0; successful && i < this._subForms.length; i++) {
|
293
|
+
subForm = this._subForms.get_Item(i);
|
294
|
+
subformCtrl = subForm.getForm().getSubFormCtrl();
|
295
|
+
if (subForm.isStarted() && !subformCtrl.RefreshOnVisible &&
|
296
|
+
await subformCtrl.checkProp(PropInterface.PROP_TYPE_AUTO_REFRESH, true) && !subForm.InSelect
|
297
|
+
&& subForm.DoSubformPrefixSuffix) {
|
298
|
+
await AccessHelper.eventsManager.handleInternalEventWithTask(subForm, InternalInterface.MG_ACT_REC_SUFFIX);
|
299
|
+
successful = !AccessHelper.eventsManager.GetStopExecutionFlag();
|
300
|
+
}
|
301
|
+
}
|
302
|
+
this.Task.DataView.setPrevCurrRec();
|
303
|
+
return (successful);
|
304
|
+
}
|
305
|
+
async checkRefreshSubForms() {
|
306
|
+
let refresh = !this._subFormsOnlyRecomp;
|
307
|
+
let subformsToRefresh = await this.GetSubformsToRefresh();
|
308
|
+
if (subformsToRefresh.length > 0)
|
309
|
+
refresh = true;
|
310
|
+
return refresh;
|
311
|
+
}
|
312
|
+
async GetSubformsToRefresh() {
|
313
|
+
let subTasks = new List();
|
314
|
+
let subformCtrl;
|
315
|
+
this.buildSubFormList();
|
316
|
+
for (let i = 0; i < this._subForms.length; i++) {
|
317
|
+
let subTask = this._subForms[i];
|
318
|
+
subformCtrl = subTask.getForm().getSubFormCtrl();
|
319
|
+
if (subTask.isStarted() && await subformCtrl.checkProp(PropInterface.PROP_TYPE_AUTO_REFRESH, true) &&
|
320
|
+
!subTask.InSelect && !subTask.InEndTask) {
|
321
|
+
await subformCtrl.checkProp(PropInterface.PROP_TYPE_VISIBLE, true);
|
322
|
+
if (!subformCtrl.isVisible() && !await subformCtrl.checkProp(PropInterface.PROP_TYPE_REFRESH_WHEN_HIDDEN, false))
|
323
|
+
subformCtrl.RefreshOnVisible = true;
|
324
|
+
else
|
325
|
+
subTasks.push(subTask);
|
326
|
+
}
|
327
|
+
}
|
328
|
+
return subTasks;
|
329
|
+
}
|
330
|
+
async recPrefixSubForms() {
|
331
|
+
let i;
|
332
|
+
let subForm;
|
333
|
+
let successful = true;
|
334
|
+
let subformCtrl;
|
335
|
+
this.buildSubFormList();
|
336
|
+
for (i = 0; successful && i < this._subForms.length; i++) {
|
337
|
+
subForm = this._subForms.get_Item(i);
|
338
|
+
subformCtrl = subForm.getForm().getSubFormCtrl();
|
339
|
+
if (subForm.isStarted() && !subformCtrl.RefreshOnVisible
|
340
|
+
&& await subformCtrl.checkProp(PropInterface.PROP_TYPE_AUTO_REFRESH, true)
|
341
|
+
&& !subForm.InSelect && subForm.DoSubformPrefixSuffix) {
|
342
|
+
await AccessHelper.eventsManager.handleInternalEventWithTaskAndSubformRefresh(subForm, InternalInterface.MG_ACT_REC_PREFIX, true);
|
343
|
+
successful = !AccessHelper.eventsManager.GetStopExecutionFlag();
|
344
|
+
}
|
345
|
+
}
|
346
|
+
return successful;
|
347
|
+
}
|
348
|
+
notifyServerOnChange() {
|
349
|
+
return this.RcmpMode === Recompute_RcmpBy.SERVER_ON_CHANGE;
|
350
|
+
}
|
351
|
+
isServerRcmp() {
|
352
|
+
return this.RcmpMode !== Recompute_RcmpBy.CLIENT;
|
353
|
+
}
|
354
|
+
}
|
355
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiUmVjb21wdXRlLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vcHJvamVjdHMvZW5naW5lL3NyYy9ydC9SZWNvbXB1dGUudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUFDLGFBQWEsRUFB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