react-beauty-calendar 1.0.4 → 1.0.6

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.
Files changed (101) hide show
  1. package/dist/build/assets/main.css +1 -0
  2. package/dist/build/main.cjs.js +30 -30
  3. package/dist/build/main.es.js +2930 -2940
  4. package/dist/lib/@types/booking.d.ts +16 -0
  5. package/dist/lib/@types/calendar-instance.d.ts +21 -0
  6. package/dist/lib/@types/calendar.d.ts +3 -0
  7. package/dist/lib/@types/index.d.ts +5 -0
  8. package/dist/lib/@types/profile.d.ts +7 -0
  9. package/dist/lib/@types/user.d.ts +8 -0
  10. package/dist/lib/@types/working-time.d.ts +10 -0
  11. package/dist/lib/components/ui/Button.d.ts +9 -0
  12. package/dist/lib/components/ui/Dropdown-menu.d.ts +25 -0
  13. package/dist/lib/components/ui/Input.d.ts +3 -0
  14. package/dist/lib/components/ui/Label.d.ts +4 -0
  15. package/dist/lib/components/ui/Popover.d.ts +7 -0
  16. package/dist/lib/components/ui/Select.d.ts +15 -0
  17. package/dist/lib/components/ui/Separator.d.ts +4 -0
  18. package/dist/lib/components/ui/Table.d.ts +10 -0
  19. package/dist/lib/components/ui/Tabs.d.ts +7 -0
  20. package/dist/lib/components/ui/Toggle.d.ts +9 -0
  21. package/dist/lib/components/ui/Tooltip.d.ts +7 -0
  22. package/dist/lib/constants/booking-view-type.constant.d.ts +6 -0
  23. package/dist/lib/constants/index.d.ts +7 -0
  24. package/dist/lib/constants/month.constant.d.ts +2 -0
  25. package/dist/lib/constants/payment.constant.d.ts +11 -0
  26. package/dist/lib/constants/side-options.constant.d.ts +2 -0
  27. package/dist/lib/constants/system-colors.constant.d.ts +11 -0
  28. package/dist/lib/constants/url-param.constant.d.ts +7 -0
  29. package/dist/lib/context/booking/booking-context.d.ts +2 -0
  30. package/dist/lib/context/booking/booking-store.d.ts +28 -0
  31. package/dist/lib/context/booking/bookingProvider.d.ts +5 -0
  32. package/dist/lib/context/bookingModal/BookingModalProvider.d.ts +11 -0
  33. package/dist/lib/context/bookingModal/booking-modal-context.d.ts +3 -0
  34. package/dist/lib/context/date-and-time/DateAndTimeContext.d.ts +9 -0
  35. package/dist/lib/context/drag/dragStore.d.ts +11 -0
  36. package/dist/lib/context/emptySlotsStore.ts/emptySlotKey.d.ts +3 -0
  37. package/dist/lib/context/emptySlotsStore.ts/useEmptySlotStore.d.ts +15 -0
  38. package/dist/lib/context/global/booking-info/booking-info.d.ts +18 -0
  39. package/dist/lib/context/global/days-and-week/day-and-week-store.d.ts +25 -0
  40. package/dist/lib/context/global/slice-global/slice-global-store.d.ts +12 -0
  41. package/dist/lib/context/index.d.ts +4 -0
  42. package/dist/lib/context/month-description/MonthDescriptionProvider.d.ts +5 -0
  43. package/dist/lib/context/month-description/month-description-context.d.ts +2 -0
  44. package/dist/lib/context/month-description/month-description-store.d.ts +16 -0
  45. package/dist/lib/context/new-event/new-event-context.d.ts +6 -0
  46. package/dist/lib/context/new-event/new-event-store.d.ts +17 -0
  47. package/dist/lib/core/Root.d.ts +6 -0
  48. package/dist/lib/core/booking-card/BookingCard.d.ts +7 -0
  49. package/dist/lib/core/booking-options/BookingInfoOptions.d.ts +20 -0
  50. package/dist/lib/core/calendar/CalendarHolder.d.ts +2 -0
  51. package/dist/lib/core/calendar/CalendarView.d.ts +2 -0
  52. package/dist/lib/core/calendar/HourWithActions.d.ts +11 -0
  53. package/dist/lib/core/calendar/ViewTypes.d.ts +6 -0
  54. package/dist/lib/core/card-slots/SlotTrigger.d.ts +23 -0
  55. package/dist/lib/core/favorite-booking/FavoriteBooking.d.ts +2 -0
  56. package/dist/lib/core/header-calendar/DaysOfWeek.d.ts +7 -0
  57. package/dist/lib/core/header-calendar/Header.d.ts +9 -0
  58. package/dist/lib/core/header-calendar/HeaderViewType.d.ts +2 -0
  59. package/dist/lib/core/header-calendar/SelectItem.d.ts +7 -0
  60. package/dist/lib/core/info/Info.d.ts +7 -0
  61. package/dist/lib/core/shortcut-commands/ShortcutCommands.d.ts +5 -0
  62. package/dist/lib/core/slots/Card.d.ts +14 -0
  63. package/dist/lib/core/slots/CardContent.d.ts +39 -0
  64. package/dist/lib/core/slots/CardOverlay.d.ts +9 -0
  65. package/dist/lib/core/slots/EmptySlot.d.ts +24 -0
  66. package/dist/lib/core/slots/EventsTab.d.ts +11 -0
  67. package/dist/lib/core/slots/Slots.d.ts +14 -0
  68. package/dist/lib/core/slots/TabsContent.d.ts +3 -0
  69. package/dist/lib/core/slots/TimeInfo.d.ts +13 -0
  70. package/dist/lib/core/slots/actualTimeIndicator/ActualTimeIndicator.d.ts +8 -0
  71. package/dist/lib/core/slots/actualTimeIndicator/position-based-on-seconds.d.ts +13 -0
  72. package/dist/lib/core/slots/service/ProcedureWithColor.d.ts +1 -0
  73. package/dist/lib/core/slots/service/StartAt.d.ts +9 -0
  74. package/dist/lib/core/slots/useResizableCardHook.d.ts +26 -0
  75. package/dist/lib/core/table-view-type/TableViewType.d.ts +1 -0
  76. package/dist/lib/hoc/WithTooltip.d.ts +10 -0
  77. package/dist/lib/hooks/index.d.ts +10 -0
  78. package/dist/lib/hooks/use-booking-model.d.ts +2 -0
  79. package/dist/lib/hooks/use-calendar-instance.d.ts +7 -0
  80. package/dist/lib/hooks/use-days-selected-view.d.ts +4 -0
  81. package/dist/lib/hooks/use-global-store.d.ts +5 -0
  82. package/dist/lib/hooks/use-is-mobile.d.ts +2 -0
  83. package/dist/lib/hooks/use-month-description.d.ts +3 -0
  84. package/dist/lib/hooks/use-tanstack-table.d.ts +20 -0
  85. package/dist/lib/hooks/useBooking.d.ts +3 -0
  86. package/dist/lib/hooks/useDebounce.d.ts +2 -0
  87. package/dist/lib/hooks/useEventPrevention.d.ts +4 -0
  88. package/dist/lib/hooks/useMutation.d.ts +9 -0
  89. package/dist/lib/hooks/useNewEventStore.d.ts +3 -0
  90. package/dist/lib/hooks/useQuery.d.ts +9 -0
  91. package/dist/lib/hooks/useTrottleCallback.d.ts +2 -0
  92. package/dist/lib/hooks/useUrlParam.d.ts +6 -0
  93. package/dist/lib/lib/utils.d.ts +2 -0
  94. package/dist/lib/main.d.ts +4 -0
  95. package/dist/lib/mock/booking-mock.d.ts +4 -0
  96. package/dist/lib/utils/date-utils.d.ts +33 -0
  97. package/dist/lib/utils/hours.d.ts +8 -0
  98. package/dist/lib/utils/string.utils.d.ts +4 -0
  99. package/dist/lib/utils/types.d.ts +21 -0
  100. package/package.json +6 -5
  101. package/dist/build/assets/react-beauty-calendar.css +0 -1
@@ -0,0 +1,16 @@
1
+ import { UserProfile } from './user';
2
+ export interface Booking {
3
+ id: string;
4
+ startAt: Date;
5
+ finishAt: Date;
6
+ }
7
+ export type Bookings = Booking[];
8
+ export interface BookingDateAndTime {
9
+ day: string;
10
+ hour: string;
11
+ }
12
+ export interface BookingBulkData {
13
+ user: UserProfile;
14
+ booking: Booking[];
15
+ }
16
+ export type BookingViewType = "WEEK" | "DAY" | "MONTH" | "TABLE";
@@ -0,0 +1,21 @@
1
+ import { JSX, Ref } from 'react';
2
+ import { CalendarInstanceRef } from '../../src/App';
3
+ import { ActionType } from '../core/header-calendar/Header';
4
+ import { BlockTimeData } from '../core/slots/EmptySlot';
5
+ import { Booking, BookingDateAndTime, BookingViewType } from './booking';
6
+ import { ViewModes } from './calendar';
7
+ export type UseBookingInstanceProps = RootProps;
8
+ export interface RootProps extends RootEventsProps {
9
+ bookings: Booking[];
10
+ createBookingModal: JSX.Element;
11
+ viewModes: ViewModes;
12
+ ref?: Ref<CalendarInstanceRef>;
13
+ }
14
+ export interface RootEventsProps {
15
+ onChangeViewType: (bookingViewType: BookingViewType) => void;
16
+ onTodayClick: (date: Date) => void;
17
+ onCardDropCallback: (booking: Booking, overId: string, slotData: BookingDateAndTime) => Promise<void>;
18
+ onDayChange: (date: Date[], actionType: ActionType) => void;
19
+ onModalClose: () => void;
20
+ onSlotClick: (slotData: BlockTimeData) => void;
21
+ }
@@ -0,0 +1,3 @@
1
+ import { BookingViewType } from './booking';
2
+ type ViewModes = BookingViewType[];
3
+ export type { ViewModes };
@@ -0,0 +1,5 @@
1
+ import { Booking, BookingDateAndTime, Bookings } from './booking';
2
+ import { ViewModes } from './calendar';
3
+ import { Profile } from './profile';
4
+ import { User } from './user';
5
+ export type { Booking, Bookings, BookingDateAndTime, Profile, User, ViewModes };
@@ -0,0 +1,7 @@
1
+ export interface Profile {
2
+ id: string;
3
+ name: string;
4
+ email?: string;
5
+ phoneNumber?: string;
6
+ profilePicture?: string;
7
+ }
@@ -0,0 +1,8 @@
1
+ import { Profile } from './profile';
2
+ export interface User {
3
+ id: string;
4
+ profile: Profile;
5
+ updatedAt: Date;
6
+ createdAt: Date;
7
+ }
8
+ export type UserProfile = Pick<User, "id" | "profile">;
@@ -0,0 +1,10 @@
1
+ export declare const DayOfWeek: {
2
+ readonly SUN: "SUN";
3
+ readonly MON: "MON";
4
+ readonly TUE: "TUE";
5
+ readonly WED: "WED";
6
+ readonly THU: "THU";
7
+ readonly FRI: "FRI";
8
+ readonly SAT: "SAT";
9
+ };
10
+ export type DayOfWeek = (typeof DayOfWeek)[keyof typeof DayOfWeek];
@@ -0,0 +1,9 @@
1
+ import { VariantProps } from 'class-variance-authority';
2
+ declare const buttonVariants: (props?: ({
3
+ variant?: "default" | "link" | "destructive" | "outline" | "secondary" | "ghost" | null | undefined;
4
+ size?: "default" | "sm" | "lg" | "icon" | null | undefined;
5
+ } & import('class-variance-authority/types').ClassProp) | undefined) => string;
6
+ declare function Button({ className, variant, size, asChild, ...props }: React.ComponentProps<"button"> & VariantProps<typeof buttonVariants> & {
7
+ asChild?: boolean;
8
+ }): import("react/jsx-runtime").JSX.Element;
9
+ export { Button, buttonVariants };
@@ -0,0 +1,25 @@
1
+ import * as DropdownMenuPrimitive from "@radix-ui/react-dropdown-menu";
2
+ import type * as React from "react";
3
+ declare function DropdownMenu({ ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.Root>): import("react/jsx-runtime").JSX.Element;
4
+ declare function DropdownMenuPortal({ ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.Portal>): import("react/jsx-runtime").JSX.Element;
5
+ declare function DropdownMenuTrigger({ ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.Trigger>): import("react/jsx-runtime").JSX.Element;
6
+ declare function DropdownMenuContent({ className, sideOffset, ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.Content>): import("react/jsx-runtime").JSX.Element;
7
+ declare function DropdownMenuGroup({ ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.Group>): import("react/jsx-runtime").JSX.Element;
8
+ declare function DropdownMenuItem({ className, inset, variant, ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.Item> & {
9
+ inset?: boolean;
10
+ variant?: "default" | "destructive";
11
+ }): import("react/jsx-runtime").JSX.Element;
12
+ declare function DropdownMenuCheckboxItem({ className, children, checked, ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.CheckboxItem>): import("react/jsx-runtime").JSX.Element;
13
+ declare function DropdownMenuRadioGroup({ ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.RadioGroup>): import("react/jsx-runtime").JSX.Element;
14
+ declare function DropdownMenuRadioItem({ className, children, ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.RadioItem>): import("react/jsx-runtime").JSX.Element;
15
+ declare function DropdownMenuLabel({ className, inset, ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.Label> & {
16
+ inset?: boolean;
17
+ }): import("react/jsx-runtime").JSX.Element;
18
+ declare function DropdownMenuSeparator({ className, ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.Separator>): import("react/jsx-runtime").JSX.Element;
19
+ declare function DropdownMenuShortcut({ className, ...props }: React.ComponentProps<"span">): import("react/jsx-runtime").JSX.Element;
20
+ declare function DropdownMenuSub({ ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.Sub>): import("react/jsx-runtime").JSX.Element;
21
+ declare function DropdownMenuSubTrigger({ className, inset, children, ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.SubTrigger> & {
22
+ inset?: boolean;
23
+ }): import("react/jsx-runtime").JSX.Element;
24
+ declare function DropdownMenuSubContent({ className, ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.SubContent>): import("react/jsx-runtime").JSX.Element;
25
+ export { DropdownMenu, DropdownMenuPortal, DropdownMenuTrigger, DropdownMenuContent, DropdownMenuGroup, DropdownMenuLabel, DropdownMenuItem, DropdownMenuCheckboxItem, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubTrigger, DropdownMenuSubContent, };
@@ -0,0 +1,3 @@
1
+ import type * as React from "react";
2
+ declare function Input({ className, type, ...props }: React.ComponentProps<"input">): import("react/jsx-runtime").JSX.Element;
3
+ export { Input };
@@ -0,0 +1,4 @@
1
+ import * as LabelPrimitive from "@radix-ui/react-label";
2
+ import type * as React from "react";
3
+ declare function Label({ className, ...props }: React.ComponentProps<typeof LabelPrimitive.Root>): import("react/jsx-runtime").JSX.Element;
4
+ export { Label };
@@ -0,0 +1,7 @@
1
+ import * as PopoverPrimitive from "@radix-ui/react-popover";
2
+ import type * as React from "react";
3
+ declare function Popover({ ...props }: React.ComponentProps<typeof PopoverPrimitive.Root>): import("react/jsx-runtime").JSX.Element;
4
+ declare function PopoverTrigger({ ...props }: React.ComponentProps<typeof PopoverPrimitive.Trigger>): import("react/jsx-runtime").JSX.Element;
5
+ declare function PopoverContent({ className, align, sideOffset, ...props }: React.ComponentProps<typeof PopoverPrimitive.Content>): import("react/jsx-runtime").JSX.Element;
6
+ declare function PopoverAnchor({ ...props }: React.ComponentProps<typeof PopoverPrimitive.Anchor>): import("react/jsx-runtime").JSX.Element;
7
+ export { Popover, PopoverTrigger, PopoverContent, PopoverAnchor };
@@ -0,0 +1,15 @@
1
+ import * as SelectPrimitive from "@radix-ui/react-select";
2
+ import type * as React from "react";
3
+ declare function Select({ ...props }: React.ComponentProps<typeof SelectPrimitive.Root>): import("react/jsx-runtime").JSX.Element;
4
+ declare function SelectGroup({ ...props }: React.ComponentProps<typeof SelectPrimitive.Group>): import("react/jsx-runtime").JSX.Element;
5
+ declare function SelectValue({ ...props }: React.ComponentProps<typeof SelectPrimitive.Value>): import("react/jsx-runtime").JSX.Element;
6
+ declare function SelectTrigger({ className, size, children, ...props }: React.ComponentProps<typeof SelectPrimitive.Trigger> & {
7
+ size?: "sm" | "default";
8
+ }): import("react/jsx-runtime").JSX.Element;
9
+ declare function SelectContent({ className, children, position, ...props }: React.ComponentProps<typeof SelectPrimitive.Content>): import("react/jsx-runtime").JSX.Element;
10
+ declare function SelectLabel({ className, ...props }: React.ComponentProps<typeof SelectPrimitive.Label>): import("react/jsx-runtime").JSX.Element;
11
+ declare function SelectItem({ className, children, ...props }: React.ComponentProps<typeof SelectPrimitive.Item>): import("react/jsx-runtime").JSX.Element;
12
+ declare function SelectSeparator({ className, ...props }: React.ComponentProps<typeof SelectPrimitive.Separator>): import("react/jsx-runtime").JSX.Element;
13
+ declare function SelectScrollUpButton({ className, ...props }: React.ComponentProps<typeof SelectPrimitive.ScrollUpButton>): import("react/jsx-runtime").JSX.Element;
14
+ declare function SelectScrollDownButton({ className, ...props }: React.ComponentProps<typeof SelectPrimitive.ScrollDownButton>): import("react/jsx-runtime").JSX.Element;
15
+ export { Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, };
@@ -0,0 +1,4 @@
1
+ import * as SeparatorPrimitive from "@radix-ui/react-separator";
2
+ import type * as React from "react";
3
+ declare function Separator({ className, orientation, decorative, ...props }: React.ComponentProps<typeof SeparatorPrimitive.Root>): import("react/jsx-runtime").JSX.Element;
4
+ export { Separator };
@@ -0,0 +1,10 @@
1
+ import type * as React from "react";
2
+ declare function Table({ className, ...props }: React.ComponentProps<"table">): import("react/jsx-runtime").JSX.Element;
3
+ declare function TableHeader({ className, ...props }: React.ComponentProps<"thead">): import("react/jsx-runtime").JSX.Element;
4
+ declare function TableBody({ className, ...props }: React.ComponentProps<"tbody">): import("react/jsx-runtime").JSX.Element;
5
+ declare function TableFooter({ className, ...props }: React.ComponentProps<"tfoot">): import("react/jsx-runtime").JSX.Element;
6
+ declare function TableRow({ className, ...props }: React.ComponentProps<"tr">): import("react/jsx-runtime").JSX.Element;
7
+ declare function TableHead({ className, ...props }: React.ComponentProps<"th">): import("react/jsx-runtime").JSX.Element;
8
+ declare function TableCell({ className, ...props }: React.ComponentProps<"td">): import("react/jsx-runtime").JSX.Element;
9
+ declare function TableCaption({ className, ...props }: React.ComponentProps<"caption">): import("react/jsx-runtime").JSX.Element;
10
+ export { Table, TableHeader, TableBody, TableFooter, TableHead, TableRow, TableCell, TableCaption, };
@@ -0,0 +1,7 @@
1
+ import * as TabsPrimitive from "@radix-ui/react-tabs";
2
+ import type * as React from "react";
3
+ declare function Tabs({ className, ...props }: React.ComponentProps<typeof TabsPrimitive.Root>): import("react/jsx-runtime").JSX.Element;
4
+ declare function TabsList({ className, ...props }: React.ComponentProps<typeof TabsPrimitive.List>): import("react/jsx-runtime").JSX.Element;
5
+ declare function TabsTrigger({ className, ...props }: React.ComponentProps<typeof TabsPrimitive.Trigger>): import("react/jsx-runtime").JSX.Element;
6
+ declare function TabsContent({ className, ...props }: React.ComponentProps<typeof TabsPrimitive.Content>): import("react/jsx-runtime").JSX.Element;
7
+ export { Tabs, TabsList, TabsTrigger, TabsContent };
@@ -0,0 +1,9 @@
1
+ import { VariantProps } from 'class-variance-authority';
2
+ import * as TogglePrimitive from "@radix-ui/react-toggle";
3
+ import type * as React from "react";
4
+ declare const toggleVariants: (props?: ({
5
+ variant?: "default" | "outline" | null | undefined;
6
+ size?: "default" | "sm" | "lg" | null | undefined;
7
+ } & import('class-variance-authority/types').ClassProp) | undefined) => string;
8
+ declare function Toggle({ className, variant, size, ...props }: React.ComponentProps<typeof TogglePrimitive.Root> & VariantProps<typeof toggleVariants>): import("react/jsx-runtime").JSX.Element;
9
+ export { Toggle, toggleVariants };
@@ -0,0 +1,7 @@
1
+ import * as TooltipPrimitive from "@radix-ui/react-tooltip";
2
+ import type * as React from "react";
3
+ declare function TooltipProvider({ delayDuration, ...props }: React.ComponentProps<typeof TooltipPrimitive.Provider>): import("react/jsx-runtime").JSX.Element;
4
+ declare function Tooltip({ ...props }: React.ComponentProps<typeof TooltipPrimitive.Root>): import("react/jsx-runtime").JSX.Element;
5
+ declare function TooltipTrigger({ ...props }: React.ComponentProps<typeof TooltipPrimitive.Trigger>): import("react/jsx-runtime").JSX.Element;
6
+ declare function TooltipContent({ className, sideOffset, children, ...props }: React.ComponentProps<typeof TooltipPrimitive.Content>): import("react/jsx-runtime").JSX.Element;
7
+ export { Tooltip, TooltipTrigger, TooltipContent, TooltipProvider };
@@ -0,0 +1,6 @@
1
+ export declare const BOOKING_VIEW_TYPE: {
2
+ readonly DAY: "DAY";
3
+ readonly WEEK: "WEEK";
4
+ readonly TABLE: "TABLE";
5
+ readonly MONTH: "MONTH";
6
+ };
@@ -0,0 +1,7 @@
1
+ import { BOOKING_VIEW_TYPE } from './booking-view-type.constant';
2
+ import { default as MONTH } from './month.constant';
3
+ import { PAYMENT_STATUS, PAYMENT_TYPE } from './payment.constant';
4
+ import { default as SIDE_OPTIONS } from './side-options.constant';
5
+ import { default as SYSTEM_COLORS } from './system-colors.constant';
6
+ import { default as URL_PARAM } from './url-param.constant';
7
+ export { BOOKING_VIEW_TYPE, MONTH, PAYMENT_TYPE, PAYMENT_STATUS, SIDE_OPTIONS, SYSTEM_COLORS, URL_PARAM, };
@@ -0,0 +1,2 @@
1
+ declare const MONTH: string[];
2
+ export default MONTH;
@@ -0,0 +1,11 @@
1
+ export declare const PAYMENT_TYPE: {
2
+ CREDIT_CARD: string;
3
+ DEBIT_CARD: string;
4
+ PIX: string;
5
+ CASH: string;
6
+ };
7
+ export declare const PAYMENT_STATUS: {
8
+ PENDING: string;
9
+ PAID: string;
10
+ UNPAID: string;
11
+ };
@@ -0,0 +1,2 @@
1
+ declare const SIDE_OPTIONS: readonly ["top", "right", "bottom", "left"];
2
+ export default SIDE_OPTIONS;
@@ -0,0 +1,11 @@
1
+ declare const SYSTEM_COLORS: {
2
+ readonly option_1: "#2596be";
3
+ readonly option_2: "#ff0101";
4
+ readonly option_3: "#bf00e0";
5
+ readonly option_4: "#9de5ff";
6
+ readonly option_5: "#5c0394";
7
+ readonly option_6: "#ff00aa";
8
+ readonly option_7: "#3e0237";
9
+ readonly default: "#ae00ff";
10
+ };
11
+ export default SYSTEM_COLORS;
@@ -0,0 +1,7 @@
1
+ declare const URL_PARAM: {
2
+ readonly "view-type": "view-type";
3
+ readonly DAY: "day";
4
+ readonly enterprise: "enterprise";
5
+ readonly bookings: "bookings";
6
+ };
7
+ export default URL_PARAM;
@@ -0,0 +1,2 @@
1
+ declare const BookingContext: import('react').Context<import('zustand').StoreApi<import('./booking-store').BookingState> | null>;
2
+ export default BookingContext;
@@ -0,0 +1,28 @@
1
+ import { Booking } from '../../@types';
2
+ import { BookingDateAndTime } from '../../@types/booking';
3
+ import { CardRef } from '../../core/slots/Card';
4
+ export type DraggingBooking = {
5
+ overId: string;
6
+ booking: Booking;
7
+ slotData: BookingDateAndTime;
8
+ };
9
+ export declare const initialBookingFormState: BookingProps;
10
+ export interface BookingProps {
11
+ selectedDate: Date;
12
+ selectedHour: string;
13
+ bookingModalState: boolean;
14
+ isBookingLoading: boolean;
15
+ cardsRef: Map<string, CardRef>;
16
+ }
17
+ export interface BookingState extends BookingProps {
18
+ setSelectedDate: (date: Date) => void;
19
+ setSelectedHour: (hour: string) => void;
20
+ openNewBookingModal: (day?: Date, hour?: string) => void;
21
+ setIsBookingLoading: () => void;
22
+ setCardRef: (key: string, cardRef: CardRef) => void;
23
+ changeNewBookingStateModal: () => void;
24
+ clearDraggingBookings: () => void;
25
+ }
26
+ export type BookingStore = ReturnType<typeof bookingStore>;
27
+ declare const bookingStore: (initialProps?: Partial<BookingState>) => import('zustand').StoreApi<BookingState>;
28
+ export { bookingStore };
@@ -0,0 +1,5 @@
1
+ import { PropsWithChildren } from 'react';
2
+ import { BookingProps } from './booking-store';
3
+ type BookingProviderProps = PropsWithChildren<BookingProps>;
4
+ declare const BookingProvider: ({ children, ...props }: BookingProviderProps) => import("react/jsx-runtime").JSX.Element;
5
+ export default BookingProvider;
@@ -0,0 +1,11 @@
1
+ import { PropsWithChildren, ReactNode } from 'react';
2
+ import { BookingViewType, Bookings } from '../../@types/booking';
3
+ import { RootEventsProps } from '../../@types/calendar-instance';
4
+ export interface BookingModalContextProps extends RootEventsProps {
5
+ createBookingModal: ReactNode;
6
+ bookings: Bookings;
7
+ viewModes: BookingViewType[];
8
+ }
9
+ type BookingModalContextPropsWithChildren = PropsWithChildren<BookingModalContextProps>;
10
+ declare const BookingModalProvider: ({ children, ...props }: BookingModalContextPropsWithChildren) => import("react/jsx-runtime").JSX.Element;
11
+ export default BookingModalProvider;
@@ -0,0 +1,3 @@
1
+ import { BookingModalContextProps } from './BookingModalProvider';
2
+ declare const BookingModalContext: import('react').Context<BookingModalContextProps | undefined>;
3
+ export default BookingModalContext;
@@ -0,0 +1,9 @@
1
+ import { PropsWithChildren } from 'react';
2
+ import { TimesBlock } from '../../core/slots/Slots';
3
+ interface SlotContext {
4
+ handleTimeClicked: (timesBlock: TimesBlock) => void;
5
+ }
6
+ export declare const SlotDateAndTimeDataContext: import('react').Context<SlotContext>;
7
+ type SlotDateAndTimeDataProvider = PropsWithChildren<SlotContext>;
8
+ declare const SlotDateAndTimeDataProvider: ({ children, handleTimeClicked, }: SlotDateAndTimeDataProvider) => import("react/jsx-runtime").JSX.Element;
9
+ export default SlotDateAndTimeDataProvider;
@@ -0,0 +1,11 @@
1
+ export interface DragProps {
2
+ isDragging: boolean;
3
+ isDelayActive: boolean;
4
+ }
5
+ export interface DragState extends DragProps {
6
+ updateIsDragging: (status: boolean) => void;
7
+ updateIsDelayActive: (status: boolean) => void;
8
+ onChangeIsDelayActive: () => void;
9
+ }
10
+ declare const useDragStore: import('zustand').UseBoundStore<import('zustand').StoreApi<DragState>>;
11
+ export default useDragStore;
@@ -0,0 +1,3 @@
1
+ import { BlockTimeData } from '../../core/slots/EmptySlot';
2
+ declare const setEmptySlotKey: (slotData: BlockTimeData) => string;
3
+ export default setEmptySlotKey;
@@ -0,0 +1,15 @@
1
+ import { SlotTriggerForwardRef } from '../../core/card-slots/SlotTrigger';
2
+ import { BlockTimeData } from '../../core/slots/EmptySlot';
3
+ export type EmptySlotNodes = Map<string, SlotTriggerForwardRef>;
4
+ export interface EmptySlotStore {
5
+ emptySlotNodes: EmptySlotNodes;
6
+ selectedNode: string;
7
+ }
8
+ export interface EmptySlotState extends EmptySlotStore {
9
+ setEmptySlotNode: (node: SlotTriggerForwardRef, slotData: BlockTimeData) => void;
10
+ setSelectedNode: (nodeKey: string, closeView?: boolean) => void;
11
+ resetSelectedNode: () => void;
12
+ resetNodes: () => void;
13
+ }
14
+ declare const useEmptySlotStore: import('zustand').UseBoundStore<import('zustand').StoreApi<EmptySlotState>>;
15
+ export default useEmptySlotStore;
@@ -0,0 +1,18 @@
1
+ import { StateCreator } from 'zustand';
2
+ import { User } from '../../../@types';
3
+ import { Booking, BookingBulkData, BookingDateAndTime, BookingViewType } from '../../../@types/booking';
4
+ export interface BookingInfoProps {
5
+ users: User[];
6
+ bookingViewType: BookingViewType;
7
+ bookingBulkData: BookingBulkData;
8
+ }
9
+ export interface BookingInfoState extends BookingInfoProps {
10
+ updateUsers: (users: User[]) => void;
11
+ setBookingViewType: (bookingType: BookingViewType) => void;
12
+ setBookingBulkData: (bookingBulkData: BookingBulkData) => void;
13
+ updatingBookingBulkData: (booking: Booking, slotDay: number) => void;
14
+ resetBookingResponse: () => void;
15
+ optimisticCardUpdate: (booking: Booking, newStartAt: Date, newFinishDate: Date, slotData: BookingDateAndTime) => void;
16
+ }
17
+ declare const bookingInfoStore: StateCreator<BookingInfoState>;
18
+ export default bookingInfoStore;
@@ -0,0 +1,25 @@
1
+ import { StateCreator } from 'zustand';
2
+ import { HourWithActionsRef } from '../../../core/calendar/HourWithActions';
3
+ import { Times } from '../../../utils/hours';
4
+ export interface NextAndPreviousWeek {
5
+ firstDayOfWeek: Date;
6
+ lastDayOfWeek: Date;
7
+ }
8
+ export interface DayAndWeekProps extends NextAndPreviousWeek {
9
+ hours: Times;
10
+ selectedDay: string | null;
11
+ daysOfWeek: Date[];
12
+ timesRendered: Map<string, HourWithActionsRef>;
13
+ }
14
+ export interface DayAndWeekState extends DayAndWeekProps {
15
+ setTodayDay: (date: Date) => Date;
16
+ setDays: (days: number) => Date[];
17
+ todayWeek: (date?: Date) => NextAndPreviousWeek;
18
+ getWeek: () => NextAndPreviousWeek;
19
+ nextWeek: () => NextAndPreviousWeek;
20
+ previousWeek: () => NextAndPreviousWeek;
21
+ addTimesRendered: (element: HourWithActionsRef, hourKey: string) => void;
22
+ }
23
+ declare const dayAndWeekStore: StateCreator<DayAndWeekState>;
24
+ export type DayAndWeekStore = ReturnType<typeof dayAndWeekStore>;
25
+ export default dayAndWeekStore;
@@ -0,0 +1,12 @@
1
+ import { StateCreator } from 'zustand';
2
+ import { BookingInfoState } from '../booking-info/booking-info';
3
+ import { DayAndWeekState, NextAndPreviousWeek } from '../days-and-week/day-and-week-store';
4
+ type SliceGlobalStore = DayAndWeekState & BookingInfoState;
5
+ export interface SliceGlobalState {
6
+ setWeekAndViewType: (date?: Date) => NextAndPreviousWeek;
7
+ setTodayDayAndViewType: (date: Date) => Date;
8
+ }
9
+ declare const sliceGlobalStore: StateCreator<SliceGlobalStore, [
10
+ ], [
11
+ ], SliceGlobalState>;
12
+ export default sliceGlobalStore;
@@ -0,0 +1,4 @@
1
+ import { default as BookingProvider } from './booking/bookingProvider';
2
+ import { default as BookingModalProvider } from './bookingModal/BookingModalProvider';
3
+ import { default as MonthDescriptionProvider } from './month-description/MonthDescriptionProvider';
4
+ export { MonthDescriptionProvider, BookingModalProvider, BookingProvider };
@@ -0,0 +1,5 @@
1
+ import { PropsWithChildren } from 'react';
2
+ import { MonthDescriptionProps } from './month-description-store';
3
+ type MonthDescriptionProviderProps = PropsWithChildren<MonthDescriptionProps>;
4
+ declare const MonthDescriptionProvider: ({ children, ...props }: MonthDescriptionProviderProps) => import("react/jsx-runtime").JSX.Element;
5
+ export default MonthDescriptionProvider;
@@ -0,0 +1,2 @@
1
+ declare const MonthDescriptionContext: import('react').Context<import('zustand').StoreApi<import('./month-description-store').MonthDescriptionState> | null>;
2
+ export default MonthDescriptionContext;
@@ -0,0 +1,16 @@
1
+ export declare const initialMonthDescriptionState: {
2
+ month: number;
3
+ fullYear: number;
4
+ monthMessage: string;
5
+ };
6
+ export interface MonthDescriptionProps {
7
+ month: number;
8
+ fullYear: number;
9
+ monthMessage: string;
10
+ }
11
+ export interface MonthDescriptionState extends MonthDescriptionProps {
12
+ updateMonthMessage: (monthDescriptionProps: Partial<MonthDescriptionProps>) => void;
13
+ }
14
+ declare const monthDescriptionStore: (initialProps?: Partial<MonthDescriptionState>) => import('zustand').StoreApi<MonthDescriptionState>;
15
+ export type MonthDescriptionStore = ReturnType<typeof monthDescriptionStore>;
16
+ export { monthDescriptionStore };
@@ -0,0 +1,6 @@
1
+ import { PropsWithChildren } from 'react';
2
+ import { NewEventFormProps } from './new-event-store';
3
+ declare const NewEventContext: import('react').Context<import('zustand').StoreApi<import('./new-event-store').NewEventFormState> | null>;
4
+ type NewEventProviderProps = PropsWithChildren<NewEventFormProps>;
5
+ declare const NewEventProvider: ({ children, ...props }: NewEventProviderProps) => import("react/jsx-runtime").JSX.Element;
6
+ export { NewEventProvider, NewEventContext };
@@ -0,0 +1,17 @@
1
+ export interface NewEventFormProps {
2
+ date: string;
3
+ startAt: string;
4
+ finishAt: string;
5
+ }
6
+ export interface NewEventFormState extends NewEventFormProps {
7
+ updateForm: (newEventForm: NewEventFormState) => void;
8
+ updateDynamicForm: (key: string, value: string) => void;
9
+ updateStartAt: (selectedHour: string) => void;
10
+ updateFinishAt: (selectedHour: string) => void;
11
+ updateDate: (dateAsString: string) => void;
12
+ resetForm: () => void;
13
+ }
14
+ export declare const initialFormState: NewEventFormProps;
15
+ export type NewEventStore = ReturnType<typeof newEventFormStore>;
16
+ declare const newEventFormStore: (initProps?: Partial<NewEventFormState>) => import('zustand').StoreApi<NewEventFormState>;
17
+ export { newEventFormStore };
@@ -0,0 +1,6 @@
1
+ import { RootProps } from '../@types/calendar-instance';
2
+ export interface CalendarInstanceRef {
3
+ getStatus: () => boolean;
4
+ }
5
+ declare const Root: ({ viewModes, createBookingModal, onChangeViewType, onCardDropCallback, onDayChange, onTodayClick, onSlotClick, onModalClose, bookings, ref, }: RootProps) => import("react/jsx-runtime").JSX.Element;
6
+ export default Root;
@@ -0,0 +1,7 @@
1
+ import { Booking, BookingDateAndTime } from '../../@types/booking';
2
+ interface BookingCardProps {
3
+ booking: Booking;
4
+ slotData: BookingDateAndTime;
5
+ }
6
+ declare const BookingCard: ({ booking, slotData }: BookingCardProps) => import("react/jsx-runtime").JSX.Element;
7
+ export default BookingCard;
@@ -0,0 +1,20 @@
1
+ import { Dispatch, PropsWithChildren, SetStateAction } from 'react';
2
+ import { Booking } from '../../@types/booking';
3
+ import { SIDE_OPTIONS } from '../../constants';
4
+ interface BookingInfoOptionsProps {
5
+ side: Side;
6
+ booking: Booking;
7
+ onOpenChange: Dispatch<SetStateAction<boolean>>;
8
+ isEditingOpen: boolean;
9
+ }
10
+ export type Side = (typeof SIDE_OPTIONS)[number];
11
+ export interface CardInfoOptions {
12
+ text: string;
13
+ onClick: () => void;
14
+ }
15
+ type BookingInfoOptionsWithChildren = PropsWithChildren<BookingInfoOptionsProps>;
16
+ declare const BookingInfoOptions: {
17
+ ({ isEditingOpen, side, booking, onOpenChange, children, }: BookingInfoOptionsWithChildren): import("react/jsx-runtime").JSX.Element;
18
+ displayName: string;
19
+ };
20
+ export default BookingInfoOptions;
@@ -0,0 +1,2 @@
1
+ declare const CalendarHolder: () => import("react/jsx-runtime").JSX.Element;
2
+ export default CalendarHolder;
@@ -0,0 +1,2 @@
1
+ declare const CalendarView: () => import("react/jsx-runtime").JSX.Element;
2
+ export default CalendarView;
@@ -0,0 +1,11 @@
1
+ import { Ref } from 'react';
2
+ export interface HourWithActionsProps {
3
+ hour: string;
4
+ ref: Ref<HourWithActionsRef>;
5
+ }
6
+ export interface HourWithActionsRef {
7
+ setDisabledHour: () => void;
8
+ setActivateHour: () => void;
9
+ }
10
+ declare const HourWithActions: ({ hour, ref }: HourWithActionsProps) => import("react/jsx-runtime").JSX.Element;
11
+ export default HourWithActions;
@@ -0,0 +1,6 @@
1
+ import { BookingViewType } from '../../@types/booking';
2
+ interface HandleViewTypeProps {
3
+ bookingViewType: BookingViewType;
4
+ }
5
+ declare const HandleViewType: ({ bookingViewType }: HandleViewTypeProps) => import("react/jsx-runtime").JSX.Element | null;
6
+ export default HandleViewType;
@@ -0,0 +1,23 @@
1
+ import { ReactNode, Ref } from 'react';
2
+ import { BlocksTimeStructure } from '../slots/EmptySlot';
3
+ import { TimesBlock } from '../slots/Slots';
4
+ interface SlotEvents {
5
+ onMouseEnterEvent: () => string;
6
+ }
7
+ interface SlotTriggerProps {
8
+ slotData: BlocksTimeStructure;
9
+ slotPosition: TimesBlock;
10
+ disabledCss: string;
11
+ events: SlotEvents;
12
+ border?: boolean;
13
+ children?: ReactNode;
14
+ actualTimerIndicatorChildren?: ReactNode;
15
+ ref: Ref<SlotTriggerForwardRef>;
16
+ }
17
+ export interface SlotTriggerForwardRef {
18
+ showEvent: () => void;
19
+ closeEvent: () => void;
20
+ onOpenCloseChange: (status: boolean) => void;
21
+ }
22
+ declare const SlotTrigger: ({ slotData, slotPosition, disabledCss, events, border, actualTimerIndicatorChildren, children, ref, }: SlotTriggerProps) => import("react/jsx-runtime").JSX.Element;
23
+ export default SlotTrigger;
@@ -0,0 +1,2 @@
1
+ declare const FavoriteBooking: () => import("react/jsx-runtime").JSX.Element;
2
+ export default FavoriteBooking;
@@ -0,0 +1,7 @@
1
+ import { BookingViewType } from '../../@types/booking';
2
+ interface DaysWeekProps {
3
+ daysOfWeek: Date[];
4
+ bookingViewType: BookingViewType;
5
+ }
6
+ declare const DaysWeek: ({ daysOfWeek, bookingViewType }: DaysWeekProps) => import("react/jsx-runtime").JSX.Element;
7
+ export default DaysWeek;
@@ -0,0 +1,9 @@
1
+ export type ActionType = "next" | "previous";
2
+ interface ShortcutButtons {
3
+ label: string;
4
+ codeCommands: string;
5
+ onClick: () => void;
6
+ }
7
+ export type ShortcutButtonsList = ShortcutButtons[];
8
+ declare const Header: () => import("react/jsx-runtime").JSX.Element;
9
+ export default Header;
@@ -0,0 +1,2 @@
1
+ declare const HeaderViewType: () => import("react/jsx-runtime").JSX.Element;
2
+ export default HeaderViewType;