@sitecore-jss/sitecore-jss-nextjs 21.6.0-canary.3 → 21.6.0-canary.31

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 (41) hide show
  1. package/README.md +1 -4
  2. package/context.d.ts +1 -0
  3. package/context.js +1 -0
  4. package/dist/cjs/context/context.js +63 -0
  5. package/dist/cjs/context/index.js +5 -0
  6. package/dist/cjs/editing/constants.js +6 -0
  7. package/dist/cjs/editing/editing-data-middleware.js +2 -2
  8. package/dist/cjs/editing/editing-data-service.js +15 -7
  9. package/dist/cjs/editing/editing-render-middleware.js +31 -8
  10. package/dist/cjs/graphql/index.js +6 -0
  11. package/dist/cjs/index.js +10 -5
  12. package/dist/cjs/middleware/personalize-middleware.js +41 -32
  13. package/dist/cjs/services/base-graphql-sitemap-service.js +8 -0
  14. package/dist/esm/context/context.js +59 -0
  15. package/dist/esm/context/index.js +1 -0
  16. package/dist/esm/editing/constants.js +3 -0
  17. package/dist/esm/editing/editing-data-middleware.js +1 -1
  18. package/dist/esm/editing/editing-data-service.js +13 -5
  19. package/dist/esm/editing/editing-render-middleware.js +31 -8
  20. package/dist/esm/graphql/index.js +1 -0
  21. package/dist/esm/index.js +8 -2
  22. package/dist/esm/middleware/personalize-middleware.js +42 -33
  23. package/dist/esm/services/base-graphql-sitemap-service.js +9 -1
  24. package/graphql.d.ts +1 -0
  25. package/graphql.js +1 -0
  26. package/package.json +9 -8
  27. package/types/ComponentBuilder.d.ts +1 -0
  28. package/types/components/ComponentPropsContext.d.ts +1 -0
  29. package/types/components/Link.d.ts +1 -0
  30. package/types/components/NextImage.d.ts +1 -0
  31. package/types/components/Placeholder.d.ts +1 -0
  32. package/types/context/context.d.ts +104 -0
  33. package/types/context/index.d.ts +1 -0
  34. package/types/editing/constants.d.ts +3 -0
  35. package/types/editing/editing-data-service.d.ts +12 -4
  36. package/types/editing/editing-render-middleware.d.ts +10 -0
  37. package/types/graphql/index.d.ts +1 -0
  38. package/types/index.d.ts +6 -2
  39. package/types/middleware/personalize-middleware.d.ts +20 -15
  40. package/types/services/base-graphql-sitemap-service.d.ts +10 -3
  41. package/types/sharedTypes/module-factory.d.ts +1 -0
@@ -1,4 +1,4 @@
1
- import { GraphQLClient, PageInfo } from '@sitecore-jss/sitecore-jss/graphql';
1
+ import { GraphQLClient, GraphQLRequestClientFactory, PageInfo } from '@sitecore-jss/sitecore-jss/graphql';
2
2
  /** @private */
3
3
  export declare const languageError = "The list of languages cannot be empty";
4
4
  export declare const siteError = "The service needs a site name";
@@ -68,17 +68,24 @@ export type RouteListQueryResult = {
68
68
  export interface BaseGraphQLSitemapServiceConfig extends Omit<SiteRouteQueryVariables, 'language' | 'siteName'> {
69
69
  /**
70
70
  * Your Graphql endpoint
71
+ * @deprecated use @param clientFactory property instead
71
72
  */
72
- endpoint: string;
73
+ endpoint?: string;
73
74
  /**
74
75
  * The API key to use for authentication.
76
+ * @deprecated use @param clientFactory property instead
75
77
  */
76
- apiKey: string;
78
+ apiKey?: string;
77
79
  /**
78
80
  * A flag for whether to include personalized routes in service output - only works on XM Cloud
79
81
  * turned off by default
80
82
  */
81
83
  includePersonalizedRoutes?: boolean;
84
+ /**
85
+ * A GraphQL Request Client Factory is a function that accepts configuration and returns an instance of a GraphQLRequestClient.
86
+ * This factory function is used to create and configure GraphQL clients for making GraphQL API requests.
87
+ */
88
+ clientFactory?: GraphQLRequestClientFactory;
82
89
  }
83
90
  /**
84
91
  * Object model of a site page item.
@@ -1,3 +1,4 @@
1
+ /// <reference types="@types/react" />
1
2
  import { ComponentType } from 'react';
2
3
  import { GetServerSideComponentProps, GetStaticComponentProps } from './component-props';
3
4
  /**