UNPKG

@itwin/presentation-frontend

Version:

Frontend of iModel.js Presentation library

29 lines 1.21 kB
/*--------------------------------------------------------------------------------------------- * Copyright (c) Bentley Systems, Incorporated. All rights reserved. * See LICENSE.md in the project root for license terms and full copyright notice. *--------------------------------------------------------------------------------------------*/ import { IpcApp } from "@itwin/core-frontend"; import { PRESENTATION_IPC_CHANNEL_NAME, RulesetVariable, } from "@itwin/presentation-common"; /** @internal */ export class IpcRequestsHandler { constructor(clientId) { this._ipcProxy = IpcApp.makeIpcProxy(PRESENTATION_IPC_CHANNEL_NAME); this.clientId = clientId; } async setRulesetVariable(params) { const jsonParams = { ...params, clientId: this.clientId, variable: RulesetVariable.toJSON(params.variable), }; return this._ipcProxy.setRulesetVariable(jsonParams); } async unsetRulesetVariable(params) { const jsonParams = { ...params, clientId: this.clientId, }; return this._ipcProxy.unsetRulesetVariable(jsonParams); } } //# sourceMappingURL=IpcRequestsHandler.js.map