@magic-xpa/engine 4.1100.0-dev4110.19 → 4.1100.0-dev4110.190
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 +399 -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 +516 -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 +154 -0
- package/{esm2020 → esm2022}/src/ICommandsTable.mjs +1 -1
- package/esm2022/src/ServerConfig.mjs +118 -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 +226 -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 +2975 -0
- package/{esm2020 → esm2022}/src/event/IEventsManager.mjs +6 -6
- package/esm2022/src/event/RunTimeEvent.mjs +392 -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 +2497 -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 +29713 -29693
- package/fesm2022/magic-xpa-engine.mjs.map +1 -0
- package/index.d.ts +187 -187
- package/package.json +8 -14
- package/src/AccessHelper.d.ts +20 -20
- package/src/ClientManager.d.ts +32 -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 +515 -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 +34 -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 +204 -204
- package/src/event/IEventsManager.d.ts +77 -77
- package/src/event/RunTimeEvent.d.ts +123 -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 -2495
- package/esm2020/src/tasks/TaskBase.mjs +0 -87
- package/esm2020/src/tasks/TaskServiceBase.mjs +0 -25
- package/esm2020/src/tasks/TasksTable.mjs +0 -80
- package/esm2020/src/tasks/sort/Sort.mjs +0 -7
- package/esm2020/src/tasks/sort/SortCollection.mjs +0 -67
- package/esm2020/src/util/ConstUtils.mjs +0 -14
- package/esm2020/src/util/FlowMonitorQueue.mjs +0 -453
- package/esm2020/src/util/HeapSort.mjs +0 -70
- package/esm2020/src/util/MgPriorityBlockingQueue.mjs +0 -74
- package/esm2020/src/util/MgPriorityQueue.mjs +0 -66
- package/esm2020/src/util/PrmMap.mjs +0 -151
- package/esm2020/src/util/ReturnResult.mjs +0 -46
- package/esm2020/src/util/ReturnResultBase.mjs +0 -18
- package/esm2020/src/util/Scrambler.mjs +0 -89
- package/esm2020/src/util/UniqueIDUtils.mjs +0 -12
- package/esm2020/src/util/cookie.service.mjs +0 -92
- package/fesm2015/magic-xpa-engine.mjs +0 -30835
- package/fesm2015/magic-xpa-engine.mjs.map +0 -1
- package/fesm2020/magic-xpa-engine.mjs.map +0 -1
@@ -1,66 +0,0 @@
|
|
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
|
-
get Count() {
|
7
|
-
return this._formsStringXml.length;
|
8
|
-
}
|
9
|
-
get_Item(formDisplayIndex) {
|
10
|
-
if (formDisplayIndex > 0 && formDisplayIndex <= this._formsStringXml.length)
|
11
|
-
return this._formsStringXml.get_Item(formDisplayIndex - 1);
|
12
|
-
return null;
|
13
|
-
}
|
14
|
-
constructor(task, parentForm) {
|
15
|
-
this._task = null;
|
16
|
-
this._parentForm = null;
|
17
|
-
this._formsStringXml = null;
|
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,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiRm9ybXNUYWJsZS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uL3Byb2plY3RzL2VuZ2luZS9zcmMvZ3VpL0Zvcm1zVGFibGUudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUFDLElBQUksRUFBQyxNQUFNLHNCQUFzQixDQUFDO0FBQzFDLE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wYXJzZXIuc2V0Q3VyckluZGV4MkVuZE9mVGFnKCk7XHJcbiAgICAgIHJldHVybiB0cnVlO1xyXG4gICAgfVxyXG4gICAgZWxzZSBpZiAoZm91bmRUYWdOYW1lID09PSAoJy8nICsgWE1MQ29uc3RhbnRzLk1HX1RBR19GT1JNUykpIHtcclxuICAgICAgYXdhaXQgdGhpcy5QcmVwYXJlTWFpbkRpc3BsYXlGb3JDb25uZWN0ZWRUYXNrKCk7XHJcblxyXG4gICAgICBwYXJzZXIuc2V0Q3VyckluZGV4MkVuZE9mVGFnKCk7XHJcbiAgICAgIHJldHVybiBmYWxzZTtcclxuICAgIH1cclxuICAgIHJldHVybiB0cnVlO1xyXG4gIH1cclxuXHJcbiAgLy8vIDxzdW1tYXJ5PlxyXG4gIC8vLyBmb3IgcmVtb3RlIHRhc2sgd2UgaGF2ZSBhbGwgdGhlIGluZm9ybWF0aW9uIHRoYXQgd2UgbmVlZCB0byBjYWxjdWxhdGUgdGhlIGZvcm0gZGlzcGxheVxyXG4gIC8vLyA8L3N1bW1hcnk+XHJcbiAgcHJpdmF0ZSBhc3luYyBQcmVwYXJlTWFpbkRpc3BsYXlGb3JDb25uZWN0ZWRUYXNrKCk6IFByb21pc2U8dm9pZD4ge1xyXG4gICAgaWYgKHRoaXMuX3Rhc2suVGFza1NlcnZpY2UgaW5zdGFuY2VvZiBSZW1vdGVUYXNrU2VydmljZSlcclxuICAgICAgYXdhaXQgdGhpcy5fdGFzay5QcmVwYXJlVGFza0Zvcm0oKTtcclxuICB9XHJcbn1cclxuIl19
|
@@ -1,353 +0,0 @@
|
|
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
|
-
initialize() {
|
10
|
-
this._focusedStopExecution = false;
|
11
|
-
this._inControlSuffix = false;
|
12
|
-
this._rtEvtTask = null;
|
13
|
-
this._subformTaskId = null;
|
14
|
-
this._subformTask = null;
|
15
|
-
this.IsInteractiveUpdate = false;
|
16
|
-
this.refreshOnString = null;
|
17
|
-
this.SubformLoaded = false;
|
18
|
-
this.HasZoomHandler = false;
|
19
|
-
this.ArgList = null;
|
20
|
-
}
|
21
|
-
constructor(type, taskOrParentMgForm, parentControlOrParentControlIdx) {
|
22
|
-
if (arguments.length === 0)
|
23
|
-
super();
|
24
|
-
else if (arguments.length === 3 && (type === null || type.constructor === Number) && (taskOrParentMgForm === null || taskOrParentMgForm instanceof TaskBase) && (parentControlOrParentControlIdx === null || parentControlOrParentControlIdx.constructor === Number))
|
25
|
-
super(type, taskOrParentMgForm.getForm(), parentControlOrParentControlIdx);
|
26
|
-
else
|
27
|
-
super(type, taskOrParentMgForm, parentControlOrParentControlIdx);
|
28
|
-
this.initialize();
|
29
|
-
}
|
30
|
-
GetVarIndex() {
|
31
|
-
return super.getForm().getTask().DataView.Dvcount + this.veeIndx;
|
32
|
-
}
|
33
|
-
async fillData(mgForm, ditIdx, parser) {
|
34
|
-
super.fillData(mgForm, ditIdx, parser);
|
35
|
-
this.ArgList = await this.GetArgumentList();
|
36
|
-
}
|
37
|
-
SetAttribute(attribute, valueStr) {
|
38
|
-
let isTagProcessed = super.SetAttribute(attribute, valueStr);
|
39
|
-
if (!isTagProcessed) {
|
40
|
-
switch (attribute) {
|
41
|
-
case ConstInterface.MG_ATTR_SUBFORM_TASK:
|
42
|
-
if (valueStr.trim() != "")
|
43
|
-
this._subformTaskId = valueStr;
|
44
|
-
break;
|
45
|
-
case ConstInterface.MG_ATTR_REFRESHON:
|
46
|
-
this.refreshOnString = valueStr.trim();
|
47
|
-
break;
|
48
|
-
default:
|
49
|
-
isTagProcessed = false;
|
50
|
-
Logger.Instance.WriteExceptionToLogWithMsg(NString.Format("Unrecognized attribute: '{0}'", attribute));
|
51
|
-
break;
|
52
|
-
}
|
53
|
-
}
|
54
|
-
return isTagProcessed;
|
55
|
-
}
|
56
|
-
async GetArgumentList() {
|
57
|
-
let argList = null;
|
58
|
-
if (this._propTab === null)
|
59
|
-
return argList;
|
60
|
-
let ArgListProp = this._propTab.getPropById(PropInterface.PROP_TYPE_PARAMETERS);
|
61
|
-
if (ArgListProp === null)
|
62
|
-
return argList;
|
63
|
-
let parms = await ArgListProp.getValue();
|
64
|
-
if (parms !== null) {
|
65
|
-
argList = new ArgumentsList();
|
66
|
-
argList.fillList(parms, super.getForm().getTask());
|
67
|
-
if (this.refreshOnString !== null)
|
68
|
-
argList.RefreshOnString = this.refreshOnString;
|
69
|
-
}
|
70
|
-
return argList;
|
71
|
-
}
|
72
|
-
isDescendent(parentForm) {
|
73
|
-
let isDescendent = false;
|
74
|
-
let checkCurrentForm = super.getForm();
|
75
|
-
Debug.Assert(parentForm !== null);
|
76
|
-
while (!isDescendent && checkCurrentForm !== null) {
|
77
|
-
if (parentForm === checkCurrentForm)
|
78
|
-
isDescendent = true;
|
79
|
-
else {
|
80
|
-
let currTask = checkCurrentForm.getTask();
|
81
|
-
if (currTask.getParent() !== null)
|
82
|
-
checkCurrentForm = currTask.getParent().getForm();
|
83
|
-
else
|
84
|
-
break;
|
85
|
-
}
|
86
|
-
}
|
87
|
-
return isDescendent;
|
88
|
-
}
|
89
|
-
async refreshOnExpression() {
|
90
|
-
let i;
|
91
|
-
let size = (this._propTab === null ? 0 : this._propTab.getSize());
|
92
|
-
let prop;
|
93
|
-
let refresh = false;
|
94
|
-
for (i = 0; i < size && !refresh; i++) {
|
95
|
-
prop = this._propTab.getProp(i);
|
96
|
-
switch (prop.getID()) {
|
97
|
-
case PropInterface.PROP_TYPE_DATA:
|
98
|
-
if (!prop.isExpression() && this._field !== null && this._field.getTask() !== this.getForm().getTask()) {
|
99
|
-
refresh = true;
|
100
|
-
break;
|
101
|
-
}
|
102
|
-
case PropInterface.PROP_TYPE_FORMAT:
|
103
|
-
case PropInterface.PROP_TYPE_VISIBLE:
|
104
|
-
case PropInterface.PROP_TYPE_ENABLED:
|
105
|
-
case PropInterface.PROP_TYPE_RANGE:
|
106
|
-
case PropInterface.PROP_TYPE_TRANSLATOR:
|
107
|
-
if (prop.isExpression())
|
108
|
-
refresh = true;
|
109
|
-
break;
|
110
|
-
default:
|
111
|
-
break;
|
112
|
-
}
|
113
|
-
if (refresh)
|
114
|
-
await this.RefreshDisplay();
|
115
|
-
}
|
116
|
-
}
|
117
|
-
async invoke() {
|
118
|
-
let invoked = false;
|
119
|
-
if (await this.isParkable(true)) {
|
120
|
-
await AccessHelper.eventsManager.handleInternalEventWithMgControlBase(this, InternalInterface.MG_ACT_CTRL_PREFIX);
|
121
|
-
invoked = true;
|
122
|
-
}
|
123
|
-
return invoked;
|
124
|
-
}
|
125
|
-
async isParkable(checkEnabledAndVisible) {
|
126
|
-
let result = !super.isImageControl();
|
127
|
-
if (result) {
|
128
|
-
await super.checkProp(PropInterface.PROP_TYPE_ENABLED, true);
|
129
|
-
await super.checkProp(PropInterface.PROP_TYPE_VISIBLE, true);
|
130
|
-
result = await super.isParkable(checkEnabledAndVisible);
|
131
|
-
}
|
132
|
-
return result;
|
133
|
-
}
|
134
|
-
getSubformTaskId() {
|
135
|
-
return this._subformTaskId;
|
136
|
-
}
|
137
|
-
initSubformTask() {
|
138
|
-
if (super.isSubform())
|
139
|
-
this._subformTask = GuiDataCollection.MGDataTable.GetTaskByID(this._subformTaskId);
|
140
|
-
}
|
141
|
-
getParentTable() {
|
142
|
-
return this._parentTable;
|
143
|
-
}
|
144
|
-
async restoreOldValue() {
|
145
|
-
if (this._field !== null)
|
146
|
-
await this._field.updateDisplay();
|
147
|
-
else {
|
148
|
-
super.resetPrevVal();
|
149
|
-
await super.SetAndRefreshDisplayValue(await this.getMgValue(this.Value), this.IsNull);
|
150
|
-
}
|
151
|
-
}
|
152
|
-
setRtEvtTask(curTask) {
|
153
|
-
this._rtEvtTask = curTask;
|
154
|
-
}
|
155
|
-
getRtEvtTask() {
|
156
|
-
return this._rtEvtTask;
|
157
|
-
}
|
158
|
-
setSubformTaskId(taskId) {
|
159
|
-
this._subformTaskId = taskId;
|
160
|
-
}
|
161
|
-
isFocusedStopExecution() {
|
162
|
-
return this._focusedStopExecution;
|
163
|
-
}
|
164
|
-
setFocusedStopExecution(focusedStopExecution) {
|
165
|
-
this._focusedStopExecution = focusedStopExecution;
|
166
|
-
}
|
167
|
-
onTheSameSubFormControl(ctrl) {
|
168
|
-
let retValue = false;
|
169
|
-
if (ctrl !== null) {
|
170
|
-
if (super.getForm().isSubForm() && ctrl.getForm().isSubForm()) {
|
171
|
-
if (super.getForm().getTask() === ctrl.getForm().getTask())
|
172
|
-
retValue = true;
|
173
|
-
}
|
174
|
-
}
|
175
|
-
return retValue;
|
176
|
-
}
|
177
|
-
onDiffForm(ctrl) {
|
178
|
-
let isSubform = super.getForm().isSubForm() || ctrl.getForm().isSubForm();
|
179
|
-
let isOnDiffForm = (isSubform) && !this.onTheSameSubFormControl(ctrl);
|
180
|
-
return isOnDiffForm;
|
181
|
-
}
|
182
|
-
isInControlSuffix() {
|
183
|
-
return this._inControlSuffix;
|
184
|
-
}
|
185
|
-
setInControlSuffix(inControlSuffix) {
|
186
|
-
this._inControlSuffix = inControlSuffix;
|
187
|
-
}
|
188
|
-
HasSelectProgram() {
|
189
|
-
let HasSelectProgram = false;
|
190
|
-
let selectProgProp = super.GetComputedProperty(PropInterface.PROP_TYPE_SELECT_PROGRAM);
|
191
|
-
if (selectProgProp !== null && selectProgProp.GetComputedValue() !== null)
|
192
|
-
HasSelectProgram = true;
|
193
|
-
return HasSelectProgram;
|
194
|
-
}
|
195
|
-
useZoomHandler() {
|
196
|
-
return this.HasZoomHandler || (super.getField() !== null && (super.getField().getHasZoomHandler() || (this.HasSelectProgram())));
|
197
|
-
}
|
198
|
-
async updatePropertyLogicNesting(propId, commandType, val, updateThis) {
|
199
|
-
if (val && super.haveToCheckParentValue())
|
200
|
-
val = super.isParentPropValue(propId);
|
201
|
-
if (val && super.isSubform() && commandType === CommandType.PROP_SET_VISIBLE && this.ShouldSetSubformInvisible())
|
202
|
-
val = false;
|
203
|
-
if (updateThis) {
|
204
|
-
Commands.addOperationWithLine(CommandType.SET_PROPERTY, this, super.getDisplayLine(false), commandType === CommandType.PROP_SET_VISIBLE ? HtmlProperties.Visible : HtmlProperties.Enabled, val);
|
205
|
-
}
|
206
|
-
await super.updateChildrenPropValue(propId, commandType, val);
|
207
|
-
}
|
208
|
-
ShouldSetSubformInvisible() {
|
209
|
-
let setInvisible = false;
|
210
|
-
let subformType = super.GetComputedProperty(PropInterface.PROP_TYPE_SUBFORM_TYPE).GetComputedValueInteger();
|
211
|
-
if (subformType === SubformType.None && this.getSubformTaskId() === null)
|
212
|
-
setInvisible = true;
|
213
|
-
return setInvisible;
|
214
|
-
}
|
215
|
-
async updateSubformChildrenPropValue(propId, commandType, val) {
|
216
|
-
Debug.Assert(super.isSubform());
|
217
|
-
if (!super.getForm().getTask().AfterFirstRecordPrefix)
|
218
|
-
return;
|
219
|
-
let subformType = super.GetComputedProperty(PropInterface.PROP_TYPE_SUBFORM_TYPE).GetComputedValueInteger();
|
220
|
-
if (this._subformTaskId !== null || subformType === SubformType.None) {
|
221
|
-
if (this._subformTask !== null && this._subformTask.isStarted()) {
|
222
|
-
this.SubformLoaded = true;
|
223
|
-
if (commandType === CommandType.PROP_SET_VISIBLE && val && this.RefreshOnVisible) {
|
224
|
-
this.RefreshOnVisible = false;
|
225
|
-
await super.getForm().getTask().SubformRefresh(this._subformTask, true);
|
226
|
-
}
|
227
|
-
let subformForm = this._subformTask.getForm();
|
228
|
-
for (let i = 0; i < subformForm.getCtrlCount(); i++) {
|
229
|
-
let child = subformForm.getCtrl(i);
|
230
|
-
if (!child.isColumnControl())
|
231
|
-
continue;
|
232
|
-
let childValue = await child.checkProp(propId, true) && val;
|
233
|
-
if (childValue)
|
234
|
-
childValue = child.isParentPropValue(propId);
|
235
|
-
await child.updateChildrenPropValue(propId, commandType, childValue);
|
236
|
-
}
|
237
|
-
}
|
238
|
-
}
|
239
|
-
else if ((commandType === CommandType.PROP_SET_VISIBLE && val) && !this.SubformLoaded) {
|
240
|
-
this.SubformLoaded = true;
|
241
|
-
await AccessHelper.eventsManager.handleInternalEventWithMgControlBase(this, InternalInterface.MG_ACT_SUBFORM_OPEN);
|
242
|
-
}
|
243
|
-
}
|
244
|
-
Init() {
|
245
|
-
this.initSubformTask();
|
246
|
-
}
|
247
|
-
GetTableBehaviour() {
|
248
|
-
return TableBehaviour.UnlimitedItems;
|
249
|
-
}
|
250
|
-
async validateAndSetValue(NewValue, updateCtrl) {
|
251
|
-
super.UpdateModifiedByUser(NewValue);
|
252
|
-
if (this.ModifiedByUser) {
|
253
|
-
let ctrlCurrValue = this.Value;
|
254
|
-
let vd;
|
255
|
-
if (super.getPIC() === null)
|
256
|
-
return true;
|
257
|
-
vd = super.buildPicture(ctrlCurrValue, NewValue);
|
258
|
-
vd.evaluate();
|
259
|
-
if (vd.ValidationFailed) {
|
260
|
-
this.ModifiedByUser = false;
|
261
|
-
return false;
|
262
|
-
}
|
263
|
-
this.IsInteractiveUpdate = true;
|
264
|
-
super.getForm().getTask().setDataSynced(false);
|
265
|
-
if (updateCtrl) {
|
266
|
-
if (this._field !== null && this._field.getType() === StorageAttribute.NUMERIC && typeof NewValue === 'string' && NewValue.trim().length > 0)
|
267
|
-
vd.setValue(NewValue);
|
268
|
-
await this.setValue(vd);
|
269
|
-
}
|
270
|
-
}
|
271
|
-
return true;
|
272
|
-
}
|
273
|
-
async setValue(vd) {
|
274
|
-
let isNull = vd.getIsNull();
|
275
|
-
let newValue = vd.getDispValue();
|
276
|
-
let mgVal;
|
277
|
-
if (!isNull || !this._field.hasNullDisplayValue())
|
278
|
-
mgVal = await super.getMgValue(newValue);
|
279
|
-
else
|
280
|
-
mgVal = ((this._field.getType() === StorageAttribute.BLOB_VECTOR) ? this._field.getCellDefualtValue() : this._field.getDefaultValue());
|
281
|
-
if (mgVal !== null) {
|
282
|
-
if (this._field !== null && (!(newValue === this.Value) || this.KeyStrokeOn || this.IsNull !== isNull)) {
|
283
|
-
await this._field.setValueAndStartRecompute(mgVal, isNull, true, true, false);
|
284
|
-
if (super.isCheckBox()) {
|
285
|
-
this.forceRefresh = true;
|
286
|
-
mgVal = this._field.getValue(false);
|
287
|
-
}
|
288
|
-
}
|
289
|
-
if ((this._field !== null && isNull) && this._field.hasNullDisplayValue())
|
290
|
-
mgVal = newValue;
|
291
|
-
await super.SetAndRefreshDisplayValue(mgVal, isNull);
|
292
|
-
this.forceRefresh = false;
|
293
|
-
this.KeyStrokeOn = false;
|
294
|
-
}
|
295
|
-
}
|
296
|
-
getSubformTask() {
|
297
|
-
return this._subformTask;
|
298
|
-
}
|
299
|
-
resetSubformTask() {
|
300
|
-
this._subformTask = null;
|
301
|
-
this._subformTaskId = "0";
|
302
|
-
}
|
303
|
-
GetSubformMgForm() {
|
304
|
-
let form = null;
|
305
|
-
if (this._subformTask !== null)
|
306
|
-
form = this._subformTask.getForm();
|
307
|
-
return form;
|
308
|
-
}
|
309
|
-
IsTableWithAbsoluteScrollbar() {
|
310
|
-
let tableWithAbsoluteScrollbar = false;
|
311
|
-
Debug.Assert(this.Type === MgControlType.CTRL_TYPE_TABLE, "In MgControl.IsTableWithAbsoluteScrollbar(): Not a table control.");
|
312
|
-
if (this._propTab.propExists(PropInterface.PROP_TYPE_SCROLL_BAR_THUMB))
|
313
|
-
tableWithAbsoluteScrollbar = (this._propTab.getPropById(PropInterface.PROP_TYPE_SCROLL_BAR_THUMB).GetComputedValueInteger() === ScrollBarThumbType.Absolute);
|
314
|
-
return tableWithAbsoluteScrollbar;
|
315
|
-
}
|
316
|
-
static validReturnToCtrl() {
|
317
|
-
if (MgControl.ReturnToCtrl !== null && MgControl.ReturnToCtrl.getForm().getTask().isAborting())
|
318
|
-
return false;
|
319
|
-
return true;
|
320
|
-
}
|
321
|
-
maySetValue() {
|
322
|
-
switch (this.Type) {
|
323
|
-
case MgControlType.CTRL_TYPE_CHECKBOX:
|
324
|
-
case MgControlType.CTRL_TYPE_TEXT:
|
325
|
-
case MgControlType.CTRL_TYPE_COMBO:
|
326
|
-
case MgControlType.CTRL_TYPE_LIST:
|
327
|
-
case MgControlType.CTRL_TYPE_RADIO:
|
328
|
-
case MgControlType.CTRL_TYPE_TAB:
|
329
|
-
break;
|
330
|
-
default:
|
331
|
-
return false;
|
332
|
-
}
|
333
|
-
if (this._field === null || this._valExpId > 0)
|
334
|
-
return false;
|
335
|
-
return this.isModifiable();
|
336
|
-
}
|
337
|
-
async validateAndSetValueIfAllowed(NewValue, refreshDisplay) {
|
338
|
-
if (!this.maySetValue()) {
|
339
|
-
Logger.Instance.WriteErrorToLog(NString.Format("Unable to change value of control {0}: The control is read-only.", this.Name));
|
340
|
-
return false;
|
341
|
-
}
|
342
|
-
let retVal = await this.validateAndSetValue(NewValue, true);
|
343
|
-
if (!retVal)
|
344
|
-
Logger.Instance.WriteErrorToLog(NString.Format("Value validation failed for {0}.", this.Name));
|
345
|
-
if (refreshDisplay) {
|
346
|
-
Commands.addNoParameters(CommandType.REFRESH_TASK, this.getForm());
|
347
|
-
Commands.invoke();
|
348
|
-
}
|
349
|
-
return retVal;
|
350
|
-
}
|
351
|
-
}
|
352
|
-
MgControl.ReturnToCtrl = null;
|
353
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiTWdDb250cm9sLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vcHJvamVjdHMvZW5naW5lL3NyYy9ndWkvTWdDb250cm9sLnRzIl0sIm5hbWVzIjpbXSwibWFw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