@firedesktop/react-base 1.46.0 → 1.48.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/CurrencyUtiles.d.ts +1 -1
- package/dist/utils/CurrencyUtiles.js.map +1 -1
- package/dist/utils/index.d.ts +2 -1
- package/dist/utils/index.js +2 -1
- package/dist/utils/index.js.map +1 -1
- package/dist/utils/labels/LanguageLoader.js +3 -12
- package/dist/utils/labels/LanguageLoader.js.map +1 -1
- package/package.json +7 -6
- package/src/lib/utils/CurrencyUtiles.ts +1 -1
- package/src/lib/utils/index.ts +2 -1
- package/src/lib/utils/labels/LanguageLoader.tsx +3 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CurrencyUtiles.js","sourceRoot":"","sources":["../../src/lib/utils/CurrencyUtiles.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,OAAO,UAAU,cAAc;IAUlC,IAAM,sBAAsB,GAAG,UAAC,
|
|
1
|
+
{"version":3,"file":"CurrencyUtiles.js","sourceRoot":"","sources":["../../src/lib/utils/CurrencyUtiles.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,OAAO,UAAU,cAAc;IAUlC,IAAM,sBAAsB,GAAG,UAAC,KAAkC,EAAE,MAAqB,EAAE,QAAgB;QAAvC,uBAAA,EAAA,aAAqB;QAAE,yBAAA,EAAA,gBAAgB;QACvG,IAAI;YACA,IAAM,WAAW,GAAG,MAAM,CAAC,KAAK,CAAC,CAAC;YAElC,IAAI,KAAK,KAAK,SAAS,IAAI,KAAK,KAAK,IAAI,IAAI,KAAK,CAAC,WAAW,CAAC;gBAC3D,OAAO,EAAE,CAAC;YAEd,OAAO,IAAI,IAAI,CAAC,YAAY,CAAC,MAAM,EAAE,EAAE,KAAK,EAAE,UAAU,EAAE,QAAQ,UAAA,EAAE,CAAC,CAAC,MAAM,CAAC,WAAW,CAAC,CAAC;SAC7F;QAAC,OAAO,GAAG,EAAE,GAAG;QAEjB,OAAO,EAAE,CAAC;IACd,CAAC,CAAC;IAGF,OAAO;QACH,sBAAsB,wBAAA;KACzB,CAAC;AACN,CAAC"}
|
package/dist/utils/index.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import * as Fetch from './fetch';
|
|
2
2
|
import * as Configuration from './configuration';
|
|
3
|
+
import CurrencyUtiles from './CurrencyUtiles';
|
|
3
4
|
import DateUtils from './DateUtils';
|
|
4
5
|
import FileUtils from './FileUtil';
|
|
5
6
|
import * as Labels from './labels';
|
|
6
|
-
export { Configuration, DateUtils, Fetch, FileUtils, Labels };
|
|
7
|
+
export { Configuration, CurrencyUtiles, DateUtils, Fetch, FileUtils, Labels };
|
package/dist/utils/index.js
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import * as Fetch from './fetch';
|
|
2
2
|
import * as Configuration from './configuration';
|
|
3
|
+
import CurrencyUtiles from './CurrencyUtiles';
|
|
3
4
|
import DateUtils from './DateUtils';
|
|
4
5
|
import FileUtils from './FileUtil';
|
|
5
6
|
import * as Labels from './labels';
|
|
6
|
-
export { Configuration, DateUtils, Fetch, FileUtils, Labels };
|
|
7
|
+
export { Configuration, CurrencyUtiles, DateUtils, Fetch, FileUtils, Labels };
|
|
7
8
|
//# sourceMappingURL=index.js.map
|
package/dist/utils/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/lib/utils/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,SAAS,CAAC;AACjC,OAAO,KAAK,aAAa,MAAM,iBAAiB,CAAC;AACjD,OAAO,SAAS,MAAM,aAAa,CAAC;AACpC,OAAO,SAAS,MAAM,YAAY,CAAC;AACnC,OAAO,KAAK,MAAM,MAAM,UAAU,CAAC;AAEnC,OAAO,EAAE,aAAa,EAAE,SAAS,EAAE,KAAK,EAAE,SAAS,EAAE,MAAM,EAAE,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/lib/utils/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,SAAS,CAAC;AACjC,OAAO,KAAK,aAAa,MAAM,iBAAiB,CAAC;AACjD,OAAO,cAAc,MAAM,kBAAkB,CAAC;AAC9C,OAAO,SAAS,MAAM,aAAa,CAAC;AACpC,OAAO,SAAS,MAAM,YAAY,CAAC;AACnC,OAAO,KAAK,MAAM,MAAM,UAAU,CAAC;AAEnC,OAAO,EAAE,aAAa,EAAE,cAAc,EAAE,SAAS,EAAE,KAAK,EAAE,SAAS,EAAE,MAAM,EAAE,CAAC"}
|
|
@@ -1,14 +1,3 @@
|
|
|
1
|
-
var __assign = (this && this.__assign) || function () {
|
|
2
|
-
__assign = Object.assign || function(t) {
|
|
3
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
4
|
-
s = arguments[i];
|
|
5
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
6
|
-
t[p] = s[p];
|
|
7
|
-
}
|
|
8
|
-
return t;
|
|
9
|
-
};
|
|
10
|
-
return __assign.apply(this, arguments);
|
|
11
|
-
};
|
|
12
1
|
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
13
2
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
14
3
|
return new (P || (P = Promise))(function (resolve, reject) {
|
|
@@ -46,6 +35,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
46
35
|
}
|
|
47
36
|
};
|
|
48
37
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
38
|
+
import _ from 'lodash';
|
|
49
39
|
import React, { useEffect } from 'react';
|
|
50
40
|
import { useDispatch, useSelector } from 'react-redux';
|
|
51
41
|
import LanguageManager from './LanguageManager';
|
|
@@ -86,7 +76,8 @@ function LanguageLoader(_a) {
|
|
|
86
76
|
loadLabels(fullPath).then(function (response) {
|
|
87
77
|
if (response) {
|
|
88
78
|
console.log("Loaded Custom Language Labels for this Site in this path: ".concat(fullPath), response);
|
|
89
|
-
|
|
79
|
+
var merged = _.merge(allLabels_1, response);
|
|
80
|
+
dispatch(updateAppState('labels', merged));
|
|
90
81
|
}
|
|
91
82
|
else {
|
|
92
83
|
console.warn("Custom Site Language Labels NOT FOUND in this path: ".concat(fullPath));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LanguageLoader.js","sourceRoot":"","sources":["../../../src/lib/utils/labels/LanguageLoader.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"LanguageLoader.js","sourceRoot":"","sources":["../../../src/lib/utils/labels/LanguageLoader.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,OAAO,CAAC,MAAM,QAAQ,CAAC;AACvB,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACzC,OAAO,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAEvD,OAAO,eAAe,MAAM,mBAAmB,CAAC;AAQhD,SAAS,cAAc,CAAC,EAA4D;QAA1D,cAAc,oBAAA,EAAE,QAAQ,cAAA,EAAE,IAAI,UAAA;IACpD,IAAM,QAAQ,GAAG,WAAW,EAAE,CAAC;IACvB,IAAA,MAAM,GAAU,WAAW,CAAC,UAAA,KAAK,IAAI,OAAA,KAAK,EAAL,CAAK,CAAC,OAArC,CAAsC;IAC5C,IAAA,UAAU,GAAK,eAAe,EAAE,WAAtB,CAAuB;IAEzC,IAAM,QAAQ,GAAG,UAAG,QAAQ,UAAO,CAAC;IAEpC,IAAM,oBAAoB,GAAG,mBAAY,QAAQ,CAAE,CAAC;IAEpD,IAAI,QAAQ,GAAG,mBAAY,QAAQ,CAAE,CAAC;IACtC,IAAI,IAAI;QACJ,QAAQ,GAAG,YAAK,IAAI,cAAI,QAAQ,CAAE,CAAC;IAGvC,SAAS,CAAC;QACN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f,OAAO,CACH,KAAC,KAAK,CAAC,QAAQ,KACE,CACpB,CAAC;AACN,CAAC;AAED,eAAe,cAAc,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@firedesktop/react-base",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.48.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.",
|
|
@@ -12,15 +12,15 @@
|
|
|
12
12
|
},
|
|
13
13
|
"devDependencies": {
|
|
14
14
|
"@babel/cli": "7.17.10",
|
|
15
|
-
"@babel/core": "7.17.
|
|
16
|
-
"@babel/plugin-proposal-class-properties": "7.
|
|
17
|
-
"@babel/plugin-transform-arrow-functions": "7.
|
|
18
|
-
"@babel/preset-typescript": "7.
|
|
15
|
+
"@babel/core": "7.17.12",
|
|
16
|
+
"@babel/plugin-proposal-class-properties": "7.17.12",
|
|
17
|
+
"@babel/plugin-transform-arrow-functions": "7.17.12",
|
|
18
|
+
"@babel/preset-typescript": "7.17.12",
|
|
19
19
|
"@testing-library/jest-dom": "5.16.4",
|
|
20
20
|
"@testing-library/react": "13.2.0",
|
|
21
21
|
"@testing-library/user-event": "14.2.0",
|
|
22
22
|
"@types/jest": "27.5.1",
|
|
23
|
-
"@types/node": "17.0.
|
|
23
|
+
"@types/node": "17.0.34",
|
|
24
24
|
"@types/react": "18.0.9",
|
|
25
25
|
"@types/react-dom": "18.0.4",
|
|
26
26
|
"@types/react-redux": "7.1.24",
|
|
@@ -28,6 +28,7 @@
|
|
|
28
28
|
"babel-preset-minify": "0.5.2",
|
|
29
29
|
"bootstrap": "4.6.0",
|
|
30
30
|
"copyfiles": "2.4.1",
|
|
31
|
+
"lodash": "4.17.21",
|
|
31
32
|
"react": "18.1.0",
|
|
32
33
|
"react-dom": "18.1.0",
|
|
33
34
|
"react-redux": "8.0.1",
|
|
@@ -8,7 +8,7 @@ export default function CurrencyUtiles() {
|
|
|
8
8
|
* @param currency https://www.easymarkets.com/eu/learn-centre/discover-trading/currency-acronyms-and-abbreviations/, default EUR
|
|
9
9
|
* @returns
|
|
10
10
|
*/
|
|
11
|
-
const numberToCurrencyString = (value: string | number, locale: string = 'IT', currency = 'EUR'): String => {
|
|
11
|
+
const numberToCurrencyString = (value: string | number | undefined, locale: string = 'IT', currency = 'EUR'): String => {
|
|
12
12
|
try {
|
|
13
13
|
const valueNumber = Number(value);
|
|
14
14
|
|
package/src/lib/utils/index.ts
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import * as Fetch from './fetch';
|
|
2
2
|
import * as Configuration from './configuration';
|
|
3
|
+
import CurrencyUtiles from './CurrencyUtiles';
|
|
3
4
|
import DateUtils from './DateUtils';
|
|
4
5
|
import FileUtils from './FileUtil';
|
|
5
6
|
import * as Labels from './labels';
|
|
6
7
|
|
|
7
|
-
export { Configuration, DateUtils, Fetch, FileUtils, Labels };
|
|
8
|
+
export { Configuration, CurrencyUtiles, DateUtils, Fetch, FileUtils, Labels };
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import _ from 'lodash';
|
|
1
2
|
import React, { useEffect } from 'react';
|
|
2
3
|
import { useDispatch, useSelector } from 'react-redux';
|
|
3
4
|
|
|
@@ -41,7 +42,8 @@ function LanguageLoader({ updateAppState, language, path }: languageLoaderParams
|
|
|
41
42
|
loadLabels(fullPath).then((response: any) => {
|
|
42
43
|
if (response) {
|
|
43
44
|
console.log(`Loaded Custom Language Labels for this Site in this path: ${fullPath}`, response);
|
|
44
|
-
|
|
45
|
+
const merged = _.merge(allLabels, response);
|
|
46
|
+
dispatch(updateAppState('labels', merged));
|
|
45
47
|
}
|
|
46
48
|
else {
|
|
47
49
|
console.warn(`Custom Site Language Labels NOT FOUND in this path: ${fullPath}`);
|