@enonic/nextjs-adapter 3.2.2 → 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 +41 -22
  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 +8 -8
  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 -75
  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,344 +0,0 @@
1
- import type { PublishInfo } from '@enonic-types/core';
2
- import type { PageComponent, PageData } from './component';
3
- import type { MetaData } from './componentProps';
4
- import type { Context } from './next';
5
- import type { RecursivePartial } from './util';
6
- export interface GuillotineError {
7
- errorType: string;
8
- locations: {
9
- line: number;
10
- column: number;
11
- }[];
12
- message: string;
13
- validationErrorType?: string;
14
- }
15
- export interface GuillotineResponseJson<Guillotine = RecursivePartial<HeadlessCms>> {
16
- data?: Record<string, Guillotine>;
17
- errors?: GuillotineError[];
18
- }
19
- export interface GuillotineResponse<Data = Record<string, unknown>> {
20
- json: () => Promise<GuillotineResponseJson<Data>>;
21
- text: () => Promise<string>;
22
- ok: boolean;
23
- status: number;
24
- }
25
- /**
26
- * Sends one query to the guillotine API and asks for content type, then uses the type to select a second query and variables, which is sent to the API and fetches content data.
27
- * @param contentPath string or string array: pre-split or slash-delimited _path to a content available on the API
28
- * @returns FetchContentResult object: {data?: T, error?: {code, message}}
29
- */
30
- export type ContentFetcher = (context: Context) => Promise<FetchContentResult>;
31
- export interface ContentResult<Content = Record<string, unknown>> extends Result {
32
- contents?: Content[];
33
- }
34
- export interface FetchContentResult extends Result {
35
- data: Record<string, any> | null;
36
- common: Record<string, any> | null;
37
- meta: MetaData;
38
- page: PageComponent | null;
39
- }
40
- export interface GuillotineRequestHeaders {
41
- [key: string]: string;
42
- Cookie?: string;
43
- locale: string;
44
- locales: string;
45
- 'default-locale': string;
46
- }
47
- export type GuillotineResult = Result & Record<string, any>;
48
- export interface MetaResult extends Result {
49
- meta?: {
50
- _id: string;
51
- _path: string;
52
- type: string;
53
- pageAsJson?: PageData;
54
- components?: PageComponent[];
55
- };
56
- }
57
- export interface Result {
58
- error?: {
59
- code: string;
60
- message: string;
61
- } | null;
62
- }
63
- interface AccessControlEntry {
64
- principal: PrincipalKey;
65
- allow: [Permission];
66
- deny: [Permission];
67
- }
68
- interface Attachment {
69
- name: string;
70
- label: string;
71
- size: number;
72
- mimeType: string;
73
- attachmentUrl: string;
74
- }
75
- type DateTime = string;
76
- export interface Component {
77
- type: ComponentType;
78
- path: string;
79
- page?: PageComponentData | null;
80
- layout?: LayoutComponentData | null;
81
- image?: ImageComponentData | null;
82
- part?: PartComponentData | null;
83
- text?: TextComponentData | null;
84
- fragment?: FragmentComponentData | null;
85
- }
86
- type ComponentType = 'page' | 'layout' | 'image' | 'part' | 'text' | 'fragment';
87
- interface Content {
88
- _id: string;
89
- _name: string;
90
- _path: string;
91
- _references?: Content[];
92
- _score?: number;
93
- creator?: PrincipalKey;
94
- modifier?: PrincipalKey;
95
- createdTime?: DateTime;
96
- modifiedTime?: DateTime;
97
- owner?: PrincipalKey;
98
- type?: string;
99
- contentType?: ContentType;
100
- displayName?: string;
101
- hasChildren?: boolean;
102
- language?: string;
103
- valid?: boolean;
104
- dataAsJson?: JSON;
105
- x?: ExtraData;
106
- xAsJson?: JSON;
107
- pageAsJson?: JSON;
108
- pageTemplate?: Content;
109
- components?: Component[];
110
- attachments?: Attachment[];
111
- publish?: PublishInfo;
112
- pageUrl?: string;
113
- site?: portal_Site;
114
- parent?: Content;
115
- children?: Content[];
116
- childrenConnection?: ContentConnection;
117
- permissions?: Permissions;
118
- }
119
- interface ContentConnection {
120
- totalCount: Int;
121
- edges: ContentEdge[];
122
- pageInfo: PageInfo;
123
- }
124
- interface ContentEdge {
125
- node: Content;
126
- cursor: string;
127
- }
128
- interface ContentType {
129
- name: string;
130
- displayName: string;
131
- description: string;
132
- superType: string;
133
- abstract: boolean;
134
- final: boolean;
135
- allowChildContent: boolean;
136
- contentDisplayNameScript: string;
137
- icon: Icon;
138
- form: FormItem[];
139
- formAsJson: JSON;
140
- getInstances: Content[];
141
- getInstanceConnection: ContentConnection;
142
- }
143
- type ExtraData<App = Record<string, unknown>> = App & {
144
- media: XData_media_ApplicationConfig;
145
- base: XData_base_ApplicationConfig;
146
- };
147
- type Float = number;
148
- interface FormItem {
149
- formItemType: FormItemType;
150
- name: string;
151
- label: string;
152
- }
153
- type FormItemType = 'ItemSet' | 'Layout' | 'Input' | 'OptionSet';
154
- interface FragmentComponentData {
155
- id: string;
156
- fragment: Content;
157
- }
158
- interface GeoPoint {
159
- value: string;
160
- latitude: Float;
161
- longitude: Float;
162
- }
163
- export interface HeadlessCms {
164
- get?: Content;
165
- getChildren?: Content[];
166
- getChildrenConnection?: ContentConnection;
167
- getPermissions?: Permissions;
168
- getSite?: portal_Site;
169
- getType?: ContentType;
170
- getTypes?: ContentType[];
171
- query?: Content[];
172
- queryConnection?: QueryContentConnection;
173
- queryDsl?: Content[];
174
- queryDslConnection?: QueryDSLContentConnection;
175
- }
176
- interface Icon {
177
- mimeType: string;
178
- modifiedTime: string;
179
- }
180
- interface Image {
181
- image: Content;
182
- ref: string;
183
- style: ImageStyle;
184
- }
185
- interface ImageComponentData {
186
- id: string;
187
- caption?: string;
188
- image: media_Image;
189
- }
190
- interface ImageStyle {
191
- name: string;
192
- aspectRatio: string;
193
- filter: string;
194
- }
195
- type Int = number;
196
- type JSON = Record<string, unknown>;
197
- interface LayoutComponentData {
198
- descriptor: string;
199
- configAsJson: JSON | null;
200
- }
201
- interface Link {
202
- ref: string;
203
- uri: string;
204
- media: Media;
205
- content: Content;
206
- }
207
- type LocalDateTime = string;
208
- interface Macro_system_disable_DataConfig {
209
- body: string;
210
- }
211
- interface Macro_system_embed_DataConfig {
212
- body: string;
213
- }
214
- interface Macro {
215
- ref: string;
216
- name: string;
217
- descriptor: string;
218
- config: MacroConfig;
219
- }
220
- interface MacroConfig {
221
- disable: Macro_system_disable_DataConfig;
222
- embed: Macro_system_embed_DataConfig;
223
- }
224
- interface Media {
225
- content: Content;
226
- intent: MediaIntentType;
227
- }
228
- type MediaIntentType = 'download' | 'inline';
229
- interface media_Image extends Content {
230
- mediaUrl: string;
231
- imageUrl: string;
232
- data: media_Image_Data;
233
- }
234
- interface media_Image_Data {
235
- media: MediaUploader;
236
- caption: string;
237
- altText: string;
238
- artist: string[];
239
- copyright: string;
240
- tags: string[];
241
- }
242
- interface MediaFocalPoint {
243
- x: number;
244
- y: number;
245
- }
246
- interface MediaUploader {
247
- attachment: string;
248
- focalPoint: MediaFocalPoint;
249
- }
250
- interface PageComponentData {
251
- descriptor?: string;
252
- customized?: boolean;
253
- configAsJson?: JSON;
254
- template?: Content | null;
255
- }
256
- interface PageInfo {
257
- startCursor: string;
258
- endCursor: string;
259
- hasNext: boolean;
260
- }
261
- interface PartComponentData<Config = Record<string, unknown>> {
262
- descriptor: string;
263
- config: Config;
264
- configAsJson: JSON;
265
- }
266
- type Permission = 'READ' | 'CREATE' | 'MODIFY' | 'DELETE' | 'PUBLISH' | 'READ_PERMISSIONS' | 'WRITE_PERMISSIONS';
267
- interface Permissions {
268
- inheritsPermissions: boolean;
269
- permissions: AccessControlEntry[];
270
- }
271
- interface portal_Site extends Content {
272
- data: portal_Site_Data;
273
- }
274
- interface portal_Site_Data {
275
- description: string;
276
- }
277
- type PrincipalType = 'user' | 'group' | 'role';
278
- interface PrincipalKey {
279
- value: string;
280
- type: PrincipalType;
281
- idProvider: string;
282
- principalId: string;
283
- }
284
- interface QueryContentConnection extends ContentConnection {
285
- aggregationsAsJson: JSON;
286
- }
287
- interface QueryDSLContentConnection extends QueryContentConnection {
288
- highlightAsJson: JSON;
289
- }
290
- interface RichText {
291
- raw: string;
292
- processedHtml: string;
293
- macrosAsJson: JSON;
294
- macros: Macro[];
295
- images: Image[];
296
- links: Link[];
297
- }
298
- interface TextComponentData {
299
- value: RichText;
300
- }
301
- interface XData_base_ApplicationConfig {
302
- gpsInfo: XData_base_gpsInfo_DataConfig;
303
- }
304
- interface XData_base_gpsInfo_DataConfig {
305
- geoPoint: GeoPoint;
306
- altitude: string;
307
- direction: string;
308
- }
309
- interface XData_media_ApplicationConfig {
310
- imageInfo: XData_media_imageInfo_DataConfig;
311
- cameraInfo: XData_media_cameraInfo_DataConfig;
312
- }
313
- interface XData_media_imageInfo_DataConfig {
314
- pixelSize: number;
315
- imageHeight: number;
316
- imageWidth: number;
317
- contentType: string;
318
- description: string;
319
- byteSize: number;
320
- colorSpace: string[];
321
- fileSource: string;
322
- }
323
- interface XData_media_cameraInfo_DataConfig {
324
- date: LocalDateTime;
325
- make: string;
326
- model: string;
327
- lens: string;
328
- iso: string;
329
- focalLength: string;
330
- focalLength35: string;
331
- exposureBias: string;
332
- aperture: string[];
333
- shutterTime: string;
334
- flash: string;
335
- autoFlashCompensation: string;
336
- whiteBalance: string;
337
- exposureProgram: string;
338
- shootingMode: string;
339
- meteringMode: string;
340
- exposureMode: string;
341
- focusDistance: string;
342
- orientation: string;
343
- }
344
- export {};
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=guillotine.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"guillotine.js","sourceRoot":"","sources":["../src/types/guillotine.ts"],"names":[],"mappings":""}
package/types/i18n.d.ts DELETED
@@ -1,7 +0,0 @@
1
- export type Dict = Record<string, string>;
2
- export interface LocaleContextType {
3
- dictionary: Dict;
4
- locale: string;
5
- localize: (key: string, ...args: any[]) => string;
6
- setLocale: (locale: string) => Promise<Dict>;
7
- }
package/types/i18n.js DELETED
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=i18n.js.map
package/types/i18n.js.map DELETED
@@ -1 +0,0 @@
1
- {"version":3,"file":"i18n.js","sourceRoot":"","sources":["../src/types/i18n.ts"],"names":[],"mappings":""}
package/types/index.d.ts DELETED
@@ -1,47 +0,0 @@
1
- export type * from './component';
2
- export type * from './componentProps';
3
- export type * from './guillotine';
4
- export type * from './i18n';
5
- export type * from './next';
6
- export type * from './util';
7
- export interface ContentApiBaseBody {
8
- query?: string;
9
- variables?: ContentApiBaseBodyVariables;
10
- }
11
- export interface ContentApiBaseBodyVariables {
12
- path?: string;
13
- [key: string]: string | number | undefined;
14
- }
15
- export interface ContentPathItem {
16
- contentPath: string[];
17
- locale: string;
18
- }
19
- export interface PathFragment {
20
- index: number;
21
- region: string;
22
- }
23
- export interface PreviewParams {
24
- contentPath: string[];
25
- headers: Record<string, string>;
26
- params: Record<string, string>;
27
- }
28
- export interface LocaleMapping {
29
- default: boolean;
30
- project: string;
31
- site: string;
32
- locale: string;
33
- }
34
- export type LocaleMappings = Record<string, LocaleMapping>;
35
- export type SelectorName = 'contentType' | 'page' | 'component' | 'part' | 'layout' | 'macro';
36
- export type FetchOptions = Omit<RequestInit, 'body'> & {
37
- body?: ContentApiBaseBody;
38
- next?: {
39
- revalidate?: boolean | number;
40
- tags?: string[];
41
- };
42
- };
43
- export interface StaticContentProps extends Record<string, any> {
44
- children?: React.ReactNode;
45
- element?: string;
46
- condition: boolean;
47
- }
package/types/index.js DELETED
@@ -1,3 +0,0 @@
1
- /// <reference types="react" />
2
- export {};
3
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/types/index.ts"],"names":[],"mappings":"AAAA,+BAA+B"}
package/types/next.d.ts DELETED
@@ -1,6 +0,0 @@
1
- import type { ReadonlyHeaders } from 'next/dist/server/web/spec-extension/adapters/headers';
2
- export interface Context {
3
- headers?: ReadonlyHeaders | Headers;
4
- locale?: string;
5
- contentPath: string | string[];
6
- }
package/types/next.js DELETED
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=next.js.map
package/types/next.js.map DELETED
@@ -1 +0,0 @@
1
- {"version":3,"file":"next.js","sourceRoot":"","sources":["../src/types/next.ts"],"names":[],"mappings":""}
package/types/util.d.ts DELETED
@@ -1,3 +0,0 @@
1
- export type RecursivePartial<T> = {
2
- [P in keyof T]?: RecursivePartial<T[P]>;
3
- };
package/types/util.js DELETED
@@ -1,3 +0,0 @@
1
- export {};
2
- // export type PartialExcept<T, K extends keyof T> = RecursivePartial<T> & Pick<T, K>;
3
- //# sourceMappingURL=util.js.map
package/types/util.js.map DELETED
@@ -1 +0,0 @@
1
- {"version":3,"file":"util.js","sourceRoot":"","sources":["../src/types/util.ts"],"names":[],"mappings":";AAIA,sFAAsF"}
@@ -1 +0,0 @@
1
- export declare function addLineNumbers(s: string): string;
@@ -1,4 +0,0 @@
1
- export function addLineNumbers(s) {
2
- return s.split('\n').map((line, i) => `${i + 1}: ${line}`).join('\n');
3
- }
4
- //# sourceMappingURL=addLineNumbers.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"addLineNumbers.js","sourceRoot":"","sources":["../src/utils/addLineNumbers.ts"],"names":[],"mappings":"AAAA,MAAM,UAAU,cAAc,CAAC,CAAS;IACpC,OAAO,CAAC,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,CAAC,EAAE,EAAE,CAAC,GAAG,CAAC,GAAG,CAAC,KAAK,IAAI,EAAE,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AAC1E,CAAC"}
@@ -1,7 +0,0 @@
1
- import type { Context, GuillotineRequestHeaders } from '../types';
2
- export declare function buildGuillotineRequestHeaders({ context, defaultLocale, locale, locales, }: {
3
- context: Context;
4
- defaultLocale: string;
5
- locale: string;
6
- locales: string[];
7
- }): GuillotineRequestHeaders;
@@ -1,16 +0,0 @@
1
- import { GUILLOTINE_REQUEST_HEADERS, JSESSIONID_HEADER, } from '../common/constants';
2
- export function buildGuillotineRequestHeaders({ context, defaultLocale, locale, locales, }) {
3
- var _a;
4
- const guillotineRequestHeaders = {
5
- [GUILLOTINE_REQUEST_HEADERS.DEFAULT_LOCALE]: defaultLocale,
6
- [GUILLOTINE_REQUEST_HEADERS.LOCALE]: locale,
7
- [GUILLOTINE_REQUEST_HEADERS.LOCALES]: JSON.stringify(locales),
8
- };
9
- const jsessionid = (_a = context.headers) === null || _a === void 0 ? void 0 : _a.get(JSESSIONID_HEADER);
10
- if (jsessionid) {
11
- guillotineRequestHeaders[GUILLOTINE_REQUEST_HEADERS.COOKIE] =
12
- `${JSESSIONID_HEADER}=${jsessionid}`;
13
- }
14
- return guillotineRequestHeaders;
15
- }
16
- //# sourceMappingURL=buildGuillotineRequestHeaders.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"buildGuillotineRequestHeaders.js","sourceRoot":"","sources":["../src/utils/buildGuillotineRequestHeaders.ts"],"names":[],"mappings":"AAGA,OAAO,EACH,0BAA0B,EAC1B,iBAAiB,GACpB,MAAM,qBAAqB,CAAC;AAG7B,MAAM,UAAU,6BAA6B,CAAC,EAC1C,OAAO,EACP,aAAa,EACb,MAAM,EACN,OAAO,GAMV;;IACG,MAAM,wBAAwB,GAA6B;QACvD,CAAC,0BAA0B,CAAC,cAAc,CAAC,EAAE,aAAa;QAC1D,CAAC,0BAA0B,CAAC,MAAM,CAAC,EAAE,MAAM;QAC3C,CAAC,0BAA0B,CAAC,OAAO,CAAC,EAAE,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC;KAChE,CAAC;IACF,MAAM,UAAU,GAAG,MAAA,OAAO,CAAC,OAAO,0CAAE,GAAG,CAAC,iBAAiB,CAAC,CAAC;IAC3D,IAAI,UAAU,EAAE,CAAC;QACb,wBAAwB,CAAC,0BAA0B,CAAC,MAAM,CAAC;YACvD,GAAG,iBAAiB,IAAI,UAAU,EAAE,CAAC;IAC7C,CAAC;IACD,OAAO,wBAAwB,CAAC;AACpC,CAAC"}
@@ -1 +0,0 @@
1
- export declare const commonChars: (s1?: string, s2?: string) => string;
@@ -1,17 +0,0 @@
1
- export const commonChars = (s1, s2) => {
2
- let result = '';
3
- if (!s1 || s1.length === 0 || !s2 || s2.length === 0) {
4
- return result;
5
- }
6
- for (let i = 0; i < s1.length; i++) {
7
- const s1Element = s1[i];
8
- if (s2[i] === s1Element) {
9
- result += s1Element;
10
- }
11
- else {
12
- break;
13
- }
14
- }
15
- return result;
16
- };
17
- //# sourceMappingURL=commonChars.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"commonChars.js","sourceRoot":"","sources":["../src/utils/commonChars.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,WAAW,GAAG,CAAC,EAAW,EAAE,EAAW,EAAE,EAAE;IACpD,IAAI,MAAM,GAAG,EAAE,CAAC;IAChB,IAAI,CAAC,EAAE,IAAI,EAAE,CAAC,MAAM,KAAK,CAAC,IAAI,CAAC,EAAE,IAAI,EAAE,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QACnD,OAAO,MAAM,CAAC;IAClB,CAAC;IACD,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,EAAE,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE,CAAC;QACjC,MAAM,SAAS,GAAG,EAAE,CAAC,CAAC,CAAC,CAAC;QACxB,IAAI,EAAE,CAAC,CAAC,CAAC,KAAK,SAAS,EAAE,CAAC;YACtB,MAAM,IAAI,SAAS,CAAC;QACxB,CAAC;aAAM,CAAC;YACJ,MAAM;QACV,CAAC;IACL,CAAC;IAED,OAAO,MAAM,CAAC;AAClB,CAAC,CAAC"}
@@ -1,5 +0,0 @@
1
- export declare const enonicDebug: (s?: string, ...params: any[]) => void;
2
- export declare const enonicLog: (s?: string, ...params: any[]) => void;
3
- export declare const enonicInfo: (s?: string, ...params: any[]) => void;
4
- export declare const enonicWarn: (s?: string, ...params: any[]) => void;
5
- export declare const enonicError: (s?: string, ...params: any[]) => void;
@@ -1,23 +0,0 @@
1
- import { LOGGING } from '../common/env';
2
- export const enonicDebug = (s, ...params) => {
3
- enonicPrint('debug', s, ...params);
4
- };
5
- export const enonicLog = (s, ...params) => {
6
- enonicPrint('log', s, ...params);
7
- };
8
- export const enonicInfo = (s, ...params) => {
9
- enonicPrint('info', s, ...params);
10
- };
11
- export const enonicWarn = (s, ...params) => {
12
- enonicPrint('warn', s, ...params);
13
- };
14
- export const enonicError = (s, ...params) => {
15
- enonicPrint('error', s, ...params);
16
- };
17
- const enonicPrint = (type, s, ...params) => {
18
- if (LOGGING) {
19
- const m = `\n[${new Date().toLocaleTimeString()}] ${s}:\n`;
20
- console[type](m, ...params, '\n');
21
- }
22
- };
23
- //# sourceMappingURL=enonicLog.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"enonicLog.js","sourceRoot":"","sources":["../src/utils/enonicLog.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,OAAO,EAAC,MAAM,eAAe,CAAC;AAEtC,MAAM,CAAC,MAAM,WAAW,GAAG,CAAC,CAAU,EAAE,GAAG,MAAa,EAAE,EAAE;IACxD,WAAW,CAAC,OAAO,EAAE,CAAC,EAAE,GAAG,MAAM,CAAC,CAAC;AACvC,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,SAAS,GAAG,CAAC,CAAU,EAAE,GAAG,MAAa,EAAE,EAAE;IACtD,WAAW,CAAC,KAAK,EAAE,CAAC,EAAE,GAAG,MAAM,CAAC,CAAC;AACrC,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,UAAU,GAAG,CAAC,CAAU,EAAE,GAAG,MAAa,EAAE,EAAE;IACvD,WAAW,CAAC,MAAM,EAAE,CAAC,EAAE,GAAG,MAAM,CAAC,CAAC;AACtC,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,UAAU,GAAG,CAAC,CAAU,EAAE,GAAG,MAAa,EAAE,EAAE;IACvD,WAAW,CAAC,MAAM,EAAE,CAAC,EAAE,GAAG,MAAM,CAAC,CAAC;AACtC,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,WAAW,GAAG,CAAC,CAAU,EAAE,GAAG,MAAa,EAAE,EAAE;IACxD,WAAW,CAAC,OAAO,EAAE,CAAC,EAAE,GAAG,MAAM,CAAC,CAAC;AACvC,CAAC,CAAC;AAEF,MAAM,WAAW,GAAG,CAAC,IAAiD,EAAE,CAAU,EAAE,GAAG,MAAa,EAAE,EAAE;IACpG,IAAI,OAAO,EAAE,CAAC;QACV,MAAM,CAAC,GAAG,MAAM,IAAI,IAAI,EAAE,CAAC,kBAAkB,EAAE,KAAK,CAAC,KAAK,CAAC;QAC3D,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,GAAG,MAAM,EAAE,IAAI,CAAC,CAAC;IACtC,CAAC;AACL,CAAC,CAAC"}
@@ -1 +0,0 @@
1
- export declare function fixDoubleSlashes(str: string): string;
@@ -1,4 +0,0 @@
1
- export function fixDoubleSlashes(str) {
2
- return str.replace(/(^|[^:/])\/{2,}/g, '$1/');
3
- }
4
- //# sourceMappingURL=fixDoubleSlashes.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"fixDoubleSlashes.js","sourceRoot":"","sources":["../src/utils/fixDoubleSlashes.ts"],"names":[],"mappings":"AAAA,MAAM,UAAU,gBAAgB,CAAC,GAAW;IACxC,OAAO,GAAG,CAAC,OAAO,CAAC,kBAAkB,EAAE,KAAK,CAAC,CAAC;AAClD,CAAC"}
@@ -1 +0,0 @@
1
- export declare function getAllLocales(): string[];
@@ -1,5 +0,0 @@
1
- import { getLocaleMappings } from './getLocaleMappings';
2
- export function getAllLocales() {
3
- return Object.keys(getLocaleMappings());
4
- }
5
- //# sourceMappingURL=getAllLocales.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"getAllLocales.js","sourceRoot":"","sources":["../src/utils/getAllLocales.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,iBAAiB,EAAC,MAAM,qBAAqB,CAAC;AAGtD,MAAM,UAAU,aAAa;IACzB,OAAO,MAAM,CAAC,IAAI,CAAC,iBAAiB,EAAE,CAAC,CAAC;AAC5C,CAAC"}
@@ -1,2 +0,0 @@
1
- import type { Context } from '../types';
2
- export declare function getContentApiUrl(context: Context): string;
@@ -1,15 +0,0 @@
1
- import { RENDER_MODE } from '../common/constants';
2
- import { API_URL } from '../common/env';
3
- import { getLocaleMapping } from './getLocaleMapping';
4
- import { fixDoubleSlashes } from './fixDoubleSlashes';
5
- import { getRenderMode } from './getRenderMode';
6
- export function getContentApiUrl(context) {
7
- const project = getLocaleMapping(context).project;
8
- const branch = getRenderMode(context) === RENDER_MODE.NEXT
9
- ? 'master'
10
- : getRenderMode(context) === RENDER_MODE.LIVE
11
- ? 'master'
12
- : 'draft';
13
- return fixDoubleSlashes(`${API_URL}/${project}/${branch}`);
14
- }
15
- //# sourceMappingURL=getContentApiUrl.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"getContentApiUrl.js","sourceRoot":"","sources":["../src/utils/getContentApiUrl.ts"],"names":[],"mappings":"AAGA,OAAO,EAAC,WAAW,EAAC,MAAM,qBAAqB,CAAC;AAChD,OAAO,EAAC,OAAO,EAAC,MAAM,eAAe,CAAC;AACtC,OAAO,EAAC,gBAAgB,EAAC,MAAM,oBAAoB,CAAC;AACpD,OAAO,EAAC,gBAAgB,EAAC,MAAM,oBAAoB,CAAC;AACpD,OAAO,EAAC,aAAa,EAAC,MAAM,iBAAiB,CAAC;AAG9C,MAAM,UAAU,gBAAgB,CAAC,OAAgB;IAC7C,MAAM,OAAO,GAAG,gBAAgB,CAAC,OAAO,CAAC,CAAC,OAAO,CAAC;IAClD,MAAM,MAAM,GAAG,aAAa,CAAC,OAAO,CAAC,KAAK,WAAW,CAAC,IAAI;QACtD,CAAC,CAAC,QAAQ;QACV,CAAC,CAAC,aAAa,CAAC,OAAO,CAAC,KAAK,WAAW,CAAC,IAAI;YACzC,CAAC,CAAC,QAAQ;YACV,CAAC,CAAC,OAAO,CAAC;IAElB,OAAO,gBAAgB,CAAC,GAAG,OAAO,IAAI,OAAO,IAAI,MAAM,EAAE,CAAC,CAAC;AAC/D,CAAC"}
@@ -1,2 +0,0 @@
1
- import type { Context, LocaleMapping } from '../types';
2
- export declare function getLocaleMapping(context: Context): LocaleMapping;
@@ -1,19 +0,0 @@
1
- import { PROJECT_ID_HEADER } from '../common/constants';
2
- import { getLocaleMappingByProjectId } from './getLocaleMappingByProjectId';
3
- import { getLocaleMappingByLocale } from './getLocaleMappingByLocale';
4
- export function getLocaleMapping(context) {
5
- var _a;
6
- const projectId = (_a = context.headers) === null || _a === void 0 ? void 0 : _a.get(PROJECT_ID_HEADER);
7
- let config;
8
- if (projectId) {
9
- // first use project id header
10
- config = getLocaleMappingByProjectId(projectId, false);
11
- }
12
- if (!config) {
13
- // next try to use locale from url
14
- // it will fall back to default locale if not found
15
- config = getLocaleMappingByLocale(context.locale);
16
- }
17
- return config;
18
- }
19
- //# sourceMappingURL=getLocaleMapping.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"getLocaleMapping.js","sourceRoot":"","sources":["../src/utils/getLocaleMapping.ts"],"names":[],"mappings":"AAGA,OAAO,EAAC,iBAAiB,EAAC,MAAM,qBAAqB,CAAC;AACtD,OAAO,EAAC,2BAA2B,EAAC,MAAM,+BAA+B,CAAC;AAC1E,OAAO,EAAC,wBAAwB,EAAC,MAAM,4BAA4B,CAAC;AAGpE,MAAM,UAAU,gBAAgB,CAAC,OAAgB;;IAC7C,MAAM,SAAS,GAAG,MAAA,OAAO,CAAC,OAAO,0CAAE,GAAG,CAAC,iBAAiB,CAAC,CAAC;IAE1D,IAAI,MAAqB,CAAC;IAC1B,IAAI,SAAS,EAAE,CAAC;QACZ,8BAA8B;QAC9B,MAAM,GAAG,2BAA2B,CAAC,SAAS,EAAE,KAAK,CAAC,CAAC;IAC3D,CAAC;IACD,IAAI,CAAC,MAAM,EAAE,CAAC;QACV,kCAAkC;QAClC,mDAAmD;QACnD,MAAM,GAAG,wBAAwB,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC;IACtD,CAAC;IAED,OAAO,MAAM,CAAC;AAClB,CAAC"}
@@ -1,2 +0,0 @@
1
- import type { LocaleMapping } from '../types';
2
- export declare function getLocaleMappingByLocale(locale?: string, useDefault?: boolean): LocaleMapping;
@@ -1,13 +0,0 @@
1
- import { getLocaleMappings } from './getLocaleMappings';
2
- export function getLocaleMappingByLocale(locale, useDefault = true) {
3
- const mappings = getLocaleMappings();
4
- let config;
5
- if (locale) {
6
- config = mappings[locale];
7
- }
8
- if (!config && useDefault) {
9
- config = Object.values(mappings).find(c => c.default);
10
- }
11
- return config;
12
- }
13
- //# sourceMappingURL=getLocaleMappingByLocale.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"getLocaleMappingByLocale.js","sourceRoot":"","sources":["../src/utils/getLocaleMappingByLocale.ts"],"names":[],"mappings":"AAGA,OAAO,EAAC,iBAAiB,EAAC,MAAM,qBAAqB,CAAC;AAGtD,MAAM,UAAU,wBAAwB,CAAC,MAAe,EAAE,UAAU,GAAG,IAAI;IACvE,MAAM,QAAQ,GAAG,iBAAiB,EAAE,CAAC;IAErC,IAAI,MAAqB,CAAC;IAC1B,IAAI,MAAM,EAAE,CAAC;QACT,MAAM,GAAG,QAAQ,CAAC,MAAM,CAAC,CAAC;IAC9B,CAAC;IACD,IAAI,CAAC,MAAM,IAAI,UAAU,EAAE,CAAC;QACxB,MAAM,GAAG,MAAM,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC;IAC1D,CAAC;IAED,OAAO,MAAM,CAAC;AAClB,CAAC"}
@@ -1,2 +0,0 @@
1
- import type { LocaleMapping } from '../types';
2
- export declare function getLocaleMappingByProjectId(projectId?: string, useDefault?: boolean): LocaleMapping;