@contentful/experiences-core 3.3.0-dev-20250820T0950-c569ea0.0 → 3.3.0-dev-20250820T1056-fd92026.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/deep-binding/DeepReference.d.ts +2 -2
- package/dist/index.d.ts +1 -1
- package/dist/index.js +57 -8
- package/dist/index.js.map +1 -1
- package/dist/utils/pathSchema.d.ts +13 -1
- package/package.json +3 -3
|
@@ -1,9 +1,19 @@
|
|
|
1
|
+
import { ComponentPropertyValue, BoundValue } from '@contentful/experiences-validators';
|
|
1
2
|
import { Entry, Asset } from 'contentful';
|
|
2
3
|
|
|
3
4
|
/**
|
|
4
5
|
* This module encapsulates format of the path to a deep reference.
|
|
5
6
|
*/
|
|
6
7
|
|
|
8
|
+
type PreboundVariable = {
|
|
9
|
+
type: 'BoundValue';
|
|
10
|
+
path: string;
|
|
11
|
+
isPrebound: boolean;
|
|
12
|
+
pathsByContentType: Record<string, {
|
|
13
|
+
path: string;
|
|
14
|
+
}>;
|
|
15
|
+
};
|
|
16
|
+
declare const isPreboundProp: (variable: ComponentPropertyValue) => variable is PreboundVariable;
|
|
7
17
|
type UnresolvedFieldset = Array<[null, string, string?]>;
|
|
8
18
|
type Fieldset = Array<[Entry | Asset, string, string?]>;
|
|
9
19
|
declare const parseDataSourcePathIntoFieldset: (path: string) => UnresolvedFieldset;
|
|
@@ -26,6 +36,8 @@ declare const parseDataSourcePathWithL1DeepBindings: (path: string) => {
|
|
|
26
36
|
* @returns
|
|
27
37
|
*/
|
|
28
38
|
declare const isDeepPath: (deepPathCandidate: string) => boolean;
|
|
39
|
+
declare const isDeepPrebinding: (boundValueProperty: BoundValue) => boolean;
|
|
40
|
+
declare const getPrebindingPathBySourceEntry: (preboundValueProperty: PreboundVariable, getHeadEntityByDataSourceKey: (id: string) => Entry | Asset | undefined) => string | undefined;
|
|
29
41
|
declare const lastPathNamedSegmentEq: (path: string, expectedName: string) => boolean;
|
|
30
42
|
|
|
31
|
-
export { type Fieldset, type UnresolvedFieldset, isDeepPath, lastPathNamedSegmentEq, parseDataSourcePathIntoFieldset, parseDataSourcePathWithL1DeepBindings };
|
|
43
|
+
export { type Fieldset, type PreboundVariable, type UnresolvedFieldset, getPrebindingPathBySourceEntry, isDeepPath, isDeepPrebinding, isPreboundProp, lastPathNamedSegmentEq, parseDataSourcePathIntoFieldset, parseDataSourcePathWithL1DeepBindings };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@contentful/experiences-core",
|
|
3
|
-
"version": "3.3.0-dev-
|
|
3
|
+
"version": "3.3.0-dev-20250820T1056-fd92026.0",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"module": "dist/index.js",
|
|
@@ -70,12 +70,12 @@
|
|
|
70
70
|
"vitest": "^2.1.1"
|
|
71
71
|
},
|
|
72
72
|
"dependencies": {
|
|
73
|
-
"@contentful/experiences-validators": "3.3.0-dev-
|
|
73
|
+
"@contentful/experiences-validators": "3.3.0-dev-20250820T1056-fd92026.0",
|
|
74
74
|
"@contentful/rich-text-types": "^17.0.0",
|
|
75
75
|
"zustand": "^4.4.7"
|
|
76
76
|
},
|
|
77
77
|
"peerDependencies": {
|
|
78
78
|
"contentful": ">=10.6.0"
|
|
79
79
|
},
|
|
80
|
-
"gitHead": "
|
|
80
|
+
"gitHead": "5e2d4166f15ea59862f94a54f0f3f3ac71e8280c"
|
|
81
81
|
}
|