@magic-xpa/engine 4.1100.0-dev4110.253 → 4.1100.0-dev4110.257
Sign up to get free protection for your applications and to get access to all the features.
- package/esm2022/src/ClientManager.mjs +1 -1
- package/esm2022/src/CommandsProcessorBase.mjs +1 -1
- package/esm2022/src/CommandsProcessorManager.mjs +1 -1
- package/esm2022/src/CommandsTable.mjs +1 -1
- package/esm2022/src/CurrentClientVersion.mjs +2 -2
- package/esm2022/src/GUIManager.mjs +1 -1
- package/esm2022/src/GuiEventsProcessor.mjs +1 -1
- package/esm2022/src/ServerConfig.mjs +1 -1
- package/esm2022/src/commands/ClientToServer/ClientOriginatedCommandSerializer.mjs +1 -1
- package/esm2022/src/commands/ClientToServer/CommandFactory.mjs +1 -1
- package/esm2022/src/commands/ClientToServer/CommandSerializationHelper.mjs +1 -1
- package/esm2022/src/commands/ClientToServer/EvaluateCommand.mjs +1 -1
- package/esm2022/src/commands/ClientToServer/ExecOperCommand.mjs +1 -1
- package/esm2022/src/commands/ClientToServer/RollbackEventCommand.mjs +1 -1
- package/esm2022/src/commands/ServerToClient/AbortCommand.mjs +1 -1
- package/esm2022/src/commands/ServerToClient/AddRangeCommand.mjs +1 -1
- package/esm2022/src/commands/ServerToClient/AddSortCommand.mjs +1 -1
- package/esm2022/src/commands/ServerToClient/ClientRefreshCommand.mjs +1 -1
- package/esm2022/src/commands/ServerToClient/ClientTargetedCommandBase.mjs +1 -1
- package/esm2022/src/commands/ServerToClient/EnhancedVerifyCommand.mjs +1 -1
- package/esm2022/src/commands/ServerToClient/OpenURLCommand.mjs +1 -1
- package/esm2022/src/commands/ServerToClient/ResultCommand.mjs +1 -1
- package/esm2022/src/commands/ServerToClient/VerifyCommand.mjs +1 -1
- package/esm2022/src/commands/ServerToClient/XMLBasedCommandBuilder.mjs +1 -1
- package/esm2022/src/data/DataView.mjs +1 -1
- package/esm2022/src/data/DvCache.mjs +1 -1
- package/esm2022/src/data/Field.mjs +1 -1
- package/esm2022/src/data/FieldsTable.mjs +1 -1
- package/esm2022/src/data/Key.mjs +1 -1
- package/esm2022/src/data/Record.mjs +2 -2
- package/esm2022/src/data/RecordsTable.mjs +1 -1
- package/esm2022/src/data/TaskTransactionManager.mjs +1 -1
- package/esm2022/src/data/XMLBasedDcValuesBuilder.mjs +1 -1
- package/esm2022/src/env/EnvVariablesTable.mjs +1 -1
- package/esm2022/src/env/Environment.mjs +1 -1
- package/esm2022/src/env/LanguageData.mjs +1 -1
- package/esm2022/src/env/MirrorString.mjs +1 -1
- package/esm2022/src/event/ActionManager.mjs +1 -1
- package/esm2022/src/event/Event.mjs +1 -1
- package/esm2022/src/event/EventHandler.mjs +1 -1
- package/esm2022/src/event/EventHandlerPosition.mjs +1 -1
- package/esm2022/src/event/EventsManager.mjs +1 -1
- package/esm2022/src/event/RunTimeEvent.mjs +1 -1
- package/esm2022/src/event/UserEventsTable.mjs +1 -1
- package/esm2022/src/exp/ExpTable.mjs +1 -1
- package/esm2022/src/exp/Expression.mjs +1 -1
- package/esm2022/src/exp/ExpressionEvaluator.mjs +1 -1
- package/esm2022/src/exp/ExpressionLocalJpn.mjs +1 -1
- package/esm2022/src/exp/GlobalParamsTable.mjs +1 -1
- package/esm2022/src/exp/YesNoExp.mjs +1 -1
- package/esm2022/src/gui/FormsTable.mjs +1 -1
- package/esm2022/src/gui/MgControl.mjs +1 -1
- package/esm2022/src/gui/MgForm.mjs +1 -1
- package/esm2022/src/http/HttpManager.mjs +1 -1
- package/esm2022/src/http/client/HttpClientAsync.mjs +1 -1
- package/esm2022/src/http/client/HttpClientBase.mjs +1 -1
- package/esm2022/src/http/client/HttpClientEvents.mjs +1 -1
- package/esm2022/src/http/client/HttpClientSync.mjs +1 -1
- package/esm2022/src/http/client/HttpUtility.mjs +1 -1
- package/esm2022/src/remote/AddUserLocateRemoteDataViewCommand.mjs +1 -1
- package/esm2022/src/remote/AddUserRangeRemoteDataViewCommand.mjs +1 -1
- package/esm2022/src/remote/AddUserSortRemoteDataViewCommand.mjs +1 -1
- package/esm2022/src/remote/RemoteCommandsProcessor.mjs +1 -1
- package/esm2022/src/remote/RemoteControlItemsRefreshCommand.mjs +1 -1
- package/esm2022/src/remote/RemoteDataViewCommandBase.mjs +1 -1
- package/esm2022/src/remote/RemoteDataViewCommandFactory.mjs +1 -1
- package/esm2022/src/remote/ResetUserLocateRemoteDataviewCommand.mjs +1 -1
- package/esm2022/src/remote/ResetUserSortRemoteDataviewCommand.mjs +1 -1
- package/esm2022/src/remote/ServerError.mjs +1 -1
- package/esm2022/src/remote/SetTransactionStateRemoteDataViewCommand.mjs +1 -1
- package/esm2022/src/rt/Argument.mjs +1 -1
- package/esm2022/src/rt/ArgumentsList.mjs +1 -1
- package/esm2022/src/rt/Boundary.mjs +1 -1
- package/esm2022/src/rt/CompMainPrgTable.mjs +1 -1
- package/esm2022/src/rt/DataviewHeaderBase.mjs +1 -1
- package/esm2022/src/rt/DataviewHeaders.mjs +1 -1
- package/esm2022/src/rt/DataviewHeadersSaxHandler.mjs +1 -1
- package/esm2022/src/rt/ExecutionStack.mjs +1 -1
- package/esm2022/src/rt/HandlersTable.mjs +1 -1
- package/esm2022/src/rt/LastFocusedManager.mjs +1 -1
- package/esm2022/src/rt/Operation.mjs +1 -1
- package/esm2022/src/rt/OperationTable.mjs +1 -1
- package/esm2022/src/rt/Recompute.mjs +1 -1
- package/esm2022/src/rt/RecomputeTable.mjs +1 -1
- package/esm2022/src/rt/RemoteDataviewHeader.mjs +1 -1
- package/esm2022/src/rt/TableCache.mjs +1 -1
- package/esm2022/src/rt/TableCacheManager.mjs +1 -1
- package/esm2022/src/rt/Transaction.mjs +1 -1
- package/esm2022/src/security/UserDetails.mjs +1 -1
- package/esm2022/src/tasks/MGData.mjs +1 -1
- package/esm2022/src/tasks/MGDataCollection.mjs +1 -1
- package/esm2022/src/tasks/RCTimer.mjs +1 -1
- package/esm2022/src/tasks/RemoteTaskService.mjs +1 -1
- package/esm2022/src/tasks/Task.mjs +1 -1
- package/esm2022/src/tasks/TaskBase.mjs +1 -1
- package/esm2022/src/tasks/TaskServiceBase.mjs +1 -1
- package/esm2022/src/tasks/TasksTable.mjs +1 -1
- package/esm2022/src/tasks/sort/SortCollection.mjs +1 -1
- package/esm2022/src/util/ConstUtils.mjs +1 -1
- package/esm2022/src/util/FlowMonitorQueue.mjs +1 -1
- package/esm2022/src/util/HeapSort.mjs +1 -1
- package/esm2022/src/util/MgPriorityBlockingQueue.mjs +1 -1
- package/esm2022/src/util/MgPriorityQueue.mjs +1 -1
- package/esm2022/src/util/PrmMap.mjs +1 -1
- package/esm2022/src/util/Scrambler.mjs +1 -1
- package/esm2022/src/util/UniqueIDUtils.mjs +1 -1
- package/esm2022/src/util/cookie.service.mjs +1 -1
- package/fesm2022/magic-xpa-engine.mjs +2 -2
- package/fesm2022/magic-xpa-engine.mjs.map +1 -1
- package/package.json +4 -4
@@ -880,4 +880,4 @@ class ErrorMessageXml {
|
|
880
880
|
return expired;
|
881
881
|
}
|
882
882
|
}
|
883
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiUmVtb3RlQ29tbWFuZHNQcm9jZXNzb3IuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi9wcm9qZWN0cy9lbmdpbmUvc3JjL3JlbW90ZS9SZW1vdGVDb21tYW5kc1Byb2Nlc3Nvci50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBQ0wsTUFBTSxFQUNOLFVBQVUsRUFDVixNQUFNLEVBQ04sZ0JBQWdCLEVBQ2hCLElBQUksRUFDSixZQUFZLEVBQ1osYUFBYSxFQUNiLFdBQVcsRUFDWCxPQUFPLEVBQ1AsWUFBWSxFQUNiLE1BQU0sa0JBQWtCLENBQUM7QUFDMUIsT0FBTyxFQUNMLEtBQUssRUFDTCxRQUFRLEVBQ1IsU0FBUyxFQUNULElBQUksRUFDSixPQUFPLEVBQ1AsUUFBUSxFQUNSLGFBQWEsRU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hbHNlO1xyXG4gIHByaXZhdGUgc3RhdGljIGxhc3RFeGNlcHRpb25NZXNzYWdlID0gbnVsbDtcclxuICBwcml2YXRlIHN0YXRpYyBJbml0aWFsVXJsOiBzdHJpbmcgPSBudWxsO1xyXG5cclxuXHJcbiAgLy8gKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKipcclxuICAvLyAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKlxyXG4gIC8vICoqKioqKioqIFdoZW4gY2hhbmdpbmcgV0VCX0NPTU1VTklDQVRJT05fUFJPVE9DT0xfVkVSU0lPTiwgcGxlYXNlIGNoYW5nZSBvbiBtb2JpbGUgcGxhdGZvcm1zIGFzIHdlbGw6XHJcbiAgLy8gKioqKioqKiogVzEwTTogUmVtb3RlQ29tbWFuZHNQcm9jZXNzb3IuY3NcclxuICBwcml2YXRlIHN0YXRpYyByZWFkb25seSBXRUJfQ09NTVVOSUNBVElPTl9QUk9UT0NPTF9WRVJTSU9OOiBzdHJpbmcgPSBcIjE0MDAyXCI7XHJcbiAgLy8gKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKipcclxuICAvLyAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKlxyXG5cclxuICAvLyBUT0RPOiBDaGVjayBpZiB3ZSBuZWVkIF9sb2dBY2N1bXVsYXRvci5cclxuICAvLyBwcml2YXRlIF9sb2dBY2N1bXVsYXRvcjogQ2xpZW50TG9nQWNjdW11bGF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JvY2Vzc29yQmFzZSB7XHJcbiAgc3RhdGljIHJlYWRvbmx5IFJDX05PX0NPTlRFWFRfSUQ6IHN0cmluZyA9ICctMSc7XHJcbiAgcHJpdmF0ZSBzdGF0aWMgX2luc3RhbmNlOiBSZW1vdGVDb21tYW5kc1Byb2Nlc3NvciA9IG51bGw7XHJcbiAgcHVibGljIHN0YXRpYyBJc1Nlc3Npb25SZUluaXRpYWxpemluZyA9IGZhbHNlO1xyXG4gIHByaXZhdGUgc3RhdGljIGxhc3RFeGNlcHRpb25NZXNzYWdlID0gbnVsbDtcclxuICBwcml2YXRlIHN0YXRpYyBJbml0aWFsVXJsOiBzdHJpbmcgPSBudWxsO1xyXG5cclxuXHJcbiAgLy8gKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKipcclxuICAvLyAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKlxyXG4gIC8vICoqKioqKioqIFdoZW4gY2hhbmdpbmcgV0VCX0NPTU1VTklDQVRJT05fUFJPVE9DT0xfVkVSU0lPTiwgcGxlYXNlIGNoYW5nZSBvbiBtb2JpbGUgcGxhdGZvcm1zIGFzIHdlbGw6XHJcbiAgLy8gKioqKioqKiogVzEwTTogUmVtb3RlQ29tbWFuZHNQcm9jZXNzb3IuY3NcclxuICBwcml2YXRlIHN0YXRpYyByZWFkb25seSBXRUJfQ09NTVVOSUNBVElPTl9QUk9UT0NPTF9WRVJTSU9OOiBzdHJpbmcgPSBcIjE0MDAyXCI7XHJcbiAgLy8gKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKipcclxuICAvLyAqKioq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gICAgICAgICAgICAgICAgbGV0IHJldHZhbCA9IGF3YWl0IEdVSU1hbmFnZXIuSW5zdGFuY2UuTWVzc2FnZUJveChcIkVycm9yXCIsIFwiVW5rbm93biBlcnJvciBvY2N1cnJlZCBhdCBzZXJ2ZXItc2lkZS5cIiArXHJcbiAgICAgICAgICAgICAgICAgICAgXCIgV291bGQgeW91IGxpa2UgdG8gcmVpbml0aWFsaXplIHRoZSBzZXNzaW9uP1wiLCBTdHlsZXMuTVNHQk9YX0JVVFRPTl9ZRVNfTk8pO1xyXG4gICAgICAgICAgICAgICAgICByZXF1ZXN0U3RhdHVzLnZhbHVlID0gKHJldHZhbCA9PSBTdHlsZXMuTVNHQk9YX1JFU1VMVF9ZRVMpID8gUmVxdWVzdFN0YXR1cy5SZXRyeSA6IFJlcXVlc3RTdGF0dXMuQWJvcnQ7XHJcbiAgICAgICAgICAgICAgICAgIGJyZWFrO1xyXG4gICAgICAgICAgICAgICAgY2FzZSAnTic6XHJcbiAgICAgICAgICAgICAgICBkZWZhdWx0OlxyXG4gICAgICAgICAgICAgICAgICByZXF1ZXN0U3RhdHVzLnZhbHVlID0gUmVxdWVzdFN0YXR1cy5BYm9ydDtcclxuICAgICAgICAgICAgICAgICAgYnJlYWs7XHJcbiAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICB9XHJcbiAgICAgICAgICAgIGlmIChyZXF1ZXN0U3RhdHVzLnZhbHVlID09IFJlcXVlc3RTdGF0dXMuQWJvcnQpIHtcclxuICAgICAgICAgICAgICBFbnZpcm9ubWVudC5JbnN0YW5jZS5zZXRXZWJDbGllbnRSZWluaXRTZXNzaW9uKCdOJyk7XHJcbiAgICAgICAgICAgICAgdGhyb3cgIGV4O1xyXG4gICAgICAgICAgICB9IGVsc2Uge1xyXG4gICAgICAgICAgICAgIGxldCBlcnJGb3JDb25zb2xlID0gU3RyVXRpbC5nZXRDb25zb2xlRXJvclN0cmluZyhleC5HZXRNZXNzYWdlKCkpO1xyXG4gICAgICAgIC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