Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move click and tooltip function to LL folder #1935

Merged
merged 1 commit into from
Oct 31, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import computeStateName from "../../common/entity/compute_state_name";
import { HomeAssistant } from "../../types";
import { LovelaceElementConfig } from "../../panels/lovelace/elements/types";
import computeStateName from "../../../common/entity/compute_state_name";
import { HomeAssistant } from "../../../types";
import { LovelaceElementConfig } from "../elements/types";

export const computeTooltip = (
hass: HomeAssistant,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { HomeAssistant } from "../../types";
import { LovelaceElementConfig } from "../../panels/lovelace/elements/types";
import { fireEvent } from "../dom/fire_event.js";
import { navigate } from "../../common/navigate";
import toggleEntity from "../../../src/panels/lovelace/common/entity/toggle-entity";
import { HomeAssistant } from "../../../types";
import { LovelaceElementConfig } from "../elements/types";
import { fireEvent } from "../../../common/dom/fire_event.js";
import { navigate } from "../../../common/navigate";
import toggleEntity from "../../../../src/panels/lovelace/common/entity/toggle-entity";

export const handleClick = (
node: HTMLElement,
Expand Down
4 changes: 2 additions & 2 deletions src/panels/lovelace/elements/hui-icon-element.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ import { html, LitElement } from "@polymer/lit-element";

import "../../../components/ha-icon.js";

import { computeTooltip } from "../../../common/string/compute-tooltip";
import { handleClick } from "../../../common/dom/handle-click";
import { computeTooltip } from "../common/compute-tooltip";
import { handleClick } from "../common/handle-click";
import { longPress } from "../common/directives/long-press-directive";
import { hassLocalizeLitMixin } from "../../../mixins/lit-localize-mixin";
import { LovelaceElement, LovelaceElementConfig } from "./types.js";
Expand Down
4 changes: 2 additions & 2 deletions src/panels/lovelace/elements/hui-image-element.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ import { html, LitElement } from "@polymer/lit-element";

import "../components/hui-image.js";

import { computeTooltip } from "../../../common/string/compute-tooltip";
import { handleClick } from "../../../common/dom/handle-click";
import { computeTooltip } from "../common/compute-tooltip";
import { handleClick } from "../common/handle-click";
import { longPress } from "../common/directives/long-press-directive";
import { hassLocalizeLitMixin } from "../../../mixins/lit-localize-mixin";
import { LovelaceElement, LovelaceElementConfig } from "./types.js";
Expand Down
4 changes: 2 additions & 2 deletions src/panels/lovelace/elements/hui-state-icon-element.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ import { TemplateResult } from "lit-html";

import "../../../components/entity/state-badge.js";

import { computeTooltip } from "../../../common/string/compute-tooltip";
import { handleClick } from "../../../common/dom/handle-click";
import { computeTooltip } from "../common/compute-tooltip";
import { handleClick } from "../common/handle-click";
import { longPress } from "../common/directives/long-press-directive";
import { hassLocalizeLitMixin } from "../../../mixins/lit-localize-mixin";
import { LovelaceElement, LovelaceElementConfig } from "./types.js";
Expand Down
4 changes: 2 additions & 2 deletions src/panels/lovelace/elements/hui-state-label-element.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ import { html, LitElement } from "@polymer/lit-element";

import "../../../components/entity/ha-state-label-badge.js";

import { computeTooltip } from "../../../common/string/compute-tooltip";
import computeStateDisplay from "../../../common/entity/compute_state_display.js";
import { handleClick } from "../../../common/dom/handle-click";
import { computeTooltip } from "../common/compute-tooltip";
import { handleClick } from "../common/handle-click";
import { longPress } from "../common/directives/long-press-directive";
import { hassLocalizeLitMixin } from "../../../mixins/lit-localize-mixin";
import { LovelaceElement, LovelaceElementConfig } from "./types.js";
Expand Down