@ordergroove/offers 2.24.2 → 2.24.3
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 +8 -0
- package/dist/bundle-report.html +10 -10
- package/dist/examples.js +192 -84
- package/dist/examples.js.map +2 -2
- package/dist/offers.js +33 -31
- package/dist/offers.js.map +2 -2
- package/examples/index.js +10 -5
- package/package.json +3 -3
- package/schema.json +16 -10
- package/src/components/Offer.js +2 -2
- package/src/components/OptinStatus.js +3 -3
- package/src/components/Select.js +1 -1
- package/src/components/Tooltip.js +5 -3
- package/src/core/reducer.js +6 -5
package/examples/index.js
CHANGED
|
@@ -31,10 +31,11 @@ const settings = {
|
|
|
31
31
|
|
|
32
32
|
const textCopy = {
|
|
33
33
|
showTooltip: true,
|
|
34
|
-
offerOptInLabel: 'Subscribe and
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
34
|
+
offerOptInLabel: 'Subscribe and Save',
|
|
35
|
+
offerIncentiveText: 'Save {{ogIncentive DiscountPercent}} when you subscribe',
|
|
36
|
+
offerOptOutLabel: 'Deliver one-time only',
|
|
37
|
+
offerEveryLabel: 'Deliver every',
|
|
38
|
+
offerTooltipTrigger: '[?]',
|
|
38
39
|
offerTooltipContent: 'Seems this is a great subscription offering. Many fun details about this program exist.',
|
|
39
40
|
optinButtonLabel: '•',
|
|
40
41
|
optoutButtonLabel: '•',
|
|
@@ -325,7 +326,11 @@ Add item to order on
|
|
|
325
326
|
{
|
|
326
327
|
name: 'Tooltip',
|
|
327
328
|
selector: 'og-offer[location="tooltip-placement"]',
|
|
328
|
-
markup: [
|
|
329
|
+
markup: [
|
|
330
|
+
['top-left', 'top', 'top-right'],
|
|
331
|
+
['left', '', 'right'],
|
|
332
|
+
['bottom-left', 'bottom', 'bottom-right']
|
|
333
|
+
]
|
|
329
334
|
.map(options =>
|
|
330
335
|
options
|
|
331
336
|
.map(
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ordergroove/offers",
|
|
3
|
-
"version": "2.24.
|
|
3
|
+
"version": "2.24.3",
|
|
4
4
|
"description": "offer state component",
|
|
5
5
|
"author": "Eugenio Lattanzio <eugenio63@gmail.com>",
|
|
6
6
|
"homepage": "https://github.com/ordergroove/plush-toys#readme",
|
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
"throttle-debounce": "^2.1.0"
|
|
44
44
|
},
|
|
45
45
|
"devDependencies": {
|
|
46
|
-
"@ordergroove/offers-templates": "^0.4.
|
|
46
|
+
"@ordergroove/offers-templates": "^0.4.3"
|
|
47
47
|
},
|
|
48
|
-
"gitHead": "
|
|
48
|
+
"gitHead": "34d771e75cc0a0a2261d0e8c2ef7eb86aa7e7d3b"
|
|
49
49
|
}
|
package/schema.json
CHANGED
|
@@ -274,27 +274,32 @@
|
|
|
274
274
|
"properties": {
|
|
275
275
|
"defaultFrequencyCopy": {
|
|
276
276
|
"type": "string",
|
|
277
|
-
"default": "
|
|
277
|
+
"default": "(Most Popular)",
|
|
278
278
|
"title": "Default frequency copy"
|
|
279
279
|
},
|
|
280
280
|
"offerOptInLabel": {
|
|
281
281
|
"type": "string",
|
|
282
|
-
"default": "Subscribe and
|
|
283
|
-
"title": "
|
|
282
|
+
"default": "Subscribe and Save",
|
|
283
|
+
"title": "Subscription copy"
|
|
284
|
+
},
|
|
285
|
+
"offerIncentiveText": {
|
|
286
|
+
"type": "string",
|
|
287
|
+
"default": "Save {{ogIncentive DiscountPercent}} when you subscribe",
|
|
288
|
+
"title": "Subscription sub copy"
|
|
284
289
|
},
|
|
285
290
|
"offerEveryLabel": {
|
|
286
291
|
"type": "string",
|
|
287
|
-
"default": "
|
|
292
|
+
"default": "Deliver Every",
|
|
288
293
|
"title": "Subscribe frequency label"
|
|
289
294
|
},
|
|
290
295
|
"offerOptOutLabel": {
|
|
291
296
|
"type": "string",
|
|
292
|
-
"default": "
|
|
297
|
+
"default": "Deliver one-time only",
|
|
293
298
|
"title": "One-time option copy"
|
|
294
299
|
},
|
|
295
300
|
"showTooltip": {
|
|
296
301
|
"type": "boolean",
|
|
297
|
-
"default":
|
|
302
|
+
"default": true,
|
|
298
303
|
"title": "Add a tool tip"
|
|
299
304
|
}
|
|
300
305
|
},
|
|
@@ -364,7 +369,7 @@
|
|
|
364
369
|
},
|
|
365
370
|
"tooltipPlacement": {
|
|
366
371
|
"type": "string",
|
|
367
|
-
"default": "
|
|
372
|
+
"default": "bottom",
|
|
368
373
|
"enum": ["top", "top-left", "top-right", "bottom", "bottom-left", "bottom-right", "right", "left"]
|
|
369
374
|
}
|
|
370
375
|
}
|
|
@@ -441,11 +446,12 @@
|
|
|
441
446
|
"offerType": "radio"
|
|
442
447
|
},
|
|
443
448
|
"textCopy": {
|
|
444
|
-
"defaultFrequencyCopy": "
|
|
445
|
-
"offerOptInLabel": "Subscribe and
|
|
449
|
+
"defaultFrequencyCopy": "(Most Popular)",
|
|
450
|
+
"offerOptInLabel": "Subscribe and Save",
|
|
451
|
+
"offerIncentiveText": "Save {{ogIncentive DiscountPercent}} when you subscribe",
|
|
446
452
|
"offerEveryLabel": "Ships Every: ",
|
|
447
453
|
"offerOptOutLabel": "One-time",
|
|
448
|
-
"showTooltip":
|
|
454
|
+
"showTooltip": true,
|
|
449
455
|
"upsellButtonLabel": "Add to upcoming subscription order and receive 20% off",
|
|
450
456
|
"upsellButtonContent": "Add to Next Order on ",
|
|
451
457
|
"upsellModalContent": "Subscribe to this product and have it conveniently delivered to you at the frequency you choose! Read the FAQ here. Promotion subject to change.",
|
package/src/components/Offer.js
CHANGED
|
@@ -142,7 +142,7 @@ export class Offer extends TemplateElement {
|
|
|
142
142
|
<og-optin-button>
|
|
143
143
|
<og-text key="offerOptInLabel"></og-text>
|
|
144
144
|
</og-optin-button>
|
|
145
|
-
<og-tooltip placement="
|
|
145
|
+
<og-tooltip placement="bottom">
|
|
146
146
|
<div slot="trigger">
|
|
147
147
|
<og-text key="offerTooltipTrigger"></og-text>
|
|
148
148
|
</div>
|
|
@@ -151,7 +151,7 @@ export class Offer extends TemplateElement {
|
|
|
151
151
|
</div>
|
|
152
152
|
</og-tooltip>
|
|
153
153
|
</div>
|
|
154
|
-
<div style="margin-left:
|
|
154
|
+
<div style="margin-left: 2.2em">
|
|
155
155
|
<og-text key="offerEveryLabel"></og-text>
|
|
156
156
|
<og-select-frequency>
|
|
157
157
|
<option value="3_1" selected>3 Days</option>
|
|
@@ -31,9 +31,9 @@ export class OptinStatus extends withProduct(TemplateElement) {
|
|
|
31
31
|
|
|
32
32
|
.btn {
|
|
33
33
|
position: relative;
|
|
34
|
-
width: 1.4em;
|
|
35
|
-
height: 1.4em;
|
|
36
|
-
margin: 0;
|
|
34
|
+
width: var(--og-radio-width, 1.4em);
|
|
35
|
+
height: var(--og-radio-height, 1.4em);
|
|
36
|
+
margin: var(--og-radio-margin, 0);
|
|
37
37
|
padding: 0;
|
|
38
38
|
border: 1px solid var(--og-primary-color, black);
|
|
39
39
|
background: #fff;
|
package/src/components/Select.js
CHANGED
|
@@ -3,7 +3,7 @@ import { LitElement, html, css } from 'lit-element';
|
|
|
3
3
|
export class Tooltip extends LitElement {
|
|
4
4
|
static get properties() {
|
|
5
5
|
return {
|
|
6
|
-
placement: { type: String, default: '
|
|
6
|
+
placement: { type: String, default: 'bottom' }
|
|
7
7
|
};
|
|
8
8
|
}
|
|
9
9
|
|
|
@@ -33,12 +33,14 @@ export class Tooltip extends LitElement {
|
|
|
33
33
|
display: block;
|
|
34
34
|
width: 200px;
|
|
35
35
|
opacity: 0;
|
|
36
|
-
padding: 0.5em;
|
|
36
|
+
padding: var(--og-tooltip-padding, 0.5em);
|
|
37
|
+
text-align: var(--og-tooltip-text-align, left);
|
|
37
38
|
pointer-events: none;
|
|
38
39
|
position: absolute;
|
|
39
40
|
transform: translateY(10px);
|
|
40
41
|
transition: transform 0.25s ease-out;
|
|
41
42
|
z-index: 99999;
|
|
43
|
+
border-radius: var(--og-tooltip-border-radius, 0);
|
|
42
44
|
}
|
|
43
45
|
|
|
44
46
|
.content:after {
|
|
@@ -189,7 +191,7 @@ export class Tooltip extends LitElement {
|
|
|
189
191
|
${this.trigger}
|
|
190
192
|
</slot>
|
|
191
193
|
</span>
|
|
192
|
-
<div class="content ${this.placement || '
|
|
194
|
+
<div class="content ${this.placement || 'bottom'}">
|
|
193
195
|
<slot name="content">
|
|
194
196
|
${this.content}
|
|
195
197
|
</slot>
|
package/src/core/reducer.js
CHANGED
|
@@ -332,10 +332,11 @@ export const environment = (state = {}, action) => {
|
|
|
332
332
|
|
|
333
333
|
export const locale = (
|
|
334
334
|
state = {
|
|
335
|
-
offerOptInLabel: 'Subscribe',
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
335
|
+
offerOptInLabel: 'Subscribe and Save',
|
|
336
|
+
offerIncentiveText: 'Save {{ogIncentive DiscountPercent}} when you subscribe',
|
|
337
|
+
offerOptOutLabel: 'Deliver one-time only',
|
|
338
|
+
offerEveryLabel: 'Delivery Every',
|
|
339
|
+
offerTooltipTrigger: '[?]',
|
|
339
340
|
offerTooltipContent: 'Seems this is a great subscription offering. Many fun details about this program exist.',
|
|
340
341
|
optinButtonLabel: '•',
|
|
341
342
|
optoutButtonLabel: '•',
|
|
@@ -350,7 +351,7 @@ export const locale = (
|
|
|
350
351
|
upsellModalTitle: 'Impulse Upsell',
|
|
351
352
|
upsellModalConfirmLabel: 'Ok',
|
|
352
353
|
upsellModalCancelLabel: 'Cancel',
|
|
353
|
-
defaultFrequencyCopy: '(
|
|
354
|
+
defaultFrequencyCopy: '(Most Popular)',
|
|
354
355
|
frequencyPeriods: {
|
|
355
356
|
'1': 'day',
|
|
356
357
|
'2': 'week',
|