@squiz/dxp-page-content-types 1.5.2 → 1.5.3
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/Nodes/Nodes.d.ts
CHANGED
|
@@ -14,6 +14,16 @@ export declare const NODE_TYPE: {
|
|
|
14
14
|
variation: "variation";
|
|
15
15
|
};
|
|
16
16
|
export type NODE_TYPE = (typeof NODE_TYPE)[keyof typeof NODE_TYPE];
|
|
17
|
+
/**
|
|
18
|
+
* Layout option value types.
|
|
19
|
+
*/
|
|
20
|
+
export declare const LayoutOptionValueTypes: readonly ["string-enum", "boolean", "text"];
|
|
21
|
+
export declare const LayoutOptionValueType: {
|
|
22
|
+
readonly stringEnum: "string-enum";
|
|
23
|
+
readonly boolean: "boolean";
|
|
24
|
+
readonly text: "text";
|
|
25
|
+
};
|
|
26
|
+
export type LayoutOptionValueType = (typeof LayoutOptionValueType)[keyof typeof LayoutOptionValueType];
|
|
17
27
|
/**
|
|
18
28
|
* Semi-resolved (referenced content items, not resolved Matrix references) formatted nodes union type.
|
|
19
29
|
*/
|
|
@@ -124,13 +134,26 @@ export interface LayoutZone {
|
|
|
124
134
|
export interface LayoutZones {
|
|
125
135
|
[zoneKey: string]: LayoutZone;
|
|
126
136
|
}
|
|
127
|
-
interface
|
|
137
|
+
export interface LayoutOptionBase {
|
|
128
138
|
description: string;
|
|
129
139
|
displayName: string;
|
|
140
|
+
valueType?: LayoutOptionValueType;
|
|
141
|
+
}
|
|
142
|
+
export interface LayoutOptionEnum extends LayoutOptionBase {
|
|
143
|
+
valueType?: 'string-enum';
|
|
130
144
|
selectedValue?: string;
|
|
131
145
|
values: Array<string>;
|
|
132
146
|
}
|
|
133
|
-
interface
|
|
147
|
+
export interface LayoutOptionBoolean extends LayoutOptionBase {
|
|
148
|
+
valueType: 'boolean';
|
|
149
|
+
selectedValue?: boolean;
|
|
150
|
+
}
|
|
151
|
+
export interface LayoutOptionText extends LayoutOptionBase {
|
|
152
|
+
valueType: 'text';
|
|
153
|
+
selectedValue?: string;
|
|
154
|
+
}
|
|
155
|
+
export type LayoutOption = LayoutOptionEnum | LayoutOptionBoolean | LayoutOptionText;
|
|
156
|
+
export interface LayoutOptions {
|
|
134
157
|
[key: string]: LayoutOption;
|
|
135
158
|
}
|
|
136
159
|
export interface LayoutData {
|
|
@@ -148,4 +171,3 @@ export interface LayoutNode {
|
|
|
148
171
|
content: Record<string, LayoutContentNodes[]>;
|
|
149
172
|
nodeId?: string;
|
|
150
173
|
}
|
|
151
|
-
export {};
|
package/lib/Nodes/Nodes.js
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* Copyright Squiz Australia Pty Ltd. All Rights Reserved.
|
|
5
5
|
*/
|
|
6
6
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
-
exports.NODE_TYPE = void 0;
|
|
7
|
+
exports.LayoutOptionValueType = exports.LayoutOptionValueTypes = exports.NODE_TYPE = void 0;
|
|
8
8
|
/**
|
|
9
9
|
* Content node helper constants.
|
|
10
10
|
*/
|
|
@@ -14,4 +14,13 @@ exports.NODE_TYPE = {
|
|
|
14
14
|
layout: 'layout',
|
|
15
15
|
variation: 'variation',
|
|
16
16
|
};
|
|
17
|
+
/**
|
|
18
|
+
* Layout option value types.
|
|
19
|
+
*/
|
|
20
|
+
exports.LayoutOptionValueTypes = ['string-enum', 'boolean', 'text'];
|
|
21
|
+
exports.LayoutOptionValueType = {
|
|
22
|
+
stringEnum: 'string-enum',
|
|
23
|
+
boolean: 'boolean',
|
|
24
|
+
text: 'text',
|
|
25
|
+
};
|
|
17
26
|
//# sourceMappingURL=Nodes.js.map
|
package/lib/Nodes/Nodes.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Nodes.js","sourceRoot":"","sources":["../../src/Nodes/Nodes.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAKH;;GAEG;AAEU,QAAA,SAAS,GAAG;IACvB,SAAS,EAAE,WAAoB;IAC/B,QAAQ,EAAE,UAAmB;IAC7B,MAAM,EAAE,QAAiB;IACzB,SAAS,EAAE,WAAoB;CAChC,CAAC"}
|
|
1
|
+
{"version":3,"file":"Nodes.js","sourceRoot":"","sources":["../../src/Nodes/Nodes.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAKH;;GAEG;AAEU,QAAA,SAAS,GAAG;IACvB,SAAS,EAAE,WAAoB;IAC/B,QAAQ,EAAE,UAAmB;IAC7B,MAAM,EAAE,QAAiB;IACzB,SAAS,EAAE,WAAoB;CAChC,CAAC;AAGF;;GAEG;AAEU,QAAA,sBAAsB,GAAG,CAAC,aAAa,EAAE,SAAS,EAAE,MAAM,CAAU,CAAC;AAErE,QAAA,qBAAqB,GAAG;IACnC,UAAU,EAAE,aAAa;IACzB,OAAO,EAAE,SAAS;IAClB,IAAI,EAAE,MAAM;CAC8D,CAAC"}
|
|
@@ -88,12 +88,6 @@ export interface VersionChangeSummaryMessage {
|
|
|
88
88
|
* @memberof VersionChangeSummaryMessage
|
|
89
89
|
*/
|
|
90
90
|
section?: string;
|
|
91
|
-
/**
|
|
92
|
-
* The node id of the change.
|
|
93
|
-
* @type {string}
|
|
94
|
-
* @memberof VersionChangeSummaryMessage
|
|
95
|
-
*/
|
|
96
|
-
nodeId?: string;
|
|
97
91
|
};
|
|
98
92
|
}
|
|
99
93
|
/**
|