zz-shopify-components 0.35.1-beta.1 → 0.35.1-beta.2

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,6 +1,6 @@
1
1
  {
2
2
  "name": "zz-shopify-components",
3
- "version": "0.35.1-beta.1",
3
+ "version": "0.35.1-beta.2",
4
4
  "description": "Reusable Shopify components for theme projects",
5
5
  "keywords": [
6
6
  "shopify",
@@ -85,12 +85,15 @@
85
85
  const closeButton = section.querySelector('[data-live-chat-close]');
86
86
  const chatNowButton = section.querySelector('[data-live-chat-open]');
87
87
  const emailLink = section.querySelector('[data-live-chat-email]');
88
- const isDesktop = window.matchMedia('(min-width: 1024px)');
88
+ const isDesktop = window.matchMedia('(min-width: 1025px)');
89
89
 
90
90
  if (!wrapper || !floatingButton || !promptPanel) {
91
91
  return;
92
92
  }
93
93
 
94
+ const desktopAutoPromptDelay = 10000;
95
+ const mobileAutoPromptDelay = 30000;
96
+
94
97
  let scrollTimeout;
95
98
  let hasInsertedStyle = false;
96
99
  let isLogin = false;
@@ -295,7 +298,7 @@
295
298
 
296
299
  hasAutoPrompted = true;
297
300
  showPrompt('auto');
298
- }, 10000);
301
+ }, isDesktop.matches ? desktopAutoPromptDelay : mobileAutoPromptDelay);
299
302
  }
300
303
 
301
304
  function handleFloatingButtonClick(event) {
@@ -484,7 +487,6 @@
484
487
  closeButton.addEventListener('click', function(event) {
485
488
  event.preventDefault();
486
489
  closePrompt();
487
- wrapper.classList.add('hidden');
488
490
  });
489
491
  }
490
492
 
@@ -761,7 +763,7 @@
761
763
  pointer-events: none;
762
764
  }
763
765
 
764
- @media (min-width: 1024px) {
766
+ @media (min-width: 1025px) {
765
767
  #shopify-section-{{ section.id }} .live-chat-entry {
766
768
  bottom: {{ section.settings.pc_bottom }}px;
767
769
  }
@@ -772,7 +774,7 @@
772
774
 
773
775
  }
774
776
 
775
- @media (max-width: 1023px) {
777
+ @media (max-width: 1024px) {
776
778
  #shopify-section-{{ section.id }} .live-chat-entry {
777
779
  right: 16px;
778
780
  align-items: flex-end;