@firedesktop/react-base 1.5.0 → 1.8.0
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/debug.log +1 -0
- package/dist/ConfigurationManager.js +1 -1
- package/dist/ConfigurationManager.js.map +1 -1
- package/dist/LanguageManager.js +1 -1
- package/dist/LanguageManager.js.map +1 -1
- package/dist/components/AppIcon.d.ts +14 -0
- package/dist/components/AppIcon.js +163 -0
- package/dist/components/AppIcon.js.map +1 -0
- package/dist/components/index.d.ts +2 -0
- package/dist/components/index.js +3 -0
- package/dist/components/index.js.map +1 -0
- package/dist/index.d.ts +2 -1
- package/dist/index.js +2 -1
- package/dist/index.js.map +1 -1
- package/dist/styles/base.css +348 -0
- package/package.json +18 -18
- package/public/configuration/config.json +1 -0
- package/src/App.tsx +5 -3
- package/src/lib/ConfigurationManager.ts +1 -1
- package/src/lib/LanguageManager.ts +1 -1
- package/src/lib/components/AppIcon.tsx +764 -0
- package/src/lib/components/index.ts +3 -0
- package/src/lib/index.ts +3 -1
- package/src/lib/styles/base.css +348 -0
- package/src/types/ConfigurationLoader.js +1 -0
- package/src/types/ConfigurationLoader.js.map +1 -0
- package/src/types/ConfigurationManager.d.ts +2 -1
- package/src/types/ConfigurationManager.js +26 -7
- package/src/types/ConfigurationManager.js.map +1 -0
- package/src/types/LanguageLoader.js +2 -1
- package/src/types/LanguageLoader.js.map +1 -0
- package/src/types/LanguageManager.d.ts +2 -1
- package/src/types/LanguageManager.js +26 -7
- package/src/types/LanguageManager.js.map +1 -0
- package/src/types/components/AppIcon.d.ts +14 -0
- package/src/types/components/AppIcon.js +163 -0
- package/src/types/components/AppIcon.js.map +1 -0
- package/src/types/index.js +1 -0
- package/src/types/index.js.map +1 -0
|
@@ -0,0 +1,348 @@
|
|
|
1
|
+
:root {
|
|
2
|
+
--background-color: linear-gradient(
|
|
3
|
+
180deg,
|
|
4
|
+
#0057ff 0%,
|
|
5
|
+
rgba(0, 87, 255, 0.7) 100%,
|
|
6
|
+
rgba(0, 87, 255, 0.7) 100%
|
|
7
|
+
);
|
|
8
|
+
--background-gradient-active: linear-gradient(
|
|
9
|
+
270deg,
|
|
10
|
+
rgba(0, 87, 255, 0.7) 0%,
|
|
11
|
+
#0057ff 100%
|
|
12
|
+
);
|
|
13
|
+
|
|
14
|
+
--background-progress-circle: linear-gradient(
|
|
15
|
+
270deg,
|
|
16
|
+
rgba(0, 87, 255, 0.7) 0%,
|
|
17
|
+
#0057ff 78.42%
|
|
18
|
+
);
|
|
19
|
+
|
|
20
|
+
--background-progress-fill: linear-gradient(
|
|
21
|
+
270deg,
|
|
22
|
+
rgba(106, 157, 255, 0.7) 0%,
|
|
23
|
+
#6a9dff 50.95%
|
|
24
|
+
);
|
|
25
|
+
--background-progress: linear-gradient(
|
|
26
|
+
270deg,
|
|
27
|
+
rgba(106, 157, 255, 0.7) 0%,
|
|
28
|
+
#6a9dff 100%
|
|
29
|
+
);
|
|
30
|
+
--font-Josefin-sans: "Josefin Sans", sans-serif !important;
|
|
31
|
+
--font-Roboto: "Roboto", sans-serif !important;
|
|
32
|
+
--primary-color: #0057ff;
|
|
33
|
+
--warning-color: #ffc14e;
|
|
34
|
+
--danger-color: #e80026;
|
|
35
|
+
--tertiary-color: #b1aeae;
|
|
36
|
+
--success-color: #00854d;
|
|
37
|
+
--light-color: #c0c0c0;
|
|
38
|
+
--white-color: #ffffff;
|
|
39
|
+
--dark-pink-color: #de31d2;
|
|
40
|
+
--menu-dropdown-background: rgba(238, 238, 238, 0.9);
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
body {
|
|
44
|
+
background: #f7f7f7 !important;
|
|
45
|
+
font-family: var(--font-Roboto);
|
|
46
|
+
overflow-x: hidden;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
p {
|
|
50
|
+
color: var(--para-color);
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
.tertiary-text {
|
|
54
|
+
color: var(--tertiary-color);
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
.primary-text {
|
|
58
|
+
color: var(--primary-color);
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
.white-text {
|
|
62
|
+
color: var(--white-color);
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
.light-text {
|
|
66
|
+
color: var(--light-color);
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
.danger-text {
|
|
70
|
+
color: var(--danger-color);
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
.success-text {
|
|
74
|
+
color: var(--success-color);
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
.dark-pink-text {
|
|
78
|
+
color: var(--dark-pink-color);
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
|
|
82
|
+
/* SVG Start */
|
|
83
|
+
.warning-svg {
|
|
84
|
+
fill: var(--warning-color);
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
.tertiary-svg {
|
|
88
|
+
fill: var(--tertiary-color);
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
.primary-svg {
|
|
92
|
+
fill: var(--primary-color);
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
.white-svg {
|
|
96
|
+
fill: var(--white-color);
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
.light-svg {
|
|
100
|
+
fill: var(--light-color);
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
.danger-svg {
|
|
104
|
+
fill: var(--danger-color);
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
.success-svg {
|
|
108
|
+
fill: var(--success-color);
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
.dark-pink-svg {
|
|
112
|
+
fill: var(--dark-pink-color);
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
.warning-svg-stroke {
|
|
116
|
+
stroke: var(--warning-color);
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
.tertiary-svg-stroke {
|
|
120
|
+
stroke: var(--tertiary-color);
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
.primary-svg-stroke {
|
|
124
|
+
stroke: var(--primary-color);
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
.white-svg-stroke {
|
|
128
|
+
stroke: var(--white-color);
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
.light-svg-stroke {
|
|
132
|
+
stroke: var(--light-color);
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
.danger-svg-stroke {
|
|
136
|
+
stroke: var(--danger-color);
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
.success-svg-stroke {
|
|
140
|
+
stroke: var(--success-color);
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
.dark-pink-svg-stroke {
|
|
144
|
+
stroke: var(--dark-pink-color);
|
|
145
|
+
}
|
|
146
|
+
/* SVG End */
|
|
147
|
+
|
|
148
|
+
/* Fonts Start */
|
|
149
|
+
.fz10 {
|
|
150
|
+
font-size: 10px;
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
.fz11 {
|
|
154
|
+
font-size: 11px;
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
.fz12 {
|
|
158
|
+
font-size: 12px;
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
.fz13 {
|
|
162
|
+
font-size: 13px;
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
.fz14 {
|
|
166
|
+
font-size: 14px;
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
.fz15 {
|
|
170
|
+
font-size: 15px;
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
.fz16 {
|
|
174
|
+
font-size: 16px;
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
.fz17 {
|
|
178
|
+
font-size: 17px;
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
.fz18 {
|
|
182
|
+
font-size: 18px;
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
.fz19 {
|
|
186
|
+
font-size: 19px;
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
.fz20 {
|
|
190
|
+
font-size: 20px;
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
.fz21 {
|
|
194
|
+
font-size: 21px;
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
.fz22 {
|
|
198
|
+
font-size: 22px;
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
.fz24 {
|
|
202
|
+
font-size: 24px;
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
.fz25 {
|
|
206
|
+
font-size: 25px;
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
.fz26 {
|
|
210
|
+
font-size: 26px;
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
.fz28 {
|
|
214
|
+
font-size: 28px;
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
.fz30 {
|
|
218
|
+
font-size: 30px;
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
.fz32 {
|
|
222
|
+
font-size: 32px;
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
.fz34 {
|
|
226
|
+
font-size: 34px;
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
.fz36 {
|
|
230
|
+
font-size: 36px;
|
|
231
|
+
}
|
|
232
|
+
|
|
233
|
+
.fz38 {
|
|
234
|
+
font-size: 38px;
|
|
235
|
+
}
|
|
236
|
+
|
|
237
|
+
.fz40 {
|
|
238
|
+
font-size: 40px;
|
|
239
|
+
}
|
|
240
|
+
|
|
241
|
+
.fz45 {
|
|
242
|
+
font-size: 45px;
|
|
243
|
+
}
|
|
244
|
+
|
|
245
|
+
.fz50 {
|
|
246
|
+
font-size: 50px;
|
|
247
|
+
}
|
|
248
|
+
|
|
249
|
+
.fz60 {
|
|
250
|
+
font-size: 60px;
|
|
251
|
+
}
|
|
252
|
+
|
|
253
|
+
.fz70 {
|
|
254
|
+
font-size: 70px;
|
|
255
|
+
}
|
|
256
|
+
/* Fonts End */
|
|
257
|
+
|
|
258
|
+
|
|
259
|
+
/* breadcrumb */
|
|
260
|
+
.breadcrumb_text {
|
|
261
|
+
position: relative;
|
|
262
|
+
color: var(--primary-color);
|
|
263
|
+
}
|
|
264
|
+
|
|
265
|
+
.breadcrumb_text::after {
|
|
266
|
+
content: "";
|
|
267
|
+
width: 100%;
|
|
268
|
+
height: 5px;
|
|
269
|
+
background: var(--primary-color);
|
|
270
|
+
position: absolute;
|
|
271
|
+
left: 0;
|
|
272
|
+
bottom: -16px;
|
|
273
|
+
border-radius: 2px;
|
|
274
|
+
}
|
|
275
|
+
|
|
276
|
+
.warning-text {
|
|
277
|
+
color: var(--warning-color);
|
|
278
|
+
}
|
|
279
|
+
|
|
280
|
+
.success-border {
|
|
281
|
+
border: 2px solid var(--success-color);
|
|
282
|
+
}
|
|
283
|
+
|
|
284
|
+
.danger-border {
|
|
285
|
+
border: 2px solid var(--danger-color);
|
|
286
|
+
}
|
|
287
|
+
|
|
288
|
+
.warning-border {
|
|
289
|
+
border: 2px solid var(--warning-color);
|
|
290
|
+
}
|
|
291
|
+
.white-border {
|
|
292
|
+
border: 2px solid var(--primary-color);
|
|
293
|
+
}
|
|
294
|
+
.success-background {
|
|
295
|
+
background: var(--success-color);
|
|
296
|
+
color: var(--white-color);
|
|
297
|
+
}
|
|
298
|
+
|
|
299
|
+
.white-background {
|
|
300
|
+
background: var(--primary-color);
|
|
301
|
+
color: var(--white-color);
|
|
302
|
+
}
|
|
303
|
+
.danger-background {
|
|
304
|
+
background: var(--danger-color);
|
|
305
|
+
color: var(--white-color);
|
|
306
|
+
}
|
|
307
|
+
|
|
308
|
+
.warning-background {
|
|
309
|
+
background: var(--warning-color);
|
|
310
|
+
color: var(--white-color);
|
|
311
|
+
}
|
|
312
|
+
.rounded10 {
|
|
313
|
+
border-radius: 10px;
|
|
314
|
+
}
|
|
315
|
+
.custom-control-label::before {
|
|
316
|
+
border-color: var(--primary-color) !important;
|
|
317
|
+
}
|
|
318
|
+
.custom-control-input:checked ~ .custom-control-label::before {
|
|
319
|
+
color: #fff;
|
|
320
|
+
border-color: var(--primary-color) !important;
|
|
321
|
+
background-color: #fff !important;
|
|
322
|
+
}
|
|
323
|
+
.custom-radio .custom-control-input:checked ~ .custom-control-label::after {
|
|
324
|
+
background-color: var(--primary-color) !important;
|
|
325
|
+
background-image: none !important;
|
|
326
|
+
}
|
|
327
|
+
.custom-control-label::after {
|
|
328
|
+
position: absolute;
|
|
329
|
+
top: 0.4rem !important;
|
|
330
|
+
left: -1.35rem !important;
|
|
331
|
+
display: block;
|
|
332
|
+
width: 0.7rem !important;
|
|
333
|
+
height: 0.7rem !important;
|
|
334
|
+
content: "";
|
|
335
|
+
background: no-repeat 50% / 50% 50%;
|
|
336
|
+
border-radius: 100%;
|
|
337
|
+
}
|
|
338
|
+
.btn-info {
|
|
339
|
+
opacity: 0;
|
|
340
|
+
cursor: no-drop;
|
|
341
|
+
width: 0px;
|
|
342
|
+
height: 0px;
|
|
343
|
+
background-color: var(--primary-color) !important;
|
|
344
|
+
}
|
|
345
|
+
|
|
346
|
+
.MuiAutocomplete-proper *{
|
|
347
|
+
transition: none !important;
|
|
348
|
+
}
|
package/package.json
CHANGED
|
@@ -1,43 +1,43 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@firedesktop/react-base",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.8.0",
|
|
4
4
|
"license": "ISC",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"description": "This is the FireDesktop base package used to support every React Project in this Company.",
|
|
7
7
|
"author": "alessandro.gambaro",
|
|
8
8
|
"repository": "https://firedesktopDevOps@dev.azure.com/firedesktopDevOps/baseFEComponents/_git/baseFEComponents",
|
|
9
9
|
"dependencies": {
|
|
10
|
-
"react": "^
|
|
11
|
-
"react-dom": "^
|
|
12
|
-
"react-redux": "^7.2.1"
|
|
13
|
-
"redux": "^4.0.5"
|
|
10
|
+
"react": "^16.14.0",
|
|
11
|
+
"react-dom": "^16.14.0",
|
|
12
|
+
"react-redux": "^7.2.1"
|
|
14
13
|
},
|
|
15
14
|
"devDependencies": {
|
|
16
|
-
"@types/jest": "^26.0.15",
|
|
17
|
-
"@types/node": "^12.19.1",
|
|
18
|
-
"@types/react": "^16.9.53",
|
|
19
|
-
"@types/react-dom": "^16.9.8",
|
|
20
|
-
"@types/react-redux": "^7.1.9",
|
|
21
|
-
"@testing-library/jest-dom": "^5.11.5",
|
|
22
|
-
"@testing-library/react": "^11.1.0",
|
|
23
|
-
"@testing-library/user-event": "^12.1.10",
|
|
24
15
|
"@babel/cli": "^7.10.5",
|
|
25
16
|
"@babel/core": "^7.10.5",
|
|
26
17
|
"@babel/plugin-proposal-class-properties": "7.10.4",
|
|
27
18
|
"@babel/plugin-transform-arrow-functions": "^7.12.1",
|
|
28
19
|
"@babel/preset-typescript": "^7.12.1",
|
|
29
|
-
"
|
|
20
|
+
"@testing-library/jest-dom": "^5.11.5",
|
|
21
|
+
"@testing-library/react": "^11.1.0",
|
|
22
|
+
"@testing-library/user-event": "^12.1.10",
|
|
23
|
+
"@types/jest": "^26.0.15",
|
|
24
|
+
"@types/node": "^12.19.1",
|
|
25
|
+
"@types/react": "^16.9.53",
|
|
26
|
+
"@types/react-dom": "^16.9.8",
|
|
27
|
+
"@types/react-redux": "^7.1.9",
|
|
30
28
|
"babel-plugin-minify-builtins": "^0.5.0",
|
|
29
|
+
"babel-preset-minify": "0.5.1",
|
|
30
|
+
"copyfiles": "^2.4.0",
|
|
31
31
|
"react-scripts": "^3.4.3",
|
|
32
32
|
"typescript": "^4.0.3",
|
|
33
|
-
"web-vitals": "^0.2.4"
|
|
34
|
-
"@firedesktop/react-base": "1.2.0"
|
|
33
|
+
"web-vitals": "^0.2.4"
|
|
35
34
|
},
|
|
36
35
|
"peerDependencies": {},
|
|
37
36
|
"scripts": {
|
|
38
37
|
"distribute_not_working": "rmdir /s /q dist & mkdir dist && npx babel src/lib --out-dir dist --extensions \".js,.ts,.tsx\" --source-maps inline",
|
|
39
|
-
"start": "react-scripts start",
|
|
40
|
-
"distribute": "rmdir /s /q dist & mkdir dist && tsc"
|
|
38
|
+
"start": "react-scripts start && copy ./src/lib/styles/* ./dist/styles/ && tsc",
|
|
39
|
+
"distribute": "rmdir /s /q dist & mkdir dist\\styles && tsc && copyfiles -f src/lib/styles/* dist/styles",
|
|
40
|
+
"suca": "copyfiles -f src/lib/styles/* dist/styles"
|
|
41
41
|
},
|
|
42
42
|
"eslintConfig": {
|
|
43
43
|
"extends": [
|
package/src/App.tsx
CHANGED
|
@@ -5,6 +5,9 @@ import { createStore } from 'redux';
|
|
|
5
5
|
import ConfigurationLoader from './types/ConfigurationLoader';
|
|
6
6
|
// import LanguageLoader from './types/LanguageLoader';
|
|
7
7
|
import TestLabelFunction from './TestLabelFunction';
|
|
8
|
+
import AppIcon from './lib/components/AppIcon';
|
|
9
|
+
|
|
10
|
+
import './lib/styles/base.css';
|
|
8
11
|
|
|
9
12
|
export const UPDATE_APP_STATE = 'UPDATE_APP_STATE';
|
|
10
13
|
const appReducer = (state = {}, action: any) => {
|
|
@@ -38,11 +41,10 @@ function App() {
|
|
|
38
41
|
return (
|
|
39
42
|
|
|
40
43
|
<Provider store={store}>
|
|
41
|
-
|
|
44
|
+
<AppIcon name={"Pin"} className='dark-pink-svg'/>
|
|
42
45
|
<TestLabelFunction />
|
|
43
46
|
<ConfigurationLoader updateAppState={updateAppState} path={null} />
|
|
44
|
-
{/*
|
|
45
|
-
<LanguageLoader updateAppState={updateAppState} locale='it-IT' path={null} /> */}
|
|
47
|
+
{/* <LanguageLoader updateAppState={updateAppState} locale='it-IT' path={null} /> */}
|
|
46
48
|
</Provider >
|
|
47
49
|
);
|
|
48
50
|
}
|
|
@@ -11,7 +11,7 @@ function ConfigurationManager() {
|
|
|
11
11
|
};
|
|
12
12
|
|
|
13
13
|
async function loadConfigurationWithDispatch(dispatch: any, updateAppState: any, configuration: any) {
|
|
14
|
-
if (!configuration) {
|
|
14
|
+
if (!configuration || !configuration.loaded) {
|
|
15
15
|
const fullPath = './configuration/config.json';
|
|
16
16
|
console.log(`Loading Configuration for this Site from this path: ${fullPath}`);
|
|
17
17
|
loadConfiguration(fullPath).then((response: any) => {
|
|
@@ -11,7 +11,7 @@ function LanguageManager() {
|
|
|
11
11
|
};
|
|
12
12
|
|
|
13
13
|
async function loadLabelsWithDispatch(dispatch: any, updateAppState: any, labels: any, language: string) {
|
|
14
|
-
if (!labels.language || labels.language !== language) {
|
|
14
|
+
if (!labels || !labels.language || labels.language !== language) {
|
|
15
15
|
const fullPath = `./labels/${language}.json`;
|
|
16
16
|
console.log(`Loading Labels for this Language ${language}, from this path: ${fullPath}`);
|
|
17
17
|
loadLabels(fullPath).then((response: any) => {
|