@contentful/experiences-sdk-react 1.23.0-dev-20241122T1751-70e35fe.0 → 1.23.0-dev-20241126T1224-4ec25c2.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.
- package/dist/hooks/useFetchById.js +4 -1
- package/dist/hooks/useFetchById.js.map +1 -1
- package/dist/hooks/useFetchBySlug.js +4 -1
- package/dist/hooks/useFetchBySlug.js.map +1 -1
- package/dist/sdkVersion.js +1 -1
- package/dist/sdkVersion.js.map +1 -1
- package/dist/src/sdkVersion.d.ts +1 -1
- package/package.json +6 -6
|
@@ -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
|
-
|
|
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,
|
|
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
|
-
|
|
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,
|
|
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;;;;"}
|
package/dist/sdkVersion.js
CHANGED
package/dist/sdkVersion.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sdkVersion.js","sources":["../../src/sdkVersion.ts"],"sourcesContent":["export const SDK_VERSION = '1.23.0-dev-
|
|
1
|
+
{"version":3,"file":"sdkVersion.js","sources":["../../src/sdkVersion.ts"],"sourcesContent":["export const SDK_VERSION = '1.23.0-dev-20241126T1224-4ec25c2.0';\n"],"names":[],"mappings":"AAAO,MAAM,WAAW,GAAG;;;;"}
|
package/dist/src/sdkVersion.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const SDK_VERSION = "1.23.0-dev-
|
|
1
|
+
export declare const SDK_VERSION = "1.23.0-dev-20241126T1224-4ec25c2.0";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@contentful/experiences-sdk-react",
|
|
3
|
-
"version": "1.23.0-dev-
|
|
3
|
+
"version": "1.23.0-dev-20241126T1224-4ec25c2.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-
|
|
45
|
-
"@contentful/experiences-core": "1.23.0-dev-
|
|
46
|
-
"@contentful/experiences-validators": "1.23.0-dev-
|
|
47
|
-
"@contentful/experiences-visual-editor-react": "1.23.0-dev-
|
|
44
|
+
"@contentful/experiences-components-react": "1.23.0-dev-20241126T1224-4ec25c2.0",
|
|
45
|
+
"@contentful/experiences-core": "1.23.0-dev-20241126T1224-4ec25c2.0",
|
|
46
|
+
"@contentful/experiences-validators": "1.23.0-dev-20241126T1224-4ec25c2.0",
|
|
47
|
+
"@contentful/experiences-visual-editor-react": "1.23.0-dev-20241126T1224-4ec25c2.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": "
|
|
105
|
+
"gitHead": "fbdcdcf7065f8ed86dd2807dceb58d917d11eb34"
|
|
106
106
|
}
|