@jetshop/core 5.16.1 → 5.17.0-alpha.f7018eb5
Sign up to get free protection for your applications and to get access to all the features.
- package/global.d.ts +26 -2
- package/package.json +2 -2
- package/ChannelHandler/ChannelHandler.d.ts +0 -53
- package/ChannelHandler/ChannelHandler.js +0 -114
- package/ChannelHandler/ChannelHandler.js.map +0 -1
- package/ChannelHandler/channelUtils.d.ts +0 -73
- package/ChannelHandler/channelUtils.js +0 -313
- package/ChannelHandler/channelUtils.js.map +0 -1
- package/ChannelHandler/redirectUtils.d.ts +0 -4
- package/ChannelHandler/redirectUtils.js +0 -50
- package/ChannelHandler/redirectUtils.js.map +0 -1
- package/analytics/Analytics.d.ts +0 -18
- package/analytics/Analytics.js +0 -57
- package/analytics/Analytics.js.map +0 -1
- package/analytics/AnalyticsProvider.d.ts +0 -54
- package/analytics/AnalyticsProvider.js +0 -229
- package/analytics/AnalyticsProvider.js.map +0 -1
- package/analytics/deprecatedTracking.d.ts +0 -17
- package/analytics/deprecatedTracking.js +0 -33
- package/analytics/deprecatedTracking.js.map +0 -1
- package/analytics/integrations/ga4.d.ts +0 -28
- package/analytics/integrations/ga4.js +0 -189
- package/analytics/integrations/ga4.js.map +0 -1
- package/analytics/integrations/gtag/gtag.d.ts +0 -8
- package/analytics/integrations/gtag/gtag.js +0 -209
- package/analytics/integrations/gtag/gtag.js.map +0 -1
- package/analytics/integrations/gtag/index.d.ts +0 -1
- package/analytics/integrations/gtag/index.js +0 -2
- package/analytics/integrations/gtag/index.js.map +0 -1
- package/analytics/integrations/gtm/gtm.d.ts +0 -12
- package/analytics/integrations/gtm/gtm.js +0 -227
- package/analytics/integrations/gtm/gtm.js.map +0 -1
- package/analytics/integrations/gtm/index.d.ts +0 -1
- package/analytics/integrations/gtm/index.js +0 -2
- package/analytics/integrations/gtm/index.js.map +0 -1
- package/analytics/integrations/gtm/referrerModifier.d.ts +0 -1
- package/analytics/integrations/gtm/referrerModifier.js +0 -62
- package/analytics/integrations/gtm/referrerModifier.js.map +0 -1
- package/analytics/integrations/releware/index.d.ts +0 -3
- package/analytics/integrations/releware/index.js +0 -39
- package/analytics/integrations/releware/index.js.map +0 -1
- package/analytics/integrations/unslugify.d.ts +0 -1
- package/analytics/integrations/unslugify.js +0 -16
- package/analytics/integrations/unslugify.js.map +0 -1
- package/analytics/trackerRegistry.d.ts +0 -113
- package/analytics/trackerRegistry.js +0 -222
- package/analytics/trackerRegistry.js.map +0 -1
- package/analytics/tracking.d.ts +0 -14
- package/analytics/tracking.js +0 -72
- package/analytics/tracking.js.map +0 -1
- package/analytics/utils/breadcrumbsWithoutProduct.d.ts +0 -1
- package/analytics/utils/breadcrumbsWithoutProduct.js +0 -9
- package/analytics/utils/breadcrumbsWithoutProduct.js.map +0 -1
- package/analytics/utils/script.d.ts +0 -8
- package/analytics/utils/script.js +0 -40
- package/analytics/utils/script.js.map +0 -1
- package/analytics/webVitals.d.ts +0 -5
- package/analytics/webVitals.js +0 -39
- package/analytics/webVitals.js.map +0 -1
- package/boot/AuthHandler.d.ts +0 -14
- package/boot/AuthHandler.js +0 -39
- package/boot/AuthHandler.js.map +0 -1
- package/boot/PreviewHandler.d.ts +0 -7
- package/boot/PreviewHandler.js +0 -14
- package/boot/PreviewHandler.js.map +0 -1
- package/boot/SharedTree.d.ts +0 -25
- package/boot/SharedTree.js +0 -29
- package/boot/SharedTree.js.map +0 -1
- package/boot/addMissingConfig.d.ts +0 -5
- package/boot/addMissingConfig.js +0 -34
- package/boot/addMissingConfig.js.map +0 -1
- package/boot/apollo.d.ts +0 -21
- package/boot/apollo.js +0 -198
- package/boot/apollo.js.map +0 -1
- package/boot/client/entrypoint.d.ts +0 -1
- package/boot/client/entrypoint.js +0 -5
- package/boot/client/entrypoint.js.map +0 -1
- package/boot/client/index.d.ts +0 -1
- package/boot/client/index.js +0 -2
- package/boot/client/index.js.map +0 -1
- package/boot/client/startClient.d.ts +0 -4
- package/boot/client/startClient.js +0 -144
- package/boot/client/startClient.js.map +0 -1
- package/boot/server/IntervalQuery.d.ts +0 -32
- package/boot/server/IntervalQuery.js +0 -95
- package/boot/server/IntervalQuery.js.map +0 -1
- package/boot/server/PersistedApolloClient.d.ts +0 -20
- package/boot/server/PersistedApolloClient.js +0 -40
- package/boot/server/PersistedApolloClient.js.map +0 -1
- package/boot/server/asyncErrorHandler.d.ts +0 -3
- package/boot/server/asyncErrorHandler.js +0 -5
- package/boot/server/asyncErrorHandler.js.map +0 -1
- package/boot/server/breakpointMiddleware.d.ts +0 -3
- package/boot/server/breakpointMiddleware.js +0 -10
- package/boot/server/breakpointMiddleware.js.map +0 -1
- package/boot/server/createApolloServer.d.ts +0 -28
- package/boot/server/createApolloServer.js +0 -144
- package/boot/server/createApolloServer.js.map +0 -1
- package/boot/server/createDevServer.d.ts +0 -14
- package/boot/server/createDevServer.js +0 -30
- package/boot/server/createDevServer.js.map +0 -1
- package/boot/server/createRenderer.d.ts +0 -28
- package/boot/server/createRenderer.js +0 -237
- package/boot/server/createRenderer.js.map +0 -1
- package/boot/server/createServer.d.ts +0 -14
- package/boot/server/createServer.js +0 -42
- package/boot/server/createServer.js.map +0 -1
- package/boot/server/entrypoint.d.ts +0 -1
- package/boot/server/entrypoint.js +0 -36
- package/boot/server/entrypoint.js.map +0 -1
- package/boot/server/getPrefetchFiles.d.ts +0 -10
- package/boot/server/getPrefetchFiles.js +0 -20
- package/boot/server/getPrefetchFiles.js.map +0 -1
- package/boot/server/getPreloadAssets.d.ts +0 -10
- package/boot/server/getPreloadAssets.js +0 -18
- package/boot/server/getPreloadAssets.js.map +0 -1
- package/boot/server/index.d.ts +0 -9
- package/boot/server/index.js +0 -123
- package/boot/server/index.js.map +0 -1
- package/boot/server/listen.d.ts +0 -13
- package/boot/server/listen.js +0 -17
- package/boot/server/listen.js.map +0 -1
- package/boot/server/persistedQueries/PersistedClient.d.ts +0 -22
- package/boot/server/persistedQueries/PersistedClient.js +0 -58
- package/boot/server/persistedQueries/PersistedClient.js.map +0 -1
- package/boot/server/persistedQueries/getPersistedQueriesForRequest.d.ts +0 -3
- package/boot/server/persistedQueries/getPersistedQueriesForRequest.js +0 -27
- package/boot/server/persistedQueries/getPersistedQueriesForRequest.js.map +0 -1
- package/boot/server/salesSource.d.ts +0 -8
- package/boot/server/salesSource.js +0 -16
- package/boot/server/salesSource.js.map +0 -1
- package/boot/utils/createIntOptions.d.ts +0 -6
- package/boot/utils/createIntOptions.js +0 -19
- package/boot/utils/createIntOptions.js.map +0 -1
- package/boot/utils/queryLoggingMiddleware.d.ts +0 -2
- package/boot/utils/queryLoggingMiddleware.js +0 -15
- package/boot/utils/queryLoggingMiddleware.js.map +0 -1
- package/boot/utils/uid.d.ts +0 -3
- package/boot/utils/uid.js +0 -20
- package/boot/utils/uid.js.map +0 -1
- package/cart/AddToCartFormik.d.ts +0 -42
- package/cart/AddToCartFormik.js +0 -77
- package/cart/AddToCartFormik.js.map +0 -1
- package/cart/useAddToCart.d.ts +0 -88
- package/cart/useAddToCart.js +0 -119
- package/cart/useAddToCart.js.map +0 -1
- package/cart/useCart.d.ts +0 -0
- package/cart/useCart.js +0 -1
- package/cart/useCart.js.map +0 -1
- package/components/Auth/CustomerFormContainer.d.ts +0 -0
- package/components/Auth/CustomerFormContainer.js +0 -1
- package/components/Auth/CustomerFormContainer.js.map +0 -1
- package/components/Auth/CustomerUpdateForm.d.ts +0 -32
- package/components/Auth/CustomerUpdateForm.js +0 -122
- package/components/Auth/CustomerUpdateForm.js.map +0 -1
- package/components/Auth/ForgotPasswordProvider.d.ts +0 -71
- package/components/Auth/ForgotPasswordProvider.js +0 -57
- package/components/Auth/ForgotPasswordProvider.js.map +0 -1
- package/components/Auth/ResetPasswordProvider.d.ts +0 -88
- package/components/Auth/ResetPasswordProvider.js +0 -78
- package/components/Auth/ResetPasswordProvider.js.map +0 -1
- package/components/Auth/SSN.d.ts +0 -12
- package/components/Auth/SSN.js +0 -35
- package/components/Auth/SSN.js.map +0 -1
- package/components/Auth/SSNLookupContainer.d.ts +0 -15
- package/components/Auth/SSNLookupContainer.js +0 -20
- package/components/Auth/SSNLookupContainer.js.map +0 -1
- package/components/Auth/SignupFormContainer.d.ts +0 -19
- package/components/Auth/SignupFormContainer.js +0 -82
- package/components/Auth/SignupFormContainer.js.map +0 -1
- package/components/Auth/UpdatePasswordForm.d.ts +0 -44
- package/components/Auth/UpdatePasswordForm.js +0 -98
- package/components/Auth/UpdatePasswordForm.js.map +0 -1
- package/components/Auth/formFieldsFromSettings.d.ts +0 -65
- package/components/Auth/formFieldsFromSettings.js +0 -77
- package/components/Auth/formFieldsFromSettings.js.map +0 -1
- package/components/Auth/formatSignupInput.d.ts +0 -8
- package/components/Auth/formatSignupInput.js +0 -43
- package/components/Auth/formatSignupInput.js.map +0 -1
- package/components/Auth/signup-context.d.ts +0 -36
- package/components/Auth/signup-context.js +0 -72
- package/components/Auth/signup-context.js.map +0 -1
- package/components/Auth/signup-field-translations.d.ts +0 -3
- package/components/Auth/signup-field-translations.js +0 -44
- package/components/Auth/signup-field-translations.js.map +0 -1
- package/components/Auth/signupSubmit.d.ts +0 -6
- package/components/Auth/signupSubmit.js +0 -57
- package/components/Auth/signupSubmit.js.map +0 -1
- package/components/Auth/useAddressFields.d.ts +0 -22
- package/components/Auth/useAddressFields.js +0 -33
- package/components/Auth/useAddressFields.js.map +0 -1
- package/components/Auth/useCustomer.d.ts +0 -116
- package/components/Auth/useCustomer.js +0 -189
- package/components/Auth/useCustomer.js.map +0 -1
- package/components/Auth/useLoginFields.d.ts +0 -20
- package/components/Auth/useLoginFields.js +0 -21
- package/components/Auth/useLoginFields.js.map +0 -1
- package/components/Auth/useSignupForm.d.ts +0 -7
- package/components/Auth/useSignupForm.js +0 -15
- package/components/Auth/useSignupForm.js.map +0 -1
- package/components/AuthContext/AuthContext.d.ts +0 -8
- package/components/AuthContext/AuthContext.js +0 -9
- package/components/AuthContext/AuthContext.js.map +0 -1
- package/components/AuthContext/AuthProvider.d.ts +0 -6
- package/components/AuthContext/AuthProvider.js +0 -85
- package/components/AuthContext/AuthProvider.js.map +0 -1
- package/components/AuthContext/LogOut.d.ts +0 -5
- package/components/AuthContext/LogOut.js +0 -15
- package/components/AuthContext/LogOut.js.map +0 -1
- package/components/AuthContext/useAuth.d.ts +0 -6
- package/components/AuthContext/useAuth.js +0 -21
- package/components/AuthContext/useAuth.js.map +0 -1
- package/components/BreakpointProvider.d.ts +0 -21
- package/components/BreakpointProvider.js +0 -24
- package/components/BreakpointProvider.js.map +0 -1
- package/components/Cart/CartIdContext.d.ts +0 -11
- package/components/Cart/CartIdContext.js +0 -61
- package/components/Cart/CartIdContext.js.map +0 -1
- package/components/ChannelContext/ChannelContext.d.ts +0 -21
- package/components/ChannelContext/ChannelContext.js +0 -4
- package/components/ChannelContext/ChannelContext.js.map +0 -1
- package/components/ChannelContext/ChannelProvider.d.ts +0 -10
- package/components/ChannelContext/ChannelProvider.js +0 -45
- package/components/ChannelContext/ChannelProvider.js.map +0 -1
- package/components/ChannelContext/index.d.ts +0 -2
- package/components/ChannelContext/index.js +0 -3
- package/components/ChannelContext/index.js.map +0 -1
- package/components/ChannelContext/useCountrySettings.d.ts +0 -8
- package/components/ChannelContext/useCountrySettings.js +0 -24
- package/components/ChannelContext/useCountrySettings.js.map +0 -1
- package/components/ConfigProvider.d.ts +0 -108
- package/components/ConfigProvider.js +0 -20
- package/components/ConfigProvider.js.map +0 -1
- package/components/DynamicRoute/CategoryRoute.d.ts +0 -13
- package/components/DynamicRoute/CategoryRoute.js +0 -56
- package/components/DynamicRoute/CategoryRoute.js.map +0 -1
- package/components/DynamicRoute/ContentRoute.d.ts +0 -14
- package/components/DynamicRoute/ContentRoute.js +0 -28
- package/components/DynamicRoute/ContentRoute.js.map +0 -1
- package/components/DynamicRoute/CustomerRoute.d.ts +0 -0
- package/components/DynamicRoute/CustomerRoute.js +0 -1
- package/components/DynamicRoute/CustomerRoute.js.map +0 -1
- package/components/DynamicRoute/PreviewRoute.d.ts +0 -17
- package/components/DynamicRoute/PreviewRoute.js +0 -58
- package/components/DynamicRoute/PreviewRoute.js.map +0 -1
- package/components/DynamicRoute/ProductByArticlenumber.d.ts +0 -5
- package/components/DynamicRoute/ProductByArticlenumber.js +0 -22
- package/components/DynamicRoute/ProductByArticlenumber.js.map +0 -1
- package/components/DynamicRoute/ProductRoute.d.ts +0 -15
- package/components/DynamicRoute/ProductRoute.js +0 -65
- package/components/DynamicRoute/ProductRoute.js.map +0 -1
- package/components/DynamicRoute/RouteResolver.d.ts +0 -22
- package/components/DynamicRoute/RouteResolver.js +0 -65
- package/components/DynamicRoute/RouteResolver.js.map +0 -1
- package/components/DynamicRoute/Status.d.ts +0 -14
- package/components/DynamicRoute/Status.js +0 -20
- package/components/DynamicRoute/Status.js.map +0 -1
- package/components/DynamicRoute/index.d.ts +0 -17
- package/components/DynamicRoute/index.js +0 -96
- package/components/DynamicRoute/index.js.map +0 -1
- package/components/Filters/index.d.ts +0 -1
- package/components/Filters/index.js +0 -2
- package/components/Filters/index.js.map +0 -1
- package/components/Filters/utils/replaceInSearch.d.ts +0 -14
- package/components/Filters/utils/replaceInSearch.js +0 -23
- package/components/Filters/utils/replaceInSearch.js.map +0 -1
- package/components/Filters/utils/updateHistory.d.ts +0 -25
- package/components/Filters/utils/updateHistory.js +0 -30
- package/components/Filters/utils/updateHistory.js.map +0 -1
- package/components/Fonts/CustomFont.d.ts +0 -14
- package/components/Fonts/CustomFont.js +0 -17
- package/components/Fonts/CustomFont.js.map +0 -1
- package/components/Fonts/GoogleFont.d.ts +0 -10
- package/components/Fonts/GoogleFont.js +0 -35
- package/components/Fonts/GoogleFont.js.map +0 -1
- package/components/Fonts/TypekitFont.d.ts +0 -16
- package/components/Fonts/TypekitFont.js +0 -25
- package/components/Fonts/TypekitFont.js.map +0 -1
- package/components/Fonts/injectFont.d.ts +0 -11
- package/components/Fonts/injectFont.js +0 -30
- package/components/Fonts/injectFont.js.map +0 -1
- package/components/Head.d.ts +0 -11
- package/components/Head.js +0 -84
- package/components/Head.js.map +0 -1
- package/components/Mutation/AddToCart/addToCartUtils.d.ts +0 -18
- package/components/Mutation/AddToCart/addToCartUtils.js +0 -52
- package/components/Mutation/AddToCart/addToCartUtils.js.map +0 -1
- package/components/Mutation/AddToCartFormik.d.ts +0 -53
- package/components/Mutation/AddToCartFormik.js +0 -173
- package/components/Mutation/AddToCartFormik.js.map +0 -1
- package/components/Mutation/DecrementQuantity.d.ts +0 -4
- package/components/Mutation/DecrementQuantity.js +0 -35
- package/components/Mutation/DecrementQuantity.js.map +0 -1
- package/components/Mutation/IncrementQuantity.d.ts +0 -4
- package/components/Mutation/IncrementQuantity.js +0 -35
- package/components/Mutation/IncrementQuantity.js.map +0 -1
- package/components/Mutation/RemoveFromCart.d.ts +0 -5
- package/components/Mutation/RemoveFromCart.js +0 -52
- package/components/Mutation/RemoveFromCart.js.map +0 -1
- package/components/Mutation/SetQuantity.d.ts +0 -4
- package/components/Mutation/SetQuantity.js +0 -37
- package/components/Mutation/SetQuantity.js.map +0 -1
- package/components/Mutation/SubscribeToNewsletter.d.ts +0 -4
- package/components/Mutation/SubscribeToNewsletter.js +0 -30
- package/components/Mutation/SubscribeToNewsletter.js.map +0 -1
- package/components/Mutation/SubscribeToStockNotifications.d.ts +0 -4
- package/components/Mutation/SubscribeToStockNotifications.js +0 -31
- package/components/Mutation/SubscribeToStockNotifications.js.map +0 -1
- package/components/Mutation/cartMutationUtils.d.ts +0 -28
- package/components/Mutation/cartMutationUtils.js +0 -109
- package/components/Mutation/cartMutationUtils.js.map +0 -1
- package/components/Mutation/useDecrementQuantity.d.ts +0 -11
- package/components/Mutation/useDecrementQuantity.js +0 -54
- package/components/Mutation/useDecrementQuantity.js.map +0 -1
- package/components/Mutation/useIncrementQuantity.d.ts +0 -11
- package/components/Mutation/useIncrementQuantity.js +0 -54
- package/components/Mutation/useIncrementQuantity.js.map +0 -1
- package/components/Mutation/useRemoveFromCart.d.ts +0 -13
- package/components/Mutation/useRemoveFromCart.js +0 -50
- package/components/Mutation/useRemoveFromCart.js.map +0 -1
- package/components/Mutation/useSetQuantity.d.ts +0 -12
- package/components/Mutation/useSetQuantity.js +0 -38
- package/components/Mutation/useSetQuantity.js.map +0 -1
- package/components/Notifications/Notifications.d.ts +0 -15
- package/components/Notifications/Notifications.js +0 -27
- package/components/Notifications/Notifications.js.map +0 -1
- package/components/Notifications/index.d.ts +0 -2
- package/components/Notifications/index.js +0 -3
- package/components/Notifications/index.js.map +0 -1
- package/components/Notifications/notificationMachine.d.ts +0 -30
- package/components/Notifications/notificationMachine.js +0 -74
- package/components/Notifications/notificationMachine.js.map +0 -1
- package/components/Notifications/notificationsMachine.d.ts +0 -37
- package/components/Notifications/notificationsMachine.js +0 -66
- package/components/Notifications/notificationsMachine.js.map +0 -1
- package/components/Notifications/useNotification.d.ts +0 -9
- package/components/Notifications/useNotification.js +0 -27
- package/components/Notifications/useNotification.js.map +0 -1
- package/components/OpenGraph/OpenGraphGeneralPageData.d.ts +0 -25
- package/components/OpenGraph/OpenGraphGeneralPageData.js +0 -37
- package/components/OpenGraph/OpenGraphGeneralPageData.js.map +0 -1
- package/components/OpenGraph/OpenGraphProductData.d.ts +0 -25
- package/components/OpenGraph/OpenGraphProductData.js +0 -49
- package/components/OpenGraph/OpenGraphProductData.js.map +0 -1
- package/components/OpenGraph/index.d.ts +0 -2
- package/components/OpenGraph/index.js +0 -3
- package/components/OpenGraph/index.js.map +0 -1
- package/components/Pagination/PaginationContainer.d.ts +0 -2
- package/components/Pagination/PaginationContainer.js +0 -5
- package/components/Pagination/PaginationContainer.js.map +0 -1
- package/components/Pagination/PaginationContext.d.ts +0 -14
- package/components/Pagination/PaginationContext.js +0 -4
- package/components/Pagination/PaginationContext.js.map +0 -1
- package/components/Pagination/PaginationProvider.d.ts +0 -19
- package/components/Pagination/PaginationProvider.js +0 -95
- package/components/Pagination/PaginationProvider.js.map +0 -1
- package/components/PreviewContext.d.ts +0 -10
- package/components/PreviewContext.js +0 -27
- package/components/PreviewContext.js.map +0 -1
- package/components/ProductConfigurationProvider/ProductConfigurationContext.d.ts +0 -13
- package/components/ProductConfigurationProvider/ProductConfigurationContext.js +0 -5
- package/components/ProductConfigurationProvider/ProductConfigurationContext.js.map +0 -1
- package/components/ProductConfigurationProvider/ProductConfigurationProvider.d.ts +0 -6
- package/components/ProductConfigurationProvider/ProductConfigurationProvider.js +0 -50
- package/components/ProductConfigurationProvider/ProductConfigurationProvider.js.map +0 -1
- package/components/Query/CartProvider.d.ts +0 -22
- package/components/Query/CartProvider.js +0 -68
- package/components/Query/CartProvider.js.map +0 -1
- package/components/SortOrder/SortOrderContainer.d.ts +0 -40
- package/components/SortOrder/SortOrderContainer.js +0 -108
- package/components/SortOrder/SortOrderContainer.js.map +0 -1
- package/components/SortOrder/SortOrderContext.d.ts +0 -9
- package/components/SortOrder/SortOrderContext.js +0 -9
- package/components/SortOrder/SortOrderContext.js.map +0 -1
- package/components/StructuredData/SiteLinksSearchStructuredData.d.ts +0 -3
- package/components/StructuredData/SiteLinksSearchStructuredData.js +0 -25
- package/components/StructuredData/SiteLinksSearchStructuredData.js.map +0 -1
- package/components/StructuredData/StructuredBreadcrumbData.d.ts +0 -12
- package/components/StructuredData/StructuredBreadcrumbData.js +0 -55
- package/components/StructuredData/StructuredBreadcrumbData.js.map +0 -1
- package/components/StructuredData/StructuredCategoryData.d.ts +0 -16
- package/components/StructuredData/StructuredCategoryData.js +0 -18
- package/components/StructuredData/StructuredCategoryData.js.map +0 -1
- package/components/StructuredData/StructuredData.d.ts +0 -9
- package/components/StructuredData/StructuredData.js +0 -7
- package/components/StructuredData/StructuredData.js.map +0 -1
- package/components/StructuredData/StructuredPageData.d.ts +0 -16
- package/components/StructuredData/StructuredPageData.js +0 -17
- package/components/StructuredData/StructuredPageData.js.map +0 -1
- package/components/StructuredData/StructuredProductData.d.ts +0 -18
- package/components/StructuredData/StructuredProductData.js +0 -43
- package/components/StructuredData/StructuredProductData.js.map +0 -1
- package/components/StructuredData/index.d.ts +0 -5
- package/components/StructuredData/index.js +0 -6
- package/components/StructuredData/index.js.map +0 -1
- package/data/cache.d.ts +0 -3
- package/data/cache.js +0 -21
- package/data/cache.js.map +0 -1
- package/data/fragmentTypes.d.ts +0 -8
- package/data/fragmentTypes.js +0 -84
- package/data/fragmentTypes.js.map +0 -1
- package/data/fragments/index.d.ts +0 -1
- package/data/fragments/index.js +0 -2
- package/data/fragments/index.js.map +0 -1
- package/errorReporting.browser.d.ts +0 -3
- package/errorReporting.browser.js +0 -12
- package/errorReporting.browser.js.map +0 -1
- package/errorReporting.d.ts +0 -3
- package/errorReporting.js +0 -20
- package/errorReporting.js.map +0 -1
- package/errorReporting.server.d.ts +0 -3
- package/errorReporting.server.js +0 -12
- package/errorReporting.server.js.map +0 -1
- package/errorReporting.shared.d.ts +0 -5
- package/errorReporting.shared.js +0 -17
- package/errorReporting.shared.js.map +0 -1
- package/experiments/ExperimentsProvider.d.ts +0 -4
- package/experiments/ExperimentsProvider.js +0 -29
- package/experiments/ExperimentsProvider.js.map +0 -1
- package/experiments/selectExperimentVariant.d.ts +0 -3
- package/experiments/selectExperimentVariant.js +0 -35
- package/experiments/selectExperimentVariant.js.map +0 -1
- package/experiments/useExperiment.d.ts +0 -2
- package/experiments/useExperiment.js +0 -11
- package/experiments/useExperiment.js.map +0 -1
- package/helpers/decodeUrlQuery.d.ts +0 -9
- package/helpers/decodeUrlQuery.js +0 -27
- package/helpers/decodeUrlQuery.js.map +0 -1
- package/helpers/distance.d.ts +0 -7
- package/helpers/distance.js +0 -13
- package/helpers/distance.js.map +0 -1
- package/helpers/encodeVariant.d.ts +0 -3
- package/helpers/encodeVariant.js +0 -25
- package/helpers/encodeVariant.js.map +0 -1
- package/helpers/getBreakpointsFromValues.d.ts +0 -6
- package/helpers/getBreakpointsFromValues.js +0 -15
- package/helpers/getBreakpointsFromValues.js.map +0 -1
- package/helpers/getCartItemVariant.d.ts +0 -7
- package/helpers/getCartItemVariant.js +0 -9
- package/helpers/getCartItemVariant.js.map +0 -1
- package/helpers/getErrorDetail.d.ts +0 -7
- package/helpers/getErrorDetail.js +0 -12
- package/helpers/getErrorDetail.js.map +0 -1
- package/helpers/getHeaders.d.ts +0 -6
- package/helpers/getHeaders.js +0 -4
- package/helpers/getHeaders.js.map +0 -1
- package/helpers/isRelativeUrl.d.ts +0 -1
- package/helpers/isRelativeUrl.js +0 -4
- package/helpers/isRelativeUrl.js.map +0 -1
- package/helpers/logError.d.ts +0 -1
- package/helpers/logError.js +0 -17
- package/helpers/logError.js.map +0 -1
- package/helpers/logWarningInDev.d.ts +0 -1
- package/helpers/logWarningInDev.js +0 -7
- package/helpers/logWarningInDev.js.map +0 -1
- package/helpers/throwErrorInDev.d.ts +0 -6
- package/helpers/throwErrorInDev.js +0 -15
- package/helpers/throwErrorInDev.js.map +0 -1
- package/helpers/uniqueId.d.ts +0 -5
- package/helpers/uniqueId.js +0 -10
- package/helpers/uniqueId.js.map +0 -1
- package/hooks/Channels/useChannelSettings.d.ts +0 -7
- package/hooks/Channels/useChannelSettings.js +0 -12
- package/hooks/Channels/useChannelSettings.js.map +0 -1
- package/hooks/Filters/useBooleanFilter.d.ts +0 -8
- package/hooks/Filters/useBooleanFilter.js +0 -21
- package/hooks/Filters/useBooleanFilter.js.map +0 -1
- package/hooks/Filters/useFilters.d.ts +0 -3
- package/hooks/Filters/useFilters.js +0 -16
- package/hooks/Filters/useFilters.js.map +0 -1
- package/hooks/Filters/useListFilter.d.ts +0 -10
- package/hooks/Filters/useListFilter.js +0 -38
- package/hooks/Filters/useListFilter.js.map +0 -1
- package/hooks/Filters/useMultiFilter.d.ts +0 -13
- package/hooks/Filters/useMultiFilter.js +0 -50
- package/hooks/Filters/useMultiFilter.js.map +0 -1
- package/hooks/Filters/useRangeFilter.d.ts +0 -10
- package/hooks/Filters/useRangeFilter.js +0 -36
- package/hooks/Filters/useRangeFilter.js.map +0 -1
- package/hooks/Filters/useSortOrder.d.ts +0 -11
- package/hooks/Filters/useSortOrder.js +0 -22
- package/hooks/Filters/useSortOrder.js.map +0 -1
- package/hooks/PackageProducts/index.d.ts +0 -2
- package/hooks/PackageProducts/index.js +0 -3
- package/hooks/PackageProducts/index.js.map +0 -1
- package/hooks/PackageProducts/usePackageProductItem.d.ts +0 -17
- package/hooks/PackageProducts/usePackageProductItem.js +0 -27
- package/hooks/PackageProducts/usePackageProductItem.js.map +0 -1
- package/hooks/PackageProducts/usePackageProducts.d.ts +0 -19
- package/hooks/PackageProducts/usePackageProducts.js +0 -346
- package/hooks/PackageProducts/usePackageProducts.js.map +0 -1
- package/hooks/Product/index.d.ts +0 -1
- package/hooks/Product/index.js +0 -2
- package/hooks/Product/index.js.map +0 -1
- package/hooks/Product/useStockStatus.d.ts +0 -9
- package/hooks/Product/useStockStatus.js +0 -26
- package/hooks/Product/useStockStatus.js.map +0 -1
- package/hooks/Product/useSwitchToVariantImage.d.ts +0 -9
- package/hooks/Product/useSwitchToVariantImage.js +0 -21
- package/hooks/Product/useSwitchToVariantImage.js.map +0 -1
- package/hooks/ProductList/ProductListContext.d.ts +0 -7
- package/hooks/ProductList/ProductListContext.js +0 -111
- package/hooks/ProductList/ProductListContext.js.map +0 -1
- package/hooks/ProductList/action-creators.d.ts +0 -46
- package/hooks/ProductList/action-creators.js +0 -297
- package/hooks/ProductList/action-creators.js.map +0 -1
- package/hooks/ProductList/index.d.ts +0 -118
- package/hooks/ProductList/index.js +0 -22
- package/hooks/ProductList/index.js.map +0 -1
- package/hooks/ProductList/list-transforms.d.ts +0 -75
- package/hooks/ProductList/list-transforms.js +0 -107
- package/hooks/ProductList/list-transforms.js.map +0 -1
- package/hooks/ProductList/product-list-reducer.d.ts +0 -76
- package/hooks/ProductList/product-list-reducer.js +0 -198
- package/hooks/ProductList/product-list-reducer.js.map +0 -1
- package/hooks/ProductList/useProductList.d.ts +0 -13
- package/hooks/ProductList/useProductList.js +0 -94
- package/hooks/ProductList/useProductList.js.map +0 -1
- package/hooks/ProductList/useProductListItems.d.ts +0 -10
- package/hooks/ProductList/useProductListItems.js +0 -49
- package/hooks/ProductList/useProductListItems.js.map +0 -1
- package/hooks/ProductList/validate-product.d.ts +0 -6
- package/hooks/ProductList/validate-product.js +0 -41
- package/hooks/ProductList/validate-product.js.map +0 -1
- package/hooks/Subscriptions/useNewsletterSubscription.d.ts +0 -38
- package/hooks/Subscriptions/useNewsletterSubscription.js +0 -42
- package/hooks/Subscriptions/useNewsletterSubscription.js.map +0 -1
- package/hooks/Subscriptions/useStockNotifications.d.ts +0 -36
- package/hooks/Subscriptions/useStockNotifications.js +0 -38
- package/hooks/Subscriptions/useStockNotifications.js.map +0 -1
- package/hooks/Subscriptions/useStoreSubscriptions.d.ts +0 -48
- package/hooks/Subscriptions/useStoreSubscriptions.js +0 -151
- package/hooks/Subscriptions/useStoreSubscriptions.js.map +0 -1
- package/hooks/useAddMultipleToCart.d.ts +0 -27
- package/hooks/useAddMultipleToCart.js +0 -114
- package/hooks/useAddMultipleToCart.js.map +0 -1
- package/hooks/useChannels.d.ts +0 -1
- package/hooks/useChannels.js +0 -10
- package/hooks/useChannels.js.map +0 -1
- package/hooks/useCustomerOrdersQuery.d.ts +0 -21
- package/hooks/useCustomerOrdersQuery.js +0 -21
- package/hooks/useCustomerOrdersQuery.js.map +0 -1
- package/hooks/useDeleteAccountMutation.d.ts +0 -15
- package/hooks/useDeleteAccountMutation.js +0 -39
- package/hooks/useDeleteAccountMutation.js.map +0 -1
- package/hooks/useDynamicPrice.d.ts +0 -3
- package/hooks/useDynamicPrice.js +0 -25
- package/hooks/useDynamicPrice.js.map +0 -1
- package/hooks/useFreeShippingCheck.d.ts +0 -15
- package/hooks/useFreeShippingCheck.js +0 -31
- package/hooks/useFreeShippingCheck.js.map +0 -1
- package/hooks/useGeolocation.d.ts +0 -11
- package/hooks/useGeolocation.js +0 -34
- package/hooks/useGeolocation.js.map +0 -1
- package/hooks/useInfinitePagination.d.ts +0 -37
- package/hooks/useInfinitePagination.js +0 -139
- package/hooks/useInfinitePagination.js.map +0 -1
- package/hooks/useLogError.d.ts +0 -1
- package/hooks/useLogError.js +0 -8
- package/hooks/useLogError.js.map +0 -1
- package/hooks/useLoginMutation.d.ts +0 -12
- package/hooks/useLoginMutation.js +0 -15
- package/hooks/useLoginMutation.js.map +0 -1
- package/hooks/useLoginRedirect.d.ts +0 -4
- package/hooks/useLoginRedirect.js +0 -37
- package/hooks/useLoginRedirect.js.map +0 -1
- package/hooks/useOrderDetailQuery.d.ts +0 -20
- package/hooks/useOrderDetailQuery.js +0 -29
- package/hooks/useOrderDetailQuery.js.map +0 -1
- package/hooks/usePreconnectLinks.d.ts +0 -10
- package/hooks/usePreconnectLinks.js +0 -30
- package/hooks/usePreconnectLinks.js.map +0 -1
- package/hooks/usePrice.d.ts +0 -41
- package/hooks/usePrice.js +0 -73
- package/hooks/usePrice.js.map +0 -1
- package/hooks/useProductVariants/index.d.ts +0 -1
- package/hooks/useProductVariants/index.js +0 -2
- package/hooks/useProductVariants/index.js.map +0 -1
- package/hooks/useProductVariants/useProductVariants.d.ts +0 -19
- package/hooks/useProductVariants/useProductVariants.js +0 -203
- package/hooks/useProductVariants/useProductVariants.js.map +0 -1
- package/hooks/useProductVariants/useVariantFromUrl.d.ts +0 -5
- package/hooks/useProductVariants/useVariantFromUrl.js +0 -16
- package/hooks/useProductVariants/useVariantFromUrl.js.map +0 -1
- package/hooks/useRoutePreload.d.ts +0 -24
- package/hooks/useRoutePreload.js +0 -40
- package/hooks/useRoutePreload.js.map +0 -1
- package/hooks/useShopConfig.d.ts +0 -1
- package/hooks/useShopConfig.js +0 -11
- package/hooks/useShopConfig.js.map +0 -1
- package/hooks/useThrowErrorInDev.d.ts +0 -1
- package/hooks/useThrowErrorInDev.js +0 -8
- package/hooks/useThrowErrorInDev.js.map +0 -1
- package/hooks/useThunkReducer.d.ts +0 -7
- package/hooks/useThunkReducer.js +0 -24
- package/hooks/useThunkReducer.js.map +0 -1
- package/hooks/useWarningInDev.d.ts +0 -1
- package/hooks/useWarningInDev.js +0 -10
- package/hooks/useWarningInDev.js.map +0 -1
- package/inServer.d.ts +0 -1
- package/inServer.js +0 -3
- package/inServer.js.map +0 -1
- package/index.d.ts +0 -1
- package/index.js +0 -2
- package/index.js.map +0 -1
- package/integrations/addwishSchemaExtension.d.ts +0 -35
- package/integrations/addwishSchemaExtension.js +0 -141
- package/integrations/addwishSchemaExtension.js.map +0 -1
- package/integrations/nostoSchemaExtension.d.ts +0 -5
- package/integrations/nostoSchemaExtension.js +0 -77
- package/integrations/nostoSchemaExtension.js.map +0 -1
- package/integrations/sluggishSchemaExtension.d.ts +0 -2
- package/integrations/sluggishSchemaExtension.js +0 -27
- package/integrations/sluggishSchemaExtension.js.map +0 -1
- package/polyfills.d.ts +0 -1
- package/polyfills.js +0 -38
- package/polyfills.js.map +0 -1
- package/resolvers/filters/boolFilter.d.ts +0 -3
- package/resolvers/filters/boolFilter.js +0 -85
- package/resolvers/filters/boolFilter.js.map +0 -1
- package/resolvers/filters/defaultActiveFilters.d.ts +0 -3
- package/resolvers/filters/defaultActiveFilters.js +0 -9
- package/resolvers/filters/defaultActiveFilters.js.map +0 -1
- package/resolvers/filters/filterParams.d.ts +0 -3
- package/resolvers/filters/filterParams.js +0 -85
- package/resolvers/filters/filterParams.js.map +0 -1
- package/resolvers/filters/filters.d.ts +0 -5
- package/resolvers/filters/filters.js +0 -79
- package/resolvers/filters/filters.js.map +0 -1
- package/resolvers/filters/index.d.ts +0 -27
- package/resolvers/filters/index.js +0 -8
- package/resolvers/filters/index.js.map +0 -1
- package/resolvers/filters/listFilter.d.ts +0 -7
- package/resolvers/filters/listFilter.js +0 -74
- package/resolvers/filters/listFilter.js.map +0 -1
- package/resolvers/filters/listFilterItem.d.ts +0 -3
- package/resolvers/filters/listFilterItem.js +0 -123
- package/resolvers/filters/listFilterItem.js.map +0 -1
- package/resolvers/filters/multiListFilter.d.ts +0 -5
- package/resolvers/filters/multiListFilter.js +0 -196
- package/resolvers/filters/multiListFilter.js.map +0 -1
- package/resolvers/filters/multiListFilterList.d.ts +0 -3
- package/resolvers/filters/multiListFilterList.js +0 -56
- package/resolvers/filters/multiListFilterList.js.map +0 -1
- package/resolvers/filters/rangeFilter.d.ts +0 -5
- package/resolvers/filters/rangeFilter.js +0 -138
- package/resolvers/filters/rangeFilter.js.map +0 -1
- package/resolvers/filters/updateQueryString.d.ts +0 -12
- package/resolvers/filters/updateQueryString.js +0 -117
- package/resolvers/filters/updateQueryString.js.map +0 -1
- package/resolvers/index.d.ts +0 -37
- package/resolvers/index.js +0 -38
- package/resolvers/index.js.map +0 -1
- package/sentry/client.d.ts +0 -1
- package/sentry/client.js +0 -30
- package/sentry/client.js.map +0 -1
- package/sentry/common.d.ts +0 -1
- package/sentry/common.js +0 -5
- package/sentry/common.js.map +0 -1
- package/sentry/server.d.ts +0 -1
- package/sentry/server.js +0 -20
- package/sentry/server.js.map +0 -1
- package/sentry/utils.d.ts +0 -1
- package/sentry/utils.js +0 -2
- package/sentry/utils.js.map +0 -1
- package/server/graphql.d.ts +0 -20
- package/server/graphql.js +0 -119
- package/server/graphql.js.map +0 -1
- package/server/index.d.ts +0 -2
- package/server/index.js +0 -3
- package/server/index.js.map +0 -1
- package/server/tracking/facebook.d.ts +0 -5
- package/server/tracking/facebook.js +0 -148
- package/server/tracking/facebook.js.map +0 -1
- package/server/tracking/middleware.d.ts +0 -8
- package/server/tracking/middleware.js +0 -15
- package/server/tracking/middleware.js.map +0 -1
- package/time.d.ts +0 -1
- package/time.js +0 -6
- package/time.js.map +0 -1
@@ -1,108 +0,0 @@
|
|
1
|
-
import * as React from 'react';
|
2
|
-
import { withRouter } from 'react-router-dom';
|
3
|
-
import qs from 'qs';
|
4
|
-
import SortOrderContext from '@jetshop/core/components/SortOrder/SortOrderContext';
|
5
|
-
import t from '@jetshop/intl';
|
6
|
-
import { pushHistory } from '@jetshop/core/components/Filters/utils/updateHistory';
|
7
|
-
// Temporary sort type mapping until API returns this
|
8
|
-
export const sortTypes = {
|
9
|
-
NAME: 'string',
|
10
|
-
ARTICLE_NUMBER: 'number',
|
11
|
-
PUBLISH_DATE: 'date',
|
12
|
-
PRICE: 'number',
|
13
|
-
SUB_HEADING: 'string',
|
14
|
-
BESTSELLER: 'bestseller',
|
15
|
-
CUSTOM: 'custom'
|
16
|
-
};
|
17
|
-
export const sortValues = {
|
18
|
-
string: [
|
19
|
-
{
|
20
|
-
text: t('A to Z'),
|
21
|
-
direction: 'ASCENDING'
|
22
|
-
},
|
23
|
-
{
|
24
|
-
text: t('Z to A'),
|
25
|
-
direction: 'DESCENDING'
|
26
|
-
}
|
27
|
-
],
|
28
|
-
number: [
|
29
|
-
{
|
30
|
-
text: t('low to high'),
|
31
|
-
direction: 'ASCENDING'
|
32
|
-
},
|
33
|
-
{
|
34
|
-
text: t('high to low'),
|
35
|
-
direction: 'DESCENDING'
|
36
|
-
}
|
37
|
-
],
|
38
|
-
date: [
|
39
|
-
{
|
40
|
-
text: t(''),
|
41
|
-
direction: 'DESCENDING'
|
42
|
-
}
|
43
|
-
],
|
44
|
-
bestseller: [
|
45
|
-
{
|
46
|
-
text: t(''),
|
47
|
-
direction: 'DESCENDING'
|
48
|
-
}
|
49
|
-
],
|
50
|
-
custom: [
|
51
|
-
{
|
52
|
-
text: t(''),
|
53
|
-
direction: 'ASCENDING'
|
54
|
-
}
|
55
|
-
]
|
56
|
-
};
|
57
|
-
export function getSortOrderFromQueryString(search) {
|
58
|
-
const parsedSearch = qs.parse(search, {
|
59
|
-
ignoreQueryPrefix: true
|
60
|
-
});
|
61
|
-
if (Object.keys(parsedSearch).includes('orderBy')) {
|
62
|
-
return {
|
63
|
-
sortOrder: parsedSearch.orderBy,
|
64
|
-
direction: parsedSearch.direction
|
65
|
-
};
|
66
|
-
}
|
67
|
-
}
|
68
|
-
export function updateSortOrderHistory({ value, direction, history, location }) {
|
69
|
-
const currentSearch = qs.parse(window.location.search, { ignoreQueryPrefix: true }) || {};
|
70
|
-
const newSearch = Object.assign(Object.assign({}, currentSearch), { orderBy: value, direction });
|
71
|
-
pushHistory({
|
72
|
-
history,
|
73
|
-
pathname: location.pathname,
|
74
|
-
hash: location.hash,
|
75
|
-
search: newSearch,
|
76
|
-
resetPage: true,
|
77
|
-
routeType: 'sortOrderChange'
|
78
|
-
});
|
79
|
-
}
|
80
|
-
class SortOrderContainer extends React.Component {
|
81
|
-
constructor(props) {
|
82
|
-
super(props);
|
83
|
-
this.onSelect = (value, direction) => {
|
84
|
-
const { location, history } = this.props;
|
85
|
-
updateSortOrderHistory({ location, history, value, direction });
|
86
|
-
this.setState({ sortOrder: value, direction });
|
87
|
-
return true;
|
88
|
-
};
|
89
|
-
this.state = {
|
90
|
-
sortOrder: null,
|
91
|
-
direction: 'DESCENDING',
|
92
|
-
changeSortOrder: this.onSelect
|
93
|
-
};
|
94
|
-
}
|
95
|
-
componentDidMount() {
|
96
|
-
if (this.props.location.search) {
|
97
|
-
const sortOrder = getSortOrderFromQueryString(this.props.location.search);
|
98
|
-
if (sortOrder) {
|
99
|
-
this.setState(sortOrder);
|
100
|
-
}
|
101
|
-
}
|
102
|
-
}
|
103
|
-
render() {
|
104
|
-
return (React.createElement(SortOrderContext.Provider, { value: this.state }, this.props.children(this.state)));
|
105
|
-
}
|
106
|
-
}
|
107
|
-
export default withRouter(SortOrderContainer);
|
108
|
-
//# sourceMappingURL=SortOrderContainer.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"SortOrderContainer.js","sourceRoot":"","sources":["SortOrderContainer.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAuB,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAEnE,OAAO,EAAE,MAAM,IAAI,CAAC;AACpB,OAAO,gBAGN,MAAM,qDAAqD,CAAC;AAC7D,OAAO,CAAC,MAAM,eAAe,CAAC;AAC9B,OAAO,EAAE,WAAW,EAAE,MAAM,sDAAsD,CAAC;AAMnF,qDAAqD;AACrD,MAAM,CAAC,MAAM,SAAS,GAA8B;IAClD,IAAI,EAAE,QAAQ;IACd,cAAc,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,EAAE;gBACb,IAAI,CAAC,QAAQ,CAAC,SAAS,CAAC,CAAC;aAC1B;SACF;IACH,CAAC;IASM,MAAM;QACX,OAAO,CACL,oBAAC,gBAAgB,CAAC,QAAQ,IAAC,KAAK,EAAE,IAAI,CAAC,KAAK,IACzC,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,CACN,CAC7B,CAAC;IACJ,CAAC;CACF;AAED,eAAe,UAAU,CAAC,kBAAkB,CAAC,CAAC"}
|
@@ -1,9 +0,0 @@
|
|
1
|
-
import React from 'react';
|
2
|
-
export declare type Direction = 'ASCENDING' | 'DESCENDING';
|
3
|
-
export interface ISortOrderContext {
|
4
|
-
changeSortOrder: (value: string, direction: Direction) => void;
|
5
|
-
direction: Direction;
|
6
|
-
sortOrder: string;
|
7
|
-
}
|
8
|
-
declare const SortOrderContext: React.Context<ISortOrderContext>;
|
9
|
-
export default SortOrderContext;
|
@@ -1,9 +0,0 @@
|
|
1
|
-
import React from 'react';
|
2
|
-
const initialSortOrderState = {
|
3
|
-
changeSortOrder: () => { },
|
4
|
-
direction: null,
|
5
|
-
sortOrder: null
|
6
|
-
};
|
7
|
-
const SortOrderContext = React.createContext(initialSortOrderState);
|
8
|
-
export default SortOrderContext;
|
9
|
-
//# sourceMappingURL=SortOrderContext.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"SortOrderContext.js","sourceRoot":"","sources":["SortOrderContext.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAU1B,MAAM,qBAAqB,GAAsB;IAC/C,eAAe,EAAE,GAAG,EAAE,GAAE,CAAC;IACzB,SAAS,EAAE,IAAI;IACf,SAAS,EAAE,IAAI;CAChB,CAAC;AAEF,MAAM,gBAAgB,GAAG,KAAK,CAAC,aAAa,CAAC,qBAAqB,CAAC,CAAC;AAEpE,eAAe,gBAAgB,CAAC"}
|
@@ -1,25 +0,0 @@
|
|
1
|
-
import React from 'react';
|
2
|
-
import { StructuredData } from './StructuredData';
|
3
|
-
import ChannelContext from '../ChannelContext';
|
4
|
-
import { useShopConfig } from '../../hooks/useShopConfig';
|
5
|
-
function SiteLinksSearchStructuredData() {
|
6
|
-
const { selectedChannel: { url } } = React.useContext(ChannelContext);
|
7
|
-
const { routes } = useShopConfig();
|
8
|
-
const action = {
|
9
|
-
'@type': 'SearchAction',
|
10
|
-
target: {
|
11
|
-
'@type': 'EntryPoint',
|
12
|
-
urlTemplate: `${url}${routes.search.path}?term={search_term_string}`
|
13
|
-
},
|
14
|
-
'query-input': 'required name=search_term_string'
|
15
|
-
};
|
16
|
-
const data = {
|
17
|
-
'@context': 'https://schema.org',
|
18
|
-
'@type': 'WebSite',
|
19
|
-
url: url,
|
20
|
-
potentialAction: action
|
21
|
-
};
|
22
|
-
return React.createElement(StructuredData, { json: data });
|
23
|
-
}
|
24
|
-
export { SiteLinksSearchStructuredData };
|
25
|
-
//# sourceMappingURL=SiteLinksSearchStructuredData.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"SiteLinksSearchStructuredData.js","sourceRoot":"","sources":["SiteLinksSearchStructuredData.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAElD,OAAO,cAAc,MAAM,mBAAmB,CAAC;AAC/C,OAAO,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAM1D,SAAS,6BAA6B;IACpC,MAAM,EACJ,eAAe,EAAE,EAAE,GAAG,EAAE,EACzB,GAAG,KAAK,CAAC,UAAU,CAAC,cAAc,CAAC,CAAC;IACrC,MAAM,EAAE,MAAM,EAAE,GAAG,aAAa,EAAE,CAAC;IAEnC,MAAM,MAAM,GAAgB;QAC1B,OAAO,EAAE,cAAc;QACvB,MAAM,EAAE;YACN,OAAO,EAAE,YAAY;YACrB,WAAW,EAAE,GAAG,GAAG,GAAG,MAAM,CAAC,MAAM,CAAC,IAAI,4BAA4B;SACrE;QACD,aAAa,EAAE,kCAAkC;KAClD,CAAC;IAEF,MAAM,IAAI,GAAyB;QACjC,UAAU,EAAE,oBAAoB;QAChC,OAAO,EAAE,SAAS;QAClB,GAAG,EAAE,GAAG;QACR,eAAe,EAAE,MAAM;KACxB,CAAC;IAEF,OAAO,oBAAC,cAAc,IAAC,IAAI,EAAE,IAAI,GAAI,CAAC;AACxC,CAAC;AAED,OAAO,EAAE,6BAA6B,EAAE,CAAC"}
|
@@ -1,12 +0,0 @@
|
|
1
|
-
/// <reference types="react" />
|
2
|
-
import { Route } from '../../types';
|
3
|
-
interface Crumb {
|
4
|
-
text: string;
|
5
|
-
path: string | null;
|
6
|
-
}
|
7
|
-
declare function StructuredBreadcrumbData({ parents, breadcrumbText, breadcrumbs }: {
|
8
|
-
breadcrumbs?: Crumb[];
|
9
|
-
parents?: Route[];
|
10
|
-
breadcrumbText?: string;
|
11
|
-
}): JSX.Element;
|
12
|
-
export { StructuredBreadcrumbData };
|
@@ -1,55 +0,0 @@
|
|
1
|
-
import React, { useContext } from 'react';
|
2
|
-
import ChannelContext from '../ChannelContext';
|
3
|
-
import { StructuredData } from './StructuredData';
|
4
|
-
function StructuredBreadcrumbData({ parents, breadcrumbText, breadcrumbs }) {
|
5
|
-
const { selectedChannel } = useContext(ChannelContext);
|
6
|
-
if (breadcrumbs) {
|
7
|
-
const data = {
|
8
|
-
'@context': 'https://schema.org',
|
9
|
-
'@type': 'BreadcrumbList',
|
10
|
-
itemListElement: breadcrumbs
|
11
|
-
.filter((crumb) => crumb.text)
|
12
|
-
.map((crumb, index) => ({
|
13
|
-
'@type': 'ListItem',
|
14
|
-
position: index + 1,
|
15
|
-
name: crumb.text,
|
16
|
-
item: crumb.path ? `${selectedChannel.url}${crumb.path}` : undefined
|
17
|
-
}))
|
18
|
-
};
|
19
|
-
return React.createElement(StructuredData, { json: data });
|
20
|
-
}
|
21
|
-
else {
|
22
|
-
// Deprecated, remove in next major
|
23
|
-
let mappedParents = [];
|
24
|
-
if (parents && parents.length > 0) {
|
25
|
-
mappedParents = parents
|
26
|
-
.filter((parent) => { var _a; return (_a = parent.object) === null || _a === void 0 ? void 0 : _a.breadcrumbText; })
|
27
|
-
.map((parent, index) => {
|
28
|
-
return {
|
29
|
-
'@type': 'ListItem',
|
30
|
-
position: parents.length - index,
|
31
|
-
name: parent.object.breadcrumbText.toString(),
|
32
|
-
item: `${selectedChannel.url}${parent.path}`
|
33
|
-
};
|
34
|
-
});
|
35
|
-
mappedParents.reverse();
|
36
|
-
const data = {
|
37
|
-
'@context': 'https://schema.org',
|
38
|
-
'@type': 'BreadcrumbList',
|
39
|
-
itemListElement: [
|
40
|
-
...mappedParents,
|
41
|
-
{
|
42
|
-
'@type': 'ListItem',
|
43
|
-
position: parents.length + 1,
|
44
|
-
name: breadcrumbText.toString()
|
45
|
-
}
|
46
|
-
]
|
47
|
-
};
|
48
|
-
return React.createElement(StructuredData, { json: data });
|
49
|
-
}
|
50
|
-
else
|
51
|
-
return null;
|
52
|
-
}
|
53
|
-
}
|
54
|
-
export { StructuredBreadcrumbData };
|
55
|
-
//# sourceMappingURL=StructuredBreadcrumbData.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"StructuredBreadcrumbData.js","sourceRoot":"","sources":["StructuredBreadcrumbData.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AAE1C,OAAO,cAAc,MAAM,mBAAmB,CAAC;AAC/C,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAOlD,SAAS,wBAAwB,CAAC,EAChC,OAAO,EACP,cAAc,EACd,WAAW,EAKZ;IACC,MAAM,EAAE,eAAe,EAAE,GAAG,UAAU,CAAC,cAAc,CAAC,CAAC;IAEvD,IAAI,WAAW,EAAE;QACf,MAAM,IAAI,GAAgC;YACxC,UAAU,EAAE,oBAAoB;YAChC,OAAO,EAA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Aa;oBAChB;wBACE,OAAO,EAAE,UAAU;wBACnB,QAAQ,EAAE,OAAO,CAAC,MAAM,GAAG,CAAC;wBAC5B,IAAI,EAAE,cAAc,CAAC,QAAQ,EAAE;qBAChC;iBACF;aACF,CAAC;YACF,OAAO,oBAAC,cAAc,IAAC,IAAI,EAAE,IAAI,GAAI,CAAC;SACvC;;YAAM,OAAO,IAAI,CAAC;KACpB;AACH,CAAC;AAED,OAAO,EAAE,wBAAwB,EAAE,CAAC"}
|
@@ -1,16 +0,0 @@
|
|
1
|
-
import { Category } from '@jetshop/core/types';
|
2
|
-
import React from 'react';
|
3
|
-
import { CollectionPage } from 'schema-dts';
|
4
|
-
export interface StructuredCategoryDataProps {
|
5
|
-
/** The category object */
|
6
|
-
category: Category;
|
7
|
-
/**
|
8
|
-
* Optional object containing extra fields. These will be merged with the
|
9
|
-
* default fields. Full list of fields available at
|
10
|
-
* @url https://schema.org/Product
|
11
|
-
*/
|
12
|
-
extraFields?: Partial<CollectionPage>;
|
13
|
-
}
|
14
|
-
/** Renders structured product data using Schema.org vocab */
|
15
|
-
declare const StructuredCategoryData: React.FC<StructuredCategoryDataProps>;
|
16
|
-
export { StructuredCategoryData };
|
@@ -1,18 +0,0 @@
|
|
1
|
-
import React from 'react';
|
2
|
-
import { StructuredData } from './StructuredData';
|
3
|
-
/** Renders structured product data using Schema.org vocab */
|
4
|
-
const StructuredCategoryData = ({ category, extraFields = {} }) => {
|
5
|
-
var _a, _b, _c, _d;
|
6
|
-
const baseCollectionPageData = {
|
7
|
-
'@context': 'https://schema.org',
|
8
|
-
'@type': 'CollectionPage',
|
9
|
-
name: category.name,
|
10
|
-
description: category.content,
|
11
|
-
primaryImageOfPage: (_b = (_a = category.images) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.url,
|
12
|
-
image: (_d = (_c = category.images) === null || _c === void 0 ? void 0 : _c[0]) === null || _d === void 0 ? void 0 : _d.url
|
13
|
-
};
|
14
|
-
const withInjectedCategoryData = Object.assign(Object.assign({}, baseCollectionPageData), extraFields);
|
15
|
-
return React.createElement(StructuredData, { json: withInjectedCategoryData });
|
16
|
-
};
|
17
|
-
export { StructuredCategoryData };
|
18
|
-
//# sourceMappingURL=StructuredCategoryData.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"StructuredCategoryData.js","sourceRoot":"","sources":["StructuredCategoryData.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAalD,6DAA6D;AAC7D,MAAM,sBAAsB,GAA0C,CAAC,EACrE,QAAQ,EACR,WAAW,GAAG,EAAE,EACjB,EAAE,EAAE;;IACH,MAAM,sBAAsB,GAAgC;QAC1D,UAAU,EAAE,oBAAoB;QAChC,OAAO,EAAE,gBAAgB;QACzB,IAAI,EAAE,QAAQ,CAAC,IAAI;QACnB,WAAW,EAAE,QAAQ,CAAC,OAAO;QAC7B,kBAAkB,EAAE,MAAA,MAAA,QAAQ,CAAC,MAAM,0CAAG,CAAC,CAAC,0CAAE,GAAG;QAC7C,KAAK,EAAE,MAAA,MAAA,QAAQ,CAAC,MAAM,0CAAG,CAAC,CAAC,0CAAE,GAAG;KACjC,CAAC;IACF,MAAM,wBAAwB,mCACzB,sBAAsB,GACrB,WAA8B,CACnC,CAAC;IAEF,OAAO,oBAAC,cAAc,IAAC,IAAI,EAAE,wBAAwB,GAAI,CAAC;AAC5D,CAAC,CAAC;AAEF,OAAO,EAAE,sBAAsB,EAAE,CAAC"}
|
@@ -1,9 +0,0 @@
|
|
1
|
-
import React from 'react';
|
2
|
-
import { Thing } from 'schema-dts';
|
3
|
-
interface StructuredDataProps {
|
4
|
-
/** A json-ld representation of the Thing you would like to embed.
|
5
|
-
* See: @url https://schema.org/Thing#subtypes */
|
6
|
-
json: Thing;
|
7
|
-
}
|
8
|
-
export declare const StructuredData: React.FC<StructuredDataProps>;
|
9
|
-
export {};
|
@@ -1,7 +0,0 @@
|
|
1
|
-
import React from 'react';
|
2
|
-
export const StructuredData = ({ json }) => {
|
3
|
-
return (React.createElement("script", { "data-testid": "structured-data", type: "application/ld+json", dangerouslySetInnerHTML: {
|
4
|
-
__html: JSON.stringify(json)
|
5
|
-
} }));
|
6
|
-
};
|
7
|
-
//# sourceMappingURL=StructuredData.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"StructuredData.js","sourceRoot":"","sources":["StructuredData.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAS1B,MAAM,CAAC,MAAM,cAAc,GAAkC,CAAC,EAAE,IAAI,EAAE,EAAE,EAAE;IACxE,OAAO,CACL,+CACc,iBAAiB,EAC7B,IAAI,EAAC,qBAAqB,EAC1B,uBAAuB,EAAE;YACvB,MAAM,EAAE,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC;SAC7B,GACD,CACH,CAAC;AACJ,CAAC,CAAC"}
|
@@ -1,16 +0,0 @@
|
|
1
|
-
import { Page } from '@jetshop/core/types';
|
2
|
-
import React from 'react';
|
3
|
-
import { WebPage } from 'schema-dts';
|
4
|
-
export interface StructuredPageDataProps {
|
5
|
-
/** The page object */
|
6
|
-
page: Page;
|
7
|
-
/**
|
8
|
-
* Optional object containing extra fields. These will be merged with the
|
9
|
-
* default fields. Full list of fields available at
|
10
|
-
* @url https://schema.org/Product
|
11
|
-
*/
|
12
|
-
extraFields?: Partial<WebPage>;
|
13
|
-
}
|
14
|
-
/** Renders structured product data using Schema.org vocab */
|
15
|
-
declare const StructuredPageData: React.FC<StructuredPageDataProps>;
|
16
|
-
export { StructuredPageData };
|
@@ -1,17 +0,0 @@
|
|
1
|
-
import React from 'react';
|
2
|
-
import { StructuredData } from './StructuredData';
|
3
|
-
/** Renders structured product data using Schema.org vocab */
|
4
|
-
const StructuredPageData = ({ page, extraFields = {} }) => {
|
5
|
-
var _a, _b, _c, _d;
|
6
|
-
const baseWebPageData = {
|
7
|
-
'@context': 'https://schema.org',
|
8
|
-
'@type': 'WebPage',
|
9
|
-
name: page.name,
|
10
|
-
primaryImageOfPage: (_b = (_a = page.images) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.url,
|
11
|
-
image: (_d = (_c = page.images) === null || _c === void 0 ? void 0 : _c[0]) === null || _d === void 0 ? void 0 : _d.url
|
12
|
-
};
|
13
|
-
const withInjectedPageData = Object.assign(Object.assign({}, baseWebPageData), extraFields);
|
14
|
-
return React.createElement(StructuredData, { json: withInjectedPageData });
|
15
|
-
};
|
16
|
-
export { StructuredPageData };
|
17
|
-
//# sourceMappingURL=StructuredPageData.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"StructuredPageData.js","sourceRoot":"","sources":["StructuredPageData.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAalD,6DAA6D;AAC7D,MAAM,kBAAkB,GAAsC,CAAC,EAC7D,IAAI,EACJ,WAAW,GAAG,EAAE,EACjB,EAAE,EAAE;;IACH,MAAM,eAAe,GAAyB;QAC5C,UAAU,EAAE,oBAAoB;QAChC,OAAO,EAAE,SAAS;QAClB,IAAI,EAAE,IAAI,CAAC,IAAI;QACf,kBAAkB,EAAE,MAAA,MAAA,IAAI,CAAC,MAAM,0CAAG,CAAC,CAAC,0CAAE,GAAG;QACzC,KAAK,EAAE,MAAA,MAAA,IAAI,CAAC,MAAM,0CAAG,CAAC,CAAC,0CAAE,GAAG;KAC7B,CAAC;IACF,MAAM,oBAAoB,mCACrB,eAAe,GACd,WAAuB,CAC5B,CAAC;IAEF,OAAO,oBAAC,cAAc,IAAC,IAAI,EAAE,oBAAoB,GAAI,CAAC;AACxD,CAAC,CAAC;AAEF,OAAO,EAAE,kBAAkB,EAAE,CAAC"}
|
@@ -1,18 +0,0 @@
|
|
1
|
-
import { Product as FlightProduct, ProductVariantOption } from '@jetshop/core/types';
|
2
|
-
import React from 'react';
|
3
|
-
import { Product } from 'schema-dts';
|
4
|
-
export interface StructuredProductDataProps {
|
5
|
-
/** The product object */
|
6
|
-
product: FlightProduct;
|
7
|
-
/** Optional pre-selected variant */
|
8
|
-
initialVariant?: ProductVariantOption;
|
9
|
-
/**
|
10
|
-
* Optional object containing extra fields. These will be merged with the
|
11
|
-
* default fields. Full list of fields available at
|
12
|
-
* @url https://schema.org/Product
|
13
|
-
*/
|
14
|
-
extraFields?: Partial<Product>;
|
15
|
-
}
|
16
|
-
/** Renders structured product data using Schema.org vocab */
|
17
|
-
declare const StructuredProductData: React.FC<StructuredProductDataProps>;
|
18
|
-
export { StructuredProductData };
|
@@ -1,43 +0,0 @@
|
|
1
|
-
import React from 'react';
|
2
|
-
import ChannelContext from '../ChannelContext';
|
3
|
-
import { StructuredData } from './StructuredData';
|
4
|
-
import { useProductVariants } from '../../hooks/useProductVariants';
|
5
|
-
/** Renders structured product data using Schema.org vocab */
|
6
|
-
const StructuredProductData = ({ product, initialVariant, extraFields = {} }) => {
|
7
|
-
var _a, _b, _c, _d, _e, _f;
|
8
|
-
const { selectedChannel: { currency, url } } = React.useContext(ChannelContext);
|
9
|
-
const { selectedVariant: variant } = useProductVariants(product, {
|
10
|
-
initialVariant
|
11
|
-
});
|
12
|
-
let baseProductData = {
|
13
|
-
'@context': 'https://schema.org',
|
14
|
-
'@type': 'Product',
|
15
|
-
name: product.name,
|
16
|
-
description: (product === null || product === void 0 ? void 0 : product.description) || (product === null || product === void 0 ? void 0 : product.shortDescription),
|
17
|
-
image: (product.images || []).map((image) => image.url),
|
18
|
-
mpn: (product === null || product === void 0 ? void 0 : product.barcode) || product.articleNumber,
|
19
|
-
sku: product.articleNumber,
|
20
|
-
productID: product.articleNumber,
|
21
|
-
category: (_a = product.canonicalCategory) === null || _a === void 0 ? void 0 : _a.name,
|
22
|
-
offers: {
|
23
|
-
'@type': 'Offer',
|
24
|
-
priceCurrency: currency.format.code,
|
25
|
-
price: (_b = product.price) === null || _b === void 0 ? void 0 : _b.incVat,
|
26
|
-
url: url + ((_c = product.primaryRoute) === null || _c === void 0 ? void 0 : _c.path),
|
27
|
-
availability: (((_d = product.stockStatus) === null || _d === void 0 ? void 0 : _d.buyable)
|
28
|
-
? 'http://schema.org/InStock'
|
29
|
-
: 'http://schema.org/OutOfStock')
|
30
|
-
}
|
31
|
-
};
|
32
|
-
if (variant) {
|
33
|
-
baseProductData = Object.assign(Object.assign({}, baseProductData), { image: (variant === null || variant === void 0 ? void 0 : variant.images.length)
|
34
|
-
? variant.images.map((image) => image.url)
|
35
|
-
: baseProductData.image, sku: (variant === null || variant === void 0 ? void 0 : variant.articleNumber) || baseProductData.sku, mpn: (variant === null || variant === void 0 ? void 0 : variant.barcode) || (variant === null || variant === void 0 ? void 0 : variant.articleNumber), offers: Object.assign(Object.assign({}, baseProductData.offers), { price: (_e = variant === null || variant === void 0 ? void 0 : variant.price) === null || _e === void 0 ? void 0 : _e.incVat, availability: (((_f = variant.stockStatus) === null || _f === void 0 ? void 0 : _f.buyable)
|
36
|
-
? 'http://schema.org/InStock'
|
37
|
-
: 'http://schema.org/OutOfStock') }) });
|
38
|
-
}
|
39
|
-
const withInjectedProductData = Object.assign(Object.assign({}, baseProductData), extraFields);
|
40
|
-
return React.createElement(StructuredData, { json: withInjectedProductData });
|
41
|
-
};
|
42
|
-
export { StructuredProductData };
|
43
|
-
//# sourceMappingURL=StructuredProductData.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"StructuredProductData.js","sourceRoot":"","sources":["StructuredProductData.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,cAAc,MAAM,mBAAmB,CAAC;AAE/C,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAE,kBAAkB,EAAE,MAAM,gCAAgC,CAAC;AAepE,6DAA6D;AAC7D,MAAM,qBA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C,8BAA8B,CAA0C;SAC7E;KACF,CAAC;IAEF,IAAI,OAAO,EAAE;QACX,eAAe,mCACV,eAAe,KAClB,KAAK,EAAE,CAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,MAAM,CAAC,MAAM;gBAC3B,CAAC,CAAC,OAAO,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,GAAG,CAAC;gBAC1C,CAAC,CAAC,eAAe,CAAC,KAAK,EACzB,GAAG,EAAE,CAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,aAAa,KAAI,eAAe,CAAC,GAAG,EAClD,GAAG,EAAE,CAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,OAAO,MAAI,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,aAAa,CAAA,EAC/C,MAAM,kCACA,eAAe,CAAC,MAAgB,KACpC,KAAK,EAAE,MAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,KAAK,0CAAE,MAAM,EAC7B,YAAY,EAAE,CAAC,CAAA,MAAA,OAAO,CAAC,WAAW,0CAAE,OAAO;oBACzC,CAAC,CAAC,2BAA2B;oBAC7B,CAAC,CAAC,8BAA8B,CAA0C,MAE/E,CAAC;KACH;IAED,MAAM,uBAAuB,mCACxB,eAAe,GACd,WAAuB,CAC5B,CAAC;IAEF,OAAO,oBAAC,cAAc,IAAC,IAAI,EAAE,uBAAuB,GAAI,CAAC;AAC3D,CAAC,CAAC;AAEF,OAAO,EAAE,qBAAqB,EAAE,CAAC"}
|
@@ -1,5 +0,0 @@
|
|
1
|
-
export { StructuredData } from './StructuredData';
|
2
|
-
export { StructuredProductData } from './StructuredProductData';
|
3
|
-
export { SiteLinksSearchStructuredData } from './SiteLinksSearchStructuredData';
|
4
|
-
export { StructuredCategoryData } from './StructuredCategoryData';
|
5
|
-
export { StructuredPageData } from './StructuredPageData';
|
@@ -1,6 +0,0 @@
|
|
1
|
-
export { StructuredData } from './StructuredData';
|
2
|
-
export { StructuredProductData } from './StructuredProductData';
|
3
|
-
export { SiteLinksSearchStructuredData } from './SiteLinksSearchStructuredData';
|
4
|
-
export { StructuredCategoryData } from './StructuredCategoryData';
|
5
|
-
export { StructuredPageData } from './StructuredPageData';
|
6
|
-
//# sourceMappingURL=index.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AAChE,OAAO,EAAE,6BAA6B,EAAE,MAAM,iCAAiC,CAAC;AAChF,OAAO,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAC;AAClE,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC"}
|
package/data/cache.d.ts
DELETED
package/data/cache.js
DELETED
@@ -1,21 +0,0 @@
|
|
1
|
-
import { InMemoryCache, IntrospectionFragmentMatcher } from 'apollo-cache-inmemory';
|
2
|
-
import { toIdValue } from 'apollo-utilities';
|
3
|
-
import fragmentTypes from './fragmentTypes';
|
4
|
-
const createCache = () => new InMemoryCache({
|
5
|
-
freezeResults: true,
|
6
|
-
fragmentMatcher: new IntrospectionFragmentMatcher({
|
7
|
-
introspectionQueryResultData: {
|
8
|
-
__schema: {
|
9
|
-
types: fragmentTypes
|
10
|
-
}
|
11
|
-
}
|
12
|
-
}),
|
13
|
-
cacheRedirects: {
|
14
|
-
Query: {
|
15
|
-
product: (_, args) => toIdValue(`Product:${args.id}`),
|
16
|
-
category: (_, args) => toIdValue(`Category:${args.id}`)
|
17
|
-
}
|
18
|
-
}
|
19
|
-
});
|
20
|
-
export default createCache;
|
21
|
-
//# sourceMappingURL=cache.js.map
|
package/data/cache.js.map
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"cache.js","sourceRoot":"","sources":["cache.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,aAAa,EACb,4BAA4B,EAC7B,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAC7C,OAAO,aAAa,MAAM,iBAAiB,CAAC;AAE5C,MAAM,WAAW,GAAG,GAAG,EAAE,CACvB,IAAI,aAAa,CAAC;IAChB,aAAa,EAAE,IAAI;IACnB,eAAe,EAAE,IAAI,4BAA4B,CAAC;QAChD,4BAA4B,EAAE;YAC5B,QAAQ,EAAE;gBACR,KAAK,EAAE,aAAa;aACrB;SACF;KACF,CAAC;IACF,cAAc,EAAE;QACd,KAAK,EAAE;YACL,OAAO,EAAE,CAAC,CAAC,EAAE,IAAI,EAAE,EAAE,CAAC,SAAS,CAAC,WAAW,IAAI,CAAC,EAAE,EAAE,CAAC;YACrD,QAAQ,EAAE,CAAC,CAAC,EAAE,IAAI,EAAE,EAAE,CAAC,SAAS,CAAC,YAAY,IAAI,CAAC,EAAE,EAAE,CAAC;SACxD;KACF;CACF,CAAC,CAAC;AAEL,eAAe,WAAW,CAAC"}
|
package/data/fragmentTypes.d.ts
DELETED
package/data/fragmentTypes.js
DELETED
@@ -1,84 +0,0 @@
|
|
1
|
-
export default [
|
2
|
-
{
|
3
|
-
kind: 'UNION',
|
4
|
-
name: 'StartPageItemObjectGraphType',
|
5
|
-
possibleTypes: [
|
6
|
-
{
|
7
|
-
name: 'Product'
|
8
|
-
},
|
9
|
-
{
|
10
|
-
name: 'CustomItem'
|
11
|
-
}
|
12
|
-
]
|
13
|
-
},
|
14
|
-
{
|
15
|
-
kind: 'INTERFACE',
|
16
|
-
name: 'Filter',
|
17
|
-
possibleTypes: [
|
18
|
-
{
|
19
|
-
name: 'ListFilter'
|
20
|
-
},
|
21
|
-
{
|
22
|
-
name: 'NumericRangeFilter'
|
23
|
-
},
|
24
|
-
{
|
25
|
-
name: 'BooleanFilter'
|
26
|
-
},
|
27
|
-
{
|
28
|
-
name: 'MultiListFilter'
|
29
|
-
}
|
30
|
-
]
|
31
|
-
},
|
32
|
-
{
|
33
|
-
kind: 'INTERFACE',
|
34
|
-
name: 'Document',
|
35
|
-
possibleTypes: [
|
36
|
-
{
|
37
|
-
name: 'Category'
|
38
|
-
},
|
39
|
-
{
|
40
|
-
name: 'Product'
|
41
|
-
},
|
42
|
-
{
|
43
|
-
name: 'StartPage'
|
44
|
-
},
|
45
|
-
{
|
46
|
-
name: 'Page'
|
47
|
-
}
|
48
|
-
]
|
49
|
-
},
|
50
|
-
{
|
51
|
-
kind: 'INTERFACE',
|
52
|
-
name: 'CustomField',
|
53
|
-
possibleTypes: [
|
54
|
-
{
|
55
|
-
name: 'CustomStringField'
|
56
|
-
},
|
57
|
-
{
|
58
|
-
name: 'CustomBoolField'
|
59
|
-
},
|
60
|
-
{
|
61
|
-
name: 'CustomHtmlField'
|
62
|
-
},
|
63
|
-
{
|
64
|
-
name: 'CustomListField'
|
65
|
-
},
|
66
|
-
{
|
67
|
-
name: 'CustomMultiLevelListField'
|
68
|
-
}
|
69
|
-
]
|
70
|
-
},
|
71
|
-
{
|
72
|
-
kind: 'INTERFACE',
|
73
|
-
name: 'Customer',
|
74
|
-
possibleTypes: [
|
75
|
-
{
|
76
|
-
name: 'PrivateCustomer'
|
77
|
-
},
|
78
|
-
{
|
79
|
-
name: 'BusinessCustomer'
|
80
|
-
}
|
81
|
-
]
|
82
|
-
}
|
83
|
-
];
|
84
|
-
//# sourceMappingURL=fragmentTypes.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"fragmentTypes.js","sourceRoot":"","sources":["fragmentTypes.ts"],"names":[],"mappings":"AAAA,eAAe;IACb;QACE,IAAI,EAAE,OAAO;QACb,IAAI,EAAE,8BAA8B;QACpC,aAAa,EAAE;YACb;gBACE,IAAI,EAAE,SAAS;aAChB;YACD;gBACE,IAAI,EAAE,YAAY;aACnB;SACF;KACF;IACD;QACE,IAAI,EAAE,WAAW;QACjB,IAAI,EAAE,QAAQ;QACd,aAAa,EAAE;YACb;gBACE,IAAI,EAAE,YAAY;aACnB;YACD;gBACE,IAAI,EAAE,oBAAoB;aAC3B;YACD;gBACE,IAAI,EAAE,eAAe;aACtB;YACD;gBACE,IAAI,EAAE,iBAAiB;aACxB;SACF;KACF;IACD;QACE,IAAI,EAAE,WAAW;QACjB,IAAI,EAAE,UAAU;QAChB,aAAa,EAAE;YACb;gBACE,IAAI,EAAE,UAAU;aACjB;YACD;gBACE,IAAI,EAAE,SAAS;aAChB;YACD;gBACE,IAAI,EAAE,WAAW;aAClB;YACD;gBACE,IAAI,EAAE,MAAM;aACb;SACF;KACF;IACD;QACE,IAAI,EAAE,WAAW;QACjB,IAAI,EAAE,aAAa;QACnB,aAAa,EAAE;YACb;gBACE,IAAI,EAAE,mBAAmB;aAC1B;YACD;gBACE,IAAI,EAAE,iBAAiB;aACxB;YACD;gBACE,IAAI,EAAE,iBAAiB;aACxB;YACD;gBACE,IAAI,EAAE,iBAAiB;aACxB;YACD;gBACE,IAAI,EAAE,2BAA2B;aAClC;SACF;KACF;IACD;QACE,IAAI,EAAE,WAAW;QACjB,IAAI,EAAE,UAAU;QAChB,aAAa,EAAE;YACb;gBACE,IAAI,EAAE,iBAAiB;aACxB;YACD;gBACE,IAAI,EAAE,kBAAkB;aACzB;SACF;KACF;CACF,CAAC"}
|
@@ -1 +0,0 @@
|
|
1
|
-
export { default as ProductConfigurationsFragment } from './ProductConfigurationsFragment.gql';
|
package/data/fragments/index.js
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,6BAA6B,EAAE,MAAM,qCAAqC,CAAC"}
|
@@ -1,12 +0,0 @@
|
|
1
|
-
import * as Sentry from '@sentry/browser';
|
2
|
-
import { convertAnyToError } from './errorReporting.shared';
|
3
|
-
export default (error, extra = {}) => {
|
4
|
-
Sentry.withScope(scope => {
|
5
|
-
// https://github.com/getsentry/sentry-javascript/issues/1607#issuecomment-425974249
|
6
|
-
Object.keys(extra).forEach(key => {
|
7
|
-
scope.setExtra(key, extra[key]);
|
8
|
-
});
|
9
|
-
Sentry.captureException(convertAnyToError(error));
|
10
|
-
});
|
11
|
-
};
|
12
|
-
//# sourceMappingURL=errorReporting.browser.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"errorReporting.browser.js","sourceRoot":"","sources":["errorReporting.browser.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,MAAM,iBAAiB,CAAC;AAC1C,OAAO,EAAU,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AAEpE,eAAe,CAAC,KAAY,EAAE,QAAgB,EAAE,EAAE,EAAE;IAClD,MAAM,CAAC,SAAS,CAAC,KAAK,CAAC,EAAE;QACvB,oFAAoF;QACpF,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,OAAO,CAAC,GAAG,CAAC,EAAE;YAC/B,KAAK,CAAC,QAAQ,CAAC,GAAG,EAAE,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC;QAClC,CAAC,CAAC,CAAC;QACH,MAAM,CAAC,gBAAgB,CAAC,iBAAiB,CAAC,KAAK,CAAC,CAAC,CAAC;IACpD,CAAC,CAAC,CAAC;AACL,CAAC,CAAC"}
|
package/errorReporting.d.ts
DELETED
package/errorReporting.js
DELETED
@@ -1,20 +0,0 @@
|
|
1
|
-
/*
|
2
|
-
Import Sentry's node or browser moudule depending on env
|
3
|
-
|
4
|
-
Use process.env.BUILD_TARGET over @jetshop/core/inServer.
|
5
|
-
|
6
|
-
When using `process.env.*` this is evaluated at compile time & only one
|
7
|
-
of the lines will transpiled into the final code.
|
8
|
-
*/
|
9
|
-
function errorReporting(error, extra) {
|
10
|
-
let report;
|
11
|
-
if (__IN_SERVER__) {
|
12
|
-
report = require('./errorReporting.server').default;
|
13
|
-
}
|
14
|
-
else {
|
15
|
-
report = require('./errorReporting.browser').default;
|
16
|
-
}
|
17
|
-
return report(error, extra);
|
18
|
-
}
|
19
|
-
export default errorReporting;
|
20
|
-
//# sourceMappingURL=errorReporting.js.map
|