wickes-css2 2.112.0-IC-1722-bloomreach-widgets-code-refactor.1 → 2.112.0-IC-1722-bloomreach-widgets-code-refactor.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/build/js/bloomreach-widget.min.js +1 -1
- package/build/js/page/bloomreach-widget/bloomreach-recommendation-carousel-widget.js +248 -266
- package/build/js/page/bloomreach-widget/bloomreach-widget-core.js +370 -0
- package/build/js/page/bloomreach-widget/bloomreach-widget.js +1 -368
- package/build/js/page/bloomreach-widget/complete-your-project/complete-your-project-cards.js +1 -33
- package/build/js/page/bloomreach-widget/complete-your-project/complete-your-project-model.js +0 -3
- package/build/js/page/bloomreach-widget/complete-your-project/complete-your-project-presenter.js +0 -2
- package/build/js/page/bloomreach-widget/complete-your-project/complete-your-project-quantity.js +0 -1
- package/build/js/page/bloomreach-widget/complete-your-project/complete-your-project-view.js +0 -3
- package/build/js/page/bloomreach-widget/complete-your-project/complete-your-project-widget.js +3 -144
- package/package.json +1 -1
- package/src/js/page/bloomreach-widget/bloomreach-recommendation-carousel-widget.js +248 -266
- package/src/js/page/bloomreach-widget/bloomreach-widget-core.js +370 -0
- package/src/js/page/bloomreach-widget/bloomreach-widget.js +1 -368
- package/src/js/page/bloomreach-widget/complete-your-project/complete-your-project-cards.js +1 -33
- package/src/js/page/bloomreach-widget/complete-your-project/complete-your-project-model.js +0 -3
- package/src/js/page/bloomreach-widget/complete-your-project/complete-your-project-presenter.js +0 -2
- package/src/js/page/bloomreach-widget/complete-your-project/complete-your-project-quantity.js +0 -1
- package/src/js/page/bloomreach-widget/complete-your-project/complete-your-project-view.js +0 -3
- package/src/js/page/bloomreach-widget/complete-your-project/complete-your-project-widget.js +3 -144
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { createLoadingButton } from '../utils/create-loading-button';
|
|
2
|
-
import { createBloomreachWidget } from './bloomreach-widget';
|
|
2
|
+
import { createBloomreachWidget } from './bloomreach-widget-core';
|
|
3
3
|
|
|
4
4
|
const Handlebars = require('hbsfy/runtime');
|
|
5
5
|
|
|
@@ -11,9 +11,7 @@ Handlebars.registerPartial(
|
|
|
11
11
|
);
|
|
12
12
|
Handlebars.registerPartial('reviews-rating', require('../../../components/reviews-rating.hbs'));
|
|
13
13
|
|
|
14
|
-
const recommendationCarouselTemplate = require(
|
|
15
|
-
'../../../components/bloomreach/why-not-add-content.hbs'
|
|
16
|
-
);
|
|
14
|
+
const recommendationCarouselTemplate = require('../../../components/bloomreach/why-not-add-content.hbs');
|
|
17
15
|
|
|
18
16
|
const DEFAULT_EL = {
|
|
19
17
|
addToCartError: '[data-add-to-cart-error]',
|
|
@@ -34,301 +32,285 @@ export function createBloomreachRecommendationCarouselWidget(config) {
|
|
|
34
32
|
sliders: [],
|
|
35
33
|
loadingButton: null,
|
|
36
34
|
};
|
|
37
|
-
const
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
35
|
+
const el = {
|
|
36
|
+
...DEFAULT_EL,
|
|
37
|
+
widgetContainer: config.widgetContainer,
|
|
38
|
+
};
|
|
39
|
+
const addToCartEvent = config.addToCartEvent || 'addToCart';
|
|
40
|
+
let widget = null;
|
|
41
|
+
|
|
42
|
+
function getRenderedRoots($container) {
|
|
43
|
+
let $roots = $container.find(el.root);
|
|
44
|
+
|
|
45
|
+
if (config.modifier) {
|
|
46
|
+
$roots = $roots.filter(`.${config.modifier}`);
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
return $roots;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
function removeRenderedWidget($container) {
|
|
53
|
+
getRenderedRoots($container).remove();
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
function normalizeProducts(payloadData) {
|
|
57
|
+
return Wick.BloomreachWidget.normalizePayload(payloadData)
|
|
58
|
+
.map(function (item) {
|
|
59
|
+
return item.baseProduct || item;
|
|
60
|
+
})
|
|
61
|
+
.filter(function (product) {
|
|
62
|
+
return config.isEligibleProduct ? config.isEligibleProduct(product) : true;
|
|
63
|
+
})
|
|
64
|
+
.slice(0, 5);
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
function renderWidget($container, payloadData) {
|
|
68
|
+
const products = normalizeProducts(payloadData);
|
|
69
|
+
|
|
70
|
+
if (!products.length) {
|
|
45
71
|
if (config.appendToContainer) {
|
|
46
|
-
$
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
return;
|
|
72
|
+
removeRenderedWidget($container);
|
|
73
|
+
} else {
|
|
74
|
+
$container.empty().hide();
|
|
50
75
|
}
|
|
51
76
|
|
|
52
|
-
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
77
|
+
return;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
const html = recommendationCarouselTemplate({
|
|
81
|
+
title: config.title,
|
|
82
|
+
modifier: config.modifier,
|
|
83
|
+
products: products.map(function (product) {
|
|
84
|
+
return {
|
|
85
|
+
...Wick.BloomreachWidget.getProductRenderData(product),
|
|
86
|
+
addToCartError: config.addToCartError,
|
|
87
|
+
showBadge: !config.hideBadge,
|
|
88
|
+
};
|
|
89
|
+
}),
|
|
90
|
+
isSingleProduct: products.length === 1,
|
|
91
|
+
});
|
|
92
|
+
|
|
93
|
+
if (config.appendToContainer) {
|
|
94
|
+
removeRenderedWidget($container);
|
|
95
|
+
$container.append(html);
|
|
96
|
+
return;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
$container.html(html).show();
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
function destroySliders() {
|
|
103
|
+
state.sliders.forEach(function (slider) {
|
|
104
|
+
if (slider && slider.destroy) {
|
|
105
|
+
slider.destroy(true, true);
|
|
76
106
|
}
|
|
107
|
+
});
|
|
77
108
|
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
removeRenderedWidget($container) {
|
|
82
|
-
widget.getRenderedRoots($container).remove();
|
|
83
|
-
},
|
|
84
|
-
|
|
85
|
-
normalizeProducts(payloadData) {
|
|
86
|
-
return Wick.BloomreachWidget.normalizePayload(payloadData)
|
|
87
|
-
.map(function (item) {
|
|
88
|
-
return item.baseProduct || item;
|
|
89
|
-
})
|
|
90
|
-
.filter(function (product) {
|
|
91
|
-
return config.isEligibleProduct ? config.isEligibleProduct(product) : true;
|
|
92
|
-
})
|
|
93
|
-
.slice(0, 5);
|
|
94
|
-
},
|
|
109
|
+
state.sliders = [];
|
|
110
|
+
}
|
|
95
111
|
|
|
96
|
-
|
|
97
|
-
|
|
112
|
+
function initSliders($root) {
|
|
113
|
+
destroySliders();
|
|
98
114
|
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
}
|
|
105
|
-
|
|
106
|
-
return;
|
|
107
|
-
}
|
|
108
|
-
|
|
109
|
-
const html = template({
|
|
110
|
-
title: config.title,
|
|
111
|
-
modifier: config.modifier,
|
|
112
|
-
products: products.map(function (product) {
|
|
113
|
-
return {
|
|
114
|
-
...Wick.BloomreachWidget.getProductRenderData(product),
|
|
115
|
-
addToCartError: config.addToCartError,
|
|
116
|
-
showBadge: !config.hideBadge,
|
|
117
|
-
};
|
|
118
|
-
}),
|
|
119
|
-
isSingleProduct: products.length === 1,
|
|
120
|
-
});
|
|
115
|
+
$root.find(el.slider).each(function () {
|
|
116
|
+
const sliderEl = this;
|
|
117
|
+
const $slider = $(sliderEl);
|
|
118
|
+
const $widget = $slider.closest(el.root);
|
|
119
|
+
const slidesCount = $slider.find('.swiper-slide').length;
|
|
121
120
|
|
|
122
|
-
if (
|
|
123
|
-
widget.removeRenderedWidget($container);
|
|
124
|
-
$container.append(html);
|
|
121
|
+
if (slidesCount <= 1) {
|
|
125
122
|
return;
|
|
126
123
|
}
|
|
127
124
|
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
const sliderEl = this;
|
|
146
|
-
const $slider = $(sliderEl);
|
|
147
|
-
const $widget = $slider.closest(widget.el.root);
|
|
148
|
-
const slidesCount = $slider.find('.swiper-slide').length;
|
|
149
|
-
|
|
150
|
-
if (slidesCount <= 1) {
|
|
151
|
-
return;
|
|
152
|
-
}
|
|
153
|
-
|
|
154
|
-
const slider = new Swiper(sliderEl, {
|
|
155
|
-
roundLengths: true,
|
|
156
|
-
slidesPerView: 1,
|
|
157
|
-
spaceBetween: 12,
|
|
158
|
-
watchOverflow: true,
|
|
159
|
-
navigation: {
|
|
160
|
-
nextEl: $widget.find(widget.el.next)[0],
|
|
161
|
-
prevEl: $widget.find(widget.el.prev)[0],
|
|
162
|
-
disabledClass: 'why-not-add__arrow--disabled',
|
|
163
|
-
},
|
|
164
|
-
pagination: {
|
|
165
|
-
el: $widget.find(widget.el.pagination)[0],
|
|
166
|
-
clickable: true,
|
|
167
|
-
renderBullet(index, className) {
|
|
168
|
-
return `<button class="${className}" type="button" aria-label="Go to slide ${
|
|
169
|
-
index + 1
|
|
170
|
-
}"></button>`;
|
|
171
|
-
},
|
|
172
|
-
bulletClass: 'why-not-add__pagination-item',
|
|
173
|
-
bulletActiveClass: 'why-not-add__pagination-item--active',
|
|
125
|
+
const slider = new Swiper(sliderEl, {
|
|
126
|
+
roundLengths: true,
|
|
127
|
+
slidesPerView: 1,
|
|
128
|
+
spaceBetween: 12,
|
|
129
|
+
watchOverflow: true,
|
|
130
|
+
navigation: {
|
|
131
|
+
nextEl: $widget.find(el.next)[0],
|
|
132
|
+
prevEl: $widget.find(el.prev)[0],
|
|
133
|
+
disabledClass: 'why-not-add__arrow--disabled',
|
|
134
|
+
},
|
|
135
|
+
pagination: {
|
|
136
|
+
el: $widget.find(el.pagination)[0],
|
|
137
|
+
clickable: true,
|
|
138
|
+
renderBullet(index, className) {
|
|
139
|
+
return `<button class="${className}" type="button" aria-label="Go to slide ${
|
|
140
|
+
index + 1
|
|
141
|
+
}"></button>`;
|
|
174
142
|
},
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
143
|
+
bulletClass: 'why-not-add__pagination-item',
|
|
144
|
+
bulletActiveClass: 'why-not-add__pagination-item--active',
|
|
145
|
+
},
|
|
178
146
|
});
|
|
179
|
-
},
|
|
180
147
|
|
|
181
|
-
|
|
182
|
-
|
|
148
|
+
state.sliders.push(slider);
|
|
149
|
+
});
|
|
150
|
+
}
|
|
183
151
|
|
|
184
|
-
|
|
185
|
-
|
|
152
|
+
function setCardAdded($card) {
|
|
153
|
+
const $button = $card.find(el.cta);
|
|
186
154
|
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
$button.find('.button__icon--success').removeClass('d-none');
|
|
190
|
-
},
|
|
155
|
+
$card.removeClass('why-not-add-card--failed').addClass('why-not-add-card--added');
|
|
156
|
+
$card.find('.why-not-add-card__error').addClass('d-none');
|
|
191
157
|
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
158
|
+
$button.prop('disabled', true).attr('aria-label', 'Added to basket');
|
|
159
|
+
$button.find('.loading-button__text').addClass('d-none');
|
|
160
|
+
$button.find('.button__icon--success').removeClass('d-none');
|
|
161
|
+
}
|
|
195
162
|
|
|
196
|
-
|
|
163
|
+
function setCardFailed($card, messageText) {
|
|
164
|
+
const $button = $card.find(el.cta);
|
|
165
|
+
const errorText = messageText || config.addToCartError;
|
|
197
166
|
|
|
198
|
-
|
|
199
|
-
.prop('disabled', true)
|
|
200
|
-
.attr('aria-label', errorText || 'Product has not been added to basket');
|
|
167
|
+
$card.removeClass('why-not-add-card--added').addClass('why-not-add-card--failed');
|
|
201
168
|
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
$card.find('.why-not-add-card__error').removeClass('d-none');
|
|
207
|
-
},
|
|
169
|
+
$button
|
|
170
|
+
.prop('disabled', true)
|
|
171
|
+
.attr('aria-label', errorText || 'Product has not been added to basket');
|
|
208
172
|
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
173
|
+
if (errorText) {
|
|
174
|
+
$card.find(el.addToCartError).text(errorText);
|
|
175
|
+
}
|
|
212
176
|
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
widget.setCardAdded($card);
|
|
216
|
-
}
|
|
177
|
+
$card.find('.why-not-add-card__error').removeClass('d-none');
|
|
178
|
+
}
|
|
217
179
|
|
|
218
|
-
|
|
219
|
-
|
|
180
|
+
function handleAddToCartResponse($card, response) {
|
|
181
|
+
const messageType = response && response.messageType;
|
|
182
|
+
const isSuccess = !messageType || messageType === 'success';
|
|
220
183
|
|
|
221
|
-
|
|
222
|
-
|
|
184
|
+
if (isSuccess) {
|
|
185
|
+
if (config.disableAfterSuccess) {
|
|
186
|
+
setCardAdded($card);
|
|
223
187
|
}
|
|
224
188
|
|
|
225
|
-
return
|
|
226
|
-
}
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
189
|
+
return;
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
if (config.disableAfterFailure) {
|
|
193
|
+
setCardFailed($card, response && response.messageText);
|
|
194
|
+
}
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
function getAddToCartPayload(productCode) {
|
|
198
|
+
const payload = { productCode };
|
|
199
|
+
|
|
200
|
+
if (config.doNotShowAddedProductPopup) {
|
|
201
|
+
payload.doNotShowAddedProductPopup = true;
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
return payload;
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
function bindProductTracking($root) {
|
|
208
|
+
$root.off(`click.${config.namespace}Tracking`, el.productLink);
|
|
209
|
+
$root.on(`click.${config.namespace}Tracking`, el.productLink, function (event) {
|
|
210
|
+
const productCode = $(event.currentTarget)
|
|
211
|
+
.closest(el.card)
|
|
212
|
+
.attr(el.productCodeAttribute);
|
|
213
|
+
|
|
214
|
+
widget.tracking.trackClick(productCode);
|
|
215
|
+
});
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
function bindAddToCart($root) {
|
|
219
|
+
$root.off(`click.${config.namespace}`, el.cta);
|
|
220
|
+
$root.on(`click.${config.namespace}`, el.cta, function (event) {
|
|
221
|
+
event.preventDefault();
|
|
222
|
+
|
|
223
|
+
const $button = $(event.currentTarget);
|
|
224
|
+
const $card = $button.closest(el.cardWrapper);
|
|
225
|
+
const productCode = $card.find(el.card).attr(el.productCodeAttribute);
|
|
226
|
+
|
|
227
|
+
if (
|
|
228
|
+
!productCode ||
|
|
229
|
+
$button.prop('disabled') ||
|
|
230
|
+
state.loadingButton.isLoading($button)
|
|
231
|
+
) {
|
|
232
|
+
return;
|
|
233
233
|
}
|
|
234
234
|
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
$button.prop('disabled') ||
|
|
263
|
-
state.loadingButton.isLoading($button)
|
|
264
|
-
) {
|
|
265
|
-
return;
|
|
266
|
-
}
|
|
235
|
+
widget.tracking.trackAddToCart([
|
|
236
|
+
{
|
|
237
|
+
item_id: productCode,
|
|
238
|
+
sku: productCode,
|
|
239
|
+
},
|
|
240
|
+
]);
|
|
241
|
+
|
|
242
|
+
state.loadingButton.start($button);
|
|
243
|
+
|
|
244
|
+
Wick.BloomreachWidget.dispatchWidgetEvent(
|
|
245
|
+
addToCartEvent,
|
|
246
|
+
getAddToCartPayload(productCode)
|
|
247
|
+
)
|
|
248
|
+
.then(function (response) {
|
|
249
|
+
state.loadingButton.stop($button);
|
|
250
|
+
|
|
251
|
+
if (config.doNotShowAddedProductPopup) {
|
|
252
|
+
handleAddToCartResponse($card, response);
|
|
253
|
+
return;
|
|
254
|
+
}
|
|
255
|
+
|
|
256
|
+
if (Wick.MiniBasketSliderFE) {
|
|
257
|
+
Wick.MiniBasketSliderFE.isMiniBasketLoaded = false;
|
|
258
|
+
}
|
|
259
|
+
})
|
|
260
|
+
.catch(function (error) {
|
|
261
|
+
state.loadingButton.stop($button);
|
|
267
262
|
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
})
|
|
293
|
-
.catch(function (error) {
|
|
294
|
-
state.loadingButton.stop($button);
|
|
295
|
-
|
|
296
|
-
if (config.disableAfterFailure) {
|
|
297
|
-
widget.setCardFailed(
|
|
298
|
-
$card,
|
|
299
|
-
error && (error.messageText || error.message)
|
|
300
|
-
);
|
|
301
|
-
}
|
|
302
|
-
});
|
|
263
|
+
if (config.disableAfterFailure) {
|
|
264
|
+
setCardFailed($card, error && (error.messageText || error.message));
|
|
265
|
+
}
|
|
266
|
+
});
|
|
267
|
+
});
|
|
268
|
+
}
|
|
269
|
+
|
|
270
|
+
function bindVatToggle() {
|
|
271
|
+
if (Wick.BloomreachWidget.bindVatToggle) {
|
|
272
|
+
Wick.BloomreachWidget.bindVatToggle(`${config.namespace}VatToggle`);
|
|
273
|
+
}
|
|
274
|
+
}
|
|
275
|
+
|
|
276
|
+
function initRenderedWidget($container) {
|
|
277
|
+
const $root = getRenderedRoots($container).last();
|
|
278
|
+
|
|
279
|
+
if (!$root.length) {
|
|
280
|
+
return;
|
|
281
|
+
}
|
|
282
|
+
|
|
283
|
+
if (!state.loadingButton) {
|
|
284
|
+
state.loadingButton = createLoadingButton({
|
|
285
|
+
text: Wick.BloomreachWidget.el.loadingButtonText,
|
|
286
|
+
loader: Wick.BloomreachWidget.el.loadingButtonLoader,
|
|
303
287
|
});
|
|
304
|
-
}
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
state.loadingButton = createLoadingButton({
|
|
321
|
-
text: Wick.BloomreachWidget.el.loadingButtonText,
|
|
322
|
-
loader: Wick.BloomreachWidget.el.loadingButtonLoader,
|
|
288
|
+
}
|
|
289
|
+
|
|
290
|
+
Wick.BloomreachWidget.drawRating($root);
|
|
291
|
+
initSliders($root);
|
|
292
|
+
bindProductTracking($root);
|
|
293
|
+
bindAddToCart($root);
|
|
294
|
+
bindVatToggle();
|
|
295
|
+
Wick.BloomreachWidget.reapplyVatDisplay();
|
|
296
|
+
}
|
|
297
|
+
|
|
298
|
+
widget = createBloomreachWidget({
|
|
299
|
+
el,
|
|
300
|
+
hide($containers) {
|
|
301
|
+
if (config.appendToContainer) {
|
|
302
|
+
$containers.each(function () {
|
|
303
|
+
removeRenderedWidget($(this));
|
|
323
304
|
});
|
|
305
|
+
return;
|
|
324
306
|
}
|
|
325
307
|
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
308
|
+
$containers.empty().hide();
|
|
309
|
+
},
|
|
310
|
+
renderWidget,
|
|
311
|
+
initRenderedWidget,
|
|
312
|
+
getViewTargets($containers) {
|
|
313
|
+
return [$containers.find(el.productLink).get(0), $containers.find(el.cta).get(0)];
|
|
332
314
|
},
|
|
333
315
|
});
|
|
334
316
|
|