ublo-lib 1.35.2 → 1.35.3

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.
@@ -1,10 +1,11 @@
1
1
  import { Script } from "./script";
2
2
  import Lodging from "./lodging";
3
+ import LodgingNew from "./lodging-new";
3
4
  import SkiRental from "./ski-rental";
4
5
  import SkiPass from "./ski-pass";
5
6
  import LiftJb from "./lift-jb";
6
7
  import Tunnel from "./tunnel";
7
8
  import Account from "./account";
8
9
  import { loadWidget } from "./utils";
9
- export { Script, loadWidget, Lodging, SkiRental, SkiPass, LiftJb, Tunnel, Account, };
10
+ export { Script, loadWidget, Lodging, LodgingNew, SkiRental, SkiPass, LiftJb, Tunnel, Account, };
10
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,SAAS,MAAM,cAAc,CAAC;AACrC,OAAO,OAAO,MAAM,YAAY,CAAC;AACjC,OAAO,MAAM,MAAM,WAAW,CAAC;AAC/B,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,MAAM,EACN,OAAO,GACR,CAAC"}
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,UAAU,MAAM,eAAe,CAAC;AACvC,OAAO,SAAS,MAAM,cAAc,CAAC;AACrC,OAAO,OAAO,MAAM,YAAY,CAAC;AACjC,OAAO,MAAM,MAAM,WAAW,CAAC;AAC/B,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,UAAU,EACV,SAAS,EACT,OAAO,EACP,MAAM,EACN,MAAM,EACN,OAAO,GACR,CAAC"}
@@ -1,9 +1,10 @@
1
1
  import { Script } from "./script";
2
2
  import Lodging from "./lodging";
3
+ import LodgingNew from "./lodging-new";
3
4
  import SkiRental from "./ski-rental";
4
5
  import SkiPass from "./ski-pass";
5
6
  import LiftJb from "./lift-jb";
6
7
  import Tunnel from "./tunnel";
7
8
  import Account from "./account";
8
9
  import { loadWidget } from "./utils";
9
- export { Script, loadWidget, Lodging, SkiRental, SkiPass, LiftJb, Tunnel, Account, };
10
+ export { Script, loadWidget, Lodging, LodgingNew, SkiRental, SkiPass, LiftJb, Tunnel, Account, };
@@ -0,0 +1,25 @@
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
@@ -0,0 +1 @@
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"}
@@ -0,0 +1,19 @@
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
+ }
@@ -1,4 +1,4 @@
1
- type Widget = "tunnel" | "lodging" | "esf" | "skiRental" | "skiPass" | "liftJb" | "transfer" | "shuttle" | "excursion" | "otherProducts" | "genericLine" | "esfCustom" | "vakario" | "elloha" | "widgetPackage" | "customerAccount";
1
+ type Widget = "tunnel" | "lodging" | "lodgingNew" | "esf" | "skiRental" | "skiPass" | "liftJb" | "transfer" | "shuttle" | "excursion" | "otherProducts" | "genericLine" | "esfCustom" | "vakario" | "elloha" | "widgetPackage" | "customerAccount";
2
2
  export declare function loadWidget(widget: Widget, options?: {}, presets?: {}): void;
3
3
  export {};
4
4
  //# sourceMappingURL=utils.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../../src/future/components/msem/utils.ts"],"names":[],"mappings":"AAAA,KAAK,MAAM,GACP,QAAQ,GACR,SAAS,GACT,KAAK,GACL,WAAW,GACX,SAAS,GACT,QAAQ,GACR,UAAU,GACV,SAAS,GACT,WAAW,GACX,eAAe,GACf,aAAa,GACb,WAAW,GACX,SAAS,GACT,QAAQ,GACR,eAAe,GACf,iBAAiB,CAAC;AAEtB,wBAAgB,UAAU,CAAC,MAAM,EAAE,MAAM,EAAE,OAAO,KAAK,EAAE,OAAO,KAAK,QAgBpE"}
1
+ {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../../src/future/components/msem/utils.ts"],"names":[],"mappings":"AAAA,KAAK,MAAM,GACP,QAAQ,GACR,SAAS,GACT,YAAY,GACZ,KAAK,GACL,WAAW,GACX,SAAS,GACT,QAAQ,GACR,UAAU,GACV,SAAS,GACT,WAAW,GACX,eAAe,GACf,aAAa,GACb,WAAW,GACX,SAAS,GACT,QAAQ,GACR,eAAe,GACf,iBAAiB,CAAC;AAEtB,wBAAgB,UAAU,CAAC,MAAM,EAAE,MAAM,EAAE,OAAO,KAAK,EAAE,OAAO,KAAK,QAgBpE"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ublo-lib",
3
- "version": "1.35.2",
3
+ "version": "1.35.3",
4
4
  "peerDependencies": {
5
5
  "dt-design-system": "^3.8.5",
6
6
  "leaflet": "^1.9.1",