@ordergroove/offers 2.27.1-alpha-PR-634-2.3 → 2.27.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/CHANGELOG.md +22 -0
- package/dist/offers.js +1 -1
- package/dist/offers.js.map +2 -2
- package/package.json +2 -2
- package/src/components/Offer.js +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,28 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
## [2.27.2](https://github.com/ordergroove/plush-toys/compare/@ordergroove/offers@2.27.1...@ordergroove/offers@2.27.2) (2022-08-05)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Bug Fixes
|
|
10
|
+
|
|
11
|
+
* **offers:** Don't make an offer request if window.og.previewMode is set ([2477543](https://github.com/ordergroove/plush-toys/commit/24775431a125bb05d09bdcdeb5b09bb564b676f8))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
## [2.27.1](https://github.com/ordergroove/plush-toys/compare/@ordergroove/offers@2.27.0...@ordergroove/offers@2.27.1) (2022-07-29)
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
### Bug Fixes
|
|
21
|
+
|
|
22
|
+
* **offers:** SOUR-3408 [Cart Offer] Price Transparency missing when one-time option selected, appears when you optin ([7bfb95c](https://github.com/ordergroove/plush-toys/commit/7bfb95ceb96963ad4571a61c81e0392782ce6f69))
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
|
|
6
28
|
# [2.27.0](https://github.com/ordergroove/plush-toys/compare/@ordergroove/offers@2.26.11...@ordergroove/offers@2.27.0) (2022-07-28)
|
|
7
29
|
|
|
8
30
|
|
package/dist/offers.js
CHANGED
|
@@ -501,7 +501,7 @@ var lib=(()=>{var Vi=Object.create;var Be=Object.defineProperty;var $i=Object.ge
|
|
|
501
501
|
</og-when>
|
|
502
502
|
</og-when>
|
|
503
503
|
|
|
504
|
-
`}constructor(){super();this.module="pdp",this.product={},this.productComponents=[],this.fetchOffer=()=>0,this.fetchOrders=()=>0,this.productHasChangedComponents=()=>0,this.setFirstOrderPlaceDate=()=>0,this.setProductToSubscribe=()=>0,this.productChangeFrequency=()=>0}applyTemplate(e){super.applyTemplate(e);let{locale:r}=e;this.locale=r;let o=new CustomEvent("template-changed");this.dispatchEvent(o)}updated(e){if(e.has("preview")&&this.setPreview(this.preview,e.get("preview"),this),this.frequency=this.defaultFrequency,e.has("product")&&this.product.id&&!this.isPreview&&rt(()=>this.fetchOffer(this.product.id,he,this)),e.has("firstOrderPlaceDate")&&this.product.id&&!this.isPreview&&this.setFirstOrderPlaceDate(this.product.id,this.firstOrderPlaceDate),e.has("productToSubscribe")&&this.product.id&&!this.isPreview&&this.setProductToSubscribe(this.product.id,this.productToSubscribe),e.has("auth")&&this.auth&&!this.isPreview&&this.fetchOrders(),e.has("productComponents")){let r=Kc(this.product,this.productComponents),o=Object.assign({},this.product,{components:e.get("productComponents")});A(r,o)||this.productHasChangedComponents(r,o)}(e.has("offerId")||e.has("autoshipByDefault")||e.has("location")||e.has("product"))&&this.offerId&&this.autoshipByDefault&&(this.location==="cart"||this.isCart)&&this.product.id&&this.optinProduct&&!(this.optedin||[]).find(r=>A(r,this.product))&&this.optinProduct({...this.product,...this.productComponents.length&&{components:this.productComponents}},this.defaultFrequency,this)}get isPreview(){return this.preview}render(){return p`
|
|
504
|
+
`}constructor(){super();this.module="pdp",this.product={},this.productComponents=[],this.fetchOffer=()=>0,this.fetchOrders=()=>0,this.productHasChangedComponents=()=>0,this.setFirstOrderPlaceDate=()=>0,this.setProductToSubscribe=()=>0,this.productChangeFrequency=()=>0}applyTemplate(e){super.applyTemplate(e);let{locale:r}=e;this.locale=r;let o=new CustomEvent("template-changed");this.dispatchEvent(o)}updated(e){if(e.has("preview")&&this.setPreview(this.preview,e.get("preview"),this),this.frequency=this.defaultFrequency,e.has("product")&&this.product.id&&!this.isPreview&&rt(()=>this.fetchOffer(this.product.id,he,this)),e.has("firstOrderPlaceDate")&&this.product.id&&!this.isPreview&&this.setFirstOrderPlaceDate(this.product.id,this.firstOrderPlaceDate),e.has("productToSubscribe")&&this.product.id&&!this.isPreview&&this.setProductToSubscribe(this.product.id,this.productToSubscribe),e.has("auth")&&this.auth&&!this.isPreview&&this.fetchOrders(),e.has("productComponents")){let r=Kc(this.product,this.productComponents),o=Object.assign({},this.product,{components:e.get("productComponents")});A(r,o)||this.productHasChangedComponents(r,o)}(e.has("offerId")||e.has("autoshipByDefault")||e.has("location")||e.has("product"))&&this.offerId&&this.autoshipByDefault&&(this.location==="cart"||this.isCart)&&this.product.id&&this.optinProduct&&!(this.optedin||[]).find(r=>A(r,this.product))&&this.optinProduct({...this.product,...this.productComponents.length&&{components:this.productComponents}},this.defaultFrequency,this)}get isPreview(){return this.preview||window.og.previewMode}render(){return p`
|
|
505
505
|
<slot></slot>
|
|
506
506
|
`}get defaultFrequency(){let e=this.productFrequency||this.productDefaultFrequency;if(e)return e;let r=this.querySelector("og-select-frequency");return r&&r.currentFrequency?r.currentFrequency:this.getOption("defaultFrequency")}};n(ko,"Offer");var Zc=n((t,e)=>({config:t.config,auth:t.auth,offerId:((t.productOffer||{})[(e.product||{}).id]||[])[0],productFrequency:B(e.product)(t),productDefaultFrequency:Zt((e.product||{}).id)(t),...Q(t,e,"autoshipByDefault",Mr(t)[(e.product||{}).id]),...Kt(e.product)(t)&&{autoshipByDefault:!1},optedin:Jt(t),subscribed:J(e.product)(t),...De(t)}),"mapStateToProps"),yi=g(Zc,{fetchOffer:Hn,fetchOrders:Wt,productHasChangedComponents:Ln,optinProduct:se,setFirstOrderPlaceDate:Qn,setProductToSubscribe:Kn,setPreview:mi})(ko);O();var yr=class extends T{constructor(){super();this.showCancelButton=!0,this.showConfirmButton=!0}static get properties(){return{title:{type:String,attribute:!1},content:{type:String,attribute:!1},confirmText:{type:String,attribute:!1},cancelText:{type:String,attribute:!1},showCancelButton:{type:Boolean},showConfirmButton:{type:Boolean},show:{type:Boolean,attribute:"show"}}}static get styles(){return v`
|
|
507
507
|
:host[hidden] {
|