@magic-xpa/engine 4.1100.0-dev4110.25 → 4.1100.0-dev4110.250
Sign up to get free protection for your applications and to get access to all the features.
- package/{esm2020 → esm2022}/index.mjs +188 -188
- package/{esm2020 → esm2022}/magic-xpa-engine.mjs +1 -1
- package/esm2022/src/AccessHelper.mjs +15 -0
- package/esm2022/src/ClientManager.mjs +416 -0
- package/esm2022/src/CommandsProcessorBase.mjs +56 -0
- package/esm2022/src/CommandsProcessorManager.mjs +26 -0
- package/esm2022/src/CommandsTable.mjs +162 -0
- package/esm2022/src/ConstInterface.mjs +517 -0
- package/{esm2020 → esm2022}/src/CurrentClientVersion.mjs +2 -2
- package/esm2022/src/FlowMonitorInterface.mjs +16 -0
- package/esm2022/src/GUIManager.mjs +62 -0
- package/esm2022/src/GlobalCommandsManager.mjs +34 -0
- package/esm2022/src/GuiEventsProcessor.mjs +156 -0
- package/{esm2020 → esm2022}/src/ICommandsTable.mjs +1 -1
- package/esm2022/src/ServerConfig.mjs +122 -0
- package/{esm2020 → esm2022}/src/bridge/IGuiEvent.mjs +19 -19
- package/esm2022/src/bridge/MagicBridge.mjs +41 -0
- package/esm2022/src/commands/ClientOriginatedCommandTaskTag.mjs +12 -0
- package/{esm2020 → esm2022}/src/commands/ClientToServer/AddUserLocateDataViewCommand.mjs +8 -8
- package/{esm2020 → esm2022}/src/commands/ClientToServer/AddUserRangeDataviewCommand.mjs +9 -9
- package/{esm2020 → esm2022}/src/commands/ClientToServer/AddUserSortDataViewCommand.mjs +9 -9
- package/esm2022/src/commands/ClientToServer/BrowserEscEventCommand.mjs +26 -0
- package/{esm2020 → esm2022}/src/commands/ClientToServer/ClientOriginatedCommand.mjs +14 -14
- package/esm2022/src/commands/ClientToServer/ClientOriginatedCommandSerializer.mjs +60 -0
- package/esm2022/src/commands/ClientToServer/ColumnSortEventCommand.mjs +29 -0
- package/esm2022/src/commands/ClientToServer/CommandFactory.mjs +261 -0
- package/esm2022/src/commands/ClientToServer/CommandSerializationHelper.mjs +67 -0
- package/esm2022/src/commands/ClientToServer/ComputeEventCommand.mjs +26 -0
- package/{esm2020 → esm2022}/src/commands/ClientToServer/ContextTerminationEventCommand.mjs +24 -21
- package/{esm2020 → esm2022}/src/commands/ClientToServer/ContextTimeoutResetCommand.mjs +23 -20
- package/{esm2020 → esm2022}/src/commands/ClientToServer/ControlItemsRefreshCommand.mjs +8 -8
- package/esm2022/src/commands/ClientToServer/DataViewOutputCommand.mjs +13 -0
- package/{esm2020 → esm2022}/src/commands/ClientToServer/DataviewCommand.mjs +44 -44
- package/esm2022/src/commands/ClientToServer/EvaluateCommand.mjs +40 -0
- package/{esm2020 → esm2022}/src/commands/ClientToServer/EventCommand.mjs +43 -40
- package/esm2022/src/commands/ClientToServer/ExecOperCommand.mjs +70 -0
- package/esm2022/src/commands/ClientToServer/FetchDataControlValuesEventCommand.mjs +25 -0
- package/{esm2020 → esm2022}/src/commands/ClientToServer/GlobalParamsQueryCommand.mjs +10 -10
- package/{esm2020 → esm2022}/src/commands/ClientToServer/ICommandTaskTag.mjs +1 -1
- package/esm2022/src/commands/ClientToServer/IndexChangeEventCommand.mjs +24 -0
- package/esm2022/src/commands/ClientToServer/IniputForceWriteCommand.mjs +26 -0
- package/{esm2020 → esm2022}/src/commands/ClientToServer/NonReversibleExitEventCommand.mjs +26 -23
- package/{esm2020 → esm2022}/src/commands/ClientToServer/QueryCommand.mjs +20 -20
- package/esm2022/src/commands/ClientToServer/RecomputeCommand.mjs +30 -0
- package/esm2022/src/commands/ClientToServer/RefreshEventCommand.mjs +30 -0
- package/esm2022/src/commands/ClientToServer/RefreshScreenEventCommand.mjs +27 -0
- package/esm2022/src/commands/ClientToServer/RollbackEventCommand.mjs +43 -0
- package/esm2022/src/commands/ClientToServer/SelectProgramCommand.mjs +19 -0
- package/{esm2020 → esm2022}/src/commands/ClientToServer/SetTransactionStateDataviewCommand.mjs +9 -9
- package/esm2022/src/commands/ClientToServer/SubformOpenEventCommand.mjs +24 -0
- package/esm2022/src/commands/ClientToServer/SubformRefreshEventCommand.mjs +27 -0
- package/esm2022/src/commands/ClientToServer/TransactionCommand.mjs +34 -0
- package/{esm2020 → esm2022}/src/commands/ClientToServer/UnloadCommand.mjs +18 -15
- package/esm2022/src/commands/ClientToServer/WriteMessageToServerLogCommand.mjs +18 -0
- package/esm2022/src/commands/DataViewCommandBase.mjs +8 -0
- package/{esm2020 → esm2022}/src/commands/IClientCommand.mjs +1 -1
- package/esm2022/src/commands/IClientTargetedCommand.mjs +13 -0
- package/{esm2020 → esm2022}/src/commands/IClientToServerCommandInfo.mjs +2 -2
- package/esm2022/src/commands/ServerToClient/AbortCommand.mjs +65 -0
- package/{esm2020 → esm2022}/src/commands/ServerToClient/AddLocateCommand.mjs +21 -21
- package/esm2022/src/commands/ServerToClient/AddRangeCommand.mjs +62 -0
- package/esm2022/src/commands/ServerToClient/AddSortCommand.mjs +33 -0
- package/esm2022/src/commands/ServerToClient/ClientRefreshCommand.mjs +25 -0
- package/esm2022/src/commands/ServerToClient/ClientTargetedCommandBase.mjs +24 -0
- package/esm2022/src/commands/ServerToClient/EnhancedVerifyCommand.mjs +45 -0
- package/esm2022/src/commands/ServerToClient/OpenURLCommand.mjs +221 -0
- package/{esm2020 → esm2022}/src/commands/ServerToClient/ResetLocateCommand.mjs +14 -14
- package/{esm2020 → esm2022}/src/commands/ServerToClient/ResetRangeCommand.mjs +14 -14
- package/{esm2020 → esm2022}/src/commands/ServerToClient/ResetSortCommand.mjs +14 -14
- package/esm2022/src/commands/ServerToClient/ResultCommand.mjs +37 -0
- package/esm2022/src/commands/ServerToClient/VerifyCommand.mjs +83 -0
- package/esm2022/src/commands/ServerToClient/XMLBasedCommandBuilder.mjs +132 -0
- package/{esm2020 → esm2022}/src/communications/IConnectionStateManager.mjs +1 -1
- package/esm2022/src/communications/InteractiveCommunicationsFailureHandler.mjs +15 -0
- package/{esm2020 → esm2022}/src/data/DataSourceIdKey.mjs +2 -2
- package/esm2022/src/data/DataView.mjs +1613 -0
- package/{esm2020 → esm2022}/src/data/DataViewBase.mjs +3 -3
- package/esm2022/src/data/DataviewManager.mjs +28 -0
- package/esm2022/src/data/DataviewManagerBase.mjs +15 -0
- package/esm2022/src/data/DvCache.mjs +67 -0
- package/esm2022/src/data/Field.mjs +646 -0
- package/esm2022/src/data/FieldBase.mjs +15 -0
- package/esm2022/src/data/FieldsTable.mjs +103 -0
- package/{esm2020 → esm2022}/src/data/IRecordsTable.mjs +1 -1
- package/esm2022/src/data/Key.mjs +88 -0
- package/esm2022/src/data/Record.mjs +880 -0
- package/{esm2020 → esm2022}/src/data/RecordOutOfDataViewException.mjs +15 -15
- package/esm2022/src/data/RecordsTable.mjs +267 -0
- package/esm2022/src/data/TaskTransactionManager.mjs +107 -0
- package/esm2022/src/data/XMLBasedDcValuesBuilder.mjs +74 -0
- package/{esm2020 → esm2022}/src/enums.mjs +23 -23
- package/esm2022/src/env/EnvVariablesTable.mjs +340 -0
- package/esm2022/src/env/Environment.mjs +487 -0
- package/{esm2020 → esm2022}/src/env/ILanguageData.mjs +1 -1
- package/esm2022/src/env/LanguageData.mjs +227 -0
- package/esm2022/src/env/MirrorString.mjs +65 -0
- package/esm2022/src/event/ActionManager.mjs +91 -0
- package/esm2022/src/event/Event.mjs +1333 -0
- package/esm2022/src/event/EventHandler.mjs +766 -0
- package/esm2022/src/event/EventHandlerPosition.mjs +204 -0
- package/esm2022/src/event/EventsManager.mjs +2988 -0
- package/{esm2020 → esm2022}/src/event/IEventsManager.mjs +6 -6
- package/esm2022/src/event/RunTimeEvent.mjs +399 -0
- package/{esm2020 → esm2022}/src/event/RunTimeEventBase.mjs +3 -3
- package/esm2022/src/event/UserEventsTable.mjs +47 -0
- package/esm2022/src/exp/ExpTable.mjs +57 -0
- package/esm2022/src/exp/Expression.mjs +200 -0
- package/esm2022/src/exp/ExpressionDict.mjs +727 -0
- package/esm2022/src/exp/ExpressionEvaluator.mjs +4206 -0
- package/esm2022/src/exp/ExpressionLocalJpn.mjs +314 -0
- package/esm2022/src/exp/GlobalParamsTable.mjs +85 -0
- package/esm2022/src/exp/YesNoExp.mjs +36 -0
- package/esm2022/src/gui/CreatedFormVector.mjs +23 -0
- package/esm2022/src/gui/FormsTable.mjs +66 -0
- package/esm2022/src/gui/MgControl.mjs +363 -0
- package/esm2022/src/gui/MgForm.mjs +1224 -0
- package/esm2022/src/http/HttpManager.mjs +97 -0
- package/esm2022/src/http/client/HttpClientAsync.mjs +68 -0
- package/esm2022/src/http/client/HttpClientBase.mjs +132 -0
- package/esm2022/src/http/client/HttpClientEvents.mjs +39 -0
- package/esm2022/src/http/client/HttpClientSync.mjs +42 -0
- package/esm2022/src/http/client/HttpUtility.mjs +84 -0
- package/{esm2020 → esm2022}/src/http/client/ICommunicationsFailureHandler.mjs +1 -1
- package/esm2022/src/remote/AddUserLocateRemoteDataViewCommand.mjs +18 -0
- package/esm2022/src/remote/AddUserRangeRemoteDataViewCommand.mjs +18 -0
- package/esm2022/src/remote/AddUserSortRemoteDataViewCommand.mjs +18 -0
- package/esm2022/src/remote/RemoteCommandsProcessor.mjs +883 -0
- package/esm2022/src/remote/RemoteControlItemsRefreshCommand.mjs +25 -0
- package/esm2022/src/remote/RemoteDataViewCommandBase.mjs +24 -0
- package/esm2022/src/remote/RemoteDataViewCommandFactory.mjs +61 -0
- package/{esm2020 → esm2022}/src/remote/RemoteDataViewCommandUpdateNonModifiable.mjs +15 -15
- package/{esm2020 → esm2022}/src/remote/RemoteDataviewManager.mjs +17 -17
- package/{esm2020 → esm2022}/src/remote/RemoteInitDataViewCommand.mjs +10 -10
- package/esm2022/src/remote/ResetUserLocateRemoteDataviewCommand.mjs +17 -0
- package/{esm2020 → esm2022}/src/remote/ResetUserRangeRemoteDataviewCommand.mjs +12 -12
- package/esm2022/src/remote/ResetUserSortRemoteDataviewCommand.mjs +16 -0
- package/esm2022/src/remote/ServerError.mjs +40 -0
- package/esm2022/src/remote/SetTransactionStateRemoteDataViewCommand.mjs +20 -0
- package/esm2022/src/rt/Argument.mjs +265 -0
- package/esm2022/src/rt/ArgumentsList.mjs +103 -0
- package/esm2022/src/rt/Boundary.mjs +152 -0
- package/esm2022/src/rt/CompMainPrgTable.mjs +63 -0
- package/{esm2020 → esm2022}/src/rt/DataviewHeaderBase.mjs +98 -96
- package/{esm2020 → esm2022}/src/rt/DataviewHeaderFactory.mjs +6 -6
- package/esm2022/src/rt/DataviewHeaders.mjs +53 -0
- package/esm2022/src/rt/DataviewHeadersSaxHandler.mjs +38 -0
- package/esm2022/src/rt/ExecutionStack.mjs +94 -0
- package/{esm2020 → esm2022}/src/rt/ExecutionStackEntry.mjs +17 -17
- package/esm2022/src/rt/HandlersTable.mjs +96 -0
- package/{esm2020 → esm2022}/src/rt/IDataSourceViewDefinition.mjs +1 -1
- package/{esm2020 → esm2022}/src/rt/IDataviewHeader.mjs +1 -1
- package/{esm2020 → esm2022}/src/rt/IResultValue.mjs +1 -1
- package/esm2022/src/rt/LastFocusedManager.mjs +65 -0
- package/esm2022/src/rt/Operation.mjs +735 -0
- package/esm2022/src/rt/OperationTable.mjs +67 -0
- package/esm2022/src/rt/Recompute.mjs +355 -0
- package/esm2022/src/rt/RecomputeTable.mjs +63 -0
- package/esm2022/src/rt/RemoteDataviewHeader.mjs +108 -0
- package/esm2022/src/rt/ResultValue.mjs +10 -0
- package/esm2022/src/rt/TableCache.mjs +177 -0
- package/esm2022/src/rt/TableCacheManager.mjs +67 -0
- package/esm2022/src/rt/Transaction.mjs +53 -0
- package/esm2022/src/security/UserDetails.mjs +71 -0
- package/{esm2020 → esm2022}/src/tasks/IMGDataCollection.mjs +1 -1
- package/esm2022/src/tasks/MGData.mjs +552 -0
- package/esm2022/src/tasks/MGDataCollection.mjs +252 -0
- package/esm2022/src/tasks/RCTimer.mjs +63 -0
- package/esm2022/src/tasks/RemoteTaskService.mjs +45 -0
- package/esm2022/src/tasks/Task.mjs +2499 -0
- package/esm2022/src/tasks/TaskBase.mjs +83 -0
- package/esm2022/src/tasks/TaskServiceBase.mjs +25 -0
- package/esm2022/src/tasks/TasksTable.mjs +80 -0
- package/esm2022/src/tasks/sort/Sort.mjs +5 -0
- package/esm2022/src/tasks/sort/SortCollection.mjs +67 -0
- package/esm2022/src/util/ConstUtils.mjs +14 -0
- package/esm2022/src/util/FlowMonitorQueue.mjs +451 -0
- package/esm2022/src/util/HeapSort.mjs +70 -0
- package/{esm2020 → esm2022}/src/util/IMirrorXML.mjs +1 -1
- package/{esm2020 → esm2022}/src/util/IServerConfig.mjs +1 -1
- package/{esm2020 → esm2022}/src/util/MgBlockingQueue.mjs +1 -1
- package/esm2022/src/util/MgPriorityBlockingQueue.mjs +74 -0
- package/esm2022/src/util/MgPriorityQueue.mjs +66 -0
- package/{esm2020 → esm2022}/src/util/ParamParseResult.mjs +7 -7
- package/esm2022/src/util/PrmMap.mjs +152 -0
- package/esm2022/src/util/ReturnResult.mjs +46 -0
- package/esm2022/src/util/ReturnResultBase.mjs +18 -0
- package/esm2022/src/util/Scrambler.mjs +89 -0
- package/esm2022/src/util/UniqueIDUtils.mjs +13 -0
- package/esm2022/src/util/cookie.service.mjs +92 -0
- package/{fesm2020 → fesm2022}/magic-xpa-engine.mjs +29883 -29693
- package/fesm2022/magic-xpa-engine.mjs.map +1 -0
- package/index.d.ts +187 -187
- package/package.json +8 -14
- package/src/AccessHelper.d.ts +20 -20
- package/src/ClientManager.d.ts +35 -32
- package/src/CommandsProcessorBase.d.ts +23 -23
- package/src/CommandsProcessorManager.d.ts +6 -6
- package/src/CommandsTable.d.ts +22 -22
- package/src/ConstInterface.d.ts +516 -515
- package/src/CurrentClientVersion.d.ts +1 -1
- package/src/FlowMonitorInterface.d.ts +15 -15
- package/src/GUIManager.d.ts +17 -17
- package/src/GlobalCommandsManager.d.ts +17 -17
- package/src/GuiEventsProcessor.d.ts +24 -24
- package/src/ICommandsTable.d.ts +9 -9
- package/src/ServerConfig.d.ts +35 -34
- package/src/bridge/IGuiEvent.d.ts +19 -19
- package/src/bridge/MagicBridge.d.ts +16 -16
- package/src/commands/ClientOriginatedCommandTaskTag.d.ts +8 -8
- package/src/commands/ClientToServer/AddUserLocateDataViewCommand.d.ts +4 -4
- package/src/commands/ClientToServer/AddUserRangeDataviewCommand.d.ts +6 -6
- package/src/commands/ClientToServer/AddUserSortDataViewCommand.d.ts +6 -6
- package/src/commands/ClientToServer/BrowserEscEventCommand.d.ts +9 -8
- package/src/commands/ClientToServer/ClientOriginatedCommand.d.ts +8 -8
- package/src/commands/ClientToServer/ClientOriginatedCommandSerializer.d.ts +6 -6
- package/src/commands/ClientToServer/ColumnSortEventCommand.d.ts +11 -10
- package/src/commands/ClientToServer/CommandFactory.d.ts +64 -64
- package/src/commands/ClientToServer/CommandSerializationHelper.d.ts +20 -20
- package/src/commands/ClientToServer/ComputeEventCommand.d.ts +9 -8
- package/src/commands/ClientToServer/ContextTerminationEventCommand.d.ts +8 -7
- package/src/commands/ClientToServer/ContextTimeoutResetCommand.d.ts +8 -7
- package/src/commands/ClientToServer/ControlItemsRefreshCommand.d.ts +6 -6
- package/src/commands/ClientToServer/DataViewOutputCommand.d.ts +9 -9
- package/src/commands/ClientToServer/DataviewCommand.d.ts +32 -32
- package/src/commands/ClientToServer/EvaluateCommand.d.ts +16 -15
- package/src/commands/ClientToServer/EventCommand.d.ts +16 -15
- package/src/commands/ClientToServer/ExecOperCommand.d.ts +24 -23
- package/src/commands/ClientToServer/FetchDataControlValuesEventCommand.d.ts +9 -8
- package/src/commands/ClientToServer/GlobalParamsQueryCommand.d.ts +5 -5
- package/src/commands/ClientToServer/ICommandTaskTag.d.ts +3 -3
- package/src/commands/ClientToServer/IndexChangeEventCommand.d.ts +9 -8
- package/src/commands/ClientToServer/IniputForceWriteCommand.d.ts +11 -10
- package/src/commands/ClientToServer/NonReversibleExitEventCommand.d.ts +9 -8
- package/src/commands/ClientToServer/QueryCommand.d.ts +8 -8
- package/src/commands/ClientToServer/RecomputeCommand.d.ts +12 -11
- package/src/commands/ClientToServer/RefreshEventCommand.d.ts +13 -12
- package/src/commands/ClientToServer/RefreshScreenEventCommand.d.ts +11 -10
- package/src/commands/ClientToServer/RollbackEventCommand.d.ts +15 -14
- package/src/commands/ClientToServer/SelectProgramCommand.d.ts +7 -6
- package/src/commands/ClientToServer/SetTransactionStateDataviewCommand.d.ts +5 -5
- package/src/commands/ClientToServer/SubformOpenEventCommand.d.ts +9 -8
- package/src/commands/ClientToServer/SubformRefreshEventCommand.d.ts +10 -9
- package/src/commands/ClientToServer/TransactionCommand.d.ts +14 -12
- package/src/commands/ClientToServer/UnloadCommand.d.ts +8 -7
- package/src/commands/ClientToServer/WriteMessageToServerLogCommand.d.ts +6 -6
- package/src/commands/DataViewCommandBase.d.ts +6 -6
- package/src/commands/IClientCommand.d.ts +2 -2
- package/src/commands/IClientTargetedCommand.d.ts +12 -12
- package/src/commands/IClientToServerCommandInfo.d.ts +4 -3
- package/src/commands/ServerToClient/AbortCommand.d.ts +11 -11
- package/src/commands/ServerToClient/AddLocateCommand.d.ts +6 -6
- package/src/commands/ServerToClient/AddRangeCommand.d.ts +10 -10
- package/src/commands/ServerToClient/AddSortCommand.d.ts +9 -9
- package/src/commands/ServerToClient/ClientRefreshCommand.d.ts +7 -7
- package/src/commands/ServerToClient/ClientTargetedCommandBase.d.ts +12 -12
- package/src/commands/ServerToClient/EnhancedVerifyCommand.d.ts +13 -13
- package/src/commands/ServerToClient/OpenURLCommand.d.ts +21 -21
- package/src/commands/ServerToClient/ResetLocateCommand.d.ts +6 -6
- package/src/commands/ServerToClient/ResetRangeCommand.d.ts +6 -6
- package/src/commands/ServerToClient/ResetSortCommand.d.ts +6 -6
- package/src/commands/ServerToClient/ResultCommand.d.ts +10 -10
- package/src/commands/ServerToClient/VerifyCommand.d.ts +17 -17
- package/src/commands/ServerToClient/XMLBasedCommandBuilder.d.ts +11 -11
- package/src/communications/IConnectionStateManager.d.ts +4 -4
- package/src/communications/InteractiveCommunicationsFailureHandler.d.ts +6 -6
- package/src/data/DataSourceIdKey.d.ts +2 -2
- package/src/data/DataView.d.ts +162 -162
- package/src/data/DataViewBase.d.ts +12 -12
- package/src/data/DataviewManager.d.ts +14 -14
- package/src/data/DataviewManagerBase.d.ts +11 -11
- package/src/data/DvCache.d.ts +15 -15
- package/src/data/Field.d.ts +103 -103
- package/src/data/FieldBase.d.ts +23 -23
- package/src/data/FieldsTable.d.ts +27 -27
- package/src/data/IRecordsTable.d.ts +7 -7
- package/src/data/Key.d.ts +15 -15
- package/src/data/Record.d.ts +157 -156
- package/src/data/RecordOutOfDataViewException.d.ts +10 -10
- package/src/data/RecordsTable.d.ts +38 -38
- package/src/data/TaskTransactionManager.d.ts +17 -17
- package/src/data/XMLBasedDcValuesBuilder.d.ts +11 -11
- package/src/enums.d.ts +21 -21
- package/src/env/EnvVariablesTable.d.ts +17 -17
- package/src/env/Environment.d.ts +118 -118
- package/src/env/ILanguageData.d.ts +3 -3
- package/src/env/LanguageData.d.ts +20 -20
- package/src/env/MirrorString.d.ts +15 -15
- package/src/event/ActionManager.d.ts +14 -14
- package/src/event/Event.d.ts +79 -79
- package/src/event/EventHandler.d.ts +66 -66
- package/src/event/EventHandlerPosition.d.ts +25 -25
- package/src/event/EventsManager.d.ts +205 -204
- package/src/event/IEventsManager.d.ts +77 -77
- package/src/event/RunTimeEvent.d.ts +126 -123
- package/src/event/RunTimeEventBase.d.ts +5 -5
- package/src/event/UserEventsTable.d.ts +11 -11
- package/src/exp/ExpTable.d.ts +11 -11
- package/src/exp/Expression.d.ts +37 -37
- package/src/exp/ExpressionDict.d.ts +12 -12
- package/src/exp/ExpressionEvaluator.d.ts +198 -198
- package/src/exp/ExpressionLocalJpn.d.ts +18 -18
- package/src/exp/GlobalParamsTable.d.ts +19 -19
- package/src/exp/YesNoExp.d.ts +9 -9
- package/src/gui/CreatedFormVector.d.ts +10 -10
- package/src/gui/FormsTable.d.ts +15 -15
- package/src/gui/MgControl.d.ts +60 -60
- package/src/gui/MgForm.d.ts +96 -93
- package/src/http/HttpManager.d.ts +25 -25
- package/src/http/client/HttpClientAsync.d.ts +16 -16
- package/src/http/client/HttpClientBase.d.ts +30 -30
- package/src/http/client/HttpClientEvents.d.ts +18 -18
- package/src/http/client/HttpClientSync.d.ts +17 -17
- package/src/http/client/HttpUtility.d.ts +10 -10
- package/src/http/client/ICommunicationsFailureHandler.d.ts +5 -5
- package/src/remote/AddUserLocateRemoteDataViewCommand.d.ts +8 -8
- package/src/remote/AddUserRangeRemoteDataViewCommand.d.ts +8 -8
- package/src/remote/AddUserSortRemoteDataViewCommand.d.ts +8 -8
- package/src/remote/RemoteCommandsProcessor.d.ts +51 -51
- package/src/remote/RemoteControlItemsRefreshCommand.d.ts +8 -8
- package/src/remote/RemoteDataViewCommandBase.d.ts +10 -10
- package/src/remote/RemoteDataViewCommandFactory.d.ts +6 -6
- package/src/remote/RemoteDataViewCommandUpdateNonModifiable.d.ts +8 -8
- package/src/remote/RemoteDataviewManager.d.ts +9 -9
- package/src/remote/RemoteInitDataViewCommand.d.ts +7 -7
- package/src/remote/ResetUserLocateRemoteDataviewCommand.d.ts +7 -7
- package/src/remote/ResetUserRangeRemoteDataviewCommand.d.ts +7 -7
- package/src/remote/ResetUserSortRemoteDataviewCommand.d.ts +7 -7
- package/src/remote/ServerError.d.ts +16 -16
- package/src/remote/SetTransactionStateRemoteDataViewCommand.d.ts +8 -8
- package/src/rt/Argument.d.ts +36 -36
- package/src/rt/ArgumentsList.d.ts +24 -24
- package/src/rt/Boundary.d.ts +27 -27
- package/src/rt/CompMainPrgTable.d.ts +10 -10
- package/src/rt/DataviewHeaderBase.d.ts +34 -34
- package/src/rt/DataviewHeaderFactory.d.ts +5 -5
- package/src/rt/DataviewHeaders.d.ts +12 -12
- package/src/rt/DataviewHeadersSaxHandler.d.ts +10 -10
- package/src/rt/ExecutionStack.d.ts +22 -22
- package/src/rt/ExecutionStackEntry.d.ts +7 -7
- package/src/rt/HandlersTable.d.ts +19 -19
- package/src/rt/IDataSourceViewDefinition.d.ts +6 -6
- package/src/rt/IDataviewHeader.d.ts +10 -10
- package/src/rt/IResultValue.d.ts +4 -4
- package/src/rt/LastFocusedManager.d.ts +23 -23
- package/src/rt/Operation.d.ts +97 -97
- package/src/rt/OperationTable.d.ts +15 -15
- package/src/rt/Recompute.d.ts +41 -41
- package/src/rt/RecomputeTable.d.ts +9 -9
- package/src/rt/RemoteDataviewHeader.d.ts +14 -14
- package/src/rt/ResultValue.d.ts +7 -7
- package/src/rt/TableCache.d.ts +29 -29
- package/src/rt/TableCacheManager.d.ts +10 -10
- package/src/rt/Transaction.d.ts +23 -23
- package/src/security/UserDetails.d.ts +16 -16
- package/src/tasks/IMGDataCollection.d.ts +26 -26
- package/src/tasks/MGData.d.ts +63 -63
- package/src/tasks/MGDataCollection.d.ts +42 -42
- package/src/tasks/RCTimer.d.ts +13 -13
- package/src/tasks/RemoteTaskService.d.ts +16 -16
- package/src/tasks/Task.d.ts +312 -312
- package/src/tasks/TaskBase.d.ts +123 -123
- package/src/tasks/TaskServiceBase.d.ts +16 -16
- package/src/tasks/TasksTable.d.ts +21 -21
- package/src/tasks/sort/Sort.d.ts +4 -4
- package/src/tasks/sort/SortCollection.d.ts +11 -11
- package/src/util/ConstUtils.d.ts +3 -3
- package/src/util/FlowMonitorQueue.d.ts +70 -70
- package/src/util/HeapSort.d.ts +6 -6
- package/src/util/IMirrorXML.d.ts +6 -6
- package/src/util/IServerConfig.d.ts +11 -11
- package/src/util/MgBlockingQueue.d.ts +5 -5
- package/src/util/MgPriorityBlockingQueue.d.ts +17 -17
- package/src/util/MgPriorityQueue.d.ts +13 -13
- package/src/util/ParamParseResult.d.ts +6 -6
- package/src/util/PrmMap.d.ts +28 -28
- package/src/util/ReturnResult.d.ts +18 -18
- package/src/util/ReturnResultBase.d.ts +11 -11
- package/src/util/Scrambler.d.ts +10 -10
- package/src/util/UniqueIDUtils.d.ts +4 -4
- package/src/util/cookie.service.d.ts +8 -8
- package/esm2020/src/AccessHelper.mjs +0 -9
- package/esm2020/src/ClientManager.mjs +0 -399
- package/esm2020/src/CommandsProcessorBase.mjs +0 -58
- package/esm2020/src/CommandsProcessorManager.mjs +0 -26
- package/esm2020/src/CommandsTable.mjs +0 -162
- package/esm2020/src/ConstInterface.mjs +0 -516
- package/esm2020/src/FlowMonitorInterface.mjs +0 -16
- package/esm2020/src/GUIManager.mjs +0 -62
- package/esm2020/src/GlobalCommandsManager.mjs +0 -34
- package/esm2020/src/GuiEventsProcessor.mjs +0 -154
- package/esm2020/src/ServerConfig.mjs +0 -117
- package/esm2020/src/bridge/MagicBridge.mjs +0 -41
- package/esm2020/src/commands/ClientOriginatedCommandTaskTag.mjs +0 -11
- package/esm2020/src/commands/ClientToServer/BrowserEscEventCommand.mjs +0 -23
- package/esm2020/src/commands/ClientToServer/ClientOriginatedCommandSerializer.mjs +0 -60
- package/esm2020/src/commands/ClientToServer/ColumnSortEventCommand.mjs +0 -26
- package/esm2020/src/commands/ClientToServer/CommandFactory.mjs +0 -260
- package/esm2020/src/commands/ClientToServer/CommandSerializationHelper.mjs +0 -69
- package/esm2020/src/commands/ClientToServer/ComputeEventCommand.mjs +0 -23
- package/esm2020/src/commands/ClientToServer/DataViewOutputCommand.mjs +0 -13
- package/esm2020/src/commands/ClientToServer/EvaluateCommand.mjs +0 -36
- package/esm2020/src/commands/ClientToServer/ExecOperCommand.mjs +0 -67
- package/esm2020/src/commands/ClientToServer/FetchDataControlValuesEventCommand.mjs +0 -22
- package/esm2020/src/commands/ClientToServer/IndexChangeEventCommand.mjs +0 -21
- package/esm2020/src/commands/ClientToServer/IniputForceWriteCommand.mjs +0 -23
- package/esm2020/src/commands/ClientToServer/RecomputeCommand.mjs +0 -27
- package/esm2020/src/commands/ClientToServer/RefreshEventCommand.mjs +0 -27
- package/esm2020/src/commands/ClientToServer/RefreshScreenEventCommand.mjs +0 -24
- package/esm2020/src/commands/ClientToServer/RollbackEventCommand.mjs +0 -39
- package/esm2020/src/commands/ClientToServer/SelectProgramCommand.mjs +0 -15
- package/esm2020/src/commands/ClientToServer/SubformOpenEventCommand.mjs +0 -21
- package/esm2020/src/commands/ClientToServer/SubformRefreshEventCommand.mjs +0 -24
- package/esm2020/src/commands/ClientToServer/TransactionCommand.mjs +0 -28
- package/esm2020/src/commands/ClientToServer/WriteMessageToServerLogCommand.mjs +0 -18
- package/esm2020/src/commands/DataViewCommandBase.mjs +0 -10
- package/esm2020/src/commands/IClientTargetedCommand.mjs +0 -9
- package/esm2020/src/commands/ServerToClient/AbortCommand.mjs +0 -65
- package/esm2020/src/commands/ServerToClient/AddRangeCommand.mjs +0 -62
- package/esm2020/src/commands/ServerToClient/AddSortCommand.mjs +0 -33
- package/esm2020/src/commands/ServerToClient/ClientRefreshCommand.mjs +0 -25
- package/esm2020/src/commands/ServerToClient/ClientTargetedCommandBase.mjs +0 -27
- package/esm2020/src/commands/ServerToClient/EnhancedVerifyCommand.mjs +0 -45
- package/esm2020/src/commands/ServerToClient/OpenURLCommand.mjs +0 -221
- package/esm2020/src/commands/ServerToClient/ResultCommand.mjs +0 -37
- package/esm2020/src/commands/ServerToClient/VerifyCommand.mjs +0 -83
- package/esm2020/src/commands/ServerToClient/XMLBasedCommandBuilder.mjs +0 -132
- package/esm2020/src/communications/InteractiveCommunicationsFailureHandler.mjs +0 -17
- package/esm2020/src/data/DataView.mjs +0 -1610
- package/esm2020/src/data/DataviewManager.mjs +0 -28
- package/esm2020/src/data/DataviewManagerBase.mjs +0 -15
- package/esm2020/src/data/DvCache.mjs +0 -67
- package/esm2020/src/data/Field.mjs +0 -646
- package/esm2020/src/data/FieldBase.mjs +0 -18
- package/esm2020/src/data/FieldsTable.mjs +0 -103
- package/esm2020/src/data/Key.mjs +0 -88
- package/esm2020/src/data/Record.mjs +0 -846
- package/esm2020/src/data/RecordsTable.mjs +0 -267
- package/esm2020/src/data/TaskTransactionManager.mjs +0 -103
- package/esm2020/src/data/XMLBasedDcValuesBuilder.mjs +0 -74
- package/esm2020/src/env/EnvVariablesTable.mjs +0 -340
- package/esm2020/src/env/Environment.mjs +0 -489
- package/esm2020/src/env/LanguageData.mjs +0 -226
- package/esm2020/src/env/MirrorString.mjs +0 -65
- package/esm2020/src/event/ActionManager.mjs +0 -91
- package/esm2020/src/event/Event.mjs +0 -1333
- package/esm2020/src/event/EventHandler.mjs +0 -766
- package/esm2020/src/event/EventHandlerPosition.mjs +0 -204
- package/esm2020/src/event/EventsManager.mjs +0 -2975
- package/esm2020/src/event/RunTimeEvent.mjs +0 -392
- package/esm2020/src/event/UserEventsTable.mjs +0 -47
- package/esm2020/src/exp/ExpTable.mjs +0 -59
- package/esm2020/src/exp/Expression.mjs +0 -200
- package/esm2020/src/exp/ExpressionDict.mjs +0 -727
- package/esm2020/src/exp/ExpressionEvaluator.mjs +0 -4212
- package/esm2020/src/exp/ExpressionLocalJpn.mjs +0 -314
- package/esm2020/src/exp/GlobalParamsTable.mjs +0 -85
- package/esm2020/src/exp/YesNoExp.mjs +0 -36
- package/esm2020/src/gui/CreatedFormVector.mjs +0 -23
- package/esm2020/src/gui/FormsTable.mjs +0 -66
- package/esm2020/src/gui/MgControl.mjs +0 -353
- package/esm2020/src/gui/MgForm.mjs +0 -1181
- package/esm2020/src/http/HttpManager.mjs +0 -97
- package/esm2020/src/http/client/HttpClientAsync.mjs +0 -67
- package/esm2020/src/http/client/HttpClientBase.mjs +0 -132
- package/esm2020/src/http/client/HttpClientEvents.mjs +0 -39
- package/esm2020/src/http/client/HttpClientSync.mjs +0 -42
- package/esm2020/src/http/client/HttpUtility.mjs +0 -84
- package/esm2020/src/remote/AddUserLocateRemoteDataViewCommand.mjs +0 -18
- package/esm2020/src/remote/AddUserRangeRemoteDataViewCommand.mjs +0 -18
- package/esm2020/src/remote/AddUserSortRemoteDataViewCommand.mjs +0 -18
- package/esm2020/src/remote/RemoteCommandsProcessor.mjs +0 -880
- package/esm2020/src/remote/RemoteControlItemsRefreshCommand.mjs +0 -25
- package/esm2020/src/remote/RemoteDataViewCommandBase.mjs +0 -24
- package/esm2020/src/remote/RemoteDataViewCommandFactory.mjs +0 -61
- package/esm2020/src/remote/ResetUserLocateRemoteDataviewCommand.mjs +0 -17
- package/esm2020/src/remote/ResetUserSortRemoteDataviewCommand.mjs +0 -16
- package/esm2020/src/remote/ServerError.mjs +0 -40
- package/esm2020/src/remote/SetTransactionStateRemoteDataViewCommand.mjs +0 -20
- package/esm2020/src/rt/Argument.mjs +0 -265
- package/esm2020/src/rt/ArgumentsList.mjs +0 -103
- package/esm2020/src/rt/Boundary.mjs +0 -152
- package/esm2020/src/rt/CompMainPrgTable.mjs +0 -65
- package/esm2020/src/rt/DataviewHeaders.mjs +0 -53
- package/esm2020/src/rt/DataviewHeadersSaxHandler.mjs +0 -38
- package/esm2020/src/rt/ExecutionStack.mjs +0 -94
- package/esm2020/src/rt/HandlersTable.mjs +0 -96
- package/esm2020/src/rt/LastFocusedManager.mjs +0 -67
- package/esm2020/src/rt/Operation.mjs +0 -735
- package/esm2020/src/rt/OperationTable.mjs +0 -67
- package/esm2020/src/rt/Recompute.mjs +0 -355
- package/esm2020/src/rt/RecomputeTable.mjs +0 -63
- package/esm2020/src/rt/RemoteDataviewHeader.mjs +0 -108
- package/esm2020/src/rt/ResultValue.mjs +0 -12
- package/esm2020/src/rt/TableCache.mjs +0 -177
- package/esm2020/src/rt/TableCacheManager.mjs +0 -67
- package/esm2020/src/rt/Transaction.mjs +0 -53
- package/esm2020/src/security/UserDetails.mjs +0 -71
- package/esm2020/src/tasks/MGData.mjs +0 -552
- package/esm2020/src/tasks/MGDataCollection.mjs +0 -252
- package/esm2020/src/tasks/RCTimer.mjs +0 -63
- package/esm2020/src/tasks/RemoteTaskService.mjs +0 -45
- package/esm2020/src/tasks/Task.mjs +0 -2495
- package/esm2020/src/tasks/TaskBase.mjs +0 -87
- package/esm2020/src/tasks/TaskServiceBase.mjs +0 -25
- package/esm2020/src/tasks/TasksTable.mjs +0 -80
- package/esm2020/src/tasks/sort/Sort.mjs +0 -7
- package/esm2020/src/tasks/sort/SortCollection.mjs +0 -67
- package/esm2020/src/util/ConstUtils.mjs +0 -14
- package/esm2020/src/util/FlowMonitorQueue.mjs +0 -453
- package/esm2020/src/util/HeapSort.mjs +0 -70
- package/esm2020/src/util/MgPriorityBlockingQueue.mjs +0 -74
- package/esm2020/src/util/MgPriorityQueue.mjs +0 -66
- package/esm2020/src/util/PrmMap.mjs +0 -151
- package/esm2020/src/util/ReturnResult.mjs +0 -46
- package/esm2020/src/util/ReturnResultBase.mjs +0 -18
- package/esm2020/src/util/Scrambler.mjs +0 -89
- package/esm2020/src/util/UniqueIDUtils.mjs +0 -12
- package/esm2020/src/util/cookie.service.mjs +0 -92
- package/fesm2015/magic-xpa-engine.mjs +0 -30835
- package/fesm2015/magic-xpa-engine.mjs.map +0 -1
- package/fesm2020/magic-xpa-engine.mjs.map +0 -1
@@ -0,0 +1,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 < operation.getServerId()) {
|
60
|
+
operIdx = i;
|
61
|
+
break;
|
62
|
+
}
|
63
|
+
}
|
64
|
+
return operIdx;
|
65
|
+
}
|
66
|
+
}
|
67
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiT3BlcmF0aW9uVGFibGUuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8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-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,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiUmVjb21wdXRlLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vcHJvamVjdHMvZW5naW5lL3NyYy9ydC9SZWNvbXB1dGUudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUFDLGFBQWEsRUFBRSxTQUFTLEVBQUMsTUFBTSxnQkFBZ0IsQ0FBQztBQUN4RCxPQUFPLEVBQUMsU0FBUyxFQUFDLE1BQU0sbUJBQW1CLENBQUM7QUFDNUMsT0FBTyx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9ybUN0cmwuY2hlY2tQcm9wKFByb3BJbnRlcmZhY2UuUFJPUF9UWVBFX0FVVE9fUkVGUkVTSCwgdHJ1ZSlcclxuICAgICAgICAmJiAhc3ViRm9ybS5JblNlbGVjdCAmJiBzdWJGb3JtLkRvU3ViZm9ybVByZWZpeFN1ZmZpeCkge1xyXG4gICAgICAgIGF3YWl0IEFjY2Vzc0hlbHBlci5ldmVudHNNYW5hZ2VyLmhhbmRsZUludGVybmFsRXZlbnRXaXRoVGFza0FuZFN1YmZvcm1SZWZyZXNoKHN1YkZvcm0sIEludGVybmFsSW50ZXJmYWNlLk1HX0FDVF9SRUNfUFJFRklYLCB0cnVlKTtcclxuICAgICAgICBzdWNjZXNzZnVsID0gIUFjY2Vzc0hlbHBlci5ldmVudHNNYW5hZ2VyLkdldFN0b3BFeGVjdXRpb25GbGFnKCk7XHJcbiAgICAgIH1cclxuICAgIH1cclxuICAgIHJldHVybiBzdWNjZXNzZnVsO1xyXG4gIH1cclxuXHJcbiAgbm90aWZ5U2VydmVyT25DaGFuZ2UoKTogYm9vbGVhbiB7XHJcbiAgICByZXR1cm4gdGhpcy5SY21wTW9kZSA9PT0gUmVjb21wdXRlX1JjbXBCeS5TRVJWRVJfT05fQ0hBTkdFO1xyXG4gIH1cclxuXHJcbiAgLy8vIDxyZXR1cm5zPiB0cnVlIGlmIHRoZSBjbGllbnQgZG9lc24ndCBrbm93IHRvIHJlY29tcHV0ZSB0aGlzIGZpZWxkPC9yZXR1cm5zPlxyXG4gIGlzU2VydmVyUmNtcCgpOiBib29sZWFuIHtcclxuICAgIHJldHVybiB0aGlzLlJjbXBNb2RlICE9PSBSZWNvbXB1dGVfUmNtcEJ5LkNMSUVOVDtcclxuICB9XHJcblxyXG59XHJcbiJdfQ==
|
@@ -0,0 +1,63 @@
|
|
1
|
+
import { NString } from "@magic-xpa/mscorelib";
|
2
|
+
import { Base64, Logger, XMLConstants, XmlParser } from "@magic-xpa/utils";
|
3
|
+
import { Recompute } from "./Recompute";
|
4
|
+
import { AccessHelper } from "../AccessHelper";
|
5
|
+
export class RecomputeTable {
|
6
|
+
fillAttributes(parser) {
|
7
|
+
let endContext = parser.getXMLdata().indexOf(XMLConstants.TAG_CLOSE, parser.getCurrIndex());
|
8
|
+
let Index = parser.getXMLdata().indexOf(XMLConstants.MG_TAG_RECOMPUTE, parser.getCurrIndex()) + XMLConstants.MG_TAG_RECOMPUTE.length;
|
9
|
+
let task = null;
|
10
|
+
let tokensVector = XmlParser.getTokens(parser.getXMLdata().substr(Index, endContext - Index), '"');
|
11
|
+
for (let j = 0; j < tokensVector.length; j += 2) {
|
12
|
+
let attribute = (tokensVector.get_Item(j));
|
13
|
+
let valueStr = (tokensVector.get_Item(j + 1));
|
14
|
+
if (attribute === XMLConstants.MG_ATTR_TASKID)
|
15
|
+
task = AccessHelper.mgDataTable.GetTaskByID(valueStr);
|
16
|
+
else
|
17
|
+
Logger.Instance.WriteExceptionToLogWithMsg(NString.Format("Unrecognized attribute: '{0}'", attribute));
|
18
|
+
}
|
19
|
+
parser.setCurrIndex(parser.getXMLdata().indexOf(XMLConstants.TAG_CLOSE, parser.getCurrIndex()) + 1);
|
20
|
+
return task;
|
21
|
+
}
|
22
|
+
fillData(parser) {
|
23
|
+
let task = this.fillAttributes(parser);
|
24
|
+
if (task !== null) {
|
25
|
+
Logger.Instance.WriteDevToLog("goes to refill recompute");
|
26
|
+
this.fillData_1(task.DataView, task, parser);
|
27
|
+
}
|
28
|
+
else
|
29
|
+
parser.setCurrIndex(parser.getXMLdata().indexOf(XMLConstants.TAG_CLOSE, parser.getCurrIndex()) + 1);
|
30
|
+
}
|
31
|
+
fillData_1(dataView, task, parser) {
|
32
|
+
if (parser.getNextTag() == XMLConstants.MG_TAG_RECOMPUTE) {
|
33
|
+
let currrentIndex = parser.getCurrIndex();
|
34
|
+
let encoded = parser.ReadContentOfCurrentElement().trim();
|
35
|
+
let decoded = Base64.decode(encoded.substr(0, encoded.length).trim());
|
36
|
+
let newXmlData = parser.getXMLdata().replace(encoded.trim(), decoded);
|
37
|
+
parser.setXMLdata(newXmlData);
|
38
|
+
parser.setCurrIndex(currrentIndex);
|
39
|
+
}
|
40
|
+
while (this.initInnerObjects(parser, parser.getNextTag(), dataView, task)) {
|
41
|
+
}
|
42
|
+
}
|
43
|
+
initInnerObjects(parser, nameOfFound, dataView, task) {
|
44
|
+
if (nameOfFound === null)
|
45
|
+
return false;
|
46
|
+
if (nameOfFound === XMLConstants.MG_TAG_RECOMPUTE)
|
47
|
+
parser.setCurrIndex(parser.getXMLdata().indexOf(XMLConstants.TAG_CLOSE, parser.getCurrIndex()) + 1);
|
48
|
+
else if (nameOfFound === XMLConstants.MG_TAG_FLD) {
|
49
|
+
let recompute = new Recompute();
|
50
|
+
recompute.fillData(dataView, task, parser);
|
51
|
+
}
|
52
|
+
else if (nameOfFound === '/' + XMLConstants.MG_TAG_RECOMPUTE) {
|
53
|
+
parser.setCurrIndex2EndOfTag();
|
54
|
+
return false;
|
55
|
+
}
|
56
|
+
else {
|
57
|
+
Logger.Instance.WriteExceptionToLogWithMsg("There is no such tag in <recompute>, add case to RecomputeTable.initInnerObjects for " + nameOfFound);
|
58
|
+
return false;
|
59
|
+
}
|
60
|
+
return true;
|
61
|
+
}
|
62
|
+
}
|
63
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiUmVjb21wdXRlVGFibGUuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi9wcm9qZWN0cy9lbmdpbmUvc3JjL3J0L1JlY29tcHV0ZVRhYmxlLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFBTyxPQUFPLEVBQUMsTUFBTSxzQkFBc0IsQ0FBQztBQUNuRCxPQUFPLEVBQUMsTUFBTSxFQUFFLE1BQU0sRUFBRSxZQUFZLEVBQUUsU0FBUyxFQUFDLE1BQU0sa0JBQWtCLENB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