@contentful/experiences-sdk-react 1.23.0-dev-20241122T1751-70e35fe.0 → 1.23.0-dev-20241125T2336-9873919.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -7,7 +7,10 @@ const useFetchById = ({ id, localeCode, client, experienceTypeId, hyperlinkPatte
7
7
  const mode = useDetectCanvasMode({ isClientSide: typeof window !== 'undefined' });
8
8
  const fetchMethod = useCallback(() => {
9
9
  return fetchById({ id, localeCode, client, experienceTypeId });
10
- }, [id, localeCode, client, experienceTypeId]);
10
+ // we purposely don't want to include the client in the dependencies
11
+ // as it can cause infinite loops if the user creates the client in the component
12
+ // eslint-disable-next-line react-hooks/exhaustive-deps
13
+ }, [id, localeCode, experienceTypeId]);
11
14
  const fetchResult = useFetchByBase(fetchMethod, mode);
12
15
  return { ...fetchResult, experience: { ...fetchResult.experience, hyperlinkPattern } };
13
16
  };
@@ -1 +1 @@
1
- {"version":3,"file":"useFetchById.js","sources":["../../../src/hooks/useFetchById.ts"],"sourcesContent":["import { useCallback } from 'react';\nimport type { ContentfulClientApi } from 'contentful';\nimport { useFetchByBase } from './useFetchByBase';\nimport { fetchById } from '@contentful/experiences-core';\nimport { useDetectCanvasMode } from './useDetectCanvasMode';\n\nexport type UseFetchByIdArgs = {\n client: ContentfulClientApi<undefined>;\n id: string;\n experienceTypeId: string;\n localeCode: string;\n hyperlinkPattern?: string;\n};\n\nexport const useFetchById = ({\n id,\n localeCode,\n client,\n experienceTypeId,\n hyperlinkPattern,\n}: UseFetchByIdArgs) => {\n const mode = useDetectCanvasMode({ isClientSide: typeof window !== 'undefined' });\n\n const fetchMethod = useCallback(() => {\n return fetchById({ id, localeCode, client, experienceTypeId });\n }, [id, localeCode, client, experienceTypeId]);\n\n const fetchResult = useFetchByBase(fetchMethod, mode);\n\n return { ...fetchResult, experience: { ...fetchResult.experience, hyperlinkPattern } };\n};\n"],"names":[],"mappings":";;;;;AAca,MAAA,YAAY,GAAG,CAAC,EAC3B,EAAE,EACF,UAAU,EACV,MAAM,EACN,gBAAgB,EAChB,gBAAgB,GACC,KAAI;AACrB,IAAA,MAAM,IAAI,GAAG,mBAAmB,CAAC,EAAE,YAAY,EAAE,OAAO,MAAM,KAAK,WAAW,EAAE,CAAC,CAAC;AAElF,IAAA,MAAM,WAAW,GAAG,WAAW,CAAC,MAAK;AACnC,QAAA,OAAO,SAAS,CAAC,EAAE,EAAE,EAAE,UAAU,EAAE,MAAM,EAAE,gBAAgB,EAAE,CAAC,CAAC;KAChE,EAAE,CAAC,EAAE,EAAE,UAAU,EAAE,MAAM,EAAE,gBAAgB,CAAC,CAAC,CAAC;IAE/C,MAAM,WAAW,GAAG,cAAc,CAAC,WAAW,EAAE,IAAI,CAAC,CAAC;AAEtD,IAAA,OAAO,EAAE,GAAG,WAAW,EAAE,UAAU,EAAE,EAAE,GAAG,WAAW,CAAC,UAAU,EAAE,gBAAgB,EAAE,EAAE,CAAC;AACzF;;;;"}
1
+ {"version":3,"file":"useFetchById.js","sources":["../../../src/hooks/useFetchById.ts"],"sourcesContent":["import { useCallback } from 'react';\nimport type { ContentfulClientApi } from 'contentful';\nimport { useFetchByBase } from './useFetchByBase';\nimport { fetchById } from '@contentful/experiences-core';\nimport { useDetectCanvasMode } from './useDetectCanvasMode';\n\nexport type UseFetchByIdArgs = {\n client: ContentfulClientApi<undefined>;\n id: string;\n experienceTypeId: string;\n localeCode: string;\n hyperlinkPattern?: string;\n};\n\nexport const useFetchById = ({\n id,\n localeCode,\n client,\n experienceTypeId,\n hyperlinkPattern,\n}: UseFetchByIdArgs) => {\n const mode = useDetectCanvasMode({ isClientSide: typeof window !== 'undefined' });\n\n const fetchMethod = useCallback(() => {\n return fetchById({ id, localeCode, client, experienceTypeId });\n // we purposely don't want to include the client in the dependencies\n // as it can cause infinite loops if the user creates the client in the component\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [id, localeCode, experienceTypeId]);\n\n const fetchResult = useFetchByBase(fetchMethod, mode);\n\n return { ...fetchResult, experience: { ...fetchResult.experience, hyperlinkPattern } };\n};\n"],"names":[],"mappings":";;;;;AAca,MAAA,YAAY,GAAG,CAAC,EAC3B,EAAE,EACF,UAAU,EACV,MAAM,EACN,gBAAgB,EAChB,gBAAgB,GACC,KAAI;AACrB,IAAA,MAAM,IAAI,GAAG,mBAAmB,CAAC,EAAE,YAAY,EAAE,OAAO,MAAM,KAAK,WAAW,EAAE,CAAC,CAAC;AAElF,IAAA,MAAM,WAAW,GAAG,WAAW,CAAC,MAAK;AACnC,QAAA,OAAO,SAAS,CAAC,EAAE,EAAE,EAAE,UAAU,EAAE,MAAM,EAAE,gBAAgB,EAAE,CAAC,CAAC;;;;KAIhE,EAAE,CAAC,EAAE,EAAE,UAAU,EAAE,gBAAgB,CAAC,CAAC,CAAC;IAEvC,MAAM,WAAW,GAAG,cAAc,CAAC,WAAW,EAAE,IAAI,CAAC,CAAC;AAEtD,IAAA,OAAO,EAAE,GAAG,WAAW,EAAE,UAAU,EAAE,EAAE,GAAG,WAAW,CAAC,UAAU,EAAE,gBAAgB,EAAE,EAAE,CAAC;AACzF;;;;"}
@@ -7,7 +7,10 @@ const useFetchBySlug = ({ slug, localeCode, client, experienceTypeId, hyperlinkP
7
7
  const mode = useDetectCanvasMode({ isClientSide: typeof window !== 'undefined' });
8
8
  const fetchMethod = useCallback(() => {
9
9
  return fetchBySlug({ slug, localeCode, client, experienceTypeId });
10
- }, [slug, localeCode, client, experienceTypeId]);
10
+ // we purposely don't want to include the client in the dependencies as it can cause infinite loops if the
11
+ // user creates the client in the component
12
+ // eslint-disable-next-line react-hooks/exhaustive-deps
13
+ }, [slug, localeCode, experienceTypeId]);
11
14
  const fetchResult = useFetchByBase(fetchMethod, mode);
12
15
  return { ...fetchResult, experience: { ...fetchResult.experience, hyperlinkPattern } };
13
16
  };
@@ -1 +1 @@
1
- {"version":3,"file":"useFetchBySlug.js","sources":["../../../src/hooks/useFetchBySlug.ts"],"sourcesContent":["import { useCallback } from 'react';\nimport type { ContentfulClientApi } from 'contentful';\nimport { useFetchByBase } from './useFetchByBase';\nimport { fetchBySlug } from '@contentful/experiences-core';\nimport { useDetectCanvasMode } from './useDetectCanvasMode';\n\nexport type UseFetchBySlugArgs = {\n client: ContentfulClientApi<undefined>;\n slug: string;\n experienceTypeId: string;\n localeCode: string;\n /** The pattern being used to generate links for hyperlink properties **/\n hyperlinkPattern?: string;\n};\n\nexport const useFetchBySlug = ({\n slug,\n localeCode,\n client,\n experienceTypeId,\n hyperlinkPattern,\n}: UseFetchBySlugArgs) => {\n const mode = useDetectCanvasMode({ isClientSide: typeof window !== 'undefined' });\n\n const fetchMethod = useCallback(() => {\n return fetchBySlug({ slug, localeCode, client, experienceTypeId });\n }, [slug, localeCode, client, experienceTypeId]);\n\n const fetchResult = useFetchByBase(fetchMethod, mode);\n\n return { ...fetchResult, experience: { ...fetchResult.experience, hyperlinkPattern } };\n};\n"],"names":[],"mappings":";;;;;AAea,MAAA,cAAc,GAAG,CAAC,EAC7B,IAAI,EACJ,UAAU,EACV,MAAM,EACN,gBAAgB,EAChB,gBAAgB,GACG,KAAI;AACvB,IAAA,MAAM,IAAI,GAAG,mBAAmB,CAAC,EAAE,YAAY,EAAE,OAAO,MAAM,KAAK,WAAW,EAAE,CAAC,CAAC;AAElF,IAAA,MAAM,WAAW,GAAG,WAAW,CAAC,MAAK;AACnC,QAAA,OAAO,WAAW,CAAC,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,EAAE,gBAAgB,EAAE,CAAC,CAAC;KACpE,EAAE,CAAC,IAAI,EAAE,UAAU,EAAE,MAAM,EAAE,gBAAgB,CAAC,CAAC,CAAC;IAEjD,MAAM,WAAW,GAAG,cAAc,CAAC,WAAW,EAAE,IAAI,CAAC,CAAC;AAEtD,IAAA,OAAO,EAAE,GAAG,WAAW,EAAE,UAAU,EAAE,EAAE,GAAG,WAAW,CAAC,UAAU,EAAE,gBAAgB,EAAE,EAAE,CAAC;AACzF;;;;"}
1
+ {"version":3,"file":"useFetchBySlug.js","sources":["../../../src/hooks/useFetchBySlug.ts"],"sourcesContent":["import { useCallback } from 'react';\nimport type { ContentfulClientApi } from 'contentful';\nimport { useFetchByBase } from './useFetchByBase';\nimport { fetchBySlug } from '@contentful/experiences-core';\nimport { useDetectCanvasMode } from './useDetectCanvasMode';\n\nexport type UseFetchBySlugArgs = {\n client: ContentfulClientApi<undefined>;\n slug: string;\n experienceTypeId: string;\n localeCode: string;\n /** The pattern being used to generate links for hyperlink properties **/\n hyperlinkPattern?: string;\n};\n\nexport const useFetchBySlug = ({\n slug,\n localeCode,\n client,\n experienceTypeId,\n hyperlinkPattern,\n}: UseFetchBySlugArgs) => {\n const mode = useDetectCanvasMode({ isClientSide: typeof window !== 'undefined' });\n\n const fetchMethod = useCallback(() => {\n return fetchBySlug({ slug, localeCode, client, experienceTypeId });\n // we purposely don't want to include the client in the dependencies as it can cause infinite loops if the\n // user creates the client in the component\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [slug, localeCode, experienceTypeId]);\n\n const fetchResult = useFetchByBase(fetchMethod, mode);\n\n return { ...fetchResult, experience: { ...fetchResult.experience, hyperlinkPattern } };\n};\n"],"names":[],"mappings":";;;;;AAea,MAAA,cAAc,GAAG,CAAC,EAC7B,IAAI,EACJ,UAAU,EACV,MAAM,EACN,gBAAgB,EAChB,gBAAgB,GACG,KAAI;AACvB,IAAA,MAAM,IAAI,GAAG,mBAAmB,CAAC,EAAE,YAAY,EAAE,OAAO,MAAM,KAAK,WAAW,EAAE,CAAC,CAAC;AAElF,IAAA,MAAM,WAAW,GAAG,WAAW,CAAC,MAAK;AACnC,QAAA,OAAO,WAAW,CAAC,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,EAAE,gBAAgB,EAAE,CAAC,CAAC;;;;KAIpE,EAAE,CAAC,IAAI,EAAE,UAAU,EAAE,gBAAgB,CAAC,CAAC,CAAC;IAEzC,MAAM,WAAW,GAAG,cAAc,CAAC,WAAW,EAAE,IAAI,CAAC,CAAC;AAEtD,IAAA,OAAO,EAAE,GAAG,WAAW,EAAE,UAAU,EAAE,EAAE,GAAG,WAAW,CAAC,UAAU,EAAE,gBAAgB,EAAE,EAAE,CAAC;AACzF;;;;"}
@@ -1,4 +1,4 @@
1
- const SDK_VERSION = '1.23.0-dev-20241122T1751-70e35fe.0';
1
+ const SDK_VERSION = '1.23.0-dev-20241125T2336-9873919.0';
2
2
 
3
3
  export { SDK_VERSION };
4
4
  //# sourceMappingURL=sdkVersion.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"sdkVersion.js","sources":["../../src/sdkVersion.ts"],"sourcesContent":["export const SDK_VERSION = '1.23.0-dev-20241122T1751-70e35fe.0';\n"],"names":[],"mappings":"AAAO,MAAM,WAAW,GAAG;;;;"}
1
+ {"version":3,"file":"sdkVersion.js","sources":["../../src/sdkVersion.ts"],"sourcesContent":["export const SDK_VERSION = '1.23.0-dev-20241125T2336-9873919.0';\n"],"names":[],"mappings":"AAAO,MAAM,WAAW,GAAG;;;;"}
@@ -1 +1 @@
1
- export declare const SDK_VERSION = "1.23.0-dev-20241122T1751-70e35fe.0";
1
+ export declare const SDK_VERSION = "1.23.0-dev-20241125T2336-9873919.0";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@contentful/experiences-sdk-react",
3
- "version": "1.23.0-dev-20241122T1751-70e35fe.0",
3
+ "version": "1.23.0-dev-20241125T2336-9873919.0",
4
4
  "main": "./dist/index.js",
5
5
  "module": "./dist/index.js",
6
6
  "typings": "./dist/src/index.d.ts",
@@ -41,10 +41,10 @@
41
41
  "depcruise": "depcruise src"
42
42
  },
43
43
  "dependencies": {
44
- "@contentful/experiences-components-react": "1.23.0-dev-20241122T1751-70e35fe.0",
45
- "@contentful/experiences-core": "1.23.0-dev-20241122T1751-70e35fe.0",
46
- "@contentful/experiences-validators": "1.23.0-dev-20241122T1751-70e35fe.0",
47
- "@contentful/experiences-visual-editor-react": "1.23.0-dev-20241122T1751-70e35fe.0",
44
+ "@contentful/experiences-components-react": "1.23.0-dev-20241125T2336-9873919.0",
45
+ "@contentful/experiences-core": "1.23.0-dev-20241125T2336-9873919.0",
46
+ "@contentful/experiences-validators": "1.23.0-dev-20241125T2336-9873919.0",
47
+ "@contentful/experiences-visual-editor-react": "1.23.0-dev-20241125T2336-9873919.0",
48
48
  "@contentful/rich-text-types": "^16.2.1",
49
49
  "classnames": "^2.3.2",
50
50
  "csstype": "^3.1.2",
@@ -102,5 +102,5 @@
102
102
  "dist",
103
103
  "package.json"
104
104
  ],
105
- "gitHead": "2941db2f26b0d7ec5fc31ceb3920cfcf05cd251d"
105
+ "gitHead": "b363488788cfcf58b9409f528f7d0d5c7aae67a5"
106
106
  }