@sitecore-jss/sitecore-jss-proxy 22.3.0 → 22.3.1-canary.2
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/README.md +1 -1
- package/dist/cjs/index.js +19 -447
- package/dist/cjs/middleware/editing/config.js +27 -0
- package/dist/cjs/middleware/editing/index.js +89 -0
- package/dist/cjs/middleware/editing/render.js +103 -0
- package/dist/cjs/middleware/headless-ssr-proxy/index.js +450 -0
- package/dist/cjs/middleware/healthcheck/index.js +16 -0
- package/dist/cjs/middleware/index.js +32 -0
- package/dist/cjs/personalize/PersonalizeHelper.js +243 -0
- package/dist/cjs/personalize/index.js +5 -0
- package/dist/cjs/personalize/test-data/personalizeData.js +86 -0
- package/dist/cjs/types/personalize.js +2 -0
- package/dist/esm/index.js +4 -441
- package/dist/esm/middleware/editing/config.js +23 -0
- package/dist/esm/middleware/editing/index.js +84 -0
- package/dist/esm/middleware/editing/render.js +98 -0
- package/dist/esm/middleware/headless-ssr-proxy/index.js +441 -0
- package/dist/esm/middleware/healthcheck/index.js +12 -0
- package/dist/esm/middleware/index.js +4 -0
- package/dist/esm/personalize/PersonalizeHelper.js +236 -0
- package/dist/esm/personalize/index.js +1 -0
- package/dist/esm/personalize/test-data/personalizeData.js +82 -0
- package/dist/esm/types/personalize.js +1 -0
- package/package.json +22 -9
- package/types/index.d.ts +4 -21
- package/types/middleware/editing/config.d.ts +27 -0
- package/types/middleware/editing/index.d.ts +32 -0
- package/types/middleware/editing/render.d.ts +42 -0
- package/types/{ProxyConfig.d.ts → middleware/headless-ssr-proxy/ProxyConfig.d.ts} +2 -5
- package/types/middleware/headless-ssr-proxy/index.d.ts +20 -0
- package/types/middleware/healthcheck/index.d.ts +6 -0
- package/types/middleware/index.d.ts +3 -0
- package/types/personalize/PersonalizeHelper.d.ts +43 -0
- package/types/personalize/index.d.ts +2 -0
- package/types/personalize/test-data/personalizeData.d.ts +59 -0
- package/types/types/AppRenderer.d.ts +35 -0
- package/types/types/index.d.ts +3 -0
- package/types/types/personalize.d.ts +85 -0
- package/types/AppRenderer.d.ts +0 -10
- package/types/RenderResponse.d.ts +0 -15
- /package/dist/cjs/{ProxyConfig.js → middleware/headless-ssr-proxy/ProxyConfig.js} +0 -0
- /package/dist/cjs/{AppRenderer.js → types/AppRenderer.js} +0 -0
- /package/dist/cjs/{RouteUrlParser.js → types/RouteUrlParser.js} +0 -0
- /package/dist/cjs/{RenderResponse.js → types/index.js} +0 -0
- /package/dist/esm/{ProxyConfig.js → middleware/headless-ssr-proxy/ProxyConfig.js} +0 -0
- /package/dist/esm/{AppRenderer.js → types/AppRenderer.js} +0 -0
- /package/dist/esm/{RouteUrlParser.js → types/RouteUrlParser.js} +0 -0
- /package/dist/esm/{RenderResponse.js → types/index.js} +0 -0
- /package/types/{RouteUrlParser.d.ts → types/RouteUrlParser.d.ts} +0 -0
|
@@ -0,0 +1,243 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
12
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
13
|
+
};
|
|
14
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
+
exports.PersonalizeHelper = void 0;
|
|
16
|
+
const server_1 = require("@sitecore-cloudsdk/core/server");
|
|
17
|
+
const server_2 = require("@sitecore-cloudsdk/personalize/server");
|
|
18
|
+
const sitecore_jss_1 = require("@sitecore-jss/sitecore-jss");
|
|
19
|
+
const personalize_1 = require("@sitecore-jss/sitecore-jss/personalize");
|
|
20
|
+
const querystring_1 = __importDefault(require("querystring"));
|
|
21
|
+
class PersonalizeHelper {
|
|
22
|
+
constructor(config) {
|
|
23
|
+
this.config = config;
|
|
24
|
+
/**
|
|
25
|
+
* Performs personalize on layout data before a page is rendered
|
|
26
|
+
* @param {IncomingMessage} req Incoming request nodejs object
|
|
27
|
+
* @param {OutgoingMessage} res Outgoing response nodejs object
|
|
28
|
+
* @param {LayoutServiceData} layoutData layoutData for the page
|
|
29
|
+
* @returns layout data with personalization applied
|
|
30
|
+
*/
|
|
31
|
+
this.personalizeLayoutData = (req, res, layoutData) => __awaiter(this, void 0, void 0, function* () {
|
|
32
|
+
var _a, _b;
|
|
33
|
+
if (!((_a = layoutData.sitecore) === null || _a === void 0 ? void 0 : _a.context)) {
|
|
34
|
+
sitecore_jss_1.debug.personalize('skipped (sitecore context is empty)');
|
|
35
|
+
return layoutData;
|
|
36
|
+
}
|
|
37
|
+
if (!((_b = layoutData.sitecore) === null || _b === void 0 ? void 0 : _b.route)) {
|
|
38
|
+
sitecore_jss_1.debug.personalize('skipped (layout is empty)');
|
|
39
|
+
return layoutData;
|
|
40
|
+
}
|
|
41
|
+
// current method can run for page requests and for layout service requests.
|
|
42
|
+
// the latter will not have the correct path - so we use path from layoutData instead
|
|
43
|
+
const pathname = layoutData.sitecore.context.itemPath;
|
|
44
|
+
const language = this.getLanguage(layoutData);
|
|
45
|
+
const hostname = this.getHostHeader(req) || this.defaultHostname;
|
|
46
|
+
const startTimestamp = Date.now();
|
|
47
|
+
if (!pathname) {
|
|
48
|
+
sitecore_jss_1.debug.personalize('skipped (pathname missing from layoutData)');
|
|
49
|
+
return layoutData;
|
|
50
|
+
}
|
|
51
|
+
sitecore_jss_1.debug.personalize('personalize layout start: %o', {
|
|
52
|
+
pathname,
|
|
53
|
+
language,
|
|
54
|
+
hostname,
|
|
55
|
+
headers: this.extractDebugHeaders(req.headers),
|
|
56
|
+
});
|
|
57
|
+
if (this.excludeRoute(pathname)) {
|
|
58
|
+
sitecore_jss_1.debug.personalize('skipped (route excluded)');
|
|
59
|
+
return layoutData;
|
|
60
|
+
}
|
|
61
|
+
if (this.config.disabled && this.config.disabled(req, res)) {
|
|
62
|
+
sitecore_jss_1.debug.personalize('skipped (personalize is disabled)');
|
|
63
|
+
return layoutData;
|
|
64
|
+
}
|
|
65
|
+
try {
|
|
66
|
+
yield this.initPersonalizeServer(req, res, hostname);
|
|
67
|
+
}
|
|
68
|
+
catch (e) {
|
|
69
|
+
sitecore_jss_1.debug.personalize('skipped (CloudSDK initialization failed), error %o', e);
|
|
70
|
+
return layoutData;
|
|
71
|
+
}
|
|
72
|
+
const variantIds = yield this.getVariantIds(req, language, pathname);
|
|
73
|
+
if (!variantIds) {
|
|
74
|
+
return layoutData;
|
|
75
|
+
}
|
|
76
|
+
const personalizeData = (0, personalize_1.getGroomedVariantIds)(variantIds);
|
|
77
|
+
// layout will be personalized here
|
|
78
|
+
(0, personalize_1.personalizeLayout)(layoutData, personalizeData.variantId, personalizeData.componentVariantIds);
|
|
79
|
+
sitecore_jss_1.debug.personalize('personalize layout end in %dms: %o', Date.now() - startTimestamp, {
|
|
80
|
+
headers: this.extractDebugHeaders(req.headers),
|
|
81
|
+
variantIds: variantIds,
|
|
82
|
+
});
|
|
83
|
+
return layoutData;
|
|
84
|
+
});
|
|
85
|
+
this.getVariantIds = (req, language, pathname) => __awaiter(this, void 0, void 0, function* () {
|
|
86
|
+
const timeout = this.config.cdpConfig.timeout;
|
|
87
|
+
// Get personalization info from Experience Edge
|
|
88
|
+
const personalizeInfo = yield this.personalizeService.getPersonalizeInfo(pathname, language, this.config.sitecoreSiteName);
|
|
89
|
+
if (!personalizeInfo) {
|
|
90
|
+
// Likely an invalid route / language
|
|
91
|
+
sitecore_jss_1.debug.personalize('skipped (personalize info not found)');
|
|
92
|
+
return [];
|
|
93
|
+
}
|
|
94
|
+
if (personalizeInfo.variantIds.length === 0) {
|
|
95
|
+
sitecore_jss_1.debug.personalize('skipped (no personalization configured)');
|
|
96
|
+
return [];
|
|
97
|
+
}
|
|
98
|
+
const params = this.getExperienceParams(req);
|
|
99
|
+
const executions = this.getPersonalizeExecutions(personalizeInfo, language);
|
|
100
|
+
const identifiedVariantIds = [];
|
|
101
|
+
try {
|
|
102
|
+
yield Promise.all(executions.map((execution) => this.personalize({
|
|
103
|
+
friendlyId: execution.friendlyId,
|
|
104
|
+
variantIds: execution.variantIds,
|
|
105
|
+
params,
|
|
106
|
+
language,
|
|
107
|
+
timeout,
|
|
108
|
+
}, req).then((personalization) => {
|
|
109
|
+
const variantId = personalization.variantId;
|
|
110
|
+
if (variantId) {
|
|
111
|
+
if (!execution.variantIds.includes(variantId)) {
|
|
112
|
+
sitecore_jss_1.debug.personalize('invalid variant %s', variantId);
|
|
113
|
+
}
|
|
114
|
+
else {
|
|
115
|
+
identifiedVariantIds.push(variantId);
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
})));
|
|
119
|
+
}
|
|
120
|
+
catch (e) {
|
|
121
|
+
sitecore_jss_1.debug.personalize('skipped, error %o', e);
|
|
122
|
+
}
|
|
123
|
+
if (identifiedVariantIds.length === 0) {
|
|
124
|
+
sitecore_jss_1.debug.personalize('skipped (no variant(s) identified)');
|
|
125
|
+
return [];
|
|
126
|
+
}
|
|
127
|
+
return identifiedVariantIds;
|
|
128
|
+
});
|
|
129
|
+
this.personalizeService = new personalize_1.GraphQLPersonalizeService(Object.assign({}, config.edgeConfig));
|
|
130
|
+
this.defaultHostname = config.defaultHostname || 'localhost';
|
|
131
|
+
}
|
|
132
|
+
/**
|
|
133
|
+
* Init CloudSDK personalization on server side
|
|
134
|
+
* @param {IncomingMessage} request incoming nodejs request object
|
|
135
|
+
* @param {OutgoingMessage} response outgoing nodejs response object
|
|
136
|
+
* @param {string} hostname host for cookies. Usually a host header, or a fallback config
|
|
137
|
+
*/
|
|
138
|
+
initPersonalizeServer(request, response, hostname) {
|
|
139
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
140
|
+
yield (0, server_1.CloudSDK)(request, response, {
|
|
141
|
+
sitecoreEdgeUrl: this.config.cdpConfig.sitecoreEdgeUrl,
|
|
142
|
+
sitecoreEdgeContextId: this.config.cdpConfig.sitecoreEdgeContextId,
|
|
143
|
+
siteName: this.config.sitecoreSiteName,
|
|
144
|
+
cookieDomain: hostname,
|
|
145
|
+
enableServerCookie: true,
|
|
146
|
+
})
|
|
147
|
+
.addPersonalize({ enablePersonalizeCookie: true })
|
|
148
|
+
.initialize();
|
|
149
|
+
});
|
|
150
|
+
}
|
|
151
|
+
getLanguage(layoutData) {
|
|
152
|
+
var _a, _b;
|
|
153
|
+
return ((_b = (_a = layoutData.sitecore) === null || _a === void 0 ? void 0 : _a.context) === null || _b === void 0 ? void 0 : _b.language) || this.config.defaultLanguage || 'en';
|
|
154
|
+
}
|
|
155
|
+
getHostHeader(req) {
|
|
156
|
+
var _a;
|
|
157
|
+
return ((_a = req.headers.host) === null || _a === void 0 ? void 0 : _a.split(':')[0]) || '';
|
|
158
|
+
}
|
|
159
|
+
excludeRoute(pathname) {
|
|
160
|
+
var _a, _b;
|
|
161
|
+
return ((_a = this.config) === null || _a === void 0 ? void 0 : _a.excludeRoute) && ((_b = this.config) === null || _b === void 0 ? void 0 : _b.excludeRoute(pathname));
|
|
162
|
+
}
|
|
163
|
+
extractDebugHeaders(incomingHeaders) {
|
|
164
|
+
const headers = {};
|
|
165
|
+
Object.keys(incomingHeaders).forEach((key) => incomingHeaders[key] && (headers[key] = incomingHeaders[key]));
|
|
166
|
+
return headers;
|
|
167
|
+
}
|
|
168
|
+
personalize(_a, request_1) {
|
|
169
|
+
return __awaiter(this, arguments, void 0, function* ({ params, friendlyId, language, timeout, variantIds, }, request) {
|
|
170
|
+
var _b;
|
|
171
|
+
sitecore_jss_1.debug.personalize('executing experience for %s %o', friendlyId, params);
|
|
172
|
+
return (yield (0, server_2.personalize)(request, {
|
|
173
|
+
channel: this.config.cdpConfig.channel || 'WEB',
|
|
174
|
+
currency: (_b = this.config.cdpConfig.currency) !== null && _b !== void 0 ? _b : 'USD',
|
|
175
|
+
friendlyId,
|
|
176
|
+
params,
|
|
177
|
+
language,
|
|
178
|
+
pageVariantIds: variantIds,
|
|
179
|
+
}, { timeout }));
|
|
180
|
+
});
|
|
181
|
+
}
|
|
182
|
+
getExperienceParams(req) {
|
|
183
|
+
var _a;
|
|
184
|
+
// nodejs req.url does not have a hostname, we parse query string the old fashioned way
|
|
185
|
+
const rawQs = ((_a = req.url) === null || _a === void 0 ? void 0 : _a.split('?')[1]) || '';
|
|
186
|
+
const queryString = querystring_1.default.parse(rawQs);
|
|
187
|
+
// also need to account for types (string | string[]) returned by parse()
|
|
188
|
+
const utm = {
|
|
189
|
+
campaign: [queryString.utm_campaign].join('') || undefined,
|
|
190
|
+
content: [queryString.utm_content].join('') || undefined,
|
|
191
|
+
medium: [queryString.utm_medium].join('') || undefined,
|
|
192
|
+
source: [queryString.utm_source].join('') || undefined,
|
|
193
|
+
};
|
|
194
|
+
return {
|
|
195
|
+
// It's expected that the header name "referer" is actually a misspelling of the word "referrer"
|
|
196
|
+
// req.referrer is used during fetching to determine the value of the Referer header of the request being made,
|
|
197
|
+
// used as a fallback
|
|
198
|
+
referrer: req.headers.referer || [''].concat(req.headers.referrer || '').join(''),
|
|
199
|
+
utm: utm,
|
|
200
|
+
};
|
|
201
|
+
}
|
|
202
|
+
getPersonalizeExecutions(personalizeInfo, language) {
|
|
203
|
+
if (personalizeInfo.variantIds.length === 0) {
|
|
204
|
+
return [];
|
|
205
|
+
}
|
|
206
|
+
const results = [];
|
|
207
|
+
return personalizeInfo.variantIds.reduce((results, variantId) => {
|
|
208
|
+
if (variantId.includes('_')) {
|
|
209
|
+
// Component-level personalization in format "<ComponentID>_<VariantID>"
|
|
210
|
+
const componentId = variantId.split('_')[0];
|
|
211
|
+
const friendlyId = personalize_1.CdpHelper.getComponentFriendlyId(personalizeInfo.pageId, componentId, language, this.config.scope);
|
|
212
|
+
const execution = results.find((x) => x.friendlyId === friendlyId);
|
|
213
|
+
if (execution) {
|
|
214
|
+
execution.variantIds.push(variantId);
|
|
215
|
+
}
|
|
216
|
+
else {
|
|
217
|
+
// The default/control variant (format "<ComponentID>_default") is also a valid value returned by the execution
|
|
218
|
+
const defaultVariant = `${componentId}${personalize_1.DEFAULT_VARIANT}`;
|
|
219
|
+
results.push({
|
|
220
|
+
friendlyId,
|
|
221
|
+
variantIds: [defaultVariant, variantId],
|
|
222
|
+
});
|
|
223
|
+
}
|
|
224
|
+
}
|
|
225
|
+
else {
|
|
226
|
+
// Embedded (page-level) personalization in format "<VariantID>"
|
|
227
|
+
const friendlyId = personalize_1.CdpHelper.getPageFriendlyId(personalizeInfo.pageId, language, this.config.scope);
|
|
228
|
+
const execution = results.find((x) => x.friendlyId === friendlyId);
|
|
229
|
+
if (execution) {
|
|
230
|
+
execution.variantIds.push(variantId);
|
|
231
|
+
}
|
|
232
|
+
else {
|
|
233
|
+
results.push({
|
|
234
|
+
friendlyId,
|
|
235
|
+
variantIds: [variantId],
|
|
236
|
+
});
|
|
237
|
+
}
|
|
238
|
+
}
|
|
239
|
+
return results;
|
|
240
|
+
}, results);
|
|
241
|
+
}
|
|
242
|
+
}
|
|
243
|
+
exports.PersonalizeHelper = PersonalizeHelper;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.PersonalizeHelper = void 0;
|
|
4
|
+
var PersonalizeHelper_1 = require("./PersonalizeHelper");
|
|
5
|
+
Object.defineProperty(exports, "PersonalizeHelper", { enumerable: true, get: function () { return PersonalizeHelper_1.PersonalizeHelper; } });
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getPersonalizeLayoutData = exports.component_variant = exports.cityBikeVariant = exports.mountainBikeVariant = void 0;
|
|
4
|
+
exports.mountainBikeVariant = {
|
|
5
|
+
uid: '0b6d23d8-c50e-4e79-9eca-317ec43e82b0',
|
|
6
|
+
componentName: 'ContentBlock',
|
|
7
|
+
dataSource: '20679cd4-356b-4452-b507-453beeb0be39',
|
|
8
|
+
fields: {
|
|
9
|
+
content: {
|
|
10
|
+
value: '<p><img src="https://edge-beta.sitecorecloud.io/ser-edge-personalization/media/JssNextWeb/Mountain-Bike.jpg?h=675&w=1200" style="width:1200px;height:675px;" /></p>',
|
|
11
|
+
},
|
|
12
|
+
heading: { value: 'Mountain Bike' },
|
|
13
|
+
},
|
|
14
|
+
};
|
|
15
|
+
exports.cityBikeVariant = {
|
|
16
|
+
uid: '0b6d23d8-c50e-4e79-9eca-317ec43e82b0',
|
|
17
|
+
componentName: 'ContentBlock',
|
|
18
|
+
dataSource: '36e02581-2056-4c55-a4d5-f4b700ba1ae2',
|
|
19
|
+
fields: {
|
|
20
|
+
content: {
|
|
21
|
+
value: '<p><img src="https://edge-beta.sitecorecloud.io/ser-edge-personalization/media/JssNextWeb/Mountain-Bike.jpg?h=675&w=1200" style="width:1200px;height:675px;" /></p>',
|
|
22
|
+
},
|
|
23
|
+
heading: { value: 'Mountain Bike' },
|
|
24
|
+
},
|
|
25
|
+
};
|
|
26
|
+
exports.component_variant = {
|
|
27
|
+
uid: '0b6d23d8-c50e-4e79-9eca-317ec43e82b0',
|
|
28
|
+
componentName: 'ContentBlock',
|
|
29
|
+
dataSource: '36e02581-2056-4c55-a4d5-f4b700ba1ae2',
|
|
30
|
+
fields: {
|
|
31
|
+
content: {
|
|
32
|
+
value: '<p><img src="https://edge-beta.sitecorecloud.io/ser-edge-personalization/media/JssNextWeb/Hybrid-Bike.jpg?h=675&w=1200" style="width:1200px;height:675px;" /></p>',
|
|
33
|
+
},
|
|
34
|
+
heading: { value: 'Hybrid Bike' },
|
|
35
|
+
},
|
|
36
|
+
};
|
|
37
|
+
const defaultRendering = {
|
|
38
|
+
uid: '0b6d23d8-c50e-4e79-9eca-317ec43e82b0',
|
|
39
|
+
componentName: 'ContentBlock',
|
|
40
|
+
dataSource: 'e020fb58-1be8-4537-aab8-67916452ecf2',
|
|
41
|
+
fields: { content: { value: '' }, heading: { value: 'Default Content' } },
|
|
42
|
+
experiences: {
|
|
43
|
+
'mountain-bike-audience': exports.mountainBikeVariant,
|
|
44
|
+
'city-bike-audience': exports.cityBikeVariant,
|
|
45
|
+
'componentid_variant-id': exports.component_variant,
|
|
46
|
+
},
|
|
47
|
+
};
|
|
48
|
+
const getPersonalizeLayoutData = (variant, language, path) => {
|
|
49
|
+
const baseLayout = {
|
|
50
|
+
sitecore: {
|
|
51
|
+
context: {
|
|
52
|
+
pageEditing: false,
|
|
53
|
+
site: { name: 'JssNextWeb' },
|
|
54
|
+
visitorIdentificationTimestamp: 1038543,
|
|
55
|
+
language: language || 'en',
|
|
56
|
+
variantId: '',
|
|
57
|
+
itemPath: path || '/styleguide',
|
|
58
|
+
},
|
|
59
|
+
route: {
|
|
60
|
+
name: 'styleguide',
|
|
61
|
+
placeholders: {
|
|
62
|
+
main: {},
|
|
63
|
+
},
|
|
64
|
+
},
|
|
65
|
+
},
|
|
66
|
+
};
|
|
67
|
+
switch (variant) {
|
|
68
|
+
case 'mountain-bike-audience':
|
|
69
|
+
baseLayout.sitecore.route.placeholders.main = [exports.mountainBikeVariant];
|
|
70
|
+
baseLayout.sitecore.context.variantId = 'mountain-bike-audience';
|
|
71
|
+
break;
|
|
72
|
+
case 'city-bike-audience':
|
|
73
|
+
baseLayout.sitecore.route.placeholders.main = [exports.cityBikeVariant];
|
|
74
|
+
baseLayout.sitecore.context.variantId = 'city-bike-audience';
|
|
75
|
+
break;
|
|
76
|
+
case 'componentid_variant-id':
|
|
77
|
+
baseLayout.sitecore.route.placeholders.main = [exports.component_variant];
|
|
78
|
+
baseLayout.sitecore.context.variantId = '_default';
|
|
79
|
+
break;
|
|
80
|
+
default:
|
|
81
|
+
baseLayout.sitecore.route.placeholders.main = [defaultRendering];
|
|
82
|
+
break;
|
|
83
|
+
}
|
|
84
|
+
return baseLayout;
|
|
85
|
+
};
|
|
86
|
+
exports.getPersonalizeLayoutData = getPersonalizeLayoutData;
|