@code-rhapsodie/react-scheduler 0.4.0

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 (142) hide show
  1. package/LICENSE +7 -0
  2. package/dist/App.d.ts +3 -0
  3. package/dist/assets/icons/index.d.ts +3 -0
  4. package/dist/assets/icons/types.d.ts +5 -0
  5. package/dist/components/Calendar/Calendar.d.ts +4 -0
  6. package/dist/components/Calendar/Grid/Grid.d.ts +5 -0
  7. package/dist/components/Calendar/Grid/index.d.ts +1 -0
  8. package/dist/components/Calendar/Grid/styles.d.ts +6 -0
  9. package/dist/components/Calendar/Grid/types.d.ts +10 -0
  10. package/dist/components/Calendar/Header/Header.d.ts +4 -0
  11. package/dist/components/Calendar/Header/Topbar/Topbar.d.ts +4 -0
  12. package/dist/components/Calendar/Header/Topbar/index.d.ts +1 -0
  13. package/dist/components/Calendar/Header/Topbar/styles.d.ts +8 -0
  14. package/dist/components/Calendar/Header/Topbar/types.d.ts +5 -0
  15. package/dist/components/Calendar/Header/index.d.ts +1 -0
  16. package/dist/components/Calendar/Header/styles.d.ts +4 -0
  17. package/dist/components/Calendar/Header/types.d.ts +6 -0
  18. package/dist/components/Calendar/index.d.ts +1 -0
  19. package/dist/components/Calendar/styles.d.ts +4 -0
  20. package/dist/components/Calendar/types.d.ts +12 -0
  21. package/dist/components/ConfigPanel/ConfigPanel.d.ts +4 -0
  22. package/dist/components/ConfigPanel/index.d.ts +1 -0
  23. package/dist/components/ConfigPanel/styles.d.ts +8 -0
  24. package/dist/components/ConfigPanel/types.d.ts +5 -0
  25. package/dist/components/EmptyBox/EmptyBox.d.ts +3 -0
  26. package/dist/components/EmptyBox/index.d.ts +1 -0
  27. package/dist/components/EmptyBox/styles.d.ts +3 -0
  28. package/dist/components/Icon/Icon.d.ts +4 -0
  29. package/dist/components/Icon/index.d.ts +2 -0
  30. package/dist/components/Icon/types.d.ts +8 -0
  31. package/dist/components/IconButton/IconButton.d.ts +4 -0
  32. package/dist/components/IconButton/index.d.ts +1 -0
  33. package/dist/components/IconButton/styles.d.ts +2 -0
  34. package/dist/components/IconButton/types.d.ts +10 -0
  35. package/dist/components/LeftColumn/LeftColumn.d.ts +4 -0
  36. package/dist/components/LeftColumn/LeftColumnItem/LeftColumnItem.d.ts +4 -0
  37. package/dist/components/LeftColumn/LeftColumnItem/index.d.ts +1 -0
  38. package/dist/components/LeftColumn/LeftColumnItem/styles.d.ts +7 -0
  39. package/dist/components/LeftColumn/LeftColumnItem/types.d.ts +14 -0
  40. package/dist/components/LeftColumn/index.d.ts +1 -0
  41. package/dist/components/LeftColumn/styles.d.ts +5 -0
  42. package/dist/components/LeftColumn/types.d.ts +15 -0
  43. package/dist/components/Loader/Loader.d.ts +4 -0
  44. package/dist/components/Loader/index.d.ts +1 -0
  45. package/dist/components/Loader/styles.d.ts +3 -0
  46. package/dist/components/Loader/types.d.ts +6 -0
  47. package/dist/components/PaginationButton/PaginationButton.d.ts +4 -0
  48. package/dist/components/PaginationButton/index.d.ts +1 -0
  49. package/dist/components/PaginationButton/styles.d.ts +5 -0
  50. package/dist/components/PaginationButton/types.d.ts +11 -0
  51. package/dist/components/Scheduler/Scheduler.d.ts +4 -0
  52. package/dist/components/Scheduler/styles.d.ts +3 -0
  53. package/dist/components/Scheduler/types.d.ts +16 -0
  54. package/dist/components/Tiles/Tile/Tile.d.ts +4 -0
  55. package/dist/components/Tiles/Tile/index.d.ts +1 -0
  56. package/dist/components/Tiles/Tile/styles.d.ts +6 -0
  57. package/dist/components/Tiles/Tile/types.d.ts +10 -0
  58. package/dist/components/Tiles/Tiles.d.ts +4 -0
  59. package/dist/components/Tiles/index.d.ts +1 -0
  60. package/dist/components/Tiles/types.d.ts +8 -0
  61. package/dist/components/Toggle/Toggle.d.ts +4 -0
  62. package/dist/components/Toggle/index.d.ts +1 -0
  63. package/dist/components/Toggle/styles.d.ts +4 -0
  64. package/dist/components/Toggle/types.d.ts +3 -0
  65. package/dist/components/Tooltip/Tooltip.d.ts +4 -0
  66. package/dist/components/Tooltip/index.d.ts +1 -0
  67. package/dist/components/Tooltip/styles.d.ts +9 -0
  68. package/dist/components/Tooltip/types.d.ts +5 -0
  69. package/dist/components/index.d.ts +16 -0
  70. package/dist/constants.d.ts +50 -0
  71. package/dist/context/CalendarProvider/CalendarProvider.d.ts +6 -0
  72. package/dist/context/CalendarProvider/calendarContext.d.ts +3 -0
  73. package/dist/context/CalendarProvider/index.d.ts +1 -0
  74. package/dist/context/CalendarProvider/types.d.ts +38 -0
  75. package/dist/context/LocaleProvider/LocaleProvider.d.ts +6 -0
  76. package/dist/context/LocaleProvider/index.d.ts +1 -0
  77. package/dist/context/LocaleProvider/localeContext.d.ts +3 -0
  78. package/dist/context/LocaleProvider/locales.d.ts +9 -0
  79. package/dist/context/LocaleProvider/types.d.ts +34 -0
  80. package/dist/hooks/types.d.ts +39 -0
  81. package/dist/hooks/usePagination.d.ts +3 -0
  82. package/dist/index.cjs +554 -0
  83. package/dist/index.css +2 -0
  84. package/dist/index.d.ts +5 -0
  85. package/dist/index.js +4875 -0
  86. package/dist/locales/de.d.ts +17 -0
  87. package/dist/locales/en.d.ts +17 -0
  88. package/dist/locales/es.d.ts +17 -0
  89. package/dist/locales/fr.d.ts +17 -0
  90. package/dist/locales/he.d.ts +17 -0
  91. package/dist/locales/index.d.ts +10 -0
  92. package/dist/locales/it.d.ts +17 -0
  93. package/dist/locales/lt.d.ts +17 -0
  94. package/dist/locales/pl.d.ts +17 -0
  95. package/dist/locales/ptBR.d.ts +17 -0
  96. package/dist/locales/ro.d.ts +17 -0
  97. package/dist/main.d.ts +1 -0
  98. package/dist/mock/appMock.d.ts +5 -0
  99. package/dist/styles.d.ts +15 -0
  100. package/dist/types/global.d.ts +172 -0
  101. package/dist/types/guards.d.ts +2 -0
  102. package/dist/utils/dates.d.ts +6 -0
  103. package/dist/utils/drawDashedLine.d.ts +2 -0
  104. package/dist/utils/drawGrid/drawCell.d.ts +2 -0
  105. package/dist/utils/drawGrid/drawGrid.d.ts +3 -0
  106. package/dist/utils/drawGrid/drawHourlyView.d.ts +3 -0
  107. package/dist/utils/drawGrid/drawMonthlyView.d.ts +3 -0
  108. package/dist/utils/drawGrid/drawYearlyView.d.ts +3 -0
  109. package/dist/utils/drawHeader/drawHeader.d.ts +3 -0
  110. package/dist/utils/drawHeader/drawRows/DrawZoom2MonthsOnTop.d.ts +3 -0
  111. package/dist/utils/drawHeader/drawRows/drawDaysOnBottom.d.ts +3 -0
  112. package/dist/utils/drawHeader/drawRows/drawMonthsInMiddle.d.ts +3 -0
  113. package/dist/utils/drawHeader/drawRows/drawMonthsOnTop.d.ts +3 -0
  114. package/dist/utils/drawHeader/drawRows/drawWeeksInMiddle.d.ts +3 -0
  115. package/dist/utils/drawHeader/drawRows/drawWeeksOnBottom.d.ts +3 -0
  116. package/dist/utils/drawHeader/drawRows/drawYearsOnTop.d.ts +3 -0
  117. package/dist/utils/drawHeader/drawRows/drawZoom2DaysInMiddle.d.ts +3 -0
  118. package/dist/utils/drawHeader/drawRows/drawZoom2HoursOnBottom.d.ts +3 -0
  119. package/dist/utils/drawRow.d.ts +3 -0
  120. package/dist/utils/getBoxFillStyle.d.ts +3 -0
  121. package/dist/utils/getCanvasWidth.d.ts +1 -0
  122. package/dist/utils/getCols.d.ts +2 -0
  123. package/dist/utils/getDatesRange.d.ts +11 -0
  124. package/dist/utils/getDayOccupancy.d.ts +3 -0
  125. package/dist/utils/getDuration.d.ts +2 -0
  126. package/dist/utils/getHourOccupancy.d.ts +3 -0
  127. package/dist/utils/getOccupancy.d.ts +3 -0
  128. package/dist/utils/getProjectsOnGrid.d.ts +5 -0
  129. package/dist/utils/getTextStyle.d.ts +3 -0
  130. package/dist/utils/getTileProperties.d.ts +3 -0
  131. package/dist/utils/getTileTextColor.d.ts +13 -0
  132. package/dist/utils/getTileXAndWidth.d.ts +5 -0
  133. package/dist/utils/getTimeOccupancy.d.ts +2 -0
  134. package/dist/utils/getTooltipData.d.ts +2 -0
  135. package/dist/utils/getTotalHoursAndMinutes.d.ts +5 -0
  136. package/dist/utils/getTotalRowsPerPage.d.ts +2 -0
  137. package/dist/utils/getWeekOccupancy.d.ts +3 -0
  138. package/dist/utils/resizeCanvas.d.ts +1 -0
  139. package/dist/utils/setProjectsInRows.d.ts +2 -0
  140. package/dist/utils/splitToPages.d.ts +2 -0
  141. package/package.json +98 -0
  142. package/readme.md +369 -0
package/LICENSE ADDED
@@ -0,0 +1,7 @@
1
+ Copyright 2023 Bitnoise
2
+
3
+ Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
4
+
5
+ The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
6
+
7
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
package/dist/App.d.ts ADDED
@@ -0,0 +1,3 @@
1
+ import { JSX } from "react";
2
+ declare function App(): JSX.Element;
3
+ export default App;
@@ -0,0 +1,3 @@
1
+ import { Icon, IconsNames } from "./types";
2
+ declare const icons: Record<IconsNames, Icon>;
3
+ export default icons;
@@ -0,0 +1,5 @@
1
+ import type { ComponentProps, FunctionComponent } from "react";
2
+ export type IconsNames = "add" | "subtract" | "filter" | "arrowLeft" | "arrowRight" | "defaultAvatar" | "calendarWarning" | "calendarFree" | "arrowUp" | "arrowDown" | "search" | "close" | "moon" | "sun";
3
+ export type Icon = FunctionComponent<ComponentProps<"svg"> & {
4
+ title?: string;
5
+ }>;
@@ -0,0 +1,4 @@
1
+ import { FC } from "react";
2
+ import { CalendarProps } from "./types";
3
+ export declare const Calendar: FC<CalendarProps>;
4
+ export default Calendar;
@@ -0,0 +1,5 @@
1
+ import { JSX } from "react";
2
+ import { GridProps } from "./types";
3
+ export declare function Grid({ zoom, rows, data, onTileClick, ref }: GridProps & {
4
+ ref?: React.Ref<HTMLDivElement>;
5
+ }): JSX.Element;
@@ -0,0 +1 @@
1
+ export { Grid } from "./Grid";
@@ -0,0 +1,6 @@
1
+ import { IStyledComponent } from "styled-components";
2
+ export declare const StyledWrapper: IStyledComponent<any, any>;
3
+ export declare const StyledInnerWrapper: IStyledComponent<any, any>;
4
+ export declare const StyledCanvas: IStyledComponent<any, any>;
5
+ export declare const StyledCanvasHeader: IStyledComponent<any, any>;
6
+ export declare const StyledSpan: IStyledComponent<any, any>;
@@ -0,0 +1,10 @@
1
+ import { PaginatedSchedulerData, SchedulerProjectData } from "@/types/global";
2
+ export type GridProps = {
3
+ zoom: number;
4
+ rows: number;
5
+ data: PaginatedSchedulerData;
6
+ onTileClick?: (data: SchedulerProjectData) => void;
7
+ };
8
+ export type StyledSpanProps = {
9
+ position: "left" | "right";
10
+ };
@@ -0,0 +1,4 @@
1
+ import { FC } from "react";
2
+ import { HeaderProps } from "./types";
3
+ declare const Header: FC<HeaderProps>;
4
+ export default Header;
@@ -0,0 +1,4 @@
1
+ import { FC } from "react";
2
+ import { TopbarProps } from "./types";
3
+ declare const Topbar: FC<TopbarProps>;
4
+ export default Topbar;
@@ -0,0 +1 @@
1
+ export { default } from "./Topbar";
@@ -0,0 +1,8 @@
1
+ import { IStyledComponent } from "styled-components";
2
+ export declare const Wrapper: IStyledComponent<any, any>;
3
+ export declare const NavigationWrapper: IStyledComponent<any, any>;
4
+ export declare const NavBtn: IStyledComponent<any, any>;
5
+ export declare const Today: IStyledComponent<any, any>;
6
+ export declare const Zoom: IStyledComponent<any, any>;
7
+ export declare const Filters: IStyledComponent<any, any>;
8
+ export declare const OptionsContainer: IStyledComponent<any, any>;
@@ -0,0 +1,5 @@
1
+ export type TopbarProps = {
2
+ width: number;
3
+ showThemeToggle?: boolean;
4
+ toggleTheme?: () => void;
5
+ };
@@ -0,0 +1 @@
1
+ export { default } from "./Header";
@@ -0,0 +1,4 @@
1
+ import { IStyledComponent } from "styled-components";
2
+ export declare const StyledOuterWrapper: IStyledComponent<any, any>;
3
+ export declare const StyledWrapper: IStyledComponent<any, any>;
4
+ export declare const StyledCanvas: IStyledComponent<any, any>;
@@ -0,0 +1,6 @@
1
+ export type HeaderProps = {
2
+ zoom: number;
3
+ topBarWidth: number;
4
+ showThemeToggle?: boolean;
5
+ toggleTheme?: () => void;
6
+ };
@@ -0,0 +1 @@
1
+ export { default } from "./Calendar";
@@ -0,0 +1,4 @@
1
+ import { IStyledComponent } from "styled-components";
2
+ export declare const StyledOuterWrapper: IStyledComponent<any, any>;
3
+ export declare const StyledInnerWrapper: IStyledComponent<any, any>;
4
+ export declare const StyledEmptyBoxWrapper: IStyledComponent<any, any>;
@@ -0,0 +1,12 @@
1
+ import { SchedulerData, SchedulerItemClickData, SchedulerProjectData } from "@/types/global";
2
+ export type CalendarProps = {
3
+ data: SchedulerData;
4
+ topBarWidth: number;
5
+ onTileClick?: (data: SchedulerProjectData) => void;
6
+ onItemClick?: (data: SchedulerItemClickData) => void;
7
+ toggleTheme?: () => void;
8
+ };
9
+ export type StyledSpanProps = {
10
+ position: "left" | "right";
11
+ };
12
+ export type ProjectsData = [projectsPerPerson: SchedulerProjectData[][][], rowsPerPerson: number[]];
@@ -0,0 +1,4 @@
1
+ import { FC } from "react";
2
+ import { ConfigPanelProps } from "./types";
3
+ declare const ConfigPanel: FC<ConfigPanelProps>;
4
+ export default ConfigPanel;
@@ -0,0 +1 @@
1
+ export { default } from "./ConfigPanel";
@@ -0,0 +1,8 @@
1
+ import { IStyledComponent } from "styled-components";
2
+ export declare const StyledWrapper: IStyledComponent<any, any>;
3
+ export declare const StyledInnerWrapper: IStyledComponent<any, any>;
4
+ export declare const StyledLabel: IStyledComponent<any, any>;
5
+ export declare const StyledInput: IStyledComponent<any, any>;
6
+ export declare const StyledCheckbox: IStyledComponent<any, any>;
7
+ export declare const StyledButton: IStyledComponent<any, any>;
8
+ export declare const StyledForm: IStyledComponent<any, any>;
@@ -0,0 +1,5 @@
1
+ import { ConfigFormValues } from "@/types/global";
2
+ export type ConfigPanelProps = {
3
+ values: ConfigFormValues;
4
+ onSubmit: (values: ConfigFormValues) => void;
5
+ };
@@ -0,0 +1,3 @@
1
+ import { JSX } from "react";
2
+ declare const EmptyBox: () => JSX.Element;
3
+ export default EmptyBox;
@@ -0,0 +1 @@
1
+ export { default } from "./EmptyBox";
@@ -0,0 +1,3 @@
1
+ import { IStyledComponent } from "styled-components";
2
+ export declare const StyledWrapper: IStyledComponent<any, any>;
3
+ export declare const StyledText: IStyledComponent<any, any>;
@@ -0,0 +1,4 @@
1
+ import { IconProps } from "./types";
2
+ import { JSX } from "react";
3
+ declare const Icon: ({ iconName, width, height, fill, className }: IconProps) => JSX.Element | null;
4
+ export default Icon;
@@ -0,0 +1,2 @@
1
+ export { default } from "./Icon";
2
+ export type { IconProps } from "./types";
@@ -0,0 +1,8 @@
1
+ import icons from "@/assets/icons";
2
+ export type IconProps = {
3
+ iconName: keyof typeof icons;
4
+ fill?: string;
5
+ width?: string;
6
+ height?: string;
7
+ className?: string;
8
+ };
@@ -0,0 +1,4 @@
1
+ import { IconButtonProps } from "./types";
2
+ import { JSX } from "react";
3
+ declare const IconButton: ({ iconName, width, height, fill, className, onClick, children, isFullRounded, isDisabled, variant }: IconButtonProps) => JSX.Element;
4
+ export default IconButton;
@@ -0,0 +1 @@
1
+ export { default } from "./IconButton";
@@ -0,0 +1,2 @@
1
+ import { IStyledComponent } from "styled-components";
2
+ export declare const ButtonWrapper: IStyledComponent<any, any>;
@@ -0,0 +1,10 @@
1
+ import { ReactNode } from "react";
2
+ import { IconProps } from "../Icon";
3
+ export type IconButtonVariant = "outlined" | "filled";
4
+ export type IconButtonProps = {
5
+ onClick?: () => void;
6
+ children?: ReactNode;
7
+ isFullRounded?: boolean;
8
+ isDisabled?: boolean;
9
+ variant?: IconButtonVariant;
10
+ } & IconProps;
@@ -0,0 +1,4 @@
1
+ import { FC } from "react";
2
+ import { LeftColumnProps } from "./types";
3
+ declare const LeftColumn: FC<LeftColumnProps>;
4
+ export default LeftColumn;
@@ -0,0 +1,4 @@
1
+ import { FC } from "react";
2
+ import { LeftColumnItemProps } from "./types";
3
+ declare const LeftColumnItem: FC<LeftColumnItemProps>;
4
+ export default LeftColumnItem;
@@ -0,0 +1 @@
1
+ export { default } from "./LeftColumnItem";
@@ -0,0 +1,7 @@
1
+ import { IStyledComponent } from "styled-components";
2
+ export declare const StyledWrapper: IStyledComponent<any, any>;
3
+ export declare const StyledInnerWrapper: IStyledComponent<any, any>;
4
+ export declare const StyledImageWrapper: IStyledComponent<any, any>;
5
+ export declare const StyledImage: IStyledComponent<any, any>;
6
+ export declare const StyledTextWrapper: IStyledComponent<any, any>;
7
+ export declare const StyledText: IStyledComponent<any, any>;
@@ -0,0 +1,14 @@
1
+ import { SchedulerItemClickData, SchedulerRowLabel } from "@/types/global";
2
+ export type LeftColumnItemProps = {
3
+ id: string;
4
+ item: SchedulerRowLabel;
5
+ rows: number;
6
+ onItemClick?: (data: SchedulerItemClickData) => void;
7
+ };
8
+ export type StyledTextProps = {
9
+ isMain?: boolean;
10
+ };
11
+ export type StyledLeftColumnItemWrapperProps = {
12
+ rows: number;
13
+ clickable: boolean;
14
+ };
@@ -0,0 +1 @@
1
+ export { default } from "./LeftColumn";
@@ -0,0 +1,5 @@
1
+ import { IStyledComponent } from "styled-components";
2
+ export declare const StyledWrapper: IStyledComponent<any, any>;
3
+ export declare const StyledLeftColumnHeader: IStyledComponent<any, any>;
4
+ export declare const StyledInput: IStyledComponent<any, any>;
5
+ export declare const StyledInputWrapper: IStyledComponent<any, any>;
@@ -0,0 +1,15 @@
1
+ import { PaginatedSchedulerData, SchedulerItemClickData } from "@/types/global";
2
+ export type LeftColumnProps = {
3
+ data: PaginatedSchedulerData;
4
+ rows: number[];
5
+ pageNum: number;
6
+ pagesAmount: number;
7
+ onLoadNext: () => void;
8
+ onLoadPrevious: () => void;
9
+ searchInputValue: string;
10
+ onSearchInputChange: React.ChangeEventHandler<HTMLInputElement>;
11
+ onItemClick?: (data: SchedulerItemClickData) => void;
12
+ };
13
+ export type StyledInputWrapperProps = {
14
+ isFocused: boolean;
15
+ };
@@ -0,0 +1,4 @@
1
+ import { FC } from "react";
2
+ import { LoaderProps } from "./types";
3
+ declare const Loader: FC<LoaderProps>;
4
+ export default Loader;
@@ -0,0 +1 @@
1
+ export { default } from "./Loader";
@@ -0,0 +1,3 @@
1
+ import { IStyledComponent } from "styled-components";
2
+ export declare const StyledWrapper: IStyledComponent<any, any>;
3
+ export declare const StyledWalker: IStyledComponent<any, any>;
@@ -0,0 +1,6 @@
1
+ export interface StyledWrapperProps {
2
+ position: "left" | "right";
3
+ }
4
+ export interface LoaderProps extends StyledWrapperProps {
5
+ isLoading: boolean;
6
+ }
@@ -0,0 +1,4 @@
1
+ import { FC } from "react";
2
+ import { PaginationButtonProps } from "./types";
3
+ declare const PaginationButton: FC<PaginationButtonProps>;
4
+ export default PaginationButton;
@@ -0,0 +1 @@
1
+ export { default } from "./PaginationButton";
@@ -0,0 +1,5 @@
1
+ import { IStyledComponent } from "styled-components";
2
+ export declare const StyledWrapper: IStyledComponent<any, any>;
3
+ export declare const StyledButton: IStyledComponent<any, any>;
4
+ export declare const StyledIconWrapper: IStyledComponent<any, any>;
5
+ export declare const StyledText: IStyledComponent<any, any>;
@@ -0,0 +1,11 @@
1
+ export type PaginationButtonProps = {
2
+ intent: "previous" | "next";
3
+ isVisible: boolean;
4
+ onClick: () => void;
5
+ pageNum: number;
6
+ pagesAmount: number;
7
+ icon?: React.ReactNode;
8
+ };
9
+ export type StyledPaginationButton = {
10
+ isVisible: boolean;
11
+ };
@@ -0,0 +1,4 @@
1
+ import { JSX } from "react";
2
+ import { SchedulerProps } from "./types";
3
+ declare const Scheduler: ({ data, config, startDate, onRangeChange, onTileClick, onFilterData, onClearFilterData, onItemClick, isLoading }: SchedulerProps) => JSX.Element;
4
+ export default Scheduler;
@@ -0,0 +1,3 @@
1
+ import { IStyledComponent } from "styled-components";
2
+ export declare const StyledOutsideWrapper: IStyledComponent<any, any>;
3
+ export declare const StyledInnerWrapper: IStyledComponent<any, any>;
@@ -0,0 +1,16 @@
1
+ import { Config, SchedulerData, SchedulerItemClickData, SchedulerProjectData } from "@/types/global";
2
+ import { ParsedDatesRange } from "@/utils/getDatesRange";
3
+ export type SchedulerProps = {
4
+ data: SchedulerData;
5
+ isLoading?: boolean;
6
+ config?: Config;
7
+ startDate?: string;
8
+ onRangeChange?: (range: ParsedDatesRange) => void;
9
+ onTileClick?: (data: SchedulerProjectData) => void;
10
+ onFilterData?: () => void;
11
+ onClearFilterData?: () => void;
12
+ onItemClick?: (data: SchedulerItemClickData) => void;
13
+ };
14
+ export type StyledOutsideWrapperProps = {
15
+ showScroll: boolean;
16
+ };
@@ -0,0 +1,4 @@
1
+ import { FC } from "react";
2
+ import { TileProps } from "./types";
3
+ declare const Tile: FC<TileProps>;
4
+ export default Tile;
@@ -0,0 +1 @@
1
+ export { default } from "./Tile";
@@ -0,0 +1,6 @@
1
+ import { IStyledComponent } from "styled-components";
2
+ export declare const StyledTileWrapper: IStyledComponent<any, any>;
3
+ export declare const StyledTextWrapper: IStyledComponent<any, any>;
4
+ export declare const StyledText: IStyledComponent<any, any>;
5
+ export declare const StyledDescription: IStyledComponent<any, any>;
6
+ export declare const StyledStickyWrapper: IStyledComponent<any, any>;
@@ -0,0 +1,10 @@
1
+ import { SchedulerProjectData } from "@/types/global";
2
+ export type TileProps = {
3
+ row: number;
4
+ data: SchedulerProjectData;
5
+ zoom: number;
6
+ onTileClick?: (data: SchedulerProjectData) => void;
7
+ };
8
+ export type StyledTextProps = {
9
+ bold?: boolean;
10
+ };
@@ -0,0 +1,4 @@
1
+ import { FC } from "react";
2
+ import { TilesProps } from "./types";
3
+ declare const Tiles: FC<TilesProps>;
4
+ export default Tiles;
@@ -0,0 +1 @@
1
+ export { default } from "./Tiles";
@@ -0,0 +1,8 @@
1
+ import type { JSX } from "react";
2
+ import { PaginatedSchedulerData, SchedulerProjectData } from "@/types/global";
3
+ export type TilesProps = {
4
+ zoom: number;
5
+ data: PaginatedSchedulerData;
6
+ onTileClick?: (data: SchedulerProjectData) => void;
7
+ };
8
+ export type PlacedTiles = JSX.Element[];
@@ -0,0 +1,4 @@
1
+ import { FC } from "react";
2
+ import { ToggleProps } from "./types";
3
+ declare const Toggle: FC<ToggleProps>;
4
+ export default Toggle;
@@ -0,0 +1 @@
1
+ export { default } from "./Toggle";
@@ -0,0 +1,4 @@
1
+ import { IStyledComponent } from "styled-components";
2
+ export declare const ToggleContainer: IStyledComponent<any, any>;
3
+ export declare const ToggleCircle: IStyledComponent<any, any>;
4
+ export declare const IconContainer: IStyledComponent<any, any>;
@@ -0,0 +1,3 @@
1
+ export type ToggleProps = {
2
+ toggleTheme?: () => void;
3
+ };
@@ -0,0 +1,4 @@
1
+ import { FC } from "react";
2
+ import { TooltipProps } from "./types";
3
+ declare const Tooltip: FC<TooltipProps>;
4
+ export default Tooltip;
@@ -0,0 +1 @@
1
+ export { default } from "./Tooltip";
@@ -0,0 +1,9 @@
1
+ import { IStyledComponent } from "styled-components";
2
+ export declare const StyledTooltipWrapper: IStyledComponent<any, any>;
3
+ export declare const StyledTooltipContent: IStyledComponent<any, any>;
4
+ export declare const StyledTooltipBeak: IStyledComponent<any, any>;
5
+ export declare const StyledContentWrapper: IStyledComponent<any, any>;
6
+ export declare const StyledInnerWrapper: IStyledComponent<any, any>;
7
+ export declare const StyledTextWrapper: IStyledComponent<any, any>;
8
+ export declare const StyledText: IStyledComponent<any, any>;
9
+ export declare const StyledOvertimeWarning: IStyledComponent<any, any>;
@@ -0,0 +1,5 @@
1
+ import { TooltipData } from "@/types/global";
2
+ export type TooltipProps = {
3
+ tooltipData: TooltipData;
4
+ zoom: number;
5
+ };
@@ -0,0 +1,16 @@
1
+ export { Grid as Grid } from "./Calendar/Grid";
2
+ export { default as Calendar } from "./Calendar";
3
+ export { default as Topbar } from "./Calendar/Header/Topbar";
4
+ export { default as Icon } from "./Icon";
5
+ export { default as IconButton } from "./IconButton";
6
+ export { default as Scheduler } from "./Scheduler/Scheduler";
7
+ export { default as LeftColumn } from "./LeftColumn/LeftColumn";
8
+ export { default as LeftColumnItem } from "./LeftColumn/LeftColumnItem";
9
+ export { default as Loader } from "./Loader";
10
+ export { default as Header } from "./Calendar/Header";
11
+ export { default as Tile } from "./Tiles/Tile";
12
+ export { default as Tiles } from "./Tiles";
13
+ export { default as ConfigPanel } from "./ConfigPanel";
14
+ export { default as Tooltip } from "./Tooltip";
15
+ export { default as PaginationButton } from "./PaginationButton";
16
+ export { default as Toggle } from "./Toggle";
@@ -0,0 +1,50 @@
1
+ export declare const dayWidth = 50;
2
+ export declare const headerMonthHeight = 24;
3
+ export declare const headerWeekHeight = 16;
4
+ export declare const headerDayHeight = 40;
5
+ export declare const headerHeight: number;
6
+ export declare const weekWidth = 84;
7
+ export declare const boxHeight = 56;
8
+ export declare const leftColumnWidth = 196;
9
+ export declare const singleDayWidth: number;
10
+ export declare const zoom2ColumnWidth = 50;
11
+ export declare const zoom2HeaderTopRowHeight = 24;
12
+ export declare const zoom2HeaderMiddleRowHeight = 16;
13
+ export declare const zoom2HeaderBottomRowHeight = 40;
14
+ export declare const zoom2HeaderHeight: number;
15
+ export declare const zoom2ButtonJump = 1;
16
+ export declare const weeksInYear = 52;
17
+ export declare const navHeight = 44;
18
+ export declare const fonts: {
19
+ topRow: string;
20
+ middleRow: string;
21
+ bottomRow: {
22
+ name: string;
23
+ number: string;
24
+ };
25
+ };
26
+ export declare const screenWidthMultiplier = 3;
27
+ export declare const dayNameYoffset = 1.6;
28
+ export declare const dayNumYOffset = 4.5;
29
+ export declare const monthsInYear = 12;
30
+ export declare const hoursInDay = 24;
31
+ export declare const canvasHeaderWrapperId = "reactSchedulerCanvasHeaderWrapper";
32
+ export declare const canvasWrapperId = "reactSchedulerCanvasWrapper";
33
+ export declare const outsideWrapperId: string;
34
+ export declare const tileYOffset = 4;
35
+ export declare const tileHeight = 48;
36
+ export declare const formFieldsIds: {
37
+ peopleCount: string;
38
+ projectsPerYear: string;
39
+ yearsCovered: string;
40
+ startDate: string;
41
+ maxRecordsPerPage: string;
42
+ isFullscreen: string;
43
+ };
44
+ export declare const businessDays = 5;
45
+ export declare const maxHoursPerWeek = 40;
46
+ export declare const maxHoursPerDay = 8;
47
+ export declare const topRowTextYPos: number;
48
+ export declare const middleRowTextYPos: number;
49
+ export declare const buttonWeeksJump = 2;
50
+ export declare const minutesInHour = 60;
@@ -0,0 +1,6 @@
1
+ import { JSX } from "react";
2
+ import { CalendarContextType, CalendarProviderProps } from "./types";
3
+ declare const CalendarProvider: ({ data, children, isLoading, config, defaultStartDate, onRangeChange, onFilterData, onClearFilterData }: CalendarProviderProps) => JSX.Element;
4
+ declare const useCalendar: () => CalendarContextType;
5
+ export default CalendarProvider;
6
+ export { useCalendar };
@@ -0,0 +1,3 @@
1
+ import { Context } from "react";
2
+ import { CalendarContextType } from "./types";
3
+ export declare const calendarContext: Context<CalendarContextType>;
@@ -0,0 +1 @@
1
+ export { default, useCalendar } from "./CalendarProvider";
@@ -0,0 +1,38 @@
1
+ import { ReactNode } from "react";
2
+ import dayjs from "dayjs";
3
+ import { Config, Coords, Day, SchedulerData, ZoomLevel } from "@/types/global";
4
+ import { ParsedDatesRange } from "@/utils/getDatesRange";
5
+ export type CalendarContextType = {
6
+ handleGoNext: () => void;
7
+ handleScrollNext: () => void;
8
+ handleGoPrev: () => void;
9
+ handleScrollPrev: () => void;
10
+ handleGoToday: () => void;
11
+ zoomIn: () => void;
12
+ zoomOut: () => void;
13
+ handleFilterData: () => void;
14
+ updateTilesCoords: (coords: Coords[]) => void;
15
+ onClearFilterData?: () => void;
16
+ data?: SchedulerData;
17
+ tilesCoords: Coords[];
18
+ zoom: ZoomLevel;
19
+ isNextZoom: boolean;
20
+ isPrevZoom: boolean;
21
+ date: dayjs.Dayjs;
22
+ isLoading: boolean;
23
+ cols: number;
24
+ startDate: Day;
25
+ dayOfYear: number;
26
+ recordsThreshold: number;
27
+ config: Config;
28
+ };
29
+ export type CalendarProviderProps = {
30
+ children: ReactNode;
31
+ isLoading: boolean;
32
+ defaultStartDate?: dayjs.Dayjs;
33
+ data?: SchedulerData;
34
+ config: Config;
35
+ onRangeChange?: (range: ParsedDatesRange) => void;
36
+ onFilterData?: () => void;
37
+ onClearFilterData?: () => void;
38
+ };
@@ -0,0 +1,6 @@
1
+ import { JSX } from "react";
2
+ import { LocaleProviderProps, Translation } from "./types";
3
+ declare const LocaleProvider: ({ children, lang, translations }: LocaleProviderProps) => JSX.Element;
4
+ declare const useLanguage: () => Translation;
5
+ export default LocaleProvider;
6
+ export { useLanguage };
@@ -0,0 +1 @@
1
+ export { default, useLanguage } from "./LocaleProvider";
@@ -0,0 +1,3 @@
1
+ import { Context } from "react";
2
+ import { LocaleContextType } from "./types";
3
+ export declare const localeContext: Context<LocaleContextType>;
@@ -0,0 +1,9 @@
1
+ import { LocaleType } from "./types";
2
+ export declare const localesData: LocaleType[];
3
+ declare class Locales {
4
+ locales: LocaleType[];
5
+ getLocales(): LocaleType[];
6
+ addLocales(locale: LocaleType): void;
7
+ }
8
+ declare const locales: Locales;
9
+ export { locales };