mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-25 18:26:35 +00:00
20230501.0 (#16364)
This commit is contained in:
commit
d0c7f65256
59
build-scripts/list-plugins-and-polyfills.js
Executable file
59
build-scripts/list-plugins-and-polyfills.js
Executable file
@ -0,0 +1,59 @@
|
|||||||
|
#!/usr/bin/env node
|
||||||
|
// Script to print Babel plugins and Core JS polyfills that will be used by browserslist environments
|
||||||
|
|
||||||
|
import { version as babelVersion } from "@babel/core";
|
||||||
|
import presetEnv from "@babel/preset-env";
|
||||||
|
import compilationTargets from "@babel/helper-compilation-targets";
|
||||||
|
import coreJSCompat from "core-js-compat";
|
||||||
|
import { logPlugin } from "@babel/preset-env/lib/debug.js";
|
||||||
|
import { babelOptions } from "./bundle.cjs";
|
||||||
|
|
||||||
|
const detailsOpen = (heading) =>
|
||||||
|
`<details>\n<summary><h4>${heading}</h4></summary>\n`;
|
||||||
|
const detailsClose = "</details>\n";
|
||||||
|
|
||||||
|
const dummyAPI = {
|
||||||
|
version: babelVersion,
|
||||||
|
assertVersion: () => {},
|
||||||
|
caller: (callback) =>
|
||||||
|
callback({
|
||||||
|
name: "Dummy Bundler",
|
||||||
|
supportsStaticESM: true,
|
||||||
|
supportsDynamicImport: true,
|
||||||
|
supportsTopLevelAwait: true,
|
||||||
|
supportsExportNamespaceFrom: true,
|
||||||
|
}),
|
||||||
|
targets: () => ({}),
|
||||||
|
};
|
||||||
|
|
||||||
|
for (const buildType of ["Modern", "Legacy"]) {
|
||||||
|
const browserslistEnv = buildType.toLowerCase();
|
||||||
|
const babelOpts = babelOptions({ latestBuild: browserslistEnv === "modern" });
|
||||||
|
const presetEnvOpts = babelOpts.presets[0][1];
|
||||||
|
|
||||||
|
// Invoking preset-env in debug mode will log the included plugins
|
||||||
|
console.log(detailsOpen(`${buildType} Build Babel Plugins`));
|
||||||
|
presetEnv.default(dummyAPI, {
|
||||||
|
...presetEnvOpts,
|
||||||
|
browserslistEnv,
|
||||||
|
debug: true,
|
||||||
|
});
|
||||||
|
console.log(detailsClose);
|
||||||
|
|
||||||
|
// Manually log the Core-JS polyfills using the same technique
|
||||||
|
if (presetEnvOpts.useBuiltIns) {
|
||||||
|
console.log(detailsOpen(`${buildType} Build Core-JS Polyfills`));
|
||||||
|
const targets = compilationTargets.default(babelOpts?.targets, {
|
||||||
|
browserslistEnv,
|
||||||
|
});
|
||||||
|
const polyfillList = coreJSCompat({ targets }).list;
|
||||||
|
console.log(
|
||||||
|
"The following %i polyfills may be injected by Babel:\n",
|
||||||
|
polyfillList.length
|
||||||
|
);
|
||||||
|
for (const polyfill of polyfillList) {
|
||||||
|
logPlugin(polyfill, targets, coreJSCompat.data);
|
||||||
|
}
|
||||||
|
console.log(detailsClose);
|
||||||
|
}
|
||||||
|
}
|
@ -1,30 +0,0 @@
|
|||||||
#!/usr/bin/env node
|
|
||||||
// Script to print Babel plugins that will be used by browserslist environments
|
|
||||||
|
|
||||||
import { version as babelVersion } from "@babel/core";
|
|
||||||
import presetEnv from "@babel/preset-env";
|
|
||||||
import { babelOptions } from "./bundle.cjs";
|
|
||||||
|
|
||||||
const dummyAPI = {
|
|
||||||
version: babelVersion,
|
|
||||||
assertVersion: () => {},
|
|
||||||
caller: (callback) =>
|
|
||||||
callback({
|
|
||||||
name: "Dummy Bundler",
|
|
||||||
supportsStaticESM: true,
|
|
||||||
supportsDynamicImport: true,
|
|
||||||
supportsTopLevelAwait: true,
|
|
||||||
supportsExportNamespaceFrom: true,
|
|
||||||
}),
|
|
||||||
targets: () => ({}),
|
|
||||||
};
|
|
||||||
|
|
||||||
for (const browserslistEnv of ["modern", "legacy"]) {
|
|
||||||
console.log("\nBrowsersList Environment = %s\n", browserslistEnv);
|
|
||||||
presetEnv.default(dummyAPI, {
|
|
||||||
...babelOptions({ latestBuild: browserslistEnv === "modern" })
|
|
||||||
.presets[0][1],
|
|
||||||
browserslistEnv,
|
|
||||||
debug: true,
|
|
||||||
});
|
|
||||||
}
|
|
@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
|
|||||||
|
|
||||||
[project]
|
[project]
|
||||||
name = "home-assistant-frontend"
|
name = "home-assistant-frontend"
|
||||||
version = "20230428.0"
|
version = "20230501.0"
|
||||||
license = {text = "Apache-2.0"}
|
license = {text = "Apache-2.0"}
|
||||||
description = "The Home Assistant frontend"
|
description = "The Home Assistant frontend"
|
||||||
readme = "README.md"
|
readme = "README.md"
|
||||||
|
@ -401,6 +401,7 @@ export class HaVoiceCommandDialog extends LitElement {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
this._stt_binary_handler_id = undefined;
|
||||||
this._audioBuffer = [];
|
this._audioBuffer = [];
|
||||||
const userMessage: Message = {
|
const userMessage: Message = {
|
||||||
who: "user",
|
who: "user",
|
||||||
@ -463,6 +464,7 @@ export class HaVoiceCommandDialog extends LitElement {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (event.type === "run-end") {
|
if (event.type === "run-end") {
|
||||||
|
this._stt_binary_handler_id = undefined;
|
||||||
unsub();
|
unsub();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -509,6 +511,7 @@ export class HaVoiceCommandDialog extends LitElement {
|
|||||||
}
|
}
|
||||||
// Send empty message to indicate we're done streaming.
|
// Send empty message to indicate we're done streaming.
|
||||||
this._sendAudioChunk(new Int16Array());
|
this._sendAudioChunk(new Int16Array());
|
||||||
|
this._stt_binary_handler_id = undefined;
|
||||||
}
|
}
|
||||||
this._audioBuffer = undefined;
|
this._audioBuffer = undefined;
|
||||||
}
|
}
|
||||||
|
@ -498,12 +498,22 @@ class DialogCalendarEventEditor extends LitElement {
|
|||||||
this._submitting = false;
|
this._submitting = false;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
const eventData = this._calculateData();
|
||||||
|
if (eventData.rrule && range === RecurrenceRange.THISEVENT) {
|
||||||
|
// Updates to a single instance of a recurring event by definition
|
||||||
|
// cannot change the recurrence rule and doing so would be invalid.
|
||||||
|
// It is difficult to detect if the user changed the recurrence rule
|
||||||
|
// since updating the date may change it implicitly (e.g. day of week
|
||||||
|
// of the event changes) so we just assume the users intent based on
|
||||||
|
// recurrence range and drop any other rrule changes.
|
||||||
|
eventData.rrule = undefined;
|
||||||
|
}
|
||||||
try {
|
try {
|
||||||
await updateCalendarEvent(
|
await updateCalendarEvent(
|
||||||
this.hass!,
|
this.hass!,
|
||||||
this._calendarId!,
|
this._calendarId!,
|
||||||
entry.uid!,
|
entry.uid!,
|
||||||
this._calculateData(),
|
eventData,
|
||||||
entry.recurrence_id || "",
|
entry.recurrence_id || "",
|
||||||
range!
|
range!
|
||||||
);
|
);
|
||||||
|
@ -49,10 +49,10 @@ export class DialogVoiceAssistantPipelineDetail extends LitElement {
|
|||||||
public showDialog(params: VoiceAssistantPipelineDetailsDialogParams): void {
|
public showDialog(params: VoiceAssistantPipelineDetailsDialogParams): void {
|
||||||
this._params = params;
|
this._params = params;
|
||||||
this._error = undefined;
|
this._error = undefined;
|
||||||
|
this._cloudActive = this._params.cloudActiveSubscription;
|
||||||
if (this._params.pipeline) {
|
if (this._params.pipeline) {
|
||||||
this._data = this._params.pipeline;
|
this._data = this._params.pipeline;
|
||||||
this._preferred = this._params.preferred;
|
this._preferred = this._params.preferred;
|
||||||
this._cloudActive = this._params.cloudActiveSubscription;
|
|
||||||
} else {
|
} else {
|
||||||
this._data = {
|
this._data = {
|
||||||
language: (
|
language: (
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
import { mdiAlertCircle } from "@mdi/js";
|
||||||
import {
|
import {
|
||||||
css,
|
css,
|
||||||
CSSResultGroup,
|
CSSResultGroup,
|
||||||
@ -32,8 +33,8 @@ import {
|
|||||||
updateEntityRegistryEntry,
|
updateEntityRegistryEntry,
|
||||||
} from "../../../data/entity_registry";
|
} from "../../../data/entity_registry";
|
||||||
import {
|
import {
|
||||||
GoogleEntity,
|
|
||||||
fetchCloudGoogleEntity,
|
fetchCloudGoogleEntity,
|
||||||
|
GoogleEntity,
|
||||||
} from "../../../data/google_assistant";
|
} from "../../../data/google_assistant";
|
||||||
import { exposeEntities, voiceAssistants } from "../../../data/voice";
|
import { exposeEntities, voiceAssistants } from "../../../data/voice";
|
||||||
import { SubscribeMixin } from "../../../mixins/subscribe-mixin";
|
import { SubscribeMixin } from "../../../mixins/subscribe-mixin";
|
||||||
@ -223,7 +224,8 @@ export class EntityVoiceSettings extends SubscribeMixin(LitElement) {
|
|||||||
/>
|
/>
|
||||||
<span slot="heading">${voiceAssistants[key].name}</span>
|
<span slot="heading">${voiceAssistants[key].name}</span>
|
||||||
${!supported
|
${!supported
|
||||||
? html`<div slot="description">
|
? html`<div slot="description" class="unsupported">
|
||||||
|
<ha-svg-icon .path=${mdiAlertCircle}></ha-svg-icon>
|
||||||
${this.hass.localize(
|
${this.hass.localize(
|
||||||
"ui.dialogs.voice-settings.unsupported"
|
"ui.dialogs.voice-settings.unsupported"
|
||||||
)}
|
)}
|
||||||
@ -379,6 +381,15 @@ export class EntityVoiceSettings extends SubscribeMixin(LitElement) {
|
|||||||
ha-checkbox {
|
ha-checkbox {
|
||||||
--mdc-checkbox-state-layer-size: 40px;
|
--mdc-checkbox-state-layer-size: 40px;
|
||||||
}
|
}
|
||||||
|
.unsupported {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
}
|
||||||
|
.unsupported ha-svg-icon {
|
||||||
|
color: var(--error-color);
|
||||||
|
--mdc-icon-size: 16px;
|
||||||
|
margin-right: 4px;
|
||||||
|
}
|
||||||
.header {
|
.header {
|
||||||
margin-top: 8px;
|
margin-top: 8px;
|
||||||
margin-bottom: 4px;
|
margin-bottom: 4px;
|
||||||
|
@ -1063,7 +1063,8 @@ class HUIRoot extends LitElement {
|
|||||||
padding-right: env(safe-area-inset-right);
|
padding-right: env(safe-area-inset-right);
|
||||||
padding-bottom: env(safe-area-inset-bottom);
|
padding-bottom: env(safe-area-inset-bottom);
|
||||||
}
|
}
|
||||||
hui-view {
|
hui-view,
|
||||||
|
hui-unused-entities {
|
||||||
flex: 1 1 100%;
|
flex: 1 1 100%;
|
||||||
max-width: 100%;
|
max-width: 100%;
|
||||||
}
|
}
|
||||||
|
@ -2761,7 +2761,7 @@
|
|||||||
"alert_password_change_required": "You need to change your password before logging in.",
|
"alert_password_change_required": "You need to change your password before logging in.",
|
||||||
"alert_email_confirm_necessary": "You need to confirm your email before logging in.",
|
"alert_email_confirm_necessary": "You need to confirm your email before logging in.",
|
||||||
"cloud_pipeline_title": "Want to use Home Assistant Cloud for your voice assistant?",
|
"cloud_pipeline_title": "Want to use Home Assistant Cloud for your voice assistant?",
|
||||||
"cloud_pipeline_text": "We created a new assistant for you, using the great text-to-speech and speech-to-text engines from Home Assistant Cloud. Would you like to set this assistant as the preferred assistant?"
|
"cloud_pipeline_text": "We created a new assistant for you, using the superior text-to-speech and speech-to-text engines from Home Assistant Cloud. Would you like to set this assistant as the preferred assistant?"
|
||||||
},
|
},
|
||||||
"forgot_password": {
|
"forgot_password": {
|
||||||
"title": "Forgot password",
|
"title": "Forgot password",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user