mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-24 09:46:36 +00:00
Update dependency prettier to v3.3.3 (#21408)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Simon Lamon <32477463+silamon@users.noreply.github.com>
This commit is contained in:
parent
2a970b8416
commit
ef3758da55
@ -224,7 +224,7 @@
|
||||
"object-hash": "3.0.0",
|
||||
"open": "10.1.0",
|
||||
"pinst": "3.0.0",
|
||||
"prettier": "3.3.2",
|
||||
"prettier": "3.3.3",
|
||||
"rollup": "2.79.1",
|
||||
"rollup-plugin-string": "3.0.0",
|
||||
"rollup-plugin-terser": "7.0.2",
|
||||
|
@ -25,7 +25,9 @@ export const navigate = (path: string, options?: NavigateOptions) => {
|
||||
if (__DEMO__) {
|
||||
if (replace) {
|
||||
mainWindow.history.replaceState(
|
||||
mainWindow.history.state?.root ? { root: true } : options?.data ?? null,
|
||||
mainWindow.history.state?.root
|
||||
? { root: true }
|
||||
: (options?.data ?? null),
|
||||
"",
|
||||
`${mainWindow.location.pathname}#${path}`
|
||||
);
|
||||
@ -34,7 +36,7 @@ export const navigate = (path: string, options?: NavigateOptions) => {
|
||||
}
|
||||
} else if (replace) {
|
||||
mainWindow.history.replaceState(
|
||||
mainWindow.history.state?.root ? { root: true } : options?.data ?? null,
|
||||
mainWindow.history.state?.root ? { root: true } : (options?.data ?? null),
|
||||
"",
|
||||
path
|
||||
);
|
||||
|
@ -159,10 +159,10 @@ export class StateHistoryChartTimeline extends LitElement {
|
||||
},
|
||||
afterUpdate: (y) => {
|
||||
const yWidth = this.showNames
|
||||
? y.width ?? 0
|
||||
? (y.width ?? 0)
|
||||
: computeRTL(this.hass)
|
||||
? 0
|
||||
: y.left ?? 0;
|
||||
: (y.left ?? 0);
|
||||
if (
|
||||
this._yWidth !== Math.floor(yWidth) &&
|
||||
y.ticks.length === this.data.length
|
||||
|
@ -109,7 +109,8 @@ export class DialogDataTableSettings extends LitElement {
|
||||
const canHide = !col.main && col.hideable !== false;
|
||||
const isVisible = !(this._columnOrder &&
|
||||
this._columnOrder.includes(col.key)
|
||||
? this._hiddenColumns?.includes(col.key) ?? col.defaultHidden
|
||||
? (this._hiddenColumns?.includes(col.key) ??
|
||||
col.defaultHidden)
|
||||
: col.defaultHidden);
|
||||
|
||||
return html`<ha-list-item
|
||||
|
@ -379,7 +379,8 @@ export class HaDataTable extends LitElement {
|
||||
if (
|
||||
column.hidden ||
|
||||
(this.columnOrder && this.columnOrder.includes(key)
|
||||
? this.hiddenColumns?.includes(key) ?? column.defaultHidden
|
||||
? (this.hiddenColumns?.includes(key) ??
|
||||
column.defaultHidden)
|
||||
: column.defaultHidden)
|
||||
) {
|
||||
return nothing;
|
||||
@ -518,7 +519,7 @@ export class HaDataTable extends LitElement {
|
||||
(narrow && !column.main && !column.showNarrow) ||
|
||||
column.hidden ||
|
||||
(this.columnOrder && this.columnOrder.includes(key)
|
||||
? this.hiddenColumns?.includes(key) ?? column.defaultHidden
|
||||
? (this.hiddenColumns?.includes(key) ?? column.defaultHidden)
|
||||
: column.defaultHidden)
|
||||
) {
|
||||
return nothing;
|
||||
@ -560,8 +561,8 @@ export class HaDataTable extends LitElement {
|
||||
!column2.showNarrow &&
|
||||
!(this.columnOrder &&
|
||||
this.columnOrder.includes(key2)
|
||||
? this.hiddenColumns?.includes(key2) ??
|
||||
column2.defaultHidden
|
||||
? (this.hiddenColumns?.includes(key2) ??
|
||||
column2.defaultHidden)
|
||||
: column2.defaultHidden)
|
||||
)
|
||||
.map(
|
||||
|
@ -134,7 +134,7 @@ export class HaStateLabelBadge extends LitElement {
|
||||
this._timerTimeRemaining
|
||||
)}
|
||||
.description=${this.showName
|
||||
? this.name ?? computeStateName(entityState)
|
||||
? (this.name ?? computeStateName(entityState))
|
||||
: undefined}
|
||||
>
|
||||
${!image && showIcon
|
||||
|
@ -483,12 +483,12 @@ export class HaMap extends ReactiveElement {
|
||||
const entityName =
|
||||
typeof entity !== "string" && entity.label_mode === "state"
|
||||
? this.hass.formatEntityState(stateObj)
|
||||
: customTitle ??
|
||||
: (customTitle ??
|
||||
title
|
||||
.split(" ")
|
||||
.map((part) => part[0])
|
||||
.join("")
|
||||
.substr(0, 3);
|
||||
.substr(0, 3));
|
||||
|
||||
// create marker with the icon
|
||||
const marker = Leaflet.marker([latitude, longitude], {
|
||||
|
@ -115,8 +115,8 @@ export function computeCoverPositionStateDisplay(
|
||||
position?: number
|
||||
) {
|
||||
const statePosition = stateActive(stateObj)
|
||||
? stateObj.attributes.current_position ??
|
||||
stateObj.attributes.current_tilt_position
|
||||
? (stateObj.attributes.current_position ??
|
||||
stateObj.attributes.current_tilt_position)
|
||||
: undefined;
|
||||
|
||||
const currentPosition = position ?? statePosition;
|
||||
|
@ -354,7 +354,7 @@ export const provideHass = (
|
||||
(state !== null ? state : stateObj.state) ?? "",
|
||||
formatEntityAttributeName: (_stateObj, attribute) => attribute,
|
||||
formatEntityAttributeValue: (stateObj, attribute, value) =>
|
||||
value !== null ? value : stateObj.attributes[attribute] ?? "",
|
||||
value !== null ? value : (stateObj.attributes[attribute] ?? ""),
|
||||
...overrideData,
|
||||
};
|
||||
|
||||
|
@ -61,7 +61,7 @@ class HuiCoverPositionCardFeature
|
||||
}
|
||||
|
||||
const percentage = stateActive(this.stateObj)
|
||||
? this.stateObj.attributes.current_position ?? 0
|
||||
? (this.stateObj.attributes.current_position ?? 0)
|
||||
: 0;
|
||||
|
||||
const value = Math.max(Math.round(percentage), 0);
|
||||
|
@ -74,7 +74,7 @@ class HuiFanSpeedCardFeature extends LitElement implements LovelaceCardFeature {
|
||||
const speedCount = computeFanSpeedCount(this.stateObj);
|
||||
|
||||
const percentage = stateActive(this.stateObj)
|
||||
? this.stateObj.attributes.percentage ?? 0
|
||||
? (this.stateObj.attributes.percentage ?? 0)
|
||||
: 0;
|
||||
|
||||
if (speedCount <= FAN_SPEED_COUNT_MAX_FOR_BUTTONS) {
|
||||
|
@ -161,7 +161,7 @@ export class HuiGenericEntityRow extends LitElement {
|
||||
: ""}
|
||||
</div>`
|
||||
: nothing}
|
||||
${this.catchInteraction ?? !DOMAINS_INPUT_ROW.includes(domain)
|
||||
${(this.catchInteraction ?? !DOMAINS_INPUT_ROW.includes(domain))
|
||||
? html`<div
|
||||
class="text-content value ${classMap({
|
||||
pointer,
|
||||
|
@ -127,8 +127,8 @@ export class HaCardConditionState extends LitElement {
|
||||
const condition: StateCondition = {
|
||||
condition: "state",
|
||||
...content,
|
||||
state: invert === "false" ? state ?? "" : undefined,
|
||||
state_not: invert === "true" ? state ?? "" : undefined,
|
||||
state: invert === "false" ? (state ?? "") : undefined,
|
||||
state_not: invert === "true" ? (state ?? "") : undefined,
|
||||
};
|
||||
|
||||
fireEvent(this, "value-changed", { value: condition });
|
||||
|
@ -34,7 +34,7 @@ export class HaStateControlFanSpeed extends LitElement {
|
||||
protected updated(changedProp: Map<string | number | symbol, unknown>): void {
|
||||
if (changedProp.has("stateObj")) {
|
||||
const percentage = stateActive(this.stateObj)
|
||||
? this.stateObj.attributes.percentage ?? 0
|
||||
? (this.stateObj.attributes.percentage ?? 0)
|
||||
: 0;
|
||||
this.sliderValue = Math.max(Math.round(percentage), 0);
|
||||
this.speedValue = fanPercentageToSpeed(this.stateObj, percentage);
|
||||
|
@ -201,7 +201,7 @@ export const connectionMixin = <T extends Constructor<HassBaseEl>>(
|
||||
(state != null ? state : stateObj.state) ?? "",
|
||||
formatEntityAttributeName: (_stateObj, attribute) => attribute,
|
||||
formatEntityAttributeValue: (stateObj, attribute, value) =>
|
||||
value != null ? value : stateObj.attributes[attribute] ?? "",
|
||||
value != null ? value : (stateObj.attributes[attribute] ?? ""),
|
||||
...getState(),
|
||||
...this._pendingHass,
|
||||
};
|
||||
|
10
yarn.lock
10
yarn.lock
@ -9074,7 +9074,7 @@ __metadata:
|
||||
object-hash: "npm:3.0.0"
|
||||
open: "npm:10.1.0"
|
||||
pinst: "npm:3.0.0"
|
||||
prettier: "npm:3.3.2"
|
||||
prettier: "npm:3.3.3"
|
||||
proxy-polyfill: "npm:0.3.2"
|
||||
punycode: "npm:2.3.1"
|
||||
qr-scanner: "npm:1.4.2"
|
||||
@ -12153,12 +12153,12 @@ __metadata:
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"prettier@npm:3.3.2":
|
||||
version: 3.3.2
|
||||
resolution: "prettier@npm:3.3.2"
|
||||
"prettier@npm:3.3.3":
|
||||
version: 3.3.3
|
||||
resolution: "prettier@npm:3.3.3"
|
||||
bin:
|
||||
prettier: bin/prettier.cjs
|
||||
checksum: 10/83214e154afa5aa9b664c2506640212323eb1376b13379b2413dc351b7de0687629dca3f00ff2ec895ebd7e3a2adb7d7e231b6c77606e2358137f2150807405b
|
||||
checksum: 10/5beac1f30b5b40162532b8e2f7c3a4eb650910a2695e9c8512a62ffdc09dae93190c29db9107fa7f26d1b6c71aad3628ecb9b5de1ecb0911191099be109434d7
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user