mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-27 11:16:35 +00:00
Use named export for compare (#3169)
This commit is contained in:
parent
0e044acaa9
commit
b9f86f735b
@ -1,4 +1,4 @@
|
|||||||
export default (a, b) => {
|
export const compare = (a: string, b: string) => {
|
||||||
if (a < b) {
|
if (a < b) {
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
@ -16,7 +16,7 @@ import {
|
|||||||
import { HomeAssistant } from "../../types";
|
import { HomeAssistant } from "../../types";
|
||||||
import { fireEvent } from "../../common/dom/fire_event";
|
import { fireEvent } from "../../common/dom/fire_event";
|
||||||
import { User, fetchUsers } from "../../data/user";
|
import { User, fetchUsers } from "../../data/user";
|
||||||
import compare from "../../common/string/compare";
|
import { compare } from "../../common/string/compare";
|
||||||
|
|
||||||
class HaEntityPicker extends LitElement {
|
class HaEntityPicker extends LitElement {
|
||||||
public hass?: HomeAssistant;
|
public hass?: HomeAssistant;
|
||||||
|
@ -21,7 +21,7 @@ import {
|
|||||||
import "../../../components/ha-card";
|
import "../../../components/ha-card";
|
||||||
import "../../../layouts/hass-subpage";
|
import "../../../layouts/hass-subpage";
|
||||||
import "../../../layouts/hass-loading-screen";
|
import "../../../layouts/hass-loading-screen";
|
||||||
import compare from "../../../common/string/compare";
|
import { compare } from "../../../common/string/compare";
|
||||||
import "../ha-config-section";
|
import "../ha-config-section";
|
||||||
import {
|
import {
|
||||||
showAreaRegistryDetailDialog,
|
showAreaRegistryDetailDialog,
|
||||||
|
@ -21,7 +21,7 @@ import "../../../layouts/hass-subpage";
|
|||||||
import "../../../layouts/hass-loading-screen";
|
import "../../../layouts/hass-loading-screen";
|
||||||
import "../../../components/ha-card";
|
import "../../../components/ha-card";
|
||||||
import "../../../components/ha-icon";
|
import "../../../components/ha-icon";
|
||||||
import compare from "../../../common/string/compare";
|
import { compare } from "../../../common/string/compare";
|
||||||
import domainIcon from "../../../common/entity/domain_icon";
|
import domainIcon from "../../../common/entity/domain_icon";
|
||||||
import stateIcon from "../../../common/entity/state_icon";
|
import stateIcon from "../../../common/entity/state_icon";
|
||||||
import computeDomain from "../../../common/entity/compute_domain";
|
import computeDomain from "../../../common/entity/compute_domain";
|
||||||
|
@ -4,7 +4,7 @@ import { PolymerElement } from "@polymer/polymer/polymer-element";
|
|||||||
import "../../../layouts/hass-subpage";
|
import "../../../layouts/hass-subpage";
|
||||||
|
|
||||||
import "../../../components/entity/state-badge";
|
import "../../../components/entity/state-badge";
|
||||||
import compare from "../../../common/string/compare";
|
import { compare } from "../../../common/string/compare";
|
||||||
|
|
||||||
import "./ha-device-card";
|
import "./ha-device-card";
|
||||||
import "./ha-ce-entities-card";
|
import "./ha-ce-entities-card";
|
||||||
|
@ -7,7 +7,7 @@ import { timeOut } from "@polymer/polymer/lib/utils/async";
|
|||||||
import "./ha-config-entries-dashboard";
|
import "./ha-config-entries-dashboard";
|
||||||
import "./ha-config-entry-page";
|
import "./ha-config-entry-page";
|
||||||
import NavigateMixin from "../../../mixins/navigate-mixin";
|
import NavigateMixin from "../../../mixins/navigate-mixin";
|
||||||
import compare from "../../../common/string/compare";
|
import { compare } from "../../../common/string/compare";
|
||||||
import { fetchAreaRegistry } from "../../../data/area_registry";
|
import { fetchAreaRegistry } from "../../../data/area_registry";
|
||||||
|
|
||||||
class HaConfigIntegrations extends NavigateMixin(PolymerElement) {
|
class HaConfigIntegrations extends NavigateMixin(PolymerElement) {
|
||||||
|
@ -13,7 +13,7 @@ import EventsMixin from "../../../mixins/events-mixin";
|
|||||||
import LocalizeMixin from "../../../mixins/localize-mixin";
|
import LocalizeMixin from "../../../mixins/localize-mixin";
|
||||||
import computeStateName from "../../../common/entity/compute_state_name";
|
import computeStateName from "../../../common/entity/compute_state_name";
|
||||||
import "../../../components/entity/state-badge";
|
import "../../../components/entity/state-badge";
|
||||||
import compare from "../../../common/string/compare";
|
import { compare } from "../../../common/string/compare";
|
||||||
import { updateDeviceRegistryEntry } from "../../../data/device_registry";
|
import { updateDeviceRegistryEntry } from "../../../data/device_registry";
|
||||||
|
|
||||||
function computeEntityName(hass, entity) {
|
function computeEntityName(hass, entity) {
|
||||||
|
@ -21,7 +21,7 @@ import {
|
|||||||
import "../../../components/ha-card";
|
import "../../../components/ha-card";
|
||||||
import "../../../layouts/hass-subpage";
|
import "../../../layouts/hass-subpage";
|
||||||
import "../../../layouts/hass-loading-screen";
|
import "../../../layouts/hass-loading-screen";
|
||||||
import compare from "../../../common/string/compare";
|
import { compare } from "../../../common/string/compare";
|
||||||
import "../ha-config-section";
|
import "../ha-config-section";
|
||||||
import {
|
import {
|
||||||
showPersonDetailDialog,
|
showPersonDetailDialog,
|
||||||
|
@ -22,7 +22,7 @@ import {
|
|||||||
} from "lit-element";
|
} from "lit-element";
|
||||||
|
|
||||||
import { fireEvent } from "../../../common/dom/fire_event";
|
import { fireEvent } from "../../../common/dom/fire_event";
|
||||||
import compare from "../../../common/string/compare";
|
import { compare } from "../../../common/string/compare";
|
||||||
import {
|
import {
|
||||||
AreaRegistryEntry,
|
AreaRegistryEntry,
|
||||||
fetchAreaRegistry,
|
fetchAreaRegistry,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user