@evlop/commons 1.0.173 → 1.0.174
Sign up to get free protection for your applications and to get access to all the features.
@@ -8,7 +8,7 @@ export declare function registerIcons(icons: any[]): {
|
|
8
8
|
type: string;
|
9
9
|
icons: any[];
|
10
10
|
};
|
11
|
-
export declare const getIcons: (() => Promise<any>) & import("lodash").MemoizedFunction;
|
11
|
+
export declare const getIcons: (() => Promise<any[]>) & import("lodash").MemoizedFunction;
|
12
12
|
export declare function fetchIcons(): (dispatch: Function) => Promise<void>;
|
13
13
|
declare const _default: (state: any, action: any) => any;
|
14
14
|
export default _default;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"icons.d.ts","sourceRoot":"","sources":["../../../src/reducers/icons.tsx"],"names":[],"mappings":"AAGA,eAAO,MAAM,aAAa,kBAAkB,CAAC;AAC7C,eAAO,MAAM,cAAc,mBAAmB,CAAC;AAE/C,wBAAgB,YAAY,CAAC,IAAI,EAAE,GAAG;;;EAKrC;AAED,wBAAgB,aAAa,CAAC,KAAK,EAAE,GAAG,EAAE;;;EAKzC;AAED,eAAO,MAAM,QAAQ,
|
1
|
+
{"version":3,"file":"icons.d.ts","sourceRoot":"","sources":["../../../src/reducers/icons.tsx"],"names":[],"mappings":"AAGA,eAAO,MAAM,aAAa,kBAAkB,CAAC;AAC7C,eAAO,MAAM,cAAc,mBAAmB,CAAC;AAE/C,wBAAgB,YAAY,CAAC,IAAI,EAAE,GAAG;;;EAKrC;AAED,wBAAgB,aAAa,CAAC,KAAK,EAAE,GAAG,EAAE;;;EAKzC;AAED,eAAO,MAAM,QAAQ,4DAalB,CAAA;AAEH,wBAAgB,UAAU,eACE,QAAQ,mBAInC;;AAKD,wBAeC"}
|
@@ -8,6 +8,17 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
8
8
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
9
9
|
});
|
10
10
|
};
|
11
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
12
|
+
var t = {};
|
13
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
14
|
+
t[p] = s[p];
|
15
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
16
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
17
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
18
|
+
t[p[i]] = s[p[i]];
|
19
|
+
}
|
20
|
+
return t;
|
21
|
+
};
|
11
22
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
12
23
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
13
24
|
};
|
@@ -31,7 +42,14 @@ function registerIcons(icons) {
|
|
31
42
|
};
|
32
43
|
}
|
33
44
|
exports.registerIcons = registerIcons;
|
34
|
-
exports.getIcons = lodash_1.memoize(() => axios_1.default.get('https://cdn.evlop.com/assets-info/icons.json?v=9').then(r =>
|
45
|
+
exports.getIcons = lodash_1.memoize(() => axios_1.default.get('https://cdn.evlop.com/assets-info/icons.min.json?v=9').then(r => {
|
46
|
+
const iconsMin = r.data;
|
47
|
+
const icons = Object.keys(iconsMin).reduce((acc, key) => {
|
48
|
+
const _a = iconsMin[key], { c } = _a, rest = __rest(_a, ["c"]);
|
49
|
+
return [...acc, ...Object.keys(c).map((name) => (Object.assign(Object.assign({ id: `${key}:${name}` }, rest), { n: name, c: c[name] })))];
|
50
|
+
}, []);
|
51
|
+
return icons;
|
52
|
+
}));
|
35
53
|
function fetchIcons() {
|
36
54
|
return (dispatch) => __awaiter(this, void 0, void 0, function* () {
|
37
55
|
const icons = yield exports.getIcons();
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"icons.js","sourceRoot":"","sources":["../../../src/reducers/icons.tsx"],"names":[],"mappings":"
|
1
|
+
{"version":3,"file":"icons.js","sourceRoot":"","sources":["../../../src/reducers/icons.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,mCAAwD;AACxD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