@ordergroove/offers 2.27.14 → 2.27.15
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 +11 -0
- package/dist/bundle-report.html +2 -2
- package/dist/offers.js +1 -1
- package/dist/offers.js.map +2 -2
- package/package.json +2 -2
- package/src/core/actions-preview.js +65 -57
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,17 @@
|
|
|
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.15](https://github.com/ordergroove/plush-toys/compare/@ordergroove/offers@2.27.14...@ordergroove/offers@2.27.15) (2022-09-12)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Bug Fixes
|
|
10
|
+
|
|
11
|
+
* **offers:** Preview failing when shopify since offer element missing and autoship_by_default ([e43dcd1](https://github.com/ordergroove/plush-toys/commit/e43dcd12787bdbbdaaea55cb6cb8629c36c3172c))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
6
17
|
## [2.27.14](https://github.com/ordergroove/plush-toys/compare/@ordergroove/offers@2.27.13...@ordergroove/offers@2.27.14) (2022-09-09)
|
|
7
18
|
|
|
8
19
|
|
package/dist/bundle-report.html
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
│ └ examples/index.js
|
|
5
5
|
└ examples/index.js ───────────────────────────────────────── 8.4kb ─── 3.3%
|
|
6
6
|
|
|
7
|
-
dist/offers.js ───────────────────────────────────────────── 122.
|
|
7
|
+
dist/offers.js ───────────────────────────────────────────── 122.3kb ─ 100.0%
|
|
8
8
|
├ src/components/Offer.js ─────────────────────────────────── 8.1kb ─── 6.6%
|
|
9
9
|
│ └ src/make-api.js
|
|
10
10
|
│ └ src/index.js
|
|
@@ -56,7 +56,7 @@
|
|
|
56
56
|
├ src/components/OptinStatus.js ───────────────────────────── 2.4kb ─── 2.0%
|
|
57
57
|
│ └ src/make-api.js
|
|
58
58
|
│ └ src/index.js
|
|
59
|
-
├ src/core/actions-preview.js ─────────────────────────────── 2.
|
|
59
|
+
├ src/core/actions-preview.js ─────────────────────────────── 2.3kb ─── 1.9%
|
|
60
60
|
│ └ src/components/Offer.js
|
|
61
61
|
│ └ src/make-api.js
|
|
62
62
|
│ └ src/index.js
|
package/dist/offers.js
CHANGED
|
@@ -354,7 +354,7 @@ var lib=(()=>{var $i=Object.create;var Ge=Object.defineProperty;var Hi=Object.ge
|
|
|
354
354
|
></og-select>
|
|
355
355
|
`}};n(Ro,"SelectFrequency");var ui=g(mt,{productChangeFrequency:Gt})(Ro);O();var Yc={day:{day:"2-digit"},"day-numeric":{day:"numeric"},"day-short":{weekday:"short"},"day-long":{weekday:"long"},month:{month:"2-digit"},"month-numeric":{month:"numeric"},"month-short":{month:"short"},"month-long":{month:"long"},year:{year:"2-digit"},"year-numeric":{year:"numeric"}};var pi=n((t,e)=>t instanceof Date?(e||"").toString().replace(/\{\{([-\w]+)\}\}/g,r=>{let o=r.replace(/[{}]/g,""),s=Yc[o];if(typeof s=="undefined")return o;let a=new Intl.DateTimeFormat("en-us",s).formatToParts(t),[{value:c}]=a;return c}):t,"formatDate");var Ao=class extends T{static get properties(){return{value:{type:String,reflect:!0},format:{type:String}}}createRenderRoot(){return this}render(){return p`
|
|
356
356
|
${pi(this.value,this.format||"{{month-long}} {{day}}, {{year-numeric}}")}
|
|
357
|
-
`}};n(Ao,"FormattedDate");var Jc=n(t=>({value:t.previewUpsellOffer?new Date:t.nextUpcomingOrder.place}),"mapStateToProps"),di=g(Jc)(Ao);O();var mi=ee(Ke());N();V();var fi=n((t,e)=>n(async function(
|
|
357
|
+
`}};n(Ao,"FormattedDate");var Jc=n(t=>({value:t.previewUpsellOffer?new Date:t.nextUpcomingOrder.place}),"mapStateToProps"),di=g(Jc)(Ao);O();var mi=ee(Ke());N();V();var fi=n((t,e,r)=>n(async function(s){await s({type:Ye,payload:t}),await s({type:Ce}),await s(qe({in_stock:{[e]:!0},eligibility_groups:{[e]:["subscription","upsell"]},result:"success",autoship:{[e]:!0},autoship_by_default:{[e]:!1},modifiers:{},module_view:{regular:"096135e6650111e9a444bc764e106cf4"},incentives_display:{"47c01e9aacbe40389b5c7325d79091aa":{field:"sub_total",object:"order",type:"Discount Percent",value:5},e6534b9d877f41e586c37b7d8abc3a58:{field:"total_price",object:"item",type:"Discount Percent",value:10},f35e842710b24929922db4a529eecd40:{field:"total_price",object:"item",type:"Discount Percent",value:10},"5be321d7c17f4e18a757212b9a20bfcc":{field:"total_price",object:"item",type:"Discount Percent",value:1}},incentives:{[e]:{initial:["5be321d7c17f4e18a757212b9a20bfcc"],ongoing:["e6534b9d877f41e586c37b7d8abc3a58","47c01e9aacbe40389b5c7325d79091aa","f35e842710b24929922db4a529eecd40"]}}},r))},"setPreviewStandardOfferThunk"),"setPreviewStandardOffer"),Qc=n((t,e,r)=>n(async function(s,i){await s({type:Je,payload:t});let{merchantId:a}=i();t?(await s(qe({in_stock:{[e]:!0},module_view:{regular:"096135e6650111e9a444bc764e106cf4"},default_frequencies:{[e]:{every:1,every_period:3}},eligibility_groups:{[e]:["subscription","upsell"]},result:"success",autoship:{[e]:!0},autoship_by_default:{[e]:!1},modifiers:{}},r)),await s(Ur({count:1,next:null,previous:null,results:[{merchant:"0e5de2bedc5e11e3a2e4bc764e106cf4",customer:"TestCust",payment:"e98e789aba0111e9b90fbc764e107990",shipping_address:"b3a5816ae59611e78937bc764e1043b0",public_id:"23322d4a83eb11ea9a1ebc764e101db1",sub_total:"206.98",tax_total:"0.00",shipping_total:"10.00",discount_total:"0.00",total:"216.98",created:"2020-04-21 11:14:11",place:"2020-06-24 00:00:00",cancelled:null,tries:0,generic_error_count:0,status:1,type:1,order_merchant_id:null,rejected_message:null,extra_data:null,locked:!1,oos_free_shipping:!1}]})),await s(nt(a,"sig_field","ts","sig"))):await s(ie())},"setPreviewUpsellOfferThunk"),"setPreviewUpsellOffer"),hi=n((t,e,r)=>async function(o,s){switch(await o({type:te}),await o({type:Ye,payload:!1}),await o({type:Je,payload:!1}),t){case"regular":o(fi(!0,r.product.id,r));break;case"upsell":o(Qc(!0,r.product.id,r));break;case"subscribed":o(fi(!0,r.product.id,r)),o(se(r.product,"2_2"));break;default:}},"setPreview");N();$();V();var Kc=n((...t)=>JSON.stringify(t),"memoizeKey"),Zc=(0,mi.default)((t,e)=>Object.assign({components:e},t),Kc),No=class extends M{static get properties(){return{...super.properties,config:{type:Object,attribute:!1},product:Qs,productComponents:{type:Array,attribute:"product-components"},offerId:{type:String,attribute:!1},auth:Ve,preview:{type:String,attribute:"preview",reflect:"true"},location:{type:String},autoshipByDefault:{type:Boolean,attribute:"autoship-by-default"},productDefaultFrequency:{type:String,attribute:!1},locale:{type:Object,attribute:!0},firstOrderPlaceDate:{type:String,attribute:"first-order-place-date"},productToSubscribe:{type:String,attribute:"product-to-subscribe"},subscribed:{type:Boolean,reflect:!0},frequency:{type:String,reflect:!0},productFrequency:{type:String},isCart:{type:Boolean,attribute:"cart"},optedin:{type:Object}}}firstUpdated(){let e=Array.from(this.getAttributeNames()).find(r=>r.startsWith("preview-"));e==="preview-standard-offer"?this.preview="regular":e==="preview-upsell-offer"?this.preview="upsell":e==="preview-subscribed-offer"&&(this.preview="subscribed")}static get styles(){return v`
|
|
358
358
|
:host[hidden] {
|
|
359
359
|
display: none;
|
|
360
360
|
}
|