@yext/visual-editor 0.0.63 → 0.0.65
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/index.d.cts +98 -22
- package/dist/index.d.ts +98 -22
- package/dist/plugin/plugin.cjs +488 -1
- package/dist/plugin/plugin.js +2149 -2
- package/dist/visual-editor.cjs +140 -93
- package/dist/visual-editor.js +23927 -20423
- package/package.json +5 -4
- package/dist/plugin/debugger-DIK3Bqjc-BgrSMGbp.js +0 -314
- package/dist/plugin/debugger-DIK3Bqjc-BjBMuz6i.cjs +0 -1
- package/dist/plugin/index-BU3c50aZ.js +0 -173661
- package/dist/plugin/index-DNFbLH_-.cjs +0 -2868
package/dist/plugin/plugin.cjs
CHANGED
|
@@ -1 +1,488 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("node:path"),a=require("fs-extra"),p=`/** THIS FILE IS AUTOGENERATED AND SHOULD NOT BE EDITED */
|
|
2
|
+
import "@yext/visual-editor/style.css";
|
|
3
|
+
import "../index.css";
|
|
4
|
+
import {
|
|
5
|
+
Template,
|
|
6
|
+
GetPath,
|
|
7
|
+
TemplateProps,
|
|
8
|
+
TemplateRenderProps,
|
|
9
|
+
GetHeadConfig,
|
|
10
|
+
HeadConfig,
|
|
11
|
+
TagType,
|
|
12
|
+
} from "@yext/pages";
|
|
13
|
+
import { Render } from "@measured/puck";
|
|
14
|
+
import {
|
|
15
|
+
applyTheme,
|
|
16
|
+
VisualEditorProvider,
|
|
17
|
+
getPageMetadata,
|
|
18
|
+
applyAnalytics,
|
|
19
|
+
applyHeaderScript,
|
|
20
|
+
migrate,
|
|
21
|
+
migrationRegistry,
|
|
22
|
+
filterComponentsFromConfig,
|
|
23
|
+
resolvePageSetUrlTemplate,
|
|
24
|
+
defaultThemeConfig,
|
|
25
|
+
mainConfig,
|
|
26
|
+
getSchema,
|
|
27
|
+
getCanonicalUrl,
|
|
28
|
+
} from "@yext/visual-editor";
|
|
29
|
+
import { AnalyticsProvider, SchemaWrapper } from "@yext/pages-components";
|
|
30
|
+
|
|
31
|
+
export const getHeadConfig: GetHeadConfig<TemplateRenderProps> = (
|
|
32
|
+
data: TemplateRenderProps
|
|
33
|
+
): HeadConfig => {
|
|
34
|
+
const { document } = data;
|
|
35
|
+
const { title, description } = getPageMetadata(document);
|
|
36
|
+
const schema = getSchema(data);
|
|
37
|
+
const faviconUrl = document?._favicon ?? document?._site?.favicon?.url;
|
|
38
|
+
|
|
39
|
+
return {
|
|
40
|
+
title: title,
|
|
41
|
+
charset: "UTF-8",
|
|
42
|
+
viewport: "width=device-width, initial-scale=1",
|
|
43
|
+
tags: [
|
|
44
|
+
{
|
|
45
|
+
type: "link" as TagType,
|
|
46
|
+
attributes: {
|
|
47
|
+
rel: "icon",
|
|
48
|
+
type: "image/x-icon",
|
|
49
|
+
},
|
|
50
|
+
},
|
|
51
|
+
...(data.document.siteDomain
|
|
52
|
+
? [
|
|
53
|
+
{
|
|
54
|
+
type: "link" as TagType,
|
|
55
|
+
attributes: {
|
|
56
|
+
rel: "canonical",
|
|
57
|
+
href: getCanonicalUrl(data),
|
|
58
|
+
},
|
|
59
|
+
},
|
|
60
|
+
]
|
|
61
|
+
: []),
|
|
62
|
+
...(description
|
|
63
|
+
? [
|
|
64
|
+
{
|
|
65
|
+
type: "meta" as TagType,
|
|
66
|
+
attributes: {
|
|
67
|
+
name: "description",
|
|
68
|
+
content: description,
|
|
69
|
+
},
|
|
70
|
+
},
|
|
71
|
+
]
|
|
72
|
+
: []),
|
|
73
|
+
...(faviconUrl
|
|
74
|
+
? [
|
|
75
|
+
{
|
|
76
|
+
type: "link" as TagType,
|
|
77
|
+
attributes: {
|
|
78
|
+
rel: "icon",
|
|
79
|
+
type: "image/x-icon",
|
|
80
|
+
href: faviconUrl,
|
|
81
|
+
},
|
|
82
|
+
},
|
|
83
|
+
]
|
|
84
|
+
: []),
|
|
85
|
+
],
|
|
86
|
+
other: [
|
|
87
|
+
applyAnalytics(document),
|
|
88
|
+
applyHeaderScript(document),
|
|
89
|
+
applyTheme(document, defaultThemeConfig),
|
|
90
|
+
SchemaWrapper(schema),
|
|
91
|
+
].join("\\n"),
|
|
92
|
+
};
|
|
93
|
+
};
|
|
94
|
+
|
|
95
|
+
export const getPath: GetPath<TemplateProps> = ({
|
|
96
|
+
document,
|
|
97
|
+
relativePrefixToRoot,
|
|
98
|
+
}) => {
|
|
99
|
+
return resolvePageSetUrlTemplate(document, relativePrefixToRoot);
|
|
100
|
+
};
|
|
101
|
+
|
|
102
|
+
const Location: Template<TemplateRenderProps> = (props) => {
|
|
103
|
+
const { document } = props;
|
|
104
|
+
const filteredConfig = filterComponentsFromConfig(
|
|
105
|
+
mainConfig,
|
|
106
|
+
document?._additionalLayoutComponents,
|
|
107
|
+
document?._additionalLayoutCategories
|
|
108
|
+
);
|
|
109
|
+
|
|
110
|
+
return (
|
|
111
|
+
<AnalyticsProvider
|
|
112
|
+
apiKey={document?._env?.YEXT_PUBLIC_VISUAL_EDITOR_APP_API_KEY}
|
|
113
|
+
templateData={props}
|
|
114
|
+
currency="USD"
|
|
115
|
+
>
|
|
116
|
+
<VisualEditorProvider templateProps={props}>
|
|
117
|
+
<Render
|
|
118
|
+
config={filteredConfig}
|
|
119
|
+
data={migrate(
|
|
120
|
+
JSON.parse(document.__.layout),
|
|
121
|
+
migrationRegistry,
|
|
122
|
+
filteredConfig
|
|
123
|
+
)}
|
|
124
|
+
/>
|
|
125
|
+
</VisualEditorProvider>
|
|
126
|
+
</AnalyticsProvider>
|
|
127
|
+
);
|
|
128
|
+
};
|
|
129
|
+
|
|
130
|
+
export default Location;
|
|
131
|
+
`,m=`/** THIS FILE IS AUTOGENERATED AND SHOULD NOT BE EDITED */
|
|
132
|
+
import "@yext/visual-editor/editor.css";
|
|
133
|
+
import "../index.css";
|
|
134
|
+
import {
|
|
135
|
+
applyTheme,
|
|
136
|
+
defaultThemeConfig,
|
|
137
|
+
directoryConfig,
|
|
138
|
+
Editor,
|
|
139
|
+
locatorConfig,
|
|
140
|
+
mainConfig,
|
|
141
|
+
usePlatformBridgeDocument,
|
|
142
|
+
usePlatformBridgeEntityFields,
|
|
143
|
+
VisualEditorProvider,
|
|
144
|
+
} from "@yext/visual-editor";
|
|
145
|
+
import {
|
|
146
|
+
GetPath,
|
|
147
|
+
TemplateProps,
|
|
148
|
+
TemplateConfig,
|
|
149
|
+
HeadConfig,
|
|
150
|
+
TemplateRenderProps,
|
|
151
|
+
GetHeadConfig,
|
|
152
|
+
} from "@yext/pages";
|
|
153
|
+
import { type Config } from "@measured/puck";
|
|
154
|
+
import tailwindConfig from "../../tailwind.config";
|
|
155
|
+
|
|
156
|
+
const componentRegistry: Record<string, Config<any>> = {
|
|
157
|
+
main: mainConfig,
|
|
158
|
+
directory: directoryConfig,
|
|
159
|
+
locator: locatorConfig,
|
|
160
|
+
};
|
|
161
|
+
|
|
162
|
+
// Editor is available at /edit
|
|
163
|
+
export const getPath: GetPath<TemplateProps> = () => {
|
|
164
|
+
return "edit";
|
|
165
|
+
};
|
|
166
|
+
|
|
167
|
+
export const config: TemplateConfig = {
|
|
168
|
+
name: "edit",
|
|
169
|
+
};
|
|
170
|
+
|
|
171
|
+
export const getHeadConfig: GetHeadConfig<TemplateRenderProps> = ({
|
|
172
|
+
document,
|
|
173
|
+
}): HeadConfig => {
|
|
174
|
+
return {
|
|
175
|
+
other: fullStorySnippet + applyTheme(document, defaultThemeConfig),
|
|
176
|
+
};
|
|
177
|
+
};
|
|
178
|
+
|
|
179
|
+
// Render the editor
|
|
180
|
+
const Edit: () => JSX.Element = () => {
|
|
181
|
+
const entityDocument = usePlatformBridgeDocument();
|
|
182
|
+
const entityFields = usePlatformBridgeEntityFields();
|
|
183
|
+
|
|
184
|
+
return (
|
|
185
|
+
<VisualEditorProvider
|
|
186
|
+
templateProps={{
|
|
187
|
+
document: entityDocument,
|
|
188
|
+
}}
|
|
189
|
+
entityFields={entityFields}
|
|
190
|
+
tailwindConfig={tailwindConfig}
|
|
191
|
+
>
|
|
192
|
+
<Editor
|
|
193
|
+
document={entityDocument}
|
|
194
|
+
componentRegistry={componentRegistry}
|
|
195
|
+
themeConfig={defaultThemeConfig}
|
|
196
|
+
/>
|
|
197
|
+
</VisualEditorProvider>
|
|
198
|
+
);
|
|
199
|
+
};
|
|
200
|
+
|
|
201
|
+
export default Edit;
|
|
202
|
+
|
|
203
|
+
const fullStorySnippet = \`<script>
|
|
204
|
+
window['_fs_run_in_iframe'] = true;
|
|
205
|
+
window['_fs_debug'] = false;
|
|
206
|
+
window['_fs_host'] = 'fullstory.com';
|
|
207
|
+
window['_fs_script'] = 'edge.fullstory.com/s/fs.js';
|
|
208
|
+
window['_fs_org'] = 'o-1RWKDJ-na1';
|
|
209
|
+
window['_fs_namespace'] = 'FS';
|
|
210
|
+
!function(m,n,e,t,l,o,g,y){var s,f,a=function(h){
|
|
211
|
+
return!(h in m)||(m.console&&m.console.log&&m.console.log('FullStory namespace conflict. Please set window["_fs_namespace"].'),!1)}(e)
|
|
212
|
+
;function j(b){var h,d=[];function k(){h&&(d.forEach((function(b){var d;try{d=b[h[0]]&&b[h[0]](h[1])}catch(h){return void(b[3]&&b[3](h))}
|
|
213
|
+
d&&d.then?d.then(b[2],b[3]):b[2]&&b[2](d)})),d.length=0)}function r(b){return function(d){h||(h=[b,d],k())}}return b(r(0),r(1)),{
|
|
214
|
+
then:function(b,h){return j((function(r,i){d.push([b,h,r,i]),k()}))}}}a&&(g=m[e]=function(){var b=function(b,d,k,r){function i(i,c){
|
|
215
|
+
h(b,d,k,i,c,r)}r=r||2;var c,u=/Async$/;return u.test(b)?(b=b.replace(u,""),"function"==typeof Promise?new Promise(i):j(i)):h(b,d,k,c,c,r)}
|
|
216
|
+
;function h(h,d,k,r,i,c){return b._api?b._api(h,d,k,r,i,c):(b.q&&b.q.push([h,d,k,r,i,c]),null)}return b.q=[],b}(),y=function(b){function h(h){
|
|
217
|
+
"function"==typeof h[4]&&h[4](new Error(b))}var d=g.q;if(d){for(var k=0;k<d.length;k++)h(d[k]);d.length=0,d.push=h}},function(){
|
|
218
|
+
(o=n.createElement(t)).async=!0,o.crossOrigin="anonymous",o.src="https://"+l,o.onerror=function(){y("Error loading "+l)}
|
|
219
|
+
;var b=n.getElementsByTagName(t)[0];b.parentNode.insertBefore(o,b)}(),function(){function b(){}function h(b,h,d){g(b,h,d,1)}function d(b,d,k){
|
|
220
|
+
h("setProperties",{type:b,properties:d},k)}function k(b,h){d("user",b,h)}function r(b,h,d){k({uid:b},d),h&&k(h,d)}g.identify=r,g.setUserVars=k,
|
|
221
|
+
g.identifyAccount=b,g.clearUserCookie=b,g.setVars=d,g.event=function(b,d,k){h("trackEvent",{name:b,properties:d},k)},g.anonymize=function(){r(!1)
|
|
222
|
+
},g.shutdown=function(){h("shutdown")},g.restart=function(){h("restart")},g.log=function(b,d){h("log",{level:b,msg:d})},g.consent=function(b){
|
|
223
|
+
h("setIdentity",{consent:!arguments.length||b})}}(),s="fetch",f="XMLHttpRequest",g._w={},g._w[f]=m[f],g._w[s]=m[s],m[s]&&(m[s]=function(){
|
|
224
|
+
return g._w[s].apply(this,arguments)}),g._v="2.0.0")}(window,document,window._fs_namespace,"script",window._fs_script);
|
|
225
|
+
<\/script>\`;
|
|
226
|
+
`,h=`/** THIS FILE IS AUTOGENERATED AND SHOULD NOT BE EDITED */
|
|
227
|
+
import "@yext/visual-editor/style.css";
|
|
228
|
+
import "../index.css";
|
|
229
|
+
import {
|
|
230
|
+
Template,
|
|
231
|
+
GetPath,
|
|
232
|
+
TemplateProps,
|
|
233
|
+
TemplateRenderProps,
|
|
234
|
+
GetHeadConfig,
|
|
235
|
+
HeadConfig,
|
|
236
|
+
TagType,
|
|
237
|
+
} from "@yext/pages";
|
|
238
|
+
import { Render } from "@measured/puck";
|
|
239
|
+
import {
|
|
240
|
+
applyTheme,
|
|
241
|
+
VisualEditorProvider,
|
|
242
|
+
normalizeSlug,
|
|
243
|
+
getPageMetadata,
|
|
244
|
+
applyAnalytics,
|
|
245
|
+
applyHeaderScript,
|
|
246
|
+
migrate,
|
|
247
|
+
migrationRegistry,
|
|
248
|
+
defaultThemeConfig,
|
|
249
|
+
directoryConfig,
|
|
250
|
+
getSchema,
|
|
251
|
+
getCanonicalUrl,
|
|
252
|
+
} from "@yext/visual-editor";
|
|
253
|
+
import { AnalyticsProvider, SchemaWrapper } from "@yext/pages-components";
|
|
254
|
+
|
|
255
|
+
export const getHeadConfig: GetHeadConfig<TemplateRenderProps> = (
|
|
256
|
+
data: TemplateRenderProps
|
|
257
|
+
): HeadConfig => {
|
|
258
|
+
const { document } = data;
|
|
259
|
+
const { title, description } = getPageMetadata(document);
|
|
260
|
+
const schema = getSchema(data);
|
|
261
|
+
const faviconUrl = document?._favicon ?? document?._site?.favicon?.url;
|
|
262
|
+
|
|
263
|
+
return {
|
|
264
|
+
title: title,
|
|
265
|
+
charset: "UTF-8",
|
|
266
|
+
viewport: "width=device-width, initial-scale=1",
|
|
267
|
+
tags: [
|
|
268
|
+
{
|
|
269
|
+
type: "link" as TagType,
|
|
270
|
+
attributes: {
|
|
271
|
+
rel: "icon",
|
|
272
|
+
type: "image/x-icon",
|
|
273
|
+
},
|
|
274
|
+
},
|
|
275
|
+
...(data.document.siteDomain
|
|
276
|
+
? [
|
|
277
|
+
{
|
|
278
|
+
type: "link" as TagType,
|
|
279
|
+
attributes: {
|
|
280
|
+
rel: "canonical",
|
|
281
|
+
href: getCanonicalUrl(data),
|
|
282
|
+
},
|
|
283
|
+
},
|
|
284
|
+
]
|
|
285
|
+
: []),
|
|
286
|
+
...(description
|
|
287
|
+
? [
|
|
288
|
+
{
|
|
289
|
+
type: "meta" as TagType,
|
|
290
|
+
attributes: {
|
|
291
|
+
name: "description",
|
|
292
|
+
content: description,
|
|
293
|
+
},
|
|
294
|
+
},
|
|
295
|
+
]
|
|
296
|
+
: []),
|
|
297
|
+
...(faviconUrl
|
|
298
|
+
? [
|
|
299
|
+
{
|
|
300
|
+
type: "link" as TagType,
|
|
301
|
+
attributes: {
|
|
302
|
+
rel: "icon",
|
|
303
|
+
type: "image/x-icon",
|
|
304
|
+
href: faviconUrl,
|
|
305
|
+
},
|
|
306
|
+
},
|
|
307
|
+
]
|
|
308
|
+
: []),
|
|
309
|
+
],
|
|
310
|
+
other: [
|
|
311
|
+
applyAnalytics(document),
|
|
312
|
+
applyHeaderScript(document),
|
|
313
|
+
applyTheme(document, defaultThemeConfig),
|
|
314
|
+
SchemaWrapper(schema),
|
|
315
|
+
].join("\\n"),
|
|
316
|
+
};
|
|
317
|
+
};
|
|
318
|
+
|
|
319
|
+
export const getPath: GetPath<TemplateProps> = ({ document }) => {
|
|
320
|
+
if (document.slug) {
|
|
321
|
+
return document.slug;
|
|
322
|
+
}
|
|
323
|
+
|
|
324
|
+
const localePath = document.locale !== "en" ? \`\${document.locale}/\` : "";
|
|
325
|
+
const path = \`\${localePath}\${document.id}\`;
|
|
326
|
+
|
|
327
|
+
return normalizeSlug(path);
|
|
328
|
+
};
|
|
329
|
+
|
|
330
|
+
const Directory: Template<TemplateRenderProps> = (props) => {
|
|
331
|
+
const { document } = props;
|
|
332
|
+
|
|
333
|
+
return (
|
|
334
|
+
<AnalyticsProvider
|
|
335
|
+
apiKey={document?._env?.YEXT_PUBLIC_VISUAL_EDITOR_APP_API_KEY}
|
|
336
|
+
templateData={props}
|
|
337
|
+
currency="USD"
|
|
338
|
+
>
|
|
339
|
+
<VisualEditorProvider templateProps={props}>
|
|
340
|
+
<Render
|
|
341
|
+
config={directoryConfig}
|
|
342
|
+
data={migrate(
|
|
343
|
+
JSON.parse(document.__.layout),
|
|
344
|
+
migrationRegistry,
|
|
345
|
+
directoryConfig
|
|
346
|
+
)}
|
|
347
|
+
/>
|
|
348
|
+
</VisualEditorProvider>
|
|
349
|
+
</AnalyticsProvider>
|
|
350
|
+
);
|
|
351
|
+
};
|
|
352
|
+
|
|
353
|
+
export default Directory;
|
|
354
|
+
`,g=`/** THIS FILE IS AUTOGENERATED AND SHOULD NOT BE EDITED */
|
|
355
|
+
import "@yext/visual-editor/style.css";
|
|
356
|
+
import "../index.css";
|
|
357
|
+
import {
|
|
358
|
+
Template,
|
|
359
|
+
GetPath,
|
|
360
|
+
TemplateProps,
|
|
361
|
+
TemplateRenderProps,
|
|
362
|
+
GetHeadConfig,
|
|
363
|
+
HeadConfig,
|
|
364
|
+
TagType,
|
|
365
|
+
} from "@yext/pages";
|
|
366
|
+
import { Render } from "@measured/puck";
|
|
367
|
+
import {
|
|
368
|
+
applyTheme,
|
|
369
|
+
VisualEditorProvider,
|
|
370
|
+
normalizeSlug,
|
|
371
|
+
getPageMetadata,
|
|
372
|
+
applyAnalytics,
|
|
373
|
+
applyHeaderScript,
|
|
374
|
+
defaultThemeConfig,
|
|
375
|
+
locatorConfig,
|
|
376
|
+
getSchema,
|
|
377
|
+
getCanonicalUrl,
|
|
378
|
+
} from "@yext/visual-editor";
|
|
379
|
+
import { AnalyticsProvider, SchemaWrapper } from "@yext/pages-components";
|
|
380
|
+
import mapboxPackageJson from "mapbox-gl/package.json";
|
|
381
|
+
|
|
382
|
+
export const getHeadConfig: GetHeadConfig<TemplateRenderProps> = (
|
|
383
|
+
data: TemplateRenderProps
|
|
384
|
+
): HeadConfig => {
|
|
385
|
+
const { document } = data;
|
|
386
|
+
const { title, description } = getPageMetadata(document);
|
|
387
|
+
const schema = getSchema(data);
|
|
388
|
+
const faviconUrl = document?._favicon ?? document?._site?.favicon?.url;
|
|
389
|
+
|
|
390
|
+
return {
|
|
391
|
+
title: title,
|
|
392
|
+
charset: "UTF-8",
|
|
393
|
+
viewport: "width=device-width, initial-scale=1",
|
|
394
|
+
tags: [
|
|
395
|
+
{
|
|
396
|
+
type: "link" as TagType,
|
|
397
|
+
attributes: {
|
|
398
|
+
rel: "icon",
|
|
399
|
+
type: "image/x-icon",
|
|
400
|
+
},
|
|
401
|
+
},
|
|
402
|
+
...(data.document.siteDomain
|
|
403
|
+
? [
|
|
404
|
+
{
|
|
405
|
+
type: "link" as TagType,
|
|
406
|
+
attributes: {
|
|
407
|
+
rel: "canonical",
|
|
408
|
+
href: getCanonicalUrl(data),
|
|
409
|
+
},
|
|
410
|
+
},
|
|
411
|
+
]
|
|
412
|
+
: []),
|
|
413
|
+
...(description
|
|
414
|
+
? [
|
|
415
|
+
{
|
|
416
|
+
type: "meta" as TagType,
|
|
417
|
+
attributes: {
|
|
418
|
+
name: "description",
|
|
419
|
+
content: description,
|
|
420
|
+
},
|
|
421
|
+
},
|
|
422
|
+
]
|
|
423
|
+
: []),
|
|
424
|
+
...(faviconUrl
|
|
425
|
+
? [
|
|
426
|
+
{
|
|
427
|
+
type: "link" as TagType,
|
|
428
|
+
attributes: {
|
|
429
|
+
rel: "icon",
|
|
430
|
+
type: "image/x-icon",
|
|
431
|
+
href: faviconUrl,
|
|
432
|
+
},
|
|
433
|
+
},
|
|
434
|
+
]
|
|
435
|
+
: []),
|
|
436
|
+
],
|
|
437
|
+
other: [
|
|
438
|
+
applyAnalytics(document),
|
|
439
|
+
applyHeaderScript(document),
|
|
440
|
+
applyTheme(document, defaultThemeConfig),
|
|
441
|
+
SchemaWrapper(schema),
|
|
442
|
+
].join("\\n"),
|
|
443
|
+
};
|
|
444
|
+
};
|
|
445
|
+
|
|
446
|
+
export const getPath: GetPath<TemplateProps> = ({ document }) => {
|
|
447
|
+
if (document.slug) {
|
|
448
|
+
return document.slug;
|
|
449
|
+
}
|
|
450
|
+
|
|
451
|
+
const localePath = document.locale !== "en" ? \`\${document.locale}/\` : "";
|
|
452
|
+
const path = \`\${localePath}\${document.id}\`;
|
|
453
|
+
|
|
454
|
+
return normalizeSlug(path);
|
|
455
|
+
};
|
|
456
|
+
|
|
457
|
+
const Locator: Template<TemplateRenderProps> = (props) => {
|
|
458
|
+
const { document } = props;
|
|
459
|
+
|
|
460
|
+
return (
|
|
461
|
+
<>
|
|
462
|
+
<script
|
|
463
|
+
id="mapbox-script"
|
|
464
|
+
src={\`https://api.mapbox.com/mapbox-gl-js/v\${mapboxPackageJson.version}/mapbox-gl.js\`}
|
|
465
|
+
/>
|
|
466
|
+
<link
|
|
467
|
+
id="mapbox-stylesheet"
|
|
468
|
+
rel="stylesheet"
|
|
469
|
+
href={\`https://api.mapbox.com/mapbox-gl-js/v\${mapboxPackageJson.version}/mapbox-gl.css\`}
|
|
470
|
+
/>
|
|
471
|
+
<AnalyticsProvider
|
|
472
|
+
apiKey={document?._env?.YEXT_PUBLIC_VISUAL_EDITOR_APP_API_KEY}
|
|
473
|
+
templateData={props}
|
|
474
|
+
currency="USD"
|
|
475
|
+
>
|
|
476
|
+
<VisualEditorProvider templateProps={props}>
|
|
477
|
+
<Render
|
|
478
|
+
config={locatorConfig}
|
|
479
|
+
data={JSON.parse(document.__.layout)}
|
|
480
|
+
/>
|
|
481
|
+
</VisualEditorProvider>
|
|
482
|
+
</AnalyticsProvider>
|
|
483
|
+
</>
|
|
484
|
+
);
|
|
485
|
+
};
|
|
486
|
+
|
|
487
|
+
export default Locator;
|
|
488
|
+
`,e={HeroSection:{name:"Hero Section",type:"type.hero_section",isList:!1,tooltipDescription:"",altLanguageBehavior:"LANGUAGE_SPECIFIC"},PromoSection:{name:"Promo Section",type:"type.promo_section",isList:!1,tooltipDescription:"",altLanguageBehavior:"LANGUAGE_SPECIFIC"},ProductSection:{name:"Product Section",type:"type.products_section",isList:!1,tooltipDescription:"",altLanguageBehavior:"LANGUAGE_SPECIFIC"},EventSection:{name:"Event Section",type:"type.events_section",isList:!1,tooltipDescription:"",altLanguageBehavior:"LANGUAGE_SPECIFIC"},FAQSection:{name:"FAQ Section",type:"type.faq_section",isList:!1,tooltipDescription:"",altLanguageBehavior:"LANGUAGE_SPECIFIC"},TestimonialSection:{name:"Testimonial Section",type:"type.testimonials_section",isList:!1,tooltipDescription:"",altLanguageBehavior:"LANGUAGE_SPECIFIC"},InsightSection:{name:"Insight Section",type:"type.insights_section",isList:!1,tooltipDescription:"",altLanguageBehavior:"LANGUAGE_SPECIFIC"},TeamSection:{name:"Team Section",type:"type.team_section",isList:!1,tooltipDescription:"",altLanguageBehavior:"LANGUAGE_SPECIFIC"}},y={root:{props:{version:20,title:{field:"name",constantValue:"",constantValueEnabled:!1},description:{field:"description",constantValue:"",constantValueEnabled:!1}}},zones:{},content:[{type:"ExpandedHeader",props:{data:{primaryHeader:{logo:{url:"https://placehold.co/100",alternateText:{en:"Logo",hasLocalizedValue:"true"},width:100,height:100},links:[{linkType:"URL",label:{en:"Main Header Link",hasLocalizedValue:"true"},link:"#"},{linkType:"URL",label:{en:"Main Header Link",hasLocalizedValue:"true"},link:"#"},{linkType:"URL",label:{en:"Main Header Link",hasLocalizedValue:"true"},link:"#"}],primaryCTA:{label:{en:"Call to Action",hasLocalizedValue:"true"},link:"#",linkType:"URL"},showPrimaryCTA:!0,secondaryCTA:{label:{en:"Call to Action",hasLocalizedValue:"true"},link:"#",linkType:"URL"},showSecondaryCTA:!0},secondaryHeader:{show:!1,showLanguageDropdown:!1,secondaryLinks:[{linkType:"URL",label:{en:"Secondary Header Link",hasLocalizedValue:"true"},link:"#"},{linkType:"URL",label:{en:"Secondary Header Link",hasLocalizedValue:"true"},link:"#"},{linkType:"URL",label:{en:"Secondary Header Link",hasLocalizedValue:"true"},link:"#"},{linkType:"URL",label:{en:"Secondary Header Link",hasLocalizedValue:"true"},link:"#"},{linkType:"URL",label:{en:"Secondary Header Link",hasLocalizedValue:"true"},link:"#"}]}},styles:{primaryHeader:{logo:{aspectRatio:2},backgroundColor:{bgColor:"bg-white",textColor:"text-black"},primaryCtaVariant:"primary",secondaryCtaVariant:"secondary"},secondaryHeader:{backgroundColor:{bgColor:"bg-palette-primary-light",textColor:"text-black"}},maxWidth:"theme",headerPosition:"scrollsWithPage"},analytics:{scope:"expandedHeader"},id:"ExpandedHeader-84f1ec29-3de0-4d31-a119-7edce3f2e3c9",ignoreLocaleWarning:["data.secondaryHeader"]}},{type:"BannerSection",props:{id:"BannerSection-dd6a3db2-0bd2-498a-87a8-717a49577f24",data:{text:{field:"",constantValue:{en:"Banner Text",hasLocalizedValue:"true"},constantValueEnabled:!0}},styles:{textAlignment:"center",backgroundColor:{bgColor:"bg-palette-primary-dark",textColor:"text-white"}},liveVisibility:!0}},{type:"BreadcrumbsSection",props:{id:"BreadcrumbsSection-16e56d01-021b-4882-9f40-d3861490d278",data:{directoryRoot:{en:"Directory Root",hasLocalizedValue:"true"}},analytics:{scope:"breadcrumbs"},liveVisibility:!0}},{type:"HeroSection",props:{data:{businessName:{field:"",constantValueEnabled:!0,constantValue:{en:"Business Name",hasLocalizedValue:"true"}},localGeoModifier:{field:"",constantValueEnabled:!0,constantValue:{en:"Geomodifier",hasLocalizedValue:"true"}},hours:{field:"hours",constantValue:{}},hero:{field:"",constantValue:{primaryCta:{label:{en:"Call To Action",hasLocalizedValue:"true"},link:"#",linkType:"URL",ctaType:"textAndLink"},secondaryCta:{label:{en:"Learn More",hasLocalizedValue:"true"},link:"#",linkType:"URL",ctaType:"textAndLink"},image:{url:"https://placehold.co/640x360",height:360,width:640}},constantValueEnabled:!0,constantValueOverride:{primaryCta:!0,secondaryCta:!0,image:!0}},showAverageReview:!0},styles:{variant:"classic",backgroundColor:{bgColor:"bg-white",textColor:"text-black"},desktopImagePosition:"right",businessNameLevel:3,localGeoModifierLevel:1,primaryCTA:"primary",secondaryCTA:"secondary",image:{aspectRatio:1.78,height:500},desktopContainerPosition:"left",mobileContentAlignment:"left",showImage:!0,mobileImagePosition:"bottom"},analytics:{scope:"heroSection"},liveVisibility:!0,id:"HeroSection-c18d2d63-a529-4168-bd13-d38124210eaf"}},{type:"CoreInfoSection",props:{id:"CoreInfoSection-b35756c8-6f58-4817-ae7a-1948f03b62e8",data:{info:{emails:{field:"emails",constantValue:[]},address:{field:"address",constantValue:{city:"",line1:"",postalCode:"",countryCode:""}},headingText:{field:"",constantValue:{en:"Information",hasLocalizedValue:"true"},constantValueEnabled:!0},phoneNumbers:[{label:{en:"Phone",hasLocalizedValue:"true"},number:{field:"mainPhone",constantValue:""}}]},hours:{hours:{field:"hours",constantValue:{}},headingText:{field:"",constantValue:{en:"Hours",hasLocalizedValue:"true"},constantValueEnabled:!0}},services:{headingText:{field:"",constantValue:{en:"Services",hasLocalizedValue:"true"},constantValueEnabled:!0},servicesList:{field:"services",constantValue:[]}}},styles:{info:{phoneFormat:"domestic",emailsListLength:1,includePhoneHyperlink:!0,showGetDirectionsLink:!0},hours:{startOfWeek:"today",collapseDays:!1,showAdditionalHoursText:!0},heading:{align:"left",level:3},backgroundColor:{bgColor:"bg-white",textColor:"text-black"}},analytics:{scope:"coreInfoSection"},liveVisibility:!0}},{type:"PromoSection",props:{id:"PromoSection-e5ed6606-8b89-4087-8b17-748d0f9e0b1a",data:{promo:{field:"",constantValue:{cta:{link:"#",label:{en:"Learn More",hasLocalizedValue:"true"},linkType:"URL"},image:{url:"https://placehold.co/640x360",width:640,height:360},title:{en:"Featured Promotion",hasLocalizedValue:"true"},description:{en:"Lorem ipsum dolor sit amet, consectetur adipiscing. Maecenas finibus placerat justo. 100 characters",hasLocalizedValue:"true"}},constantValueEnabled:!0,constantValueOverride:{cta:!0,image:!0,title:!0,description:!0}}},analytics:{scope:"promoSection"},liveVisibility:!0,styles:{heading:{align:"left",level:2},ctaVariant:"primary",orientation:"left",backgroundColor:{bgColor:"bg-white",textColor:"text-black"},image:{aspectRatio:1.78}}}},{type:"ProductSection",props:{styles:{heading:{align:"left",level:2},cards:{headingLevel:3,backgroundColor:{bgColor:"bg-white",textColor:"text-black"}},backgroundColor:{bgColor:"bg-palette-primary-light",textColor:"text-black"}},id:"ProductSection-f073638a-d0c0-43c2-9835-8988035488a1",data:{heading:{field:"",constantValue:{en:"Featured Products",hasLocalizedValue:"true"},constantValueEnabled:!0},products:{field:"",constantValue:{products:[{cta:{link:"#",label:{en:"Learn More",hasLocalizedValue:"true"},linkType:"URL"},name:{en:"Product Title",hasLocalizedValue:"true"},image:{url:"https://placehold.co/640x360",width:640,height:360},category:{en:"Category, Pricing, etc",hasLocalizedValue:"true"},description:{en:"Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.",hasLocalizedValue:"true"}},{cta:{link:"#",label:{en:"Learn More",hasLocalizedValue:"true"},linkType:"URL"},name:{en:"Product Title",hasLocalizedValue:"true"},image:{url:"https://placehold.co/640x360",width:640,height:360},category:{en:"Category, Pricing, etc",hasLocalizedValue:"true"},description:{en:"Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.",hasLocalizedValue:"true"}},{cta:{link:"#",label:{en:"Learn More",hasLocalizedValue:"true"},linkType:"URL"},name:{en:"Product Title",hasLocalizedValue:"true"},image:{url:"https://placehold.co/640x360",width:640,height:360},category:{en:"Category, Pricing, etc",hasLocalizedValue:"true"},description:{en:"Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.",hasLocalizedValue:"true"}}]},constantValueEnabled:!0}},analytics:{scope:"productsSection"},liveVisibility:!0}},{type:"TestimonialSection",props:{styles:{heading:{align:"left",level:2},cards:{headingLevel:3,backgroundColor:{bgColor:"bg-palette-primary-light",textColor:"text-black"}},backgroundColor:{bgColor:"bg-palette-secondary-light",textColor:"text-black"}},id:"TestimonialSection-ad495cbf-8856-4f3e-a1a9-6212df3283c3",data:{heading:{field:"",constantValue:{en:"Featured Testimonials",hasLocalizedValue:"true"},constantValueEnabled:!0},testimonials:{field:"",constantValue:{testimonials:[{description:{en:"Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.",hasLocalizedValue:"true"},contributorName:{en:"Name",hasLocalizedValue:"true"},contributionDate:"July 22, 2022"},{description:{en:"Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.",hasLocalizedValue:"true"},contributorName:{en:"Name",hasLocalizedValue:"true"},contributionDate:"July 22, 2022"},{description:{en:"Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.",hasLocalizedValue:"true"},contributorName:{en:"Name",hasLocalizedValue:"true"},contributionDate:"July 22, 2022"}]},constantValueEnabled:!0}},liveVisibility:!0}},{type:"FAQSection",props:{id:"FAQSection-1dfb0458-3292-4d45-8df1-922db4914060",data:{faqs:{field:"",constantValue:{faqs:[{answer:{en:"Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.",hasLocalizedValue:"true"},question:{en:"Question Lorem ipsum dolor sit amet?",hasLocalizedValue:"true"}},{answer:{en:"Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.",hasLocalizedValue:"true"},question:{en:"Question Lorem ipsum dolor sit amet?",hasLocalizedValue:"true"}},{answer:{en:"Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.",hasLocalizedValue:"true"},question:{en:"Question Lorem ipsum dolor sit amet?",hasLocalizedValue:"true"}}]},constantValueEnabled:!0},heading:{field:"",constantValue:{en:"Frequently Asked Questions",hasLocalizedValue:"true"},constantValueEnabled:!0}},styles:{heading:{align:"left",level:2},backgroundColor:{bgColor:"bg-palette-primary-light",textColor:"text-black"}},liveVisibility:!0}},{type:"TeamSection",props:{styles:{heading:{align:"left",level:2},cards:{headingLevel:3,backgroundColor:{bgColor:"bg-white",textColor:"text-black"}},backgroundColor:{bgColor:"bg-palette-secondary-light",textColor:"text-black"}},id:"TeamSection-ecc3b656-3b9f-4579-b2b6-f327c0f72b44",data:{people:{field:"",constantValue:{people:[{cta:{link:"#",label:{en:"Visit Profile",hasLocalizedValue:"true"},linkType:"URL"},name:{en:"First Last",hasLocalizedValue:"true"},email:"jkelley@[company].com",title:{en:"Associate Agent",hasLocalizedValue:"true"},headshot:{url:"https://placehold.co/80x80",width:80,height:80},phoneNumber:"(202) 770-6619 "},{cta:{link:"#",label:{en:"Visit Profile",hasLocalizedValue:"true"},linkType:"URL"},name:{en:"First Last",hasLocalizedValue:"true"},email:"jkelley@[company].com",title:{en:"Associate Agent",hasLocalizedValue:"true"},headshot:{url:"https://placehold.co/80x80",width:80,height:80},phoneNumber:"(202) 770-6619 "},{cta:{link:"#",label:{en:"Visit Profile",hasLocalizedValue:"true"},linkType:"URL"},name:{en:"First Last",hasLocalizedValue:"true"},email:"jkelley@[company].com",title:{en:"Associate Agent",hasLocalizedValue:"true"},headshot:{url:"https://placehold.co/80x80",width:80,height:80},phoneNumber:"(202) 770-6619 "}]},constantValueEnabled:!0},heading:{field:"",constantValue:{en:"Meet Our Team",hasLocalizedValue:"true"},constantValueEnabled:!0}},analytics:{scope:"teamSection"},liveVisibility:!0}},{type:"InsightSection",props:{styles:{heading:{align:"left",level:2},cards:{headingLevel:3,backgroundColor:{bgColor:"bg-white",textColor:"text-black"}},backgroundColor:{bgColor:"bg-palette-primary-light",textColor:"text-black"}},id:"InsightSection-575c1600-cf09-472d-98ea-217e8842773d",data:{heading:{field:"",constantValue:{en:"Insights",hasLocalizedValue:"true"},constantValueEnabled:!0},insights:{field:"",constantValue:{insights:[{cta:{link:"#",label:{en:"Read More",hasLocalizedValue:"true"},linkType:"URL"},name:{en:"Article Name",hasLocalizedValue:"true"},image:{url:"https://placehold.co/640x360",width:640,height:360},category:{en:"Category",hasLocalizedValue:"true"},description:{en:"Lorem ipsum dolor sit amet, consectetur adipiscing. Maecenas finibus placerat justo. Lorem ipsum dolor sit amet, consectetur adipiscing. Maecenas finibus placerat justo.Lorem ipsum dolor sit amet, consectetur adipiscing. Maecenas finibus placerat justo. 300 characters",hasLocalizedValue:"true"},publishTime:"August 2, 2022"},{cta:{link:"#",label:{en:"Read More",hasLocalizedValue:"true"},linkType:"URL"},name:{en:"Article Name",hasLocalizedValue:"true"},image:{url:"https://placehold.co/640x360",width:640,height:360},category:{en:"Category",hasLocalizedValue:"true"},description:{en:"Lorem ipsum dolor sit amet, consectetur adipiscing. Maecenas finibus placerat justo. Lorem ipsum dolor sit amet, consectetur adipiscing. Maecenas finibus placerat justo.Lorem ipsum dolor sit amet, consectetur adipiscing. Maecenas finibus placerat justo. 300 characters",hasLocalizedValue:"true"},publishTime:"August 2, 2022"},{cta:{link:"#",label:{en:"Read More",hasLocalizedValue:"true"},linkType:"URL"},name:{en:"Article Name",hasLocalizedValue:"true"},image:{url:"https://placehold.co/640x360",width:640,height:360},category:{en:"Category",hasLocalizedValue:"true"},description:{en:"Lorem ipsum dolor sit amet, consectetur adipiscing. Maecenas finibus placerat justo. Lorem ipsum dolor sit amet, consectetur adipiscing. Maecenas finibus placerat justo.Lorem ipsum dolor sit amet, consectetur adipiscing. Maecenas finibus placerat justo. 300 characters",hasLocalizedValue:"true"},publishTime:"August 2, 2022"}]},constantValueEnabled:!0}},analytics:{scope:"insightsSection"},liveVisibility:!0}},{type:"PhotoGallerySection",props:{data:{heading:{field:"",constantValue:{en:"Gallery",hasLocalizedValue:"true"},constantValueEnabled:!0},images:{field:"",constantValue:[{assetImage:{url:"https://placehold.co/1000x570/png",width:1e3,height:570,assetImage:{name:"Placeholder"}}},{assetImage:{url:"https://placehold.co/1000x570/png",width:1e3,height:570,assetImage:{name:"Placeholder"}}},{assetImage:{url:"https://placehold.co/1000x570/png",width:1e3,height:570,assetImage:{name:"Placeholder"}}}],constantValueEnabled:!0}},styles:{backgroundColor:{bgColor:"bg-white",textColor:"text-black"},heading:{level:2,align:"left"},image:{aspectRatio:1.78}},liveVisibility:!0,id:"PhotoGallerySection-0f51a6bc-1044-40e8-a20c-4a37438f6e1b"}},{type:"EventSection",props:{styles:{heading:{align:"left",level:2},cards:{headingLevel:3,backgroundColor:{bgColor:"bg-white",textColor:"text-black"}},backgroundColor:{bgColor:"bg-palette-primary-light",textColor:"text-black"}},id:"EventSection-01003495-92d9-44f1-bff9-cab0f291db47",data:{events:{field:"",constantValue:{events:[{cta:{link:"#",label:{en:"Learn More",hasLocalizedValue:"true"},linkType:"URL"},image:{url:"https://placehold.co/640x360",width:640,height:360},title:{en:"Event Title",hasLocalizedValue:"true"},dateTime:"2022-12-12T14:00:00",description:{en:"Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam.",hasLocalizedValue:"true"}},{cta:{link:"#",label:{en:"Learn More",hasLocalizedValue:"true"},linkType:"URL"},image:{url:"https://placehold.co/640x360",width:640,height:360},title:{en:"Event Title",hasLocalizedValue:"true"},dateTime:"2022-12-12T14:00:00",description:{en:"Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam.",hasLocalizedValue:"true"}},{cta:{link:"#",label:{en:"Learn More",hasLocalizedValue:"true"},linkType:"URL"},image:{url:"https://placehold.co/640x360",width:640,height:360},title:{en:"Event Title",hasLocalizedValue:"true"},dateTime:"2022-12-12T14:00:00",description:{en:"Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam.",hasLocalizedValue:"true"}}]},constantValueEnabled:!0},heading:{field:"",constantValue:{en:"Upcoming Events",hasLocalizedValue:"true"},constantValueEnabled:!0}},analytics:{scope:"eventsSection"},liveVisibility:!0}},{type:"NearbyLocationsSection",props:{styles:{cards:{headingLevel:4,backgroundColor:{bgColor:"bg-white",textColor:"text-black"}},hours:{timeFormat:"12h",showDayNames:!0,dayOfWeekFormat:"long",showCurrentStatus:!0},heading:{align:"left",level:3},backgroundColor:{bgColor:"bg-white",textColor:"text-black"},phoneNumberLink:!1,phoneNumberFormat:"domestic"},id:"NearbyLocationsSection-1549e534-3ba4-436d-8627-23ea2ff461cd",data:{limit:3,radius:10,heading:{field:"",constantValue:{en:"Nearby Locations",hasLocalizedValue:"true"},constantValueEnabled:!0},coordinate:{field:"yextDisplayCoordinate",constantValue:{latitude:0,longitude:0}}},analytics:{scope:"nearbyLocationsSection"},liveVisibility:!0}},{type:"ExpandedFooter",props:{data:{primaryFooter:{logo:{url:"https://placehold.co/100",height:100,width:100,alternateText:{en:"Logo",hasLocalizedValue:"true"}},footerLinks:[{linkType:"URL",label:{en:"Footer Link",hasLocalizedValue:"true"},link:"#"},{linkType:"URL",label:{en:"Footer Link",hasLocalizedValue:"true"},link:"#"},{linkType:"URL",label:{en:"Footer Link",hasLocalizedValue:"true"},link:"#"},{linkType:"URL",label:{en:"Footer Link",hasLocalizedValue:"true"},link:"#"},{linkType:"URL",label:{en:"Footer Link",hasLocalizedValue:"true"},link:"#"}],xLink:"",facebookLink:"",instagramLink:"",pinterestLink:"",linkedInLink:"",youtubeLink:"",tiktokLink:"",utilityImages:[],expandedFooter:!1,expandedFooterLinks:[{label:{en:"Footer Label",hasLocalizedValue:"true"},links:[{linkType:"URL",label:{en:"Footer Link",hasLocalizedValue:"true"},link:"#"},{linkType:"URL",label:{en:"Footer Link",hasLocalizedValue:"true"},link:"#"},{linkType:"URL",label:{en:"Footer Link",hasLocalizedValue:"true"},link:"#"},{linkType:"URL",label:{en:"Footer Link",hasLocalizedValue:"true"},link:"#"},{linkType:"URL",label:{en:"Footer Link",hasLocalizedValue:"true"},link:"#"}]},{label:{en:"Footer Label",hasLocalizedValue:"true"},links:[{linkType:"URL",label:{en:"Footer Link",hasLocalizedValue:"true"},link:"#"},{linkType:"URL",label:{en:"Footer Link",hasLocalizedValue:"true"},link:"#"},{linkType:"URL",label:{en:"Footer Link",hasLocalizedValue:"true"},link:"#"},{linkType:"URL",label:{en:"Footer Link",hasLocalizedValue:"true"},link:"#"},{linkType:"URL",label:{en:"Footer Link",hasLocalizedValue:"true"},link:"#"}]},{label:{en:"Footer Label",hasLocalizedValue:"true"},links:[{linkType:"URL",label:{en:"Footer Link",hasLocalizedValue:"true"},link:"#"},{linkType:"URL",label:{en:"Footer Link",hasLocalizedValue:"true"},link:"#"},{linkType:"URL",label:{en:"Footer Link",hasLocalizedValue:"true"},link:"#"},{linkType:"URL",label:{en:"Footer Link",hasLocalizedValue:"true"},link:"#"},{linkType:"URL",label:{en:"Footer Link",hasLocalizedValue:"true"},link:"#"}]},{label:{en:"Footer Label",hasLocalizedValue:"true"},links:[{linkType:"URL",label:{en:"Footer Link",hasLocalizedValue:"true"},link:"#"},{linkType:"URL",label:{en:"Footer Link",hasLocalizedValue:"true"},link:"#"},{linkType:"URL",label:{en:"Footer Link",hasLocalizedValue:"true"},link:"#"},{linkType:"URL",label:{en:"Footer Link",hasLocalizedValue:"true"},link:"#"},{linkType:"URL",label:{en:"Footer Link",hasLocalizedValue:"true"},link:"#"}]}]},secondaryFooter:{show:!1,copyrightMessage:{en:"",hasLocalizedValue:"true"},secondaryFooterLinks:[{linkType:"URL",label:{en:"Footer Link",hasLocalizedValue:"true"},link:"#"},{linkType:"URL",label:{en:"Footer Link",hasLocalizedValue:"true"},link:"#"},{linkType:"URL",label:{en:"Footer Link",hasLocalizedValue:"true"},link:"#"},{linkType:"URL",label:{en:"Footer Link",hasLocalizedValue:"true"},link:"#"},{linkType:"URL",label:{en:"Footer Link",hasLocalizedValue:"true"},link:"#"}]}},styles:{primaryFooter:{logo:{width:0,aspectRatio:1.78},utilityImages:{width:0,aspectRatio:1},backgroundColor:{bgColor:"bg-palette-primary-dark",textColor:"text-white"},linksAlignment:"right"},secondaryFooter:{backgroundColor:{bgColor:"bg-palette-primary-light",textColor:"text-black"},linksAlignment:"left"},maxWidth:"theme"},analytics:{scope:"expandedFooter"},id:"ExpandedFooter-edbfdaa2-b232-437f-87ef-6ce8a2563b25",ignoreLocaleWarning:["data.primaryFooter.expandedFooterLinks","data.secondaryFooter"]}}]},L={root:{props:{version:7,title:{field:"",constantValue:"",constantValueEnabled:!1},description:{field:"",constantValue:"",constantValueEnabled:!1}}},content:[{type:"ExpandedHeader",props:{data:{primaryHeader:{logo:"https://placehold.co/100",links:[{linkType:"URL",label:{en:"Main Header Link",hasLocalizedValue:"true"},link:"#"},{linkType:"URL",label:{en:"Main Header Link",hasLocalizedValue:"true"},link:"#"},{linkType:"URL",label:{en:"Main Header Link",hasLocalizedValue:"true"},link:"#"}],primaryCTA:{label:{en:"Call to Action",hasLocalizedValue:"true"},link:"#",linkType:"URL"},secondaryCTA:{label:{en:"Call to Action",hasLocalizedValue:"true"},link:"#",linkType:"URL"}},secondaryHeader:{show:!1,showLanguageDropdown:!1,secondaryLinks:[{linkType:"URL",label:{en:"Secondary Header Link",hasLocalizedValue:"true"},link:"#"},{linkType:"URL",label:{en:"Secondary Header Link",hasLocalizedValue:"true"},link:"#"},{linkType:"URL",label:{en:"Secondary Header Link",hasLocalizedValue:"true"},link:"#"},{linkType:"URL",label:{en:"Secondary Header Link",hasLocalizedValue:"true"},link:"#"},{linkType:"URL",label:{en:"Secondary Header Link",hasLocalizedValue:"true"},link:"#"}]}},styles:{primaryHeader:{logo:{aspectRatio:2},backgroundColor:{bgColor:"bg-white",textColor:"text-black"},primaryCtaVariant:"primary",secondaryCtaVariant:"secondary"},secondaryHeader:{backgroundColor:{bgColor:"bg-palette-primary-light",textColor:"text-black"}},maxWidth:"theme"},analytics:{scope:"expandedHeader"},id:"ExpandedHeader-56e40bdd-30f2-45a8-aa97-62ee679b56d6"}},{type:"Directory",props:{data:{directoryRoot:{en:"Directory Root",hasLocalizedValue:"true"}},styles:{cards:{backgroundColor:{bgColor:"bg-white",textColor:"text-black"},headingLevel:3}},analytics:{scope:"directory"},id:"Directory-f934c0cd-3dfa-4937-9fc2-d805fa341915"}},{type:"ExpandedFooter",props:{data:{primaryFooter:{logo:"https://placehold.co/100",footerLinks:[{linkType:"URL",label:{en:"Footer Link",hasLocalizedValue:"true"},link:"#"},{linkType:"URL",label:{en:"Footer Link",hasLocalizedValue:"true"},link:"#"},{linkType:"URL",label:{en:"Footer Link",hasLocalizedValue:"true"},link:"#"},{linkType:"URL",label:{en:"Footer Link",hasLocalizedValue:"true"},link:"#"},{linkType:"URL",label:{en:"Footer Link",hasLocalizedValue:"true"},link:"#"}],xLink:"",facebookLink:"",instagramLink:"",pinterestLink:"",linkedInLink:"",youtubeLink:"",utilityImages:[],expandedFooter:!1,expandedFooterLinks:[{label:"Footer Label",links:[{linkType:"URL",label:{en:"Footer Link",hasLocalizedValue:"true"},link:"#"},{linkType:"URL",label:{en:"Footer Link",hasLocalizedValue:"true"},link:"#"},{linkType:"URL",label:{en:"Footer Link",hasLocalizedValue:"true"},link:"#"},{linkType:"URL",label:{en:"Footer Link",hasLocalizedValue:"true"},link:"#"},{linkType:"URL",label:{en:"Footer Link",hasLocalizedValue:"true"},link:"#"}]},{label:"Footer Label",links:[{linkType:"URL",label:{en:"Footer Link",hasLocalizedValue:"true"},link:"#"},{linkType:"URL",label:{en:"Footer Link",hasLocalizedValue:"true"},link:"#"},{linkType:"URL",label:{en:"Footer Link",hasLocalizedValue:"true"},link:"#"},{linkType:"URL",label:{en:"Footer Link",hasLocalizedValue:"true"},link:"#"},{linkType:"URL",label:{en:"Footer Link",hasLocalizedValue:"true"},link:"#"}]},{label:"Footer Label",links:[{linkType:"URL",label:{en:"Footer Link",hasLocalizedValue:"true"},link:"#"},{linkType:"URL",label:{en:"Footer Link",hasLocalizedValue:"true"},link:"#"},{linkType:"URL",label:{en:"Footer Link",hasLocalizedValue:"true"},link:"#"},{linkType:"URL",label:{en:"Footer Link",hasLocalizedValue:"true"},link:"#"},{linkType:"URL",label:{en:"Footer Link",hasLocalizedValue:"true"},link:"#"}]},{label:"Footer Label",links:[{linkType:"URL",label:{en:"Footer Link",hasLocalizedValue:"true"},link:"#"},{linkType:"URL",label:{en:"Footer Link",hasLocalizedValue:"true"},link:"#"},{linkType:"URL",label:{en:"Footer Link",hasLocalizedValue:"true"},link:"#"},{linkType:"URL",label:{en:"Footer Link",hasLocalizedValue:"true"},link:"#"},{linkType:"URL",label:{en:"Footer Link",hasLocalizedValue:"true"},link:"#"}]}]},secondaryFooter:{show:!1,copyrightMessage:{en:"",hasLocalizedValue:"true"},secondaryFooterLinks:[{linkType:"URL",label:{en:"Footer Link",hasLocalizedValue:"true"},link:"#"},{linkType:"URL",label:{en:"Footer Link",hasLocalizedValue:"true"},link:"#"},{linkType:"URL",label:{en:"Footer Link",hasLocalizedValue:"true"},link:"#"},{linkType:"URL",label:{en:"Footer Link",hasLocalizedValue:"true"},link:"#"},{linkType:"URL",label:{en:"Footer Link",hasLocalizedValue:"true"},link:"#"}]}},styles:{primaryFooter:{logo:{width:0,aspectRatio:1.78},utilityImages:{width:0,aspectRatio:1},backgroundColor:{bgColor:"bg-palette-primary-dark",textColor:"text-white"},linksAlignment:"right"},secondaryFooter:{backgroundColor:{bgColor:"bg-palette-primary-light",textColor:"text-black"},linksAlignment:"left"},maxWidth:"theme"},analytics:{scope:"expandedFooter"},id:"ExpandedFooter-5707a44e-0d3b-4e1f-8266-12403c7a036c"}}],zones:{}},b={root:{props:{version:22,title:{field:"",constantValue:"",constantValueEnabled:!1},description:{field:"",constantValue:"",constantValueEnabled:!1}}},zones:{},content:[{type:"Locator",props:{id:"Locator-2ae506f4-a3ee-46ea-b5f9-e4c3236243a7",mapStyle:"mapbox://styles/mapbox/streets-v12",filters:{openNowButton:!1,showDistanceOptions:!1}}}]},c={main:JSON.stringify(y),directory:JSON.stringify(L),locator:JSON.stringify(b)},k=[{filepath:"src/templates/main.tsx",content:p,templateManifestEntry:{name:"main",description:"Use this template to generate pages for each of your Locations.",exampleSiteUrl:"",layoutRequired:!0,defaultLayoutData:c.main,componentFields:[e.HeroSection,e.PromoSection,e.ProductSection,e.EventSection,e.FAQSection,e.TestimonialSection,e.InsightSection,e.TeamSection]}},{filepath:"src/templates/directory.tsx",content:h,templateManifestEntry:{name:"directory",description:"Use this template to generate pages for each of your Directory entities.",exampleSiteUrl:"",layoutRequired:!0,defaultLayoutData:c.directory}},{filepath:"src/templates/locator.tsx",content:g,templateManifestEntry:{name:"locator",description:"Use this template to generate pages for your Locators.",exampleSiteUrl:"",layoutRequired:!0,defaultLayoutData:c.locator}},{filepath:"src/templates/edit.tsx",content:m}],f=()=>{let n=!1;const d=[],u=()=>{const t={templates:[]};k.forEach(l=>{const r=s.join(process.cwd(),l.filepath);d.push(r),a.mkdirSync(s.dirname(r),{recursive:!0}),a.existsSync(r)||a.writeFileSync(r,l.content),l.templateManifestEntry&&t.templates.push(l.templateManifestEntry)});const i=s.join(process.cwd(),".template-manifest.json");a.existsSync(i)||a.writeFileSync(i,JSON.stringify(t,null,2))},o=()=>{d.forEach(t=>{a.rmSync(t,{force:!0})})};return process.on("SIGINT",()=>{o(),process.nextTick(()=>process.exit(0))}),process.on("SIGTERM",()=>{o(),process.nextTick(()=>process.exit(0))}),{name:"vite-plugin-yext-visual-editor",config(t,{command:i}){n=i==="build"},configureServer(t){n||(u(),t.httpServer?.on("close",()=>{o()}))},buildStart(){n&&u()},buildEnd(){n&&o()},closeBundle(){n&&o()}}};exports.yextVisualEditorPlugin=f;
|