@firedesktop/react-base 1.64.0 → 1.67.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/dist/utils/configuration/ConfigurationManager.js +11 -3
- package/dist/utils/configuration/ConfigurationManager.js.map +1 -1
- package/dist/utils/labels/LanguageManager.js +11 -3
- package/dist/utils/labels/LanguageManager.js.map +1 -1
- package/package.json +14 -14
- package/src/App.css +12 -0
- package/src/lib/utils/configuration/ConfigurationManager.ts +10 -2
- package/src/lib/utils/labels/LanguageManager.ts +10 -2
|
@@ -42,7 +42,14 @@ function ConfigurationManager() {
|
|
|
42
42
|
switch (_a.label) {
|
|
43
43
|
case 0:
|
|
44
44
|
_a.trys.push([0, 3, , 4]);
|
|
45
|
-
return [4, fetch(fullPath, {
|
|
45
|
+
return [4, fetch(fullPath, {
|
|
46
|
+
headers: {
|
|
47
|
+
'Content-Type': 'application/json; charset=utf-8',
|
|
48
|
+
'Cache-Control': 'no-cache, no-store, must-revalidate',
|
|
49
|
+
'Expires': '0',
|
|
50
|
+
'pragma': 'no-cache'
|
|
51
|
+
}
|
|
52
|
+
})];
|
|
46
53
|
case 1:
|
|
47
54
|
res = _a.sent();
|
|
48
55
|
return [4, res.json()];
|
|
@@ -59,10 +66,11 @@ function ConfigurationManager() {
|
|
|
59
66
|
;
|
|
60
67
|
function loadConfigurationWithDispatch(dispatch, updateAppState, configuration) {
|
|
61
68
|
return __awaiter(this, void 0, void 0, function () {
|
|
62
|
-
var fullPath_1;
|
|
69
|
+
var avoidCache, fullPath_1;
|
|
63
70
|
return __generator(this, function (_a) {
|
|
64
71
|
if (!configuration || !configuration.loaded) {
|
|
65
|
-
|
|
72
|
+
avoidCache = new Date().getTime();
|
|
73
|
+
fullPath_1 = "/configuration/config.json?".concat(avoidCache);
|
|
66
74
|
console.log("Loading Configuration for this Site from this path: ".concat(fullPath_1));
|
|
67
75
|
loadConfiguration(fullPath_1).then(function (response) {
|
|
68
76
|
console.log("Loaded Configuration for this Site in this path: ".concat(fullPath_1), response);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ConfigurationManager.js","sourceRoot":"","sources":["../../../src/lib/utils/configuration/ConfigurationManager.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,SAAS,oBAAoB;IAEzB,SAAe,iBAAiB,CAAC,QAAgB;;;;;;;wBAE7B,WAAM,KAAK,CAAC,QAAQ,EAAE,
|
|
1
|
+
{"version":3,"file":"ConfigurationManager.js","sourceRoot":"","sources":["../../../src/lib/utils/configuration/ConfigurationManager.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,SAAS,oBAAoB;IAEzB,SAAe,iBAAiB,CAAC,QAAgB;;;;;;;wBAE7B,WAAM,KAAK,CAAC,QAAQ,EAAE;gCAC9B,OAAO,EAAE;oCACL,cAAc,EAAE,iCAAiC;oCACjD,eAAe,EAAE,qCAAqC;oCACtD,SAAS,EAAE,GAAG;oCACd,QAAQ,EAAE,UAAU;iCACvB;6BACJ,CAAC,EAAA;;wBAPI,GAAG,GAAG,SAOV;wBACK,WAAM,GAAG,CAAC,IAAI,EAAE,EAAA;4BAAvB,WAAO,SAAgB,EAAC;;;wBAGxB,OAAO,CAAC,KAAK,CAAC,iCAAiC,CAAC,CAAC;;;;;;KAExD;IAAA,CAAC;IAEF,SAAe,6BAA6B,CAAC,QAAa,EAAE,cAAmB,EAAE,aAAkB;;;;gBAC/F,IAAI,CAAC,aAAa,IAAI,CAAC,aAAa,CAAC,MAAM,EAAE;oBACrC,UAAU,GAAG,IAAI,IAAI,EAAE,CAAC,OAAO,EAAE,CAAC;oBAChC,aAAW,qCAA8B,UAAU,CAAE,CAAC;oBAC5D,OAAO,CAAC,GAAG,CAAC,8DAAuD,UAAQ,CAAE,CAAC,CAAC;oBAC/E,iBAAiB,CAAC,UAAQ,CAAC,CAAC,IAAI,CAAC,UAAC,QAAa;wBAC3C,OAAO,CAAC,GAAG,CAAC,2DAAoD,UAAQ,CAAE,EAAE,QAAQ,CAAC,CAAC;wBACtF,QAAQ,CAAC,cAAc,CAAC,eAAe,EAAE,QAAQ,CAAC,CAAC,CAAC;oBACxD,CAAC,CAAC,CAAC,KAAK,CAAC,UAAC,GAAQ;wBACd,OAAO,CAAC,KAAK,CAAC,+DAAwD,UAAQ,CAAE,CAAC,CAAC;oBACtF,CAAC,CAAC,CAAC;iBACN;;;;KACJ;IAED,OAAO,EAAE,iBAAiB,mBAAA,EAAE,6BAA6B,+BAAA,EAAE,CAAC;AAChE,CAAC;AAED,eAAe,oBAAoB,CAAC"}
|
|
@@ -42,7 +42,14 @@ function LanguageManager() {
|
|
|
42
42
|
switch (_a.label) {
|
|
43
43
|
case 0:
|
|
44
44
|
_a.trys.push([0, 3, , 4]);
|
|
45
|
-
return [4, fetch(fullPath, {
|
|
45
|
+
return [4, fetch(fullPath, {
|
|
46
|
+
headers: {
|
|
47
|
+
'Content-Type': 'application/json; charset=utf-8',
|
|
48
|
+
'Cache-Control': 'no-cache, no-store, must-revalidate',
|
|
49
|
+
'Expires': '0',
|
|
50
|
+
'pragma': 'no-cache'
|
|
51
|
+
}
|
|
52
|
+
})];
|
|
46
53
|
case 1:
|
|
47
54
|
res = _a.sent();
|
|
48
55
|
return [4, res.json()];
|
|
@@ -59,10 +66,11 @@ function LanguageManager() {
|
|
|
59
66
|
;
|
|
60
67
|
function loadLabelsWithDispatch(dispatch, updateAppState, labels, language) {
|
|
61
68
|
return __awaiter(this, void 0, void 0, function () {
|
|
62
|
-
var fullPath_1;
|
|
69
|
+
var avoidCache, fullPath_1;
|
|
63
70
|
return __generator(this, function (_a) {
|
|
64
71
|
if (!labels || !labels.language || labels.language !== language) {
|
|
65
|
-
|
|
72
|
+
avoidCache = new Date().getTime();
|
|
73
|
+
fullPath_1 = "./labels/".concat(language, ".json?").concat(avoidCache);
|
|
66
74
|
console.log("Loading Labels for this Language ".concat(language, ", from this path: ").concat(fullPath_1));
|
|
67
75
|
loadLabels(fullPath_1).then(function (response) {
|
|
68
76
|
console.log("Loaded Labels for this Language ".concat(language), response);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LanguageManager.js","sourceRoot":"","sources":["../../../src/lib/utils/labels/LanguageManager.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,SAAS,eAAe;IAEpB,SAAe,UAAU,CAAC,QAAgB;;;;;;;wBAEtB,WAAM,KAAK,CAAC,QAAQ,EAAE,
|
|
1
|
+
{"version":3,"file":"LanguageManager.js","sourceRoot":"","sources":["../../../src/lib/utils/labels/LanguageManager.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,SAAS,eAAe;IAEpB,SAAe,UAAU,CAAC,QAAgB;;;;;;;wBAEtB,WAAM,KAAK,CAAC,QAAQ,EAAE;gCAC9B,OAAO,EAAE;oCACL,cAAc,EAAE,iCAAiC;oCACjD,eAAe,EAAE,qCAAqC;oCACtD,SAAS,EAAE,GAAG;oCACd,QAAQ,EAAE,UAAU;iCACvB;6BACJ,CAAC,EAAA;;wBAPI,GAAG,GAAG,SAOV;wBACK,WAAM,GAAG,CAAC,IAAI,EAAE,EAAA;4BAAvB,WAAO,SAAgB,EAAC;;;wBAGxB,OAAO,CAAC,IAAI,CAAC,4BAAqB,QAAQ,eAAY,CAAC,CAAC;;;;;;KAE/D;IAAA,CAAC;IAEF,SAAe,sBAAsB,CAAC,QAAa,EAAE,cAAmB,EAAE,MAAW,EAAE,QAAgB;;;;gBACnG,IAAI,CAAC,MAAM,IAAI,CAAC,MAAM,CAAC,QAAQ,IAAI,MAAM,CAAC,QAAQ,KAAK,QAAQ,EAAE;oBACzD,UAAU,GAAG,IAAI,IAAI,EAAE,CAAC,OAAO,EAAE,CAAC;oBAChC,aAAW,mBAAY,QAAQ,mBAAS,UAAU,CAAE,CAAC;oBAC3D,OAA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U,YAAA;QACV,sBAAsB,wBAAA;KACzB,CAAC;AACN,CAAC;AAED,eAAe,eAAe,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,29 +1,29 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@firedesktop/react-base",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.67.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
|
-
"@syncfusion/ej2-popups": "
|
|
11
|
-
"@syncfusion/ej2-react-notifications": "
|
|
10
|
+
"@syncfusion/ej2-popups": "21.1.37",
|
|
11
|
+
"@syncfusion/ej2-react-notifications": "21.1.37"
|
|
12
12
|
},
|
|
13
13
|
"devDependencies": {
|
|
14
|
-
"@babel/cli": "7.
|
|
15
|
-
"@babel/core": "7.
|
|
14
|
+
"@babel/cli": "7.21.0",
|
|
15
|
+
"@babel/core": "7.21.4",
|
|
16
16
|
"@babel/plugin-proposal-class-properties": "7.18.6",
|
|
17
|
-
"@babel/plugin-transform-arrow-functions": "7.
|
|
18
|
-
"@babel/preset-typescript": "7.
|
|
17
|
+
"@babel/plugin-transform-arrow-functions": "7.20.7",
|
|
18
|
+
"@babel/preset-typescript": "7.21.4",
|
|
19
19
|
"@testing-library/jest-dom": "5.16.5",
|
|
20
|
-
"@testing-library/react": "
|
|
20
|
+
"@testing-library/react": "14.0.0",
|
|
21
21
|
"@testing-library/user-event": "14.4.3",
|
|
22
|
-
"@types/jest": "29.
|
|
23
|
-
"@types/node": "18.11
|
|
24
|
-
"@types/react": "18.0.
|
|
25
|
-
"@types/react-dom": "18.0.
|
|
26
|
-
"@types/react-redux": "7.1.
|
|
22
|
+
"@types/jest": "29.5.0",
|
|
23
|
+
"@types/node": "18.15.11",
|
|
24
|
+
"@types/react": "18.0.35",
|
|
25
|
+
"@types/react-dom": "18.0.11",
|
|
26
|
+
"@types/react-redux": "7.1.25",
|
|
27
27
|
"babel-plugin-minify-builtins": "0.5.0",
|
|
28
28
|
"babel-preset-minify": "0.5.2",
|
|
29
29
|
"bootstrap": "4.6.0",
|
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
"react-redux": "8.0.5",
|
|
35
35
|
"react-scripts": "5.0.1",
|
|
36
36
|
"typescript": "4.9.4",
|
|
37
|
-
"web-vitals": "3.1
|
|
37
|
+
"web-vitals": "3.3.1"
|
|
38
38
|
},
|
|
39
39
|
"peerDependencies": {
|
|
40
40
|
"bootstrap": ">=4.5.3",
|
package/src/App.css
ADDED
|
@@ -2,7 +2,14 @@ function ConfigurationManager() {
|
|
|
2
2
|
|
|
3
3
|
async function loadConfiguration(fullPath: string) {
|
|
4
4
|
try {
|
|
5
|
-
const res = await fetch(fullPath, {
|
|
5
|
+
const res = await fetch(fullPath, {
|
|
6
|
+
headers: {
|
|
7
|
+
'Content-Type': 'application/json; charset=utf-8',
|
|
8
|
+
'Cache-Control': 'no-cache, no-store, must-revalidate',
|
|
9
|
+
'Expires': '0',
|
|
10
|
+
'pragma': 'no-cache'
|
|
11
|
+
}
|
|
12
|
+
});
|
|
6
13
|
return await res.json();
|
|
7
14
|
}
|
|
8
15
|
catch (err) {
|
|
@@ -12,7 +19,8 @@ function ConfigurationManager() {
|
|
|
12
19
|
|
|
13
20
|
async function loadConfigurationWithDispatch(dispatch: any, updateAppState: any, configuration: any) {
|
|
14
21
|
if (!configuration || !configuration.loaded) {
|
|
15
|
-
|
|
22
|
+
var avoidCache = new Date().getTime();
|
|
23
|
+
const fullPath = `/configuration/config.json?${avoidCache}`;
|
|
16
24
|
console.log(`Loading Configuration for this Site from this path: ${fullPath}`);
|
|
17
25
|
loadConfiguration(fullPath).then((response: any) => {
|
|
18
26
|
console.log(`Loaded Configuration for this Site in this path: ${fullPath}`, response);
|
|
@@ -2,7 +2,14 @@ function LanguageManager() {
|
|
|
2
2
|
|
|
3
3
|
async function loadLabels(fullPath: string) {
|
|
4
4
|
try {
|
|
5
|
-
const res = await fetch(fullPath, {
|
|
5
|
+
const res = await fetch(fullPath, {
|
|
6
|
+
headers: {
|
|
7
|
+
'Content-Type': 'application/json; charset=utf-8',
|
|
8
|
+
'Cache-Control': 'no-cache, no-store, must-revalidate',
|
|
9
|
+
'Expires': '0',
|
|
10
|
+
'pragma': 'no-cache'
|
|
11
|
+
}
|
|
12
|
+
});
|
|
6
13
|
return await res.json();
|
|
7
14
|
}
|
|
8
15
|
catch (err) {
|
|
@@ -12,7 +19,8 @@ function LanguageManager() {
|
|
|
12
19
|
|
|
13
20
|
async function loadLabelsWithDispatch(dispatch: any, updateAppState: any, labels: any, language: string) {
|
|
14
21
|
if (!labels || !labels.language || labels.language !== language) {
|
|
15
|
-
|
|
22
|
+
var avoidCache = new Date().getTime();
|
|
23
|
+
const fullPath = `./labels/${language}.json?${avoidCache}`;
|
|
16
24
|
console.log(`Loading Labels for this Language ${language}, from this path: ${fullPath}`);
|
|
17
25
|
loadLabels(fullPath).then((response: any) => {
|
|
18
26
|
console.log(`Loaded Labels for this Language ${language}`, response);
|