@firedesktop/react-base 2.1.22 → 2.1.23

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.
Files changed (62) hide show
  1. package/dist/components/AppIcon.d.ts +20 -20
  2. package/dist/components/AppIcon.js +53 -64
  3. package/dist/components/AppIcon.js.map +1 -1
  4. package/dist/components/AppInput.d.ts +20 -20
  5. package/dist/components/AppInput.js +7 -18
  6. package/dist/components/AppInput.js.map +1 -1
  7. package/dist/components/AppPagination.d.ts +11 -11
  8. package/dist/components/AppPagination.js +63 -74
  9. package/dist/components/AppPagination.js.map +1 -1
  10. package/dist/components/Spin.d.ts +6 -6
  11. package/dist/components/Spin.js +17 -17
  12. package/dist/components/Toaster/Toaster.d.ts +7 -7
  13. package/dist/components/Toaster/Toaster.js +29 -29
  14. package/dist/components/Toaster/Toaster.js.map +1 -1
  15. package/dist/components/Toaster/Types.d.ts +6 -6
  16. package/dist/components/Toaster/Types.js +1 -1
  17. package/dist/components/index.d.ts +7 -7
  18. package/dist/components/index.js +7 -7
  19. package/dist/index.d.ts +7 -7
  20. package/dist/index.js +7 -7
  21. package/dist/utils/CurrencyUtiles.d.ts +4 -4
  22. package/dist/utils/CurrencyUtiles.js +30 -30
  23. package/dist/utils/CurrencyUtiles.js.map +1 -1
  24. package/dist/utils/DateUtils.d.ts +7 -7
  25. package/dist/utils/DateUtils.js +100 -100
  26. package/dist/utils/DateUtils.js.map +1 -1
  27. package/dist/utils/FileUtils.d.ts +5 -5
  28. package/dist/utils/FileUtils.js +73 -73
  29. package/dist/utils/FileUtils.js.map +1 -1
  30. package/dist/utils/RegExValidation.d.ts +4 -4
  31. package/dist/utils/RegExValidation.js +19 -19
  32. package/dist/utils/UrlUtils.d.ts +4 -4
  33. package/dist/utils/UrlUtils.js +15 -15
  34. package/dist/utils/configuration/ConfigurationLoader.d.ts +6 -6
  35. package/dist/utils/configuration/ConfigurationLoader.js +75 -75
  36. package/dist/utils/configuration/ConfigurationManager.d.ts +5 -5
  37. package/dist/utils/configuration/ConfigurationManager.js +89 -89
  38. package/dist/utils/configuration/ConfigurationManager.js.map +1 -1
  39. package/dist/utils/configuration/ConfigurationReturner.d.ts +9 -9
  40. package/dist/utils/configuration/ConfigurationReturner.js +69 -69
  41. package/dist/utils/configuration/index.d.ts +4 -4
  42. package/dist/utils/configuration/index.js +4 -4
  43. package/dist/utils/fetch/Types.d.ts +10 -10
  44. package/dist/utils/fetch/Types.js +1 -1
  45. package/dist/utils/fetch/fetchWrapper.d.ts +14 -14
  46. package/dist/utils/fetch/fetchWrapper.js +262 -233
  47. package/dist/utils/fetch/fetchWrapper.js.map +1 -1
  48. package/dist/utils/fetch/index.d.ts +3 -3
  49. package/dist/utils/fetch/index.js +3 -3
  50. package/dist/utils/index.d.ts +9 -9
  51. package/dist/utils/index.js +9 -9
  52. package/dist/utils/labels/LanguageLoader.d.ts +7 -7
  53. package/dist/utils/labels/LanguageLoader.js +100 -100
  54. package/dist/utils/labels/LanguageLoader.js.map +1 -1
  55. package/dist/utils/labels/LanguageManager.d.ts +6 -6
  56. package/dist/utils/labels/LanguageManager.js +110 -110
  57. package/dist/utils/labels/LanguageManager.js.map +1 -1
  58. package/dist/utils/labels/LanguageReturner.d.ts +10 -10
  59. package/dist/utils/labels/LanguageReturner.js +69 -69
  60. package/dist/utils/labels/index.d.ts +4 -4
  61. package/dist/utils/labels/index.js +4 -4
  62. package/package.json +2 -2
@@ -1,76 +1,76 @@
1
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
2
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
3
- return new (P || (P = Promise))(function (resolve, reject) {
4
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
5
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
6
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
7
- step((generator = generator.apply(thisArg, _arguments || [])).next());
8
- });
9
- };
10
- var __generator = (this && this.__generator) || function (thisArg, body) {
11
- var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
12
- return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
13
- function verb(n) { return function (v) { return step([n, v]); }; }
14
- function step(op) {
15
- if (f) throw new TypeError("Generator is already executing.");
16
- while (g && (g = 0, op[0] && (_ = 0)), _) try {
17
- if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
18
- if (y = 0, t) op = [op[0] & 2, t.value];
19
- switch (op[0]) {
20
- case 0: case 1: t = op; break;
21
- case 4: _.label++; return { value: op[1], done: false };
22
- case 5: _.label++; y = op[1]; op = [0]; continue;
23
- case 7: op = _.ops.pop(); _.trys.pop(); continue;
24
- default:
25
- if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
26
- if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
27
- if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
28
- if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
29
- if (t[2]) _.ops.pop();
30
- _.trys.pop(); continue;
31
- }
32
- op = body.call(thisArg, _);
33
- } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
34
- if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
35
- }
36
- };
37
- import { jsx as _jsx } from "react/jsx-runtime";
38
- import React, { useEffect } from 'react';
39
- import { useDispatch, useSelector } from 'react-redux';
40
- import ConfigurationManager from './ConfigurationManager';
41
- function ConfigurationLoader(_a) {
42
- var updateAppState = _a.updateAppState, path = _a.path;
43
- var dispatch = useDispatch();
44
- var configuration = useSelector(function (state) { return state.configuration; });
45
- var loadConfiguration = ConfigurationManager().loadConfiguration;
46
- var fullPath = '/configuration/config.json';
47
- if (path)
48
- fullPath = path;
49
- useEffect(function () {
50
- function justAsync() {
51
- return __awaiter(this, void 0, void 0, function () {
52
- return __generator(this, function (_a) {
53
- switch (_a.label) {
54
- case 0:
55
- if (!(!configuration || !configuration.loaded)) return [3, 2];
56
- console.log("Loading Configuration for this Site in this path: ".concat(fullPath));
57
- return [4, loadConfiguration(fullPath).then(function (response) {
58
- console.log("Loaded Configuration for this Site in this path: ".concat(fullPath), response);
59
- dispatch(updateAppState('configuration', response));
60
- }).catch(function (err) {
61
- console.error("Problem loading the Site Configuration in this path: ".concat(fullPath));
62
- })];
63
- case 1:
64
- _a.sent();
65
- _a.label = 2;
66
- case 2: return [2];
67
- }
68
- });
69
- });
70
- }
71
- justAsync();
72
- }, []);
73
- return (_jsx(React.Fragment, {}));
74
- }
75
- export default ConfigurationLoader;
1
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
2
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
3
+ return new (P || (P = Promise))(function (resolve, reject) {
4
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
5
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
6
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
7
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
8
+ });
9
+ };
10
+ var __generator = (this && this.__generator) || function (thisArg, body) {
11
+ var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
12
+ return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
13
+ function verb(n) { return function (v) { return step([n, v]); }; }
14
+ function step(op) {
15
+ if (f) throw new TypeError("Generator is already executing.");
16
+ while (g && (g = 0, op[0] && (_ = 0)), _) try {
17
+ if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
18
+ if (y = 0, t) op = [op[0] & 2, t.value];
19
+ switch (op[0]) {
20
+ case 0: case 1: t = op; break;
21
+ case 4: _.label++; return { value: op[1], done: false };
22
+ case 5: _.label++; y = op[1]; op = [0]; continue;
23
+ case 7: op = _.ops.pop(); _.trys.pop(); continue;
24
+ default:
25
+ if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
26
+ if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
27
+ if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
28
+ if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
29
+ if (t[2]) _.ops.pop();
30
+ _.trys.pop(); continue;
31
+ }
32
+ op = body.call(thisArg, _);
33
+ } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
34
+ if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
35
+ }
36
+ };
37
+ import { jsx as _jsx } from "react/jsx-runtime";
38
+ import React, { useEffect } from 'react';
39
+ import { useDispatch, useSelector } from 'react-redux';
40
+ import ConfigurationManager from './ConfigurationManager';
41
+ function ConfigurationLoader(_a) {
42
+ var updateAppState = _a.updateAppState, path = _a.path;
43
+ var dispatch = useDispatch();
44
+ var configuration = useSelector(function (state) { return state.configuration; });
45
+ var loadConfiguration = ConfigurationManager().loadConfiguration;
46
+ var fullPath = '/configuration/config.json';
47
+ if (path)
48
+ fullPath = path;
49
+ useEffect(function () {
50
+ function justAsync() {
51
+ return __awaiter(this, void 0, void 0, function () {
52
+ return __generator(this, function (_a) {
53
+ switch (_a.label) {
54
+ case 0:
55
+ if (!(!configuration || !configuration.loaded)) return [3, 2];
56
+ console.log("Loading Configuration for this Site in this path: ".concat(fullPath));
57
+ return [4, loadConfiguration(fullPath).then(function (response) {
58
+ console.log("Loaded Configuration for this Site in this path: ".concat(fullPath), response);
59
+ dispatch(updateAppState('configuration', response));
60
+ }).catch(function (err) {
61
+ console.error("Problem loading the Site Configuration in this path: ".concat(fullPath));
62
+ })];
63
+ case 1:
64
+ _a.sent();
65
+ _a.label = 2;
66
+ case 2: return [2];
67
+ }
68
+ });
69
+ });
70
+ }
71
+ justAsync();
72
+ }, []);
73
+ return (_jsx(React.Fragment, {}));
74
+ }
75
+ export default ConfigurationLoader;
76
76
  //# sourceMappingURL=ConfigurationLoader.js.map
@@ -1,5 +1,5 @@
1
- declare function ConfigurationManager(): {
2
- loadConfiguration: (fullPath: string) => Promise<any>;
3
- loadConfigurationWithDispatch: (dispatch: any, updateAppState: any, configuration: any) => Promise<void>;
4
- };
5
- export default ConfigurationManager;
1
+ declare function ConfigurationManager(): {
2
+ loadConfiguration: (fullPath: string) => Promise<any>;
3
+ loadConfigurationWithDispatch: (dispatch: any, updateAppState: any, configuration: any) => Promise<void>;
4
+ };
5
+ export default ConfigurationManager;
@@ -1,90 +1,90 @@
1
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
2
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
3
- return new (P || (P = Promise))(function (resolve, reject) {
4
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
5
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
6
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
7
- step((generator = generator.apply(thisArg, _arguments || [])).next());
8
- });
9
- };
10
- var __generator = (this && this.__generator) || function (thisArg, body) {
11
- var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
12
- return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
13
- function verb(n) { return function (v) { return step([n, v]); }; }
14
- function step(op) {
15
- if (f) throw new TypeError("Generator is already executing.");
16
- while (g && (g = 0, op[0] && (_ = 0)), _) try {
17
- if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
18
- if (y = 0, t) op = [op[0] & 2, t.value];
19
- switch (op[0]) {
20
- case 0: case 1: t = op; break;
21
- case 4: _.label++; return { value: op[1], done: false };
22
- case 5: _.label++; y = op[1]; op = [0]; continue;
23
- case 7: op = _.ops.pop(); _.trys.pop(); continue;
24
- default:
25
- if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
26
- if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
27
- if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
28
- if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
29
- if (t[2]) _.ops.pop();
30
- _.trys.pop(); continue;
31
- }
32
- op = body.call(thisArg, _);
33
- } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
34
- if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
35
- }
36
- };
37
- function ConfigurationManager() {
38
- function loadConfiguration(fullPath) {
39
- return __awaiter(this, void 0, void 0, function () {
40
- var res, err_1;
41
- return __generator(this, function (_a) {
42
- switch (_a.label) {
43
- case 0:
44
- _a.trys.push([0, 3, , 4]);
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
- 'X-Content-Type-Options': 'nosniff'
52
- }
53
- })];
54
- case 1:
55
- res = _a.sent();
56
- return [4, res.json()];
57
- case 2: return [2, _a.sent()];
58
- case 3:
59
- err_1 = _a.sent();
60
- console.error('Problem loading the Site Configuration');
61
- return [3, 4];
62
- case 4: return [2];
63
- }
64
- });
65
- });
66
- }
67
- ;
68
- function loadConfigurationWithDispatch(dispatch, updateAppState, configuration) {
69
- return __awaiter(this, void 0, void 0, function () {
70
- var avoidCache, fullPath_1;
71
- return __generator(this, function (_a) {
72
- if (!configuration || !configuration.loaded) {
73
- avoidCache = new Date().getTime();
74
- fullPath_1 = "/configuration/config.json?".concat(avoidCache);
75
- console.log("Loading Configuration for this Site from this path: ".concat(fullPath_1));
76
- loadConfiguration(fullPath_1).then(function (response) {
77
- console.log("Loaded Configuration for this Site in this path: ".concat(fullPath_1), response);
78
- dispatch(updateAppState('configuration', response));
79
- }).catch(function (err) {
80
- console.error("Problem loading the Site Configuration in this path: ".concat(fullPath_1));
81
- });
82
- }
83
- return [2];
84
- });
85
- });
86
- }
87
- return { loadConfiguration: loadConfiguration, loadConfigurationWithDispatch: loadConfigurationWithDispatch };
88
- }
89
- export default ConfigurationManager;
1
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
2
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
3
+ return new (P || (P = Promise))(function (resolve, reject) {
4
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
5
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
6
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
7
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
8
+ });
9
+ };
10
+ var __generator = (this && this.__generator) || function (thisArg, body) {
11
+ var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
12
+ return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
13
+ function verb(n) { return function (v) { return step([n, v]); }; }
14
+ function step(op) {
15
+ if (f) throw new TypeError("Generator is already executing.");
16
+ while (g && (g = 0, op[0] && (_ = 0)), _) try {
17
+ if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
18
+ if (y = 0, t) op = [op[0] & 2, t.value];
19
+ switch (op[0]) {
20
+ case 0: case 1: t = op; break;
21
+ case 4: _.label++; return { value: op[1], done: false };
22
+ case 5: _.label++; y = op[1]; op = [0]; continue;
23
+ case 7: op = _.ops.pop(); _.trys.pop(); continue;
24
+ default:
25
+ if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
26
+ if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
27
+ if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
28
+ if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
29
+ if (t[2]) _.ops.pop();
30
+ _.trys.pop(); continue;
31
+ }
32
+ op = body.call(thisArg, _);
33
+ } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
34
+ if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
35
+ }
36
+ };
37
+ function ConfigurationManager() {
38
+ function loadConfiguration(fullPath) {
39
+ return __awaiter(this, void 0, void 0, function () {
40
+ var res, err_1;
41
+ return __generator(this, function (_a) {
42
+ switch (_a.label) {
43
+ case 0:
44
+ _a.trys.push([0, 3, , 4]);
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
+ 'X-Content-Type-Options': 'nosniff'
52
+ }
53
+ })];
54
+ case 1:
55
+ res = _a.sent();
56
+ return [4, res.json()];
57
+ case 2: return [2, _a.sent()];
58
+ case 3:
59
+ err_1 = _a.sent();
60
+ console.error('Problem loading the Site Configuration');
61
+ return [3, 4];
62
+ case 4: return [2];
63
+ }
64
+ });
65
+ });
66
+ }
67
+ ;
68
+ function loadConfigurationWithDispatch(dispatch, updateAppState, configuration) {
69
+ return __awaiter(this, void 0, void 0, function () {
70
+ var avoidCache, fullPath_1;
71
+ return __generator(this, function (_a) {
72
+ if (!configuration || !configuration.loaded) {
73
+ avoidCache = new Date().getTime();
74
+ fullPath_1 = "/configuration/config.json?".concat(avoidCache);
75
+ console.log("Loading Configuration for this Site from this path: ".concat(fullPath_1));
76
+ loadConfiguration(fullPath_1).then(function (response) {
77
+ console.log("Loaded Configuration for this Site in this path: ".concat(fullPath_1), response);
78
+ dispatch(updateAppState('configuration', response));
79
+ }).catch(function (err) {
80
+ console.error("Problem loading the Site Configuration in this path: ".concat(fullPath_1));
81
+ });
82
+ }
83
+ return [2];
84
+ });
85
+ });
86
+ }
87
+ return { loadConfiguration: loadConfiguration, loadConfigurationWithDispatch: loadConfigurationWithDispatch };
88
+ }
89
+ export default ConfigurationManager;
90
90
  //# sourceMappingURL=ConfigurationManager.js.map
@@ -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;gCAC9B,OAAO,EAAE;oCACL,cAAc,EAAE,iCAAiC;oCACjD,eAAe,EAAE,qCAAqC;oCACtD,SAAS,EAAE,GAAG;oCACd,QAAQ,EAAE,UAAU;oCACpB,wBAAwB,EAAE,SAAS;iCACtC;6BACJ,CAAC,EAAA;;wBARI,GAAG,GAAG,SAQV;wBACK,WAAM,GAAG,CAAC,IAAI,EAAE,EAAA;4BAAvB,WAAO,SAAgB,EAAC;;;wBAGxB,OAAO,CAAC,KAAK,CAAC,wCAAwC,CAAC,CAAC;;;;;;KAE/D;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"}
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;oCACpB,wBAAwB,EAAE,SAAS;iCACtC;6BACJ,CAAC,EAAA;;wBARI,GAAG,GAAG,SAQV;wBACK,WAAM,GAAG,CAAC,IAAI,EAAE,EAAA;4BAAvB,WAAO,SAAgB,EAAC;;;wBAGxB,OAAO,CAAC,KAAK,CAAC,wCAAwC,CAAC,CAAC;;;;;;KAE/D;IAAA,CAAC;IAEF,SAAe,6BAA6B,CAAC,QAAa,EAAE,cAAmB,EAAE,aAAkB;;;;gBAC/F,IAAI,CAAC,aAAa,IAAI,CAAC,aAAa,CAAC,MAAM,EAAE,CAAC;oBACtC,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;gBACP,CAAC;;;;KACJ;IAED,OAAO,EAAE,iBAAiB,mBAAA,EAAE,6BAA6B,+BAAA,EAAE,CAAC;AAChE,CAAC;AAED,eAAe,oBAAoB,CAAC"}
@@ -1,9 +1,9 @@
1
- export type Configuration_Type = {
2
- loaded: boolean;
3
- };
4
- export type configurationLoaderParamsType = {
5
- configuration?: Configuration_Type;
6
- onConfigurationLoad: (condifiguration?: Configuration_Type) => void;
7
- path: string;
8
- };
9
- export default function ConfigurationReturner({ configuration, onConfigurationLoad, path }: configurationLoaderParamsType): import("react/jsx-runtime").JSX.Element;
1
+ export type Configuration_Type = {
2
+ loaded: boolean;
3
+ };
4
+ export type configurationLoaderParamsType = {
5
+ configuration?: Configuration_Type;
6
+ onConfigurationLoad: (condifiguration?: Configuration_Type) => void;
7
+ path: string;
8
+ };
9
+ export default function ConfigurationReturner({ configuration, onConfigurationLoad, path }: configurationLoaderParamsType): import("react/jsx-runtime").JSX.Element;
@@ -1,70 +1,70 @@
1
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
2
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
3
- return new (P || (P = Promise))(function (resolve, reject) {
4
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
5
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
6
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
7
- step((generator = generator.apply(thisArg, _arguments || [])).next());
8
- });
9
- };
10
- var __generator = (this && this.__generator) || function (thisArg, body) {
11
- var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
12
- return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
13
- function verb(n) { return function (v) { return step([n, v]); }; }
14
- function step(op) {
15
- if (f) throw new TypeError("Generator is already executing.");
16
- while (g && (g = 0, op[0] && (_ = 0)), _) try {
17
- if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
18
- if (y = 0, t) op = [op[0] & 2, t.value];
19
- switch (op[0]) {
20
- case 0: case 1: t = op; break;
21
- case 4: _.label++; return { value: op[1], done: false };
22
- case 5: _.label++; y = op[1]; op = [0]; continue;
23
- case 7: op = _.ops.pop(); _.trys.pop(); continue;
24
- default:
25
- if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
26
- if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
27
- if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
28
- if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
29
- if (t[2]) _.ops.pop();
30
- _.trys.pop(); continue;
31
- }
32
- op = body.call(thisArg, _);
33
- } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
34
- if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
35
- }
36
- };
37
- import { jsx as _jsx } from "react/jsx-runtime";
38
- import React, { useEffect } from 'react';
39
- import ConfigurationManager from './ConfigurationManager';
40
- export default function ConfigurationReturner(_a) {
41
- var configuration = _a.configuration, onConfigurationLoad = _a.onConfigurationLoad, path = _a.path;
42
- var loadConfiguration = ConfigurationManager().loadConfiguration;
43
- var fullPath = "".concat(path, "/config.json");
44
- useEffect(function () {
45
- function justAsync() {
46
- return __awaiter(this, void 0, void 0, function () {
47
- return __generator(this, function (_a) {
48
- switch (_a.label) {
49
- case 0:
50
- if (!(!configuration || !configuration.loaded)) return [3, 2];
51
- console.log("Loading Configuration for this Path: ".concat(path, " in this fullpath: ").concat(fullPath));
52
- return [4, loadConfiguration(fullPath).then(function (response) {
53
- console.log("Loaded Configuration for this Path: ".concat(path, " in this fullpath: ").concat(fullPath), response);
54
- onConfigurationLoad(response);
55
- }).catch(function (err) {
56
- console.error("Problem loading the Path: ".concat(path, " Configuration in this fullpath: ").concat(fullPath));
57
- })];
58
- case 1:
59
- _a.sent();
60
- _a.label = 2;
61
- case 2: return [2];
62
- }
63
- });
64
- });
65
- }
66
- justAsync();
67
- }, []);
68
- return (_jsx(React.Fragment, {}));
69
- }
1
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
2
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
3
+ return new (P || (P = Promise))(function (resolve, reject) {
4
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
5
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
6
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
7
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
8
+ });
9
+ };
10
+ var __generator = (this && this.__generator) || function (thisArg, body) {
11
+ var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
12
+ return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
13
+ function verb(n) { return function (v) { return step([n, v]); }; }
14
+ function step(op) {
15
+ if (f) throw new TypeError("Generator is already executing.");
16
+ while (g && (g = 0, op[0] && (_ = 0)), _) try {
17
+ if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
18
+ if (y = 0, t) op = [op[0] & 2, t.value];
19
+ switch (op[0]) {
20
+ case 0: case 1: t = op; break;
21
+ case 4: _.label++; return { value: op[1], done: false };
22
+ case 5: _.label++; y = op[1]; op = [0]; continue;
23
+ case 7: op = _.ops.pop(); _.trys.pop(); continue;
24
+ default:
25
+ if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
26
+ if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
27
+ if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
28
+ if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
29
+ if (t[2]) _.ops.pop();
30
+ _.trys.pop(); continue;
31
+ }
32
+ op = body.call(thisArg, _);
33
+ } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
34
+ if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
35
+ }
36
+ };
37
+ import { jsx as _jsx } from "react/jsx-runtime";
38
+ import React, { useEffect } from 'react';
39
+ import ConfigurationManager from './ConfigurationManager';
40
+ export default function ConfigurationReturner(_a) {
41
+ var configuration = _a.configuration, onConfigurationLoad = _a.onConfigurationLoad, path = _a.path;
42
+ var loadConfiguration = ConfigurationManager().loadConfiguration;
43
+ var fullPath = "".concat(path, "/config.json");
44
+ useEffect(function () {
45
+ function justAsync() {
46
+ return __awaiter(this, void 0, void 0, function () {
47
+ return __generator(this, function (_a) {
48
+ switch (_a.label) {
49
+ case 0:
50
+ if (!(!configuration || !configuration.loaded)) return [3, 2];
51
+ console.log("Loading Configuration for this Path: ".concat(path, " in this fullpath: ").concat(fullPath));
52
+ return [4, loadConfiguration(fullPath).then(function (response) {
53
+ console.log("Loaded Configuration for this Path: ".concat(path, " in this fullpath: ").concat(fullPath), response);
54
+ onConfigurationLoad(response);
55
+ }).catch(function (err) {
56
+ console.error("Problem loading the Path: ".concat(path, " Configuration in this fullpath: ").concat(fullPath));
57
+ })];
58
+ case 1:
59
+ _a.sent();
60
+ _a.label = 2;
61
+ case 2: return [2];
62
+ }
63
+ });
64
+ });
65
+ }
66
+ justAsync();
67
+ }, []);
68
+ return (_jsx(React.Fragment, {}));
69
+ }
70
70
  //# sourceMappingURL=ConfigurationReturner.js.map
@@ -1,4 +1,4 @@
1
- import ConfigurationManager from './ConfigurationManager';
2
- import ConfigurationLoader from './ConfigurationLoader';
3
- import ConfigurationReturner from './ConfigurationReturner';
4
- export { ConfigurationLoader, ConfigurationManager, ConfigurationReturner };
1
+ import ConfigurationManager from './ConfigurationManager';
2
+ import ConfigurationLoader from './ConfigurationLoader';
3
+ import ConfigurationReturner from './ConfigurationReturner';
4
+ export { ConfigurationLoader, ConfigurationManager, ConfigurationReturner };
@@ -1,5 +1,5 @@
1
- import ConfigurationManager from './ConfigurationManager';
2
- import ConfigurationLoader from './ConfigurationLoader';
3
- import ConfigurationReturner from './ConfigurationReturner';
4
- export { ConfigurationLoader, ConfigurationManager, ConfigurationReturner };
1
+ import ConfigurationManager from './ConfigurationManager';
2
+ import ConfigurationLoader from './ConfigurationLoader';
3
+ import ConfigurationReturner from './ConfigurationReturner';
4
+ export { ConfigurationLoader, ConfigurationManager, ConfigurationReturner };
5
5
  //# sourceMappingURL=index.js.map
@@ -1,10 +1,10 @@
1
- export interface ILabels {
2
- errorBadRequest: string;
3
- errorGeneric: string;
4
- errorServerNotAvailable: string;
5
- errorSessionExpired: string;
6
- }
7
- export type AdditionalParamsType = {
8
- name: string;
9
- value: string | number;
10
- };
1
+ export interface ILabels {
2
+ errorBadRequest: string;
3
+ errorGeneric: string;
4
+ errorServerNotAvailable: string;
5
+ errorSessionExpired: string;
6
+ }
7
+ export type AdditionalParamsType = {
8
+ name: string;
9
+ value: string | number;
10
+ };
@@ -1,2 +1,2 @@
1
- export {};
1
+ export {};
2
2
  //# sourceMappingURL=Types.js.map
@@ -1,14 +1,14 @@
1
- import * as Types from './Types';
2
- declare class FetchWrapper {
3
- apiVersion?: string;
4
- labels?: Types.ILabels;
5
- status_401?: () => Promise<void>;
6
- status_403?: () => Promise<void>;
7
- constructor(apiVersion?: string, labels?: Types.ILabels, status_401?: () => Promise<void>, status_403?: () => Promise<void>);
8
- get: (url: string, applicationName?: string, token?: string, onGenericServerError?: (status: number, error?: any) => void, params?: Blob | any, isFile?: boolean, isBlobInReturn?: boolean, additionalParams?: Types.AdditionalParamsType[], timeoutInMilli?: number) => Promise<any>;
9
- post: (url: string, applicationName?: string, token?: string, onGenericServerError?: (status: number, error?: any) => void, params?: Blob | any, isFile?: boolean, isBlobInReturn?: boolean, additionalParams?: Types.AdditionalParamsType[], timeoutInMilli?: number) => Promise<any>;
10
- put: (url: string, applicationName?: string, token?: string, onGenericServerError?: (status: number, error?: any) => void, params?: Blob | any, isFile?: boolean, isBlobInReturn?: boolean, additionalParams?: Types.AdditionalParamsType[], timeoutInMilli?: number) => Promise<any>;
11
- delete: (url: string, applicationName?: string, token?: string, onGenericServerError?: (status: number, error?: any) => void, params?: Blob | any, isFile?: boolean, isBlobInReturn?: boolean, additionalParams?: Types.AdditionalParamsType[], timeoutInMilli?: number) => Promise<any>;
12
- generic: (method: string, url: string, applicationName: string | undefined, token: string | undefined, onGenericServerError?: (status: number, error?: any) => void, params?: Blob | any, isFile?: boolean, isBlobInReturn?: boolean, version?: string, additionalParams?: Types.AdditionalParamsType[], timeoutInMilli?: number) => Promise<any>;
13
- }
14
- export default FetchWrapper;
1
+ import * as Types from './Types';
2
+ declare class FetchWrapper {
3
+ apiVersion?: string;
4
+ labels?: Types.ILabels;
5
+ status_401?: () => Promise<void>;
6
+ status_403?: () => Promise<void>;
7
+ constructor(apiVersion?: string, labels?: Types.ILabels, status_401?: () => Promise<void>, status_403?: () => Promise<void>);
8
+ get: (url: string, applicationName?: string, token?: string, onGenericServerError?: (status: number, error?: any) => void, params?: Blob | any, isFile?: boolean, isBlobInReturn?: boolean, additionalParams?: Types.AdditionalParamsType[], timeoutInMilli?: number) => Promise<any>;
9
+ post: (url: string, applicationName?: string, token?: string, onGenericServerError?: (status: number, error?: any) => void, params?: Blob | any, isFile?: boolean, isBlobInReturn?: boolean, additionalParams?: Types.AdditionalParamsType[], timeoutInMilli?: number) => Promise<any>;
10
+ put: (url: string, applicationName?: string, token?: string, onGenericServerError?: (status: number, error?: any) => void, params?: Blob | any, isFile?: boolean, isBlobInReturn?: boolean, additionalParams?: Types.AdditionalParamsType[], timeoutInMilli?: number) => Promise<any>;
11
+ delete: (url: string, applicationName?: string, token?: string, onGenericServerError?: (status: number, error?: any) => void, params?: Blob | any, isFile?: boolean, isBlobInReturn?: boolean, additionalParams?: Types.AdditionalParamsType[], timeoutInMilli?: number) => Promise<any>;
12
+ generic: (method: string, url: string, applicationName: string | undefined, token: string | undefined, onGenericServerError?: (status: number, error?: any) => void, params?: Blob | any, isFile?: boolean, isBlobInReturn?: boolean, version?: string, additionalParams?: Types.AdditionalParamsType[], timeoutInMilli?: number) => Promise<any>;
13
+ }
14
+ export default FetchWrapper;