@itwin/presentation-frontend
Version:
Frontend of iModel.js Presentation library
33 lines • 1.4 kB
JavaScript
;
/*---------------------------------------------------------------------------------------------
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
* See LICENSE.md in the project root for license terms and full copyright notice.
*--------------------------------------------------------------------------------------------*/
Object.defineProperty(exports, "__esModule", { value: true });
exports.IpcRequestsHandler = void 0;
const core_frontend_1 = require("@itwin/core-frontend");
const presentation_common_1 = require("@itwin/presentation-common");
const internal_1 = require("@itwin/presentation-common/internal");
/** @internal */
class IpcRequestsHandler {
_ipcProxy = core_frontend_1.IpcApp.makeIpcProxy(internal_1.PRESENTATION_IPC_CHANNEL_NAME);
clientId;
constructor(clientId) {
this.clientId = clientId;
}
async setRulesetVariable(params) {
return this._ipcProxy.setRulesetVariable({
...params,
clientId: this.clientId,
variable: presentation_common_1.RulesetVariable.toJSON(params.variable),
});
}
async unsetRulesetVariable(params) {
return this._ipcProxy.unsetRulesetVariable({
...params,
clientId: this.clientId,
});
}
}
exports.IpcRequestsHandler = IpcRequestsHandler;
//# sourceMappingURL=IpcRequestsHandler.js.map