@squiz/dx-page-contents-lib 1.74.0 → 1.75.1
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/lib/formatted-text.d.ts +27 -0
- package/lib/formatted-text.js +37 -0
- package/lib/formatted-text.js.map +1 -1
- package/lib/formatted-text.spec.js +4 -0
- package/lib/formatted-text.spec.js.map +1 -1
- package/lib/layout-content.d.ts +51 -3
- package/lib/layout-content.js.map +1 -1
- package/lib/layout-content.spec.js +18 -6
- package/lib/layout-content.spec.js.map +1 -1
- package/lib/layouts/custom-layout.d.ts +73 -0
- package/lib/layouts/index.d.ts +320 -0
- package/lib/layouts/raw.layout.d.ts +64 -0
- package/lib/layouts/single-column.layout.d.ts +64 -0
- package/lib/layouts/two-column.layout.d.ts +128 -0
- package/lib/mocks/PageContentsHelpers.d.ts +786 -0
- package/lib/mocks/PageContentsHelpers.js +51 -1
- package/lib/mocks/PageContentsHelpers.js.map +1 -1
- package/lib/mocks/PageContentsMocks.d.ts +1 -0
- package/lib/mocks/PageContentsMocks.js +27 -0
- package/lib/mocks/PageContentsMocks.js.map +1 -1
- package/lib/page-contents-lib.d.ts +16 -0
- package/lib/page-contents-lib.spec.js +61 -15
- package/lib/page-contents-lib.spec.js.map +1 -1
- package/lib/resolvers/create-variant-resolver.js +6 -1
- package/lib/resolvers/create-variant-resolver.js.map +1 -1
- package/lib/resolvers/create-variant-resolver.spec.js +21 -17
- package/lib/resolvers/create-variant-resolver.spec.js.map +1 -1
- package/lib/resolvers/default-layout-resolver.spec.d.ts +1 -0
- package/lib/resolvers/default-layout-resolver.spec.js +36 -0
- package/lib/resolvers/default-layout-resolver.spec.js.map +1 -0
- package/lib/resolvers/default-variation-resolver.spec.js +8 -4
- package/lib/resolvers/default-variation-resolver.spec.js.map +1 -1
- package/package.json +1 -1
|
@@ -1,14 +1,17 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.VariationNodeBuilder = exports.MockNodeFactory = exports.PageContentResolvedMockBuilder = exports.CustomLayoutBuilder = exports.PageTwoColumnLayoutBuilder = exports.PageSingleColumLayoutBuilder = exports.PageRawLayoutBuilder = void 0;
|
|
3
|
+
exports.VariationNodeBuilder = exports.MockNodeFactory = exports.PageContentResolvedMockBuilder = exports.CustomLayoutBuilder = exports.PageTwoColumnLayoutBuilder = exports.PageSingleColumLayoutBuilder = exports.ContentStructureBuilder = exports.PageRawLayoutBuilder = void 0;
|
|
4
4
|
const zod_1 = require("zod");
|
|
5
|
+
const layout_content_1 = require("../layout-content");
|
|
5
6
|
const layouts_1 = require("../layouts");
|
|
7
|
+
const crypto_1 = require("crypto");
|
|
6
8
|
const PageContentsMocks_1 = require("./PageContentsMocks");
|
|
7
9
|
const custom_layout_1 = require("../layouts/custom-layout");
|
|
8
10
|
const PageContentsResolved = zod_1.z.object({
|
|
9
11
|
id: zod_1.z.string(),
|
|
10
12
|
name: zod_1.z.string(),
|
|
11
13
|
layouts: zod_1.z.array(layouts_1.PageLayout),
|
|
14
|
+
content: zod_1.z.optional(zod_1.z.record(zod_1.z.array(layout_content_1.LayoutContentNodes))),
|
|
12
15
|
});
|
|
13
16
|
/**
|
|
14
17
|
* Use this builder for creating mock raw layouts for tests.
|
|
@@ -37,6 +40,32 @@ class PageRawLayoutBuilder {
|
|
|
37
40
|
}
|
|
38
41
|
}
|
|
39
42
|
exports.PageRawLayoutBuilder = PageRawLayoutBuilder;
|
|
43
|
+
/**
|
|
44
|
+
* Use this builder for creating mock content structures for tests.
|
|
45
|
+
* @export
|
|
46
|
+
* @class PageRawLayoutBuilder
|
|
47
|
+
*/
|
|
48
|
+
class ContentStructureBuilder {
|
|
49
|
+
constructor() {
|
|
50
|
+
this.content = {};
|
|
51
|
+
}
|
|
52
|
+
addNode(node, zone) {
|
|
53
|
+
var _a;
|
|
54
|
+
var _b;
|
|
55
|
+
const targetZone = zone || 'default';
|
|
56
|
+
(_a = (_b = this.content)[targetZone]) !== null && _a !== void 0 ? _a : (_b[targetZone] = []);
|
|
57
|
+
this.content[targetZone].push(node);
|
|
58
|
+
return this;
|
|
59
|
+
}
|
|
60
|
+
reset() {
|
|
61
|
+
this.content = {};
|
|
62
|
+
return this;
|
|
63
|
+
}
|
|
64
|
+
build() {
|
|
65
|
+
return this.content;
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
exports.ContentStructureBuilder = ContentStructureBuilder;
|
|
40
69
|
/**
|
|
41
70
|
* Use this builder for creating mock single column layouts for tests.
|
|
42
71
|
* @export
|
|
@@ -151,6 +180,7 @@ class PageContentResolvedMockBuilder {
|
|
|
151
180
|
id: '',
|
|
152
181
|
name: '',
|
|
153
182
|
layouts: [],
|
|
183
|
+
content: undefined,
|
|
154
184
|
};
|
|
155
185
|
this.mockNodeFactory = new MockNodeFactory();
|
|
156
186
|
}
|
|
@@ -166,6 +196,16 @@ class PageContentResolvedMockBuilder {
|
|
|
166
196
|
this.pageContentsResolved.layouts = layouts;
|
|
167
197
|
return this;
|
|
168
198
|
}
|
|
199
|
+
createZone(zoneId) {
|
|
200
|
+
var _a;
|
|
201
|
+
var _b;
|
|
202
|
+
(_a = (_b = this.pageContentsResolved).content) !== null && _a !== void 0 ? _a : (_b.content = {});
|
|
203
|
+
this.pageContentsResolved.content[zoneId] = [];
|
|
204
|
+
return this;
|
|
205
|
+
}
|
|
206
|
+
createContent() {
|
|
207
|
+
return new ContentStructureBuilder();
|
|
208
|
+
}
|
|
169
209
|
createLayout() {
|
|
170
210
|
return new PageRawLayoutBuilder();
|
|
171
211
|
}
|
|
@@ -182,6 +222,10 @@ class PageContentResolvedMockBuilder {
|
|
|
182
222
|
this.pageContentsResolved.layouts.push(layout);
|
|
183
223
|
return this;
|
|
184
224
|
}
|
|
225
|
+
addContent(content) {
|
|
226
|
+
this.pageContentsResolved.content = { ...this.pageContentsResolved.content, ...content };
|
|
227
|
+
return this;
|
|
228
|
+
}
|
|
185
229
|
nodeFactory() {
|
|
186
230
|
return this.mockNodeFactory;
|
|
187
231
|
}
|
|
@@ -228,14 +272,17 @@ class VariationNodeBuilder {
|
|
|
228
272
|
constructor() {
|
|
229
273
|
this.variation = {
|
|
230
274
|
type: 'variation',
|
|
275
|
+
nodeId: (0, crypto_1.randomUUID)(),
|
|
231
276
|
default: {
|
|
232
277
|
node: {
|
|
233
278
|
type: 'tag',
|
|
234
279
|
tag: 'h1',
|
|
280
|
+
nodeId: (0, crypto_1.randomUUID)(),
|
|
235
281
|
children: [
|
|
236
282
|
{
|
|
237
283
|
type: 'text',
|
|
238
284
|
value: 'Hello World!',
|
|
285
|
+
nodeId: (0, crypto_1.randomUUID)(),
|
|
239
286
|
},
|
|
240
287
|
],
|
|
241
288
|
},
|
|
@@ -258,14 +305,17 @@ class VariationNodeBuilder {
|
|
|
258
305
|
reset() {
|
|
259
306
|
this.variation = {
|
|
260
307
|
type: 'variation',
|
|
308
|
+
nodeId: (0, crypto_1.randomUUID)(),
|
|
261
309
|
default: {
|
|
262
310
|
node: {
|
|
263
311
|
type: 'tag',
|
|
264
312
|
tag: 'h1',
|
|
313
|
+
nodeId: (0, crypto_1.randomUUID)(),
|
|
265
314
|
children: [
|
|
266
315
|
{
|
|
267
316
|
type: 'text',
|
|
268
317
|
value: 'Hello World!',
|
|
318
|
+
nodeId: (0, crypto_1.randomUUID)(),
|
|
269
319
|
},
|
|
270
320
|
],
|
|
271
321
|
},
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PageContentsHelpers.js","sourceRoot":"","sources":["../../src/mocks/PageContentsHelpers.ts"],"names":[],"mappings":";;;AAAA,6BAAwB;
|
|
1
|
+
{"version":3,"file":"PageContentsHelpers.js","sourceRoot":"","sources":["../../src/mocks/PageContentsHelpers.ts"],"names":[],"mappings":";;;AAAA,6BAAwB;AACxB,sDAA2F;AAC3F,wCAAwC;AACxC,mCAAoC;AACpC,2DAK6B;AAC7B,4DAA8D;AAG9D,MAAM,oBAAoB,GAAG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exports.VALID_CONTENT_NODES = exports.mockComponentResolver = exports.mockContentItem = void 0;
|
|
4
4
|
exports.generateNestedLayout = generateNestedLayout;
|
|
5
5
|
const PageContentsHelpers_1 = require("./PageContentsHelpers");
|
|
6
|
+
const crypto_1 = require("crypto");
|
|
6
7
|
exports.mockContentItem = {
|
|
7
8
|
schemaName: 'test',
|
|
8
9
|
content: {
|
|
@@ -18,6 +19,7 @@ const mockComponentResolver = async (node) => {
|
|
|
18
19
|
exports.mockComponentResolver = mockComponentResolver;
|
|
19
20
|
function generateNestedLayout(recursionLevel, mockBuilder = new PageContentsHelpers_1.PageContentResolvedMockBuilder()) {
|
|
20
21
|
const layoutNode = {
|
|
22
|
+
nodeId: (0, crypto_1.randomUUID)(),
|
|
21
23
|
type: 'layout',
|
|
22
24
|
layout: {
|
|
23
25
|
template: '<div>{{{top}}}</div><div>{{{bottom}}}</div><div>{{{side}}}</div>',
|
|
@@ -51,6 +53,7 @@ function generateNestedLayout(recursionLevel, mockBuilder = new PageContentsHelp
|
|
|
51
53
|
}
|
|
52
54
|
exports.VALID_CONTENT_NODES = {
|
|
53
55
|
component: {
|
|
56
|
+
nodeId: (0, crypto_1.randomUUID)(),
|
|
54
57
|
type: 'component',
|
|
55
58
|
componentType: 'server',
|
|
56
59
|
componentSet: 'my-component-set',
|
|
@@ -61,6 +64,7 @@ exports.VALID_CONTENT_NODES = {
|
|
|
61
64
|
},
|
|
62
65
|
layout: {
|
|
63
66
|
type: 'layout',
|
|
67
|
+
nodeId: (0, crypto_1.randomUUID)(),
|
|
64
68
|
layout: {
|
|
65
69
|
template: '<div>{{top}}</div><div>{{bottom}}</div><div>{{side}}</div>',
|
|
66
70
|
name: 'mock-dev-layout-basic',
|
|
@@ -75,6 +79,7 @@ exports.VALID_CONTENT_NODES = {
|
|
|
75
79
|
top: [
|
|
76
80
|
{
|
|
77
81
|
type: 'component',
|
|
82
|
+
nodeId: (0, crypto_1.randomUUID)(),
|
|
78
83
|
componentType: 'server',
|
|
79
84
|
componentSet: 'my-component-set',
|
|
80
85
|
componentId: 'my-component-1',
|
|
@@ -86,6 +91,7 @@ exports.VALID_CONTENT_NODES = {
|
|
|
86
91
|
bottom: [
|
|
87
92
|
{
|
|
88
93
|
type: 'component',
|
|
94
|
+
nodeId: (0, crypto_1.randomUUID)(),
|
|
89
95
|
componentType: 'server',
|
|
90
96
|
componentSet: 'my-component-set',
|
|
91
97
|
componentId: 'my-component-1',
|
|
@@ -97,6 +103,7 @@ exports.VALID_CONTENT_NODES = {
|
|
|
97
103
|
side: [
|
|
98
104
|
{
|
|
99
105
|
type: 'component',
|
|
106
|
+
nodeId: (0, crypto_1.randomUUID)(),
|
|
100
107
|
componentType: 'server',
|
|
101
108
|
componentSet: 'my-component-set',
|
|
102
109
|
componentId: 'my-component-1',
|
|
@@ -110,15 +117,18 @@ exports.VALID_CONTENT_NODES = {
|
|
|
110
117
|
text: {
|
|
111
118
|
type: 'text',
|
|
112
119
|
value: 'test',
|
|
120
|
+
nodeId: (0, crypto_1.randomUUID)(),
|
|
113
121
|
},
|
|
114
122
|
tag: {
|
|
115
123
|
type: 'tag',
|
|
116
124
|
tag: 'div',
|
|
117
125
|
children: [],
|
|
126
|
+
nodeId: (0, crypto_1.randomUUID)(),
|
|
118
127
|
},
|
|
119
128
|
fragment: {
|
|
120
129
|
type: 'fragment',
|
|
121
130
|
children: [],
|
|
131
|
+
nodeId: (0, crypto_1.randomUUID)(),
|
|
122
132
|
},
|
|
123
133
|
'link-to-matrix-asset': {
|
|
124
134
|
type: 'link-to-matrix-asset',
|
|
@@ -127,29 +137,35 @@ exports.VALID_CONTENT_NODES = {
|
|
|
127
137
|
matrixDomain: 'my-matrix-domain',
|
|
128
138
|
children: [],
|
|
129
139
|
target: '_blank',
|
|
140
|
+
nodeId: (0, crypto_1.randomUUID)(),
|
|
130
141
|
},
|
|
131
142
|
'matrix-image': {
|
|
132
143
|
type: 'matrix-image',
|
|
133
144
|
matrixIdentifier: 'my-matrix-identifier',
|
|
134
145
|
matrixAssetId: '123',
|
|
135
146
|
matrixDomain: 'my-matrix-domain',
|
|
147
|
+
nodeId: (0, crypto_1.randomUUID)(),
|
|
136
148
|
},
|
|
137
149
|
'dam-image': {
|
|
138
150
|
type: 'dam-image',
|
|
139
151
|
damSystemType: 'bynder',
|
|
140
152
|
damObjectId: '123',
|
|
141
153
|
damSystemIdentifier: 'my-dam-id',
|
|
154
|
+
nodeId: (0, crypto_1.randomUUID)(),
|
|
142
155
|
},
|
|
143
156
|
variation: {
|
|
157
|
+
nodeId: (0, crypto_1.randomUUID)(),
|
|
144
158
|
type: 'variation',
|
|
145
159
|
default: {
|
|
146
160
|
node: {
|
|
161
|
+
nodeId: (0, crypto_1.randomUUID)(),
|
|
147
162
|
type: 'tag',
|
|
148
163
|
tag: 'h1',
|
|
149
164
|
children: [
|
|
150
165
|
{
|
|
151
166
|
type: 'text',
|
|
152
167
|
value: 'Hello World!',
|
|
168
|
+
nodeId: (0, crypto_1.randomUUID)(),
|
|
153
169
|
},
|
|
154
170
|
],
|
|
155
171
|
},
|
|
@@ -157,10 +173,12 @@ exports.VALID_CONTENT_NODES = {
|
|
|
157
173
|
variants: [
|
|
158
174
|
{
|
|
159
175
|
node: {
|
|
176
|
+
nodeId: (0, crypto_1.randomUUID)(),
|
|
160
177
|
type: 'tag',
|
|
161
178
|
tag: 'h1',
|
|
162
179
|
children: [
|
|
163
180
|
{
|
|
181
|
+
nodeId: (0, crypto_1.randomUUID)(),
|
|
164
182
|
type: 'text',
|
|
165
183
|
value: 'Hello Authenticated User!',
|
|
166
184
|
},
|
|
@@ -172,12 +190,14 @@ exports.VALID_CONTENT_NODES = {
|
|
|
172
190
|
},
|
|
173
191
|
{
|
|
174
192
|
node: {
|
|
193
|
+
nodeId: (0, crypto_1.randomUUID)(),
|
|
175
194
|
type: 'tag',
|
|
176
195
|
tag: 'h1',
|
|
177
196
|
children: [
|
|
178
197
|
{
|
|
179
198
|
type: 'text',
|
|
180
199
|
value: 'Hello Unauthenticated User!',
|
|
200
|
+
nodeId: (0, crypto_1.randomUUID)(),
|
|
181
201
|
},
|
|
182
202
|
],
|
|
183
203
|
},
|
|
@@ -190,15 +210,18 @@ exports.VALID_CONTENT_NODES = {
|
|
|
190
210
|
};
|
|
191
211
|
exports.INVALID_CONTENT_NODES = {
|
|
192
212
|
duplicateSegmentVariation: {
|
|
213
|
+
nodeId: (0, crypto_1.randomUUID)(),
|
|
193
214
|
type: 'variation',
|
|
194
215
|
default: {
|
|
195
216
|
node: {
|
|
217
|
+
nodeId: (0, crypto_1.randomUUID)(),
|
|
196
218
|
type: 'tag',
|
|
197
219
|
tag: 'h1',
|
|
198
220
|
children: [
|
|
199
221
|
{
|
|
200
222
|
type: 'text',
|
|
201
223
|
value: 'Hello World!',
|
|
224
|
+
nodeId: (0, crypto_1.randomUUID)(),
|
|
202
225
|
},
|
|
203
226
|
],
|
|
204
227
|
},
|
|
@@ -208,10 +231,12 @@ exports.INVALID_CONTENT_NODES = {
|
|
|
208
231
|
node: {
|
|
209
232
|
type: 'tag',
|
|
210
233
|
tag: 'h1',
|
|
234
|
+
nodeId: (0, crypto_1.randomUUID)(),
|
|
211
235
|
children: [
|
|
212
236
|
{
|
|
213
237
|
type: 'text',
|
|
214
238
|
value: 'Hello Authenticated User!',
|
|
239
|
+
nodeId: (0, crypto_1.randomUUID)(),
|
|
215
240
|
},
|
|
216
241
|
],
|
|
217
242
|
},
|
|
@@ -223,10 +248,12 @@ exports.INVALID_CONTENT_NODES = {
|
|
|
223
248
|
node: {
|
|
224
249
|
type: 'tag',
|
|
225
250
|
tag: 'h1',
|
|
251
|
+
nodeId: (0, crypto_1.randomUUID)(),
|
|
226
252
|
children: [
|
|
227
253
|
{
|
|
228
254
|
type: 'text',
|
|
229
255
|
value: 'Hello Unauthenticated User!',
|
|
256
|
+
nodeId: (0, crypto_1.randomUUID)(),
|
|
230
257
|
},
|
|
231
258
|
],
|
|
232
259
|
},
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PageContentsMocks.js","sourceRoot":"","sources":["../../src/mocks/PageContentsMocks.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"PageContentsMocks.js","sourceRoot":"","sources":["../../src/mocks/PageContentsMocks.ts"],"names":[],"mappings":";;;AAmBA,oDAsCC;AAxDD,+DAAuE;AACvE,mCAAoC;AAEvB,QAAA,eAAe,GAAG;IAC7B,UAAU,EAAE,MAAM;IAClB,OAAO,EAAE;QACP,KAAK,EAAE,MAAM;KACd;CACF,CAAC;AACK,MAAM,qBAAqB,GAAG,KAAK,EAAE,IAA0D,EAAE,EAAE;IACxG,OAAO;QACL,GAAG,IAAI;QACP,WAAW,EAAE,uBAAe;KAC7B,CAAC;AACJ,CAAC,CAAC;AALW,QAAA,qBAAqB,yBAKhC;AAIF,SAAgB,oBAAoB,CAClC,cAAsB,EACtB,cAA8C,IAAI,oDAA8B,EAAE;IAElF,MAAM,UAAU,GAA+B;QAC7C,MAAM,EAAE,IAAA,mBAAU,GAAE;QACpB,IAAI,EAAE,QAAQ;QACd,MAAM,EAAE;YACN,QAAQ,EAAE,kEAAkE;YAC5E,IAAI,EAAE,uBAAuB;YAC7B,OAAO,EAAE;gBACP,IAAI,EAAE;oBACJ,aAAa,EAAE,OAAO;iBACvB;aACF;SACF;QACD,OAAO,EAAE;YACP,GAAG,EAAE,EAAE;YACP,MAAM,EAAE,EAAE;YACV,IAAI,EAAE,EAAE;SACT;KACF,CAAC;IAEF,+DAA+D;IAC/D,IAAI,cAAc,KAAK,CAAC,EAAE,CAAC;QACzB,UAAU,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,WAAW,CAAC,WAAW,EAAE,CAAC,gBAAgB,CAAC,WAAW,EAAE,GAAG,cAAc,MAAM,CAAC,CAAC,CAAC;QAC9G,UAAU,CAAC,OAAO,CAAC,MAAM,CAAC,IAAI,CAAC,WAAW,CAAC,WAAW,EAAE,CAAC,gBAAgB,CAAC,WAAW,EAAE,GAAG,cAA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|
25
25
|
export declare const ContentStructure: z.ZodRecord<z.ZodString, z.ZodArray<z.ZodUnion<[z.ZodType<{
|
|
26
26
|
value: string;
|
|
27
27
|
type: "text";
|
|
28
|
+
nodeId: string;
|
|
28
29
|
} | {
|
|
29
30
|
type: "matrix-image";
|
|
31
|
+
nodeId: string;
|
|
30
32
|
matrixDomain: string;
|
|
31
33
|
matrixAssetId: string;
|
|
32
34
|
attributes?: (Record<string, string> & {
|
|
@@ -38,6 +40,7 @@ export declare const ContentStructure: z.ZodRecord<z.ZodString, z.ZodArray<z.Zod
|
|
|
38
40
|
matrixIdentifier?: string | undefined;
|
|
39
41
|
} | {
|
|
40
42
|
type: "dam-image";
|
|
43
|
+
nodeId: string;
|
|
41
44
|
damSystemType: "bynder";
|
|
42
45
|
damSystemIdentifier: string;
|
|
43
46
|
damObjectId: string;
|
|
@@ -52,6 +55,7 @@ export declare const ContentStructure: z.ZodRecord<z.ZodString, z.ZodArray<z.Zod
|
|
|
52
55
|
} | undefined;
|
|
53
56
|
} | {
|
|
54
57
|
type: "component";
|
|
58
|
+
nodeId: string;
|
|
55
59
|
componentId: string;
|
|
56
60
|
componentSet: string;
|
|
57
61
|
componentType?: "server" | "edge" | undefined;
|
|
@@ -63,6 +67,7 @@ export declare const ContentStructure: z.ZodRecord<z.ZodString, z.ZodArray<z.Zod
|
|
|
63
67
|
} | undefined;
|
|
64
68
|
} | (({
|
|
65
69
|
type: "tag";
|
|
70
|
+
nodeId: string;
|
|
66
71
|
tag: string;
|
|
67
72
|
attributes?: Record<string, string> | undefined;
|
|
68
73
|
font?: {
|
|
@@ -78,8 +83,10 @@ export declare const ContentStructure: z.ZodRecord<z.ZodString, z.ZodArray<z.Zod
|
|
|
78
83
|
} | undefined;
|
|
79
84
|
} | {
|
|
80
85
|
type: "fragment";
|
|
86
|
+
nodeId: string;
|
|
81
87
|
} | {
|
|
82
88
|
type: "link-to-matrix-asset";
|
|
89
|
+
nodeId: string;
|
|
83
90
|
matrixDomain: string;
|
|
84
91
|
matrixAssetId: string;
|
|
85
92
|
target: "_blank" | "_self" | "_parent" | "_top";
|
|
@@ -96,9 +103,11 @@ export declare const ContentStructure: z.ZodRecord<z.ZodString, z.ZodArray<z.Zod
|
|
|
96
103
|
}), z.ZodTypeDef, {
|
|
97
104
|
value: string;
|
|
98
105
|
type: "text";
|
|
106
|
+
nodeId?: string | undefined;
|
|
99
107
|
} | {
|
|
100
108
|
type: "tag";
|
|
101
109
|
tag: string;
|
|
110
|
+
nodeId?: string | undefined;
|
|
102
111
|
attributes?: Record<string, string> | undefined;
|
|
103
112
|
font?: {
|
|
104
113
|
bold?: boolean | undefined;
|
|
@@ -113,11 +122,13 @@ export declare const ContentStructure: z.ZodRecord<z.ZodString, z.ZodArray<z.Zod
|
|
|
113
122
|
} | undefined;
|
|
114
123
|
} | {
|
|
115
124
|
type: "fragment";
|
|
125
|
+
nodeId?: string | undefined;
|
|
116
126
|
} | {
|
|
117
127
|
type: "link-to-matrix-asset";
|
|
118
128
|
matrixDomain: string;
|
|
119
129
|
matrixAssetId: string;
|
|
120
130
|
target: "_blank" | "_self" | "_parent" | "_top";
|
|
131
|
+
nodeId?: string | undefined;
|
|
121
132
|
attributes?: (Record<string, string> & {
|
|
122
133
|
target?: undefined;
|
|
123
134
|
href?: undefined;
|
|
@@ -130,6 +141,7 @@ export declare const ContentStructure: z.ZodRecord<z.ZodString, z.ZodArray<z.Zod
|
|
|
130
141
|
type: "matrix-image";
|
|
131
142
|
matrixDomain: string;
|
|
132
143
|
matrixAssetId: string;
|
|
144
|
+
nodeId?: string | undefined;
|
|
133
145
|
attributes?: (Record<string, string> & {
|
|
134
146
|
src?: undefined;
|
|
135
147
|
}) | undefined;
|
|
@@ -142,6 +154,7 @@ export declare const ContentStructure: z.ZodRecord<z.ZodString, z.ZodArray<z.Zod
|
|
|
142
154
|
damSystemType: "bynder";
|
|
143
155
|
damSystemIdentifier: string;
|
|
144
156
|
damObjectId: string;
|
|
157
|
+
nodeId?: string | undefined;
|
|
145
158
|
attributes?: (Record<string, string> & {
|
|
146
159
|
src?: undefined;
|
|
147
160
|
}) | undefined;
|
|
@@ -155,6 +168,7 @@ export declare const ContentStructure: z.ZodRecord<z.ZodString, z.ZodArray<z.Zod
|
|
|
155
168
|
type: "component";
|
|
156
169
|
componentId: string;
|
|
157
170
|
componentSet: string;
|
|
171
|
+
nodeId?: string | undefined;
|
|
158
172
|
componentType?: "server" | "edge" | undefined;
|
|
159
173
|
contentItem?: {
|
|
160
174
|
id: string;
|
|
@@ -165,6 +179,7 @@ export declare const ContentStructure: z.ZodRecord<z.ZodString, z.ZodArray<z.Zod
|
|
|
165
179
|
}>, z.ZodType<import("./layout-content").LayoutVariationNode, z.ZodTypeDef, {
|
|
166
180
|
type: "variation";
|
|
167
181
|
default: {};
|
|
182
|
+
nodeId?: string | undefined;
|
|
168
183
|
}>, z.ZodType<DeveloperDefinedLayoutNode, z.ZodTypeDef, {
|
|
169
184
|
type: "layout";
|
|
170
185
|
layout: {
|
|
@@ -190,6 +205,7 @@ export declare const ContentStructure: z.ZodRecord<z.ZodString, z.ZodArray<z.Zod
|
|
|
190
205
|
}>;
|
|
191
206
|
name: string;
|
|
192
207
|
};
|
|
208
|
+
nodeId?: string | undefined;
|
|
193
209
|
}>]>, "many">>;
|
|
194
210
|
export type ContentStructure = z.infer<typeof ContentStructure>;
|
|
195
211
|
/**
|