@firedesktop/react-base 1.9.0 → 1.10.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/ConfigurationLoader.d.ts +1 -1
- package/dist/ConfigurationLoader.js +1 -1
- package/dist/ConfigurationLoader.js.map +1 -1
- package/dist/LanguageLoader.d.ts +1 -1
- package/dist/LanguageLoader.js +1 -1
- package/dist/LanguageLoader.js.map +1 -1
- package/package.json +2 -3
- package/src/lib/ConfigurationLoader.tsx +2 -3
- package/src/lib/LanguageLoader.tsx +2 -3
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
export declare type configurationLoaderParamsType = {
|
|
3
|
-
updateAppState:
|
|
3
|
+
updateAppState: (name: string, value: object) => void;
|
|
4
4
|
path: string | null;
|
|
5
5
|
};
|
|
6
6
|
declare function ConfigurationLoader({ updateAppState, path }: configurationLoaderParamsType): JSX.Element;
|
|
@@ -51,7 +51,7 @@ function ConfigurationLoader(_a) {
|
|
|
51
51
|
return __generator(this, function (_a) {
|
|
52
52
|
switch (_a.label) {
|
|
53
53
|
case 0:
|
|
54
|
-
if (
|
|
54
|
+
if (!(!configuration || !configuration.loaded)) return [3, 2];
|
|
55
55
|
console.log("Loading Configuration for this Site in this path: " + fullPath);
|
|
56
56
|
return [4, loadConfiguration(fullPath).then(function (response) {
|
|
57
57
|
console.log("Loaded Configuration for this Site in this path: " + fullPath, response);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ConfigurationLoader.js","sourceRoot":"","sources":["../src/lib/ConfigurationLoader.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACzC,OAAO,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAEvD,OAAO,oBAAoB,MAAM,wBAAwB,CAAC;
|
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B,CAAC,EAAE,EAAE,CAAC,CAAC;IAEP,OAAO,CACH,oBAAC,KAAK,CAAC,QAAQ,OACE,CACpB,CAAC;AACN,CAAC;AAED,eAAe,mBAAmB,CAAC"}
|
package/dist/LanguageLoader.d.ts
CHANGED
package/dist/LanguageLoader.js
CHANGED
|
@@ -50,7 +50,7 @@ function LanguageLoader(_a) {
|
|
|
50
50
|
function justAsync() {
|
|
51
51
|
return __awaiter(this, void 0, void 0, function () {
|
|
52
52
|
return __generator(this, function (_a) {
|
|
53
|
-
if (!labels.language || labels.language !== language) {
|
|
53
|
+
if (!labels || !labels.language || labels.language !== language) {
|
|
54
54
|
console.log("Loading Language Labels for this Site in this path: " + fullPath);
|
|
55
55
|
loadLabels(fullPath).then(function (response) {
|
|
56
56
|
console.log("Loaded Language Labels for this Site in this path: " + fullPath, response);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LanguageLoader.js","sourceRoot":"","sources":["../src/lib/LanguageLoader.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,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;
|
|
1
|
+
{"version":3,"file":"LanguageLoader.js","sourceRoot":"","sources":["../src/lib/LanguageLoader.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,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,G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
|
|
6
6
|
"description": "This is the FireDesktop base package used to support every React Project in this Company.",
|
|
@@ -36,8 +36,7 @@
|
|
|
36
36
|
"scripts": {
|
|
37
37
|
"distribute_not_working": "rmdir /s /q dist & mkdir dist && npx babel src/lib --out-dir dist --extensions \".js,.ts,.tsx\" --source-maps inline",
|
|
38
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"
|
|
39
|
+
"distribute": "rmdir /s /q dist & mkdir dist\\styles && tsc && copyfiles -f src/lib/styles/* dist/styles"
|
|
41
40
|
},
|
|
42
41
|
"eslintConfig": {
|
|
43
42
|
"extends": [
|
|
@@ -4,9 +4,8 @@ import { useDispatch, useSelector } from "react-redux";
|
|
|
4
4
|
import ConfigurationManager from './ConfigurationManager';
|
|
5
5
|
|
|
6
6
|
export type configurationLoaderParamsType = {
|
|
7
|
-
updateAppState:
|
|
7
|
+
updateAppState: (name: string, value: object) => void,
|
|
8
8
|
path: string | null
|
|
9
|
-
// toggle: (confirm: boolean) => void
|
|
10
9
|
}
|
|
11
10
|
|
|
12
11
|
function ConfigurationLoader({ updateAppState, path }: configurationLoaderParamsType) {
|
|
@@ -20,7 +19,7 @@ function ConfigurationLoader({ updateAppState, path }: configurationLoaderParams
|
|
|
20
19
|
|
|
21
20
|
useEffect(() => {
|
|
22
21
|
async function justAsync() {
|
|
23
|
-
if (!configuration) {
|
|
22
|
+
if (!configuration || !configuration.loaded) {
|
|
24
23
|
console.log(`Loading Configuration for this Site in this path: ${fullPath}`);
|
|
25
24
|
await loadConfiguration(fullPath).then((response: any) => {
|
|
26
25
|
console.log(`Loaded Configuration for this Site in this path: ${fullPath}`, response);
|
|
@@ -4,10 +4,9 @@ import { useDispatch, useSelector } from "react-redux";
|
|
|
4
4
|
import LanguageManager from './LanguageManager';
|
|
5
5
|
|
|
6
6
|
export type languageLoaderParamsType = {
|
|
7
|
-
updateAppState:
|
|
7
|
+
updateAppState: (name: string, value: object) => void,
|
|
8
8
|
language: string,
|
|
9
9
|
path: string | null,
|
|
10
|
-
// toggle: (confirm: boolean) => void
|
|
11
10
|
}
|
|
12
11
|
|
|
13
12
|
function LanguageLoader({ updateAppState, language, path }: languageLoaderParamsType) {
|
|
@@ -24,7 +23,7 @@ function LanguageLoader({ updateAppState, language, path }: languageLoaderParams
|
|
|
24
23
|
// Do it on change language
|
|
25
24
|
useEffect(() => {
|
|
26
25
|
async function justAsync() {
|
|
27
|
-
if (!labels.language || labels.language !== language) {
|
|
26
|
+
if (!labels || !labels.language || labels.language !== language) {
|
|
28
27
|
console.log(`Loading Language Labels for this Site in this path: ${fullPath}`);
|
|
29
28
|
loadLabels(fullPath).then((response: any) => {
|
|
30
29
|
console.log(`Loaded Language Labels for this Site in this path: ${fullPath}`, response);
|