shipfare_shipping_cutoff 0.1.13 → 0.1.14
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.
|
@@ -1616,6 +1616,7 @@ let ShipFareShippingCutoffWidget = class extends s {
|
|
|
1616
1616
|
border: 1px solid var(--shipping-cutoff-primary-bg-color, #d1d5db);
|
|
1617
1617
|
border-radius: 8px;
|
|
1618
1618
|
overflow: hidden;
|
|
1619
|
+
cursor: pointer;
|
|
1619
1620
|
}
|
|
1620
1621
|
|
|
1621
1622
|
.top-section, .bottom-section {
|
|
@@ -1677,7 +1678,7 @@ let ShipFareShippingCutoffWidget = class extends s {
|
|
|
1677
1678
|
width: 90%;
|
|
1678
1679
|
position: relative;
|
|
1679
1680
|
box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
|
|
1680
|
-
color:
|
|
1681
|
+
color: #000;
|
|
1681
1682
|
font-size: 14px;
|
|
1682
1683
|
}
|
|
1683
1684
|
|
|
@@ -1715,7 +1716,7 @@ let ShipFareShippingCutoffWidget = class extends s {
|
|
|
1715
1716
|
}
|
|
1716
1717
|
}
|
|
1717
1718
|
</style>
|
|
1718
|
-
<div class="widget-body" style=${widgetStyle}>
|
|
1719
|
+
<div class="widget-body" style=${widgetStyle} @click=${this._togglePopup} >
|
|
1719
1720
|
<div class="top-section ${this._isShippingWindow ? "is-timer" : ""}">
|
|
1720
1721
|
${topContent}
|
|
1721
1722
|
</div>
|
|
@@ -1728,7 +1729,7 @@ let ShipFareShippingCutoffWidget = class extends s {
|
|
|
1728
1729
|
</div>
|
|
1729
1730
|
|
|
1730
1731
|
${this._isPopupVisible ? x`
|
|
1731
|
-
<div class="popup-overlay"
|
|
1732
|
+
<div class="popup-overlay" @click=${this._togglePopup}>
|
|
1732
1733
|
<div class="popup-content" @click=${(e2) => e2.stopPropagation()}>
|
|
1733
1734
|
<button class="close-button" @click=${this._togglePopup}>×</button>
|
|
1734
1735
|
<div style="margin-top: 20px">${o2((_b = this._store) == null ? void 0 : _b.cutoffPopupDescription)}</div>
|
|
@@ -59,7 +59,7 @@ const te=2;class ee{constructor(t){}get _$AU(){return this._$AM._$AU}_$AT(t,e,i)
|
|
|
59
59
|
* Copyright 2021 Google LLC
|
|
60
60
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
61
61
|
*/
|
|
62
|
-
function ae(t,e,i){return t?e():null==i?void 0:i()}var le=Object.defineProperty,ce=Object.getOwnPropertyDescriptor,ue=(t,e,i,n)=>{for(var o,s=n>1?void 0:n?ce(e,i):e,r=t.length-1;r>=0;r--)(o=t[r])&&(s=(n?o(e,i,s):o(s))||s);return n&&s&&le(e,i,s),s};const he=async(t,e)=>{try{const i=await fetch(t,e);if(!i.ok)throw new Error(await i.text());return await i.json()}catch(i){throw console.error(i),new Error("Failed to complete fetch request.")}},de=t=>console.error(`[ShipFare] ${t}`),pe="shipfare-shipping-cutoff-store",fe={sunday:0,monday:1,tuesday:2,wednesday:3,thursday:4,friday:5,saturday:6};var ge;return t.ShipFareShippingCutoffWidget=class extends nt{constructor(){var t,e,i;super(...arguments),this._isShippingWindow=!1,this._countdownText="",this._isPopupVisible=!1,this._apiEndpoint="/apps/shipfare",this._storeDomain=(null==(t=null==window?void 0:window.Shopify)?void 0:t.shop)??(null==(i=null==(e=null==window?void 0:window.Shopify)?void 0:e.Checkout)?void 0:i.apiHost),this._cutOffTime="",this._hasFinishedSetup=!1,this._shouldShowWidget=!0,this._fetch={get:t=>he(t),post:(t,e)=>he(t,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)})}}_togglePopup(){this._isPopupVisible=!this._isPopupVisible}async _fetchShipFareData(){var t,e,i,n;const o=(null==(t=window.Shopify)?void 0:t.shop)??(null==(i=null==(e=window.Shopify)?void 0:e.Checkout)?void 0:i.apiHost);if(!o)throw new Error("No shop found in Shopify object.");try{const t=sessionStorage.getItem(pe);if(t)return JSON.parse(t);const e=new URL(window.location.href);e.pathname=this._apiEndpoint;const i={store:o,themeApp:"SHIPPING_CUTOFF"},s=await this._fetch.post(e.toString(),i);if(!s)throw new Error("Missing response for store query.");if(!(null==(n=s.data)?void 0:n.store))throw new Error("Missing store from response.");return sessionStorage.setItem(pe,JSON.stringify(s.data.store)),s.data.store}catch(s){throw console.error(s),new Error(`Could not find a store for ${this._storeDomain}`)}}async connectedCallback(){super.connectedCallback(),this.updateShippingStatus(),this._timerInterval=window.setInterval((()=>this.updateShippingStatus()),1e3)}async disconnectedCallback(){super.disconnectedCallback(),this._timerInterval&&clearInterval(this._timerInterval)}updateShippingStatus(){if(!this._store)return;const t=this._store.timeZone??Intl.DateTimeFormat().resolvedOptions().timeZone,e=function(t,e,i){const n=Yt(e,t=Bt(t,i),!0),o=new Date(t.getTime()-n),s=new Date(0);return s.setFullYear(o.getUTCFullYear(),o.getUTCMonth(),o.getUTCDate()),s.setHours(o.getUTCHours(),o.getUTCMinutes(),o.getUTCSeconds(),o.getUTCMilliseconds()),s}(new Date,t),i=e.getDay(),n=!this._store.disableDays.map((t=>fe[t.trim().toLowerCase()])).filter((t=>void 0!==t)).includes(i),o=this._store.cutOffMap[i];if(this._cutOffTime=o.cutOff,""===this._cutOffTime||!this._cutOffTime.includes(":"))return void(this._isShippingWindow=!1);const[s,r]=o.cutOff.split(":").map(Number),a=new Date(e);a.setHours(s,r,0,0);const l=this._store.startAt??3,c=new Date(a);if(c.setHours(a.getHours()-l),n&&e>=c&&e<a){this._isShippingWindow=!0;const t=Dt({start:e,end:a}),i=`${t.hours||0}`.padStart(2,"0"),n=`${t.minutes||0}`.padStart(2,"0"),o=`${t.seconds||0}`.padStart(2,"0");this._countdownText=`${i}:${n}:${o}`}else this._isShippingWindow=!1}widgetTemplate(){var t,e;const i=this._isShippingWindow?this._countdownText:this._store.cutoffTimeOutMessage;let n="";if(this._cutOffTime&&this._cutOffTime.includes(":")){const[t,e]=this._cutOffTime.split(":");n=Number(t)>12?`${Number(t)-12}:${e} PM`:12===Number(t)?`${t}:${e} PM`:`${t}:${e} AM`}const o=this._isShippingWindow?this._store.cutoffDescription.replace("{{cutOffTime}}",n):this._store.cutoffTimeOutDescription,s=(null==(t=this._store)?void 0:t.styling)??{},r
|
|
62
|
+
function ae(t,e,i){return t?e():null==i?void 0:i()}var le=Object.defineProperty,ce=Object.getOwnPropertyDescriptor,ue=(t,e,i,n)=>{for(var o,s=n>1?void 0:n?ce(e,i):e,r=t.length-1;r>=0;r--)(o=t[r])&&(s=(n?o(e,i,s):o(s))||s);return n&&s&&le(e,i,s),s};const he=async(t,e)=>{try{const i=await fetch(t,e);if(!i.ok)throw new Error(await i.text());return await i.json()}catch(i){throw console.error(i),new Error("Failed to complete fetch request.")}},de=t=>console.error(`[ShipFare] ${t}`),pe="shipfare-shipping-cutoff-store",fe={sunday:0,monday:1,tuesday:2,wednesday:3,thursday:4,friday:5,saturday:6};var ge;return t.ShipFareShippingCutoffWidget=class extends nt{constructor(){var t,e,i;super(...arguments),this._isShippingWindow=!1,this._countdownText="",this._isPopupVisible=!1,this._apiEndpoint="/apps/shipfare",this._storeDomain=(null==(t=null==window?void 0:window.Shopify)?void 0:t.shop)??(null==(i=null==(e=null==window?void 0:window.Shopify)?void 0:e.Checkout)?void 0:i.apiHost),this._cutOffTime="",this._hasFinishedSetup=!1,this._shouldShowWidget=!0,this._fetch={get:t=>he(t),post:(t,e)=>he(t,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)})}}_togglePopup(){this._isPopupVisible=!this._isPopupVisible}async _fetchShipFareData(){var t,e,i,n;const o=(null==(t=window.Shopify)?void 0:t.shop)??(null==(i=null==(e=window.Shopify)?void 0:e.Checkout)?void 0:i.apiHost);if(!o)throw new Error("No shop found in Shopify object.");try{const t=sessionStorage.getItem(pe);if(t)return JSON.parse(t);const e=new URL(window.location.href);e.pathname=this._apiEndpoint;const i={store:o,themeApp:"SHIPPING_CUTOFF"},s=await this._fetch.post(e.toString(),i);if(!s)throw new Error("Missing response for store query.");if(!(null==(n=s.data)?void 0:n.store))throw new Error("Missing store from response.");return sessionStorage.setItem(pe,JSON.stringify(s.data.store)),s.data.store}catch(s){throw console.error(s),new Error(`Could not find a store for ${this._storeDomain}`)}}async connectedCallback(){super.connectedCallback(),this.updateShippingStatus(),this._timerInterval=window.setInterval((()=>this.updateShippingStatus()),1e3)}async disconnectedCallback(){super.disconnectedCallback(),this._timerInterval&&clearInterval(this._timerInterval)}updateShippingStatus(){if(!this._store)return;const t=this._store.timeZone??Intl.DateTimeFormat().resolvedOptions().timeZone,e=function(t,e,i){const n=Yt(e,t=Bt(t,i),!0),o=new Date(t.getTime()-n),s=new Date(0);return s.setFullYear(o.getUTCFullYear(),o.getUTCMonth(),o.getUTCDate()),s.setHours(o.getUTCHours(),o.getUTCMinutes(),o.getUTCSeconds(),o.getUTCMilliseconds()),s}(new Date,t),i=e.getDay(),n=!this._store.disableDays.map((t=>fe[t.trim().toLowerCase()])).filter((t=>void 0!==t)).includes(i),o=this._store.cutOffMap[i];if(this._cutOffTime=o.cutOff,""===this._cutOffTime||!this._cutOffTime.includes(":"))return void(this._isShippingWindow=!1);const[s,r]=o.cutOff.split(":").map(Number),a=new Date(e);a.setHours(s,r,0,0);const l=this._store.startAt??3,c=new Date(a);if(c.setHours(a.getHours()-l),n&&e>=c&&e<a){this._isShippingWindow=!0;const t=Dt({start:e,end:a}),i=`${t.hours||0}`.padStart(2,"0"),n=`${t.minutes||0}`.padStart(2,"0"),o=`${t.seconds||0}`.padStart(2,"0");this._countdownText=`${i}:${n}:${o}`}else this._isShippingWindow=!1}widgetTemplate(){var t,e;const i=this._isShippingWindow?this._countdownText:this._store.cutoffTimeOutMessage;let n="";if(this._cutOffTime&&this._cutOffTime.includes(":")){const[t,e]=this._cutOffTime.split(":");n=Number(t)>12?`${Number(t)-12}:${e} PM`:12===Number(t)?`${t}:${e} PM`:`${t}:${e} AM`}const o=this._isShippingWindow?this._store.cutoffDescription.replace("{{cutOffTime}}",n):this._store.cutoffTimeOutDescription,s=(null==(t=this._store)?void 0:t.styling)??{},r=s.primaryBackgroundColor||"#d1d5db",a=s.secondaryBackgroundColor||"#ffffff",l=s.primaryTextColor||"#000",c=s.secondaryTextColor||"#000";return Y`
|
|
63
63
|
<style>
|
|
64
64
|
|
|
65
65
|
.widget-body {
|
|
@@ -70,6 +70,7 @@ function ae(t,e,i){return t?e():null==i?void 0:i()}var le=Object.defineProperty,
|
|
|
70
70
|
border: 1px solid var(--shipping-cutoff-primary-bg-color, #d1d5db);
|
|
71
71
|
border-radius: 8px;
|
|
72
72
|
overflow: hidden;
|
|
73
|
+
cursor: pointer;
|
|
73
74
|
}
|
|
74
75
|
|
|
75
76
|
.top-section, .bottom-section {
|
|
@@ -131,7 +132,7 @@ function ae(t,e,i){return t?e():null==i?void 0:i()}var le=Object.defineProperty,
|
|
|
131
132
|
width: 90%;
|
|
132
133
|
position: relative;
|
|
133
134
|
box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
|
|
134
|
-
color:
|
|
135
|
+
color: #000;
|
|
135
136
|
font-size: 14px;
|
|
136
137
|
}
|
|
137
138
|
|
|
@@ -169,7 +170,7 @@ function ae(t,e,i){return t?e():null==i?void 0:i()}var le=Object.defineProperty,
|
|
|
169
170
|
}
|
|
170
171
|
}
|
|
171
172
|
</style>
|
|
172
|
-
<div class="widget-body" style=${r}>
|
|
173
|
+
<div class="widget-body" style=${`--shipping-cutoff-primary-bg-color:${r};--shipping-cutoff-secondary-bg-color:${a};--shipping-cutoff-primary-text-color:${l};--shipping-cutoff-secondary-text-color:${c};`} @click=${this._togglePopup} >
|
|
173
174
|
<div class="top-section ${this._isShippingWindow?"is-timer":""}">
|
|
174
175
|
${i}
|
|
175
176
|
</div>
|
|
@@ -182,7 +183,7 @@ function ae(t,e,i){return t?e():null==i?void 0:i()}var le=Object.defineProperty,
|
|
|
182
183
|
</div>
|
|
183
184
|
|
|
184
185
|
${this._isPopupVisible?Y`
|
|
185
|
-
<div class="popup-overlay"
|
|
186
|
+
<div class="popup-overlay" @click=${this._togglePopup}>
|
|
186
187
|
<div class="popup-content" @click=${t=>t.stopPropagation()}>
|
|
187
188
|
<button class="close-button" @click=${this._togglePopup}>×</button>
|
|
188
189
|
<div style="margin-top: 20px">${ne(null==(e=this._store)?void 0:e.cutoffPopupDescription)}</div>
|
|
@@ -59,7 +59,7 @@ const te=2;class ee{constructor(t){}get _$AU(){return this._$AM._$AU}_$AT(t,e,i)
|
|
|
59
59
|
* Copyright 2021 Google LLC
|
|
60
60
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
61
61
|
*/
|
|
62
|
-
function ae(t,e,i){return t?e():null==i?void 0:i()}var le=Object.defineProperty,ue=Object.getOwnPropertyDescriptor,ce=(t,e,i,n)=>{for(var o,s=n>1?void 0:n?ue(e,i):e,r=t.length-1;r>=0;r--)(o=t[r])&&(s=(n?o(e,i,s):o(s))||s);return n&&s&&le(e,i,s),s};const he=async(t,e)=>{try{const i=await fetch(t,e);if(!i.ok)throw new Error(await i.text());return await i.json()}catch(i){throw console.error(i),new Error("Failed to complete fetch request.")}},de=t=>console.error(`[ShipFare] ${t}`),pe="shipfare-shipping-cutoff-store",fe={sunday:0,monday:1,tuesday:2,wednesday:3,thursday:4,friday:5,saturday:6};var ge;t.ShipFareShippingCutoffWidget=class extends nt{constructor(){var t,e,i;super(...arguments),this._isShippingWindow=!1,this._countdownText="",this._isPopupVisible=!1,this._apiEndpoint="/apps/shipfare",this._storeDomain=(null==(t=null==window?void 0:window.Shopify)?void 0:t.shop)??(null==(i=null==(e=null==window?void 0:window.Shopify)?void 0:e.Checkout)?void 0:i.apiHost),this._cutOffTime="",this._hasFinishedSetup=!1,this._shouldShowWidget=!0,this._fetch={get:t=>he(t),post:(t,e)=>he(t,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)})}}_togglePopup(){this._isPopupVisible=!this._isPopupVisible}async _fetchShipFareData(){var t,e,i,n;const o=(null==(t=window.Shopify)?void 0:t.shop)??(null==(i=null==(e=window.Shopify)?void 0:e.Checkout)?void 0:i.apiHost);if(!o)throw new Error("No shop found in Shopify object.");try{const t=sessionStorage.getItem(pe);if(t)return JSON.parse(t);const e=new URL(window.location.href);e.pathname=this._apiEndpoint;const i={store:o,themeApp:"SHIPPING_CUTOFF"},s=await this._fetch.post(e.toString(),i);if(!s)throw new Error("Missing response for store query.");if(!(null==(n=s.data)?void 0:n.store))throw new Error("Missing store from response.");return sessionStorage.setItem(pe,JSON.stringify(s.data.store)),s.data.store}catch(s){throw console.error(s),new Error(`Could not find a store for ${this._storeDomain}`)}}async connectedCallback(){super.connectedCallback(),this.updateShippingStatus(),this._timerInterval=window.setInterval((()=>this.updateShippingStatus()),1e3)}async disconnectedCallback(){super.disconnectedCallback(),this._timerInterval&&clearInterval(this._timerInterval)}updateShippingStatus(){if(!this._store)return;const t=this._store.timeZone??Intl.DateTimeFormat().resolvedOptions().timeZone,e=function(t,e,i){const n=Yt(e,t=Bt(t,i),!0),o=new Date(t.getTime()-n),s=new Date(0);return s.setFullYear(o.getUTCFullYear(),o.getUTCMonth(),o.getUTCDate()),s.setHours(o.getUTCHours(),o.getUTCMinutes(),o.getUTCSeconds(),o.getUTCMilliseconds()),s}(new Date,t),i=e.getDay(),n=!this._store.disableDays.map((t=>fe[t.trim().toLowerCase()])).filter((t=>void 0!==t)).includes(i),o=this._store.cutOffMap[i];if(this._cutOffTime=o.cutOff,""===this._cutOffTime||!this._cutOffTime.includes(":"))return void(this._isShippingWindow=!1);const[s,r]=o.cutOff.split(":").map(Number),a=new Date(e);a.setHours(s,r,0,0);const l=this._store.startAt??3,u=new Date(a);if(u.setHours(a.getHours()-l),n&&e>=u&&e<a){this._isShippingWindow=!0;const t=Dt({start:e,end:a}),i=`${t.hours||0}`.padStart(2,"0"),n=`${t.minutes||0}`.padStart(2,"0"),o=`${t.seconds||0}`.padStart(2,"0");this._countdownText=`${i}:${n}:${o}`}else this._isShippingWindow=!1}widgetTemplate(){var t,e;const i=this._isShippingWindow?this._countdownText:this._store.cutoffTimeOutMessage;let n="";if(this._cutOffTime&&this._cutOffTime.includes(":")){const[t,e]=this._cutOffTime.split(":");n=Number(t)>12?`${Number(t)-12}:${e} PM`:12===Number(t)?`${t}:${e} PM`:`${t}:${e} AM`}const o=this._isShippingWindow?this._store.cutoffDescription.replace("{{cutOffTime}}",n):this._store.cutoffTimeOutDescription,s=(null==(t=this._store)?void 0:t.styling)??{},r
|
|
62
|
+
function ae(t,e,i){return t?e():null==i?void 0:i()}var le=Object.defineProperty,ue=Object.getOwnPropertyDescriptor,ce=(t,e,i,n)=>{for(var o,s=n>1?void 0:n?ue(e,i):e,r=t.length-1;r>=0;r--)(o=t[r])&&(s=(n?o(e,i,s):o(s))||s);return n&&s&&le(e,i,s),s};const he=async(t,e)=>{try{const i=await fetch(t,e);if(!i.ok)throw new Error(await i.text());return await i.json()}catch(i){throw console.error(i),new Error("Failed to complete fetch request.")}},de=t=>console.error(`[ShipFare] ${t}`),pe="shipfare-shipping-cutoff-store",fe={sunday:0,monday:1,tuesday:2,wednesday:3,thursday:4,friday:5,saturday:6};var ge;t.ShipFareShippingCutoffWidget=class extends nt{constructor(){var t,e,i;super(...arguments),this._isShippingWindow=!1,this._countdownText="",this._isPopupVisible=!1,this._apiEndpoint="/apps/shipfare",this._storeDomain=(null==(t=null==window?void 0:window.Shopify)?void 0:t.shop)??(null==(i=null==(e=null==window?void 0:window.Shopify)?void 0:e.Checkout)?void 0:i.apiHost),this._cutOffTime="",this._hasFinishedSetup=!1,this._shouldShowWidget=!0,this._fetch={get:t=>he(t),post:(t,e)=>he(t,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)})}}_togglePopup(){this._isPopupVisible=!this._isPopupVisible}async _fetchShipFareData(){var t,e,i,n;const o=(null==(t=window.Shopify)?void 0:t.shop)??(null==(i=null==(e=window.Shopify)?void 0:e.Checkout)?void 0:i.apiHost);if(!o)throw new Error("No shop found in Shopify object.");try{const t=sessionStorage.getItem(pe);if(t)return JSON.parse(t);const e=new URL(window.location.href);e.pathname=this._apiEndpoint;const i={store:o,themeApp:"SHIPPING_CUTOFF"},s=await this._fetch.post(e.toString(),i);if(!s)throw new Error("Missing response for store query.");if(!(null==(n=s.data)?void 0:n.store))throw new Error("Missing store from response.");return sessionStorage.setItem(pe,JSON.stringify(s.data.store)),s.data.store}catch(s){throw console.error(s),new Error(`Could not find a store for ${this._storeDomain}`)}}async connectedCallback(){super.connectedCallback(),this.updateShippingStatus(),this._timerInterval=window.setInterval((()=>this.updateShippingStatus()),1e3)}async disconnectedCallback(){super.disconnectedCallback(),this._timerInterval&&clearInterval(this._timerInterval)}updateShippingStatus(){if(!this._store)return;const t=this._store.timeZone??Intl.DateTimeFormat().resolvedOptions().timeZone,e=function(t,e,i){const n=Yt(e,t=Bt(t,i),!0),o=new Date(t.getTime()-n),s=new Date(0);return s.setFullYear(o.getUTCFullYear(),o.getUTCMonth(),o.getUTCDate()),s.setHours(o.getUTCHours(),o.getUTCMinutes(),o.getUTCSeconds(),o.getUTCMilliseconds()),s}(new Date,t),i=e.getDay(),n=!this._store.disableDays.map((t=>fe[t.trim().toLowerCase()])).filter((t=>void 0!==t)).includes(i),o=this._store.cutOffMap[i];if(this._cutOffTime=o.cutOff,""===this._cutOffTime||!this._cutOffTime.includes(":"))return void(this._isShippingWindow=!1);const[s,r]=o.cutOff.split(":").map(Number),a=new Date(e);a.setHours(s,r,0,0);const l=this._store.startAt??3,u=new Date(a);if(u.setHours(a.getHours()-l),n&&e>=u&&e<a){this._isShippingWindow=!0;const t=Dt({start:e,end:a}),i=`${t.hours||0}`.padStart(2,"0"),n=`${t.minutes||0}`.padStart(2,"0"),o=`${t.seconds||0}`.padStart(2,"0");this._countdownText=`${i}:${n}:${o}`}else this._isShippingWindow=!1}widgetTemplate(){var t,e;const i=this._isShippingWindow?this._countdownText:this._store.cutoffTimeOutMessage;let n="";if(this._cutOffTime&&this._cutOffTime.includes(":")){const[t,e]=this._cutOffTime.split(":");n=Number(t)>12?`${Number(t)-12}:${e} PM`:12===Number(t)?`${t}:${e} PM`:`${t}:${e} AM`}const o=this._isShippingWindow?this._store.cutoffDescription.replace("{{cutOffTime}}",n):this._store.cutoffTimeOutDescription,s=(null==(t=this._store)?void 0:t.styling)??{},r=s.primaryBackgroundColor||"#d1d5db",a=s.secondaryBackgroundColor||"#ffffff",l=s.primaryTextColor||"#000",u=s.secondaryTextColor||"#000";return Y`
|
|
63
63
|
<style>
|
|
64
64
|
|
|
65
65
|
.widget-body {
|
|
@@ -70,6 +70,7 @@ function ae(t,e,i){return t?e():null==i?void 0:i()}var le=Object.defineProperty,
|
|
|
70
70
|
border: 1px solid var(--shipping-cutoff-primary-bg-color, #d1d5db);
|
|
71
71
|
border-radius: 8px;
|
|
72
72
|
overflow: hidden;
|
|
73
|
+
cursor: pointer;
|
|
73
74
|
}
|
|
74
75
|
|
|
75
76
|
.top-section, .bottom-section {
|
|
@@ -131,7 +132,7 @@ function ae(t,e,i){return t?e():null==i?void 0:i()}var le=Object.defineProperty,
|
|
|
131
132
|
width: 90%;
|
|
132
133
|
position: relative;
|
|
133
134
|
box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
|
|
134
|
-
color:
|
|
135
|
+
color: #000;
|
|
135
136
|
font-size: 14px;
|
|
136
137
|
}
|
|
137
138
|
|
|
@@ -169,7 +170,7 @@ function ae(t,e,i){return t?e():null==i?void 0:i()}var le=Object.defineProperty,
|
|
|
169
170
|
}
|
|
170
171
|
}
|
|
171
172
|
</style>
|
|
172
|
-
<div class="widget-body" style=${r}>
|
|
173
|
+
<div class="widget-body" style=${`--shipping-cutoff-primary-bg-color:${r};--shipping-cutoff-secondary-bg-color:${a};--shipping-cutoff-primary-text-color:${l};--shipping-cutoff-secondary-text-color:${u};`} @click=${this._togglePopup} >
|
|
173
174
|
<div class="top-section ${this._isShippingWindow?"is-timer":""}">
|
|
174
175
|
${i}
|
|
175
176
|
</div>
|
|
@@ -182,7 +183,7 @@ function ae(t,e,i){return t?e():null==i?void 0:i()}var le=Object.defineProperty,
|
|
|
182
183
|
</div>
|
|
183
184
|
|
|
184
185
|
${this._isPopupVisible?Y`
|
|
185
|
-
<div class="popup-overlay"
|
|
186
|
+
<div class="popup-overlay" @click=${this._togglePopup}>
|
|
186
187
|
<div class="popup-content" @click=${t=>t.stopPropagation()}>
|
|
187
188
|
<button class="close-button" @click=${this._togglePopup}>×</button>
|
|
188
189
|
<div style="margin-top: 20px">${ne(null==(e=this._store)?void 0:e.cutoffPopupDescription)}</div>
|