mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-21 08:16:36 +00:00
Remove default export fire event (#1772)
* Remove default export fire event * Update provide_hass.js
This commit is contained in:
parent
74bdfc8c2d
commit
e2511c5ed3
@ -1,4 +1,4 @@
|
|||||||
import fireEvent from "../../../src/common/dom/fire_event.js";
|
import { fireEvent } from "../../../src/common/dom/fire_event.js";
|
||||||
|
|
||||||
import demoConfig from "./demo_config.js";
|
import demoConfig from "./demo_config.js";
|
||||||
import demoResources from "./demo_resources.js";
|
import demoResources from "./demo_resources.js";
|
||||||
|
@ -43,7 +43,7 @@
|
|||||||
* `node` on which to fire the event (HTMLElement, defaults to `this`).
|
* `node` on which to fire the event (HTMLElement, defaults to `this`).
|
||||||
* @return {Event} The new event that was fired.
|
* @return {Event} The new event that was fired.
|
||||||
*/
|
*/
|
||||||
export default function fire(node, type, detail, options) {
|
export const fireEvent = (node, type, detail, options) => {
|
||||||
options = options || {};
|
options = options || {};
|
||||||
detail = detail === null || detail === undefined ? {} : detail;
|
detail = detail === null || detail === undefined ? {} : detail;
|
||||||
const event = new Event(type, {
|
const event = new Event(type, {
|
||||||
@ -54,4 +54,4 @@ export default function fire(node, type, detail, options) {
|
|||||||
event.detail = detail;
|
event.detail = detail;
|
||||||
node.dispatchEvent(event);
|
node.dispatchEvent(event);
|
||||||
return event;
|
return event;
|
||||||
}
|
};
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
import { LitElement, html } from "@polymer/lit-element";
|
import { LitElement, html } from "@polymer/lit-element";
|
||||||
|
|
||||||
import "./ha-progress-button.js";
|
import "./ha-progress-button.js";
|
||||||
import fireEvent from "../../common/dom/fire_event.js";
|
import { fireEvent } from "../../common/dom/fire_event.js";
|
||||||
|
|
||||||
class HaCallApiButton extends LitElement {
|
class HaCallApiButton extends LitElement {
|
||||||
render() {
|
render() {
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
import { dedupingMixin } from "@polymer/polymer/lib/utils/mixin.js";
|
import { dedupingMixin } from "@polymer/polymer/lib/utils/mixin.js";
|
||||||
|
|
||||||
import fireEvent from "../common/dom/fire_event.js";
|
import { fireEvent } from "../common/dom/fire_event.js";
|
||||||
|
|
||||||
// Polymer legacy event helpers used courtesy of the Polymer project.
|
// Polymer legacy event helpers used courtesy of the Polymer project.
|
||||||
//
|
//
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import fireEvent from "../../../common/dom/fire_event.js";
|
import { fireEvent } from "../../../common/dom/fire_event.js";
|
||||||
|
|
||||||
import "../cards/hui-conditional-card.js";
|
import "../cards/hui-conditional-card.js";
|
||||||
import "../cards/hui-entities-card.js";
|
import "../cards/hui-entities-card.js";
|
||||||
|
@ -5,7 +5,7 @@ import "../elements/hui-state-badge-element.js";
|
|||||||
import "../elements/hui-state-icon-element.js";
|
import "../elements/hui-state-icon-element.js";
|
||||||
import "../elements/hui-state-label-element.js";
|
import "../elements/hui-state-label-element.js";
|
||||||
|
|
||||||
import fireEvent from "../../../common/dom/fire_event.js";
|
import { fireEvent } from "../../../common/dom/fire_event.js";
|
||||||
import createErrorCardConfig from "./create-error-card-config.js";
|
import createErrorCardConfig from "./create-error-card-config.js";
|
||||||
|
|
||||||
const CUSTOM_TYPE_PREFIX = "custom:";
|
const CUSTOM_TYPE_PREFIX = "custom:";
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import fireEvent from "../../../common/dom/fire_event.js";
|
import { fireEvent } from "../../../common/dom/fire_event.js";
|
||||||
|
|
||||||
import "../entity-rows/hui-climate-entity-row.js";
|
import "../entity-rows/hui-climate-entity-row.js";
|
||||||
import "../entity-rows/hui-cover-entity-row.js";
|
import "../entity-rows/hui-cover-entity-row.js";
|
||||||
|
Loading…
x
Reference in New Issue
Block a user