@capillarytech/creatives-library 8.0.73 → 8.0.74

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.
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@capillarytech/creatives-library",
3
3
  "author": "meharaj",
4
- "version": "8.0.73",
4
+ "version": "8.0.74",
5
5
  "description": "Capillary creatives ui",
6
6
  "main": "./index.js",
7
7
  "module": "./index.es.js",
@@ -6,23 +6,15 @@ import CapColumn from '@capillarytech/cap-ui-library/CapColumn';
6
6
 
7
7
  export const groupLineStickers = (lineStickers) => {
8
8
  const stickerGroup = {};
9
- //iterating over lineStickers object to get all the stickers
10
- Object?.keys(lineStickers)?.forEach((key) => {
11
- const category = lineStickers[key];
12
- if (Array.isArray(category)) {
13
- //iterating over each category [standard, custom, extended]
14
- category?.forEach((lineSticker) => {
15
- const packageId = get(lineSticker, 'definition.packageId');
16
- if (packageId) {
17
- const stickerGroupPackageId = stickerGroup[packageId];
18
- if (stickerGroupPackageId && Array.isArray(stickerGroupPackageId)) {
19
- stickerGroup[packageId].push(lineSticker);
20
- } else {
21
- //initialising with first sticker for each package ID
22
- stickerGroup[packageId] = [lineSticker];
23
- }
24
- }
25
- });
9
+ lineStickers.forEach((lineSticker) => {
10
+ const packageId = get(lineSticker, 'definition.packageId');
11
+ if (packageId) {
12
+ const stickerGroupPackageId = stickerGroup[packageId];
13
+ if (stickerGroupPackageId && Array.isArray(stickerGroupPackageId)) {
14
+ stickerGroup[packageId].push(lineSticker);
15
+ } else {
16
+ stickerGroup[packageId] = [];
17
+ }
26
18
  }
27
19
  });
28
20
  return stickerGroup;
@@ -43,7 +35,7 @@ export const getContent = ({ lineStickers, onStickerSelect }) => (
43
35
  >
44
36
  <CapImage
45
37
  src={definition.stickerUrl}
46
- rest = {{ height: 70 }}
38
+ rest={{ height: 70 }}
47
39
  rest={{
48
40
  height: 70,
49
41
  onMouseOut: e => (e.currentTarget.src = definition.stickerUrl),