react-timelane 0.0.1 → 0.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/Timelane.d.ts +17 -0
- package/dist/components/TimelaneAside.d.ts +13 -0
- package/dist/components/TimelaneBackground.d.ts +5 -0
- package/dist/components/TimelaneBody.d.ts +6 -0
- package/dist/components/TimelaneBodyInner.d.ts +16 -0
- package/dist/components/{TimelineHeader/TimelineHeader.d.ts → TimelaneHeader/TimelaneHeader.d.ts} +2 -2
- package/dist/components/{TimelineHeader → TimelaneHeader}/index.d.ts +1 -1
- package/dist/components/{core/CoreItem → TimelaneItem}/DragResizeComponent.d.ts +2 -2
- package/dist/components/TimelaneItem/TimelaneItem.d.ts +14 -0
- package/dist/components/{core/CoreSwimlane → TimelaneLane}/AvailableSpaceIndicator.d.ts +3 -3
- package/dist/components/{core/CoreSwimlane → TimelaneLane}/DropTarget.d.ts +1 -1
- package/dist/components/{core/CoreSwimlane → TimelaneLane}/OverlapIndicator.d.ts +1 -1
- package/dist/components/{core/CoreSwimlane/CoreSwimlane.d.ts → TimelaneLane/TimelaneLane.d.ts} +7 -7
- package/dist/components/TimelaneLayout/TimelaneLayout.d.ts +23 -0
- package/dist/components/TimelaneSelectionLayer.d.ts +6 -0
- package/dist/components/TimelaneSettingsContext.d.ts +7 -0
- package/dist/components/TimelaneSettingsProvider.d.ts +7 -0
- package/dist/components/{TimelineWrapper.d.ts → TimelaneWrapper.d.ts} +7 -4
- package/dist/components/utils.d.ts +27 -0
- package/dist/hooks/useScroll.d.ts +3 -3
- package/dist/hooks/useTimelaneContext.d.ts +1 -0
- package/dist/index.d.ts +10 -11
- package/dist/react-timelane.css +1 -1
- package/dist/react-timelane.js +1122 -1169
- package/dist/types/Item.d.ts +12 -0
- package/dist/types/Lane.d.ts +5 -0
- package/dist/types/LaneId.d.ts +1 -0
- package/dist/types/{TimelineSettings.d.ts → TimelaneSettings.d.ts} +1 -1
- package/dist/types/index.d.ts +4 -4
- package/package.json +1 -1
- package/vite.config.ts +1 -1
- package/dist/components/TimelineAside.d.ts +0 -13
- package/dist/components/TimelineBackground.d.ts +0 -5
- package/dist/components/TimelineBody.d.ts +0 -13
- package/dist/components/TimelineSelectionLayer.d.ts +0 -6
- package/dist/components/TimelineSettingsContext.d.ts +0 -7
- package/dist/components/TimelineSettingsProvider.d.ts +0 -7
- package/dist/components/core/CoreItem/CoreItemComponent.d.ts +0 -14
- package/dist/components/core/CoreSwimlane/utils.d.ts +0 -13
- package/dist/components/core/utils.d.ts +0 -15
- package/dist/components/layout/TimelineLayout.d.ts +0 -23
- package/dist/hooks/useTimelineContext.d.ts +0 -1
- package/dist/types/CoreItem.d.ts +0 -12
- package/dist/types/SwimlaneId.d.ts +0 -1
- package/dist/types/SwimlaneT.d.ts +0 -5
- /package/dist/components/{TimelineHeader → TimelaneHeader}/DaysHeader.d.ts +0 -0
- /package/dist/components/{TimelineHeader → TimelaneHeader}/MonthsHeader.d.ts +0 -0
- /package/dist/components/{TimelineHeader → TimelaneHeader}/WeeksHeader.d.ts +0 -0
- /package/dist/components/{TimelineHeader → TimelaneHeader}/renderingUtils.d.ts +0 -0
- /package/dist/components/{core/CoreSwimlane → TimelaneLane}/DropPreview.d.ts +0 -0
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { PropsWithChildren } from 'react';
|
|
2
|
+
import { TimelaneLane } from './TimelaneLane/TimelaneLane';
|
|
3
|
+
import { TimelaneBody } from './TimelaneBody';
|
|
4
|
+
import { TimelaneLayout } from './TimelaneLayout/TimelaneLayout';
|
|
5
|
+
import { TimelaneHeader } from './TimelaneHeader/TimelaneHeader';
|
|
6
|
+
import { TimelaneBackground } from './TimelaneBackground';
|
|
7
|
+
import { TimelaneAside } from './TimelaneAside';
|
|
8
|
+
export declare function Timelane({ children }: PropsWithChildren): import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
export declare namespace Timelane {
|
|
10
|
+
var Container: typeof Timelane;
|
|
11
|
+
var Header: typeof TimelaneHeader;
|
|
12
|
+
var Body: typeof TimelaneBody;
|
|
13
|
+
var Background: typeof TimelaneBackground;
|
|
14
|
+
var Aside: typeof TimelaneAside;
|
|
15
|
+
var Lane: typeof TimelaneLane;
|
|
16
|
+
var Layout: typeof TimelaneLayout;
|
|
17
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { MouseEvent, ReactElement } from 'react';
|
|
2
|
+
import { Lane } from '../types';
|
|
3
|
+
interface TimelaneAsideProps {
|
|
4
|
+
lanes: Lane[];
|
|
5
|
+
focusedLane?: Lane | null;
|
|
6
|
+
setFocusedLane?: (lane: Lane | null) => void;
|
|
7
|
+
onLaneHeaderClick?: (lane: Lane, e: MouseEvent) => void;
|
|
8
|
+
onLaneHeaderDoubleClick?: (lane: Lane, e: MouseEvent) => void;
|
|
9
|
+
onLaneHeaderContextMenu?: (lane: Lane, e: MouseEvent) => void;
|
|
10
|
+
renderLaneHeader?: (lane: Lane) => ReactElement;
|
|
11
|
+
}
|
|
12
|
+
export declare function TimelaneAside({ lanes, focusedLane, setFocusedLane, onLaneHeaderClick, onLaneHeaderDoubleClick, onLaneHeaderContextMenu, renderLaneHeader, }: TimelaneAsideProps): import("react/jsx-runtime").JSX.Element;
|
|
13
|
+
export {};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { PropsWithChildren } from 'react';
|
|
2
|
+
interface TimelaneBodyProps {
|
|
3
|
+
onSelect?: (selection: number[]) => void;
|
|
4
|
+
}
|
|
5
|
+
export declare function TimelaneBody({ onSelect, children, }: PropsWithChildren<TimelaneBodyProps>): import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
export {};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { MouseEvent, ReactElement } from 'react';
|
|
2
|
+
import { AvailableSpace, Item, Lane } from '../types';
|
|
3
|
+
interface TimelaneBodyInnerProps<T> {
|
|
4
|
+
lanes: Lane[];
|
|
5
|
+
items: Item<T>[];
|
|
6
|
+
renderItem?: (item: Item<T>, isDragged: boolean) => ReactElement;
|
|
7
|
+
onItemUpdate?: (item: Item<T>) => void;
|
|
8
|
+
onLaneClick?: (lane: Lane, when: Date, availableSpace: AvailableSpace | null, e: MouseEvent) => void;
|
|
9
|
+
onLaneDoubleClick?: (lane: Lane, when: Date, availableSpace: AvailableSpace | null, e: MouseEvent) => void;
|
|
10
|
+
onLaneContextMenu?: (lane: Lane, when: Date, e: MouseEvent) => void;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* @deprecated The component should not be used
|
|
14
|
+
*/
|
|
15
|
+
export declare function TimelaneBodyInner<T>({ lanes, items, renderItem, onItemUpdate, onLaneClick, onLaneDoubleClick, onLaneContextMenu, }: TimelaneBodyInnerProps<T>): import("react/jsx-runtime").JSX.Element;
|
|
16
|
+
export {};
|
package/dist/components/{TimelineHeader/TimelineHeader.d.ts → TimelaneHeader/TimelaneHeader.d.ts}
RENAMED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { MouseEvent, ReactElement } from 'react';
|
|
2
|
-
interface
|
|
2
|
+
interface TimelaneHeaderProps {
|
|
3
3
|
focusedDay?: Date | null;
|
|
4
4
|
setFocusedDay?: (day: Date | null) => void;
|
|
5
5
|
renderMonthHeader?: (firstDay: Date, lastDay: Date) => ReactElement;
|
|
@@ -20,5 +20,5 @@ interface TimelineHeaderProps {
|
|
|
20
20
|
e: MouseEvent;
|
|
21
21
|
}) => void;
|
|
22
22
|
}
|
|
23
|
-
export declare function
|
|
23
|
+
export declare function TimelaneHeader({ focusedDay, setFocusedDay, renderMonthHeader, renderWeekHeader, renderDayHeader, onMonthClick, onDayClick, onWeekClick, }: TimelaneHeaderProps): import("react/jsx-runtime").JSX.Element;
|
|
24
24
|
export {};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export { DaysHeader } from './DaysHeader';
|
|
2
2
|
export { WeeksHeader } from './WeeksHeader';
|
|
3
3
|
export { MonthsHeader } from './MonthsHeader';
|
|
4
|
-
export {
|
|
4
|
+
export { TimelaneHeader } from './TimelaneHeader';
|
|
5
5
|
export { renderDayHeader, renderMonthHeader, renderWeekHeader, } from './renderingUtils';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { PropsWithChildren } from 'react';
|
|
2
|
-
import { Position, Rectangle, Dimensions,
|
|
2
|
+
import { Position, Rectangle, Dimensions, Item } from '../../types';
|
|
3
3
|
interface DragResizeComponentProps<T> {
|
|
4
|
-
item:
|
|
4
|
+
item: Item<T>;
|
|
5
5
|
rectangle: Rectangle;
|
|
6
6
|
boundingRectangle: Dimensions;
|
|
7
7
|
onDragStart: (grabPosition: Position, relativeGrabPosition: Position) => void;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { PropsWithChildren } from 'react';
|
|
2
|
+
import { Item, Position, Lane, TimelaneSettings } from '../../types';
|
|
3
|
+
interface TimelaneItemProps<T> {
|
|
4
|
+
item: Item<T>;
|
|
5
|
+
lane: Lane;
|
|
6
|
+
settings: TimelaneSettings;
|
|
7
|
+
onDragStart: (grabPosition: Position, relativeGrabPosition: Position) => void;
|
|
8
|
+
onDrop: () => void;
|
|
9
|
+
onDrag: () => void;
|
|
10
|
+
onUpdate: (updatedItem: Item<T>) => void;
|
|
11
|
+
onResizeStart: () => void;
|
|
12
|
+
}
|
|
13
|
+
export default function TimelaneItem<T>({ lane, item, settings, children, onDragStart, onDrag, onDrop, onUpdate, onResizeStart, }: PropsWithChildren<TimelaneItemProps<T>>): import("react/jsx-runtime").JSX.Element;
|
|
14
|
+
export {};
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { PropsWithChildren } from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { Item, Pixels, Lane, TimeRange } from '../../types';
|
|
3
3
|
interface AvailableSpaceIndicatorProps<T> {
|
|
4
4
|
pixels: Pixels;
|
|
5
5
|
range: TimeRange;
|
|
6
|
-
swimlane:
|
|
6
|
+
swimlane: Lane;
|
|
7
7
|
debug: boolean;
|
|
8
|
-
items:
|
|
8
|
+
items: Item<T>[];
|
|
9
9
|
}
|
|
10
10
|
/**
|
|
11
11
|
* A component that displays the available space at the mouse cursor position.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { PropsWithChildren } from 'react';
|
|
2
|
-
import { GrabInfo, Position } from '
|
|
2
|
+
import { GrabInfo, Position } from '../../types';
|
|
3
3
|
interface DropTargetProps {
|
|
4
4
|
onDragStart?: (mousePos: Position, grabInfo: GrabInfo, data: any) => void;
|
|
5
5
|
onDrag?: (mousePos: Position, grabInfo: GrabInfo, data: any) => void;
|
package/dist/components/{core/CoreSwimlane/CoreSwimlane.d.ts → TimelaneLane/TimelaneLane.d.ts}
RENAMED
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import { MouseEvent, ReactElement } from 'react';
|
|
2
|
-
import { AvailableSpace,
|
|
3
|
-
interface
|
|
4
|
-
swimlane:
|
|
5
|
-
items:
|
|
2
|
+
import { AvailableSpace, Item, Lane } from '../../types';
|
|
3
|
+
interface TimelaneLaneProps<T> {
|
|
4
|
+
swimlane: Lane;
|
|
5
|
+
items: Item<T>[];
|
|
6
6
|
focused?: boolean;
|
|
7
|
-
onItemUpdate?: (item:
|
|
7
|
+
onItemUpdate?: (item: Item<T>) => void;
|
|
8
8
|
onMouseUp?: (e: MouseEvent) => void;
|
|
9
9
|
onClick?: (when: Date, availableSpace: AvailableSpace | null, e: MouseEvent) => void;
|
|
10
10
|
onDoubleClick?: (when: Date, availableSpace: AvailableSpace | null, e: MouseEvent) => void;
|
|
11
11
|
onContextMenu?: (when: Date, e: MouseEvent) => void;
|
|
12
|
-
renderItem?: (item:
|
|
12
|
+
renderItem?: (item: Item<T>, isDragged: boolean) => ReactElement;
|
|
13
13
|
onResizeStart?: (data: T) => void;
|
|
14
14
|
}
|
|
15
|
-
export
|
|
15
|
+
export declare function TimelaneLane<T>({ swimlane, items, focused, onItemUpdate, onMouseUp, onClick, onDoubleClick, onContextMenu, renderItem, onResizeStart, }: TimelaneLaneProps<T>): import("react/jsx-runtime").JSX.Element;
|
|
16
16
|
export {};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { PropsWithChildren } from 'react';
|
|
2
|
+
export declare function TimelaneLayout({ children }: PropsWithChildren<{}>): import("react/jsx-runtime").JSX.Element;
|
|
3
|
+
export declare namespace TimelaneLayout {
|
|
4
|
+
var Header: typeof TimelaneLayoutHeader;
|
|
5
|
+
var Body: typeof TimelaneLayoutBody;
|
|
6
|
+
var Background: typeof TimelaneLayoutBackground;
|
|
7
|
+
var Footer: typeof TimelaneLayoutFooter;
|
|
8
|
+
var Aside: typeof TimelaneLayoutAside;
|
|
9
|
+
var Corner: typeof TimelaneLayoutCorner;
|
|
10
|
+
}
|
|
11
|
+
declare function TimelaneLayoutHeader({ children }: PropsWithChildren<{}>): import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
declare function TimelaneLayoutBackground({ children }: PropsWithChildren<{}>): import("react/jsx-runtime").JSX.Element;
|
|
13
|
+
declare function TimelaneLayoutBody({ children }: PropsWithChildren<{}>): import("react/jsx-runtime").JSX.Element;
|
|
14
|
+
declare function TimelaneLayoutFooter({ children }: PropsWithChildren<{}>): import("react/jsx-runtime").JSX.Element;
|
|
15
|
+
interface TimelaneLayoutAsideProps {
|
|
16
|
+
side?: "left" | "right";
|
|
17
|
+
}
|
|
18
|
+
declare function TimelaneLayoutAside({ side, children, }: PropsWithChildren<TimelaneLayoutAsideProps>): import("react/jsx-runtime").JSX.Element;
|
|
19
|
+
interface TimelaneLayoutCornerProps {
|
|
20
|
+
corner?: "top left" | "top right" | "bottom left" | "bottom right";
|
|
21
|
+
}
|
|
22
|
+
declare function TimelaneLayoutCorner({ corner, children, }: PropsWithChildren<TimelaneLayoutCornerProps>): import("react/jsx-runtime").JSX.Element;
|
|
23
|
+
export {};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { PropsWithChildren } from 'react';
|
|
2
|
+
interface TimelaneSelectionLayerProps {
|
|
3
|
+
onSelect: (selection: number[]) => void;
|
|
4
|
+
}
|
|
5
|
+
export declare function TimelaneSelectionLayer({ children, onSelect, }: PropsWithChildren<TimelaneSelectionLayerProps>): import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
export {};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { Dispatch, SetStateAction } from 'react';
|
|
2
|
+
import { TimelaneSettings } from '../types/';
|
|
3
|
+
export interface TimelaneContextOuter {
|
|
4
|
+
settings: TimelaneSettings;
|
|
5
|
+
setSettings: Dispatch<SetStateAction<TimelaneSettings>>;
|
|
6
|
+
}
|
|
7
|
+
export declare const TimelaneSettingsContext: import('react').Context<TimelaneContextOuter>;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { PropsWithChildren } from 'react';
|
|
2
|
+
import { TimelaneSettings } from '../types/TimelaneSettings';
|
|
3
|
+
interface TimelaneSettingsProviderProps {
|
|
4
|
+
settings: TimelaneSettings;
|
|
5
|
+
}
|
|
6
|
+
export declare const TimelaneSettingsProvider: ({ settings: _settings, children, }: PropsWithChildren<TimelaneSettingsProviderProps>) => import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
export {};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { PropsWithChildren } from 'react';
|
|
2
|
-
import {
|
|
3
|
-
interface
|
|
2
|
+
import { Lane } from '../types';
|
|
3
|
+
interface TimelaneWrapperProps {
|
|
4
4
|
focusedDay?: Date | null;
|
|
5
|
-
focusedSwimlane?:
|
|
5
|
+
focusedSwimlane?: Lane | null;
|
|
6
6
|
start?: Date;
|
|
7
7
|
end?: Date;
|
|
8
8
|
pixelsPerDay?: number;
|
|
@@ -13,5 +13,8 @@ interface TimelineWrapperProps {
|
|
|
13
13
|
allowOverlaps?: boolean;
|
|
14
14
|
focusedDate?: Date | null;
|
|
15
15
|
}
|
|
16
|
-
|
|
16
|
+
/**
|
|
17
|
+
* @deprecated The component should not be used
|
|
18
|
+
*/
|
|
19
|
+
export default function TimelaneWrapper({ children, start, end, pixelsPerDay, pixelsPerResource, showMonths, showWeeks, showDays, allowOverlaps, focusedDate, }: PropsWithChildren<TimelaneWrapperProps>): import("react/jsx-runtime").JSX.Element;
|
|
17
20
|
export {};
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { DragLocationHistory, ElementDragPayload } from '@atlaskit/pragmatic-drag-and-drop/dist/types/internal-types';
|
|
2
|
+
import { Item, Dimensions, Pixels, Position, Rectangle, Lane, TimeRange, AvailableSpace, GrabInfo, Grid } from '../types';
|
|
3
|
+
export declare function getDropTargetDimensions(lane: Lane, pixels: Pixels, range: TimeRange): Dimensions;
|
|
4
|
+
export declare function getDropTargetHeight(lane: Lane, pixels: Pixels): number;
|
|
5
|
+
export declare function getDropTargetWidth(lane: Lane, pixels: Pixels, range: TimeRange): number;
|
|
6
|
+
export declare function getItemRectangle<T>(item: Item<T>, lane: Lane, range: TimeRange, pixels: Pixels): Rectangle;
|
|
7
|
+
export declare function getItemDimensions<T>(item: Item<T>, lane: Lane, pixels: Pixels): Dimensions;
|
|
8
|
+
export declare function dateToPixel(date: Date, start: Date, pixels: Pixels): number;
|
|
9
|
+
export declare function offsetToPixel(offset: number, capacity: number, pixels: Pixels): number;
|
|
10
|
+
export declare function getItemPosition<T>(item: Item<T>, lane: Lane, start: Date, pixels: Pixels): Position;
|
|
11
|
+
export declare function getGrabPosition(source: ElementDragPayload, location: DragLocationHistory): {
|
|
12
|
+
absolute: Position;
|
|
13
|
+
relative: Position;
|
|
14
|
+
};
|
|
15
|
+
export declare function getUpdatedItem<T>(oldItem: Item<T>, swimlane: Lane, dropPreviewRect: Rectangle, pixels: Pixels, range: TimeRange): Item<T>;
|
|
16
|
+
export declare function getDropPreviewRectangle<S, T>(swimlane: Lane, items: Item<T>[], item: Item<S>, mousePosition: Position | null, grabInfo: GrabInfo, pixels: Pixels, grid: Grid, range: TimeRange, allowOverlaps: boolean): Rectangle | null;
|
|
17
|
+
/**
|
|
18
|
+
* Returns true if two rectangles (l1, r1) and (l2, r2) overlap
|
|
19
|
+
* @param a
|
|
20
|
+
* @param b
|
|
21
|
+
* @returns
|
|
22
|
+
*/
|
|
23
|
+
export declare function doOverlap(a: Rectangle, b: Rectangle): boolean;
|
|
24
|
+
export declare function getOverlap(a: Rectangle, b: Rectangle): Rectangle | null;
|
|
25
|
+
export declare function itemsDoOverlap<T>(a: Item<T>, b: Item<T>): boolean;
|
|
26
|
+
export declare function isWithinTargetDimensions(item: Rectangle, targetDimensions: Dimensions): boolean;
|
|
27
|
+
export declare function getAvailableSpace<T>(clickedDate: Date, clickedOffset: number, swimlane: Lane, items: Item<T>[], range: TimeRange): AvailableSpace | null;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { ItemId,
|
|
1
|
+
import { ItemId, LaneId } from '../types';
|
|
2
2
|
export declare const useScroll: () => {
|
|
3
3
|
scrollTo: (destination: {
|
|
4
4
|
horz?: Date;
|
|
5
|
-
vert?:
|
|
5
|
+
vert?: LaneId;
|
|
6
6
|
} | ItemId) => void;
|
|
7
7
|
scrollToDate: (date: Date) => void;
|
|
8
8
|
scrollToItem: (itemId: ItemId) => void;
|
|
9
|
-
scrollToLane: (laneId:
|
|
9
|
+
scrollToLane: (laneId: LaneId) => void;
|
|
10
10
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const useTimelaneContext: () => import('../components/TimelaneSettingsContext').TimelaneContextOuter;
|
package/dist/index.d.ts
CHANGED
|
@@ -1,13 +1,12 @@
|
|
|
1
|
-
export {
|
|
2
|
-
export {
|
|
3
|
-
export {
|
|
4
|
-
export
|
|
5
|
-
export {
|
|
6
|
-
export {
|
|
7
|
-
export {
|
|
8
|
-
export
|
|
1
|
+
export { TimelaneLayout } from './components/TimelaneLayout/TimelaneLayout';
|
|
2
|
+
export { TimelaneAside } from './components/TimelaneAside';
|
|
3
|
+
export { TimelaneBackground } from './components/TimelaneBackground';
|
|
4
|
+
export { TimelaneLane } from './components/TimelaneLane/TimelaneLane';
|
|
5
|
+
export { TimelaneBody } from './components/TimelaneBody';
|
|
6
|
+
export { Timelane } from './components/Timelane';
|
|
7
|
+
export { TimelaneSettingsProvider } from './components/TimelaneSettingsProvider';
|
|
8
|
+
export * from './components/TimelaneHeader';
|
|
9
9
|
export * from './types';
|
|
10
|
-
export * from './components/
|
|
11
|
-
export * from './components/core/CoreSwimlane/utils';
|
|
10
|
+
export * from './components/utils';
|
|
12
11
|
export { useScroll } from './hooks/useScroll';
|
|
13
|
-
export {
|
|
12
|
+
export { useTimelaneContext } from './hooks/useTimelaneContext';
|
package/dist/react-timelane.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.
|
|
1
|
+
.timelane-layout{position:relative;width:100%;height:100%;overflow:auto}.timelane-layout .timelane-layout-inner{position:relative;width:fit-content;height:fit-content;display:grid;grid-template-areas:"corner-tl header corner-tr" "aside-l body aside-r" "corner-bl footer corner-br"}.timelane-layout .timelane-layout-inner .timelane-layout-header,.timelane-layout .timelane-layout-inner .timelane-layout-footer,.timelane-layout .timelane-layout-inner .timelane-layout-aside,.timelane-layout .timelane-layout-inner .timelane-layout-corner{background:#fff}.timelane-layout .timelane-layout-inner .timelane-layout-header{grid-area:header;position:sticky;position:-webkit-sticky;top:0;z-index:101;overflow:hidden}.timelane-layout .timelane-layout-inner .timelane-layout-body{grid-area:body;z-index:100}.timelane-layout .timelane-layout-inner .timelane-layout-background{grid-area:body;z-index:-1}.timelane-layout .timelane-layout-inner .timelane-layout-footer{grid-area:footer;position:sticky;position:-webkit-sticky;bottom:0;z-index:101;border-top:1px solid lightgray}.timelane-layout .timelane-layout-inner .timelane-layout-aside{grid-area:aside-l;position:sticky;position:-webkit-sticky;left:0;z-index:101}.timelane-layout .timelane-layout-inner .timelane-layout-aside.timelane-layout-aside-right{grid-area:aside-r;right:0;left:initial;border-left:1px solid lightgray}.timelane-layout .timelane-layout-inner .timelane-layout-corner{position:sticky;position:-webkit-sticky;z-index:102}.timelane-layout .timelane-layout-inner .timelane-layout-corner.timelane-layout-corner-top-left{grid-area:corner-tl;top:0;left:0;border-bottom:1px solid lightgray;border-right:1px solid lightgray}.timelane-layout .timelane-layout-inner .timelane-layout-corner.timelane-layout-corner-top-right{grid-area:corner-tr;top:0;right:0;border-bottom:1px solid lightgray;border-left:1px solid lightgray}.timelane-layout .timelane-layout-inner .timelane-layout-corner.timelane-layout-corner-bottom-left{grid-area:corner-bl;bottom:0;left:0;border-top:1px solid lightgray;border-right:1px solid lightgray}.timelane-layout .timelane-layout-inner .timelane-layout-corner.timelane-layout-corner-bottom-right{grid-area:corner-br;bottom:0;right:0;border-top:1px solid lightgray;border-left:1px solid lightgray}*{box-sizing:border-box}.timelane{--timelane-aside-width: 150px;--timelane-border-color-light: #f0f0f0;--timelane-border-color-normal: lightgray;--timelane-border-color-dark: gray;--timelane-highlight-color: #f8f8f8;--timelane-focused-color: rgba(0, 0, 255, .1);--timelane-hover-color: rgba(0, 0, 0, .05);overflow:auto;position:relative;width:100%;height:100%;border-left:1px solid var(--timelane-border-color-normal)}.timelane .timelane-header{top:0;z-index:101;background:#fff}.timelane .timelane-header .timelane-header-months{display:flex;flex-flow:row nowrap}.timelane .timelane-header .timelane-header-months .timelane-header-month-label{border-right:1px solid var(--timelane-border-color-normal);border-bottom:1px solid var(--timelane-border-color-normal);overflow:hidden;font-size:1em;height:30px;line-height:30px;text-align:center;cursor:pointer}.timelane .timelane-header .timelane-header-months .timelane-header-month-label:hover{background:var(--timelane-hover-color)}.timelane .timelane-header .timelane-header-weeks{display:flex;flex-flow:row nowrap}.timelane .timelane-header .timelane-header-weeks .timelane-header-week-label{border-right:1px solid var(--timelane-border-color-normal);border-bottom:1px solid var(--timelane-border-color-normal);overflow:hidden;font-size:1em;height:30px;line-height:30px;text-align:center;cursor:pointer}.timelane .timelane-header .timelane-header-weeks .timelane-header-week-label:hover{background:var(--timelane-hover-color)}.timelane .timelane-header .timelane-header-days{display:flex;flex-flow:row nowrap}.timelane .timelane-header .timelane-header-days .timelane-header-day-label{border-right:1px solid var(--timelane-border-color-normal);border-bottom:1px solid var(--timelane-border-color-normal);overflow:hidden;font-size:.8em;height:20px;line-height:20px;text-align:center;cursor:pointer}.timelane .timelane-header .timelane-header-days .timelane-header-day-label:hover{background:var(--timelane-hover-color)}.timelane .timelane-header .timelane-header-days .timelane-header-day-label.timelane-header-day-label-focused{background:var(--timelane-focused-color)}.timelane .timelane-header-corner{z-index:102;background:#fff;border-right:1px solid var(--timelane-border-color-normal);border-bottom:1px solid var(--timelane-border-color-normal)}.timelane .timelane-body{z-index:99;position:relative;width:fit-content}.timelane .timelane-body .timelane-swimlane{border-color:var(--timelane-border-color-normal)!important;border-top:1px solid gray;border-bottom:1px solid gray;margin-top:-1px;overflow:hidden}.timelane .timelane-body .timelane-swimlane .timelane-drop-target{position:relative;width:100%;height:100%}.timelane .timelane-body .timelane-swimlane .timelane-drop-target .timelane-item{position:absolute;cursor:pointer;border-radius:3px;-webkit-touch-callout:none;-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.timelane .timelane-body .timelane-swimlane .timelane-drop-target .timelane-item.timelane-item-marked .timelane-allocation{border:2px dashed rgba(0,0,0,.5)}.timelane .timelane-body .timelane-swimlane .timelane-drop-target .timelane-item .timelane-item-drag-handle{height:100%}.timelane .timelane-body .timelane-swimlane .timelane-drop-target .timelane-item .timelane-item-resize-handle{background:#bed7dc;border-radius:5px;top:4px!important;bottom:4px!important;height:auto!important;width:6px!important;z-index:2;background:transparent!important;transition:.2s}.timelane .timelane-body .timelane-swimlane .timelane-drop-target .timelane-item .timelane-item-resize-handle:hover{background:#0000001a!important}.timelane .timelane-body .timelane-swimlane .timelane-drop-target .timelane-item .timelane-item-resize-handle.timelane-item-resize-handle-left{left:0!important;margin-left:1px}.timelane .timelane-body .timelane-swimlane .timelane-drop-target .timelane-item .timelane-item-resize-handle.timelane-item-resize-handle-right{right:0!important}.timelane .timelane-body .timelane-swimlane .timelane-drop-target .timelane-item .timelane-allocation{background:#92a8d1;border-radius:2px;border:2px solid transparent;height:calc(100% - 1px);overflow:hidden;cursor:pointer;padding:0 4px;margin-left:1px;-webkit-touch-callout:none;-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;container-type:size;container-name:timelane-allocation}.timelane .timelane-body .timelane-swimlane .timelane-drop-target .timelane-item .timelane-allocation .timelane-allocation-title{font-weight:700;transform-origin:top left;line-height:30px;white-space:nowrap}@container timelane-allocation (max-height: 30px){.timelane .timelane-body .timelane-swimlane .timelane-drop-target .timelane-item .timelane-allocation .timelane-allocation-title{margin:0}}.timelane .timelane-body .timelane-swimlane .timelane-drop-target .timelane-item .timelane-allocation.timelane-allocation-selected{border:2px dashed rgba(0,0,0,.5)}.timelane .timelane-body .timelane-swimlane .timelane-drop-target .timelane-item.dragging{opacity:0}.timelane .timelane-body .timelane-swimlane .timelane-drop-target .timelane-drop-preview{background:#00f;position:absolute;border-radius:2px;color:#fff}.timelane .timelane-body .timelane-swimlane.timelane-row-focused{background:var(--timelane-focused-color)}.timelane .timelane-aside{border-right:1px solid var(--timelane-border-color-normal);width:var(--timelane-aside-width);background:#fff}.timelane .timelane-aside .timelane-aside-swimlane-header{border:1px solid var(--timelane-border-color-normal);border-right:none;border-left:none;margin-top:-1px;padding:10px;overflow:hidden;position:relative;cursor:pointer}.timelane .timelane-aside .timelane-aside-swimlane-header.timelane-aside-swimlane-header-focused{background:var(--timelane-focused-color)}.timelane .timelane-aside .timelane-aside-swimlane-header:hover .timelane-aside-resource-menu{opacity:1}.timelane .timelane-aside .timelane-aside-swimlane-header .timelane-aside-resource-menu{position:absolute;top:5px;right:5px;opacity:0;transition:.15s}.timelane .timelane-aside .timelane-aside-swimlane-header .timelane-aside-resource-menu.timelane-aside-resource-menu-open{opacity:1}.timelane .timelane-background{position:relative;width:100%;height:100%}.timelane .timelane-background .timelane-background-inner{display:flex;flex-flow:row nowrap;height:100%}.timelane .timelane-background .timelane-background-inner .timelane-background-day-label{border-right:1px solid var(--timelane-border-color-light);overflow:hidden;font-size:.8em;height:100%;z-index:-100}.timelane .timelane-background .timelane-background-inner .timelane-background-day-label.timelane-background-day-label-sunday{border-right:1px solid var(--timelane-border-color-normal)}.timelane .timelane-background .timelane-background-inner .timelane-background-day-label.timelane-background-day-label-focused{background:var(--timelane-focused-color)}.timelane .timelane-background .timelane-background-inner .timelane-background-focused-day-position{position:absolute;height:100%;background:var(--timelane-focused-color);z-index:-101}.timelane-header-tooltip,.timelane-header-day-tooltip{font-size:2em}
|