@magic-xpa/engine 4.1100.0-dev4110.2 → 4.1100.0-dev4110.202
Sign up to get free protection for your applications and to get access to all the features.
- package/{esm2020 → esm2022}/index.mjs +188 -188
- package/{esm2020 → esm2022}/magic-xpa-engine.mjs +1 -1
- package/esm2022/src/AccessHelper.mjs +15 -0
- package/esm2022/src/ClientManager.mjs +409 -0
- package/esm2022/src/CommandsProcessorBase.mjs +56 -0
- package/esm2022/src/CommandsProcessorManager.mjs +26 -0
- package/esm2022/src/CommandsTable.mjs +162 -0
- package/esm2022/src/ConstInterface.mjs +517 -0
- package/{esm2020 → esm2022}/src/CurrentClientVersion.mjs +2 -2
- package/esm2022/src/FlowMonitorInterface.mjs +16 -0
- package/esm2022/src/GUIManager.mjs +62 -0
- package/esm2022/src/GlobalCommandsManager.mjs +34 -0
- package/esm2022/src/GuiEventsProcessor.mjs +157 -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/{esm2020 → esm2022}/src/bridge/MagicBridge.mjs +40 -40
- 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/{esm2020 → esm2022}/src/commands/ClientToServer/BrowserEscEventCommand.mjs +23 -23
- package/{esm2020 → esm2022}/src/commands/ClientToServer/ClientOriginatedCommand.mjs +14 -14
- package/esm2022/src/commands/ClientToServer/ClientOriginatedCommandSerializer.mjs +60 -0
- package/{esm2020 → esm2022}/src/commands/ClientToServer/ColumnSortEventCommand.mjs +26 -26
- package/esm2022/src/commands/ClientToServer/CommandFactory.mjs +260 -0
- package/esm2022/src/commands/ClientToServer/CommandSerializationHelper.mjs +67 -0
- package/{esm2020 → esm2022}/src/commands/ClientToServer/ComputeEventCommand.mjs +23 -23
- package/{esm2020 → esm2022}/src/commands/ClientToServer/ContextTerminationEventCommand.mjs +20 -20
- package/{esm2020 → esm2022}/src/commands/ClientToServer/ContextTimeoutResetCommand.mjs +19 -19
- 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 +37 -0
- package/esm2022/src/commands/ClientToServer/EventCommand.mjs +40 -0
- package/esm2022/src/commands/ClientToServer/ExecOperCommand.mjs +67 -0
- package/esm2022/src/commands/ClientToServer/FetchDataControlValuesEventCommand.mjs +22 -0
- package/{esm2020 → esm2022}/src/commands/ClientToServer/GlobalParamsQueryCommand.mjs +10 -10
- package/{esm2020 → esm2022}/src/commands/ClientToServer/ICommandTaskTag.mjs +1 -1
- package/{esm2020 → esm2022}/src/commands/ClientToServer/IndexChangeEventCommand.mjs +21 -21
- package/esm2022/src/commands/ClientToServer/IniputForceWriteCommand.mjs +23 -0
- package/{esm2020 → esm2022}/src/commands/ClientToServer/NonReversibleExitEventCommand.mjs +23 -23
- package/{esm2020 → esm2022}/src/commands/ClientToServer/QueryCommand.mjs +20 -20
- package/esm2022/src/commands/ClientToServer/RecomputeCommand.mjs +27 -0
- package/esm2022/src/commands/ClientToServer/RefreshEventCommand.mjs +27 -0
- package/esm2022/src/commands/ClientToServer/RefreshScreenEventCommand.mjs +24 -0
- package/esm2022/src/commands/ClientToServer/RollbackEventCommand.mjs +40 -0
- package/{esm2020 → esm2022}/src/commands/ClientToServer/SelectProgramCommand.mjs +14 -14
- package/{esm2020 → esm2022}/src/commands/ClientToServer/SetTransactionStateDataviewCommand.mjs +9 -9
- package/{esm2020 → esm2022}/src/commands/ClientToServer/SubformOpenEventCommand.mjs +21 -21
- package/esm2022/src/commands/ClientToServer/SubformRefreshEventCommand.mjs +24 -0
- package/esm2022/src/commands/ClientToServer/TransactionCommand.mjs +30 -0
- package/{esm2020 → esm2022}/src/commands/ClientToServer/UnloadCommand.mjs +14 -14
- 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 +1 -1
- package/esm2022/src/commands/ServerToClient/AbortCommand.mjs +65 -0
- package/{esm2020 → esm2022}/src/commands/ServerToClient/AddLocateCommand.mjs +21 -21
- package/esm2022/src/commands/ServerToClient/AddRangeCommand.mjs +62 -0
- package/esm2022/src/commands/ServerToClient/AddSortCommand.mjs +33 -0
- package/esm2022/src/commands/ServerToClient/ClientRefreshCommand.mjs +25 -0
- package/esm2022/src/commands/ServerToClient/ClientTargetedCommandBase.mjs +24 -0
- package/esm2022/src/commands/ServerToClient/EnhancedVerifyCommand.mjs +45 -0
- package/esm2022/src/commands/ServerToClient/OpenURLCommand.mjs +221 -0
- package/{esm2020 → esm2022}/src/commands/ServerToClient/ResetLocateCommand.mjs +14 -14
- package/{esm2020 → esm2022}/src/commands/ServerToClient/ResetRangeCommand.mjs +14 -14
- package/{esm2020 → esm2022}/src/commands/ServerToClient/ResetSortCommand.mjs +14 -14
- package/esm2022/src/commands/ServerToClient/ResultCommand.mjs +37 -0
- package/esm2022/src/commands/ServerToClient/VerifyCommand.mjs +83 -0
- package/esm2022/src/commands/ServerToClient/XMLBasedCommandBuilder.mjs +132 -0
- package/{esm2020 → esm2022}/src/communications/IConnectionStateManager.mjs +1 -1
- package/esm2022/src/communications/InteractiveCommunicationsFailureHandler.mjs +15 -0
- package/{esm2020 → esm2022}/src/data/DataSourceIdKey.mjs +2 -2
- package/esm2022/src/data/DataView.mjs +1613 -0
- package/{esm2020 → esm2022}/src/data/DataViewBase.mjs +3 -3
- package/esm2022/src/data/DataviewManager.mjs +28 -0
- package/esm2022/src/data/DataviewManagerBase.mjs +15 -0
- package/esm2022/src/data/DvCache.mjs +67 -0
- package/esm2022/src/data/Field.mjs +646 -0
- package/esm2022/src/data/FieldBase.mjs +15 -0
- package/esm2022/src/data/FieldsTable.mjs +103 -0
- package/{esm2020 → esm2022}/src/data/IRecordsTable.mjs +1 -1
- package/esm2022/src/data/Key.mjs +88 -0
- package/esm2022/src/data/Record.mjs +866 -0
- package/{esm2020 → esm2022}/src/data/RecordOutOfDataViewException.mjs +15 -15
- package/esm2022/src/data/RecordsTable.mjs +267 -0
- package/esm2022/src/data/TaskTransactionManager.mjs +103 -0
- package/esm2022/src/data/XMLBasedDcValuesBuilder.mjs +74 -0
- package/{esm2020 → esm2022}/src/enums.mjs +23 -23
- package/esm2022/src/env/EnvVariablesTable.mjs +340 -0
- package/esm2022/src/env/Environment.mjs +487 -0
- package/{esm2020 → esm2022}/src/env/ILanguageData.mjs +1 -1
- package/esm2022/src/env/LanguageData.mjs +227 -0
- package/esm2022/src/env/MirrorString.mjs +65 -0
- package/esm2022/src/event/ActionManager.mjs +91 -0
- package/esm2022/src/event/Event.mjs +1333 -0
- package/esm2022/src/event/EventHandler.mjs +766 -0
- package/esm2022/src/event/EventHandlerPosition.mjs +204 -0
- package/esm2022/src/event/EventsManager.mjs +2988 -0
- package/{esm2020 → esm2022}/src/event/IEventsManager.mjs +6 -6
- package/esm2022/src/event/RunTimeEvent.mjs +399 -0
- package/{esm2020 → esm2022}/src/event/RunTimeEventBase.mjs +3 -3
- package/esm2022/src/event/UserEventsTable.mjs +47 -0
- package/esm2022/src/exp/ExpTable.mjs +57 -0
- package/esm2022/src/exp/Expression.mjs +200 -0
- package/esm2022/src/exp/ExpressionDict.mjs +727 -0
- package/esm2022/src/exp/ExpressionEvaluator.mjs +4206 -0
- package/esm2022/src/exp/ExpressionLocalJpn.mjs +314 -0
- package/esm2022/src/exp/GlobalParamsTable.mjs +85 -0
- package/esm2022/src/exp/YesNoExp.mjs +36 -0
- package/esm2022/src/gui/CreatedFormVector.mjs +23 -0
- package/esm2022/src/gui/FormsTable.mjs +66 -0
- package/esm2022/src/gui/MgControl.mjs +363 -0
- package/esm2022/src/gui/MgForm.mjs +1181 -0
- package/esm2022/src/http/HttpManager.mjs +97 -0
- package/esm2022/src/http/client/HttpClientAsync.mjs +68 -0
- package/esm2022/src/http/client/HttpClientBase.mjs +132 -0
- package/esm2022/src/http/client/HttpClientEvents.mjs +39 -0
- package/esm2022/src/http/client/HttpClientSync.mjs +42 -0
- package/esm2022/src/http/client/HttpUtility.mjs +84 -0
- package/{esm2020 → esm2022}/src/http/client/ICommunicationsFailureHandler.mjs +1 -1
- package/esm2022/src/remote/AddUserLocateRemoteDataViewCommand.mjs +18 -0
- package/esm2022/src/remote/AddUserRangeRemoteDataViewCommand.mjs +18 -0
- package/esm2022/src/remote/AddUserSortRemoteDataViewCommand.mjs +18 -0
- package/esm2022/src/remote/RemoteCommandsProcessor.mjs +882 -0
- package/esm2022/src/remote/RemoteControlItemsRefreshCommand.mjs +25 -0
- package/esm2022/src/remote/RemoteDataViewCommandBase.mjs +24 -0
- package/esm2022/src/remote/RemoteDataViewCommandFactory.mjs +61 -0
- package/{esm2020 → esm2022}/src/remote/RemoteDataViewCommandUpdateNonModifiable.mjs +15 -15
- package/{esm2020 → esm2022}/src/remote/RemoteDataviewManager.mjs +17 -17
- package/{esm2020 → esm2022}/src/remote/RemoteInitDataViewCommand.mjs +10 -10
- package/esm2022/src/remote/ResetUserLocateRemoteDataviewCommand.mjs +17 -0
- package/{esm2020 → esm2022}/src/remote/ResetUserRangeRemoteDataviewCommand.mjs +12 -12
- package/esm2022/src/remote/ResetUserSortRemoteDataviewCommand.mjs +16 -0
- package/esm2022/src/remote/ServerError.mjs +40 -0
- package/esm2022/src/remote/SetTransactionStateRemoteDataViewCommand.mjs +20 -0
- package/esm2022/src/rt/Argument.mjs +265 -0
- package/esm2022/src/rt/ArgumentsList.mjs +103 -0
- package/esm2022/src/rt/Boundary.mjs +152 -0
- package/esm2022/src/rt/CompMainPrgTable.mjs +63 -0
- package/{esm2020 → esm2022}/src/rt/DataviewHeaderBase.mjs +98 -96
- package/{esm2020 → esm2022}/src/rt/DataviewHeaderFactory.mjs +6 -6
- package/esm2022/src/rt/DataviewHeaders.mjs +53 -0
- package/esm2022/src/rt/DataviewHeadersSaxHandler.mjs +38 -0
- package/esm2022/src/rt/ExecutionStack.mjs +94 -0
- package/{esm2020 → esm2022}/src/rt/ExecutionStackEntry.mjs +17 -17
- package/esm2022/src/rt/HandlersTable.mjs +96 -0
- package/{esm2020 → esm2022}/src/rt/IDataSourceViewDefinition.mjs +1 -1
- package/{esm2020 → esm2022}/src/rt/IDataviewHeader.mjs +1 -1
- package/{esm2020 → esm2022}/src/rt/IResultValue.mjs +1 -1
- package/esm2022/src/rt/LastFocusedManager.mjs +65 -0
- package/esm2022/src/rt/Operation.mjs +735 -0
- package/esm2022/src/rt/OperationTable.mjs +67 -0
- package/esm2022/src/rt/Recompute.mjs +355 -0
- package/esm2022/src/rt/RecomputeTable.mjs +63 -0
- package/esm2022/src/rt/RemoteDataviewHeader.mjs +108 -0
- package/esm2022/src/rt/ResultValue.mjs +10 -0
- package/esm2022/src/rt/TableCache.mjs +177 -0
- package/esm2022/src/rt/TableCacheManager.mjs +67 -0
- package/esm2022/src/rt/Transaction.mjs +53 -0
- package/esm2022/src/security/UserDetails.mjs +71 -0
- package/{esm2020 → esm2022}/src/tasks/IMGDataCollection.mjs +1 -1
- package/esm2022/src/tasks/MGData.mjs +552 -0
- package/esm2022/src/tasks/MGDataCollection.mjs +252 -0
- package/esm2022/src/tasks/RCTimer.mjs +63 -0
- package/esm2022/src/tasks/RemoteTaskService.mjs +45 -0
- package/esm2022/src/tasks/Task.mjs +2498 -0
- package/esm2022/src/tasks/TaskBase.mjs +83 -0
- package/esm2022/src/tasks/TaskServiceBase.mjs +25 -0
- package/esm2022/src/tasks/TasksTable.mjs +80 -0
- package/esm2022/src/tasks/sort/Sort.mjs +5 -0
- package/esm2022/src/tasks/sort/SortCollection.mjs +67 -0
- package/esm2022/src/util/ConstUtils.mjs +14 -0
- package/esm2022/src/util/FlowMonitorQueue.mjs +451 -0
- package/esm2022/src/util/HeapSort.mjs +70 -0
- package/{esm2020 → esm2022}/src/util/IMirrorXML.mjs +1 -1
- package/{esm2020 → esm2022}/src/util/IServerConfig.mjs +1 -1
- package/{esm2020 → esm2022}/src/util/MgBlockingQueue.mjs +1 -1
- package/esm2022/src/util/MgPriorityBlockingQueue.mjs +74 -0
- package/esm2022/src/util/MgPriorityQueue.mjs +66 -0
- package/{esm2020 → esm2022}/src/util/ParamParseResult.mjs +7 -7
- package/esm2022/src/util/PrmMap.mjs +152 -0
- package/esm2022/src/util/ReturnResult.mjs +46 -0
- package/esm2022/src/util/ReturnResultBase.mjs +18 -0
- package/esm2022/src/util/Scrambler.mjs +89 -0
- package/esm2022/src/util/UniqueIDUtils.mjs +13 -0
- package/esm2022/src/util/cookie.service.mjs +92 -0
- package/{fesm2020 → fesm2022}/magic-xpa-engine.mjs +29750 -29694
- 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 +34 -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 +8 -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 +10 -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 +8 -8
- package/src/commands/ClientToServer/ContextTerminationEventCommand.d.ts +7 -7
- package/src/commands/ClientToServer/ContextTimeoutResetCommand.d.ts +7 -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 +15 -15
- package/src/commands/ClientToServer/EventCommand.d.ts +15 -15
- package/src/commands/ClientToServer/ExecOperCommand.d.ts +23 -23
- package/src/commands/ClientToServer/FetchDataControlValuesEventCommand.d.ts +8 -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 +8 -8
- package/src/commands/ClientToServer/IniputForceWriteCommand.d.ts +10 -10
- package/src/commands/ClientToServer/NonReversibleExitEventCommand.d.ts +8 -8
- package/src/commands/ClientToServer/QueryCommand.d.ts +8 -8
- package/src/commands/ClientToServer/RecomputeCommand.d.ts +11 -11
- package/src/commands/ClientToServer/RefreshEventCommand.d.ts +12 -12
- package/src/commands/ClientToServer/RefreshScreenEventCommand.d.ts +10 -10
- package/src/commands/ClientToServer/RollbackEventCommand.d.ts +14 -14
- package/src/commands/ClientToServer/SelectProgramCommand.d.ts +6 -6
- package/src/commands/ClientToServer/SetTransactionStateDataviewCommand.d.ts +5 -5
- package/src/commands/ClientToServer/SubformOpenEventCommand.d.ts +8 -8
- package/src/commands/ClientToServer/SubformRefreshEventCommand.d.ts +9 -9
- package/src/commands/ClientToServer/TransactionCommand.d.ts +12 -12
- package/src/commands/ClientToServer/UnloadCommand.d.ts +7 -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 +3 -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 +156 -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 +93 -93
- package/src/http/HttpManager.d.ts +25 -25
- package/src/http/client/HttpClientAsync.d.ts +16 -16
- package/src/http/client/HttpClientBase.d.ts +30 -30
- package/src/http/client/HttpClientEvents.d.ts +18 -18
- package/src/http/client/HttpClientSync.d.ts +17 -17
- package/src/http/client/HttpUtility.d.ts +10 -10
- package/src/http/client/ICommunicationsFailureHandler.d.ts +5 -5
- package/src/remote/AddUserLocateRemoteDataViewCommand.d.ts +8 -8
- package/src/remote/AddUserRangeRemoteDataViewCommand.d.ts +8 -8
- package/src/remote/AddUserSortRemoteDataViewCommand.d.ts +8 -8
- package/src/remote/RemoteCommandsProcessor.d.ts +51 -51
- package/src/remote/RemoteControlItemsRefreshCommand.d.ts +8 -8
- package/src/remote/RemoteDataViewCommandBase.d.ts +10 -10
- package/src/remote/RemoteDataViewCommandFactory.d.ts +6 -6
- package/src/remote/RemoteDataViewCommandUpdateNonModifiable.d.ts +8 -8
- package/src/remote/RemoteDataviewManager.d.ts +9 -9
- package/src/remote/RemoteInitDataViewCommand.d.ts +7 -7
- package/src/remote/ResetUserLocateRemoteDataviewCommand.d.ts +7 -7
- package/src/remote/ResetUserRangeRemoteDataviewCommand.d.ts +7 -7
- package/src/remote/ResetUserSortRemoteDataviewCommand.d.ts +7 -7
- package/src/remote/ServerError.d.ts +16 -16
- package/src/remote/SetTransactionStateRemoteDataViewCommand.d.ts +8 -8
- package/src/rt/Argument.d.ts +36 -36
- package/src/rt/ArgumentsList.d.ts +24 -24
- package/src/rt/Boundary.d.ts +27 -27
- package/src/rt/CompMainPrgTable.d.ts +10 -10
- package/src/rt/DataviewHeaderBase.d.ts +34 -34
- package/src/rt/DataviewHeaderFactory.d.ts +5 -5
- package/src/rt/DataviewHeaders.d.ts +12 -12
- package/src/rt/DataviewHeadersSaxHandler.d.ts +10 -10
- package/src/rt/ExecutionStack.d.ts +22 -22
- package/src/rt/ExecutionStackEntry.d.ts +7 -7
- package/src/rt/HandlersTable.d.ts +19 -19
- package/src/rt/IDataSourceViewDefinition.d.ts +6 -6
- package/src/rt/IDataviewHeader.d.ts +10 -10
- package/src/rt/IResultValue.d.ts +4 -4
- package/src/rt/LastFocusedManager.d.ts +23 -23
- package/src/rt/Operation.d.ts +97 -97
- package/src/rt/OperationTable.d.ts +15 -15
- package/src/rt/Recompute.d.ts +41 -41
- package/src/rt/RecomputeTable.d.ts +9 -9
- package/src/rt/RemoteDataviewHeader.d.ts +14 -14
- package/src/rt/ResultValue.d.ts +7 -7
- package/src/rt/TableCache.d.ts +29 -29
- package/src/rt/TableCacheManager.d.ts +10 -10
- package/src/rt/Transaction.d.ts +23 -23
- package/src/security/UserDetails.d.ts +16 -16
- package/src/tasks/IMGDataCollection.d.ts +26 -26
- package/src/tasks/MGData.d.ts +63 -63
- package/src/tasks/MGDataCollection.d.ts +42 -42
- package/src/tasks/RCTimer.d.ts +13 -13
- package/src/tasks/RemoteTaskService.d.ts +16 -16
- package/src/tasks/Task.d.ts +312 -312
- package/src/tasks/TaskBase.d.ts +123 -123
- package/src/tasks/TaskServiceBase.d.ts +16 -16
- package/src/tasks/TasksTable.d.ts +21 -21
- package/src/tasks/sort/Sort.d.ts +4 -4
- package/src/tasks/sort/SortCollection.d.ts +11 -11
- package/src/util/ConstUtils.d.ts +3 -3
- package/src/util/FlowMonitorQueue.d.ts +70 -70
- package/src/util/HeapSort.d.ts +6 -6
- package/src/util/IMirrorXML.d.ts +6 -6
- package/src/util/IServerConfig.d.ts +11 -11
- package/src/util/MgBlockingQueue.d.ts +5 -5
- package/src/util/MgPriorityBlockingQueue.d.ts +17 -17
- package/src/util/MgPriorityQueue.d.ts +13 -13
- package/src/util/ParamParseResult.d.ts +6 -6
- package/src/util/PrmMap.d.ts +28 -28
- package/src/util/ReturnResult.d.ts +18 -18
- package/src/util/ReturnResultBase.d.ts +11 -11
- package/src/util/Scrambler.d.ts +10 -10
- package/src/util/UniqueIDUtils.d.ts +4 -4
- package/src/util/cookie.service.d.ts +8 -8
- package/esm2020/src/AccessHelper.mjs +0 -9
- package/esm2020/src/ClientManager.mjs +0 -399
- package/esm2020/src/CommandsProcessorBase.mjs +0 -58
- package/esm2020/src/CommandsProcessorManager.mjs +0 -26
- package/esm2020/src/CommandsTable.mjs +0 -162
- package/esm2020/src/ConstInterface.mjs +0 -516
- package/esm2020/src/FlowMonitorInterface.mjs +0 -16
- package/esm2020/src/GUIManager.mjs +0 -62
- package/esm2020/src/GlobalCommandsManager.mjs +0 -34
- package/esm2020/src/GuiEventsProcessor.mjs +0 -154
- package/esm2020/src/ServerConfig.mjs +0 -117
- package/esm2020/src/commands/ClientOriginatedCommandTaskTag.mjs +0 -11
- package/esm2020/src/commands/ClientToServer/ClientOriginatedCommandSerializer.mjs +0 -60
- package/esm2020/src/commands/ClientToServer/CommandFactory.mjs +0 -260
- package/esm2020/src/commands/ClientToServer/CommandSerializationHelper.mjs +0 -69
- package/esm2020/src/commands/ClientToServer/DataViewOutputCommand.mjs +0 -13
- package/esm2020/src/commands/ClientToServer/EvaluateCommand.mjs +0 -36
- package/esm2020/src/commands/ClientToServer/EventCommand.mjs +0 -40
- package/esm2020/src/commands/ClientToServer/ExecOperCommand.mjs +0 -67
- package/esm2020/src/commands/ClientToServer/FetchDataControlValuesEventCommand.mjs +0 -22
- 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/SubformRefreshEventCommand.mjs +0 -24
- package/esm2020/src/commands/ClientToServer/TransactionCommand.mjs +0 -28
- package/esm2020/src/commands/ClientToServer/WriteMessageToServerLogCommand.mjs +0 -18
- package/esm2020/src/commands/DataViewCommandBase.mjs +0 -10
- package/esm2020/src/commands/IClientTargetedCommand.mjs +0 -9
- package/esm2020/src/commands/ServerToClient/AbortCommand.mjs +0 -65
- package/esm2020/src/commands/ServerToClient/AddRangeCommand.mjs +0 -62
- package/esm2020/src/commands/ServerToClient/AddSortCommand.mjs +0 -33
- package/esm2020/src/commands/ServerToClient/ClientRefreshCommand.mjs +0 -25
- package/esm2020/src/commands/ServerToClient/ClientTargetedCommandBase.mjs +0 -27
- package/esm2020/src/commands/ServerToClient/EnhancedVerifyCommand.mjs +0 -45
- package/esm2020/src/commands/ServerToClient/OpenURLCommand.mjs +0 -221
- package/esm2020/src/commands/ServerToClient/ResultCommand.mjs +0 -37
- package/esm2020/src/commands/ServerToClient/VerifyCommand.mjs +0 -83
- package/esm2020/src/commands/ServerToClient/XMLBasedCommandBuilder.mjs +0 -132
- package/esm2020/src/communications/InteractiveCommunicationsFailureHandler.mjs +0 -17
- package/esm2020/src/data/DataView.mjs +0 -1610
- package/esm2020/src/data/DataviewManager.mjs +0 -28
- package/esm2020/src/data/DataviewManagerBase.mjs +0 -15
- package/esm2020/src/data/DvCache.mjs +0 -67
- package/esm2020/src/data/Field.mjs +0 -646
- package/esm2020/src/data/FieldBase.mjs +0 -18
- package/esm2020/src/data/FieldsTable.mjs +0 -103
- package/esm2020/src/data/Key.mjs +0 -88
- package/esm2020/src/data/Record.mjs +0 -846
- package/esm2020/src/data/RecordsTable.mjs +0 -267
- package/esm2020/src/data/TaskTransactionManager.mjs +0 -103
- package/esm2020/src/data/XMLBasedDcValuesBuilder.mjs +0 -74
- package/esm2020/src/env/EnvVariablesTable.mjs +0 -340
- package/esm2020/src/env/Environment.mjs +0 -489
- package/esm2020/src/env/LanguageData.mjs +0 -226
- package/esm2020/src/env/MirrorString.mjs +0 -65
- package/esm2020/src/event/ActionManager.mjs +0 -91
- package/esm2020/src/event/Event.mjs +0 -1333
- package/esm2020/src/event/EventHandler.mjs +0 -766
- package/esm2020/src/event/EventHandlerPosition.mjs +0 -204
- package/esm2020/src/event/EventsManager.mjs +0 -2975
- package/esm2020/src/event/RunTimeEvent.mjs +0 -392
- package/esm2020/src/event/UserEventsTable.mjs +0 -47
- package/esm2020/src/exp/ExpTable.mjs +0 -59
- package/esm2020/src/exp/Expression.mjs +0 -200
- package/esm2020/src/exp/ExpressionDict.mjs +0 -727
- package/esm2020/src/exp/ExpressionEvaluator.mjs +0 -4212
- package/esm2020/src/exp/ExpressionLocalJpn.mjs +0 -314
- package/esm2020/src/exp/GlobalParamsTable.mjs +0 -85
- package/esm2020/src/exp/YesNoExp.mjs +0 -36
- package/esm2020/src/gui/CreatedFormVector.mjs +0 -23
- package/esm2020/src/gui/FormsTable.mjs +0 -66
- package/esm2020/src/gui/MgControl.mjs +0 -353
- package/esm2020/src/gui/MgForm.mjs +0 -1181
- package/esm2020/src/http/HttpManager.mjs +0 -97
- package/esm2020/src/http/client/HttpClientAsync.mjs +0 -67
- package/esm2020/src/http/client/HttpClientBase.mjs +0 -132
- package/esm2020/src/http/client/HttpClientEvents.mjs +0 -39
- package/esm2020/src/http/client/HttpClientSync.mjs +0 -42
- package/esm2020/src/http/client/HttpUtility.mjs +0 -84
- package/esm2020/src/remote/AddUserLocateRemoteDataViewCommand.mjs +0 -18
- package/esm2020/src/remote/AddUserRangeRemoteDataViewCommand.mjs +0 -18
- package/esm2020/src/remote/AddUserSortRemoteDataViewCommand.mjs +0 -18
- package/esm2020/src/remote/RemoteCommandsProcessor.mjs +0 -880
- package/esm2020/src/remote/RemoteControlItemsRefreshCommand.mjs +0 -25
- package/esm2020/src/remote/RemoteDataViewCommandBase.mjs +0 -24
- package/esm2020/src/remote/RemoteDataViewCommandFactory.mjs +0 -61
- package/esm2020/src/remote/ResetUserLocateRemoteDataviewCommand.mjs +0 -17
- package/esm2020/src/remote/ResetUserSortRemoteDataviewCommand.mjs +0 -16
- package/esm2020/src/remote/ServerError.mjs +0 -40
- package/esm2020/src/remote/SetTransactionStateRemoteDataViewCommand.mjs +0 -20
- package/esm2020/src/rt/Argument.mjs +0 -265
- package/esm2020/src/rt/ArgumentsList.mjs +0 -103
- package/esm2020/src/rt/Boundary.mjs +0 -152
- package/esm2020/src/rt/CompMainPrgTable.mjs +0 -65
- package/esm2020/src/rt/DataviewHeaders.mjs +0 -53
- package/esm2020/src/rt/DataviewHeadersSaxHandler.mjs +0 -38
- package/esm2020/src/rt/ExecutionStack.mjs +0 -94
- package/esm2020/src/rt/HandlersTable.mjs +0 -96
- package/esm2020/src/rt/LastFocusedManager.mjs +0 -67
- package/esm2020/src/rt/Operation.mjs +0 -735
- package/esm2020/src/rt/OperationTable.mjs +0 -67
- package/esm2020/src/rt/Recompute.mjs +0 -355
- package/esm2020/src/rt/RecomputeTable.mjs +0 -63
- package/esm2020/src/rt/RemoteDataviewHeader.mjs +0 -108
- package/esm2020/src/rt/ResultValue.mjs +0 -12
- package/esm2020/src/rt/TableCache.mjs +0 -177
- package/esm2020/src/rt/TableCacheManager.mjs +0 -67
- package/esm2020/src/rt/Transaction.mjs +0 -53
- package/esm2020/src/security/UserDetails.mjs +0 -71
- package/esm2020/src/tasks/MGData.mjs +0 -552
- package/esm2020/src/tasks/MGDataCollection.mjs +0 -252
- package/esm2020/src/tasks/RCTimer.mjs +0 -63
- package/esm2020/src/tasks/RemoteTaskService.mjs +0 -45
- package/esm2020/src/tasks/Task.mjs +0 -2496
- package/esm2020/src/tasks/TaskBase.mjs +0 -87
- package/esm2020/src/tasks/TaskServiceBase.mjs +0 -25
- package/esm2020/src/tasks/TasksTable.mjs +0 -80
- package/esm2020/src/tasks/sort/Sort.mjs +0 -7
- package/esm2020/src/tasks/sort/SortCollection.mjs +0 -67
- package/esm2020/src/util/ConstUtils.mjs +0 -14
- package/esm2020/src/util/FlowMonitorQueue.mjs +0 -453
- package/esm2020/src/util/HeapSort.mjs +0 -70
- package/esm2020/src/util/MgPriorityBlockingQueue.mjs +0 -74
- package/esm2020/src/util/MgPriorityQueue.mjs +0 -66
- package/esm2020/src/util/PrmMap.mjs +0 -151
- package/esm2020/src/util/ReturnResult.mjs +0 -46
- package/esm2020/src/util/ReturnResultBase.mjs +0 -18
- package/esm2020/src/util/Scrambler.mjs +0 -89
- package/esm2020/src/util/UniqueIDUtils.mjs +0 -12
- package/esm2020/src/util/cookie.service.mjs +0 -92
- package/fesm2015/magic-xpa-engine.mjs +0 -30836
- package/fesm2015/magic-xpa-engine.mjs.map +0 -1
- package/fesm2020/magic-xpa-engine.mjs.map +0 -1
@@ -0,0 +1,66 @@
|
|
1
|
+
import { List } from "@magic-xpa/mscorelib";
|
2
|
+
import { XMLConstants } from "@magic-xpa/utils";
|
3
|
+
import { Manager, RuntimeContextBase } from "@magic-xpa/gui";
|
4
|
+
import { RemoteTaskService } from "../tasks/RemoteTaskService";
|
5
|
+
export class FormsTable {
|
6
|
+
_task = null;
|
7
|
+
_parentForm = null;
|
8
|
+
_formsStringXml = null;
|
9
|
+
get Count() {
|
10
|
+
return this._formsStringXml.length;
|
11
|
+
}
|
12
|
+
get_Item(formDisplayIndex) {
|
13
|
+
if (formDisplayIndex > 0 && formDisplayIndex <= this._formsStringXml.length)
|
14
|
+
return this._formsStringXml.get_Item(formDisplayIndex - 1);
|
15
|
+
return null;
|
16
|
+
}
|
17
|
+
constructor(task, parentForm) {
|
18
|
+
this._task = task;
|
19
|
+
this._parentForm = parentForm;
|
20
|
+
}
|
21
|
+
async fillData() {
|
22
|
+
this._formsStringXml = new List();
|
23
|
+
let parser = Manager.GetCurrentRuntimeContext().Parser;
|
24
|
+
while (await this.initInnerObjects(parser.getNextTag())) {
|
25
|
+
}
|
26
|
+
}
|
27
|
+
InitFormFromXmlString(formDisplayIndex) {
|
28
|
+
let formStrXml = this.get_Item(1);
|
29
|
+
if (formDisplayIndex > 0 && formDisplayIndex <= this._formsStringXml.length)
|
30
|
+
formStrXml = this.get_Item(formDisplayIndex);
|
31
|
+
if (formStrXml !== null) {
|
32
|
+
RuntimeContextBase.Instance.Parser.push();
|
33
|
+
RuntimeContextBase.Instance.Parser.PrepareFormReadString(formStrXml);
|
34
|
+
this._task.FormInitData(this._parentForm);
|
35
|
+
RuntimeContextBase.Instance.Parser.pop();
|
36
|
+
}
|
37
|
+
}
|
38
|
+
async initInnerObjects(foundTagName) {
|
39
|
+
if (foundTagName === null)
|
40
|
+
return false;
|
41
|
+
let parser = Manager.GetCurrentRuntimeContext().Parser;
|
42
|
+
if (foundTagName === XMLConstants.MG_TAG_FORMS) {
|
43
|
+
parser.setCurrIndex(parser.getXMLdata().indexOf(XMLConstants.TAG_CLOSE, parser.getCurrIndex()) + 1);
|
44
|
+
}
|
45
|
+
else if (foundTagName === XMLConstants.MG_TAG_FORM) {
|
46
|
+
let formStringXml = RuntimeContextBase.Instance.Parser.ReadToEndOfCurrentElement();
|
47
|
+
this._formsStringXml.push(formStringXml);
|
48
|
+
return true;
|
49
|
+
}
|
50
|
+
else if (foundTagName === ('/' + XMLConstants.MG_TAG_FORM)) {
|
51
|
+
parser.setCurrIndex2EndOfTag();
|
52
|
+
return true;
|
53
|
+
}
|
54
|
+
else if (foundTagName === ('/' + XMLConstants.MG_TAG_FORMS)) {
|
55
|
+
await this.PrepareMainDisplayForConnectedTask();
|
56
|
+
parser.setCurrIndex2EndOfTag();
|
57
|
+
return false;
|
58
|
+
}
|
59
|
+
return true;
|
60
|
+
}
|
61
|
+
async PrepareMainDisplayForConnectedTask() {
|
62
|
+
if (this._task.TaskService instanceof RemoteTaskService)
|
63
|
+
await this._task.PrepareTaskForm();
|
64
|
+
}
|
65
|
+
}
|
66
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiRm9ybXNUYWJsZS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uL3Byb2plY3RzL2VuZ2luZS9zcmMvZ3VpL0Zvcm1zVGFibGUudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUFDLElBQUksRUFBQyxNQUFNLHNCQUFzQixDQUFDO0FBQzFDLE9BQ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GFnTmFtZSA9PT0gKCcvJyArIFhNTENvbnN0YW50cy5NR19UQUdfRk9STSkpIHtcclxuICAgICAgcGFyc2VyLnNldEN1cnJJbmRleDJFbmRPZlRhZygpO1xyXG4gICAgICByZXR1cm4gdHJ1ZTtcclxuICAgIH1cclxuICAgIGVsc2UgaWYgKGZvdW5kVGFnTmFtZSA9PT0gKCcvJyArIFhNTENvbnN0YW50cy5NR19UQUdfRk9STVMpKSB7XHJcbiAgICAgIGF3YWl0IHRoaXMuUHJlcGFyZU1haW5EaXNwbGF5Rm9yQ29ubmVjdGVkVGFzaygpO1xyXG5cclxuICAgICAgcGFyc2VyLnNldEN1cnJJbmRleDJFbmRPZlRhZygpO1xyXG4gICAgICByZXR1cm4gZmFsc2U7XHJcbiAgICB9XHJcbiAgICByZXR1cm4gdHJ1ZTtcclxuICB9XHJcblxyXG4gIC8vLyA8c3VtbWFyeT5cclxuICAvLy8gZm9yIHJlbW90ZSB0YXNrIHdlIGhhdmUgYWxsIHRoZSBpbmZvcm1hdGlvbiB0aGF0IHdlIG5lZWQgdG8gY2FsY3VsYXRlIHRoZSBmb3JtIGRpc3BsYXlcclxuICAvLy8gPC9zdW1tYXJ5PlxyXG4gIHByaXZhdGUgYXN5bmMgUHJlcGFyZU1haW5EaXNwbGF5Rm9yQ29ubmVjdGVkVGFzaygpOiBQcm9taXNlPHZvaWQ+IHtcclxuICAgIGlmICh0aGlzLl90YXNrLlRhc2tTZXJ2aWNlIGluc3RhbmNlb2YgUmVtb3RlVGFza1NlcnZpY2UpXHJcbiAgICAgIGF3YWl0IHRoaXMuX3Rhc2suUHJlcGFyZVRhc2tGb3JtKCk7XHJcbiAgfVxyXG59XHJcbiJdfQ==
|
@@ -0,0 +1,363 @@
|
|
1
|
+
import { Commands, CommandType, GuiDataCollection, HtmlProperties, MgControlBase, PropInterface } from '@magic-xpa/gui';
|
2
|
+
import { InternalInterface, Logger, MgControlType, ScrollBarThumbType, StorageAttribute, SubformType, TableBehaviour } from '@magic-xpa/utils';
|
3
|
+
import { Debug, NString } from '@magic-xpa/mscorelib';
|
4
|
+
import { ArgumentsList } from '../rt/ArgumentsList';
|
5
|
+
import { TaskBase } from '../tasks/TaskBase';
|
6
|
+
import { ConstInterface } from '../ConstInterface';
|
7
|
+
import { AccessHelper } from '../AccessHelper';
|
8
|
+
export class MgControl extends MgControlBase {
|
9
|
+
_focusedStopExecution;
|
10
|
+
_inControlSuffix;
|
11
|
+
_rtEvtTask;
|
12
|
+
_subformTaskId;
|
13
|
+
_subformTask;
|
14
|
+
IsInteractiveUpdate;
|
15
|
+
refreshOnString;
|
16
|
+
SubformLoaded;
|
17
|
+
HasZoomHandler;
|
18
|
+
ArgList;
|
19
|
+
static ReturnToCtrl = null;
|
20
|
+
initialize() {
|
21
|
+
this._focusedStopExecution = false;
|
22
|
+
this._inControlSuffix = false;
|
23
|
+
this._rtEvtTask = null;
|
24
|
+
this._subformTaskId = null;
|
25
|
+
this._subformTask = null;
|
26
|
+
this.IsInteractiveUpdate = false;
|
27
|
+
this.refreshOnString = null;
|
28
|
+
this.SubformLoaded = false;
|
29
|
+
this.HasZoomHandler = false;
|
30
|
+
this.ArgList = null;
|
31
|
+
}
|
32
|
+
constructor(type, taskOrParentMgForm, parentControlOrParentControlIdx) {
|
33
|
+
if (arguments.length === 0)
|
34
|
+
super();
|
35
|
+
else if (arguments.length === 3 && (type === null || type.constructor === Number) && (taskOrParentMgForm === null || taskOrParentMgForm instanceof TaskBase) && (parentControlOrParentControlIdx === null || parentControlOrParentControlIdx.constructor === Number))
|
36
|
+
super(type, taskOrParentMgForm.getForm(), parentControlOrParentControlIdx);
|
37
|
+
else
|
38
|
+
super(type, taskOrParentMgForm, parentControlOrParentControlIdx);
|
39
|
+
this.initialize();
|
40
|
+
}
|
41
|
+
GetVarIndex() {
|
42
|
+
return super.getForm().getTask().DataView.Dvcount + this.veeIndx;
|
43
|
+
}
|
44
|
+
async fillData(mgForm, ditIdx, parser) {
|
45
|
+
super.fillData(mgForm, ditIdx, parser);
|
46
|
+
this.ArgList = await this.GetArgumentList();
|
47
|
+
}
|
48
|
+
SetAttribute(attribute, valueStr) {
|
49
|
+
let isTagProcessed = super.SetAttribute(attribute, valueStr);
|
50
|
+
if (!isTagProcessed) {
|
51
|
+
switch (attribute) {
|
52
|
+
case ConstInterface.MG_ATTR_SUBFORM_TASK:
|
53
|
+
if (valueStr.trim() != "")
|
54
|
+
this._subformTaskId = valueStr;
|
55
|
+
break;
|
56
|
+
case ConstInterface.MG_ATTR_REFRESHON:
|
57
|
+
this.refreshOnString = valueStr.trim();
|
58
|
+
break;
|
59
|
+
default:
|
60
|
+
isTagProcessed = false;
|
61
|
+
Logger.Instance.WriteExceptionToLogWithMsg(NString.Format("Unrecognized attribute: '{0}'", attribute));
|
62
|
+
break;
|
63
|
+
}
|
64
|
+
}
|
65
|
+
return isTagProcessed;
|
66
|
+
}
|
67
|
+
async GetArgumentList() {
|
68
|
+
let argList = null;
|
69
|
+
if (this._propTab === null)
|
70
|
+
return argList;
|
71
|
+
let ArgListProp = this._propTab.getPropById(PropInterface.PROP_TYPE_PARAMETERS);
|
72
|
+
if (ArgListProp === null)
|
73
|
+
return argList;
|
74
|
+
let parms = await ArgListProp.getValue();
|
75
|
+
if (parms !== null) {
|
76
|
+
argList = new ArgumentsList();
|
77
|
+
argList.fillList(parms, super.getForm().getTask());
|
78
|
+
if (this.refreshOnString !== null)
|
79
|
+
argList.RefreshOnString = this.refreshOnString;
|
80
|
+
}
|
81
|
+
return argList;
|
82
|
+
}
|
83
|
+
isDescendent(parentForm) {
|
84
|
+
let isDescendent = false;
|
85
|
+
let checkCurrentForm = super.getForm();
|
86
|
+
Debug.Assert(parentForm !== null);
|
87
|
+
while (!isDescendent && checkCurrentForm !== null) {
|
88
|
+
if (parentForm === checkCurrentForm)
|
89
|
+
isDescendent = true;
|
90
|
+
else {
|
91
|
+
let currTask = checkCurrentForm.getTask();
|
92
|
+
if (currTask.getParent() !== null)
|
93
|
+
checkCurrentForm = currTask.getParent().getForm();
|
94
|
+
else
|
95
|
+
break;
|
96
|
+
}
|
97
|
+
}
|
98
|
+
return isDescendent;
|
99
|
+
}
|
100
|
+
async refreshOnExpression() {
|
101
|
+
let i;
|
102
|
+
let size = (this._propTab === null ? 0 : this._propTab.getSize());
|
103
|
+
let prop;
|
104
|
+
let refresh = false;
|
105
|
+
for (i = 0; i < size && !refresh; i++) {
|
106
|
+
prop = this._propTab.getProp(i);
|
107
|
+
switch (prop.getID()) {
|
108
|
+
case PropInterface.PROP_TYPE_DATA:
|
109
|
+
if (!prop.isExpression() && this._field !== null && this._field.getTask() !== this.getForm().getTask()) {
|
110
|
+
refresh = true;
|
111
|
+
break;
|
112
|
+
}
|
113
|
+
case PropInterface.PROP_TYPE_FORMAT:
|
114
|
+
case PropInterface.PROP_TYPE_VISIBLE:
|
115
|
+
case PropInterface.PROP_TYPE_ENABLED:
|
116
|
+
case PropInterface.PROP_TYPE_RANGE:
|
117
|
+
case PropInterface.PROP_TYPE_TRANSLATOR:
|
118
|
+
if (prop.isExpression())
|
119
|
+
refresh = true;
|
120
|
+
break;
|
121
|
+
default:
|
122
|
+
break;
|
123
|
+
}
|
124
|
+
if (refresh)
|
125
|
+
await this.RefreshDisplay();
|
126
|
+
}
|
127
|
+
}
|
128
|
+
async invoke() {
|
129
|
+
let invoked = false;
|
130
|
+
if (await this.isParkable(true)) {
|
131
|
+
await AccessHelper.eventsManager.handleInternalEventWithMgControlBase(this, InternalInterface.MG_ACT_CTRL_PREFIX);
|
132
|
+
invoked = true;
|
133
|
+
}
|
134
|
+
return invoked;
|
135
|
+
}
|
136
|
+
async isParkable(checkEnabledAndVisible) {
|
137
|
+
let result = !super.isImageControl();
|
138
|
+
if (result) {
|
139
|
+
await super.checkProp(PropInterface.PROP_TYPE_ENABLED, true);
|
140
|
+
await super.checkProp(PropInterface.PROP_TYPE_VISIBLE, true);
|
141
|
+
result = await super.isParkable(checkEnabledAndVisible);
|
142
|
+
}
|
143
|
+
return result;
|
144
|
+
}
|
145
|
+
getSubformTaskId() {
|
146
|
+
return this._subformTaskId;
|
147
|
+
}
|
148
|
+
initSubformTask() {
|
149
|
+
if (super.isSubform())
|
150
|
+
this._subformTask = GuiDataCollection.MGDataTable.GetTaskByID(this._subformTaskId);
|
151
|
+
}
|
152
|
+
getParentTable() {
|
153
|
+
return this._parentTable;
|
154
|
+
}
|
155
|
+
async restoreOldValue() {
|
156
|
+
if (this._field !== null)
|
157
|
+
await this._field.updateDisplay();
|
158
|
+
else {
|
159
|
+
super.resetPrevVal();
|
160
|
+
await super.SetAndRefreshDisplayValue(await this.getMgValue(this.Value), this.IsNull);
|
161
|
+
}
|
162
|
+
}
|
163
|
+
setRtEvtTask(curTask) {
|
164
|
+
this._rtEvtTask = curTask;
|
165
|
+
}
|
166
|
+
getRtEvtTask() {
|
167
|
+
return this._rtEvtTask;
|
168
|
+
}
|
169
|
+
setSubformTaskId(taskId) {
|
170
|
+
this._subformTaskId = taskId;
|
171
|
+
}
|
172
|
+
isFocusedStopExecution() {
|
173
|
+
return this._focusedStopExecution;
|
174
|
+
}
|
175
|
+
setFocusedStopExecution(focusedStopExecution) {
|
176
|
+
this._focusedStopExecution = focusedStopExecution;
|
177
|
+
}
|
178
|
+
onTheSameSubFormControl(ctrl) {
|
179
|
+
let retValue = false;
|
180
|
+
if (ctrl !== null) {
|
181
|
+
if (super.getForm().isSubForm() && ctrl.getForm().isSubForm()) {
|
182
|
+
if (super.getForm().getTask() === ctrl.getForm().getTask())
|
183
|
+
retValue = true;
|
184
|
+
}
|
185
|
+
}
|
186
|
+
return retValue;
|
187
|
+
}
|
188
|
+
onDiffForm(ctrl) {
|
189
|
+
let isSubform = super.getForm().isSubForm() || ctrl.getForm().isSubForm();
|
190
|
+
let isOnDiffForm = (isSubform) && !this.onTheSameSubFormControl(ctrl);
|
191
|
+
return isOnDiffForm;
|
192
|
+
}
|
193
|
+
isInControlSuffix() {
|
194
|
+
return this._inControlSuffix;
|
195
|
+
}
|
196
|
+
setInControlSuffix(inControlSuffix) {
|
197
|
+
this._inControlSuffix = inControlSuffix;
|
198
|
+
}
|
199
|
+
HasSelectProgram() {
|
200
|
+
let HasSelectProgram = false;
|
201
|
+
let selectProgProp = super.GetComputedProperty(PropInterface.PROP_TYPE_SELECT_PROGRAM);
|
202
|
+
if (selectProgProp !== null && selectProgProp.GetComputedValue() !== null)
|
203
|
+
HasSelectProgram = true;
|
204
|
+
return HasSelectProgram;
|
205
|
+
}
|
206
|
+
useZoomHandler() {
|
207
|
+
return this.HasZoomHandler || (super.getField() !== null && (super.getField().getHasZoomHandler() || (this.HasSelectProgram())));
|
208
|
+
}
|
209
|
+
async updatePropertyLogicNesting(propId, commandType, val, updateThis) {
|
210
|
+
if (val && super.haveToCheckParentValue())
|
211
|
+
val = super.isParentPropValue(propId);
|
212
|
+
if (val && super.isSubform() && commandType === CommandType.PROP_SET_VISIBLE && this.ShouldSetSubformInvisible())
|
213
|
+
val = false;
|
214
|
+
if (updateThis) {
|
215
|
+
Commands.addOperationWithLine(CommandType.SET_PROPERTY, this, super.getDisplayLine(false), commandType === CommandType.PROP_SET_VISIBLE ? HtmlProperties.Visible : HtmlProperties.Enabled, val);
|
216
|
+
}
|
217
|
+
await super.updateChildrenPropValue(propId, commandType, val);
|
218
|
+
}
|
219
|
+
ShouldSetSubformInvisible() {
|
220
|
+
let setInvisible = false;
|
221
|
+
let subformType = super.GetComputedProperty(PropInterface.PROP_TYPE_SUBFORM_TYPE).GetComputedValueInteger();
|
222
|
+
if (subformType === SubformType.None && this.getSubformTaskId() === null)
|
223
|
+
setInvisible = true;
|
224
|
+
return setInvisible;
|
225
|
+
}
|
226
|
+
async updateSubformChildrenPropValue(propId, commandType, val) {
|
227
|
+
Debug.Assert(super.isSubform());
|
228
|
+
if (!super.getForm().getTask().AfterFirstRecordPrefix)
|
229
|
+
return;
|
230
|
+
let subformType = super.GetComputedProperty(PropInterface.PROP_TYPE_SUBFORM_TYPE).GetComputedValueInteger();
|
231
|
+
if (this._subformTaskId !== null || subformType === SubformType.None) {
|
232
|
+
if (this._subformTask !== null && this._subformTask.isStarted()) {
|
233
|
+
this.SubformLoaded = true;
|
234
|
+
if (commandType === CommandType.PROP_SET_VISIBLE && val && this.RefreshOnVisible) {
|
235
|
+
this.RefreshOnVisible = false;
|
236
|
+
await super.getForm().getTask().SubformRefresh(this._subformTask, true);
|
237
|
+
}
|
238
|
+
let subformForm = this._subformTask.getForm();
|
239
|
+
for (let i = 0; i < subformForm.getCtrlCount(); i++) {
|
240
|
+
let child = subformForm.getCtrl(i);
|
241
|
+
if (!child.isColumnControl())
|
242
|
+
continue;
|
243
|
+
let childValue = await child.checkProp(propId, true) && val;
|
244
|
+
if (childValue)
|
245
|
+
childValue = child.isParentPropValue(propId);
|
246
|
+
await child.updateChildrenPropValue(propId, commandType, childValue);
|
247
|
+
}
|
248
|
+
}
|
249
|
+
}
|
250
|
+
else if ((commandType === CommandType.PROP_SET_VISIBLE && val) && !this.SubformLoaded) {
|
251
|
+
this.SubformLoaded = true;
|
252
|
+
await AccessHelper.eventsManager.handleInternalEventWithMgControlBase(this, InternalInterface.MG_ACT_SUBFORM_OPEN);
|
253
|
+
}
|
254
|
+
}
|
255
|
+
Init() {
|
256
|
+
this.initSubformTask();
|
257
|
+
}
|
258
|
+
GetTableBehaviour() {
|
259
|
+
return TableBehaviour.UnlimitedItems;
|
260
|
+
}
|
261
|
+
async validateAndSetValue(NewValue, updateCtrl) {
|
262
|
+
super.UpdateModifiedByUser(NewValue);
|
263
|
+
if (this.ModifiedByUser) {
|
264
|
+
let ctrlCurrValue = this.Value;
|
265
|
+
let vd;
|
266
|
+
if (super.getPIC() === null)
|
267
|
+
return true;
|
268
|
+
vd = super.buildPicture(ctrlCurrValue, NewValue);
|
269
|
+
vd.evaluate();
|
270
|
+
if (vd.ValidationFailed) {
|
271
|
+
this.ModifiedByUser = false;
|
272
|
+
return false;
|
273
|
+
}
|
274
|
+
this.IsInteractiveUpdate = true;
|
275
|
+
super.getForm().getTask().setDataSynced(false);
|
276
|
+
if (updateCtrl) {
|
277
|
+
if (this._field !== null && this._field.getType() === StorageAttribute.NUMERIC && typeof NewValue === 'string' && NewValue.trim().length > 0)
|
278
|
+
vd.setValue(NewValue);
|
279
|
+
await this.setValue(vd);
|
280
|
+
}
|
281
|
+
}
|
282
|
+
return true;
|
283
|
+
}
|
284
|
+
async setValue(vd) {
|
285
|
+
let isNull = vd.getIsNull();
|
286
|
+
let newValue = vd.getDispValue();
|
287
|
+
let mgVal;
|
288
|
+
if (!isNull || !this._field.hasNullDisplayValue())
|
289
|
+
mgVal = await super.getMgValue(newValue);
|
290
|
+
else
|
291
|
+
mgVal = ((this._field.getType() === StorageAttribute.BLOB_VECTOR) ? this._field.getCellDefualtValue() : this._field.getDefaultValue());
|
292
|
+
if (mgVal !== null) {
|
293
|
+
if (this._field !== null && (!(newValue === this.Value) || this.KeyStrokeOn || this.IsNull !== isNull)) {
|
294
|
+
await this._field.setValueAndStartRecompute(mgVal, isNull, true, true, false);
|
295
|
+
if (super.isCheckBox()) {
|
296
|
+
this.forceRefresh = true;
|
297
|
+
mgVal = this._field.getValue(false);
|
298
|
+
}
|
299
|
+
}
|
300
|
+
if ((this._field !== null && isNull) && this._field.hasNullDisplayValue())
|
301
|
+
mgVal = newValue;
|
302
|
+
await super.SetAndRefreshDisplayValue(mgVal, isNull);
|
303
|
+
this.forceRefresh = false;
|
304
|
+
this.KeyStrokeOn = false;
|
305
|
+
}
|
306
|
+
}
|
307
|
+
getSubformTask() {
|
308
|
+
return this._subformTask;
|
309
|
+
}
|
310
|
+
resetSubformTask() {
|
311
|
+
this._subformTask = null;
|
312
|
+
this._subformTaskId = "0";
|
313
|
+
}
|
314
|
+
GetSubformMgForm() {
|
315
|
+
let form = null;
|
316
|
+
if (this._subformTask !== null)
|
317
|
+
form = this._subformTask.getForm();
|
318
|
+
return form;
|
319
|
+
}
|
320
|
+
IsTableWithAbsoluteScrollbar() {
|
321
|
+
let tableWithAbsoluteScrollbar = false;
|
322
|
+
Debug.Assert(this.Type === MgControlType.CTRL_TYPE_TABLE, "In MgControl.IsTableWithAbsoluteScrollbar(): Not a table control.");
|
323
|
+
if (this._propTab.propExists(PropInterface.PROP_TYPE_SCROLL_BAR_THUMB))
|
324
|
+
tableWithAbsoluteScrollbar = (this._propTab.getPropById(PropInterface.PROP_TYPE_SCROLL_BAR_THUMB).GetComputedValueInteger() === ScrollBarThumbType.Absolute);
|
325
|
+
return tableWithAbsoluteScrollbar;
|
326
|
+
}
|
327
|
+
static validReturnToCtrl() {
|
328
|
+
if (MgControl.ReturnToCtrl !== null && MgControl.ReturnToCtrl.getForm().getTask().isAborting())
|
329
|
+
return false;
|
330
|
+
return true;
|
331
|
+
}
|
332
|
+
maySetValue() {
|
333
|
+
switch (this.Type) {
|
334
|
+
case MgControlType.CTRL_TYPE_CHECKBOX:
|
335
|
+
case MgControlType.CTRL_TYPE_TEXT:
|
336
|
+
case MgControlType.CTRL_TYPE_COMBO:
|
337
|
+
case MgControlType.CTRL_TYPE_LIST:
|
338
|
+
case MgControlType.CTRL_TYPE_RADIO:
|
339
|
+
case MgControlType.CTRL_TYPE_TAB:
|
340
|
+
break;
|
341
|
+
default:
|
342
|
+
return false;
|
343
|
+
}
|
344
|
+
if (this._field === null || this._valExpId > 0)
|
345
|
+
return false;
|
346
|
+
return this.isModifiable();
|
347
|
+
}
|
348
|
+
async validateAndSetValueIfAllowed(NewValue, refreshDisplay) {
|
349
|
+
if (!this.maySetValue()) {
|
350
|
+
Logger.Instance.WriteErrorToLog(NString.Format("Unable to change value of control {0}: The control is read-only.", this.Name));
|
351
|
+
return false;
|
352
|
+
}
|
353
|
+
let retVal = await this.validateAndSetValue(NewValue, true);
|
354
|
+
if (!retVal)
|
355
|
+
Logger.Instance.WriteErrorToLog(NString.Format("Value validation failed for {0}.", this.Name));
|
356
|
+
if (refreshDisplay) {
|
357
|
+
Commands.addNoParameters(CommandType.REFRESH_TASK, this.getForm());
|
358
|
+
Commands.invoke();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