@webiny/app 5.44.1-beta.0 → 5.45.0-beta.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.
Files changed (427) hide show
  1. package/App.d.ts +5 -13
  2. package/App.js +70 -87
  3. package/App.js.map +1 -1
  4. package/AppContainer.d.ts +23 -0
  5. package/AppContainer.js +9 -0
  6. package/AppContainer.js.map +1 -0
  7. package/README.md +7 -15
  8. package/apollo-client/InMemoryCache.d.ts +3 -2
  9. package/apollo-client/InMemoryCache.js +16 -47
  10. package/apollo-client/InMemoryCache.js.map +1 -1
  11. package/apollo-client/IntrospectionFragmentMatcher.d.ts +2 -2
  12. package/apollo-client/IntrospectionFragmentMatcher.js +33 -50
  13. package/apollo-client/IntrospectionFragmentMatcher.js.map +1 -1
  14. package/components/Image.d.ts +1 -2
  15. package/components/Image.js +11 -19
  16. package/components/Image.js.map +1 -1
  17. package/components/index.d.ts +1 -2
  18. package/components/index.js +1 -19
  19. package/components/index.js.map +1 -1
  20. package/config/RouterConfig/Route.d.ts +29 -0
  21. package/config/RouterConfig/Route.js +33 -0
  22. package/config/RouterConfig/Route.js.map +1 -0
  23. package/config/RouterConfig.d.ts +31 -0
  24. package/config/RouterConfig.js +18 -0
  25. package/config/RouterConfig.js.map +1 -0
  26. package/config.js +9 -15
  27. package/config.js.map +1 -1
  28. package/contexts/Ui/index.js +28 -52
  29. package/contexts/Ui/index.js.map +1 -1
  30. package/core/DebounceRender.js +13 -24
  31. package/core/DebounceRender.js.map +1 -1
  32. package/core/Plugin.d.ts +1 -1
  33. package/core/Plugin.js +11 -19
  34. package/core/Plugin.js.map +1 -1
  35. package/core/Plugins.d.ts +1 -1
  36. package/core/Plugins.js +20 -25
  37. package/core/Plugins.js.map +1 -1
  38. package/core/Provider.d.ts +1 -1
  39. package/core/Provider.js +9 -13
  40. package/core/Provider.js.map +1 -1
  41. package/core/Routes.d.ts +2 -1
  42. package/core/Routes.js +13 -23
  43. package/core/Routes.js.map +1 -1
  44. package/core/createProvider.d.ts +2 -2
  45. package/core/createProvider.js +1 -7
  46. package/core/createProvider.js.map +1 -1
  47. package/core/createProviderPlugin.d.ts +1 -1
  48. package/core/createProviderPlugin.js +4 -10
  49. package/core/createProviderPlugin.js.map +1 -1
  50. package/errors/AuthenticationErrorEvent.d.ts +9 -0
  51. package/errors/AuthenticationErrorEvent.js +10 -0
  52. package/errors/AuthenticationErrorEvent.js.map +1 -0
  53. package/errors/NetworkErrorEvent.d.ts +15 -0
  54. package/errors/NetworkErrorEvent.js +10 -0
  55. package/errors/NetworkErrorEvent.js.map +1 -0
  56. package/errors/abstractions.d.ts +12 -0
  57. package/errors/abstractions.js +5 -0
  58. package/errors/abstractions.js.map +1 -0
  59. package/errors/index.d.ts +6 -0
  60. package/errors/index.js +6 -0
  61. package/errors/index.js.map +1 -0
  62. package/exports/admin/envConfig.d.ts +1 -0
  63. package/exports/admin/envConfig.js +3 -0
  64. package/exports/admin/envConfig.js.map +1 -0
  65. package/exports/admin/graphqlClient.d.ts +1 -0
  66. package/exports/admin/graphqlClient.js +3 -0
  67. package/exports/admin/graphqlClient.js.map +1 -0
  68. package/exports/admin/localStorage.d.ts +2 -0
  69. package/exports/admin/localStorage.js +4 -0
  70. package/exports/admin/localStorage.js.map +1 -0
  71. package/exports/admin/router.d.ts +4 -0
  72. package/exports/admin/router.js +6 -0
  73. package/exports/admin/router.js.map +1 -0
  74. package/exports/admin/security.d.ts +1 -0
  75. package/exports/admin/security.js +3 -0
  76. package/exports/admin/security.js.map +1 -0
  77. package/exports/admin.d.ts +6 -0
  78. package/exports/admin.js +8 -0
  79. package/exports/admin.js.map +1 -0
  80. package/features/envConfig/EnvConfig.d.ts +6 -0
  81. package/features/envConfig/EnvConfig.js +14 -0
  82. package/features/envConfig/EnvConfig.js.map +1 -0
  83. package/features/envConfig/abstractions.d.ts +27 -0
  84. package/features/envConfig/abstractions.js +4 -0
  85. package/features/envConfig/abstractions.js.map +1 -0
  86. package/features/envConfig/feature.d.ts +17 -0
  87. package/features/envConfig/feature.js +14 -0
  88. package/features/envConfig/feature.js.map +1 -0
  89. package/features/envConfig/index.d.ts +1 -0
  90. package/features/envConfig/index.js +3 -0
  91. package/features/envConfig/index.js.map +1 -0
  92. package/features/eventPublisher/EventPublisher.d.ts +8 -0
  93. package/features/eventPublisher/EventPublisher.js +27 -0
  94. package/features/eventPublisher/EventPublisher.js.map +1 -0
  95. package/features/eventPublisher/abstractions.d.ts +18 -0
  96. package/features/eventPublisher/abstractions.js +14 -0
  97. package/features/eventPublisher/abstractions.js.map +1 -0
  98. package/features/eventPublisher/feature.d.ts +1 -0
  99. package/features/eventPublisher/feature.js +11 -0
  100. package/features/eventPublisher/feature.js.map +1 -0
  101. package/features/eventPublisher/index.d.ts +3 -0
  102. package/features/eventPublisher/index.js +4 -0
  103. package/features/eventPublisher/index.js.map +1 -0
  104. package/features/graphqlClient/AuthenticationErrorPublishing.d.ts +13 -0
  105. package/features/graphqlClient/AuthenticationErrorPublishing.js +35 -0
  106. package/features/graphqlClient/AuthenticationErrorPublishing.js.map +1 -0
  107. package/features/graphqlClient/BatchingGraphQLClient.d.ts +18 -0
  108. package/features/graphqlClient/BatchingGraphQLClient.js +164 -0
  109. package/features/graphqlClient/BatchingGraphQLClient.js.map +1 -0
  110. package/features/graphqlClient/FetchGraphQLClient.d.ts +10 -0
  111. package/features/graphqlClient/FetchGraphQLClient.js +62 -0
  112. package/features/graphqlClient/FetchGraphQLClient.js.map +1 -0
  113. package/features/graphqlClient/NetworkErrorPublishing.d.ts +14 -0
  114. package/features/graphqlClient/NetworkErrorPublishing.js +55 -0
  115. package/features/graphqlClient/NetworkErrorPublishing.js.map +1 -0
  116. package/features/graphqlClient/RequestValue.d.ts +20 -0
  117. package/features/graphqlClient/RequestValue.js +42 -0
  118. package/features/graphqlClient/RequestValue.js.map +1 -0
  119. package/features/graphqlClient/RetryGraphQLClient.d.ts +18 -0
  120. package/features/graphqlClient/RetryGraphQLClient.js +54 -0
  121. package/features/graphqlClient/RetryGraphQLClient.js.map +1 -0
  122. package/features/graphqlClient/__tests__/GraphQLClient.test.d.ts +1 -0
  123. package/features/graphqlClient/__tests__/GraphQLClient.test.js +350 -0
  124. package/features/graphqlClient/__tests__/GraphQLClient.test.js.map +1 -0
  125. package/features/graphqlClient/abstractions.d.ts +17 -0
  126. package/features/graphqlClient/abstractions.js +4 -0
  127. package/features/graphqlClient/abstractions.js.map +1 -0
  128. package/features/graphqlClient/feature.d.ts +6 -0
  129. package/features/graphqlClient/feature.js +31 -0
  130. package/features/graphqlClient/feature.js.map +1 -0
  131. package/features/graphqlClient/index.d.ts +1 -0
  132. package/features/graphqlClient/index.js +3 -0
  133. package/features/graphqlClient/index.js.map +1 -0
  134. package/features/graphqlClient/types.d.ts +5 -0
  135. package/features/graphqlClient/types.js +3 -0
  136. package/features/graphqlClient/types.js.map +1 -0
  137. package/features/localStorage/BrowserLocalStorageGateway.d.ts +9 -0
  138. package/features/localStorage/BrowserLocalStorageGateway.js +68 -0
  139. package/features/localStorage/BrowserLocalStorageGateway.js.map +1 -0
  140. package/features/localStorage/LocalStorage.d.ts +12 -0
  141. package/features/localStorage/LocalStorage.js +31 -0
  142. package/features/localStorage/LocalStorage.js.map +1 -0
  143. package/features/localStorage/LocalStorageRepository.d.ts +20 -0
  144. package/features/localStorage/LocalStorageRepository.js +95 -0
  145. package/features/localStorage/LocalStorageRepository.js.map +1 -0
  146. package/features/localStorage/abstractions.d.ts +48 -0
  147. package/features/localStorage/abstractions.js +19 -0
  148. package/features/localStorage/abstractions.js.map +1 -0
  149. package/features/localStorage/feature.d.ts +12 -0
  150. package/features/localStorage/feature.js +34 -0
  151. package/features/localStorage/feature.js.map +1 -0
  152. package/features/localStorage/index.d.ts +1 -0
  153. package/features/localStorage/index.js +3 -0
  154. package/features/localStorage/index.js.map +1 -0
  155. package/features/router/HistoryRouterGateway.d.ts +18 -0
  156. package/features/router/HistoryRouterGateway.js +82 -0
  157. package/features/router/HistoryRouterGateway.js.map +1 -0
  158. package/features/router/HistoryRouterGateway.test.d.ts +1 -0
  159. package/features/router/HistoryRouterGateway.test.js +204 -0
  160. package/features/router/HistoryRouterGateway.test.js.map +1 -0
  161. package/features/router/Route.d.ts +19 -0
  162. package/features/router/Route.js +59 -0
  163. package/features/router/Route.js.map +1 -0
  164. package/features/router/RouteUrl.d.ts +85 -0
  165. package/features/router/RouteUrl.js +232 -0
  166. package/features/router/RouteUrl.js.map +1 -0
  167. package/features/router/Router.d.ts +45 -0
  168. package/features/router/Router.js +129 -0
  169. package/features/router/Router.js.map +1 -0
  170. package/features/router/RouterPresenter.d.ts +17 -0
  171. package/features/router/RouterPresenter.js +45 -0
  172. package/features/router/RouterPresenter.js.map +1 -0
  173. package/features/router/RouterRepository.d.ts +21 -0
  174. package/features/router/RouterRepository.js +71 -0
  175. package/features/router/RouterRepository.js.map +1 -0
  176. package/features/router/RouterRepository.test.d.ts +1 -0
  177. package/features/router/RouterRepository.test.js +154 -0
  178. package/features/router/RouterRepository.test.js.map +1 -0
  179. package/features/router/abstractions.d.ts +68 -0
  180. package/features/router/abstractions.js +15 -0
  181. package/features/router/abstractions.js.map +1 -0
  182. package/features/router/feature.d.ts +4 -0
  183. package/features/router/feature.js +18 -0
  184. package/features/router/feature.js.map +1 -0
  185. package/features/router/index.d.ts +1 -0
  186. package/features/router/index.js +3 -0
  187. package/features/router/index.js.map +1 -0
  188. package/helpers/InterfaceGenerator/date.d.ts +15 -0
  189. package/helpers/InterfaceGenerator/date.js +3 -0
  190. package/helpers/InterfaceGenerator/date.js.map +1 -0
  191. package/helpers/InterfaceGenerator/id.d.ts +23 -0
  192. package/helpers/InterfaceGenerator/id.js +3 -0
  193. package/helpers/InterfaceGenerator/id.js.map +1 -0
  194. package/helpers/InterfaceGenerator/identity.d.ts +10 -0
  195. package/helpers/InterfaceGenerator/identity.js +3 -0
  196. package/helpers/InterfaceGenerator/identity.js.map +1 -0
  197. package/helpers/InterfaceGenerator/index.d.ts +5 -0
  198. package/helpers/InterfaceGenerator/index.js +3 -0
  199. package/helpers/InterfaceGenerator/index.js.map +1 -0
  200. package/helpers/InterfaceGenerator/numeric.d.ts +12 -0
  201. package/helpers/InterfaceGenerator/numeric.js +3 -0
  202. package/helpers/InterfaceGenerator/numeric.js.map +1 -0
  203. package/helpers/InterfaceGenerator/truthful.d.ts +7 -0
  204. package/helpers/InterfaceGenerator/truthful.js +3 -0
  205. package/helpers/InterfaceGenerator/truthful.js.map +1 -0
  206. package/hooks/useAutocomplete/index.d.ts +1 -1
  207. package/hooks/useAutocomplete/index.js +1 -12
  208. package/hooks/useAutocomplete/index.js.map +1 -1
  209. package/hooks/useAutocomplete/useAutocomplete.d.ts +1 -1
  210. package/hooks/useAutocomplete/useAutocomplete.js +6 -16
  211. package/hooks/useAutocomplete/useAutocomplete.js.map +1 -1
  212. package/hooks/useDataList/functions/getData.js +2 -11
  213. package/hooks/useDataList/functions/getData.js.map +1 -1
  214. package/hooks/useDataList/functions/getError.js +2 -11
  215. package/hooks/useDataList/functions/getError.js.map +1 -1
  216. package/hooks/useDataList/functions/getMeta.js +2 -11
  217. package/hooks/useDataList/functions/getMeta.js.map +1 -1
  218. package/hooks/useDataList/functions/index.d.ts +3 -3
  219. package/hooks/useDataList/functions/index.js +3 -27
  220. package/hooks/useDataList/functions/index.js.map +1 -1
  221. package/hooks/useDataList/functions/searchDataByKey.js +4 -10
  222. package/hooks/useDataList/functions/searchDataByKey.js.map +1 -1
  223. package/hooks/useDataList/index.d.ts +1 -1
  224. package/hooks/useDataList/index.js +1 -12
  225. package/hooks/useDataList/index.js.map +1 -1
  226. package/hooks/useDataList/useDataList.d.ts +2 -3
  227. package/hooks/useDataList/useDataList.js +74 -94
  228. package/hooks/useDataList/useDataList.js.map +1 -1
  229. package/hooks/useDataList/utils/index.d.ts +1 -2
  230. package/hooks/useDataList/utils/index.js +1 -20
  231. package/hooks/useDataList/utils/index.js.map +1 -1
  232. package/hooks/useDataList/utils/prepareLoadListParams.js +10 -16
  233. package/hooks/useDataList/utils/prepareLoadListParams.js.map +1 -1
  234. package/hooks/useHandler.js +7 -12
  235. package/hooks/useHandler.js.map +1 -1
  236. package/hooks/useHandlers.js +11 -17
  237. package/hooks/useHandlers.js.map +1 -1
  238. package/hooks/useRegisterLegacyPlugin.d.ts +1 -1
  239. package/hooks/useRegisterLegacyPlugin.js +5 -11
  240. package/hooks/useRegisterLegacyPlugin.js.map +1 -1
  241. package/hooks/useUi.d.ts +1 -1
  242. package/hooks/useUi.js +4 -10
  243. package/hooks/useUi.js.map +1 -1
  244. package/i18n/i18n.js +5 -13
  245. package/i18n/i18n.js.map +1 -1
  246. package/i18n/index.d.ts +1 -1
  247. package/i18n/index.js +1 -13
  248. package/i18n/index.js.map +1 -1
  249. package/index.d.ts +23 -15
  250. package/index.js +25 -177
  251. package/index.js.map +1 -1
  252. package/package.json +25 -22
  253. package/plugins/AddQuerySelectionPlugin.d.ts +2 -2
  254. package/plugins/AddQuerySelectionPlugin.js +61 -107
  255. package/plugins/AddQuerySelectionPlugin.js.map +1 -1
  256. package/plugins/ApolloCacheObjectIdPlugin.js +12 -31
  257. package/plugins/ApolloCacheObjectIdPlugin.js.map +1 -1
  258. package/plugins/ApolloDynamicLink.d.ts +3 -2
  259. package/plugins/ApolloDynamicLink.js +19 -46
  260. package/plugins/ApolloDynamicLink.js.map +1 -1
  261. package/plugins/ApolloLinkPlugin.d.ts +1 -1
  262. package/plugins/ApolloLinkPlugin.js +18 -37
  263. package/plugins/ApolloLinkPlugin.js.map +1 -1
  264. package/plugins/ConsoleLinkPlugin.d.ts +1 -1
  265. package/plugins/ConsoleLinkPlugin.js +20 -41
  266. package/plugins/ConsoleLinkPlugin.js.map +1 -1
  267. package/plugins/NetworkErrorLinkPlugin/ErrorOverlay.d.ts +8 -13
  268. package/plugins/NetworkErrorLinkPlugin/ErrorOverlay.js +35 -58
  269. package/plugins/NetworkErrorLinkPlugin/ErrorOverlay.js.map +1 -1
  270. package/plugins/NetworkErrorLinkPlugin/GqlErrorOverlay.d.ts +14 -0
  271. package/plugins/NetworkErrorLinkPlugin/GqlErrorOverlay.js +31 -0
  272. package/plugins/NetworkErrorLinkPlugin/GqlErrorOverlay.js.map +1 -0
  273. package/plugins/NetworkErrorLinkPlugin/LocalAwsLambdaTimeoutMessage.d.ts +2 -0
  274. package/plugins/NetworkErrorLinkPlugin/LocalAwsLambdaTimeoutMessage.js +31 -0
  275. package/plugins/NetworkErrorLinkPlugin/LocalAwsLambdaTimeoutMessage.js.map +1 -0
  276. package/plugins/NetworkErrorLinkPlugin/StyledComponents.d.ts +4 -5
  277. package/plugins/NetworkErrorLinkPlugin/StyledComponents.js +68 -12
  278. package/plugins/NetworkErrorLinkPlugin/StyledComponents.js.map +1 -1
  279. package/plugins/NetworkErrorLinkPlugin/Typography.d.ts +8 -0
  280. package/plugins/NetworkErrorLinkPlugin/Typography.js +18 -0
  281. package/plugins/NetworkErrorLinkPlugin/Typography.js.map +1 -0
  282. package/plugins/NetworkErrorLinkPlugin/createErrorOverlay.d.ts +3 -3
  283. package/plugins/NetworkErrorLinkPlugin/createErrorOverlay.js +10 -25
  284. package/plugins/NetworkErrorLinkPlugin/createErrorOverlay.js.map +1 -1
  285. package/plugins/NetworkErrorLinkPlugin.d.ts +4 -1
  286. package/plugins/NetworkErrorLinkPlugin.js +60 -37
  287. package/plugins/NetworkErrorLinkPlugin.js.map +1 -1
  288. package/plugins/OmitTypenameLinkPlugin.d.ts +1 -1
  289. package/plugins/OmitTypenameLinkPlugin.js +11 -30
  290. package/plugins/OmitTypenameLinkPlugin.js.map +1 -1
  291. package/plugins/TenantHeaderLinkPlugin.d.ts +3 -3
  292. package/plugins/TenantHeaderLinkPlugin.js +29 -48
  293. package/plugins/TenantHeaderLinkPlugin.js.map +1 -1
  294. package/plugins/components/Image.d.ts +6 -0
  295. package/plugins/components/Image.js +19 -0
  296. package/plugins/components/Image.js.map +1 -0
  297. package/plugins/image.d.ts +1 -1
  298. package/plugins/image.js +46 -53
  299. package/plugins/image.js.map +1 -1
  300. package/plugins/index.d.ts +4 -4
  301. package/plugins/index.js +31 -53
  302. package/plugins/index.js.map +1 -1
  303. package/presentation/localStorage/index.d.ts +3 -0
  304. package/presentation/localStorage/index.js +5 -0
  305. package/presentation/localStorage/index.js.map +1 -0
  306. package/presentation/localStorage/useLocalStorage.d.ts +6 -0
  307. package/presentation/localStorage/useLocalStorage.js +21 -0
  308. package/presentation/localStorage/useLocalStorage.js.map +1 -0
  309. package/presentation/localStorage/useLocalStorageValue.d.ts +1 -0
  310. package/presentation/localStorage/useLocalStorageValue.js +20 -0
  311. package/presentation/localStorage/useLocalStorageValue.js.map +1 -0
  312. package/presentation/localStorage/useLocalStorageValues.d.ts +5 -0
  313. package/presentation/localStorage/useLocalStorageValues.js +39 -0
  314. package/presentation/localStorage/useLocalStorageValues.js.map +1 -0
  315. package/presentation/router/RouteElementRegistry.d.ts +14 -0
  316. package/presentation/router/RouteElementRegistry.js +32 -0
  317. package/presentation/router/RouteElementRegistry.js.map +1 -0
  318. package/presentation/router/abstractions.d.ts +13 -0
  319. package/presentation/router/abstractions.js +4 -0
  320. package/presentation/router/abstractions.js.map +1 -0
  321. package/presentation/router/components/RouteContent.d.ts +2 -0
  322. package/presentation/router/components/RouteContent.js +17 -0
  323. package/presentation/router/components/RouteContent.js.map +1 -0
  324. package/presentation/router/components/RouteLink.d.ts +50 -0
  325. package/presentation/router/components/RouteLink.js +22 -0
  326. package/presentation/router/components/RouteLink.js.map +1 -0
  327. package/presentation/router/components/SimpleLink.d.ts +44 -0
  328. package/presentation/router/components/SimpleLink.js +30 -0
  329. package/presentation/router/components/SimpleLink.js.map +1 -0
  330. package/presentation/router/hooks/useRoute.d.ts +6 -0
  331. package/presentation/router/hooks/useRoute.js +30 -0
  332. package/presentation/router/hooks/useRoute.js.map +1 -0
  333. package/presentation/router/hooks/useRouter.d.ts +7 -0
  334. package/presentation/router/hooks/useRouter.js +26 -0
  335. package/presentation/router/hooks/useRouter.js.map +1 -0
  336. package/presentation/router/index.d.ts +4 -0
  337. package/presentation/router/index.js +5 -0
  338. package/presentation/router/index.js.map +1 -0
  339. package/presentation/router/types.d.ts +5 -0
  340. package/presentation/router/types.js +3 -0
  341. package/presentation/router/types.js.map +1 -0
  342. package/react-butterfiles/Files.js +208 -235
  343. package/react-butterfiles/Files.js.map +1 -1
  344. package/react-butterfiles/file.todo +1 -0
  345. package/react-butterfiles/index.d.ts +1 -1
  346. package/react-butterfiles/index.js +2 -8
  347. package/react-butterfiles/index.js.map +1 -1
  348. package/react-butterfiles/utils/generateId.js +1 -7
  349. package/react-butterfiles/utils/generateId.js.map +1 -1
  350. package/react-butterfiles/utils/readFileContent.js +4 -10
  351. package/react-butterfiles/utils/readFileContent.js.map +1 -1
  352. package/renderApp.d.ts +1 -1
  353. package/renderApp.js +4 -11
  354. package/renderApp.js.map +1 -1
  355. package/router.d.ts +5 -0
  356. package/router.js +8 -0
  357. package/router.js.map +1 -0
  358. package/shared/di/DiContainerProvider.d.ts +8 -0
  359. package/shared/di/DiContainerProvider.js +17 -0
  360. package/shared/di/DiContainerProvider.js.map +1 -0
  361. package/shared/di/createFeature.d.ts +11 -0
  362. package/shared/di/createFeature.js +11 -0
  363. package/shared/di/createFeature.js.map +1 -0
  364. package/shared/di/useFeature.d.ts +2 -0
  365. package/shared/di/useFeature.js +18 -0
  366. package/shared/di/useFeature.js.map +1 -0
  367. package/types.d.ts +9 -6
  368. package/types.js +1 -12
  369. package/types.js.map +1 -1
  370. package/utils/createGenericContext.js +13 -22
  371. package/utils/createGenericContext.js.map +1 -1
  372. package/utils/createHashing.js +9 -15
  373. package/utils/createHashing.js.map +1 -1
  374. package/utils/index.d.ts +2 -10
  375. package/utils/index.js +2 -115
  376. package/utils/index.js.map +1 -1
  377. package/utils/legacyPluginToReactComponent.d.ts +1 -1
  378. package/utils/legacyPluginToReactComponent.js +5 -11
  379. package/utils/legacyPluginToReactComponent.js.map +1 -1
  380. package/components/Routes.d.ts +0 -2
  381. package/components/Routes.js +0 -46
  382. package/components/Routes.js.map +0 -1
  383. package/components/View.d.ts +0 -8
  384. package/components/View.js +0 -31
  385. package/components/View.js.map +0 -1
  386. package/core/AddRoute.d.ts +0 -21
  387. package/core/AddRoute.js +0 -21
  388. package/core/AddRoute.js.map +0 -1
  389. package/hooks/useDataList/utils/redirectToRouteWithQueryParams.d.ts +0 -14
  390. package/hooks/useDataList/utils/redirectToRouteWithQueryParams.js +0 -30
  391. package/hooks/useDataList/utils/redirectToRouteWithQueryParams.js.map +0 -1
  392. package/hooks/useDataList/utils/types.d.ts +0 -40
  393. package/hooks/useDataList/utils/types.js +0 -7
  394. package/hooks/useDataList/utils/types.js.map +0 -1
  395. package/plugins/LocaleHeaderLinkPlugin.d.ts +0 -10
  396. package/plugins/LocaleHeaderLinkPlugin.js +0 -49
  397. package/plugins/LocaleHeaderLinkPlugin.js.map +0 -1
  398. package/plugins/RoutePlugin.d.ts +0 -12
  399. package/plugins/RoutePlugin.js +0 -35
  400. package/plugins/RoutePlugin.js.map +0 -1
  401. package/plugins/ViewPlugin.d.ts +0 -14
  402. package/plugins/ViewPlugin.js +0 -40
  403. package/plugins/ViewPlugin.js.map +0 -1
  404. package/utils/getApiUrl.d.ts +0 -1
  405. package/utils/getApiUrl.js +0 -12
  406. package/utils/getApiUrl.js.map +0 -1
  407. package/utils/getGqlApiUrl.d.ts +0 -1
  408. package/utils/getGqlApiUrl.js +0 -12
  409. package/utils/getGqlApiUrl.js.map +0 -1
  410. package/utils/getHeadlessCmsGqlApiUrl.d.ts +0 -5
  411. package/utils/getHeadlessCmsGqlApiUrl.js +0 -18
  412. package/utils/getHeadlessCmsGqlApiUrl.js.map +0 -1
  413. package/utils/getLocaleCode.d.ts +0 -6
  414. package/utils/getLocaleCode.js +0 -43
  415. package/utils/getLocaleCode.js.map +0 -1
  416. package/utils/getPrerenderId.d.ts +0 -6
  417. package/utils/getPrerenderId.js +0 -11
  418. package/utils/getPrerenderId.js.map +0 -1
  419. package/utils/getTenantId.d.ts +0 -6
  420. package/utils/getTenantId.js +0 -51
  421. package/utils/getTenantId.js.map +0 -1
  422. package/utils/isLocalhost.d.ts +0 -1
  423. package/utils/isLocalhost.js +0 -15
  424. package/utils/isLocalhost.js.map +0 -1
  425. package/utils/isPrerendering.d.ts +0 -1
  426. package/utils/isPrerendering.js +0 -11
  427. package/utils/isPrerendering.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"names":["_createHashing","require","Object","keys","forEach","key","exports","defineProperty","enumerable","get","_getApiUrl","_getGqlApiUrl","_getHeadlessCmsGqlApiUrl","_getLocaleCode","_getPrerenderId","_getTenantId","_isLocalhost","_isPrerendering","_legacyPluginToReactComponent"],"sources":["index.ts"],"sourcesContent":["export * from \"./createHashing\";\nexport * from \"./getApiUrl\";\nexport * from \"./getGqlApiUrl\";\nexport * from \"./getHeadlessCmsGqlApiUrl\";\nexport * from \"./getLocaleCode\";\nexport * from \"./getPrerenderId\";\nexport * from \"./getTenantId\";\nexport * from \"./isLocalhost\";\nexport * from \"./isPrerendering\";\nexport * from \"./legacyPluginToReactComponent\";\n"],"mappings":"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","ignoreList":[]}
1
+ {"version":3,"names":[],"sources":["index.ts"],"sourcesContent":["export * from \"./createHashing.js\";\nexport * from \"./legacyPluginToReactComponent.js\";\n"],"mappings":"AAAA;AACA","ignoreList":[]}
@@ -1,4 +1,4 @@
1
- import React from "react";
1
+ import type React from "react";
2
2
  export interface LegacyPluginToReactComponentParams<TProps extends Record<string, any>> {
3
3
  pluginType: string;
4
4
  componentDisplayName: string;
@@ -1,16 +1,10 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.legacyPluginToReactComponent = void 0;
7
- var _useRegisterLegacyPlugin = require("../hooks/useRegisterLegacyPlugin");
8
- var legacyPluginToReactComponent = exports.legacyPluginToReactComponent = function legacyPluginToReactComponent(params) {
9
- var Component = function Component(props) {
10
- var plugin = Object.assign({
1
+ import { useRegisterLegacyPlugin } from "../hooks/useRegisterLegacyPlugin.js";
2
+ export const legacyPluginToReactComponent = function (params) {
3
+ const Component = props => {
4
+ const plugin = Object.assign({
11
5
  type: params.pluginType
12
6
  }, params.mapProps ? params.mapProps(props) : props);
13
- (0, _useRegisterLegacyPlugin.useRegisterLegacyPlugin)(plugin);
7
+ useRegisterLegacyPlugin(plugin);
14
8
  return null;
15
9
  };
16
10
  Component.displayName = params.componentDisplayName;
@@ -1 +1 @@
1
- {"version":3,"names":["_useRegisterLegacyPlugin","require","legacyPluginToReactComponent","exports","params","Component","props","plugin","Object","assign","type","pluginType","mapProps","useRegisterLegacyPlugin","displayName","componentDisplayName"],"sources":["legacyPluginToReactComponent.ts"],"sourcesContent":["import React from \"react\";\nimport { useRegisterLegacyPlugin } from \"~/hooks/useRegisterLegacyPlugin\";\n\nexport interface LegacyPluginToReactComponentParams<TProps extends Record<string, any>> {\n pluginType: string;\n componentDisplayName: string;\n mapProps?: (props: TProps) => TProps;\n}\n\nexport const legacyPluginToReactComponent = function <TProps extends Record<string, any>>(\n params: LegacyPluginToReactComponentParams<TProps>\n) {\n const Component: React.ComponentType<TProps> = props => {\n const plugin = Object.assign(\n { type: params.pluginType },\n params.mapProps ? params.mapProps(props) : props\n );\n useRegisterLegacyPlugin(plugin);\n return null;\n };\n\n Component.displayName = params.componentDisplayName;\n\n return Component;\n};\n"],"mappings":";;;;;;AACA,IAAAA,wBAAA,GAAAC,OAAA;AAQO,IAAMC,4BAA4B,GAAAC,OAAA,CAAAD,4BAAA,GAAG,SAA/BA,4BAA4BA,CACrCE,MAAkD,EACpD;EACE,IAAMC,SAAsC,GAAG,SAAzCA,SAAsCA,CAAGC,KAAK,EAAI;IACpD,IAAMC,MAAM,GAAGC,MAAM,CAACC,MAAM,CACxB;MAAEC,IAAI,EAAEN,MAAM,CAACO;IAAW,CAAC,EAC3BP,MAAM,CAACQ,QAAQ,GAAGR,MAAM,CAACQ,QAAQ,CAACN,KAAK,CAAC,GAAGA,KAC/C,CAAC;IACD,IAAAO,gDAAuB,EAACN,MAAM,CAAC;IAC/B,OAAO,IAAI;EACf,CAAC;EAEDF,SAAS,CAACS,WAAW,GAAGV,MAAM,CAACW,oBAAoB;EAEnD,OAAOV,SAAS;AACpB,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["useRegisterLegacyPlugin","legacyPluginToReactComponent","params","Component","props","plugin","Object","assign","type","pluginType","mapProps","displayName","componentDisplayName"],"sources":["legacyPluginToReactComponent.ts"],"sourcesContent":["import type React from \"react\";\nimport { useRegisterLegacyPlugin } from \"~/hooks/useRegisterLegacyPlugin.js\";\n\nexport interface LegacyPluginToReactComponentParams<TProps extends Record<string, any>> {\n pluginType: string;\n componentDisplayName: string;\n mapProps?: (props: TProps) => TProps;\n}\n\nexport const legacyPluginToReactComponent = function <TProps extends Record<string, any>>(\n params: LegacyPluginToReactComponentParams<TProps>\n) {\n const Component: React.ComponentType<TProps> = props => {\n const plugin = Object.assign(\n { type: params.pluginType },\n params.mapProps ? params.mapProps(props) : props\n );\n useRegisterLegacyPlugin(plugin);\n return null;\n };\n\n Component.displayName = params.componentDisplayName;\n\n return Component;\n};\n"],"mappings":"AACA,SAASA,uBAAuB;AAQhC,OAAO,MAAMC,4BAA4B,GAAG,SAAAA,CACxCC,MAAkD,EACpD;EACE,MAAMC,SAAsC,GAAGC,KAAK,IAAI;IACpD,MAAMC,MAAM,GAAGC,MAAM,CAACC,MAAM,CACxB;MAAEC,IAAI,EAAEN,MAAM,CAACO;IAAW,CAAC,EAC3BP,MAAM,CAACQ,QAAQ,GAAGR,MAAM,CAACQ,QAAQ,CAACN,KAAK,CAAC,GAAGA,KAC/C,CAAC;IACDJ,uBAAuB,CAACK,MAAM,CAAC;IAC/B,OAAO,IAAI;EACf,CAAC;EAEDF,SAAS,CAACQ,WAAW,GAAGT,MAAM,CAACU,oBAAoB;EAEnD,OAAOT,SAAS;AACpB,CAAC","ignoreList":[]}
@@ -1,2 +0,0 @@
1
- import React from "react";
2
- export declare const Routes: () => React.JSX.Element;
@@ -1,46 +0,0 @@
1
- "use strict";
2
-
3
- var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
4
- Object.defineProperty(exports, "__esModule", {
5
- value: true
6
- });
7
- exports.Routes = void 0;
8
- var _toConsumableArray2 = _interopRequireDefault(require("@babel/runtime/helpers/toConsumableArray"));
9
- var _react = _interopRequireDefault(require("react"));
10
- var _plugins = require("@webiny/plugins");
11
- var _reactRouter = require("@webiny/react-router");
12
- // This file is necessary only for backwards compatibility.
13
- // We'll remove this once the legacy rendering engine is removed.
14
-
15
- var Routes = exports.Routes = function Routes() {
16
- // We cannot call `sort` on the array returned by the `plugins.byType` call - it is read-only.
17
- var routes = (0, _toConsumableArray2.default)(_plugins.plugins.byType("route")).sort(function (a, b) {
18
- var pathA = a.route.props.path || "*";
19
- var pathB = b.route.props.path || "*";
20
-
21
- // This will sort paths at the very bottom of the list
22
- if (pathA === "/" && pathB === "*") {
23
- return -1;
24
- }
25
-
26
- // This will push * and / to the bottom of the list
27
- if (pathA === "*" || pathA === "/") {
28
- return 1;
29
- }
30
-
31
- // This will push * and / to the bottom of the list
32
- if (["*", "/"].includes(pathB)) {
33
- return -1;
34
- }
35
- return 0;
36
- });
37
- return /*#__PURE__*/_react.default.createElement(_reactRouter.Routes, null, routes.map(function (_ref) {
38
- var route = _ref.route,
39
- name = _ref.name;
40
- return /*#__PURE__*/_react.default.cloneElement(route, {
41
- key: name
42
- });
43
- }));
44
- };
45
-
46
- //# sourceMappingURL=Routes.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["_react","_interopRequireDefault","require","_plugins","_reactRouter","Routes","exports","routes","_toConsumableArray2","default","plugins","byType","sort","a","b","pathA","route","props","path","pathB","includes","createElement","map","_ref","name","React","cloneElement","key"],"sources":["Routes.tsx"],"sourcesContent":["// This file is necessary only for backwards compatibility.\n// We'll remove this once the legacy rendering engine is removed.\nimport React from \"react\";\nimport { plugins } from \"@webiny/plugins\";\nimport { Routes as ReactRouterRoutes } from \"@webiny/react-router\";\nimport { RoutePlugin } from \"../types\";\n\nexport const Routes = () => {\n // We cannot call `sort` on the array returned by the `plugins.byType` call - it is read-only.\n const routes = [...plugins.byType<RoutePlugin>(\"route\")].sort((a, b) => {\n const pathA = a.route.props.path || \"*\";\n const pathB = b.route.props.path || \"*\";\n\n // This will sort paths at the very bottom of the list\n if (pathA === \"/\" && pathB === \"*\") {\n return -1;\n }\n\n // This will push * and / to the bottom of the list\n if (pathA === \"*\" || pathA === \"/\") {\n return 1;\n }\n\n // This will push * and / to the bottom of the list\n if ([\"*\", \"/\"].includes(pathB)) {\n return -1;\n }\n\n return 0;\n });\n\n return (\n <ReactRouterRoutes>\n {routes.map(({ route, name }) => React.cloneElement(route, { key: name }))}\n </ReactRouterRoutes>\n );\n};\n"],"mappings":";;;;;;;;AAEA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,QAAA,GAAAD,OAAA;AACA,IAAAE,YAAA,GAAAF,OAAA;AAJA;AACA;;AAMO,IAAMG,MAAM,GAAAC,OAAA,CAAAD,MAAA,GAAG,SAATA,MAAMA,CAAA,EAAS;EACxB;EACA,IAAME,MAAM,GAAG,IAAAC,mBAAA,CAAAC,OAAA,EAAIC,gBAAO,CAACC,MAAM,CAAc,OAAO,CAAC,EAAEC,IAAI,CAAC,UAACC,CAAC,EAAEC,CAAC,EAAK;IACpE,IAAMC,KAAK,GAAGF,CAAC,CAACG,KAAK,CAACC,KAAK,CAACC,IAAI,IAAI,GAAG;IACvC,IAAMC,KAAK,GAAGL,CAAC,CAACE,KAAK,CAACC,KAAK,CAACC,IAAI,IAAI,GAAG;;IAEvC;IACA,IAAIH,KAAK,KAAK,GAAG,IAAII,KAAK,KAAK,GAAG,EAAE;MAChC,OAAO,CAAC,CAAC;IACb;;IAEA;IACA,IAAIJ,KAAK,KAAK,GAAG,IAAIA,KAAK,KAAK,GAAG,EAAE;MAChC,OAAO,CAAC;IACZ;;IAEA;IACA,IAAI,CAAC,GAAG,EAAE,GAAG,CAAC,CAACK,QAAQ,CAACD,KAAK,CAAC,EAAE;MAC5B,OAAO,CAAC,CAAC;IACb;IAEA,OAAO,CAAC;EACZ,CAAC,CAAC;EAEF,oBACInB,MAAA,CAAAS,OAAA,CAAAY,aAAA,CAACjB,YAAA,CAAAC,MAAiB,QACbE,MAAM,CAACe,GAAG,CAAC,UAAAC,IAAA;IAAA,IAAGP,KAAK,GAAAO,IAAA,CAALP,KAAK;MAAEQ,IAAI,GAAAD,IAAA,CAAJC,IAAI;IAAA,oBAAOC,cAAK,CAACC,YAAY,CAACV,KAAK,EAAE;MAAEW,GAAG,EAAEH;IAAK,CAAC,CAAC;EAAA,EAC1D,CAAC;AAE5B,CAAC","ignoreList":[]}
@@ -1,8 +0,0 @@
1
- import React from "react";
2
- interface Props {
3
- name: string;
4
- props?: Record<string, any>;
5
- children?: React.ReactNode;
6
- }
7
- export declare const View: ({ name, children, props }: Props) => React.JSX.Element;
8
- export {};
@@ -1,31 +0,0 @@
1
- "use strict";
2
-
3
- var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard").default;
4
- var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
5
- Object.defineProperty(exports, "__esModule", {
6
- value: true
7
- });
8
- exports.View = void 0;
9
- var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/objectSpread2"));
10
- var _react = _interopRequireWildcard(require("react"));
11
- var _plugins = require("@webiny/plugins");
12
- var _ViewPlugin = require("../plugins/ViewPlugin");
13
- var View = exports.View = function View(_ref) {
14
- var name = _ref.name,
15
- children = _ref.children,
16
- _ref$props = _ref.props,
17
- props = _ref$props === void 0 ? {} : _ref$props;
18
- var viewPlugins = _plugins.plugins.byType(_ViewPlugin.ViewPlugin.type).filter(function (pl) {
19
- return pl.key === name;
20
- });
21
- if (viewPlugins.length) {
22
- children = viewPlugins.reduce(function (el, pl) {
23
- return pl.render((0, _objectSpread2.default)({
24
- children: el
25
- }, props));
26
- }, children);
27
- }
28
- return /*#__PURE__*/_react.default.createElement(_react.Fragment, null, children || null);
29
- };
30
-
31
- //# sourceMappingURL=View.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["_react","_interopRequireWildcard","require","_plugins","_ViewPlugin","View","exports","_ref","name","children","_ref$props","props","viewPlugins","plugins","byType","ViewPlugin","type","filter","pl","key","length","reduce","el","render","_objectSpread2","default","createElement","Fragment"],"sources":["View.tsx"],"sourcesContent":["import React, { Fragment } from \"react\";\nimport { plugins } from \"@webiny/plugins\";\nimport { ViewPlugin } from \"../plugins/ViewPlugin\";\n\ninterface Props {\n name: string;\n props?: Record<string, any>;\n children?: React.ReactNode;\n}\n\nexport const View = ({ name, children, props = {} }: Props) => {\n const viewPlugins = plugins.byType<ViewPlugin>(ViewPlugin.type).filter(pl => pl.key === name);\n\n if (viewPlugins.length) {\n children = viewPlugins.reduce((el, pl) => pl.render({ children: el, ...props }), children);\n }\n\n return <Fragment>{children || null}</Fragment>;\n};\n"],"mappings":";;;;;;;;;AAAA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,QAAA,GAAAD,OAAA;AACA,IAAAE,WAAA,GAAAF,OAAA;AAQO,IAAMG,IAAI,GAAAC,OAAA,CAAAD,IAAA,GAAG,SAAPA,IAAIA,CAAAE,IAAA,EAA8C;EAAA,IAAxCC,IAAI,GAAAD,IAAA,CAAJC,IAAI;IAAEC,QAAQ,GAAAF,IAAA,CAARE,QAAQ;IAAAC,UAAA,GAAAH,IAAA,CAAEI,KAAK;IAALA,KAAK,GAAAD,UAAA,cAAG,CAAC,CAAC,GAAAA,UAAA;EAC7C,IAAME,WAAW,GAAGC,gBAAO,CAACC,MAAM,CAAaC,sBAAU,CAACC,IAAI,CAAC,CAACC,MAAM,CAAC,UAAAC,EAAE;IAAA,OAAIA,EAAE,CAACC,GAAG,KAAKX,IAAI;EAAA,EAAC;EAE7F,IAAII,WAAW,CAACQ,MAAM,EAAE;IACpBX,QAAQ,GAAGG,WAAW,CAACS,MAAM,CAAC,UAACC,EAAE,EAAEJ,EAAE;MAAA,OAAKA,EAAE,CAACK,MAAM,KAAAC,cAAA,CAAAC,OAAA;QAAGhB,QAAQ,EAAEa;MAAE,GAAKX,KAAK,CAAE,CAAC;IAAA,GAAEF,QAAQ,CAAC;EAC9F;EAEA,oBAAOT,MAAA,CAAAyB,OAAA,CAAAC,aAAA,CAAC1B,MAAA,CAAA2B,QAAQ,QAAElB,QAAQ,IAAI,IAAe,CAAC;AAClD,CAAC","ignoreList":[]}
@@ -1,21 +0,0 @@
1
- import React from "react";
2
- import { RouteProps } from "@webiny/react-router";
3
- export declare const AddRoute: ((props: RouteProps) => null) & {
4
- original: (props: RouteProps) => null;
5
- originalName: string;
6
- displayName: string;
7
- } & {
8
- original: ((props: RouteProps) => null) & {
9
- original: (props: RouteProps) => null;
10
- originalName: string;
11
- displayName: string;
12
- };
13
- originalName: string;
14
- displayName: string;
15
- } & {
16
- createDecorator: (decorator: import("@webiny/react-composition").ComponentDecorator<((props: RouteProps) => null) & {
17
- original: (props: RouteProps) => null;
18
- originalName: string;
19
- displayName: string;
20
- }>) => (props: unknown) => React.JSX.Element;
21
- };
package/core/AddRoute.js DELETED
@@ -1,21 +0,0 @@
1
- "use strict";
2
-
3
- var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard").default;
4
- Object.defineProperty(exports, "__esModule", {
5
- value: true
6
- });
7
- exports.AddRoute = void 0;
8
- var _react = _interopRequireWildcard(require("react"));
9
- var _reactRouter = require("@webiny/react-router");
10
- var _App = require("../App");
11
- var _reactComposition = require("@webiny/react-composition");
12
- var AddRoute = exports.AddRoute = (0, _reactComposition.makeDecoratable)("AddRoute", function (props) {
13
- var _useApp = (0, _App.useApp)(),
14
- addRoute = _useApp.addRoute;
15
- (0, _react.useEffect)(function () {
16
- addRoute(/*#__PURE__*/_react.default.createElement(_reactRouter.Route, props));
17
- }, []);
18
- return null;
19
- });
20
-
21
- //# sourceMappingURL=AddRoute.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["_react","_interopRequireWildcard","require","_reactRouter","_App","_reactComposition","AddRoute","exports","makeDecoratable","props","_useApp","useApp","addRoute","useEffect","default","createElement","Route"],"sources":["AddRoute.tsx"],"sourcesContent":["import React, { useEffect } from \"react\";\nimport { Route, RouteProps } from \"@webiny/react-router\";\nimport { useApp } from \"~/App\";\nimport { makeDecoratable } from \"@webiny/react-composition\";\n\nexport const AddRoute = makeDecoratable(\"AddRoute\", (props: RouteProps) => {\n const { addRoute } = useApp();\n\n useEffect(() => {\n addRoute(<Route {...props} />);\n }, []);\n\n return null;\n});\n"],"mappings":";;;;;;;AAAA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AACA,IAAAE,IAAA,GAAAF,OAAA;AACA,IAAAG,iBAAA,GAAAH,OAAA;AAEO,IAAMI,QAAQ,GAAAC,OAAA,CAAAD,QAAA,GAAG,IAAAE,iCAAe,EAAC,UAAU,EAAE,UAACC,KAAiB,EAAK;EACvE,IAAAC,OAAA,GAAqB,IAAAC,WAAM,EAAC,CAAC;IAArBC,QAAQ,GAAAF,OAAA,CAARE,QAAQ;EAEhB,IAAAC,gBAAS,EAAC,YAAM;IACZD,QAAQ,cAACZ,MAAA,CAAAc,OAAA,CAAAC,aAAA,CAACZ,YAAA,CAAAa,KAAK,EAAKP,KAAQ,CAAC,CAAC;EAClC,CAAC,EAAE,EAAE,CAAC;EAEN,OAAO,IAAI;AACf,CAAC,CAAC","ignoreList":[]}
@@ -1,14 +0,0 @@
1
- interface Params {
2
- sort: string;
3
- search: string;
4
- where: Record<string, any>;
5
- }
6
- interface Location {
7
- search: string;
8
- }
9
- interface Options {
10
- history: Location[];
11
- location: Location;
12
- }
13
- declare const _default: (params: Params, options: Options) => void;
14
- export default _default;
@@ -1,30 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.default = void 0;
7
- var _default = exports.default = function _default(params, options) {
8
- var history = options.history,
9
- location = options.location;
10
- var paramsClone = Object.assign({}, params);
11
- ["sort", "search", "where"].forEach(function (key) {
12
- if (typeof paramsClone[key] === "object") {
13
- paramsClone[key] = JSON.stringify(paramsClone[key]);
14
- }
15
- });
16
- var keys = ["limit", "after", "before", "where", "search", "sort"];
17
- var query = new URLSearchParams(location.search);
18
- keys.forEach(function (key) {
19
- if (typeof paramsClone[key] !== "undefined") {
20
- query.set(key, paramsClone[key]);
21
- } else {
22
- query.delete(key);
23
- }
24
- });
25
- history.push({
26
- search: query.toString()
27
- });
28
- };
29
-
30
- //# sourceMappingURL=redirectToRouteWithQueryParams.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["_default","params","options","history","location","paramsClone","Object","assign","forEach","key","JSON","stringify","keys","query","URLSearchParams","search","set","delete","push","toString"],"sources":["redirectToRouteWithQueryParams.ts"],"sourcesContent":["interface Params {\n sort: string;\n search: string;\n where: Record<string, any>;\n}\ninterface Location {\n search: string;\n}\ninterface Options {\n history: Location[];\n location: Location;\n}\nexport default (params: Params, options: Options): void => {\n const { history, location } = options;\n const paramsClone: Record<string, any> = Object.assign({}, params);\n\n [\"sort\", \"search\", \"where\"].forEach(key => {\n if (typeof paramsClone[key] === \"object\") {\n paramsClone[key] = JSON.stringify(paramsClone[key]);\n }\n });\n\n const keys: string[] = [\"limit\", \"after\", \"before\", \"where\", \"search\", \"sort\"];\n\n const query = new URLSearchParams(location.search);\n keys.forEach(key => {\n if (typeof paramsClone[key] !== \"undefined\") {\n query.set(key, paramsClone[key]);\n } else {\n query.delete(key);\n }\n });\n\n history.push({ search: query.toString() });\n};\n"],"mappings":";;;;;;iCAYe,SAAAA,SAACC,MAAc,EAAEC,OAAgB,EAAW;EACvD,IAAQC,OAAO,GAAeD,OAAO,CAA7BC,OAAO;IAAEC,QAAQ,GAAKF,OAAO,CAApBE,QAAQ;EACzB,IAAMC,WAAgC,GAAGC,MAAM,CAACC,MAAM,CAAC,CAAC,CAAC,EAAEN,MAAM,CAAC;EAElE,CAAC,MAAM,EAAE,QAAQ,EAAE,OAAO,CAAC,CAACO,OAAO,CAAC,UAAAC,GAAG,EAAI;IACvC,IAAI,OAAOJ,WAAW,CAACI,GAAG,CAAC,KAAK,QAAQ,EAAE;MACtCJ,WAAW,CAACI,GAAG,CAAC,GAAGC,IAAI,CAACC,SAAS,CAACN,WAAW,CAACI,GAAG,CAAC,CAAC;IACvD;EACJ,CAAC,CAAC;EAEF,IAAMG,IAAc,GAAG,CAAC,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,CAAC;EAE9E,IAAMC,KAAK,GAAG,IAAIC,eAAe,CAACV,QAAQ,CAACW,MAAM,CAAC;EAClDH,IAAI,CAACJ,OAAO,CAAC,UAAAC,GAAG,EAAI;IAChB,IAAI,OAAOJ,WAAW,CAACI,GAAG,CAAC,KAAK,WAAW,EAAE;MACzCI,KAAK,CAACG,GAAG,CAACP,GAAG,EAAEJ,WAAW,CAACI,GAAG,CAAC,CAAC;IACpC,CAAC,MAAM;MACHI,KAAK,CAACI,MAAM,CAACR,GAAG,CAAC;IACrB;EACJ,CAAC,CAAC;EAEFN,OAAO,CAACe,IAAI,CAAC;IAAEH,MAAM,EAAEF,KAAK,CAACM,QAAQ,CAAC;EAAE,CAAC,CAAC;AAC9C,CAAC","ignoreList":[]}
@@ -1,40 +0,0 @@
1
- export type UseDataListParams = {
2
- load?: boolean;
3
- name: string;
4
- type: string;
5
- fields: string;
6
- limit?: number;
7
- sort?: {
8
- [key: string]: string;
9
- };
10
- where?: {
11
- [key: string]: any;
12
- };
13
- search?: {
14
- [key: string]: any;
15
- };
16
- };
17
- export type SearchParams = {
18
- query: string;
19
- operator?: "and" | "or";
20
- fields?: Array<string>;
21
- };
22
- export type UseDataListProps = {
23
- data: Record<string, any>[];
24
- meta: Record<string, any>;
25
- init: () => void;
26
- refresh: (params?: Record<string, any>) => void;
27
- delete: (id: string, options: Record<string, any>) => void;
28
- setPerPage: (perPage: number) => void;
29
- setPage: (page: number) => void;
30
- setSearch: (search: SearchParams | any) => void;
31
- setWhere: (where: Record<string, any>) => void;
32
- setSorters: (sort: Record<string, any>) => void;
33
- multiSelect: (item: Record<string, any>, value: boolean) => void;
34
- multiSelectAll: (value: boolean) => void;
35
- isMultiSelected: (item: Record<string, any>) => boolean;
36
- isAllMultiSelected: () => boolean;
37
- isNoneMultiSelected: () => boolean;
38
- getMultiSelected: () => Record<string, any>[];
39
- __loadParams: UseDataListParams;
40
- };
@@ -1,7 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
-
7
- //# sourceMappingURL=types.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":[],"sources":["types.ts"],"sourcesContent":["export type UseDataListParams = {\n load?: boolean;\n name: string;\n type: string;\n fields: string;\n limit?: number;\n sort?: {\n [key: string]: string;\n };\n where?: {\n [key: string]: any;\n };\n search?: {\n [key: string]: any;\n };\n};\n\nexport type SearchParams = {\n query: string;\n operator?: \"and\" | \"or\";\n fields?: Array<string>;\n};\n\nexport type UseDataListProps = {\n data: Record<string, any>[];\n meta: Record<string, any>;\n init: () => void;\n refresh: (params?: Record<string, any>) => void;\n delete: (id: string, options: Record<string, any>) => void;\n setPerPage: (perPage: number) => void;\n setPage: (page: number) => void;\n setSearch: (search: SearchParams | any) => void;\n setWhere: (where: Record<string, any>) => void;\n setSorters: (sort: Record<string, any>) => void;\n multiSelect: (item: Record<string, any>, value: boolean) => void;\n multiSelectAll: (value: boolean) => void;\n\n isMultiSelected: (item: Record<string, any>) => boolean;\n isAllMultiSelected: () => boolean;\n isNoneMultiSelected: () => boolean;\n getMultiSelected: () => Record<string, any>[];\n __loadParams: UseDataListParams;\n};\n"],"mappings":"","ignoreList":[]}
@@ -1,10 +0,0 @@
1
- import { ApolloLinkPlugin } from "./ApolloLinkPlugin";
2
- import { ApolloLink } from "apollo-link";
3
- /**
4
- * Append `x-i18n-locale` header from URL query (necessary for prerendering service).
5
- */
6
- export declare class LocaleHeaderLinkPlugin extends ApolloLinkPlugin {
7
- private readonly locale;
8
- constructor(locale?: string);
9
- createLink(): ApolloLink;
10
- }
@@ -1,49 +0,0 @@
1
- "use strict";
2
-
3
- var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
4
- Object.defineProperty(exports, "__esModule", {
5
- value: true
6
- });
7
- exports.LocaleHeaderLinkPlugin = void 0;
8
- var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/objectSpread2"));
9
- var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
10
- var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
11
- var _callSuper2 = _interopRequireDefault(require("@babel/runtime/helpers/callSuper"));
12
- var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits"));
13
- var _apolloLinkContext = require("apollo-link-context");
14
- var _ApolloLinkPlugin2 = require("./ApolloLinkPlugin");
15
- var _utils = require("../utils");
16
- /**
17
- * Append `x-i18n-locale` header from URL query (necessary for prerendering service).
18
- */
19
- var LocaleHeaderLinkPlugin = exports.LocaleHeaderLinkPlugin = /*#__PURE__*/function (_ApolloLinkPlugin) {
20
- function LocaleHeaderLinkPlugin(locale) {
21
- var _this;
22
- (0, _classCallCheck2.default)(this, LocaleHeaderLinkPlugin);
23
- _this = (0, _callSuper2.default)(this, LocaleHeaderLinkPlugin);
24
- _this.locale = locale || (0, _utils.getLocaleCode)();
25
- return _this;
26
- }
27
- (0, _inherits2.default)(LocaleHeaderLinkPlugin, _ApolloLinkPlugin);
28
- return (0, _createClass2.default)(LocaleHeaderLinkPlugin, [{
29
- key: "createLink",
30
- value: function createLink() {
31
- var _this2 = this;
32
- return (0, _apolloLinkContext.setContext)(function (_, _ref) {
33
- var headers = _ref.headers;
34
- if (_this2.locale) {
35
- return {
36
- headers: (0, _objectSpread2.default)((0, _objectSpread2.default)({}, headers), {}, {
37
- "x-i18n-locale": "content:".concat(_this2.locale, ";")
38
- })
39
- };
40
- }
41
- return {
42
- headers: headers
43
- };
44
- });
45
- }
46
- }]);
47
- }(_ApolloLinkPlugin2.ApolloLinkPlugin);
48
-
49
- //# sourceMappingURL=LocaleHeaderLinkPlugin.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["_apolloLinkContext","require","_ApolloLinkPlugin2","_utils","LocaleHeaderLinkPlugin","exports","_ApolloLinkPlugin","locale","_this","_classCallCheck2","default","_callSuper2","getLocaleCode","_inherits2","_createClass2","key","value","createLink","_this2","setContext","_","_ref","headers","_objectSpread2","concat","ApolloLinkPlugin"],"sources":["LocaleHeaderLinkPlugin.ts"],"sourcesContent":["import { setContext } from \"apollo-link-context\";\nimport { ApolloLinkPlugin } from \"./ApolloLinkPlugin\";\nimport { ApolloLink } from \"apollo-link\";\nimport { getLocaleCode } from \"~/utils\";\n\n/**\n * Append `x-i18n-locale` header from URL query (necessary for prerendering service).\n */\nexport class LocaleHeaderLinkPlugin extends ApolloLinkPlugin {\n private readonly locale: string;\n\n constructor(locale?: string) {\n super();\n\n this.locale = locale || (getLocaleCode() as string);\n }\n\n public override createLink(): ApolloLink {\n return setContext((_, { headers }) => {\n if (this.locale) {\n return {\n headers: {\n ...headers,\n \"x-i18n-locale\": `content:${this.locale};`\n }\n };\n }\n\n return { headers };\n });\n }\n}\n"],"mappings":";;;;;;;;;;;;AAAA,IAAAA,kBAAA,GAAAC,OAAA;AACA,IAAAC,kBAAA,GAAAD,OAAA;AAEA,IAAAE,MAAA,GAAAF,OAAA;AAEA;AACA;AACA;AAFA,IAGaG,sBAAsB,GAAAC,OAAA,CAAAD,sBAAA,0BAAAE,iBAAA;EAG/B,SAAAF,uBAAYG,MAAe,EAAE;IAAA,IAAAC,KAAA;IAAA,IAAAC,gBAAA,CAAAC,OAAA,QAAAN,sBAAA;IACzBI,KAAA,OAAAG,WAAA,CAAAD,OAAA,QAAAN,sBAAA;IAEAI,KAAA,CAAKD,MAAM,GAAGA,MAAM,IAAK,IAAAK,oBAAa,EAAC,CAAY;IAAC,OAAAJ,KAAA;EACxD;EAAC,IAAAK,UAAA,CAAAH,OAAA,EAAAN,sBAAA,EAAAE,iBAAA;EAAA,WAAAQ,aAAA,CAAAJ,OAAA,EAAAN,sBAAA;IAAAW,GAAA;IAAAC,KAAA,EAED,SAAgBC,UAAUA,CAAA,EAAe;MAAA,IAAAC,MAAA;MACrC,OAAO,IAAAC,6BAAU,EAAC,UAACC,CAAC,EAAAC,IAAA,EAAkB;QAAA,IAAdC,OAAO,GAAAD,IAAA,CAAPC,OAAO;QAC3B,IAAIJ,MAAI,CAACX,MAAM,EAAE;UACb,OAAO;YACHe,OAAO,MAAAC,cAAA,CAAAb,OAAA,MAAAa,cAAA,CAAAb,OAAA,MACAY,OAAO;cACV,eAAe,aAAAE,MAAA,CAAaN,MAAI,CAACX,MAAM;YAAG;UAElD,CAAC;QACL;QAEA,OAAO;UAAEe,OAAO,EAAPA;QAAQ,CAAC;MACtB,CAAC,CAAC;IACN;EAAC;AAAA,EAtBuCG,mCAAgB","ignoreList":[]}
@@ -1,12 +0,0 @@
1
- import * as React from "react";
2
- import { Plugin } from "@webiny/plugins";
3
- interface Config {
4
- route: React.ReactElement | null;
5
- }
6
- export declare class RoutePlugin extends Plugin {
7
- static readonly type: string;
8
- private _config;
9
- constructor(config?: Config);
10
- get route(): Config["route"];
11
- }
12
- export {};
@@ -1,35 +0,0 @@
1
- "use strict";
2
-
3
- var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
4
- Object.defineProperty(exports, "__esModule", {
5
- value: true
6
- });
7
- exports.RoutePlugin = void 0;
8
- var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
9
- var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
10
- var _callSuper2 = _interopRequireDefault(require("@babel/runtime/helpers/callSuper"));
11
- var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits"));
12
- var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
13
- var _plugins = require("@webiny/plugins");
14
- var RoutePlugin = exports.RoutePlugin = /*#__PURE__*/function (_Plugin) {
15
- function RoutePlugin(config) {
16
- var _this;
17
- (0, _classCallCheck2.default)(this, RoutePlugin);
18
- _this = (0, _callSuper2.default)(this, RoutePlugin);
19
- _this._config = config || {};
20
- return _this;
21
- }
22
- (0, _inherits2.default)(RoutePlugin, _Plugin);
23
- return (0, _createClass2.default)(RoutePlugin, [{
24
- key: "route",
25
- get: function get() {
26
- if (!this._config.route) {
27
- return null;
28
- }
29
- return this._config.route;
30
- }
31
- }]);
32
- }(_plugins.Plugin);
33
- (0, _defineProperty2.default)(RoutePlugin, "type", "route");
34
-
35
- //# sourceMappingURL=RoutePlugin.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["_plugins","require","RoutePlugin","exports","_Plugin","config","_this","_classCallCheck2","default","_callSuper2","_config","_inherits2","_createClass2","key","get","route","Plugin","_defineProperty2"],"sources":["RoutePlugin.tsx"],"sourcesContent":["import * as React from \"react\";\nimport { Plugin } from \"@webiny/plugins\";\n\ninterface Config {\n route: React.ReactElement | null;\n}\n\nexport class RoutePlugin extends Plugin {\n public static override readonly type: string = \"route\";\n private _config: Partial<Config>;\n\n constructor(config?: Config) {\n super();\n this._config = config || {};\n }\n\n get route(): Config[\"route\"] {\n if (!this._config.route) {\n return null;\n }\n return this._config.route;\n }\n}\n"],"mappings":";;;;;;;;;;;;AACA,IAAAA,QAAA,GAAAC,OAAA;AAAyC,IAM5BC,WAAW,GAAAC,OAAA,CAAAD,WAAA,0BAAAE,OAAA;EAIpB,SAAAF,YAAYG,MAAe,EAAE;IAAA,IAAAC,KAAA;IAAA,IAAAC,gBAAA,CAAAC,OAAA,QAAAN,WAAA;IACzBI,KAAA,OAAAG,WAAA,CAAAD,OAAA,QAAAN,WAAA;IACAI,KAAA,CAAKI,OAAO,GAAGL,MAAM,IAAI,CAAC,CAAC;IAAC,OAAAC,KAAA;EAChC;EAAC,IAAAK,UAAA,CAAAH,OAAA,EAAAN,WAAA,EAAAE,OAAA;EAAA,WAAAQ,aAAA,CAAAJ,OAAA,EAAAN,WAAA;IAAAW,GAAA;IAAAC,GAAA,EAED,SAAAA,IAAA,EAA6B;MACzB,IAAI,CAAC,IAAI,CAACJ,OAAO,CAACK,KAAK,EAAE;QACrB,OAAO,IAAI;MACf;MACA,OAAO,IAAI,CAACL,OAAO,CAACK,KAAK;IAC7B;EAAC;AAAA,EAd4BC,eAAM;AAAA,IAAAC,gBAAA,CAAAT,OAAA,EAA1BN,WAAW,UAC2B,OAAO","ignoreList":[]}
@@ -1,14 +0,0 @@
1
- import * as React from "react";
2
- import { Plugin } from "@webiny/plugins";
3
- interface Config<Props> {
4
- name: string;
5
- render(props: Props): React.ReactElement | null;
6
- }
7
- export declare class ViewPlugin<Props = any> extends Plugin {
8
- static readonly type: string;
9
- private readonly _config;
10
- constructor(config?: Config<Props>);
11
- get key(): string | undefined;
12
- render(props: Props): React.ReactElement<any, string | React.JSXElementConstructor<any>> | null;
13
- }
14
- export {};
@@ -1,40 +0,0 @@
1
- "use strict";
2
-
3
- var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
4
- Object.defineProperty(exports, "__esModule", {
5
- value: true
6
- });
7
- exports.ViewPlugin = void 0;
8
- var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
9
- var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
10
- var _callSuper2 = _interopRequireDefault(require("@babel/runtime/helpers/callSuper"));
11
- var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits"));
12
- var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
13
- var _plugins = require("@webiny/plugins");
14
- var ViewPlugin = exports.ViewPlugin = /*#__PURE__*/function (_Plugin) {
15
- function ViewPlugin(config) {
16
- var _this;
17
- (0, _classCallCheck2.default)(this, ViewPlugin);
18
- _this = (0, _callSuper2.default)(this, ViewPlugin);
19
- _this._config = config || {};
20
- return _this;
21
- }
22
- (0, _inherits2.default)(ViewPlugin, _Plugin);
23
- return (0, _createClass2.default)(ViewPlugin, [{
24
- key: "key",
25
- get: function get() {
26
- return this._config.name;
27
- }
28
- }, {
29
- key: "render",
30
- value: function render(props) {
31
- if (!this._config.render) {
32
- return null;
33
- }
34
- return this._config.render(props);
35
- }
36
- }]);
37
- }(_plugins.Plugin);
38
- (0, _defineProperty2.default)(ViewPlugin, "type", "view");
39
-
40
- //# sourceMappingURL=ViewPlugin.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["_plugins","require","ViewPlugin","exports","_Plugin","config","_this","_classCallCheck2","default","_callSuper2","_config","_inherits2","_createClass2","key","get","name","value","render","props","Plugin","_defineProperty2"],"sources":["ViewPlugin.ts"],"sourcesContent":["import * as React from \"react\";\nimport { Plugin } from \"@webiny/plugins\";\n\ninterface Config<Props> {\n name: string;\n render(props: Props): React.ReactElement | null;\n}\n\nexport class ViewPlugin<Props = any> extends Plugin {\n public static override readonly type: string = \"view\";\n private readonly _config: Partial<Config<Props>>;\n\n public constructor(config?: Config<Props>) {\n super();\n this._config = config || {};\n }\n\n get key() {\n return this._config.name;\n }\n\n public render(props: Props) {\n if (!this._config.render) {\n return null;\n }\n return this._config.render(props);\n }\n}\n"],"mappings":";;;;;;;;;;;;AACA,IAAAA,QAAA,GAAAC,OAAA;AAAyC,IAO5BC,UAAU,GAAAC,OAAA,CAAAD,UAAA,0BAAAE,OAAA;EAInB,SAAAF,WAAmBG,MAAsB,EAAE;IAAA,IAAAC,KAAA;IAAA,IAAAC,gBAAA,CAAAC,OAAA,QAAAN,UAAA;IACvCI,KAAA,OAAAG,WAAA,CAAAD,OAAA,QAAAN,UAAA;IACAI,KAAA,CAAKI,OAAO,GAAGL,MAAM,IAAI,CAAC,CAAC;IAAC,OAAAC,KAAA;EAChC;EAAC,IAAAK,UAAA,CAAAH,OAAA,EAAAN,UAAA,EAAAE,OAAA;EAAA,WAAAQ,aAAA,CAAAJ,OAAA,EAAAN,UAAA;IAAAW,GAAA;IAAAC,GAAA,EAED,SAAAA,IAAA,EAAU;MACN,OAAO,IAAI,CAACJ,OAAO,CAACK,IAAI;IAC5B;EAAC;IAAAF,GAAA;IAAAG,KAAA,EAED,SAAOC,MAAMA,CAACC,KAAY,EAAE;MACxB,IAAI,CAAC,IAAI,CAACR,OAAO,CAACO,MAAM,EAAE;QACtB,OAAO,IAAI;MACf;MACA,OAAO,IAAI,CAACP,OAAO,CAACO,MAAM,CAACC,KAAK,CAAC;IACrC;EAAC;AAAA,EAlBwCC,eAAM;AAAA,IAAAC,gBAAA,CAAAZ,OAAA,EAAtCN,UAAU,UAC4B,MAAM","ignoreList":[]}
@@ -1 +0,0 @@
1
- export declare const getApiUrl: (path?: string) => string;
@@ -1,12 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.getApiUrl = void 0;
7
- var getApiUrl = exports.getApiUrl = function getApiUrl() {
8
- var path = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : "";
9
- return process.env.REACT_APP_API_URL + path;
10
- };
11
-
12
- //# sourceMappingURL=getApiUrl.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["getApiUrl","exports","path","arguments","length","undefined","process","env","REACT_APP_API_URL"],"sources":["getApiUrl.ts"],"sourcesContent":["export const getApiUrl = (path = \"\"): string => {\n return process.env.REACT_APP_API_URL + path;\n};\n"],"mappings":";;;;;;AAAO,IAAMA,SAAS,GAAAC,OAAA,CAAAD,SAAA,GAAG,SAAZA,SAASA,CAAA,EAA0B;EAAA,IAAtBE,IAAI,GAAAC,SAAA,CAAAC,MAAA,QAAAD,SAAA,QAAAE,SAAA,GAAAF,SAAA,MAAG,EAAE;EAC/B,OAAOG,OAAO,CAACC,GAAG,CAACC,iBAAiB,GAAGN,IAAI;AAC/C,CAAC","ignoreList":[]}
@@ -1 +0,0 @@
1
- export declare const getGqlApiUrl: () => string;
@@ -1,12 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.getGqlApiUrl = void 0;
7
- var _getApiUrl = require("./getApiUrl");
8
- var getGqlApiUrl = exports.getGqlApiUrl = function getGqlApiUrl() {
9
- return (0, _getApiUrl.getApiUrl)("/graphql");
10
- };
11
-
12
- //# sourceMappingURL=getGqlApiUrl.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["_getApiUrl","require","getGqlApiUrl","exports","getApiUrl"],"sources":["getGqlApiUrl.ts"],"sourcesContent":["import { getApiUrl } from \"./getApiUrl\";\n\nexport const getGqlApiUrl = (): string => {\n return getApiUrl(\"/graphql\");\n};\n"],"mappings":";;;;;;AAAA,IAAAA,UAAA,GAAAC,OAAA;AAEO,IAAMC,YAAY,GAAAC,OAAA,CAAAD,YAAA,GAAG,SAAfA,YAAYA,CAAA,EAAiB;EACtC,OAAO,IAAAE,oBAAS,EAAC,UAAU,CAAC;AAChC,CAAC","ignoreList":[]}
@@ -1,5 +0,0 @@
1
- export declare const getHeadlessCmsGqlApiUrl: () => {
2
- preview: string;
3
- read: string;
4
- manage: string;
5
- };
@@ -1,18 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.getHeadlessCmsGqlApiUrl = void 0;
7
- var _getApiUrl = require("./getApiUrl");
8
- var _getLocaleCode = require("./getLocaleCode");
9
- var getHeadlessCmsGqlApiUrl = exports.getHeadlessCmsGqlApiUrl = function getHeadlessCmsGqlApiUrl() {
10
- var locale = (0, _getLocaleCode.getLocaleCode)();
11
- return {
12
- preview: (0, _getApiUrl.getApiUrl)("/cms/preview/".concat(locale)),
13
- read: (0, _getApiUrl.getApiUrl)("/cms/read/".concat(locale)),
14
- manage: (0, _getApiUrl.getApiUrl)("/cms/manage/".concat(locale))
15
- };
16
- };
17
-
18
- //# sourceMappingURL=getHeadlessCmsGqlApiUrl.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["_getApiUrl","require","_getLocaleCode","getHeadlessCmsGqlApiUrl","exports","locale","getLocaleCode","preview","getApiUrl","concat","read","manage"],"sources":["getHeadlessCmsGqlApiUrl.ts"],"sourcesContent":["import { getApiUrl } from \"./getApiUrl\";\nimport { getLocaleCode } from \"./getLocaleCode\";\n\nexport const getHeadlessCmsGqlApiUrl = (): { preview: string; read: string; manage: string } => {\n const locale = getLocaleCode();\n return {\n preview: getApiUrl(`/cms/preview/${locale}`),\n read: getApiUrl(`/cms/read/${locale}`),\n manage: getApiUrl(`/cms/manage/${locale}`)\n };\n};\n"],"mappings":";;;;;;AAAA,IAAAA,UAAA,GAAAC,OAAA;AACA,IAAAC,cAAA,GAAAD,OAAA;AAEO,IAAME,uBAAuB,GAAAC,OAAA,CAAAD,uBAAA,GAAG,SAA1BA,uBAAuBA,CAAA,EAA4D;EAC5F,IAAME,MAAM,GAAG,IAAAC,4BAAa,EAAC,CAAC;EAC9B,OAAO;IACHC,OAAO,EAAE,IAAAC,oBAAS,kBAAAC,MAAA,CAAiBJ,MAAM,CAAE,CAAC;IAC5CK,IAAI,EAAE,IAAAF,oBAAS,eAAAC,MAAA,CAAcJ,MAAM,CAAE,CAAC;IACtCM,MAAM,EAAE,IAAAH,oBAAS,iBAAAC,MAAA,CAAgBJ,MAAM,CAAE;EAC7C,CAAC;AACL,CAAC","ignoreList":[]}
@@ -1,6 +0,0 @@
1
- declare global {
2
- interface Window {
3
- __PS_RENDER_LOCALE__: string;
4
- }
5
- }
6
- export declare const getLocaleCode: () => string | null;