@jetshop/core 5.17.0-alpha.b238da57 → 5.17.0-alpha.b296b0b3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (36) hide show
  1. package/boot/NetworkStatusNotifier.d.ts +2 -0
  2. package/boot/NetworkStatusNotifier.js +4 -0
  3. package/boot/NetworkStatusNotifier.js.map +1 -0
  4. package/boot/apollo.js +1 -1
  5. package/boot/apollo.js.map +1 -1
  6. package/cart/AddToCartFormik.js +1 -1
  7. package/cart/AddToCartFormik.js.map +1 -1
  8. package/components/Auth/ResetPasswordProvider.d.ts +1 -1
  9. package/components/DynamicRoute/GenericError.d.ts +17 -0
  10. package/components/DynamicRoute/GenericError.js +61 -0
  11. package/components/DynamicRoute/GenericError.js.map +1 -0
  12. package/components/DynamicRoute/RouteResolver.js +1 -1
  13. package/components/DynamicRoute/RouteResolver.js.map +1 -1
  14. package/components/DynamicRoute/index.d.ts +3 -3
  15. package/components/DynamicRoute/index.js +34 -34
  16. package/components/DynamicRoute/index.js.map +1 -1
  17. package/components/Filters/utils/replaceInSearch.d.ts +1 -1
  18. package/components/Filters/utils/replaceInSearch.js.map +1 -1
  19. package/components/Fonts/injectFont.js +2 -2
  20. package/components/Fonts/injectFont.js.map +1 -1
  21. package/components/Mutation/AddToCartFormik.js +1 -1
  22. package/components/Mutation/AddToCartFormik.js.map +1 -1
  23. package/components/Notifications/Notifications.js +2 -3
  24. package/components/Notifications/Notifications.js.map +1 -1
  25. package/data/fragments/StockStatusFragment.gql +0 -1
  26. package/hooks/Filters/useSortOrder.d.ts +6 -1
  27. package/hooks/Filters/useSortOrder.js.map +1 -1
  28. package/hooks/PackageProducts/usePackageProductItem.d.ts +1 -1
  29. package/hooks/PackageProducts/usePackageProductItem.js +1 -1
  30. package/hooks/PackageProducts/usePackageProductItem.js.map +1 -1
  31. package/hooks/useStockStatus.d.ts +8 -0
  32. package/hooks/useStockStatus.js +26 -0
  33. package/hooks/useStockStatus.js.map +1 -0
  34. package/package.json +1 -1
  35. package/resolvers/filters/listFilterItem.js +10 -9
  36. package/resolvers/filters/listFilterItem.js.map +1 -1
@@ -0,0 +1,2 @@
1
+ declare const link: any, useApolloNetworkStatus: any;
2
+ export { link, useApolloNetworkStatus };
@@ -0,0 +1,4 @@
1
+ import { createNetworkStatusNotifier } from 'react-apollo-network-status';
2
+ const { link, useApolloNetworkStatus } = createNetworkStatusNotifier();
3
+ export { link, useApolloNetworkStatus };
4
+ //# sourceMappingURL=NetworkStatusNotifier.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"NetworkStatusNotifier.js","sourceRoot":"","sources":["NetworkStatusNotifier.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,2BAA2B,EAAE,MAAM,6BAA6B,CAAC;AAE1E,MAAM,EAAE,IAAI,EAAE,sBAAsB,EAAE,GAAG,2BAA2B,EAAE,CAAC;AAEvE,OAAO,EAAE,IAAI,EAAE,sBAAsB,EAAE,CAAC"}
package/boot/apollo.js CHANGED
@@ -21,7 +21,7 @@ import report from '../errorReporting';
21
21
  import { resolvers } from '../resolvers';
22
22
  import typeDefs from './client-schema.gql';
23
23
  import { logOperationTime } from './utils/queryLoggingMiddleware';
24
- import { link as networkStatusLink } from '@jetshop/ui/Loading/NetworkStatusNotifier';
24
+ import { link as networkStatusLink } from '@jetshop/core/boot/NetworkStatusNotifier';
25
25
  export const createClient = ({ apolloConfig: { token, shopid, enableGateway, graphQLURI, useGraphQLProxyServer }, schema, authHandler, previewHandler, req, channelHandler }) => {
26
26
  if (!token || !shopid) {
27
27
  throw new Error(`Missing ${!token && `token`} ${!shopid && `shopid`}`);
@@ -1 +1 @@
1
- {"version":3,"file":"apollo.js","sourceRoot":"","sources":["apollo.ts"],"names":[],"mappings":";;;;;;;;;;;AACA,OAAO,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAC7C,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACzC,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAC5C,OAAO,EAAE,cAAc,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AAC,CAAC,EAAE,CAAC;QAC3C,GAAG,CAAC,iBAAiB,CAAC,CAAC,CAAC,CAAC,iBAAiB,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;QACjD,OAAO;KACR,CAAC;IAEF,IAAI,OAAO,CAAC,GAAG,CAAC,UAAU,KAAK,MAAM,EAAE;QACrC,KAAK,CAAC,OAAO,CAAC,gBAAgB,CAAC,CAAC;KACjC;IAED,IAAI,aAAa,EAAE;QACjB,KAAK,CAAC,OAAO,CAAC,wBAAwB,CAAC,EAAE,sBAAsB,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC;KAC3E;IACD,MAAM,IAAI,GAAG,UAAU,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;IAEpC,MAAM,KAAK,GAAG,WAAW,EAAE,CAAC;IAE5B,MAAM,MAAM,GAAwC,IAAI,YAAY,CAAC;QACnE,IAAI;QACJ,sBAAsB,EAAE,IAAI;QAC5B,KAAK,EAAE,aAAa;YAClB,CAAC,CAAC,KAAK;YACP,CAAC,CAAC,KAAK,CAAC,OAAO,CAAE,MAAc,CAAC,gBAAgB,CAAC;QACnD,OAAO,EAAE,CAAC,CAAC,aAAa;QACxB,SAAS,EAAE,SAAS,CAClB,EAAE,CAAC,SAAS,CAAC,GAAG,aAAH,GAAG,uBAAH,GAAG,CAAE,KAAK,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,gBAAgB,EAAE,IAAI,EAAE,CAAC,CACnE;QACD,QAAQ;KACT,CAAC,CAAC;IAEH,OAAO,EAAE,MAAM,EAAE,CAAC;AACpB,CAAC,CAAC"}
@@ -12,7 +12,7 @@ import { useAddToCart } from './useAddToCart';
12
12
  import { FormikProvider } from 'formik';
13
13
  import { useApolloClient, useMutation } from '@apollo/react-hooks';
14
14
  import { addToCartError, addToCartSuccess, useTrackProductAdd } from '../components/Mutation/AddToCart/addToCartUtils';
15
- import { uniqueId } from 'lodash';
15
+ import uniqueId from '@jetshop/core/helpers/uniqueId';
16
16
  import { getAddToCartOptimisticResponse } from '../components/Mutation/cartMutationUtils';
17
17
  import { useCartId } from '../components/Cart/CartIdContext';
18
18
  export function AddToCartFormik({ product, variant, commentValidators = {}, getMissingOptions, initialValues,
@@ -1 +1 @@
1
- {"version":3,"file":"AddToCartFormik.js","sourceRoot":"","sources":["AddToCartFormik.tsx"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAmB,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC/D,OAAO,EAAE,cAAc,EAAe,MAAM,QAAQ,CAAC;AAWrD,OAAO,EAAE,eAAe,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AACnE,OAAO,EACL,cAAc,EACd,gBAAgB,EAChB,kBAAkB,EACnB,MAAM,iDAAiD,CAAC;AACzD,OAAO,EAAE,QAAQ,EAAE,MAAM,QAAQ,CAAC;AAClC,OAAO,EAAE,8BAA8B,EAAE,MAAM,0CAA0C,CAAC;AAC1F,OAAO,EAAE,SAAS,EAAE,MAAM,kCAAkC,CAAC;AA6C7D,MAAM,UAAU,eAAe,CAAC,EAC9B,OAAO,EACP,OAAO,EACP,iBAAiB,GAAG,EAAE,EACtB,iBAAiB,EACjB,aAAa;AACb,wBAAwB;AACxB,eAAe,EACf,gBAAgB,EAChB,kBAAkB,EAClB,SAAS,EACT,YAAY;AACZ,4CAA4C;AAC5C,QAAQ,EACa;IACrB,MAAM,MAAM,GAAG,eAAe,EAAE,CAAC;IAEjC,MAAM,CAAC,iBAAiB,CAAC,GAAG,WAAW,CAGrC,YAAY,EAAE;QACd,WAAW,EAAE,GAAG,EAAE,CAAC,YAAY,CAAC,OAAO,CAAC,YAAY,EAAE,GAAG,CAAC;KAC3D,CAAC,CAAC;IAEH,MAAM,EAAE,MAAM,EAAE,SAAS,EAAE,GAAG,SAAS,EAAE,CAAC;IAC1C,MAAM,sBAAsB,GAAG,kBAAkB,CAAC,OAAO,CAAC,CAAC;IAE3D,SAAe,MA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C,KAAK;gBACvB,QAAQ,EAAE,KAAK,CAAC,QAAQ;gBACxB,iBAAiB,EAAE,OAAO;gBAC1B,UAAU;aACX,CAAC;YAEF,IAAI,eAAe,EAAE;gBACnB,eAAe,CAAC,eAAe,CAAC,CAAC;aAClC;YAED,OAAO,iBAAiB,CAAC;gBACvB,SAAS,EAAE;oBACT,KAAK;iBACN;gBACD,kBAAkB,EAAE;oBAClB,SAAS,EAAE;wBACT,IAAI,EAAE,8BAA8B,CAClC,UAAU,CAAC,OAAO,EAClB,KAAK,CAAC,QAAQ,EACd,MAAM,EACN,MAAM,EACN,SAAS,CACV;wBACD,UAAU,EAAE,cAAc;qBAC3B;iBACF;aACF,CAAC;iBACC,IAAI,CACH,gBAAgB,CAAC;gBACf,kBAAkB;gBAClB,eAAe;gBACf,MAAM;gBACN,SAAS;aACV,CAAC,CACH;iBACA,KAAK,CACJ,cAAc,CAAC;gBACb,gBAAgB;gBAChB,eAAe;aAChB,CAAC,CACH,CAAC;QACN,CAAC;KAAA;IAED,MAAM,EAAE,IAAI,EAAE,GAAG,YAAY,CAAC;QAC5B,OAAO;QACP,OAAO;QACP,iBAAiB;QACjB,iBAAiB;QACjB,aAAa;QACb,MAAM;KACP,CAAC,CAAC;IAEH,OAAO,oBAAC,cAAc,IAAC,KAAK,EAAE,IAAI,IAAG,QAAQ,CAAC,IAAI,CAAC,CAAkB,CAAC;AACxE,CAAC;AAED,eAAe,eAAe,CAAC"}
@@ -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, H.LocationState>, never>, any> & import("react-router").WithRouterStatics<(props: React.PropsWithChildren<import("react-router").RouteComponentProps<any, import("react-router").StaticContext, H.LocationState>>) => JSX.Element>;
2
+ export declare const ResetPasswordProvider: React.ComponentClass<Pick<import("react-router").RouteComponentProps<any, import("react-router").StaticContext, unknown>, never>, any> & import("react-router").WithRouterStatics<(props: React.PropsWithChildren<import("react-router").RouteComponentProps<any, import("react-router").StaticContext, unknown>>) => JSX.Element>;
3
3
  export declare function useResetPasswordForm(): {
4
4
  passwordInputProps: {
5
5
  required: boolean;
@@ -0,0 +1,17 @@
1
+ import * as React from 'react';
2
+ export interface BoundaryErrorState {
3
+ error?: Error;
4
+ info?: React.ErrorInfo;
5
+ }
6
+ export interface BoundaryErrorProps {
7
+ component?: React.ReactNode;
8
+ extraInfo?: any;
9
+ }
10
+ export declare const DefaultError: React.FC<BoundaryErrorState>;
11
+ declare class ErrorBoundary extends React.Component<BoundaryErrorProps, BoundaryErrorState> {
12
+ state: BoundaryErrorState;
13
+ static defaultProps: Partial<BoundaryErrorProps>;
14
+ componentDidCatch(error: Error, info: React.ErrorInfo): void;
15
+ render(): React.ReactNode;
16
+ }
17
+ export default ErrorBoundary;
@@ -0,0 +1,61 @@
1
+ import * as React from 'react';
2
+ import report from '@jetshop/core/errorReporting';
3
+ export const DefaultError = ({ error, info }) => (React.createElement("section", { style: {
4
+ width: '57ch',
5
+ maxWidth: '100%',
6
+ margin: '4rem auto',
7
+ padding: '1rem'
8
+ } },
9
+ React.createElement("h1", { style: {
10
+ fontSize: '1.5rem',
11
+ marginBottom: '2rem'
12
+ } }, "Something went wrong!"),
13
+ React.createElement("p", null, "Sorry! Our developers have been notified."),
14
+ React.createElement("div", null,
15
+ React.createElement("a", { href: "/", style: {
16
+ display: 'inline-block',
17
+ margin: '1rem 0 3rem 0',
18
+ borderRadius: '3px',
19
+ padding: '0.5rem',
20
+ textDecoration: 'none',
21
+ fontWeight: 600,
22
+ background: '#e2e2e2',
23
+ border: '1px solid #c3c3c3',
24
+ color: '#000'
25
+ } }, "Go back to the start page")),
26
+ process.env.NODE_ENV !== 'production' && (React.createElement("div", null,
27
+ error && React.createElement("p", null,
28
+ "Error: ",
29
+ error.message),
30
+ info && (React.createElement("pre", { style: {
31
+ fontSize: '0.875rem',
32
+ lineHeight: 1.5,
33
+ color: '#585858'
34
+ } }, info.componentStack))))));
35
+ class ErrorBoundary extends React.Component {
36
+ constructor() {
37
+ super(...arguments);
38
+ this.state = {
39
+ error: undefined,
40
+ info: undefined
41
+ };
42
+ }
43
+ componentDidCatch(error, info) {
44
+ const { extraInfo = {} } = this.props;
45
+ // Report to Sentry
46
+ report(error, Object.assign(Object.assign({}, extraInfo), { reactInfo: info }));
47
+ this.setState({ error, info });
48
+ }
49
+ render() {
50
+ const Comp = this.props.component;
51
+ if (!this.state.error) {
52
+ return this.props.children;
53
+ }
54
+ return React.createElement(Comp, Object.assign({}, this.state));
55
+ }
56
+ }
57
+ ErrorBoundary.defaultProps = {
58
+ component: DefaultError
59
+ };
60
+ export default ErrorBoundary;
61
+ //# sourceMappingURL=GenericError.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"GenericError.js","sourceRoot":"","sources":["GenericError.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,MAAM,MAAM,8BAA8B,CAAC;AAYlD,MAAM,CAAC,MAAM,YAAY,GAAiC,CAAC,EAAE,KAAK,EAAE,IAAI,EAAE,EAAE,EAAE,CAAC,CAC7E,iCACE,KAAK,EAAE;QACL,KAAK,EAAE,MAAM;QACb,QAAQ,EAAE,MAAM;QAChB,MAAM,EAAE,WAAW;QACnB,OAAO,EAAE,MAAM;KAChB;IAED,4BACE,KAAK,EAAE;YACL,QAAQ,EAAE,QAAQ;YAClB,YAAY,EAAE,MAAM;SACrB,4BAGE;IACL,2EAAgD;IAChD;QACE,2BACE,IAAI,EAAC,GAAG,EACR,KAAK,EAAE;gBACL,OAAO,EAAE,cAAc;gBACvB,MAAM,EAAE,eAAe;gBACvB,YAAY,EAAE,KAAK;gBACnB,OAAO,EAAE,QAAQ;gBACjB,cAAc,EAAE,MAAM;gBACtB,UAAU,EAAE,GAAG;gBACf,UAAU,EAAE,SAAS;gBACrB,MAAM,EAAE,mBAAmB;gBAC3B,KAAK,EAAE,MAAM;aACd,gCAGC,CACA;IACL,OAAO,CAAC,GAAG,CAAC,QAAQ,KAAK,YAAY,IAAI,CACxC;QACG,KAAK,IAAI;;YAAW,KAAK,CAAC,OAAO,CAAK;QACtC,IAAI,IAAI,CACP,6BACE,KAAK,EAAE;gBACL,QAAQ,EAAE,UAAU;gBACpB,UAAU,EAAE,GAAG;gBACf,KAAK,EAAE,SAAS;aACjB,IAEA,IAAI,CAAC,cAAc,CAChB,CACP,CACG,CACP,CACO,CACX,CAAC;AAEF,MAAM,aAAc,SAAQ,KAAK,CAAC,SAGjC;IAHD;;QAIE,UAAK,GAAuB;YAC1B,KAAK,EAAE,SAAS;YAChB,IAAI,EAAE,SAAS;SAChB,CAAC;IAsBJ,CAAC;IAhBC,iBAAiB,CAAC,KAAY,EAAE,IAAqB;QACnD,MAAM,EAAE,SAAS,GAAG,EAAE,EAAE,GAAG,IAAI,CAAC,KAAK,CAAC;QACtC,mBAAmB;QACnB,MAAM,CAAC,KAAK,kCAAO,SAAS,KAAE,SAAS,EAAE,IAAI,IAAG,CAAC;QACjD,IAAI,CAAC,QAAQ,CAAC,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC;IACjC,CAAC;IAED,MAAM;QACJ,MAAM,IAAI,GAAG,IAAI,CAAC,KAAK,CAAC,SAAyC,CAAC;QAElE,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,KAAK,EAAE;YACrB,OAAO,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC;SAC5B;QAED,OAAO,oBAAC,IAAI,oBAAK,IAAI,CAAC,KAAK,EAAI,CAAC;IAClC,CAAC;;AAnBM,0BAAY,GAAgC;IACjD,SAAS,EAAE,YAAY;CACxB,CAAC;AAoBJ,eAAe,aAAa,CAAC"}
@@ -5,7 +5,7 @@ import ContentRoute from './ContentRoute';
5
5
  import Status from './Status';
6
6
  import { Redirect } from 'react-router';
7
7
  import { setPageType } from '../../analytics/webVitals';
8
- import { DefaultError } from '@jetshop/ui/ErrorBoundary/Generic';
8
+ import { DefaultError } from '@jetshop/core/components/DynamicRoute/GenericError';
9
9
  const isRouteType = (state, result, type) => {
10
10
  var _a, _b, _c;
11
11
  if (result.error) {
@@ -1 +1 @@
1
- {"version":3,"file":"RouteResolver.js","sourceRoot":"","sources":["RouteResolver.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAwB,MAAM,OAAO,CAAC;AAC7C,OAAO,YAA8B,MAAM,gBAAgB,CAAC;AAC5D,OAAO,aAAgC,MAAM,iBAAiB,CAAC;AAC/D,OAAO,YAA8B,MAAM,gBAAgB,CAAC;AAE5D,OAAO,MAAM,MAAM,UAAU,CAAC;AAE9B,OAAO,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AACxC,OAAO,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAC;AACxD,OAAO,EAAE,YAAY,EAAE,MAAM,mCAAmC,CAAC;AAEjE,MAAM,WAAW,GAAG,CAAC,KAAU,EAAE,MAAmB,EAAE,IAAY,EAAE,EAAE;;IACpE,IAAI,MAAM,CAAC,KAAK,EAAE;QAChB,OAAO,KAAK,CAAC;KACd;IACD,MAAM,SAAS,GAAG,KAAK,aAAL,KAAK,uBAAL,KAAK,CAAE,IAAI,CAAC;IAC9B,MAAM,SAAS,GAAG,MAAA,MAAA,MAAA,MAAM,aAAN,MAAM,uBAAN,MAAM,CAAE,IAAI,0CAAE,KAAK,0CAAE,MAAM,0CAAE,UAAU,CAAC;IAC1D,MAAM,UAAU,GAAG,CAAC,MAAM,CAAC,OAAO,IAAI,CAAC,SAAS,CAAC;IACjD,IAAI,UAAU,EAAE;QACd,OAAO,KAAK,CAAC;KACd;SAAM;QACL,OAAO,SAAS,KAAK,IAAI,IAAI,SAAS,KAAK,IAAI,CAAC;KACjD;AACH,CAAC,CAAC;AAEF,MAAM,YAAY,GAAG,CAAC,MAAqC,EAAE,EAAE;;IAC7D,MAAM,SAAS,GACb,MAAA,MAAA,MAAA,MAAA,MAAA,MAAM,aAAN,MAAM,uBAAN,MAAM,CAAE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,IACX,MAAM,EAAE,MAAM,EACd,cAAc,EAAE,KAAK,aAAL,KAAK,uBAAL,KAAK,CAAE,OAAO,EAC9B,SAAS,EAAE,WAAW,GACtB,CACH,CAAC;KACH;SAAM,IAAI,WAAW,CAAC,KAAK,EAAE,MAAM,EAAE,UAAU,CAAC,EAAE;QACjD,OAAO,oBAAC,aAAa,IAAC,MAAM,EAAE,MAAM,EAAE,SAAS,EAAE,YAAY,GAAI,CAAC;KACnE;SAAM,IAAI,WAAW,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE;QAC7C,OAAO,CACL,oBAAC,YAAY,IACX,QAAQ,EAAE,QAAQ,EAClB,MAAM,EAAE,MAAM,EACd,SAAS,EAAE,WAAW,GACtB,CACH,CAAC;KACH;SAAM,IAAI,MAAM,CAAC,OAAO,EAAE;QACzB,OAAO,OAAO,CAAC,WAAW,CAAC,CAAC;KAC7B;SAAM;QACL,IAAI,YAAY,CAAC,MAAM,CAAC,EAAE;YACxB,OAAO,CACL,oBAAC,MAAM,IAAC,IAAI,EAAE,GAAG;gBACf,oBAAC,YAAY,OAAG,CACT,CACV,CAAC;SACH;QAED,OAAO,CACL,oBAAC,MAAM,IAAC,IAAI,EAAE,GAAG,EAAE,KAAK,EAAE,MAAM,CAAC,KAAK,IACnC,SAAS,CAAC,CAAC,CAAC,CACX,oBAAC,SAAS,IAAC,KAAK,EAAE,MAAM,CAAC,KAAK,GAAI,CACnC,CAAC,CAAC,CAAC,CACF,oBAAC,YAAY,IAAC,KAAK,EAAE,MAAM,CAAC,KAAK,GAAI,CACtC,CACM,CACV,CAAC;KACH;AACH,CAAC,CAAC;AAEF,eAAe,aAAa,CAAC"}
@@ -8,9 +8,9 @@ export type DynamicRouteProps = {
8
8
  productPage: ComponentType<ProductProps>;
9
9
  categoryPage: ComponentType<CategoryProps>;
10
10
  contentPage: ComponentType<ContentProps>;
11
- notFoundPage: React.SFC<any>;
12
- LoadingPage?: React.SFC<any>;
13
- ErrorPage?: React.SFC<any>;
11
+ notFoundPage: React.FC<any>;
12
+ LoadingPage?: React.FC<any>;
13
+ ErrorPage?: React.FC<any>;
14
14
  routeQuery: DocumentNode;
15
15
  } & RouteComponentProps<any>;
16
16
  declare const DynamicRoute: (props: DynamicRouteProps) => JSX.Element;
@@ -1,6 +1,6 @@
1
1
  import PaginationProvider, { usePagination } from '@jetshop/core/components/Pagination/PaginationProvider';
2
2
  import SortOrderContainer from '@jetshop/core/components/SortOrder/SortOrderContainer';
3
- import GenericError from '@jetshop/ui/ErrorBoundary/Generic';
3
+ import GenericError from '@jetshop/core/components/DynamicRoute/GenericError';
4
4
  import { default as React, useEffect } from 'react';
5
5
  import { useQuery, useApolloClient } from 'react-apollo';
6
6
  import { useHistory, useLocation } from 'react-router';
@@ -23,39 +23,6 @@ function useFiltersOnRouteChange() {
23
23
  });
24
24
  }, [client, history]);
25
25
  }
26
- const DynamicRoute = (props) => {
27
- throwErrorInDev(!props.routeQuery, `You forgot to pass 'routeQuery' to DynamicRoute`);
28
- const pagination = usePagination();
29
- if (pagination === undefined) {
30
- // We don't have a PaginationProvider in the tree. Wrap it and render this component again.
31
- return (React.createElement(PaginationProvider, null,
32
- React.createElement(DynamicRoute, Object.assign({}, props))));
33
- }
34
- const { productPage, categoryPage, contentPage, notFoundPage, LoadingPage, ErrorPage, location, routeQuery } = props;
35
- // This is fine since admin is preventing you
36
- // from creating a category named 'articlenumber'.
37
- if (location.pathname.substr(0, 14) === '/articlenumber') {
38
- const articleNumber = location.pathname.substr(15);
39
- return React.createElement(ProductByArticlenumber, { articleNumber: articleNumber });
40
- }
41
- if (location.pathname === '/undefined') {
42
- return null;
43
- }
44
- else {
45
- return (React.createElement(SortOrderContainer, null, ({ sortOrder, direction }) => (React.createElement(RouteQuery, Object.assign({ key: location.pathname }, {
46
- pagination,
47
- sortOrder,
48
- direction,
49
- routeQuery,
50
- productPage,
51
- categoryPage,
52
- contentPage,
53
- notFoundPage,
54
- LoadingPage,
55
- ErrorPage
56
- })))));
57
- }
58
- };
59
26
  const RouteQuery = ({ pagination, sortOrder, direction, routeQuery, productPage, categoryPage, contentPage, notFoundPage, LoadingPage, ErrorPage }) => {
60
27
  var _a, _b, _c, _d;
61
28
  const location = useLocation();
@@ -92,5 +59,38 @@ const RouteQuery = ({ pagination, sortOrder, direction, routeQuery, productPage,
92
59
  data && React.createElement(Head, { data: data, route: route }),
93
60
  React.createElement(RouteResolver, { productPage: productPage, categoryPage: categoryPage, contentPage: contentPage, notFoundPage: notFoundPage, LoadingPage: LoadingPage, ErrorPage: ErrorPage, result: result, pathname: location.pathname, state: location.state, search: location.search })));
94
61
  };
62
+ const DynamicRoute = (props) => {
63
+ throwErrorInDev(!props.routeQuery, `You forgot to pass 'routeQuery' to DynamicRoute`);
64
+ const pagination = usePagination();
65
+ if (pagination === undefined) {
66
+ // We don't have a PaginationProvider in the tree. Wrap it and render this component again.
67
+ return (React.createElement(PaginationProvider, null,
68
+ React.createElement(DynamicRoute, Object.assign({}, props))));
69
+ }
70
+ const { productPage, categoryPage, contentPage, notFoundPage, LoadingPage, ErrorPage, location, routeQuery } = props;
71
+ // This is fine since admin is preventing you
72
+ // from creating a category named 'articlenumber'.
73
+ if (location.pathname.substr(0, 14) === '/articlenumber') {
74
+ const articleNumber = location.pathname.substr(15);
75
+ return React.createElement(ProductByArticlenumber, { articleNumber: articleNumber });
76
+ }
77
+ if (location.pathname === '/undefined') {
78
+ return null;
79
+ }
80
+ else {
81
+ return (React.createElement(SortOrderContainer, null, ({ sortOrder, direction }) => (React.createElement(RouteQuery, Object.assign({ key: location.pathname }, {
82
+ pagination,
83
+ sortOrder,
84
+ direction,
85
+ routeQuery,
86
+ productPage,
87
+ categoryPage,
88
+ contentPage,
89
+ notFoundPage,
90
+ LoadingPage,
91
+ ErrorPage
92
+ })))));
93
+ }
94
+ };
95
95
  export default DynamicRoute;
96
96
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["index.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AY;YACZ,WAAW;YACX,YAAY;YACZ,WAAW;YACX,SAAS;SACV,EACD,CACH,CACkB,CACtB,CAAC;KACH;AACH,CAAC,CAAC;AAkBF,eAAe,YAAY,CAAC"}
@@ -1,5 +1,5 @@
1
- import { routeType } from '@jetshop/ui/ScrollRestorationHandler/ScrollRestorationHandler';
2
1
  import { History, Location } from 'history';
2
+ export type routeType = 'sortOrderChange' | 'filterChange' | 'paginationChange' | 'Product' | 'Category' | 'Page';
3
3
  interface ReplaceInSearch {
4
4
  history: History;
5
5
  location: Location;
@@ -1 +1 @@
1
- {"version":3,"file":"replaceInSearch.js","sourceRoot":"","sources":["replaceInSearch.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,sDAAsD,CAAC;AAGnF,OAAO,EAAE,MAAM,IAAI,CAAC;AAUpB,MAAM,UAAU,eAAe,CAAC,EAC9B,OAAO,EACP,QAAQ,EACR,WAAW,EACX,WAAW,EACX,SAAS,EACO;IAChB,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE,GAAG,QAAQ,CAAC;IACpC,MAAM,aAAa,GAAG,EAAE,CAAC,KAAK,CAAC,QAAQ,CAAC,MAAM,EAAE,EAAE,iBAAiB,EAAE,IAAI,EAAE,CAAC,CAAC;IAC7E,MAAM,YAAY,GAAG,EAAE,CAAC,KAAK,CAAC,WAAW,CAAC,CAAC;IAC3C,MAAM,CAAC,UAAU,EAAE,YAAY,CAAC,GAAG,MAAM,CAAC,OAAO,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC,CAAC;IAEnE,MAAM,SAAS,mCACV,aAAa,KAChB,CAAC,UAAU,CAAC,EAAE,WAAW;YACvB,CAAC,CAAC,YAAY;YACd,CAAC,iCAAM,aAAa,CAAC,UAAU,CAAC,GAAM,YAAoB,CAAE,GAC/D,CAAC;IAEF,IAAI,YAAY,KAAK,EAAE,IAAI,WAAW,EAAE;QACtC,OAAO,SAAS,CAAC,UAAU,CAAC,CAAC;KAC9B;IAED,OAAO,WAAW,CAAC;QACjB,OAAO;QACP,QAAQ;QACR,IAAI;QACJ,MAAM,EAAE,SAAS;QACjB,SAAS,EAAE,IAAI;QACf,SAAS;KACV,CAAC,CAAC;AACL,CAAC"}
1
+ {"version":3,"file":"replaceInSearch.js","sourceRoot":"","sources":["replaceInSearch.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,sDAAsD,CAAC;AAEnF,OAAO,EAAE,MAAM,IAAI,CAAC;AAkBpB,MAAM,UAAU,eAAe,CAAC,EAC9B,OAAO,EACP,QAAQ,EACR,WAAW,EACX,WAAW,EACX,SAAS,EACO;IAChB,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE,GAAG,QAAQ,CAAC;IACpC,MAAM,aAAa,GAAG,EAAE,CAAC,KAAK,CAAC,QAAQ,CAAC,MAAM,EAAE,EAAE,iBAAiB,EAAE,IAAI,EAAE,CAAC,CAAC;IAC7E,MAAM,YAAY,GAAG,EAAE,CAAC,KAAK,CAAC,WAAW,CAAC,CAAC;IAC3C,MAAM,CAAC,UAAU,EAAE,YAAY,CAAC,GAAG,MAAM,CAAC,OAAO,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC,CAAC;IAEnE,MAAM,SAAS,mCACV,aAAa,KAChB,CAAC,UAAU,CAAC,EAAE,WAAW;YACvB,CAAC,CAAC,YAAY;YACd,CAAC,iCAAM,aAAa,CAAC,UAAU,CAAC,GAAM,YAAoB,CAAE,GAC/D,CAAC;IAEF,IAAI,YAAY,KAAK,EAAE,IAAI,WAAW,EAAE;QACtC,OAAO,SAAS,CAAC,UAAU,CAAC,CAAC;KAC9B;IAED,OAAO,WAAW,CAAC;QACjB,OAAO;QACP,QAAQ;QACR,IAAI;QACJ,MAAM,EAAE,SAAS;QACjB,SAAS,EAAE,IAAI;QACf,SAAS;KACV,CAAC,CAAC;AACL,CAAC"}
@@ -10,8 +10,8 @@ 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
- }, (err) => {
14
- console.log(`Font ${primaryFont} not available with reason: \n${err}`);
13
+ }, () => {
14
+ console.log(`Font ${primaryFont} not available`);
15
15
  });
16
16
  }
17
17
  // observe any secondary fonts
@@ -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,EAAE,GAAG,CAAC,CAAC,WAAW,EAAE,QAAQ,CAAC;AAC7D,CAAC;AAED,MAAM,UAAU,UAAU,CAAC,WAAoB,EAAE,cAAyB;IACxE,yDAAyD;IACzD,IAAI,WAAW,EAAE;QACf,oBAAoB;QACpB,MAAM,mBAAmB,GAAG,IAAI,QAAQ,CAAC,WAAW,CAAC,CAAC;QACtD,mBAAmB,CAAC,IAAI,EAAE,CAAC,IAAI,CAC7B,GAAG,EAAE;YACH,MAAM,SAAS,GAAG,eAAe,CAAC,WAAW,CAAC,CAAC;YAC/C,QAAQ,IAAI,QAAQ,CAAC,eAAe,CAAC,SAAS,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC;QAChE,CAAC,EACD,CAAC,GAAG,EAAE,EAAE;YACN,OAAO,CAAC,GAAG,CAAC,QAAQ,WAAW,iCAAiC,GAAG,EAAE,CAAC,CAAC;QACzE,CAAC,CACF,CAAC;KACH;IAED,8BAA8B;IAC9B,IAAI,cAAc,IAAI,cAAc,CAAC,MAAM,GAAG,CAAC,EAAE;QAC/C,MAAM,KAAK,GAAG,cAAc,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC;QAE/D,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC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,GAAG,CAAC,EAAE;QAC/C,MAAM,KAAK,GAAG,cAAc,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC;QAE/D,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC,IAAI,CAC1C,UAAU,CAAC;YACT,CAAC,CAAC,GAAG,CAAC,CAAC,GAAQ,EAAE,EAAE;gBACjB,MAAM,SAAS,GAAG,eAAe,CAAC,GAAG,CAAC,MAAM,CAAC,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"}
@@ -16,7 +16,7 @@ import { useMutation, useApolloClient } from '@apollo/react-hooks';
16
16
  import { getAddToCartOptimisticResponse } from '@jetshop/core/components/Mutation/cartMutationUtils';
17
17
  import t from '@jetshop/intl';
18
18
  import uniqueId from '@jetshop/core/helpers/uniqueId';
19
- import { useStockStatus } from '@jetshop/ui/Stock/StockStatusContainer';
19
+ import { useStockStatus } from '@jetshop/core/hooks/useStockStatus';
20
20
  import { useTrackProductAdd, getCommentsFromFormikValues, addToCartSuccess, addToCartError, getArticleNumber } from './AddToCart/addToCartUtils';
21
21
  import throwErrorInDev from '../../helpers/throwErrorInDev';
22
22
  import { useDynamicPrice } from '@jetshop/core/hooks/useDynamicPrice';
@@ -1 +1 @@
1
- {"version":3,"file":"AddToCartFormik.js","sourceRoot":"","sources":["AddToCartFormik.tsx"],"names":[],"mappings":";;;;;;;;;;;AAAA,OAAO,KAAK,EAAE,EAAE,UAAU,EAAE,MAAM,OAA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AC,CAAC,CAAC;IAEL,MAAM,cAAc,GAAY,EAAE,CAAC;IACnC,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC,MAAM,EAAE,EAAE;QAC1C,cAAc,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,EAAE,CAAC;IACnC,CAAC,CAAC,CAAC;IACH,MAAM,qBAAqB,mBACzB,QAAQ,EAAE,CAAC,EACX,QAAQ,EAAE,eAAe,EACzB,OAAO,EAAE,cAAc,IACpB,aAAa,CACjB,CAAC;IAEF,MAAM,EAAE,QAAQ,EAAE,GAAG,WAAW,CAAC;QAC/B,iBAAiB;QACjB,aAAa;QACb,OAAO;QACP,OAAO;QACP,iBAAiB;KAClB,CAAC,CAAC;IAEH,MAAM,EAAE,QAAQ,EAAE,GAAG,YAAY,CAAC;QAChC,aAAa;QACb,YAAY;QACZ,SAAS;QACT,eAAe;QACf,kBAAkB;QAClB,gBAAgB;QAChB,OAAO;QACP,OAAO;KACR,CAAC,CAAC;IAEH,OAAO,CACL,oBAAC,MAAM,kBACL,gBAAgB,EAAE,KAAK,EACvB,aAAa,EAAE,qBAAqB,EACpC,QAAQ,EAAE,QAAQ,EAClB,QAAQ,EAAE,QAAQ,EAClB,MAAM,EAAE,CAAC,WAAW,EAAE,EAAE,CAAC,QAAQ,CAAC,WAAW,CAAC,IAC1C,KAAK,EACT,CACH,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,eAAe,CAAC"}
@@ -1,7 +1,6 @@
1
1
  import { useMachine, useService } from '@xstate/react';
2
2
  import React, { createContext, useContext, useCallback } from 'react';
3
3
  import { notificationsMachine } from './notificationsMachine';
4
- import { ReactComponent as Cross } from '@jetshop/ui/svg/Cross.svg';
5
4
  export const NotificationsContext = createContext(undefined);
6
5
  export function NotificationsProvider({ children }) {
7
6
  const [state, send] = useMachine(notificationsMachine);
@@ -10,7 +9,7 @@ export function NotificationsProvider({ children }) {
10
9
  export function Notifications(props) {
11
10
  const [current] = useContext(NotificationsContext);
12
11
  const { context, matches } = current;
13
- return (React.createElement(React.Fragment, null, matches('active') && (React.createElement("div", Object.assign({}, props, { "data-flight-notifications": "" }), context.notifications.map(notification => (React.createElement(Notification, { actor: notification.ref, key: notification.id })))))));
12
+ return (React.createElement(React.Fragment, null, matches('active') && (React.createElement("div", Object.assign({}, props, { "data-flight-notifications": "" }), context.notifications.map((notification) => (React.createElement(Notification, { actor: notification.ref, key: notification.id })))))));
14
13
  }
15
14
  export function Notification({ actor }) {
16
15
  const [{ context, toStrings }, send] = useService(actor);
@@ -21,7 +20,7 @@ export function Notification({ actor }) {
21
20
  return (React.createElement("div", { "data-flight-notification": toStrings(), "data-flight-notification-type": type },
22
21
  React.createElement("div", { "data-flight-notification-inner": "" },
23
22
  React.createElement("button", { onClick: dismiss, "data-flight-notification-dismiss": "" },
24
- React.createElement(Cross, { "aria-label": "Close" })),
23
+ React.createElement("span", { "aria-label": "Close", className: "dismiss-button" }, "\u00D7")),
25
24
  content)));
26
25
  }
27
26
  //# sourceMappingURL=Notifications.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Notifications.js","sourceRoot":"","sources":["Notifications.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AACvD,OAAO,KAAK,EAAE,EAAE,aAAa,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,OAAO,CAAC;AAOtE,OAAO,EAGL,oBAAoB,EAGrB,MAAM,wBAAwB,CAAC;AAChC,OAAO,EAAE,cAAc,IAAI,KAAK,EAAE,MAAM,2BAA2B,CAAC;AAEpE,MAAM,CAAC,MAAM,oBAAoB,GAG5B,aAAa,CAAC,SAAS,CAAC,CAAC;AAE9B,MAAM,UAAU,qBAAqB,CAAC,EACpC,QAAQ,EAGT;IACC,MAAM,CAAC,KAAK,EAAE,IAAI,CAAC,GAAG,UAAU,CAG9B,oBAAoB,CAAC,CAAC;IAExB,OAAO,CACL,oBAAC,oBAAoB,C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,IAAI,CAAC,QAAQ,CAAC,CAAC;IACjB,CAAC,EAAE,CAAC,IAAI,CAAC,CAAC,CAAC;IAEX,OAAO,CACL,yDAC4B,SAAS,EAAE,mCACN,IAAI;QAEnC,+DAAoC,EAAE;YACpC,gCAAQ,OAAO,EAAE,OAAO,sCAAmC,EAAE;gBAC3D,4CAAiB,OAAO,EAAC,SAAS,EAAC,gBAAgB,aAE5C,CACA;YACR,OAAO,CACJ,CACF,CACP,CAAC;AACJ,CAAC"}
@@ -1,5 +1,4 @@
1
1
  fragment StockStatus on StockStatus {
2
- id
3
2
  buyable
4
3
  maxOrderQuantity
5
4
  stockDate
@@ -1,5 +1,9 @@
1
1
  import { ProductSortOrder } from '@jetshop/core/types';
2
- import { MappedSortOrder } from '@jetshop/ui/SortOrder/SortOrder';
2
+ interface MappedSortOrder {
3
+ direction: 'ASCENDING' | 'DESCENDING';
4
+ value: string;
5
+ text: string;
6
+ }
3
7
  export declare function useSortOrder({ sortOrders }: {
4
8
  sortOrders: ProductSortOrder[];
5
9
  }): {
@@ -9,3 +13,4 @@ export declare function useSortOrder({ sortOrders }: {
9
13
  mappedSortOrder: MappedSortOrder[];
10
14
  };
11
15
  export declare function getMappedSortOrder(sortOrders: ProductSortOrder[]): MappedSortOrder[];
16
+ export {};
@@ -1 +1 @@
1
- {"version":3,"file":"useSortOrder.js","sourceRoot":"","sources":["useSortOrder.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,SAAS,EACT,UAAU,EACX,MAAM,uDAAuD,CAAC;AAC/D,OAAO,gBAAgB,MAAM,qDAAqD,CAAC;AAEnF,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B,MAAM,UAAU,YAAY,CAAC,EAC3B,UAAU,EAGX;IACC,+DAA+D;IAC/D,2DAA2D;IAC3D,MAAM,EAAE,eAAe,EAAE,SAAS,EAAE,SAAS,EAAE,GAC7C,KAAK,CAAC,UAAU,CAAC,gBAAgB,CAAC,CAAC;IACrC,MAAM,eAAe,GA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AU,CAAC,MAAM,CAAC,CAAC,KAAK,EAAE,IAAI,EAAE,EAAE;QACvC,MAAM,YAAY,GAAG,UAAU,CAAC,SAAS,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE;YAClE,uCACK,IAAI,KACP,IAAI,EAAE,CACJ;oBACG,IAAI,CAAC,MAAM,CAAC;;oBAAG,IAAI,CAAC,IAAI,CACpB,CACR,EACD,SAAS,EAAE,IAAI,CAAC,SAAS,IACzB;QACJ,CAAC,CAAC,CAAC;QACH,OAAO,CAAC,GAAG,KAAK,EAAE,GAAG,YAAY,CAAC,CAAC;IACrC,CAAC,EAAE,EAAE,CAAC,CAAC;AACT,CAAC"}
@@ -3,7 +3,7 @@ export type UpdateItem = (articleNumber: string, variantArticleNumber: string, v
3
3
  export declare function usePackageProductItem(item: PackageItem, updateItem: UpdateItem, { preselectCheapest }?: {
4
4
  preselectCheapest?: boolean;
5
5
  }): {
6
- stockStatus: import("@jetshop/ui/Stock/StockStatusContainer").StockStatusContainerRender;
6
+ stockStatus: import("@jetshop/core/hooks/useStockStatus").StockStatusContainerRender;
7
7
  variantHandler: {
8
8
  selectedVariant: import("../../types").ProductVariant;
9
9
  validation: import("../useProductVariants/useProductVariants").VariantValidation;
@@ -1,5 +1,5 @@
1
1
  import { useProductVariants } from '../useProductVariants';
2
- import { useStockStatus } from '@jetshop/ui/Stock/StockStatusContainer';
2
+ import { useStockStatus } from '@jetshop/core/hooks/useStockStatus';
3
3
  import { useEffect } from 'react';
4
4
  export function usePackageProductItem(item, updateItem, { preselectCheapest } = {}) {
5
5
  var _a;
@@ -1 +1 @@
1
- {"version":3,"file":"usePackageProductItem.js","sourceRoot":"","sources":["usePackageProductItem.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAC3D,OAAO,EAAE,cAAc,EAAE,MAAM,wCAAwC,CAAC;AACxE,OAAO,EAAE,SA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AAiB,GAAG,cAAc,CAAC,UAAU,CAAC;IACpD,MAAM,4BAA4B,GAChC,MAAA,cAAc,CAAC,eAAe,0CAAE,aAAa,CAAC;IAChD,MAAM,WAAW,GAAG,cAAc,CAAC,cAAc,CAAC,eAAe,IAAI,OAAO,CAAC,CAAC;IAE9E,SAAS,CAAC,GAAG,EAAE;QACb,UAAU,CACR,OAAO,CAAC,aAAa,EACrB,4BAA4B,EAC5B,iBAAiB,KAAK,OAAO,CAC9B,CAAC;IACJ,CAAC,EAAE;QACD,OAAO,CAAC,aAAa;QACrB,4BAA4B;QAC5B,UAAU;QACV,cAAc,CAAC,eAAe;QAC9B,iBAAiB;KAClB,CAAC,CAAC;IAEH,OAAO;QACL,WAAW;QACX,cAAc;KACf,CAAC;AACJ,CAAC"}
@@ -0,0 +1,8 @@
1
+ import { Maybe, Product, ProductVariant, Scalars } from '@jetshop/core/types';
2
+ export interface StockStatusContainerRender {
3
+ status: Maybe<'inStock' | 'outOfStock' | 'notifyWhenBack'>;
4
+ text: Maybe<string>;
5
+ maxOrderQuantity?: number | null;
6
+ stockDate?: Scalars['DateTime'];
7
+ }
8
+ export declare function useStockStatus(product: Product | ProductVariant): StockStatusContainerRender;
@@ -0,0 +1,26 @@
1
+ function getStatus(statusObject) {
2
+ return statusObject.buyable
3
+ ? 'inStock'
4
+ : statusObject.stockNotificationEnabled
5
+ ? 'notifyWhenBack'
6
+ : 'outOfStock';
7
+ }
8
+ export function useStockStatus(product) {
9
+ const stockStatus = product === null || product === void 0 ? void 0 : product.stockStatus;
10
+ if (!stockStatus) {
11
+ console.warn('The provided product does not have a stockStatus');
12
+ return {
13
+ status: null,
14
+ text: null,
15
+ maxOrderQuantity: null,
16
+ stockDate: null
17
+ };
18
+ }
19
+ return {
20
+ status: getStatus(stockStatus),
21
+ text: stockStatus.text || null,
22
+ maxOrderQuantity: stockStatus.maxOrderQuantity,
23
+ stockDate: stockStatus.stockDate
24
+ };
25
+ }
26
+ //# sourceMappingURL=useStockStatus.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useStockStatus.js","sourceRoot":"","sources":["useStockStatus.ts"],"names":[],"mappings":"AAeA,SAAS,SAAS,CAChB,YAAyB;IAEzB,OAAO,YAAY,CAAC,OAAO;QACzB,CAAC,CAAC,SAAS;QACX,CAAC,CAAC,YAAY,CAAC,wBAAwB;YACvC,CAAC,CAAC,gBAAgB;YAClB,CAAC,CAAC,YAAY,CAAC;AACnB,CAAC;AAED,MAAM,UAAU,cAAc,CAC5B,OAAiC;IAEjC,MAAM,WAAW,GAAG,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,WAAW,CAAC;IAEzC,IAAI,CAAC,WAAW,EAAE;QAChB,OAAO,CAAC,IAAI,CAAC,kDAAkD,CAAC,CAAC;QACjE,OAAO;YACL,MAAM,EAAE,IAAI;YACZ,IAAI,EAAE,IAAI;YACV,gBAAgB,EAAE,IAAI;YACtB,SAAS,EAAE,IAAI;SAChB,CAAC;KACH;IAED,OAAO;QACL,MAAM,EAAE,SAAS,CAAC,WAAW,CAAC;QAC9B,IAAI,EAAE,WAAW,CAAC,IAAI,IAAI,IAAI;QAC9B,gBAAgB,EAAE,WAAW,CAAC,gBAAgB;QAC9C,SAAS,EAAE,WAAW,CAAC,SAAS;KACjC,CAAC;AACJ,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jetshop/core",
3
- "version": "5.17.0-alpha.b238da57",
3
+ "version": "5.17.0-alpha.b296b0b3",
4
4
  "license": "MIT",
5
5
  "files": [
6
6
  "**/*.js",
@@ -8,7 +8,8 @@ export const isListFilterActive = function isListFilterActive(parent) {
8
8
  var _a, _b, _c;
9
9
  const query = __IN_SERVER__ ? searchParams : document.location.search;
10
10
  // e.g. Armchair:product-type:151
11
- const [, name, category] = parent.id.split(':');
11
+ // We reverse this to allow ':' in the filter value
12
+ const [category, name] = parent.id.split(':').reverse();
12
13
  // Get the list filters from the search params
13
14
  // e.g.
14
15
  // {
@@ -50,14 +51,14 @@ export const toggleListFilterItem = function toggleListFilterItem(_, { value, pa
50
51
  `,
51
52
  id: fragmentId
52
53
  });
53
- const data = produce(listItem, draft => {
54
+ const data = produce(listItem, (draft) => {
54
55
  const { items } = draft;
55
56
  // Find the item matching the value passed in as an arg
56
- const item = items.find(item => item.value === value);
57
+ const item = items.find((item) => item.value === value);
57
58
  // If `set` was passed, set the active state to it. Otherwise, toggle
58
59
  item.isActive = typeof set === 'boolean' ? set : !item.isActive;
59
60
  // If there are any active items, set hasActiveItems to true on the ListFilter
60
- draft.hasActiveItems = items.some(item => item.isActive);
61
+ draft.hasActiveItems = items.some((item) => item.isActive);
61
62
  });
62
63
  cache.writeData({
63
64
  id: fragmentId,
@@ -90,16 +91,16 @@ function updateActiveListFilters(cache, data) {
90
91
  const currentActiveFilters = cache.readQuery({
91
92
  query: activeListFilterQuery
92
93
  });
93
- const activeFilters = produce(currentActiveFilters, draft => {
94
+ const activeFilters = produce(currentActiveFilters, (draft) => {
94
95
  // Check if the filter that was just toggled is already in activeFilters
95
- const existingListFilter = draft.activeFilters.listFilters.find(filter => filter.id === data.id);
96
+ const existingListFilter = draft.activeFilters.listFilters.find((filter) => filter.id === data.id);
96
97
  // Get an array of ListFilterItem values
97
98
  const activeListFilters = data.items
98
- .filter(item => item.isActive)
99
- .map(item => item.value);
99
+ .filter((item) => item.isActive)
100
+ .map((item) => item.value);
100
101
  // If there are no active ListFilterItems, remove this ListFilter from ActiveFilters
101
102
  if (activeListFilters.length === 0) {
102
- draft.activeFilters.listFilters = draft.activeFilters.listFilters.filter(listFilter => listFilter.id !== existingListFilter.id);
103
+ draft.activeFilters.listFilters = draft.activeFilters.listFilters.filter((listFilter) => listFilter.id !== existingListFilter.id);
103
104
  return;
104
105
  }
105
106
  if (existingListFilter) {
@@ -1 +1 @@
1
- {"version":3,"file":"listFilterItem.js","sourceRoot":"","sources":["listFilterItem.ts"],"names":[],"mappings":"AACA,OAAO,GAAG,MAAM,aAAa,CA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