ublo-lib 1.39.29 → 1.39.31

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 +1 @@
1
- {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../../src/common/components/date-picker/utils.js"],"names":[],"mappings":"AAwGA,qDAIC;AAmDD,sEAQC;AArKM,yDAAmE;AAEnE,+EAcN;AAEM,wEAGkD;AAElD,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"}
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) => new Date(`${year}-${zeroPad(month, 2)}-01`).getDay();
14
+ export const getMonthFirstDay = (month = Data.THIS_MONTH, year = Data.THIS_YEAR) => {
15
+ const date = new Date(`${year}-${zeroPad(month, 2)}-01`);
16
+ date.setHours(0, 0, 0, 0);
17
+ return date.getDay();
18
+ };
15
19
  export const weekToLongDate = (date) => {
16
20
  const _date = new Date(date);
17
21
  const dd = zeroPad(_date.getDate(), 2);
@@ -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, LodgingNew, SkiRental, SkiPass, LiftJb, Esf, Tunnel, Account, };
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,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,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,UAAU,EACV,SAAS,EACT,OAAO,EACP,MAAM,EACN,GAAG,EACH,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,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, LodgingNew, SkiRental, SkiPass, LiftJb, Esf, Tunnel, Account, };
10
+ export { Script, loadWidget, Lodging, SkiRental, SkiPass, LiftJb, Esf, Tunnel, Account, };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ublo-lib",
3
- "version": "1.39.29",
3
+ "version": "1.39.31",
4
4
  "peerDependencies": {
5
5
  "dt-design-system": "^3.10.8",
6
6
  "leaflet": "^1.9.1",
@@ -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
- }