@evlop/commons 1.0.234 → 1.0.235

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,2 @@
1
+ export declare const getIcons: (() => Promise<any[]>) & import("lodash").MemoizedFunction;
2
+ //# sourceMappingURL=iconHelper.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"iconHelper.d.ts","sourceRoot":"","sources":["../../../src/helpers/iconHelper.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,QAAQ,4DAalB,CAAA"}
@@ -0,0 +1,28 @@
1
+ "use strict";
2
+ var __rest = (this && this.__rest) || function (s, e) {
3
+ var t = {};
4
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
5
+ t[p] = s[p];
6
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
7
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
8
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
9
+ t[p[i]] = s[p[i]];
10
+ }
11
+ return t;
12
+ };
13
+ var __importDefault = (this && this.__importDefault) || function (mod) {
14
+ return (mod && mod.__esModule) ? mod : { "default": mod };
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ exports.getIcons = void 0;
18
+ const lodash_1 = require("lodash");
19
+ const axiosClient_1 = __importDefault(require("./axiosClient"));
20
+ exports.getIcons = lodash_1.memoize(() => axiosClient_1.default.get('https://cdn.evlop.com/assets-info/icons.min.json?v=9').then(r => {
21
+ const iconsMin = r.data;
22
+ const icons = Object.keys(iconsMin).reduce((acc, key) => {
23
+ const _a = iconsMin[key], { c } = _a, rest = __rest(_a, ["c"]);
24
+ return [...acc, ...Object.keys(c).map((name) => (Object.assign(Object.assign({ id: `${key}:${name}` }, rest), { n: name, c: c[name] })))];
25
+ }, []);
26
+ return icons;
27
+ }));
28
+ //# sourceMappingURL=iconHelper.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"iconHelper.js","sourceRoot":"","sources":["../../../src/helpers/iconHelper.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,mCAAiC;AACjC,gEAAwC;AAE3B,QAAA,QAAQ,GAAG,gBAAO,CAAC,GAAE,EAAE,CAAA,qBAAW,CAAC,GAAG,CAAC,sDAAsD,CAAC,CAAC,IAAI,CAAC,CAAC,CAAA,EAAE;IAChH,MAAM,QAAQ,GAAG,CAAC,CAAC,IAAI,CAAC;IACxB,MAAM,KAAK,GAAG,MAAM,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,MAAM,CAAC,CAAC,GAAG,EAAE,GAAG,EAAC,EAAE;QACnD,MAAM,KAAe,QAAQ,CAAC,GAAG,CAAC,EAA5B,EAAC,CAAC,OAA0B,EAArB,IAAI,cAAX,KAAY,CAAgB,CAAC;QACnC,OAAO,CAAC,GAAG,GAAG,EAAE,GAAG,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,IAAI,EAAC,EAAE,CAAA,+BAC1C,EAAE,EAAE,GAAG,GAAG,IAAI,IAAI,EAAE,IACjB,IAAI,KACP,CAAC,EAAE,IAAI,EACP,CAAC,EAAE,CAAC,CAAC,IAAI,CAAC,IACZ,CAAC,CAAC,CAAA;IACR,CAAC,EACA,EAAE,CAAC,CAAC;IACL,OAAO,KAAK,CAAC;AACjB,CAAC,CAAC,CAAC,CAAA"}
@@ -8,4 +8,5 @@ export * from './axiosClient';
8
8
  export * from './analytics';
9
9
  export * from './remoteAction';
10
10
  export * from './pathHelper';
11
+ export * from './iconHelper';
11
12
  //# sourceMappingURL=index.d.ts.map
@@ -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,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;AAC7B,cAAc,cAAc,CAAC"}
@@ -20,4 +20,5 @@ __exportStar(require("./axiosClient"), exports);
20
20
  __exportStar(require("./analytics"), exports);
21
21
  __exportStar(require("./remoteAction"), exports);
22
22
  __exportStar(require("./pathHelper"), exports);
23
+ __exportStar(require("./iconHelper"), exports);
23
24
  //# sourceMappingURL=index.js.map
@@ -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,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;AAC7B,+CAA6B"}
@@ -8,7 +8,6 @@ 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;
12
11
  export declare function fetchIcons(): (dispatch: Function) => Promise<void>;
13
12
  declare const _default: (state: any, action: any) => any;
14
13
  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,4DAalB,CAAA;AAEH,wBAAgB,UAAU,eACE,QAAQ,mBAInC;;AAKD,wBAeC"}
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,wBAAgB,UAAU,eACE,QAAQ,mBAInC;;AAKD,wBAeC"}
@@ -8,24 +8,10 @@ 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
- };
22
- var __importDefault = (this && this.__importDefault) || function (mod) {
23
- return (mod && mod.__esModule) ? mod : { "default": mod };
24
- };
25
11
  Object.defineProperty(exports, "__esModule", { value: true });
26
- exports.fetchIcons = exports.getIcons = exports.registerIcons = exports.registerIcon = exports.REGISTER_ICONS = exports.REGISTER_ICON = void 0;
12
+ exports.fetchIcons = exports.registerIcons = exports.registerIcon = exports.REGISTER_ICONS = exports.REGISTER_ICON = void 0;
27
13
  const lodash_1 = require("lodash");
28
- const axiosClient_1 = __importDefault(require("../helpers/axiosClient"));
14
+ const helpers_1 = require("../helpers");
29
15
  exports.REGISTER_ICON = 'REGISTER_ICON';
30
16
  exports.REGISTER_ICONS = 'REGISTER_ICONS';
31
17
  function registerIcon(icon) {
@@ -42,17 +28,9 @@ function registerIcons(icons) {
42
28
  };
43
29
  }
44
30
  exports.registerIcons = registerIcons;
45
- exports.getIcons = lodash_1.memoize(() => axiosClient_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
- }));
53
31
  function fetchIcons() {
54
32
  return (dispatch) => __awaiter(this, void 0, void 0, function* () {
55
- const icons = yield exports.getIcons();
33
+ const icons = yield helpers_1.getIcons();
56
34
  dispatch(registerIcons(icons));
57
35
  });
58
36
  }
@@ -1 +1 @@
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;A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K,CAAC,CAAC,CAAC;IACnC,CAAC,CAAA,CAAA;AACL,CAAC;AALD,gCAKC;AAED,IAAI,YAAY,GAAO,EACtB,CAAC;AAEF,kBAAe,CAAC,KAAK,GAAG,YAAY,EAAE,MAAM,EAAC,EAAE;IAC3C,QAAQ,MAAM,CAAC,IAAI,EAAE;QACjB,KAAK,qBAAa,CAAC,CAAA;YACf,MAAM,QAAQ,GAAG,eAAM,CAAC,CAAC,GAAG,KAAK,EAAE,MAAM,CAAC,IAAI,CAAC,EAAE,IAAI,CAAC,CAAA;YACtD,eAAM,CAAC,QAAQ,EAAE,cAAK,CAAC,QAAQ,EAAE,IAAI,CAAC,CAAC,CAAC;YACxC,OAAO,QAAQ,CAAC;SACnB;QACD,KAAK,sBAAc,CAAC,CAAA;YAChB,MAAM,QAAQ,GAAG,eAAM,CAAC,CAAC,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,6 +1,6 @@
1
1
  {
2
2
  "name": "@evlop/commons",
3
- "version": "1.0.234",
3
+ "version": "1.0.235",
4
4
  "description": "",
5
5
  "main": "dist/main.js",
6
6
  "peerDependencies": {