@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/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":[
|
|
1
|
+
{"version":3,"names":[],"sources":["index.ts"],"sourcesContent":["export * from \"./createHashing.js\";\nexport * from \"./legacyPluginToReactComponent.js\";\n"],"mappings":"AAAA;AACA","ignoreList":[]}
|
|
@@ -1,16 +1,10 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
});
|
|
6
|
-
exports.legacyPluginToReactComponent = void 0;
|
|
7
|
-
var _useRegisterLegacyPlugin = require("../hooks/useRegisterLegacyPlugin");
|
|
8
|
-
var legacyPluginToReactComponent = exports.legacyPluginToReactComponent = function legacyPluginToReactComponent(params) {
|
|
9
|
-
var Component = function Component(props) {
|
|
10
|
-
var plugin = Object.assign({
|
|
1
|
+
import { useRegisterLegacyPlugin } from "../hooks/useRegisterLegacyPlugin.js";
|
|
2
|
+
export const legacyPluginToReactComponent = function (params) {
|
|
3
|
+
const Component = props => {
|
|
4
|
+
const plugin = Object.assign({
|
|
11
5
|
type: params.pluginType
|
|
12
6
|
}, params.mapProps ? params.mapProps(props) : props);
|
|
13
|
-
|
|
7
|
+
useRegisterLegacyPlugin(plugin);
|
|
14
8
|
return null;
|
|
15
9
|
};
|
|
16
10
|
Component.displayName = params.componentDisplayName;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["
|
|
1
|
+
{"version":3,"names":["useRegisterLegacyPlugin","legacyPluginToReactComponent","params","Component","props","plugin","Object","assign","type","pluginType","mapProps","displayName","componentDisplayName"],"sources":["legacyPluginToReactComponent.ts"],"sourcesContent":["import type React from \"react\";\nimport { useRegisterLegacyPlugin } from \"~/hooks/useRegisterLegacyPlugin.js\";\n\nexport interface LegacyPluginToReactComponentParams<TProps extends Record<string, any>> {\n pluginType: string;\n componentDisplayName: string;\n mapProps?: (props: TProps) => TProps;\n}\n\nexport const legacyPluginToReactComponent = function <TProps extends Record<string, any>>(\n params: LegacyPluginToReactComponentParams<TProps>\n) {\n const Component: React.ComponentType<TProps> = props => {\n const plugin = Object.assign(\n { type: params.pluginType },\n params.mapProps ? params.mapProps(props) : props\n );\n useRegisterLegacyPlugin(plugin);\n return null;\n };\n\n Component.displayName = params.componentDisplayName;\n\n return Component;\n};\n"],"mappings":"AACA,SAASA,uBAAuB;AAQhC,OAAO,MAAMC,4BAA4B,GAAG,SAAAA,CACxCC,MAAkD,EACpD;EACE,MAAMC,SAAsC,GAAGC,KAAK,IAAI;IACpD,MAAMC,MAAM,GAAGC,MAAM,CAACC,MAAM,CACxB;MAAEC,IAAI,EAAEN,MAAM,CAACO;IAAW,CAAC,EAC3BP,MAAM,CAACQ,QAAQ,GAAGR,MAAM,CAACQ,QAAQ,CAACN,KAAK,CAAC,GAAGA,KAC/C,CAAC;IACDJ,uBAAuB,CAACK,MAAM,CAAC;IAC/B,OAAO,IAAI;EACf,CAAC;EAEDF,SAAS,CAACQ,WAAW,GAAGT,MAAM,CAACU,oBAAoB;EAEnD,OAAOT,SAAS;AACpB,CAAC","ignoreList":[]}
|
package/components/Routes.d.ts
DELETED
package/components/Routes.js
DELETED
|
@@ -1,46 +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.Routes = void 0;
|
|
8
|
-
var _toConsumableArray2 = _interopRequireDefault(require("@babel/runtime/helpers/toConsumableArray"));
|
|
9
|
-
var _react = _interopRequireDefault(require("react"));
|
|
10
|
-
var _plugins = require("@webiny/plugins");
|
|
11
|
-
var _reactRouter = require("@webiny/react-router");
|
|
12
|
-
// This file is necessary only for backwards compatibility.
|
|
13
|
-
// We'll remove this once the legacy rendering engine is removed.
|
|
14
|
-
|
|
15
|
-
var Routes = exports.Routes = function Routes() {
|
|
16
|
-
// We cannot call `sort` on the array returned by the `plugins.byType` call - it is read-only.
|
|
17
|
-
var routes = (0, _toConsumableArray2.default)(_plugins.plugins.byType("route")).sort(function (a, b) {
|
|
18
|
-
var pathA = a.route.props.path || "*";
|
|
19
|
-
var pathB = b.route.props.path || "*";
|
|
20
|
-
|
|
21
|
-
// This will sort paths at the very bottom of the list
|
|
22
|
-
if (pathA === "/" && pathB === "*") {
|
|
23
|
-
return -1;
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
// This will push * and / to the bottom of the list
|
|
27
|
-
if (pathA === "*" || pathA === "/") {
|
|
28
|
-
return 1;
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
// This will push * and / to the bottom of the list
|
|
32
|
-
if (["*", "/"].includes(pathB)) {
|
|
33
|
-
return -1;
|
|
34
|
-
}
|
|
35
|
-
return 0;
|
|
36
|
-
});
|
|
37
|
-
return /*#__PURE__*/_react.default.createElement(_reactRouter.Routes, null, routes.map(function (_ref) {
|
|
38
|
-
var route = _ref.route,
|
|
39
|
-
name = _ref.name;
|
|
40
|
-
return /*#__PURE__*/_react.default.cloneElement(route, {
|
|
41
|
-
key: name
|
|
42
|
-
});
|
|
43
|
-
}));
|
|
44
|
-
};
|
|
45
|
-
|
|
46
|
-
//# sourceMappingURL=Routes.js.map
|
package/components/Routes.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["_react","_interopRequireDefault","require","_plugins","_reactRouter","Routes","exports","routes","_toConsumableArray2","default","plugins","byType","sort","a","b","pathA","route","props","path","pathB","includes","createElement","map","_ref","name","React","cloneElement","key"],"sources":["Routes.tsx"],"sourcesContent":["// This file is necessary only for backwards compatibility.\n// We'll remove this once the legacy rendering engine is removed.\nimport React from \"react\";\nimport { plugins } from \"@webiny/plugins\";\nimport { Routes as ReactRouterRoutes } from \"@webiny/react-router\";\nimport { RoutePlugin } from \"../types\";\n\nexport const Routes = () => {\n // We cannot call `sort` on the array returned by the `plugins.byType` call - it is read-only.\n const routes = [...plugins.byType<RoutePlugin>(\"route\")].sort((a, b) => {\n const pathA = a.route.props.path || \"*\";\n const pathB = b.route.props.path || \"*\";\n\n // This will sort paths at the very bottom of the list\n if (pathA === \"/\" && pathB === \"*\") {\n return -1;\n }\n\n // This will push * and / to the bottom of the list\n if (pathA === \"*\" || pathA === \"/\") {\n return 1;\n }\n\n // This will push * and / to the bottom of the list\n if ([\"*\", \"/\"].includes(pathB)) {\n return -1;\n }\n\n return 0;\n });\n\n return (\n <ReactRouterRoutes>\n {routes.map(({ route, name }) => React.cloneElement(route, { key: name }))}\n </ReactRouterRoutes>\n );\n};\n"],"mappings":";;;;;;;;AAEA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,QAAA,GAAAD,OAAA;AACA,IAAAE,YAAA,GAAAF,OAAA;AAJA;AACA;;AAMO,IAAMG,MAAM,GAAAC,OAAA,CAAAD,MAAA,GAAG,SAATA,MAAMA,CAAA,EAAS;EACxB;EACA,IAAME,MAAM,GAAG,IAAAC,mBAAA,CAAAC,OAAA,EAAIC,gBAAO,CAACC,MAAM,CAAc,OAAO,CAAC,EAAEC,IAAI,CAAC,UAACC,CAAC,EAAEC,CAAC,EAAK;IACpE,IAAMC,KAAK,GAAGF,CAAC,CAACG,KAAK,CAACC,KAAK,CAACC,IAAI,IAAI,GAAG;IACvC,IAAMC,KAAK,GAAGL,CAAC,CAACE,KAAK,CAACC,KAAK,CAACC,IAAI,IAAI,GAAG;;IAEvC;IACA,IAAIH,KAAK,KAAK,GAAG,IAAII,KAAK,KAAK,GAAG,EAAE;MAChC,OAAO,CAAC,CAAC;IACb;;IAEA;IACA,IAAIJ,KAAK,KAAK,GAAG,IAAIA,KAAK,KAAK,GAAG,EAAE;MAChC,OAAO,CAAC;IACZ;;IAEA;IACA,IAAI,CAAC,GAAG,EAAE,GAAG,CAAC,CAACK,QAAQ,CAACD,KAAK,CAAC,EAAE;MAC5B,OAAO,CAAC,CAAC;IACb;IAEA,OAAO,CAAC;EACZ,CAAC,CAAC;EAEF,oBACInB,MAAA,CAAAS,OAAA,CAAAY,aAAA,CAACjB,YAAA,CAAAC,MAAiB,QACbE,MAAM,CAACe,GAAG,CAAC,UAAAC,IAAA;IAAA,IAAGP,KAAK,GAAAO,IAAA,CAALP,KAAK;MAAEQ,IAAI,GAAAD,IAAA,CAAJC,IAAI;IAAA,oBAAOC,cAAK,CAACC,YAAY,CAACV,KAAK,EAAE;MAAEW,GAAG,EAAEH;IAAK,CAAC,CAAC;EAAA,EAC1D,CAAC;AAE5B,CAAC","ignoreList":[]}
|
package/components/View.d.ts
DELETED
package/components/View.js
DELETED
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard").default;
|
|
4
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
5
|
-
Object.defineProperty(exports, "__esModule", {
|
|
6
|
-
value: true
|
|
7
|
-
});
|
|
8
|
-
exports.View = void 0;
|
|
9
|
-
var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/objectSpread2"));
|
|
10
|
-
var _react = _interopRequireWildcard(require("react"));
|
|
11
|
-
var _plugins = require("@webiny/plugins");
|
|
12
|
-
var _ViewPlugin = require("../plugins/ViewPlugin");
|
|
13
|
-
var View = exports.View = function View(_ref) {
|
|
14
|
-
var name = _ref.name,
|
|
15
|
-
children = _ref.children,
|
|
16
|
-
_ref$props = _ref.props,
|
|
17
|
-
props = _ref$props === void 0 ? {} : _ref$props;
|
|
18
|
-
var viewPlugins = _plugins.plugins.byType(_ViewPlugin.ViewPlugin.type).filter(function (pl) {
|
|
19
|
-
return pl.key === name;
|
|
20
|
-
});
|
|
21
|
-
if (viewPlugins.length) {
|
|
22
|
-
children = viewPlugins.reduce(function (el, pl) {
|
|
23
|
-
return pl.render((0, _objectSpread2.default)({
|
|
24
|
-
children: el
|
|
25
|
-
}, props));
|
|
26
|
-
}, children);
|
|
27
|
-
}
|
|
28
|
-
return /*#__PURE__*/_react.default.createElement(_react.Fragment, null, children || null);
|
|
29
|
-
};
|
|
30
|
-
|
|
31
|
-
//# sourceMappingURL=View.js.map
|
package/components/View.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["_react","_interopRequireWildcard","require","_plugins","_ViewPlugin","View","exports","_ref","name","children","_ref$props","props","viewPlugins","plugins","byType","ViewPlugin","type","filter","pl","key","length","reduce","el","render","_objectSpread2","default","createElement","Fragment"],"sources":["View.tsx"],"sourcesContent":["import React, { Fragment } from \"react\";\nimport { plugins } from \"@webiny/plugins\";\nimport { ViewPlugin } from \"../plugins/ViewPlugin\";\n\ninterface Props {\n name: string;\n props?: Record<string, any>;\n children?: React.ReactNode;\n}\n\nexport const View = ({ name, children, props = {} }: Props) => {\n const viewPlugins = plugins.byType<ViewPlugin>(ViewPlugin.type).filter(pl => pl.key === name);\n\n if (viewPlugins.length) {\n children = viewPlugins.reduce((el, pl) => pl.render({ children: el, ...props }), children);\n }\n\n return <Fragment>{children || null}</Fragment>;\n};\n"],"mappings":";;;;;;;;;AAAA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,QAAA,GAAAD,OAAA;AACA,IAAAE,WAAA,GAAAF,OAAA;AAQO,IAAMG,IAAI,GAAAC,OAAA,CAAAD,IAAA,GAAG,SAAPA,IAAIA,CAAAE,IAAA,EAA8C;EAAA,IAAxCC,IAAI,GAAAD,IAAA,CAAJC,IAAI;IAAEC,QAAQ,GAAAF,IAAA,CAARE,QAAQ;IAAAC,UAAA,GAAAH,IAAA,CAAEI,KAAK;IAALA,KAAK,GAAAD,UAAA,cAAG,CAAC,CAAC,GAAAA,UAAA;EAC7C,IAAME,WAAW,GAAGC,gBAAO,CAACC,MAAM,CAAaC,sBAAU,CAACC,IAAI,CAAC,CAACC,MAAM,CAAC,UAAAC,EAAE;IAAA,OAAIA,EAAE,CAACC,GAAG,KAAKX,IAAI;EAAA,EAAC;EAE7F,IAAII,WAAW,CAACQ,MAAM,EAAE;IACpBX,QAAQ,GAAGG,WAAW,CAACS,MAAM,CAAC,UAACC,EAAE,EAAEJ,EAAE;MAAA,OAAKA,EAAE,CAACK,MAAM,KAAAC,cAAA,CAAAC,OAAA;QAAGhB,QAAQ,EAAEa;MAAE,GAAKX,KAAK,CAAE,CAAC;IAAA,GAAEF,QAAQ,CAAC;EAC9F;EAEA,oBAAOT,MAAA,CAAAyB,OAAA,CAAAC,aAAA,CAAC1B,MAAA,CAAA2B,QAAQ,QAAElB,QAAQ,IAAI,IAAe,CAAC;AAClD,CAAC","ignoreList":[]}
|
package/core/AddRoute.d.ts
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import { RouteProps } from "@webiny/react-router";
|
|
3
|
-
export declare const AddRoute: ((props: RouteProps) => null) & {
|
|
4
|
-
original: (props: RouteProps) => null;
|
|
5
|
-
originalName: string;
|
|
6
|
-
displayName: string;
|
|
7
|
-
} & {
|
|
8
|
-
original: ((props: RouteProps) => null) & {
|
|
9
|
-
original: (props: RouteProps) => null;
|
|
10
|
-
originalName: string;
|
|
11
|
-
displayName: string;
|
|
12
|
-
};
|
|
13
|
-
originalName: string;
|
|
14
|
-
displayName: string;
|
|
15
|
-
} & {
|
|
16
|
-
createDecorator: (decorator: import("@webiny/react-composition").ComponentDecorator<((props: RouteProps) => null) & {
|
|
17
|
-
original: (props: RouteProps) => null;
|
|
18
|
-
originalName: string;
|
|
19
|
-
displayName: string;
|
|
20
|
-
}>) => (props: unknown) => React.JSX.Element;
|
|
21
|
-
};
|
package/core/AddRoute.js
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard").default;
|
|
4
|
-
Object.defineProperty(exports, "__esModule", {
|
|
5
|
-
value: true
|
|
6
|
-
});
|
|
7
|
-
exports.AddRoute = void 0;
|
|
8
|
-
var _react = _interopRequireWildcard(require("react"));
|
|
9
|
-
var _reactRouter = require("@webiny/react-router");
|
|
10
|
-
var _App = require("../App");
|
|
11
|
-
var _reactComposition = require("@webiny/react-composition");
|
|
12
|
-
var AddRoute = exports.AddRoute = (0, _reactComposition.makeDecoratable)("AddRoute", function (props) {
|
|
13
|
-
var _useApp = (0, _App.useApp)(),
|
|
14
|
-
addRoute = _useApp.addRoute;
|
|
15
|
-
(0, _react.useEffect)(function () {
|
|
16
|
-
addRoute(/*#__PURE__*/_react.default.createElement(_reactRouter.Route, props));
|
|
17
|
-
}, []);
|
|
18
|
-
return null;
|
|
19
|
-
});
|
|
20
|
-
|
|
21
|
-
//# sourceMappingURL=AddRoute.js.map
|
package/core/AddRoute.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["_react","_interopRequireWildcard","require","_reactRouter","_App","_reactComposition","AddRoute","exports","makeDecoratable","props","_useApp","useApp","addRoute","useEffect","default","createElement","Route"],"sources":["AddRoute.tsx"],"sourcesContent":["import React, { useEffect } from \"react\";\nimport { Route, RouteProps } from \"@webiny/react-router\";\nimport { useApp } from \"~/App\";\nimport { makeDecoratable } from \"@webiny/react-composition\";\n\nexport const AddRoute = makeDecoratable(\"AddRoute\", (props: RouteProps) => {\n const { addRoute } = useApp();\n\n useEffect(() => {\n addRoute(<Route {...props} />);\n }, []);\n\n return null;\n});\n"],"mappings":";;;;;;;AAAA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AACA,IAAAE,IAAA,GAAAF,OAAA;AACA,IAAAG,iBAAA,GAAAH,OAAA;AAEO,IAAMI,QAAQ,GAAAC,OAAA,CAAAD,QAAA,GAAG,IAAAE,iCAAe,EAAC,UAAU,EAAE,UAACC,KAAiB,EAAK;EACvE,IAAAC,OAAA,GAAqB,IAAAC,WAAM,EAAC,CAAC;IAArBC,QAAQ,GAAAF,OAAA,CAARE,QAAQ;EAEhB,IAAAC,gBAAS,EAAC,YAAM;IACZD,QAAQ,cAACZ,MAAA,CAAAc,OAAA,CAAAC,aAAA,CAACZ,YAAA,CAAAa,KAAK,EAAKP,KAAQ,CAAC,CAAC;EAClC,CAAC,EAAE,EAAE,CAAC;EAEN,OAAO,IAAI;AACf,CAAC,CAAC","ignoreList":[]}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
interface Params {
|
|
2
|
-
sort: string;
|
|
3
|
-
search: string;
|
|
4
|
-
where: Record<string, any>;
|
|
5
|
-
}
|
|
6
|
-
interface Location {
|
|
7
|
-
search: string;
|
|
8
|
-
}
|
|
9
|
-
interface Options {
|
|
10
|
-
history: Location[];
|
|
11
|
-
location: Location;
|
|
12
|
-
}
|
|
13
|
-
declare const _default: (params: Params, options: Options) => void;
|
|
14
|
-
export default _default;
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.default = void 0;
|
|
7
|
-
var _default = exports.default = function _default(params, options) {
|
|
8
|
-
var history = options.history,
|
|
9
|
-
location = options.location;
|
|
10
|
-
var paramsClone = Object.assign({}, params);
|
|
11
|
-
["sort", "search", "where"].forEach(function (key) {
|
|
12
|
-
if (typeof paramsClone[key] === "object") {
|
|
13
|
-
paramsClone[key] = JSON.stringify(paramsClone[key]);
|
|
14
|
-
}
|
|
15
|
-
});
|
|
16
|
-
var keys = ["limit", "after", "before", "where", "search", "sort"];
|
|
17
|
-
var query = new URLSearchParams(location.search);
|
|
18
|
-
keys.forEach(function (key) {
|
|
19
|
-
if (typeof paramsClone[key] !== "undefined") {
|
|
20
|
-
query.set(key, paramsClone[key]);
|
|
21
|
-
} else {
|
|
22
|
-
query.delete(key);
|
|
23
|
-
}
|
|
24
|
-
});
|
|
25
|
-
history.push({
|
|
26
|
-
search: query.toString()
|
|
27
|
-
});
|
|
28
|
-
};
|
|
29
|
-
|
|
30
|
-
//# sourceMappingURL=redirectToRouteWithQueryParams.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["_default","params","options","history","location","paramsClone","Object","assign","forEach","key","JSON","stringify","keys","query","URLSearchParams","search","set","delete","push","toString"],"sources":["redirectToRouteWithQueryParams.ts"],"sourcesContent":["interface Params {\n sort: string;\n search: string;\n where: Record<string, any>;\n}\ninterface Location {\n search: string;\n}\ninterface Options {\n history: Location[];\n location: Location;\n}\nexport default (params: Params, options: Options): void => {\n const { history, location } = options;\n const paramsClone: Record<string, any> = Object.assign({}, params);\n\n [\"sort\", \"search\", \"where\"].forEach(key => {\n if (typeof paramsClone[key] === \"object\") {\n paramsClone[key] = JSON.stringify(paramsClone[key]);\n }\n });\n\n const keys: string[] = [\"limit\", \"after\", \"before\", \"where\", \"search\", \"sort\"];\n\n const query = new URLSearchParams(location.search);\n keys.forEach(key => {\n if (typeof paramsClone[key] !== \"undefined\") {\n query.set(key, paramsClone[key]);\n } else {\n query.delete(key);\n }\n });\n\n history.push({ search: query.toString() });\n};\n"],"mappings":";;;;;;iCAYe,SAAAA,SAACC,MAAc,EAAEC,OAAgB,EAAW;EACvD,IAAQC,OAAO,GAAeD,OAAO,CAA7BC,OAAO;IAAEC,QAAQ,GAAKF,OAAO,CAApBE,QAAQ;EACzB,IAAMC,WAAgC,GAAGC,MAAM,CAACC,MAAM,CAAC,CAAC,CAAC,EAAEN,MAAM,CAAC;EAElE,CAAC,MAAM,EAAE,QAAQ,EAAE,OAAO,CAAC,CAACO,OAAO,CAAC,UAAAC,GAAG,EAAI;IACvC,IAAI,OAAOJ,WAAW,CAACI,GAAG,CAAC,KAAK,QAAQ,EAAE;MACtCJ,WAAW,CAACI,GAAG,CAAC,GAAGC,IAAI,CAACC,SAAS,CAACN,WAAW,CAACI,GAAG,CAAC,CAAC;IACvD;EACJ,CAAC,CAAC;EAEF,IAAMG,IAAc,GAAG,CAAC,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,CAAC;EAE9E,IAAMC,KAAK,GAAG,IAAIC,eAAe,CAACV,QAAQ,CAACW,MAAM,CAAC;EAClDH,IAAI,CAACJ,OAAO,CAAC,UAAAC,GAAG,EAAI;IAChB,IAAI,OAAOJ,WAAW,CAACI,GAAG,CAAC,KAAK,WAAW,EAAE;MACzCI,KAAK,CAACG,GAAG,CAACP,GAAG,EAAEJ,WAAW,CAACI,GAAG,CAAC,CAAC;IACpC,CAAC,MAAM;MACHI,KAAK,CAACI,MAAM,CAACR,GAAG,CAAC;IACrB;EACJ,CAAC,CAAC;EAEFN,OAAO,CAACe,IAAI,CAAC;IAAEH,MAAM,EAAEF,KAAK,CAACM,QAAQ,CAAC;EAAE,CAAC,CAAC;AAC9C,CAAC","ignoreList":[]}
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
export type UseDataListParams = {
|
|
2
|
-
load?: boolean;
|
|
3
|
-
name: string;
|
|
4
|
-
type: string;
|
|
5
|
-
fields: string;
|
|
6
|
-
limit?: number;
|
|
7
|
-
sort?: {
|
|
8
|
-
[key: string]: string;
|
|
9
|
-
};
|
|
10
|
-
where?: {
|
|
11
|
-
[key: string]: any;
|
|
12
|
-
};
|
|
13
|
-
search?: {
|
|
14
|
-
[key: string]: any;
|
|
15
|
-
};
|
|
16
|
-
};
|
|
17
|
-
export type SearchParams = {
|
|
18
|
-
query: string;
|
|
19
|
-
operator?: "and" | "or";
|
|
20
|
-
fields?: Array<string>;
|
|
21
|
-
};
|
|
22
|
-
export type UseDataListProps = {
|
|
23
|
-
data: Record<string, any>[];
|
|
24
|
-
meta: Record<string, any>;
|
|
25
|
-
init: () => void;
|
|
26
|
-
refresh: (params?: Record<string, any>) => void;
|
|
27
|
-
delete: (id: string, options: Record<string, any>) => void;
|
|
28
|
-
setPerPage: (perPage: number) => void;
|
|
29
|
-
setPage: (page: number) => void;
|
|
30
|
-
setSearch: (search: SearchParams | any) => void;
|
|
31
|
-
setWhere: (where: Record<string, any>) => void;
|
|
32
|
-
setSorters: (sort: Record<string, any>) => void;
|
|
33
|
-
multiSelect: (item: Record<string, any>, value: boolean) => void;
|
|
34
|
-
multiSelectAll: (value: boolean) => void;
|
|
35
|
-
isMultiSelected: (item: Record<string, any>) => boolean;
|
|
36
|
-
isAllMultiSelected: () => boolean;
|
|
37
|
-
isNoneMultiSelected: () => boolean;
|
|
38
|
-
getMultiSelected: () => Record<string, any>[];
|
|
39
|
-
__loadParams: UseDataListParams;
|
|
40
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":[],"sources":["types.ts"],"sourcesContent":["export type UseDataListParams = {\n load?: boolean;\n name: string;\n type: string;\n fields: string;\n limit?: number;\n sort?: {\n [key: string]: string;\n };\n where?: {\n [key: string]: any;\n };\n search?: {\n [key: string]: any;\n };\n};\n\nexport type SearchParams = {\n query: string;\n operator?: \"and\" | \"or\";\n fields?: Array<string>;\n};\n\nexport type UseDataListProps = {\n data: Record<string, any>[];\n meta: Record<string, any>;\n init: () => void;\n refresh: (params?: Record<string, any>) => void;\n delete: (id: string, options: Record<string, any>) => void;\n setPerPage: (perPage: number) => void;\n setPage: (page: number) => void;\n setSearch: (search: SearchParams | any) => void;\n setWhere: (where: Record<string, any>) => void;\n setSorters: (sort: Record<string, any>) => void;\n multiSelect: (item: Record<string, any>, value: boolean) => void;\n multiSelectAll: (value: boolean) => void;\n\n isMultiSelected: (item: Record<string, any>) => boolean;\n isAllMultiSelected: () => boolean;\n isNoneMultiSelected: () => boolean;\n getMultiSelected: () => Record<string, any>[];\n __loadParams: UseDataListParams;\n};\n"],"mappings":"","ignoreList":[]}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { ApolloLinkPlugin } from "./ApolloLinkPlugin";
|
|
2
|
-
import { ApolloLink } from "apollo-link";
|
|
3
|
-
/**
|
|
4
|
-
* Append `x-i18n-locale` header from URL query (necessary for prerendering service).
|
|
5
|
-
*/
|
|
6
|
-
export declare class LocaleHeaderLinkPlugin extends ApolloLinkPlugin {
|
|
7
|
-
private readonly locale;
|
|
8
|
-
constructor(locale?: string);
|
|
9
|
-
createLink(): ApolloLink;
|
|
10
|
-
}
|
|
@@ -1,49 +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.LocaleHeaderLinkPlugin = void 0;
|
|
8
|
-
var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/objectSpread2"));
|
|
9
|
-
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
|
|
10
|
-
var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
|
|
11
|
-
var _callSuper2 = _interopRequireDefault(require("@babel/runtime/helpers/callSuper"));
|
|
12
|
-
var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits"));
|
|
13
|
-
var _apolloLinkContext = require("apollo-link-context");
|
|
14
|
-
var _ApolloLinkPlugin2 = require("./ApolloLinkPlugin");
|
|
15
|
-
var _utils = require("../utils");
|
|
16
|
-
/**
|
|
17
|
-
* Append `x-i18n-locale` header from URL query (necessary for prerendering service).
|
|
18
|
-
*/
|
|
19
|
-
var LocaleHeaderLinkPlugin = exports.LocaleHeaderLinkPlugin = /*#__PURE__*/function (_ApolloLinkPlugin) {
|
|
20
|
-
function LocaleHeaderLinkPlugin(locale) {
|
|
21
|
-
var _this;
|
|
22
|
-
(0, _classCallCheck2.default)(this, LocaleHeaderLinkPlugin);
|
|
23
|
-
_this = (0, _callSuper2.default)(this, LocaleHeaderLinkPlugin);
|
|
24
|
-
_this.locale = locale || (0, _utils.getLocaleCode)();
|
|
25
|
-
return _this;
|
|
26
|
-
}
|
|
27
|
-
(0, _inherits2.default)(LocaleHeaderLinkPlugin, _ApolloLinkPlugin);
|
|
28
|
-
return (0, _createClass2.default)(LocaleHeaderLinkPlugin, [{
|
|
29
|
-
key: "createLink",
|
|
30
|
-
value: function createLink() {
|
|
31
|
-
var _this2 = this;
|
|
32
|
-
return (0, _apolloLinkContext.setContext)(function (_, _ref) {
|
|
33
|
-
var headers = _ref.headers;
|
|
34
|
-
if (_this2.locale) {
|
|
35
|
-
return {
|
|
36
|
-
headers: (0, _objectSpread2.default)((0, _objectSpread2.default)({}, headers), {}, {
|
|
37
|
-
"x-i18n-locale": "content:".concat(_this2.locale, ";")
|
|
38
|
-
})
|
|
39
|
-
};
|
|
40
|
-
}
|
|
41
|
-
return {
|
|
42
|
-
headers: headers
|
|
43
|
-
};
|
|
44
|
-
});
|
|
45
|
-
}
|
|
46
|
-
}]);
|
|
47
|
-
}(_ApolloLinkPlugin2.ApolloLinkPlugin);
|
|
48
|
-
|
|
49
|
-
//# sourceMappingURL=LocaleHeaderLinkPlugin.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["_apolloLinkContext","require","_ApolloLinkPlugin2","_utils","LocaleHeaderLinkPlugin","exports","_ApolloLinkPlugin","locale","_this","_classCallCheck2","default","_callSuper2","getLocaleCode","_inherits2","_createClass2","key","value","createLink","_this2","setContext","_","_ref","headers","_objectSpread2","concat","ApolloLinkPlugin"],"sources":["LocaleHeaderLinkPlugin.ts"],"sourcesContent":["import { setContext } from \"apollo-link-context\";\nimport { ApolloLinkPlugin } from \"./ApolloLinkPlugin\";\nimport { ApolloLink } from \"apollo-link\";\nimport { getLocaleCode } from \"~/utils\";\n\n/**\n * Append `x-i18n-locale` header from URL query (necessary for prerendering service).\n */\nexport class LocaleHeaderLinkPlugin extends ApolloLinkPlugin {\n private readonly locale: string;\n\n constructor(locale?: string) {\n super();\n\n this.locale = locale || (getLocaleCode() as string);\n }\n\n public override createLink(): ApolloLink {\n return setContext((_, { headers }) => {\n if (this.locale) {\n return {\n headers: {\n ...headers,\n \"x-i18n-locale\": `content:${this.locale};`\n }\n };\n }\n\n return { headers };\n });\n }\n}\n"],"mappings":";;;;;;;;;;;;AAAA,IAAAA,kBAAA,GAAAC,OAAA;AACA,IAAAC,kBAAA,GAAAD,OAAA;AAEA,IAAAE,MAAA,GAAAF,OAAA;AAEA;AACA;AACA;AAFA,IAGaG,sBAAsB,GAAAC,OAAA,CAAAD,sBAAA,0BAAAE,iBAAA;EAG/B,SAAAF,uBAAYG,MAAe,EAAE;IAAA,IAAAC,KAAA;IAAA,IAAAC,gBAAA,CAAAC,OAAA,QAAAN,sBAAA;IACzBI,KAAA,OAAAG,WAAA,CAAAD,OAAA,QAAAN,sBAAA;IAEAI,KAAA,CAAKD,MAAM,GAAGA,MAAM,IAAK,IAAAK,oBAAa,EAAC,CAAY;IAAC,OAAAJ,KAAA;EACxD;EAAC,IAAAK,UAAA,CAAAH,OAAA,EAAAN,sBAAA,EAAAE,iBAAA;EAAA,WAAAQ,aAAA,CAAAJ,OAAA,EAAAN,sBAAA;IAAAW,GAAA;IAAAC,KAAA,EAED,SAAgBC,UAAUA,CAAA,EAAe;MAAA,IAAAC,MAAA;MACrC,OAAO,IAAAC,6BAAU,EAAC,UAACC,CAAC,EAAAC,IAAA,EAAkB;QAAA,IAAdC,OAAO,GAAAD,IAAA,CAAPC,OAAO;QAC3B,IAAIJ,MAAI,CAACX,MAAM,EAAE;UACb,OAAO;YACHe,OAAO,MAAAC,cAAA,CAAAb,OAAA,MAAAa,cAAA,CAAAb,OAAA,MACAY,OAAO;cACV,eAAe,aAAAE,MAAA,CAAaN,MAAI,CAACX,MAAM;YAAG;UAElD,CAAC;QACL;QAEA,OAAO;UAAEe,OAAO,EAAPA;QAAQ,CAAC;MACtB,CAAC,CAAC;IACN;EAAC;AAAA,EAtBuCG,mCAAgB","ignoreList":[]}
|
package/plugins/RoutePlugin.d.ts
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
|
-
import { Plugin } from "@webiny/plugins";
|
|
3
|
-
interface Config {
|
|
4
|
-
route: React.ReactElement | null;
|
|
5
|
-
}
|
|
6
|
-
export declare class RoutePlugin extends Plugin {
|
|
7
|
-
static readonly type: string;
|
|
8
|
-
private _config;
|
|
9
|
-
constructor(config?: Config);
|
|
10
|
-
get route(): Config["route"];
|
|
11
|
-
}
|
|
12
|
-
export {};
|
package/plugins/RoutePlugin.js
DELETED
|
@@ -1,35 +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.RoutePlugin = void 0;
|
|
8
|
-
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
|
|
9
|
-
var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
|
|
10
|
-
var _callSuper2 = _interopRequireDefault(require("@babel/runtime/helpers/callSuper"));
|
|
11
|
-
var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits"));
|
|
12
|
-
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
13
|
-
var _plugins = require("@webiny/plugins");
|
|
14
|
-
var RoutePlugin = exports.RoutePlugin = /*#__PURE__*/function (_Plugin) {
|
|
15
|
-
function RoutePlugin(config) {
|
|
16
|
-
var _this;
|
|
17
|
-
(0, _classCallCheck2.default)(this, RoutePlugin);
|
|
18
|
-
_this = (0, _callSuper2.default)(this, RoutePlugin);
|
|
19
|
-
_this._config = config || {};
|
|
20
|
-
return _this;
|
|
21
|
-
}
|
|
22
|
-
(0, _inherits2.default)(RoutePlugin, _Plugin);
|
|
23
|
-
return (0, _createClass2.default)(RoutePlugin, [{
|
|
24
|
-
key: "route",
|
|
25
|
-
get: function get() {
|
|
26
|
-
if (!this._config.route) {
|
|
27
|
-
return null;
|
|
28
|
-
}
|
|
29
|
-
return this._config.route;
|
|
30
|
-
}
|
|
31
|
-
}]);
|
|
32
|
-
}(_plugins.Plugin);
|
|
33
|
-
(0, _defineProperty2.default)(RoutePlugin, "type", "route");
|
|
34
|
-
|
|
35
|
-
//# sourceMappingURL=RoutePlugin.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["_plugins","require","RoutePlugin","exports","_Plugin","config","_this","_classCallCheck2","default","_callSuper2","_config","_inherits2","_createClass2","key","get","route","Plugin","_defineProperty2"],"sources":["RoutePlugin.tsx"],"sourcesContent":["import * as React from \"react\";\nimport { Plugin } from \"@webiny/plugins\";\n\ninterface Config {\n route: React.ReactElement | null;\n}\n\nexport class RoutePlugin extends Plugin {\n public static override readonly type: string = \"route\";\n private _config: Partial<Config>;\n\n constructor(config?: Config) {\n super();\n this._config = config || {};\n }\n\n get route(): Config[\"route\"] {\n if (!this._config.route) {\n return null;\n }\n return this._config.route;\n }\n}\n"],"mappings":";;;;;;;;;;;;AACA,IAAAA,QAAA,GAAAC,OAAA;AAAyC,IAM5BC,WAAW,GAAAC,OAAA,CAAAD,WAAA,0BAAAE,OAAA;EAIpB,SAAAF,YAAYG,MAAe,EAAE;IAAA,IAAAC,KAAA;IAAA,IAAAC,gBAAA,CAAAC,OAAA,QAAAN,WAAA;IACzBI,KAAA,OAAAG,WAAA,CAAAD,OAAA,QAAAN,WAAA;IACAI,KAAA,CAAKI,OAAO,GAAGL,MAAM,IAAI,CAAC,CAAC;IAAC,OAAAC,KAAA;EAChC;EAAC,IAAAK,UAAA,CAAAH,OAAA,EAAAN,WAAA,EAAAE,OAAA;EAAA,WAAAQ,aAAA,CAAAJ,OAAA,EAAAN,WAAA;IAAAW,GAAA;IAAAC,GAAA,EAED,SAAAA,IAAA,EAA6B;MACzB,IAAI,CAAC,IAAI,CAACJ,OAAO,CAACK,KAAK,EAAE;QACrB,OAAO,IAAI;MACf;MACA,OAAO,IAAI,CAACL,OAAO,CAACK,KAAK;IAC7B;EAAC;AAAA,EAd4BC,eAAM;AAAA,IAAAC,gBAAA,CAAAT,OAAA,EAA1BN,WAAW,UAC2B,OAAO","ignoreList":[]}
|
package/plugins/ViewPlugin.d.ts
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
|
-
import { Plugin } from "@webiny/plugins";
|
|
3
|
-
interface Config<Props> {
|
|
4
|
-
name: string;
|
|
5
|
-
render(props: Props): React.ReactElement | null;
|
|
6
|
-
}
|
|
7
|
-
export declare class ViewPlugin<Props = any> extends Plugin {
|
|
8
|
-
static readonly type: string;
|
|
9
|
-
private readonly _config;
|
|
10
|
-
constructor(config?: Config<Props>);
|
|
11
|
-
get key(): string | undefined;
|
|
12
|
-
render(props: Props): React.ReactElement<any, string | React.JSXElementConstructor<any>> | null;
|
|
13
|
-
}
|
|
14
|
-
export {};
|
package/plugins/ViewPlugin.js
DELETED
|
@@ -1,40 +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.ViewPlugin = void 0;
|
|
8
|
-
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
|
|
9
|
-
var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
|
|
10
|
-
var _callSuper2 = _interopRequireDefault(require("@babel/runtime/helpers/callSuper"));
|
|
11
|
-
var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits"));
|
|
12
|
-
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
13
|
-
var _plugins = require("@webiny/plugins");
|
|
14
|
-
var ViewPlugin = exports.ViewPlugin = /*#__PURE__*/function (_Plugin) {
|
|
15
|
-
function ViewPlugin(config) {
|
|
16
|
-
var _this;
|
|
17
|
-
(0, _classCallCheck2.default)(this, ViewPlugin);
|
|
18
|
-
_this = (0, _callSuper2.default)(this, ViewPlugin);
|
|
19
|
-
_this._config = config || {};
|
|
20
|
-
return _this;
|
|
21
|
-
}
|
|
22
|
-
(0, _inherits2.default)(ViewPlugin, _Plugin);
|
|
23
|
-
return (0, _createClass2.default)(ViewPlugin, [{
|
|
24
|
-
key: "key",
|
|
25
|
-
get: function get() {
|
|
26
|
-
return this._config.name;
|
|
27
|
-
}
|
|
28
|
-
}, {
|
|
29
|
-
key: "render",
|
|
30
|
-
value: function render(props) {
|
|
31
|
-
if (!this._config.render) {
|
|
32
|
-
return null;
|
|
33
|
-
}
|
|
34
|
-
return this._config.render(props);
|
|
35
|
-
}
|
|
36
|
-
}]);
|
|
37
|
-
}(_plugins.Plugin);
|
|
38
|
-
(0, _defineProperty2.default)(ViewPlugin, "type", "view");
|
|
39
|
-
|
|
40
|
-
//# sourceMappingURL=ViewPlugin.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["_plugins","require","ViewPlugin","exports","_Plugin","config","_this","_classCallCheck2","default","_callSuper2","_config","_inherits2","_createClass2","key","get","name","value","render","props","Plugin","_defineProperty2"],"sources":["ViewPlugin.ts"],"sourcesContent":["import * as React from \"react\";\nimport { Plugin } from \"@webiny/plugins\";\n\ninterface Config<Props> {\n name: string;\n render(props: Props): React.ReactElement | null;\n}\n\nexport class ViewPlugin<Props = any> extends Plugin {\n public static override readonly type: string = \"view\";\n private readonly _config: Partial<Config<Props>>;\n\n public constructor(config?: Config<Props>) {\n super();\n this._config = config || {};\n }\n\n get key() {\n return this._config.name;\n }\n\n public render(props: Props) {\n if (!this._config.render) {\n return null;\n }\n return this._config.render(props);\n }\n}\n"],"mappings":";;;;;;;;;;;;AACA,IAAAA,QAAA,GAAAC,OAAA;AAAyC,IAO5BC,UAAU,GAAAC,OAAA,CAAAD,UAAA,0BAAAE,OAAA;EAInB,SAAAF,WAAmBG,MAAsB,EAAE;IAAA,IAAAC,KAAA;IAAA,IAAAC,gBAAA,CAAAC,OAAA,QAAAN,UAAA;IACvCI,KAAA,OAAAG,WAAA,CAAAD,OAAA,QAAAN,UAAA;IACAI,KAAA,CAAKI,OAAO,GAAGL,MAAM,IAAI,CAAC,CAAC;IAAC,OAAAC,KAAA;EAChC;EAAC,IAAAK,UAAA,CAAAH,OAAA,EAAAN,UAAA,EAAAE,OAAA;EAAA,WAAAQ,aAAA,CAAAJ,OAAA,EAAAN,UAAA;IAAAW,GAAA;IAAAC,GAAA,EAED,SAAAA,IAAA,EAAU;MACN,OAAO,IAAI,CAACJ,OAAO,CAACK,IAAI;IAC5B;EAAC;IAAAF,GAAA;IAAAG,KAAA,EAED,SAAOC,MAAMA,CAACC,KAAY,EAAE;MACxB,IAAI,CAAC,IAAI,CAACR,OAAO,CAACO,MAAM,EAAE;QACtB,OAAO,IAAI;MACf;MACA,OAAO,IAAI,CAACP,OAAO,CAACO,MAAM,CAACC,KAAK,CAAC;IACrC;EAAC;AAAA,EAlBwCC,eAAM;AAAA,IAAAC,gBAAA,CAAAZ,OAAA,EAAtCN,UAAU,UAC4B,MAAM","ignoreList":[]}
|
package/utils/getApiUrl.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const getApiUrl: (path?: string) => string;
|
package/utils/getApiUrl.js
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.getApiUrl = void 0;
|
|
7
|
-
var getApiUrl = exports.getApiUrl = function getApiUrl() {
|
|
8
|
-
var path = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : "";
|
|
9
|
-
return process.env.REACT_APP_API_URL + path;
|
|
10
|
-
};
|
|
11
|
-
|
|
12
|
-
//# sourceMappingURL=getApiUrl.js.map
|
package/utils/getApiUrl.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["getApiUrl","exports","path","arguments","length","undefined","process","env","REACT_APP_API_URL"],"sources":["getApiUrl.ts"],"sourcesContent":["export const getApiUrl = (path = \"\"): string => {\n return process.env.REACT_APP_API_URL + path;\n};\n"],"mappings":";;;;;;AAAO,IAAMA,SAAS,GAAAC,OAAA,CAAAD,SAAA,GAAG,SAAZA,SAASA,CAAA,EAA0B;EAAA,IAAtBE,IAAI,GAAAC,SAAA,CAAAC,MAAA,QAAAD,SAAA,QAAAE,SAAA,GAAAF,SAAA,MAAG,EAAE;EAC/B,OAAOG,OAAO,CAACC,GAAG,CAACC,iBAAiB,GAAGN,IAAI;AAC/C,CAAC","ignoreList":[]}
|
package/utils/getGqlApiUrl.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const getGqlApiUrl: () => string;
|
package/utils/getGqlApiUrl.js
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.getGqlApiUrl = void 0;
|
|
7
|
-
var _getApiUrl = require("./getApiUrl");
|
|
8
|
-
var getGqlApiUrl = exports.getGqlApiUrl = function getGqlApiUrl() {
|
|
9
|
-
return (0, _getApiUrl.getApiUrl)("/graphql");
|
|
10
|
-
};
|
|
11
|
-
|
|
12
|
-
//# sourceMappingURL=getGqlApiUrl.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["_getApiUrl","require","getGqlApiUrl","exports","getApiUrl"],"sources":["getGqlApiUrl.ts"],"sourcesContent":["import { getApiUrl } from \"./getApiUrl\";\n\nexport const getGqlApiUrl = (): string => {\n return getApiUrl(\"/graphql\");\n};\n"],"mappings":";;;;;;AAAA,IAAAA,UAAA,GAAAC,OAAA;AAEO,IAAMC,YAAY,GAAAC,OAAA,CAAAD,YAAA,GAAG,SAAfA,YAAYA,CAAA,EAAiB;EACtC,OAAO,IAAAE,oBAAS,EAAC,UAAU,CAAC;AAChC,CAAC","ignoreList":[]}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.getHeadlessCmsGqlApiUrl = void 0;
|
|
7
|
-
var _getApiUrl = require("./getApiUrl");
|
|
8
|
-
var _getLocaleCode = require("./getLocaleCode");
|
|
9
|
-
var getHeadlessCmsGqlApiUrl = exports.getHeadlessCmsGqlApiUrl = function getHeadlessCmsGqlApiUrl() {
|
|
10
|
-
var locale = (0, _getLocaleCode.getLocaleCode)();
|
|
11
|
-
return {
|
|
12
|
-
preview: (0, _getApiUrl.getApiUrl)("/cms/preview/".concat(locale)),
|
|
13
|
-
read: (0, _getApiUrl.getApiUrl)("/cms/read/".concat(locale)),
|
|
14
|
-
manage: (0, _getApiUrl.getApiUrl)("/cms/manage/".concat(locale))
|
|
15
|
-
};
|
|
16
|
-
};
|
|
17
|
-
|
|
18
|
-
//# sourceMappingURL=getHeadlessCmsGqlApiUrl.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["_getApiUrl","require","_getLocaleCode","getHeadlessCmsGqlApiUrl","exports","locale","getLocaleCode","preview","getApiUrl","concat","read","manage"],"sources":["getHeadlessCmsGqlApiUrl.ts"],"sourcesContent":["import { getApiUrl } from \"./getApiUrl\";\nimport { getLocaleCode } from \"./getLocaleCode\";\n\nexport const getHeadlessCmsGqlApiUrl = (): { preview: string; read: string; manage: string } => {\n const locale = getLocaleCode();\n return {\n preview: getApiUrl(`/cms/preview/${locale}`),\n read: getApiUrl(`/cms/read/${locale}`),\n manage: getApiUrl(`/cms/manage/${locale}`)\n };\n};\n"],"mappings":";;;;;;AAAA,IAAAA,UAAA,GAAAC,OAAA;AACA,IAAAC,cAAA,GAAAD,OAAA;AAEO,IAAME,uBAAuB,GAAAC,OAAA,CAAAD,uBAAA,GAAG,SAA1BA,uBAAuBA,CAAA,EAA4D;EAC5F,IAAME,MAAM,GAAG,IAAAC,4BAAa,EAAC,CAAC;EAC9B,OAAO;IACHC,OAAO,EAAE,IAAAC,oBAAS,kBAAAC,MAAA,CAAiBJ,MAAM,CAAE,CAAC;IAC5CK,IAAI,EAAE,IAAAF,oBAAS,eAAAC,MAAA,CAAcJ,MAAM,CAAE,CAAC;IACtCM,MAAM,EAAE,IAAAH,oBAAS,iBAAAC,MAAA,CAAgBJ,MAAM,CAAE;EAC7C,CAAC;AACL,CAAC","ignoreList":[]}
|