@iobroker/adapter-react-v5 8.0.4 → 8.0.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +22 -22
- package/README.md +5 -1
- package/build/AdminConnection.js.map +1 -1
- package/build/Components/404.js +13 -13
- package/build/Components/404.js.map +1 -1
- package/build/Components/ColorPicker.js.map +1 -1
- package/build/Components/CopyToClipboard.js.map +1 -1
- package/build/Components/Icon.js.map +1 -1
- package/build/Components/IobUri.js.map +1 -1
- package/build/Components/Loader.d.ts +2 -3
- package/build/Components/Loader.js +21 -257
- package/build/Components/Loader.js.map +1 -1
- package/build/Components/Loaders/Community.d.ts +31 -0
- package/build/Components/Loaders/Community.js +265 -0
- package/build/Components/Loaders/Community.js.map +1 -0
- package/build/Components/Loaders/MV.js.map +1 -1
- package/build/Components/Loaders/NW.d.ts +17 -0
- package/build/Components/Loaders/NW.js +70 -0
- package/build/Components/Loaders/NW.js.map +1 -0
- package/build/Components/Loaders/PT.js +103 -103
- package/build/Components/Loaders/PT.js.map +1 -1
- package/build/Components/Loaders/Vendor.js +7 -7
- package/build/Components/Loaders/Vendor.js.map +1 -1
- package/build/Components/MDUtils.js.map +1 -1
- package/build/Components/ObjectBrowser.d.ts +0 -1
- package/build/Components/ObjectBrowser.js +4 -3
- package/build/Components/ObjectBrowser.js.map +1 -1
- package/build/Components/Router.js.map +1 -1
- package/build/Components/SaveCloseButtons.js.map +1 -1
- package/build/Components/SimpleCron/cronText.js.map +1 -1
- package/build/Components/SimpleCron/index.js.map +1 -1
- package/build/Components/TabContainer.js.map +1 -1
- package/build/Components/TabContent.js.map +1 -1
- package/build/Components/TabHeader.js.map +1 -1
- package/build/Components/TableResize.js.map +1 -1
- package/build/Components/TreeTable.js.map +1 -1
- package/build/Components/UploadImage.js +305 -305
- package/build/Components/UploadImage.js.map +1 -1
- package/build/Components/Utils.d.ts +14 -0
- package/build/Components/Utils.js +154 -0
- package/build/Components/Utils.js.map +1 -1
- package/build/Connection.js.map +1 -1
- package/build/Dialogs/ComplexCron.js.map +1 -1
- package/build/Dialogs/Confirm.js.map +1 -1
- package/build/Dialogs/Cron.js.map +1 -1
- package/build/Dialogs/Error.js.map +1 -1
- package/build/Dialogs/Message.js.map +1 -1
- package/build/Dialogs/SimpleCron.js.map +1 -1
- package/build/Dialogs/TextInput.js.map +1 -1
- package/build/Prompt.js +7 -7
- package/build/Prompt.js.map +1 -1
- package/build/Theme.js +32 -0
- package/build/Theme.js.map +1 -1
- package/build/dictionary.js.map +1 -1
- package/build/i18n.js.map +1 -1
- package/build/index.css +56 -56
- package/build/index.d.ts +1 -0
- package/build/index.js +1 -0
- package/build/index.js.map +1 -1
- package/build/types.d.ts +1 -1
- package/index.css +56 -56
- package/package.json +6 -6
- package/tasksExample.js +91 -91
|
@@ -1,265 +1,29 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Copyright 2018-
|
|
2
|
+
* Copyright 2018-2025 Denis Haev (bluefox) <dogafox@gmail.com>
|
|
3
3
|
*
|
|
4
4
|
* MIT License
|
|
5
5
|
*
|
|
6
6
|
*/
|
|
7
|
-
import React
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
*
|
|
14
|
-
**/
|
|
15
|
-
|
|
16
|
-
.logo-background-light, .logo-background-colored {
|
|
17
|
-
background: white;
|
|
18
|
-
}
|
|
19
|
-
.logo-background-dark, .logo-background-blue {
|
|
20
|
-
background: black;
|
|
21
|
-
}
|
|
22
|
-
.logo-div {
|
|
23
|
-
position: absolute;
|
|
24
|
-
top: 50%;
|
|
25
|
-
left: 50%;
|
|
26
|
-
-ms-transform: translateX(-50%) translateY(-50%);
|
|
27
|
-
-webkit-transform: translate(-50%,-50%);
|
|
28
|
-
transform: translate(-50%,-50%);
|
|
29
|
-
overflow: hidden;
|
|
30
|
-
border-radius: 50%;
|
|
31
|
-
z-index: 2;
|
|
32
|
-
}
|
|
33
|
-
.logo-border {
|
|
34
|
-
/*border-color: #164477;*/
|
|
35
|
-
border-top-color: #3399CC;
|
|
36
|
-
border-left-color: #164477;
|
|
37
|
-
border-bottom-color: #164477;
|
|
38
|
-
border-right-color: #164477;
|
|
39
|
-
border-radius: 50%;
|
|
40
|
-
border-style: solid;
|
|
41
|
-
box-sizing: border-box;
|
|
42
|
-
width: 100%;
|
|
43
|
-
height: 100%;
|
|
44
|
-
position: absolute;
|
|
45
|
-
}
|
|
46
|
-
.logo-top {
|
|
47
|
-
position: absolute;
|
|
48
|
-
width: 4.5%;
|
|
49
|
-
height: 16%;
|
|
50
|
-
top: 0;
|
|
51
|
-
z-index: 2;
|
|
52
|
-
}
|
|
53
|
-
.logo-i {
|
|
54
|
-
position: absolute;
|
|
55
|
-
width: 14.5%;
|
|
56
|
-
height: 60%;
|
|
57
|
-
top: 20%;
|
|
58
|
-
left: 42%;
|
|
59
|
-
background: #3399CC;
|
|
60
|
-
}
|
|
61
|
-
.logo-i-top {
|
|
62
|
-
position: absolute;
|
|
63
|
-
width: 14.5%;
|
|
64
|
-
height: 4%;
|
|
65
|
-
left: 42%;
|
|
66
|
-
background: #3399CC;
|
|
67
|
-
border-radius: 100%;
|
|
68
|
-
}
|
|
69
|
-
.logo-back {
|
|
70
|
-
width: 100%;
|
|
71
|
-
height: 100%;
|
|
72
|
-
z-index: 0;
|
|
73
|
-
overflow: hidden;
|
|
74
|
-
}
|
|
75
|
-
@keyframes logo-grow {
|
|
76
|
-
0% {
|
|
77
|
-
width: 230px;
|
|
78
|
-
height: 230px;
|
|
79
|
-
transform: translate(-50%,-50%) scale(1);
|
|
80
|
-
opacity: 1
|
|
81
|
-
}
|
|
82
|
-
99% {
|
|
83
|
-
width: 230px;
|
|
84
|
-
height: 230px;
|
|
85
|
-
transform: translate(-50%,-50%) scale(10);
|
|
86
|
-
opacity: 0;
|
|
87
|
-
}
|
|
88
|
-
100% {
|
|
89
|
-
width: 0;
|
|
90
|
-
height: 0;
|
|
91
|
-
opacity: 0;
|
|
92
|
-
}
|
|
93
|
-
}
|
|
94
|
-
@keyframes logo-spin { 100% { -webkit-transform: rotate(360deg); transform: rotate(360deg); } }
|
|
95
|
-
@keyframes logo-color-inside-light {
|
|
96
|
-
0% {
|
|
97
|
-
background: #FEFEFE;
|
|
98
|
-
}
|
|
99
|
-
100% {
|
|
100
|
-
background: #3399CC;
|
|
101
|
-
}
|
|
102
|
-
}
|
|
103
|
-
@keyframes logo-color-inside-dark {
|
|
104
|
-
0% {
|
|
105
|
-
background: #030303;
|
|
106
|
-
}
|
|
107
|
-
100% {
|
|
108
|
-
background: #3399CC;
|
|
109
|
-
}
|
|
110
|
-
}
|
|
111
|
-
@keyframes logo-color-inside-colored {
|
|
112
|
-
0% {
|
|
113
|
-
background: #FEFEFE;
|
|
114
|
-
}
|
|
115
|
-
100% {
|
|
116
|
-
background: #3399CC;
|
|
117
|
-
}
|
|
118
|
-
}
|
|
119
|
-
@keyframes logo-color-inside-blue {
|
|
120
|
-
0% {
|
|
121
|
-
background: #030303;
|
|
122
|
-
}
|
|
123
|
-
100% {
|
|
124
|
-
background: #3399CC;
|
|
125
|
-
}
|
|
126
|
-
}
|
|
127
|
-
|
|
128
|
-
@keyframes logo-color-outside-light {
|
|
129
|
-
0% {
|
|
130
|
-
border-color: #FEFEFE;
|
|
131
|
-
}
|
|
132
|
-
100% {
|
|
133
|
-
border-top-color: #3399CC;
|
|
134
|
-
border-left-color: #164477;
|
|
135
|
-
border-bottom-color: #164477;
|
|
136
|
-
border-right-color: #164477;
|
|
137
|
-
}
|
|
138
|
-
}
|
|
139
|
-
@keyframes logo-color-outside-dark {
|
|
140
|
-
0% {
|
|
141
|
-
border-color: #040404;
|
|
142
|
-
}
|
|
143
|
-
100% {
|
|
144
|
-
border-top-color: #3399CC;
|
|
145
|
-
border-left-color: #164477;
|
|
146
|
-
border-bottom-color: #164477;
|
|
147
|
-
border-right-color: #164477;
|
|
148
|
-
}
|
|
149
|
-
}
|
|
150
|
-
@keyframes logo-color-outside-colored {
|
|
151
|
-
0% {
|
|
152
|
-
border-color: #FEFEFE;
|
|
153
|
-
}
|
|
154
|
-
100% {
|
|
155
|
-
border-top-color: #3399CC;
|
|
156
|
-
border-left-color: #164477;
|
|
157
|
-
border-bottom-color: #164477;
|
|
158
|
-
border-right-color: #164477;
|
|
159
|
-
}
|
|
160
|
-
}
|
|
161
|
-
@keyframes logo-color-outside-blue {
|
|
162
|
-
0% {
|
|
163
|
-
border-color: #040404;
|
|
164
|
-
}
|
|
165
|
-
100% {
|
|
166
|
-
border-top-color: #3399CC;
|
|
167
|
-
border-left-color: #164477;
|
|
168
|
-
border-bottom-color: #164477;
|
|
169
|
-
border-right-color: #164477;
|
|
170
|
-
}
|
|
171
|
-
}
|
|
172
|
-
|
|
173
|
-
.logo-animate-wait {
|
|
174
|
-
animation: logo-color-outside 1.5s, logo-spin 1.5s linear infinite;
|
|
175
|
-
}
|
|
176
|
-
|
|
177
|
-
.logo-animate-grow-light {
|
|
178
|
-
background: #DDD;
|
|
179
|
-
}
|
|
180
|
-
.logo-animate-grow-dark {
|
|
181
|
-
background: #1d1d1d;
|
|
182
|
-
}
|
|
183
|
-
.logo-animate-grow-colored {
|
|
184
|
-
background: #DDD;
|
|
185
|
-
}
|
|
186
|
-
.logo-animate-grow-blue {
|
|
187
|
-
background: #1d1d1d;
|
|
188
|
-
}
|
|
189
|
-
|
|
190
|
-
.logo-animate-grow {
|
|
191
|
-
display: inline-block;
|
|
192
|
-
text-align: center;
|
|
193
|
-
z-index: 1;
|
|
194
|
-
top: 50%;
|
|
195
|
-
left: 50%;
|
|
196
|
-
-ms-transform: translateX(-50%) translateY(-50%);
|
|
197
|
-
-webkit-transform: translate(-50%,-50%);
|
|
198
|
-
transform: translate(-50%,-50%);
|
|
199
|
-
width: 245px;
|
|
200
|
-
height: 245px;
|
|
201
|
-
border-radius: 50%;
|
|
202
|
-
position: absolute;
|
|
203
|
-
animation: logo-grow 1s 1 ease forwards;
|
|
204
|
-
}
|
|
205
|
-
|
|
206
|
-
.logo-animate-color-inside-light {
|
|
207
|
-
animation: logo-color-inside-light 2.5s;
|
|
208
|
-
}
|
|
209
|
-
.logo-animate-color-inside-dark {
|
|
210
|
-
animation: logo-color-inside-dark 2.5s;
|
|
211
|
-
}
|
|
212
|
-
.logo-animate-color-inside-colored {
|
|
213
|
-
animation: logo-color-inside-colored 2.5s;
|
|
214
|
-
}
|
|
215
|
-
.logo-animate-color-inside-blue {
|
|
216
|
-
animation: logo-color-inside-blue 2.5s;
|
|
217
|
-
}
|
|
218
|
-
|
|
219
|
-
.logo-animate-color-outside-light {
|
|
220
|
-
animation: logo-color-outside-light 1.5s;
|
|
221
|
-
}
|
|
222
|
-
.logo-animate-color-outside-dark {
|
|
223
|
-
animation: logo-color-outside-dark 1.5s;
|
|
224
|
-
}
|
|
225
|
-
.logo-animate-color-outside-colored {
|
|
226
|
-
animation: logo-color-outside-colored 1.5s;
|
|
227
|
-
}
|
|
228
|
-
.logo-animate-color-outside-blue {
|
|
229
|
-
animation: logo-color-outside-blue 1.5s;
|
|
230
|
-
}
|
|
231
|
-
`;
|
|
7
|
+
import React from 'react';
|
|
8
|
+
import { LoaderMV } from './Loaders/MV';
|
|
9
|
+
import { LoaderNW } from './Loaders/NW';
|
|
10
|
+
import { LoaderVendor } from './Loaders/Vendor';
|
|
11
|
+
import { LoaderCommunity } from './Loaders/Community';
|
|
12
|
+
import { LoaderPT } from './Loaders/PT';
|
|
232
13
|
export function Loader(props) {
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
? `url(${window.loadingBackgroundImage})`
|
|
248
|
-
: undefined,
|
|
249
|
-
backgroundColor: props.backgroundColor && props.backgroundColor !== '@@loginBackgroundColor@@'
|
|
250
|
-
? props.backgroundColor
|
|
251
|
-
: window.loadingBackgroundColor && window.loadingBackgroundColor !== '@@loginBackgroundColor@@'
|
|
252
|
-
? window.loadingBackgroundColor
|
|
253
|
-
: undefined,
|
|
254
|
-
backgroundSize: 'cover',
|
|
255
|
-
} }, window.loadingHideLogo === 'true' ? null : (React.createElement(React.Fragment, null,
|
|
256
|
-
React.createElement("div", { className: "logo-div", style: { width: size, height: size } },
|
|
257
|
-
React.createElement("div", { className: `logo-top logo-background-${theme}`, style: { left: '37%' } }),
|
|
258
|
-
React.createElement("div", { className: `logo-top logo-background-${theme}`, style: { left: '57%' } }),
|
|
259
|
-
React.createElement("div", { className: `logo-border logo-background-${theme} logo-animate-wait`, style: { borderWidth: size * 0.132 } }),
|
|
260
|
-
React.createElement("div", { className: `logo-i logo-animate-color-inside-${theme}` }),
|
|
261
|
-
React.createElement("div", { className: `logo-i-top logo-animate-color-inside-${theme}`, style: { top: '18%' } }),
|
|
262
|
-
React.createElement("div", { className: `logo-i-top logo-animate-color-inside-${theme}`, style: { bottom: '18%' } })),
|
|
263
|
-
React.createElement("div", { className: `logo-animate-grow logo-animate-grow-${theme}`, style: { width: size + 11, height: size + 11 } })))));
|
|
14
|
+
const vendorPrefix = window.vendorPrefix;
|
|
15
|
+
if (vendorPrefix === 'PT') {
|
|
16
|
+
return React.createElement(LoaderPT, { themeType: props.themeType });
|
|
17
|
+
}
|
|
18
|
+
if (vendorPrefix === 'MV') {
|
|
19
|
+
return React.createElement(LoaderMV, { themeType: props.themeType });
|
|
20
|
+
}
|
|
21
|
+
if (vendorPrefix === 'NW') {
|
|
22
|
+
return React.createElement(LoaderNW, { themeType: props.themeType });
|
|
23
|
+
}
|
|
24
|
+
if (vendorPrefix && vendorPrefix !== '@@vendorPrefix@@') {
|
|
25
|
+
return React.createElement(LoaderVendor, { themeType: props.themeType });
|
|
26
|
+
}
|
|
27
|
+
return React.createElement(LoaderCommunity, { themeType: props.themeType });
|
|
264
28
|
}
|
|
265
29
|
//# sourceMappingURL=Loader.js.map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AM,EAAE,KAAK,EAAE,GAC1B,CACA;QACN,6BACI,SAAS,EAAE,uCAAuC,KAAK,EAAE,EACzD,KAAK,EAAE,EAAE,KAAK,EAAE,IAAI,GAAG,EAAE,EAAE,MAAM,EAAE,IAAI,GAAG,EAAE,EAAE,GAChD,CACH,CACN,CACC,CACT,CAAC;AACN,CAAC","sourcesContent":["/**\r\n * Copyright 2018-2024 Denis Haev (bluefox) <dogafox@gmail.com>\r\n *\r\n * MIT License\r\n *\r\n */\r\nimport React, { useEffect } from 'react';\r\nimport type { ThemeName, ThemeType } from '../types';\r\n// import './loader.css'\r\n\r\ndeclare global {\r\n interface Window {\r\n loadingBackgroundImage: undefined | string;\r\n loadingBackgroundColor: undefined | string;\r\n loadingHideLogo: undefined | 'true';\r\n }\r\n}\r\n\r\nconst loaderStyles = `\r\n/**\r\n * Copyright 2018-2024 Denis Haev (bluefox) <dogafox@gmail.com>\r\n *\r\n * MIT License\r\n *\r\n **/\r\n\r\n.logo-background-light, .logo-background-colored {\r\n background: white;\r\n}\r\n.logo-background-dark, .logo-background-blue {\r\n background: black;\r\n}\r\n.logo-div {\r\n position: absolute;\r\n top: 50%;\r\n left: 50%;\r\n -ms-transform: translateX(-50%) translateY(-50%);\r\n -webkit-transform: translate(-50%,-50%);\r\n transform: translate(-50%,-50%);\r\n overflow: hidden;\r\n border-radius: 50%;\r\n z-index: 2;\r\n}\r\n.logo-border {\r\n /*border-color: #164477;*/\r\n border-top-color: #3399CC;\r\n border-left-color: #164477;\r\n border-bottom-color: #164477;\r\n border-right-color: #164477;\r\n border-radius: 50%;\r\n border-style: solid;\r\n box-sizing: border-box;\r\n width: 100%;\r\n height: 100%;\r\n position: absolute;\r\n}\r\n.logo-top {\r\n position: absolute;\r\n width: 4.5%;\r\n height: 16%;\r\n top: 0;\r\n z-index: 2;\r\n}\r\n.logo-i {\r\n position: absolute;\r\n width: 14.5%;\r\n height: 60%;\r\n top: 20%;\r\n left: 42%;\r\n background: #3399CC;\r\n}\r\n.logo-i-top {\r\n position: absolute;\r\n width: 14.5%;\r\n height: 4%;\r\n left: 42%;\r\n background: #3399CC;\r\n border-radius: 100%;\r\n}\r\n.logo-back {\r\n width: 100%;\r\n height: 100%;\r\n z-index: 0;\r\n overflow: hidden;\r\n}\r\n@keyframes logo-grow {\r\n 0% {\r\n width: 230px;\r\n height: 230px;\r\n transform: translate(-50%,-50%) scale(1);\r\n opacity: 1\r\n }\r\n 99% {\r\n width: 230px;\r\n height: 230px;\r\n transform: translate(-50%,-50%) scale(10);\r\n opacity: 0;\r\n }\r\n 100% {\r\n width: 0;\r\n height: 0;\r\n opacity: 0;\r\n }\r\n}\r\n@keyframes logo-spin { 100% { -webkit-transform: rotate(360deg); transform: rotate(360deg); } }\r\n@keyframes logo-color-inside-light {\r\n 0% {\r\n background: #FEFEFE;\r\n }\r\n 100% {\r\n background: #3399CC;\r\n }\r\n}\r\n@keyframes logo-color-inside-dark {\r\n 0% {\r\n background: #030303;\r\n }\r\n 100% {\r\n background: #3399CC;\r\n }\r\n}\r\n@keyframes logo-color-inside-colored {\r\n 0% {\r\n background: #FEFEFE;\r\n }\r\n 100% {\r\n background: #3399CC;\r\n }\r\n}\r\n@keyframes logo-color-inside-blue {\r\n 0% {\r\n background: #030303;\r\n }\r\n 100% {\r\n background: #3399CC;\r\n }\r\n}\r\n\r\n@keyframes logo-color-outside-light {\r\n 0% {\r\n border-color: #FEFEFE;\r\n }\r\n 100% {\r\n border-top-color: #3399CC;\r\n border-left-color: #164477;\r\n border-bottom-color: #164477;\r\n border-right-color: #164477;\r\n }\r\n}\r\n@keyframes logo-color-outside-dark {\r\n 0% {\r\n border-color: #040404;\r\n }\r\n 100% {\r\n border-top-color: #3399CC;\r\n border-left-color: #164477;\r\n border-bottom-color: #164477;\r\n border-right-color: #164477;\r\n }\r\n}\r\n@keyframes logo-color-outside-colored {\r\n 0% {\r\n border-color: #FEFEFE;\r\n }\r\n 100% {\r\n border-top-color: #3399CC;\r\n border-left-color: #164477;\r\n border-bottom-color: #164477;\r\n border-right-color: #164477;\r\n }\r\n}\r\n@keyframes logo-color-outside-blue {\r\n 0% {\r\n border-color: #040404;\r\n }\r\n 100% {\r\n border-top-color: #3399CC;\r\n border-left-color: #164477;\r\n border-bottom-color: #164477;\r\n border-right-color: #164477;\r\n }\r\n}\r\n\r\n.logo-animate-wait {\r\n animation: logo-color-outside 1.5s, logo-spin 1.5s linear infinite;\r\n}\r\n\r\n.logo-animate-grow-light {\r\n background: #DDD;\r\n}\r\n.logo-animate-grow-dark {\r\n background: #1d1d1d;\r\n}\r\n.logo-animate-grow-colored {\r\n background: #DDD;\r\n}\r\n.logo-animate-grow-blue {\r\n background: #1d1d1d;\r\n}\r\n\r\n.logo-animate-grow {\r\n display: inline-block;\r\n text-align: center;\r\n z-index: 1;\r\n top: 50%;\r\n left: 50%;\r\n -ms-transform: translateX(-50%) translateY(-50%);\r\n -webkit-transform: translate(-50%,-50%);\r\n transform: translate(-50%,-50%);\r\n width: 245px;\r\n height: 245px;\r\n border-radius: 50%;\r\n position: absolute;\r\n animation: logo-grow 1s 1 ease forwards;\r\n}\r\n\r\n.logo-animate-color-inside-light {\r\n animation: logo-color-inside-light 2.5s;\r\n}\r\n.logo-animate-color-inside-dark {\r\n animation: logo-color-inside-dark 2.5s;\r\n}\r\n.logo-animate-color-inside-colored {\r\n animation: logo-color-inside-colored 2.5s;\r\n}\r\n.logo-animate-color-inside-blue {\r\n animation: logo-color-inside-blue 2.5s;\r\n}\r\n\r\n.logo-animate-color-outside-light {\r\n animation: logo-color-outside-light 1.5s;\r\n}\r\n.logo-animate-color-outside-dark {\r\n animation: logo-color-outside-dark 1.5s;\r\n}\r\n.logo-animate-color-outside-colored {\r\n animation: logo-color-outside-colored 1.5s;\r\n}\r\n.logo-animate-color-outside-blue {\r\n animation: logo-color-outside-blue 1.5s;\r\n}\r\n`;\r\n\r\ninterface LoaderProps {\r\n /** The size in pixels of this loader. */\r\n size?: number;\r\n /** The chosen theme type. */\r\n themeType?: ThemeType;\r\n /** Theme name */\r\n themeName?: ThemeName;\r\n /** @deprecated Theme name. use themeName instead */\r\n theme?: ThemeName;\r\n /** Background color */\r\n backgroundColor?: string;\r\n /** Background image URL */\r\n backgroundImage?: string;\r\n}\r\n\r\nexport function Loader(props: LoaderProps): React.JSX.Element {\r\n useEffect(() => {\r\n if (!window.document.getElementById('loader-iobroker-component')) {\r\n const style = window.document.createElement('style');\r\n style.setAttribute('id', 'loader-iobroker-component');\r\n style.innerHTML = loaderStyles;\r\n window.document.head.appendChild(style);\r\n }\r\n }, []);\r\n\r\n const size = props.size || 234;\r\n const theme = props.themeName || props.theme || props.themeType || 'light';\r\n return (\r\n <div\r\n className={`logo-back logo-background-${theme}`}\r\n style={{\r\n backgroundImage:\r\n props.backgroundImage && props.backgroundImage !== '@@loginBackgroundImage@@'\r\n ? props.backgroundImage\r\n : window.loadingBackgroundImage && window.loadingBackgroundImage !== '@@loginBackgroundImage@@'\r\n ? `url(${window.loadingBackgroundImage})`\r\n : undefined,\r\n backgroundColor:\r\n props.backgroundColor && props.backgroundColor !== '@@loginBackgroundColor@@'\r\n ? props.backgroundColor\r\n : window.loadingBackgroundColor && window.loadingBackgroundColor !== '@@loginBackgroundColor@@'\r\n ? window.loadingBackgroundColor\r\n : undefined,\r\n backgroundSize: 'cover',\r\n }}\r\n >\r\n {window.loadingHideLogo === 'true' ? null : (\r\n <>\r\n <div\r\n className=\"logo-div\"\r\n style={{ width: size, height: size }}\r\n >\r\n <div\r\n className={`logo-top logo-background-${theme}`}\r\n style={{ left: '37%' }}\r\n />\r\n <div\r\n className={`logo-top logo-background-${theme}`}\r\n style={{ left: '57%' }}\r\n />\r\n <div\r\n className={`logo-border logo-background-${theme} logo-animate-wait`}\r\n style={{ borderWidth: size * 0.132 }}\r\n />\r\n <div className={`logo-i logo-animate-color-inside-${theme}`} />\r\n <div\r\n className={`logo-i-top logo-animate-color-inside-${theme}`}\r\n style={{ top: '18%' }}\r\n />\r\n <div\r\n className={`logo-i-top logo-animate-color-inside-${theme}`}\r\n style={{ bottom: '18%' }}\r\n />\r\n </div>\r\n <div\r\n className={`logo-animate-grow logo-animate-grow-${theme}`}\r\n style={{ width: size + 11, height: size + 11 }}\r\n />\r\n </>\r\n )}\r\n </div>\r\n );\r\n}\r\n"]}
|
|
1
|
+
{"version":3,"file":"Loader.js","sourceRoot":"./src/","sources":["Components/Loader.tsx"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AACxC,OAAO,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AACxC,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAChD,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AACtD,OAAO,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AAyBxC,MAAM,UAAU,MAAM,CAAC,KAAkB;IACrC,MAAM,YAAY,GAAG,MAAM,CAAC,YAAY,CAAC;IACzC,IAAI,YAAY,KAAK,IAAI,EAAE,CAAC;QACxB,OAAO,oBAAC,QAAQ,IAAC,SAAS,EAAE,KAAK,CAAC,SAAS,GAAI,CAAC;IACpD,CAAC;IACD,IAAI,YAAY,KAAK,IAAI,EAAE,CAAC;QACxB,OAAO,oBAAC,QAAQ,IAAC,SAAS,EAAE,KAAK,CAAC,SAAS,GAAI,CAAC;IACpD,CAAC;IACD,IAAI,YAAY,KAAK,IAAI,EAAE,CAAC;QACxB,OAAO,oBAAC,QAAQ,IAAC,SAAS,EAAE,KAAK,CAAC,SAAS,GAAI,CAAC;IACpD,CAAC;IACD,IAAI,YAAY,IAAI,YAAY,KAAK,kBAAkB,EAAE,CAAC;QACtD,OAAO,oBAAC,YAAY,IAAC,SAAS,EAAE,KAAK,CAAC,SAAS,GAAI,CAAC;IACxD,CAAC;IACD,OAAO,oBAAC,eAAe,IAAC,SAAS,EAAE,KAAK,CAAC,SAAS,GAAI,CAAC;AAC3D,CAAC","sourcesContent":["/**\n * Copyright 2018-2025 Denis Haev (bluefox) <dogafox@gmail.com>\n *\n * MIT License\n *\n */\nimport React from 'react';\nimport type { ThemeName, ThemeType } from '../types';\nimport { LoaderMV } from './Loaders/MV';\nimport { LoaderNW } from './Loaders/NW';\nimport { LoaderVendor } from './Loaders/Vendor';\nimport { LoaderCommunity } from './Loaders/Community';\nimport { LoaderPT } from './Loaders/PT';\n\ndeclare global {\n interface Window {\n loadingBackgroundImage: undefined | string;\n loadingBackgroundColor: undefined | string;\n loadingHideLogo: undefined | 'true';\n }\n}\n\nexport interface LoaderProps {\n /** The size in pixels of this loader. */\n size?: number;\n /** The chosen theme type. */\n themeType?: ThemeType;\n /** Theme name */\n themeName?: ThemeName;\n /** @deprecated Theme name. use themeName instead */\n theme?: ThemeName;\n /** Background color */\n backgroundColor?: string;\n /** Background image URL */\n backgroundImage?: string;\n}\n\nexport function Loader(props: LoaderProps): React.JSX.Element {\n const vendorPrefix = window.vendorPrefix;\n if (vendorPrefix === 'PT') {\n return <LoaderPT themeType={props.themeType} />;\n }\n if (vendorPrefix === 'MV') {\n return <LoaderMV themeType={props.themeType} />;\n }\n if (vendorPrefix === 'NW') {\n return <LoaderNW themeType={props.themeType} />;\n }\n if (vendorPrefix && vendorPrefix !== '@@vendorPrefix@@') {\n return <LoaderVendor themeType={props.themeType} />;\n }\n return <LoaderCommunity themeType={props.themeType} />;\n}\n"]}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright 2018-2024 Denis Haev (bluefox) <dogafox@gmail.com>
|
|
3
|
+
*
|
|
4
|
+
* MIT License
|
|
5
|
+
*
|
|
6
|
+
*/
|
|
7
|
+
import React from 'react';
|
|
8
|
+
import type { ThemeName, ThemeType } from '../../types';
|
|
9
|
+
declare global {
|
|
10
|
+
interface Window {
|
|
11
|
+
loadingBackgroundImage: undefined | string;
|
|
12
|
+
loadingBackgroundColor: undefined | string;
|
|
13
|
+
loadingHideLogo: undefined | 'true';
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
interface LoaderProps {
|
|
17
|
+
/** The size in pixels of this loader. */
|
|
18
|
+
size?: number;
|
|
19
|
+
/** The chosen theme type. */
|
|
20
|
+
themeType?: ThemeType;
|
|
21
|
+
/** Theme name */
|
|
22
|
+
themeName?: ThemeName;
|
|
23
|
+
/** @deprecated Theme name. use themeName instead */
|
|
24
|
+
theme?: ThemeName;
|
|
25
|
+
/** Background color */
|
|
26
|
+
backgroundColor?: string;
|
|
27
|
+
/** Background image URL */
|
|
28
|
+
backgroundImage?: string;
|
|
29
|
+
}
|
|
30
|
+
export declare function LoaderCommunity(props: LoaderProps): React.JSX.Element;
|
|
31
|
+
export {};
|
|
@@ -0,0 +1,265 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright 2018-2024 Denis Haev (bluefox) <dogafox@gmail.com>
|
|
3
|
+
*
|
|
4
|
+
* MIT License
|
|
5
|
+
*
|
|
6
|
+
*/
|
|
7
|
+
import React, { useEffect } from 'react';
|
|
8
|
+
const loaderStyles = `
|
|
9
|
+
/**
|
|
10
|
+
* Copyright 2018-2024 Denis Haev (bluefox) <dogafox@gmail.com>
|
|
11
|
+
*
|
|
12
|
+
* MIT License
|
|
13
|
+
*
|
|
14
|
+
**/
|
|
15
|
+
|
|
16
|
+
.logo-background-light, .logo-background-colored {
|
|
17
|
+
background: white;
|
|
18
|
+
}
|
|
19
|
+
.logo-background-dark, .logo-background-blue {
|
|
20
|
+
background: black;
|
|
21
|
+
}
|
|
22
|
+
.logo-div {
|
|
23
|
+
position: absolute;
|
|
24
|
+
top: 50%;
|
|
25
|
+
left: 50%;
|
|
26
|
+
-ms-transform: translateX(-50%) translateY(-50%);
|
|
27
|
+
-webkit-transform: translate(-50%,-50%);
|
|
28
|
+
transform: translate(-50%,-50%);
|
|
29
|
+
overflow: hidden;
|
|
30
|
+
border-radius: 50%;
|
|
31
|
+
z-index: 2;
|
|
32
|
+
}
|
|
33
|
+
.logo-border {
|
|
34
|
+
/*border-color: #164477;*/
|
|
35
|
+
border-top-color: #3399CC;
|
|
36
|
+
border-left-color: #164477;
|
|
37
|
+
border-bottom-color: #164477;
|
|
38
|
+
border-right-color: #164477;
|
|
39
|
+
border-radius: 50%;
|
|
40
|
+
border-style: solid;
|
|
41
|
+
box-sizing: border-box;
|
|
42
|
+
width: 100%;
|
|
43
|
+
height: 100%;
|
|
44
|
+
position: absolute;
|
|
45
|
+
}
|
|
46
|
+
.logo-top {
|
|
47
|
+
position: absolute;
|
|
48
|
+
width: 4.5%;
|
|
49
|
+
height: 16%;
|
|
50
|
+
top: 0;
|
|
51
|
+
z-index: 2;
|
|
52
|
+
}
|
|
53
|
+
.logo-i {
|
|
54
|
+
position: absolute;
|
|
55
|
+
width: 14.5%;
|
|
56
|
+
height: 60%;
|
|
57
|
+
top: 20%;
|
|
58
|
+
left: 42%;
|
|
59
|
+
background: #3399CC;
|
|
60
|
+
}
|
|
61
|
+
.logo-i-top {
|
|
62
|
+
position: absolute;
|
|
63
|
+
width: 14.5%;
|
|
64
|
+
height: 4%;
|
|
65
|
+
left: 42%;
|
|
66
|
+
background: #3399CC;
|
|
67
|
+
border-radius: 100%;
|
|
68
|
+
}
|
|
69
|
+
.logo-back {
|
|
70
|
+
width: 100%;
|
|
71
|
+
height: 100%;
|
|
72
|
+
z-index: 0;
|
|
73
|
+
overflow: hidden;
|
|
74
|
+
}
|
|
75
|
+
@keyframes logo-grow {
|
|
76
|
+
0% {
|
|
77
|
+
width: 230px;
|
|
78
|
+
height: 230px;
|
|
79
|
+
transform: translate(-50%,-50%) scale(1);
|
|
80
|
+
opacity: 1
|
|
81
|
+
}
|
|
82
|
+
99% {
|
|
83
|
+
width: 230px;
|
|
84
|
+
height: 230px;
|
|
85
|
+
transform: translate(-50%,-50%) scale(10);
|
|
86
|
+
opacity: 0;
|
|
87
|
+
}
|
|
88
|
+
100% {
|
|
89
|
+
width: 0;
|
|
90
|
+
height: 0;
|
|
91
|
+
opacity: 0;
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
@keyframes logo-spin { 100% { -webkit-transform: rotate(360deg); transform: rotate(360deg); } }
|
|
95
|
+
@keyframes logo-color-inside-light {
|
|
96
|
+
0% {
|
|
97
|
+
background: #FEFEFE;
|
|
98
|
+
}
|
|
99
|
+
100% {
|
|
100
|
+
background: #3399CC;
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
@keyframes logo-color-inside-dark {
|
|
104
|
+
0% {
|
|
105
|
+
background: #030303;
|
|
106
|
+
}
|
|
107
|
+
100% {
|
|
108
|
+
background: #3399CC;
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
@keyframes logo-color-inside-colored {
|
|
112
|
+
0% {
|
|
113
|
+
background: #FEFEFE;
|
|
114
|
+
}
|
|
115
|
+
100% {
|
|
116
|
+
background: #3399CC;
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
@keyframes logo-color-inside-blue {
|
|
120
|
+
0% {
|
|
121
|
+
background: #030303;
|
|
122
|
+
}
|
|
123
|
+
100% {
|
|
124
|
+
background: #3399CC;
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
@keyframes logo-color-outside-light {
|
|
129
|
+
0% {
|
|
130
|
+
border-color: #FEFEFE;
|
|
131
|
+
}
|
|
132
|
+
100% {
|
|
133
|
+
border-top-color: #3399CC;
|
|
134
|
+
border-left-color: #164477;
|
|
135
|
+
border-bottom-color: #164477;
|
|
136
|
+
border-right-color: #164477;
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
@keyframes logo-color-outside-dark {
|
|
140
|
+
0% {
|
|
141
|
+
border-color: #040404;
|
|
142
|
+
}
|
|
143
|
+
100% {
|
|
144
|
+
border-top-color: #3399CC;
|
|
145
|
+
border-left-color: #164477;
|
|
146
|
+
border-bottom-color: #164477;
|
|
147
|
+
border-right-color: #164477;
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
@keyframes logo-color-outside-colored {
|
|
151
|
+
0% {
|
|
152
|
+
border-color: #FEFEFE;
|
|
153
|
+
}
|
|
154
|
+
100% {
|
|
155
|
+
border-top-color: #3399CC;
|
|
156
|
+
border-left-color: #164477;
|
|
157
|
+
border-bottom-color: #164477;
|
|
158
|
+
border-right-color: #164477;
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
@keyframes logo-color-outside-blue {
|
|
162
|
+
0% {
|
|
163
|
+
border-color: #040404;
|
|
164
|
+
}
|
|
165
|
+
100% {
|
|
166
|
+
border-top-color: #3399CC;
|
|
167
|
+
border-left-color: #164477;
|
|
168
|
+
border-bottom-color: #164477;
|
|
169
|
+
border-right-color: #164477;
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
.logo-animate-wait {
|
|
174
|
+
animation: logo-color-outside 1.5s, logo-spin 1.5s linear infinite;
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
.logo-animate-grow-light {
|
|
178
|
+
background: #DDD;
|
|
179
|
+
}
|
|
180
|
+
.logo-animate-grow-dark {
|
|
181
|
+
background: #1d1d1d;
|
|
182
|
+
}
|
|
183
|
+
.logo-animate-grow-colored {
|
|
184
|
+
background: #DDD;
|
|
185
|
+
}
|
|
186
|
+
.logo-animate-grow-blue {
|
|
187
|
+
background: #1d1d1d;
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
.logo-animate-grow {
|
|
191
|
+
display: inline-block;
|
|
192
|
+
text-align: center;
|
|
193
|
+
z-index: 1;
|
|
194
|
+
top: 50%;
|
|
195
|
+
left: 50%;
|
|
196
|
+
-ms-transform: translateX(-50%) translateY(-50%);
|
|
197
|
+
-webkit-transform: translate(-50%,-50%);
|
|
198
|
+
transform: translate(-50%,-50%);
|
|
199
|
+
width: 245px;
|
|
200
|
+
height: 245px;
|
|
201
|
+
border-radius: 50%;
|
|
202
|
+
position: absolute;
|
|
203
|
+
animation: logo-grow 1s 1 ease forwards;
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
.logo-animate-color-inside-light {
|
|
207
|
+
animation: logo-color-inside-light 2.5s;
|
|
208
|
+
}
|
|
209
|
+
.logo-animate-color-inside-dark {
|
|
210
|
+
animation: logo-color-inside-dark 2.5s;
|
|
211
|
+
}
|
|
212
|
+
.logo-animate-color-inside-colored {
|
|
213
|
+
animation: logo-color-inside-colored 2.5s;
|
|
214
|
+
}
|
|
215
|
+
.logo-animate-color-inside-blue {
|
|
216
|
+
animation: logo-color-inside-blue 2.5s;
|
|
217
|
+
}
|
|
218
|
+
|
|
219
|
+
.logo-animate-color-outside-light {
|
|
220
|
+
animation: logo-color-outside-light 1.5s;
|
|
221
|
+
}
|
|
222
|
+
.logo-animate-color-outside-dark {
|
|
223
|
+
animation: logo-color-outside-dark 1.5s;
|
|
224
|
+
}
|
|
225
|
+
.logo-animate-color-outside-colored {
|
|
226
|
+
animation: logo-color-outside-colored 1.5s;
|
|
227
|
+
}
|
|
228
|
+
.logo-animate-color-outside-blue {
|
|
229
|
+
animation: logo-color-outside-blue 1.5s;
|
|
230
|
+
}
|
|
231
|
+
`;
|
|
232
|
+
export function LoaderCommunity(props) {
|
|
233
|
+
useEffect(() => {
|
|
234
|
+
if (!window.document.getElementById('loader-iobroker-component')) {
|
|
235
|
+
const style = window.document.createElement('style');
|
|
236
|
+
style.setAttribute('id', 'loader-iobroker-component');
|
|
237
|
+
style.innerHTML = loaderStyles;
|
|
238
|
+
window.document.head.appendChild(style);
|
|
239
|
+
}
|
|
240
|
+
}, []);
|
|
241
|
+
const size = props.size || 234;
|
|
242
|
+
const theme = props.themeName || props.theme || props.themeType || 'light';
|
|
243
|
+
return (React.createElement("div", { className: `logo-back logo-background-${theme}`, style: {
|
|
244
|
+
backgroundImage: props.backgroundImage && props.backgroundImage !== '@@loginBackgroundImage@@'
|
|
245
|
+
? props.backgroundImage
|
|
246
|
+
: window.loadingBackgroundImage && window.loadingBackgroundImage !== '@@loginBackgroundImage@@'
|
|
247
|
+
? `url(${window.loadingBackgroundImage})`
|
|
248
|
+
: undefined,
|
|
249
|
+
backgroundColor: props.backgroundColor && props.backgroundColor !== '@@loginBackgroundColor@@'
|
|
250
|
+
? props.backgroundColor
|
|
251
|
+
: window.loadingBackgroundColor && window.loadingBackgroundColor !== '@@loginBackgroundColor@@'
|
|
252
|
+
? window.loadingBackgroundColor
|
|
253
|
+
: undefined,
|
|
254
|
+
backgroundSize: 'cover',
|
|
255
|
+
} }, window.loadingHideLogo === 'true' ? null : (React.createElement(React.Fragment, null,
|
|
256
|
+
React.createElement("div", { className: "logo-div", style: { width: size, height: size } },
|
|
257
|
+
React.createElement("div", { className: `logo-top logo-background-${theme}`, style: { left: '37%' } }),
|
|
258
|
+
React.createElement("div", { className: `logo-top logo-background-${theme}`, style: { left: '57%' } }),
|
|
259
|
+
React.createElement("div", { className: `logo-border logo-background-${theme} logo-animate-wait`, style: { borderWidth: size * 0.132 } }),
|
|
260
|
+
React.createElement("div", { className: `logo-i logo-animate-color-inside-${theme}` }),
|
|
261
|
+
React.createElement("div", { className: `logo-i-top logo-animate-color-inside-${theme}`, style: { top: '18%' } }),
|
|
262
|
+
React.createElement("div", { className: `logo-i-top logo-animate-color-inside-${theme}`, style: { bottom: '18%' } })),
|
|
263
|
+
React.createElement("div", { className: `logo-animate-grow logo-animate-grow-${theme}`, style: { width: size + 11, height: size + 11 } })))));
|
|
264
|
+
}
|
|
265
|
+
//# sourceMappingURL=Community.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Community.js","sourceRoot":"./src/","sources":["Components/Loaders/Community.tsx"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAWzC,MAAM,YAAY,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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useEffect } from 'react';\nimport type { ThemeName, ThemeType } from '../../types';\n\ndeclare global {\n interface Window {\n loadingBackgroundImage: undefined | string;\n loadingBackgroundColor: undefined | string;\n loadingHideLogo: undefined | 'true';\n }\n}\n\nconst loaderStyles = `\n/**\n * Copyright 2018-2024 Denis Haev (bluefox) <dogafox@gmail.com>\n *\n * MIT License\n *\n **/\n\n.logo-background-light, .logo-background-colored {\n background: white;\n}\n.logo-background-dark, .logo-background-blue {\n background: black;\n}\n.logo-div {\n position: absolute;\n top: 50%;\n left: 50%;\n -ms-transform: translateX(-50%) translateY(-50%);\n -webkit-transform: translate(-50%,-50%);\n transform: translate(-50%,-50%);\n overflow: hidden;\n border-radius: 50%;\n z-index: 2;\n}\n.logo-border {\n /*border-color: #164477;*/\n border-top-color: #3399CC;\n border-left-color: #164477;\n border-bottom-color: #164477;\n border-right-color: #164477;\n border-radius: 50%;\n border-style: solid;\n box-sizing: border-box;\n width: 100%;\n height: 100%;\n position: absolute;\n}\n.logo-top {\n position: absolute;\n width: 4.5%;\n height: 16%;\n top: 0;\n z-index: 2;\n}\n.logo-i {\n position: absolute;\n width: 14.5%;\n height: 60%;\n top: 20%;\n left: 42%;\n background: #3399CC;\n}\n.logo-i-top {\n position: absolute;\n width: 14.5%;\n height: 4%;\n left: 42%;\n background: #3399CC;\n border-radius: 100%;\n}\n.logo-back {\n width: 100%;\n height: 100%;\n z-index: 0;\n overflow: hidden;\n}\n@keyframes logo-grow {\n 0% {\n width: 230px;\n height: 230px;\n transform: translate(-50%,-50%) scale(1);\n opacity: 1\n }\n 99% {\n width: 230px;\n height: 230px;\n transform: translate(-50%,-50%) scale(10);\n opacity: 0;\n }\n 100% {\n width: 0;\n height: 0;\n opacity: 0;\n }\n}\n@keyframes logo-spin { 100% { -webkit-transform: rotate(360deg); transform: rotate(360deg); } }\n@keyframes logo-color-inside-light {\n 0% {\n background: #FEFEFE;\n }\n 100% {\n background: #3399CC;\n }\n}\n@keyframes logo-color-inside-dark {\n 0% {\n background: #030303;\n }\n 100% {\n background: #3399CC;\n }\n}\n@keyframes logo-color-inside-colored {\n 0% {\n background: #FEFEFE;\n }\n 100% {\n background: #3399CC;\n }\n}\n@keyframes logo-color-inside-blue {\n 0% {\n background: #030303;\n }\n 100% {\n background: #3399CC;\n }\n}\n\n@keyframes logo-color-outside-light {\n 0% {\n border-color: #FEFEFE;\n }\n 100% {\n border-top-color: #3399CC;\n border-left-color: #164477;\n border-bottom-color: #164477;\n border-right-color: #164477;\n }\n}\n@keyframes logo-color-outside-dark {\n 0% {\n border-color: #040404;\n }\n 100% {\n border-top-color: #3399CC;\n border-left-color: #164477;\n border-bottom-color: #164477;\n border-right-color: #164477;\n }\n}\n@keyframes logo-color-outside-colored {\n 0% {\n border-color: #FEFEFE;\n }\n 100% {\n border-top-color: #3399CC;\n border-left-color: #164477;\n border-bottom-color: #164477;\n border-right-color: #164477;\n }\n}\n@keyframes logo-color-outside-blue {\n 0% {\n border-color: #040404;\n }\n 100% {\n border-top-color: #3399CC;\n border-left-color: #164477;\n border-bottom-color: #164477;\n border-right-color: #164477;\n }\n}\n\n.logo-animate-wait {\n animation: logo-color-outside 1.5s, logo-spin 1.5s linear infinite;\n}\n\n.logo-animate-grow-light {\n background: #DDD;\n}\n.logo-animate-grow-dark {\n background: #1d1d1d;\n}\n.logo-animate-grow-colored {\n background: #DDD;\n}\n.logo-animate-grow-blue {\n background: #1d1d1d;\n}\n\n.logo-animate-grow {\n display: inline-block;\n text-align: center;\n z-index: 1;\n top: 50%;\n left: 50%;\n -ms-transform: translateX(-50%) translateY(-50%);\n -webkit-transform: translate(-50%,-50%);\n transform: translate(-50%,-50%);\n width: 245px;\n height: 245px;\n border-radius: 50%;\n position: absolute;\n animation: logo-grow 1s 1 ease forwards;\n}\n\n.logo-animate-color-inside-light {\n animation: logo-color-inside-light 2.5s;\n}\n.logo-animate-color-inside-dark {\n animation: logo-color-inside-dark 2.5s;\n}\n.logo-animate-color-inside-colored {\n animation: logo-color-inside-colored 2.5s;\n}\n.logo-animate-color-inside-blue {\n animation: logo-color-inside-blue 2.5s;\n}\n\n.logo-animate-color-outside-light {\n animation: logo-color-outside-light 1.5s;\n}\n.logo-animate-color-outside-dark {\n animation: logo-color-outside-dark 1.5s;\n}\n.logo-animate-color-outside-colored {\n animation: logo-color-outside-colored 1.5s;\n}\n.logo-animate-color-outside-blue {\n animation: logo-color-outside-blue 1.5s;\n}\n`;\n\ninterface LoaderProps {\n /** The size in pixels of this loader. */\n size?: number;\n /** The chosen theme type. */\n themeType?: ThemeType;\n /** Theme name */\n themeName?: ThemeName;\n /** @deprecated Theme name. use themeName instead */\n theme?: ThemeName;\n /** Background color */\n backgroundColor?: string;\n /** Background image URL */\n backgroundImage?: string;\n}\n\nexport function LoaderCommunity(props: LoaderProps): React.JSX.Element {\n useEffect(() => {\n if (!window.document.getElementById('loader-iobroker-component')) {\n const style = window.document.createElement('style');\n style.setAttribute('id', 'loader-iobroker-component');\n style.innerHTML = loaderStyles;\n window.document.head.appendChild(style);\n }\n }, []);\n\n const size = props.size || 234;\n const theme = props.themeName || props.theme || props.themeType || 'light';\n return (\n <div\n className={`logo-back logo-background-${theme}`}\n style={{\n backgroundImage:\n props.backgroundImage && props.backgroundImage !== '@@loginBackgroundImage@@'\n ? props.backgroundImage\n : window.loadingBackgroundImage && window.loadingBackgroundImage !== '@@loginBackgroundImage@@'\n ? `url(${window.loadingBackgroundImage})`\n : undefined,\n backgroundColor:\n props.backgroundColor && props.backgroundColor !== '@@loginBackgroundColor@@'\n ? props.backgroundColor\n : window.loadingBackgroundColor && window.loadingBackgroundColor !== '@@loginBackgroundColor@@'\n ? window.loadingBackgroundColor\n : undefined,\n backgroundSize: 'cover',\n }}\n >\n {window.loadingHideLogo === 'true' ? null : (\n <>\n <div\n className=\"logo-div\"\n style={{ width: size, height: size }}\n >\n <div\n className={`logo-top logo-background-${theme}`}\n style={{ left: '37%' }}\n />\n <div\n className={`logo-top logo-background-${theme}`}\n style={{ left: '57%' }}\n />\n <div\n className={`logo-border logo-background-${theme} logo-animate-wait`}\n style={{ borderWidth: size * 0.132 }}\n />\n <div className={`logo-i logo-animate-color-inside-${theme}`} />\n <div\n className={`logo-i-top logo-animate-color-inside-${theme}`}\n style={{ top: '18%' }}\n />\n <div\n className={`logo-i-top logo-animate-color-inside-${theme}`}\n style={{ bottom: '18%' }}\n />\n </div>\n <div\n className={`logo-animate-grow logo-animate-grow-${theme}`}\n style={{ width: size + 11, height: size + 11 }}\n />\n </>\n )}\n </div>\n );\n}\n"]}
|