@ordergroove/offers 2.27.3-alpha-PR-641-3.13 → 2.27.4
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 +16 -0
- package/dist/bundle-report.html +7 -7
- package/dist/offers.js +29 -29
- package/dist/offers.js.map +2 -2
- package/package.json +3 -3
- package/src/components/OptinSelect.js +5 -12
- package/src/make-api.js +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ordergroove/offers",
|
|
3
|
-
"version": "2.27.
|
|
3
|
+
"version": "2.27.4",
|
|
4
4
|
"description": "offer state component",
|
|
5
5
|
"author": "Eugenio Lattanzio <eugenio63@gmail.com>",
|
|
6
6
|
"homepage": "https://github.com/ordergroove/plush-toys#readme",
|
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
],
|
|
35
35
|
"dependencies": {
|
|
36
36
|
"@ordergroove/auth": "^2.3.0",
|
|
37
|
-
"@ordergroove/offers-live-editor": "^0.
|
|
37
|
+
"@ordergroove/offers-live-editor": "^0.6.0",
|
|
38
38
|
"lit-element": "^2.1.0",
|
|
39
39
|
"lodash.memoize": "^4.1.2",
|
|
40
40
|
"logical-expression-parser": "1.0.0",
|
|
@@ -45,5 +45,5 @@
|
|
|
45
45
|
"devDependencies": {
|
|
46
46
|
"@ordergroove/offers-templates": "^0.4.12"
|
|
47
47
|
},
|
|
48
|
-
"gitHead": "
|
|
48
|
+
"gitHead": "3aa25b94b2ea166d28a20395a43de993c59e65e2"
|
|
49
49
|
}
|
|
@@ -5,7 +5,6 @@ import { OptinStatus, mapStateToProps as mapStateToPropsOptinStatus } from './Op
|
|
|
5
5
|
import { mapStateToProps, frequencyText } from './FrequencyStatus';
|
|
6
6
|
import { connect } from '../core/connect';
|
|
7
7
|
import { defaultFrequency } from '../core/props';
|
|
8
|
-
import { configSelector } from '../core/selectors';
|
|
9
8
|
|
|
10
9
|
export class OptinSelect extends withChildOptions(OptinStatus) {
|
|
11
10
|
static get properties() {
|
|
@@ -45,8 +44,8 @@ export class OptinSelect extends withChildOptions(OptinStatus) {
|
|
|
45
44
|
|
|
46
45
|
render() {
|
|
47
46
|
const { options: childOptions, isSelected } = this.childOptions;
|
|
48
|
-
let options;
|
|
49
|
-
if (
|
|
47
|
+
let options = childOptions;
|
|
48
|
+
if (!childOptions.length) {
|
|
50
49
|
options = [
|
|
51
50
|
{
|
|
52
51
|
value: 'optedOut',
|
|
@@ -54,16 +53,11 @@ export class OptinSelect extends withChildOptions(OptinStatus) {
|
|
|
54
53
|
<og-text key="offerOptOutLabel"></og-text>
|
|
55
54
|
`
|
|
56
55
|
},
|
|
57
|
-
...this.frequencies.map(
|
|
56
|
+
...(this.frequencies || []).map(value => ({
|
|
58
57
|
value,
|
|
59
|
-
text:
|
|
60
|
-
this.frequenciesText && ix in this.frequenciesText
|
|
61
|
-
? this.frequenciesText[ix]
|
|
62
|
-
: frequencyText(value, this.defaultFrequency)
|
|
58
|
+
text: frequencyText(value, this.defaultFrequency)
|
|
63
59
|
}))
|
|
64
60
|
];
|
|
65
|
-
} else {
|
|
66
|
-
options = childOptions;
|
|
67
61
|
}
|
|
68
62
|
|
|
69
63
|
return html`
|
|
@@ -79,8 +73,7 @@ export class OptinSelect extends withChildOptions(OptinStatus) {
|
|
|
79
73
|
export const ConnectedOptinSelect = connect(
|
|
80
74
|
(state, ownProps) => ({
|
|
81
75
|
...mapStateToPropsOptinStatus(state, ownProps),
|
|
82
|
-
...mapStateToProps(state, ownProps)
|
|
83
|
-
...configSelector(state, ownProps, 'frequencies')
|
|
76
|
+
...mapStateToProps(state, ownProps)
|
|
84
77
|
}),
|
|
85
78
|
{ productChangeFrequency, optoutProduct }
|
|
86
79
|
)(OptinSelect);
|
package/src/make-api.js
CHANGED