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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (389) hide show
  1. package/App.d.ts +25 -0
  2. package/App.js +82 -0
  3. package/App.js.map +1 -0
  4. package/AppContainer.d.ts +23 -0
  5. package/AppContainer.js +6 -0
  6. package/AppContainer.js.map +1 -0
  7. package/README.md +7 -15
  8. package/apollo-client/InMemoryCache.d.ts +3 -2
  9. package/apollo-client/InMemoryCache.js +16 -77
  10. package/apollo-client/InMemoryCache.js.map +1 -1
  11. package/apollo-client/IntrospectionFragmentMatcher.d.ts +11 -0
  12. package/apollo-client/IntrospectionFragmentMatcher.js +33 -0
  13. package/apollo-client/IntrospectionFragmentMatcher.js.map +1 -0
  14. package/components/Image.d.ts +2 -3
  15. package/components/Image.js +15 -41
  16. package/components/Image.js.map +1 -1
  17. package/components/index.d.ts +1 -2
  18. package/components/index.js +1 -21
  19. package/config/RouterConfig/Route.d.ts +29 -0
  20. package/config/RouterConfig/Route.js +28 -0
  21. package/config/RouterConfig/Route.js.map +1 -0
  22. package/config/RouterConfig.d.ts +31 -0
  23. package/config/RouterConfig.js +19 -0
  24. package/config/RouterConfig.js.map +1 -0
  25. package/config.d.ts +1 -1
  26. package/config.js +20 -29
  27. package/config.js.map +1 -1
  28. package/contexts/Ui/index.d.ts +4 -8
  29. package/contexts/Ui/index.js +27 -89
  30. package/contexts/Ui/index.js.map +1 -1
  31. package/core/Plugin.d.ts +8 -0
  32. package/core/Plugin.js +12 -0
  33. package/core/Plugin.js.map +1 -0
  34. package/core/Plugins.d.ts +15 -0
  35. package/core/Plugins.js +21 -0
  36. package/core/Plugins.js.map +1 -0
  37. package/core/Provider.d.ts +8 -0
  38. package/core/Provider.js +10 -0
  39. package/core/Provider.js.map +1 -0
  40. package/core/createProvider.d.ts +10 -0
  41. package/core/createProvider.js +6 -0
  42. package/core/createProvider.js.map +1 -0
  43. package/core/createProviderPlugin.d.ts +8 -0
  44. package/core/createProviderPlugin.js +12 -0
  45. package/core/createProviderPlugin.js.map +1 -0
  46. package/errors/AuthenticationErrorEvent.d.ts +9 -0
  47. package/errors/AuthenticationErrorEvent.js +13 -0
  48. package/errors/AuthenticationErrorEvent.js.map +1 -0
  49. package/errors/NetworkErrorEvent.d.ts +15 -0
  50. package/errors/NetworkErrorEvent.js +13 -0
  51. package/errors/NetworkErrorEvent.js.map +1 -0
  52. package/errors/abstractions.d.ts +12 -0
  53. package/errors/abstractions.js +6 -0
  54. package/errors/abstractions.js.map +1 -0
  55. package/errors/index.d.ts +6 -0
  56. package/errors/index.js +3 -0
  57. package/exports/admin/env-config.d.ts +2 -0
  58. package/exports/admin/env-config.js +2 -0
  59. package/exports/admin/graphql-client.d.ts +1 -0
  60. package/exports/admin/graphql-client.js +1 -0
  61. package/exports/admin/local-storage.d.ts +2 -0
  62. package/exports/admin/local-storage.js +2 -0
  63. package/exports/admin/router.d.ts +5 -0
  64. package/exports/admin/router.js +5 -0
  65. package/exports/admin/security.d.ts +1 -0
  66. package/exports/admin/security.js +1 -0
  67. package/exports/admin.d.ts +7 -0
  68. package/exports/admin.js +7 -0
  69. package/features/envConfig/EnvConfig.d.ts +7 -0
  70. package/features/envConfig/EnvConfig.js +16 -0
  71. package/features/envConfig/EnvConfig.js.map +1 -0
  72. package/features/envConfig/abstractions.d.ts +28 -0
  73. package/features/envConfig/abstractions.js +5 -0
  74. package/features/envConfig/abstractions.js.map +1 -0
  75. package/features/envConfig/feature.d.ts +17 -0
  76. package/features/envConfig/feature.js +15 -0
  77. package/features/envConfig/feature.js.map +1 -0
  78. package/features/envConfig/index.d.ts +1 -0
  79. package/features/envConfig/index.js +1 -0
  80. package/features/eventPublisher/EventPublisher.d.ts +8 -0
  81. package/features/eventPublisher/EventPublisher.js +19 -0
  82. package/features/eventPublisher/EventPublisher.js.map +1 -0
  83. package/features/eventPublisher/abstractions.d.ts +18 -0
  84. package/features/eventPublisher/abstractions.js +12 -0
  85. package/features/eventPublisher/abstractions.js.map +1 -0
  86. package/features/eventPublisher/feature.d.ts +3 -0
  87. package/features/eventPublisher/feature.js +17 -0
  88. package/features/eventPublisher/feature.js.map +1 -0
  89. package/features/eventPublisher/index.d.ts +3 -0
  90. package/features/eventPublisher/index.js +2 -0
  91. package/features/graphqlClient/AuthenticationErrorPublishing.d.ts +13 -0
  92. package/features/graphqlClient/AuthenticationErrorPublishing.js +35 -0
  93. package/features/graphqlClient/AuthenticationErrorPublishing.js.map +1 -0
  94. package/features/graphqlClient/BatchingGraphQLClient.d.ts +16 -0
  95. package/features/graphqlClient/BatchingGraphQLClient.js +118 -0
  96. package/features/graphqlClient/BatchingGraphQLClient.js.map +1 -0
  97. package/features/graphqlClient/FetchGraphQLClient.d.ts +7 -0
  98. package/features/graphqlClient/FetchGraphQLClient.js +51 -0
  99. package/features/graphqlClient/FetchGraphQLClient.js.map +1 -0
  100. package/features/graphqlClient/NetworkErrorPublishing.d.ts +14 -0
  101. package/features/graphqlClient/NetworkErrorPublishing.js +48 -0
  102. package/features/graphqlClient/NetworkErrorPublishing.js.map +1 -0
  103. package/features/graphqlClient/RequestValue.d.ts +21 -0
  104. package/features/graphqlClient/RequestValue.js +46 -0
  105. package/features/graphqlClient/RequestValue.js.map +1 -0
  106. package/features/graphqlClient/RetryGraphQLClient.d.ts +18 -0
  107. package/features/graphqlClient/RetryGraphQLClient.js +45 -0
  108. package/features/graphqlClient/RetryGraphQLClient.js.map +1 -0
  109. package/features/graphqlClient/__tests__/GraphQLClient.test.d.ts +1 -0
  110. package/features/graphqlClient/__tests__/GraphQLClient.test.js +397 -0
  111. package/features/graphqlClient/__tests__/GraphQLClient.test.js.map +1 -0
  112. package/features/graphqlClient/abstractions.d.ts +18 -0
  113. package/features/graphqlClient/abstractions.js +5 -0
  114. package/features/graphqlClient/abstractions.js.map +1 -0
  115. package/features/graphqlClient/feature.d.ts +6 -0
  116. package/features/graphqlClient/feature.js +25 -0
  117. package/features/graphqlClient/feature.js.map +1 -0
  118. package/features/graphqlClient/index.d.ts +1 -0
  119. package/features/graphqlClient/index.js +1 -0
  120. package/features/graphqlClient/types.d.ts +5 -0
  121. package/features/graphqlClient/types.js +0 -0
  122. package/features/localStorage/BrowserLocalStorageGateway.d.ts +9 -0
  123. package/features/localStorage/BrowserLocalStorageGateway.js +61 -0
  124. package/features/localStorage/BrowserLocalStorageGateway.js.map +1 -0
  125. package/features/localStorage/LocalStorage.d.ts +12 -0
  126. package/features/localStorage/LocalStorage.js +34 -0
  127. package/features/localStorage/LocalStorage.js.map +1 -0
  128. package/features/localStorage/LocalStorageRepository.d.ts +20 -0
  129. package/features/localStorage/LocalStorageRepository.js +82 -0
  130. package/features/localStorage/LocalStorageRepository.js.map +1 -0
  131. package/features/localStorage/abstractions.d.ts +48 -0
  132. package/features/localStorage/abstractions.js +8 -0
  133. package/features/localStorage/abstractions.js.map +1 -0
  134. package/features/localStorage/feature.d.ts +12 -0
  135. package/features/localStorage/feature.js +23 -0
  136. package/features/localStorage/feature.js.map +1 -0
  137. package/features/localStorage/index.d.ts +1 -0
  138. package/features/localStorage/index.js +1 -0
  139. package/features/mainGraphQLClient/MainGraphQLClient.d.ts +11 -0
  140. package/features/mainGraphQLClient/MainGraphQLClient.js +27 -0
  141. package/features/mainGraphQLClient/MainGraphQLClient.js.map +1 -0
  142. package/features/mainGraphQLClient/abstractions.d.ts +17 -0
  143. package/features/mainGraphQLClient/abstractions.js +5 -0
  144. package/features/mainGraphQLClient/abstractions.js.map +1 -0
  145. package/features/mainGraphQLClient/feature.d.ts +3 -0
  146. package/features/mainGraphQLClient/feature.js +17 -0
  147. package/features/mainGraphQLClient/feature.js.map +1 -0
  148. package/features/mainGraphQLClient/index.d.ts +1 -0
  149. package/features/mainGraphQLClient/index.js +1 -0
  150. package/features/router/HistoryRouterGateway.d.ts +22 -0
  151. package/features/router/HistoryRouterGateway.js +88 -0
  152. package/features/router/HistoryRouterGateway.js.map +1 -0
  153. package/features/router/HistoryRouterGateway.test.d.ts +1 -0
  154. package/features/router/HistoryRouterGateway.test.js +195 -0
  155. package/features/router/HistoryRouterGateway.test.js.map +1 -0
  156. package/features/router/Route.d.ts +19 -0
  157. package/features/router/Route.js +43 -0
  158. package/features/router/Route.js.map +1 -0
  159. package/features/router/RouteUrl.d.ts +85 -0
  160. package/features/router/RouteUrl.js +99 -0
  161. package/features/router/RouteUrl.js.map +1 -0
  162. package/features/router/Router.d.ts +45 -0
  163. package/features/router/Router.js +72 -0
  164. package/features/router/Router.js.map +1 -0
  165. package/features/router/RouterPresenter.d.ts +21 -0
  166. package/features/router/RouterPresenter.js +52 -0
  167. package/features/router/RouterPresenter.js.map +1 -0
  168. package/features/router/RouterRepository.d.ts +30 -0
  169. package/features/router/RouterRepository.js +117 -0
  170. package/features/router/RouterRepository.js.map +1 -0
  171. package/features/router/RouterRepository.test.d.ts +1 -0
  172. package/features/router/RouterRepository.test.js +138 -0
  173. package/features/router/RouterRepository.test.js.map +1 -0
  174. package/features/router/abstractions.d.ts +81 -0
  175. package/features/router/abstractions.js +7 -0
  176. package/features/router/abstractions.js.map +1 -0
  177. package/features/router/feature.d.ts +4 -0
  178. package/features/router/feature.js +19 -0
  179. package/features/router/feature.js.map +1 -0
  180. package/features/router/index.d.ts +2 -0
  181. package/features/router/index.js +1 -0
  182. package/helpers/InterfaceGenerator/date.d.ts +15 -0
  183. package/helpers/InterfaceGenerator/date.js +0 -0
  184. package/helpers/InterfaceGenerator/id.d.ts +23 -0
  185. package/helpers/InterfaceGenerator/id.js +0 -0
  186. package/helpers/InterfaceGenerator/identity.d.ts +10 -0
  187. package/helpers/InterfaceGenerator/identity.js +0 -0
  188. package/helpers/InterfaceGenerator/index.d.ts +5 -0
  189. package/helpers/InterfaceGenerator/index.js +0 -0
  190. package/helpers/InterfaceGenerator/numeric.d.ts +12 -0
  191. package/helpers/InterfaceGenerator/numeric.js +0 -0
  192. package/helpers/InterfaceGenerator/truthful.d.ts +7 -0
  193. package/helpers/InterfaceGenerator/truthful.js +0 -0
  194. package/hooks/useAutocomplete/index.d.ts +1 -1
  195. package/hooks/useAutocomplete/index.js +1 -13
  196. package/hooks/useAutocomplete/useAutocomplete.d.ts +1 -1
  197. package/hooks/useAutocomplete/useAutocomplete.js +15 -36
  198. package/hooks/useAutocomplete/useAutocomplete.js.map +1 -1
  199. package/hooks/useDataList/functions/getData.js +4 -15
  200. package/hooks/useDataList/functions/getData.js.map +1 -1
  201. package/hooks/useDataList/functions/getError.js +4 -15
  202. package/hooks/useDataList/functions/getError.js.map +1 -1
  203. package/hooks/useDataList/functions/getMeta.js +4 -15
  204. package/hooks/useDataList/functions/getMeta.js.map +1 -1
  205. package/hooks/useDataList/functions/index.d.ts +3 -3
  206. package/hooks/useDataList/functions/index.js +3 -31
  207. package/hooks/useDataList/functions/searchDataByKey.js +10 -26
  208. package/hooks/useDataList/functions/searchDataByKey.js.map +1 -1
  209. package/hooks/useDataList/index.d.ts +1 -1
  210. package/hooks/useDataList/index.js +1 -13
  211. package/hooks/useDataList/useDataList.d.ts +2 -3
  212. package/hooks/useDataList/useDataList.js +139 -205
  213. package/hooks/useDataList/useDataList.js.map +1 -1
  214. package/hooks/useDataList/utils/index.d.ts +1 -2
  215. package/hooks/useDataList/utils/index.js +1 -23
  216. package/hooks/useDataList/utils/prepareLoadListParams.d.ts +1 -2
  217. package/hooks/useDataList/utils/prepareLoadListParams.js +26 -45
  218. package/hooks/useDataList/utils/prepareLoadListParams.js.map +1 -1
  219. package/hooks/useHandler.js +14 -19
  220. package/hooks/useHandler.js.map +1 -1
  221. package/hooks/useHandlers.d.ts +3 -3
  222. package/hooks/useHandlers.js +19 -28
  223. package/hooks/useHandlers.js.map +1 -1
  224. package/hooks/useRegisterLegacyPlugin.d.ts +2 -0
  225. package/hooks/useRegisterLegacyPlugin.js +12 -0
  226. package/hooks/useRegisterLegacyPlugin.js.map +1 -0
  227. package/hooks/useUi.d.ts +1 -1
  228. package/hooks/useUi.js +5 -15
  229. package/hooks/useUi.js.map +1 -1
  230. package/i18n/i18n.js +11 -21
  231. package/i18n/i18n.js.map +1 -1
  232. package/i18n/index.d.ts +1 -1
  233. package/i18n/index.js +1 -15
  234. package/index.d.ts +25 -4
  235. package/index.js +23 -37
  236. package/package.json +38 -38
  237. package/plugins/AddQuerySelectionPlugin.d.ts +10 -3
  238. package/plugins/AddQuerySelectionPlugin.js +43 -128
  239. package/plugins/AddQuerySelectionPlugin.js.map +1 -1
  240. package/plugins/ApolloCacheObjectIdPlugin.js +15 -51
  241. package/plugins/ApolloCacheObjectIdPlugin.js.map +1 -1
  242. package/plugins/ApolloDynamicLink.d.ts +3 -2
  243. package/plugins/ApolloDynamicLink.js +24 -78
  244. package/plugins/ApolloDynamicLink.js.map +1 -1
  245. package/plugins/ApolloLinkPlugin.d.ts +1 -1
  246. package/plugins/ApolloLinkPlugin.js +21 -61
  247. package/plugins/ApolloLinkPlugin.js.map +1 -1
  248. package/plugins/ConsoleLinkPlugin.d.ts +1 -1
  249. package/plugins/ConsoleLinkPlugin.js +20 -59
  250. package/plugins/ConsoleLinkPlugin.js.map +1 -1
  251. package/plugins/NetworkErrorLinkPlugin/ErrorOverlay.d.ts +8 -13
  252. package/plugins/NetworkErrorLinkPlugin/ErrorOverlay.js +47 -95
  253. package/plugins/NetworkErrorLinkPlugin/ErrorOverlay.js.map +1 -1
  254. package/plugins/NetworkErrorLinkPlugin/GqlErrorOverlay.d.ts +14 -0
  255. package/plugins/NetworkErrorLinkPlugin/GqlErrorOverlay.js +27 -0
  256. package/plugins/NetworkErrorLinkPlugin/GqlErrorOverlay.js.map +1 -0
  257. package/plugins/NetworkErrorLinkPlugin/LocalAwsLambdaTimeoutMessage.d.ts +2 -0
  258. package/plugins/NetworkErrorLinkPlugin/LocalAwsLambdaTimeoutMessage.js +23 -0
  259. package/plugins/NetworkErrorLinkPlugin/LocalAwsLambdaTimeoutMessage.js.map +1 -0
  260. package/plugins/NetworkErrorLinkPlugin/StyledComponents.d.ts +8 -5
  261. package/plugins/NetworkErrorLinkPlugin/StyledComponents.js +68 -20
  262. package/plugins/NetworkErrorLinkPlugin/StyledComponents.js.map +1 -1
  263. package/plugins/NetworkErrorLinkPlugin/Typography.d.ts +8 -0
  264. package/plugins/NetworkErrorLinkPlugin/Typography.js +13 -0
  265. package/plugins/NetworkErrorLinkPlugin/Typography.js.map +1 -0
  266. package/plugins/NetworkErrorLinkPlugin/assets/close_24px.js +19 -0
  267. package/plugins/NetworkErrorLinkPlugin/assets/close_24px.js.map +1 -0
  268. package/plugins/NetworkErrorLinkPlugin/createErrorOverlay.d.ts +3 -3
  269. package/plugins/NetworkErrorLinkPlugin/createErrorOverlay.js +13 -36
  270. package/plugins/NetworkErrorLinkPlugin/createErrorOverlay.js.map +1 -1
  271. package/plugins/NetworkErrorLinkPlugin.d.ts +4 -1
  272. package/plugins/NetworkErrorLinkPlugin.js +51 -63
  273. package/plugins/NetworkErrorLinkPlugin.js.map +1 -1
  274. package/plugins/OmitTypenameLinkPlugin.d.ts +1 -1
  275. package/plugins/OmitTypenameLinkPlugin.js +12 -51
  276. package/plugins/OmitTypenameLinkPlugin.js.map +1 -1
  277. package/plugins/TenantHeaderLinkPlugin.d.ts +3 -8
  278. package/plugins/TenantHeaderLinkPlugin.js +25 -82
  279. package/plugins/TenantHeaderLinkPlugin.js.map +1 -1
  280. package/plugins/components/Image.d.ts +6 -0
  281. package/plugins/components/Image.js +12 -0
  282. package/plugins/components/Image.js.map +1 -0
  283. package/plugins/image.d.ts +1 -1
  284. package/plugins/image.js +97 -175
  285. package/plugins/image.js.map +1 -1
  286. package/plugins/index.d.ts +5 -5
  287. package/plugins/index.js +38 -106
  288. package/plugins/index.js.map +1 -1
  289. package/presentation/envConfig/useEnvConfig.d.ts +6 -0
  290. package/presentation/envConfig/useEnvConfig.js +9 -0
  291. package/presentation/envConfig/useEnvConfig.js.map +1 -0
  292. package/presentation/localStorage/index.d.ts +3 -0
  293. package/presentation/localStorage/index.js +3 -0
  294. package/presentation/localStorage/useLocalStorage.d.ts +6 -0
  295. package/presentation/localStorage/useLocalStorage.js +15 -0
  296. package/presentation/localStorage/useLocalStorage.js.map +1 -0
  297. package/presentation/localStorage/useLocalStorageValue.d.ts +1 -0
  298. package/presentation/localStorage/useLocalStorageValue.js +22 -0
  299. package/presentation/localStorage/useLocalStorageValue.js.map +1 -0
  300. package/presentation/localStorage/useLocalStorageValues.d.ts +5 -0
  301. package/presentation/localStorage/useLocalStorageValues.js +32 -0
  302. package/presentation/localStorage/useLocalStorageValues.js.map +1 -0
  303. package/presentation/router/RouteElementRegistry.d.ts +14 -0
  304. package/presentation/router/RouteElementRegistry.js +29 -0
  305. package/presentation/router/RouteElementRegistry.js.map +1 -0
  306. package/presentation/router/abstractions.d.ts +13 -0
  307. package/presentation/router/abstractions.js +5 -0
  308. package/presentation/router/abstractions.js.map +1 -0
  309. package/presentation/router/components/Redirect.d.ts +14 -0
  310. package/presentation/router/components/Redirect.js +13 -0
  311. package/presentation/router/components/Redirect.js.map +1 -0
  312. package/presentation/router/components/RouteContent.d.ts +2 -0
  313. package/presentation/router/components/RouteContent.js +20 -0
  314. package/presentation/router/components/RouteContent.js.map +1 -0
  315. package/presentation/router/components/RouteLink.d.ts +50 -0
  316. package/presentation/router/components/RouteLink.js +17 -0
  317. package/presentation/router/components/RouteLink.js.map +1 -0
  318. package/presentation/router/components/SimpleLink.d.ts +44 -0
  319. package/presentation/router/components/SimpleLink.js +24 -0
  320. package/presentation/router/components/SimpleLink.js.map +1 -0
  321. package/presentation/router/hooks/useRoute.d.ts +6 -0
  322. package/presentation/router/hooks/useRoute.js +22 -0
  323. package/presentation/router/hooks/useRoute.js.map +1 -0
  324. package/presentation/router/hooks/useRouter.d.ts +11 -0
  325. package/presentation/router/hooks/useRouter.js +29 -0
  326. package/presentation/router/hooks/useRouter.js.map +1 -0
  327. package/presentation/router/index.d.ts +4 -0
  328. package/presentation/router/index.js +3 -0
  329. package/presentation/router/types.d.ts +5 -0
  330. package/presentation/router/types.js +0 -0
  331. package/renderApp.d.ts +2 -0
  332. package/renderApp.js +10 -0
  333. package/renderApp.js.map +1 -0
  334. package/router.d.ts +5 -0
  335. package/router.js +5 -0
  336. package/rslib-runtime.js +14 -0
  337. package/rslib-runtime.js.map +1 -0
  338. package/shared/di/DiContainerProvider.d.ts +8 -0
  339. package/shared/di/DiContainerProvider.js +13 -0
  340. package/shared/di/DiContainerProvider.js.map +1 -0
  341. package/shared/di/createFeature.d.ts +11 -0
  342. package/shared/di/createFeature.js +10 -0
  343. package/shared/di/createFeature.js.map +1 -0
  344. package/shared/di/useFeature.d.ts +2 -0
  345. package/shared/di/useFeature.js +12 -0
  346. package/shared/di/useFeature.js.map +1 -0
  347. package/static/svg/close_24px.33adaadc.svg +1 -0
  348. package/types.d.ts +30 -30
  349. package/types.js +0 -13
  350. package/utils/createGenericContext.d.ts +13 -0
  351. package/utils/createGenericContext.js +21 -0
  352. package/utils/createGenericContext.js.map +1 -0
  353. package/utils/createHashing.d.ts +2 -0
  354. package/utils/createHashing.js +15 -0
  355. package/utils/createHashing.js.map +1 -0
  356. package/utils/index.d.ts +2 -0
  357. package/utils/index.js +2 -0
  358. package/utils/legacyPluginToReactComponent.d.ts +7 -0
  359. package/utils/legacyPluginToReactComponent.js +15 -0
  360. package/utils/legacyPluginToReactComponent.js.map +1 -0
  361. package/components/Routes.d.ts +0 -2
  362. package/components/Routes.js +0 -49
  363. package/components/Routes.js.map +0 -1
  364. package/components/View.d.ts +0 -8
  365. package/components/View.js +0 -41
  366. package/components/View.js.map +0 -1
  367. package/components/index.js.map +0 -1
  368. package/hooks/useAutocomplete/index.js.map +0 -1
  369. package/hooks/useDataList/functions/index.js.map +0 -1
  370. package/hooks/useDataList/index.js.map +0 -1
  371. package/hooks/useDataList/utils/index.js.map +0 -1
  372. package/hooks/useDataList/utils/redirectToRouteWithQueryParams.d.ts +0 -14
  373. package/hooks/useDataList/utils/redirectToRouteWithQueryParams.js +0 -31
  374. package/hooks/useDataList/utils/redirectToRouteWithQueryParams.js.map +0 -1
  375. package/hooks/useDataList/utils/types.d.ts +0 -34
  376. package/hooks/useDataList/utils/types.js +0 -5
  377. package/hooks/useDataList/utils/types.js.map +0 -1
  378. package/i18n/index.js.map +0 -1
  379. package/index.js.map +0 -1
  380. package/plugins/LocaleHeaderLinkPlugin.d.ts +0 -15
  381. package/plugins/LocaleHeaderLinkPlugin.js +0 -77
  382. package/plugins/LocaleHeaderLinkPlugin.js.map +0 -1
  383. package/plugins/RoutePlugin.d.ts +0 -12
  384. package/plugins/RoutePlugin.js +0 -53
  385. package/plugins/RoutePlugin.js.map +0 -1
  386. package/plugins/ViewPlugin.d.ts +0 -14
  387. package/plugins/ViewPlugin.js +0 -58
  388. package/plugins/ViewPlugin.js.map +0 -1
  389. package/types.js.map +0 -1
@@ -0,0 +1,12 @@
1
+ import { useMemo } from "react";
2
+ import { useContainer } from "./DiContainerProvider.js";
3
+ function useFeature(feature) {
4
+ const container = useContainer();
5
+ return useMemo(()=>feature.resolve(container), [
6
+ container,
7
+ feature
8
+ ]);
9
+ }
10
+ export { useFeature };
11
+
12
+ //# sourceMappingURL=useFeature.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"shared/di/useFeature.js","sources":["../../../src/shared/di/useFeature.ts"],"sourcesContent":["import { useMemo } from \"react\";\nimport { useContainer } from \"./DiContainerProvider.js\";\nimport { FeatureDefinition } from \"./createFeature.js\";\n\nexport function useFeature<TExports>(feature: FeatureDefinition<TExports, any[]>): TExports {\n const container = useContainer();\n\n return useMemo(() => feature.resolve(container), [container, feature]);\n}\n"],"names":["useFeature","feature","container","useContainer","useMemo"],"mappings":";;AAIO,SAASA,WAAqBC,OAA2C;IAC5E,MAAMC,YAAYC;IAElB,OAAOC,QAAQ,IAAMH,QAAQ,OAAO,CAACC,YAAY;QAACA;QAAWD;KAAQ;AACzE"}
@@ -0,0 +1 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 0 24 24" width="24px" fill="#000000"><path d="M0 0h24v24H0V0z" fill="none"/><path d="M18.3 5.71c-.39-.39-1.02-.39-1.41 0L12 10.59 7.11 5.7c-.39-.39-1.02-.39-1.41 0-.39.39-.39 1.02 0 1.41L10.59 12 5.7 16.89c-.39.39-.39 1.02 0 1.41.39.39 1.02.39 1.41 0L12 13.41l4.89 4.89c.39.39 1.02.39 1.41 0 .39-.39.39-1.02 0-1.41L13.41 12l4.89-4.89c.38-.38.38-1.02 0-1.4z"/></svg>
package/types.d.ts CHANGED
@@ -1,37 +1,35 @@
1
- import * as React from "react";
2
- import { Plugin } from "@webiny/plugins/types";
3
- import { ApolloClient } from "apollo-client";
4
- import { CSSProperties } from "react";
5
- export interface FileItem {
6
- id: string;
7
- name: string;
8
- key: string;
9
- src: string;
10
- size: number;
11
- type: string;
12
- tags: string[];
13
- createdOn: string;
14
- createdBy: {
15
- id: string;
16
- };
17
- [key: string]: any;
18
- }
19
- export declare type UploadOptions = {
1
+ import type * as React from "react";
2
+ import type { CSSProperties } from "react";
3
+ import { Plugin } from "@webiny/plugins/types.js";
4
+ import type { ApolloClient } from "apollo-client";
5
+ export type GenericRecordKey = string | number | symbol;
6
+ export type GenericRecord<K extends GenericRecordKey = GenericRecordKey, V = any> = Record<K, V>;
7
+ export type NonEmptyArray<T> = [T, ...T[]];
8
+ export type UploadOptions = {
20
9
  apolloClient: ApolloClient<object>;
10
+ onProgress?: (params: {
11
+ sent: number;
12
+ total: number;
13
+ percentage: number;
14
+ }) => void;
21
15
  };
22
- export declare type UiStatePlugin = Plugin & {
16
+ export type UiStatePlugin = Plugin & {
23
17
  type: "ui-state";
24
18
  render(): React.ReactElement;
25
19
  };
26
- export declare type FileUploaderPlugin = Plugin & {
20
+ export interface UploadedFile {
21
+ id: string;
22
+ name: string;
23
+ type: string;
24
+ size: number;
25
+ key: string;
26
+ }
27
+ export type FileUploaderPlugin = Plugin & {
27
28
  type: "file-uploader";
28
- upload(file: FileItem, options: UploadOptions): Promise<any>;
29
- };
30
- export declare type AppFileManagerStoragePlugin = Plugin & {
31
- type: "app-file-manager-storage";
32
- upload(file: FileItem, options: UploadOptions): Promise<any>;
29
+ name: "file-uploader";
30
+ upload(file: File, options: UploadOptions): Promise<UploadedFile>;
33
31
  };
34
- export { Plugin };
32
+ export type { Plugin };
35
33
  export interface ImageProps {
36
34
  src: string;
37
35
  preset?: string;
@@ -52,7 +50,7 @@ export interface ImageProps {
52
50
  * "getImageSrc" has to be defined as a separate property, so its functionality can be reused outside of
53
51
  * the Image component. This is ideal in cases where manual creation of image src is needed.
54
52
  */
55
- export declare type ImageComponentPlugin = Plugin & {
53
+ export type ImageComponentPlugin = Plugin & {
56
54
  type: "image-component";
57
55
  render: (props: ImageProps) => React.ReactElement;
58
56
  getImageSrc: (props?: Record<string, any>) => string;
@@ -64,7 +62,9 @@ export declare type ImageComponentPlugin = Plugin & {
64
62
  * Enables registering new routes.
65
63
  * @see https://docs.webiny.com/docs/webiny-apps/admin/development/plugins-reference/app#route
66
64
  */
67
- export declare type RoutePlugin = Plugin & {
65
+ export type RoutePlugin = Plugin & {
68
66
  type: "route";
69
- route: React.ReactElement;
67
+ route: React.ReactElement<{
68
+ path: string;
69
+ }>;
70
70
  };
package/types.js CHANGED
@@ -1,13 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- Object.defineProperty(exports, "Plugin", {
7
- enumerable: true,
8
- get: function get() {
9
- return _types.Plugin;
10
- }
11
- });
12
-
13
- var _types = require("@webiny/plugins/types");
@@ -0,0 +1,13 @@
1
+ import React from "react";
2
+ export type CreateGenericContext<T = any> = T;
3
+ type GenericContextProviderProps<T> = T & {
4
+ children: React.ReactNode;
5
+ };
6
+ export declare function createGenericContext<T>(name: string): {
7
+ Provider: {
8
+ ({ children, ...props }: GenericContextProviderProps<T>): React.JSX.Element;
9
+ displayName: string;
10
+ };
11
+ useHook: () => NonNullable<T>;
12
+ };
13
+ export {};
@@ -0,0 +1,21 @@
1
+ import react, { createContext } from "react";
2
+ function createGenericContext(name) {
3
+ const GenericContext = /*#__PURE__*/ createContext(void 0);
4
+ function Provider({ children, ...props }) {
5
+ return /*#__PURE__*/ react.createElement(GenericContext.Provider, {
6
+ value: props
7
+ }, children);
8
+ }
9
+ Provider.displayName = `${name}Provider`;
10
+ return {
11
+ Provider,
12
+ useHook: ()=>{
13
+ const context = react.useContext(GenericContext);
14
+ if (!context) throw Error(`Context provider for "${name}" is missing in the component tree!`);
15
+ return context;
16
+ }
17
+ };
18
+ }
19
+ export { createGenericContext };
20
+
21
+ //# sourceMappingURL=createGenericContext.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"utils/createGenericContext.js","sources":["../../src/utils/createGenericContext.tsx"],"sourcesContent":["import React, { createContext } from \"react\";\n\nexport type CreateGenericContext<T = any> = T;\n\ntype GenericContextProviderProps<T> = T & {\n children: React.ReactNode;\n};\n\nexport function createGenericContext<T>(name: string) {\n const GenericContext = createContext<CreateGenericContext | undefined>(undefined);\n\n function Provider({ children, ...props }: GenericContextProviderProps<T>) {\n return <GenericContext.Provider value={props}>{children}</GenericContext.Provider>;\n }\n\n Provider.displayName = `${name}Provider`;\n\n return {\n Provider,\n useHook: () => {\n const context = React.useContext<CreateGenericContext<T>>(\n GenericContext as unknown as React.Context<CreateGenericContext<T>>\n );\n\n if (!context) {\n throw Error(`Context provider for \"${name}\" is missing in the component tree!`);\n }\n\n return context;\n }\n };\n}\n"],"names":["createGenericContext","name","GenericContext","createContext","undefined","Provider","children","props","context","React","Error"],"mappings":";AAQO,SAASA,qBAAwBC,IAAY;IAChD,MAAMC,iBAAiB,WAAjBA,GAAiBC,cAAgDC;IAEvE,SAASC,SAAS,EAAEC,QAAQ,EAAE,GAAGC,OAAuC;QACpE,OAAO,WAAP,GAAO,oBAACL,eAAe,QAAQ;YAAC,OAAOK;WAAQD;IACnD;IAEAD,SAAS,WAAW,GAAG,GAAGJ,KAAK,QAAQ,CAAC;IAExC,OAAO;QACHI;QACA,SAAS;YACL,MAAMG,UAAUC,MAAAA,UAAgB,CAC5BP;YAGJ,IAAI,CAACM,SACD,MAAME,MAAM,CAAC,sBAAsB,EAAET,KAAK,mCAAmC,CAAC;YAGlF,OAAOO;QACX;IACJ;AACJ"}
@@ -0,0 +1,2 @@
1
+ export type IHashingAlgorithm = "SHA-1" | "SHA-256" | "SHA-512";
2
+ export declare const createHashing: (algorithm: IHashingAlgorithm) => (value: unknown) => Promise<string>;
@@ -0,0 +1,15 @@
1
+ const createHashing = (algorithm)=>async (value)=>{
2
+ const data = JSON.stringify(value);
3
+ return new Promise((resolve)=>{
4
+ window.crypto.subtle.digest(algorithm, new TextEncoder().encode(data)).then((encoded)=>{
5
+ const hexes = [];
6
+ const view = new DataView(encoded);
7
+ for(let i = 0; i < view.byteLength; i += 4)hexes.push(("00000000" + view.getUint32(i).toString(16)).slice(-8));
8
+ const hash = hexes.join("");
9
+ resolve(hash);
10
+ });
11
+ });
12
+ };
13
+ export { createHashing };
14
+
15
+ //# sourceMappingURL=createHashing.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"utils/createHashing.js","sources":["../../src/utils/createHashing.ts"],"sourcesContent":["export type IHashingAlgorithm = \"SHA-1\" | \"SHA-256\" | \"SHA-512\";\n\nexport const createHashing = (algorithm: IHashingAlgorithm) => {\n return async (value: unknown) => {\n const data = JSON.stringify(value);\n return new Promise<string>(resolve => {\n window.crypto.subtle.digest(algorithm, new TextEncoder().encode(data)).then(encoded => {\n const hexes: string[] = [];\n const view = new DataView(encoded);\n for (let i = 0; i < view.byteLength; i += 4) {\n hexes.push((\"00000000\" + view.getUint32(i).toString(16)).slice(-8));\n }\n const hash = hexes.join(\"\");\n resolve(hash);\n });\n });\n };\n};\n"],"names":["createHashing","algorithm","value","data","JSON","Promise","resolve","window","TextEncoder","encoded","hexes","view","DataView","i","hash"],"mappings":"AAEO,MAAMA,gBAAgB,CAACC,YACnB,OAAOC;QACV,MAAMC,OAAOC,KAAK,SAAS,CAACF;QAC5B,OAAO,IAAIG,QAAgBC,CAAAA;YACvBC,OAAO,MAAM,CAAC,MAAM,CAAC,MAAM,CAACN,WAAW,IAAIO,cAAc,MAAM,CAACL,OAAO,IAAI,CAACM,CAAAA;gBACxE,MAAMC,QAAkB,EAAE;gBAC1B,MAAMC,OAAO,IAAIC,SAASH;gBAC1B,IAAK,IAAII,IAAI,GAAGA,IAAIF,KAAK,UAAU,EAAEE,KAAK,EACtCH,MAAM,IAAI,CAAE,cAAaC,KAAK,SAAS,CAACE,GAAG,QAAQ,CAAC,GAAE,EAAG,KAAK,CAAC;gBAEnE,MAAMC,OAAOJ,MAAM,IAAI,CAAC;gBACxBJ,QAAQQ;YACZ;QACJ;IACJ"}
@@ -0,0 +1,2 @@
1
+ export * from "./createHashing.js";
2
+ export * from "./legacyPluginToReactComponent.js";
package/utils/index.js ADDED
@@ -0,0 +1,2 @@
1
+ export * from "./createHashing.js";
2
+ export * from "./legacyPluginToReactComponent.js";
@@ -0,0 +1,7 @@
1
+ import type React from "react";
2
+ export interface LegacyPluginToReactComponentParams<TProps extends Record<string, any>> {
3
+ pluginType: string;
4
+ componentDisplayName: string;
5
+ mapProps?: (props: TProps) => TProps;
6
+ }
7
+ export declare const legacyPluginToReactComponent: <TProps extends Record<string, any>>(params: LegacyPluginToReactComponentParams<TProps>) => React.FunctionComponent<TProps>;
@@ -0,0 +1,15 @@
1
+ import { useRegisterLegacyPlugin } from "../hooks/useRegisterLegacyPlugin.js";
2
+ const legacyPluginToReactComponent = function(params) {
3
+ const Component = (props)=>{
4
+ const plugin = Object.assign({
5
+ type: params.pluginType
6
+ }, params.mapProps ? params.mapProps(props) : props);
7
+ useRegisterLegacyPlugin(plugin);
8
+ return null;
9
+ };
10
+ Component.displayName = params.componentDisplayName;
11
+ return Component;
12
+ };
13
+ export { legacyPluginToReactComponent };
14
+
15
+ //# sourceMappingURL=legacyPluginToReactComponent.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"utils/legacyPluginToReactComponent.js","sources":["../../src/utils/legacyPluginToReactComponent.ts"],"sourcesContent":["import type React from \"react\";\nimport { useRegisterLegacyPlugin } from \"~/hooks/useRegisterLegacyPlugin.js\";\n\nexport interface LegacyPluginToReactComponentParams<TProps extends Record<string, any>> {\n pluginType: string;\n componentDisplayName: string;\n mapProps?: (props: TProps) => TProps;\n}\n\nexport const legacyPluginToReactComponent = function <TProps extends Record<string, any>>(\n params: LegacyPluginToReactComponentParams<TProps>\n) {\n const Component: React.ComponentType<TProps> = props => {\n const plugin = Object.assign(\n { type: params.pluginType },\n params.mapProps ? params.mapProps(props) : props\n );\n useRegisterLegacyPlugin(plugin);\n return null;\n };\n\n Component.displayName = params.componentDisplayName;\n\n return Component;\n};\n"],"names":["legacyPluginToReactComponent","params","Component","props","plugin","Object","useRegisterLegacyPlugin"],"mappings":";AASO,MAAMA,+BAA+B,SACxCC,MAAkD;IAElD,MAAMC,YAAyCC,CAAAA;QAC3C,MAAMC,SAASC,OAAO,MAAM,CACxB;YAAE,MAAMJ,OAAO,UAAU;QAAC,GAC1BA,OAAO,QAAQ,GAAGA,OAAO,QAAQ,CAACE,SAASA;QAE/CG,wBAAwBF;QACxB,OAAO;IACX;IAEAF,UAAU,WAAW,GAAGD,OAAO,oBAAoB;IAEnD,OAAOC;AACX"}
@@ -1,2 +0,0 @@
1
- /// <reference types="react" />
2
- export declare const Routes: () => JSX.Element;
@@ -1,49 +0,0 @@
1
- "use strict";
2
-
3
- var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
4
-
5
- Object.defineProperty(exports, "__esModule", {
6
- value: true
7
- });
8
- exports.Routes = void 0;
9
-
10
- var _toConsumableArray2 = _interopRequireDefault(require("@babel/runtime/helpers/toConsumableArray"));
11
-
12
- var _react = _interopRequireDefault(require("react"));
13
-
14
- var _plugins = require("@webiny/plugins");
15
-
16
- var _reactRouter = require("@webiny/react-router");
17
-
18
- var Routes = function Routes() {
19
- // We cannot call `sort` on the array returned by the `plugins.byType` call - it is read-only.
20
- var routes = (0, _toConsumableArray2.default)(_plugins.plugins.byType("route")).sort(function (a, b) {
21
- var pathA = a.route.props.path || "*";
22
- var pathB = b.route.props.path || "*"; // This will sort paths at the very bottom of the list
23
-
24
- if (pathA === "/" && pathB === "*") {
25
- return -1;
26
- } // This will push * and / to the bottom of the list
27
-
28
-
29
- if (pathA === "*" || pathA === "/") {
30
- return 1;
31
- } // This will push * and / to the bottom of the list
32
-
33
-
34
- if (["*", "/"].includes(pathB)) {
35
- return -1;
36
- }
37
-
38
- return 0;
39
- });
40
- return /*#__PURE__*/_react.default.createElement(_reactRouter.Routes, null, routes.map(function (_ref) {
41
- var route = _ref.route,
42
- name = _ref.name;
43
- return /*#__PURE__*/_react.default.cloneElement(route, {
44
- key: name
45
- });
46
- }));
47
- };
48
-
49
- exports.Routes = Routes;
@@ -1 +0,0 @@
1
- {"version":3,"names":["Routes","routes","plugins","byType","sort","a","b","pathA","route","props","path","pathB","includes","map","name","React","cloneElement","key"],"sources":["Routes.tsx"],"sourcesContent":["import React from \"react\";\nimport { plugins } from \"@webiny/plugins\";\nimport { Routes as ReactRouterRoutes } from \"@webiny/react-router\";\nimport { RoutePlugin } from \"../types\";\n\nexport const Routes = () => {\n // We cannot call `sort` on the array returned by the `plugins.byType` call - it is read-only.\n const routes = [...plugins.byType<RoutePlugin>(\"route\")].sort((a, b) => {\n const pathA = a.route.props.path || \"*\";\n const pathB = b.route.props.path || \"*\";\n\n // This will sort paths at the very bottom of the list\n if (pathA === \"/\" && pathB === \"*\") {\n return -1;\n }\n\n // This will push * and / to the bottom of the list\n if (pathA === \"*\" || pathA === \"/\") {\n return 1;\n }\n\n // This will push * and / to the bottom of the list\n if ([\"*\", \"/\"].includes(pathB)) {\n return -1;\n }\n\n return 0;\n });\n\n return (\n <ReactRouterRoutes>\n {routes.map(({ route, name }) => React.cloneElement(route, { key: name }))}\n </ReactRouterRoutes>\n );\n};\n"],"mappings":";;;;;;;;;;;AAAA;;AACA;;AACA;;AAGO,IAAMA,MAAM,GAAG,SAATA,MAAS,GAAM;EACxB;EACA,IAAMC,MAAM,GAAG,iCAAIC,gBAAA,CAAQC,MAAR,CAA4B,OAA5B,CAAJ,EAA0CC,IAA1C,CAA+C,UAACC,CAAD,EAAIC,CAAJ,EAAU;IACpE,IAAMC,KAAK,GAAGF,CAAC,CAACG,KAAF,CAAQC,KAAR,CAAcC,IAAd,IAAsB,GAApC;IACA,IAAMC,KAAK,GAAGL,CAAC,CAACE,KAAF,CAAQC,KAAR,CAAcC,IAAd,IAAsB,GAApC,CAFoE,CAIpE;;IACA,IAAIH,KAAK,KAAK,GAAV,IAAiBI,KAAK,KAAK,GAA/B,EAAoC;MAChC,OAAO,CAAC,CAAR;IACH,CAPmE,CASpE;;;IACA,IAAIJ,KAAK,KAAK,GAAV,IAAiBA,KAAK,KAAK,GAA/B,EAAoC;MAChC,OAAO,CAAP;IACH,CAZmE,CAcpE;;;IACA,IAAI,CAAC,GAAD,EAAM,GAAN,EAAWK,QAAX,CAAoBD,KAApB,CAAJ,EAAgC;MAC5B,OAAO,CAAC,CAAR;IACH;;IAED,OAAO,CAAP;EACH,CApBc,CAAf;EAsBA,oBACI,6BAAC,mBAAD,QACKV,MAAM,CAACY,GAAP,CAAW;IAAA,IAAGL,KAAH,QAAGA,KAAH;IAAA,IAAUM,IAAV,QAAUA,IAAV;IAAA,oBAAqBC,cAAA,CAAMC,YAAN,CAAmBR,KAAnB,EAA0B;MAAES,GAAG,EAAEH;IAAP,CAA1B,CAArB;EAAA,CAAX,CADL,CADJ;AAKH,CA7BM"}
@@ -1,8 +0,0 @@
1
- import React from "react";
2
- interface Props {
3
- name: string;
4
- props?: Record<string, any>;
5
- children?: React.ReactNode;
6
- }
7
- export declare const View: ({ name, children, props }: Props) => JSX.Element;
8
- export {};
@@ -1,41 +0,0 @@
1
- "use strict";
2
-
3
- var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard").default;
4
-
5
- var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
6
-
7
- Object.defineProperty(exports, "__esModule", {
8
- value: true
9
- });
10
- exports.View = void 0;
11
-
12
- var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/objectSpread2"));
13
-
14
- var _react = _interopRequireWildcard(require("react"));
15
-
16
- var _plugins = require("@webiny/plugins");
17
-
18
- var _ViewPlugin = require("../plugins/ViewPlugin");
19
-
20
- var View = function View(_ref) {
21
- var name = _ref.name,
22
- children = _ref.children,
23
- _ref$props = _ref.props,
24
- props = _ref$props === void 0 ? {} : _ref$props;
25
-
26
- var viewPlugins = _plugins.plugins.byType(_ViewPlugin.ViewPlugin.type).filter(function (pl) {
27
- return pl.key === name;
28
- });
29
-
30
- if (viewPlugins.length) {
31
- children = viewPlugins.reduce(function (el, pl) {
32
- return pl.render((0, _objectSpread2.default)({
33
- children: el
34
- }, props));
35
- }, children);
36
- }
37
-
38
- return /*#__PURE__*/_react.default.createElement(_react.Fragment, null, children || null);
39
- };
40
-
41
- exports.View = View;
@@ -1 +0,0 @@
1
- {"version":3,"names":["View","name","children","props","viewPlugins","plugins","byType","ViewPlugin","type","filter","pl","key","length","reduce","el","render"],"sources":["View.tsx"],"sourcesContent":["import React, { Fragment } from \"react\";\nimport { plugins } from \"@webiny/plugins\";\nimport { ViewPlugin } from \"../plugins/ViewPlugin\";\n\ninterface Props {\n name: string;\n props?: Record<string, any>;\n children?: React.ReactNode;\n}\n\nexport const View = ({ name, children, props = {} }: Props) => {\n const viewPlugins = plugins.byType<ViewPlugin>(ViewPlugin.type).filter(pl => pl.key === name);\n\n if (viewPlugins.length) {\n children = viewPlugins.reduce((el, pl) => pl.render({ children: el, ...props }), children);\n }\n\n return <Fragment>{children || null}</Fragment>;\n};\n"],"mappings":";;;;;;;;;;;;;AAAA;;AACA;;AACA;;AAQO,IAAMA,IAAI,GAAG,SAAPA,IAAO,OAA2C;EAAA,IAAxCC,IAAwC,QAAxCA,IAAwC;EAAA,IAAlCC,QAAkC,QAAlCA,QAAkC;EAAA,sBAAxBC,KAAwB;EAAA,IAAxBA,KAAwB,2BAAhB,EAAgB;;EAC3D,IAAMC,WAAW,GAAGC,gBAAA,CAAQC,MAAR,CAA2BC,sBAAA,CAAWC,IAAtC,EAA4CC,MAA5C,CAAmD,UAAAC,EAAE;IAAA,OAAIA,EAAE,CAACC,GAAH,KAAWV,IAAf;EAAA,CAArD,CAApB;;EAEA,IAAIG,WAAW,CAACQ,MAAhB,EAAwB;IACpBV,QAAQ,GAAGE,WAAW,CAACS,MAAZ,CAAmB,UAACC,EAAD,EAAKJ,EAAL;MAAA,OAAYA,EAAE,CAACK,MAAH;QAAYb,QAAQ,EAAEY;MAAtB,GAA6BX,KAA7B,EAAZ;IAAA,CAAnB,EAAsED,QAAtE,CAAX;EACH;;EAED,oBAAO,6BAAC,eAAD,QAAWA,QAAQ,IAAI,IAAvB,CAAP;AACH,CARM"}
@@ -1 +0,0 @@
1
- {"version":3,"names":[],"sources":["index.ts"],"sourcesContent":["export { Image } from \"./Image\";\nexport { Routes } from \"./Routes\";\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;;AACA"}
@@ -1 +0,0 @@
1
- {"version":3,"names":[],"sources":["index.ts"],"sourcesContent":["export { useAutocomplete } from \"./useAutocomplete\";\n"],"mappings":";;;;;;;;;;;;AAAA"}
@@ -1 +0,0 @@
1
- {"version":3,"names":[],"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;;AACA;;AACA"}
@@ -1 +0,0 @@
1
- {"version":3,"names":[],"sources":["index.ts"],"sourcesContent":["export { useDataList } from \"./useDataList\";\n"],"mappings":";;;;;;;;;;;;AAAA"}
@@ -1 +0,0 @@
1
- {"version":3,"names":[],"sources":["index.ts"],"sourcesContent":["export { default as prepareLoadListParams } from \"./prepareLoadListParams\";\nexport { default as redirectToRouteWithQueryParams } from \"./redirectToRouteWithQueryParams\";\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;;AACA"}
@@ -1,14 +0,0 @@
1
- interface Params {
2
- sort: string;
3
- search: string;
4
- where: Record<string, any>;
5
- }
6
- interface Location {
7
- search: string;
8
- }
9
- interface Options {
10
- history: Location[];
11
- location: Location;
12
- }
13
- declare const _default: (params: Params, options: Options) => void;
14
- export default _default;
@@ -1,31 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.default = void 0;
7
-
8
- var _default = function _default(params, options) {
9
- var history = options.history,
10
- location = options.location;
11
- var paramsClone = Object.assign({}, params);
12
- ["sort", "search", "where"].forEach(function (key) {
13
- if (typeof paramsClone[key] === "object") {
14
- paramsClone[key] = JSON.stringify(paramsClone[key]);
15
- }
16
- });
17
- var keys = ["limit", "after", "before", "where", "search", "sort"];
18
- var query = new URLSearchParams(location.search);
19
- keys.forEach(function (key) {
20
- if (typeof paramsClone[key] !== "undefined") {
21
- query.set(key, paramsClone[key]);
22
- } else {
23
- query.delete(key);
24
- }
25
- });
26
- history.push({
27
- search: query.toString()
28
- });
29
- };
30
-
31
- exports.default = _default;
@@ -1 +0,0 @@
1
- {"version":3,"names":["params","options","history","location","paramsClone","Object","assign","forEach","key","JSON","stringify","keys","query","URLSearchParams","search","set","delete","push","toString"],"sources":["redirectToRouteWithQueryParams.ts"],"sourcesContent":["interface Params {\n sort: string;\n search: string;\n where: Record<string, any>;\n}\ninterface Location {\n search: string;\n}\ninterface Options {\n history: Location[];\n location: Location;\n}\nexport default (params: Params, options: Options): void => {\n const { history, location } = options;\n const paramsClone: Record<string, any> = Object.assign({}, params);\n\n [\"sort\", \"search\", \"where\"].forEach(key => {\n if (typeof paramsClone[key] === \"object\") {\n paramsClone[key] = JSON.stringify(paramsClone[key]);\n }\n });\n\n const keys: string[] = [\"limit\", \"after\", \"before\", \"where\", \"search\", \"sort\"];\n\n const query = new URLSearchParams(location.search);\n keys.forEach(key => {\n if (typeof paramsClone[key] !== \"undefined\") {\n query.set(key, paramsClone[key]);\n } else {\n query.delete(key);\n }\n });\n\n history.push({ search: query.toString() });\n};\n"],"mappings":";;;;;;;eAYe,kBAACA,MAAD,EAAiBC,OAAjB,EAA4C;EACvD,IAAQC,OAAR,GAA8BD,OAA9B,CAAQC,OAAR;EAAA,IAAiBC,QAAjB,GAA8BF,OAA9B,CAAiBE,QAAjB;EACA,IAAMC,WAAgC,GAAGC,MAAM,CAACC,MAAP,CAAc,EAAd,EAAkBN,MAAlB,CAAzC;EAEA,CAAC,MAAD,EAAS,QAAT,EAAmB,OAAnB,EAA4BO,OAA5B,CAAoC,UAAAC,GAAG,EAAI;IACvC,IAAI,OAAOJ,WAAW,CAACI,GAAD,CAAlB,KAA4B,QAAhC,EAA0C;MACtCJ,WAAW,CAACI,GAAD,CAAX,GAAmBC,IAAI,CAACC,SAAL,CAAeN,WAAW,CAACI,GAAD,CAA1B,CAAnB;IACH;EACJ,CAJD;EAMA,IAAMG,IAAc,GAAG,CAAC,OAAD,EAAU,OAAV,EAAmB,QAAnB,EAA6B,OAA7B,EAAsC,QAAtC,EAAgD,MAAhD,CAAvB;EAEA,IAAMC,KAAK,GAAG,IAAIC,eAAJ,CAAoBV,QAAQ,CAACW,MAA7B,CAAd;EACAH,IAAI,CAACJ,OAAL,CAAa,UAAAC,GAAG,EAAI;IAChB,IAAI,OAAOJ,WAAW,CAACI,GAAD,CAAlB,KAA4B,WAAhC,EAA6C;MACzCI,KAAK,CAACG,GAAN,CAAUP,GAAV,EAAeJ,WAAW,CAACI,GAAD,CAA1B;IACH,CAFD,MAEO;MACHI,KAAK,CAACI,MAAN,CAAaR,GAAb;IACH;EACJ,CAND;EAQAN,OAAO,CAACe,IAAR,CAAa;IAAEH,MAAM,EAAEF,KAAK,CAACM,QAAN;EAAV,CAAb;AACH,C"}
@@ -1,34 +0,0 @@
1
- export declare type UseDataListParams = {
2
- load?: boolean;
3
- name: string;
4
- type: string;
5
- fields: string;
6
- limit?: number;
7
- sort?: Object;
8
- where?: Object;
9
- search?: Object;
10
- };
11
- export declare type SearchParams = {
12
- query: string;
13
- operator?: "and" | "or";
14
- fields?: Array<string>;
15
- };
16
- export declare type UseDataListProps = {
17
- data: Array<Object>;
18
- meta: Object;
19
- init: () => void;
20
- refresh: (params?: Object) => void;
21
- delete: (id: string, options: Object) => void;
22
- setPerPage: (perPage: number) => void;
23
- setPage: (page: number) => void;
24
- setSearch: (search: SearchParams | any) => void;
25
- setWhere: (where: Object) => void;
26
- setSorters: (sort: Object) => void;
27
- multiSelect: (item: Object, value: boolean) => void;
28
- multiSelectAll: (value: boolean) => void;
29
- isMultiSelected: (item: Object) => boolean;
30
- isAllMultiSelected: () => boolean;
31
- isNoneMultiSelected: () => boolean;
32
- getMultiSelected: () => Array<Object>;
33
- __loadParams: UseDataListParams;
34
- };
@@ -1,5 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
@@ -1 +0,0 @@
1
- {"version":3,"names":[],"sources":["types.ts"],"sourcesContent":["export type UseDataListParams = {\n load?: boolean;\n name: string;\n type: string;\n fields: string;\n limit?: number;\n sort?: Object;\n where?: Object;\n search?: Object;\n};\n\nexport type SearchParams = {\n query: string;\n operator?: \"and\" | \"or\";\n fields?: Array<string>;\n};\n\nexport type UseDataListProps = {\n data: Array<Object>;\n meta: Object;\n init: () => void;\n refresh: (params?: Object) => void;\n delete: (id: string, options: Object) => void;\n setPerPage: (perPage: number) => void;\n setPage: (page: number) => void;\n setSearch: (search: SearchParams | any) => void;\n setWhere: (where: Object) => void;\n setSorters: (sort: Object) => void;\n multiSelect: (item: Object, value: boolean) => void;\n multiSelectAll: (value: boolean) => void;\n\n isMultiSelected: (item: Object) => boolean;\n isAllMultiSelected: () => boolean;\n isNoneMultiSelected: () => boolean;\n getMultiSelected: () => Array<Object>;\n __loadParams: UseDataListParams;\n};\n"],"mappings":""}
package/i18n/index.js.map DELETED
@@ -1 +0,0 @@
1
- {"version":3,"names":[],"sources":["index.ts"],"sourcesContent":["export { default as i18n } from \"./i18n\";\n"],"mappings":";;;;;;;;;;;;;;AAAA"}
package/index.js.map DELETED
@@ -1 +0,0 @@
1
- {"version":3,"names":[],"sources":["index.ts"],"sourcesContent":["export { AddQuerySelectionPlugin } from \"./plugins/AddQuerySelectionPlugin\";\nexport { ApolloLinkPlugin } from \"./plugins/ApolloLinkPlugin\";\nexport { RoutePlugin } from \"./plugins/RoutePlugin\";\nexport { ApolloCacheObjectIdPlugin } from \"./plugins/ApolloCacheObjectIdPlugin\";\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;AACA;;AACA;;AACA"}
@@ -1,15 +0,0 @@
1
- import { ApolloLinkPlugin } from "./ApolloLinkPlugin";
2
- import { ApolloLink } from "apollo-link";
3
- declare global {
4
- interface Window {
5
- __PS_RENDER_LOCALE__: string;
6
- }
7
- }
8
- /**
9
- * Append `x-i18n-locale` header from URL query (necessary for prerendering service).
10
- */
11
- export declare class LocaleHeaderLinkPlugin extends ApolloLinkPlugin {
12
- private readonly locale;
13
- constructor(locale?: string);
14
- createLink(): ApolloLink;
15
- }
@@ -1,77 +0,0 @@
1
- "use strict";
2
-
3
- var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
4
-
5
- Object.defineProperty(exports, "__esModule", {
6
- value: true
7
- });
8
- exports.LocaleHeaderLinkPlugin = void 0;
9
-
10
- var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/objectSpread2"));
11
-
12
- var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
13
-
14
- var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
15
-
16
- var _assertThisInitialized2 = _interopRequireDefault(require("@babel/runtime/helpers/assertThisInitialized"));
17
-
18
- var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits"));
19
-
20
- var _createSuper2 = _interopRequireDefault(require("@babel/runtime/helpers/createSuper"));
21
-
22
- var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
23
-
24
- var _apolloLinkContext = require("apollo-link-context");
25
-
26
- var _ApolloLinkPlugin2 = require("./ApolloLinkPlugin");
27
-
28
- /**
29
- * Append `x-i18n-locale` header from URL query (necessary for prerendering service).
30
- */
31
- var LocaleHeaderLinkPlugin = /*#__PURE__*/function (_ApolloLinkPlugin) {
32
- (0, _inherits2.default)(LocaleHeaderLinkPlugin, _ApolloLinkPlugin);
33
-
34
- var _super = (0, _createSuper2.default)(LocaleHeaderLinkPlugin);
35
-
36
- function LocaleHeaderLinkPlugin(locale) {
37
- var _this;
38
-
39
- (0, _classCallCheck2.default)(this, LocaleHeaderLinkPlugin);
40
- _this = _super.call(this);
41
- (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "locale", void 0);
42
-
43
- if (!locale) {
44
- var query = new URLSearchParams(location.search);
45
- locale = query.get("__locale") || window.__PS_RENDER_LOCALE__;
46
- }
47
-
48
- _this.locale = locale;
49
- return _this;
50
- }
51
-
52
- (0, _createClass2.default)(LocaleHeaderLinkPlugin, [{
53
- key: "createLink",
54
- value: function createLink() {
55
- var _this2 = this;
56
-
57
- return (0, _apolloLinkContext.setContext)(function (_, _ref) {
58
- var headers = _ref.headers;
59
-
60
- if (_this2.locale) {
61
- return {
62
- headers: (0, _objectSpread2.default)((0, _objectSpread2.default)({}, headers), {}, {
63
- "x-i18n-locale": "content:".concat(_this2.locale, ";")
64
- })
65
- };
66
- }
67
-
68
- return {
69
- headers: headers
70
- };
71
- });
72
- }
73
- }]);
74
- return LocaleHeaderLinkPlugin;
75
- }(_ApolloLinkPlugin2.ApolloLinkPlugin);
76
-
77
- exports.LocaleHeaderLinkPlugin = LocaleHeaderLinkPlugin;
@@ -1 +0,0 @@
1
- {"version":3,"names":["LocaleHeaderLinkPlugin","locale","query","URLSearchParams","location","search","get","window","__PS_RENDER_LOCALE__","setContext","_","headers","ApolloLinkPlugin"],"sources":["LocaleHeaderLinkPlugin.ts"],"sourcesContent":["import { setContext } from \"apollo-link-context\";\nimport { ApolloLinkPlugin } from \"./ApolloLinkPlugin\";\nimport { ApolloLink } from \"apollo-link\";\n\ndeclare global {\n interface Window {\n __PS_RENDER_LOCALE__: string;\n }\n}\n\n/**\n * Append `x-i18n-locale` header from URL query (necessary for prerendering service).\n */\nexport class LocaleHeaderLinkPlugin extends ApolloLinkPlugin {\n private readonly locale: string;\n\n constructor(locale?: string) {\n super();\n\n if (!locale) {\n const query = new URLSearchParams(location.search);\n locale = query.get(\"__locale\") || window.__PS_RENDER_LOCALE__;\n }\n\n this.locale = locale;\n }\n\n public override createLink(): ApolloLink {\n return setContext((_, { headers }) => {\n if (this.locale) {\n return {\n headers: {\n ...headers,\n \"x-i18n-locale\": `content:${this.locale};`\n }\n };\n }\n\n return { headers };\n });\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAAA;;AACA;;AASA;AACA;AACA;IACaA,sB;;;;;EAGT,gCAAYC,MAAZ,EAA6B;IAAA;;IAAA;IACzB;IADyB;;IAGzB,IAAI,CAACA,MAAL,EAAa;MACT,IAAMC,KAAK,GAAG,IAAIC,eAAJ,CAAoBC,QAAQ,CAACC,MAA7B,CAAd;MACAJ,MAAM,GAAGC,KAAK,CAACI,GAAN,CAAU,UAAV,KAAyBC,MAAM,CAACC,oBAAzC;IACH;;IAED,MAAKP,MAAL,GAAcA,MAAd;IARyB;EAS5B;;;;WAED,sBAAyC;MAAA;;MACrC,OAAO,IAAAQ,6BAAA,EAAW,UAACC,CAAD,QAAoB;QAAA,IAAdC,OAAc,QAAdA,OAAc;;QAClC,IAAI,MAAI,CAACV,MAAT,EAAiB;UACb,OAAO;YACHU,OAAO,8DACAA,OADA;cAEH,mCAA4B,MAAI,CAACV,MAAjC;YAFG;UADJ,CAAP;QAMH;;QAED,OAAO;UAAEU,OAAO,EAAPA;QAAF,CAAP;MACH,CAXM,CAAP;IAYH;;;EA3BuCC,mC"}
@@ -1,12 +0,0 @@
1
- import * as React from "react";
2
- import { Plugin } from "@webiny/plugins";
3
- interface Config {
4
- route: React.ReactElement | null;
5
- }
6
- export declare class RoutePlugin extends Plugin {
7
- static readonly type: string;
8
- private _config;
9
- constructor(config?: Config);
10
- get route(): Config["route"];
11
- }
12
- export {};