@magic-xpa/engine 4.1100.0-dev4110.99 → 4.1101.0-dev4111.271
Sign up to get free protection for your applications and to get access to all the features.
- package/README.md +7 -7
- package/{esm2020 → esm2022}/index.mjs +188 -188
- package/{esm2020 → esm2022}/magic-xpa-engine.mjs +1 -1
- package/esm2022/src/AccessHelper.mjs +15 -0
- package/esm2022/src/ClientManager.mjs +421 -0
- package/esm2022/src/CommandsProcessorBase.mjs +56 -0
- package/{esm2020 → esm2022}/src/CommandsProcessorManager.mjs +25 -25
- package/esm2022/src/CommandsTable.mjs +162 -0
- package/esm2022/src/ConstInterface.mjs +517 -0
- package/{esm2020 → esm2022}/src/CurrentClientVersion.mjs +2 -2
- package/esm2022/src/FlowMonitorInterface.mjs +16 -0
- package/esm2022/src/GUIManager.mjs +62 -0
- package/esm2022/src/GlobalCommandsManager.mjs +34 -0
- package/esm2022/src/GuiEventsProcessor.mjs +156 -0
- package/{esm2020 → esm2022}/src/ICommandsTable.mjs +1 -1
- package/esm2022/src/ServerConfig.mjs +122 -0
- package/{esm2020 → esm2022}/src/bridge/IGuiEvent.mjs +19 -19
- package/esm2022/src/bridge/MagicBridge.mjs +41 -0
- package/esm2022/src/commands/ClientOriginatedCommandTaskTag.mjs +12 -0
- package/{esm2020 → esm2022}/src/commands/ClientToServer/AddUserLocateDataViewCommand.mjs +8 -8
- package/{esm2020 → esm2022}/src/commands/ClientToServer/AddUserRangeDataviewCommand.mjs +9 -9
- package/{esm2020 → esm2022}/src/commands/ClientToServer/AddUserSortDataViewCommand.mjs +9 -9
- package/esm2022/src/commands/ClientToServer/BrowserEscEventCommand.mjs +26 -0
- package/{esm2020 → esm2022}/src/commands/ClientToServer/ClientOriginatedCommand.mjs +14 -14
- package/{esm2020 → esm2022}/src/commands/ClientToServer/ClientOriginatedCommandSerializer.mjs +59 -59
- package/esm2022/src/commands/ClientToServer/ColumnSortEventCommand.mjs +29 -0
- package/esm2022/src/commands/ClientToServer/CommandFactory.mjs +261 -0
- package/esm2022/src/commands/ClientToServer/CommandSerializationHelper.mjs +67 -0
- package/esm2022/src/commands/ClientToServer/ComputeEventCommand.mjs +26 -0
- package/{esm2020 → esm2022}/src/commands/ClientToServer/ContextTerminationEventCommand.mjs +24 -21
- package/{esm2020 → esm2022}/src/commands/ClientToServer/ContextTimeoutResetCommand.mjs +23 -20
- package/{esm2020 → esm2022}/src/commands/ClientToServer/ControlItemsRefreshCommand.mjs +8 -8
- package/esm2022/src/commands/ClientToServer/DataViewOutputCommand.mjs +13 -0
- package/{esm2020 → esm2022}/src/commands/ClientToServer/DataviewCommand.mjs +44 -44
- package/esm2022/src/commands/ClientToServer/EvaluateCommand.mjs +40 -0
- package/{esm2020 → esm2022}/src/commands/ClientToServer/EventCommand.mjs +43 -40
- package/esm2022/src/commands/ClientToServer/ExecOperCommand.mjs +70 -0
- package/esm2022/src/commands/ClientToServer/FetchDataControlValuesEventCommand.mjs +25 -0
- package/{esm2020 → esm2022}/src/commands/ClientToServer/GlobalParamsQueryCommand.mjs +10 -10
- package/{esm2020 → esm2022}/src/commands/ClientToServer/ICommandTaskTag.mjs +1 -1
- package/esm2022/src/commands/ClientToServer/IndexChangeEventCommand.mjs +24 -0
- package/esm2022/src/commands/ClientToServer/IniputForceWriteCommand.mjs +26 -0
- package/{esm2020 → esm2022}/src/commands/ClientToServer/NonReversibleExitEventCommand.mjs +26 -23
- package/{esm2020 → esm2022}/src/commands/ClientToServer/QueryCommand.mjs +20 -20
- package/esm2022/src/commands/ClientToServer/RecomputeCommand.mjs +30 -0
- package/esm2022/src/commands/ClientToServer/RefreshEventCommand.mjs +30 -0
- package/esm2022/src/commands/ClientToServer/RefreshScreenEventCommand.mjs +27 -0
- package/esm2022/src/commands/ClientToServer/RollbackEventCommand.mjs +43 -0
- package/esm2022/src/commands/ClientToServer/SelectProgramCommand.mjs +19 -0
- package/{esm2020 → esm2022}/src/commands/ClientToServer/SetTransactionStateDataviewCommand.mjs +9 -9
- package/esm2022/src/commands/ClientToServer/SubformOpenEventCommand.mjs +24 -0
- package/esm2022/src/commands/ClientToServer/SubformRefreshEventCommand.mjs +27 -0
- package/esm2022/src/commands/ClientToServer/TransactionCommand.mjs +34 -0
- package/{esm2020 → esm2022}/src/commands/ClientToServer/UnloadCommand.mjs +18 -15
- package/esm2022/src/commands/ClientToServer/WriteMessageToServerLogCommand.mjs +18 -0
- package/esm2022/src/commands/DataViewCommandBase.mjs +8 -0
- package/{esm2020 → esm2022}/src/commands/IClientCommand.mjs +1 -1
- package/esm2022/src/commands/IClientTargetedCommand.mjs +13 -0
- package/{esm2020 → esm2022}/src/commands/IClientToServerCommandInfo.mjs +2 -2
- package/esm2022/src/commands/ServerToClient/AbortCommand.mjs +65 -0
- package/{esm2020 → esm2022}/src/commands/ServerToClient/AddLocateCommand.mjs +21 -21
- package/{esm2020 → esm2022}/src/commands/ServerToClient/AddRangeCommand.mjs +62 -62
- package/{esm2020 → esm2022}/src/commands/ServerToClient/AddSortCommand.mjs +33 -33
- package/esm2022/src/commands/ServerToClient/ClientRefreshCommand.mjs +25 -0
- package/esm2022/src/commands/ServerToClient/ClientTargetedCommandBase.mjs +24 -0
- package/esm2022/src/commands/ServerToClient/EnhancedVerifyCommand.mjs +45 -0
- package/esm2022/src/commands/ServerToClient/OpenURLCommand.mjs +221 -0
- package/{esm2020 → esm2022}/src/commands/ServerToClient/ResetLocateCommand.mjs +14 -14
- package/{esm2020 → esm2022}/src/commands/ServerToClient/ResetRangeCommand.mjs +14 -14
- package/{esm2020 → esm2022}/src/commands/ServerToClient/ResetSortCommand.mjs +14 -14
- package/esm2022/src/commands/ServerToClient/ResultCommand.mjs +37 -0
- package/esm2022/src/commands/ServerToClient/VerifyCommand.mjs +83 -0
- package/{esm2020 → esm2022}/src/commands/ServerToClient/XMLBasedCommandBuilder.mjs +132 -132
- package/{esm2020 → esm2022}/src/communications/IConnectionStateManager.mjs +1 -1
- package/esm2022/src/communications/InteractiveCommunicationsFailureHandler.mjs +15 -0
- package/{esm2020 → esm2022}/src/data/DataSourceIdKey.mjs +2 -2
- package/esm2022/src/data/DataView.mjs +1613 -0
- package/{esm2020 → esm2022}/src/data/DataViewBase.mjs +3 -3
- package/esm2022/src/data/DataviewManager.mjs +28 -0
- package/esm2022/src/data/DataviewManagerBase.mjs +15 -0
- package/esm2022/src/data/DvCache.mjs +67 -0
- package/esm2022/src/data/Field.mjs +646 -0
- package/esm2022/src/data/FieldBase.mjs +15 -0
- package/esm2022/src/data/FieldsTable.mjs +103 -0
- package/{esm2020 → esm2022}/src/data/IRecordsTable.mjs +1 -1
- package/{esm2020 → esm2022}/src/data/Key.mjs +88 -88
- package/esm2022/src/data/Record.mjs +880 -0
- package/{esm2020 → esm2022}/src/data/RecordOutOfDataViewException.mjs +15 -15
- package/esm2022/src/data/RecordsTable.mjs +267 -0
- package/{esm2020 → esm2022}/src/data/TaskTransactionManager.mjs +107 -103
- package/{esm2020 → esm2022}/src/data/XMLBasedDcValuesBuilder.mjs +74 -74
- package/{esm2020 → esm2022}/src/enums.mjs +23 -23
- package/esm2022/src/env/EnvVariablesTable.mjs +340 -0
- package/esm2022/src/env/Environment.mjs +487 -0
- package/{esm2020 → esm2022}/src/env/ILanguageData.mjs +1 -1
- package/esm2022/src/env/LanguageData.mjs +227 -0
- package/{esm2020 → esm2022}/src/env/MirrorString.mjs +65 -65
- package/esm2022/src/event/ActionManager.mjs +91 -0
- package/esm2022/src/event/Event.mjs +1333 -0
- package/esm2022/src/event/EventHandler.mjs +766 -0
- package/esm2022/src/event/EventHandlerPosition.mjs +204 -0
- package/esm2022/src/event/EventsManager.mjs +2988 -0
- package/{esm2020 → esm2022}/src/event/IEventsManager.mjs +6 -6
- package/esm2022/src/event/RunTimeEvent.mjs +399 -0
- package/{esm2020 → esm2022}/src/event/RunTimeEventBase.mjs +3 -3
- package/esm2022/src/event/UserEventsTable.mjs +47 -0
- package/esm2022/src/exp/ExpTable.mjs +57 -0
- package/esm2022/src/exp/Expression.mjs +200 -0
- package/esm2022/src/exp/ExpressionDict.mjs +727 -0
- package/esm2022/src/exp/ExpressionEvaluator.mjs +4206 -0
- package/esm2022/src/exp/ExpressionLocalJpn.mjs +314 -0
- package/{esm2020 → esm2022}/src/exp/GlobalParamsTable.mjs +85 -85
- package/esm2022/src/exp/YesNoExp.mjs +36 -0
- package/esm2022/src/gui/CreatedFormVector.mjs +23 -0
- package/esm2022/src/gui/FormsTable.mjs +66 -0
- package/esm2022/src/gui/MgControl.mjs +363 -0
- package/esm2022/src/gui/MgForm.mjs +1224 -0
- package/esm2022/src/http/HttpManager.mjs +97 -0
- package/esm2022/src/http/client/HttpClientAsync.mjs +68 -0
- package/{esm2020 → esm2022}/src/http/client/HttpClientBase.mjs +132 -132
- package/esm2022/src/http/client/HttpClientEvents.mjs +39 -0
- package/esm2022/src/http/client/HttpClientSync.mjs +42 -0
- package/esm2022/src/http/client/HttpUtility.mjs +84 -0
- package/{esm2020 → esm2022}/src/http/client/ICommunicationsFailureHandler.mjs +1 -1
- package/{esm2020 → esm2022}/src/remote/AddUserLocateRemoteDataViewCommand.mjs +18 -18
- package/{esm2020 → esm2022}/src/remote/AddUserRangeRemoteDataViewCommand.mjs +18 -18
- package/{esm2020 → esm2022}/src/remote/AddUserSortRemoteDataViewCommand.mjs +18 -18
- package/esm2022/src/remote/RemoteCommandsProcessor.mjs +883 -0
- package/{esm2020 → esm2022}/src/remote/RemoteControlItemsRefreshCommand.mjs +25 -25
- package/{esm2020 → esm2022}/src/remote/RemoteDataViewCommandBase.mjs +24 -24
- package/{esm2020 → esm2022}/src/remote/RemoteDataViewCommandFactory.mjs +60 -60
- package/{esm2020 → esm2022}/src/remote/RemoteDataViewCommandUpdateNonModifiable.mjs +15 -15
- package/{esm2020 → esm2022}/src/remote/RemoteDataviewManager.mjs +17 -17
- package/{esm2020 → esm2022}/src/remote/RemoteInitDataViewCommand.mjs +10 -10
- package/{esm2020 → esm2022}/src/remote/ResetUserLocateRemoteDataviewCommand.mjs +16 -16
- package/{esm2020 → esm2022}/src/remote/ResetUserRangeRemoteDataviewCommand.mjs +12 -12
- package/{esm2020 → esm2022}/src/remote/ResetUserSortRemoteDataviewCommand.mjs +15 -15
- package/esm2022/src/remote/ServerError.mjs +40 -0
- package/{esm2020 → esm2022}/src/remote/SetTransactionStateRemoteDataViewCommand.mjs +19 -19
- package/esm2022/src/rt/Argument.mjs +265 -0
- package/esm2022/src/rt/ArgumentsList.mjs +103 -0
- package/esm2022/src/rt/Boundary.mjs +152 -0
- package/esm2022/src/rt/CompMainPrgTable.mjs +63 -0
- package/esm2022/src/rt/DataviewHeaderBase.mjs +98 -0
- package/{esm2020 → esm2022}/src/rt/DataviewHeaderFactory.mjs +6 -6
- package/esm2022/src/rt/DataviewHeaders.mjs +53 -0
- package/{esm2020 → esm2022}/src/rt/DataviewHeadersSaxHandler.mjs +38 -38
- package/{esm2020 → esm2022}/src/rt/ExecutionStack.mjs +94 -94
- package/{esm2020 → esm2022}/src/rt/ExecutionStackEntry.mjs +17 -17
- package/{esm2020 → esm2022}/src/rt/HandlersTable.mjs +96 -96
- package/{esm2020 → esm2022}/src/rt/IDataSourceViewDefinition.mjs +1 -1
- package/{esm2020 → esm2022}/src/rt/IDataviewHeader.mjs +1 -1
- package/{esm2020 → esm2022}/src/rt/IResultValue.mjs +1 -1
- package/esm2022/src/rt/LastFocusedManager.mjs +65 -0
- package/esm2022/src/rt/Operation.mjs +735 -0
- package/esm2022/src/rt/OperationTable.mjs +67 -0
- package/esm2022/src/rt/Recompute.mjs +355 -0
- package/{esm2020 → esm2022}/src/rt/RecomputeTable.mjs +62 -62
- package/{esm2020 → esm2022}/src/rt/RemoteDataviewHeader.mjs +108 -108
- package/esm2022/src/rt/ResultValue.mjs +10 -0
- package/esm2022/src/rt/TableCache.mjs +177 -0
- package/esm2022/src/rt/TableCacheManager.mjs +67 -0
- package/esm2022/src/rt/Transaction.mjs +53 -0
- package/esm2022/src/security/UserDetails.mjs +71 -0
- package/{esm2020 → esm2022}/src/tasks/IMGDataCollection.mjs +1 -1
- package/esm2022/src/tasks/MGData.mjs +552 -0
- package/esm2022/src/tasks/MGDataCollection.mjs +252 -0
- package/esm2022/src/tasks/RCTimer.mjs +63 -0
- package/{esm2020 → esm2022}/src/tasks/RemoteTaskService.mjs +44 -44
- package/esm2022/src/tasks/Task.mjs +2499 -0
- package/esm2022/src/tasks/TaskBase.mjs +83 -0
- package/{esm2020 → esm2022}/src/tasks/TaskServiceBase.mjs +24 -24
- package/esm2022/src/tasks/TasksTable.mjs +80 -0
- package/esm2022/src/tasks/sort/Sort.mjs +5 -0
- package/{esm2020 → esm2022}/src/tasks/sort/SortCollection.mjs +67 -67
- package/{esm2020 → esm2022}/src/util/ConstUtils.mjs +13 -13
- package/esm2022/src/util/FlowMonitorQueue.mjs +451 -0
- package/{esm2020 → esm2022}/src/util/HeapSort.mjs +69 -69
- package/{esm2020 → esm2022}/src/util/IMirrorXML.mjs +1 -1
- package/{esm2020 → esm2022}/src/util/IServerConfig.mjs +1 -1
- package/{esm2020 → esm2022}/src/util/MgBlockingQueue.mjs +1 -1
- package/esm2022/src/util/MgPriorityBlockingQueue.mjs +74 -0
- package/esm2022/src/util/MgPriorityQueue.mjs +66 -0
- package/{esm2020 → esm2022}/src/util/ParamParseResult.mjs +7 -7
- package/esm2022/src/util/PrmMap.mjs +152 -0
- package/esm2022/src/util/ReturnResult.mjs +46 -0
- package/esm2022/src/util/ReturnResultBase.mjs +18 -0
- package/esm2022/src/util/Scrambler.mjs +89 -0
- package/esm2022/src/util/UniqueIDUtils.mjs +13 -0
- package/{esm2020 → esm2022}/src/util/cookie.service.mjs +92 -92
- package/{fesm2020 → fesm2022}/magic-xpa-engine.mjs +29888 -29690
- package/fesm2022/magic-xpa-engine.mjs.map +1 -0
- package/index.d.ts +187 -187
- package/package.json +8 -14
- package/src/AccessHelper.d.ts +20 -20
- package/src/ClientManager.d.ts +35 -32
- package/src/CommandsProcessorBase.d.ts +23 -23
- package/src/CommandsProcessorManager.d.ts +6 -6
- package/src/CommandsTable.d.ts +22 -22
- package/src/ConstInterface.d.ts +516 -515
- package/src/CurrentClientVersion.d.ts +1 -1
- package/src/FlowMonitorInterface.d.ts +15 -15
- package/src/GUIManager.d.ts +17 -17
- package/src/GlobalCommandsManager.d.ts +17 -17
- package/src/GuiEventsProcessor.d.ts +24 -24
- package/src/ICommandsTable.d.ts +9 -9
- package/src/ServerConfig.d.ts +35 -34
- package/src/bridge/IGuiEvent.d.ts +19 -19
- package/src/bridge/MagicBridge.d.ts +16 -16
- package/src/commands/ClientOriginatedCommandTaskTag.d.ts +8 -8
- package/src/commands/ClientToServer/AddUserLocateDataViewCommand.d.ts +4 -4
- package/src/commands/ClientToServer/AddUserRangeDataviewCommand.d.ts +6 -6
- package/src/commands/ClientToServer/AddUserSortDataViewCommand.d.ts +6 -6
- package/src/commands/ClientToServer/BrowserEscEventCommand.d.ts +9 -8
- package/src/commands/ClientToServer/ClientOriginatedCommand.d.ts +8 -8
- package/src/commands/ClientToServer/ClientOriginatedCommandSerializer.d.ts +6 -6
- package/src/commands/ClientToServer/ColumnSortEventCommand.d.ts +11 -10
- package/src/commands/ClientToServer/CommandFactory.d.ts +64 -64
- package/src/commands/ClientToServer/CommandSerializationHelper.d.ts +20 -20
- package/src/commands/ClientToServer/ComputeEventCommand.d.ts +9 -8
- package/src/commands/ClientToServer/ContextTerminationEventCommand.d.ts +8 -7
- package/src/commands/ClientToServer/ContextTimeoutResetCommand.d.ts +8 -7
- package/src/commands/ClientToServer/ControlItemsRefreshCommand.d.ts +6 -6
- package/src/commands/ClientToServer/DataViewOutputCommand.d.ts +9 -9
- package/src/commands/ClientToServer/DataviewCommand.d.ts +32 -32
- package/src/commands/ClientToServer/EvaluateCommand.d.ts +16 -15
- package/src/commands/ClientToServer/EventCommand.d.ts +16 -15
- package/src/commands/ClientToServer/ExecOperCommand.d.ts +24 -23
- package/src/commands/ClientToServer/FetchDataControlValuesEventCommand.d.ts +9 -8
- package/src/commands/ClientToServer/GlobalParamsQueryCommand.d.ts +5 -5
- package/src/commands/ClientToServer/ICommandTaskTag.d.ts +3 -3
- package/src/commands/ClientToServer/IndexChangeEventCommand.d.ts +9 -8
- package/src/commands/ClientToServer/IniputForceWriteCommand.d.ts +11 -10
- package/src/commands/ClientToServer/NonReversibleExitEventCommand.d.ts +9 -8
- package/src/commands/ClientToServer/QueryCommand.d.ts +8 -8
- package/src/commands/ClientToServer/RecomputeCommand.d.ts +12 -11
- package/src/commands/ClientToServer/RefreshEventCommand.d.ts +13 -12
- package/src/commands/ClientToServer/RefreshScreenEventCommand.d.ts +11 -10
- package/src/commands/ClientToServer/RollbackEventCommand.d.ts +15 -14
- package/src/commands/ClientToServer/SelectProgramCommand.d.ts +7 -6
- package/src/commands/ClientToServer/SetTransactionStateDataviewCommand.d.ts +5 -5
- package/src/commands/ClientToServer/SubformOpenEventCommand.d.ts +9 -8
- package/src/commands/ClientToServer/SubformRefreshEventCommand.d.ts +10 -9
- package/src/commands/ClientToServer/TransactionCommand.d.ts +14 -12
- package/src/commands/ClientToServer/UnloadCommand.d.ts +8 -7
- package/src/commands/ClientToServer/WriteMessageToServerLogCommand.d.ts +6 -6
- package/src/commands/DataViewCommandBase.d.ts +6 -6
- package/src/commands/IClientCommand.d.ts +2 -2
- package/src/commands/IClientTargetedCommand.d.ts +12 -12
- package/src/commands/IClientToServerCommandInfo.d.ts +4 -3
- package/src/commands/ServerToClient/AbortCommand.d.ts +11 -11
- package/src/commands/ServerToClient/AddLocateCommand.d.ts +6 -6
- package/src/commands/ServerToClient/AddRangeCommand.d.ts +10 -10
- package/src/commands/ServerToClient/AddSortCommand.d.ts +9 -9
- package/src/commands/ServerToClient/ClientRefreshCommand.d.ts +7 -7
- package/src/commands/ServerToClient/ClientTargetedCommandBase.d.ts +12 -12
- package/src/commands/ServerToClient/EnhancedVerifyCommand.d.ts +13 -13
- package/src/commands/ServerToClient/OpenURLCommand.d.ts +21 -21
- package/src/commands/ServerToClient/ResetLocateCommand.d.ts +6 -6
- package/src/commands/ServerToClient/ResetRangeCommand.d.ts +6 -6
- package/src/commands/ServerToClient/ResetSortCommand.d.ts +6 -6
- package/src/commands/ServerToClient/ResultCommand.d.ts +10 -10
- package/src/commands/ServerToClient/VerifyCommand.d.ts +17 -17
- package/src/commands/ServerToClient/XMLBasedCommandBuilder.d.ts +11 -11
- package/src/communications/IConnectionStateManager.d.ts +4 -4
- package/src/communications/InteractiveCommunicationsFailureHandler.d.ts +6 -6
- package/src/data/DataSourceIdKey.d.ts +2 -2
- package/src/data/DataView.d.ts +162 -162
- package/src/data/DataViewBase.d.ts +12 -12
- package/src/data/DataviewManager.d.ts +14 -14
- package/src/data/DataviewManagerBase.d.ts +11 -11
- package/src/data/DvCache.d.ts +15 -15
- package/src/data/Field.d.ts +103 -103
- package/src/data/FieldBase.d.ts +23 -23
- package/src/data/FieldsTable.d.ts +27 -27
- package/src/data/IRecordsTable.d.ts +7 -7
- package/src/data/Key.d.ts +15 -15
- package/src/data/Record.d.ts +157 -156
- package/src/data/RecordOutOfDataViewException.d.ts +10 -10
- package/src/data/RecordsTable.d.ts +38 -38
- package/src/data/TaskTransactionManager.d.ts +17 -17
- package/src/data/XMLBasedDcValuesBuilder.d.ts +11 -11
- package/src/enums.d.ts +21 -21
- package/src/env/EnvVariablesTable.d.ts +17 -17
- package/src/env/Environment.d.ts +118 -118
- package/src/env/ILanguageData.d.ts +3 -3
- package/src/env/LanguageData.d.ts +20 -20
- package/src/env/MirrorString.d.ts +15 -15
- package/src/event/ActionManager.d.ts +14 -14
- package/src/event/Event.d.ts +79 -79
- package/src/event/EventHandler.d.ts +66 -66
- package/src/event/EventHandlerPosition.d.ts +25 -25
- package/src/event/EventsManager.d.ts +205 -204
- package/src/event/IEventsManager.d.ts +77 -77
- package/src/event/RunTimeEvent.d.ts +126 -123
- package/src/event/RunTimeEventBase.d.ts +5 -5
- package/src/event/UserEventsTable.d.ts +11 -11
- package/src/exp/ExpTable.d.ts +11 -11
- package/src/exp/Expression.d.ts +37 -37
- package/src/exp/ExpressionDict.d.ts +12 -12
- package/src/exp/ExpressionEvaluator.d.ts +198 -198
- package/src/exp/ExpressionLocalJpn.d.ts +18 -18
- package/src/exp/GlobalParamsTable.d.ts +19 -19
- package/src/exp/YesNoExp.d.ts +9 -9
- package/src/gui/CreatedFormVector.d.ts +10 -10
- package/src/gui/FormsTable.d.ts +15 -15
- package/src/gui/MgControl.d.ts +60 -60
- package/src/gui/MgForm.d.ts +96 -93
- package/src/http/HttpManager.d.ts +25 -25
- package/src/http/client/HttpClientAsync.d.ts +16 -16
- package/src/http/client/HttpClientBase.d.ts +30 -30
- package/src/http/client/HttpClientEvents.d.ts +18 -18
- package/src/http/client/HttpClientSync.d.ts +17 -17
- package/src/http/client/HttpUtility.d.ts +10 -10
- package/src/http/client/ICommunicationsFailureHandler.d.ts +5 -5
- package/src/remote/AddUserLocateRemoteDataViewCommand.d.ts +8 -8
- package/src/remote/AddUserRangeRemoteDataViewCommand.d.ts +8 -8
- package/src/remote/AddUserSortRemoteDataViewCommand.d.ts +8 -8
- package/src/remote/RemoteCommandsProcessor.d.ts +51 -51
- package/src/remote/RemoteControlItemsRefreshCommand.d.ts +8 -8
- package/src/remote/RemoteDataViewCommandBase.d.ts +10 -10
- package/src/remote/RemoteDataViewCommandFactory.d.ts +6 -6
- package/src/remote/RemoteDataViewCommandUpdateNonModifiable.d.ts +8 -8
- package/src/remote/RemoteDataviewManager.d.ts +9 -9
- package/src/remote/RemoteInitDataViewCommand.d.ts +7 -7
- package/src/remote/ResetUserLocateRemoteDataviewCommand.d.ts +7 -7
- package/src/remote/ResetUserRangeRemoteDataviewCommand.d.ts +7 -7
- package/src/remote/ResetUserSortRemoteDataviewCommand.d.ts +7 -7
- package/src/remote/ServerError.d.ts +16 -16
- package/src/remote/SetTransactionStateRemoteDataViewCommand.d.ts +8 -8
- package/src/rt/Argument.d.ts +36 -36
- package/src/rt/ArgumentsList.d.ts +24 -24
- package/src/rt/Boundary.d.ts +27 -27
- package/src/rt/CompMainPrgTable.d.ts +10 -10
- package/src/rt/DataviewHeaderBase.d.ts +34 -34
- package/src/rt/DataviewHeaderFactory.d.ts +5 -5
- package/src/rt/DataviewHeaders.d.ts +12 -12
- package/src/rt/DataviewHeadersSaxHandler.d.ts +10 -10
- package/src/rt/ExecutionStack.d.ts +22 -22
- package/src/rt/ExecutionStackEntry.d.ts +7 -7
- package/src/rt/HandlersTable.d.ts +19 -19
- package/src/rt/IDataSourceViewDefinition.d.ts +6 -6
- package/src/rt/IDataviewHeader.d.ts +10 -10
- package/src/rt/IResultValue.d.ts +4 -4
- package/src/rt/LastFocusedManager.d.ts +23 -23
- package/src/rt/Operation.d.ts +97 -97
- package/src/rt/OperationTable.d.ts +15 -15
- package/src/rt/Recompute.d.ts +41 -41
- package/src/rt/RecomputeTable.d.ts +9 -9
- package/src/rt/RemoteDataviewHeader.d.ts +14 -14
- package/src/rt/ResultValue.d.ts +7 -7
- package/src/rt/TableCache.d.ts +29 -29
- package/src/rt/TableCacheManager.d.ts +10 -10
- package/src/rt/Transaction.d.ts +23 -23
- package/src/security/UserDetails.d.ts +16 -16
- package/src/tasks/IMGDataCollection.d.ts +26 -26
- package/src/tasks/MGData.d.ts +63 -63
- package/src/tasks/MGDataCollection.d.ts +42 -42
- package/src/tasks/RCTimer.d.ts +13 -13
- package/src/tasks/RemoteTaskService.d.ts +16 -16
- package/src/tasks/Task.d.ts +312 -312
- package/src/tasks/TaskBase.d.ts +123 -123
- package/src/tasks/TaskServiceBase.d.ts +16 -16
- package/src/tasks/TasksTable.d.ts +21 -21
- package/src/tasks/sort/Sort.d.ts +4 -4
- package/src/tasks/sort/SortCollection.d.ts +11 -11
- package/src/util/ConstUtils.d.ts +3 -3
- package/src/util/FlowMonitorQueue.d.ts +70 -70
- package/src/util/HeapSort.d.ts +6 -6
- package/src/util/IMirrorXML.d.ts +6 -6
- package/src/util/IServerConfig.d.ts +11 -11
- package/src/util/MgBlockingQueue.d.ts +5 -5
- package/src/util/MgPriorityBlockingQueue.d.ts +17 -17
- package/src/util/MgPriorityQueue.d.ts +13 -13
- package/src/util/ParamParseResult.d.ts +6 -6
- package/src/util/PrmMap.d.ts +28 -28
- package/src/util/ReturnResult.d.ts +18 -18
- package/src/util/ReturnResultBase.d.ts +11 -11
- package/src/util/Scrambler.d.ts +10 -10
- package/src/util/UniqueIDUtils.d.ts +4 -4
- package/src/util/cookie.service.d.ts +8 -8
- package/esm2020/src/AccessHelper.mjs +0 -9
- package/esm2020/src/ClientManager.mjs +0 -399
- package/esm2020/src/CommandsProcessorBase.mjs +0 -58
- package/esm2020/src/CommandsTable.mjs +0 -162
- package/esm2020/src/ConstInterface.mjs +0 -516
- package/esm2020/src/FlowMonitorInterface.mjs +0 -16
- package/esm2020/src/GUIManager.mjs +0 -62
- package/esm2020/src/GlobalCommandsManager.mjs +0 -34
- package/esm2020/src/GuiEventsProcessor.mjs +0 -154
- package/esm2020/src/ServerConfig.mjs +0 -117
- package/esm2020/src/bridge/MagicBridge.mjs +0 -41
- package/esm2020/src/commands/ClientOriginatedCommandTaskTag.mjs +0 -11
- package/esm2020/src/commands/ClientToServer/BrowserEscEventCommand.mjs +0 -23
- package/esm2020/src/commands/ClientToServer/ColumnSortEventCommand.mjs +0 -26
- package/esm2020/src/commands/ClientToServer/CommandFactory.mjs +0 -260
- package/esm2020/src/commands/ClientToServer/CommandSerializationHelper.mjs +0 -69
- package/esm2020/src/commands/ClientToServer/ComputeEventCommand.mjs +0 -23
- package/esm2020/src/commands/ClientToServer/DataViewOutputCommand.mjs +0 -13
- package/esm2020/src/commands/ClientToServer/EvaluateCommand.mjs +0 -36
- package/esm2020/src/commands/ClientToServer/ExecOperCommand.mjs +0 -67
- package/esm2020/src/commands/ClientToServer/FetchDataControlValuesEventCommand.mjs +0 -22
- package/esm2020/src/commands/ClientToServer/IndexChangeEventCommand.mjs +0 -21
- package/esm2020/src/commands/ClientToServer/IniputForceWriteCommand.mjs +0 -23
- package/esm2020/src/commands/ClientToServer/RecomputeCommand.mjs +0 -27
- package/esm2020/src/commands/ClientToServer/RefreshEventCommand.mjs +0 -27
- package/esm2020/src/commands/ClientToServer/RefreshScreenEventCommand.mjs +0 -24
- package/esm2020/src/commands/ClientToServer/RollbackEventCommand.mjs +0 -39
- package/esm2020/src/commands/ClientToServer/SelectProgramCommand.mjs +0 -15
- package/esm2020/src/commands/ClientToServer/SubformOpenEventCommand.mjs +0 -21
- package/esm2020/src/commands/ClientToServer/SubformRefreshEventCommand.mjs +0 -24
- package/esm2020/src/commands/ClientToServer/TransactionCommand.mjs +0 -28
- package/esm2020/src/commands/ClientToServer/WriteMessageToServerLogCommand.mjs +0 -18
- package/esm2020/src/commands/DataViewCommandBase.mjs +0 -10
- package/esm2020/src/commands/IClientTargetedCommand.mjs +0 -9
- package/esm2020/src/commands/ServerToClient/AbortCommand.mjs +0 -65
- package/esm2020/src/commands/ServerToClient/ClientRefreshCommand.mjs +0 -25
- package/esm2020/src/commands/ServerToClient/ClientTargetedCommandBase.mjs +0 -27
- package/esm2020/src/commands/ServerToClient/EnhancedVerifyCommand.mjs +0 -45
- package/esm2020/src/commands/ServerToClient/OpenURLCommand.mjs +0 -221
- package/esm2020/src/commands/ServerToClient/ResultCommand.mjs +0 -37
- package/esm2020/src/commands/ServerToClient/VerifyCommand.mjs +0 -83
- package/esm2020/src/communications/InteractiveCommunicationsFailureHandler.mjs +0 -17
- package/esm2020/src/data/DataView.mjs +0 -1610
- package/esm2020/src/data/DataviewManager.mjs +0 -28
- package/esm2020/src/data/DataviewManagerBase.mjs +0 -15
- package/esm2020/src/data/DvCache.mjs +0 -67
- package/esm2020/src/data/Field.mjs +0 -646
- package/esm2020/src/data/FieldBase.mjs +0 -18
- package/esm2020/src/data/FieldsTable.mjs +0 -103
- package/esm2020/src/data/Record.mjs +0 -846
- package/esm2020/src/data/RecordsTable.mjs +0 -267
- package/esm2020/src/env/EnvVariablesTable.mjs +0 -340
- package/esm2020/src/env/Environment.mjs +0 -489
- package/esm2020/src/env/LanguageData.mjs +0 -226
- package/esm2020/src/event/ActionManager.mjs +0 -91
- package/esm2020/src/event/Event.mjs +0 -1333
- package/esm2020/src/event/EventHandler.mjs +0 -766
- package/esm2020/src/event/EventHandlerPosition.mjs +0 -204
- package/esm2020/src/event/EventsManager.mjs +0 -2975
- package/esm2020/src/event/RunTimeEvent.mjs +0 -392
- package/esm2020/src/event/UserEventsTable.mjs +0 -47
- package/esm2020/src/exp/ExpTable.mjs +0 -59
- package/esm2020/src/exp/Expression.mjs +0 -200
- package/esm2020/src/exp/ExpressionDict.mjs +0 -727
- package/esm2020/src/exp/ExpressionEvaluator.mjs +0 -4208
- package/esm2020/src/exp/ExpressionLocalJpn.mjs +0 -314
- package/esm2020/src/exp/YesNoExp.mjs +0 -36
- package/esm2020/src/gui/CreatedFormVector.mjs +0 -23
- package/esm2020/src/gui/FormsTable.mjs +0 -66
- package/esm2020/src/gui/MgControl.mjs +0 -353
- package/esm2020/src/gui/MgForm.mjs +0 -1181
- package/esm2020/src/http/HttpManager.mjs +0 -97
- package/esm2020/src/http/client/HttpClientAsync.mjs +0 -67
- package/esm2020/src/http/client/HttpClientEvents.mjs +0 -39
- package/esm2020/src/http/client/HttpClientSync.mjs +0 -42
- package/esm2020/src/http/client/HttpUtility.mjs +0 -84
- package/esm2020/src/remote/RemoteCommandsProcessor.mjs +0 -880
- package/esm2020/src/remote/ServerError.mjs +0 -40
- package/esm2020/src/rt/Argument.mjs +0 -265
- package/esm2020/src/rt/ArgumentsList.mjs +0 -103
- package/esm2020/src/rt/Boundary.mjs +0 -152
- package/esm2020/src/rt/CompMainPrgTable.mjs +0 -65
- package/esm2020/src/rt/DataviewHeaderBase.mjs +0 -96
- package/esm2020/src/rt/DataviewHeaders.mjs +0 -53
- package/esm2020/src/rt/LastFocusedManager.mjs +0 -67
- package/esm2020/src/rt/Operation.mjs +0 -735
- package/esm2020/src/rt/OperationTable.mjs +0 -67
- package/esm2020/src/rt/Recompute.mjs +0 -355
- package/esm2020/src/rt/ResultValue.mjs +0 -12
- package/esm2020/src/rt/TableCache.mjs +0 -177
- package/esm2020/src/rt/TableCacheManager.mjs +0 -67
- package/esm2020/src/rt/Transaction.mjs +0 -53
- package/esm2020/src/security/UserDetails.mjs +0 -71
- package/esm2020/src/tasks/MGData.mjs +0 -552
- package/esm2020/src/tasks/MGDataCollection.mjs +0 -252
- package/esm2020/src/tasks/RCTimer.mjs +0 -63
- package/esm2020/src/tasks/Task.mjs +0 -2496
- package/esm2020/src/tasks/TaskBase.mjs +0 -87
- package/esm2020/src/tasks/TasksTable.mjs +0 -80
- package/esm2020/src/tasks/sort/Sort.mjs +0 -7
- package/esm2020/src/util/FlowMonitorQueue.mjs +0 -453
- package/esm2020/src/util/MgPriorityBlockingQueue.mjs +0 -74
- package/esm2020/src/util/MgPriorityQueue.mjs +0 -66
- package/esm2020/src/util/PrmMap.mjs +0 -151
- package/esm2020/src/util/ReturnResult.mjs +0 -46
- package/esm2020/src/util/ReturnResultBase.mjs +0 -18
- package/esm2020/src/util/Scrambler.mjs +0 -89
- package/esm2020/src/util/UniqueIDUtils.mjs +0 -12
- package/fesm2015/magic-xpa-engine.mjs +0 -30837
- package/fesm2015/magic-xpa-engine.mjs.map +0 -1
- package/fesm2020/magic-xpa-engine.mjs.map +0 -1
@@ -1,70 +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
|
-
}
|
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
70
|
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiSGVhcFNvcnQuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi9wcm9qZWN0cy9lbmdpbmUvc3JjL3V0aWwvSGVhcFNvcn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Q7XHJcblxyXG4gICAgICAvKiBoZWFwaWZ5ICovXHJcblxyXG4gICAgICBkbyB7XHJcbiAgICAgICAgaSA9IGxhcmdlc3Q7XHJcbiAgICAgICAgbCA9IEhlYXBTb3J0LmxlZnQobGFyZ2VzdCk7XHJcbiAgICAgICAgciA9IEhlYXBTb3J0LnJpZ2h0KGxhcmdlc3QpO1xyXG5cclxuICAgICAgICBpZiAobCA8PSB0b3ApIHtcclxuICAgICAgICAgIGlmIChhcnJheVtsXS5Db21wYXJlVG8oYXJyYXlbaV0pID4gMClcclxuICAgICAgICAgICAgbGFyZ2VzdCA9IGw7XHJcbiAgICAgICAgfVxyXG4gICAgICAgIGlmIChyIDw9IHRvcCkge1xyXG4gICAgICAgICAgaWYgKGFycmF5W3JdLkNvbXBhcmVUbyhhcnJheVtsYXJnZXN0XSkgPiAwKVxyXG4gICAgICAgICAgICBsYXJnZXN0ID0gcjtcclxuICAgICAgICB9XHJcbiAgICAgICAgaWYgKGxhcmdlc3QgIT09IGkpIHtcclxuICAgICAgICAgIHRlbXAgPSBhcnJheVtsYXJnZXN0XTtcclxuICAgICAgICAgIGFycmF5W2xhcmdlc3RdID0gYXJyYXlbaV07XHJcbiAgICAgICAgICBhcnJheVtpXSA9IHRlbXA7XHJcbiAgICAgICAgfVxyXG4gICAgICB9XHJcbiAgICAgIHdoaWxlIChsYXJnZXN0ICE9PSBpKTtcclxuICAgIH1cclxuICAgIHdoaWxlICh0ID4gMCk7XHJcblxyXG4gICAgdCA9IHNvcnRzaXplO1xyXG5cclxuICAgIGRvIHtcclxuICAgICAgdG9wID0gdG9wIC0gMTtcclxuICAgICAgdCA9IHQgLSAxO1xyXG5cclxuICAgICAgbGV0IGhlcmU6IG51bWJlciA9IHQ7XHJcblxyXG4gICAgICB0ZW1wID0gYXJyYXlbaGVyZV07XHJcbiAgICAgIGFycmF5W2hlcmVdID0gYXJyYXlbMF07XHJcbiAgICAgIGFycmF5WzBdID0gdGVtcDtcclxuXHJcbiAgICAgIGxhcmdlc3QgPSAwO1xyXG5cclxuICAgICAgZG8ge1xyXG4gICAgICAgIGkgPSBsYXJnZXN0O1xyXG4gICAgICAgIGwgPSBIZWFwU29ydC5sZWZ0KGxhcmdlc3QpO1xyXG4gICAgICAgIHIgPSBIZWFwU29ydC5yaWdodChsYXJnZXN0KTtcclxuXHJcbiAgICAgICAgaWYgKGwgPD0gdG9wKSB7XHJcbiAgICAgICAgICBpZiAoYXJyYXlbbF0uQ29tcGFyZVRvKGFycmF5W2ldKSA+IDApIHtcclxuICAgICAgICAgICAgbGFyZ2VzdCA9IGw7XHJcbiAgICAgICAgICB9XHJcbiAgICAgICAgfVxyXG4gICAgICAgIGlmIChyIDw9IHRvcCkge1xyXG4gICAgICAgICAgaWYgKGFycmF5W3JdLkNvbXBhcmVUbyhhcnJheVtsYXJnZXN0XSkgPiAwKSB7XHJcbiAgICAgICAgICAgIGxhcmdlc3QgPSByO1xyXG4gICAgICAgICAgfVxyXG4gICAgICAgIH1cclxuICAgICAgICBpZiAobGFyZ2VzdCAhPT0gaSkge1xyXG4gICAgICAgICAgdGVtcCA9IGFycmF5W2xhcmdlc3RdO1xyXG4gICAgICAgICAgYXJyYXlbbGFyZ2VzdF0gPSBhcnJheVtpXTtcclxuICAgICAgICAgIGFycmF5W2ldID0gdGVtcDtcclxuICAgICAgICB9XHJcbiAgICAgIH1cclxuICAgICAgd2hpbGUgKGxhcmdlc3QgIT09IGkpO1xyXG4gICAgfVxyXG4gICAgd2hpbGUgKHQgPiAxKTtcclxuICB9XHJcbn1cclxuXHJcbiJdfQ==
|
@@ -1,2 +1,2 @@
|
|
1
|
-
export {};
|
1
|
+
export {};
|
2
2
|
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiSU1pcnJvclhNTC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uL3Byb2plY3RzL2VuZ2luZS9zcmMvdXRpbC9J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XI6IHN0cmluZyxcclxuICByZXF1ZXN0ZXI6IHN0cmluZztcclxuICBhcHBuYW1lOiBzdHJpbmc7XHJcbiAgTG9nQ2xpZW50U2VxdWVuY2VGb3JBY3Rpdml0eU1vbml0b3I6IGJvb2xlYW47XHJcbiAgSW50ZXJuYWxMb2dMZXZlbDogc3RyaW5nO1xyXG4gIEludGVybmFsTG9nU3luYzogc3RyaW5nO1xyXG4gIERpc3BsYXlHZW5lcmljRXJyb3I6IGJvb2xlYW47XHJcbiAgRmlyc3RIVFRQUmVxdWVzdFRpbWVvdXQ6IG51bWJlcjtcclxufVxyXG4iXX0=
|
@@ -1,2 +1,2 @@
|
|
1
|
-
export {};
|
1
|
+
export {};
|
2
2
|
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiTWdCbG9ja2luZ1F1ZXVlLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vcHJvamVjdHMvZW5naW5lL3NyYy91dGlsL01nQmxvY2tpbmdRdWV1ZS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiIiwic291cmNlc0NvbnRlbnQiOlsiZXhwb3J0IGludGVyZmFjZSBNZ0Jsb2NraW5nUXVldWUge1xyXG4gIG9mZmVyKG86IGFueSk6IGJvb2xlYW47XHJcblxyXG4gIHB1dChvOiBhbnkpOiB2b2lkO1xyXG5cclxuICB3YWl0Rm9yRWxlbWVudCgpOiB2b2lkO1xyXG59XHJcbiJdfQ==
|
@@ -0,0 +1,74 @@
|
|
1
|
+
import { MgPriorityQueue } from "./MgPriorityQueue";
|
2
|
+
import { RunTimeEventBase } from "../event/RunTimeEventBase";
|
3
|
+
import { Misc, Priority, SyncExecutionHelper } from "@magic-xpa/utils";
|
4
|
+
import { Debug, Int32 } from "@magic-xpa/mscorelib";
|
5
|
+
export class MgPriorityBlockingQueue {
|
6
|
+
_queue = null;
|
7
|
+
_timeFirstEvent = 0;
|
8
|
+
constructor() {
|
9
|
+
this._queue = new MgPriorityQueue();
|
10
|
+
}
|
11
|
+
isBackgroundEvent(o) {
|
12
|
+
let result = false;
|
13
|
+
if (o instanceof RunTimeEventBase) {
|
14
|
+
let runTimeEvent = o;
|
15
|
+
if (runTimeEvent.getPriority() === Priority.LOWEST)
|
16
|
+
result = true;
|
17
|
+
}
|
18
|
+
return result;
|
19
|
+
}
|
20
|
+
offer(o) {
|
21
|
+
try {
|
22
|
+
let condition = this._queue.offer(o);
|
23
|
+
if (this._timeFirstEvent === 0) {
|
24
|
+
if (!this.isBackgroundEvent(o)) {
|
25
|
+
this._timeFirstEvent = Misc.getSystemMilliseconds();
|
26
|
+
}
|
27
|
+
}
|
28
|
+
Debug.Assert(condition);
|
29
|
+
SyncExecutionHelper.Instance.Pulse();
|
30
|
+
return true;
|
31
|
+
}
|
32
|
+
finally { }
|
33
|
+
}
|
34
|
+
put(o) {
|
35
|
+
this.offer(o);
|
36
|
+
}
|
37
|
+
async waitForElement() {
|
38
|
+
if (this._queue.Size === 0) {
|
39
|
+
this._timeFirstEvent = 0;
|
40
|
+
await SyncExecutionHelper.Instance.Wait();
|
41
|
+
}
|
42
|
+
}
|
43
|
+
GetTime() {
|
44
|
+
return this._timeFirstEvent;
|
45
|
+
}
|
46
|
+
poll() {
|
47
|
+
let result;
|
48
|
+
try {
|
49
|
+
let obj = this._queue.poll();
|
50
|
+
if (this.isBackgroundEvent(obj)) {
|
51
|
+
this._timeFirstEvent = 0;
|
52
|
+
}
|
53
|
+
result = obj;
|
54
|
+
}
|
55
|
+
finally { }
|
56
|
+
return result;
|
57
|
+
}
|
58
|
+
peek() {
|
59
|
+
return this._queue.peek();
|
60
|
+
}
|
61
|
+
size() {
|
62
|
+
return this._queue.Size;
|
63
|
+
}
|
64
|
+
remainingCapacity() {
|
65
|
+
return Int32.MaxValue;
|
66
|
+
}
|
67
|
+
clear() {
|
68
|
+
this._queue.clear();
|
69
|
+
}
|
70
|
+
isEmpty() {
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kge31cclxuXHJcbiAgICByZXR1cm4gcmVzdWx0O1xyXG4gIH1cclxuXHJcbiAgcGVlaygpOiBhbnkge1xyXG4gICAgICByZXR1cm4gdGhpcy5fcXVldWUucGVlaygpO1xyXG4gIH1cclxuXHJcbiAgc2l6ZSgpOiBudW1iZXIge1xyXG4gICAgcmV0dXJuIHRoaXMuX3F1ZXVlLlNpemU7XHJcbiAgfVxyXG5cclxuICByZW1haW5pbmdDYXBhY2l0eSgpOiBudW1iZXIge1xyXG4gICAgcmV0dXJuIEludDMyLk1heFZhbHVlO1xyXG4gIH1cclxuXHJcbiAgY2xlYXIoKTogdm9pZCB7XHJcbiAgICB0aGlzLl9xdWV1ZS5jbGVhcigpO1xyXG4gIH1cclxuXHJcbiAgaXNFbXB0eSgpOiBib29sZWFuIHtcclxuICAgIHJldHVybiB0aGlzLl9xdWV1ZS5pc0VtcHR5KCk7XHJcbiAgfVxyXG59XHJcbiJdfQ==
|
@@ -0,0 +1,66 @@
|
|
1
|
+
export class MgPriorityQueue {
|
2
|
+
static DEFAULT_INITIAL_CAPACITY = 11;
|
3
|
+
_queue = null;
|
4
|
+
Size = 0;
|
5
|
+
constructor() {
|
6
|
+
this._queue = new Array(MgPriorityQueue.DEFAULT_INITIAL_CAPACITY + 1);
|
7
|
+
for (let _ai = 0; _ai < this._queue.length; ++_ai)
|
8
|
+
this._queue[_ai] = null;
|
9
|
+
}
|
10
|
+
offer(o) {
|
11
|
+
++this.Size;
|
12
|
+
if (this.Size >= this._queue.length)
|
13
|
+
this._queue.length = this.Size;
|
14
|
+
this._queue[this.Size] = o;
|
15
|
+
this.fixUp(this.Size);
|
16
|
+
return true;
|
17
|
+
}
|
18
|
+
peek() {
|
19
|
+
if (this.Size === 0)
|
20
|
+
return null;
|
21
|
+
return this._queue[1];
|
22
|
+
}
|
23
|
+
isEmpty() {
|
24
|
+
return this.Size === 0;
|
25
|
+
}
|
26
|
+
clear() {
|
27
|
+
for (let i = 1; i <= this.Size; i++)
|
28
|
+
this._queue[i] = null;
|
29
|
+
this.Size = 0;
|
30
|
+
}
|
31
|
+
poll() {
|
32
|
+
if (this.Size === 0)
|
33
|
+
return null;
|
34
|
+
let result = this._queue[1];
|
35
|
+
this._queue[1] = this._queue[this.Size];
|
36
|
+
this._queue[this.Size--] = null;
|
37
|
+
if (this.Size > 1)
|
38
|
+
this.fixDown(1);
|
39
|
+
return result;
|
40
|
+
}
|
41
|
+
fixUp(k) {
|
42
|
+
while (k > 1) {
|
43
|
+
let j = k >> 1;
|
44
|
+
if (this._queue[j].CompareTo(this._queue[k]) <= 0)
|
45
|
+
break;
|
46
|
+
let tmp = this._queue[j];
|
47
|
+
this._queue[j] = this._queue[k];
|
48
|
+
this._queue[k] = tmp;
|
49
|
+
k = j;
|
50
|
+
}
|
51
|
+
}
|
52
|
+
fixDown(k) {
|
53
|
+
let j;
|
54
|
+
while ((j = k << 1) <= this.Size && j > 0) {
|
55
|
+
if (j < this.Size && this._queue[j].CompareTo(this._queue[j + 1]) > 0)
|
56
|
+
j++;
|
57
|
+
if (this._queue[k].CompareTo(this._queue[j]) <= 0)
|
58
|
+
break;
|
59
|
+
let tmp = this._queue[j];
|
60
|
+
this._queue[j] = this._queue[k];
|
61
|
+
this._queue[k] = tmp;
|
62
|
+
k = j;
|
63
|
+
}
|
64
|
+
}
|
65
|
+
}
|
66
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiTWdQcmlvcml0eVF1ZXVlLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vcHJvamVjdHMvZW5naW5lL3NyYy91dGlsL01nUHJpb3JpdHlRdWV1ZS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFTQSxNQUFNLE9BQU8sZUFBZTtJQUNsQixNQUFNLENBQUMsd0JBQXdCLEdBQVcsRUFBRSxDQUFDO0lBVTdDLE1BQU0sR0FBVSxJQUFJLENBQUM7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vZCBmdW5jdGlvbnMgYnkgXCJkZW1vdGluZ1wiIF9xdWV1ZVtrXSBkb3duIHRoZSBoaWVyYXJjaHkgKGJ5IHN3YXBwaW5nIGl0IHdpdGggaXRzIHNtYWxsZXIgY2hpbGQpXHJcbiAgLy8vIHJlcGVhdGVkbHkgdW50aWwgX3F1ZXVlW2tdIGlzIGxlc3MgdGhhbiBvciBlcXVhbCB0byBpdHMgY2hpbGRyZW4uXHJcbiAgLy8vIDwvc3VtbWFyeT5cclxuICBwcml2YXRlIGZpeERvd24oazogbnVtYmVyKTogdm9pZCB7XHJcbiAgICBsZXQgajogbnVtYmVyO1xyXG4gICAgd2hpbGUgKChqID0gayA8PCAxKSA8PSB0aGlzLlNpemUgJiYgaiA+IDApIHtcclxuICAgICAgaWYgKGogPCB0aGlzLlNpemUgJiYgKDxJQ29tcGFyYWJsZT50aGlzLl9xdWV1ZVtqXSkuQ29tcGFyZVRvKDxJQ29tcGFyYWJsZT50aGlzLl9xdWV1ZVtqICsgMV0pID4gMClcclxuICAgICAgICBqKys7XHJcblxyXG4gICAgICBpZiAoKDxJQ29tcGFyYWJsZT50aGlzLl9xdWV1ZVtrXSkuQ29tcGFyZVRvKDxJQ29tcGFyYWJsZT50aGlzLl9xdWV1ZVtqXSkgPD0gMClcclxuICAgICAgICBicmVhaztcclxuXHJcbiAgICAgIGxldCB0bXA6IGFueSA9IHRoaXMuX3F1ZXVlW2pdO1xyXG4gICAgICB0aGlzLl9xdWV1ZVtqXSA9IHRoaXMuX3F1ZXVlW2tdO1xyXG4gICAgICB0aGlzLl9xdWV1ZVtrXSA9IHRtcDtcclxuICAgICAgayA9IGo7XHJcbiAgICB9XHJcbiAgfVxyXG59XHJcbiJdfQ==
|
@@ -1,8 +1,8 @@
|
|
1
|
-
export var ParamParseResult;
|
2
|
-
(function (ParamParseResult) {
|
3
|
-
ParamParseResult[ParamParseResult["OK"] = 0] = "OK";
|
4
|
-
ParamParseResult[ParamParseResult["TOUPPER"] = 1] = "TOUPPER";
|
5
|
-
ParamParseResult[ParamParseResult["DELETE"] = 2] = "DELETE";
|
6
|
-
ParamParseResult[ParamParseResult["FAILED"] = 3] = "FAILED";
|
7
|
-
})(ParamParseResult || (ParamParseResult = {}));
|
1
|
+
export var ParamParseResult;
|
2
|
+
(function (ParamParseResult) {
|
3
|
+
ParamParseResult[ParamParseResult["OK"] = 0] = "OK";
|
4
|
+
ParamParseResult[ParamParseResult["TOUPPER"] = 1] = "TOUPPER";
|
5
|
+
ParamParseResult[ParamParseResult["DELETE"] = 2] = "DELETE";
|
6
|
+
ParamParseResult[ParamParseResult["FAILED"] = 3] = "FAILED";
|
7
|
+
})(ParamParseResult || (ParamParseResult = {}));
|
8
8
|
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiUGFyYW1QYXJzZVJlc3VsdC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uL3Byb2plY3RzL2VuZ2luZS9zcmMvdXRpbC9QYXJhbVBhcnNlUmVzdWx0LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE1BQU0sQ0FBTixJQUFZLGdCQUtYO0FBTEQsV0FBWSxnQkFBZ0I7SUFDMUIsbURBQUUsQ0FBQTtJQUNGLDZEQUFPLENBQUE7SUFDUCwyREFBTSxDQUFBO0lBQ04sMkRBQU0sQ0FBQTtBQUNSLENBQUMsRUFMVyxnQkFBZ0IsS0FBaEIsZ0JBQWdCLFFBSzNCIiwic291cmNlc0NvbnRlbnQiOlsiZXhwb3J0IGVudW0gUGFyYW1QYXJzZVJlc3VsdCB7XHJcbiAgT0ssICAgICAgICAgLy8gc2F2ZSB0aGUgdmFsdWUgYXMgaXNcclxuICBUT1VQUEVSLCAgICAvLyBjb252ZXJ0IHRoZSBuYW1lIHRvIHVwcGVyIGNhc2UsIHNvIGl0IHdvdWxkIGJlIGNhc2UgaW5zZW5zaXRpdmVcclxuICBERUxFVEUsICAgICAvLyByZW1vdmUgdGhlIHZhcmlhYmxlIGZyb20gdGhlIGRpY3Rpb25hcnlcclxuICBGQUlMRUQgICAgICAvLyBwYXJzaW5nIGVycm9yXHJcbn1cclxuIl19
|
@@ -0,0 +1,152 @@
|
|
1
|
+
import { Dictionary, List, StringBuilder } from '@magic-xpa/mscorelib';
|
2
|
+
import { Logger, XMLConstants, XmlParser } from '@magic-xpa/utils';
|
3
|
+
import { ConstInterface } from '../ConstInterface';
|
4
|
+
import { ParamParseResult } from "./ParamParseResult";
|
5
|
+
export class PrmMap {
|
6
|
+
values = null;
|
7
|
+
getvalue(s) {
|
8
|
+
if (this.values.ContainsKey(s))
|
9
|
+
return this.values.get_Item(s);
|
10
|
+
else
|
11
|
+
return null;
|
12
|
+
}
|
13
|
+
setValue(s, v) {
|
14
|
+
this.values.set_Item(s, v);
|
15
|
+
}
|
16
|
+
remove(s) {
|
17
|
+
this.values.Remove(s);
|
18
|
+
}
|
19
|
+
constructor() {
|
20
|
+
this.values = new Dictionary();
|
21
|
+
}
|
22
|
+
}
|
23
|
+
export class MirrorPrmMap extends PrmMap {
|
24
|
+
changes = null;
|
25
|
+
mirroredID = null;
|
26
|
+
type;
|
27
|
+
constructor(type) {
|
28
|
+
super();
|
29
|
+
this.type = type;
|
30
|
+
this.changes = new List();
|
31
|
+
}
|
32
|
+
new() {
|
33
|
+
return new this.type();
|
34
|
+
}
|
35
|
+
setValue(s, v, addToChanges) {
|
36
|
+
if (arguments.length === 3)
|
37
|
+
this.setValue_0(s, v, addToChanges);
|
38
|
+
else
|
39
|
+
this.setValue_1(s, v);
|
40
|
+
}
|
41
|
+
setValue_0(s, v, addToChanges) {
|
42
|
+
if (addToChanges && !this.changes.Contains(s))
|
43
|
+
this.changes.push(s);
|
44
|
+
super.setValue(s, v);
|
45
|
+
}
|
46
|
+
setValue_1(s, v) {
|
47
|
+
if (!this.changes.Contains(s))
|
48
|
+
this.changes.push(s);
|
49
|
+
super.setValue(s, v);
|
50
|
+
}
|
51
|
+
remove(s) {
|
52
|
+
if (!this.changes.Contains(s)) {
|
53
|
+
this.changes.push(s);
|
54
|
+
}
|
55
|
+
super.remove(s);
|
56
|
+
}
|
57
|
+
mirrorAllToXML() {
|
58
|
+
let xml = new StringBuilder();
|
59
|
+
if (this.values != null) {
|
60
|
+
xml.Append("<" + this.mirroredID + ">");
|
61
|
+
for (let key of this.values.Keys) {
|
62
|
+
if (this.CheckIfSystemReservedParam(key))
|
63
|
+
continue;
|
64
|
+
xml.Append("<" + ConstInterface.MG_TAG_PARAM + " " +
|
65
|
+
XMLConstants.MG_ATTR_NAME + "=\"" + XmlParser.escape(key) + "\" ");
|
66
|
+
xml.Append(this.values.get_Item(key).mirrorToXML());
|
67
|
+
xml.Append(XMLConstants.TAG_TERM);
|
68
|
+
}
|
69
|
+
xml.Append("</" + this.mirroredID + ">");
|
70
|
+
}
|
71
|
+
return xml.ToString();
|
72
|
+
}
|
73
|
+
CheckIfSystemReservedParam(key) {
|
74
|
+
if (key == "UTF8TRANS" || key === "REMOTE_HOST" || key === "REMOTE_ADDR" ||
|
75
|
+
key === "CTX" || key === "MGARG0" || key === "DATA" || key === "MGCURRENTREQUESTID" ||
|
76
|
+
key === "HTTP_MGXPARIAGLOBALUNIQUESESSIONID" || key === "MG_POST_BODY")
|
77
|
+
return true;
|
78
|
+
else
|
79
|
+
return false;
|
80
|
+
}
|
81
|
+
mirrorToXML() {
|
82
|
+
let xml = new StringBuilder();
|
83
|
+
if (this.changes.length > 0) {
|
84
|
+
xml.Append("<" + this.mirroredID + ">");
|
85
|
+
this.changes.forEach(change => {
|
86
|
+
xml.Append("<" + ConstInterface.MG_TAG_PARAM + " " +
|
87
|
+
XMLConstants.MG_ATTR_NAME + "=\"" + XmlParser.escape(change) + "\" ");
|
88
|
+
if (this.values.ContainsKey(change))
|
89
|
+
xml.Append(this.values.get_Item(change).mirrorToXML());
|
90
|
+
else
|
91
|
+
xml.Append("removed=\"Y\"");
|
92
|
+
xml.Append(">");
|
93
|
+
});
|
94
|
+
xml.Append("</" + this.mirroredID + ">");
|
95
|
+
}
|
96
|
+
this.changes.Clear();
|
97
|
+
return xml.ToString();
|
98
|
+
}
|
99
|
+
fillData(parser) {
|
100
|
+
while (this.mirrorFromXML(parser.getNextTag(), parser)) {
|
101
|
+
}
|
102
|
+
}
|
103
|
+
RestoreParams(xml) {
|
104
|
+
let parser = new XmlParser(xml);
|
105
|
+
while (this.mirrorFromXML(parser.getNextTag(), parser)) {
|
106
|
+
}
|
107
|
+
}
|
108
|
+
mirrorFromXML(foundTagName, xmlParser) {
|
109
|
+
if (foundTagName === null)
|
110
|
+
return false;
|
111
|
+
if (foundTagName === this.mirroredID) {
|
112
|
+
xmlParser.setCurrIndex2EndOfTag();
|
113
|
+
this.fillDataEntry(xmlParser);
|
114
|
+
return true;
|
115
|
+
}
|
116
|
+
else if (foundTagName === ("/" + this.mirroredID)) {
|
117
|
+
this.changes.Clear();
|
118
|
+
xmlParser.setCurrIndex2EndOfTag();
|
119
|
+
return false;
|
120
|
+
}
|
121
|
+
else {
|
122
|
+
Logger.Instance.WriteExceptionToLogWithMsg("There is no such tag in MirrorPrmMap.mirrorFromXML(): " + foundTagName);
|
123
|
+
return false;
|
124
|
+
}
|
125
|
+
}
|
126
|
+
fillDataEntry(xmlParser) {
|
127
|
+
let nextTag = xmlParser.getNextTag();
|
128
|
+
while (nextTag === ConstInterface.MG_TAG_PARAM) {
|
129
|
+
let nameStart = xmlParser.getXMLdata().indexOf(XMLConstants.MG_ATTR_NAME + "=\"", xmlParser.getCurrIndex()) +
|
130
|
+
XMLConstants.MG_ATTR_NAME.length + 2;
|
131
|
+
xmlParser.setCurrIndex(nameStart);
|
132
|
+
let nameEnd = xmlParser.getXMLdata().indexOf("\"", nameStart);
|
133
|
+
let name = xmlParser.getXMLsubstring(nameEnd).trim();
|
134
|
+
xmlParser.setCurrIndex(nameEnd);
|
135
|
+
let newVal = this.new();
|
136
|
+
switch (newVal.init(name, xmlParser)) {
|
137
|
+
case ParamParseResult.OK:
|
138
|
+
this.values.set_Item(name, newVal);
|
139
|
+
break;
|
140
|
+
case ParamParseResult.TOUPPER:
|
141
|
+
this.values.set_Item(name.toUpperCase(), newVal);
|
142
|
+
break;
|
143
|
+
case ParamParseResult.DELETE:
|
144
|
+
this.values.Remove(name);
|
145
|
+
break;
|
146
|
+
}
|
147
|
+
xmlParser.setCurrIndex2EndOfTag();
|
148
|
+
nextTag = xmlParser.getNextTag();
|
149
|
+
}
|
150
|
+
}
|
151
|
+
}
|
152
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiUHJtTWFwLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vcHJvamVjdHMvZW5naW5lL3NyYy91dGlsL1BybU1hcC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBQUUsVUFBVSxFQUFFLElBQUksRUFBRSxhQUFhLEVBQUUsTUFBTSxzQkFBc0IsQ0FBQztBQUN2RSxPQUFPLEVBQUUsTUFBTSxFQUFFLFlBQVksRUFBRSxTQUFTLEVBQUUsTUFBTSxrQkFBa0IsQ0FBQztBQUNuRSxPQUFPLEVBQUUsY0FBYyxFQUFFLE1BQU0sbUJBQW1CLENBQUM7QUFFbkQsT0FBTyxFQUFDLGdCQUFnQixFQUFDLE1BQU0sb0JBQW9CLENBQUM7QUFLcEQsTUFBTSxPQUFPLE1BQU07SUFDakIsTUFBTSxHQUF1QixJQUFJLENBQUM7SUFPeEIsUUFBUSxDQUFDLENBQVM7UUFDMUIsSUFBSSxJQUFJLENBQUMsTUFBTSxDQUFDLFdBQVcsQ0FBQyxDQUFDLENBQUM7WUFDNUIsT0FBTyxJQUFJLENBQUMsTUFBTSxDQUFDLFFBQVEsQ0FBQyxDQUFDLENBQUMsQ0FBQzs7WUFFL0IsT0FBTyxJQUFJLENBQUM7SUFD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hZ1xyXG4gICAgICB4bWxQYXJzZXIuc2V0Q3VyckluZGV4MkVuZE9mVGFnKCk7XHJcbiAgICAgIG5leHRUYWcgPSB4bWxQYXJzZXIuZ2V0TmV4dFRhZygpO1xyXG4gICAgfVxyXG4gIH1cclxufVxyXG4iXX0=
|
@@ -0,0 +1,46 @@
|
|
1
|
+
import { ReturnResultBase } from './ReturnResultBase';
|
2
|
+
import { LanguageData } from '../env/LanguageData';
|
3
|
+
export class ReturnResult extends ReturnResultBase {
|
4
|
+
errorDescription = null;
|
5
|
+
success = false;
|
6
|
+
static SuccessfulResult = new ReturnResult();
|
7
|
+
get Success() {
|
8
|
+
return this.success;
|
9
|
+
}
|
10
|
+
get ErrorDescription() {
|
11
|
+
return this.errorDescription;
|
12
|
+
}
|
13
|
+
ErrorId = null;
|
14
|
+
constructor(errorDescriptionCodeOrErrorDescriptionOrInnerResult, innerResult) {
|
15
|
+
super();
|
16
|
+
if (arguments.length === 1 && (errorDescriptionCodeOrErrorDescriptionOrInnerResult === null || errorDescriptionCodeOrErrorDescriptionOrInnerResult.constructor === String))
|
17
|
+
this.constructor_00(errorDescriptionCodeOrErrorDescriptionOrInnerResult);
|
18
|
+
else if (arguments.length === 0)
|
19
|
+
this.constructor_01();
|
20
|
+
else if (arguments.length === 2)
|
21
|
+
this.constructor_02(errorDescriptionCodeOrErrorDescriptionOrInnerResult);
|
22
|
+
else
|
23
|
+
this.constructor_03(errorDescriptionCodeOrErrorDescriptionOrInnerResult);
|
24
|
+
}
|
25
|
+
constructor_00(errorDescriptionCode) {
|
26
|
+
this.success = false;
|
27
|
+
this.ErrorId = errorDescriptionCode;
|
28
|
+
this.errorDescription = LanguageData.Instance.getConstMessage(errorDescriptionCode);
|
29
|
+
}
|
30
|
+
constructor_01() {
|
31
|
+
this.success = true;
|
32
|
+
this.ErrorId = "";
|
33
|
+
}
|
34
|
+
constructor_02(errorDescription) {
|
35
|
+
this.success = false;
|
36
|
+
this.errorDescription = errorDescription;
|
37
|
+
}
|
38
|
+
constructor_03(innerResult) {
|
39
|
+
this.success = innerResult.Success;
|
40
|
+
this.errorDescription = innerResult.ErrorDescription;
|
41
|
+
}
|
42
|
+
GetErrorId() {
|
43
|
+
return this.ErrorId;
|
44
|
+
}
|
45
|
+
}
|
46
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiUmV0dXJuUmVzdWx0LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vcHJvamVjdHMvZW5naW5lL3NyYy91dGlsL1JldHVyblJlc3VsdC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBQUMsZ0JBQWdCLEVBQUMsTUFBTSxvQkFBb0IsQ0FBQztBQUNwRCxPQUFPLEVBQUMsWUFBWSxFQUFDLE1BQU0scUJBQXFCLENBQUM7QUFLakQsTUFBTSxPQUFPLFlBQWEsU0FBUSxnQkFBZ0I7SUFDeEMsZ0JBQWdCLEdBQVcsSUFBSSxDQUFDO0lBQ2hDLE9BQU8sR0FBWSxLQUFLLENBQUM7SUFDakMsTUFBTSxDQUFDLGdCQUFnQixHQUFpQixJQUFJLFlBQVksRUFBRSxDQUFDO0lBRTNELElBQUksT0FBTztRQUNULE9BQU8sSUFBSSxDQUFDLE9BQU8sQ0FBQztJQUN0QixDQUFDO0lBRUQsSUFBSSxnQkFBZ0I7UUFDbEIsT0FBTyxJQUFJLENBQUMsZ0JBQWdCLENBQUM7SUFDL0IsQ0FBQztJQUVELE9BQU8sR0FBVyxJQUFJLENBQUM7SUFNdkIsWUFBWSxtREFBeUQsRUFBRSxXQUE4QjtRQUNuRyxLQUFLLEVBQUUsQ0FBQztRQUNSLElBQUksU0FBUyxDQUFDLE1BQU0sS0FBSyxDQUFDLElBQUksQ0FBQyxtREFBbUQsS0FBSyxJQUFJLElBQUksbURBQW1ELENBQUMsV0FBVyxLQUFLLE1BQU0sQ0FBQzt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uICBwcml2YXRlIGNvbnN0cnVjdG9yXzAzKGlubmVyUmVzdWx0OiBSZXR1cm5SZXN1bHRCYXNlKTogdm9pZCB7XHJcbiAgICB0aGlzLnN1Y2Nlc3MgPSBpbm5lclJlc3VsdC5TdWNjZXNzO1xyXG4gICAgdGhpcy5lcnJvckRlc2NyaXB0aW9uID0gaW5uZXJSZXN1bHQuRXJyb3JEZXNjcmlwdGlvbjtcclxuICB9XHJcblxyXG4gIEdldEVycm9ySWQoKTogYW55IHtcclxuICAgIHJldHVybiB0aGlzLkVycm9ySWQ7XHJcbiAgfVxyXG59XHJcbiJdfQ==
|
@@ -0,0 +1,18 @@
|
|
1
|
+
export class ReturnResultBase {
|
2
|
+
InnerResult = null;
|
3
|
+
constructor(innerResult) {
|
4
|
+
if (arguments.length === 1)
|
5
|
+
this.constructor_0(innerResult);
|
6
|
+
else
|
7
|
+
this.constructor_1();
|
8
|
+
}
|
9
|
+
constructor_0(innerResult) {
|
10
|
+
this.InnerResult = innerResult;
|
11
|
+
}
|
12
|
+
constructor_1() {
|
13
|
+
}
|
14
|
+
static ErroNeedToBeHandled() {
|
15
|
+
return false;
|
16
|
+
}
|
17
|
+
}
|
18
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiUmV0dXJuUmVzdWx0QmFzZS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uL3Byb2plY3RzL2VuZ2luZS9zcmMvdXRpbC9SZXR1cm5SZXN1bHRCYXNlLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE1BQU0sT0FBZ0IsZ0JBQWdCO0lBR3BDLFdBQVcsR0FBcUIsSUFBSSxDQUFDO0lBTXJDLFlBQVksV0FBOEI7UUFDeEMsSUFBSSxTQUFTLENBQUMsTUFBTSxLQUFLLENBQUM7WUFDeEIsSUFBSSxDQUFDLGFBQWEsQ0FBQyxXQUFXL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