@sitecore-content-sdk/nextjs 1.4.0-canary.9 → 1.4.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/LICENSE.txt CHANGED
@@ -1,202 +1,202 @@
1
-
2
- Apache License
3
- Version 2.0, January 2004
4
- http://www.apache.org/licenses/
5
-
6
- TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
7
-
8
- 1. Definitions.
9
-
10
- "License" shall mean the terms and conditions for use, reproduction,
11
- and distribution as defined by Sections 1 through 9 of this document.
12
-
13
- "Licensor" shall mean the copyright owner or entity authorized by
14
- the copyright owner that is granting the License.
15
-
16
- "Legal Entity" shall mean the union of the acting entity and all
17
- other entities that control, are controlled by, or are under common
18
- control with that entity. For the purposes of this definition,
19
- "control" means (i) the power, direct or indirect, to cause the
20
- direction or management of such entity, whether by contract or
21
- otherwise, or (ii) ownership of fifty percent (50%) or more of the
22
- outstanding shares, or (iii) beneficial ownership of such entity.
23
-
24
- "You" (or "Your") shall mean an individual or Legal Entity
25
- exercising permissions granted by this License.
26
-
27
- "Source" form shall mean the preferred form for making modifications,
28
- including but not limited to software source code, documentation
29
- source, and configuration files.
30
-
31
- "Object" form shall mean any form resulting from mechanical
32
- transformation or translation of a Source form, including but
33
- not limited to compiled object code, generated documentation,
34
- and conversions to other media types.
35
-
36
- "Work" shall mean the work of authorship, whether in Source or
37
- Object form, made available under the License, as indicated by a
38
- copyright notice that is included in or attached to the work
39
- (an example is provided in the Appendix below).
40
-
41
- "Derivative Works" shall mean any work, whether in Source or Object
42
- form, that is based on (or derived from) the Work and for which the
43
- editorial revisions, annotations, elaborations, or other modifications
44
- represent, as a whole, an original work of authorship. For the purposes
45
- of this License, Derivative Works shall not include works that remain
46
- separable from, or merely link (or bind by name) to the interfaces of,
47
- the Work and Derivative Works thereof.
48
-
49
- "Contribution" shall mean any work of authorship, including
50
- the original version of the Work and any modifications or additions
51
- to that Work or Derivative Works thereof, that is intentionally
52
- submitted to Licensor for inclusion in the Work by the copyright owner
53
- or by an individual or Legal Entity authorized to submit on behalf of
54
- the copyright owner. For the purposes of this definition, "submitted"
55
- means any form of electronic, verbal, or written communication sent
56
- to the Licensor or its representatives, including but not limited to
57
- communication on electronic mailing lists, source code control systems,
58
- and issue tracking systems that are managed by, or on behalf of, the
59
- Licensor for the purpose of discussing and improving the Work, but
60
- excluding communication that is conspicuously marked or otherwise
61
- designated in writing by the copyright owner as "Not a Contribution."
62
-
63
- "Contributor" shall mean Licensor and any individual or Legal Entity
64
- on behalf of whom a Contribution has been received by Licensor and
65
- subsequently incorporated within the Work.
66
-
67
- 2. Grant of Copyright License. Subject to the terms and conditions of
68
- this License, each Contributor hereby grants to You a perpetual,
69
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
70
- copyright license to reproduce, prepare Derivative Works of,
71
- publicly display, publicly perform, sublicense, and distribute the
72
- Work and such Derivative Works in Source or Object form.
73
-
74
- 3. Grant of Patent License. Subject to the terms and conditions of
75
- this License, each Contributor hereby grants to You a perpetual,
76
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
77
- (except as stated in this section) patent license to make, have made,
78
- use, offer to sell, sell, import, and otherwise transfer the Work,
79
- where such license applies only to those patent claims licensable
80
- by such Contributor that are necessarily infringed by their
81
- Contribution(s) alone or by combination of their Contribution(s)
82
- with the Work to which such Contribution(s) was submitted. If You
83
- institute patent litigation against any entity (including a
84
- cross-claim or counterclaim in a lawsuit) alleging that the Work
85
- or a Contribution incorporated within the Work constitutes direct
86
- or contributory patent infringement, then any patent licenses
87
- granted to You under this License for that Work shall terminate
88
- as of the date such litigation is filed.
89
-
90
- 4. Redistribution. You may reproduce and distribute copies of the
91
- Work or Derivative Works thereof in any medium, with or without
92
- modifications, and in Source or Object form, provided that You
93
- meet the following conditions:
94
-
95
- (a) You must give any other recipients of the Work or
96
- Derivative Works a copy of this License; and
97
-
98
- (b) You must cause any modified files to carry prominent notices
99
- stating that You changed the files; and
100
-
101
- (c) You must retain, in the Source form of any Derivative Works
102
- that You distribute, all copyright, patent, trademark, and
103
- attribution notices from the Source form of the Work,
104
- excluding those notices that do not pertain to any part of
105
- the Derivative Works; and
106
-
107
- (d) If the Work includes a "NOTICE" text file as part of its
108
- distribution, then any Derivative Works that You distribute must
109
- include a readable copy of the attribution notices contained
110
- within such NOTICE file, excluding those notices that do not
111
- pertain to any part of the Derivative Works, in at least one
112
- of the following places: within a NOTICE text file distributed
113
- as part of the Derivative Works; within the Source form or
114
- documentation, if provided along with the Derivative Works; or,
115
- within a display generated by the Derivative Works, if and
116
- wherever such third-party notices normally appear. The contents
117
- of the NOTICE file are for informational purposes only and
118
- do not modify the License. You may add Your own attribution
119
- notices within Derivative Works that You distribute, alongside
120
- or as an addendum to the NOTICE text from the Work, provided
121
- that such additional attribution notices cannot be construed
122
- as modifying the License.
123
-
124
- You may add Your own copyright statement to Your modifications and
125
- may provide additional or different license terms and conditions
126
- for use, reproduction, or distribution of Your modifications, or
127
- for any such Derivative Works as a whole, provided Your use,
128
- reproduction, and distribution of the Work otherwise complies with
129
- the conditions stated in this License.
130
-
131
- 5. Submission of Contributions. Unless You explicitly state otherwise,
132
- any Contribution intentionally submitted for inclusion in the Work
133
- by You to the Licensor shall be under the terms and conditions of
134
- this License, without any additional terms or conditions.
135
- Notwithstanding the above, nothing herein shall supersede or modify
136
- the terms of any separate license agreement you may have executed
137
- with Licensor regarding such Contributions.
138
-
139
- 6. Trademarks. This License does not grant permission to use the trade
140
- names, trademarks, service marks, or product names of the Licensor,
141
- except as required for reasonable and customary use in describing the
142
- origin of the Work and reproducing the content of the NOTICE file.
143
-
144
- 7. Disclaimer of Warranty. Unless required by applicable law or
145
- agreed to in writing, Licensor provides the Work (and each
146
- Contributor provides its Contributions) on an "AS IS" BASIS,
147
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
148
- implied, including, without limitation, any warranties or conditions
149
- of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
150
- PARTICULAR PURPOSE. You are solely responsible for determining the
151
- appropriateness of using or redistributing the Work and assume any
152
- risks associated with Your exercise of permissions under this License.
153
-
154
- 8. Limitation of Liability. In no event and under no legal theory,
155
- whether in tort (including negligence), contract, or otherwise,
156
- unless required by applicable law (such as deliberate and grossly
157
- negligent acts) or agreed to in writing, shall any Contributor be
158
- liable to You for damages, including any direct, indirect, special,
159
- incidental, or consequential damages of any character arising as a
160
- result of this License or out of the use or inability to use the
161
- Work (including but not limited to damages for loss of goodwill,
162
- work stoppage, computer failure or malfunction, or any and all
163
- other commercial damages or losses), even if such Contributor
164
- has been advised of the possibility of such damages.
165
-
166
- 9. Accepting Warranty or Additional Liability. While redistributing
167
- the Work or Derivative Works thereof, You may choose to offer,
168
- and charge a fee for, acceptance of support, warranty, indemnity,
169
- or other liability obligations and/or rights consistent with this
170
- License. However, in accepting such obligations, You may act only
171
- on Your own behalf and on Your sole responsibility, not on behalf
172
- of any other Contributor, and only if You agree to indemnify,
173
- defend, and hold each Contributor harmless for any liability
174
- incurred by, or claims asserted against, such Contributor by reason
175
- of your accepting any such warranty or additional liability.
176
-
177
- END OF TERMS AND CONDITIONS
178
-
179
- APPENDIX: How to apply the Apache License to your work.
180
-
181
- To apply the Apache License to your work, attach the following
182
- boilerplate notice, with the fields enclosed by brackets "[]"
183
- replaced with your own identifying information. (Don't include
184
- the brackets!) The text should be enclosed in the appropriate
185
- comment syntax for the file format. We also recommend that a
186
- file or class name and description of purpose be included on the
187
- same "printed page" as the copyright notice for easier
188
- identification within third-party archives.
189
-
190
- Copyright [yyyy] [name of copyright owner]
191
-
192
- Licensed under the Apache License, Version 2.0 (the "License");
193
- you may not use this file except in compliance with the License.
194
- You may obtain a copy of the License at
195
-
196
- http://www.apache.org/licenses/LICENSE-2.0
197
-
198
- Unless required by applicable law or agreed to in writing, software
199
- distributed under the License is distributed on an "AS IS" BASIS,
200
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
201
- See the License for the specific language governing permissions and
202
- limitations under the License.
1
+
2
+ Apache License
3
+ Version 2.0, January 2004
4
+ http://www.apache.org/licenses/
5
+
6
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
7
+
8
+ 1. Definitions.
9
+
10
+ "License" shall mean the terms and conditions for use, reproduction,
11
+ and distribution as defined by Sections 1 through 9 of this document.
12
+
13
+ "Licensor" shall mean the copyright owner or entity authorized by
14
+ the copyright owner that is granting the License.
15
+
16
+ "Legal Entity" shall mean the union of the acting entity and all
17
+ other entities that control, are controlled by, or are under common
18
+ control with that entity. For the purposes of this definition,
19
+ "control" means (i) the power, direct or indirect, to cause the
20
+ direction or management of such entity, whether by contract or
21
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
22
+ outstanding shares, or (iii) beneficial ownership of such entity.
23
+
24
+ "You" (or "Your") shall mean an individual or Legal Entity
25
+ exercising permissions granted by this License.
26
+
27
+ "Source" form shall mean the preferred form for making modifications,
28
+ including but not limited to software source code, documentation
29
+ source, and configuration files.
30
+
31
+ "Object" form shall mean any form resulting from mechanical
32
+ transformation or translation of a Source form, including but
33
+ not limited to compiled object code, generated documentation,
34
+ and conversions to other media types.
35
+
36
+ "Work" shall mean the work of authorship, whether in Source or
37
+ Object form, made available under the License, as indicated by a
38
+ copyright notice that is included in or attached to the work
39
+ (an example is provided in the Appendix below).
40
+
41
+ "Derivative Works" shall mean any work, whether in Source or Object
42
+ form, that is based on (or derived from) the Work and for which the
43
+ editorial revisions, annotations, elaborations, or other modifications
44
+ represent, as a whole, an original work of authorship. For the purposes
45
+ of this License, Derivative Works shall not include works that remain
46
+ separable from, or merely link (or bind by name) to the interfaces of,
47
+ the Work and Derivative Works thereof.
48
+
49
+ "Contribution" shall mean any work of authorship, including
50
+ the original version of the Work and any modifications or additions
51
+ to that Work or Derivative Works thereof, that is intentionally
52
+ submitted to Licensor for inclusion in the Work by the copyright owner
53
+ or by an individual or Legal Entity authorized to submit on behalf of
54
+ the copyright owner. For the purposes of this definition, "submitted"
55
+ means any form of electronic, verbal, or written communication sent
56
+ to the Licensor or its representatives, including but not limited to
57
+ communication on electronic mailing lists, source code control systems,
58
+ and issue tracking systems that are managed by, or on behalf of, the
59
+ Licensor for the purpose of discussing and improving the Work, but
60
+ excluding communication that is conspicuously marked or otherwise
61
+ designated in writing by the copyright owner as "Not a Contribution."
62
+
63
+ "Contributor" shall mean Licensor and any individual or Legal Entity
64
+ on behalf of whom a Contribution has been received by Licensor and
65
+ subsequently incorporated within the Work.
66
+
67
+ 2. Grant of Copyright License. Subject to the terms and conditions of
68
+ this License, each Contributor hereby grants to You a perpetual,
69
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
70
+ copyright license to reproduce, prepare Derivative Works of,
71
+ publicly display, publicly perform, sublicense, and distribute the
72
+ Work and such Derivative Works in Source or Object form.
73
+
74
+ 3. Grant of Patent License. Subject to the terms and conditions of
75
+ this License, each Contributor hereby grants to You a perpetual,
76
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
77
+ (except as stated in this section) patent license to make, have made,
78
+ use, offer to sell, sell, import, and otherwise transfer the Work,
79
+ where such license applies only to those patent claims licensable
80
+ by such Contributor that are necessarily infringed by their
81
+ Contribution(s) alone or by combination of their Contribution(s)
82
+ with the Work to which such Contribution(s) was submitted. If You
83
+ institute patent litigation against any entity (including a
84
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
85
+ or a Contribution incorporated within the Work constitutes direct
86
+ or contributory patent infringement, then any patent licenses
87
+ granted to You under this License for that Work shall terminate
88
+ as of the date such litigation is filed.
89
+
90
+ 4. Redistribution. You may reproduce and distribute copies of the
91
+ Work or Derivative Works thereof in any medium, with or without
92
+ modifications, and in Source or Object form, provided that You
93
+ meet the following conditions:
94
+
95
+ (a) You must give any other recipients of the Work or
96
+ Derivative Works a copy of this License; and
97
+
98
+ (b) You must cause any modified files to carry prominent notices
99
+ stating that You changed the files; and
100
+
101
+ (c) You must retain, in the Source form of any Derivative Works
102
+ that You distribute, all copyright, patent, trademark, and
103
+ attribution notices from the Source form of the Work,
104
+ excluding those notices that do not pertain to any part of
105
+ the Derivative Works; and
106
+
107
+ (d) If the Work includes a "NOTICE" text file as part of its
108
+ distribution, then any Derivative Works that You distribute must
109
+ include a readable copy of the attribution notices contained
110
+ within such NOTICE file, excluding those notices that do not
111
+ pertain to any part of the Derivative Works, in at least one
112
+ of the following places: within a NOTICE text file distributed
113
+ as part of the Derivative Works; within the Source form or
114
+ documentation, if provided along with the Derivative Works; or,
115
+ within a display generated by the Derivative Works, if and
116
+ wherever such third-party notices normally appear. The contents
117
+ of the NOTICE file are for informational purposes only and
118
+ do not modify the License. You may add Your own attribution
119
+ notices within Derivative Works that You distribute, alongside
120
+ or as an addendum to the NOTICE text from the Work, provided
121
+ that such additional attribution notices cannot be construed
122
+ as modifying the License.
123
+
124
+ You may add Your own copyright statement to Your modifications and
125
+ may provide additional or different license terms and conditions
126
+ for use, reproduction, or distribution of Your modifications, or
127
+ for any such Derivative Works as a whole, provided Your use,
128
+ reproduction, and distribution of the Work otherwise complies with
129
+ the conditions stated in this License.
130
+
131
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
132
+ any Contribution intentionally submitted for inclusion in the Work
133
+ by You to the Licensor shall be under the terms and conditions of
134
+ this License, without any additional terms or conditions.
135
+ Notwithstanding the above, nothing herein shall supersede or modify
136
+ the terms of any separate license agreement you may have executed
137
+ with Licensor regarding such Contributions.
138
+
139
+ 6. Trademarks. This License does not grant permission to use the trade
140
+ names, trademarks, service marks, or product names of the Licensor,
141
+ except as required for reasonable and customary use in describing the
142
+ origin of the Work and reproducing the content of the NOTICE file.
143
+
144
+ 7. Disclaimer of Warranty. Unless required by applicable law or
145
+ agreed to in writing, Licensor provides the Work (and each
146
+ Contributor provides its Contributions) on an "AS IS" BASIS,
147
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
148
+ implied, including, without limitation, any warranties or conditions
149
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
150
+ PARTICULAR PURPOSE. You are solely responsible for determining the
151
+ appropriateness of using or redistributing the Work and assume any
152
+ risks associated with Your exercise of permissions under this License.
153
+
154
+ 8. Limitation of Liability. In no event and under no legal theory,
155
+ whether in tort (including negligence), contract, or otherwise,
156
+ unless required by applicable law (such as deliberate and grossly
157
+ negligent acts) or agreed to in writing, shall any Contributor be
158
+ liable to You for damages, including any direct, indirect, special,
159
+ incidental, or consequential damages of any character arising as a
160
+ result of this License or out of the use or inability to use the
161
+ Work (including but not limited to damages for loss of goodwill,
162
+ work stoppage, computer failure or malfunction, or any and all
163
+ other commercial damages or losses), even if such Contributor
164
+ has been advised of the possibility of such damages.
165
+
166
+ 9. Accepting Warranty or Additional Liability. While redistributing
167
+ the Work or Derivative Works thereof, You may choose to offer,
168
+ and charge a fee for, acceptance of support, warranty, indemnity,
169
+ or other liability obligations and/or rights consistent with this
170
+ License. However, in accepting such obligations, You may act only
171
+ on Your own behalf and on Your sole responsibility, not on behalf
172
+ of any other Contributor, and only if You agree to indemnify,
173
+ defend, and hold each Contributor harmless for any liability
174
+ incurred by, or claims asserted against, such Contributor by reason
175
+ of your accepting any such warranty or additional liability.
176
+
177
+ END OF TERMS AND CONDITIONS
178
+
179
+ APPENDIX: How to apply the Apache License to your work.
180
+
181
+ To apply the Apache License to your work, attach the following
182
+ boilerplate notice, with the fields enclosed by brackets "[]"
183
+ replaced with your own identifying information. (Don't include
184
+ the brackets!) The text should be enclosed in the appropriate
185
+ comment syntax for the file format. We also recommend that a
186
+ file or class name and description of purpose be included on the
187
+ same "printed page" as the copyright notice for easier
188
+ identification within third-party archives.
189
+
190
+ Copyright [yyyy] [name of copyright owner]
191
+
192
+ Licensed under the Apache License, Version 2.0 (the "License");
193
+ you may not use this file except in compliance with the License.
194
+ You may obtain a copy of the License at
195
+
196
+ http://www.apache.org/licenses/LICENSE-2.0
197
+
198
+ Unless required by applicable law or agreed to in writing, software
199
+ distributed under the License is distributed on an "AS IS" BASIS,
200
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
201
+ See the License for the specific language governing permissions and
202
+ limitations under the License.
@@ -104,8 +104,11 @@ class SitecoreNextjsClient extends client_1.SitecoreClient {
104
104
  * @returns {Promise<StaticParams[]>} Array of `{ site, locale, path }` entries for `generateStaticParams`.
105
105
  */
106
106
  getAppRouterStaticParams(sites, languages, fetchOptions) {
107
+ const _super = Object.create(null, {
108
+ getPagePaths: { get: () => super.getPagePaths }
109
+ });
107
110
  return __awaiter(this, void 0, void 0, function* () {
108
- const staticPaths = yield this.getPagePaths(sites, languages, fetchOptions);
111
+ const staticPaths = yield _super.getPagePaths.call(this, sites, languages, fetchOptions);
109
112
  const params = new Array();
110
113
  staticPaths.map((path) => {
111
114
  var _a;
@@ -120,6 +123,29 @@ class SitecoreNextjsClient extends client_1.SitecoreClient {
120
123
  return params;
121
124
  });
122
125
  }
126
+ /**
127
+ * Retrieves the static paths for pages based on the given languages.
128
+ * @param {string[]} sites - An array of site names to fetch routes for.
129
+ * @param {string[]} [languages] - An optional array of language codes to generate paths for.
130
+ * @param {FetchOptions} [fetchOptions] - Additional fetch options.
131
+ * @returns {Promise<StaticPath[]>} A promise that resolves to an array of static paths.
132
+ */
133
+ getPagePaths(sites, languages, fetchOptions) {
134
+ const _super = Object.create(null, {
135
+ getPagePaths: { get: () => super.getPagePaths }
136
+ });
137
+ return __awaiter(this, void 0, void 0, function* () {
138
+ var _a;
139
+ const staticPaths = yield _super.getPagePaths.call(this, sites, languages, fetchOptions);
140
+ if (!((_a = this.initOptions.multisite) === null || _a === void 0 ? void 0 : _a.enabled)) {
141
+ // remove _site_ segments when multisite is disabled
142
+ staticPaths.map((path) => {
143
+ path.params.path = (0, site_1.normalizeSiteRewrite)(path.params.path.join('/')).split('/');
144
+ });
145
+ }
146
+ return staticPaths;
147
+ });
148
+ }
123
149
  /**
124
150
  * Parses components from nextjs component map and layoutData, executes getServerProps/getStaticProps methods
125
151
  * and returns resulting props from components
@@ -127,7 +127,7 @@ const RichText = (props) => {
127
127
  link.addEventListener('click', routeHandler, false);
128
128
  });
129
129
  };
130
- return react_1.default.createElement(react_2.RichText, Object.assign({ ref: richTextRef, editable: editable }, rest));
130
+ return (react_1.default.createElement(react_2.RichText, Object.assign({ ref: richTextRef, editable: editable }, rest)));
131
131
  };
132
132
  exports.RichText = RichText;
133
133
  exports.RichText.displayName = 'NextRichText';
@@ -126,9 +126,11 @@ class RedirectsMiddleware extends middleware_1.MiddlewareBase {
126
126
  ? (0, utils_1.mergeURLSearchParams)(new URLSearchParams((_a = url.search) !== null && _a !== void 0 ? _a : ''), new URLSearchParams(targetQueryString || ''))
127
127
  : targetQueryString || '';
128
128
  const prepareNewURL = new URL(`${targetPath}${mergedQueryString ? '?' + mergedQueryString : ''}`, url.origin);
129
+ const basePath = url.basePath; // setting NextUrl.href overrides basePath, so we need to store it
129
130
  url.href = prepareNewURL.href;
130
131
  url.pathname = prepareNewURL.pathname;
131
132
  url.search = prepareNewURL.search;
133
+ url.basePath = basePath;
132
134
  if (!isAppRouterRequest) {
133
135
  url.locale = req.nextUrl.locale;
134
136
  }
@@ -291,9 +293,11 @@ class RedirectsMiddleware extends middleware_1.MiddlewareBase {
291
293
  })
292
294
  .join('&');
293
295
  const newUrl = new URL(`${url.pathname.toLowerCase()}?${newQueryString}`, url.origin);
296
+ const basePath = url.basePath; // setting NextUrl.href overrides basePath, so we need to store it
294
297
  url.search = newUrl.search;
295
298
  url.pathname = newUrl.pathname.toLocaleLowerCase();
296
299
  url.href = newUrl.href;
300
+ url.basePath = basePath;
297
301
  return url;
298
302
  }
299
303
  /**
@@ -312,9 +316,40 @@ class RedirectsMiddleware extends middleware_1.MiddlewareBase {
312
316
  return this.createRedirectResponse(target, res, 301, 'Moved Permanently');
313
317
  case site_1.REDIRECT_TYPE_302:
314
318
  return this.createRedirectResponse(target, res, 302, 'Found');
315
- case site_1.REDIRECT_TYPE_SERVER_TRANSFER:
316
- // rewrite expects a string; unwrap NextURL if needed
317
- return this.rewrite(typeof target === 'string' ? target : target.href, req, res, isExternal);
319
+ case site_1.REDIRECT_TYPE_SERVER_TRANSFER: {
320
+ // rewrite expects a path string; for NextURL extract pathname + search
321
+ let rewritePath = typeof target === 'string' ? target : `${target.pathname}${target.search || ''}`;
322
+ // For App Router Server Transfer, ensure locale is in the path
323
+ // This is needed because the route structure requires [locale] segment
324
+ if (this.isAppRouter(res) && !isExternal) {
325
+ const pathParts = rewritePath.split('/').filter(Boolean);
326
+ const firstSegment = pathParts[0];
327
+ // Check if path doesn't start with a locale
328
+ if (!this.locales.includes(firstSegment)) {
329
+ // Add current language as locale prefix
330
+ const language = this.getLanguage(req, res);
331
+ rewritePath = `/${language}${rewritePath}`;
332
+ }
333
+ }
334
+ // Check if it has a site prefix
335
+ // If so, preserve it for the redirect target to maintain proper routing
336
+ const incomingRewrite = res === null || res === void 0 ? void 0 : res.headers.get(middleware_1.REWRITE_HEADER_NAME);
337
+ if (incomingRewrite && !isExternal) {
338
+ // Extract locale from target path
339
+ const targetPathParts = rewritePath.split('/').filter(Boolean);
340
+ const targetLocale = targetPathParts[0];
341
+ // Find locale position in incoming rewrite to extract site prefix
342
+ if (targetLocale) {
343
+ const localePattern = `/${targetLocale}/`;
344
+ const localeIndex = incomingRewrite.indexOf(localePattern);
345
+ if (localeIndex > 0) {
346
+ const sitePrefix = incomingRewrite.substring(0, localeIndex);
347
+ rewritePath = `${sitePrefix}${rewritePath}`;
348
+ }
349
+ }
350
+ }
351
+ return this.rewrite(rewritePath, req, res, isExternal);
352
+ }
318
353
  default:
319
354
  return res;
320
355
  }
@@ -114,6 +114,7 @@ const prepareComponentsForMap = (components, opts) => {
114
114
  return entries;
115
115
  };
116
116
  const buildNextjsMapContent = (entries, componentImports, options = {}) => {
117
+ const isAppRouter = (0, utils_1.detectRouterType)() === 'app';
117
118
  const { headerComment = "Below are built-in components that are available in the app, it's recommended to keep them as is", isClientMap = false, } = options;
118
119
  const wildcardImports = [];
119
120
  const namedImports = [];
@@ -125,7 +126,7 @@ import { Form } from '@sitecore-content-sdk/nextjs';
125
126
  const builtInMapEntries = options.builtInMapEntries || [
126
127
  `['BYOCWrapper', BYOCWrapper]`,
127
128
  `['FEaaSWrapper', FEaaSWrapper]`,
128
- `['Form', Form]`,
129
+ `['Form', ${isAppRouter ? '{ ...Form, componentType: \'client\' }' : 'Form'}]`,
129
130
  ];
130
131
  // Add per-entry imports
131
132
  entries.forEach((e) => wildcardImports.push(...e.imports));
@@ -259,7 +260,7 @@ import { Form } from '@sitecore-content-sdk/nextjs';
259
260
  const builtInMapEntries = [
260
261
  `['BYOCWrapper', BYOCServerWrapper]`,
261
262
  `['FEaaSWrapper', FEaaSServerWrapper]`,
262
- `['Form', Form]`,
263
+ `['Form', { ...Form, componentType: 'client' }]`,
263
264
  ];
264
265
  mainContent = buildNextjsMapContent(getComponents.entries, componentImports, {
265
266
  headerComment: "Below are built-in components that are available in the app, it's recommended to keep them as is",
@@ -101,8 +101,11 @@ export class SitecoreNextjsClient extends SitecoreClient {
101
101
  * @returns {Promise<StaticParams[]>} Array of `{ site, locale, path }` entries for `generateStaticParams`.
102
102
  */
103
103
  getAppRouterStaticParams(sites, languages, fetchOptions) {
104
+ const _super = Object.create(null, {
105
+ getPagePaths: { get: () => super.getPagePaths }
106
+ });
104
107
  return __awaiter(this, void 0, void 0, function* () {
105
- const staticPaths = yield this.getPagePaths(sites, languages, fetchOptions);
108
+ const staticPaths = yield _super.getPagePaths.call(this, sites, languages, fetchOptions);
106
109
  const params = new Array();
107
110
  staticPaths.map((path) => {
108
111
  var _a;
@@ -117,6 +120,29 @@ export class SitecoreNextjsClient extends SitecoreClient {
117
120
  return params;
118
121
  });
119
122
  }
123
+ /**
124
+ * Retrieves the static paths for pages based on the given languages.
125
+ * @param {string[]} sites - An array of site names to fetch routes for.
126
+ * @param {string[]} [languages] - An optional array of language codes to generate paths for.
127
+ * @param {FetchOptions} [fetchOptions] - Additional fetch options.
128
+ * @returns {Promise<StaticPath[]>} A promise that resolves to an array of static paths.
129
+ */
130
+ getPagePaths(sites, languages, fetchOptions) {
131
+ const _super = Object.create(null, {
132
+ getPagePaths: { get: () => super.getPagePaths }
133
+ });
134
+ return __awaiter(this, void 0, void 0, function* () {
135
+ var _a;
136
+ const staticPaths = yield _super.getPagePaths.call(this, sites, languages, fetchOptions);
137
+ if (!((_a = this.initOptions.multisite) === null || _a === void 0 ? void 0 : _a.enabled)) {
138
+ // remove _site_ segments when multisite is disabled
139
+ staticPaths.map((path) => {
140
+ path.params.path = normalizeSiteRewrite(path.params.path.join('/')).split('/');
141
+ });
142
+ }
143
+ return staticPaths;
144
+ });
145
+ }
120
146
  /**
121
147
  * Parses components from nextjs component map and layoutData, executes getServerProps/getStaticProps methods
122
148
  * and returns resulting props from components
@@ -91,6 +91,6 @@ export const RichText = (props) => {
91
91
  link.addEventListener('click', routeHandler, false);
92
92
  });
93
93
  };
94
- return React.createElement(ReactRichText, Object.assign({ ref: richTextRef, editable: editable }, rest));
94
+ return (React.createElement(ReactRichText, Object.assign({ ref: richTextRef, editable: editable }, rest)));
95
95
  };
96
96
  RichText.displayName = 'NextRichText';
@@ -120,9 +120,11 @@ export class RedirectsMiddleware extends MiddlewareBase {
120
120
  ? mergeURLSearchParams(new URLSearchParams((_a = url.search) !== null && _a !== void 0 ? _a : ''), new URLSearchParams(targetQueryString || ''))
121
121
  : targetQueryString || '';
122
122
  const prepareNewURL = new URL(`${targetPath}${mergedQueryString ? '?' + mergedQueryString : ''}`, url.origin);
123
+ const basePath = url.basePath; // setting NextUrl.href overrides basePath, so we need to store it
123
124
  url.href = prepareNewURL.href;
124
125
  url.pathname = prepareNewURL.pathname;
125
126
  url.search = prepareNewURL.search;
127
+ url.basePath = basePath;
126
128
  if (!isAppRouterRequest) {
127
129
  url.locale = req.nextUrl.locale;
128
130
  }
@@ -285,9 +287,11 @@ export class RedirectsMiddleware extends MiddlewareBase {
285
287
  })
286
288
  .join('&');
287
289
  const newUrl = new URL(`${url.pathname.toLowerCase()}?${newQueryString}`, url.origin);
290
+ const basePath = url.basePath; // setting NextUrl.href overrides basePath, so we need to store it
288
291
  url.search = newUrl.search;
289
292
  url.pathname = newUrl.pathname.toLocaleLowerCase();
290
293
  url.href = newUrl.href;
294
+ url.basePath = basePath;
291
295
  return url;
292
296
  }
293
297
  /**
@@ -306,9 +310,40 @@ export class RedirectsMiddleware extends MiddlewareBase {
306
310
  return this.createRedirectResponse(target, res, 301, 'Moved Permanently');
307
311
  case REDIRECT_TYPE_302:
308
312
  return this.createRedirectResponse(target, res, 302, 'Found');
309
- case REDIRECT_TYPE_SERVER_TRANSFER:
310
- // rewrite expects a string; unwrap NextURL if needed
311
- return this.rewrite(typeof target === 'string' ? target : target.href, req, res, isExternal);
313
+ case REDIRECT_TYPE_SERVER_TRANSFER: {
314
+ // rewrite expects a path string; for NextURL extract pathname + search
315
+ let rewritePath = typeof target === 'string' ? target : `${target.pathname}${target.search || ''}`;
316
+ // For App Router Server Transfer, ensure locale is in the path
317
+ // This is needed because the route structure requires [locale] segment
318
+ if (this.isAppRouter(res) && !isExternal) {
319
+ const pathParts = rewritePath.split('/').filter(Boolean);
320
+ const firstSegment = pathParts[0];
321
+ // Check if path doesn't start with a locale
322
+ if (!this.locales.includes(firstSegment)) {
323
+ // Add current language as locale prefix
324
+ const language = this.getLanguage(req, res);
325
+ rewritePath = `/${language}${rewritePath}`;
326
+ }
327
+ }
328
+ // Check if it has a site prefix
329
+ // If so, preserve it for the redirect target to maintain proper routing
330
+ const incomingRewrite = res === null || res === void 0 ? void 0 : res.headers.get(REWRITE_HEADER_NAME);
331
+ if (incomingRewrite && !isExternal) {
332
+ // Extract locale from target path
333
+ const targetPathParts = rewritePath.split('/').filter(Boolean);
334
+ const targetLocale = targetPathParts[0];
335
+ // Find locale position in incoming rewrite to extract site prefix
336
+ if (targetLocale) {
337
+ const localePattern = `/${targetLocale}/`;
338
+ const localeIndex = incomingRewrite.indexOf(localePattern);
339
+ if (localeIndex > 0) {
340
+ const sitePrefix = incomingRewrite.substring(0, localeIndex);
341
+ rewritePath = `${sitePrefix}${rewritePath}`;
342
+ }
343
+ }
344
+ }
345
+ return this.rewrite(rewritePath, req, res, isExternal);
346
+ }
312
347
  default:
313
348
  return res;
314
349
  }
@@ -78,6 +78,7 @@ const prepareComponentsForMap = (components, opts) => {
78
78
  return entries;
79
79
  };
80
80
  const buildNextjsMapContent = (entries, componentImports, options = {}) => {
81
+ const isAppRouter = detectRouterType() === 'app';
81
82
  const { headerComment = "Below are built-in components that are available in the app, it's recommended to keep them as is", isClientMap = false, } = options;
82
83
  const wildcardImports = [];
83
84
  const namedImports = [];
@@ -89,7 +90,7 @@ import { Form } from '@sitecore-content-sdk/nextjs';
89
90
  const builtInMapEntries = options.builtInMapEntries || [
90
91
  `['BYOCWrapper', BYOCWrapper]`,
91
92
  `['FEaaSWrapper', FEaaSWrapper]`,
92
- `['Form', Form]`,
93
+ `['Form', ${isAppRouter ? '{ ...Form, componentType: \'client\' }' : 'Form'}]`,
93
94
  ];
94
95
  // Add per-entry imports
95
96
  entries.forEach((e) => wildcardImports.push(...e.imports));
@@ -222,7 +223,7 @@ import { Form } from '@sitecore-content-sdk/nextjs';
222
223
  const builtInMapEntries = [
223
224
  `['BYOCWrapper', BYOCServerWrapper]`,
224
225
  `['FEaaSWrapper', FEaaSServerWrapper]`,
225
- `['Form', Form]`,
226
+ `['Form', { ...Form, componentType: 'client' }]`,
226
227
  ];
227
228
  mainContent = buildNextjsMapContent(getComponents.entries, componentImports, {
228
229
  headerComment: "Below are built-in components that are available in the app, it's recommended to keep them as is",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sitecore-content-sdk/nextjs",
3
- "version": "1.4.0-canary.9",
3
+ "version": "1.4.0",
4
4
  "main": "dist/cjs/index.js",
5
5
  "module": "dist/esm/index.js",
6
6
  "sideEffects": false,
@@ -91,8 +91,8 @@
91
91
  },
92
92
  "dependencies": {
93
93
  "@babel/parser": "^7.27.2",
94
- "@sitecore-content-sdk/core": "1.4.0-canary.9",
95
- "@sitecore-content-sdk/react": "1.4.0-canary.9",
94
+ "@sitecore-content-sdk/core": "^1.4.0",
95
+ "@sitecore-content-sdk/react": "^1.4.0",
96
96
  "recast": "^0.23.11",
97
97
  "regex-parser": "^2.3.1",
98
98
  "sync-disk-cache": "^2.1.0"
@@ -171,7 +171,7 @@
171
171
  },
172
172
  "description": "",
173
173
  "types": "types/index.d.ts",
174
- "gitHead": "d6d456ba7f417687b97043650089598078a8b5c1",
174
+ "gitHead": "ad1a9837056c5d35b49f0bdb471e8f3b1a2d2197",
175
175
  "files": [
176
176
  "dist",
177
177
  "types",
@@ -1,3 +1,4 @@
1
+ import { StaticPath } from '@sitecore-content-sdk/core';
1
2
  import { FetchOptions, Page, PageOptions, SitecoreClient, SitecoreClientInit } from '@sitecore-content-sdk/core/client';
2
3
  import { ComponentPropsCollection, NextjsContentSdkComponent } from '../sharedTypes/component-props';
3
4
  import { GetServerSidePropsContext, GetStaticPropsContext, PreviewData } from 'next';
@@ -5,14 +6,20 @@ import { LayoutServiceData } from '@sitecore-content-sdk/core/layout';
5
6
  import { ComponentPropsService } from '../services/component-props-service';
6
7
  import { ComponentMap } from '@sitecore-content-sdk/react';
7
8
  import { StaticParams } from './models';
9
+ import { SitecoreConfig } from '../config';
10
+ /**
11
+ * Init options for Sitecore Client that allows you to override services too
12
+ * @public
13
+ */
14
+ export type SitecoreNextjsClientInit = SitecoreClientInit & Pick<SitecoreConfig, 'multisite'>;
8
15
  /**
9
16
  * The SitecoreNextjsClient class extends the SitecoreClient class to provide additional functionality for Next.js.
10
17
  * @public
11
18
  */
12
19
  export declare class SitecoreNextjsClient extends SitecoreClient {
13
- protected initOptions: SitecoreClientInit;
20
+ protected initOptions: SitecoreNextjsClientInit;
14
21
  protected componentPropsService: ComponentPropsService;
15
- constructor(initOptions: SitecoreClientInit);
22
+ constructor(initOptions: SitecoreNextjsClientInit);
16
23
  /**
17
24
  * Gets site name based on the provided path
18
25
  * @param {string | string[]} path path to get site name from
@@ -54,6 +61,14 @@ export declare class SitecoreNextjsClient extends SitecoreClient {
54
61
  * @returns {Promise<StaticParams[]>} Array of `{ site, locale, path }` entries for `generateStaticParams`.
55
62
  */
56
63
  getAppRouterStaticParams(sites: string[], languages?: string[], fetchOptions?: FetchOptions): Promise<StaticParams[]>;
64
+ /**
65
+ * Retrieves the static paths for pages based on the given languages.
66
+ * @param {string[]} sites - An array of site names to fetch routes for.
67
+ * @param {string[]} [languages] - An optional array of language codes to generate paths for.
68
+ * @param {FetchOptions} [fetchOptions] - Additional fetch options.
69
+ * @returns {Promise<StaticPath[]>} A promise that resolves to an array of static paths.
70
+ */
71
+ getPagePaths(sites: string[], languages?: string[], fetchOptions?: FetchOptions): Promise<StaticPath[]>;
57
72
  /**
58
73
  * Parses components from nextjs component map and layoutData, executes getServerProps/getStaticProps methods
59
74
  * and returns resulting props from components
@@ -1 +1 @@
1
- {"version":3,"file":"sitecore-nextjs-client.d.ts","sourceRoot":"","sources":["../../src/client/sitecore-nextjs-client.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,YAAY,EACZ,IAAI,EACJ,WAAW,EACX,cAAc,EACd,kBAAkB,EACnB,MAAM,mCAAmC,CAAC;AAC3C,OAAO,EACL,wBAAwB,EAExB,yBAAyB,EAC1B,MAAM,gCAAgC,CAAC;AACxC,OAAO,EAAE,yBAAyB,EAAE,qBAAqB,EAAE,WAAW,EAAE,MAAM,MAAM,CAAC;AACrF,OAAO,EAAE,iBAAiB,EAAE,MAAM,mCAAmC,CAAC;AACtE,OAAO,EAAE,qBAAqB,EAAE,MAAM,qCAAqC,CAAC;AAU5E,OAAO,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAC3D,OAAO,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAExC;;;GAGG;AACH,qBAAa,oBAAqB,SAAQ,cAAc;IAE1C,SAAS,CAAC,WAAW,EAAE,kBAAkB;IADrD,SAAS,C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;;;;;;;OAaG;IACG,wBAAwB,CAC5B,KAAK,EAAE,MAAM,EAAE,EACf,SAAS,CAAC,EAAE,MAAM,EAAE,EACpB,YAAY,CAAC,EAAE,YAAY,GAC1B,OAAO,CAAC,YAAY,EAAE,CAAC;IAmB1B;;;;;;OAMG;IACG,YAAY,CAChB,KAAK,EAAE,MAAM,EAAE,EACf,SAAS,CAAC,EAAE,MAAM,EAAE,EACpB,YAAY,CAAC,EAAE,YAAY,GAC1B,OAAO,CAAC,UAAU,EAAE,CAAC;IAaxB;;;;;;;OAOG;IACG,gBAAgB,CACpB,UAAU,EAAE,iBAAiB,EAC7B,OAAO,EAAE,yBAAyB,GAAG,qBAAqB,EAC1D,UAAU,EAAE,YAAY,CAAC,yBAAyB,CAAC,GAClD,OAAO,CAAC,wBAAwB,CAAC;IA2BpC,SAAS,CAAC,wBAAwB,IAAI,qBAAqB;CAG5D"}
@@ -1 +1 @@
1
- {"version":3,"file":"RichText.d.ts","sourceRoot":"","sources":["../../src/components/RichText.tsx"],"names":[],"mappings":"AACA,OAAc,EAAqB,GAAG,EAAE,MAAM,OAAO,CAAC;AAGtD,OAAO,EAEL,aAAa,IAAI,kBAAkB,EACpC,MAAM,6BAA6B,CAAC;AAErC;;;GAGG;AACH,MAAM,MAAM,aAAa,GAAG,kBAAkB,GAAG;IAC/C;;;OAGG;IACH,qBAAqB,CAAC,EAAE,MAAM,CAAC;IAE/B;;;;;;;OAOG;IACH,aAAa,CAAC,EAAE,OAAO,GAAG,OAAO,CAAC;CACnC,CAAC;AAEF,eAAO,MAAM,UAAU,EAAE;IAAE,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAA;CAAO,CAAC;AAiB9D;;;;GAIG;AACH,eAAO,MAAM,QAAQ;YAAW,aAAa,GAAG,GAAG,CAAC,OAAO;;CA6E1D,CAAC"}
1
+ {"version":3,"file":"RichText.d.ts","sourceRoot":"","sources":["../../src/components/RichText.tsx"],"names":[],"mappings":"AACA,OAAc,EAAqB,G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AAO;IAyC7C;;;;;;;;;OASG;IACH,SAAS,CAAC,gBAAgB,CACxB,MAAM,EAAE,OAAO,GAAG,MAAM,EACxB,IAAI,EAAE,MAAM,EACZ,GAAG,EAAE,WAAW,EAChB,GAAG,EAAE,YAAY,EACjB,UAAU,UAAQ,GACjB,YAAY;IAkDf;;;;;;;OAOG;IACH,SAAS,CAAC,sBAAsB,CAC9B,GAAG,EAAE,OAAO,GAAG,MAAM,EACrB,GAAG,EAAE,QAAQ,GAAG,SAAS,EACzB,MAAM,EAAE,MAAM,EACd,UAAU,EAAE,MAAM,GACjB,YAAY;CAahB"}
@@ -1 +1 @@
1
- {"version":3,"file":"generate-map.d.ts","sourceRoot":"","sources":["../../src/tools/generate-map.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,mBAAmB,EAInB,4BAA4B,EAG7B,MAAM,kCAAkC,CAAC;AAsM1C,eAAO,MAAM,wBAAwB,EAAE,4BA4BtC,CAAC;AAEF,MAAM,MAAM,aAAa,GAAG,KAAK,GAAG,QAAQ,GAAG,QAAQ,GAAG,WAAW,CAAC;AA6BtE;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,eAAO,MAAM,WAAW,EAAE,mBAkIzB,CAAC"}
1
+ {"version":3,"file":"generate-map.d.ts","sourceRoot":"","sources":["../../src/tools/generate-map.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,mBAAmB,EAInB,4BAA4B,EAG7B,MAAM,kCAAkC,CAAC;AAuM1C,eAAO,MAAM,wBAAwB,EAAE,4BA4BtC,CAAC;AAEF,MAAM,MAAM,aAAa,GAAG,KAAK,GAAG,QAAQ,GAAG,QAAQ,GAAG,WAAW,CAAC;AA6BtE;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,eAAO,MAAM,WAAW,EAAE,mBAkIzB,CAAC"}