awesome-timeline-react 0.1.7 → 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 CHANGED
@@ -40,9 +40,10 @@ The following properties for Timeline component are available:
40
40
  - `startTime`: `number` (timestamp in seconds)
41
41
  - `endTime`: `number` (timestamp in seconds)
42
42
  - `props`:
43
- - `isLocked`: `boolean` (defines if the event is locked, meaning it cannot be moved. Default is `false`)
43
+ - `isLocked`: `boolean` (defines if event is locked, meaning it cannot be moved. Default is `false`)
44
44
  - `content`: `JSX.Element | string` (customizable content for each event)
45
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`)
46
47
 
47
48
  - `staticEvents` – an array of objects that define static events for particular rows, meaning the events are not interactable by the user.
48
49
 
@@ -51,8 +52,14 @@ The following properties for Timeline component are available:
51
52
  - `eventId`: `string`
52
53
  - `oldRowId`: `string`
53
54
  - `newRowId`: `string`
54
- - `startDate`: `number` (timestamp in seconds)
55
- - `endDate`: `number` (timestamp in seconds)
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)
56
63
 
57
64
  - `additionalClassNames` – contains additional class names that will be included within elements:
58
65
 
@@ -64,6 +71,8 @@ The following properties for Timeline component are available:
64
71
 
65
72
  - `showRTIndicator` – property that controls wheter Real Time Indicator will be show (default as true)
66
73
 
74
+ - `eventsResize` - property that define if events are resizeable (default as true)
75
+
67
76
  ## Awesome Features
68
77
 
69
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.
@@ -74,7 +83,7 @@ One of the awesome features (currently hidden from the interface) is adjusting t
74
83
 
75
84
  Here, we will store major features planned for future releases (from highest to lowest priority):
76
85
 
77
- 1. Resize events
86
+ 1. ~~Resize events~~ - published in 0.1.8 version
78
87
  2. ~~Real time line~~ - published in 0.1.7 version
79
88
  3. Customizable prompts after hovering over an event
80
89
  4. Customizable second row of the time bar
@@ -99,12 +99,16 @@ export declare const default_alias_2: ({
99
99
  width,
100
100
  top,
101
101
  props,
102
+ setEvents,
103
+ tick,
102
104
  }: {
103
105
  id: string;
104
- startPosition: CSSProperties["left"];
105
- width: CSSProperties["width"];
106
+ startPosition: number;
107
+ width: number;
106
108
  top: CSSProperties["top"];
107
109
  props?: EventPropsType;
110
+ setEvents: React_2.Dispatch<React_2.SetStateAction<EventType[]>>;
111
+ tick: number | null;
108
112
  }) => React_2.JSX.Element;
109
113
 
110
114
  export declare const default_alias_3: ({
@@ -186,6 +190,7 @@ export declare type EventPropsType = {
186
190
  isLocked?: boolean;
187
191
  content?: JSX.Element | string;
188
192
  classNames?: string[];
193
+ isResizable?: boolean;
189
194
  };
190
195
 
191
196
  export declare type EventType = {
@@ -200,6 +205,8 @@ export declare const ExternalPropertiesContext: Context<ExternalPropertiesType>;
200
205
 
201
206
  declare type ExternalPropertiesType = {
202
207
  onDrop?: (props: OnDropProps) => void;
208
+ onResize?: (props: OnResizeProps) => void;
209
+ eventsResize?: boolean;
203
210
  };
204
211
 
205
212
  export declare type ModifableElements = {
@@ -218,6 +225,12 @@ export declare type OnDropProps = {
218
225
  endTime: number;
219
226
  };
220
227
 
228
+ export declare type OnResizeProps = {
229
+ eventId: string;
230
+ startTime: number;
231
+ endTime: number;
232
+ };
233
+
221
234
  export declare type PartialRecord<K extends keyof any, T> = Partial<
222
235
  Record<K, T>
223
236
  >;
@@ -266,10 +279,12 @@ declare const Timeline: ({
266
279
  events,
267
280
  staticEvents,
268
281
  onDrop,
282
+ onResize,
269
283
  startDate,
270
284
  endDate,
271
285
  additionalClassNames,
272
286
  showRTIndicator,
287
+ eventsResize,
273
288
  }: TimelineType) => React_2.JSX.Element;
274
289
  export { Timeline };
275
290
  export { Timeline as Timeline_alias_1 };
@@ -281,10 +296,12 @@ export declare type TimelineType = {
281
296
  events: EventType[];
282
297
  staticEvents?: EventType[];
283
298
  onDrop?: (props: OnDropProps) => void;
299
+ onResize?: (props: OnResizeProps) => void;
284
300
  startDate: Date;
285
301
  endDate: Date;
286
302
  additionalClassNames?: PartialRecord<keyof ModifableElements, string>;
287
303
  showRTIndicator?: boolean;
304
+ eventsResize?: boolean;
288
305
  };
289
306
 
290
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{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%}.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}
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 */
@@ -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 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}\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":"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,SAAU,SACV,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,OAtCf,QAuCW,GACX,CAEA,CAAC,WACC,QAAS,MACT,MAAO,KACP,WAAY,OA7Cd,QA8CW,IACT,SAAU,OACV,cAAe,SACf,YAAa,MACf,CClDA,CAAC,gBACC,SAAU,SACV,QAAS,KACT,eAAgB,OAChB,MAAO,KACP,CAAC,WAAW,KAAK,aACf,cAAe,IAAI,MAAM,OAC3B,CACF,CAEA,CAAC,WACC,QAAS,KACT,gBAAiB,OACjB,YAAa,OACb,MAAO,MACP,WAAY,WAAW,IAAK,YAC5B,WAAY,UACd,CAEA,CAdG,YAeD,SAAU,SACV,MAAO,KACP,YAAa,KACb,eAAgB,KAChB,SAAU,OACV,QAAS,EACT,WAAY,WAAW,IAAK,YAC5B,WAAY,UACd,CAEA,CAAC,MACC,SAAU,SACV,OAAQ,KACR,OAAQ,IAAI,MAAM,MAClB,QAAS,EACT,WAAY,IAAI,IAAK,YACrB,WAAY,WACZ,QAAS,KArCX,cAsC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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":"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,SAAU,SACV,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,OAtCf,QAuCW,GACX,CAEA,CAAC,WACC,QAAS,MACT,MAAO,KACP,WAAY,OA7Cd,QA8CW,IACT,SAAU,OACV,cAAe,SACf,YAAa,MACf,CClDA,CAAC,gBACC,SAAU,SACV,QAAS,KACT,eAAgB,OAChB,MAAO,KACP,CAAC,WAAW,KAAK,aACf,cAAe,IAAI,MAAM,OAC3B,CACF,CAEA,CAAC,WACC,QAAS,KACT,gBAAiB,OACjB,YAAa,OACb,MAAO,MACP,WAAY,WAAW,IAAK,YAC5B,WAAY,UACd,CAEA,CAdG,YAeD,SAAU,SACV,MAAO,KACP,YAAa,KACb,eAAgB,KAChB,SAAU,OACV,QAAS,EACT,WAAY,WAAW,IAAK,YAC5B,WAAY,U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Ac,IAChB,CACF,CAEA,CAAC,WACC,WAAY,MACd,CAEA,CAAC,QACC,SAAU,SACV,OAAQ,KAAK,KAAK,EAAE,MACpB,IAAK,KACL,MAAO,IACP,WAAY,WACZ,aAAc,OAAO,IAAI,GAC3B,CAEA,CAAC,SACC,SAAU,SACV,IAAK,EACL,MAAO,EACP,OAAQ,EACR,YAAa,KAAK,MAAM,YACxB,aAAc,KAAK,MAAM,YAEzB,WAAY,KAAK,MAAM,GACzB","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 st=Object.defineProperty;var Ee=Object.getOwnPropertySymbols;var at=Object.prototype.hasOwnProperty,ct=Object.prototype.propertyIsEnumerable;var Te=(e,t,r)=>t in e?st(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,De=(e,t)=>{for(var r in t||(t={}))at.call(t,r)&&Te(e,r,t[r]);if(Ee)for(var r of Ee(t))ct.call(t,r)&&Te(e,r,t[r]);return e};var _react = require('react'); var _react2 = _interopRequireDefault(_react);var lt=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},le=lt;var ut=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},ue=ut;var dt=({windowTime:e,tick:t,contentWidth:r,blockWidth:n})=>{let{dayBlocks:o,hourBlocks:i}=_react.useMemo.call(void 0, ()=>{let s=e[0],a=[],l=[];if(t===null||r===null)return{dayBlocks:[],hourBlocks:[]};let u=r,d=1;for(;;){let p=new Date(s*1e3),y=new Date(p.getFullYear(),p.getMonth(),p.getDate(),23,59,59),f=(y.getTime()-p.getTime())/1e3/t;if(u-=f,Math.round(u)<0){let m=Math.round((f+u)/n);for(let g=0;g<m;g++)l.push(_react2.default.createElement("div",{className:"hour-block",key:`${p.getDate()}_hour_${g}`},g<10?`0${g}:00`:`${g}:00`));a.push(_react2.default.createElement("div",{className:"day-block",key:`${p.getDate()} ${p.getMonth()}`,style:{gridColumn:`${d} / ${d+m}`}},ue(p.getDay())," ",p.getDate()," ",le(p.getMonth()))),d+=m;break}let b=Math.round(f/n);for(let m=24-b;m<24;m++)l.push(_react2.default.createElement("div",{className:"hour-block",key:`${p.getDate()}_hour_${m}`},m<10?`0${m}:00`:`${m}:00`));if(a.push(_react2.default.createElement("div",{className:"day-block",key:`${p.getDate()} ${p.getMonth()}`,style:{gridColumn:`${d} / ${d+b}`}},ue(p.getDay())," ",p.getDate()," ",le(p.getMonth()))),d+=b,Math.round(u)===0)break;s=(y.getTime()+1e3)/1e3}return{dayBlocks:a,hourBlocks:l}},[t,e,r]);return{dayBlocks:o,hourBlocks:i}},Re=dt;var mt=({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=mt;var gt=({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:l}=Re({windowTime:e,tick:t,contentWidth:r,blockWidth:s}),u=o!=null&&o.timeBar?"time-bar "+o.timeBar:"time-bar",d=o!=null&&o.dayRow?"day-row "+o.dayRow:"day-row",p=o!=null&&o.hourRow?"hour-row "+o.hourRow:"hour-row";return _react2.default.createElement("div",{className:u},_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:d,style:{gridTemplateColumns:`repeat(auto-fill, minmax(${s}px, 1fr))`}},a.map(y=>y)),_react2.default.createElement("div",{className:p,style:{gridTemplateColumns:`repeat(auto-fill, minmax(${s}px, 1fr))`}},l.map(y=>y))),n?_react2.default.createElement("div",{style:{width:n,height:"100%",boxSizing:"border-box",borderLeft:"1px solid yellow"}}):null)},Se=gt;var P=_react.createContext.call(void 0, null);var wt=({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)},Pe=wt;var vt=({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(Pe,{key:`row_header_${n.id}`,id:n.id,name:n.name})))},ke=vt;var xt=({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)},Oe=xt;var Tt=({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}}),ze=Tt;var Fe=Symbol.for("immer-nothing"),Ae=Symbol.for("immer-draftable"),E=Symbol.for("immer-state"),Dt=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 x(e,...t){if(process.env.NODE_ENV!=="production"){let r=Dt[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 L=Object.getPrototypeOf;function F(e){return!!e&&!!e[E]}function N(e){var t;return e?Be(e)||Array.isArray(e)||!!e[Ae]||!!((t=e.constructor)!=null&&t[Ae])||te(e)||re(e):!1}var Rt=Object.prototype.constructor.toString();function Be(e){if(!e||typeof e!="object")return!1;let t=L(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)===Rt}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 pe(e,t){return ee(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function We(e,t,r){let n=ee(e);n===2?e.set(t,r):n===3?e.add(r):e[t]=r}function St(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 A(e){return e.copy_||e.base_}function me(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=Be(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(L(e),n)}else{let n=L(e);if(n!==null&&r)return De({},e);let o=Object.create(n);return Object.assign(o,e)}}function _e(e,t=!1){return ne(e)||F(e)||!N(e)||(ee(e)>1&&(e.set=e.add=e.clear=e.delete=Pt),Object.freeze(e),t&&Object.entries(e).forEach(([r,n])=>_e(n,!0))),e}function Pt(){x(2)}function ne(e){return Object.isFrozen(e)}var Mt={};function I(e){let t=Mt[e];return t||x(0,e),t}var U;function Ge(){return U}function kt(e,t){return{drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function Ne(e,t){t&&(I("Patches"),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function he(e){ge(e),e.drafts_.forEach(Ct),e.drafts_=null}function ge(e){e===U&&(U=e.parent_)}function Ie(e){return U=kt(U,e)}function Ct(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_&&(he(t),x(4)),N(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,[]),he(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==Fe?e:void 0}function Q(e,t,r){if(ne(t))return t;let n=t[E];if(!n)return q(t,(o,i)=>Le(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,l)=>Le(e,n,o,a,l,r,s)),Z(e,o,!1),r&&e.patches_&&I("Patches").generatePatches_(n,r,e.patches_,e.inversePatches_)}return n.copy_}function Le(e,t,r,n,o,i,s){if(process.env.NODE_ENV!=="production"&&o===r&&x(5),F(o)){let a=i&&t&&t.type_!==3&&!pe(t.assigned_,n)?i.concat(n):void 0,l=Q(e,o,a);if(We(r,n,l),F(l))e.canAutoFreeze_=!1;else return}else s&&r.add(o);if(N(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_&&_e(t,r)}function Ht(e,t){let r=Array.isArray(e),n={type_:r?1:0,scope_:t?t.scope_:Ge(),modified_:!1,finalized_:!1,assigned_:{},parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1},o=n,i=we;r&&(o=[n],i=X);let{revoke:s,proxy:a}=Proxy.revocable(o,i);return n.draft_=a,n.revoke_=s,a}var we={get(e,t){if(t===E)return e;let r=A(e);if(!pe(r,t))return Ot(e,r,t);let n=r[t];return e.finalized_||!N(n)?n:n===fe(e.base_,t)?(de(e),e.copy_[t]=be(n,e)):n},has(e,t){return t in A(e)},ownKeys(e){return Reflect.ownKeys(A(e))},set(e,t,r){let n=Je(A(e),t);if(n!=null&&n.set)return n.set.call(e.draft_,r),!0;if(!e.modified_){let o=fe(A(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(St(r,o)&&(r!==void 0||pe(e.base_,t)))return!0;de(e),ye(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 fe(e.base_,t)!==void 0||t in e.base_?(e.assigned_[t]=!1,de(e),ye(e)):delete e.assigned_[t],e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){let r=A(e),n=Reflect.getOwnPropertyDescriptor(r,t);return n&&{writable:!0,configurable:e.type_!==1||t!=="length",enumerable:n.enumerable,value:r[t]}},defineProperty(){x(11)},getPrototypeOf(e){return L(e.base_)},setPrototypeOf(){x(12)}},X={};q(we,(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))&&x(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))&&x(14),we.set.call(this,e[0],t,r,e[0])};function fe(e,t){let r=e[E];return(r?A(r):e)[t]}function Ot(e,t,r){var o;let n=Je(t,r);return n?"value"in n?n.value:(o=n.get)==null?void 0:o.call(e.draft_):void 0}function Je(e,t){if(!(t in e))return;let r=L(e);for(;r;){let n=Object.getOwnPropertyDescriptor(r,t);if(n)return n;r=L(r)}}function ye(e){e.modified_||(e.modified_=!0,e.parent_&&ye(e.parent_))}function de(e){e.copy_||(e.copy_=me(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var zt=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(l=i,...u){return s.produce(l,d=>r.call(this,d,...u))}}typeof r!="function"&&x(6),n!==void 0&&typeof n!="function"&&x(7);let o;if(N(t)){let i=Ie(this),s=be(t,void 0),a=!0;try{o=r(s),a=!1}finally{a?he(i):ge(i)}return Ne(i,n),$e(o,i)}else if(!t||typeof t!="object"){if(o=r(t),o===void 0&&(o=t),o===Fe&&(o=void 0),this.autoFreeze_&&_e(o,!0),n){let i=[],s=[];I("Patches").generateReplacementPatches_(t,o,i,s),n(i,s)}return o}else x(1,t)},this.produceWithPatches=(t,r)=>{if(typeof t=="function")return(s,...a)=>this.produceWithPatches(s,l=>t(l,...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)||x(8),F(e)&&(e=At(e));let t=Ie(this),r=be(e,void 0);return r[E].isManual_=!0,ge(t),r}finishDraft(e,t){let r=e&&e[E];(!r||!r.isManual_)&&x(9);let{scope_:n}=r;return Ne(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 F(e)?n(e,t):this.produce(e,o=>n(o,t))}};function be(e,t){let r=te(e)?I("MapSet").proxyMap_(e,t):re(e)?I("MapSet").proxySet_(e,t):Ht(e,t);return(t?t.scope_:Ge()).drafts_.push(r),r}function At(e){return F(e)||x(10,e),Ue(e)}function Ue(e){if(!N(e)||ne(e))return e;let t=e[E],r;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,r=me(e,t.scope_.immer_.useStrictShallowCopy_)}else r=me(e,!0);return q(r,(n,o)=>{We(r,n,Ue(o))}),t&&(t.finalized_=!1),r}var T=new zt,Xe=T.produce,Ur=T.produceWithPatches.bind(T),Xr=T.setAutoFreeze.bind(T),jr=T.setUseStrictShallowCopy.bind(T),Yr=T.applyPatches.bind(T),Kr=T.createDraft.bind(T),Vr=T.finishDraft.bind(T);var B=_react.createContext.call(void 0, {dragStarted:!1,setDragStarted:()=>{}});var oe=_react.createContext.call(void 0, {});var $t=(e,t)=>e.startTime-t.startTime<0||e.startTime===t.startTime&&e.endTime<t.endTime?-1:1,ie=$t;var Wt=_react.forwardRef.call(void 0, (e,t)=>{let{setEvents:r,tick:n,id:o,windowTime:i,cellWidth:s,children:a}=e,{dragStarted:l,setDragStarted:u}=_react.useContext.call(void 0, B),{onDrop:d}=_react.useContext.call(void 0, oe),p=_react.useCallback.call(void 0, f=>{f.preventDefault();let b=f.target,{left:m}=b.getBoundingClientRect(),g=f.dataTransfer.getData("eventId"),_=Math.round((f.clientX-m)/s),S=s*_;r(Xe(k=>{let c=k.find(v=>v.id===g);if(c&&n){let v=i[0]+S*n,C=c.endTime-c.startTime,R=i[0]+C+S*n;d&&d({eventId:c.id,oldRowId:c.rowId,newRowId:e.id,startTime:v,endTime:R}),c.startTime=v,c.endTime=R,c.rowId=e.id}k.sort(ie)})),u(!1)},[r,n,i,s]),y=_react.useContext.call(void 0, P),D=y&&y.rowsHeight&&y.rowsHeight[o]?y.rowsHeight[o].minHeight:40;return _react2.default.createElement("div",{id:`row_${o}`,ref:t,onDragOver:f=>f.preventDefault(),onDrop:p,className:l?"row-content not-clickable":"row-content","data-index":o,style:{minHeight:D}},a)}),je=Wt;var Jt=({id:e,startPosition:t,width:r,top:n,props:o})=>{let{setDragStarted:i}=_react.useContext.call(void 0, B),s=_react.useCallback.call(void 0, u=>{u.stopPropagation(),u.dataTransfer.setData("eventId",e),setTimeout(()=>i(!0),0);let d=u.target;d.style.opacity="50%"},[i]),a=_react.useCallback.call(void 0, u=>{u.stopPropagation(),i(!1);let d=u.target;d.style.opacity="100%"},[i]),l=o!=null&&o.classNames?"event "+o.classNames.join(" "):"event";return _react2.default.createElement("div",{id:`event_${e}`,key:`event_${e}`,className:l,draggable:!(o!=null&&o.isLocked),onDragStart:s,onDragEnd:a,onMouseDown:u=>u.stopPropagation(),onMouseMove:u=>u.stopPropagation(),onDrop:u=>u.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))},Ve=Jt;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])},qe=jt;var qt=({rows:e,windowTime:t,tick:r,events:n,staticEvents:o,cellWidth:i,setEvents:s,bodyRef:a})=>{let l=_react.useContext.call(void 0, P),u=_react.useRef.call(void 0, null),d=_react.useRef.call(void 0, []),[p,y]=_react.useMemo.call(void 0, ()=>{let D=0;return[e.map((f,b)=>{let m=0,g=[],_=0,S=r?n.filter(c=>c.rowId===f.id).map(c=>{if(c.endTime>=t[0]&&c.startTime<=t[1]){let v=0,C=!0;for(let R=0;R<=m;R++)if(g&&g[R]&&g[R].endTime>c.startTime)v+=1;else{m>_&&(_=m),m=0,C=!1;break}return C&&(m=v),g[v]=c,_react2.default.createElement(Ve,{key:`event_${c.id}`,id:c.id,startPosition:(c.startTime-t[0])/r,width:(c.endTime-c.startTime)/r,top:10+22*v,props:c.props})}}):null;m>_&&(_=m),u.current===null?u.current={[f.id]:{minHeight:40+_*22}}:u.current[f.id]={minHeight:40+_*22},D+=40+_*22;let k=r&&o?o.filter(c=>c.rowId===f.id).map(c=>{if(c.endTime>=t[0]&&c.startTime<=t[1])return _react2.default.createElement(ze,{key:`static_event_${c.id}`,id:c.id,startPosition:(c.startTime-t[0])/r,width:(c.endTime-c.startTime)/r,top:10,height:20+_*22})}):null;return _react2.default.createElement(_react2.default.Fragment,{key:`row_content_${f.id}`},_react2.default.createElement(je,{id:f.id,ref:c=>{d.current&&d.current[b]&&c?d.current[b]=c:d.current&&c&&d.current.push(c)},setEvents:s,tick:r,windowTime:t,cellWidth:i},S,k))}),D]},[e,n,r,t,i]);return qe({rowsContentRef:d,bodyRef:a}),_react.useEffect.call(void 0, ()=>{l&&(l.setRowsHeight(u.current),l.setAllRowsHeight(y))},[p,y]),p},Ze=qt;var rr=_react.forwardRef.call(void 0, ({rows:e,events:t,staticEvents:r,setEvents:n,tick:o,windowTime:i,cellWidth:s,setWindowTime:a,contentWidth:l,setCellWidth:u,bodyRef:d,lineClassName:p},y)=>{let[D,f]=_react.useState.call(void 0, !1),b=_react.useRef.call(void 0, null),[m,g]=_react.useState.call(void 0, !1),{blockWidth:_}=V({windowTime:i,contentWidth:l}),S=_react.useContext.call(void 0, P),k=_react.useCallback.call(void 0, h=>{if(h.preventDefault(),!D)return;let w=h.target,{left:z}=w.getBoundingClientRect(),H=h.clientX-z,Y=o?Math.floor(o*_):0;b.current&&b.current-H>=_?(b.current=H,a(J=>[J[0]+Y,J[1]+Y])):b.current&&H-b.current>=_&&(b.current=H,a(J=>[J[0]-Y,J[1]-Y]))},[_,a,D]),c=_react.useCallback.call(void 0, h=>{f(!0),h.button===1&&h.preventDefault();let w=h.target,{left:z}=w.getBoundingClientRect();b.current=h.clientX-z},[f]),v=_react.useCallback.call(void 0, ()=>{f(!1)},[f]),C=_react.useCallback.call(void 0, ()=>f(!1),[f]),R=Ze({rows:e,windowTime:i,tick:o,events:t,staticEvents:r,cellWidth:s,setEvents:n,bodyRef:d}),ae=_react.useCallback.call(void 0, h=>{h.preventDefault(),h.button===1&&g(w=>!w)},[]),ce=_react.useCallback.call(void 0, h=>{let w=o?900/o:0;m&&u(z=>{let H=h.deltaY>0?z+w:z-w;return H<w||H>w*12?z:H})},[m,s,o]);return _react.useEffect.call(void 0, ()=>{d.current&&(d.current.style.overflow=m?"hidden":"auto")},[m]),_react2.default.createElement("div",{key:"content",ref:y,className:"content-wrapper",onMouseDown:c,onMouseUp:v,onMouseMove:k,onMouseLeave:C,onAuxClick:ae,onWheel:ce,style:{cursor:D?"grabbing":"grab",height:S==null?void 0:S.allRowsHeight}},_react2.default.createElement(Oe,{contentWidth:l,cellWidth:s,lineClassName:p}),R)}),rt=rr;var sr=({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 l of s){let u=(a=l.borderBoxSize)==null?void 0:a[0].inlineSize;if(typeof u=="number"&&u!==o.current){o.current=u;let d=e[1]-e[0],p=d/3600;t(d/l.contentRect.width),r(l.contentRect.width/p)}}}),[e]);_react.useEffect.call(void 0, ()=>(n.current&&i.observe(n.current,{box:"border-box"}),()=>i.disconnect()),[i])},nt=sr;var lr=({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 l=setInterval(()=>{n(new Date().getTime()/1e3)},e*1e3);s.current=l}},[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}})))},it=lr;var Qn=({rows:e,events:t,staticEvents:r,onDrop:n,startDate:o,endDate:i,additionalClassNames:s,showRTIndicator:a=!0})=>{let[l,u]=_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]),[d,p]=_react.useState.call(void 0, 0),[y,D]=_react.useState.call(void 0, []),f=_react.useRef.call(void 0, null),b=_react.useRef.call(void 0, null),m=_react.useRef.call(void 0, null),[g,_]=_react.useState.call(void 0, null),[S,k]=_react.useState.call(void 0, 0),[c,v]=_react.useState.call(void 0, null),[C,R]=_react.useState.call(void 0, 0);_react.useEffect.call(void 0, ()=>{if(f.current){let h=l[1]-l[0],w=h/3600;_(h/f.current.getBoundingClientRect().width),p(f.current.getBoundingClientRect().width/w)}},[]),_react.useEffect.call(void 0, ()=>{m.current&&k(m.current.getBoundingClientRect().width-m.current.scrollWidth)},[]),_react.useEffect.call(void 0, ()=>{D(t.sort(ie))},[t]);let[ae,ce]=_react.useState.call(void 0, !1);return _react.useEffect.call(void 0, ()=>{let h=null;e.forEach(w=>{h===null?h={[w.id]:{minHeight:40}}:h[w.id]={minHeight:40}}),v(h)},[e]),nt({contentRef:f,setCellWidth:p,setTick:_,windowTime:l}),_react2.default.createElement("div",{className:"main-wrapper",ref:b},a&&_react2.default.createElement(it,{tick:g,windowTime:l}),_react2.default.createElement(Se,{windowTime:l,tick:g,contentWidth:f.current?f.current.getBoundingClientRect().width:null,scrollWidth:S}),_react2.default.createElement("div",{className:"body-wrapper",ref:m},_react2.default.createElement(P.Provider,{value:{rowsHeight:c,setRowsHeight:v,allRowsHeight:C,setAllRowsHeight:R}},_react2.default.createElement(ke,{rows:e,className:s==null?void 0:s.rowsHeader}),_react2.default.createElement(B.Provider,{value:{dragStarted:ae,setDragStarted:ce}},_react2.default.createElement(oe.Provider,{value:{onDrop:n}},_react2.default.createElement(rt,{events:y,staticEvents:r,rows:e,setEvents:D,tick:g,windowTime:l,cellWidth:d,setWindowTime:u,ref:f,setCellWidth:p,contentWidth:f.current?f.current.getBoundingClientRect().width:null,bodyRef:m,lineClassName:s==null?void 0:s.gridLine}))))))};exports.Timeline = Qn;
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,C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W,CAAC,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,eAAE,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC,SAAS,CAAC,YAAY,CAAC,GAAG,CAAC,CAAC,EAAA","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.7",
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
- "babel-jest": "^29.7.0",
43
- "eslint": "^8.57.0",
44
- "eslint-plugin-react": "^7.34.1",
45
- "globals": "^15.1.0",
46
- "immer": "^10.1.1",
47
- "jest": "^29.7.0",
48
- "react": "^18.3.1",
49
- "react-dom": "^18.3.1",
50
- "react-test-renderer": "^18.3.1",
51
- "ts-jest": "^29.2.4",
52
- "tsup": "^8.2.4",
53
- "typescript": "^5.4.5",
54
- "typescript-eslint": "^7.8.0"
55
- },
56
- "peerDependencies": {
57
- "react": "^18",
58
- "react-dom": "^18"
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
+ }