@webiny/app 0.0.0-unstable.eb196ccd2f → 0.0.0-unstable.f6dc066313

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 (385) hide show
  1. package/App.d.ts +4 -5
  2. package/App.js +26 -32
  3. package/App.js.map +1 -1
  4. package/README.md +7 -15
  5. package/apollo-client/InMemoryCache.js +2 -2
  6. package/apollo-client/InMemoryCache.js.map +1 -1
  7. package/components/Image.d.ts +1 -2
  8. package/components/Image.js +1 -1
  9. package/components/Image.js.map +1 -1
  10. package/components/index.d.ts +1 -2
  11. package/components/index.js +1 -2
  12. package/components/index.js.map +1 -1
  13. package/config/RouterConfig/Route.d.ts +9 -10
  14. package/config/RouterConfig/Route.js +5 -14
  15. package/config/RouterConfig/Route.js.map +1 -1
  16. package/config/RouterConfig.d.ts +10 -11
  17. package/config/RouterConfig.js +1 -1
  18. package/config/RouterConfig.js.map +1 -1
  19. package/contexts/Ui/index.js.map +1 -1
  20. package/core/Plugin.js +2 -2
  21. package/core/Plugin.js.map +1 -1
  22. package/core/Plugins.d.ts +1 -1
  23. package/core/Plugins.js +5 -4
  24. package/core/Plugins.js.map +1 -1
  25. package/core/Provider.d.ts +1 -1
  26. package/core/Provider.js +1 -1
  27. package/core/Provider.js.map +1 -1
  28. package/core/createProviderPlugin.js +1 -1
  29. package/core/createProviderPlugin.js.map +1 -1
  30. package/errors/AuthenticationErrorEvent.d.ts +9 -0
  31. package/errors/AuthenticationErrorEvent.js +10 -0
  32. package/errors/AuthenticationErrorEvent.js.map +1 -0
  33. package/errors/NetworkErrorEvent.d.ts +15 -0
  34. package/errors/NetworkErrorEvent.js +10 -0
  35. package/errors/NetworkErrorEvent.js.map +1 -0
  36. package/errors/abstractions.d.ts +12 -0
  37. package/errors/abstractions.js +5 -0
  38. package/errors/abstractions.js.map +1 -0
  39. package/errors/index.d.ts +6 -0
  40. package/errors/index.js +6 -0
  41. package/errors/index.js.map +1 -0
  42. package/exports/admin/env-config.d.ts +1 -0
  43. package/exports/admin/env-config.js +3 -0
  44. package/exports/admin/env-config.js.map +1 -0
  45. package/exports/admin/graphql-client.d.ts +1 -0
  46. package/exports/admin/graphql-client.js +3 -0
  47. package/exports/admin/graphql-client.js.map +1 -0
  48. package/exports/admin/local-storage.d.ts +2 -0
  49. package/exports/admin/local-storage.js +4 -0
  50. package/exports/admin/local-storage.js.map +1 -0
  51. package/exports/admin/router.d.ts +5 -0
  52. package/exports/admin/router.js +7 -0
  53. package/exports/admin/router.js.map +1 -0
  54. package/exports/admin/security.d.ts +1 -0
  55. package/exports/admin/security.js +3 -0
  56. package/exports/admin/security.js.map +1 -0
  57. package/exports/admin.d.ts +6 -0
  58. package/exports/admin.js +8 -0
  59. package/exports/admin.js.map +1 -0
  60. package/features/envConfig/EnvConfig.d.ts +6 -0
  61. package/features/envConfig/EnvConfig.js +14 -0
  62. package/features/envConfig/EnvConfig.js.map +1 -0
  63. package/features/envConfig/abstractions.d.ts +27 -0
  64. package/features/envConfig/abstractions.js +4 -0
  65. package/features/envConfig/abstractions.js.map +1 -0
  66. package/features/envConfig/feature.d.ts +17 -0
  67. package/features/envConfig/feature.js +14 -0
  68. package/features/envConfig/feature.js.map +1 -0
  69. package/features/envConfig/index.d.ts +1 -0
  70. package/features/envConfig/index.js +3 -0
  71. package/features/envConfig/index.js.map +1 -0
  72. package/features/eventPublisher/EventPublisher.d.ts +8 -0
  73. package/features/eventPublisher/EventPublisher.js +27 -0
  74. package/features/eventPublisher/EventPublisher.js.map +1 -0
  75. package/features/eventPublisher/abstractions.d.ts +18 -0
  76. package/features/eventPublisher/abstractions.js +14 -0
  77. package/features/eventPublisher/abstractions.js.map +1 -0
  78. package/features/eventPublisher/feature.d.ts +1 -0
  79. package/features/eventPublisher/feature.js +11 -0
  80. package/features/eventPublisher/feature.js.map +1 -0
  81. package/features/eventPublisher/index.d.ts +3 -0
  82. package/features/eventPublisher/index.js +4 -0
  83. package/features/eventPublisher/index.js.map +1 -0
  84. package/features/graphqlClient/AuthenticationErrorPublishing.d.ts +13 -0
  85. package/features/graphqlClient/AuthenticationErrorPublishing.js +35 -0
  86. package/features/graphqlClient/AuthenticationErrorPublishing.js.map +1 -0
  87. package/features/graphqlClient/BatchingGraphQLClient.d.ts +18 -0
  88. package/features/graphqlClient/BatchingGraphQLClient.js +164 -0
  89. package/features/graphqlClient/BatchingGraphQLClient.js.map +1 -0
  90. package/features/graphqlClient/FetchGraphQLClient.d.ts +10 -0
  91. package/features/graphqlClient/FetchGraphQLClient.js +62 -0
  92. package/features/graphqlClient/FetchGraphQLClient.js.map +1 -0
  93. package/features/graphqlClient/NetworkErrorPublishing.d.ts +14 -0
  94. package/features/graphqlClient/NetworkErrorPublishing.js +55 -0
  95. package/features/graphqlClient/NetworkErrorPublishing.js.map +1 -0
  96. package/features/graphqlClient/RequestValue.d.ts +20 -0
  97. package/features/graphqlClient/RequestValue.js +42 -0
  98. package/features/graphqlClient/RequestValue.js.map +1 -0
  99. package/features/graphqlClient/RetryGraphQLClient.d.ts +18 -0
  100. package/features/graphqlClient/RetryGraphQLClient.js +54 -0
  101. package/features/graphqlClient/RetryGraphQLClient.js.map +1 -0
  102. package/features/graphqlClient/__tests__/GraphQLClient.test.d.ts +1 -0
  103. package/features/graphqlClient/__tests__/GraphQLClient.test.js +350 -0
  104. package/features/graphqlClient/__tests__/GraphQLClient.test.js.map +1 -0
  105. package/features/graphqlClient/abstractions.d.ts +17 -0
  106. package/features/graphqlClient/abstractions.js +4 -0
  107. package/features/graphqlClient/abstractions.js.map +1 -0
  108. package/features/graphqlClient/feature.d.ts +6 -0
  109. package/features/graphqlClient/feature.js +31 -0
  110. package/features/graphqlClient/feature.js.map +1 -0
  111. package/features/graphqlClient/index.d.ts +1 -0
  112. package/features/graphqlClient/index.js +3 -0
  113. package/features/graphqlClient/index.js.map +1 -0
  114. package/features/graphqlClient/types.d.ts +5 -0
  115. package/features/graphqlClient/types.js.map +1 -0
  116. package/features/localStorage/BrowserLocalStorageGateway.d.ts +9 -0
  117. package/features/localStorage/BrowserLocalStorageGateway.js +68 -0
  118. package/features/localStorage/BrowserLocalStorageGateway.js.map +1 -0
  119. package/features/localStorage/LocalStorage.d.ts +12 -0
  120. package/features/localStorage/LocalStorage.js +31 -0
  121. package/features/localStorage/LocalStorage.js.map +1 -0
  122. package/features/localStorage/LocalStorageRepository.d.ts +20 -0
  123. package/features/localStorage/LocalStorageRepository.js +95 -0
  124. package/features/localStorage/LocalStorageRepository.js.map +1 -0
  125. package/features/localStorage/abstractions.d.ts +48 -0
  126. package/features/localStorage/abstractions.js +19 -0
  127. package/features/localStorage/abstractions.js.map +1 -0
  128. package/features/localStorage/feature.d.ts +12 -0
  129. package/features/localStorage/feature.js +34 -0
  130. package/features/localStorage/feature.js.map +1 -0
  131. package/features/localStorage/index.d.ts +1 -0
  132. package/features/localStorage/index.js +3 -0
  133. package/features/localStorage/index.js.map +1 -0
  134. package/features/router/HistoryRouterGateway.d.ts +18 -0
  135. package/features/router/HistoryRouterGateway.js +82 -0
  136. package/features/router/HistoryRouterGateway.js.map +1 -0
  137. package/features/router/HistoryRouterGateway.test.d.ts +1 -0
  138. package/features/router/HistoryRouterGateway.test.js +204 -0
  139. package/features/router/HistoryRouterGateway.test.js.map +1 -0
  140. package/features/router/Route.d.ts +19 -0
  141. package/features/router/Route.js +59 -0
  142. package/features/router/Route.js.map +1 -0
  143. package/features/router/RouteUrl.d.ts +85 -0
  144. package/features/router/RouteUrl.js +232 -0
  145. package/features/router/RouteUrl.js.map +1 -0
  146. package/features/router/Router.d.ts +45 -0
  147. package/features/router/Router.js +129 -0
  148. package/features/router/Router.js.map +1 -0
  149. package/features/router/RouterPresenter.d.ts +17 -0
  150. package/features/router/RouterPresenter.js +45 -0
  151. package/features/router/RouterPresenter.js.map +1 -0
  152. package/features/router/RouterRepository.d.ts +21 -0
  153. package/features/router/RouterRepository.js +71 -0
  154. package/features/router/RouterRepository.js.map +1 -0
  155. package/features/router/RouterRepository.test.d.ts +1 -0
  156. package/features/router/RouterRepository.test.js +154 -0
  157. package/features/router/RouterRepository.test.js.map +1 -0
  158. package/features/router/abstractions.d.ts +68 -0
  159. package/features/router/abstractions.js +15 -0
  160. package/features/router/abstractions.js.map +1 -0
  161. package/features/router/feature.d.ts +4 -0
  162. package/features/router/feature.js +18 -0
  163. package/features/router/feature.js.map +1 -0
  164. package/features/router/index.d.ts +1 -0
  165. package/features/router/index.js +3 -0
  166. package/features/router/index.js.map +1 -0
  167. package/helpers/InterfaceGenerator/date.d.ts +15 -0
  168. package/helpers/InterfaceGenerator/date.js +3 -0
  169. package/helpers/InterfaceGenerator/date.js.map +1 -0
  170. package/helpers/InterfaceGenerator/id.d.ts +23 -0
  171. package/helpers/InterfaceGenerator/id.js +3 -0
  172. package/helpers/InterfaceGenerator/id.js.map +1 -0
  173. package/helpers/InterfaceGenerator/identity.d.ts +10 -0
  174. package/helpers/InterfaceGenerator/identity.js +3 -0
  175. package/helpers/InterfaceGenerator/identity.js.map +1 -0
  176. package/helpers/InterfaceGenerator/index.d.ts +5 -0
  177. package/helpers/InterfaceGenerator/index.js +3 -0
  178. package/helpers/InterfaceGenerator/index.js.map +1 -0
  179. package/helpers/InterfaceGenerator/numeric.d.ts +12 -0
  180. package/helpers/InterfaceGenerator/numeric.js +3 -0
  181. package/helpers/InterfaceGenerator/numeric.js.map +1 -0
  182. package/helpers/InterfaceGenerator/truthful.d.ts +7 -0
  183. package/helpers/InterfaceGenerator/truthful.js +3 -0
  184. package/helpers/InterfaceGenerator/truthful.js.map +1 -0
  185. package/hooks/useAutocomplete/index.d.ts +1 -1
  186. package/hooks/useAutocomplete/index.js +1 -1
  187. package/hooks/useAutocomplete/index.js.map +1 -1
  188. package/hooks/useAutocomplete/useAutocomplete.js +3 -6
  189. package/hooks/useAutocomplete/useAutocomplete.js.map +1 -1
  190. package/hooks/useDataList/functions/getData.js +1 -1
  191. package/hooks/useDataList/functions/getData.js.map +1 -1
  192. package/hooks/useDataList/functions/getError.js +1 -1
  193. package/hooks/useDataList/functions/getError.js.map +1 -1
  194. package/hooks/useDataList/functions/getMeta.js +1 -1
  195. package/hooks/useDataList/functions/getMeta.js.map +1 -1
  196. package/hooks/useDataList/functions/index.d.ts +3 -3
  197. package/hooks/useDataList/functions/index.js +3 -3
  198. package/hooks/useDataList/functions/index.js.map +1 -1
  199. package/hooks/useDataList/index.d.ts +1 -1
  200. package/hooks/useDataList/index.js +1 -1
  201. package/hooks/useDataList/index.js.map +1 -1
  202. package/hooks/useDataList/useDataList.d.ts +0 -1
  203. package/hooks/useDataList/useDataList.js +6 -26
  204. package/hooks/useDataList/useDataList.js.map +1 -1
  205. package/hooks/useDataList/utils/index.d.ts +1 -2
  206. package/hooks/useDataList/utils/index.js +1 -2
  207. package/hooks/useDataList/utils/index.js.map +1 -1
  208. package/hooks/useDataList/utils/prepareLoadListParams.js +1 -1
  209. package/hooks/useDataList/utils/prepareLoadListParams.js.map +1 -1
  210. package/hooks/useHandlers.js.map +1 -1
  211. package/hooks/useRegisterLegacyPlugin.d.ts +1 -1
  212. package/hooks/useRegisterLegacyPlugin.js.map +1 -1
  213. package/hooks/useUi.d.ts +1 -1
  214. package/hooks/useUi.js +1 -1
  215. package/hooks/useUi.js.map +1 -1
  216. package/i18n/index.d.ts +1 -1
  217. package/i18n/index.js +1 -1
  218. package/i18n/index.js.map +1 -1
  219. package/index.d.ts +22 -15
  220. package/index.js +21 -14
  221. package/index.js.map +1 -1
  222. package/package.json +25 -23
  223. package/plugins/AddQuerySelectionPlugin.d.ts +1 -1
  224. package/plugins/AddQuerySelectionPlugin.js +1 -1
  225. package/plugins/AddQuerySelectionPlugin.js.map +1 -1
  226. package/plugins/ApolloDynamicLink.d.ts +1 -1
  227. package/plugins/ApolloDynamicLink.js.map +1 -1
  228. package/plugins/ConsoleLinkPlugin.d.ts +1 -1
  229. package/plugins/ConsoleLinkPlugin.js +1 -1
  230. package/plugins/ConsoleLinkPlugin.js.map +1 -1
  231. package/plugins/NetworkErrorLinkPlugin/ErrorOverlay.d.ts +8 -13
  232. package/plugins/NetworkErrorLinkPlugin/ErrorOverlay.js +15 -26
  233. package/plugins/NetworkErrorLinkPlugin/ErrorOverlay.js.map +1 -1
  234. package/plugins/NetworkErrorLinkPlugin/GqlErrorOverlay.d.ts +14 -0
  235. package/plugins/NetworkErrorLinkPlugin/GqlErrorOverlay.js +31 -0
  236. package/plugins/NetworkErrorLinkPlugin/GqlErrorOverlay.js.map +1 -0
  237. package/plugins/NetworkErrorLinkPlugin/LocalAwsLambdaTimeoutMessage.d.ts +2 -0
  238. package/plugins/NetworkErrorLinkPlugin/LocalAwsLambdaTimeoutMessage.js +31 -0
  239. package/plugins/NetworkErrorLinkPlugin/LocalAwsLambdaTimeoutMessage.js.map +1 -0
  240. package/plugins/NetworkErrorLinkPlugin/StyledComponents.d.ts +4 -5
  241. package/plugins/NetworkErrorLinkPlugin/StyledComponents.js +3 -3
  242. package/plugins/NetworkErrorLinkPlugin/StyledComponents.js.map +1 -1
  243. package/plugins/NetworkErrorLinkPlugin/Typography.d.ts +8 -0
  244. package/plugins/NetworkErrorLinkPlugin/Typography.js +18 -0
  245. package/plugins/NetworkErrorLinkPlugin/Typography.js.map +1 -0
  246. package/plugins/NetworkErrorLinkPlugin/createErrorOverlay.d.ts +3 -3
  247. package/plugins/NetworkErrorLinkPlugin/createErrorOverlay.js +4 -13
  248. package/plugins/NetworkErrorLinkPlugin/createErrorOverlay.js.map +1 -1
  249. package/plugins/NetworkErrorLinkPlugin.d.ts +4 -1
  250. package/plugins/NetworkErrorLinkPlugin.js +47 -7
  251. package/plugins/NetworkErrorLinkPlugin.js.map +1 -1
  252. package/plugins/OmitTypenameLinkPlugin.d.ts +1 -1
  253. package/plugins/OmitTypenameLinkPlugin.js +1 -1
  254. package/plugins/OmitTypenameLinkPlugin.js.map +1 -1
  255. package/plugins/TenantHeaderLinkPlugin.d.ts +2 -2
  256. package/plugins/TenantHeaderLinkPlugin.js +2 -4
  257. package/plugins/TenantHeaderLinkPlugin.js.map +1 -1
  258. package/plugins/components/Image.d.ts +6 -0
  259. package/plugins/components/Image.js +19 -0
  260. package/plugins/components/Image.js.map +1 -0
  261. package/plugins/image.d.ts +1 -1
  262. package/plugins/image.js +2 -2
  263. package/plugins/image.js.map +1 -1
  264. package/plugins/index.d.ts +3 -3
  265. package/plugins/index.js +1 -1
  266. package/plugins/index.js.map +1 -1
  267. package/presentation/localStorage/index.d.ts +3 -0
  268. package/presentation/localStorage/index.js +5 -0
  269. package/presentation/localStorage/index.js.map +1 -0
  270. package/presentation/localStorage/useLocalStorage.d.ts +6 -0
  271. package/presentation/localStorage/useLocalStorage.js +21 -0
  272. package/presentation/localStorage/useLocalStorage.js.map +1 -0
  273. package/presentation/localStorage/useLocalStorageValue.d.ts +1 -0
  274. package/presentation/localStorage/useLocalStorageValue.js +20 -0
  275. package/presentation/localStorage/useLocalStorageValue.js.map +1 -0
  276. package/presentation/localStorage/useLocalStorageValues.d.ts +5 -0
  277. package/presentation/localStorage/useLocalStorageValues.js +39 -0
  278. package/presentation/localStorage/useLocalStorageValues.js.map +1 -0
  279. package/presentation/router/RouteElementRegistry.d.ts +14 -0
  280. package/presentation/router/RouteElementRegistry.js +32 -0
  281. package/presentation/router/RouteElementRegistry.js.map +1 -0
  282. package/presentation/router/abstractions.d.ts +13 -0
  283. package/presentation/router/abstractions.js +4 -0
  284. package/presentation/router/abstractions.js.map +1 -0
  285. package/presentation/router/components/Redirect.d.ts +14 -0
  286. package/presentation/router/components/Redirect.js +15 -0
  287. package/presentation/router/components/Redirect.js.map +1 -0
  288. package/presentation/router/components/RouteContent.d.ts +2 -0
  289. package/presentation/router/components/RouteContent.js +17 -0
  290. package/presentation/router/components/RouteContent.js.map +1 -0
  291. package/presentation/router/components/RouteLink.d.ts +50 -0
  292. package/presentation/router/components/RouteLink.js +22 -0
  293. package/presentation/router/components/RouteLink.js.map +1 -0
  294. package/presentation/router/components/SimpleLink.d.ts +44 -0
  295. package/presentation/router/components/SimpleLink.js +30 -0
  296. package/presentation/router/components/SimpleLink.js.map +1 -0
  297. package/presentation/router/hooks/useRoute.d.ts +6 -0
  298. package/presentation/router/hooks/useRoute.js +30 -0
  299. package/presentation/router/hooks/useRoute.js.map +1 -0
  300. package/presentation/router/hooks/useRouter.d.ts +7 -0
  301. package/presentation/router/hooks/useRouter.js +26 -0
  302. package/presentation/router/hooks/useRouter.js.map +1 -0
  303. package/presentation/router/index.d.ts +4 -0
  304. package/presentation/router/index.js +5 -0
  305. package/presentation/router/index.js.map +1 -0
  306. package/presentation/router/types.d.ts +5 -0
  307. package/presentation/router/types.js +3 -0
  308. package/presentation/router/types.js.map +1 -0
  309. package/react-butterfiles/Files.js +3 -3
  310. package/react-butterfiles/Files.js.map +1 -1
  311. package/react-butterfiles/file.todo +1 -0
  312. package/react-butterfiles/index.d.ts +1 -1
  313. package/react-butterfiles/index.js +1 -1
  314. package/react-butterfiles/index.js.map +1 -1
  315. package/router.d.ts +5 -0
  316. package/router.js +8 -0
  317. package/router.js.map +1 -0
  318. package/shared/di/DiContainerProvider.d.ts +8 -0
  319. package/shared/di/DiContainerProvider.js +17 -0
  320. package/shared/di/DiContainerProvider.js.map +1 -0
  321. package/shared/di/createFeature.d.ts +11 -0
  322. package/shared/di/createFeature.js +11 -0
  323. package/shared/di/createFeature.js.map +1 -0
  324. package/shared/di/useFeature.d.ts +2 -0
  325. package/shared/di/useFeature.js +18 -0
  326. package/shared/di/useFeature.js.map +1 -0
  327. package/types.d.ts +7 -4
  328. package/types.js +1 -12
  329. package/types.js.map +1 -1
  330. package/utils/index.d.ts +2 -10
  331. package/utils/index.js +2 -10
  332. package/utils/index.js.map +1 -1
  333. package/utils/legacyPluginToReactComponent.js +1 -1
  334. package/utils/legacyPluginToReactComponent.js.map +1 -1
  335. package/components/Routes.d.ts +0 -2
  336. package/components/Routes.js +0 -36
  337. package/components/Routes.js.map +0 -1
  338. package/components/View.d.ts +0 -8
  339. package/components/View.js +0 -19
  340. package/components/View.js.map +0 -1
  341. package/core/DebounceRender.d.ts +0 -12
  342. package/core/DebounceRender.js +0 -31
  343. package/core/DebounceRender.js.map +0 -1
  344. package/core/Routes.d.ts +0 -6
  345. package/core/Routes.js +0 -34
  346. package/core/Routes.js.map +0 -1
  347. package/hooks/useDataList/utils/redirectToRouteWithQueryParams.d.ts +0 -14
  348. package/hooks/useDataList/utils/redirectToRouteWithQueryParams.js +0 -26
  349. package/hooks/useDataList/utils/redirectToRouteWithQueryParams.js.map +0 -1
  350. package/hooks/useDataList/utils/types.d.ts +0 -40
  351. package/hooks/useDataList/utils/types.js.map +0 -1
  352. package/plugins/LocaleHeaderLinkPlugin.d.ts +0 -10
  353. package/plugins/LocaleHeaderLinkPlugin.js +0 -32
  354. package/plugins/LocaleHeaderLinkPlugin.js.map +0 -1
  355. package/plugins/RoutePlugin.d.ts +0 -12
  356. package/plugins/RoutePlugin.js +0 -16
  357. package/plugins/RoutePlugin.js.map +0 -1
  358. package/plugins/ViewPlugin.d.ts +0 -14
  359. package/plugins/ViewPlugin.js +0 -19
  360. package/plugins/ViewPlugin.js.map +0 -1
  361. package/utils/getApiUrl.d.ts +0 -1
  362. package/utils/getApiUrl.js +0 -5
  363. package/utils/getApiUrl.js.map +0 -1
  364. package/utils/getGqlApiUrl.d.ts +0 -1
  365. package/utils/getGqlApiUrl.js +0 -6
  366. package/utils/getGqlApiUrl.js.map +0 -1
  367. package/utils/getHeadlessCmsGqlApiUrl.d.ts +0 -5
  368. package/utils/getHeadlessCmsGqlApiUrl.js +0 -12
  369. package/utils/getHeadlessCmsGqlApiUrl.js.map +0 -1
  370. package/utils/getLocaleCode.d.ts +0 -6
  371. package/utils/getLocaleCode.js +0 -33
  372. package/utils/getLocaleCode.js.map +0 -1
  373. package/utils/getPrerenderId.d.ts +0 -6
  374. package/utils/getPrerenderId.js +0 -5
  375. package/utils/getPrerenderId.js.map +0 -1
  376. package/utils/getTenantId.d.ts +0 -6
  377. package/utils/getTenantId.js +0 -45
  378. package/utils/getTenantId.js.map +0 -1
  379. package/utils/isLocalhost.d.ts +0 -1
  380. package/utils/isLocalhost.js +0 -7
  381. package/utils/isLocalhost.js.map +0 -1
  382. package/utils/isPrerendering.d.ts +0 -1
  383. package/utils/isPrerendering.js +0 -5
  384. package/utils/isPrerendering.js.map +0 -1
  385. /package/{hooks/useDataList/utils → features/graphqlClient}/types.js +0 -0
@@ -1,12 +0,0 @@
1
- import React from "react";
2
- interface Props {
3
- wait?: number;
4
- children?: React.ReactNode;
5
- }
6
- /**
7
- * We need to debounce the rendering of children during app bootstrap, since many plugins
8
- * can add more and more Providers which will recompose the entire hierarchy of React Context providers.
9
- * During this stage, we don't want to render anything.
10
- */
11
- export declare const DebounceRender: ({ wait, children }: Props) => React.JSX.Element;
12
- export {};
@@ -1,31 +0,0 @@
1
- import React from "react";
2
- import { useEffect, useMemo, useState } from "react";
3
- import debounce from "lodash/debounce";
4
- /**
5
- * We need to debounce the rendering of children during app bootstrap, since many plugins
6
- * can add more and more Providers which will recompose the entire hierarchy of React Context providers.
7
- * During this stage, we don't want to render anything.
8
- */
9
- export const DebounceRender = ({
10
- wait = 50,
11
- children
12
- }) => {
13
- const [render, setRender] = useState(wait === 0);
14
- const debouncedRender = useMemo(() => {
15
- return debounce(() => {
16
- setRender(true);
17
- }, wait);
18
- }, [setRender]);
19
- useEffect(() => {
20
- if (render) {
21
- return;
22
- }
23
- debouncedRender();
24
- return () => {
25
- debouncedRender.cancel();
26
- };
27
- }, []);
28
- return /*#__PURE__*/React.createElement(React.Fragment, null, render ? children : null);
29
- };
30
-
31
- //# sourceMappingURL=DebounceRender.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["React","useEffect","useMemo","useState","debounce","DebounceRender","wait","children","render","setRender","debouncedRender","cancel","createElement","Fragment"],"sources":["DebounceRender.tsx"],"sourcesContent":["import React from \"react\";\nimport { useEffect, useMemo, useState } from \"react\";\nimport debounce from \"lodash/debounce\";\n\ninterface Props {\n wait?: number;\n children?: React.ReactNode;\n}\n/**\n * We need to debounce the rendering of children during app bootstrap, since many plugins\n * can add more and more Providers which will recompose the entire hierarchy of React Context providers.\n * During this stage, we don't want to render anything.\n */\nexport const DebounceRender = ({ wait = 50, children }: Props) => {\n const [render, setRender] = useState(wait === 0);\n\n const debouncedRender = useMemo(() => {\n return debounce(() => {\n setRender(true);\n }, wait);\n }, [setRender]);\n\n useEffect(() => {\n if (render) {\n return;\n }\n\n debouncedRender();\n\n return () => {\n debouncedRender.cancel();\n };\n }, []);\n\n return <>{render ? children : null}</>;\n};\n"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,SAAS,EAAEC,OAAO,EAAEC,QAAQ,QAAQ,OAAO;AACpD,OAAOC,QAAQ,MAAM,iBAAiB;AAMtC;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMC,cAAc,GAAGA,CAAC;EAAEC,IAAI,GAAG,EAAE;EAAEC;AAAgB,CAAC,KAAK;EAC9D,MAAM,CAACC,MAAM,EAAEC,SAAS,CAAC,GAAGN,QAAQ,CAACG,IAAI,KAAK,CAAC,CAAC;EAEhD,MAAMI,eAAe,GAAGR,OAAO,CAAC,MAAM;IAClC,OAAOE,QAAQ,CAAC,MAAM;MAClBK,SAAS,CAAC,IAAI,CAAC;IACnB,CAAC,EAAEH,IAAI,CAAC;EACZ,CAAC,EAAE,CAACG,SAAS,CAAC,CAAC;EAEfR,SAAS,CAAC,MAAM;IACZ,IAAIO,MAAM,EAAE;MACR;IACJ;IAEAE,eAAe,CAAC,CAAC;IAEjB,OAAO,MAAM;MACTA,eAAe,CAACC,MAAM,CAAC,CAAC;IAC5B,CAAC;EACL,CAAC,EAAE,EAAE,CAAC;EAEN,oBAAOX,KAAA,CAAAY,aAAA,CAAAZ,KAAA,CAAAa,QAAA,QAAGL,MAAM,GAAGD,QAAQ,GAAG,IAAO,CAAC;AAC1C,CAAC","ignoreList":[]}
package/core/Routes.d.ts DELETED
@@ -1,6 +0,0 @@
1
- import React from "react";
2
- interface RoutesProps {
3
- routes: JSX.Element[];
4
- }
5
- export declare const Routes: (props: RoutesProps) => React.JSX.Element;
6
- export {};
package/core/Routes.js DELETED
@@ -1,34 +0,0 @@
1
- import React from "react";
2
- import { plugins } from "@webiny/plugins";
3
- import { Routes as ReactRouterRoutes } from "@webiny/react-router";
4
- export const Routes = props => {
5
- const routes = [...props.routes,
6
- // For backwards compatibility, we need to support the RoutePlugin routes as well.
7
- ...plugins.byType("route").map(({
8
- route
9
- }) => route)].sort((a, b) => {
10
- const pathA = a.props.path || "*";
11
- const pathB = b.props.path || "*";
12
-
13
- // This will sort paths at the very bottom of the list
14
- if (pathA === "/" && pathB === "*") {
15
- return -1;
16
- }
17
-
18
- // This will push * and / to the bottom of the list
19
- if (pathA === "*" || pathA === "/") {
20
- return 1;
21
- }
22
-
23
- // This will push * and / to the bottom of the list
24
- if (["*", "/"].includes(pathB)) {
25
- return -1;
26
- }
27
- return 0;
28
- });
29
- return /*#__PURE__*/React.createElement(ReactRouterRoutes, null, routes.map((route, index) => /*#__PURE__*/React.cloneElement(route, {
30
- key: `${route.props.path}:${index}`
31
- })));
32
- };
33
-
34
- //# sourceMappingURL=Routes.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["React","plugins","Routes","ReactRouterRoutes","props","routes","byType","map","route","sort","a","b","pathA","path","pathB","includes","createElement","index","cloneElement","key"],"sources":["Routes.tsx"],"sourcesContent":["import React from \"react\";\nimport { plugins } from \"@webiny/plugins\";\nimport { Routes as ReactRouterRoutes } from \"@webiny/react-router\";\nimport type { RoutePlugin } from \"~/types\";\n\ninterface RoutesProps {\n routes: JSX.Element[];\n}\n\nexport const Routes = (props: RoutesProps) => {\n const routes = [\n ...props.routes,\n // For backwards compatibility, we need to support the RoutePlugin routes as well.\n ...plugins.byType<RoutePlugin>(\"route\").map(({ route }) => route)\n ].sort((a, b) => {\n const pathA = a.props.path || \"*\";\n const pathB = b.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, index) =>\n React.cloneElement(route, { key: `${route.props.path}:${index}` })\n )}\n </ReactRouterRoutes>\n );\n};\n"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,OAAO,QAAQ,iBAAiB;AACzC,SAASC,MAAM,IAAIC,iBAAiB,QAAQ,sBAAsB;AAOlE,OAAO,MAAMD,MAAM,GAAIE,KAAkB,IAAK;EAC1C,MAAMC,MAAM,GAAG,CACX,GAAGD,KAAK,CAACC,MAAM;EACf;EACA,GAAGJ,OAAO,CAACK,MAAM,CAAc,OAAO,CAAC,CAACC,GAAG,CAAC,CAAC;IAAEC;EAAM,CAAC,KAAKA,KAAK,CAAC,CACpE,CAACC,IAAI,CAAC,CAACC,CAAC,EAAEC,CAAC,KAAK;IACb,MAAMC,KAAK,GAAGF,CAAC,CAACN,KAAK,CAACS,IAAI,IAAI,GAAG;IACjC,MAAMC,KAAK,GAAGH,CAAC,CAACP,KAAK,CAACS,IAAI,IAAI,GAAG;;IAEjC;IACA,IAAID,KAAK,KAAK,GAAG,IAAIE,KAAK,KAAK,GAAG,EAAE;MAChC,OAAO,CAAC,CAAC;IACb;;IAEA;IACA,IAAIF,KAAK,KAAK,GAAG,IAAIA,KAAK,KAAK,GAAG,EAAE;MAChC,OAAO,CAAC;IACZ;;IAEA;IACA,IAAI,CAAC,GAAG,EAAE,GAAG,CAAC,CAACG,QAAQ,CAACD,KAAK,CAAC,EAAE;MAC5B,OAAO,CAAC,CAAC;IACb;IAEA,OAAO,CAAC;EACZ,CAAC,CAAC;EAEF,oBACId,KAAA,CAAAgB,aAAA,CAACb,iBAAiB,QACbE,MAAM,CAACE,GAAG,CAAC,CAACC,KAAK,EAAES,KAAK,kBACrBjB,KAAK,CAACkB,YAAY,CAACV,KAAK,EAAE;IAAEW,GAAG,EAAE,GAAGX,KAAK,CAACJ,KAAK,CAACS,IAAI,IAAII,KAAK;EAAG,CAAC,CACrE,CACe,CAAC;AAE5B,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,26 +0,0 @@
1
- export default (params, options) => {
2
- const {
3
- history,
4
- location
5
- } = options;
6
- const paramsClone = Object.assign({}, params);
7
- ["sort", "search", "where"].forEach(key => {
8
- if (typeof paramsClone[key] === "object") {
9
- paramsClone[key] = JSON.stringify(paramsClone[key]);
10
- }
11
- });
12
- const keys = ["limit", "after", "before", "where", "search", "sort"];
13
- const query = new URLSearchParams(location.search);
14
- keys.forEach(key => {
15
- if (typeof paramsClone[key] !== "undefined") {
16
- query.set(key, paramsClone[key]);
17
- } else {
18
- query.delete(key);
19
- }
20
- });
21
- history.push({
22
- search: query.toString()
23
- });
24
- };
25
-
26
- //# sourceMappingURL=redirectToRouteWithQueryParams.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["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":"AAYA,eAAe,CAACA,MAAc,EAAEC,OAAgB,KAAW;EACvD,MAAM;IAAEC,OAAO;IAAEC;EAAS,CAAC,GAAGF,OAAO;EACrC,MAAMG,WAAgC,GAAGC,MAAM,CAACC,MAAM,CAAC,CAAC,CAAC,EAAEN,MAAM,CAAC;EAElE,CAAC,MAAM,EAAE,QAAQ,EAAE,OAAO,CAAC,CAACO,OAAO,CAACC,GAAG,IAAI;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,MAAMG,IAAc,GAAG,CAAC,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,CAAC;EAE9E,MAAMC,KAAK,GAAG,IAAIC,eAAe,CAACV,QAAQ,CAACW,MAAM,CAAC;EAClDH,IAAI,CAACJ,OAAO,CAACC,GAAG,IAAI;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 +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 type { 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,32 +0,0 @@
1
- import { setContext } from "apollo-link-context";
2
- import { ApolloLinkPlugin } from "./ApolloLinkPlugin";
3
- import { getLocaleCode } from "../utils";
4
-
5
- /**
6
- * Append `x-i18n-locale` header from URL query (necessary for prerendering service).
7
- */
8
- export class LocaleHeaderLinkPlugin extends ApolloLinkPlugin {
9
- constructor(locale) {
10
- super();
11
- this.locale = locale || getLocaleCode();
12
- }
13
- createLink() {
14
- return setContext((_, {
15
- headers
16
- }) => {
17
- if (this.locale) {
18
- return {
19
- headers: {
20
- ...headers,
21
- "x-i18n-locale": `content:${this.locale};`
22
- }
23
- };
24
- }
25
- return {
26
- headers
27
- };
28
- });
29
- }
30
- }
31
-
32
- //# sourceMappingURL=LocaleHeaderLinkPlugin.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["setContext","ApolloLinkPlugin","getLocaleCode","LocaleHeaderLinkPlugin","constructor","locale","createLink","_","headers"],"sources":["LocaleHeaderLinkPlugin.ts"],"sourcesContent":["import { setContext } from \"apollo-link-context\";\nimport { ApolloLinkPlugin } from \"./ApolloLinkPlugin\";\nimport type { 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,SAASA,UAAU,QAAQ,qBAAqB;AAChD,SAASC,gBAAgB;AAEzB,SAASC,aAAa;;AAEtB;AACA;AACA;AACA,OAAO,MAAMC,sBAAsB,SAASF,gBAAgB,CAAC;EAGzDG,WAAWA,CAACC,MAAe,EAAE;IACzB,KAAK,CAAC,CAAC;IAEP,IAAI,CAACA,MAAM,GAAGA,MAAM,IAAKH,aAAa,CAAC,CAAY;EACvD;EAEgBI,UAAUA,CAAA,EAAe;IACrC,OAAON,UAAU,CAAC,CAACO,CAAC,EAAE;MAAEC;IAAQ,CAAC,KAAK;MAClC,IAAI,IAAI,CAACH,MAAM,EAAE;QACb,OAAO;UACHG,OAAO,EAAE;YACL,GAAGA,OAAO;YACV,eAAe,EAAE,WAAW,IAAI,CAACH,MAAM;UAC3C;QACJ,CAAC;MACL;MAEA,OAAO;QAAEG;MAAQ,CAAC;IACtB,CAAC,CAAC;EACN;AACJ","ignoreList":[]}
@@ -1,12 +0,0 @@
1
- import type * 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,16 +0,0 @@
1
- import { Plugin } from "@webiny/plugins";
2
- export class RoutePlugin extends Plugin {
3
- static type = "route";
4
- constructor(config) {
5
- super();
6
- this._config = config || {};
7
- }
8
- get route() {
9
- if (!this._config.route) {
10
- return null;
11
- }
12
- return this._config.route;
13
- }
14
- }
15
-
16
- //# sourceMappingURL=RoutePlugin.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["Plugin","RoutePlugin","type","constructor","config","_config","route"],"sources":["RoutePlugin.tsx"],"sourcesContent":["import type * 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,SAASA,MAAM,QAAQ,iBAAiB;AAMxC,OAAO,MAAMC,WAAW,SAASD,MAAM,CAAC;EACpC,OAAgCE,IAAI,GAAW,OAAO;EAGtDC,WAAWA,CAACC,MAAe,EAAE;IACzB,KAAK,CAAC,CAAC;IACP,IAAI,CAACC,OAAO,GAAGD,MAAM,IAAI,CAAC,CAAC;EAC/B;EAEA,IAAIE,KAAKA,CAAA,EAAoB;IACzB,IAAI,CAAC,IAAI,CAACD,OAAO,CAACC,KAAK,EAAE;MACrB,OAAO,IAAI;IACf;IACA,OAAO,IAAI,CAACD,OAAO,CAACC,KAAK;EAC7B;AACJ","ignoreList":[]}
@@ -1,14 +0,0 @@
1
- import type * 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,19 +0,0 @@
1
- import { Plugin } from "@webiny/plugins";
2
- export class ViewPlugin extends Plugin {
3
- static type = "view";
4
- constructor(config) {
5
- super();
6
- this._config = config || {};
7
- }
8
- get key() {
9
- return this._config.name;
10
- }
11
- render(props) {
12
- if (!this._config.render) {
13
- return null;
14
- }
15
- return this._config.render(props);
16
- }
17
- }
18
-
19
- //# sourceMappingURL=ViewPlugin.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["Plugin","ViewPlugin","type","constructor","config","_config","key","name","render","props"],"sources":["ViewPlugin.ts"],"sourcesContent":["import type * 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,SAASA,MAAM,QAAQ,iBAAiB;AAOxC,OAAO,MAAMC,UAAU,SAAsBD,MAAM,CAAC;EAChD,OAAgCE,IAAI,GAAW,MAAM;EAG9CC,WAAWA,CAACC,MAAsB,EAAE;IACvC,KAAK,CAAC,CAAC;IACP,IAAI,CAACC,OAAO,GAAGD,MAAM,IAAI,CAAC,CAAC;EAC/B;EAEA,IAAIE,GAAGA,CAAA,EAAG;IACN,OAAO,IAAI,CAACD,OAAO,CAACE,IAAI;EAC5B;EAEOC,MAAMA,CAACC,KAAY,EAAE;IACxB,IAAI,CAAC,IAAI,CAACJ,OAAO,CAACG,MAAM,EAAE;MACtB,OAAO,IAAI;IACf;IACA,OAAO,IAAI,CAACH,OAAO,CAACG,MAAM,CAACC,KAAK,CAAC;EACrC;AACJ","ignoreList":[]}
@@ -1 +0,0 @@
1
- export declare const getApiUrl: (path?: string) => string;
@@ -1,5 +0,0 @@
1
- export const getApiUrl = (path = "") => {
2
- return process.env.REACT_APP_API_URL + path;
3
- };
4
-
5
- //# sourceMappingURL=getApiUrl.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["getApiUrl","path","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":"AAAA,OAAO,MAAMA,SAAS,GAAGA,CAACC,IAAI,GAAG,EAAE,KAAa;EAC5C,OAAOC,OAAO,CAACC,GAAG,CAACC,iBAAiB,GAAGH,IAAI;AAC/C,CAAC","ignoreList":[]}
@@ -1 +0,0 @@
1
- export declare const getGqlApiUrl: () => string;
@@ -1,6 +0,0 @@
1
- import { getApiUrl } from "./getApiUrl";
2
- export const getGqlApiUrl = () => {
3
- return getApiUrl("/graphql");
4
- };
5
-
6
- //# sourceMappingURL=getGqlApiUrl.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["getApiUrl","getGqlApiUrl"],"sources":["getGqlApiUrl.ts"],"sourcesContent":["import { getApiUrl } from \"./getApiUrl\";\n\nexport const getGqlApiUrl = (): string => {\n return getApiUrl(\"/graphql\");\n};\n"],"mappings":"AAAA,SAASA,SAAS;AAElB,OAAO,MAAMC,YAAY,GAAGA,CAAA,KAAc;EACtC,OAAOD,SAAS,CAAC,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,12 +0,0 @@
1
- import { getApiUrl } from "./getApiUrl";
2
- import { getLocaleCode } from "./getLocaleCode";
3
- export const getHeadlessCmsGqlApiUrl = () => {
4
- const locale = getLocaleCode();
5
- return {
6
- preview: getApiUrl(`/cms/preview/${locale}`),
7
- read: getApiUrl(`/cms/read/${locale}`),
8
- manage: getApiUrl(`/cms/manage/${locale}`)
9
- };
10
- };
11
-
12
- //# sourceMappingURL=getHeadlessCmsGqlApiUrl.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["getApiUrl","getLocaleCode","getHeadlessCmsGqlApiUrl","locale","preview","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,SAASA,SAAS;AAClB,SAASC,aAAa;AAEtB,OAAO,MAAMC,uBAAuB,GAAGA,CAAA,KAAyD;EAC5F,MAAMC,MAAM,GAAGF,aAAa,CAAC,CAAC;EAC9B,OAAO;IACHG,OAAO,EAAEJ,SAAS,CAAC,gBAAgBG,MAAM,EAAE,CAAC;IAC5CE,IAAI,EAAEL,SAAS,CAAC,aAAaG,MAAM,EAAE,CAAC;IACtCG,MAAM,EAAEN,SAAS,CAAC,eAAeG,MAAM,EAAE;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;
@@ -1,33 +0,0 @@
1
- import { isLocalhost } from "./isLocalhost";
2
- export const getLocaleCode = () => {
3
- // 1. Get locale via the `__locale` query param. Useful when doing page previews.
4
- let locale = new URLSearchParams(location.search).get("__locale");
5
- if (locale) {
6
- return locale;
7
- }
8
-
9
- // 2. Get locale via `window.__PS_RENDER_LOCALE__`. Used with prerendered pages.
10
- locale = window.__PS_RENDER_LOCALE__;
11
- if (locale) {
12
- return locale;
13
- }
14
-
15
- // 3. Get locale via `window.localStorage.webiny_i18n_locale`. Used within the Admin app.
16
- const localesByContext = window.localStorage.webiny_i18n_locale;
17
- if (localesByContext) {
18
- // The `localesByContext` is a string that contains locales for all available
19
- // "locale contexts", for example: `default:en-US;content:en-US;`. Here, we
20
- // want to extract the locale for the "content" locale context.
21
- const [, matchedLocale] = localesByContext.match(/content:(.*?);/);
22
- return matchedLocale;
23
- }
24
-
25
- // 4. Finally, for development purposes, we take the `WEBINY_WEBSITE_LOCALE_CODE`
26
- // and `WEBINY_ADMIN_LOCALE_CODE` environment variables into consideration.
27
- if (isLocalhost()) {
28
- return process.env.WEBINY_WEBSITE_LOCALE_CODE || process.env.WEBINY_ADMIN_LOCALE_CODE || null;
29
- }
30
- return null;
31
- };
32
-
33
- //# sourceMappingURL=getLocaleCode.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["isLocalhost","getLocaleCode","locale","URLSearchParams","location","search","get","window","__PS_RENDER_LOCALE__","localesByContext","localStorage","webiny_i18n_locale","matchedLocale","match","process","env","WEBINY_WEBSITE_LOCALE_CODE","WEBINY_ADMIN_LOCALE_CODE"],"sources":["getLocaleCode.ts"],"sourcesContent":["import { isLocalhost } from \"./isLocalhost\";\n\ndeclare global {\n interface Window {\n __PS_RENDER_LOCALE__: string;\n }\n}\n\nexport const getLocaleCode = (): string | null => {\n // 1. Get locale via the `__locale` query param. Useful when doing page previews.\n let locale = new URLSearchParams(location.search).get(\"__locale\");\n if (locale) {\n return locale;\n }\n\n // 2. Get locale via `window.__PS_RENDER_LOCALE__`. Used with prerendered pages.\n locale = window.__PS_RENDER_LOCALE__;\n if (locale) {\n return locale;\n }\n\n // 3. Get locale via `window.localStorage.webiny_i18n_locale`. Used within the Admin app.\n const localesByContext = window.localStorage.webiny_i18n_locale;\n if (localesByContext) {\n // The `localesByContext` is a string that contains locales for all available\n // \"locale contexts\", for example: `default:en-US;content:en-US;`. Here, we\n // want to extract the locale for the \"content\" locale context.\n const [, matchedLocale] = localesByContext.match(/content:(.*?);/);\n return matchedLocale;\n }\n\n // 4. Finally, for development purposes, we take the `WEBINY_WEBSITE_LOCALE_CODE`\n // and `WEBINY_ADMIN_LOCALE_CODE` environment variables into consideration.\n if (isLocalhost()) {\n return (\n process.env.WEBINY_WEBSITE_LOCALE_CODE || process.env.WEBINY_ADMIN_LOCALE_CODE || null\n );\n }\n\n return null;\n};\n"],"mappings":"AAAA,SAASA,WAAW;AAQpB,OAAO,MAAMC,aAAa,GAAGA,CAAA,KAAqB;EAC9C;EACA,IAAIC,MAAM,GAAG,IAAIC,eAAe,CAACC,QAAQ,CAACC,MAAM,CAAC,CAACC,GAAG,CAAC,UAAU,CAAC;EACjE,IAAIJ,MAAM,EAAE;IACR,OAAOA,MAAM;EACjB;;EAEA;EACAA,MAAM,GAAGK,MAAM,CAACC,oBAAoB;EACpC,IAAIN,MAAM,EAAE;IACR,OAAOA,MAAM;EACjB;;EAEA;EACA,MAAMO,gBAAgB,GAAGF,MAAM,CAACG,YAAY,CAACC,kBAAkB;EAC/D,IAAIF,gBAAgB,EAAE;IAClB;IACA;IACA;IACA,MAAM,GAAGG,aAAa,CAAC,GAAGH,gBAAgB,CAACI,KAAK,CAAC,gBAAgB,CAAC;IAClE,OAAOD,aAAa;EACxB;;EAEA;EACA;EACA,IAAIZ,WAAW,CAAC,CAAC,EAAE;IACf,OACIc,OAAO,CAACC,GAAG,CAACC,0BAA0B,IAAIF,OAAO,CAACC,GAAG,CAACE,wBAAwB,IAAI,IAAI;EAE9F;EAEA,OAAO,IAAI;AACf,CAAC","ignoreList":[]}
@@ -1,6 +0,0 @@
1
- declare global {
2
- interface Window {
3
- __PS_RENDER_ID__: string;
4
- }
5
- }
6
- export declare const getPrerenderId: () => string | null;
@@ -1,5 +0,0 @@
1
- export const getPrerenderId = () => {
2
- return window["__PS_RENDER_ID__"] || null;
3
- };
4
-
5
- //# sourceMappingURL=getPrerenderId.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["getPrerenderId","window"],"sources":["getPrerenderId.ts"],"sourcesContent":["declare global {\n interface Window {\n __PS_RENDER_ID__: string;\n }\n}\n\nexport const getPrerenderId = (): string | null => {\n return window[\"__PS_RENDER_ID__\"] || null;\n};\n"],"mappings":"AAMA,OAAO,MAAMA,cAAc,GAAGA,CAAA,KAAqB;EAC/C,OAAOC,MAAM,CAAC,kBAAkB,CAAC,IAAI,IAAI;AAC7C,CAAC","ignoreList":[]}
@@ -1,6 +0,0 @@
1
- declare global {
2
- interface Window {
3
- __PS_RENDER_TENANT__: string;
4
- }
5
- }
6
- export declare const getTenantId: () => string | null;
@@ -1,45 +0,0 @@
1
- import { isLocalhost } from "./isLocalhost";
2
- export const getTenantId = () => {
3
- const urlSearchParams = new URLSearchParams(location.search);
4
-
5
- // 1. Get tenant via the `__tenant` query param. Useful when doing page previews.
6
- let tenant = urlSearchParams.get("__tenant");
7
- if (tenant) {
8
- return tenant;
9
- }
10
-
11
- // 1. Get tenant via the `tenantId` query param. Useful within the Admin app.
12
- tenant = urlSearchParams.get("tenantId");
13
- if (tenant) {
14
- return tenant;
15
- }
16
-
17
- // 2. Get tenant via `window.__PS_RENDER_TENANT__`. Used with prerendered pages.
18
- tenant = window.__PS_RENDER_TENANT__;
19
- if (tenant) {
20
- return tenant;
21
- }
22
-
23
- // 3. Get tenant via `window.localStorage.webiny_tenant`. Used within the Admin app.
24
- tenant = window.localStorage.webiny_tenant;
25
- if (tenant) {
26
- try {
27
- const value = JSON.parse(tenant);
28
- if (value) {
29
- return value;
30
- }
31
- } catch {
32
- // do nothing
33
- }
34
- return tenant;
35
- }
36
-
37
- // 4. Finally, for development purposes, we take the `WEBINY_WEBSITE_TENANT_ID`
38
- // and `WEBINY_ADMIN_TENANT_ID` environment variables into consideration.
39
- if (isLocalhost()) {
40
- return process.env.WEBINY_WEBSITE_TENANT_ID || process.env.WEBINY_ADMIN_TENANT_ID || null;
41
- }
42
- return null;
43
- };
44
-
45
- //# sourceMappingURL=getTenantId.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["isLocalhost","getTenantId","urlSearchParams","URLSearchParams","location","search","tenant","get","window","__PS_RENDER_TENANT__","localStorage","webiny_tenant","value","JSON","parse","process","env","WEBINY_WEBSITE_TENANT_ID","WEBINY_ADMIN_TENANT_ID"],"sources":["getTenantId.ts"],"sourcesContent":["import { isLocalhost } from \"~/utils/isLocalhost\";\n\ndeclare global {\n interface Window {\n __PS_RENDER_TENANT__: string;\n }\n}\n\nexport const getTenantId = (): string | null => {\n const urlSearchParams = new URLSearchParams(location.search);\n\n // 1. Get tenant via the `__tenant` query param. Useful when doing page previews.\n let tenant = urlSearchParams.get(\"__tenant\");\n if (tenant) {\n return tenant;\n }\n\n // 1. Get tenant via the `tenantId` query param. Useful within the Admin app.\n tenant = urlSearchParams.get(\"tenantId\");\n if (tenant) {\n return tenant;\n }\n\n // 2. Get tenant via `window.__PS_RENDER_TENANT__`. Used with prerendered pages.\n tenant = window.__PS_RENDER_TENANT__;\n if (tenant) {\n return tenant;\n }\n\n // 3. Get tenant via `window.localStorage.webiny_tenant`. Used within the Admin app.\n tenant = window.localStorage.webiny_tenant;\n if (tenant) {\n try {\n const value = JSON.parse(tenant);\n if (value) {\n return value;\n }\n } catch {\n // do nothing\n }\n return tenant;\n }\n\n // 4. Finally, for development purposes, we take the `WEBINY_WEBSITE_TENANT_ID`\n // and `WEBINY_ADMIN_TENANT_ID` environment variables into consideration.\n if (isLocalhost()) {\n return process.env.WEBINY_WEBSITE_TENANT_ID || process.env.WEBINY_ADMIN_TENANT_ID || null;\n }\n\n return null;\n};\n"],"mappings":"AAAA,SAASA,WAAW;AAQpB,OAAO,MAAMC,WAAW,GAAGA,CAAA,KAAqB;EAC5C,MAAMC,eAAe,GAAG,IAAIC,eAAe,CAACC,QAAQ,CAACC,MAAM,CAAC;;EAE5D;EACA,IAAIC,MAAM,GAAGJ,eAAe,CAACK,GAAG,CAAC,UAAU,CAAC;EAC5C,IAAID,MAAM,EAAE;IACR,OAAOA,MAAM;EACjB;;EAEA;EACAA,MAAM,GAAGJ,eAAe,CAACK,GAAG,CAAC,UAAU,CAAC;EACxC,IAAID,MAAM,EAAE;IACR,OAAOA,MAAM;EACjB;;EAEA;EACAA,MAAM,GAAGE,MAAM,CAACC,oBAAoB;EACpC,IAAIH,MAAM,EAAE;IACR,OAAOA,MAAM;EACjB;;EAEA;EACAA,MAAM,GAAGE,MAAM,CAACE,YAAY,CAACC,aAAa;EAC1C,IAAIL,MAAM,EAAE;IACR,IAAI;MACA,MAAMM,KAAK,GAAGC,IAAI,CAACC,KAAK,CAACR,MAAM,CAAC;MAChC,IAAIM,KAAK,EAAE;QACP,OAAOA,KAAK;MAChB;IACJ,CAAC,CAAC,MAAM;MACJ;IAAA;IAEJ,OAAON,MAAM;EACjB;;EAEA;EACA;EACA,IAAIN,WAAW,CAAC,CAAC,EAAE;IACf,OAAOe,OAAO,CAACC,GAAG,CAACC,wBAAwB,IAAIF,OAAO,CAACC,GAAG,CAACE,sBAAsB,IAAI,IAAI;EAC7F;EAEA,OAAO,IAAI;AACf,CAAC","ignoreList":[]}
@@ -1 +0,0 @@
1
- export declare const isLocalhost: () => boolean;
@@ -1,7 +0,0 @@
1
- const INCLUDES = ["localhost", "127.0.0.1"];
2
- export const isLocalhost = () => {
3
- const href = window.location.href;
4
- return INCLUDES.some(current => href.includes(current));
5
- };
6
-
7
- //# sourceMappingURL=isLocalhost.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["INCLUDES","isLocalhost","href","window","location","some","current","includes"],"sources":["isLocalhost.ts"],"sourcesContent":["const INCLUDES = [\"localhost\", \"127.0.0.1\"];\n\nexport const isLocalhost = () => {\n const href = window.location.href;\n return INCLUDES.some(current => href.includes(current));\n};\n"],"mappings":"AAAA,MAAMA,QAAQ,GAAG,CAAC,WAAW,EAAE,WAAW,CAAC;AAE3C,OAAO,MAAMC,WAAW,GAAGA,CAAA,KAAM;EAC7B,MAAMC,IAAI,GAAGC,MAAM,CAACC,QAAQ,CAACF,IAAI;EACjC,OAAOF,QAAQ,CAACK,IAAI,CAACC,OAAO,IAAIJ,IAAI,CAACK,QAAQ,CAACD,OAAO,CAAC,CAAC;AAC3D,CAAC","ignoreList":[]}
@@ -1 +0,0 @@
1
- export declare const isPrerendering: () => boolean;
@@ -1,5 +0,0 @@
1
- export const isPrerendering = () => {
2
- return "__PS_RENDER__" in window;
3
- };
4
-
5
- //# sourceMappingURL=isPrerendering.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["isPrerendering","window"],"sources":["isPrerendering.ts"],"sourcesContent":["export const isPrerendering = (): boolean => {\n return \"__PS_RENDER__\" in window;\n};\n"],"mappings":"AAAA,OAAO,MAAMA,cAAc,GAAGA,CAAA,KAAe;EACzC,OAAO,eAAe,IAAIC,MAAM;AACpC,CAAC","ignoreList":[]}