@faststore/core 3.86.4 → 3.88.0
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/.next/BUILD_ID +1 -1
- package/.next/build-manifest.json +115 -116
- package/.next/cache/.tsbuildinfo +1 -1
- package/.next/cache/config.json +3 -3
- package/.next/cache/webpack/client-production/0.pack +0 -0
- package/.next/cache/webpack/client-production/index.pack +0 -0
- package/.next/cache/webpack/server-production/0.pack +0 -0
- package/.next/cache/webpack/server-production/index.pack +0 -0
- package/.next/prerender-manifest.js +1 -1
- package/.next/prerender-manifest.json +1 -1
- package/.next/react-loadable-manifest.json +178 -169
- package/.next/routes-manifest.json +1 -1
- package/.next/server/chunks/3006.js +1 -1
- package/.next/server/chunks/3945.js +1 -1
- package/.next/server/chunks/6870.js +1 -0
- package/.next/server/chunks/83.js +1 -1
- package/.next/server/chunks/8474.js +3 -3
- package/.next/server/chunks/948.js +1 -1
- package/.next/server/chunks/9563.js +2 -2
- package/.next/server/chunks/9630.js +1 -1
- package/.next/server/chunks/UIBannerText.js +1 -1
- package/.next/server/functions-config-manifest.json +1 -1
- package/.next/server/middleware-build-manifest.js +1 -1
- package/.next/server/middleware-react-loadable-manifest.js +1 -1
- package/.next/server/pages/404.js.nft.json +1 -1
- package/.next/server/pages/500.js.nft.json +1 -1
- package/.next/server/pages/[...slug].js +1 -1
- package/.next/server/pages/[...slug].js.nft.json +1 -1
- package/.next/server/pages/[slug]/p.js +1 -1
- package/.next/server/pages/[slug]/p.js.nft.json +1 -1
- package/.next/server/pages/_app.js.nft.json +1 -1
- package/.next/server/pages/_document.js.nft.json +1 -1
- package/.next/server/pages/_error.js.nft.json +1 -1
- package/.next/server/pages/api/graphql.js +2 -2
- package/.next/server/pages/api/graphql.js.nft.json +1 -1
- package/.next/server/pages/api/health/live.js.nft.json +1 -1
- package/.next/server/pages/api/health/ready.js.nft.json +1 -1
- package/.next/server/pages/api/preview.js.nft.json +1 -1
- package/.next/server/pages/checkout.js.nft.json +1 -1
- package/.next/server/pages/en-US/404.html +1 -1
- package/.next/server/pages/en-US/500.html +1 -1
- package/.next/server/pages/en-US/checkout.html +1 -1
- package/.next/server/pages/en-US/login.html +1 -1
- package/.next/server/pages/en-US/s.html +1 -1
- package/.next/server/pages/en-US.html +1 -1
- package/.next/server/pages/index.js.nft.json +1 -1
- package/.next/server/pages/login.js.nft.json +1 -1
- package/.next/server/pages/pvt/account/403.js.nft.json +1 -1
- package/.next/server/pages/pvt/account/404.js.nft.json +1 -1
- package/.next/server/pages/pvt/account/[...unknown].js.nft.json +1 -1
- package/.next/server/pages/pvt/account/orders/[id].js.nft.json +1 -1
- package/.next/server/pages/pvt/account/orders.js.nft.json +1 -1
- package/.next/server/pages/pvt/account/profile.js.nft.json +1 -1
- package/.next/server/pages/pvt/account/security.js.nft.json +1 -1
- package/.next/server/pages/pvt/account/user-details.js.nft.json +1 -1
- package/.next/server/pages/pvt/account.js.nft.json +1 -1
- package/.next/server/pages/s.js.nft.json +1 -1
- package/.next/server/pages-manifest.json +1 -1
- package/.next/static/JaRUyeLgqhw17hCxdW6B5/_buildManifest.js +1 -0
- package/.next/static/chunks/1208-9118a8f14ecf05c8.js +8 -0
- package/.next/static/chunks/1841.b3a98a2a1886b09c.js +1 -0
- package/.next/static/chunks/2284.17a3e4c3af092981.js +1 -0
- package/.next/static/chunks/2500.02f018a354c612fb.js +1 -0
- package/.next/static/chunks/294.ac8fb1e24849b0c4.js +1 -0
- package/.next/static/chunks/3155.f521c771a8c355a5.js +1 -0
- package/.next/static/chunks/3399.b1311b661da6b316.js +1 -0
- package/.next/static/chunks/3483.ef53d632a763da3f.js +1 -0
- package/.next/static/chunks/349.235b18ceb82aa256.js +1 -0
- package/.next/static/chunks/3836.5a76d717d95d1f2d.js +1 -0
- package/.next/static/chunks/4799.46dca5f8076f9448.js +1 -0
- package/.next/static/chunks/4803.c1405eca2ccf78c8.js +1 -0
- package/.next/static/chunks/5796.4351370494d8b8b6.js +1 -0
- package/.next/static/chunks/5859.cf66c492751f5680.js +1 -0
- package/.next/static/chunks/6031-a7dfc540189ff57c.js +28 -0
- package/.next/static/chunks/6393.e4b26fee060438d6.js +1 -0
- package/.next/static/chunks/6700.a72869377e81146c.js +1 -0
- package/.next/static/chunks/6789.856de844108ee5da.js +1 -0
- package/.next/static/chunks/6852-97b424676696b449.js +1 -0
- package/.next/static/chunks/7191-0063121dcadf6b82.js +1 -0
- package/.next/static/chunks/7351.2d0d3a1fb538d97a.js +1 -0
- package/.next/static/chunks/7692.a352cce6d744fa8b.js +1 -0
- package/.next/static/chunks/7861.7f9f1a124a43da30.js +6 -0
- package/.next/static/chunks/8068.43663fb64762f7b8.js +1 -0
- package/.next/static/chunks/83.7723de7199118a99.js +1 -0
- package/.next/static/chunks/8325.dabe9aa22eaadeed.js +1 -0
- package/.next/static/chunks/8587.53c8ce185ed1a2cb.js +1 -0
- package/.next/static/chunks/9173-2dc082a086a959c3.js +1 -0
- package/.next/static/chunks/9399.132e63584d15075f.js +1 -0
- package/.next/static/chunks/941.417f354fd61bae91.js +1 -0
- package/.next/static/chunks/9465.8754a1b3cd5c4c83.js +1 -0
- package/.next/static/chunks/9714.2e2c2f0eb526ba23.js +1 -0
- package/.next/static/chunks/9781.a221de71d6b10ba0.js +1 -0
- package/.next/static/chunks/9909.787576b171184aa5.js +1 -0
- package/.next/static/chunks/BannerNewsletter.840a840b7a616260.js +1 -0
- package/.next/static/chunks/BannerText.b675fb19df87b7cb.js +1 -0
- package/.next/static/chunks/ButtonSignIn.308336a54a58f436.js +1 -0
- package/.next/static/chunks/CartItem.afa42120880fcb94.js +1 -0
- package/.next/static/chunks/CartSidebar.71d3ea99611c87a3.js +1 -0
- package/.next/static/chunks/Dropdown.38b48c749bad6b60.js +1 -0
- package/.next/static/chunks/DropdownButton.66fa6b25dddb3a07.js +1 -0
- package/.next/static/chunks/DropdownItem.38b8f5a07c7f422a.js +1 -0
- package/.next/static/chunks/DropdownMenu.48b11521a24c6efd.js +1 -0
- package/.next/static/chunks/EmptyCart.320e2f94a0d5e6b1.js +1 -0
- package/.next/static/chunks/FilterSkeleton.7ab99e28f92341c9.js +1 -0
- package/.next/static/chunks/Footer.63a7682a81a96f8e.js +1 -0
- package/.next/static/chunks/Gift.9d0570cbe866077f.js +1 -0
- package/.next/static/chunks/Newsletter.dbf35a8ea6d2067e.js +1 -0
- package/.next/static/chunks/OrderSummary.f9adad5622605046.js +1 -0
- package/.next/static/chunks/PreviewTag.f4f0c8710a7bcad9.js +1 -0
- package/.next/static/chunks/ProductShelf.632b93b2c0e1ca9a.js +1 -0
- package/.next/static/chunks/ProductTiles.778c483734598736.js +1 -0
- package/.next/static/chunks/RegionModal.2a8f6662c3a64d2a.js +1 -0
- package/.next/static/chunks/RegionSlider.bd14bfba15836ea0.js +1 -0
- package/.next/static/chunks/ScrollToTopButton.c15431f2e8bb93ef.js +1 -0
- package/.next/static/chunks/Toast.f583e19c7fcb2527.js +1 -0
- package/.next/static/chunks/UIBannerText.6715ba9ae0b6065c.js +1 -0
- package/.next/static/chunks/UISKUMatrixSidebar.072f0b5bf8e172f6.js +1 -0
- package/.next/static/chunks/UIToast.1ac644a9d787435c.js +1 -0
- package/.next/static/chunks/framework-d514426edf885c68.js +33 -0
- package/.next/static/chunks/main-595f5e3b626b9fff.js +1 -0
- package/.next/static/chunks/pages/404-4b3f1e22c77f849a.js +1 -0
- package/.next/static/chunks/pages/500-bb2de0c11524b2b8.js +1 -0
- package/.next/static/chunks/pages/[...slug]-8c829cc01fdb1a38.js +1 -0
- package/.next/static/chunks/pages/[slug]/p-4900eb3e616324c7.js +1 -0
- package/.next/static/chunks/pages/_app-8b7d8e9c9021b0cf.js +1 -0
- package/.next/static/chunks/pages/_error-2b0148be56a716e9.js +1 -0
- package/.next/static/chunks/pages/checkout-dc07d72b3514c83d.js +1 -0
- package/.next/static/chunks/pages/index-8e36d989396a7544.js +1 -0
- package/.next/static/chunks/pages/login-e97ef92769456bf6.js +1 -0
- package/.next/static/chunks/pages/pvt/account/403-e4315ace8609a7ff.js +1 -0
- package/.next/static/chunks/pages/pvt/account/404-1e450ae9476bbcaa.js +1 -0
- package/.next/static/chunks/pages/pvt/account/[...unknown]-f80f645594d2740c.js +1 -0
- package/.next/static/chunks/pages/pvt/account/orders/[id]-a3e46af1be9816a4.js +1 -0
- package/.next/static/chunks/pages/pvt/account/orders-db7a364869130660.js +1 -0
- package/.next/static/chunks/pages/pvt/account/profile-e8a7ad7a7d7c60fb.js +1 -0
- package/.next/static/chunks/pages/pvt/account/security-cad4e4260be8b0cd.js +1 -0
- package/.next/static/chunks/pages/pvt/account/user-details-401f6f6e4ce4b9ce.js +1 -0
- package/.next/static/chunks/pages/pvt/account-65fefcc699344bdb.js +1 -0
- package/.next/static/chunks/pages/s-5319ae49907c3391.js +1 -0
- package/.next/static/chunks/webpack-50869061879531a0.js +1 -0
- package/.next/static/css/175fa823349dc534.css +1 -0
- package/.next/static/css/{18e4be87b97035da.css → 45fac71f6411cceb.css} +1 -1
- package/.next/static/css/f63d693715093ed1.css +1 -0
- package/.next/trace +137 -136
- package/.turbo/turbo-build.log +29 -30
- package/.turbo/turbo-test.log +5 -5
- package/@generated/graphql.ts +3 -3
- package/@generated/schema.graphql +1 -1
- package/CHANGELOG.md +12 -0
- package/cms/faststore/content-types.json +22 -0
- package/package.json +13 -5
- package/src/components/search/Filter/FilterDesktop.tsx +8 -10
- package/src/components/search/Filter/FilterSlider.tsx +9 -10
- package/src/components/sections/Newsletter/section.module.scss +2 -0
- package/src/components/ui/Newsletter/NewsletterAddendum.tsx +22 -73
- package/src/components/ui/RichText/RichText.tsx +202 -0
- package/src/components/ui/RichText/index.ts +2 -0
- package/src/sdk/deliveryPromise/index.ts +3 -0
- package/src/sdk/deliveryPromise/useDeliveryPromise.ts +124 -92
- package/src/utils/globalSettings.ts +5 -0
- package/.next/server/chunks/8640.js +0 -1
- package/.next/static/-2c_JOi0FOzMdeFIuzNgV/_buildManifest.js +0 -1
- package/.next/static/chunks/1417.feb3146f627742b7.js +0 -1
- package/.next/static/chunks/2284.6e01b30c38bb74fd.js +0 -1
- package/.next/static/chunks/294.d57cdd543091b533.js +0 -1
- package/.next/static/chunks/3155.8ff6efc44151971f.js +0 -1
- package/.next/static/chunks/3166-b1ac316afe18625b.js +0 -1
- package/.next/static/chunks/3399.15d4dbadc57c3f42.js +0 -1
- package/.next/static/chunks/3483.4aa5b8186f9288b8.js +0 -1
- package/.next/static/chunks/353.3e74b28c8ca649a2.js +0 -1
- package/.next/static/chunks/3836.c7f8d69a151682bc.js +0 -1
- package/.next/static/chunks/4799.685d618907cf7026.js +0 -1
- package/.next/static/chunks/4803.74cf987971db6d93.js +0 -1
- package/.next/static/chunks/4836.ef87204971e182f4.js +0 -1
- package/.next/static/chunks/5796.31fc3b14839d2bc0.js +0 -1
- package/.next/static/chunks/6031-18797e7ebff417ab.js +0 -28
- package/.next/static/chunks/6393.4ad395e06f7dbbc6.js +0 -1
- package/.next/static/chunks/6700.ddae2aa02d2dd401.js +0 -1
- package/.next/static/chunks/6789.c37c2ec891333684.js +0 -1
- package/.next/static/chunks/7026.9ab6a9b610831b85.js +0 -1
- package/.next/static/chunks/7191-d39597fc204602cb.js +0 -1
- package/.next/static/chunks/7351.8ef7b6b1d6e1505a.js +0 -1
- package/.next/static/chunks/7692.d434a8499fb2aa03.js +0 -1
- package/.next/static/chunks/7861.3fe27a385fea2fb7.js +0 -6
- package/.next/static/chunks/8068.374d1641856d8b1b.js +0 -1
- package/.next/static/chunks/83.730576d7ded8dfe2.js +0 -1
- package/.next/static/chunks/8325.40b7331df742c2f5.js +0 -1
- package/.next/static/chunks/8587.1d6d458c9b697351.js +0 -1
- package/.next/static/chunks/9173-188afceabcbccdbb.js +0 -1
- package/.next/static/chunks/9399.6bd7f24a04ccfff4.js +0 -1
- package/.next/static/chunks/941.2a946730a9174ed7.js +0 -1
- package/.next/static/chunks/9666-1bd33f872ad66b42.js +0 -1
- package/.next/static/chunks/9714.68af2d4bf27f560b.js +0 -1
- package/.next/static/chunks/9781.60f28efd7e165f54.js +0 -1
- package/.next/static/chunks/9909.dcc319593a7c09f1.js +0 -1
- package/.next/static/chunks/BannerNewsletter.d91d065d644d15f3.js +0 -1
- package/.next/static/chunks/BannerText.3bc2f0af3687e984.js +0 -1
- package/.next/static/chunks/ButtonSignIn.c9bc322071e80856.js +0 -1
- package/.next/static/chunks/CartItem.d4c2664933f93606.js +0 -1
- package/.next/static/chunks/CartSidebar.e21ad4975e18e6db.js +0 -1
- package/.next/static/chunks/Dropdown.7fe839c5ffce4687.js +0 -1
- package/.next/static/chunks/DropdownButton.47ba6e75ee7435de.js +0 -1
- package/.next/static/chunks/DropdownItem.0b3c39f881ca0832.js +0 -1
- package/.next/static/chunks/DropdownMenu.943b2d11ffa50ff6.js +0 -1
- package/.next/static/chunks/EmptyCart.2fac8149cc511b0d.js +0 -1
- package/.next/static/chunks/FilterSkeleton.2e156182f33d8116.js +0 -1
- package/.next/static/chunks/Footer.0eb7e5cc7bce8103.js +0 -1
- package/.next/static/chunks/Gift.5891ca280b4f0164.js +0 -1
- package/.next/static/chunks/Newsletter.46c9113fa222890a.js +0 -1
- package/.next/static/chunks/OrderSummary.35d859a1e467ad91.js +0 -1
- package/.next/static/chunks/PreviewTag.0b16a5b6ac35ce1c.js +0 -1
- package/.next/static/chunks/ProductShelf.ee5cec2ae121df87.js +0 -1
- package/.next/static/chunks/ProductTiles.2bd64de5bcd5f6d8.js +0 -1
- package/.next/static/chunks/RegionModal.b5edb6ada60d37ec.js +0 -1
- package/.next/static/chunks/RegionSlider.3d9063b0cb6733d9.js +0 -1
- package/.next/static/chunks/ScrollToTopButton.7acc3be2dcad2695.js +0 -1
- package/.next/static/chunks/Toast.c06d4e2e2e7913c5.js +0 -1
- package/.next/static/chunks/UIBannerText.08c65db460bd1695.js +0 -1
- package/.next/static/chunks/UISKUMatrixSidebar.5793df7899038286.js +0 -1
- package/.next/static/chunks/UIToast.55af19d2eba3d8a1.js +0 -1
- package/.next/static/chunks/framework-807b0f81cbc129f0.js +0 -33
- package/.next/static/chunks/main-f658704b53a96ab1.js +0 -1
- package/.next/static/chunks/pages/404-cc5de07438cb53b5.js +0 -1
- package/.next/static/chunks/pages/500-926ab913425651bc.js +0 -1
- package/.next/static/chunks/pages/[...slug]-1e68a914dfca7da9.js +0 -1
- package/.next/static/chunks/pages/[slug]/p-60dd0938ba92424b.js +0 -1
- package/.next/static/chunks/pages/_app-02ac96e27a9cbbb4.js +0 -1
- package/.next/static/chunks/pages/_error-d820b4586477c368.js +0 -1
- package/.next/static/chunks/pages/checkout-b0637ee59b1cdca8.js +0 -1
- package/.next/static/chunks/pages/index-004d6444cfaf59cb.js +0 -1
- package/.next/static/chunks/pages/login-3043634ec00661a8.js +0 -1
- package/.next/static/chunks/pages/pvt/account/403-a1c5772740914141.js +0 -1
- package/.next/static/chunks/pages/pvt/account/404-eaed7a7c92d499ff.js +0 -1
- package/.next/static/chunks/pages/pvt/account/[...unknown]-a8bcdec2e6ed7b0e.js +0 -1
- package/.next/static/chunks/pages/pvt/account/orders/[id]-3bdaf71be192669b.js +0 -1
- package/.next/static/chunks/pages/pvt/account/orders-10475517a29223cb.js +0 -1
- package/.next/static/chunks/pages/pvt/account/profile-449314f16e1c132c.js +0 -1
- package/.next/static/chunks/pages/pvt/account/security-8b024c8877f125d0.js +0 -1
- package/.next/static/chunks/pages/pvt/account/user-details-0caf3ce4cb6df66e.js +0 -1
- package/.next/static/chunks/pages/pvt/account-412a3bb2b0f22dea.js +0 -1
- package/.next/static/chunks/pages/s-c624c961a98a1be0.js +0 -1
- package/.next/static/chunks/webpack-5b7c916f31abc68d.js +0 -1
- package/.next/static/css/37ee6a2c6adab309.css +0 -1
- package/.next/static/css/3d7be7043aee15df.css +0 -1
- package/.next/static/css/fe0bcc13a2b68605.css +0 -1
- /package/.next/static/{-2c_JOi0FOzMdeFIuzNgV → JaRUyeLgqhw17hCxdW6B5}/_ssgManifest.js +0 -0
package/.turbo/turbo-build.log
CHANGED
|
@@ -1,23 +1,23 @@
|
|
|
1
1
|
|
|
2
|
-
> @faststore/core@3.
|
|
2
|
+
> @faststore/core@3.87.0 prebuild /home/runner/work/faststore/faststore/packages/core
|
|
3
3
|
> na run partytown && na run generate
|
|
4
4
|
|
|
5
5
|
|
|
6
|
-
> @faststore/core@3.
|
|
6
|
+
> @faststore/core@3.87.0 partytown /home/runner/work/faststore/faststore/packages/core
|
|
7
7
|
> partytown copylib ./public/~partytown
|
|
8
8
|
|
|
9
9
|
Partytown lib copied to: /home/runner/work/faststore/faststore/packages/core/public/~partytown
|
|
10
10
|
|
|
11
|
-
> @faststore/core@3.
|
|
11
|
+
> @faststore/core@3.87.0 generate /home/runner/work/faststore/faststore/packages/core
|
|
12
12
|
> na run generate:schema && na run generate:codegen && na run format:generated
|
|
13
13
|
|
|
14
14
|
|
|
15
|
-
> @faststore/core@3.
|
|
15
|
+
> @faststore/core@3.87.0 generate:schema /home/runner/work/faststore/faststore/packages/core
|
|
16
16
|
> tsx src/server/generator/generateGraphQLSchemaFile.ts
|
|
17
17
|
|
|
18
18
|
Schema GraphQL file generated successfully
|
|
19
19
|
|
|
20
|
-
> @faststore/core@3.
|
|
20
|
+
> @faststore/core@3.87.0 generate:codegen /home/runner/work/faststore/faststore/packages/core
|
|
21
21
|
> graphql-codegen
|
|
22
22
|
|
|
23
23
|
[STARTED] Parse Configuration
|
|
@@ -37,11 +37,11 @@ Running lifecycle hook "afterStart" scripts...
|
|
|
37
37
|
[CLI] Loading Documents
|
|
38
38
|
[CLI] Generating output
|
|
39
39
|
|
|
40
|
-
> @faststore/core@3.
|
|
40
|
+
> @faststore/core@3.87.0 format:generated /home/runner/work/faststore/faststore/packages/core
|
|
41
41
|
> prettier --write "@generated/**/*.{ts,js,tsx,jsx,json}" --loglevel error
|
|
42
42
|
|
|
43
43
|
|
|
44
|
-
> @faststore/core@3.
|
|
44
|
+
> @faststore/core@3.87.0 build /home/runner/work/faststore/faststore/packages/core
|
|
45
45
|
> next build
|
|
46
46
|
|
|
47
47
|
⚠ No build cache found. Please configure build caching for faster rebuilds. Read more: https://nextjs.org/docs/messages/no-cache
|
|
@@ -73,44 +73,43 @@ Warning: Dynamic Content not found for the page: home. Refer to the Dynamic Cont
|
|
|
73
73
|
Collecting build traces ...
|
|
74
74
|
|
|
75
75
|
Route (pages) Size First Load JS
|
|
76
|
-
┌ ● / 3.
|
|
76
|
+
┌ ● / 3.69 kB 142 kB
|
|
77
77
|
├ └ css/b1806cbafd0c1f81.css 3.06 kB
|
|
78
78
|
├ /_app 0 B 107 kB
|
|
79
|
-
├ ● /[...slug] 2.
|
|
80
|
-
├ ● /[slug]/p
|
|
79
|
+
├ ● /[...slug] 2.49 kB 156 kB
|
|
80
|
+
├ ● /[slug]/p 97.4 kB 236 kB
|
|
81
81
|
├ ├ css/6cd282d958f613bc.css 5.9 kB
|
|
82
|
-
├
|
|
83
|
-
├
|
|
84
|
-
├
|
|
85
|
-
├ ● /500 1.55 kB 139 kB
|
|
82
|
+
├ └ css/175fa823349dc534.css 22 kB
|
|
83
|
+
├ ○ /404 1.57 kB 140 kB
|
|
84
|
+
├ ● /500 1.57 kB 140 kB
|
|
86
85
|
├ λ /api/graphql 0 B 107 kB
|
|
87
86
|
├ λ /api/health/live 0 B 107 kB
|
|
88
87
|
├ λ /api/health/ready 0 B 107 kB
|
|
89
88
|
├ λ /api/preview 0 B 107 kB
|
|
90
|
-
├ ● /checkout
|
|
91
|
-
├ ● /login 1.
|
|
92
|
-
├ λ /pvt/account
|
|
93
|
-
├ ● /pvt/account/[...unknown]
|
|
94
|
-
├ λ /pvt/account/403 2.
|
|
89
|
+
├ ● /checkout 749 B 139 kB
|
|
90
|
+
├ ● /login 1.7 kB 140 kB
|
|
91
|
+
├ λ /pvt/account 247 B 108 kB
|
|
92
|
+
├ ● /pvt/account/[...unknown] 287 B 108 kB
|
|
93
|
+
├ λ /pvt/account/403 2.47 kB 141 kB
|
|
95
94
|
├ └ css/b7bba8fce075688b.css 4.2 kB
|
|
96
|
-
├ λ /pvt/account/404 2.
|
|
95
|
+
├ λ /pvt/account/404 2.16 kB 140 kB
|
|
97
96
|
├ └ css/5347dbc8b71de47d.css 4.25 kB
|
|
98
|
-
├ λ /pvt/account/orders 10.5 kB
|
|
97
|
+
├ λ /pvt/account/orders 10.5 kB 149 kB
|
|
99
98
|
├ └ css/b7fc24e8f1eb011f.css 12.8 kB
|
|
100
99
|
├ λ /pvt/account/orders/[id] 12.2 kB 150 kB
|
|
101
100
|
├ └ css/297be4be3be36ff0.css 12.6 kB
|
|
102
|
-
├ λ /pvt/account/profile 1.
|
|
101
|
+
├ λ /pvt/account/profile 1.81 kB 140 kB
|
|
103
102
|
├ └ css/831a1f72fe4b2d80.css 3.97 kB
|
|
104
|
-
├ λ /pvt/account/security 3.
|
|
103
|
+
├ λ /pvt/account/security 3.79 kB 142 kB
|
|
105
104
|
├ └ css/ec7fdad03808422d.css 5.22 kB
|
|
106
|
-
├ λ /pvt/account/user-details 1.
|
|
105
|
+
├ λ /pvt/account/user-details 1.76 kB 140 kB
|
|
107
106
|
├ └ css/e46393a76c5d93a9.css 4.17 kB
|
|
108
|
-
└ ● /s 3.
|
|
109
|
-
+ First Load JS shared by all
|
|
110
|
-
├ chunks/framework-
|
|
111
|
-
├ chunks/main-
|
|
112
|
-
├ chunks/pages/_app-
|
|
113
|
-
├ chunks/webpack-
|
|
107
|
+
└ ● /s 3.28 kB 157 kB
|
|
108
|
+
+ First Load JS shared by all 111 kB
|
|
109
|
+
├ chunks/framework-d514426edf885c68.js 45.4 kB
|
|
110
|
+
├ chunks/main-595f5e3b626b9fff.js 33.2 kB
|
|
111
|
+
├ chunks/pages/_app-8b7d8e9c9021b0cf.js 25 kB
|
|
112
|
+
├ chunks/webpack-50869061879531a0.js 3.85 kB
|
|
114
113
|
└ css/24a5e8f6808266fe.css 3.53 kB
|
|
115
114
|
|
|
116
115
|
λ (Server) server-side renders at runtime (uses getInitialProps or getServerSideProps)
|
package/.turbo/turbo-test.log
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
|
|
2
|
-
> @faststore/core@3.
|
|
2
|
+
> @faststore/core@3.87.0 test /home/runner/work/faststore/faststore/packages/core
|
|
3
3
|
> jest
|
|
4
4
|
|
|
5
|
-
PASS test/
|
|
6
|
-
PASS test/
|
|
5
|
+
PASS test/server/cms/global.test.ts (27.587 s)
|
|
6
|
+
PASS test/utils/multipleTemplates.test.ts (27.756 s)
|
|
7
7
|
PASS test/server/cms/index.test.ts
|
|
8
|
-
PASS test/server/index.test.ts (
|
|
8
|
+
PASS test/server/index.test.ts (31.164 s)
|
|
9
9
|
|
|
10
10
|
Test Suites: 4 passed, 4 total
|
|
11
11
|
Tests: 22 passed, 22 total
|
|
12
12
|
Snapshots: 0 total
|
|
13
|
-
Time:
|
|
13
|
+
Time: 32.259 s
|
|
14
14
|
Ran all test suites.
|
package/@generated/graphql.ts
CHANGED
|
@@ -1300,7 +1300,7 @@ export type StoreFacetValueBoolean = {
|
|
|
1300
1300
|
/** Facet value label. */
|
|
1301
1301
|
label: Scalars['String']['output']
|
|
1302
1302
|
/** Number of items with this facet. */
|
|
1303
|
-
quantity: Scalars['Int']['output']
|
|
1303
|
+
quantity: Maybe<Scalars['Int']['output']>
|
|
1304
1304
|
/** Indicates whether facet is selected. */
|
|
1305
1305
|
selected: Scalars['Boolean']['output']
|
|
1306
1306
|
/** Facet value. */
|
|
@@ -2470,7 +2470,7 @@ type Filter_Facets_StoreFacetBoolean_Fragment = {
|
|
|
2470
2470
|
label: string
|
|
2471
2471
|
value: string
|
|
2472
2472
|
selected: boolean
|
|
2473
|
-
quantity: number
|
|
2473
|
+
quantity: number | null
|
|
2474
2474
|
}>
|
|
2475
2475
|
}
|
|
2476
2476
|
|
|
@@ -3346,7 +3346,7 @@ export type ClientProductGalleryQueryQuery = {
|
|
|
3346
3346
|
label: string
|
|
3347
3347
|
value: string
|
|
3348
3348
|
selected: boolean
|
|
3349
|
-
quantity: number
|
|
3349
|
+
quantity: number | null
|
|
3350
3350
|
}>
|
|
3351
3351
|
}
|
|
3352
3352
|
| {
|
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,18 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
# [3.88.0](https://github.com/vtex/faststore/compare/v3.87.0...v3.88.0) (2025-09-18)
|
|
7
|
+
|
|
8
|
+
### Features
|
|
9
|
+
|
|
10
|
+
- [CP-768] adding support for lexical rich text objects ([#3004](https://github.com/vtex/faststore/issues/3004)) ([3e8fdaa](https://github.com/vtex/faststore/commit/3e8fdaa4bb728d2bde038ac96a2045f5d8670744)), closes [/github.com/vtex/faststore/pull/3004/files#diff-0b1e74171da3dc2cd19600bd739a8db011c54e9032c01abe19ababa21b1cf947R189](https://github.com//github.com/vtex/faststore/pull/3004/files/issues/diff-0b1e74171da3dc2cd19600bd739a8db011c54e9032c01abe19ababa21b1cf947R189) [/github.com/vtex/faststore/pull/3004/files#diff-fe1a4c11824f3dfcc33af60e6612a2054705df8f7273932db1b5f9c0ed023172R20](https://github.com//github.com/vtex/faststore/pull/3004/files/issues/diff-fe1a4c11824f3dfcc33af60e6612a2054705df8f7273932db1b5f9c0ed023172R20) [/github.com/vtex/faststore/pull/3004/files#diff-0b1e74171da3dc2cd19600bd739a8db011c54e9032c01abe19ababa21b1cf947R205](https://github.com//github.com/vtex/faststore/pull/3004/files/issues/diff-0b1e74171da3dc2cd19600bd739a8db011c54e9032c01abe19ababa21b1cf947R205) [/github.com/vtex/faststore/pull/3004/files#diff-0b1e74171da3dc2cd19600bd739a8db011c54e9032c01abe19ababa21b1cf947R98](https://github.com//github.com/vtex/faststore/pull/3004/files/issues/diff-0b1e74171da3dc2cd19600bd739a8db011c54e9032c01abe19ababa21b1cf947R98) [/github.com/vtex/faststore/pull/3004/files#diff-0b1e74171da3dc2cd19600bd739a8db011c54e9032c01abe19ababa21b1cf947R153](https://github.com//github.com/vtex/faststore/pull/3004/files/issues/diff-0b1e74171da3dc2cd19600bd739a8db011c54e9032c01abe19ababa21b1cf947R153) [/github.com/vtex/faststore/pull/3004/files#diff-0b1e74171da3dc2cd19600bd739a8db011c54e9032c01abe19ababa21b1cf947R106](https://github.com//github.com/vtex/faststore/pull/3004/files/issues/diff-0b1e74171da3dc2cd19600bd739a8db011c54e9032c01abe19ababa21b1cf947R106) [/github.com/vtex/faststore/pull/3004/files#diff-0b1e74171da3dc2cd19600bd739a8db011c54e9032c01abe19ababa21b1cf947R119](https://github.com//github.com/vtex/faststore/pull/3004/files/issues/diff-0b1e74171da3dc2cd19600bd739a8db011c54e9032c01abe19ababa21b1cf947R119) [/github.com/vtex/faststore/pull/3004/files#diff-0b1e74171da3dc2cd19600bd739a8db011c54e9032c01abe19ababa21b1cf947R145](https://github.com//github.com/vtex/faststore/pull/3004/files/issues/diff-0b1e74171da3dc2cd19600bd739a8db011c54e9032c01abe19ababa21b1cf947R145) [/github.com/vtex/faststore/pull/3004/files#diff-0b1e74171da3dc2cd19600bd739a8db011c54e9032c01abe19ababa21b1cf947R148](https://github.com//github.com/vtex/faststore/pull/3004/files/issues/diff-0b1e74171da3dc2cd19600bd739a8db011c54e9032c01abe19ababa21b1cf947R148) [/github.com/vtex/faststore/pull/3004/files#diff-0b1e74171da3dc2cd19600bd739a8db011c54e9032c01abe19ababa21b1cf947R149](https://github.com//github.com/vtex/faststore/pull/3004/files/issues/diff-0b1e74171da3dc2cd19600bd739a8db011c54e9032c01abe19ababa21b1cf947R149) [/github.com/vtex/faststore/pull/3004/files#diff-0b1e74171da3dc2cd19600bd739a8db011c54e9032c01abe19ababa21b1cf947R150](https://github.com//github.com/vtex/faststore/pull/3004/files/issues/diff-0b1e74171da3dc2cd19600bd739a8db011c54e9032c01abe19ababa21b1cf947R150) [/github.com/vtex/faststore/pull/3004/files#diff-946e28ce25fa403debb36f7f2bb8bad070f7ddd8586e4dd834649afcf4b529eeR32](https://github.com//github.com/vtex/faststore/pull/3004/files/issues/diff-946e28ce25fa403debb36f7f2bb8bad070f7ddd8586e4dd834649afcf4b529eeR32) [/github.com/vtex/faststore/pull/3004/files#diff-3a4a8bba967d6107c9b71ef5c1a0835620593286a58dc65031f8a29e8584c071R27](https://github.com//github.com/vtex/faststore/pull/3004/files/issues/diff-3a4a8bba967d6107c9b71ef5c1a0835620593286a58dc65031f8a29e8584c071R27)
|
|
11
|
+
|
|
12
|
+
# [3.87.0](https://github.com/vtex/faststore/compare/v3.86.4...v3.87.0) (2025-09-18)
|
|
13
|
+
|
|
14
|
+
### Features
|
|
15
|
+
|
|
16
|
+
- Delivery Promise 2.2 - in stock filter ([#2972](https://github.com/vtex/faststore/issues/2972)) ([7bfb830](https://github.com/vtex/faststore/commit/7bfb8308c76b0914d59875fbe95d3cab6e98eba3))
|
|
17
|
+
|
|
6
18
|
## [3.86.4](https://github.com/vtex/faststore/compare/v3.86.3...v3.86.4) (2025-09-17)
|
|
7
19
|
|
|
8
20
|
**Note:** Version bump only for package @faststore/core
|
|
@@ -287,6 +287,28 @@
|
|
|
287
287
|
"default": "Unavailable for pickup"
|
|
288
288
|
}
|
|
289
289
|
}
|
|
290
|
+
},
|
|
291
|
+
"inStock": {
|
|
292
|
+
"title": "PLP/Search Filter: In Stock",
|
|
293
|
+
"type": "object",
|
|
294
|
+
"properties": {
|
|
295
|
+
"enabled": {
|
|
296
|
+
"title": "Should display In Stock filter?",
|
|
297
|
+
"description": "Allow shoppers to filter only products that are currently in stock. Note: When enabling, ensure that the `hideUnavailableItems` property is set to `false` in the store's `discovery.config.js` file.",
|
|
298
|
+
"type": "boolean",
|
|
299
|
+
"default": false
|
|
300
|
+
},
|
|
301
|
+
"title": {
|
|
302
|
+
"title": "In Stock title",
|
|
303
|
+
"type": "string",
|
|
304
|
+
"default": "Availability"
|
|
305
|
+
},
|
|
306
|
+
"label": {
|
|
307
|
+
"title": "In Stock label",
|
|
308
|
+
"type": "string",
|
|
309
|
+
"default": "In-stock only"
|
|
310
|
+
}
|
|
311
|
+
}
|
|
290
312
|
}
|
|
291
313
|
}
|
|
292
314
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@faststore/core",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.88.0",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"repository": "vtex/faststore",
|
|
6
6
|
"browserslist": "supports es6-module and not dead",
|
|
@@ -44,11 +44,11 @@
|
|
|
44
44
|
"@envelop/graphql-jit": "^8.0.3",
|
|
45
45
|
"@envelop/parser-cache": "^6.0.2",
|
|
46
46
|
"@envelop/validation-cache": "^6.0.2",
|
|
47
|
-
"@faststore/api": "^3.
|
|
47
|
+
"@faststore/api": "^3.87.0",
|
|
48
48
|
"@faststore/graphql-utils": "^3.81.0",
|
|
49
49
|
"@faststore/lighthouse": "^3.81.0",
|
|
50
50
|
"@faststore/sdk": "^3.85.0",
|
|
51
|
-
"@faststore/ui": "^3.
|
|
51
|
+
"@faststore/ui": "^3.88.0",
|
|
52
52
|
"@graphql-codegen/cli": "5.0.2",
|
|
53
53
|
"@graphql-codegen/client-preset": "4.2.6",
|
|
54
54
|
"@graphql-codegen/typescript": "4.0.7",
|
|
@@ -58,10 +58,17 @@
|
|
|
58
58
|
"@graphql-tools/schema": "^10.0.3",
|
|
59
59
|
"@graphql-tools/utils": "^10.2.0",
|
|
60
60
|
"@graphql-typed-document-node/core": "^3.2.0",
|
|
61
|
+
"@lexical/code": "^0.34.0",
|
|
62
|
+
"@lexical/headless": "^0.34.0",
|
|
63
|
+
"@lexical/html": "^0.34.0",
|
|
64
|
+
"@lexical/link": "^0.34.0",
|
|
65
|
+
"@lexical/list": "^0.34.0",
|
|
66
|
+
"@lexical/react": "^0.34.0",
|
|
67
|
+
"@lexical/rich-text": "^0.34.0",
|
|
61
68
|
"@parcel/watcher": "^2.4.0",
|
|
62
69
|
"@types/react": "^18.2.42",
|
|
63
70
|
"@vtex/client-cms": "^0.2.16",
|
|
64
|
-
"@vtex/client-cp": "0.3.
|
|
71
|
+
"@vtex/client-cp": "0.3.5",
|
|
65
72
|
"@vtex/prettier-config": "1.0.0",
|
|
66
73
|
"autoprefixer": "^10.4.0",
|
|
67
74
|
"cookie": "^0.7.0",
|
|
@@ -73,6 +80,7 @@
|
|
|
73
80
|
"graphql": "^15.6.0",
|
|
74
81
|
"include-media": "^1.4.10",
|
|
75
82
|
"isomorphic-unfetch": "^3.1.0",
|
|
83
|
+
"lexical": "^0.34.0",
|
|
76
84
|
"next": "^13.5.9",
|
|
77
85
|
"next-seo": "^6.6.0",
|
|
78
86
|
"postcss": "^8.4.4",
|
|
@@ -108,5 +116,5 @@
|
|
|
108
116
|
"ts-jest": "29.1.1",
|
|
109
117
|
"typescript": "5.3.2"
|
|
110
118
|
},
|
|
111
|
-
"gitHead": "
|
|
119
|
+
"gitHead": "c87a2fbc23b26a4d343d485586c4f2108a814612"
|
|
112
120
|
}
|
|
@@ -18,7 +18,9 @@ import type { useFilter } from 'src/sdk/search/useFilter'
|
|
|
18
18
|
import type { FilterSliderProps } from './FilterSlider'
|
|
19
19
|
|
|
20
20
|
import {
|
|
21
|
+
DELIVERY_OPTIONS_FACET_KEY,
|
|
21
22
|
PICKUP_ALL_FACET_VALUE,
|
|
23
|
+
SHIPPING_FACET_KEY,
|
|
22
24
|
useDeliveryPromise,
|
|
23
25
|
} from 'src/sdk/deliveryPromise'
|
|
24
26
|
import { getGlobalSettings } from 'src/utils/globalSettings'
|
|
@@ -47,8 +49,7 @@ function FilterDesktop({
|
|
|
47
49
|
const { openRegionSlider } = useUI()
|
|
48
50
|
const {
|
|
49
51
|
facets: filteredFacets,
|
|
50
|
-
|
|
51
|
-
deliveryOptionsLabel,
|
|
52
|
+
labelsMap,
|
|
52
53
|
isPickupAllEnabled,
|
|
53
54
|
shouldDisplayDeliveryButton,
|
|
54
55
|
onDeliveryFacetChange,
|
|
@@ -74,7 +75,7 @@ function FilterDesktop({
|
|
|
74
75
|
testId={testId}
|
|
75
76
|
index={0}
|
|
76
77
|
type=""
|
|
77
|
-
label={
|
|
78
|
+
label={labelsMap[SHIPPING_FACET_KEY] ?? 'Delivery'}
|
|
78
79
|
description={deliveryPromiseSettings?.deliveryMethods?.description}
|
|
79
80
|
>
|
|
80
81
|
<UIButton
|
|
@@ -93,14 +94,11 @@ function FilterDesktop({
|
|
|
93
94
|
const index = shouldDisplayDeliveryButton ? idx + 1 : idx
|
|
94
95
|
const { __typename: type, label } = facet
|
|
95
96
|
const isExpanded = expanded.has(index)
|
|
96
|
-
const isDeliveryMethodFacet = facet.key ===
|
|
97
|
-
const isDeliveryOptionFacet = facet.key ===
|
|
97
|
+
const isDeliveryMethodFacet = facet.key === SHIPPING_FACET_KEY
|
|
98
|
+
const isDeliveryOptionFacet = facet.key === DELIVERY_OPTIONS_FACET_KEY
|
|
98
99
|
|
|
99
|
-
const sectionLabel =
|
|
100
|
-
|
|
101
|
-
: isDeliveryOptionFacet
|
|
102
|
-
? deliveryOptionsLabel
|
|
103
|
-
: label
|
|
100
|
+
const sectionLabel =
|
|
101
|
+
labelsMap[facet.key as keyof typeof labelsMap] ?? label
|
|
104
102
|
|
|
105
103
|
return (
|
|
106
104
|
<UIFilterFacets
|
|
@@ -18,7 +18,9 @@ import type { Filter_FacetsFragment } from '@generated/graphql'
|
|
|
18
18
|
import FilterDeliveryMethodFacet from './FilterDeliveryMethodFacet'
|
|
19
19
|
|
|
20
20
|
import {
|
|
21
|
+
DELIVERY_OPTIONS_FACET_KEY,
|
|
21
22
|
PICKUP_ALL_FACET_VALUE,
|
|
23
|
+
SHIPPING_FACET_KEY,
|
|
22
24
|
useDeliveryPromise,
|
|
23
25
|
} from 'src/sdk/deliveryPromise'
|
|
24
26
|
import type { useFilter } from 'src/sdk/search/useFilter'
|
|
@@ -102,8 +104,7 @@ function FilterSlider({
|
|
|
102
104
|
|
|
103
105
|
const {
|
|
104
106
|
facets: filteredFacets,
|
|
105
|
-
|
|
106
|
-
deliveryOptionsLabel,
|
|
107
|
+
labelsMap,
|
|
107
108
|
isPickupAllEnabled,
|
|
108
109
|
shouldDisplayDeliveryButton,
|
|
109
110
|
onDeliveryFacetChange,
|
|
@@ -169,7 +170,7 @@ function FilterSlider({
|
|
|
169
170
|
testId={testId}
|
|
170
171
|
index={0}
|
|
171
172
|
type=""
|
|
172
|
-
label={
|
|
173
|
+
label={labelsMap[SHIPPING_FACET_KEY] ?? 'Delivery'}
|
|
173
174
|
description={
|
|
174
175
|
deliveryPromiseSettings?.deliveryMethods?.description
|
|
175
176
|
}
|
|
@@ -190,14 +191,12 @@ function FilterSlider({
|
|
|
190
191
|
const index = shouldDisplayDeliveryButton ? idx + 1 : idx
|
|
191
192
|
const { __typename: type, label } = facet
|
|
192
193
|
const isExpanded = expanded.has(index)
|
|
193
|
-
const isDeliveryMethodFacet = facet.key ===
|
|
194
|
-
const isDeliveryOptionFacet =
|
|
194
|
+
const isDeliveryMethodFacet = facet.key === SHIPPING_FACET_KEY
|
|
195
|
+
const isDeliveryOptionFacet =
|
|
196
|
+
facet.key === DELIVERY_OPTIONS_FACET_KEY
|
|
195
197
|
|
|
196
|
-
const sectionLabel =
|
|
197
|
-
|
|
198
|
-
: isDeliveryOptionFacet
|
|
199
|
-
? deliveryOptionsLabel
|
|
200
|
-
: label
|
|
198
|
+
const sectionLabel =
|
|
199
|
+
labelsMap[facet.key as keyof typeof labelsMap] ?? label
|
|
201
200
|
|
|
202
201
|
return (
|
|
203
202
|
<UIFilterFacets
|
|
@@ -4,6 +4,8 @@
|
|
|
4
4
|
@import "@faststore/ui/src/components/atoms/Icon/styles.scss";
|
|
5
5
|
@import "@faststore/ui/src/components/atoms/Input/styles.scss";
|
|
6
6
|
@import "@faststore/ui/src/components/atoms/Link/styles.scss";
|
|
7
|
+
@import "@faststore/ui/src/components/atoms/List/styles.scss";
|
|
8
|
+
@import "@faststore/ui/src/components/atoms/RichText/styles.scss";
|
|
7
9
|
@import "@faststore/ui/src/components/molecules/InputField/styles.scss";
|
|
8
10
|
@import "@faststore/ui/src/components/organisms/Newsletter/styles.scss";
|
|
9
11
|
}
|
|
@@ -1,86 +1,35 @@
|
|
|
1
|
-
|
|
2
|
-
* TODO:
|
|
3
|
-
*
|
|
4
|
-
* This library hasn't been updated in 4 years at the time of writing.
|
|
5
|
-
*
|
|
6
|
-
* We're using it as a patch, and it is expected that some Rich Text use cases of draftjs are not supported by it.
|
|
7
|
-
* We have the dependency on draftjs because of the way the headless CMS send us the data.
|
|
8
|
-
*
|
|
9
|
-
* This library should be removed as soon as possible, which will probably be possible through one of two cases:
|
|
10
|
-
* 1. We support React Server Components and go back to using the official draftjs library for doing this, only on the server.
|
|
11
|
-
* This is still not the ideal solution, since it still relies on a unsupported, deprecated and archived library (draftjs).
|
|
12
|
-
* 2. CMS uses a new library or changes how it sends the data to not depend on draftjs.
|
|
13
|
-
*
|
|
14
|
-
* This is a limitation not only for this component, but for every native & custom component that makes use of Rich Text.
|
|
15
|
-
*/
|
|
16
|
-
|
|
17
|
-
// @ts-ignore motivation: cannot find the draftjs-to-html package types.
|
|
18
|
-
import draftToHtml from 'draftjs-to-html'
|
|
19
|
-
import { NewsletterAddendum as UINewsletterAddendum } from '@faststore/ui'
|
|
20
|
-
import type { NewsletterAddendumProps as UINewsletterAddendumProps } from '@faststore/ui'
|
|
1
|
+
import { RichText } from '../RichText'
|
|
21
2
|
|
|
22
3
|
export interface NewsletterAddendumProps {
|
|
23
4
|
/**
|
|
24
|
-
*
|
|
5
|
+
* Addendum content. Can be:
|
|
6
|
+
* - A string of a JSON object in the form of draftjs's raw content state (for hCMS)
|
|
7
|
+
* - Lexical's serialized editor state (for Content Platform)
|
|
8
|
+
* - Plain HTML string
|
|
9
|
+
* - Plain text
|
|
25
10
|
*/
|
|
26
|
-
addendum:
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
data-fs-link-size="regular"
|
|
36
|
-
data-testid="fs-link"
|
|
37
|
-
href="${url}"
|
|
38
|
-
>${text}</a>`
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
function cmsToHtml(addendum: string) {
|
|
42
|
-
if (!addendum) {
|
|
43
|
-
return ''
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
let rawDraftContentState = null
|
|
47
|
-
|
|
48
|
-
try {
|
|
49
|
-
rawDraftContentState = JSON.parse(addendum)
|
|
50
|
-
} catch (e) {
|
|
51
|
-
throw new Error(
|
|
52
|
-
'Newsletter\'s prop "addendum" is not a JSON string. This is happening because the overridden prop is malformed or the CMS is providing malformed content for that prop.',
|
|
53
|
-
{
|
|
54
|
-
cause: e,
|
|
55
|
-
}
|
|
56
|
-
)
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
if (!rawDraftContentState) {
|
|
60
|
-
return ''
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
return draftToHtml(
|
|
64
|
-
rawDraftContentState,
|
|
65
|
-
undefined,
|
|
66
|
-
undefined,
|
|
67
|
-
(entity: { type: string; data: { url: string } }, text: string) => {
|
|
68
|
-
if (entity.type !== 'LINK') {
|
|
69
|
-
return null
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
return getLinkElementAsString(entity.data.url, text)
|
|
73
|
-
}
|
|
74
|
-
)
|
|
11
|
+
addendum: string
|
|
12
|
+
/**
|
|
13
|
+
* ID to find this component in testing tools (e.g.: Cypress, Testing Library, and Jest).
|
|
14
|
+
*/
|
|
15
|
+
testId?: string
|
|
16
|
+
/**
|
|
17
|
+
* Additional props to pass to the RichText component
|
|
18
|
+
*/
|
|
19
|
+
[key: string]: any
|
|
75
20
|
}
|
|
76
21
|
|
|
77
22
|
export function NewsletterAddendum({
|
|
78
23
|
addendum,
|
|
24
|
+
testId = 'fs-newsletter-addendum',
|
|
79
25
|
...otherProps
|
|
80
|
-
}: NewsletterAddendumProps) {
|
|
26
|
+
}: Readonly<NewsletterAddendumProps>) {
|
|
81
27
|
return (
|
|
82
|
-
<
|
|
83
|
-
|
|
28
|
+
<RichText
|
|
29
|
+
as="span"
|
|
30
|
+
content={addendum}
|
|
31
|
+
testId={testId}
|
|
32
|
+
data-fs-newsletter-addendum
|
|
84
33
|
{...otherProps}
|
|
85
34
|
/>
|
|
86
35
|
)
|