@ordergroove/offers 2.27.5 → 2.27.6-alpha-PR-647-5.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/dist/offers.js CHANGED
@@ -230,13 +230,11 @@ var lib=(()=>{var Mi=Object.create;var Be=Object.defineProperty;var Vi=Object.ge
230
230
  border-width: var(--og-select-border-width, 1px);
231
231
  box-shadow: 0 1px 0 1px rgba(0, 0, 0, 0.04);
232
232
  }
233
- `}get isSelected(){return this.subscribed?this.frequency:"optedOut"}onOptinChange(e){e==="optedOut"?this.optoutProduct(this.product,this.offer):this.productChangeFrequency(this.product,e,this.offer)}render(){var s;let{options:e,isSelected:r}=this.childOptions,o;return((s=this.frequencies)==null?void 0:s.length)?o=[{value:"optedOut",text:p`
234
- <og-text key="offerOptOutLabel"></og-text>
235
- `},...this.frequencies.map((i,c)=>({value:i,text:this.frequenciesText&&c in this.frequenciesText?this.frequenciesText[c]:$e(i,this.defaultFrequency)}))]:o=e,p`
233
+ `}get currentFrequency(){return this.subscribed?this.frequency?this.frequency:this.defaultFrequency:"optedOut"}onOptinChange(e){e==="optedOut"?this.optoutProduct(this.product,this.offer):this.productChangeFrequency(this.product,e,this.offer)}render(){var o;let{options:e}=this.childOptions,r;return((o=this.frequencies)==null?void 0:o.length)?r=[e.find(s=>s.value==="optedOut"),...this.frequencies.map((s,i)=>({value:s,text:this.frequenciesText&&i in this.frequenciesText?this.frequenciesText[i]:$e(s,this.defaultFrequency)}))]:r=e,p`
236
234
  <og-select
237
- .options="${o}"
238
- .selected="${r}"
239
- .onChange="${({target:{value:i}})=>this.onOptinChange(i)}"
235
+ .options="${r}"
236
+ .selected="${this.currentFrequency}"
237
+ .onChange="${({target:{value:s}})=>this.onOptinChange(s)}"
240
238
  ></og-select>
241
239
  `}};n(_o,"OptinSelect");var ti=g((t,e)=>({...X(t,e),...mt(t,e),...H(t,e,"frequencies")}),{productChangeFrequency:Bt,optoutProduct:Ie})(_o);O();N();var Eo=class extends k(M){static get styles(){return v`
242
240
  :host[hidden] {