@webiny/app 6.0.0-beta.0 → 6.0.0-rc.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (435) hide show
  1. package/App.d.ts +6 -13
  2. package/App.js +70 -83
  3. package/App.js.map +1 -1
  4. package/AppContainer.d.ts +23 -0
  5. package/AppContainer.js +9 -0
  6. package/AppContainer.js.map +1 -0
  7. package/README.md +7 -15
  8. package/apollo-client/InMemoryCache.d.ts +3 -2
  9. package/apollo-client/InMemoryCache.js +16 -48
  10. package/apollo-client/InMemoryCache.js.map +1 -1
  11. package/apollo-client/IntrospectionFragmentMatcher.d.ts +2 -2
  12. package/apollo-client/IntrospectionFragmentMatcher.js +33 -50
  13. package/apollo-client/IntrospectionFragmentMatcher.js.map +1 -1
  14. package/components/Image.d.ts +1 -2
  15. package/components/Image.js +11 -19
  16. package/components/Image.js.map +1 -1
  17. package/components/index.d.ts +1 -2
  18. package/components/index.js +1 -19
  19. package/components/index.js.map +1 -1
  20. package/config/RouterConfig/Route.d.ts +29 -0
  21. package/config/RouterConfig/Route.js +33 -0
  22. package/config/RouterConfig/Route.js.map +1 -0
  23. package/config/RouterConfig.d.ts +31 -0
  24. package/config/RouterConfig.js +18 -0
  25. package/config/RouterConfig.js.map +1 -0
  26. package/config.d.ts +1 -1
  27. package/config.js +7 -13
  28. package/config.js.map +1 -1
  29. package/contexts/Ui/index.d.ts +2 -2
  30. package/contexts/Ui/index.js +28 -52
  31. package/contexts/Ui/index.js.map +1 -1
  32. package/core/DebounceRender.js +13 -24
  33. package/core/DebounceRender.js.map +1 -1
  34. package/core/Plugin.d.ts +1 -1
  35. package/core/Plugin.js +11 -19
  36. package/core/Plugin.js.map +1 -1
  37. package/core/Plugins.d.ts +1 -1
  38. package/core/Plugins.js +20 -25
  39. package/core/Plugins.js.map +1 -1
  40. package/core/Provider.d.ts +1 -1
  41. package/core/Provider.js +9 -13
  42. package/core/Provider.js.map +1 -1
  43. package/core/Routes.d.ts +2 -1
  44. package/core/Routes.js +13 -23
  45. package/core/Routes.js.map +1 -1
  46. package/core/createProvider.d.ts +7 -3
  47. package/core/createProvider.js +3 -9
  48. package/core/createProvider.js.map +1 -1
  49. package/core/createProviderPlugin.d.ts +1 -1
  50. package/core/createProviderPlugin.js +4 -10
  51. package/core/createProviderPlugin.js.map +1 -1
  52. package/errors/AuthenticationErrorEvent.d.ts +9 -0
  53. package/errors/AuthenticationErrorEvent.js +10 -0
  54. package/errors/AuthenticationErrorEvent.js.map +1 -0
  55. package/errors/NetworkErrorEvent.d.ts +15 -0
  56. package/errors/NetworkErrorEvent.js +10 -0
  57. package/errors/NetworkErrorEvent.js.map +1 -0
  58. package/errors/abstractions.d.ts +12 -0
  59. package/errors/abstractions.js +5 -0
  60. package/errors/abstractions.js.map +1 -0
  61. package/errors/index.d.ts +6 -0
  62. package/errors/index.js +6 -0
  63. package/errors/index.js.map +1 -0
  64. package/exports/admin/envConfig.d.ts +1 -0
  65. package/exports/admin/envConfig.js +3 -0
  66. package/exports/admin/envConfig.js.map +1 -0
  67. package/exports/admin/graphqlClient.d.ts +1 -0
  68. package/exports/admin/graphqlClient.js +3 -0
  69. package/exports/admin/graphqlClient.js.map +1 -0
  70. package/exports/admin/localStorage.d.ts +2 -0
  71. package/exports/admin/localStorage.js +4 -0
  72. package/exports/admin/localStorage.js.map +1 -0
  73. package/exports/admin/router.d.ts +4 -0
  74. package/exports/admin/router.js +6 -0
  75. package/exports/admin/router.js.map +1 -0
  76. package/exports/admin/security.d.ts +1 -0
  77. package/exports/admin/security.js +3 -0
  78. package/exports/admin/security.js.map +1 -0
  79. package/exports/admin.d.ts +6 -0
  80. package/exports/admin.js +8 -0
  81. package/exports/admin.js.map +1 -0
  82. package/features/envConfig/EnvConfig.d.ts +6 -0
  83. package/features/envConfig/EnvConfig.js +14 -0
  84. package/features/envConfig/EnvConfig.js.map +1 -0
  85. package/features/envConfig/abstractions.d.ts +27 -0
  86. package/features/envConfig/abstractions.js +4 -0
  87. package/features/envConfig/abstractions.js.map +1 -0
  88. package/features/envConfig/feature.d.ts +17 -0
  89. package/features/envConfig/feature.js +14 -0
  90. package/features/envConfig/feature.js.map +1 -0
  91. package/features/envConfig/index.d.ts +1 -0
  92. package/features/envConfig/index.js +3 -0
  93. package/features/envConfig/index.js.map +1 -0
  94. package/features/eventPublisher/EventPublisher.d.ts +8 -0
  95. package/features/eventPublisher/EventPublisher.js +27 -0
  96. package/features/eventPublisher/EventPublisher.js.map +1 -0
  97. package/features/eventPublisher/abstractions.d.ts +18 -0
  98. package/features/eventPublisher/abstractions.js +14 -0
  99. package/features/eventPublisher/abstractions.js.map +1 -0
  100. package/features/eventPublisher/feature.d.ts +1 -0
  101. package/features/eventPublisher/feature.js +11 -0
  102. package/features/eventPublisher/feature.js.map +1 -0
  103. package/features/eventPublisher/index.d.ts +3 -0
  104. package/features/eventPublisher/index.js +4 -0
  105. package/features/eventPublisher/index.js.map +1 -0
  106. package/features/graphqlClient/AuthenticationErrorPublishing.d.ts +13 -0
  107. package/features/graphqlClient/AuthenticationErrorPublishing.js +35 -0
  108. package/features/graphqlClient/AuthenticationErrorPublishing.js.map +1 -0
  109. package/features/graphqlClient/BatchingGraphQLClient.d.ts +18 -0
  110. package/features/graphqlClient/BatchingGraphQLClient.js +164 -0
  111. package/features/graphqlClient/BatchingGraphQLClient.js.map +1 -0
  112. package/features/graphqlClient/FetchGraphQLClient.d.ts +10 -0
  113. package/features/graphqlClient/FetchGraphQLClient.js +62 -0
  114. package/features/graphqlClient/FetchGraphQLClient.js.map +1 -0
  115. package/features/graphqlClient/NetworkErrorPublishing.d.ts +14 -0
  116. package/features/graphqlClient/NetworkErrorPublishing.js +55 -0
  117. package/features/graphqlClient/NetworkErrorPublishing.js.map +1 -0
  118. package/features/graphqlClient/RequestValue.d.ts +20 -0
  119. package/features/graphqlClient/RequestValue.js +42 -0
  120. package/features/graphqlClient/RequestValue.js.map +1 -0
  121. package/features/graphqlClient/RetryGraphQLClient.d.ts +18 -0
  122. package/features/graphqlClient/RetryGraphQLClient.js +54 -0
  123. package/features/graphqlClient/RetryGraphQLClient.js.map +1 -0
  124. package/features/graphqlClient/__tests__/GraphQLClient.test.d.ts +1 -0
  125. package/features/graphqlClient/__tests__/GraphQLClient.test.js +350 -0
  126. package/features/graphqlClient/__tests__/GraphQLClient.test.js.map +1 -0
  127. package/features/graphqlClient/abstractions.d.ts +17 -0
  128. package/features/graphqlClient/abstractions.js +4 -0
  129. package/features/graphqlClient/abstractions.js.map +1 -0
  130. package/features/graphqlClient/feature.d.ts +6 -0
  131. package/features/graphqlClient/feature.js +31 -0
  132. package/features/graphqlClient/feature.js.map +1 -0
  133. package/features/graphqlClient/index.d.ts +1 -0
  134. package/features/graphqlClient/index.js +3 -0
  135. package/features/graphqlClient/index.js.map +1 -0
  136. package/features/graphqlClient/types.d.ts +5 -0
  137. package/features/graphqlClient/types.js +3 -0
  138. package/features/graphqlClient/types.js.map +1 -0
  139. package/features/localStorage/BrowserLocalStorageGateway.d.ts +9 -0
  140. package/features/localStorage/BrowserLocalStorageGateway.js +68 -0
  141. package/features/localStorage/BrowserLocalStorageGateway.js.map +1 -0
  142. package/features/localStorage/LocalStorage.d.ts +12 -0
  143. package/features/localStorage/LocalStorage.js +31 -0
  144. package/features/localStorage/LocalStorage.js.map +1 -0
  145. package/features/localStorage/LocalStorageRepository.d.ts +20 -0
  146. package/features/localStorage/LocalStorageRepository.js +95 -0
  147. package/features/localStorage/LocalStorageRepository.js.map +1 -0
  148. package/features/localStorage/abstractions.d.ts +48 -0
  149. package/features/localStorage/abstractions.js +19 -0
  150. package/features/localStorage/abstractions.js.map +1 -0
  151. package/features/localStorage/feature.d.ts +12 -0
  152. package/features/localStorage/feature.js +34 -0
  153. package/features/localStorage/feature.js.map +1 -0
  154. package/features/localStorage/index.d.ts +1 -0
  155. package/features/localStorage/index.js +3 -0
  156. package/features/localStorage/index.js.map +1 -0
  157. package/features/router/HistoryRouterGateway.d.ts +18 -0
  158. package/features/router/HistoryRouterGateway.js +82 -0
  159. package/features/router/HistoryRouterGateway.js.map +1 -0
  160. package/features/router/HistoryRouterGateway.test.d.ts +1 -0
  161. package/features/router/HistoryRouterGateway.test.js +204 -0
  162. package/features/router/HistoryRouterGateway.test.js.map +1 -0
  163. package/features/router/Route.d.ts +19 -0
  164. package/features/router/Route.js +59 -0
  165. package/features/router/Route.js.map +1 -0
  166. package/features/router/RouteUrl.d.ts +85 -0
  167. package/features/router/RouteUrl.js +232 -0
  168. package/features/router/RouteUrl.js.map +1 -0
  169. package/features/router/Router.d.ts +45 -0
  170. package/features/router/Router.js +129 -0
  171. package/features/router/Router.js.map +1 -0
  172. package/features/router/RouterPresenter.d.ts +17 -0
  173. package/features/router/RouterPresenter.js +45 -0
  174. package/features/router/RouterPresenter.js.map +1 -0
  175. package/features/router/RouterRepository.d.ts +21 -0
  176. package/features/router/RouterRepository.js +71 -0
  177. package/features/router/RouterRepository.js.map +1 -0
  178. package/features/router/RouterRepository.test.d.ts +1 -0
  179. package/features/router/RouterRepository.test.js +154 -0
  180. package/features/router/RouterRepository.test.js.map +1 -0
  181. package/features/router/abstractions.d.ts +68 -0
  182. package/features/router/abstractions.js +15 -0
  183. package/features/router/abstractions.js.map +1 -0
  184. package/features/router/feature.d.ts +4 -0
  185. package/features/router/feature.js +18 -0
  186. package/features/router/feature.js.map +1 -0
  187. package/features/router/index.d.ts +1 -0
  188. package/features/router/index.js +3 -0
  189. package/features/router/index.js.map +1 -0
  190. package/helpers/InterfaceGenerator/date.d.ts +15 -0
  191. package/helpers/InterfaceGenerator/date.js +3 -0
  192. package/helpers/InterfaceGenerator/date.js.map +1 -0
  193. package/helpers/InterfaceGenerator/id.d.ts +23 -0
  194. package/helpers/InterfaceGenerator/id.js +3 -0
  195. package/helpers/InterfaceGenerator/id.js.map +1 -0
  196. package/helpers/InterfaceGenerator/identity.d.ts +10 -0
  197. package/helpers/InterfaceGenerator/identity.js +3 -0
  198. package/helpers/InterfaceGenerator/identity.js.map +1 -0
  199. package/helpers/InterfaceGenerator/index.d.ts +5 -0
  200. package/helpers/InterfaceGenerator/index.js +3 -0
  201. package/helpers/InterfaceGenerator/index.js.map +1 -0
  202. package/helpers/InterfaceGenerator/numeric.d.ts +12 -0
  203. package/helpers/InterfaceGenerator/numeric.js +3 -0
  204. package/helpers/InterfaceGenerator/numeric.js.map +1 -0
  205. package/helpers/InterfaceGenerator/truthful.d.ts +7 -0
  206. package/helpers/InterfaceGenerator/truthful.js +3 -0
  207. package/helpers/InterfaceGenerator/truthful.js.map +1 -0
  208. package/hooks/useAutocomplete/index.d.ts +1 -1
  209. package/hooks/useAutocomplete/index.js +1 -12
  210. package/hooks/useAutocomplete/index.js.map +1 -1
  211. package/hooks/useAutocomplete/useAutocomplete.d.ts +1 -1
  212. package/hooks/useAutocomplete/useAutocomplete.js +6 -16
  213. package/hooks/useAutocomplete/useAutocomplete.js.map +1 -1
  214. package/hooks/useDataList/functions/getData.js +2 -11
  215. package/hooks/useDataList/functions/getData.js.map +1 -1
  216. package/hooks/useDataList/functions/getError.js +2 -11
  217. package/hooks/useDataList/functions/getError.js.map +1 -1
  218. package/hooks/useDataList/functions/getMeta.js +2 -11
  219. package/hooks/useDataList/functions/getMeta.js.map +1 -1
  220. package/hooks/useDataList/functions/index.d.ts +3 -3
  221. package/hooks/useDataList/functions/index.js +3 -27
  222. package/hooks/useDataList/functions/index.js.map +1 -1
  223. package/hooks/useDataList/functions/searchDataByKey.js +4 -10
  224. package/hooks/useDataList/functions/searchDataByKey.js.map +1 -1
  225. package/hooks/useDataList/index.d.ts +1 -1
  226. package/hooks/useDataList/index.js +1 -12
  227. package/hooks/useDataList/index.js.map +1 -1
  228. package/hooks/useDataList/useDataList.d.ts +2 -3
  229. package/hooks/useDataList/useDataList.js +74 -94
  230. package/hooks/useDataList/useDataList.js.map +1 -1
  231. package/hooks/useDataList/utils/index.d.ts +1 -2
  232. package/hooks/useDataList/utils/index.js +1 -20
  233. package/hooks/useDataList/utils/index.js.map +1 -1
  234. package/hooks/useDataList/utils/prepareLoadListParams.js +10 -16
  235. package/hooks/useDataList/utils/prepareLoadListParams.js.map +1 -1
  236. package/hooks/useHandler.js +7 -12
  237. package/hooks/useHandler.js.map +1 -1
  238. package/hooks/useHandlers.d.ts +3 -3
  239. package/hooks/useHandlers.js +11 -17
  240. package/hooks/useHandlers.js.map +1 -1
  241. package/hooks/useRegisterLegacyPlugin.d.ts +2 -0
  242. package/hooks/useRegisterLegacyPlugin.js +11 -0
  243. package/hooks/useRegisterLegacyPlugin.js.map +1 -0
  244. package/hooks/useUi.d.ts +1 -1
  245. package/hooks/useUi.js +4 -10
  246. package/hooks/useUi.js.map +1 -1
  247. package/i18n/i18n.js +5 -13
  248. package/i18n/i18n.js.map +1 -1
  249. package/i18n/index.d.ts +1 -1
  250. package/i18n/index.js +1 -13
  251. package/i18n/index.js.map +1 -1
  252. package/index.d.ts +23 -14
  253. package/index.js +25 -165
  254. package/index.js.map +1 -1
  255. package/package.json +26 -29
  256. package/plugins/AddQuerySelectionPlugin.d.ts +2 -2
  257. package/plugins/AddQuerySelectionPlugin.js +61 -107
  258. package/plugins/AddQuerySelectionPlugin.js.map +1 -1
  259. package/plugins/ApolloCacheObjectIdPlugin.js +12 -31
  260. package/plugins/ApolloCacheObjectIdPlugin.js.map +1 -1
  261. package/plugins/ApolloDynamicLink.d.ts +3 -2
  262. package/plugins/ApolloDynamicLink.js +19 -46
  263. package/plugins/ApolloDynamicLink.js.map +1 -1
  264. package/plugins/ApolloLinkPlugin.d.ts +1 -1
  265. package/plugins/ApolloLinkPlugin.js +18 -37
  266. package/plugins/ApolloLinkPlugin.js.map +1 -1
  267. package/plugins/ConsoleLinkPlugin.d.ts +1 -1
  268. package/plugins/ConsoleLinkPlugin.js +20 -41
  269. package/plugins/ConsoleLinkPlugin.js.map +1 -1
  270. package/plugins/NetworkErrorLinkPlugin/ErrorOverlay.d.ts +8 -13
  271. package/plugins/NetworkErrorLinkPlugin/ErrorOverlay.js +35 -58
  272. package/plugins/NetworkErrorLinkPlugin/ErrorOverlay.js.map +1 -1
  273. package/plugins/NetworkErrorLinkPlugin/GqlErrorOverlay.d.ts +14 -0
  274. package/plugins/NetworkErrorLinkPlugin/GqlErrorOverlay.js +31 -0
  275. package/plugins/NetworkErrorLinkPlugin/GqlErrorOverlay.js.map +1 -0
  276. package/plugins/NetworkErrorLinkPlugin/LocalAwsLambdaTimeoutMessage.d.ts +2 -0
  277. package/plugins/NetworkErrorLinkPlugin/LocalAwsLambdaTimeoutMessage.js +31 -0
  278. package/plugins/NetworkErrorLinkPlugin/LocalAwsLambdaTimeoutMessage.js.map +1 -0
  279. package/plugins/NetworkErrorLinkPlugin/StyledComponents.d.ts +4 -5
  280. package/plugins/NetworkErrorLinkPlugin/StyledComponents.js +68 -12
  281. package/plugins/NetworkErrorLinkPlugin/StyledComponents.js.map +1 -1
  282. package/plugins/NetworkErrorLinkPlugin/Typography.d.ts +8 -0
  283. package/plugins/NetworkErrorLinkPlugin/Typography.js +18 -0
  284. package/plugins/NetworkErrorLinkPlugin/Typography.js.map +1 -0
  285. package/plugins/NetworkErrorLinkPlugin/createErrorOverlay.d.ts +3 -3
  286. package/plugins/NetworkErrorLinkPlugin/createErrorOverlay.js +10 -20
  287. package/plugins/NetworkErrorLinkPlugin/createErrorOverlay.js.map +1 -1
  288. package/plugins/NetworkErrorLinkPlugin.d.ts +4 -1
  289. package/plugins/NetworkErrorLinkPlugin.js +60 -37
  290. package/plugins/NetworkErrorLinkPlugin.js.map +1 -1
  291. package/plugins/OmitTypenameLinkPlugin.d.ts +1 -1
  292. package/plugins/OmitTypenameLinkPlugin.js +11 -30
  293. package/plugins/OmitTypenameLinkPlugin.js.map +1 -1
  294. package/plugins/TenantHeaderLinkPlugin.d.ts +3 -3
  295. package/plugins/TenantHeaderLinkPlugin.js +29 -48
  296. package/plugins/TenantHeaderLinkPlugin.js.map +1 -1
  297. package/plugins/components/Image.d.ts +6 -0
  298. package/plugins/components/Image.js +19 -0
  299. package/plugins/components/Image.js.map +1 -0
  300. package/plugins/image.d.ts +1 -1
  301. package/plugins/image.js +46 -53
  302. package/plugins/image.js.map +1 -1
  303. package/plugins/index.d.ts +5 -5
  304. package/plugins/index.js +31 -53
  305. package/plugins/index.js.map +1 -1
  306. package/presentation/localStorage/index.d.ts +3 -0
  307. package/presentation/localStorage/index.js +5 -0
  308. package/presentation/localStorage/index.js.map +1 -0
  309. package/presentation/localStorage/useLocalStorage.d.ts +6 -0
  310. package/presentation/localStorage/useLocalStorage.js +21 -0
  311. package/presentation/localStorage/useLocalStorage.js.map +1 -0
  312. package/presentation/localStorage/useLocalStorageValue.d.ts +1 -0
  313. package/presentation/localStorage/useLocalStorageValue.js +20 -0
  314. package/presentation/localStorage/useLocalStorageValue.js.map +1 -0
  315. package/presentation/localStorage/useLocalStorageValues.d.ts +5 -0
  316. package/presentation/localStorage/useLocalStorageValues.js +39 -0
  317. package/presentation/localStorage/useLocalStorageValues.js.map +1 -0
  318. package/presentation/router/RouteElementRegistry.d.ts +14 -0
  319. package/presentation/router/RouteElementRegistry.js +32 -0
  320. package/presentation/router/RouteElementRegistry.js.map +1 -0
  321. package/presentation/router/abstractions.d.ts +13 -0
  322. package/presentation/router/abstractions.js +4 -0
  323. package/presentation/router/abstractions.js.map +1 -0
  324. package/presentation/router/components/RouteContent.d.ts +2 -0
  325. package/presentation/router/components/RouteContent.js +17 -0
  326. package/presentation/router/components/RouteContent.js.map +1 -0
  327. package/presentation/router/components/RouteLink.d.ts +50 -0
  328. package/presentation/router/components/RouteLink.js +22 -0
  329. package/presentation/router/components/RouteLink.js.map +1 -0
  330. package/presentation/router/components/SimpleLink.d.ts +44 -0
  331. package/presentation/router/components/SimpleLink.js +30 -0
  332. package/presentation/router/components/SimpleLink.js.map +1 -0
  333. package/presentation/router/hooks/useRoute.d.ts +6 -0
  334. package/presentation/router/hooks/useRoute.js +30 -0
  335. package/presentation/router/hooks/useRoute.js.map +1 -0
  336. package/presentation/router/hooks/useRouter.d.ts +7 -0
  337. package/presentation/router/hooks/useRouter.js +26 -0
  338. package/presentation/router/hooks/useRouter.js.map +1 -0
  339. package/presentation/router/index.d.ts +4 -0
  340. package/presentation/router/index.js +5 -0
  341. package/presentation/router/index.js.map +1 -0
  342. package/presentation/router/types.d.ts +5 -0
  343. package/presentation/router/types.js +3 -0
  344. package/presentation/router/types.js.map +1 -0
  345. package/react-butterfiles/Files.d.ts +69 -0
  346. package/react-butterfiles/Files.js +227 -0
  347. package/react-butterfiles/Files.js.map +1 -0
  348. package/react-butterfiles/file.todo +1 -0
  349. package/react-butterfiles/index.d.ts +2 -0
  350. package/react-butterfiles/index.js +4 -0
  351. package/react-butterfiles/index.js.map +1 -0
  352. package/react-butterfiles/utils/generateId.d.ts +1 -0
  353. package/react-butterfiles/utils/generateId.js +5 -0
  354. package/react-butterfiles/utils/generateId.js.map +1 -0
  355. package/react-butterfiles/utils/readFileContent.d.ts +1 -0
  356. package/react-butterfiles/utils/readFileContent.js +15 -0
  357. package/react-butterfiles/utils/readFileContent.js.map +1 -0
  358. package/renderApp.d.ts +1 -1
  359. package/renderApp.js +4 -11
  360. package/renderApp.js.map +1 -1
  361. package/router.d.ts +5 -0
  362. package/router.js +8 -0
  363. package/router.js.map +1 -0
  364. package/shared/di/DiContainerProvider.d.ts +8 -0
  365. package/shared/di/DiContainerProvider.js +17 -0
  366. package/shared/di/DiContainerProvider.js.map +1 -0
  367. package/shared/di/createFeature.d.ts +11 -0
  368. package/shared/di/createFeature.js +11 -0
  369. package/shared/di/createFeature.js.map +1 -0
  370. package/shared/di/useFeature.d.ts +2 -0
  371. package/shared/di/useFeature.js +18 -0
  372. package/shared/di/useFeature.js.map +1 -0
  373. package/types.d.ts +16 -13
  374. package/types.js +1 -12
  375. package/types.js.map +1 -1
  376. package/utils/createGenericContext.d.ts +13 -0
  377. package/utils/createGenericContext.js +25 -0
  378. package/utils/createGenericContext.js.map +1 -0
  379. package/utils/createHashing.d.ts +2 -0
  380. package/utils/createHashing.js +18 -0
  381. package/utils/createHashing.js.map +1 -0
  382. package/utils/index.d.ts +2 -8
  383. package/utils/index.js +2 -93
  384. package/utils/index.js.map +1 -1
  385. package/utils/legacyPluginToReactComponent.d.ts +7 -0
  386. package/utils/legacyPluginToReactComponent.js +14 -0
  387. package/utils/legacyPluginToReactComponent.js.map +1 -0
  388. package/components/Routes.d.ts +0 -2
  389. package/components/Routes.js +0 -46
  390. package/components/Routes.js.map +0 -1
  391. package/components/View.d.ts +0 -8
  392. package/components/View.js +0 -31
  393. package/components/View.js.map +0 -1
  394. package/core/AddRoute.d.ts +0 -17
  395. package/core/AddRoute.js +0 -21
  396. package/core/AddRoute.js.map +0 -1
  397. package/hooks/useDataList/utils/redirectToRouteWithQueryParams.d.ts +0 -14
  398. package/hooks/useDataList/utils/redirectToRouteWithQueryParams.js +0 -30
  399. package/hooks/useDataList/utils/redirectToRouteWithQueryParams.js.map +0 -1
  400. package/hooks/useDataList/utils/types.d.ts +0 -40
  401. package/hooks/useDataList/utils/types.js +0 -7
  402. package/hooks/useDataList/utils/types.js.map +0 -1
  403. package/plugins/LocaleHeaderLinkPlugin.d.ts +0 -10
  404. package/plugins/LocaleHeaderLinkPlugin.js +0 -49
  405. package/plugins/LocaleHeaderLinkPlugin.js.map +0 -1
  406. package/plugins/RoutePlugin.d.ts +0 -12
  407. package/plugins/RoutePlugin.js +0 -35
  408. package/plugins/RoutePlugin.js.map +0 -1
  409. package/plugins/ViewPlugin.d.ts +0 -14
  410. package/plugins/ViewPlugin.js +0 -40
  411. package/plugins/ViewPlugin.js.map +0 -1
  412. package/utils/getApiUrl.d.ts +0 -1
  413. package/utils/getApiUrl.js +0 -12
  414. package/utils/getApiUrl.js.map +0 -1
  415. package/utils/getGqlApiUrl.d.ts +0 -1
  416. package/utils/getGqlApiUrl.js +0 -12
  417. package/utils/getGqlApiUrl.js.map +0 -1
  418. package/utils/getHeadlessCmsGqlApiUrl.d.ts +0 -5
  419. package/utils/getHeadlessCmsGqlApiUrl.js +0 -18
  420. package/utils/getHeadlessCmsGqlApiUrl.js.map +0 -1
  421. package/utils/getLocaleCode.d.ts +0 -6
  422. package/utils/getLocaleCode.js +0 -43
  423. package/utils/getLocaleCode.js.map +0 -1
  424. package/utils/getPrerenderId.d.ts +0 -6
  425. package/utils/getPrerenderId.js +0 -11
  426. package/utils/getPrerenderId.js.map +0 -1
  427. package/utils/getTenantId.d.ts +0 -6
  428. package/utils/getTenantId.js +0 -35
  429. package/utils/getTenantId.js.map +0 -1
  430. package/utils/isLocalhost.d.ts +0 -1
  431. package/utils/isLocalhost.js +0 -15
  432. package/utils/isLocalhost.js.map +0 -1
  433. package/utils/isPrerendering.d.ts +0 -1
  434. package/utils/isPrerendering.js +0 -11
  435. package/utils/isPrerendering.js.map +0 -1
@@ -0,0 +1,31 @@
1
+ import _styled from "@emotion/styled/base";
2
+ function _EMOTION_STRINGIFIED_CSS_ERROR__() { return "You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop)."; }
3
+ import React from "react";
4
+ const Code = /*#__PURE__*/_styled("code", process.env.NODE_ENV === "production" ? {
5
+ target: "e1nq64i10"
6
+ } : {
7
+ target: "e1nq64i10",
8
+ label: "Code"
9
+ })(process.env.NODE_ENV === "production" ? {
10
+ name: "rye9wa",
11
+ styles: "font-family:monospace;font-size:0.85rem;line-height:1rem"
12
+ } : {
13
+ name: "rye9wa",
14
+ styles: "font-family:monospace;font-size:0.85rem;line-height:1rem/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIkxvY2FsQXdzTGFtYmRhVGltZW91dE1lc3NhZ2UudHN4Il0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUd3QiIsImZpbGUiOiJMb2NhbEF3c0xhbWJkYVRpbWVvdXRNZXNzYWdlLnRzeCIsInNvdXJjZXNDb250ZW50IjpbImltcG9ydCBSZWFjdCBmcm9tIFwicmVhY3RcIjtcbmltcG9ydCBzdHlsZWQgZnJvbSBcIkBlbW90aW9uL3N0eWxlZFwiO1xuXG5jb25zdCBDb2RlID0gc3R5bGVkLmNvZGVgXG4gICAgZm9udC1mYW1pbHk6IG1vbm9zcGFjZTtcbiAgICBmb250LXNpemU6IDAuODVyZW07XG4gICAgbGluZS1oZWlnaHQ6IDFyZW07XG5gO1xuXG5leHBvcnQgY29uc3QgTG9jYWxBd3NMYW1iZGFUaW1lb3V0TWVzc2FnZSA9ICgpID0+IChcbiAgICA8PlxuICAgICAgICBMb2NhbCBBV1MgTGFtYmRhIGZ1bmN0aW9uIGV4ZWN1dGlvbiB0aW1lZCBvdXQuXG4gICAgICAgIDxiciAvPlxuICAgICAgICA8YnIgLz5cbiAgICAgICAgRGlkIHlvdSBzdG9wIHRoZSZuYnNwO1xuICAgICAgICA8YVxuICAgICAgICAgICAgaHJlZj17XCJodHRwczovL3d3dy53ZWJpbnkuY29tL2RvY3MvY29yZS1kZXZlbG9wbWVudC1jb25jZXB0cy9iYXNpY3Mvd2F0Y2gtY29tbWFuZFwifVxuICAgICAgICAgICAgcmVsPXtcIm5vcmVmZXJyZXIgbm9vcGVuZXJcIn1cbiAgICAgICAgICAgIHRhcmdldD17XCJfYmxhbmtcIn1cbiAgICAgICAgPlxuICAgICAgICAgICAgPENvZGU+d2ViaW55IHdhdGNoPC9Db2RlPlxuICAgICAgICA8L2E+XG4gICAgICAgICZuYnNwO2NvbW1hbmQ/IElmIHNvLCBwbGVhc2UgcmVzdGFydCB0aGUgY29tbWFuZCBvciBkZXBsb3kgeW91ciBjaGFuZ2VzIHZpYSB0aGUmbmJzcDtcbiAgICAgICAgPGFcbiAgICAgICAgICAgIGhyZWY9e1wiaHR0cHM6Ly93d3cud2ViaW55LmNvbS9kb2NzL2NvcmUtZGV2ZWxvcG1lbnQtY29uY2VwdHMvYmFzaWNzL3Byb2plY3QtZGVwbG95bWVudFwifVxuICAgICAgICAgICAgcmVsPXtcIm5vcmVmZXJyZXIgbm9vcGVuZXJcIn1cbiAgICAgICAgICAgIHRhcmdldD17XCJfYmxhbmtcIn1cbiAgICAgICAgPlxuICAgICAgICAgICAgPENvZGU+d2ViaW55IGRlcGxveTwvQ29kZT5cbiAgICAgICAgPC9hPlxuICAgICAgICAmbmJzcDtjb21tYW5kLiBGb3IgZXhhbXBsZTogPENvZGU+eWFybiB3ZWJpbnkgZGVwbG95IGFwaSAtLWVudiBkZXY8L0NvZGU+LlxuICAgICAgICA8YnIgLz5cbiAgICAgICAgPGJyIC8+XG4gICAgICAgIExlYXJuIG1vcmU6Jm5ic3A7XG4gICAgICAgIDxhXG4gICAgICAgICAgICBocmVmPXtcImh0dHBzOi8vd2ViaW55LmxpbmsvbG9jYWwtYXdzLWxhbWJkYS1kZXZlbG9wbWVudFwifVxuICAgICAgICAgICAgcmVsPXtcIm5vcmVmZXJyZXIgbm9vcGVuZXJcIn1cbiAgICAgICAgICAgIHRhcmdldD17XCJfYmxhbmtcIn1cbiAgICAgICAgPlxuICAgICAgICAgICAgaHR0cHM6Ly93ZWJpbnkubGluay9sb2NhbC1hd3MtbGFtYmRhLWRldmVsb3BtZW50XG4gICAgICAgIDwvYT5cbiAgICA8Lz5cbik7XG4iXX0= */",
15
+ toString: _EMOTION_STRINGIFIED_CSS_ERROR__
16
+ });
17
+ export const LocalAwsLambdaTimeoutMessage = () => /*#__PURE__*/React.createElement(React.Fragment, null, "Local AWS Lambda function execution timed out.", /*#__PURE__*/React.createElement("br", null), /*#__PURE__*/React.createElement("br", null), "Did you stop the\xA0", /*#__PURE__*/React.createElement("a", {
18
+ href: "https://www.webiny.com/docs/core-development-concepts/basics/watch-command",
19
+ rel: "noreferrer noopener",
20
+ target: "_blank"
21
+ }, /*#__PURE__*/React.createElement(Code, null, "webiny watch")), "\xA0command? If so, please restart the command or deploy your changes via the\xA0", /*#__PURE__*/React.createElement("a", {
22
+ href: "https://www.webiny.com/docs/core-development-concepts/basics/project-deployment",
23
+ rel: "noreferrer noopener",
24
+ target: "_blank"
25
+ }, /*#__PURE__*/React.createElement(Code, null, "webiny deploy")), "\xA0command. For example: ", /*#__PURE__*/React.createElement(Code, null, "yarn webiny deploy api --env dev"), ".", /*#__PURE__*/React.createElement("br", null), /*#__PURE__*/React.createElement("br", null), "Learn more:\xA0", /*#__PURE__*/React.createElement("a", {
26
+ href: "https://webiny.link/local-aws-lambda-development",
27
+ rel: "noreferrer noopener",
28
+ target: "_blank"
29
+ }, "https://webiny.link/local-aws-lambda-development"));
30
+
31
+ //# sourceMappingURL=LocalAwsLambdaTimeoutMessage.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["React","Code","_styled","process","env","NODE_ENV","target","label","name","styles","toString","_EMOTION_STRINGIFIED_CSS_ERROR__","LocalAwsLambdaTimeoutMessage","createElement","Fragment","href","rel"],"sources":["LocalAwsLambdaTimeoutMessage.tsx"],"sourcesContent":["import React from \"react\";\nimport styled from \"@emotion/styled\";\n\nconst Code = styled.code`\n font-family: monospace;\n font-size: 0.85rem;\n line-height: 1rem;\n`;\n\nexport const LocalAwsLambdaTimeoutMessage = () => (\n <>\n Local AWS Lambda function execution timed out.\n <br />\n <br />\n Did you stop the&nbsp;\n <a\n href={\"https://www.webiny.com/docs/core-development-concepts/basics/watch-command\"}\n rel={\"noreferrer noopener\"}\n target={\"_blank\"}\n >\n <Code>webiny watch</Code>\n </a>\n &nbsp;command? If so, please restart the command or deploy your changes via the&nbsp;\n <a\n href={\"https://www.webiny.com/docs/core-development-concepts/basics/project-deployment\"}\n rel={\"noreferrer noopener\"}\n target={\"_blank\"}\n >\n <Code>webiny deploy</Code>\n </a>\n &nbsp;command. For example: <Code>yarn webiny deploy api --env dev</Code>.\n <br />\n <br />\n Learn more:&nbsp;\n <a\n href={\"https://webiny.link/local-aws-lambda-development\"}\n rel={\"noreferrer noopener\"}\n target={\"_blank\"}\n >\n https://webiny.link/local-aws-lambda-development\n </a>\n </>\n);\n"],"mappings":";;AAAA,OAAOA,KAAK,MAAM,OAAO;AAGzB,MAAMC,IAAI,gBAAAC,OAAA,SAAAC,OAAA,CAAAC,GAAA,CAAAC,QAAA;EAAAC,MAAA;AAAA;EAAAA,MAAA;EAAAC,KAAA;AAAA,GAAAJ,OAAA,CAAAC,GAAA,CAAAC,QAAA;EAAAG,IAAA;EAAAC,MAAA;AAAA;EAAAD,IAAA;EAAAC,MAAA;EAAAC,QAAA,EAAAC;AAAA,EAIT;AAED,OAAO,MAAMC,4BAA4B,GAAGA,CAAA,kBACxCZ,KAAA,CAAAa,aAAA,CAAAb,KAAA,CAAAc,QAAA,QAAE,gDAEE,eAAAd,KAAA,CAAAa,aAAA,WAAK,CAAC,eACNb,KAAA,CAAAa,aAAA,WAAK,CAAC,wBAEN,eAAAb,KAAA,CAAAa,aAAA;EACIE,IAAI,EAAE,4EAA6E;EACnFC,GAAG,EAAE,qBAAsB;EAC3BV,MAAM,EAAE;AAAS,gBAEjBN,KAAA,CAAAa,aAAA,CAACZ,IAAI,QAAC,cAAkB,CACzB,CAAC,qFAEJ,eAAAD,KAAA,CAAAa,aAAA;EACIE,IAAI,EAAE,iFAAkF;EACxFC,GAAG,EAAE,qBAAsB;EAC3BV,MAAM,EAAE;AAAS,gBAEjBN,KAAA,CAAAa,aAAA,CAACZ,IAAI,QAAC,eAAmB,CAC1B,CAAC,8BACwB,eAAAD,KAAA,CAAAa,aAAA,CAACZ,IAAI,QAAC,kCAAsC,CAAC,KACzE,eAAAD,KAAA,CAAAa,aAAA,WAAK,CAAC,eACNb,KAAA,CAAAa,aAAA,WAAK,CAAC,mBAEN,eAAAb,KAAA,CAAAa,aAAA;EACIE,IAAI,EAAE,kDAAmD;EACzDC,GAAG,EAAE,qBAAsB;EAC3BV,MAAM,EAAE;AAAS,GACpB,kDAEE,CACL,CACL","ignoreList":[]}
@@ -1,9 +1,8 @@
1
- /// <reference types="react" />
2
1
  export declare const OverlayWrapper: import("@emotion/styled").StyledComponent<{
3
- theme?: import("@emotion/react").Theme | undefined;
4
- as?: import("react").ElementType<any, keyof import("react").JSX.IntrinsicElements> | undefined;
2
+ theme?: import("@emotion/react").Theme;
3
+ as?: React.ElementType;
5
4
  }, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
6
5
  export declare const Pre: import("@emotion/styled").StyledComponent<{
7
- theme?: import("@emotion/react").Theme | undefined;
8
- as?: import("react").ElementType<any, keyof import("react").JSX.IntrinsicElements> | undefined;
6
+ theme?: import("@emotion/react").Theme;
7
+ as?: React.ElementType;
9
8
  }, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLPreElement>, HTMLPreElement>, {}>;
@@ -1,22 +1,78 @@
1
- "use strict";
2
-
3
- var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
4
- Object.defineProperty(exports, "__esModule", {
5
- value: true
6
- });
7
- exports.Pre = exports.OverlayWrapper = void 0;
8
- var _base = _interopRequireDefault(require("@emotion/styled/base"));
9
- var OverlayWrapper = exports.OverlayWrapper = /*#__PURE__*/(0, _base.default)("div", process.env.NODE_ENV === "production" ? {
1
+ import _styled from "@emotion/styled/base";
2
+ export const OverlayWrapper = /*#__PURE__*/_styled("div", process.env.NODE_ENV === "production" ? {
10
3
  target: "e1rvk94r1"
11
4
  } : {
12
5
  target: "e1rvk94r1",
13
6
  label: "OverlayWrapper"
14
- })("\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", process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIlN0eWxlZENvbXBvbmVudHMudHN4Il0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUU4QiIsImZpbGUiOiJTdHlsZWRDb21wb25lbnRzLnRzeCIsInNvdXJjZXNDb250ZW50IjpbImltcG9ydCBzdHlsZWQgZnJvbSBcIkBlbW90aW9uL3N0eWxlZFwiO1xuXG5leHBvcnQgY29uc3QgT3ZlcmxheVdyYXBwZXIgPSBzdHlsZWQoXCJkaXZcIikoYFxuICAgIHdpZHRoOiAxMDB2dztcbiAgICBoZWlnaHQ6IDEwMHZoO1xuICAgIHBvc2l0aW9uOiBmaXhlZDtcbiAgICB0b3A6IDA7XG4gICAgbGVmdDogMDtcbiAgICB6LWluZGV4OiAxMDU7IC8vIFRoZSBoaWdoZXN0IHotaW5kZXggdmFsdWUgaXMgMTAwIGZvciBEaWFsb2dzXG4gICAgXG4gICAgLmlubmVyIHtcbiAgICAgICAgYm94LXNpemluZzogYm9yZGVyLWJveDtcbiAgICAgICAgZGlzcGxheTogZmxleDtcbiAgICAgICAgZmxleC1kaXJlY3Rpb246IGNvbHVtbjtcbiAgICAgICAgd2lkdGg6IDEwMCU7XG4gICAgICAgIGhlaWdodDogMTAwJTtcbiAgICAgICAgb3ZlcmZsb3c6IGF1dG87XG4gICAgICAgIGJhY2tncm91bmQtY29sb3I6IHdoaXRlO1xuICAgICAgICBwYWRkaW5nOiAxcmVtO1xuICAgIH1cbiAgICBcbiAgICAuaGVhZGVyIHtcbiAgICAgICAgZGlzcGxheTogZmxleDtcbiAgICAgICAganVzdGlmeS1jb250ZW50OiBzcGFjZS1iZXR3ZWVuO1xuICAgICAgICBhbGlnbi1pdGVtczogY2VudGVyO1xuICAgICAgICBtYXJnaW4tYm90dG9tOiAxcmVtO1xuICAgICAgICAuaGVhZGVyX190aXRsZSB7XG4gICAgICAgICAgICBjb2xvcjogdmFyKC0tbWRjLXRoZW1lLWVycm9yKTtcbiAgICAgICAgfVxuICAgIH1cbiAgICBcbiAgICAuYm9keSB7XG4gICAgICAgIGZsZXgtZ3JvdzogMTtcbiAgICAgICAgLmJvZHlfX3N1bW1hcnkge1xuICAgICAgICAgICAgbWFyZ2luLWJvdHRvbTogMXJlbTtcbiAgICAgICAgfVxuICAgIH1cbiAgICBcbiAgICAuZm9vdGVyIHtcbiAgICAgICAgY29sb3I6IHZhcigtLW1kYy10aGVtZS10ZXh0LXNlY29uZGFyeS1vbi1iYWNrZ3JvdW5kKTtcbiAgICAgICAgXG4gICAgICAgIC5oaWdobGlnaHQge1xuICAgICAgICAgICAgYmFja2dyb3VuZC1jb2xvcjogcmdiYSgyNTEsIDI0NSwgMTgwLCAwLjUpO1xuICAgICAgICAgICAgcGFkZGluZzogMCA0cHg7XG4gICAgICAgICAgICBib3JkZXItcmFkaXVzOiA2cHg7XG4gICAgICAgICAgICBmb250LWZhbWlseTogbW9ub3NwYWNlO1xuICAgICAgICB9XG4gICAgfVxuYCk7XG5cbmV4cG9ydCBjb25zdCBQcmUgPSBzdHlsZWQoXCJwcmVcIikoYFxuICAgIHBvc2l0aW9uOiByZWxhdGl2ZTtcbiAgICBkaXNwbGF5OiBibG9jaztcbiAgICBwYWRkaW5nOiAwLjVlbTtcbiAgICBtYXJnaW4tdG9wOiAwLjVlbTtcbiAgICBtYXJnaW4tYm90dG9tOiAwLjVlbTtcbiAgICBvdmVyZmxvdy14OiBhdXRvO1xuICAgIHdoaXRlLXNwYWNlOiBwcmUtd3JhcDtcbiAgICBib3JkZXItcmFkaXVzOiAwLjI1cmVtO1xuICAgIGJhY2tncm91bmQtY29sb3I6IHJnYmEoMjUxLCAyNDUsIDE4MCwgMC4zKTtcbiAgICBjb2xvcjogaW5oZXJpdDtcbiAgICBcbiAgICBjb2RlIHtcbiAgICAgICAgZm9udC1mYW1pbHk6IG1vbm9zcGFjZTtcbiAgICAgICAgZm9udC1zaXplOiAwLjg1cmVtO1xuICAgICAgICBsaW5lLWhlaWdodDogMXJlbTtcbiAgICB9XG5gKTtcbiJdfQ== */");
15
- var Pre = exports.Pre = /*#__PURE__*/(0, _base.default)("pre", process.env.NODE_ENV === "production" ? {
7
+ })(`
8
+ width: 100vw;
9
+ height: 100vh;
10
+ position: fixed;
11
+ top: 0;
12
+ left: 0;
13
+ z-index: 105; // The highest z-index value is 100 for Dialogs
14
+
15
+ .inner {
16
+ box-sizing: border-box;
17
+ display: flex;
18
+ flex-direction: column;
19
+ width: 100%;
20
+ height: 100%;
21
+ overflow: auto;
22
+ background-color: white;
23
+ padding: 1rem;
24
+ }
25
+
26
+ .header {
27
+ display: flex;
28
+ justify-content: space-between;
29
+ align-items: center;
30
+ margin-bottom: 1rem;
31
+ .header__title {
32
+ color: var(--mdc-theme-error);
33
+ }
34
+ }
35
+
36
+ .body {
37
+ grow: 1;
38
+ .body__summary {
39
+ margin-bottom: 1rem;
40
+ }
41
+ }
42
+
43
+ .footer {
44
+ color: var(--mdc-theme-text-secondary-on-background);
45
+
46
+ .highlight {
47
+ background-color: rgba(251, 245, 180, 0.5);
48
+ padding: 0 4px;
49
+ border-radius: 6px;
50
+ font-family: monospace;
51
+ }
52
+ }
53
+ `, process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIlN0eWxlZENvbXBvbmVudHMudHN4Il0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUU4QiIsImZpbGUiOiJTdHlsZWRDb21wb25lbnRzLnRzeCIsInNvdXJjZXNDb250ZW50IjpbImltcG9ydCBzdHlsZWQgZnJvbSBcIkBlbW90aW9uL3N0eWxlZFwiO1xuXG5leHBvcnQgY29uc3QgT3ZlcmxheVdyYXBwZXIgPSBzdHlsZWQoXCJkaXZcIikoYFxuICAgIHdpZHRoOiAxMDB2dztcbiAgICBoZWlnaHQ6IDEwMHZoO1xuICAgIHBvc2l0aW9uOiBmaXhlZDtcbiAgICB0b3A6IDA7XG4gICAgbGVmdDogMDtcbiAgICB6LWluZGV4OiAxMDU7IC8vIFRoZSBoaWdoZXN0IHotaW5kZXggdmFsdWUgaXMgMTAwIGZvciBEaWFsb2dzXG4gICAgXG4gICAgLmlubmVyIHtcbiAgICAgICAgYm94LXNpemluZzogYm9yZGVyLWJveDtcbiAgICAgICAgZGlzcGxheTogZmxleDtcbiAgICAgICAgZmxleC1kaXJlY3Rpb246IGNvbHVtbjtcbiAgICAgICAgd2lkdGg6IDEwMCU7XG4gICAgICAgIGhlaWdodDogMTAwJTtcbiAgICAgICAgb3ZlcmZsb3c6IGF1dG87XG4gICAgICAgIGJhY2tncm91bmQtY29sb3I6IHdoaXRlO1xuICAgICAgICBwYWRkaW5nOiAxcmVtO1xuICAgIH1cbiAgICBcbiAgICAuaGVhZGVyIHtcbiAgICAgICAgZGlzcGxheTogZmxleDtcbiAgICAgICAganVzdGlmeS1jb250ZW50OiBzcGFjZS1iZXR3ZWVuO1xuICAgICAgICBhbGlnbi1pdGVtczogY2VudGVyO1xuICAgICAgICBtYXJnaW4tYm90dG9tOiAxcmVtO1xuICAgICAgICAuaGVhZGVyX190aXRsZSB7XG4gICAgICAgICAgICBjb2xvcjogdmFyKC0tbWRjLXRoZW1lLWVycm9yKTtcbiAgICAgICAgfVxuICAgIH1cbiAgICBcbiAgICAuYm9keSB7XG4gICAgICAgIGdyb3c6IDE7XG4gICAgICAgIC5ib2R5X19zdW1tYXJ5IHtcbiAgICAgICAgICAgIG1hcmdpbi1ib3R0b206IDFyZW07XG4gICAgICAgIH1cbiAgICB9XG4gICAgXG4gICAgLmZvb3RlciB7XG4gICAgICAgIGNvbG9yOiB2YXIoLS1tZGMtdGhlbWUtdGV4dC1zZWNvbmRhcnktb24tYmFja2dyb3VuZCk7XG4gICAgICAgIFxuICAgICAgICAuaGlnaGxpZ2h0IHtcbiAgICAgICAgICAgIGJhY2tncm91bmQtY29sb3I6IHJnYmEoMjUxLCAyNDUsIDE4MCwgMC41KTtcbiAgICAgICAgICAgIHBhZGRpbmc6IDAgNHB4O1xuICAgICAgICAgICAgYm9yZGVyLXJhZGl1czogNnB4O1xuICAgICAgICAgICAgZm9udC1mYW1pbHk6IG1vbm9zcGFjZTtcbiAgICAgICAgfVxuICAgIH1cbmApO1xuXG5leHBvcnQgY29uc3QgUHJlID0gc3R5bGVkKFwicHJlXCIpKGBcbiAgICBwb3NpdGlvbjogcmVsYXRpdmU7XG4gICAgZGlzcGxheTogYmxvY2s7XG4gICAgcGFkZGluZzogMC41ZW07XG4gICAgbWFyZ2luLXRvcDogMC41ZW07XG4gICAgbWFyZ2luLWJvdHRvbTogMC41ZW07XG4gICAgb3ZlcmZsb3cteDogYXV0bztcbiAgICB3aGl0ZS1zcGFjZTogcHJlLXdyYXA7XG4gICAgYm9yZGVyLXJhZGl1czogMC4yNXJlbTtcbiAgICBiYWNrZ3JvdW5kLWNvbG9yOiByZ2JhKDI1MSwgMjQ1LCAxODAsIDAuMyk7XG4gICAgY29sb3I6IGluaGVyaXQ7XG4gICAgXG4gICAgY29kZSB7XG4gICAgICAgIGZvbnQtZmFtaWx5OiBtb25vc3BhY2U7XG4gICAgICAgIGZvbnQtc2l6ZTogMC44NXJlbTtcbiAgICAgICAgbGluZS1oZWlnaHQ6IDFyZW07XG4gICAgfVxuYCk7XG4iXX0= */");
54
+ export const Pre = /*#__PURE__*/_styled("pre", process.env.NODE_ENV === "production" ? {
16
55
  target: "e1rvk94r0"
17
56
  } : {
18
57
  target: "e1rvk94r0",
19
58
  label: "Pre"
20
- })("\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", process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIlN0eWxlZENvbXBvbmVudHMudHN4Il0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQWtEbUIiLCJmaWxlIjoiU3R5bGVkQ29tcG9uZW50cy50c3giLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgc3R5bGVkIGZyb20gXCJAZW1vdGlvbi9zdHlsZWRcIjtcblxuZXhwb3J0IGNvbnN0IE92ZXJsYXlXcmFwcGVyID0gc3R5bGVkKFwiZGl2XCIpKGBcbiAgICB3aWR0aDogMTAwdnc7XG4gICAgaGVpZ2h0OiAxMDB2aDtcbiAgICBwb3NpdGlvbjogZml4ZWQ7XG4gICAgdG9wOiAwO1xuICAgIGxlZnQ6IDA7XG4gICAgei1pbmRleDogMTA1OyAvLyBUaGUgaGlnaGVzdCB6LWluZGV4IHZhbHVlIGlzIDEwMCBmb3IgRGlhbG9nc1xuICAgIFxuICAgIC5pbm5lciB7XG4gICAgICAgIGJveC1zaXppbmc6IGJvcmRlci1ib3g7XG4gICAgICAgIGRpc3BsYXk6IGZsZXg7XG4gICAgICAgIGZsZXgtZGlyZWN0aW9uOiBjb2x1bW47XG4gICAgICAgIHdpZHRoOiAxMDAlO1xuICAgICAgICBoZWlnaHQ6IDEwMCU7XG4gICAgICAgIG92ZXJmbG93OiBhdXRvO1xuICAgICAgICBiYWNrZ3JvdW5kLWNvbG9yOiB3aGl0ZTtcbiAgICAgICAgcGFkZGluZzogMXJlbTtcbiAgICB9XG4gICAgXG4gICAgLmhlYWRlciB7XG4gICAgICAgIGRpc3BsYXk6IGZsZXg7XG4gICAgICAgIGp1c3RpZnktY29udGVudDogc3BhY2UtYmV0d2VlbjtcbiAgICAgICAgYWxpZ24taXRlbXM6IGNlbnRlcjtcbiAgICAgICAgbWFyZ2luLWJvdHRvbTogMXJlbTtcbiAgICAgICAgLmhlYWRlcl9fdGl0bGUge1xuICAgICAgICAgICAgY29sb3I6IHZhcigtLW1kYy10aGVtZS1lcnJvcik7XG4gICAgICAgIH1cbiAgICB9XG4gICAgXG4gICAgLmJvZHkge1xuICAgICAgICBmbGV4LWdyb3c6IDE7XG4gICAgICAgIC5ib2R5X19zdW1tYXJ5IHtcbiAgICAgICAgICAgIG1hcmdpbi1ib3R0b206IDFyZW07XG4gICAgICAgIH1cbiAgICB9XG4gICAgXG4gICAgLmZvb3RlciB7XG4gICAgICAgIGNvbG9yOiB2YXIoLS1tZGMtdGhlbWUtdGV4dC1zZWNvbmRhcnktb24tYmFja2dyb3VuZCk7XG4gICAgICAgIFxuICAgICAgICAuaGlnaGxpZ2h0IHtcbiAgICAgICAgICAgIGJhY2tncm91bmQtY29sb3I6IHJnYmEoMjUxLCAyNDUsIDE4MCwgMC41KTtcbiAgICAgICAgICAgIHBhZGRpbmc6IDAgNHB4O1xuICAgICAgICAgICAgYm9yZGVyLXJhZGl1czogNnB4O1xuICAgICAgICAgICAgZm9udC1mYW1pbHk6IG1vbm9zcGFjZTtcbiAgICAgICAgfVxuICAgIH1cbmApO1xuXG5leHBvcnQgY29uc3QgUHJlID0gc3R5bGVkKFwicHJlXCIpKGBcbiAgICBwb3NpdGlvbjogcmVsYXRpdmU7XG4gICAgZGlzcGxheTogYmxvY2s7XG4gICAgcGFkZGluZzogMC41ZW07XG4gICAgbWFyZ2luLXRvcDogMC41ZW07XG4gICAgbWFyZ2luLWJvdHRvbTogMC41ZW07XG4gICAgb3ZlcmZsb3cteDogYXV0bztcbiAgICB3aGl0ZS1zcGFjZTogcHJlLXdyYXA7XG4gICAgYm9yZGVyLXJhZGl1czogMC4yNXJlbTtcbiAgICBiYWNrZ3JvdW5kLWNvbG9yOiByZ2JhKDI1MSwgMjQ1LCAxODAsIDAuMyk7XG4gICAgY29sb3I6IGluaGVyaXQ7XG4gICAgXG4gICAgY29kZSB7XG4gICAgICAgIGZvbnQtZmFtaWx5OiBtb25vc3BhY2U7XG4gICAgICAgIGZvbnQtc2l6ZTogMC44NXJlbTtcbiAgICAgICAgbGluZS1oZWlnaHQ6IDFyZW07XG4gICAgfVxuYCk7XG4iXX0= */");
59
+ })(`
60
+ position: relative;
61
+ display: block;
62
+ padding: 0.5em;
63
+ margin-top: 0.5em;
64
+ margin-bottom: 0.5em;
65
+ overflow-x: auto;
66
+ white-space: pre-wrap;
67
+ border-radius: 0.25rem;
68
+ background-color: rgba(251, 245, 180, 0.3);
69
+ color: inherit;
70
+
71
+ code {
72
+ font-family: monospace;
73
+ font-size: 0.85rem;
74
+ line-height: 1rem;
75
+ }
76
+ `, process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIlN0eWxlZENvbXBvbmVudHMudHN4Il0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQWtEbUIiLCJmaWxlIjoiU3R5bGVkQ29tcG9uZW50cy50c3giLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgc3R5bGVkIGZyb20gXCJAZW1vdGlvbi9zdHlsZWRcIjtcblxuZXhwb3J0IGNvbnN0IE92ZXJsYXlXcmFwcGVyID0gc3R5bGVkKFwiZGl2XCIpKGBcbiAgICB3aWR0aDogMTAwdnc7XG4gICAgaGVpZ2h0OiAxMDB2aDtcbiAgICBwb3NpdGlvbjogZml4ZWQ7XG4gICAgdG9wOiAwO1xuICAgIGxlZnQ6IDA7XG4gICAgei1pbmRleDogMTA1OyAvLyBUaGUgaGlnaGVzdCB6LWluZGV4IHZhbHVlIGlzIDEwMCBmb3IgRGlhbG9nc1xuICAgIFxuICAgIC5pbm5lciB7XG4gICAgICAgIGJveC1zaXppbmc6IGJvcmRlci1ib3g7XG4gICAgICAgIGRpc3BsYXk6IGZsZXg7XG4gICAgICAgIGZsZXgtZGlyZWN0aW9uOiBjb2x1bW47XG4gICAgICAgIHdpZHRoOiAxMDAlO1xuICAgICAgICBoZWlnaHQ6IDEwMCU7XG4gICAgICAgIG92ZXJmbG93OiBhdXRvO1xuICAgICAgICBiYWNrZ3JvdW5kLWNvbG9yOiB3aGl0ZTtcbiAgICAgICAgcGFkZGluZzogMXJlbTtcbiAgICB9XG4gICAgXG4gICAgLmhlYWRlciB7XG4gICAgICAgIGRpc3BsYXk6IGZsZXg7XG4gICAgICAgIGp1c3RpZnktY29udGVudDogc3BhY2UtYmV0d2VlbjtcbiAgICAgICAgYWxpZ24taXRlbXM6IGNlbnRlcjtcbiAgICAgICAgbWFyZ2luLWJvdHRvbTogMXJlbTtcbiAgICAgICAgLmhlYWRlcl9fdGl0bGUge1xuICAgICAgICAgICAgY29sb3I6IHZhcigtLW1kYy10aGVtZS1lcnJvcik7XG4gICAgICAgIH1cbiAgICB9XG4gICAgXG4gICAgLmJvZHkge1xuICAgICAgICBncm93OiAxO1xuICAgICAgICAuYm9keV9fc3VtbWFyeSB7XG4gICAgICAgICAgICBtYXJnaW4tYm90dG9tOiAxcmVtO1xuICAgICAgICB9XG4gICAgfVxuICAgIFxuICAgIC5mb290ZXIge1xuICAgICAgICBjb2xvcjogdmFyKC0tbWRjLXRoZW1lLXRleHQtc2Vjb25kYXJ5LW9uLWJhY2tncm91bmQpO1xuICAgICAgICBcbiAgICAgICAgLmhpZ2hsaWdodCB7XG4gICAgICAgICAgICBiYWNrZ3JvdW5kLWNvbG9yOiByZ2JhKDI1MSwgMjQ1LCAxODAsIDAuNSk7XG4gICAgICAgICAgICBwYWRkaW5nOiAwIDRweDtcbiAgICAgICAgICAgIGJvcmRlci1yYWRpdXM6IDZweDtcbiAgICAgICAgICAgIGZvbnQtZmFtaWx5OiBtb25vc3BhY2U7XG4gICAgICAgIH1cbiAgICB9XG5gKTtcblxuZXhwb3J0IGNvbnN0IFByZSA9IHN0eWxlZChcInByZVwiKShgXG4gICAgcG9zaXRpb246IHJlbGF0aXZlO1xuICAgIGRpc3BsYXk6IGJsb2NrO1xuICAgIHBhZGRpbmc6IDAuNWVtO1xuICAgIG1hcmdpbi10b3A6IDAuNWVtO1xuICAgIG1hcmdpbi1ib3R0b206IDAuNWVtO1xuICAgIG92ZXJmbG93LXg6IGF1dG87XG4gICAgd2hpdGUtc3BhY2U6IHByZS13cmFwO1xuICAgIGJvcmRlci1yYWRpdXM6IDAuMjVyZW07XG4gICAgYmFja2dyb3VuZC1jb2xvcjogcmdiYSgyNTEsIDI0NSwgMTgwLCAwLjMpO1xuICAgIGNvbG9yOiBpbmhlcml0O1xuICAgIFxuICAgIGNvZGUge1xuICAgICAgICBmb250LWZhbWlseTogbW9ub3NwYWNlO1xuICAgICAgICBmb250LXNpemU6IDAuODVyZW07XG4gICAgICAgIGxpbmUtaGVpZ2h0OiAxcmVtO1xuICAgIH1cbmApO1xuIl19 */");
21
77
 
22
78
  //# sourceMappingURL=StyledComponents.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["OverlayWrapper","exports","_base","default","process","env","NODE_ENV","target","label","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":";;;;;;;;AAEO,IAAMA,cAAc,GAAAC,OAAA,CAAAD,cAAA,gBAAG,IAAAE,KAAA,CAAAC,OAAA,EAAO,KAAK,EAAAC,OAAA,CAAAC,GAAA,CAAAC,QAAA;EAAAC,MAAA;AAAA;EAAAA,MAAA;EAAAC,KAAA;AAAA,EAAC,2hCAAAJ,OAAA,CAAAC,GAAA,CAAAC,QAAA,0zEA8C1C,CAAC;AAEK,IAAMG,GAAG,GAAAR,OAAA,CAAAQ,GAAA,gBAAG,IAAAP,KAAA,CAAAC,OAAA,EAAO,KAAK,EAAAC,OAAA,CAAAC,GAAA,CAAAC,QAAA;EAAAC,MAAA;AAAA;EAAAA,MAAA;EAAAC,KAAA;AAAA,EAAC,sYAAAJ,OAAA,CAAAC,GAAA,CAAAC,QAAA,0zEAiB/B,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["OverlayWrapper","_styled","process","env","NODE_ENV","target","label","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 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":";AAEA,OAAO,MAAMA,cAAc,gBAAGC,OAAA,CAAO,KAAK,EAAAC,OAAA,CAAAC,GAAA,CAAAC,QAAA;EAAAC,MAAA;AAAA;EAAAA,MAAA;EAAAC,KAAA;AAAA,EAAC,CAAC;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,EAAAJ,OAAA,CAAAC,GAAA,CAAAC,QAAA,mzEAAC;AAEF,OAAO,MAAMG,GAAG,gBAAGN,OAAA,CAAO,KAAK,EAAAC,OAAA,CAAAC,GAAA,CAAAC,QAAA;EAAAC,MAAA;AAAA;EAAAA,MAAA;EAAAC,KAAA;AAAA,EAAC,CAAC;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,EAAAJ,OAAA,CAAAC,GAAA,CAAAC,QAAA,mzEAAC","ignoreList":[]}
@@ -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,18 @@
1
+ import React from "react";
2
+ export const Typography = props => {
3
+ const {
4
+ children,
5
+ use,
6
+ className
7
+ } = props;
8
+ if (use === "headline") {
9
+ return /*#__PURE__*/React.createElement("h4", {
10
+ className: className
11
+ }, children);
12
+ }
13
+ return /*#__PURE__*/React.createElement("p", {
14
+ className: className
15
+ }, children);
16
+ };
17
+
18
+ //# sourceMappingURL=Typography.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["React","Typography","props","children","use","className","createElement"],"sources":["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"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AAUzB,OAAO,MAAMC,UAAU,GAAIC,KAAsB,IAAK;EAClD,MAAM;IAAEC,QAAQ;IAAEC,GAAG;IAAEC;EAAU,CAAC,GAAGH,KAAK;EAE1C,IAAIE,GAAG,KAAK,UAAU,EAAE;IACpB,oBAAOJ,KAAA,CAAAM,aAAA;MAAID,SAAS,EAAEA;IAAU,GAAEF,QAAa,CAAC;EACpD;EAEA,oBAAOH,KAAA,CAAAM,aAAA;IAAGD,SAAS,EAAEA;EAAU,GAAEF,QAAY,CAAC;AAClD,CAAC","ignoreList":[]}
@@ -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,32 +1,22 @@
1
- "use strict";
2
-
3
- var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
4
- Object.defineProperty(exports, "__esModule", {
5
- value: true
6
- });
7
- exports.default = void 0;
8
- var _react = _interopRequireDefault(require("react"));
9
- var _reactDom = require("react-dom");
10
- var _ErrorOverlay = _interopRequireDefault(require("./ErrorOverlay"));
11
- var createErrorOverlay = function createErrorOverlay(params) {
12
- var query = params.query,
13
- networkError = params.networkError;
1
+ import { createRoot } from "react-dom/client";
2
+ const createErrorOverlay = params => {
3
+ const {
4
+ element
5
+ } = params;
14
6
  // If the element already present in DOM, return immediately.
15
7
  if (document.getElementById("overlay-root")) {
16
8
  return;
17
9
  }
18
10
  // Create root element to hold React tree.
19
- var container = document.createElement("div");
11
+ const container = document.createElement("div");
20
12
  container.id = "overlay-root";
21
13
  // Insert root element into body.
22
- var body = document.getElementsByTagName("body")[0];
14
+ const body = document.getElementsByTagName("body")[0];
23
15
  body.appendChild(container);
24
16
  // Mount the ErrorOverlay component into root element.
25
- (0, _reactDom.render)( /*#__PURE__*/_react.default.createElement(_ErrorOverlay.default, {
26
- query: query,
27
- networkError: networkError
28
- }), container);
17
+ const root = createRoot(container);
18
+ root.render(element);
29
19
  };
30
- var _default = exports.default = createErrorOverlay;
20
+ export default createErrorOverlay;
31
21
 
32
22
  //# sourceMappingURL=createErrorOverlay.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["_react","_interopRequireDefault","require","_reactDom","_ErrorOverlay","createErrorOverlay","params","query","networkError","document","getElementById","container","createElement","id","body","getElementsByTagName","appendChild","render","default","_default","exports"],"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,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,SAAA,GAAAD,OAAA;AACA,IAAAE,aAAA,GAAAH,sBAAA,CAAAC,OAAA;AAOA,IAAMG,kBAAkB,GAAG,SAArBA,kBAAkBA,CAAIC,MAAgC,EAAW;EACnE,IAAQC,KAAK,GAAmBD,MAAM,CAA9BC,KAAK;IAAEC,YAAY,GAAKF,MAAM,CAAvBE,YAAY;EAC3B;EACA,IAAIC,QAAQ,CAACC,cAAc,CAAC,cAAc,CAAC,EAAE;IACzC;EACJ;EACA;EACA,IAAMC,SAAyB,GAAGF,QAAQ,CAACG,aAAa,CAAC,KAAK,CAAC;EAC/DD,SAAS,CAACE,EAAE,GAAG,cAAc;EAC7B;EACA,IAAMC,IAAqB,GAAGL,QAAQ,CAACM,oBAAoB,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC;EACtED,IAAI,CAACE,WAAW,CAACL,SAAS,CAAC;EAC3B;EACA,IAAAM,gBAAM,gBAACjB,MAAA,CAAAkB,OAAA,CAAAN,aAAA,CAACR,aAAA,CAAAc,OAAY;IAACX,KAAK,EAAEA,KAAM;IAACC,YAAY,EAAEA;EAAa,CAAE,CAAC,EAAEG,SAAS,CAAC;AACjF,CAAC;AAAC,IAAAQ,QAAA,GAAAC,OAAA,CAAAF,OAAA,GAEab,kBAAkB","ignoreList":[]}
1
+ {"version":3,"names":["createRoot","createErrorOverlay","params","element","document","getElementById","container","createElement","id","body","getElementsByTagName","appendChild","root","render"],"sources":["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"],"mappings":"AACA,SAASA,UAAU,QAAQ,kBAAkB;AAO7C,MAAMC,kBAAkB,GAAIC,MAAgC,IAAW;EACnE,MAAM;IAAEC;EAAQ,CAAC,GAAGD,MAAM;EAC1B;EACA,IAAIE,QAAQ,CAACC,cAAc,CAAC,cAAc,CAAC,EAAE;IACzC;EACJ;EACA;EACA,MAAMC,SAAyB,GAAGF,QAAQ,CAACG,aAAa,CAAC,KAAK,CAAC;EAC/DD,SAAS,CAACE,EAAE,GAAG,cAAc;EAC7B;EACA,MAAMC,IAAqB,GAAGL,QAAQ,CAACM,oBAAoB,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC;EACtED,IAAI,CAACE,WAAW,CAACL,SAAS,CAAC;EAC3B;EACA,MAAMM,IAAI,GAAGZ,UAAU,CAACM,SAAS,CAAC;EAClCM,IAAI,CAACC,MAAM,CAACV,OAAO,CAAC;AACxB,CAAC;AAED,eAAeF,kBAAkB","ignoreList":[]}
@@ -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,47 +1,70 @@
1
- "use strict";
1
+ import React from "react";
2
+ import { onError } from "apollo-link-error";
3
+ import { print } from "graphql/language/index.js";
4
+ import { boolean } from "boolean";
5
+ import { ApolloLinkPlugin } from "./ApolloLinkPlugin.js";
6
+ import createErrorOverlay from "./NetworkErrorLinkPlugin/createErrorOverlay.js";
7
+ import { LocalAwsLambdaTimeoutMessage } from "./NetworkErrorLinkPlugin/LocalAwsLambdaTimeoutMessage.js";
8
+ import { config as appConfig } 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 => {
13
+ return error.result && error.result.code === "LOCAL_AWS_LAMBDA_TIMEOUT";
14
+ };
2
15
 
3
- var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
4
- Object.defineProperty(exports, "__esModule", {
5
- value: true
6
- });
7
- exports.NetworkErrorLinkPlugin = void 0;
8
- var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
9
- var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
10
- var _callSuper2 = _interopRequireDefault(require("@babel/runtime/helpers/callSuper"));
11
- var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits"));
12
- var _ApolloLinkPlugin2 = require("./ApolloLinkPlugin");
13
- var _apolloLinkError = require("apollo-link-error");
14
- var _language = require("graphql/language");
15
- var _createErrorOverlay = _interopRequireDefault(require("./NetworkErrorLinkPlugin/createErrorOverlay"));
16
- var _boolean = require("boolean");
17
- var _config = require("../config");
18
16
  /**
19
17
  * This plugin creates an ApolloLink that checks for `NetworkError` and shows an ErrorOverlay in the browser.
20
18
  */
21
- var NetworkErrorLinkPlugin = exports.NetworkErrorLinkPlugin = /*#__PURE__*/function (_ApolloLinkPlugin) {
22
- function NetworkErrorLinkPlugin() {
23
- (0, _classCallCheck2.default)(this, NetworkErrorLinkPlugin);
24
- return (0, _callSuper2.default)(this, NetworkErrorLinkPlugin, arguments);
19
+ export class NetworkErrorLinkPlugin extends ApolloLinkPlugin {
20
+ constructor(getEventPublisher) {
21
+ super();
22
+ this.getEventPublisher = getEventPublisher;
25
23
  }
26
- (0, _inherits2.default)(NetworkErrorLinkPlugin, _ApolloLinkPlugin);
27
- return (0, _createClass2.default)(NetworkErrorLinkPlugin, [{
28
- key: "createLink",
29
- value: function createLink() {
30
- return (0, _apolloLinkError.onError)(function (_ref) {
31
- var networkError = _ref.networkError,
32
- operation = _ref.operation;
33
- var debug = _config.config.getKey("DEBUG", (0, _boolean.boolean)(process.env.REACT_APP_DEBUG));
34
- if (networkError && debug) {
35
- (0, _createErrorOverlay.default)({
36
- query: (0, _language.print)(operation.query),
37
- networkError: networkError
24
+ createLink() {
25
+ return onError(({
26
+ networkError,
27
+ operation
28
+ }) => {
29
+ const debug = appConfig.getKey("DEBUG", boolean(process.env.REACT_APP_DEBUG));
30
+ if (networkError) {
31
+ // Publish network error event
32
+ const errorType = isLocalAwsLambdaFnInvocationTimeoutError(networkError) ? "timeout" : "network";
33
+ const event = new NetworkErrorEvent({
34
+ message: networkError.message,
35
+ operationName: operation.operationName,
36
+ query: print(operation.query),
37
+ variables: operation.variables,
38
+ errorType,
39
+ statusCode: networkError.statusCode,
40
+ result: networkError.result
41
+ });
42
+ this.getEventPublisher().publish(event);
43
+
44
+ // Keep existing overlay logic for now
45
+ if (debug) {
46
+ if (isLocalAwsLambdaFnInvocationTimeoutError(networkError)) {
47
+ createErrorOverlay({
48
+ element: /*#__PURE__*/React.createElement(ErrorOverlay, {
49
+ message: /*#__PURE__*/React.createElement(LocalAwsLambdaTimeoutMessage, null),
50
+ closeable: false
51
+ }),
52
+ closeable: false
53
+ });
54
+ return;
55
+ }
56
+ createErrorOverlay({
57
+ element: /*#__PURE__*/React.createElement(GqlErrorOverlay, {
58
+ query: print(operation.query),
59
+ networkError: networkError
60
+ })
38
61
  });
39
62
  }
63
+ }
40
64
 
41
- // TODO: also print graphQLErrors
42
- });
43
- }
44
- }]);
45
- }(_ApolloLinkPlugin2.ApolloLinkPlugin);
65
+ // TODO: also print graphQLErrors
66
+ });
67
+ }
68
+ }
46
69
 
47
70
  //# sourceMappingURL=NetworkErrorLinkPlugin.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["_ApolloLinkPlugin2","require","_apolloLinkError","_language","_createErrorOverlay","_interopRequireDefault","_boolean","_config","NetworkErrorLinkPlugin","exports","_ApolloLinkPlugin","_classCallCheck2","default","_callSuper2","arguments","_inherits2","_createClass2","key","value","createLink","onError","_ref","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,IAAAA,kBAAA,GAAAC,OAAA;AACA,IAAAC,gBAAA,GAAAD,OAAA;AACA,IAAAE,SAAA,GAAAF,OAAA;AACA,IAAAG,mBAAA,GAAAC,sBAAA,CAAAJ,OAAA;AACA,IAAAK,QAAA,GAAAL,OAAA;AACA,IAAAM,OAAA,GAAAN,OAAA;AAEA;AACA;AACA;AAFA,IAGaO,sBAAsB,GAAAC,OAAA,CAAAD,sBAAA,0BAAAE,iBAAA;EAAA,SAAAF,uBAAA;IAAA,IAAAG,gBAAA,CAAAC,OAAA,QAAAJ,sBAAA;IAAA,WAAAK,WAAA,CAAAD,OAAA,QAAAJ,sBAAA,EAAAM,SAAA;EAAA;EAAA,IAAAC,UAAA,CAAAH,OAAA,EAAAJ,sBAAA,EAAAE,iBAAA;EAAA,WAAAM,aAAA,CAAAJ,OAAA,EAAAJ,sBAAA;IAAAS,GAAA;IAAAC,KAAA,EAC/B,SAAAC,WAAA,EAA6B;MACzB,OAAO,IAAAC,wBAAO,EAAC,UAAAC,IAAA,EAAiC;QAAA,IAA9BC,YAAY,GAAAD,IAAA,CAAZC,YAAY;UAAEC,SAAS,GAAAF,IAAA,CAATE,SAAS;QACrC,IAAMC,KAAK,GAAGC,cAAS,CAACC,MAAM,CAAC,OAAO,EAAE,IAAAC,gBAAO,EAACC,OAAO,CAACC,GAAG,CAACC,eAAe,CAAC,CAAC;QAE7E,IAAIR,YAAY,IAAIE,KAAK,EAAE;UACvB,IAAAO,2BAAkB,EAAC;YAAEC,KAAK,EAAE,IAAAC,eAAK,EAACV,SAAS,CAACS,KAAK,CAAC;YAAEV,YAAY,EAAZA;UAAa,CAAC,CAAC;QACvE;;QAEA;MACJ,CAAC,CAAC;IACN;EAAC;AAAA,EAXuCY,mCAAgB","ignoreList":[]}
1
+ {"version":3,"names":["React","onError","print","boolean","ApolloLinkPlugin","createErrorOverlay","LocalAwsLambdaTimeoutMessage","config","appConfig","ErrorOverlay","GqlErrorOverlay","NetworkErrorEvent","isLocalAwsLambdaFnInvocationTimeoutError","error","result","code","NetworkErrorLinkPlugin","constructor","getEventPublisher","createLink","networkError","operation","debug","getKey","process","env","REACT_APP_DEBUG","errorType","event","message","operationName","query","variables","statusCode","publish","element","createElement","closeable"],"sources":["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 { boolean } from \"boolean\";\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\", boolean(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"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,OAAO,QAAQ,mBAAmB;AAE3C,SAASC,KAAK,QAAQ,2BAA2B;AACjD,SAASC,OAAO,QAAQ,SAAS;AACjC,SAASC,gBAAgB;AACzB,OAAOC,kBAAkB;AACzB,SAASC,4BAA4B;AACrC,SAASC,MAAM,IAAIC,SAAS;AAC5B,SAASC,YAAY;AACrB,SAASC,eAAe;AAExB,SAASC,iBAAiB;AAE1B,MAAMC,wCAAwC,GAAIC,KAAU,IAA2B;EACnF,OAAOA,KAAK,CAACC,MAAM,IAAID,KAAK,CAACC,MAAM,CAACC,IAAI,KAAK,0BAA0B;AAC3E,CAAC;;AAED;AACA;AACA;AACA,OAAO,MAAMC,sBAAsB,SAASZ,gBAAgB,CAAC;EACzDa,WAAWA,CAASC,iBAAiD,EAAE;IACnE,KAAK,CAAC,CAAC;IAAC,KADQA,iBAAiD,GAAjDA,iBAAiD;EAErE;EAEgBC,UAAUA,CAAA,EAAG;IACzB,OAAOlB,OAAO,CAAC,CAAC;MAAEmB,YAAY;MAAEC;IAAU,CAAC,KAAK;MAC5C,MAAMC,KAAK,GAAGd,SAAS,CAACe,MAAM,CAAC,OAAO,EAAEpB,OAAO,CAACqB,OAAO,CAACC,GAAG,CAACC,eAAe,CAAC,CAAC;MAE7E,IAAIN,YAAY,EAAE;QACd;QACA,MAAMO,SAAS,GAAGf,wCAAwC,CAACQ,YAAY,CAAC,GAClE,SAAS,GACT,SAAS;QAEf,MAAMQ,KAAK,GAAG,IAAIjB,iBAAiB,CAAC;UAChCkB,OAAO,EAAET,YAAY,CAACS,OAAO;UAC7BC,aAAa,EAAET,SAAS,CAACS,aAAa;UACtCC,KAAK,EAAE7B,KAAK,CAACmB,SAAS,CAACU,KAAK,CAAC;UAC7BC,SAAS,EAAEX,SAAS,CAACW,SAAS;UAC9BL,SAAS;UACTM,UAAU,EAAGb,YAAY,CAASa,UAAU;UAC5CnB,MAAM,EAAGM,YAAY,CAASN;QAClC,CAAC,CAAC;QAEF,IAAI,CAACI,iBAAiB,CAAC,CAAC,CAACgB,OAAO,CAACN,KAAK,CAAC;;QAEvC;QACA,IAAIN,KAAK,EAAE;UACP,IAAIV,wCAAwC,CAACQ,YAAY,CAAC,EAAE;YACxDf,kBAAkB,CAAC;cACf8B,OAAO,eACHnC,KAAA,CAAAoC,aAAA,CAAC3B,YAAY;gBACToB,OAAO,eAAE7B,KAAA,CAAAoC,aAAA,CAAC9B,4BAA4B,MAAE,CAAE;gBAC1C+B,SAAS,EAAE;cAAM,CACpB,CACJ;cACDA,SAAS,EAAE;YACf,CAAC,CAAC;YACF;UACJ;UAEAhC,kBAAkB,CAAC;YACf8B,OAAO,eACHnC,KAAA,CAAAoC,aAAA,CAAC1B,eAAe;cACZqB,KAAK,EAAE7B,KAAK,CAACmB,SAAS,CAACU,KAAK,CAAE;cAC9BX,YAAY,EAAEA;YAAa,CAC9B;UAET,CAAC,CAAC;QACN;MACJ;;MAEA;IACJ,CAAC,CAAC;EACN;AACJ","ignoreList":[]}
@@ -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,16 +1,5 @@
1
- "use strict";
2
-
3
- var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
4
- Object.defineProperty(exports, "__esModule", {
5
- value: true
6
- });
7
- exports.OmitTypenameLinkPlugin = void 0;
8
- var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
9
- var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
10
- var _callSuper2 = _interopRequireDefault(require("@babel/runtime/helpers/callSuper"));
11
- var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits"));
12
- var _apolloLink = require("apollo-link");
13
- var _ApolloLinkPlugin2 = require("./ApolloLinkPlugin");
1
+ import { ApolloLink } from "apollo-link";
2
+ import { ApolloLinkPlugin } from "./ApolloLinkPlugin.js";
14
3
  function omitTypename(key, value) {
15
4
  return key === "__typename" ? undefined : value;
16
5
  }
@@ -18,23 +7,15 @@ function omitTypename(key, value) {
18
7
  /**
19
8
  * This link removes `__typename` from the variables being sent to the API.
20
9
  */
21
- var OmitTypenameLinkPlugin = exports.OmitTypenameLinkPlugin = /*#__PURE__*/function (_ApolloLinkPlugin) {
22
- function OmitTypenameLinkPlugin() {
23
- (0, _classCallCheck2.default)(this, OmitTypenameLinkPlugin);
24
- return (0, _callSuper2.default)(this, OmitTypenameLinkPlugin, arguments);
10
+ export class OmitTypenameLinkPlugin extends ApolloLinkPlugin {
11
+ createLink() {
12
+ return new ApolloLink((operation, forward) => {
13
+ if (operation.variables) {
14
+ operation.variables = JSON.parse(JSON.stringify(operation.variables), omitTypename);
15
+ }
16
+ return forward(operation);
17
+ });
25
18
  }
26
- (0, _inherits2.default)(OmitTypenameLinkPlugin, _ApolloLinkPlugin);
27
- return (0, _createClass2.default)(OmitTypenameLinkPlugin, [{
28
- key: "createLink",
29
- value: function createLink() {
30
- return new _apolloLink.ApolloLink(function (operation, forward) {
31
- if (operation.variables) {
32
- operation.variables = JSON.parse(JSON.stringify(operation.variables), omitTypename);
33
- }
34
- return forward(operation);
35
- });
36
- }
37
- }]);
38
- }(_ApolloLinkPlugin2.ApolloLinkPlugin);
19
+ }
39
20
 
40
21
  //# sourceMappingURL=OmitTypenameLinkPlugin.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["_apolloLink","require","_ApolloLinkPlugin2","omitTypename","key","value","undefined","OmitTypenameLinkPlugin","exports","_ApolloLinkPlugin","_classCallCheck2","default","_callSuper2","arguments","_inherits2","_createClass2","createLink","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,IAAAA,WAAA,GAAAC,OAAA;AACA,IAAAC,kBAAA,GAAAD,OAAA;AAEA,SAASE,YAAYA,CAACC,GAAW,EAAEC,KAAa,EAAsB;EAClE,OAAOD,GAAG,KAAK,YAAY,GAAGE,SAAS,GAAGD,KAAK;AACnD;;AAEA;AACA;AACA;AAFA,IAGaE,sBAAsB,GAAAC,OAAA,CAAAD,sBAAA,0BAAAE,iBAAA;EAAA,SAAAF,uBAAA;IAAA,IAAAG,gBAAA,CAAAC,OAAA,QAAAJ,sBAAA;IAAA,WAAAK,WAAA,CAAAD,OAAA,QAAAJ,sBAAA,EAAAM,SAAA;EAAA;EAAA,IAAAC,UAAA,CAAAH,OAAA,EAAAJ,sBAAA,EAAAE,iBAAA;EAAA,WAAAM,aAAA,CAAAJ,OAAA,EAAAJ,sBAAA;IAAAH,GAAA;IAAAC,KAAA,EAC/B,SAAAW,WAAA,EAAyC;MACrC,OAAO,IAAIC,sBAAU,CAAC,UAACC,SAAS,EAAEC,OAAO,EAAK;QAC1C,IAAID,SAAS,CAACE,SAAS,EAAE;UACrBF,SAAS,CAACE,SAAS,GAAGC,IAAI,CAACC,KAAK,CAACD,IAAI,CAACE,SAAS,CAACL,SAAS,CAACE,SAAS,CAAC,EAAEjB,YAAY,CAAC;QACvF;QACA,OAAOgB,OAAO,CAACD,SAAS,CAAC;MAC7B,CAAC,CAAC;IACN;EAAC;AAAA,EARuCM,mCAAgB","ignoreList":[]}
1
+ {"version":3,"names":["ApolloLink","ApolloLinkPlugin","omitTypename","key","value","undefined","OmitTypenameLinkPlugin","createLink","operation","forward","variables","JSON","parse","stringify"],"sources":["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"],"mappings":"AAAA,SAASA,UAAU,QAAQ,aAAa;AACxC,SAASC,gBAAgB;AAEzB,SAASC,YAAYA,CAACC,GAAW,EAAEC,KAAa,EAAsB;EAClE,OAAOD,GAAG,KAAK,YAAY,GAAGE,SAAS,GAAGD,KAAK;AACnD;;AAEA;AACA;AACA;AACA,OAAO,MAAME,sBAAsB,SAASL,gBAAgB,CAAC;EACzCM,UAAUA,CAAA,EAAe;IACrC,OAAO,IAAIP,UAAU,CAAC,CAACQ,SAAS,EAAEC,OAAO,KAAK;MAC1C,IAAID,SAAS,CAACE,SAAS,EAAE;QACrBF,SAAS,CAACE,SAAS,GAAGC,IAAI,CAACC,KAAK,CAACD,IAAI,CAACE,SAAS,CAACL,SAAS,CAACE,SAAS,CAAC,EAAER,YAAY,CAAC;MACvF;MACA,OAAOO,OAAO,CAACD,SAAS,CAAC;IAC7B,CAAC,CAAC;EACN;AACJ","ignoreList":[]}
@@ -1,10 +1,10 @@
1
- import { ApolloLinkPlugin } from "./ApolloLinkPlugin";
2
- import { ApolloLink } from "apollo-link";
1
+ import { ApolloLinkPlugin } from "./ApolloLinkPlugin.js";
2
+ import type { ApolloLink } from "apollo-link";
3
3
  /**
4
4
  * Append `x-tenant` header from URL query (necessary for prerendering service).
5
5
  */
6
6
  export declare class TenantHeaderLinkPlugin extends ApolloLinkPlugin {
7
7
  private readonly tenant;
8
- constructor(tenant?: string);
8
+ constructor(tenant: string);
9
9
  createLink(): ApolloLink;
10
10
  }
@@ -1,56 +1,37 @@
1
- "use strict";
2
-
3
- var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
4
- Object.defineProperty(exports, "__esModule", {
5
- value: true
6
- });
7
- exports.TenantHeaderLinkPlugin = void 0;
8
- var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/objectSpread2"));
9
- var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
10
- var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
11
- var _callSuper2 = _interopRequireDefault(require("@babel/runtime/helpers/callSuper"));
12
- var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits"));
13
- var _apolloLinkContext = require("apollo-link-context");
14
- var _ApolloLinkPlugin2 = require("./ApolloLinkPlugin");
15
- var _utils = require("../utils");
1
+ import { setContext } from "apollo-link-context";
2
+ import { ApolloLinkPlugin } from "./ApolloLinkPlugin.js";
16
3
  /**
17
4
  * Append `x-tenant` header from URL query (necessary for prerendering service).
18
5
  */
19
- var TenantHeaderLinkPlugin = exports.TenantHeaderLinkPlugin = /*#__PURE__*/function (_ApolloLinkPlugin) {
20
- function TenantHeaderLinkPlugin(tenant) {
21
- var _this;
22
- (0, _classCallCheck2.default)(this, TenantHeaderLinkPlugin);
23
- _this = (0, _callSuper2.default)(this, TenantHeaderLinkPlugin);
24
- _this.name = "tenant-header-link";
25
- _this.tenant = tenant || (0, _utils.getTenantId)();
26
- return _this;
6
+ export class TenantHeaderLinkPlugin extends ApolloLinkPlugin {
7
+ constructor(tenant) {
8
+ super();
9
+ this.name = "tenant-header-link";
10
+ this.tenant = tenant;
27
11
  }
28
- (0, _inherits2.default)(TenantHeaderLinkPlugin, _ApolloLinkPlugin);
29
- return (0, _createClass2.default)(TenantHeaderLinkPlugin, [{
30
- key: "createLink",
31
- value: function createLink() {
32
- var _this2 = this;
33
- return (0, _apolloLinkContext.setContext)(function (_, _ref) {
34
- var headers = _ref.headers;
35
- // If tenant header is already set, do not overwrite it.
36
- if (headers && "x-tenant" in headers) {
37
- return {
38
- headers: headers
39
- };
40
- }
41
- if (_this2.tenant) {
42
- return {
43
- headers: (0, _objectSpread2.default)((0, _objectSpread2.default)({}, headers), {}, {
44
- "x-tenant": _this2.tenant
45
- })
46
- };
47
- }
12
+ createLink() {
13
+ return setContext((_, {
14
+ headers
15
+ }) => {
16
+ // If tenant header is already set, do not overwrite it.
17
+ if (headers && "x-tenant" in headers) {
18
+ return {
19
+ headers
20
+ };
21
+ }
22
+ if (this.tenant) {
48
23
  return {
49
- headers: headers
24
+ headers: {
25
+ ...headers,
26
+ "x-tenant": this.tenant
27
+ }
50
28
  };
51
- });
52
- }
53
- }]);
54
- }(_ApolloLinkPlugin2.ApolloLinkPlugin);
29
+ }
30
+ return {
31
+ headers
32
+ };
33
+ });
34
+ }
35
+ }
55
36
 
56
37
  //# sourceMappingURL=TenantHeaderLinkPlugin.js.map