mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-31 13:07:49 +00:00
commit
1dcd913c04
@ -222,7 +222,7 @@ gulp.task("gen-index-gallery-dev", (done) => {
|
||||
// In dev mode we don't mangle names, so we hardcode urls. That way we can
|
||||
// run webpack as last in watch mode, which blocks output.
|
||||
const content = renderGalleryTemplate("index", {
|
||||
latestGalleryJS: "./entrypoint.js",
|
||||
latestGalleryJS: "./frontend_latest/entrypoint.js",
|
||||
});
|
||||
|
||||
fs.outputFileSync(path.resolve(config.gallery_root, "index.html"), content);
|
||||
|
@ -150,9 +150,8 @@ gulp.task(
|
||||
|
||||
gulp.task("webpack-dev-server-gallery", () => {
|
||||
runDevServer({
|
||||
compiler: webpack(
|
||||
createGalleryConfig({ latestBuild: true, isProdBuild: false })
|
||||
),
|
||||
// We don't use the es5 build, but the dev server will fuck up the publicPath if we don't
|
||||
compiler: webpack(bothBuilds(createGalleryConfig, { isProdBuild: false })),
|
||||
contentBase: paths.gallery_root,
|
||||
port: 8100,
|
||||
});
|
||||
|
@ -245,9 +245,6 @@ const createHassioConfig = ({ isProdBuild, latestBuild }) => {
|
||||
};
|
||||
|
||||
const createGalleryConfig = ({ isProdBuild, latestBuild }) => {
|
||||
if (!latestBuild) {
|
||||
throw new Error("Gallery only supports latest build!");
|
||||
}
|
||||
const config = createWebpackConfig({
|
||||
entry: {
|
||||
entrypoint: path.resolve(paths.gallery_dir, "src/entrypoint.js"),
|
||||
|
@ -57,6 +57,13 @@ class DemoCard extends PolymerElement {
|
||||
};
|
||||
}
|
||||
|
||||
ready() {
|
||||
super.ready();
|
||||
this.addEventListener("ll-rebuild", () => {
|
||||
this._configChanged(this.config);
|
||||
});
|
||||
}
|
||||
|
||||
_configChanged(config) {
|
||||
const card = this.$.card;
|
||||
while (card.lastChild) {
|
||||
|
@ -4,7 +4,6 @@ import { PolymerElement } from "@polymer/polymer/polymer-element";
|
||||
import { provideHass } from "../../../src/fake_data/provide_hass";
|
||||
import "../components/demo-cards";
|
||||
import { createMediaPlayerEntities } from "../data/media_players";
|
||||
import "../../../src/panels/lovelace/cards/hui-media-control-card";
|
||||
|
||||
const CONFIGS = [
|
||||
{
|
||||
|
@ -1,72 +1,5 @@
|
||||
const path = require("path");
|
||||
const CopyWebpackPlugin = require("copy-webpack-plugin");
|
||||
const { createGalleryConfig } = require("../build-scripts/webpack.js");
|
||||
const { babelLoaderConfig } = require("../build-scripts/babel.js");
|
||||
|
||||
const isProd = process.env.NODE_ENV === "production";
|
||||
const chunkFilename = isProd ? "chunk.[chunkhash].js" : "[name].chunk.js";
|
||||
const buildPath = path.resolve(__dirname, "dist");
|
||||
const publicPath = isProd ? "./" : "http://localhost:8080/";
|
||||
const latestBuild = true;
|
||||
|
||||
module.exports = createGalleryConfig({
|
||||
latestBuild: true,
|
||||
});
|
||||
|
||||
const bla = () => {
|
||||
const oldExports = {
|
||||
mode: isProd ? "production" : "development",
|
||||
// Disabled in prod while we make Home Assistant able to serve the right files.
|
||||
// Was source-map
|
||||
devtool: isProd ? "none" : "inline-source-map",
|
||||
entry: "./src/entrypoint.js",
|
||||
module: {
|
||||
rules: [
|
||||
babelLoaderConfig({ latestBuild }),
|
||||
{
|
||||
test: /\.css$/,
|
||||
use: "raw-loader",
|
||||
},
|
||||
{
|
||||
test: /\.(html)$/,
|
||||
use: {
|
||||
loader: "html-loader",
|
||||
options: {
|
||||
exportAsEs6Default: true,
|
||||
},
|
||||
},
|
||||
},
|
||||
],
|
||||
},
|
||||
optimization: webpackBase.optimization(latestBuild),
|
||||
plugins: [
|
||||
new CopyWebpackPlugin([
|
||||
"public",
|
||||
{ from: "../public", to: "static" },
|
||||
{ from: "../build-translations/output", to: "static/translations" },
|
||||
{
|
||||
from: "../node_modules/leaflet/dist/leaflet.css",
|
||||
to: "static/images/leaflet/",
|
||||
},
|
||||
{
|
||||
from: "../node_modules/roboto-fontface/fonts/roboto/*.woff2",
|
||||
to: "static/fonts/roboto/",
|
||||
},
|
||||
{
|
||||
from: "../node_modules/leaflet/dist/images",
|
||||
to: "static/images/leaflet/",
|
||||
},
|
||||
]),
|
||||
].filter(Boolean),
|
||||
resolve: webpackBase.resolve,
|
||||
output: {
|
||||
filename: "[name].js",
|
||||
chunkFilename: chunkFilename,
|
||||
path: buildPath,
|
||||
publicPath,
|
||||
},
|
||||
devServer: {
|
||||
contentBase: "./public",
|
||||
},
|
||||
};
|
||||
};
|
||||
|
@ -178,7 +178,7 @@
|
||||
"web-component-tester": "^6.9.2",
|
||||
"webpack": "^4.40.2",
|
||||
"webpack-cli": "^3.3.9",
|
||||
"webpack-dev-server": "^3.8.1",
|
||||
"webpack-dev-server": "^3.10.3",
|
||||
"webpack-manifest-plugin": "^2.0.4",
|
||||
"workbox-webpack-plugin": "^4.1.1",
|
||||
"workerize-loader": "^1.1.0"
|
||||
|
2
setup.py
2
setup.py
@ -2,7 +2,7 @@ from setuptools import setup, find_packages
|
||||
|
||||
setup(
|
||||
name="home-assistant-frontend",
|
||||
version="20200406.0",
|
||||
version="20200407.0",
|
||||
description="The Home Assistant frontend",
|
||||
url="https://github.com/home-assistant/home-assistant-polymer",
|
||||
author="The Home Assistant Authors",
|
||||
|
@ -1,50 +1,47 @@
|
||||
import "@polymer/paper-tooltip/paper-tooltip";
|
||||
import {
|
||||
property,
|
||||
LitElement,
|
||||
html,
|
||||
customElement,
|
||||
css,
|
||||
CSSResult,
|
||||
customElement,
|
||||
html,
|
||||
LitElement,
|
||||
property,
|
||||
} from "lit-element";
|
||||
|
||||
import { ifDefined } from "lit-html/directives/if-defined";
|
||||
import memoizeOne from "memoize-one";
|
||||
|
||||
import "@polymer/paper-tooltip/paper-tooltip";
|
||||
|
||||
import "../../../layouts/hass-tabs-subpage";
|
||||
import "../../../layouts/hass-error-screen";
|
||||
import "../ha-config-section";
|
||||
|
||||
import "./device-detail/ha-device-info-card";
|
||||
import "./device-detail/ha-device-card-mqtt";
|
||||
import "./device-detail/ha-device-entities-card";
|
||||
import { HomeAssistant, Route } from "../../../types";
|
||||
import { isComponentLoaded } from "../../../common/config/is_component_loaded";
|
||||
import { computeStateName } from "../../../common/entity/compute_state_name";
|
||||
import { createValidEntityId } from "../../../common/entity/valid_entity_id";
|
||||
import { compare } from "../../../common/string/compare";
|
||||
import "../../../components/ha-icon-next";
|
||||
import "../../../components/entity/ha-state-icon";
|
||||
import { AreaRegistryEntry } from "../../../data/area_registry";
|
||||
import { ConfigEntry } from "../../../data/config_entries";
|
||||
import {
|
||||
EntityRegistryEntry,
|
||||
updateEntityRegistryEntry,
|
||||
findBatteryEntity,
|
||||
} from "../../../data/entity_registry";
|
||||
import {
|
||||
DeviceRegistryEntry,
|
||||
computeDeviceName,
|
||||
DeviceRegistryEntry,
|
||||
updateDeviceRegistryEntry,
|
||||
} from "../../../data/device_registry";
|
||||
import { AreaRegistryEntry } from "../../../data/area_registry";
|
||||
import {
|
||||
EntityRegistryEntry,
|
||||
findBatteryEntity,
|
||||
updateEntityRegistryEntry,
|
||||
} from "../../../data/entity_registry";
|
||||
import { SceneEntities, showSceneEditor } from "../../../data/scene";
|
||||
import { findRelated, RelatedResult } from "../../../data/search";
|
||||
import {
|
||||
loadDeviceRegistryDetailDialog,
|
||||
showDeviceRegistryDetailDialog,
|
||||
} from "../../../dialogs/device-registry-detail/show-dialog-device-registry-detail";
|
||||
import "../../../components/ha-icon-next";
|
||||
import { compare } from "../../../common/string/compare";
|
||||
import { computeStateName } from "../../../common/entity/compute_state_name";
|
||||
import { createValidEntityId } from "../../../common/entity/valid_entity_id";
|
||||
import "../../../layouts/hass-error-screen";
|
||||
import "../../../layouts/hass-tabs-subpage";
|
||||
import { HomeAssistant, Route } from "../../../types";
|
||||
import "../ha-config-section";
|
||||
import { configSections } from "../ha-panel-config";
|
||||
import { RelatedResult, findRelated } from "../../../data/search";
|
||||
import { SceneEntities, showSceneEditor } from "../../../data/scene";
|
||||
import "./device-detail/ha-device-card-mqtt";
|
||||
import "./device-detail/ha-device-entities-card";
|
||||
import "./device-detail/ha-device-info-card";
|
||||
import { showDeviceAutomationDialog } from "./device-detail/show-dialog-device-automation";
|
||||
import { isComponentLoaded } from "../../../common/config/is_component_loaded";
|
||||
import { ifDefined } from "lit-html/directives/if-defined";
|
||||
|
||||
export interface EntityRegistryStateEntry extends EntityRegistryEntry {
|
||||
stateName?: string;
|
||||
|
@ -15,6 +15,7 @@ import {
|
||||
RowClickedEvent,
|
||||
} from "../../../../components/data-table/ha-data-table";
|
||||
import "../../../../components/ha-icon";
|
||||
import "../../../../components/ha-fab";
|
||||
import "../../../../layouts/hass-loading-screen";
|
||||
import "../../../../layouts/hass-tabs-subpage-data-table";
|
||||
import { HomeAssistant, Route } from "../../../../types";
|
||||
|
@ -20,6 +20,7 @@ import {
|
||||
RowClickedEvent,
|
||||
} from "../../../../components/data-table/ha-data-table";
|
||||
import "../../../../components/ha-icon";
|
||||
import "../../../../components/ha-fab";
|
||||
import "../../../../layouts/hass-loading-screen";
|
||||
import "../../../../layouts/hass-tabs-subpage-data-table";
|
||||
import { HomeAssistant, Route } from "../../../../types";
|
||||
|
@ -39,12 +39,14 @@ class HaLogbook extends LitElement {
|
||||
protected render(): TemplateResult {
|
||||
if (!this.entries?.length) {
|
||||
return html`
|
||||
<div class="container">
|
||||
${this.hass.localize("ui.panel.logbook.entries_not_found")}
|
||||
</div>
|
||||
`;
|
||||
}
|
||||
|
||||
return html`
|
||||
<div>
|
||||
<div class="container">
|
||||
${scroll({
|
||||
items: this.entries,
|
||||
renderItem: (item: LogbookEntry, index?: number) =>
|
||||
@ -154,13 +156,16 @@ class HaLogbook extends LitElement {
|
||||
color: var(--primary-color);
|
||||
}
|
||||
|
||||
.container {
|
||||
padding: 0 16px;
|
||||
}
|
||||
|
||||
.uni-virtualizer-host {
|
||||
display: block;
|
||||
position: relative;
|
||||
contain: strict;
|
||||
height: 100%;
|
||||
overflow: auto;
|
||||
padding: 0 16px;
|
||||
}
|
||||
|
||||
.uni-virtualizer-host > * {
|
||||
|
@ -9,6 +9,7 @@ import {
|
||||
PropertyValues,
|
||||
} from "lit-element";
|
||||
import { repeat } from "lit-html/directives/repeat";
|
||||
import { classMap } from "lit-html/directives/class-map";
|
||||
import { PaperInputElement } from "@polymer/paper-input/paper-input";
|
||||
import "@polymer/paper-checkbox/paper-checkbox";
|
||||
|
||||
@ -26,8 +27,6 @@ import {
|
||||
} from "../../../data/shopping-list";
|
||||
import { ShoppingListCardConfig, SensorCardConfig } from "./types";
|
||||
import { applyThemesOnElement } from "../../../common/dom/apply_themes_on_element";
|
||||
import { actionHandler } from "../common/directives/action-handler-directive";
|
||||
import { classMap } from "lit-html/directives/class-map";
|
||||
|
||||
@customElement("hui-shopping-list-card")
|
||||
class HuiShoppingListCard extends LitElement implements LovelaceCard {
|
||||
@ -118,46 +117,40 @@ class HuiShoppingListCard extends LitElement implements LovelaceCard {
|
||||
<div class="addRow">
|
||||
<ha-icon
|
||||
class="addButton"
|
||||
@click="${this._addItem}"
|
||||
icon="hass:plus"
|
||||
.title="${this.hass!.localize(
|
||||
.title=${this.hass!.localize(
|
||||
"ui.panel.lovelace.cards.shopping-list.add_item"
|
||||
)}"
|
||||
)}
|
||||
@click=${this._addItem}
|
||||
>
|
||||
</ha-icon>
|
||||
<paper-item-body>
|
||||
<paper-input
|
||||
no-label-float
|
||||
class="addBox"
|
||||
placeholder="${this.hass!.localize(
|
||||
placeholder=${this.hass!.localize(
|
||||
"ui.panel.lovelace.cards.shopping-list.add_item"
|
||||
)}"
|
||||
@keydown="${this._addKeyPress}"
|
||||
)}
|
||||
@keydown=${this._addKeyPress}
|
||||
></paper-input>
|
||||
</paper-item-body>
|
||||
</div>
|
||||
${repeat(
|
||||
this._uncheckedItems!,
|
||||
(item) => item.id,
|
||||
(item, index) =>
|
||||
(item) =>
|
||||
html`
|
||||
<div class="editRow">
|
||||
<paper-checkbox
|
||||
slot="item-icon"
|
||||
id="${index}"
|
||||
?checked="${item.complete}"
|
||||
.itemId="${item.id}"
|
||||
@click="${this._completeItem}"
|
||||
tabindex="0"
|
||||
?checked=${item.complete}
|
||||
.itemId=${item.id}
|
||||
@click=${this._completeItem}
|
||||
></paper-checkbox>
|
||||
<paper-item-body>
|
||||
<paper-input
|
||||
no-label-float
|
||||
.value="${item.name}"
|
||||
.itemId="${item.id}"
|
||||
@change="${this._saveEdit}"
|
||||
.value=${item.name}
|
||||
.itemId=${item.id}
|
||||
@change=${this._saveEdit}
|
||||
></paper-input>
|
||||
</paper-item-body>
|
||||
</div>
|
||||
`
|
||||
)}
|
||||
@ -165,45 +158,40 @@ class HuiShoppingListCard extends LitElement implements LovelaceCard {
|
||||
? html`
|
||||
<div class="divider"></div>
|
||||
<div class="checked">
|
||||
<span class="label">
|
||||
<span>
|
||||
${this.hass!.localize(
|
||||
"ui.panel.lovelace.cards.shopping-list.checked_items"
|
||||
)}
|
||||
</span>
|
||||
<ha-icon
|
||||
class="clearall"
|
||||
@action=${this._clearItems}
|
||||
.actionHandler=${actionHandler()}
|
||||
tabindex="0"
|
||||
icon="hass:notification-clear-all"
|
||||
.title="${this.hass!.localize(
|
||||
.title=${this.hass!.localize(
|
||||
"ui.panel.lovelace.cards.shopping-list.clear_items"
|
||||
)}"
|
||||
)}
|
||||
@click=${this._clearItems}
|
||||
>
|
||||
</ha-icon>
|
||||
</div>
|
||||
${repeat(
|
||||
this._checkedItems!,
|
||||
(item) => item.id,
|
||||
(item, index) =>
|
||||
(item) =>
|
||||
html`
|
||||
<div class="editRow">
|
||||
<paper-checkbox
|
||||
slot="item-icon"
|
||||
id="${index}"
|
||||
?checked="${item.complete}"
|
||||
.itemId="${item.id}"
|
||||
@click="${this._completeItem}"
|
||||
tabindex="0"
|
||||
?checked=${item.complete}
|
||||
.itemId=${item.id}
|
||||
@click=${this._completeItem}
|
||||
></paper-checkbox>
|
||||
<paper-item-body>
|
||||
<paper-input
|
||||
no-label-float
|
||||
.value="${item.name}"
|
||||
.itemId="${item.id}"
|
||||
@change="${this._saveEdit}"
|
||||
.value=${item.name}
|
||||
.itemId=${item.id}
|
||||
@change=${this._saveEdit}
|
||||
></paper-input>
|
||||
</paper-item-body>
|
||||
</div>
|
||||
`
|
||||
)}
|
||||
@ -216,8 +204,7 @@ class HuiShoppingListCard extends LitElement implements LovelaceCard {
|
||||
static get styles(): CSSResult {
|
||||
return css`
|
||||
ha-card {
|
||||
padding-bottom: 16px;
|
||||
padding-top: 16px;
|
||||
padding: 16px;
|
||||
}
|
||||
|
||||
.has-header {
|
||||
@ -225,63 +212,51 @@ class HuiShoppingListCard extends LitElement implements LovelaceCard {
|
||||
}
|
||||
|
||||
.editRow,
|
||||
.addRow {
|
||||
.addRow,
|
||||
.checked {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.addRow ha-icon {
|
||||
color: var(--secondary-text-color);
|
||||
--iron-icon-width: 26px;
|
||||
--iron-icon-height: 26px;
|
||||
}
|
||||
|
||||
.addButton {
|
||||
padding: 9px 15px 11px 15px;
|
||||
padding-right: 16px;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
paper-item-body {
|
||||
width: 75%;
|
||||
}
|
||||
|
||||
paper-checkbox {
|
||||
padding: 11px 11px 11px 18px;
|
||||
padding-left: 4px;
|
||||
padding-right: 20px;
|
||||
--paper-checkbox-label-spacing: 0px;
|
||||
}
|
||||
|
||||
paper-input {
|
||||
--paper-input-container-underline: {
|
||||
display: none;
|
||||
}
|
||||
--paper-input-container-underline-focus: {
|
||||
display: none;
|
||||
}
|
||||
--paper-input-container-underline-disabled: {
|
||||
display: none;
|
||||
}
|
||||
position: relative;
|
||||
top: 1px;
|
||||
flex-grow: 1;
|
||||
}
|
||||
|
||||
.checked {
|
||||
margin-left: 17px;
|
||||
margin-bottom: 11px;
|
||||
margin-top: 11px;
|
||||
margin: 12px 0;
|
||||
justify-content: space-between;
|
||||
}
|
||||
|
||||
.label {
|
||||
.checked span {
|
||||
color: var(--primary-color);
|
||||
}
|
||||
|
||||
.divider {
|
||||
height: 1px;
|
||||
background-color: var(--divider-color);
|
||||
margin: 10px;
|
||||
margin: 10px 0;
|
||||
}
|
||||
|
||||
.clearall {
|
||||
cursor: pointer;
|
||||
margin-bottom: 3px;
|
||||
float: right;
|
||||
padding-right: 10px;
|
||||
}
|
||||
|
||||
.addRow > ha-icon {
|
||||
color: var(--secondary-text-color);
|
||||
}
|
||||
`;
|
||||
}
|
||||
|
@ -10,6 +10,7 @@ import "@polymer/paper-input/paper-input";
|
||||
import "../../components/hui-action-editor";
|
||||
import "../../components/hui-theme-select-editor";
|
||||
import "../../components/hui-entity-editor";
|
||||
import "../../../../components/ha-icon-input";
|
||||
|
||||
import { struct } from "../../common/structs/struct";
|
||||
import {
|
||||
@ -23,6 +24,7 @@ import { fireEvent } from "../../../../common/dom/fire_event";
|
||||
import { configElementStyle } from "./config-elements-style";
|
||||
import { ActionConfig } from "../../../../data/lovelace";
|
||||
import { ButtonCardConfig } from "../../cards/types";
|
||||
import { stateIcon } from "../../../../common/entity/state_icon";
|
||||
|
||||
const cardConfigStruct = struct({
|
||||
type: "string",
|
||||
@ -127,16 +129,18 @@ export class HuiButtonCardEditor extends LitElement
|
||||
.configValue="${"name"}"
|
||||
@value-changed="${this._valueChanged}"
|
||||
></paper-input>
|
||||
<paper-input
|
||||
<ha-icon-input
|
||||
.label="${this.hass.localize(
|
||||
"ui.panel.lovelace.editor.card.generic.icon"
|
||||
)} (${this.hass.localize(
|
||||
"ui.panel.lovelace.editor.card.config.optional"
|
||||
)})"
|
||||
.value="${this._icon}"
|
||||
.configValue="${"icon"}"
|
||||
@value-changed="${this._valueChanged}"
|
||||
></paper-input>
|
||||
.value=${this._icon}
|
||||
.placeholder=${this._icon ||
|
||||
stateIcon(this.hass.states[this._entity])}
|
||||
.configValue=${"icon"}
|
||||
@value-changed=${this._valueChanged}
|
||||
></ha-icon-input>
|
||||
</div>
|
||||
<div class="side-by-side">
|
||||
<ha-switch
|
||||
|
@ -10,6 +10,7 @@ import "@polymer/paper-input/paper-input";
|
||||
import "../../components/hui-action-editor";
|
||||
import "../../components/hui-theme-select-editor";
|
||||
import "../../components/hui-entity-editor";
|
||||
import "../../../../components/ha-icon-input";
|
||||
|
||||
import { struct } from "../../common/structs/struct";
|
||||
import { EntitiesEditorEvent, EditorTarget } from "../types";
|
||||
@ -19,6 +20,7 @@ import { fireEvent } from "../../../../common/dom/fire_event";
|
||||
import { configElementStyle } from "./config-elements-style";
|
||||
import { EntityCardConfig } from "../../cards/types";
|
||||
import { headerFooterConfigStructs } from "../../header-footer/types";
|
||||
import { stateIcon } from "../../../../common/entity/state_icon";
|
||||
|
||||
const cardConfigStruct = struct({
|
||||
type: "string",
|
||||
@ -28,7 +30,6 @@ const cardConfigStruct = struct({
|
||||
attribute: "string?",
|
||||
unit: "string?",
|
||||
theme: "string?",
|
||||
header: struct.optional(headerFooterConfigStructs),
|
||||
footer: struct.optional(headerFooterConfigStructs),
|
||||
});
|
||||
|
||||
@ -99,16 +100,18 @@ export class HuiEntityCardEditor extends LitElement
|
||||
.configValue=${"name"}
|
||||
@value-changed=${this._valueChanged}
|
||||
></paper-input>
|
||||
<paper-input
|
||||
<ha-icon-input
|
||||
.label="${this.hass.localize(
|
||||
"ui.panel.lovelace.editor.card.generic.icon"
|
||||
)} (${this.hass.localize(
|
||||
"ui.panel.lovelace.editor.card.config.optional"
|
||||
)})"
|
||||
.value=${this._icon}
|
||||
.placeholder=${this._icon ||
|
||||
stateIcon(this.hass.states[this._entity])}
|
||||
.configValue=${"icon"}
|
||||
@value-changed=${this._valueChanged}
|
||||
></paper-input>
|
||||
></ha-icon-input>
|
||||
</div>
|
||||
<div class="side-by-side">
|
||||
<paper-input
|
||||
|
@ -12,6 +12,7 @@ import "@polymer/paper-listbox/paper-listbox";
|
||||
|
||||
import "../../components/hui-theme-select-editor";
|
||||
import "../../../../components/entity/ha-entity-picker";
|
||||
import "../../../../components/ha-icon-input";
|
||||
|
||||
import { struct } from "../../common/structs/struct";
|
||||
import { EntitiesEditorEvent, EditorTarget } from "../types";
|
||||
@ -20,6 +21,7 @@ import { LovelaceCardEditor } from "../../types";
|
||||
import { fireEvent } from "../../../../common/dom/fire_event";
|
||||
import { configElementStyle } from "./config-elements-style";
|
||||
import { SensorCardConfig } from "../../cards/types";
|
||||
import { stateIcon } from "../../../../common/entity/state_icon";
|
||||
|
||||
const cardConfigStruct = struct({
|
||||
type: "string",
|
||||
@ -111,16 +113,18 @@ export class HuiSensorCardEditor extends LitElement
|
||||
@value-changed="${this._valueChanged}"
|
||||
></paper-input>
|
||||
<div class="side-by-side">
|
||||
<paper-input
|
||||
<ha-icon-input
|
||||
.label="${this.hass.localize(
|
||||
"ui.panel.lovelace.editor.card.generic.icon"
|
||||
)} (${this.hass.localize(
|
||||
"ui.panel.lovelace.editor.card.config.optional"
|
||||
)})"
|
||||
.value="${this._icon}"
|
||||
.configValue="${"icon"}"
|
||||
@value-changed="${this._valueChanged}"
|
||||
></paper-input>
|
||||
.value=${this._icon}
|
||||
.placeholder=${this._icon ||
|
||||
stateIcon(this.hass.states[this._entity])}
|
||||
.configValue=${"icon"}
|
||||
@value-changed=${this._valueChanged}
|
||||
></ha-icon-input>
|
||||
<paper-dropdown-menu
|
||||
.label="${this.hass.localize(
|
||||
"ui.panel.lovelace.editor.card.sensor.graph_type"
|
||||
|
@ -28,6 +28,9 @@ class HaMfaModuleSetupFlow extends LocalizeMixin(EventsMixin(PolymerElement)) {
|
||||
ha-paper-dialog {
|
||||
max-width: 500px;
|
||||
}
|
||||
h2 {
|
||||
white-space: normal;
|
||||
}
|
||||
ha-markdown img:first-child:last-child,
|
||||
ha-markdown svg:first-child:last-child {
|
||||
background-color: white;
|
||||
|
@ -1173,21 +1173,26 @@
|
||||
"name": "Elfennau'r Llun"
|
||||
},
|
||||
"picture-entity": {
|
||||
"description": "Mae'r cerdyn Endid Lluniau yn arddangos endid ar ffurf delwedd. Yn lle delweddau o URL, gall hefyd ddangos y llun o endidau camera.",
|
||||
"name": "Endid Llun"
|
||||
},
|
||||
"picture-glance": {
|
||||
"description": "Mae'r cerdyn Cipolwg Llun yn dangos delwedd a chyflyrau endidau cyfatebol fel eicon. Mae'r endidau ar yr ochr dde yn caniatáu toglo gweithredoedd, mae eraill yn dangos y dialog mwy o wybodaeth.",
|
||||
"name": "Cipolwg ar lun"
|
||||
},
|
||||
"picture": {
|
||||
"name": "Llun"
|
||||
},
|
||||
"plant-status": {
|
||||
"description": "Mae'r cerdyn Statws Planhigion ar gyfer yr holl fotanegwyr hyfryd allan yna.",
|
||||
"name": "Statws planhigyn"
|
||||
},
|
||||
"sensor": {
|
||||
"description": "Mae'r cerdyn Synhwyrydd yn rhoi trosolwg cyflym o gyflwr eich synwyryddion gyda graff dewisol i ddelweddu newid dros amser.",
|
||||
"name": "Synhwyrydd"
|
||||
},
|
||||
"shopping-list": {
|
||||
"description": "Mae'r cerdyn Rhestr Siopa yn caniatáu ichi ychwanegu, golygu, gwirio a chlirio eitemau o'ch rhestr siopa.",
|
||||
"name": "Rhestr siopa"
|
||||
},
|
||||
"thermostat": {
|
||||
|
@ -2164,6 +2164,7 @@
|
||||
"name": "Entity Filter"
|
||||
},
|
||||
"entity": {
|
||||
"description": "The Entity card gives you a quick overview of your entity’s state.",
|
||||
"name": "Entity"
|
||||
},
|
||||
"gauge": {
|
||||
|
105
yarn.lock
105
yarn.lock
@ -3639,11 +3639,6 @@ async@2.0.1:
|
||||
dependencies:
|
||||
lodash "^4.8.0"
|
||||
|
||||
async@^1.5.2:
|
||||
version "1.5.2"
|
||||
resolved "https://registry.yarnpkg.com/async/-/async-1.5.2.tgz#ec6a61ae56480c0c3cb241c95618e20892f9672a"
|
||||
integrity sha1-7GphrlZIDAw8skHJVhjiCJL5Zyo=
|
||||
|
||||
async@^2.0.0, async@^2.0.1, async@^2.1.2, async@^2.4.1, async@^2.6.1, async@^2.6.2:
|
||||
version "2.6.2"
|
||||
resolved "https://registry.yarnpkg.com/async/-/async-2.6.2.tgz#18330ea7e6e313887f5d2f2a904bac6fe4dd5381"
|
||||
@ -5460,7 +5455,7 @@ debug@2.6.9, debug@^2.1.2, debug@^2.2.0, debug@^2.3.3, debug@^2.6.8, debug@^2.6.
|
||||
dependencies:
|
||||
ms "2.0.0"
|
||||
|
||||
debug@3.2.6, debug@^3.1.0, debug@^3.2.5, debug@^3.2.6:
|
||||
debug@3.2.6, debug@^3.1.0, debug@^3.1.1, debug@^3.2.5, debug@^3.2.6:
|
||||
version "3.2.6"
|
||||
resolved "https://registry.yarnpkg.com/debug/-/debug-3.2.6.tgz#e83d17de16d8a7efb7717edbe5fb10135eee629b"
|
||||
integrity sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ==
|
||||
@ -7809,6 +7804,16 @@ http-parser-js@>=0.4.0:
|
||||
resolved "https://registry.yarnpkg.com/http-parser-js/-/http-parser-js-0.5.0.tgz#d65edbede84349d0dc30320815a15d39cc3cbbd8"
|
||||
integrity sha512-cZdEF7r4gfRIq7ezX9J0T+kQmJNOub71dWbgAXVHDct80TKP4MCETtZQ31xyv38UwgzkWPYF/Xc0ge55dW9Z9w==
|
||||
|
||||
http-proxy-middleware@0.19.1:
|
||||
version "0.19.1"
|
||||
resolved "https://registry.yarnpkg.com/http-proxy-middleware/-/http-proxy-middleware-0.19.1.tgz#183c7dc4aa1479150306498c210cdaf96080a43a"
|
||||
integrity sha512-yHYTgWMQO8VvwNS22eLLloAkvungsKdKTLO8AJlftYIKNfJr3GK3zK0ZCfzDDGUBttdGc8xFy1mCitvNKQtC3Q==
|
||||
dependencies:
|
||||
http-proxy "^1.17.0"
|
||||
is-glob "^4.0.0"
|
||||
lodash "^4.17.11"
|
||||
micromatch "^3.1.10"
|
||||
|
||||
http-proxy-middleware@^0.17.2:
|
||||
version "0.17.4"
|
||||
resolved "https://registry.yarnpkg.com/http-proxy-middleware/-/http-proxy-middleware-0.17.4.tgz#642e8848851d66f09d4f124912846dbaeb41b833"
|
||||
@ -7819,16 +7824,6 @@ http-proxy-middleware@^0.17.2:
|
||||
lodash "^4.17.2"
|
||||
micromatch "^2.3.11"
|
||||
|
||||
http-proxy-middleware@^0.19.1:
|
||||
version "0.19.1"
|
||||
resolved "https://registry.yarnpkg.com/http-proxy-middleware/-/http-proxy-middleware-0.19.1.tgz#183c7dc4aa1479150306498c210cdaf96080a43a"
|
||||
integrity sha512-yHYTgWMQO8VvwNS22eLLloAkvungsKdKTLO8AJlftYIKNfJr3GK3zK0ZCfzDDGUBttdGc8xFy1mCitvNKQtC3Q==
|
||||
dependencies:
|
||||
http-proxy "^1.17.0"
|
||||
is-glob "^4.0.0"
|
||||
lodash "^4.17.11"
|
||||
micromatch "^3.1.10"
|
||||
|
||||
http-proxy@^1.16.2, http-proxy@^1.17.0:
|
||||
version "1.17.0"
|
||||
resolved "https://registry.yarnpkg.com/http-proxy/-/http-proxy-1.17.0.tgz#7ad38494658f84605e2f6db4436df410f4e5be9a"
|
||||
@ -8102,10 +8097,10 @@ ipaddr.js@1.9.0, ipaddr.js@^1.9.0:
|
||||
resolved "https://registry.yarnpkg.com/ipaddr.js/-/ipaddr.js-1.9.0.tgz#37df74e430a0e47550fe54a2defe30d8acd95f65"
|
||||
integrity sha512-M4Sjn6N/+O6/IXSJseKqHoFc+5FdGJ22sXqnjTpdZweHK64MzEPAyQZyEU3R/KRv2GLoa7nNtg/C2Ev6m7z+eA==
|
||||
|
||||
is-absolute-url@^3.0.2:
|
||||
version "3.0.2"
|
||||
resolved "https://registry.yarnpkg.com/is-absolute-url/-/is-absolute-url-3.0.2.tgz#554f2933e7385cc46e94351977ca2081170a206e"
|
||||
integrity sha512-+5g/wLlcm1AcxSP7014m6GvbPHswDx980vD/3bZaap8aGV9Yfs7Q6y6tfaupgZ5O74Byzc8dGrSCJ+bFXx0KdA==
|
||||
is-absolute-url@^3.0.3:
|
||||
version "3.0.3"
|
||||
resolved "https://registry.yarnpkg.com/is-absolute-url/-/is-absolute-url-3.0.3.tgz#96c6a22b6a23929b11ea0afb1836c36ad4a5d698"
|
||||
integrity sha512-opmNIX7uFnS96NtPmhWQgQx6/NYFgsUXYMllcfzwWKUMwfo8kku1TvE6hkNcH+Q1ts5cMVrsY7j0bxXQDciu9Q==
|
||||
|
||||
is-absolute@^1.0.0:
|
||||
version "1.0.0"
|
||||
@ -9237,10 +9232,10 @@ logform@^2.1.1:
|
||||
ms "^2.1.1"
|
||||
triple-beam "^1.3.0"
|
||||
|
||||
loglevel@^1.6.4:
|
||||
version "1.6.4"
|
||||
resolved "https://registry.yarnpkg.com/loglevel/-/loglevel-1.6.4.tgz#f408f4f006db8354d0577dcf6d33485b3cb90d56"
|
||||
integrity sha512-p0b6mOGKcGa+7nnmKbpzR6qloPbrgLcnio++E+14Vo/XffOGwZtRpUhr8dTH/x2oCMmEoIU0Zwm3ZauhvYD17g==
|
||||
loglevel@^1.6.6:
|
||||
version "1.6.7"
|
||||
resolved "https://registry.yarnpkg.com/loglevel/-/loglevel-1.6.7.tgz#b3e034233188c68b889f5b862415306f565e2c56"
|
||||
integrity sha512-cY2eLFrQSAfVPhCgH1s7JI73tMbg9YC3v3+ZHVW67sBS7UxWzNEk/ZBbSfLykBWHp33dqqtOv82gjhKEi81T/A==
|
||||
|
||||
lolex@^1.6.0:
|
||||
version "1.6.0"
|
||||
@ -9683,7 +9678,7 @@ mixin-object@^2.0.1:
|
||||
for-in "^0.1.3"
|
||||
is-extendable "^0.1.1"
|
||||
|
||||
mkdirp@0.5.1, mkdirp@0.5.x, mkdirp@^0.5.0, mkdirp@^0.5.1:
|
||||
mkdirp@0.5.1, mkdirp@^0.5.0, mkdirp@^0.5.1:
|
||||
version "0.5.1"
|
||||
resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-0.5.1.tgz#30057438eac6cf7f8c4767f38648d6697d75c903"
|
||||
integrity sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=
|
||||
@ -9908,10 +9903,10 @@ node-environment-flags@1.0.4:
|
||||
dependencies:
|
||||
object.getownpropertydescriptors "^2.0.3"
|
||||
|
||||
node-forge@0.8.2:
|
||||
version "0.8.2"
|
||||
resolved "https://registry.yarnpkg.com/node-forge/-/node-forge-0.8.2.tgz#b4bcc59fb12ce77a8825fc6a783dfe3182499c5a"
|
||||
integrity sha512-mXQ9GBq1N3uDCyV1pdSzgIguwgtVpM7f5/5J4ipz12PKWElmPpVWLDuWl8iXmhysr21+WmX/OJ5UKx82wjomgg==
|
||||
node-forge@0.9.0:
|
||||
version "0.9.0"
|
||||
resolved "https://registry.yarnpkg.com/node-forge/-/node-forge-0.9.0.tgz#d624050edbb44874adca12bb9a52ec63cb782579"
|
||||
integrity sha512-7ASaDa3pD+lJ3WvXFsxekJQelBKRpne+GOVbLbtHYdd7pFspyeuJHnWfLplGf3SwKGbfs/aYl5V/JCIaHVUKKQ==
|
||||
|
||||
"node-libs-browser@^1.0.0 || ^2.0.0":
|
||||
version "2.2.0"
|
||||
@ -11025,14 +11020,14 @@ polyserve@^0.27.13:
|
||||
send "^0.16.2"
|
||||
spdy "^3.3.3"
|
||||
|
||||
portfinder@^1.0.24:
|
||||
version "1.0.24"
|
||||
resolved "https://registry.yarnpkg.com/portfinder/-/portfinder-1.0.24.tgz#11efbc6865f12f37624b6531ead1d809ed965cfa"
|
||||
integrity sha512-ekRl7zD2qxYndYflwiryJwMioBI7LI7rVXg3EnLK3sjkouT5eOuhS3gS255XxBksa30VG8UPZYZCdgfGOfkSUg==
|
||||
portfinder@^1.0.25:
|
||||
version "1.0.25"
|
||||
resolved "https://registry.yarnpkg.com/portfinder/-/portfinder-1.0.25.tgz#254fd337ffba869f4b9d37edc298059cb4d35eca"
|
||||
integrity sha512-6ElJnHBbxVA1XSLgBp7G1FiCkQdlqGzuF7DswL5tcea+E8UpuvPU7beVAjjRwCioTS9ZluNbu+ZyRvgTsmqEBg==
|
||||
dependencies:
|
||||
async "^1.5.2"
|
||||
debug "^2.2.0"
|
||||
mkdirp "0.5.x"
|
||||
async "^2.6.2"
|
||||
debug "^3.1.1"
|
||||
mkdirp "^0.5.1"
|
||||
|
||||
posix-character-classes@^0.1.0:
|
||||
version "0.1.1"
|
||||
@ -11998,12 +11993,12 @@ selenium-standalone@^6.7.0:
|
||||
which "^1.3.1"
|
||||
yauzl "^2.10.0"
|
||||
|
||||
selfsigned@^1.10.6:
|
||||
version "1.10.6"
|
||||
resolved "https://registry.yarnpkg.com/selfsigned/-/selfsigned-1.10.6.tgz#7b3cd37ed9c2034261a173af1a1aae27d8169b67"
|
||||
integrity sha512-i3+CeqxL7DpAazgVpAGdKMwHuL63B5nhJMh9NQ7xmChGkA3jNFflq6Jyo1LLJYcr3idWiNOPWHCrm4zMayLG4w==
|
||||
selfsigned@^1.10.7:
|
||||
version "1.10.7"
|
||||
resolved "https://registry.yarnpkg.com/selfsigned/-/selfsigned-1.10.7.tgz#da5819fd049d5574f28e88a9bcc6dbc6e6f3906b"
|
||||
integrity sha512-8M3wBCzeWIJnQfl43IKwOmC4H/RAp50S8DF60znzjW5GVqTcSe2vWclt7hmYVPkKPlHWOu5EaWOMZ2Y6W8ZXTA==
|
||||
dependencies:
|
||||
node-forge "0.8.2"
|
||||
node-forge "0.9.0"
|
||||
|
||||
semver-compare@^1.0.0:
|
||||
version "1.0.0"
|
||||
@ -14033,10 +14028,10 @@ webpack-cli@^3.3.9:
|
||||
v8-compile-cache "2.0.3"
|
||||
yargs "13.2.4"
|
||||
|
||||
webpack-dev-middleware@^3.7.1:
|
||||
version "3.7.1"
|
||||
resolved "https://registry.yarnpkg.com/webpack-dev-middleware/-/webpack-dev-middleware-3.7.1.tgz#1167aea02afa034489869b8368fe9fed1aea7d09"
|
||||
integrity sha512-5MWu9SH1z3hY7oHOV6Kbkz5x7hXbxK56mGHNqHTe6d+ewxOwKUxoUJBs7QIaJb33lPjl9bJZ3X0vCoooUzC36A==
|
||||
webpack-dev-middleware@^3.7.2:
|
||||
version "3.7.2"
|
||||
resolved "https://registry.yarnpkg.com/webpack-dev-middleware/-/webpack-dev-middleware-3.7.2.tgz#0019c3db716e3fa5cecbf64f2ab88a74bab331f3"
|
||||
integrity sha512-1xC42LxbYoqLNAhV6YzTYacicgMZQTqRd27Sim9wn5hJrX3I5nxYy1SxSd4+gjUFsz1dQFj+yEe6zEVmSkeJjw==
|
||||
dependencies:
|
||||
memory-fs "^0.4.1"
|
||||
mime "^2.4.4"
|
||||
@ -14044,10 +14039,10 @@ webpack-dev-middleware@^3.7.1:
|
||||
range-parser "^1.2.1"
|
||||
webpack-log "^2.0.0"
|
||||
|
||||
webpack-dev-server@^3.8.1:
|
||||
version "3.8.1"
|
||||
resolved "https://registry.yarnpkg.com/webpack-dev-server/-/webpack-dev-server-3.8.1.tgz#485b64c4aadc23f601e72114b40c1b1fea31d9f1"
|
||||
integrity sha512-9F5DnfFA9bsrhpUCAfQic/AXBVHvq+3gQS+x6Zj0yc1fVVE0erKh2MV4IV12TBewuTrYeeTIRwCH9qLMvdNvTw==
|
||||
webpack-dev-server@^3.10.3:
|
||||
version "3.10.3"
|
||||
resolved "https://registry.yarnpkg.com/webpack-dev-server/-/webpack-dev-server-3.10.3.tgz#f35945036813e57ef582c2420ef7b470e14d3af0"
|
||||
integrity sha512-e4nWev8YzEVNdOMcNzNeCN947sWJNd43E5XvsJzbAL08kGc2frm1tQ32hTJslRS+H65LCb/AaUCYU7fjHCpDeQ==
|
||||
dependencies:
|
||||
ansi-html "0.0.7"
|
||||
bonjour "^3.5.0"
|
||||
@ -14058,18 +14053,18 @@ webpack-dev-server@^3.8.1:
|
||||
del "^4.1.1"
|
||||
express "^4.17.1"
|
||||
html-entities "^1.2.1"
|
||||
http-proxy-middleware "^0.19.1"
|
||||
http-proxy-middleware "0.19.1"
|
||||
import-local "^2.0.0"
|
||||
internal-ip "^4.3.0"
|
||||
ip "^1.1.5"
|
||||
is-absolute-url "^3.0.2"
|
||||
is-absolute-url "^3.0.3"
|
||||
killable "^1.0.1"
|
||||
loglevel "^1.6.4"
|
||||
loglevel "^1.6.6"
|
||||
opn "^5.5.0"
|
||||
p-retry "^3.0.1"
|
||||
portfinder "^1.0.24"
|
||||
portfinder "^1.0.25"
|
||||
schema-utils "^1.0.0"
|
||||
selfsigned "^1.10.6"
|
||||
selfsigned "^1.10.7"
|
||||
semver "^6.3.0"
|
||||
serve-index "^1.9.1"
|
||||
sockjs "0.3.19"
|
||||
@ -14078,7 +14073,7 @@ webpack-dev-server@^3.8.1:
|
||||
strip-ansi "^3.0.1"
|
||||
supports-color "^6.1.0"
|
||||
url "^0.11.0"
|
||||
webpack-dev-middleware "^3.7.1"
|
||||
webpack-dev-middleware "^3.7.2"
|
||||
webpack-log "^2.0.0"
|
||||
ws "^6.2.1"
|
||||
yargs "12.0.5"
|
||||
|
Loading…
x
Reference in New Issue
Block a user