@evlop/commons 1.0.144 → 1.0.147
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/src/components/hoc/withSettings.d.ts +2 -2
- package/dist/src/components/hoc/withSettings.d.ts.map +1 -1
- package/dist/src/components/hoc/withSettings.js +2 -2
- package/dist/src/components/hoc/withSettings.js.map +1 -1
- package/dist/src/components/hoc/withSettings.native.d.ts +19 -0
- package/dist/src/components/hoc/withSettings.native.d.ts.map +1 -0
- package/dist/src/components/hoc/withSettings.native.js +65 -0
- package/dist/src/components/hoc/withSettings.native.js.map +1 -0
- package/dist/src/hooks/useAction.js +1 -1
- package/dist/src/hooks/useAction.js.map +1 -1
- package/dist/src/hooks/useTemplate.d.ts.map +1 -1
- package/dist/src/hooks/useTemplate.js +9 -2
- package/dist/src/hooks/useTemplate.js.map +1 -1
- package/dist/src/middlewares/restApiMiddleware.d.ts.map +1 -1
- package/dist/src/middlewares/restApiMiddleware.js +11 -5
- package/dist/src/middlewares/restApiMiddleware.js.map +1 -1
- package/dist/src/reducers/components.d.ts.map +1 -1
- package/dist/src/reducers/components.js +2 -1
- package/dist/src/reducers/components.js.map +1 -1
- package/package.json +2 -1
@@ -11,11 +11,11 @@ export declare const withSettings: ({ name: elementName, valueOptions, configura
|
|
11
11
|
name: any;
|
12
12
|
valueOptions?: any[];
|
13
13
|
configurationOptions?: any[];
|
14
|
-
}) => <P extends Object>(
|
14
|
+
}) => <P extends Object>(BaseComponent: React.ComponentType<P>) => React.ForwardRefExoticComponent<React.PropsWithoutRef<React.PropsWithChildren<P & SettingProp>> & React.RefAttributes<any>>;
|
15
15
|
export declare const withToolbar: ({ name: elementName, valueOptions, configurationOptions }: {
|
16
16
|
name: any;
|
17
17
|
valueOptions?: any[];
|
18
18
|
configurationOptions?: any[];
|
19
|
-
}) => <P extends Object>(
|
19
|
+
}) => <P extends Object>(BaseComponent: React.ComponentType<P>) => React.ForwardRefExoticComponent<React.PropsWithoutRef<React.PropsWithChildren<P & SettingProp>> & React.RefAttributes<any>>;
|
20
20
|
export default withSettings;
|
21
21
|
//# sourceMappingURL=withSettings.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"withSettings.d.ts","sourceRoot":"","sources":["../../../../src/components/hoc/withSettings.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,EAAc,iBAAiB,EAAE,eAAe,EAAE,aAAa,EAAiE,MAAM,OAAO,CAAC;AAE5J,OAAO,EAAE,MAAM,EAAgE,MAAM,aAAa,CAAC;AAEnG,aAAK,WAAW,GAAG;IAAC,KAAK,CAAC,EAAE,MAAM,CAAC;IAAC,SAAS,CAAC,EAAE,MAAM,CAAC;IAAC,WAAW,CAAC,EAAE,MAAM,CAAC;IAAC,MAAM,CAAC,EAAE,MAAM,CAAA;CAAE,CAAA;AAE/F,oBAAY,qBAAqB,CAAC,CAAC,SAAS,MAAM,IAAI,KAAK,CAAC,yBAAyB,CAAC,eAAe,CAAC,iBAAiB,CAAC,CAAC,GAAG,WAAW,CAAC,CAAC,GAAG,aAAa,CAAC,GAAG,CAAC,CAAC,CAAA;AAE/J,eAAO,MAAM,YAAY;;;;
|
1
|
+
{"version":3,"file":"withSettings.d.ts","sourceRoot":"","sources":["../../../../src/components/hoc/withSettings.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,EAAc,iBAAiB,EAAE,eAAe,EAAE,aAAa,EAAiE,MAAM,OAAO,CAAC;AAE5J,OAAO,EAAE,MAAM,EAAgE,MAAM,aAAa,CAAC;AAEnG,aAAK,WAAW,GAAG;IAAC,KAAK,CAAC,EAAE,MAAM,CAAC;IAAC,SAAS,CAAC,EAAE,MAAM,CAAC;IAAC,WAAW,CAAC,EAAE,MAAM,CAAC;IAAC,MAAM,CAAC,EAAE,MAAM,CAAA;CAAE,CAAA;AAE/F,oBAAY,qBAAqB,CAAC,CAAC,SAAS,MAAM,IAAI,KAAK,CAAC,yBAAyB,CAAC,eAAe,CAAC,iBAAiB,CAAC,CAAC,GAAG,WAAW,CAAC,CAAC,GAAG,aAAa,CAAC,GAAG,CAAC,CAAC,CAAA;AAE/J,eAAO,MAAM,YAAY;;;;8LAsLvB,CAAC;AAGH,eAAO,MAAM,WAAW;;;;8LAAe,CAAC;AACxC,eAAe,YAAY,CAAC"}
|
@@ -35,7 +35,7 @@ const lodash_1 = __importStar(require("lodash"));
|
|
35
35
|
const react_1 = __importStar(require("react"));
|
36
36
|
const contexts_1 = require("../../contexts");
|
37
37
|
const hooks_1 = require("../../hooks");
|
38
|
-
const withSettings = ({ name: elementName, valueOptions = [], configurationOptions = [] }) => (
|
38
|
+
const withSettings = ({ name: elementName, valueOptions = [], configurationOptions = [] }) => (BaseComponent) => react_1.forwardRef((props, forwardedRef) => {
|
39
39
|
const newRef = react_1.useRef();
|
40
40
|
const ref = react_1.useMemo(() => forwardedRef || newRef, [newRef, forwardedRef]);
|
41
41
|
const { model, dataModel = model, configModel = dataModel && `${dataModel}_config`, restrictEdit, action: actionProp, onPress, onClick: onClickProp = onPress } = props;
|
@@ -181,7 +181,7 @@ const withSettings = ({ name: elementName, valueOptions = [], configurationOptio
|
|
181
181
|
return { stack: [{ id, name: dataModel, ref, values, update: updateData, valueOptions, configurationOptions }, ...toolbarStack], setActiveToolbar };
|
182
182
|
}, [id, dataModel, values, toolbarStack, setActiveToolbar, ref, updateData]);
|
183
183
|
return (react_1.default.createElement(contexts_1.ToolbarProvider, { value: elementContext },
|
184
|
-
react_1.default.createElement(
|
184
|
+
react_1.default.createElement(BaseComponent, Object.assign({ "data-id": id, animate: true, change: change, focused: focused, hovered: hovered, isEditing: editMode }, props, configs, values, extraProps, { action: forwardActions, ref: ref }))));
|
185
185
|
});
|
186
186
|
exports.withSettings = withSettings;
|
187
187
|
exports.withToolbar = exports.withSettings;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"withSettings.js","sourceRoot":"","sources":["../../../../src/components/hoc/withSettings.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,iDAAmD;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AE,cAAc,CAAC,CAAC;YACnD,OAAO,GAAG,EAAE,CAAC,MAAM,CAAC,mBAAmB,CAAC,SAAS,EAAE,cAAc,CAAC,CAAA;SACrE;IACL,CAAC,EAAE,CAAC,OAAO,EAAE,cAAc,EAAE,QAAQ,CAAC,CAAC,CAAC;IAExC,MAAM,EAAC,KAAK,EAAE,YAAY,EAAE,gBAAgB,EAAC,GAAG,kBAAU,CAAC,yBAAc,CAAC,CAAC;IAE3E,MAAM,cAAc,GAAO,eAAO,CAAC,GAAE,EAAE;QACnC,OAAO,EAAC,KAAK,EAAC,CAAC,EAAC,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,GAAG,EAAE,MAAM,EAAE,MAAM,EAAE,UAAU,EAAE,YAAY,EAAE,oBAAoB,EAAC,EAAE,GAAG,YAAY,CAAC,EAAE,gBAAgB,EAAC,CAAC;IACnJ,CAAC,EAAE,CAAC,EAAE,EAAE,SAAS,EAAE,MAAM,EAAE,YAAY,EAAE,gBAAgB,EAAE,GAAG,EAAE,UAAU,CAAC,CAAC,CAAC;IAG7E,OAAO,CACH,8BAAC,0BAAe,IAAC,KAAK,EAAE,cAAc;QAClC,8BAAC,aAAa,6BACD,EAAE,EACX,OAAO,QACP,MAAM,EAAE,MAAM,EACd,OAAO,EAAE,OAAO,EAChB,OAAO,EAAE,OAAO,EAChB,SAAS,EAAE,QAAQ,IACf,KAAK,EACL,OAAO,EACP,MAAM,EACN,UAAU,IACd,MAAM,EAAE,cAAc,EACtB,GAAG,EAAE,GAAG,IACV,CACY,CACrB,CAAC;AACN,CAAC,CAAC,CAAC;AAtLU,QAAA,YAAY,gBAsLtB;AAGU,QAAA,WAAW,GAAG,oBAAY,CAAC;AACxC,kBAAe,oBAAY,CAAC"}
|
@@ -0,0 +1,19 @@
|
|
1
|
+
import React, { PropsWithChildren, PropsWithoutRef, RefAttributes } from 'react';
|
2
|
+
import { Action } from '../../hooks';
|
3
|
+
declare type SettingProp = {
|
4
|
+
model?: string;
|
5
|
+
dataModel?: string;
|
6
|
+
configModel?: string;
|
7
|
+
action?: Action;
|
8
|
+
};
|
9
|
+
export declare type ComponentWithSettings<P extends Object> = React.ForwardRefExoticComponent<PropsWithoutRef<PropsWithChildren<P & SettingProp>> & RefAttributes<any>>;
|
10
|
+
export declare const withSettings: ({ valueOptions, configurationOptions }: {
|
11
|
+
valueOptions?: any[];
|
12
|
+
configurationOptions?: any[];
|
13
|
+
}) => <P extends Object>(BaseComponent: React.ComponentType<P>) => React.ForwardRefExoticComponent<React.PropsWithoutRef<React.PropsWithChildren<P & SettingProp>> & React.RefAttributes<any>>;
|
14
|
+
export declare const withToolbar: ({ valueOptions, configurationOptions }: {
|
15
|
+
valueOptions?: any[];
|
16
|
+
configurationOptions?: any[];
|
17
|
+
}) => <P extends Object>(BaseComponent: React.ComponentType<P>) => React.ForwardRefExoticComponent<React.PropsWithoutRef<React.PropsWithChildren<P & SettingProp>> & React.RefAttributes<any>>;
|
18
|
+
export default withSettings;
|
19
|
+
//# sourceMappingURL=withSettings.native.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"withSettings.native.d.ts","sourceRoot":"","sources":["../../../../src/components/hoc/withSettings.native.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,EAAc,iBAAiB,EAAE,eAAe,EAAE,aAAa,EAAW,MAAM,OAAO,CAAC;AACtG,OAAO,EAAE,MAAM,EAA+B,MAAM,aAAa,CAAC;AAElE,aAAK,WAAW,GAAG;IAAC,KAAK,CAAC,EAAE,MAAM,CAAC;IAAC,SAAS,CAAC,EAAE,MAAM,CAAC;IAAC,WAAW,CAAC,EAAE,MAAM,CAAC;IAAC,MAAM,CAAC,EAAE,MAAM,CAAA;CAAE,CAAA;AAE/F,oBAAY,qBAAqB,CAAC,CAAC,SAAS,MAAM,IAAI,KAAK,CAAC,yBAAyB,CAAC,eAAe,CAAC,iBAAiB,CAAC,CAAC,GAAG,WAAW,CAAC,CAAC,GAAG,aAAa,CAAC,GAAG,CAAC,CAAC,CAAA;AAE/J,eAAO,MAAM,YAAY;;;8LAsCvB,CAAC;AAGH,eAAO,MAAM,WAAW;;;8LAAe,CAAC;AACxC,eAAe,YAAY,CAAC"}
|
@@ -0,0 +1,65 @@
|
|
1
|
+
"use strict";
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
3
|
+
if (k2 === undefined) k2 = k;
|
4
|
+
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
5
|
+
}) : (function(o, m, k, k2) {
|
6
|
+
if (k2 === undefined) k2 = k;
|
7
|
+
o[k2] = m[k];
|
8
|
+
}));
|
9
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
10
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
11
|
+
}) : function(o, v) {
|
12
|
+
o["default"] = v;
|
13
|
+
});
|
14
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
15
|
+
if (mod && mod.__esModule) return mod;
|
16
|
+
var result = {};
|
17
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
18
|
+
__setModuleDefault(result, mod);
|
19
|
+
return result;
|
20
|
+
};
|
21
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
22
|
+
var t = {};
|
23
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
24
|
+
t[p] = s[p];
|
25
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
26
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
27
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
28
|
+
t[p[i]] = s[p[i]];
|
29
|
+
}
|
30
|
+
return t;
|
31
|
+
};
|
32
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
33
|
+
exports.withToolbar = exports.withSettings = void 0;
|
34
|
+
const lodash_1 = require("lodash");
|
35
|
+
const react_1 = __importStar(require("react"));
|
36
|
+
const hooks_1 = require("../../hooks");
|
37
|
+
const withSettings = ({ valueOptions = [], configurationOptions = [] }) => (BaseComponent) => react_1.forwardRef((props, forwardedRef) => {
|
38
|
+
const { model, dataModel = model, configModel = dataModel && `${dataModel}_config`, action: actionProp, onPress } = props, remainingProps = __rest(props, ["model", "dataModel", "configModel", "action", "onPress"]);
|
39
|
+
const { data } = hooks_1.useComponentData();
|
40
|
+
// Extract values from component data
|
41
|
+
const values = react_1.useMemo(() => {
|
42
|
+
if (!dataModel || !valueOptions)
|
43
|
+
return {};
|
44
|
+
// merge configuration option from props and configuration option values from model
|
45
|
+
const valuePropNames = lodash_1.map(valueOptions, 'name');
|
46
|
+
const propsForValue = lodash_1.pick(props, valuePropNames);
|
47
|
+
return lodash_1.assign(propsForValue, lodash_1.get(data, dataModel));
|
48
|
+
}, [dataModel, props, data]);
|
49
|
+
// Extract configs from component data
|
50
|
+
const configs = react_1.useMemo(() => {
|
51
|
+
if (!configModel || !configurationOptions)
|
52
|
+
return {};
|
53
|
+
// merge configuration option from props and configuration option values from model
|
54
|
+
const configOptionPropNames = lodash_1.map(configurationOptions, 'name');
|
55
|
+
const propsForConfigOptions = lodash_1.pick(props, configOptionPropNames);
|
56
|
+
return lodash_1.assign(propsForConfigOptions, lodash_1.get(data, configModel));
|
57
|
+
}, [configModel, props, data]);
|
58
|
+
const action = values.action || actionProp || onPress;
|
59
|
+
const actionHandeller = hooks_1.useAction(action);
|
60
|
+
return (react_1.default.createElement(BaseComponent, Object.assign({ ref: forwardedRef }, remainingProps, configs, values, { onPress: actionHandeller, action: action })));
|
61
|
+
});
|
62
|
+
exports.withSettings = withSettings;
|
63
|
+
exports.withToolbar = exports.withSettings;
|
64
|
+
exports.default = exports.withSettings;
|
65
|
+
//# sourceMappingURL=withSettings.native.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"withSettings.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AAM,CAAC,CAAC;QAChE,MAAM,qBAAqB,GAAG,aAAI,CAAC,KAAK,EAAE,qBAAqB,CAAC,CAAC;QACjE,OAAQ,eAAM,CAAC,qBAAqB,EAAE,YAAG,CAAC,IAAI,EAAE,WAAW,CAAC,CAAC,CAAC;IAClE,CAAC,EAAE,CAAC,WAAW,EAAE,KAAK,EAAE,IAAI,CAAC,CAAC,CAAC;IAE/B,MAAM,MAAM,GAAG,MAAM,CAAC,MAAM,IAAI,UAAU,IAAI,OAAO,CAAC;IAEtD,MAAM,eAAe,GAAG,iBAAS,CAAC,MAAM,CAAC,CAAC;IAE1C,OAAO,CACH,8BAAC,aAAa,kBACV,GAAG,EAAE,YAAY,IACb,cAAc,EACd,OAAO,EACP,MAAM,IACV,OAAO,EAAE,eAAe,EACxB,MAAM,EAAE,MAAM,IAChB,CACL,CAAC;AACN,CAAC,CAAC,CAAC;AAtCU,QAAA,YAAY,gBAsCtB;AAGU,QAAA,WAAW,GAAG,oBAAY,CAAC;AACxC,kBAAe,oBAAY,CAAC"}
|
@@ -14,7 +14,7 @@ const useActionable_1 = __importDefault(require("./useActionable"));
|
|
14
14
|
*/
|
15
15
|
const useAction = (action) => {
|
16
16
|
const createActionHandeller = useActionable_1.default();
|
17
|
-
return react_1.useMemo(() => createActionHandeller(action), [action, createActionHandeller]);
|
17
|
+
return react_1.useMemo(() => action ? createActionHandeller(action) : null, [action, createActionHandeller]);
|
18
18
|
};
|
19
19
|
exports.useAction = useAction;
|
20
20
|
exports.default = exports.useAction;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"useAction.js","sourceRoot":"","sources":["../../../src/hooks/useAction.tsx"],"names":[],"mappings":";;;;;;AAAA,iCAAgC;AAChC,oEAAwD;AAExD,qCAAqC;AACrC;;;;GAIG;AAEI,MAAM,SAAS,GAAG,CAAC,MAAe,EAAC,EAAE;IACxC,MAAM,qBAAqB,GAAG,uBAAa,EAAE,CAAC;IAE9C,OAAO,eAAO,CAAC,GAAE,EAAE,CAAA,qBAAqB,CAAC,MAAM,CAAC,EAAE,CAAC,MAAM,EAAE,qBAAqB,CAAC,CAAC,CAAC;
|
1
|
+
{"version":3,"file":"useAction.js","sourceRoot":"","sources":["../../../src/hooks/useAction.tsx"],"names":[],"mappings":";;;;;;AAAA,iCAAgC;AAChC,oEAAwD;AAExD,qCAAqC;AACrC;;;;GAIG;AAEI,MAAM,SAAS,GAAG,CAAC,MAAe,EAAC,EAAE;IACxC,MAAM,qBAAqB,GAAG,uBAAa,EAAE,CAAC;IAE9C,OAAO,eAAO,CAAC,GAAE,EAAE,CAAA,MAAM,CAAC,CAAC,CAAC,qBAAqB,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC,MAAM,EAAE,qBAAqB,CAAC,CAAC,CAAC;AACvG,CAAC,CAAC;AAJW,QAAA,SAAS,aAIpB;AAEF,kBAAe,iBAAS,CAAC"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"useTemplate.d.ts","sourceRoot":"","sources":["../../../src/hooks/useTemplate.tsx"],"names":[],"mappings":"
|
1
|
+
{"version":3,"file":"useTemplate.d.ts","sourceRoot":"","sources":["../../../src/hooks/useTemplate.tsx"],"names":[],"mappings":"AAcA,eAAO,MAAM,WAAW,oBAAqB,MAAM,QAqBlD,CAAC;AAEF,eAAe,WAAW,CAAC"}
|
@@ -6,13 +6,20 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.useTemplate = void 0;
|
7
7
|
const react_1 = require("react");
|
8
8
|
const useScope_1 = require("./useScope");
|
9
|
+
const lodash_1 = require("lodash");
|
10
|
+
const uuid_1 = require("uuid");
|
9
11
|
const handlebars_min_js_1 = __importDefault(require("handlebars/dist/handlebars.min.js"));
|
12
|
+
const handlebarsCompile = lodash_1.memoize((stringValue) => handlebars_min_js_1.default.compile(stringValue, { noEscape: true }), (stringValue) => {
|
13
|
+
if (lodash_1.size(stringValue) < 100)
|
14
|
+
return stringValue;
|
15
|
+
return uuid_1.v5(stringValue, '060c30f4-309d-4054-a62e-7d7390c63cce');
|
16
|
+
});
|
10
17
|
const useTemplate = (templateString) => {
|
11
18
|
const scope = useScope_1.useScope();
|
12
19
|
const applyTemplate = react_1.useCallback((stringValue) => {
|
13
|
-
if (stringValue
|
20
|
+
if (lodash_1.isString(stringValue)) {
|
14
21
|
try {
|
15
|
-
const template =
|
22
|
+
const template = handlebarsCompile(stringValue);
|
16
23
|
return template(scope, { allowProtoMethodsByDefault: true, allowProtoPropertiesByDefault: true });
|
17
24
|
}
|
18
25
|
catch (e) { }
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"useTemplate.js","sourceRoot":"","sources":["../../../src/hooks/useTemplate.tsx"],"names":[],"mappings":";;;;;;AAAA,iCAA2C;AAC3C,yCAAoC;AACpC,0FAA2D;
|
1
|
+
{"version":3,"file":"useTemplate.js","sourceRoot":"","sources":["../../../src/hooks/useTemplate.tsx"],"names":[],"mappings":";;;;;;AAAA,iCAA2C;AAC3C,yCAAoC;AACpC,mCAAiD;AACjD,+BAAoC;AACpC,0FAA2D;AAE3D,MAAM,iBAAiB,GAAG,gBAAO,CACzB,CAAC,WAAkB,EAAE,EAAE,CAAC,2BAAU,CAAC,OAAO,CAAC,WAAW,EAAE,EAAC,QAAQ,EAAE,IAAI,EAAC,CAAC,EACzE,CAAC,WAAW,EAAE,EAAE;IACZ,IAAG,aAAI,CAAC,WAAW,CAAC,GAAC,GAAG;QAAE,OAAO,WAAW,CAAA;IAC5C,OAAO,SAAM,CAAC,WAAW,EAAE,sCAAsC,CAAC,CAAA;AACtE,CAAC,CACJ,CAAA;AAEE,MAAM,WAAW,GAAG,CAAC,cAAuB,EAAC,EAAE;IAElD,MAAM,KAAK,GAAG,mBAAQ,EAAE,CAAC;IACzB,MAAM,aAAa,GAAG,mBAAW,CAAC,CAAC,WAAmB,EAAC,EAAE;QACrD,IAAG,iBAAQ,CAAC,WAAW,CAAC,EAAE;YACtB,IAAG;gBACC,MAAM,QAAQ,GAAG,iBAAiB,CAAC,WAAW,CAAC,CAAC;gBAChD,OAAO,QAAQ,CAAC,KAAK,EAAE,EAAC,0BAA0B,EAAE,IAAI,EAAE,6BAA6B,EAAE,IAAI,EAAC,CAAC,CAAC;aACnG;YAAC,OAAM,CAAC,EAAC,GAAE;SACf;QACD,OAAO,WAAW,CAAC;IACvB,CAAC,EAAE,CAAC,KAAK,CAAC,CAAC,CAAA;IAEX,MAAM,UAAU,GAAG,eAAO,CAAC,GAAE,EAAE;QAC3B,IAAG,cAAc;YAAE,OAAO,aAAa,CAAC,cAAc,CAAC,CAAC;QACxD,OAAO,cAAc,CAAC;IAC1B,CAAC,EAAE,CAAC,aAAa,EAAE,cAAc,CAAC,CAAC,CAAC;IAEpC,IAAG,cAAc,KAAK,SAAS;QAAE,OAAO,aAAa,CAAC;IAEtD,OAAO,UAAU,CAAC;AACtB,CAAC,CAAC;AArBW,QAAA,WAAW,eAqBtB;AAEF,kBAAe,mBAAW,CAAC"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"restApiMiddleware.d.ts","sourceRoot":"","sources":["../../../src/middlewares/restApiMiddleware.tsx"],"names":[],"mappings":"
|
1
|
+
{"version":3,"file":"restApiMiddleware.d.ts","sourceRoot":"","sources":["../../../src/middlewares/restApiMiddleware.tsx"],"names":[],"mappings":"AAgBA,eAAO,MAAM,iBAAiB,yDA4D7B,CAAC;AAEF,eAAe,iBAAiB,CAAC"}
|
@@ -10,7 +10,13 @@ const actions_1 = require("../actions");
|
|
10
10
|
const getUserToken_1 = __importDefault(require("../adapters/getUserToken"));
|
11
11
|
const constants_1 = require("../constants");
|
12
12
|
const lodash_1 = require("lodash");
|
13
|
+
const axios_retry_1 = __importDefault(require("axios-retry"));
|
13
14
|
const apiBaseUrl = constants_1.API_BASE_URL || '/api/';
|
15
|
+
const httpClient = axios_1.default.create();
|
16
|
+
axios_retry_1.default(httpClient, {
|
17
|
+
retries: Number.MAX_SAFE_INTEGER,
|
18
|
+
retryDelay: (retryNumber) => Math.min(5000, axios_retry_1.default.exponentialDelay(retryNumber)),
|
19
|
+
});
|
14
20
|
const restApiMiddleware = (store) => (dispatch) => (action) => {
|
15
21
|
if (action.isRestRequest) {
|
16
22
|
return getUserToken_1.default().then((token) => {
|
@@ -34,33 +40,33 @@ const restApiMiddleware = (store) => (dispatch) => (action) => {
|
|
34
40
|
switch (String(action.method).trim().toUpperCase()) {
|
35
41
|
case actions_1.POST: {
|
36
42
|
dispatch({ type: action.types[0] });
|
37
|
-
return
|
43
|
+
return httpClient.post(endpoint, action.data, lodash_1.defaultsDeep(requestOptions, { params: action.params, headers: action.headers }))
|
38
44
|
.then(resp => (resp.data))
|
39
45
|
.then(response => dispatch(Object.assign(Object.assign({}, action), { success: true, type: action.types[1], response })))
|
40
46
|
.catch(({ response }) => dispatch({ type: action.types[2], error: true, response }));
|
41
47
|
}
|
42
48
|
case actions_1.PUT:
|
43
49
|
dispatch({ type: action.types[0] });
|
44
|
-
return
|
50
|
+
return httpClient.put(endpoint, action.data, lodash_1.defaultsDeep(requestOptions, { params: action.params, headers: action.headers }))
|
45
51
|
.then(resp => (resp.data))
|
46
52
|
.then(response => dispatch(Object.assign(Object.assign({}, action), { success: true, type: action.types[1], response })))
|
47
53
|
.catch(({ response }) => dispatch({ type: action.types[2], error: true, response }));
|
48
54
|
case actions_1.PATCH:
|
49
55
|
dispatch({ type: action.types[0] });
|
50
|
-
return
|
56
|
+
return httpClient.patch(endpoint, action.data, lodash_1.defaultsDeep(requestOptions, { params: action.params, headers: action.headers }))
|
51
57
|
.then(resp => (resp.data))
|
52
58
|
.then(response => dispatch(Object.assign(Object.assign({}, action), { success: true, type: action.types[1], response })))
|
53
59
|
.catch(({ response }) => dispatch({ type: action.types[2], error: true, response }));
|
54
60
|
case actions_1.DELETE:
|
55
61
|
dispatch({ type: action.types[0] });
|
56
|
-
return
|
62
|
+
return httpClient.delete(endpoint, lodash_1.defaultsDeep(requestOptions, { params: action.params, headers: action.headers }))
|
57
63
|
.then(resp => (resp.data))
|
58
64
|
.then(response => dispatch(Object.assign(Object.assign({}, action), { success: true, type: action.types[1], response })))
|
59
65
|
.catch(({ response }) => dispatch({ type: action.types[2], error: true, response }));
|
60
66
|
default:
|
61
67
|
case actions_1.GET:
|
62
68
|
dispatch({ type: action.types[0] });
|
63
|
-
return
|
69
|
+
return httpClient.get(endpoint, lodash_1.defaultsDeep(requestOptions, { params: action.data }, { params: action.params, headers: action.headers }))
|
64
70
|
.then(resp => resp.data)
|
65
71
|
.then(response => dispatch(Object.assign(Object.assign({}, action), { success: true, type: action.types[1], response })))
|
66
72
|
.catch(({ response }) => dispatch({ type: action.types[2], error: true, response }));
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"restApiMiddleware.js","sourceRoot":"","sources":["../../../src/middlewares/restApiMiddleware.tsx"],"names":[],"mappings":";;;;;;AAAA,kDAA0B;AAC1B,wCAAyC;AACzC,wCAAwD;AACxD,4EAAoD;AACpD,4CAA0C;AAC1C,mCAA2C;
|
1
|
+
{"version":3,"file":"restApiMiddleware.js","sourceRoot":"","sources":["../../../src/middlewares/restApiMiddleware.tsx"],"names":[],"mappings":";;;;;;AAAA,kDAA0B;AAC1B,wCAAyC;AACzC,wCAAwD;AACxD,4EAAoD;AACpD,4CAA0C;AAC1C,mCAA2C;AAC3C,8DAAqC;AAErC,MAAM,UAAU,GAAG,wBAAY,IAAI,OAAO,CAAC;AAE3C,MAAM,UAAU,GAAG,eAAK,CAAC,MAAM,EAAE,CAAC;AAClC,qBAAU,CAAC,UAAU,EAAE;IACnB,OAAO,EAAE,MAAM,CAAC,gBAAgB;IAChC,UAAU,EAAE,CAAC,WAAW,EAAC,EAAE,CAAC,IAAI,CAAC,GAAG,CAAC,IAAI,EAAE,qBAAU,CAAC,gBAAgB,CAAC,WAAW,CAAC,CAAC;CACtF,CAAC,CAAC;AAEG,MAAM,iBAAiB,GAAG,CAAC,KAAK,EAAC,EAAE,CAAA,CAAC,QAAQ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e,yBAAiB,CAAC"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"components.d.ts","sourceRoot":"","sources":["../../../src/reducers/components.tsx"],"names":[],"mappings":"
|
1
|
+
{"version":3,"file":"components.d.ts","sourceRoot":"","sources":["../../../src/reducers/components.tsx"],"names":[],"mappings":"AAEA,eAAO,MAAM,wBAAwB,6BAA6B,CAAC;AACnE,eAAO,MAAM,0BAA0B,+BAA+B,CAAC;AACvE,eAAO,MAAM,qBAAqB,0BAA0B,CAAC;AAC7D,eAAO,MAAM,oBAAoB,yBAAyB,CAAC;AAC3D,eAAO,MAAM,kBAAkB,uBAAuB,CAAC;AACvD,eAAO,MAAM,wBAAwB,6BAA6B,CAAC;AACnE,eAAO,MAAM,wBAAwB,6BAA6B,CAAC;AACnE,eAAO,MAAM,cAAc,mBAAmB,CAAC;AAG/C,wBAAgB,oBAAoB,CAAC,SAAS,KAAA;;;EAK7C;AAED,wBAAgB,uBAAuB,CAAC,SAAS,KAAA;;;EAKhD;AAED,wBAAgB,kBAAkB,CAAC,SAAS,KAAA;;;EAK3C;AAED,wBAAgB,kBAAkB,CAAC,MAAM,KAAA;;;EAKxC;AAED,wBAAgB,iBAAiB,CAAC,SAAS,KAAA;;;EAK1C;AAED,wBAAgB,iBAAiB,CAAC,SAAS,KAAA;;;EAK1C;AAED,wBAAgB,sBAAsB,CAAC,SAAS,KAAA;;;EAK/C;AAED,wBAAgB,aAAa,CAAC,WAAW,KAAA;;;EAKxC;AAWD,eAAO,MAAM,UAAU,kCAqDtB,CAAC;AAEF,eAAe,UAAU,CAAC"}
|
@@ -1,6 +1,7 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
3
|
exports.components = exports.removePackage = exports.registerStyleComponent = exports.registerFormField = exports.registerComponent = exports.addComponentPlugin = exports.addComponentToList = exports.loadBasicComponentsList = exports.loadComponentFromUrl = exports.REMOVE_PACKAGE = exports.REGISTER_STYLE_COMPONENT = exports.REGISTER_FIELD_COMPONENT = exports.REGISTER_COMPONENT = exports.ADD_COMPONENT_PLUGIN = exports.ADD_COMPONENT_TO_LIST = exports.LOAD_BASIC_COMPONENTS_LIST = exports.LOAD_COMPONENTS_FROM_URL = void 0;
|
4
|
+
const lodash_1 = require("lodash");
|
4
5
|
exports.LOAD_COMPONENTS_FROM_URL = 'LOAD_COMPONENTS_FROM_URL';
|
5
6
|
exports.LOAD_BASIC_COMPONENTS_LIST = 'LOAD_BASIC_COMPONENTS_LIST';
|
6
7
|
exports.ADD_COMPONENT_TO_LIST = 'ADD_COMPONENT_TO_LIST';
|
@@ -89,7 +90,7 @@ const components = (state = initialState, action) => {
|
|
89
90
|
else {
|
90
91
|
newComponents.push(action.component);
|
91
92
|
}
|
92
|
-
return Object.assign(Object.assign({}, state), { components: newComponents });
|
93
|
+
return Object.assign(Object.assign({}, state), { components: lodash_1.assign(newComponents, lodash_1.keyBy(newComponents, 'uuid')) });
|
93
94
|
}
|
94
95
|
case exports.REGISTER_FIELD_COMPONENT:
|
95
96
|
return Object.assign(Object.assign({}, state), { fieldComponents: [...state.fieldComponents, Object.assign({}, action.component)] });
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"components.js","sourceRoot":"","sources":["../../../src/reducers/components.tsx"],"names":[],"mappings":";;;
|
1
|
+
{"version":3,"file":"components.js","sourceRoot":"","sources":["../../../src/reducers/components.tsx"],"names":[],"mappings":";;;AAAA,mCAAuC;AAE1B,QAAA,wBAAwB,GAAG,0BAA0B,CAAC;AACtD,QAAA,0BAA0B,GAAG,4BAA4B,CAAC;AAC1D,QAAA,qBAAqB,GAAG,uBAAuB,CAAC;AAChD,QAAA,oBAAoB,GAAG,sBAAsB,CAAC;AAC9C,QAAA,kBAAkB,GAAG,oBAAoB,CAAC;AAC1C,QAAA,wBAAwB,GAAG,0BAA0B,CAAC;AACtD,QAAA,wBAAwB,GAAG,0BAA0B,CAAC;AACtD,QAAA,cAAc,GAAG,gBAAgB,CAAC;A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AAC,IAAI,EAAE,MAAM,CAAC,SAAS,CAAC,IACzC;QACN,KAAK,4BAAoB;YACrB,uCACO,KAAK,KACR,gBAAgB,EAAE,CAAC,GAAG,KAAK,CAAC,gBAAgB,EAAE,MAAM,CAAC,MAAM,CAAC,IAC9D;QACN;YACI,OAAO,KAAK,CAAC;KACpB;AAEL,CAAC,CAAC;AArDW,QAAA,UAAU,cAqDrB;AAEF,kBAAe,kBAAU,CAAC"}
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@evlop/commons",
|
3
|
-
"version": "1.0.
|
3
|
+
"version": "1.0.147",
|
4
4
|
"description": "",
|
5
5
|
"main": "dist/main.js",
|
6
6
|
"peerDependencies": {
|
@@ -27,6 +27,7 @@
|
|
27
27
|
},
|
28
28
|
"optionalDependencies": {},
|
29
29
|
"dependencies": {
|
30
|
+
"axios-retry": "^3.3.1",
|
30
31
|
"moment": "^2.29.1",
|
31
32
|
"react-native-base64": "^0.2.1"
|
32
33
|
},
|