@product7/product7-js 0.1.4 → 0.1.6
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/dist/product7-js.js +15 -14
- package/dist/product7-js.js.map +1 -1
- package/dist/product7-js.min.js +1 -1
- package/dist/product7-js.min.js.map +1 -1
- package/package.json +1 -1
- package/src/styles/messenger-views.js +10 -2
- package/src/widgets/messenger/views/HelpView.js +5 -3
- package/src/widgets/messenger/views/HomeView.js +0 -9
package/package.json
CHANGED
|
@@ -624,11 +624,19 @@ export const messengerViewsStyles = `
|
|
|
624
624
|
color: var(--msg-text-secondary);
|
|
625
625
|
}
|
|
626
626
|
|
|
627
|
-
.messenger-help-collection-icon svg
|
|
628
|
-
.messenger-help-collection-icon iconify-icon {
|
|
627
|
+
.messenger-help-collection-icon svg {
|
|
629
628
|
width: 2rem;
|
|
630
629
|
height: 2rem;
|
|
631
630
|
display: block;
|
|
631
|
+
flex-shrink: 0;
|
|
632
|
+
}
|
|
633
|
+
|
|
634
|
+
.messenger-help-collection-icon iconify-icon {
|
|
635
|
+
font-size: 2rem;
|
|
636
|
+
width: 1em;
|
|
637
|
+
height: 1em;
|
|
638
|
+
display: block;
|
|
639
|
+
flex-shrink: 0;
|
|
632
640
|
}
|
|
633
641
|
|
|
634
642
|
.messenger-help-collection-content {
|
|
@@ -55,7 +55,9 @@ export class HelpView {
|
|
|
55
55
|
|
|
56
56
|
_updateCollectionsList() {
|
|
57
57
|
const container = this.element.querySelector('.messenger-help-collections');
|
|
58
|
-
const collections = this.state.helpArticles || []
|
|
58
|
+
const collections = (this.state.helpArticles || []).filter(
|
|
59
|
+
(c) => (c.articleCount || 0) > 0
|
|
60
|
+
);
|
|
59
61
|
const searchQuery = (this.state.helpSearchQuery || '').toLowerCase();
|
|
60
62
|
|
|
61
63
|
const filtered = searchQuery
|
|
@@ -136,7 +138,7 @@ export class HelpView {
|
|
|
136
138
|
|
|
137
139
|
if (icon.startsWith('ph:')) {
|
|
138
140
|
return `<span class="messenger-help-collection-icon">
|
|
139
|
-
<iconify-icon icon="${icon}"
|
|
141
|
+
<iconify-icon icon="${icon}"></iconify-icon>
|
|
140
142
|
</span>`;
|
|
141
143
|
}
|
|
142
144
|
|
|
@@ -145,7 +147,7 @@ export class HelpView {
|
|
|
145
147
|
|
|
146
148
|
_defaultCollectionIcon() {
|
|
147
149
|
return `<span class="messenger-help-collection-icon">
|
|
148
|
-
<iconify-icon icon="ph:book-open-duotone"
|
|
150
|
+
<iconify-icon icon="ph:book-open-duotone"></iconify-icon>
|
|
149
151
|
</span>`;
|
|
150
152
|
}
|
|
151
153
|
|
|
@@ -37,9 +37,6 @@ export class HomeView {
|
|
|
37
37
|
${this.options.logoUrl ? `<img src="${this.options.logoUrl}" alt="${this.state.teamName}" />` : ''}
|
|
38
38
|
</div>
|
|
39
39
|
<div class="messenger-home-avatars">${avatarsHtml}</div>
|
|
40
|
-
<button class="sdk-close-btn" aria-label="Close">
|
|
41
|
-
<iconify-icon icon="ph:x-duotone" width="18" height="18"></iconify-icon>
|
|
42
|
-
</button>
|
|
43
40
|
</div>
|
|
44
41
|
<div class="messenger-home-welcome">
|
|
45
42
|
<span class="messenger-home-greeting">${this.state.greetingMessage}</span>
|
|
@@ -218,12 +215,6 @@ export class HomeView {
|
|
|
218
215
|
}
|
|
219
216
|
|
|
220
217
|
_attachEvents() {
|
|
221
|
-
this.element
|
|
222
|
-
.querySelector('.sdk-close-btn')
|
|
223
|
-
.addEventListener('click', () => {
|
|
224
|
-
this.state.setOpen(false);
|
|
225
|
-
});
|
|
226
|
-
|
|
227
218
|
const msgBtn = this.element.querySelector(
|
|
228
219
|
'.messenger-home-message-btn:not(.messenger-feedback-btn)'
|
|
229
220
|
);
|