@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.
@@ -5285,11 +5285,19 @@
5285
5285
  color: var(--msg-text-secondary);
5286
5286
  }
5287
5287
 
5288
- .messenger-help-collection-icon svg,
5289
- .messenger-help-collection-icon iconify-icon {
5288
+ .messenger-help-collection-icon svg {
5290
5289
  width: 2rem;
5291
5290
  height: 2rem;
5292
5291
  display: block;
5292
+ flex-shrink: 0;
5293
+ }
5294
+
5295
+ .messenger-help-collection-icon iconify-icon {
5296
+ font-size: 2rem;
5297
+ width: 1em;
5298
+ height: 1em;
5299
+ display: block;
5300
+ flex-shrink: 0;
5293
5301
  }
5294
5302
 
5295
5303
  .messenger-help-collection-content {
@@ -10014,7 +10022,9 @@
10014
10022
 
10015
10023
  _updateCollectionsList() {
10016
10024
  const container = this.element.querySelector('.messenger-help-collections');
10017
- const collections = this.state.helpArticles || [];
10025
+ const collections = (this.state.helpArticles || []).filter(
10026
+ (c) => (c.articleCount || 0) > 0
10027
+ );
10018
10028
  const searchQuery = (this.state.helpSearchQuery || '').toLowerCase();
10019
10029
 
10020
10030
  const filtered = searchQuery
@@ -10095,7 +10105,7 @@
10095
10105
 
10096
10106
  if (icon.startsWith('ph:')) {
10097
10107
  return `<span class="messenger-help-collection-icon">
10098
- <iconify-icon icon="${icon}" width="22" height="22"></iconify-icon>
10108
+ <iconify-icon icon="${icon}"></iconify-icon>
10099
10109
  </span>`;
10100
10110
  }
10101
10111
 
@@ -10104,7 +10114,7 @@
10104
10114
 
10105
10115
  _defaultCollectionIcon() {
10106
10116
  return `<span class="messenger-help-collection-icon">
10107
- <iconify-icon icon="ph:book-open-duotone" width="22" height="22"></iconify-icon>
10117
+ <iconify-icon icon="ph:book-open-duotone"></iconify-icon>
10108
10118
  </span>`;
10109
10119
  }
10110
10120
 
@@ -10236,9 +10246,6 @@
10236
10246
  ${this.options.logoUrl ? `<img src="${this.options.logoUrl}" alt="${this.state.teamName}" />` : ''}
10237
10247
  </div>
10238
10248
  <div class="messenger-home-avatars">${avatarsHtml}</div>
10239
- <button class="sdk-close-btn" aria-label="Close">
10240
- <iconify-icon icon="ph:x-duotone" width="18" height="18"></iconify-icon>
10241
- </button>
10242
10249
  </div>
10243
10250
  <div class="messenger-home-welcome">
10244
10251
  <span class="messenger-home-greeting">${this.state.greetingMessage}</span>
@@ -10417,12 +10424,6 @@
10417
10424
  }
10418
10425
 
10419
10426
  _attachEvents() {
10420
- this.element
10421
- .querySelector('.sdk-close-btn')
10422
- .addEventListener('click', () => {
10423
- this.state.setOpen(false);
10424
- });
10425
-
10426
10427
  const msgBtn = this.element.querySelector(
10427
10428
  '.messenger-home-message-btn:not(.messenger-feedback-btn)'
10428
10429
  );