@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
|
@@ -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
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
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
|
|
38
|
+
rest={{ height: 70 }}
|
|
47
39
|
rest={{
|
|
48
40
|
height: 70,
|
|
49
41
|
onMouseOut: e => (e.currentTarget.src = definition.stickerUrl),
|