@faststore/core 3.99.2 → 3.99.4

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 (41) hide show
  1. package/.next/BUILD_ID +1 -1
  2. package/.next/build-manifest.json +17 -17
  3. package/.next/cache/.tsbuildinfo +1 -1
  4. package/.next/cache/config.json +3 -3
  5. package/.next/cache/webpack/client-production/0.pack +0 -0
  6. package/.next/cache/webpack/client-production/index.pack +0 -0
  7. package/.next/cache/webpack/edge-server-production/0.pack +0 -0
  8. package/.next/cache/webpack/edge-server-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/prerender-manifest.js +1 -1
  12. package/.next/prerender-manifest.json +1 -1
  13. package/.next/routes-manifest.json +1 -1
  14. package/.next/server/chunks/948.js +1 -1
  15. package/.next/server/middleware-build-manifest.js +1 -1
  16. package/.next/server/pages/en-US/404.html +2 -2
  17. package/.next/server/pages/en-US/500.html +2 -2
  18. package/.next/server/pages/en-US/checkout.html +2 -2
  19. package/.next/server/pages/en-US/login.html +2 -2
  20. package/.next/server/pages/en-US/s.html +2 -2
  21. package/.next/server/pages/en-US.html +2 -2
  22. package/.next/server/pages-manifest.json +1 -1
  23. package/.next/static/{3D0EvzZIFIINoYoYI614_ → Xk7WgpVOdfEoXARPhQHxf}/_buildManifest.js +1 -1
  24. package/.next/static/chunks/9173-515913f3f10caf5e.js +2 -0
  25. package/.next/trace +143 -143
  26. package/.turbo/turbo-build.log +9 -9
  27. package/.turbo/turbo-test.log +7 -7
  28. package/CHANGELOG.md +13 -0
  29. package/cms/faststore/pages/cms_content_type__globalfootersections.jsonc +1 -56
  30. package/cms/faststore/pages/cms_content_type__globalheadersections.jsonc +1 -56
  31. package/cms/faststore/pages/cms_content_type__globalsections.jsonc +1 -59
  32. package/cms/faststore/pages/cms_content_type__home.jsonc +1 -56
  33. package/cms/faststore/pages/cms_content_type__landingpage.jsonc +1 -59
  34. package/cms/faststore/pages/cms_content_type__pdp.jsonc +1 -65
  35. package/cms/faststore/pages/cms_content_type__plp.jsonc +1 -62
  36. package/cms/faststore/pages/cms_content_type__search.jsonc +1 -62
  37. package/cms/faststore/schema.json +8 -475
  38. package/package.json +7 -7
  39. package/src/components/cms/RenderSections.tsx +38 -3
  40. package/.next/static/chunks/9173-e89da04079c35360.js +0 -2
  41. /package/.next/static/{3D0EvzZIFIINoYoYI614_ → Xk7WgpVOdfEoXARPhQHxf}/_ssgManifest.js +0 -0
@@ -41,62 +41,7 @@
41
41
  "title": "Global Footer Sections",
42
42
  "properties": {
43
43
  "sections": {
44
- "type": "array",
45
- "items": {
46
- "anyOf": [
47
- {
48
- "$ref": "#/components/Search"
49
- },
50
- {
51
- "$ref": "#/components/Navbar"
52
- },
53
- {
54
- "$ref": "#/components/Alert"
55
- },
56
- {
57
- "$ref": "#/components/Footer"
58
- },
59
- {
60
- "$ref": "#/components/BannerText"
61
- },
62
- {
63
- "$ref": "#/components/Hero"
64
- },
65
- {
66
- "$ref": "#/components/Incentives"
67
- },
68
- {
69
- "$ref": "#/components/ProductShelf"
70
- },
71
- {
72
- "$ref": "#/components/ProductTiles"
73
- },
74
- {
75
- "$ref": "#/components/Newsletter"
76
- },
77
- {
78
- "$ref": "#/components/Children"
79
- },
80
- {
81
- "$ref": "#/components/BannerNewsletter"
82
- },
83
- {
84
- "$ref": "#/components/CartSidebar"
85
- },
86
- {
87
- "$ref": "#/components/RegionBar"
88
- },
89
- {
90
- "$ref": "#/components/RegionModal"
91
- },
92
- {
93
- "$ref": "#/components/RegionPopover"
94
- },
95
- {
96
- "$ref": "#/components/EmptyState"
97
- }
98
- ]
99
- }
44
+ "$ref": "#/$defs/$ALLOW_ALL_COMPONENTS"
100
45
  }
101
46
  },
102
47
  "readOnly": false,
@@ -112,62 +57,7 @@
112
57
  "title": "Global Header Sections",
113
58
  "properties": {
114
59
  "sections": {
115
- "type": "array",
116
- "items": {
117
- "anyOf": [
118
- {
119
- "$ref": "#/components/Search"
120
- },
121
- {
122
- "$ref": "#/components/Navbar"
123
- },
124
- {
125
- "$ref": "#/components/Alert"
126
- },
127
- {
128
- "$ref": "#/components/Footer"
129
- },
130
- {
131
- "$ref": "#/components/BannerText"
132
- },
133
- {
134
- "$ref": "#/components/Hero"
135
- },
136
- {
137
- "$ref": "#/components/Incentives"
138
- },
139
- {
140
- "$ref": "#/components/ProductShelf"
141
- },
142
- {
143
- "$ref": "#/components/ProductTiles"
144
- },
145
- {
146
- "$ref": "#/components/Newsletter"
147
- },
148
- {
149
- "$ref": "#/components/Children"
150
- },
151
- {
152
- "$ref": "#/components/BannerNewsletter"
153
- },
154
- {
155
- "$ref": "#/components/CartSidebar"
156
- },
157
- {
158
- "$ref": "#/components/RegionBar"
159
- },
160
- {
161
- "$ref": "#/components/RegionModal"
162
- },
163
- {
164
- "$ref": "#/components/RegionPopover"
165
- },
166
- {
167
- "$ref": "#/components/EmptyState"
168
- }
169
- ]
170
- }
60
+ "$ref": "#/$defs/$ALLOW_ALL_COMPONENTS"
171
61
  }
172
62
  },
173
63
  "readOnly": false,
@@ -485,65 +375,7 @@
485
375
  "$componentTitle": "Delivery Promise"
486
376
  },
487
377
  "sections": {
488
- "type": "array",
489
- "items": {
490
- "anyOf": [
491
- {
492
- "$ref": "#/components/Search"
493
- },
494
- {
495
- "$ref": "#/components/Navbar"
496
- },
497
- {
498
- "$ref": "#/components/Alert"
499
- },
500
- {
501
- "$ref": "#/components/Footer"
502
- },
503
- {
504
- "$ref": "#/components/BannerText"
505
- },
506
- {
507
- "$ref": "#/components/Hero"
508
- },
509
- {
510
- "$ref": "#/components/Incentives"
511
- },
512
- {
513
- "$ref": "#/components/ProductShelf"
514
- },
515
- {
516
- "$ref": "#/components/ProductTiles"
517
- },
518
- {
519
- "$ref": "#/components/Newsletter"
520
- },
521
- {
522
- "$ref": "#/components/Children"
523
- },
524
- {
525
- "$ref": "#/components/BannerNewsletter"
526
- },
527
- {
528
- "$ref": "#/components/CartSidebar"
529
- },
530
- {
531
- "$ref": "#/components/RegionBar"
532
- },
533
- {
534
- "$ref": "#/components/RegionModal"
535
- },
536
- {
537
- "$ref": "#/components/RegionPopover"
538
- },
539
- {
540
- "$ref": "#/components/EmptyState"
541
- },
542
- {
543
- "$ref": "#/components/ShoppingAssistant"
544
- }
545
- ]
546
- }
378
+ "$ref": "#/$defs/$ALLOW_ALL_COMPONENTS"
547
379
  }
548
380
  },
549
381
  "readOnly": false,
@@ -699,62 +531,7 @@
699
531
  "$componentTitle": "SEO"
700
532
  },
701
533
  "sections": {
702
- "type": "array",
703
- "items": {
704
- "anyOf": [
705
- {
706
- "$ref": "#/components/Search"
707
- },
708
- {
709
- "$ref": "#/components/Navbar"
710
- },
711
- {
712
- "$ref": "#/components/Alert"
713
- },
714
- {
715
- "$ref": "#/components/Footer"
716
- },
717
- {
718
- "$ref": "#/components/BannerText"
719
- },
720
- {
721
- "$ref": "#/components/Hero"
722
- },
723
- {
724
- "$ref": "#/components/Incentives"
725
- },
726
- {
727
- "$ref": "#/components/ProductShelf"
728
- },
729
- {
730
- "$ref": "#/components/ProductTiles"
731
- },
732
- {
733
- "$ref": "#/components/Newsletter"
734
- },
735
- {
736
- "$ref": "#/components/Children"
737
- },
738
- {
739
- "$ref": "#/components/BannerNewsletter"
740
- },
741
- {
742
- "$ref": "#/components/CartSidebar"
743
- },
744
- {
745
- "$ref": "#/components/RegionBar"
746
- },
747
- {
748
- "$ref": "#/components/RegionModal"
749
- },
750
- {
751
- "$ref": "#/components/RegionPopover"
752
- },
753
- {
754
- "$ref": "#/components/EmptyState"
755
- }
756
- ]
757
- }
534
+ "$ref": "#/$defs/$ALLOW_ALL_COMPONENTS"
758
535
  }
759
536
  },
760
537
  "readOnly": false,
@@ -808,65 +585,7 @@
808
585
  "$componentTitle": "SEO"
809
586
  },
810
587
  "sections": {
811
- "type": "array",
812
- "items": {
813
- "anyOf": [
814
- {
815
- "$ref": "#/components/Search"
816
- },
817
- {
818
- "$ref": "#/components/Navbar"
819
- },
820
- {
821
- "$ref": "#/components/Alert"
822
- },
823
- {
824
- "$ref": "#/components/Footer"
825
- },
826
- {
827
- "$ref": "#/components/BannerText"
828
- },
829
- {
830
- "$ref": "#/components/Hero"
831
- },
832
- {
833
- "$ref": "#/components/Incentives"
834
- },
835
- {
836
- "$ref": "#/components/ProductShelf"
837
- },
838
- {
839
- "$ref": "#/components/CrossSellingShelf"
840
- },
841
- {
842
- "$ref": "#/components/ProductTiles"
843
- },
844
- {
845
- "$ref": "#/components/Newsletter"
846
- },
847
- {
848
- "$ref": "#/components/Children"
849
- },
850
- {
851
- "$ref": "#/components/BannerNewsletter"
852
- },
853
- {
854
- "$ref": "#/components/CartSidebar"
855
- },
856
- {
857
- "$ref": "#/components/RegionBar"
858
- },
859
- {
860
- "$ref": "#/components/RegionModal"
861
- },
862
- {
863
- "$ref": "#/components/RegionPopover"
864
- },
865
- {
866
- "$ref": "#/components/EmptyState"
867
- }
868
- ]
869
- }
588
+ "$ref": "#/$defs/$ALLOW_ALL_COMPONENTS"
870
589
  }
871
590
  },
872
591
  "readOnly": false,
@@ -931,71 +650,7 @@
931
650
  "$componentTitle": "SEO"
932
651
  },
933
652
  "sections": {
934
- "type": "array",
935
- "items": {
936
- "anyOf": [
937
- {
938
- "$ref": "#/components/Search"
939
- },
940
- {
941
- "$ref": "#/components/Navbar"
942
- },
943
- {
944
- "$ref": "#/components/Alert"
945
- },
946
- {
947
- "$ref": "#/components/Footer"
948
- },
949
- {
950
- "$ref": "#/components/BannerText"
951
- },
952
- {
953
- "$ref": "#/components/Hero"
954
- },
955
- {
956
- "$ref": "#/components/Incentives"
957
- },
958
- {
959
- "$ref": "#/components/ProductShelf"
960
- },
961
- {
962
- "$ref": "#/components/CrossSellingShelf"
963
- },
964
- {
965
- "$ref": "#/components/ProductTiles"
966
- },
967
- {
968
- "$ref": "#/components/Newsletter"
969
- },
970
- {
971
- "$ref": "#/components/Children"
972
- },
973
- {
974
- "$ref": "#/components/BannerNewsletter"
975
- },
976
- {
977
- "$ref": "#/components/Breadcrumb"
978
- },
979
- {
980
- "$ref": "#/components/ProductDetails"
981
- },
982
- {
983
- "$ref": "#/components/CartSidebar"
984
- },
985
- {
986
- "$ref": "#/components/RegionBar"
987
- },
988
- {
989
- "$ref": "#/components/RegionModal"
990
- },
991
- {
992
- "$ref": "#/components/RegionPopover"
993
- },
994
- {
995
- "$ref": "#/components/EmptyState"
996
- }
997
- ]
998
- }
653
+ "$ref": "#/$defs/$ALLOW_ALL_COMPONENTS"
999
654
  }
1000
655
  },
1001
656
  "readOnly": false,
@@ -1062,68 +717,7 @@
1062
717
  "$componentTitle": "Product Gallery"
1063
718
  },
1064
719
  "sections": {
1065
- "type": "array",
1066
- "items": {
1067
- "anyOf": [
1068
- {
1069
- "$ref": "#/components/Search"
1070
- },
1071
- {
1072
- "$ref": "#/components/Navbar"
1073
- },
1074
- {
1075
- "$ref": "#/components/Alert"
1076
- },
1077
- {
1078
- "$ref": "#/components/Footer"
1079
- },
1080
- {
1081
- "$ref": "#/components/BannerText"
1082
- },
1083
- {
1084
- "$ref": "#/components/Hero"
1085
- },
1086
- {
1087
- "$ref": "#/components/Incentives"
1088
- },
1089
- {
1090
- "$ref": "#/components/ProductShelf"
1091
- },
1092
- {
1093
- "$ref": "#/components/ProductTiles"
1094
- },
1095
- {
1096
- "$ref": "#/components/Newsletter"
1097
- },
1098
- {
1099
- "$ref": "#/components/Children"
1100
- },
1101
- {
1102
- "$ref": "#/components/BannerNewsletter"
1103
- },
1104
- {
1105
- "$ref": "#/components/Breadcrumb"
1106
- },
1107
- {
1108
- "$ref": "#/components/ProductGallery"
1109
- },
1110
- {
1111
- "$ref": "#/components/CartSidebar"
1112
- },
1113
- {
1114
- "$ref": "#/components/RegionBar"
1115
- },
1116
- {
1117
- "$ref": "#/components/RegionModal"
1118
- },
1119
- {
1120
- "$ref": "#/components/RegionPopover"
1121
- },
1122
- {
1123
- "$ref": "#/components/EmptyState"
1124
- }
1125
- ]
1126
- }
720
+ "$ref": "#/$defs/$ALLOW_ALL_COMPONENTS"
1127
721
  }
1128
722
  },
1129
723
  "readOnly": false,
@@ -1178,68 +772,7 @@
1178
772
  "$componentTitle": "Product Gallery"
1179
773
  },
1180
774
  "sections": {
1181
- "type": "array",
1182
- "items": {
1183
- "anyOf": [
1184
- {
1185
- "$ref": "#/components/Search"
1186
- },
1187
- {
1188
- "$ref": "#/components/Navbar"
1189
- },
1190
- {
1191
- "$ref": "#/components/Alert"
1192
- },
1193
- {
1194
- "$ref": "#/components/Footer"
1195
- },
1196
- {
1197
- "$ref": "#/components/BannerText"
1198
- },
1199
- {
1200
- "$ref": "#/components/Hero"
1201
- },
1202
- {
1203
- "$ref": "#/components/Incentives"
1204
- },
1205
- {
1206
- "$ref": "#/components/ProductShelf"
1207
- },
1208
- {
1209
- "$ref": "#/components/ProductTiles"
1210
- },
1211
- {
1212
- "$ref": "#/components/Newsletter"
1213
- },
1214
- {
1215
- "$ref": "#/components/Children"
1216
- },
1217
- {
1218
- "$ref": "#/components/BannerNewsletter"
1219
- },
1220
- {
1221
- "$ref": "#/components/Breadcrumb"
1222
- },
1223
- {
1224
- "$ref": "#/components/ProductGallery"
1225
- },
1226
- {
1227
- "$ref": "#/components/CartSidebar"
1228
- },
1229
- {
1230
- "$ref": "#/components/RegionBar"
1231
- },
1232
- {
1233
- "$ref": "#/components/RegionModal"
1234
- },
1235
- {
1236
- "$ref": "#/components/RegionPopover"
1237
- },
1238
- {
1239
- "$ref": "#/components/EmptyState"
1240
- }
1241
- ]
1242
- }
775
+ "$ref": "#/$defs/$ALLOW_ALL_COMPONENTS"
1243
776
  }
1244
777
  },
1245
778
  "readOnly": false,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@faststore/core",
3
- "version": "3.99.2",
3
+ "version": "3.99.4",
4
4
  "license": "MIT",
5
5
  "repository": {
6
6
  "type": "git",
@@ -51,11 +51,11 @@
51
51
  "@envelop/graphql-jit": "^8.0.3",
52
52
  "@envelop/parser-cache": "^6.0.2",
53
53
  "@envelop/validation-cache": "^6.0.2",
54
- "@faststore/api": "3.99.1",
55
- "@faststore/graphql-utils": "^3.99.1",
56
- "@faststore/lighthouse": "3.99.1",
57
- "@faststore/sdk": "3.99.2",
58
- "@faststore/ui": "3.99.2",
54
+ "@faststore/api": "3.99.4",
55
+ "@faststore/graphql-utils": "^3.99.4",
56
+ "@faststore/lighthouse": "3.99.4",
57
+ "@faststore/sdk": "3.99.4",
58
+ "@faststore/ui": "3.99.4",
59
59
  "@graphql-codegen/cli": "5.0.2",
60
60
  "@graphql-codegen/client-preset": "4.2.6",
61
61
  "@graphql-codegen/typescript": "4.0.7",
@@ -126,5 +126,5 @@
126
126
  "ts-jest": "29.1.1",
127
127
  "typescript": "5.3.2"
128
128
  },
129
- "gitHead": "b9c16018dd5a42a25533068d0a2157189687c3e6"
129
+ "gitHead": "6a51c5d88403556ffe139d11148817210beff36b"
130
130
  }
@@ -23,7 +23,37 @@ interface Props {
23
23
  isInteractive?: boolean
24
24
  }
25
25
 
26
- const SECTIONS_OUT_OF_VIEWPORT = ['CartSidebar', 'RegionModal', 'RegionSlider']
26
+ const REGION_SLIDER_SECTION_NAME = 'RegionSlider'
27
+
28
+ const SECTIONS_OUT_OF_VIEWPORT = [
29
+ 'CartSidebar',
30
+ 'RegionModal',
31
+ REGION_SLIDER_SECTION_NAME,
32
+ ]
33
+
34
+ /**
35
+ * Ensure a RegionSlider section exists in the iteration. After PR #2961 the
36
+ * section was removed from `sections.json`, so CP-based stores (whose CP
37
+ * schemas were generated in PR #3071) and fresh hCMS stores no longer have it
38
+ * in their CMS content. The runtime still expects the section to flow through
39
+ * `RenderSections` so that `LazyLoadingSection` can gate the lazy import on
40
+ * `regionSlider.isOpen`. Inject the entry only if it is not already present in
41
+ * `sections` or `globalSections` to avoid double-rendering for legacy hCMS
42
+ * stores that have it persisted in their CMS.
43
+ */
44
+ function withRegionSliderSection(
45
+ sections: Section[] | undefined,
46
+ globalSections: Section[] | undefined
47
+ ): Section[] {
48
+ const base = sections ?? []
49
+ const isPresent =
50
+ base.some(({ name }) => name === REGION_SLIDER_SECTION_NAME) ||
51
+ globalSections?.some(({ name }) => name === REGION_SLIDER_SECTION_NAME)
52
+
53
+ if (isPresent) return base
54
+
55
+ return [...base, { name: REGION_SLIDER_SECTION_NAME, data: {} }]
56
+ }
27
57
 
28
58
  const Toast = dynamic(
29
59
  () => import(/* webpackChunkName: "Toast" */ '../common/Toast'),
@@ -148,6 +178,11 @@ function RenderSections({
148
178
  globalSections ?? sections
149
179
  )
150
180
 
181
+ const augmentedSections = useMemo(
182
+ () => withRegionSliderSection(sections, globalSections),
183
+ [sections, globalSections]
184
+ )
185
+
151
186
  const { isInteractive } = useTTI()
152
187
  const router = useRouter()
153
188
 
@@ -170,9 +205,9 @@ function RenderSections({
170
205
  isInteractive={isInteractive}
171
206
  />
172
207
  )}
173
- {sections && sections.length > 0 && (
208
+ {augmentedSections.length > 0 && (
174
209
  <RenderSectionsBase
175
- sections={sections}
210
+ sections={augmentedSections}
176
211
  components={components}
177
212
  isInteractive={isInteractive}
178
213
  />