@pushwoosh/websdk-common 6.26.0 → 6.26.1
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/inbox/InboxCellPreview.js +24 -3
- package/package.json +1 -1
|
@@ -79,6 +79,23 @@ const TAG_NAME = {
|
|
|
79
79
|
fontWeight: 400,
|
|
80
80
|
color: MAIN
|
|
81
81
|
};
|
|
82
|
+
const PREVIEW_CSS = `
|
|
83
|
+
.pw-inbox-widget--cell .pw-inbox_item--carousel .pw-inbox_hero--placeholder {
|
|
84
|
+
position: relative;
|
|
85
|
+
}
|
|
86
|
+
.pw-inbox-widget--cell .pw-inbox_item--carousel .pw-inbox_hero--placeholder::after {
|
|
87
|
+
content: '';
|
|
88
|
+
position: absolute;
|
|
89
|
+
left: 50%;
|
|
90
|
+
bottom: 9px;
|
|
91
|
+
width: 4px;
|
|
92
|
+
height: 4px;
|
|
93
|
+
margin-left: -10px;
|
|
94
|
+
border-radius: 50%;
|
|
95
|
+
background: ${MAIN};
|
|
96
|
+
box-shadow: 8px 0 0 ${MAIN}, 16px 0 0 ${MAIN};
|
|
97
|
+
}
|
|
98
|
+
`;
|
|
82
99
|
/** Plain text with every `{Tag|modifier}` token drawn as a tag chip. */
|
|
83
100
|
export function renderInboxTags(text) {
|
|
84
101
|
return text.split(TAG_TOKEN).map((part, index) => {
|
|
@@ -109,7 +126,7 @@ const AVATAR = {
|
|
|
109
126
|
},
|
|
110
127
|
android: {
|
|
111
128
|
size: 40,
|
|
112
|
-
radius:
|
|
129
|
+
radius: '50%',
|
|
113
130
|
text: TEXT.h4
|
|
114
131
|
}
|
|
115
132
|
};
|
|
@@ -542,7 +559,7 @@ export function InboxCellPreview(props) {
|
|
|
542
559
|
return _jsxs("div", {
|
|
543
560
|
style: frame,
|
|
544
561
|
children: [_jsx("style", {
|
|
545
|
-
children: INBOX_WIDGET_CSS
|
|
562
|
+
children: INBOX_WIDGET_CSS + PREVIEW_CSS
|
|
546
563
|
}), _jsx("div", {
|
|
547
564
|
className: widget.className,
|
|
548
565
|
style: {
|
|
@@ -558,8 +575,12 @@ export function InboxCellPreview(props) {
|
|
|
558
575
|
isRead: !unread,
|
|
559
576
|
layout: layout,
|
|
560
577
|
placeholder: isEmpty || (layout === 'classic' ? isIconPending : !hasMedia(picked, layout)),
|
|
561
|
-
timeLabel: formatInboxMessageTime(sendDate || new Date().toISOString()),
|
|
578
|
+
timeLabel: formatInboxMessageTime(sendDate || new Date().toISOString()).replace(/ \d{4},/, ','),
|
|
562
579
|
title: isEmpty ? emptyTitle : picked.title && _jsx("span", {
|
|
580
|
+
style: {
|
|
581
|
+
...ELLIPSIS,
|
|
582
|
+
minWidth: 0
|
|
583
|
+
},
|
|
563
584
|
children: renderText(picked.title)
|
|
564
585
|
})
|
|
565
586
|
})
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pushwoosh/websdk-common",
|
|
3
|
-
"version": "6.26.
|
|
3
|
+
"version": "6.26.1",
|
|
4
4
|
"description": "Code shared by the Pushwoosh WebSDK and the Control Panel, one entry point per module (web-popups: web popup model and renderer; subscription-widget: push subscription widget model and renderer; inbox: web inbox widget and inbox cell previews)",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"module": "index.js",
|