mirror of
https://github.com/home-assistant/frontend.git
synced 2025-08-11 02:09:26 +00:00
Compare commits
2169 Commits
20231208.2
...
fix_downlo
Author | SHA1 | Date | |
---|---|---|---|
![]() |
67a5152c36 | ||
![]() |
918fca4d0a | ||
![]() |
258a19028b | ||
![]() |
7b4536564e | ||
![]() |
64c260c1c4 | ||
![]() |
36f3ef9e86 | ||
![]() |
42622fe21e | ||
![]() |
64f7afd60f | ||
![]() |
d9cd428bf4 | ||
![]() |
3282785cf2 | ||
![]() |
2c1931adb1 | ||
![]() |
c9cad254d2 | ||
![]() |
be6ecefb9e | ||
![]() |
f4f2cce57e | ||
![]() |
99bde50c01 | ||
![]() |
a2471f82a3 | ||
![]() |
556315b360 | ||
![]() |
bed470f79d | ||
![]() |
9acf946097 | ||
![]() |
231ef4b5b4 | ||
![]() |
f8bcc6dde4 | ||
![]() |
11ed4600fd | ||
![]() |
c0e2d6fa23 | ||
![]() |
942562161a | ||
![]() |
d35c40b585 | ||
![]() |
8cd0ddceb8 | ||
![]() |
c3ee49298a | ||
![]() |
89dc1a7ebc | ||
![]() |
c90e820c7f | ||
![]() |
ced70fd9a1 | ||
![]() |
253c8f358b | ||
![]() |
0c0b657c79 | ||
![]() |
8941837697 | ||
![]() |
23b55484c3 | ||
![]() |
1990b8fa84 | ||
![]() |
03ea08f98c | ||
![]() |
1f5f6c5f8a | ||
![]() |
fa821b1c4f | ||
![]() |
f51bc40203 | ||
![]() |
c7dae49c42 | ||
![]() |
b056b71557 | ||
![]() |
0db2b45cc3 | ||
![]() |
1be1003549 | ||
![]() |
b8a13dd6eb | ||
![]() |
cae5540c44 | ||
![]() |
d47966cdf7 | ||
![]() |
991cf83ff3 | ||
![]() |
b83be38514 | ||
![]() |
17982e0bdc | ||
![]() |
b918862bb1 | ||
![]() |
6bdc7af09f | ||
![]() |
01adef6d9f | ||
![]() |
7cbebfd603 | ||
![]() |
4a1adf42b8 | ||
![]() |
0c2e62ec91 | ||
![]() |
42b1f938d6 | ||
![]() |
311f221387 | ||
![]() |
3c6be8cf99 | ||
![]() |
28703b39da | ||
![]() |
db03e271f5 | ||
![]() |
7c851d4542 | ||
![]() |
4d107f978c | ||
![]() |
de57b025e6 | ||
![]() |
2218a7121b | ||
![]() |
3f4351476f | ||
![]() |
d763a014ad | ||
![]() |
52a91d8403 | ||
![]() |
f6cc435f86 | ||
![]() |
349b1ccaad | ||
![]() |
ca921be9d2 | ||
![]() |
919932e414 | ||
![]() |
97a8b6da34 | ||
![]() |
1eceaa0d1b | ||
![]() |
ba3fae2577 | ||
![]() |
93ed1cae5e | ||
![]() |
d8618b4a25 | ||
![]() |
1f6b0360de | ||
![]() |
e1830470b6 | ||
![]() |
9e002f7940 | ||
![]() |
a1380e93ea | ||
![]() |
c511672b0d | ||
![]() |
d6d6d1d0b5 | ||
![]() |
bee629f7ed | ||
![]() |
d8df380edc | ||
![]() |
cbfcad71d5 | ||
![]() |
327a9ff836 | ||
![]() |
ae2c389273 | ||
![]() |
5ce75cea0d | ||
![]() |
ee79c3a983 | ||
![]() |
f396be2ed7 | ||
![]() |
9f55ef811d | ||
![]() |
4c898a2a5a | ||
![]() |
a56e22790d | ||
![]() |
2d8fbc652f | ||
![]() |
46f0e0212d | ||
![]() |
786b9ee8d6 | ||
![]() |
1e73cebda6 | ||
![]() |
9b9adf3c7a | ||
![]() |
a08c7a319f | ||
![]() |
5e8868e4b1 | ||
![]() |
64285d5155 | ||
![]() |
5247b74fd4 | ||
![]() |
26e914290d | ||
![]() |
ed3096157c | ||
![]() |
04a45a4361 | ||
![]() |
5430040b96 | ||
![]() |
4bd70167ad | ||
![]() |
e908fbb48e | ||
![]() |
38da01abfa | ||
![]() |
c3b7ce8dc4 | ||
![]() |
0488d199ac | ||
![]() |
df3e4576db | ||
![]() |
6bd7788815 | ||
![]() |
9cdae4fea7 | ||
![]() |
7adf9f8526 | ||
![]() |
35dcb46703 | ||
![]() |
17db85ebad | ||
![]() |
fa39595c37 | ||
![]() |
4db908171f | ||
![]() |
7306b8c102 | ||
![]() |
928bf3465e | ||
![]() |
0b38143765 | ||
![]() |
2f974078e0 | ||
![]() |
efe90fcc55 | ||
![]() |
01e33f5412 | ||
![]() |
51fdc484c3 | ||
![]() |
3d9fa462a6 | ||
![]() |
32b5d67806 | ||
![]() |
20d3681da3 | ||
![]() |
9b97274bf6 | ||
![]() |
ede0dff030 | ||
![]() |
4cd4635fa5 | ||
![]() |
7832219749 | ||
![]() |
a8d4726caf | ||
![]() |
4b3e20c6ca | ||
![]() |
f9a53743ce | ||
![]() |
89250c0c01 | ||
![]() |
4ef944ea08 | ||
![]() |
5f58c183f4 | ||
![]() |
f71feff916 | ||
![]() |
50fb3b314b | ||
![]() |
06298562cd | ||
![]() |
89e74f3f07 | ||
![]() |
da96c27893 | ||
![]() |
3321dd4ca7 | ||
![]() |
7106d56b33 | ||
![]() |
25cd8a9d9f | ||
![]() |
a4bb0e04ab | ||
![]() |
1df60056b2 | ||
![]() |
c4bc1f627f | ||
![]() |
f4df5852fb | ||
![]() |
152b665f2e | ||
![]() |
f1d49aaeb1 | ||
![]() |
5db293ce01 | ||
![]() |
744cda3974 | ||
![]() |
eb8d23320a | ||
![]() |
7bfa72e7ac | ||
![]() |
031548c155 | ||
![]() |
a7d3ab9d17 | ||
![]() |
d2e00a0f0a | ||
![]() |
eea9e660ac | ||
![]() |
5644c78664 | ||
![]() |
7677471dcc | ||
![]() |
c0ca7e425e | ||
![]() |
29d9b61319 | ||
![]() |
3c8da03d66 | ||
![]() |
9a9b2e3900 | ||
![]() |
830d8d2410 | ||
![]() |
cda34a6ffd | ||
![]() |
76ee9ce202 | ||
![]() |
00bd32acba | ||
![]() |
bc11c0b3ac | ||
![]() |
51f89b00c1 | ||
![]() |
67852125e5 | ||
![]() |
7a36cf67e3 | ||
![]() |
d175e84623 | ||
![]() |
9fff3adbfb | ||
![]() |
5f6396b187 | ||
![]() |
42f2341e06 | ||
![]() |
48dfa1163b | ||
![]() |
28e12f7fd1 | ||
![]() |
5f58ac4fb6 | ||
![]() |
25e7c4f1b2 | ||
![]() |
00934f2183 | ||
![]() |
d302eaffe6 | ||
![]() |
901f736d5f | ||
![]() |
e55f32ae91 | ||
![]() |
3e0c998e74 | ||
![]() |
597866ff4e | ||
![]() |
64e21e185c | ||
![]() |
7a1838ee1a | ||
![]() |
4debac60ae | ||
![]() |
4af231e62b | ||
![]() |
432cf4a7ed | ||
![]() |
df064967ca | ||
![]() |
dc0cab9307 | ||
![]() |
3180747a0a | ||
![]() |
1542095138 | ||
![]() |
6c1937f247 | ||
![]() |
9db1e52a55 | ||
![]() |
f92c63135c | ||
![]() |
a3bf1a014b | ||
![]() |
31fba48ad5 | ||
![]() |
05dfa1bb1a | ||
![]() |
f0f47aac3b | ||
![]() |
9b42494667 | ||
![]() |
42df951f89 | ||
![]() |
f4996424a2 | ||
![]() |
fd01302d9a | ||
![]() |
2daaa1cb9c | ||
![]() |
9fde175c6b | ||
![]() |
f1b24e847e | ||
![]() |
7a587de54e | ||
![]() |
eb69f95f83 | ||
![]() |
359a3a4af9 | ||
![]() |
a8b75e7814 | ||
![]() |
2b898822d1 | ||
![]() |
fc9a0958d4 | ||
![]() |
5843877cc8 | ||
![]() |
913837f064 | ||
![]() |
386ac5d779 | ||
![]() |
3a1a4ade68 | ||
![]() |
dd35112a04 | ||
![]() |
afcb4c56fa | ||
![]() |
58f210f45b | ||
![]() |
f4d9d55ecd | ||
![]() |
995955491f | ||
![]() |
2ab9aed5b4 | ||
![]() |
1693f5b5c9 | ||
![]() |
f096e1698c | ||
![]() |
2f46caa806 | ||
![]() |
5c9b53ffb7 | ||
![]() |
f6e00e7262 | ||
![]() |
5d49f4007e | ||
![]() |
ca20c2d292 | ||
![]() |
f1ab24da99 | ||
![]() |
e16e851952 | ||
![]() |
0b562a4b16 | ||
![]() |
7734922059 | ||
![]() |
54320c3dbf | ||
![]() |
849cfed669 | ||
![]() |
8932dfd504 | ||
![]() |
b9922b2f8e | ||
![]() |
11fc5bc755 | ||
![]() |
67ac4882f2 | ||
![]() |
413171bb3c | ||
![]() |
b111eb2316 | ||
![]() |
9bafabe3e9 | ||
![]() |
202bc6440b | ||
![]() |
e2a89a55b7 | ||
![]() |
1e05730ec7 | ||
![]() |
885a63d3f6 | ||
![]() |
206fbac618 | ||
![]() |
4509661652 | ||
![]() |
4669decfd0 | ||
![]() |
f05c204da3 | ||
![]() |
338692d2c3 | ||
![]() |
5415690585 | ||
![]() |
418315d20b | ||
![]() |
9bbffb6919 | ||
![]() |
e338d63ec5 | ||
![]() |
264aedbff3 | ||
![]() |
4103ef362c | ||
![]() |
a04a449eb9 | ||
![]() |
08633c197b | ||
![]() |
f8b3a429c6 | ||
![]() |
946c8a59b4 | ||
![]() |
f93c7e1b6e | ||
![]() |
6298534b9c | ||
![]() |
5175b42069 | ||
![]() |
e01e31341b | ||
![]() |
203d900d16 | ||
![]() |
4d9e9aaead | ||
![]() |
82ec308be0 | ||
![]() |
dcafbcb06c | ||
![]() |
aa5f8dc082 | ||
![]() |
4dcae9c69c | ||
![]() |
13a1af97da | ||
![]() |
e3c435fd78 | ||
![]() |
a32dee7071 | ||
![]() |
c098858b73 | ||
![]() |
9e509e3bc9 | ||
![]() |
79ac2a72fa | ||
![]() |
b063840f46 | ||
![]() |
4366308b2b | ||
![]() |
126826e52c | ||
![]() |
e31af5d31b | ||
![]() |
fca97cd734 | ||
![]() |
ca94267c44 | ||
![]() |
df1f26cee7 | ||
![]() |
24a4e075e6 | ||
![]() |
43fcc6238e | ||
![]() |
b40b96248b | ||
![]() |
c7ac4c7490 | ||
![]() |
6cd8471b91 | ||
![]() |
940eaa26e0 | ||
![]() |
79e68ce125 | ||
![]() |
e581d35432 | ||
![]() |
d3d578e0f4 | ||
![]() |
79c71cbe48 | ||
![]() |
82b50a1c5d | ||
![]() |
6cfda78aa1 | ||
![]() |
f9ff938775 | ||
![]() |
778fcab90d | ||
![]() |
07e5aa30c6 | ||
![]() |
3f0ec03a14 | ||
![]() |
1bb871b9ac | ||
![]() |
0e8783fb01 | ||
![]() |
1d88c4465b | ||
![]() |
1f0cfb5fd6 | ||
![]() |
a21e17fb23 | ||
![]() |
5de888c91a | ||
![]() |
2dd4090db3 | ||
![]() |
35aafd45dc | ||
![]() |
c778b881ab | ||
![]() |
04acecc832 | ||
![]() |
a10a9916be | ||
![]() |
3604ffa64a | ||
![]() |
a0724749d3 | ||
![]() |
45a75c3a7c | ||
![]() |
f0dcfa4aa3 | ||
![]() |
1c4b66cb1e | ||
![]() |
af2d575bf0 | ||
![]() |
92165d776a | ||
![]() |
a8bbd8ab90 | ||
![]() |
43ac9dbea7 | ||
![]() |
bba9eca4e9 | ||
![]() |
40f65b1980 | ||
![]() |
23a33b10a1 | ||
![]() |
67a93013c7 | ||
![]() |
1f838d7529 | ||
![]() |
ffc0435144 | ||
![]() |
5877d69c87 | ||
![]() |
99035cea8f | ||
![]() |
1b441a7eec | ||
![]() |
ad49e9f7b0 | ||
![]() |
e32b15ede2 | ||
![]() |
a35b4376ea | ||
![]() |
619f9f76ee | ||
![]() |
f771bc10db | ||
![]() |
b8889a1183 | ||
![]() |
eb6b45eaed | ||
![]() |
31a748ed93 | ||
![]() |
0110bdd24a | ||
![]() |
365b712976 | ||
![]() |
7d97dbe15b | ||
![]() |
8bc0ea5a0b | ||
![]() |
44948a3474 | ||
![]() |
bc51b53b4a | ||
![]() |
693dbfd050 | ||
![]() |
67217b9dd0 | ||
![]() |
487795b7c4 | ||
![]() |
a30e0d33f9 | ||
![]() |
0c1b8abe03 | ||
![]() |
ce9c5149d5 | ||
![]() |
adbcdc62eb | ||
![]() |
faf872bfb8 | ||
![]() |
fe0fb2382a | ||
![]() |
e84c3a85db | ||
![]() |
cdd29295e5 | ||
![]() |
f7532f3476 | ||
![]() |
fdf9fab709 | ||
![]() |
c8930cec87 | ||
![]() |
f9c336890d | ||
![]() |
c721de109f | ||
![]() |
1c95e8d6ec | ||
![]() |
57cf2c1341 | ||
![]() |
f7d5c5f850 | ||
![]() |
470f5127f4 | ||
![]() |
34e361601a | ||
![]() |
70d6cce8f8 | ||
![]() |
f9814f35d1 | ||
![]() |
f30603753e | ||
![]() |
ce9993fd36 | ||
![]() |
268eb4317c | ||
![]() |
4c2044e70a | ||
![]() |
7f96c1fbe1 | ||
![]() |
75e24780c1 | ||
![]() |
95580bc4c0 | ||
![]() |
175f68e0cf | ||
![]() |
b6efedfc8d | ||
![]() |
23c21a35d8 | ||
![]() |
9c7324298b | ||
![]() |
e92be566a0 | ||
![]() |
4e96ad5f28 | ||
![]() |
f64a1500af | ||
![]() |
c9e8619c04 | ||
![]() |
7ab1133b45 | ||
![]() |
77abfd3e61 | ||
![]() |
d7aaa41aa4 | ||
![]() |
8223f6b155 | ||
![]() |
435eae77fa | ||
![]() |
394d8ddd6c | ||
![]() |
ead54e445f | ||
![]() |
7ee5db2be5 | ||
![]() |
fef6f0ac94 | ||
![]() |
7a60763786 | ||
![]() |
94e321a364 | ||
![]() |
1c12c2b714 | ||
![]() |
442a8f11a7 | ||
![]() |
4e8b58cd6c | ||
![]() |
a92dab46c2 | ||
![]() |
468660d235 | ||
![]() |
c721afa137 | ||
![]() |
ac9654c1de | ||
![]() |
570ad38bac | ||
![]() |
e778a9aa1d | ||
![]() |
49576189af | ||
![]() |
d4a5115a65 | ||
![]() |
5d71d4c0a1 | ||
![]() |
d334b1ca7b | ||
![]() |
5551e98388 | ||
![]() |
59945cb2f8 | ||
![]() |
500bc959f0 | ||
![]() |
deece20206 | ||
![]() |
fc8945be60 | ||
![]() |
3fbd5f07a9 | ||
![]() |
ff9af2f980 | ||
![]() |
62cba99491 | ||
![]() |
5a5005c09c | ||
![]() |
dd179e1f4e | ||
![]() |
27bdf80168 | ||
![]() |
f70ce7491a | ||
![]() |
9f17f6a8cf | ||
![]() |
8890c7da17 | ||
![]() |
4e51c7cf96 | ||
![]() |
291c026da0 | ||
![]() |
dd88d8633f | ||
![]() |
254ee8568b | ||
![]() |
cd631e8693 | ||
![]() |
765812331b | ||
![]() |
7462f8fbe3 | ||
![]() |
dc940f248c | ||
![]() |
2793ca65cd | ||
![]() |
e687ddab21 | ||
![]() |
4bd27e5055 | ||
![]() |
c6e2e07286 | ||
![]() |
e77508b8a8 | ||
![]() |
a5db44a167 | ||
![]() |
265bbfc95d | ||
![]() |
305cecb213 | ||
![]() |
813feff12e | ||
![]() |
cbce6f633f | ||
![]() |
1bbf45d35e | ||
![]() |
76e53e9738 | ||
![]() |
c30e4a6935 | ||
![]() |
c4a700a55c | ||
![]() |
a759767d79 | ||
![]() |
7f868c8140 | ||
![]() |
f7f37c24e2 | ||
![]() |
be02a8869f | ||
![]() |
3a9f09cb47 | ||
![]() |
0c2a9d85e0 | ||
![]() |
e72356033c | ||
![]() |
3c48559df6 | ||
![]() |
f36d68c677 | ||
![]() |
af46b8221e | ||
![]() |
d25f72524b | ||
![]() |
0840d8a10e | ||
![]() |
597bf5def0 | ||
![]() |
3478bd309b | ||
![]() |
64b8b7658d | ||
![]() |
a1af8718a0 | ||
![]() |
fd9e2b647d | ||
![]() |
caee4ba7bc | ||
![]() |
915036006d | ||
![]() |
48887f2066 | ||
![]() |
68d9ce7923 | ||
![]() |
a36f3c8fb1 | ||
![]() |
4dfadea9e9 | ||
![]() |
71dc26edab | ||
![]() |
f260c95add | ||
![]() |
dc6f1efffb | ||
![]() |
b7763882f4 | ||
![]() |
7de5c46f14 | ||
![]() |
5920efa2b2 | ||
![]() |
d2194d55f9 | ||
![]() |
c0043af4c9 | ||
![]() |
dcf763438b | ||
![]() |
858a00e28c | ||
![]() |
ab407e8274 | ||
![]() |
14f96a6262 | ||
![]() |
2b33c70e04 | ||
![]() |
717443e2d6 | ||
![]() |
2aba9099a0 | ||
![]() |
3079f126a8 | ||
![]() |
1cdfb746bf | ||
![]() |
39a1844991 | ||
![]() |
9e4dc0d39e | ||
![]() |
ab91a4b814 | ||
![]() |
ca66c02fb3 | ||
![]() |
97bb052d71 | ||
![]() |
137bb473c0 | ||
![]() |
326b57f91b | ||
![]() |
32feab6a70 | ||
![]() |
68a0d04f04 | ||
![]() |
9078ab4026 | ||
![]() |
8605684906 | ||
![]() |
9f17d17d6e | ||
![]() |
ba5f176d52 | ||
![]() |
7115d14699 | ||
![]() |
23e37daff3 | ||
![]() |
ed6c2dfe39 | ||
![]() |
b48a28f2a6 | ||
![]() |
3166fec7db | ||
![]() |
1a67bd0414 | ||
![]() |
d34c43e292 | ||
![]() |
c7cfbb5b6c | ||
![]() |
05ad3137f1 | ||
![]() |
bde2fd8202 | ||
![]() |
e5327c0903 | ||
![]() |
1a0ca1b78f | ||
![]() |
ed141b1d12 | ||
![]() |
5a7a71c551 | ||
![]() |
f09e0d187b | ||
![]() |
7f6325fa5e | ||
![]() |
de292a8143 | ||
![]() |
84b2005844 | ||
![]() |
0d93432a2c | ||
![]() |
8bc9927ee2 | ||
![]() |
484bed4dab | ||
![]() |
3d7e243707 | ||
![]() |
f8a432c89e | ||
![]() |
d484b2f63d | ||
![]() |
ba770f8e50 | ||
![]() |
30d9186031 | ||
![]() |
cd74367acc | ||
![]() |
618cd9d9e5 | ||
![]() |
0ff2f1bf75 | ||
![]() |
d28f1f07e7 | ||
![]() |
b457d27c4c | ||
![]() |
6aa5bc2d8b | ||
![]() |
76fc0c7ab1 | ||
![]() |
7aa7019386 | ||
![]() |
b69f0964c9 | ||
![]() |
2f9b6d000b | ||
![]() |
9c12ab9c6d | ||
![]() |
94f186c436 | ||
![]() |
449f858ac8 | ||
![]() |
91a2f2cf24 | ||
![]() |
2c975d4f41 | ||
![]() |
ab534933fc | ||
![]() |
e353aaa339 | ||
![]() |
020904f8f6 | ||
![]() |
fa8b3f006d | ||
![]() |
d9ce20992c | ||
![]() |
a09f44dcd2 | ||
![]() |
c709059c00 | ||
![]() |
5613df1d01 | ||
![]() |
d8013a4db9 | ||
![]() |
216dbc4d41 | ||
![]() |
c40751dadd | ||
![]() |
f58d3ad670 | ||
![]() |
682f5345cc | ||
![]() |
a69771c1f8 | ||
![]() |
22de449dda | ||
![]() |
05a27b9399 | ||
![]() |
32083ea13d | ||
![]() |
18210f35b5 | ||
![]() |
362a6f46fe | ||
![]() |
1c9d411d3a | ||
![]() |
6d84523456 | ||
![]() |
2a18706a13 | ||
![]() |
87b58b0bbd | ||
![]() |
3ebb268b57 | ||
![]() |
2df097cd1b | ||
![]() |
8349e47c17 | ||
![]() |
4913932c97 | ||
![]() |
19f057a51b | ||
![]() |
c556742ff4 | ||
![]() |
8b5f731d0c | ||
![]() |
9568677926 | ||
![]() |
93ee5de1b4 | ||
![]() |
2f68ee0efc | ||
![]() |
5a229e3c88 | ||
![]() |
7c5f947865 | ||
![]() |
e9cbd54979 | ||
![]() |
cf55824899 | ||
![]() |
395586ddeb | ||
![]() |
9c48dbf232 | ||
![]() |
00eb820e36 | ||
![]() |
6b99cda982 | ||
![]() |
9bde0e876d | ||
![]() |
9482fcb04b | ||
![]() |
883ad58f52 | ||
![]() |
11ace6002a | ||
![]() |
c416daeb92 | ||
![]() |
061521a979 | ||
![]() |
d3f73baa36 | ||
![]() |
3037bf494c | ||
![]() |
b4dd953128 | ||
![]() |
430a28f350 | ||
![]() |
0eacf3fdac | ||
![]() |
7f9bf69a08 | ||
![]() |
32cca9e30c | ||
![]() |
d7d62307b8 | ||
![]() |
12bfa5dab2 | ||
![]() |
c0a728bc66 | ||
![]() |
19e8667349 | ||
![]() |
f3688b95d4 | ||
![]() |
01f692f05c | ||
![]() |
d652f6382d | ||
![]() |
c0f96d9473 | ||
![]() |
f1a2af24b3 | ||
![]() |
8501098bd1 | ||
![]() |
a235f76985 | ||
![]() |
968c0de141 | ||
![]() |
77d8aff1f4 | ||
![]() |
5e486d9cf0 | ||
![]() |
f730761b3f | ||
![]() |
46fc9c1a33 | ||
![]() |
8ed68bf295 | ||
![]() |
5622180d42 | ||
![]() |
ef1f9b371d | ||
![]() |
0b79684cf1 | ||
![]() |
bc68d8df11 | ||
![]() |
ebbade2fb7 | ||
![]() |
2b5f778f2e | ||
![]() |
91fc2383cb | ||
![]() |
1080a8c961 | ||
![]() |
6144049f8c | ||
![]() |
4ad3ad6e93 | ||
![]() |
16e84296da | ||
![]() |
3e1ea8d236 | ||
![]() |
8c9996fc81 | ||
![]() |
336b5fb547 | ||
![]() |
3f0f3affb6 | ||
![]() |
6754b8893b | ||
![]() |
6ec4323c76 | ||
![]() |
20408392d2 | ||
![]() |
b030a5d1f0 | ||
![]() |
a9f8eb5ab1 | ||
![]() |
e26e6d7c2d | ||
![]() |
e0c98e4524 | ||
![]() |
2832f501d1 | ||
![]() |
d2f2d682a9 | ||
![]() |
54b2121273 | ||
![]() |
c5ca731e05 | ||
![]() |
fd9c6c5449 | ||
![]() |
39f4355c1a | ||
![]() |
35fed0b0e2 | ||
![]() |
f0f0aefca1 | ||
![]() |
b60864086f | ||
![]() |
6629f372fc | ||
![]() |
ec9a95dde0 | ||
![]() |
3cd0c49c78 | ||
![]() |
e1ae95dd9f | ||
![]() |
ab38dad156 | ||
![]() |
1ddeca3eeb | ||
![]() |
9c6aef033d | ||
![]() |
b23aacef84 | ||
![]() |
7d218c89ae | ||
![]() |
ffa96d789f | ||
![]() |
f08f455698 | ||
![]() |
5eae163796 | ||
![]() |
9e7f01a009 | ||
![]() |
eeffa3561c | ||
![]() |
f096eb2031 | ||
![]() |
3aad7431da | ||
![]() |
a4f167559c | ||
![]() |
44a0582e83 | ||
![]() |
735560c552 | ||
![]() |
94c28ea534 | ||
![]() |
5b7c20af33 | ||
![]() |
4719775926 | ||
![]() |
5c30c1647c | ||
![]() |
3ba572ee37 | ||
![]() |
0adee7d189 | ||
![]() |
b5c2b555bc | ||
![]() |
51b6d7758d | ||
![]() |
0f21dfadf1 | ||
![]() |
54e8a34f21 | ||
![]() |
dfbf4abd5d | ||
![]() |
62d8434596 | ||
![]() |
d6df228e17 | ||
![]() |
00faa16349 | ||
![]() |
3c92fe4170 | ||
![]() |
02a9d67c7d | ||
![]() |
b368f886f9 | ||
![]() |
88718bca23 | ||
![]() |
33931b29a1 | ||
![]() |
a9310fdde0 | ||
![]() |
d634317438 | ||
![]() |
a41978f647 | ||
![]() |
7e799bf639 | ||
![]() |
73617711ff | ||
![]() |
edbfc22bf8 | ||
![]() |
5e75f6a6c2 | ||
![]() |
6dc80306e8 | ||
![]() |
acd1b04b0a | ||
![]() |
7e9d09e11c | ||
![]() |
038f7ec000 | ||
![]() |
08959cbabf | ||
![]() |
b611674ebd | ||
![]() |
da75eecfa5 | ||
![]() |
2f696bd511 | ||
![]() |
9e3284a7db | ||
![]() |
0c3471e0b7 | ||
![]() |
1ca0b58aca | ||
![]() |
adceed689b | ||
![]() |
fdf829bc81 | ||
![]() |
574fc99889 | ||
![]() |
3a83cb36a1 | ||
![]() |
a458ccf995 | ||
![]() |
560e2c9438 | ||
![]() |
78becb5440 | ||
![]() |
da2e530601 | ||
![]() |
a88a7c5236 | ||
![]() |
0a095c6f21 | ||
![]() |
e8dd835eeb | ||
![]() |
e05c66444a | ||
![]() |
d0e61ca31a | ||
![]() |
1f90a0c2e5 | ||
![]() |
dbd84901f8 | ||
![]() |
0aa25dbed9 | ||
![]() |
dd74a35d3f | ||
![]() |
b1d8ec0fe4 | ||
![]() |
cd4af674a3 | ||
![]() |
7a6491a901 | ||
![]() |
8d20303d54 | ||
![]() |
a5786b4761 | ||
![]() |
4ade39543d | ||
![]() |
a85dda3365 | ||
![]() |
e578904ff7 | ||
![]() |
09f0da1ead | ||
![]() |
2faa8fec17 | ||
![]() |
945c4a66b1 | ||
![]() |
5d794e7e88 | ||
![]() |
88a33bee14 | ||
![]() |
35ec9af23f | ||
![]() |
dd331173ad | ||
![]() |
885ccb84cb | ||
![]() |
0358fe5614 | ||
![]() |
89d842c2a8 | ||
![]() |
8911b55316 | ||
![]() |
6791e85625 | ||
![]() |
79618ce114 | ||
![]() |
87ba0e73dd | ||
![]() |
567a2ea019 | ||
![]() |
811c34b489 | ||
![]() |
dd22ae446a | ||
![]() |
d96ddf968c | ||
![]() |
bbb64870a1 | ||
![]() |
f05ddd3fcd | ||
![]() |
0612e25d9f | ||
![]() |
559ecf3eae | ||
![]() |
ddb31a8342 | ||
![]() |
1c978b7cce | ||
![]() |
9d9624c960 | ||
![]() |
179245e1aa | ||
![]() |
345000a0e9 | ||
![]() |
d94d5f96c3 | ||
![]() |
0fa3538db5 | ||
![]() |
1749725229 | ||
![]() |
83e94d32e3 | ||
![]() |
7fed4e6b37 | ||
![]() |
677cffd650 | ||
![]() |
1faa1480e4 | ||
![]() |
8cb63ac36d | ||
![]() |
6e29b77e94 | ||
![]() |
38e7b8c467 | ||
![]() |
d078807255 | ||
![]() |
82d84de426 | ||
![]() |
729a12af0c | ||
![]() |
ce43774b5f | ||
![]() |
e63d82d291 | ||
![]() |
d997cfcef0 | ||
![]() |
219f548261 | ||
![]() |
ee2b10912c | ||
![]() |
e3b0630797 | ||
![]() |
30d0293a4b | ||
![]() |
7468ab985a | ||
![]() |
ef3758da55 | ||
![]() |
2a970b8416 | ||
![]() |
f70126eb62 | ||
![]() |
f87296d978 | ||
![]() |
2890d5c8cf | ||
![]() |
15a7ace278 | ||
![]() |
71a2c40dd7 | ||
![]() |
a08bbcd1b4 | ||
![]() |
5ec257fa18 | ||
![]() |
9b01c0b2f0 | ||
![]() |
7dd860c539 | ||
![]() |
dbc2db2591 | ||
![]() |
29aa57229c | ||
![]() |
8d74174be1 | ||
![]() |
a60242f042 | ||
![]() |
db314522d7 | ||
![]() |
7b66ee06eb | ||
![]() |
3f34dacec9 | ||
![]() |
277650e1c1 | ||
![]() |
e59c04c685 | ||
![]() |
d9583582e6 | ||
![]() |
5ead5ed058 | ||
![]() |
f2993602f9 | ||
![]() |
11b490d145 | ||
![]() |
cd4937b539 | ||
![]() |
daa36788e0 | ||
![]() |
0447247add | ||
![]() |
7edc4efc95 | ||
![]() |
144d278e4a | ||
![]() |
541453c245 | ||
![]() |
ca53af5c41 | ||
![]() |
bd54eb40a7 | ||
![]() |
8ff2396a53 | ||
![]() |
c85e29f2bb | ||
![]() |
e7a749ef7d | ||
![]() |
bef53aef57 | ||
![]() |
877d0db1bb | ||
![]() |
aa49d6ef6b | ||
![]() |
d646ce4995 | ||
![]() |
d6e6844f23 | ||
![]() |
66e26e1a27 | ||
![]() |
b7473b58fb | ||
![]() |
895333aa05 | ||
![]() |
42b5fbec9b | ||
![]() |
f7072c247e | ||
![]() |
f995f19f06 | ||
![]() |
7f50504908 | ||
![]() |
dc93a0ce54 | ||
![]() |
3e4d06fca3 | ||
![]() |
050bef0564 | ||
![]() |
1abebdae21 | ||
![]() |
b411ae0286 | ||
![]() |
202bd148ef | ||
![]() |
15589927c8 | ||
![]() |
df7b5b08cf | ||
![]() |
8b9fa9bc39 | ||
![]() |
c07e1122e1 | ||
![]() |
1ceef7c3d3 | ||
![]() |
e332364ec0 | ||
![]() |
97c4cf9391 | ||
![]() |
522f66423b | ||
![]() |
58ba9f628a | ||
![]() |
57e48e2561 | ||
![]() |
37af77dabe | ||
![]() |
2b5fba4a30 | ||
![]() |
d833910796 | ||
![]() |
81c796beb4 | ||
![]() |
19ee150395 | ||
![]() |
82329833f5 | ||
![]() |
28ced4bfd3 | ||
![]() |
ab3b8593f4 | ||
![]() |
094203f0b4 | ||
![]() |
9a2051a679 | ||
![]() |
09accb3071 | ||
![]() |
7d432cd11a | ||
![]() |
7258e31348 | ||
![]() |
5707ca0016 | ||
![]() |
76abfea6ed | ||
![]() |
d01377da3c | ||
![]() |
e97be57e3b | ||
![]() |
c71a051b6d | ||
![]() |
f41fab6968 | ||
![]() |
bda61da666 | ||
![]() |
93445ced74 | ||
![]() |
fd6a192db1 | ||
![]() |
b81314fc1f | ||
![]() |
9beb4c39ff | ||
![]() |
18a6f8d64d | ||
![]() |
beec720b9b | ||
![]() |
85865af0c3 | ||
![]() |
d33cf4f199 | ||
![]() |
4a1087c969 | ||
![]() |
cbc95a5e2d | ||
![]() |
dcd4c39978 | ||
![]() |
11d832c2ea | ||
![]() |
3b15d26500 | ||
![]() |
df65038341 | ||
![]() |
d72e8c35d8 | ||
![]() |
da2865d8bf | ||
![]() |
fd64d17d88 | ||
![]() |
5273293cd6 | ||
![]() |
49c42fc757 | ||
![]() |
7603fa3aa8 | ||
![]() |
7aa005e0ce | ||
![]() |
b2a55dd737 | ||
![]() |
5bc3ad4c63 | ||
![]() |
ccad1afcf0 | ||
![]() |
530745d20d | ||
![]() |
a16cae0671 | ||
![]() |
231c923776 | ||
![]() |
b08b67179e | ||
![]() |
d9f1b06199 | ||
![]() |
8d0c4e4a52 | ||
![]() |
4b7526c8a3 | ||
![]() |
6267ab5ed3 | ||
![]() |
ae94231800 | ||
![]() |
7d28f3f585 | ||
![]() |
adea384f40 | ||
![]() |
55b66250f4 | ||
![]() |
182111912c | ||
![]() |
8a0924bf1f | ||
![]() |
94dc9308ea | ||
![]() |
f42a9ac070 | ||
![]() |
1acada625f | ||
![]() |
128dbbcfef | ||
![]() |
57d8544dbf | ||
![]() |
76daa2bb7f | ||
![]() |
9cbb51549b | ||
![]() |
bd1ede4145 | ||
![]() |
321a085c0e | ||
![]() |
6a3041988a | ||
![]() |
23fcdf876c | ||
![]() |
00f325e961 | ||
![]() |
d00b3cfc61 | ||
![]() |
4cc9e74ea8 | ||
![]() |
a56b9a96ce | ||
![]() |
d4b5f4bc14 | ||
![]() |
cf1523ee73 | ||
![]() |
f5d571ca84 | ||
![]() |
362e92f313 | ||
![]() |
5ddf72b973 | ||
![]() |
6e78c28f51 | ||
![]() |
772f0bb669 | ||
![]() |
846c2a848f | ||
![]() |
8495757005 | ||
![]() |
9960d38b91 | ||
![]() |
d3222f8bb0 | ||
![]() |
2e5cce5409 | ||
![]() |
f78946447f | ||
![]() |
eb0579ddc5 | ||
![]() |
686424fc70 | ||
![]() |
039e9b40bd | ||
![]() |
8272bef890 | ||
![]() |
62528b2413 | ||
![]() |
fa24f529e0 | ||
![]() |
43a54f6cda | ||
![]() |
9c153bbd58 | ||
![]() |
27afe9ecb7 | ||
![]() |
72f989e2bd | ||
![]() |
a6ef46565f | ||
![]() |
a35ac09688 | ||
![]() |
27024135ea | ||
![]() |
8759ed740a | ||
![]() |
bb3e8ae33d | ||
![]() |
b5b60c9bf0 | ||
![]() |
3b6a2cf7d8 | ||
![]() |
7e10e14102 | ||
![]() |
a580abab4a | ||
![]() |
11523c08c4 | ||
![]() |
7a8988528b | ||
![]() |
2a6380f083 | ||
![]() |
f43319a3ae | ||
![]() |
e8eefaf1d3 | ||
![]() |
06d82a4925 | ||
![]() |
4991d52fcc | ||
![]() |
0b391eafcf | ||
![]() |
0bb34830f8 | ||
![]() |
29881c8bb4 | ||
![]() |
56254ddf03 | ||
![]() |
007ba70641 | ||
![]() |
3e1227b064 | ||
![]() |
067e179f26 | ||
![]() |
9a3f7df25e | ||
![]() |
c7b4e8f37c | ||
![]() |
bfa8b886ab | ||
![]() |
433c00b73a | ||
![]() |
a497f42f73 | ||
![]() |
165723cb5b | ||
![]() |
42b5fa696a | ||
![]() |
59062d96a8 | ||
![]() |
d36bbfe07d | ||
![]() |
4a8bb5034d | ||
![]() |
0d489213a4 | ||
![]() |
c54acc9369 | ||
![]() |
562bc084f0 | ||
![]() |
6fce2f35a5 | ||
![]() |
f4e24bed2e | ||
![]() |
09969c0e2d | ||
![]() |
4b0181774b | ||
![]() |
272db5e9e8 | ||
![]() |
9ae3a824d9 | ||
![]() |
9db55c9391 | ||
![]() |
59697127c0 | ||
![]() |
565600e945 | ||
![]() |
721eebf367 | ||
![]() |
f5ae842167 | ||
![]() |
3575734ed0 | ||
![]() |
4e8de1f64d | ||
![]() |
a8366c6416 | ||
![]() |
cd73b8ac29 | ||
![]() |
74eca6b1f5 | ||
![]() |
9ef0bd6e46 | ||
![]() |
53eb7f771f | ||
![]() |
8ff8c01bba | ||
![]() |
cd62f064cb | ||
![]() |
db82b856e0 | ||
![]() |
ab340e13e9 | ||
![]() |
22c54b3fea | ||
![]() |
2dd7e598d5 | ||
![]() |
d1ce06e368 | ||
![]() |
52f3ff3306 | ||
![]() |
9717304b68 | ||
![]() |
c646f3c39a | ||
![]() |
0297ec5a7b | ||
![]() |
e48286c2a0 | ||
![]() |
f2b2da9877 | ||
![]() |
250f87cfd8 | ||
![]() |
9f6afb162a | ||
![]() |
0add65feff | ||
![]() |
c08d9a9166 | ||
![]() |
d9a9038cec | ||
![]() |
6bee3ef45c | ||
![]() |
3a855f95ad | ||
![]() |
e7f3393ec6 | ||
![]() |
d7cb4cb537 | ||
![]() |
c55720c933 | ||
![]() |
f78e757485 | ||
![]() |
fa03c58a93 | ||
![]() |
49f1ad633f | ||
![]() |
d449e10120 | ||
![]() |
474c8c243e | ||
![]() |
e9e53e9451 | ||
![]() |
cfa84f30be | ||
![]() |
7416ae7dfd | ||
![]() |
10a5c4dfb4 | ||
![]() |
6f1fa139e7 | ||
![]() |
b38a348957 | ||
![]() |
f97971faf6 | ||
![]() |
c5ae9e8497 | ||
![]() |
c00287c401 | ||
![]() |
1a2daf8a7a | ||
![]() |
c0e048023d | ||
![]() |
431f4937c1 | ||
![]() |
0a55220837 | ||
![]() |
13f01492b4 | ||
![]() |
ce5bcf61f9 | ||
![]() |
d31a777135 | ||
![]() |
5cc08cfe0b | ||
![]() |
3eea7dc6cd | ||
![]() |
a629f01300 | ||
![]() |
f1345af526 | ||
![]() |
064c51f487 | ||
![]() |
d88670034a | ||
![]() |
5fab1969a8 | ||
![]() |
b3e14d449e | ||
![]() |
97206ee8fe | ||
![]() |
7748315fc3 | ||
![]() |
e059ca146b | ||
![]() |
56cabeb497 | ||
![]() |
7a7bd87f50 | ||
![]() |
ff9c794659 | ||
![]() |
2921161336 | ||
![]() |
91e5fcacd5 | ||
![]() |
febbf34de6 | ||
![]() |
5a2977f4d4 | ||
![]() |
7a7a355765 | ||
![]() |
ccebae84a7 | ||
![]() |
f96f38ee82 | ||
![]() |
d4056e6a32 | ||
![]() |
389a7a6ed9 | ||
![]() |
05aecaaaf1 | ||
![]() |
085131d546 | ||
![]() |
c2737d5cec | ||
![]() |
29ae46d775 | ||
![]() |
dfee3ba089 | ||
![]() |
1dbb70b964 | ||
![]() |
1eecc5c0e2 | ||
![]() |
81c0bcff0b | ||
![]() |
6ccbeb8a75 | ||
![]() |
f59ed0a72b | ||
![]() |
a9f00ded0f | ||
![]() |
74730ba201 | ||
![]() |
95b2f7d821 | ||
![]() |
661b14da54 | ||
![]() |
41e34c0d61 | ||
![]() |
5d044a06eb | ||
![]() |
f617426808 | ||
![]() |
3c3d54243c | ||
![]() |
afc624bf4b | ||
![]() |
0991628843 | ||
![]() |
34b9c7b9d1 | ||
![]() |
d52641b495 | ||
![]() |
80c7fd2bf2 | ||
![]() |
e0062cf190 | ||
![]() |
7d2cee650d | ||
![]() |
66560b1f1c | ||
![]() |
a500b582e3 | ||
![]() |
19f94ff8cc | ||
![]() |
0b6994d402 | ||
![]() |
9fe8f507ec | ||
![]() |
2113cf5280 | ||
![]() |
ae9e1b724f | ||
![]() |
9b28c7cf69 | ||
![]() |
d9bac06806 | ||
![]() |
b1e37cb1e1 | ||
![]() |
a2a89502d8 | ||
![]() |
4cc5d2d04b | ||
![]() |
79abcca3b3 | ||
![]() |
043f383a35 | ||
![]() |
d4dd767941 | ||
![]() |
174f1991b1 | ||
![]() |
e15495a626 | ||
![]() |
a8a9a797cb | ||
![]() |
914dbc1e28 | ||
![]() |
111816f08a | ||
![]() |
1b4534890c | ||
![]() |
ed6542469d | ||
![]() |
3774a3d6ba | ||
![]() |
bfa293ae3a | ||
![]() |
9264adb799 | ||
![]() |
829ea4a9e4 | ||
![]() |
be26f8bc24 | ||
![]() |
c864b34a9a | ||
![]() |
099ea61a94 | ||
![]() |
3ebe6027be | ||
![]() |
f5f2a5ad5b | ||
![]() |
d046700d06 | ||
![]() |
2ad84b2832 | ||
![]() |
f9ccb9fc72 | ||
![]() |
6d3940db1e | ||
![]() |
20d174431d | ||
![]() |
1900710e06 | ||
![]() |
ed86a48e1c | ||
![]() |
d2bdb52926 | ||
![]() |
9c57c9f151 | ||
![]() |
9e9cb15a42 | ||
![]() |
6421a9443d | ||
![]() |
f2b43ddad8 | ||
![]() |
e55b59d9b7 | ||
![]() |
4a77359a06 | ||
![]() |
505d7b6ddb | ||
![]() |
79cdc43699 | ||
![]() |
8ff9823cd7 | ||
![]() |
3488c60818 | ||
![]() |
b2af21ba5c | ||
![]() |
12a61a0021 | ||
![]() |
649917cdde | ||
![]() |
3ed27ee853 | ||
![]() |
c1d3a76917 | ||
![]() |
571ed6b9e9 | ||
![]() |
a347315fa7 | ||
![]() |
57d1405115 | ||
![]() |
e5ff6bd2f5 | ||
![]() |
43a422cdca | ||
![]() |
11f2bef05c | ||
![]() |
ff9f331287 | ||
![]() |
cdf64ccdaa | ||
![]() |
8b220acca2 | ||
![]() |
8fdb7fa1d5 | ||
![]() |
008c842431 | ||
![]() |
bc41de0d9c | ||
![]() |
7310c9cf6d | ||
![]() |
84b436c08e | ||
![]() |
1925a47bdc | ||
![]() |
438a426458 | ||
![]() |
f923deb71d | ||
![]() |
e79bc71ab7 | ||
![]() |
11b0990d2b | ||
![]() |
870cb0c65f | ||
![]() |
deda2009f8 | ||
![]() |
b2797ab8da | ||
![]() |
644dcb0381 | ||
![]() |
c65f4f7a6e | ||
![]() |
e2266aa671 | ||
![]() |
68a79490dc | ||
![]() |
6febe8552e | ||
![]() |
f611f23f6f | ||
![]() |
ef4f11fdf8 | ||
![]() |
627e06663b | ||
![]() |
ab01633069 | ||
![]() |
17dcc90638 | ||
![]() |
d0df029ff1 | ||
![]() |
86a7e69812 | ||
![]() |
af9417f2a6 | ||
![]() |
7120ad99b9 | ||
![]() |
334c245b65 | ||
![]() |
bcb72d83b8 | ||
![]() |
c99e0e846b | ||
![]() |
ec3f63e8a3 | ||
![]() |
1bc33a30ec | ||
![]() |
8cca233b7c | ||
![]() |
a78608bfb4 | ||
![]() |
e7c1ac94af | ||
![]() |
1a797b3415 | ||
![]() |
2b27a4da2b | ||
![]() |
1df92fa863 | ||
![]() |
cdde85315a | ||
![]() |
dc67f9faf4 | ||
![]() |
3ad1be50a2 | ||
![]() |
8aadfe7d28 | ||
![]() |
cff54b73a4 | ||
![]() |
b54cfeb0c0 | ||
![]() |
cefe612b11 | ||
![]() |
4bc874b497 | ||
![]() |
f3abaa8e02 | ||
![]() |
21a563fe98 | ||
![]() |
1acbcccd62 | ||
![]() |
35d6c638ab | ||
![]() |
68f8239708 | ||
![]() |
0db64cca0b | ||
![]() |
accfda5f4b | ||
![]() |
c97c20f57d | ||
![]() |
2725d0191d | ||
![]() |
852cc62398 | ||
![]() |
654e3ce437 | ||
![]() |
20a3a00aec | ||
![]() |
22b927d666 | ||
![]() |
709d6be2e3 | ||
![]() |
64f54d9aaa | ||
![]() |
fbda9ca418 | ||
![]() |
4e97e3763e | ||
![]() |
4c9c52d27d | ||
![]() |
87bcd3e471 | ||
![]() |
7e9b01b56d | ||
![]() |
713763fc21 | ||
![]() |
5b7ab1bfcb | ||
![]() |
8712adbf8d | ||
![]() |
4b0d19b615 | ||
![]() |
90e5d259af | ||
![]() |
af3a331f57 | ||
![]() |
67c60a4aa8 | ||
![]() |
62de16bb8e | ||
![]() |
d9b71e754d | ||
![]() |
5fc950f09f | ||
![]() |
0725c7b160 | ||
![]() |
469dbbcccc | ||
![]() |
ffdd661b1f | ||
![]() |
81922f5a3e | ||
![]() |
7e25366897 | ||
![]() |
8ab61b5468 | ||
![]() |
8239f6dd60 | ||
![]() |
45dce18e4d | ||
![]() |
a428ad0655 | ||
![]() |
1b54d51e4a | ||
![]() |
eb1354d229 | ||
![]() |
4d21f9e80c | ||
![]() |
62f46baacf | ||
![]() |
a3090796d2 | ||
![]() |
c34c5d64f9 | ||
![]() |
66228f5858 | ||
![]() |
ac378cfe6d | ||
![]() |
7ecf8b755e | ||
![]() |
141107f1f3 | ||
![]() |
b5277dee53 | ||
![]() |
4b593c1c96 | ||
![]() |
50ce1b94c8 | ||
![]() |
8bf27a83ec | ||
![]() |
389f0d3d23 | ||
![]() |
b966601e6a | ||
![]() |
f2a0881821 | ||
![]() |
50a49eae43 | ||
![]() |
1c04561004 | ||
![]() |
b80d94d260 | ||
![]() |
87012e23e7 | ||
![]() |
f39758b103 | ||
![]() |
697bbf428e | ||
![]() |
c7444a2605 | ||
![]() |
3a5f4d33d2 | ||
![]() |
c3dc62523b | ||
![]() |
424622061a | ||
![]() |
a3b021b11d | ||
![]() |
b60ad8b143 | ||
![]() |
e376efc579 | ||
![]() |
382035a1d4 | ||
![]() |
542e22fe0e | ||
![]() |
af37d57779 | ||
![]() |
fbef0b0186 | ||
![]() |
9e67d6add8 | ||
![]() |
25c702ad2b | ||
![]() |
6516597c93 | ||
![]() |
1df9c38a8c | ||
![]() |
bd7217145a | ||
![]() |
569fef38a4 | ||
![]() |
f21c89cf1a | ||
![]() |
02cc418969 | ||
![]() |
4faba159c0 | ||
![]() |
29816e6c5e | ||
![]() |
5317a11c39 | ||
![]() |
27c53b3241 | ||
![]() |
919befa961 | ||
![]() |
f9c02ed099 | ||
![]() |
b35c325f43 | ||
![]() |
b82f1128fe | ||
![]() |
178feb7330 | ||
![]() |
0118a5bf4c | ||
![]() |
e0087bd142 | ||
![]() |
c2d3e7900e | ||
![]() |
fb8312110b | ||
![]() |
16de57342e | ||
![]() |
ad6e041c04 | ||
![]() |
e22e3e88a0 | ||
![]() |
dc8a50965c | ||
![]() |
1914de7ddf | ||
![]() |
2e505cfb1f | ||
![]() |
ab49aca815 | ||
![]() |
c96968e476 | ||
![]() |
8f050516ec | ||
![]() |
27d2b244a4 | ||
![]() |
be2f2c6271 | ||
![]() |
8dc2797b16 | ||
![]() |
7ca8dabc44 | ||
![]() |
baeb55e217 | ||
![]() |
a8502fcc11 | ||
![]() |
9f5bc5b196 | ||
![]() |
7556ab9506 | ||
![]() |
bf176ac314 | ||
![]() |
9903e22eaa | ||
![]() |
1e0f7d9629 | ||
![]() |
e8a140af44 | ||
![]() |
b091d4f298 | ||
![]() |
35cf3063cb | ||
![]() |
7141ef17be | ||
![]() |
be2c68c0bb | ||
![]() |
7c944d3767 | ||
![]() |
1d4f02df2e | ||
![]() |
2007a74a20 | ||
![]() |
8c0839ad57 | ||
![]() |
516b9a54c4 | ||
![]() |
0d3e730c9c | ||
![]() |
c7a87d02b2 | ||
![]() |
dd082c204b | ||
![]() |
c4af3d1579 | ||
![]() |
10eadbcbbb | ||
![]() |
17141824f7 | ||
![]() |
4cfd6c010f | ||
![]() |
daa9024bff | ||
![]() |
e96aca90fe | ||
![]() |
0580a31961 | ||
![]() |
5c42c5130c | ||
![]() |
72d1e37a23 | ||
![]() |
61c9072a08 | ||
![]() |
08b25f9c2a | ||
![]() |
1a03b49700 | ||
![]() |
2d4a8e2e45 | ||
![]() |
8486377604 | ||
![]() |
3a4e9b6856 | ||
![]() |
5f5ac5419b | ||
![]() |
92b7a3b477 | ||
![]() |
4326519a3f | ||
![]() |
00837acdfc | ||
![]() |
7704be12b1 | ||
![]() |
712ddb531b | ||
![]() |
d52afc3f71 | ||
![]() |
92f6083e0b | ||
![]() |
5751fdbe56 | ||
![]() |
962b30adb9 | ||
![]() |
3b5b3f3bb6 | ||
![]() |
1a6d96cf3a | ||
![]() |
034fd9b4df | ||
![]() |
eb79a1e7d7 | ||
![]() |
e25d4f17aa | ||
![]() |
ccde9cceee | ||
![]() |
578d3c4260 | ||
![]() |
bfdc9a3d86 | ||
![]() |
5315545a4d | ||
![]() |
82a3b9d80f | ||
![]() |
3de985a3b8 | ||
![]() |
567ee8000d | ||
![]() |
03939001b2 | ||
![]() |
30d18050d1 | ||
![]() |
95caf8c7df | ||
![]() |
6c1f328d71 | ||
![]() |
bb20ab8c2c | ||
![]() |
29eb73176a | ||
![]() |
17ad3a87f3 | ||
![]() |
ed7c9c33b9 | ||
![]() |
59b66219cb | ||
![]() |
1e2c1d1464 | ||
![]() |
5b86b1277f | ||
![]() |
41fdf31e34 | ||
![]() |
9bef5c2af9 | ||
![]() |
ed1a69071b | ||
![]() |
56d328b4db | ||
![]() |
33c7e0fa2d | ||
![]() |
4f1cf1110f | ||
![]() |
a434bfd944 | ||
![]() |
21ed8e4206 | ||
![]() |
169d782580 | ||
![]() |
8a015f4e38 | ||
![]() |
cbb08c6202 | ||
![]() |
6301bc713c | ||
![]() |
a5d7043ce4 | ||
![]() |
912d2cbd79 | ||
![]() |
48ee3a34eb | ||
![]() |
21263a1ffb | ||
![]() |
db59e138e9 | ||
![]() |
bc8012dcc9 | ||
![]() |
d8b43597a0 | ||
![]() |
d3bf0da289 | ||
![]() |
871949e760 | ||
![]() |
4fb42d3545 | ||
![]() |
2e58d6656c | ||
![]() |
a3024b38e9 | ||
![]() |
85f2016371 | ||
![]() |
1ce3347c2e | ||
![]() |
4f8415e8a7 | ||
![]() |
b202a36feb | ||
![]() |
7e3e224746 | ||
![]() |
503a7979d0 | ||
![]() |
f3ba6e7996 | ||
![]() |
f13dcb4139 | ||
![]() |
e8dc61ec36 | ||
![]() |
88c59c5c13 | ||
![]() |
fd06d434f2 | ||
![]() |
85f80ff863 | ||
![]() |
d56abe6b72 | ||
![]() |
d24d29e42f | ||
![]() |
bc14b8468d | ||
![]() |
f924f81ec1 | ||
![]() |
3a6382df55 | ||
![]() |
1dba049038 | ||
![]() |
f539516252 | ||
![]() |
abd02eda0f | ||
![]() |
99695d6cb3 | ||
![]() |
cb1c2b59df | ||
![]() |
8368f977b9 | ||
![]() |
e05595f318 | ||
![]() |
11cf2ec39d | ||
![]() |
e5c43fcfcd | ||
![]() |
520581c165 | ||
![]() |
d1119a3b61 | ||
![]() |
5dd029cc05 | ||
![]() |
510e010f97 | ||
![]() |
1300cffa3b | ||
![]() |
8fbcbb0b68 | ||
![]() |
e02a47a16a | ||
![]() |
7b26c1ffcb | ||
![]() |
d3e62454a5 | ||
![]() |
6b8f4e92a7 | ||
![]() |
b590b21183 | ||
![]() |
a08484f450 | ||
![]() |
2978ca13c5 | ||
![]() |
31c0850b14 | ||
![]() |
1d85f0717a | ||
![]() |
795c16a941 | ||
![]() |
55c8589841 | ||
![]() |
4687add37a | ||
![]() |
c25e23ccd6 | ||
![]() |
e42ddb8f0f | ||
![]() |
705c0e58fc | ||
![]() |
7427e17926 | ||
![]() |
2c4b31dcaa | ||
![]() |
ae8671af96 | ||
![]() |
f5ff55abc5 | ||
![]() |
b662512995 | ||
![]() |
64c3fb1723 | ||
![]() |
fb99dc4cd0 | ||
![]() |
e08a0c44ba | ||
![]() |
68935d46ce | ||
![]() |
141c8c5192 | ||
![]() |
7ca5467f4c | ||
![]() |
5de53964d9 | ||
![]() |
8d8807e659 | ||
![]() |
9347944cbd | ||
![]() |
480448acbb | ||
![]() |
202fa82646 | ||
![]() |
feecc9f838 | ||
![]() |
2f9e667517 | ||
![]() |
5547bc7356 | ||
![]() |
eb4ae926b7 | ||
![]() |
b239ec2b71 | ||
![]() |
e9cac94aee | ||
![]() |
5289cd3af1 | ||
![]() |
45a5c1c235 | ||
![]() |
db3709952c | ||
![]() |
447932eedb | ||
![]() |
10cc3bdd3f | ||
![]() |
6ee2bfed36 | ||
![]() |
01efb831b7 | ||
![]() |
9e1e20bd94 | ||
![]() |
869ace74ad | ||
![]() |
94d56367fc | ||
![]() |
68a5ba668e | ||
![]() |
b2b590cf67 | ||
![]() |
6f7c071769 | ||
![]() |
c1a7164ce7 | ||
![]() |
b77839c139 | ||
![]() |
e2f2a9322c | ||
![]() |
e4bd6c885d | ||
![]() |
8201701d17 | ||
![]() |
a5e6b78e1d | ||
![]() |
027eccba06 | ||
![]() |
12f10513f0 | ||
![]() |
9907ed51f0 | ||
![]() |
90e9f79841 | ||
![]() |
c30b9cdfcf | ||
![]() |
7e1fa0cf38 | ||
![]() |
b6587488d4 | ||
![]() |
552eeeddf6 | ||
![]() |
cbc150bad2 | ||
![]() |
8a4ed121b5 | ||
![]() |
a9793dc0a5 | ||
![]() |
c9deef84ca | ||
![]() |
1582aaeb4c | ||
![]() |
707520c15c | ||
![]() |
d5de435f06 | ||
![]() |
9e3dfaa400 | ||
![]() |
7aa92ec249 | ||
![]() |
2fdcd40f00 | ||
![]() |
3b15b786ff | ||
![]() |
b212b30e58 | ||
![]() |
6fd89f8585 | ||
![]() |
0406d21703 | ||
![]() |
293f89a07b | ||
![]() |
520a0b4075 | ||
![]() |
488602e232 | ||
![]() |
1e8d353162 | ||
![]() |
b3718b8b4a | ||
![]() |
097cba5c60 | ||
![]() |
fa6d8d0891 | ||
![]() |
31797c55df | ||
![]() |
56a23c5c3d | ||
![]() |
adc89f1487 | ||
![]() |
7facc375bc | ||
![]() |
91d3fb0ea8 | ||
![]() |
4ab0047dc1 | ||
![]() |
279eeaa442 | ||
![]() |
d4d0fb2a03 | ||
![]() |
d56fe8a542 | ||
![]() |
292701925d | ||
![]() |
52fc854cc3 | ||
![]() |
90ca039768 | ||
![]() |
9e81055070 | ||
![]() |
cea402ebf8 | ||
![]() |
6b939b95c0 | ||
![]() |
b24621d1ea | ||
![]() |
cc0fde2c08 | ||
![]() |
3732998fb7 | ||
![]() |
c699e265ef | ||
![]() |
98bb726f1a | ||
![]() |
c132e7ed85 | ||
![]() |
298cebe17f | ||
![]() |
d03825d200 | ||
![]() |
d9ab9db211 | ||
![]() |
58a607561a | ||
![]() |
0ae1f11ffc | ||
![]() |
db48c5a6a3 | ||
![]() |
effefdbff1 | ||
![]() |
233c969402 | ||
![]() |
3b885dd01f | ||
![]() |
52c8554d89 | ||
![]() |
b55baef985 | ||
![]() |
b593b15f27 | ||
![]() |
00669ac0c3 | ||
![]() |
33a4258c06 | ||
![]() |
d4a8fcbe03 | ||
![]() |
36c3b938ce | ||
![]() |
bf2fad2a2a | ||
![]() |
9cbd49b867 | ||
![]() |
9de59131f4 | ||
![]() |
7f44e89829 | ||
![]() |
572e4457b3 | ||
![]() |
a5bcf87c08 | ||
![]() |
8ca5b7528b | ||
![]() |
d951e68c10 | ||
![]() |
32e8d2043c | ||
![]() |
bf028915ec | ||
![]() |
b03f483e4f | ||
![]() |
6f6202eb69 | ||
![]() |
7ab2d1496e | ||
![]() |
acc229a7e1 | ||
![]() |
64ffa86fe3 | ||
![]() |
8b77024fb9 | ||
![]() |
42aa18ac16 | ||
![]() |
54d21666d0 | ||
![]() |
aac00a5e78 | ||
![]() |
63d93f2a36 | ||
![]() |
a9f453ea36 | ||
![]() |
d248de92e5 | ||
![]() |
0ed483ba51 | ||
![]() |
68fbadf21b | ||
![]() |
ac66079d41 | ||
![]() |
56c681bcf8 | ||
![]() |
c5c4253760 | ||
![]() |
84e6f2fc4f | ||
![]() |
8cedaae645 | ||
![]() |
e350ba4726 | ||
![]() |
1b7742ef7f | ||
![]() |
0c6bf701c7 | ||
![]() |
05e2e305e4 | ||
![]() |
5523cd6203 | ||
![]() |
50da4bcd37 | ||
![]() |
b99072d986 | ||
![]() |
b9a7a7c422 | ||
![]() |
88ccbcd883 | ||
![]() |
b5bb6c6fe5 | ||
![]() |
19a3810168 | ||
![]() |
8ccc38eb00 | ||
![]() |
70146a08c1 | ||
![]() |
19d50b9c92 | ||
![]() |
05c1328ca7 | ||
![]() |
99c2dd9765 | ||
![]() |
edbe6851f7 | ||
![]() |
a7867a9253 | ||
![]() |
94e70f81ed | ||
![]() |
3d8654253a | ||
![]() |
69dbcec678 | ||
![]() |
de8b0ba8c5 | ||
![]() |
730cd9f983 | ||
![]() |
67d8765624 | ||
![]() |
39bd07de73 | ||
![]() |
3202ea55d2 | ||
![]() |
329a8c0c90 | ||
![]() |
c05824c641 | ||
![]() |
3abdffda9c | ||
![]() |
67da851efc | ||
![]() |
5463a27255 | ||
![]() |
ec0434c9b0 | ||
![]() |
7d8cb5c863 | ||
![]() |
4f01348ffb | ||
![]() |
ca7e257e95 | ||
![]() |
a34332b48d | ||
![]() |
962912c43c | ||
![]() |
2af3400464 | ||
![]() |
b6e220a4c5 | ||
![]() |
d5d45f100e | ||
![]() |
6b9ca60c47 | ||
![]() |
bc445a1e27 | ||
![]() |
a087b4c43e | ||
![]() |
8f67ddf968 | ||
![]() |
9ef07484dd | ||
![]() |
7475cb56a1 | ||
![]() |
5287061699 | ||
![]() |
3ef1110109 | ||
![]() |
2efe2589d2 | ||
![]() |
4fb596357d | ||
![]() |
dd98ec771d | ||
![]() |
94f74308d8 | ||
![]() |
b982884933 | ||
![]() |
c47c6e358b | ||
![]() |
46394d0bf9 | ||
![]() |
4dc154201a | ||
![]() |
ebdbab81d3 | ||
![]() |
155098bc41 | ||
![]() |
291638a9dd | ||
![]() |
763c672e36 | ||
![]() |
c945534640 | ||
![]() |
5b3074d939 | ||
![]() |
3b89b72568 | ||
![]() |
1d9fa1522c | ||
![]() |
4db743db00 | ||
![]() |
d5f8231f97 | ||
![]() |
32c403d069 | ||
![]() |
220da51606 | ||
![]() |
9ae234a02f | ||
![]() |
401bbed67b | ||
![]() |
83190c21db | ||
![]() |
ccdd906e2f | ||
![]() |
f4c932ef9c | ||
![]() |
0892ed18e5 | ||
![]() |
3afc218adc | ||
![]() |
841b9c0917 | ||
![]() |
a479c6e786 | ||
![]() |
babb723521 | ||
![]() |
29954e530e | ||
![]() |
fb3c94f403 | ||
![]() |
dd8c1d359c | ||
![]() |
45e09a262b | ||
![]() |
d6d61a4137 | ||
![]() |
8fe7711634 | ||
![]() |
a5ec7fc251 | ||
![]() |
b9935717dc | ||
![]() |
bb25817bae | ||
![]() |
bf8a33e086 | ||
![]() |
bf56f50e0a | ||
![]() |
3a8e2c429f | ||
![]() |
e8fca5d93c | ||
![]() |
a39cf99024 | ||
![]() |
0ff27154e6 | ||
![]() |
766fd4cbf5 | ||
![]() |
1869260868 | ||
![]() |
93046d78f6 | ||
![]() |
3e51f9a505 | ||
![]() |
d95bf64edf | ||
![]() |
47f7cf5419 | ||
![]() |
267fc3743d | ||
![]() |
a6d73f7615 | ||
![]() |
b360c854a8 | ||
![]() |
a088b20987 | ||
![]() |
af6dd545dc | ||
![]() |
a26df88022 | ||
![]() |
86ec272581 | ||
![]() |
2a803e09a4 | ||
![]() |
50cf6d2af9 | ||
![]() |
86626b1855 | ||
![]() |
63603a281e | ||
![]() |
faf05f5339 | ||
![]() |
4de3db52cb | ||
![]() |
9a9fbda08b | ||
![]() |
ea642515c1 | ||
![]() |
add2dedc7f | ||
![]() |
4ba4a28aa0 | ||
![]() |
7050453783 | ||
![]() |
8f984517bb | ||
![]() |
2524c96db6 | ||
![]() |
26600e3d78 | ||
![]() |
316756d06a | ||
![]() |
7357b914d0 | ||
![]() |
8548c9767b | ||
![]() |
a30a35f82f | ||
![]() |
84938ccc94 | ||
![]() |
8136cc8008 | ||
![]() |
2dc9d268ec | ||
![]() |
226dad309c | ||
![]() |
33cdd51f00 | ||
![]() |
a3a099126e | ||
![]() |
4e22fea6e2 | ||
![]() |
fd06f28253 | ||
![]() |
553230ca23 | ||
![]() |
208bfebc12 | ||
![]() |
802b0949ac | ||
![]() |
b65dc47f72 | ||
![]() |
c5a3670838 | ||
![]() |
cd167ac645 | ||
![]() |
eb3e756637 | ||
![]() |
5049210524 | ||
![]() |
eeaad86c4b | ||
![]() |
71483e0bc7 | ||
![]() |
10650e8937 | ||
![]() |
99d72ba817 | ||
![]() |
e21ad742b1 | ||
![]() |
1bcb1e7768 | ||
![]() |
618fee98ce | ||
![]() |
83da89437f | ||
![]() |
35ebfc15c9 | ||
![]() |
f0a9185e4a | ||
![]() |
b3766cbc62 | ||
![]() |
fac82fa185 | ||
![]() |
3469013f1a | ||
![]() |
03486e4125 | ||
![]() |
20560fb847 | ||
![]() |
bad18da658 | ||
![]() |
e26c7c491a | ||
![]() |
b0c8ae0c94 | ||
![]() |
cc1658cbab | ||
![]() |
4b768f0635 | ||
![]() |
989057d947 | ||
![]() |
6671d24fa6 | ||
![]() |
297c721229 | ||
![]() |
17bd7f9476 | ||
![]() |
045ff7a45e | ||
![]() |
8624853ec4 | ||
![]() |
336376d2a5 | ||
![]() |
189793bff4 | ||
![]() |
1e35f973d6 | ||
![]() |
6033f8b31a | ||
![]() |
c3b2ebf380 | ||
![]() |
23cbecb2c4 | ||
![]() |
b1e1b44c75 | ||
![]() |
abb014745a | ||
![]() |
e51c98e1a7 | ||
![]() |
9513699332 | ||
![]() |
b57bc8cd06 | ||
![]() |
70c502bb45 | ||
![]() |
add0b55657 | ||
![]() |
d61fc9ec6c | ||
![]() |
d1592bf262 | ||
![]() |
3c744c09f1 | ||
![]() |
3ef61aaf02 | ||
![]() |
c738127c09 | ||
![]() |
6e62f568fc | ||
![]() |
2ba3a991a9 | ||
![]() |
50e559487d | ||
![]() |
4cd02c81bb | ||
![]() |
55c6d3a7c4 | ||
![]() |
242f3813bc | ||
![]() |
aa93cb17a7 | ||
![]() |
4692d885d1 | ||
![]() |
b39ac984f9 | ||
![]() |
9894d83e22 | ||
![]() |
113083a241 | ||
![]() |
32971cc875 | ||
![]() |
137f59feb1 | ||
![]() |
6675121b85 | ||
![]() |
aed0a35c9c | ||
![]() |
65a8518d99 | ||
![]() |
cb690e9d4e | ||
![]() |
5da67de95f | ||
![]() |
b9609f2154 | ||
![]() |
aaabb6e1fb | ||
![]() |
6561de34f0 | ||
![]() |
016ff74483 | ||
![]() |
f5e9839b42 | ||
![]() |
d044f4d34e | ||
![]() |
696717dd90 | ||
![]() |
eb3b168975 | ||
![]() |
aa400ce6ab | ||
![]() |
682f9a0f04 | ||
![]() |
e478038206 | ||
![]() |
259a9a4f58 | ||
![]() |
b08d1ae7e9 | ||
![]() |
3970fdd070 | ||
![]() |
946445b2df | ||
![]() |
17b090af58 | ||
![]() |
6690a0e4b1 | ||
![]() |
c291448ffa | ||
![]() |
6f831699be | ||
![]() |
fb73bfb964 | ||
![]() |
28a0d216f9 | ||
![]() |
69f2566526 | ||
![]() |
7b3797502a | ||
![]() |
cf960be07e | ||
![]() |
8a410d6c82 | ||
![]() |
22c3132638 | ||
![]() |
ce32de6e23 | ||
![]() |
b6bc88e460 | ||
![]() |
6e00806f1a | ||
![]() |
d9fa148c49 | ||
![]() |
939b3a8092 | ||
![]() |
95920ba710 | ||
![]() |
462ac79890 | ||
![]() |
601a165b2a | ||
![]() |
62bb9b1a87 | ||
![]() |
b60ba35a9f | ||
![]() |
c97c3f2fc4 | ||
![]() |
ed888200f9 | ||
![]() |
f4859320eb | ||
![]() |
b159f4c074 | ||
![]() |
b700e08d52 | ||
![]() |
c1bdd679ff | ||
![]() |
b728b9efc4 | ||
![]() |
8acae63939 | ||
![]() |
374f5ee1be | ||
![]() |
528533a2dd | ||
![]() |
2b18db8525 | ||
![]() |
6cd8ee9253 | ||
![]() |
e45709fffc | ||
![]() |
28c21b1041 | ||
![]() |
0919f0e89e | ||
![]() |
64fc58ddd2 | ||
![]() |
568e9ebc38 | ||
![]() |
33888beb63 | ||
![]() |
0bc6f9152a | ||
![]() |
17fd0de102 | ||
![]() |
f98e66a409 | ||
![]() |
314499005d | ||
![]() |
6dcc70f6fc | ||
![]() |
5e40bb55eb | ||
![]() |
476457fe2e | ||
![]() |
4c314928c6 | ||
![]() |
73460c7d8a | ||
![]() |
767b2b6b9c | ||
![]() |
0944b1e9d3 | ||
![]() |
623ac88166 | ||
![]() |
3a204d889f | ||
![]() |
107f0da88b | ||
![]() |
86bbff36ea | ||
![]() |
42a52f9a1c | ||
![]() |
ade8687d7b | ||
![]() |
e1341a1961 | ||
![]() |
74282e9afe | ||
![]() |
687c9753a0 | ||
![]() |
4825163b20 | ||
![]() |
a37bea3701 | ||
![]() |
0d8f9351cc | ||
![]() |
692774f6c4 | ||
![]() |
6ee1404eef | ||
![]() |
97652bd2f6 | ||
![]() |
a566479ddc | ||
![]() |
44e62fbb04 | ||
![]() |
1f9e919762 | ||
![]() |
973752b974 | ||
![]() |
75bbc33fa2 | ||
![]() |
59a3a35b19 | ||
![]() |
b224ec50e4 | ||
![]() |
2925ef3db0 | ||
![]() |
c2d71ac789 | ||
![]() |
85f086d02e | ||
![]() |
beb3454f8d | ||
![]() |
807d08d8eb | ||
![]() |
cc4cfe1b5c | ||
![]() |
88f67230fc | ||
![]() |
d335dd4b83 | ||
![]() |
98e3dbceb5 | ||
![]() |
1c9ea0a9d9 | ||
![]() |
f6af73b222 | ||
![]() |
9354ed927b | ||
![]() |
545d140dcf | ||
![]() |
634122657c | ||
![]() |
349344161a | ||
![]() |
28a8863f45 | ||
![]() |
5c72c38c0d | ||
![]() |
fffed0f5e1 | ||
![]() |
bf4b76864d | ||
![]() |
10ad0010cf | ||
![]() |
3a99a7de78 | ||
![]() |
69139b35e1 | ||
![]() |
55a5739e77 | ||
![]() |
a8b48b4619 | ||
![]() |
dcb3accdb8 | ||
![]() |
45398f84cb | ||
![]() |
319cf64977 | ||
![]() |
646c02d855 | ||
![]() |
77dd2a87d9 | ||
![]() |
51059e99a5 | ||
![]() |
809df848ef | ||
![]() |
619675318c | ||
![]() |
081636b3e7 | ||
![]() |
b969144f50 | ||
![]() |
24bfa4919a | ||
![]() |
fcc9a80103 | ||
![]() |
99a365fb49 | ||
![]() |
6a95177b32 | ||
![]() |
ca68eaab38 | ||
![]() |
6234f7b7d2 | ||
![]() |
04f6a01c3d | ||
![]() |
9bad3c8101 | ||
![]() |
7398c6ab3e | ||
![]() |
4046534fa8 | ||
![]() |
8f43caee2e | ||
![]() |
83c5408f8f | ||
![]() |
7d4284d409 | ||
![]() |
58c4bf081b | ||
![]() |
d1478567f0 | ||
![]() |
d85c729fa5 | ||
![]() |
c65fadbd8a | ||
![]() |
4326007022 | ||
![]() |
38b01e9335 | ||
![]() |
22625a805d | ||
![]() |
a06c9d0cc6 | ||
![]() |
490ed86e86 | ||
![]() |
df2514d79f | ||
![]() |
13a8b10f5c | ||
![]() |
bb4f09ad9a | ||
![]() |
1f2683dd56 | ||
![]() |
0ba8babd87 | ||
![]() |
65d4d44f06 | ||
![]() |
6f8c366bad | ||
![]() |
3842e8e3a7 | ||
![]() |
b881a2a88a | ||
![]() |
70fcea0c2b | ||
![]() |
9f26bedf51 | ||
![]() |
2053cf23c2 | ||
![]() |
b801441201 | ||
![]() |
7209ed055a | ||
![]() |
894205eff7 | ||
![]() |
64b0b64468 | ||
![]() |
920df03cc1 | ||
![]() |
5a91f613ca | ||
![]() |
61eaa07b25 | ||
![]() |
62f6766e1b | ||
![]() |
f5994d2ae5 | ||
![]() |
7e93367394 | ||
![]() |
6256192c0c | ||
![]() |
08fb3ced5f | ||
![]() |
5aa5ce8b5e | ||
![]() |
7c389a6cf0 | ||
![]() |
f63ba0c20a | ||
![]() |
01e80108d7 | ||
![]() |
148c0c98d3 | ||
![]() |
11a9a2f56b | ||
![]() |
6cdf1c1689 | ||
![]() |
2cfaa4f261 | ||
![]() |
d3b0d03e70 | ||
![]() |
08b8978ee8 | ||
![]() |
d2019c2315 | ||
![]() |
02a7d0e797 | ||
![]() |
03751d2581 | ||
![]() |
b9069b25ad | ||
![]() |
a136fa687f | ||
![]() |
de35e89c58 | ||
![]() |
85beefec4c | ||
![]() |
877c9b007b | ||
![]() |
adb851a2b4 | ||
![]() |
6ab5116c34 | ||
![]() |
a5630a4a7d | ||
![]() |
e8c1a34f3b | ||
![]() |
88abeada44 | ||
![]() |
96a41704ea | ||
![]() |
8583c879f2 | ||
![]() |
3edc77c978 | ||
![]() |
03a1c21f34 | ||
![]() |
80b1a6297b | ||
![]() |
056eb888f3 | ||
![]() |
d4ec608123 | ||
![]() |
2451cf77f9 | ||
![]() |
3b6b77c75b | ||
![]() |
e0f578c135 | ||
![]() |
ec2ae15e3f | ||
![]() |
f5fc66f47e | ||
![]() |
ae79df8c55 | ||
![]() |
104aef3dec | ||
![]() |
17e62c10d4 | ||
![]() |
90965a4f4d | ||
![]() |
8960f5fef9 | ||
![]() |
783a8242e1 | ||
![]() |
7a8f5c0cc9 | ||
![]() |
53be012b34 | ||
![]() |
be7b3a56f9 | ||
![]() |
554e5b7be5 | ||
![]() |
249c89669e | ||
![]() |
7ce9a937b1 | ||
![]() |
456c011f3e | ||
![]() |
a31b9f1b4d | ||
![]() |
a1cf18468b | ||
![]() |
f147a5e909 | ||
![]() |
8d541595b8 | ||
![]() |
32fd8270d7 | ||
![]() |
efddbfcfa0 | ||
![]() |
0b20725f5f | ||
![]() |
030566c1e8 | ||
![]() |
fef2c44cb8 | ||
![]() |
fe5431976d | ||
![]() |
72dedc7596 | ||
![]() |
8615b799c6 | ||
![]() |
fd6cae48b7 | ||
![]() |
ecadc06b45 | ||
![]() |
e5d31d85dd | ||
![]() |
e427ffca5f | ||
![]() |
4f05bd9e22 | ||
![]() |
0d8c0ac1a0 | ||
![]() |
3984702d3e | ||
![]() |
979085a9de | ||
![]() |
7a6fc573c2 | ||
![]() |
b99b13251f | ||
![]() |
288d173a4d | ||
![]() |
2c69fe8c53 | ||
![]() |
62dafac72b | ||
![]() |
22929672a0 | ||
![]() |
ae0eac3415 | ||
![]() |
6929a9c603 | ||
![]() |
41bb677ebe | ||
![]() |
8368fb4408 | ||
![]() |
acbb7e0453 | ||
![]() |
4ea7d826bc | ||
![]() |
336214d97f | ||
![]() |
c9a0ae6e2d | ||
![]() |
6224cb6994 | ||
![]() |
29fefa1d60 | ||
![]() |
0bc69fb9b3 | ||
![]() |
6e7366bf69 | ||
![]() |
8ee4aa9e63 | ||
![]() |
c7a98fa5a1 | ||
![]() |
46565715c9 | ||
![]() |
386c3ea1ca | ||
![]() |
c2f3e43ee5 | ||
![]() |
7354988ec9 | ||
![]() |
8a8b04ed00 | ||
![]() |
e721481757 | ||
![]() |
2933d642ed | ||
![]() |
53dedc6c65 | ||
![]() |
7d412a9913 | ||
![]() |
de3b9a5bb2 | ||
![]() |
5eaa6dafd9 | ||
![]() |
8d496e1511 | ||
![]() |
f994b378f1 | ||
![]() |
01bd88ce10 | ||
![]() |
18b5fd59a6 | ||
![]() |
750c1d5013 | ||
![]() |
f2226cdec2 | ||
![]() |
c125ec087a | ||
![]() |
f099f66065 | ||
![]() |
4fcf99faa7 | ||
![]() |
2add88ccc2 | ||
![]() |
7d6dfaad15 | ||
![]() |
def2eadc24 | ||
![]() |
53a25dde26 | ||
![]() |
6f7da16d1d | ||
![]() |
5ac0360494 | ||
![]() |
1b6def4875 | ||
![]() |
52fcf64cfd | ||
![]() |
c650e23432 | ||
![]() |
428604d91d | ||
![]() |
aa94ec7949 | ||
![]() |
d0c1481f76 | ||
![]() |
6cc9a99b77 | ||
![]() |
d25f49b694 | ||
![]() |
b92d25e28a | ||
![]() |
bf5c5bc46f | ||
![]() |
e7cc842be4 | ||
![]() |
cb29d35949 | ||
![]() |
fe18f70e51 | ||
![]() |
ee57f26415 | ||
![]() |
721ec8e559 | ||
![]() |
c584f83071 | ||
![]() |
3c2fed5041 | ||
![]() |
7e6d974438 | ||
![]() |
c95a30c837 | ||
![]() |
cb568d005e | ||
![]() |
442cce1574 | ||
![]() |
c25baf25ad | ||
![]() |
5e279405c7 | ||
![]() |
7b4ecfd30a | ||
![]() |
e5707b423f | ||
![]() |
7983556f98 | ||
![]() |
1916dff57b | ||
![]() |
b11563d618 | ||
![]() |
b180a587bf | ||
![]() |
5b11e0ce29 | ||
![]() |
d6684c5806 | ||
![]() |
9d9e789f4b | ||
![]() |
1a0e3890f4 | ||
![]() |
caece9d6ad | ||
![]() |
953a3793c4 | ||
![]() |
8bfae3b4cf | ||
![]() |
6911685bd0 | ||
![]() |
71025eaf4d | ||
![]() |
3aa612b766 | ||
![]() |
a2ffd0ae83 | ||
![]() |
c399da586e | ||
![]() |
d7826e4e6c | ||
![]() |
f5d13c9079 | ||
![]() |
01a142790f | ||
![]() |
df54687de1 | ||
![]() |
bded31b311 | ||
![]() |
67e573aff7 | ||
![]() |
6295c4ac76 | ||
![]() |
469811847f | ||
![]() |
8a1aefefca | ||
![]() |
bea16028a1 | ||
![]() |
bedb7d1d9e | ||
![]() |
1a3a20f478 | ||
![]() |
68ecb7c219 | ||
![]() |
61b04a882b | ||
![]() |
f8e621c5b9 | ||
![]() |
2f2209682e | ||
![]() |
f4f361b51a | ||
![]() |
55e59f8cb0 | ||
![]() |
6d20ed0a22 | ||
![]() |
874f604295 | ||
![]() |
30d36a11c1 | ||
![]() |
09dcc29175 | ||
![]() |
8f07e6f141 | ||
![]() |
7b6b5724e1 | ||
![]() |
521c0b58c8 | ||
![]() |
53839ab7b1 | ||
![]() |
dcfe9617b3 | ||
![]() |
58eebf2dbd | ||
![]() |
af9b64c6f0 | ||
![]() |
2b18ac8d4e | ||
![]() |
2306234063 | ||
![]() |
883a9e422e | ||
![]() |
d77ce721e3 | ||
![]() |
325ad6f721 | ||
![]() |
d762a9365f | ||
![]() |
ce983f043e | ||
![]() |
45b7ebbe46 | ||
![]() |
3e7fa66790 | ||
![]() |
ad543dbffb | ||
![]() |
cdd2c7be9a | ||
![]() |
ddf6945190 | ||
![]() |
f2745747ba | ||
![]() |
ff9d179c13 | ||
![]() |
e813108c66 | ||
![]() |
62d8cdfcf9 | ||
![]() |
5b9d46e350 | ||
![]() |
e5db95b2d2 | ||
![]() |
a8f7c7c999 | ||
![]() |
8a423fb775 | ||
![]() |
90c3d69af6 | ||
![]() |
bcb2d73c5c | ||
![]() |
8a6cea12e1 | ||
![]() |
0056de146a | ||
![]() |
0bcdbef11e | ||
![]() |
1b208cb531 | ||
![]() |
6a975e260c | ||
![]() |
02d2bde269 | ||
![]() |
70cfa7f48a | ||
![]() |
b7d4b9c21b | ||
![]() |
673c947c11 | ||
![]() |
2682a55148 | ||
![]() |
616f6ddf5f | ||
![]() |
29769813bc | ||
![]() |
221c46344a | ||
![]() |
a33eb25c92 | ||
![]() |
1dc61320a6 | ||
![]() |
ad556a43f9 | ||
![]() |
12e6701ffa | ||
![]() |
7167b66719 | ||
![]() |
a52ba5fbd1 | ||
![]() |
22cf903656 | ||
![]() |
d77b657036 | ||
![]() |
4a3038c12c | ||
![]() |
3ac7cd5d4a | ||
![]() |
58eddd2b42 | ||
![]() |
d808da68bd | ||
![]() |
2ed4d1efa0 |
@@ -1,28 +1,25 @@
|
||||
[modern]
|
||||
# Support for dynamic import is the main litmus test for serving modern builds.
|
||||
# Although officially a ES2020 feature, browsers implemented it early, so this
|
||||
# enables all of ES2017 and some features in ES2018.
|
||||
supports es6-module-dynamic-import
|
||||
|
||||
# Exclude Safari 11-12 because of a bug in tagged template literals
|
||||
# https://bugs.webkit.org/show_bug.cgi?id=190756
|
||||
# Note: Dropping version 11 also enables several more ES2018 features
|
||||
not Safari < 13
|
||||
not iOS < 13
|
||||
|
||||
# Exclude KaiOS, QQ, and UC browsers due to lack of sufficient feature support data
|
||||
# Babel ignores these automatically, but we need here for Webpack to output ESM with dynamic imports
|
||||
# Modern builds target recent browsers supporting the latest features to minimize transpilation, polyfills, etc.
|
||||
# It is served to browsers meeting the following requirements:
|
||||
# - released in the last year + current alpha/beta versions
|
||||
# - Firefox extended support release (ESR)
|
||||
# - with global utilization at or above 0.5%
|
||||
# - must support dynamic import of ES modules
|
||||
# - exclude browsers no longer being maintained
|
||||
# - exclude KaiOS, QQ, and UC browsers due to lack of sufficient feature support data
|
||||
unreleased versions
|
||||
last 1 year
|
||||
Firefox ESR
|
||||
>= 0.5% and supports es6-module-dynamic-import
|
||||
not dead
|
||||
not KaiOS > 0
|
||||
not QQAndroid > 0
|
||||
not UCAndroid > 0
|
||||
|
||||
# Exclude unsupported browsers
|
||||
not dead
|
||||
|
||||
[legacy]
|
||||
# Legacy builds are served when modern requirements are not met and support browsers:
|
||||
# - released in the last 7 years + current alpha/beta versionss
|
||||
# - with global utilization above 0.05%
|
||||
# - with global utilization at or above 0.05%
|
||||
# The lattermost query ensures that support for popular old browsers is not dropped too early
|
||||
# (e.g. IE 11, Android 4.4, or Samsung 4).
|
||||
#
|
||||
@@ -36,4 +33,10 @@ not dead
|
||||
# As of May 2023, only web sockets must be added to the query.
|
||||
unreleased versions
|
||||
last 7 years
|
||||
> 0.05% and supports websockets
|
||||
>= 0.05% and supports websockets
|
||||
|
||||
[legacy-sw]
|
||||
# Same as legacy plus supports service workers
|
||||
unreleased versions
|
||||
last 7 years
|
||||
>= 0.05% and supports websockets and supports serviceworkers
|
||||
|
@@ -1,5 +1,5 @@
|
||||
# See here for image contents: https://github.com/microsoft/vscode-dev-containers/tree/v0.148.1/containers/python-3/.devcontainer/base.Dockerfile
|
||||
FROM mcr.microsoft.com/vscode/devcontainers/python:0-3.11
|
||||
FROM mcr.microsoft.com/devcontainers/python:3.12
|
||||
|
||||
ENV \
|
||||
DEBIAN_FRONTEND=noninteractive \
|
||||
|
@@ -5,8 +5,10 @@
|
||||
"context": ".."
|
||||
},
|
||||
"appPort": "8124:8123",
|
||||
"postCreateCommand": "sudo apt update && sudo apt upgrade -y && sudo apt install -y libpcap-dev",
|
||||
"postStartCommand": "script/bootstrap",
|
||||
"containerEnv": {
|
||||
"DEV_CONTAINER": "1",
|
||||
"WORKSPACE_DIRECTORY": "${containerWorkspaceFolder}"
|
||||
},
|
||||
"customizations": {
|
||||
|
130
.eslintrc.json
130
.eslintrc.json
@@ -1,130 +0,0 @@
|
||||
{
|
||||
"extends": [
|
||||
"airbnb-base",
|
||||
"airbnb-typescript/base",
|
||||
"plugin:@typescript-eslint/recommended",
|
||||
"plugin:wc/recommended",
|
||||
"plugin:lit/all",
|
||||
"plugin:lit-a11y/recommended",
|
||||
"prettier"
|
||||
],
|
||||
"parser": "@typescript-eslint/parser",
|
||||
"parserOptions": {
|
||||
"ecmaVersion": 2020,
|
||||
"ecmaFeatures": {
|
||||
"modules": true
|
||||
},
|
||||
"sourceType": "module",
|
||||
"project": "./tsconfig.json"
|
||||
},
|
||||
"settings": {
|
||||
"import/resolver": {
|
||||
"webpack": {
|
||||
"config": "./webpack.config.cjs"
|
||||
}
|
||||
}
|
||||
},
|
||||
"globals": {
|
||||
"__DEV__": false,
|
||||
"__DEMO__": false,
|
||||
"__BUILD__": false,
|
||||
"__VERSION__": false,
|
||||
"__STATIC_PATH__": false,
|
||||
"__SUPERVISOR__": false,
|
||||
"Polymer": true
|
||||
},
|
||||
"env": {
|
||||
"browser": true,
|
||||
"es6": true
|
||||
},
|
||||
"rules": {
|
||||
"class-methods-use-this": "off",
|
||||
"new-cap": "off",
|
||||
"prefer-template": "off",
|
||||
"object-shorthand": "off",
|
||||
"func-names": "off",
|
||||
"no-underscore-dangle": "off",
|
||||
"strict": "off",
|
||||
"no-plusplus": "off",
|
||||
"no-bitwise": "error",
|
||||
"comma-dangle": "off",
|
||||
"vars-on-top": "off",
|
||||
"no-continue": "off",
|
||||
"no-param-reassign": "off",
|
||||
"no-multi-assign": "off",
|
||||
"no-console": "error",
|
||||
"radix": "off",
|
||||
"no-alert": "off",
|
||||
"no-nested-ternary": "off",
|
||||
"prefer-destructuring": "off",
|
||||
"no-restricted-globals": [2, "event"],
|
||||
"prefer-promise-reject-errors": "off",
|
||||
"import/prefer-default-export": "off",
|
||||
"import/no-default-export": "off",
|
||||
"import/no-unresolved": "off",
|
||||
"import/no-cycle": "off",
|
||||
"import/extensions": [
|
||||
"error",
|
||||
"ignorePackages",
|
||||
{
|
||||
"ts": "never",
|
||||
"js": "never"
|
||||
}
|
||||
],
|
||||
"no-restricted-syntax": ["error", "LabeledStatement", "WithStatement"],
|
||||
"object-curly-newline": "off",
|
||||
"default-case": "off",
|
||||
"wc/no-self-class": "off",
|
||||
"no-shadow": "off",
|
||||
"@typescript-eslint/camelcase": "off",
|
||||
"@typescript-eslint/ban-ts-comment": "off",
|
||||
"@typescript-eslint/no-use-before-define": "off",
|
||||
"@typescript-eslint/no-non-null-assertion": "off",
|
||||
"@typescript-eslint/no-explicit-any": "off",
|
||||
"@typescript-eslint/explicit-function-return-type": "off",
|
||||
"@typescript-eslint/explicit-module-boundary-types": "off",
|
||||
"@typescript-eslint/no-shadow": ["error"],
|
||||
"@typescript-eslint/naming-convention": [
|
||||
"off",
|
||||
{
|
||||
"selector": "default",
|
||||
"format": ["camelCase", "snake_case"],
|
||||
"leadingUnderscore": "allow",
|
||||
"trailingUnderscore": "allow"
|
||||
},
|
||||
{
|
||||
"selector": ["variable"],
|
||||
"format": ["camelCase", "snake_case", "UPPER_CASE"],
|
||||
"leadingUnderscore": "allow",
|
||||
"trailingUnderscore": "allow"
|
||||
},
|
||||
{
|
||||
"selector": "typeLike",
|
||||
"format": ["PascalCase"]
|
||||
}
|
||||
],
|
||||
"@typescript-eslint/no-unused-vars": "off",
|
||||
"unused-imports/no-unused-vars": [
|
||||
"error",
|
||||
{
|
||||
"vars": "all",
|
||||
"varsIgnorePattern": "^_",
|
||||
"args": "after-used",
|
||||
"argsIgnorePattern": "^_",
|
||||
"ignoreRestSiblings": true
|
||||
}
|
||||
],
|
||||
"unused-imports/no-unused-imports": "error",
|
||||
"lit/attribute-value-entities": "off",
|
||||
"lit/no-template-map": "off",
|
||||
"lit/no-native-attributes": "warn",
|
||||
"lit/no-this-assign-in-render": "warn",
|
||||
"lit-a11y/click-events-have-key-events": ["off"],
|
||||
"lit-a11y/no-autofocus": "off",
|
||||
"lit-a11y/alt-text": "warn",
|
||||
"lit-a11y/anchor-is-valid": "warn",
|
||||
"lit-a11y/role-has-required-aria-attrs": "warn"
|
||||
},
|
||||
"plugins": ["disable", "unused-imports"],
|
||||
"processor": "disable/disable"
|
||||
}
|
1
.github/ISSUE_TEMPLATE/bug_report.yml
vendored
1
.github/ISSUE_TEMPLATE/bug_report.yml
vendored
@@ -24,6 +24,7 @@ body:
|
||||
required: true
|
||||
- label: I have tried a different browser to see if it is related to my browser.
|
||||
required: true
|
||||
- label: I have tried reproducing the issue in [safe mode](https://www.home-assistant.io/blog/2023/11/01/release-202311/#restarting-into-safe-mode) to rule out problems with unsupported custom resources.
|
||||
- type: markdown
|
||||
attributes:
|
||||
value: |
|
||||
|
56
.github/labeler.yml
vendored
56
.github/labeler.yml
vendored
@@ -1,31 +1,51 @@
|
||||
Build:
|
||||
- build-scripts/**
|
||||
- .browserslistrc
|
||||
- gulpfile.js
|
||||
- changed-files:
|
||||
- any-glob-to-any-file:
|
||||
- build-scripts/**
|
||||
- .browserslistrc
|
||||
- gulpfile.js
|
||||
|
||||
Cast:
|
||||
- cast/src/**
|
||||
- src/cast/**
|
||||
- changed-files:
|
||||
- any-glob-to-any-file:
|
||||
- cast/src/**
|
||||
- src/cast/**
|
||||
|
||||
Demo:
|
||||
- demo/src/**
|
||||
- src/fake_data/**
|
||||
- changed-files:
|
||||
- any-glob-to-any-file:
|
||||
- demo/src/**
|
||||
- src/fake_data/**
|
||||
|
||||
Design:
|
||||
- gallery/src/**
|
||||
- src/fake_data/**
|
||||
- changed-files:
|
||||
- any-glob-to-any-file:
|
||||
- gallery/src/**
|
||||
- src/fake_data/**
|
||||
|
||||
Dependencies:
|
||||
- package.json
|
||||
- renovate.json
|
||||
- yarn.lock
|
||||
- .yarn/**
|
||||
- .yarnrc.yml
|
||||
- .nvmrc
|
||||
- any:
|
||||
- changed-files:
|
||||
# Match when only these files are changed (i.e. don't match PRs that happen to add or remove packages)
|
||||
- any-glob-to-all-files:
|
||||
- package.json
|
||||
- renovate.json
|
||||
- yarn.lock
|
||||
- .yarn/**
|
||||
- .yarnrc.yml
|
||||
- .nvmrc
|
||||
# Dependabot and Renovate branches always match (i.e. compatibility tweaks by members considered minor)
|
||||
- head-branch:
|
||||
- "^renovate/"
|
||||
- "^dependabot/"
|
||||
|
||||
GitHub Actions:
|
||||
- .github/workflows/**
|
||||
- .github/*.yml
|
||||
- changed-files:
|
||||
- any-glob-to-any-file:
|
||||
- .github/workflows/**
|
||||
- .github/*.yml
|
||||
|
||||
Supervisor:
|
||||
- hassio/src/**
|
||||
- changed-files:
|
||||
- any-glob-to-any-file:
|
||||
- hassio/src/**
|
||||
|
8
.github/workflows/cast_deployment.yaml
vendored
8
.github/workflows/cast_deployment.yaml
vendored
@@ -21,12 +21,12 @@ jobs:
|
||||
url: ${{ steps.deploy.outputs.NETLIFY_LIVE_URL || steps.deploy.outputs.NETLIFY_URL }}
|
||||
steps:
|
||||
- name: Check out files from GitHub
|
||||
uses: actions/checkout@v4.1.1
|
||||
uses: actions/checkout@v4.2.2
|
||||
with:
|
||||
ref: dev
|
||||
|
||||
- name: Setup Node
|
||||
uses: actions/setup-node@v4.0.0
|
||||
uses: actions/setup-node@v4.1.0
|
||||
with:
|
||||
node-version-file: ".nvmrc"
|
||||
cache: yarn
|
||||
@@ -57,12 +57,12 @@ jobs:
|
||||
url: ${{ steps.deploy.outputs.NETLIFY_LIVE_URL || steps.deploy.outputs.NETLIFY_URL }}
|
||||
steps:
|
||||
- name: Check out files from GitHub
|
||||
uses: actions/checkout@v4.1.1
|
||||
uses: actions/checkout@v4.2.2
|
||||
with:
|
||||
ref: master
|
||||
|
||||
- name: Setup Node
|
||||
uses: actions/setup-node@v4.0.0
|
||||
uses: actions/setup-node@v4.1.0
|
||||
with:
|
||||
node-version-file: ".nvmrc"
|
||||
cache: yarn
|
||||
|
27
.github/workflows/ci.yaml
vendored
27
.github/workflows/ci.yaml
vendored
@@ -24,9 +24,9 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Check out files from GitHub
|
||||
uses: actions/checkout@v4.1.1
|
||||
uses: actions/checkout@v4.2.2
|
||||
- name: Setup Node
|
||||
uses: actions/setup-node@v4.0.0
|
||||
uses: actions/setup-node@v4.1.0
|
||||
with:
|
||||
node-version-file: ".nvmrc"
|
||||
cache: yarn
|
||||
@@ -37,17 +37,20 @@ jobs:
|
||||
- name: Build resources
|
||||
run: ./node_modules/.bin/gulp gen-icons-json build-translations build-locale-data gather-gallery-pages
|
||||
- name: Setup lint cache
|
||||
uses: actions/cache@v3.3.2
|
||||
uses: actions/cache@v4.1.2
|
||||
with:
|
||||
path: |
|
||||
node_modules/.cache/prettier
|
||||
node_modules/.cache/eslint
|
||||
node_modules/.cache/typescript
|
||||
key: lint-${{ github.sha }}
|
||||
restore-keys: lint-
|
||||
- name: Run eslint
|
||||
run: yarn run lint:eslint --quiet
|
||||
- name: Run tsc
|
||||
run: yarn run lint:types
|
||||
- name: Run lit-analyzer
|
||||
run: yarn run lint:lit --quiet
|
||||
- name: Run prettier
|
||||
run: yarn run lint:prettier
|
||||
test:
|
||||
@@ -55,16 +58,16 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Check out files from GitHub
|
||||
uses: actions/checkout@v4.1.1
|
||||
uses: actions/checkout@v4.2.2
|
||||
- name: Setup Node
|
||||
uses: actions/setup-node@v4.0.0
|
||||
uses: actions/setup-node@v4.1.0
|
||||
with:
|
||||
node-version-file: ".nvmrc"
|
||||
cache: yarn
|
||||
- name: Install dependencies
|
||||
run: yarn install --immutable
|
||||
- name: Build resources
|
||||
run: ./node_modules/.bin/gulp build-translations build-locale-data
|
||||
run: ./node_modules/.bin/gulp gen-icons-json build-translations build-locale-data
|
||||
- name: Run Tests
|
||||
run: yarn run test
|
||||
build:
|
||||
@@ -73,9 +76,9 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Check out files from GitHub
|
||||
uses: actions/checkout@v4.1.1
|
||||
uses: actions/checkout@v4.2.2
|
||||
- name: Setup Node
|
||||
uses: actions/setup-node@v4.0.0
|
||||
uses: actions/setup-node@v4.1.0
|
||||
with:
|
||||
node-version-file: ".nvmrc"
|
||||
cache: yarn
|
||||
@@ -86,7 +89,7 @@ jobs:
|
||||
env:
|
||||
IS_TEST: "true"
|
||||
- name: Upload bundle stats
|
||||
uses: actions/upload-artifact@v3.1.3
|
||||
uses: actions/upload-artifact@v4.4.3
|
||||
with:
|
||||
name: frontend-bundle-stats
|
||||
path: build/stats/*.json
|
||||
@@ -97,9 +100,9 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Check out files from GitHub
|
||||
uses: actions/checkout@v4.1.1
|
||||
uses: actions/checkout@v4.2.2
|
||||
- name: Setup Node
|
||||
uses: actions/setup-node@v4.0.0
|
||||
uses: actions/setup-node@v4.1.0
|
||||
with:
|
||||
node-version-file: ".nvmrc"
|
||||
cache: yarn
|
||||
@@ -110,7 +113,7 @@ jobs:
|
||||
env:
|
||||
IS_TEST: "true"
|
||||
- name: Upload bundle stats
|
||||
uses: actions/upload-artifact@v3.1.3
|
||||
uses: actions/upload-artifact@v4.4.3
|
||||
with:
|
||||
name: supervisor-bundle-stats
|
||||
path: build/stats/*.json
|
||||
|
8
.github/workflows/codeql-analysis.yml
vendored
8
.github/workflows/codeql-analysis.yml
vendored
@@ -23,7 +23,7 @@ jobs:
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4.1.1
|
||||
uses: actions/checkout@v4.2.2
|
||||
with:
|
||||
# We must fetch at least the immediate parents so that if this is
|
||||
# a pull request then we can checkout the head.
|
||||
@@ -36,14 +36,14 @@ jobs:
|
||||
|
||||
# Initializes the CodeQL tools for scanning.
|
||||
- name: Initialize CodeQL
|
||||
uses: github/codeql-action/init@v2
|
||||
uses: github/codeql-action/init@v3
|
||||
with:
|
||||
languages: ${{ matrix.language }}
|
||||
|
||||
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
|
||||
# If this step fails, then you should remove it and run the build manually (see below)
|
||||
- name: Autobuild
|
||||
uses: github/codeql-action/autobuild@v2
|
||||
uses: github/codeql-action/autobuild@v3
|
||||
|
||||
# ℹ️ Command-line programs to run using the OS shell.
|
||||
# 📚 https://git.io/JvXDl
|
||||
@@ -57,4 +57,4 @@ jobs:
|
||||
# make release
|
||||
|
||||
- name: Perform CodeQL Analysis
|
||||
uses: github/codeql-action/analyze@v2
|
||||
uses: github/codeql-action/analyze@v3
|
||||
|
8
.github/workflows/demo_deployment.yaml
vendored
8
.github/workflows/demo_deployment.yaml
vendored
@@ -22,12 +22,12 @@ jobs:
|
||||
url: ${{ steps.deploy.outputs.NETLIFY_LIVE_URL || steps.deploy.outputs.NETLIFY_URL }}
|
||||
steps:
|
||||
- name: Check out files from GitHub
|
||||
uses: actions/checkout@v4.1.1
|
||||
uses: actions/checkout@v4.2.2
|
||||
with:
|
||||
ref: dev
|
||||
|
||||
- name: Setup Node
|
||||
uses: actions/setup-node@v4.0.0
|
||||
uses: actions/setup-node@v4.1.0
|
||||
with:
|
||||
node-version-file: ".nvmrc"
|
||||
cache: yarn
|
||||
@@ -58,12 +58,12 @@ jobs:
|
||||
url: ${{ steps.deploy.outputs.NETLIFY_LIVE_URL || steps.deploy.outputs.NETLIFY_URL }}
|
||||
steps:
|
||||
- name: Check out files from GitHub
|
||||
uses: actions/checkout@v4.1.1
|
||||
uses: actions/checkout@v4.2.2
|
||||
with:
|
||||
ref: master
|
||||
|
||||
- name: Setup Node
|
||||
uses: actions/setup-node@v4.0.0
|
||||
uses: actions/setup-node@v4.1.0
|
||||
with:
|
||||
node-version-file: ".nvmrc"
|
||||
cache: yarn
|
||||
|
4
.github/workflows/design_deployment.yaml
vendored
4
.github/workflows/design_deployment.yaml
vendored
@@ -16,10 +16,10 @@ jobs:
|
||||
url: ${{ steps.deploy.outputs.NETLIFY_LIVE_URL || steps.deploy.outputs.NETLIFY_URL }}
|
||||
steps:
|
||||
- name: Check out files from GitHub
|
||||
uses: actions/checkout@v4.1.1
|
||||
uses: actions/checkout@v4.2.2
|
||||
|
||||
- name: Setup Node
|
||||
uses: actions/setup-node@v4.0.0
|
||||
uses: actions/setup-node@v4.1.0
|
||||
with:
|
||||
node-version-file: ".nvmrc"
|
||||
cache: yarn
|
||||
|
4
.github/workflows/design_preview.yaml
vendored
4
.github/workflows/design_preview.yaml
vendored
@@ -21,10 +21,10 @@ jobs:
|
||||
if: github.repository == 'home-assistant/frontend' && contains(github.event.pull_request.labels.*.name, 'needs design preview')
|
||||
steps:
|
||||
- name: Check out files from GitHub
|
||||
uses: actions/checkout@v4.1.1
|
||||
uses: actions/checkout@v4.2.2
|
||||
|
||||
- name: Setup Node
|
||||
uses: actions/setup-node@v4.0.0
|
||||
uses: actions/setup-node@v4.1.0
|
||||
with:
|
||||
node-version-file: ".nvmrc"
|
||||
cache: yarn
|
||||
|
2
.github/workflows/labeler.yaml
vendored
2
.github/workflows/labeler.yaml
vendored
@@ -10,6 +10,6 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Apply labels
|
||||
uses: actions/labeler@v4.3.0
|
||||
uses: actions/labeler@v5.0.0
|
||||
with:
|
||||
sync-labels: true
|
||||
|
14
.github/workflows/nightly.yaml
vendored
14
.github/workflows/nightly.yaml
vendored
@@ -6,7 +6,7 @@ on:
|
||||
- cron: "0 1 * * *"
|
||||
|
||||
env:
|
||||
PYTHON_VERSION: "3.11"
|
||||
PYTHON_VERSION: "3.12"
|
||||
NODE_OPTIONS: --max_old_space_size=6144
|
||||
|
||||
permissions:
|
||||
@@ -20,15 +20,15 @@ jobs:
|
||||
contents: write
|
||||
steps:
|
||||
- name: Checkout the repository
|
||||
uses: actions/checkout@v4.1.1
|
||||
uses: actions/checkout@v4.2.2
|
||||
|
||||
- name: Set up Python ${{ env.PYTHON_VERSION }}
|
||||
uses: actions/setup-python@v4
|
||||
uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: ${{ env.PYTHON_VERSION }}
|
||||
|
||||
- name: Setup Node
|
||||
uses: actions/setup-node@v4.0.0
|
||||
uses: actions/setup-node@v4.1.0
|
||||
with:
|
||||
node-version-file: ".nvmrc"
|
||||
cache: yarn
|
||||
@@ -42,7 +42,7 @@ jobs:
|
||||
LOKALISE_TOKEN: ${{ secrets.LOKALISE_TOKEN }}
|
||||
|
||||
- name: Bump version
|
||||
run: script/version_bump.cjs nightly
|
||||
run: script/version_bump.js nightly
|
||||
|
||||
- name: Build nightly Python wheels
|
||||
run: |
|
||||
@@ -57,14 +57,14 @@ jobs:
|
||||
run: tar -czvf translations.tar.gz translations
|
||||
|
||||
- name: Upload build artifacts
|
||||
uses: actions/upload-artifact@v3.1.3
|
||||
uses: actions/upload-artifact@v4.4.3
|
||||
with:
|
||||
name: wheels
|
||||
path: dist/home_assistant_frontend*.whl
|
||||
if-no-files-found: error
|
||||
|
||||
- name: Upload translations
|
||||
uses: actions/upload-artifact@v3.1.3
|
||||
uses: actions/upload-artifact@v4.4.3
|
||||
with:
|
||||
name: translations
|
||||
path: translations.tar.gz
|
||||
|
2
.github/workflows/relative-ci.yaml
vendored
2
.github/workflows/relative-ci.yaml
vendored
@@ -17,7 +17,7 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Send bundle stats and build information to RelativeCI
|
||||
uses: relative-ci/agent-action@v2.1.10
|
||||
uses: relative-ci/agent-action@v2.1.13
|
||||
with:
|
||||
key: ${{ secrets[format('RELATIVE_CI_KEY_{0}_{1}', matrix.bundle, matrix.build)] }}
|
||||
token: ${{ github.token }}
|
||||
|
2
.github/workflows/release-drafter.yaml
vendored
2
.github/workflows/release-drafter.yaml
vendored
@@ -18,6 +18,6 @@ jobs:
|
||||
pull-requests: read
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: release-drafter/release-drafter@v5
|
||||
- uses: release-drafter/release-drafter@v6.0.0
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
14
.github/workflows/release.yaml
vendored
14
.github/workflows/release.yaml
vendored
@@ -6,7 +6,7 @@ on:
|
||||
- published
|
||||
|
||||
env:
|
||||
PYTHON_VERSION: "3.11"
|
||||
PYTHON_VERSION: "3.12"
|
||||
NODE_OPTIONS: --max_old_space_size=6144
|
||||
|
||||
# Set default workflow permissions
|
||||
@@ -23,18 +23,18 @@ jobs:
|
||||
contents: write # Required to upload release assets
|
||||
steps:
|
||||
- name: Checkout the repository
|
||||
uses: actions/checkout@v4.1.1
|
||||
uses: actions/checkout@v4.2.2
|
||||
|
||||
- name: Verify version
|
||||
uses: home-assistant/actions/helpers/verify-version@master
|
||||
|
||||
- name: Set up Python ${{ env.PYTHON_VERSION }}
|
||||
uses: actions/setup-python@v4
|
||||
uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: ${{ env.PYTHON_VERSION }}
|
||||
|
||||
- name: Setup Node
|
||||
uses: actions/setup-node@v4.0.0
|
||||
uses: actions/setup-node@v4.1.0
|
||||
with:
|
||||
node-version-file: ".nvmrc"
|
||||
cache: yarn
|
||||
@@ -55,7 +55,7 @@ jobs:
|
||||
script/release
|
||||
|
||||
- name: Upload release assets
|
||||
uses: softprops/action-gh-release@v0.1.15
|
||||
uses: softprops/action-gh-release@v2.1.0
|
||||
with:
|
||||
files: |
|
||||
dist/*.whl
|
||||
@@ -74,9 +74,9 @@ jobs:
|
||||
echo "home-assistant-frontend==$version" > ./requirements.txt
|
||||
|
||||
- name: Build wheels
|
||||
uses: home-assistant/wheels@2023.10.5
|
||||
uses: home-assistant/wheels@2024.11.0
|
||||
with:
|
||||
abi: cp311
|
||||
abi: cp312
|
||||
tag: musllinux_1_2
|
||||
arch: amd64
|
||||
wheels-key: ${{ secrets.WHEELS_KEY }}
|
||||
|
2
.github/workflows/stale.yml
vendored
2
.github/workflows/stale.yml
vendored
@@ -10,7 +10,7 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: 90 days stale policy
|
||||
uses: actions/stale@v8.0.0
|
||||
uses: actions/stale@v9.0.0
|
||||
with:
|
||||
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
||||
days-before-stale: 90
|
||||
|
2
.github/workflows/translations.yaml
vendored
2
.github/workflows/translations.yaml
vendored
@@ -13,7 +13,7 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout the repository
|
||||
uses: actions/checkout@v4.1.1
|
||||
uses: actions/checkout@v4.2.2
|
||||
|
||||
- name: Upload Translations
|
||||
run: |
|
||||
|
@@ -1,4 +1 @@
|
||||
#!/usr/bin/env sh
|
||||
. "$(dirname -- "$0")/_/husky.sh"
|
||||
|
||||
yarn run lint-staged --relative --shell "/bin/bash"
|
||||
|
18
.yarn/patches/hls.js-npm-1.5.7-f5bbd3d060.patch
Normal file
18
.yarn/patches/hls.js-npm-1.5.7-f5bbd3d060.patch
Normal file
@@ -0,0 +1,18 @@
|
||||
diff --git a/dist/hls.light.mjs b/dist/hls.light.mjs
|
||||
index eed9d788fafdb159975e1a2eb08ac88ba9c9ac33..ace881935e6665946f1c8110ebd2f739cde4427e 100644
|
||||
--- a/dist/hls.light.mjs
|
||||
+++ b/dist/hls.light.mjs
|
||||
@@ -20523,9 +20523,9 @@ class Hls {
|
||||
}
|
||||
Hls.defaultConfig = void 0;
|
||||
|
||||
-var KeySystemFormats = empty.KeySystemFormats;
|
||||
-var KeySystems = empty.KeySystems;
|
||||
-var SubtitleStreamController = empty.SubtitleStreamController;
|
||||
-var TimelineController = empty.TimelineController;
|
||||
+var KeySystemFormats = empty;
|
||||
+var KeySystems = empty;
|
||||
+var SubtitleStreamController = empty;
|
||||
+var TimelineController = empty;
|
||||
export { AbrController, AttrList, Cues as AudioStreamController, Cues as AudioTrackController, BasePlaylistController, BaseSegment, BaseStreamController, BufferController, Cues as CMCDController, CapLevelController, ChunkMetadata, ContentSteeringController, DateRange, Cues as EMEController, ErrorActionFlags, ErrorController, ErrorDetails, ErrorTypes, Events, FPSController, Fragment, Hls, HlsSkip, HlsUrlParameters, KeySystemFormats, KeySystems, Level, LevelDetails, LevelKey, LoadStats, MetadataSchema, NetworkErrorAction, Part, PlaylistLevelType, SubtitleStreamController, Cues as SubtitleTrackController, TimelineController, Hls as default, getMediaSource, isMSESupported, isSupported };
|
||||
//# sourceMappingURL=hls.light.mjs.map
|
@@ -1,39 +0,0 @@
|
||||
diff --git a/modular/sortable.complete.esm.js b/modular/sortable.complete.esm.js
|
||||
index 02e9f2d6bebeb430fe6e7c1cc3f9c3c9df051f14..bb8268b0844a1faa4108cc92c0be2a3dbaf23f83 100644
|
||||
--- a/modular/sortable.complete.esm.js
|
||||
+++ b/modular/sortable.complete.esm.js
|
||||
@@ -1657,7 +1657,7 @@ Sortable.prototype =
|
||||
target = parent; // store last element
|
||||
}
|
||||
/* jshint boss:true */
|
||||
- while (parent = parent.parentNode);
|
||||
+ while (parent = parent.parentNode || parent.getRootNode().host);
|
||||
}
|
||||
|
||||
_unhideGhostForTarget();
|
||||
diff --git a/modular/sortable.core.esm.js b/modular/sortable.core.esm.js
|
||||
index b04c8b4634f7c6b4ef1aadbb48afe6564306dea9..39a107163c8c336ebd669b5ea8a936af87e1c1e7 100644
|
||||
--- a/modular/sortable.core.esm.js
|
||||
+++ b/modular/sortable.core.esm.js
|
||||
@@ -1657,7 +1657,7 @@ Sortable.prototype =
|
||||
target = parent; // store last element
|
||||
}
|
||||
/* jshint boss:true */
|
||||
- while (parent = parent.parentNode);
|
||||
+ while (parent = parent.parentNode || parent.getRootNode().host);
|
||||
}
|
||||
|
||||
_unhideGhostForTarget();
|
||||
diff --git a/modular/sortable.esm.js b/modular/sortable.esm.js
|
||||
index 6ec7ed1bb557e21c2578200161e989c65d23150b..0a05475a22904472fac6c13f524c674da76584b0 100644
|
||||
--- a/modular/sortable.esm.js
|
||||
+++ b/modular/sortable.esm.js
|
||||
@@ -1657,7 +1657,7 @@ Sortable.prototype =
|
||||
target = parent; // store last element
|
||||
}
|
||||
/* jshint boss:true */
|
||||
- while (parent = parent.parentNode);
|
||||
+ while (parent = parent.parentNode || parent.getRootNode().host);
|
||||
}
|
||||
|
||||
_unhideGhostForTarget();
|
60
.yarn/patches/sortablejs-npm-1.15.3-3235a8f83b.patch
Normal file
60
.yarn/patches/sortablejs-npm-1.15.3-3235a8f83b.patch
Normal file
@@ -0,0 +1,60 @@
|
||||
diff --git a/modular/sortable.core.esm.js b/modular/sortable.core.esm.js
|
||||
index 8b5e49b011713c8859c669069fbe85ce53974e1d..6a0afc92787157b8a31c38cc5f67dfa526090a00 100644
|
||||
--- a/modular/sortable.core.esm.js
|
||||
+++ b/modular/sortable.core.esm.js
|
||||
@@ -1781,11 +1781,16 @@ Sortable.prototype = /** @lends Sortable.prototype */{
|
||||
}
|
||||
if (_onMove(rootEl, el, dragEl, dragRect, target, targetRect, evt, !!target) !== false) {
|
||||
capture();
|
||||
- if (elLastChild && elLastChild.nextSibling) {
|
||||
- // the last draggable element is not the last node
|
||||
- el.insertBefore(dragEl, elLastChild.nextSibling);
|
||||
- } else {
|
||||
- el.appendChild(dragEl);
|
||||
+ try {
|
||||
+ if (elLastChild && elLastChild.nextSibling) {
|
||||
+ // the last draggable element is not the last node
|
||||
+ el.insertBefore(dragEl, elLastChild.nextSibling);
|
||||
+ } else {
|
||||
+ el.appendChild(dragEl);
|
||||
+ }
|
||||
+ }
|
||||
+ catch(err) {
|
||||
+ return completed(false);
|
||||
}
|
||||
parentEl = el; // actualization
|
||||
|
||||
@@ -1802,7 +1807,12 @@ Sortable.prototype = /** @lends Sortable.prototype */{
|
||||
targetRect = getRect(target);
|
||||
if (_onMove(rootEl, el, dragEl, dragRect, target, targetRect, evt, false) !== false) {
|
||||
capture();
|
||||
- el.insertBefore(dragEl, firstChild);
|
||||
+ try {
|
||||
+ el.insertBefore(dragEl, firstChild);
|
||||
+ }
|
||||
+ catch(err) {
|
||||
+ return completed(false);
|
||||
+ }
|
||||
parentEl = el; // actualization
|
||||
|
||||
changed();
|
||||
@@ -1849,10 +1859,15 @@ Sortable.prototype = /** @lends Sortable.prototype */{
|
||||
_silent = true;
|
||||
setTimeout(_unsilent, 30);
|
||||
capture();
|
||||
- if (after && !nextSibling) {
|
||||
- el.appendChild(dragEl);
|
||||
- } else {
|
||||
- target.parentNode.insertBefore(dragEl, after ? nextSibling : target);
|
||||
+ try {
|
||||
+ if (after && !nextSibling) {
|
||||
+ el.appendChild(dragEl);
|
||||
+ } else {
|
||||
+ target.parentNode.insertBefore(dragEl, after ? nextSibling : target);
|
||||
+ }
|
||||
+ }
|
||||
+ catch(err) {
|
||||
+ return completed(false);
|
||||
}
|
||||
|
||||
// Undo chrome's scroll adjustment (has no effect on other browsers)
|
55
.yarn/patches/workbox-build-npm-7.1.1-a854f3faae.patch
Normal file
55
.yarn/patches/workbox-build-npm-7.1.1-a854f3faae.patch
Normal file
@@ -0,0 +1,55 @@
|
||||
diff --git a/build/inject-manifest.js b/build/inject-manifest.js
|
||||
index 60e3d2bb51c11a19fbbedbad65e101082ec41c36..fed6026630f43f86e25446383982cf6fb694313b 100644
|
||||
--- a/build/inject-manifest.js
|
||||
+++ b/build/inject-manifest.js
|
||||
@@ -104,7 +104,7 @@ async function injectManifest(config) {
|
||||
replaceString: manifestString,
|
||||
searchString: options.injectionPoint,
|
||||
});
|
||||
- filesToWrite[options.swDest] = source;
|
||||
+ filesToWrite[options.swDest] = source.replace(url, encodeURI(upath_1.default.basename(destPath)));
|
||||
filesToWrite[destPath] = map;
|
||||
}
|
||||
else {
|
||||
diff --git a/build/lib/translate-url-to-sourcemap-paths.js b/build/lib/translate-url-to-sourcemap-paths.js
|
||||
index 3220c5474eeac6e8a56ca9b2ac2bd9be48529e43..5f003879a904d4840529a42dd056d288fd213771 100644
|
||||
--- a/build/lib/translate-url-to-sourcemap-paths.js
|
||||
+++ b/build/lib/translate-url-to-sourcemap-paths.js
|
||||
@@ -22,7 +22,7 @@ function translateURLToSourcemapPaths(url, swSrc, swDest) {
|
||||
const possibleSrcPath = upath_1.default.resolve(upath_1.default.dirname(swSrc), url);
|
||||
if (fs_extra_1.default.existsSync(possibleSrcPath)) {
|
||||
srcPath = possibleSrcPath;
|
||||
- destPath = upath_1.default.resolve(upath_1.default.dirname(swDest), url);
|
||||
+ destPath = `${swDest}.map`;
|
||||
}
|
||||
else {
|
||||
warning = `${errors_1.errors['cant-find-sourcemap']} ${possibleSrcPath}`;
|
||||
diff --git a/src/inject-manifest.ts b/src/inject-manifest.ts
|
||||
index 8795ddcaa77aea7b0356417e4bc4b19e2b3f860c..fcdc68342d9ac53936c9ed40a9ccfc2f5070cad3 100644
|
||||
--- a/src/inject-manifest.ts
|
||||
+++ b/src/inject-manifest.ts
|
||||
@@ -129,7 +129,10 @@ export async function injectManifest(
|
||||
searchString: options.injectionPoint!,
|
||||
});
|
||||
|
||||
- filesToWrite[options.swDest] = source;
|
||||
+ filesToWrite[options.swDest] = source.replace(
|
||||
+ url!,
|
||||
+ encodeURI(upath.basename(destPath)),
|
||||
+ );
|
||||
filesToWrite[destPath] = map;
|
||||
} else {
|
||||
// If there's no sourcemap associated with swSrc, a simple string
|
||||
diff --git a/src/lib/translate-url-to-sourcemap-paths.ts b/src/lib/translate-url-to-sourcemap-paths.ts
|
||||
index 072eac40d4ef5d095a01cb7f7e392a9e034853bd..f0bbe69e88ef3a415de18a7e9cb264daea273d71 100644
|
||||
--- a/src/lib/translate-url-to-sourcemap-paths.ts
|
||||
+++ b/src/lib/translate-url-to-sourcemap-paths.ts
|
||||
@@ -28,7 +28,7 @@ export function translateURLToSourcemapPaths(
|
||||
const possibleSrcPath = upath.resolve(upath.dirname(swSrc), url);
|
||||
if (fse.existsSync(possibleSrcPath)) {
|
||||
srcPath = possibleSrcPath;
|
||||
- destPath = upath.resolve(upath.dirname(swDest), url);
|
||||
+ destPath = `${swDest}.map`;
|
||||
} else {
|
||||
warning = `${errors['cant-find-sourcemap']} ${possibleSrcPath}`;
|
||||
}
|
893
.yarn/releases/yarn-4.0.2.cjs
vendored
893
.yarn/releases/yarn-4.0.2.cjs
vendored
File diff suppressed because one or more lines are too long
934
.yarn/releases/yarn-4.5.1.cjs
vendored
Executable file
934
.yarn/releases/yarn-4.5.1.cjs
vendored
Executable file
File diff suppressed because one or more lines are too long
@@ -6,4 +6,4 @@ enableGlobalCache: false
|
||||
|
||||
nodeLinker: node-modules
|
||||
|
||||
yarnPath: .yarn/releases/yarn-4.0.2.cjs
|
||||
yarnPath: .yarn/releases/yarn-4.5.1.cjs
|
||||
|
@@ -27,3 +27,5 @@ A complete guide can be found at the following [link](https://www.home-assistant
|
||||
Home Assistant is open-source and Apache 2 licensed. Feel free to browse the repository, learn and reuse parts in your own projects.
|
||||
|
||||
We use [BrowserStack](https://www.browserstack.com) to test Home Assistant on a large variety of devices.
|
||||
|
||||
[](https://www.openhomefoundation.org/)
|
||||
|
@@ -1,12 +0,0 @@
|
||||
{
|
||||
"extends": "../.eslintrc.json",
|
||||
"rules": {
|
||||
"no-console": "off",
|
||||
"import/no-extraneous-dependencies": "off",
|
||||
"import/extensions": "off",
|
||||
"import/no-dynamic-require": "off",
|
||||
"global-require": "off",
|
||||
"@typescript-eslint/no-var-requires": "off",
|
||||
"prefer-arrow-callback": "off"
|
||||
}
|
||||
}
|
@@ -15,7 +15,7 @@ The Home Assistant build pipeline contains various steps to prepare a build.
|
||||
|
||||
Currently in Home Assistant we use a bundler to convert TypeScript, CSS and JSON files to JavaScript files that the browser understands.
|
||||
|
||||
We currently rely on Webpack but also have experimental Rollup support. Both of these programs bundle the converted files in both production and development.
|
||||
We currently rely on Webpack. Both of these programs bundle the converted files in both production and development.
|
||||
|
||||
For development, bundling is optional. We just want to get the right files in the browser.
|
||||
|
||||
|
@@ -1,7 +1,56 @@
|
||||
import defineProvider from "@babel/helper-define-polyfill-provider";
|
||||
import { join } from "node:path";
|
||||
import paths from "../paths.cjs";
|
||||
|
||||
const POLYFILL_DIR = join(paths.polymer_dir, "src/resources/polyfills");
|
||||
|
||||
// List of polyfill keys with supported browser targets for the functionality
|
||||
const PolyfillSupport = {
|
||||
// Note states and shadowRoot properties should be supported.
|
||||
"element-internals": {
|
||||
android: 90,
|
||||
chrome: 90,
|
||||
edge: 90,
|
||||
firefox: 126,
|
||||
ios: 17.4,
|
||||
opera: 76,
|
||||
opera_mobile: 64,
|
||||
safari: 17.4,
|
||||
samsung: 15.0,
|
||||
},
|
||||
"element-append": {
|
||||
android: 54,
|
||||
chrome: 54,
|
||||
edge: 17,
|
||||
firefox: 49,
|
||||
ios: 10.0,
|
||||
opera: 41,
|
||||
opera_mobile: 41,
|
||||
safari: 10.0,
|
||||
samsung: 6.0,
|
||||
},
|
||||
"element-getattributenames": {
|
||||
android: 61,
|
||||
chrome: 61,
|
||||
edge: 18,
|
||||
firefox: 45,
|
||||
ios: 10.3,
|
||||
opera: 48,
|
||||
opera_mobile: 45,
|
||||
safari: 10.1,
|
||||
samsung: 8.0,
|
||||
},
|
||||
"element-toggleattribute": {
|
||||
android: 69,
|
||||
chrome: 69,
|
||||
edge: 18,
|
||||
firefox: 63,
|
||||
ios: 12.0,
|
||||
opera: 56,
|
||||
opera_mobile: 48,
|
||||
safari: 12.0,
|
||||
samsung: 10.0,
|
||||
},
|
||||
fetch: {
|
||||
android: 42,
|
||||
chrome: 42,
|
||||
@@ -13,6 +62,31 @@ const PolyfillSupport = {
|
||||
safari: 10.1,
|
||||
samsung: 4.0,
|
||||
},
|
||||
"intl-getcanonicallocales": {
|
||||
android: 54,
|
||||
chrome: 54,
|
||||
edge: 16,
|
||||
firefox: 48,
|
||||
ios: 10.3,
|
||||
opera: 41,
|
||||
opera_mobile: 41,
|
||||
safari: 10.1,
|
||||
samsung: 6.0,
|
||||
},
|
||||
"intl-locale": {
|
||||
android: 74,
|
||||
chrome: 74,
|
||||
edge: 79,
|
||||
firefox: 75,
|
||||
ios: 14.0,
|
||||
opera: 62,
|
||||
opera_mobile: 53,
|
||||
safari: 14.0,
|
||||
samsung: 11.0,
|
||||
},
|
||||
"intl-other": {
|
||||
// Not specified (i.e. always try polyfill) since compatibility depends on supported locales
|
||||
},
|
||||
proxy: {
|
||||
android: 49,
|
||||
chrome: 49,
|
||||
@@ -24,17 +98,67 @@ const PolyfillSupport = {
|
||||
safari: 10.0,
|
||||
samsung: 5.0,
|
||||
},
|
||||
"resize-observer": {
|
||||
android: 64,
|
||||
chrome: 64,
|
||||
edge: 79,
|
||||
firefox: 69,
|
||||
ios: 13.4,
|
||||
opera: 51,
|
||||
opera_mobile: 47,
|
||||
safari: 13.1,
|
||||
samsung: 9.0,
|
||||
},
|
||||
};
|
||||
|
||||
// Map of global variables and/or instance and static properties to the
|
||||
// corresponding polyfill key and actual module to import
|
||||
const polyfillMap = {
|
||||
global: {
|
||||
Proxy: { key: "proxy", module: "proxy-polyfill" },
|
||||
fetch: { key: "fetch", module: "unfetch/polyfill" },
|
||||
Proxy: { key: "proxy", module: "proxy-polyfill" },
|
||||
ResizeObserver: {
|
||||
key: "resize-observer",
|
||||
module: join(POLYFILL_DIR, "resize-observer.ts"),
|
||||
},
|
||||
},
|
||||
instance: {
|
||||
attachInternals: {
|
||||
key: "element-internals",
|
||||
module: "element-internals-polyfill",
|
||||
},
|
||||
...Object.fromEntries(
|
||||
["append", "getAttributeNames", "toggleAttribute"].map((prop) => {
|
||||
const key = `element-${prop.toLowerCase()}`;
|
||||
return [prop, { key, module: join(POLYFILL_DIR, `${key}.ts`) }];
|
||||
})
|
||||
),
|
||||
},
|
||||
static: {
|
||||
Intl: {
|
||||
getCanonicalLocales: {
|
||||
key: "intl-getcanonicallocales",
|
||||
module: join(POLYFILL_DIR, "intl-polyfill.ts"),
|
||||
},
|
||||
Locale: {
|
||||
key: "intl-locale",
|
||||
module: join(POLYFILL_DIR, "intl-polyfill.ts"),
|
||||
},
|
||||
...Object.fromEntries(
|
||||
[
|
||||
"DateTimeFormat",
|
||||
"DisplayNames",
|
||||
"ListFormat",
|
||||
"NumberFormat",
|
||||
"PluralRules",
|
||||
"RelativeTimeFormat",
|
||||
].map((obj) => [
|
||||
obj,
|
||||
{ key: "intl-other", module: join(POLYFILL_DIR, "intl-polyfill.ts") },
|
||||
])
|
||||
),
|
||||
},
|
||||
},
|
||||
instance: {},
|
||||
static: {},
|
||||
};
|
||||
|
||||
// Create plugin using the same factory as for CoreJS
|
||||
@@ -42,14 +166,16 @@ export default defineProvider(
|
||||
({ createMetaResolver, debug, shouldInjectPolyfill }) => {
|
||||
const resolvePolyfill = createMetaResolver(polyfillMap);
|
||||
return {
|
||||
name: "HA Custom",
|
||||
name: "custom-polyfill",
|
||||
polyfills: PolyfillSupport,
|
||||
usageGlobal(meta, utils) {
|
||||
const polyfill = resolvePolyfill(meta);
|
||||
if (polyfill && shouldInjectPolyfill(polyfill.desc.key)) {
|
||||
debug(polyfill.desc.key);
|
||||
utils.injectGlobalImport(polyfill.desc.module);
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
},
|
||||
};
|
||||
}
|
||||
|
@@ -1,6 +1,9 @@
|
||||
const path = require("path");
|
||||
const env = require("./env.cjs");
|
||||
const paths = require("./paths.cjs");
|
||||
const { dependencies } = require("../package.json");
|
||||
|
||||
const BABEL_PLUGINS = path.join(__dirname, "babel-plugins");
|
||||
|
||||
// GitHub base URL to use for production source maps
|
||||
// Nightly builds use the commit SHA, otherwise assumes there is a tag that matches the version
|
||||
@@ -44,7 +47,7 @@ module.exports.emptyPackages = ({ latestBuild, isHassioBuild }) =>
|
||||
|
||||
module.exports.definedVars = ({ isProdBuild, latestBuild, defineOverlay }) => ({
|
||||
__DEV__: !isProdBuild,
|
||||
__BUILD__: JSON.stringify(latestBuild ? "latest" : "es5"),
|
||||
__BUILD__: JSON.stringify(latestBuild ? "modern" : "legacy"),
|
||||
__VERSION__: JSON.stringify(env.version()),
|
||||
__DEMO__: false,
|
||||
__SUPERVISOR__: false,
|
||||
@@ -76,7 +79,12 @@ module.exports.terserOptions = ({ latestBuild, isTestBuild }) => ({
|
||||
sourceMap: !isTestBuild,
|
||||
});
|
||||
|
||||
module.exports.babelOptions = ({ latestBuild, isProdBuild, isTestBuild }) => ({
|
||||
module.exports.babelOptions = ({
|
||||
latestBuild,
|
||||
isProdBuild,
|
||||
isTestBuild,
|
||||
sw,
|
||||
}) => ({
|
||||
babelrc: false,
|
||||
compact: false,
|
||||
assumptions: {
|
||||
@@ -84,13 +92,13 @@ module.exports.babelOptions = ({ latestBuild, isProdBuild, isTestBuild }) => ({
|
||||
setPublicClassFields: true,
|
||||
setSpreadProperties: true,
|
||||
},
|
||||
browserslistEnv: latestBuild ? "modern" : "legacy",
|
||||
browserslistEnv: latestBuild ? "modern" : `legacy${sw ? "-sw" : ""}`,
|
||||
presets: [
|
||||
[
|
||||
"@babel/preset-env",
|
||||
{
|
||||
useBuiltIns: latestBuild ? false : "usage",
|
||||
corejs: latestBuild ? false : "3.33",
|
||||
useBuiltIns: "usage",
|
||||
corejs: dependencies["core-js"],
|
||||
bugfixes: true,
|
||||
shippedProposals: true,
|
||||
},
|
||||
@@ -99,22 +107,12 @@ module.exports.babelOptions = ({ latestBuild, isProdBuild, isTestBuild }) => ({
|
||||
],
|
||||
plugins: [
|
||||
[
|
||||
path.resolve(
|
||||
paths.polymer_dir,
|
||||
"build-scripts/babel-plugins/inline-constants-plugin.cjs"
|
||||
),
|
||||
path.join(BABEL_PLUGINS, "inline-constants-plugin.cjs"),
|
||||
{
|
||||
modules: ["@mdi/js"],
|
||||
ignoreModuleNotFound: true,
|
||||
},
|
||||
],
|
||||
[
|
||||
path.resolve(
|
||||
paths.polymer_dir,
|
||||
"build-scripts/babel-plugins/custom-polyfill-plugin.js"
|
||||
),
|
||||
{ method: "usage-global" },
|
||||
],
|
||||
// Minify template literals for production
|
||||
isProdBuild && [
|
||||
"template-html-minifier",
|
||||
@@ -140,10 +138,16 @@ module.exports.babelOptions = ({ latestBuild, isProdBuild, isTestBuild }) => ({
|
||||
// Import helpers and regenerator from runtime package
|
||||
[
|
||||
"@babel/plugin-transform-runtime",
|
||||
{ version: require("../package.json").dependencies["@babel/runtime"] },
|
||||
{ version: dependencies["@babel/runtime"] },
|
||||
],
|
||||
// Support some proposals still in TC39 process
|
||||
["@babel/plugin-proposal-decorators", { decoratorsBeforeExport: true }],
|
||||
// Transpile decorators (still in TC39 process)
|
||||
// Modern browsers support class fields and private methods, but transform is required with the older decorator version dictated by Lit
|
||||
[
|
||||
"@babel/plugin-proposal-decorators",
|
||||
{ version: "2018-09", decoratorsBeforeExport: true },
|
||||
],
|
||||
"@babel/plugin-transform-class-properties",
|
||||
"@babel/plugin-transform-private-methods",
|
||||
].filter(Boolean),
|
||||
exclude: [
|
||||
// \\ for Windows, / for Mac OS and Linux
|
||||
@@ -152,6 +156,27 @@ module.exports.babelOptions = ({ latestBuild, isProdBuild, isTestBuild }) => ({
|
||||
],
|
||||
sourceMaps: !isTestBuild,
|
||||
overrides: [
|
||||
{
|
||||
// Add plugin to inject various polyfills, excluding the polyfills
|
||||
// themselves to prevent self-injection.
|
||||
plugins: [
|
||||
[
|
||||
path.join(BABEL_PLUGINS, "custom-polyfill-plugin.js"),
|
||||
{ method: "usage-global" },
|
||||
],
|
||||
],
|
||||
exclude: [
|
||||
path.join(paths.polymer_dir, "src/resources/polyfills"),
|
||||
...[
|
||||
"@formatjs/(?:ecma402-abstract|intl-\\w+)",
|
||||
"@lit-labs/virtualizer/polyfills",
|
||||
"@webcomponents/scoped-custom-element-registry",
|
||||
"element-internals-polyfill",
|
||||
"proxy-polyfill",
|
||||
"unfetch",
|
||||
].map((p) => new RegExp(`/node_modules/${p}/`)),
|
||||
],
|
||||
},
|
||||
{
|
||||
// Use unambiguous for dependencies so that require() is correctly injected into CommonJS files
|
||||
// Exclusions are needed in some cases where ES modules have no static imports or exports, such as polyfills
|
||||
@@ -201,7 +226,12 @@ module.exports.config = {
|
||||
return {
|
||||
name: "frontend" + nameSuffix(latestBuild),
|
||||
entry: {
|
||||
service_worker: "./src/entrypoints/service_worker.ts",
|
||||
"service-worker": !latestBuild
|
||||
? {
|
||||
import: "./src/entrypoints/service-worker.ts",
|
||||
layer: "sw",
|
||||
}
|
||||
: "./src/entrypoints/service-worker.ts",
|
||||
app: "./src/entrypoints/app.ts",
|
||||
authorize: "./src/entrypoints/authorize.ts",
|
||||
onboarding: "./src/entrypoints/onboarding.ts",
|
||||
|
@@ -3,9 +3,6 @@ const path = require("path");
|
||||
const paths = require("./paths.cjs");
|
||||
|
||||
module.exports = {
|
||||
useRollup() {
|
||||
return process.env.ROLLUP === "1";
|
||||
},
|
||||
useWDS() {
|
||||
return process.env.WDS === "1";
|
||||
},
|
||||
@@ -32,4 +29,7 @@ module.exports = {
|
||||
}
|
||||
return version[1];
|
||||
},
|
||||
isDevContainer() {
|
||||
return process.env.DEV_CONTAINER === "1";
|
||||
},
|
||||
};
|
||||
|
16
build-scripts/eslint.config.mjs
Normal file
16
build-scripts/eslint.config.mjs
Normal file
@@ -0,0 +1,16 @@
|
||||
import rootConfig from "../eslint.config.mjs";
|
||||
|
||||
export default [
|
||||
...rootConfig,
|
||||
{
|
||||
rules: {
|
||||
"no-console": "off",
|
||||
"import/no-extraneous-dependencies": "off",
|
||||
"import/extensions": "off",
|
||||
"import/no-dynamic-require": "off",
|
||||
"global-require": "off",
|
||||
"@typescript-eslint/no-var-requires": "off",
|
||||
"prefer-arrow-callback": "off",
|
||||
},
|
||||
},
|
||||
];
|
@@ -6,7 +6,6 @@ import "./entry-html.js";
|
||||
import "./gather-static.js";
|
||||
import "./gen-icons-json.js";
|
||||
import "./locale-data.js";
|
||||
import "./rollup.js";
|
||||
import "./service-worker.js";
|
||||
import "./translations.js";
|
||||
import "./wds.js";
|
||||
@@ -27,11 +26,7 @@ gulp.task(
|
||||
"build-locale-data"
|
||||
),
|
||||
"copy-static-app",
|
||||
env.useWDS()
|
||||
? "wds-watch-app"
|
||||
: env.useRollup()
|
||||
? "rollup-watch-app"
|
||||
: "webpack-watch-app"
|
||||
env.useWDS() ? "wds-watch-app" : "webpack-watch-app"
|
||||
)
|
||||
);
|
||||
|
||||
@@ -44,7 +39,7 @@ gulp.task(
|
||||
"clean",
|
||||
gulp.parallel("gen-icons-json", "build-translations", "build-locale-data"),
|
||||
"copy-static-app",
|
||||
env.useRollup() ? "rollup-prod-app" : "webpack-prod-app",
|
||||
"webpack-prod-app",
|
||||
gulp.parallel("gen-pages-app-prod", "gen-service-worker-app-prod"),
|
||||
// Don't compress running tests
|
||||
...(env.isTestBuild() ? [] : ["compress-app"])
|
||||
|
@@ -1,9 +1,7 @@
|
||||
import gulp from "gulp";
|
||||
import env from "../env.cjs";
|
||||
import "./clean.js";
|
||||
import "./entry-html.js";
|
||||
import "./gather-static.js";
|
||||
import "./rollup.js";
|
||||
import "./service-worker.js";
|
||||
import "./translations.js";
|
||||
import "./webpack.js";
|
||||
@@ -19,7 +17,7 @@ gulp.task(
|
||||
gulp.parallel("gen-icons-json", "build-translations", "build-locale-data"),
|
||||
"copy-static-cast",
|
||||
"gen-pages-cast-dev",
|
||||
env.useRollup() ? "rollup-dev-server-cast" : "webpack-dev-server-cast"
|
||||
"webpack-dev-server-cast"
|
||||
)
|
||||
);
|
||||
|
||||
@@ -33,7 +31,7 @@ gulp.task(
|
||||
"translations-enable-merge-backend",
|
||||
gulp.parallel("gen-icons-json", "build-translations", "build-locale-data"),
|
||||
"copy-static-cast",
|
||||
env.useRollup() ? "rollup-prod-cast" : "webpack-prod-cast",
|
||||
"webpack-prod-cast",
|
||||
"gen-pages-cast-prod"
|
||||
)
|
||||
);
|
||||
|
@@ -1,16 +1,68 @@
|
||||
// Tasks to compress
|
||||
|
||||
import { constants } from "node:zlib";
|
||||
import gulp from "gulp";
|
||||
import brotli from "gulp-brotli";
|
||||
import zopfli from "gulp-zopfli-green";
|
||||
import paths from "../paths.cjs";
|
||||
|
||||
const filesGlob = "*.{js,json,css,svg,xml}";
|
||||
const brotliOptions = {
|
||||
skipLarger: true,
|
||||
params: {
|
||||
[constants.BROTLI_PARAM_QUALITY]: constants.BROTLI_MAX_QUALITY,
|
||||
},
|
||||
};
|
||||
const zopfliOptions = { threshold: 150 };
|
||||
|
||||
const compressDist = (rootDir) =>
|
||||
const compressDistBrotli = (rootDir, modernDir, compressServiceWorker = true) =>
|
||||
gulp
|
||||
.src([`${rootDir}/**/*.{js,json,css,svg}`])
|
||||
.src(
|
||||
[
|
||||
`${modernDir}/**/${filesGlob}`,
|
||||
compressServiceWorker ? `${rootDir}/sw-modern.js` : undefined,
|
||||
].filter(Boolean),
|
||||
{
|
||||
base: rootDir,
|
||||
}
|
||||
)
|
||||
.pipe(brotli(brotliOptions))
|
||||
.pipe(gulp.dest(rootDir));
|
||||
|
||||
const compressDistZopfli = (rootDir, modernDir, compressModern = false) =>
|
||||
gulp
|
||||
.src(
|
||||
[
|
||||
`${rootDir}/**/${filesGlob}`,
|
||||
compressModern ? undefined : `!${modernDir}/**/${filesGlob}`,
|
||||
`!${rootDir}/{sw-modern,service_worker}.js`,
|
||||
`${rootDir}/{authorize,onboarding}.html`,
|
||||
].filter(Boolean),
|
||||
{ base: rootDir }
|
||||
)
|
||||
.pipe(zopfli(zopfliOptions))
|
||||
.pipe(gulp.dest(rootDir));
|
||||
|
||||
gulp.task("compress-app", () => compressDist(paths.app_output_root));
|
||||
gulp.task("compress-hassio", () => compressDist(paths.hassio_output_root));
|
||||
const compressAppBrotli = () =>
|
||||
compressDistBrotli(paths.app_output_root, paths.app_output_latest);
|
||||
const compressHassioBrotli = () =>
|
||||
compressDistBrotli(
|
||||
paths.hassio_output_root,
|
||||
paths.hassio_output_latest,
|
||||
false
|
||||
);
|
||||
|
||||
const compressAppZopfli = () =>
|
||||
compressDistZopfli(paths.app_output_root, paths.app_output_latest);
|
||||
const compressHassioZopfli = () =>
|
||||
compressDistZopfli(
|
||||
paths.hassio_output_root,
|
||||
paths.hassio_output_latest,
|
||||
true
|
||||
);
|
||||
|
||||
gulp.task("compress-app", gulp.parallel(compressAppBrotli, compressAppZopfli));
|
||||
gulp.task(
|
||||
"compress-hassio",
|
||||
gulp.parallel(compressHassioBrotli, compressHassioZopfli)
|
||||
);
|
||||
|
@@ -1,10 +1,8 @@
|
||||
import gulp from "gulp";
|
||||
import env from "../env.cjs";
|
||||
import "./clean.js";
|
||||
import "./entry-html.js";
|
||||
import "./gather-static.js";
|
||||
import "./gen-icons-json.js";
|
||||
import "./rollup.js";
|
||||
import "./service-worker.js";
|
||||
import "./translations.js";
|
||||
import "./webpack.js";
|
||||
@@ -24,7 +22,7 @@ gulp.task(
|
||||
"build-locale-data"
|
||||
),
|
||||
"copy-static-demo",
|
||||
env.useRollup() ? "rollup-dev-server-demo" : "webpack-dev-server-demo"
|
||||
"webpack-dev-server-demo"
|
||||
)
|
||||
);
|
||||
|
||||
@@ -39,7 +37,7 @@ gulp.task(
|
||||
"translations-enable-merge-backend",
|
||||
gulp.parallel("gen-icons-json", "build-translations", "build-locale-data"),
|
||||
"copy-static-demo",
|
||||
env.useRollup() ? "rollup-prod-demo" : "webpack-prod-demo",
|
||||
"webpack-prod-demo",
|
||||
"gen-pages-demo-prod"
|
||||
)
|
||||
);
|
||||
|
@@ -13,7 +13,7 @@ const srcMeta = "src/translations/translationMetadata.json";
|
||||
const encoding = "utf8";
|
||||
|
||||
function hasHtml(data) {
|
||||
return /<[a-z][\s\S]*>/i.test(data);
|
||||
return /<\S*>/i.test(data);
|
||||
}
|
||||
|
||||
function recursiveCheckHasHtml(file, data, errors, recKey) {
|
||||
@@ -127,6 +127,7 @@ gulp.task("fetch-lokalise", async function () {
|
||||
replace_breaks: false,
|
||||
json_unescaped_slashes: true,
|
||||
export_empty_as: "skip",
|
||||
filter_data: ["verified"],
|
||||
})
|
||||
.then((download) => fetch(download.bundle_url))
|
||||
.then((response) => {
|
||||
|
@@ -1,28 +1,75 @@
|
||||
// Tasks to generate entry HTML
|
||||
|
||||
import {
|
||||
applyVersionsToRegexes,
|
||||
compileRegex,
|
||||
getPreUserAgentRegexes,
|
||||
} from "browserslist-useragent-regexp";
|
||||
import fs from "fs-extra";
|
||||
import gulp from "gulp";
|
||||
import { minify } from "html-minifier-terser";
|
||||
import template from "lodash.template";
|
||||
import path from "path";
|
||||
import { dirname, extname, resolve } from "node:path";
|
||||
import { htmlMinifierOptions, terserOptions } from "../bundle.cjs";
|
||||
import env from "../env.cjs";
|
||||
import paths from "../paths.cjs";
|
||||
|
||||
// macOS companion app has no way to obtain the Safari version used by WKWebView,
|
||||
// and it is not in the default user agent string. So we add an additional regex
|
||||
// to serve modern based on a minimum macOS version. We take the minimum Safari
|
||||
// major version from browserslist and manually map that to a supported macOS
|
||||
// version. Note this assumes the user has kept Safari updated.
|
||||
const HA_MACOS_REGEX =
|
||||
/Home Assistant\/[\d.]+ \(.+; macOS (\d+)\.(\d+)(?:\.(\d+))?\)/;
|
||||
const SAFARI_TO_MACOS = {
|
||||
15: [10, 15, 0],
|
||||
16: [11, 0, 0],
|
||||
17: [12, 0, 0],
|
||||
18: [13, 0, 0],
|
||||
};
|
||||
|
||||
const getCommonTemplateVars = () => {
|
||||
const browserRegexes = getPreUserAgentRegexes({
|
||||
env: "modern",
|
||||
allowHigherVersions: true,
|
||||
mobileToDesktop: true,
|
||||
throwOnMissing: true,
|
||||
});
|
||||
const minSafariVersion = browserRegexes.find(
|
||||
(regex) => regex.family === "safari"
|
||||
)?.matchedVersions[0][0];
|
||||
const minMacOSVersion = SAFARI_TO_MACOS[minSafariVersion];
|
||||
if (!minMacOSVersion) {
|
||||
throw Error(
|
||||
`Could not find minimum MacOS version for Safari ${minSafariVersion}.`
|
||||
);
|
||||
}
|
||||
const haMacOSRegex = applyVersionsToRegexes(
|
||||
[
|
||||
{
|
||||
family: "ha_macos",
|
||||
regex: HA_MACOS_REGEX,
|
||||
matchedVersions: [minMacOSVersion],
|
||||
requestVersions: [minMacOSVersion],
|
||||
},
|
||||
],
|
||||
{ ignorePatch: true, allowHigherVersions: true }
|
||||
);
|
||||
return {
|
||||
useWDS: env.useWDS(),
|
||||
modernRegex: compileRegex(browserRegexes.concat(haMacOSRegex)).toString(),
|
||||
};
|
||||
};
|
||||
|
||||
const renderTemplate = (templateFile, data = {}) => {
|
||||
const compiled = template(
|
||||
fs.readFileSync(templateFile, { encoding: "utf-8" })
|
||||
);
|
||||
return compiled({
|
||||
...data,
|
||||
useRollup: env.useRollup(),
|
||||
useWDS: env.useWDS(),
|
||||
// Resolve any child/nested templates relative to the parent and pass the same data
|
||||
renderTemplate: (childTemplate) =>
|
||||
renderTemplate(
|
||||
path.resolve(path.dirname(templateFile), childTemplate),
|
||||
data
|
||||
),
|
||||
renderTemplate(resolve(dirname(templateFile), childTemplate), data),
|
||||
});
|
||||
};
|
||||
|
||||
@@ -56,10 +103,12 @@ const genPagesDevTask =
|
||||
publicRoot = ""
|
||||
) =>
|
||||
async () => {
|
||||
const commonVars = getCommonTemplateVars();
|
||||
for (const [page, entries] of Object.entries(pageEntries)) {
|
||||
const content = renderTemplate(
|
||||
path.resolve(inputRoot, inputSub, `${page}.template`),
|
||||
resolve(inputRoot, inputSub, `${page}.template`),
|
||||
{
|
||||
...commonVars,
|
||||
latestEntryJS: entries.map((entry) =>
|
||||
useWDS
|
||||
? `http://localhost:8000/src/entrypoints/${entry}.ts`
|
||||
@@ -74,7 +123,7 @@ const genPagesDevTask =
|
||||
es5CustomPanelJS: `${publicRoot}/frontend_es5/custom-panel.js`,
|
||||
}
|
||||
);
|
||||
fs.outputFileSync(path.resolve(outputRoot, page), content);
|
||||
fs.outputFileSync(resolve(outputRoot, page), content);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -91,16 +140,18 @@ const genPagesProdTask =
|
||||
) =>
|
||||
async () => {
|
||||
const latestManifest = fs.readJsonSync(
|
||||
path.resolve(outputLatest, "manifest.json")
|
||||
resolve(outputLatest, "manifest.json")
|
||||
);
|
||||
const es5Manifest = outputES5
|
||||
? fs.readJsonSync(path.resolve(outputES5, "manifest.json"))
|
||||
? fs.readJsonSync(resolve(outputES5, "manifest.json"))
|
||||
: {};
|
||||
const commonVars = getCommonTemplateVars();
|
||||
const minifiedHTML = [];
|
||||
for (const [page, entries] of Object.entries(pageEntries)) {
|
||||
const content = renderTemplate(
|
||||
path.resolve(inputRoot, inputSub, `${page}.template`),
|
||||
resolve(inputRoot, inputSub, `${page}.template`),
|
||||
{
|
||||
...commonVars,
|
||||
latestEntryJS: entries.map((entry) => latestManifest[`${entry}.js`]),
|
||||
es5EntryJS: entries.map((entry) => es5Manifest[`${entry}.js`]),
|
||||
latestCustomPanelJS: latestManifest["custom-panel.js"],
|
||||
@@ -108,8 +159,8 @@ const genPagesProdTask =
|
||||
}
|
||||
);
|
||||
minifiedHTML.push(
|
||||
minifyHtml(content, path.extname(page)).then((minified) =>
|
||||
fs.outputFileSync(path.resolve(outputRoot, page), minified)
|
||||
minifyHtml(content, extname(page)).then((minified) =>
|
||||
fs.outputFileSync(resolve(outputRoot, page), minified)
|
||||
)
|
||||
);
|
||||
}
|
||||
|
@@ -9,7 +9,7 @@ import gulp from "gulp";
|
||||
import jszip from "jszip";
|
||||
import path from "path";
|
||||
import process from "process";
|
||||
import tar from "tar";
|
||||
import { extract } from "tar";
|
||||
|
||||
const MAX_AGE = 24; // hours
|
||||
const OWNER = "home-assistant";
|
||||
@@ -156,7 +156,7 @@ gulp.task("fetch-nightly-translations", async function () {
|
||||
console.log("Unpacking downloaded translations...");
|
||||
const zip = await jszip.loadAsync(downloadResponse.data);
|
||||
await deleteCurrent;
|
||||
const extractStream = zip.file(/.*/)[0].nodeStream().pipe(tar.extract());
|
||||
const extractStream = zip.file(/.*/)[0].nodeStream().pipe(extract());
|
||||
await new Promise((resolve, reject) => {
|
||||
extractStream.on("close", resolve).on("error", reject);
|
||||
});
|
||||
|
@@ -4,13 +4,11 @@ import gulp from "gulp";
|
||||
import yaml from "js-yaml";
|
||||
import { marked } from "marked";
|
||||
import path from "path";
|
||||
import env from "../env.cjs";
|
||||
import paths from "../paths.cjs";
|
||||
import "./clean.js";
|
||||
import "./entry-html.js";
|
||||
import "./gather-static.js";
|
||||
import "./gen-icons-json.js";
|
||||
import "./rollup.js";
|
||||
import "./service-worker.js";
|
||||
import "./translations.js";
|
||||
import "./webpack.js";
|
||||
@@ -158,9 +156,7 @@ gulp.task(
|
||||
"copy-static-gallery",
|
||||
"gen-pages-gallery-dev",
|
||||
gulp.parallel(
|
||||
env.useRollup()
|
||||
? "rollup-dev-server-gallery"
|
||||
: "webpack-dev-server-gallery",
|
||||
"webpack-dev-server-gallery",
|
||||
async function watchMarkdownFiles() {
|
||||
gulp.watch(
|
||||
[
|
||||
@@ -189,7 +185,7 @@ gulp.task(
|
||||
"gather-gallery-pages"
|
||||
),
|
||||
"copy-static-gallery",
|
||||
env.useRollup() ? "rollup-prod-gallery" : "webpack-prod-gallery",
|
||||
"webpack-prod-gallery",
|
||||
"gen-pages-gallery-prod"
|
||||
)
|
||||
);
|
||||
|
@@ -4,7 +4,6 @@ import fs from "fs-extra";
|
||||
import gulp from "gulp";
|
||||
import path from "path";
|
||||
import paths from "../paths.cjs";
|
||||
import env from "../env.cjs";
|
||||
|
||||
const npmPath = (...parts) =>
|
||||
path.resolve(paths.polymer_dir, "node_modules", ...parts);
|
||||
@@ -60,12 +59,15 @@ function copyPolyfills(staticDir) {
|
||||
npmPath("@webcomponents/webcomponentsjs/webcomponents-bundle.js.map"),
|
||||
staticPath("polyfills/")
|
||||
);
|
||||
|
||||
// dialog-polyfill css
|
||||
copyFileDir(
|
||||
npmPath("dialog-polyfill/dialog-polyfill.css"),
|
||||
staticPath("polyfills/")
|
||||
);
|
||||
}
|
||||
|
||||
function copyLoaderJS(staticDir) {
|
||||
if (!env.useRollup()) {
|
||||
return;
|
||||
}
|
||||
const staticPath = genStaticPath(staticDir);
|
||||
copyFileDir(npmPath("systemjs/dist/s.min.js"), staticPath("js"));
|
||||
copyFileDir(npmPath("systemjs/dist/s.min.js.map"), staticPath("js"));
|
||||
@@ -100,6 +102,14 @@ function copyMapPanel(staticDir) {
|
||||
);
|
||||
}
|
||||
|
||||
function copyZXingWasm(staticDir) {
|
||||
const staticPath = genStaticPath(staticDir);
|
||||
copyFileDir(
|
||||
npmPath("zxing-wasm/dist/reader/zxing_reader.wasm"),
|
||||
staticPath("js")
|
||||
);
|
||||
}
|
||||
|
||||
gulp.task("copy-locale-data", async () => {
|
||||
const staticDir = paths.app_output_static;
|
||||
copyLocaleData(staticDir);
|
||||
@@ -137,6 +147,7 @@ gulp.task("copy-static-app", async () => {
|
||||
copyMapPanel(staticDir);
|
||||
|
||||
// Qr Scanner assets
|
||||
copyZXingWasm(staticDir);
|
||||
copyQrScannerWorker(staticDir);
|
||||
});
|
||||
|
||||
|
@@ -5,7 +5,6 @@ import "./compress.js";
|
||||
import "./entry-html.js";
|
||||
import "./gather-static.js";
|
||||
import "./gen-icons-json.js";
|
||||
import "./rollup.js";
|
||||
import "./translations.js";
|
||||
import "./webpack.js";
|
||||
|
||||
@@ -22,7 +21,7 @@ gulp.task(
|
||||
"copy-translations-supervisor",
|
||||
"build-locale-data",
|
||||
"copy-static-supervisor",
|
||||
env.useRollup() ? "rollup-watch-hassio" : "webpack-watch-hassio"
|
||||
"webpack-watch-hassio"
|
||||
)
|
||||
);
|
||||
|
||||
@@ -38,7 +37,7 @@ gulp.task(
|
||||
"copy-translations-supervisor",
|
||||
"build-locale-data",
|
||||
"copy-static-supervisor",
|
||||
env.useRollup() ? "rollup-prod-hassio" : "webpack-prod-hassio",
|
||||
"webpack-prod-hassio",
|
||||
"gen-pages-hassio-prod",
|
||||
...// Don't compress running tests
|
||||
(env.isTestBuild() ? [] : ["compress-hassio"])
|
||||
|
@@ -24,8 +24,11 @@ const convertToJSON = async (
|
||||
) => {
|
||||
let localeData;
|
||||
try {
|
||||
// use "pt" for "pt-BR", because "pt-BR" is unsupported by @formatjs
|
||||
const language = lang === "pt-BR" ? "pt" : lang;
|
||||
|
||||
localeData = await readFile(
|
||||
join(formatjsDir, pkg, subDir, `${lang}.js`),
|
||||
join(formatjsDir, pkg, subDir, `${language}.js`),
|
||||
"utf-8"
|
||||
);
|
||||
} catch (e) {
|
||||
|
@@ -1,147 +0,0 @@
|
||||
// Tasks to run Rollup
|
||||
|
||||
import log from "fancy-log";
|
||||
import gulp from "gulp";
|
||||
import http from "http";
|
||||
import open from "open";
|
||||
import path from "path";
|
||||
import { rollup } from "rollup";
|
||||
import handler from "serve-handler";
|
||||
import paths from "../paths.cjs";
|
||||
import rollupConfig from "../rollup.cjs";
|
||||
|
||||
const bothBuilds = (createConfigFunc, params) =>
|
||||
gulp.series(
|
||||
async function buildLatest() {
|
||||
await buildRollup(
|
||||
createConfigFunc({
|
||||
...params,
|
||||
latestBuild: true,
|
||||
})
|
||||
);
|
||||
},
|
||||
async function buildES5() {
|
||||
await buildRollup(
|
||||
createConfigFunc({
|
||||
...params,
|
||||
latestBuild: false,
|
||||
})
|
||||
);
|
||||
}
|
||||
);
|
||||
|
||||
function createServer(serveOptions) {
|
||||
const server = http.createServer((request, response) =>
|
||||
handler(request, response, {
|
||||
public: serveOptions.root,
|
||||
})
|
||||
);
|
||||
|
||||
server.listen(
|
||||
serveOptions.port,
|
||||
serveOptions.networkAccess ? "0.0.0.0" : undefined,
|
||||
() => {
|
||||
log.info(`Available at http://localhost:${serveOptions.port}`);
|
||||
open(`http://localhost:${serveOptions.port}`);
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
function watchRollup(createConfig, extraWatchSrc = [], serveOptions = null) {
|
||||
const { inputOptions, outputOptions } = createConfig({
|
||||
isProdBuild: false,
|
||||
latestBuild: true,
|
||||
});
|
||||
|
||||
const watcher = rollup.watch({
|
||||
...inputOptions,
|
||||
output: [outputOptions],
|
||||
watch: {
|
||||
include: ["src/**"] + extraWatchSrc,
|
||||
},
|
||||
});
|
||||
|
||||
let startedHttp = false;
|
||||
|
||||
watcher.on("event", (event) => {
|
||||
if (event.code === "BUNDLE_END") {
|
||||
log(`Build done @ ${new Date().toLocaleTimeString()}`);
|
||||
} else if (event.code === "ERROR") {
|
||||
log.error(event.error);
|
||||
} else if (event.code === "END") {
|
||||
if (startedHttp || !serveOptions) {
|
||||
return;
|
||||
}
|
||||
startedHttp = true;
|
||||
createServer(serveOptions);
|
||||
}
|
||||
});
|
||||
|
||||
gulp.watch(
|
||||
path.join(paths.translations_src, "en.json"),
|
||||
gulp.series("build-translations", "copy-translations-app")
|
||||
);
|
||||
}
|
||||
|
||||
async function buildRollup(config) {
|
||||
const bundle = await rollup.rollup(config.inputOptions);
|
||||
await bundle.write(config.outputOptions);
|
||||
}
|
||||
|
||||
gulp.task("rollup-watch-app", () => {
|
||||
watchRollup(rollupConfig.createAppConfig);
|
||||
});
|
||||
|
||||
gulp.task("rollup-watch-hassio", () => {
|
||||
watchRollup(rollupConfig.createHassioConfig, ["hassio/src/**"]);
|
||||
});
|
||||
|
||||
gulp.task("rollup-dev-server-demo", () => {
|
||||
watchRollup(rollupConfig.createDemoConfig, ["demo/src/**"], {
|
||||
root: paths.demo_output_root,
|
||||
port: 8090,
|
||||
});
|
||||
});
|
||||
|
||||
gulp.task("rollup-dev-server-cast", () => {
|
||||
watchRollup(rollupConfig.createCastConfig, ["cast/src/**"], {
|
||||
root: paths.cast_output_root,
|
||||
port: 8080,
|
||||
networkAccess: true,
|
||||
});
|
||||
});
|
||||
|
||||
gulp.task("rollup-dev-server-gallery", () => {
|
||||
watchRollup(rollupConfig.createGalleryConfig, ["gallery/src/**"], {
|
||||
root: paths.gallery_output_root,
|
||||
port: 8100,
|
||||
});
|
||||
});
|
||||
|
||||
gulp.task(
|
||||
"rollup-prod-app",
|
||||
bothBuilds(rollupConfig.createAppConfig, { isProdBuild: true })
|
||||
);
|
||||
|
||||
gulp.task(
|
||||
"rollup-prod-demo",
|
||||
bothBuilds(rollupConfig.createDemoConfig, { isProdBuild: true })
|
||||
);
|
||||
|
||||
gulp.task(
|
||||
"rollup-prod-cast",
|
||||
bothBuilds(rollupConfig.createCastConfig, { isProdBuild: true })
|
||||
);
|
||||
|
||||
gulp.task("rollup-prod-hassio", () =>
|
||||
bothBuilds(rollupConfig.createHassioConfig, { isProdBuild: true })
|
||||
);
|
||||
|
||||
gulp.task("rollup-prod-gallery", () =>
|
||||
buildRollup(
|
||||
rollupConfig.createGalleryConfig({
|
||||
isProdBuild: true,
|
||||
latestBuild: true,
|
||||
})
|
||||
)
|
||||
);
|
@@ -1,20 +1,19 @@
|
||||
// Generate service worker.
|
||||
// Based on manifest, create a file with the content as service_worker.js
|
||||
// Generate service workers
|
||||
|
||||
import fs from "fs-extra";
|
||||
import { deleteAsync } from "del";
|
||||
import gulp from "gulp";
|
||||
import path from "path";
|
||||
import sourceMapUrl from "source-map-url";
|
||||
import workboxBuild from "workbox-build";
|
||||
import { mkdir, readFile, symlink, writeFile } from "node:fs/promises";
|
||||
import { basename, join, relative } from "node:path";
|
||||
import { injectManifest } from "workbox-build";
|
||||
import paths from "../paths.cjs";
|
||||
|
||||
const swDest = path.resolve(paths.app_output_root, "service_worker.js");
|
||||
const SW_MAP = {
|
||||
[paths.app_output_latest]: "modern",
|
||||
[paths.app_output_es5]: "legacy",
|
||||
};
|
||||
|
||||
const writeSW = (content) => fs.outputFileSync(swDest, content.trim() + "\n");
|
||||
|
||||
gulp.task("gen-service-worker-app-dev", (done) => {
|
||||
writeSW(
|
||||
`
|
||||
const SW_DEV =
|
||||
`
|
||||
console.debug('Service worker disabled in development');
|
||||
|
||||
self.addEventListener('install', (event) => {
|
||||
@@ -22,72 +21,67 @@ self.addEventListener('install', (event) => {
|
||||
// removing any prod service worker the dev might have running
|
||||
self.skipWaiting();
|
||||
});
|
||||
`
|
||||
`.trim() + "\n";
|
||||
|
||||
gulp.task("gen-service-worker-app-dev", async () => {
|
||||
await mkdir(paths.app_output_root, { recursive: true });
|
||||
await Promise.all(
|
||||
Object.values(SW_MAP).map((build) =>
|
||||
writeFile(join(paths.app_output_root, `sw-${build}.js`), SW_DEV, {
|
||||
encoding: "utf-8",
|
||||
})
|
||||
)
|
||||
);
|
||||
done();
|
||||
});
|
||||
|
||||
gulp.task("gen-service-worker-app-prod", async () => {
|
||||
// Read bundled source file
|
||||
const bundleManifestLatest = fs.readJsonSync(
|
||||
path.resolve(paths.app_output_latest, "manifest.json")
|
||||
);
|
||||
let serviceWorkerContent = fs.readFileSync(
|
||||
paths.app_output_root + bundleManifestLatest["service_worker.js"],
|
||||
"utf-8"
|
||||
);
|
||||
|
||||
// Delete old file from frontend_latest so manifest won't pick it up
|
||||
fs.removeSync(
|
||||
paths.app_output_root + bundleManifestLatest["service_worker.js"]
|
||||
);
|
||||
fs.removeSync(
|
||||
paths.app_output_root + bundleManifestLatest["service_worker.js.map"]
|
||||
);
|
||||
|
||||
// Remove ES5
|
||||
const bundleManifestES5 = fs.readJsonSync(
|
||||
path.resolve(paths.app_output_es5, "manifest.json")
|
||||
);
|
||||
fs.removeSync(paths.app_output_root + bundleManifestES5["service_worker.js"]);
|
||||
fs.removeSync(
|
||||
paths.app_output_root + bundleManifestES5["service_worker.js.map"]
|
||||
);
|
||||
|
||||
const workboxManifest = await workboxBuild.getManifest({
|
||||
// Files that mach this pattern will be considered unique and skip revision check
|
||||
// ignore JS files + translation files
|
||||
dontCacheBustURLsMatching: /(frontend_latest\/.+|static\/translations\/.+)/,
|
||||
|
||||
globDirectory: paths.app_output_root,
|
||||
globPatterns: [
|
||||
"frontend_latest/*.js",
|
||||
// Cache all English translations because we catch them as fallback
|
||||
// Using pattern to match hash instead of * to avoid caching en-GB
|
||||
// 'v' added as valid hash letter because in dev we hash with 'dev'
|
||||
"static/translations/**/en-+([a-fv0-9]).json",
|
||||
// Icon shown on splash screen
|
||||
"static/icons/favicon-192x192.png",
|
||||
"static/icons/favicon.ico",
|
||||
// Common fonts
|
||||
"static/fonts/roboto/Roboto-Light.woff2",
|
||||
"static/fonts/roboto/Roboto-Medium.woff2",
|
||||
"static/fonts/roboto/Roboto-Regular.woff2",
|
||||
"static/fonts/roboto/Roboto-Bold.woff2",
|
||||
],
|
||||
});
|
||||
|
||||
for (const warning of workboxManifest.warnings) {
|
||||
console.warn(warning);
|
||||
}
|
||||
|
||||
// remove source map and add WB manifest
|
||||
serviceWorkerContent = sourceMapUrl.removeFrom(serviceWorkerContent);
|
||||
serviceWorkerContent = serviceWorkerContent.replace(
|
||||
"WB_MANIFEST",
|
||||
JSON.stringify(workboxManifest.manifestEntries)
|
||||
);
|
||||
|
||||
// Write new file to root
|
||||
fs.writeFileSync(swDest, serviceWorkerContent);
|
||||
});
|
||||
gulp.task("gen-service-worker-app-prod", () =>
|
||||
Promise.all(
|
||||
Object.entries(SW_MAP).map(async ([outPath, build]) => {
|
||||
const manifest = JSON.parse(
|
||||
await readFile(join(outPath, "manifest.json"), "utf-8")
|
||||
);
|
||||
const swSrc = join(paths.app_output_root, manifest["service-worker.js"]);
|
||||
const swDest = join(paths.app_output_root, `sw-${build}.js`);
|
||||
const buildDir = relative(paths.app_output_root, outPath);
|
||||
const { warnings } = await injectManifest({
|
||||
swSrc,
|
||||
swDest,
|
||||
injectionPoint: "__WB_MANIFEST__",
|
||||
// Files that mach this pattern will be considered unique and skip revision check
|
||||
// ignore JS files + translation files
|
||||
dontCacheBustURLsMatching: new RegExp(
|
||||
`(?:${buildDir}/.+|static/translations/.+)`
|
||||
),
|
||||
globDirectory: paths.app_output_root,
|
||||
globPatterns: [
|
||||
`${buildDir}/*.js`,
|
||||
// Cache all English translations because we catch them as fallback
|
||||
// Using pattern to match hash instead of * to avoid caching en-GB
|
||||
// 'v' added as valid hash letter because in dev we hash with 'dev'
|
||||
"static/translations/**/en-+([a-fv0-9]).json",
|
||||
// Icon shown on splash screen
|
||||
"static/icons/favicon-192x192.png",
|
||||
"static/icons/favicon.ico",
|
||||
// Common fonts
|
||||
"static/fonts/roboto/Roboto-Light.woff2",
|
||||
"static/fonts/roboto/Roboto-Medium.woff2",
|
||||
"static/fonts/roboto/Roboto-Regular.woff2",
|
||||
"static/fonts/roboto/Roboto-Bold.woff2",
|
||||
],
|
||||
globIgnores: [`${buildDir}/service-worker*`],
|
||||
});
|
||||
if (warnings.length > 0) {
|
||||
console.warn(
|
||||
`Problems while injecting ${build} service worker:\n`,
|
||||
warnings.join("\n")
|
||||
);
|
||||
}
|
||||
await deleteAsync(`${swSrc}?(.map)`);
|
||||
// Needed to install new SW from a cached HTML
|
||||
if (build === "modern") {
|
||||
const swOld = join(paths.app_output_root, "service_worker.js");
|
||||
await symlink(basename(swDest), swOld);
|
||||
}
|
||||
})
|
||||
)
|
||||
);
|
||||
|
@@ -1,92 +1,112 @@
|
||||
import { createHash } from "crypto";
|
||||
import { deleteSync } from "del";
|
||||
import { mkdirSync, readdirSync, readFileSync, renameSync } from "fs";
|
||||
import { writeFile } from "node:fs/promises";
|
||||
/* eslint-disable max-classes-per-file */
|
||||
|
||||
import { deleteAsync } from "del";
|
||||
import { glob } from "glob";
|
||||
import gulp from "gulp";
|
||||
import flatmap from "gulp-flatmap";
|
||||
import transform from "gulp-json-transform";
|
||||
import merge from "gulp-merge-json";
|
||||
import rename from "gulp-rename";
|
||||
import path from "path";
|
||||
import vinylBuffer from "vinyl-buffer";
|
||||
import source from "vinyl-source-stream";
|
||||
import merge from "lodash.merge";
|
||||
import { createHash } from "node:crypto";
|
||||
import { mkdir, readFile } from "node:fs/promises";
|
||||
import { basename, join } from "node:path";
|
||||
import { PassThrough, Transform } from "node:stream";
|
||||
import { finished } from "node:stream/promises";
|
||||
import env from "../env.cjs";
|
||||
import paths from "../paths.cjs";
|
||||
import { mapFiles } from "../util.cjs";
|
||||
import "./fetch-nightly-translations.js";
|
||||
|
||||
const inFrontendDir = "translations/frontend";
|
||||
const inBackendDir = "translations/backend";
|
||||
const workDir = "build/translations";
|
||||
const fullDir = workDir + "/full";
|
||||
const coreDir = workDir + "/core";
|
||||
const outDir = workDir + "/output";
|
||||
const outDir = join(workDir, "output");
|
||||
const EN_SRC = join(paths.translations_src, "en.json");
|
||||
const TEST_LOCALE = "en-x-test";
|
||||
|
||||
let mergeBackend = false;
|
||||
|
||||
gulp.task(
|
||||
"translations-enable-merge-backend",
|
||||
gulp.parallel((done) => {
|
||||
gulp.parallel(async () => {
|
||||
mergeBackend = true;
|
||||
done();
|
||||
}, "allow-setup-fetch-nightly-translations")
|
||||
);
|
||||
|
||||
// Panel translations which should be split from the core translations.
|
||||
const TRANSLATION_FRAGMENTS = Object.keys(
|
||||
JSON.parse(
|
||||
readFileSync(
|
||||
path.resolve(paths.polymer_dir, "src/translations/en.json"),
|
||||
"utf-8"
|
||||
)
|
||||
).ui.panel
|
||||
);
|
||||
// Transform stream to apply a function on Vinyl JSON files (buffer mode only).
|
||||
// The provided function can either return a new object, or an array of
|
||||
// [object, subdirectory] pairs for fragmentizing the JSON.
|
||||
class CustomJSON extends Transform {
|
||||
constructor(func, reviver = null) {
|
||||
super({ objectMode: true });
|
||||
this._func = func;
|
||||
this._reviver = reviver;
|
||||
}
|
||||
|
||||
function recursiveFlatten(prefix, data) {
|
||||
let output = {};
|
||||
Object.keys(data).forEach((key) => {
|
||||
if (typeof data[key] === "object") {
|
||||
output = {
|
||||
...output,
|
||||
...recursiveFlatten(prefix + key + ".", data[key]),
|
||||
};
|
||||
async _transform(file, _, callback) {
|
||||
try {
|
||||
let obj = JSON.parse(file.contents.toString(), this._reviver);
|
||||
if (this._func) obj = this._func(obj, file.path);
|
||||
for (const [outObj, dir] of Array.isArray(obj) ? obj : [[obj, ""]]) {
|
||||
const outFile = file.clone({ contents: false });
|
||||
outFile.contents = Buffer.from(JSON.stringify(outObj));
|
||||
outFile.dirname += `/${dir}`;
|
||||
this.push(outFile);
|
||||
}
|
||||
callback(null);
|
||||
} catch (err) {
|
||||
callback(err);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Transform stream to merge Vinyl JSON files (buffer mode only).
|
||||
class MergeJSON extends Transform {
|
||||
_objects = [];
|
||||
|
||||
constructor(stem, startObj = {}, reviver = null) {
|
||||
super({ objectMode: true, allowHalfOpen: false });
|
||||
this._stem = stem;
|
||||
this._startObj = structuredClone(startObj);
|
||||
this._reviver = reviver;
|
||||
}
|
||||
|
||||
async _transform(file, _, callback) {
|
||||
try {
|
||||
this._objects.push(JSON.parse(file.contents.toString(), this._reviver));
|
||||
if (!this._outFile) this._outFile = file.clone({ contents: false });
|
||||
callback(null);
|
||||
} catch (err) {
|
||||
callback(err);
|
||||
}
|
||||
}
|
||||
|
||||
async _flush(callback) {
|
||||
try {
|
||||
const mergedObj = merge(this._startObj, ...this._objects);
|
||||
this._outFile.contents = Buffer.from(JSON.stringify(mergedObj));
|
||||
this._outFile.stem = this._stem;
|
||||
callback(null, this._outFile);
|
||||
} catch (err) {
|
||||
callback(err);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Utility to flatten object keys to single level using separator
|
||||
const flatten = (data, prefix = "", sep = ".") => {
|
||||
const output = {};
|
||||
for (const [key, value] of Object.entries(data)) {
|
||||
if (typeof value === "object") {
|
||||
Object.assign(output, flatten(value, prefix + key + sep, sep));
|
||||
} else {
|
||||
output[prefix + key] = data[key];
|
||||
output[prefix + key] = value;
|
||||
}
|
||||
});
|
||||
}
|
||||
return output;
|
||||
}
|
||||
};
|
||||
|
||||
function flatten(data) {
|
||||
return recursiveFlatten("", data);
|
||||
}
|
||||
|
||||
function emptyFilter(data) {
|
||||
const newData = {};
|
||||
Object.keys(data).forEach((key) => {
|
||||
if (data[key]) {
|
||||
if (typeof data[key] === "object") {
|
||||
newData[key] = emptyFilter(data[key]);
|
||||
} else {
|
||||
newData[key] = data[key];
|
||||
}
|
||||
}
|
||||
});
|
||||
return newData;
|
||||
}
|
||||
|
||||
function recursiveEmpty(data) {
|
||||
const newData = {};
|
||||
Object.keys(data).forEach((key) => {
|
||||
if (data[key]) {
|
||||
if (typeof data[key] === "object") {
|
||||
newData[key] = recursiveEmpty(data[key]);
|
||||
} else {
|
||||
newData[key] = "TRANSLATED";
|
||||
}
|
||||
}
|
||||
});
|
||||
return newData;
|
||||
}
|
||||
// Filter functions that can be passed directly to JSON.parse()
|
||||
const emptyReviver = (_key, value) => value || undefined;
|
||||
const testReviver = (_key, value) =>
|
||||
value && typeof value === "string" ? "TRANSLATED" : value;
|
||||
|
||||
/**
|
||||
* Replace Lokalise key placeholders with their actual values.
|
||||
@@ -95,60 +115,44 @@ function recursiveEmpty(data) {
|
||||
* be included in src/translations/en.json, but still be usable while
|
||||
* developing locally.
|
||||
*
|
||||
* @link https://docs.lokalise.co/article/KO5SZWLLsy-key-referencing
|
||||
* @link https://docs.lokalise.com/en/articles/1400528-key-referencing
|
||||
*/
|
||||
const re_key_reference = /\[%key:([^%]+)%\]/;
|
||||
function lokaliseTransform(data, original, file) {
|
||||
const KEY_REFERENCE = /\[%key:([^%]+)%\]/;
|
||||
const lokaliseTransform = (data, path, original = data) => {
|
||||
const output = {};
|
||||
Object.entries(data).forEach(([key, value]) => {
|
||||
if (value instanceof Object) {
|
||||
output[key] = lokaliseTransform(value, original, file);
|
||||
for (const [key, value] of Object.entries(data)) {
|
||||
if (typeof value === "object") {
|
||||
output[key] = lokaliseTransform(value, path, original);
|
||||
} else {
|
||||
output[key] = value.replace(re_key_reference, (_match, lokalise_key) => {
|
||||
output[key] = value.replace(KEY_REFERENCE, (_match, lokalise_key) => {
|
||||
const replace = lokalise_key.split("::").reduce((tr, k) => {
|
||||
if (!tr) {
|
||||
throw Error(
|
||||
`Invalid key placeholder ${lokalise_key} in ${file.path}`
|
||||
);
|
||||
throw Error(`Invalid key placeholder ${lokalise_key} in ${path}`);
|
||||
}
|
||||
return tr[k];
|
||||
}, original);
|
||||
if (typeof replace !== "string") {
|
||||
throw Error(
|
||||
`Invalid key placeholder ${lokalise_key} in ${file.path}`
|
||||
);
|
||||
throw Error(`Invalid key placeholder ${lokalise_key} in ${path}`);
|
||||
}
|
||||
return replace;
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
return output;
|
||||
}
|
||||
};
|
||||
|
||||
gulp.task("clean-translations", async () => deleteSync([workDir]));
|
||||
gulp.task("clean-translations", () => deleteAsync([workDir]));
|
||||
|
||||
gulp.task("ensure-translations-build-dir", async () => {
|
||||
mkdirSync(workDir, { recursive: true });
|
||||
});
|
||||
const makeWorkDir = () => mkdir(workDir, { recursive: true });
|
||||
|
||||
gulp.task("create-test-metadata", () =>
|
||||
env.isProdBuild()
|
||||
? Promise.resolve()
|
||||
: writeFile(
|
||||
workDir + "/testMetadata.json",
|
||||
JSON.stringify({ test: { nativeName: "Test" } })
|
||||
)
|
||||
);
|
||||
|
||||
gulp.task("create-test-translation", () =>
|
||||
const createTestTranslation = () =>
|
||||
env.isProdBuild()
|
||||
? Promise.resolve()
|
||||
: gulp
|
||||
.src(path.join(paths.translations_src, "en.json"))
|
||||
.pipe(transform((data, _file) => recursiveEmpty(data)))
|
||||
.pipe(rename("test.json"))
|
||||
.pipe(gulp.dest(workDir))
|
||||
);
|
||||
.src(EN_SRC)
|
||||
.pipe(new CustomJSON(null, testReviver))
|
||||
.pipe(rename(`${TEST_LOCALE}.json`))
|
||||
.pipe(gulp.dest(workDir));
|
||||
|
||||
/**
|
||||
* This task will build a master translation file, to be used as the base for
|
||||
@@ -159,278 +163,164 @@ gulp.task("create-test-translation", () =>
|
||||
* project is buildable immediately after merging new translation keys, since
|
||||
* the Lokalise update to translations/en.json will not happen immediately.
|
||||
*/
|
||||
gulp.task("build-master-translation", () => {
|
||||
const src = [path.join(paths.translations_src, "en.json")];
|
||||
const createMasterTranslation = () =>
|
||||
gulp
|
||||
.src([EN_SRC, ...(mergeBackend ? [`${inBackendDir}/en.json`] : [])])
|
||||
.pipe(new CustomJSON(lokaliseTransform))
|
||||
.pipe(new MergeJSON("en"))
|
||||
.pipe(gulp.dest(workDir));
|
||||
|
||||
if (mergeBackend) {
|
||||
src.push(path.join(inBackendDir, "en.json"));
|
||||
const FRAGMENTS = ["base"];
|
||||
|
||||
const toggleSupervisorFragment = async () => {
|
||||
FRAGMENTS[0] = "supervisor";
|
||||
};
|
||||
|
||||
const panelFragment = (fragment) =>
|
||||
fragment !== "base" && fragment !== "supervisor";
|
||||
|
||||
const HASHES = new Map();
|
||||
|
||||
const createTranslations = async () => {
|
||||
// Parse and store the master to avoid repeating this for each locale, then
|
||||
// add the panel fragments when processing the app.
|
||||
const enMaster = JSON.parse(await readFile(`${workDir}/en.json`, "utf-8"));
|
||||
if (FRAGMENTS[0] === "base") {
|
||||
FRAGMENTS.push(...Object.keys(enMaster.ui.panel));
|
||||
}
|
||||
|
||||
return gulp
|
||||
.src(src)
|
||||
.pipe(transform((data, file) => lokaliseTransform(data, data, file)))
|
||||
// The downstream pipeline is setup first. It hashes the merged data for
|
||||
// each locale, then fragmentizes and flattens the data for final output.
|
||||
const translationFiles = await glob([
|
||||
`${inFrontendDir}/!(en).json`,
|
||||
...(env.isProdBuild() ? [] : [`${workDir}/${TEST_LOCALE}.json`]),
|
||||
]);
|
||||
const hashStream = new Transform({
|
||||
objectMode: true,
|
||||
transform: async (file, _, callback) => {
|
||||
const hash = env.isProdBuild()
|
||||
? createHash("md5").update(file.contents).digest("hex")
|
||||
: "dev";
|
||||
HASHES.set(file.stem, hash);
|
||||
file.stem += `-${hash}`;
|
||||
callback(null, file);
|
||||
},
|
||||
}).setMaxListeners(translationFiles.length + 1);
|
||||
const fragmentsStream = hashStream
|
||||
.pipe(
|
||||
merge({
|
||||
fileName: "en.json",
|
||||
})
|
||||
)
|
||||
.pipe(gulp.dest(fullDir));
|
||||
});
|
||||
|
||||
gulp.task("build-merged-translations", () =>
|
||||
gulp
|
||||
.src([
|
||||
inFrontendDir + "/*.json",
|
||||
"!" + inFrontendDir + "/en.json",
|
||||
...(env.isProdBuild() ? [] : [workDir + "/test.json"]),
|
||||
])
|
||||
.pipe(transform((data, file) => lokaliseTransform(data, data, file)))
|
||||
.pipe(
|
||||
flatmap((stream, file) => {
|
||||
// For each language generate a merged json file. It begins with the master
|
||||
// translation as a failsafe for untranslated strings, and merges all parent
|
||||
// tags into one file for each specific subtag
|
||||
//
|
||||
// TODO: This is a naive interpretation of BCP47 that should be improved.
|
||||
// Will be OK for now as long as we don't have anything more complicated
|
||||
// than a base translation + region.
|
||||
const tr = path.basename(file.history[0], ".json");
|
||||
const subtags = tr.split("-");
|
||||
const src = [fullDir + "/en.json"];
|
||||
for (let i = 1; i <= subtags.length; i++) {
|
||||
const lang = subtags.slice(0, i).join("-");
|
||||
if (lang === "test") {
|
||||
src.push(workDir + "/test.json");
|
||||
} else if (lang !== "en") {
|
||||
src.push(inFrontendDir + "/" + lang + ".json");
|
||||
if (mergeBackend) {
|
||||
src.push(inBackendDir + "/" + lang + ".json");
|
||||
}
|
||||
new CustomJSON((data) =>
|
||||
FRAGMENTS.map((fragment) => {
|
||||
switch (fragment) {
|
||||
case "base":
|
||||
// Remove the panels and supervisor to create the base translations
|
||||
return [
|
||||
flatten({
|
||||
...data,
|
||||
ui: { ...data.ui, panel: undefined },
|
||||
supervisor: undefined,
|
||||
}),
|
||||
"",
|
||||
];
|
||||
case "supervisor":
|
||||
// Supervisor key is at the top level
|
||||
return [flatten(data.supervisor), ""];
|
||||
default:
|
||||
// Create a fragment with only the given panel
|
||||
return [
|
||||
flatten(data.ui.panel[fragment], `ui.panel.${fragment}.`),
|
||||
fragment,
|
||||
];
|
||||
}
|
||||
}
|
||||
return gulp
|
||||
.src(src, { allowEmpty: true })
|
||||
.pipe(transform((data) => emptyFilter(data)))
|
||||
.pipe(
|
||||
merge({
|
||||
fileName: tr + ".json",
|
||||
})
|
||||
)
|
||||
.pipe(gulp.dest(fullDir));
|
||||
})
|
||||
)
|
||||
);
|
||||
|
||||
let taskName;
|
||||
|
||||
const splitTasks = [];
|
||||
TRANSLATION_FRAGMENTS.forEach((fragment) => {
|
||||
taskName = "build-translation-fragment-" + fragment;
|
||||
gulp.task(taskName, () =>
|
||||
// Return only the translations for this fragment.
|
||||
gulp
|
||||
.src(fullDir + "/*.json")
|
||||
.pipe(
|
||||
transform((data) => ({
|
||||
ui: {
|
||||
panel: {
|
||||
[fragment]: data.ui.panel[fragment],
|
||||
},
|
||||
},
|
||||
}))
|
||||
)
|
||||
.pipe(gulp.dest(workDir + "/" + fragment))
|
||||
);
|
||||
splitTasks.push(taskName);
|
||||
});
|
||||
|
||||
taskName = "build-translation-core";
|
||||
gulp.task(taskName, () =>
|
||||
// Remove the fragment translations from the core translation.
|
||||
gulp
|
||||
.src(fullDir + "/*.json")
|
||||
.pipe(
|
||||
transform((data, _file) => {
|
||||
TRANSLATION_FRAGMENTS.forEach((fragment) => {
|
||||
delete data.ui.panel[fragment];
|
||||
});
|
||||
delete data.supervisor;
|
||||
return data;
|
||||
})
|
||||
)
|
||||
.pipe(gulp.dest(coreDir))
|
||||
);
|
||||
|
||||
splitTasks.push(taskName);
|
||||
|
||||
gulp.task("build-flattened-translations", () =>
|
||||
// Flatten the split versions of our translations, and move them into outDir
|
||||
gulp
|
||||
.src(
|
||||
TRANSLATION_FRAGMENTS.map(
|
||||
(fragment) => workDir + "/" + fragment + "/*.json"
|
||||
).concat(coreDir + "/*.json"),
|
||||
{ base: workDir }
|
||||
)
|
||||
.pipe(
|
||||
transform((data) =>
|
||||
// Polymer.AppLocalizeBehavior requires flattened json
|
||||
flatten(data)
|
||||
})
|
||||
)
|
||||
)
|
||||
.pipe(
|
||||
rename((filePath) => {
|
||||
if (filePath.dirname === "core") {
|
||||
filePath.dirname = "";
|
||||
.pipe(gulp.dest(outDir));
|
||||
|
||||
// Send the English master downstream first, then for each other locale
|
||||
// generate merged JSON data to continue piping. It begins with the master
|
||||
// translation as a failsafe for untranslated strings, and merges all parent
|
||||
// tags into one file for each specific subtag
|
||||
//
|
||||
// TODO: This is a naive interpretation of BCP47 that should be improved.
|
||||
// Will be OK for now as long as we don't have anything more complicated
|
||||
// than a base translation + region.
|
||||
const masterStream = gulp
|
||||
.src(`${workDir}/en.json`)
|
||||
.pipe(new PassThrough({ objectMode: true }));
|
||||
masterStream.pipe(hashStream, { end: false });
|
||||
const mergesFinished = [finished(masterStream)];
|
||||
for (const translationFile of translationFiles) {
|
||||
const locale = basename(translationFile, ".json");
|
||||
const subtags = locale.split("-");
|
||||
const mergeFiles = [];
|
||||
for (let i = 1; i <= subtags.length; i++) {
|
||||
const lang = subtags.slice(0, i).join("-");
|
||||
if (lang === TEST_LOCALE) {
|
||||
mergeFiles.push(`${workDir}/${TEST_LOCALE}.json`);
|
||||
} else if (lang !== "en") {
|
||||
mergeFiles.push(`${inFrontendDir}/${lang}.json`);
|
||||
if (mergeBackend) {
|
||||
mergeFiles.push(`${inBackendDir}/${lang}.json`);
|
||||
}
|
||||
// In dev we create the file with the fake hash in the filename
|
||||
if (!env.isProdBuild()) {
|
||||
filePath.basename += "-dev";
|
||||
}
|
||||
})
|
||||
)
|
||||
.pipe(gulp.dest(outDir))
|
||||
);
|
||||
|
||||
const fingerprints = {};
|
||||
|
||||
gulp.task("build-translation-fingerprints", () => {
|
||||
// Fingerprint full file of each language
|
||||
const files = readdirSync(fullDir);
|
||||
|
||||
for (let i = 0; i < files.length; i++) {
|
||||
fingerprints[files[i].split(".")[0]] = {
|
||||
// In dev we create fake hashes
|
||||
hash: env.isProdBuild()
|
||||
? createHash("md5")
|
||||
.update(readFileSync(path.join(fullDir, files[i]), "utf-8"))
|
||||
.digest("hex")
|
||||
: "dev",
|
||||
};
|
||||
}
|
||||
|
||||
// In dev we create the file with the fake hash in the filename
|
||||
if (env.isProdBuild()) {
|
||||
mapFiles(outDir, ".json", (filename) => {
|
||||
const parsed = path.parse(filename);
|
||||
|
||||
// nl.json -> nl-<hash>.json
|
||||
if (!(parsed.name in fingerprints)) {
|
||||
throw new Error(`Unable to find hash for ${filename}`);
|
||||
}
|
||||
|
||||
renameSync(
|
||||
filename,
|
||||
`${parsed.dir}/${parsed.name}-${fingerprints[parsed.name].hash}${
|
||||
parsed.ext
|
||||
}`
|
||||
);
|
||||
});
|
||||
}
|
||||
const mergeStream = gulp
|
||||
.src(mergeFiles, { allowEmpty: true })
|
||||
.pipe(new MergeJSON(locale, enMaster, emptyReviver));
|
||||
mergesFinished.push(finished(mergeStream));
|
||||
mergeStream.pipe(hashStream, { end: false });
|
||||
}
|
||||
|
||||
const stream = source("translationFingerprints.json");
|
||||
stream.write(JSON.stringify(fingerprints));
|
||||
process.nextTick(() => stream.end());
|
||||
return stream.pipe(vinylBuffer()).pipe(gulp.dest(workDir));
|
||||
});
|
||||
// Wait for all merges to finish, then it's safe to end writing to the
|
||||
// downstream pipeline and wait for all fragments to finish writing.
|
||||
await Promise.all(mergesFinished);
|
||||
hashStream.end();
|
||||
await finished(fragmentsStream);
|
||||
};
|
||||
|
||||
gulp.task("build-translation-fragment-supervisor", () =>
|
||||
const writeTranslationMetaData = () =>
|
||||
gulp
|
||||
.src(fullDir + "/*.json")
|
||||
.pipe(transform((data) => data.supervisor))
|
||||
.src([`${paths.translations_src}/translationMetadata.json`])
|
||||
.pipe(
|
||||
rename((filePath) => {
|
||||
// In dev we create the file with the fake hash in the filename
|
||||
new CustomJSON((meta) => {
|
||||
// Add the test translation in development.
|
||||
if (!env.isProdBuild()) {
|
||||
filePath.basename += "-dev";
|
||||
meta[TEST_LOCALE] = { nativeName: "Translation Test" };
|
||||
}
|
||||
})
|
||||
)
|
||||
.pipe(gulp.dest(workDir + "/supervisor"))
|
||||
);
|
||||
|
||||
gulp.task("build-translation-flatten-supervisor", () =>
|
||||
gulp
|
||||
.src(workDir + "/supervisor/*.json")
|
||||
.pipe(
|
||||
transform((data) =>
|
||||
// Polymer.AppLocalizeBehavior requires flattened json
|
||||
flatten(data)
|
||||
)
|
||||
)
|
||||
.pipe(gulp.dest(outDir))
|
||||
);
|
||||
|
||||
gulp.task("build-translation-write-metadata", () =>
|
||||
gulp
|
||||
.src([
|
||||
path.join(paths.translations_src, "translationMetadata.json"),
|
||||
...(env.isProdBuild() ? [] : [workDir + "/testMetadata.json"]),
|
||||
workDir + "/translationFingerprints.json",
|
||||
])
|
||||
.pipe(merge({}))
|
||||
.pipe(
|
||||
transform((data) => {
|
||||
const newData = {};
|
||||
Object.entries(data).forEach(([key, value]) => {
|
||||
// Filter out translations without native name.
|
||||
if (value.nativeName) {
|
||||
newData[key] = value;
|
||||
} else {
|
||||
// Filter out locales without a native name, and add the hashes.
|
||||
for (const locale of Object.keys(meta)) {
|
||||
if (!meta[locale].nativeName) {
|
||||
meta[locale] = undefined;
|
||||
console.warn(
|
||||
`Skipping language ${key}. Native name was not translated.`
|
||||
`Skipping locale ${locale} because native name is not translated.`
|
||||
);
|
||||
} else {
|
||||
meta[locale].hash = HASHES.get(locale);
|
||||
}
|
||||
});
|
||||
return newData;
|
||||
}
|
||||
return {
|
||||
fragments: FRAGMENTS.filter(panelFragment),
|
||||
translations: meta,
|
||||
};
|
||||
})
|
||||
)
|
||||
.pipe(
|
||||
transform((data) => ({
|
||||
fragments: TRANSLATION_FRAGMENTS,
|
||||
translations: data,
|
||||
}))
|
||||
)
|
||||
.pipe(rename("translationMetadata.json"))
|
||||
.pipe(gulp.dest(workDir))
|
||||
);
|
||||
|
||||
gulp.task(
|
||||
"create-translations",
|
||||
gulp.series(
|
||||
gulp.parallel("create-test-metadata", "create-test-translation"),
|
||||
"build-master-translation",
|
||||
"build-merged-translations",
|
||||
gulp.parallel(...splitTasks),
|
||||
"build-flattened-translations"
|
||||
)
|
||||
);
|
||||
.pipe(gulp.dest(workDir));
|
||||
|
||||
gulp.task(
|
||||
"build-translations",
|
||||
gulp.series(
|
||||
gulp.parallel(
|
||||
"fetch-nightly-translations",
|
||||
gulp.series("clean-translations", "ensure-translations-build-dir")
|
||||
gulp.series("clean-translations", makeWorkDir)
|
||||
),
|
||||
"create-translations",
|
||||
"build-translation-fingerprints",
|
||||
"build-translation-write-metadata"
|
||||
createTestTranslation,
|
||||
createMasterTranslation,
|
||||
createTranslations,
|
||||
writeTranslationMetaData
|
||||
)
|
||||
);
|
||||
|
||||
gulp.task(
|
||||
"build-supervisor-translations",
|
||||
gulp.series(
|
||||
gulp.parallel(
|
||||
"fetch-nightly-translations",
|
||||
gulp.series("clean-translations", "ensure-translations-build-dir")
|
||||
),
|
||||
"build-master-translation",
|
||||
"build-merged-translations",
|
||||
"build-translation-fragment-supervisor",
|
||||
"build-translation-flatten-supervisor",
|
||||
"build-translation-fingerprints",
|
||||
"build-translation-write-metadata"
|
||||
)
|
||||
gulp.series(toggleSupervisorFragment, "build-translations")
|
||||
);
|
||||
|
@@ -40,8 +40,12 @@ const runDevServer = async ({
|
||||
compiler,
|
||||
contentBase,
|
||||
port,
|
||||
listenHost = "localhost",
|
||||
listenHost = undefined,
|
||||
}) => {
|
||||
if (listenHost === undefined) {
|
||||
// For dev container, we need to listen on all hosts
|
||||
listenHost = env.isDevContainer() ? "0.0.0.0" : "localhost";
|
||||
}
|
||||
const server = new WebpackDevServer(
|
||||
{
|
||||
hot: false,
|
||||
@@ -99,7 +103,7 @@ gulp.task("webpack-watch-app", () => {
|
||||
).watch({ poll: isWsl }, doneHandler());
|
||||
gulp.watch(
|
||||
path.join(paths.translations_src, "en.json"),
|
||||
gulp.series("create-translations", "copy-translations-app")
|
||||
gulp.series("build-translations", "copy-translations-app")
|
||||
);
|
||||
});
|
||||
|
||||
@@ -115,7 +119,9 @@ gulp.task("webpack-prod-app", () =>
|
||||
|
||||
gulp.task("webpack-dev-server-demo", () =>
|
||||
runDevServer({
|
||||
compiler: webpack(bothBuilds(createDemoConfig, { isProdBuild: false })),
|
||||
compiler: webpack(
|
||||
createDemoConfig({ isProdBuild: false, latestBuild: true })
|
||||
),
|
||||
contentBase: paths.demo_output_root,
|
||||
port: 8090,
|
||||
})
|
||||
@@ -131,7 +137,9 @@ gulp.task("webpack-prod-demo", () =>
|
||||
|
||||
gulp.task("webpack-dev-server-cast", () =>
|
||||
runDevServer({
|
||||
compiler: webpack(bothBuilds(createCastConfig, { isProdBuild: false })),
|
||||
compiler: webpack(
|
||||
createCastConfig({ isProdBuild: false, latestBuild: true })
|
||||
),
|
||||
contentBase: paths.cast_output_root,
|
||||
port: 8080,
|
||||
// Accessible from the network, because that's how Cast hits it.
|
||||
@@ -174,8 +182,9 @@ gulp.task("webpack-prod-hassio", () =>
|
||||
|
||||
gulp.task("webpack-dev-server-gallery", () =>
|
||||
runDevServer({
|
||||
// We don't use the es5 build, but the dev server will fuck up the publicPath if we don't
|
||||
compiler: webpack(bothBuilds(createGalleryConfig, { isProdBuild: false })),
|
||||
compiler: webpack(
|
||||
createGalleryConfig({ isProdBuild: false, latestBuild: true })
|
||||
),
|
||||
contentBase: paths.gallery_output_root,
|
||||
port: 8100,
|
||||
listenHost: "0.0.0.0",
|
||||
|
@@ -1,14 +0,0 @@
|
||||
module.exports = function (opts = {}) {
|
||||
const dontHash = opts.dontHash || new Set();
|
||||
|
||||
return {
|
||||
name: "dont-hash",
|
||||
renderChunk(_code, chunk, _options) {
|
||||
if (!chunk.isEntry || !dontHash.has(chunk.name)) {
|
||||
return null;
|
||||
}
|
||||
chunk.fileName = `${chunk.name}.js`;
|
||||
return null;
|
||||
},
|
||||
};
|
||||
};
|
@@ -1,24 +0,0 @@
|
||||
module.exports = function (userOptions = {}) {
|
||||
// Files need to be absolute paths.
|
||||
// This only works if the file has no exports
|
||||
// and only is imported for its side effects
|
||||
const files = userOptions.files || [];
|
||||
|
||||
if (files.length === 0) {
|
||||
return {
|
||||
name: "ignore",
|
||||
};
|
||||
}
|
||||
|
||||
return {
|
||||
name: "ignore",
|
||||
|
||||
load(id) {
|
||||
return files.some((toIgnorePath) => id.startsWith(toIgnorePath))
|
||||
? {
|
||||
code: "",
|
||||
}
|
||||
: null;
|
||||
},
|
||||
};
|
||||
};
|
@@ -1,34 +0,0 @@
|
||||
const url = require("url");
|
||||
|
||||
const defaultOptions = {
|
||||
publicPath: "",
|
||||
};
|
||||
|
||||
module.exports = function (userOptions = {}) {
|
||||
const options = { ...defaultOptions, ...userOptions };
|
||||
|
||||
return {
|
||||
name: "manifest",
|
||||
generateBundle(outputOptions, bundle) {
|
||||
const manifest = {};
|
||||
|
||||
for (const chunk of Object.values(bundle)) {
|
||||
if (!chunk.isEntry) {
|
||||
continue;
|
||||
}
|
||||
// Add js extension to mimic Webpack manifest.
|
||||
manifest[`${chunk.name}.js`] = url.resolve(
|
||||
options.publicPath,
|
||||
chunk.fileName
|
||||
);
|
||||
}
|
||||
|
||||
this.emitFile({
|
||||
type: "asset",
|
||||
source: JSON.stringify(manifest, undefined, 2),
|
||||
name: "manifest.json",
|
||||
fileName: "manifest.json",
|
||||
});
|
||||
},
|
||||
};
|
||||
};
|
@@ -1,152 +0,0 @@
|
||||
// Worker plugin
|
||||
// Each worker will include all of its dependencies
|
||||
// instead of relying on an importer.
|
||||
|
||||
// Forked from v.1.4.1
|
||||
// https://github.com/surma/rollup-plugin-off-main-thread
|
||||
/**
|
||||
* Copyright 2018 Google Inc. All Rights Reserved.
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
const rollup = require("rollup");
|
||||
const path = require("path");
|
||||
const MagicString = require("magic-string");
|
||||
|
||||
const defaultOpts = {
|
||||
// A RegExp to find `new Workers()` calls. The second capture group _must_
|
||||
// capture the provided file name without the quotes.
|
||||
workerRegexp: /new Worker\((["'])(.+?)\1(,[^)]+)?\)/g,
|
||||
plugins: ["node-resolve", "commonjs", "babel", "terser", "ignore"],
|
||||
};
|
||||
|
||||
async function getBundledWorker(workerPath, rollupOptions) {
|
||||
const bundle = await rollup.rollup({
|
||||
...rollupOptions,
|
||||
input: {
|
||||
worker: workerPath,
|
||||
},
|
||||
});
|
||||
const { output } = await bundle.generate({
|
||||
// Generates cleanest output, we shouldn't have any imports/exports
|
||||
// that would be incompatible with ES5.
|
||||
format: "es",
|
||||
// We should not export anything. This will fail build if we are.
|
||||
exports: "none",
|
||||
});
|
||||
|
||||
let code;
|
||||
|
||||
for (const chunkOrAsset of output) {
|
||||
if (chunkOrAsset.name === "worker") {
|
||||
code = chunkOrAsset.code;
|
||||
} else if (chunkOrAsset.type !== "asset") {
|
||||
throw new Error("Unexpected extra output");
|
||||
}
|
||||
}
|
||||
|
||||
return code;
|
||||
}
|
||||
|
||||
module.exports = function (opts = {}) {
|
||||
opts = { ...defaultOpts, ...opts };
|
||||
|
||||
let rollupOptions;
|
||||
let refIds;
|
||||
|
||||
return {
|
||||
name: "hass-worker",
|
||||
|
||||
async buildStart(options) {
|
||||
refIds = {};
|
||||
rollupOptions = {
|
||||
plugins: options.plugins.filter((plugin) =>
|
||||
opts.plugins.includes(plugin.name)
|
||||
),
|
||||
};
|
||||
},
|
||||
|
||||
async transform(code, id) {
|
||||
// Copy the regexp as they are stateful and this hook is async.
|
||||
const workerRegexp = new RegExp(
|
||||
opts.workerRegexp.source,
|
||||
opts.workerRegexp.flags
|
||||
);
|
||||
if (!workerRegexp.test(code)) {
|
||||
return undefined;
|
||||
}
|
||||
|
||||
const ms = new MagicString(code);
|
||||
// Reset the regexp
|
||||
workerRegexp.lastIndex = 0;
|
||||
for (;;) {
|
||||
const match = workerRegexp.exec(code);
|
||||
if (!match) {
|
||||
break;
|
||||
}
|
||||
|
||||
const workerFile = match[2];
|
||||
let optionsObject = {};
|
||||
// Parse the optional options object
|
||||
if (match[3] && match[3].length > 0) {
|
||||
// FIXME: ooooof!
|
||||
// eslint-disable-next-line @typescript-eslint/no-implied-eval
|
||||
optionsObject = new Function(`return ${match[3].slice(1)};`)();
|
||||
}
|
||||
delete optionsObject.type;
|
||||
|
||||
if (!/^.*\//.test(workerFile)) {
|
||||
this.warn(
|
||||
`Paths passed to the Worker constructor must be relative or absolute, i.e. start with /, ./ or ../ (just like dynamic import!). Ignoring "${workerFile}".`
|
||||
);
|
||||
continue;
|
||||
}
|
||||
|
||||
// Find worker file and store it as a chunk with ID prefixed for our loader
|
||||
// eslint-disable-next-line no-await-in-loop
|
||||
const resolvedWorkerFile = (await this.resolve(workerFile, id)).id;
|
||||
let chunkRefId;
|
||||
if (resolvedWorkerFile in refIds) {
|
||||
chunkRefId = refIds[resolvedWorkerFile];
|
||||
} else {
|
||||
this.addWatchFile(resolvedWorkerFile);
|
||||
// eslint-disable-next-line no-await-in-loop
|
||||
const source = await getBundledWorker(
|
||||
resolvedWorkerFile,
|
||||
rollupOptions
|
||||
);
|
||||
chunkRefId = refIds[resolvedWorkerFile] = this.emitFile({
|
||||
name: path.basename(resolvedWorkerFile),
|
||||
source,
|
||||
type: "asset",
|
||||
});
|
||||
}
|
||||
|
||||
const workerParametersStartIndex = match.index + "new Worker(".length;
|
||||
const workerParametersEndIndex =
|
||||
match.index + match[0].length - ")".length;
|
||||
|
||||
ms.overwrite(
|
||||
workerParametersStartIndex,
|
||||
workerParametersEndIndex,
|
||||
`import.meta.ROLLUP_FILE_URL_${chunkRefId}, ${JSON.stringify(
|
||||
optionsObject
|
||||
)}`
|
||||
);
|
||||
}
|
||||
|
||||
return {
|
||||
code: ms.toString(),
|
||||
map: ms.generateMap({ hires: true }),
|
||||
};
|
||||
},
|
||||
};
|
||||
};
|
@@ -1,146 +0,0 @@
|
||||
const path = require("path");
|
||||
|
||||
const commonjs = require("@rollup/plugin-commonjs");
|
||||
const resolve = require("@rollup/plugin-node-resolve");
|
||||
const json = require("@rollup/plugin-json");
|
||||
const { babel } = require("@rollup/plugin-babel");
|
||||
const replace = require("@rollup/plugin-replace");
|
||||
const visualizer = require("rollup-plugin-visualizer");
|
||||
const { string } = require("rollup-plugin-string");
|
||||
const { terser } = require("rollup-plugin-terser");
|
||||
const manifest = require("./rollup-plugins/manifest-plugin.cjs");
|
||||
const worker = require("./rollup-plugins/worker-plugin.cjs");
|
||||
const dontHashPlugin = require("./rollup-plugins/dont-hash-plugin.cjs");
|
||||
const ignore = require("./rollup-plugins/ignore-plugin.cjs");
|
||||
|
||||
const bundle = require("./bundle.cjs");
|
||||
const paths = require("./paths.cjs");
|
||||
|
||||
const extensions = [".js", ".ts"];
|
||||
|
||||
/**
|
||||
* @param {Object} arg
|
||||
* @param { import("rollup").InputOption } arg.input
|
||||
*/
|
||||
const createRollupConfig = ({
|
||||
entry,
|
||||
outputPath,
|
||||
defineOverlay,
|
||||
isProdBuild,
|
||||
latestBuild,
|
||||
isStatsBuild,
|
||||
publicPath,
|
||||
dontHash,
|
||||
isWDS,
|
||||
}) => ({
|
||||
/**
|
||||
* @type { import("rollup").InputOptions }
|
||||
*/
|
||||
inputOptions: {
|
||||
input: entry,
|
||||
// Some entry points contain no JavaScript. This setting silences a warning about that.
|
||||
// https://rollupjs.org/configuration-options/#preserveentrysignatures
|
||||
preserveEntrySignatures: false,
|
||||
plugins: [
|
||||
ignore({
|
||||
files: bundle
|
||||
.emptyPackages({ latestBuild })
|
||||
// TEMP HACK: Makes Rollup build work again
|
||||
.concat(
|
||||
require.resolve(
|
||||
"@webcomponents/scoped-custom-element-registry/scoped-custom-element-registry.min"
|
||||
)
|
||||
),
|
||||
}),
|
||||
resolve({
|
||||
extensions,
|
||||
preferBuiltins: false,
|
||||
browser: true,
|
||||
rootDir: paths.polymer_dir,
|
||||
}),
|
||||
commonjs(),
|
||||
json(),
|
||||
babel({
|
||||
...bundle.babelOptions({ latestBuild, isProdBuild }),
|
||||
extensions,
|
||||
babelHelpers: isWDS ? "inline" : "bundled",
|
||||
}),
|
||||
string({
|
||||
// Import certain extensions as strings
|
||||
include: [path.join(paths.polymer_dir, "node_modules/**/*.css")],
|
||||
}),
|
||||
replace(bundle.definedVars({ isProdBuild, latestBuild, defineOverlay })),
|
||||
!isWDS &&
|
||||
manifest({
|
||||
publicPath,
|
||||
}),
|
||||
!isWDS && worker(),
|
||||
!isWDS && dontHashPlugin({ dontHash }),
|
||||
!isWDS && isProdBuild && terser(bundle.terserOptions({ latestBuild })),
|
||||
!isWDS &&
|
||||
isStatsBuild &&
|
||||
visualizer({
|
||||
// https://github.com/btd/rollup-plugin-visualizer#options
|
||||
open: true,
|
||||
sourcemap: true,
|
||||
}),
|
||||
].filter(Boolean),
|
||||
},
|
||||
/**
|
||||
* @type { import("rollup").OutputOptions }
|
||||
*/
|
||||
outputOptions: {
|
||||
// https://rollupjs.org/configuration-options/#output-dir
|
||||
dir: outputPath,
|
||||
// https://rollupjs.org/configuration-options/#output-format
|
||||
format: latestBuild ? "es" : "systemjs",
|
||||
// https://rollupjs.org/configuration-options/#output-externallivebindings
|
||||
externalLiveBindings: false,
|
||||
// https://rollupjs.org/configuration-options/#output-entryfilenames
|
||||
// https://rollupjs.org/configuration-options/#output-chunkfilenames
|
||||
// https://rollupjs.org/configuration-options/#output-assetfilenames
|
||||
entryFileNames:
|
||||
isProdBuild && !isStatsBuild ? "[name]-[hash].js" : "[name].js",
|
||||
chunkFileNames: isProdBuild && !isStatsBuild ? "c.[hash].js" : "[name].js",
|
||||
assetFileNames: isProdBuild && !isStatsBuild ? "a.[hash].js" : "[name].js",
|
||||
// https://rollupjs.org/configuration-options/#output-sourcemap
|
||||
sourcemap: isProdBuild ? true : "inline",
|
||||
},
|
||||
});
|
||||
|
||||
const createAppConfig = ({ isProdBuild, latestBuild, isStatsBuild, isWDS }) =>
|
||||
createRollupConfig(
|
||||
bundle.config.app({
|
||||
isProdBuild,
|
||||
latestBuild,
|
||||
isStatsBuild,
|
||||
isWDS,
|
||||
})
|
||||
);
|
||||
|
||||
const createDemoConfig = ({ isProdBuild, latestBuild, isStatsBuild }) =>
|
||||
createRollupConfig(
|
||||
bundle.config.demo({
|
||||
isProdBuild,
|
||||
latestBuild,
|
||||
isStatsBuild,
|
||||
})
|
||||
);
|
||||
|
||||
const createCastConfig = ({ isProdBuild, latestBuild }) =>
|
||||
createRollupConfig(bundle.config.cast({ isProdBuild, latestBuild }));
|
||||
|
||||
const createHassioConfig = ({ isProdBuild, latestBuild }) =>
|
||||
createRollupConfig(bundle.config.hassio({ isProdBuild, latestBuild }));
|
||||
|
||||
const createGalleryConfig = ({ isProdBuild, latestBuild }) =>
|
||||
createRollupConfig(bundle.config.gallery({ isProdBuild, latestBuild }));
|
||||
|
||||
module.exports = {
|
||||
createAppConfig,
|
||||
createDemoConfig,
|
||||
createCastConfig,
|
||||
createHassioConfig,
|
||||
createGalleryConfig,
|
||||
createRollupConfig,
|
||||
};
|
@@ -1,16 +0,0 @@
|
||||
const path = require("path");
|
||||
const fs = require("fs");
|
||||
|
||||
// Helper function to map recursively over files in a folder and it's subfolders
|
||||
module.exports.mapFiles = function mapFiles(startPath, filter, mapFunc) {
|
||||
const files = fs.readdirSync(startPath);
|
||||
for (let i = 0; i < files.length; i++) {
|
||||
const filename = path.join(startPath, files[i]);
|
||||
const stat = fs.lstatSync(filename);
|
||||
if (stat.isDirectory()) {
|
||||
mapFiles(filename, filter, mapFunc);
|
||||
} else if (filename.indexOf(filter) >= 0) {
|
||||
mapFunc(filename);
|
||||
}
|
||||
}
|
||||
};
|
@@ -7,6 +7,10 @@ const TerserPlugin = require("terser-webpack-plugin");
|
||||
const { WebpackManifestPlugin } = require("webpack-manifest-plugin");
|
||||
const log = require("fancy-log");
|
||||
const WebpackBar = require("webpackbar");
|
||||
const {
|
||||
TransformAsyncModulesPlugin,
|
||||
} = require("transform-async-modules-webpack-plugin");
|
||||
const { dependencies } = require("../package.json");
|
||||
const paths = require("./paths.cjs");
|
||||
const bundle = require("./bundle.cjs");
|
||||
|
||||
@@ -59,17 +63,25 @@ const createWebpackConfig = ({
|
||||
rules: [
|
||||
{
|
||||
test: /\.m?js$|\.ts$/,
|
||||
use: {
|
||||
use: (info) => ({
|
||||
loader: "babel-loader",
|
||||
options: {
|
||||
...bundle.babelOptions({ latestBuild, isProdBuild, isTestBuild }),
|
||||
...bundle.babelOptions({
|
||||
latestBuild,
|
||||
isProdBuild,
|
||||
isTestBuild,
|
||||
sw: info.issuerLayer === "sw",
|
||||
}),
|
||||
cacheDirectory: !isProdBuild,
|
||||
cacheCompression: false,
|
||||
},
|
||||
},
|
||||
}),
|
||||
resolve: {
|
||||
fullySpecified: false,
|
||||
},
|
||||
parser: {
|
||||
worker: ["*context.audioWorklet.addModule()", "..."],
|
||||
},
|
||||
},
|
||||
{
|
||||
test: /\.css$/,
|
||||
@@ -88,11 +100,15 @@ const createWebpackConfig = ({
|
||||
moduleIds: isProdBuild && !isStatsBuild ? "deterministic" : "named",
|
||||
chunkIds: isProdBuild && !isStatsBuild ? "deterministic" : "named",
|
||||
splitChunks: {
|
||||
// Disable splitting for web workers with ESM output
|
||||
// Imports of external chunks are broken
|
||||
chunks: latestBuild
|
||||
? (chunk) => !chunk.canBeInitial() && !/^.+-worker$/.test(chunk.name)
|
||||
: undefined,
|
||||
// Disable splitting for web workers and worklets because imports of
|
||||
// external chunks are broken for:
|
||||
// - ESM output: https://github.com/webpack/webpack/issues/17014
|
||||
// - Worklets use `importScripts`: https://github.com/webpack/webpack/issues/11543
|
||||
chunks: (chunk) =>
|
||||
!chunk.canBeInitial() &&
|
||||
!new RegExp(`^.+-work${latestBuild ? "(?:let|er)" : "let"}$`).test(
|
||||
chunk.name
|
||||
),
|
||||
},
|
||||
},
|
||||
plugins: [
|
||||
@@ -142,17 +158,6 @@ const createWebpackConfig = ({
|
||||
),
|
||||
path.resolve(paths.polymer_dir, "src/util/empty.js")
|
||||
),
|
||||
// See `src/resources/intl-polyfill-legacy.ts` for explanation
|
||||
!latestBuild &&
|
||||
new webpack.NormalModuleReplacementPlugin(
|
||||
new RegExp(
|
||||
path.resolve(paths.polymer_dir, "src/resources/intl-polyfill.ts")
|
||||
),
|
||||
path.resolve(
|
||||
paths.polymer_dir,
|
||||
"src/resources/intl-polyfill-legacy.ts"
|
||||
)
|
||||
),
|
||||
!isProdBuild && new LogStartCompilePlugin(),
|
||||
isProdBuild &&
|
||||
new StatsWriterPlugin({
|
||||
@@ -163,10 +168,16 @@ const createWebpackConfig = ({
|
||||
stats: { assets: true, chunks: true, modules: true },
|
||||
transform: (stats) => JSON.stringify(filterStats(stats)),
|
||||
}),
|
||||
!latestBuild &&
|
||||
new TransformAsyncModulesPlugin({
|
||||
browserslistEnv: "legacy",
|
||||
runtime: { version: dependencies["@babel/runtime"] },
|
||||
}),
|
||||
].filter(Boolean),
|
||||
resolve: {
|
||||
extensions: [".ts", ".js", ".json"],
|
||||
alias: {
|
||||
"lit/static-html$": "lit/static-html.js",
|
||||
"lit/decorators$": "lit/decorators.js",
|
||||
"lit/directive$": "lit/directive.js",
|
||||
"lit/directives/until$": "lit/directives/until.js",
|
||||
@@ -177,6 +188,7 @@ const createWebpackConfig = ({
|
||||
"lit/directives/cache$": "lit/directives/cache.js",
|
||||
"lit/directives/repeat$": "lit/directives/repeat.js",
|
||||
"lit/directives/live$": "lit/directives/live.js",
|
||||
"lit/directives/keyed$": "lit/directives/keyed.js",
|
||||
"lit/polyfill-support$": "lit/polyfill-support.js",
|
||||
"@lit-labs/virtualizer/layouts/grid":
|
||||
"@lit-labs/virtualizer/layouts/grid.js",
|
||||
@@ -229,6 +241,7 @@ const createWebpackConfig = ({
|
||||
),
|
||||
},
|
||||
experiments: {
|
||||
layers: true,
|
||||
outputModule: true,
|
||||
},
|
||||
};
|
||||
|
BIN
cast/public/images/nabu-loves-hass.png
Normal file
BIN
cast/public/images/nabu-loves-hass.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 9.8 KiB |
5
cast/public/sw-legacy.js
Normal file
5
cast/public/sw-legacy.js
Normal file
@@ -0,0 +1,5 @@
|
||||
"use strict";
|
||||
|
||||
self.addEventListener("fetch", (event) => {
|
||||
event.respondWith(fetch(event.request));
|
||||
});
|
@@ -1,10 +0,0 @@
|
||||
import rollup from "../build-scripts/rollup.cjs";
|
||||
import env from "../build-scripts/env.cjs";
|
||||
|
||||
const config = rollup.createCastConfig({
|
||||
isProdBuild: env.isProdBuild(),
|
||||
latestBuild: true,
|
||||
isStatsBuild: env.isStatsBuild(),
|
||||
});
|
||||
|
||||
export default { ...config.inputOptions, output: config.outputOptions };
|
@@ -36,13 +36,7 @@
|
||||
</head>
|
||||
<body>
|
||||
<%= renderTemplate("../../../src/html/_js_base.html.template") %>
|
||||
<script>
|
||||
<% for (const entry of latestEntryJS) { %>
|
||||
import("<%= entry %>");
|
||||
<% } %>
|
||||
window.latestJS = true;
|
||||
</script>
|
||||
<%= renderTemplate("../../../src/html/_script_load_es5.html.template") %>
|
||||
<%= renderTemplate("../../../src/html/_script_loader.html.template") %>
|
||||
<hc-layout subtitle="FAQ">
|
||||
<style>
|
||||
a {
|
||||
@@ -145,7 +139,7 @@
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<div class="section-header">Wat does Home Assistant Cast do?</div>
|
||||
<div class="section-header">What does Home Assistant Cast do?</div>
|
||||
<div class="card-content">
|
||||
<p>
|
||||
Home Assistant Cast is a receiver application for the Chromecast. When
|
||||
@@ -232,17 +226,5 @@ http:
|
||||
</p>
|
||||
</div>
|
||||
</hc-layout>
|
||||
|
||||
<script>
|
||||
var _gaq = [["_setAccount", "UA-57927901-9"], ["_trackPageview"]];
|
||||
(function (d, t) {
|
||||
var g = d.createElement(t),
|
||||
s = d.getElementsByTagName(t)[0];
|
||||
g.src =
|
||||
("https:" == location.protocol ? "//ssl" : "//www") +
|
||||
".google-analytics.com/ga.js";
|
||||
s.parentNode.insertBefore(g, s);
|
||||
})(document, "script");
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
@@ -13,15 +13,9 @@
|
||||
<%= renderTemplate("_social_meta.html.template") %>
|
||||
</head>
|
||||
<body>
|
||||
<%= renderTemplate("../../../src/html/_js_base.html.template") %>
|
||||
<hc-connect></hc-connect>
|
||||
<script>
|
||||
<% for (const entry of latestEntryJS) { %>
|
||||
import("<%= entry %>");
|
||||
<% } %>
|
||||
window.latestJS = true;
|
||||
</script>
|
||||
<%= renderTemplate("../../../src/html/_script_load_es5.html.template") %>
|
||||
<%= renderTemplate("../../../src/html/_js_base.html.template") %>
|
||||
<%= renderTemplate("../../../src/html/_script_loader.html.template") %>
|
||||
<script>
|
||||
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
|
||||
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
|
||||
|
@@ -14,22 +14,10 @@
|
||||
--background-color: #41bdf5;
|
||||
}
|
||||
</style>
|
||||
<script>
|
||||
var _gaq=[['_setAccount','UA-57927901-10'],['_trackPageview']];
|
||||
(function(d,t){var g=d.createElement(t),s=d.getElementsByTagName(t)[0];
|
||||
g.src=('https:'==location.protocol?'//ssl':'//www')+'.google-analytics.com/ga.js';
|
||||
s.parentNode.insertBefore(g,s)}(document,'script'));
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<%= renderTemplate("../../../src/html/_js_base.html.template") %>
|
||||
<cast-media-player></cast-media-player>
|
||||
<script>
|
||||
<% for (const entry of latestEntryJS) { %>
|
||||
import("<%= entry %>");
|
||||
<% } %>
|
||||
window.latestJS = true;
|
||||
</script>
|
||||
<%= renderTemplate("../../../src/html/_script_load_es5.html.template") %>
|
||||
<%= renderTemplate("../../../src/html/_js_base.html.template") %>
|
||||
<%= renderTemplate("../../../src/html/_script_loader.html.template") %>
|
||||
</body>
|
||||
</html>
|
||||
|
@@ -11,10 +11,4 @@
|
||||
font-size: initial;
|
||||
}
|
||||
</style>
|
||||
<script>
|
||||
var _gaq=[['_setAccount','UA-57927901-10'],['_trackPageview']];
|
||||
(function(d,t){var g=d.createElement(t),s=d.getElementsByTagName(t)[0];
|
||||
g.src=('https:'==location.protocol?'//ssl':'//www')+'.google-analytics.com/ga.js';
|
||||
s.parentNode.insertBefore(g,s)}(document,'script'));
|
||||
</script>
|
||||
</html>
|
||||
|
@@ -1,4 +1,3 @@
|
||||
import "../../../src/resources/safari-14-attachshadow-patch";
|
||||
import "./layout/hc-connect";
|
||||
|
||||
import("../../../src/resources/ha-style");
|
||||
|
@@ -1,11 +1,12 @@
|
||||
import "@material/mwc-button/mwc-button";
|
||||
import { mdiCast, mdiCastConnected } from "@mdi/js";
|
||||
import "@polymer/paper-item/paper-icon-item";
|
||||
import "@polymer/paper-listbox/paper-listbox";
|
||||
import { Auth, Connection } from "home-assistant-js-websocket";
|
||||
import { CSSResultGroup, LitElement, TemplateResult, css, html } from "lit";
|
||||
import "@material/mwc-list/mwc-list";
|
||||
import type { ActionDetail } from "@material/mwc-list/mwc-list";
|
||||
import { mdiCast, mdiCastConnected, mdiViewDashboard } from "@mdi/js";
|
||||
import type { Auth, Connection } from "home-assistant-js-websocket";
|
||||
import type { CSSResultGroup, TemplateResult } from "lit";
|
||||
import { LitElement, css, html } from "lit";
|
||||
import { customElement, property, state } from "lit/decorators";
|
||||
import { CastManager } from "../../../../src/cast/cast_manager";
|
||||
import type { CastManager } from "../../../../src/cast/cast_manager";
|
||||
import {
|
||||
castSendShowLovelaceView,
|
||||
ensureConnectedCastSession,
|
||||
@@ -24,18 +25,19 @@ import {
|
||||
getLovelaceCollection,
|
||||
} from "../../../../src/data/lovelace";
|
||||
import { isStrategyDashboard } from "../../../../src/data/lovelace/config/types";
|
||||
import { LovelaceViewConfig } from "../../../../src/data/lovelace/config/view";
|
||||
import type { LovelaceViewConfig } from "../../../../src/data/lovelace/config/view";
|
||||
import "../../../../src/layouts/hass-loading-screen";
|
||||
import { generateDefaultViewConfig } from "../../../../src/panels/lovelace/common/generate-lovelace-config";
|
||||
import "./hc-layout";
|
||||
import "../../../../src/components/ha-list-item";
|
||||
|
||||
@customElement("hc-cast")
|
||||
class HcCast extends LitElement {
|
||||
@property() public auth!: Auth;
|
||||
@property({ attribute: false }) public auth!: Auth;
|
||||
|
||||
@property() public connection!: Connection;
|
||||
@property({ attribute: false }) public connection!: Connection;
|
||||
|
||||
@property() public castManager!: CastManager;
|
||||
@property({ attribute: false }) public castManager!: CastManager;
|
||||
|
||||
@state() private askWrite = false;
|
||||
|
||||
@@ -83,34 +85,38 @@ class HcCast extends LitElement {
|
||||
`
|
||||
: html`
|
||||
<div class="section-header">PICK A VIEW</div>
|
||||
<paper-listbox
|
||||
attr-for-selected="data-path"
|
||||
.selected=${this.castManager.status.lovelacePath || ""}
|
||||
>
|
||||
<mwc-list @action=${this._handlePickView} activatable>
|
||||
${(
|
||||
this.lovelaceViews ?? [
|
||||
generateDefaultViewConfig({}, {}, {}, {}, () => ""),
|
||||
]
|
||||
).map(
|
||||
(view, idx) => html`
|
||||
<paper-icon-item
|
||||
@click=${this._handlePickView}
|
||||
data-path=${view.path || idx}
|
||||
<ha-list-item
|
||||
graphic="avatar"
|
||||
.activated=${this.castManager.status?.lovelacePath ===
|
||||
(view.path ?? idx)}
|
||||
.selected=${this.castManager.status?.lovelacePath ===
|
||||
(view.path ?? idx)}
|
||||
>
|
||||
${view.title || view.path || "Unnamed view"}
|
||||
${view.icon
|
||||
? html`
|
||||
<ha-icon
|
||||
.icon=${view.icon}
|
||||
slot="item-icon"
|
||||
slot="graphic"
|
||||
></ha-icon>
|
||||
`
|
||||
: ""}
|
||||
${view.title || view.path}
|
||||
</paper-icon-item>
|
||||
: html`<ha-svg-icon
|
||||
slot="item-icon"
|
||||
.path=${mdiViewDashboard}
|
||||
></ha-svg-icon>`}
|
||||
</ha-list-item>
|
||||
`
|
||||
)}
|
||||
</paper-listbox>
|
||||
)}</mwc-list
|
||||
>
|
||||
`}
|
||||
|
||||
<div class="card-actions">
|
||||
${this.castManager.status
|
||||
? html`
|
||||
@@ -182,8 +188,8 @@ class HcCast extends LitElement {
|
||||
this.castManager.requestSession();
|
||||
}
|
||||
|
||||
private async _handlePickView(ev: Event) {
|
||||
const path = (ev.currentTarget as any).getAttribute("data-path");
|
||||
private async _handlePickView(ev: CustomEvent<ActionDetail>) {
|
||||
const path = this.lovelaceViews![ev.detail.index].path ?? ev.detail.index;
|
||||
await ensureConnectedCastSession(this.castManager!, this.auth!);
|
||||
castSendShowLovelaceView(this.castManager, this.auth.data.hassUrl, path);
|
||||
}
|
||||
@@ -241,28 +247,19 @@ class HcCast extends LitElement {
|
||||
|
||||
mwc-button ha-svg-icon {
|
||||
margin-right: 8px;
|
||||
margin-inline-end: 8px;
|
||||
margin-inline-start: initial;
|
||||
height: 18px;
|
||||
}
|
||||
|
||||
paper-listbox {
|
||||
padding-top: 0;
|
||||
}
|
||||
|
||||
paper-listbox ha-icon {
|
||||
ha-list-item ha-icon,
|
||||
ha-list-item ha-svg-icon {
|
||||
padding: 12px;
|
||||
color: var(--secondary-text-color);
|
||||
}
|
||||
|
||||
paper-icon-item {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
paper-icon-item[disabled] {
|
||||
cursor: initial;
|
||||
}
|
||||
|
||||
:host([hide-icons]) paper-icon-item {
|
||||
--paper-item-icon-width: 0px;
|
||||
:host([hide-icons]) ha-icon {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.spacer {
|
||||
|
@@ -1,19 +1,23 @@
|
||||
import "@material/mwc-button";
|
||||
import { mdiCastConnected, mdiCast } from "@mdi/js";
|
||||
import {
|
||||
import type {
|
||||
Auth,
|
||||
Connection,
|
||||
getAuthOptions,
|
||||
} from "home-assistant-js-websocket";
|
||||
import {
|
||||
createConnection,
|
||||
ERR_CANNOT_CONNECT,
|
||||
ERR_HASS_HOST_REQUIRED,
|
||||
ERR_INVALID_AUTH,
|
||||
ERR_INVALID_HTTPS_TO_HTTP,
|
||||
getAuth,
|
||||
getAuthOptions,
|
||||
} from "home-assistant-js-websocket";
|
||||
import { css, CSSResultGroup, html, LitElement, TemplateResult } from "lit";
|
||||
import type { CSSResultGroup, TemplateResult } from "lit";
|
||||
import { css, html, LitElement } from "lit";
|
||||
import { customElement, state } from "lit/decorators";
|
||||
import { CastManager, getCastManager } from "../../../../src/cast/cast_manager";
|
||||
import type { CastManager } from "../../../../src/cast/cast_manager";
|
||||
import { getCastManager } from "../../../../src/cast/cast_manager";
|
||||
import { castSendShowDemo } from "../../../../src/cast/receiver_messages";
|
||||
import {
|
||||
loadTokens,
|
||||
|
@@ -1,22 +1,19 @@
|
||||
import {
|
||||
Auth,
|
||||
Connection,
|
||||
getUser,
|
||||
HassUser,
|
||||
} from "home-assistant-js-websocket";
|
||||
import { css, CSSResultGroup, html, LitElement, TemplateResult } from "lit";
|
||||
import type { Auth, Connection, HassUser } from "home-assistant-js-websocket";
|
||||
import { getUser } from "home-assistant-js-websocket";
|
||||
import type { CSSResultGroup, TemplateResult } from "lit";
|
||||
import { css, html, LitElement } from "lit";
|
||||
import { customElement, property } from "lit/decorators";
|
||||
import "../../../../src/components/ha-card";
|
||||
|
||||
@customElement("hc-layout")
|
||||
class HcLayout extends LitElement {
|
||||
@property() public subtitle?: string | undefined;
|
||||
@property() public subtitle?: string;
|
||||
|
||||
@property() public auth?: Auth;
|
||||
@property({ attribute: false }) public auth?: Auth;
|
||||
|
||||
@property() public connection?: Connection;
|
||||
@property({ attribute: false }) public connection?: Connection;
|
||||
|
||||
@property() public user?: HassUser;
|
||||
@property({ attribute: false }) public user?: HassUser;
|
||||
|
||||
protected render(): TemplateResult {
|
||||
return html`
|
||||
@@ -88,7 +85,7 @@ class HcLayout extends LitElement {
|
||||
}
|
||||
|
||||
.card-header {
|
||||
color: var(--ha-card-header-color, --primary-text-color);
|
||||
color: var(--ha-card-header-color, var(--primary-text-color));
|
||||
font-family: var(--ha-card-header-font-family, inherit);
|
||||
font-size: var(--ha-card-header-font-size, 24px);
|
||||
letter-spacing: -0.012em;
|
||||
|
@@ -1,4 +1,5 @@
|
||||
import { convertEntities, Entity } from "../../../../src/fake_data/entity";
|
||||
import type { Entity } from "../../../../src/fake_data/entity";
|
||||
import { convertEntities } from "../../../../src/fake_data/entity";
|
||||
|
||||
export const castDemoEntities: () => Entity[] = () =>
|
||||
convertEntities({
|
||||
|
@@ -1,5 +1,5 @@
|
||||
import { LovelaceCardConfig } from "../../../../src/data/lovelace/config/card";
|
||||
import { LovelaceConfig } from "../../../../src/data/lovelace/config/types";
|
||||
import type { LovelaceCardConfig } from "../../../../src/data/lovelace/config/card";
|
||||
import type { LovelaceConfig } from "../../../../src/data/lovelace/config/types";
|
||||
import { castContext } from "../cast_context";
|
||||
|
||||
export const castDemoLovelace: () => LovelaceConfig = () => {
|
||||
|
@@ -1,10 +1,10 @@
|
||||
import { framework } from "./cast_framework";
|
||||
import { CAST_NS } from "../../../src/cast/const";
|
||||
import { HassMessage } from "../../../src/cast/receiver_messages";
|
||||
import type { HassMessage } from "../../../src/cast/receiver_messages";
|
||||
import "../../../src/resources/custom-card-support";
|
||||
import { castContext } from "./cast_context";
|
||||
import { HcMain } from "./layout/hc-main";
|
||||
import { ReceivedMessage } from "./types";
|
||||
import type { ReceivedMessage } from "./types";
|
||||
|
||||
const lovelaceController = new HcMain();
|
||||
document.body.append(lovelaceController);
|
||||
|
@@ -1,13 +1,11 @@
|
||||
import { html, nothing } from "lit";
|
||||
import { customElement, property, state } from "lit/decorators";
|
||||
import { mockHistory } from "../../../../demo/src/stubs/history";
|
||||
import { LovelaceConfig } from "../../../../src/data/lovelace/config/types";
|
||||
import {
|
||||
MockHomeAssistant,
|
||||
provideHass,
|
||||
} from "../../../../src/fake_data/provide_hass";
|
||||
import type { LovelaceConfig } from "../../../../src/data/lovelace/config/types";
|
||||
import type { MockHomeAssistant } from "../../../../src/fake_data/provide_hass";
|
||||
import { provideHass } from "../../../../src/fake_data/provide_hass";
|
||||
import { HassElement } from "../../../../src/state/hass-element";
|
||||
import { HomeAssistant } from "../../../../src/types";
|
||||
import type { HomeAssistant } from "../../../../src/types";
|
||||
import { castDemoEntities } from "../demo/cast-demo-entities";
|
||||
import { castDemoLovelace } from "../demo/cast-demo-lovelace";
|
||||
import "./hc-lovelace";
|
||||
|
@@ -1,6 +1,7 @@
|
||||
import { css, CSSResultGroup, html, LitElement, TemplateResult } from "lit";
|
||||
import type { CSSResultGroup, TemplateResult } from "lit";
|
||||
import { css, html, LitElement } from "lit";
|
||||
import { customElement, property } from "lit/decorators";
|
||||
import { HomeAssistant } from "../../../../src/types";
|
||||
import type { HomeAssistant } from "../../../../src/types";
|
||||
|
||||
@customElement("hc-launch-screen")
|
||||
class HcLaunchScreen extends LitElement {
|
||||
@@ -12,8 +13,8 @@ class HcLaunchScreen extends LitElement {
|
||||
return html`
|
||||
<div class="container">
|
||||
<img
|
||||
alt="Home Assistant logo on left, Nabu Casa logo on right, and red heart in center"
|
||||
src="https://www.home-assistant.io/images/blog/2018-09-thinking-big/social.png"
|
||||
alt="Nabu Casa logo on left, Home Assistant logo on right, and red heart in center"
|
||||
src="https://cast.home-assistant.io/images/nabu-loves-hass.png"
|
||||
/>
|
||||
<div class="status">
|
||||
${this.hass ? "Connected" : "Not Connected"}
|
||||
@@ -28,23 +29,23 @@ class HcLaunchScreen extends LitElement {
|
||||
:host {
|
||||
display: block;
|
||||
height: 100vh;
|
||||
padding-top: 64px;
|
||||
background-color: white;
|
||||
background-color: #f2f4f9;
|
||||
font-size: 24px;
|
||||
}
|
||||
.container {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
text-align: center;
|
||||
align-items: center;
|
||||
height: 100%;
|
||||
justify-content: space-evenly;
|
||||
}
|
||||
img {
|
||||
width: 717px;
|
||||
height: 376px;
|
||||
display: block;
|
||||
margin: 0 auto;
|
||||
max-width: 80%;
|
||||
object-fit: cover;
|
||||
}
|
||||
.status {
|
||||
padding-right: 54px;
|
||||
color: #1d2126;
|
||||
}
|
||||
`;
|
||||
}
|
||||
|
@@ -1,10 +1,18 @@
|
||||
import { css, CSSResultGroup, html, LitElement, TemplateResult } from "lit";
|
||||
import { customElement, property, query } from "lit/decorators";
|
||||
import {
|
||||
css,
|
||||
type CSSResultGroup,
|
||||
html,
|
||||
LitElement,
|
||||
type TemplateResult,
|
||||
} from "lit";
|
||||
import { customElement, property } from "lit/decorators";
|
||||
import { fireEvent } from "../../../../src/common/dom/fire_event";
|
||||
import { LovelaceConfig } from "../../../../src/data/lovelace/config/types";
|
||||
import { Lovelace } from "../../../../src/panels/lovelace/types";
|
||||
import type { LovelaceConfig } from "../../../../src/data/lovelace/config/types";
|
||||
import { getPanelTitleFromUrlPath } from "../../../../src/data/panel";
|
||||
import type { Lovelace } from "../../../../src/panels/lovelace/types";
|
||||
import "../../../../src/panels/lovelace/views/hui-view";
|
||||
import { HomeAssistant } from "../../../../src/types";
|
||||
import "../../../../src/panels/lovelace/views/hui-view-container";
|
||||
import type { HomeAssistant } from "../../../../src/types";
|
||||
import "./hc-launch-screen";
|
||||
|
||||
(window as any).loadCardHelpers = () =>
|
||||
@@ -17,12 +25,10 @@ class HcLovelace extends LitElement {
|
||||
@property({ attribute: false })
|
||||
public lovelaceConfig!: LovelaceConfig;
|
||||
|
||||
@property() public viewPath?: string | number;
|
||||
@property() public viewPath?: string | number | null;
|
||||
|
||||
@property() public urlPath: string | null = null;
|
||||
|
||||
@query("hui-view") private _huiView?: HTMLElement;
|
||||
|
||||
protected render(): TemplateResult {
|
||||
const index = this._viewIndex;
|
||||
if (index === undefined) {
|
||||
@@ -44,13 +50,24 @@ class HcLovelace extends LitElement {
|
||||
saveConfig: async () => undefined,
|
||||
deleteConfig: async () => undefined,
|
||||
setEditMode: () => undefined,
|
||||
showToast: () => undefined,
|
||||
};
|
||||
|
||||
const viewConfig = this.lovelaceConfig.views[index];
|
||||
const background = viewConfig.background || this.lovelaceConfig.background;
|
||||
|
||||
return html`
|
||||
<hui-view
|
||||
<hui-view-container
|
||||
.hass=${this.hass}
|
||||
.lovelace=${lovelace}
|
||||
.index=${index}
|
||||
></hui-view>
|
||||
.background=${background}
|
||||
.theme=${viewConfig.theme}
|
||||
>
|
||||
<hui-view
|
||||
.hass=${this.hass}
|
||||
.lovelace=${lovelace}
|
||||
.index=${index}
|
||||
></hui-view>
|
||||
</hui-view-container>
|
||||
`;
|
||||
}
|
||||
|
||||
@@ -61,7 +78,12 @@ class HcLovelace extends LitElement {
|
||||
const index = this._viewIndex;
|
||||
|
||||
if (index !== undefined) {
|
||||
const dashboardTitle = this.lovelaceConfig.title || this.urlPath;
|
||||
const title = getPanelTitleFromUrlPath(
|
||||
this.hass,
|
||||
this.urlPath || "lovelace"
|
||||
);
|
||||
|
||||
const dashboardTitle = title || this.urlPath;
|
||||
|
||||
const viewTitle =
|
||||
this.lovelaceConfig.views[index].title ||
|
||||
@@ -75,24 +97,14 @@ class HcLovelace extends LitElement {
|
||||
}${viewTitle || ""}`
|
||||
: undefined,
|
||||
});
|
||||
|
||||
const configBackground =
|
||||
this.lovelaceConfig.views[index].background ||
|
||||
this.lovelaceConfig.background;
|
||||
|
||||
if (configBackground) {
|
||||
this._huiView!.style.setProperty(
|
||||
"--lovelace-background",
|
||||
configBackground
|
||||
);
|
||||
} else {
|
||||
this._huiView!.style.removeProperty("--lovelace-background");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private get _viewIndex() {
|
||||
if (this.viewPath === null) {
|
||||
return 0;
|
||||
}
|
||||
const selectedView = this.viewPath;
|
||||
const selectedViewInt = parseInt(selectedView as string, 10);
|
||||
for (let i = 0; i < this.lovelaceConfig.views.length; i++) {
|
||||
@@ -108,19 +120,15 @@ class HcLovelace extends LitElement {
|
||||
|
||||
static get styles(): CSSResultGroup {
|
||||
return css`
|
||||
:host {
|
||||
min-height: 100vh;
|
||||
height: 0;
|
||||
hui-view-container {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
position: relative;
|
||||
min-height: 100vh;
|
||||
box-sizing: border-box;
|
||||
background: var(--primary-background-color);
|
||||
}
|
||||
:host > * {
|
||||
flex: 1;
|
||||
}
|
||||
hui-view {
|
||||
background: var(--lovelace-background, var(--primary-background-color));
|
||||
flex: 1 1 100%;
|
||||
max-width: 100%;
|
||||
}
|
||||
`;
|
||||
}
|
||||
|
@@ -1,40 +1,40 @@
|
||||
import {
|
||||
createConnection,
|
||||
getAuth,
|
||||
UnsubscribeFunc,
|
||||
} from "home-assistant-js-websocket";
|
||||
import { html, TemplateResult } from "lit";
|
||||
import type { UnsubscribeFunc } from "home-assistant-js-websocket";
|
||||
import { createConnection, getAuth } from "home-assistant-js-websocket";
|
||||
import type { TemplateResult } from "lit";
|
||||
import { html } from "lit";
|
||||
import { customElement, state } from "lit/decorators";
|
||||
import { CAST_NS } from "../../../../src/cast/const";
|
||||
import {
|
||||
import type {
|
||||
ConnectMessage,
|
||||
GetStatusMessage,
|
||||
HassMessage,
|
||||
ShowDemoMessage,
|
||||
ShowLovelaceViewMessage,
|
||||
} from "../../../../src/cast/receiver_messages";
|
||||
import {
|
||||
ReceiverErrorCode,
|
||||
import type {
|
||||
ReceiverErrorMessage,
|
||||
ReceiverStatusMessage,
|
||||
} from "../../../../src/cast/sender_messages";
|
||||
import { ReceiverErrorCode } from "../../../../src/cast/sender_messages";
|
||||
import { atLeastVersion } from "../../../../src/common/config/version";
|
||||
import { isNavigationClick } from "../../../../src/common/dom/is-navigation-click";
|
||||
import {
|
||||
getLegacyLovelaceCollection,
|
||||
getLovelaceCollection,
|
||||
} from "../../../../src/data/lovelace";
|
||||
import {
|
||||
isStrategyDashboard,
|
||||
import type {
|
||||
LegacyLovelaceConfig,
|
||||
LovelaceConfig,
|
||||
LovelaceDashboardStrategyConfig,
|
||||
} from "../../../../src/data/lovelace/config/types";
|
||||
import { isStrategyDashboard } from "../../../../src/data/lovelace/config/types";
|
||||
import { fetchResources } from "../../../../src/data/lovelace/resource";
|
||||
import { loadLovelaceResources } from "../../../../src/panels/lovelace/common/load-resources";
|
||||
import { HassElement } from "../../../../src/state/hass-element";
|
||||
import { castContext } from "../cast_context";
|
||||
import "./hc-launch-screen";
|
||||
import { getPanelTitleFromUrlPath } from "../../../../src/data/panel";
|
||||
import { checkLovelaceConfig } from "../../../../src/panels/lovelace/common/check-lovelace-config";
|
||||
|
||||
const DEFAULT_CONFIG: LovelaceDashboardStrategyConfig = {
|
||||
strategy: {
|
||||
@@ -51,10 +51,10 @@ export class HcMain extends HassElement {
|
||||
|
||||
@state() private _lovelacePath: string | number | null = null;
|
||||
|
||||
@state() private _error?: string;
|
||||
|
||||
@state() private _urlPath?: string | null;
|
||||
|
||||
@state() private _error?: string;
|
||||
|
||||
private _hassUUID?: string;
|
||||
|
||||
private _unsubLovelace?: UnsubscribeFunc;
|
||||
@@ -81,7 +81,7 @@ export class HcMain extends HassElement {
|
||||
|
||||
if (
|
||||
!this._lovelaceConfig ||
|
||||
this._lovelacePath === null ||
|
||||
this._urlPath === undefined ||
|
||||
// Guard against part of HA not being loaded yet.
|
||||
!this.hass ||
|
||||
!this.hass.states ||
|
||||
@@ -99,8 +99,8 @@ export class HcMain extends HassElement {
|
||||
<hc-lovelace
|
||||
.hass=${this.hass}
|
||||
.lovelaceConfig=${this._lovelaceConfig}
|
||||
.viewPath=${this._lovelacePath}
|
||||
.urlPath=${this._urlPath}
|
||||
.viewPath=${this._lovelacePath}
|
||||
@config-refresh=${this._generateDefaultLovelaceConfig}
|
||||
></hc-lovelace>
|
||||
`;
|
||||
@@ -205,7 +205,6 @@ export class HcMain extends HassElement {
|
||||
expires_in: 0,
|
||||
}),
|
||||
});
|
||||
this._hassUUID = msg.hassUUID;
|
||||
} catch (err: any) {
|
||||
const errorMessage = this._getErrorMessage(err);
|
||||
this._error = errorMessage;
|
||||
@@ -225,6 +224,17 @@ export class HcMain extends HassElement {
|
||||
this.hass.connection.close();
|
||||
}
|
||||
this.initializeHass(auth, connection);
|
||||
if (this._hassUUID !== msg.hassUUID) {
|
||||
this._hassUUID = msg.hassUUID;
|
||||
this._lovelaceConfig = undefined;
|
||||
this._urlPath = undefined;
|
||||
this._lovelacePath = null;
|
||||
if (this._unsubLovelace) {
|
||||
this._unsubLovelace();
|
||||
this._unsubLovelace = undefined;
|
||||
}
|
||||
resourcesLoaded = false;
|
||||
}
|
||||
this._error = undefined;
|
||||
this._sendStatus();
|
||||
}
|
||||
@@ -233,7 +243,7 @@ export class HcMain extends HassElement {
|
||||
this._showDemo = false;
|
||||
// We should not get this command before we are connected.
|
||||
// Means a client got out of sync. Let's send status to them.
|
||||
if (!this.hass) {
|
||||
if (!this.hass?.connected) {
|
||||
this._sendStatus(msg.senderId!);
|
||||
this._error = "Cannot show Lovelace because we're not connected.";
|
||||
this._sendError(
|
||||
@@ -260,7 +270,7 @@ export class HcMain extends HassElement {
|
||||
}
|
||||
|
||||
this._error = undefined;
|
||||
if (msg.urlPath === "lovelace") {
|
||||
if (msg.urlPath === "lovelace" || msg.urlPath === undefined) {
|
||||
msg.urlPath = null;
|
||||
}
|
||||
this._lovelacePath = msg.viewPath;
|
||||
@@ -275,7 +285,7 @@ export class HcMain extends HassElement {
|
||||
],
|
||||
};
|
||||
this._urlPath = "energy";
|
||||
this._lovelacePath = 0;
|
||||
this._lovelacePath = null;
|
||||
this._sendStatus();
|
||||
return;
|
||||
}
|
||||
@@ -284,6 +294,7 @@ export class HcMain extends HassElement {
|
||||
this._lovelaceConfig = undefined;
|
||||
if (this._unsubLovelace) {
|
||||
this._unsubLovelace();
|
||||
this._unsubLovelace = undefined;
|
||||
}
|
||||
const llColl = atLeastVersion(this.hass.connection.haVersion, 0, 107)
|
||||
? getLovelaceCollection(this.hass.connection, msg.urlPath)
|
||||
@@ -348,8 +359,14 @@ export class HcMain extends HassElement {
|
||||
}
|
||||
|
||||
private _handleNewLovelaceConfig(lovelaceConfig: LovelaceConfig) {
|
||||
castContext.setApplicationState(lovelaceConfig.title || "");
|
||||
this._lovelaceConfig = lovelaceConfig;
|
||||
const title = getPanelTitleFromUrlPath(
|
||||
this.hass!,
|
||||
this._urlPath || "lovelace"
|
||||
);
|
||||
castContext.setApplicationState(title || "");
|
||||
this._lovelaceConfig = checkLovelaceConfig(
|
||||
lovelaceConfig
|
||||
) as LovelaceConfig;
|
||||
}
|
||||
|
||||
private _handleShowDemo(_msg: ShowDemoMessage) {
|
||||
|
BIN
demo/public/assets/sections/images/media_player_family_room.jpg
Normal file
BIN
demo/public/assets/sections/images/media_player_family_room.jpg
Normal file
Binary file not shown.
After Width: | Height: | Size: 30 KiB |
5
demo/public/sw-legacy.js
Normal file
5
demo/public/sw-legacy.js
Normal file
@@ -0,0 +1,5 @@
|
||||
"use strict";
|
||||
|
||||
self.addEventListener("fetch", (event) => {
|
||||
event.respondWith(fetch(event.request));
|
||||
});
|
@@ -1,10 +0,0 @@
|
||||
import rollup from "../build-scripts/rollup.cjs";
|
||||
import env from "../build-scripts/env.cjs";
|
||||
|
||||
const config = rollup.createDemoConfig({
|
||||
isProdBuild: env.isProdBuild(),
|
||||
latestBuild: true,
|
||||
isStatsBuild: env.isStatsBuild(),
|
||||
});
|
||||
|
||||
export default { ...config.inputOptions, output: config.outputOptions };
|
@@ -1,5 +1,5 @@
|
||||
import { convertEntities } from "../../../../src/fake_data/entity";
|
||||
import { DemoConfig } from "../types";
|
||||
import type { DemoConfig } from "../types";
|
||||
|
||||
export const demoEntitiesArsaboo: DemoConfig["entities"] = (localize) =>
|
||||
convertEntities({
|
||||
|
@@ -1,4 +1,4 @@
|
||||
import { DemoConfig } from "../types";
|
||||
import type { DemoConfig } from "../types";
|
||||
import { demoEntitiesArsaboo } from "./entities";
|
||||
import { demoLovelaceArsaboo } from "./lovelace";
|
||||
import { demoThemeArsaboo } from "./theme";
|
||||
|
@@ -1,4 +1,4 @@
|
||||
import { DemoConfig } from "../types";
|
||||
import type { DemoConfig } from "../types";
|
||||
|
||||
export const demoLovelaceArsaboo: DemoConfig["lovelace"] = (localize) => ({
|
||||
title: "Home Assistant",
|
||||
|
@@ -1,9 +1,10 @@
|
||||
import { MockHomeAssistant } from "../../../src/fake_data/provide_hass";
|
||||
import { Lovelace } from "../../../src/panels/lovelace/types";
|
||||
import type { MockHomeAssistant } from "../../../src/fake_data/provide_hass";
|
||||
import type { Lovelace } from "../../../src/panels/lovelace/types";
|
||||
import { energyEntities } from "../stubs/entities";
|
||||
import { DemoConfig } from "./types";
|
||||
import type { DemoConfig } from "./types";
|
||||
|
||||
export const demoConfigs: Array<() => Promise<DemoConfig>> = [
|
||||
() => import("./sections").then((mod) => mod.demoSections),
|
||||
() => import("./arsaboo").then((mod) => mod.demoArsaboo),
|
||||
() => import("./teachingbirds").then((mod) => mod.demoTeachingbirds),
|
||||
() => import("./kernehed").then((mod) => mod.demoKernehed),
|
||||
|
@@ -1,5 +1,5 @@
|
||||
import { convertEntities } from "../../../../src/fake_data/entity";
|
||||
import { DemoConfig } from "../types";
|
||||
import type { DemoConfig } from "../types";
|
||||
|
||||
export const demoEntitiesJimpower: DemoConfig["entities"] = () =>
|
||||
convertEntities({
|
||||
|
@@ -1,4 +1,4 @@
|
||||
import { DemoConfig } from "../types";
|
||||
import type { DemoConfig } from "../types";
|
||||
import { demoEntitiesJimpower } from "./entities";
|
||||
import { demoLovelaceJimpower } from "./lovelace";
|
||||
import { demoThemeJimpower } from "./theme";
|
||||
|
@@ -1,5 +1,5 @@
|
||||
import "../../custom-cards/card-modder";
|
||||
import { DemoConfig } from "../types";
|
||||
import type { DemoConfig } from "../types";
|
||||
|
||||
export const demoLovelaceJimpower: DemoConfig["lovelace"] = () => ({
|
||||
name: "Kingia Castle",
|
||||
|
@@ -1,5 +1,5 @@
|
||||
import { convertEntities } from "../../../../src/fake_data/entity";
|
||||
import { DemoConfig } from "../types";
|
||||
import type { DemoConfig } from "../types";
|
||||
|
||||
export const demoEntitiesKernehed: DemoConfig["entities"] = () =>
|
||||
convertEntities({
|
||||
|
@@ -1,4 +1,4 @@
|
||||
import { DemoConfig } from "../types";
|
||||
import type { DemoConfig } from "../types";
|
||||
import { demoEntitiesKernehed } from "./entities";
|
||||
import { demoLovelaceKernehed } from "./lovelace";
|
||||
import { demoThemeKernehed } from "./theme";
|
||||
|
@@ -1,4 +1,4 @@
|
||||
import { DemoConfig } from "../types";
|
||||
import type { DemoConfig } from "../types";
|
||||
|
||||
export const demoLovelaceKernehed: DemoConfig["lovelace"] = () => ({
|
||||
name: "Hem",
|
||||
|
586
demo/src/configs/sections/entities.ts
Normal file
586
demo/src/configs/sections/entities.ts
Normal file
@@ -0,0 +1,586 @@
|
||||
import { convertEntities } from "../../../../src/fake_data/entity";
|
||||
import type { DemoConfig } from "../types";
|
||||
|
||||
export const demoEntitiesSections: DemoConfig["entities"] = (localize) =>
|
||||
convertEntities({
|
||||
"cover.living_room_garden_shutter": {
|
||||
entity_id: "cover.living_room_garden_shutter",
|
||||
state: "open",
|
||||
attributes: {
|
||||
current_position: 100,
|
||||
device_class: "shutter",
|
||||
friendly_name: "Living room garden shutter",
|
||||
supported_features: 15,
|
||||
},
|
||||
},
|
||||
"cover.living_room_graveyard_shutter": {
|
||||
entity_id: "cover.living_room_graveyard_shutter",
|
||||
state: "open",
|
||||
attributes: {
|
||||
current_position: 100,
|
||||
device_class: "shutter",
|
||||
friendly_name: "Living room graveyard shutter",
|
||||
supported_features: 15,
|
||||
},
|
||||
},
|
||||
"cover.living_room_left_shutter": {
|
||||
entity_id: "cover.living_room_left_shutter",
|
||||
state: "open",
|
||||
attributes: {
|
||||
current_position: 100,
|
||||
device_class: "shutter",
|
||||
friendly_name: "Living room left shutter",
|
||||
supported_features: 15,
|
||||
},
|
||||
},
|
||||
"cover.living_room_right_shutter": {
|
||||
entity_id: "cover.living_room_right_shutter",
|
||||
state: "open",
|
||||
attributes: {
|
||||
current_position: 100,
|
||||
device_class: "shutter",
|
||||
friendly_name: "Living room right shutter",
|
||||
supported_features: 15,
|
||||
},
|
||||
},
|
||||
"light.floor_lamp": {
|
||||
entity_id: "light.floor_lamp",
|
||||
state: "on",
|
||||
attributes: {
|
||||
min_color_temp_kelvin: 2000,
|
||||
max_color_temp_kelvin: 6535,
|
||||
min_mireds: 153,
|
||||
max_mireds: 500,
|
||||
supported_color_modes: ["color_temp", "xy"],
|
||||
color_mode: "color_temp",
|
||||
brightness: 178,
|
||||
color_temp_kelvin: 2583,
|
||||
color_temp: 387,
|
||||
hs_color: [28.664, 69.597],
|
||||
rgb_color: [255, 162, 77],
|
||||
xy_color: [0.538, 0.389],
|
||||
icon: "mdi:floor-lamp",
|
||||
friendly_name: "Floor lamp",
|
||||
supported_features: 44,
|
||||
},
|
||||
},
|
||||
"light.living_room_spotlights": {
|
||||
entity_id: "light.living_room_spotlights",
|
||||
state: "on",
|
||||
attributes: {
|
||||
supported_color_modes: ["brightness"],
|
||||
color_mode: "brightness",
|
||||
brightness: 126,
|
||||
icon: "mdi:ceiling-light-multiple",
|
||||
friendly_name: "Living room spotlights",
|
||||
supported_features: 32,
|
||||
},
|
||||
},
|
||||
"light.bar_lamp": {
|
||||
entity_id: "light.bar_lamp",
|
||||
state: "on",
|
||||
attributes: {
|
||||
min_color_temp_kelvin: 2202,
|
||||
max_color_temp_kelvin: 4504,
|
||||
min_mireds: 222,
|
||||
max_mireds: 454,
|
||||
effect_list: ["None", "candle"],
|
||||
supported_color_modes: ["color_temp"],
|
||||
effect: null,
|
||||
color_mode: null,
|
||||
brightness: null,
|
||||
color_temp_kelvin: null,
|
||||
color_temp: null,
|
||||
hs_color: null,
|
||||
rgb_color: null,
|
||||
xy_color: null,
|
||||
mode: "normal",
|
||||
dynamics: "none",
|
||||
icon: "mdi:lightbulb-variant",
|
||||
friendly_name: "Bar lamp",
|
||||
supported_features: 44,
|
||||
},
|
||||
},
|
||||
"sensor.living_room_temperature": {
|
||||
entity_id: "sensor.living_room_temperature",
|
||||
state: "22.8",
|
||||
attributes: {
|
||||
state_class: "measurement",
|
||||
unit_of_measurement: "°C",
|
||||
device_class: "temperature",
|
||||
friendly_name: "Living room Temperature",
|
||||
},
|
||||
},
|
||||
"sensor.living_room_humidity": {
|
||||
entity_id: "sensor.living_room_humidity",
|
||||
state: "57",
|
||||
attributes: {
|
||||
state_class: "measurement",
|
||||
unit_of_measurement: "%",
|
||||
device_class: "humidity",
|
||||
friendly_name: "Living room Humidity",
|
||||
},
|
||||
},
|
||||
"sensor.outdoor_temperature": {
|
||||
entity_id: "sensor.outdoor_temperature",
|
||||
state: "10.5",
|
||||
attributes: {
|
||||
state_class: "measurement",
|
||||
unit_of_measurement: "°C",
|
||||
device_class: "temperature",
|
||||
friendly_name: "Outdoor temperature",
|
||||
},
|
||||
},
|
||||
"sensor.outdoor_humidity": {
|
||||
entity_id: "sensor.outdoor_humidity",
|
||||
state: "70.4",
|
||||
attributes: {
|
||||
state_class: "measurement",
|
||||
unit_of_measurement: "%",
|
||||
device_class: "humidity",
|
||||
friendly_name: "Outdoor humidity",
|
||||
},
|
||||
},
|
||||
"device_tracker.car": {
|
||||
entity_id: "sensor.outdoor_humidity",
|
||||
state: "not_home",
|
||||
attributes: {
|
||||
friendly_name: "Car",
|
||||
icon: "mdi:car",
|
||||
},
|
||||
},
|
||||
"media_player.living_room_nest_mini": {
|
||||
entity_id: "media_player.living_room_nest_mini",
|
||||
state: "playing",
|
||||
attributes: {
|
||||
device_class: "speaker",
|
||||
volume_level: 0.18,
|
||||
is_volume_muted: false,
|
||||
media_content_type: "music",
|
||||
media_duration: 300,
|
||||
media_position: 0,
|
||||
media_position_updated_at: new Date(
|
||||
// 23 seconds in
|
||||
new Date().getTime() - 23000
|
||||
).toISOString(),
|
||||
media_title: "I Wasn't Born To Follow",
|
||||
media_artist: "The Byrds",
|
||||
media_album_name: "The Notorious Byrd Brothers",
|
||||
source_list: ["It's A Party", "Radio HSL", "Retro 70s and 80s"],
|
||||
shuffle: false,
|
||||
night_sound: false,
|
||||
speech_enhance: false,
|
||||
friendly_name: localize(
|
||||
"ui.panel.page-demo.config.sections.entities.media_player.living_room_nest_mini"
|
||||
),
|
||||
entity_picture: "/assets/sections/images/media_player_family_room.jpg",
|
||||
supported_features: 64063,
|
||||
},
|
||||
},
|
||||
"cover.kitchen_shutter": {
|
||||
entity_id: "cover.kitchen_shutter",
|
||||
state: "open",
|
||||
attributes: {
|
||||
current_position: 100,
|
||||
device_class: "shutter",
|
||||
friendly_name: "Kitchen shutter ",
|
||||
supported_features: 15,
|
||||
},
|
||||
},
|
||||
"light.kitchen_spotlights": {
|
||||
entity_id: "light.kitchen_spotlights",
|
||||
state: "off",
|
||||
attributes: {
|
||||
supported_color_modes: ["brightness"],
|
||||
color_mode: null,
|
||||
brightness: null,
|
||||
icon: "mdi:ceiling-light-multiple",
|
||||
friendly_name: "Kitchen spotlights ",
|
||||
supported_features: 32,
|
||||
},
|
||||
},
|
||||
"binary_sensor.kitchen_motion": {
|
||||
entity_id: "light.kitchen_motion",
|
||||
state: "on",
|
||||
attributes: {
|
||||
device_class: "motion",
|
||||
friendly_name: "Kitchen motion",
|
||||
},
|
||||
},
|
||||
"light.worktop_spotlights": {
|
||||
entity_id: "light.worktop_spotlights",
|
||||
state: "off",
|
||||
attributes: {
|
||||
supported_color_modes: ["brightness"],
|
||||
color_mode: null,
|
||||
brightness: null,
|
||||
icon: "mdi:ceiling-light-multiple",
|
||||
friendly_name: "Worktop spotlights ",
|
||||
supported_features: 32,
|
||||
},
|
||||
},
|
||||
"binary_sensor.fridge_door": {
|
||||
entity_id: "binary_sensor.fridge_door",
|
||||
state: "off",
|
||||
attributes: {
|
||||
device_class: "door",
|
||||
icon: "mdi:fridge",
|
||||
friendly_name: "Fridge door",
|
||||
},
|
||||
},
|
||||
"media_player.kitchen_nest_audio": {
|
||||
entity_id: "media_player.kitchen_nest_audio",
|
||||
state: "on",
|
||||
attributes: {
|
||||
device_class: "speaker",
|
||||
volume_level: 0.18,
|
||||
is_volume_muted: false,
|
||||
media_content_type: "music",
|
||||
media_duration: 300,
|
||||
media_position: 0,
|
||||
media_position_updated_at: new Date(
|
||||
// 23 seconds in
|
||||
new Date().getTime() - 23000
|
||||
).toISOString(),
|
||||
media_title: "I Wasn't Born To Follow",
|
||||
media_artist: "The Byrds",
|
||||
media_album_name: "The Notorious Byrd Brothers",
|
||||
source_list: ["It's A Party", "Radio HSL", "Retro 70s and 80s"],
|
||||
shuffle: false,
|
||||
night_sound: false,
|
||||
speech_enhance: false,
|
||||
friendly_name: localize(
|
||||
"ui.panel.page-demo.config.sections.entities.media_player.kitchen_nest_audio"
|
||||
),
|
||||
entity_picture: "/assets/sections/images/media_player_family_room.jpg",
|
||||
supported_features: 64063,
|
||||
},
|
||||
},
|
||||
"binary_sensor.tesla_wall_connector_vehicle_connected": {
|
||||
entity_id: "binary_sensor.tesla_wall_connector_vehicle_connected",
|
||||
state: "off",
|
||||
attributes: {
|
||||
device_class: "plug",
|
||||
friendly_name: "Wall Connector Vehicle connected",
|
||||
},
|
||||
},
|
||||
"sensor.tesla_wall_connector_session_energy": {
|
||||
entity_id: "sensor.tesla_wall_connector_session_energy",
|
||||
state: "16.3",
|
||||
attributes: {
|
||||
state_class: "total_increasing",
|
||||
unit_of_measurement: "kWh",
|
||||
device_class: "energy",
|
||||
friendly_name: "Tesla Wall Connector Session energy",
|
||||
},
|
||||
},
|
||||
"sensor.electric_meter_power": {
|
||||
entity_id: "sensor.electric_meter_power",
|
||||
state: "797.86",
|
||||
attributes: {
|
||||
state_class: "measurement",
|
||||
unit_of_measurement: "W",
|
||||
device_class: "power",
|
||||
icon: "mdi:meter-electric",
|
||||
friendly_name: "Electric meter Power",
|
||||
},
|
||||
},
|
||||
"sensor.eletric_meter_voltage": {
|
||||
entity_id: "sensor.eletric_meter_voltage",
|
||||
state: "232.19",
|
||||
attributes: {
|
||||
state_class: "measurement",
|
||||
unit_of_measurement: "V",
|
||||
device_class: "voltage",
|
||||
friendly_name: "Electric meter voltage",
|
||||
},
|
||||
},
|
||||
"sensor.electricity_maps_grid_fossil_fuel_percentage": {
|
||||
entity_id: "sensor.electricity_maps_grid_fossil_fuel_percentage",
|
||||
state: "9.84",
|
||||
attributes: {
|
||||
state_class: "measurement",
|
||||
country_code: "FR",
|
||||
unit_of_measurement: "%",
|
||||
attribution: "Data provided by Electricity Maps",
|
||||
icon: "mdi:barrel",
|
||||
friendly_name: "Electricity Maps Grid fossil fuel percentage",
|
||||
},
|
||||
},
|
||||
"sensor.electricity_maps_co2_intensity": {
|
||||
entity_id: "sensor.electricity_maps_co2_intensity",
|
||||
state: "62.0",
|
||||
attributes: {
|
||||
state_class: "measurement",
|
||||
country_code: "FR",
|
||||
unit_of_measurement: "gCO2eq/kWh",
|
||||
attribution: "Data provided by Electricity Maps",
|
||||
friendly_name: "Electricity Maps CO2 intensity",
|
||||
icon: "mdi:molecule-co2",
|
||||
},
|
||||
},
|
||||
"sun.sun": {
|
||||
entity_id: "sun.sun",
|
||||
state: "above_horizon",
|
||||
attributes: {
|
||||
next_dawn: "2024-03-05T05:50:21.964405+00:00",
|
||||
next_dusk: "2024-03-04T18:08:54.311334+00:00",
|
||||
next_midnight: "2024-03-05T00:00:00+00:00",
|
||||
next_noon: "2024-03-05T12:00:05+00:00",
|
||||
next_rising: "2024-03-05T06:23:42.739159+00:00",
|
||||
next_setting: "2024-03-04T17:35:26.271171+00:00",
|
||||
elevation: 30.38,
|
||||
azimuth: 204.42,
|
||||
rising: false,
|
||||
friendly_name: "Sun",
|
||||
},
|
||||
},
|
||||
"sensor.rain": {
|
||||
entity_id: "sensor.moon_phase",
|
||||
state: "7.2",
|
||||
attributes: {
|
||||
state_class: "total_increasing",
|
||||
unit_of_measurement: "mm",
|
||||
device_class: "precipitation",
|
||||
friendly_name: "Rain",
|
||||
},
|
||||
},
|
||||
"climate.ground_floor": {
|
||||
entity_id: "climate.ground_floor",
|
||||
state: "heat",
|
||||
attributes: {
|
||||
hvac_modes: ["auto", "heat", "off"],
|
||||
min_temp: 7,
|
||||
max_temp: 35,
|
||||
preset_modes: [
|
||||
"comfort",
|
||||
"away",
|
||||
"eco",
|
||||
"frost_protection",
|
||||
"external",
|
||||
"home",
|
||||
],
|
||||
current_temperature: 20.8,
|
||||
temperature: 21,
|
||||
preset_mode: "comfort",
|
||||
icon: "mdi:home-floor-0",
|
||||
friendly_name: "Ground floor Thermostat",
|
||||
supported_features: 401,
|
||||
},
|
||||
},
|
||||
"climate.first_floor": {
|
||||
entity_id: "climate.first_floor",
|
||||
state: "heat",
|
||||
attributes: {
|
||||
hvac_modes: ["auto", "heat", "off"],
|
||||
min_temp: 7,
|
||||
max_temp: 35,
|
||||
preset_modes: [
|
||||
"comfort",
|
||||
"away",
|
||||
"eco",
|
||||
"frost_protection",
|
||||
"external",
|
||||
"home",
|
||||
],
|
||||
current_temperature: 21.7,
|
||||
temperature: 21,
|
||||
preset_mode: "comfort",
|
||||
icon: "mdi:home-floor-1",
|
||||
friendly_name: "First floor Thermostat",
|
||||
supported_features: 401,
|
||||
},
|
||||
},
|
||||
"cover.study_shutter": {
|
||||
entity_id: "cover.study_shutter",
|
||||
state: "open",
|
||||
attributes: {
|
||||
current_position: 100,
|
||||
device_class: "shutter",
|
||||
friendly_name: "Study shutter",
|
||||
supported_features: 15,
|
||||
},
|
||||
},
|
||||
"light.study_spotlights": {
|
||||
entity_id: "light.study_spotlights",
|
||||
state: "off",
|
||||
attributes: {
|
||||
supported_color_modes: ["brightness"],
|
||||
color_mode: null,
|
||||
brightness: null,
|
||||
icon: "mdi:ceiling-light-multiple",
|
||||
friendly_name: "Study spotlights",
|
||||
supported_features: 32,
|
||||
},
|
||||
},
|
||||
"media_player.study_nest_hub": {
|
||||
entity_id: "media_player.study_nest_hub",
|
||||
state: "off",
|
||||
attributes: {
|
||||
device_class: "speaker",
|
||||
volume_level: 0.18,
|
||||
is_volume_muted: false,
|
||||
media_content_type: "music",
|
||||
media_duration: 300,
|
||||
media_position: 0,
|
||||
media_position_updated_at: new Date(
|
||||
// 23 seconds in
|
||||
new Date().getTime() - 23000
|
||||
).toISOString(),
|
||||
media_title: "I Wasn't Born To Follow",
|
||||
media_artist: "The Byrds",
|
||||
media_album_name: "The Notorious Byrd Brothers",
|
||||
source_list: ["It's A Party", "Radio HSL", "Retro 70s and 80s"],
|
||||
shuffle: false,
|
||||
night_sound: false,
|
||||
speech_enhance: false,
|
||||
friendly_name: localize(
|
||||
"ui.panel.page-demo.config.sections.entities.media_player.study_nest_hub"
|
||||
),
|
||||
entity_picture: "/assets/sections/images/media_player_family_room.jpg",
|
||||
supported_features: 64063,
|
||||
},
|
||||
},
|
||||
"switch.in_meeting": {
|
||||
entity_id: "switch.in_meeting",
|
||||
state: "on",
|
||||
attributes: {
|
||||
icon: "mdi:laptop-account",
|
||||
friendly_name: "In a meeting",
|
||||
},
|
||||
},
|
||||
"sensor.standing_desk_height": {
|
||||
entity_id: "sensor.standing_desk_height",
|
||||
state: "72",
|
||||
attributes: {
|
||||
unit_of_measurement: "cm",
|
||||
icon: "mdi:tape-measure",
|
||||
friendly_name: "Standing desk Height",
|
||||
},
|
||||
},
|
||||
"light.outdoor_light": {
|
||||
entity_id: "light.outdoor_light",
|
||||
state: "on",
|
||||
attributes: {
|
||||
supported_color_modes: ["brightness"],
|
||||
color_mode: null,
|
||||
brightness: 255,
|
||||
icon: "mdi:outdoor-lamp",
|
||||
friendly_name: "Outdoor light",
|
||||
supported_features: 32,
|
||||
},
|
||||
},
|
||||
"light.flood_light": {
|
||||
entity_id: "light.flood_light",
|
||||
state: "off",
|
||||
attributes: {
|
||||
effect_list: ["None", "candle"],
|
||||
supported_color_modes: ["brightness"],
|
||||
effect: null,
|
||||
color_mode: null,
|
||||
brightness: null,
|
||||
mode: "normal",
|
||||
dynamics: "none",
|
||||
icon: "mdi:light-flood-down",
|
||||
friendly_name: "Flood light",
|
||||
supported_features: 44,
|
||||
},
|
||||
},
|
||||
"sensor.outdoor_motion_sensor_temperature": {
|
||||
entity_id: "sensor.outdoor_motion_sensor_temperature",
|
||||
state: "10.2",
|
||||
attributes: {
|
||||
state_class: "measurement",
|
||||
unit_of_measurement: "°C",
|
||||
device_class: "temperature",
|
||||
friendly_name: "Outdoor motion sensor Temperature",
|
||||
},
|
||||
},
|
||||
"binary_sensor.outdoor_motion_sensor_motion": {
|
||||
entity_id: "binary_sensor.outdoor_motion_sensor_motion",
|
||||
state: "off",
|
||||
attributes: {
|
||||
device_class: "motion",
|
||||
friendly_name: "Outdoor motion sensor Motion",
|
||||
},
|
||||
},
|
||||
"sensor.outdoor_motion_sensor_illuminance": {
|
||||
entity_id: "sensor.outdoor_motion_sensor_illuminance",
|
||||
state: "555",
|
||||
attributes: {
|
||||
state_class: "measurement",
|
||||
light_level: 27444,
|
||||
unit_of_measurement: "lx",
|
||||
device_class: "illuminance",
|
||||
friendly_name: "Outdoor motion sensor Illuminance",
|
||||
},
|
||||
},
|
||||
"automation.home_assistant_auto_update": {
|
||||
entity_id: "automation.home_assistant_auto_update",
|
||||
state: "off",
|
||||
attributes: {
|
||||
id: "1700669321947",
|
||||
last_triggered: "2024-02-29T18:02:05.343139+00:00",
|
||||
mode: "queued",
|
||||
current: 0,
|
||||
max: 50,
|
||||
icon: "mdi:auto-mode",
|
||||
friendly_name: "Home Assistant Auto-update",
|
||||
},
|
||||
},
|
||||
"update.home_assistant_operating_system_update": {
|
||||
entity_id: "update.home_assistant_operating_system_update",
|
||||
state: "off",
|
||||
attributes: {
|
||||
auto_update: false,
|
||||
installed_version: "12.1",
|
||||
in_progress: false,
|
||||
latest_version: "12.1",
|
||||
release_summary: null,
|
||||
release_url:
|
||||
"https://github.com/home-assistant/operating-system/commits/dev",
|
||||
skipped_version: null,
|
||||
title: "Home Assistant Operating System",
|
||||
entity_picture:
|
||||
"https://brands.home-assistant.io/homeassistant/icon.png",
|
||||
friendly_name: "Home Assistant Operating System Update",
|
||||
supported_features: 3,
|
||||
},
|
||||
},
|
||||
"update.home_assistant_supervisor_update": {
|
||||
entity_id: "update.home_assistant_supervisor_update",
|
||||
state: "off",
|
||||
attributes: {
|
||||
auto_update: true,
|
||||
installed_version: "2024.02.2",
|
||||
in_progress: false,
|
||||
latest_version: "2024.02.2",
|
||||
release_summary: null,
|
||||
release_url:
|
||||
"https://github.com/home-assistant/supervisor/commits/main",
|
||||
skipped_version: null,
|
||||
title: "Home Assistant Supervisor",
|
||||
entity_picture: "https://brands.home-assistant.io/hassio/icon.png",
|
||||
friendly_name: "Home Assistant Supervisor Update",
|
||||
supported_features: 1,
|
||||
},
|
||||
},
|
||||
"update.home_assistant_core_update": {
|
||||
entity_id: "update.home_assistant_supervisor_update",
|
||||
state: "off",
|
||||
attributes: {
|
||||
auto_update: false,
|
||||
installed_version: "2024.4.0",
|
||||
in_progress: false,
|
||||
latest_version: "2024.4.0",
|
||||
release_summary: null,
|
||||
release_url: "https://github.com/home-assistant/core/commits/dev",
|
||||
skipped_version: null,
|
||||
title: "Home Assistant Core",
|
||||
entity_picture:
|
||||
"https://brands.home-assistant.io/homeassistant/icon.png",
|
||||
friendly_name: "Home Assistant Core Update",
|
||||
supported_features: 11,
|
||||
},
|
||||
},
|
||||
});
|
12
demo/src/configs/sections/index.ts
Normal file
12
demo/src/configs/sections/index.ts
Normal file
@@ -0,0 +1,12 @@
|
||||
import type { DemoConfig } from "../types";
|
||||
import { demoEntitiesSections } from "./entities";
|
||||
import { demoLovelaceSections } from "./lovelace";
|
||||
|
||||
export const demoSections: DemoConfig = {
|
||||
authorName: "Home Assistant",
|
||||
authorUrl: "https://github.com/home-assistant/frontend/",
|
||||
name: "Home Demo",
|
||||
lovelace: demoLovelaceSections,
|
||||
entities: demoEntitiesSections,
|
||||
theme: () => ({}),
|
||||
};
|
365
demo/src/configs/sections/lovelace.ts
Normal file
365
demo/src/configs/sections/lovelace.ts
Normal file
@@ -0,0 +1,365 @@
|
||||
import { isFrontpageEmbed } from "../../util/is_frontpage";
|
||||
import type { DemoConfig } from "../types";
|
||||
|
||||
export const demoLovelaceSections: DemoConfig["lovelace"] = (localize) => ({
|
||||
title: "Home Assistant Demo",
|
||||
views: [
|
||||
{
|
||||
type: "sections",
|
||||
title: isFrontpageEmbed ? "Home Assistant" : "Demo",
|
||||
path: "home",
|
||||
icon: "mdi:home-assistant",
|
||||
badges: [
|
||||
{
|
||||
type: "entity",
|
||||
entity: "sensor.outdoor_temperature",
|
||||
color: "red",
|
||||
},
|
||||
{
|
||||
type: "entity",
|
||||
entity: "sensor.outdoor_humidity",
|
||||
color: "indigo",
|
||||
},
|
||||
{
|
||||
type: "entity",
|
||||
entity: "device_tracker.car",
|
||||
},
|
||||
],
|
||||
sections: [
|
||||
...(isFrontpageEmbed
|
||||
? []
|
||||
: [
|
||||
{
|
||||
cards: [
|
||||
{
|
||||
type: "heading",
|
||||
heading: `${localize("ui.panel.page-demo.config.sections.titles.welcome")} 👋`,
|
||||
},
|
||||
{ type: "custom:ha-demo-card" },
|
||||
],
|
||||
},
|
||||
]),
|
||||
{
|
||||
cards: [
|
||||
{
|
||||
type: "heading",
|
||||
heading: localize(
|
||||
"ui.panel.page-demo.config.sections.titles.living_room"
|
||||
),
|
||||
icon: "mdi:sofa",
|
||||
badges: [
|
||||
{
|
||||
type: "entity",
|
||||
entity: "sensor.living_room_temperature",
|
||||
color: "red",
|
||||
},
|
||||
{
|
||||
type: "entity",
|
||||
entity: "sensor.living_room_humidity",
|
||||
color: "indigo",
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
type: "tile",
|
||||
entity: "light.floor_lamp",
|
||||
},
|
||||
{
|
||||
type: "tile",
|
||||
entity: "light.living_room_spotlights",
|
||||
name: "Spotlights",
|
||||
features: [
|
||||
{
|
||||
type: "light-brightness",
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
type: "tile",
|
||||
entity: "light.bar_lamp",
|
||||
},
|
||||
{
|
||||
type: "tile",
|
||||
entity: "cover.living_room_garden_shutter",
|
||||
name: "Blinds",
|
||||
},
|
||||
{
|
||||
type: "tile",
|
||||
entity: "media_player.living_room_nest_mini",
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
type: "grid",
|
||||
cards: [
|
||||
{
|
||||
type: "heading",
|
||||
heading: localize(
|
||||
"ui.panel.page-demo.config.sections.titles.kitchen"
|
||||
),
|
||||
icon: "mdi:fridge",
|
||||
badges: [
|
||||
{
|
||||
type: "entity",
|
||||
entity: "binary_sensor.kitchen_motion",
|
||||
show_state: false,
|
||||
color: "blue",
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
type: "tile",
|
||||
entity: "cover.kitchen_shutter",
|
||||
name: "Shutter",
|
||||
},
|
||||
{
|
||||
type: "tile",
|
||||
entity: "light.kitchen_spotlights",
|
||||
name: "Spotlights",
|
||||
features: [
|
||||
{
|
||||
type: "light-brightness",
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
type: "tile",
|
||||
entity: "light.worktop_spotlights",
|
||||
name: "Worktop",
|
||||
},
|
||||
{
|
||||
type: "tile",
|
||||
entity: "binary_sensor.fridge_door",
|
||||
name: "Fridge",
|
||||
},
|
||||
{
|
||||
type: "tile",
|
||||
entity: "media_player.kitchen_nest_audio",
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
type: "grid",
|
||||
cards: [
|
||||
{
|
||||
type: "heading",
|
||||
heading: localize(
|
||||
"ui.panel.page-demo.config.sections.titles.energy"
|
||||
),
|
||||
icon: "mdi:transmission-tower",
|
||||
},
|
||||
{
|
||||
type: "tile",
|
||||
entity: "binary_sensor.tesla_wall_connector_vehicle_connected",
|
||||
name: "EV",
|
||||
icon: "mdi:car",
|
||||
},
|
||||
{
|
||||
type: "tile",
|
||||
entity: "sensor.tesla_wall_connector_session_energy",
|
||||
name: "Last charge",
|
||||
color: "green",
|
||||
},
|
||||
{
|
||||
type: "tile",
|
||||
entity: "sensor.electric_meter_power",
|
||||
color: "deep-orange",
|
||||
name: "Home power",
|
||||
},
|
||||
{
|
||||
type: "tile",
|
||||
entity: "sensor.eletric_meter_voltage",
|
||||
name: "Voltage",
|
||||
color: "deep-orange",
|
||||
},
|
||||
{
|
||||
type: "tile",
|
||||
entity: "sensor.electricity_maps_grid_fossil_fuel_percentage",
|
||||
name: "Fossil fuel",
|
||||
color: "brown",
|
||||
},
|
||||
{
|
||||
type: "tile",
|
||||
entity: "sensor.electricity_maps_co2_intensity",
|
||||
name: "CO2 Intensity",
|
||||
color: "dark-grey",
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
type: "grid",
|
||||
cards: [
|
||||
{
|
||||
type: "heading",
|
||||
heading: localize(
|
||||
"ui.panel.page-demo.config.sections.titles.climate"
|
||||
),
|
||||
icon: "mdi:thermometer",
|
||||
},
|
||||
{
|
||||
type: "tile",
|
||||
entity: "sun.sun",
|
||||
},
|
||||
{
|
||||
type: "tile",
|
||||
entity: "sensor.rain",
|
||||
color: "blue",
|
||||
},
|
||||
{
|
||||
features: [
|
||||
{
|
||||
type: "target-temperature",
|
||||
},
|
||||
],
|
||||
type: "tile",
|
||||
name: "Downstairs",
|
||||
entity: "climate.ground_floor",
|
||||
state_content: ["preset_mode", "current_temperature"],
|
||||
},
|
||||
{
|
||||
features: [
|
||||
{
|
||||
type: "target-temperature",
|
||||
},
|
||||
],
|
||||
type: "tile",
|
||||
name: "Upstairs",
|
||||
entity: "climate.first_floor",
|
||||
state_content: ["preset_mode", "current_temperature"],
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
type: "grid",
|
||||
cards: [
|
||||
{
|
||||
type: "heading",
|
||||
heading: localize(
|
||||
"ui.panel.page-demo.config.sections.titles.study"
|
||||
),
|
||||
icon: "mdi:desk-lamp",
|
||||
badges: [
|
||||
{
|
||||
type: "entity",
|
||||
entity: "switch.in_meeting",
|
||||
state: "on",
|
||||
state_content: "name",
|
||||
visibility: [
|
||||
{
|
||||
condition: "state",
|
||||
state: "on",
|
||||
entity: "switch.in_meeting",
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
type: "tile",
|
||||
entity: "cover.study_shutter",
|
||||
name: "Shutter",
|
||||
},
|
||||
|
||||
{
|
||||
type: "tile",
|
||||
entity: "light.study_spotlights",
|
||||
name: "Spotlights",
|
||||
},
|
||||
{
|
||||
type: "tile",
|
||||
entity: "media_player.study_nest_hub",
|
||||
},
|
||||
{
|
||||
type: "tile",
|
||||
entity: "sensor.standing_desk_height",
|
||||
name: "Desk",
|
||||
color: "brown",
|
||||
icon: "mdi:desk",
|
||||
},
|
||||
{
|
||||
type: "tile",
|
||||
entity: "switch.in_meeting",
|
||||
name: "Meeting mode",
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
type: "grid",
|
||||
cards: [
|
||||
{
|
||||
type: "heading",
|
||||
heading: localize(
|
||||
"ui.panel.page-demo.config.sections.titles.outdoor"
|
||||
),
|
||||
icon: "mdi:tree",
|
||||
},
|
||||
{
|
||||
type: "tile",
|
||||
entity: "light.outdoor_light",
|
||||
name: "Door light",
|
||||
},
|
||||
{
|
||||
type: "tile",
|
||||
entity: "light.flood_light",
|
||||
},
|
||||
{
|
||||
graph: "line",
|
||||
type: "sensor",
|
||||
entity: "sensor.outdoor_motion_sensor_temperature",
|
||||
detail: 1,
|
||||
name: "Temperature",
|
||||
},
|
||||
{
|
||||
type: "tile",
|
||||
entity: "binary_sensor.outdoor_motion_sensor_motion",
|
||||
name: "Motion",
|
||||
color: "blue",
|
||||
},
|
||||
{
|
||||
type: "tile",
|
||||
entity: "sensor.outdoor_motion_sensor_illuminance",
|
||||
color: "amber",
|
||||
name: "Illuminance",
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
type: "grid",
|
||||
cards: [
|
||||
{
|
||||
type: "heading",
|
||||
heading: localize(
|
||||
"ui.panel.page-demo.config.sections.titles.updates"
|
||||
),
|
||||
icon: "mdi:update",
|
||||
},
|
||||
{
|
||||
type: "tile",
|
||||
entity: "automation.home_assistant_auto_update",
|
||||
name: "Auto-update",
|
||||
color: "green",
|
||||
},
|
||||
{
|
||||
type: "tile",
|
||||
entity: "update.home_assistant_operating_system_update",
|
||||
name: "OS",
|
||||
icon: "mdi:home-assistant",
|
||||
},
|
||||
{
|
||||
type: "tile",
|
||||
entity: "update.home_assistant_supervisor_update",
|
||||
icon: "mdi:home-assistant",
|
||||
name: "Supervisor",
|
||||
},
|
||||
{
|
||||
type: "tile",
|
||||
entity: "update.home_assistant_core_update",
|
||||
name: "Core",
|
||||
icon: "mdi:home-assistant",
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
});
|
@@ -1,5 +1,5 @@
|
||||
import { convertEntities } from "../../../../src/fake_data/entity";
|
||||
import { DemoConfig } from "../types";
|
||||
import type { DemoConfig } from "../types";
|
||||
|
||||
export const demoEntitiesTeachingbirds: DemoConfig["entities"] = () =>
|
||||
convertEntities({
|
||||
|
@@ -1,4 +1,4 @@
|
||||
import { DemoConfig } from "../types";
|
||||
import type { DemoConfig } from "../types";
|
||||
import { demoEntitiesTeachingbirds } from "./entities";
|
||||
import { demoLovelaceTeachingbirds } from "./lovelace";
|
||||
import { demoThemeTeachingbirds } from "./theme";
|
||||
|
@@ -1,4 +1,4 @@
|
||||
import { DemoConfig } from "../types";
|
||||
import type { DemoConfig } from "../types";
|
||||
|
||||
export const demoLovelaceTeachingbirds: DemoConfig["lovelace"] = () => ({
|
||||
title: "Home",
|
||||
|
@@ -1,12 +1,16 @@
|
||||
import { LocalizeFunc } from "../../../src/common/translations/localize";
|
||||
import { LovelaceConfig } from "../../../src/data/lovelace/config/types";
|
||||
import { Entity } from "../../../src/fake_data/entity";
|
||||
import type { TemplateResult } from "lit";
|
||||
import type { LocalizeFunc } from "../../../src/common/translations/localize";
|
||||
import type { LovelaceConfig } from "../../../src/data/lovelace/config/types";
|
||||
import type { Entity } from "../../../src/fake_data/entity";
|
||||
|
||||
export interface DemoConfig {
|
||||
index?: number;
|
||||
name: string;
|
||||
authorName: string;
|
||||
authorUrl: string;
|
||||
description?:
|
||||
| string
|
||||
| ((localize: LocalizeFunc) => string | TemplateResult<1>);
|
||||
lovelace: (localize: LocalizeFunc) => LovelaceConfig;
|
||||
entities: (localize: LocalizeFunc) => Entity[];
|
||||
theme: () => Record<string, string> | null;
|
||||
|
@@ -1,14 +1,15 @@
|
||||
import { mdiTelevision } from "@mdi/js";
|
||||
import { css, CSSResultGroup, html, LitElement, nothing } from "lit";
|
||||
import type { CSSResultGroup } from "lit";
|
||||
import { css, html, LitElement, nothing } from "lit";
|
||||
import { customElement, state } from "lit/decorators";
|
||||
import { CastManager } from "../../../src/cast/cast_manager";
|
||||
import type { CastManager } from "../../../src/cast/cast_manager";
|
||||
import { castSendShowDemo } from "../../../src/cast/receiver_messages";
|
||||
import "../../../src/components/ha-icon";
|
||||
import {
|
||||
import type {
|
||||
CastConfig,
|
||||
LovelaceRow,
|
||||
} from "../../../src/panels/lovelace/entity-rows/types";
|
||||
import { HomeAssistant } from "../../../src/types";
|
||||
import type { HomeAssistant } from "../../../src/types";
|
||||
|
||||
@customElement("cast-demo-row")
|
||||
class CastDemoRow extends LitElement implements LovelaceRow {
|
||||
|
@@ -1,17 +1,21 @@
|
||||
import "@material/mwc-button";
|
||||
import { css, CSSResultGroup, html, LitElement, nothing } from "lit";
|
||||
import type { CSSResultGroup } from "lit";
|
||||
import { css, html, LitElement, nothing } from "lit";
|
||||
import { customElement, property, state } from "lit/decorators";
|
||||
import { until } from "lit/directives/until";
|
||||
import { fireEvent } from "../../../src/common/dom/fire_event";
|
||||
import "../../../src/components/ha-card";
|
||||
import "../../../src/components/ha-button";
|
||||
import "../../../src/components/ha-circular-progress";
|
||||
import { LovelaceCardConfig } from "../../../src/data/lovelace/config/card";
|
||||
import { MockHomeAssistant } from "../../../src/fake_data/provide_hass";
|
||||
import { Lovelace, LovelaceCard } from "../../../src/panels/lovelace/types";
|
||||
import type { LovelaceCardConfig } from "../../../src/data/lovelace/config/card";
|
||||
import type { MockHomeAssistant } from "../../../src/fake_data/provide_hass";
|
||||
import type {
|
||||
Lovelace,
|
||||
LovelaceCard,
|
||||
} from "../../../src/panels/lovelace/types";
|
||||
import {
|
||||
demoConfigs,
|
||||
selectedDemoConfig,
|
||||
selectedDemoConfigIndex,
|
||||
setDemoConfig,
|
||||
} from "../configs/demo-configs";
|
||||
|
||||
@customElement("ha-demo-card")
|
||||
@@ -39,38 +43,57 @@ export class HADemoCard extends LitElement implements LovelaceCard {
|
||||
<div class="picker">
|
||||
<div class="label">
|
||||
${this._switching
|
||||
? html`<ha-circular-progress
|
||||
indeterminate
|
||||
></ha-circular-progress>`
|
||||
? html`
|
||||
<ha-circular-progress indeterminate></ha-circular-progress>
|
||||
`
|
||||
: until(
|
||||
selectedDemoConfig.then(
|
||||
(conf) => html`
|
||||
${conf.name}
|
||||
<small>
|
||||
<a target="_blank" href=${conf.authorUrl}>
|
||||
${this.hass.localize(
|
||||
"ui.panel.page-demo.cards.demo.demo_by",
|
||||
{ name: conf.authorName }
|
||||
)}
|
||||
</a>
|
||||
${this.hass.localize(
|
||||
"ui.panel.page-demo.cards.demo.demo_by",
|
||||
{
|
||||
name: html`
|
||||
<a target="_blank" href=${conf.authorUrl}>
|
||||
${conf.authorName}
|
||||
</a>
|
||||
`,
|
||||
}
|
||||
)}
|
||||
</small>
|
||||
`
|
||||
),
|
||||
""
|
||||
)}
|
||||
</div>
|
||||
<mwc-button @click=${this._nextConfig} .disabled=${this._switching}>
|
||||
|
||||
<ha-button @click=${this._nextConfig} .disabled=${this._switching}>
|
||||
${this.hass.localize("ui.panel.page-demo.cards.demo.next_demo")}
|
||||
</mwc-button>
|
||||
</ha-button>
|
||||
</div>
|
||||
<div class="content small-hidden">
|
||||
${this.hass.localize("ui.panel.page-demo.cards.demo.introduction")}
|
||||
<div class="content">
|
||||
<p class="small-hidden">
|
||||
${this.hass.localize("ui.panel.page-demo.cards.demo.introduction")}
|
||||
</p>
|
||||
${until(
|
||||
selectedDemoConfig.then((conf) => {
|
||||
if (typeof conf.description === "function") {
|
||||
return conf.description(this.hass.localize);
|
||||
}
|
||||
if (conf.description) {
|
||||
return html`<p>${conf.description}</p>`;
|
||||
}
|
||||
return nothing;
|
||||
}),
|
||||
nothing
|
||||
)}
|
||||
</div>
|
||||
<div class="actions small-hidden">
|
||||
<a href="https://www.home-assistant.io" target="_blank">
|
||||
<mwc-button>
|
||||
<ha-button>
|
||||
${this.hass.localize("ui.panel.page-demo.cards.demo.learn_more")}
|
||||
</mwc-button>
|
||||
</ha-button>
|
||||
</a>
|
||||
</div>
|
||||
</ha-card>
|
||||
@@ -94,13 +117,7 @@ export class HADemoCard extends LitElement implements LovelaceCard {
|
||||
|
||||
private async _updateConfig(index: number) {
|
||||
this._switching = true;
|
||||
try {
|
||||
await setDemoConfig(this.hass, this.lovelace!, index);
|
||||
} catch (err: any) {
|
||||
alert("Failed to switch config :-(");
|
||||
} finally {
|
||||
this._switching = false;
|
||||
}
|
||||
fireEvent(this, "set-demo-config" as any, { index });
|
||||
}
|
||||
|
||||
static get styles(): CSSResultGroup {
|
||||
@@ -108,6 +125,7 @@ export class HADemoCard extends LitElement implements LovelaceCard {
|
||||
css`
|
||||
a {
|
||||
color: var(--primary-color);
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
.actions a {
|
||||
@@ -115,7 +133,11 @@ export class HADemoCard extends LitElement implements LovelaceCard {
|
||||
}
|
||||
|
||||
.content {
|
||||
padding: 16px;
|
||||
padding: 0 16px;
|
||||
}
|
||||
|
||||
.content p {
|
||||
margin: 16px 0;
|
||||
}
|
||||
|
||||
.picker {
|
||||
@@ -125,7 +147,7 @@ export class HADemoCard extends LitElement implements LovelaceCard {
|
||||
height: 60px;
|
||||
}
|
||||
|
||||
.picker mwc-button {
|
||||
.picker ha-button {
|
||||
margin-right: 8px;
|
||||
}
|
||||
|
||||
@@ -138,9 +160,8 @@ export class HADemoCard extends LitElement implements LovelaceCard {
|
||||
}
|
||||
|
||||
.actions {
|
||||
padding-left: 8px;
|
||||
padding: 0px 8px 4px 8px;
|
||||
}
|
||||
|
||||
@media only screen and (max-width: 500px) {
|
||||
.small-hidden {
|
||||
display: none;
|
||||
|
@@ -1,4 +1,4 @@
|
||||
import "../../src/resources/safari-14-attachshadow-patch";
|
||||
import "./util/is_frontpage";
|
||||
import "./ha-demo";
|
||||
|
||||
import("../../src/resources/ha-style");
|
||||
|
@@ -3,13 +3,12 @@ import "../../src/resources/compatibility";
|
||||
import { customElement } from "lit/decorators";
|
||||
import { isNavigationClick } from "../../src/common/dom/is-navigation-click";
|
||||
import { navigate } from "../../src/common/navigate";
|
||||
import {
|
||||
MockHomeAssistant,
|
||||
provideHass,
|
||||
} from "../../src/fake_data/provide_hass";
|
||||
import type { MockHomeAssistant } from "../../src/fake_data/provide_hass";
|
||||
import { provideHass } from "../../src/fake_data/provide_hass";
|
||||
import { HomeAssistantAppEl } from "../../src/layouts/home-assistant";
|
||||
import { HomeAssistant } from "../../src/types";
|
||||
import type { HomeAssistant } from "../../src/types";
|
||||
import { selectedDemoConfig } from "./configs/demo-configs";
|
||||
import { mockAreaRegistry } from "./stubs/area_registry";
|
||||
import { mockAuth } from "./stubs/auth";
|
||||
import { mockConfigEntries } from "./stubs/config_entries";
|
||||
import { mockEnergy } from "./stubs/energy";
|
||||
@@ -17,14 +16,16 @@ import { energyEntities } from "./stubs/entities";
|
||||
import { mockEntityRegistry } from "./stubs/entity_registry";
|
||||
import { mockEvents } from "./stubs/events";
|
||||
import { mockFrontend } from "./stubs/frontend";
|
||||
import { mockIcons } from "./stubs/icons";
|
||||
import { mockHistory } from "./stubs/history";
|
||||
import { mockLovelace } from "./stubs/lovelace";
|
||||
import { mockMediaPlayer } from "./stubs/media_player";
|
||||
import { mockPersistentNotification } from "./stubs/persistent_notification";
|
||||
import { mockRecorder } from "./stubs/recorder";
|
||||
import { mockTodo } from "./stubs/todo";
|
||||
import { mockSensor } from "./stubs/sensor";
|
||||
import { mockSystemLog } from "./stubs/system_log";
|
||||
import { mockTemplate } from "./stubs/template";
|
||||
import { mockTodo } from "./stubs/todo";
|
||||
import { mockTranslations } from "./stubs/translations";
|
||||
|
||||
@customElement("ha-demo")
|
||||
@@ -50,14 +51,17 @@ export class HaDemo extends HomeAssistantAppEl {
|
||||
mockHistory(hass);
|
||||
mockRecorder(hass);
|
||||
mockTodo(hass);
|
||||
mockSensor(hass);
|
||||
mockSystemLog(hass);
|
||||
mockTemplate(hass);
|
||||
mockEvents(hass);
|
||||
mockMediaPlayer(hass);
|
||||
mockFrontend(hass);
|
||||
mockIcons(hass);
|
||||
mockEnergy(hass);
|
||||
mockPersistentNotification(hass);
|
||||
mockConfigEntries(hass);
|
||||
mockAreaRegistry(hass);
|
||||
mockEntityRegistry(hass, [
|
||||
{
|
||||
config_entry_id: "co2signal",
|
||||
@@ -68,12 +72,16 @@ export class HaDemo extends HomeAssistantAppEl {
|
||||
id: "sensor.co2_intensity",
|
||||
name: null,
|
||||
icon: null,
|
||||
labels: [],
|
||||
categories: {},
|
||||
platform: "co2signal",
|
||||
hidden_by: null,
|
||||
entity_category: null,
|
||||
has_entity_name: false,
|
||||
unique_id: "co2_intensity",
|
||||
options: null,
|
||||
created_at: 0,
|
||||
modified_at: 0,
|
||||
},
|
||||
{
|
||||
config_entry_id: "co2signal",
|
||||
@@ -84,12 +92,16 @@ export class HaDemo extends HomeAssistantAppEl {
|
||||
id: "sensor.co2_intensity",
|
||||
name: null,
|
||||
icon: null,
|
||||
labels: [],
|
||||
categories: {},
|
||||
platform: "co2signal",
|
||||
hidden_by: null,
|
||||
entity_category: null,
|
||||
has_entity_name: false,
|
||||
unique_id: "grid_fossil_fuel_percentage",
|
||||
options: null,
|
||||
created_at: 0,
|
||||
modified_at: 0,
|
||||
},
|
||||
]);
|
||||
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user