@webiny/app 5.44.1-beta.0 → 5.45.0-beta.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/App.d.ts +5 -13
- package/App.js +70 -87
- package/App.js.map +1 -1
- package/AppContainer.d.ts +23 -0
- package/AppContainer.js +9 -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 +16 -47
- package/apollo-client/InMemoryCache.js.map +1 -1
- package/apollo-client/IntrospectionFragmentMatcher.d.ts +2 -2
- package/apollo-client/IntrospectionFragmentMatcher.js +33 -50
- package/apollo-client/IntrospectionFragmentMatcher.js.map +1 -1
- package/components/Image.d.ts +1 -2
- package/components/Image.js +11 -19
- package/components/Image.js.map +1 -1
- package/components/index.d.ts +1 -2
- package/components/index.js +1 -19
- package/components/index.js.map +1 -1
- package/config/RouterConfig/Route.d.ts +29 -0
- package/config/RouterConfig/Route.js +33 -0
- package/config/RouterConfig/Route.js.map +1 -0
- package/config/RouterConfig.d.ts +31 -0
- package/config/RouterConfig.js +18 -0
- package/config/RouterConfig.js.map +1 -0
- package/config.js +9 -15
- package/config.js.map +1 -1
- package/contexts/Ui/index.js +28 -52
- package/contexts/Ui/index.js.map +1 -1
- package/core/DebounceRender.js +13 -24
- package/core/DebounceRender.js.map +1 -1
- package/core/Plugin.d.ts +1 -1
- package/core/Plugin.js +11 -19
- package/core/Plugin.js.map +1 -1
- package/core/Plugins.d.ts +1 -1
- package/core/Plugins.js +20 -25
- package/core/Plugins.js.map +1 -1
- package/core/Provider.d.ts +1 -1
- package/core/Provider.js +9 -13
- package/core/Provider.js.map +1 -1
- package/core/Routes.d.ts +2 -1
- package/core/Routes.js +13 -23
- package/core/Routes.js.map +1 -1
- package/core/createProvider.d.ts +2 -2
- package/core/createProvider.js +1 -7
- package/core/createProvider.js.map +1 -1
- package/core/createProviderPlugin.d.ts +1 -1
- package/core/createProviderPlugin.js +4 -10
- package/core/createProviderPlugin.js.map +1 -1
- package/errors/AuthenticationErrorEvent.d.ts +9 -0
- package/errors/AuthenticationErrorEvent.js +10 -0
- package/errors/AuthenticationErrorEvent.js.map +1 -0
- package/errors/NetworkErrorEvent.d.ts +15 -0
- package/errors/NetworkErrorEvent.js +10 -0
- package/errors/NetworkErrorEvent.js.map +1 -0
- package/errors/abstractions.d.ts +12 -0
- package/errors/abstractions.js +5 -0
- package/errors/abstractions.js.map +1 -0
- package/errors/index.d.ts +6 -0
- package/errors/index.js +6 -0
- package/errors/index.js.map +1 -0
- package/exports/admin/envConfig.d.ts +1 -0
- package/exports/admin/envConfig.js +3 -0
- package/exports/admin/envConfig.js.map +1 -0
- package/exports/admin/graphqlClient.d.ts +1 -0
- package/exports/admin/graphqlClient.js +3 -0
- package/exports/admin/graphqlClient.js.map +1 -0
- package/exports/admin/localStorage.d.ts +2 -0
- package/exports/admin/localStorage.js +4 -0
- package/exports/admin/localStorage.js.map +1 -0
- package/exports/admin/router.d.ts +4 -0
- package/exports/admin/router.js +6 -0
- package/exports/admin/router.js.map +1 -0
- package/exports/admin/security.d.ts +1 -0
- package/exports/admin/security.js +3 -0
- package/exports/admin/security.js.map +1 -0
- package/exports/admin.d.ts +6 -0
- package/exports/admin.js +8 -0
- package/exports/admin.js.map +1 -0
- package/features/envConfig/EnvConfig.d.ts +6 -0
- package/features/envConfig/EnvConfig.js +14 -0
- package/features/envConfig/EnvConfig.js.map +1 -0
- package/features/envConfig/abstractions.d.ts +27 -0
- package/features/envConfig/abstractions.js +4 -0
- package/features/envConfig/abstractions.js.map +1 -0
- package/features/envConfig/feature.d.ts +17 -0
- package/features/envConfig/feature.js +14 -0
- package/features/envConfig/feature.js.map +1 -0
- package/features/envConfig/index.d.ts +1 -0
- package/features/envConfig/index.js +3 -0
- package/features/envConfig/index.js.map +1 -0
- package/features/eventPublisher/EventPublisher.d.ts +8 -0
- package/features/eventPublisher/EventPublisher.js +27 -0
- package/features/eventPublisher/EventPublisher.js.map +1 -0
- package/features/eventPublisher/abstractions.d.ts +18 -0
- package/features/eventPublisher/abstractions.js +14 -0
- package/features/eventPublisher/abstractions.js.map +1 -0
- package/features/eventPublisher/feature.d.ts +1 -0
- package/features/eventPublisher/feature.js +11 -0
- package/features/eventPublisher/feature.js.map +1 -0
- package/features/eventPublisher/index.d.ts +3 -0
- package/features/eventPublisher/index.js +4 -0
- package/features/eventPublisher/index.js.map +1 -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 +18 -0
- package/features/graphqlClient/BatchingGraphQLClient.js +164 -0
- package/features/graphqlClient/BatchingGraphQLClient.js.map +1 -0
- package/features/graphqlClient/FetchGraphQLClient.d.ts +10 -0
- package/features/graphqlClient/FetchGraphQLClient.js +62 -0
- package/features/graphqlClient/FetchGraphQLClient.js.map +1 -0
- package/features/graphqlClient/NetworkErrorPublishing.d.ts +14 -0
- package/features/graphqlClient/NetworkErrorPublishing.js +55 -0
- package/features/graphqlClient/NetworkErrorPublishing.js.map +1 -0
- package/features/graphqlClient/RequestValue.d.ts +20 -0
- package/features/graphqlClient/RequestValue.js +42 -0
- package/features/graphqlClient/RequestValue.js.map +1 -0
- package/features/graphqlClient/RetryGraphQLClient.d.ts +18 -0
- package/features/graphqlClient/RetryGraphQLClient.js +54 -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 +350 -0
- package/features/graphqlClient/__tests__/GraphQLClient.test.js.map +1 -0
- package/features/graphqlClient/abstractions.d.ts +17 -0
- package/features/graphqlClient/abstractions.js +4 -0
- package/features/graphqlClient/abstractions.js.map +1 -0
- package/features/graphqlClient/feature.d.ts +6 -0
- package/features/graphqlClient/feature.js +31 -0
- package/features/graphqlClient/feature.js.map +1 -0
- package/features/graphqlClient/index.d.ts +1 -0
- package/features/graphqlClient/index.js +3 -0
- package/features/graphqlClient/index.js.map +1 -0
- package/features/graphqlClient/types.d.ts +5 -0
- package/features/graphqlClient/types.js +3 -0
- package/features/graphqlClient/types.js.map +1 -0
- package/features/localStorage/BrowserLocalStorageGateway.d.ts +9 -0
- package/features/localStorage/BrowserLocalStorageGateway.js +68 -0
- package/features/localStorage/BrowserLocalStorageGateway.js.map +1 -0
- package/features/localStorage/LocalStorage.d.ts +12 -0
- package/features/localStorage/LocalStorage.js +31 -0
- package/features/localStorage/LocalStorage.js.map +1 -0
- package/features/localStorage/LocalStorageRepository.d.ts +20 -0
- package/features/localStorage/LocalStorageRepository.js +95 -0
- package/features/localStorage/LocalStorageRepository.js.map +1 -0
- package/features/localStorage/abstractions.d.ts +48 -0
- package/features/localStorage/abstractions.js +19 -0
- package/features/localStorage/abstractions.js.map +1 -0
- package/features/localStorage/feature.d.ts +12 -0
- package/features/localStorage/feature.js +34 -0
- package/features/localStorage/feature.js.map +1 -0
- package/features/localStorage/index.d.ts +1 -0
- package/features/localStorage/index.js +3 -0
- package/features/localStorage/index.js.map +1 -0
- package/features/router/HistoryRouterGateway.d.ts +18 -0
- package/features/router/HistoryRouterGateway.js +82 -0
- package/features/router/HistoryRouterGateway.js.map +1 -0
- package/features/router/HistoryRouterGateway.test.d.ts +1 -0
- package/features/router/HistoryRouterGateway.test.js +204 -0
- package/features/router/HistoryRouterGateway.test.js.map +1 -0
- package/features/router/Route.d.ts +19 -0
- package/features/router/Route.js +59 -0
- package/features/router/Route.js.map +1 -0
- package/features/router/RouteUrl.d.ts +85 -0
- package/features/router/RouteUrl.js +232 -0
- package/features/router/RouteUrl.js.map +1 -0
- package/features/router/Router.d.ts +45 -0
- package/features/router/Router.js +129 -0
- package/features/router/Router.js.map +1 -0
- package/features/router/RouterPresenter.d.ts +17 -0
- package/features/router/RouterPresenter.js +45 -0
- package/features/router/RouterPresenter.js.map +1 -0
- package/features/router/RouterRepository.d.ts +21 -0
- package/features/router/RouterRepository.js +71 -0
- package/features/router/RouterRepository.js.map +1 -0
- package/features/router/RouterRepository.test.d.ts +1 -0
- package/features/router/RouterRepository.test.js +154 -0
- package/features/router/RouterRepository.test.js.map +1 -0
- package/features/router/abstractions.d.ts +68 -0
- package/features/router/abstractions.js +15 -0
- package/features/router/abstractions.js.map +1 -0
- package/features/router/feature.d.ts +4 -0
- package/features/router/feature.js +18 -0
- package/features/router/feature.js.map +1 -0
- package/features/router/index.d.ts +1 -0
- package/features/router/index.js +3 -0
- package/features/router/index.js.map +1 -0
- package/helpers/InterfaceGenerator/date.d.ts +15 -0
- package/helpers/InterfaceGenerator/date.js +3 -0
- package/helpers/InterfaceGenerator/date.js.map +1 -0
- package/helpers/InterfaceGenerator/id.d.ts +23 -0
- package/helpers/InterfaceGenerator/id.js +3 -0
- package/helpers/InterfaceGenerator/id.js.map +1 -0
- package/helpers/InterfaceGenerator/identity.d.ts +10 -0
- package/helpers/InterfaceGenerator/identity.js +3 -0
- package/helpers/InterfaceGenerator/identity.js.map +1 -0
- package/helpers/InterfaceGenerator/index.d.ts +5 -0
- package/helpers/InterfaceGenerator/index.js +3 -0
- package/helpers/InterfaceGenerator/index.js.map +1 -0
- package/helpers/InterfaceGenerator/numeric.d.ts +12 -0
- package/helpers/InterfaceGenerator/numeric.js +3 -0
- package/helpers/InterfaceGenerator/numeric.js.map +1 -0
- package/helpers/InterfaceGenerator/truthful.d.ts +7 -0
- package/helpers/InterfaceGenerator/truthful.js +3 -0
- package/helpers/InterfaceGenerator/truthful.js.map +1 -0
- package/hooks/useAutocomplete/index.d.ts +1 -1
- package/hooks/useAutocomplete/index.js +1 -12
- package/hooks/useAutocomplete/index.js.map +1 -1
- package/hooks/useAutocomplete/useAutocomplete.d.ts +1 -1
- package/hooks/useAutocomplete/useAutocomplete.js +6 -16
- package/hooks/useAutocomplete/useAutocomplete.js.map +1 -1
- package/hooks/useDataList/functions/getData.js +2 -11
- package/hooks/useDataList/functions/getData.js.map +1 -1
- package/hooks/useDataList/functions/getError.js +2 -11
- package/hooks/useDataList/functions/getError.js.map +1 -1
- package/hooks/useDataList/functions/getMeta.js +2 -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/index.js.map +1 -1
- package/hooks/useDataList/functions/searchDataByKey.js +4 -10
- 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/index.js.map +1 -1
- package/hooks/useDataList/useDataList.d.ts +2 -3
- package/hooks/useDataList/useDataList.js +74 -94
- 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/index.js.map +1 -1
- package/hooks/useDataList/utils/prepareLoadListParams.js +10 -16
- package/hooks/useDataList/utils/prepareLoadListParams.js.map +1 -1
- package/hooks/useHandler.js +7 -12
- package/hooks/useHandler.js.map +1 -1
- package/hooks/useHandlers.js +11 -17
- package/hooks/useHandlers.js.map +1 -1
- package/hooks/useRegisterLegacyPlugin.d.ts +1 -1
- package/hooks/useRegisterLegacyPlugin.js +5 -11
- package/hooks/useRegisterLegacyPlugin.js.map +1 -1
- package/hooks/useUi.d.ts +1 -1
- package/hooks/useUi.js +4 -10
- package/hooks/useUi.js.map +1 -1
- package/i18n/i18n.js +5 -13
- package/i18n/i18n.js.map +1 -1
- package/i18n/index.d.ts +1 -1
- package/i18n/index.js +1 -13
- package/i18n/index.js.map +1 -1
- package/index.d.ts +23 -15
- package/index.js +25 -177
- package/index.js.map +1 -1
- package/package.json +25 -22
- package/plugins/AddQuerySelectionPlugin.d.ts +2 -2
- package/plugins/AddQuerySelectionPlugin.js +61 -107
- package/plugins/AddQuerySelectionPlugin.js.map +1 -1
- package/plugins/ApolloCacheObjectIdPlugin.js +12 -31
- package/plugins/ApolloCacheObjectIdPlugin.js.map +1 -1
- package/plugins/ApolloDynamicLink.d.ts +3 -2
- package/plugins/ApolloDynamicLink.js +19 -46
- package/plugins/ApolloDynamicLink.js.map +1 -1
- package/plugins/ApolloLinkPlugin.d.ts +1 -1
- package/plugins/ApolloLinkPlugin.js +18 -37
- package/plugins/ApolloLinkPlugin.js.map +1 -1
- package/plugins/ConsoleLinkPlugin.d.ts +1 -1
- package/plugins/ConsoleLinkPlugin.js +20 -41
- package/plugins/ConsoleLinkPlugin.js.map +1 -1
- package/plugins/NetworkErrorLinkPlugin/ErrorOverlay.d.ts +8 -13
- package/plugins/NetworkErrorLinkPlugin/ErrorOverlay.js +35 -58
- package/plugins/NetworkErrorLinkPlugin/ErrorOverlay.js.map +1 -1
- package/plugins/NetworkErrorLinkPlugin/GqlErrorOverlay.d.ts +14 -0
- package/plugins/NetworkErrorLinkPlugin/GqlErrorOverlay.js +31 -0
- package/plugins/NetworkErrorLinkPlugin/GqlErrorOverlay.js.map +1 -0
- package/plugins/NetworkErrorLinkPlugin/LocalAwsLambdaTimeoutMessage.d.ts +2 -0
- package/plugins/NetworkErrorLinkPlugin/LocalAwsLambdaTimeoutMessage.js +31 -0
- package/plugins/NetworkErrorLinkPlugin/LocalAwsLambdaTimeoutMessage.js.map +1 -0
- package/plugins/NetworkErrorLinkPlugin/StyledComponents.d.ts +4 -5
- package/plugins/NetworkErrorLinkPlugin/StyledComponents.js +68 -12
- package/plugins/NetworkErrorLinkPlugin/StyledComponents.js.map +1 -1
- package/plugins/NetworkErrorLinkPlugin/Typography.d.ts +8 -0
- package/plugins/NetworkErrorLinkPlugin/Typography.js +18 -0
- package/plugins/NetworkErrorLinkPlugin/Typography.js.map +1 -0
- package/plugins/NetworkErrorLinkPlugin/createErrorOverlay.d.ts +3 -3
- package/plugins/NetworkErrorLinkPlugin/createErrorOverlay.js +10 -25
- package/plugins/NetworkErrorLinkPlugin/createErrorOverlay.js.map +1 -1
- package/plugins/NetworkErrorLinkPlugin.d.ts +4 -1
- package/plugins/NetworkErrorLinkPlugin.js +60 -37
- package/plugins/NetworkErrorLinkPlugin.js.map +1 -1
- package/plugins/OmitTypenameLinkPlugin.d.ts +1 -1
- package/plugins/OmitTypenameLinkPlugin.js +11 -30
- package/plugins/OmitTypenameLinkPlugin.js.map +1 -1
- package/plugins/TenantHeaderLinkPlugin.d.ts +3 -3
- package/plugins/TenantHeaderLinkPlugin.js +29 -48
- package/plugins/TenantHeaderLinkPlugin.js.map +1 -1
- package/plugins/components/Image.d.ts +6 -0
- package/plugins/components/Image.js +19 -0
- package/plugins/components/Image.js.map +1 -0
- package/plugins/image.d.ts +1 -1
- package/plugins/image.js +46 -53
- package/plugins/image.js.map +1 -1
- package/plugins/index.d.ts +4 -4
- package/plugins/index.js +31 -53
- package/plugins/index.js.map +1 -1
- package/presentation/localStorage/index.d.ts +3 -0
- package/presentation/localStorage/index.js +5 -0
- package/presentation/localStorage/index.js.map +1 -0
- package/presentation/localStorage/useLocalStorage.d.ts +6 -0
- package/presentation/localStorage/useLocalStorage.js +21 -0
- package/presentation/localStorage/useLocalStorage.js.map +1 -0
- package/presentation/localStorage/useLocalStorageValue.d.ts +1 -0
- package/presentation/localStorage/useLocalStorageValue.js +20 -0
- package/presentation/localStorage/useLocalStorageValue.js.map +1 -0
- package/presentation/localStorage/useLocalStorageValues.d.ts +5 -0
- package/presentation/localStorage/useLocalStorageValues.js +39 -0
- package/presentation/localStorage/useLocalStorageValues.js.map +1 -0
- package/presentation/router/RouteElementRegistry.d.ts +14 -0
- package/presentation/router/RouteElementRegistry.js +32 -0
- package/presentation/router/RouteElementRegistry.js.map +1 -0
- package/presentation/router/abstractions.d.ts +13 -0
- package/presentation/router/abstractions.js +4 -0
- package/presentation/router/abstractions.js.map +1 -0
- package/presentation/router/components/RouteContent.d.ts +2 -0
- package/presentation/router/components/RouteContent.js +17 -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 +22 -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 +30 -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 +30 -0
- package/presentation/router/hooks/useRoute.js.map +1 -0
- package/presentation/router/hooks/useRouter.d.ts +7 -0
- package/presentation/router/hooks/useRouter.js +26 -0
- package/presentation/router/hooks/useRouter.js.map +1 -0
- package/presentation/router/index.d.ts +4 -0
- package/presentation/router/index.js +5 -0
- package/presentation/router/index.js.map +1 -0
- package/presentation/router/types.d.ts +5 -0
- package/presentation/router/types.js +3 -0
- package/presentation/router/types.js.map +1 -0
- package/react-butterfiles/Files.js +208 -235
- package/react-butterfiles/Files.js.map +1 -1
- package/react-butterfiles/file.todo +1 -0
- package/react-butterfiles/index.d.ts +1 -1
- package/react-butterfiles/index.js +2 -8
- package/react-butterfiles/index.js.map +1 -1
- package/react-butterfiles/utils/generateId.js +1 -7
- package/react-butterfiles/utils/generateId.js.map +1 -1
- package/react-butterfiles/utils/readFileContent.js +4 -10
- package/react-butterfiles/utils/readFileContent.js.map +1 -1
- package/renderApp.d.ts +1 -1
- package/renderApp.js +4 -11
- package/renderApp.js.map +1 -1
- package/router.d.ts +5 -0
- package/router.js +8 -0
- package/router.js.map +1 -0
- package/shared/di/DiContainerProvider.d.ts +8 -0
- package/shared/di/DiContainerProvider.js +17 -0
- package/shared/di/DiContainerProvider.js.map +1 -0
- package/shared/di/createFeature.d.ts +11 -0
- package/shared/di/createFeature.js +11 -0
- package/shared/di/createFeature.js.map +1 -0
- package/shared/di/useFeature.d.ts +2 -0
- package/shared/di/useFeature.js +18 -0
- package/shared/di/useFeature.js.map +1 -0
- package/types.d.ts +9 -6
- package/types.js +1 -12
- package/types.js.map +1 -1
- package/utils/createGenericContext.js +13 -22
- package/utils/createGenericContext.js.map +1 -1
- package/utils/createHashing.js +9 -15
- package/utils/createHashing.js.map +1 -1
- package/utils/index.d.ts +2 -10
- package/utils/index.js +2 -115
- package/utils/index.js.map +1 -1
- package/utils/legacyPluginToReactComponent.d.ts +1 -1
- package/utils/legacyPluginToReactComponent.js +5 -11
- package/utils/legacyPluginToReactComponent.js.map +1 -1
- package/components/Routes.d.ts +0 -2
- package/components/Routes.js +0 -46
- package/components/Routes.js.map +0 -1
- package/components/View.d.ts +0 -8
- package/components/View.js +0 -31
- package/components/View.js.map +0 -1
- package/core/AddRoute.d.ts +0 -21
- package/core/AddRoute.js +0 -21
- package/core/AddRoute.js.map +0 -1
- package/hooks/useDataList/utils/redirectToRouteWithQueryParams.d.ts +0 -14
- package/hooks/useDataList/utils/redirectToRouteWithQueryParams.js +0 -30
- package/hooks/useDataList/utils/redirectToRouteWithQueryParams.js.map +0 -1
- package/hooks/useDataList/utils/types.d.ts +0 -40
- package/hooks/useDataList/utils/types.js +0 -7
- package/hooks/useDataList/utils/types.js.map +0 -1
- package/plugins/LocaleHeaderLinkPlugin.d.ts +0 -10
- package/plugins/LocaleHeaderLinkPlugin.js +0 -49
- package/plugins/LocaleHeaderLinkPlugin.js.map +0 -1
- package/plugins/RoutePlugin.d.ts +0 -12
- package/plugins/RoutePlugin.js +0 -35
- package/plugins/RoutePlugin.js.map +0 -1
- package/plugins/ViewPlugin.d.ts +0 -14
- package/plugins/ViewPlugin.js +0 -40
- package/plugins/ViewPlugin.js.map +0 -1
- package/utils/getApiUrl.d.ts +0 -1
- package/utils/getApiUrl.js +0 -12
- package/utils/getApiUrl.js.map +0 -1
- package/utils/getGqlApiUrl.d.ts +0 -1
- package/utils/getGqlApiUrl.js +0 -12
- package/utils/getGqlApiUrl.js.map +0 -1
- package/utils/getHeadlessCmsGqlApiUrl.d.ts +0 -5
- package/utils/getHeadlessCmsGqlApiUrl.js +0 -18
- package/utils/getHeadlessCmsGqlApiUrl.js.map +0 -1
- package/utils/getLocaleCode.d.ts +0 -6
- package/utils/getLocaleCode.js +0 -43
- package/utils/getLocaleCode.js.map +0 -1
- package/utils/getPrerenderId.d.ts +0 -6
- package/utils/getPrerenderId.js +0 -11
- package/utils/getPrerenderId.js.map +0 -1
- package/utils/getTenantId.d.ts +0 -6
- package/utils/getTenantId.js +0 -51
- package/utils/getTenantId.js.map +0 -1
- package/utils/isLocalhost.d.ts +0 -1
- package/utils/isLocalhost.js +0 -15
- package/utils/isLocalhost.js.map +0 -1
- package/utils/isPrerendering.d.ts +0 -1
- package/utils/isPrerendering.js +0 -11
- package/utils/isPrerendering.js.map +0 -1
package/utils/getLocaleCode.js
DELETED
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
4
|
-
Object.defineProperty(exports, "__esModule", {
|
|
5
|
-
value: true
|
|
6
|
-
});
|
|
7
|
-
exports.getLocaleCode = void 0;
|
|
8
|
-
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
9
|
-
var _isLocalhost = require("./isLocalhost");
|
|
10
|
-
var getLocaleCode = exports.getLocaleCode = function getLocaleCode() {
|
|
11
|
-
// 1. Get locale via the `__locale` query param. Useful when doing page previews.
|
|
12
|
-
var locale = new URLSearchParams(location.search).get("__locale");
|
|
13
|
-
if (locale) {
|
|
14
|
-
return locale;
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
// 2. Get locale via `window.__PS_RENDER_LOCALE__`. Used with prerendered pages.
|
|
18
|
-
locale = window.__PS_RENDER_LOCALE__;
|
|
19
|
-
if (locale) {
|
|
20
|
-
return locale;
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
// 3. Get locale via `window.localStorage.webiny_i18n_locale`. Used within the Admin app.
|
|
24
|
-
var localesByContext = window.localStorage.webiny_i18n_locale;
|
|
25
|
-
if (localesByContext) {
|
|
26
|
-
// The `localesByContext` is a string that contains locales for all available
|
|
27
|
-
// "locale contexts", for example: `default:en-US;content:en-US;`. Here, we
|
|
28
|
-
// want to extract the locale for the "content" locale context.
|
|
29
|
-
var _localesByContext$mat = localesByContext.match(/content:(.*?);/),
|
|
30
|
-
_localesByContext$mat2 = (0, _slicedToArray2.default)(_localesByContext$mat, 2),
|
|
31
|
-
matchedLocale = _localesByContext$mat2[1];
|
|
32
|
-
return matchedLocale;
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
// 4. Finally, for development purposes, we take the `WEBINY_WEBSITE_LOCALE_CODE`
|
|
36
|
-
// and `WEBINY_ADMIN_LOCALE_CODE` environment variables into consideration.
|
|
37
|
-
if ((0, _isLocalhost.isLocalhost)()) {
|
|
38
|
-
return process.env.WEBINY_WEBSITE_LOCALE_CODE || process.env.WEBINY_ADMIN_LOCALE_CODE || null;
|
|
39
|
-
}
|
|
40
|
-
return null;
|
|
41
|
-
};
|
|
42
|
-
|
|
43
|
-
//# sourceMappingURL=getLocaleCode.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["_isLocalhost","require","getLocaleCode","exports","locale","URLSearchParams","location","search","get","window","__PS_RENDER_LOCALE__","localesByContext","localStorage","webiny_i18n_locale","_localesByContext$mat","match","_localesByContext$mat2","_slicedToArray2","default","matchedLocale","isLocalhost","process","env","WEBINY_WEBSITE_LOCALE_CODE","WEBINY_ADMIN_LOCALE_CODE"],"sources":["getLocaleCode.ts"],"sourcesContent":["import { isLocalhost } from \"./isLocalhost\";\n\ndeclare global {\n interface Window {\n __PS_RENDER_LOCALE__: string;\n }\n}\n\nexport const getLocaleCode = (): string | null => {\n // 1. Get locale via the `__locale` query param. Useful when doing page previews.\n let locale = new URLSearchParams(location.search).get(\"__locale\");\n if (locale) {\n return locale;\n }\n\n // 2. Get locale via `window.__PS_RENDER_LOCALE__`. Used with prerendered pages.\n locale = window.__PS_RENDER_LOCALE__;\n if (locale) {\n return locale;\n }\n\n // 3. Get locale via `window.localStorage.webiny_i18n_locale`. Used within the Admin app.\n const localesByContext = window.localStorage.webiny_i18n_locale;\n if (localesByContext) {\n // The `localesByContext` is a string that contains locales for all available\n // \"locale contexts\", for example: `default:en-US;content:en-US;`. Here, we\n // want to extract the locale for the \"content\" locale context.\n const [, matchedLocale] = localesByContext.match(/content:(.*?);/);\n return matchedLocale;\n }\n\n // 4. Finally, for development purposes, we take the `WEBINY_WEBSITE_LOCALE_CODE`\n // and `WEBINY_ADMIN_LOCALE_CODE` environment variables into consideration.\n if (isLocalhost()) {\n return (\n process.env.WEBINY_WEBSITE_LOCALE_CODE || process.env.WEBINY_ADMIN_LOCALE_CODE || null\n );\n }\n\n return null;\n};\n"],"mappings":";;;;;;;;AAAA,IAAAA,YAAA,GAAAC,OAAA;AAQO,IAAMC,aAAa,GAAAC,OAAA,CAAAD,aAAA,GAAG,SAAhBA,aAAaA,CAAA,EAAwB;EAC9C;EACA,IAAIE,MAAM,GAAG,IAAIC,eAAe,CAACC,QAAQ,CAACC,MAAM,CAAC,CAACC,GAAG,CAAC,UAAU,CAAC;EACjE,IAAIJ,MAAM,EAAE;IACR,OAAOA,MAAM;EACjB;;EAEA;EACAA,MAAM,GAAGK,MAAM,CAACC,oBAAoB;EACpC,IAAIN,MAAM,EAAE;IACR,OAAOA,MAAM;EACjB;;EAEA;EACA,IAAMO,gBAAgB,GAAGF,MAAM,CAACG,YAAY,CAACC,kBAAkB;EAC/D,IAAIF,gBAAgB,EAAE;IAClB;IACA;IACA;IACA,IAAAG,qBAAA,GAA0BH,gBAAgB,CAACI,KAAK,CAAC,gBAAgB,CAAC;MAAAC,sBAAA,OAAAC,eAAA,CAAAC,OAAA,EAAAJ,qBAAA;MAAzDK,aAAa,GAAAH,sBAAA;IACtB,OAAOG,aAAa;EACxB;;EAEA;EACA;EACA,IAAI,IAAAC,wBAAW,EAAC,CAAC,EAAE;IACf,OACIC,OAAO,CAACC,GAAG,CAACC,0BAA0B,IAAIF,OAAO,CAACC,GAAG,CAACE,wBAAwB,IAAI,IAAI;EAE9F;EAEA,OAAO,IAAI;AACf,CAAC","ignoreList":[]}
|
package/utils/getPrerenderId.js
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.getPrerenderId = void 0;
|
|
7
|
-
var getPrerenderId = exports.getPrerenderId = function getPrerenderId() {
|
|
8
|
-
return window["__PS_RENDER_ID__"] || null;
|
|
9
|
-
};
|
|
10
|
-
|
|
11
|
-
//# sourceMappingURL=getPrerenderId.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["getPrerenderId","exports","window"],"sources":["getPrerenderId.ts"],"sourcesContent":["declare global {\n interface Window {\n __PS_RENDER_ID__: string;\n }\n}\n\nexport const getPrerenderId = (): string | null => {\n return window[\"__PS_RENDER_ID__\"] || null;\n};\n"],"mappings":";;;;;;AAMO,IAAMA,cAAc,GAAAC,OAAA,CAAAD,cAAA,GAAG,SAAjBA,cAAcA,CAAA,EAAwB;EAC/C,OAAOE,MAAM,CAAC,kBAAkB,CAAC,IAAI,IAAI;AAC7C,CAAC","ignoreList":[]}
|
package/utils/getTenantId.d.ts
DELETED
package/utils/getTenantId.js
DELETED
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.getTenantId = void 0;
|
|
7
|
-
var _isLocalhost = require("./isLocalhost");
|
|
8
|
-
var getTenantId = exports.getTenantId = function getTenantId() {
|
|
9
|
-
var urlSearchParams = new URLSearchParams(location.search);
|
|
10
|
-
|
|
11
|
-
// 1. Get tenant via the `__tenant` query param. Useful when doing page previews.
|
|
12
|
-
var tenant = urlSearchParams.get("__tenant");
|
|
13
|
-
if (tenant) {
|
|
14
|
-
return tenant;
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
// 1. Get tenant via the `tenantId` query param. Useful within the Admin app.
|
|
18
|
-
tenant = urlSearchParams.get("tenantId");
|
|
19
|
-
if (tenant) {
|
|
20
|
-
return tenant;
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
// 2. Get tenant via `window.__PS_RENDER_TENANT__`. Used with prerendered pages.
|
|
24
|
-
tenant = window.__PS_RENDER_TENANT__;
|
|
25
|
-
if (tenant) {
|
|
26
|
-
return tenant;
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
// 3. Get tenant via `window.localStorage.webiny_tenant`. Used within the Admin app.
|
|
30
|
-
tenant = window.localStorage.webiny_tenant;
|
|
31
|
-
if (tenant) {
|
|
32
|
-
try {
|
|
33
|
-
var value = JSON.parse(tenant);
|
|
34
|
-
if (value) {
|
|
35
|
-
return value;
|
|
36
|
-
}
|
|
37
|
-
} catch (_unused) {
|
|
38
|
-
// do nothing
|
|
39
|
-
}
|
|
40
|
-
return tenant;
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
// 4. Finally, for development purposes, we take the `WEBINY_WEBSITE_TENANT_ID`
|
|
44
|
-
// and `WEBINY_ADMIN_TENANT_ID` environment variables into consideration.
|
|
45
|
-
if ((0, _isLocalhost.isLocalhost)()) {
|
|
46
|
-
return process.env.WEBINY_WEBSITE_TENANT_ID || process.env.WEBINY_ADMIN_TENANT_ID || null;
|
|
47
|
-
}
|
|
48
|
-
return null;
|
|
49
|
-
};
|
|
50
|
-
|
|
51
|
-
//# sourceMappingURL=getTenantId.js.map
|
package/utils/getTenantId.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["_isLocalhost","require","getTenantId","exports","urlSearchParams","URLSearchParams","location","search","tenant","get","window","__PS_RENDER_TENANT__","localStorage","webiny_tenant","value","JSON","parse","_unused","isLocalhost","process","env","WEBINY_WEBSITE_TENANT_ID","WEBINY_ADMIN_TENANT_ID"],"sources":["getTenantId.ts"],"sourcesContent":["import { isLocalhost } from \"~/utils/isLocalhost\";\n\ndeclare global {\n interface Window {\n __PS_RENDER_TENANT__: string;\n }\n}\n\nexport const getTenantId = (): string | null => {\n const urlSearchParams = new URLSearchParams(location.search);\n\n // 1. Get tenant via the `__tenant` query param. Useful when doing page previews.\n let tenant = urlSearchParams.get(\"__tenant\");\n if (tenant) {\n return tenant;\n }\n\n // 1. Get tenant via the `tenantId` query param. Useful within the Admin app.\n tenant = urlSearchParams.get(\"tenantId\");\n if (tenant) {\n return tenant;\n }\n\n // 2. Get tenant via `window.__PS_RENDER_TENANT__`. Used with prerendered pages.\n tenant = window.__PS_RENDER_TENANT__;\n if (tenant) {\n return tenant;\n }\n\n // 3. Get tenant via `window.localStorage.webiny_tenant`. Used within the Admin app.\n tenant = window.localStorage.webiny_tenant;\n if (tenant) {\n try {\n const value = JSON.parse(tenant);\n if (value) {\n return value;\n }\n } catch {\n // do nothing\n }\n return tenant;\n }\n\n // 4. Finally, for development purposes, we take the `WEBINY_WEBSITE_TENANT_ID`\n // and `WEBINY_ADMIN_TENANT_ID` environment variables into consideration.\n if (isLocalhost()) {\n return process.env.WEBINY_WEBSITE_TENANT_ID || process.env.WEBINY_ADMIN_TENANT_ID || null;\n }\n\n return null;\n};\n"],"mappings":";;;;;;AAAA,IAAAA,YAAA,GAAAC,OAAA;AAQO,IAAMC,WAAW,GAAAC,OAAA,CAAAD,WAAA,GAAG,SAAdA,WAAWA,CAAA,EAAwB;EAC5C,IAAME,eAAe,GAAG,IAAIC,eAAe,CAACC,QAAQ,CAACC,MAAM,CAAC;;EAE5D;EACA,IAAIC,MAAM,GAAGJ,eAAe,CAACK,GAAG,CAAC,UAAU,CAAC;EAC5C,IAAID,MAAM,EAAE;IACR,OAAOA,MAAM;EACjB;;EAEA;EACAA,MAAM,GAAGJ,eAAe,CAACK,GAAG,CAAC,UAAU,CAAC;EACxC,IAAID,MAAM,EAAE;IACR,OAAOA,MAAM;EACjB;;EAEA;EACAA,MAAM,GAAGE,MAAM,CAACC,oBAAoB;EACpC,IAAIH,MAAM,EAAE;IACR,OAAOA,MAAM;EACjB;;EAEA;EACAA,MAAM,GAAGE,MAAM,CAACE,YAAY,CAACC,aAAa;EAC1C,IAAIL,MAAM,EAAE;IACR,IAAI;MACA,IAAMM,KAAK,GAAGC,IAAI,CAACC,KAAK,CAACR,MAAM,CAAC;MAChC,IAAIM,KAAK,EAAE;QACP,OAAOA,KAAK;MAChB;IACJ,CAAC,CAAC,OAAAG,OAAA,EAAM;MACJ;IAAA;IAEJ,OAAOT,MAAM;EACjB;;EAEA;EACA;EACA,IAAI,IAAAU,wBAAW,EAAC,CAAC,EAAE;IACf,OAAOC,OAAO,CAACC,GAAG,CAACC,wBAAwB,IAAIF,OAAO,CAACC,GAAG,CAACE,sBAAsB,IAAI,IAAI;EAC7F;EAEA,OAAO,IAAI;AACf,CAAC","ignoreList":[]}
|
package/utils/isLocalhost.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const isLocalhost: () => boolean;
|
package/utils/isLocalhost.js
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.isLocalhost = void 0;
|
|
7
|
-
var INCLUDES = ["localhost", "127.0.0.1"];
|
|
8
|
-
var isLocalhost = exports.isLocalhost = function isLocalhost() {
|
|
9
|
-
var href = window.location.href;
|
|
10
|
-
return INCLUDES.some(function (current) {
|
|
11
|
-
return href.includes(current);
|
|
12
|
-
});
|
|
13
|
-
};
|
|
14
|
-
|
|
15
|
-
//# sourceMappingURL=isLocalhost.js.map
|
package/utils/isLocalhost.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["INCLUDES","isLocalhost","exports","href","window","location","some","current","includes"],"sources":["isLocalhost.ts"],"sourcesContent":["const INCLUDES = [\"localhost\", \"127.0.0.1\"];\n\nexport const isLocalhost = () => {\n const href = window.location.href;\n return INCLUDES.some(current => href.includes(current));\n};\n"],"mappings":";;;;;;AAAA,IAAMA,QAAQ,GAAG,CAAC,WAAW,EAAE,WAAW,CAAC;AAEpC,IAAMC,WAAW,GAAAC,OAAA,CAAAD,WAAA,GAAG,SAAdA,WAAWA,CAAA,EAAS;EAC7B,IAAME,IAAI,GAAGC,MAAM,CAACC,QAAQ,CAACF,IAAI;EACjC,OAAOH,QAAQ,CAACM,IAAI,CAAC,UAAAC,OAAO;IAAA,OAAIJ,IAAI,CAACK,QAAQ,CAACD,OAAO,CAAC;EAAA,EAAC;AAC3D,CAAC","ignoreList":[]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const isPrerendering: () => boolean;
|
package/utils/isPrerendering.js
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.isPrerendering = void 0;
|
|
7
|
-
var isPrerendering = exports.isPrerendering = function isPrerendering() {
|
|
8
|
-
return "__PS_RENDER__" in window;
|
|
9
|
-
};
|
|
10
|
-
|
|
11
|
-
//# sourceMappingURL=isPrerendering.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["isPrerendering","exports","window"],"sources":["isPrerendering.ts"],"sourcesContent":["export const isPrerendering = (): boolean => {\n return \"__PS_RENDER__\" in window;\n};\n"],"mappings":";;;;;;AAAO,IAAMA,cAAc,GAAAC,OAAA,CAAAD,cAAA,GAAG,SAAjBA,cAAcA,CAAA,EAAkB;EACzC,OAAO,eAAe,IAAIE,MAAM;AACpC,CAAC","ignoreList":[]}
|