@webiny/app 0.0.0-unstable.78f581c1d2 → 0.0.0-unstable.7be00a75a9

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 (389) hide show
  1. package/App.d.ts +25 -0
  2. package/App.js +82 -0
  3. package/App.js.map +1 -0
  4. package/AppContainer.d.ts +23 -0
  5. package/AppContainer.js +6 -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 -77
  10. package/apollo-client/InMemoryCache.js.map +1 -1
  11. package/apollo-client/IntrospectionFragmentMatcher.d.ts +11 -0
  12. package/apollo-client/IntrospectionFragmentMatcher.js +33 -0
  13. package/apollo-client/IntrospectionFragmentMatcher.js.map +1 -0
  14. package/components/Image.d.ts +2 -3
  15. package/components/Image.js +15 -41
  16. package/components/Image.js.map +1 -1
  17. package/components/index.d.ts +1 -2
  18. package/components/index.js +1 -21
  19. package/config/RouterConfig/Route.d.ts +29 -0
  20. package/config/RouterConfig/Route.js +28 -0
  21. package/config/RouterConfig/Route.js.map +1 -0
  22. package/config/RouterConfig.d.ts +31 -0
  23. package/config/RouterConfig.js +19 -0
  24. package/config/RouterConfig.js.map +1 -0
  25. package/config.d.ts +1 -1
  26. package/config.js +20 -29
  27. package/config.js.map +1 -1
  28. package/contexts/Ui/index.d.ts +4 -8
  29. package/contexts/Ui/index.js +27 -89
  30. package/contexts/Ui/index.js.map +1 -1
  31. package/core/Plugin.d.ts +8 -0
  32. package/core/Plugin.js +12 -0
  33. package/core/Plugin.js.map +1 -0
  34. package/core/Plugins.d.ts +15 -0
  35. package/core/Plugins.js +21 -0
  36. package/core/Plugins.js.map +1 -0
  37. package/core/Provider.d.ts +8 -0
  38. package/core/Provider.js +10 -0
  39. package/core/Provider.js.map +1 -0
  40. package/core/createProvider.d.ts +10 -0
  41. package/core/createProvider.js +6 -0
  42. package/core/createProvider.js.map +1 -0
  43. package/core/createProviderPlugin.d.ts +8 -0
  44. package/core/createProviderPlugin.js +12 -0
  45. package/core/createProviderPlugin.js.map +1 -0
  46. package/errors/AuthenticationErrorEvent.d.ts +9 -0
  47. package/errors/AuthenticationErrorEvent.js +13 -0
  48. package/errors/AuthenticationErrorEvent.js.map +1 -0
  49. package/errors/NetworkErrorEvent.d.ts +15 -0
  50. package/errors/NetworkErrorEvent.js +13 -0
  51. package/errors/NetworkErrorEvent.js.map +1 -0
  52. package/errors/abstractions.d.ts +12 -0
  53. package/errors/abstractions.js +6 -0
  54. package/errors/abstractions.js.map +1 -0
  55. package/errors/index.d.ts +6 -0
  56. package/errors/index.js +3 -0
  57. package/exports/admin/env-config.d.ts +2 -0
  58. package/exports/admin/env-config.js +2 -0
  59. package/exports/admin/graphql-client.d.ts +1 -0
  60. package/exports/admin/graphql-client.js +1 -0
  61. package/exports/admin/local-storage.d.ts +2 -0
  62. package/exports/admin/local-storage.js +2 -0
  63. package/exports/admin/router.d.ts +5 -0
  64. package/exports/admin/router.js +5 -0
  65. package/exports/admin/security.d.ts +1 -0
  66. package/exports/admin/security.js +1 -0
  67. package/exports/admin.d.ts +7 -0
  68. package/exports/admin.js +7 -0
  69. package/features/envConfig/EnvConfig.d.ts +7 -0
  70. package/features/envConfig/EnvConfig.js +16 -0
  71. package/features/envConfig/EnvConfig.js.map +1 -0
  72. package/features/envConfig/abstractions.d.ts +28 -0
  73. package/features/envConfig/abstractions.js +5 -0
  74. package/features/envConfig/abstractions.js.map +1 -0
  75. package/features/envConfig/feature.d.ts +17 -0
  76. package/features/envConfig/feature.js +15 -0
  77. package/features/envConfig/feature.js.map +1 -0
  78. package/features/envConfig/index.d.ts +1 -0
  79. package/features/envConfig/index.js +1 -0
  80. package/features/eventPublisher/EventPublisher.d.ts +8 -0
  81. package/features/eventPublisher/EventPublisher.js +19 -0
  82. package/features/eventPublisher/EventPublisher.js.map +1 -0
  83. package/features/eventPublisher/abstractions.d.ts +18 -0
  84. package/features/eventPublisher/abstractions.js +12 -0
  85. package/features/eventPublisher/abstractions.js.map +1 -0
  86. package/features/eventPublisher/feature.d.ts +3 -0
  87. package/features/eventPublisher/feature.js +17 -0
  88. package/features/eventPublisher/feature.js.map +1 -0
  89. package/features/eventPublisher/index.d.ts +3 -0
  90. package/features/eventPublisher/index.js +2 -0
  91. package/features/graphqlClient/AuthenticationErrorPublishing.d.ts +13 -0
  92. package/features/graphqlClient/AuthenticationErrorPublishing.js +35 -0
  93. package/features/graphqlClient/AuthenticationErrorPublishing.js.map +1 -0
  94. package/features/graphqlClient/BatchingGraphQLClient.d.ts +16 -0
  95. package/features/graphqlClient/BatchingGraphQLClient.js +118 -0
  96. package/features/graphqlClient/BatchingGraphQLClient.js.map +1 -0
  97. package/features/graphqlClient/FetchGraphQLClient.d.ts +7 -0
  98. package/features/graphqlClient/FetchGraphQLClient.js +51 -0
  99. package/features/graphqlClient/FetchGraphQLClient.js.map +1 -0
  100. package/features/graphqlClient/NetworkErrorPublishing.d.ts +14 -0
  101. package/features/graphqlClient/NetworkErrorPublishing.js +48 -0
  102. package/features/graphqlClient/NetworkErrorPublishing.js.map +1 -0
  103. package/features/graphqlClient/RequestValue.d.ts +21 -0
  104. package/features/graphqlClient/RequestValue.js +46 -0
  105. package/features/graphqlClient/RequestValue.js.map +1 -0
  106. package/features/graphqlClient/RetryGraphQLClient.d.ts +18 -0
  107. package/features/graphqlClient/RetryGraphQLClient.js +45 -0
  108. package/features/graphqlClient/RetryGraphQLClient.js.map +1 -0
  109. package/features/graphqlClient/__tests__/GraphQLClient.test.d.ts +1 -0
  110. package/features/graphqlClient/__tests__/GraphQLClient.test.js +397 -0
  111. package/features/graphqlClient/__tests__/GraphQLClient.test.js.map +1 -0
  112. package/features/graphqlClient/abstractions.d.ts +18 -0
  113. package/features/graphqlClient/abstractions.js +5 -0
  114. package/features/graphqlClient/abstractions.js.map +1 -0
  115. package/features/graphqlClient/feature.d.ts +6 -0
  116. package/features/graphqlClient/feature.js +25 -0
  117. package/features/graphqlClient/feature.js.map +1 -0
  118. package/features/graphqlClient/index.d.ts +1 -0
  119. package/features/graphqlClient/index.js +1 -0
  120. package/features/graphqlClient/types.d.ts +5 -0
  121. package/features/graphqlClient/types.js +0 -0
  122. package/features/localStorage/BrowserLocalStorageGateway.d.ts +9 -0
  123. package/features/localStorage/BrowserLocalStorageGateway.js +61 -0
  124. package/features/localStorage/BrowserLocalStorageGateway.js.map +1 -0
  125. package/features/localStorage/LocalStorage.d.ts +12 -0
  126. package/features/localStorage/LocalStorage.js +34 -0
  127. package/features/localStorage/LocalStorage.js.map +1 -0
  128. package/features/localStorage/LocalStorageRepository.d.ts +20 -0
  129. package/features/localStorage/LocalStorageRepository.js +82 -0
  130. package/features/localStorage/LocalStorageRepository.js.map +1 -0
  131. package/features/localStorage/abstractions.d.ts +48 -0
  132. package/features/localStorage/abstractions.js +8 -0
  133. package/features/localStorage/abstractions.js.map +1 -0
  134. package/features/localStorage/feature.d.ts +12 -0
  135. package/features/localStorage/feature.js +23 -0
  136. package/features/localStorage/feature.js.map +1 -0
  137. package/features/localStorage/index.d.ts +1 -0
  138. package/features/localStorage/index.js +1 -0
  139. package/features/mainGraphQLClient/MainGraphQLClient.d.ts +11 -0
  140. package/features/mainGraphQLClient/MainGraphQLClient.js +27 -0
  141. package/features/mainGraphQLClient/MainGraphQLClient.js.map +1 -0
  142. package/features/mainGraphQLClient/abstractions.d.ts +17 -0
  143. package/features/mainGraphQLClient/abstractions.js +5 -0
  144. package/features/mainGraphQLClient/abstractions.js.map +1 -0
  145. package/features/mainGraphQLClient/feature.d.ts +3 -0
  146. package/features/mainGraphQLClient/feature.js +17 -0
  147. package/features/mainGraphQLClient/feature.js.map +1 -0
  148. package/features/mainGraphQLClient/index.d.ts +1 -0
  149. package/features/mainGraphQLClient/index.js +1 -0
  150. package/features/router/HistoryRouterGateway.d.ts +22 -0
  151. package/features/router/HistoryRouterGateway.js +88 -0
  152. package/features/router/HistoryRouterGateway.js.map +1 -0
  153. package/features/router/HistoryRouterGateway.test.d.ts +1 -0
  154. package/features/router/HistoryRouterGateway.test.js +195 -0
  155. package/features/router/HistoryRouterGateway.test.js.map +1 -0
  156. package/features/router/Route.d.ts +19 -0
  157. package/features/router/Route.js +43 -0
  158. package/features/router/Route.js.map +1 -0
  159. package/features/router/RouteUrl.d.ts +85 -0
  160. package/features/router/RouteUrl.js +99 -0
  161. package/features/router/RouteUrl.js.map +1 -0
  162. package/features/router/Router.d.ts +45 -0
  163. package/features/router/Router.js +72 -0
  164. package/features/router/Router.js.map +1 -0
  165. package/features/router/RouterPresenter.d.ts +21 -0
  166. package/features/router/RouterPresenter.js +52 -0
  167. package/features/router/RouterPresenter.js.map +1 -0
  168. package/features/router/RouterRepository.d.ts +30 -0
  169. package/features/router/RouterRepository.js +117 -0
  170. package/features/router/RouterRepository.js.map +1 -0
  171. package/features/router/RouterRepository.test.d.ts +1 -0
  172. package/features/router/RouterRepository.test.js +138 -0
  173. package/features/router/RouterRepository.test.js.map +1 -0
  174. package/features/router/abstractions.d.ts +81 -0
  175. package/features/router/abstractions.js +7 -0
  176. package/features/router/abstractions.js.map +1 -0
  177. package/features/router/feature.d.ts +4 -0
  178. package/features/router/feature.js +19 -0
  179. package/features/router/feature.js.map +1 -0
  180. package/features/router/index.d.ts +2 -0
  181. package/features/router/index.js +1 -0
  182. package/helpers/InterfaceGenerator/date.d.ts +15 -0
  183. package/helpers/InterfaceGenerator/date.js +0 -0
  184. package/helpers/InterfaceGenerator/id.d.ts +23 -0
  185. package/helpers/InterfaceGenerator/id.js +0 -0
  186. package/helpers/InterfaceGenerator/identity.d.ts +10 -0
  187. package/helpers/InterfaceGenerator/identity.js +0 -0
  188. package/helpers/InterfaceGenerator/index.d.ts +5 -0
  189. package/helpers/InterfaceGenerator/index.js +0 -0
  190. package/helpers/InterfaceGenerator/numeric.d.ts +12 -0
  191. package/helpers/InterfaceGenerator/numeric.js +0 -0
  192. package/helpers/InterfaceGenerator/truthful.d.ts +7 -0
  193. package/helpers/InterfaceGenerator/truthful.js +0 -0
  194. package/hooks/useAutocomplete/index.d.ts +1 -1
  195. package/hooks/useAutocomplete/index.js +1 -13
  196. package/hooks/useAutocomplete/useAutocomplete.d.ts +1 -1
  197. package/hooks/useAutocomplete/useAutocomplete.js +15 -36
  198. package/hooks/useAutocomplete/useAutocomplete.js.map +1 -1
  199. package/hooks/useDataList/functions/getData.js +4 -15
  200. package/hooks/useDataList/functions/getData.js.map +1 -1
  201. package/hooks/useDataList/functions/getError.js +4 -15
  202. package/hooks/useDataList/functions/getError.js.map +1 -1
  203. package/hooks/useDataList/functions/getMeta.js +4 -15
  204. package/hooks/useDataList/functions/getMeta.js.map +1 -1
  205. package/hooks/useDataList/functions/index.d.ts +3 -3
  206. package/hooks/useDataList/functions/index.js +3 -31
  207. package/hooks/useDataList/functions/searchDataByKey.js +10 -26
  208. package/hooks/useDataList/functions/searchDataByKey.js.map +1 -1
  209. package/hooks/useDataList/index.d.ts +1 -1
  210. package/hooks/useDataList/index.js +1 -13
  211. package/hooks/useDataList/useDataList.d.ts +2 -3
  212. package/hooks/useDataList/useDataList.js +139 -205
  213. package/hooks/useDataList/useDataList.js.map +1 -1
  214. package/hooks/useDataList/utils/index.d.ts +1 -2
  215. package/hooks/useDataList/utils/index.js +1 -23
  216. package/hooks/useDataList/utils/prepareLoadListParams.d.ts +1 -2
  217. package/hooks/useDataList/utils/prepareLoadListParams.js +26 -45
  218. package/hooks/useDataList/utils/prepareLoadListParams.js.map +1 -1
  219. package/hooks/useHandler.js +14 -19
  220. package/hooks/useHandler.js.map +1 -1
  221. package/hooks/useHandlers.d.ts +3 -3
  222. package/hooks/useHandlers.js +19 -28
  223. package/hooks/useHandlers.js.map +1 -1
  224. package/hooks/useRegisterLegacyPlugin.d.ts +2 -0
  225. package/hooks/useRegisterLegacyPlugin.js +12 -0
  226. package/hooks/useRegisterLegacyPlugin.js.map +1 -0
  227. package/hooks/useUi.d.ts +1 -1
  228. package/hooks/useUi.js +5 -15
  229. package/hooks/useUi.js.map +1 -1
  230. package/i18n/i18n.js +11 -21
  231. package/i18n/i18n.js.map +1 -1
  232. package/i18n/index.d.ts +1 -1
  233. package/i18n/index.js +1 -15
  234. package/index.d.ts +25 -4
  235. package/index.js +23 -37
  236. package/package.json +38 -38
  237. package/plugins/AddQuerySelectionPlugin.d.ts +10 -3
  238. package/plugins/AddQuerySelectionPlugin.js +43 -128
  239. package/plugins/AddQuerySelectionPlugin.js.map +1 -1
  240. package/plugins/ApolloCacheObjectIdPlugin.js +15 -51
  241. package/plugins/ApolloCacheObjectIdPlugin.js.map +1 -1
  242. package/plugins/ApolloDynamicLink.d.ts +3 -2
  243. package/plugins/ApolloDynamicLink.js +24 -78
  244. package/plugins/ApolloDynamicLink.js.map +1 -1
  245. package/plugins/ApolloLinkPlugin.d.ts +1 -1
  246. package/plugins/ApolloLinkPlugin.js +21 -61
  247. package/plugins/ApolloLinkPlugin.js.map +1 -1
  248. package/plugins/ConsoleLinkPlugin.d.ts +1 -1
  249. package/plugins/ConsoleLinkPlugin.js +20 -59
  250. package/plugins/ConsoleLinkPlugin.js.map +1 -1
  251. package/plugins/NetworkErrorLinkPlugin/ErrorOverlay.d.ts +8 -13
  252. package/plugins/NetworkErrorLinkPlugin/ErrorOverlay.js +47 -95
  253. package/plugins/NetworkErrorLinkPlugin/ErrorOverlay.js.map +1 -1
  254. package/plugins/NetworkErrorLinkPlugin/GqlErrorOverlay.d.ts +14 -0
  255. package/plugins/NetworkErrorLinkPlugin/GqlErrorOverlay.js +27 -0
  256. package/plugins/NetworkErrorLinkPlugin/GqlErrorOverlay.js.map +1 -0
  257. package/plugins/NetworkErrorLinkPlugin/LocalAwsLambdaTimeoutMessage.d.ts +2 -0
  258. package/plugins/NetworkErrorLinkPlugin/LocalAwsLambdaTimeoutMessage.js +23 -0
  259. package/plugins/NetworkErrorLinkPlugin/LocalAwsLambdaTimeoutMessage.js.map +1 -0
  260. package/plugins/NetworkErrorLinkPlugin/StyledComponents.d.ts +8 -5
  261. package/plugins/NetworkErrorLinkPlugin/StyledComponents.js +68 -20
  262. package/plugins/NetworkErrorLinkPlugin/StyledComponents.js.map +1 -1
  263. package/plugins/NetworkErrorLinkPlugin/Typography.d.ts +8 -0
  264. package/plugins/NetworkErrorLinkPlugin/Typography.js +13 -0
  265. package/plugins/NetworkErrorLinkPlugin/Typography.js.map +1 -0
  266. package/plugins/NetworkErrorLinkPlugin/assets/close_24px.js +19 -0
  267. package/plugins/NetworkErrorLinkPlugin/assets/close_24px.js.map +1 -0
  268. package/plugins/NetworkErrorLinkPlugin/createErrorOverlay.d.ts +3 -3
  269. package/plugins/NetworkErrorLinkPlugin/createErrorOverlay.js +13 -36
  270. package/plugins/NetworkErrorLinkPlugin/createErrorOverlay.js.map +1 -1
  271. package/plugins/NetworkErrorLinkPlugin.d.ts +4 -1
  272. package/plugins/NetworkErrorLinkPlugin.js +51 -63
  273. package/plugins/NetworkErrorLinkPlugin.js.map +1 -1
  274. package/plugins/OmitTypenameLinkPlugin.d.ts +1 -1
  275. package/plugins/OmitTypenameLinkPlugin.js +12 -51
  276. package/plugins/OmitTypenameLinkPlugin.js.map +1 -1
  277. package/plugins/TenantHeaderLinkPlugin.d.ts +3 -8
  278. package/plugins/TenantHeaderLinkPlugin.js +25 -82
  279. package/plugins/TenantHeaderLinkPlugin.js.map +1 -1
  280. package/plugins/components/Image.d.ts +6 -0
  281. package/plugins/components/Image.js +12 -0
  282. package/plugins/components/Image.js.map +1 -0
  283. package/plugins/image.d.ts +1 -1
  284. package/plugins/image.js +97 -175
  285. package/plugins/image.js.map +1 -1
  286. package/plugins/index.d.ts +5 -5
  287. package/plugins/index.js +38 -106
  288. package/plugins/index.js.map +1 -1
  289. package/presentation/envConfig/useEnvConfig.d.ts +6 -0
  290. package/presentation/envConfig/useEnvConfig.js +9 -0
  291. package/presentation/envConfig/useEnvConfig.js.map +1 -0
  292. package/presentation/localStorage/index.d.ts +3 -0
  293. package/presentation/localStorage/index.js +3 -0
  294. package/presentation/localStorage/useLocalStorage.d.ts +6 -0
  295. package/presentation/localStorage/useLocalStorage.js +15 -0
  296. package/presentation/localStorage/useLocalStorage.js.map +1 -0
  297. package/presentation/localStorage/useLocalStorageValue.d.ts +1 -0
  298. package/presentation/localStorage/useLocalStorageValue.js +22 -0
  299. package/presentation/localStorage/useLocalStorageValue.js.map +1 -0
  300. package/presentation/localStorage/useLocalStorageValues.d.ts +5 -0
  301. package/presentation/localStorage/useLocalStorageValues.js +32 -0
  302. package/presentation/localStorage/useLocalStorageValues.js.map +1 -0
  303. package/presentation/router/RouteElementRegistry.d.ts +14 -0
  304. package/presentation/router/RouteElementRegistry.js +29 -0
  305. package/presentation/router/RouteElementRegistry.js.map +1 -0
  306. package/presentation/router/abstractions.d.ts +13 -0
  307. package/presentation/router/abstractions.js +5 -0
  308. package/presentation/router/abstractions.js.map +1 -0
  309. package/presentation/router/components/Redirect.d.ts +14 -0
  310. package/presentation/router/components/Redirect.js +13 -0
  311. package/presentation/router/components/Redirect.js.map +1 -0
  312. package/presentation/router/components/RouteContent.d.ts +2 -0
  313. package/presentation/router/components/RouteContent.js +20 -0
  314. package/presentation/router/components/RouteContent.js.map +1 -0
  315. package/presentation/router/components/RouteLink.d.ts +50 -0
  316. package/presentation/router/components/RouteLink.js +17 -0
  317. package/presentation/router/components/RouteLink.js.map +1 -0
  318. package/presentation/router/components/SimpleLink.d.ts +44 -0
  319. package/presentation/router/components/SimpleLink.js +24 -0
  320. package/presentation/router/components/SimpleLink.js.map +1 -0
  321. package/presentation/router/hooks/useRoute.d.ts +6 -0
  322. package/presentation/router/hooks/useRoute.js +22 -0
  323. package/presentation/router/hooks/useRoute.js.map +1 -0
  324. package/presentation/router/hooks/useRouter.d.ts +11 -0
  325. package/presentation/router/hooks/useRouter.js +29 -0
  326. package/presentation/router/hooks/useRouter.js.map +1 -0
  327. package/presentation/router/index.d.ts +4 -0
  328. package/presentation/router/index.js +3 -0
  329. package/presentation/router/types.d.ts +5 -0
  330. package/presentation/router/types.js +0 -0
  331. package/renderApp.d.ts +2 -0
  332. package/renderApp.js +10 -0
  333. package/renderApp.js.map +1 -0
  334. package/router.d.ts +5 -0
  335. package/router.js +5 -0
  336. package/rslib-runtime.js +14 -0
  337. package/rslib-runtime.js.map +1 -0
  338. package/shared/di/DiContainerProvider.d.ts +8 -0
  339. package/shared/di/DiContainerProvider.js +13 -0
  340. package/shared/di/DiContainerProvider.js.map +1 -0
  341. package/shared/di/createFeature.d.ts +11 -0
  342. package/shared/di/createFeature.js +10 -0
  343. package/shared/di/createFeature.js.map +1 -0
  344. package/shared/di/useFeature.d.ts +2 -0
  345. package/shared/di/useFeature.js +12 -0
  346. package/shared/di/useFeature.js.map +1 -0
  347. package/static/svg/close_24px.33adaadc.svg +1 -0
  348. package/types.d.ts +30 -30
  349. package/types.js +0 -13
  350. package/utils/createGenericContext.d.ts +13 -0
  351. package/utils/createGenericContext.js +21 -0
  352. package/utils/createGenericContext.js.map +1 -0
  353. package/utils/createHashing.d.ts +2 -0
  354. package/utils/createHashing.js +15 -0
  355. package/utils/createHashing.js.map +1 -0
  356. package/utils/index.d.ts +2 -0
  357. package/utils/index.js +2 -0
  358. package/utils/legacyPluginToReactComponent.d.ts +7 -0
  359. package/utils/legacyPluginToReactComponent.js +15 -0
  360. package/utils/legacyPluginToReactComponent.js.map +1 -0
  361. package/components/Routes.d.ts +0 -2
  362. package/components/Routes.js +0 -49
  363. package/components/Routes.js.map +0 -1
  364. package/components/View.d.ts +0 -8
  365. package/components/View.js +0 -41
  366. package/components/View.js.map +0 -1
  367. package/components/index.js.map +0 -1
  368. package/hooks/useAutocomplete/index.js.map +0 -1
  369. package/hooks/useDataList/functions/index.js.map +0 -1
  370. package/hooks/useDataList/index.js.map +0 -1
  371. package/hooks/useDataList/utils/index.js.map +0 -1
  372. package/hooks/useDataList/utils/redirectToRouteWithQueryParams.d.ts +0 -14
  373. package/hooks/useDataList/utils/redirectToRouteWithQueryParams.js +0 -31
  374. package/hooks/useDataList/utils/redirectToRouteWithQueryParams.js.map +0 -1
  375. package/hooks/useDataList/utils/types.d.ts +0 -34
  376. package/hooks/useDataList/utils/types.js +0 -5
  377. package/hooks/useDataList/utils/types.js.map +0 -1
  378. package/i18n/index.js.map +0 -1
  379. package/index.js.map +0 -1
  380. package/plugins/LocaleHeaderLinkPlugin.d.ts +0 -15
  381. package/plugins/LocaleHeaderLinkPlugin.js +0 -77
  382. package/plugins/LocaleHeaderLinkPlugin.js.map +0 -1
  383. package/plugins/RoutePlugin.d.ts +0 -12
  384. package/plugins/RoutePlugin.js +0 -53
  385. package/plugins/RoutePlugin.js.map +0 -1
  386. package/plugins/ViewPlugin.d.ts +0 -14
  387. package/plugins/ViewPlugin.js +0 -58
  388. package/plugins/ViewPlugin.js.map +0 -1
  389. package/types.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"names":["OverlayWrapper","styled","Pre"],"sources":["StyledComponents.tsx"],"sourcesContent":["import styled from \"@emotion/styled\";\n\nexport const OverlayWrapper = styled(\"div\")(`\n width: 100vw;\n height: 100vh;\n position: fixed;\n top: 0;\n left: 0;\n z-index: 105; // The highest z-index value is 100 for Dialogs\n \n .inner {\n box-sizing: border-box;\n display: flex;\n flex-direction: column;\n width: 100%;\n height: 100%;\n overflow: auto;\n background-color: white;\n padding: 1rem;\n }\n \n .header {\n display: flex;\n justify-content: space-between;\n align-items: center;\n margin-bottom: 1rem;\n .header__title {\n color: var(--mdc-theme-error);\n }\n }\n \n .body {\n flex-grow: 1;\n .body__summary {\n margin-bottom: 1rem;\n }\n }\n \n .footer {\n color: var(--mdc-theme-text-secondary-on-background);\n \n .highlight {\n background-color: rgba(251, 245, 180, 0.5);\n padding: 0 4px;\n border-radius: 6px;\n font-family: monospace;\n }\n }\n`);\n\nexport const Pre = styled(\"pre\")(`\n position: relative;\n display: block;\n padding: 0.5em;\n margin-top: 0.5em;\n margin-bottom: 0.5em;\n overflow-x: auto;\n white-space: pre-wrap;\n border-radius: 0.25rem;\n background-color: rgba(251, 245, 180, 0.3);\n color: inherit;\n \n code {\n font-family: monospace;\n font-size: 0.85rem;\n line-height: 1rem;\n }\n`);\n"],"mappings":";;;;;;;;;AAAA;;AAEO,IAAMA,cAAc,oBAAGC,eAAH,EAAU,KAAV;EAAA;EAAA;AAAA,4hCAApB;;AAgDA,IAAMC,GAAG,oBAAGD,eAAH,EAAU,KAAV;EAAA;EAAA;AAAA,uYAAT"}
1
+ {"version":3,"file":"plugins/NetworkErrorLinkPlugin/StyledComponents.js","sources":["../../../src/plugins/NetworkErrorLinkPlugin/StyledComponents.tsx"],"sourcesContent":["import styled from \"@emotion/styled\";\n\nexport const OverlayWrapper = styled(\"div\")(`\n width: 100vw;\n height: 100vh;\n position: fixed;\n top: 0;\n left: 0;\n z-index: 105; // The highest z-index value is 100 for Dialogs\n \n .inner {\n box-sizing: border-box;\n display: flex;\n flex-direction: column;\n width: 100%;\n height: 100%;\n overflow: auto;\n background-color: white;\n padding: 1rem;\n }\n \n .header {\n display: flex;\n justify-content: space-between;\n align-items: center;\n margin-bottom: 1rem;\n .header__title {\n color: var(--mdc-theme-error);\n }\n }\n \n .body {\n grow: 1;\n .body__summary {\n margin-bottom: 1rem;\n }\n }\n \n .footer {\n color: var(--mdc-theme-text-secondary-on-background);\n \n .highlight {\n background-color: rgba(251, 245, 180, 0.5);\n padding: 0 4px;\n border-radius: 6px;\n font-family: monospace;\n }\n }\n`);\n\nexport const Pre = styled(\"pre\")(`\n position: relative;\n display: block;\n padding: 0.5em;\n margin-top: 0.5em;\n margin-bottom: 0.5em;\n overflow-x: auto;\n white-space: pre-wrap;\n border-radius: 0.25rem;\n background-color: rgba(251, 245, 180, 0.3);\n color: inherit;\n \n code {\n font-family: monospace;\n font-size: 0.85rem;\n line-height: 1rem;\n }\n`);\n"],"names":["OverlayWrapper","styled","Pre"],"mappings":";AAEO,MAAMA,iBAAiBC,OAAO,OAAO,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA8C7C,CAAC;AAEM,MAAMC,MAAMD,OAAO,OAAO,CAAC;;;;;;;;;;;;;;;;;AAiBlC,CAAC"}
@@ -0,0 +1,8 @@
1
+ import React from "react";
2
+ export declare type TypographyT = "headline" | "body" | "subtitle";
3
+ export interface TypographyProps {
4
+ use: TypographyT;
5
+ children?: React.ReactNode;
6
+ className?: string;
7
+ }
8
+ export declare const Typography: (props: TypographyProps) => React.JSX.Element;
@@ -0,0 +1,13 @@
1
+ import react from "react";
2
+ const Typography = (props)=>{
3
+ const { children, use, className } = props;
4
+ if ("headline" === use) return /*#__PURE__*/ react.createElement("h4", {
5
+ className: className
6
+ }, children);
7
+ return /*#__PURE__*/ react.createElement("p", {
8
+ className: className
9
+ }, children);
10
+ };
11
+ export { Typography };
12
+
13
+ //# sourceMappingURL=Typography.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"plugins/NetworkErrorLinkPlugin/Typography.js","sources":["../../../src/plugins/NetworkErrorLinkPlugin/Typography.tsx"],"sourcesContent":["import React from \"react\";\n\nexport declare type TypographyT = \"headline\" | \"body\" | \"subtitle\";\n\nexport interface TypographyProps {\n use: TypographyT;\n children?: React.ReactNode;\n className?: string;\n}\n\nexport const Typography = (props: TypographyProps) => {\n const { children, use, className } = props;\n\n if (use === \"headline\") {\n return <h4 className={className}>{children}</h4>;\n }\n\n return <p className={className}>{children}</p>;\n};\n"],"names":["Typography","props","children","use","className"],"mappings":";AAUO,MAAMA,aAAa,CAACC;IACvB,MAAM,EAAEC,QAAQ,EAAEC,GAAG,EAAEC,SAAS,EAAE,GAAGH;IAErC,IAAIE,AAAQ,eAARA,KACA,OAAO,WAAP,GAAO,oBAAC;QAAG,WAAWC;OAAYF;IAGtC,OAAO,WAAP,GAAO,oBAAC;QAAE,WAAWE;OAAYF;AACrC"}
@@ -0,0 +1,19 @@
1
+ import __rslib_svgr_url__0__ from "../../../static/svg/close_24px.33adaadc.svg";
2
+ import * as __rspack_external_react from "react";
3
+ const SvgClose24Px = (props)=>/*#__PURE__*/ __rspack_external_react.createElement("svg", {
4
+ xmlns: "http://www.w3.org/2000/svg",
5
+ width: 24,
6
+ height: 24,
7
+ viewBox: "0 0 24 24",
8
+ ...props
9
+ }, /*#__PURE__*/ __rspack_external_react.createElement("path", {
10
+ fill: "none",
11
+ d: "M0 0h24v24H0z"
12
+ }), /*#__PURE__*/ __rspack_external_react.createElement("path", {
13
+ d: "M18.3 5.71a.996.996 0 0 0-1.41 0L12 10.59 7.11 5.7A.996.996 0 1 0 5.7 7.11L10.59 12 5.7 16.89a.996.996 0 1 0 1.41 1.41L12 13.41l4.89 4.89a.996.996 0 1 0 1.41-1.41L13.41 12l4.89-4.89c.38-.38.38-1.02 0-1.4"
14
+ }));
15
+ const close_24px = __rslib_svgr_url__0__;
16
+ export default close_24px;
17
+ export { SvgClose24Px as ReactComponent };
18
+
19
+ //# sourceMappingURL=close_24px.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"plugins/NetworkErrorLinkPlugin/assets/close_24px.js","sources":["../../../../src/plugins/NetworkErrorLinkPlugin/assets/close_24px.svg"],"sourcesContent":["import * as React from \"react\";\nconst SvgClose24Px = props => <svg xmlns=\"http://www.w3.org/2000/svg\" width={24} height={24} viewBox=\"0 0 24 24\" {...props}><path fill=\"none\" d=\"M0 0h24v24H0z\" /><path d=\"M18.3 5.71a.996.996 0 0 0-1.41 0L12 10.59 7.11 5.7A.996.996 0 1 0 5.7 7.11L10.59 12 5.7 16.89a.996.996 0 1 0 1.41 1.41L12 13.41l4.89 4.89a.996.996 0 1 0 1.41-1.41L13.41 12l4.89-4.89c.38-.38.38-1.02 0-1.4\" /></svg>;\nexport { SvgClose24Px as ReactComponent };\nexport default \"__RSLIB_SVGR_AUTO_PUBLIC_PATH__static/svg/close_24px.33adaadc.svg\";"],"names":["SvgClose24Px","props"],"mappings":";;AACA,MAAMA,eAAeC,CAAAA,QAAAA,WAAAA,GAAS,sCAAC;QAAI,OAAM;QAA6B,OAAO;QAAI,QAAQ;QAAI,SAAQ;QAAa,GAAGA,KAAK;qBAAE,sCAAC;QAAK,MAAK;QAAO,GAAE;sBAAkB,sCAAC;QAAK,GAAE;;AAE1K"}
@@ -1,7 +1,7 @@
1
- import { ServerError, ServerParseError } from "apollo-link-http-common";
1
+ import type React from "react";
2
2
  interface CreateErrorOverlayParams {
3
- query: string;
4
- networkError: Error | ServerError | ServerParseError;
3
+ element: React.ReactElement;
4
+ closeable?: boolean;
5
5
  }
6
6
  declare const createErrorOverlay: (params: CreateErrorOverlayParams) => void;
7
7
  export default createErrorOverlay;
@@ -1,38 +1,15 @@
1
- "use strict";
2
-
3
- var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
4
-
5
- Object.defineProperty(exports, "__esModule", {
6
- value: true
7
- });
8
- exports.default = void 0;
9
-
10
- var _react = _interopRequireDefault(require("react"));
11
-
12
- var _reactDom = require("react-dom");
13
-
14
- var _ErrorOverlay = _interopRequireDefault(require("./ErrorOverlay"));
15
-
16
- var createErrorOverlay = function createErrorOverlay(params) {
17
- var query = params.query,
18
- networkError = params.networkError; // If the element already present in DOM, return immediately.
19
-
20
- if (document.getElementById("overlay-root")) {
21
- return;
22
- } // Create root element to hold React tree.
23
-
24
-
25
- var container = document.createElement("div");
26
- container.id = "overlay-root"; // Insert root element into body.
27
-
28
- var body = document.getElementsByTagName("body")[0];
29
- body.appendChild(container); // Mount the ErrorOverlay component into root element.
30
-
31
- (0, _reactDom.render)( /*#__PURE__*/_react.default.createElement(_ErrorOverlay.default, {
32
- query: query,
33
- networkError: networkError
34
- }), container);
1
+ import { createRoot } from "react-dom/client";
2
+ const createErrorOverlay = (params)=>{
3
+ const { element } = params;
4
+ if (document.getElementById("overlay-root")) return;
5
+ const container = document.createElement("div");
6
+ container.id = "overlay-root";
7
+ const body = document.getElementsByTagName("body")[0];
8
+ body.appendChild(container);
9
+ const root = createRoot(container);
10
+ root.render(element);
35
11
  };
12
+ const NetworkErrorLinkPlugin_createErrorOverlay = createErrorOverlay;
13
+ export default NetworkErrorLinkPlugin_createErrorOverlay;
36
14
 
37
- var _default = createErrorOverlay;
38
- exports.default = _default;
15
+ //# sourceMappingURL=createErrorOverlay.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["createErrorOverlay","params","query","networkError","document","getElementById","container","createElement","id","body","getElementsByTagName","appendChild","render"],"sources":["createErrorOverlay.tsx"],"sourcesContent":["import React from \"react\";\nimport { render } from \"react-dom\";\nimport ErrorOverlay from \"./ErrorOverlay\";\nimport { ServerError, ServerParseError } from \"apollo-link-http-common\";\n\ninterface CreateErrorOverlayParams {\n query: string;\n networkError: Error | ServerError | ServerParseError;\n}\nconst createErrorOverlay = (params: CreateErrorOverlayParams): void => {\n const { query, networkError } = params;\n // If the element already present in DOM, return immediately.\n if (document.getElementById(\"overlay-root\")) {\n return;\n }\n // Create root element to hold React tree.\n const container: HTMLDivElement = document.createElement(\"div\");\n container.id = \"overlay-root\";\n // Insert root element into body.\n const body: HTMLBodyElement = document.getElementsByTagName(\"body\")[0];\n body.appendChild(container);\n // Mount the ErrorOverlay component into root element.\n render(<ErrorOverlay query={query} networkError={networkError} />, container);\n};\n\nexport default createErrorOverlay;\n"],"mappings":";;;;;;;;;AAAA;;AACA;;AACA;;AAOA,IAAMA,kBAAkB,GAAG,SAArBA,kBAAqB,CAACC,MAAD,EAA4C;EACnE,IAAQC,KAAR,GAAgCD,MAAhC,CAAQC,KAAR;EAAA,IAAeC,YAAf,GAAgCF,MAAhC,CAAeE,YAAf,CADmE,CAEnE;;EACA,IAAIC,QAAQ,CAACC,cAAT,CAAwB,cAAxB,CAAJ,EAA6C;IACzC;EACH,CALkE,CAMnE;;;EACA,IAAMC,SAAyB,GAAGF,QAAQ,CAACG,aAAT,CAAuB,KAAvB,CAAlC;EACAD,SAAS,CAACE,EAAV,GAAe,cAAf,CARmE,CASnE;;EACA,IAAMC,IAAqB,GAAGL,QAAQ,CAACM,oBAAT,CAA8B,MAA9B,EAAsC,CAAtC,CAA9B;EACAD,IAAI,CAACE,WAAL,CAAiBL,SAAjB,EAXmE,CAYnE;;EACA,IAAAM,gBAAA,gBAAO,6BAAC,qBAAD;IAAc,KAAK,EAAEV,KAArB;IAA4B,YAAY,EAAEC;EAA1C,EAAP,EAAmEG,SAAnE;AACH,CAdD;;eAgBeN,kB"}
1
+ {"version":3,"file":"plugins/NetworkErrorLinkPlugin/createErrorOverlay.js","sources":["../../../src/plugins/NetworkErrorLinkPlugin/createErrorOverlay.tsx"],"sourcesContent":["import type React from \"react\";\nimport { createRoot } from \"react-dom/client\";\n\ninterface CreateErrorOverlayParams {\n element: React.ReactElement;\n closeable?: boolean;\n}\n\nconst createErrorOverlay = (params: CreateErrorOverlayParams): void => {\n const { element } = params;\n // If the element already present in DOM, return immediately.\n if (document.getElementById(\"overlay-root\")) {\n return;\n }\n // Create root element to hold React tree.\n const container: HTMLDivElement = document.createElement(\"div\");\n container.id = \"overlay-root\";\n // Insert root element into body.\n const body: HTMLBodyElement = document.getElementsByTagName(\"body\")[0];\n body.appendChild(container);\n // Mount the ErrorOverlay component into root element.\n const root = createRoot(container);\n root.render(element);\n};\n\nexport default createErrorOverlay;\n"],"names":["createErrorOverlay","params","element","document","container","body","root","createRoot"],"mappings":";AAQA,MAAMA,qBAAqB,CAACC;IACxB,MAAM,EAAEC,OAAO,EAAE,GAAGD;IAEpB,IAAIE,SAAS,cAAc,CAAC,iBACxB;IAGJ,MAAMC,YAA4BD,SAAS,aAAa,CAAC;IACzDC,UAAU,EAAE,GAAG;IAEf,MAAMC,OAAwBF,SAAS,oBAAoB,CAAC,OAAO,CAAC,EAAE;IACtEE,KAAK,WAAW,CAACD;IAEjB,MAAME,OAAOC,WAAWH;IACxBE,KAAK,MAAM,CAACJ;AAChB;AAEA,kDAAeF"}
@@ -1,7 +1,10 @@
1
- import { ApolloLinkPlugin } from "./ApolloLinkPlugin";
1
+ import { ApolloLinkPlugin } from "./ApolloLinkPlugin.js";
2
+ import type { EventPublisher } from "../features/eventPublisher/index.js";
2
3
  /**
3
4
  * This plugin creates an ApolloLink that checks for `NetworkError` and shows an ErrorOverlay in the browser.
4
5
  */
5
6
  export declare class NetworkErrorLinkPlugin extends ApolloLinkPlugin {
7
+ private getEventPublisher;
8
+ constructor(getEventPublisher: () => EventPublisher.Interface);
6
9
  createLink(): import("apollo-link").ApolloLink;
7
10
  }
@@ -1,65 +1,53 @@
1
- "use strict";
2
-
3
- var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
4
-
5
- Object.defineProperty(exports, "__esModule", {
6
- value: true
7
- });
8
- exports.NetworkErrorLinkPlugin = void 0;
9
-
10
- var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
11
-
12
- var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
13
-
14
- var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits"));
15
-
16
- var _createSuper2 = _interopRequireDefault(require("@babel/runtime/helpers/createSuper"));
17
-
18
- var _ApolloLinkPlugin2 = require("./ApolloLinkPlugin");
19
-
20
- var _apolloLinkError = require("apollo-link-error");
21
-
22
- var _language = require("graphql/language");
23
-
24
- var _createErrorOverlay = _interopRequireDefault(require("./NetworkErrorLinkPlugin/createErrorOverlay"));
25
-
26
- var _boolean = require("boolean");
27
-
28
- var _config = require("../config");
29
-
30
- /**
31
- * This plugin creates an ApolloLink that checks for `NetworkError` and shows an ErrorOverlay in the browser.
32
- */
33
- var NetworkErrorLinkPlugin = /*#__PURE__*/function (_ApolloLinkPlugin) {
34
- (0, _inherits2.default)(NetworkErrorLinkPlugin, _ApolloLinkPlugin);
35
-
36
- var _super = (0, _createSuper2.default)(NetworkErrorLinkPlugin);
37
-
38
- function NetworkErrorLinkPlugin() {
39
- (0, _classCallCheck2.default)(this, NetworkErrorLinkPlugin);
40
- return _super.apply(this, arguments);
41
- }
42
-
43
- (0, _createClass2.default)(NetworkErrorLinkPlugin, [{
44
- key: "createLink",
45
- value: function createLink() {
46
- return (0, _apolloLinkError.onError)(function (_ref) {
47
- var networkError = _ref.networkError,
48
- operation = _ref.operation;
49
-
50
- var debug = _config.config.getKey("DEBUG", (0, _boolean.boolean)(process.env.REACT_APP_DEBUG));
51
-
52
- if (networkError && debug) {
53
- (0, _createErrorOverlay.default)({
54
- query: (0, _language.print)(operation.query),
55
- networkError: networkError
56
- });
57
- } // TODO: also print graphQLErrors
58
-
59
- });
1
+ import react from "react";
2
+ import { onError } from "apollo-link-error";
3
+ import { print } from "graphql/language/index.js";
4
+ import { toBoolean } from "@webiny/stdlib";
5
+ import { ApolloLinkPlugin } from "./ApolloLinkPlugin.js";
6
+ import createErrorOverlay from "./NetworkErrorLinkPlugin/createErrorOverlay.js";
7
+ import { LocalAwsLambdaTimeoutMessage } from "./NetworkErrorLinkPlugin/LocalAwsLambdaTimeoutMessage.js";
8
+ import { config } from "../config.js";
9
+ import { ErrorOverlay } from "./NetworkErrorLinkPlugin/ErrorOverlay.js";
10
+ import { GqlErrorOverlay } from "./NetworkErrorLinkPlugin/GqlErrorOverlay.js";
11
+ import { NetworkErrorEvent } from "../errors/index.js";
12
+ const isLocalAwsLambdaFnInvocationTimeoutError = (error)=>error.result && "LOCAL_AWS_LAMBDA_TIMEOUT" === error.result.code;
13
+ class NetworkErrorLinkPlugin extends ApolloLinkPlugin {
14
+ constructor(getEventPublisher){
15
+ super(), this.getEventPublisher = getEventPublisher;
16
+ }
17
+ createLink() {
18
+ return onError(({ networkError, operation })=>{
19
+ const debug = config.getKey("DEBUG", toBoolean(process.env.REACT_APP_DEBUG));
20
+ if (networkError) {
21
+ const errorType = isLocalAwsLambdaFnInvocationTimeoutError(networkError) ? "timeout" : "network";
22
+ const event = new NetworkErrorEvent({
23
+ message: networkError.message,
24
+ operationName: operation.operationName,
25
+ query: print(operation.query),
26
+ variables: operation.variables,
27
+ errorType,
28
+ statusCode: networkError.statusCode,
29
+ result: networkError.result
30
+ });
31
+ this.getEventPublisher().publish(event);
32
+ if (debug) {
33
+ if (isLocalAwsLambdaFnInvocationTimeoutError(networkError)) return void createErrorOverlay({
34
+ element: /*#__PURE__*/ react.createElement(ErrorOverlay, {
35
+ message: /*#__PURE__*/ react.createElement(LocalAwsLambdaTimeoutMessage, null),
36
+ closeable: false
37
+ }),
38
+ closeable: false
39
+ });
40
+ createErrorOverlay({
41
+ element: /*#__PURE__*/ react.createElement(GqlErrorOverlay, {
42
+ query: print(operation.query),
43
+ networkError: networkError
44
+ })
45
+ });
46
+ }
47
+ }
48
+ });
60
49
  }
61
- }]);
62
- return NetworkErrorLinkPlugin;
63
- }(_ApolloLinkPlugin2.ApolloLinkPlugin);
50
+ }
51
+ export { NetworkErrorLinkPlugin };
64
52
 
65
- exports.NetworkErrorLinkPlugin = NetworkErrorLinkPlugin;
53
+ //# sourceMappingURL=NetworkErrorLinkPlugin.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["NetworkErrorLinkPlugin","onError","networkError","operation","debug","appConfig","getKey","boolean","process","env","REACT_APP_DEBUG","createErrorOverlay","query","print","ApolloLinkPlugin"],"sources":["NetworkErrorLinkPlugin.ts"],"sourcesContent":["import { ApolloLinkPlugin } from \"./ApolloLinkPlugin\";\nimport { onError } from \"apollo-link-error\";\nimport { print } from \"graphql/language\";\nimport createErrorOverlay from \"./NetworkErrorLinkPlugin/createErrorOverlay\";\nimport { boolean } from \"boolean\";\nimport { config as appConfig } from \"~/config\";\n\n/**\n * This plugin creates an ApolloLink that checks for `NetworkError` and shows an ErrorOverlay in the browser.\n */\nexport class NetworkErrorLinkPlugin extends ApolloLinkPlugin {\n public override createLink() {\n return onError(({ networkError, operation }) => {\n const debug = appConfig.getKey(\"DEBUG\", boolean(process.env.REACT_APP_DEBUG));\n\n if (networkError && debug) {\n createErrorOverlay({ query: print(operation.query), networkError });\n }\n\n // TODO: also print graphQLErrors\n });\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;AAAA;;AACA;;AACA;;AACA;;AACA;;AACA;;AAEA;AACA;AACA;IACaA,sB;;;;;;;;;;;;WACT,sBAA6B;MACzB,OAAO,IAAAC,wBAAA,EAAQ,gBAAiC;QAAA,IAA9BC,YAA8B,QAA9BA,YAA8B;QAAA,IAAhBC,SAAgB,QAAhBA,SAAgB;;QAC5C,IAAMC,KAAK,GAAGC,cAAA,CAAUC,MAAV,CAAiB,OAAjB,EAA0B,IAAAC,gBAAA,EAAQC,OAAO,CAACC,GAAR,CAAYC,eAApB,CAA1B,CAAd;;QAEA,IAAIR,YAAY,IAAIE,KAApB,EAA2B;UACvB,IAAAO,2BAAA,EAAmB;YAAEC,KAAK,EAAE,IAAAC,eAAA,EAAMV,SAAS,CAACS,KAAhB,CAAT;YAAiCV,YAAY,EAAZA;UAAjC,CAAnB;QACH,CAL2C,CAO5C;;MACH,CARM,CAAP;IASH;;;EAXuCY,mC"}
1
+ {"version":3,"file":"plugins/NetworkErrorLinkPlugin.js","sources":["../../src/plugins/NetworkErrorLinkPlugin.tsx"],"sourcesContent":["import React from \"react\";\nimport { onError } from \"apollo-link-error\";\nimport { type ServerError } from \"apollo-link-http-common\";\nimport { print } from \"graphql/language/index.js\";\nimport { toBoolean } from \"@webiny/stdlib\";\nimport { ApolloLinkPlugin } from \"./ApolloLinkPlugin.js\";\nimport createErrorOverlay from \"./NetworkErrorLinkPlugin/createErrorOverlay.js\";\nimport { LocalAwsLambdaTimeoutMessage } from \"./NetworkErrorLinkPlugin/LocalAwsLambdaTimeoutMessage.js\";\nimport { config as appConfig } from \"~/config.js\";\nimport { ErrorOverlay } from \"~/plugins/NetworkErrorLinkPlugin/ErrorOverlay.js\";\nimport { GqlErrorOverlay } from \"./NetworkErrorLinkPlugin/GqlErrorOverlay.js\";\nimport type { EventPublisher } from \"~/features/eventPublisher/index.js\";\nimport { NetworkErrorEvent } from \"~/errors/index.js\";\n\nconst isLocalAwsLambdaFnInvocationTimeoutError = (error: any): error is ServerError => {\n return error.result && error.result.code === \"LOCAL_AWS_LAMBDA_TIMEOUT\";\n};\n\n/**\n * This plugin creates an ApolloLink that checks for `NetworkError` and shows an ErrorOverlay in the browser.\n */\nexport class NetworkErrorLinkPlugin extends ApolloLinkPlugin {\n constructor(private getEventPublisher: () => EventPublisher.Interface) {\n super();\n }\n\n public override createLink() {\n return onError(({ networkError, operation }) => {\n const debug = appConfig.getKey(\"DEBUG\", toBoolean(process.env.REACT_APP_DEBUG));\n\n if (networkError) {\n // Publish network error event\n const errorType = isLocalAwsLambdaFnInvocationTimeoutError(networkError)\n ? \"timeout\"\n : \"network\";\n\n const event = new NetworkErrorEvent({\n message: networkError.message,\n operationName: operation.operationName,\n query: print(operation.query),\n variables: operation.variables,\n errorType,\n statusCode: (networkError as any).statusCode,\n result: (networkError as any).result\n });\n\n this.getEventPublisher().publish(event);\n\n // Keep existing overlay logic for now\n if (debug) {\n if (isLocalAwsLambdaFnInvocationTimeoutError(networkError)) {\n createErrorOverlay({\n element: (\n <ErrorOverlay\n message={<LocalAwsLambdaTimeoutMessage />}\n closeable={false}\n />\n ),\n closeable: false\n });\n return;\n }\n\n createErrorOverlay({\n element: (\n <GqlErrorOverlay\n query={print(operation.query)}\n networkError={networkError}\n />\n )\n });\n }\n }\n\n // TODO: also print graphQLErrors\n });\n }\n}\n"],"names":["isLocalAwsLambdaFnInvocationTimeoutError","error","NetworkErrorLinkPlugin","ApolloLinkPlugin","getEventPublisher","onError","networkError","operation","debug","appConfig","toBoolean","process","errorType","event","NetworkErrorEvent","print","createErrorOverlay","ErrorOverlay","LocalAwsLambdaTimeoutMessage","GqlErrorOverlay"],"mappings":";;;;;;;;;;;AAcA,MAAMA,2CAA2C,CAACC,QACvCA,MAAM,MAAM,IAAIA,AAAsB,+BAAtBA,MAAM,MAAM,CAAC,IAAI;AAMrC,MAAMC,+BAA+BC;IACxC,YAAoBC,iBAAiD,CAAE;QACnE,KAAK,SADWA,iBAAiB,GAAjBA;IAEpB;IAEgB,aAAa;QACzB,OAAOC,QAAQ,CAAC,EAAEC,YAAY,EAAEC,SAAS,EAAE;YACvC,MAAMC,QAAQC,OAAAA,MAAgB,CAAC,SAASC,UAAUC,QAAQ,GAAG,CAAC,eAAe;YAE7E,IAAIL,cAAc;gBAEd,MAAMM,YAAYZ,yCAAyCM,gBACrD,YACA;gBAEN,MAAMO,QAAQ,IAAIC,kBAAkB;oBAChC,SAASR,aAAa,OAAO;oBAC7B,eAAeC,UAAU,aAAa;oBACtC,OAAOQ,MAAMR,UAAU,KAAK;oBAC5B,WAAWA,UAAU,SAAS;oBAC9BK;oBACA,YAAaN,aAAqB,UAAU;oBAC5C,QAASA,aAAqB,MAAM;gBACxC;gBAEA,IAAI,CAAC,iBAAiB,GAAG,OAAO,CAACO;gBAGjC,IAAIL,OAAO;oBACP,IAAIR,yCAAyCM,eAAe,YACxDU,mBAAmB;wBACf,SAAS,WAAT,GACI,oBAACC,cAAYA;4BACT,uBAAS,oBAACC,8BAA4BA;4BACtC,WAAW;;wBAGnB,WAAW;oBACf;oBAIJF,mBAAmB;wBACf,SAAS,WAAT,GACI,oBAACG,iBAAeA;4BACZ,OAAOJ,MAAMR,UAAU,KAAK;4BAC5B,cAAcD;;oBAG1B;gBACJ;YACJ;QAGJ;IACJ;AACJ"}
@@ -1,5 +1,5 @@
1
1
  import { ApolloLink } from "apollo-link";
2
- import { ApolloLinkPlugin } from "./ApolloLinkPlugin";
2
+ import { ApolloLinkPlugin } from "./ApolloLinkPlugin.js";
3
3
  /**
4
4
  * This link removes `__typename` from the variables being sent to the API.
5
5
  */
@@ -1,55 +1,16 @@
1
- "use strict";
2
-
3
- var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
4
-
5
- Object.defineProperty(exports, "__esModule", {
6
- value: true
7
- });
8
- exports.OmitTypenameLinkPlugin = void 0;
9
-
10
- var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
11
-
12
- var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
13
-
14
- var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits"));
15
-
16
- var _createSuper2 = _interopRequireDefault(require("@babel/runtime/helpers/createSuper"));
17
-
18
- var _apolloLink = require("apollo-link");
19
-
20
- var _ApolloLinkPlugin2 = require("./ApolloLinkPlugin");
21
-
1
+ import { ApolloLink } from "apollo-link";
2
+ import { ApolloLinkPlugin } from "./ApolloLinkPlugin.js";
22
3
  function omitTypename(key, value) {
23
- return key === "__typename" ? undefined : value;
4
+ return "__typename" === key ? void 0 : value;
24
5
  }
25
- /**
26
- * This link removes `__typename` from the variables being sent to the API.
27
- */
28
-
29
-
30
- var OmitTypenameLinkPlugin = /*#__PURE__*/function (_ApolloLinkPlugin) {
31
- (0, _inherits2.default)(OmitTypenameLinkPlugin, _ApolloLinkPlugin);
32
-
33
- var _super = (0, _createSuper2.default)(OmitTypenameLinkPlugin);
34
-
35
- function OmitTypenameLinkPlugin() {
36
- (0, _classCallCheck2.default)(this, OmitTypenameLinkPlugin);
37
- return _super.apply(this, arguments);
38
- }
39
-
40
- (0, _createClass2.default)(OmitTypenameLinkPlugin, [{
41
- key: "createLink",
42
- value: function createLink() {
43
- return new _apolloLink.ApolloLink(function (operation, forward) {
44
- if (operation.variables) {
45
- operation.variables = JSON.parse(JSON.stringify(operation.variables), omitTypename);
46
- }
47
-
48
- return forward(operation);
49
- });
6
+ class OmitTypenameLinkPlugin extends ApolloLinkPlugin {
7
+ createLink() {
8
+ return new ApolloLink((operation, forward)=>{
9
+ if (operation.variables) operation.variables = JSON.parse(JSON.stringify(operation.variables), omitTypename);
10
+ return forward(operation);
11
+ });
50
12
  }
51
- }]);
52
- return OmitTypenameLinkPlugin;
53
- }(_ApolloLinkPlugin2.ApolloLinkPlugin);
13
+ }
14
+ export { OmitTypenameLinkPlugin };
54
15
 
55
- exports.OmitTypenameLinkPlugin = OmitTypenameLinkPlugin;
16
+ //# sourceMappingURL=OmitTypenameLinkPlugin.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["omitTypename","key","value","undefined","OmitTypenameLinkPlugin","ApolloLink","operation","forward","variables","JSON","parse","stringify","ApolloLinkPlugin"],"sources":["OmitTypenameLinkPlugin.ts"],"sourcesContent":["import { ApolloLink } from \"apollo-link\";\nimport { ApolloLinkPlugin } from \"./ApolloLinkPlugin\";\n\nfunction omitTypename(key: string, value: string): string | undefined {\n return key === \"__typename\" ? undefined : value;\n}\n\n/**\n * This link removes `__typename` from the variables being sent to the API.\n */\nexport class OmitTypenameLinkPlugin extends ApolloLinkPlugin {\n public override createLink(): ApolloLink {\n return new ApolloLink((operation, forward) => {\n if (operation.variables) {\n operation.variables = JSON.parse(JSON.stringify(operation.variables), omitTypename);\n }\n return forward(operation);\n });\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;AAAA;;AACA;;AAEA,SAASA,YAAT,CAAsBC,GAAtB,EAAmCC,KAAnC,EAAsE;EAClE,OAAOD,GAAG,KAAK,YAAR,GAAuBE,SAAvB,GAAmCD,KAA1C;AACH;AAED;AACA;AACA;;;IACaE,sB;;;;;;;;;;;;WACT,sBAAyC;MACrC,OAAO,IAAIC,sBAAJ,CAAe,UAACC,SAAD,EAAYC,OAAZ,EAAwB;QAC1C,IAAID,SAAS,CAACE,SAAd,EAAyB;UACrBF,SAAS,CAACE,SAAV,GAAsBC,IAAI,CAACC,KAAL,CAAWD,IAAI,CAACE,SAAL,CAAeL,SAAS,CAACE,SAAzB,CAAX,EAAgDR,YAAhD,CAAtB;QACH;;QACD,OAAOO,OAAO,CAACD,SAAD,CAAd;MACH,CALM,CAAP;IAMH;;;EARuCM,mC"}
1
+ {"version":3,"file":"plugins/OmitTypenameLinkPlugin.js","sources":["../../src/plugins/OmitTypenameLinkPlugin.ts"],"sourcesContent":["import { ApolloLink } from \"apollo-link\";\nimport { ApolloLinkPlugin } from \"./ApolloLinkPlugin.js\";\n\nfunction omitTypename(key: string, value: string): string | undefined {\n return key === \"__typename\" ? undefined : value;\n}\n\n/**\n * This link removes `__typename` from the variables being sent to the API.\n */\nexport class OmitTypenameLinkPlugin extends ApolloLinkPlugin {\n public override createLink(): ApolloLink {\n return new ApolloLink((operation, forward) => {\n if (operation.variables) {\n operation.variables = JSON.parse(JSON.stringify(operation.variables), omitTypename);\n }\n return forward(operation);\n });\n }\n}\n"],"names":["omitTypename","key","value","undefined","OmitTypenameLinkPlugin","ApolloLinkPlugin","ApolloLink","operation","forward","JSON"],"mappings":";;AAGA,SAASA,aAAaC,GAAW,EAAEC,KAAa;IAC5C,OAAOD,AAAQ,iBAARA,MAAuBE,SAAYD;AAC9C;AAKO,MAAME,+BAA+BC;IACxB,aAAyB;QACrC,OAAO,IAAIC,WAAW,CAACC,WAAWC;YAC9B,IAAID,UAAU,SAAS,EACnBA,UAAU,SAAS,GAAGE,KAAK,KAAK,CAACA,KAAK,SAAS,CAACF,UAAU,SAAS,GAAGP;YAE1E,OAAOQ,QAAQD;QACnB;IACJ;AACJ"}
@@ -1,15 +1,10 @@
1
- import { ApolloLinkPlugin } from "./ApolloLinkPlugin";
2
- import { ApolloLink } from "apollo-link";
3
- declare global {
4
- interface Window {
5
- __PS_RENDER_TENANT__: string;
6
- }
7
- }
1
+ import { ApolloLinkPlugin } from "./ApolloLinkPlugin.js";
2
+ import type { ApolloLink } from "apollo-link";
8
3
  /**
9
4
  * Append `x-tenant` header from URL query (necessary for prerendering service).
10
5
  */
11
6
  export declare class TenantHeaderLinkPlugin extends ApolloLinkPlugin {
12
7
  private readonly tenant;
13
- constructor(tenant?: string);
8
+ constructor(tenant: string);
14
9
  createLink(): ApolloLink;
15
10
  }
@@ -1,85 +1,28 @@
1
- "use strict";
2
-
3
- var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
4
-
5
- Object.defineProperty(exports, "__esModule", {
6
- value: true
7
- });
8
- exports.TenantHeaderLinkPlugin = void 0;
9
-
10
- var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/objectSpread2"));
11
-
12
- var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
13
-
14
- var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
15
-
16
- var _assertThisInitialized2 = _interopRequireDefault(require("@babel/runtime/helpers/assertThisInitialized"));
17
-
18
- var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits"));
19
-
20
- var _createSuper2 = _interopRequireDefault(require("@babel/runtime/helpers/createSuper"));
21
-
22
- var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
23
-
24
- var _apolloLinkContext = require("apollo-link-context");
25
-
26
- var _ApolloLinkPlugin2 = require("./ApolloLinkPlugin");
27
-
28
- /**
29
- * Append `x-tenant` header from URL query (necessary for prerendering service).
30
- */
31
- var TenantHeaderLinkPlugin = /*#__PURE__*/function (_ApolloLinkPlugin) {
32
- (0, _inherits2.default)(TenantHeaderLinkPlugin, _ApolloLinkPlugin);
33
-
34
- var _super = (0, _createSuper2.default)(TenantHeaderLinkPlugin);
35
-
36
- function TenantHeaderLinkPlugin(tenant) {
37
- var _this;
38
-
39
- (0, _classCallCheck2.default)(this, TenantHeaderLinkPlugin);
40
- _this = _super.call(this);
41
- (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "tenant", void 0);
42
- _this.name = "tenant-header-link";
43
-
44
- if (!tenant) {
45
- var query = new URLSearchParams(location.search);
46
- tenant = query.get("__tenant") || window.__PS_RENDER_TENANT__;
1
+ import { setContext } from "apollo-link-context";
2
+ import { ApolloLinkPlugin } from "./ApolloLinkPlugin.js";
3
+ class TenantHeaderLinkPlugin extends ApolloLinkPlugin {
4
+ constructor(tenant){
5
+ super();
6
+ this.name = "tenant-header-link";
7
+ this.tenant = tenant;
47
8
  }
48
-
49
- _this.tenant = tenant;
50
- return _this;
51
- }
52
-
53
- (0, _createClass2.default)(TenantHeaderLinkPlugin, [{
54
- key: "createLink",
55
- value: function createLink() {
56
- var _this2 = this;
57
-
58
- return (0, _apolloLinkContext.setContext)(function (_, _ref) {
59
- var headers = _ref.headers;
60
-
61
- // If tenant header is already set, do not overwrite it.
62
- if (headers && "x-tenant" in headers) {
63
- return {
64
- headers: headers
65
- };
66
- }
67
-
68
- if (_this2.tenant) {
69
- return {
70
- headers: (0, _objectSpread2.default)((0, _objectSpread2.default)({}, headers), {}, {
71
- "x-tenant": _this2.tenant
72
- })
73
- };
74
- }
75
-
76
- return {
77
- headers: headers
78
- };
79
- });
9
+ createLink() {
10
+ return setContext((_, { headers })=>{
11
+ if (headers && "x-tenant" in headers) return {
12
+ headers
13
+ };
14
+ if (this.tenant) return {
15
+ headers: {
16
+ ...headers,
17
+ "x-tenant": this.tenant
18
+ }
19
+ };
20
+ return {
21
+ headers
22
+ };
23
+ });
80
24
  }
81
- }]);
82
- return TenantHeaderLinkPlugin;
83
- }(_ApolloLinkPlugin2.ApolloLinkPlugin);
25
+ }
26
+ export { TenantHeaderLinkPlugin };
84
27
 
85
- exports.TenantHeaderLinkPlugin = TenantHeaderLinkPlugin;
28
+ //# sourceMappingURL=TenantHeaderLinkPlugin.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["TenantHeaderLinkPlugin","tenant","name","query","URLSearchParams","location","search","get","window","__PS_RENDER_TENANT__","setContext","_","headers","ApolloLinkPlugin"],"sources":["TenantHeaderLinkPlugin.ts"],"sourcesContent":["import { setContext } from \"apollo-link-context\";\nimport { ApolloLinkPlugin } from \"./ApolloLinkPlugin\";\nimport { ApolloLink } from \"apollo-link\";\n\ndeclare global {\n interface Window {\n __PS_RENDER_TENANT__: string;\n }\n}\n\n/**\n * Append `x-tenant` header from URL query (necessary for prerendering service).\n */\nexport class TenantHeaderLinkPlugin extends ApolloLinkPlugin {\n private readonly tenant: string;\n\n public constructor(tenant?: string) {\n super();\n this.name = \"tenant-header-link\";\n\n if (!tenant) {\n const query = new URLSearchParams(location.search);\n tenant = query.get(\"__tenant\") || window.__PS_RENDER_TENANT__;\n }\n\n this.tenant = tenant;\n }\n\n public override createLink(): ApolloLink {\n return setContext((_, { headers }) => {\n // If tenant header is already set, do not overwrite it.\n if (headers && \"x-tenant\" in headers) {\n return { headers };\n }\n\n if (this.tenant) {\n return {\n headers: {\n ...headers,\n \"x-tenant\": this.tenant\n }\n };\n }\n\n return { headers };\n });\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAAA;;AACA;;AASA;AACA;AACA;IACaA,sB;;;;;EAGT,gCAAmBC,MAAnB,EAAoC;IAAA;;IAAA;IAChC;IADgC;IAEhC,MAAKC,IAAL,GAAY,oBAAZ;;IAEA,IAAI,CAACD,MAAL,EAAa;MACT,IAAME,KAAK,GAAG,IAAIC,eAAJ,CAAoBC,QAAQ,CAACC,MAA7B,CAAd;MACAL,MAAM,GAAGE,KAAK,CAACI,GAAN,CAAU,UAAV,KAAyBC,MAAM,CAACC,oBAAzC;IACH;;IAED,MAAKR,MAAL,GAAcA,MAAd;IATgC;EAUnC;;;;WAED,sBAAyC;MAAA;;MACrC,OAAO,IAAAS,6BAAA,EAAW,UAACC,CAAD,QAAoB;QAAA,IAAdC,OAAc,QAAdA,OAAc;;QAClC;QACA,IAAIA,OAAO,IAAI,cAAcA,OAA7B,EAAsC;UAClC,OAAO;YAAEA,OAAO,EAAPA;UAAF,CAAP;QACH;;QAED,IAAI,MAAI,CAACX,MAAT,EAAiB;UACb,OAAO;YACHW,OAAO,8DACAA,OADA;cAEH,YAAY,MAAI,CAACX;YAFd;UADJ,CAAP;QAMH;;QAED,OAAO;UAAEW,OAAO,EAAPA;QAAF,CAAP;MACH,CAhBM,CAAP;IAiBH;;;EAjCuCC,mC"}
1
+ {"version":3,"file":"plugins/TenantHeaderLinkPlugin.js","sources":["../../src/plugins/TenantHeaderLinkPlugin.ts"],"sourcesContent":["import { setContext } from \"apollo-link-context\";\nimport { ApolloLinkPlugin } from \"./ApolloLinkPlugin.js\";\nimport type { ApolloLink } from \"apollo-link\";\n\n/**\n * Append `x-tenant` header from URL query (necessary for prerendering service).\n */\nexport class TenantHeaderLinkPlugin extends ApolloLinkPlugin {\n private readonly tenant: string;\n\n public constructor(tenant: string) {\n super();\n this.name = \"tenant-header-link\";\n\n this.tenant = tenant;\n }\n\n public override createLink(): ApolloLink {\n return setContext((_, { headers }) => {\n // If tenant header is already set, do not overwrite it.\n if (headers && \"x-tenant\" in headers) {\n return { headers };\n }\n\n if (this.tenant) {\n return {\n headers: {\n ...headers,\n \"x-tenant\": this.tenant\n }\n };\n }\n\n return { headers };\n });\n }\n}\n"],"names":["TenantHeaderLinkPlugin","ApolloLinkPlugin","tenant","setContext","_","headers"],"mappings":";;AAOO,MAAMA,+BAA+BC;IAGxC,YAAmBC,MAAc,CAAE;QAC/B,KAAK;QACL,IAAI,CAAC,IAAI,GAAG;QAEZ,IAAI,CAAC,MAAM,GAAGA;IAClB;IAEgB,aAAyB;QACrC,OAAOC,WAAW,CAACC,GAAG,EAAEC,OAAO,EAAE;YAE7B,IAAIA,WAAW,cAAcA,SACzB,OAAO;gBAAEA;YAAQ;YAGrB,IAAI,IAAI,CAAC,MAAM,EACX,OAAO;gBACH,SAAS;oBACL,GAAGA,OAAO;oBACV,YAAY,IAAI,CAAC,MAAM;gBAC3B;YACJ;YAGJ,OAAO;gBAAEA;YAAQ;QACrB;IACJ;AACJ"}
@@ -0,0 +1,6 @@
1
+ import React from "react";
2
+ interface ImageProps extends React.DetailedHTMLProps<React.ImgHTMLAttributes<HTMLImageElement>, HTMLImageElement> {
3
+ [key: string]: any;
4
+ }
5
+ declare const Image: ({ ...rest }: ImageProps) => React.JSX.Element;
6
+ export { Image, type ImageProps };
@@ -0,0 +1,12 @@
1
+ import react from "react";
2
+ const Image = ({ ...rest })=>{
3
+ const finalProps = {
4
+ ...rest
5
+ };
6
+ const srcSet = finalProps.srcSet;
7
+ if (srcSet && "object" == typeof srcSet) finalProps.srcSet = Object.keys(srcSet).map((key)=>`${srcSet[key]} ${key}`).join(", ");
8
+ return /*#__PURE__*/ react.createElement("img", finalProps);
9
+ };
10
+ export { Image };
11
+
12
+ //# sourceMappingURL=Image.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"plugins/components/Image.js","sources":["../../../src/plugins/components/Image.tsx"],"sourcesContent":["import React from \"react\";\n\n// Accepts all props that a normal <img> element would accept.\ninterface ImageProps extends React.DetailedHTMLProps<\n React.ImgHTMLAttributes<HTMLImageElement>,\n HTMLImageElement\n> {\n [key: string]: any;\n}\n\nconst Image = ({ ...rest }: ImageProps) => {\n const finalProps = { ...rest };\n const srcSet = finalProps.srcSet;\n if (srcSet && typeof srcSet === \"object\") {\n finalProps.srcSet = Object.keys(srcSet)\n .map(key => `${srcSet[key]} ${key}`)\n .join(\", \");\n }\n\n return <img {...finalProps} />;\n};\n\nexport { Image, type ImageProps };\n"],"names":["Image","rest","finalProps","srcSet","Object","key"],"mappings":";AAUA,MAAMA,QAAQ,CAAC,EAAE,GAAGC,MAAkB;IAClC,MAAMC,aAAa;QAAE,GAAGD,IAAI;IAAC;IAC7B,MAAME,SAASD,WAAW,MAAM;IAChC,IAAIC,UAAU,AAAkB,YAAlB,OAAOA,QACjBD,WAAW,MAAM,GAAGE,OAAO,IAAI,CAACD,QAC3B,GAAG,CAACE,CAAAA,MAAO,GAAGF,MAAM,CAACE,IAAI,CAAC,CAAC,EAAEA,KAAK,EAClC,IAAI,CAAC;IAGd,OAAO,WAAP,GAAO,oBAAC,OAAQH;AACpB"}
@@ -1,3 +1,3 @@
1
- import { ImageComponentPlugin } from "../types";
1
+ import type { ImageComponentPlugin } from "../types.js";
2
2
  declare const _default: () => ImageComponentPlugin;
3
3
  export default _default;