@jetshop/core 5.16.1 → 5.17.0-alpha.b238da57

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (55) hide show
  1. package/ChannelHandler/redirectUtils.d.ts +1 -1
  2. package/analytics/Analytics.d.ts +3 -3
  3. package/analytics/Analytics.js.map +1 -1
  4. package/analytics/AnalyticsProvider.d.ts +2 -2
  5. package/analytics/trackerRegistry.d.ts +2 -2
  6. package/analytics/utils/script.d.ts +1 -1
  7. package/boot/server/IntervalQuery.d.ts +1 -1
  8. package/boot/server/breakpointMiddleware.d.ts +1 -1
  9. package/boot/server/createApolloServer.d.ts +2 -2
  10. package/boot/server/persistedQueries/PersistedClient.d.ts +3 -3
  11. package/cart/AddToCartFormik.d.ts +2 -2
  12. package/cart/useAddToCart.d.ts +3 -3
  13. package/components/Auth/CustomerUpdateForm.d.ts +1 -1
  14. package/components/Auth/ForgotPasswordProvider.d.ts +2 -2
  15. package/components/Auth/ResetPasswordProvider.d.ts +2 -2
  16. package/components/Auth/SSNLookupContainer.d.ts +1 -1
  17. package/components/Auth/SignupFormContainer.d.ts +1 -1
  18. package/components/Auth/UpdatePasswordForm.d.ts +1 -1
  19. package/components/Auth/formatSignupInput.d.ts +1 -1
  20. package/components/Auth/signup-context.d.ts +1 -1
  21. package/components/Auth/useCustomer.d.ts +1 -1
  22. package/components/DynamicRoute/CategoryRoute.js.map +1 -1
  23. package/components/DynamicRoute/ProductRoute.js.map +1 -1
  24. package/components/DynamicRoute/RouteResolver.d.ts +1 -1
  25. package/components/DynamicRoute/index.d.ts +1 -1
  26. package/components/Fonts/CustomFont.d.ts +1 -1
  27. package/components/Fonts/GoogleFont.d.ts +1 -1
  28. package/components/Fonts/TypekitFont.d.ts +1 -1
  29. package/components/Fonts/injectFont.d.ts +2 -2
  30. package/components/Fonts/injectFont.js +4 -4
  31. package/components/Fonts/injectFont.js.map +1 -1
  32. package/components/Mutation/RemoveFromCart.d.ts +1 -1
  33. package/components/Notifications/notificationMachine.d.ts +1 -1
  34. package/components/Notifications/notificationsMachine.d.ts +3 -3
  35. package/components/Notifications/useNotification.d.ts +1 -1
  36. package/components/OpenGraph/OpenGraphGeneralPageData.d.ts +1 -1
  37. package/components/Pagination/PaginationProvider.d.ts +1 -1
  38. package/components/SortOrder/SortOrderContext.d.ts +1 -1
  39. package/errorReporting.shared.d.ts +1 -1
  40. package/global.d.ts +26 -2
  41. package/helpers/getHeaders.d.ts +1 -1
  42. package/hooks/PackageProducts/usePackageProductItem.d.ts +1 -1
  43. package/hooks/ProductList/index.d.ts +10 -10
  44. package/hooks/ProductList/product-list-reducer.d.ts +1 -1
  45. package/hooks/useAddMultipleToCart.d.ts +3 -3
  46. package/hooks/useDeleteAccountMutation.d.ts +1 -1
  47. package/hooks/usePreconnectLinks.d.ts +1 -1
  48. package/hooks/usePreconnectLinks.js +1 -1
  49. package/hooks/usePreconnectLinks.js.map +1 -1
  50. package/hooks/useProductVariants/useProductVariants.d.ts +1 -1
  51. package/hooks/useThunkReducer.d.ts +1 -1
  52. package/package.json +2 -2
  53. package/resolvers/index.d.ts +1 -1
  54. package/server/graphql.js +6 -7
  55. package/server/graphql.js.map +1 -1
@@ -1,4 +1,4 @@
1
1
  import ApolloClient from 'apollo-client';
2
2
  import { SelectedChannel } from '../components/ChannelContext/ChannelContext';
3
- export declare type GetPrimaryRoutePath = (path: string, newChannel: SelectedChannel, setSelectedChannel: (selectedChannel: SelectedChannel) => void) => Promise<string>;
3
+ export type GetPrimaryRoutePath = (path: string, newChannel: SelectedChannel, setSelectedChannel: (selectedChannel: SelectedChannel) => void) => Promise<string>;
4
4
  export declare function primaryRouteForPathFetcher(client: ApolloClient<any>): GetPrimaryRoutePath;
@@ -5,14 +5,14 @@ export interface TrackingEvent {
5
5
  payload?: any;
6
6
  id: string;
7
7
  }
8
- export declare type TrackingCallback = (context: TrackingFunctionContext) => void;
9
- export declare type LegacyTrackingFunction = (cb: TrackingCallback) => void;
8
+ export type TrackingCallback = (context: TrackingFunctionContext) => void;
9
+ export type LegacyTrackingFunction = (cb: TrackingCallback) => void;
10
10
  export interface AnalyticsProps {
11
11
  children?: (track: LegacyTrackingFunction) => React.ReactNode;
12
12
  event?: TrackingEvent;
13
13
  }
14
14
  declare function Analytics(props: AnalyticsProps): any;
15
- export declare type TrackingFunction = (event: TrackingEvent) => void;
15
+ export type TrackingFunction = (event: TrackingEvent) => void;
16
16
  declare function useTracker(): TrackingFunction;
17
17
  export default Analytics;
18
18
  export { useTracker };
@@ -1 +1 @@
1
- {"version":3,"file":"Analytics.js","sourceRoot":"","sources":["Analytics.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,2CAA2C,CAAC;AAE7E,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AACnE,OAAO,eAAe,MAAM,4BAA4B,CAAC;AACzD,OAAO,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAe3C,SAAS,SAAS,CAAC,KAAqB;IACtC,MAAM,KAAK,GAAG,UAAU,EAAE,CAAC;IAE3B,SAAS,CAAC,GAAG,EAAE;QACb,IAAI,KAAK,CAAC,KAAK,EAAE;YACf,KAAK,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;SACpB;QAED,mBAAmB;QACnB,wEAAwE;QACxE,sEAAsE;QACtE,2EAA2E;QAC3E,2EAA2E;QAC3E,yEAAyE;QACzE,6DAA6D;QAE7D,2BAA2B;IAC7B,CAAC,EAAE,CAAC,KAAK,CAAC,CAAC,CAAC;IAEZ,IAAI,CAAC,KAAK,CAAC,QAAQ;QAAE,OAAO,IAAI,CAAC;IAEjC,OAAO,KAAK,CAAC,QAAQ,CAAC;AACxB,CAAC;AAID,SAAS,UAAU;IACjB,MAAM,EAAE,eAAe,EAAE,MAAM,EAAE,GAAG,UAAU,CAAC,gBAAgB,CAAC,CAAC;IACjE,MAAM,QAAQ,GAAG,WA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,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,QAAQ,EAAE,CAAA,CAAC;gBACzC,OAAO,IAAI,CAAC;aACb;YAED,MAAM,OAAO,GAA4B;gBACvC,eAAe;gBACf,IAAI,EAAE,aAAa,CAAC,OAAO,CAAC,CAAC,CAAC,aAAa,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI;gBAC/D,IAAI,EAAE,CAAC,GAAG,EAAE,OAAO,EAAE,EAAE;oBACrB,eAAe,CAAC,IAAI,CAAC,GAAG,EAAE,OAAO,EAAE,OAAO,EAAE,EAAE,CAAC,CAAC;gBAClD,CAAC;aACF,CAAC;YACF,eAAe,CAAC,IAAI,CAAC,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,EAAE,CAAC,CAAC;SAClD;QAAC,OAAO,GAAG,EAAE;YACZ,eAAe,CAAC,IAAI,EAAE,uBAAuB,IAAI,UAAU,EAAE;gBAC3D,GAAG;gBACH,OAAO;aACR,CAAC,CAAC;SACJ;IACH,CAAC,EACD,CAAC,eAAe,EAAE,MAAM,CAAC,eAAe,CAAC,CAC1C,CAAC;AACJ,CAAC;AAED,eAAe,SAAS,CAAC;AACzB,OAAO,EAAE,UAAU,EAAE,CAAC"}
@@ -47,8 +47,8 @@ export interface AnalyticsProviderProps {
47
47
  cookies: Cookies;
48
48
  }
49
49
  export declare const getFacebookCapi: (selectedChannel: SelectedChannel) => {
50
- token: string;
51
- pixelId: string;
50
+ token: any;
51
+ pixelId: any;
52
52
  };
53
53
  declare const AnalyticsProvider: React.FC<AnalyticsProviderProps>;
54
54
  export default AnalyticsProvider;
@@ -6,7 +6,7 @@ export interface TrackingFunctionContext {
6
6
  emit: (event: string, props: any) => void;
7
7
  list?: string;
8
8
  }
9
- declare type Consent = 'granted' | 'denied';
9
+ type Consent = 'granted' | 'denied';
10
10
  interface BaseConsentEvents {
11
11
  ad_storage: Consent;
12
12
  analytics_storage: Consent;
@@ -86,7 +86,7 @@ export interface Tracker extends Partial<BaseTrackingEvents> {
86
86
  name: string;
87
87
  initBrowser?: (opts: InitOptions) => void;
88
88
  }
89
- export declare type TrackerRegistryEventEmitter = TypedEventEmitter<TrackingEvents>;
89
+ export type TrackerRegistryEventEmitter = TypedEventEmitter<TrackingEvents>;
90
90
  export interface TrackerRegistry {
91
91
  on<E extends keyof TrackingEvents>(event: E, args: TrackingEvents[E], opts?: {
92
92
  name?: string;
@@ -1,4 +1,4 @@
1
- declare type ScriptProps = {
1
+ type ScriptProps = {
2
2
  src: string;
3
3
  async?: boolean;
4
4
  defer?: boolean;
@@ -2,7 +2,7 @@ import { DocumentNode } from 'graphql';
2
2
  import { OperationVariables } from 'react-apollo';
3
3
  import { CreateClientOpts } from '../apollo';
4
4
  import { ChannelHeaders } from './persistedQueries/PersistedClient';
5
- export declare type ErrorCallback = (err: Error) => void;
5
+ export type ErrorCallback = (err: Error) => void;
6
6
  export interface IntervalQueryOptions {
7
7
  query: DocumentNode;
8
8
  pollInterval: number;
@@ -1,3 +1,3 @@
1
- export declare type BreakpointMW = (req: any, res: any, next: any) => void;
1
+ export type BreakpointMW = (req: any, res: any, next: any) => void;
2
2
  declare const breakpointMiddleware: BreakpointMW;
3
3
  export default breakpointMiddleware;
@@ -15,8 +15,8 @@ export interface SchemaExtensionResult {
15
15
  schema?: GraphQLSchema | string;
16
16
  resolvers?: IResolversParameter;
17
17
  }
18
- export declare type SchemaExtension = (opts: SchemaExtensionOptions) => PromiseLike<SchemaExtensionResult> | SchemaExtensionResult;
19
- export declare type SchemaExtensions = SchemaExtension[];
18
+ export type SchemaExtension = (opts: SchemaExtensionOptions) => PromiseLike<SchemaExtensionResult> | SchemaExtensionResult;
19
+ export type SchemaExtensions = SchemaExtension[];
20
20
  export interface CreateApolloServerOptions {
21
21
  apolloConfig: ApolloConfig;
22
22
  extensions?: SchemaExtensions;
@@ -1,8 +1,8 @@
1
1
  import { ApolloConfig } from '../../../components/ConfigProvider';
2
2
  import { CreateClientOpts } from '../../apollo';
3
- export declare type PersistedQueries = ApolloConfig['persistedQueries'];
4
- export declare type PersistedQuery = ApolloConfig['persistedQueries'][0];
5
- export declare type ChannelHeaders = {
3
+ export type PersistedQueries = ApolloConfig['persistedQueries'];
4
+ export type PersistedQuery = ApolloConfig['persistedQueries'][0];
5
+ export type ChannelHeaders = {
6
6
  currency: string;
7
7
  channelid: number;
8
8
  culture: string;
@@ -3,8 +3,8 @@ import { FormikProps } from 'formik';
3
3
  import { Price, Product, ProductVariant, ProductVariantOption } from '../types';
4
4
  import { DocumentNode } from 'graphql';
5
5
  import { ApolloError } from 'apollo-client';
6
- declare type Comments = Record<string, string>;
7
- declare type Options = Record<string, string>;
6
+ type Comments = Record<string, string>;
7
+ type Options = Record<string, string>;
8
8
  interface AddToCartFormikValues {
9
9
  quantity: number;
10
10
  comments: Comments;
@@ -1,7 +1,7 @@
1
1
  /// <reference types="react" />
2
2
  import { AddToCartInput, Price, Product, ProductVariant, ProductVariantOption } from '../types';
3
- declare type Comments = Record<string, string>;
4
- declare type Options = Record<string, string>;
3
+ type Comments = Record<string, string>;
4
+ type Options = Record<string, string>;
5
5
  export interface AddToCartSubmit {
6
6
  input: AddToCartInput;
7
7
  optimistic: {
@@ -44,7 +44,7 @@ export declare function useAddToCart({ product, variant, submit, commentValidato
44
44
  initialTouched: import("formik").FormikTouched<unknown>;
45
45
  initialStatus: any;
46
46
  handleBlur: {
47
- (e: import("react").FocusEvent<any>): void;
47
+ (e: import("react").FocusEvent<any, Element>): void;
48
48
  <T = any>(fieldOrEvent: T): T extends string ? (e: any) => void : void;
49
49
  };
50
50
  handleChange: {
@@ -8,7 +8,7 @@ export interface CustomerUpdateFormRenderPropsField {
8
8
  [key in keyof EnhancedCustomerField]: any;
9
9
  };
10
10
  }
11
- export declare type CustomerUpdateFormRenderProps = FormikProps<CustomerUpdateInput> & {
11
+ export type CustomerUpdateFormRenderProps = FormikProps<CustomerUpdateInput> & {
12
12
  billingAddressFields: CustomerUpdateFormRenderPropsField[];
13
13
  deliveryAddressFields: CustomerUpdateFormRenderPropsField[];
14
14
  setCountryCode: (countryCode: string) => void;
@@ -1,7 +1,7 @@
1
1
  import { MutationRequestPasswordResetArgs } from '@jetshop/core/types';
2
2
  import { FormikProps } from 'formik';
3
3
  import React from 'react';
4
- declare type ForgotPasswordFormik = FormikProps<MutationRequestPasswordResetArgs>;
4
+ type ForgotPasswordFormik = FormikProps<MutationRequestPasswordResetArgs>;
5
5
  interface ForgotPasswordProps {
6
6
  children(args: {
7
7
  formik: ForgotPasswordFormik;
@@ -40,7 +40,7 @@ export declare function useForgotPasswordData(): {
40
40
  handleSubmit: (e?: React.FormEvent<HTMLFormElement>) => void;
41
41
  handleReset: (e?: React.SyntheticEvent<any, Event>) => void;
42
42
  handleBlur: {
43
- (e: React.FocusEvent<any>): void;
43
+ (e: React.FocusEvent<any, Element>): void;
44
44
  <T = any>(fieldOrEvent: T): T extends string ? (e: any) => void : void;
45
45
  };
46
46
  handleChange: {
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- export declare const ResetPasswordProvider: React.ComponentClass<Pick<import("react-router").RouteComponentProps<any, import("react-router").StaticContext, any>, never>, any> & import("react-router").WithRouterStatics<(props: React.PropsWithChildren<import("react-router").RouteComponentProps<any, import("react-router").StaticContext, any>>) => JSX.Element>;
2
+ export declare const ResetPasswordProvider: React.ComponentClass<Pick<import("react-router").RouteComponentProps<any, import("react-router").StaticContext, H.LocationState>, never>, any> & import("react-router").WithRouterStatics<(props: React.PropsWithChildren<import("react-router").RouteComponentProps<any, import("react-router").StaticContext, H.LocationState>>) => JSX.Element>;
3
3
  export declare function useResetPasswordForm(): {
4
4
  passwordInputProps: {
5
5
  required: boolean;
@@ -59,7 +59,7 @@ export declare function useResetPasswordForm(): {
59
59
  handleSubmit: (e?: React.FormEvent<HTMLFormElement>) => void;
60
60
  handleReset: (e?: React.SyntheticEvent<any, Event>) => void;
61
61
  handleBlur: {
62
- (e: React.FocusEvent<any>): void;
62
+ (e: React.FocusEvent<any, Element>): void;
63
63
  <T = any>(fieldOrEvent: T): T extends string ? (e: any) => void : void;
64
64
  };
65
65
  handleChange: {
@@ -3,7 +3,7 @@ import React from 'react';
3
3
  interface State {
4
4
  lookupData: PersonLookup;
5
5
  }
6
- declare type Action = {
6
+ type Action = {
7
7
  type: 'set';
8
8
  payload: PersonLookup;
9
9
  } | {
@@ -2,7 +2,7 @@ import { SignUpInput, MaskedProperty } from '@jetshop/core/types';
2
2
  import { FormikProps } from 'formik';
3
3
  import React from 'react';
4
4
  import { SignUpFormInput } from './formatSignupInput';
5
- declare type LookupData = {
5
+ type LookupData = {
6
6
  [key: string]: MaskedProperty;
7
7
  };
8
8
  interface SignupFormProps {
@@ -30,7 +30,7 @@ declare const inputProps: {
30
30
  autoComplete: string;
31
31
  };
32
32
  };
33
- export declare type UpdatePasswordFormRenderProps = FormikProps<UpdatePasswordValues> & {
33
+ export type UpdatePasswordFormRenderProps = FormikProps<UpdatePasswordValues> & {
34
34
  inputProps: typeof inputProps;
35
35
  submitted?: boolean;
36
36
  globalError?: string;
@@ -1,5 +1,5 @@
1
1
  import { SignUpInput } from '@jetshop/core/types';
2
- export declare type SignUpFormInput = SignUpInput & {
2
+ export type SignUpFormInput = SignUpInput & {
3
3
  country: string;
4
4
  organizationNumber?: string;
5
5
  };
@@ -6,7 +6,7 @@ export interface EnhancedCustomerField extends CustomerField {
6
6
  label: string;
7
7
  placeholder?: string;
8
8
  }
9
- declare type SignupContext = {
9
+ type SignupContext = {
10
10
  isUserTypeBusiness: boolean;
11
11
  billingAddressFields: EnhancedCustomerField[];
12
12
  loginFields: EnhancedCustomerField[];
@@ -1,6 +1,6 @@
1
1
  import { Customer, CustomerAddress, CustomerField, CustomerUpdateBillingAddressInput, CustomerUpdateDeliveryAddressInput, CustomerUpdateInput, CustomerUpdatePreferenceInput, Query, PrivateCustomer, BusinessCustomer, CountrySettings } from '@jetshop/core/types';
2
2
  import { DocumentNode } from 'graphql';
3
- declare type CustomerUpdateAddressInput = CustomerUpdateBillingAddressInput | CustomerUpdateDeliveryAddressInput;
3
+ type CustomerUpdateAddressInput = CustomerUpdateBillingAddressInput | CustomerUpdateDeliveryAddressInput;
4
4
  export declare function customerAddressToCustomerUpdateAddressInput({ address, isDeleteId, countryCode }: {
5
5
  address: CustomerAddress;
6
6
  isDeleteId?: boolean;
@@ -1 +1 @@
1
- {"version":3,"file":"CategoryRoute.js","sourceRoot":"","sources":["CategoryRoute.tsx"],"names":[],"mappings":";;;;;;;;;;;AACA,OAAO,EAAE,aAAa,EAAE,MAAM,mCAAmC,CAAC;AAClE,OAAO,KAAK,EAAE,EAAiB,SAAS,EAAE,MAAM,OAAO,CAAC;AACxD,OAAO,EAAe,eAAe,EAAE,MAAM,cAAc,CAAC;AAC5D,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,0BAA0B,EAAE,MAAM,sCAAsC,CAAC;AAClF,OAAO,EAAE,sBAAsB,EAAE,MAAM,mBAAmB,CAAC;AAW3D,SAAS,sBAAsB;IAC7B,MAAM,MAAM,GAAG,eAAe,EAAE,CAAC;IAEjC,SAAS,CAAC,GAAG,EAAE;QACb,SAAS,gBAAgB;YACvB,uCAAuC;YACvC,MAAM,CAAC,SAAS,CAAC;gBACf,IAAI,EAAE;oBACJ,aAAa,EAAE,0BAA0B,CAAC,MAAM,CAAC,QAAQ,CAAC,MAAM,CAAC;iBAClE;aACF,CAAC,CAAC;QACL,CAAC;QAED,MAAM,CAAC,gBAAgB,CAAC,UAAU,EAAE,gBAAgB,CAAC,CAAC;QAEtD,OAAO,GAAG,EAAE,CAAC,MAAM,CAAC,mBAAmB,CAAC,UAAU,EAAE,gBAAgB,CAAC,CAAC;IACxE,CAAC,EAAE,CAAC,MAAM,CAAC,CAAC,CAAC;AACf,CAAC;AAED,MAAM,aAAa,GAAG,CAAC,KAAyB,EAAE,EAAE;;IAClD,MAAM,EAAE,SAAS,EAAE,YAAY,KAAc,KAAK,EAAd,IAAI,UAAK,K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AE,OAAO,GAAI,CAC3C,CACA,CACJ;QACD,oBAAC,4BAA4B,IAAC,OAAO,EAAE,OAAO;YAC5C,oBAAC,WAAW,oBACN,IAAI,IACR,OAAO,EAAE,OAAO,EAChB,cAAc,EAAE,cAAc,IAC9B,CAC2B,CAC9B,CACJ,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,YAAY,CAAC"}
@@ -4,7 +4,7 @@ import { CategoryProps } from './CategoryRoute';
4
4
  import { ContentProps } from './ContentRoute';
5
5
  import { QueryResult } from 'react-apollo';
6
6
  import { Route } from '../../types';
7
- declare const RouteResolver: ({ productPage, categoryPage, contentPage, notFoundPage, ErrorPage, LoadingPage, result, pathname, state, search }: {
7
+ declare const RouteResolver: ({ productPage, categoryPage, contentPage, notFoundPage: NotFoundPage, ErrorPage, LoadingPage, result, pathname, state, search }: {
8
8
  productPage: ComponentType<ProductProps>;
9
9
  categoryPage: ComponentType<CategoryProps>;
10
10
  contentPage: ComponentType<ContentProps>;
@@ -4,7 +4,7 @@ import { RouteComponentProps } from 'react-router-dom';
4
4
  import { CategoryProps } from './CategoryRoute';
5
5
  import { ContentProps } from './ContentRoute';
6
6
  import { ProductProps } from './ProductRoute';
7
- export declare type DynamicRouteProps = {
7
+ export type DynamicRouteProps = {
8
8
  productPage: ComponentType<ProductProps>;
9
9
  categoryPage: ComponentType<CategoryProps>;
10
10
  contentPage: ComponentType<ContentProps>;
@@ -1,6 +1,6 @@
1
1
  import * as React from 'react';
2
2
  import { primaryFont, secondaryFonts } from './injectFont';
3
- export declare type CustomFontProps = {
3
+ export type CustomFontProps = {
4
4
  primaryFont?: primaryFont;
5
5
  secondaryFonts?: secondaryFonts;
6
6
  /**
@@ -1,6 +1,6 @@
1
1
  import * as React from 'react';
2
2
  import { primaryFont, secondaryFonts } from './injectFont';
3
- export declare type GoogleFontProps = {
3
+ export type GoogleFontProps = {
4
4
  primaryFont?: primaryFont;
5
5
  secondaryFonts?: secondaryFonts;
6
6
  };
@@ -1,6 +1,6 @@
1
1
  import * as React from 'react';
2
2
  import { primaryFont, secondaryFonts } from './injectFont';
3
- declare type TypekitFontProps = {
3
+ type TypekitFontProps = {
4
4
  primaryFont?: primaryFont;
5
5
  secondaryFonts?: secondaryFonts;
6
6
  /**
@@ -2,10 +2,10 @@
2
2
  * The Primary font used in the app. This will be added to the `body` styles.
3
3
  * If you use multiple Font components, only one should use primaryFont. A
4
4
  * `font-family-name-ready` class will also be added to the html tag. */
5
- export declare type primaryFont = string;
5
+ export type primaryFont = string;
6
6
  /**
7
7
  * An array of secondary fonts used in your app. For each of these fonts, a
8
8
  * class will be added to the html element in the form `font-family-name-ready`
9
9
  * once the font is loaded and ready to use */
10
- export declare type secondaryFonts = string[];
10
+ export type secondaryFonts = string[];
11
11
  export declare function injectFont(primaryFont?: string, secondaryFonts?: string[]): void;
@@ -10,14 +10,14 @@ export function injectFont(primaryFont, secondaryFonts) {
10
10
  primaryFontObserver.load().then(() => {
11
11
  const fontClass = createFontClass(primaryFont);
12
12
  document && document.documentElement.classList.add(fontClass);
13
- }, () => {
14
- console.log(`Font ${primaryFont} not available`);
13
+ }, (err) => {
14
+ console.log(`Font ${primaryFont} not available with reason: \n${err}`);
15
15
  });
16
16
  }
17
17
  // observe any secondary fonts
18
18
  if (secondaryFonts && secondaryFonts.length > 0) {
19
- const fonts = secondaryFonts.map(font => new Observer(font));
20
- Promise.all(fonts.map(f => f.load())).then(function (e) {
19
+ const fonts = secondaryFonts.map((font) => new Observer(font));
20
+ Promise.all(fonts.map((f) => f.load())).then(function (e) {
21
21
  e.map((fam) => {
22
22
  const fontClass = createFontClass(fam.family);
23
23
  document && document.documentElement.classList.add(fontClass);
@@ -1 +1 @@
1
- {"version":3,"file":"injectFont.js","sourceRoot":"","sources":["injectFont.tsx"],"names":[],"mappings":"AAAA,OAAO,QAAQ,MAAM,kBAAkB,CAAC;AAaxC,SAAS,eAAe,CAAC,MAAc;IACrC,OAAO,GAAG,MAAM,CAAC,OAAO,CAAC,KAAK,EA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,CAAC;gBAC9C,QAAQ,IAAI,QAAQ,CAAC,eAAe,CAAC,SAAS,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC;YAChE,CAAC,CAAC,CAAC;QACL,CAAC,EACD,GAAG,EAAE;YACH,OAAO,CAAC,GAAG,CAAC,+BAA+B,CAAC,CAAC;QAC/C,CAAC,CACF,CAAC;KACH;AACH,CAAC"}
@@ -1,5 +1,5 @@
1
1
  /// <reference types="react" />
2
2
  import { CartMutationProps } from './cartMutationUtils';
3
- declare type RemoveFromCartProps = CartMutationProps;
3
+ type RemoveFromCartProps = CartMutationProps;
4
4
  declare const RemoveFromCart: ({ cartQuery, children }: RemoveFromCartProps) => JSX.Element;
5
5
  export default RemoveFromCart;
@@ -18,7 +18,7 @@ export interface NotificationSchema {
18
18
  exiting: {};
19
19
  };
20
20
  }
21
- export declare type NotificationEvent = {
21
+ export type NotificationEvent = {
22
22
  type: 'REMOVE';
23
23
  } | {
24
24
  type: 'EXITED';
@@ -13,7 +13,7 @@ interface NotificationsSchema {
13
13
  active: {};
14
14
  };
15
15
  }
16
- export declare type NotificationsEvent = {
16
+ export type NotificationsEvent = {
17
17
  type: 'NOTIFICATION.ADD';
18
18
  content: string | React.ReactNode;
19
19
  id?: string;
@@ -28,8 +28,8 @@ export declare type NotificationsEvent = {
28
28
  } | {
29
29
  type: 'NOTIFICATIONS.CLEAR';
30
30
  };
31
- export declare type NotificationsState = State<NotificationsContextType, NotificationsEvent, NotificationsSchema>;
32
- export declare type NotificationsSend = Interpreter<NotificationsContextType, NotificationsSchema, NotificationsEvent>['send'];
31
+ export type NotificationsState = State<NotificationsContextType, NotificationsEvent, NotificationsSchema>;
32
+ export type NotificationsSend = Interpreter<NotificationsContextType, NotificationsSchema, NotificationsEvent>['send'];
33
33
  declare const notificationsMachine: import("xstate").StateMachine<NotificationsContextType, NotificationsSchema, NotificationsEvent, {
34
34
  value: any;
35
35
  context: NotificationsContextType;
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- declare type NotificationContent = string | React.ReactNode;
2
+ type NotificationContent = string | React.ReactNode;
3
3
  interface NotificationOptions {
4
4
  id?: string;
5
5
  type?: string;
@@ -18,7 +18,7 @@ export interface OpenGraphGeneralPageDataProps {
18
18
  */
19
19
  optionalFields?: OpenGraphDataTag[];
20
20
  }
21
- export declare type OpenGraphDataTag = {
21
+ export type OpenGraphDataTag = {
22
22
  property: string;
23
23
  content: string;
24
24
  };
@@ -1,6 +1,6 @@
1
1
  import React from 'react';
2
2
  import { ReactCookieProps } from 'react-cookie';
3
- export declare type IPaginationProps = {
3
+ export type IPaginationProps = {
4
4
  children: ((args: {
5
5
  offset: number;
6
6
  perPage: number;
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- export declare type Direction = 'ASCENDING' | 'DESCENDING';
2
+ export type Direction = 'ASCENDING' | 'DESCENDING';
3
3
  export interface ISortOrderContext {
4
4
  changeSortOrder: (value: string, direction: Direction) => void;
5
5
  direction: Direction;
@@ -1,5 +1,5 @@
1
1
  export interface Extras {
2
2
  [key: string]: any;
3
3
  }
4
- export declare type Report = (error: Error, extra?: Extras) => void;
4
+ export type Report = (error: Error, extra?: Extras) => void;
5
5
  export declare const convertAnyToError: (error: any) => any;
package/global.d.ts CHANGED
@@ -1,2 +1,26 @@
1
- declare var __IN_SERVER__: boolean;
2
- declare module 'format-message-generate-id/underscored_crc32';
1
+ import * as ReactRouter from 'react-router';
2
+ import * as History from 'history';
3
+ declare let __IN_SERVER__: boolean;
4
+
5
+ declare module 'format-message-generate-id';
6
+
7
+ declare global {
8
+ let __IN_SERVER__: boolean;
9
+ }
10
+
11
+ declare module 'history' {
12
+ export type Location = {
13
+ state?: {
14
+ type: any;
15
+ list: any;
16
+ };
17
+ };
18
+ }
19
+ declare module 'react-router' {
20
+ export namespace History {
21
+ export type LocationState = {
22
+ list: any;
23
+ type: any;
24
+ };
25
+ }
26
+ }
@@ -3,4 +3,4 @@ import { Cookies } from 'react-cookie';
3
3
  export declare function getHeaders(req: Request & {
4
4
  universalCookies: Cookies;
5
5
  breakpoint: string;
6
- }, res: Response): import("express-serve-static-core").Response;
6
+ }, res: Response): Response<any, Record<string, any>>;
@@ -1,5 +1,5 @@
1
1
  import { PackageItem } from '../../types';
2
- export declare type UpdateItem = (articleNumber: string, variantArticleNumber: string, valid: boolean) => void;
2
+ export type UpdateItem = (articleNumber: string, variantArticleNumber: string, valid: boolean) => void;
3
3
  export declare function usePackageProductItem(item: PackageItem, updateItem: UpdateItem, { preselectCheapest }?: {
4
4
  preselectCheapest?: boolean;
5
5
  }): {
@@ -22,8 +22,8 @@ export interface ProductListContextOptions {
22
22
  *
23
23
  * As a convenienve, an ID of null is used for the "default" product list.
24
24
  */
25
- export declare type ProductListId = string | null;
26
- export declare type ProductListMap = Map<ProductListId, NormalizedProductList>;
25
+ export type ProductListId = string | null;
26
+ export type ProductListMap = Map<ProductListId, NormalizedProductList>;
27
27
  export interface NormalizedProductList {
28
28
  name: string | null;
29
29
  items: {
@@ -93,26 +93,26 @@ export interface ProductListProduct extends Product {
93
93
  variant: ProductVariant;
94
94
  validation: ProductListProductValidation;
95
95
  }
96
- export declare type ProductListProductValidation = {
96
+ export type ProductListProductValidation = {
97
97
  status: 'valid' | 'outOfStock' | 'configurations' | 'missingVariant' | 'preOrder' | 'package';
98
98
  message: string;
99
99
  };
100
- export declare type AddToListMutation = MutationTuple<{
100
+ export type AddToListMutation = MutationTuple<{
101
101
  addToCustomerProductList: CustomerProductListResult;
102
102
  }, MutationAddToCustomerProductListArgs>;
103
- export declare type CreateListMutation = MutationTuple<{
103
+ export type CreateListMutation = MutationTuple<{
104
104
  createCustomerProductList: CustomerProductListResult;
105
105
  }, MutationCreateCustomerProductListArgs>;
106
- export declare type RemoveFromListMutation = MutationTuple<{
106
+ export type RemoveFromListMutation = MutationTuple<{
107
107
  removeFromCustomerProductList: CustomerProductListResult;
108
108
  }, MutationRemoveFromCustomerProductListArgs>;
109
- export declare type UpdateListItemMutation = MutationTuple<{
109
+ export type UpdateListItemMutation = MutationTuple<{
110
110
  updateCustomerProductListItem: CustomerProductListResult;
111
111
  }, MutationUpdateCustomerProductListItemArgs>;
112
- export declare type ListsProductsQuery = QueryResult<{
112
+ export type ListsProductsQuery = QueryResult<{
113
113
  customerProductLists: CustomerProductListResult[];
114
114
  }>;
115
- export declare type ListProductsQuery = QueryResult<CustomerProductListResult, QueryCustomerProductListArgs>;
116
- export declare type ProductsQuery = QueryResult<{
115
+ export type ListProductsQuery = QueryResult<CustomerProductListResult, QueryCustomerProductListArgs>;
116
+ export type ProductsQuery = QueryResult<{
117
117
  products: Product[];
118
118
  }, QueryProductsArgs>;
@@ -14,7 +14,7 @@ export declare function replaceItemInList(state: ProductListState, listId: Produ
14
14
  variantArticleNumber: string;
15
15
  options: ProductListItemOptions;
16
16
  }): ProductListState;
17
- export declare type Action = {
17
+ export type Action = {
18
18
  type: 'UPDATE';
19
19
  payload: {
20
20
  listId: ProductListId;
@@ -1,6 +1,6 @@
1
1
  import { FetchResult, DocumentNode } from 'apollo-link';
2
2
  import { CartMutation, AddMultipleToCartInput, Product } from '../types';
3
- declare type AddMultipleToCartMutationResponse = FetchResult<{
3
+ type AddMultipleToCartMutationResponse = FetchResult<{
4
4
  addMultipleToCart: CartMutation;
5
5
  }>;
6
6
  interface UseAddMultipleToCartOptions {
@@ -12,8 +12,8 @@ export interface AddMultipleToCartQueries {
12
12
  addMultipleToCartMutation: DocumentNode;
13
13
  cartQuery: DocumentNode;
14
14
  }
15
- declare type FailedReason = string;
16
- export declare type AddMultipleToCartInputWithProduct = AddMultipleToCartInput & Product;
15
+ type FailedReason = string;
16
+ export type AddMultipleToCartInputWithProduct = AddMultipleToCartInput & Product;
17
17
  export declare function useAddMultipleToCart(items: AddMultipleToCartInputWithProduct[], hookQueries?: AddMultipleToCartQueries, hookCallbacks?: UseAddMultipleToCartOptions): [
18
18
  (q?: AddMultipleToCartQueries, cbs?: UseAddMultipleToCartOptions) => Promise<AddMultipleToCartMutationResponse>,
19
19
  {
@@ -1,4 +1,4 @@
1
- declare type UseDeleteAccountMutation = (args: {
1
+ type UseDeleteAccountMutation = (args: {
2
2
  /**
3
3
  * The message to show in the confirmation dialog.
4
4
  * @default "Are you sure you wish to delete your account?" */
@@ -4,7 +4,7 @@ interface PreconnectLinkOptions {
4
4
  }
5
5
  interface PreconnectLink {
6
6
  href: string;
7
- crossOrigin: string;
7
+ crossOrigin: '' | 'anonymous' | 'use-credentials';
8
8
  }
9
9
  export declare function usePreconnectLinks({ ga, gtm }?: PreconnectLinkOptions): PreconnectLink[];
10
10
  export {};
@@ -24,7 +24,7 @@ export function usePreconnectLinks({ ga = false, gtm = false } = {}) {
24
24
  const gtmLinks = gtm ? ['https://www.googletagmanager.com'] : [];
25
25
  return [
26
26
  ...staticLinks,
27
- ...gaLinks.concat(gtmLinks).map(href => ({ href, crossOrigin: null }))
27
+ ...gaLinks.concat(gtmLinks).map((href) => ({ href, crossOrigin: null }))
28
28
  ];
29
29
  }
30
30
  //# sourceMappingURL=usePreconnectLinks.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"usePreconnectLinks.js","sourceRoot":"","sources":["usePreconnectLinks.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAYhD,MAAM,UAAU,kBAAkB,CAAC,EACjC,EAAE,GAAG,KAAK,EACV,GAAG,GAAG,KAAK,KACc,EAAE;IAC3B,MAAM,EAAE,YAAY,EAAE,GAAG,aAAa,EAAE,CAAC;IAEzC,wCAAwC;IACxC,MAAM,WAAW,GAAG;QAClB;YACE,IAAI,EAAE,yBAAyB;YAC/B,WAAW,EAAE,IAAI;SAClB;QACD,CAAA,YAAY,aAAZ,YAAY,uBAAZ,YAAY,CAAE,UAAU,KAAI;YAC1B,IAAI,EAAE,YAAY,aAAZ,YAAY,uBAAZ,YAAY,CAAE,UAAU;YAC9B,WAAW,EAAE,IAAI;SAClB;KACF,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;I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,CAAC,CAAC,CAAC,kCAAkC,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;IAEjE,OAAO;QACL,GAAG,WAAW;QACd,GAAG,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC,EAAE,IAAI,EAAE,WAAW,EAAE,IAAI,EAAE,CAAC,CAAC;KACzE,CAAC;AACJ,CAAC"}
@@ -1,5 +1,5 @@
1
1
  import { Product, ProductVariant, ProductVariantOption } from '../../types';
2
- export declare type VariantValidation = 'outOfStock' | 'valid' | 'incomplete' | 'invalid';
2
+ export type VariantValidation = 'outOfStock' | 'valid' | 'incomplete' | 'invalid';
3
3
  /**
4
4
  * Given a product, this hook provides methods for getting and setting variants on that product,
5
5
  * as well as methods to validate the current and proposed combination of values.
@@ -1,5 +1,5 @@
1
1
  import { Reducer } from 'react';
2
- export declare type ThunkAction<State, Action> = (dispatch: React.Dispatch<Action>, getState: () => State) => void;
2
+ export type ThunkAction<State, Action> = (dispatch: React.Dispatch<Action>, getState: () => State) => void;
3
3
  /**
4
4
  * Can be used the same way as useReducer, but allows functions to be passed as
5
5
  * actions (aka thunks).
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jetshop/core",
3
- "version": "5.16.1",
3
+ "version": "5.17.0-alpha.b238da57",
4
4
  "license": "MIT",
5
5
  "files": [
6
6
  "**/*.js",
@@ -124,7 +124,7 @@
124
124
  "@types/request-ip": "^0.0.36",
125
125
  "@types/uuid": "^8.3.0",
126
126
  "apollo-link-mock": "^1.0.1",
127
- "chalk": "^2.4.1",
127
+ "chalk": "^4.1.2",
128
128
  "jest-dom": "^3.4.0",
129
129
  "lint-staged": "^8.1.5",
130
130
  "nock": "^10.0.6",
@@ -34,4 +34,4 @@ export declare const resolvers: (searchParams: string) => {
34
34
  toggleMultiListFilterItem: Resolver;
35
35
  };
36
36
  };
37
- export declare type Resolver = (rootValue?: any, args?: any, context?: any, info?: any) => any;
37
+ export type Resolver = (rootValue?: any, args?: any, context?: any, info?: any) => any;
package/server/graphql.js CHANGED
@@ -28,7 +28,7 @@ export function createGraphqlServer({ extensions }) {
28
28
  extensions: ({ result }) => {
29
29
  // This solves an issue where the Store API returns null data but with a successful status code for requests that need to be authenticated, which causes issues for the GraphQL proxy.
30
30
  if (result && result.errors && !result.data) {
31
- if (result.errors.find(err => { var _a; return ((_a = err.extensions) === null || _a === void 0 ? void 0 : _a.code) === 'ChannelRequiresAuthorization'; })) {
31
+ if (result.errors.find((err) => { var _a; return ((_a = err.extensions) === null || _a === void 0 ? void 0 : _a.code) === 'ChannelRequiresAuthorization'; })) {
32
32
  const err = new Error();
33
33
  err.graphqlErrors = result.errors;
34
34
  err.status = 401;
@@ -67,16 +67,15 @@ export function createExtension({ endpoint, getHeaders, prefix = null, transform
67
67
  headers: Object.assign({ 'Content-Type': 'application/json' }, getHeaders(context)),
68
68
  body: JSON.stringify({ query, variables }),
69
69
  agent: endpoint.indexOf('https') === 0 ? httpsAgent : httpAgent
70
- }).then(res => res.json());
70
+ }).then((res) => res.json());
71
71
  };
72
72
  return {
73
73
  schema: yield introspectSchema(executor),
74
74
  executor,
75
75
  transforms: prefix
76
76
  ? [
77
- new RenameTypes(name => `${prefix.slice(0, 1).toUpperCase() + prefix.slice(1)}${name}`),
78
- new RenameRootFields((_operationName, fieldName, _fieldConfig) => `${prefix}${fieldName.slice(0, 1).toUpperCase() +
79
- fieldName.slice(1)}`)
77
+ new RenameTypes((name) => `${prefix.slice(0, 1).toUpperCase() + prefix.slice(1)}${name}`),
78
+ new RenameRootFields((_operationName, fieldName, _fieldConfig) => `${prefix}${fieldName.slice(0, 1).toUpperCase() + fieldName.slice(1)}`)
80
79
  ]
81
80
  : transforms,
82
81
  createProxyingResolver: skipValidation
@@ -98,7 +97,7 @@ const forwardHeaders = [
98
97
  function forwardRequestHeaders(req) {
99
98
  const headers = {};
100
99
  if (req && req.headers) {
101
- forwardHeaders.forEach(key => {
100
+ forwardHeaders.forEach((key) => {
102
101
  if (req.headers[key]) {
103
102
  headers[key] = req.headers[key];
104
103
  }
@@ -109,7 +108,7 @@ function forwardRequestHeaders(req) {
109
108
  export const storeapiExtension = ({ endpoint = 'https://storeapi.jetshop.io', prefix = null, token, shopid, getHeaders = forwardRequestHeaders }) => createExtension({
110
109
  endpoint,
111
110
  prefix,
112
- getHeaders: req => {
111
+ getHeaders: (req) => {
113
112
  const headers = Object.assign({ 'Content-Type': 'application/json', shopid,
114
113
  token }, getHeaders(req));
115
114
  return headers;
@@ -1 +1 @@
1
- {"version":3,"file":"graphql.js","sourceRoot":"","sources":["graphql.ts"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAC9C,OAAO,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAOtD,OAAO,EACL,gBAAgB,EAChB,WAAW,EACX,gBAAgB,EAChB,6BAA6B,EAC9B,MAAM,qBAAqB,CAAC;AAC7B,OAAO,KAAsB,MAAM,YAAY,CAAC;AAChD,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAChC,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,EAAiB,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAG1E,MAAM,UAAgB,mBAAmB,CAAC,EACxC,UAAU,EAGX;;QACC,MAAM,UAAU,GAAG,MAAM,OAAO,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC;QACjD,MAAM,MAAM,GAAG,aAAa,CAAC;YAC3B,UAAU;SACX,CAAC,CAAC;QAEH,OAAO,WAAW,CAAC;YACjB,MAAM;YACN,QAAQ,EAAE,OAAO,CAAC,GAAG,CAAC,QAAQ,KAAK,aAAa;YAChD,gBAAgB,EAAE,GAAG,EAAE,CAAC,EAAE;YAC1B,UAAU,EAAE,CAAC,EAAE,MAAM,EAAE,EAAE,EAAE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