@adaptabletools/adaptable-cjs
Version:
Powerful data-agnostic HTML5 AG Grid extension which provides advanced, cutting-edge functionality to meet all DataGrid requirements
26 lines (25 loc) • 878 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.ThemeInternalApi = void 0;
const windowFactory_1 = require("../../View/Components/Popups/WindowPopups/windowFactory");
const ApiBase_1 = require("../Implementation/ApiBase");
class ThemeInternalApi extends ApiBase_1.ApiBase {
isSystemTheme(themeName) {
return this.getThemeApi()
.getSystemThemes()
.some((theme) => theme.Name === themeName);
}
getThemeClassName(theme) {
return `ab--theme-${theme}`;
}
openInWindow() {
this.getAdaptableInternalApi().showPopupWindow({
id: windowFactory_1.SHOW_THEME_EDITOR,
title: 'Theme',
icon: 'theme',
factoryId: windowFactory_1.SHOW_THEME_EDITOR,
popupProps: {},
});
}
}
exports.ThemeInternalApi = ThemeInternalApi;