mirror of
				https://github.com/home-assistant/frontend.git
				synced 2025-10-27 12:39:54 +00:00 
			
		
		
		
	Compare commits
	
		
			1 Commits
		
	
	
		
			20220316.0
			...
			layout-str
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
|   | cefb3c3f01 | 
| @@ -28,6 +28,7 @@ const cardConfigStruct = object({ | |||||||
|   name: optional(string()), |   name: optional(string()), | ||||||
|   states: optional(array()), |   states: optional(array()), | ||||||
|   theme: optional(string()), |   theme: optional(string()), | ||||||
|  |   layout: optional(object()), | ||||||
| }); | }); | ||||||
|  |  | ||||||
| const includeDomains = ["alarm_control_panel"]; | const includeDomains = ["alarm_control_panel"]; | ||||||
|   | |||||||
| @@ -37,6 +37,7 @@ const cardConfigStruct = object({ | |||||||
|   hold_action: optional(actionConfigStruct), |   hold_action: optional(actionConfigStruct), | ||||||
|   theme: optional(string()), |   theme: optional(string()), | ||||||
|   show_state: optional(boolean()), |   show_state: optional(boolean()), | ||||||
|  |   layout: optional(object()), | ||||||
| }); | }); | ||||||
|  |  | ||||||
| const actions = [ | const actions = [ | ||||||
|   | |||||||
| @@ -32,6 +32,7 @@ const cardConfigStruct = object({ | |||||||
|   initial_view: optional(string()), |   initial_view: optional(string()), | ||||||
|   theme: optional(string()), |   theme: optional(string()), | ||||||
|   entities: array(string()), |   entities: array(string()), | ||||||
|  |   layout: optional(object()), | ||||||
| }); | }); | ||||||
|  |  | ||||||
| const views = ["dayGridMonth", "dayGridDay", "listWeek"]; | const views = ["dayGridMonth", "dayGridDay", "listWeek"]; | ||||||
|   | |||||||
| @@ -36,6 +36,7 @@ const cardConfigStruct = object({ | |||||||
|   type: string(), |   type: string(), | ||||||
|   card: any(), |   card: any(), | ||||||
|   conditions: optional(array(conditionStruct)), |   conditions: optional(array(conditionStruct)), | ||||||
|  |   layout: optional(object()), | ||||||
| }); | }); | ||||||
|  |  | ||||||
| @customElement("hui-conditional-card-editor") | @customElement("hui-conditional-card-editor") | ||||||
|   | |||||||
| @@ -55,6 +55,7 @@ const cardConfigStruct = object({ | |||||||
|   entities: array(entitiesConfigStruct), |   entities: array(entitiesConfigStruct), | ||||||
|   header: optional(headerFooterConfigStructs), |   header: optional(headerFooterConfigStructs), | ||||||
|   footer: optional(headerFooterConfigStructs), |   footer: optional(headerFooterConfigStructs), | ||||||
|  |   layout: optional(object()), | ||||||
| }); | }); | ||||||
|  |  | ||||||
| @customElement("hui-entities-card-editor") | @customElement("hui-entities-card-editor") | ||||||
|   | |||||||
| @@ -32,6 +32,7 @@ const cardConfigStruct = object({ | |||||||
|   unit: optional(string()), |   unit: optional(string()), | ||||||
|   theme: optional(string()), |   theme: optional(string()), | ||||||
|   footer: optional(headerFooterConfigStructs), |   footer: optional(headerFooterConfigStructs), | ||||||
|  |   layout: optional(object()), | ||||||
| }); | }); | ||||||
|  |  | ||||||
| @customElement("hui-entity-card-editor") | @customElement("hui-entity-card-editor") | ||||||
|   | |||||||
| @@ -31,6 +31,7 @@ const cardConfigStruct = object({ | |||||||
|   max: optional(number()), |   max: optional(number()), | ||||||
|   severity: optional(object()), |   severity: optional(object()), | ||||||
|   theme: optional(string()), |   theme: optional(string()), | ||||||
|  |   layout: optional(object()), | ||||||
| }); | }); | ||||||
|  |  | ||||||
| const includeDomains = ["sensor"]; | const includeDomains = ["sensor"]; | ||||||
|   | |||||||
| @@ -50,6 +50,7 @@ const cardConfigStruct = object({ | |||||||
|   show_icon: optional(boolean()), |   show_icon: optional(boolean()), | ||||||
|   state_color: optional(boolean()), |   state_color: optional(boolean()), | ||||||
|   entities: array(entitiesConfigStruct), |   entities: array(entitiesConfigStruct), | ||||||
|  |   layout: optional(object()), | ||||||
| }); | }); | ||||||
|  |  | ||||||
| @customElement("hui-glance-card-editor") | @customElement("hui-glance-card-editor") | ||||||
|   | |||||||
| @@ -42,6 +42,7 @@ const cardConfigStruct = object({ | |||||||
|   title: optional(string()), |   title: optional(string()), | ||||||
|   hours_to_show: optional(number()), |   hours_to_show: optional(number()), | ||||||
|   refresh_interval: optional(number()), |   refresh_interval: optional(number()), | ||||||
|  |   layout: optional(object()), | ||||||
| }); | }); | ||||||
|  |  | ||||||
| @customElement("hui-history-graph-card-editor") | @customElement("hui-history-graph-card-editor") | ||||||
|   | |||||||
| @@ -23,6 +23,7 @@ const cardConfigStruct = object({ | |||||||
|   entity: string(), |   entity: string(), | ||||||
|   name: optional(string()), |   name: optional(string()), | ||||||
|   theme: optional(string()), |   theme: optional(string()), | ||||||
|  |   layout: optional(object()), | ||||||
| }); | }); | ||||||
|  |  | ||||||
| const includeDomains = ["humidifier"]; | const includeDomains = ["humidifier"]; | ||||||
|   | |||||||
| @@ -21,6 +21,7 @@ const cardConfigStruct = object({ | |||||||
|   title: optional(string()), |   title: optional(string()), | ||||||
|   url: optional(string()), |   url: optional(string()), | ||||||
|   aspect_ratio: optional(string()), |   aspect_ratio: optional(string()), | ||||||
|  |   layout: optional(object()), | ||||||
| }); | }); | ||||||
|  |  | ||||||
| @customElement("hui-iframe-card-editor") | @customElement("hui-iframe-card-editor") | ||||||
|   | |||||||
| @@ -30,6 +30,7 @@ const cardConfigStruct = object({ | |||||||
|   icon: optional(string()), |   icon: optional(string()), | ||||||
|   hold_action: optional(actionConfigStruct), |   hold_action: optional(actionConfigStruct), | ||||||
|   double_tap_action: optional(actionConfigStruct), |   double_tap_action: optional(actionConfigStruct), | ||||||
|  |   layout: optional(object()), | ||||||
| }); | }); | ||||||
|  |  | ||||||
| const includeDomains = ["light"]; | const includeDomains = ["light"]; | ||||||
|   | |||||||
| @@ -26,6 +26,7 @@ const cardConfigStruct = object({ | |||||||
|   title: optional(string()), |   title: optional(string()), | ||||||
|   hours_to_show: optional(number()), |   hours_to_show: optional(number()), | ||||||
|   theme: optional(string()), |   theme: optional(string()), | ||||||
|  |   layout: optional(object()), | ||||||
| }); | }); | ||||||
|  |  | ||||||
| @customElement("hui-logbook-card-editor") | @customElement("hui-logbook-card-editor") | ||||||
|   | |||||||
| @@ -46,6 +46,7 @@ const cardConfigStruct = object({ | |||||||
|   entities: array(entitiesConfigStruct), |   entities: array(entitiesConfigStruct), | ||||||
|   hours_to_show: optional(number()), |   hours_to_show: optional(number()), | ||||||
|   geo_location_sources: optional(array()), |   geo_location_sources: optional(array()), | ||||||
|  |   layout: optional(object()), | ||||||
| }); | }); | ||||||
|  |  | ||||||
| @customElement("hui-map-card-editor") | @customElement("hui-map-card-editor") | ||||||
|   | |||||||
| @@ -23,6 +23,7 @@ const cardConfigStruct = object({ | |||||||
|   title: optional(string()), |   title: optional(string()), | ||||||
|   content: string(), |   content: string(), | ||||||
|   theme: optional(string()), |   theme: optional(string()), | ||||||
|  |   layout: optional(object()), | ||||||
| }); | }); | ||||||
|  |  | ||||||
| @customElement("hui-markdown-card-editor") | @customElement("hui-markdown-card-editor") | ||||||
|   | |||||||
| @@ -1,22 +1,23 @@ | |||||||
| import { | import { | ||||||
|   customElement, |   customElement, | ||||||
|   html, |   html, | ||||||
|  |   internalProperty, | ||||||
|   LitElement, |   LitElement, | ||||||
|   property, |   property, | ||||||
|   internalProperty, |  | ||||||
|   TemplateResult, |   TemplateResult, | ||||||
| } from "lit-element"; | } from "lit-element"; | ||||||
|  | import { assert, object, optional, string } from "superstruct"; | ||||||
| import { fireEvent } from "../../../../common/dom/fire_event"; | import { fireEvent } from "../../../../common/dom/fire_event"; | ||||||
| import "../../../../components/entity/ha-entity-picker"; | import "../../../../components/entity/ha-entity-picker"; | ||||||
| import { HomeAssistant } from "../../../../types"; | import { HomeAssistant } from "../../../../types"; | ||||||
| import { MediaControlCardConfig } from "../../cards/types"; | import { MediaControlCardConfig } from "../../cards/types"; | ||||||
| import { LovelaceCardEditor } from "../../types"; | import { LovelaceCardEditor } from "../../types"; | ||||||
| import { EditorTarget, EntitiesEditorEvent } from "../types"; | import { EditorTarget, EntitiesEditorEvent } from "../types"; | ||||||
| import { assert, object, string, optional } from "superstruct"; |  | ||||||
|  |  | ||||||
| const cardConfigStruct = object({ | const cardConfigStruct = object({ | ||||||
|   type: string(), |   type: string(), | ||||||
|   entity: optional(string()), |   entity: optional(string()), | ||||||
|  |   layout: optional(object()), | ||||||
| }); | }); | ||||||
|  |  | ||||||
| const includeDomains = ["media_player"]; | const includeDomains = ["media_player"]; | ||||||
|   | |||||||
| @@ -25,6 +25,7 @@ const cardConfigStruct = object({ | |||||||
|   tap_action: optional(actionConfigStruct), |   tap_action: optional(actionConfigStruct), | ||||||
|   hold_action: optional(actionConfigStruct), |   hold_action: optional(actionConfigStruct), | ||||||
|   theme: optional(string()), |   theme: optional(string()), | ||||||
|  |   layout: optional(object()), | ||||||
| }); | }); | ||||||
|  |  | ||||||
| @customElement("hui-picture-card-editor") | @customElement("hui-picture-card-editor") | ||||||
|   | |||||||
| @@ -39,6 +39,7 @@ const cardConfigStruct = object({ | |||||||
|   show_name: optional(boolean()), |   show_name: optional(boolean()), | ||||||
|   show_state: optional(boolean()), |   show_state: optional(boolean()), | ||||||
|   theme: optional(string()), |   theme: optional(string()), | ||||||
|  |   layout: optional(object()), | ||||||
| }); | }); | ||||||
|  |  | ||||||
| const includeDomains = ["camera"]; | const includeDomains = ["camera"]; | ||||||
|   | |||||||
| @@ -42,6 +42,7 @@ const cardConfigStruct = object({ | |||||||
|   hold_action: optional(actionConfigStruct), |   hold_action: optional(actionConfigStruct), | ||||||
|   entities: array(entitiesConfigStruct), |   entities: array(entitiesConfigStruct), | ||||||
|   theme: optional(string()), |   theme: optional(string()), | ||||||
|  |   layout: optional(object()), | ||||||
| }); | }); | ||||||
|  |  | ||||||
| const includeDomains = ["camera"]; | const includeDomains = ["camera"]; | ||||||
|   | |||||||
| @@ -24,6 +24,7 @@ const cardConfigStruct = object({ | |||||||
|   entity: string(), |   entity: string(), | ||||||
|   name: optional(string()), |   name: optional(string()), | ||||||
|   theme: optional(string()), |   theme: optional(string()), | ||||||
|  |   layout: optional(object()), | ||||||
| }); | }); | ||||||
|  |  | ||||||
| const includeDomains = ["plant"]; | const includeDomains = ["plant"]; | ||||||
|   | |||||||
| @@ -35,6 +35,7 @@ const cardConfigStruct = object({ | |||||||
|   detail: optional(number()), |   detail: optional(number()), | ||||||
|   theme: optional(string()), |   theme: optional(string()), | ||||||
|   hours_to_show: optional(number()), |   hours_to_show: optional(number()), | ||||||
|  |   layout: optional(object()), | ||||||
| }); | }); | ||||||
|  |  | ||||||
| const includeDomains = ["sensor"]; | const includeDomains = ["sensor"]; | ||||||
|   | |||||||
| @@ -4,11 +4,12 @@ import { | |||||||
|   CSSResult, |   CSSResult, | ||||||
|   customElement, |   customElement, | ||||||
|   html, |   html, | ||||||
|  |   internalProperty, | ||||||
|   LitElement, |   LitElement, | ||||||
|   property, |   property, | ||||||
|   internalProperty, |  | ||||||
|   TemplateResult, |   TemplateResult, | ||||||
| } from "lit-element"; | } from "lit-element"; | ||||||
|  | import { assert, object, optional, string } from "superstruct"; | ||||||
| import { isComponentLoaded } from "../../../../common/config/is_component_loaded"; | import { isComponentLoaded } from "../../../../common/config/is_component_loaded"; | ||||||
| import { fireEvent } from "../../../../common/dom/fire_event"; | import { fireEvent } from "../../../../common/dom/fire_event"; | ||||||
| import { HomeAssistant } from "../../../../types"; | import { HomeAssistant } from "../../../../types"; | ||||||
| @@ -16,12 +17,12 @@ import { ShoppingListCardConfig } from "../../cards/types"; | |||||||
| import "../../components/hui-theme-select-editor"; | import "../../components/hui-theme-select-editor"; | ||||||
| import { LovelaceCardEditor } from "../../types"; | import { LovelaceCardEditor } from "../../types"; | ||||||
| import { EditorTarget, EntitiesEditorEvent } from "../types"; | import { EditorTarget, EntitiesEditorEvent } from "../types"; | ||||||
| import { string, assert, object, optional } from "superstruct"; |  | ||||||
|  |  | ||||||
| const cardConfigStruct = object({ | const cardConfigStruct = object({ | ||||||
|   type: string(), |   type: string(), | ||||||
|   title: optional(string()), |   title: optional(string()), | ||||||
|   theme: optional(string()), |   theme: optional(string()), | ||||||
|  |   layout: optional(object()), | ||||||
| }); | }); | ||||||
|  |  | ||||||
| @customElement("hui-shopping-list-card-editor") | @customElement("hui-shopping-list-card-editor") | ||||||
|   | |||||||
| @@ -16,11 +16,11 @@ import { | |||||||
|   any, |   any, | ||||||
|   array, |   array, | ||||||
|   assert, |   assert, | ||||||
|  |   boolean, | ||||||
|  |   number, | ||||||
|   object, |   object, | ||||||
|   optional, |   optional, | ||||||
|   string, |   string, | ||||||
|   boolean, |  | ||||||
|   number, |  | ||||||
| } from "superstruct"; | } from "superstruct"; | ||||||
| import { fireEvent, HASSDomEvent } from "../../../../common/dom/fire_event"; | import { fireEvent, HASSDomEvent } from "../../../../common/dom/fire_event"; | ||||||
| import { LovelaceCardConfig, LovelaceConfig } from "../../../../data/lovelace"; | import { LovelaceCardConfig, LovelaceConfig } from "../../../../data/lovelace"; | ||||||
| @@ -39,6 +39,7 @@ const cardConfigStruct = object({ | |||||||
|   title: optional(string()), |   title: optional(string()), | ||||||
|   square: optional(boolean()), |   square: optional(boolean()), | ||||||
|   columns: optional(number()), |   columns: optional(number()), | ||||||
|  |   layout: optional(object()), | ||||||
| }); | }); | ||||||
|  |  | ||||||
| @customElement("hui-stack-card-editor") | @customElement("hui-stack-card-editor") | ||||||
|   | |||||||
| @@ -23,6 +23,7 @@ const cardConfigStruct = object({ | |||||||
|   entity: string(), |   entity: string(), | ||||||
|   name: optional(string()), |   name: optional(string()), | ||||||
|   theme: optional(string()), |   theme: optional(string()), | ||||||
|  |   layout: optional(object()), | ||||||
| }); | }); | ||||||
|  |  | ||||||
| const includeDomains = ["climate"]; | const includeDomains = ["climate"]; | ||||||
|   | |||||||
| @@ -10,10 +10,10 @@ import { | |||||||
| import { assert, boolean, object, optional, string } from "superstruct"; | import { assert, boolean, object, optional, string } from "superstruct"; | ||||||
| import { fireEvent } from "../../../../common/dom/fire_event"; | import { fireEvent } from "../../../../common/dom/fire_event"; | ||||||
| import { computeRTLDirection } from "../../../../common/util/compute_rtl"; | import { computeRTLDirection } from "../../../../common/util/compute_rtl"; | ||||||
|  | import "../../../../components/entity/ha-entity-attribute-picker"; | ||||||
| import "../../../../components/entity/ha-entity-picker"; | import "../../../../components/entity/ha-entity-picker"; | ||||||
| import "../../../../components/ha-formfield"; | import "../../../../components/ha-formfield"; | ||||||
| import "../../../../components/ha-switch"; | import "../../../../components/ha-switch"; | ||||||
| import "../../../../components/entity/ha-entity-attribute-picker"; |  | ||||||
| import { HomeAssistant } from "../../../../types"; | import { HomeAssistant } from "../../../../types"; | ||||||
| import { WeatherForecastCardConfig } from "../../cards/types"; | import { WeatherForecastCardConfig } from "../../cards/types"; | ||||||
| import "../../components/hui-theme-select-editor"; | import "../../components/hui-theme-select-editor"; | ||||||
| @@ -28,6 +28,7 @@ const cardConfigStruct = object({ | |||||||
|   theme: optional(string()), |   theme: optional(string()), | ||||||
|   show_forecast: optional(boolean()), |   show_forecast: optional(boolean()), | ||||||
|   secondary_info_attribute: optional(string()), |   secondary_info_attribute: optional(string()), | ||||||
|  |   layout: optional(object()), | ||||||
| }); | }); | ||||||
|  |  | ||||||
| const includeDomains = ["weather"]; | const includeDomains = ["weather"]; | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user