@faststore/core 2.2.58 → 2.2.60

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.
Files changed (77) hide show
  1. package/.next/BUILD_ID +1 -1
  2. package/.next/build-manifest.json +45 -45
  3. package/.next/cache/.tsbuildinfo +1 -1
  4. package/.next/cache/config.json +3 -3
  5. package/.next/cache/eslint/.cache_1gneedd +1 -1
  6. package/.next/cache/next-server.js.nft.json +1 -1
  7. package/.next/cache/webpack/client-production/0.pack +0 -0
  8. package/.next/cache/webpack/client-production/index.pack +0 -0
  9. package/.next/cache/webpack/server-production/0.pack +0 -0
  10. package/.next/cache/webpack/server-production/index.pack +0 -0
  11. package/.next/next-server.js.nft.json +1 -1
  12. package/.next/prerender-manifest.json +1 -1
  13. package/.next/routes-manifest.json +1 -1
  14. package/.next/server/chunks/74.js +457 -22
  15. package/.next/server/chunks/{350.js → 829.js} +42 -2
  16. package/.next/server/middleware-build-manifest.js +1 -1
  17. package/.next/server/pages/404.js.nft.json +1 -1
  18. package/.next/server/pages/500.js.nft.json +1 -1
  19. package/.next/server/pages/[...slug].js +5 -5
  20. package/.next/server/pages/[...slug].js.nft.json +1 -1
  21. package/.next/server/pages/[slug]/p.js +5 -5
  22. package/.next/server/pages/[slug]/p.js.nft.json +1 -1
  23. package/.next/server/pages/_app.js.nft.json +1 -1
  24. package/.next/server/pages/_error.js.nft.json +1 -1
  25. package/.next/server/pages/account.js.nft.json +1 -1
  26. package/.next/server/pages/checkout.js.nft.json +1 -1
  27. package/.next/server/pages/en-US/404.html +2 -2
  28. package/.next/server/pages/en-US/500.html +2 -2
  29. package/.next/server/pages/en-US/account.html +2 -2
  30. package/.next/server/pages/en-US/checkout.html +2 -2
  31. package/.next/server/pages/en-US/login.html +2 -2
  32. package/.next/server/pages/en-US/s.html +2 -2
  33. package/.next/server/pages/en-US.html +2 -2
  34. package/.next/server/pages/index.js.nft.json +1 -1
  35. package/.next/server/pages/login.js.nft.json +1 -1
  36. package/.next/server/pages/s.js +45 -5
  37. package/.next/server/pages/s.js.nft.json +1 -1
  38. package/.next/static/6bF_SCrIHFXTyZBUovU8C/_buildManifest.js +1 -0
  39. package/.next/static/chunks/238-6cdd6e7841eba836.js +1 -0
  40. package/.next/static/chunks/875-cb15fc30de11893a.js +1 -0
  41. package/.next/static/chunks/pages/{404-0bacd82dcf801c94.js → 404-340e5868f79ee704.js} +1 -1
  42. package/.next/static/chunks/pages/{500-4dceb834e001d990.js → 500-ee2a5efc5808cdd4.js} +1 -1
  43. package/.next/static/chunks/pages/{[...slug]-73ed6192e9f16de9.js → [...slug]-8e6c8b59791c31e9.js} +1 -1
  44. package/.next/static/chunks/pages/[slug]/p-fd236c3b1d28734d.js +1 -0
  45. package/.next/static/chunks/pages/{account-57c0c1f70eed76a6.js → account-acd169fb6e00021f.js} +1 -1
  46. package/.next/static/chunks/pages/{checkout-e5db8918e7c9c75e.js → checkout-5de711ccb807644b.js} +1 -1
  47. package/.next/static/chunks/pages/{index-eb26d4cf53e13666.js → index-66a1b740f1101ce4.js} +1 -1
  48. package/.next/static/chunks/pages/{login-39000c786b4f6222.js → login-e5ee36783a4877fd.js} +1 -1
  49. package/.next/static/chunks/pages/{s-e195109f5acced7c.js → s-669d2eccade79e75.js} +1 -1
  50. package/.next/static/chunks/{webpack-3382def1b25b17f8.js → webpack-41b4f40c5b7ff474.js} +1 -1
  51. package/.next/static/css/014e8b0d9020cd52.css +1 -0
  52. package/.next/static/css/4a189916c3edc75d.css +1 -0
  53. package/.next/static/css/e67c73ff7fbc8c54.css +1 -0
  54. package/.next/trace +81 -81
  55. package/.turbo/turbo-build.log +10 -10
  56. package/.turbo/turbo-test.log +9 -9
  57. package/package.json +2 -2
  58. package/public/icons.svg +3 -1
  59. package/src/components/sections/Breadcrumb/Breadcrumb.tsx +4 -3
  60. package/src/components/sections/Breadcrumb/DefaultComponents.ts +6 -0
  61. package/src/components/sections/Breadcrumb/OverriddenDefaultBreadcrumb.ts +12 -0
  62. package/src/components/templates/ProductListingPage/ProductListing.tsx +1 -1
  63. package/src/components/templates/SearchPage/SearchPage.tsx +1 -1
  64. package/src/components/ui/Breadcrumb/Breadcrumb.tsx +35 -33
  65. package/src/pages/[slug]/p.tsx +1 -1
  66. package/src/sdk/overrides/sections.tsx +4 -0
  67. package/src/typings/overrides.ts +7 -1
  68. package/.next/server/chunks/390.js +0 -495
  69. package/.next/static/chunks/158-3ad2d91ade721ede.js +0 -1
  70. package/.next/static/chunks/497-e24ad9b81a2b2cba.js +0 -1
  71. package/.next/static/chunks/pages/[slug]/p-0006885a8666b680.js +0 -1
  72. package/.next/static/css/4729e602d10c1332.css +0 -1
  73. package/.next/static/css/723835bce380750d.css +0 -1
  74. package/.next/static/css/f2ab72459fcdabcc.css +0 -1
  75. package/.next/static/j13kfoTKrIiAVuMZNkLYr/_buildManifest.js +0 -1
  76. package/src/components/sections/Breadcrumb/Overrides.tsx +0 -15
  77. /package/.next/static/{j13kfoTKrIiAVuMZNkLYr → 6bF_SCrIHFXTyZBUovU8C}/_ssgManifest.js +0 -0
@@ -1,6 +1,6 @@
1
1
  $ yarn partytown & yarn generate && next build
2
- $ partytown copylib ./public/~partytown
3
2
  $ faststore generate-graphql -c
3
+ $ partytown copylib ./public/~partytown
4
4
  Partytown lib copied to: /home/runner/work/faststore/faststore/packages/core/public/~partytown
5
5
  success - GraphQL schema, types, and optimizations successfully generated 🎉
6
6
  warn - You have enabled experimental feature (scrollRestoration) in next.config.js.
@@ -38,28 +38,28 @@ info - Generating static pages (7/7)
38
38
  info - Finalizing page optimization...
39
39
 
40
40
  Route (pages) Size First Load JS
41
- ┌ ● / 6.23 kB 133 kB
41
+ ┌ ● / 6.23 kB 135 kB
42
42
  ├ └ css/cf062feb79245123.css 8.38 kB
43
43
  ├ /_app 0 B 83.7 kB
44
44
  ├ ● /[...slug] 7.35 kB 145 kB
45
45
  ├ └ css/0dc997f9da3027b7.css 8.8 kB
46
- ├ ● /[slug]/p 8.02 kB 135 kB
47
- ├ └ css/f2ab72459fcdabcc.css 5.4 kB
48
- ├ ○ /404 1.19 kB 128 kB
49
- ├ ● /500 1.21 kB 128 kB
50
- ├ ● /account 677 B 128 kB
46
+ ├ ● /[slug]/p 5.6 kB 135 kB
47
+ ├ └ css/e67c73ff7fbc8c54.css 4.42 kB
48
+ ├ ○ /404 1.19 kB 130 kB
49
+ ├ ● /500 1.21 kB 130 kB
50
+ ├ ● /account 676 B 130 kB
51
51
  ├ λ /api/graphql 0 B 83.7 kB
52
52
  ├ λ /api/health/live 0 B 83.7 kB
53
53
  ├ λ /api/health/ready 0 B 83.7 kB
54
54
  ├ λ /api/preview 0 B 83.7 kB
55
- ├ ● /checkout 662 B 128 kB
56
- ├ ● /login 1.14 kB 128 kB
55
+ ├ ● /checkout 660 B 130 kB
56
+ ├ ● /login 1.14 kB 130 kB
57
57
  └ ● /s 1.38 kB 139 kB
58
58
  + First Load JS shared by all 86.8 kB
59
59
  ├ chunks/framework-dfd14d7ce6600b03.js 45.3 kB
60
60
  ├ chunks/main-e4e873ee741162eb.js 24.2 kB
61
61
  ├ chunks/pages/_app-30b9666307e4b3b1.js 12.1 kB
62
- ├ chunks/webpack-3382def1b25b17f8.js 2.23 kB
62
+ ├ chunks/webpack-41b4f40c5b7ff474.js 2.24 kB
63
63
  └ css/5d1f64b61ea581f4.css 3.05 kB
64
64
 
65
65
  λ (Server) server-side renders at runtime (uses getInitialProps or getServerSideProps)
@@ -1,23 +1,23 @@
1
1
  $ jest
2
- PASS test/server/index.test.ts (21.563 s)
2
+ PASS test/server/index.test.ts (21.809 s)
3
3
  FastStore GraphQL Layer
4
4
  @faststore/api
5
- ✓ should return a valid GraphQL schema (11 ms)
6
- ✓ should return a valid GraphQL schema contain all expected types (6 ms)
7
- ✓ should return a valid GraphQL schema contain all expected queries (1 ms)
8
- ✓ should return a valid GraphQL schema contain all expected mutations
5
+ ✓ should return a valid GraphQL schema (9 ms)
6
+ ✓ should return a valid GraphQL schema contain all expected types (22 ms)
7
+ ✓ should return a valid GraphQL schema contain all expected queries (2 ms)
8
+ ✓ should return a valid GraphQL schema contain all expected mutations (1 ms)
9
9
  VTEX API Extension
10
10
  ✓ getTypeDefsFromFolder function should return an Array (9 ms)
11
11
  Third Party API Extension
12
12
  ✓ getTypeDefsFromFolder function should return an Array (7 ms)
13
13
  Final Schema after merging
14
- ✓ should return a valid merged GraphQL schema (44 ms)
14
+ ✓ should return a valid merged GraphQL schema (43 ms)
15
15
  Envelop
16
- ✓ should exist with its plugins (42 ms)
17
- ✓ should handle options and execute (133 ms)
16
+ ✓ should exist with its plugins (62 ms)
17
+ ✓ should handle options and execute (582 ms)
18
18
 
19
19
  Test Suites: 1 passed, 1 total
20
20
  Tests: 9 passed, 9 total
21
21
  Snapshots: 0 total
22
- Time: 21.631 s
22
+ Time: 21.89 s
23
23
  Ran all test suites.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@faststore/core",
3
- "version": "2.2.58",
3
+ "version": "2.2.60",
4
4
  "license": "MIT",
5
5
  "repository": "vtex/faststore",
6
6
  "browserslist": "supports es6-module and not dead",
@@ -123,5 +123,5 @@
123
123
  "node": "18.19.0",
124
124
  "yarn": "1.19.1"
125
125
  },
126
- "gitHead": "c91481382943a5f0ac98414f4aa287179688a978"
126
+ "gitHead": "3f6c910b19d4eed8af883e32e45137f6aa126a81"
127
127
  }
package/public/icons.svg CHANGED
@@ -54,7 +54,9 @@
54
54
  <symbol id="Stripe" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 34 24"> <path d="M0 3C0 1.34315 1.34315 0 3 0H31C32.6569 0 34 1.34315 34 3V21C34 22.6569 32.6569 24 31 24H3C1.34315 24 0 22.6569 0 21V3Z" fill="white" /> <rect x="0.5" y="0.5" width="33" height="23" rx="2.5" stroke="#fff" /> <path fillRule="evenodd" clipRule="evenodd" d="M18.2682 8.14192L16.541 8.52349V7.08202L18.2682 6.70752V8.14192ZM21.8599 8.94038C21.1856 8.94038 20.7521 9.26542 20.5113 9.49153L20.4218 9.05344H18.908V17.2924L20.6282 16.9179L20.6351 14.9183C20.8828 15.102 21.2475 15.3634 21.853 15.3634C23.0847 15.3634 24.2063 14.3459 24.2063 12.106C24.1995 10.0568 23.0641 8.94038 21.8599 8.94038ZM21.4471 13.8089C21.0411 13.8089 20.8002 13.6605 20.6351 13.4768L20.6282 10.8553C20.8071 10.6504 21.0548 10.509 21.4471 10.509C22.0732 10.509 22.5067 11.2298 22.5067 12.1554C22.5067 13.1023 22.0801 13.8089 21.4471 13.8089ZM29.6286 12.1766C29.6286 10.3677 28.7754 8.94038 27.1446 8.94038C25.5069 8.94038 24.5161 10.3677 24.5161 12.1625C24.5161 14.2894 25.6858 15.3634 27.3648 15.3634C28.1836 15.3634 28.8029 15.1726 29.2708 14.9041V13.4909C28.8029 13.7312 28.2662 13.8795 27.585 13.8795C26.9175 13.8795 26.3257 13.6393 26.2501 12.8055H29.6148C29.6148 12.7666 29.6173 12.6782 29.6202 12.5763L29.6202 12.5761C29.624 12.4377 29.6286 12.2743 29.6286 12.1766ZM26.2294 11.5054C26.2294 10.7069 26.7042 10.3748 27.1377 10.3748C27.5574 10.3748 28.0047 10.7069 28.0047 11.5054H26.2294ZM16.5409 9.06052H18.2681V15.2433H16.5409V9.06052ZM14.58 9.06051L14.6901 9.5834C15.0961 8.82026 15.9012 8.97572 16.1214 9.06051V10.6857C15.908 10.608 15.22 10.509 14.814 11.0531V15.2433H13.0937V9.06051H14.58ZM11.2495 7.52717L9.57056 7.8946L9.56368 13.5545C9.56368 14.6003 10.3275 15.3705 11.3459 15.3705C11.9101 15.3705 12.323 15.2645 12.55 15.1373V13.7029C12.3298 13.7947 11.2426 14.1198 11.2426 13.074V10.5656H12.55V9.0605H11.2426L11.2495 7.52717ZM7.18295 10.4737C6.81826 10.4737 6.59807 10.5797 6.59807 10.8553C6.59807 11.1562 6.97702 11.2885 7.44715 11.4527C8.21358 11.7204 9.22234 12.0728 9.2266 13.3779C9.2266 14.6427 8.24262 15.3705 6.81138 15.3705C6.21961 15.3705 5.5728 15.2504 4.93287 14.9677V13.286C5.51087 13.611 6.24026 13.8513 6.81138 13.8513C7.19671 13.8513 7.47195 13.7453 7.47195 13.4203C7.47195 13.087 7.06116 12.9346 6.56522 12.7507C5.80994 12.4706 4.85718 12.1173 4.85718 10.9401C4.85718 9.6894 5.78611 8.9404 7.18295 8.9404C7.75407 8.9404 8.31831 9.03225 8.88944 9.26543V10.926C8.36648 10.6362 7.70591 10.4737 7.18295 10.4737Z" fill="#6461FC" /> </symbol>
55
55
  <symbol id="Tag" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 256 256"><path fill="none" d="M0 0h256v256H0z"/><path d="M122.7 25.9 42 42l-16.1 80.7a8 8 0 0 0 2.2 7.2l104.4 104.4a7.9 7.9 0 0 0 11.3 0l90.5-90.5a7.9 7.9 0 0 0 0-11.3L129.9 28.1a8 8 0 0 0-7.2-2.2Z" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="16"/><circle cx="84" cy="84" r="12" fill="currentColor"/></symbol>
56
56
  <symbol id="Truck" xmlns="http://www.w3.org/2000/svg" fill="currentColor" viewBox="0 0 256 256"><rect width="256" height="256" fill="none"></rect><path d="M240,120H176V80h42.58374a8,8,0,0,1,7.42781,5.02887Z" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"></path><line x1="16" y1="144" x2="176" y2="144" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"></line><circle cx="188" cy="192" r="24" fill="none" stroke="currentColor" stroke-miterlimit="10"></circle><circle cx="68" cy="192" r="24" fill="none" stroke="currentColor" stroke-miterlimit="10"></circle><line x1="164" y1="192" x2="92" y2="192" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"></line><path d="M44,192H24a8,8,0,0,1-8-8V72a8,8,0,0,1,8-8H176V171.21508" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"></path><path d="M176,171.21508V120h64v64a8,8,0,0,1-8,8H212" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"></path></symbol>
57
- <symbol id="Twitter" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 25 22"> <path fillRule="evenodd" clipRule="evenodd" d="M22.3622 5.78508C22.3713 6.01826 22.3743 6.25134 22.3743 6.48452C22.3743 13.5541 17.4012 21.7156 8.30706 21.7156C5.51351 21.7156 2.91591 20.8252 0.727295 19.3095C1.11417 19.3519 1.50708 19.3838 1.90602 19.3838C4.22225 19.3838 6.3556 18.5251 8.04781 17.0836C5.88432 17.0518 4.05746 15.4938 3.4274 13.3739C3.72987 13.4375 4.04136 13.4694 4.35991 13.4694C4.80909 13.4694 5.2452 13.4059 5.66323 13.2787C3.39924 12.7912 1.69399 10.629 1.69399 8.03221C1.69399 8.00041 1.69399 7.98975 1.69399 7.96855C2.36123 8.36072 3.12492 8.60438 3.93585 8.63617C2.60741 7.67165 1.73416 6.02884 1.73416 4.17399C1.73416 3.19887 1.97734 2.27671 2.40542 1.48178C4.84324 4.7251 8.48795 6.85555 12.5969 7.07814C12.5125 6.68597 12.4693 6.27271 12.4693 5.85934C12.4693 2.90219 14.683 0.506744 17.4142 0.506744C18.8361 0.506744 20.1204 1.15338 21.0217 2.19209C22.1502 1.95891 23.2073 1.51378 24.164 0.899035C23.7932 2.14973 23.0104 3.19882 21.9874 3.85597C22.9883 3.72878 23.9429 3.44282 24.8282 3.01886C24.164 4.08937 23.3279 5.03254 22.3622 5.78508Z" fill="currentColor" /> </symbol>
57
+ <symbol id="Twitter" xmlns="http://www.w3.org/2000/svg" fill="currentColor" viewBox="0 0 32 32">
58
+ <path d="M3.97204 3.72754L14.0811 17.2655L3.9082 28.2725H6.19772L15.1041 18.6358L22.3002 28.2725H30.0915L19.4136 13.973L28.8825 3.72754H26.593L18.3907 12.6028L11.7633 3.72754H3.97204ZM7.33894 5.41665H10.9183L26.7241 26.5831H23.1447L7.33894 5.41665Z" fill="currentColor"/>
59
+ </symbol>
58
60
  <symbol id="User" xmlns="http://www.w3.org/2000/svg" fill="currentColor" viewBox="0 0 256 256"><rect width="256" height="256" fill="none"></rect><circle cx="128" cy="96" r="64" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"></circle><path d="M30.989,215.99064a112.03731,112.03731,0,0,1,194.02311.002" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"></path></symbol>
59
61
  <symbol id="Visa" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 34 24"> <path d="M0 3C0 1.34315 1.34315 0 3 0H31C32.6569 0 34 1.34315 34 3V21C34 22.6569 32.6569 24 31 24H3C1.34315 24 0 22.6569 0 21V3Z" fill="white" /> <rect x="0.5" y="0.5" width="33" height="23" rx="2.5" stroke="#fff" /> <path fillRule="evenodd" clipRule="evenodd" d="M10.7503 15.8582H8.69056L7.146 9.79237C7.07269 9.51334 6.91703 9.26666 6.68806 9.1504C6.11664 8.85823 5.48696 8.6257 4.80005 8.50843V8.27489H8.11813C8.57607 8.27489 8.91953 8.6257 8.97677 9.03313L9.77817 13.4086L11.8369 8.27489H13.8394L10.7503 15.8582ZM14.9843 15.8582H13.039L14.6408 8.27489H16.5861L14.9843 15.8582ZM19.1028 10.3757C19.16 9.96728 19.5035 9.73374 19.9042 9.73374C20.5338 9.6751 21.2197 9.79238 21.7922 10.0835L22.1356 8.45081C21.5632 8.21727 20.9335 8.1 20.3621 8.1C18.4741 8.1 17.1003 9.15041 17.1003 10.6082C17.1003 11.7173 18.0734 12.2996 18.7603 12.6504C19.5035 13.0002 19.7897 13.2337 19.7324 13.5835C19.7324 14.1082 19.16 14.3418 18.5886 14.3418C17.9017 14.3418 17.2147 14.1669 16.5861 13.8747L16.2426 15.5085C16.9295 15.7996 17.6727 15.9169 18.3596 15.9169C20.4766 15.9745 21.7922 14.9251 21.7922 13.35C21.7922 11.3665 19.1028 11.2502 19.1028 10.3757ZM28.6 15.8582L27.0555 8.27489H25.3965C25.053 8.27489 24.7095 8.50843 24.5951 8.85823L21.7349 15.8582H23.7374L24.1371 14.7502H26.5976L26.8265 15.8582H28.6ZM25.6827 10.3171L26.2541 13.1751H24.6523L25.6827 10.3171Z" fill="#172B85" /> </symbol>
60
62
  <symbol id="X" xmlns="http://www.w3.org/2000/svg" fill="currentColor" viewBox="0 0 256 256"><rect width="256" height="256" fill="none"></rect><line x1="200" y1="56" x2="56" y2="200" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"></line><line x1="200" y1="200" x2="56" y2="56" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"></line></symbol>
@@ -1,7 +1,5 @@
1
1
  import { memo } from 'react'
2
2
 
3
- import Breadcrumb from 'src/components/ui/Breadcrumb'
4
-
5
3
  import Section from '../Section'
6
4
 
7
5
  import styles from './section.module.scss'
@@ -12,6 +10,7 @@ import {
12
10
  isPLP,
13
11
  usePage,
14
12
  } from 'src/sdk/overrides/PageProvider'
13
+ import { useOverrideComponents } from 'src/sdk/overrides/OverrideContext'
15
14
 
16
15
  interface BreadcrumbSectionProps {
17
16
  icon: string
@@ -19,6 +18,8 @@ interface BreadcrumbSectionProps {
19
18
  }
20
19
 
21
20
  function BreadcrumbSection({ ...otherProps }: BreadcrumbSectionProps) {
21
+ const { Breadcrumb } = useOverrideComponents<'Breadcrumb'>()
22
+
22
23
  const context = usePage<PDPContext | PLPContext>()
23
24
  const title = isPLP(context)
24
25
  ? context?.data?.collection?.seo?.title
@@ -33,7 +34,7 @@ function BreadcrumbSection({ ...otherProps }: BreadcrumbSectionProps) {
33
34
 
34
35
  return (
35
36
  <Section className={`${styles.section} section-breadcrumb`}>
36
- <Breadcrumb breadcrumbList={breadcrumbList} {...otherProps} />
37
+ <Breadcrumb.Component breadcrumbList={breadcrumbList} {...otherProps} />
37
38
  </Section>
38
39
  )
39
40
  }
@@ -0,0 +1,6 @@
1
+ import { Breadcrumb as UIBreadcrumb, Icon as UIIcon } from '@faststore/ui'
2
+
3
+ export const BreadcrumbDefaultComponents = {
4
+ Breadcrumb: UIBreadcrumb,
5
+ Icon: UIIcon,
6
+ } as const
@@ -0,0 +1,12 @@
1
+ import { override } from 'src/customizations/src/components/overrides/Breadcrumb'
2
+ import { getOverriddenSection } from 'src/sdk/overrides/getOverriddenSection'
3
+ import type { SectionOverrideDefinition } from 'src/typings/overridesDefinition'
4
+
5
+ /**
6
+ * This component exists to support overrides 1.0
7
+ *
8
+ * This allows users to override the default Breadcrumb section present in the Headless CMS
9
+ */
10
+ export const OverriddenDefaultBreadcrumb = getOverriddenSection(
11
+ override as SectionOverrideDefinition<'Breadcrumb'>
12
+ )
@@ -1,5 +1,5 @@
1
1
  import type { ServerCollectionPageQueryQuery } from '@generated/graphql'
2
- import Breadcrumb from 'src/components/sections/Breadcrumb'
2
+ import { OverriddenDefaultBreadcrumb as Breadcrumb } from 'src/components/sections/Breadcrumb/OverriddenDefaultBreadcrumb'
3
3
  import { OverriddenDefaultHero as Hero } from 'src/components/sections/Hero/OverriddenDefaultHero'
4
4
  import ProductGallery from 'src/components/sections/ProductGallery'
5
5
  import { OverriddenDefaultProductShelf as ProductShelf } from 'src/components/sections/ProductShelf/OverriddenDefaultProductShelf'
@@ -1,7 +1,7 @@
1
1
  import { useSearch } from '@faststore/sdk'
2
2
  import type { ComponentType } from 'react'
3
3
 
4
- import Breadcrumb from 'src/components/sections/Breadcrumb'
4
+ import { OverriddenDefaultBreadcrumb as Breadcrumb } from 'src/components/sections/Breadcrumb/OverriddenDefaultBreadcrumb'
5
5
  import ProductGallery from 'src/components/sections/ProductGallery'
6
6
  import { ITEMS_PER_PAGE } from 'src/constants'
7
7
  import CUSTOM_COMPONENTS from 'src/customizations/src/components'
@@ -3,10 +3,7 @@ import { memo } from 'react'
3
3
 
4
4
  import Link from 'src/components/ui/Link'
5
5
 
6
- import {
7
- Breadcrumb as BreadcrumbWrapper,
8
- Icon,
9
- } from 'src/components/sections/Breadcrumb/Overrides'
6
+ import { useOverrideComponents } from 'src/sdk/overrides/OverrideContext'
10
7
 
11
8
  export interface BreadcrumbProps extends UIBreadcrumbProps {
12
9
  icon: string
@@ -14,36 +11,41 @@ export interface BreadcrumbProps extends UIBreadcrumbProps {
14
11
  }
15
12
 
16
13
  const Breadcrumb = ({
17
- icon = Icon.props.name ?? 'Home',
14
+ icon,
18
15
  alt = 'Go to homepage',
19
16
  ...otherProps
20
- }: BreadcrumbProps) => (
21
- <BreadcrumbWrapper.Component
22
- homeLink={
23
- <Link
24
- data-fs-breadcrumb-link
25
- data-fs-breadcrumb-link-home
26
- aria-label={alt}
27
- href="/"
28
- prefetch={false}
29
- >
30
- <Icon.Component
31
- width={18}
32
- height={18}
33
- weight="bold"
34
- {...Icon.props}
35
- name={icon}
36
- />
37
- </Link>
38
- }
39
- renderLink={({ itemProps: { item: link, name } }) => (
40
- <Link data-fs-breadcrumb-link href={link} prefetch={false}>
41
- {name}
42
- </Link>
43
- )}
44
- {...BreadcrumbWrapper.props}
45
- {...otherProps}
46
- />
47
- )
17
+ }: BreadcrumbProps) => {
18
+ const { Breadcrumb: BreadcrumbWrapper, Icon } =
19
+ useOverrideComponents<'Breadcrumb'>()
20
+
21
+ return (
22
+ <BreadcrumbWrapper.Component
23
+ homeLink={
24
+ <Link
25
+ data-fs-breadcrumb-link
26
+ data-fs-breadcrumb-link-home
27
+ aria-label={alt}
28
+ href="/"
29
+ prefetch={false}
30
+ >
31
+ <Icon.Component
32
+ width={18}
33
+ height={18}
34
+ weight="bold"
35
+ {...Icon.props}
36
+ name={icon ?? Icon.props.name ?? 'Home'}
37
+ />
38
+ </Link>
39
+ }
40
+ renderLink={({ itemProps: { item: link, name } }) => (
41
+ <Link data-fs-breadcrumb-link href={link} prefetch={false}>
42
+ {name}
43
+ </Link>
44
+ )}
45
+ {...BreadcrumbWrapper.props}
46
+ {...otherProps}
47
+ />
48
+ )
49
+ }
48
50
 
49
51
  export default memo(Breadcrumb)
@@ -13,7 +13,7 @@ import type {
13
13
  import RenderSections from 'src/components/cms/RenderSections'
14
14
  import BannerNewsletter from 'src/components/sections/BannerNewsletter/BannerNewsletter'
15
15
  import { OverriddenDefaultBannerText as BannerText } from 'src/components/sections/BannerText/OverriddenDefaultBannerText'
16
- import Breadcrumb from 'src/components/sections/Breadcrumb'
16
+ import { OverriddenDefaultBreadcrumb as Breadcrumb } from 'src/components/sections/Breadcrumb/OverriddenDefaultBreadcrumb'
17
17
  import { OverriddenDefaultCrossSellingShelf as CrossSellingShelf } from 'src/components/sections/CrossSellingShelf/OverriddenDefaultCrossSellingShelf'
18
18
  import { OverriddenDefaultProductDetails as ProductDetails } from 'src/components/sections/ProductDetails/OverriddenDefaultProductDetails'
19
19
  import CUSTOM_COMPONENTS from 'src/customizations/src/components'
@@ -1,5 +1,6 @@
1
1
  import Alert from '../../components/sections/Alert'
2
2
  import BannerText from '../../components/sections/BannerText'
3
+ import Breadcrumb from '../../components/sections/Breadcrumb'
3
4
  import Hero from '../../components/sections/Hero'
4
5
  import ProductShelf from '../../components/sections/ProductShelf'
5
6
  import CrossSellingShelf from '../../components/sections/CrossSellingShelf'
@@ -9,6 +10,7 @@ import type { DefaultSectionComponentsDefinitions } from '../../typings/override
9
10
  import type { SectionsOverrides } from '../../typings/overrides'
10
11
  import { AlertDefaultComponents } from '../../components/sections/Alert/DefaultComponents'
11
12
  import { BannerTextDefaultComponents } from '../../components/sections/BannerText/DefaultComponents'
13
+ import { BreadcrumbDefaultComponents } from 'src/components/sections/Breadcrumb/DefaultComponents'
12
14
  import { CrossSellingShelfDefaultComponents } from 'src/components/sections/CrossSellingShelf/DefaultComponents'
13
15
  import { HeroDefaultComponents } from '../../components/sections/Hero/DefaultComponents'
14
16
  import { ProductShelfDefaultComponents } from '../../components/sections/ProductShelf/DefaultComponents'
@@ -17,6 +19,7 @@ import { ProductDetailsDefaultComponents } from '../../components/sections/Produ
17
19
  export const Sections = {
18
20
  Alert,
19
21
  BannerText,
22
+ Breadcrumb,
20
23
  CrossSellingShelf,
21
24
  Hero,
22
25
  ProductDetails,
@@ -31,6 +34,7 @@ export const DefaultComponents: Partial<
31
34
  > = {
32
35
  Alert: AlertDefaultComponents,
33
36
  BannerText: BannerTextDefaultComponents,
37
+ Breadcrumb: BreadcrumbDefaultComponents,
34
38
  CrossSellingShelf: CrossSellingShelfDefaultComponents,
35
39
  Hero: HeroDefaultComponents,
36
40
  ProductDetails: ProductDetailsDefaultComponents,
@@ -49,7 +49,13 @@ export type SectionOverride = {
49
49
  /** TODO: every use of this type should be replaced by SectionsOverrides after all sections are supported */
50
50
  export type SupportedSectionsOverridesV2 = Pick<
51
51
  SectionsOverrides,
52
- 'Alert' | 'BannerText' | 'CrossSellingShelf' | 'Hero' | 'ProductShelf' | 'ProductDetails'
52
+ | 'Alert'
53
+ | 'BannerText'
54
+ | 'Breadcrumb'
55
+ | 'CrossSellingShelf'
56
+ | 'Hero'
57
+ | 'ProductShelf'
58
+ | 'ProductDetails'
53
59
  >
54
60
 
55
61
  /**