@v-office/website-sdk 2.24.1 → 2.25.0
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/cli.mjs +89 -2
- package/dist/{client-DC4LG3CP.mjs → client-0Lgv-Gb_.mjs} +83 -18
- package/dist/index.d.mts +17 -5
- package/dist/index.mjs +1 -1
- package/dist/instructions/CHANGELOG.md +1 -0
- package/dist/instructions/MIGRATION.md +1 -0
- package/dist/instructions/creation.md +5 -0
- package/dist/instructions/rentals.md +75 -0
- package/dist/instructions/versions/2.25.0/CHANGELOG.md +41 -0
- package/dist/instructions/versions/2.25.0/MIGRATION.md +64 -0
- package/dist/{to-rental-highlights-C1NF2uuE.mjs → operations-DwURbo0b.mjs} +1 -626
- package/dist/{rentals-eqFhtCdT.mjs → rentals-Dn0-kGWD.mjs} +96 -33
- package/dist/{search-CKL-8T8q.mjs → search-BLTTQAsG.mjs} +4 -3
- package/dist/to-rental-highlights-BL5m3Uen.mjs +626 -0
- package/dist/translations/v9/de-DE/core.json +3 -1
- package/dist/translations/v9/en-US/core.json +3 -1
- package/dist/{v9-data-BnYxa2Ek.mjs → v9-data-C3SWtDGs.mjs} +7 -5
- package/instructions/CHANGELOG.md +1 -0
- package/instructions/MIGRATION.md +1 -0
- package/instructions/creation.md +5 -0
- package/instructions/rentals.md +75 -0
- package/instructions/versions/2.25.0/CHANGELOG.md +41 -0
- package/instructions/versions/2.25.0/MIGRATION.md +64 -0
- package/instructions/versions/2.25.0/release.json +3 -0
- package/package.json +2 -2
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
# Migration: 2.24.1 to 2.25.0
|
|
2
|
+
|
|
3
|
+
## 1. Upgrade
|
|
4
|
+
|
|
5
|
+
```sh
|
|
6
|
+
pnpm add @v-office/website-sdk@2.25.0
|
|
7
|
+
```
|
|
8
|
+
|
|
9
|
+
No changes are required. One thing looks different on a v9 site: a review's author is the
|
|
10
|
+
guest's forename only, "Gast" / "Guest" when there is none. The surname is no longer
|
|
11
|
+
available. If the site's own text says "full name" or builds initials from `author`, adjust it.
|
|
12
|
+
To name the guest differently, override `reviews.item.guest` in `translationOverrides`.
|
|
13
|
+
|
|
14
|
+
Everything else in v9 reviews stays as before until the site sets `v9Reviews`.
|
|
15
|
+
|
|
16
|
+
## 2. Optional: ratings per review criterion on a v9 site
|
|
17
|
+
|
|
18
|
+
This is an offer to the site owner, not a required step. The overall rating, the review count
|
|
19
|
+
and the reviews stay either way.
|
|
20
|
+
|
|
21
|
+
1. List the agency's criteria:
|
|
22
|
+
|
|
23
|
+
```sh
|
|
24
|
+
website-sdk --backend v9 review-criteria
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
Every entry has the `fb_<id>` and whether it is rated with stars. A `text` criterion usually
|
|
28
|
+
does not appear here; its ID has to come from the site owner.
|
|
29
|
+
|
|
30
|
+
2. Ask the site owner which criteria to show and what they are called, in German and English.
|
|
31
|
+
|
|
32
|
+
3. Set them in the SDK options:
|
|
33
|
+
|
|
34
|
+
```ts
|
|
35
|
+
const options = {
|
|
36
|
+
v9Reviews: {
|
|
37
|
+
criteria: [
|
|
38
|
+
{ v9: "fb_8748", type: "stars", label: { "de-DE": "Sauberkeit", "en-US": "Cleanliness" } },
|
|
39
|
+
{ v9: "fb_8749", type: "stars", label: { "de-DE": "Lage", "en-US": "Location" } },
|
|
40
|
+
],
|
|
41
|
+
},
|
|
42
|
+
};
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
4. Render `reviews.summary.categories` if the site does not yet. Each entry is
|
|
46
|
+
`{ label, rating }`, in the configured order; a rental shows only the criteria it has.
|
|
47
|
+
|
|
48
|
+
## 3. Optional: the guest's city on a v9 site
|
|
49
|
+
|
|
50
|
+
Set `showAuthorCity: true` in `v9Reviews` to show "Anna aus Hamburg" instead of "Anna". The
|
|
51
|
+
wording comes from `reviews.item.authorWithCity` and can be overridden. A feedback without a
|
|
52
|
+
city keeps the name alone.
|
|
53
|
+
|
|
54
|
+
## 4. Optional: include incomplete v9 feedbacks
|
|
55
|
+
|
|
56
|
+
By default a v9 feedback needs an average rating and text to become a review item. To show the
|
|
57
|
+
others as well, set `includeItemsWithoutText` or `includeItemsWithoutRating` in `v9Reviews` to
|
|
58
|
+
`true`. Items can then lack `text` or `rating`, as `RentalReview` already allows; render each
|
|
59
|
+
field only when it is present.
|
|
60
|
+
|
|
61
|
+
## 5. If you used `fb_1429`, `fb_4905` or `fb_4906` as known feedback fields
|
|
62
|
+
|
|
63
|
+
They are no longer part of `KnownVofficeFeedbackData`. Where you pass them as feedback data
|
|
64
|
+
attributes, mark them with `customDataAttribute("fb_1429")` instead.
|
|
@@ -1,6 +1,3 @@
|
|
|
1
|
-
import { i as VofficeUnitDataPropertyMetadata } from "./v9-data-BnYxa2Ek.mjs";
|
|
2
|
-
import { localeToLanguage, makeTranslate, renderLabeledAttributeValue, renderResolvedCustomAttribute, toCountry } from "@v-office/sdk-core";
|
|
3
|
-
import { Effect } from "effect";
|
|
4
1
|
//#endregion
|
|
5
2
|
//#region codegen/v9/graphql-codegen/generated/gql.ts
|
|
6
3
|
const documents = {
|
|
@@ -2850,626 +2847,4 @@ const mapSearchQuery = graphql(`
|
|
|
2850
2847
|
}
|
|
2851
2848
|
`);
|
|
2852
2849
|
//#endregion
|
|
2853
|
-
|
|
2854
|
-
const isNonEmptyString$1 = (value) => typeof value === "string" && value.length > 0;
|
|
2855
|
-
const isRecord = (value) => typeof value === "object" && value !== null;
|
|
2856
|
-
const toLocalizedString = (value, locale) => {
|
|
2857
|
-
if (isNonEmptyString$1(value)) return value;
|
|
2858
|
-
if (!isRecord(value)) return void 0;
|
|
2859
|
-
const preferredKeys = [
|
|
2860
|
-
locale,
|
|
2861
|
-
localeToLanguage(locale),
|
|
2862
|
-
"en"
|
|
2863
|
-
];
|
|
2864
|
-
for (const key of preferredKeys) {
|
|
2865
|
-
const localizedValue = value[key];
|
|
2866
|
-
if (isNonEmptyString$1(localizedValue)) return localizedValue;
|
|
2867
|
-
}
|
|
2868
|
-
return Object.values(value).find(isNonEmptyString$1);
|
|
2869
|
-
};
|
|
2870
|
-
//#endregion
|
|
2871
|
-
//#region src/legacy-v9/parser/rentals/to-address.ts
|
|
2872
|
-
const toProvince = (data, locale) => {
|
|
2873
|
-
return toLocalizedString(data.known.regionName, locale);
|
|
2874
|
-
};
|
|
2875
|
-
const toAddress = (data, locale) => {
|
|
2876
|
-
const source = data.known.address;
|
|
2877
|
-
const address = {};
|
|
2878
|
-
if (source == null) return address;
|
|
2879
|
-
if (source.street != null) address.street = [source.street, source.housenumber].filter((part) => part != null && part.length > 0).join(" ");
|
|
2880
|
-
if (source.appendix != null) address.appendix = source.appendix;
|
|
2881
|
-
if (source.postalcode != null) address.postalcode = source.postalcode;
|
|
2882
|
-
if (source.city != null) address.city = source.city;
|
|
2883
|
-
if (source.country != null) address.country = toCountry(source.country, locale);
|
|
2884
|
-
const province = toProvince(data, locale);
|
|
2885
|
-
if (province != null) address.province = province;
|
|
2886
|
-
return address;
|
|
2887
|
-
};
|
|
2888
|
-
//#endregion
|
|
2889
|
-
//#region src/legacy-v9/parser/rentals/to-image.ts
|
|
2890
|
-
const IMAGE_ASPECT_RATIO = 3 / 2;
|
|
2891
|
-
const IMAGE_SRCSET_WIDTHS = [
|
|
2892
|
-
320,
|
|
2893
|
-
480,
|
|
2894
|
-
640,
|
|
2895
|
-
960,
|
|
2896
|
-
1280,
|
|
2897
|
-
1920,
|
|
2898
|
-
2560
|
|
2899
|
-
];
|
|
2900
|
-
const IMAGE_DEFAULT_WIDTH = 960;
|
|
2901
|
-
const VOFFICE_DYNAMIC_IMAGE_BASE_URL = "https://dyn.v-office.com/image";
|
|
2902
|
-
const VOFFICE_DYNAMIC_IMAGE_SIZES = [
|
|
2903
|
-
["tn", 141],
|
|
2904
|
-
["tnx", 225],
|
|
2905
|
-
["s", 450],
|
|
2906
|
-
["m", 600],
|
|
2907
|
-
["xl", 1440],
|
|
2908
|
-
["xxl", 2400]
|
|
2909
|
-
];
|
|
2910
|
-
const VOFFICE_DYNAMIC_IMAGE_DEFAULT_SIZE = "xl";
|
|
2911
|
-
const buildImageUrl = (imageProxyBaseUrl, path, width) => {
|
|
2912
|
-
const base = imageProxyBaseUrl.replace(/\/$/, "");
|
|
2913
|
-
const normalizedPath = path.replace(/^\/+/, "");
|
|
2914
|
-
return `${base}/_/rs:fill:${width}:${Math.round(width / IMAGE_ASPECT_RATIO)}:0/plain/${normalizedPath}`;
|
|
2915
|
-
};
|
|
2916
|
-
const buildSrcset = (imageProxyBaseUrl, path) => IMAGE_SRCSET_WIDTHS.map((width) => `${buildImageUrl(imageProxyBaseUrl, path, width)} ${width}w`).join(", ");
|
|
2917
|
-
const buildVofficeDynamicImageUrl = (imageId, size) => `${VOFFICE_DYNAMIC_IMAGE_BASE_URL}/${size}/${imageId}.jpg`;
|
|
2918
|
-
const buildVofficeDynamicImageSrcset = (imageId, originalImageWidth) => {
|
|
2919
|
-
const originalWidth = originalImageWidth != null && originalImageWidth > 0 ? originalImageWidth : void 0;
|
|
2920
|
-
const seenWidths = /* @__PURE__ */ new Set();
|
|
2921
|
-
return VOFFICE_DYNAMIC_IMAGE_SIZES.flatMap(([size, maximumWidth]) => {
|
|
2922
|
-
const width = originalWidth == null ? maximumWidth : Math.min(maximumWidth, originalWidth);
|
|
2923
|
-
if (seenWidths.has(width)) return [];
|
|
2924
|
-
seenWidths.add(width);
|
|
2925
|
-
return [`${buildVofficeDynamicImageUrl(imageId, size)} ${width}w`];
|
|
2926
|
-
}).join(", ");
|
|
2927
|
-
};
|
|
2928
|
-
const isNonEmptyString = (value) => typeof value === "string" && value.length > 0;
|
|
2929
|
-
const toDataImageId = (dataImage) => dataImage?.id?.toString();
|
|
2930
|
-
const getImagePath = (entry) => entry.image?.path ?? entry.normalizedPath;
|
|
2931
|
-
const getFileName = (path) => path?.split("/").at(-1);
|
|
2932
|
-
const getDirectoryName = (path) => {
|
|
2933
|
-
const lastSlashIndex = path.lastIndexOf("/");
|
|
2934
|
-
return lastSlashIndex === -1 ? void 0 : path.slice(0, lastSlashIndex);
|
|
2935
|
-
};
|
|
2936
|
-
const stripDataImageFilePrefix = (fileName) => fileName.replace(/^mf(?=\d)/i, "");
|
|
2937
|
-
const getDataImageFileName = (dataImage) => {
|
|
2938
|
-
const name = dataImage.name != null ? stripDataImageFilePrefix(dataImage.name) : void 0;
|
|
2939
|
-
if (name != null) return name;
|
|
2940
|
-
return dataImage.id != null ? `${dataImage.id}.jpg` : void 0;
|
|
2941
|
-
};
|
|
2942
|
-
const normalizeDataImagePath = (dataImage, referenceImages) => {
|
|
2943
|
-
const fileName = getDataImageFileName(dataImage);
|
|
2944
|
-
if (fileName == null) return void 0;
|
|
2945
|
-
const matchingPath = referenceImages.find((image) => getFileName(image.path ?? void 0) === fileName)?.path;
|
|
2946
|
-
if (matchingPath != null) return matchingPath;
|
|
2947
|
-
const directoryName = referenceImages.map((image) => image.path != null ? getDirectoryName(image.path) : void 0).find((path) => path != null);
|
|
2948
|
-
return directoryName != null ? `${directoryName}/${fileName}` : fileName;
|
|
2949
|
-
};
|
|
2950
|
-
const pathMatchesName = (path, name) => path != null && name != null && (path === name || path.endsWith(`/${name}`));
|
|
2951
|
-
const entriesShareId = (left, right) => {
|
|
2952
|
-
const leftIds = [left.image?.id, toDataImageId(left.dataImage)].filter(isNonEmptyString);
|
|
2953
|
-
const rightIds = [right.image?.id, toDataImageId(right.dataImage)].filter(isNonEmptyString);
|
|
2954
|
-
return leftIds.some((leftId) => rightIds.includes(leftId));
|
|
2955
|
-
};
|
|
2956
|
-
const entriesSharePathOrName = (left, right) => {
|
|
2957
|
-
const leftPath = getImagePath(left);
|
|
2958
|
-
const rightPath = getImagePath(right);
|
|
2959
|
-
const leftName = left.dataImage != null ? getDataImageFileName(left.dataImage) : getFileName(left.image?.path ?? void 0);
|
|
2960
|
-
const rightName = right.dataImage != null ? getDataImageFileName(right.dataImage) : getFileName(right.image?.path ?? void 0);
|
|
2961
|
-
return leftPath != null && rightPath != null && leftPath === rightPath || pathMatchesName(leftPath, rightName) || pathMatchesName(rightPath, leftName);
|
|
2962
|
-
};
|
|
2963
|
-
const entriesMatch = (left, right) => entriesShareId(left, right) || entriesSharePathOrName(left, right);
|
|
2964
|
-
const mergeEntry = (existing, next) => {
|
|
2965
|
-
const image = existing.image ?? next.image;
|
|
2966
|
-
const dataImage = existing.dataImage ?? next.dataImage;
|
|
2967
|
-
const normalizedPath = existing.normalizedPath ?? next.normalizedPath;
|
|
2968
|
-
const entry = { source: existing.source };
|
|
2969
|
-
if (image != null) entry.image = image;
|
|
2970
|
-
if (dataImage != null) entry.dataImage = dataImage;
|
|
2971
|
-
if (normalizedPath != null) entry.normalizedPath = normalizedPath;
|
|
2972
|
-
return entry;
|
|
2973
|
-
};
|
|
2974
|
-
const mergeImageEntries = (entries) => {
|
|
2975
|
-
const merged = [];
|
|
2976
|
-
for (const entry of entries) {
|
|
2977
|
-
const index = merged.findIndex((existing) => entriesMatch(existing, entry));
|
|
2978
|
-
if (index === -1) {
|
|
2979
|
-
merged.push(entry);
|
|
2980
|
-
continue;
|
|
2981
|
-
}
|
|
2982
|
-
merged[index] = mergeEntry(merged[index], entry);
|
|
2983
|
-
}
|
|
2984
|
-
return merged;
|
|
2985
|
-
};
|
|
2986
|
-
const getImageEntries = (rental, data) => {
|
|
2987
|
-
const vofficeImages = rental.voffice_images ?? [];
|
|
2988
|
-
const vofficeRoomImages = rental.voffice_room_images ?? [];
|
|
2989
|
-
const referenceImages = [...vofficeImages, ...vofficeRoomImages];
|
|
2990
|
-
return [
|
|
2991
|
-
...vofficeImages.map((image) => ({
|
|
2992
|
-
source: "voffice_images",
|
|
2993
|
-
image
|
|
2994
|
-
})),
|
|
2995
|
-
...vofficeRoomImages.map((image) => ({
|
|
2996
|
-
source: "voffice_room_images",
|
|
2997
|
-
image
|
|
2998
|
-
})),
|
|
2999
|
-
...(data.known.images ?? []).flatMap((dataImage) => {
|
|
3000
|
-
const normalizedPath = normalizeDataImagePath(dataImage, referenceImages);
|
|
3001
|
-
if (normalizedPath == null) return [];
|
|
3002
|
-
return [{
|
|
3003
|
-
source: "data_images",
|
|
3004
|
-
dataImage,
|
|
3005
|
-
normalizedPath
|
|
3006
|
-
}];
|
|
3007
|
-
})
|
|
3008
|
-
];
|
|
3009
|
-
};
|
|
3010
|
-
const toImage = (imageProxyBaseUrl, entry, locale) => {
|
|
3011
|
-
const path = getImagePath(entry);
|
|
3012
|
-
const src = path != null ? buildImageUrl(imageProxyBaseUrl, path, IMAGE_DEFAULT_WIDTH) : "";
|
|
3013
|
-
const srcset = path != null ? buildSrcset(imageProxyBaseUrl, path) : "";
|
|
3014
|
-
const title = toLocalizedString(entry.dataImage?.titles, locale) ?? entry.image?.title;
|
|
3015
|
-
const alt = title ?? entry.image?.description ?? "";
|
|
3016
|
-
const metadata = { source: entry.source };
|
|
3017
|
-
if (entry.dataImage != null) metadata.dataImage = entry.dataImage;
|
|
3018
|
-
const image = {
|
|
3019
|
-
idOrPath: path ?? toDataImageId(entry.dataImage) ?? entry.dataImage?.name ?? "",
|
|
3020
|
-
src,
|
|
3021
|
-
srcset,
|
|
3022
|
-
alt,
|
|
3023
|
-
metadata
|
|
3024
|
-
};
|
|
3025
|
-
if (title != null) image.title = title;
|
|
3026
|
-
if (entry.dataImage?.tag != null) image.category = entry.dataImage.tag;
|
|
3027
|
-
return image;
|
|
3028
|
-
};
|
|
3029
|
-
const toImages = (imageProxyBaseUrl, rental, locale, data) => {
|
|
3030
|
-
return mergeImageEntries(getImageEntries(rental, data)).map((entry) => toImage(imageProxyBaseUrl, entry, locale));
|
|
3031
|
-
};
|
|
3032
|
-
const toFacilityImages = (images, locale) => images.flatMap((image) => {
|
|
3033
|
-
if (image.id == null) return [];
|
|
3034
|
-
const title = toLocalizedString(image.titles, locale);
|
|
3035
|
-
const item = {
|
|
3036
|
-
idOrPath: image.id.toString(),
|
|
3037
|
-
src: buildVofficeDynamicImageUrl(image.id, VOFFICE_DYNAMIC_IMAGE_DEFAULT_SIZE),
|
|
3038
|
-
srcset: buildVofficeDynamicImageSrcset(image.id, image.width),
|
|
3039
|
-
metadata: {
|
|
3040
|
-
source: "voffice_facility_data_images",
|
|
3041
|
-
dataImage: image
|
|
3042
|
-
}
|
|
3043
|
-
};
|
|
3044
|
-
if (title != null) {
|
|
3045
|
-
item.alt = title;
|
|
3046
|
-
item.title = title;
|
|
3047
|
-
}
|
|
3048
|
-
if (image.tag != null) item.category = image.tag;
|
|
3049
|
-
return [item];
|
|
3050
|
-
});
|
|
3051
|
-
//#endregion
|
|
3052
|
-
//#region src/legacy-v9/parser/rentals/to-location.ts
|
|
3053
|
-
const toLocation = (location) => {
|
|
3054
|
-
if (location == null) return void 0;
|
|
3055
|
-
const [longitude, latitude] = location.coordinates;
|
|
3056
|
-
return {
|
|
3057
|
-
latitude,
|
|
3058
|
-
longitude
|
|
3059
|
-
};
|
|
3060
|
-
};
|
|
3061
|
-
//#endregion
|
|
3062
|
-
//#region src/legacy-v9/parser/rentals/render-property-attribute.ts
|
|
3063
|
-
const countLabelKey = (labelKey, value) => `${labelKey.slice(0, -6)}.count.${value === 1 ? "one" : "other"}`;
|
|
3064
|
-
const renderVofficePropertyAttribute = ({ key, metadata, locale, translate, value }) => Effect.gen(function* () {
|
|
3065
|
-
if (metadata.sourceType === "OPT") {
|
|
3066
|
-
if (typeof value !== "number" || !Number.isInteger(value)) return void 0;
|
|
3067
|
-
const option = metadata.options?.find((candidate) => candidate.value === value);
|
|
3068
|
-
if (option === void 0) return void 0;
|
|
3069
|
-
return `${yield* translate(metadata.labelKey, key)}: ${yield* translate(option.labelKey, option.sourceLabel)}`;
|
|
3070
|
-
}
|
|
3071
|
-
if (value === false || value === 0 || value === "false" || value === "0" || value == null || value === "") return;
|
|
3072
|
-
const label = yield* translate(metadata.labelKey, key);
|
|
3073
|
-
if (metadata.sourceType === "INT" && typeof value === "number") {
|
|
3074
|
-
if (value === 0) return void 0;
|
|
3075
|
-
if (key.endsWith("distance")) return `${label}: ${value}m`;
|
|
3076
|
-
if (key === "squareMeters") return `${value} m²`;
|
|
3077
|
-
return `${value} ${yield* translate(countLabelKey(metadata.labelKey, value), label)}`;
|
|
3078
|
-
}
|
|
3079
|
-
return renderLabeledAttributeValue({
|
|
3080
|
-
key,
|
|
3081
|
-
label,
|
|
3082
|
-
locale,
|
|
3083
|
-
value
|
|
3084
|
-
});
|
|
3085
|
-
});
|
|
3086
|
-
//#endregion
|
|
3087
|
-
//#region codegen/v9/heuristic-generation/rental-highlight-key-map.ts
|
|
3088
|
-
const V9_RENTAL_HIGHLIGHT_KEYS = new Set(Object.keys(VofficeUnitDataPropertyMetadata));
|
|
3089
|
-
const V9_RENTAL_HIGHLIGHT_KEY_LOOKUP = {
|
|
3090
|
-
ac: "ac",
|
|
3091
|
-
acCoverage: "acCoverage",
|
|
3092
|
-
accessToPrivateBeach: "privateBeach",
|
|
3093
|
-
accessibleByLift: "lift",
|
|
3094
|
-
adaptedBath: "handicappedAccessible",
|
|
3095
|
-
adventure: "adventure",
|
|
3096
|
-
airportdistance: "airportdistance",
|
|
3097
|
-
alarmClock: "alarmClock",
|
|
3098
|
-
alarmSystem: "alarmSystem",
|
|
3099
|
-
allergic: "allergic",
|
|
3100
|
-
archery: "archery",
|
|
3101
|
-
awayFromItAll: "away_from_it_all",
|
|
3102
|
-
babygate: "babygate",
|
|
3103
|
-
balcony: "balcony",
|
|
3104
|
-
balloonTrips: "balloon_trips",
|
|
3105
|
-
basketball: "basketball",
|
|
3106
|
-
bathroomEmergencyPullCord: "handicappedAccessible",
|
|
3107
|
-
bbq: "bbq",
|
|
3108
|
-
bbqArea: "bbqArea",
|
|
3109
|
-
bbqType: "bbqType",
|
|
3110
|
-
beach: "beach",
|
|
3111
|
-
beachChair: "beachChair",
|
|
3112
|
-
beachChairAtBeach: "beachChairAtBeach",
|
|
3113
|
-
beachaccess: "loc_beach",
|
|
3114
|
-
beachdistance: "beachdistance",
|
|
3115
|
-
beachfront: "beachfront",
|
|
3116
|
-
beachtype: "beachtype",
|
|
3117
|
-
beachview: "beachview",
|
|
3118
|
-
beachvolleyball: "beachvolleyball",
|
|
3119
|
-
beamer: "beamer",
|
|
3120
|
-
bicycles: "bicycles",
|
|
3121
|
-
billiards: "billiards",
|
|
3122
|
-
birdWatching: "birdWatching",
|
|
3123
|
-
bathrooms: "bathrooms",
|
|
3124
|
-
bedrooms: "bedrooms",
|
|
3125
|
-
blinds: "blinds",
|
|
3126
|
-
bluray: "bluray",
|
|
3127
|
-
boatBerth: "boatBerth",
|
|
3128
|
-
boatRental: "boat_rental",
|
|
3129
|
-
boatTrip: "boat_trip",
|
|
3130
|
-
boccie: "boccie",
|
|
3131
|
-
bodySoap: "toiletries",
|
|
3132
|
-
bookDvdMusicLibraryForChildren: "books",
|
|
3133
|
-
books: "books",
|
|
3134
|
-
botanicalGarden: "botanicalGarden",
|
|
3135
|
-
bowling: "bowling",
|
|
3136
|
-
budget: "budget",
|
|
3137
|
-
bungeeJumping: "bungee_jumping",
|
|
3138
|
-
canoeing: "canoeing",
|
|
3139
|
-
carNecessity: "carNecessity",
|
|
3140
|
-
carbonMonoxideDetector: "carbonMonoxideDetector",
|
|
3141
|
-
carport: "carport",
|
|
3142
|
-
carriageRides: "carriage_rides",
|
|
3143
|
-
cd: "cd",
|
|
3144
|
-
cds: "cds",
|
|
3145
|
-
childSafetySocketCovers: "socketSafetyCovers",
|
|
3146
|
-
childrenWelcome: "childrenWelcome",
|
|
3147
|
-
church: "church",
|
|
3148
|
-
cinema: "cinema",
|
|
3149
|
-
citydistance: "citydistance",
|
|
3150
|
-
climbing: "climbing",
|
|
3151
|
-
closedPlot: "closedPlot",
|
|
3152
|
-
closedTerrace: "closedTerrace",
|
|
3153
|
-
coffeemaker: "coffeemaker",
|
|
3154
|
-
conditioner: "toiletries",
|
|
3155
|
-
cookingUtensils: "cookingUtensils",
|
|
3156
|
-
cosmeticTreatments: "cosmetic_treatments",
|
|
3157
|
-
countrysideView: "countrysideView",
|
|
3158
|
-
countrysideViewType: "countrysideViewType",
|
|
3159
|
-
coveredTerrace: "coveredTerrace",
|
|
3160
|
-
crossCountrySkiing: "cross-country_skiing",
|
|
3161
|
-
culture: "culture",
|
|
3162
|
-
cycling: "cycling",
|
|
3163
|
-
danceCourses: "dance_courses",
|
|
3164
|
-
daySpa: "day_spa",
|
|
3165
|
-
deepseaFisching: "deepseaFisching",
|
|
3166
|
-
detached: "detached",
|
|
3167
|
-
diningSeating: "diningSeating",
|
|
3168
|
-
dishcloth: "dishcloth",
|
|
3169
|
-
dishes: "dishes",
|
|
3170
|
-
dishwasher: "dishwasher",
|
|
3171
|
-
disco: "disco",
|
|
3172
|
-
diving: "diving",
|
|
3173
|
-
dryer: "dryer",
|
|
3174
|
-
dutyfree: "dutyfree",
|
|
3175
|
-
dvd: "dvd",
|
|
3176
|
-
dvds: "dvds",
|
|
3177
|
-
eggboiler: "eggboiler",
|
|
3178
|
-
electricKettle: "electricKettle",
|
|
3179
|
-
elevation: "elevation",
|
|
3180
|
-
entireUnitWheelchairAccessible: "wheelchairFriendly",
|
|
3181
|
-
espressomachine: "espressomachine",
|
|
3182
|
-
espressomachineType: "espressomachineType",
|
|
3183
|
-
fan: "fan",
|
|
3184
|
-
family: "family",
|
|
3185
|
-
farmHolidays: "farm_holidays",
|
|
3186
|
-
ferrydistance: "ferrydistance",
|
|
3187
|
-
festivals: "festivals",
|
|
3188
|
-
fireAlarms: "firealarm",
|
|
3189
|
-
fireExtinguisher: "fireExtinguisher",
|
|
3190
|
-
fireplace: "fireplace",
|
|
3191
|
-
fireside: "fireside",
|
|
3192
|
-
firesideType: "firesideType",
|
|
3193
|
-
firstAidKit: "firstAidKit",
|
|
3194
|
-
fishguttingPlace: "fishguttingPlace",
|
|
3195
|
-
fitnessTraining: "fitness-training",
|
|
3196
|
-
floor: "floor",
|
|
3197
|
-
floorCount: "floorCount",
|
|
3198
|
-
flyscreen: "flyscreen",
|
|
3199
|
-
football: "football",
|
|
3200
|
-
freezer: "freezer",
|
|
3201
|
-
freezerType: "freezerType",
|
|
3202
|
-
fridge: "fridge",
|
|
3203
|
-
fullLengthMirror: "fullLengthMirror",
|
|
3204
|
-
gambling: "gambling",
|
|
3205
|
-
games: "games",
|
|
3206
|
-
garage: "garage",
|
|
3207
|
-
garden: "garden",
|
|
3208
|
-
gardenShed: "gardenShed",
|
|
3209
|
-
gardenView: "gardenView",
|
|
3210
|
-
golf: "golf",
|
|
3211
|
-
golfdistance: "golfdistance",
|
|
3212
|
-
guestwc: "guestwc",
|
|
3213
|
-
gym: "fitnessroom",
|
|
3214
|
-
gymnastics: "gymnastics",
|
|
3215
|
-
hammock: "hammock",
|
|
3216
|
-
handcart: "handcart",
|
|
3217
|
-
handicappedAccessible: "handicappedAccessible",
|
|
3218
|
-
heating: "heating",
|
|
3219
|
-
heatingSystem: "heatingSystem",
|
|
3220
|
-
helicopterTours: "helicopter_tours",
|
|
3221
|
-
hifi: "hifi",
|
|
3222
|
-
hiking: "hiking",
|
|
3223
|
-
historic: "historic",
|
|
3224
|
-
holidayComplex: "holiday_complex",
|
|
3225
|
-
homecinema: "homecinema",
|
|
3226
|
-
horsebackRiding: "horseback_riding",
|
|
3227
|
-
iceSkating: "iceSkating",
|
|
3228
|
-
individualAirConditioning: "ac",
|
|
3229
|
-
indoorGrill: "indoorGrill",
|
|
3230
|
-
indoorPool: "indoorPool",
|
|
3231
|
-
infraredCabin: "infraredCabin",
|
|
3232
|
-
internet: "internet",
|
|
3233
|
-
internetSpeed: "internetSpeed",
|
|
3234
|
-
iron: "iron",
|
|
3235
|
-
ironingBoard: "ironingBoard",
|
|
3236
|
-
jetSkiing: "jetSkiing",
|
|
3237
|
-
jogging: "jogging",
|
|
3238
|
-
kayaking: "kayaking",
|
|
3239
|
-
kitchen: "kitchen",
|
|
3240
|
-
kitchenDescription: "kitchenDescription",
|
|
3241
|
-
kitchenType: "kitchenType",
|
|
3242
|
-
kitchenmachine: "kitchenmachine",
|
|
3243
|
-
lakedistance: "lakedistance",
|
|
3244
|
-
lakeview: "lakeview",
|
|
3245
|
-
lakeviewType: "lakeviewType",
|
|
3246
|
-
landingStage: "landingStage",
|
|
3247
|
-
laundryRack: "laundryRack",
|
|
3248
|
-
library: "library",
|
|
3249
|
-
lift: "lift",
|
|
3250
|
-
locAtm: "loc_atm",
|
|
3251
|
-
locBay: "loc_bay",
|
|
3252
|
-
locBeach: "loc_beach",
|
|
3253
|
-
locCity: "loc_city",
|
|
3254
|
-
locDowntown: "loc_downtown",
|
|
3255
|
-
locForest: "loc_forest",
|
|
3256
|
-
locGroceries: "loc_groceries",
|
|
3257
|
-
locHospital: "loc_hospital",
|
|
3258
|
-
locLake: "loc_lake",
|
|
3259
|
-
locMedicalServices: "loc_medical_services",
|
|
3260
|
-
locMountain: "loc_mountain",
|
|
3261
|
-
locOcean: "loc_ocean",
|
|
3262
|
-
locRiver: "loc_river",
|
|
3263
|
-
locRural: "loc_rural",
|
|
3264
|
-
locVillage: "loc_village",
|
|
3265
|
-
locWaterfalls: "loc_waterfalls",
|
|
3266
|
-
loungeSeating: "loungeSeating",
|
|
3267
|
-
livingrooms: "living_room",
|
|
3268
|
-
lowBathroomSink: "handicappedAccessible",
|
|
3269
|
-
luxury: "luxury",
|
|
3270
|
-
marquee: "marquee",
|
|
3271
|
-
massages: "massages",
|
|
3272
|
-
maxAdults: "beds",
|
|
3273
|
-
maxPersons: "beds",
|
|
3274
|
-
microwave: "microwave",
|
|
3275
|
-
minigolf: "minigolf",
|
|
3276
|
-
minibar: "minibar",
|
|
3277
|
-
minpersons: "minpersons",
|
|
3278
|
-
mixer: "mixer",
|
|
3279
|
-
mountainbiking: "mountainbiking",
|
|
3280
|
-
mountainview: "mountainview",
|
|
3281
|
-
mountainviewType: "mountainviewType",
|
|
3282
|
-
museums: "museums",
|
|
3283
|
-
nordicWalking: "nordic-walking",
|
|
3284
|
-
nonsmoking: "nonsmoking",
|
|
3285
|
-
nudeBeach: "nudeBeach",
|
|
3286
|
-
outdoorDiningArea: "gardenFurniture",
|
|
3287
|
-
outdoorFurniture: "gardenFurniture",
|
|
3288
|
-
outdoorKitchen: "outdoorKitchen",
|
|
3289
|
-
outdoorPool: "pool",
|
|
3290
|
-
outdoorPoolDetails: "pool",
|
|
3291
|
-
outdoorShower: "outdoorShower",
|
|
3292
|
-
oven: "oven",
|
|
3293
|
-
ovenConnection: "ovenConnection",
|
|
3294
|
-
paragliding: "paragliding",
|
|
3295
|
-
parasailing: "parasailing",
|
|
3296
|
-
parasol: "parasol",
|
|
3297
|
-
parkingCount: "parkingCount",
|
|
3298
|
-
pavilion: "pavilion",
|
|
3299
|
-
penthouse: "penthouse",
|
|
3300
|
-
pilates: "pilates",
|
|
3301
|
-
playground: "playground",
|
|
3302
|
-
playgroundActivity: "playgroundActivity",
|
|
3303
|
-
plotSize: "plotSize",
|
|
3304
|
-
pond: "pond",
|
|
3305
|
-
pool4kids: "pool4kids",
|
|
3306
|
-
pooltable: "pooltable",
|
|
3307
|
-
poolView: "poolView",
|
|
3308
|
-
privateOpenAirBath: "outdoorShower",
|
|
3309
|
-
privateparking: "privateparking",
|
|
3310
|
-
publictransportdistance: "publictransportdistance",
|
|
3311
|
-
qiGong: "qi_gong",
|
|
3312
|
-
raclette: "raclette",
|
|
3313
|
-
radio: "radio",
|
|
3314
|
-
rafting: "rafting",
|
|
3315
|
-
restaurantdistance: "restaurantdistance",
|
|
3316
|
-
restaurants: "restaurants",
|
|
3317
|
-
riverView: "riverView",
|
|
3318
|
-
rollInShower: "handicappedAccessible",
|
|
3319
|
-
romantic: "romantic",
|
|
3320
|
-
rooms: "rooms",
|
|
3321
|
-
rowing: "rowing",
|
|
3322
|
-
ruins: "ruins",
|
|
3323
|
-
safe: "safe",
|
|
3324
|
-
sailing: "sailing",
|
|
3325
|
-
sandbox: "sandbox",
|
|
3326
|
-
sandwichToaster: "sandwichToaster",
|
|
3327
|
-
sauna: "sauna",
|
|
3328
|
-
seadistance: "seadistance",
|
|
3329
|
-
seaview: "seaview",
|
|
3330
|
-
seaviewType: "seaviewType",
|
|
3331
|
-
shampoo: "toiletries",
|
|
3332
|
-
shoeCabinet: "shoeCabinet",
|
|
3333
|
-
shopping: "shopping",
|
|
3334
|
-
shoppingdistance: "shoppingdistance",
|
|
3335
|
-
showerChair: "handicappedAccessible",
|
|
3336
|
-
sightSeeing: "sight_seeing",
|
|
3337
|
-
skiBootWarmer: "skiBootWarmer",
|
|
3338
|
-
skidistance: "skidistance",
|
|
3339
|
-
skialpine: "skialpine",
|
|
3340
|
-
sledding: "sledding",
|
|
3341
|
-
slide: "slide",
|
|
3342
|
-
smokeDetector: "smokeDetector",
|
|
3343
|
-
snorkeling: "snorkeling",
|
|
3344
|
-
snowboarding: "snowboarding",
|
|
3345
|
-
solarium: "solarium",
|
|
3346
|
-
spa: "wellness",
|
|
3347
|
-
spices: "spices",
|
|
3348
|
-
spelunking: "spelunking",
|
|
3349
|
-
sportsActivities: "sports_activities",
|
|
3350
|
-
squash: "squash",
|
|
3351
|
-
stars: "stars",
|
|
3352
|
-
steambath: "steambath",
|
|
3353
|
-
stove: "stove",
|
|
3354
|
-
stoveType: "stoveType",
|
|
3355
|
-
sunbathingArea: "sunbathingArea",
|
|
3356
|
-
sunlounger: "sunlounger",
|
|
3357
|
-
surfing: "surfing",
|
|
3358
|
-
swimming: "swimming",
|
|
3359
|
-
swing: "swing",
|
|
3360
|
-
synagogues: "synagogues",
|
|
3361
|
-
tableTennis: "table_tennis",
|
|
3362
|
-
tableTennisTable: "tableTennisTable",
|
|
3363
|
-
tennis: "tennis",
|
|
3364
|
-
tennisCourt: "tennisCourt",
|
|
3365
|
-
terrace: "terrace",
|
|
3366
|
-
theater: "theater",
|
|
3367
|
-
themeParks: "themeParks",
|
|
3368
|
-
toaster: "toaster",
|
|
3369
|
-
toiletPaper: "toiletries",
|
|
3370
|
-
toiletWithGrabRails: "handicappedAccessible",
|
|
3371
|
-
toothbrush: "toiletries",
|
|
3372
|
-
touristAttractions: "tourist_attractions",
|
|
3373
|
-
toys: "toys",
|
|
3374
|
-
trainstationdistance: "trainstationdistance",
|
|
3375
|
-
trampoline: "trampoline",
|
|
3376
|
-
trashCans: "trashcan",
|
|
3377
|
-
trashcan: "trashcan",
|
|
3378
|
-
trekking: "trekking",
|
|
3379
|
-
tv: "tv",
|
|
3380
|
-
tvConnection: "tvConnection",
|
|
3381
|
-
tvCount: "tvCount",
|
|
3382
|
-
tvInternationalChannels: "tvInternationalChannels",
|
|
3383
|
-
tvSize: "tvSize",
|
|
3384
|
-
upperFloorReachableByLift: "lift",
|
|
3385
|
-
vacuum: "vacuum",
|
|
3386
|
-
valleyView: "valleyView",
|
|
3387
|
-
valleyViewType: "valleyViewType",
|
|
3388
|
-
vod: "vod",
|
|
3389
|
-
walking: "walking",
|
|
3390
|
-
warmwater: "warmwater",
|
|
3391
|
-
washer: "washer",
|
|
3392
|
-
waterParks: "waterParks",
|
|
3393
|
-
waterSki: "water_ski",
|
|
3394
|
-
waterSport: "water_sport",
|
|
3395
|
-
wellness: "wellness",
|
|
3396
|
-
wellnessActivity: "wellnessActivity",
|
|
3397
|
-
whaleWatching: "whale_watching",
|
|
3398
|
-
wheelchairFriendly: "wheelchairFriendly",
|
|
3399
|
-
whirlpool: "whirlpool",
|
|
3400
|
-
wifi: "wifi",
|
|
3401
|
-
windScreen: "windScreen",
|
|
3402
|
-
windSurfing: "windSurfing",
|
|
3403
|
-
yearOfConstruction: "yearOfConstruction",
|
|
3404
|
-
yearOfLastRenovation: "yearOfLastRenovation",
|
|
3405
|
-
yoga: "yoga",
|
|
3406
|
-
youthgroups: "youthgroups",
|
|
3407
|
-
zoo: "zoo"
|
|
3408
|
-
};
|
|
3409
|
-
const toV9RentalHighlightKey = (key) => {
|
|
3410
|
-
const mappedKey = V9_RENTAL_HIGHLIGHT_KEY_LOOKUP[key] ?? key;
|
|
3411
|
-
return V9_RENTAL_HIGHLIGHT_KEYS.has(mappedKey) ? mappedKey : void 0;
|
|
3412
|
-
};
|
|
3413
|
-
//#endregion
|
|
3414
|
-
//#region src/legacy-v9/parser/rentals/to-rental-highlights.ts
|
|
3415
|
-
const RENTAL_VIEW_HIGHLIGHT_KEYS = /* @__PURE__ */ new Set([
|
|
3416
|
-
"beachview",
|
|
3417
|
-
"cityView",
|
|
3418
|
-
"countrysideView",
|
|
3419
|
-
"gardenView",
|
|
3420
|
-
"innerCourtView",
|
|
3421
|
-
"lakeview",
|
|
3422
|
-
"mountainview",
|
|
3423
|
-
"poolView",
|
|
3424
|
-
"quietStreetView",
|
|
3425
|
-
"riverView",
|
|
3426
|
-
"seaview",
|
|
3427
|
-
"valleyView"
|
|
3428
|
-
]);
|
|
3429
|
-
const toRentalHighlights = ({ locale, translations, highlightPrioritization, customAttributes, attributes }) => Effect.gen(function* () {
|
|
3430
|
-
const highlights = [];
|
|
3431
|
-
const seenKeys = /* @__PURE__ */ new Set();
|
|
3432
|
-
const knownAttributes = attributes.known;
|
|
3433
|
-
const translate = makeTranslate(translations, locale);
|
|
3434
|
-
let hasViewHighlight = false;
|
|
3435
|
-
for (const highlightKey of highlightPrioritization) {
|
|
3436
|
-
const isViewHighlight = RENTAL_VIEW_HIGHLIGHT_KEYS.has(highlightKey);
|
|
3437
|
-
if (isViewHighlight && hasViewHighlight) continue;
|
|
3438
|
-
const v9Key = toV9RentalHighlightKey(highlightKey);
|
|
3439
|
-
if (v9Key == null) {
|
|
3440
|
-
if (seenKeys.has(highlightKey)) continue;
|
|
3441
|
-
seenKeys.add(highlightKey);
|
|
3442
|
-
const attribute = customAttributes.byKey[highlightKey];
|
|
3443
|
-
if (attribute === void 0) continue;
|
|
3444
|
-
const binding = attribute.v9;
|
|
3445
|
-
const value = binding === void 0 ? void 0 : knownAttributes[binding] ?? attributes.unknown[binding];
|
|
3446
|
-
const highlight = renderResolvedCustomAttribute({
|
|
3447
|
-
attribute,
|
|
3448
|
-
locale,
|
|
3449
|
-
value
|
|
3450
|
-
});
|
|
3451
|
-
if (highlight != null) {
|
|
3452
|
-
highlights.push(highlight);
|
|
3453
|
-
if (isViewHighlight) hasViewHighlight = true;
|
|
3454
|
-
}
|
|
3455
|
-
continue;
|
|
3456
|
-
}
|
|
3457
|
-
if (seenKeys.has(v9Key)) continue;
|
|
3458
|
-
seenKeys.add(v9Key);
|
|
3459
|
-
const metadata = VofficeUnitDataPropertyMetadata[v9Key];
|
|
3460
|
-
const highlight = yield* renderVofficePropertyAttribute({
|
|
3461
|
-
key: v9Key,
|
|
3462
|
-
metadata,
|
|
3463
|
-
locale,
|
|
3464
|
-
translate,
|
|
3465
|
-
value: knownAttributes[v9Key]
|
|
3466
|
-
});
|
|
3467
|
-
if (highlight != null) {
|
|
3468
|
-
highlights.push(highlight);
|
|
3469
|
-
if (isViewHighlight) hasViewHighlight = true;
|
|
3470
|
-
}
|
|
3471
|
-
}
|
|
3472
|
-
return highlights;
|
|
3473
|
-
});
|
|
3474
|
-
//#endregion
|
|
3475
|
-
export { toFacilityImages as a, toLocalizedString as c, rentalFacilitiesForObjectGroupRelationQuery as d, rentalIdsQuery as f, rentalsAllWithoutFeedbacksQuery as h, toLocation as i, mapSearchQuery as l, rentalsAllFeedbacksQuery as m, toV9RentalHighlightKey as n, toImages as o, rentalsAllByFacilityObjectGroupsWithoutFeedbacksQuery as p, renderVofficePropertyAttribute as r, toAddress as s, toRentalHighlights as t, searchQuery as u };
|
|
2850
|
+
export { rentalsAllByFacilityObjectGroupsWithoutFeedbacksQuery as a, rentalIdsQuery as i, searchQuery as n, rentalsAllFeedbacksQuery as o, rentalFacilitiesForObjectGroupRelationQuery as r, rentalsAllWithoutFeedbacksQuery as s, mapSearchQuery as t };
|