@adobe-commerce/elsie 1.4.1-alpha007 → 1.4.1-alpha008
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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@adobe-commerce/elsie",
|
|
3
|
-
"version": "1.4.1-
|
|
3
|
+
"version": "1.4.1-alpha008",
|
|
4
4
|
"license": "SEE LICENSE IN LICENSE.md",
|
|
5
5
|
"description": "Domain Package SDK",
|
|
6
6
|
"engines": {
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
"cleanup": "rimraf dist"
|
|
27
27
|
},
|
|
28
28
|
"devDependencies": {
|
|
29
|
-
"@adobe-commerce/event-bus": "
|
|
29
|
+
"@adobe-commerce/event-bus": "1.0.1-beta1",
|
|
30
30
|
"@adobe-commerce/fetch-graphql": "~1.1.0",
|
|
31
31
|
"@adobe-commerce/recaptcha": "~1.0.1",
|
|
32
32
|
"@adobe-commerce/storefront-design": "~1.0.0",
|
|
@@ -36,6 +36,7 @@ export interface CartItemProps
|
|
|
36
36
|
totalExcludingTax?: VNode;
|
|
37
37
|
sku?: VNode;
|
|
38
38
|
quantity?: number;
|
|
39
|
+
quantityContent?: VNode;
|
|
39
40
|
description?: VNode;
|
|
40
41
|
attributes?: VNode;
|
|
41
42
|
footer?: VNode;
|
|
@@ -45,6 +46,7 @@ export interface CartItemProps
|
|
|
45
46
|
discount?: VNode;
|
|
46
47
|
savings?: VNode;
|
|
47
48
|
actions?: VNode;
|
|
49
|
+
removeContent?: VNode;
|
|
48
50
|
loading?: boolean;
|
|
49
51
|
updating?: boolean;
|
|
50
52
|
onRemove?: () => void;
|
|
@@ -71,7 +73,9 @@ export const CartItem: FunctionComponent<CartItemProps> = ({
|
|
|
71
73
|
discount,
|
|
72
74
|
savings,
|
|
73
75
|
actions,
|
|
76
|
+
removeContent,
|
|
74
77
|
quantity,
|
|
78
|
+
quantityContent,
|
|
75
79
|
description,
|
|
76
80
|
attributes,
|
|
77
81
|
footer,
|
|
@@ -304,18 +308,20 @@ export const CartItem: FunctionComponent<CartItemProps> = ({
|
|
|
304
308
|
['dropin-cart-item__quantity--edit', !!onQuantity],
|
|
305
309
|
])}
|
|
306
310
|
>
|
|
307
|
-
{
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
</
|
|
318
|
-
|
|
311
|
+
{quantityContent ? (
|
|
312
|
+
<VComponent node={quantityContent} />
|
|
313
|
+
) : onQuantity ? (
|
|
314
|
+
quantityComponent
|
|
315
|
+
) : (
|
|
316
|
+
quantity && (
|
|
317
|
+
<span className={classes(['dropin-cart-item__quantity__value'])}>
|
|
318
|
+
{labels.quantity}:{' '}
|
|
319
|
+
<strong className="dropin-cart-item__quantity__number">
|
|
320
|
+
{Number(quantity).toLocaleString(locale)}
|
|
321
|
+
</strong>
|
|
322
|
+
</span>
|
|
323
|
+
)
|
|
324
|
+
)}
|
|
319
325
|
|
|
320
326
|
{/* Warning */}
|
|
321
327
|
{warning && (
|
|
@@ -432,12 +438,17 @@ export const CartItem: FunctionComponent<CartItemProps> = ({
|
|
|
432
438
|
|
|
433
439
|
{/* Footer */}
|
|
434
440
|
{footer && (
|
|
435
|
-
|
|
441
|
+
<VComponent
|
|
442
|
+
node={footer}
|
|
443
|
+
className={classes(['dropin-cart-item__footer'])}
|
|
444
|
+
/>
|
|
436
445
|
)}
|
|
437
446
|
</div>
|
|
438
447
|
|
|
439
448
|
{/* Remove Item */}
|
|
440
|
-
{
|
|
449
|
+
{removeContent ? (
|
|
450
|
+
<VComponent node={removeContent} />
|
|
451
|
+
) : onRemove ? (
|
|
441
452
|
<Button
|
|
442
453
|
data-testid="cart-item-remove-button"
|
|
443
454
|
className={classes(['dropin-cart-item__remove'])}
|
|
@@ -459,7 +470,7 @@ export const CartItem: FunctionComponent<CartItemProps> = ({
|
|
|
459
470
|
}
|
|
460
471
|
disabled={updating}
|
|
461
472
|
/>
|
|
462
|
-
)}
|
|
473
|
+
) : null}
|
|
463
474
|
</div>
|
|
464
475
|
);
|
|
465
476
|
};
|