react-beauty-calendar 1.4.1 → 1.5.1
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/@types/booking.d.ts +1 -0
- package/dist/@types/calendar-instance.d.ts +13 -4
- package/dist/@types/index.d.ts +2 -2
- package/dist/@types/profile.d.ts +2 -0
- package/dist/@types/user.d.ts +3 -0
- package/dist/build/assets/main.css +1 -1
- package/dist/build/main.cjs.js +80 -39
- package/dist/build/main.es.js +15317 -13194
- package/dist/components/ui/Button.d.ts +1 -1
- package/dist/components/ui/Checkbox.d.ts +4 -0
- package/dist/constants/index.d.ts +3 -2
- package/dist/constants/resize-base-value.constant.d.ts +1 -0
- package/dist/constants/system-colors.constant.d.ts +39 -9
- package/dist/constants/user-colors-constants.d.ts +30 -0
- package/dist/context/date-and-time/DateAndTimeContext.d.ts +1 -1
- package/dist/context/emptySlotsStore/useEmptySlotStore.d.ts +3 -3
- package/dist/context/global/booking-info/booking-info.d.ts +0 -3
- package/dist/context/global/config/config-store.d.ts +4 -1
- package/dist/context/global/days-and-week/day-and-week-store.d.ts +8 -5
- package/dist/context/index.d.ts +4 -1
- package/dist/context/users-info/users-info-context.d.ts +2 -0
- package/dist/context/users-info/users-info-store.d.ts +15 -0
- package/dist/context/users-info/usersInfoProvider.d.ts +5 -0
- package/dist/core/Root.d.ts +1 -1
- package/dist/core/booking-card/BookingCardContent.d.ts +2 -2
- package/dist/core/booking-card/BookingCardOnResize.d.ts +3 -0
- package/dist/core/booking-card/CardContent.d.ts +3 -0
- package/dist/core/booking-card/inner-card-handle.d.ts +4 -0
- package/dist/core/booking-creation-dialog/BookingCreationDialog.d.ts +3 -0
- package/dist/core/booking-creation-dialog/BookingTabs.d.ts +4 -0
- package/dist/core/{header-calendar → booking-options}/SelectItem.d.ts +1 -1
- package/dist/core/calendar/CalendarHolder.d.ts +2 -1
- package/dist/core/calendar/HourWithActions.d.ts +2 -8
- package/dist/core/calendar/SlotRender.d.ts +3 -0
- package/dist/core/{slots → calendar}/Slots.d.ts +3 -1
- package/dist/core/card-slots/EmptySlot.d.ts +3 -0
- package/dist/core/card-slots/SlotTrigger.d.ts +1 -1
- package/dist/core/{slots → card-slots}/TimeInfo.d.ts +1 -2
- package/dist/core/slots/CardContentWithResize.d.ts +17 -0
- package/dist/core/table-view-type/BadgeCustom.d.ts +5 -0
- package/dist/core/table-view-type/Columns.d.ts +4 -0
- package/dist/core/table-view-type/TableViewType.d.ts +10 -1
- package/dist/hooks/index.d.ts +3 -1
- package/dist/hooks/useCalendarInstance.d.ts +1 -1
- package/dist/{core/slots → hooks}/useResizableBothSides.d.ts +2 -9
- package/dist/{core/slots → hooks}/useResizableCardHook.d.ts +1 -2
- package/dist/hooks/useUserInfoStore.d.ts +3 -0
- package/dist/mock/booking-mock.d.ts +2 -0
- package/dist/utils/buildEmptyTimeSlotKey.d.ts +2 -0
- package/dist/utils/date.utils.d.ts +3 -1
- package/dist/utils/forward.d.ts +8 -0
- package/dist/utils/hours.d.ts +1 -2
- package/dist/utils/index.d.ts +6 -2
- package/dist/utils/props.d.ts +47 -7
- package/dist/utils/string.utils.d.ts +1 -1
- package/package.json +1 -1
- package/dist/context/emptySlotsStore/emptySlotKey.d.ts +0 -3
- package/dist/core/booking-create/BookingCreate.d.ts +0 -17
- package/dist/core/calendar/ViewTypes.d.ts +0 -4
- package/dist/core/info/Info.d.ts +0 -7
- package/dist/core/slots/CardContent.d.ts +0 -3
- package/dist/core/slots/EmptySlot.d.ts +0 -3
- package/dist/core/slots/EventsTab.d.ts +0 -12
- package/dist/core/slots/SlotRender.d.ts +0 -14
- package/dist/core/slots/innerCardHandle/inner-card-handle.d.ts +0 -5
- /package/dist/core/{favorite-booking → booking-options}/FavoriteBooking.d.ts +0 -0
- /package/dist/core/{header-calendar → calendar}/DaysOfWeek.d.ts +0 -0
- /package/dist/core/{slots → card-slots}/CardBlockContent.d.ts +0 -0
- /package/dist/core/{slots → card-slots}/actualTimeIndicator/ActualTimeIndicator.d.ts +0 -0
- /package/dist/core/{slots → card-slots}/actualTimeIndicator/FirstDaySlot.d.ts +0 -0
- /package/dist/core/{slots → card-slots}/actualTimeIndicator/position-based-on-seconds.d.ts +0 -0
- /package/dist/core/{shortcut-commands → header-calendar}/ShortcutCommands.d.ts +0 -0
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { VariantProps } from 'class-variance-authority';
|
|
2
2
|
declare const buttonVariants: (props?: ({
|
|
3
3
|
variant?: "default" | "link" | "destructive" | "outline" | "secondary" | "ghost" | null | undefined;
|
|
4
|
-
size?: "default" | "
|
|
4
|
+
size?: "default" | "sm" | "lg" | "icon" | null | undefined;
|
|
5
5
|
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
6
6
|
declare function Button({ className, variant, size, asChild, ...props }: React.ComponentProps<"button"> & VariantProps<typeof buttonVariants> & {
|
|
7
7
|
asChild?: boolean;
|
|
@@ -4,6 +4,7 @@ import { DAY_TIME_STARTER, INITIAL_START_TIME } from './day-time-starter.constan
|
|
|
4
4
|
import { MONTH } from './month.constant';
|
|
5
5
|
import { PAYMENT_STATUS, PAYMENT_TYPE } from './payment.constant';
|
|
6
6
|
import { SIDE_OPTIONS } from './side-options.constant';
|
|
7
|
-
import {
|
|
7
|
+
import { SYSTEM_COLORS_THEME_1 } from './system-colors.constant';
|
|
8
8
|
import { URL_PARAM } from './url-param.constant';
|
|
9
|
-
|
|
9
|
+
import { BASE_VALUE } from './resize-base-value.constant';
|
|
10
|
+
export { BOOKING_VIEW_TYPE, MONTH, PAYMENT_TYPE, PAYMENT_STATUS, SIDE_OPTIONS, SYSTEM_COLORS_THEME_1, URL_PARAM, DAY_TIME_STARTER, INITIAL_SIZE, MIN_DIFF_TIME_THRESHOLD, INITIAL_START_TIME, BASE_VALUE };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const BASE_VALUE: number;
|
|
@@ -1,10 +1,40 @@
|
|
|
1
|
-
export declare const
|
|
2
|
-
readonly
|
|
3
|
-
readonly
|
|
4
|
-
readonly
|
|
5
|
-
readonly
|
|
6
|
-
readonly
|
|
7
|
-
readonly
|
|
8
|
-
readonly
|
|
9
|
-
readonly
|
|
1
|
+
export declare const SYSTEM_COLORS_THEME_1: {
|
|
2
|
+
readonly "#3b82f6": "#3b82f6";
|
|
3
|
+
readonly "#059669": "#059669";
|
|
4
|
+
readonly "#dc2626": "#dc2626";
|
|
5
|
+
readonly "#7c3aed": "#7c3aed";
|
|
6
|
+
readonly "#ea580c": "#ea580c";
|
|
7
|
+
readonly "#0891b2": "#0891b2";
|
|
8
|
+
readonly "#be185d": "#be185d";
|
|
9
|
+
readonly "#374151": "#374151";
|
|
10
|
+
};
|
|
11
|
+
export declare const SYSTEM_COLORS_THEME_2: {
|
|
12
|
+
readonly "#1e40af": "#1e40af";
|
|
13
|
+
readonly "#166534": "#166534";
|
|
14
|
+
readonly "#b91c1c": "#b91c1c";
|
|
15
|
+
readonly "#6b21a8": "#6b21a8";
|
|
16
|
+
readonly "#c2410c": "#c2410c";
|
|
17
|
+
readonly "#0e7490": "#0e7490";
|
|
18
|
+
readonly "#be123c": "#be123c";
|
|
19
|
+
readonly "#1f2937": "#1f2937";
|
|
20
|
+
};
|
|
21
|
+
export declare const SYSTEM_COLORS_THEME_3: {
|
|
22
|
+
readonly "#2563eb": "#2563eb";
|
|
23
|
+
readonly "#16a34a": "#16a34a";
|
|
24
|
+
readonly "#dc2626": "#dc2626";
|
|
25
|
+
readonly "#9333ea": "#9333ea";
|
|
26
|
+
readonly "#ea580c": "#ea580c";
|
|
27
|
+
readonly "#0d9488": "#0d9488";
|
|
28
|
+
readonly "#e11d48": "#e11d48";
|
|
29
|
+
readonly "#4b5563": "#4b5563";
|
|
30
|
+
};
|
|
31
|
+
export declare const SYSTEM_COLORS_THEME_4: {
|
|
32
|
+
readonly "#1d4ed8": "#1d4ed8";
|
|
33
|
+
readonly "#047857": "#047857";
|
|
34
|
+
readonly "#b91c1c": "#b91c1c";
|
|
35
|
+
readonly "#7c2d12": "#7c2d12";
|
|
36
|
+
readonly "#7c3aed": "#7c3aed";
|
|
37
|
+
readonly "#0369a1": "#0369a1";
|
|
38
|
+
readonly "#be185d": "#be185d";
|
|
39
|
+
readonly "#374151": "#374151";
|
|
10
40
|
};
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
export declare const USER_COLORS_THEME_1: {
|
|
2
|
+
readonly "#3b82f6": "#3b82f6";
|
|
3
|
+
readonly "#10b981": "#10b981";
|
|
4
|
+
readonly "#f59e0b": "#f59e0b";
|
|
5
|
+
readonly "#ef4444": "#ef4444";
|
|
6
|
+
readonly "#8b5cf6": "#8b5cf6";
|
|
7
|
+
readonly "#06b6d4": "#06b6d4";
|
|
8
|
+
readonly "#f97316": "#f97316";
|
|
9
|
+
readonly "#84cc16": "#84cc16";
|
|
10
|
+
};
|
|
11
|
+
export declare const USER_COLORS_THEME_2: {
|
|
12
|
+
readonly "#4f46e5": "#4f46e5";
|
|
13
|
+
readonly "#059669": "#059669";
|
|
14
|
+
readonly "#dc2626": "#dc2626";
|
|
15
|
+
readonly "#7c3aed": "#7c3aed";
|
|
16
|
+
readonly "#0891b2": "#0891b2";
|
|
17
|
+
readonly "#ea580c": "#ea580c";
|
|
18
|
+
readonly "#65a30d": "#65a30d";
|
|
19
|
+
readonly "#be185d": "#be185d";
|
|
20
|
+
};
|
|
21
|
+
export declare const USER_COLORS_THEME_3: {
|
|
22
|
+
readonly "#6366f1": "#6366f1";
|
|
23
|
+
readonly "#22c55e": "#22c55e";
|
|
24
|
+
readonly "#f43f5e": "#f43f5e";
|
|
25
|
+
readonly "#a855f7": "#a855f7";
|
|
26
|
+
readonly "#14b8a6": "#14b8a6";
|
|
27
|
+
readonly "#fb923c": "#fb923c";
|
|
28
|
+
readonly "#eab308": "#eab308";
|
|
29
|
+
readonly "#64748b": "#64748b";
|
|
30
|
+
};
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { SlotTriggerForwardRef } from '../../utils
|
|
2
|
-
import {
|
|
1
|
+
import { BlockTimeData, SlotTriggerForwardRef } from '../../utils';
|
|
2
|
+
import { OperationalHours } from '../global/days-and-week/day-and-week-store';
|
|
3
3
|
export type EmptySlotNodes = Map<string, SlotTriggerForwardRef>;
|
|
4
4
|
export interface EmptySlotStore {
|
|
5
5
|
emptySlotNodes: EmptySlotNodes;
|
|
6
6
|
selectedNode: string;
|
|
7
7
|
}
|
|
8
8
|
export interface EmptySlotState extends EmptySlotStore {
|
|
9
|
-
setEmptySlotNode: (node: SlotTriggerForwardRef, slotData: BlockTimeData) => void;
|
|
9
|
+
setEmptySlotNode: (node: SlotTriggerForwardRef, slotData: BlockTimeData, operationalHours: OperationalHours) => void;
|
|
10
10
|
setSelectedNode: (nodeKey: string) => void;
|
|
11
11
|
resetSelectedNode: () => void;
|
|
12
12
|
resetNodes: () => void;
|
|
@@ -1,13 +1,10 @@
|
|
|
1
1
|
import { StateCreator } from 'zustand';
|
|
2
|
-
import { User } from '../../../@types';
|
|
3
2
|
import { Booking, BookingBulkData, BookingDateAndTime, BookingViewType } from '../../../@types/booking';
|
|
4
3
|
export interface BookingInfoProps {
|
|
5
|
-
users: User[];
|
|
6
4
|
bookingViewType: BookingViewType;
|
|
7
5
|
bookingBulkData: BookingBulkData;
|
|
8
6
|
}
|
|
9
7
|
export interface BookingInfoState extends BookingInfoProps {
|
|
10
|
-
updateUsers: (users: User[]) => void;
|
|
11
8
|
setBookingViewType: (bookingType: BookingViewType) => void;
|
|
12
9
|
setBookingBulkData: (bookingBulkData: BookingBulkData) => void;
|
|
13
10
|
updatingBookingBulkData: (booking: Booking, slotDay: number) => void;
|
|
@@ -1,4 +1,7 @@
|
|
|
1
|
-
|
|
1
|
+
import { SYSTEM_COLORS_THEME_1 } from '../../../constants';
|
|
2
|
+
import { USER_COLORS_THEME_3 } from '../../../constants/user-colors-constants';
|
|
3
|
+
export type SystemColor = keyof typeof SYSTEM_COLORS_THEME_1;
|
|
4
|
+
export type UserColor = keyof typeof USER_COLORS_THEME_3;
|
|
2
5
|
export declare const initialConfigState: ConfigStoreProps;
|
|
3
6
|
export interface ConfigStoreProps {
|
|
4
7
|
systemColor?: SystemColor;
|
|
@@ -1,6 +1,4 @@
|
|
|
1
1
|
import { StateCreator } from 'zustand';
|
|
2
|
-
import { HourWithActionsRef } from '../../../core/calendar/HourWithActions';
|
|
3
|
-
import { Times } from '../../../utils/hours';
|
|
4
2
|
export declare const START_TIME = 1;
|
|
5
3
|
export declare const END_24_HOUR_FORMAT = 24;
|
|
6
4
|
export type DaysOfWeek = Date[];
|
|
@@ -9,9 +7,14 @@ export interface NextAndPreviousWeek {
|
|
|
9
7
|
lastDayOfWeek: Date;
|
|
10
8
|
}
|
|
11
9
|
export interface DayAndWeekProps {
|
|
12
|
-
hours:
|
|
10
|
+
hours: string[];
|
|
13
11
|
daysOfWeek: DaysOfWeek;
|
|
14
|
-
|
|
12
|
+
operationalStartTime: number;
|
|
13
|
+
operationalEndTime: number;
|
|
14
|
+
}
|
|
15
|
+
export interface OperationalHours {
|
|
16
|
+
startTime?: number;
|
|
17
|
+
endTime: number;
|
|
15
18
|
}
|
|
16
19
|
export interface DayAndWeekState extends DayAndWeekProps {
|
|
17
20
|
setTodayDay: (date: Date) => Date;
|
|
@@ -20,7 +23,7 @@ export interface DayAndWeekState extends DayAndWeekProps {
|
|
|
20
23
|
getWeek: () => NextAndPreviousWeek;
|
|
21
24
|
nextWeek: () => DaysOfWeek;
|
|
22
25
|
previousWeek: () => DaysOfWeek;
|
|
23
|
-
|
|
26
|
+
configure: (config: OperationalHours) => void;
|
|
24
27
|
}
|
|
25
28
|
declare const dayAndWeekStore: StateCreator<DayAndWeekState>;
|
|
26
29
|
export type DayAndWeekStore = ReturnType<typeof dayAndWeekStore>;
|
package/dist/context/index.d.ts
CHANGED
|
@@ -3,4 +3,7 @@ import { default as BookingModalProvider } from './bookingModal/BookingModalProv
|
|
|
3
3
|
import { ConfigProvider } from './global/config/ConfigProvider';
|
|
4
4
|
import { default as MonthDescriptionProvider } from './month-description/MonthDescriptionProvider';
|
|
5
5
|
import { NewEventProvider } from './new-event/new-event-context';
|
|
6
|
-
|
|
6
|
+
import { default as useDragStore } from './drag/dragStore';
|
|
7
|
+
import { default as useEmptySlotStore } from './emptySlotsStore/useEmptySlotStore';
|
|
8
|
+
import { default as useDragStartAtStore } from './drag/useDragStateAtStore';
|
|
9
|
+
export { MonthDescriptionProvider, BookingModalProvider, BookingProvider, NewEventProvider, ConfigProvider, useDragStore, useEmptySlotStore, useDragStartAtStore };
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { UserProfileStatus } from '../../@types/user';
|
|
2
|
+
import { Ref } from 'react';
|
|
3
|
+
import { UsersInfoRef } from '../../utils/forward';
|
|
4
|
+
export declare const initialUsersInfoFormState: any;
|
|
5
|
+
export interface UsersInfoProps {
|
|
6
|
+
users: UserProfileStatus[];
|
|
7
|
+
ref?: Ref<UsersInfoRef>;
|
|
8
|
+
}
|
|
9
|
+
export interface UsersInfoState extends UsersInfoProps {
|
|
10
|
+
updateUsers: (users: UserProfileStatus[]) => void;
|
|
11
|
+
updateUsersDisabled: (userId: string, status: boolean) => void;
|
|
12
|
+
}
|
|
13
|
+
export type UsersInfoStore = ReturnType<typeof usersInfoStore>;
|
|
14
|
+
declare const usersInfoStore: (initialProps?: Partial<UsersInfoState>) => import('zustand').StoreApi<UsersInfoState>;
|
|
15
|
+
export { usersInfoStore };
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { PropsWithChildren } from 'react';
|
|
2
|
+
import { UsersInfoProps } from './users-info-store';
|
|
3
|
+
type UsersInfoProviderProps = PropsWithChildren<UsersInfoProps>;
|
|
4
|
+
declare const UsersInfoProvider: ({ children, ref, ...props }: UsersInfoProviderProps) => import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
export default UsersInfoProvider;
|
package/dist/core/Root.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { RootProps } from '../@types/calendar-instance';
|
|
2
|
-
declare const Root: ({ viewModes, createBookingModal, onChangeViewType, onCardDropCallback, onCardResizeEnd, onDayChange, onHeaderDayClick, onTodayClick, onSlotClick, onModalClose, bookings, isTimeInfoVisible, systemColor, ref, }: RootProps) => import("react/jsx-runtime").JSX.Element;
|
|
2
|
+
declare const Root: <T>({ viewModes, createBookingModal, onChangeViewType, onCardDropCallback, onCardResizeEnd, onDayChange, onHeaderDayClick, onTodayClick, onSlotClick, onModalClose, bookings, isTimeInfoVisible, systemColor, tableAccessors, users, operationalHours, ref, }: RootProps<T>) => import("react/jsx-runtime").JSX.Element;
|
|
3
3
|
export default Root;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { BookingCarContextProps } from '../../utils
|
|
2
|
-
declare const BookingCardContent: ({ booking, slotData, events, style, ref, }: BookingCarContextProps) => import("react/jsx-runtime").JSX.Element |
|
|
1
|
+
import { BookingCarContextProps } from '../../utils';
|
|
2
|
+
declare const BookingCardContent: ({ booking, slotData, events, style, ref, }: BookingCarContextProps) => import("react/jsx-runtime").JSX.Element | null;
|
|
3
3
|
export default BookingCardContent;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { CardContentProps } from '../../utils';
|
|
2
|
+
declare const CardContent: ({ resize, bookingInit, slotData, heightStyle, topHeightIncrement, customClasses, resizableParam, events, open, lastCard, half, cardContentRef: dataRef, cardsQuantity, cardIndex, hoveringAdditionalCardId, ref, }: CardContentProps) => import("react/jsx-runtime").JSX.Element | null;
|
|
3
|
+
export default CardContent;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { BookingCreationDialogProps } from '../../utils/props';
|
|
2
|
+
declare const BookingCreationDialog: ({ modal, side, onClose, onOpenChange, buttonTrigger, ref, }: BookingCreationDialogProps) => import("react/jsx-runtime").JSX.Element;
|
|
3
|
+
export default BookingCreationDialog;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { PropsWithChildren } from 'react';
|
|
2
|
+
import { BookingTabsProps } from '../../utils/props';
|
|
3
|
+
declare const BookingTabs: ({ onClose, side, onOpenChange, buttonTrigger, modal, children, }: PropsWithChildren<BookingTabsProps>) => import("react/jsx-runtime").JSX.Element;
|
|
4
|
+
export default BookingTabs;
|
|
@@ -1,2 +1,3 @@
|
|
|
1
|
-
|
|
1
|
+
import { CalendarHolderProps } from '../../utils';
|
|
2
|
+
declare const CalendarHolder: ({ tableAccessors }: CalendarHolderProps<any>) => import("react/jsx-runtime").JSX.Element;
|
|
2
3
|
export default CalendarHolder;
|
|
@@ -1,10 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
export interface HourWithActionsProps {
|
|
1
|
+
declare const HourWithActions: ({ hour }: {
|
|
3
2
|
hour: string;
|
|
4
|
-
|
|
5
|
-
}
|
|
6
|
-
export interface HourWithActionsRef {
|
|
7
|
-
setActivateHour: () => void;
|
|
8
|
-
}
|
|
9
|
-
declare const HourWithActions: ({ hour, ref }: HourWithActionsProps) => import("react/jsx-runtime").JSX.Element;
|
|
3
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
10
4
|
export default HourWithActions;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { SlotRenderProps } from '../../utils';
|
|
2
|
+
declare const SlotRender: import('react').MemoExoticComponent<({ firstDay, booking, dayHour, disabledCss, user, firstBlockTimeData, secondBlockTimeData, thirdBlockTimeData, fourthBlockTimeData, }: SlotRenderProps) => import("react/jsx-runtime").JSX.Element>;
|
|
3
|
+
export default SlotRender;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { Booking, BookingDateAndTime } from '../../@types/booking';
|
|
2
|
+
import { UserProfileStatus } from '../../@types/user';
|
|
2
3
|
export type TimesBlock = "first" | "second" | "third" | "fourth";
|
|
3
4
|
interface SlotsProps {
|
|
4
5
|
dayHour: BookingDateAndTime;
|
|
@@ -7,7 +8,8 @@ interface SlotsProps {
|
|
|
7
8
|
finishAt: string;
|
|
8
9
|
};
|
|
9
10
|
firstDay: boolean;
|
|
11
|
+
user?: UserProfileStatus;
|
|
10
12
|
bookingBulk: Booking[];
|
|
11
13
|
}
|
|
12
|
-
declare const Slots: ({ dayHour, firstDay, bookingBulk, }: SlotsProps) => import("react/jsx-runtime").JSX.Element;
|
|
14
|
+
declare const Slots: ({ dayHour, firstDay, user, bookingBulk, }: SlotsProps) => import("react/jsx-runtime").JSX.Element;
|
|
13
15
|
export default Slots;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { SlotTriggerProps } from '../../utils
|
|
1
|
+
import { SlotTriggerProps } from '../../utils';
|
|
2
2
|
declare const SlotTrigger: ({ slotData, blockTimeString, dayHour, slotPosition, disabledCss, events, bookings, children, ref, }: SlotTriggerProps) => import("react/jsx-runtime").JSX.Element;
|
|
3
3
|
export default SlotTrigger;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { TimeInfoRef } from '../../utils
|
|
2
|
-
import { TimeInfoProps } from '../../utils/props';
|
|
1
|
+
import { TimeInfoProps, TimeInfoRef } from '../../utils';
|
|
3
2
|
declare const TimeInfo: import('react').ForwardRefExoticComponent<TimeInfoProps & import('react').RefAttributes<TimeInfoRef>>;
|
|
4
3
|
export default TimeInfo;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { Ref } from 'react';
|
|
2
|
+
import { Booking, BookingDateAndTime } from '../../@types/booking';
|
|
3
|
+
interface CardProps {
|
|
4
|
+
booking: Booking;
|
|
5
|
+
slotData: BookingDateAndTime;
|
|
6
|
+
lastCard?: boolean;
|
|
7
|
+
half?: boolean;
|
|
8
|
+
cardsQuantity?: number;
|
|
9
|
+
cardIndex?: number;
|
|
10
|
+
hoveringAdditionalCardId?: string;
|
|
11
|
+
ref?: Ref<CardRef>;
|
|
12
|
+
}
|
|
13
|
+
export interface CardRef {
|
|
14
|
+
bookingId: string;
|
|
15
|
+
}
|
|
16
|
+
declare const CardContentWithResize: ({ booking, slotData, cardsQuantity, cardIndex, lastCard, half, hoveringAdditionalCardId, ref, }: CardProps) => import("react/jsx-runtime").JSX.Element;
|
|
17
|
+
export default CardContentWithResize;
|
|
@@ -1 +1,10 @@
|
|
|
1
|
-
|
|
1
|
+
import { ColumnDef } from '@tanstack/react-table';
|
|
2
|
+
import { Booking } from '../../@types/booking';
|
|
3
|
+
import { UserProfile } from '../../@types/user';
|
|
4
|
+
interface TableViewTypeProps {
|
|
5
|
+
user: UserProfile;
|
|
6
|
+
bookings: Booking[];
|
|
7
|
+
tableAccessors: ColumnDef<any>[];
|
|
8
|
+
}
|
|
9
|
+
declare const TableViewType: ({ user, bookings, tableAccessors }: TableViewTypeProps) => import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
export default TableViewType;
|
package/dist/hooks/index.d.ts
CHANGED
|
@@ -8,4 +8,6 @@ import { default as useNewEventStore } from './useNewEventStore';
|
|
|
8
8
|
import { default as useQueryData } from './useQuery';
|
|
9
9
|
import { default as useThrottleCallback } from './useTrottleCallback';
|
|
10
10
|
import { default as useUrlParam } from './useUrlParam';
|
|
11
|
-
|
|
11
|
+
import { default as useUserInfoStore } from './useUserInfoStore';
|
|
12
|
+
import { default as useGlobalConfig } from './useGlobalConfig';
|
|
13
|
+
export { useBooking, useEventPrevention, useThrottleCallback, useDaysSelectedView, useMonthDescription, useUrlParam, useGlobalStore, useQueryData, useNewEventStore, useBookingModal, useUserInfoStore, useGlobalConfig };
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { CalendarInstanceRef, UseBookingInstanceProps } from '../@types/calendar-instance';
|
|
2
|
-
declare const useCalendarInstance: (props: UseBookingInstanceProps) => CalendarInstanceRef;
|
|
2
|
+
declare const useCalendarInstance: <T>(props: UseBookingInstanceProps<T>) => CalendarInstanceRef;
|
|
3
3
|
export default useCalendarInstance;
|
|
@@ -1,13 +1,7 @@
|
|
|
1
1
|
import { SyntheticEvent } from 'react';
|
|
2
2
|
import { ResizeCallbackData } from 'react-resizable';
|
|
3
|
-
import { useResizableCardHookProps } from '
|
|
4
|
-
|
|
5
|
-
declare const ACTION_MOVEMENT: {
|
|
6
|
-
readonly UP: "UP";
|
|
7
|
-
readonly DOWN: "DOWN";
|
|
8
|
-
};
|
|
9
|
-
export type ActionMovement = keyof typeof ACTION_MOVEMENT;
|
|
10
|
-
declare const useResizableBothSides: ({ booking, onAddTime, onStartAtChange, onSubTime, starter, }: useResizableCardHookProps) => {
|
|
3
|
+
import { useResizableCardHookProps } from '../utils';
|
|
4
|
+
declare const useResizableBothSides: ({ booking, onAddTime, onStartAtChange, onSubTime, operationalHours, starter, }: useResizableCardHookProps) => {
|
|
11
5
|
state: {
|
|
12
6
|
height: number;
|
|
13
7
|
width: number;
|
|
@@ -21,6 +15,5 @@ declare const useResizableBothSides: ({ booking, onAddTime, onStartAtChange, onS
|
|
|
21
15
|
heightStyle: number;
|
|
22
16
|
topHeightIncrement: number;
|
|
23
17
|
onResize: (event: SyntheticEvent, { size }: ResizeCallbackData) => void;
|
|
24
|
-
updateHeightStyle: (finishMock: Date, startMock: Date) => void;
|
|
25
18
|
};
|
|
26
19
|
export default useResizableBothSides;
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { SyntheticEvent } from 'react';
|
|
2
2
|
import { ResizeCallbackData } from 'react-resizable';
|
|
3
|
-
import { useResizableCardHookProps } from '
|
|
4
|
-
export declare const BASE_VALUE: number;
|
|
3
|
+
import { useResizableCardHookProps } from '../utils';
|
|
5
4
|
declare const useResizableCardHook: ({ booking, onAddTime, onAddStartTime, onSubTime, starter, }: useResizableCardHookProps) => {
|
|
6
5
|
state: {
|
|
7
6
|
height: number;
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import { Booking, User } from '../@types';
|
|
2
|
+
import { UserProfileStatus } from '../@types/user';
|
|
2
3
|
declare const mockUser: User;
|
|
4
|
+
export declare const usersMock: UserProfileStatus[];
|
|
3
5
|
declare const mockBooking: Booking[];
|
|
4
6
|
declare const nextWeekBookingMock: Booking[];
|
|
5
7
|
export { mockBooking, nextWeekBookingMock, mockUser };
|
|
@@ -20,7 +20,7 @@ export declare const dateUtils: {
|
|
|
20
20
|
calculateDaysDifference(finishAt: Date, startAt: Date): number;
|
|
21
21
|
dateAndHourDateToString(date: Date): string;
|
|
22
22
|
shortMonthDescription(...month: Date[]): string;
|
|
23
|
-
|
|
23
|
+
timeDiffInMinutes(startAt: Date, finishAt: Date): number;
|
|
24
24
|
subtractMinutes(startAt: Date, amount: number): Date;
|
|
25
25
|
addMinuteToHour(hour: string, minutes: number): string;
|
|
26
26
|
dateToString(date: Date): string;
|
|
@@ -34,4 +34,6 @@ export declare const dateUtils: {
|
|
|
34
34
|
isTodayDate(date: Date): boolean;
|
|
35
35
|
firstAndLastWeekDays(week: DaysOfWeek): NextAndPreviousWeek;
|
|
36
36
|
generateWeekMonthLabel(week: DaysOfWeek): string;
|
|
37
|
+
isFinishDateAnotherDay(finish: Date, start: Date): boolean;
|
|
38
|
+
compareSameDate(firstDate: Date, secondDate: Date): boolean;
|
|
37
39
|
};
|
package/dist/utils/forward.d.ts
CHANGED
|
@@ -26,3 +26,11 @@ export interface SlotTriggerForwardRef {
|
|
|
26
26
|
export interface BookingCardContentRef {
|
|
27
27
|
updateBooking: (booking: Booking) => void;
|
|
28
28
|
}
|
|
29
|
+
export interface BookingCreationDialogRef {
|
|
30
|
+
showCreationModal: () => void;
|
|
31
|
+
closeModal: () => void;
|
|
32
|
+
isModalOpen: () => boolean;
|
|
33
|
+
}
|
|
34
|
+
export interface UsersInfoRef {
|
|
35
|
+
updateDisabledUser: (userId: string, status: boolean) => void;
|
|
36
|
+
}
|
package/dist/utils/hours.d.ts
CHANGED
package/dist/utils/index.d.ts
CHANGED
|
@@ -1,4 +1,8 @@
|
|
|
1
|
+
import { buildEmptyTimeSlotKey } from './buildEmptyTimeSlotKey';
|
|
1
2
|
import { bookingUtils } from './booking.utils';
|
|
2
3
|
import { dateUtils } from './date.utils';
|
|
3
|
-
import {
|
|
4
|
-
|
|
4
|
+
import { stringUtils } from './string.utils';
|
|
5
|
+
import { generateTimes, generateWorkingTimes } from './hours';
|
|
6
|
+
import { TimeInfoRef, BookingCardRef, SlotTriggerForwardRef, BookingCreationDialogRef, BookingCardContentRef } from './forward';
|
|
7
|
+
import { SlotTriggerProps, CardContentProps, BlockTimeData, EmptySlotProps, TimeInfoProps, useResizableCardHookProps, BlocksTimeStructure, SlotRenderProps, BookingCarContextProps, CalendarHolderProps, ColumnsProps, BookingCarOnResizeProps } from './props';
|
|
8
|
+
export { bookingUtils, dateUtils, stringUtils, generateTimes, generateWorkingTimes, buildEmptyTimeSlotKey, BookingCardRef, SlotTriggerForwardRef, BookingCreationDialogRef, TimeInfoRef, BookingCardContentRef, BlockTimeData, BlocksTimeStructure, SlotTriggerProps, CardContentProps, EmptySlotProps, TimeInfoProps, useResizableCardHookProps, BookingCarContextProps, SlotRenderProps, CalendarHolderProps, ColumnsProps, BookingCarOnResizeProps };
|
package/dist/utils/props.d.ts
CHANGED
|
@@ -1,13 +1,16 @@
|
|
|
1
1
|
import { DraggableAttributes } from '@dnd-kit/core';
|
|
2
2
|
import { SyntheticListenerMap } from '@dnd-kit/core/dist/hooks/utilities';
|
|
3
|
-
import { CSSProperties, ReactNode, Ref } from 'react';
|
|
4
|
-
import { Booking, BookingDateAndTime, Bookings } from '../@types';
|
|
5
|
-
import { TimesBlock } from '../core/slots/Slots';
|
|
6
|
-
import { BlockTimeRef, BookingCardContentRef, BookingCardRef, CardContentRef, SlotTriggerForwardRef } from './forward';
|
|
3
|
+
import { CSSProperties, JSX, ReactNode, Ref } from 'react';
|
|
4
|
+
import { Booking, BookingDateAndTime, Bookings, UserProfileStatus } from '../@types';
|
|
7
5
|
import { ResizableParam } from './types';
|
|
6
|
+
import { TimesBlock } from '../core/calendar/Slots';
|
|
7
|
+
import { BlockTimeRef, BookingCardContentRef, BookingCardRef, BookingCreationDialogRef, CardContentRef, SlotTriggerForwardRef } from './forward';
|
|
8
|
+
import { Side } from '../core/booking-options/BookingInfoOptions';
|
|
9
|
+
import { OperationalHours } from '../context/global/days-and-week/day-and-week-store';
|
|
10
|
+
import { ColumnDef } from '@tanstack/react-table';
|
|
8
11
|
export interface CardContentProps {
|
|
12
|
+
resize?: boolean;
|
|
9
13
|
bookingInit: Booking;
|
|
10
|
-
bookingViewType: string;
|
|
11
14
|
slotData: BookingDateAndTime;
|
|
12
15
|
heightStyle: number;
|
|
13
16
|
topHeightIncrement?: number;
|
|
@@ -32,8 +35,6 @@ export interface BookingCardProps {
|
|
|
32
35
|
booking: Booking;
|
|
33
36
|
slotData: BookingDateAndTime;
|
|
34
37
|
customClasses?: string;
|
|
35
|
-
layerCount?: number;
|
|
36
|
-
half?: boolean;
|
|
37
38
|
hoveringAdditionalCardId?: string;
|
|
38
39
|
ref?: Ref<BookingCardRef>;
|
|
39
40
|
}
|
|
@@ -50,6 +51,7 @@ export interface TimeInfoProps {
|
|
|
50
51
|
export interface BlockTimeData {
|
|
51
52
|
key: string;
|
|
52
53
|
time: string;
|
|
54
|
+
userId?: string;
|
|
53
55
|
}
|
|
54
56
|
export type BlocksTimeStructure = BlockTimeRef & BlockTimeData;
|
|
55
57
|
export interface EmptySlotProps {
|
|
@@ -60,6 +62,7 @@ export interface EmptySlotProps {
|
|
|
60
62
|
third: BlocksTimeStructure;
|
|
61
63
|
fourth: BlocksTimeStructure;
|
|
62
64
|
disabledCss: string;
|
|
65
|
+
userId?: string;
|
|
63
66
|
firstDay: boolean;
|
|
64
67
|
}
|
|
65
68
|
export interface SlotEvents {
|
|
@@ -89,8 +92,12 @@ export interface BookingCarContextProps {
|
|
|
89
92
|
};
|
|
90
93
|
ref?: Ref<BookingCardContentRef>;
|
|
91
94
|
}
|
|
95
|
+
export type BookingCarOnResizeProps = Omit<BookingCarContextProps & {
|
|
96
|
+
afterResize?: boolean;
|
|
97
|
+
}, 'ref'>;
|
|
92
98
|
export interface useResizableCardHookProps {
|
|
93
99
|
starter?: boolean;
|
|
100
|
+
operationalHours?: OperationalHours;
|
|
94
101
|
booking: Booking;
|
|
95
102
|
onAddTime?: (datetime: Date) => void;
|
|
96
103
|
onAddStartTime?: (datetime: Date) => void;
|
|
@@ -102,4 +109,37 @@ export interface ActualTimerIndicatorProps {
|
|
|
102
109
|
isFirstDay: boolean;
|
|
103
110
|
slotData: BlocksTimeStructure;
|
|
104
111
|
}
|
|
112
|
+
export interface BookingTabsProps {
|
|
113
|
+
side?: Side;
|
|
114
|
+
buttonTrigger?: JSX.Element;
|
|
115
|
+
modal?: boolean;
|
|
116
|
+
onClose: (event: React.MouseEvent) => void;
|
|
117
|
+
onOpenChange: (status: boolean) => void;
|
|
118
|
+
}
|
|
119
|
+
export interface BookingCreationDialogProps {
|
|
120
|
+
modal?: boolean;
|
|
121
|
+
side?: Side;
|
|
122
|
+
buttonTrigger?: JSX.Element;
|
|
123
|
+
onClose?: () => void;
|
|
124
|
+
onOpenChange?: (status: boolean) => void;
|
|
125
|
+
ref: Ref<BookingCreationDialogRef>;
|
|
126
|
+
}
|
|
127
|
+
export interface SlotRenderProps {
|
|
128
|
+
firstDay: boolean;
|
|
129
|
+
booking: Booking[];
|
|
130
|
+
dayHour: BookingDateAndTime;
|
|
131
|
+
disabledCss: string;
|
|
132
|
+
user?: UserProfileStatus;
|
|
133
|
+
firstBlockTimeData: BlocksTimeStructure;
|
|
134
|
+
secondBlockTimeData: BlocksTimeStructure;
|
|
135
|
+
thirdBlockTimeData: BlocksTimeStructure;
|
|
136
|
+
fourthBlockTimeData: BlocksTimeStructure;
|
|
137
|
+
}
|
|
138
|
+
export interface CalendarHolderProps<T> {
|
|
139
|
+
tableAccessors: ColumnDef<T>[];
|
|
140
|
+
}
|
|
141
|
+
export interface ColumnsProps<T> {
|
|
142
|
+
keyToCopy: string;
|
|
143
|
+
accessors: ColumnDef<T>[];
|
|
144
|
+
}
|
|
105
145
|
export {};
|