@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
@@ -0,0 +1,646 @@
|
|
1
|
+
import { ApplicationException, Debug, List, NNumber, NString, RefParam, isNullOrUndefined } from "@magic-xpa/mscorelib";
|
2
|
+
import { Constants, InternalInterface, Logger, MsgInterface, PICInterface, StorageAttribute, StrUtil, UtilStrByteMode, XMLConstants, XmlParser } from "@magic-xpa/utils";
|
3
|
+
import { BlobType, DisplayConvertor, ExpVal, FieldDef, NUM_TYPE, PIC, VectorType } from "@magic-xpa/gui";
|
4
|
+
import { YesNoExp } from "../exp/YesNoExp";
|
5
|
+
import { ExpressionEvaluator } from "../exp/ExpressionEvaluator";
|
6
|
+
import { Recompute, Recompute_RcmpBy } from "../rt/Recompute";
|
7
|
+
import { Boundary } from "../rt/Boundary";
|
8
|
+
import { ArgumentsList } from "../rt/ArgumentsList";
|
9
|
+
import { ConstInterface } from "../ConstInterface";
|
10
|
+
import { RunTimeEvent } from "../event/RunTimeEvent";
|
11
|
+
import { Record } from "./Record";
|
12
|
+
import { Environment } from "../env/Environment";
|
13
|
+
import { FieldBase } from "./FieldBase";
|
14
|
+
import { LastFocusedManager } from "../rt/LastFocusedManager";
|
15
|
+
import { LanguageData } from "../env/LanguageData";
|
16
|
+
import { AccessHelper } from "../AccessHelper";
|
17
|
+
export class Field extends FieldBase {
|
18
|
+
static LEAVE_FLAGS = false;
|
19
|
+
static NUM0 = null;
|
20
|
+
static NUM1 = null;
|
21
|
+
_linkExp = null;
|
22
|
+
_recompute = null;
|
23
|
+
CacheTableFldIdx = 0;
|
24
|
+
_causeTableInvalidation = false;
|
25
|
+
_form = null;
|
26
|
+
_hasChangeEvent = false;
|
27
|
+
_hasZoomHandler = false;
|
28
|
+
_inEvalProcess = false;
|
29
|
+
_initExp = null;
|
30
|
+
_invalidValue = true;
|
31
|
+
_isLinkFld = false;
|
32
|
+
_isVirtual = false;
|
33
|
+
_dataviewHeaderId = -1;
|
34
|
+
_linkCreate = false;
|
35
|
+
Locate = null;
|
36
|
+
Range = null;
|
37
|
+
_isParam = false;
|
38
|
+
_isExposedRouteParam = false;
|
39
|
+
_isExposedToClient = true;
|
40
|
+
_prevIsNull = false;
|
41
|
+
_prevValue = null;
|
42
|
+
_tableName = null;
|
43
|
+
_indexInTable = -1;
|
44
|
+
_virAsReal = false;
|
45
|
+
_val = null;
|
46
|
+
modifiedAtLeastOnce = false;
|
47
|
+
_isNull = false;
|
48
|
+
_clearVectorType = true;
|
49
|
+
_vectorType = null;
|
50
|
+
static _variableChangeEvts = new List();
|
51
|
+
constructor(dataview, id) {
|
52
|
+
super(id);
|
53
|
+
if (Field.NUM0 === null) {
|
54
|
+
Field.NUM0 = new NUM_TYPE();
|
55
|
+
Field.NUM1 = new NUM_TYPE();
|
56
|
+
Field.NUM0.NUM_4_LONG(0);
|
57
|
+
Field.NUM1.NUM_4_LONG(1);
|
58
|
+
}
|
59
|
+
this._dataview = dataview;
|
60
|
+
this._linkExp = new YesNoExp(false);
|
61
|
+
FieldDef._default_date = DisplayConvertor.Instance.disp2mg(PICInterface.DEFAULT_DATE, new PIC("6", StorageAttribute.NUMERIC, super.getTask().getCompIdx()), super.getTask().getCompIdx(), BlobType.CONTENT_TYPE_UNKNOWN);
|
62
|
+
}
|
63
|
+
get VirAsReal() {
|
64
|
+
return this._virAsReal;
|
65
|
+
}
|
66
|
+
get IsVirtual() {
|
67
|
+
return this._isVirtual;
|
68
|
+
}
|
69
|
+
get IsExposedRouteParam() {
|
70
|
+
return this._isExposedRouteParam;
|
71
|
+
}
|
72
|
+
get IsExposedToClient() {
|
73
|
+
return this._isExposedToClient;
|
74
|
+
}
|
75
|
+
get IndexInTable() {
|
76
|
+
return this._indexInTable;
|
77
|
+
}
|
78
|
+
setAttribute(attribute, valueStr) {
|
79
|
+
let isTagProcessed = super.setAttribute(attribute, valueStr);
|
80
|
+
if (!isTagProcessed) {
|
81
|
+
let data = StrUtil.tokenize(valueStr, ",");
|
82
|
+
isTagProcessed = true;
|
83
|
+
switch (attribute) {
|
84
|
+
case ConstInterface.MG_ATTR_VIRTUAL:
|
85
|
+
this._isVirtual = (XmlParser.getInt(valueStr) !== 0);
|
86
|
+
break;
|
87
|
+
case ConstInterface.MG_ATTR_PARAM:
|
88
|
+
this._isParam = (XmlParser.getInt(valueStr) !== 0);
|
89
|
+
if (!this._isVirtual && this._isParam)
|
90
|
+
throw new ApplicationException("in Field.initElements(): non virtual field is defined as a parameter");
|
91
|
+
break;
|
92
|
+
case ConstInterface.MG_ATTR_EXPOSED_ROUTE_PARAMS:
|
93
|
+
this._isExposedRouteParam = (XmlParser.getInt(valueStr) !== 0);
|
94
|
+
if (!this._isParam && this._isExposedRouteParam)
|
95
|
+
throw new ApplicationException("in Field.initElements(): non parameter field is defined as a exposed route parameter");
|
96
|
+
break;
|
97
|
+
case ConstInterface.MG_ATTR_EXPOSED_TO_CLIENT:
|
98
|
+
if (XmlParser.getInt(valueStr) == 0)
|
99
|
+
this._isExposedToClient = false;
|
100
|
+
break;
|
101
|
+
case ConstInterface.MG_ATTR_VIR_AS_REAL:
|
102
|
+
this._virAsReal = XmlParser.getBoolean(valueStr);
|
103
|
+
break;
|
104
|
+
case ConstInterface.MG_ATTR_LNK_CREATE:
|
105
|
+
this._linkCreate = XmlParser.getBoolean(valueStr);
|
106
|
+
break;
|
107
|
+
case ConstInterface.MG_ATTR_LNKEXP:
|
108
|
+
this._linkExp.setVal((this.getTask()), valueStr);
|
109
|
+
break;
|
110
|
+
case ConstInterface.MG_ATTR_TABLE_NAME:
|
111
|
+
this._tableName = XmlParser.unescape(valueStr);
|
112
|
+
break;
|
113
|
+
case ConstInterface.MG_ATTR_INDEX_IN_TABLE:
|
114
|
+
this._indexInTable = XmlParser.getInt(valueStr);
|
115
|
+
break;
|
116
|
+
case ConstInterface.MG_ATTR_INIT:
|
117
|
+
let expNum = XmlParser.getInt(valueStr);
|
118
|
+
this._initExp = this.getTask().getExpById(expNum);
|
119
|
+
break;
|
120
|
+
case XMLConstants.MG_ATTR_NAME:
|
121
|
+
{
|
122
|
+
}
|
123
|
+
break;
|
124
|
+
case ConstInterface.MG_ATTR_CHACHED_FLD_ID:
|
125
|
+
if (data[0] != "")
|
126
|
+
this.CacheTableFldIdx = NNumber.Parse(data[1]);
|
127
|
+
break;
|
128
|
+
case ConstInterface.MG_ATTR_LOCATE:
|
129
|
+
this.Locate = new Boundary(this.getTask(), NNumber.Parse(data[1]), NNumber.Parse(data[0]), this.getType(), this.getSize(), this.CacheTableFldIdx);
|
130
|
+
break;
|
131
|
+
case ConstInterface.MG_ATTR_RANGE:
|
132
|
+
this.Range = new Boundary(this.getTask(), NNumber.Parse(data[1]), NNumber.Parse(data[0]), this.getType(), this.getSize(), this.CacheTableFldIdx);
|
133
|
+
break;
|
134
|
+
case ConstInterface.MG_ATTR_LINK:
|
135
|
+
this._dataviewHeaderId = NNumber.Parse(valueStr);
|
136
|
+
break;
|
137
|
+
case ConstInterface.MG_ATTR_IS_LINK_FIELD:
|
138
|
+
this._isLinkFld = XmlParser.getBoolean(valueStr);
|
139
|
+
break;
|
140
|
+
default:
|
141
|
+
isTagProcessed = false;
|
142
|
+
Logger.Instance.WriteExceptionToLogWithMsg(NString.Format("Unrecognized attribute: '{0}'", attribute));
|
143
|
+
break;
|
144
|
+
}
|
145
|
+
}
|
146
|
+
return isTagProcessed;
|
147
|
+
}
|
148
|
+
setRecompute(recompRef) {
|
149
|
+
this._recompute = recompRef;
|
150
|
+
}
|
151
|
+
RemoveSubformFromRecompute(subformTask) {
|
152
|
+
if (this._recompute !== null) {
|
153
|
+
this._recompute.RemoveSubform(subformTask);
|
154
|
+
}
|
155
|
+
}
|
156
|
+
AddSubformRecompute(subformTask) {
|
157
|
+
if (this._recompute === null) {
|
158
|
+
this._recompute = new Recompute();
|
159
|
+
this._recompute.Task = super.getTask();
|
160
|
+
this._recompute.OwnerFld = this;
|
161
|
+
this._recompute.RcmpMode = Recompute_RcmpBy.CLIENT;
|
162
|
+
}
|
163
|
+
this._recompute.AddSubform(subformTask);
|
164
|
+
}
|
165
|
+
SetControl(ctrl) {
|
166
|
+
super.SetControl(ctrl);
|
167
|
+
if (this._isVirtual && ctrl.IsRepeatable && this._initExp === null) {
|
168
|
+
this._causeTableInvalidation = true;
|
169
|
+
}
|
170
|
+
}
|
171
|
+
async compute(recompute) {
|
172
|
+
let result = new RefParam(this.getValue(false));
|
173
|
+
let isNullFld = new RefParam(this._isNull);
|
174
|
+
let rec = this._dataview.getCurrRec();
|
175
|
+
let task = super.getTask();
|
176
|
+
let zeroReal = this._linkCreate && rec.InCompute && !recompute && task.getMode() === Constants.TASK_MODE_CREATE;
|
177
|
+
if (this._form == null)
|
178
|
+
this._form = task.getForm();
|
179
|
+
if ((this._form != null && this._form.InRestore) || AccessHelper.eventsManager.GetStopExecutionFlag())
|
180
|
+
zeroReal = false;
|
181
|
+
let rtEvt = AccessHelper.eventsManager.getLastRtEvent();
|
182
|
+
let computeOnCancelEvent = false;
|
183
|
+
if (rtEvt != null)
|
184
|
+
computeOnCancelEvent = rtEvt.getInternalCode() === InternalInterface.MG_ACT_CANCEL;
|
185
|
+
if (!this._virAsReal && (this._form == null || !this._form.InRestore) &&
|
186
|
+
((this._isVirtual || (task.getMode() === Constants.TASK_MODE_CREATE && computeOnCancelEvent)) || recompute ||
|
187
|
+
zeroReal || rec.isNewRec() && !rec.isComputed())) {
|
188
|
+
if (!task.DataView.isEmptyDataview() || (task.DataView.isEmptyDataview() && !this.PartOfDataview)) {
|
189
|
+
if ((this._isVirtual || task.getMode() === Constants.TASK_MODE_CREATE) || this._dataview.computeByClient() ||
|
190
|
+
!rec.InCompute || zeroReal || rec.lateCompute()) {
|
191
|
+
if (this._initExp != null) {
|
192
|
+
await this.EvaluateInitExpression(result, isNullFld);
|
193
|
+
}
|
194
|
+
else if (zeroReal)
|
195
|
+
result.value = this.getDefaultValue();
|
196
|
+
}
|
197
|
+
}
|
198
|
+
}
|
199
|
+
if (this._invalidValue) {
|
200
|
+
this._prevValue = result.value;
|
201
|
+
this._prevIsNull = isNullFld.value;
|
202
|
+
}
|
203
|
+
await this.setValue(result.value, isNullFld.value, recompute, false, recompute && !this._isVirtual, false, false);
|
204
|
+
}
|
205
|
+
async EvaluateInitExpression(result, isNullFld) {
|
206
|
+
Debug.Assert(this._initExp !== null);
|
207
|
+
try {
|
208
|
+
this._inEvalProcess = true;
|
209
|
+
result.value = await this._initExp.evaluateWithResultTypeAndLength(this._type, this._size);
|
210
|
+
}
|
211
|
+
finally {
|
212
|
+
this._inEvalProcess = false;
|
213
|
+
}
|
214
|
+
isNullFld.value = (result.value === null);
|
215
|
+
if (isNullFld.value && this.NullAllowed) {
|
216
|
+
result.value = this.getValue(false);
|
217
|
+
}
|
218
|
+
}
|
219
|
+
getValue(checkNullArithmetic) {
|
220
|
+
if (super.getTask().getEvalOldValues())
|
221
|
+
return this.getOriginalValue();
|
222
|
+
if (this._invalidValue)
|
223
|
+
this.takeValFromRec();
|
224
|
+
if (this._isNull)
|
225
|
+
this._val = this.getValueForNull(checkNullArithmetic);
|
226
|
+
return this._val;
|
227
|
+
}
|
228
|
+
isChanged(newValue, isNull) {
|
229
|
+
return this._prevValue !== null && (!(this._prevValue === newValue) || this._prevIsNull !== isNull);
|
230
|
+
}
|
231
|
+
takeValFromRec() {
|
232
|
+
let rec = this._dataview.getCurrRec();
|
233
|
+
if (rec !== null) {
|
234
|
+
this._val = rec.GetFieldValue(this._id);
|
235
|
+
this._isNull = rec.IsNull(this._id);
|
236
|
+
}
|
237
|
+
if (this._invalidValue) {
|
238
|
+
if (rec !== null && this._causeTableInvalidation && this.isChanged(this._val, this._isNull) && this._form !== null) {
|
239
|
+
rec.setCauseInvalidation(true);
|
240
|
+
}
|
241
|
+
this._prevValue = this._val;
|
242
|
+
this._prevIsNull = this._isNull;
|
243
|
+
this._invalidValue = false;
|
244
|
+
}
|
245
|
+
this._vectorType = null;
|
246
|
+
}
|
247
|
+
getOriginalValue() {
|
248
|
+
let originalRec = this._dataview.getOriginalRec();
|
249
|
+
if (originalRec.IsNull(this._id))
|
250
|
+
return this.getMagicDefaultValue();
|
251
|
+
return originalRec.GetFieldValue(this._id);
|
252
|
+
}
|
253
|
+
isOriginalValueNull() {
|
254
|
+
let originalRec = this._dataview.getOriginalRec();
|
255
|
+
return originalRec.IsNull(this._id);
|
256
|
+
}
|
257
|
+
getValueByRecIdx(idx) {
|
258
|
+
let rec = this._dataview.getRecByIdx(idx);
|
259
|
+
let fieldValue = rec.GetFieldValue(this._id);
|
260
|
+
return rec.IsNull(this._id) ? this.getValueForNull(false) : fieldValue;
|
261
|
+
}
|
262
|
+
getModifiedAtLeastOnce() {
|
263
|
+
return this.modifiedAtLeastOnce;
|
264
|
+
}
|
265
|
+
isNullByRecIdx(idx) {
|
266
|
+
let rec = this._dataview.getRecByIdx(idx);
|
267
|
+
return rec.IsNull(this._id);
|
268
|
+
}
|
269
|
+
isEqual(mgValue, isNullFld, type, recIdx) {
|
270
|
+
let rec = (this._dataview.getRecByIdx(recIdx));
|
271
|
+
let valsEqual = false;
|
272
|
+
if (rec != null) {
|
273
|
+
let fieldValue = rec.GetFieldValue(this._id);
|
274
|
+
let fielsIsNull = rec.IsNull(this._id);
|
275
|
+
valsEqual = ExpressionEvaluator.mgValsEqual(fieldValue, fielsIsNull, this._type, mgValue, isNullFld, type);
|
276
|
+
}
|
277
|
+
return valsEqual;
|
278
|
+
}
|
279
|
+
getNewRecValue(clobberedOnly) {
|
280
|
+
if (this._isVirtual && this._initExp == null)
|
281
|
+
return this._val;
|
282
|
+
return !clobberedOnly ? this.getDefaultValue() : null;
|
283
|
+
}
|
284
|
+
async setValueAndStartRecompute(val, isNullFld, recompute, setRecordUpdated, isArgUpdate, enforceVariableChange) {
|
285
|
+
if (isNullOrUndefined(enforceVariableChange))
|
286
|
+
enforceVariableChange = false;
|
287
|
+
await this.setValueAndStartRecompute_1(val, isNullFld, recompute, setRecordUpdated, isArgUpdate, false);
|
288
|
+
}
|
289
|
+
async setValueAndStartRecompute_1(val, isNullFld, recompute, setRecordUpdated, isArgUpdate, enforceVariableChange) {
|
290
|
+
let task = this.getTask();
|
291
|
+
if (task != null)
|
292
|
+
task.VewFirst++;
|
293
|
+
let valueWasUpdated = await this.setValue(val, isNullFld, recompute, setRecordUpdated, !this._isVirtual, isArgUpdate, enforceVariableChange);
|
294
|
+
if (task !== null && task.VewFirst === 1 && this._form !== null && !this.IsEventHandlerField) {
|
295
|
+
if (recompute && valueWasUpdated)
|
296
|
+
await this._form.refreshOnExpressions();
|
297
|
+
}
|
298
|
+
if (task != null)
|
299
|
+
task.VewFirst--;
|
300
|
+
}
|
301
|
+
async setValue(newVal, isNullFld, recompute, setRecordModified, setCrsrModified, isArgUpdate, enforceValiableChange) {
|
302
|
+
let rec;
|
303
|
+
let recFldVal;
|
304
|
+
let valsEqual = false;
|
305
|
+
let remainder;
|
306
|
+
let zeroReal;
|
307
|
+
let args = null;
|
308
|
+
let mainCtrl = this.getCtrl();
|
309
|
+
let pendingEvents;
|
310
|
+
let evts;
|
311
|
+
let forceUpdate = false;
|
312
|
+
let checkForVariableChange = recompute || enforceValiableChange;
|
313
|
+
let task = this.getTask();
|
314
|
+
if (this._form === null)
|
315
|
+
this._form = task.getForm();
|
316
|
+
if (isNullFld && !this.NullAllowed && this._type !== StorageAttribute.BLOB_VECTOR) {
|
317
|
+
newVal = this.getDefaultValue();
|
318
|
+
isNullFld = false;
|
319
|
+
}
|
320
|
+
if (this._type === StorageAttribute.NUMERIC && newVal != null && !NUM_TYPE.numHexStrIsLong(newVal)) {
|
321
|
+
let numVal = new NUM_TYPE(newVal);
|
322
|
+
let pic = new PIC(this._picture, this._type, super.getTask().getCompIdx());
|
323
|
+
let decs = pic.getDec();
|
324
|
+
numVal.round(decs);
|
325
|
+
newVal = numVal.toXMLrecord();
|
326
|
+
}
|
327
|
+
rec = this._dataview.getCurrRec();
|
328
|
+
if (rec == null)
|
329
|
+
throw new ApplicationException(LanguageData.Instance.getConstMessage(MsgInterface.RT_STR_NO_RECS_IN_RNG));
|
330
|
+
if (!this.IsVirtual &&
|
331
|
+
(task.getMode() === Constants.TASK_MODE_QUERY &&
|
332
|
+
!Environment.Instance.allowUpdateInQueryMode(task.getCompIdx())
|
333
|
+
|| rec.InForceUpdate && rec.InCompute))
|
334
|
+
return !valsEqual;
|
335
|
+
if (checkForVariableChange && this.getHasChangeEvent()) {
|
336
|
+
let argsList = new Array(2);
|
337
|
+
argsList[0] = new ExpVal(StorageAttribute.NUMERIC, false, (mainCtrl !== null && mainCtrl.IsInteractiveUpdate
|
338
|
+
? Field.NUM0.toXMLrecord()
|
339
|
+
: Field.NUM1.toXMLrecord()));
|
340
|
+
argsList[1] = new ExpVal(this.getType(), this.isNull(), this.getValue(false));
|
341
|
+
args = new ArgumentsList(argsList);
|
342
|
+
}
|
343
|
+
if (mainCtrl != null)
|
344
|
+
mainCtrl.IsInteractiveUpdate = false;
|
345
|
+
if (this._type !== StorageAttribute.UNICODE && UtilStrByteMode.isLocaleDefLangDBCS()) {
|
346
|
+
if (newVal != null)
|
347
|
+
remainder = this._size - UtilStrByteMode.lenB(newVal);
|
348
|
+
else
|
349
|
+
remainder = 0;
|
350
|
+
if (newVal != null && this._type !== StorageAttribute.BLOB && this._type !== StorageAttribute.BLOB_VECTOR &&
|
351
|
+
remainder < 0)
|
352
|
+
this._val = UtilStrByteMode.leftB(newVal, this._size);
|
353
|
+
else if (this._type === StorageAttribute.ALPHA && remainder > 0)
|
354
|
+
this._val = newVal + NString.FromChars(this._spaces, 0, remainder);
|
355
|
+
else if (this._type === StorageAttribute.BLOB)
|
356
|
+
this._val = BlobType.copyBlob(this._val, newVal);
|
357
|
+
else
|
358
|
+
this._val = newVal;
|
359
|
+
}
|
360
|
+
else {
|
361
|
+
if (newVal != null)
|
362
|
+
remainder = this._size - newVal.length;
|
363
|
+
else
|
364
|
+
remainder = 0;
|
365
|
+
if (newVal != null && this._type !== StorageAttribute.BLOB && this._type !== StorageAttribute.BLOB_VECTOR && remainder < 0)
|
366
|
+
this._val = newVal.substr(0, this._size);
|
367
|
+
else if ((this._type === StorageAttribute.ALPHA || this._type === StorageAttribute.UNICODE) && remainder > 0)
|
368
|
+
this._val = newVal + NString.FromChars(this._spaces, 0, remainder);
|
369
|
+
else if (this._type === StorageAttribute.BLOB) {
|
370
|
+
if (this._val === null)
|
371
|
+
this._val = this.getMagicDefaultValue();
|
372
|
+
this._val = BlobType.copyBlob(this._val, newVal);
|
373
|
+
}
|
374
|
+
else
|
375
|
+
this._val = newVal;
|
376
|
+
}
|
377
|
+
{
|
378
|
+
recFldVal = rec.GetFieldValue(this._id);
|
379
|
+
let oldNullVal = this._isNull;
|
380
|
+
if (!recompute && !isArgUpdate && this._initExp == null)
|
381
|
+
oldNullVal = rec.IsNull(this._id);
|
382
|
+
try {
|
383
|
+
valsEqual = ExpressionEvaluator.mgValsEqual(this._val, isNullFld, this._type, recFldVal, oldNullVal, this._type);
|
384
|
+
}
|
385
|
+
catch (exception) {
|
386
|
+
this._val = this.getMagicDefaultValue();
|
387
|
+
valsEqual = false;
|
388
|
+
}
|
389
|
+
}
|
390
|
+
if (this._clearVectorType)
|
391
|
+
this._vectorType = null;
|
392
|
+
if (this._invalidValue) {
|
393
|
+
this._invalidValue = false;
|
394
|
+
rec.clearFlag(this._id, Record.FLAG_UPDATED);
|
395
|
+
rec.clearFlag(this._id, Record.FLAG_MODIFIED);
|
396
|
+
}
|
397
|
+
zeroReal = this._linkCreate && rec.InCompute && !recompute && (this._form == null || !this._form.InRestore) &&
|
398
|
+
!AccessHelper.eventsManager.GetStopExecutionFlag();
|
399
|
+
if ((this._isVirtual || zeroReal) && !rec.isNewRec() && !valsEqual)
|
400
|
+
forceUpdate = true;
|
401
|
+
if (checkForVariableChange || forceUpdate || rec.isNewRec()) {
|
402
|
+
this.UpdateNull(isNullFld, rec);
|
403
|
+
if (setCrsrModified)
|
404
|
+
rec.setFlag(this._id, Record.FLAG_CRSR_MODIFIED);
|
405
|
+
rec.setFieldValue(this._id, this._val, setRecordModified);
|
406
|
+
evts = Field._variableChangeEvts;
|
407
|
+
pendingEvents = evts.length;
|
408
|
+
if (checkForVariableChange && this.getHasChangeEvent() && !evts.Contains(this) && !valsEqual) {
|
409
|
+
let rtEvt = new RunTimeEvent(this);
|
410
|
+
rtEvt.setInternal(InternalInterface.MG_ACT_VARIABLE);
|
411
|
+
rtEvt.setArgList(args);
|
412
|
+
evts.push(this);
|
413
|
+
evts.push(rtEvt);
|
414
|
+
}
|
415
|
+
if (this._recompute != null && (recompute || forceUpdate) && !this._dataview.InLocalDataviewCommand) {
|
416
|
+
try {
|
417
|
+
if (forceUpdate)
|
418
|
+
rec.InForceUpdate = true;
|
419
|
+
await this._recompute.execute(rec);
|
420
|
+
}
|
421
|
+
finally {
|
422
|
+
if (forceUpdate)
|
423
|
+
rec.InForceUpdate = false;
|
424
|
+
}
|
425
|
+
}
|
426
|
+
if (this._causeTableInvalidation && this.isChanged(this._val, isNullFld))
|
427
|
+
rec.setCauseInvalidation(true);
|
428
|
+
if ((recompute || forceUpdate) && !this._dataview.InLocalDataviewCommand && mainCtrl != null) {
|
429
|
+
if (mainCtrl.isChoiceControl())
|
430
|
+
await this.updateDisplay();
|
431
|
+
}
|
432
|
+
if (pendingEvents === 0 && checkForVariableChange && this.getHasChangeEvent()) {
|
433
|
+
while (evts.length > 0) {
|
434
|
+
let evt = evts.get_Item(1);
|
435
|
+
evts.RemoveAt(0);
|
436
|
+
evts.RemoveAt(0);
|
437
|
+
if (LastFocusedManager.Instance.getLastFocusedTask() == null)
|
438
|
+
evt.setTask(this.getTask());
|
439
|
+
else {
|
440
|
+
let taskRef = LastFocusedManager.Instance.getLastFocusedTask();
|
441
|
+
if (taskRef.TaskSuffixExecuted) {
|
442
|
+
taskRef = (taskRef.PathParentTask != null) ? taskRef.PathParentTask : taskRef;
|
443
|
+
}
|
444
|
+
evt.setTask(taskRef);
|
445
|
+
}
|
446
|
+
evt.setCtrl(LastFocusedManager.getLastFocusedControl());
|
447
|
+
await AccessHelper.eventsManager.handleEvent(evt, false);
|
448
|
+
}
|
449
|
+
}
|
450
|
+
}
|
451
|
+
if (recompute && !valsEqual)
|
452
|
+
this.setModified();
|
453
|
+
return !valsEqual;
|
454
|
+
}
|
455
|
+
UpdateNull(isNullFld, rec) {
|
456
|
+
if (isNullFld)
|
457
|
+
rec.setFlag(this._id, Record.FLAG_NULL);
|
458
|
+
else
|
459
|
+
rec.clearFlag(this._id, Record.FLAG_NULL);
|
460
|
+
this._isNull = isNullFld;
|
461
|
+
}
|
462
|
+
async setCellVecValue(idx, newVal, valIsNull) {
|
463
|
+
let res = false;
|
464
|
+
if (this._type === StorageAttribute.BLOB_VECTOR) {
|
465
|
+
if (this._vectorType == null) {
|
466
|
+
this._vectorType = this.isNull()
|
467
|
+
? new VectorType(this._vecCellsType, this._vecCellsContentType, this.DefaultValue, this.isNullDefault(), this.NullAllowed, this._vecCellsSize)
|
468
|
+
: new VectorType(this._val);
|
469
|
+
}
|
470
|
+
if (this._vecCellsType === StorageAttribute.BLOB) {
|
471
|
+
let tmpNewVal = this.getCellDefualtValue();
|
472
|
+
newVal = BlobType.copyBlob(tmpNewVal, newVal);
|
473
|
+
}
|
474
|
+
res = this._vectorType.setVecCell(idx, newVal, valIsNull);
|
475
|
+
if (res) {
|
476
|
+
this._clearVectorType = false;
|
477
|
+
await this.setValueAndStartRecompute(this._vectorType.toString(), false, true, false, false);
|
478
|
+
this._clearVectorType = true;
|
479
|
+
}
|
480
|
+
}
|
481
|
+
return res;
|
482
|
+
}
|
483
|
+
getVecCellValue(idx) {
|
484
|
+
if (this._type === StorageAttribute.BLOB_VECTOR) {
|
485
|
+
if (this._vectorType == null)
|
486
|
+
this._vectorType = new VectorType(this._val);
|
487
|
+
return this._vectorType.getVecCell(idx);
|
488
|
+
}
|
489
|
+
return null;
|
490
|
+
}
|
491
|
+
setRecomputed() {
|
492
|
+
}
|
493
|
+
invalidate(forceInvalidate, clearFlags) {
|
494
|
+
let rec = this._dataview.getCurrRec();
|
495
|
+
if (!this._isVirtual || this._virAsReal || this._initExp !== null || forceInvalidate) {
|
496
|
+
this._invalidValue = true;
|
497
|
+
}
|
498
|
+
if (clearFlags && rec !== null) {
|
499
|
+
rec.clearFlag(this._id, Record.FLAG_UPDATED);
|
500
|
+
rec.clearFlag(this._id, Record.FLAG_MODIFIED);
|
501
|
+
}
|
502
|
+
}
|
503
|
+
getTableName() {
|
504
|
+
if (this._tableName == null)
|
505
|
+
return "";
|
506
|
+
return this._tableName;
|
507
|
+
}
|
508
|
+
getName() {
|
509
|
+
if (this._isParam)
|
510
|
+
return "Parameter." + this.getVarName();
|
511
|
+
else if (this._isVirtual)
|
512
|
+
return "Virtual." + this.getVarName();
|
513
|
+
else
|
514
|
+
return this.getTableName() + "." + this.getVarName();
|
515
|
+
}
|
516
|
+
isNull() {
|
517
|
+
if (super.getTask().getEvalOldValues())
|
518
|
+
return this.isOriginalValueNull();
|
519
|
+
else if (this._invalidValue)
|
520
|
+
this.takeValFromRec();
|
521
|
+
return this._isNull;
|
522
|
+
}
|
523
|
+
PrevIsNull() {
|
524
|
+
return this._prevIsNull;
|
525
|
+
}
|
526
|
+
isModified() {
|
527
|
+
let currRec = this._dataview.getCurrRec();
|
528
|
+
return currRec.isFldModified(this._id);
|
529
|
+
}
|
530
|
+
setModified() {
|
531
|
+
let rec = (this._dataview.getCurrRec());
|
532
|
+
rec.setFlag(this._id, Record.FLAG_MODIFIED);
|
533
|
+
rec.setFlag(this._id, Record.FLAG_MODIFIED_ATLEAST_ONCE);
|
534
|
+
if (this.IsVirtual)
|
535
|
+
this.modifiedAtLeastOnce = true;
|
536
|
+
}
|
537
|
+
setUpdated() {
|
538
|
+
let currRec = this._dataview.getCurrRec();
|
539
|
+
currRec.setFlag(this._id, Record.FLAG_UPDATED);
|
540
|
+
currRec.setUpdated();
|
541
|
+
}
|
542
|
+
isParam() {
|
543
|
+
return this._isParam;
|
544
|
+
}
|
545
|
+
isInEvalProcess() {
|
546
|
+
return this._inEvalProcess;
|
547
|
+
}
|
548
|
+
hasInitExp() {
|
549
|
+
return this._initExp !== null;
|
550
|
+
}
|
551
|
+
isServerRcmp() {
|
552
|
+
return this._recompute !== null && this._recompute.isServerRcmp();
|
553
|
+
}
|
554
|
+
getPicture() {
|
555
|
+
return this._picture;
|
556
|
+
}
|
557
|
+
getDataviewHeaderId() {
|
558
|
+
return this._dataviewHeaderId;
|
559
|
+
}
|
560
|
+
get IsLinkField() {
|
561
|
+
return this._isLinkFld;
|
562
|
+
}
|
563
|
+
async getInitExpVal(res, isNull) {
|
564
|
+
if (this._initExp != null)
|
565
|
+
await this.EvaluateInitExpression(res, isNull);
|
566
|
+
else
|
567
|
+
res.value = this.getDefaultValue();
|
568
|
+
}
|
569
|
+
setHasChangeEvent() {
|
570
|
+
this._hasChangeEvent = true;
|
571
|
+
}
|
572
|
+
getHasChangeEvent() {
|
573
|
+
return this._hasChangeEvent;
|
574
|
+
}
|
575
|
+
setHasZoomHandler() {
|
576
|
+
this._hasZoomHandler = true;
|
577
|
+
}
|
578
|
+
getHasZoomHandler() {
|
579
|
+
return this._hasZoomHandler;
|
580
|
+
}
|
581
|
+
isCauseTableInvalidation() {
|
582
|
+
return this._causeTableInvalidation;
|
583
|
+
}
|
584
|
+
causeTableInvalidation(causeTableInvalidation) {
|
585
|
+
this._causeTableInvalidation = causeTableInvalidation;
|
586
|
+
}
|
587
|
+
getValueForNull(checkNullArithmetic) {
|
588
|
+
let val;
|
589
|
+
if (this.NullAllowed) {
|
590
|
+
if (checkNullArithmetic && super.getTask().getNullArithmetic() === Constants.NULL_ARITH_NULLIFY) {
|
591
|
+
val = null;
|
592
|
+
}
|
593
|
+
else {
|
594
|
+
if (this._nullValue === null) {
|
595
|
+
this._nullValue = super.getMagicDefaultValue();
|
596
|
+
}
|
597
|
+
val = this._nullValue;
|
598
|
+
}
|
599
|
+
}
|
600
|
+
else {
|
601
|
+
val = super.getMagicDefaultValue();
|
602
|
+
}
|
603
|
+
return val;
|
604
|
+
}
|
605
|
+
getCtrl() {
|
606
|
+
let ctrl;
|
607
|
+
if (this._controls != null) {
|
608
|
+
for (let i = 0; i < this._controls.length; i++) {
|
609
|
+
ctrl = this._controls.get_Item(i);
|
610
|
+
if (ctrl.getForm().getTask() === this.getTask())
|
611
|
+
return ctrl;
|
612
|
+
}
|
613
|
+
}
|
614
|
+
return null;
|
615
|
+
}
|
616
|
+
async updateDisplay() {
|
617
|
+
await super.updateDisplayWithValue(this.getDispValue(), this.isNull());
|
618
|
+
}
|
619
|
+
getDispValue() {
|
620
|
+
if (this.isNull()) {
|
621
|
+
if (this._nullDisplay != null)
|
622
|
+
return this.getNullDisplay();
|
623
|
+
else
|
624
|
+
return super.getMagicDefaultValue();
|
625
|
+
}
|
626
|
+
else
|
627
|
+
return this.getValue(false);
|
628
|
+
}
|
629
|
+
get ShouldCheckRangeInCompute() {
|
630
|
+
return this.IsLinkField || (this.IsVirtual && this._dataview.HasMainTable);
|
631
|
+
}
|
632
|
+
IsForArgument(taskHasParameters) {
|
633
|
+
if (taskHasParameters) {
|
634
|
+
if (!this.isParam()) {
|
635
|
+
return false;
|
636
|
+
}
|
637
|
+
}
|
638
|
+
else {
|
639
|
+
if (!this.IsVirtual) {
|
640
|
+
return false;
|
641
|
+
}
|
642
|
+
}
|
643
|
+
return true;
|
644
|
+
}
|
645
|
+
}
|
646
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiRmllbGQuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi9wcm9qZWN0cy9lbmdpbmUvc3JjL2RhdGEvRmllbGQudHMiXSwibmFtZXM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