@shopgate/webpack 7.30.4-beta.1 → 7.31.0-alpha.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/local-packages/pwa-extension-kit/src/components/ProductCharacteristics/__snapshots__/spec.jsx.snap +271 -115
- package/local-packages/pwa-extension-kit/src/components/ProductCharacteristics/index.jsx +1 -1
- package/local-packages/pwa-extension-kit/src/components/ProductCharacteristics/spec.jsx +5 -2
- package/package.json +2 -1
- package/templates/default.ejs +1 -0
- package/webpack.config.js +2 -2
|
@@ -4,10 +4,10 @@ exports[`components/ProductCharacteristics should render 1`] = `
|
|
|
4
4
|
<Component
|
|
5
5
|
render={
|
|
6
6
|
[MockFunction] {
|
|
7
|
-
"calls":
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
"charRef":
|
|
7
|
+
"calls": [
|
|
8
|
+
[
|
|
9
|
+
{
|
|
10
|
+
"charRef": {
|
|
11
11
|
"current": null,
|
|
12
12
|
},
|
|
13
13
|
"disabled": false,
|
|
@@ -15,25 +15,29 @@ exports[`components/ProductCharacteristics should render 1`] = `
|
|
|
15
15
|
"id": "1",
|
|
16
16
|
"key": "1",
|
|
17
17
|
"label": "Color",
|
|
18
|
+
"resetHighlight": [Function],
|
|
18
19
|
"select": [Function],
|
|
19
20
|
"selected": null,
|
|
20
|
-
"
|
|
21
|
-
|
|
21
|
+
"swatch": false,
|
|
22
|
+
"values": [
|
|
23
|
+
{
|
|
22
24
|
"id": "1",
|
|
23
25
|
"label": "BLACK-WHITE (9000)",
|
|
24
26
|
"selectable": true,
|
|
27
|
+
"selected": false,
|
|
25
28
|
},
|
|
26
|
-
|
|
29
|
+
{
|
|
27
30
|
"id": "2",
|
|
28
31
|
"label": "RED-WHITE (1000)",
|
|
29
32
|
"selectable": true,
|
|
33
|
+
"selected": false,
|
|
30
34
|
},
|
|
31
35
|
],
|
|
32
36
|
},
|
|
33
37
|
],
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
"charRef":
|
|
38
|
+
[
|
|
39
|
+
{
|
|
40
|
+
"charRef": {
|
|
37
41
|
"current": null,
|
|
38
42
|
},
|
|
39
43
|
"disabled": true,
|
|
@@ -41,24 +45,37 @@ exports[`components/ProductCharacteristics should render 1`] = `
|
|
|
41
45
|
"id": "2",
|
|
42
46
|
"key": "2",
|
|
43
47
|
"label": "Size",
|
|
48
|
+
"resetHighlight": [Function],
|
|
44
49
|
"select": [Function],
|
|
45
50
|
"selected": null,
|
|
46
|
-
"
|
|
47
|
-
|
|
51
|
+
"swatch": false,
|
|
52
|
+
"values": [
|
|
53
|
+
{
|
|
48
54
|
"id": "11",
|
|
49
55
|
"label": "7",
|
|
50
|
-
"selectable":
|
|
56
|
+
"selectable": false,
|
|
57
|
+
"selected": false,
|
|
51
58
|
},
|
|
52
|
-
|
|
59
|
+
{
|
|
53
60
|
"id": "12",
|
|
54
61
|
"label": "7.5",
|
|
55
|
-
"selectable":
|
|
62
|
+
"selectable": false,
|
|
63
|
+
"selected": false,
|
|
56
64
|
},
|
|
57
65
|
],
|
|
58
66
|
},
|
|
59
67
|
],
|
|
60
68
|
],
|
|
61
|
-
"results":
|
|
69
|
+
"results": [
|
|
70
|
+
{
|
|
71
|
+
"type": "return",
|
|
72
|
+
"value": undefined,
|
|
73
|
+
},
|
|
74
|
+
{
|
|
75
|
+
"type": "return",
|
|
76
|
+
"value": undefined,
|
|
77
|
+
},
|
|
78
|
+
],
|
|
62
79
|
}
|
|
63
80
|
}
|
|
64
81
|
>
|
|
@@ -66,10 +83,10 @@ exports[`components/ProductCharacteristics should render 1`] = `
|
|
|
66
83
|
WrappedComponent={[Function]}
|
|
67
84
|
render={
|
|
68
85
|
[MockFunction] {
|
|
69
|
-
"calls":
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
"charRef":
|
|
86
|
+
"calls": [
|
|
87
|
+
[
|
|
88
|
+
{
|
|
89
|
+
"charRef": {
|
|
73
90
|
"current": null,
|
|
74
91
|
},
|
|
75
92
|
"disabled": false,
|
|
@@ -77,25 +94,29 @@ exports[`components/ProductCharacteristics should render 1`] = `
|
|
|
77
94
|
"id": "1",
|
|
78
95
|
"key": "1",
|
|
79
96
|
"label": "Color",
|
|
97
|
+
"resetHighlight": [Function],
|
|
80
98
|
"select": [Function],
|
|
81
99
|
"selected": null,
|
|
82
|
-
"
|
|
83
|
-
|
|
100
|
+
"swatch": false,
|
|
101
|
+
"values": [
|
|
102
|
+
{
|
|
84
103
|
"id": "1",
|
|
85
104
|
"label": "BLACK-WHITE (9000)",
|
|
86
105
|
"selectable": true,
|
|
106
|
+
"selected": false,
|
|
87
107
|
},
|
|
88
|
-
|
|
108
|
+
{
|
|
89
109
|
"id": "2",
|
|
90
110
|
"label": "RED-WHITE (1000)",
|
|
91
111
|
"selectable": true,
|
|
112
|
+
"selected": false,
|
|
92
113
|
},
|
|
93
114
|
],
|
|
94
115
|
},
|
|
95
116
|
],
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
"charRef":
|
|
117
|
+
[
|
|
118
|
+
{
|
|
119
|
+
"charRef": {
|
|
99
120
|
"current": null,
|
|
100
121
|
},
|
|
101
122
|
"disabled": true,
|
|
@@ -103,72 +124,119 @@ exports[`components/ProductCharacteristics should render 1`] = `
|
|
|
103
124
|
"id": "2",
|
|
104
125
|
"key": "2",
|
|
105
126
|
"label": "Size",
|
|
127
|
+
"resetHighlight": [Function],
|
|
106
128
|
"select": [Function],
|
|
107
129
|
"selected": null,
|
|
108
|
-
"
|
|
109
|
-
|
|
130
|
+
"swatch": false,
|
|
131
|
+
"values": [
|
|
132
|
+
{
|
|
110
133
|
"id": "11",
|
|
111
134
|
"label": "7",
|
|
112
|
-
"selectable":
|
|
135
|
+
"selectable": false,
|
|
136
|
+
"selected": false,
|
|
113
137
|
},
|
|
114
|
-
|
|
138
|
+
{
|
|
115
139
|
"id": "12",
|
|
116
140
|
"label": "7.5",
|
|
117
|
-
"selectable":
|
|
141
|
+
"selectable": false,
|
|
142
|
+
"selected": false,
|
|
118
143
|
},
|
|
119
144
|
],
|
|
120
145
|
},
|
|
121
146
|
],
|
|
122
147
|
],
|
|
123
|
-
"results":
|
|
148
|
+
"results": [
|
|
149
|
+
{
|
|
150
|
+
"type": "return",
|
|
151
|
+
"value": undefined,
|
|
152
|
+
},
|
|
153
|
+
{
|
|
154
|
+
"type": "return",
|
|
155
|
+
"value": undefined,
|
|
156
|
+
},
|
|
157
|
+
],
|
|
124
158
|
}
|
|
125
159
|
}
|
|
126
160
|
>
|
|
127
161
|
<Theme>
|
|
128
|
-
<
|
|
162
|
+
<children
|
|
129
163
|
AppBar={[Function]}
|
|
130
164
|
Drawer={[Function]}
|
|
131
165
|
View={[Function]}
|
|
132
166
|
contexts={
|
|
133
|
-
|
|
134
|
-
"ProductContext":
|
|
167
|
+
{
|
|
168
|
+
"ProductContext": {
|
|
135
169
|
"Consumer": [Function],
|
|
136
170
|
},
|
|
137
171
|
}
|
|
138
172
|
}
|
|
139
173
|
>
|
|
140
174
|
<Consumer>
|
|
141
|
-
<
|
|
175
|
+
<children
|
|
142
176
|
conditioner={
|
|
143
177
|
Conditioner {
|
|
144
|
-
"
|
|
145
|
-
"product-variants" =>
|
|
178
|
+
"conditions": Map {
|
|
179
|
+
"product-variants" => {
|
|
180
|
+
"conditioner": [Function],
|
|
181
|
+
"priority": 1,
|
|
182
|
+
},
|
|
146
183
|
},
|
|
147
184
|
}
|
|
148
185
|
}
|
|
149
|
-
options={
|
|
186
|
+
options={{}}
|
|
150
187
|
productId="123"
|
|
188
|
+
setCharacteristics={
|
|
189
|
+
[MockFunction] {
|
|
190
|
+
"calls": [
|
|
191
|
+
[
|
|
192
|
+
{},
|
|
193
|
+
],
|
|
194
|
+
],
|
|
195
|
+
"results": [
|
|
196
|
+
{
|
|
197
|
+
"type": "return",
|
|
198
|
+
"value": undefined,
|
|
199
|
+
},
|
|
200
|
+
],
|
|
201
|
+
}
|
|
202
|
+
}
|
|
151
203
|
variantId="123-45"
|
|
152
204
|
>
|
|
153
205
|
<Component
|
|
154
206
|
productContext={
|
|
155
|
-
|
|
207
|
+
{
|
|
156
208
|
"conditioner": Conditioner {
|
|
157
|
-
"
|
|
158
|
-
"product-variants" =>
|
|
209
|
+
"conditions": Map {
|
|
210
|
+
"product-variants" => {
|
|
211
|
+
"conditioner": [Function],
|
|
212
|
+
"priority": 1,
|
|
213
|
+
},
|
|
159
214
|
},
|
|
160
215
|
},
|
|
161
|
-
"options":
|
|
216
|
+
"options": {},
|
|
162
217
|
"productId": "123",
|
|
218
|
+
"setCharacteristics": [MockFunction] {
|
|
219
|
+
"calls": [
|
|
220
|
+
[
|
|
221
|
+
{},
|
|
222
|
+
],
|
|
223
|
+
],
|
|
224
|
+
"results": [
|
|
225
|
+
{
|
|
226
|
+
"type": "return",
|
|
227
|
+
"value": undefined,
|
|
228
|
+
},
|
|
229
|
+
],
|
|
230
|
+
},
|
|
163
231
|
"variantId": "123-45",
|
|
164
232
|
}
|
|
165
233
|
}
|
|
166
234
|
render={
|
|
167
235
|
[MockFunction] {
|
|
168
|
-
"calls":
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
"charRef":
|
|
236
|
+
"calls": [
|
|
237
|
+
[
|
|
238
|
+
{
|
|
239
|
+
"charRef": {
|
|
172
240
|
"current": null,
|
|
173
241
|
},
|
|
174
242
|
"disabled": false,
|
|
@@ -176,25 +244,29 @@ exports[`components/ProductCharacteristics should render 1`] = `
|
|
|
176
244
|
"id": "1",
|
|
177
245
|
"key": "1",
|
|
178
246
|
"label": "Color",
|
|
247
|
+
"resetHighlight": [Function],
|
|
179
248
|
"select": [Function],
|
|
180
249
|
"selected": null,
|
|
181
|
-
"
|
|
182
|
-
|
|
250
|
+
"swatch": false,
|
|
251
|
+
"values": [
|
|
252
|
+
{
|
|
183
253
|
"id": "1",
|
|
184
254
|
"label": "BLACK-WHITE (9000)",
|
|
185
255
|
"selectable": true,
|
|
256
|
+
"selected": false,
|
|
186
257
|
},
|
|
187
|
-
|
|
258
|
+
{
|
|
188
259
|
"id": "2",
|
|
189
260
|
"label": "RED-WHITE (1000)",
|
|
190
261
|
"selectable": true,
|
|
262
|
+
"selected": false,
|
|
191
263
|
},
|
|
192
264
|
],
|
|
193
265
|
},
|
|
194
266
|
],
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
"charRef":
|
|
267
|
+
[
|
|
268
|
+
{
|
|
269
|
+
"charRef": {
|
|
198
270
|
"current": null,
|
|
199
271
|
},
|
|
200
272
|
"disabled": true,
|
|
@@ -202,43 +274,59 @@ exports[`components/ProductCharacteristics should render 1`] = `
|
|
|
202
274
|
"id": "2",
|
|
203
275
|
"key": "2",
|
|
204
276
|
"label": "Size",
|
|
277
|
+
"resetHighlight": [Function],
|
|
205
278
|
"select": [Function],
|
|
206
279
|
"selected": null,
|
|
207
|
-
"
|
|
208
|
-
|
|
280
|
+
"swatch": false,
|
|
281
|
+
"values": [
|
|
282
|
+
{
|
|
209
283
|
"id": "11",
|
|
210
284
|
"label": "7",
|
|
211
|
-
"selectable":
|
|
285
|
+
"selectable": false,
|
|
286
|
+
"selected": false,
|
|
212
287
|
},
|
|
213
|
-
|
|
288
|
+
{
|
|
214
289
|
"id": "12",
|
|
215
290
|
"label": "7.5",
|
|
216
|
-
"selectable":
|
|
291
|
+
"selectable": false,
|
|
292
|
+
"selected": false,
|
|
217
293
|
},
|
|
218
294
|
],
|
|
219
295
|
},
|
|
220
296
|
],
|
|
221
297
|
],
|
|
222
|
-
"results":
|
|
298
|
+
"results": [
|
|
299
|
+
{
|
|
300
|
+
"type": "return",
|
|
301
|
+
"value": undefined,
|
|
302
|
+
},
|
|
303
|
+
{
|
|
304
|
+
"type": "return",
|
|
305
|
+
"value": undefined,
|
|
306
|
+
},
|
|
307
|
+
],
|
|
223
308
|
}
|
|
224
309
|
}
|
|
225
310
|
>
|
|
226
311
|
<Component
|
|
227
312
|
conditioner={
|
|
228
313
|
Conditioner {
|
|
229
|
-
"
|
|
230
|
-
"product-variants" =>
|
|
314
|
+
"conditions": Map {
|
|
315
|
+
"product-variants" => {
|
|
316
|
+
"conditioner": [Function],
|
|
317
|
+
"priority": 1,
|
|
318
|
+
},
|
|
231
319
|
},
|
|
232
320
|
}
|
|
233
321
|
}
|
|
234
|
-
options={
|
|
322
|
+
options={{}}
|
|
235
323
|
productId="123"
|
|
236
324
|
render={
|
|
237
325
|
[MockFunction] {
|
|
238
|
-
"calls":
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
"charRef":
|
|
326
|
+
"calls": [
|
|
327
|
+
[
|
|
328
|
+
{
|
|
329
|
+
"charRef": {
|
|
242
330
|
"current": null,
|
|
243
331
|
},
|
|
244
332
|
"disabled": false,
|
|
@@ -246,25 +334,29 @@ exports[`components/ProductCharacteristics should render 1`] = `
|
|
|
246
334
|
"id": "1",
|
|
247
335
|
"key": "1",
|
|
248
336
|
"label": "Color",
|
|
337
|
+
"resetHighlight": [Function],
|
|
249
338
|
"select": [Function],
|
|
250
339
|
"selected": null,
|
|
251
|
-
"
|
|
252
|
-
|
|
340
|
+
"swatch": false,
|
|
341
|
+
"values": [
|
|
342
|
+
{
|
|
253
343
|
"id": "1",
|
|
254
344
|
"label": "BLACK-WHITE (9000)",
|
|
255
345
|
"selectable": true,
|
|
346
|
+
"selected": false,
|
|
256
347
|
},
|
|
257
|
-
|
|
348
|
+
{
|
|
258
349
|
"id": "2",
|
|
259
350
|
"label": "RED-WHITE (1000)",
|
|
260
351
|
"selectable": true,
|
|
352
|
+
"selected": false,
|
|
261
353
|
},
|
|
262
354
|
],
|
|
263
355
|
},
|
|
264
356
|
],
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
"charRef":
|
|
357
|
+
[
|
|
358
|
+
{
|
|
359
|
+
"charRef": {
|
|
268
360
|
"current": null,
|
|
269
361
|
},
|
|
270
362
|
"disabled": true,
|
|
@@ -272,46 +364,78 @@ exports[`components/ProductCharacteristics should render 1`] = `
|
|
|
272
364
|
"id": "2",
|
|
273
365
|
"key": "2",
|
|
274
366
|
"label": "Size",
|
|
367
|
+
"resetHighlight": [Function],
|
|
275
368
|
"select": [Function],
|
|
276
369
|
"selected": null,
|
|
277
|
-
"
|
|
278
|
-
|
|
370
|
+
"swatch": false,
|
|
371
|
+
"values": [
|
|
372
|
+
{
|
|
279
373
|
"id": "11",
|
|
280
374
|
"label": "7",
|
|
281
|
-
"selectable":
|
|
375
|
+
"selectable": false,
|
|
376
|
+
"selected": false,
|
|
282
377
|
},
|
|
283
|
-
|
|
378
|
+
{
|
|
284
379
|
"id": "12",
|
|
285
380
|
"label": "7.5",
|
|
286
|
-
"selectable":
|
|
381
|
+
"selectable": false,
|
|
382
|
+
"selected": false,
|
|
287
383
|
},
|
|
288
384
|
],
|
|
289
385
|
},
|
|
290
386
|
],
|
|
291
387
|
],
|
|
292
|
-
"results":
|
|
388
|
+
"results": [
|
|
389
|
+
{
|
|
390
|
+
"type": "return",
|
|
391
|
+
"value": undefined,
|
|
392
|
+
},
|
|
393
|
+
{
|
|
394
|
+
"type": "return",
|
|
395
|
+
"value": undefined,
|
|
396
|
+
},
|
|
397
|
+
],
|
|
398
|
+
}
|
|
399
|
+
}
|
|
400
|
+
setCharacteristics={
|
|
401
|
+
[MockFunction] {
|
|
402
|
+
"calls": [
|
|
403
|
+
[
|
|
404
|
+
{},
|
|
405
|
+
],
|
|
406
|
+
],
|
|
407
|
+
"results": [
|
|
408
|
+
{
|
|
409
|
+
"type": "return",
|
|
410
|
+
"value": undefined,
|
|
411
|
+
},
|
|
412
|
+
],
|
|
293
413
|
}
|
|
294
414
|
}
|
|
295
415
|
variantId="123-45"
|
|
296
416
|
>
|
|
297
417
|
<ProductCharacteristics
|
|
418
|
+
characteristics={null}
|
|
298
419
|
conditioner={
|
|
299
420
|
Conditioner {
|
|
300
|
-
"
|
|
301
|
-
"product-variants" =>
|
|
421
|
+
"conditions": Map {
|
|
422
|
+
"product-variants" => {
|
|
423
|
+
"conditioner": [Function],
|
|
424
|
+
"priority": 1,
|
|
425
|
+
},
|
|
302
426
|
},
|
|
303
427
|
}
|
|
304
428
|
}
|
|
305
429
|
finishTimeout={0}
|
|
306
|
-
navigate={[
|
|
307
|
-
options={
|
|
430
|
+
navigate={[MockFunction]}
|
|
431
|
+
options={{}}
|
|
308
432
|
productId="123"
|
|
309
433
|
render={
|
|
310
434
|
[MockFunction] {
|
|
311
|
-
"calls":
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
"charRef":
|
|
435
|
+
"calls": [
|
|
436
|
+
[
|
|
437
|
+
{
|
|
438
|
+
"charRef": {
|
|
315
439
|
"current": null,
|
|
316
440
|
},
|
|
317
441
|
"disabled": false,
|
|
@@ -319,25 +443,29 @@ exports[`components/ProductCharacteristics should render 1`] = `
|
|
|
319
443
|
"id": "1",
|
|
320
444
|
"key": "1",
|
|
321
445
|
"label": "Color",
|
|
446
|
+
"resetHighlight": [Function],
|
|
322
447
|
"select": [Function],
|
|
323
448
|
"selected": null,
|
|
324
|
-
"
|
|
325
|
-
|
|
449
|
+
"swatch": false,
|
|
450
|
+
"values": [
|
|
451
|
+
{
|
|
326
452
|
"id": "1",
|
|
327
453
|
"label": "BLACK-WHITE (9000)",
|
|
328
454
|
"selectable": true,
|
|
455
|
+
"selected": false,
|
|
329
456
|
},
|
|
330
|
-
|
|
457
|
+
{
|
|
331
458
|
"id": "2",
|
|
332
459
|
"label": "RED-WHITE (1000)",
|
|
333
460
|
"selectable": true,
|
|
461
|
+
"selected": false,
|
|
334
462
|
},
|
|
335
463
|
],
|
|
336
464
|
},
|
|
337
465
|
],
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
"charRef":
|
|
466
|
+
[
|
|
467
|
+
{
|
|
468
|
+
"charRef": {
|
|
341
469
|
"current": null,
|
|
342
470
|
},
|
|
343
471
|
"disabled": true,
|
|
@@ -345,69 +473,97 @@ exports[`components/ProductCharacteristics should render 1`] = `
|
|
|
345
473
|
"id": "2",
|
|
346
474
|
"key": "2",
|
|
347
475
|
"label": "Size",
|
|
476
|
+
"resetHighlight": [Function],
|
|
348
477
|
"select": [Function],
|
|
349
478
|
"selected": null,
|
|
350
|
-
"
|
|
351
|
-
|
|
479
|
+
"swatch": false,
|
|
480
|
+
"values": [
|
|
481
|
+
{
|
|
352
482
|
"id": "11",
|
|
353
483
|
"label": "7",
|
|
354
|
-
"selectable":
|
|
484
|
+
"selectable": false,
|
|
485
|
+
"selected": false,
|
|
355
486
|
},
|
|
356
|
-
|
|
487
|
+
{
|
|
357
488
|
"id": "12",
|
|
358
489
|
"label": "7.5",
|
|
359
|
-
"selectable":
|
|
490
|
+
"selectable": false,
|
|
491
|
+
"selected": false,
|
|
360
492
|
},
|
|
361
493
|
],
|
|
362
494
|
},
|
|
363
495
|
],
|
|
364
496
|
],
|
|
365
|
-
"results":
|
|
497
|
+
"results": [
|
|
498
|
+
{
|
|
499
|
+
"type": "return",
|
|
500
|
+
"value": undefined,
|
|
501
|
+
},
|
|
502
|
+
{
|
|
503
|
+
"type": "return",
|
|
504
|
+
"value": undefined,
|
|
505
|
+
},
|
|
506
|
+
],
|
|
507
|
+
}
|
|
508
|
+
}
|
|
509
|
+
setCharacteristics={
|
|
510
|
+
[MockFunction] {
|
|
511
|
+
"calls": [
|
|
512
|
+
[
|
|
513
|
+
{},
|
|
514
|
+
],
|
|
515
|
+
],
|
|
516
|
+
"results": [
|
|
517
|
+
{
|
|
518
|
+
"type": "return",
|
|
519
|
+
"value": undefined,
|
|
520
|
+
},
|
|
521
|
+
],
|
|
366
522
|
}
|
|
367
523
|
}
|
|
368
524
|
variantId="123-45"
|
|
369
525
|
variants={
|
|
370
|
-
|
|
371
|
-
"characteristics":
|
|
372
|
-
|
|
526
|
+
{
|
|
527
|
+
"characteristics": [
|
|
528
|
+
{
|
|
373
529
|
"id": "1",
|
|
374
530
|
"label": "Color",
|
|
375
|
-
"values":
|
|
376
|
-
|
|
531
|
+
"values": [
|
|
532
|
+
{
|
|
377
533
|
"id": "1",
|
|
378
534
|
"label": "BLACK-WHITE (9000)",
|
|
379
535
|
},
|
|
380
|
-
|
|
536
|
+
{
|
|
381
537
|
"id": "2",
|
|
382
538
|
"label": "RED-WHITE (1000)",
|
|
383
539
|
},
|
|
384
540
|
],
|
|
385
541
|
},
|
|
386
|
-
|
|
542
|
+
{
|
|
387
543
|
"id": "2",
|
|
388
544
|
"label": "Size",
|
|
389
|
-
"values":
|
|
390
|
-
|
|
545
|
+
"values": [
|
|
546
|
+
{
|
|
391
547
|
"id": "11",
|
|
392
548
|
"label": "7",
|
|
393
549
|
},
|
|
394
|
-
|
|
550
|
+
{
|
|
395
551
|
"id": "12",
|
|
396
552
|
"label": "7.5",
|
|
397
553
|
},
|
|
398
554
|
],
|
|
399
555
|
},
|
|
400
556
|
],
|
|
401
|
-
"products":
|
|
402
|
-
|
|
403
|
-
"characteristics":
|
|
557
|
+
"products": [
|
|
558
|
+
{
|
|
559
|
+
"characteristics": {
|
|
404
560
|
"1": "1",
|
|
405
561
|
"2": "11",
|
|
406
562
|
},
|
|
407
563
|
"id": "32050590001000",
|
|
408
564
|
},
|
|
409
|
-
|
|
410
|
-
"characteristics":
|
|
565
|
+
{
|
|
566
|
+
"characteristics": {
|
|
411
567
|
"1": "2",
|
|
412
568
|
"2": "12",
|
|
413
569
|
},
|
|
@@ -419,9 +575,9 @@ exports[`components/ProductCharacteristics should render 1`] = `
|
|
|
419
575
|
/>
|
|
420
576
|
</Component>
|
|
421
577
|
</Component>
|
|
422
|
-
</
|
|
578
|
+
</children>
|
|
423
579
|
</Consumer>
|
|
424
|
-
</
|
|
580
|
+
</children>
|
|
425
581
|
</Theme>
|
|
426
582
|
</WithProductContext>
|
|
427
583
|
</Component>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import BaseProductCharacteristics from '@shopgate/
|
|
2
|
+
import { ProductCharacteristics as BaseProductCharacteristics } from '@shopgate/engage/product/components';
|
|
3
3
|
import withProductContext from '../../connectors/withProductContext';
|
|
4
4
|
|
|
5
5
|
export default withProductContext(({ productContext, ...otherProps }) => (
|
|
@@ -30,10 +30,12 @@ const mockedMapStateToPropsResult = {
|
|
|
30
30
|
}],
|
|
31
31
|
},
|
|
32
32
|
};
|
|
33
|
+
|
|
33
34
|
jest.mock('react-redux', () => ({
|
|
34
35
|
connect: mapStateToProps => Component => props => (
|
|
35
36
|
<Component
|
|
36
37
|
variants={mockedMapStateToPropsResult.variants}
|
|
38
|
+
navigate={jest.fn()}
|
|
37
39
|
{...props}
|
|
38
40
|
/>
|
|
39
41
|
),
|
|
@@ -57,6 +59,7 @@ jest.mock('@shopgate/pwa-common/context', () => ({
|
|
|
57
59
|
productId="123"
|
|
58
60
|
variantId="123-45"
|
|
59
61
|
conditioner={mockedConditioner}
|
|
62
|
+
setCharacteristics={jest.fn()}
|
|
60
63
|
{...contextProps}
|
|
61
64
|
/>
|
|
62
65
|
),
|
|
@@ -110,8 +113,8 @@ describe('components/ProductCharacteristics', () => {
|
|
|
110
113
|
label: 'Size',
|
|
111
114
|
selected: null,
|
|
112
115
|
values: [
|
|
113
|
-
{ id: '11', label: '7', selectable:
|
|
114
|
-
{ id: '12', label: '7.5', selectable:
|
|
116
|
+
{ id: '11', label: '7', selectable: false },
|
|
117
|
+
{ id: '12', label: '7.5', selectable: false },
|
|
115
118
|
],
|
|
116
119
|
};
|
|
117
120
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@shopgate/webpack",
|
|
3
|
-
"version": "7.
|
|
3
|
+
"version": "7.31.0-alpha.2",
|
|
4
4
|
"description": "The webpack configuration for Shopgate's Engage.",
|
|
5
5
|
"main": "webpack.config.js",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -28,6 +28,7 @@
|
|
|
28
28
|
"workbox-webpack-plugin": "6.5.4"
|
|
29
29
|
},
|
|
30
30
|
"devDependencies": {
|
|
31
|
+
"@types/lodash": "^4.17.24",
|
|
31
32
|
"rxjs": "~5.5.12",
|
|
32
33
|
"webpack-dev-server": "4.15.2"
|
|
33
34
|
}
|
package/templates/default.ejs
CHANGED
|
@@ -10,6 +10,7 @@
|
|
|
10
10
|
<title>
|
|
11
11
|
<%= htmlWebpackPlugin.options.title %>
|
|
12
12
|
</title>
|
|
13
|
+
<meta name="emotion-insertion-point" content="" />
|
|
13
14
|
<% if (htmlWebpackPlugin.files && htmlWebpackPlugin.files.css) { %>
|
|
14
15
|
<% htmlWebpackPlugin.files.css.forEach(function(css) { %>
|
|
15
16
|
<link rel="stylesheet" href="<%= css %>">
|
package/webpack.config.js
CHANGED
|
@@ -70,7 +70,7 @@ const config = {
|
|
|
70
70
|
publicPath: isDev ? '/' : (process.env.publicPath || './'),
|
|
71
71
|
},
|
|
72
72
|
resolve: {
|
|
73
|
-
extensions: ['.json', '.js', '.jsx', '.mjs'],
|
|
73
|
+
extensions: ['.json', '.js', '.jsx', '.ts', '.tsx', '.mjs'],
|
|
74
74
|
/**
|
|
75
75
|
* Aliases for module resolution. They guarantee that whenever one of the bundled modules
|
|
76
76
|
* uses in import to one of the packages, it will always resolve to the version of the core.
|
|
@@ -239,7 +239,7 @@ const config = {
|
|
|
239
239
|
type: 'javascript/auto',
|
|
240
240
|
},
|
|
241
241
|
{
|
|
242
|
-
test: /\.(js|jsx)$/,
|
|
242
|
+
test: /\.(js|jsx|ts|tsx)$/,
|
|
243
243
|
exclude: new RegExp(`node_modules\\b(?!\\${path.sep}@shopgate)\\b.*`),
|
|
244
244
|
use: [
|
|
245
245
|
{
|