@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,451 @@
|
|
1
|
+
import { BlobType, DisplayConvertor, PIC, VectorType } from '@magic-xpa/gui';
|
2
|
+
import { DateTime, NString, StringBuilder } from '@magic-xpa/mscorelib';
|
3
|
+
import { Constants, DateTimeUtils, InternalInterface, Logger, Queue, StorageAttribute, XMLConstants, XmlParser } from '@magic-xpa/utils';
|
4
|
+
import { FlowMonitorInterface } from '../FlowMonitorInterface';
|
5
|
+
import { ConstInterface } from '../ConstInterface';
|
6
|
+
export class FlowMonitorQueue {
|
7
|
+
static _instance = null;
|
8
|
+
static UNPRINTABLE_STR_LOG = "#UNPRINTABLE#";
|
9
|
+
static S_EVENT_STR1 = ">>Starts ";
|
10
|
+
static S_EVENT_STR2 = " Event";
|
11
|
+
static S_EVENT_PROPAGATED = "Event was propagated";
|
12
|
+
static E_EVENT_STR = "<<Ends Event";
|
13
|
+
static S_RECPRF_STR = "Starts Record Prefix";
|
14
|
+
static E_RECPRF_STR = "Ends Record Prefix";
|
15
|
+
static S_RECSUF_STR = "Starts Record Suffix";
|
16
|
+
static E_RECSUF_STR = "Ends Record Suffix";
|
17
|
+
static S_TASKSUF_STR = "Starts Task Suffix";
|
18
|
+
static E_TASKSUF_STR = "Ends Task Suffix";
|
19
|
+
static S_TASKPRF_STR = "Starts Task Prefix";
|
20
|
+
static E_TASKPRF_STR = "Ends Task Prefix";
|
21
|
+
static S_CTRLPRF_STR = "Starts Control Prefix - ";
|
22
|
+
static E_CTRLPRF_STR = "Ends Control Prefix - ";
|
23
|
+
static S_CTRLSUF_STR = "Starts Control Suffix - ";
|
24
|
+
static E_CTRLSUF_STR = "Ends Control Suffix - ";
|
25
|
+
static S_HANDLER_STR = "Starts handling event {0}";
|
26
|
+
static E_HANDLER_STR = "Ends handling event {0}";
|
27
|
+
static S_CTRLVER_STR = "Starts Control Verification for Control - ";
|
28
|
+
static E_CTRLVER_STR = "Ends Control Verification for Control - ";
|
29
|
+
static RECOMP_STR = "Recomputes - ";
|
30
|
+
static S_VARIABLE_STR = "Starts Variable Change - ";
|
31
|
+
static E_VARIABLE_STR = "Ends Variable Change - ";
|
32
|
+
static VARIABLE_REASON_STR = " - Reason - Previous value";
|
33
|
+
static FLW_PERFIX = "Flow - ";
|
34
|
+
static ACT_TASK = 'T';
|
35
|
+
static ACT_TASK_FLW = 'F';
|
36
|
+
static ACT_RECOMPUTE = 'R';
|
37
|
+
static ACT_FLW_OPER = 'T';
|
38
|
+
static LongTimePattern = "HH:mm:ss:SSS";
|
39
|
+
_queue = new Queue();
|
40
|
+
_enabled = false;
|
41
|
+
_isFlowOperation = false;
|
42
|
+
_isRecompute = false;
|
43
|
+
_isTask = false;
|
44
|
+
_isTaskFlow = false;
|
45
|
+
_isDataView = false;
|
46
|
+
ShouldSerialize = false;
|
47
|
+
static get Instance() {
|
48
|
+
if (FlowMonitorQueue._instance === null)
|
49
|
+
FlowMonitorQueue._instance = new FlowMonitorQueue();
|
50
|
+
return FlowMonitorQueue._instance;
|
51
|
+
}
|
52
|
+
addTaskCngMode(newTaskMode, taskInfo) {
|
53
|
+
let info = "Task Mode Change - ";
|
54
|
+
if (this._enabled && this._isTask) {
|
55
|
+
let activityItem = new ActivityItem(this, FlowMonitorQueue.ACT_TASK, FlowMonitorInterface.FLWMTR_CHNG_MODE);
|
56
|
+
switch (newTaskMode) {
|
57
|
+
case Constants.TASK_MODE_MODIFY:
|
58
|
+
info += "Modify";
|
59
|
+
break;
|
60
|
+
case Constants.TASK_MODE_CREATE:
|
61
|
+
info += "Create";
|
62
|
+
break;
|
63
|
+
case Constants.TASK_MODE_DELETE:
|
64
|
+
info += "Delete";
|
65
|
+
break;
|
66
|
+
case Constants.TASK_MODE_QUERY:
|
67
|
+
info += "Query";
|
68
|
+
break;
|
69
|
+
default:
|
70
|
+
info = null;
|
71
|
+
break;
|
72
|
+
}
|
73
|
+
activityItem.setInfo(info);
|
74
|
+
this._queue.put(activityItem);
|
75
|
+
Logger.Instance.WriteSupportToLog(taskInfo + ": " + info, true);
|
76
|
+
}
|
77
|
+
}
|
78
|
+
fillData(parser) {
|
79
|
+
let endContext = parser.getXMLdata().indexOf("/>", parser.getCurrIndex());
|
80
|
+
if (endContext !== -1 && endContext < parser.getXMLdata().length) {
|
81
|
+
let tag = parser.getXMLsubstring(endContext);
|
82
|
+
parser.add2CurrIndex(tag.indexOf("flwmtr_config") + "flwmtr_config".length);
|
83
|
+
let tokens = XmlParser.getTokens(parser.getXMLsubstring(endContext), XMLConstants.XML_ATTR_DELIM);
|
84
|
+
Logger.Instance.WriteDevToLog("in FlowMonitorQueue.FillData: " + tokens.toString());
|
85
|
+
this.initElements(tokens);
|
86
|
+
parser.setCurrIndex(endContext + XMLConstants.TAG_TERM.length);
|
87
|
+
return;
|
88
|
+
}
|
89
|
+
Logger.Instance.WriteExceptionToLogWithMsg("in FlowMonitorQueue.FillData() out of string bounds");
|
90
|
+
}
|
91
|
+
initElements(tokensVector) {
|
92
|
+
for (let j = 0; j < tokensVector.length; j = j + 2) {
|
93
|
+
let attribute = tokensVector.get_Item(j);
|
94
|
+
let valueStr = tokensVector.get_Item(j + 1);
|
95
|
+
Logger.Instance.WriteDevToLog(attribute + " value: " + valueStr);
|
96
|
+
switch (attribute) {
|
97
|
+
case ConstInterface.MG_ATTR_TASK:
|
98
|
+
this._isTask = XmlParser.getBoolean(valueStr);
|
99
|
+
break;
|
100
|
+
case ConstInterface.MG_ATTR_TASKFLW:
|
101
|
+
this._isTaskFlow = XmlParser.getBoolean(valueStr);
|
102
|
+
break;
|
103
|
+
case ConstInterface.MG_TAG_DATAVIEW:
|
104
|
+
this._isDataView = XmlParser.getBoolean(valueStr);
|
105
|
+
break;
|
106
|
+
case ConstInterface.MG_ATTR_RECOMP:
|
107
|
+
this._isRecompute = XmlParser.getBoolean(valueStr);
|
108
|
+
break;
|
109
|
+
case ConstInterface.MG_ATTR_FLWOP:
|
110
|
+
this._isFlowOperation = XmlParser.getBoolean(valueStr);
|
111
|
+
break;
|
112
|
+
case ConstInterface.MG_ATTR_ENABLED:
|
113
|
+
this.enable(XmlParser.getBoolean(valueStr));
|
114
|
+
break;
|
115
|
+
default:
|
116
|
+
Logger.Instance.WriteExceptionToLogWithMsg("in FlowMonitorQueue.initElements(): unknown attribute: " + attribute);
|
117
|
+
break;
|
118
|
+
}
|
119
|
+
}
|
120
|
+
}
|
121
|
+
buildXML(message) {
|
122
|
+
if (!this._queue.isEmpty() && this.ShouldSerialize) {
|
123
|
+
message.Append(XMLConstants.START_TAG + ConstInterface.MG_TAG_FLWMTR_MSG + XMLConstants.TAG_CLOSE);
|
124
|
+
while (!this._queue.isEmpty()) {
|
125
|
+
let currAct = this._queue.get();
|
126
|
+
currAct.buildXML(message);
|
127
|
+
}
|
128
|
+
message.Append("</" + ConstInterface.MG_TAG_FLWMTR_MSG + XMLConstants.TAG_CLOSE);
|
129
|
+
}
|
130
|
+
}
|
131
|
+
isEmpty() {
|
132
|
+
return this._queue.isEmpty();
|
133
|
+
}
|
134
|
+
enable(value) {
|
135
|
+
let wasEnabled = this._enabled;
|
136
|
+
this._enabled = value;
|
137
|
+
this.ShouldSerialize = this._enabled;
|
138
|
+
return wasEnabled;
|
139
|
+
}
|
140
|
+
addTaskEvent(triggeredBy, state, taskInfo) {
|
141
|
+
if (this._enabled && this._isTask) {
|
142
|
+
let act = new ActivityItem(this, FlowMonitorQueue.ACT_TASK, FlowMonitorInterface.FLWMTR_EVENT);
|
143
|
+
let info;
|
144
|
+
switch (state) {
|
145
|
+
case FlowMonitorInterface.FLWMTR_START:
|
146
|
+
info = FlowMonitorQueue.S_EVENT_STR1 + triggeredBy + FlowMonitorQueue.S_EVENT_STR2;
|
147
|
+
break;
|
148
|
+
case FlowMonitorInterface.FLWMTR_END:
|
149
|
+
info = FlowMonitorQueue.E_EVENT_STR + triggeredBy;
|
150
|
+
break;
|
151
|
+
case FlowMonitorInterface.FLWMTR_PROPAGATE:
|
152
|
+
info = FlowMonitorQueue.S_EVENT_PROPAGATED;
|
153
|
+
break;
|
154
|
+
default:
|
155
|
+
info = null;
|
156
|
+
break;
|
157
|
+
}
|
158
|
+
act.setInfo(info);
|
159
|
+
this._queue.put(act);
|
160
|
+
Logger.Instance.WriteSupportToLog(taskInfo + ": " + info, true);
|
161
|
+
}
|
162
|
+
}
|
163
|
+
appendVirtualsAndParameters(currentValues) {
|
164
|
+
let act = new ActivityItem(this, FlowMonitorQueue.ACT_TASK_FLW, InternalInterface.MG_ACT_REC_PREFIX);
|
165
|
+
act.setInfo(currentValues);
|
166
|
+
this._queue.put(act);
|
167
|
+
}
|
168
|
+
addDataViewFlow(task) {
|
169
|
+
if (this._isDataView) {
|
170
|
+
let fldTab = task.DataView.GetFieldsTab();
|
171
|
+
let preparedDisplayString = "";
|
172
|
+
let finaldisplayData = "\n";
|
173
|
+
let fldValue;
|
174
|
+
let data = "";
|
175
|
+
for (let i = 0; i < fldTab.getSize(); i++) {
|
176
|
+
let fldDef = fldTab.getField(i);
|
177
|
+
if (!fldDef.IsEventHandlerField && (fldDef.IsVirtual && !fldDef.VirAsReal) || fldDef.isParam()) {
|
178
|
+
fldValue = fldDef.isNull() ? fldDef.getNullValue() : fldDef.getValue(true);
|
179
|
+
data = this.getFieldData(fldDef.getType(), fldValue, fldDef.getPicture(), fldDef.getCellsType(), task);
|
180
|
+
preparedDisplayString = this.PrepareDisplayString(fldDef.isParam(), fldDef.getVarName(), data, true);
|
181
|
+
finaldisplayData = finaldisplayData + preparedDisplayString + "\n";
|
182
|
+
}
|
183
|
+
}
|
184
|
+
this.appendVirtualsAndParameters(finaldisplayData);
|
185
|
+
}
|
186
|
+
}
|
187
|
+
getFieldData(Storagetype, data, picture, vecCellType, task) {
|
188
|
+
switch (Storagetype) {
|
189
|
+
case StorageAttribute.DOTNET:
|
190
|
+
data = FlowMonitorQueue.UNPRINTABLE_STR_LOG;
|
191
|
+
break;
|
192
|
+
case StorageAttribute.BLOB:
|
193
|
+
{
|
194
|
+
if (BlobType.isValidBlob(data)) {
|
195
|
+
let contentType = BlobType.getContentType(data);
|
196
|
+
if (contentType == BlobType.CONTENT_TYPE_ANSI || contentType == BlobType.CONTENT_TYPE_UNICODE)
|
197
|
+
data = data != null ? BlobType.getString(data) : "";
|
198
|
+
else
|
199
|
+
data = FlowMonitorQueue.UNPRINTABLE_STR_LOG;
|
200
|
+
}
|
201
|
+
else
|
202
|
+
data = "";
|
203
|
+
}
|
204
|
+
break;
|
205
|
+
case StorageAttribute.NUMERIC:
|
206
|
+
case StorageAttribute.DATE:
|
207
|
+
case StorageAttribute.TIME:
|
208
|
+
let conv = DisplayConvertor.Instance;
|
209
|
+
data = conv.mg2disp(data, " ", new PIC(picture, Storagetype, task.getCompIdx()), false, task.getCompIdx(), false);
|
210
|
+
break;
|
211
|
+
case StorageAttribute.BLOB_VECTOR:
|
212
|
+
let vecOutData;
|
213
|
+
if (data == null) {
|
214
|
+
vecOutData = "[]";
|
215
|
+
}
|
216
|
+
else {
|
217
|
+
let cellAtt = vecCellType;
|
218
|
+
let vector = new VectorType(data);
|
219
|
+
if (cellAtt == StorageAttribute.BLOB && !VectorType.validateBlobContents(data))
|
220
|
+
vecOutData = "[]";
|
221
|
+
else {
|
222
|
+
let vecSize = VectorType.getVecSize(data);
|
223
|
+
let cellPicture = (cellAtt == StorageAttribute.NUMERIC || cellAtt == StorageAttribute.DATE || cellAtt == StorageAttribute.TIME) ? PIC.buildPicture(cellAtt, vector.getVecCell(1), task.getCompIdx(), true).getFormat() : picture;
|
224
|
+
vecOutData = "[";
|
225
|
+
for (let i = 0; i < vecSize; i++) {
|
226
|
+
vecOutData += this.getFieldData(cellAtt, vector.getVecCell(i + 1), cellPicture, vecCellType, task);
|
227
|
+
vecOutData += i < vecSize - 1 ? "," : "]";
|
228
|
+
}
|
229
|
+
}
|
230
|
+
}
|
231
|
+
data = vecOutData;
|
232
|
+
break;
|
233
|
+
case StorageAttribute.BOOLEAN:
|
234
|
+
data = data == "1" ? "TRUE" : "FALSE";
|
235
|
+
break;
|
236
|
+
}
|
237
|
+
return data;
|
238
|
+
}
|
239
|
+
PrepareDisplayString(mode, name, valueContent, addDoubleQuotes) {
|
240
|
+
let str = "";
|
241
|
+
let finalStringToDisplay = "";
|
242
|
+
if (addDoubleQuotes)
|
243
|
+
finalStringToDisplay = finalStringToDisplay + "\"";
|
244
|
+
finalStringToDisplay = finalStringToDisplay + name;
|
245
|
+
if (addDoubleQuotes)
|
246
|
+
finalStringToDisplay = finalStringToDisplay + "\"";
|
247
|
+
let paddedName = this.padRight(name, 34);
|
248
|
+
let formatOfStringVirtual = `Virtual`;
|
249
|
+
let formatOfStringParameter = `Parameter`;
|
250
|
+
str = (mode ? formatOfStringParameter : formatOfStringVirtual) + " : " + `${paddedName}` + " : " + `${valueContent.trim()}`;
|
251
|
+
return str;
|
252
|
+
}
|
253
|
+
padRight = (string, length, character = ' ') => {
|
254
|
+
let result = "";
|
255
|
+
let totalLength = length - string.length;
|
256
|
+
for (let i = 0; i < totalLength; i++) {
|
257
|
+
result = character + result;
|
258
|
+
}
|
259
|
+
result = result + string;
|
260
|
+
return result;
|
261
|
+
};
|
262
|
+
addTaskFlowRec(id, state, taskInfo) {
|
263
|
+
if (this._enabled && this._isTaskFlow) {
|
264
|
+
let info;
|
265
|
+
switch (id) {
|
266
|
+
case InternalInterface.MG_ACT_REC_PREFIX:
|
267
|
+
info = state === FlowMonitorInterface.FLWMTR_START
|
268
|
+
? FlowMonitorQueue.S_RECPRF_STR
|
269
|
+
: FlowMonitorQueue.E_RECPRF_STR;
|
270
|
+
id = FlowMonitorInterface.FLWMTR_PREFIX;
|
271
|
+
break;
|
272
|
+
case InternalInterface.MG_ACT_REC_SUFFIX:
|
273
|
+
info = state === FlowMonitorInterface.FLWMTR_START
|
274
|
+
? FlowMonitorQueue.S_RECSUF_STR
|
275
|
+
: FlowMonitorQueue.E_RECSUF_STR;
|
276
|
+
id = FlowMonitorInterface.FLWMTR_SUFFIX;
|
277
|
+
break;
|
278
|
+
case InternalInterface.MG_ACT_TASK_PREFIX:
|
279
|
+
info = state === FlowMonitorInterface.FLWMTR_START
|
280
|
+
? FlowMonitorQueue.S_TASKPRF_STR
|
281
|
+
: FlowMonitorQueue.E_TASKPRF_STR;
|
282
|
+
id = FlowMonitorInterface.FLWMTR_PREFIX;
|
283
|
+
break;
|
284
|
+
case InternalInterface.MG_ACT_TASK_SUFFIX:
|
285
|
+
info = state === FlowMonitorInterface.FLWMTR_START
|
286
|
+
? FlowMonitorQueue.S_TASKSUF_STR
|
287
|
+
: FlowMonitorQueue.E_TASKSUF_STR;
|
288
|
+
id = FlowMonitorInterface.FLWMTR_SUFFIX;
|
289
|
+
break;
|
290
|
+
default:
|
291
|
+
info = null;
|
292
|
+
break;
|
293
|
+
}
|
294
|
+
let act = new ActivityItem(this, FlowMonitorQueue.ACT_TASK_FLW, id);
|
295
|
+
act.setInfo(info);
|
296
|
+
this._queue.put(act);
|
297
|
+
Logger.Instance.WriteSupportToLog(taskInfo + ": " + info, true);
|
298
|
+
}
|
299
|
+
}
|
300
|
+
addTaskFlowFld(id, fldName, state, taskInfo) {
|
301
|
+
this.addTaskFlowCtrl(id, fldName, state, taskInfo);
|
302
|
+
}
|
303
|
+
addTaskFlowCtrl(id, ctrlName, state, taskInfo) {
|
304
|
+
if (this._enabled && this._isTaskFlow) {
|
305
|
+
let info;
|
306
|
+
switch (id) {
|
307
|
+
case InternalInterface.MG_ACT_VARIABLE:
|
308
|
+
info = state === FlowMonitorInterface.FLWMTR_START
|
309
|
+
? FlowMonitorQueue.S_VARIABLE_STR
|
310
|
+
: FlowMonitorQueue.E_VARIABLE_STR;
|
311
|
+
id = FlowMonitorInterface.FLWMTR_VARCHG_VALUE;
|
312
|
+
break;
|
313
|
+
case InternalInterface.MG_ACT_CTRL_PREFIX:
|
314
|
+
info = state === FlowMonitorInterface.FLWMTR_START
|
315
|
+
? FlowMonitorQueue.S_CTRLPRF_STR
|
316
|
+
: FlowMonitorQueue.E_CTRLPRF_STR;
|
317
|
+
id = FlowMonitorInterface.FLWMTR_CTRL_PREFIX;
|
318
|
+
break;
|
319
|
+
case InternalInterface.MG_ACT_CTRL_SUFFIX:
|
320
|
+
info = state === FlowMonitorInterface.FLWMTR_START
|
321
|
+
? FlowMonitorQueue.S_CTRLSUF_STR
|
322
|
+
: FlowMonitorQueue.E_CTRLSUF_STR;
|
323
|
+
id = FlowMonitorInterface.FLWMTR_CTRL_SUFFIX;
|
324
|
+
break;
|
325
|
+
case InternalInterface.MG_ACT_CTRL_VERIFICATION:
|
326
|
+
info = state === FlowMonitorInterface.FLWMTR_START
|
327
|
+
? FlowMonitorQueue.S_CTRLVER_STR
|
328
|
+
: FlowMonitorQueue.E_CTRLVER_STR;
|
329
|
+
id = FlowMonitorInterface.FLWMTR_CTRL_SUFFIX;
|
330
|
+
break;
|
331
|
+
default:
|
332
|
+
info = null;
|
333
|
+
break;
|
334
|
+
}
|
335
|
+
let act = new ActivityItem(this, FlowMonitorQueue.ACT_TASK_FLW, id);
|
336
|
+
if (info !== null) {
|
337
|
+
info = info + ctrlName;
|
338
|
+
if (id === FlowMonitorInterface.FLWMTR_VARCHG_VALUE && state === FlowMonitorInterface.FLWMTR_START)
|
339
|
+
info = info + FlowMonitorQueue.VARIABLE_REASON_STR;
|
340
|
+
act.setInfo(info);
|
341
|
+
Logger.Instance.WriteSupportToLog(taskInfo + ": " + info, true);
|
342
|
+
}
|
343
|
+
this._queue.put(act);
|
344
|
+
}
|
345
|
+
}
|
346
|
+
addTaskFlowHandler(handlerId, state, taskInfo) {
|
347
|
+
if (this._enabled && this._isTaskFlow) {
|
348
|
+
let act = new ActivityItem(this, FlowMonitorQueue.ACT_TASK_FLW, FlowMonitorInterface.FLWMTR_TSK_HANDLER);
|
349
|
+
let info;
|
350
|
+
switch (state) {
|
351
|
+
case FlowMonitorInterface.FLWMTR_START:
|
352
|
+
info = NString.Format(FlowMonitorQueue.S_HANDLER_STR, handlerId);
|
353
|
+
break;
|
354
|
+
case FlowMonitorInterface.FLWMTR_END:
|
355
|
+
info = NString.Format(FlowMonitorQueue.E_HANDLER_STR, handlerId);
|
356
|
+
break;
|
357
|
+
default:
|
358
|
+
info = null;
|
359
|
+
break;
|
360
|
+
}
|
361
|
+
if (info !== null) {
|
362
|
+
act.setInfo(info);
|
363
|
+
Logger.Instance.WriteSupportToLog(taskInfo + ": " + info, true);
|
364
|
+
}
|
365
|
+
this._queue.put(act);
|
366
|
+
}
|
367
|
+
}
|
368
|
+
addRecompute(triggeredByVarName, taskInfo) {
|
369
|
+
if (this._enabled && this._isRecompute) {
|
370
|
+
let act = new ActivityItem(this, FlowMonitorQueue.ACT_RECOMPUTE, FlowMonitorInterface.FLWMTR_RECOMP);
|
371
|
+
let info = FlowMonitorQueue.RECOMP_STR + triggeredByVarName;
|
372
|
+
act.setInfo(info);
|
373
|
+
this._queue.put(act);
|
374
|
+
Logger.Instance.WriteSupportToLog(taskInfo + ": " + info, true);
|
375
|
+
}
|
376
|
+
}
|
377
|
+
async addFlowFieldOperation(oper, bExecuted, taskInfo) {
|
378
|
+
if (this._enabled && this._isFlowOperation) {
|
379
|
+
let act = new ActivityItem(this, FlowMonitorQueue.ACT_FLW_OPER, FlowMonitorInterface.FLWMTR_DATA_OPER);
|
380
|
+
let buffer = new StringBuilder(FlowMonitorQueue.FLW_PERFIX);
|
381
|
+
await oper.AddFlowDescription(buffer);
|
382
|
+
buffer.Append(' ');
|
383
|
+
if (!bExecuted)
|
384
|
+
buffer.Append("[Not Executed]");
|
385
|
+
let info = buffer.ToString();
|
386
|
+
act.setInfo(info);
|
387
|
+
this._queue.put(act);
|
388
|
+
Logger.Instance.WriteSupportToLog(taskInfo + ": " + info, true);
|
389
|
+
}
|
390
|
+
}
|
391
|
+
addFlowOperationUpdate(state, taskInfo) {
|
392
|
+
if (this._enabled && this._isFlowOperation) {
|
393
|
+
let act = new ActivityItem(this, FlowMonitorQueue.ACT_FLW_OPER, FlowMonitorInterface.FLWMTR_DATA_OPER);
|
394
|
+
let info;
|
395
|
+
if (state === FlowMonitorInterface.FLWMTR_START)
|
396
|
+
info = "Starts Update";
|
397
|
+
else
|
398
|
+
info = "Ends Update";
|
399
|
+
act.setInfo(info);
|
400
|
+
this._queue.put(act);
|
401
|
+
Logger.Instance.WriteSupportToLog(taskInfo + ": " + info, true);
|
402
|
+
}
|
403
|
+
}
|
404
|
+
addFlowVerifyInfo(info, taskInfo) {
|
405
|
+
this.addFlowInfo(info, taskInfo);
|
406
|
+
}
|
407
|
+
addFlowInvokeOsInfo(info, taskInfo) {
|
408
|
+
this.addFlowInfo(info, taskInfo);
|
409
|
+
}
|
410
|
+
addFlowInfo(info, taskInfo) {
|
411
|
+
if (!this._enabled)
|
412
|
+
return;
|
413
|
+
let act = new ActivityItem(this, FlowMonitorQueue.ACT_FLW_OPER, FlowMonitorInterface.FLWMTR_DATA_OPER);
|
414
|
+
let buffer = new StringBuilder("");
|
415
|
+
if (!(info === "")) {
|
416
|
+
buffer.Append(" >> INFORMATION >> ");
|
417
|
+
buffer.Append(info);
|
418
|
+
}
|
419
|
+
let newInfo = buffer.ToString();
|
420
|
+
act.setInfo(newInfo);
|
421
|
+
this._queue.put(act);
|
422
|
+
Logger.Instance.WriteSupportToLog(taskInfo + ": " + newInfo, true);
|
423
|
+
}
|
424
|
+
}
|
425
|
+
class ActivityItem {
|
426
|
+
_id = 0;
|
427
|
+
_type = null;
|
428
|
+
_info = null;
|
429
|
+
_time = null;
|
430
|
+
constructor(enclosingInstance, type, id) {
|
431
|
+
this._type = type;
|
432
|
+
this._id = id;
|
433
|
+
this.setTime();
|
434
|
+
}
|
435
|
+
setTime() {
|
436
|
+
this._time = DateTimeUtils.ToString(DateTime.Now, FlowMonitorQueue.LongTimePattern, Logger.Instance);
|
437
|
+
}
|
438
|
+
setInfo(info_) {
|
439
|
+
this._info = ((info_ !== null) ? XmlParser.escape(info_) : info_);
|
440
|
+
}
|
441
|
+
buildXML(message) {
|
442
|
+
message.Append(XMLConstants.START_TAG + ConstInterface.MG_TAG_FLWMTR_ACT);
|
443
|
+
message.Append(" " + XMLConstants.MG_ATTR_TYPE + "=\"" + this._type + "\"");
|
444
|
+
message.Append(" " + XMLConstants.MG_ATTR_ID + "=\"" + this._id + "\"");
|
445
|
+
if (this._info != null)
|
446
|
+
message.Append(" " + ConstInterface.MG_ATTR_INFO + "=\"" + this._info + "\"");
|
447
|
+
message.Append(" " + ConstInterface.MG_ATTR_TIME + "=\"" + this._time + "\"");
|
448
|
+
message.Append(XMLConstants.TAG_TERM);
|
449
|
+
}
|
450
|
+
}
|
451
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiRmxvd01vbml0b3JRdWV1ZS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uL3Byb2plY3RzL2VuZ2luZS9zcmMvdXRpbC9GbG93TW9uaXRvclF1ZXVlLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFBQyxRQUFRLEVBQUUsZ0JBQWdCLEVBQWtDLEdBQUcsRUFBRSxVQUFVLEVBQUMsTUFBTSxnQkFBZ0IsQ0FBQztBQUMzRyxPQUFPLEVBQUMsUUFBUSxFQUFRLE9BQU8sRUFBRSxhQ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RGaWVsZERhdGEoU3RvcmFnZXR5cGU6IFN0b3JhZ2VBdHRyaWJ1dGUsIGRhdGE6IHN0cmluZywgcGljdHVyZTogc3RyaW5nLCB2ZWNDZWxsVHlwZTogU3RvcmFnZUF0dHJpYnV0ZSwgdGFzazogVGFzayk6IHN0cmluZ1xyXG4gIHtcclxuICAgICAgc3dpdGNoIChTdG9yYWdldHlwZSlcclxuICAgICAge1xyXG4gICAgICAgICAgY2FzZSBTdG9yYWdlQXR0cmlidXRlLkRPVE5FVDpcclxuICAgICAgICAgICAgICBkYXRhID0gRmxvd01vbml0b3JRdWV1ZS5VTlBSSU5UQUJMRV9TVFJfTE9HO1xyXG4gICAgICAgICAgICAgIGJyZWFrO1xyXG5cclxuICAgICAgICAgIGNhc2UgU3RvcmFnZUF0dHJpYnV0ZS5CTE9COlxyXG4gICAgICAgICAgICAgIHtcclxuICAgICAgICAgICAgICAgIGlmKEJsb2JUeXBlLmlzVmFsaWRCbG9iKGRhdGEpKVxyXG4gICAgICAgICAgICAgICAge1xyXG4gICAgICAgICAgICAgICAgICBsZXQgY29udGVudFR5cGU6IHN0cmluZyA9IEJsb2JUeXBlLmdldENvbnRlbnRUeXBlKGRhdGEpO1xyXG4gICAgICAgICAgICAgICAgICBpZiAoY29udGVudFR5cGUgPT0gQmxvYlR5cGUuQ09OVEVOVF9UWVBFX0FOU0kgfHwgY29udGVudFR5cGUgPT0gQmxvYlR5cGUuQ09OVEVOVF9UWVBFX1VOSUNPREUpXHJcbiAgICAgICAgICAgICAgICAgICAgICBkYXRhID0gZGF0YSAhPSBudWxsID8gQmxvYlR5cGUuZ2V0U3RyaW5nKGRhdGEpIDogXCJcIjtcclxuICAgICAgICAgICAgICAgICAgZWxzZVxyXG4gICAgICAgICAgICAgICAgICAgICAgZGF0YSA9IEZsb3dNb25pdG9yUXVldWUuVU5QUklOVEFCTEVfU1RSX0xPRztcclxuICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgIGVsc2VcclxuICAgICAgICAgICAgICAgICAgZGF0YSA9IFwiXCI7XHJcbiAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgIGJyZWFrO1xyXG5cclxuICAgICAgICAgIGNhc2UgU3RvcmFnZUF0dHJpYnV0ZS5OVU1FUklDOlxyXG4gICAgICAgICAgY2FzZSBTdG9yYWdlQXR0cmlidXRlLkRBVEU6XHJcbiAgICAgICAgICBjYXNlIFN0b3JhZ2VBdHRyaWJ1dGUuVElNRTpcclxuICAgICAgICAgICAgICBsZXQgY29udjogRGlzcGxheUNvbnZlcnRvcj0gRGlzcGxheUNvbnZlcnRvci5JbnN0YW5jZTtcclxuICAgICAgICAgICAgICBkYXRhID0gY29udi5tZzJkaXNwKGRhdGEsIFwiIFwiLCBuZXcgUElDKHBpY3R1cmUsIFN0b3JhZ2V0eXBlLCB0YXNrLmdldENvbXBJZHgoKSksIGZhbHNlLCB0YXNrLmdldENvbXBJZHgoKSwgZmFsc2UpO1xyXG4gICAgICAgICAgICAgIGJyZWFrO1xyXG5cclxuICAgICAgICAgIGNhc2UgU3RvcmFnZUF0dHJpYnV0ZS5CTE9CX1ZFQ1RPUjpcclxuICAgICAgICAgICAgICBsZXQgdmVjT3V0RGF0YTogc3RyaW5nO1xyXG4gICAgICAgICAgICAgIGlmIChkYXRhID09IG51bGwpXHJcbiAgICAgICAgICAgICAge1xyXG4gICAgICAgICAgICAgICAgICB2ZWNPdXREYXRhID0gXCJbXVwiO1xyXG4gICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICBlbHNlXHJcbiAgICAgICAgICAgICAge1xyXG4gICAgICAgICAgICAgICAgICBsZXQgY2VsbEF0dDogU3RvcmFnZUF0dHJpYnV0ZSA9IHZlY0NlbGxUeXBlO1xyXG4gICAgICAgICAgICAgICAgICBsZXQgdmVjdG9yOiBWZWN0b3JUeXBlID0gbmV3IFZlY3RvclR5cGUoZGF0YSk7XHJcbiAgICAgICAgICAgICAgICAgIGlmIChjZWxsQXR0ID09IFN0b3JhZ2VBdHRyaWJ1dGUuQkxPQiAmJiAhVmVjdG9yVHlwZS52YWxpZGF0ZUJsb2JDb250ZW50cyhkYXRhKSlcclxuICAgICAgICAgICAgICAgICAgICAgIHZlY091dERhdGEgPSBcIltdXCI7XHJcbiAgICAgICAgICAgICAgICAgIGVsc2VcclxuICAgICAgICAgICAgICAgICAge1xyXG4gICAgICAgICAgICAgICAgICAgICAgbGV0IHZlY1NpemU6IG51bWJlciA9IFZlY3RvclR5cGUuZ2V0VmVjU2l6ZShkYXRhKTtcclxuICAgICAgICAgICAgICAgICAgICAgIGxldCBjZWxsUGljdHVyZTogc3RyaW5nID0gKGNlbGxBdHQgPT0gU3RvcmFnZUF0dHJpYnV0ZS5OVU1FUklDIHx8IGNlbGxBdHQgPT0gU3RvcmFnZUF0dHJpYnV0ZS5EQVRFIHx8IGNlbGxBdHQgPT0gU3RvcmFnZUF0dHJpYnV0ZS5USU1FKSA/IFBJQy5idWlsZFBpY3R1cmUoY2VsbEF0dCwgdmVjdG9yLmdldFZlY0NlbGwoMSksIHRhc2suZ2V0Q29tcElkeCgpLCB0cnVlKS5nZXRGb3JtYXQoKSA6IHBpY3R1cmU7XHJcbiAgICAgICAgICAgICAgICAgICAgICB2ZWNPdXREYXRhID0gXCJbXCI7XHJcbiAgICAgICAgICAgICAgICAgICAgICBmb3IgKGxldCBpIDogbnVtYmVyID0gMDsgaSA8IHZlY1NpemU7IGkrKylcclxuICAgICAgICAgICAgICAgICAgICAgIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgICB2ZWNPdXREYXRhICs9IHRoaXMuZ2V0RmllbGREYXRhKGNlbGxBdHQsIHZlY3Rvci5nZXRWZWNDZWxsKGkgKyAxKSwgY2VsbFBpY3R1cmUsIHZlY0NlbGxUeXBlLCB0YXNrKTtcclxuICAgICAgICAgICAgICAgICAgICAgICAgICB2ZWNPdXREYXRhICs9IGkgPCB2ZWNTaXplIC0gMSA/IFwiLFwiIDogXCJdXCI7XHJcbiAgICAgICAg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LkVfUkVDUFJGX1NUUjtcclxuICAgICAgICAgIGlkID0gRmxvd01vbml0b3JJbnRlcmZhY2UuRkxXTVRSX1BSRUZJWDtcclxuICAgICAgICAgIGJyZWFrO1xyXG5cclxuICAgICAgICBjYXNlIEludGVybmFsSW50ZXJmYWNlLk1HX0FDVF9SRUNfU1VGRklYOlxyXG4gICAgICAgICAgaW5mbyA9IHN0YXRlID09PSBGbG93TW9uaXRvckludGVyZmFjZS5GTFdNVFJfU1RBUlRcclxuICAgICAgICAgICAgPyBGbG93TW9uaXRvclF1ZXVlLlNfUkVDU1VGX1NUUlxyXG4gICAgICAgICAgICA6IEZsb3dNb25pdG9yUXVldWUuRV9SRUNTVUZfU1RSO1xyXG4gICAgICAgICAgaWQgPSBGbG93TW9uaXRvckludGVyZmFjZS5GTFdNVFJfU1VGRklYO1xyXG4gICAgICAgICAgYnJlYWs7XHJcblxyXG4gICAgICAgIGNhc2UgSW50ZXJuYWxJbnRlcmZhY2UuTUdfQUNUX1RBU0tfUFJFRklYOlxyXG4gICAgICAgICAgaW5mbyA9IHN0YXRlID09PSBGbG93TW9uaXRvckludGVyZmFjZS5GTFdNVFJfU1RBUlRcclxuICAgICAgICAgICAgPyBGbG93TW9uaXRvclF1ZXVlLlNfVEFTS1BSRl9TVFJcclxuICAgICAgICAgICAgOiBGbG93TW9uaXRvclF1ZXVlLkVfVEFTS1BSRl9TVFI7XHJcbiAgICAgICAgICBpZCA9IEZsb3dNb25pdG9ySW50ZXJmYWNlLkZMV01UUl9QUkVGSVg7XHJcbiAgICAgICAgICBicmVhaztcclxuXHJcbiAgICAgICAgY2FzZSBJbnRlcm5hbEludGVyZmFjZS5NR19BQ1RfVEFTS19TVUZGSVg6XHJcbiAgICAgICAgICBpbmZvID0gc3RhdGUgPT09IEZsb3dNb25pdG9ySW50ZXJmYWNlLkZMV01UUl9TVEFSVFxyXG4gICAgICAgICAgICA/IEZsb3dNb25pdG9yUXVldWUuU19UQVNLU1VGX1NUUlxyXG4gICA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ICsgXCI9XFxcIlwiICsgdGhpcy5faW5mbyArIFwiXFxcIlwiKTtcclxuICAgIG1lc3NhZ2UuQXBwZW5kKFwiIFwiICsgQ29uc3RJbnRlcmZhY2UuTUdfQVRUUl9USU1FICsgXCI9XFxcIlwiICsgdGhpcy5fdGltZSArIFwiXFxcIlwiKTtcclxuICAgIG1lc3NhZ2UuQXBwZW5kKFhNTENvbnN0YW50cy5UQUdfVEVSTSk7XHJcbiAgfVxyXG59XHJcbiJdfQ==
|
@@ -0,0 +1,70 @@
|
|
1
|
+
export class HeapSort {
|
2
|
+
static left(i) {
|
3
|
+
return 2 * i + 1;
|
4
|
+
}
|
5
|
+
static right(i) {
|
6
|
+
return 2 * i + 2;
|
7
|
+
}
|
8
|
+
static sort(array) {
|
9
|
+
let sortsize = array.length;
|
10
|
+
let temp;
|
11
|
+
let largest, i, l, r;
|
12
|
+
if (sortsize <= 1)
|
13
|
+
return;
|
14
|
+
let top = sortsize - 1;
|
15
|
+
let t = Math.floor(sortsize / 2);
|
16
|
+
do {
|
17
|
+
t = t - 1;
|
18
|
+
largest = t;
|
19
|
+
do {
|
20
|
+
i = largest;
|
21
|
+
l = HeapSort.left(largest);
|
22
|
+
r = HeapSort.right(largest);
|
23
|
+
if (l <= top) {
|
24
|
+
if (array[l].CompareTo(array[i]) > 0)
|
25
|
+
largest = l;
|
26
|
+
}
|
27
|
+
if (r <= top) {
|
28
|
+
if (array[r].CompareTo(array[largest]) > 0)
|
29
|
+
largest = r;
|
30
|
+
}
|
31
|
+
if (largest !== i) {
|
32
|
+
temp = array[largest];
|
33
|
+
array[largest] = array[i];
|
34
|
+
array[i] = temp;
|
35
|
+
}
|
36
|
+
} while (largest !== i);
|
37
|
+
} while (t > 0);
|
38
|
+
t = sortsize;
|
39
|
+
do {
|
40
|
+
top = top - 1;
|
41
|
+
t = t - 1;
|
42
|
+
let here = t;
|
43
|
+
temp = array[here];
|
44
|
+
array[here] = array[0];
|
45
|
+
array[0] = temp;
|
46
|
+
largest = 0;
|
47
|
+
do {
|
48
|
+
i = largest;
|
49
|
+
l = HeapSort.left(largest);
|
50
|
+
r = HeapSort.right(largest);
|
51
|
+
if (l <= top) {
|
52
|
+
if (array[l].CompareTo(array[i]) > 0) {
|
53
|
+
largest = l;
|
54
|
+
}
|
55
|
+
}
|
56
|
+
if (r <= top) {
|
57
|
+
if (array[r].CompareTo(array[largest]) > 0) {
|
58
|
+
largest = r;
|
59
|
+
}
|
60
|
+
}
|
61
|
+
if (largest !== i) {
|
62
|
+
temp = array[largest];
|
63
|
+
array[largest] = array[i];
|
64
|
+
array[i] = temp;
|
65
|
+
}
|
66
|
+
} while (largest !== i);
|
67
|
+
} while (t > 1);
|
68
|
+
}
|
69
|
+
}
|
70
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiSGVhcFNvcnQuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi9wcm9qZWN0cy9lbmdpbmUvc3JjL3V0aWwvSGVhcFNvcnQudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBS0EsTUFBTSxPQUFPLFFBQVE7SUFDWCxNQUFNLENBQUMsSUFBSSxDQUFDLENBQVM7UUFDM0IsT0FBTyxDQUFDLEdBQUcsQ0FBQyxHQUFHLENBQUMsQ0FBQztJQUNuQixDQUFDO0lBRU8sTUFBTSxDQUFDLEtBQUssQ0FBQyxDQUFTO1FBQzVCLE9BQU8sQ0FBQyxHQUFHLENBQUMsR0FBRyxDQUFDLENBQUM7SUFDbkIsQ0FBQztJQUtELE1BQU0sQ0FBQyxJQUFJLENBQUMsS0FBb0I7UUFDOUIsSUFBSSxRQUFRLEdBQVcsS0FBSyxDQUFDLE1BQU0sQ0FBQztRQUNwQyxJQUFJLElBQWlCLENBQUM7UUFDdEIsSUFBSSxPQUFlLEVBQUUsQ0FBUyxFQUFFLENBQVMsRUFBRSxDQUFTLENBQUM7UUFFckQs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