@yext/visual-editor 2.0.0-beta.11 → 2.0.0-beta.13
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/{SectionLibraryVisualEditorProvider-DJMXab-H.js → SectionLibraryVisualEditorProvider-64whofF8.js} +5861 -5761
- package/dist/cli/assets/directory-locator-source/components/sections/locator/Filters.test.tsx +1 -0
- package/dist/cli/assets/directory-locator-source/components/sections/locator/Filters.tsx +9 -8
- package/dist/cli/assets/directory-locator-source/components/sections/locator/Locator.test.tsx +1 -1
- package/dist/cli/assets/directory-locator-source/components/sections/locator/Locator.tsx +104 -0
- package/dist/cli/assets/directory-locator-source/components/sections/locator/LocatorFields.test.ts +66 -0
- package/dist/cli/assets/directory-locator-source/components/sections/locator/LocatorRadius.test.ts +700 -0
- package/dist/cli/assets/directory-locator-source/components/sections/locator/LocatorResultCard.tsx +29 -1
- package/dist/cli/assets/directory-locator-source/components/sections/locator/LocatorWrapper.test.ts +370 -0
- package/dist/cli/assets/directory-locator-source/components/sections/locator/LocatorWrapper.tsx +270 -39
- package/dist/cli/assets/directory-locator-source/components/sections/locator/Map.tsx +91 -12
- package/dist/cli/assets/directory-locator-source/components/sections/locator/Results.tsx +11 -6
- package/dist/cli/assets/directory-locator-source/components/sections/locator/distanceUnits.ts +7 -0
- package/dist/cli/assets/directory-locator-source/sectionLibrarySupport.ts +4 -0
- package/dist/cli/yextve.js +3 -3
- package/dist/{createYextFieldTransforms-B7vqqb3m.d.ts → createYextFieldTransforms-w-U4b5Zf.d.ts} +27 -17
- package/dist/index.d.ts +36 -11
- package/dist/locales/platform/cs/visual-editor.json +10 -0
- package/dist/locales/platform/da/visual-editor.json +10 -0
- package/dist/locales/platform/de/visual-editor.json +10 -0
- package/dist/locales/platform/en/visual-editor.json +10 -0
- package/dist/locales/platform/en-GB/visual-editor.json +10 -0
- package/dist/locales/platform/es/visual-editor.json +10 -0
- package/dist/locales/platform/et/visual-editor.json +10 -0
- package/dist/locales/platform/fi/visual-editor.json +10 -0
- package/dist/locales/platform/fr/visual-editor.json +10 -0
- package/dist/locales/platform/hr/visual-editor.json +10 -0
- package/dist/locales/platform/hu/visual-editor.json +10 -0
- package/dist/locales/platform/it/visual-editor.json +10 -0
- package/dist/locales/platform/ja/visual-editor.json +10 -0
- package/dist/locales/platform/lt/visual-editor.json +10 -0
- package/dist/locales/platform/lv/visual-editor.json +10 -0
- package/dist/locales/platform/nb/visual-editor.json +10 -0
- package/dist/locales/platform/nl/visual-editor.json +10 -0
- package/dist/locales/platform/pl/visual-editor.json +10 -0
- package/dist/locales/platform/pt/visual-editor.json +10 -0
- package/dist/locales/platform/ro/visual-editor.json +10 -0
- package/dist/locales/platform/sk/visual-editor.json +10 -0
- package/dist/locales/platform/sv/visual-editor.json +10 -0
- package/dist/locales/platform/tr/visual-editor.json +10 -0
- package/dist/locales/platform/zh/visual-editor.json +10 -0
- package/dist/locales/platform/zh-TW/visual-editor.json +10 -0
- package/dist/plugin/plugin.js +2 -1
- package/dist/plugin/vite-plugin/layout-generation/modelProxy.d.ts +1 -1
- package/dist/section-library-support.js +67 -67
- package/dist/sectionLibrarySupport.d.ts +2 -2
- package/dist/{visual-editor-DTE5kxrA.js → visual-editor-B84T0Hz5.js} +84 -74
- package/dist/{visual-editor-6mKs9VUe.js → visual-editor-B8eVGZjZ.js} +26 -16
- package/dist/{visual-editor-Bs3wAslG.js → visual-editor-BTv1Bren.js} +62 -52
- package/dist/{visual-editor-DkHhrFsX.js → visual-editor-BWJvQ6QT.js} +110 -100
- package/dist/{visual-editor-D7VeTRK_.js → visual-editor-BWk-Ri1i.js} +73 -63
- package/dist/{visual-editor-LXMNWXry.js → visual-editor-BdM7VUac.js} +76 -66
- package/dist/{visual-editor-ClC6hoz3.js → visual-editor-BmM2bYhg.js} +82 -72
- package/dist/{visual-editor-qJW0uCiQ.js → visual-editor-BuRftlWt.js} +89 -79
- package/dist/{visual-editor-DjTEbi-1.js → visual-editor-BxnbtD_z.js} +63 -53
- package/dist/{visual-editor-CcfUKpnd.js → visual-editor-C4Nretnd.js} +59 -49
- package/dist/{visual-editor-Duishbsa.js → visual-editor-CFE4ijeV.js} +54 -44
- package/dist/{visual-editor-DtL-Zuv_.js → visual-editor-CMfDvLU2.js} +86 -76
- package/dist/{visual-editor-BK6fTU7k.js → visual-editor-CauX7_Ur.js} +27 -17
- package/dist/{visual-editor-QpGupjY5.js → visual-editor-D5d9meOo.js} +93 -83
- package/dist/{visual-editor-gEaWoNRu.js → visual-editor-D9U8TxD-.js} +51 -41
- package/dist/{visual-editor-CtQwadxQ.js → visual-editor-DBZwjDQd.js} +47 -37
- package/dist/{visual-editor-_TatCCAS.js → visual-editor-DI6rS2dP.js} +116 -106
- package/dist/{visual-editor-sOPDMkOR.js → visual-editor-DOioJ5CW.js} +84 -74
- package/dist/{visual-editor-zKhC7_0C.js → visual-editor-D_EvXM08.js} +71 -61
- package/dist/{visual-editor-BruRrJYN.js → visual-editor-DguhAL12.js} +10 -0
- package/dist/{visual-editor-CHWtMtlu.js → visual-editor-DmsRSmAI.js} +90 -80
- package/dist/{visual-editor-vomNdlNO.js → visual-editor-DnNNHiLS.js} +86 -76
- package/dist/{visual-editor-C9TLeAzP.js → visual-editor-DvksDrGT.js} +59 -49
- package/dist/{visual-editor-tPb7n5l8.js → visual-editor-XsBMHUSs.js} +66 -56
- package/dist/{visual-editor-gjpr-NAN.js → visual-editor-kiT3ocKi.js} +60 -50
- package/dist/visual-editor.css +1 -1
- package/dist/visual-editor.js +7003 -6609
- package/package.json +3 -3
|
@@ -7,6 +7,9 @@ import {
|
|
|
7
7
|
} from "@yext/search-ui-react";
|
|
8
8
|
import { Result } from "@yext/search-headless-react";
|
|
9
9
|
import React from "react";
|
|
10
|
+
import type mapboxgl from "mapbox-gl";
|
|
11
|
+
import ReactDOM from "react-dom";
|
|
12
|
+
import { createRoot, type Root } from "react-dom/client";
|
|
10
13
|
import { useTranslation } from "react-i18next";
|
|
11
14
|
import { ImageField } from "../../../fields/ImageField.tsx";
|
|
12
15
|
import { useDocument } from "../../../hooks/useDocument.tsx";
|
|
@@ -135,6 +138,7 @@ const LocatorTestMap = () => {
|
|
|
135
138
|
|
|
136
139
|
interface MapProps {
|
|
137
140
|
mapStyle?: string;
|
|
141
|
+
preserveMapView?: React.MutableRefObject<boolean>;
|
|
138
142
|
centerCoords?: Coordinate;
|
|
139
143
|
onDragHandler?: OnDragHandler;
|
|
140
144
|
scrollToResult?: (result: Result<Location> | undefined) => void;
|
|
@@ -144,6 +148,7 @@ interface MapProps {
|
|
|
144
148
|
|
|
145
149
|
export const LocatorMap: React.FC<MapProps> = ({
|
|
146
150
|
mapStyle,
|
|
151
|
+
preserveMapView,
|
|
147
152
|
centerCoords,
|
|
148
153
|
onDragHandler,
|
|
149
154
|
scrollToResult,
|
|
@@ -175,17 +180,91 @@ export const LocatorMap: React.FC<MapProps> = ({
|
|
|
175
180
|
}),
|
|
176
181
|
[centerCoords, mapPadding, mapStyle]
|
|
177
182
|
);
|
|
178
|
-
const
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
}
|
|
188
|
-
|
|
183
|
+
const markerRoots = React.useRef(new Map<HTMLElement, Root>());
|
|
184
|
+
const restoreCamera = React.useRef<(() => void) | null>(null);
|
|
185
|
+
|
|
186
|
+
/**
|
|
187
|
+
* 1. Guard this map's camera before Search UI fits the new markers.
|
|
188
|
+
* 2. Render each pin and remove its React root when its marker is removed.
|
|
189
|
+
*/
|
|
190
|
+
const renderPin = React.useCallback(
|
|
191
|
+
(
|
|
192
|
+
pinProps: PinComponentProps<Location> & { container: HTMLElement }
|
|
193
|
+
): void => {
|
|
194
|
+
if (!restoreCamera.current) {
|
|
195
|
+
// Search UI can provide the native map directly or through a facade.
|
|
196
|
+
const nativeMap = (
|
|
197
|
+
"getNativeInstance" in pinProps.mapbox &&
|
|
198
|
+
typeof pinProps.mapbox.getNativeInstance === "function"
|
|
199
|
+
? pinProps.mapbox.getNativeInstance()
|
|
200
|
+
: pinProps.mapbox
|
|
201
|
+
) as mapboxgl.Map;
|
|
202
|
+
const fitBounds = nativeMap.fitBounds;
|
|
203
|
+
const flyTo = nativeMap.flyTo;
|
|
204
|
+
nativeMap.fitBounds = (
|
|
205
|
+
...args: Parameters<mapboxgl.Map["fitBounds"]>
|
|
206
|
+
): mapboxgl.Map =>
|
|
207
|
+
preserveMapView?.current
|
|
208
|
+
? nativeMap
|
|
209
|
+
: fitBounds.apply(nativeMap, args);
|
|
210
|
+
nativeMap.flyTo = (
|
|
211
|
+
...args: Parameters<mapboxgl.Map["flyTo"]>
|
|
212
|
+
): mapboxgl.Map =>
|
|
213
|
+
preserveMapView?.current ? nativeMap : flyTo.apply(nativeMap, args);
|
|
214
|
+
|
|
215
|
+
const observer = new MutationObserver((): void => {
|
|
216
|
+
for (const [container, root] of markerRoots.current) {
|
|
217
|
+
if (!nativeMap.getContainer().contains(container)) {
|
|
218
|
+
markerRoots.current.delete(container);
|
|
219
|
+
queueMicrotask((): void => root.unmount());
|
|
220
|
+
}
|
|
221
|
+
}
|
|
222
|
+
});
|
|
223
|
+
observer.observe(nativeMap.getContainer(), {
|
|
224
|
+
childList: true,
|
|
225
|
+
subtree: true,
|
|
226
|
+
});
|
|
227
|
+
restoreCamera.current = (): void => {
|
|
228
|
+
observer.disconnect();
|
|
229
|
+
nativeMap.fitBounds = fitBounds;
|
|
230
|
+
nativeMap.flyTo = flyTo;
|
|
231
|
+
};
|
|
232
|
+
}
|
|
233
|
+
let root = markerRoots.current.get(pinProps.container);
|
|
234
|
+
if (!root) {
|
|
235
|
+
// Keep the React 17 rendering path supported by this package.
|
|
236
|
+
root =
|
|
237
|
+
Number(React.version.split(".")[0]) >= 18
|
|
238
|
+
? createRoot(pinProps.container)
|
|
239
|
+
: {
|
|
240
|
+
render: (children: React.ReactNode): void => {
|
|
241
|
+
ReactDOM.render(<>{children}</>, pinProps.container);
|
|
242
|
+
},
|
|
243
|
+
unmount: (): void => {
|
|
244
|
+
ReactDOM.unmountComponentAtNode(pinProps.container);
|
|
245
|
+
},
|
|
246
|
+
};
|
|
247
|
+
markerRoots.current.set(pinProps.container, root);
|
|
248
|
+
}
|
|
249
|
+
root.render(
|
|
250
|
+
<LocatorMapPin
|
|
251
|
+
{...pinProps}
|
|
252
|
+
locationStyleConfig={locationStyleConfig}
|
|
253
|
+
/>
|
|
254
|
+
);
|
|
255
|
+
},
|
|
256
|
+
[locationStyleConfig, preserveMapView]
|
|
257
|
+
);
|
|
258
|
+
React.useEffect(
|
|
259
|
+
() => (): void => {
|
|
260
|
+
restoreCamera.current?.();
|
|
261
|
+
restoreCamera.current = null;
|
|
262
|
+
for (const root of markerRoots.current.values()) {
|
|
263
|
+
queueMicrotask((): void => root.unmount());
|
|
264
|
+
}
|
|
265
|
+
markerRoots.current.clear();
|
|
266
|
+
},
|
|
267
|
+
[]
|
|
189
268
|
);
|
|
190
269
|
|
|
191
270
|
if (isVisualEditorTestEnv()) {
|
|
@@ -213,7 +292,7 @@ export const LocatorMap: React.FC<MapProps> = ({
|
|
|
213
292
|
mapboxAccessToken={mapboxApiKey || ""}
|
|
214
293
|
mapboxOptions={mapboxOptions}
|
|
215
294
|
onDrag={onDragHandler}
|
|
216
|
-
|
|
295
|
+
renderPin={renderPin}
|
|
217
296
|
iframeWindow={iframe?.contentWindow ?? undefined}
|
|
218
297
|
allowUpdates={!!iframe?.contentDocument}
|
|
219
298
|
onPinClick={scrollToResult}
|
|
@@ -6,11 +6,11 @@ import { useTranslation } from "react-i18next";
|
|
|
6
6
|
import { YextAutoField } from "../../../fields/YextAutoField.tsx";
|
|
7
7
|
import { useDocument } from "../../../hooks/useDocument.tsx";
|
|
8
8
|
import { useTemplateMetadata } from "../../../internal/hooks/useMessageReceivers.ts";
|
|
9
|
-
import { getPreferredDistanceUnit } from "../../../utils/i18n/distance.ts";
|
|
10
9
|
import { getLocatorEntityTypeSourceMap } from "../../../utils/locatorEntityTypes.ts";
|
|
11
10
|
import { LocatorConfig } from "../../../utils/types/StreamDocument.ts";
|
|
12
11
|
import { Body } from "../../atoms/body.tsx";
|
|
13
12
|
import { Button } from "../../atoms/button.tsx";
|
|
13
|
+
import { MILE, type DistanceUnit } from "./distanceUnits.ts";
|
|
14
14
|
import {
|
|
15
15
|
DEFAULT_LOCATOR_RESULT_CARD_PROPS,
|
|
16
16
|
Location,
|
|
@@ -42,10 +42,10 @@ const getLocatorConfigFromPageSet = (pageSet?: string): LocatorConfig => {
|
|
|
42
42
|
|
|
43
43
|
export const translateDistanceUnit = (
|
|
44
44
|
t: (key: string, options?: Record<string, unknown>) => string,
|
|
45
|
-
unit:
|
|
45
|
+
unit: DistanceUnit,
|
|
46
46
|
count: number
|
|
47
47
|
) => {
|
|
48
|
-
if (unit ===
|
|
48
|
+
if (unit === MILE) {
|
|
49
49
|
return t("mile", { count, defaultValue: "mile" });
|
|
50
50
|
}
|
|
51
51
|
|
|
@@ -198,6 +198,7 @@ interface ResultsCountSummaryProps {
|
|
|
198
198
|
searchState: SearchState;
|
|
199
199
|
resultCount: number;
|
|
200
200
|
selectedDistanceOption: number | null;
|
|
201
|
+
distanceUnit: DistanceUnit;
|
|
201
202
|
filterDisplayName?: string;
|
|
202
203
|
}
|
|
203
204
|
|
|
@@ -205,9 +206,10 @@ export const ResultsCountSummary = ({
|
|
|
205
206
|
searchState,
|
|
206
207
|
resultCount,
|
|
207
208
|
selectedDistanceOption,
|
|
209
|
+
distanceUnit,
|
|
208
210
|
filterDisplayName,
|
|
209
211
|
}: ResultsCountSummaryProps) => {
|
|
210
|
-
const { t
|
|
212
|
+
const { t } = useTranslation();
|
|
211
213
|
|
|
212
214
|
if (resultCount === 0) {
|
|
213
215
|
if (searchState === "not started") {
|
|
@@ -234,13 +236,16 @@ export const ResultsCountSummary = ({
|
|
|
234
236
|
|
|
235
237
|
if (filterDisplayName) {
|
|
236
238
|
if (selectedDistanceOption) {
|
|
237
|
-
const unit = getPreferredDistanceUnit(i18n.language);
|
|
238
239
|
return (
|
|
239
240
|
<Body>
|
|
240
241
|
{t("locationsWithinDistanceOf", {
|
|
241
242
|
count: resultCount,
|
|
242
243
|
distance: selectedDistanceOption,
|
|
243
|
-
unit: translateDistanceUnit(
|
|
244
|
+
unit: translateDistanceUnit(
|
|
245
|
+
t,
|
|
246
|
+
distanceUnit,
|
|
247
|
+
selectedDistanceOption
|
|
248
|
+
),
|
|
244
249
|
name: filterDisplayName,
|
|
245
250
|
})}
|
|
246
251
|
</Body>
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export const MILE = "mile";
|
|
2
|
+
export const KILOMETER = "kilometer";
|
|
3
|
+
export const BROWSER_LANGUAGE = "browserLanguage";
|
|
4
|
+
|
|
5
|
+
export const DISTANCE_UNITS = [MILE, KILOMETER] as const;
|
|
6
|
+
export type DistanceUnit = (typeof DISTANCE_UNITS)[number];
|
|
7
|
+
export type DefaultDistanceUnit = DistanceUnit | typeof BROWSER_LANGUAGE;
|
|
@@ -90,6 +90,10 @@ export {
|
|
|
90
90
|
type ImageField,
|
|
91
91
|
type ImagePayload,
|
|
92
92
|
} from "./fields/ImageField.tsx";
|
|
93
|
+
export {
|
|
94
|
+
type OptionalField,
|
|
95
|
+
type OptionalFieldContext,
|
|
96
|
+
} from "./fields/OptionalField.tsx";
|
|
93
97
|
export { type BasicSelectorField } from "./fields/BasicSelectorField.tsx";
|
|
94
98
|
export {
|
|
95
99
|
type MultiSelectorOption,
|
package/dist/cli/yextve.js
CHANGED
|
@@ -12231,7 +12231,7 @@ import { fileURLToPath as fileURLToPath3 } from "url";
|
|
|
12231
12231
|
var package_default = {
|
|
12232
12232
|
name: "@yext/visual-editor",
|
|
12233
12233
|
description: "Component library for Yext Pages Visual Editor",
|
|
12234
|
-
version: "2.0.0-beta.
|
|
12234
|
+
version: "2.0.0-beta.13",
|
|
12235
12235
|
author: "sprumo@yext.com",
|
|
12236
12236
|
repository: {
|
|
12237
12237
|
type: "git",
|
|
@@ -12283,7 +12283,7 @@ var package_default = {
|
|
|
12283
12283
|
test: "pnpm run test:editor && pnpm run test:components",
|
|
12284
12284
|
"test:pageGeneration:browser": "vitest run --config vitest.pageGenerationTest.config.ts",
|
|
12285
12285
|
"test:editor": "vitest run --exclude './src/components/**/*.test.tsx' --browser.enabled false",
|
|
12286
|
-
"test:components": "vitest run --dir ./src/components",
|
|
12286
|
+
"test:components": "vitest run --dir ./src/components --exclude '**/*.test.ts'",
|
|
12287
12287
|
"test:components:local": "./scripts/localScreenshots.sh",
|
|
12288
12288
|
prettier: "prettier --write --cache .",
|
|
12289
12289
|
lint: "oxlint --fix --ignore-pattern 'src/vite-plugin/templates/*'",
|
|
@@ -12384,7 +12384,7 @@ var package_default = {
|
|
|
12384
12384
|
jsdom: "^24.1.1",
|
|
12385
12385
|
"lint-staged": "^15.2.7",
|
|
12386
12386
|
pixelmatch: "^7.1.0",
|
|
12387
|
-
playwright: "1.
|
|
12387
|
+
playwright: "1.65.0",
|
|
12388
12388
|
pngjs: "^7.0.0",
|
|
12389
12389
|
prettier: "^3.3.3",
|
|
12390
12390
|
prompts: "^2.4.2",
|
package/dist/{createYextFieldTransforms-B7vqqb3m.d.ts → createYextFieldTransforms-w-U4b5Zf.d.ts}
RENAMED
|
@@ -1145,18 +1145,20 @@ type MultiSelectorFieldProps<T extends MultiSelectorOptionValue> = FieldProps<Mu
|
|
|
1145
1145
|
*/
|
|
1146
1146
|
declare function MultiSelectorFieldOverride<T extends MultiSelectorOptionValue>({ field, value, onChange, id, readOnly, }: MultiSelectorFieldProps<T>): React.JSX.Element;
|
|
1147
1147
|
|
|
1148
|
-
type
|
|
1149
|
-
type
|
|
1150
|
-
|
|
1151
|
-
/** Returns a number or undefined before rendering. */
|
|
1152
|
-
transform?: boolean;
|
|
1153
|
-
label?: string | MsgString;
|
|
1154
|
-
hideNumberFieldRadioLabel: string | MsgString;
|
|
1155
|
-
showNumberFieldRadioLabel: string | MsgString;
|
|
1156
|
-
defaultCustomValue: number;
|
|
1148
|
+
type CustomValue = string | number | boolean | null | Record<string, unknown> | unknown[];
|
|
1149
|
+
type OptionalFieldContext = {
|
|
1150
|
+
locale: string;
|
|
1157
1151
|
};
|
|
1158
|
-
|
|
1159
|
-
|
|
1152
|
+
/** Wraps a field without changing its value shape. Undefined selects Automatic. */
|
|
1153
|
+
interface OptionalField<Value = CustomValue> extends BaseField {
|
|
1154
|
+
type: "optional";
|
|
1155
|
+
label?: string | MsgString;
|
|
1156
|
+
automaticLabel?: string | MsgString;
|
|
1157
|
+
customLabel?: string | MsgString;
|
|
1158
|
+
field: YextFieldDefinition;
|
|
1159
|
+
/** Evaluated only when Custom is first selected without a remembered value. */
|
|
1160
|
+
defaultCustomValue: Value | ((context: OptionalFieldContext) => Value);
|
|
1161
|
+
}
|
|
1160
1162
|
|
|
1161
1163
|
/** Generation limits supplied by ALPHA, independently of prompt wording. */
|
|
1162
1164
|
declare const generationSettingsSchema: z.ZodObject<{
|
|
@@ -1526,7 +1528,7 @@ type FieldTransformContext = {
|
|
|
1526
1528
|
itemDocument?: unknown;
|
|
1527
1529
|
};
|
|
1528
1530
|
|
|
1529
|
-
declare const alwaysTransformedFieldTypes: readonly ["code", "themeColor"];
|
|
1531
|
+
declare const alwaysTransformedFieldTypes: readonly ["code", "themeColor", "optional"];
|
|
1530
1532
|
|
|
1531
1533
|
/** Maps explicit entity-field formats to their render-value conversion. */
|
|
1532
1534
|
declare const entityFieldFormatters: {
|
|
@@ -1570,6 +1572,9 @@ type ResolvedRepeatedItem<Value, Definitions> = Value extends readonly (infer It
|
|
|
1570
1572
|
type ResolvedRepeatedFieldValue<Value, Definition> = YextFieldDefinition["type"] extends (Definition extends {
|
|
1571
1573
|
type: infer FieldType;
|
|
1572
1574
|
} ? FieldType : never) ? ResolvedRepeatedValue<Value> : Definition extends {
|
|
1575
|
+
type: "optional";
|
|
1576
|
+
field: infer Wrapped;
|
|
1577
|
+
} ? Value extends undefined ? undefined : ResolvedRepeatedFieldValue<Value, Wrapped> : Definition extends {
|
|
1573
1578
|
type: "object";
|
|
1574
1579
|
objectFields: infer Fields;
|
|
1575
1580
|
} ? ResolvedRepeatedItem<Value, Fields> : Definition extends {
|
|
@@ -1595,7 +1600,9 @@ type TransformedFieldValues<Value, Definition> = {
|
|
|
1595
1600
|
value: infer Selection;
|
|
1596
1601
|
}[];
|
|
1597
1602
|
} ? Exclude<Selection, undefined>[] : never;
|
|
1598
|
-
|
|
1603
|
+
optional: Definition extends {
|
|
1604
|
+
field: infer Wrapped;
|
|
1605
|
+
} ? Value extends undefined ? undefined : TransformedFieldValue<Value, Wrapped> : Value;
|
|
1599
1606
|
ctaSelector: LocalizedRenderValue<EnhancedTranslatableCTA> | undefined;
|
|
1600
1607
|
entityField: Definition extends {
|
|
1601
1608
|
format: infer Format;
|
|
@@ -1639,7 +1646,7 @@ type YextPuckFields = {
|
|
|
1639
1646
|
multiSelector: MultiSelectorField;
|
|
1640
1647
|
fontSizeSelector: FontSizeSelectorField;
|
|
1641
1648
|
image: ImageField;
|
|
1642
|
-
|
|
1649
|
+
optional: OptionalField;
|
|
1643
1650
|
styledButton: StyledButtonField;
|
|
1644
1651
|
styledImage: StyledImageField;
|
|
1645
1652
|
styledLink: StyledLinkField;
|
|
@@ -2131,10 +2138,13 @@ declare const wrapperVariants: (props?: ({
|
|
|
2131
2138
|
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
2132
2139
|
declare const VisibilityWrapper: React.FC<VisibilityWrapperProps>;
|
|
2133
2140
|
|
|
2141
|
+
/** Built-in locator entity types. Locators can also use custom entity types. */
|
|
2134
2142
|
declare const LOCATOR_ENTITY_TYPES: readonly ["location", "healthcareProfessional", "healthcareFacility", "event", "atm", "restaurant", "hotel", "providerFacility", "financialProfessional"];
|
|
2135
|
-
type
|
|
2143
|
+
/** Entity type API name, including custom types configured for the locator. */
|
|
2144
|
+
type LocatorEntityType = string;
|
|
2136
2145
|
declare const DEFAULT_ENTITY_TYPE: LocatorEntityType;
|
|
2137
|
-
|
|
2146
|
+
/** Eligibility (including address support) is validated by the backend. */
|
|
2147
|
+
declare function isLocatorEntityType(value: unknown): value is LocatorEntityType;
|
|
2138
2148
|
declare const getLocatorEntityTypeSourceMap: (streamDocument?: StreamDocument) => Partial<Record<LocatorEntityType, string | undefined>>;
|
|
2139
2149
|
declare const getEntityTypeLabel: (entityType: LocatorEntityType) => string;
|
|
2140
2150
|
|
|
@@ -2166,4 +2176,4 @@ declare function createYextFieldTransforms(streamDocument: StreamDocument, local
|
|
|
2166
2176
|
type: string;
|
|
2167
2177
|
}>>;
|
|
2168
2178
|
|
|
2169
|
-
export { type StyledPageSectionValue as $, type AiPageGeneration as A, type BasicSelectorField as B, type CreateItemSourceOptions as C, type DateTimeSelectorField as D, type EntityFieldTypes as E, type FontRegistry as F, EntityFieldSelectorFieldOverride as G, type HeadingProps as H, type ItemSourceInstance as I, MultiSelectorFieldOverride as J, type FontSizeSelectorField as K, type LocatorEntityType as L, type MsgString as M, ImageFieldOverride as N, type
|
|
2179
|
+
export { type StyledPageSectionValue as $, type AiPageGeneration as A, type BasicSelectorField as B, type CreateItemSourceOptions as C, type DateTimeSelectorField as D, type EntityFieldTypes as E, type FontRegistry as F, EntityFieldSelectorFieldOverride as G, type HeadingProps as H, type ItemSourceInstance as I, MultiSelectorFieldOverride as J, type FontSizeSelectorField as K, type LocatorEntityType as L, type MsgString as M, ImageFieldOverride as N, type OptionalField as O, type ProductPrice as P, type StyledButtonField as Q, type RichText as R, type StreamFields as S, type TranslationDictionary as T, type StyledButtonValue as U, type StyledImageField as V, type StyledImageValue as W, type StyledLinkField as X, type YextFieldMap as Y, type StyledLinkValue as Z, type StyledPageSectionField as _, type StreamDocument as a, type MultiSelectorOption as a$, type StyledTextField as a0, type TranslatableStringField as a1, type VideoField as a2, type AssetVideo as a3, type SectionLibraryTranslationLoaders as a4, Accordion as a5, AccordionContent as a6, AccordionItem as a7, AccordionTrigger as a8, type AssetImageType as a9, type FAQStruct as aA, FOOD_DELIVERY_SERVICES as aB, type FieldGenerationMetadata as aC, type Font as aD, FontSizeSelectorFieldOverride as aE, type FoodDeliveryServiceType as aF, type GenerationPromptBundle as aG, type GenerationSettings as aH, Heading as aI, type HeroSectionType as aJ, HoursStatusAtom as aK, type HoursStatusAtomProps as aL, HoursTableAtom as aM, type HoursTableAtomProps as aN, Image as aO, type ImageContentData as aP, type ImageField as aQ, type ImageProps as aR, type InsightSectionType as aS, type InsightStruct as aT, type LayoutGenerationMetadata as aU, type LocalizedAssetImage as aV, MaybeLink as aW, type MaybeLinkProps as aX, MaybeRTF as aY, type MaybeRTFProps as aZ, type MultiSelectorField as a_, Background as aa, type BackgroundProps as ab, BackgroundProvider as ac, BasicSelectorFieldOverride as ad, Body as ae, type BreadcrumbLink as af, Button as ag, type ButtonProps as ah, CTA as ai, type CTASelectorField as aj, CodeFieldOverride as ak, type ComprehensiveCTAField as al, type CreateSlottedItemSourceOptions as am, DateTimeSelectorFieldOverride as an, DropdownMenu as ao, DropdownMenuContent as ap, DropdownMenuItem as aq, DropdownMenuTrigger as ar, EmbeddedFieldStringInputFromEntity as as, EmbeddedFieldStringInputFromOptions as at, type EnhancedTranslatableCTA as au, EntityField as av, type EntityFieldSelectorField as aw, type EventSectionType as ax, type EventStruct as ay, type FAQSectionType as az, type ThemeConfig as b, fetchLocalesToPathsForEntity as b$, type MultiSelectorOptionValue as b0, type MultiSelectorOptions as b1, type OptionalFieldContext as b2, PageSection as b3, type PageSectionProps as b4, type PersonStruct as b5, PhoneAtom as b6, type PhoneAtomProps as b7, type PresetImageType as b8, type ProductSectionType as b9, VisibilityWrapper as bA, VisualEditorComponentsContentPath as bB, VisualEditorThemeClassSafelist as bC, type YextArrayField as bD, YextAutoField as bE, type YextCTAField as bF, type YextCustomFieldRenderProps as bG, YextEntityFieldSelector as bH, type YextFieldDefinition as bI, type YextFields as bJ, type YextObjectField as bK, type YextPuckField as bL, type YextSchemaField as bM, type YextSchemaFieldDefinition as bN, type YextTransformedProps as bO, backgroundColors as bP, bindSlots as bQ, bodyVariants as bR, buttonVariants as bS, constructFontSelectOptions as bT, createSearchAnalyticsConfig as bU, createSearchHeadlessConfig as bV, createSlottedItemSource as bW, createYextFieldTransforms as bX, deepMerge as bY, defaultFonts as bZ, defaultThemeTailwindExtensions as b_, type ProductStruct as ba, type PromoSectionType as bb, type RenderYextEntityFieldSelectorProps as bc, type ResolvedThemeColor as bd, type RichTextStyleOverrides as be, type SlottedItemSourceGenerationMetadata as bf, StyledButtonFieldOverride as bg, StyledImageFieldOverride as bh, StyledLinkFieldOverride as bi, StyledPageSectionFieldOverride as bj, StyledTextFieldOverride as bk, type TeamSectionType as bl, TemplatePropsContext as bm, type TestimonialSectionType as bn, type TestimonialStruct as bo, ThemeColorFieldOverride as bp, TimestampAtom as bq, type TimestampAtomProps as br, TimestampOption as bs, type TranslatableCTA as bt, TranslatableStringFieldOverride as bu, type TranslationLoader as bv, type TranslationLoaders as bw, VideoAtom as bx, type VideoAtomProps as by, VideoFieldOverride as bz, type TailwindConfig as c, isColorContrastWcagCompliant as c$, generationPromptBundleSchema as c0, generationSettingsSchema as c1, getDefaultForegroundColor as c2, getFontWeightOptions as c3, getFontWeightOverrideOptions as c4, getPageMetadata as c5, getPreferredDistanceUnit as c6, getSurfaceColorStyle as c7, getThemeColorCssValue as c8, getThemeColorHexValue as c9, type SlotMappedCardsData as cA, type ComboboxOptionGroup as cB, ConstantValueModeToggler as cC, DEFAULT_ENTITY_TYPE as cD, type EmbeddedStringOption as cE, EntityTooltipsProvider as cF, type FieldResolution as cG, type FieldTypeData as cH, type ImagePayload as cI, LOCATOR_ENTITY_TYPES as cJ, type LocatorConfig as cK, type RootConfig as cL, buildLocatorDisplayOptions as cM, findField as cN, formatDistance as cO, formatPhoneNumber as cP, fromMeters as cQ, getBackgroundColorClasses as cR, getBackgroundColorStyle as cS, getCTAType as cT, getDisplayValue as cU, getEntityTypeLabel as cV, getImageAltText as cW, getLocatorEntityTypeSourceMap as cX, getTextColorClass as cY, getTextColorStyle as cZ, hexToRGB as c_, headingVariants as ca, imgSizesHelper as cb, isDarkColor as cc, isLocalizedAssetImage as cd, mergeMeta as ce, msg as cf, normalizeLink as cg, normalizeSlug as ch, normalizeThemeColorToken as ci, pt as cj, resolveBreadcrumbs as ck, resolveComponentData as cl, resolveDataFromParent as cm, resolveLocalizedAssetImage as cn, resolveUrlTemplate as co, resolveUrlTemplateOfChild as cp, resolveYextEntityField as cq, themeManagerCn as cr, themeManagerTwMergeConfiguration as cs, themeResolver as ct, toKilometers as cu, toPuckFields as cv, useBackground as cw, useDocument as cx, usePlatformTranslation as cy, useTemplateProps as cz, type ComponentRegistry as d, isCtaVariantWithColor as d0, isLocatorEntityType as d1, isNonNormalizableLinkType as d2, loadTranslationDictionary as d3, resolveDirectoryRootProps as d4, resolveField as d5, toMeters as d6, toMiles as d7, useEntityTooltips as d8, useTemplateMetadata as d9, type TranslatableRichText as e, ThemeOptions as f, type ThemeColor as g, type YextComponentConfig as h, type YextEntityField as i, type CTAVariant as j, type TranslatableString as k, type HeadingLevel as l, type ImageFillType as m, type TranslatableAssetImage as n, type ImgSizesByBreakpoint as o, type SlottedItemSourceInstance as p, type BodyProps as q, type MultiSelectorValue as r, type StyledTextValue as s, type ComprehensiveCTAValue as t, type ResolvedComprehensiveCTAValue as u, type CTAProps as v, type ThemeColorField as w, CTASelectorFieldOverride as x, type CodeField as y, ComprehensiveCTAFieldOverride as z };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { S as StreamFields, a as StreamDocument, T as TranslationDictionary, b as ThemeConfig, P as ProductPrice, A as AiPageGeneration, Y as YextFieldMap, C as CreateItemSourceOptions, I as ItemSourceInstance, c as TailwindConfig, E as EntityFieldTypes, d as ComponentRegistry, e as TranslatableRichText, M as MsgString, R as RichText, f as ThemeOptions, g as ThemeColor, h as YextComponentConfig, i as YextEntityField, j as CTAVariant, k as TranslatableString, H as HeadingProps, l as HeadingLevel, m as ImageFillType, n as TranslatableAssetImage, o as ImgSizesByBreakpoint, B as BasicSelectorField, p as SlottedItemSourceInstance, L as LocatorEntityType, q as BodyProps, r as MultiSelectorValue, s as StyledTextValue, t as ComprehensiveCTAValue, u as ResolvedComprehensiveCTAValue, v as CTAProps, F as FontRegistry, w as ThemeColorField, x as CTASelectorFieldOverride, y as CodeField, z as ComprehensiveCTAFieldOverride, D as DateTimeSelectorField, G as EntityFieldSelectorFieldOverride, J as MultiSelectorFieldOverride, K as FontSizeSelectorField, N as ImageFieldOverride, O as
|
|
2
|
-
export { a5 as Accordion, a6 as AccordionContent, a7 as AccordionItem, a8 as AccordionTrigger, a9 as AssetImageType, aa as Background, ab as BackgroundProps, ac as BackgroundProvider, ad as BasicSelectorFieldOverride, ae as Body, af as BreadcrumbLink, ag as Button, ah as ButtonProps, ai as CTA, aj as CTASelectorField, ak as CodeFieldOverride, al as ComprehensiveCTAField, am as CreateSlottedItemSourceOptions, an as DateTimeSelectorFieldOverride, ao as DropdownMenu, ap as DropdownMenuContent, aq as DropdownMenuItem, ar as DropdownMenuTrigger, as as EmbeddedFieldStringInputFromEntity, at as EmbeddedFieldStringInputFromOptions, au as EnhancedTranslatableCTA, av as EntityField, aw as EntityFieldSelectorField, ax as EventSectionType, ay as EventStruct, az as FAQSectionType, aA as FAQStruct, aB as FOOD_DELIVERY_SERVICES, aC as FieldGenerationMetadata, aD as Font, aE as FontSizeSelectorFieldOverride, aF as FoodDeliveryServiceType, aG as GenerationPromptBundle, aH as GenerationSettings, aI as Heading, aJ as HeroSectionType, aK as HoursStatusAtom, aL as HoursStatusAtomProps, aM as HoursTableAtom, aN as HoursTableAtomProps, aO as Image, aP as ImageContentData, aQ as ImageField, aR as ImageProps, aS as InsightSectionType, aT as InsightStruct, aU as LayoutGenerationMetadata, aV as LocalizedAssetImage, aW as MaybeLink, aX as MaybeLinkProps, aY as MaybeRTF, aZ as MaybeRTFProps, a_ as MultiSelectorField, a$ as MultiSelectorOption, b0 as MultiSelectorOptionValue, b1 as MultiSelectorOptions, b2 as
|
|
1
|
+
import { S as StreamFields, a as StreamDocument, T as TranslationDictionary, b as ThemeConfig, P as ProductPrice, A as AiPageGeneration, Y as YextFieldMap, C as CreateItemSourceOptions, I as ItemSourceInstance, c as TailwindConfig, E as EntityFieldTypes, d as ComponentRegistry, e as TranslatableRichText, M as MsgString, R as RichText, f as ThemeOptions, g as ThemeColor, h as YextComponentConfig, i as YextEntityField, j as CTAVariant, k as TranslatableString, H as HeadingProps, l as HeadingLevel, m as ImageFillType, n as TranslatableAssetImage, o as ImgSizesByBreakpoint, B as BasicSelectorField, p as SlottedItemSourceInstance, L as LocatorEntityType, q as BodyProps, r as MultiSelectorValue, s as StyledTextValue, t as ComprehensiveCTAValue, u as ResolvedComprehensiveCTAValue, v as CTAProps, F as FontRegistry, w as ThemeColorField, x as CTASelectorFieldOverride, y as CodeField, z as ComprehensiveCTAFieldOverride, D as DateTimeSelectorField, G as EntityFieldSelectorFieldOverride, J as MultiSelectorFieldOverride, K as FontSizeSelectorField, N as ImageFieldOverride, O as OptionalField, Q as StyledButtonField, U as StyledButtonValue, V as StyledImageField, W as StyledImageValue, X as StyledLinkField, Z as StyledLinkValue, _ as StyledPageSectionField, $ as StyledPageSectionValue, a0 as StyledTextField, a1 as TranslatableStringField, a2 as VideoField, a3 as AssetVideo, a4 as SectionLibraryTranslationLoaders } from './createYextFieldTransforms-w-U4b5Zf.js';
|
|
2
|
+
export { a5 as Accordion, a6 as AccordionContent, a7 as AccordionItem, a8 as AccordionTrigger, a9 as AssetImageType, aa as Background, ab as BackgroundProps, ac as BackgroundProvider, ad as BasicSelectorFieldOverride, ae as Body, af as BreadcrumbLink, ag as Button, ah as ButtonProps, ai as CTA, aj as CTASelectorField, ak as CodeFieldOverride, al as ComprehensiveCTAField, am as CreateSlottedItemSourceOptions, an as DateTimeSelectorFieldOverride, ao as DropdownMenu, ap as DropdownMenuContent, aq as DropdownMenuItem, ar as DropdownMenuTrigger, as as EmbeddedFieldStringInputFromEntity, at as EmbeddedFieldStringInputFromOptions, au as EnhancedTranslatableCTA, av as EntityField, aw as EntityFieldSelectorField, ax as EventSectionType, ay as EventStruct, az as FAQSectionType, aA as FAQStruct, aB as FOOD_DELIVERY_SERVICES, aC as FieldGenerationMetadata, aD as Font, aE as FontSizeSelectorFieldOverride, aF as FoodDeliveryServiceType, aG as GenerationPromptBundle, aH as GenerationSettings, aI as Heading, aJ as HeroSectionType, aK as HoursStatusAtom, aL as HoursStatusAtomProps, aM as HoursTableAtom, aN as HoursTableAtomProps, aO as Image, aP as ImageContentData, aQ as ImageField, aR as ImageProps, aS as InsightSectionType, aT as InsightStruct, aU as LayoutGenerationMetadata, aV as LocalizedAssetImage, aW as MaybeLink, aX as MaybeLinkProps, aY as MaybeRTF, aZ as MaybeRTFProps, a_ as MultiSelectorField, a$ as MultiSelectorOption, b0 as MultiSelectorOptionValue, b1 as MultiSelectorOptions, b2 as OptionalFieldContext, b3 as PageSection, b4 as PageSectionProps, b5 as PersonStruct, b6 as PhoneAtom, b7 as PhoneAtomProps, b8 as PresetImageType, b9 as ProductSectionType, ba as ProductStruct, bb as PromoSectionType, bc as RenderYextEntityFieldSelectorProps, bd as ResolvedThemeColor, be as RichTextStyleOverrides, bf as SlottedItemSourceGenerationMetadata, bg as StyledButtonFieldOverride, bh as StyledImageFieldOverride, bi as StyledLinkFieldOverride, bj as StyledPageSectionFieldOverride, bk as StyledTextFieldOverride, bl as TeamSectionType, bm as TemplatePropsContext, bn as TestimonialSectionType, bo as TestimonialStruct, bp as ThemeColorFieldOverride, bq as TimestampAtom, br as TimestampAtomProps, bs as TimestampOption, bt as TranslatableCTA, bu as TranslatableStringFieldOverride, bv as TranslationLoader, bw as TranslationLoaders, bx as VideoAtom, by as VideoAtomProps, bz as VideoFieldOverride, bA as VisibilityWrapper, bB as VisualEditorComponentsContentPath, bC as VisualEditorThemeClassSafelist, bD as YextArrayField, bE as YextAutoField, bF as YextCTAField, bG as YextCustomFieldRenderProps, bH as YextEntityFieldSelector, bI as YextFieldDefinition, bJ as YextFields, bK as YextObjectField, bL as YextPuckField, bM as YextSchemaField, bN as YextSchemaFieldDefinition, bO as YextTransformedProps, bP as backgroundColors, bQ as bindSlots, bR as bodyVariants, bS as buttonVariants, bT as constructFontSelectOptions, bU as createSearchAnalyticsConfig, bV as createSearchHeadlessConfig, bW as createSlottedItemSource, bX as createYextFieldTransforms, bY as deepMerge, bZ as defaultFonts, b_ as defaultThemeTailwindExtensions, b$ as fetchLocalesToPathsForEntity, c0 as generationPromptBundleSchema, c1 as generationSettingsSchema, c2 as getDefaultForegroundColor, c3 as getFontWeightOptions, c4 as getFontWeightOverrideOptions, c5 as getPageMetadata, c6 as getPreferredDistanceUnit, c7 as getSurfaceColorStyle, c8 as getThemeColorCssValue, c9 as getThemeColorHexValue, ca as headingVariants, cb as imgSizesHelper, cc as isDarkColor, cd as isLocalizedAssetImage, ce as mergeMeta, cf as msg, cg as normalizeLink, ch as normalizeSlug, ci as normalizeThemeColorToken, cj as pt, ck as resolveBreadcrumbs, cl as resolveComponentData, cm as resolveDataFromParent, cn as resolveLocalizedAssetImage, co as resolveUrlTemplate, cp as resolveUrlTemplateOfChild, cq as resolveYextEntityField, cr as themeManagerCn, cs as themeManagerTwMergeConfiguration, ct as themeResolver, cu as toKilometers, cv as toPuckFields, cw as useBackground, cx as useDocument, cy as usePlatformTranslation, cz as useTemplateProps } from './createYextFieldTransforms-w-U4b5Zf.js';
|
|
3
3
|
import * as React$1 from 'react';
|
|
4
4
|
import React__default from 'react';
|
|
5
5
|
import * as _puckeditor_core from '@puckeditor/core';
|
|
@@ -651,6 +651,11 @@ declare const DirectoryList: ({ streamDocument, directoryChildren, relativePrefi
|
|
|
651
651
|
}) => React__default.JSX.Element;
|
|
652
652
|
declare const DirectoryGrid: YextComponentConfig<DirectoryGridProps>;
|
|
653
653
|
|
|
654
|
+
declare const BROWSER_LANGUAGE = "browserLanguage";
|
|
655
|
+
declare const DISTANCE_UNITS: readonly ["mile", "kilometer"];
|
|
656
|
+
type DistanceUnit = (typeof DISTANCE_UNITS)[number];
|
|
657
|
+
type DefaultDistanceUnit = DistanceUnit | typeof BROWSER_LANGUAGE;
|
|
658
|
+
|
|
654
659
|
interface LocatorResultCardProps {
|
|
655
660
|
/** The entity type this result card applies to. */
|
|
656
661
|
entityType: LocatorEntityType;
|
|
@@ -738,6 +743,11 @@ interface LocatorResultCardProps {
|
|
|
738
743
|
showCountry?: boolean;
|
|
739
744
|
/** Whether to show the "Get Directions" link */
|
|
740
745
|
showGetDirectionsLink: boolean;
|
|
746
|
+
/**
|
|
747
|
+
* Whether to open the Get Directions link in a new tab.
|
|
748
|
+
* @defaultValue false
|
|
749
|
+
*/
|
|
750
|
+
openInNewTab?: boolean;
|
|
741
751
|
/** Whether the address block is visible in live mode */
|
|
742
752
|
liveVisibility: boolean;
|
|
743
753
|
};
|
|
@@ -830,15 +840,22 @@ interface Location {
|
|
|
830
840
|
ref_listings?: ListingType[];
|
|
831
841
|
[key: string]: any;
|
|
832
842
|
}
|
|
833
|
-
declare const LocatorResultCard: React__default.MemoExoticComponent<({ result, resultCardProps: props, distanceDisplay, searchLocationName, isSelected, }: {
|
|
843
|
+
declare const LocatorResultCard: React__default.MemoExoticComponent<({ result, resultCardProps: props, distanceDisplay, distanceUnit, searchLocationName, isSelected, }: {
|
|
834
844
|
result: CardProps<Location>["result"];
|
|
835
845
|
resultCardProps: LocatorResultCardProps;
|
|
836
846
|
distanceDisplay?: DistanceDisplayOption;
|
|
847
|
+
distanceUnit?: DistanceUnit;
|
|
837
848
|
searchLocationName?: string;
|
|
838
849
|
isSelected?: boolean;
|
|
839
850
|
}) => React__default.JSX.Element>;
|
|
840
851
|
|
|
841
852
|
interface LocatorProps {
|
|
853
|
+
/**
|
|
854
|
+
* Search the visible map area 500 ms after the user stops a pan or zoom.
|
|
855
|
+
* If enabled, hide the Search This Area button.
|
|
856
|
+
* @defaultValue false
|
|
857
|
+
*/
|
|
858
|
+
autoSearchOnMapMove?: boolean;
|
|
842
859
|
/**
|
|
843
860
|
* The visual theme for the map tiles, chosen from a predefined list of Mapbox styles.
|
|
844
861
|
* @defaultValue 'mapbox://styles/mapbox/streets-v12'
|
|
@@ -892,6 +909,16 @@ interface LocatorProps {
|
|
|
892
909
|
/** The optional display name for the Keywords facet. */
|
|
893
910
|
keywordsDisplayName?: TranslatableString;
|
|
894
911
|
};
|
|
912
|
+
/**
|
|
913
|
+
* The default radius for nearby-location searches. Leave unset to use Search's
|
|
914
|
+
* suggested radius, or 25 in the configured default distance unit for coordinate searches.
|
|
915
|
+
* Visitor-selected distances and explicit map/URL search areas take precedence.
|
|
916
|
+
* Geographic boundary filters are unaffected.
|
|
917
|
+
*/
|
|
918
|
+
defaultSearchRadius?: {
|
|
919
|
+
value?: number;
|
|
920
|
+
unit: "mile" | "kilometer";
|
|
921
|
+
};
|
|
895
922
|
/**
|
|
896
923
|
* The starting location for the map.
|
|
897
924
|
*/
|
|
@@ -921,6 +948,10 @@ interface LocatorProps {
|
|
|
921
948
|
/** Props to customize the locator result card component. */
|
|
922
949
|
props: LocatorResultCardProps;
|
|
923
950
|
}>;
|
|
951
|
+
/** Whether visitors can switch the locator between miles and kilometers. */
|
|
952
|
+
showDistanceUnitToggle?: boolean;
|
|
953
|
+
/** Unit used before a visitor selects one. Defaults to the page language. */
|
|
954
|
+
defaultDistanceUnit?: DefaultDistanceUnit;
|
|
924
955
|
/** Controls which distance value to display on each locator result card. */
|
|
925
956
|
distanceDisplay?: DistanceDisplayOption;
|
|
926
957
|
}
|
|
@@ -1194,13 +1225,7 @@ declare const YextPuckFieldOverrides: {
|
|
|
1194
1225
|
readOnly?: boolean;
|
|
1195
1226
|
}) => React$1.JSX.Element;
|
|
1196
1227
|
image: typeof ImageFieldOverride;
|
|
1197
|
-
|
|
1198
|
-
field: OptionalNumberField;
|
|
1199
|
-
value: string | number | null | undefined;
|
|
1200
|
-
id?: string;
|
|
1201
|
-
onChange: (value: string | number | null | undefined, uiState?: Partial<_puckeditor_core.UiState>) => void;
|
|
1202
|
-
readOnly?: boolean;
|
|
1203
|
-
}) => React$1.JSX.Element;
|
|
1228
|
+
optional: ({ field, value, onChange, readOnly, }: _puckeditor_core.FieldProps<OptionalField, (string | number | boolean | unknown[] | Record<string, unknown> | null) | undefined>) => React$1.JSX.Element;
|
|
1204
1229
|
styledButton: ({ field, value, onChange, }: {
|
|
1205
1230
|
field: StyledButtonField;
|
|
1206
1231
|
value: StyledButtonValue;
|
|
@@ -1285,4 +1310,4 @@ type LocalEditorShellProps = {
|
|
|
1285
1310
|
|
|
1286
1311
|
declare const LocalEditorShell: ({ apiBasePath, routePath, componentRegistry, tailwindConfig, themeConfig, sectionLibraryMigrationRegistry, translationLoaders, chatEnabled, }: LocalEditorShellProps) => React__default.JSX.Element;
|
|
1287
1312
|
|
|
1288
|
-
export { Address, type AddressProps, type AggregateRating, AssetVideo, BasicSelectorField, BodyProps, type BreadcrumbsData, BreadcrumbsSection, type BreadcrumbsSectionProps, type BreadcrumbsStyles, CTASelectorFieldOverride, CTAVariant, CodeField, type ComponentField, ComponentFields, ComprehensiveCTA, ComprehensiveCTAFieldOverride, type ComprehensiveCTARenderProps as ComprehensiveCTAProps, ComprehensiveCTAValue, CreateItemSourceOptions, CustomCodeSection, type CustomCodeSectionProps, DateTimeSelectorField, Directory, DirectoryCard, type DirectoryCardProps, DirectoryGrid, type DirectoryGridProps, DirectoryList, type DirectoryProps, type DirectoryStyles, Editor, EntityFieldSelectorFieldOverride, FontRegistry, FontSizeSelectorField, GTMBody, HeadingLevel, HeadingProps, HeadingText, type HeadingTextProps, HoursStatus, type HoursStatusProps, HoursTable, type HoursTableProps, ImageFieldOverride, ImageFillType, ImageWrapper, type ImageWrapperProps, ImgSizesByBreakpoint, ItemSourceInstance, KnowledgeGraphIcon, LanguageDropdown, type LanguageDropdownProps, type LocalDevOptions, LocalEditorShell, type Location, LocatorComponent, type LocatorProps, LocatorResultCard, type LocatorResultCardProps, MainContent, type MainContentProps, MapboxStaticMap, MapboxStaticMapComponent, type MapboxStaticProps, type Metadata, type Migration, type MigrationAction, type MigrationRegistry, MultiSelectorFieldOverride, MultiSelectorValue, type NearbyLocationDoc, type NearbyLocationsResponse,
|
|
1313
|
+
export { Address, type AddressProps, type AggregateRating, AssetVideo, BasicSelectorField, BodyProps, type BreadcrumbsData, BreadcrumbsSection, type BreadcrumbsSectionProps, type BreadcrumbsStyles, CTASelectorFieldOverride, CTAVariant, CodeField, type ComponentField, ComponentFields, ComprehensiveCTA, ComprehensiveCTAFieldOverride, type ComprehensiveCTARenderProps as ComprehensiveCTAProps, ComprehensiveCTAValue, CreateItemSourceOptions, CustomCodeSection, type CustomCodeSectionProps, DateTimeSelectorField, Directory, DirectoryCard, type DirectoryCardProps, DirectoryGrid, type DirectoryGridProps, DirectoryList, type DirectoryProps, type DirectoryStyles, Editor, EntityFieldSelectorFieldOverride, FontRegistry, FontSizeSelectorField, GTMBody, HeadingLevel, HeadingProps, HeadingText, type HeadingTextProps, HoursStatus, type HoursStatusProps, HoursTable, type HoursTableProps, ImageFieldOverride, ImageFillType, ImageWrapper, type ImageWrapperProps, ImgSizesByBreakpoint, ItemSourceInstance, KnowledgeGraphIcon, LanguageDropdown, type LanguageDropdownProps, type LocalDevOptions, LocalEditorShell, type Location, LocatorComponent, type LocatorProps, LocatorResultCard, type LocatorResultCardProps, MainContent, type MainContentProps, MapboxStaticMap, MapboxStaticMapComponent, type MapboxStaticProps, type Metadata, type Migration, type MigrationAction, type MigrationRegistry, MultiSelectorFieldOverride, MultiSelectorValue, type NearbyLocationDoc, type NearbyLocationsResponse, OptionalField, Phone, type PhoneProps, ProductPrice, ResolvedComprehensiveCTAValue, ReviewStars, type ReviewStarsProps, RichText, type SectionConfig, SectionLibraryTranslationLoaders, SlottedItemSourceInstance, SpacingSelector, StreamDocument, StyledButtonField, StyledButtonValue, StyledImageField, StyledImageValue, StyledLinkField, StyledLinkValue, StyledPageSectionField, StyledPageSectionValue, type StyledPlainTextProps, type StyledRichTextProps, StyledTextComponent, StyledTextElement, StyledTextField, StyledTextValue, TailwindConfigContext, ThemeColor, ThemeColorField, ThemeConfig, ThemeOptions, TranslatableAssetImage, TranslatableRichText, TranslatableRichTextField, TranslatableString, TranslatableStringField, TranslationDictionary, VideoField, VisualEditorProvider, VisualEditorRender, type VisualEditorRenderProps, YextComponentConfig, YextEntityField, YextFieldMap, YextPuckFieldOverrides, addHeadingAlignmentMigration, applyAnalytics, applyCertifiedFacts, applyHeaderScript, applyTheme, createDefaultThemeConfig, createItemSource, createStyledTextConfig, defaultThemeConfig, filterMaxWidths, formatCurrency, getAggregateRating, getAnalyticsScopeHash, getCanonicalUrl, getDefaultRTF, getDirectoryParents, getMaxWidthOptions, getSchema, getStyledTextStyle, i18nPageInstance, i18nPlatformInstance, injectTranslations, mapStyleField, mapboxStaticMapStyleOptions, migrate, migrationRegistry, parseDocumentForLanguageDropdown, renderStyledRichText, useEntityFields, useNearbyLocations, type useNearbyLocationsOptions, useOverflow, usePlatformBridgeDocument, usePlatformBridgeEntityFields, useTailwindConfig };
|
|
@@ -113,6 +113,7 @@
|
|
|
113
113
|
"align": "Zarovnat",
|
|
114
114
|
"analytics": "Analytika",
|
|
115
115
|
"ariaLabel": "Značka Aria",
|
|
116
|
+
"autoSearchOnMapMove": "Automaticky hledat při pohybu na mapě",
|
|
116
117
|
"backgroundColor": "Barva pozadí",
|
|
117
118
|
"buttonStyles": "Styly tlačítek",
|
|
118
119
|
"buttonText": "Text tlačítka",
|
|
@@ -132,9 +133,12 @@
|
|
|
132
133
|
"data": "Data",
|
|
133
134
|
"dataAttributes": "Atributy dat",
|
|
134
135
|
"dayOfWeekFormat": "Formát dne týdne",
|
|
136
|
+
"defaultDistanceUnit": "Výchozí jednotka vzdálenosti",
|
|
137
|
+
"defaultSearchRadius": "Výchozí poloměr vyhledávání",
|
|
135
138
|
"directoryListBackgroundColor": "Barva pozadí seznamu adresářů",
|
|
136
139
|
"directoryRootLinkLabel": "Štítek kořenového odkazu na adresář",
|
|
137
140
|
"distanceDisplay": "Zobrazení vzdálenosti",
|
|
141
|
+
"distanceUnit": "Jednotka vzdálenosti",
|
|
138
142
|
"dynamicFilters": "Dynamické filtry",
|
|
139
143
|
"email": "E-mail",
|
|
140
144
|
"entityType": "Typ entity",
|
|
@@ -174,9 +178,11 @@
|
|
|
174
178
|
"openInNewTab": "Otevřít na nové kartě",
|
|
175
179
|
"options": {
|
|
176
180
|
"aspectRatio": "Poměr stran",
|
|
181
|
+
"automatic": "Automatický",
|
|
177
182
|
"base_text size": "Báze",
|
|
178
183
|
"bothDistances": "Obě vzdálenosti",
|
|
179
184
|
"bottom_direction": "Dole",
|
|
185
|
+
"browserLanguage": "Jazyk prohlížeče",
|
|
180
186
|
"button": "Tlačítko",
|
|
181
187
|
"center": "Centrum",
|
|
182
188
|
"center_direction": "Centrum",
|
|
@@ -244,6 +250,7 @@
|
|
|
244
250
|
"international": "Mezinárodní",
|
|
245
251
|
"international_phone number": "Mezinárodní",
|
|
246
252
|
"italic": "Kurzíva",
|
|
253
|
+
"kilometers": "Kilometry (km)",
|
|
247
254
|
"large_text size": "Velká",
|
|
248
255
|
"left": "Vlevo",
|
|
249
256
|
"left_direction": "Vlevo",
|
|
@@ -252,6 +259,7 @@
|
|
|
252
259
|
"long": "Dlouho",
|
|
253
260
|
"mapStartingLocation": "Počáteční umístění mapy",
|
|
254
261
|
"matchOtherSections": "Porovnejte jiné sekce ({{value}})",
|
|
262
|
+
"miles": "Míle (mi)",
|
|
255
263
|
"monday": "pondělí",
|
|
256
264
|
"navigationDay": "Navigace (den)",
|
|
257
265
|
"navigationNight": "Navigace (noc)",
|
|
@@ -289,6 +297,7 @@
|
|
|
289
297
|
"presetImage": "Přednastavený obrázek",
|
|
290
298
|
"primaryCTA": "Primární CTA",
|
|
291
299
|
"primaryHeading": "Primární nadpis",
|
|
300
|
+
"radius": "Poloměr",
|
|
292
301
|
"resultCard": "Karta výsledků",
|
|
293
302
|
"scope": "Rozsah",
|
|
294
303
|
"secondaryCTA": "Sekundární CTA",
|
|
@@ -299,6 +308,7 @@
|
|
|
299
308
|
"showCurrentPagesLinkLabel": "Zobrazit štítek odkazu aktuální stránky",
|
|
300
309
|
"showCurrentStatus": "Zobrazit aktuální stav",
|
|
301
310
|
"showDayNames": "Zobrazit jména denních",
|
|
311
|
+
"showDistanceUnitToggle": "Zobrazit přepínač jednotek vzdálenosti",
|
|
302
312
|
"showGetDirectionsLink": "Zobrazit odkaz",
|
|
303
313
|
"showHoursStatus": "Zobrazit stav hodin",
|
|
304
314
|
"showIcon": "Zobrazit ikonu",
|
|
@@ -113,6 +113,7 @@
|
|
|
113
113
|
"align": "Juster",
|
|
114
114
|
"analytics": "Analyser",
|
|
115
115
|
"ariaLabel": "Aria Label",
|
|
116
|
+
"autoSearchOnMapMove": "Søg automatisk på kortbevægelse",
|
|
116
117
|
"backgroundColor": "Baggrundsfarve",
|
|
117
118
|
"buttonStyles": "Knapstile",
|
|
118
119
|
"buttonText": "Knaptekst",
|
|
@@ -132,9 +133,12 @@
|
|
|
132
133
|
"data": "Data",
|
|
133
134
|
"dataAttributes": "Dataattributter",
|
|
134
135
|
"dayOfWeekFormat": "Ugeformat",
|
|
136
|
+
"defaultDistanceUnit": "Standardenhed for afstand",
|
|
137
|
+
"defaultSearchRadius": "Standardradius for søgning",
|
|
135
138
|
"directoryListBackgroundColor": "Directory List Baggrundsfarve",
|
|
136
139
|
"directoryRootLinkLabel": "Directory Root Link Label",
|
|
137
140
|
"distanceDisplay": "Afstandsvisning",
|
|
141
|
+
"distanceUnit": "Afstandsenhed",
|
|
138
142
|
"dynamicFilters": "Dynamiske filtre",
|
|
139
143
|
"email": "E -mail",
|
|
140
144
|
"entityType": "Enhedstype",
|
|
@@ -174,9 +178,11 @@
|
|
|
174
178
|
"openInNewTab": "Åbn i ny fane",
|
|
175
179
|
"options": {
|
|
176
180
|
"aspectRatio": "Aspektforhold",
|
|
181
|
+
"automatic": "Automatisk",
|
|
177
182
|
"base_text size": "Basis",
|
|
178
183
|
"bothDistances": "Begge afstande",
|
|
179
184
|
"bottom_direction": "Nederst",
|
|
185
|
+
"browserLanguage": "Browsersprog",
|
|
180
186
|
"button": "Knap",
|
|
181
187
|
"center": "Centrum",
|
|
182
188
|
"center_direction": "Center",
|
|
@@ -244,6 +250,7 @@
|
|
|
244
250
|
"international": "International",
|
|
245
251
|
"international_phone number": "International",
|
|
246
252
|
"italic": "Kursiv",
|
|
253
|
+
"kilometers": "Kilometer (km)",
|
|
247
254
|
"large_text size": "Stor",
|
|
248
255
|
"left": "Venstre",
|
|
249
256
|
"left_direction": "Venstre",
|
|
@@ -252,6 +259,7 @@
|
|
|
252
259
|
"long": "Lang",
|
|
253
260
|
"mapStartingLocation": "Kortstartplacering",
|
|
254
261
|
"matchOtherSections": "Match andre sektioner ({{value}})",
|
|
262
|
+
"miles": "Mil (mi)",
|
|
255
263
|
"monday": "mandag",
|
|
256
264
|
"navigationDay": "Navigation (dag)",
|
|
257
265
|
"navigationNight": "Navigation (nat)",
|
|
@@ -289,6 +297,7 @@
|
|
|
289
297
|
"presetImage": "Forudindstillet billede",
|
|
290
298
|
"primaryCTA": "Primær CTA",
|
|
291
299
|
"primaryHeading": "Primær overskrift",
|
|
300
|
+
"radius": "Radius",
|
|
292
301
|
"resultCard": "Resultatkort",
|
|
293
302
|
"scope": "Omfang",
|
|
294
303
|
"secondaryCTA": "Sekundær CTA",
|
|
@@ -299,6 +308,7 @@
|
|
|
299
308
|
"showCurrentPagesLinkLabel": "Vis den aktuelle sides linketiket",
|
|
300
309
|
"showCurrentStatus": "Vis den aktuelle status",
|
|
301
310
|
"showDayNames": "Vis dagnavne",
|
|
311
|
+
"showDistanceUnitToggle": "Vis knap til skift af afstandsenhed",
|
|
302
312
|
"showGetDirectionsLink": "Vis Get Reties Link",
|
|
303
313
|
"showHoursStatus": "Vis åbningstidsstatus",
|
|
304
314
|
"showIcon": "Vis ikon",
|