@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.
- package/LICENSE +7 -0
- package/dist/App.d.ts +3 -0
- package/dist/assets/icons/index.d.ts +3 -0
- package/dist/assets/icons/types.d.ts +5 -0
- package/dist/components/Calendar/Calendar.d.ts +4 -0
- package/dist/components/Calendar/Grid/Grid.d.ts +5 -0
- package/dist/components/Calendar/Grid/index.d.ts +1 -0
- package/dist/components/Calendar/Grid/styles.d.ts +6 -0
- package/dist/components/Calendar/Grid/types.d.ts +10 -0
- package/dist/components/Calendar/Header/Header.d.ts +4 -0
- package/dist/components/Calendar/Header/Topbar/Topbar.d.ts +4 -0
- package/dist/components/Calendar/Header/Topbar/index.d.ts +1 -0
- package/dist/components/Calendar/Header/Topbar/styles.d.ts +8 -0
- package/dist/components/Calendar/Header/Topbar/types.d.ts +5 -0
- package/dist/components/Calendar/Header/index.d.ts +1 -0
- package/dist/components/Calendar/Header/styles.d.ts +4 -0
- package/dist/components/Calendar/Header/types.d.ts +6 -0
- package/dist/components/Calendar/index.d.ts +1 -0
- package/dist/components/Calendar/styles.d.ts +4 -0
- package/dist/components/Calendar/types.d.ts +12 -0
- package/dist/components/ConfigPanel/ConfigPanel.d.ts +4 -0
- package/dist/components/ConfigPanel/index.d.ts +1 -0
- package/dist/components/ConfigPanel/styles.d.ts +8 -0
- package/dist/components/ConfigPanel/types.d.ts +5 -0
- package/dist/components/EmptyBox/EmptyBox.d.ts +3 -0
- package/dist/components/EmptyBox/index.d.ts +1 -0
- package/dist/components/EmptyBox/styles.d.ts +3 -0
- package/dist/components/Icon/Icon.d.ts +4 -0
- package/dist/components/Icon/index.d.ts +2 -0
- package/dist/components/Icon/types.d.ts +8 -0
- package/dist/components/IconButton/IconButton.d.ts +4 -0
- package/dist/components/IconButton/index.d.ts +1 -0
- package/dist/components/IconButton/styles.d.ts +2 -0
- package/dist/components/IconButton/types.d.ts +10 -0
- package/dist/components/LeftColumn/LeftColumn.d.ts +4 -0
- package/dist/components/LeftColumn/LeftColumnItem/LeftColumnItem.d.ts +4 -0
- package/dist/components/LeftColumn/LeftColumnItem/index.d.ts +1 -0
- package/dist/components/LeftColumn/LeftColumnItem/styles.d.ts +7 -0
- package/dist/components/LeftColumn/LeftColumnItem/types.d.ts +14 -0
- package/dist/components/LeftColumn/index.d.ts +1 -0
- package/dist/components/LeftColumn/styles.d.ts +5 -0
- package/dist/components/LeftColumn/types.d.ts +15 -0
- package/dist/components/Loader/Loader.d.ts +4 -0
- package/dist/components/Loader/index.d.ts +1 -0
- package/dist/components/Loader/styles.d.ts +3 -0
- package/dist/components/Loader/types.d.ts +6 -0
- package/dist/components/PaginationButton/PaginationButton.d.ts +4 -0
- package/dist/components/PaginationButton/index.d.ts +1 -0
- package/dist/components/PaginationButton/styles.d.ts +5 -0
- package/dist/components/PaginationButton/types.d.ts +11 -0
- package/dist/components/Scheduler/Scheduler.d.ts +4 -0
- package/dist/components/Scheduler/styles.d.ts +3 -0
- package/dist/components/Scheduler/types.d.ts +16 -0
- package/dist/components/Tiles/Tile/Tile.d.ts +4 -0
- package/dist/components/Tiles/Tile/index.d.ts +1 -0
- package/dist/components/Tiles/Tile/styles.d.ts +6 -0
- package/dist/components/Tiles/Tile/types.d.ts +10 -0
- package/dist/components/Tiles/Tiles.d.ts +4 -0
- package/dist/components/Tiles/index.d.ts +1 -0
- package/dist/components/Tiles/types.d.ts +8 -0
- package/dist/components/Toggle/Toggle.d.ts +4 -0
- package/dist/components/Toggle/index.d.ts +1 -0
- package/dist/components/Toggle/styles.d.ts +4 -0
- package/dist/components/Toggle/types.d.ts +3 -0
- package/dist/components/Tooltip/Tooltip.d.ts +4 -0
- package/dist/components/Tooltip/index.d.ts +1 -0
- package/dist/components/Tooltip/styles.d.ts +9 -0
- package/dist/components/Tooltip/types.d.ts +5 -0
- package/dist/components/index.d.ts +16 -0
- package/dist/constants.d.ts +50 -0
- package/dist/context/CalendarProvider/CalendarProvider.d.ts +6 -0
- package/dist/context/CalendarProvider/calendarContext.d.ts +3 -0
- package/dist/context/CalendarProvider/index.d.ts +1 -0
- package/dist/context/CalendarProvider/types.d.ts +38 -0
- package/dist/context/LocaleProvider/LocaleProvider.d.ts +6 -0
- package/dist/context/LocaleProvider/index.d.ts +1 -0
- package/dist/context/LocaleProvider/localeContext.d.ts +3 -0
- package/dist/context/LocaleProvider/locales.d.ts +9 -0
- package/dist/context/LocaleProvider/types.d.ts +34 -0
- package/dist/hooks/types.d.ts +39 -0
- package/dist/hooks/usePagination.d.ts +3 -0
- package/dist/index.cjs +554 -0
- package/dist/index.css +2 -0
- package/dist/index.d.ts +5 -0
- package/dist/index.js +4875 -0
- package/dist/locales/de.d.ts +17 -0
- package/dist/locales/en.d.ts +17 -0
- package/dist/locales/es.d.ts +17 -0
- package/dist/locales/fr.d.ts +17 -0
- package/dist/locales/he.d.ts +17 -0
- package/dist/locales/index.d.ts +10 -0
- package/dist/locales/it.d.ts +17 -0
- package/dist/locales/lt.d.ts +17 -0
- package/dist/locales/pl.d.ts +17 -0
- package/dist/locales/ptBR.d.ts +17 -0
- package/dist/locales/ro.d.ts +17 -0
- package/dist/main.d.ts +1 -0
- package/dist/mock/appMock.d.ts +5 -0
- package/dist/styles.d.ts +15 -0
- package/dist/types/global.d.ts +172 -0
- package/dist/types/guards.d.ts +2 -0
- package/dist/utils/dates.d.ts +6 -0
- package/dist/utils/drawDashedLine.d.ts +2 -0
- package/dist/utils/drawGrid/drawCell.d.ts +2 -0
- package/dist/utils/drawGrid/drawGrid.d.ts +3 -0
- package/dist/utils/drawGrid/drawHourlyView.d.ts +3 -0
- package/dist/utils/drawGrid/drawMonthlyView.d.ts +3 -0
- package/dist/utils/drawGrid/drawYearlyView.d.ts +3 -0
- package/dist/utils/drawHeader/drawHeader.d.ts +3 -0
- package/dist/utils/drawHeader/drawRows/DrawZoom2MonthsOnTop.d.ts +3 -0
- package/dist/utils/drawHeader/drawRows/drawDaysOnBottom.d.ts +3 -0
- package/dist/utils/drawHeader/drawRows/drawMonthsInMiddle.d.ts +3 -0
- package/dist/utils/drawHeader/drawRows/drawMonthsOnTop.d.ts +3 -0
- package/dist/utils/drawHeader/drawRows/drawWeeksInMiddle.d.ts +3 -0
- package/dist/utils/drawHeader/drawRows/drawWeeksOnBottom.d.ts +3 -0
- package/dist/utils/drawHeader/drawRows/drawYearsOnTop.d.ts +3 -0
- package/dist/utils/drawHeader/drawRows/drawZoom2DaysInMiddle.d.ts +3 -0
- package/dist/utils/drawHeader/drawRows/drawZoom2HoursOnBottom.d.ts +3 -0
- package/dist/utils/drawRow.d.ts +3 -0
- package/dist/utils/getBoxFillStyle.d.ts +3 -0
- package/dist/utils/getCanvasWidth.d.ts +1 -0
- package/dist/utils/getCols.d.ts +2 -0
- package/dist/utils/getDatesRange.d.ts +11 -0
- package/dist/utils/getDayOccupancy.d.ts +3 -0
- package/dist/utils/getDuration.d.ts +2 -0
- package/dist/utils/getHourOccupancy.d.ts +3 -0
- package/dist/utils/getOccupancy.d.ts +3 -0
- package/dist/utils/getProjectsOnGrid.d.ts +5 -0
- package/dist/utils/getTextStyle.d.ts +3 -0
- package/dist/utils/getTileProperties.d.ts +3 -0
- package/dist/utils/getTileTextColor.d.ts +13 -0
- package/dist/utils/getTileXAndWidth.d.ts +5 -0
- package/dist/utils/getTimeOccupancy.d.ts +2 -0
- package/dist/utils/getTooltipData.d.ts +2 -0
- package/dist/utils/getTotalHoursAndMinutes.d.ts +5 -0
- package/dist/utils/getTotalRowsPerPage.d.ts +2 -0
- package/dist/utils/getWeekOccupancy.d.ts +3 -0
- package/dist/utils/resizeCanvas.d.ts +1 -0
- package/dist/utils/setProjectsInRows.d.ts +2 -0
- package/dist/utils/splitToPages.d.ts +2 -0
- package/package.json +98 -0
- 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,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 @@
|
|
|
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 @@
|
|
|
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 @@
|
|
|
1
|
+
export { default } from "./Header";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from "./Calendar";
|
|
@@ -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 @@
|
|
|
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 @@
|
|
|
1
|
+
export { default } from "./EmptyBox";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from "./IconButton";
|
|
@@ -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 @@
|
|
|
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 @@
|
|
|
1
|
+
export { default } from "./Loader";
|
|
@@ -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,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,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 @@
|
|
|
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 @@
|
|
|
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 @@
|
|
|
1
|
+
export { default } from "./Toggle";
|
|
@@ -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,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 @@
|
|
|
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,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 };
|