refactor: Convert protected methods to private (#2358)

This commit is contained in:
Dermot Duffy
2026-02-19 20:47:59 -08:00
committed by GitHub
parent 529500ed94
commit 0a67df9a25
122 changed files with 815 additions and 829 deletions
+6 -6
View File
@@ -10,7 +10,7 @@ import { View } from '../view/view';
import { CardStyleAPI } from './types';
export class StyleManager {
protected _api: CardStyleAPI;
private _api: CardStyleAPI;
constructor(api: CardStyleAPI) {
this._api = api;
@@ -73,13 +73,13 @@ export class StyleManager {
}
}
protected _getThemeNames(themeConfig: ThemeConfig): ThemeName[] | null {
private _getThemeNames(themeConfig: ThemeConfig): ThemeName[] | null {
return themeConfig.themes.length
? themeConfig.themes
: configDefaults.view.theme.themes;
}
protected _setDimmable(): void {
private _setDimmable(): void {
const config = this._api.getConfigManager().getConfig();
setOrRemoveAttribute(
this._api.getCardElementManager().getElement(),
@@ -88,7 +88,7 @@ export class StyleManager {
);
}
protected _setMinMaxHeight(): void {
private _setMinMaxHeight(): void {
const config = this._api.getConfigManager().getConfig();
if (config) {
const card = this._api.getCardElementManager().getElement();
@@ -96,7 +96,7 @@ export class StyleManager {
}
}
protected _setPerformance(): void {
private _setPerformance(): void {
const STYLE_DISABLE_MAP = {
box_shadow: {
cssKey: '--advanced-camera-card-box-shadow-override',
@@ -122,7 +122,7 @@ export class StyleManager {
}
}
protected _isAspectRatioEnforced(
private _isAspectRatioEnforced(
config: AdvancedCameraCardConfig,
view?: View | null,
): boolean {