@evlop/commons 1.0.249 → 1.0.250

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1 @@
1
- {"version":3,"file":"fonts.d.ts","sourceRoot":"","sources":["../../../src/reducers/fonts.tsx"],"names":[],"mappings":"AAEA,eAAO,MAAM,kBAAkB,uBAAuB,CAAC;AACvD,eAAO,MAAM,kBAAkB,uBAAuB,CAAC;AACvD,eAAO,MAAM,aAAa,kBAAkB,CAAC;AAE7C,eAAO,MAAM,yBAAyB,8BAA8B,CAAC;AACrE,eAAO,MAAM,yBAAyB,8BAA8B,CAAC;AACrE,eAAO,MAAM,wBAAwB,6BAA6B,CAAC;AAEnE,UAAU,IAAI;IACV,MAAM,EAAE,MAAM,CAAC;IACf,aAAa,EAAE,MAAM,CAAC;CACzB;AAGD,wBAAgB,gBAAgB,CAAC,KAAK,EAAC,IAAI,EAAE;;;EAK5C;AAED,wBAAgB,gBAAgB,CAAC,KAAK,EAAC,IAAI,EAAE;;;EAK5C;AAED,wBAAgB,YAAY,CAAC,IAAI,EAAC,IAAI,GAAG,MAAM;;;EAK9C;;AAgBD,wBA2CC"}
1
+ {"version":3,"file":"fonts.d.ts","sourceRoot":"","sources":["../../../src/reducers/fonts.tsx"],"names":[],"mappings":"AAGA,eAAO,MAAM,kBAAkB,uBAAuB,CAAC;AACvD,eAAO,MAAM,kBAAkB,uBAAuB,CAAC;AACvD,eAAO,MAAM,aAAa,kBAAkB,CAAC;AAE7C,eAAO,MAAM,yBAAyB,8BAA8B,CAAC;AACrE,eAAO,MAAM,yBAAyB,8BAA8B,CAAC;AACrE,eAAO,MAAM,wBAAwB,6BAA6B,CAAC;AAEnE,UAAU,IAAI;IACV,MAAM,EAAE,MAAM,CAAC;IACf,aAAa,EAAE,MAAM,CAAC;CACzB;AAGD,wBAAgB,gBAAgB,CAAC,KAAK,EAAC,IAAI,EAAE;;;EAK5C;AAED,wBAAgB,gBAAgB,CAAC,KAAK,EAAC,IAAI,EAAE;;;EAK5C;AAED,wBAAgB,YAAY,CAAC,IAAI,EAAC,IAAI,GAAG,MAAM;;;EAK9C;;AAgBD,wBA+CC"}
@@ -4,6 +4,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.activateFont = exports.registerAppFonts = exports.registerWebFonts = exports.LOAD_GOOGLE_FONTS_FAILED = exports.LOAD_GOOGLE_FONTS_SUCCESS = exports.LOAD_GOOGLE_FONTS_STARTED = exports.ACTIVATE_FONT = exports.REGISTER_APP_FONTS = exports.REGISTER_WEB_FONTS = void 0;
7
+ const lodash_1 = require("lodash");
7
8
  const googleFonts_1 = __importDefault(require("../constants/googleFonts"));
8
9
  exports.REGISTER_WEB_FONTS = 'REGISTER_WEB_FONTS';
9
10
  exports.REGISTER_APP_FONTS = 'REGISTER_APP_FONTS';
@@ -46,21 +47,25 @@ let initialState = {
46
47
  exports.default = (state = initialState, action) => {
47
48
  switch (action.type) {
48
49
  case exports.REGISTER_WEB_FONTS: {
50
+ const newWebFonts = [
51
+ ...state.webFonts,
52
+ ...action.fonts
53
+ ];
54
+ lodash_1.assign(newWebFonts, lodash_1.keyBy(newWebFonts, 'family'));
49
55
  return {
50
56
  ...state,
51
- webFonts: [
52
- ...state.webFonts,
53
- ...action.fonts
54
- ],
57
+ webFonts: newWebFonts,
55
58
  };
56
59
  }
57
60
  case exports.REGISTER_APP_FONTS: {
61
+ const newAppFonts = [
62
+ ...state.appFonts,
63
+ ...action.fonts
64
+ ];
65
+ lodash_1.assign(newAppFonts, lodash_1.keyBy(newAppFonts, 'family'));
58
66
  return {
59
67
  ...state,
60
- appFonts: [
61
- ...state.appFonts,
62
- ...action.fonts
63
- ],
68
+ appFonts: newAppFonts,
64
69
  };
65
70
  }
66
71
  case exports.ACTIVATE_FONT: {
@@ -1 +1 @@
1
- {"version":3,"file":"fonts.js","sourceRoot":"","sources":["../../../src/reducers/f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OAAM;gBACF,GAAG,KAAK;gBACR,WAAW,EAAC;oBACR,GAAG,KAAK,CAAC,WAAW;oBACpB,cAAc;iBACjB;aACJ,CAAC;SACL;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.249",
3
+ "version": "1.0.250",
4
4
  "description": "",
5
5
  "main": "dist/main.js",
6
6
  "peerDependencies": {