@evlop/commons 1.0.175 → 1.0.177
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/src/constants/i18ninstance.js +1 -1
- package/dist/src/constants/i18ninstance.js.map +1 -1
- package/dist/src/helpers/axiosClient.d.ts +3 -0
- package/dist/src/helpers/axiosClient.d.ts.map +1 -0
- package/dist/src/helpers/{axios.js → axiosClient.js} +5 -4
- package/dist/src/helpers/axiosClient.js.map +1 -0
- package/dist/src/helpers/index.d.ts +1 -0
- package/dist/src/helpers/index.d.ts.map +1 -1
- package/dist/src/helpers/index.js +1 -0
- package/dist/src/helpers/index.js.map +1 -1
- package/dist/src/middlewares/restApiMiddleware.js +7 -7
- package/dist/src/middlewares/restApiMiddleware.js.map +1 -1
- package/dist/src/reducers/icons.js +2 -2
- package/dist/src/reducers/icons.js.map +1 -1
- package/package.json +1 -1
- package/dist/src/components/Dropable.d.ts +0 -3
- package/dist/src/components/Dropable.d.ts.map +0 -1
- package/dist/src/components/Dropable.js +0 -39
- package/dist/src/components/Dropable.js.map +0 -1
- package/dist/src/helpers/axios.d.ts +0 -3
- package/dist/src/helpers/axios.d.ts.map +0 -1
- package/dist/src/helpers/axios.js.map +0 -1
@@ -9,7 +9,7 @@ exports.i18nInstance = i18next_1.default.createInstance();
|
|
9
9
|
exports.i18nInstance.init({
|
10
10
|
compatibilityJSON: "v3",
|
11
11
|
lng: "en",
|
12
|
-
fallbackLng: ['en', 'EN'],
|
12
|
+
fallbackLng: ['default', 'en', 'EN'],
|
13
13
|
defaultNS: "common",
|
14
14
|
interpolation: {
|
15
15
|
escapeValue: false,
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"i18ninstance.js","sourceRoot":"","sources":["../../../src/constants/i18ninstance.ts"],"names":[],"mappings":";;;;;;AAAA,sDAA8B;AAEjB,QAAA,YAAY,GAAG,iBAAO,CAAC,cAAc,EAAE,CAAC;AACrD,oBAAY,CAAC,IAAI,CAAC;IACd,iBAAiB,EAAE,IAAI;IACvB,GAAG,EAAE,IAAI;IACT,WAAW,EAAE,CAAC,IAAI,EAAE,IAAI,CAAC;
|
1
|
+
{"version":3,"file":"i18ninstance.js","sourceRoot":"","sources":["../../../src/constants/i18ninstance.ts"],"names":[],"mappings":";;;;;;AAAA,sDAA8B;AAEjB,QAAA,YAAY,GAAG,iBAAO,CAAC,cAAc,EAAE,CAAC;AACrD,oBAAY,CAAC,IAAI,CAAC;IACd,iBAAiB,EAAE,IAAI;IACvB,GAAG,EAAE,IAAI;IACT,WAAW,EAAE,CAAC,SAAS,EAAE,IAAI,EAAE,IAAI,CAAC;IACpC,SAAS,EAAE,QAAQ;IACnB,aAAa,EAAC;QACV,WAAW,EAAE,KAAK;KACrB;IACD,KAAK,EAAC;QACF,WAAW,EAAE,KAAK;KACrB;CACJ,CAAC,CAAC;AAEH,kBAAe,oBAAY,CAAC"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"axiosClient.d.ts","sourceRoot":"","sources":["../../../src/helpers/axiosClient.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,WAAW,+BAEtB,CAAC;AAOF,eAAe,WAAW,CAAC"}
|
@@ -3,15 +3,16 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
4
4
|
};
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
6
|
+
exports.axiosClient = void 0;
|
6
7
|
const axios_1 = __importDefault(require("axios"));
|
7
8
|
const constants_1 = require("../constants");
|
8
9
|
const axios_retry_1 = __importDefault(require("axios-retry"));
|
9
|
-
|
10
|
+
exports.axiosClient = axios_1.default.create({
|
10
11
|
baseURL: constants_1.API_BASE_URL || '/api',
|
11
12
|
});
|
12
|
-
axios_retry_1.default(
|
13
|
+
axios_retry_1.default(exports.axiosClient, {
|
13
14
|
retries: Number.MAX_SAFE_INTEGER,
|
14
15
|
retryDelay: (retryNumber) => Math.min(10000, axios_retry_1.default.exponentialDelay(retryNumber)),
|
15
16
|
});
|
16
|
-
exports.default =
|
17
|
-
//# sourceMappingURL=
|
17
|
+
exports.default = exports.axiosClient;
|
18
|
+
//# sourceMappingURL=axiosClient.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"axiosClient.js","sourceRoot":"","sources":["../../../src/helpers/axiosClient.ts"],"names":[],"mappings":";;;;;;AAAA,kDAA0B;AAC1B,4CAA4C;AAC5C,8DAAqC;AAExB,QAAA,WAAW,GAAG,eAAK,CAAC,MAAM,CAAC;IACpC,OAAO,EAAE,wBAAY,IAAI,MAAM;CAClC,CAAC,CAAC;AAEH,qBAAU,CAAC,mBAAW,EAAE;IACpB,OAAO,EAAE,MAAM,CAAC,gBAAgB;IAChC,UAAU,EAAE,CAAC,WAAW,EAAC,EAAE,CAAC,IAAI,CAAC,GAAG,CAAC,KAAK,EAAE,qBAAU,CAAC,gBAAgB,CAAC,WAAW,CAAC,CAAC;CACvF,CAAC,CAAC;AAEH,kBAAe,mBAAW,CAAC"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/helpers/index.tsx"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAC;AACnC,cAAc,aAAa,CAAC;AAC5B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,UAAU,CAAC;AACzB,cAAc,eAAe,CAAC;AAC9B,cAAc,aAAa,CAAC;AAC5B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,cAAc,CAAC"}
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/helpers/index.tsx"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAC;AACnC,cAAc,aAAa,CAAC;AAC5B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,UAAU,CAAC;AACzB,cAAc,eAAe,CAAC;AAC9B,cAAc,eAAe,CAAC;AAC9B,cAAc,aAAa,CAAC;AAC5B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,cAAc,CAAC"}
|
@@ -16,6 +16,7 @@ __exportStar(require("./commonStyles"), exports);
|
|
16
16
|
__exportStar(require("./themeHelpers"), exports);
|
17
17
|
__exportStar(require("./base64"), exports);
|
18
18
|
__exportStar(require("./i18nHelpers"), exports);
|
19
|
+
__exportStar(require("./axiosClient"), exports);
|
19
20
|
__exportStar(require("./analytics"), exports);
|
20
21
|
__exportStar(require("./remoteAction"), exports);
|
21
22
|
__exportStar(require("./pathHelper"), exports);
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/helpers/index.tsx"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qDAAmC;AACnC,8CAA4B;AAC5B,iDAA+B;AAC/B,iDAA+B;AAC/B,2CAAyB;AACzB,gDAA8B;AAC9B,8CAA4B;AAC5B,iDAA+B;AAC/B,+CAA6B"}
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/helpers/index.tsx"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qDAAmC;AACnC,8CAA4B;AAC5B,iDAA+B;AAC/B,iDAA+B;AAC/B,2CAAyB;AACzB,gDAA8B;AAC9B,gDAA8B;AAC9B,8CAA4B;AAC5B,iDAA+B;AAC/B,+CAA6B"}
|
@@ -8,7 +8,7 @@ const lodash_1 = require("lodash");
|
|
8
8
|
const actions_1 = require("../actions");
|
9
9
|
const getUserToken_1 = __importDefault(require("../adapters/getUserToken"));
|
10
10
|
const helpers_1 = require("../helpers");
|
11
|
-
const
|
11
|
+
const axiosClient_1 = __importDefault(require("../helpers/axiosClient"));
|
12
12
|
const restApiMiddleware = (store) => {
|
13
13
|
return (dispatch) => (action) => {
|
14
14
|
if (action.isRestRequest) {
|
@@ -33,33 +33,33 @@ const restApiMiddleware = (store) => {
|
|
33
33
|
switch (String(action.method).trim().toUpperCase()) {
|
34
34
|
case actions_1.POST: {
|
35
35
|
dispatch({ type: action.types[0] });
|
36
|
-
return
|
36
|
+
return axiosClient_1.default.post(endpoint, action.data, lodash_1.defaultsDeep(requestOptions, { params: action.params, headers: action.headers }))
|
37
37
|
.then(resp => (resp.data))
|
38
38
|
.then(response => dispatch(Object.assign(Object.assign({}, action), { success: true, type: action.types[1], response })))
|
39
39
|
.catch(({ response }) => dispatch({ type: action.types[2], error: true, response }));
|
40
40
|
}
|
41
41
|
case actions_1.PUT:
|
42
42
|
dispatch({ type: action.types[0] });
|
43
|
-
return
|
43
|
+
return axiosClient_1.default.put(endpoint, action.data, lodash_1.defaultsDeep(requestOptions, { params: action.params, headers: action.headers }))
|
44
44
|
.then(resp => (resp.data))
|
45
45
|
.then(response => dispatch(Object.assign(Object.assign({}, action), { success: true, type: action.types[1], response })))
|
46
46
|
.catch(({ response }) => dispatch({ type: action.types[2], error: true, response }));
|
47
47
|
case actions_1.PATCH:
|
48
48
|
dispatch({ type: action.types[0] });
|
49
|
-
return
|
49
|
+
return axiosClient_1.default.patch(endpoint, action.data, lodash_1.defaultsDeep(requestOptions, { params: action.params, headers: action.headers }))
|
50
50
|
.then(resp => (resp.data))
|
51
51
|
.then(response => dispatch(Object.assign(Object.assign({}, action), { success: true, type: action.types[1], response })))
|
52
52
|
.catch(({ response }) => dispatch({ type: action.types[2], error: true, response }));
|
53
53
|
case actions_1.DELETE:
|
54
54
|
dispatch({ type: action.types[0] });
|
55
|
-
return
|
55
|
+
return axiosClient_1.default.delete(endpoint, lodash_1.defaultsDeep(requestOptions, { params: action.params, headers: action.headers }))
|
56
56
|
.then(resp => (resp.data))
|
57
57
|
.then(response => dispatch(Object.assign(Object.assign({}, action), { success: true, type: action.types[1], response })))
|
58
58
|
.catch(({ response }) => dispatch({ type: action.types[2], error: true, response }));
|
59
59
|
default:
|
60
60
|
case actions_1.GET:
|
61
61
|
dispatch({ type: action.types[0] });
|
62
|
-
return
|
62
|
+
return axiosClient_1.default.get(endpoint, lodash_1.defaultsDeep(requestOptions, { params: action.data }, { params: action.params, headers: action.headers }))
|
63
63
|
.then(resp => resp.data)
|
64
64
|
.then(response => dispatch(Object.assign(Object.assign({}, action), { success: true, type: action.types[1], response })))
|
65
65
|
.catch(({ response }) => dispatch({ type: action.types[2], error: true, response }));
|
@@ -68,7 +68,7 @@ const restApiMiddleware = (store) => {
|
|
68
68
|
}
|
69
69
|
else {
|
70
70
|
if (action.type === actions_1.SET_API_BASE_URL) {
|
71
|
-
|
71
|
+
axiosClient_1.default.defaults.baseURL = action.url;
|
72
72
|
}
|
73
73
|
return dispatch(action);
|
74
74
|
}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"restApiMiddleware.js","sourceRoot":"","sources":["../../../src/middlewares/restApiMiddleware.tsx"],"names":[],"mappings":";;;;;;AAAA,mCAA2C;AAC3C,wCAA6E;AAC7E,4EAAoD;AACpD,wCAA2C;AAC3C,
|
1
|
+
{"version":3,"file":"restApiMiddleware.js","sourceRoot":"","sources":["../../../src/middlewares/restApiMiddleware.tsx"],"names":[],"mappings":";;;;;;AAAA,mCAA2C;AAC3C,wCAA6E;AAC7E,4EAAoD;AACpD,wCAA2C;AAC3C,yEAAgD;AAEzC,MAAM,iBAAiB,GAAG,CAAC,KAAK,EAAC,EAAE;IACtC,OAAO,CAAC,QAAiB,EAAC,EAAE,CAAA,CAAC,MAAU,EAAC,EAAE;QAC1C,IAAG,MAAM,CAAC,aAAa,EAAC;YACpB,OAAO,sBAAY,EAAE,CAAC,IAAI,CAAC,CAAC,KAAa,EAAE,EAAE;gBACzC,MAAM,cAAc,GAAG,EAAE,CAAC;gBAC1B,IAAG,KAAK,EAAC;oBACL,YAAG,CAAC,cAAc,EAAE,CAAC,SAAS,EAAE,eAAe,CAAC,EAAE,UAAU,KAAK,EAAE,CAAC,CAAA;iBACvE;gBACD,IAAI,QAAQ,GAAU,MAAM,CAAC,QAAQ,CAAC;gBACtC,MAAM,UAAU,GAAG,uBAAa,CAAC,QAAQ,CAAC,CAAC;gBAC3C,IAAG,CAAC,UAAU,EAAC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BAClC,OAAO,qBAAU,CAAC,GAAG,CAAC,QAAQ,EAAE,qBAAY,CAAC,cAAc,EAAE,EAAC,MAAM,EAAE,MAAM,CAAC,IAAI,EAAC,EAAE,EAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,EAAE,MAAM,CAAC,OAAO,EAAC,CAAC,CAAC;6BACjI,IAAI,CAAC,IAAI,CAAA,EAAE,CAAA,IAAI,CAAC,IAAI,CAAC;6BACrB,IAAI,CAAC,QAAQ,CAAA,EAAE,CAAC,QAAQ,iCAAK,MAAM,KAAE,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,QAAQ,IAAE,CAAC;6BACtF,KAAK,CAAC,CAAC,EAAC,QAAQ,EAAC,EAAC,EAAE,CAAA,QAAQ,CAAC,EAAC,IAAI,EAAE,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,KAAK,EAAC,IAAI,EAAE,QAAQ,EAAC,CAAC,CAAC,CAAC;iBACzF;YACL,CAAC,CAAC,CAAC;SACN;aACG;YACA,IAAG,MAAM,CAAC,IAAI,KAAK,0BAAgB,EAAC;gBAChC,qBAAU,CAAC,QAAQ,CAAC,OAAO,GAAG,MAAM,CAAC,GAAG,CAAC;aAC5C;YACD,OAAO,QAAQ,CAAC,MAAM,CAAC,CAAC;SAC3B;IAEL,CAAC,CAAA;AAAA,CAAC,CAAC;AAjEU,QAAA,iBAAiB,qBAiE3B;AAEH,kBAAe,yBAAiB,CAAC"}
|
@@ -25,7 +25,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
25
25
|
Object.defineProperty(exports, "__esModule", { value: true });
|
26
26
|
exports.fetchIcons = exports.getIcons = exports.registerIcons = exports.registerIcon = exports.REGISTER_ICONS = exports.REGISTER_ICON = void 0;
|
27
27
|
const lodash_1 = require("lodash");
|
28
|
-
const
|
28
|
+
const axiosClient_1 = __importDefault(require("../helpers/axiosClient"));
|
29
29
|
exports.REGISTER_ICON = 'REGISTER_ICON';
|
30
30
|
exports.REGISTER_ICONS = 'REGISTER_ICONS';
|
31
31
|
function registerIcon(icon) {
|
@@ -42,7 +42,7 @@ function registerIcons(icons) {
|
|
42
42
|
};
|
43
43
|
}
|
44
44
|
exports.registerIcons = registerIcons;
|
45
|
-
exports.getIcons = lodash_1.memoize(() =>
|
45
|
+
exports.getIcons = lodash_1.memoize(() => axiosClient_1.default.get('https://cdn.evlop.com/assets-info/icons.min.json?v=9').then(r => {
|
46
46
|
const iconsMin = r.data;
|
47
47
|
const icons = Object.keys(iconsMin).reduce((acc, key) => {
|
48
48
|
const _a = iconsMin[key], { c } = _a, rest = __rest(_a, ["c"]);
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"icons.js","sourceRoot":"","sources":["../../../src/reducers/icons.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,mCAAwD;AACxD,
|
1
|
+
{"version":3,"file":"icons.js","sourceRoot":"","sources":["../../../src/reducers/icons.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,mCAAwD;AACxD,yEAA2C;AAE9B,QAAA,aAAa,GAAG,eAAe,CAAC;AAChC,QAAA,cAAc,GAAG,gBAAgB,CAAC;AAE/C,SAAgB,YAAY,CAAC,IAAS;IAClC,OAAO;QACH,IAAI,EAAE,qBAAa;QACnB,IAAI;KACP,CAAC;AACN,CAAC;AALD,oCAKC;AAED,SAAgB,aAAa,CAAC,KAAY;IACtC,OAAO;QACH,IAAI,EAAE,sBAAc;QACpB,KAAK;KACR,CAAC;AACN,CAAC;AALD,sCAKC;AAEY,QAAA,QAAQ,GAAG,gBAAO,CAAC,GAAE,EAAE,CAAA,qBAAK,CAAC,GAAG,CAAC,sDAAsD,CAAC,CAAC,IAAI,CAAC,CAAC,CAAA,EAAE;IAC1G,MAAM,QAAQ,GAAG,CAAC,CAAC,IAAI,CAAC;IACxB,MAAM,KAAK,GAAG,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,GAAG,KAAK,EAAE,GAAG,MAAM,CAAC,KAAK,CAAC,EAAE,IAAI,CAAC,CAAA;YAC1D,eAAM,CAAC,QAAQ,EAAE,cAAK,CAAC,QAAQ,EAAE,IAAI,CAAC,CAAC,CAAC;YACxC,OAAO,QAAQ,CAAC;SACnB;QACD;YACI,OAAO,KAAK,CAAC;KACpB;AACL,CAAC,CAAA"}
|
package/package.json
CHANGED
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"Dropable.d.ts","sourceRoot":"","sources":["../../../src/components/Dropable.tsx"],"names":[],"mappings":";AAiCA,wBAaW"}
|
@@ -1,39 +0,0 @@
|
|
1
|
-
"use strict";
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
4
|
-
};
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
6
|
-
const react_1 = __importDefault(require("react"));
|
7
|
-
const styled_components_1 = __importDefault(require("styled-components"));
|
8
|
-
const react_dnd_1 = require("react-dnd");
|
9
|
-
const constants_1 = require("../constants");
|
10
|
-
const DropableContainer = styled_components_1.default.div && styled_components_1.default.div(({ theme }) => ({
|
11
|
-
display: 'none',
|
12
|
-
transition: 'all 0.25s',
|
13
|
-
height: 'auto',
|
14
|
-
backgroundColor: theme.adminPrimaryColor,
|
15
|
-
border: '2px dashed #17559b',
|
16
|
-
color: '#fff',
|
17
|
-
padding: 20,
|
18
|
-
}), ({ canDrop }) => canDrop && {
|
19
|
-
display: 'block',
|
20
|
-
opacity: 0,
|
21
|
-
}, ({ canDrop, isOver }) => canDrop && isOver && {
|
22
|
-
visibility: 'visible',
|
23
|
-
opacity: 1,
|
24
|
-
});
|
25
|
-
const Dropable = ({ isOver, canDrop, connectDropTarget }) => {
|
26
|
-
return connectDropTarget(react_1.default.createElement("div", { style: { paddingBottom: 200 } },
|
27
|
-
react_1.default.createElement(DropableContainer, { canDrop: canDrop, isOver: isOver }, "Drag here and release to add selected component here")));
|
28
|
-
};
|
29
|
-
exports.default = react_dnd_1.DropTarget(() => [constants_1.TYPE_COMPONENT], {
|
30
|
-
drop(props, monitor) {
|
31
|
-
props.onDrop(monitor.getItem());
|
32
|
-
},
|
33
|
-
}, (connect, monitor) => ({
|
34
|
-
connectDropTarget: connect.dropTarget(),
|
35
|
-
isDragging: false,
|
36
|
-
isOver: monitor.isOver(),
|
37
|
-
canDrop: monitor.canDrop(),
|
38
|
-
}))(Dropable);
|
39
|
-
//# sourceMappingURL=Dropable.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"Dropable.js","sourceRoot":"","sources":["../../../src/components/Dropable.tsx"],"names":[],"mappings":";;;;;AAAA,kDAAyB;AACzB,0EAAsC;AACtC,yCAAsC;AACtC,4CAA4C;AAE5C,MAAM,iBAAiB,GAAG,2BAAM,CAAC,GAAG,IAAI,2BAAM,CAAC,GAAG,CAAC,CAAC,EAAC,KAAK,EAAC,EAAC,EAAE,CAAA,CAAC;IACvD,OAAO,EAAE,MAAM;IACf,UAAU,EAAE,WAAW;IACvB,MAAM,EAAE,MAAM;IACd,eAAe,EAAE,KAAK,CAAC,iBAAiB;IACxC,MAAM,EAAE,oBAAoB;IAC5B,KAAK,EAAE,MAAM;IACb,OAAO,EAAE,EAAE;CACd,CAAC,EACF,CAAC,EAAC,OAAO,EAAC,EAAC,EAAE,CAAA,OAAO,IAAI;IACpB,OAAO,EAAE,OAAO;IAChB,OAAO,EAAE,CAAC;CACb,EACD,CAAC,EAAC,OAAO,EAAE,MAAM,EAAC,EAAC,EAAE,CAAA,OAAO,IAAI,MAAM,IAAI;IACtC,UAAU,EAAE,SAAS;IACrB,OAAO,EAAE,CAAC;CACb,CAAC,CAAC;AAEP,MAAM,QAAQ,GAAG,CAAC,EAAC,MAAM,EAAE,OAAO,EAAE,iBAAiB,EAAC,EAAE,EAAE;IACtD,OAAO,iBAAiB,CACpB,uCAAK,KAAK,EAAE,EAAC,aAAa,EAAE,GAAG,EAAC;QAC5B,8BAAC,iBAAiB,IAAC,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,2DAE/B,CAClB,CACT,CAAA;AACL,CAAC,CAAC;AAEF,kBAAe,sBAAU,CACrB,GAAE,EAAE,CAAA,CAAC,0BAAc,CAAC,EACpB;IACI,IAAI,CAAC,KAAK,EAAE,OAAO;QACf,KAAK,CAAC,MAAM,CAAC,OAAO,CAAC,OAAO,EAAE,CAAC,CAAC;IACpC,CAAC;CACJ,EACD,CAAC,OAAO,EAAE,OAAO,EAAE,EAAE,CAAC,CAAC;IACnB,iBAAiB,EAAE,OAAO,CAAC,UAAU,EAAE;IACvC,UAAU,EAAE,KAAK;IACjB,MAAM,EAAE,OAAO,CAAC,MAAM,EAAE;IACxB,OAAO,EAAE,OAAO,CAAC,OAAO,EAAE;CAC7B,CAAC,CACL,CAAC,QAAQ,CAAC,CAAA"}
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"axios.d.ts","sourceRoot":"","sources":["../../../src/helpers/axios.ts"],"names":[],"mappings":"AAIA,QAAA,MAAM,KAAK,+BAET,CAAC;AAOF,eAAe,KAAK,CAAC"}
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"axios.js","sourceRoot":"","sources":["../../../src/helpers/axios.ts"],"names":[],"mappings":";;;;;AAAA,kDAA0B;AAC1B,4CAA4C;AAC5C,8DAAqC;AAErC,MAAM,KAAK,GAAG,eAAK,CAAC,MAAM,CAAC;IACvB,OAAO,EAAE,wBAAY,IAAI,MAAM;CAClC,CAAC,CAAC;AAEH,qBAAU,CAAC,KAAK,EAAE;IACd,OAAO,EAAE,MAAM,CAAC,gBAAgB;IAChC,UAAU,EAAE,CAAC,WAAW,EAAC,EAAE,CAAC,IAAI,CAAC,GAAG,CAAC,KAAK,EAAE,qBAAU,CAAC,gBAAgB,CAAC,WAAW,CAAC,CAAC;CACvF,CAAC,CAAC;AAEH,kBAAe,KAAK,CAAC"}
|