mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-23 09:16:38 +00:00
Upgrade deps (#3038)
* Upgrade deps * Revert workbox back to 3 * Fix var name
This commit is contained in:
parent
109c40b2d3
commit
0c406335f5
@ -104,9 +104,15 @@ function genHassIcons() {
|
|||||||
fs.writeFileSync(HASS_OUTPUT_PATH, generateIconset("hass", iconNames));
|
fs.writeFileSync(HASS_OUTPUT_PATH, generateIconset("hass", iconNames));
|
||||||
}
|
}
|
||||||
|
|
||||||
gulp.task("gen-icons-mdi", () => genMDIIcons());
|
gulp.task("gen-icons-mdi", (done) => {
|
||||||
gulp.task("gen-icons-hass", () => genHassIcons());
|
genMDIIcons();
|
||||||
gulp.task("gen-icons", ["gen-icons-hass", "gen-icons-mdi"], () => {});
|
done();
|
||||||
|
});
|
||||||
|
gulp.task("gen-icons-hass", (done) => {
|
||||||
|
genHassIcons();
|
||||||
|
done();
|
||||||
|
});
|
||||||
|
gulp.task("gen-icons", gulp.series("gen-icons-hass", "gen-icons-mdi"));
|
||||||
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
findIcons,
|
findIcons,
|
||||||
|
@ -118,7 +118,9 @@ tasks.push(taskName);
|
|||||||
* the Lokalise update to translations/en.json will not happen immediately.
|
* the Lokalise update to translations/en.json will not happen immediately.
|
||||||
*/
|
*/
|
||||||
taskName = "build-master-translation";
|
taskName = "build-master-translation";
|
||||||
gulp.task(taskName, ["clean-translations"], function() {
|
gulp.task(
|
||||||
|
taskName,
|
||||||
|
gulp.series("clean-translations", function() {
|
||||||
return gulp
|
return gulp
|
||||||
.src("src/translations/en.json")
|
.src("src/translations/en.json")
|
||||||
.pipe(
|
.pipe(
|
||||||
@ -128,11 +130,14 @@ gulp.task(taskName, ["clean-translations"], function() {
|
|||||||
)
|
)
|
||||||
.pipe(rename("translationMaster.json"))
|
.pipe(rename("translationMaster.json"))
|
||||||
.pipe(gulp.dest(workDir));
|
.pipe(gulp.dest(workDir));
|
||||||
});
|
})
|
||||||
|
);
|
||||||
tasks.push(taskName);
|
tasks.push(taskName);
|
||||||
|
|
||||||
taskName = "build-merged-translations";
|
taskName = "build-merged-translations";
|
||||||
gulp.task(taskName, ["build-master-translation"], function() {
|
gulp.task(
|
||||||
|
taskName,
|
||||||
|
gulp.series("build-master-translation", function() {
|
||||||
return gulp.src(inDir + "/*.json").pipe(
|
return gulp.src(inDir + "/*.json").pipe(
|
||||||
foreach(function(stream, file) {
|
foreach(function(stream, file) {
|
||||||
// For each language generate a merged json file. It begins with the master
|
// For each language generate a merged json file. It begins with the master
|
||||||
@ -150,7 +155,7 @@ gulp.task(taskName, ["build-master-translation"], function() {
|
|||||||
src.push(inDir + "/" + lang + ".json");
|
src.push(inDir + "/" + lang + ".json");
|
||||||
}
|
}
|
||||||
return gulp
|
return gulp
|
||||||
.src(src)
|
.src(src, { allowEmpty: true })
|
||||||
.pipe(transform((data) => emptyFilter(data)))
|
.pipe(transform((data) => emptyFilter(data)))
|
||||||
.pipe(
|
.pipe(
|
||||||
merge({
|
merge({
|
||||||
@ -160,13 +165,16 @@ gulp.task(taskName, ["build-master-translation"], function() {
|
|||||||
.pipe(gulp.dest(fullDir));
|
.pipe(gulp.dest(fullDir));
|
||||||
})
|
})
|
||||||
);
|
);
|
||||||
});
|
})
|
||||||
|
);
|
||||||
tasks.push(taskName);
|
tasks.push(taskName);
|
||||||
|
|
||||||
const splitTasks = [];
|
const splitTasks = [];
|
||||||
TRANSLATION_FRAGMENTS.forEach((fragment) => {
|
TRANSLATION_FRAGMENTS.forEach((fragment) => {
|
||||||
taskName = "build-translation-fragment-" + fragment;
|
taskName = "build-translation-fragment-" + fragment;
|
||||||
gulp.task(taskName, ["build-merged-translations"], function() {
|
gulp.task(
|
||||||
|
taskName,
|
||||||
|
gulp.series("build-merged-translations", function() {
|
||||||
// Return only the translations for this fragment.
|
// Return only the translations for this fragment.
|
||||||
return gulp
|
return gulp
|
||||||
.src(fullDir + "/*.json")
|
.src(fullDir + "/*.json")
|
||||||
@ -180,13 +188,16 @@ TRANSLATION_FRAGMENTS.forEach((fragment) => {
|
|||||||
}))
|
}))
|
||||||
)
|
)
|
||||||
.pipe(gulp.dest(workDir + "/" + fragment));
|
.pipe(gulp.dest(workDir + "/" + fragment));
|
||||||
});
|
})
|
||||||
|
);
|
||||||
tasks.push(taskName);
|
tasks.push(taskName);
|
||||||
splitTasks.push(taskName);
|
splitTasks.push(taskName);
|
||||||
});
|
});
|
||||||
|
|
||||||
taskName = "build-translation-core";
|
taskName = "build-translation-core";
|
||||||
gulp.task(taskName, ["build-merged-translations"], function() {
|
gulp.task(
|
||||||
|
taskName,
|
||||||
|
gulp.series("build-merged-translations", function() {
|
||||||
// Remove the fragment translations from the core translation.
|
// Remove the fragment translations from the core translation.
|
||||||
return gulp
|
return gulp
|
||||||
.src(fullDir + "/*.json")
|
.src(fullDir + "/*.json")
|
||||||
@ -199,12 +210,15 @@ gulp.task(taskName, ["build-merged-translations"], function() {
|
|||||||
})
|
})
|
||||||
)
|
)
|
||||||
.pipe(gulp.dest(coreDir));
|
.pipe(gulp.dest(coreDir));
|
||||||
});
|
})
|
||||||
|
);
|
||||||
tasks.push(taskName);
|
tasks.push(taskName);
|
||||||
splitTasks.push(taskName);
|
splitTasks.push(taskName);
|
||||||
|
|
||||||
taskName = "build-flattened-translations";
|
taskName = "build-flattened-translations";
|
||||||
gulp.task(taskName, splitTasks, function() {
|
gulp.task(
|
||||||
|
taskName,
|
||||||
|
gulp.series(...splitTasks, function() {
|
||||||
// Flatten the split versions of our translations, and move them into outDir
|
// Flatten the split versions of our translations, and move them into outDir
|
||||||
return gulp
|
return gulp
|
||||||
.src(
|
.src(
|
||||||
@ -229,11 +243,14 @@ gulp.task(taskName, splitTasks, function() {
|
|||||||
})
|
})
|
||||||
)
|
)
|
||||||
.pipe(gulp.dest(outDir));
|
.pipe(gulp.dest(outDir));
|
||||||
});
|
})
|
||||||
|
);
|
||||||
tasks.push(taskName);
|
tasks.push(taskName);
|
||||||
|
|
||||||
taskName = "build-translation-fingerprints";
|
taskName = "build-translation-fingerprints";
|
||||||
gulp.task(taskName, ["build-flattened-translations"], function() {
|
gulp.task(
|
||||||
|
taskName,
|
||||||
|
gulp.series("build-flattened-translations", function() {
|
||||||
return gulp
|
return gulp
|
||||||
.src(outDir + "/**/*.json")
|
.src(outDir + "/**/*.json")
|
||||||
.pipe(
|
.pipe(
|
||||||
@ -273,11 +290,14 @@ gulp.task(taskName, ["build-flattened-translations"], function() {
|
|||||||
})
|
})
|
||||||
)
|
)
|
||||||
.pipe(gulp.dest(workDir));
|
.pipe(gulp.dest(workDir));
|
||||||
});
|
})
|
||||||
|
);
|
||||||
tasks.push(taskName);
|
tasks.push(taskName);
|
||||||
|
|
||||||
taskName = "build-translations";
|
taskName = "build-translations";
|
||||||
gulp.task(taskName, ["build-translation-fingerprints"], function() {
|
gulp.task(
|
||||||
|
taskName,
|
||||||
|
gulp.series("build-translation-fingerprints", function() {
|
||||||
return gulp
|
return gulp
|
||||||
.src([
|
.src([
|
||||||
"src/translations/translationMetadata.json",
|
"src/translations/translationMetadata.json",
|
||||||
@ -309,7 +329,8 @@ gulp.task(taskName, ["build-translation-fingerprints"], function() {
|
|||||||
)
|
)
|
||||||
.pipe(rename("translationMetadata.json"))
|
.pipe(rename("translationMetadata.json"))
|
||||||
.pipe(gulp.dest(workDir));
|
.pipe(gulp.dest(workDir));
|
||||||
});
|
})
|
||||||
|
);
|
||||||
tasks.push(taskName);
|
tasks.push(taskName);
|
||||||
|
|
||||||
module.exports = tasks;
|
module.exports = tasks;
|
||||||
|
142
package.json
142
package.json
@ -20,7 +20,7 @@
|
|||||||
"@material/mwc-button": "^0.5.0",
|
"@material/mwc-button": "^0.5.0",
|
||||||
"@material/mwc-ripple": "^0.5.0",
|
"@material/mwc-ripple": "^0.5.0",
|
||||||
"@mdi/svg": "3.5.95",
|
"@mdi/svg": "3.5.95",
|
||||||
"@polymer/app-layout": "^3.0.1",
|
"@polymer/app-layout": "^3.0.2",
|
||||||
"@polymer/app-localize-behavior": "^3.0.1",
|
"@polymer/app-localize-behavior": "^3.0.1",
|
||||||
"@polymer/app-route": "^3.0.2",
|
"@polymer/app-route": "^3.0.2",
|
||||||
"@polymer/app-storage": "^3.0.2",
|
"@polymer/app-storage": "^3.0.2",
|
||||||
@ -39,14 +39,14 @@
|
|||||||
"@polymer/iron-resizable-behavior": "^3.0.1",
|
"@polymer/iron-resizable-behavior": "^3.0.1",
|
||||||
"@polymer/neon-animation": "^3.0.1",
|
"@polymer/neon-animation": "^3.0.1",
|
||||||
"@polymer/paper-card": "^3.0.1",
|
"@polymer/paper-card": "^3.0.1",
|
||||||
"@polymer/paper-checkbox": "^3.0.1",
|
"@polymer/paper-checkbox": "^3.1.0",
|
||||||
"@polymer/paper-dialog": "^3.0.1",
|
"@polymer/paper-dialog": "^3.0.1",
|
||||||
"@polymer/paper-dialog-behavior": "^3.0.1",
|
"@polymer/paper-dialog-behavior": "^3.0.1",
|
||||||
"@polymer/paper-dialog-scrollable": "^3.0.1",
|
"@polymer/paper-dialog-scrollable": "^3.0.1",
|
||||||
"@polymer/paper-drawer-panel": "^3.0.1",
|
"@polymer/paper-drawer-panel": "^3.0.1",
|
||||||
"@polymer/paper-dropdown-menu": "^3.0.1",
|
"@polymer/paper-dropdown-menu": "^3.0.1",
|
||||||
"@polymer/paper-fab": "^3.0.1",
|
"@polymer/paper-fab": "^3.0.1",
|
||||||
"@polymer/paper-icon-button": "^3.0.1",
|
"@polymer/paper-icon-button": "^3.0.2",
|
||||||
"@polymer/paper-input": "^3.0.1",
|
"@polymer/paper-input": "^3.0.1",
|
||||||
"@polymer/paper-item": "^3.0.1",
|
"@polymer/paper-item": "^3.0.1",
|
||||||
"@polymer/paper-listbox": "^3.0.1",
|
"@polymer/paper-listbox": "^3.0.1",
|
||||||
@ -57,115 +57,115 @@
|
|||||||
"@polymer/paper-ripple": "^3.0.1",
|
"@polymer/paper-ripple": "^3.0.1",
|
||||||
"@polymer/paper-scroll-header-panel": "^3.0.1",
|
"@polymer/paper-scroll-header-panel": "^3.0.1",
|
||||||
"@polymer/paper-slider": "^3.0.1",
|
"@polymer/paper-slider": "^3.0.1",
|
||||||
"@polymer/paper-spinner": "^3.0.1",
|
"@polymer/paper-spinner": "^3.0.2",
|
||||||
"@polymer/paper-styles": "^3.0.1",
|
"@polymer/paper-styles": "^3.0.1",
|
||||||
"@polymer/paper-tabs": "^3.0.1",
|
"@polymer/paper-tabs": "^3.0.1",
|
||||||
"@polymer/paper-toast": "^3.0.1",
|
"@polymer/paper-toast": "^3.0.1",
|
||||||
"@polymer/paper-toggle-button": "^3.0.1",
|
"@polymer/paper-toggle-button": "^3.0.1",
|
||||||
"@polymer/paper-tooltip": "^3.0.1",
|
"@polymer/paper-tooltip": "^3.0.1",
|
||||||
"@polymer/polymer": "^3.0.5",
|
"@polymer/polymer": "^3.2.0",
|
||||||
"@vaadin/vaadin-combo-box": "^4.2.0",
|
"@vaadin/vaadin-combo-box": "^4.2.8",
|
||||||
"@vaadin/vaadin-date-picker": "^3.3.1",
|
"@vaadin/vaadin-date-picker": "^3.3.3",
|
||||||
"@webcomponents/shadycss": "^1.9.0",
|
"@webcomponents/shadycss": "^1.9.0",
|
||||||
"@webcomponents/webcomponentsjs": "^2.2.6",
|
"@webcomponents/webcomponentsjs": "^2.2.7",
|
||||||
"chart.js": "~2.7.2",
|
"chart.js": "~2.8.0",
|
||||||
"chartjs-chart-timeline": "^0.2.1",
|
"chartjs-chart-timeline": "^0.3.0",
|
||||||
"codemirror": "^5.43.0",
|
"codemirror": "^5.45.0",
|
||||||
"deep-clone-simple": "^1.1.1",
|
"deep-clone-simple": "^1.1.1",
|
||||||
"es6-object-assign": "^1.1.0",
|
"es6-object-assign": "^1.1.0",
|
||||||
"fecha": "^3.0.0",
|
"fecha": "^3.0.2",
|
||||||
"hls.js": "^0.12.3",
|
"hls.js": "^0.12.4",
|
||||||
"home-assistant-js-websocket": "^3.4.0",
|
"home-assistant-js-websocket": "^3.4.0",
|
||||||
"intl-messageformat": "^2.2.0",
|
"intl-messageformat": "^2.2.0",
|
||||||
"jquery": "^3.3.1",
|
"jquery": "^3.3.1",
|
||||||
"js-yaml": "^3.12.0",
|
"js-yaml": "^3.13.0",
|
||||||
"leaflet": "^1.3.4",
|
"leaflet": "^1.4.0",
|
||||||
"lit-element": "^2.1.0",
|
"lit-element": "^2.1.0",
|
||||||
"lit-html": "^1.0.0",
|
"lit-html": "^1.0.0",
|
||||||
"marked": "^0.6.0",
|
"marked": "^0.6.1",
|
||||||
"mdn-polyfills": "^5.12.0",
|
"mdn-polyfills": "^5.16.0",
|
||||||
"memoize-one": "^5.0.0",
|
"memoize-one": "^5.0.2",
|
||||||
"moment": "^2.22.2",
|
"moment": "^2.24.0",
|
||||||
"preact": "^8.3.1",
|
"preact": "^8.4.2",
|
||||||
"preact-compat": "^3.18.4",
|
"preact-compat": "^3.18.4",
|
||||||
"react-big-calendar": "^0.19.2",
|
"react-big-calendar": "^0.20.4",
|
||||||
"regenerator-runtime": "^0.12.1",
|
"regenerator-runtime": "^0.13.2",
|
||||||
"round-slider": "^1.3.2",
|
"round-slider": "^1.3.3",
|
||||||
"superstruct": "^0.6.0",
|
"superstruct": "^0.6.1",
|
||||||
"unfetch": "^4.0.1",
|
"unfetch": "^4.1.0",
|
||||||
"web-animations-js": "^2.3.1",
|
"web-animations-js": "^2.3.1",
|
||||||
"xss": "^1.0.3"
|
"xss": "^1.0.6"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@babel/core": "^7.1.2",
|
"@babel/core": "^7.4.0",
|
||||||
"@babel/plugin-external-helpers": "^7.0.0",
|
"@babel/plugin-external-helpers": "^7.2.0",
|
||||||
"@babel/plugin-proposal-class-properties": "^7.3.0",
|
"@babel/plugin-proposal-class-properties": "^7.4.0",
|
||||||
"@babel/plugin-proposal-decorators": "^7.3.0",
|
"@babel/plugin-proposal-decorators": "^7.4.0",
|
||||||
"@babel/plugin-proposal-object-rest-spread": "^7.0.0",
|
"@babel/plugin-proposal-object-rest-spread": "^7.4.0",
|
||||||
"@babel/plugin-syntax-dynamic-import": "^7.0.0",
|
"@babel/plugin-syntax-dynamic-import": "^7.2.0",
|
||||||
"@babel/plugin-transform-react-jsx": "^7.0.0",
|
"@babel/plugin-transform-react-jsx": "^7.3.0",
|
||||||
"@babel/preset-env": "^7.1.0",
|
"@babel/preset-env": "^7.4.2",
|
||||||
"@babel/preset-typescript": "^7.1.0",
|
"@babel/preset-typescript": "^7.3.3",
|
||||||
"@gfx/zopfli": "^1.0.9",
|
"@gfx/zopfli": "^1.0.11",
|
||||||
"@types/chai": "^4.1.7",
|
"@types/chai": "^4.1.7",
|
||||||
"@types/codemirror": "^0.0.71",
|
"@types/codemirror": "^0.0.72",
|
||||||
"@types/hls.js": "^0.12.2",
|
"@types/hls.js": "^0.12.3",
|
||||||
"@types/leaflet": "^1.4.3",
|
"@types/leaflet": "^1.4.3",
|
||||||
"@types/memoize-one": "^4.1.0",
|
"@types/memoize-one": "^4.1.1",
|
||||||
"@types/mocha": "^5.2.5",
|
"@types/mocha": "^5.2.6",
|
||||||
"babel-eslint": "^10",
|
"babel-eslint": "^10",
|
||||||
"babel-loader": "^8.0.4",
|
"babel-loader": "^8.0.5",
|
||||||
"chai": "^4.2.0",
|
"chai": "^4.2.0",
|
||||||
"compression-webpack-plugin": "^2.0.0",
|
"compression-webpack-plugin": "^2.0.0",
|
||||||
"copy-webpack-plugin": "^4.5.2",
|
"copy-webpack-plugin": "^5.0.2",
|
||||||
"del": "^3.0.0",
|
"del": "^4.0.0",
|
||||||
"eslint": "^5.6.0",
|
"eslint": "^5.15.3",
|
||||||
"eslint-config-airbnb-base": "^13.1.0",
|
"eslint-config-airbnb-base": "^13.1.0",
|
||||||
"eslint-config-prettier": "^4.0.0",
|
"eslint-config-prettier": "^4.1.0",
|
||||||
"eslint-import-resolver-webpack": "^0.10.1",
|
"eslint-import-resolver-webpack": "^0.11.0",
|
||||||
"eslint-plugin-import": "^2.14.0",
|
"eslint-plugin-import": "^2.16.0",
|
||||||
"eslint-plugin-prettier": "^3.0.0",
|
"eslint-plugin-prettier": "^3.0.1",
|
||||||
"eslint-plugin-react": "^7.11.1",
|
"eslint-plugin-react": "^7.12.4",
|
||||||
"gulp": "^3.9.1",
|
"gulp": "^4.0.0",
|
||||||
"gulp-foreach": "^0.1.0",
|
"gulp-foreach": "^0.1.0",
|
||||||
"gulp-hash": "^4.2.2",
|
"gulp-hash": "^4.2.2",
|
||||||
"gulp-hash-filename": "^2.0.1",
|
"gulp-hash-filename": "^2.0.1",
|
||||||
"gulp-insert": "^0.5.0",
|
"gulp-insert": "^0.5.0",
|
||||||
"gulp-json-transform": "^0.4.5",
|
"gulp-json-transform": "^0.4.6",
|
||||||
"gulp-jsonminify": "^1.1.0",
|
"gulp-jsonminify": "^1.1.0",
|
||||||
"gulp-merge-json": "^1.3.1",
|
"gulp-merge-json": "^1.3.1",
|
||||||
"gulp-rename": "^1.4.0",
|
"gulp-rename": "^1.4.0",
|
||||||
"html-loader": "^0.5.5",
|
"html-loader": "^0.5.5",
|
||||||
"html-webpack-plugin": "^3.2.0",
|
"html-webpack-plugin": "^3.2.0",
|
||||||
"husky": "^1.1.0",
|
"husky": "^1.3.1",
|
||||||
"lint-staged": "^8.0.2",
|
"lint-staged": "^8.1.5",
|
||||||
"merge-stream": "^1.0.1",
|
"merge-stream": "^1.0.1",
|
||||||
"mocha": "^5.2.0",
|
"mocha": "^6.0.2",
|
||||||
"parse5": "^5.1.0",
|
"parse5": "^5.1.0",
|
||||||
"polymer-cli": "^1.8.0",
|
"polymer-cli": "^1.9.7",
|
||||||
"prettier": "^1.14.3",
|
"prettier": "^1.16.4",
|
||||||
"raw-loader": "^0.5.1",
|
"raw-loader": "^2.0.0",
|
||||||
"reify": "^0.18.1",
|
"reify": "^0.18.1",
|
||||||
"require-dir": "^1.0.0",
|
"require-dir": "^1.2.0",
|
||||||
"sinon": "^7.1.1",
|
"sinon": "^7.3.1",
|
||||||
"terser-webpack-plugin": "^1.2.3",
|
"terser-webpack-plugin": "^1.2.3",
|
||||||
"ts-mocha": "^2.0.0",
|
"ts-mocha": "^6.0.0",
|
||||||
"tslint": "^5.11.0",
|
"tslint": "^5.14.0",
|
||||||
"tslint-config-prettier": "^1.15.0",
|
"tslint-config-prettier": "^1.18.0",
|
||||||
"tslint-eslint-rules": "^5.4.0",
|
"tslint-eslint-rules": "^5.4.0",
|
||||||
"tslint-plugin-prettier": "^2.0.1",
|
"tslint-plugin-prettier": "^2.0.1",
|
||||||
"typescript": "^3.1.4",
|
"typescript": "^3.4.1",
|
||||||
"uglifyjs-webpack-plugin": "^2.1.1",
|
"uglifyjs-webpack-plugin": "^2.1.2",
|
||||||
"wct-browser-legacy": "^1.0.1",
|
"wct-browser-legacy": "^1.0.2",
|
||||||
"web-component-tester": "^6.8.0",
|
"web-component-tester": "^6.9.2",
|
||||||
"webpack": "^4.19.1",
|
"webpack": "^4.29.6",
|
||||||
"webpack-cli": "^3.1.0",
|
"webpack-cli": "^3.3.0",
|
||||||
"webpack-dev-server": "^3.1.8",
|
"webpack-dev-server": "^3.2.1",
|
||||||
"workbox-webpack-plugin": "^3.5.0"
|
"workbox-webpack-plugin": "^3.5.0"
|
||||||
},
|
},
|
||||||
"resolutions": {
|
"resolutions": {
|
||||||
"@polymer/polymer": "3.1.0",
|
"@polymer/polymer": "3.2.0",
|
||||||
"@webcomponents/webcomponentsjs": "^2.2.6",
|
"@webcomponents/webcomponentsjs": "^2.2.7",
|
||||||
"@webcomponents/shadycss": "^1.9.0",
|
"@webcomponents/shadycss": "^1.9.0",
|
||||||
"@vaadin/vaadin-overlay": "3.2.2",
|
"@vaadin/vaadin-overlay": "3.2.2",
|
||||||
"@vaadin/vaadin-lumo-styles": "1.3.0",
|
"@vaadin/vaadin-lumo-styles": "1.3.0",
|
||||||
|
@ -10,11 +10,11 @@ export const timeCachePromiseFunc = async <T>(
|
|||||||
func: (
|
func: (
|
||||||
hass: HomeAssistant,
|
hass: HomeAssistant,
|
||||||
entityId: string,
|
entityId: string,
|
||||||
...args: Array<unknown>
|
...args: unknown[]
|
||||||
) => Promise<T>,
|
) => Promise<T>,
|
||||||
hass: HomeAssistant,
|
hass: HomeAssistant,
|
||||||
entityId: string,
|
entityId: string,
|
||||||
...args: Array<unknown>
|
...args: unknown[]
|
||||||
): Promise<T> => {
|
): Promise<T> => {
|
||||||
let cache: ResultCache<T> | undefined = (hass as any)[cacheKey];
|
let cache: ResultCache<T> | undefined = (hass as any)[cacheKey];
|
||||||
|
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
<title>Home Assistant</title>
|
<title>Home Assistant</title>
|
||||||
<link rel='preload' href='/static/fonts/roboto/Roboto-Light.ttf' as='font' crossorigin />
|
<link rel='preload' href='/static/fonts/roboto/Roboto-Light.ttf' as='font' crossorigin />
|
||||||
<link rel='preload' href='/static/fonts/roboto/Roboto-Regular.ttf' as='font' crossorigin />
|
<link rel='preload' href='/static/fonts/roboto/Roboto-Regular.ttf' as='font' crossorigin />
|
||||||
<%= require('raw-loader!./_header.html.template') %>
|
<%= require('raw-loader!./_header.html.template').default %>
|
||||||
<style>
|
<style>
|
||||||
.content {
|
.content {
|
||||||
padding: 20px 16px;
|
padding: 20px 16px;
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
<link rel='preload' href='<%= coreJS %>' as='script'/>
|
<link rel='preload' href='<%= coreJS %>' as='script'/>
|
||||||
<link rel='preload' href='/static/fonts/roboto/Roboto-Regular.ttf' as='font' crossorigin />
|
<link rel='preload' href='/static/fonts/roboto/Roboto-Regular.ttf' as='font' crossorigin />
|
||||||
<link rel='preload' href='/static/fonts/roboto/Roboto-Medium.ttf' as='font' crossorigin />
|
<link rel='preload' href='/static/fonts/roboto/Roboto-Medium.ttf' as='font' crossorigin />
|
||||||
<%= require('raw-loader!./_header.html.template') %>
|
<%= require('raw-loader!./_header.html.template').default %>
|
||||||
<title>Home Assistant</title>
|
<title>Home Assistant</title>
|
||||||
<link rel='apple-touch-icon' sizes='180x180'
|
<link rel='apple-touch-icon' sizes='180x180'
|
||||||
href='/static/icons/favicon-apple-180x180.png'>
|
href='/static/icons/favicon-apple-180x180.png'>
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
<title>Home Assistant</title>
|
<title>Home Assistant</title>
|
||||||
<link rel='preload' href='/static/fonts/roboto/Roboto-Light.ttf' as='font' crossorigin />
|
<link rel='preload' href='/static/fonts/roboto/Roboto-Light.ttf' as='font' crossorigin />
|
||||||
<link rel='preload' href='/static/fonts/roboto/Roboto-Regular.ttf' as='font' crossorigin />
|
<link rel='preload' href='/static/fonts/roboto/Roboto-Regular.ttf' as='font' crossorigin />
|
||||||
<%= require('raw-loader!./_header.html.template') %>
|
<%= require('raw-loader!./_header.html.template').default %>
|
||||||
<style>
|
<style>
|
||||||
.content {
|
.content {
|
||||||
padding: 20px 16px;
|
padding: 20px 16px;
|
||||||
|
@ -1,4 +1,3 @@
|
|||||||
// @ts-ignore
|
|
||||||
import CodeMirror from "codemirror";
|
import CodeMirror from "codemirror";
|
||||||
import "codemirror/mode/yaml/yaml";
|
import "codemirror/mode/yaml/yaml";
|
||||||
// @ts-ignore
|
// @ts-ignore
|
||||||
@ -21,12 +20,14 @@ declare global {
|
|||||||
export class HuiYamlEditor extends HTMLElement {
|
export class HuiYamlEditor extends HTMLElement {
|
||||||
public _hass?: HomeAssistant;
|
public _hass?: HomeAssistant;
|
||||||
|
|
||||||
|
// @ts-ignore
|
||||||
public codemirror: CodeMirror;
|
public codemirror: CodeMirror;
|
||||||
|
|
||||||
private _value: string;
|
private _value: string;
|
||||||
|
|
||||||
public constructor() {
|
public constructor() {
|
||||||
super();
|
super();
|
||||||
|
// @ts-ignore
|
||||||
CodeMirror.commands.save = (cm: CodeMirror) => {
|
CodeMirror.commands.save = (cm: CodeMirror) => {
|
||||||
fireEvent(cm.getWrapperElement(), "yaml-save");
|
fireEvent(cm.getWrapperElement(), "yaml-save");
|
||||||
};
|
};
|
||||||
@ -89,7 +90,9 @@ export class HuiYamlEditor extends HTMLElement {
|
|||||||
|
|
||||||
public connectedCallback(): void {
|
public connectedCallback(): void {
|
||||||
if (!this.codemirror) {
|
if (!this.codemirror) {
|
||||||
this.codemirror = CodeMirror(this.shadowRoot, {
|
this.codemirror = CodeMirror(
|
||||||
|
(this.shadowRoot as unknown) as HTMLElement,
|
||||||
|
{
|
||||||
value: this._value,
|
value: this._value,
|
||||||
lineNumbers: true,
|
lineNumbers: true,
|
||||||
mode: "yaml",
|
mode: "yaml",
|
||||||
@ -104,7 +107,8 @@ export class HuiYamlEditor extends HTMLElement {
|
|||||||
this._hass && computeRTL(this._hass!)
|
this._hass && computeRTL(this._hass!)
|
||||||
? ["rtl-gutter", "CodeMirror-linenumbers"]
|
? ["rtl-gutter", "CodeMirror-linenumbers"]
|
||||||
: [],
|
: [],
|
||||||
});
|
}
|
||||||
|
);
|
||||||
this.setScrollBarDirection();
|
this.setScrollBarDirection();
|
||||||
this.codemirror.on("changes", () => this._onChange());
|
this.codemirror.on("changes", () => this._onChange());
|
||||||
} else {
|
} else {
|
||||||
|
@ -478,8 +478,8 @@ class HUIRoot extends LitElement {
|
|||||||
|
|
||||||
private _updateNotifications(
|
private _updateNotifications(
|
||||||
states: HassEntities,
|
states: HassEntities,
|
||||||
persistent: Array<unknown>
|
persistent: unknown[]
|
||||||
): Array<unknown> {
|
): unknown[] {
|
||||||
const configurator = computeNotifications(states);
|
const configurator = computeNotifications(states);
|
||||||
return persistent.concat(configurator);
|
return persistent.concat(configurator);
|
||||||
}
|
}
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
import { generateFilter } from "../../../src/common/entity/entity_filter";
|
import { generateFilter } from "../../../src/common/entity/entity_filter";
|
||||||
|
|
||||||
import * as assert from "assert";
|
import assert from "assert";
|
||||||
|
|
||||||
describe("EntityFilter", () => {
|
describe("EntityFilter", () => {
|
||||||
// case 1
|
// case 1
|
||||||
|
@ -15,6 +15,8 @@
|
|||||||
"noImplicitAny": false,
|
"noImplicitAny": false,
|
||||||
"skipLibCheck": true,
|
"skipLibCheck": true,
|
||||||
"resolveJsonModule": true,
|
"resolveJsonModule": true,
|
||||||
"experimentalDecorators": true
|
"experimentalDecorators": true,
|
||||||
|
"allowSyntheticDefaultImports": true,
|
||||||
|
"esModuleInterop": true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user