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