@salesforce/retail-react-app 2.4.0-dev → 2.4.0-dev.1
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 +4 -0
- package/app/components/_app-config/index.jsx +12 -0
- package/app/components/confirmation-modal/index.jsx +11 -4
- package/app/components/item-variant/item-image.jsx +18 -0
- package/app/components/unavailable-product-confirmation-modal/index.jsx +72 -0
- package/app/components/unavailable-product-confirmation-modal/index.test.js +362 -0
- package/app/constants.js +18 -0
- package/app/hooks/einstein-mock-data.js +157 -0
- package/app/hooks/use-einstein.js +3 -4
- package/app/hooks/use-einstein.test.js +19 -1
- package/app/pages/account/order-detail.jsx +16 -14
- package/app/pages/account/wishlist/index.jsx +24 -0
- package/app/pages/cart/index.jsx +23 -5
- package/app/pages/checkout/index.jsx +55 -6
- package/app/pages/checkout/index.test.js +23 -7
- package/app/pages/product-list/index.jsx +1 -1
- package/app/ssr.js +18 -1
- package/app/static/translations/compiled/en-GB.json +24 -0
- package/app/static/translations/compiled/en-US.json +24 -0
- package/app/static/translations/compiled/en-XA.json +56 -0
- package/app/utils/test-utils.js +1 -0
- package/package.json +7 -7
- package/translations/en-GB.json +13 -0
- package/translations/en-US.json +13 -0
|
@@ -879,12 +879,24 @@
|
|
|
879
879
|
"value": "No, keep item"
|
|
880
880
|
}
|
|
881
881
|
],
|
|
882
|
+
"confirmation_modal.remove_cart_item.action.remove": [
|
|
883
|
+
{
|
|
884
|
+
"type": 0,
|
|
885
|
+
"value": "Remove"
|
|
886
|
+
}
|
|
887
|
+
],
|
|
882
888
|
"confirmation_modal.remove_cart_item.action.yes": [
|
|
883
889
|
{
|
|
884
890
|
"type": 0,
|
|
885
891
|
"value": "Yes, remove item"
|
|
886
892
|
}
|
|
887
893
|
],
|
|
894
|
+
"confirmation_modal.remove_cart_item.message.need_to_remove_due_to_unavailability": [
|
|
895
|
+
{
|
|
896
|
+
"type": 0,
|
|
897
|
+
"value": "Some items are no longer available online and will be removed from your cart."
|
|
898
|
+
}
|
|
899
|
+
],
|
|
888
900
|
"confirmation_modal.remove_cart_item.message.sure_to_remove": [
|
|
889
901
|
{
|
|
890
902
|
"type": 0,
|
|
@@ -897,6 +909,12 @@
|
|
|
897
909
|
"value": "Confirm Remove Item"
|
|
898
910
|
}
|
|
899
911
|
],
|
|
912
|
+
"confirmation_modal.remove_cart_item.title.items_unavailable": [
|
|
913
|
+
{
|
|
914
|
+
"type": 0,
|
|
915
|
+
"value": "Items Unavailable"
|
|
916
|
+
}
|
|
917
|
+
],
|
|
900
918
|
"confirmation_modal.remove_wishlist_item.action.no": [
|
|
901
919
|
{
|
|
902
920
|
"type": 0,
|
|
@@ -1637,6 +1655,12 @@
|
|
|
1637
1655
|
"value": "Sale"
|
|
1638
1656
|
}
|
|
1639
1657
|
],
|
|
1658
|
+
"item_image.label.unavailable": [
|
|
1659
|
+
{
|
|
1660
|
+
"type": 0,
|
|
1661
|
+
"value": "Unavailable"
|
|
1662
|
+
}
|
|
1663
|
+
],
|
|
1640
1664
|
"item_price.label.starting_at": [
|
|
1641
1665
|
{
|
|
1642
1666
|
"type": 0,
|
|
@@ -1791,6 +1791,20 @@
|
|
|
1791
1791
|
"value": "]"
|
|
1792
1792
|
}
|
|
1793
1793
|
],
|
|
1794
|
+
"confirmation_modal.remove_cart_item.action.remove": [
|
|
1795
|
+
{
|
|
1796
|
+
"type": 0,
|
|
1797
|
+
"value": "["
|
|
1798
|
+
},
|
|
1799
|
+
{
|
|
1800
|
+
"type": 0,
|
|
1801
|
+
"value": "Řḗḗḿǿǿṽḗḗ"
|
|
1802
|
+
},
|
|
1803
|
+
{
|
|
1804
|
+
"type": 0,
|
|
1805
|
+
"value": "]"
|
|
1806
|
+
}
|
|
1807
|
+
],
|
|
1794
1808
|
"confirmation_modal.remove_cart_item.action.yes": [
|
|
1795
1809
|
{
|
|
1796
1810
|
"type": 0,
|
|
@@ -1805,6 +1819,20 @@
|
|
|
1805
1819
|
"value": "]"
|
|
1806
1820
|
}
|
|
1807
1821
|
],
|
|
1822
|
+
"confirmation_modal.remove_cart_item.message.need_to_remove_due_to_unavailability": [
|
|
1823
|
+
{
|
|
1824
|
+
"type": 0,
|
|
1825
|
+
"value": "["
|
|
1826
|
+
},
|
|
1827
|
+
{
|
|
1828
|
+
"type": 0,
|
|
1829
|
+
"value": "Şǿǿḿḗḗ īŧḗḗḿş ȧȧřḗḗ ƞǿǿ ŀǿǿƞɠḗḗř ȧȧṽȧȧīŀȧȧƀŀḗḗ ǿǿƞŀīƞḗḗ ȧȧƞḓ ẇīŀŀ ƀḗḗ řḗḗḿǿǿṽḗḗḓ ƒřǿǿḿ ẏǿǿŭŭř ƈȧȧřŧ."
|
|
1830
|
+
},
|
|
1831
|
+
{
|
|
1832
|
+
"type": 0,
|
|
1833
|
+
"value": "]"
|
|
1834
|
+
}
|
|
1835
|
+
],
|
|
1808
1836
|
"confirmation_modal.remove_cart_item.message.sure_to_remove": [
|
|
1809
1837
|
{
|
|
1810
1838
|
"type": 0,
|
|
@@ -1833,6 +1861,20 @@
|
|
|
1833
1861
|
"value": "]"
|
|
1834
1862
|
}
|
|
1835
1863
|
],
|
|
1864
|
+
"confirmation_modal.remove_cart_item.title.items_unavailable": [
|
|
1865
|
+
{
|
|
1866
|
+
"type": 0,
|
|
1867
|
+
"value": "["
|
|
1868
|
+
},
|
|
1869
|
+
{
|
|
1870
|
+
"type": 0,
|
|
1871
|
+
"value": "Īŧḗḗḿş Ŭƞȧȧṽȧȧīŀȧȧƀŀḗḗ"
|
|
1872
|
+
},
|
|
1873
|
+
{
|
|
1874
|
+
"type": 0,
|
|
1875
|
+
"value": "]"
|
|
1876
|
+
}
|
|
1877
|
+
],
|
|
1836
1878
|
"confirmation_modal.remove_wishlist_item.action.no": [
|
|
1837
1879
|
{
|
|
1838
1880
|
"type": 0,
|
|
@@ -3453,6 +3495,20 @@
|
|
|
3453
3495
|
"value": "]"
|
|
3454
3496
|
}
|
|
3455
3497
|
],
|
|
3498
|
+
"item_image.label.unavailable": [
|
|
3499
|
+
{
|
|
3500
|
+
"type": 0,
|
|
3501
|
+
"value": "["
|
|
3502
|
+
},
|
|
3503
|
+
{
|
|
3504
|
+
"type": 0,
|
|
3505
|
+
"value": "Ŭƞȧȧṽȧȧīŀȧȧƀŀḗḗ"
|
|
3506
|
+
},
|
|
3507
|
+
{
|
|
3508
|
+
"type": 0,
|
|
3509
|
+
"value": "]"
|
|
3510
|
+
}
|
|
3511
|
+
],
|
|
3456
3512
|
"item_price.label.starting_at": [
|
|
3457
3513
|
{
|
|
3458
3514
|
"type": 0,
|
package/app/utils/test-utils.js
CHANGED
|
@@ -130,6 +130,7 @@ export const TestProviders = ({
|
|
|
130
130
|
organizationId={commerceApiConfig.parameters.organizationId}
|
|
131
131
|
siteId={site?.id}
|
|
132
132
|
locale={locale.id}
|
|
133
|
+
proxy={`${window.location.origin}/${commerceApiConfig.proxyPath}`}
|
|
133
134
|
redirectURI={`${window.location.origin}/testcallback`}
|
|
134
135
|
fetchedToken={bypassAuth ? (isGuest ? guestToken : registerUserToken) : ''}
|
|
135
136
|
>
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@salesforce/retail-react-app",
|
|
3
|
-
"version": "2.4.0-dev",
|
|
3
|
+
"version": "2.4.0-dev.1",
|
|
4
4
|
"license": "See license in LICENSE",
|
|
5
5
|
"author": "cc-pwa-kit@salesforce.com",
|
|
6
6
|
"ccExtensibility": {
|
|
@@ -45,10 +45,10 @@
|
|
|
45
45
|
"@lhci/cli": "^0.11.0",
|
|
46
46
|
"@loadable/component": "^5.15.3",
|
|
47
47
|
"@peculiar/webcrypto": "^1.4.2",
|
|
48
|
-
"@salesforce/commerce-sdk-react": "1.4.0-
|
|
49
|
-
"@salesforce/pwa-kit-dev": "3.5.0-
|
|
50
|
-
"@salesforce/pwa-kit-react-sdk": "3.5.0-
|
|
51
|
-
"@salesforce/pwa-kit-runtime": "3.5.0-
|
|
48
|
+
"@salesforce/commerce-sdk-react": "1.4.0-dev.1",
|
|
49
|
+
"@salesforce/pwa-kit-dev": "3.5.0-alpha.1",
|
|
50
|
+
"@salesforce/pwa-kit-react-sdk": "3.5.0-alpha.1",
|
|
51
|
+
"@salesforce/pwa-kit-runtime": "3.5.0-alpha.1",
|
|
52
52
|
"@tanstack/react-query": "^4.28.0",
|
|
53
53
|
"@tanstack/react-query-devtools": "^4.29.1",
|
|
54
54
|
"@testing-library/dom": "^9.0.1",
|
|
@@ -97,8 +97,8 @@
|
|
|
97
97
|
},
|
|
98
98
|
{
|
|
99
99
|
"path": "build/vendor.js",
|
|
100
|
-
"maxSize": "
|
|
100
|
+
"maxSize": "320 kB"
|
|
101
101
|
}
|
|
102
102
|
],
|
|
103
|
-
"gitHead": "
|
|
103
|
+
"gitHead": "2df9f520e6de6585926743fb72bf8e77d515dcf1"
|
|
104
104
|
}
|
package/translations/en-GB.json
CHANGED
|
@@ -343,15 +343,24 @@
|
|
|
343
343
|
"confirmation_modal.remove_cart_item.action.no": {
|
|
344
344
|
"defaultMessage": "No, keep item"
|
|
345
345
|
},
|
|
346
|
+
"confirmation_modal.remove_cart_item.action.remove": {
|
|
347
|
+
"defaultMessage": "Remove"
|
|
348
|
+
},
|
|
346
349
|
"confirmation_modal.remove_cart_item.action.yes": {
|
|
347
350
|
"defaultMessage": "Yes, remove item"
|
|
348
351
|
},
|
|
352
|
+
"confirmation_modal.remove_cart_item.message.need_to_remove_due_to_unavailability": {
|
|
353
|
+
"defaultMessage": "Some items are no longer available online and will be removed from your cart."
|
|
354
|
+
},
|
|
349
355
|
"confirmation_modal.remove_cart_item.message.sure_to_remove": {
|
|
350
356
|
"defaultMessage": "Are you sure you want to remove this item from your cart?"
|
|
351
357
|
},
|
|
352
358
|
"confirmation_modal.remove_cart_item.title.confirm_remove": {
|
|
353
359
|
"defaultMessage": "Confirm Remove Item"
|
|
354
360
|
},
|
|
361
|
+
"confirmation_modal.remove_cart_item.title.items_unavailable": {
|
|
362
|
+
"defaultMessage": "Items Unavailable"
|
|
363
|
+
},
|
|
355
364
|
"confirmation_modal.remove_wishlist_item.action.no": {
|
|
356
365
|
"defaultMessage": "No, keep item"
|
|
357
366
|
},
|
|
@@ -686,6 +695,10 @@
|
|
|
686
695
|
"defaultMessage": "Sale",
|
|
687
696
|
"description": "A sale badge placed on top of a product image"
|
|
688
697
|
},
|
|
698
|
+
"item_image.label.unavailable": {
|
|
699
|
+
"defaultMessage": "Unavailable",
|
|
700
|
+
"description": "A unavailable badge placed on top of a product image"
|
|
701
|
+
},
|
|
689
702
|
"item_price.label.starting_at": {
|
|
690
703
|
"defaultMessage": "Starting at"
|
|
691
704
|
},
|
package/translations/en-US.json
CHANGED
|
@@ -343,15 +343,24 @@
|
|
|
343
343
|
"confirmation_modal.remove_cart_item.action.no": {
|
|
344
344
|
"defaultMessage": "No, keep item"
|
|
345
345
|
},
|
|
346
|
+
"confirmation_modal.remove_cart_item.action.remove": {
|
|
347
|
+
"defaultMessage": "Remove"
|
|
348
|
+
},
|
|
346
349
|
"confirmation_modal.remove_cart_item.action.yes": {
|
|
347
350
|
"defaultMessage": "Yes, remove item"
|
|
348
351
|
},
|
|
352
|
+
"confirmation_modal.remove_cart_item.message.need_to_remove_due_to_unavailability": {
|
|
353
|
+
"defaultMessage": "Some items are no longer available online and will be removed from your cart."
|
|
354
|
+
},
|
|
349
355
|
"confirmation_modal.remove_cart_item.message.sure_to_remove": {
|
|
350
356
|
"defaultMessage": "Are you sure you want to remove this item from your cart?"
|
|
351
357
|
},
|
|
352
358
|
"confirmation_modal.remove_cart_item.title.confirm_remove": {
|
|
353
359
|
"defaultMessage": "Confirm Remove Item"
|
|
354
360
|
},
|
|
361
|
+
"confirmation_modal.remove_cart_item.title.items_unavailable": {
|
|
362
|
+
"defaultMessage": "Items Unavailable"
|
|
363
|
+
},
|
|
355
364
|
"confirmation_modal.remove_wishlist_item.action.no": {
|
|
356
365
|
"defaultMessage": "No, keep item"
|
|
357
366
|
},
|
|
@@ -686,6 +695,10 @@
|
|
|
686
695
|
"defaultMessage": "Sale",
|
|
687
696
|
"description": "A sale badge placed on top of a product image"
|
|
688
697
|
},
|
|
698
|
+
"item_image.label.unavailable": {
|
|
699
|
+
"defaultMessage": "Unavailable",
|
|
700
|
+
"description": "A unavailable badge placed on top of a product image"
|
|
701
|
+
},
|
|
689
702
|
"item_price.label.starting_at": {
|
|
690
703
|
"defaultMessage": "Starting at"
|
|
691
704
|
},
|