@magic-xpa/engine 4.1100.0-dev4110.24 → 4.1100.0-dev4110.241
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 +416 -0
- package/esm2022/src/CommandsProcessorBase.mjs +56 -0
- package/esm2022/src/CommandsProcessorManager.mjs +26 -0
- package/esm2022/src/CommandsTable.mjs +162 -0
- package/esm2022/src/ConstInterface.mjs +517 -0
- package/{esm2020 → esm2022}/src/CurrentClientVersion.mjs +2 -2
- package/esm2022/src/FlowMonitorInterface.mjs +16 -0
- package/esm2022/src/GUIManager.mjs +62 -0
- package/esm2022/src/GlobalCommandsManager.mjs +34 -0
- package/esm2022/src/GuiEventsProcessor.mjs +156 -0
- package/{esm2020 → esm2022}/src/ICommandsTable.mjs +1 -1
- package/esm2022/src/ServerConfig.mjs +122 -0
- package/{esm2020 → esm2022}/src/bridge/IGuiEvent.mjs +19 -19
- package/esm2022/src/bridge/MagicBridge.mjs +41 -0
- package/esm2022/src/commands/ClientOriginatedCommandTaskTag.mjs +12 -0
- package/{esm2020 → esm2022}/src/commands/ClientToServer/AddUserLocateDataViewCommand.mjs +8 -8
- package/{esm2020 → esm2022}/src/commands/ClientToServer/AddUserRangeDataviewCommand.mjs +9 -9
- package/{esm2020 → esm2022}/src/commands/ClientToServer/AddUserSortDataViewCommand.mjs +9 -9
- package/{esm2020 → esm2022}/src/commands/ClientToServer/BrowserEscEventCommand.mjs +23 -23
- package/{esm2020 → esm2022}/src/commands/ClientToServer/ClientOriginatedCommand.mjs +14 -14
- package/esm2022/src/commands/ClientToServer/ClientOriginatedCommandSerializer.mjs +60 -0
- package/{esm2020 → esm2022}/src/commands/ClientToServer/ColumnSortEventCommand.mjs +26 -26
- package/esm2022/src/commands/ClientToServer/CommandFactory.mjs +260 -0
- package/esm2022/src/commands/ClientToServer/CommandSerializationHelper.mjs +67 -0
- package/{esm2020 → esm2022}/src/commands/ClientToServer/ComputeEventCommand.mjs +23 -23
- package/{esm2020 → esm2022}/src/commands/ClientToServer/ContextTerminationEventCommand.mjs +20 -20
- package/{esm2020 → esm2022}/src/commands/ClientToServer/ContextTimeoutResetCommand.mjs +19 -19
- package/{esm2020 → esm2022}/src/commands/ClientToServer/ControlItemsRefreshCommand.mjs +8 -8
- package/esm2022/src/commands/ClientToServer/DataViewOutputCommand.mjs +13 -0
- package/{esm2020 → esm2022}/src/commands/ClientToServer/DataviewCommand.mjs +44 -44
- package/esm2022/src/commands/ClientToServer/EvaluateCommand.mjs +37 -0
- package/esm2022/src/commands/ClientToServer/EventCommand.mjs +40 -0
- package/esm2022/src/commands/ClientToServer/ExecOperCommand.mjs +67 -0
- package/esm2022/src/commands/ClientToServer/FetchDataControlValuesEventCommand.mjs +22 -0
- package/{esm2020 → esm2022}/src/commands/ClientToServer/GlobalParamsQueryCommand.mjs +10 -10
- package/{esm2020 → esm2022}/src/commands/ClientToServer/ICommandTaskTag.mjs +1 -1
- package/{esm2020 → esm2022}/src/commands/ClientToServer/IndexChangeEventCommand.mjs +21 -21
- package/esm2022/src/commands/ClientToServer/IniputForceWriteCommand.mjs +23 -0
- package/{esm2020 → esm2022}/src/commands/ClientToServer/NonReversibleExitEventCommand.mjs +23 -23
- package/{esm2020 → esm2022}/src/commands/ClientToServer/QueryCommand.mjs +20 -20
- package/esm2022/src/commands/ClientToServer/RecomputeCommand.mjs +27 -0
- package/esm2022/src/commands/ClientToServer/RefreshEventCommand.mjs +27 -0
- package/esm2022/src/commands/ClientToServer/RefreshScreenEventCommand.mjs +24 -0
- package/esm2022/src/commands/ClientToServer/RollbackEventCommand.mjs +40 -0
- package/{esm2020 → esm2022}/src/commands/ClientToServer/SelectProgramCommand.mjs +14 -14
- package/{esm2020 → esm2022}/src/commands/ClientToServer/SetTransactionStateDataviewCommand.mjs +9 -9
- package/{esm2020 → esm2022}/src/commands/ClientToServer/SubformOpenEventCommand.mjs +21 -21
- package/esm2022/src/commands/ClientToServer/SubformRefreshEventCommand.mjs +24 -0
- package/esm2022/src/commands/ClientToServer/TransactionCommand.mjs +30 -0
- package/{esm2020 → esm2022}/src/commands/ClientToServer/UnloadCommand.mjs +14 -14
- package/esm2022/src/commands/ClientToServer/WriteMessageToServerLogCommand.mjs +18 -0
- package/esm2022/src/commands/DataViewCommandBase.mjs +8 -0
- package/{esm2020 → esm2022}/src/commands/IClientCommand.mjs +1 -1
- package/esm2022/src/commands/IClientTargetedCommand.mjs +13 -0
- package/{esm2020 → esm2022}/src/commands/IClientToServerCommandInfo.mjs +1 -1
- package/esm2022/src/commands/ServerToClient/AbortCommand.mjs +65 -0
- package/{esm2020 → esm2022}/src/commands/ServerToClient/AddLocateCommand.mjs +21 -21
- package/esm2022/src/commands/ServerToClient/AddRangeCommand.mjs +62 -0
- package/esm2022/src/commands/ServerToClient/AddSortCommand.mjs +33 -0
- package/esm2022/src/commands/ServerToClient/ClientRefreshCommand.mjs +25 -0
- package/esm2022/src/commands/ServerToClient/ClientTargetedCommandBase.mjs +24 -0
- package/esm2022/src/commands/ServerToClient/EnhancedVerifyCommand.mjs +45 -0
- package/esm2022/src/commands/ServerToClient/OpenURLCommand.mjs +221 -0
- package/{esm2020 → esm2022}/src/commands/ServerToClient/ResetLocateCommand.mjs +14 -14
- package/{esm2020 → esm2022}/src/commands/ServerToClient/ResetRangeCommand.mjs +14 -14
- package/{esm2020 → esm2022}/src/commands/ServerToClient/ResetSortCommand.mjs +14 -14
- package/esm2022/src/commands/ServerToClient/ResultCommand.mjs +37 -0
- package/esm2022/src/commands/ServerToClient/VerifyCommand.mjs +83 -0
- package/esm2022/src/commands/ServerToClient/XMLBasedCommandBuilder.mjs +132 -0
- package/{esm2020 → esm2022}/src/communications/IConnectionStateManager.mjs +1 -1
- package/esm2022/src/communications/InteractiveCommunicationsFailureHandler.mjs +15 -0
- package/{esm2020 → esm2022}/src/data/DataSourceIdKey.mjs +2 -2
- package/esm2022/src/data/DataView.mjs +1613 -0
- package/{esm2020 → esm2022}/src/data/DataViewBase.mjs +3 -3
- package/esm2022/src/data/DataviewManager.mjs +28 -0
- package/esm2022/src/data/DataviewManagerBase.mjs +15 -0
- package/esm2022/src/data/DvCache.mjs +67 -0
- package/esm2022/src/data/Field.mjs +646 -0
- package/esm2022/src/data/FieldBase.mjs +15 -0
- package/esm2022/src/data/FieldsTable.mjs +103 -0
- package/{esm2020 → esm2022}/src/data/IRecordsTable.mjs +1 -1
- package/esm2022/src/data/Key.mjs +88 -0
- package/esm2022/src/data/Record.mjs +866 -0
- package/{esm2020 → esm2022}/src/data/RecordOutOfDataViewException.mjs +15 -15
- package/esm2022/src/data/RecordsTable.mjs +267 -0
- package/esm2022/src/data/TaskTransactionManager.mjs +103 -0
- package/esm2022/src/data/XMLBasedDcValuesBuilder.mjs +74 -0
- package/{esm2020 → esm2022}/src/enums.mjs +23 -23
- package/esm2022/src/env/EnvVariablesTable.mjs +340 -0
- package/esm2022/src/env/Environment.mjs +487 -0
- package/{esm2020 → esm2022}/src/env/ILanguageData.mjs +1 -1
- package/esm2022/src/env/LanguageData.mjs +227 -0
- package/esm2022/src/env/MirrorString.mjs +65 -0
- package/esm2022/src/event/ActionManager.mjs +91 -0
- package/esm2022/src/event/Event.mjs +1333 -0
- package/esm2022/src/event/EventHandler.mjs +766 -0
- package/esm2022/src/event/EventHandlerPosition.mjs +204 -0
- package/esm2022/src/event/EventsManager.mjs +2988 -0
- package/{esm2020 → esm2022}/src/event/IEventsManager.mjs +6 -6
- package/esm2022/src/event/RunTimeEvent.mjs +399 -0
- package/{esm2020 → esm2022}/src/event/RunTimeEventBase.mjs +3 -3
- package/esm2022/src/event/UserEventsTable.mjs +47 -0
- package/esm2022/src/exp/ExpTable.mjs +57 -0
- package/esm2022/src/exp/Expression.mjs +200 -0
- package/esm2022/src/exp/ExpressionDict.mjs +727 -0
- package/esm2022/src/exp/ExpressionEvaluator.mjs +4206 -0
- package/esm2022/src/exp/ExpressionLocalJpn.mjs +314 -0
- package/esm2022/src/exp/GlobalParamsTable.mjs +85 -0
- package/esm2022/src/exp/YesNoExp.mjs +36 -0
- package/esm2022/src/gui/CreatedFormVector.mjs +23 -0
- package/esm2022/src/gui/FormsTable.mjs +66 -0
- package/esm2022/src/gui/MgControl.mjs +363 -0
- package/esm2022/src/gui/MgForm.mjs +1224 -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 +880 -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 +2499 -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 +29797 -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 +35 -32
- package/src/CommandsProcessorBase.d.ts +23 -23
- package/src/CommandsProcessorManager.d.ts +6 -6
- package/src/CommandsTable.d.ts +22 -22
- package/src/ConstInterface.d.ts +516 -515
- package/src/CurrentClientVersion.d.ts +1 -1
- package/src/FlowMonitorInterface.d.ts +15 -15
- package/src/GUIManager.d.ts +17 -17
- package/src/GlobalCommandsManager.d.ts +17 -17
- package/src/GuiEventsProcessor.d.ts +24 -24
- package/src/ICommandsTable.d.ts +9 -9
- package/src/ServerConfig.d.ts +35 -34
- package/src/bridge/IGuiEvent.d.ts +19 -19
- package/src/bridge/MagicBridge.d.ts +16 -16
- package/src/commands/ClientOriginatedCommandTaskTag.d.ts +8 -8
- package/src/commands/ClientToServer/AddUserLocateDataViewCommand.d.ts +4 -4
- package/src/commands/ClientToServer/AddUserRangeDataviewCommand.d.ts +6 -6
- package/src/commands/ClientToServer/AddUserSortDataViewCommand.d.ts +6 -6
- package/src/commands/ClientToServer/BrowserEscEventCommand.d.ts +8 -8
- package/src/commands/ClientToServer/ClientOriginatedCommand.d.ts +8 -8
- package/src/commands/ClientToServer/ClientOriginatedCommandSerializer.d.ts +6 -6
- package/src/commands/ClientToServer/ColumnSortEventCommand.d.ts +10 -10
- package/src/commands/ClientToServer/CommandFactory.d.ts +64 -64
- package/src/commands/ClientToServer/CommandSerializationHelper.d.ts +20 -20
- package/src/commands/ClientToServer/ComputeEventCommand.d.ts +8 -8
- package/src/commands/ClientToServer/ContextTerminationEventCommand.d.ts +7 -7
- package/src/commands/ClientToServer/ContextTimeoutResetCommand.d.ts +7 -7
- package/src/commands/ClientToServer/ControlItemsRefreshCommand.d.ts +6 -6
- package/src/commands/ClientToServer/DataViewOutputCommand.d.ts +9 -9
- package/src/commands/ClientToServer/DataviewCommand.d.ts +32 -32
- package/src/commands/ClientToServer/EvaluateCommand.d.ts +15 -15
- package/src/commands/ClientToServer/EventCommand.d.ts +15 -15
- package/src/commands/ClientToServer/ExecOperCommand.d.ts +23 -23
- package/src/commands/ClientToServer/FetchDataControlValuesEventCommand.d.ts +8 -8
- package/src/commands/ClientToServer/GlobalParamsQueryCommand.d.ts +5 -5
- package/src/commands/ClientToServer/ICommandTaskTag.d.ts +3 -3
- package/src/commands/ClientToServer/IndexChangeEventCommand.d.ts +8 -8
- package/src/commands/ClientToServer/IniputForceWriteCommand.d.ts +10 -10
- package/src/commands/ClientToServer/NonReversibleExitEventCommand.d.ts +8 -8
- package/src/commands/ClientToServer/QueryCommand.d.ts +8 -8
- package/src/commands/ClientToServer/RecomputeCommand.d.ts +11 -11
- package/src/commands/ClientToServer/RefreshEventCommand.d.ts +12 -12
- package/src/commands/ClientToServer/RefreshScreenEventCommand.d.ts +10 -10
- package/src/commands/ClientToServer/RollbackEventCommand.d.ts +14 -14
- package/src/commands/ClientToServer/SelectProgramCommand.d.ts +6 -6
- package/src/commands/ClientToServer/SetTransactionStateDataviewCommand.d.ts +5 -5
- package/src/commands/ClientToServer/SubformOpenEventCommand.d.ts +8 -8
- package/src/commands/ClientToServer/SubformRefreshEventCommand.d.ts +9 -9
- package/src/commands/ClientToServer/TransactionCommand.d.ts +12 -12
- package/src/commands/ClientToServer/UnloadCommand.d.ts +7 -7
- package/src/commands/ClientToServer/WriteMessageToServerLogCommand.d.ts +6 -6
- package/src/commands/DataViewCommandBase.d.ts +6 -6
- package/src/commands/IClientCommand.d.ts +2 -2
- package/src/commands/IClientTargetedCommand.d.ts +12 -12
- package/src/commands/IClientToServerCommandInfo.d.ts +3 -3
- package/src/commands/ServerToClient/AbortCommand.d.ts +11 -11
- package/src/commands/ServerToClient/AddLocateCommand.d.ts +6 -6
- package/src/commands/ServerToClient/AddRangeCommand.d.ts +10 -10
- package/src/commands/ServerToClient/AddSortCommand.d.ts +9 -9
- package/src/commands/ServerToClient/ClientRefreshCommand.d.ts +7 -7
- package/src/commands/ServerToClient/ClientTargetedCommandBase.d.ts +12 -12
- package/src/commands/ServerToClient/EnhancedVerifyCommand.d.ts +13 -13
- package/src/commands/ServerToClient/OpenURLCommand.d.ts +21 -21
- package/src/commands/ServerToClient/ResetLocateCommand.d.ts +6 -6
- package/src/commands/ServerToClient/ResetRangeCommand.d.ts +6 -6
- package/src/commands/ServerToClient/ResetSortCommand.d.ts +6 -6
- package/src/commands/ServerToClient/ResultCommand.d.ts +10 -10
- package/src/commands/ServerToClient/VerifyCommand.d.ts +17 -17
- package/src/commands/ServerToClient/XMLBasedCommandBuilder.d.ts +11 -11
- package/src/communications/IConnectionStateManager.d.ts +4 -4
- package/src/communications/InteractiveCommunicationsFailureHandler.d.ts +6 -6
- package/src/data/DataSourceIdKey.d.ts +2 -2
- package/src/data/DataView.d.ts +162 -162
- package/src/data/DataViewBase.d.ts +12 -12
- package/src/data/DataviewManager.d.ts +14 -14
- package/src/data/DataviewManagerBase.d.ts +11 -11
- package/src/data/DvCache.d.ts +15 -15
- package/src/data/Field.d.ts +103 -103
- package/src/data/FieldBase.d.ts +23 -23
- package/src/data/FieldsTable.d.ts +27 -27
- package/src/data/IRecordsTable.d.ts +7 -7
- package/src/data/Key.d.ts +15 -15
- package/src/data/Record.d.ts +156 -156
- package/src/data/RecordOutOfDataViewException.d.ts +10 -10
- package/src/data/RecordsTable.d.ts +38 -38
- package/src/data/TaskTransactionManager.d.ts +17 -17
- package/src/data/XMLBasedDcValuesBuilder.d.ts +11 -11
- package/src/enums.d.ts +21 -21
- package/src/env/EnvVariablesTable.d.ts +17 -17
- package/src/env/Environment.d.ts +118 -118
- package/src/env/ILanguageData.d.ts +3 -3
- package/src/env/LanguageData.d.ts +20 -20
- package/src/env/MirrorString.d.ts +15 -15
- package/src/event/ActionManager.d.ts +14 -14
- package/src/event/Event.d.ts +79 -79
- package/src/event/EventHandler.d.ts +66 -66
- package/src/event/EventHandlerPosition.d.ts +25 -25
- package/src/event/EventsManager.d.ts +205 -204
- package/src/event/IEventsManager.d.ts +77 -77
- package/src/event/RunTimeEvent.d.ts +126 -123
- package/src/event/RunTimeEventBase.d.ts +5 -5
- package/src/event/UserEventsTable.d.ts +11 -11
- package/src/exp/ExpTable.d.ts +11 -11
- package/src/exp/Expression.d.ts +37 -37
- package/src/exp/ExpressionDict.d.ts +12 -12
- package/src/exp/ExpressionEvaluator.d.ts +198 -198
- package/src/exp/ExpressionLocalJpn.d.ts +18 -18
- package/src/exp/GlobalParamsTable.d.ts +19 -19
- package/src/exp/YesNoExp.d.ts +9 -9
- package/src/gui/CreatedFormVector.d.ts +10 -10
- package/src/gui/FormsTable.d.ts +15 -15
- package/src/gui/MgControl.d.ts +60 -60
- package/src/gui/MgForm.d.ts +96 -93
- package/src/http/HttpManager.d.ts +25 -25
- package/src/http/client/HttpClientAsync.d.ts +16 -16
- package/src/http/client/HttpClientBase.d.ts +30 -30
- package/src/http/client/HttpClientEvents.d.ts +18 -18
- package/src/http/client/HttpClientSync.d.ts +17 -17
- package/src/http/client/HttpUtility.d.ts +10 -10
- package/src/http/client/ICommunicationsFailureHandler.d.ts +5 -5
- package/src/remote/AddUserLocateRemoteDataViewCommand.d.ts +8 -8
- package/src/remote/AddUserRangeRemoteDataViewCommand.d.ts +8 -8
- package/src/remote/AddUserSortRemoteDataViewCommand.d.ts +8 -8
- package/src/remote/RemoteCommandsProcessor.d.ts +51 -51
- package/src/remote/RemoteControlItemsRefreshCommand.d.ts +8 -8
- package/src/remote/RemoteDataViewCommandBase.d.ts +10 -10
- package/src/remote/RemoteDataViewCommandFactory.d.ts +6 -6
- package/src/remote/RemoteDataViewCommandUpdateNonModifiable.d.ts +8 -8
- package/src/remote/RemoteDataviewManager.d.ts +9 -9
- package/src/remote/RemoteInitDataViewCommand.d.ts +7 -7
- package/src/remote/ResetUserLocateRemoteDataviewCommand.d.ts +7 -7
- package/src/remote/ResetUserRangeRemoteDataviewCommand.d.ts +7 -7
- package/src/remote/ResetUserSortRemoteDataviewCommand.d.ts +7 -7
- package/src/remote/ServerError.d.ts +16 -16
- package/src/remote/SetTransactionStateRemoteDataViewCommand.d.ts +8 -8
- package/src/rt/Argument.d.ts +36 -36
- package/src/rt/ArgumentsList.d.ts +24 -24
- package/src/rt/Boundary.d.ts +27 -27
- package/src/rt/CompMainPrgTable.d.ts +10 -10
- package/src/rt/DataviewHeaderBase.d.ts +34 -34
- package/src/rt/DataviewHeaderFactory.d.ts +5 -5
- package/src/rt/DataviewHeaders.d.ts +12 -12
- package/src/rt/DataviewHeadersSaxHandler.d.ts +10 -10
- package/src/rt/ExecutionStack.d.ts +22 -22
- package/src/rt/ExecutionStackEntry.d.ts +7 -7
- package/src/rt/HandlersTable.d.ts +19 -19
- package/src/rt/IDataSourceViewDefinition.d.ts +6 -6
- package/src/rt/IDataviewHeader.d.ts +10 -10
- package/src/rt/IResultValue.d.ts +4 -4
- package/src/rt/LastFocusedManager.d.ts +23 -23
- package/src/rt/Operation.d.ts +97 -97
- package/src/rt/OperationTable.d.ts +15 -15
- package/src/rt/Recompute.d.ts +41 -41
- package/src/rt/RecomputeTable.d.ts +9 -9
- package/src/rt/RemoteDataviewHeader.d.ts +14 -14
- package/src/rt/ResultValue.d.ts +7 -7
- package/src/rt/TableCache.d.ts +29 -29
- package/src/rt/TableCacheManager.d.ts +10 -10
- package/src/rt/Transaction.d.ts +23 -23
- package/src/security/UserDetails.d.ts +16 -16
- package/src/tasks/IMGDataCollection.d.ts +26 -26
- package/src/tasks/MGData.d.ts +63 -63
- package/src/tasks/MGDataCollection.d.ts +42 -42
- package/src/tasks/RCTimer.d.ts +13 -13
- package/src/tasks/RemoteTaskService.d.ts +16 -16
- package/src/tasks/Task.d.ts +312 -312
- package/src/tasks/TaskBase.d.ts +123 -123
- package/src/tasks/TaskServiceBase.d.ts +16 -16
- package/src/tasks/TasksTable.d.ts +21 -21
- package/src/tasks/sort/Sort.d.ts +4 -4
- package/src/tasks/sort/SortCollection.d.ts +11 -11
- package/src/util/ConstUtils.d.ts +3 -3
- package/src/util/FlowMonitorQueue.d.ts +70 -70
- package/src/util/HeapSort.d.ts +6 -6
- package/src/util/IMirrorXML.d.ts +6 -6
- package/src/util/IServerConfig.d.ts +11 -11
- package/src/util/MgBlockingQueue.d.ts +5 -5
- package/src/util/MgPriorityBlockingQueue.d.ts +17 -17
- package/src/util/MgPriorityQueue.d.ts +13 -13
- package/src/util/ParamParseResult.d.ts +6 -6
- package/src/util/PrmMap.d.ts +28 -28
- package/src/util/ReturnResult.d.ts +18 -18
- package/src/util/ReturnResultBase.d.ts +11 -11
- package/src/util/Scrambler.d.ts +10 -10
- package/src/util/UniqueIDUtils.d.ts +4 -4
- package/src/util/cookie.service.d.ts +8 -8
- package/esm2020/src/AccessHelper.mjs +0 -9
- package/esm2020/src/ClientManager.mjs +0 -399
- package/esm2020/src/CommandsProcessorBase.mjs +0 -58
- package/esm2020/src/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/bridge/MagicBridge.mjs +0 -41
- 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,103 +0,0 @@
|
|
1
|
-
import { List } from '@magic-xpa/mscorelib';
|
2
|
-
import { Argument } from './Argument';
|
3
|
-
import { StrUtil } from '@magic-xpa/utils';
|
4
|
-
export class ArgumentsList {
|
5
|
-
constructor(srcArgsOrExp_paramsOrArgument) {
|
6
|
-
this._list = null;
|
7
|
-
this.RefreshOnString = null;
|
8
|
-
if (arguments.length === 0) {
|
9
|
-
this.constructor_0();
|
10
|
-
return;
|
11
|
-
}
|
12
|
-
if (arguments.length === 1 && (srcArgsOrExp_paramsOrArgument === null || srcArgsOrExp_paramsOrArgument instanceof Array)) {
|
13
|
-
this.constructor_2(srcArgsOrExp_paramsOrArgument);
|
14
|
-
return;
|
15
|
-
}
|
16
|
-
this.constructor_3(srcArgsOrExp_paramsOrArgument);
|
17
|
-
}
|
18
|
-
constructor_0() {
|
19
|
-
}
|
20
|
-
async Initialize(srcArgs) {
|
21
|
-
this.constructor_0();
|
22
|
-
if (srcArgs === null)
|
23
|
-
this._list = null;
|
24
|
-
else {
|
25
|
-
this._list = new List();
|
26
|
-
for (let i = 0; i < srcArgs.getSize(); i = i + 1) {
|
27
|
-
let arg = new Argument(srcArgs.getArg(i));
|
28
|
-
await arg.Initialize(srcArgs.getArg(i));
|
29
|
-
this._list.push(arg);
|
30
|
-
}
|
31
|
-
}
|
32
|
-
}
|
33
|
-
constructor_2(Exp_params) {
|
34
|
-
this.constructor_0();
|
35
|
-
let argCnt = Exp_params.length;
|
36
|
-
if (argCnt === 0)
|
37
|
-
this._list = null;
|
38
|
-
else {
|
39
|
-
this._list = new List();
|
40
|
-
for (let i = 0; i < argCnt; i = i + 1) {
|
41
|
-
this._list.push(new Argument(Exp_params[i]));
|
42
|
-
}
|
43
|
-
}
|
44
|
-
}
|
45
|
-
constructor_3(argument) {
|
46
|
-
this.Add(argument);
|
47
|
-
}
|
48
|
-
fillList(valueStr, srcTask) {
|
49
|
-
let tok = StrUtil.tokenize(valueStr, "$");
|
50
|
-
let size = tok.length;
|
51
|
-
this._list = new List();
|
52
|
-
for (let i = 0; i < size; i = i + 1) {
|
53
|
-
let argument = new Argument();
|
54
|
-
argument.fillData(tok[i], srcTask);
|
55
|
-
this._list.push(argument);
|
56
|
-
}
|
57
|
-
}
|
58
|
-
buildListFromParams(size, attrs, vals, nulls) {
|
59
|
-
this._list = new List();
|
60
|
-
for (let i = 0; i < size; i = i + 1) {
|
61
|
-
let argument = new Argument();
|
62
|
-
argument.fillDataByParams(attrs.charAt(i), vals[i], nulls.charAt(i) !== '0');
|
63
|
-
this._list.push(argument);
|
64
|
-
}
|
65
|
-
}
|
66
|
-
buildXML(message) {
|
67
|
-
for (let i = 0; i < this._list.length; i = i + 1) {
|
68
|
-
if (i > 0)
|
69
|
-
message.Append('$');
|
70
|
-
this._list.get_Item(i).buildXML(message);
|
71
|
-
}
|
72
|
-
}
|
73
|
-
getSize() {
|
74
|
-
return (this._list === null) ? 0 : this._list.length;
|
75
|
-
}
|
76
|
-
getArg(idx) {
|
77
|
-
if (idx < 0 || idx >= this._list.length)
|
78
|
-
return null;
|
79
|
-
return this._list.get_Item(idx);
|
80
|
-
}
|
81
|
-
async getArgValue(idx, expType, expSize) {
|
82
|
-
let arg = this.getArg(idx);
|
83
|
-
if (arg === null)
|
84
|
-
return null;
|
85
|
-
return await arg.getValue(expType, expSize);
|
86
|
-
}
|
87
|
-
FillListFromString(argsString) {
|
88
|
-
let pattern = new RegExp("(?<!\\\\),");
|
89
|
-
let array = argsString.split(pattern);
|
90
|
-
this._list = new List();
|
91
|
-
for (let i = 0; i < array.length; i = i + 1) {
|
92
|
-
let argument = new Argument();
|
93
|
-
argument.FillFromString(array[i]);
|
94
|
-
this._list.push(argument);
|
95
|
-
}
|
96
|
-
}
|
97
|
-
Add(argument) {
|
98
|
-
if (this._list === null)
|
99
|
-
this._list = new List();
|
100
|
-
this._list.push(argument);
|
101
|
-
}
|
102
|
-
}
|
103
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiQXJndW1lbnRzTGlzdC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uL3Byb2plY3RzL2VuZ2luZS9zcmMvcnQvQXJndW1lbnRzTGlzdC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFDQSxPQUFPLEVBQUUsSUFBSSxFQUFpQixNQUFNLHNCQUFzQixDQUFDO0FBQzNELE9BQU8sRUFBRSxRQUFRLEVBQUUsTUFBTSxZQUFZLENBQUM7QUFHdEMsT0FBTyxFQUFvQixPQUFPLEVBQUUsTUFBTSxrQkFBa0IsQ0FBQztBQUU3RCxNQUFNLE9BQU8sYUFBYTtJQVV4QixZQUFZLDZCQUFtQztRQVR2QyxVQUFLLEdBQW1CLElBQUksQ0FBQztRQUlyQyxvQkFBZSxHQUFXLElBQUksQ0FBQztRQU03QixJQUFJLFNBQVMsQ0FBQyxNQUFNLEtBQUssQ0FBQyxFQUFFO1lBQzFCLElBQUksQ0FBQyxhQUFhLEVBQUUsQ0FBQztZQUNyQixPQUFPO1NBQ1I7UUFDRCxJQUFJLFNBQVMsQ0FBQyxNQUFNLEtBQUssQ0FBQyxJQUFJLENBQUMsNkJBQTZCLEtBQUssSUFBSSxJQUFJLDZCQUE2QixZQUFZLEtBQUssQ0FBQyxFQUFFO1lBQ3hILElBQUksQ0FBQyxhQUFhLENBQUMsNkJBQTZCLENBQUMsQ0FBQztZQUNsRCxPQUFPO1NBQ1I7UUFDRCxJQUFJLENBQUMsYUFBYSx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y8gPHBhcmFtIG5hbWU9XCJhcmd1bWVudFwiPjwvcGFyYW0+XHJcbiAgQWRkKGFyZ3VtZW50OiBBcmd1bWVudCk6IHZvaWQge1xyXG4gICAgaWYgKHRoaXMuX2xpc3QgPT09IG51bGwpXHJcbiAgICAgIHRoaXMuX2xpc3QgPSBuZXcgTGlzdDxBcmd1bWVudD4oKTtcclxuICAgIHRoaXMuX2xpc3QucHVzaChhcmd1bWVudCk7XHJcbiAgfVxyXG59XHJcbiJdfQ==
|
@@ -1,152 +0,0 @@
|
|
1
|
-
import { ExpressionEvaluator, NullValueException } from "../exp/ExpressionEvaluator";
|
2
|
-
import { DisplayConvertor, ExpVal } from "@magic-xpa/gui";
|
3
|
-
import { StorageAttribute, StrUtil } from "@magic-xpa/utils";
|
4
|
-
import { Char, NString } from "@magic-xpa/mscorelib";
|
5
|
-
export class Boundary {
|
6
|
-
constructor(task, minIdx, maxIdx, returnType, size, cacheTableId) {
|
7
|
-
this._cacheTableFldId = 0;
|
8
|
-
this._max = null;
|
9
|
-
this._min = null;
|
10
|
-
this._retType = StorageAttribute.NONE;
|
11
|
-
this._size = 0;
|
12
|
-
this._maxExpVal = null;
|
13
|
-
this._minExpVal = null;
|
14
|
-
this.DiscardMin = false;
|
15
|
-
this.DiscardMax = false;
|
16
|
-
this.MaxEqualsMin = false;
|
17
|
-
if (arguments.length === 5)
|
18
|
-
this.constructor_0(task, minIdx, maxIdx, returnType, size);
|
19
|
-
else
|
20
|
-
this.constructor_1(task, minIdx, maxIdx, returnType, size, cacheTableId);
|
21
|
-
}
|
22
|
-
constructor_0(task, minIdx, maxIdx, returnType, size) {
|
23
|
-
this.constructor_1(task, minIdx, maxIdx, returnType, size, -1);
|
24
|
-
}
|
25
|
-
constructor_1(task, minIdx, maxIdx, returnType, size, cacheTableId) {
|
26
|
-
this._retType = returnType;
|
27
|
-
this._size = size;
|
28
|
-
this._cacheTableFldId = cacheTableId;
|
29
|
-
if (minIdx !== -1)
|
30
|
-
this._min = task.getExpById(minIdx);
|
31
|
-
if (maxIdx !== -1)
|
32
|
-
this._max = task.getExpById(maxIdx);
|
33
|
-
}
|
34
|
-
hasMinExp() {
|
35
|
-
return this._min !== null;
|
36
|
-
}
|
37
|
-
hasMaxExp() {
|
38
|
-
return this._max !== null;
|
39
|
-
}
|
40
|
-
getExpType() {
|
41
|
-
return this._retType;
|
42
|
-
}
|
43
|
-
getCacheTableFldId() {
|
44
|
-
return this._cacheTableFldId;
|
45
|
-
}
|
46
|
-
async compute(padValueWithMinMaxCharacters) {
|
47
|
-
if (this.hasMinExp()) {
|
48
|
-
let minVal = await this._min.evaluateWithResultTypeAndLength(this.getExpType(), this._size);
|
49
|
-
if (minVal !== null) {
|
50
|
-
minVal = NString.TrimEnd(minVal, new Array(0));
|
51
|
-
}
|
52
|
-
this._minExpVal = new ExpVal(this.getExpType(), minVal === null, minVal);
|
53
|
-
this.MaxEqualsMin = this.IsMaxEqualsMin();
|
54
|
-
if (!this._minExpVal.IsNull && (this._minExpVal.Attr === StorageAttribute.ALPHA || this._minExpVal.Attr === StorageAttribute.UNICODE)) {
|
55
|
-
if (padValueWithMinMaxCharacters) {
|
56
|
-
this._minExpVal.StrVal = DisplayConvertor.StringValueToMgValue(this._minExpVal.StrVal, this._minExpVal.Attr, Char.MinValue, this._size).toString();
|
57
|
-
this.MaxEqualsMin = false;
|
58
|
-
}
|
59
|
-
this._minExpVal.StrVal = StrUtil.SearchAndReplaceWildChars(this._minExpVal.StrVal, this._size, Char.MinValue);
|
60
|
-
}
|
61
|
-
this.DiscardMin = await this._min.DiscardCndRangeResult();
|
62
|
-
}
|
63
|
-
if (this.hasMaxExp()) {
|
64
|
-
let maxVal = await this._max.evaluateWithResultTypeAndLength(this.getExpType(), this._size);
|
65
|
-
this._maxExpVal = new ExpVal(this.getExpType(), maxVal === null, maxVal);
|
66
|
-
if (!this._maxExpVal.IsNull && (this._maxExpVal.Attr === StorageAttribute.ALPHA || this._maxExpVal.Attr === StorageAttribute.UNICODE)) {
|
67
|
-
if (padValueWithMinMaxCharacters) {
|
68
|
-
this._maxExpVal.StrVal = DisplayConvertor.StringValueToMgValue(this._maxExpVal.StrVal, this._maxExpVal.Attr, Char.MaxValue, this._size);
|
69
|
-
}
|
70
|
-
this._maxExpVal.StrVal = StrUtil.SearchAndReplaceWildChars(this._maxExpVal.StrVal, this._size, Char.MaxValue);
|
71
|
-
}
|
72
|
-
this.DiscardMax = await this._max.DiscardCndRangeResult();
|
73
|
-
}
|
74
|
-
}
|
75
|
-
checkRange(val, IsNull) {
|
76
|
-
let res = true;
|
77
|
-
let cmpVal = new ExpVal(this.getExpType(), IsNull, val);
|
78
|
-
if (cmpVal.IsNull && ((this.hasMinExp() && this._minExpVal.IsNull) || (this.hasMaxExp() && this._maxExpVal.IsNull))) {
|
79
|
-
res = true;
|
80
|
-
}
|
81
|
-
else {
|
82
|
-
if (this.hasMinExp()) {
|
83
|
-
if (!this._minExpVal.IsNull && !cmpVal.IsNull) {
|
84
|
-
try {
|
85
|
-
if (ExpressionEvaluator.val_cmp_any(cmpVal, this._minExpVal) < 0)
|
86
|
-
res = false;
|
87
|
-
}
|
88
|
-
catch (exception) {
|
89
|
-
if (exception instanceof NullValueException) {
|
90
|
-
res = false;
|
91
|
-
}
|
92
|
-
else
|
93
|
-
throw exception;
|
94
|
-
}
|
95
|
-
}
|
96
|
-
else {
|
97
|
-
if (cmpVal.IsNull !== this._minExpVal.IsNull)
|
98
|
-
res = false;
|
99
|
-
}
|
100
|
-
}
|
101
|
-
if (this.hasMaxExp() && res) {
|
102
|
-
if (!this._maxExpVal.IsNull && !cmpVal.IsNull) {
|
103
|
-
try {
|
104
|
-
if (ExpressionEvaluator.val_cmp_any(cmpVal, this._maxExpVal) > 0)
|
105
|
-
res = false;
|
106
|
-
}
|
107
|
-
catch (exception) {
|
108
|
-
if (exception instanceof NullValueException)
|
109
|
-
res = false;
|
110
|
-
else
|
111
|
-
throw exception;
|
112
|
-
}
|
113
|
-
}
|
114
|
-
else if (cmpVal.IsNull !== this._maxExpVal.IsNull)
|
115
|
-
res = false;
|
116
|
-
}
|
117
|
-
}
|
118
|
-
return res;
|
119
|
-
}
|
120
|
-
IsMaxEqualsMin() {
|
121
|
-
let result = false;
|
122
|
-
if (this.hasMaxExp() && this.hasMinExp()) {
|
123
|
-
if (this._min.getId() === this._max.getId()) {
|
124
|
-
if (this._retType === StorageAttribute.ALPHA || this._retType === StorageAttribute.UNICODE)
|
125
|
-
result = !this.WildCharExist();
|
126
|
-
else
|
127
|
-
result = true;
|
128
|
-
}
|
129
|
-
}
|
130
|
-
return result;
|
131
|
-
}
|
132
|
-
WildCharExist() {
|
133
|
-
let wildChars = ["*", "?"];
|
134
|
-
let result = false;
|
135
|
-
if (!this._minExpVal.IsNull) {
|
136
|
-
let stringValue = this._minExpVal.StrVal;
|
137
|
-
for (let i = 0; i < wildChars.length; i = i + 1) {
|
138
|
-
if (stringValue.endsWith(wildChars[i])) {
|
139
|
-
result = true;
|
140
|
-
break;
|
141
|
-
}
|
142
|
-
}
|
143
|
-
}
|
144
|
-
return result;
|
145
|
-
}
|
146
|
-
toString() {
|
147
|
-
return NString.Format("{{Boundary: {0}-{1}, {2}, {3}}}", [
|
148
|
-
this._max, this._max, this._retType, this._size
|
149
|
-
]);
|
150
|
-
}
|
151
|
-
}
|
152
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiQm91bmRhcnkuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi9wcm9qZWN0cy9lbmdpbmUvc3JjL3J0L0JvdW5kYXJ5LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFBQyxtQkFBbUIsRUFBRSxrQkFBa0IsRUFBQyxNQUFNLDRCQUE0QixDQUFDO0FBQ25GLE9BQU8sRUFBQyxnQkFBZ0IsRUFBRSxNQUFNLEVBQUMsTUFBTSxnQkFBZ0I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zdGFuY2VvZiBOdWxsVmFsdWVFeGNlcHRpb24pIHtcclxuICAgICAgICAgICAgICByZXMgPSBmYWxzZTtcclxuICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICBlbHNlXHJcbiAgICAgICAgICAgICAgdGhyb3cgZXhjZXB0aW9uO1xyXG4gICAgICAgICAgfVxyXG4gICAgICAgIH1cclxuICAgICAgICBlbHNlIHtcclxuICAgICAgICAgIGlmIChjbXBWYWwuSXNOdWxsICE9PSB0aGlzLl9taW5FeHBWYWwuSXNOdWxsKVxyXG4gICAgICAgICAgICByZXMgPSBmYWxzZTtcclxuICAgICAgICB9XHJcbiAgICAgIH1cclxuICAgICAgLy8gY2hlY2sgbWF4IGV4cHJlc3Npb24gQ29tcGxpYW5jZVxyXG4gICAgICBpZiAodGhpcy5oYXNNYXhFeHAoKSAmJiByZXMpIHtcclxuICAgICAgICAvLyBpZiBib3RoIG9mIHRoZSBjb21wYXJlZCB2YWx1ZXMgYXJlIG5vdCBudWxsXHJcbiAgICAgICAgaWYgKCF0aGlzLl9tYXhFeHBWYWwuSXNOdWxsICYmICFjbXBWYWwuSXNOdWxsKSB7XHJcbiAgICAgICAgICB0cnkge1xyXG4gICAgICAgICAgICAvLyB0aGUgY29tcGFyZWQgdmFsdWUgbXVzdCBiZSBlcXVhbCBvciBncmVhdGVyIHRvIHRoZSBtaW4gdmFsdWVcclxuICAgICAgICAgICAgaWYgKEV4cHJlc3Npb25FdmFsdWF0b3IudmFsX2NtcF9hbnkoY21wVmFsLCB0aGlzLl9tYXhFeHBWYWwpID4gMClcclxuICAgICAgICAgICAgICByZXMgPSBmYWxzZTtcclxuICAgICAgICAgIH1cclxuICAgICAgICAgIGNhdGNoIChleGNlcHRpb24pIHtcclxuICAgICAgICAgICAgaWYgKGV4Y2VwdGlvbiBpbnN0YW5jZW9mIE51bGxWYWx1ZUV4Y2VwdGlvbilcclxuICAgICAgICAgICAgICByZXMgPSBmYWxzZTtcclxuICAgICAgICAgICAgZWxzZVx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0VHlwZSwgdGhpcy5fc2l6ZVxyXG4gICAgXSk7XHJcbiAgfVxyXG59XHJcbiJdfQ==
|
@@ -1,65 +0,0 @@
|
|
1
|
-
import { Logger, StrUtil, XMLConstants, XmlParser } from "@magic-xpa/utils";
|
2
|
-
import { NString, NNumber } from "@magic-xpa/mscorelib";
|
3
|
-
import { ConstInterface } from "../ConstInterface";
|
4
|
-
export class CompMainPrgTable {
|
5
|
-
constructor() {
|
6
|
-
this._ctlIdxTab = null;
|
7
|
-
}
|
8
|
-
fillData(parser) {
|
9
|
-
let endContext = parser.getXMLdata().indexOf(XMLConstants.TAG_TERM, parser.getCurrIndex());
|
10
|
-
if (endContext !== -1 && endContext < parser.getXMLdata().length) {
|
11
|
-
let tag = parser.getXMLsubstring(endContext);
|
12
|
-
parser.add2CurrIndex(tag.indexOf(ConstInterface.MG_TAG_COMPMAINPRG) + ConstInterface.MG_TAG_COMPMAINPRG.length);
|
13
|
-
let tokensVector = XmlParser.getTokens(parser.getXMLsubstring(endContext), XMLConstants.XML_ATTR_DELIM);
|
14
|
-
Logger.Instance.WriteDevToLog("in CompMainPrg.FillData: " + tokensVector.toString());
|
15
|
-
this.initElements(tokensVector);
|
16
|
-
parser.setCurrIndex(endContext + XMLConstants.TAG_TERM.length);
|
17
|
-
return;
|
18
|
-
}
|
19
|
-
Logger.Instance.WriteExceptionToLogWithMsg("in CompMainPrg.FillData() out of string bounds");
|
20
|
-
}
|
21
|
-
initElements(tokensVector) {
|
22
|
-
for (let j = 0; j < tokensVector.length; j += 2) {
|
23
|
-
let attribute = (tokensVector.get_Item(j));
|
24
|
-
let valueStr = (tokensVector.get_Item(j + 1));
|
25
|
-
if (attribute === XMLConstants.MG_ATTR_VALUE) {
|
26
|
-
valueStr = StrUtil.DeleteStringsFromEnds(valueStr, "\"");
|
27
|
-
this.initCtlIdxTab(valueStr);
|
28
|
-
}
|
29
|
-
else
|
30
|
-
Logger.Instance.WriteExceptionToLogWithMsg(NString.Format("There is no such index in CompMainPrg. Add case to CompMainPrg.initElements for {0}", attribute));
|
31
|
-
}
|
32
|
-
Logger.Instance.WriteDevToLog("End CompMainPrg ");
|
33
|
-
}
|
34
|
-
initCtlIdxTab(val) {
|
35
|
-
if (NString.IsNullOrEmpty(val))
|
36
|
-
return;
|
37
|
-
if (val.indexOf(",") !== -1)
|
38
|
-
this._ctlIdxTab = StrUtil.tokenize(val, ",");
|
39
|
-
else {
|
40
|
-
this._ctlIdxTab = new Array(1);
|
41
|
-
this._ctlIdxTab[0] = val;
|
42
|
-
}
|
43
|
-
}
|
44
|
-
getCtlIdx(idx) {
|
45
|
-
if (idx >= 0 && idx < this.getSize()) {
|
46
|
-
let s = this._ctlIdxTab[idx];
|
47
|
-
return NNumber.Parse(s);
|
48
|
-
}
|
49
|
-
return -1;
|
50
|
-
}
|
51
|
-
getIndexOf(ctlIdx) {
|
52
|
-
let i;
|
53
|
-
for (i = 0; i < this.getSize(); i++) {
|
54
|
-
if (ctlIdx === this.getCtlIdx(i))
|
55
|
-
return i;
|
56
|
-
}
|
57
|
-
return -1;
|
58
|
-
}
|
59
|
-
getSize() {
|
60
|
-
if (this._ctlIdxTab === null)
|
61
|
-
return 0;
|
62
|
-
return this._ctlIdxTab.length;
|
63
|
-
}
|
64
|
-
}
|
65
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiQ29tcE1haW5QcmdUYWJsZS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uL3Byb2plY3RzL2VuZ2luZS9zcmMvcnQvQ29tcE1haW5QcmdUYWJsZS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBQUMsTUFBTSxFQUFFLE9BQU8sRUFBRSxZQUFZLEVBQUUsU0FBUyxFQUFDLE1BQU0sa0JBQWtCLENBQUM7QUFDMUUsT0FBTyxFQUFPLE9BQU8sRUFBRSxPQUFPLEVBQ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tYmVyLlBhcnNlKHMpO1xyXG4gICAgfVxyXG4gICAgcmV0dXJuIC0xO1xyXG4gIH1cclxuXHJcbiAgcHVibGljIGdldEluZGV4T2YoY3RsSWR4OiBudW1iZXIpOiBudW1iZXIge1xyXG4gICAgbGV0IGk6IG51bWJlcjtcclxuICAgIGZvciAoaSA9IDA7IGkgPCB0aGlzLmdldFNpemUoKTsgaSsrKSB7XHJcbiAgICAgIGlmIChjdGxJZHggPT09IHRoaXMuZ2V0Q3RsSWR4KGkpKVxyXG4gICAgICAgIHJldHVybiBpO1xyXG4gICAgfVxyXG4gICAgcmV0dXJuIC0xO1xyXG4gIH1cclxuXHJcbiAgZ2V0U2l6ZSgpOiBudW1iZXIge1xyXG4gICAgaWYgKHRoaXMuX2N0bElkeFRhYiA9PT0gbnVsbClcclxuICAgICAgcmV0dXJuIDA7XHJcbiAgICByZXR1cm4gdGhpcy5fY3RsSWR4VGFiLmxlbmd0aDtcclxuICB9XHJcbn1cclxuIl19
|
@@ -1,53 +0,0 @@
|
|
1
|
-
import { Hashtable, StringBuilder } from "@magic-xpa/mscorelib";
|
2
|
-
import { Logger, XMLConstants, XmlParser } from "@magic-xpa/utils";
|
3
|
-
import { DataviewHeadersSaxHandler } from "./DataviewHeadersSaxHandler";
|
4
|
-
import { RemoteDataviewHeader } from "./RemoteDataviewHeader";
|
5
|
-
import { ConstInterface } from "../ConstInterface";
|
6
|
-
export class DataviewHeaders {
|
7
|
-
constructor(task) {
|
8
|
-
this._dataviewHeaders = null;
|
9
|
-
this._task = null;
|
10
|
-
this._task = task;
|
11
|
-
this._dataviewHeaders = new Hashtable();
|
12
|
-
}
|
13
|
-
fillData(parser) {
|
14
|
-
while (this.initInnerObjects(parser, parser.getNextTag())) {
|
15
|
-
}
|
16
|
-
}
|
17
|
-
initInnerObjects(parser, foundTagName) {
|
18
|
-
if (foundTagName === null)
|
19
|
-
return false;
|
20
|
-
if (foundTagName === ConstInterface.MG_TAG_LINKS) {
|
21
|
-
let endContext = parser.getXMLdata().indexOf(ConstInterface.MG_TAG_LINKS_END, parser.getCurrIndex()) + ConstInterface.MG_TAG_LINKS_END.length + 1;
|
22
|
-
let xml = parser.getXMLsubstring(endContext);
|
23
|
-
xml = XmlParser.escapeUrl(xml);
|
24
|
-
new DataviewHeadersSaxHandler(this._task, this._dataviewHeaders, xml);
|
25
|
-
parser.setCurrIndex(endContext + XMLConstants.TAG_CLOSE.length);
|
26
|
-
}
|
27
|
-
else
|
28
|
-
Logger.Instance.WriteExceptionToLogWithMsg("There is no such tag in LinksTable.initInnerObjects(): " + foundTagName);
|
29
|
-
}
|
30
|
-
getDataviewHeaderById(linkId) {
|
31
|
-
return this._dataviewHeaders.get_Item(linkId);
|
32
|
-
}
|
33
|
-
buildDbPosString() {
|
34
|
-
if (this._dataviewHeaders.Count === 0) {
|
35
|
-
return null;
|
36
|
-
}
|
37
|
-
let buf = new StringBuilder();
|
38
|
-
let dataviewHeaders = this._dataviewHeaders.Values;
|
39
|
-
while (dataviewHeaders.MoveNext()) {
|
40
|
-
let curr = ((dataviewHeaders.Current instanceof RemoteDataviewHeader) ? dataviewHeaders.Current : null);
|
41
|
-
if (curr !== null) {
|
42
|
-
let currDbPosVal = curr.getLastFetchedDbPos();
|
43
|
-
buf.Append("@");
|
44
|
-
if (currDbPosVal !== null) {
|
45
|
-
buf.Append(currDbPosVal);
|
46
|
-
}
|
47
|
-
}
|
48
|
-
}
|
49
|
-
buf.Append("@");
|
50
|
-
return buf.ToString();
|
51
|
-
}
|
52
|
-
}
|
53
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiRGF0YXZpZXdIZWFkZXJzLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vcHJvamVjdHMvZW5naW5lL3NyYy9ydC9EYXRhdmlld0hlYWRlcnMudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQ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ZXJzLkN1cnJlbnQgaW5zdGFuY2VvZiBSZW1vdGVEYXRhdmlld0hlYWRlcikgPyAgPFJlbW90ZURhdGF2aWV3SGVhZGVyPmRhdGF2aWV3SGVhZGVycy5DdXJyZW50IDogbnVsbCk7XHJcblxyXG4gICAgICBpZiAoY3VyciAhPT0gbnVsbCkge1xyXG4gICAgICAgIGxldCBjdXJyRGJQb3NWYWw6IHN0cmluZyA9IGN1cnIuZ2V0TGFzdEZldGNoZWREYlBvcygpO1xyXG4gICAgICAgIGJ1Zi5BcHBlbmQoXCJAXCIpO1xyXG5cclxuICAgICAgICAvLyBpZiB0aGUgbGFzdCBmZXRjaCBkYiBwb3Mgb2YgdGhlIGxpbmsgaXMgbnVsbCBpdCBtZWFucyB0aGF0IHdlIG5ldmVyIGZldGNoZWQgYSByZWNvcmQgZnJvbSB0aGUgbGlua1xyXG4gICAgICAgIGlmIChjdXJyRGJQb3NWYWwgIT09IG51bGwpIHtcclxuICAgICAgICAgIGJ1Zi5BcHBlbmQoY3VyckRiUG9zVmFsKTtcclxuICAgICAgICB9XHJcbiAgICAgIH1cclxuICAgIH1cclxuICAgIGJ1Zi5BcHBlbmQoXCJAXCIpO1xyXG4gICAgcmV0dXJuIGJ1Zi5Ub1N0cmluZygpO1xyXG4gIH1cclxuXHJcbn1cclxuIl19
|
@@ -1,38 +0,0 @@
|
|
1
|
-
import { Dictionary, isNullOrUndefined } from "@magic-xpa/mscorelib";
|
2
|
-
import { JSON_Utils } from "@magic-xpa/utils";
|
3
|
-
import { DataviewHeaderFactory } from "./DataviewHeaderFactory";
|
4
|
-
import { ConstInterface } from "../ConstInterface";
|
5
|
-
export class DataviewHeadersSaxHandler {
|
6
|
-
constructor(task, dataviewHeaders, xmlData) {
|
7
|
-
this._dataviewHeaders = null;
|
8
|
-
this._task = null;
|
9
|
-
this._dataviewHeadersFactory = null;
|
10
|
-
this._dataviewHeaders = dataviewHeaders;
|
11
|
-
this._task = task;
|
12
|
-
this._dataviewHeadersFactory = new DataviewHeaderFactory();
|
13
|
-
JSON_Utils.JSONFromXML(xmlData, this.FillFromJSON.bind(this));
|
14
|
-
}
|
15
|
-
FillFromJSON(error, result) {
|
16
|
-
if (error != null) {
|
17
|
-
throw error;
|
18
|
-
}
|
19
|
-
let links = result[ConstInterface.MG_TAG_LINKS][ConstInterface.MG_TAG_LINK];
|
20
|
-
if (!isNullOrUndefined(links) && links.constructor === Array) {
|
21
|
-
for (let i = 0; i < links.length; i++) {
|
22
|
-
let link = links[i]['$'];
|
23
|
-
if (!isNullOrUndefined(link[ConstInterface.MG_ATTR_TABLE_INDEX])) {
|
24
|
-
let dataviewHeader = this._dataviewHeadersFactory.CreateDataviewHeaders(this._task);
|
25
|
-
let attributes = new Dictionary();
|
26
|
-
for (let key in link) {
|
27
|
-
if (key !== ConstInterface.MG_ATTR_TABLE_INDEX) {
|
28
|
-
attributes.Add(key, link[key]);
|
29
|
-
}
|
30
|
-
}
|
31
|
-
dataviewHeader.SetAttributes(attributes);
|
32
|
-
this._dataviewHeaders.set_Item(dataviewHeader.Id, dataviewHeader);
|
33
|
-
}
|
34
|
-
}
|
35
|
-
}
|
36
|
-
}
|
37
|
-
}
|
38
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiRGF0YXZpZXdIZWFkZXJzU2F4SGFuZGxlci5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uL3Byb2plY3RzL2VuZ2luZS9zcmMvcnQvRGF0YXZpZXdIZWFkZXJzU2F4SGFuZGxlci50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBQUMsVUFBVSxFQUFhLGlCQUFpQixFQUFDLE1BQU0sc0JBQXNCLENBQUM7QUFDOUUsT0FBTyxFQUFDLFVBQVUsRUFBQyxNQUFNLGtCQUFrQixDQUFDO0FBQzVDLE9BQU8sRUFBQyxxQkFBcUIsRUFBQyx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J1dGVzOiBEaWN0aW9uYXJ5PHN0cmluZz4gPSBuZXcgRGljdGlvbmFyeSgpO1xyXG5cclxuICAgICAgICAgIGZvciAobGV0IGtleSBpbiBsaW5rKSB7XHJcbiAgICAgICAgICAgIGlmIChrZXkgIT09IENvbnN0SW50ZXJmYWNlLk1HX0FUVFJfVEFCTEVfSU5ERVgpIHtcclxuICAgICAgICAgICAgICBhdHRyaWJ1dGVzLkFkZChrZXksIGxpbmtba2V5XSk7XHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICAgIH1cclxuXHJcbiAgICAgICAgICBkYXRhdmlld0hlYWRlci5TZXRBdHRyaWJ1dGVzKGF0dHJpYnV0ZXMpO1xyXG4gICAgICAgICAgdGhpcy5fZGF0YXZpZXdIZWFkZXJzLnNldF9JdGVtKGRhdGF2aWV3SGVhZGVyLklkLCBkYXRhdmlld0hlYWRlcik7XHJcbiAgICAgICAgfVxyXG4gICAgICB9XHJcbiAgICB9XHJcbiAgfVxyXG59XHJcbiJdfQ==
|
@@ -1,94 +0,0 @@
|
|
1
|
-
import { NNumber, Stack, StringBuilder } from "@magic-xpa/mscorelib";
|
2
|
-
import { ExecutionStackEntry } from "./ExecutionStackEntry";
|
3
|
-
import { ConstInterface } from "../ConstInterface";
|
4
|
-
import { XMLConstants } from "@magic-xpa/utils";
|
5
|
-
export class ExecutionStack {
|
6
|
-
constructor(inExecStack) {
|
7
|
-
this._execStack = null;
|
8
|
-
if (arguments.length === 0) {
|
9
|
-
this.constructor_0();
|
10
|
-
return;
|
11
|
-
}
|
12
|
-
this.constructor_1(inExecStack);
|
13
|
-
}
|
14
|
-
constructor_0() {
|
15
|
-
this._execStack = new Stack();
|
16
|
-
}
|
17
|
-
constructor_1(inExecStack) {
|
18
|
-
this._execStack = inExecStack.getStack().Clone();
|
19
|
-
}
|
20
|
-
getStack() {
|
21
|
-
return this._execStack;
|
22
|
-
}
|
23
|
-
push(execEntryOrTaskId, handlerId, operIdx) {
|
24
|
-
if (arguments.length === 1)
|
25
|
-
this.push_0(execEntryOrTaskId);
|
26
|
-
else
|
27
|
-
this.push_1(execEntryOrTaskId, handlerId, operIdx);
|
28
|
-
}
|
29
|
-
push_0(execEntry) {
|
30
|
-
this._execStack.push(execEntry);
|
31
|
-
}
|
32
|
-
push_1(taskId, handlerId, operIdx) {
|
33
|
-
let execEntry = new ExecutionStackEntry(taskId, handlerId, operIdx);
|
34
|
-
this._execStack.push(execEntry);
|
35
|
-
}
|
36
|
-
pop() {
|
37
|
-
return this._execStack.pop();
|
38
|
-
}
|
39
|
-
empty() {
|
40
|
-
return this._execStack.count() === 0;
|
41
|
-
}
|
42
|
-
clear() {
|
43
|
-
this._execStack.Clear();
|
44
|
-
}
|
45
|
-
size() {
|
46
|
-
return this._execStack.count();
|
47
|
-
}
|
48
|
-
Equals(execStackCmp) {
|
49
|
-
let tmpExecStack = new ExecutionStack(this);
|
50
|
-
let tmpExecStackCmp = new ExecutionStack(execStackCmp);
|
51
|
-
let equalStacks = false;
|
52
|
-
if (tmpExecStack.size() === tmpExecStackCmp.size()) {
|
53
|
-
equalStacks = true;
|
54
|
-
while (!tmpExecStack.empty() && equalStacks) {
|
55
|
-
if (!tmpExecStack.pop().Equals(tmpExecStackCmp.pop()))
|
56
|
-
equalStacks = false;
|
57
|
-
}
|
58
|
-
}
|
59
|
-
return equalStacks;
|
60
|
-
}
|
61
|
-
pushUpSideDown(inExecStack) {
|
62
|
-
let tmpStack = new ExecutionStack(inExecStack);
|
63
|
-
while (!tmpStack.empty()) {
|
64
|
-
let tmpStackEntry = tmpStack.pop();
|
65
|
-
this._execStack.push(tmpStackEntry);
|
66
|
-
}
|
67
|
-
}
|
68
|
-
reverse() {
|
69
|
-
let tmpExecStack = new ExecutionStack(this);
|
70
|
-
this.clear();
|
71
|
-
while (!tmpExecStack.empty()) {
|
72
|
-
let tmpExecStackEntry = tmpExecStack.pop();
|
73
|
-
this.push(tmpExecStackEntry);
|
74
|
-
}
|
75
|
-
}
|
76
|
-
buildXML(message) {
|
77
|
-
let forMessage = new StringBuilder();
|
78
|
-
while (this._execStack.count() !== 0) {
|
79
|
-
let ExecEntry = this._execStack.pop();
|
80
|
-
let taskTag = NNumber.Parse(ExecEntry.TaskId);
|
81
|
-
if (taskTag > ConstInterface.INITIAL_OFFLINE_TASK_TAG) {
|
82
|
-
forMessage.Remove(0, forMessage.Length);
|
83
|
-
continue;
|
84
|
-
}
|
85
|
-
forMessage.Append("\n " + XMLConstants.TAG_OPEN + ConstInterface.MG_TAG_EXEC_STACK_ENTRY);
|
86
|
-
forMessage.Append(" " + XMLConstants.MG_ATTR_TASKID + "=\"" + ExecEntry.TaskId + "\"");
|
87
|
-
forMessage.Append(" " + ConstInterface.MG_ATTR_HANDLERID + "=\"" + ExecEntry.HandlerId + "\"");
|
88
|
-
forMessage.Append(" " + ConstInterface.MG_ATTR_OPER_IDX + "=\"" + ExecEntry.OperIdx + "\"");
|
89
|
-
forMessage.Append(" " + XMLConstants.TAG_TERM);
|
90
|
-
}
|
91
|
-
message.Append(forMessage.ToString());
|
92
|
-
}
|
93
|
-
}
|
94
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiRXhlY3V0aW9uU3RhY2suanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi9wcm9qZWN0cy9lbmdpbmUvc3JjL3J0L0V4ZWN1dGlvblN0YWNrLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFBQyxPQUFPLEVBQUUsS0FBSyxFQUFFLGFBQWEsRUFBQyxNQUFNLHNCQUFzQixDQUFDO0FBQ25FLE9BQU8sRUFBQyxtQkFBbUIsRUFBQyxNQUFNLHVCQUF1QixDQUFDO0FBQzFELE9BQU8sRUFBQyxjQUFjLEVBQUMsTUFBTSxtQkFBbUIsQ0FBQztBQUNqRCxPQUFPLEVBQUMsWUFBWSxFQUFDLE1BQU0sa0JB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