@webiny/app 0.0.0-unstable.79032b23a5 → 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.
- package/App.d.ts +14 -18
- package/App.js +79 -102
- package/App.js.map +1 -1
- package/AppContainer.d.ts +23 -0
- package/AppContainer.js +6 -0
- package/AppContainer.js.map +1 -0
- package/README.md +7 -15
- package/apollo-client/InMemoryCache.d.ts +3 -2
- package/apollo-client/InMemoryCache.js +17 -55
- package/apollo-client/InMemoryCache.js.map +1 -1
- package/apollo-client/IntrospectionFragmentMatcher.d.ts +11 -0
- package/apollo-client/IntrospectionFragmentMatcher.js +33 -0
- package/apollo-client/IntrospectionFragmentMatcher.js.map +1 -0
- package/components/Image.d.ts +2 -3
- package/components/Image.js +16 -29
- package/components/Image.js.map +1 -1
- package/components/index.d.ts +1 -2
- package/components/index.js +1 -19
- package/config/RouterConfig/Route.d.ts +29 -0
- package/config/RouterConfig/Route.js +28 -0
- package/config/RouterConfig/Route.js.map +1 -0
- package/config/RouterConfig.d.ts +31 -0
- package/config/RouterConfig.js +19 -0
- package/config/RouterConfig.js.map +1 -0
- package/config.d.ts +1 -1
- package/config.js +21 -27
- package/config.js.map +1 -1
- package/contexts/Ui/index.d.ts +4 -4
- package/contexts/Ui/index.js +28 -57
- package/contexts/Ui/index.js.map +1 -1
- package/core/Plugin.d.ts +3 -3
- package/core/Plugin.js +11 -20
- package/core/Plugin.js.map +1 -1
- package/core/Plugins.d.ts +6 -3
- package/core/Plugins.js +19 -43
- package/core/Plugins.js.map +1 -1
- package/core/Provider.d.ts +3 -4
- package/core/Provider.js +9 -20
- package/core/Provider.js.map +1 -1
- package/core/createProvider.d.ts +7 -3
- package/core/createProvider.js +5 -12
- package/core/createProvider.js.map +1 -1
- package/core/createProviderPlugin.d.ts +2 -2
- package/core/createProviderPlugin.js +11 -20
- package/core/createProviderPlugin.js.map +1 -1
- package/errors/AuthenticationErrorEvent.d.ts +9 -0
- package/errors/AuthenticationErrorEvent.js +13 -0
- package/errors/AuthenticationErrorEvent.js.map +1 -0
- package/errors/NetworkErrorEvent.d.ts +15 -0
- package/errors/NetworkErrorEvent.js +13 -0
- package/errors/NetworkErrorEvent.js.map +1 -0
- package/errors/abstractions.d.ts +12 -0
- package/errors/abstractions.js +6 -0
- package/errors/abstractions.js.map +1 -0
- package/errors/index.d.ts +6 -0
- package/errors/index.js +3 -0
- package/exports/admin/env-config.d.ts +2 -0
- package/exports/admin/env-config.js +2 -0
- package/exports/admin/graphql-client.d.ts +1 -0
- package/exports/admin/graphql-client.js +1 -0
- package/exports/admin/local-storage.d.ts +2 -0
- package/exports/admin/local-storage.js +2 -0
- package/exports/admin/router.d.ts +5 -0
- package/exports/admin/router.js +5 -0
- package/exports/admin/security.d.ts +1 -0
- package/exports/admin/security.js +1 -0
- package/exports/admin.d.ts +7 -0
- package/exports/admin.js +7 -0
- package/features/envConfig/EnvConfig.d.ts +7 -0
- package/features/envConfig/EnvConfig.js +16 -0
- package/features/envConfig/EnvConfig.js.map +1 -0
- package/features/envConfig/abstractions.d.ts +28 -0
- package/features/envConfig/abstractions.js +5 -0
- package/features/envConfig/abstractions.js.map +1 -0
- package/features/envConfig/feature.d.ts +17 -0
- package/features/envConfig/feature.js +15 -0
- package/features/envConfig/feature.js.map +1 -0
- package/features/envConfig/index.d.ts +1 -0
- package/features/envConfig/index.js +1 -0
- package/features/eventPublisher/EventPublisher.d.ts +8 -0
- package/features/eventPublisher/EventPublisher.js +19 -0
- package/features/eventPublisher/EventPublisher.js.map +1 -0
- package/features/eventPublisher/abstractions.d.ts +18 -0
- package/features/eventPublisher/abstractions.js +12 -0
- package/features/eventPublisher/abstractions.js.map +1 -0
- package/features/eventPublisher/feature.d.ts +3 -0
- package/features/eventPublisher/feature.js +17 -0
- package/features/eventPublisher/feature.js.map +1 -0
- package/features/eventPublisher/index.d.ts +3 -0
- package/features/eventPublisher/index.js +2 -0
- package/features/graphqlClient/AuthenticationErrorPublishing.d.ts +13 -0
- package/features/graphqlClient/AuthenticationErrorPublishing.js +35 -0
- package/features/graphqlClient/AuthenticationErrorPublishing.js.map +1 -0
- package/features/graphqlClient/BatchingGraphQLClient.d.ts +16 -0
- package/features/graphqlClient/BatchingGraphQLClient.js +118 -0
- package/features/graphqlClient/BatchingGraphQLClient.js.map +1 -0
- package/features/graphqlClient/FetchGraphQLClient.d.ts +7 -0
- package/features/graphqlClient/FetchGraphQLClient.js +51 -0
- package/features/graphqlClient/FetchGraphQLClient.js.map +1 -0
- package/features/graphqlClient/NetworkErrorPublishing.d.ts +14 -0
- package/features/graphqlClient/NetworkErrorPublishing.js +48 -0
- package/features/graphqlClient/NetworkErrorPublishing.js.map +1 -0
- package/features/graphqlClient/RequestValue.d.ts +21 -0
- package/features/graphqlClient/RequestValue.js +46 -0
- package/features/graphqlClient/RequestValue.js.map +1 -0
- package/features/graphqlClient/RetryGraphQLClient.d.ts +18 -0
- package/features/graphqlClient/RetryGraphQLClient.js +45 -0
- package/features/graphqlClient/RetryGraphQLClient.js.map +1 -0
- package/features/graphqlClient/__tests__/GraphQLClient.test.d.ts +1 -0
- package/features/graphqlClient/__tests__/GraphQLClient.test.js +397 -0
- package/features/graphqlClient/__tests__/GraphQLClient.test.js.map +1 -0
- package/features/graphqlClient/abstractions.d.ts +18 -0
- package/features/graphqlClient/abstractions.js +5 -0
- package/features/graphqlClient/abstractions.js.map +1 -0
- package/features/graphqlClient/feature.d.ts +6 -0
- package/features/graphqlClient/feature.js +25 -0
- package/features/graphqlClient/feature.js.map +1 -0
- package/features/graphqlClient/index.d.ts +1 -0
- package/features/graphqlClient/index.js +1 -0
- package/features/graphqlClient/types.d.ts +5 -0
- package/features/graphqlClient/types.js +0 -0
- package/features/localStorage/BrowserLocalStorageGateway.d.ts +9 -0
- package/features/localStorage/BrowserLocalStorageGateway.js +61 -0
- package/features/localStorage/BrowserLocalStorageGateway.js.map +1 -0
- package/features/localStorage/LocalStorage.d.ts +12 -0
- package/features/localStorage/LocalStorage.js +34 -0
- package/features/localStorage/LocalStorage.js.map +1 -0
- package/features/localStorage/LocalStorageRepository.d.ts +20 -0
- package/features/localStorage/LocalStorageRepository.js +82 -0
- package/features/localStorage/LocalStorageRepository.js.map +1 -0
- package/features/localStorage/abstractions.d.ts +48 -0
- package/features/localStorage/abstractions.js +8 -0
- package/features/localStorage/abstractions.js.map +1 -0
- package/features/localStorage/feature.d.ts +12 -0
- package/features/localStorage/feature.js +23 -0
- package/features/localStorage/feature.js.map +1 -0
- package/features/localStorage/index.d.ts +1 -0
- package/features/localStorage/index.js +1 -0
- package/features/mainGraphQLClient/MainGraphQLClient.d.ts +11 -0
- package/features/mainGraphQLClient/MainGraphQLClient.js +27 -0
- package/features/mainGraphQLClient/MainGraphQLClient.js.map +1 -0
- package/features/mainGraphQLClient/abstractions.d.ts +17 -0
- package/features/mainGraphQLClient/abstractions.js +5 -0
- package/features/mainGraphQLClient/abstractions.js.map +1 -0
- package/features/mainGraphQLClient/feature.d.ts +3 -0
- package/features/mainGraphQLClient/feature.js +17 -0
- package/features/mainGraphQLClient/feature.js.map +1 -0
- package/features/mainGraphQLClient/index.d.ts +1 -0
- package/features/mainGraphQLClient/index.js +1 -0
- package/features/router/HistoryRouterGateway.d.ts +22 -0
- package/features/router/HistoryRouterGateway.js +88 -0
- package/features/router/HistoryRouterGateway.js.map +1 -0
- package/features/router/HistoryRouterGateway.test.d.ts +1 -0
- package/features/router/HistoryRouterGateway.test.js +195 -0
- package/features/router/HistoryRouterGateway.test.js.map +1 -0
- package/features/router/Route.d.ts +19 -0
- package/features/router/Route.js +43 -0
- package/features/router/Route.js.map +1 -0
- package/features/router/RouteUrl.d.ts +85 -0
- package/features/router/RouteUrl.js +99 -0
- package/features/router/RouteUrl.js.map +1 -0
- package/features/router/Router.d.ts +45 -0
- package/features/router/Router.js +72 -0
- package/features/router/Router.js.map +1 -0
- package/features/router/RouterPresenter.d.ts +21 -0
- package/features/router/RouterPresenter.js +52 -0
- package/features/router/RouterPresenter.js.map +1 -0
- package/features/router/RouterRepository.d.ts +30 -0
- package/features/router/RouterRepository.js +117 -0
- package/features/router/RouterRepository.js.map +1 -0
- package/features/router/RouterRepository.test.d.ts +1 -0
- package/features/router/RouterRepository.test.js +138 -0
- package/features/router/RouterRepository.test.js.map +1 -0
- package/features/router/abstractions.d.ts +81 -0
- package/features/router/abstractions.js +7 -0
- package/features/router/abstractions.js.map +1 -0
- package/features/router/feature.d.ts +4 -0
- package/features/router/feature.js +19 -0
- package/features/router/feature.js.map +1 -0
- package/features/router/index.d.ts +2 -0
- package/features/router/index.js +1 -0
- package/helpers/InterfaceGenerator/date.d.ts +15 -0
- package/helpers/InterfaceGenerator/date.js +0 -0
- package/helpers/InterfaceGenerator/id.d.ts +23 -0
- package/helpers/InterfaceGenerator/id.js +0 -0
- package/helpers/InterfaceGenerator/identity.d.ts +10 -0
- package/helpers/InterfaceGenerator/identity.js +0 -0
- package/helpers/InterfaceGenerator/index.d.ts +5 -0
- package/helpers/InterfaceGenerator/index.js +0 -0
- package/helpers/InterfaceGenerator/numeric.d.ts +12 -0
- package/helpers/InterfaceGenerator/numeric.js +0 -0
- package/helpers/InterfaceGenerator/truthful.d.ts +7 -0
- package/helpers/InterfaceGenerator/truthful.js +0 -0
- package/hooks/useAutocomplete/index.d.ts +1 -1
- package/hooks/useAutocomplete/index.js +1 -12
- package/hooks/useAutocomplete/useAutocomplete.d.ts +1 -1
- package/hooks/useAutocomplete/useAutocomplete.js +16 -28
- package/hooks/useAutocomplete/useAutocomplete.js.map +1 -1
- package/hooks/useDataList/functions/getData.js +4 -11
- package/hooks/useDataList/functions/getData.js.map +1 -1
- package/hooks/useDataList/functions/getError.js +4 -11
- package/hooks/useDataList/functions/getError.js.map +1 -1
- package/hooks/useDataList/functions/getMeta.js +4 -11
- package/hooks/useDataList/functions/getMeta.js.map +1 -1
- package/hooks/useDataList/functions/index.d.ts +3 -3
- package/hooks/useDataList/functions/index.js +3 -27
- package/hooks/useDataList/functions/searchDataByKey.js +11 -21
- package/hooks/useDataList/functions/searchDataByKey.js.map +1 -1
- package/hooks/useDataList/index.d.ts +1 -1
- package/hooks/useDataList/index.js +1 -12
- package/hooks/useDataList/useDataList.d.ts +2 -3
- package/hooks/useDataList/useDataList.js +140 -180
- package/hooks/useDataList/useDataList.js.map +1 -1
- package/hooks/useDataList/utils/index.d.ts +1 -2
- package/hooks/useDataList/utils/index.js +1 -20
- package/hooks/useDataList/utils/prepareLoadListParams.d.ts +1 -2
- package/hooks/useDataList/utils/prepareLoadListParams.js +27 -36
- package/hooks/useDataList/utils/prepareLoadListParams.js.map +1 -1
- package/hooks/useHandler.js +14 -17
- package/hooks/useHandler.js.map +1 -1
- package/hooks/useHandlers.d.ts +3 -3
- package/hooks/useHandlers.js +20 -26
- package/hooks/useHandlers.js.map +1 -1
- package/hooks/useRegisterLegacyPlugin.d.ts +2 -0
- package/hooks/useRegisterLegacyPlugin.js +12 -0
- package/hooks/useRegisterLegacyPlugin.js.map +1 -0
- package/hooks/useUi.d.ts +1 -1
- package/hooks/useUi.js +5 -11
- package/hooks/useUi.js.map +1 -1
- package/i18n/i18n.js +10 -13
- package/i18n/i18n.js.map +1 -1
- package/i18n/index.d.ts +1 -1
- package/i18n/index.js +1 -13
- package/index.d.ts +23 -13
- package/index.js +23 -147
- package/package.json +38 -41
- package/plugins/AddQuerySelectionPlugin.d.ts +2 -2
- package/plugins/AddQuerySelectionPlugin.js +41 -116
- package/plugins/AddQuerySelectionPlugin.js.map +1 -1
- package/plugins/ApolloCacheObjectIdPlugin.js +16 -37
- package/plugins/ApolloCacheObjectIdPlugin.js.map +1 -1
- package/plugins/ApolloDynamicLink.d.ts +3 -2
- package/plugins/ApolloDynamicLink.js +25 -56
- package/plugins/ApolloDynamicLink.js.map +1 -1
- package/plugins/ApolloLinkPlugin.d.ts +1 -1
- package/plugins/ApolloLinkPlugin.js +22 -45
- package/plugins/ApolloLinkPlugin.js.map +1 -1
- package/plugins/ConsoleLinkPlugin.d.ts +1 -1
- package/plugins/ConsoleLinkPlugin.js +21 -45
- package/plugins/ConsoleLinkPlugin.js.map +1 -1
- package/plugins/NetworkErrorLinkPlugin/ErrorOverlay.d.ts +8 -13
- package/plugins/NetworkErrorLinkPlugin/ErrorOverlay.js +48 -76
- package/plugins/NetworkErrorLinkPlugin/ErrorOverlay.js.map +1 -1
- package/plugins/NetworkErrorLinkPlugin/GqlErrorOverlay.d.ts +14 -0
- package/plugins/NetworkErrorLinkPlugin/GqlErrorOverlay.js +27 -0
- package/plugins/NetworkErrorLinkPlugin/GqlErrorOverlay.js.map +1 -0
- package/plugins/NetworkErrorLinkPlugin/LocalAwsLambdaTimeoutMessage.d.ts +2 -0
- package/plugins/NetworkErrorLinkPlugin/LocalAwsLambdaTimeoutMessage.js +23 -0
- package/plugins/NetworkErrorLinkPlugin/LocalAwsLambdaTimeoutMessage.js.map +1 -0
- package/plugins/NetworkErrorLinkPlugin/StyledComponents.d.ts +4 -7
- package/plugins/NetworkErrorLinkPlugin/StyledComponents.js +68 -17
- package/plugins/NetworkErrorLinkPlugin/StyledComponents.js.map +1 -1
- package/plugins/NetworkErrorLinkPlugin/Typography.d.ts +8 -0
- package/plugins/NetworkErrorLinkPlugin/Typography.js +13 -0
- package/plugins/NetworkErrorLinkPlugin/Typography.js.map +1 -0
- package/plugins/NetworkErrorLinkPlugin/assets/close_24px.js +19 -0
- package/plugins/NetworkErrorLinkPlugin/assets/close_24px.js.map +1 -0
- package/plugins/NetworkErrorLinkPlugin/createErrorOverlay.d.ts +3 -3
- package/plugins/NetworkErrorLinkPlugin/createErrorOverlay.js +14 -30
- package/plugins/NetworkErrorLinkPlugin/createErrorOverlay.js.map +1 -1
- package/plugins/NetworkErrorLinkPlugin.d.ts +4 -1
- package/plugins/NetworkErrorLinkPlugin.js +52 -47
- package/plugins/NetworkErrorLinkPlugin.js.map +1 -1
- package/plugins/OmitTypenameLinkPlugin.d.ts +1 -1
- package/plugins/OmitTypenameLinkPlugin.js +13 -38
- package/plugins/OmitTypenameLinkPlugin.js.map +1 -1
- package/plugins/TenantHeaderLinkPlugin.d.ts +3 -3
- package/plugins/TenantHeaderLinkPlugin.js +27 -59
- package/plugins/TenantHeaderLinkPlugin.js.map +1 -1
- package/plugins/components/Image.d.ts +6 -0
- package/plugins/components/Image.js +12 -0
- package/plugins/components/Image.js.map +1 -0
- package/plugins/image.d.ts +1 -1
- package/plugins/image.js +97 -142
- package/plugins/image.js.map +1 -1
- package/plugins/index.d.ts +5 -5
- package/plugins/index.js +39 -86
- package/plugins/index.js.map +1 -1
- package/presentation/envConfig/useEnvConfig.d.ts +6 -0
- package/presentation/envConfig/useEnvConfig.js +9 -0
- package/presentation/envConfig/useEnvConfig.js.map +1 -0
- package/presentation/localStorage/index.d.ts +3 -0
- package/presentation/localStorage/index.js +3 -0
- package/presentation/localStorage/useLocalStorage.d.ts +6 -0
- package/presentation/localStorage/useLocalStorage.js +15 -0
- package/presentation/localStorage/useLocalStorage.js.map +1 -0
- package/presentation/localStorage/useLocalStorageValue.d.ts +1 -0
- package/presentation/localStorage/useLocalStorageValue.js +22 -0
- package/presentation/localStorage/useLocalStorageValue.js.map +1 -0
- package/presentation/localStorage/useLocalStorageValues.d.ts +5 -0
- package/presentation/localStorage/useLocalStorageValues.js +32 -0
- package/presentation/localStorage/useLocalStorageValues.js.map +1 -0
- package/presentation/router/RouteElementRegistry.d.ts +14 -0
- package/presentation/router/RouteElementRegistry.js +29 -0
- package/presentation/router/RouteElementRegistry.js.map +1 -0
- package/presentation/router/abstractions.d.ts +13 -0
- package/presentation/router/abstractions.js +5 -0
- package/presentation/router/abstractions.js.map +1 -0
- package/presentation/router/components/Redirect.d.ts +14 -0
- package/presentation/router/components/Redirect.js +13 -0
- package/presentation/router/components/Redirect.js.map +1 -0
- package/presentation/router/components/RouteContent.d.ts +2 -0
- package/presentation/router/components/RouteContent.js +20 -0
- package/presentation/router/components/RouteContent.js.map +1 -0
- package/presentation/router/components/RouteLink.d.ts +50 -0
- package/presentation/router/components/RouteLink.js +17 -0
- package/presentation/router/components/RouteLink.js.map +1 -0
- package/presentation/router/components/SimpleLink.d.ts +44 -0
- package/presentation/router/components/SimpleLink.js +24 -0
- package/presentation/router/components/SimpleLink.js.map +1 -0
- package/presentation/router/hooks/useRoute.d.ts +6 -0
- package/presentation/router/hooks/useRoute.js +22 -0
- package/presentation/router/hooks/useRoute.js.map +1 -0
- package/presentation/router/hooks/useRouter.d.ts +11 -0
- package/presentation/router/hooks/useRouter.js +29 -0
- package/presentation/router/hooks/useRouter.js.map +1 -0
- package/presentation/router/index.d.ts +4 -0
- package/presentation/router/index.js +3 -0
- package/presentation/router/types.d.ts +5 -0
- package/presentation/router/types.js +0 -0
- package/renderApp.d.ts +2 -0
- package/renderApp.js +10 -0
- package/renderApp.js.map +1 -0
- package/router.d.ts +5 -0
- package/router.js +5 -0
- package/rslib-runtime.js +14 -0
- package/rslib-runtime.js.map +1 -0
- package/shared/di/DiContainerProvider.d.ts +8 -0
- package/shared/di/DiContainerProvider.js +13 -0
- package/shared/di/DiContainerProvider.js.map +1 -0
- package/shared/di/createFeature.d.ts +11 -0
- package/shared/di/createFeature.js +10 -0
- package/shared/di/createFeature.js.map +1 -0
- package/shared/di/useFeature.d.ts +2 -0
- package/shared/di/useFeature.js +12 -0
- package/shared/di/useFeature.js.map +1 -0
- package/static/svg/close_24px.33adaadc.svg +1 -0
- package/types.d.ts +16 -28
- package/types.js +0 -12
- package/utils/createGenericContext.d.ts +13 -0
- package/utils/createGenericContext.js +21 -0
- package/utils/createGenericContext.js.map +1 -0
- package/utils/createHashing.d.ts +2 -0
- package/utils/createHashing.js +15 -0
- package/utils/createHashing.js.map +1 -0
- package/utils/index.d.ts +2 -8
- package/utils/index.js +2 -93
- package/utils/legacyPluginToReactComponent.d.ts +7 -0
- package/utils/legacyPluginToReactComponent.js +15 -0
- package/utils/legacyPluginToReactComponent.js.map +1 -0
- package/components/Routes.d.ts +0 -2
- package/components/Routes.js +0 -45
- package/components/Routes.js.map +0 -1
- package/components/View.d.ts +0 -8
- package/components/View.js +0 -30
- package/components/View.js.map +0 -1
- package/components/index.js.map +0 -1
- package/core/AddRoute.d.ts +0 -3
- package/core/AddRoute.js +0 -19
- package/core/AddRoute.js.map +0 -1
- package/core/DebounceRender.d.ts +0 -11
- package/core/DebounceRender.js +0 -41
- package/core/DebounceRender.js.map +0 -1
- package/core/Routes.d.ts +0 -6
- package/core/Routes.js +0 -42
- package/core/Routes.js.map +0 -1
- package/hooks/useAutocomplete/index.js.map +0 -1
- package/hooks/useDataList/functions/index.js.map +0 -1
- package/hooks/useDataList/index.js.map +0 -1
- package/hooks/useDataList/utils/index.js.map +0 -1
- package/hooks/useDataList/utils/redirectToRouteWithQueryParams.d.ts +0 -14
- package/hooks/useDataList/utils/redirectToRouteWithQueryParams.js +0 -29
- package/hooks/useDataList/utils/redirectToRouteWithQueryParams.js.map +0 -1
- package/hooks/useDataList/utils/types.d.ts +0 -34
- package/hooks/useDataList/utils/types.js +0 -5
- package/hooks/useDataList/utils/types.js.map +0 -1
- package/i18n/index.js.map +0 -1
- package/index.js.map +0 -1
- package/plugins/LocaleHeaderLinkPlugin.d.ts +0 -10
- package/plugins/LocaleHeaderLinkPlugin.js +0 -53
- package/plugins/LocaleHeaderLinkPlugin.js.map +0 -1
- package/plugins/RoutePlugin.d.ts +0 -12
- package/plugins/RoutePlugin.js +0 -38
- package/plugins/RoutePlugin.js.map +0 -1
- package/plugins/ViewPlugin.d.ts +0 -14
- package/plugins/ViewPlugin.js +0 -43
- package/plugins/ViewPlugin.js.map +0 -1
- package/types.js.map +0 -1
- package/utils/getApiUrl.d.ts +0 -1
- package/utils/getApiUrl.js +0 -11
- package/utils/getApiUrl.js.map +0 -1
- package/utils/getGqlApiUrl.d.ts +0 -1
- package/utils/getGqlApiUrl.js +0 -11
- package/utils/getGqlApiUrl.js.map +0 -1
- package/utils/getHeadlessCmsGqlApiUrl.d.ts +0 -5
- package/utils/getHeadlessCmsGqlApiUrl.js +0 -17
- package/utils/getHeadlessCmsGqlApiUrl.js.map +0 -1
- package/utils/getLocaleCode.d.ts +0 -6
- package/utils/getLocaleCode.js +0 -42
- package/utils/getLocaleCode.js.map +0 -1
- package/utils/getPrerenderId.d.ts +0 -6
- package/utils/getPrerenderId.js +0 -10
- package/utils/getPrerenderId.js.map +0 -1
- package/utils/getTenantId.d.ts +0 -6
- package/utils/getTenantId.js +0 -34
- package/utils/getTenantId.js.map +0 -1
- package/utils/index.js.map +0 -1
- package/utils/isLocalhost.d.ts +0 -1
- package/utils/isLocalhost.js +0 -14
- package/utils/isLocalhost.js.map +0 -1
- package/utils/isPrerendering.d.ts +0 -1
- package/utils/isPrerendering.js +0 -10
- package/utils/isPrerendering.js.map +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"presentation/router/components/RouteLink.js","sources":["../../../../src/presentation/router/components/RouteLink.tsx"],"sourcesContent":["import React from \"react\";\nimport { makeDecoratable } from \"@webiny/react-composition\";\nimport type { Route, RouteParamsDefinition, RouteParamsInfer } from \"~/features/router/Route.js\";\nimport { SimpleLink } from \"./SimpleLink.js\";\nimport { useRouter } from \"~/router.js\";\n\ntype BaseAnchorAttributes = Omit<React.AnchorHTMLAttributes<HTMLAnchorElement>, \"href\">;\n\n// The props are generic over the Route's schema.\nexport type RouteLinkProps<TParams extends RouteParamsDefinition | undefined> = [\n TParams extends RouteParamsDefinition\n ? {\n route: Route<TParams>;\n params: RouteParamsInfer<TParams>;\n }\n : { route: Route<TParams> }\n][0] &\n BaseAnchorAttributes;\n\nexport const RouteLink = makeDecoratable(\n \"RouteLink\",\n <TParams extends RouteParamsDefinition | undefined>(props: RouteLinkProps<TParams>) => {\n const router = useRouter();\n\n const { children, route, ...rest } = props as any;\n\n const href = rest.params ? router.getLink(route!, rest.params) : router.getLink(route!);\n\n return (\n <SimpleLink to={href} {...rest}>\n {children}\n </SimpleLink>\n );\n }\n);\n\nexport const RouteLinkComponent = RouteLink;\n"],"names":["RouteLink","makeDecoratable","props","router","useRouter","children","route","rest","href","SimpleLink","RouteLinkComponent"],"mappings":";;;;AAmBO,MAAMA,YAAYC,gBACrB,aACA,CAAoDC;IAChD,MAAMC,SAASC;IAEf,MAAM,EAAEC,QAAQ,EAAEC,KAAK,EAAE,GAAGC,MAAM,GAAGL;IAErC,MAAMM,OAAOD,KAAK,MAAM,GAAGJ,OAAO,OAAO,CAACG,OAAQC,KAAK,MAAM,IAAIJ,OAAO,OAAO,CAACG;IAEhF,OAAO,WAAP,GACI,oBAACG,YAAUA;QAAC,IAAID;QAAO,GAAGD,IAAI;OACzBF;AAGb;AAGG,MAAMK,qBAAqBV"}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
type BaseAnchorAttributes = Omit<React.AnchorHTMLAttributes<HTMLAnchorElement>, "href">;
|
|
3
|
+
export type SimpleLinkProps = BaseAnchorAttributes & {
|
|
4
|
+
to: string;
|
|
5
|
+
};
|
|
6
|
+
export declare const SimpleLink: (({ children, to, ...rest }: SimpleLinkProps) => React.JSX.Element) & {
|
|
7
|
+
original: ({ children, to, ...rest }: SimpleLinkProps) => React.JSX.Element;
|
|
8
|
+
originalName: string;
|
|
9
|
+
displayName: string;
|
|
10
|
+
} & {
|
|
11
|
+
original: (({ children, to, ...rest }: SimpleLinkProps) => React.JSX.Element) & {
|
|
12
|
+
original: ({ children, to, ...rest }: SimpleLinkProps) => React.JSX.Element;
|
|
13
|
+
originalName: string;
|
|
14
|
+
displayName: string;
|
|
15
|
+
};
|
|
16
|
+
originalName: string;
|
|
17
|
+
displayName: string;
|
|
18
|
+
} & {
|
|
19
|
+
createDecorator: (decorator: import("@webiny/react-composition").ComponentDecorator<(({ children, to, ...rest }: SimpleLinkProps) => React.JSX.Element) & {
|
|
20
|
+
original: ({ children, to, ...rest }: SimpleLinkProps) => React.JSX.Element;
|
|
21
|
+
originalName: string;
|
|
22
|
+
displayName: string;
|
|
23
|
+
}>) => (props: unknown) => React.JSX.Element;
|
|
24
|
+
};
|
|
25
|
+
export declare const LinkComponent: (({ children, to, ...rest }: SimpleLinkProps) => React.JSX.Element) & {
|
|
26
|
+
original: ({ children, to, ...rest }: SimpleLinkProps) => React.JSX.Element;
|
|
27
|
+
originalName: string;
|
|
28
|
+
displayName: string;
|
|
29
|
+
} & {
|
|
30
|
+
original: (({ children, to, ...rest }: SimpleLinkProps) => React.JSX.Element) & {
|
|
31
|
+
original: ({ children, to, ...rest }: SimpleLinkProps) => React.JSX.Element;
|
|
32
|
+
originalName: string;
|
|
33
|
+
displayName: string;
|
|
34
|
+
};
|
|
35
|
+
originalName: string;
|
|
36
|
+
displayName: string;
|
|
37
|
+
} & {
|
|
38
|
+
createDecorator: (decorator: import("@webiny/react-composition").ComponentDecorator<(({ children, to, ...rest }: SimpleLinkProps) => React.JSX.Element) & {
|
|
39
|
+
original: ({ children, to, ...rest }: SimpleLinkProps) => React.JSX.Element;
|
|
40
|
+
originalName: string;
|
|
41
|
+
displayName: string;
|
|
42
|
+
}>) => (props: unknown) => React.JSX.Element;
|
|
43
|
+
};
|
|
44
|
+
export {};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import react from "react";
|
|
2
|
+
import { makeDecoratable } from "@webiny/react-composition";
|
|
3
|
+
import { RouterGateway } from "../../../features/router/abstractions.js";
|
|
4
|
+
import { useContainer } from "../../../shared/di/DiContainerProvider.js";
|
|
5
|
+
const SimpleLink = makeDecoratable("SimpleLink", ({ children, to, ...rest })=>{
|
|
6
|
+
const container = useContainer();
|
|
7
|
+
const routerGateway = container.resolve(RouterGateway);
|
|
8
|
+
const handleClick = (event)=>{
|
|
9
|
+
if (event.defaultPrevented || 0 !== event.button || event.metaKey || event.altKey || event.ctrlKey || event.shiftKey || "_blank" === rest.target) return;
|
|
10
|
+
event.preventDefault();
|
|
11
|
+
routerGateway.pushState(to);
|
|
12
|
+
};
|
|
13
|
+
const onClick = rest.onClick ?? handleClick;
|
|
14
|
+
return /*#__PURE__*/ react.createElement("a", {
|
|
15
|
+
href: to,
|
|
16
|
+
rel: "noreferrer noopener",
|
|
17
|
+
...rest,
|
|
18
|
+
onClick: onClick
|
|
19
|
+
}, children);
|
|
20
|
+
});
|
|
21
|
+
const LinkComponent = SimpleLink;
|
|
22
|
+
export { LinkComponent, SimpleLink };
|
|
23
|
+
|
|
24
|
+
//# sourceMappingURL=SimpleLink.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"presentation/router/components/SimpleLink.js","sources":["../../../../src/presentation/router/components/SimpleLink.tsx"],"sourcesContent":["import React from \"react\";\nimport { makeDecoratable } from \"@webiny/react-composition\";\nimport { RouterGateway } from \"~/features/router/abstractions.js\";\nimport { useContainer } from \"~/shared/di/DiContainerProvider.js\";\n\ntype BaseAnchorAttributes = Omit<React.AnchorHTMLAttributes<HTMLAnchorElement>, \"href\">;\n\nexport type SimpleLinkProps = BaseAnchorAttributes & {\n to: string;\n};\n\nexport const SimpleLink = makeDecoratable(\n \"SimpleLink\",\n ({ children, to, ...rest }: SimpleLinkProps) => {\n const container = useContainer();\n\n const routerGateway = container.resolve(RouterGateway);\n\n const handleClick = (event: React.MouseEvent<HTMLAnchorElement>) => {\n // Respect cmd+click / ctrl+click / middle click → open in new tab\n if (\n event.defaultPrevented ||\n event.button !== 0 ||\n event.metaKey ||\n event.altKey ||\n event.ctrlKey ||\n event.shiftKey ||\n rest.target === \"_blank\"\n ) {\n return;\n }\n\n event.preventDefault();\n routerGateway.pushState(to);\n };\n\n const onClick = rest.onClick ?? handleClick;\n\n return (\n <a href={to} rel=\"noreferrer noopener\" {...rest} onClick={onClick}>\n {children}\n </a>\n );\n }\n);\n\nexport const LinkComponent = SimpleLink;\n"],"names":["SimpleLink","makeDecoratable","children","to","rest","container","useContainer","routerGateway","RouterGateway","handleClick","event","onClick","LinkComponent"],"mappings":";;;;AAWO,MAAMA,aAAaC,gBACtB,cACA,CAAC,EAAEC,QAAQ,EAAEC,EAAE,EAAE,GAAGC,MAAuB;IACvC,MAAMC,YAAYC;IAElB,MAAMC,gBAAgBF,UAAU,OAAO,CAACG;IAExC,MAAMC,cAAc,CAACC;QAEjB,IACIA,MAAM,gBAAgB,IACtBA,AAAiB,MAAjBA,MAAM,MAAM,IACZA,MAAM,OAAO,IACbA,MAAM,MAAM,IACZA,MAAM,OAAO,IACbA,MAAM,QAAQ,IACdN,AAAgB,aAAhBA,KAAK,MAAM,EAEX;QAGJM,MAAM,cAAc;QACpBH,cAAc,SAAS,CAACJ;IAC5B;IAEA,MAAMQ,UAAUP,KAAK,OAAO,IAAIK;IAEhC,OAAO,WAAP,GACI,oBAAC;QAAE,MAAMN;QAAI,KAAI;QAAuB,GAAGC,IAAI;QAAE,SAASO;OACrDT;AAGb;AAGG,MAAMU,gBAAgBZ"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { Route, RouteParamsDefinition, RouteParamsInfer } from "../../../features/router/Route.js";
|
|
2
|
+
import { MatchedRoute } from "../../../features/router/abstractions.js";
|
|
3
|
+
export declare function useRoute<TParams extends RouteParamsDefinition | undefined = undefined>(route?: Route<TParams>): {
|
|
4
|
+
route: MatchedRoute<TParams extends RouteParamsDefinition ? RouteParamsInfer<TParams> : undefined>;
|
|
5
|
+
setRouteParams: <T extends Record<string, any>>(cb: (params: T) => T) => void;
|
|
6
|
+
};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { useEffect, useState } from "react";
|
|
2
|
+
import { autorun } from "mobx";
|
|
3
|
+
import { RouterFeature } from "../../../features/router/feature.js";
|
|
4
|
+
import { useFeature } from "../../../shared/di/useFeature.js";
|
|
5
|
+
function useRoute(route) {
|
|
6
|
+
const { presenter } = useFeature(RouterFeature);
|
|
7
|
+
const [currentRoute, setCurrentRoute] = useState(presenter.vm.currentRoute);
|
|
8
|
+
useEffect(()=>{
|
|
9
|
+
autorun(()=>{
|
|
10
|
+
const route = presenter.vm.currentRoute;
|
|
11
|
+
if (!route) return;
|
|
12
|
+
setCurrentRoute(route);
|
|
13
|
+
});
|
|
14
|
+
}, []);
|
|
15
|
+
return {
|
|
16
|
+
route: currentRoute,
|
|
17
|
+
setRouteParams: presenter.setRouteParams.bind(presenter)
|
|
18
|
+
};
|
|
19
|
+
}
|
|
20
|
+
export { useRoute };
|
|
21
|
+
|
|
22
|
+
//# sourceMappingURL=useRoute.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"presentation/router/hooks/useRoute.js","sources":["../../../../src/presentation/router/hooks/useRoute.ts"],"sourcesContent":["import { useEffect, useState } from \"react\";\nimport { autorun } from \"mobx\";\nimport type { Route, RouteParamsDefinition, RouteParamsInfer } from \"~/features/router/Route.js\";\nimport { MatchedRoute } from \"~/features/router/abstractions.js\";\nimport { RouterFeature } from \"~/features/router/feature.js\";\nimport { useFeature } from \"~/shared/di/useFeature.js\";\n\nexport function useRoute<TParams extends RouteParamsDefinition | undefined = undefined>(\n // oxlint-disable-next-line typescript/no-unused-vars\n route?: Route<TParams>\n) {\n const { presenter } = useFeature(RouterFeature);\n const [currentRoute, setCurrentRoute] = useState<MatchedRoute | undefined>(\n presenter.vm.currentRoute\n );\n\n useEffect(() => {\n autorun(() => {\n const route = presenter.vm.currentRoute;\n\n if (!route) {\n return;\n }\n\n setCurrentRoute(route);\n });\n }, []);\n\n // TODO: add validation (the requested route must match the current route)\n\n return {\n route: currentRoute as MatchedRoute<\n TParams extends RouteParamsDefinition ? RouteParamsInfer<TParams> : undefined\n >,\n setRouteParams: presenter.setRouteParams.bind(presenter)\n };\n}\n"],"names":["useRoute","route","presenter","useFeature","RouterFeature","currentRoute","setCurrentRoute","useState","useEffect","autorun"],"mappings":";;;;AAOO,SAASA,SAEZC,KAAsB;IAEtB,MAAM,EAAEC,SAAS,EAAE,GAAGC,WAAWC;IACjC,MAAM,CAACC,cAAcC,gBAAgB,GAAGC,SACpCL,UAAU,EAAE,CAAC,YAAY;IAG7BM,UAAU;QACNC,QAAQ;YACJ,MAAMR,QAAQC,UAAU,EAAE,CAAC,YAAY;YAEvC,IAAI,CAACD,OACD;YAGJK,gBAAgBL;QACpB;IACJ,GAAG,EAAE;IAIL,OAAO;QACH,OAAOI;QAGP,gBAAgBH,UAAU,cAAc,CAAC,IAAI,CAACA;IAClD;AACJ"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { type ReactRoute } from "../../../presentation/router/index.js";
|
|
2
|
+
export declare const useRouter: () => {
|
|
3
|
+
goToRoute: <TParams extends import("../../../features/router/Route").RouteParamsDefinition | undefined>(route: import("../../..").Route<TParams>, ...args: import("../../../features/router/abstractions").RouteParamsArgs<TParams>) => void;
|
|
4
|
+
getLink: <TParams extends import("../../../features/router/Route").RouteParamsDefinition | undefined>(route: import("../../..").Route<TParams>, ...args: import("../../../features/router/abstractions").RouteParamsArgs<TParams>) => string;
|
|
5
|
+
addTransitionGuard: (config: import("../../../features/router").RouteTransitionGuardConfig) => import("../../../features/router").GuardDisposer;
|
|
6
|
+
isTransitionBlocked: () => boolean;
|
|
7
|
+
unblockTransition: () => void;
|
|
8
|
+
confirmTransition: () => void;
|
|
9
|
+
cancelTransition: () => void;
|
|
10
|
+
setRoutes: (routes: ReactRoute[]) => void;
|
|
11
|
+
};
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { RouteElementRegistry } from "../index.js";
|
|
2
|
+
import { RouterFeature } from "../../../features/router/feature.js";
|
|
3
|
+
import { useFeature } from "../../../shared/di/useFeature.js";
|
|
4
|
+
import { useContainer } from "../../../shared/di/DiContainerProvider.js";
|
|
5
|
+
const useRouter = ()=>{
|
|
6
|
+
const { presenter } = useFeature(RouterFeature);
|
|
7
|
+
const container = useContainer();
|
|
8
|
+
const registry = container.resolve(RouteElementRegistry);
|
|
9
|
+
return {
|
|
10
|
+
goToRoute: presenter.goToRoute.bind(presenter),
|
|
11
|
+
getLink: presenter.getLink.bind(presenter),
|
|
12
|
+
addTransitionGuard: presenter.addTransitionGuard.bind(presenter),
|
|
13
|
+
isTransitionBlocked: presenter.isTransitionBlocked.bind(presenter),
|
|
14
|
+
unblockTransition: presenter.unblockTransition.bind(presenter),
|
|
15
|
+
confirmTransition: presenter.confirmTransition.bind(presenter),
|
|
16
|
+
cancelTransition: presenter.cancelTransition.bind(presenter),
|
|
17
|
+
setRoutes: (routes)=>{
|
|
18
|
+
const cleanRoutes = [];
|
|
19
|
+
for (const route of routes){
|
|
20
|
+
cleanRoutes.push(route.route);
|
|
21
|
+
registry.register(route.route.name, route.element);
|
|
22
|
+
}
|
|
23
|
+
presenter.bootstrap(cleanRoutes);
|
|
24
|
+
}
|
|
25
|
+
};
|
|
26
|
+
};
|
|
27
|
+
export { useRouter };
|
|
28
|
+
|
|
29
|
+
//# sourceMappingURL=useRouter.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"presentation/router/hooks/useRouter.js","sources":["../../../../src/presentation/router/hooks/useRouter.ts"],"sourcesContent":["import { type ReactRoute, RouteElementRegistry } from \"~/presentation/router/index.js\";\nimport { RouterFeature } from \"~/features/router/feature.js\";\nimport { useFeature } from \"~/shared/di/useFeature.js\";\nimport { useContainer } from \"~/shared/di/DiContainerProvider.js\";\n\nexport const useRouter = () => {\n const { presenter } = useFeature(RouterFeature);\n const container = useContainer();\n const registry = container.resolve(RouteElementRegistry);\n\n return {\n goToRoute: presenter.goToRoute.bind(presenter),\n getLink: presenter.getLink.bind(presenter),\n addTransitionGuard: presenter.addTransitionGuard.bind(presenter),\n isTransitionBlocked: presenter.isTransitionBlocked.bind(presenter),\n unblockTransition: presenter.unblockTransition.bind(presenter),\n confirmTransition: presenter.confirmTransition.bind(presenter),\n cancelTransition: presenter.cancelTransition.bind(presenter),\n setRoutes: (routes: ReactRoute[]) => {\n const cleanRoutes = [];\n\n for (const route of routes) {\n cleanRoutes.push(route.route);\n registry.register(route.route.name, route.element);\n }\n\n presenter.bootstrap(cleanRoutes);\n }\n };\n};\n"],"names":["useRouter","presenter","useFeature","RouterFeature","container","useContainer","registry","RouteElementRegistry","routes","cleanRoutes","route"],"mappings":";;;;AAKO,MAAMA,YAAY;IACrB,MAAM,EAAEC,SAAS,EAAE,GAAGC,WAAWC;IACjC,MAAMC,YAAYC;IAClB,MAAMC,WAAWF,UAAU,OAAO,CAACG;IAEnC,OAAO;QACH,WAAWN,UAAU,SAAS,CAAC,IAAI,CAACA;QACpC,SAASA,UAAU,OAAO,CAAC,IAAI,CAACA;QAChC,oBAAoBA,UAAU,kBAAkB,CAAC,IAAI,CAACA;QACtD,qBAAqBA,UAAU,mBAAmB,CAAC,IAAI,CAACA;QACxD,mBAAmBA,UAAU,iBAAiB,CAAC,IAAI,CAACA;QACpD,mBAAmBA,UAAU,iBAAiB,CAAC,IAAI,CAACA;QACpD,kBAAkBA,UAAU,gBAAgB,CAAC,IAAI,CAACA;QAClD,WAAW,CAACO;YACR,MAAMC,cAAc,EAAE;YAEtB,KAAK,MAAMC,SAASF,OAAQ;gBACxBC,YAAY,IAAI,CAACC,MAAM,KAAK;gBAC5BJ,SAAS,QAAQ,CAACI,MAAM,KAAK,CAAC,IAAI,EAAEA,MAAM,OAAO;YACrD;YAEAT,UAAU,SAAS,CAACQ;QACxB;IACJ;AACJ"}
|
|
File without changes
|
package/renderApp.d.ts
ADDED
package/renderApp.js
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import client from "react-dom/client";
|
|
2
|
+
const renderApp = (app)=>{
|
|
3
|
+
const container = document.getElementById("root");
|
|
4
|
+
const root = client.createRoot(container);
|
|
5
|
+
root.render(app);
|
|
6
|
+
return root;
|
|
7
|
+
};
|
|
8
|
+
export { renderApp };
|
|
9
|
+
|
|
10
|
+
//# sourceMappingURL=renderApp.js.map
|
package/renderApp.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"renderApp.js","sources":["../src/renderApp.tsx"],"sourcesContent":["import type { Root } from \"react-dom/client\";\nimport ReactDOMClient from \"react-dom/client\";\n\nexport const renderApp = (app: React.JSX.Element): Root => {\n const container = document.getElementById(\"root\")!;\n\n const root = ReactDOMClient.createRoot(container);\n root.render(app);\n return root;\n};\n"],"names":["renderApp","app","container","document","root","ReactDOMClient"],"mappings":";AAGO,MAAMA,YAAY,CAACC;IACtB,MAAMC,YAAYC,SAAS,cAAc,CAAC;IAE1C,MAAMC,OAAOC,OAAAA,UAAyB,CAACH;IACvCE,KAAK,MAAM,CAACH;IACZ,OAAOG;AACX"}
|
package/router.d.ts
ADDED
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export { Route } from "./features/router/Route.js";
|
|
2
|
+
export { useRouter } from "./presentation/router/hooks/useRouter.js";
|
|
3
|
+
export { useRoute } from "./presentation/router/hooks/useRoute.js";
|
|
4
|
+
export { RouteLink, type RouteLinkProps } from "./presentation/router/components/RouteLink.js";
|
|
5
|
+
export { SimpleLink, type SimpleLinkProps } from "./presentation/router/components/SimpleLink.js";
|
package/router.js
ADDED
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export { Route } from "./features/router/Route.js";
|
|
2
|
+
export { useRouter } from "./presentation/router/hooks/useRouter.js";
|
|
3
|
+
export { useRoute } from "./presentation/router/hooks/useRoute.js";
|
|
4
|
+
export { RouteLink } from "./presentation/router/components/RouteLink.js";
|
|
5
|
+
export { SimpleLink } from "./presentation/router/components/SimpleLink.js";
|
package/rslib-runtime.js
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
var __webpack_require__ = {};
|
|
2
|
+
(()=>{
|
|
3
|
+
__webpack_require__.g = (()=>{
|
|
4
|
+
if ('object' == typeof globalThis) return globalThis;
|
|
5
|
+
try {
|
|
6
|
+
return this || new Function('return this')();
|
|
7
|
+
} catch (e) {
|
|
8
|
+
if ('object' == typeof window) return window;
|
|
9
|
+
}
|
|
10
|
+
})();
|
|
11
|
+
})();
|
|
12
|
+
export { __webpack_require__ };
|
|
13
|
+
|
|
14
|
+
//# sourceMappingURL=rslib-runtime.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"rslib-runtime.js","sources":["webpack://webpack/runtime/global"],"sourcesContent":["__webpack_require__.g = (() => {\n\tif (typeof globalThis === 'object') return globalThis;\n\ttry {\n\t\treturn this || new Function('return this')();\n\t} catch (e) {\n\t\tif (typeof window === 'object') return window;\n\t}\n})();"],"names":["__webpack_require__","globalThis","Function","e","window"],"mappings":";;IAAAA,oBAAoB,CAAC,GAAG,AAAC;QACxB,IAAI,AAAsB,YAAtB,OAAOC,YAAyB,OAAOA;QAC3C,IAAI;YACH,OAAO,IAAI,IAAI,IAAIC,SAAS;QAC7B,EAAE,OAAOC,GAAG;YACX,IAAI,AAAkB,YAAlB,OAAOC,QAAqB,OAAOA;QACxC;IACD"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { Container } from "@webiny/di";
|
|
3
|
+
export interface DiContainerProviderProps {
|
|
4
|
+
container: Container;
|
|
5
|
+
children: React.ReactNode;
|
|
6
|
+
}
|
|
7
|
+
export declare const DiContainerProvider: ({ container, children }: DiContainerProviderProps) => React.JSX.Element;
|
|
8
|
+
export declare const useContainer: () => Container;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import react from "react";
|
|
2
|
+
import { createGenericContext } from "../../utils/createGenericContext.js";
|
|
3
|
+
const DiContainerContext = createGenericContext("DiContainer");
|
|
4
|
+
const DiContainerProvider = ({ container, children })=>/*#__PURE__*/ react.createElement(DiContainerContext.Provider, {
|
|
5
|
+
container: container
|
|
6
|
+
}, children);
|
|
7
|
+
const useContainer = ()=>{
|
|
8
|
+
const context = DiContainerContext.useHook();
|
|
9
|
+
return context.container;
|
|
10
|
+
};
|
|
11
|
+
export { DiContainerProvider, useContainer };
|
|
12
|
+
|
|
13
|
+
//# sourceMappingURL=DiContainerProvider.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"shared/di/DiContainerProvider.js","sources":["../../../src/shared/di/DiContainerProvider.tsx"],"sourcesContent":["import React from \"react\";\nimport { Container } from \"@webiny/di\";\nimport { createGenericContext } from \"~/utils/createGenericContext.js\";\n\ntype DiContainerContext = { container: Container };\n\nconst DiContainerContext = createGenericContext<DiContainerContext>(\"DiContainer\");\n\nexport interface DiContainerProviderProps {\n container: Container;\n children: React.ReactNode;\n}\n\nexport const DiContainerProvider = ({ container, children }: DiContainerProviderProps) => {\n return (\n <DiContainerContext.Provider container={container}>{children}</DiContainerContext.Provider>\n );\n};\n\nexport const useContainer = () => {\n const context = DiContainerContext.useHook();\n\n return context.container;\n};\n"],"names":["DiContainerContext","createGenericContext","DiContainerProvider","container","children","useContainer","context"],"mappings":";;AAMA,MAAMA,qBAAqBC,qBAAyC;AAO7D,MAAMC,sBAAsB,CAAC,EAAEC,SAAS,EAAEC,QAAQ,EAA4B,GAC1E,WAAP,GACI,oBAACJ,mBAAmB,QAAQ;QAAC,WAAWG;OAAYC;AAIrD,MAAMC,eAAe;IACxB,MAAMC,UAAUN,mBAAmB,OAAO;IAE1C,OAAOM,QAAQ,SAAS;AAC5B"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { Container } from "@webiny/di";
|
|
2
|
+
export interface FeatureDefinition<TExports = any, TParams extends any[] = []> {
|
|
3
|
+
name: string;
|
|
4
|
+
register: (container: Container, ...args: TParams) => void;
|
|
5
|
+
resolve: (container: Container) => TExports;
|
|
6
|
+
}
|
|
7
|
+
export declare function createFeature<TExports = any, TParams extends any[] = []>(def: {
|
|
8
|
+
name: string;
|
|
9
|
+
register: (container: Container, ...args: TParams) => void;
|
|
10
|
+
resolve: (container: Container) => TExports;
|
|
11
|
+
}): FeatureDefinition<TExports, TParams>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"shared/di/createFeature.js","sources":["../../../src/shared/di/createFeature.ts"],"sourcesContent":["import { Container } from \"@webiny/di\";\n\nexport interface FeatureDefinition<TExports = any, TParams extends any[] = []> {\n name: string;\n register: (container: Container, ...args: TParams) => void;\n resolve: (container: Container) => TExports;\n}\n\nexport function createFeature<\n TExports = any,\n TParams extends any[] = [] // tuple for extra args\n>(def: {\n name: string;\n register: (container: Container, ...args: TParams) => void;\n resolve: (container: Container) => TExports;\n}): FeatureDefinition<TExports, TParams> {\n return {\n name: def.name,\n register: def.register,\n resolve: (container: Container): TExports => {\n return def.resolve(container);\n }\n };\n}\n"],"names":["createFeature","def","container"],"mappings":"AAQO,SAASA,cAGdC,GAID;IACG,OAAO;QACH,MAAMA,IAAI,IAAI;QACd,UAAUA,IAAI,QAAQ;QACtB,SAAS,CAACC,YACCD,IAAI,OAAO,CAACC;IAE3B;AACJ"}
|
|
@@ -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,25 +1,11 @@
|
|
|
1
|
-
|
|
2
|
-
import
|
|
3
|
-
import { Plugin } from "@webiny/plugins/types";
|
|
4
|
-
import { ApolloClient } from "apollo-client";
|
|
5
|
-
|
|
6
|
-
export
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
key: string;
|
|
10
|
-
src: string;
|
|
11
|
-
size: number;
|
|
12
|
-
type: string;
|
|
13
|
-
tags: string[];
|
|
14
|
-
aliases: string[];
|
|
15
|
-
createdOn: string;
|
|
16
|
-
createdBy: {
|
|
17
|
-
id: string;
|
|
18
|
-
displayName: string;
|
|
19
|
-
};
|
|
20
|
-
[key: string]: any;
|
|
21
|
-
}
|
|
22
|
-
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 = {
|
|
23
9
|
apolloClient: ApolloClient<object>;
|
|
24
10
|
onProgress?: (params: {
|
|
25
11
|
sent: number;
|
|
@@ -27,7 +13,7 @@ export declare type UploadOptions = {
|
|
|
27
13
|
percentage: number;
|
|
28
14
|
}) => void;
|
|
29
15
|
};
|
|
30
|
-
export
|
|
16
|
+
export type UiStatePlugin = Plugin & {
|
|
31
17
|
type: "ui-state";
|
|
32
18
|
render(): React.ReactElement;
|
|
33
19
|
};
|
|
@@ -38,12 +24,12 @@ export interface UploadedFile {
|
|
|
38
24
|
size: number;
|
|
39
25
|
key: string;
|
|
40
26
|
}
|
|
41
|
-
export
|
|
27
|
+
export type FileUploaderPlugin = Plugin & {
|
|
42
28
|
type: "file-uploader";
|
|
43
29
|
name: "file-uploader";
|
|
44
30
|
upload(file: File, options: UploadOptions): Promise<UploadedFile>;
|
|
45
31
|
};
|
|
46
|
-
export { Plugin };
|
|
32
|
+
export type { Plugin };
|
|
47
33
|
export interface ImageProps {
|
|
48
34
|
src: string;
|
|
49
35
|
preset?: string;
|
|
@@ -64,7 +50,7 @@ export interface ImageProps {
|
|
|
64
50
|
* "getImageSrc" has to be defined as a separate property, so its functionality can be reused outside of
|
|
65
51
|
* the Image component. This is ideal in cases where manual creation of image src is needed.
|
|
66
52
|
*/
|
|
67
|
-
export
|
|
53
|
+
export type ImageComponentPlugin = Plugin & {
|
|
68
54
|
type: "image-component";
|
|
69
55
|
render: (props: ImageProps) => React.ReactElement;
|
|
70
56
|
getImageSrc: (props?: Record<string, any>) => string;
|
|
@@ -76,7 +62,9 @@ export declare type ImageComponentPlugin = Plugin & {
|
|
|
76
62
|
* Enables registering new routes.
|
|
77
63
|
* @see https://docs.webiny.com/docs/webiny-apps/admin/development/plugins-reference/app#route
|
|
78
64
|
*/
|
|
79
|
-
export
|
|
65
|
+
export type RoutePlugin = Plugin & {
|
|
80
66
|
type: "route";
|
|
81
|
-
route: React.ReactElement
|
|
67
|
+
route: React.ReactElement<{
|
|
68
|
+
path: string;
|
|
69
|
+
}>;
|
|
82
70
|
};
|
package/types.js
CHANGED
|
@@ -1,12 +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
|
-
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,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"}
|
package/utils/index.d.ts
CHANGED
|
@@ -1,8 +1,2 @@
|
|
|
1
|
-
export * from "./
|
|
2
|
-
export * from "./
|
|
3
|
-
export * from "./getHeadlessCmsGqlApiUrl";
|
|
4
|
-
export * from "./getLocaleCode";
|
|
5
|
-
export * from "./getPrerenderId";
|
|
6
|
-
export * from "./getTenantId";
|
|
7
|
-
export * from "./isLocalhost";
|
|
8
|
-
export * from "./isPrerendering";
|
|
1
|
+
export * from "./createHashing.js";
|
|
2
|
+
export * from "./legacyPluginToReactComponent.js";
|
package/utils/index.js
CHANGED
|
@@ -1,93 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
var _getApiUrl = require("./getApiUrl");
|
|
7
|
-
Object.keys(_getApiUrl).forEach(function (key) {
|
|
8
|
-
if (key === "default" || key === "__esModule") return;
|
|
9
|
-
if (key in exports && exports[key] === _getApiUrl[key]) return;
|
|
10
|
-
Object.defineProperty(exports, key, {
|
|
11
|
-
enumerable: true,
|
|
12
|
-
get: function get() {
|
|
13
|
-
return _getApiUrl[key];
|
|
14
|
-
}
|
|
15
|
-
});
|
|
16
|
-
});
|
|
17
|
-
var _getGqlApiUrl = require("./getGqlApiUrl");
|
|
18
|
-
Object.keys(_getGqlApiUrl).forEach(function (key) {
|
|
19
|
-
if (key === "default" || key === "__esModule") return;
|
|
20
|
-
if (key in exports && exports[key] === _getGqlApiUrl[key]) return;
|
|
21
|
-
Object.defineProperty(exports, key, {
|
|
22
|
-
enumerable: true,
|
|
23
|
-
get: function get() {
|
|
24
|
-
return _getGqlApiUrl[key];
|
|
25
|
-
}
|
|
26
|
-
});
|
|
27
|
-
});
|
|
28
|
-
var _getHeadlessCmsGqlApiUrl = require("./getHeadlessCmsGqlApiUrl");
|
|
29
|
-
Object.keys(_getHeadlessCmsGqlApiUrl).forEach(function (key) {
|
|
30
|
-
if (key === "default" || key === "__esModule") return;
|
|
31
|
-
if (key in exports && exports[key] === _getHeadlessCmsGqlApiUrl[key]) return;
|
|
32
|
-
Object.defineProperty(exports, key, {
|
|
33
|
-
enumerable: true,
|
|
34
|
-
get: function get() {
|
|
35
|
-
return _getHeadlessCmsGqlApiUrl[key];
|
|
36
|
-
}
|
|
37
|
-
});
|
|
38
|
-
});
|
|
39
|
-
var _getLocaleCode = require("./getLocaleCode");
|
|
40
|
-
Object.keys(_getLocaleCode).forEach(function (key) {
|
|
41
|
-
if (key === "default" || key === "__esModule") return;
|
|
42
|
-
if (key in exports && exports[key] === _getLocaleCode[key]) return;
|
|
43
|
-
Object.defineProperty(exports, key, {
|
|
44
|
-
enumerable: true,
|
|
45
|
-
get: function get() {
|
|
46
|
-
return _getLocaleCode[key];
|
|
47
|
-
}
|
|
48
|
-
});
|
|
49
|
-
});
|
|
50
|
-
var _getPrerenderId = require("./getPrerenderId");
|
|
51
|
-
Object.keys(_getPrerenderId).forEach(function (key) {
|
|
52
|
-
if (key === "default" || key === "__esModule") return;
|
|
53
|
-
if (key in exports && exports[key] === _getPrerenderId[key]) return;
|
|
54
|
-
Object.defineProperty(exports, key, {
|
|
55
|
-
enumerable: true,
|
|
56
|
-
get: function get() {
|
|
57
|
-
return _getPrerenderId[key];
|
|
58
|
-
}
|
|
59
|
-
});
|
|
60
|
-
});
|
|
61
|
-
var _getTenantId = require("./getTenantId");
|
|
62
|
-
Object.keys(_getTenantId).forEach(function (key) {
|
|
63
|
-
if (key === "default" || key === "__esModule") return;
|
|
64
|
-
if (key in exports && exports[key] === _getTenantId[key]) return;
|
|
65
|
-
Object.defineProperty(exports, key, {
|
|
66
|
-
enumerable: true,
|
|
67
|
-
get: function get() {
|
|
68
|
-
return _getTenantId[key];
|
|
69
|
-
}
|
|
70
|
-
});
|
|
71
|
-
});
|
|
72
|
-
var _isLocalhost = require("./isLocalhost");
|
|
73
|
-
Object.keys(_isLocalhost).forEach(function (key) {
|
|
74
|
-
if (key === "default" || key === "__esModule") return;
|
|
75
|
-
if (key in exports && exports[key] === _isLocalhost[key]) return;
|
|
76
|
-
Object.defineProperty(exports, key, {
|
|
77
|
-
enumerable: true,
|
|
78
|
-
get: function get() {
|
|
79
|
-
return _isLocalhost[key];
|
|
80
|
-
}
|
|
81
|
-
});
|
|
82
|
-
});
|
|
83
|
-
var _isPrerendering = require("./isPrerendering");
|
|
84
|
-
Object.keys(_isPrerendering).forEach(function (key) {
|
|
85
|
-
if (key === "default" || key === "__esModule") return;
|
|
86
|
-
if (key in exports && exports[key] === _isPrerendering[key]) return;
|
|
87
|
-
Object.defineProperty(exports, key, {
|
|
88
|
-
enumerable: true,
|
|
89
|
-
get: function get() {
|
|
90
|
-
return _isPrerendering[key];
|
|
91
|
-
}
|
|
92
|
-
});
|
|
93
|
-
});
|
|
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>;
|