@evlop/commons 1.0.83 → 1.0.84
Sign up to get free protection for your applications and to get access to all the features.
@@ -4,7 +4,7 @@ exports.useConfig = void 0;
|
|
4
4
|
const react_redux_1 = require("react-redux");
|
5
5
|
const lodash_1 = require("lodash");
|
6
6
|
const useConfig = (configName) => {
|
7
|
-
return react_redux_1.useSelector((s) => lodash_1.get(s.config.data, configName
|
7
|
+
return react_redux_1.useSelector((s) => configName ? lodash_1.get(s.config.data, configName) : s.config.data);
|
8
8
|
};
|
9
9
|
exports.useConfig = useConfig;
|
10
10
|
//# sourceMappingURL=useConfig.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"useConfig.js","sourceRoot":"","sources":["../../../src/hooks/useConfig.tsx"],"names":[],"mappings":";;;AAAA,6CAA0C;AAC1C,mCAA2B;AAEpB,MAAM,SAAS,GAAG,CAAC,UAAkB,EAAC,EAAE;IAC3C,OAAO,yBAAW,CAAC,CAAC,CAA8B,EAAC,EAAE,
|
1
|
+
{"version":3,"file":"useConfig.js","sourceRoot":"","sources":["../../../src/hooks/useConfig.tsx"],"names":[],"mappings":";;;AAAA,6CAA0C;AAC1C,mCAA2B;AAEpB,MAAM,SAAS,GAAG,CAAC,UAAkB,EAAC,EAAE;IAC3C,OAAO,yBAAW,CAAC,CAAC,CAA8B,EAAC,EAAE,CAAC,UAAU,CAAC,CAAC,CAAC,YAAG,CAAC,CAAC,CAAC,MAAM,CAAC,IAAI,EAAE,UAAU,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,IAAI,CAAE,CAAC;AACxH,CAAC,CAAC;AAFW,QAAA,SAAS,aAEpB"}
|
@@ -21,7 +21,7 @@ const useFonts = () => {
|
|
21
21
|
exports.useFonts = useFonts;
|
22
22
|
const useFont = (font) => {
|
23
23
|
const { activeFonts } = react_redux_1.useSelector(s => s.fonts);
|
24
|
-
const isFontActive = react_1.useMemo(() => activeFonts.find(f => font.value === f.value), [font, activeFonts]);
|
24
|
+
const isFontActive = react_1.useMemo(() => activeFonts.find(f => font && font.value === f.value), [font, activeFonts]);
|
25
25
|
const dispatch = react_redux_1.useDispatch();
|
26
26
|
react_1.useEffect(() => {
|
27
27
|
if (font && !isFontActive) {
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"useFonts.js","sourceRoot":"","sources":["../../../src/hooks/useFonts.tsx"],"names":[],"mappings":";;;AAAA,iCAA2C;AAC3C,6CAAuD;AACvD,0CAA4D;AAErD,MAAM,QAAQ,GAAG,GAAE,EAAE;IAExB,MAAM,EAAC,QAAQ,EAAE,QAAQ,EAAE,WAAW,EAAE,oBAAoB,EAAE,mBAAmB,EAAC,GAAG,yBAAW,CAAC,CAAC,CAAA,EAAE,CAAA,CAAC,CAAC,KAAK,CAAC,CAAC;IAE7G,MAAM,QAAQ,GAAG,yBAAW,EAAE,CAAC;IAE/B,iBAAS,CAAC,GAAE,EAAE;QACV,IAAG,CAAC,oBAAoB,IAAI,CAAC,mBAAmB,EAAC;YAC7C,QAAQ,CAAC,0BAAe,EAAE,CAAC,CAAA;SAC9B;IACL,CAAC,EAAE,CAAC,QAAQ,CAAC,CAAC,CAAC;IAEf,OAAO,eAAO,CAAC,GAAE,EAAE,CAAA,CAAC;QAChB,QAAQ;QACR,QAAQ;QACR,WAAW;KACd,CAAC,EAAE,CAAC,QAAQ,EAAE,QAAQ,EAAE,WAAW,CAAC,CAAC,CAAC;AAC3C,CAAC,CAAC;AAjBW,QAAA,QAAQ,YAiBnB;AAGK,MAAM,OAAO,GAAG,CAAC,IAAI,EAAC,EAAE;IAC3B,MAAM,EAAC,WAAW,EAAC,GAAG,yBAAW,CAAC,CAAC,CAAA,EAAE,CAAA,CAAC,CAAC,KAAK,CAAC,CAAC;IAE9C,MAAM,YAAY,GAAG,eAAO,CAAC,GAAE,EAAE,CAAA,WAAW,CAAC,IAAI,CAAC,CAAC,CAAA,EAAE,CAAA,IAAI,CAAC,KAAK,KAAK,CAAC,CAAC,KAAK,CAAC,EAAE,CAAC,IAAI,E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