Skip to content

Commit

Permalink
Merge pull request #341 from tomvanswam/dev
Browse files Browse the repository at this point in the history
v1.3.1
  • Loading branch information
tomvanswam committed Oct 5, 2021
2 parents 28a2df9 + 2464019 commit 0d83dfc
Show file tree
Hide file tree
Showing 8 changed files with 1,946 additions and 1,070 deletions.
2,948 changes: 1,910 additions & 1,038 deletions package-lock.json

Large diffs are not rendered by default.

37 changes: 19 additions & 18 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "compass-card",
"version": "1.2.1",
"version": "1.3.1",
"description": "Lovelace compass-card",
"keywords": [
"home-assistant",
Expand All @@ -15,32 +15,33 @@
"author": "Tom van Swam <tom@vanswam.com>",
"license": "MIT",
"dependencies": {
"custom-card-helpers": "^1.7.0",
"home-assistant-js-websocket": "^5.9.0",
"lit-element": "^2.4.0",
"lit-html": "^1.3.0"
"custom-card-helpers": "^1.8.0",
"home-assistant-js-websocket": "^5.11.1",
"lit": "^2.0.0"
},
"devDependencies": {
"@babel/core": "^7.13.16",
"@babel/plugin-proposal-class-properties": "^7.13.0",
"@babel/plugin-proposal-decorators": "^7.13.15",
"@babel/core": "^7.15.5",
"@babel/plugin-proposal-class-properties": "^7.14.5",
"@babel/plugin-proposal-decorators": "^7.15.4",
"@rollup/plugin-babel": "^5.3.0",
"@rollup/plugin-commonjs": "^18.0.0",
"@rollup/plugin-commonjs": "^21.0.0",
"@rollup/plugin-json": "^4.1.0",
"@rollup/plugin-node-resolve": "^11.2.1",
"@typescript-eslint/eslint-plugin": "^4.22.0",
"@typescript-eslint/parser": "^4.22.0",
"eslint": "^7.25.0",
"@rollup/plugin-node-resolve": "^13.0.5",
"@typescript-eslint/eslint-plugin": "^4.33.0",
"@typescript-eslint/parser": "^4.33.0",
"babel-eslint": "^10.1.0",
"eslint": "^7.32.0",
"eslint-config-airbnb-base": "^14.2.1",
"eslint-config-prettier": "^8.3.0",
"eslint-plugin-import": "^2.22.1",
"eslint-plugin-prettier": "^3.4.0",
"prettier": "^2.2.1",
"rollup": "^2.36.1",
"eslint-plugin-import": "^2.24.2",
"eslint-plugin-lit": "^1.5.1",
"eslint-plugin-prettier": "^4.0.0",
"prettier": "^2.4.1",
"rollup": "^2.58.0",
"rollup-plugin-serve": "^1.1.0",
"rollup-plugin-terser": "^7.0.2",
"rollup-plugin-typescript2": "^0.30.0",
"typescript": "^4.2.4"
"typescript": "^4.4.3"
},
"scripts": {
"start": "rollup -c --watch",
Expand Down
15 changes: 8 additions & 7 deletions src/compass-card.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { LitElement, html, customElement, property, CSSResult, TemplateResult, PropertyValues, svg, SVGTemplateResult, internalProperty } from 'lit-element';
import { LitElement, html, CSSResult, TemplateResult, PropertyValues, svg, SVGTemplateResult } from 'lit';
import { customElement, property, state } from 'lit/decorators.js';
import { getLovelace, HomeAssistant, LovelaceCardEditor, LovelaceCard } from 'custom-card-helpers';
import { HassEntities, HassEntity } from 'home-assistant-js-websocket';
import { CompassCardConfig } from './editorTypes';
Expand Down Expand Up @@ -52,12 +53,12 @@ export class CompassCard extends LitElement {

@property({ attribute: false }) public _hass!: HomeAssistant;
@property({ attribute: false }) protected _config!: CompassCardConfig;
@internalProperty() protected colors!: CCColors;
@internalProperty() protected header!: CCHeader;
@internalProperty() protected compass!: CCCompass;
@internalProperty() protected indicatorSensors!: CCIndicatorSensor[];
@internalProperty() protected entities: HassEntities = {};
@internalProperty() protected valueSensors!: CCValueSensor[];
@state() protected colors!: CCColors;
@state() protected header!: CCHeader;
@state() protected compass!: CCCompass;
@state() protected indicatorSensors!: CCIndicatorSensor[];
@state() protected entities: HassEntities = {};
@state() protected valueSensors!: CCValueSensor[];

public setConfig(config: CompassCardConfig): void {
if (!config) {
Expand Down
2 changes: 1 addition & 1 deletion src/const.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { localize } from './localize/localize';

export const CARD_VERSION = '1.2.1';
export const CARD_VERSION = '1.3.1';
export const ICONS = {
compass: 'mdi:compass',
};
Expand Down
7 changes: 4 additions & 3 deletions src/editor.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { LitElement, html, customElement, property, TemplateResult, CSSResult, css, internalProperty } from 'lit-element';
import { LitElement, html, TemplateResult, CSSResult, css } from 'lit';
import { customElement, property, state } from 'lit/decorators.js';
import { HomeAssistant, fireEvent, LovelaceCardEditor } from 'custom-card-helpers';

import { CompassCardConfigV0, isV0Config, configV0ToV1 } from './updateV0ToV1';
Expand All @@ -13,8 +14,8 @@ import { EditorTarget } from './utils/ha-types';
@customElement('compass-card-editor')
export class CompassCardEditor extends LitElement implements LovelaceCardEditor {
@property({ attribute: false }) public hass?: HomeAssistant;
@internalProperty() private _helpers?;
@internalProperty() private _config?: CompassCardConfig;
@state() private _helpers?;
@state() private _config?: CompassCardConfig;
private _initialized = false;

public setConfig(config: CompassCardConfig | CompassCardConfigV0): void {
Expand Down
2 changes: 1 addition & 1 deletion src/localize/languages/ru.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
"NE": "СВ",
"ENE": "ВСВ",
"E": "В",
"ESE": "ВСВ",
"ESE": "ВЮВ",
"SE": "ЮВ",
"SSE": "ЮЮВ",
"S": "Ю",
Expand Down
2 changes: 1 addition & 1 deletion src/style.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { CSSResult, css } from 'lit-element';
import { CSSResult, css } from 'lit';

const style: CSSResult = css`
:host ::slotted(.card-content:not(:first-child)),
Expand Down
3 changes: 2 additions & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
"noImplicitAny": false,
"skipLibCheck": true,
"resolveJsonModule": true,
"experimentalDecorators": true
"experimentalDecorators": true,
"useDefineForClassFields": false
}
}

0 comments on commit 0d83dfc

Please sign in to comment.