ublo-lib 1.47.63 → 1.47.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/es/future/components/msem-preset-editor/editors/lodgings.d.ts.map +1 -1
- package/es/future/components/msem-preset-editor/editors/lodgings.js +33 -33
- package/es/future/components/msem-preset-editor/editors/lodgings.module.css +24 -0
- package/es/future/components/msem-preset-editor/editors/ski-passes.d.ts.map +1 -1
- package/es/future/components/msem-preset-editor/editors/ski-passes.js +3 -16
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"lodgings.d.ts","sourceRoot":"","sources":["../../../../../src/future/components/msem-preset-editor/editors/lodgings.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAS/B,KAAK,KAAK,GAAG;IACX,IAAI,EAAE,IAAI,GAAG,IAAI,CAAC;IAClB,eAAe,EAAE,MAAM,CAAC;IACxB,IAAI,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,EAAE,EAAE,MAAM,CAAA;KAAE,CAAC;IACnC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,IAAI,CAAC;IACnC,SAAS,EAAE,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC,cAAc,CAAC,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,IAAI,CAAC,CAAC,CAAC;IAC5E,mBAAmB,EAAE,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC,cAAc,CAAC,OAAO,CAAC,CAAC,CAAC;IACnE,UAAU,EAAE,MAAM,IAAI,CAAC;IACvB,QAAQ,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,IAAI,KAAK,IAAI,CAAC;IACxD,WAAW,EAAE,MAAM,CAAC;CACrB,CAAC;
|
|
1
|
+
{"version":3,"file":"lodgings.d.ts","sourceRoot":"","sources":["../../../../../src/future/components/msem-preset-editor/editors/lodgings.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAS/B,KAAK,KAAK,GAAG;IACX,IAAI,EAAE,IAAI,GAAG,IAAI,CAAC;IAClB,eAAe,EAAE,MAAM,CAAC;IACxB,IAAI,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,EAAE,EAAE,MAAM,CAAA;KAAE,CAAC;IACnC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,IAAI,CAAC;IACnC,SAAS,EAAE,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC,cAAc,CAAC,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,IAAI,CAAC,CAAC,CAAC;IAC5E,mBAAmB,EAAE,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC,cAAc,CAAC,OAAO,CAAC,CAAC,CAAC;IACnE,UAAU,EAAE,MAAM,IAAI,CAAC;IACvB,QAAQ,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,IAAI,KAAK,IAAI,CAAC;IACxD,WAAW,EAAE,MAAM,CAAC;CACrB,CAAC;AA2EF,MAAM,CAAC,OAAO,UAAU,QAAQ,CAAC,EAC/B,IAAI,EACJ,eAAe,EACf,MAAM,EACN,SAAS,EACT,mBAAmB,EACnB,UAAU,EACV,QAAQ,EACR,WAAW,GACZ,EAAE,KAAK,2CA+UP"}
|
|
@@ -19,40 +19,34 @@ const DEFAULT_DATA = {
|
|
|
19
19
|
type: "",
|
|
20
20
|
meubleType: [],
|
|
21
21
|
filter: "",
|
|
22
|
+
hide: [],
|
|
22
23
|
};
|
|
23
24
|
const MEUBLE_TYPES = [
|
|
25
|
+
{ label: "Appartement", value: "APT" },
|
|
26
|
+
{ label: "Appartement dans maison", value: "APT-IN-HOUSE" },
|
|
27
|
+
{ label: "Appartement dans un chalet", value: "APT-IN-CHALET" },
|
|
28
|
+
{ label: "Chalet", value: "CHALET" },
|
|
29
|
+
{ label: "Gîte rural", value: "GITE-RURAL" },
|
|
30
|
+
{ label: "Maison", value: "HOUSE" },
|
|
31
|
+
{ label: "Clévacances", value: "CLEVACANCES" },
|
|
32
|
+
{ label: "Gîte de France", value: "GITE-FRANCE" },
|
|
33
|
+
];
|
|
34
|
+
const HIDE_OPTIONS = [
|
|
35
|
+
{ label: "Filtres", value: "filters" },
|
|
36
|
+
{ label: "Liste des hébergements", value: "lodgingListOffers" },
|
|
37
|
+
{ label: "Carte des hébergements", value: "lodgingListMap" },
|
|
38
|
+
{ label: "Fiche hébergement - Photos", value: "lodgingCarousel" },
|
|
39
|
+
{ label: "Fiche hébergement - Description", value: "lodgingDescription" },
|
|
40
|
+
{ label: "Fiche hébergement - Carte", value: "lodgingMap" },
|
|
41
|
+
{ label: "Fiche hébergement - Offres", value: "lodgingOffers" },
|
|
42
|
+
{ label: "Fiche hébergement - Langues parlées", value: "lodgingLanguages" },
|
|
43
|
+
{ label: "Fiche hébergement - Équipements", value: "lodgingOptions" },
|
|
44
|
+
{ label: "Fiche hébergement - Capacité", value: "lodgingCapacity" },
|
|
24
45
|
{
|
|
25
|
-
label: "
|
|
26
|
-
value: "
|
|
27
|
-
},
|
|
28
|
-
{
|
|
29
|
-
label: "Appartement dans maison",
|
|
30
|
-
value: "APT-IN-HOUSE",
|
|
31
|
-
},
|
|
32
|
-
{
|
|
33
|
-
label: "Appartement dans un chalet",
|
|
34
|
-
value: "APT-IN-CHALET",
|
|
35
|
-
},
|
|
36
|
-
{
|
|
37
|
-
label: "Chalet",
|
|
38
|
-
value: "CHALET",
|
|
39
|
-
},
|
|
40
|
-
{
|
|
41
|
-
label: "Gîte rural",
|
|
42
|
-
value: "GITE-RURAL",
|
|
43
|
-
},
|
|
44
|
-
{
|
|
45
|
-
label: "Maison",
|
|
46
|
-
value: "HOUSE",
|
|
47
|
-
},
|
|
48
|
-
{
|
|
49
|
-
label: "Clévacances",
|
|
50
|
-
value: "CLEVACANCES",
|
|
51
|
-
},
|
|
52
|
-
{
|
|
53
|
-
label: "Gîte de France",
|
|
54
|
-
value: "GITE-FRANCE",
|
|
46
|
+
label: "Fiche hébergement - Informations additionnelles",
|
|
47
|
+
value: "lodgingInfos",
|
|
55
48
|
},
|
|
49
|
+
{ label: "Fiche hébergement - Suggestions similaires", value: "upsales" },
|
|
56
50
|
];
|
|
57
51
|
export default function Lodgings({ lang, msemServicesUrl, preset, setPreset, setShowPresetDialog, testPreset, onChange, urlOverride, }) {
|
|
58
52
|
const savedPreset = React.useRef(preset);
|
|
@@ -90,6 +84,9 @@ export default function Lodgings({ lang, msemServicesUrl, preset, setPreset, set
|
|
|
90
84
|
label: room.title,
|
|
91
85
|
value: room.type,
|
|
92
86
|
}));
|
|
87
|
+
const selectedHideOptions = data.hide.map((hide) => {
|
|
88
|
+
return HIDE_OPTIONS.find((option) => option.value === hide);
|
|
89
|
+
});
|
|
93
90
|
const selectedMerchants = data.merchants?.map((merchant) => formattedMerchants.find((d) => d.value === merchant));
|
|
94
91
|
const selectedOptions = data.options?.map((option) => filters?.options?.find((d) => d.value === option));
|
|
95
92
|
const selectedSectors = data.sectors?.map((sector) => filters?.sectors?.find((d) => d.value === sector));
|
|
@@ -178,6 +175,7 @@ export default function Lodgings({ lang, msemServicesUrl, preset, setPreset, set
|
|
|
178
175
|
const agesChildren = [...new Array(children)].map(() => 12);
|
|
179
176
|
const paxPlan = adults ? { adults, children, agesChildren } : undefined;
|
|
180
177
|
const merchants = data.merchants?.length ? data.merchants : undefined;
|
|
178
|
+
const hide = data.hide?.length ? data.hide : undefined;
|
|
181
179
|
const options = data.options?.length ? data.options : undefined;
|
|
182
180
|
const sectors = data.sectors?.length ? data.sectors : undefined;
|
|
183
181
|
const type = data.type || undefined;
|
|
@@ -200,7 +198,7 @@ export default function Lodgings({ lang, msemServicesUrl, preset, setPreset, set
|
|
|
200
198
|
};
|
|
201
199
|
const newPreset = {
|
|
202
200
|
...current,
|
|
203
|
-
options: { ...(current?.options || {}), previewDetails },
|
|
201
|
+
options: { ...(current?.options || {}), previewDetails, hide },
|
|
204
202
|
presets: { ...(current?.presets || {}), ...presets },
|
|
205
203
|
url: urlOverride || undefined,
|
|
206
204
|
};
|
|
@@ -208,13 +206,14 @@ export default function Lodgings({ lang, msemServicesUrl, preset, setPreset, set
|
|
|
208
206
|
return newPreset;
|
|
209
207
|
});
|
|
210
208
|
}, [data, onChange, urlOverride, setPreset]);
|
|
211
|
-
return (_jsxs(Form, { title: "Presets h\u00E9bergements", width: 580, preset: preset, buttonsActions: { testPreset, cancelPreset, confirmPreset }, children: [_jsx("div", { className: css.label, children: "Nombre de personnes" }), _jsxs("div", { className: css.row, children: [_jsx(NumberPicker, { className: css.peopleInput, label: "Adultes", min: 0, max: 20, value: data.adults, onChange: updateField("adults"), withInput: true }), _jsx(NumberPicker, { className: css.peopleInput, label: "Enfants", min: 0, max: 9, value: data.children, onChange: updateField("children"), withInput: true })] }), _jsx("div", { className: css.label, children: "H\u00E9bergement" }), _jsx(Select, { placeholder: "S\u00E9lectionnez un h\u00E9bergement", options: formattedLodgings, value: data.lodging, onValueChange: updateField("lodging"), loading: loading }), !showFilters && (_jsxs(_Fragment, { children: [_jsx("div", { className: css.label, children: "Chambres" }), (formattedRooms?.length > 0 || loading) && (_jsx(Select, { label: "Type de bien", placeholder: "S\u00E9lectionnez un type de bien", value: data.roomId, options: formattedRooms, onValueChange: updateField("roomId"), loading: loading })), _jsx(NumberPicker, { label: "Nombre de chambres", min: 0, max: 20, value: data.nbRooms?.[0] || 0, onChange: updateRoomNb, withInput: true })] })), showFilters && (_jsxs(_Fragment, { children: [_jsx("div", { className: css.label, children: "Filtres" }), lodgings?.length > 0 && (_jsx(MultipleSelect, { label: "Liste de marchands", options: formattedMerchants, values: selectedMerchants, onChange: updateFilter("merchants"), loading: loading, withSearch: true })), (loading || kinds.length > 1) && (_jsx(Select, { label: "Type", placeholder: "S\u00E9lectionnez un type", options: kinds, value: data.type, onValueChange: updateField("type"), loading: loading })), showMeubleType && (_jsx(MultipleSelect, { placeholder: "Selectionnez une ou plusieurs options", label: "Type de meubl\u00E9", options: MEUBLE_TYPES, values: selectedMeubleTypes, onChange: updateFilter("meubleType"), loading: loading })), (loading || filters.options.length >= 1) && (_jsx(MultipleSelect, { placeholder: "Selectionnez une ou plusieurs options", label: "Options", options: filters.options, values: selectedOptions, onChange: updateFilter("options"), loading: loading, withSearch: true })), (loading || filters.sectors.length >= 1) && (_jsx(MultipleSelect, { placeholder: "Selectionnez une ou plusieurs options", label: "Quartiers", options: filters.sectors, values: selectedSectors, onChange: updateFilter("sectors"), loading: loading, withSearch: true })), _jsx("div", { className: css.label, children: "Avanc\u00E9" }), _jsx(Input, { className: css.input, label: "Filtre", value: data.filter, placeholder: "('10', '22') in options", onValueChange: updateField("filter") })] }))] }));
|
|
209
|
+
return (_jsxs(Form, { title: "Presets h\u00E9bergements", width: 580, preset: preset, buttonsActions: { testPreset, cancelPreset, confirmPreset }, children: [_jsx("div", { className: css.title, children: "Options d'affichage" }), _jsx(MultipleSelect, { label: "Cacher", placeholder: "Selectionnez une ou plusieurs options", options: HIDE_OPTIONS, values: selectedHideOptions, onChange: updateFilter("hide") }), _jsx("div", { className: css.title2, children: "Preset" }), _jsx("div", { className: css.label, children: "Nombre de personnes" }), _jsxs("div", { className: css.row, children: [_jsx(NumberPicker, { className: css.peopleInput, label: "Adultes", min: 0, max: 20, value: data.adults, onChange: updateField("adults"), withInput: true }), _jsx(NumberPicker, { className: css.peopleInput, label: "Enfants", min: 0, max: 9, value: data.children, onChange: updateField("children"), withInput: true })] }), _jsx("div", { className: css.label, children: "H\u00E9bergement" }), _jsx(Select, { placeholder: "S\u00E9lectionnez un h\u00E9bergement", options: formattedLodgings, value: data.lodging, onValueChange: updateField("lodging"), loading: loading }), !showFilters && (_jsxs(_Fragment, { children: [_jsx("div", { className: css.label, children: "Chambres" }), (formattedRooms?.length > 0 || loading) && (_jsx(Select, { label: "Type de bien", placeholder: "S\u00E9lectionnez un type de bien", value: data.roomId, options: formattedRooms, onValueChange: updateField("roomId"), loading: loading })), _jsx(NumberPicker, { label: "Nombre de chambres", min: 0, max: 20, value: data.nbRooms?.[0] || 0, onChange: updateRoomNb, withInput: true })] })), showFilters && (_jsxs(_Fragment, { children: [_jsx("div", { className: css.label, children: "Filtres" }), lodgings?.length > 0 && (_jsx(MultipleSelect, { label: "Liste de marchands", options: formattedMerchants, values: selectedMerchants, onChange: updateFilter("merchants"), loading: loading, withSearch: true })), (loading || kinds.length > 1) && (_jsx(Select, { label: "Type", placeholder: "S\u00E9lectionnez un type", options: kinds, value: data.type, onValueChange: updateField("type"), loading: loading })), showMeubleType && (_jsx(MultipleSelect, { placeholder: "Selectionnez une ou plusieurs options", label: "Type de meubl\u00E9", options: MEUBLE_TYPES, values: selectedMeubleTypes, onChange: updateFilter("meubleType"), loading: loading })), (loading || filters.options.length >= 1) && (_jsx(MultipleSelect, { placeholder: "Selectionnez une ou plusieurs options", label: "Options", options: filters.options, values: selectedOptions, onChange: updateFilter("options"), loading: loading, withSearch: true })), (loading || filters.sectors.length >= 1) && (_jsx(MultipleSelect, { placeholder: "Selectionnez une ou plusieurs options", label: "Quartiers", options: filters.sectors, values: selectedSectors, onChange: updateFilter("sectors"), loading: loading, withSearch: true })), _jsx("div", { className: css.label, children: "Avanc\u00E9" }), _jsx(Input, { className: css.input, label: "Filtre", value: data.filter, placeholder: "('10', '22') in options", onValueChange: updateField("filter") })] }))] }));
|
|
212
210
|
}
|
|
213
211
|
function getDefaultData(preset) {
|
|
214
212
|
if (!preset?.presets && !preset?.options)
|
|
215
213
|
return DEFAULT_DATA;
|
|
216
214
|
const { merchants, accomodation, nbRooms, options, sectors, type, meubleType, filter, } = preset?.presets || {};
|
|
217
|
-
const {
|
|
215
|
+
const { hide, previewDetails } = preset.options || {};
|
|
216
|
+
const { paxPlan, roomId } = previewDetails || {};
|
|
218
217
|
return {
|
|
219
218
|
adults: paxPlan?.adults || DEFAULT_DATA.adults,
|
|
220
219
|
children: paxPlan?.children || DEFAULT_DATA.children,
|
|
@@ -227,5 +226,6 @@ function getDefaultData(preset) {
|
|
|
227
226
|
type: type || DEFAULT_DATA.type,
|
|
228
227
|
meubleType: meubleType?.split(",") || DEFAULT_DATA.meubleType,
|
|
229
228
|
filter: filter || DEFAULT_DATA.filter,
|
|
229
|
+
hide: hide || DEFAULT_DATA.hide,
|
|
230
230
|
};
|
|
231
231
|
}
|
|
@@ -14,6 +14,30 @@
|
|
|
14
14
|
flex: 0 0 auto;
|
|
15
15
|
}
|
|
16
16
|
|
|
17
|
+
.title,
|
|
18
|
+
.title2 {
|
|
19
|
+
margin-bottom: 4px;
|
|
20
|
+
font-weight: 700;
|
|
21
|
+
display: flex;
|
|
22
|
+
align-items: center;
|
|
23
|
+
gap: 8px;
|
|
24
|
+
font-size: 14px;
|
|
25
|
+
white-space: nowrap;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
.title::after,
|
|
29
|
+
.title2::after {
|
|
30
|
+
content: "";
|
|
31
|
+
flex: 1 1 100%;
|
|
32
|
+
height: 1px;
|
|
33
|
+
margin-top: 2px;
|
|
34
|
+
background-color: var(--ds-grey-200, #ededed);
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
.title2 {
|
|
38
|
+
margin-top: 12px;
|
|
39
|
+
}
|
|
40
|
+
|
|
17
41
|
.label {
|
|
18
42
|
font-size: 12px;
|
|
19
43
|
user-select: none;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ski-passes.d.ts","sourceRoot":"","sources":["../../../../../src/future/components/msem-preset-editor/editors/ski-passes.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAW/B,KAAK,KAAK,GAAG;IACX,IAAI,EAAE,IAAI,GAAG,IAAI,CAAC;IAClB,eAAe,EAAE,MAAM,CAAC;IACxB,IAAI,EAAE;QAAE,IAAI,EAAE,MAAM,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AM,EAAE,GAAG,CAAC,GAAG,IAAI,KAAK,IAAI,CAAC;IACxD,UAAU,EAAE,MAAM,IAAI,CAAC;IACvB,WAAW,EAAE,MAAM,CAAC;CACrB,CAAC;AAsEF,MAAM,CAAC,OAAO,UAAU,SAAS,CAAC,EAChC,eAAe,EACf,MAAM,EACN,SAAS,EACT,IAAI,EACJ,mBAAmB,EACnB,QAAQ,EACR,UAAU,EACV,WAAW,GACZ,EAAE,KAAK,2CAgXP"}
|
|
@@ -32,22 +32,9 @@ const ACTIVITIES_LABELS = {
|
|
|
32
32
|
luge: "Luge sur rails",
|
|
33
33
|
};
|
|
34
34
|
const HIDE_OPTIONS = [
|
|
35
|
-
{
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
},
|
|
39
|
-
{
|
|
40
|
-
label: "Sélecteur d'hébergement",
|
|
41
|
-
value: "lodging",
|
|
42
|
-
},
|
|
43
|
-
{
|
|
44
|
-
label: "Filtres",
|
|
45
|
-
value: "filters",
|
|
46
|
-
},
|
|
47
|
-
{
|
|
48
|
-
label: "Catalogue",
|
|
49
|
-
value: "catalog",
|
|
50
|
-
},
|
|
35
|
+
{ label: "Sélecteur d'hébergement", value: "lodging" },
|
|
36
|
+
{ label: "Filtres", value: "filters" },
|
|
37
|
+
{ label: "Catalogue", value: "catalog" },
|
|
51
38
|
];
|
|
52
39
|
export default function SkiPasses({ msemServicesUrl, preset, setPreset, stay, setShowPresetDialog, onChange, testPreset, urlOverride, }) {
|
|
53
40
|
const savedPreset = React.useRef(preset);
|