@evlop/commons 1.0.170 → 1.0.172
Sign up to get free protection for your applications and to get access to all the features.
@@ -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,kBAAkB,CAAC;AAE9C,wBAAgB,YAAY,CAAC,IAAI,EAAE,GAAG;;;EAKrC;AAED,wBAAgB,aAAa,CAAC,KAAK,EAAE,GAAG,EAAE;;;EAKzC;AAED,eAAO,MAAM,QAAQ,0DAA6F,CAAA;AAClH,wBAAgB,UAAU,eACJ,QAAQ,UAK7B;;AAKD,
|
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,kBAAkB,CAAC;AAE9C,wBAAgB,YAAY,CAAC,IAAI,EAAE,GAAG;;;EAKrC;AAED,wBAAgB,aAAa,CAAC,KAAK,EAAE,GAAG,EAAE;;;EAKzC;AAED,eAAO,MAAM,QAAQ,0DAA6F,CAAA;AAClH,wBAAgB,UAAU,eACJ,QAAQ,UAK7B;;AAKD,wBAeC"}
|
@@ -17,7 +17,7 @@ function registerIcon(icon) {
|
|
17
17
|
exports.registerIcon = registerIcon;
|
18
18
|
function registerIcons(icons) {
|
19
19
|
return {
|
20
|
-
type: exports.
|
20
|
+
type: exports.REGISTER_ICONS,
|
21
21
|
icons
|
22
22
|
};
|
23
23
|
}
|
@@ -35,10 +35,14 @@ let initialState = [];
|
|
35
35
|
exports.default = (state = initialState, action) => {
|
36
36
|
switch (action.type) {
|
37
37
|
case exports.REGISTER_ICON: {
|
38
|
-
|
38
|
+
const newState = lodash_1.uniqBy([...state, action.icon], 'id');
|
39
|
+
lodash_1.assign(newState, lodash_1.keyBy(newState, 'id'));
|
40
|
+
return newState;
|
39
41
|
}
|
40
42
|
case exports.REGISTER_ICONS: {
|
41
|
-
|
43
|
+
const newState = lodash_1.uniqBy([...state, ...action.icons], 'id');
|
44
|
+
lodash_1.assign(newState, lodash_1.keyBy(newState, 'id'));
|
45
|
+
return newState;
|
42
46
|
}
|
43
47
|
default:
|
44
48
|
return state;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"icons.js","sourceRoot":"","sources":["../../../src/reducers/icons.tsx"],"names":[],"mappings":";;;;;;AAAA,
|
1
|
+
{"version":3,"file":"icons.js","sourceRoot":"","sources":["../../../src/reducers/icons.tsx"],"names":[],"mappings":";;;;;;AAAA,mCAAwD;AACxD,6DAAqC;AAExB,QAAA,aAAa,GAAG,eAAe,CAAC;AAChC,QAAA,cAAc,GAAG,eAAe,CAAC;AAE9C,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,eAAK,CAAC,GAAG,CAAC,kDAAkD,CAAC,CAAC,IAAI,CAAC,CAAC,CAAA,EAAE,CAAA,CAAC,CAAC,IAAI,CAAC,CAAC,CAAA;AAClH,SAAgB,UAAU;IACtB,OAAO,CAAC,QAAkB,EAAC,EAAE;QACzB,gBAAQ,EAAE,CAAC,IAAI,CAAC,KAAK,CAAA,EAAE;YACnB,QAAQ,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC,CAAC;QACnC,CAAC,CAAC,CAAC;IACP,CAAC,CAAA;AACL,CAAC;AAND,gCAMC;AAED,IAAI,YAAY,GAAO,EACtB,CAAC;AAEF,kBAAe,CAAC,KAAK,GAAG,YAAY,EAAE,MAAM,EAAC,EAAE;IAC3C,QAAQ,MAAM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