@itwin/presentation-frontend
Version:
Frontend of iModel.js Presentation library
29 lines • 1.19 kB
JavaScript
/*---------------------------------------------------------------------------------------------
* 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 { RulesetVariable } from "@itwin/presentation-common";
import { PRESENTATION_IPC_CHANNEL_NAME } from "@itwin/presentation-common/internal";
/** @internal */
export class IpcRequestsHandler {
_ipcProxy = IpcApp.makeIpcProxy(PRESENTATION_IPC_CHANNEL_NAME);
clientId;
constructor(clientId) {
this.clientId = clientId;
}
async setRulesetVariable(params) {
return this._ipcProxy.setRulesetVariable({
...params,
clientId: this.clientId,
variable: RulesetVariable.toJSON(params.variable),
});
}
async unsetRulesetVariable(params) {
return this._ipcProxy.unsetRulesetVariable({
...params,
clientId: this.clientId,
});
}
}
//# sourceMappingURL=IpcRequestsHandler.js.map