@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
@@ -0,0 +1,340 @@
|
|
1
|
+
import { CommandsProcessorBase_SendingInstruction } from "../CommandsProcessorBase";
|
2
|
+
import { MirrorPrmMap } from "../util/PrmMap";
|
3
|
+
import { NNumber, NString, StringBuilder } from "@magic-xpa/mscorelib";
|
4
|
+
import { DisplayConvertor } from "@magic-xpa/gui";
|
5
|
+
import { ConstInterface } from "../ConstInterface";
|
6
|
+
import { CommandFactory } from "../commands/ClientToServer/CommandFactory";
|
7
|
+
import { RemoteCommandsProcessor } from "../remote/RemoteCommandsProcessor";
|
8
|
+
import { Environment } from "./Environment";
|
9
|
+
import { LastFocusedManager } from "../rt/LastFocusedManager";
|
10
|
+
import { AccessHelper } from "../AccessHelper";
|
11
|
+
import { MirrorString } from "./MirrorString";
|
12
|
+
export class EnvParamsTable extends MirrorPrmMap {
|
13
|
+
static Instance = new EnvParamsTable();
|
14
|
+
constructor() {
|
15
|
+
super(MirrorString);
|
16
|
+
this.mirroredID = ConstInterface.MG_TAG_ENV_PARAM;
|
17
|
+
}
|
18
|
+
get(s) {
|
19
|
+
let valName = null;
|
20
|
+
let ret = null;
|
21
|
+
if (s.charAt(0) !== '[') {
|
22
|
+
valName = s;
|
23
|
+
s = NString.Insert(s, 0, ConstInterface.INI_SECTION_MAGIC_ENV_BRACKETS);
|
24
|
+
}
|
25
|
+
else if (s.startsWith(ConstInterface.INI_SECTION_MAGIC_ENV_BRACKETS))
|
26
|
+
valName = s.substr(ConstInterface.INI_SECTION_MAGIC_ENV_BRACKETS.length);
|
27
|
+
if (!s.startsWith(ConstInterface.INI_SECTION_LOGICAL_NAMES_BRACKETS))
|
28
|
+
s = s.toUpperCase();
|
29
|
+
if (valName !== null)
|
30
|
+
ret = this.getFromEnvironment(valName);
|
31
|
+
if (ret !== null)
|
32
|
+
return ret;
|
33
|
+
try {
|
34
|
+
let resultObject = super.getvalue(s);
|
35
|
+
if (resultObject !== null) {
|
36
|
+
ret = resultObject.ToString();
|
37
|
+
if (valName !== null) {
|
38
|
+
ret = this.getProcessedValue(valName, ret);
|
39
|
+
}
|
40
|
+
}
|
41
|
+
}
|
42
|
+
catch (ex_BE) {
|
43
|
+
}
|
44
|
+
return ret;
|
45
|
+
}
|
46
|
+
getln(section, number) {
|
47
|
+
section = section.toUpperCase().trim();
|
48
|
+
let sectionFound = false;
|
49
|
+
let keys = this.values.Keys;
|
50
|
+
for (let i = 0; i < keys.length; i++) {
|
51
|
+
let key = keys[i];
|
52
|
+
if (key.startsWith(section)) {
|
53
|
+
sectionFound = true;
|
54
|
+
if (number > 1)
|
55
|
+
number--;
|
56
|
+
else
|
57
|
+
return key.substr(section.length) + "=" + this.values.get_Item(key);
|
58
|
+
}
|
59
|
+
else if (sectionFound)
|
60
|
+
break;
|
61
|
+
}
|
62
|
+
return null;
|
63
|
+
}
|
64
|
+
getFromEnvironment(valName) {
|
65
|
+
switch (valName.toLowerCase()) {
|
66
|
+
case ConstInterface.MG_ATTR_DECIMAL_SEPARATOR:
|
67
|
+
return Environment.Instance.GetDecimal();
|
68
|
+
case ConstInterface.MG_ATTR_DATE:
|
69
|
+
return DisplayConvertor.Instance.getDateChar().toString();
|
70
|
+
case ConstInterface.MG_ATTR_TIME:
|
71
|
+
return Environment.Instance.GetTime();
|
72
|
+
case ConstInterface.MG_ATTR_OWNER:
|
73
|
+
return Environment.Instance.getOwner();
|
74
|
+
case ConstInterface.MG_ATTR_DATEMODE:
|
75
|
+
return Environment.Instance.GetDateMode(LastFocusedManager.Instance.getCurrTask().getCompIdx());
|
76
|
+
case ConstInterface.MG_ATTR_CENTURY:
|
77
|
+
return Environment.Instance.GetCentury(LastFocusedManager.Instance.getCurrTask().getCompIdx()).toString();
|
78
|
+
case ConstInterface.MG_ATTR_IDLETIME:
|
79
|
+
return Environment.Instance.getIdleTime(LastFocusedManager.Instance.getCurrTask().getCompIdx()).toString();
|
80
|
+
case ConstInterface.MG_ATTR_UPD_IN_QUERY:
|
81
|
+
return Environment.Instance.allowUpdateInQueryMode(LastFocusedManager.Instance.getCurrTask().getCompIdx()).toString();
|
82
|
+
case ConstInterface.MG_ATTR_CRE_IN_MODIFY:
|
83
|
+
return Environment.Instance.allowCreateInModifyMode(LastFocusedManager.Instance.getCurrTask().getCompIdx()).toString();
|
84
|
+
case ConstInterface.MG_ATTR_CONTEXT_INACTIVITY_TIMEOUT:
|
85
|
+
return Environment.Instance.getContextInactivityTimeout().toString();
|
86
|
+
case ConstInterface.MG_ATTR_CONTEXT_UNLOAD_TIMEOUT:
|
87
|
+
return Environment.Instance.getContextUnloadTimeout().toString();
|
88
|
+
case ConstInterface.MG_ATTR_TERMINAL:
|
89
|
+
return Environment.Instance.getTerminal().toString();
|
90
|
+
case ConstInterface.MG_ATTR_WEBCLIENT_REINIT_SESSION:
|
91
|
+
return Environment.Instance.getWebClientReinitSession();
|
92
|
+
}
|
93
|
+
return null;
|
94
|
+
}
|
95
|
+
getProcessedValue(valName, val) {
|
96
|
+
switch (valName.toLowerCase()) {
|
97
|
+
case ConstInterface.MG_ATTR_HTTP_TIMEOUT:
|
98
|
+
case ConstInterface.MG_ATTR_RTF_BUFFER_SIZE:
|
99
|
+
case ConstInterface.MG_ATTR_RANGE_POP_TIME:
|
100
|
+
case ConstInterface.MG_ATTR_TEMP_POP_TIME:
|
101
|
+
case ConstInterface.MG_ATTR_BATCH_PAINT_TIME:
|
102
|
+
return NNumber.Parse(val).toString();
|
103
|
+
case ConstInterface.MG_ATTR_USE_SIGNED_BROWSER_CLIENT:
|
104
|
+
case ConstInterface.MG_ATTR_CLOSE_PRINTED_TABLES_IN_SUBTASKS:
|
105
|
+
case ConstInterface.MG_ATTR_GENERIC_TEXT_PRINTING:
|
106
|
+
case ConstInterface.MG_ATTR_HIGH_RESOLUTION_PRINT:
|
107
|
+
case ConstInterface.MG_ATTR_MERGE_TRIM:
|
108
|
+
case ConstInterface.MG_ATTR_ORIGINAL_IMAGE_LOAD:
|
109
|
+
case ConstInterface.MG_ATTR_PRINT_DATA_TRIM:
|
110
|
+
case ConstInterface.MG_ATTR_PSCRIPT_PRINT_NT:
|
111
|
+
case ConstInterface.MG_ATTR_SPECIAL_CONV_ADD_SLASH:
|
112
|
+
case ConstInterface.MG_ATTR_SPECIAL_FULL_EXPAND_PRINT:
|
113
|
+
case ConstInterface.MG_ATTR_SPECIAL_FULL_TEXT:
|
114
|
+
case ConstInterface.MG_ATTR_SPECIAL_LAST_LINE_PRINT:
|
115
|
+
case ConstInterface.MG_ATTR_SPECIAL_PRINTER_OEM:
|
116
|
+
case ConstInterface.MG_ATTR_EMBED_FONTS:
|
117
|
+
case ConstInterface.MG_ATTR_CENTER_SCREEN_IN_ONLINE:
|
118
|
+
case ConstInterface.MG_ATTR_REPOSITION_AFTER_MODIFY:
|
119
|
+
case ConstInterface.MG_ATTR_ISAM_TRANSACTION:
|
120
|
+
return (val[0] === 'Y' || val[0] === '1') ? "Y" : "N";
|
121
|
+
case ConstInterface.MG_ATTR_TIME_SEPARATOR:
|
122
|
+
case ConstInterface.MG_ATTR_IOTIMING:
|
123
|
+
case ConstInterface.MG_ATTR_THOUSAND_SEPARATOR:
|
124
|
+
return val[0].toString();
|
125
|
+
default:
|
126
|
+
return val;
|
127
|
+
}
|
128
|
+
}
|
129
|
+
async set(s, updateIni) {
|
130
|
+
let allOK = true;
|
131
|
+
let sendToServer = false;
|
132
|
+
let name, val;
|
133
|
+
let i;
|
134
|
+
let serverVal = s;
|
135
|
+
let offsets = new Array(s.length + 1);
|
136
|
+
let offsetsChars = new Array(s.length + 1);
|
137
|
+
offsets[0] = 0;
|
138
|
+
offsetsChars[0] = 's';
|
139
|
+
let nextOffset = 1;
|
140
|
+
for (i = 1; i < s.length; i++) {
|
141
|
+
if ((s[i] === '=' || s[i] === ',') && s[i - 1] !== '\\') {
|
142
|
+
offsets[nextOffset] = i + 1;
|
143
|
+
offsetsChars[nextOffset] = s[i];
|
144
|
+
nextOffset++;
|
145
|
+
}
|
146
|
+
if (s[i] === '*') {
|
147
|
+
s = NString.Remove(s, i, 1);
|
148
|
+
break;
|
149
|
+
}
|
150
|
+
if (s[i] === '\\') {
|
151
|
+
s = NString.Remove(s, i, 1);
|
152
|
+
}
|
153
|
+
}
|
154
|
+
offsets[nextOffset] = s.length + 1;
|
155
|
+
offsetsChars[nextOffset] = '\0';
|
156
|
+
nextOffset++;
|
157
|
+
for (i = 0; i < nextOffset - 1; i++) {
|
158
|
+
name = s.substr(offsets[i], offsets[i + 1] - offsets[i] - 1);
|
159
|
+
if (s[offsets[i + 1] - 1] === '=') {
|
160
|
+
i++;
|
161
|
+
let valInit = i;
|
162
|
+
let allowedSeparators = this.getAllowedSeparators(name);
|
163
|
+
for (let sep = 0; sep < allowedSeparators; sep++) {
|
164
|
+
if (offsetsChars[i + 1] === ',')
|
165
|
+
i++;
|
166
|
+
else
|
167
|
+
break;
|
168
|
+
}
|
169
|
+
val = s.substr(offsets[valInit], offsets[i + 1] - offsets[valInit] - 1);
|
170
|
+
}
|
171
|
+
else
|
172
|
+
val = null;
|
173
|
+
if (this.isReservedLogicalName(name)) {
|
174
|
+
allOK = false;
|
175
|
+
continue;
|
176
|
+
}
|
177
|
+
if (name[0] !== '[')
|
178
|
+
name = NString.Insert(name, 0, ConstInterface.INI_SECTION_MAGIC_ENV_BRACKETS);
|
179
|
+
if (!name.startsWith(ConstInterface.INI_SECTION_LOGICAL_NAMES_BRACKETS))
|
180
|
+
name = name.toUpperCase();
|
181
|
+
name = name.trim();
|
182
|
+
val = val.trim();
|
183
|
+
sendToServer = true;
|
184
|
+
if (!NString.IsNullOrEmpty(val) ||
|
185
|
+
name.startsWith(ConstInterface.INI_SECTION_LOGICAL_NAMES_BRACKETS)) {
|
186
|
+
super.setValue(name, new MirrorString(val), !updateIni);
|
187
|
+
this.checkSetInEnvironment(name, val);
|
188
|
+
}
|
189
|
+
else
|
190
|
+
super.remove(name);
|
191
|
+
}
|
192
|
+
if (updateIni && sendToServer) {
|
193
|
+
let cmd = CommandFactory.CreateIniputForceWriteCommand(serverVal);
|
194
|
+
AccessHelper.mgDataTable.getMGData(0).CmdsToServer.Add(cmd);
|
195
|
+
await RemoteCommandsProcessor.GetInstance().Execute(CommandsProcessorBase_SendingInstruction.ONLY_COMMANDS);
|
196
|
+
}
|
197
|
+
return allOK;
|
198
|
+
}
|
199
|
+
isReservedLogicalName(name) {
|
200
|
+
if (!name.startsWith("[")) {
|
201
|
+
name = NString.Insert(name, 0, ConstInterface.INI_SECTION_LOGICAL_NAMES_BRACKETS);
|
202
|
+
if (this.values.ContainsKey(name) && this.values.get_Item(name).isReserved())
|
203
|
+
return true;
|
204
|
+
}
|
205
|
+
return false;
|
206
|
+
}
|
207
|
+
getAllowedSeparators(name) {
|
208
|
+
if (name.charAt(0) !== '[')
|
209
|
+
return 0;
|
210
|
+
let section = name.substr(1, name.indexOf(']') - 1);
|
211
|
+
let param = name.substr(name.indexOf(']') + 1);
|
212
|
+
switch (section.toUpperCase()) {
|
213
|
+
case ConstInterface.INI_SECTION_MAGIC_ENV:
|
214
|
+
if (param.toUpperCase() === ConstInterface.MG_ATTR_LANGUAGE.toUpperCase())
|
215
|
+
return 999;
|
216
|
+
else
|
217
|
+
return 0;
|
218
|
+
case ConstInterface.INI_SECTION_MAGIC_SYSTEMS:
|
219
|
+
return 8;
|
220
|
+
case ConstInterface.INI_SECTION_MAGIC_DBMS:
|
221
|
+
return 13;
|
222
|
+
case ConstInterface.INI_SECTION_MAGIC_SERVERS:
|
223
|
+
return 6;
|
224
|
+
case ConstInterface.INI_SECTION_MAGIC_COMMS:
|
225
|
+
return 2;
|
226
|
+
case ConstInterface.INI_SECTION_MAGIC_PRINTERS:
|
227
|
+
return 3;
|
228
|
+
case ConstInterface.INI_SECTION_MAGIC_SYSTEM_MENU:
|
229
|
+
return 11;
|
230
|
+
case ConstInterface.INI_SECTION_MAGIC_DATABASES:
|
231
|
+
return 21;
|
232
|
+
case ConstInterface.INI_SECTION_MAGIC_LANGUAGE:
|
233
|
+
return 1;
|
234
|
+
case ConstInterface.INI_SECTION_MAGIC_SERVICES:
|
235
|
+
return 8;
|
236
|
+
case ConstInterface.INI_SECTION_TOOLS_MENU:
|
237
|
+
return 7;
|
238
|
+
default:
|
239
|
+
return 0;
|
240
|
+
}
|
241
|
+
}
|
242
|
+
checkSetInEnvironment(name, val) {
|
243
|
+
if (name.startsWith(ConstInterface.INI_SECTION_MAGIC_ENV_BRACKETS)) {
|
244
|
+
name = name.substr(ConstInterface.INI_SECTION_MAGIC_ENV_BRACKETS.length);
|
245
|
+
switch (name.toLowerCase()) {
|
246
|
+
case ConstInterface.MG_ATTR_DECIMAL_SEPARATOR:
|
247
|
+
Environment.Instance.setDecimalSeparator(val[0]);
|
248
|
+
break;
|
249
|
+
case ConstInterface.MG_ATTR_DATE:
|
250
|
+
DisplayConvertor.Instance.setDateChar(val[0].charCodeAt(0));
|
251
|
+
break;
|
252
|
+
case ConstInterface.MG_ATTR_TIME:
|
253
|
+
Environment.Instance.setTimeSeparator(val[0]);
|
254
|
+
break;
|
255
|
+
case ConstInterface.MG_ATTR_OWNER:
|
256
|
+
Environment.Instance.setOwner(val);
|
257
|
+
break;
|
258
|
+
case ConstInterface.MG_ATTR_DATEMODE:
|
259
|
+
Environment.Instance.setDateMode(LastFocusedManager.Instance.getCurrTask().getCompIdx(), val[0]);
|
260
|
+
break;
|
261
|
+
case ConstInterface.MG_ATTR_CENTURY:
|
262
|
+
Environment.Instance.setCentury(LastFocusedManager.Instance.getCurrTask().getCompIdx(), NNumber.Parse(val));
|
263
|
+
break;
|
264
|
+
case ConstInterface.MG_ATTR_IDLETIME:
|
265
|
+
Environment.Instance.setIdleTime(LastFocusedManager.Instance.getCurrTask().getCompIdx(), NNumber.Parse(val));
|
266
|
+
break;
|
267
|
+
case ConstInterface.MG_ATTR_UPD_IN_QUERY_LOWER:
|
268
|
+
Environment.Instance.setAllowUpdateInQueryMode(LastFocusedManager.Instance.getCurrTask().getCompIdx(), val[0] === '1');
|
269
|
+
break;
|
270
|
+
case ConstInterface.MG_ATTR_CRE_IN_MODIFY_LOWER:
|
271
|
+
Environment.Instance.setAllowCreateInModifyMode(LastFocusedManager.Instance.getCurrTask().getCompIdx(), val[0] === '1');
|
272
|
+
break;
|
273
|
+
case ConstInterface.MG_ATTR_CONTEXT_INACTIVITY_TIMEOUT_LOWER:
|
274
|
+
Environment.Instance.setContextInactivityTimeout(NNumber.Parse(val));
|
275
|
+
break;
|
276
|
+
case ConstInterface.MG_ATTR_CONTEXT_INACTIVITY_WARNING_TIME_LOWER:
|
277
|
+
Environment.Instance.setContextInactivityWarningTime(NNumber.Parse(val));
|
278
|
+
break;
|
279
|
+
case ConstInterface.MG_ATTR_CONTEXT_UNLOAD_TIMEOUT_LOWER:
|
280
|
+
Environment.Instance.setContextUnloadTimeout(NNumber.Parse(val));
|
281
|
+
break;
|
282
|
+
case ConstInterface.MG_ATTR_TERMINAL:
|
283
|
+
Environment.Instance.setTerminal(NNumber.Parse(val));
|
284
|
+
break;
|
285
|
+
}
|
286
|
+
}
|
287
|
+
}
|
288
|
+
translate(logicalName) {
|
289
|
+
let stringBuilder = new StringBuilder(logicalName);
|
290
|
+
this.log(stringBuilder);
|
291
|
+
return stringBuilder.ToString();
|
292
|
+
}
|
293
|
+
log(stringBldr) {
|
294
|
+
let finished;
|
295
|
+
do {
|
296
|
+
let offset = 0;
|
297
|
+
finished = true;
|
298
|
+
while (offset < stringBldr.Length && stringBldr.get_Item(offset) > '\0') {
|
299
|
+
if (stringBldr.get_Item(offset) === '%') {
|
300
|
+
let oldLength = stringBldr.Length;
|
301
|
+
offset = this.log_trans(stringBldr, offset);
|
302
|
+
if (oldLength !== stringBldr.Length)
|
303
|
+
finished = false;
|
304
|
+
}
|
305
|
+
else
|
306
|
+
offset = offset + 1;
|
307
|
+
}
|
308
|
+
} while (!finished);
|
309
|
+
}
|
310
|
+
log_trans(stringBldr, offset) {
|
311
|
+
let ignoreTrans = false;
|
312
|
+
let startSym = offset;
|
313
|
+
let endSym = offset + 1;
|
314
|
+
while (endSym < stringBldr.Length) {
|
315
|
+
if (stringBldr.get_Item(endSym) === '%')
|
316
|
+
break;
|
317
|
+
endSym++;
|
318
|
+
}
|
319
|
+
if (endSym >= stringBldr.Length) {
|
320
|
+
offset = endSym;
|
321
|
+
ignoreTrans = true;
|
322
|
+
}
|
323
|
+
else if (stringBldr.get_Item(endSym) !== '%')
|
324
|
+
offset++;
|
325
|
+
if (!ignoreTrans) {
|
326
|
+
let sym = ConstInterface.INI_SECTION_LOGICAL_NAMES_BRACKETS +
|
327
|
+
stringBldr.ToString(startSym + 1, endSym - startSym - 1);
|
328
|
+
let trans = this.get(sym);
|
329
|
+
if (trans === null) {
|
330
|
+
stringBldr.Replace(stringBldr.ToString(offset, endSym + 1 - offset), "", offset, endSym + 1 - offset);
|
331
|
+
offset += 1;
|
332
|
+
}
|
333
|
+
else {
|
334
|
+
stringBldr.Replace(stringBldr.ToString(startSym, endSym + 1 - startSym), trans, startSym, endSym + 1 - startSym);
|
335
|
+
}
|
336
|
+
}
|
337
|
+
return offset;
|
338
|
+
}
|
339
|
+
}
|
340
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiRW52VmFyaWFibGVzVGFibGUuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi9wcm9qZWN0cy9lbmdpbmUvc3JjL2Vudi9FbnZWYXJpYWJsZXNUYWJsZS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBQUMsd0NBQXdDLEVBQUMsTUFBTSwwQkFBMEIsQ0FBQztBQUNsRixPQUFPLEVBQUMsWUFBWSxFQUFDLE1BQU0sZ0JBQWdCLENBQUM7QUFDNUMsT0FBTyxFQUFDLE9BQU8sRUFBRSxPQUFPLEVBQUUsYUFBYSxFQUFDLE1BQU0sc0JBQXNCLENBQUM7QUFFckUsT0FBTyxFQUFDLGdCQUFnQixFQUFDLE1BQU0sZ0JBQWdCLENBQUM7QUFDaEQsT0FBTyxFQUFDLGNBQWMsRUFBQyxNQUFNLG1CQUFtQixDQUFDO0FBRWpELE9BQU8sRUFBQyxjQUFjLEVBQUMsTUFBTSwyQ0FBMkMsQ0FBQztBQUN6RSxPQUFPLEVBQUMsdUJBQXVCLEVBQUMsTUFBTSxtQ0FBbUMsQ0FBQztBQUMxRSxPQUFPLEVBQUMsV0FBVyxFQUFDLE1BQU0sZUFBZSxDQUFDO0FBQzFDLE9BQU8sRUFBQyxrQkFBa0IsRUFBQyxNQUFNLDBCQUEwQixDQUFDO0FBQzVELE9BQU8sRUFBQyxZQUFZLEVBQUMsTUFBTSxpQkFBaUIsQ0FBQztBQUM3QyxPQUFPLEVBQUMsWUFBWSxFQUFDLE1BQU0sZ0JBQWdCLENBQUM7QUFLN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