@evlop/commons 1.0.102 → 1.0.105
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/src/constants/index.d.ts +2 -3
- package/dist/src/constants/index.d.ts.map +1 -1
- package/dist/src/constants/index.js +4 -14
- package/dist/src/constants/index.js.map +1 -1
- package/dist/src/constants/platformSpecific.d.ts +2 -1
- package/dist/src/constants/platformSpecific.d.ts.map +1 -1
- package/dist/src/constants/platformSpecific.js +3 -0
- package/dist/src/constants/platformSpecific.js.map +1 -1
- 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/helpers/themeHelpers.d.ts +21 -0
- package/dist/src/helpers/themeHelpers.d.ts.map +1 -0
- package/dist/src/helpers/themeHelpers.js +88 -0
- package/dist/src/helpers/themeHelpers.js.map +1 -0
- package/package.json +1 -1
- package/dist/src/adapters/setUserToken/index.d.ts +0 -2
- package/dist/src/adapters/setUserToken/index.d.ts.map +0 -1
- package/dist/src/adapters/setUserToken/index.js +0 -22
- package/dist/src/adapters/setUserToken/index.js.map +0 -1
- package/dist/src/adapters/setUserToken/index.native.d.ts +0 -2
- package/dist/src/adapters/setUserToken/index.native.d.ts.map +0 -1
- package/dist/src/adapters/setUserToken/index.native.js +0 -28
- package/dist/src/adapters/setUserToken/index.native.js.map +0 -1
@@ -1,3 +1,4 @@
|
|
1
|
+
import { API_BASE_URL, SOCKET_URL } from './platformSpecific';
|
1
2
|
export declare const IS_SSR: boolean;
|
2
3
|
export declare const DIRECTION_TOP = "direction/Top";
|
3
4
|
export declare const DIRECTION_RIGHT = "direction/Right";
|
@@ -6,9 +7,7 @@ export declare const DIRECTION_LEFT = "direction/Left";
|
|
6
7
|
export declare const VERTICAL_LAYOUT = "layout/vertical";
|
7
8
|
export declare const HORIZONTAL_LAYOUT = "layout/horizontal";
|
8
9
|
export declare const TYPE_COMPONENT = "type/component";
|
9
|
-
export declare const API_BASE_URL: string;
|
10
|
-
export declare const SOCKET_URL: string;
|
11
10
|
export declare const DATA_SOURCE_KEY_NAMESPACE = "a0aec1c8-4fed-4d5d-b399-504887b3b8e4";
|
11
|
+
export { API_BASE_URL, SOCKET_URL };
|
12
12
|
export { default as iconInfo } from './iconInfo';
|
13
|
-
export * from './platformSpecific';
|
14
13
|
//# sourceMappingURL=index.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/constants/index.tsx"],"names":[],"mappings":"AAAA,eAAO,MAAM,MAAM,SAAgE,CAAC;AAEpF,eAAO,MAAM,aAAa,kBAAkB,CAAC;AAC7C,eAAO,MAAM,eAAe,oBAAoB,CAAC;AACjD,eAAO,MAAM,gBAAgB,qBAAqB,CAAC;AACnD,eAAO,MAAM,cAAc,mBAAmB,CAAC;AAG/C,eAAO,MAAM,eAAe,oBAAoB,CAAC;AACjD,eAAO,MAAM,iBAAiB,sBAAsB,CAAC;AAErD,eAAO,MAAM,cAAc,mBAAmB,CAAC;
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/constants/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAC9D,eAAO,MAAM,MAAM,SAAgE,CAAC;AAEpF,eAAO,MAAM,aAAa,kBAAkB,CAAC;AAC7C,eAAO,MAAM,eAAe,oBAAoB,CAAC;AACjD,eAAO,MAAM,gBAAgB,qBAAqB,CAAC;AACnD,eAAO,MAAM,cAAc,mBAAmB,CAAC;AAG/C,eAAO,MAAM,eAAe,oBAAoB,CAAC;AACjD,eAAO,MAAM,iBAAiB,sBAAsB,CAAC;AAErD,eAAO,MAAM,cAAc,mBAAmB,CAAC;AAE/C,eAAO,MAAM,yBAAyB,yCAAyC,CAAC;AAChF,OAAO,EAAC,YAAY,EAAE,UAAU,EAAC,CAAA;AAEjC,OAAO,EAAE,OAAO,IAAI,QAAQ,EAAE,MAAM,YAAY,CAAC"}
|
@@ -1,19 +1,12 @@
|
|
1
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 __exportStar = (this && this.__exportStar) || function(m, exports) {
|
10
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
11
|
-
};
|
12
2
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
13
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
14
4
|
};
|
15
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
16
|
-
exports.iconInfo = exports.
|
6
|
+
exports.iconInfo = exports.SOCKET_URL = exports.API_BASE_URL = exports.DATA_SOURCE_KEY_NAMESPACE = exports.TYPE_COMPONENT = exports.HORIZONTAL_LAYOUT = exports.VERTICAL_LAYOUT = exports.DIRECTION_LEFT = exports.DIRECTION_BOTTOM = exports.DIRECTION_RIGHT = exports.DIRECTION_TOP = exports.IS_SSR = void 0;
|
7
|
+
const platformSpecific_1 = require("./platformSpecific");
|
8
|
+
Object.defineProperty(exports, "API_BASE_URL", { enumerable: true, get: function () { return platformSpecific_1.API_BASE_URL; } });
|
9
|
+
Object.defineProperty(exports, "SOCKET_URL", { enumerable: true, get: function () { return platformSpecific_1.SOCKET_URL; } });
|
17
10
|
exports.IS_SSR = ['true', '1'].includes(String(process.env.SSR).toLowerCase());
|
18
11
|
exports.DIRECTION_TOP = "direction/Top";
|
19
12
|
exports.DIRECTION_RIGHT = "direction/Right";
|
@@ -22,10 +15,7 @@ exports.DIRECTION_LEFT = "direction/Left";
|
|
22
15
|
exports.VERTICAL_LAYOUT = 'layout/vertical';
|
23
16
|
exports.HORIZONTAL_LAYOUT = 'layout/horizontal';
|
24
17
|
exports.TYPE_COMPONENT = "type/component";
|
25
|
-
exports.API_BASE_URL = process.env.API_BASE_URL || process.env.REACT_APP_API_BASE_URL;
|
26
|
-
exports.SOCKET_URL = process.env.SOCKET_URL || process.env.REACT_APP_SOCKET_URL || exports.API_BASE_URL;
|
27
18
|
exports.DATA_SOURCE_KEY_NAMESPACE = "a0aec1c8-4fed-4d5d-b399-504887b3b8e4";
|
28
19
|
var iconInfo_1 = require("./iconInfo");
|
29
20
|
Object.defineProperty(exports, "iconInfo", { enumerable: true, get: function () { return __importDefault(iconInfo_1).default; } });
|
30
|
-
__exportStar(require("./platformSpecific"), exports);
|
31
21
|
//# sourceMappingURL=index.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/constants/index.tsx"],"names":[],"mappings":"
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/constants/index.tsx"],"names":[],"mappings":";;;;;;AAAA,yDAA8D;AAetD,6FAfC,+BAAY,OAeD;AAAE,2FAfC,6BAAU,OAeD;AAdnB,QAAA,MAAM,GAAG,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC,QAAQ,CAAC,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,WAAW,EAAE,CAAC,CAAC;AAEvE,QAAA,aAAa,GAAG,eAAe,CAAC;AAChC,QAAA,eAAe,GAAG,iBAAiB,CAAC;AACpC,QAAA,gBAAgB,GAAG,kBAAkB,CAAC;AACtC,QAAA,cAAc,GAAG,gBAAgB,CAAC;AAGlC,QAAA,eAAe,GAAG,iBAAiB,CAAC;AACpC,QAAA,iBAAiB,GAAG,mBAAmB,CAAC;AAExC,QAAA,cAAc,GAAG,gBAAgB,CAAC;AAElC,QAAA,yBAAyB,GAAG,sCAAsC,CAAC;AAGhF,uCAAiD;AAAxC,qHAAA,OAAO,OAAY"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"platformSpecific.d.ts","sourceRoot":"","sources":["../../../src/constants/platformSpecific.ts"],"names":[],"mappings":"AAAA,
|
1
|
+
{"version":3,"file":"platformSpecific.d.ts","sourceRoot":"","sources":["../../../src/constants/platformSpecific.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,YAAY,QAAiE,CAAC;AAC3F,eAAO,MAAM,UAAU,QAA6E,CAAC"}
|
@@ -1,3 +1,6 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.SOCKET_URL = exports.API_BASE_URL = void 0;
|
4
|
+
exports.API_BASE_URL = process.env.API_BASE_URL || process.env.REACT_APP_API_BASE_URL;
|
5
|
+
exports.SOCKET_URL = process.env.SOCKET_URL || process.env.REACT_APP_SOCKET_URL || exports.API_BASE_URL;
|
3
6
|
//# sourceMappingURL=platformSpecific.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"platformSpecific.js","sourceRoot":"","sources":["../../../src/constants/platformSpecific.ts"],"names":[],"mappings":""}
|
1
|
+
{"version":3,"file":"platformSpecific.js","sourceRoot":"","sources":["../../../src/constants/platformSpecific.ts"],"names":[],"mappings":";;;AAAa,QAAA,YAAY,GAAG,OAAO,CAAC,GAAG,CAAC,YAAY,IAAI,OAAO,CAAC,GAAG,CAAC,sBAAsB,CAAC;AAC9E,QAAA,UAAU,GAAG,OAAO,CAAC,GAAG,CAAC,UAAU,IAAI,OAAO,CAAC,GAAG,CAAC,oBAAoB,IAAI,oBAAY,CAAC"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/helpers/index.tsx"],"names":[],"mappings":"AAAA,OAAO,oBAAoB,CAAC;AAC5B,cAAc,aAAa,CAAC;AAC5B,cAAc,gBAAgB,CAAC"}
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/helpers/index.tsx"],"names":[],"mappings":"AAAA,OAAO,oBAAoB,CAAC;AAC5B,cAAc,aAAa,CAAC;AAC5B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,gBAAgB,CAAC"}
|
@@ -13,4 +13,5 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
13
|
require("./handlebarHelpers");
|
14
14
|
__exportStar(require("./functions"), exports);
|
15
15
|
__exportStar(require("./commonStyles"), exports);
|
16
|
+
__exportStar(require("./themeHelpers"), exports);
|
16
17
|
//# sourceMappingURL=index.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/helpers/index.tsx"],"names":[],"mappings":";;;;;;;;;;;;AAAA,8BAA4B;AAC5B,8CAA4B;AAC5B,iDAA+B"}
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/helpers/index.tsx"],"names":[],"mappings":";;;;;;;;;;;;AAAA,8BAA4B;AAC5B,8CAA4B;AAC5B,iDAA+B;AAC/B,iDAA+B"}
|
@@ -0,0 +1,21 @@
|
|
1
|
+
export declare const generateSizeScale: (baseSize: number, variants: {
|
2
|
+
scale: number;
|
3
|
+
name: string;
|
4
|
+
}[]) => {};
|
5
|
+
export declare const fontVariations: {
|
6
|
+
scale: number;
|
7
|
+
name: string;
|
8
|
+
}[];
|
9
|
+
export declare const generateFontSizes: (baseFontSize: number) => {};
|
10
|
+
export declare const lineHeightVariants: {
|
11
|
+
scale: number;
|
12
|
+
name: string;
|
13
|
+
}[];
|
14
|
+
export declare const generateLineHeights: (baseFontSize: number) => {};
|
15
|
+
export declare const spacingVariations: {
|
16
|
+
scale: number;
|
17
|
+
name: string;
|
18
|
+
}[];
|
19
|
+
export declare const generateSpacingSizes: (baseSpacing: number) => {};
|
20
|
+
export declare function getColorVariants(colors: Object[]): Object[];
|
21
|
+
//# sourceMappingURL=themeHelpers.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"themeHelpers.d.ts","sourceRoot":"","sources":["../../../src/helpers/themeHelpers.tsx"],"names":[],"mappings":"AAGA,eAAO,MAAM,iBAAiB,aAAa,MAAM,YAAY;IAAC,KAAK,EAAC,MAAM,CAAC;IAAC,MAAK,MAAM,CAAA;CAAC,EAAE,OAGpF,CAAC;AAGP,eAAO,MAAM,cAAc;;;GAa1B,CAAA;AAED,eAAO,MAAM,iBAAiB,iBAAkB,MAAM,OAAoD,CAAC;AAG3G,eAAO,MAAM,kBAAkB;;;GAAwD,CAAC;AACxF,eAAO,MAAM,mBAAmB,iBAAkB,MAAM,OAAwD,CAAC;AAGjH,eAAO,MAAM,iBAAiB;;;GAc7B,CAAA;AAED,eAAO,MAAM,oBAAoB,gBAAiB,MAAM,OAAsD,CAAC;AAI/G,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,MAAM,EAAE,YAoChD"}
|
@@ -0,0 +1,88 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.getColorVariants = exports.generateSpacingSizes = exports.spacingVariations = exports.generateLineHeights = exports.lineHeightVariants = exports.generateFontSizes = exports.fontVariations = exports.generateSizeScale = void 0;
|
4
|
+
const lodash_1 = require("lodash");
|
5
|
+
const polished_1 = require("polished");
|
6
|
+
const generateSizeScale = (baseSize, variants) => variants.reduce((sizes, { name, scale }) => {
|
7
|
+
sizes[name] = baseSize * scale;
|
8
|
+
return sizes;
|
9
|
+
}, {});
|
10
|
+
exports.generateSizeScale = generateSizeScale;
|
11
|
+
// font sizes
|
12
|
+
exports.fontVariations = [
|
13
|
+
{ scale: 7 / 16, name: 'xxxs' },
|
14
|
+
{ scale: 9 / 16, name: 'xxs' },
|
15
|
+
{ scale: 10 / 16, name: 'xs' },
|
16
|
+
{ scale: 13 / 16, name: 'sm' },
|
17
|
+
{ scale: 16 / 16, name: 'md' },
|
18
|
+
{ scale: 18 / 16, name: 'lg' },
|
19
|
+
{ scale: 24 / 16, name: 'xl' },
|
20
|
+
{ scale: 32 / 16, name: 'xxl' },
|
21
|
+
{ scale: 40 / 16, name: 'xxxl' },
|
22
|
+
{ scale: 48 / 16, name: 'xxxxl' },
|
23
|
+
{ scale: 60 / 16, name: 'xxxxxl' },
|
24
|
+
{ scale: 72 / 16, name: 'xxxxxxl' },
|
25
|
+
];
|
26
|
+
const generateFontSizes = (baseFontSize) => exports.generateSizeScale(baseFontSize, exports.fontVariations);
|
27
|
+
exports.generateFontSizes = generateFontSizes;
|
28
|
+
// line heights for font
|
29
|
+
exports.lineHeightVariants = exports.fontVariations.map(f => (Object.assign(Object.assign({}, f), { scale: f.scale * 1.6 })));
|
30
|
+
const generateLineHeights = (baseFontSize) => exports.generateSizeScale(baseFontSize, exports.lineHeightVariants);
|
31
|
+
exports.generateLineHeights = generateLineHeights;
|
32
|
+
// spacing
|
33
|
+
exports.spacingVariations = [
|
34
|
+
{ scale: 0 / 16, name: 'none' },
|
35
|
+
{ scale: 2 / 16, name: 'xxxs' },
|
36
|
+
{ scale: 4 / 16, name: 'xxs' },
|
37
|
+
{ scale: 8 / 16, name: 'xs' },
|
38
|
+
{ scale: 12 / 16, name: 'sm' },
|
39
|
+
{ scale: 16 / 16, name: 'md' },
|
40
|
+
{ scale: 18 / 16, name: 'lg' },
|
41
|
+
{ scale: 24 / 16, name: 'xl' },
|
42
|
+
{ scale: 32 / 16, name: 'xxl' },
|
43
|
+
{ scale: 40 / 16, name: 'xxxl' },
|
44
|
+
{ scale: 48 / 16, name: 'xxxxl' },
|
45
|
+
{ scale: 64 / 16, name: 'xxxxxl' },
|
46
|
+
{ scale: 72 / 16, name: 'xxxxxxl' },
|
47
|
+
];
|
48
|
+
const generateSpacingSizes = (baseSpacing) => exports.generateSizeScale(baseSpacing, exports.spacingVariations);
|
49
|
+
exports.generateSpacingSizes = generateSpacingSizes;
|
50
|
+
// colors
|
51
|
+
function getColorVariants(colors) {
|
52
|
+
return new Proxy(colors, {
|
53
|
+
get: (target, color) => {
|
54
|
+
const colorParams = lodash_1.split(color, '-');
|
55
|
+
let resultColor = target[colorParams.shift()];
|
56
|
+
if (!resultColor)
|
57
|
+
return;
|
58
|
+
while (!lodash_1.isEmpty(colorParams) && resultColor) {
|
59
|
+
const op = colorParams.shift();
|
60
|
+
switch (op) {
|
61
|
+
case 'lighten':
|
62
|
+
const lightenAmount = +colorParams.shift() / 100;
|
63
|
+
resultColor = polished_1.lighten(lightenAmount, resultColor);
|
64
|
+
break;
|
65
|
+
case 'darken':
|
66
|
+
const darkenAmount = +colorParams.shift() / 100;
|
67
|
+
resultColor = polished_1.darken(darkenAmount, resultColor);
|
68
|
+
break;
|
69
|
+
case 'transparentize':
|
70
|
+
const transparentizeAmount = +colorParams.shift() / 100;
|
71
|
+
resultColor = polished_1.transparentize(transparentizeAmount, resultColor);
|
72
|
+
break;
|
73
|
+
case 'invert':
|
74
|
+
resultColor = lodash_1.invert(resultColor);
|
75
|
+
break;
|
76
|
+
case 'grayscale':
|
77
|
+
resultColor = polished_1.grayscale(resultColor);
|
78
|
+
break;
|
79
|
+
default:
|
80
|
+
}
|
81
|
+
}
|
82
|
+
return resultColor;
|
83
|
+
},
|
84
|
+
set() { return false; }
|
85
|
+
});
|
86
|
+
}
|
87
|
+
exports.getColorVariants = getColorVariants;
|
88
|
+
//# sourceMappingURL=themeHelpers.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"themeHelpers.js","sourceRoot":"","sources":["../../../src/helpers/themeHelpers.tsx"],"names":[],"mappings":";;;AAAA,mCAAgD;AAChD,uCAAsE;AAE/D,MAAM,iBAAiB,GAAG,CAAC,QAAe,EAAE,QAAuC,EAAE,EAAE,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC,KAAK,EAAE,EAAC,IAAI,EAAE,KAAK,EAAC,EAAC,EAAE;IACnI,KAAK,CAAC,IAAI,CAAC,GAAG,QAAQ,GAAC,KAAK,CAAC;IAC7B,OAAO,KAAK,CAAC;AACjB,CAAC,EAAE,EAAE,CAAC,CAA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;YAED,OAAO,WAAW,CAAC;QACvB,CAAC;QACD,GAAG,KAAI,OAAO,KAAK,CAAA,CAAC,CAAC;KACxB,CAAC,CAAA;AACN,CAAC;AApCD,4CAoCC"}
|
package/package.json
CHANGED
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/adapters/setUserToken/index.ts"],"names":[],"mappings":"AAAA,wBAA8B,YAAY,CAAC,KAAK,EAAE,MAAM,iBAKvD"}
|
@@ -1,22 +0,0 @@
|
|
1
|
-
"use strict";
|
2
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
3
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
4
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
5
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
6
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
7
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
8
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
9
|
-
});
|
10
|
-
};
|
11
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
12
|
-
function setUserToken(token) {
|
13
|
-
return __awaiter(this, void 0, void 0, function* () {
|
14
|
-
try {
|
15
|
-
localStorage.setItem('token', token);
|
16
|
-
}
|
17
|
-
catch (e) {
|
18
|
-
}
|
19
|
-
});
|
20
|
-
}
|
21
|
-
exports.default = setUserToken;
|
22
|
-
//# sourceMappingURL=index.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/adapters/setUserToken/index.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,SAA8B,YAAY,CAAC,KAAa;;QACpD,IAAG;YACC,YAAY,CAAC,OAAO,CAAC,OAAO,EAAE,KAAK,CAAC,CAAC;SACxC;QAAC,OAAM,CAAC,EAAC;SACT;IACL,CAAC;CAAA;AALD,+BAKC"}
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"index.native.d.ts","sourceRoot":"","sources":["../../../../src/adapters/setUserToken/index.native.ts"],"names":[],"mappings":"AAEA,wBAA8B,YAAY,CAAC,KAAK,EAAE,MAAM,gBAOvD"}
|
@@ -1,28 +0,0 @@
|
|
1
|
-
"use strict";
|
2
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
3
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
4
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
5
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
6
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
7
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
8
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
9
|
-
});
|
10
|
-
};
|
11
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
12
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
13
|
-
};
|
14
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
15
|
-
const async_storage_1 = __importDefault(require("@react-native-async-storage/async-storage"));
|
16
|
-
function setUserToken(token) {
|
17
|
-
return __awaiter(this, void 0, void 0, function* () {
|
18
|
-
try {
|
19
|
-
yield async_storage_1.default.setItem('@User:token', token);
|
20
|
-
}
|
21
|
-
catch (e) {
|
22
|
-
console.log('Error setting token');
|
23
|
-
}
|
24
|
-
return null;
|
25
|
-
});
|
26
|
-
}
|
27
|
-
exports.default = setUserToken;
|
28
|
-
//# sourceMappingURL=index.native.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"index.native.js","sourceRoot":"","sources":["../../../../src/adapters/setUserToken/index.native.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,8FAAqE;AAErE,SAA8B,YAAY,CAAC,KAAa;;QACpD,IAAG;YACC,MAAM,uBAAY,CAAC,OAAO,CAAC,aAAa,EAAE,KAAK,CAAC,CAAC;SACpD;QAAC,OAAM,CAAC,EAAC;YACN,OAAO,CAAC,GAAG,CAAC,qBAAqB,CAAC,CAAC;SACtC;QACD,OAAO,IAAI,CAAC;IAChB,CAAC;CAAA;AAPD,+BAOC"}
|