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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (385) hide show
  1. package/App.d.ts +4 -5
  2. package/App.js +26 -32
  3. package/App.js.map +1 -1
  4. package/README.md +7 -15
  5. package/apollo-client/InMemoryCache.js +2 -2
  6. package/apollo-client/InMemoryCache.js.map +1 -1
  7. package/components/Image.d.ts +1 -2
  8. package/components/Image.js +1 -1
  9. package/components/Image.js.map +1 -1
  10. package/components/index.d.ts +1 -2
  11. package/components/index.js +1 -2
  12. package/components/index.js.map +1 -1
  13. package/config/RouterConfig/Route.d.ts +9 -10
  14. package/config/RouterConfig/Route.js +5 -14
  15. package/config/RouterConfig/Route.js.map +1 -1
  16. package/config/RouterConfig.d.ts +10 -11
  17. package/config/RouterConfig.js +1 -1
  18. package/config/RouterConfig.js.map +1 -1
  19. package/contexts/Ui/index.js.map +1 -1
  20. package/core/Plugin.js +2 -2
  21. package/core/Plugin.js.map +1 -1
  22. package/core/Plugins.d.ts +1 -1
  23. package/core/Plugins.js +5 -4
  24. package/core/Plugins.js.map +1 -1
  25. package/core/Provider.d.ts +1 -1
  26. package/core/Provider.js +1 -1
  27. package/core/Provider.js.map +1 -1
  28. package/core/createProviderPlugin.js +1 -1
  29. package/core/createProviderPlugin.js.map +1 -1
  30. package/errors/AuthenticationErrorEvent.d.ts +9 -0
  31. package/errors/AuthenticationErrorEvent.js +10 -0
  32. package/errors/AuthenticationErrorEvent.js.map +1 -0
  33. package/errors/NetworkErrorEvent.d.ts +15 -0
  34. package/errors/NetworkErrorEvent.js +10 -0
  35. package/errors/NetworkErrorEvent.js.map +1 -0
  36. package/errors/abstractions.d.ts +12 -0
  37. package/errors/abstractions.js +5 -0
  38. package/errors/abstractions.js.map +1 -0
  39. package/errors/index.d.ts +6 -0
  40. package/errors/index.js +6 -0
  41. package/errors/index.js.map +1 -0
  42. package/exports/admin/env-config.d.ts +1 -0
  43. package/exports/admin/env-config.js +3 -0
  44. package/exports/admin/env-config.js.map +1 -0
  45. package/exports/admin/graphql-client.d.ts +1 -0
  46. package/exports/admin/graphql-client.js +3 -0
  47. package/exports/admin/graphql-client.js.map +1 -0
  48. package/exports/admin/local-storage.d.ts +2 -0
  49. package/exports/admin/local-storage.js +4 -0
  50. package/exports/admin/local-storage.js.map +1 -0
  51. package/exports/admin/router.d.ts +5 -0
  52. package/exports/admin/router.js +7 -0
  53. package/exports/admin/router.js.map +1 -0
  54. package/exports/admin/security.d.ts +1 -0
  55. package/exports/admin/security.js +3 -0
  56. package/exports/admin/security.js.map +1 -0
  57. package/exports/admin.d.ts +6 -0
  58. package/exports/admin.js +8 -0
  59. package/exports/admin.js.map +1 -0
  60. package/features/envConfig/EnvConfig.d.ts +6 -0
  61. package/features/envConfig/EnvConfig.js +14 -0
  62. package/features/envConfig/EnvConfig.js.map +1 -0
  63. package/features/envConfig/abstractions.d.ts +27 -0
  64. package/features/envConfig/abstractions.js +4 -0
  65. package/features/envConfig/abstractions.js.map +1 -0
  66. package/features/envConfig/feature.d.ts +17 -0
  67. package/features/envConfig/feature.js +14 -0
  68. package/features/envConfig/feature.js.map +1 -0
  69. package/features/envConfig/index.d.ts +1 -0
  70. package/features/envConfig/index.js +3 -0
  71. package/features/envConfig/index.js.map +1 -0
  72. package/features/eventPublisher/EventPublisher.d.ts +8 -0
  73. package/features/eventPublisher/EventPublisher.js +27 -0
  74. package/features/eventPublisher/EventPublisher.js.map +1 -0
  75. package/features/eventPublisher/abstractions.d.ts +18 -0
  76. package/features/eventPublisher/abstractions.js +14 -0
  77. package/features/eventPublisher/abstractions.js.map +1 -0
  78. package/features/eventPublisher/feature.d.ts +1 -0
  79. package/features/eventPublisher/feature.js +11 -0
  80. package/features/eventPublisher/feature.js.map +1 -0
  81. package/features/eventPublisher/index.d.ts +3 -0
  82. package/features/eventPublisher/index.js +4 -0
  83. package/features/eventPublisher/index.js.map +1 -0
  84. package/features/graphqlClient/AuthenticationErrorPublishing.d.ts +13 -0
  85. package/features/graphqlClient/AuthenticationErrorPublishing.js +35 -0
  86. package/features/graphqlClient/AuthenticationErrorPublishing.js.map +1 -0
  87. package/features/graphqlClient/BatchingGraphQLClient.d.ts +18 -0
  88. package/features/graphqlClient/BatchingGraphQLClient.js +164 -0
  89. package/features/graphqlClient/BatchingGraphQLClient.js.map +1 -0
  90. package/features/graphqlClient/FetchGraphQLClient.d.ts +10 -0
  91. package/features/graphqlClient/FetchGraphQLClient.js +62 -0
  92. package/features/graphqlClient/FetchGraphQLClient.js.map +1 -0
  93. package/features/graphqlClient/NetworkErrorPublishing.d.ts +14 -0
  94. package/features/graphqlClient/NetworkErrorPublishing.js +55 -0
  95. package/features/graphqlClient/NetworkErrorPublishing.js.map +1 -0
  96. package/features/graphqlClient/RequestValue.d.ts +20 -0
  97. package/features/graphqlClient/RequestValue.js +42 -0
  98. package/features/graphqlClient/RequestValue.js.map +1 -0
  99. package/features/graphqlClient/RetryGraphQLClient.d.ts +18 -0
  100. package/features/graphqlClient/RetryGraphQLClient.js +54 -0
  101. package/features/graphqlClient/RetryGraphQLClient.js.map +1 -0
  102. package/features/graphqlClient/__tests__/GraphQLClient.test.d.ts +1 -0
  103. package/features/graphqlClient/__tests__/GraphQLClient.test.js +350 -0
  104. package/features/graphqlClient/__tests__/GraphQLClient.test.js.map +1 -0
  105. package/features/graphqlClient/abstractions.d.ts +17 -0
  106. package/features/graphqlClient/abstractions.js +4 -0
  107. package/features/graphqlClient/abstractions.js.map +1 -0
  108. package/features/graphqlClient/feature.d.ts +6 -0
  109. package/features/graphqlClient/feature.js +31 -0
  110. package/features/graphqlClient/feature.js.map +1 -0
  111. package/features/graphqlClient/index.d.ts +1 -0
  112. package/features/graphqlClient/index.js +3 -0
  113. package/features/graphqlClient/index.js.map +1 -0
  114. package/features/graphqlClient/types.d.ts +5 -0
  115. package/features/graphqlClient/types.js.map +1 -0
  116. package/features/localStorage/BrowserLocalStorageGateway.d.ts +9 -0
  117. package/features/localStorage/BrowserLocalStorageGateway.js +68 -0
  118. package/features/localStorage/BrowserLocalStorageGateway.js.map +1 -0
  119. package/features/localStorage/LocalStorage.d.ts +12 -0
  120. package/features/localStorage/LocalStorage.js +31 -0
  121. package/features/localStorage/LocalStorage.js.map +1 -0
  122. package/features/localStorage/LocalStorageRepository.d.ts +20 -0
  123. package/features/localStorage/LocalStorageRepository.js +95 -0
  124. package/features/localStorage/LocalStorageRepository.js.map +1 -0
  125. package/features/localStorage/abstractions.d.ts +48 -0
  126. package/features/localStorage/abstractions.js +19 -0
  127. package/features/localStorage/abstractions.js.map +1 -0
  128. package/features/localStorage/feature.d.ts +12 -0
  129. package/features/localStorage/feature.js +34 -0
  130. package/features/localStorage/feature.js.map +1 -0
  131. package/features/localStorage/index.d.ts +1 -0
  132. package/features/localStorage/index.js +3 -0
  133. package/features/localStorage/index.js.map +1 -0
  134. package/features/router/HistoryRouterGateway.d.ts +18 -0
  135. package/features/router/HistoryRouterGateway.js +82 -0
  136. package/features/router/HistoryRouterGateway.js.map +1 -0
  137. package/features/router/HistoryRouterGateway.test.d.ts +1 -0
  138. package/features/router/HistoryRouterGateway.test.js +204 -0
  139. package/features/router/HistoryRouterGateway.test.js.map +1 -0
  140. package/features/router/Route.d.ts +19 -0
  141. package/features/router/Route.js +59 -0
  142. package/features/router/Route.js.map +1 -0
  143. package/features/router/RouteUrl.d.ts +85 -0
  144. package/features/router/RouteUrl.js +232 -0
  145. package/features/router/RouteUrl.js.map +1 -0
  146. package/features/router/Router.d.ts +45 -0
  147. package/features/router/Router.js +129 -0
  148. package/features/router/Router.js.map +1 -0
  149. package/features/router/RouterPresenter.d.ts +17 -0
  150. package/features/router/RouterPresenter.js +45 -0
  151. package/features/router/RouterPresenter.js.map +1 -0
  152. package/features/router/RouterRepository.d.ts +21 -0
  153. package/features/router/RouterRepository.js +71 -0
  154. package/features/router/RouterRepository.js.map +1 -0
  155. package/features/router/RouterRepository.test.d.ts +1 -0
  156. package/features/router/RouterRepository.test.js +154 -0
  157. package/features/router/RouterRepository.test.js.map +1 -0
  158. package/features/router/abstractions.d.ts +68 -0
  159. package/features/router/abstractions.js +15 -0
  160. package/features/router/abstractions.js.map +1 -0
  161. package/features/router/feature.d.ts +4 -0
  162. package/features/router/feature.js +18 -0
  163. package/features/router/feature.js.map +1 -0
  164. package/features/router/index.d.ts +1 -0
  165. package/features/router/index.js +3 -0
  166. package/features/router/index.js.map +1 -0
  167. package/helpers/InterfaceGenerator/date.d.ts +15 -0
  168. package/helpers/InterfaceGenerator/date.js +3 -0
  169. package/helpers/InterfaceGenerator/date.js.map +1 -0
  170. package/helpers/InterfaceGenerator/id.d.ts +23 -0
  171. package/helpers/InterfaceGenerator/id.js +3 -0
  172. package/helpers/InterfaceGenerator/id.js.map +1 -0
  173. package/helpers/InterfaceGenerator/identity.d.ts +10 -0
  174. package/helpers/InterfaceGenerator/identity.js +3 -0
  175. package/helpers/InterfaceGenerator/identity.js.map +1 -0
  176. package/helpers/InterfaceGenerator/index.d.ts +5 -0
  177. package/helpers/InterfaceGenerator/index.js +3 -0
  178. package/helpers/InterfaceGenerator/index.js.map +1 -0
  179. package/helpers/InterfaceGenerator/numeric.d.ts +12 -0
  180. package/helpers/InterfaceGenerator/numeric.js +3 -0
  181. package/helpers/InterfaceGenerator/numeric.js.map +1 -0
  182. package/helpers/InterfaceGenerator/truthful.d.ts +7 -0
  183. package/helpers/InterfaceGenerator/truthful.js +3 -0
  184. package/helpers/InterfaceGenerator/truthful.js.map +1 -0
  185. package/hooks/useAutocomplete/index.d.ts +1 -1
  186. package/hooks/useAutocomplete/index.js +1 -1
  187. package/hooks/useAutocomplete/index.js.map +1 -1
  188. package/hooks/useAutocomplete/useAutocomplete.js +3 -6
  189. package/hooks/useAutocomplete/useAutocomplete.js.map +1 -1
  190. package/hooks/useDataList/functions/getData.js +1 -1
  191. package/hooks/useDataList/functions/getData.js.map +1 -1
  192. package/hooks/useDataList/functions/getError.js +1 -1
  193. package/hooks/useDataList/functions/getError.js.map +1 -1
  194. package/hooks/useDataList/functions/getMeta.js +1 -1
  195. package/hooks/useDataList/functions/getMeta.js.map +1 -1
  196. package/hooks/useDataList/functions/index.d.ts +3 -3
  197. package/hooks/useDataList/functions/index.js +3 -3
  198. package/hooks/useDataList/functions/index.js.map +1 -1
  199. package/hooks/useDataList/index.d.ts +1 -1
  200. package/hooks/useDataList/index.js +1 -1
  201. package/hooks/useDataList/index.js.map +1 -1
  202. package/hooks/useDataList/useDataList.d.ts +0 -1
  203. package/hooks/useDataList/useDataList.js +6 -26
  204. package/hooks/useDataList/useDataList.js.map +1 -1
  205. package/hooks/useDataList/utils/index.d.ts +1 -2
  206. package/hooks/useDataList/utils/index.js +1 -2
  207. package/hooks/useDataList/utils/index.js.map +1 -1
  208. package/hooks/useDataList/utils/prepareLoadListParams.js +1 -1
  209. package/hooks/useDataList/utils/prepareLoadListParams.js.map +1 -1
  210. package/hooks/useHandlers.js.map +1 -1
  211. package/hooks/useRegisterLegacyPlugin.d.ts +1 -1
  212. package/hooks/useRegisterLegacyPlugin.js.map +1 -1
  213. package/hooks/useUi.d.ts +1 -1
  214. package/hooks/useUi.js +1 -1
  215. package/hooks/useUi.js.map +1 -1
  216. package/i18n/index.d.ts +1 -1
  217. package/i18n/index.js +1 -1
  218. package/i18n/index.js.map +1 -1
  219. package/index.d.ts +22 -15
  220. package/index.js +21 -14
  221. package/index.js.map +1 -1
  222. package/package.json +25 -23
  223. package/plugins/AddQuerySelectionPlugin.d.ts +1 -1
  224. package/plugins/AddQuerySelectionPlugin.js +1 -1
  225. package/plugins/AddQuerySelectionPlugin.js.map +1 -1
  226. package/plugins/ApolloDynamicLink.d.ts +1 -1
  227. package/plugins/ApolloDynamicLink.js.map +1 -1
  228. package/plugins/ConsoleLinkPlugin.d.ts +1 -1
  229. package/plugins/ConsoleLinkPlugin.js +1 -1
  230. package/plugins/ConsoleLinkPlugin.js.map +1 -1
  231. package/plugins/NetworkErrorLinkPlugin/ErrorOverlay.d.ts +8 -13
  232. package/plugins/NetworkErrorLinkPlugin/ErrorOverlay.js +15 -26
  233. package/plugins/NetworkErrorLinkPlugin/ErrorOverlay.js.map +1 -1
  234. package/plugins/NetworkErrorLinkPlugin/GqlErrorOverlay.d.ts +14 -0
  235. package/plugins/NetworkErrorLinkPlugin/GqlErrorOverlay.js +31 -0
  236. package/plugins/NetworkErrorLinkPlugin/GqlErrorOverlay.js.map +1 -0
  237. package/plugins/NetworkErrorLinkPlugin/LocalAwsLambdaTimeoutMessage.d.ts +2 -0
  238. package/plugins/NetworkErrorLinkPlugin/LocalAwsLambdaTimeoutMessage.js +31 -0
  239. package/plugins/NetworkErrorLinkPlugin/LocalAwsLambdaTimeoutMessage.js.map +1 -0
  240. package/plugins/NetworkErrorLinkPlugin/StyledComponents.d.ts +4 -5
  241. package/plugins/NetworkErrorLinkPlugin/StyledComponents.js +3 -3
  242. package/plugins/NetworkErrorLinkPlugin/StyledComponents.js.map +1 -1
  243. package/plugins/NetworkErrorLinkPlugin/Typography.d.ts +8 -0
  244. package/plugins/NetworkErrorLinkPlugin/Typography.js +18 -0
  245. package/plugins/NetworkErrorLinkPlugin/Typography.js.map +1 -0
  246. package/plugins/NetworkErrorLinkPlugin/createErrorOverlay.d.ts +3 -3
  247. package/plugins/NetworkErrorLinkPlugin/createErrorOverlay.js +4 -13
  248. package/plugins/NetworkErrorLinkPlugin/createErrorOverlay.js.map +1 -1
  249. package/plugins/NetworkErrorLinkPlugin.d.ts +4 -1
  250. package/plugins/NetworkErrorLinkPlugin.js +47 -7
  251. package/plugins/NetworkErrorLinkPlugin.js.map +1 -1
  252. package/plugins/OmitTypenameLinkPlugin.d.ts +1 -1
  253. package/plugins/OmitTypenameLinkPlugin.js +1 -1
  254. package/plugins/OmitTypenameLinkPlugin.js.map +1 -1
  255. package/plugins/TenantHeaderLinkPlugin.d.ts +2 -2
  256. package/plugins/TenantHeaderLinkPlugin.js +2 -4
  257. package/plugins/TenantHeaderLinkPlugin.js.map +1 -1
  258. package/plugins/components/Image.d.ts +6 -0
  259. package/plugins/components/Image.js +19 -0
  260. package/plugins/components/Image.js.map +1 -0
  261. package/plugins/image.d.ts +1 -1
  262. package/plugins/image.js +2 -2
  263. package/plugins/image.js.map +1 -1
  264. package/plugins/index.d.ts +3 -3
  265. package/plugins/index.js +1 -1
  266. package/plugins/index.js.map +1 -1
  267. package/presentation/localStorage/index.d.ts +3 -0
  268. package/presentation/localStorage/index.js +5 -0
  269. package/presentation/localStorage/index.js.map +1 -0
  270. package/presentation/localStorage/useLocalStorage.d.ts +6 -0
  271. package/presentation/localStorage/useLocalStorage.js +21 -0
  272. package/presentation/localStorage/useLocalStorage.js.map +1 -0
  273. package/presentation/localStorage/useLocalStorageValue.d.ts +1 -0
  274. package/presentation/localStorage/useLocalStorageValue.js +20 -0
  275. package/presentation/localStorage/useLocalStorageValue.js.map +1 -0
  276. package/presentation/localStorage/useLocalStorageValues.d.ts +5 -0
  277. package/presentation/localStorage/useLocalStorageValues.js +39 -0
  278. package/presentation/localStorage/useLocalStorageValues.js.map +1 -0
  279. package/presentation/router/RouteElementRegistry.d.ts +14 -0
  280. package/presentation/router/RouteElementRegistry.js +32 -0
  281. package/presentation/router/RouteElementRegistry.js.map +1 -0
  282. package/presentation/router/abstractions.d.ts +13 -0
  283. package/presentation/router/abstractions.js +4 -0
  284. package/presentation/router/abstractions.js.map +1 -0
  285. package/presentation/router/components/Redirect.d.ts +14 -0
  286. package/presentation/router/components/Redirect.js +15 -0
  287. package/presentation/router/components/Redirect.js.map +1 -0
  288. package/presentation/router/components/RouteContent.d.ts +2 -0
  289. package/presentation/router/components/RouteContent.js +17 -0
  290. package/presentation/router/components/RouteContent.js.map +1 -0
  291. package/presentation/router/components/RouteLink.d.ts +50 -0
  292. package/presentation/router/components/RouteLink.js +22 -0
  293. package/presentation/router/components/RouteLink.js.map +1 -0
  294. package/presentation/router/components/SimpleLink.d.ts +44 -0
  295. package/presentation/router/components/SimpleLink.js +30 -0
  296. package/presentation/router/components/SimpleLink.js.map +1 -0
  297. package/presentation/router/hooks/useRoute.d.ts +6 -0
  298. package/presentation/router/hooks/useRoute.js +30 -0
  299. package/presentation/router/hooks/useRoute.js.map +1 -0
  300. package/presentation/router/hooks/useRouter.d.ts +7 -0
  301. package/presentation/router/hooks/useRouter.js +26 -0
  302. package/presentation/router/hooks/useRouter.js.map +1 -0
  303. package/presentation/router/index.d.ts +4 -0
  304. package/presentation/router/index.js +5 -0
  305. package/presentation/router/index.js.map +1 -0
  306. package/presentation/router/types.d.ts +5 -0
  307. package/presentation/router/types.js +3 -0
  308. package/presentation/router/types.js.map +1 -0
  309. package/react-butterfiles/Files.js +3 -3
  310. package/react-butterfiles/Files.js.map +1 -1
  311. package/react-butterfiles/file.todo +1 -0
  312. package/react-butterfiles/index.d.ts +1 -1
  313. package/react-butterfiles/index.js +1 -1
  314. package/react-butterfiles/index.js.map +1 -1
  315. package/router.d.ts +5 -0
  316. package/router.js +8 -0
  317. package/router.js.map +1 -0
  318. package/shared/di/DiContainerProvider.d.ts +8 -0
  319. package/shared/di/DiContainerProvider.js +17 -0
  320. package/shared/di/DiContainerProvider.js.map +1 -0
  321. package/shared/di/createFeature.d.ts +11 -0
  322. package/shared/di/createFeature.js +11 -0
  323. package/shared/di/createFeature.js.map +1 -0
  324. package/shared/di/useFeature.d.ts +2 -0
  325. package/shared/di/useFeature.js +18 -0
  326. package/shared/di/useFeature.js.map +1 -0
  327. package/types.d.ts +7 -4
  328. package/types.js +1 -12
  329. package/types.js.map +1 -1
  330. package/utils/index.d.ts +2 -10
  331. package/utils/index.js +2 -10
  332. package/utils/index.js.map +1 -1
  333. package/utils/legacyPluginToReactComponent.js +1 -1
  334. package/utils/legacyPluginToReactComponent.js.map +1 -1
  335. package/components/Routes.d.ts +0 -2
  336. package/components/Routes.js +0 -36
  337. package/components/Routes.js.map +0 -1
  338. package/components/View.d.ts +0 -8
  339. package/components/View.js +0 -19
  340. package/components/View.js.map +0 -1
  341. package/core/DebounceRender.d.ts +0 -12
  342. package/core/DebounceRender.js +0 -31
  343. package/core/DebounceRender.js.map +0 -1
  344. package/core/Routes.d.ts +0 -6
  345. package/core/Routes.js +0 -34
  346. package/core/Routes.js.map +0 -1
  347. package/hooks/useDataList/utils/redirectToRouteWithQueryParams.d.ts +0 -14
  348. package/hooks/useDataList/utils/redirectToRouteWithQueryParams.js +0 -26
  349. package/hooks/useDataList/utils/redirectToRouteWithQueryParams.js.map +0 -1
  350. package/hooks/useDataList/utils/types.d.ts +0 -40
  351. package/hooks/useDataList/utils/types.js.map +0 -1
  352. package/plugins/LocaleHeaderLinkPlugin.d.ts +0 -10
  353. package/plugins/LocaleHeaderLinkPlugin.js +0 -32
  354. package/plugins/LocaleHeaderLinkPlugin.js.map +0 -1
  355. package/plugins/RoutePlugin.d.ts +0 -12
  356. package/plugins/RoutePlugin.js +0 -16
  357. package/plugins/RoutePlugin.js.map +0 -1
  358. package/plugins/ViewPlugin.d.ts +0 -14
  359. package/plugins/ViewPlugin.js +0 -19
  360. package/plugins/ViewPlugin.js.map +0 -1
  361. package/utils/getApiUrl.d.ts +0 -1
  362. package/utils/getApiUrl.js +0 -5
  363. package/utils/getApiUrl.js.map +0 -1
  364. package/utils/getGqlApiUrl.d.ts +0 -1
  365. package/utils/getGqlApiUrl.js +0 -6
  366. package/utils/getGqlApiUrl.js.map +0 -1
  367. package/utils/getHeadlessCmsGqlApiUrl.d.ts +0 -5
  368. package/utils/getHeadlessCmsGqlApiUrl.js +0 -12
  369. package/utils/getHeadlessCmsGqlApiUrl.js.map +0 -1
  370. package/utils/getLocaleCode.d.ts +0 -6
  371. package/utils/getLocaleCode.js +0 -33
  372. package/utils/getLocaleCode.js.map +0 -1
  373. package/utils/getPrerenderId.d.ts +0 -6
  374. package/utils/getPrerenderId.js +0 -5
  375. package/utils/getPrerenderId.js.map +0 -1
  376. package/utils/getTenantId.d.ts +0 -6
  377. package/utils/getTenantId.js +0 -45
  378. package/utils/getTenantId.js.map +0 -1
  379. package/utils/isLocalhost.d.ts +0 -1
  380. package/utils/isLocalhost.js +0 -7
  381. package/utils/isLocalhost.js.map +0 -1
  382. package/utils/isPrerendering.d.ts +0 -1
  383. package/utils/isPrerendering.js +0 -5
  384. package/utils/isPrerendering.js.map +0 -1
  385. /package/{hooks/useDataList/utils → features/graphqlClient}/types.js +0 -0
@@ -1,10 +1,7 @@
1
- import { useDataList } from "../useDataList";
2
- import debounce from "lodash/debounce";
1
+ import { useDataList } from "../useDataList/index.js";
2
+ import debounce from "lodash/debounce.js";
3
3
  export const useAutocomplete = props => {
4
- const dataList = useDataList({
5
- useRouter: false,
6
- ...props
7
- });
4
+ const dataList = useDataList(props);
8
5
  return {
9
6
  options: dataList.data || [],
10
7
  onInput: debounce(query => {
@@ -1 +1 @@
1
- {"version":3,"names":["useDataList","debounce","useAutocomplete","props","dataList","useRouter","options","data","onInput","query","search","setSearch"],"sources":["useAutocomplete.ts"],"sourcesContent":["import { useDataList } from \"../useDataList\";\nimport debounce from \"lodash/debounce\";\nimport type { DocumentNode } from \"graphql\";\n\ninterface UseAutocompleteHook {\n options: any[];\n onInput(value: string): void;\n}\n\ninterface Props {\n query: DocumentNode;\n search?: string | ((value: string) => string);\n}\n\nexport const useAutocomplete = (props: Props): UseAutocompleteHook => {\n const dataList = useDataList({ useRouter: false, ...props });\n\n return {\n options: dataList.data || [],\n onInput: debounce(query => {\n if (!query) {\n return;\n }\n\n let search = props.search || query;\n if (typeof search === \"function\") {\n search = search(query);\n }\n\n dataList.setSearch(search);\n }, 250)\n };\n};\n"],"mappings":"AAAA,SAASA,WAAW;AACpB,OAAOC,QAAQ,MAAM,iBAAiB;AAatC,OAAO,MAAMC,eAAe,GAAIC,KAAY,IAA0B;EAClE,MAAMC,QAAQ,GAAGJ,WAAW,CAAC;IAAEK,SAAS,EAAE,KAAK;IAAE,GAAGF;EAAM,CAAC,CAAC;EAE5D,OAAO;IACHG,OAAO,EAAEF,QAAQ,CAACG,IAAI,IAAI,EAAE;IAC5BC,OAAO,EAAEP,QAAQ,CAACQ,KAAK,IAAI;MACvB,IAAI,CAACA,KAAK,EAAE;QACR;MACJ;MAEA,IAAIC,MAAM,GAAGP,KAAK,CAACO,MAAM,IAAID,KAAK;MAClC,IAAI,OAAOC,MAAM,KAAK,UAAU,EAAE;QAC9BA,MAAM,GAAGA,MAAM,CAACD,KAAK,CAAC;MAC1B;MAEAL,QAAQ,CAACO,SAAS,CAACD,MAAM,CAAC;IAC9B,CAAC,EAAE,GAAG;EACV,CAAC;AACL,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["useDataList","debounce","useAutocomplete","props","dataList","options","data","onInput","query","search","setSearch"],"sources":["useAutocomplete.ts"],"sourcesContent":["import { useDataList } from \"../useDataList/index.js\";\nimport debounce from \"lodash/debounce.js\";\nimport type { DocumentNode } from \"graphql\";\n\ninterface UseAutocompleteHook {\n options: any[];\n onInput(value: string): void;\n}\n\ninterface Props {\n query: DocumentNode;\n search?: string | ((value: string) => string);\n}\n\nexport const useAutocomplete = (props: Props): UseAutocompleteHook => {\n const dataList = useDataList(props);\n\n return {\n options: dataList.data || [],\n onInput: debounce(query => {\n if (!query) {\n return;\n }\n\n let search = props.search || query;\n if (typeof search === \"function\") {\n search = search(query);\n }\n\n dataList.setSearch(search);\n }, 250)\n };\n};\n"],"mappings":"AAAA,SAASA,WAAW;AACpB,OAAOC,QAAQ,MAAM,oBAAoB;AAazC,OAAO,MAAMC,eAAe,GAAIC,KAAY,IAA0B;EAClE,MAAMC,QAAQ,GAAGJ,WAAW,CAACG,KAAK,CAAC;EAEnC,OAAO;IACHE,OAAO,EAAED,QAAQ,CAACE,IAAI,IAAI,EAAE;IAC5BC,OAAO,EAAEN,QAAQ,CAACO,KAAK,IAAI;MACvB,IAAI,CAACA,KAAK,EAAE;QACR;MACJ;MAEA,IAAIC,MAAM,GAAGN,KAAK,CAACM,MAAM,IAAID,KAAK;MAClC,IAAI,OAAOC,MAAM,KAAK,UAAU,EAAE;QAC9BA,MAAM,GAAGA,MAAM,CAACD,KAAK,CAAC;MAC1B;MAEAJ,QAAQ,CAACM,SAAS,CAACD,MAAM,CAAC;IAC9B,CAAC,EAAE,GAAG;EACV,CAAC;AACL,CAAC","ignoreList":[]}
@@ -1,4 +1,4 @@
1
- import searchDataByKey from "./searchDataByKey";
1
+ import searchDataByKey from "./searchDataByKey.js";
2
2
  export default response => searchDataByKey("data", response);
3
3
 
4
4
  //# sourceMappingURL=getData.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["searchDataByKey","response"],"sources":["getData.ts"],"sourcesContent":["import searchDataByKey from \"./searchDataByKey\";\n\nexport default (response: Record<string, string>) => searchDataByKey(\"data\", response);\n"],"mappings":"AAAA,OAAOA,eAAe;AAEtB,eAAgBC,QAAgC,IAAKD,eAAe,CAAC,MAAM,EAAEC,QAAQ,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["searchDataByKey","response"],"sources":["getData.ts"],"sourcesContent":["import searchDataByKey from \"./searchDataByKey.js\";\n\nexport default (response: Record<string, string>) => searchDataByKey(\"data\", response);\n"],"mappings":"AAAA,OAAOA,eAAe;AAEtB,eAAgBC,QAAgC,IAAKD,eAAe,CAAC,MAAM,EAAEC,QAAQ,CAAC","ignoreList":[]}
@@ -1,4 +1,4 @@
1
- import searchDataByKey from "./searchDataByKey";
1
+ import searchDataByKey from "./searchDataByKey.js";
2
2
  export default response => searchDataByKey("error", response);
3
3
 
4
4
  //# sourceMappingURL=getError.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["searchDataByKey","response"],"sources":["getError.ts"],"sourcesContent":["import searchDataByKey from \"./searchDataByKey\";\n\nexport default (response: Record<string, string>) => searchDataByKey(\"error\", response);\n"],"mappings":"AAAA,OAAOA,eAAe;AAEtB,eAAgBC,QAAgC,IAAKD,eAAe,CAAC,OAAO,EAAEC,QAAQ,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["searchDataByKey","response"],"sources":["getError.ts"],"sourcesContent":["import searchDataByKey from \"./searchDataByKey.js\";\n\nexport default (response: Record<string, string>) => searchDataByKey(\"error\", response);\n"],"mappings":"AAAA,OAAOA,eAAe;AAEtB,eAAgBC,QAAgC,IAAKD,eAAe,CAAC,OAAO,EAAEC,QAAQ,CAAC","ignoreList":[]}
@@ -1,4 +1,4 @@
1
- import searchDataByKey from "./searchDataByKey";
1
+ import searchDataByKey from "./searchDataByKey.js";
2
2
  export default response => searchDataByKey("meta", response);
3
3
 
4
4
  //# sourceMappingURL=getMeta.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["searchDataByKey","response"],"sources":["getMeta.ts"],"sourcesContent":["import searchDataByKey from \"./searchDataByKey\";\n\nexport default (response: Record<string, string>) => searchDataByKey(\"meta\", response);\n"],"mappings":"AAAA,OAAOA,eAAe;AAEtB,eAAgBC,QAAgC,IAAKD,eAAe,CAAC,MAAM,EAAEC,QAAQ,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["searchDataByKey","response"],"sources":["getMeta.ts"],"sourcesContent":["import searchDataByKey from \"./searchDataByKey.js\";\n\nexport default (response: Record<string, string>) => searchDataByKey(\"meta\", response);\n"],"mappings":"AAAA,OAAOA,eAAe;AAEtB,eAAgBC,QAAgC,IAAKD,eAAe,CAAC,MAAM,EAAEC,QAAQ,CAAC","ignoreList":[]}
@@ -1,3 +1,3 @@
1
- export { default as getData } from "./getData";
2
- export { default as getError } from "./getError";
3
- export { default as getMeta } from "./getMeta";
1
+ export { default as getData } from "./getData.js";
2
+ export { default as getError } from "./getError.js";
3
+ export { default as getMeta } from "./getMeta.js";
@@ -1,5 +1,5 @@
1
- export { default as getData } from "./getData";
2
- export { default as getError } from "./getError";
3
- export { default as getMeta } from "./getMeta";
1
+ export { default as getData } from "./getData.js";
2
+ export { default as getError } from "./getError.js";
3
+ export { default as getMeta } from "./getMeta.js";
4
4
 
5
5
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["default","getData","getError","getMeta"],"sources":["index.ts"],"sourcesContent":["export { default as getData } from \"./getData\";\nexport { default as getError } from \"./getError\";\nexport { default as getMeta } from \"./getMeta\";\n"],"mappings":"AAAA,SAASA,OAAO,IAAIC,OAAO;AAC3B,SAASD,OAAO,IAAIE,QAAQ;AAC5B,SAASF,OAAO,IAAIG,OAAO","ignoreList":[]}
1
+ {"version":3,"names":["default","getData","getError","getMeta"],"sources":["index.ts"],"sourcesContent":["export { default as getData } from \"./getData.js\";\nexport { default as getError } from \"./getError.js\";\nexport { default as getMeta } from \"./getMeta.js\";\n"],"mappings":"AAAA,SAASA,OAAO,IAAIC,OAAO;AAC3B,SAASD,OAAO,IAAIE,QAAQ;AAC5B,SAASF,OAAO,IAAIG,OAAO","ignoreList":[]}
@@ -1 +1 @@
1
- export { useDataList } from "./useDataList";
1
+ export { useDataList } from "./useDataList.js";
@@ -1,3 +1,3 @@
1
- export { useDataList } from "./useDataList";
1
+ export { useDataList } from "./useDataList.js";
2
2
 
3
3
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["useDataList"],"sources":["index.ts"],"sourcesContent":["export { useDataList } from \"./useDataList\";\n"],"mappings":"AAAA,SAASA,WAAW","ignoreList":[]}
1
+ {"version":3,"names":["useDataList"],"sources":["index.ts"],"sourcesContent":["export { useDataList } from \"./useDataList.js\";\n"],"mappings":"AAAA,SAASA,WAAW","ignoreList":[]}
@@ -1,7 +1,6 @@
1
1
  import type { DocumentNode } from "graphql";
2
2
  import type { ApolloClient } from "apollo-client";
3
3
  export interface UseDataListParams {
4
- useRouter?: boolean;
5
4
  variables?: ((params: UseDataListParams) => any) | object;
6
5
  client?: ApolloClient<any>;
7
6
  query: DocumentNode;
@@ -1,22 +1,11 @@
1
- import { useState, useEffect, useRef, useCallback } from "react";
1
+ import { useCallback, useEffect, useRef, useState } from "react";
2
2
  import { useQuery } from "@apollo/react-hooks";
3
- import { useRouter } from "@webiny/react-router";
4
- import get from "lodash/get";
5
- import isEqual from "lodash/isEqual";
6
- import { prepareLoadListParams } from "./utils";
7
- import { getData, getError, getMeta } from "./functions";
3
+ import get from "lodash/get.js";
4
+ import isEqual from "lodash/isEqual.js";
5
+ import { prepareLoadListParams } from "./utils/index.js";
6
+ import { getData, getError, getMeta } from "./functions/index.js";
8
7
  const useDataList = params => {
9
8
  const [multiSelectedItems, multiSelect] = useState([]);
10
- let history = null;
11
- /**
12
- * TODO: figure out the location type.
13
- */
14
- let location = null;
15
- const routerHook = useRouter();
16
- if (params.useRouter !== false) {
17
- history = routerHook.history;
18
- location = routerHook.location;
19
- }
20
9
  const getQueryOptions = useCallback(() => {
21
10
  let variables = params.variables;
22
11
  if (typeof variables === "function") {
@@ -26,7 +15,7 @@ const useDataList = params => {
26
15
  client: params.client,
27
16
  variables: {
28
17
  ...variables,
29
- ...prepareLoadListParams(location)
18
+ ...prepareLoadListParams()
30
19
  }
31
20
  };
32
21
  }, []);
@@ -47,12 +36,6 @@ const useDataList = params => {
47
36
  queryData.refetch(dataListProps.__loadParams);
48
37
  return;
49
38
  }
50
-
51
- // if (history) {
52
- // redirectToRouteWithQueryParams(params, { history, location });
53
- // return;
54
- // }
55
-
56
39
  queryData.refetch(params);
57
40
  },
58
41
  setPerPage(perPage) {
@@ -132,9 +115,6 @@ const useDataList = params => {
132
115
  select(item) {
133
116
  const query = new URLSearchParams(location.search);
134
117
  query.set("id", item.id);
135
- history.push({
136
- search: query.toString()
137
- });
138
118
  },
139
119
  isMultiSelected(item) {
140
120
  if (!Array.isArray(multiSelectedItems)) {
@@ -1 +1 @@
1
- {"version":3,"names":["useState","useEffect","useRef","useCallback","useQuery","useRouter","get","isEqual","prepareLoadListParams","getData","getError","getMeta","useDataList","params","multiSelectedItems","multiSelect","history","location","routerHook","getQueryOptions","variables","client","queryData","query","prevLoadParamsRef","dataListProps","data","meta","error","loading","init","refresh","refetch","__loadParams","setPerPage","perPage","preparedParams","limit","parseInt","after","undefined","before","setNextPage","cursor","setPreviousPage","setSearch","search","setWhere","where","setSorters","sort","items","value","Array","isArray","returnItems","forEach","item","includes","splice","indexOf","push","isSelected","URLSearchParams","id","select","set","toString","isMultiSelected","isNoneMultiSelected","length","getMultiSelected","multiSelectAll","isAllMultiSelected","prev","current"],"sources":["useDataList.ts"],"sourcesContent":["import { useState, useEffect, useRef, useCallback } from \"react\";\nimport { useQuery } from \"@apollo/react-hooks\";\nimport { useRouter } from \"@webiny/react-router\";\nimport get from \"lodash/get\";\nimport isEqual from \"lodash/isEqual\";\nimport { prepareLoadListParams } from \"./utils\";\nimport { getData, getError, getMeta } from \"./functions\";\n\nimport type { DocumentNode } from \"graphql\";\nimport type { ApolloClient } from \"apollo-client\";\n\nexport interface UseDataListParams {\n useRouter?: boolean;\n variables?: ((params: UseDataListParams) => any) | object;\n client?: ApolloClient<any>;\n query: DocumentNode;\n getData?: (data: any) => any;\n getMeta?: (data: any) => any;\n getError?: (data: any) => any;\n}\n\nexport interface DataListProps {\n __loadParams: any;\n refresh: (params?: any) => void;\n data: any[];\n meta: any;\n error: any;\n loading: boolean;\n isSelected: (item: any) => boolean;\n select: (item: any) => void;\n isMultiSelected: (item: any) => boolean;\n isNoneMultiSelected: () => boolean;\n isAllMultiSelected: () => boolean;\n multiSelectAll: (value: boolean) => void;\n getMultiSelected: () => any[];\n setSearch: (search: any) => void;\n setWhere: (where: any) => void;\n setSorters: (sort: any) => void;\n setPerPage: (perPage: number) => void;\n setPreviousPage: (cursor: string) => void;\n setNextPage: (cursor: string) => void;\n multiSelect: (items: string | string[], value?: boolean) => void;\n init: () => void;\n}\n\nconst useDataList = (params: UseDataListParams) => {\n const [multiSelectedItems, multiSelect] = useState<string[]>([]);\n\n let history = null;\n /**\n * TODO: figure out the location type.\n */\n let location: any = null;\n const routerHook = useRouter();\n\n if (params.useRouter !== false) {\n history = routerHook.history;\n location = routerHook.location;\n }\n\n const getQueryOptions = useCallback(() => {\n let variables = params.variables;\n if (typeof variables === \"function\") {\n variables = variables(params);\n }\n\n return {\n client: params.client,\n variables: {\n ...variables,\n ...prepareLoadListParams(location)\n }\n };\n }, []);\n\n const queryData = useQuery(params.query, getQueryOptions());\n const prevLoadParamsRef = useRef({});\n\n const dataListProps: DataListProps = {\n data: get(params, \"getData\", getData)(queryData.data),\n meta: get(params, \"getMeta\", getMeta)(queryData.data),\n error: get(params, \"getError\", getError)(queryData.data),\n\n loading: queryData.loading,\n init() {\n this.refresh();\n },\n refresh(params = null): void {\n // Refresh multi select first.\n multiSelect([]);\n\n if (!params) {\n queryData.refetch(dataListProps.__loadParams);\n return;\n }\n\n // if (history) {\n // redirectToRouteWithQueryParams(params, { history, location });\n // return;\n // }\n\n queryData.refetch(params);\n },\n setPerPage(perPage: number): void {\n const preparedParams = {\n ...dataListProps.__loadParams,\n limit: parseInt(\"\" + perPage),\n after: undefined,\n before: undefined\n };\n this.refresh(preparedParams);\n },\n setNextPage(cursor: string): void {\n const preparedParams = {\n ...dataListProps.__loadParams,\n after: cursor,\n before: undefined\n };\n this.refresh(preparedParams);\n },\n setPreviousPage(cursor: string): void {\n const preparedParams = {\n ...dataListProps.__loadParams,\n after: undefined,\n before: cursor\n };\n this.refresh(preparedParams);\n },\n setSearch(search): void {\n const preparedParams = {\n ...dataListProps.__loadParams,\n search,\n after: undefined,\n before: undefined\n };\n this.refresh(preparedParams);\n },\n setWhere(where): void {\n const preparedParams = {\n ...dataListProps.__loadParams,\n where,\n after: undefined,\n before: undefined\n };\n this.refresh(preparedParams);\n },\n setSorters(sort): void {\n const preparedParams = {\n ...dataListProps.__loadParams,\n sort,\n after: undefined,\n before: undefined\n };\n this.refresh(preparedParams);\n },\n multiSelect(items, value): void {\n if (!Array.isArray(items)) {\n items = [items];\n }\n\n const returnItems = [...multiSelectedItems];\n\n items.forEach(item => {\n if (value === undefined) {\n returnItems.includes(item)\n ? returnItems.splice(returnItems.indexOf(item), 1)\n : returnItems.push(item);\n } else {\n if (value === true) {\n !returnItems.includes(item) && returnItems.push(item);\n } else {\n returnItems.includes(item) &&\n returnItems.splice(returnItems.indexOf(item), 1);\n }\n }\n });\n\n multiSelect(returnItems);\n },\n isSelected(item) {\n const query = new URLSearchParams(location.search);\n return query.get(\"id\") === item.id;\n },\n select(item) {\n const query = new URLSearchParams(location.search);\n query.set(\"id\", item.id);\n history.push({ search: query.toString() });\n },\n isMultiSelected(item) {\n if (!Array.isArray(multiSelectedItems)) {\n return false;\n }\n\n return multiSelectedItems.includes(item);\n },\n isNoneMultiSelected() {\n return multiSelectedItems.length === 0;\n },\n getMultiSelected() {\n return multiSelectedItems;\n },\n multiSelectAll(value: boolean): void {\n const { data } = dataListProps;\n if (Array.isArray(data)) {\n dataListProps.multiSelect(data, value);\n } else {\n dataListProps.multiSelect([], value);\n }\n },\n isAllMultiSelected(): boolean {\n const { data } = dataListProps;\n\n return Array.isArray(data) && multiSelectedItems.length === data.length;\n },\n\n __loadParams: prepareLoadListParams(location)\n };\n\n useEffect(() => {\n const params = {\n prev: prevLoadParamsRef.current,\n current: dataListProps.__loadParams\n };\n\n if (!isEqual(params.prev, params.current)) {\n dataListProps.init();\n }\n\n prevLoadParamsRef.current = params.current;\n });\n\n return dataListProps;\n};\n\nexport { useDataList };\n"],"mappings":"AAAA,SAASA,QAAQ,EAAEC,SAAS,EAAEC,MAAM,EAAEC,WAAW,QAAQ,OAAO;AAChE,SAASC,QAAQ,QAAQ,qBAAqB;AAC9C,SAASC,SAAS,QAAQ,sBAAsB;AAChD,OAAOC,GAAG,MAAM,YAAY;AAC5B,OAAOC,OAAO,MAAM,gBAAgB;AACpC,SAASC,qBAAqB;AAC9B,SAASC,OAAO,EAAEC,QAAQ,EAAEC,OAAO;AAuCnC,MAAMC,WAAW,GAAIC,MAAyB,IAAK;EAC/C,MAAM,CAACC,kBAAkB,EAAEC,WAAW,CAAC,GAAGf,QAAQ,CAAW,EAAE,CAAC;EAEhE,IAAIgB,OAAO,GAAG,IAAI;EAClB;AACJ;AACA;EACI,IAAIC,QAAa,GAAG,IAAI;EACxB,MAAMC,UAAU,GAAGb,SAAS,CAAC,CAAC;EAE9B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Y,MAAM,GAAG;MACX6D,IAAI,EAAElD,iBAAiB,CAACmD,OAAO;MAC/BA,OAAO,EAAElD,aAAa,CAACQ;IAC3B,CAAC;IAED,IAAI,CAAC1B,OAAO,CAACM,MAAM,CAAC6D,IAAI,EAAE7D,MAAM,CAAC8D,OAAO,CAAC,EAAE;MACvClD,aAAa,CAACK,IAAI,CAAC,CAAC;IACxB;IAEAN,iBAAiB,CAACmD,OAAO,GAAG9D,MAAM,CAAC8D,OAAO;EAC9C,CAAC,CAAC;EAEF,OAAOlD,aAAa;AACxB,CAAC;AAED,SAASb,WAAW","ignoreList":[]}
1
+ {"version":3,"names":["useCallback","useEffect","useRef","useState","useQuery","get","isEqual","prepareLoadListParams","getData","getError","getMeta","useDataList","params","multiSelectedItems","multiSelect","getQueryOptions","variables","client","queryData","query","prevLoadParamsRef","dataListProps","data","meta","error","loading","init","refresh","refetch","__loadParams","setPerPage","perPage","preparedParams","limit","parseInt","after","undefined","before","setNextPage","cursor","setPreviousPage","setSearch","search","setWhere","where","setSorters","sort","items","value","Array","isArray","returnItems","forEach","item","includes","splice","indexOf","push","isSelected","URLSearchParams","location","id","select","set","isMultiSelected","isNoneMultiSelected","length","getMultiSelected","multiSelectAll","isAllMultiSelected","prev","current"],"sources":["useDataList.ts"],"sourcesContent":["import { useCallback, useEffect, useRef, useState } from \"react\";\nimport { useQuery } from \"@apollo/react-hooks\";\nimport get from \"lodash/get.js\";\nimport isEqual from \"lodash/isEqual.js\";\nimport { prepareLoadListParams } from \"./utils/index.js\";\nimport { getData, getError, getMeta } from \"./functions/index.js\";\n\nimport type { DocumentNode } from \"graphql\";\nimport type { ApolloClient } from \"apollo-client\";\n\nexport interface UseDataListParams {\n variables?: ((params: UseDataListParams) => any) | object;\n client?: ApolloClient<any>;\n query: DocumentNode;\n getData?: (data: any) => any;\n getMeta?: (data: any) => any;\n getError?: (data: any) => any;\n}\n\nexport interface DataListProps {\n __loadParams: any;\n refresh: (params?: any) => void;\n data: any[];\n meta: any;\n error: any;\n loading: boolean;\n isSelected: (item: any) => boolean;\n select: (item: any) => void;\n isMultiSelected: (item: any) => boolean;\n isNoneMultiSelected: () => boolean;\n isAllMultiSelected: () => boolean;\n multiSelectAll: (value: boolean) => void;\n getMultiSelected: () => any[];\n setSearch: (search: any) => void;\n setWhere: (where: any) => void;\n setSorters: (sort: any) => void;\n setPerPage: (perPage: number) => void;\n setPreviousPage: (cursor: string) => void;\n setNextPage: (cursor: string) => void;\n multiSelect: (items: string | string[], value?: boolean) => void;\n init: () => void;\n}\n\nconst useDataList = (params: UseDataListParams) => {\n const [multiSelectedItems, multiSelect] = useState<string[]>([]);\n\n const getQueryOptions = useCallback(() => {\n let variables = params.variables;\n if (typeof variables === \"function\") {\n variables = variables(params);\n }\n\n return {\n client: params.client,\n variables: {\n ...variables,\n ...prepareLoadListParams()\n }\n };\n }, []);\n\n const queryData = useQuery(params.query, getQueryOptions());\n const prevLoadParamsRef = useRef({});\n\n const dataListProps: DataListProps = {\n data: get(params, \"getData\", getData)(queryData.data),\n meta: get(params, \"getMeta\", getMeta)(queryData.data),\n error: get(params, \"getError\", getError)(queryData.data),\n\n loading: queryData.loading,\n init() {\n this.refresh();\n },\n refresh(params = null): void {\n // Refresh multi select first.\n multiSelect([]);\n\n if (!params) {\n queryData.refetch(dataListProps.__loadParams);\n return;\n }\n\n queryData.refetch(params);\n },\n setPerPage(perPage: number): void {\n const preparedParams = {\n ...dataListProps.__loadParams,\n limit: parseInt(\"\" + perPage),\n after: undefined,\n before: undefined\n };\n this.refresh(preparedParams);\n },\n setNextPage(cursor: string): void {\n const preparedParams = {\n ...dataListProps.__loadParams,\n after: cursor,\n before: undefined\n };\n this.refresh(preparedParams);\n },\n setPreviousPage(cursor: string): void {\n const preparedParams = {\n ...dataListProps.__loadParams,\n after: undefined,\n before: cursor\n };\n this.refresh(preparedParams);\n },\n setSearch(search): void {\n const preparedParams = {\n ...dataListProps.__loadParams,\n search,\n after: undefined,\n before: undefined\n };\n this.refresh(preparedParams);\n },\n setWhere(where): void {\n const preparedParams = {\n ...dataListProps.__loadParams,\n where,\n after: undefined,\n before: undefined\n };\n this.refresh(preparedParams);\n },\n setSorters(sort): void {\n const preparedParams = {\n ...dataListProps.__loadParams,\n sort,\n after: undefined,\n before: undefined\n };\n this.refresh(preparedParams);\n },\n multiSelect(items, value): void {\n if (!Array.isArray(items)) {\n items = [items];\n }\n\n const returnItems = [...multiSelectedItems];\n\n items.forEach(item => {\n if (value === undefined) {\n returnItems.includes(item)\n ? returnItems.splice(returnItems.indexOf(item), 1)\n : returnItems.push(item);\n } else {\n if (value === true) {\n !returnItems.includes(item) && returnItems.push(item);\n } else {\n returnItems.includes(item) &&\n returnItems.splice(returnItems.indexOf(item), 1);\n }\n }\n });\n\n multiSelect(returnItems);\n },\n isSelected(item) {\n const query = new URLSearchParams(location.search);\n return query.get(\"id\") === item.id;\n },\n select(item) {\n const query = new URLSearchParams(location.search);\n query.set(\"id\", item.id);\n },\n isMultiSelected(item) {\n if (!Array.isArray(multiSelectedItems)) {\n return false;\n }\n\n return multiSelectedItems.includes(item);\n },\n isNoneMultiSelected() {\n return multiSelectedItems.length === 0;\n },\n getMultiSelected() {\n return multiSelectedItems;\n },\n multiSelectAll(value: boolean): void {\n const { data } = dataListProps;\n if (Array.isArray(data)) {\n dataListProps.multiSelect(data, value);\n } else {\n dataListProps.multiSelect([], value);\n }\n },\n isAllMultiSelected(): boolean {\n const { data } = dataListProps;\n\n return Array.isArray(data) && multiSelectedItems.length === data.length;\n },\n\n __loadParams: prepareLoadListParams(location)\n };\n\n useEffect(() => {\n const params = {\n prev: prevLoadParamsRef.current,\n current: dataListProps.__loadParams\n };\n\n if (!isEqual(params.prev, params.current)) {\n dataListProps.init();\n }\n\n prevLoadParamsRef.current = params.current;\n });\n\n return dataListProps;\n};\n\nexport { useDataList };\n"],"mappings":"AAAA,SAASA,WAAW,EAAEC,SAAS,EAAEC,MAAM,EAAEC,QAAQ,QAAQ,OAAO;AAChE,SAASC,QA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,MAAMW,MAAM,GAAG;MACX0D,IAAI,EAAElD,iBAAiB,CAACmD,OAAO;MAC/BA,OAAO,EAAElD,aAAa,CAACQ;IAC3B,CAAC;IAED,IAAI,CAACvB,OAAO,CAACM,MAAM,CAAC0D,IAAI,EAAE1D,MAAM,CAAC2D,OAAO,CAAC,EAAE;MACvClD,aAAa,CAACK,IAAI,CAAC,CAAC;IACxB;IAEAN,iBAAiB,CAACmD,OAAO,GAAG3D,MAAM,CAAC2D,OAAO;EAC9C,CAAC,CAAC;EAEF,OAAOlD,aAAa;AACxB,CAAC;AAED,SAASV,WAAW","ignoreList":[]}
@@ -1,2 +1 @@
1
- export { default as prepareLoadListParams } from "./prepareLoadListParams";
2
- export { default as redirectToRouteWithQueryParams } from "./redirectToRouteWithQueryParams";
1
+ export { default as prepareLoadListParams } from "./prepareLoadListParams.js";
@@ -1,4 +1,3 @@
1
- export { default as prepareLoadListParams } from "./prepareLoadListParams";
2
- export { default as redirectToRouteWithQueryParams } from "./redirectToRouteWithQueryParams";
1
+ export { default as prepareLoadListParams } from "./prepareLoadListParams.js";
3
2
 
4
3
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["default","prepareLoadListParams","redirectToRouteWithQueryParams"],"sources":["index.ts"],"sourcesContent":["export { default as prepareLoadListParams } from \"./prepareLoadListParams\";\nexport { default as redirectToRouteWithQueryParams } from \"./redirectToRouteWithQueryParams\";\n"],"mappings":"AAAA,SAASA,OAAO,IAAIC,qBAAqB;AACzC,SAASD,OAAO,IAAIE,8BAA8B","ignoreList":[]}
1
+ {"version":3,"names":["default","prepareLoadListParams"],"sources":["index.ts"],"sourcesContent":["export { default as prepareLoadListParams } from \"./prepareLoadListParams.js\";\n"],"mappings":"AAAA,SAASA,OAAO,IAAIC,qBAAqB","ignoreList":[]}
@@ -24,7 +24,7 @@ export default location => {
24
24
  }
25
25
  try {
26
26
  params[key] = JSON.parse(value);
27
- } catch (e) {
27
+ } catch {
28
28
  /**
29
29
  * If we can't parse the value, it means it's a string.
30
30
  */
@@ -1 +1 @@
1
- {"version":3,"names":["keys","location","params","query","URLSearchParams","search","after","get","before","limit","parseInt","forEach","key","value","JSON","parse","e"],"sources":["prepareLoadListParams.ts"],"sourcesContent":["interface Params {\n after?: string;\n before?: string;\n limit?: number;\n sort?: string;\n where?: Record<string, any>;\n search?: string;\n}\n\nconst keys: (keyof Params)[] = [\"sort\", \"where\", \"search\"];\n\nexport default (location?: Location): Params => {\n const params: Params = {};\n if (!location) {\n return params;\n }\n\n const query = new URLSearchParams(location.search);\n\n const after = query.get(\"after\");\n const before = query.get(\"before\");\n const limit = query.get(\"limit\");\n\n if (after) {\n params.after = after;\n }\n\n if (before) {\n params.before = before;\n }\n\n if (limit) {\n params.limit = parseInt(limit);\n }\n\n keys.forEach(key => {\n const value = query.get(key);\n if (typeof value !== \"string\") {\n return;\n }\n try {\n params[key] = JSON.parse(value);\n } catch (e) {\n /**\n * If we can't parse the value, it means it's a string.\n */\n // @ts-expect-error\n params[key] = value;\n }\n });\n return params;\n};\n"],"mappings":"AASA,MAAMA,IAAsB,GAAG,CAAC,MAAM,EAAE,OAAO,EAAE,QAAQ,CAAC;AAE1D,eAAgBC,QAAmB,IAAa;EAC5C,MAAMC,MAAc,GAAG,CAAC,CAAC;EACzB,IAAI,CAACD,QAAQ,EAAE;IACX,OAAOC,MAAM;EACjB;EAEA,MAAMC,KAAK,GAAG,IAAIC,eAAe,CAACH,QAAQ,CAACI,MAAM,CAAC;EAElD,MAAMC,KAAK,GAAGH,KAAK,CAACI,GAAG,CAAC,OAAO,CAAC;EAChC,MAAMC,MAAM,GAAGL,KAAK,CAACI,GAAG,CAAC,QAAQ,CAAC;EAClC,MAAME,KAAK,GAAGN,KAAK,CAACI,GAAG,CAAC,OAAO,CAAC;EAEhC,IAAID,KAAK,EAAE;IACPJ,MAAM,CAACI,KAAK,GAAGA,KAAK;EACxB;EAEA,IAAIE,MAAM,EAAE;IACRN,MAAM,CAACM,MAAM,GAAGA,MAAM;EAC1B;EAEA,IAAIC,KAAK,EAAE;IACPP,MAAM,CAACO,KAAK,GAAGC,QAAQ,CAACD,KAAK,CAAC;EAClC;EAEAT,IAAI,CAACW,OAAO,CAACC,GAAG,IAAI;IAChB,MAAMC,KAAK,GAAGV,KAAK,CAACI,GAAG,CAACK,GAAG,CAAC;IAC5B,IAAI,OAAOC,KAAK,KAAK,QAAQ,EAAE;MAC3B;IACJ;IACA,IAAI;MACAX,MAAM,CAACU,GAAG,CAAC,GAAGE,IAAI,CAACC,KAAK,CAACF,KAAK,CAAC;IACnC,CAAC,CAAC,OAAOG,CAAC,EAAE;MACR;AACZ;AACA;MACY;MACAd,MAAM,CAACU,GAAG,CAAC,GAAGC,KAAK;IACvB;EACJ,CAAC,CAAC;EACF,OAAOX,MAAM;AACjB,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["keys","location","params","query","URLSearchParams","search","after","get","before","limit","parseInt","forEach","key","value","JSON","parse"],"sources":["prepareLoadListParams.ts"],"sourcesContent":["interface Params {\n after?: string;\n before?: string;\n limit?: number;\n sort?: string;\n where?: Record<string, any>;\n search?: string;\n}\n\nconst keys: (keyof Params)[] = [\"sort\", \"where\", \"search\"];\n\nexport default (location?: Location): Params => {\n const params: Params = {};\n if (!location) {\n return params;\n }\n\n const query = new URLSearchParams(location.search);\n\n const after = query.get(\"after\");\n const before = query.get(\"before\");\n const limit = query.get(\"limit\");\n\n if (after) {\n params.after = after;\n }\n\n if (before) {\n params.before = before;\n }\n\n if (limit) {\n params.limit = parseInt(limit);\n }\n\n keys.forEach(key => {\n const value = query.get(key);\n if (typeof value !== \"string\") {\n return;\n }\n try {\n params[key] = JSON.parse(value);\n } catch {\n /**\n * If we can't parse the value, it means it's a string.\n */\n // @ts-expect-error\n params[key] = value;\n }\n });\n return params;\n};\n"],"mappings":"AASA,MAAMA,IAAsB,GAAG,CAAC,MAAM,EAAE,OAAO,EAAE,QAAQ,CAAC;AAE1D,eAAgBC,QAAmB,IAAa;EAC5C,MAAMC,MAAc,GAAG,CAAC,CAAC;EACzB,IAAI,CAACD,QAAQ,EAAE;IACX,OAAOC,MAAM;EACjB;EAEA,MAAMC,KAAK,GAAG,IAAIC,eAAe,CAACH,QAAQ,CAACI,MAAM,CAAC;EAElD,MAAMC,KAAK,GAAGH,KAAK,CAACI,GAAG,CAAC,OAAO,CAAC;EAChC,MAAMC,MAAM,GAAGL,KAAK,CAACI,GAAG,CAAC,QAAQ,CAAC;EAClC,MAAME,KAAK,GAAGN,KAAK,CAACI,GAAG,CAAC,OAAO,CAAC;EAEhC,IAAID,KAAK,EAAE;IACPJ,MAAM,CAACI,KAAK,GAAGA,KAAK;EACxB;EAEA,IAAIE,MAAM,EAAE;IACRN,MAAM,CAACM,MAAM,GAAGA,MAAM;EAC1B;EAEA,IAAIC,KAAK,EAAE;IACPP,MAAM,CAACO,KAAK,GAAGC,QAAQ,CAACD,KAAK,CAAC;EAClC;EAEAT,IAAI,CAACW,OAAO,CAACC,GAAG,IAAI;IAChB,MAAMC,KAAK,GAAGV,KAAK,CAACI,GAAG,CAACK,GAAG,CAAC;IAC5B,IAAI,OAAOC,KAAK,KAAK,QAAQ,EAAE;MAC3B;IACJ;IACA,IAAI;MACAX,MAAM,CAACU,GAAG,CAAC,GAAGE,IAAI,CAACC,KAAK,CAACF,KAAK,CAAC;IACnC,CAAC,CAAC,MAAM;MACJ;AACZ;AACA;MACY;MACAX,MAAM,CAACU,GAAG,CAAC,GAAGC,KAAK;IACvB;EACJ,CAAC,CAAC;EACF,OAAOX,MAAM;AACjB,CAAC","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"names":["useRef","useEffect","useHandlers","props","factories","propsRef","handlersRef","names","Object","keys","reduce","handlers","name","args","handler","current"],"sources":["useHandlers.ts"],"sourcesContent":["import { useRef, useEffect } from \"react\";\n\ntype HandlerProps = { [key: string]: any };\ntype HandlerFactories = { [key: string]: (props: HandlerProps) => (...params: any[]) => any };\ntype Handlers = {\n [K in keyof HandlerFactories]: (...params: any[]) => any;\n};\n\nexport function useHandlers<H = Handlers>(props: HandlerProps, factories: HandlerFactories) {\n const propsRef = useRef(props);\n\n const handlersRef = useRef(\n (() => {\n const names = Object.keys(factories);\n return names.reduce((handlers, name) => {\n /**\n * TODO: figure out args types\n */\n handlers[name] = (...args: any) => {\n const handler = factories[name](propsRef.current);\n return handler(...args);\n };\n return handlers;\n }, {} as Record<string, any>);\n })()\n );\n\n useEffect(() => {\n propsRef.current = props;\n });\n\n return handlersRef.current as H;\n}\n"],"mappings":"AAAA,SAASA,MAAM,EAAEC,SAAS,QAAQ,OAAO;AAQzC,OAAO,SAASC,WAAWA,CAAeC,KAAmB,EAAEC,SAA2B,EAAE;EACxF,MAAMC,QAAQ,GAAGL,MAAM,CAACG,KAAK,CAAC;EAE9B,MAAMG,WAAW,GAAGN,MAAM,CACtB,CAAC,MAAM;IACH,MAAMO,KAAK,GAAGC,MAAM,CAACC,IAAI,CAACL,SAAS,CAAC;IACpC,OAAOG,KAAK,CAACG,MAAM,CAAC,CAACC,QAAQ,EAAEC,IAAI,KAAK;MACpC;AAChB;AACA;MACgBD,QAAQ,CAACC,IAAI,CAAC,GAAG,CAAC,GAAGC,IAAS,KAAK;QAC/B,MAAMC,OAAO,GAAGV,SAAS,CAACQ,IAAI,CAAC,CAACP,QAAQ,CAACU,OAAO,CAAC;QACjD,OAAOD,OAAO,CAAC,GAAGD,IAAI,CAAC;MAC3B,CAAC;MACD,OAAOF,QAAQ;IACnB,CAAC,EAAE,CAAC,CAAwB,CAAC;EACjC,CAAC,EAAE,CACP,CAAC;EAEDV,SAAS,CAAC,MAAM;IACZI,QAAQ,CAACU,OAAO,GAAGZ,KAAK;EAC5B,CAAC,CAAC;EAEF,OAAOG,WAAW,CAACS,OAAO;AAC9B","ignoreList":[]}
1
+ {"version":3,"names":["useRef","useEffect","useHandlers","props","factories","propsRef","handlersRef","names","Object","keys","reduce","handlers","name","args","handler","current"],"sources":["useHandlers.ts"],"sourcesContent":["import { useRef, useEffect } from \"react\";\n\ntype HandlerProps = { [key: string]: any };\ntype HandlerFactories = { [key: string]: (props: HandlerProps) => (...params: any[]) => any };\ntype Handlers = {\n [K in keyof HandlerFactories]: (...params: any[]) => any;\n};\n\nexport function useHandlers<H = Handlers>(props: HandlerProps, factories: HandlerFactories) {\n const propsRef = useRef(props);\n\n const handlersRef = useRef(\n (() => {\n const names = Object.keys(factories);\n return names.reduce(\n (handlers, name) => {\n /**\n * TODO: figure out args types\n */\n handlers[name] = (...args: any) => {\n const handler = factories[name](propsRef.current);\n return handler(...args);\n };\n return handlers;\n },\n {} as Record<string, any>\n );\n })()\n );\n\n useEffect(() => {\n propsRef.current = props;\n });\n\n return handlersRef.current as H;\n}\n"],"mappings":"AAAA,SAASA,MAAM,EAAEC,SAAS,QAAQ,OAAO;AAQzC,OAAO,SAASC,WAAWA,CAAeC,KAAmB,EAAEC,SAA2B,EAAE;EACxF,MAAMC,QAAQ,GAAGL,MAAM,CAACG,KAAK,CAAC;EAE9B,MAAMG,WAAW,GAAGN,MAAM,CACtB,CAAC,MAAM;IACH,MAAMO,KAAK,GAAGC,MAAM,CAACC,IAAI,CAACL,SAAS,CAAC;IACpC,OAAOG,KAAK,CAACG,MAAM,CACf,CAACC,QAAQ,EAAEC,IAAI,KAAK;MAChB;AACpB;AACA;MACoBD,QAAQ,CAACC,IAAI,CAAC,GAAG,CAAC,GAAGC,IAAS,KAAK;QAC/B,MAAMC,OAAO,GAAGV,SAAS,CAACQ,IAAI,CAAC,CAACP,QAAQ,CAACU,OAAO,CAAC;QACjD,OAAOD,OAAO,CAAC,GAAGD,IAAI,CAAC;MAC3B,CAAC;MACD,OAAOF,QAAQ;IACnB,CAAC,EACD,CAAC,CACL,CAAC;EACL,CAAC,EAAE,CACP,CAAC;EAEDV,SAAS,CAAC,MAAM;IACZI,QAAQ,CAACU,OAAO,GAAGZ,KAAK;EAC5B,CAAC,CAAC;EAEF,OAAOG,WAAW,CAACS,OAAO;AAC9B","ignoreList":[]}
@@ -1,2 +1,2 @@
1
- import { type Plugin } from "@webiny/plugins/types";
1
+ import { type Plugin } from "@webiny/plugins/types.js";
2
2
  export declare function useRegisterLegacyPlugin<TPlugin extends Plugin>(plugin: TPlugin): void;
@@ -1 +1 @@
1
- {"version":3,"names":["useRef","plugins","useRegisterLegacyPlugin","plugin","pluginRegistered","current","register"],"sources":["useRegisterLegacyPlugin.tsx"],"sourcesContent":["import { useRef } from \"react\";\nimport { plugins } from \"@webiny/plugins\";\nimport { type Plugin } from \"@webiny/plugins/types\";\n\nexport function useRegisterLegacyPlugin<TPlugin extends Plugin>(plugin: TPlugin) {\n const pluginRegistered = useRef<boolean>(false);\n if (!pluginRegistered.current) {\n pluginRegistered.current = true;\n plugins.register(plugin);\n }\n}\n"],"mappings":"AAAA,SAASA,MAAM,QAAQ,OAAO;AAC9B,SAASC,OAAO,QAAQ,iBAAiB;AAGzC,OAAO,SAASC,uBAAuBA,CAAyBC,MAAe,EAAE;EAC7E,MAAMC,gBAAgB,GAAGJ,MAAM,CAAU,KAAK,CAAC;EAC/C,IAAI,CAACI,gBAAgB,CAACC,OAAO,EAAE;IAC3BD,gBAAgB,CAACC,OAAO,GAAG,IAAI;IAC/BJ,OAAO,CAACK,QAAQ,CAACH,MAAM,CAAC;EAC5B;AACJ","ignoreList":[]}
1
+ {"version":3,"names":["useRef","plugins","useRegisterLegacyPlugin","plugin","pluginRegistered","current","register"],"sources":["useRegisterLegacyPlugin.tsx"],"sourcesContent":["import { useRef } from \"react\";\nimport { plugins } from \"@webiny/plugins\";\nimport { type Plugin } from \"@webiny/plugins/types.js\";\n\nexport function useRegisterLegacyPlugin<TPlugin extends Plugin>(plugin: TPlugin) {\n const pluginRegistered = useRef<boolean>(false);\n if (!pluginRegistered.current) {\n pluginRegistered.current = true;\n plugins.register(plugin);\n }\n}\n"],"mappings":"AAAA,SAASA,MAAM,QAAQ,OAAO;AAC9B,SAASC,OAAO,QAAQ,iBAAiB;AAGzC,OAAO,SAASC,uBAAuBA,CAAyBC,MAAe,EAAE;EAC7E,MAAMC,gBAAgB,GAAGJ,MAAM,CAAU,KAAK,CAAC;EAC/C,IAAI,CAACI,gBAAgB,CAACC,OAAO,EAAE;IAC3BD,gBAAgB,CAACC,OAAO,GAAG,IAAI;IAC/BJ,OAAO,CAACK,QAAQ,CAACH,MAAM,CAAC;EAC5B;AACJ","ignoreList":[]}
package/hooks/useUi.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- import type { UiContextValue } from "../contexts/Ui";
1
+ import type { UiContextValue } from "../contexts/Ui/index.js";
2
2
  export declare const useUi: () => UiContextValue;
package/hooks/useUi.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import { useContext } from "react";
2
- import { UiContext } from "../contexts/Ui";
2
+ import { UiContext } from "../contexts/Ui/index.js";
3
3
  export const useUi = () => {
4
4
  return useContext(UiContext);
5
5
  };
@@ -1 +1 @@
1
- {"version":3,"names":["useContext","UiContext","useUi"],"sources":["useUi.ts"],"sourcesContent":["import { useContext } from \"react\";\nimport type { UiContextValue } from \"~/contexts/Ui\";\nimport { UiContext } from \"~/contexts/Ui\";\n\nexport const useUi = () => {\n return useContext(UiContext) as UiContextValue;\n};\n"],"mappings":"AAAA,SAASA,UAAU,QAAQ,OAAO;AAElC,SAASC,SAAS;AAElB,OAAO,MAAMC,KAAK,GAAGA,CAAA,KAAM;EACvB,OAAOF,UAAU,CAACC,SAAS,CAAC;AAChC,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["useContext","UiContext","useUi"],"sources":["useUi.ts"],"sourcesContent":["import { useContext } from \"react\";\nimport type { UiContextValue } from \"~/contexts/Ui/index.js\";\nimport { UiContext } from \"~/contexts/Ui/index.js\";\n\nexport const useUi = () => {\n return useContext(UiContext) as UiContextValue;\n};\n"],"mappings":"AAAA,SAASA,UAAU,QAAQ,OAAO;AAElC,SAASC,SAAS;AAElB,OAAO,MAAMC,KAAK,GAAGA,CAAA,KAAM;EACvB,OAAOF,UAAU,CAACC,SAAS,CAAC;AAChC,CAAC","ignoreList":[]}
package/i18n/index.d.ts CHANGED
@@ -1 +1 @@
1
- export { default as i18n } from "./i18n";
1
+ export { default as i18n } from "./i18n.js";
package/i18n/index.js CHANGED
@@ -1,3 +1,3 @@
1
- export { default as i18n } from "./i18n";
1
+ export { default as i18n } from "./i18n.js";
2
2
 
3
3
  //# sourceMappingURL=index.js.map
package/i18n/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"names":["default","i18n"],"sources":["index.ts"],"sourcesContent":["export { default as i18n } from \"./i18n\";\n"],"mappings":"AAAA,SAASA,OAAO,IAAIC,IAAI","ignoreList":[]}
1
+ {"version":3,"names":["default","i18n"],"sources":["index.ts"],"sourcesContent":["export { default as i18n } from \"./i18n.js\";\n"],"mappings":"AAAA,SAASA,OAAO,IAAIC,IAAI","ignoreList":[]}
package/index.d.ts CHANGED
@@ -1,17 +1,24 @@
1
- export { AddQuerySelectionPlugin } from "./plugins/AddQuerySelectionPlugin";
2
- export { ApolloLinkPlugin } from "./plugins/ApolloLinkPlugin";
3
- export { RoutePlugin } from "./plugins/RoutePlugin";
4
- export { ApolloCacheObjectIdPlugin, type ApolloCacheObject } from "./plugins/ApolloCacheObjectIdPlugin";
1
+ export { AddQuerySelectionPlugin } from "./plugins/AddQuerySelectionPlugin.js";
2
+ export { ApolloLinkPlugin } from "./plugins/ApolloLinkPlugin.js";
3
+ export { ApolloCacheObjectIdPlugin, type ApolloCacheObject } from "./plugins/ApolloCacheObjectIdPlugin.js";
5
4
  export * from "@webiny/react-composition";
6
5
  export type { HigherOrderComponent, ComposeProps, ComposableFC } from "@webiny/react-composition";
7
- export * from "./App";
8
- export * from "./AppContainer";
9
- export type { AppProps } from "./App";
10
- export * from "./core/Plugins";
11
- export * from "./core/Plugin";
12
- export * from "./core/Provider";
13
- export * from "./core/DebounceRender";
14
- export * from "./core/createProvider";
15
- export * from "./core/createProviderPlugin";
16
- export * from "./renderApp";
17
- export * from "./utils/createGenericContext";
6
+ export * from "./App.js";
7
+ export * from "./AppContainer.js";
8
+ export type { AppProps } from "./App.js";
9
+ export * from "./core/Plugins.js";
10
+ export * from "./core/Plugin.js";
11
+ export * from "./core/Provider.js";
12
+ export * from "./core/createProvider.js";
13
+ export * from "./core/createProviderPlugin.js";
14
+ export * from "./renderApp.js";
15
+ export * from "./utils/createGenericContext.js";
16
+ export { useContainer, DiContainerProvider } from "./shared/di/DiContainerProvider.js";
17
+ export { useFeature } from "./shared/di/useFeature.js";
18
+ export { createFeature } from "./shared/di/createFeature.js";
19
+ export { Route } from "./features/router/Route.js";
20
+ export { RouteLink, type RouteLinkProps } from "./presentation/router/components/RouteLink.js";
21
+ export { SimpleLink, type SimpleLinkProps } from "./presentation/router/components/SimpleLink.js";
22
+ export { useRouter, useRoute } from "./presentation/router/index.js";
23
+ export { useLocalStorage, useLocalStorageValue, useLocalStorageValues } from "./presentation/localStorage/index.js";
24
+ export * from "./helpers/InterfaceGenerator/index.js";
package/index.js CHANGED
@@ -1,20 +1,27 @@
1
- export { AddQuerySelectionPlugin } from "./plugins/AddQuerySelectionPlugin";
2
- export { ApolloLinkPlugin } from "./plugins/ApolloLinkPlugin";
3
- export { RoutePlugin } from "./plugins/RoutePlugin";
4
- export { ApolloCacheObjectIdPlugin } from "./plugins/ApolloCacheObjectIdPlugin";
1
+ export { AddQuerySelectionPlugin } from "./plugins/AddQuerySelectionPlugin.js";
2
+ export { ApolloLinkPlugin } from "./plugins/ApolloLinkPlugin.js";
3
+ export { ApolloCacheObjectIdPlugin } from "./plugins/ApolloCacheObjectIdPlugin.js";
5
4
 
6
5
  // Composition - we re-export this for ease of use
7
6
  export * from "@webiny/react-composition";
8
7
  // App framework
9
- export * from "./App";
10
- export * from "./AppContainer";
11
- export * from "./core/Plugins";
12
- export * from "./core/Plugin";
13
- export * from "./core/Provider";
14
- export * from "./core/DebounceRender";
15
- export * from "./core/createProvider";
16
- export * from "./core/createProviderPlugin";
17
- export * from "./renderApp";
18
- export * from "./utils/createGenericContext";
8
+ export * from "./App.js";
9
+ export * from "./AppContainer.js";
10
+ export * from "./core/Plugins.js";
11
+ export * from "./core/Plugin.js";
12
+ export * from "./core/Provider.js";
13
+ export * from "./core/createProvider.js";
14
+ export * from "./core/createProviderPlugin.js";
15
+ export * from "./renderApp.js";
16
+ export * from "./utils/createGenericContext.js";
17
+ export { useContainer, DiContainerProvider } from "./shared/di/DiContainerProvider.js";
18
+ export { useFeature } from "./shared/di/useFeature.js";
19
+ export { createFeature } from "./shared/di/createFeature.js";
20
+ export { Route } from "./features/router/Route.js";
21
+ export { RouteLink } from "./presentation/router/components/RouteLink.js";
22
+ export { SimpleLink } from "./presentation/router/components/SimpleLink.js";
23
+ export { useRouter, useRoute } from "./presentation/router/index.js";
24
+ export { useLocalStorage, useLocalStorageValue, useLocalStorageValues } from "./presentation/localStorage/index.js";
25
+ export * from "./helpers/InterfaceGenerator/index.js";
19
26
 
20
27
  //# sourceMappingURL=index.js.map
package/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"names":["AddQuerySelectionPlugin","ApolloLinkPlugin","RoutePlugin","ApolloCacheObjectIdPlugin"],"sources":["index.ts"],"sourcesContent":["export { AddQuerySelectionPlugin } from \"./plugins/AddQuerySelectionPlugin\";\nexport { ApolloLinkPlugin } from \"./plugins/ApolloLinkPlugin\";\nexport { RoutePlugin } from \"./plugins/RoutePlugin\";\nexport {\n ApolloCacheObjectIdPlugin,\n type ApolloCacheObject\n} from \"./plugins/ApolloCacheObjectIdPlugin\";\n\n// Composition - we re-export this for ease of use\nexport * from \"@webiny/react-composition\";\nexport type { HigherOrderComponent, ComposeProps, ComposableFC } from \"@webiny/react-composition\";\n\n// App framework\nexport * from \"./App\";\nexport * from \"./AppContainer\";\nexport type { AppProps } from \"./App\";\nexport * from \"./core/Plugins\";\nexport * from \"./core/Plugin\";\nexport * from \"./core/Provider\";\nexport * from \"./core/DebounceRender\";\nexport * from \"./core/createProvider\";\nexport * from \"./core/createProviderPlugin\";\nexport * from \"./renderApp\";\nexport * from \"./utils/createGenericContext\";\n"],"mappings":"AAAA,SAASA,uBAAuB;AAChC,SAASC,gBAAgB;AACzB,SAASC,WAAW;AACpB,SACIC,yBAAyB;;AAI7B;AACA,cAAc,2BAA2B;AAGzC;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA","ignoreList":[]}
1
+ {"version":3,"names":["AddQuerySelectionPlugin","ApolloLinkPlugin","ApolloCacheObjectIdPlugin","useContainer","DiContainerProvider","useFeature","createFeature","Route","RouteLink","SimpleLink","useRouter","useRoute","useLocalStorage","useLocalStorageValue","useLocalStorageValues"],"sources":["index.ts"],"sourcesContent":["export { AddQuerySelectionPlugin } from \"./plugins/AddQuerySelectionPlugin.js\";\nexport { ApolloLinkPlugin } from \"./plugins/ApolloLinkPlugin.js\";\nexport {\n ApolloCacheObjectIdPlugin,\n type ApolloCacheObject\n} from \"./plugins/ApolloCacheObjectIdPlugin.js\";\n\n// Composition - we re-export this for ease of use\nexport * from \"@webiny/react-composition\";\nexport type { HigherOrderComponent, ComposeProps, ComposableFC } from \"@webiny/react-composition\";\n\n// App framework\nexport * from \"./App.js\";\nexport * from \"./AppContainer.js\";\nexport type { AppProps } from \"./App.js\";\nexport * from \"./core/Plugins.js\";\nexport * from \"./core/Plugin.js\";\nexport * from \"./core/Provider.js\";\nexport * from \"./core/createProvider.js\";\nexport * from \"./core/createProviderPlugin.js\";\nexport * from \"./renderApp.js\";\nexport * from \"./utils/createGenericContext.js\";\nexport { useContainer, DiContainerProvider } from \"./shared/di/DiContainerProvider.js\";\nexport { useFeature } from \"./shared/di/useFeature.js\";\nexport { createFeature } from \"./shared/di/createFeature.js\";\n\nexport { Route } from \"./features/router/Route.js\";\nexport { RouteLink, type RouteLinkProps } from \"./presentation/router/components/RouteLink.js\";\nexport { SimpleLink, type SimpleLinkProps } from \"./presentation/router/components/SimpleLink.js\";\n\nexport { useRouter, useRoute } from \"./presentation/router/index.js\";\nexport {\n useLocalStorage,\n useLocalStorageValue,\n useLocalStorageValues\n} from \"./presentation/localStorage/index.js\";\n\nexport * from \"./helpers/InterfaceGenerator/index.js\";\n"],"mappings":"AAAA,SAASA,uBAAuB;AAChC,SAASC,gBAAgB;AACzB,SACIC,yBAAyB;;AAI7B;AACA,cAAc,2BAA2B;AAGzC;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAASC,YAAY,EAAEC,mBAAmB;AAC1C,SAASC,UAAU;AACnB,SAASC,aAAa;AAEtB,SAASC,KAAK;AACd,SAASC,SAAS;AAClB,SAASC,UAAU;AAEnB,SAASC,SAAS,EAAEC,QAAQ;AAC5B,SACIC,eAAe,EACfC,oBAAoB,EACpBC,qBAAqB;AAGzB","ignoreList":[]}
package/package.json CHANGED
@@ -1,6 +1,7 @@
1
1
  {
2
2
  "name": "@webiny/app",
3
- "version": "0.0.0-unstable.eb196ccd2f",
3
+ "version": "0.0.0-unstable.f6dc066313",
4
+ "type": "module",
4
5
  "main": "index.js",
5
6
  "repository": {
6
7
  "type": "git",
@@ -17,13 +18,13 @@
17
18
  "@apollo/react-hooks": "3.1.5",
18
19
  "@emotion/styled": "11.10.6",
19
20
  "@types/react": "18.2.79",
20
- "@webiny/i18n": "0.0.0-unstable.eb196ccd2f",
21
- "@webiny/i18n-react": "0.0.0-unstable.eb196ccd2f",
22
- "@webiny/plugins": "0.0.0-unstable.eb196ccd2f",
23
- "@webiny/react-composition": "0.0.0-unstable.eb196ccd2f",
24
- "@webiny/react-properties": "0.0.0-unstable.eb196ccd2f",
25
- "@webiny/react-router": "0.0.0-unstable.eb196ccd2f",
26
- "@webiny/ui": "0.0.0-unstable.eb196ccd2f",
21
+ "@webiny/di": "0.2.3",
22
+ "@webiny/feature": "0.0.0-unstable.f6dc066313",
23
+ "@webiny/i18n": "0.0.0-unstable.f6dc066313",
24
+ "@webiny/i18n-react": "0.0.0-unstable.f6dc066313",
25
+ "@webiny/plugins": "0.0.0-unstable.f6dc066313",
26
+ "@webiny/react-composition": "0.0.0-unstable.f6dc066313",
27
+ "@webiny/react-properties": "0.0.0-unstable.f6dc066313",
27
28
  "apollo-cache": "1.3.5",
28
29
  "apollo-cache-inmemory": "1.6.6",
29
30
  "apollo-client": "2.6.10",
@@ -34,31 +35,32 @@
34
35
  "apollo-utilities": "1.3.4",
35
36
  "boolean": "3.2.0",
36
37
  "bytes": "3.1.2",
37
- "graphql": "15.9.0",
38
+ "graphql": "16.13.0",
39
+ "history": "5.3.0",
38
40
  "invariant": "2.2.4",
39
- "lodash": "4.17.21",
40
- "minimatch": "5.1.6",
41
- "nanoid": "3.3.8",
41
+ "lodash": "4.17.23",
42
+ "minimatch": "10.2.4",
43
+ "mobx": "6.15.0",
44
+ "nanoid": "5.1.6",
42
45
  "react": "18.2.0",
43
46
  "react-dom": "18.2.0",
44
47
  "ts-invariant": "0.10.3",
45
- "warning": "4.0.3"
48
+ "warning": "4.0.3",
49
+ "zod": "3.25.76"
46
50
  },
47
51
  "devDependencies": {
48
- "@types/lodash": "4.17.13",
49
- "@types/warning": "3.0.0",
50
- "@webiny/project-utils": "0.0.0-unstable.eb196ccd2f",
51
- "rimraf": "6.0.1",
52
- "typescript": "5.3.3"
52
+ "@types/lodash": "4.17.24",
53
+ "@types/warning": "3.0.3",
54
+ "@webiny/build-tools": "0.0.0-unstable.f6dc066313",
55
+ "rimraf": "6.1.3",
56
+ "type-fest": "5.4.4",
57
+ "typescript": "5.9.3",
58
+ "vitest": "4.0.18"
53
59
  },
54
60
  "publishConfig": {
55
61
  "access": "public",
56
62
  "directory": "dist"
57
63
  },
58
- "scripts": {
59
- "build": "node ../cli/bin.js run build",
60
- "watch": "node ../cli/bin.js run watch"
61
- },
62
64
  "adio": {
63
65
  "ignore": {
64
66
  "dependencies": [
@@ -66,5 +68,5 @@
66
68
  ]
67
69
  }
68
70
  },
69
- "gitHead": "eb196ccd2f32296e10f7add6dd7220d4e3abece4"
71
+ "gitHead": "f6dc066313ddce5339d2aacec3aa84e61232689b"
70
72
  }
@@ -1,6 +1,6 @@
1
1
  import { ApolloLink } from "apollo-link";
2
2
  import type { DocumentNode } from "graphql";
3
- import { ApolloLinkPlugin } from "./ApolloLinkPlugin";
3
+ import { ApolloLinkPlugin } from "./ApolloLinkPlugin.js";
4
4
  declare module "graphql" {
5
5
  interface DocumentNode {
6
6
  __webiny__: Set<string>;
@@ -1,5 +1,5 @@
1
1
  import { ApolloLink } from "apollo-link";
2
- import { ApolloLinkPlugin } from "./ApolloLinkPlugin";
2
+ import { ApolloLinkPlugin } from "./ApolloLinkPlugin.js";
3
3
  export class AddQuerySelectionPlugin extends ApolloLinkPlugin {
4
4
  constructor(config) {
5
5
  super();
@@ -1 +1 @@
1
- {"version":3,"names":["ApolloLink","ApolloLinkPlugin","AddQuerySelectionPlugin","constructor","config","createLink","operation","forward","operationName","addSelectionToQuery","query","document","isProcessed","markProcessed","addSelection","selectionPath","firstQueryDefinition","definitions","selectionSet","tree","selections","fields","split","fieldLoop","field","selection","name","value","push","hasOwnProperty","__webiny__","Set","has","cacheKey","add"],"sources":["AddQuerySelectionPlugin.ts"],"sourcesContent":["import { ApolloLink } from \"apollo-link\";\nimport type { DocumentNode } from \"graphql\";\nimport { ApolloLinkPlugin } from \"./ApolloLinkPlugin\";\nimport type { ExecutableDefinitionNode, FieldNode } from \"graphql/language/ast\";\n\ndeclare module \"graphql\" {\n interface DocumentNode {\n __webiny__: Set<string>;\n }\n}\n\ninterface Config {\n operationName: string;\n selectionPath: string;\n addSelection: DocumentNode;\n}\n\nexport class AddQuerySelectionPlugin extends ApolloLinkPlugin {\n private readonly config: Config;\n\n constructor(config: Config) {\n super();\n this.config = config;\n }\n\n public override createLink(): ApolloLink {\n return new ApolloLink((operation, forward) => {\n if (operation.operationName !== this.config.operationName) {\n return forward(operation);\n }\n\n this.addSelectionToQuery(operation.operationName, operation.query);\n\n return forward(operation);\n });\n }\n\n public addSelectionToQuery(operationName: string, document: DocumentNode): void {\n if (operationName !== this.config.operationName) {\n return;\n }\n\n // If this plugin already processed the given document (documents are always passed by reference),\n // then we don't want to apply the selection again, to avoid adding duplicate selections.\n if (this.isProcessed(document)) {\n return;\n }\n\n this.markProcessed(document);\n\n const { addSelection, selectionPath } = this.config;\n\n const firstQueryDefinition = document.definitions[0] as ExecutableDefinitionNode;\n if (!firstQueryDefinition) {\n return;\n } else if (!firstQueryDefinition.selectionSet) {\n return;\n }\n\n let tree = firstQueryDefinition.selectionSet.selections as FieldNode[];\n const fields = selectionPath.split(\".\");\n\n fieldLoop: for (const field of fields) {\n for (const selection of tree) {\n if (!selection.selectionSet) {\n continue;\n }\n if (selection.name.value === field) {\n tree = selection.selectionSet.selections as FieldNode[];\n continue fieldLoop;\n }\n }\n // If we get here, it means we didn't find the necessary selection\n return;\n }\n /**\n * We must cast because there are a lot of types that are not intertwined and TS is complaining\n */\n tree.push(\n ...((addSelection.definitions[0] as ExecutableDefinitionNode).selectionSet\n .selections as FieldNode[])\n );\n }\n\n private isProcessed(document: DocumentNode) {\n if (!document.hasOwnProperty(\"__webiny__\")) {\n document.__webiny__ = new Set();\n }\n\n return document.__webiny__.has(this.cacheKey);\n }\n\n private markProcessed(document: DocumentNode) {\n if (!document.hasOwnProperty(\"__webiny__\")) {\n document.__webiny__ = new Set();\n }\n\n document.__webiny__.add(this.cacheKey);\n }\n}\n"],"mappings":"AAAA,SAASA,UAAU,QAAQ,aAAa;AAExC,SAASC,gBAAgB;AAezB,OAAO,MAAMC,uBAAuB,SAASD,gBAAgB,CAAC;EAG1DE,WAAWA,CAACC,MAAc,EAAE;IACxB,KAAK,CAAC,CAAC;IACP,IAAI,CAACA,MAAM,GAAGA,MAAM;EACxB;EAEgBC,UAAUA,CAAA,EAAe;IACrC,OAAO,IAAIL,UAAU,CAAC,CAACM,SAAS,EAAEC,OAAO,KAAK;MAC1C,IAAID,SAAS,CAACE,aAAa,KAAK,IAAI,CAACJ,MAAM,CAACI,aAAa,EAAE;QACvD,OAAOD,OAAO,CAACD,SAAS,CAAC;MAC7B;MAEA,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E;IACxC,IAAI,CAACA,QAAQ,CAACkB,cAAc,CAAC,YAAY,CAAC,EAAE;MACxClB,QAAQ,CAACmB,UAAU,GAAG,IAAIC,GAAG,CAAC,CAAC;IACnC;IAEA,OAAOpB,QAAQ,CAACmB,UAAU,CAACE,GAAG,CAAC,IAAI,CAACC,QAAQ,CAAC;EACjD;EAEQpB,aAAaA,CAACF,QAAsB,EAAE;IAC1C,IAAI,CAACA,QAAQ,CAACkB,cAAc,CAAC,YAAY,CAAC,EAAE;MACxClB,QAAQ,CAACmB,UAAU,GAAG,IAAIC,GAAG,CAAC,CAAC;IACnC;IAEApB,QAAQ,CAACmB,UAAU,CAACI,GAAG,CAAC,IAAI,CAACD,QAAQ,CAAC;EAC1C;AACJ","ignoreList":[]}
1
+ {"version":3,"names":["ApolloLink","ApolloLinkPlugin","AddQuerySelectionPlugin","constructor","config","createLink","operation","forward","operationName","addSelectionToQuery","query","document","isProcessed","markProcessed","addSelection","selectionPath","firstQueryDefinition","definitions","selectionSet","tree","selections","fields","split","fieldLoop","field","selection","name","value","push","hasOwnProperty","__webiny__","Set","has","cacheKey","add"],"sources":["AddQuerySelectionPlugin.ts"],"sourcesContent":["import { ApolloLink } from \"apollo-link\";\nimport type { DocumentNode } from \"graphql\";\nimport { ApolloLinkPlugin } from \"./ApolloLinkPlugin.js\";\nimport type { ExecutableDefinitionNode, FieldNode } from \"graphql/language/ast.js\";\n\ndeclare module \"graphql\" {\n interface DocumentNode {\n __webiny__: Set<string>;\n }\n}\n\ninterface Config {\n operationName: string;\n selectionPath: string;\n addSelection: DocumentNode;\n}\n\nexport class AddQuerySelectionPlugin extends ApolloLinkPlugin {\n private readonly config: Config;\n\n constructor(config: Config) {\n super();\n this.config = config;\n }\n\n public override createLink(): ApolloLink {\n return new ApolloLink((operation, forward) => {\n if (operation.operationName !== this.config.operationName) {\n return forward(operation);\n }\n\n this.addSelectionToQuery(operation.operationName, operation.query);\n\n return forward(operation);\n });\n }\n\n public addSelectionToQuery(operationName: string, document: DocumentNode): void {\n if (operationName !== this.config.operationName) {\n return;\n }\n\n // If this plugin already processed the given document (documents are always passed by reference),\n // then we don't want to apply the selection again, to avoid adding duplicate selections.\n if (this.isProcessed(document)) {\n return;\n }\n\n this.markProcessed(document);\n\n const { addSelection, selectionPath } = this.config;\n\n const firstQueryDefinition = document.definitions[0] as ExecutableDefinitionNode;\n if (!firstQueryDefinition) {\n return;\n } else if (!firstQueryDefinition.selectionSet) {\n return;\n }\n\n let tree = firstQueryDefinition.selectionSet.selections as FieldNode[];\n const fields = selectionPath.split(\".\");\n\n fieldLoop: for (const field of fields) {\n for (const selection of tree) {\n if (!selection.selectionSet) {\n continue;\n }\n if (selection.name.value === field) {\n tree = selection.selectionSet.selections as FieldNode[];\n continue fieldLoop;\n }\n }\n // If we get here, it means we didn't find the necessary selection\n return;\n }\n /**\n * We must cast because there are a lot of types that are not intertwined and TS is complaining\n */\n tree.push(\n ...((addSelection.definitions[0] as ExecutableDefinitionNode).selectionSet\n .selections as FieldNode[])\n );\n }\n\n private isProcessed(document: DocumentNode) {\n if (!document.hasOwnProperty(\"__webiny__\")) {\n document.__webiny__ = new Set();\n }\n\n return document.__webiny__.has(this.cacheKey);\n }\n\n private markProcessed(document: DocumentNode) {\n if (!document.hasOwnProperty(\"__webiny__\")) {\n document.__webiny__ = new Set();\n }\n\n document.__webiny__.add(this.cacheKey);\n }\n}\n"],"mappings":"AAAA,SAASA,UAAU,QAAQ,aAAa;AAExC,SAASC,gBAAgB;AAezB,OAAO,MAAMC,uBAAuB,SAASD,gBAAgB,CAAC;EAG1DE,WAAWA,CAACC,MAAc,EAAE;IACxB,KAAK,CAAC,CAAC;IACP,IAAI,CAACA,MAAM,GAAGA,MAAM;EACxB;EAEgBC,UAAUA,CAAA,EAAe;IACrC,OAAO,IAAIL,UAAU,CAAC,CAACM,SAAS,EAAEC,OAAO,KAAK;MAC1C,IAAID,SAAS,CAACE,aAAa,KAAK,IAAI,CAACJ,MAAM,CAACI,aAAa,E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,CACrEE,UACT,CAAC;EACL;EAEQR,WAAWA,CAACD,QAAsB,EAAE;IACxC,IAAI,CAACA,QAAQ,CAACkB,cAAc,CAAC,YAAY,CAAC,EAAE;MACxClB,QAAQ,CAACmB,UAAU,GAAG,IAAIC,GAAG,CAAC,CAAC;IACnC;IAEA,OAAOpB,QAAQ,CAACmB,UAAU,CAACE,GAAG,CAAC,IAAI,CAACC,QAAQ,CAAC;EACjD;EAEQpB,aAAaA,CAACF,QAAsB,EAAE;IAC1C,IAAI,CAACA,QAAQ,CAACkB,cAAc,CAAC,YAAY,CAAC,EAAE;MACxClB,QAAQ,CAACmB,UAAU,GAAG,IAAIC,GAAG,CAAC,CAAC;IACnC;IAEApB,QAAQ,CAACmB,UAAU,CAACI,GAAG,CAAC,IAAI,CAACD,QAAQ,CAAC;EAC1C;AACJ","ignoreList":[]}
@@ -1,6 +1,6 @@
1
1
  import type { NextLink } from "apollo-link";
2
2
  import { ApolloLink } from "apollo-link";
3
- import type { Operation } from "apollo-link/lib/types";
3
+ import type { Operation } from "apollo-link/lib/types.js";
4
4
  export declare class ApolloDynamicLink extends ApolloLink {
5
5
  private cache;
6
6
  request(operation: Operation, forward: NextLink): any;