ublo-lib 1.39.28 → 1.39.30
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/common/components/date-picker/utils.d.ts.map +1 -1
- package/es/common/components/date-picker/utils.js +5 -1
- package/es/esf/components/espace-prive/admin/client-links.d.ts.map +1 -1
- package/es/esf/components/espace-prive/admin/client-links.js +3 -3
- package/es/esf/components/espace-prive/services/links.d.ts +1 -1
- package/es/esf/components/espace-prive/services/links.d.ts.map +1 -1
- package/es/esf/components/espace-prive/services/links.js +2 -2
- package/es/future/components/msem/index.d.ts +1 -2
- package/es/future/components/msem/index.d.ts.map +1 -1
- package/es/future/components/msem/index.js +1 -2
- package/package.json +1 -1
- package/es/future/components/msem/lodging-new.d.ts +0 -25
- package/es/future/components/msem/lodging-new.d.ts.map +0 -1
- package/es/future/components/msem/lodging-new.js +0 -19
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../../src/common/components/date-picker/utils.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../../src/common/components/date-picker/utils.js"],"names":[],"mappings":"AA4GA,qDAIC;AAmDD,sEAQC;AAzKM,yDAAmE;AAEnE,+EAcN;AAEM,wEAON;AAEM,kDAMN;AAEM,8CAMN;AAEM,2CAKN;AAEM,iEAUN;AAEM,+DAgBN;AAEM,2CAMN;AAEM,uDAON;AAEM,sDAON;AAQM,qEAQN;AAEM,gDAQN;AAEM,yEAaN;AAEM;;;EAKN;AAEM;;;EAKN"}
|
|
@@ -11,7 +11,11 @@ export const getMonthDays = (month = Data.THIS_MONTH, year = Data.THIS_YEAR) =>
|
|
|
11
11
|
? 30
|
|
12
12
|
: 31;
|
|
13
13
|
};
|
|
14
|
-
export const getMonthFirstDay = (month = Data.THIS_MONTH, year = Data.THIS_YEAR) =>
|
|
14
|
+
export const getMonthFirstDay = (month = Data.THIS_MONTH, year = Data.THIS_YEAR) => {
|
|
15
|
+
const date = new Date(`${year}-${zeroPad(month, 2)}-01`).getDay();
|
|
16
|
+
date.setHours(0, 0, 0, 0);
|
|
17
|
+
return date;
|
|
18
|
+
};
|
|
15
19
|
export const weekToLongDate = (date) => {
|
|
16
20
|
const _date = new Date(date);
|
|
17
21
|
const dd = zeroPad(_date.getDate(), 2);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"client-links.d.ts","sourceRoot":"","sources":["../../../../../src/esf/components/espace-prive/admin/client-links.js"],"names":[],"mappings":"AAYA,+
|
|
1
|
+
{"version":3,"file":"client-links.d.ts","sourceRoot":"","sources":["../../../../../src/esf/components/espace-prive/admin/client-links.js"],"names":[],"mappings":"AAYA,+EAmEC"}
|
|
@@ -13,14 +13,14 @@ import styles from "./client-links.module.css";
|
|
|
13
13
|
export default function ClientLinks() {
|
|
14
14
|
const { path, config, lang } = useUbloContext();
|
|
15
15
|
const { domains } = config;
|
|
16
|
-
const { apiURL, partnerID, cmsToken } = useContext();
|
|
16
|
+
const { apiURL, partnerID, site, cmsToken } = useContext();
|
|
17
17
|
const relativeURL = `https://${domains.fr}${path}`;
|
|
18
18
|
const snackbar = useSnackbar();
|
|
19
19
|
const [links, setLinks] = React.useState([]);
|
|
20
20
|
const getExistingLinks = React.useCallback(async () => {
|
|
21
|
-
const existingLinks = await Services.getLinks(apiURL, partnerID, cmsToken);
|
|
21
|
+
const existingLinks = await Services.getLinks(site, apiURL, partnerID, cmsToken);
|
|
22
22
|
setLinks(existingLinks);
|
|
23
|
-
}, [apiURL, partnerID, cmsToken]);
|
|
23
|
+
}, [site, apiURL, partnerID, cmsToken]);
|
|
24
24
|
React.useEffect(() => {
|
|
25
25
|
getExistingLinks();
|
|
26
26
|
}, [getExistingLinks]);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export function getLinks(apiURL: any, partnerID: any, cmsToken: any): Promise<any>;
|
|
1
|
+
export function getLinks(site: any, apiURL: any, partnerID: any, cmsToken: any): Promise<any>;
|
|
2
2
|
export function createLink(apiURL: any, email: any, partnerID: any, site: any, cmsToken: any): Promise<any>;
|
|
3
3
|
export function deleteLink(apiURL: any, id: any, cmsToken: any): Promise<any>;
|
|
4
4
|
export function setLinkUsed(apiURL: any, id: any): Promise<any>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"links.d.ts","sourceRoot":"","sources":["../../../../../src/esf/components/espace-prive/services/links.js"],"names":[],"mappings":"AAAO,
|
|
1
|
+
{"version":3,"file":"links.d.ts","sourceRoot":"","sources":["../../../../../src/esf/components/espace-prive/services/links.js"],"names":[],"mappings":"AAAO,8FASN;AAEM,4GAeN;AAEM,8EAaN;AAEM,gEAIN"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export const getLinks = async (apiURL, partnerID, cmsToken) => {
|
|
2
|
-
const url = `${apiURL}/links?partnerID=${partnerID}`;
|
|
1
|
+
export const getLinks = async (site, apiURL, partnerID, cmsToken) => {
|
|
2
|
+
const url = `${apiURL}/links?site=${site}&partnerID=${partnerID}`;
|
|
3
3
|
const res = await fetch(url, {
|
|
4
4
|
headers: {
|
|
5
5
|
Authorization: cmsToken,
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { Script } from "./script";
|
|
2
2
|
import Lodging from "./lodging";
|
|
3
|
-
import LodgingNew from "./lodging-new";
|
|
4
3
|
import SkiRental from "./ski-rental";
|
|
5
4
|
import SkiPass from "./ski-pass";
|
|
6
5
|
import LiftJb from "./lift-jb";
|
|
@@ -8,5 +7,5 @@ import Esf from "./esf";
|
|
|
8
7
|
import Tunnel from "./tunnel";
|
|
9
8
|
import Account from "./account";
|
|
10
9
|
import { loadWidget } from "./utils";
|
|
11
|
-
export { Script, loadWidget, Lodging,
|
|
10
|
+
export { Script, loadWidget, Lodging, SkiRental, SkiPass, LiftJb, Esf, Tunnel, Account, };
|
|
12
11
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/future/components/msem/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAClC,OAAO,OAAO,MAAM,WAAW,CAAC;AAChC,OAAO,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/future/components/msem/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAClC,OAAO,OAAO,MAAM,WAAW,CAAC;AAChC,OAAO,SAAS,MAAM,cAAc,CAAC;AACrC,OAAO,OAAO,MAAM,YAAY,CAAC;AACjC,OAAO,MAAM,MAAM,WAAW,CAAC;AAC/B,OAAO,GAAG,MAAM,OAAO,CAAC;AACxB,OAAO,MAAM,MAAM,UAAU,CAAC;AAC9B,OAAO,OAAO,MAAM,WAAW,CAAC;AAChC,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAErC,OAAO,EACL,MAAM,EACN,UAAU,EACV,OAAO,EACP,SAAS,EACT,OAAO,EACP,MAAM,EACN,GAAG,EACH,MAAM,EACN,OAAO,GACR,CAAC"}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { Script } from "./script";
|
|
2
2
|
import Lodging from "./lodging";
|
|
3
|
-
import LodgingNew from "./lodging-new";
|
|
4
3
|
import SkiRental from "./ski-rental";
|
|
5
4
|
import SkiPass from "./ski-pass";
|
|
6
5
|
import LiftJb from "./lift-jb";
|
|
@@ -8,4 +7,4 @@ import Esf from "./esf";
|
|
|
8
7
|
import Tunnel from "./tunnel";
|
|
9
8
|
import Account from "./account";
|
|
10
9
|
import { loadWidget } from "./utils";
|
|
11
|
-
export { Script, loadWidget, Lodging,
|
|
10
|
+
export { Script, loadWidget, Lodging, SkiRental, SkiPass, LiftJb, Esf, Tunnel, Account, };
|
package/package.json
CHANGED
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
|
-
import type { GlobalOptions, GlobalPresets } from "./types";
|
|
3
|
-
type Show = "stay" | "filters" | "lodgingListOffers" | "lodgingListMap" | "lodgingCarousel" | "lodgingDescription" | "lodgingMap" | "lodgingOffers" | "lodgingLanguages" | "lodgingOptions" | "lodgingCapacity" | "lodgingInfos";
|
|
4
|
-
type Options = GlobalOptions & {
|
|
5
|
-
cartUrl?: string;
|
|
6
|
-
cartChanged?: (cart: any) => void;
|
|
7
|
-
show?: Show;
|
|
8
|
-
};
|
|
9
|
-
type Presets = GlobalPresets & {
|
|
10
|
-
nbStars?: number;
|
|
11
|
-
nbRooms?: number[];
|
|
12
|
-
accomodation?: string;
|
|
13
|
-
options?: number[];
|
|
14
|
-
type?: "MEUBLE" | "RESIDENCE" | "RESIDENCE-CLUB" | "HOTEL" | "CAMPING" | "CHAMBRE_HOTE" | "VILLAGE_VACANCES";
|
|
15
|
-
meubleType?: string;
|
|
16
|
-
};
|
|
17
|
-
type Props = {
|
|
18
|
-
options?: Options;
|
|
19
|
-
presets?: Presets;
|
|
20
|
-
children?: React.ReactNode;
|
|
21
|
-
};
|
|
22
|
-
declare const _default: React.MemoExoticComponent<typeof LodgingNew>;
|
|
23
|
-
export default _default;
|
|
24
|
-
declare function LodgingNew({ options, presets, children }: Props): React.ReactNode;
|
|
25
|
-
//# sourceMappingURL=lodging-new.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"lodging-new.d.ts","sourceRoot":"","sources":["../../../../src/future/components/msem/lodging-new.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B,OAAO,KAAK,EAAE,aAAa,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAE5D,KAAK,IAAI,GACL,MAAM,GACN,SAAS,GACT,mBAAmB,GACnB,gBAAgB,GAChB,iBAAiB,GACjB,oBAAoB,GACpB,YAAY,GACZ,eAAe,GACf,kBAAkB,GAClB,gBAAgB,GAChB,iBAAiB,GACjB,cAAc,CAAC;AAEnB,KAAK,OAAO,GAAG,aAAa,GAAG;IAC7B,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,WAAW,CAAC,EAAE,CAAC,IAAI,EAAE,GAAG,KAAK,IAAI,CAAC;IAClC,IAAI,CAAC,EAAE,IAAI,CAAC;CACb,CAAC;AAEF,KAAK,OAAO,GAAG,aAAa,GAAG;IAC7B,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC;IACnB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC;IACnB,IAAI,CAAC,EACD,QAAQ,GACR,WAAW,GACX,gBAAgB,GAChB,OAAO,GACP,SAAS,GACT,cAAc,GACd,kBAAkB,CAAC;IACvB,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB,CAAC;AAEF,KAAK,KAAK,GAAG;IACX,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAC5B,CAAC;;AAEF,wBAAsC;AAEtC,iBAAS,UAAU,CAAC,EAAE,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,EAAE,KAAK,mBAiBxD"}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
|
-
import * as Utils from "./utils";
|
|
3
|
-
import * as Plausible from "../plausible";
|
|
4
|
-
export default React.memo(LodgingNew);
|
|
5
|
-
function LodgingNew({ options, presets, children }) {
|
|
6
|
-
React.useEffect(() => {
|
|
7
|
-
const lang = options?.lang === "fr" ? "fr" : "en";
|
|
8
|
-
const patchedOptions = {
|
|
9
|
-
...options,
|
|
10
|
-
lang,
|
|
11
|
-
analytics: (...args) => {
|
|
12
|
-
options?.analytics?.apply(null, args);
|
|
13
|
-
Plausible.callback.apply(null, args);
|
|
14
|
-
},
|
|
15
|
-
};
|
|
16
|
-
Utils.loadWidget("lodgingNew", patchedOptions, presets);
|
|
17
|
-
}, [options, presets]);
|
|
18
|
-
return children;
|
|
19
|
-
}
|