@enonic/nextjs-adapter 3.2.1 → 3.3.0-B1

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 (288) hide show
  1. package/package.json +44 -25
  2. package/src/baseMappings.ts +9 -9
  3. package/src/common/ComponentRegistry.ts +2 -5
  4. package/src/common/constants.ts +4 -4
  5. package/src/common/env.ts +1 -1
  6. package/src/guillotine/applyProcessors.ts +3 -7
  7. package/src/guillotine/buildComponentTree.ts +1 -1
  8. package/src/guillotine/buildErrorResponse.ts +3 -3
  9. package/src/guillotine/buildPage.ts +2 -2
  10. package/src/guillotine/collectComponentDescriptors.ts +6 -13
  11. package/src/guillotine/combineMultipleQueries.ts +3 -6
  12. package/src/guillotine/createMetaData.ts +2 -2
  13. package/src/guillotine/fetchContent.ts +8 -14
  14. package/src/guillotine/fetchContentData.ts +4 -10
  15. package/src/guillotine/fetchContentPathsForAllLocales.ts +3 -3
  16. package/src/guillotine/fetchContentPathsForLocale.ts +7 -7
  17. package/src/guillotine/fetchFromApi.ts +8 -8
  18. package/src/guillotine/fetchGuillotine.ts +22 -9
  19. package/src/guillotine/fetchMetaData.ts +5 -5
  20. package/src/guillotine/getCleanContentPathArrayOrThrow400.ts +2 -2
  21. package/src/guillotine/getParentRegion.ts +2 -2
  22. package/src/guillotine/getQueryAndVariables.ts +5 -9
  23. package/src/guillotine/metadata/configQuery.ts +2 -2
  24. package/src/guillotine/parseComponentPath.ts +4 -7
  25. package/src/guillotine/processComponentConfig.ts +1 -1
  26. package/src/guillotine/restrictComponentsToPath.ts +1 -1
  27. package/src/i18n/LocaleContext.tsx +3 -3
  28. package/src/index.ts +3 -3
  29. package/src/types/component.ts +1 -1
  30. package/src/types/componentProps.ts +4 -3
  31. package/src/types/guillotine.ts +1 -1
  32. package/src/types/index.ts +3 -3
  33. package/src/utils/buildGuillotineRequestHeaders.ts +4 -7
  34. package/src/utils/fixDoubleSlashes.ts +1 -1
  35. package/src/utils/getLocaleMappings.ts +1 -1
  36. package/src/utils/getRenderMode.ts +2 -5
  37. package/src/views/BaseComponent.tsx +5 -5
  38. package/src/views/BaseContent.tsx +1 -1
  39. package/src/views/BaseMacro.tsx +1 -1
  40. package/src/views/PropsView.tsx +1 -1
  41. package/src/views/RichTextView.tsx +68 -25
  42. package/src/views/StaticContent.tsx +1 -1
  43. package/baseMappings.d.ts +0 -1
  44. package/baseMappings.js +0 -43
  45. package/baseMappings.js.map +0 -1
  46. package/client/getClientHydratedHtml.d.ts +0 -1
  47. package/client/getClientHydratedHtml.jsx +0 -9
  48. package/client/getClientHydratedHtml.jsx.map +0 -1
  49. package/client.d.ts +0 -1
  50. package/client.js +0 -3
  51. package/client.js.map +0 -1
  52. package/common/ComponentRegistry.d.ts +0 -34
  53. package/common/ComponentRegistry.js +0 -121
  54. package/common/ComponentRegistry.js.map +0 -1
  55. package/common/UrlProcessor.d.ts +0 -25
  56. package/common/UrlProcessor.js +0 -151
  57. package/common/UrlProcessor.js.map +0 -1
  58. package/common/constants.d.ts +0 -51
  59. package/common/constants.js +0 -86
  60. package/common/constants.js.map +0 -1
  61. package/common/env.d.ts +0 -12
  62. package/common/env.js +0 -30
  63. package/common/env.js.map +0 -1
  64. package/guillotine/applyProcessors.d.ts +0 -2
  65. package/guillotine/applyProcessors.js +0 -33
  66. package/guillotine/applyProcessors.js.map +0 -1
  67. package/guillotine/buildComponentTree.d.ts +0 -2
  68. package/guillotine/buildComponentTree.js +0 -45
  69. package/guillotine/buildComponentTree.js.map +0 -1
  70. package/guillotine/buildErrorResponse.d.ts +0 -3
  71. package/guillotine/buildErrorResponse.js +0 -27
  72. package/guillotine/buildErrorResponse.js.map +0 -1
  73. package/guillotine/buildPage.d.ts +0 -2
  74. package/guillotine/buildPage.js +0 -10
  75. package/guillotine/buildPage.js.map +0 -1
  76. package/guillotine/collectComponentDescriptors.d.ts +0 -6
  77. package/guillotine/collectComponentDescriptors.js +0 -43
  78. package/guillotine/collectComponentDescriptors.js.map +0 -1
  79. package/guillotine/combineMultipleQueries.d.ts +0 -2
  80. package/guillotine/combineMultipleQueries.js +0 -58
  81. package/guillotine/combineMultipleQueries.js.map +0 -1
  82. package/guillotine/createMetaData.d.ts +0 -18
  83. package/guillotine/createMetaData.js +0 -45
  84. package/guillotine/createMetaData.js.map +0 -1
  85. package/guillotine/fetchContent.d.ts +0 -9
  86. package/guillotine/fetchContent.js +0 -222
  87. package/guillotine/fetchContent.js.map +0 -1
  88. package/guillotine/fetchContentData.d.ts +0 -2
  89. package/guillotine/fetchContentData.js +0 -30
  90. package/guillotine/fetchContentData.js.map +0 -1
  91. package/guillotine/fetchContentPathsForAllLocales.d.ts +0 -2
  92. package/guillotine/fetchContentPathsForAllLocales.js +0 -21
  93. package/guillotine/fetchContentPathsForAllLocales.js.map +0 -1
  94. package/guillotine/fetchContentPathsForLocale.d.ts +0 -2
  95. package/guillotine/fetchContentPathsForLocale.js +0 -41
  96. package/guillotine/fetchContentPathsForLocale.js.map +0 -1
  97. package/guillotine/fetchFromApi.d.ts +0 -3
  98. package/guillotine/fetchFromApi.js +0 -76
  99. package/guillotine/fetchFromApi.js.map +0 -1
  100. package/guillotine/fetchGuillotine.d.ts +0 -3
  101. package/guillotine/fetchGuillotine.js +0 -62
  102. package/guillotine/fetchGuillotine.js.map +0 -1
  103. package/guillotine/fetchMetaData.d.ts +0 -2
  104. package/guillotine/fetchMetaData.js +0 -33
  105. package/guillotine/fetchMetaData.js.map +0 -1
  106. package/guillotine/getCleanContentPathArrayOrThrow400.d.ts +0 -2
  107. package/guillotine/getCleanContentPathArrayOrThrow400.js +0 -20
  108. package/guillotine/getCleanContentPathArrayOrThrow400.js.map +0 -1
  109. package/guillotine/getComponentConfig.d.ts +0 -2
  110. package/guillotine/getComponentConfig.js +0 -5
  111. package/guillotine/getComponentConfig.js.map +0 -1
  112. package/guillotine/getContentAndComponentPaths.d.ts +0 -1
  113. package/guillotine/getContentAndComponentPaths.js +0 -12
  114. package/guillotine/getContentAndComponentPaths.js.map +0 -1
  115. package/guillotine/getMetaData.d.ts +0 -2
  116. package/guillotine/getMetaData.js +0 -67
  117. package/guillotine/getMetaData.js.map +0 -1
  118. package/guillotine/getParentRegion.d.ts +0 -2
  119. package/guillotine/getParentRegion.js +0 -40
  120. package/guillotine/getParentRegion.js.map +0 -1
  121. package/guillotine/getQueryAndVariables.d.ts +0 -2
  122. package/guillotine/getQueryAndVariables.js +0 -32
  123. package/guillotine/getQueryAndVariables.js.map +0 -1
  124. package/guillotine/metadata/configQuery.d.ts +0 -2
  125. package/guillotine/metadata/configQuery.js +0 -36
  126. package/guillotine/metadata/configQuery.js.map +0 -1
  127. package/guillotine/metadata/richTextQuery.d.ts +0 -1
  128. package/guillotine/metadata/richTextQuery.js +0 -47
  129. package/guillotine/metadata/richTextQuery.js.map +0 -1
  130. package/guillotine/parseComponentPath.d.ts +0 -2
  131. package/guillotine/parseComponentPath.js +0 -22
  132. package/guillotine/parseComponentPath.js.map +0 -1
  133. package/guillotine/prefixFragmentCmpPath.d.ts +0 -1
  134. package/guillotine/prefixFragmentCmpPath.js +0 -13
  135. package/guillotine/prefixFragmentCmpPath.js.map +0 -1
  136. package/guillotine/processComponentConfig.d.ts +0 -2
  137. package/guillotine/processComponentConfig.js +0 -30
  138. package/guillotine/processComponentConfig.js.map +0 -1
  139. package/guillotine/restrictComponentsToPath.d.ts +0 -2
  140. package/guillotine/restrictComponentsToPath.js +0 -38
  141. package/guillotine/restrictComponentsToPath.js.map +0 -1
  142. package/guillotine/validateData.d.ts +0 -2
  143. package/guillotine/validateData.js +0 -7
  144. package/guillotine/validateData.js.map +0 -1
  145. package/guillotine/validateNotFound.d.ts +0 -2
  146. package/guillotine/validateNotFound.js +0 -16
  147. package/guillotine/validateNotFound.js.map +0 -1
  148. package/guillotine/validateShortcut.d.ts +0 -2
  149. package/guillotine/validateShortcut.js +0 -35
  150. package/guillotine/validateShortcut.js.map +0 -1
  151. package/i18n/LocaleContext.d.ts +0 -7
  152. package/i18n/LocaleContext.jsx +0 -50
  153. package/i18n/LocaleContext.jsx.map +0 -1
  154. package/i18n/i18n.d.ts +0 -12
  155. package/i18n/i18n.js +0 -59
  156. package/i18n/i18n.js.map +0 -1
  157. package/index.d.ts +0 -14
  158. package/index.js +0 -14
  159. package/index.js.map +0 -1
  160. package/query/Shortcut.d.ts +0 -1
  161. package/query/Shortcut.js +0 -19
  162. package/query/Shortcut.js.map +0 -1
  163. package/server/getServerRenderedHtml.d.ts +0 -1
  164. package/server/getServerRenderedHtml.js +0 -4
  165. package/server/getServerRenderedHtml.js.map +0 -1
  166. package/server.d.ts +0 -5
  167. package/server.js +0 -6
  168. package/server.js.map +0 -1
  169. package/types/component.d.ts +0 -92
  170. package/types/component.js +0 -2
  171. package/types/component.js.map +0 -1
  172. package/types/componentProps.d.ts +0 -106
  173. package/types/componentProps.js +0 -2
  174. package/types/componentProps.js.map +0 -1
  175. package/types/guillotine.d.ts +0 -344
  176. package/types/guillotine.js +0 -2
  177. package/types/guillotine.js.map +0 -1
  178. package/types/i18n.d.ts +0 -7
  179. package/types/i18n.js +0 -2
  180. package/types/i18n.js.map +0 -1
  181. package/types/index.d.ts +0 -47
  182. package/types/index.js +0 -3
  183. package/types/index.js.map +0 -1
  184. package/types/next.d.ts +0 -6
  185. package/types/next.js +0 -2
  186. package/types/next.js.map +0 -1
  187. package/types/util.d.ts +0 -3
  188. package/types/util.js +0 -3
  189. package/types/util.js.map +0 -1
  190. package/utils/addLineNumbers.d.ts +0 -1
  191. package/utils/addLineNumbers.js +0 -4
  192. package/utils/addLineNumbers.js.map +0 -1
  193. package/utils/buildGuillotineRequestHeaders.d.ts +0 -7
  194. package/utils/buildGuillotineRequestHeaders.js +0 -16
  195. package/utils/buildGuillotineRequestHeaders.js.map +0 -1
  196. package/utils/commonChars.d.ts +0 -1
  197. package/utils/commonChars.js +0 -17
  198. package/utils/commonChars.js.map +0 -1
  199. package/utils/enonicLog.d.ts +0 -5
  200. package/utils/enonicLog.js +0 -23
  201. package/utils/enonicLog.js.map +0 -1
  202. package/utils/fixDoubleSlashes.d.ts +0 -1
  203. package/utils/fixDoubleSlashes.js +0 -4
  204. package/utils/fixDoubleSlashes.js.map +0 -1
  205. package/utils/getAllLocales.d.ts +0 -1
  206. package/utils/getAllLocales.js +0 -5
  207. package/utils/getAllLocales.js.map +0 -1
  208. package/utils/getContentApiUrl.d.ts +0 -2
  209. package/utils/getContentApiUrl.js +0 -15
  210. package/utils/getContentApiUrl.js.map +0 -1
  211. package/utils/getLocaleMapping.d.ts +0 -2
  212. package/utils/getLocaleMapping.js +0 -19
  213. package/utils/getLocaleMapping.js.map +0 -1
  214. package/utils/getLocaleMappingByLocale.d.ts +0 -2
  215. package/utils/getLocaleMappingByLocale.js +0 -13
  216. package/utils/getLocaleMappingByLocale.js.map +0 -1
  217. package/utils/getLocaleMappingByProjectId.d.ts +0 -2
  218. package/utils/getLocaleMappingByProjectId.js +0 -16
  219. package/utils/getLocaleMappingByProjectId.js.map +0 -1
  220. package/utils/getLocaleMappings.d.ts +0 -2
  221. package/utils/getLocaleMappings.js +0 -30
  222. package/utils/getLocaleMappings.js.map +0 -1
  223. package/utils/getRenderMode.d.ts +0 -3
  224. package/utils/getRenderMode.js +0 -8
  225. package/utils/getRenderMode.js.map +0 -1
  226. package/utils/getRequestLocaleInfo.d.ts +0 -6
  227. package/utils/getRequestLocaleInfo.js +0 -29
  228. package/utils/getRequestLocaleInfo.js.map +0 -1
  229. package/utils/getXpBaseUrl.d.ts +0 -2
  230. package/utils/getXpBaseUrl.js +0 -8
  231. package/utils/getXpBaseUrl.js.map +0 -1
  232. package/utils/indent.d.ts +0 -1
  233. package/utils/indent.js +0 -5
  234. package/utils/indent.js.map +0 -1
  235. package/utils/sanitizeGraphqlName.d.ts +0 -1
  236. package/utils/sanitizeGraphqlName.js +0 -12
  237. package/utils/sanitizeGraphqlName.js.map +0 -1
  238. package/views/BaseComponent.d.ts +0 -20
  239. package/views/BaseComponent.jsx +0 -129
  240. package/views/BaseComponent.jsx.map +0 -1
  241. package/views/BaseContent.d.ts +0 -3
  242. package/views/BaseContent.jsx +0 -38
  243. package/views/BaseContent.jsx.map +0 -1
  244. package/views/BaseLayout.d.ts +0 -3
  245. package/views/BaseLayout.jsx +0 -24
  246. package/views/BaseLayout.jsx.map +0 -1
  247. package/views/BaseMacro.d.ts +0 -6
  248. package/views/BaseMacro.jsx +0 -100
  249. package/views/BaseMacro.jsx.map +0 -1
  250. package/views/BasePage.d.ts +0 -3
  251. package/views/BasePage.jsx +0 -34
  252. package/views/BasePage.jsx.map +0 -1
  253. package/views/BasePart.d.ts +0 -3
  254. package/views/BasePart.jsx +0 -24
  255. package/views/BasePart.jsx.map +0 -1
  256. package/views/Empty.d.ts +0 -2
  257. package/views/Empty.jsx +0 -4
  258. package/views/Empty.jsx.map +0 -1
  259. package/views/Fragment.d.ts +0 -3
  260. package/views/Fragment.jsx +0 -30
  261. package/views/Fragment.jsx.map +0 -1
  262. package/views/MainView.d.ts +0 -3
  263. package/views/MainView.jsx +0 -14
  264. package/views/MainView.jsx.map +0 -1
  265. package/views/PropsView.d.ts +0 -2
  266. package/views/PropsView.jsx +0 -21
  267. package/views/PropsView.jsx.map +0 -1
  268. package/views/Region.d.ts +0 -6
  269. package/views/Region.jsx +0 -52
  270. package/views/Region.jsx.map +0 -1
  271. package/views/RichTextView.d.ts +0 -3
  272. package/views/RichTextView.jsx +0 -39
  273. package/views/RichTextView.jsx.map +0 -1
  274. package/views/SingleComponent.d.ts +0 -4
  275. package/views/SingleComponent.jsx +0 -10
  276. package/views/SingleComponent.jsx.map +0 -1
  277. package/views/StaticContent.d.ts +0 -10
  278. package/views/StaticContent.jsx +0 -37
  279. package/views/StaticContent.jsx.map +0 -1
  280. package/views/Text.d.ts +0 -8
  281. package/views/Text.jsx +0 -4
  282. package/views/Text.jsx.map +0 -1
  283. package/views/macros/DefaultMacro.d.ts +0 -3
  284. package/views/macros/DefaultMacro.jsx +0 -4
  285. package/views/macros/DefaultMacro.jsx.map +0 -1
  286. package/views/macros/DisableMacro.d.ts +0 -3
  287. package/views/macros/DisableMacro.jsx +0 -3
  288. package/views/macros/DisableMacro.jsx.map +0 -1
@@ -1,30 +0,0 @@
1
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
2
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
3
- return new (P || (P = Promise))(function (resolve, reject) {
4
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
5
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
6
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
7
- step((generator = generator.apply(thisArg, _arguments || [])).next());
8
- });
9
- };
10
- import { fetchGuillotine } from './fetchGuillotine';
11
- export const fetchContentData = (contentApiUrl, xpContentPath, mapping, query, variables, headers) => __awaiter(void 0, void 0, void 0, function* () {
12
- const body = { query };
13
- if (variables && Object.keys(variables).length > 0) {
14
- body.variables = variables;
15
- }
16
- const contentResults = yield fetchGuillotine(contentApiUrl, mapping, {
17
- body,
18
- headers,
19
- });
20
- if (contentResults.error) {
21
- return contentResults;
22
- }
23
- else {
24
- return {
25
- // omit the aliases and return values
26
- contents: Object.values(contentResults),
27
- };
28
- }
29
- });
30
- //# sourceMappingURL=fetchContentData.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"fetchContentData.js","sourceRoot":"","sources":["../src/guillotine/fetchContentData.ts"],"names":[],"mappings":";;;;;;;;;AAQA,OAAO,EAAC,eAAe,EAAC,MAAM,mBAAmB,CAAC;AAGlD,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAC5B,aAAqB,EACrB,aAAqB,EACrB,OAAsB,EACtB,KAAa,EACb,SAAuC,EACvC,OAAkC,EACZ,EAAE;IACxB,MAAM,IAAI,GAAuB,EAAC,KAAK,EAAC,CAAC;IACzC,IAAI,SAAS,IAAI,MAAM,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;QACjD,IAAI,CAAC,SAAS,GAAG,SAAS,CAAC;IAC/B,CAAC;IACD,MAAM,cAAc,GAAG,MAAM,eAAe,CAAyB,aAAa,EAAE,OAAO,EAAE;QACzF,IAAI;QACJ,OAAO;KACV,CAAC,CAAC;IAEH,IAAI,cAAc,CAAC,KAAK,EAAE,CAAC;QACvB,OAAO,cAAc,CAAC;IAC1B,CAAC;SAAM,CAAC;QACJ,OAAO;YACH,qCAAqC;YACrC,QAAQ,EAAE,MAAM,CAAC,MAAM,CAAC,cAAc,CAAC;SAC1C,CAAC;IACN,CAAC;AACL,CAAC,CAAA,CAAC"}
@@ -1,2 +0,0 @@
1
- import type { ContentPathItem } from '../types';
2
- export declare function fetchContentPathsForAllLocales(path: string, query?: string, countPerLocale?: number): Promise<ContentPathItem[]>;
@@ -1,21 +0,0 @@
1
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
2
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
3
- return new (P || (P = Promise))(function (resolve, reject) {
4
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
5
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
6
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
7
- step((generator = generator.apply(thisArg, _arguments || [])).next());
8
- });
9
- };
10
- import { GET_STATIC_PATHS_QUERY } from '../common/constants';
11
- import { getLocaleMappings } from '../utils/getLocaleMappings';
12
- import { fetchContentPathsForLocale } from './fetchContentPathsForLocale';
13
- export function fetchContentPathsForAllLocales(path_1) {
14
- return __awaiter(this, arguments, void 0, function* (path, query = GET_STATIC_PATHS_QUERY, countPerLocale = 999) {
15
- const promises = Object.values(getLocaleMappings()).map(config => fetchContentPathsForLocale(path, config, query, countPerLocale));
16
- return Promise.all(promises).then(results => {
17
- return results.reduce((all, localePaths) => all.concat(localePaths), []);
18
- });
19
- });
20
- }
21
- //# sourceMappingURL=fetchContentPathsForAllLocales.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"fetchContentPathsForAllLocales.js","sourceRoot":"","sources":["../src/guillotine/fetchContentPathsForAllLocales.ts"],"names":[],"mappings":";;;;;;;;;AAEA,OAAO,EAAC,sBAAsB,EAAC,MAAM,qBAAqB,CAAC;AAC3D,OAAO,EAAC,iBAAiB,EAAC,MAAM,4BAA4B,CAAC;AAC7D,OAAO,EAAC,0BAA0B,EAAC,MAAM,8BAA8B,CAAC;AAGxE,MAAM,UAAgB,8BAA8B;yDAChD,IAAY,EACZ,QAAgB,sBAAsB,EACtC,cAAc,GAAG,GAAG;QAEpB,MAAM,QAAQ,GAAG,MAAM,CAAC,MAAM,CAAC,iBAAiB,EAAE,CAAC,CAAC,GAAG,CACnD,MAAM,CAAC,EAAE,CAAC,0BAA0B,CAChC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,cAAc,CACtC,CACJ,CAAC;QACF,OAAO,OAAO,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC,EAAE;YACxC,OAAO,OAAO,CAAC,MAAM,CAAC,CAAC,GAAG,EAAE,WAAW,EAAE,EAAE,CAAC,GAAG,CAAC,MAAM,CAAC,WAAW,CAAC,EAAE,EAAE,CAAC,CAAC;QAC7E,CAAC,CAAC,CAAC;IACP,CAAC;CAAA"}
@@ -1,2 +0,0 @@
1
- import type { ContentPathItem, LocaleMapping } from '../types';
2
- export declare function fetchContentPathsForLocale(path: string, config: LocaleMapping, query?: string, count?: number): Promise<ContentPathItem[]>;
@@ -1,41 +0,0 @@
1
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
2
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
3
- return new (P || (P = Promise))(function (resolve, reject) {
4
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
5
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
6
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
7
- step((generator = generator.apply(thisArg, _arguments || [])).next());
8
- });
9
- };
10
- import { GET_STATIC_PATHS_QUERY } from '../common/constants';
11
- import { getContentApiUrl } from '../utils/getContentApiUrl';
12
- import { fetchGuillotine } from './fetchGuillotine';
13
- export function fetchContentPathsForLocale(path_1, config_1) {
14
- return __awaiter(this, arguments, void 0, function* (path, config, query = GET_STATIC_PATHS_QUERY, count = 999) {
15
- const contentApiUrl = getContentApiUrl({
16
- contentPath: path,
17
- locale: config.locale,
18
- });
19
- const body = {
20
- query,
21
- variables: {
22
- path,
23
- pathRegex: `/content${config.site}/*`,
24
- count,
25
- },
26
- };
27
- return fetchGuillotine(contentApiUrl, config, { body }).then((results) => {
28
- return results.guillotine.queryDsl.reduce((prev, child) => {
29
- var _a;
30
- const regexp = new RegExp(`^/${((_a = child.site) === null || _a === void 0 ? void 0 : _a._name) ? `${child.site._name}/?` : ''}`);
31
- const contentPath = child._path.replace(regexp, '');
32
- prev.push({
33
- contentPath: contentPath.split('/'),
34
- locale: config.locale,
35
- });
36
- return prev;
37
- }, []);
38
- });
39
- });
40
- }
41
- //# sourceMappingURL=fetchContentPathsForLocale.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"fetchContentPathsForLocale.js","sourceRoot":"","sources":["../src/guillotine/fetchContentPathsForLocale.ts"],"names":[],"mappings":";;;;;;;;;AAGA,OAAO,EAAC,sBAAsB,EAAC,MAAM,qBAAqB,CAAC;AAC3D,OAAO,EAAC,gBAAgB,EAAC,MAAM,2BAA2B,CAAC;AAC3D,OAAO,EAAC,eAAe,EAAC,MAAM,mBAAmB,CAAC;AAGlD,MAAM,UAAgB,0BAA0B;yDAC5C,IAAY,EACZ,MAAqB,EACrB,QAAgB,sBAAsB,EACtC,KAAK,GAAG,GAAG;QAEX,MAAM,aAAa,GAAG,gBAAgB,CAAC;YACnC,WAAW,EAAE,IAAI;YACjB,MAAM,EAAE,MAAM,CAAC,MAAM;SACxB,CAAC,CAAC;QACH,MAAM,IAAI,GAAuB;YAC7B,KAAK;YACL,SAAS,EAAE;gBACP,IAAI;gBACJ,SAAS,EAAE,WAAW,MAAM,CAAC,IAAI,IAAI;gBACrC,KAAK;aACR;SACJ,CAAC;QACF,OAAO,eAAe,CAAoB,aAAa,EAAE,MAAM,EAAE,EAAC,IAAI,EAAC,CAAC,CAAC,IAAI,CAAC,CAC1E,OAAyB,EAC3B,EAAE;YACA,OAAO,OAAO,CAAC,UAAU,CAAC,QAAQ,CAAC,MAAM,CAAC,CACtC,IAAuB,EACvB,KAAU,EACZ,EAAE;;gBACA,MAAM,MAAM,GAAG,IAAI,MAAM,CAAC,KAAK,CAAA,MAAA,KAAK,CAAC,IAAI,0CAAE,KAAK,EAAC,CAAC,CAAC,GAAG,KAAK,CAAC,IAAI,CAAC,KAAK,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC;gBACnF,MAAM,WAAW,GAAG,KAAK,CAAC,KAAK,CAAC,OAAO,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC;gBACpD,IAAI,CAAC,IAAI,CAAC;oBACN,WAAW,EAAE,WAAW,CAAC,KAAK,CAAC,GAAG,CAAC;oBACnC,MAAM,EAAE,MAAM,CAAC,MAAM;iBACxB,CAAC,CAAC;gBACH,OAAO,IAAI,CAAC;YAChB,CAAC,EAAE,EAAE,CAAC,CAAC;QACX,CAAC,CAAC,CAAC;IACP,CAAC;CAAA"}
@@ -1,3 +0,0 @@
1
- import type { FetchOptions, GuillotineResponseJson, LocaleMapping } from '../types';
2
- /** Generic fetch */
3
- export declare function fetchFromApi<Data = Record<string, unknown>>(apiUrl: string, mapping: LocaleMapping, options?: FetchOptions): Promise<GuillotineResponseJson>;
@@ -1,76 +0,0 @@
1
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
2
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
3
- return new (P || (P = Promise))(function (resolve, reject) {
4
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
5
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
6
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
7
- step((generator = generator.apply(thisArg, _arguments || [])).next());
8
- });
9
- };
10
- /** Generic fetch */
11
- export function fetchFromApi(apiUrl, mapping, options) {
12
- return __awaiter(this, void 0, void 0, function* () {
13
- const opts = {
14
- method: (options === null || options === void 0 ? void 0 : options.method) || 'POST',
15
- body: (options === null || options === void 0 ? void 0 : options.body) ? JSON.stringify(options === null || options === void 0 ? void 0 : options.body) : null,
16
- headers: mergeHeaders(mapping, options === null || options === void 0 ? void 0 : options.headers),
17
- next: options === null || options === void 0 ? void 0 : options.next,
18
- cache: options === null || options === void 0 ? void 0 : options.cache,
19
- };
20
- let res;
21
- try {
22
- res = yield fetch(apiUrl, opts);
23
- }
24
- catch (e) {
25
- console.warn(apiUrl, e);
26
- throw new Error(JSON.stringify({
27
- code: 'API',
28
- message: e.message,
29
- }));
30
- }
31
- if (!res.ok) {
32
- throw new Error(JSON.stringify({
33
- code: res.status,
34
- message: `Data fetching failed (message: '${yield res.text()}')`,
35
- }));
36
- }
37
- let json;
38
- try {
39
- json = yield res.json();
40
- }
41
- catch (e) {
42
- throw new Error(JSON.stringify({
43
- code: 500,
44
- message: `API call completed but with non-JSON data: ${JSON.stringify(yield res.text())}`,
45
- }));
46
- }
47
- if (!json) {
48
- throw new Error(JSON.stringify({
49
- code: 500,
50
- message: `API call completed but with unexpectedly empty data: ${JSON.stringify(yield res.text())}`,
51
- }));
52
- }
53
- if (Array.isArray(json)) {
54
- throw new Error(JSON.stringify({
55
- code: 500,
56
- message: `API call completed but with unexpected array data: ${JSON.stringify(json)}`,
57
- }));
58
- }
59
- return json;
60
- });
61
- }
62
- function mergeHeaders(mapping, headers) {
63
- const newHeaders = new Headers({
64
- 'Accept': 'application/json',
65
- 'Content-Type': 'application/json',
66
- });
67
- if (headers) {
68
- Object.keys(headers).forEach((headersKey) => {
69
- newHeaders.set(headersKey, headers[headersKey]);
70
- });
71
- }
72
- // append last to make sure it is not overwritten
73
- newHeaders.set('X-Guillotine-SiteKey', mapping.site);
74
- return newHeaders;
75
- }
76
- //# sourceMappingURL=fetchFromApi.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"fetchFromApi.js","sourceRoot":"","sources":["../src/guillotine/fetchFromApi.ts"],"names":[],"mappings":";;;;;;;;;AAEA,oBAAoB;AACpB,MAAM,UAAgB,YAAY,CAC9B,MAAc,EACd,OAAsB,EACtB,OAAsB;;QAGtB,MAAM,IAAI,GAAG;YACT,MAAM,EAAE,CAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,MAAM,KAAI,MAAM;YACjC,IAAI,EAAE,CAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,IAAI,EAAC,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,IAAI,CAAC,CAAC,CAAC,CAAC,IAAI;YAC1D,OAAO,EAAE,YAAY,CAAC,OAAO,EAAE,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,OAAO,CAAC;YAChD,IAAI,EAAE,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,IAAI;YACnB,KAAK,EAAE,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,KAAK;SACxB,CAAC;QAEF,IAAI,GAA6B,CAAC;QAClC,IAAI,CAAC;YACD,GAAG,GAAG,MAAM,KAAK,CAAC,MAAM,EAAE,IAAmB,CAAC,CAAC;QACnD,CAAC;QAAC,OAAO,CAAM,EAAE,CAAC;YACd,OAAO,CAAC,IAAI,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC;YACxB,MAAM,IAAI,KAAK,CAAC,IAAI,CAAC,SAAS,CAAC;gBAC3B,IAAI,EAAE,KAAK;gBACX,OAAO,EAAE,CAAC,CA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O,CAAC;QAC3B,QAAQ,EAAE,kBAAkB;QAC5B,cAAc,EAAE,kBAAkB;KACrC,CAAC,CAAC;IACH,IAAI,OAAO,EAAE,CAAC;QACV,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,OAAO,CAAC,CAAC,UAAU,EAAE,EAAE;YACxC,UAAU,CAAC,GAAG,CAAC,UAAU,EAAE,OAAO,CAAC,UAAU,CAAC,CAAC,CAAC;QACpD,CAAC,CAAC,CAAC;IACP,CAAC;IACD,iDAAiD;IACjD,UAAU,CAAC,GAAG,CAAC,sBAAsB,EAAE,OAAO,CAAC,IAAI,CAAC,CAAC;IACrD,OAAO,UAAU,CAAC;AACtB,CAAC"}
@@ -1,3 +0,0 @@
1
- import type { FetchOptions, GuillotineResult, LocaleMapping } from '../types';
2
- /** Guillotine-specialized fetch, using the generic fetch above */
3
- export declare function fetchGuillotine<Data = Record<string, unknown>>(contentApiUrl: string, mapping: LocaleMapping, options?: FetchOptions): Promise<GuillotineResult>;
@@ -1,62 +0,0 @@
1
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
2
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
3
- return new (P || (P = Promise))(function (resolve, reject) {
4
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
5
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
6
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
7
- step((generator = generator.apply(thisArg, _arguments || [])).next());
8
- });
9
- };
10
- import gqlmin from 'gqlmin';
11
- import { fetchFromApi } from './fetchFromApi';
12
- /** Guillotine-specialized fetch, using the generic fetch above */
13
- export function fetchGuillotine(contentApiUrl, mapping, options) {
14
- return __awaiter(this, void 0, void 0, function* () {
15
- var _a;
16
- const body = options === null || options === void 0 ? void 0 : options.body;
17
- if (typeof body.query !== 'string' || !body.query.trim()) {
18
- return {
19
- error: {
20
- code: '400',
21
- message: `Invalid or missing query. JSON.stringify(query) = ${JSON.stringify(body.query)}`,
22
- },
23
- };
24
- }
25
- else {
26
- // Minify the query to avoid hitting 200k space limit
27
- body.query = gqlmin(body.query);
28
- }
29
- const path = (_a = body === null || body === void 0 ? void 0 : body.variables) === null || _a === void 0 ? void 0 : _a.path;
30
- const pathMessage = path ? JSON.stringify(path) : '';
31
- return yield fetchFromApi(contentApiUrl, mapping, options)
32
- .then(json => {
33
- let errors = json.errors; // fetchFromApi ensures json is an object
34
- if (errors) {
35
- if (!Array.isArray(errors)) {
36
- errors = [errors];
37
- }
38
- console.error(`${errors.length} error(s) when fetching data from: ${contentApiUrl}`);
39
- errors.forEach(error => {
40
- console.error(error);
41
- });
42
- return {
43
- error: {
44
- code: '500',
45
- message: `Server responded with ${errors.length} error(s), probably from guillotine - see log.`,
46
- },
47
- };
48
- }
49
- return json.data;
50
- })
51
- .catch((err) => {
52
- console.warn(`Client-side error when trying to fetch data ${pathMessage}`, err);
53
- try {
54
- return { error: JSON.parse(err.message) };
55
- }
56
- catch (e2) {
57
- return { error: { code: 'Client-side error', message: err.message } };
58
- }
59
- });
60
- });
61
- }
62
- //# sourceMappingURL=fetchGuillotine.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"fetchGuillotine.js","sourceRoot":"","sources":["../src/guillotine/fetchGuillotine.ts"],"names":[],"mappings":";;;;;;;;;AACA,OAAO,MAAM,MAAM,QAAQ,CAAC;AAE5B,OAAO,EAAC,YAAY,EAAC,MAAM,gBAAgB,CAAC;AAG5C,kEAAkE;AAClE,MAAM,UAAgB,eAAe,CACjC,aAAqB,EACrB,OAAsB,EACtB,OAAsB;;;QAEtB,MAAM,IAAI,GAAG,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,IAAI,CAAC;QAC3B,IAAI,OAAO,IAAI,CAAC,KAAK,KAAK,QAAQ,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,EAAE,EAAE,CAAC;YACvD,OAAO;gBACH,KAAK,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C,IAAI,CAAC,+CAA+C,WAAW,EAAE,EAAE,GAAG,CAAC,CAAC;YAChF,IAAI,CAAC;gBACD,OAAO,EAAC,KAAK,EAAE,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,OAAO,CAAC,EAAC,CAAC;YAC5C,CAAC;YAAC,OAAO,EAAE,EAAE,CAAC;gBACV,OAAO,EAAC,KAAK,EAAE,EAAC,IAAI,EAAE,mBAAmB,EAAE,OAAO,EAAE,GAAG,CAAC,OAAO,EAAC,EAAC,CAAC;YACtE,CAAC;QACL,CAAC,CAAC,CAAC;IACX,CAAC;CAAA"}
@@ -1,2 +0,0 @@
1
- import type { MetaResult, LocaleMapping, GuillotineRequestHeaders } from '../types';
2
- export declare const fetchMetaData: (contentApiUrl: string, xpContentPath: string, mapping: LocaleMapping, headers?: GuillotineRequestHeaders) => Promise<MetaResult>;
@@ -1,33 +0,0 @@
1
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
2
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
3
- return new (P || (P = Promise))(function (resolve, reject) {
4
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
5
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
6
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
7
- step((generator = generator.apply(thisArg, _arguments || [])).next());
8
- });
9
- };
10
- import { getMetaQuery, pageFragmentQuery } from './getMetaData';
11
- import { fetchGuillotine } from './fetchGuillotine';
12
- export const fetchMetaData = (contentApiUrl, xpContentPath, mapping, headers) => __awaiter(void 0, void 0, void 0, function* () {
13
- var _a;
14
- const body = {
15
- query: getMetaQuery(pageFragmentQuery()),
16
- variables: {
17
- path: xpContentPath,
18
- },
19
- };
20
- const metaResult = yield fetchGuillotine(contentApiUrl, mapping, {
21
- body,
22
- headers,
23
- });
24
- if (metaResult.error) {
25
- return metaResult;
26
- }
27
- else {
28
- return {
29
- meta: (_a = metaResult === null || metaResult === void 0 ? void 0 : metaResult.guillotine) === null || _a === void 0 ? void 0 : _a.get,
30
- };
31
- }
32
- });
33
- //# sourceMappingURL=fetchMetaData.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"fetchMetaData.js","sourceRoot":"","sources":["../src/guillotine/fetchMetaData.ts"],"names":[],"mappings":";;;;;;;;;AAGA,OAAO,EAAC,YAAY,EAAE,iBAAiB,EAAC,MAAM,eAAe,CAAC;AAC9D,OAAO,EAAC,eAAe,EAAC,MAAM,mBAAmB,CAAC;AAGlD,MAAM,CAAC,MAAM,aAAa,GAAG,CACzB,aAAqB,EACrB,aAAqB,EACrB,OAAsB,EACtB,OAAkC,EACf,EAAE;;IACrB,MAAM,IAAI,GAAuB;QAC7B,KAAK,EAAE,YAAY,CAAC,iBAAiB,EAAE,CAAC;QACxC,SAAS,EAAE;YACP,IAAI,EAAE,aAAa;SACtB;KACJ,CAAC;IACF,MAAM,UAAU,GAAG,MAAM,eAAe,CAAa,aAAa,EAAE,OAAO,EAAE;QACzE,IAAI;QACJ,OAAO;KACV,CAAC,CAAC;IACH,IAAI,UAAU,CAAC,KAAK,EAAE,CAAC;QACnB,OAAO,UAAU,CAAC;IACtB,CAAC;SAAM,CAAC;QACJ,OAAO;YACH,IAAI,EAAE,MAAA,UAAU,aAAV,UAAU,uBAAV,UAAU,CAAE,UAAU,0CAAE,GAAG;SACpC,CAAC;IACN,CAAC;AACL,CAAC,CAAA,CAAC"}
@@ -1,2 +0,0 @@
1
- /** Checks a site-relative contentPath as a slash-delimited string or a string array, and returns a pure site-relative path string (no double slashes, starts with a slash, does not end with one). */
2
- export declare const getCleanContentPathArrayOrThrow400: (contentPath: string | string[] | undefined) => string;
@@ -1,20 +0,0 @@
1
- /** Checks a site-relative contentPath as a slash-delimited string or a string array, and returns a pure site-relative path string (no double slashes, starts with a slash, does not end with one). */
2
- export const getCleanContentPathArrayOrThrow400 = (contentPath) => {
3
- if (contentPath === undefined) {
4
- return '';
5
- }
6
- const isArray = Array.isArray(contentPath);
7
- if (!isArray) {
8
- if (typeof contentPath !== 'string') {
9
- throw Error(JSON.stringify({
10
- code: 400,
11
- message: `Unexpected target content _path: contentPath must be a string or pure string array (contentPath=${JSON.stringify(contentPath)})`,
12
- }));
13
- }
14
- return contentPath;
15
- }
16
- else {
17
- return (contentPath).join('/');
18
- }
19
- };
20
- //# sourceMappingURL=getCleanContentPathArrayOrThrow400.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"getCleanContentPathArrayOrThrow400.js","sourceRoot":"","sources":["../src/guillotine/getCleanContentPathArrayOrThrow400.ts"],"names":[],"mappings":"AAAA,sMAAsM;AACtM,MAAM,CAAC,MAAM,kCAAkC,GAAG,CAAC,WAA0C,EAAU,EAAE;IACrG,IAAI,WAAW,KAAK,SAAS,EAAE,CAAC;QAC5B,OAAO,EAAE,CAAC;IACd,CAAC;IACD,MAAM,OAAO,GAAG,KAAK,CAAC,OAAO,CAAC,WAAW,CAAC,CAAC;IAE3C,IAAI,CAAC,OAAO,EAAE,CAAC;QACX,IAAI,OAAO,WAAW,KAAK,QAAQ,EAAE,CAAC;YAClC,MAAM,KAAK,CAAC,IAAI,CAAC,SAAS,CAAC;gBACvB,IAAI,EAAE,GAAG;gBACT,OAAO,EAAE,mGAAmG,IAAI,CAAC,SAAS,CACtH,WAAW,CAAC,GAAG;aACtB,CAAC,CAAC,CAAC;QACR,CAAC;QAED,OAAO,WAAW,CAAC;IAEvB,CAAC;SAAM,CAAC;QACJ,OAAO,CAAC,WAAW,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;IACnC,CAAC;AACL,CAAC,CAAC"}
@@ -1,2 +0,0 @@
1
- import type { PageComponent } from '../types';
2
- export declare function getComponentConfig(cmp?: PageComponent): any;
@@ -1,5 +0,0 @@
1
- export function getComponentConfig(cmp) {
2
- const cmpData = cmp && cmp[cmp.type];
3
- return cmpData && 'config' in cmpData ? cmpData.config : undefined;
4
- }
5
- //# sourceMappingURL=getComponentConfig.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"getComponentConfig.js","sourceRoot":"","sources":["../src/guillotine/getComponentConfig.ts"],"names":[],"mappings":"AAGA,MAAM,UAAU,kBAAkB,CAAC,GAAmB;IAClD,MAAM,OAAO,GAAG,GAAG,IAAI,GAAG,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;IACrC,OAAO,OAAO,IAAI,QAAQ,IAAI,OAAO,CAAC,CAAC,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,SAAS,CAAC;AACvE,CAAC"}
@@ -1 +0,0 @@
1
- export declare const getContentAndComponentPaths: (requestPath: string) => string[];
@@ -1,12 +0,0 @@
1
- const COMPONENT_PATH_KEY = /\/?_\/component/; // first slash is optional for root components
2
- export const getContentAndComponentPaths = (requestPath) => {
3
- let contentPath, componentPath;
4
- if (COMPONENT_PATH_KEY.test(requestPath)) {
5
- [contentPath, componentPath] = requestPath.split(COMPONENT_PATH_KEY);
6
- }
7
- else {
8
- contentPath = requestPath;
9
- }
10
- return [contentPath, componentPath];
11
- };
12
- //# sourceMappingURL=getContentAndComponentPaths.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"getContentAndComponentPaths.js","sourceRoot":"","sources":["../src/guillotine/getContentAndComponentPaths.ts"],"names":[],"mappings":"AAAA,MAAM,kBAAkB,GAAG,iBAAiB,CAAC,CAAG,8CAA8C;AAE9F,MAAM,CAAC,MAAM,2BAA2B,GAAG,CAAC,WAAmB,EAAY,EAAE;IACzE,IAAI,WAAW,EAAE,aAAa,CAAC;IAC/B,IAAI,kBAAkB,CAAC,IAAI,CAAC,WAAW,CAAC,EAAE,CAAC;QACvC,CAAC,WAAW,EAAE,aAAa,CAAC,GAAG,WAAW,CAAC,KAAK,CAAC,kBAAkB,CAAC,CAAC;IACzE,CAAC;SAAM,CAAC;QACJ,WAAW,GAAG,WAAW,CAAC;IAC9B,CAAC;IACD,OAAO,CAAC,WAAW,EAAE,aAAa,CAAC,CAAC;AACxC,CAAC,CAAC"}
@@ -1,2 +0,0 @@
1
- export declare const pageFragmentQuery: () => string;
2
- export declare function getMetaQuery(pageFragment?: string): string;
@@ -1,67 +0,0 @@
1
- import { ComponentRegistry } from '../common/ComponentRegistry';
2
- import { configQuery } from './metadata/configQuery';
3
- import { richTextQuery } from './metadata/richTextQuery';
4
- import { indent } from '../utils/indent';
5
- const partConfigQuery = () => {
6
- return configQuery(ComponentRegistry.getParts());
7
- };
8
- const layoutConfigQuery = () => {
9
- return configQuery(ComponentRegistry.getLayouts());
10
- };
11
- const pageConfigQuery = () => {
12
- return configQuery(ComponentRegistry.getPages());
13
- };
14
- /*
15
- IMPORTANT: make sure to transform your queries into functions too when using this function inside them !!!
16
- */
17
- const componentsQuery = () => `type
18
- path
19
- page {
20
- descriptor
21
- ${indent(pageConfigQuery(), 4)}
22
- template {
23
- _path
24
- }
25
- }
26
- layout {
27
- descriptor
28
- ${indent(layoutConfigQuery(), 4)}
29
- }
30
- text {
31
- ${indent(richTextQuery('value'), 4)}
32
- }
33
- part {
34
- descriptor
35
- ${indent(partConfigQuery(), 4)}
36
- }
37
- image {
38
- caption
39
- image {
40
- imageUrl (type:absolute, scale: "width-768")
41
- }
42
- }`;
43
- // THIS QUERY DOES NOT SUPPORT NESTED FRAGMENTS
44
- export const pageFragmentQuery = () => `components(resolveFragment: false, resolveTemplate: true) {
45
- fragment {
46
- id
47
- fragment {
48
- components {
49
- ${indent(componentsQuery(), 16)}
50
- }
51
- }
52
- }
53
- ${indent(componentsQuery(), 4)}
54
- }`;
55
- export function getMetaQuery(pageFragment) {
56
- return `query($path:ID!) {
57
- guillotine {
58
- get(key:$path) {
59
- _id
60
- _path
61
- type
62
- ${indent(pageFragment || '', 12)}
63
- }
64
- }
65
- }`;
66
- }
67
- //# sourceMappingURL=getMetaData.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"getMetaData.js","sourceRoot":"","sources":["../src/guillotine/getMetaData.ts"],"names":[],"mappings":"AAAA,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PathFragment, RegionTree } from '../types';
2
- export declare function getParentRegion(source: RegionTree, contentType: string, cmpPath: PathFragment[], components?: PageComponent[], createMissing?: boolean): PageRegion | undefined;
@@ -1,40 +0,0 @@
1
- import { XP_COMPONENT_TYPE } from '../common/constants';
2
- import { prefixFragmentCmpPath } from './prefixFragmentCmpPath';
3
- export function getParentRegion(source, contentType, cmpPath, components = [], createMissing) {
4
- let currentTree = source;
5
- let currentRegion;
6
- let parentPath = '';
7
- for (let i = 0; i < cmpPath.length; i++) {
8
- const pathFragment = cmpPath[i];
9
- const regionName = pathFragment.region;
10
- parentPath += `/${pathFragment.region}/${pathFragment.index}`;
11
- currentRegion = currentTree[regionName];
12
- if (!currentRegion) {
13
- if (createMissing) {
14
- currentRegion = {
15
- name: regionName,
16
- components: [],
17
- };
18
- currentTree[regionName] = currentRegion;
19
- }
20
- else {
21
- throw new Error(`Region [${regionName}] was not found`);
22
- }
23
- }
24
- if (i < cmpPath.length - 1) {
25
- // look for layouts inside if this is not the last path fragment
26
- const layout = components.find((cmp) => {
27
- return cmp.type === XP_COMPONENT_TYPE.LAYOUT && prefixFragmentCmpPath(contentType, cmp.path) === parentPath;
28
- });
29
- if (!layout) {
30
- throw new Error(`Layout [${parentPath}] not found among components, but needed for component [${JSON.stringify(cmpPath, null, 2)}]`);
31
- }
32
- if (!layout.regions) {
33
- layout.regions = {};
34
- }
35
- currentTree = layout.regions;
36
- }
37
- } // for
38
- return currentRegion;
39
- }
40
- //# sourceMappingURL=getParentRegion.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"getParentRegion.js","sourceRoot":"","sources":["../src/guillotine/getParentRegion.ts"],"names":[],"mappings":"AAGA,OAAO,EAAC,iBAAiB,EAAC,MAAM,qBAAqB,CAAC;AACtD,OAAO,EAAC,qBAAqB,EAAC,MAAM,yBAAyB,CAAC;AAG9D,MAAM,UAAU,eAAe,CAC3B,MAAkB,EAClB,WAAmB,EACnB,OAAuB,EACvB,aAA8B,EAAE,EAChC,aAAy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;YACD,IAAI,CAAC,MAAM,CAAC,OAAO,EAAE,CAAC;gBAClB,MAAM,CAAC,OAAO,GAAG,EAAE,CAAC;YACxB,CAAC;YACD,WAAW,GAAG,MAAM,CAAC,OAAO,CAAC;QACjC,CAAC;IACL,CAAC,CAAC,MAAM;IAER,OAAO,aAAa,CAAC;AACzB,CAAC"}
@@ -1,2 +0,0 @@
1
- import type { Context, QueryAndVariables, SelectedQueryMaybeVariablesFunc } from '../types';
2
- export declare function getQueryAndVariables(type: string, path: string, context: Context, selectedQuery?: SelectedQueryMaybeVariablesFunc, config?: any): QueryAndVariables | undefined;
@@ -1,32 +0,0 @@
1
- export function getQueryAndVariables(type, path, context, selectedQuery, config) {
2
- let query, getVariables;
3
- if (typeof selectedQuery === 'string' || typeof selectedQuery === 'function') {
4
- query = selectedQuery;
5
- }
6
- else if (Array.isArray(selectedQuery)) {
7
- query = selectedQuery[0];
8
- getVariables = selectedQuery[1];
9
- }
10
- else if (typeof selectedQuery === 'object') {
11
- query = selectedQuery.query;
12
- getVariables = selectedQuery.variables;
13
- }
14
- if (getVariables && typeof getVariables !== 'function') {
15
- throw Error(`getVariables for content type ${type} should be a function, not: ${typeof getVariables}`);
16
- }
17
- if (query && typeof query !== 'string' && typeof query !== 'function') {
18
- throw Error(`Query for content type ${type} should be a string or function, not: ${typeof query}`);
19
- }
20
- if (typeof query === 'function') {
21
- query = query(path, context, config);
22
- }
23
- if (query) {
24
- return {
25
- query,
26
- variables: getVariables ? getVariables(path, context, config) : {
27
- path,
28
- },
29
- };
30
- }
31
- }
32
- //# sourceMappingURL=getQueryAndVariables.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"getQueryAndVariables.js","sourceRoot":"","sources":["../src/guillotine/getQueryAndVariables.ts"],"names":[],"mappings":"AAOA,MAAM,UAAU,oBAAoB,CAChC,IAAY,EACZ,IAAY,EACZ,OAAgB,EAChB,aAA+C,EAC/C,MAAY;IAGZ,IAAI,KAAK,EAAE,YAAY,CAAC;IAExB,IACI,OAAO,aAAa,KAAK,QAAQ,IAAI,OAAO,aAAa,KAAK,UAAU,EAC1E,CAAC;QACC,KAAK,GAAG,aAAa,CAAC;IAE1B,CAAC;SAAM,IAAI,KAAK,CAAC,OAAO,CAAC,aAAa,CAAC,EAAE,CAAC;QACtC,KAAK,GAAG,aAAa,CAAC,CAAC,CAAC,CAAC;QACzB,YAAY,GAAG,aAAa,CAAC,CAAC,CAAC,CAAC;IAEpC,CAAC;SAAM,IAAI,OAAO,aAAa,KAAK,QAAQ,EAAE,CAAC;QAC3C,KAAK,GAAG,aAAa,CAAC,KAAK,CAAC;QAC5B,YAAY,GAAG,aAAa,CAAC,SAAS,CAAC;IAC3C,CAAC;IAED,IAAI,YAAY,IAAI,OAAO,YAAY,KAAK,UAAU,EAAE,CAAC;QACrD,MAAM,KAAK,CAAC,iCAAiC,IAAI,+BAA+B,OAAO,YAAY,EAAE,CAAC,CAAC;IAC3G,CAAC;IAED,IAAI,KAAK,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,OAAO,KAAK,KAAK,UAAU,EAAE,CAAC;QACpE,MAAM,KAAK,CAAC,0BAA0B,IAAI,yCAAyC,OAAO,KAAK,EAAE,CAAC,CAAC;IACvG,CAAC;IAED,IAAI,OAAO,KAAK,KAAK,UAAU,EAAE,CAAC;QAC9B,KAAK,GAAG,KAAK,CAAC,IAAI,EAAE,OAAO,EAAE,MAAM,CAAC,CAAC;IACzC,CAAC;IAED,IAAI,KAAK,EAAE,CAAC;QACR,OAAO;YACH,KAAK;YACL,SAAS,EAAE,YAAY,CAAC,CAAC,CAAC,YAAY,CAAC,IAAI,EAAE,OAAO,EAAE,MAAM,CAAC,CAAC,CAAC,CAAC;gBAC5D,IAAI;aACP;SACJ,CAAC;IACN,CAAC;AACL,CAAC"}
@@ -1,2 +0,0 @@
1
- import type { ComponentDefinition } from '../../types';
2
- export declare const configQuery: (list: [string, ComponentDefinition][], includeAppName?: boolean, canUseConfigAsJson?: boolean) => string;
@@ -1,36 +0,0 @@
1
- import { sanitizeGraphqlName } from '../../utils/sanitizeGraphqlName';
2
- export const configQuery = (list, includeAppName = true, canUseConfigAsJson = true) => {
3
- const hasQueryList = (list === null || list === void 0 ? void 0 : list.filter(([key, def]) => def.configQuery)) || [];
4
- if (hasQueryList.length === 0) {
5
- return canUseConfigAsJson ? 'configAsJson' : '';
6
- }
7
- const configsByApp = {};
8
- hasQueryList
9
- .forEach((entry) => {
10
- const nameParts = entry[0].split(':');
11
- if (nameParts.length === 2) {
12
- const sanitizedAppName = sanitizeGraphqlName(nameParts[0]);
13
- let existingConfigs = configsByApp[sanitizedAppName];
14
- if (!existingConfigs) {
15
- existingConfigs = [];
16
- configsByApp[sanitizedAppName] = existingConfigs;
17
- }
18
- existingConfigs.push(`${sanitizeGraphqlName(nameParts[1])}${entry[1].configQuery}`);
19
- }
20
- });
21
- // Still query for configAsJson if at least one item has no configQuery defined
22
- const configAsJsonQuery = canUseConfigAsJson && hasQueryList.length < list.length ? 'configAsJson' : '';
23
- if (!includeAppName) {
24
- return `${configAsJsonQuery}
25
- config {
26
- ${Object.values(configsByApp).reduce((arr, curr) => arr.concat(curr), []).join('\n')}
27
- }`;
28
- }
29
- else {
30
- return `${configAsJsonQuery}
31
- config {
32
- ${Object.entries(configsByApp).map(entry => entry[0] + '{\n' + entry[1].join('\n') + '\n}')}
33
- }`;
34
- }
35
- };
36
- //# sourceMappingURL=configQuery.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"configQuery.js","sourceRoot":"","sources":["../../src/guillotine/metadata/configQuery.ts"],"names":[],"mappings":"AAGA,OAAO,EAAC,mBAAmB,EAAC,MAAM,iCAAiC,CAAC;AAGpE,MAAM,CAAC,MAAM,WAAW,GAAG,CACvB,IAAqC,EACrC,cAAc,GAAG,IAAI,EACrB,kBAAkB,GAAG,IAAI,EACnB,EAAE;IACR,MAAM,YAAY,GAAG,CAAA,IAAI,aAAJ,IAAI,uBAAJ,IAAI,CAAE,MAAM,CAAC,CAAC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