react-beauty-calendar 2.0.2 → 2.0.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/README.md +6 -0
- package/dist/@types/booking.d.ts +1 -0
- package/dist/@types/calendar-instance.d.ts +39 -7
- package/dist/@types/calendar.d.ts +1 -2
- package/dist/@types/index.d.ts +2 -2
- package/dist/@types/profile.d.ts +1 -1
- package/dist/@types/user.d.ts +4 -1
- package/dist/build/assets/main.css +1 -1
- package/dist/build/main.cjs.js +60 -70
- package/dist/build/main.es.js +10714 -8452
- package/dist/components/ui/Avatar.d.ts +10 -0
- package/dist/components/ui/Button-group.d.ts +11 -0
- package/dist/components/ui/Dialog.d.ts +14 -0
- package/dist/components/ui/Sidebar.d.ts +70 -0
- package/dist/components/ui/sheet.d.ts +12 -0
- package/dist/components/ui/skeleton.d.ts +2 -0
- package/dist/constants/booking-view-type.constant.d.ts +2 -0
- package/dist/constants/card.constant.d.ts +7 -0
- package/dist/constants/index.d.ts +4 -10
- package/dist/constants/month.constant.d.ts +12 -0
- package/dist/constants/user-colors-constants.d.ts +40 -0
- package/dist/context/drag/useDragStateAtStore.d.ts +0 -2
- package/dist/context/global/booking-info/booking-info.d.ts +1 -0
- package/dist/context/global/config/config-store.d.ts +7 -2
- package/dist/context/global/days-and-week/day-and-week-store.d.ts +1 -0
- package/dist/context/new-event/new-event-store.d.ts +1 -1
- package/dist/context/users-info/users-info-store.d.ts +3 -3
- package/dist/core/Root.d.ts +1 -1
- package/dist/core/avatar/UserAvatar.d.ts +6 -0
- package/dist/core/booking-card/BookingCard.d.ts +1 -1
- package/dist/core/booking-card/BookingCardOnResize.d.ts +1 -1
- package/dist/core/booking-card/CardContent.d.ts +1 -1
- package/dist/core/booking-creation-dialog/BookingCreationDialog.d.ts +1 -1
- package/dist/core/booking-creation-dialog/ConfirmationModal.d.ts +10 -0
- package/dist/core/calendar/AllDayCard.d.ts +2 -0
- package/dist/core/calendar/CalendarDays.d.ts +1 -1
- package/dist/core/calendar/DateCalendarIndicator.d.ts +1 -1
- package/dist/core/calendar/ScheduleSlots.d.ts +3 -9
- package/dist/core/calendar/SlotRender.d.ts +1 -1
- package/dist/core/calendar/SlotRenderMonth.d.ts +3 -0
- package/dist/core/card-slots/CardBlockContent.d.ts +4 -3
- package/dist/core/card-slots/CardResizeEventOpened.d.ts +2 -1
- package/dist/core/card-slots/MonthIndicator.d.ts +8 -0
- package/dist/core/card-slots/SlotTrigger.d.ts +2 -2
- package/dist/core/card-slots/TimeInfo.d.ts +2 -4
- package/dist/core/card-slots/UniSlot.d.ts +1 -1
- package/dist/core/header-calendar/HeaderTodayAction.d.ts +1 -1
- package/dist/core/sidebar/Sidebar.d.ts +8 -0
- package/dist/core/sidebar/SidebarWrapper.d.ts +7 -0
- package/dist/core/slots/Card.d.ts +5 -4
- package/dist/core/table-view-type/TableViewType.d.ts +2 -2
- package/dist/hooks/useResizableCardHook.d.ts +3 -2
- package/dist/mock/booking-mock.d.ts +8 -2
- package/dist/user1.webp +0 -0
- package/dist/user2.jpeg +0 -0
- package/dist/user3.png +0 -0
- package/dist/user4.webp +0 -0
- package/dist/utils/blockSlotDays.d.ts +12 -0
- package/dist/utils/date.utils.d.ts +7 -2
- package/dist/utils/forward.d.ts +5 -6
- package/dist/utils/index.d.ts +3 -2
- package/dist/utils/permissions.d.ts +6 -0
- package/dist/utils/props.d.ts +26 -16
- package/dist/utils/string.utils.d.ts +1 -0
- package/dist/utils/types.d.ts +5 -1
- package/package.json +4 -2
- package/dist/@types/working-time.d.ts +0 -10
- package/dist/constants/day-time-starter.constant.d.ts +0 -2
- package/dist/constants/payment.constant.d.ts +0 -11
- package/dist/constants/resize-base-value.constant.d.ts +0 -1
- package/dist/constants/side-options.constant.d.ts +0 -1
- package/dist/constants/system-colors.constant.d.ts +0 -40
- package/dist/constants/url-param.constant.d.ts +0 -6
- package/dist/constants/week.constant.d.ts +0 -3
- package/dist/core/calendar/TableDayOfWeekColumn.d.ts +0 -6
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import * as AvatarPrimitive from "@radix-ui/react-avatar";
|
|
2
|
+
declare function Avatar({ className, size, ...props }: React.ComponentProps<typeof AvatarPrimitive.Root> & {
|
|
3
|
+
size?: "default" | "sm" | "lg";
|
|
4
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
declare function AvatarImage({ className, ...props }: React.ComponentProps<typeof AvatarPrimitive.Image>): import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
declare function AvatarFallback({ className, ...props }: React.ComponentProps<typeof AvatarPrimitive.Fallback>): import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
declare function AvatarBadge({ className, ...props }: React.ComponentProps<"span">): import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
declare function AvatarGroup({ className, ...props }: React.ComponentProps<"div">): import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
declare function AvatarGroupCount({ className, ...props }: React.ComponentProps<"div">): import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
export { Avatar, AvatarImage, AvatarFallback, AvatarBadge, AvatarGroup, AvatarGroupCount, };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { VariantProps } from 'class-variance-authority';
|
|
2
|
+
import { Separator } from './Separator';
|
|
3
|
+
declare const buttonGroupVariants: (props?: ({
|
|
4
|
+
orientation?: "horizontal" | "vertical" | null | undefined;
|
|
5
|
+
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
6
|
+
declare function ButtonGroup({ className, orientation, ...props }: React.ComponentProps<"div"> & VariantProps<typeof buttonGroupVariants>): import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
declare function ButtonGroupText({ className, asChild, ...props }: React.ComponentProps<"div"> & {
|
|
8
|
+
asChild?: boolean;
|
|
9
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
declare function ButtonGroupSeparator({ className, orientation, ...props }: React.ComponentProps<typeof Separator>): import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
export { ButtonGroup, ButtonGroupSeparator, ButtonGroupText, buttonGroupVariants, };
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import * as DialogPrimitive from "@radix-ui/react-dialog";
|
|
2
|
+
declare function Dialog({ ...props }: React.ComponentProps<typeof DialogPrimitive.Root>): import("react/jsx-runtime").JSX.Element;
|
|
3
|
+
declare function DialogTrigger({ ...props }: React.ComponentProps<typeof DialogPrimitive.Trigger>): import("react/jsx-runtime").JSX.Element;
|
|
4
|
+
declare function DialogPortal({ ...props }: React.ComponentProps<typeof DialogPrimitive.Portal>): import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
declare function DialogClose({ ...props }: React.ComponentProps<typeof DialogPrimitive.Close>): import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
declare function DialogOverlay({ className, ...props }: React.ComponentProps<typeof DialogPrimitive.Overlay>): import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
declare function DialogContent({ className, children, showCloseButton, ...props }: React.ComponentProps<typeof DialogPrimitive.Content> & {
|
|
8
|
+
showCloseButton?: boolean;
|
|
9
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
declare function DialogHeader({ className, ...props }: React.ComponentProps<"div">): import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
declare function DialogFooter({ className, ...props }: React.ComponentProps<"div">): import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
declare function DialogTitle({ className, ...props }: React.ComponentProps<typeof DialogPrimitive.Title>): import("react/jsx-runtime").JSX.Element;
|
|
13
|
+
declare function DialogDescription({ className, ...props }: React.ComponentProps<typeof DialogPrimitive.Description>): import("react/jsx-runtime").JSX.Element;
|
|
14
|
+
export { Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, };
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import { VariantProps } from 'class-variance-authority';
|
|
2
|
+
import { Button } from './Button';
|
|
3
|
+
import { Input } from './Input';
|
|
4
|
+
import { Separator } from './Separator';
|
|
5
|
+
import { TooltipContent } from './Tooltip';
|
|
6
|
+
import * as React from "react";
|
|
7
|
+
type SidebarContextProps = {
|
|
8
|
+
state: "expanded" | "collapsed";
|
|
9
|
+
open: boolean;
|
|
10
|
+
setOpen: (open: boolean) => void;
|
|
11
|
+
openMobile: boolean;
|
|
12
|
+
setOpenMobile: (open: boolean) => void;
|
|
13
|
+
isMobile: boolean;
|
|
14
|
+
toggleSidebar: () => void;
|
|
15
|
+
};
|
|
16
|
+
declare function useSidebar(): SidebarContextProps;
|
|
17
|
+
declare function SidebarProvider({ defaultOpen, open: openProp, onOpenChange: setOpenProp, className, style, width, children, ...props }: React.ComponentProps<"div"> & {
|
|
18
|
+
defaultOpen?: boolean;
|
|
19
|
+
open?: boolean;
|
|
20
|
+
width?: string;
|
|
21
|
+
onOpenChange?: (open: boolean) => void;
|
|
22
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
23
|
+
declare function Sidebar({ side, variant, collapsible, className, children, ...props }: React.ComponentProps<"div"> & {
|
|
24
|
+
side?: "left" | "right";
|
|
25
|
+
variant?: "sidebar" | "floating" | "inset";
|
|
26
|
+
collapsible?: "offcanvas" | "icon" | "none";
|
|
27
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
28
|
+
declare function SidebarTrigger({ className, onClick, ...props }: React.ComponentProps<typeof Button>): import("react/jsx-runtime").JSX.Element;
|
|
29
|
+
declare function SidebarRail({ className, ...props }: React.ComponentProps<"button">): import("react/jsx-runtime").JSX.Element;
|
|
30
|
+
declare function SidebarInset({ className, ...props }: React.ComponentProps<"main">): import("react/jsx-runtime").JSX.Element;
|
|
31
|
+
declare function SidebarInput({ className, ...props }: React.ComponentProps<typeof Input>): import("react/jsx-runtime").JSX.Element;
|
|
32
|
+
declare function SidebarHeader({ className, ...props }: React.ComponentProps<"div">): import("react/jsx-runtime").JSX.Element;
|
|
33
|
+
declare function SidebarFooter({ className, ...props }: React.ComponentProps<"div">): import("react/jsx-runtime").JSX.Element;
|
|
34
|
+
declare function SidebarSeparator({ className, ...props }: React.ComponentProps<typeof Separator>): import("react/jsx-runtime").JSX.Element;
|
|
35
|
+
declare function SidebarContent({ className, ...props }: React.ComponentProps<"div">): import("react/jsx-runtime").JSX.Element;
|
|
36
|
+
declare function SidebarGroup({ className, ...props }: React.ComponentProps<"div">): import("react/jsx-runtime").JSX.Element;
|
|
37
|
+
declare function SidebarGroupLabel({ className, asChild, ...props }: React.ComponentProps<"div"> & {
|
|
38
|
+
asChild?: boolean;
|
|
39
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
40
|
+
declare function SidebarGroupAction({ className, asChild, ...props }: React.ComponentProps<"button"> & {
|
|
41
|
+
asChild?: boolean;
|
|
42
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
43
|
+
declare function SidebarGroupContent({ className, ...props }: React.ComponentProps<"div">): import("react/jsx-runtime").JSX.Element;
|
|
44
|
+
declare function SidebarMenu({ className, ...props }: React.ComponentProps<"ul">): import("react/jsx-runtime").JSX.Element;
|
|
45
|
+
declare function SidebarMenuItem({ className, ...props }: React.ComponentProps<"li">): import("react/jsx-runtime").JSX.Element;
|
|
46
|
+
declare const sidebarMenuButtonVariants: (props?: ({
|
|
47
|
+
variant?: "default" | "outline" | null | undefined;
|
|
48
|
+
size?: "default" | "sm" | "lg" | null | undefined;
|
|
49
|
+
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
50
|
+
declare function SidebarMenuButton({ asChild, isActive, variant, size, tooltip, className, ...props }: React.ComponentProps<"button"> & {
|
|
51
|
+
asChild?: boolean;
|
|
52
|
+
isActive?: boolean;
|
|
53
|
+
tooltip?: string | React.ComponentProps<typeof TooltipContent>;
|
|
54
|
+
} & VariantProps<typeof sidebarMenuButtonVariants>): import("react/jsx-runtime").JSX.Element;
|
|
55
|
+
declare function SidebarMenuAction({ className, asChild, showOnHover, ...props }: React.ComponentProps<"button"> & {
|
|
56
|
+
asChild?: boolean;
|
|
57
|
+
showOnHover?: boolean;
|
|
58
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
59
|
+
declare function SidebarMenuBadge({ className, ...props }: React.ComponentProps<"div">): import("react/jsx-runtime").JSX.Element;
|
|
60
|
+
declare function SidebarMenuSkeleton({ className, showIcon, ...props }: React.ComponentProps<"div"> & {
|
|
61
|
+
showIcon?: boolean;
|
|
62
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
63
|
+
declare function SidebarMenuSub({ className, ...props }: React.ComponentProps<"ul">): import("react/jsx-runtime").JSX.Element;
|
|
64
|
+
declare function SidebarMenuSubItem({ className, ...props }: React.ComponentProps<"li">): import("react/jsx-runtime").JSX.Element;
|
|
65
|
+
declare function SidebarMenuSubButton({ asChild, size, isActive, className, ...props }: React.ComponentProps<"a"> & {
|
|
66
|
+
asChild?: boolean;
|
|
67
|
+
size?: "sm" | "md";
|
|
68
|
+
isActive?: boolean;
|
|
69
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
70
|
+
export { Sidebar, SidebarContent, SidebarFooter, SidebarGroup, SidebarGroupAction, SidebarGroupContent, SidebarGroupLabel, SidebarHeader, SidebarInput, SidebarInset, SidebarMenu, SidebarMenuAction, SidebarMenuBadge, SidebarMenuButton, SidebarMenuItem, SidebarMenuSkeleton, SidebarMenuSub, SidebarMenuSubButton, SidebarMenuSubItem, SidebarProvider, SidebarRail, SidebarSeparator, SidebarTrigger, useSidebar, };
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import * as SheetPrimitive from "@radix-ui/react-dialog";
|
|
2
|
+
declare function Sheet({ ...props }: React.ComponentProps<typeof SheetPrimitive.Root>): import("react/jsx-runtime").JSX.Element;
|
|
3
|
+
declare function SheetTrigger({ ...props }: React.ComponentProps<typeof SheetPrimitive.Trigger>): import("react/jsx-runtime").JSX.Element;
|
|
4
|
+
declare function SheetClose({ ...props }: React.ComponentProps<typeof SheetPrimitive.Close>): import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
declare function SheetContent({ className, children, side, ...props }: React.ComponentProps<typeof SheetPrimitive.Content> & {
|
|
6
|
+
side?: "top" | "right" | "bottom" | "left";
|
|
7
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
declare function SheetHeader({ className, ...props }: React.ComponentProps<"div">): import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
declare function SheetFooter({ className, ...props }: React.ComponentProps<"div">): import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
declare function SheetTitle({ className, ...props }: React.ComponentProps<typeof SheetPrimitive.Title>): import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
declare function SheetDescription({ className, ...props }: React.ComponentProps<typeof SheetPrimitive.Description>): import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
export { Sheet, SheetTrigger, SheetClose, SheetContent, SheetHeader, SheetFooter, SheetTitle, SheetDescription, };
|
|
@@ -1,2 +1,9 @@
|
|
|
1
1
|
export declare const INITIAL_SIZE = 600;
|
|
2
2
|
export declare const MIN_DIFF_TIME_THRESHOLD = 15;
|
|
3
|
+
export declare const MIN_CHANGE_THRESHOLD = 2;
|
|
4
|
+
export declare const MIN_LIMIT_HEIGHT = 460;
|
|
5
|
+
export declare const DRAGGABLE_OPTS_GRID: number[];
|
|
6
|
+
export declare const BASE_VALUE: number;
|
|
7
|
+
export declare const HANDLE_SIZE: [20, 20];
|
|
8
|
+
export declare const SLOT_DISABLE_COLOR = "#47464612";
|
|
9
|
+
export declare const SIDE_OPTIONS: readonly ["top", "right", "bottom", "left"];
|
|
@@ -1,10 +1,4 @@
|
|
|
1
|
-
import { BOOKING_VIEW_TYPE } from './booking-view-type.constant';
|
|
2
|
-
import { INITIAL_SIZE, MIN_DIFF_TIME_THRESHOLD } from './card.constant';
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
import { PAYMENT_STATUS, PAYMENT_TYPE } from './payment.constant';
|
|
6
|
-
import { BASE_VALUE } from './resize-base-value.constant';
|
|
7
|
-
import { SIDE_OPTIONS } from './side-options.constant';
|
|
8
|
-
import { SYSTEM_COLORS_THEME_1 } from './system-colors.constant';
|
|
9
|
-
import { URL_PARAM } from './url-param.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, };
|
|
1
|
+
import { BOOKING_VIEW_TYPE, DAY_TIME_STARTER } from './booking-view-type.constant';
|
|
2
|
+
import { BASE_VALUE, INITIAL_SIZE, MIN_DIFF_TIME_THRESHOLD, SIDE_OPTIONS } from './card.constant';
|
|
3
|
+
export * from './month.constant';
|
|
4
|
+
export { BOOKING_VIEW_TYPE, INITIAL_SIZE, MIN_DIFF_TIME_THRESHOLD, BASE_VALUE, SIDE_OPTIONS, DAY_TIME_STARTER, };
|
|
@@ -1 +1,13 @@
|
|
|
1
1
|
export declare const MONTH: string[];
|
|
2
|
+
export declare const WEEK_DAYS: readonly ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"];
|
|
3
|
+
export declare const WEEK_DAYS_PT: {
|
|
4
|
+
Sun: string;
|
|
5
|
+
Mon: string;
|
|
6
|
+
Tue: string;
|
|
7
|
+
Wed: string;
|
|
8
|
+
Thu: string;
|
|
9
|
+
Fri: string;
|
|
10
|
+
Sat: string;
|
|
11
|
+
};
|
|
12
|
+
export type WeekDays = (typeof WEEK_DAYS)[number];
|
|
13
|
+
export declare const WEEK_DAYS_FULL_NAME: readonly ["Domingo", "Segunda", "Terça", "Quarta", "Quinta", "Sexta", "Sábado"];
|
|
@@ -28,3 +28,43 @@ export declare const USER_COLORS_THEME_3: {
|
|
|
28
28
|
readonly "#eab308": "#eab308";
|
|
29
29
|
readonly "#64748b": "#64748b";
|
|
30
30
|
};
|
|
31
|
+
export declare const SYSTEM_COLORS_THEME_1: {
|
|
32
|
+
readonly "#3b82f6": "#3b82f6";
|
|
33
|
+
readonly "#059669": "#059669";
|
|
34
|
+
readonly "#dc2626": "#dc2626";
|
|
35
|
+
readonly "#7c3aed": "#7c3aed";
|
|
36
|
+
readonly "#ea580c": "#ea580c";
|
|
37
|
+
readonly "#0891b2": "#0891b2";
|
|
38
|
+
readonly "#be185d": "#be185d";
|
|
39
|
+
readonly "#374151": "#374151";
|
|
40
|
+
};
|
|
41
|
+
export declare const SYSTEM_COLORS_THEME_2: {
|
|
42
|
+
readonly "#1e40af": "#1e40af";
|
|
43
|
+
readonly "#166534": "#166534";
|
|
44
|
+
readonly "#b91c1c": "#b91c1c";
|
|
45
|
+
readonly "#6b21a8": "#6b21a8";
|
|
46
|
+
readonly "#c2410c": "#c2410c";
|
|
47
|
+
readonly "#0e7490": "#0e7490";
|
|
48
|
+
readonly "#be123c": "#be123c";
|
|
49
|
+
readonly "#1f2937": "#1f2937";
|
|
50
|
+
};
|
|
51
|
+
export declare const SYSTEM_COLORS_THEME_3: {
|
|
52
|
+
readonly "#2563eb": "#2563eb";
|
|
53
|
+
readonly "#16a34a": "#16a34a";
|
|
54
|
+
readonly "#dc2626": "#dc2626";
|
|
55
|
+
readonly "#9333ea": "#9333ea";
|
|
56
|
+
readonly "#ea580c": "#ea580c";
|
|
57
|
+
readonly "#0d9488": "#0d9488";
|
|
58
|
+
readonly "#e11d48": "#e11d48";
|
|
59
|
+
readonly "#4b5563": "#4b5563";
|
|
60
|
+
};
|
|
61
|
+
export declare const SYSTEM_COLORS_THEME_4: {
|
|
62
|
+
readonly "#1d4ed8": "#1d4ed8";
|
|
63
|
+
readonly "#047857": "#047857";
|
|
64
|
+
readonly "#b91c1c": "#b91c1c";
|
|
65
|
+
readonly "#7c2d12": "#7c2d12";
|
|
66
|
+
readonly "#7c3aed": "#7c3aed";
|
|
67
|
+
readonly "#0369a1": "#0369a1";
|
|
68
|
+
readonly "#be185d": "#be185d";
|
|
69
|
+
readonly "#374151": "#374151";
|
|
70
|
+
};
|
|
@@ -1,11 +1,9 @@
|
|
|
1
1
|
import { Booking, BookingDateAndTime } from '../../@types';
|
|
2
2
|
export interface DragProps {
|
|
3
|
-
startAt: string;
|
|
4
3
|
booking: Booking | null;
|
|
5
4
|
slotData: BookingDateAndTime | null;
|
|
6
5
|
}
|
|
7
6
|
export interface DragState extends DragProps {
|
|
8
|
-
updateStartAt: (startAt: string) => void;
|
|
9
7
|
updateBooking: (booking: Booking | null) => void;
|
|
10
8
|
updateSlotData: (slotData: BookingDateAndTime | null) => void;
|
|
11
9
|
}
|
|
@@ -10,6 +10,7 @@ export interface BookingInfoState extends BookingInfoProps {
|
|
|
10
10
|
updatingBookingBulkData: (booking: Booking, slotDay: number) => void;
|
|
11
11
|
resetBookingResponse: () => void;
|
|
12
12
|
optimisticCardUpdate: (booking: Booking, newStartAt: Date, newFinishDate: Date, slotData: BookingDateAndTime) => void;
|
|
13
|
+
updateBookingById: (booking: Booking) => void;
|
|
13
14
|
}
|
|
14
15
|
declare const bookingInfoStore: StateCreator<BookingInfoState>;
|
|
15
16
|
export default bookingInfoStore;
|
|
@@ -1,9 +1,14 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { UserAccessProfile } from '../../../@types';
|
|
2
|
+
import { BusinessInterval, OnlyBusinessDays, UnavailablePeriods } from '../../../@types/calendar-instance';
|
|
3
|
+
import { SYSTEM_COLORS_THEME_1, USER_COLORS_THEME_3 } from '../../../constants/user-colors-constants';
|
|
3
4
|
export type SystemColor = keyof typeof SYSTEM_COLORS_THEME_1;
|
|
4
5
|
export type UserColor = keyof typeof USER_COLORS_THEME_3;
|
|
5
6
|
export declare const initialConfigState: ConfigStoreProps;
|
|
6
7
|
export interface ConfigStoreProps {
|
|
8
|
+
unavailablePeriods: UnavailablePeriods[];
|
|
9
|
+
activeUser: UserAccessProfile;
|
|
10
|
+
onlyBusinessDays?: OnlyBusinessDays;
|
|
11
|
+
businessInterval?: BusinessInterval[];
|
|
7
12
|
systemColor?: SystemColor;
|
|
8
13
|
isTimeInfoVisible?: boolean;
|
|
9
14
|
}
|
|
@@ -23,6 +23,7 @@ export interface DayAndWeekState extends DayAndWeekProps {
|
|
|
23
23
|
getWeek: () => NextAndPreviousWeek;
|
|
24
24
|
nextWeek: () => DaysOfWeek;
|
|
25
25
|
previousWeek: () => DaysOfWeek;
|
|
26
|
+
setMonth: (monthIndex: number) => void;
|
|
26
27
|
configure: (config: OperationalHours) => void;
|
|
27
28
|
}
|
|
28
29
|
declare const dayAndWeekStore: StateCreator<DayAndWeekState>;
|
|
@@ -10,7 +10,7 @@ export interface NewEventFormProps {
|
|
|
10
10
|
ref?: Ref<NewEventFormRef>;
|
|
11
11
|
}
|
|
12
12
|
export interface NewEventFormState extends NewEventFormProps {
|
|
13
|
-
updateForm: (newEventForm:
|
|
13
|
+
updateForm: (newEventForm: Partial<NewEventFormProps>) => void;
|
|
14
14
|
updateDynamicForm: (key: string, value: string) => void;
|
|
15
15
|
updateStartAt: (selectedHour: string) => void;
|
|
16
16
|
updateFinishAt: (selectedHour: string) => void;
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { Ref } from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { UserAccessProfile } from '../../@types/user';
|
|
3
3
|
import { UsersInfoRef } from '../../utils/forward';
|
|
4
4
|
export declare const initialUsersInfoFormState: UsersInfoProps;
|
|
5
5
|
export interface UsersInfoProps {
|
|
6
|
-
users:
|
|
6
|
+
users: UserAccessProfile[];
|
|
7
7
|
ref?: Ref<UsersInfoRef>;
|
|
8
8
|
}
|
|
9
9
|
export interface UsersInfoState extends UsersInfoProps {
|
|
10
|
-
updateUsers: (users:
|
|
10
|
+
updateUsers: (users: UserAccessProfile[]) => void;
|
|
11
11
|
updateUsersDisabled: (userId: string, status: boolean) => void;
|
|
12
12
|
}
|
|
13
13
|
export type UsersInfoStore = ReturnType<typeof usersInfoStore>;
|
package/dist/core/Root.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { RootProps } from '../@types/calendar-instance';
|
|
2
|
-
declare const Root: ({ viewModes, startView, createBookingModal, onChangeViewType,
|
|
2
|
+
declare const Root: ({ viewModes, startView, createBookingModal, onChangeViewType, onCardDrop, onCardResizeEnd, onDayChange, onHeaderDayClick, onTodayClick, onSlotClick, onModalClose, bookings, isTimeInfoVisible, systemColor, tableAccessors, operationalHours, onlyBusinessDays, businessInterval, activeUser, users, unavailablePeriods, sidebar, ref, }: RootProps) => import("react/jsx-runtime").JSX.Element;
|
|
3
3
|
export default Root;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { PropsWithChildren } from 'react';
|
|
2
2
|
import { BookingCardProps } from '../../utils/props';
|
|
3
|
-
declare const BookingCard: ({ booking, slotData, customClasses, hoveringAdditionalCardId, isResizing, children, ref, }: PropsWithChildren<BookingCardProps>) => import("react/jsx-runtime").JSX.Element | undefined;
|
|
3
|
+
declare const BookingCard: ({ booking, slotData, selected, customClasses, hoveringAdditionalCardId, isResizing, children, ref, }: PropsWithChildren<BookingCardProps>) => import("react/jsx-runtime").JSX.Element | undefined;
|
|
4
4
|
export default BookingCard;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { BookingCarOnResizeProps } from '../../utils';
|
|
2
|
-
declare const BookingCardOnResize: ({ afterResize, booking, slotData,
|
|
2
|
+
declare const BookingCardOnResize: ({ afterResize, booking, slotData, }: BookingCarOnResizeProps) => import("react/jsx-runtime").JSX.Element | null;
|
|
3
3
|
export default BookingCardOnResize;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { CardContentProps } from '../../utils';
|
|
2
|
-
declare const CardContent: ({ resize, bookingInit, slotData, heightStyle, topHeightIncrement, customClasses, resizableParam, events, open,
|
|
2
|
+
declare const CardContent: ({ resize, bookingInit, slotData, heightStyle, topHeightIncrement, customClasses, resizableParam, events, open, cardsQuantity, index, hoveringAdditionalCardId, canResize, selected, cardContentRef: dataRef, ref, }: CardContentProps) => import("react/jsx-runtime").JSX.Element | null;
|
|
3
3
|
export default CardContent;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { BookingCreationDialogProps } from '../../utils/props';
|
|
2
|
-
declare const BookingCreationDialog: ({ modal, side,
|
|
2
|
+
declare const BookingCreationDialog: ({ modal, side, events, buttonTrigger, fromMonth, ref, }: BookingCreationDialogProps) => import("react/jsx-runtime").JSX.Element;
|
|
3
3
|
export default BookingCreationDialog;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { Ref } from 'react';
|
|
2
|
+
import { Booking, BookingDateAndTime } from '../../@types';
|
|
3
|
+
import { ConfirmModalRef } from '../../utils/forward';
|
|
4
|
+
interface ConfirmModalProps {
|
|
5
|
+
onConfirm?: (booking: Booking, slotData: BookingDateAndTime) => Promise<void>;
|
|
6
|
+
onCancel?: () => void;
|
|
7
|
+
ref: Ref<ConfirmModalRef>;
|
|
8
|
+
}
|
|
9
|
+
declare const ConfirmationModal: ({ ref, onConfirm, onCancel }: ConfirmModalProps) => import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
export default ConfirmationModal;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
interface CalendarDaysProps {
|
|
2
2
|
handleClickDay: (day: Date) => void;
|
|
3
3
|
}
|
|
4
|
-
declare const CalendarDays: import('react').MemoExoticComponent<({ handleClickDay }: CalendarDaysProps) => (import("react/jsx-runtime").JSX.Element | undefined)[]
|
|
4
|
+
declare const CalendarDays: import('react').MemoExoticComponent<({ handleClickDay }: CalendarDaysProps) => (import("react/jsx-runtime").JSX.Element | undefined)[]>;
|
|
5
5
|
export default CalendarDays;
|
|
@@ -1,14 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { BookingViewType } from '../../@types/booking';
|
|
3
|
-
import { DaysOfWeek } from '../../context/global/days-and-week/day-and-week-store';
|
|
4
|
-
import { LunchTimeBlock } from './CalendarView';
|
|
1
|
+
import { UserAccessProfile } from '../../@types';
|
|
5
2
|
interface DaysSlotsProps {
|
|
6
|
-
|
|
7
|
-
lunchTimeBlock: LunchTimeBlock;
|
|
8
|
-
daysOfWeek: DaysOfWeek;
|
|
9
|
-
users: UserProfileStatus[];
|
|
3
|
+
users: UserAccessProfile[];
|
|
10
4
|
dayViewModeWithUsers: Date[];
|
|
11
5
|
hour: string;
|
|
12
6
|
}
|
|
13
|
-
declare const ScheduleSlots: ({
|
|
7
|
+
declare const ScheduleSlots: ({ users, dayViewModeWithUsers, hour, }: DaysSlotsProps) => import("react/jsx-runtime").JSX.Element[];
|
|
14
8
|
export default ScheduleSlots;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { SlotRenderProps } from '../../utils';
|
|
2
|
-
declare const SlotRender: import('react').MemoExoticComponent<({ bookings, dayHour, user, firstDay, }: SlotRenderProps) => import("react/jsx-runtime").JSX.Element>;
|
|
2
|
+
declare const SlotRender: import('react').MemoExoticComponent<({ bookings, dayHour, user, firstDay, index }: SlotRenderProps) => import("react/jsx-runtime").JSX.Element>;
|
|
3
3
|
export default SlotRender;
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Bookings } from '../../@types';
|
|
2
|
+
import { BlocksTimeStructure } from '../../utils';
|
|
2
3
|
interface CardBlockContentProps {
|
|
3
4
|
bookings?: Bookings;
|
|
4
5
|
blockTimeString?: string;
|
|
5
|
-
slotData?:
|
|
6
|
+
slotData?: BlocksTimeStructure;
|
|
6
7
|
hoveringAdditionalCardId?: string;
|
|
7
8
|
}
|
|
8
|
-
declare const CardBlockContent: ({ bookings, blockTimeString, slotData, hoveringAdditionalCardId, }: CardBlockContentProps) => import("react/jsx-runtime").JSX.Element | null
|
|
9
|
+
declare const CardBlockContent: ({ bookings, blockTimeString, slotData, hoveringAdditionalCardId, }: CardBlockContentProps) => import("react/jsx-runtime").JSX.Element | null;
|
|
9
10
|
export default CardBlockContent;
|
|
@@ -5,7 +5,8 @@ interface CardResizeEventOpenedProps {
|
|
|
5
5
|
hoveringAdditionalCardId: string;
|
|
6
6
|
renderEvent: boolean;
|
|
7
7
|
slotData: BlocksTimeStructure;
|
|
8
|
+
fromMonth: boolean;
|
|
8
9
|
ref: Ref<CardResizeEventRef>;
|
|
9
10
|
}
|
|
10
|
-
declare const CardResizeEventOpened: ({ hoveringAdditionalCardId, renderEvent, slotData, ref, }: CardResizeEventOpenedProps) => import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
declare const CardResizeEventOpened: ({ hoveringAdditionalCardId, renderEvent, slotData, fromMonth, ref, }: CardResizeEventOpenedProps) => import("react/jsx-runtime").JSX.Element;
|
|
11
12
|
export default CardResizeEventOpened;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
interface MonthIndicatorProps {
|
|
2
|
+
date: Date;
|
|
3
|
+
index?: number;
|
|
4
|
+
className?: string;
|
|
5
|
+
onClickDay?: () => void;
|
|
6
|
+
}
|
|
7
|
+
declare const MonthIndicator: ({ date, index, className, onClickDay, }: MonthIndicatorProps) => import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
export default MonthIndicator;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { SlotTriggerProps } from '../../utils';
|
|
2
|
-
declare const
|
|
3
|
-
export default
|
|
2
|
+
declare const _default: import('react').MemoExoticComponent<({ slotData, blockTimeString, lastPosition, bookings, fromMonth, getCreationDialogRef, children, ref, }: SlotTriggerProps) => import("react/jsx-runtime").JSX.Element>;
|
|
3
|
+
export default _default;
|
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
import {
|
|
2
|
-
declare const TimeInfo:
|
|
3
|
-
children?: import('react').ReactNode | undefined;
|
|
4
|
-
} & import('react').RefAttributes<TimeInfoRef>>;
|
|
1
|
+
import { TimeInfoPropsWithChildren } from '../../utils/props';
|
|
2
|
+
declare const TimeInfo: ({ isCreatingOnResize, children, }: TimeInfoPropsWithChildren) => import("react/jsx-runtime").JSX.Element;
|
|
5
3
|
export default TimeInfo;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { UniSlotProps } from '../../utils/props';
|
|
2
|
-
declare const UniSlot: import('react').MemoExoticComponent<({ dayHour, userId, slotPosition, firstDay, bookings, lastPosition, }: UniSlotProps) => import("react/jsx-runtime").JSX.Element>;
|
|
2
|
+
declare const UniSlot: import('react').MemoExoticComponent<({ dayHour, userId, slotPosition, firstDay, bookings, lastPosition, bookingQuantity, fromMonth, closeRenderedEvent, }: UniSlotProps) => import("react/jsx-runtime").JSX.Element>;
|
|
3
3
|
export default UniSlot;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { HeaderTodayActionProps } from '../../utils/props';
|
|
2
|
-
declare const HeaderTodayAction: ({
|
|
2
|
+
declare const HeaderTodayAction: ({ onClickToday, showCreationModal, }: HeaderTodayActionProps) => import("react/jsx-runtime").JSX.Element;
|
|
3
3
|
export default HeaderTodayAction;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { ComponentProps, JSX } from 'react';
|
|
2
|
+
import { Sidebar } from '../../components/ui/Sidebar';
|
|
3
|
+
type SideBarContent = {
|
|
4
|
+
sidebarContent: JSX.Element | undefined;
|
|
5
|
+
};
|
|
6
|
+
type AppSidebarProps = ComponentProps<typeof Sidebar> & SideBarContent;
|
|
7
|
+
declare const AppSidebar: ({ sidebarContent, ...props }: AppSidebarProps) => import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
export default AppSidebar;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { PropsWithChildren } from 'react';
|
|
2
|
+
import { Sidebar } from '../../@types/calendar-instance';
|
|
3
|
+
type SidebarWrapperProps = PropsWithChildren<{
|
|
4
|
+
sidebar?: Sidebar;
|
|
5
|
+
}>;
|
|
6
|
+
declare const SidebarWrapper: ({ children, ...props }: SidebarWrapperProps) => string | number | bigint | boolean | Iterable<import('react').ReactNode> | Promise<string | number | bigint | boolean | import('react').ReactPortal | import('react').ReactElement<unknown, string | import('react').JSXElementConstructor<any>> | Iterable<import('react').ReactNode> | null | undefined> | import("react/jsx-runtime").JSX.Element | null | undefined;
|
|
7
|
+
export default SidebarWrapper;
|
|
@@ -1,17 +1,18 @@
|
|
|
1
1
|
import { Ref } from 'react';
|
|
2
|
-
import { Booking
|
|
2
|
+
import { Booking } from '../../@types/booking';
|
|
3
|
+
import { BlocksTimeStructure } from '../../utils';
|
|
3
4
|
interface CardProps {
|
|
4
5
|
booking: Booking;
|
|
5
|
-
slotData:
|
|
6
|
+
slotData: BlocksTimeStructure;
|
|
6
7
|
lastCard?: boolean;
|
|
7
8
|
half?: boolean;
|
|
8
9
|
cardsQuantity?: number;
|
|
9
|
-
|
|
10
|
+
index?: number;
|
|
10
11
|
hoveringAdditionalCardId?: string;
|
|
11
12
|
ref?: Ref<CardRef>;
|
|
12
13
|
}
|
|
13
14
|
export interface CardRef {
|
|
14
15
|
bookingId: string;
|
|
15
16
|
}
|
|
16
|
-
declare const Card: ({ booking, slotData, cardsQuantity,
|
|
17
|
+
declare const Card: ({ booking, slotData, cardsQuantity, index, hoveringAdditionalCardId, ref, }: CardProps) => import("react/jsx-runtime").JSX.Element;
|
|
17
18
|
export default Card;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { ColumnDef } from '@tanstack/react-table';
|
|
2
2
|
import { Booking } from '../../@types/booking';
|
|
3
|
-
import {
|
|
3
|
+
import { UserAccessProfile } from '../../@types/user';
|
|
4
4
|
interface TableViewTypeProps {
|
|
5
|
-
user:
|
|
5
|
+
user: UserAccessProfile;
|
|
6
6
|
bookings: Booking[];
|
|
7
7
|
tableAccessors: ColumnDef<unknown>[];
|
|
8
8
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { SyntheticEvent } from 'react';
|
|
2
2
|
import { ResizeCallbackData } from 'react-resizable';
|
|
3
3
|
import { useResizableCardHookProps } from '../utils';
|
|
4
|
-
declare const useResizableCardHook: ({ booking, onAddTime, onAddStartTime, onSubTime, skipUpdate, starter, }: useResizableCardHookProps) => {
|
|
4
|
+
declare const useResizableCardHook: ({ booking, onAddTime, onAddStartTime, onSubTime, skipUpdate, activeUser, starter, isMonthView, }: useResizableCardHookProps) => {
|
|
5
5
|
state: {
|
|
6
6
|
height: number;
|
|
7
7
|
width: number;
|
|
@@ -14,7 +14,8 @@ declare const useResizableCardHook: ({ booking, onAddTime, onAddStartTime, onSub
|
|
|
14
14
|
resetHeightStyle: () => void;
|
|
15
15
|
heightStyle: number;
|
|
16
16
|
topHeightIncrement: number;
|
|
17
|
-
onResize: (event: SyntheticEvent, { size, handle }: ResizeCallbackData) => void
|
|
17
|
+
onResize: (event: SyntheticEvent, { size, handle }: ResizeCallbackData) => Promise<void>;
|
|
18
18
|
updateHeightStyle: (finishMock: Date, startMock: Date) => void;
|
|
19
|
+
canResize: boolean;
|
|
19
20
|
};
|
|
20
21
|
export default useResizableCardHook;
|
|
@@ -1,7 +1,13 @@
|
|
|
1
1
|
import { Booking, User } from '../@types';
|
|
2
|
-
import {
|
|
2
|
+
import { UserAccessProfile } from '../@types/user';
|
|
3
3
|
declare const mockUser: User;
|
|
4
|
-
export declare const
|
|
4
|
+
export declare const updateTest: {
|
|
5
|
+
id: string;
|
|
6
|
+
userId: string;
|
|
7
|
+
startAt: Date;
|
|
8
|
+
finishAt: Date;
|
|
9
|
+
}[];
|
|
10
|
+
export declare const usersMock: UserAccessProfile[];
|
|
5
11
|
declare const mockBooking: Booking[];
|
|
6
12
|
declare const nextWeekBookingMock: Booking[];
|
|
7
13
|
export { mockBooking, nextWeekBookingMock, mockUser };
|
package/dist/user1.webp
ADDED
|
Binary file
|
package/dist/user2.jpeg
ADDED
|
Binary file
|
package/dist/user3.png
ADDED
|
Binary file
|
package/dist/user4.webp
ADDED
|
Binary file
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { BusinessInterval, Periods, UnavailablePeriods } from '../@types/calendar-instance';
|
|
2
|
+
export declare const blockSlotDays: {
|
|
3
|
+
isDisabledSlot(slotId: string | Date, targetSlot: string | Date): boolean;
|
|
4
|
+
isTimeSlotWithinRange(slotTime: string, from: string, to: string): boolean;
|
|
5
|
+
isDisabledByDay({ slotId, slotTime, unavailablePeriods, }: {
|
|
6
|
+
slotId: string;
|
|
7
|
+
slotTime?: string;
|
|
8
|
+
unavailablePeriods: UnavailablePeriods[];
|
|
9
|
+
}): boolean;
|
|
10
|
+
findSlotAndCommit(slotTime: string, periods?: Periods[]): boolean;
|
|
11
|
+
isDisabledByInterval(slotId: string, slotTime: string, businessInterval?: BusinessInterval[]): boolean;
|
|
12
|
+
};
|