@roomstay/core 0.1.76-2 → 0.1.76-4
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/components/DateRangePicker/DateRangePicker.d.ts +16 -0
- package/dist/components/DateRangePicker/DateRangePicker.type.d.ts +16 -0
- package/dist/components/DateRangePicker/DateRangePickerContext.d.ts +16 -0
- package/dist/components/DateRangePicker/DateRangePickerDay.d.ts +22 -0
- package/dist/components/DateRangePicker/DateRangePickerDays.d.ts +7 -0
- package/dist/components/DateRangePicker/DateRangePickerMonth.d.ts +9 -0
- package/dist/components/DateRangePicker/FloatingDateRangePicker.d.ts +26 -0
- package/dist/components/DateRangePicker/index.d.ts +3 -0
- package/dist/components/Icon/Icon.d.ts +19 -0
- package/dist/components/Icon/index.d.ts +1 -0
- package/dist/components/Overlay/Overlay.d.ts +21 -0
- package/dist/components/Overlay/index.d.ts +1 -0
- package/dist/components/RoomstayPortal/RoomstayPortal.d.ts +8 -0
- package/dist/components/RoomstayPortal/index.d.ts +1 -0
- package/dist/components/Text/Text.d.ts +18 -0
- package/dist/components/Text/Text.type.d.ts +14 -0
- package/dist/components/Text/index.d.ts +2 -0
- package/dist/components/animations/AutoAutoHeight.d.ts +9 -0
- package/dist/components/animations/Fade.d.ts +13 -0
- package/dist/components/animations/index.d.ts +1 -0
- package/dist/components/index.d.ts +6 -0
- package/dist/hooks/BodyClickHook.d.ts +8 -0
- package/dist/index.node.d.ts +2 -0
- package/dist/index.web.d.ts +3 -0
- package/dist/node.js +1 -1
- package/dist/node.js.map +1 -0
- package/dist/roomstay-core-0.1.26.tgz +0 -0
- package/dist/stories/DateRangePicker.stories.d.ts +8 -0
- package/dist/stories/FloatingDateRangePicker.stories.d.ts +5 -0
- package/dist/types/Addon/Addon.d.ts +38 -0
- package/dist/types/Api/ReservationsDTO.d.ts +102 -0
- package/dist/types/Api/RoomNightRateDTO.d.ts +7 -0
- package/dist/types/Availability/Availability.types.d.ts +3 -0
- package/dist/types/GiftCards/GiftCard.types.d.ts +1 -0
- package/dist/types/Hotel/EHotelAddressRequirement.enum.d.ts +5 -0
- package/dist/types/Hotel/IHotel.enum.d.ts +32 -0
- package/dist/types/Hotel/IHotel.type.d.ts +275 -0
- package/dist/types/Hotel/IntegrationConfigs.type.d.ts +76 -0
- package/dist/types/Hotel/InternalMemberSignInModal.type.d.ts +13 -0
- package/dist/types/Hotel/InternalMemberSignInModal.types.d.ts +13 -0
- package/dist/types/PromoCode/PromoCodeStayDateRangeType.enum.d.ts +11 -0
- package/dist/types/RMS/RMSBookingSource.type.d.ts +7 -0
- package/dist/types/Room/HotelRoom.type.d.ts +24 -0
- package/dist/types/Room/SynxisRoom.type.d.ts +35 -0
- package/dist/types/index.d.ts +7 -4
- package/dist/utils/CalendarHelper.d.ts +16 -0
- package/dist/utils/color.d.ts +17 -0
- package/dist/utils/index.node.d.ts +2 -0
- package/dist/utils/index.web.d.ts +4 -0
- package/dist/web.js +1 -1
- package/dist/web.js.map +1 -0
- package/package.json +1 -1
- package/dist/node.js.LICENSE.txt +0 -7
- package/dist/types/Analytics/IAnalyticsEvent.type.d.ts +0 -35
- package/dist/types/Analytics/IAnalyticsSession.type.d.ts +0 -11
- package/dist/types/Analytics/IBigQueryResponse.type.d.ts +0 -24
- package/dist/types/Booking/ISplitPayment.type.d.ts +0 -89
- package/dist/types/Fees/IFeeOptions.type.d.ts +0 -6
- package/dist/utils/feeOptionRules.d.ts +0 -0
- package/dist/web.js.LICENSE.txt +0 -7
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import dayjs from "dayjs";
|
|
2
|
+
import React from "react";
|
|
3
|
+
import { EDateRangePickerTheme, ShowYearOnCalendarProps } from "./DateRangePicker.type";
|
|
4
|
+
export interface DatePickerProps extends ShowYearOnCalendarProps {
|
|
5
|
+
selectedStartDate?: dayjs.Dayjs | null;
|
|
6
|
+
selectedEndDate?: dayjs.Dayjs | null;
|
|
7
|
+
showArrows?: boolean;
|
|
8
|
+
small?: boolean;
|
|
9
|
+
onStartDateChanged?: (date: dayjs.Dayjs) => void;
|
|
10
|
+
onEndDateChanged?: (date: dayjs.Dayjs) => void;
|
|
11
|
+
fixedStartDate?: boolean;
|
|
12
|
+
showMultipleMonths?: boolean;
|
|
13
|
+
theme?: EDateRangePickerTheme | string;
|
|
14
|
+
}
|
|
15
|
+
export default function DateRangePicker(props: DatePickerProps): React.JSX.Element;
|
|
16
|
+
export { DateRangePicker };
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export declare enum EDateRangePickerTheme {
|
|
2
|
+
Default = "default",
|
|
3
|
+
Specific = "specific"
|
|
4
|
+
}
|
|
5
|
+
export declare enum EDateRangePickingState {
|
|
6
|
+
StartDate = 1,
|
|
7
|
+
EndDate = 2
|
|
8
|
+
}
|
|
9
|
+
export interface ShowYearOnCalendarProps {
|
|
10
|
+
showYearOnCalendar?: boolean;
|
|
11
|
+
yearDisplayOption?: string;
|
|
12
|
+
}
|
|
13
|
+
export declare enum WeekdayStartsOn {
|
|
14
|
+
Monday = "monday",
|
|
15
|
+
Sunday = "sunday"
|
|
16
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { Dayjs } from "dayjs";
|
|
2
|
+
import React from "react";
|
|
3
|
+
import { EDateRangePickerTheme } from "./DateRangePicker.type";
|
|
4
|
+
export interface DateRangePickerContextProps {
|
|
5
|
+
todayInUnix: number;
|
|
6
|
+
today: Dayjs | null;
|
|
7
|
+
startDate: Dayjs | null;
|
|
8
|
+
endDate: Dayjs | null;
|
|
9
|
+
hoveredMonth: Dayjs | null;
|
|
10
|
+
currentMonth: Dayjs | null;
|
|
11
|
+
onHoverOver: (date: Dayjs) => void;
|
|
12
|
+
onDayClicked: (date: Dayjs) => void;
|
|
13
|
+
fixedStartDate: boolean;
|
|
14
|
+
theme?: EDateRangePickerTheme | string;
|
|
15
|
+
}
|
|
16
|
+
export declare const DateRangePickerContext: React.Context<DateRangePickerContextProps>;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import * as dayjs from "dayjs";
|
|
2
|
+
import React from "react";
|
|
3
|
+
import { Color } from "../../utils/color";
|
|
4
|
+
interface DatePickerDayProps {
|
|
5
|
+
text: any;
|
|
6
|
+
day?: dayjs.Dayjs | any;
|
|
7
|
+
unix: number;
|
|
8
|
+
price?: Promise<number>;
|
|
9
|
+
statuses?: DatePickerDayStatus[];
|
|
10
|
+
selectable?: boolean;
|
|
11
|
+
onClick?: (day: string) => void;
|
|
12
|
+
onHover?: (day: string, status: boolean) => void;
|
|
13
|
+
color?: Color;
|
|
14
|
+
}
|
|
15
|
+
export declare enum DatePickerDayStatus {
|
|
16
|
+
Inactive = 0,
|
|
17
|
+
Selecting = "--selecting",
|
|
18
|
+
Loading = "--loading",
|
|
19
|
+
Selected = "--selected"
|
|
20
|
+
}
|
|
21
|
+
export default function DateRangePickerDay(props: DatePickerDayProps): React.JSX.Element;
|
|
22
|
+
export {};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import * as dayjs from "dayjs";
|
|
2
|
+
import React from "react";
|
|
3
|
+
import { ShowYearOnCalendarProps } from "./DateRangePicker.type";
|
|
4
|
+
interface DatePickerMonthProps extends ShowYearOnCalendarProps {
|
|
5
|
+
showingMonth: dayjs.Dayjs;
|
|
6
|
+
small?: boolean;
|
|
7
|
+
}
|
|
8
|
+
export default function DateRangePickerMonth(props: DatePickerMonthProps): React.JSX.Element;
|
|
9
|
+
export {};
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { Placement } from "@popperjs/core";
|
|
2
|
+
import * as dayjs from "dayjs";
|
|
3
|
+
import React from "react";
|
|
4
|
+
import { DatePickerProps } from "./DateRangePicker";
|
|
5
|
+
export interface FloatingDateRangePickerProps extends Omit<DatePickerProps, "selectedStartDate" | "selectedEndDate" | "onStartDateChanged" | "onEndDateChanged"> {
|
|
6
|
+
children?: React.ReactNode;
|
|
7
|
+
startDate?: dayjs.Dayjs | null;
|
|
8
|
+
endDate?: dayjs.Dayjs | null;
|
|
9
|
+
overlayOffset?: [number, number];
|
|
10
|
+
fixedStartDate?: boolean;
|
|
11
|
+
container?: HTMLElement;
|
|
12
|
+
selectedDateChanged?: (startDate: dayjs.Dayjs, endDate: dayjs.Dayjs) => void;
|
|
13
|
+
className?: string;
|
|
14
|
+
overlay?: {
|
|
15
|
+
placement?: Placement;
|
|
16
|
+
fallbackPlacements?: Placement;
|
|
17
|
+
};
|
|
18
|
+
}
|
|
19
|
+
export interface FloatingDateRangePickerHandle {
|
|
20
|
+
closePicker: () => void;
|
|
21
|
+
openPicker: () => void;
|
|
22
|
+
toggle: () => void;
|
|
23
|
+
}
|
|
24
|
+
declare const FloatingDateRangePicker: React.ForwardRefExoticComponent<FloatingDateRangePickerProps & React.RefAttributes<FloatingDateRangePickerHandle>>;
|
|
25
|
+
export default FloatingDateRangePicker;
|
|
26
|
+
export { FloatingDateRangePicker };
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { Color } from '../../utils/color';
|
|
3
|
+
export declare enum IconType {
|
|
4
|
+
ArrowLeft2 = "Arrow-2-Left",
|
|
5
|
+
ArrowRight2 = "Arrow-2-Right"
|
|
6
|
+
}
|
|
7
|
+
export interface IconProps {
|
|
8
|
+
icon: IconType;
|
|
9
|
+
size?: string;
|
|
10
|
+
name?: string;
|
|
11
|
+
color?: Color;
|
|
12
|
+
useColorAsBackground?: boolean;
|
|
13
|
+
backgroundColor?: Color;
|
|
14
|
+
noPadding?: boolean;
|
|
15
|
+
onClick?: () => void;
|
|
16
|
+
borderRadius?: 'oval' | 'round';
|
|
17
|
+
className?: string;
|
|
18
|
+
}
|
|
19
|
+
export default function Icon(props: IconProps): React.JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './Icon';
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { Placement, PositioningStrategy } from "@popperjs/core";
|
|
2
|
+
import React, { LegacyRef, ReactNode } from "react";
|
|
3
|
+
export type OverlayProps = {
|
|
4
|
+
children: ReactNode | ReactNode[];
|
|
5
|
+
open: boolean;
|
|
6
|
+
usePortal?: boolean;
|
|
7
|
+
container?: HTMLElement | null;
|
|
8
|
+
followElement?: Element | null;
|
|
9
|
+
className?: string;
|
|
10
|
+
containerClassName?: string;
|
|
11
|
+
hideStyles?: boolean;
|
|
12
|
+
placement?: Placement;
|
|
13
|
+
fallbackPlacements?: Placement;
|
|
14
|
+
strategy?: PositioningStrategy;
|
|
15
|
+
onClose?: (e: Event) => void;
|
|
16
|
+
offset?: [number, number];
|
|
17
|
+
overlayRef?: LegacyRef<HTMLDivElement>;
|
|
18
|
+
preventScroll?: boolean;
|
|
19
|
+
isAboveNav?: boolean;
|
|
20
|
+
};
|
|
21
|
+
export declare const Overlay: (props: OverlayProps) => React.JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './Overlay';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./RoomstayPortal";
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import React, { PropsWithChildren } from "react";
|
|
2
|
+
import { TextAlign, TextTransform, TextType } from "./Text.type";
|
|
3
|
+
import { Color } from "../../utils/color";
|
|
4
|
+
export interface TextProps extends PropsWithChildren<any> {
|
|
5
|
+
[x: string]: React.ReactNode;
|
|
6
|
+
type?: TextType;
|
|
7
|
+
color?: Color;
|
|
8
|
+
align?: TextAlign;
|
|
9
|
+
transforms?: TextTransform[];
|
|
10
|
+
className?: string;
|
|
11
|
+
inline?: boolean;
|
|
12
|
+
bold?: boolean;
|
|
13
|
+
preformatted?: boolean;
|
|
14
|
+
style?: React.CSSProperties;
|
|
15
|
+
lineThrough?: boolean;
|
|
16
|
+
}
|
|
17
|
+
export declare const Text: React.ForwardRefExoticComponent<Pick<TextProps, keyof TextProps> & React.RefAttributes<HTMLParagraphElement>>;
|
|
18
|
+
export default Text;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export declare enum TextAlign {
|
|
2
|
+
Center = "u-align-center",
|
|
3
|
+
Right = "u-align-right",
|
|
4
|
+
Left = "u-align-left"
|
|
5
|
+
}
|
|
6
|
+
export declare enum TextType {
|
|
7
|
+
Body = "body",
|
|
8
|
+
Small = "small",
|
|
9
|
+
Caption = "caption",
|
|
10
|
+
Label = "label"
|
|
11
|
+
}
|
|
12
|
+
export declare enum TextTransform {
|
|
13
|
+
Uppercase = "u-uppercase"
|
|
14
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
interface AutoAutoHeightProps {
|
|
3
|
+
children: React.ReactNode;
|
|
4
|
+
open: boolean;
|
|
5
|
+
startOpen?: boolean;
|
|
6
|
+
onComponentHidden?: () => void;
|
|
7
|
+
}
|
|
8
|
+
export default function AutoAutoHeight(props: AutoAutoHeightProps): React.JSX.Element;
|
|
9
|
+
export {};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
interface FadeProps {
|
|
3
|
+
children?: React.ReactElement;
|
|
4
|
+
open: boolean;
|
|
5
|
+
onEnter?: () => void;
|
|
6
|
+
onExited?: () => void;
|
|
7
|
+
/**
|
|
8
|
+
* Callback on complete animation of exit action
|
|
9
|
+
*/
|
|
10
|
+
onExitCompletely?: () => void;
|
|
11
|
+
}
|
|
12
|
+
declare const FadeAnimation: React.ForwardRefExoticComponent<FadeProps & React.RefAttributes<HTMLDivElement>>;
|
|
13
|
+
export default FadeAnimation;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./Fade";
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export declare const useBodyClick: () => {
|
|
2
|
+
onBodyClick: (event: EventListener, target?: HTMLElement | Document | null) => {
|
|
3
|
+
remove: () => void;
|
|
4
|
+
};
|
|
5
|
+
onBodyClickExcept: (event: EventListener, ignore: HTMLElement, target?: HTMLElement | Document | null) => {
|
|
6
|
+
remove: () => void;
|
|
7
|
+
};
|
|
8
|
+
};
|