awesome-timeline-react 0.1.6 → 0.1.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +24 -6
- package/dist/_tsup-dts-rollup.d.ts +39 -12
- package/dist/grip-lines-vertical-solid-ZAJSSXEQ.svg +1 -0
- package/dist/index.css +1 -1
- package/dist/index.css.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/package.json +61 -60
package/README.md
CHANGED
|
@@ -2,10 +2,16 @@
|
|
|
2
2
|
|
|
3
3
|
## Introduction
|
|
4
4
|
|
|
5
|
-
**Awesome Timeline React** is a component that developers can include in their projects. It provides a Gantt timeline for visualizing and managing events. With simple configuration, powerful performance, and customization options, it's an excellent choice for your project.
|
|
5
|
+
**Awesome Timeline React** is a component that developers can include in their projects. It provides a Gantt timeline for visualizing and managing events. With simple configuration, powerful performance, and customization options, it's an excellent choice for your project. Current releases are pre-releases. If you have any ideas for features or encounter any bugs, please email me at [jakub.plata@yahoo.pl](mailto:jakub.plata@yahoo.pl).
|
|
6
6
|
|
|
7
7
|

|
|
8
8
|
|
|
9
|
+
## Instalation
|
|
10
|
+
|
|
11
|
+
```sh
|
|
12
|
+
npm install awesome-react-timeline
|
|
13
|
+
```
|
|
14
|
+
|
|
9
15
|
## Ladle
|
|
10
16
|
|
|
11
17
|
To run ladle stories, type:
|
|
@@ -34,9 +40,10 @@ The following properties for Timeline component are available:
|
|
|
34
40
|
- `startTime`: `number` (timestamp in seconds)
|
|
35
41
|
- `endTime`: `number` (timestamp in seconds)
|
|
36
42
|
- `props`:
|
|
37
|
-
- `isLocked`: `boolean` (defines if
|
|
43
|
+
- `isLocked`: `boolean` (defines if event is locked, meaning it cannot be moved. Default is `false`)
|
|
38
44
|
- `content`: `JSX.Element | string` (customizable content for each event)
|
|
39
45
|
- `classNames`: `string[]` (array of additional class names for customizing the event)
|
|
46
|
+
- `isResizable`: `boolean` (defines if event is resizable, overrides the default property `eventsResize`)
|
|
40
47
|
|
|
41
48
|
- `staticEvents` – an array of objects that define static events for particular rows, meaning the events are not interactable by the user.
|
|
42
49
|
|
|
@@ -45,16 +52,27 @@ The following properties for Timeline component are available:
|
|
|
45
52
|
- `eventId`: `string`
|
|
46
53
|
- `oldRowId`: `string`
|
|
47
54
|
- `newRowId`: `string`
|
|
48
|
-
- `
|
|
49
|
-
- `
|
|
55
|
+
- `startTime`: `number` (timestamp in seconds)
|
|
56
|
+
- `endTime`: `number` (timestamp in seconds)
|
|
57
|
+
|
|
58
|
+
- `onResize` – an external callback after the resize event was done, that can be injected. The callback receives the following properties:
|
|
59
|
+
|
|
60
|
+
- `eventId`: `string`
|
|
61
|
+
- `startTime`: `number` (timestamp in seconds)
|
|
62
|
+
- `endTime`: `number` (timestamp in seconds)
|
|
50
63
|
|
|
51
64
|
- `additionalClassNames` – contains additional class names that will be included within elements:
|
|
65
|
+
|
|
52
66
|
- `timeBar`: `string`
|
|
53
67
|
- `dayRow`: `string`
|
|
54
68
|
- `hourRow`: `string`
|
|
55
69
|
- `line`: `string`
|
|
56
70
|
- `rowsHeader`: `string`
|
|
57
71
|
|
|
72
|
+
- `showRTIndicator` – property that controls wheter Real Time Indicator will be show (default as true)
|
|
73
|
+
|
|
74
|
+
- `eventsResize` - property that define if events are resizeable (default as true)
|
|
75
|
+
|
|
58
76
|
## Awesome Features
|
|
59
77
|
|
|
60
78
|
One of the awesome features (currently hidden from the interface) is adjusting the granulation of the grid. To achieve this, click the wheel on the mouse. This will hide the scroll bar, and you can adjust the grid granulation by scrolling the wheel. Each scroll iteration adjusts the grid by ±15 minutes, depending on the scroll direction.
|
|
@@ -65,8 +83,8 @@ One of the awesome features (currently hidden from the interface) is adjusting t
|
|
|
65
83
|
|
|
66
84
|
Here, we will store major features planned for future releases (from highest to lowest priority):
|
|
67
85
|
|
|
68
|
-
1. Resize events
|
|
69
|
-
2. Real time line
|
|
86
|
+
1. ~~Resize events~~ - published in 0.1.8 version
|
|
87
|
+
2. ~~Real time line~~ - published in 0.1.7 version
|
|
70
88
|
3. Customizable prompts after hovering over an event
|
|
71
89
|
4. Customizable second row of the time bar
|
|
72
90
|
5. Intersection observer with `display: none` property to further improve performance
|
|
@@ -27,14 +27,16 @@ export declare const default_alias_1: React_2.ForwardRefExoticComponent<
|
|
|
27
27
|
ContentType & React_2.RefAttributes<HTMLDivElement>
|
|
28
28
|
>;
|
|
29
29
|
|
|
30
|
-
export declare const default_alias_10: (
|
|
30
|
+
export declare const default_alias_10: (monthIndex: number) => string;
|
|
31
31
|
|
|
32
|
-
export declare const default_alias_11: (
|
|
32
|
+
export declare const default_alias_11: (dayIndex: number) => string;
|
|
33
|
+
|
|
34
|
+
export declare const default_alias_12: (
|
|
33
35
|
eventA: EventType,
|
|
34
36
|
eventB: EventType
|
|
35
37
|
) => 1 | -1;
|
|
36
38
|
|
|
37
|
-
export declare const
|
|
39
|
+
export declare const default_alias_13: ({
|
|
38
40
|
windowTime,
|
|
39
41
|
tick,
|
|
40
42
|
contentWidth,
|
|
@@ -49,7 +51,7 @@ export declare const default_alias_12: ({
|
|
|
49
51
|
hourBlocks: JSX.Element[];
|
|
50
52
|
};
|
|
51
53
|
|
|
52
|
-
export declare const
|
|
54
|
+
export declare const default_alias_14: ({
|
|
53
55
|
windowTime,
|
|
54
56
|
contentWidth,
|
|
55
57
|
}: {
|
|
@@ -60,7 +62,7 @@ export declare const default_alias_13: ({
|
|
|
60
62
|
blockWidth: number;
|
|
61
63
|
};
|
|
62
64
|
|
|
63
|
-
export declare const
|
|
65
|
+
export declare const default_alias_15: ({
|
|
64
66
|
bodyRef,
|
|
65
67
|
rowsContentRef,
|
|
66
68
|
}: {
|
|
@@ -68,7 +70,7 @@ export declare const default_alias_14: ({
|
|
|
68
70
|
rowsContentRef: React.MutableRefObject<HTMLDivElement[] | null>;
|
|
69
71
|
}) => void;
|
|
70
72
|
|
|
71
|
-
export declare const
|
|
73
|
+
export declare const default_alias_16: ({
|
|
72
74
|
rows,
|
|
73
75
|
windowTime,
|
|
74
76
|
tick,
|
|
@@ -79,7 +81,7 @@ export declare const default_alias_15: ({
|
|
|
79
81
|
bodyRef,
|
|
80
82
|
}: ProduceContentType) => React_2.JSX.Element[];
|
|
81
83
|
|
|
82
|
-
export declare const
|
|
84
|
+
export declare const default_alias_17: ({
|
|
83
85
|
windowTime,
|
|
84
86
|
setTick,
|
|
85
87
|
setCellWidth,
|
|
@@ -97,12 +99,16 @@ export declare const default_alias_2: ({
|
|
|
97
99
|
width,
|
|
98
100
|
top,
|
|
99
101
|
props,
|
|
102
|
+
setEvents,
|
|
103
|
+
tick,
|
|
100
104
|
}: {
|
|
101
105
|
id: string;
|
|
102
|
-
startPosition:
|
|
103
|
-
width:
|
|
106
|
+
startPosition: number;
|
|
107
|
+
width: number;
|
|
104
108
|
top: CSSProperties["top"];
|
|
105
109
|
props?: EventPropsType;
|
|
110
|
+
setEvents: React_2.Dispatch<React_2.SetStateAction<EventType[]>>;
|
|
111
|
+
tick: number | null;
|
|
106
112
|
}) => React_2.JSX.Element;
|
|
107
113
|
|
|
108
114
|
export declare const default_alias_3: ({
|
|
@@ -138,6 +144,14 @@ export declare const default_alias_6: ({
|
|
|
138
144
|
}) => React_2.JSX.Element;
|
|
139
145
|
|
|
140
146
|
export declare const default_alias_7: ({
|
|
147
|
+
tick,
|
|
148
|
+
windowTime,
|
|
149
|
+
}: {
|
|
150
|
+
tick: number | null;
|
|
151
|
+
windowTime: number[];
|
|
152
|
+
}) => React_2.JSX.Element;
|
|
153
|
+
|
|
154
|
+
export declare const default_alias_8: ({
|
|
141
155
|
id,
|
|
142
156
|
startPosition,
|
|
143
157
|
width,
|
|
@@ -151,7 +165,7 @@ export declare const default_alias_7: ({
|
|
|
151
165
|
height: CSSProperties["height"];
|
|
152
166
|
}) => React_2.JSX.Element;
|
|
153
167
|
|
|
154
|
-
export declare const
|
|
168
|
+
export declare const default_alias_9: ({
|
|
155
169
|
windowTime,
|
|
156
170
|
tick,
|
|
157
171
|
contentWidth,
|
|
@@ -165,8 +179,6 @@ export declare const default_alias_8: ({
|
|
|
165
179
|
additionalClassNames?: PartialRecord<keyof ModifableElements, string>;
|
|
166
180
|
}) => React_2.JSX.Element;
|
|
167
181
|
|
|
168
|
-
export declare const default_alias_9: (monthIndex: number) => string;
|
|
169
|
-
|
|
170
182
|
export declare const DragStartedContext: Context<DragStartedContext_2>;
|
|
171
183
|
|
|
172
184
|
declare type DragStartedContext_2 = {
|
|
@@ -178,6 +190,7 @@ export declare type EventPropsType = {
|
|
|
178
190
|
isLocked?: boolean;
|
|
179
191
|
content?: JSX.Element | string;
|
|
180
192
|
classNames?: string[];
|
|
193
|
+
isResizable?: boolean;
|
|
181
194
|
};
|
|
182
195
|
|
|
183
196
|
export declare type EventType = {
|
|
@@ -192,6 +205,8 @@ export declare const ExternalPropertiesContext: Context<ExternalPropertiesType>;
|
|
|
192
205
|
|
|
193
206
|
declare type ExternalPropertiesType = {
|
|
194
207
|
onDrop?: (props: OnDropProps) => void;
|
|
208
|
+
onResize?: (props: OnResizeProps) => void;
|
|
209
|
+
eventsResize?: boolean;
|
|
195
210
|
};
|
|
196
211
|
|
|
197
212
|
export declare type ModifableElements = {
|
|
@@ -210,6 +225,12 @@ export declare type OnDropProps = {
|
|
|
210
225
|
endTime: number;
|
|
211
226
|
};
|
|
212
227
|
|
|
228
|
+
export declare type OnResizeProps = {
|
|
229
|
+
eventId: string;
|
|
230
|
+
startTime: number;
|
|
231
|
+
endTime: number;
|
|
232
|
+
};
|
|
233
|
+
|
|
213
234
|
export declare type PartialRecord<K extends keyof any, T> = Partial<
|
|
214
235
|
Record<K, T>
|
|
215
236
|
>;
|
|
@@ -258,9 +279,12 @@ declare const Timeline: ({
|
|
|
258
279
|
events,
|
|
259
280
|
staticEvents,
|
|
260
281
|
onDrop,
|
|
282
|
+
onResize,
|
|
261
283
|
startDate,
|
|
262
284
|
endDate,
|
|
263
285
|
additionalClassNames,
|
|
286
|
+
showRTIndicator,
|
|
287
|
+
eventsResize,
|
|
264
288
|
}: TimelineType) => React_2.JSX.Element;
|
|
265
289
|
export { Timeline };
|
|
266
290
|
export { Timeline as Timeline_alias_1 };
|
|
@@ -272,9 +296,12 @@ export declare type TimelineType = {
|
|
|
272
296
|
events: EventType[];
|
|
273
297
|
staticEvents?: EventType[];
|
|
274
298
|
onDrop?: (props: OnDropProps) => void;
|
|
299
|
+
onResize?: (props: OnResizeProps) => void;
|
|
275
300
|
startDate: Date;
|
|
276
301
|
endDate: Date;
|
|
277
302
|
additionalClassNames?: PartialRecord<keyof ModifableElements, string>;
|
|
303
|
+
showRTIndicator?: boolean;
|
|
304
|
+
eventsResize?: boolean;
|
|
278
305
|
};
|
|
279
306
|
|
|
280
307
|
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 192 512"><!--!Font Awesome Free 6.6.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free Copyright 2024 Fonticons, Inc.--><path d="M64 64c0-17.7-14.3-32-32-32S0 46.3 0 64L0 448c0 17.7 14.3 32 32 32s32-14.3 32-32L64 64zm128 0c0-17.7-14.3-32-32-32s-32 14.3-32 32l0 384c0 17.7 14.3 32 32 32s32-14.3 32-32l0-384z"/></svg>
|
package/dist/index.css
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
.rows-header-wrapper{width:100px;height:fit-content;border-right:1px solid yellow;background-color:#272424;color:#fff;box-sizing:border-box;.row-header:not(:last-child){border-bottom:1px solid yellow}box-shadow:4px 0 20px #000}.main-wrapper{display:flex;flex-direction:column;height:100%;width:100%}.body-wrapper{display:flex;flex-direction:row;border-left:1px solid black;border-bottom:1px solid black;border-right:1px solid black;width:100%;overflow:auto;box-sizing:border-box}.day-block{height:100%;text-align:center;box-sizing:border-box;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;padding:4px}.hour-block{display:block;width:100%;text-align:center;padding:4px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.content-wrapper{position:relative;display:flex;flex-direction:column;width:100%;.row-content:not(:last-child){border-bottom:1px solid #e4dcdc}}.row-header{display:flex;justify-content:center;align-items:center;width:100px;transition:min-height .5s ease-in-out;box-sizing:border-box}.row-content{position:relative;width:100%;padding-top:10px;padding-bottom:10px;overflow:hidden;z-index:0;transition:min-height .5s ease-in-out;box-sizing:border-box}.event{position:absolute;height:20px;border:1px solid black;z-index:1;transition:top .5s ease-in-out;box-sizing:border-box;display:flex;border-radius:5px;box-shadow:inset 0 0 5px gray}.event-content{width:100%;height:100%}.static-event{position:absolute;background-color:#e0e0e0;z-index:0;border:1px solid transparent;box-sizing:border-box;border-radius:5px}.time-bar{display:flex;flex-direction:row;width:100%;height:50px;min-height:50px;border:1px solid yellow;background-color:#272424;color:#fff;box-sizing:border-box}.empty-block{width:100px;min-width:100px;border-right:1px solid yellow;box-sizing:border-box}.time-content{display:flex;flex-direction:column;height:100%}.day-row{display:grid;height:50%;width:auto;border-bottom:1px solid yellow;div:not(:last-child){border-right:1px solid yellow}}.hour-row{display:grid;height:50%;div:not(:last-child){border-right:1px solid yellow;box-sizing:border-box}box-shadow:0 4px 20px #000}.not-clickable{div{pointer-events:none}}.line{height:100%;width:100%;border-right:1px solid #e4dcdc;box-sizing:border-box}.lines-canvas{position:absolute;top:0;display:grid;height:100%;width:100%;overflow:hidden}.hide-last-line{div:last-child{border-right:none}}.row-hidden{visibility:hidden}
|
|
1
|
+
.rows-header-wrapper{width:100px;height:fit-content;border-right:1px solid yellow;background-color:#272424;color:#fff;box-sizing:border-box;.row-header:not(:last-child){border-bottom:1px solid yellow}box-shadow:4px 0 20px #000}.main-wrapper{position:relative;display:flex;flex-direction:column;height:100%;width:100%}.body-wrapper{display:flex;flex-direction:row;border-left:1px solid black;border-bottom:1px solid black;border-right:1px solid black;width:100%;overflow:auto;box-sizing:border-box}.day-block{height:100%;text-align:center;box-sizing:border-box;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;padding:4px}.hour-block{display:block;width:100%;text-align:center;padding:4px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.content-wrapper{position:relative;display:flex;flex-direction:column;width:100%;.row-content:not(:last-child){border-bottom:1px solid #e4dcdc}}.row-header{display:flex;justify-content:center;align-items:center;width:100px;transition:min-height .5s ease-in-out;box-sizing:border-box}.row-content{position:relative;width:100%;padding-top:10px;padding-bottom:10px;overflow:hidden;z-index:0;transition:min-height .5s ease-in-out;box-sizing:border-box}.event{position:absolute;height:20px;border:1px solid black;z-index:1;transition:top .5s ease-in-out;box-sizing:border-box;display:flex;border-radius:5px;box-shadow:inset 0 0 5px gray}.event-content{width:100%;height:100%;display:flex;justify-content:space-between}.event-content:hover .event-resize{opacity:100%}.event-resize{opacity:0%;height:10px;margin:5px;cursor:e-resize;transition:opacity .3s ease-in-out}.static-event{position:absolute;background-color:#e0e0e0;z-index:0;border:1px solid transparent;box-sizing:border-box;border-radius:5px}.time-bar{display:flex;flex-direction:row;width:100%;height:50px;min-height:50px;border:1px solid yellow;background-color:#272424;color:#fff;box-sizing:border-box}.empty-block{width:100px;min-width:100px;border-right:1px solid yellow;box-sizing:border-box}.time-content{display:flex;flex-direction:column;height:100%}.day-row{display:grid;height:50%;width:auto;border-bottom:1px solid yellow;div:not(:last-child){border-right:1px solid yellow}}.hour-row{display:grid;height:50%;div:not(:last-child){border-right:1px solid yellow;box-sizing:border-box}box-shadow:0 4px 20px #000}.not-clickable{div{pointer-events:none}}.line{height:100%;width:100%;border-right:1px solid #e4dcdc;box-sizing:border-box}.lines-canvas{position:absolute;top:0;display:grid;height:100%;width:100%;overflow:hidden}.hide-last-line{div:last-child{border-right:none}}.row-hidden{visibility:hidden}.rt-line{position:absolute;height:calc(100% - 24px);top:24px;width:2px;box-sizing:border-box;border-right:dotted 2px red}.rt-arrow{position:absolute;top:0;width:0;height:0;border-left:15px solid transparent;border-right:15px solid transparent;border-top:26px solid red}
|
|
2
2
|
/*# sourceMappingURL=index.css.map */
|
package/dist/index.css.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/style.css","../src/components/style.css"],"sourcesContent":[".rows-header-wrapper {\r\n width: 100px;\r\n height: fit-content;\r\n border-right: 1px solid yellow;\r\n background-color: rgb(39, 36, 36);\r\n color: white;\r\n box-sizing: border-box;\r\n .row-header:not(:last-child) {\r\n border-bottom: 1px solid yellow;\r\n }\r\n box-shadow: 4px 0px 20px black;\r\n}\r\n\r\n.main-wrapper {\r\n display: flex;\r\n flex-direction: column;\r\n height: 100%;\r\n width: 100%;\r\n}\r\n\r\n.body-wrapper {\r\n display: flex;\r\n flex-direction: row;\r\n border-left: 1px solid black;\r\n border-bottom: 1px solid black;\r\n border-right: 1px solid black;\r\n width: 100%;\r\n overflow: auto;\r\n box-sizing: border-box;\r\n}\r\n\r\n.day-block {\r\n height: 100%;\r\n text-align: center;\r\n box-sizing: border-box;\r\n overflow: hidden;\r\n text-overflow: ellipsis;\r\n white-space: nowrap;\r\n padding: 4px;\r\n}\r\n\r\n.hour-block {\r\n display: block;\r\n width: 100%;\r\n text-align: center;\r\n padding: 4px;\r\n overflow: hidden;\r\n text-overflow: ellipsis;\r\n white-space: nowrap;\r\n}\r\n",".content-wrapper {\r\n position: relative;\r\n display: flex;\r\n flex-direction: column;\r\n width: 100%;\r\n .row-content:not(:last-child) {\r\n border-bottom: 1px solid #e4dcdc;\r\n }\r\n}\r\n\r\n.row-header {\r\n display: flex;\r\n justify-content: center;\r\n align-items: center;\r\n width: 100px;\r\n transition: min-height 0.5s ease-in-out;\r\n box-sizing: border-box;\r\n}\r\n\r\n.row-content {\r\n position: relative;\r\n width: 100%;\r\n padding-top: 10px;\r\n padding-bottom: 10px;\r\n overflow: hidden;\r\n z-index: 0;\r\n transition: min-height 0.5s ease-in-out;\r\n box-sizing: border-box;\r\n}\r\n\r\n.event {\r\n position: absolute;\r\n height: 20px;\r\n border: 1px solid black;\r\n z-index: 1;\r\n transition: top 0.5s ease-in-out;\r\n box-sizing: border-box;\r\n display: flex;\r\n border-radius: 5px;\r\n box-shadow: inset 0px 0px 5px gray;\r\n}\r\n\r\n.event-content {\r\n width: 100%;\r\n height: 100%;\r\n}\r\n\r\n.static-event {\r\n position: absolute;\r\n background-color: #e0e0e0;\r\n z-index: 0;\r\n border: 1px solid transparent;\r\n box-sizing: border-box;\r\n border-radius: 5px;\r\n}\r\n\r\n.time-bar {\r\n display: flex;\r\n flex-direction: row;\r\n width: 100%;\r\n height: 50px;\r\n min-height: 50px;\r\n border: 1px solid yellow;\r\n background-color: rgb(39, 36, 36);\r\n color: white;\r\n box-sizing: border-box;\r\n}\r\n\r\n.empty-block {\r\n width: 100px;\r\n min-width: 100px;\r\n border-right: 1px solid yellow;\r\n box-sizing: border-box;\r\n}\r\n\r\n.time-content {\r\n display: flex;\r\n flex-direction: column;\r\n height: 100%;\r\n}\r\n\r\n.day-row {\r\n display: grid;\r\n height: 50%;\r\n width: auto;\r\n border-bottom: 1px solid yellow;\r\n div:not(:last-child) {\r\n border-right: 1px solid yellow;\r\n }\r\n}\r\n\r\n.hour-row {\r\n display: grid;\r\n height: 50%;\r\n div:not(:last-child) {\r\n border-right: 1px solid yellow;\r\n box-sizing: border-box;\r\n }\r\n box-shadow: 0px 4px 20px black;\r\n}\r\n\r\n.not-clickable {\r\n div {\r\n pointer-events: none;\r\n }\r\n}\r\n\r\n.line {\r\n height: 100%;\r\n width: 100%;\r\n border-right: 1px solid #e4dcdc;\r\n box-sizing: border-box;\r\n}\r\n\r\n.lines-canvas {\r\n position: absolute;\r\n top: 0;\r\n display: grid;\r\n height: 100%;\r\n width: 100%;\r\n overflow: hidden;\r\n}\r\n\r\n.hide-last-line {\r\n div:last-child {\r\n border-right: none;\r\n }\r\n}\r\n\r\n.row-hidden {\r\n visibility: hidden;\r\n}\r\n"],"mappings":"AAAA,CAAC,oBACC,MAAO,MACP,OAAQ,YACR,aAAc,IAAI,MAAM,OACxB,iBAAkB,QAClB,MAAO,KACP,WAAY,WACZ,CAAC,UAAU,KAAK,aACd,cAAe,IAAI,MAAM,MAC3B,CACA,WAAY,IAAI,EAAI,KAAK,IAC3B,CAEA,CAAC,aACC,QAAS,KACT,eAAgB,OAChB,OAAQ,KACR,MAAO,IACT,CAEA,CAAC,aACC,QAAS,KACT,eAAgB,IAChB,YAAa,IAAI,MAAM,MACvB,cAAe,IAAI,MAAM,MACzB,aAAc,IAAI,MAAM,MACxB,MAAO,KACP,SAAU,KACV,WAAY,UACd,CAEA,CAAC,UACC,OAAQ,KACR,WAAY,OACZ,WAAY,WACZ,SAAU,OACV,cAAe,SACf,YAAa,
|
|
1
|
+
{"version":3,"sources":["../src/style.css","../src/components/style.css"],"sourcesContent":[".rows-header-wrapper {\r\n width: 100px;\r\n height: fit-content;\r\n border-right: 1px solid yellow;\r\n background-color: rgb(39, 36, 36);\r\n color: white;\r\n box-sizing: border-box;\r\n .row-header:not(:last-child) {\r\n border-bottom: 1px solid yellow;\r\n }\r\n box-shadow: 4px 0px 20px black;\r\n}\r\n\r\n.main-wrapper {\r\n position: relative;\r\n display: flex;\r\n flex-direction: column;\r\n height: 100%;\r\n width: 100%;\r\n}\r\n\r\n.body-wrapper {\r\n display: flex;\r\n flex-direction: row;\r\n border-left: 1px solid black;\r\n border-bottom: 1px solid black;\r\n border-right: 1px solid black;\r\n width: 100%;\r\n overflow: auto;\r\n box-sizing: border-box;\r\n}\r\n\r\n.day-block {\r\n height: 100%;\r\n text-align: center;\r\n box-sizing: border-box;\r\n overflow: hidden;\r\n text-overflow: ellipsis;\r\n white-space: nowrap;\r\n padding: 4px;\r\n}\r\n\r\n.hour-block {\r\n display: block;\r\n width: 100%;\r\n text-align: center;\r\n padding: 4px;\r\n overflow: hidden;\r\n text-overflow: ellipsis;\r\n white-space: nowrap;\r\n}\r\n",".content-wrapper {\r\n position: relative;\r\n display: flex;\r\n flex-direction: column;\r\n width: 100%;\r\n .row-content:not(:last-child) {\r\n border-bottom: 1px solid #e4dcdc;\r\n }\r\n}\r\n\r\n.row-header {\r\n display: flex;\r\n justify-content: center;\r\n align-items: center;\r\n width: 100px;\r\n transition: min-height 0.5s ease-in-out;\r\n box-sizing: border-box;\r\n}\r\n\r\n.row-content {\r\n position: relative;\r\n width: 100%;\r\n padding-top: 10px;\r\n padding-bottom: 10px;\r\n overflow: hidden;\r\n z-index: 0;\r\n transition: min-height 0.5s ease-in-out;\r\n box-sizing: border-box;\r\n}\r\n\r\n.event {\r\n position: absolute;\r\n height: 20px;\r\n border: 1px solid black;\r\n z-index: 1;\r\n transition: top 0.5s ease-in-out;\r\n box-sizing: border-box;\r\n display: flex;\r\n border-radius: 5px;\r\n box-shadow: inset 0px 0px 5px gray;\r\n}\r\n\r\n.event-content {\r\n width: 100%;\r\n height: 100%;\r\n display: flex;\r\n justify-content: space-between;\r\n}\r\n\r\n.event-content:hover .event-resize {\r\n opacity: 100%;\r\n}\r\n\r\n.event-resize {\r\n opacity: 0%;\r\n height: 10px;\r\n margin: 5px;\r\n cursor: e-resize;\r\n transition: opacity 0.3s ease-in-out;\r\n}\r\n\r\n.static-event {\r\n position: absolute;\r\n background-color: #e0e0e0;\r\n z-index: 0;\r\n border: 1px solid transparent;\r\n box-sizing: border-box;\r\n border-radius: 5px;\r\n}\r\n\r\n.time-bar {\r\n display: flex;\r\n flex-direction: row;\r\n width: 100%;\r\n height: 50px;\r\n min-height: 50px;\r\n border: 1px solid yellow;\r\n background-color: rgb(39, 36, 36);\r\n color: white;\r\n box-sizing: border-box;\r\n}\r\n\r\n.empty-block {\r\n width: 100px;\r\n min-width: 100px;\r\n border-right: 1px solid yellow;\r\n box-sizing: border-box;\r\n}\r\n\r\n.time-content {\r\n display: flex;\r\n flex-direction: column;\r\n height: 100%;\r\n}\r\n\r\n.day-row {\r\n display: grid;\r\n height: 50%;\r\n width: auto;\r\n border-bottom: 1px solid yellow;\r\n div:not(:last-child) {\r\n border-right: 1px solid yellow;\r\n }\r\n}\r\n\r\n.hour-row {\r\n display: grid;\r\n height: 50%;\r\n div:not(:last-child) {\r\n border-right: 1px solid yellow;\r\n box-sizing: border-box;\r\n }\r\n box-shadow: 0px 4px 20px black;\r\n}\r\n\r\n.not-clickable {\r\n div {\r\n pointer-events: none;\r\n }\r\n}\r\n\r\n.line {\r\n height: 100%;\r\n width: 100%;\r\n border-right: 1px solid #e4dcdc;\r\n box-sizing: border-box;\r\n}\r\n\r\n.lines-canvas {\r\n position: absolute;\r\n top: 0;\r\n display: grid;\r\n height: 100%;\r\n width: 100%;\r\n overflow: hidden;\r\n}\r\n\r\n.hide-last-line {\r\n div:last-child {\r\n border-right: none;\r\n }\r\n}\r\n\r\n.row-hidden {\r\n visibility: hidden;\r\n}\r\n\r\n.rt-line {\r\n position: absolute;\r\n height: calc(100% - 24px);\r\n top: 24px;\r\n width: 2px;\r\n box-sizing: border-box;\r\n border-right: dotted 2px red;\r\n}\r\n\r\n.rt-arrow {\r\n position: absolute;\r\n top: 0px;\r\n width: 0;\r\n height: 0;\r\n border-left: 15px solid transparent;\r\n border-right: 15px solid transparent;\r\n\r\n border-top: 26px solid red;\r\n}\r\n"],"mappings":"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","names":[]}
|
package/dist/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }var nt=Object.defineProperty;var xe=Object.getOwnPropertySymbols;var ot=Object.prototype.hasOwnProperty,it=Object.prototype.propertyIsEnumerable;var Ee=(e,t,r)=>t in e?nt(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Te=(e,t)=>{for(var r in t||(t={}))ot.call(t,r)&&Ee(e,r,t[r]);if(xe)for(var r of xe(t))it.call(t,r)&&Ee(e,r,t[r]);return e};var _react = require('react'); var _react2 = _interopRequireDefault(_react);var st=e=>{let t=null;switch(e){case 0:t="Jan";break;case 1:t="Feb";break;case 2:t="Mar";break;case 3:t="Apr";break;case 4:t="May";break;case 5:t="Jun";break;case 6:t="Jul";break;case 7:t="Aug";break;case 8:t="Sep";break;case 9:t="Oct";break;case 10:t="Nov";break;case 11:t="Dec";break;default:t="Jan"}return t},ce=st;var at=e=>{let t=null;switch(e){case 0:t="Mon";break;case 1:t="Tue";break;case 2:t="Wed";break;case 3:t="Thu";break;case 4:t="Fri";break;case 5:t="Sat";break;case 6:t="Sun";break;default:t="Mon"}return t},le=at;var lt=({windowTime:e,tick:t,contentWidth:r,blockWidth:n})=>{let{dayBlocks:o,hourBlocks:i}=_react.useMemo.call(void 0, ()=>{let s=e[0],a=[],f=[];if(t===null||r===null)return{dayBlocks:[],hourBlocks:[]};let l=r,u=1;for(;;){let d=new Date(s*1e3),g=new Date(d.getFullYear(),d.getMonth(),d.getDate(),23,59,59),m=(g.getTime()-d.getTime())/1e3/t;if(l-=m,Math.round(l)<0){let p=Math.round((m+l)/n);for(let b=0;b<p;b++)f.push(_react2.default.createElement("div",{className:"hour-block",key:`${d.getDate()}_hour_${b}`},b<10?`0${b}:00`:`${b}:00`));a.push(_react2.default.createElement("div",{className:"day-block",key:`${d.getDate()} ${d.getMonth()}`,style:{gridColumn:`${u} / ${u+p}`}},le(d.getDay())," ",d.getDate()," ",ce(d.getMonth()))),u+=p;break}let h=Math.round(m/n);for(let p=24-h;p<24;p++)f.push(_react2.default.createElement("div",{className:"hour-block",key:`${d.getDate()}_hour_${p}`},p<10?`0${p}:00`:`${p}:00`));if(a.push(_react2.default.createElement("div",{className:"day-block",key:`${d.getDate()} ${d.getMonth()}`,style:{gridColumn:`${u} / ${u+h}`}},le(d.getDay())," ",d.getDate()," ",ce(d.getMonth()))),u+=h,Math.round(l)===0)break;s=(g.getTime()+1e3)/1e3}return{dayBlocks:a,hourBlocks:f}},[t,e,r]);return{dayBlocks:o,hourBlocks:i}},De=lt;var ft=({windowTime:e,contentWidth:t})=>{let r=_react.useMemo.call(void 0, ()=>(e[1]-e[0])/3600,[e]),n=t?t/r:0;return{numberOfHourBlocks:r,blockWidth:n}},V=ft;var pt=({windowTime:e,tick:t,contentWidth:r,scrollWidth:n,additionalClassNames:o})=>{let i=_react.useRef.call(void 0, null),{blockWidth:s}=V({windowTime:e,contentWidth:r}),{dayBlocks:a,hourBlocks:f}=De({windowTime:e,tick:t,contentWidth:r,blockWidth:s}),l=o!=null&&o.timeBar?"time-bar "+o.timeBar:"time-bar",u=o!=null&&o.dayRow?"day-row "+o.dayRow:"day-row",d=o!=null&&o.hourRow?"hour-row "+o.hourRow:"hour-row";return _react2.default.createElement("div",{className:l},_react2.default.createElement("div",{className:"empty-block"}),_react2.default.createElement("div",{className:"time-content",ref:i,style:{minWidth:r||0}},_react2.default.createElement("div",{className:u,style:{gridTemplateColumns:`repeat(auto-fill, minmax(${s}px, 1fr))`}},a.map(g=>g)),_react2.default.createElement("div",{className:d,style:{gridTemplateColumns:`repeat(auto-fill, minmax(${s}px, 1fr))`}},f.map(g=>g))),n?_react2.default.createElement("div",{style:{width:n,height:"100%",boxSizing:"border-box",borderLeft:"1px solid yellow"}}):null)},Re=pt;var P=_react.createContext.call(void 0, null);var yt=({name:e,id:t})=>{let r=_react.useContext.call(void 0, P),n=r&&r.rowsHeight&&r.rowsHeight[t]?r.rowsHeight[t].minHeight:40;return _react2.default.createElement("div",{className:"row-header",style:{minHeight:n}},e)},Se=yt;var bt=({rows:e,className:t})=>{let r=t?"rows-header-wrapper "+t:"rows-header-wrapper";return _react2.default.createElement("div",{className:r},e.map(n=>_react2.default.createElement(Se,{key:`row_header_${n.id}`,id:n.id,name:n.name})))},Me=bt;var _t=({contentWidth:e,cellWidth:t,lineClassName:r})=>{let n=_react.useMemo.call(void 0, ()=>{let i=[],s=r?"line "+r:"line";if(e)for(let a=t;a<e;a=a+t)i.push(_react2.default.createElement("div",{key:`line_${a}`,className:s}));return i},[t,e]),o=_react.useMemo.call(void 0, ()=>e?e-n.length*t:0,[e,t,n]);return _react2.default.createElement("div",{className:o<1?"lines-canvas hide-last-line":"lines-canvas",style:o<1?{gridTemplateColumns:`repeat(auto-fill, minmax(${t}px, 1fr))`}:{gridTemplateColumns:`repeat(auto-fill, minmax(${o}px, ${t}px))`}},n)},He=_t;var vt=({id:e,startPosition:t,width:r,top:n,height:o})=>_react2.default.createElement("div",{id:`static_event_${e}`,key:`static_event_${e}`,className:"static-event",onDrop:i=>i.stopPropagation(),style:{left:t,width:r,top:n,minHeight:o}}),Oe=vt;var Le=Symbol.for("immer-nothing"),ze=Symbol.for("immer-draftable"),E=Symbol.for("immer-state"),xt=process.env.NODE_ENV!=="production"?[function(e){return`The plugin for '${e}' has not been loaded into Immer. To enable the plugin, import and call \`enable${e}()\` when initializing your application.`},function(e){return`produce can only be called on things that are draftable: plain objects, arrays, Map, Set or classes that are marked with '[immerable]: true'. Got '${e}'`},"This object has been frozen and should not be mutated",function(e){return"Cannot use a proxy that has been revoked. Did you pass an object from inside an immer function to an async process? "+e},"An immer producer returned a new value *and* modified its draft. Either return a new value *or* modify the draft.","Immer forbids circular references","The first or second argument to `produce` must be a function","The third argument to `produce` must be a function or undefined","First argument to `createDraft` must be a plain object, an array, or an immerable object","First argument to `finishDraft` must be a draft returned by `createDraft`",function(e){return`'current' expects a draft, got: ${e}`},"Object.defineProperty() cannot be used on an Immer draft","Object.setPrototypeOf() cannot be used on an Immer draft","Immer only supports deleting array indices","Immer only supports setting array indices and the 'length' property",function(e){return`'original' expects a draft, got: ${e}`}]:[];function v(e,...t){if(process.env.NODE_ENV!=="production"){let r=xt[e],n=typeof r=="function"?r.apply(null,t):r;throw new Error(`[Immer] ${n}`)}throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var F=Object.getPrototypeOf;function B(e){return!!e&&!!e[E]}function $(e){var t;return e?Fe(e)||Array.isArray(e)||!!e[ze]||!!((t=e.constructor)!=null&&t[ze])||te(e)||re(e):!1}var Et=Object.prototype.constructor.toString();function Fe(e){if(!e||typeof e!="object")return!1;let t=F(e);if(t===null)return!0;let r=Object.hasOwnProperty.call(t,"constructor")&&t.constructor;return r===Object?!0:typeof r=="function"&&Function.toString.call(r)===Et}function q(e,t){ee(e)===0?Reflect.ownKeys(e).forEach(r=>{t(r,e[r],e)}):e.forEach((r,n)=>t(n,r,e))}function ee(e){let t=e[E];return t?t.type_:Array.isArray(e)?1:te(e)?2:re(e)?3:0}function de(e,t){return ee(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function Be(e,t,r){let n=ee(e);n===2?e.set(t,r):n===3?e.add(r):e[t]=r}function Tt(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}function te(e){return e instanceof Map}function re(e){return e instanceof Set}function N(e){return e.copy_||e.base_}function pe(e,t){if(te(e))return new Map(e);if(re(e))return new Set(e);if(Array.isArray(e))return Array.prototype.slice.call(e);let r=Fe(e);if(t===!0||t==="class_only"&&!r){let n=Object.getOwnPropertyDescriptors(e);delete n[E];let o=Reflect.ownKeys(n);for(let i=0;i<o.length;i++){let s=o[i],a=n[s];a.writable===!1&&(a.writable=!0,a.configurable=!0),(a.get||a.set)&&(n[s]={configurable:!0,writable:!0,enumerable:a.enumerable,value:e[s]})}return Object.create(F(e),n)}else{let n=F(e);if(n!==null&&r)return Te({},e);let o=Object.create(n);return Object.assign(o,e)}}function be(e,t=!1){return ne(e)||B(e)||!$(e)||(ee(e)>1&&(e.set=e.add=e.clear=e.delete=Dt),Object.freeze(e),t&&Object.entries(e).forEach(([r,n])=>be(n,!0))),e}function Dt(){v(2)}function ne(e){return Object.isFrozen(e)}var Rt={};function I(e){let t=Rt[e];return t||v(0,e),t}var U;function We(){return U}function St(e,t){return{drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function Ae(e,t){t&&(I("Patches"),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function me(e){he(e),e.drafts_.forEach(Pt),e.drafts_=null}function he(e){e===U&&(U=e.parent_)}function Ne(e){return U=St(U,e)}function Pt(e){let t=e[E];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function $e(e,t){t.unfinalizedDrafts_=t.drafts_.length;let r=t.drafts_[0];return e!==void 0&&e!==r?(r[E].modified_&&(me(t),v(4)),$(e)&&(e=Q(t,e),t.parent_||Z(t,e)),t.patches_&&I("Patches").generateReplacementPatches_(r[E].base_,e,t.patches_,t.inversePatches_)):e=Q(t,r,[]),me(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==Le?e:void 0}function Q(e,t,r){if(ne(t))return t;let n=t[E];if(!n)return q(t,(o,i)=>Ie(e,n,t,o,i,r)),t;if(n.scope_!==e)return t;if(!n.modified_)return Z(e,n.base_,!0),n.base_;if(!n.finalized_){n.finalized_=!0,n.scope_.unfinalizedDrafts_--;let o=n.copy_,i=o,s=!1;n.type_===3&&(i=new Set(o),o.clear(),s=!0),q(i,(a,f)=>Ie(e,n,o,a,f,r,s)),Z(e,o,!1),r&&e.patches_&&I("Patches").generatePatches_(n,r,e.patches_,e.inversePatches_)}return n.copy_}function Ie(e,t,r,n,o,i,s){if(process.env.NODE_ENV!=="production"&&o===r&&v(5),B(o)){let a=i&&t&&t.type_!==3&&!de(t.assigned_,n)?i.concat(n):void 0,f=Q(e,o,a);if(Be(r,n,f),B(f))e.canAutoFreeze_=!1;else return}else s&&r.add(o);if($(o)&&!ne(o)){if(!e.immer_.autoFreeze_&&e.unfinalizedDrafts_<1)return;Q(e,o),(!t||!t.scope_.parent_)&&typeof n!="symbol"&&Object.prototype.propertyIsEnumerable.call(r,n)&&Z(e,o)}}function Z(e,t,r=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&be(t,r)}function Mt(e,t){let r=Array.isArray(e),n={type_:r?1:0,scope_:t?t.scope_:We(),modified_:!1,finalized_:!1,assigned_:{},parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1},o=n,i=_e;r&&(o=[n],i=X);let{revoke:s,proxy:a}=Proxy.revocable(o,i);return n.draft_=a,n.revoke_=s,a}var _e={get(e,t){if(t===E)return e;let r=N(e);if(!de(r,t))return kt(e,r,t);let n=r[t];return e.finalized_||!$(n)?n:n===ue(e.base_,t)?(fe(e),e.copy_[t]=ye(n,e)):n},has(e,t){return t in N(e)},ownKeys(e){return Reflect.ownKeys(N(e))},set(e,t,r){let n=Ge(N(e),t);if(n!=null&&n.set)return n.set.call(e.draft_,r),!0;if(!e.modified_){let o=ue(N(e),t),i=o==null?void 0:o[E];if(i&&i.base_===r)return e.copy_[t]=r,e.assigned_[t]=!1,!0;if(Tt(r,o)&&(r!==void 0||de(e.base_,t)))return!0;fe(e),ge(e)}return e.copy_[t]===r&&(r!==void 0||t in e.copy_)||Number.isNaN(r)&&Number.isNaN(e.copy_[t])||(e.copy_[t]=r,e.assigned_[t]=!0),!0},deleteProperty(e,t){return ue(e.base_,t)!==void 0||t in e.base_?(e.assigned_[t]=!1,fe(e),ge(e)):delete e.assigned_[t],e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){let r=N(e),n=Reflect.getOwnPropertyDescriptor(r,t);return n&&{writable:!0,configurable:e.type_!==1||t!=="length",enumerable:n.enumerable,value:r[t]}},defineProperty(){v(11)},getPrototypeOf(e){return F(e.base_)},setPrototypeOf(){v(12)}},X={};q(_e,(e,t)=>{X[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}});X.deleteProperty=function(e,t){return process.env.NODE_ENV!=="production"&&isNaN(parseInt(t))&&v(13),X.set.call(this,e,t,void 0)};X.set=function(e,t,r){return process.env.NODE_ENV!=="production"&&t!=="length"&&isNaN(parseInt(t))&&v(14),_e.set.call(this,e[0],t,r,e[0])};function ue(e,t){let r=e[E];return(r?N(r):e)[t]}function kt(e,t,r){var o;let n=Ge(t,r);return n?"value"in n?n.value:(o=n.get)==null?void 0:o.call(e.draft_):void 0}function Ge(e,t){if(!(t in e))return;let r=F(e);for(;r;){let n=Object.getOwnPropertyDescriptor(r,t);if(n)return n;r=F(r)}}function ge(e){e.modified_||(e.modified_=!0,e.parent_&&ge(e.parent_))}function fe(e){e.copy_||(e.copy_=pe(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var Ct=class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.produce=(t,r,n)=>{if(typeof t=="function"&&typeof r!="function"){let i=r;r=t;let s=this;return function(f=i,...l){return s.produce(f,u=>r.call(this,u,...l))}}typeof r!="function"&&v(6),n!==void 0&&typeof n!="function"&&v(7);let o;if($(t)){let i=Ne(this),s=ye(t,void 0),a=!0;try{o=r(s),a=!1}finally{a?me(i):he(i)}return Ae(i,n),$e(o,i)}else if(!t||typeof t!="object"){if(o=r(t),o===void 0&&(o=t),o===Le&&(o=void 0),this.autoFreeze_&&be(o,!0),n){let i=[],s=[];I("Patches").generateReplacementPatches_(t,o,i,s),n(i,s)}return o}else v(1,t)},this.produceWithPatches=(t,r)=>{if(typeof t=="function")return(s,...a)=>this.produceWithPatches(s,f=>t(f,...a));let n,o;return[this.produce(t,r,(s,a)=>{n=s,o=a}),n,o]},typeof(e==null?void 0:e.autoFreeze)=="boolean"&&this.setAutoFreeze(e.autoFreeze),typeof(e==null?void 0:e.useStrictShallowCopy)=="boolean"&&this.setUseStrictShallowCopy(e.useStrictShallowCopy)}createDraft(e){$(e)||v(8),B(e)&&(e=Ht(e));let t=Ne(this),r=ye(e,void 0);return r[E].isManual_=!0,he(t),r}finishDraft(e,t){let r=e&&e[E];(!r||!r.isManual_)&&v(9);let{scope_:n}=r;return Ae(n,t),$e(void 0,n)}setAutoFreeze(e){this.autoFreeze_=e}setUseStrictShallowCopy(e){this.useStrictShallowCopy_=e}applyPatches(e,t){let r;for(r=t.length-1;r>=0;r--){let o=t[r];if(o.path.length===0&&o.op==="replace"){e=o.value;break}}r>-1&&(t=t.slice(r+1));let n=I("Patches").applyPatches_;return B(e)?n(e,t):this.produce(e,o=>n(o,t))}};function ye(e,t){let r=te(e)?I("MapSet").proxyMap_(e,t):re(e)?I("MapSet").proxySet_(e,t):Mt(e,t);return(t?t.scope_:We()).drafts_.push(r),r}function Ht(e){return B(e)||v(10,e),Je(e)}function Je(e){if(!$(e)||ne(e))return e;let t=e[E],r;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,r=pe(e,t.scope_.immer_.useStrictShallowCopy_)}else r=pe(e,!0);return q(r,(n,o)=>{Be(r,n,Je(o))}),t&&(t.finalized_=!1),r}var T=new Ct,Ue=T.produce,Lr=T.produceWithPatches.bind(T),Fr=T.setAutoFreeze.bind(T),Br=T.setUseStrictShallowCopy.bind(T),Wr=T.applyPatches.bind(T),Gr=T.createDraft.bind(T),Jr=T.finishDraft.bind(T);var W=_react.createContext.call(void 0, {dragStarted:!1,setDragStarted:()=>{}});var oe=_react.createContext.call(void 0, {});var At=(e,t)=>e.startTime-t.startTime<0||e.startTime===t.startTime&&e.endTime<t.endTime?-1:1,ie=At;var Lt=_react.forwardRef.call(void 0, (e,t)=>{let{setEvents:r,tick:n,id:o,windowTime:i,cellWidth:s,children:a}=e,{dragStarted:f,setDragStarted:l}=_react.useContext.call(void 0, W),{onDrop:u}=_react.useContext.call(void 0, oe),d=_react.useCallback.call(void 0, m=>{m.preventDefault();let h=m.target,{left:p}=h.getBoundingClientRect(),b=m.dataTransfer.getData("eventId"),w=Math.round((m.clientX-p)/s),R=s*w;r(Ue(k=>{let c=k.find(x=>x.id===b);if(c&&n){let x=i[0]+R*n,C=c.endTime-c.startTime,D=i[0]+C+R*n;u&&u({eventId:c.id,oldRowId:c.rowId,newRowId:e.id,startTime:x,endTime:D}),c.startTime=x,c.endTime=D,c.rowId=e.id}k.sort(ie)})),l(!1)},[r,n,i,s]),g=_react.useContext.call(void 0, P),y=g&&g.rowsHeight&&g.rowsHeight[o]?g.rowsHeight[o].minHeight:40;return _react2.default.createElement("div",{id:`row_${o}`,ref:t,onDragOver:m=>m.preventDefault(),onDrop:d,className:f?"row-content not-clickable":"row-content","data-index":o,style:{minHeight:y}},a)}),Xe=Lt;var Bt=({id:e,startPosition:t,width:r,top:n,props:o})=>{let{setDragStarted:i}=_react.useContext.call(void 0, W),s=_react.useCallback.call(void 0, l=>{l.stopPropagation(),l.dataTransfer.setData("eventId",e),setTimeout(()=>i(!0),0);let u=l.target;u.style.opacity="50%"},[i]),a=_react.useCallback.call(void 0, l=>{l.stopPropagation(),i(!1);let u=l.target;u.style.opacity="100%"},[i]),f=o!=null&&o.classNames?"event "+o.classNames.join(" "):"event";return _react2.default.createElement("div",{id:`event_${e}`,key:`event_${e}`,className:f,draggable:!(o!=null&&o.isLocked),onDragStart:s,onDragEnd:a,onMouseDown:l=>l.stopPropagation(),onMouseMove:l=>l.stopPropagation(),onDrop:l=>l.stopPropagation(),style:{left:t,width:r,top:n,cursor:o!=null&&o.isLocked?"not-allowed":"pointer"}},_react2.default.createElement("div",{className:"event-content"},o!=null&&o.content?o.content:null))},Ke=Bt;var Jt=({bodyRef:e,rowsContentRef:t})=>{let r=_react.useCallback.call(void 0, o=>{o.forEach(i=>{i.isIntersecting?i.target.classList.remove("row-hidden"):i.target.classList.add("row-hidden")})},[]),n=new IntersectionObserver(r,{root:e.current});_react.useEffect.call(void 0, ()=>(t.current&&t.current.forEach(o=>{n.observe(o)}),()=>n.disconnect()),[n])},Ve=Jt;var Yt=({rows:e,windowTime:t,tick:r,events:n,staticEvents:o,cellWidth:i,setEvents:s,bodyRef:a})=>{let f=_react.useContext.call(void 0, P),l=_react.useRef.call(void 0, null),u=_react.useRef.call(void 0, []),[d,g]=_react.useMemo.call(void 0, ()=>{let y=0;return[e.map((m,h)=>{let p=0,b=[],w=0,R=r?n.filter(c=>c.rowId===m.id).map(c=>{if(c.endTime>=t[0]&&c.startTime<=t[1]){let x=0,C=!0;for(let D=0;D<=p;D++)if(b&&b[D]&&b[D].endTime>c.startTime)x+=1;else{p>w&&(w=p),p=0,C=!1;break}return C&&(p=x),b[x]=c,_react2.default.createElement(Ke,{key:`event_${c.id}`,id:c.id,startPosition:(c.startTime-t[0])/r,width:(c.endTime-c.startTime)/r,top:10+22*x,props:c.props})}}):null;p>w&&(w=p),l.current===null?l.current={[m.id]:{minHeight:40+w*22}}:l.current[m.id]={minHeight:40+w*22},y+=40+w*22;let k=r&&o?o.filter(c=>c.rowId===m.id).map(c=>{if(c.endTime>=t[0]&&c.startTime<=t[1])return _react2.default.createElement(Oe,{key:`static_event_${c.id}`,id:c.id,startPosition:(c.startTime-t[0])/r,width:(c.endTime-c.startTime)/r,top:10,height:20+w*22})}):null;return _react2.default.createElement(_react2.default.Fragment,{key:`row_content_${m.id}`},_react2.default.createElement(Xe,{id:m.id,ref:c=>{u.current&&u.current[h]&&c?u.current[h]=c:u.current&&c&&u.current.push(c)},setEvents:s,tick:r,windowTime:t,cellWidth:i},R,k))}),y]},[e,n,r,t,i]);return Ve({rowsContentRef:u,bodyRef:a}),_react.useEffect.call(void 0, ()=>{f&&(f.setRowsHeight(l.current),f.setAllRowsHeight(g))},[d,g]),d},Qe=Yt;var Zt=_react.forwardRef.call(void 0, ({rows:e,events:t,staticEvents:r,setEvents:n,tick:o,windowTime:i,cellWidth:s,setWindowTime:a,contentWidth:f,setCellWidth:l,bodyRef:u,lineClassName:d},g)=>{let[y,m]=_react.useState.call(void 0, !1),h=_react.useRef.call(void 0, null),[p,b]=_react.useState.call(void 0, !1),{blockWidth:w}=V({windowTime:i,contentWidth:f}),R=_react.useContext.call(void 0, P),k=_react.useCallback.call(void 0, _=>{if(_.preventDefault(),!y)return;let S=_.target,{left:A}=S.getBoundingClientRect(),H=_.clientX-A,Y=o?Math.floor(o*w):0;h.current&&h.current-H>=w?(h.current=H,a(J=>[J[0]+Y,J[1]+Y])):h.current&&H-h.current>=w&&(h.current=H,a(J=>[J[0]-Y,J[1]-Y]))},[w,a,y]),c=_react.useCallback.call(void 0, _=>{m(!0),_.button===1&&_.preventDefault();let S=_.target,{left:A}=S.getBoundingClientRect();h.current=_.clientX-A},[m]),x=_react.useCallback.call(void 0, ()=>{m(!1)},[m]),C=_react.useCallback.call(void 0, ()=>m(!1),[m]),D=Qe({rows:e,windowTime:i,tick:o,events:t,staticEvents:r,cellWidth:s,setEvents:n,bodyRef:u}),ae=_react.useCallback.call(void 0, _=>{_.preventDefault(),_.button===1&&b(S=>!S)},[]),M=_react.useCallback.call(void 0, _=>{let S=o?900/o:0;p&&l(A=>{let H=_.deltaY>0?A+S:A-S;return H<S||H>S*12?A:H})},[p,s,o]);return _react.useEffect.call(void 0, ()=>{u.current&&(u.current.style.overflow=p?"hidden":"auto")},[p]),_react2.default.createElement("div",{key:"content",ref:g,className:"content-wrapper",onMouseDown:c,onMouseUp:x,onMouseMove:k,onMouseLeave:C,onAuxClick:ae,onWheel:M,style:{cursor:y?"grabbing":"grab",height:R==null?void 0:R.allRowsHeight}},_react2.default.createElement(He,{contentWidth:f,cellWidth:s,lineClassName:d}),D)}),tt=Zt;var nr=({windowTime:e,setTick:t,setCellWidth:r,contentRef:n})=>{let o=_react.useRef.call(void 0, 0),i=_react.useMemo.call(void 0, ()=>new ResizeObserver(s=>{var a;for(let f of s){let l=(a=f.borderBoxSize)==null?void 0:a[0].inlineSize;if(typeof l=="number"&&l!==o.current){o.current=l;let u=e[1]-e[0],d=u/3600;t(u/f.contentRect.width),r(f.contentRect.width/d)}}}),[e]);_react.useEffect.call(void 0, ()=>(n.current&&i.observe(n.current,{box:"border-box"}),()=>i.disconnect()),[i])},rt=nr;var Gn=({rows:e,events:t,staticEvents:r,onDrop:n,startDate:o,endDate:i,additionalClassNames:s})=>{let[a,f]=_react.useState.call(void 0, [new Date(o.getFullYear(),o.getMonth(),o.getDate(),o.getHours(),0,0).getTime()/1e3,new Date(i.getFullYear(),i.getMonth(),i.getDate(),i.getHours(),0,0).getTime()/1e3]),[l,u]=_react.useState.call(void 0, 0),[d,g]=_react.useState.call(void 0, []),y=_react.useRef.call(void 0, null),m=_react.useRef.call(void 0, null),h=_react.useRef.call(void 0, null),[p,b]=_react.useState.call(void 0, null),[w,R]=_react.useState.call(void 0, 0),[k,c]=_react.useState.call(void 0, null),[x,C]=_react.useState.call(void 0, 0);_react.useEffect.call(void 0, ()=>{if(y.current){let M=a[1]-a[0],_=M/3600;b(M/y.current.getBoundingClientRect().width),u(y.current.getBoundingClientRect().width/_)}},[]),_react.useEffect.call(void 0, ()=>{h.current&&R(h.current.getBoundingClientRect().width-h.current.scrollWidth)},[]),_react.useEffect.call(void 0, ()=>{g(t.sort(ie))},[t]);let[D,ae]=_react.useState.call(void 0, !1);return _react.useEffect.call(void 0, ()=>{let M=null;e.forEach(_=>{M===null?M={[_.id]:{minHeight:40}}:M[_.id]={minHeight:40}}),c(M)},[e]),rt({contentRef:y,setCellWidth:u,setTick:b,windowTime:a}),_react2.default.createElement("div",{className:"main-wrapper",ref:m},_react2.default.createElement(Re,{windowTime:a,tick:p,contentWidth:y.current?y.current.getBoundingClientRect().width:null,scrollWidth:w}),_react2.default.createElement("div",{className:"body-wrapper",ref:h},_react2.default.createElement(P.Provider,{value:{rowsHeight:k,setRowsHeight:c,allRowsHeight:x,setAllRowsHeight:C}},_react2.default.createElement(Me,{rows:e,className:s==null?void 0:s.rowsHeader}),_react2.default.createElement(W.Provider,{value:{dragStarted:D,setDragStarted:ae}},_react2.default.createElement(oe.Provider,{value:{onDrop:n}},_react2.default.createElement(tt,{events:d,staticEvents:r,rows:e,setEvents:g,tick:p,windowTime:a,cellWidth:l,setWindowTime:f,ref:y,setCellWidth:u,contentWidth:y.current?y.current.getBoundingClientRect().width:null,bodyRef:h,lineClassName:s==null?void 0:s.gridLine}))))))};exports.Timeline = Gn;
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }var ut=Object.defineProperty;var Pe=Object.getOwnPropertySymbols;var ft=Object.prototype.hasOwnProperty,dt=Object.prototype.propertyIsEnumerable;var ke=(e,t,r)=>t in e?ut(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Ce=(e,t)=>{for(var r in t||(t={}))ft.call(t,r)&&ke(e,r,t[r]);if(Pe)for(var r of Pe(t))dt.call(t,r)&&ke(e,r,t[r]);return e};var _react = require('react'); var _react2 = _interopRequireDefault(_react);var mt=e=>{let t=null;switch(e){case 0:t="Jan";break;case 1:t="Feb";break;case 2:t="Mar";break;case 3:t="Apr";break;case 4:t="May";break;case 5:t="Jun";break;case 6:t="Jul";break;case 7:t="Aug";break;case 8:t="Sep";break;case 9:t="Oct";break;case 10:t="Nov";break;case 11:t="Dec";break;default:t="Jan"}return t},de=mt;var pt=e=>{let t=null;switch(e){case 0:t="Mon";break;case 1:t="Tue";break;case 2:t="Wed";break;case 3:t="Thu";break;case 4:t="Fri";break;case 5:t="Sat";break;case 6:t="Sun";break;default:t="Mon"}return t},me=pt;var gt=({windowTime:e,tick:t,contentWidth:r,blockWidth:n})=>{let{dayBlocks:o,hourBlocks:i}=_react.useMemo.call(void 0, ()=>{let s=e[0],a=[],f=[];if(t===null||r===null)return{dayBlocks:[],hourBlocks:[]};let h=r,l=1;for(;;){let d=new Date(s*1e3),_=new Date(d.getFullYear(),d.getMonth(),d.getDate(),23,59,59),m=(_.getTime()-d.getTime())/1e3/t;if(h-=m,Math.round(h)<0){let u=Math.round((m+h)/n);for(let v=0;v<u;v++)f.push(_react2.default.createElement("div",{className:"hour-block",key:`${d.getDate()}_hour_${v}`},v<10?`0${v}:00`:`${v}:00`));a.push(_react2.default.createElement("div",{className:"day-block",key:`${d.getDate()} ${d.getMonth()}`,style:{gridColumn:`${l} / ${l+u}`}},me(d.getDay())," ",d.getDate()," ",de(d.getMonth()))),l+=u;break}let b=Math.round(m/n);for(let u=24-b;u<24;u++)f.push(_react2.default.createElement("div",{className:"hour-block",key:`${d.getDate()}_hour_${u}`},u<10?`0${u}:00`:`${u}:00`));if(a.push(_react2.default.createElement("div",{className:"day-block",key:`${d.getDate()} ${d.getMonth()}`,style:{gridColumn:`${l} / ${l+b}`}},me(d.getDay())," ",d.getDate()," ",de(d.getMonth()))),l+=b,Math.round(h)===0)break;s=(_.getTime()+1e3)/1e3}return{dayBlocks:a,hourBlocks:f}},[t,e,r]);return{dayBlocks:o,hourBlocks:i}},ze=gt;var bt=({windowTime:e,contentWidth:t})=>{let r=_react.useMemo.call(void 0, ()=>(e[1]-e[0])/3600,[e]),n=t?t/r:0;return{numberOfHourBlocks:r,blockWidth:n}},te=bt;var wt=({windowTime:e,tick:t,contentWidth:r,scrollWidth:n,additionalClassNames:o})=>{let i=_react.useRef.call(void 0, null),{blockWidth:s}=te({windowTime:e,contentWidth:r}),{dayBlocks:a,hourBlocks:f}=ze({windowTime:e,tick:t,contentWidth:r,blockWidth:s}),h=o!=null&&o.timeBar?"time-bar "+o.timeBar:"time-bar",l=o!=null&&o.dayRow?"day-row "+o.dayRow:"day-row",d=o!=null&&o.hourRow?"hour-row "+o.hourRow:"hour-row";return _react2.default.createElement("div",{className:h},_react2.default.createElement("div",{className:"empty-block"}),_react2.default.createElement("div",{className:"time-content",ref:i,style:{minWidth:r||0}},_react2.default.createElement("div",{className:l,style:{gridTemplateColumns:`repeat(auto-fill, minmax(${s}px, 1fr))`}},a.map(_=>_)),_react2.default.createElement("div",{className:d,style:{gridTemplateColumns:`repeat(auto-fill, minmax(${s}px, 1fr))`}},f.map(_=>_))),n?_react2.default.createElement("div",{style:{width:n,height:"100%",boxSizing:"border-box",borderLeft:"1px solid yellow"}}):null)},He=wt;var O=_react.createContext.call(void 0, null);var Tt=({name:e,id:t})=>{let r=_react.useContext.call(void 0, O),n=r&&r.rowsHeight&&r.rowsHeight[t]?r.rowsHeight[t].minHeight:40;return _react2.default.createElement("div",{className:"row-header",style:{minHeight:n}},e)},Oe=Tt;var Rt=({rows:e,className:t})=>{let r=t?"rows-header-wrapper "+t:"rows-header-wrapper";return _react2.default.createElement("div",{className:r},e.map(n=>_react2.default.createElement(Oe,{key:`row_header_${n.id}`,id:n.id,name:n.name})))},Le=Rt;var Dt=({contentWidth:e,cellWidth:t,lineClassName:r})=>{let n=_react.useMemo.call(void 0, ()=>{let i=[],s=r?"line "+r:"line";if(e)for(let a=t;a<e;a=a+t)i.push(_react2.default.createElement("div",{key:`line_${a}`,className:s}));return i},[t,e]),o=_react.useMemo.call(void 0, ()=>e?e-n.length*t:0,[e,t,n]);return _react2.default.createElement("div",{className:o<1?"lines-canvas hide-last-line":"lines-canvas",style:o<1?{gridTemplateColumns:`repeat(auto-fill, minmax(${t}px, 1fr))`}:{gridTemplateColumns:`repeat(auto-fill, minmax(${o}px, ${t}px))`}},n)},Fe=Dt;var St=({id:e,startPosition:t,width:r,top:n,height:o})=>_react2.default.createElement("div",{id:`static_event_${e}`,key:`static_event_${e}`,className:"static-event",onDrop:i=>i.stopPropagation(),style:{left:t,width:r,top:n,minHeight:o}}),$e=St;var Xe=Symbol.for("immer-nothing"),Be=Symbol.for("immer-draftable"),P=Symbol.for("immer-state"),Pt=process.env.NODE_ENV!=="production"?[function(e){return`The plugin for '${e}' has not been loaded into Immer. To enable the plugin, import and call \`enable${e}()\` when initializing your application.`},function(e){return`produce can only be called on things that are draftable: plain objects, arrays, Map, Set or classes that are marked with '[immerable]: true'. Got '${e}'`},"This object has been frozen and should not be mutated",function(e){return"Cannot use a proxy that has been revoked. Did you pass an object from inside an immer function to an async process? "+e},"An immer producer returned a new value *and* modified its draft. Either return a new value *or* modify the draft.","Immer forbids circular references","The first or second argument to `produce` must be a function","The third argument to `produce` must be a function or undefined","First argument to `createDraft` must be a plain object, an array, or an immerable object","First argument to `finishDraft` must be a draft returned by `createDraft`",function(e){return`'current' expects a draft, got: ${e}`},"Object.defineProperty() cannot be used on an Immer draft","Object.setPrototypeOf() cannot be used on an Immer draft","Immer only supports deleting array indices","Immer only supports setting array indices and the 'length' property",function(e){return`'original' expects a draft, got: ${e}`}]:[];function S(e,...t){if(process.env.NODE_ENV!=="production"){let r=Pt[e],n=typeof r=="function"?r.apply(null,t):r;throw new Error(`[Immer] ${n}`)}throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var W=Object.getPrototypeOf;function G(e){return!!e&&!!e[P]}function N(e){var t;return e?je(e)||Array.isArray(e)||!!e[Be]||!!((t=e.constructor)!=null&&t[Be])||se(e)||ae(e):!1}var kt=Object.prototype.constructor.toString();function je(e){if(!e||typeof e!="object")return!1;let t=W(e);if(t===null)return!0;let r=Object.hasOwnProperty.call(t,"constructor")&&t.constructor;return r===Object?!0:typeof r=="function"&&Function.toString.call(r)===kt}function re(e,t){ie(e)===0?Reflect.ownKeys(e).forEach(r=>{t(r,e[r],e)}):e.forEach((r,n)=>t(n,r,e))}function ie(e){let t=e[P];return t?t.type_:Array.isArray(e)?1:se(e)?2:ae(e)?3:0}function ge(e,t){return ie(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function Ye(e,t,r){let n=ie(e);n===2?e.set(t,r):n===3?e.add(r):e[t]=r}function Ct(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}function se(e){return e instanceof Map}function ae(e){return e instanceof Set}function I(e){return e.copy_||e.base_}function ye(e,t){if(se(e))return new Map(e);if(ae(e))return new Set(e);if(Array.isArray(e))return Array.prototype.slice.call(e);let r=je(e);if(t===!0||t==="class_only"&&!r){let n=Object.getOwnPropertyDescriptors(e);delete n[P];let o=Reflect.ownKeys(n);for(let i=0;i<o.length;i++){let s=o[i],a=n[s];a.writable===!1&&(a.writable=!0,a.configurable=!0),(a.get||a.set)&&(n[s]={configurable:!0,writable:!0,enumerable:a.enumerable,value:e[s]})}return Object.create(W(e),n)}else{let n=W(e);if(n!==null&&r)return Ce({},e);let o=Object.create(n);return Object.assign(o,e)}}function xe(e,t=!1){return ce(e)||G(e)||!N(e)||(ie(e)>1&&(e.set=e.add=e.clear=e.delete=zt),Object.freeze(e),t&&Object.entries(e).forEach(([r,n])=>xe(n,!0))),e}function zt(){S(2)}function ce(e){return Object.isFrozen(e)}var Ht={};function F(e){let t=Ht[e];return t||S(0,e),t}var q;function Ke(){return q}function Ot(e,t){return{drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function We(e,t){t&&(F("Patches"),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function be(e){ve(e),e.drafts_.forEach(At),e.drafts_=null}function ve(e){e===q&&(q=e.parent_)}function Ge(e){return q=Ot(q,e)}function At(e){let t=e[P];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function Je(e,t){t.unfinalizedDrafts_=t.drafts_.length;let r=t.drafts_[0];return e!==void 0&&e!==r?(r[P].modified_&&(be(t),S(4)),N(e)&&(e=ne(t,e),t.parent_||oe(t,e)),t.patches_&&F("Patches").generateReplacementPatches_(r[P].base_,e,t.patches_,t.inversePatches_)):e=ne(t,r,[]),be(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==Xe?e:void 0}function ne(e,t,r){if(ce(t))return t;let n=t[P];if(!n)return re(t,(o,i)=>Ue(e,n,t,o,i,r)),t;if(n.scope_!==e)return t;if(!n.modified_)return oe(e,n.base_,!0),n.base_;if(!n.finalized_){n.finalized_=!0,n.scope_.unfinalizedDrafts_--;let o=n.copy_,i=o,s=!1;n.type_===3&&(i=new Set(o),o.clear(),s=!0),re(i,(a,f)=>Ue(e,n,o,a,f,r,s)),oe(e,o,!1),r&&e.patches_&&F("Patches").generatePatches_(n,r,e.patches_,e.inversePatches_)}return n.copy_}function Ue(e,t,r,n,o,i,s){if(process.env.NODE_ENV!=="production"&&o===r&&S(5),G(o)){let a=i&&t&&t.type_!==3&&!ge(t.assigned_,n)?i.concat(n):void 0,f=ne(e,o,a);if(Ye(r,n,f),G(f))e.canAutoFreeze_=!1;else return}else s&&r.add(o);if(N(o)&&!ce(o)){if(!e.immer_.autoFreeze_&&e.unfinalizedDrafts_<1)return;ne(e,o),(!t||!t.scope_.parent_)&&typeof n!="symbol"&&Object.prototype.propertyIsEnumerable.call(r,n)&&oe(e,o)}}function oe(e,t,r=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&xe(t,r)}function Lt(e,t){let r=Array.isArray(e),n={type_:r?1:0,scope_:t?t.scope_:Ke(),modified_:!1,finalized_:!1,assigned_:{},parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1},o=n,i=Ee;r&&(o=[n],i=Q);let{revoke:s,proxy:a}=Proxy.revocable(o,i);return n.draft_=a,n.revoke_=s,a}var Ee={get(e,t){if(t===P)return e;let r=I(e);if(!ge(r,t))return It(e,r,t);let n=r[t];return e.finalized_||!N(n)?n:n===pe(e.base_,t)?(he(e),e.copy_[t]=_e(n,e)):n},has(e,t){return t in I(e)},ownKeys(e){return Reflect.ownKeys(I(e))},set(e,t,r){let n=Ve(I(e),t);if(n!=null&&n.set)return n.set.call(e.draft_,r),!0;if(!e.modified_){let o=pe(I(e),t),i=o==null?void 0:o[P];if(i&&i.base_===r)return e.copy_[t]=r,e.assigned_[t]=!1,!0;if(Ct(r,o)&&(r!==void 0||ge(e.base_,t)))return!0;he(e),we(e)}return e.copy_[t]===r&&(r!==void 0||t in e.copy_)||Number.isNaN(r)&&Number.isNaN(e.copy_[t])||(e.copy_[t]=r,e.assigned_[t]=!0),!0},deleteProperty(e,t){return pe(e.base_,t)!==void 0||t in e.base_?(e.assigned_[t]=!1,he(e),we(e)):delete e.assigned_[t],e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){let r=I(e),n=Reflect.getOwnPropertyDescriptor(r,t);return n&&{writable:!0,configurable:e.type_!==1||t!=="length",enumerable:n.enumerable,value:r[t]}},defineProperty(){S(11)},getPrototypeOf(e){return W(e.base_)},setPrototypeOf(){S(12)}},Q={};re(Ee,(e,t)=>{Q[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}});Q.deleteProperty=function(e,t){return process.env.NODE_ENV!=="production"&&isNaN(parseInt(t))&&S(13),Q.set.call(this,e,t,void 0)};Q.set=function(e,t,r){return process.env.NODE_ENV!=="production"&&t!=="length"&&isNaN(parseInt(t))&&S(14),Ee.set.call(this,e[0],t,r,e[0])};function pe(e,t){let r=e[P];return(r?I(r):e)[t]}function It(e,t,r){var o;let n=Ve(t,r);return n?"value"in n?n.value:(o=n.get)==null?void 0:o.call(e.draft_):void 0}function Ve(e,t){if(!(t in e))return;let r=W(e);for(;r;){let n=Object.getOwnPropertyDescriptor(r,t);if(n)return n;r=W(r)}}function we(e){e.modified_||(e.modified_=!0,e.parent_&&we(e.parent_))}function he(e){e.copy_||(e.copy_=ye(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var Nt=class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.produce=(t,r,n)=>{if(typeof t=="function"&&typeof r!="function"){let i=r;r=t;let s=this;return function(f=i,...h){return s.produce(f,l=>r.call(this,l,...h))}}typeof r!="function"&&S(6),n!==void 0&&typeof n!="function"&&S(7);let o;if(N(t)){let i=Ge(this),s=_e(t,void 0),a=!0;try{o=r(s),a=!1}finally{a?be(i):ve(i)}return We(i,n),Je(o,i)}else if(!t||typeof t!="object"){if(o=r(t),o===void 0&&(o=t),o===Xe&&(o=void 0),this.autoFreeze_&&xe(o,!0),n){let i=[],s=[];F("Patches").generateReplacementPatches_(t,o,i,s),n(i,s)}return o}else S(1,t)},this.produceWithPatches=(t,r)=>{if(typeof t=="function")return(s,...a)=>this.produceWithPatches(s,f=>t(f,...a));let n,o;return[this.produce(t,r,(s,a)=>{n=s,o=a}),n,o]},typeof(e==null?void 0:e.autoFreeze)=="boolean"&&this.setAutoFreeze(e.autoFreeze),typeof(e==null?void 0:e.useStrictShallowCopy)=="boolean"&&this.setUseStrictShallowCopy(e.useStrictShallowCopy)}createDraft(e){N(e)||S(8),G(e)&&(e=Ft(e));let t=Ge(this),r=_e(e,void 0);return r[P].isManual_=!0,ve(t),r}finishDraft(e,t){let r=e&&e[P];(!r||!r.isManual_)&&S(9);let{scope_:n}=r;return We(n,t),Je(void 0,n)}setAutoFreeze(e){this.autoFreeze_=e}setUseStrictShallowCopy(e){this.useStrictShallowCopy_=e}applyPatches(e,t){let r;for(r=t.length-1;r>=0;r--){let o=t[r];if(o.path.length===0&&o.op==="replace"){e=o.value;break}}r>-1&&(t=t.slice(r+1));let n=F("Patches").applyPatches_;return G(e)?n(e,t):this.produce(e,o=>n(o,t))}};function _e(e,t){let r=se(e)?F("MapSet").proxyMap_(e,t):ae(e)?F("MapSet").proxySet_(e,t):Lt(e,t);return(t?t.scope_:Ke()).drafts_.push(r),r}function Ft(e){return G(e)||S(10,e),qe(e)}function qe(e){if(!N(e)||ce(e))return e;let t=e[P],r;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,r=ye(e,t.scope_.immer_.useStrictShallowCopy_)}else r=ye(e,!0);return re(r,(n,o)=>{Ye(r,n,qe(o))}),t&&(t.finalized_=!1),r}var k=new Nt,le=k.produce,Kr=k.produceWithPatches.bind(k),Vr=k.setAutoFreeze.bind(k),qr=k.setUseStrictShallowCopy.bind(k),Qr=k.applyPatches.bind(k),Zr=k.createDraft.bind(k),en=k.finishDraft.bind(k);var J=_react.createContext.call(void 0, {dragStarted:!1,setDragStarted:()=>{}});var U=_react.createContext.call(void 0, {});var Wt=(e,t)=>e.startTime-t.startTime<0||e.startTime===t.startTime&&e.endTime<t.endTime?-1:1,$=Wt;var Xt=_react.forwardRef.call(void 0, (e,t)=>{let{setEvents:r,tick:n,id:o,windowTime:i,cellWidth:s,children:a}=e,{dragStarted:f,setDragStarted:h}=_react.useContext.call(void 0, J),{onDrop:l}=_react.useContext.call(void 0, U),d=_react.useCallback.call(void 0, m=>{m.preventDefault();let b=m.target,{left:u}=b.getBoundingClientRect(),v=m.dataTransfer.getData("eventId"),g=Math.round((m.clientX-u)/s),R=s*g;r(le(C=>{let c=C.find(T=>T.id===v);if(c&&n){let T=i[0]+R*n,z=c.endTime-c.startTime,M=i[0]+z+R*n;l&&l({eventId:c.id,oldRowId:c.rowId,newRowId:e.id,startTime:T,endTime:M}),c.startTime=T,c.endTime=M,c.rowId=e.id}C.sort($)})),h(!1)},[r,n,i,s]),_=_react.useContext.call(void 0, O),D=_&&_.rowsHeight&&_.rowsHeight[o]?_.rowsHeight[o].minHeight:40;return _react2.default.createElement("div",{id:`row_${o}`,ref:t,onDragOver:m=>m.preventDefault(),onDrop:d,className:f?"row-content not-clickable":"row-content","data-index":o,style:{minHeight:D}},a)}),Qe=Xt;var Re="./grip-lines-vertical-solid-ZAJSSXEQ.svg";var Yt=({id:e,startPosition:t,width:r,top:n,props:o,setEvents:i,tick:s})=>{let{setDragStarted:a}=_react.useContext.call(void 0, J),{onResize:f,eventsResize:h}=_react.useContext.call(void 0, U),l=_react.useRef.call(void 0, 0),d=_react.useCallback.call(void 0, y=>{y.stopPropagation(),y.dataTransfer.setData("eventId",e),setTimeout(()=>a(!0),0);let p=y.target;p.style.opacity="50%"},[a]),_=_react.useCallback.call(void 0, y=>{y.stopPropagation(),a(!1);let p=y.target;p.style.opacity="100%"},[a]),D=o!=null&&o.classNames?"event "+o.classNames.join(" "):"event",[m,b]=_react.useState.call(void 0, !0),[u,v]=_react.useState.call(void 0, 0),g=_react.useRef.call(void 0, 0),[R,C]=_react.useState.call(void 0, !1),c=_react.useRef.call(void 0, null),T=_react.useCallback.call(void 0, y=>{let p=y.clientX-l.current;v(c.current==="left"?p*-1:p),g.current=p},[v]),z=_react.useCallback.call(void 0, (y,p)=>{l.current=0,C(!1),document.removeEventListener("mousemove",T);let E=document.getElementById("lock-cursor");E&&E.remove(),i(le(x=>{let w=x.find(H=>H.id===e);if(w&&s){if(p==="left"){let H=Math.round(w.startTime+g.current*s);w.startTime=H}else{let H=Math.round(w.endTime+g.current*s);w.endTime=H}f&&f({eventId:w.id,startTime:w.startTime,endTime:w.endTime})}x.sort($),g.current=0,v(0)}))},[T,i,s,v,$]),M=_react.useCallback.call(void 0, (y,p)=>{y.stopPropagation(),c.current=p,C(!0);let E=document.createElement("style");E.id="lock-cursor",E.innerHTML="* { cursor: e-resize !important; }",document.head.appendChild(E),document.addEventListener("mousemove",T),document.addEventListener("mouseup",x=>z(x,p),{once:!0}),l.current=y.clientX},[T,z]),K=_react.useCallback.call(void 0, y=>{R||y.stopPropagation()},[R]);return _react2.default.createElement("div",{id:`event_${e}`,key:`event_${e}`,className:D,draggable:o!=null&&o.isLocked?!1:m,onDragStart:d,onDragEnd:_,onMouseDown:y=>y.stopPropagation(),onMouseMove:K,onDrop:y=>y.stopPropagation(),style:{left:c.current==="left"?t-u:t,width:r+u,top:n,cursor:o!=null&&o.isLocked?"not-allowed":"pointer"}},_react2.default.createElement("div",{className:"event-content"},!(o!=null&&o.isLocked)&&(h||(o==null?void 0:o.isResizable))&&_react2.default.createElement("img",{className:"event-resize",style:R?{opacity:"100%"}:void 0,src:Re,alt:"resize-icon",draggable:!1,onMouseEnter:()=>b(!1),onMouseLeave:()=>b(!0),onMouseDown:y=>M(y,"left")}),o!=null&&o.content?o.content:null,!(o!=null&&o.isLocked)&&(h||(o==null?void 0:o.isResizable))&&_react2.default.createElement("img",{className:"event-resize",style:R?{opacity:"100%"}:void 0,src:Re,alt:"resize-icon",draggable:!1,onMouseEnter:()=>b(!1),onMouseLeave:()=>b(!0),onMouseDown:y=>M(y,"right")})))},et=Yt;var qt=({bodyRef:e,rowsContentRef:t})=>{let r=_react.useCallback.call(void 0, o=>{o.forEach(i=>{i.isIntersecting?i.target.classList.remove("row-hidden"):i.target.classList.add("row-hidden")})},[]),n=new IntersectionObserver(r,{root:e.current});_react.useEffect.call(void 0, ()=>(t.current&&t.current.forEach(o=>{n.observe(o)}),()=>n.disconnect()),[n])},tt=qt;var tr=({rows:e,windowTime:t,tick:r,events:n,staticEvents:o,cellWidth:i,setEvents:s,bodyRef:a})=>{let f=_react.useContext.call(void 0, O),h=_react.useRef.call(void 0, null),l=_react.useRef.call(void 0, []),[d,_]=_react.useMemo.call(void 0, ()=>{let D=0;return[e.map((m,b)=>{let u=0,v=[],g=0,R=r?n.filter(c=>c.rowId===m.id).map(c=>{if(c.endTime>=t[0]&&c.startTime<=t[1]){let T=0,z=!0;for(let M=0;M<=u;M++)if(v&&v[M]&&v[M].endTime>c.startTime)T+=1;else{u>g&&(g=u),u=0,z=!1;break}return z&&(u=T),v[T]=c,_react2.default.createElement(et,{key:`event_${c.id}`,id:c.id,startPosition:(c.startTime-t[0])/r,width:(c.endTime-c.startTime)/r,top:10+22*T,props:c.props,setEvents:s,tick:r})}}):null;u>g&&(g=u),h.current===null?h.current={[m.id]:{minHeight:40+g*22}}:h.current[m.id]={minHeight:40+g*22},D+=40+g*22;let C=r&&o?o.filter(c=>c.rowId===m.id).map(c=>{if(c.endTime>=t[0]&&c.startTime<=t[1])return _react2.default.createElement($e,{key:`static_event_${c.id}`,id:c.id,startPosition:(c.startTime-t[0])/r,width:(c.endTime-c.startTime)/r,top:10,height:20+g*22})}):null;return _react2.default.createElement(_react2.default.Fragment,{key:`row_content_${m.id}`},_react2.default.createElement(Qe,{id:m.id,ref:c=>{l.current&&l.current[b]&&c?l.current[b]=c:l.current&&c&&l.current.push(c)},setEvents:s,tick:r,windowTime:t,cellWidth:i},R,C))}),D]},[e,n,r,t,i]);return tt({rowsContentRef:l,bodyRef:a}),_react.useEffect.call(void 0, ()=>{f&&(f.setRowsHeight(h.current),f.setAllRowsHeight(_))},[d,_]),d},nt=tr;var sr=_react.forwardRef.call(void 0, ({rows:e,events:t,staticEvents:r,setEvents:n,tick:o,windowTime:i,cellWidth:s,setWindowTime:a,contentWidth:f,setCellWidth:h,bodyRef:l,lineClassName:d},_)=>{let[D,m]=_react.useState.call(void 0, !1),b=_react.useRef.call(void 0, null),[u,v]=_react.useState.call(void 0, !1),{blockWidth:g}=te({windowTime:i,contentWidth:f}),R=_react.useContext.call(void 0, O),C=_react.useCallback.call(void 0, p=>{if(p.preventDefault(),!D)return;let E=p.target,{left:x}=E.getBoundingClientRect(),w=p.clientX-x,H=o?Math.floor(o*g):0;b.current&&b.current-w>=g?(b.current=w,a(V=>[V[0]+H,V[1]+H])):b.current&&w-b.current>=g&&(b.current=w,a(V=>[V[0]-H,V[1]-H]))},[g,a,D]),c=_react.useCallback.call(void 0, p=>{m(!0),p.button===1&&p.preventDefault();let E=p.target,{left:x}=E.getBoundingClientRect();b.current=p.clientX-x},[m]),T=_react.useCallback.call(void 0, ()=>{m(!1)},[m]),z=_react.useCallback.call(void 0, ()=>m(!1),[m]),M=nt({rows:e,windowTime:i,tick:o,events:t,staticEvents:r,cellWidth:s,setEvents:n,bodyRef:l}),K=_react.useCallback.call(void 0, p=>{p.preventDefault(),p.button===1&&v(E=>!E)},[]),y=_react.useCallback.call(void 0, p=>{let E=o?900/o:0;u&&h(x=>{let w=p.deltaY>0?x+E:x-E;return w<E||w>E*12?x:w})},[u,s,o]);return _react.useEffect.call(void 0, ()=>{l.current&&(l.current.style.overflow=u?"hidden":"auto")},[u]),_react2.default.createElement("div",{key:"content",ref:_,className:"content-wrapper",onMouseDown:c,onMouseUp:T,onMouseMove:C,onMouseLeave:z,onAuxClick:K,onWheel:y,style:{cursor:D?"grabbing":"grab",height:R==null?void 0:R.allRowsHeight}},_react2.default.createElement(Fe,{contentWidth:f,cellWidth:s,lineClassName:d}),M)}),st=sr;var ur=({windowTime:e,setTick:t,setCellWidth:r,contentRef:n})=>{let o=_react.useRef.call(void 0, 0),i=_react.useMemo.call(void 0, ()=>new ResizeObserver(s=>{var a;for(let f of s){let h=(a=f.borderBoxSize)==null?void 0:a[0].inlineSize;if(typeof h=="number"&&h!==o.current){o.current=h;let l=e[1]-e[0],d=l/3600;t(l/f.contentRect.width),r(f.contentRect.width/d)}}}),[e]);_react.useEffect.call(void 0, ()=>(n.current&&i.observe(n.current,{box:"border-box"}),()=>i.disconnect()),[i])},at=ur;var mr=({tick:e,windowTime:t})=>{let[r,n]=_react.useState.call(void 0, new Date().getTime()/1e3),[o,i]=_react.useState.call(void 0, 0),s=_react.useRef.call(void 0, null);return _react.useEffect.call(void 0, ()=>{if(e){let a=r-t[0];i(Math.round(a/e)),s.current!==null&&clearInterval(s.current);let f=setInterval(()=>{n(new Date().getTime()/1e3)},e*1e3);s.current=f}},[e,t,r]),_react2.default.createElement(_react2.default.Fragment,null,t[0]<=r&&r<=t[1]&&_react2.default.createElement(_react2.default.Fragment,null,_react2.default.createElement("div",{className:"rt-arrow",style:{left:86+o}}),_react2.default.createElement("div",{className:"rt-line",style:{left:100+o}})))},lt=mr;var ao=({rows:e,events:t,staticEvents:r,onDrop:n,onResize:o,startDate:i,endDate:s,additionalClassNames:a,showRTIndicator:f=!0,eventsResize:h=!0})=>{let[l,d]=_react.useState.call(void 0, [new Date(i.getFullYear(),i.getMonth(),i.getDate(),i.getHours(),0,0).getTime()/1e3,new Date(s.getFullYear(),s.getMonth(),s.getDate(),s.getHours(),0,0).getTime()/1e3]),[_,D]=_react.useState.call(void 0, 0),[m,b]=_react.useState.call(void 0, []),u=_react.useRef.call(void 0, null),v=_react.useRef.call(void 0, null),g=_react.useRef.call(void 0, null),[R,C]=_react.useState.call(void 0, null),[c,T]=_react.useState.call(void 0, 0),[z,M]=_react.useState.call(void 0, null),[K,y]=_react.useState.call(void 0, 0);_react.useEffect.call(void 0, ()=>{if(u.current){let x=l[1]-l[0],w=x/3600;C(x/u.current.getBoundingClientRect().width),D(u.current.getBoundingClientRect().width/w)}},[]),_react.useEffect.call(void 0, ()=>{g.current&&T(g.current.getBoundingClientRect().width-g.current.scrollWidth)},[]),_react.useEffect.call(void 0, ()=>{b(t.sort($))},[t]);let[p,E]=_react.useState.call(void 0, !1);return _react.useEffect.call(void 0, ()=>{let x=null;e.forEach(w=>{x===null?x={[w.id]:{minHeight:40}}:x[w.id]={minHeight:40}}),M(x)},[e]),at({contentRef:u,setCellWidth:D,setTick:C,windowTime:l}),_react2.default.createElement("div",{className:"main-wrapper",ref:v},f&&_react2.default.createElement(lt,{tick:R,windowTime:l}),_react2.default.createElement(He,{windowTime:l,tick:R,contentWidth:u.current?u.current.getBoundingClientRect().width:null,scrollWidth:c}),_react2.default.createElement("div",{className:"body-wrapper",ref:g},_react2.default.createElement(O.Provider,{value:{rowsHeight:z,setRowsHeight:M,allRowsHeight:K,setAllRowsHeight:y}},_react2.default.createElement(Le,{rows:e,className:a==null?void 0:a.rowsHeader}),_react2.default.createElement(J.Provider,{value:{dragStarted:p,setDragStarted:E}},_react2.default.createElement(U.Provider,{value:{onDrop:n,onResize:o,eventsResize:h}},_react2.default.createElement(st,{events:m,staticEvents:r,rows:e,setEvents:b,tick:R,windowTime:l,cellWidth:_,setWindowTime:d,ref:u,setCellWidth:D,contentWidth:u.current?u.current.getBoundingClientRect().width:null,bodyRef:g,lineClassName:a==null?void 0:a.gridLine}))))))};exports.Timeline = ao;
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["c:\\awesome-timeline-react\\dist\\index.js"],"names":[],"mappings":"AAAA,6KAAI,EAAE,CAAC,MAAM,CAAC,cAAc,CAAC,IAAI,EAAE,CAAC,MAAM,CAAC,qBAAqB,CAAC,IAAI,EAAE,CAAC,MAAM,CAAC,SAAS,CAAC,cAAc,CAAC,EAAE,CAAC,MAAM,CAAC,SAAS,CAAC,oBAAoB,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,EAAE,GAAG,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,GAAG,CAAC,IAAI,EAAE,GAAG,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,GAAG,CAAC,IAAI,EAAE,GAAG,EAAE,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,4EAAgE,
|
|
1
|
+
{"version":3,"sources":["c:\\awesome-timeline-react\\dist\\index.js"],"names":[],"mappings":"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","file":"C:\\awesome-timeline-react\\dist\\index.js","sourcesContent":[null]}
|
package/package.json
CHANGED
|
@@ -1,60 +1,61 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "awesome-timeline-react",
|
|
3
|
-
"version": "0.1.
|
|
4
|
-
"description": "awesome timeline for react applications",
|
|
5
|
-
"scripts": {
|
|
6
|
-
"test": "jest",
|
|
7
|
-
"ladle": "ladle serve",
|
|
8
|
-
"build": "tsup --experimental-dts"
|
|
9
|
-
},
|
|
10
|
-
"repository": {
|
|
11
|
-
"type": "git",
|
|
12
|
-
"url": "git+https://github.com/Plageros/awesome-timeline-react.git"
|
|
13
|
-
},
|
|
14
|
-
"keywords": [
|
|
15
|
-
"react",
|
|
16
|
-
"timeline",
|
|
17
|
-
"scheduling",
|
|
18
|
-
"aps"
|
|
19
|
-
],
|
|
20
|
-
"author": "Jakub Plata",
|
|
21
|
-
"license": "MIT",
|
|
22
|
-
"bugs": {
|
|
23
|
-
"url": "https://github.com/Plageros/awesome-timeline-react/issues"
|
|
24
|
-
},
|
|
25
|
-
"files": [
|
|
26
|
-
"dist"
|
|
27
|
-
],
|
|
28
|
-
"main": "dist/index.js",
|
|
29
|
-
"types": "dist/src/index.d.ts",
|
|
30
|
-
"homepage": "https://github.com/Plageros/awesome-timeline-react#readme",
|
|
31
|
-
"devDependencies": {
|
|
32
|
-
"@babel/preset-env": "^7.25.3",
|
|
33
|
-
"@babel/preset-react": "^7.24.7",
|
|
34
|
-
"@babel/preset-typescript": "^7.24.7",
|
|
35
|
-
"@eslint/js": "^9.2.0",
|
|
36
|
-
"@jest/globals": "^29.7.0",
|
|
37
|
-
"@ladle/react": "^4.0.3",
|
|
38
|
-
"@microsoft/api-extractor": "^7.47.5",
|
|
39
|
-
"@types/jest": "^29.5.12",
|
|
40
|
-
"@types/react": "^18.3.1",
|
|
41
|
-
"@types/react-dom": "^18.3.0",
|
|
42
|
-
"
|
|
43
|
-
"
|
|
44
|
-
"eslint
|
|
45
|
-
"
|
|
46
|
-
"
|
|
47
|
-
"
|
|
48
|
-
"
|
|
49
|
-
"react
|
|
50
|
-
"react-
|
|
51
|
-
"
|
|
52
|
-
"
|
|
53
|
-
"
|
|
54
|
-
"typescript
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
"react
|
|
59
|
-
|
|
60
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "awesome-timeline-react",
|
|
3
|
+
"version": "0.1.8",
|
|
4
|
+
"description": "awesome timeline for react applications",
|
|
5
|
+
"scripts": {
|
|
6
|
+
"test": "jest",
|
|
7
|
+
"ladle": "ladle serve",
|
|
8
|
+
"build": "tsup --experimental-dts"
|
|
9
|
+
},
|
|
10
|
+
"repository": {
|
|
11
|
+
"type": "git",
|
|
12
|
+
"url": "git+https://github.com/Plageros/awesome-timeline-react.git"
|
|
13
|
+
},
|
|
14
|
+
"keywords": [
|
|
15
|
+
"react",
|
|
16
|
+
"timeline",
|
|
17
|
+
"scheduling",
|
|
18
|
+
"aps"
|
|
19
|
+
],
|
|
20
|
+
"author": "Jakub Plata",
|
|
21
|
+
"license": "MIT",
|
|
22
|
+
"bugs": {
|
|
23
|
+
"url": "https://github.com/Plageros/awesome-timeline-react/issues"
|
|
24
|
+
},
|
|
25
|
+
"files": [
|
|
26
|
+
"dist"
|
|
27
|
+
],
|
|
28
|
+
"main": "dist/index.js",
|
|
29
|
+
"types": "dist/src/index.d.ts",
|
|
30
|
+
"homepage": "https://github.com/Plageros/awesome-timeline-react#readme",
|
|
31
|
+
"devDependencies": {
|
|
32
|
+
"@babel/preset-env": "^7.25.3",
|
|
33
|
+
"@babel/preset-react": "^7.24.7",
|
|
34
|
+
"@babel/preset-typescript": "^7.24.7",
|
|
35
|
+
"@eslint/js": "^9.2.0",
|
|
36
|
+
"@jest/globals": "^29.7.0",
|
|
37
|
+
"@ladle/react": "^4.0.3",
|
|
38
|
+
"@microsoft/api-extractor": "^7.47.5",
|
|
39
|
+
"@types/jest": "^29.5.12",
|
|
40
|
+
"@types/react": "^18.3.1",
|
|
41
|
+
"@types/react-dom": "^18.3.0",
|
|
42
|
+
"@types/react-test-renderer": "^18.3.0",
|
|
43
|
+
"babel-jest": "^29.7.0",
|
|
44
|
+
"eslint": "^8.57.0",
|
|
45
|
+
"eslint-plugin-react": "^7.34.1",
|
|
46
|
+
"globals": "^15.1.0",
|
|
47
|
+
"immer": "^10.1.1",
|
|
48
|
+
"jest": "^29.7.0",
|
|
49
|
+
"react": "^18.3.1",
|
|
50
|
+
"react-dom": "^18.3.1",
|
|
51
|
+
"react-test-renderer": "^18.3.1",
|
|
52
|
+
"ts-jest": "^29.2.4",
|
|
53
|
+
"tsup": "^8.2.4",
|
|
54
|
+
"typescript": "^5.4.5",
|
|
55
|
+
"typescript-eslint": "^7.8.0"
|
|
56
|
+
},
|
|
57
|
+
"peerDependencies": {
|
|
58
|
+
"react": "^18",
|
|
59
|
+
"react-dom": "^18"
|
|
60
|
+
}
|
|
61
|
+
}
|