@semapps/date-components 0.3.10 → 0.3.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs.css +124 -124
- package/dist/index.cjs.js +1 -1
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.es.css +124 -124
- package/dist/index.es.js +1 -1
- package/dist/index.es.js.map +1 -1
- package/package.json +2 -2
package/dist/index.cjs.css
CHANGED
|
@@ -1,128 +1,4 @@
|
|
|
1
1
|
|
|
2
|
-
:root {
|
|
3
|
-
--fc-list-event-dot-width: 10px;
|
|
4
|
-
--fc-list-event-hover-bg-color: #f5f5f5;
|
|
5
|
-
}
|
|
6
|
-
.fc-theme-standard .fc-list {
|
|
7
|
-
border: 1px solid #ddd;
|
|
8
|
-
border: 1px solid var(--fc-border-color, #ddd);
|
|
9
|
-
}
|
|
10
|
-
.fc {
|
|
11
|
-
|
|
12
|
-
/* message when no events */
|
|
13
|
-
|
|
14
|
-
}
|
|
15
|
-
.fc .fc-list-empty {
|
|
16
|
-
background-color: rgba(208, 208, 208, 0.3);
|
|
17
|
-
background-color: var(--fc-neutral-bg-color, rgba(208, 208, 208, 0.3));
|
|
18
|
-
height: 100%;
|
|
19
|
-
display: flex;
|
|
20
|
-
justify-content: center;
|
|
21
|
-
align-items: center; /* vertically aligns fc-list-empty-inner */
|
|
22
|
-
}
|
|
23
|
-
.fc .fc-list-empty-cushion {
|
|
24
|
-
margin: 5em 0;
|
|
25
|
-
}
|
|
26
|
-
.fc {
|
|
27
|
-
|
|
28
|
-
/* table within the scroller */
|
|
29
|
-
/* ---------------------------------------------------------------------------------------------------- */
|
|
30
|
-
|
|
31
|
-
}
|
|
32
|
-
.fc .fc-list-table {
|
|
33
|
-
width: 100%;
|
|
34
|
-
border-style: hidden; /* kill outer border on theme */
|
|
35
|
-
}
|
|
36
|
-
.fc .fc-list-table tr > * {
|
|
37
|
-
border-left: 0;
|
|
38
|
-
border-right: 0;
|
|
39
|
-
}
|
|
40
|
-
.fc .fc-list-sticky .fc-list-day > * { /* the cells */
|
|
41
|
-
position: sticky;
|
|
42
|
-
top: 0;
|
|
43
|
-
background: #fff;
|
|
44
|
-
background: var(--fc-page-bg-color, #fff); /* for when headers are styled to be transparent and sticky */
|
|
45
|
-
}
|
|
46
|
-
.fc .fc-list-table th {
|
|
47
|
-
padding: 0; /* uses an inner-wrapper instead... */
|
|
48
|
-
}
|
|
49
|
-
.fc .fc-list-table td,
|
|
50
|
-
.fc .fc-list-day-cushion {
|
|
51
|
-
padding: 8px 14px;
|
|
52
|
-
}
|
|
53
|
-
.fc {
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
/* date heading rows */
|
|
57
|
-
/* ---------------------------------------------------------------------------------------------------- */
|
|
58
|
-
|
|
59
|
-
}
|
|
60
|
-
.fc .fc-list-day-cushion:after {
|
|
61
|
-
content: "";
|
|
62
|
-
clear: both;
|
|
63
|
-
display: table; /* clear floating */
|
|
64
|
-
}
|
|
65
|
-
.fc-theme-standard .fc-list-day-cushion {
|
|
66
|
-
background-color: rgba(208, 208, 208, 0.3);
|
|
67
|
-
background-color: var(--fc-neutral-bg-color, rgba(208, 208, 208, 0.3));
|
|
68
|
-
}
|
|
69
|
-
.fc-direction-ltr .fc-list-day-text,
|
|
70
|
-
.fc-direction-rtl .fc-list-day-side-text {
|
|
71
|
-
float: left;
|
|
72
|
-
}
|
|
73
|
-
.fc-direction-ltr .fc-list-day-side-text,
|
|
74
|
-
.fc-direction-rtl .fc-list-day-text {
|
|
75
|
-
float: right;
|
|
76
|
-
}
|
|
77
|
-
/* make the dot closer to the event title */
|
|
78
|
-
.fc-direction-ltr .fc-list-table .fc-list-event-graphic { padding-right: 0 }
|
|
79
|
-
.fc-direction-rtl .fc-list-table .fc-list-event-graphic { padding-left: 0 }
|
|
80
|
-
.fc .fc-list-event.fc-event-forced-url {
|
|
81
|
-
cursor: pointer; /* whole row will seem clickable */
|
|
82
|
-
}
|
|
83
|
-
.fc .fc-list-event:hover td {
|
|
84
|
-
background-color: #f5f5f5;
|
|
85
|
-
background-color: var(--fc-list-event-hover-bg-color, #f5f5f5);
|
|
86
|
-
}
|
|
87
|
-
.fc {
|
|
88
|
-
|
|
89
|
-
/* shrink certain cols */
|
|
90
|
-
|
|
91
|
-
}
|
|
92
|
-
.fc .fc-list-event-graphic,
|
|
93
|
-
.fc .fc-list-event-time {
|
|
94
|
-
white-space: nowrap;
|
|
95
|
-
width: 1px;
|
|
96
|
-
}
|
|
97
|
-
.fc .fc-list-event-dot {
|
|
98
|
-
display: inline-block;
|
|
99
|
-
box-sizing: content-box;
|
|
100
|
-
width: 0;
|
|
101
|
-
height: 0;
|
|
102
|
-
border: 5px solid #3788d8;
|
|
103
|
-
border: calc(var(--fc-list-event-dot-width, 10px) / 2) solid var(--fc-event-border-color, #3788d8);
|
|
104
|
-
border-radius: 5px;
|
|
105
|
-
border-radius: calc(var(--fc-list-event-dot-width, 10px) / 2);
|
|
106
|
-
}
|
|
107
|
-
.fc {
|
|
108
|
-
|
|
109
|
-
/* reset <a> styling */
|
|
110
|
-
|
|
111
|
-
}
|
|
112
|
-
.fc .fc-list-event-title a {
|
|
113
|
-
color: inherit;
|
|
114
|
-
text-decoration: none;
|
|
115
|
-
}
|
|
116
|
-
.fc {
|
|
117
|
-
|
|
118
|
-
/* underline link when hovering over any part of row */
|
|
119
|
-
|
|
120
|
-
}
|
|
121
|
-
.fc .fc-list-event.fc-event-forced-url:hover a {
|
|
122
|
-
text-decoration: underline;
|
|
123
|
-
}
|
|
124
|
-
|
|
125
|
-
|
|
126
2
|
:root {
|
|
127
3
|
--fc-daygrid-event-dot-width: 8px;
|
|
128
4
|
}
|
|
@@ -359,6 +235,130 @@
|
|
|
359
235
|
}
|
|
360
236
|
|
|
361
237
|
|
|
238
|
+
:root {
|
|
239
|
+
--fc-list-event-dot-width: 10px;
|
|
240
|
+
--fc-list-event-hover-bg-color: #f5f5f5;
|
|
241
|
+
}
|
|
242
|
+
.fc-theme-standard .fc-list {
|
|
243
|
+
border: 1px solid #ddd;
|
|
244
|
+
border: 1px solid var(--fc-border-color, #ddd);
|
|
245
|
+
}
|
|
246
|
+
.fc {
|
|
247
|
+
|
|
248
|
+
/* message when no events */
|
|
249
|
+
|
|
250
|
+
}
|
|
251
|
+
.fc .fc-list-empty {
|
|
252
|
+
background-color: rgba(208, 208, 208, 0.3);
|
|
253
|
+
background-color: var(--fc-neutral-bg-color, rgba(208, 208, 208, 0.3));
|
|
254
|
+
height: 100%;
|
|
255
|
+
display: flex;
|
|
256
|
+
justify-content: center;
|
|
257
|
+
align-items: center; /* vertically aligns fc-list-empty-inner */
|
|
258
|
+
}
|
|
259
|
+
.fc .fc-list-empty-cushion {
|
|
260
|
+
margin: 5em 0;
|
|
261
|
+
}
|
|
262
|
+
.fc {
|
|
263
|
+
|
|
264
|
+
/* table within the scroller */
|
|
265
|
+
/* ---------------------------------------------------------------------------------------------------- */
|
|
266
|
+
|
|
267
|
+
}
|
|
268
|
+
.fc .fc-list-table {
|
|
269
|
+
width: 100%;
|
|
270
|
+
border-style: hidden; /* kill outer border on theme */
|
|
271
|
+
}
|
|
272
|
+
.fc .fc-list-table tr > * {
|
|
273
|
+
border-left: 0;
|
|
274
|
+
border-right: 0;
|
|
275
|
+
}
|
|
276
|
+
.fc .fc-list-sticky .fc-list-day > * { /* the cells */
|
|
277
|
+
position: sticky;
|
|
278
|
+
top: 0;
|
|
279
|
+
background: #fff;
|
|
280
|
+
background: var(--fc-page-bg-color, #fff); /* for when headers are styled to be transparent and sticky */
|
|
281
|
+
}
|
|
282
|
+
.fc .fc-list-table th {
|
|
283
|
+
padding: 0; /* uses an inner-wrapper instead... */
|
|
284
|
+
}
|
|
285
|
+
.fc .fc-list-table td,
|
|
286
|
+
.fc .fc-list-day-cushion {
|
|
287
|
+
padding: 8px 14px;
|
|
288
|
+
}
|
|
289
|
+
.fc {
|
|
290
|
+
|
|
291
|
+
|
|
292
|
+
/* date heading rows */
|
|
293
|
+
/* ---------------------------------------------------------------------------------------------------- */
|
|
294
|
+
|
|
295
|
+
}
|
|
296
|
+
.fc .fc-list-day-cushion:after {
|
|
297
|
+
content: "";
|
|
298
|
+
clear: both;
|
|
299
|
+
display: table; /* clear floating */
|
|
300
|
+
}
|
|
301
|
+
.fc-theme-standard .fc-list-day-cushion {
|
|
302
|
+
background-color: rgba(208, 208, 208, 0.3);
|
|
303
|
+
background-color: var(--fc-neutral-bg-color, rgba(208, 208, 208, 0.3));
|
|
304
|
+
}
|
|
305
|
+
.fc-direction-ltr .fc-list-day-text,
|
|
306
|
+
.fc-direction-rtl .fc-list-day-side-text {
|
|
307
|
+
float: left;
|
|
308
|
+
}
|
|
309
|
+
.fc-direction-ltr .fc-list-day-side-text,
|
|
310
|
+
.fc-direction-rtl .fc-list-day-text {
|
|
311
|
+
float: right;
|
|
312
|
+
}
|
|
313
|
+
/* make the dot closer to the event title */
|
|
314
|
+
.fc-direction-ltr .fc-list-table .fc-list-event-graphic { padding-right: 0 }
|
|
315
|
+
.fc-direction-rtl .fc-list-table .fc-list-event-graphic { padding-left: 0 }
|
|
316
|
+
.fc .fc-list-event.fc-event-forced-url {
|
|
317
|
+
cursor: pointer; /* whole row will seem clickable */
|
|
318
|
+
}
|
|
319
|
+
.fc .fc-list-event:hover td {
|
|
320
|
+
background-color: #f5f5f5;
|
|
321
|
+
background-color: var(--fc-list-event-hover-bg-color, #f5f5f5);
|
|
322
|
+
}
|
|
323
|
+
.fc {
|
|
324
|
+
|
|
325
|
+
/* shrink certain cols */
|
|
326
|
+
|
|
327
|
+
}
|
|
328
|
+
.fc .fc-list-event-graphic,
|
|
329
|
+
.fc .fc-list-event-time {
|
|
330
|
+
white-space: nowrap;
|
|
331
|
+
width: 1px;
|
|
332
|
+
}
|
|
333
|
+
.fc .fc-list-event-dot {
|
|
334
|
+
display: inline-block;
|
|
335
|
+
box-sizing: content-box;
|
|
336
|
+
width: 0;
|
|
337
|
+
height: 0;
|
|
338
|
+
border: 5px solid #3788d8;
|
|
339
|
+
border: calc(var(--fc-list-event-dot-width, 10px) / 2) solid var(--fc-event-border-color, #3788d8);
|
|
340
|
+
border-radius: 5px;
|
|
341
|
+
border-radius: calc(var(--fc-list-event-dot-width, 10px) / 2);
|
|
342
|
+
}
|
|
343
|
+
.fc {
|
|
344
|
+
|
|
345
|
+
/* reset <a> styling */
|
|
346
|
+
|
|
347
|
+
}
|
|
348
|
+
.fc .fc-list-event-title a {
|
|
349
|
+
color: inherit;
|
|
350
|
+
text-decoration: none;
|
|
351
|
+
}
|
|
352
|
+
.fc {
|
|
353
|
+
|
|
354
|
+
/* underline link when hovering over any part of row */
|
|
355
|
+
|
|
356
|
+
}
|
|
357
|
+
.fc .fc-list-event.fc-event-forced-url:hover a {
|
|
358
|
+
text-decoration: underline;
|
|
359
|
+
}
|
|
360
|
+
|
|
361
|
+
|
|
362
362
|
/* classes attached to <body> */
|
|
363
363
|
|
|
364
364
|
.fc-not-allowed,
|
package/dist/index.cjs.js
CHANGED
|
@@ -18,7 +18,7 @@ var xt=function(e,t){return(xt=Object.setPrototypeOf||{__proto__:[]}instanceof A
|
|
|
18
18
|
FullCalendar v5.7.2
|
|
19
19
|
Docs & License: https://fullcalendar.io/
|
|
20
20
|
(c) 2021 Adam Shaw
|
|
21
|
-
*/function ts(e,t){for(var n=[],r=0;r<t;r+=1)n[r]=[];for(var a=0,o=e;a<o.length;a++){var i=o[a];n[i.row].push(i)}return n}function ns(e,t){for(var n=[],r=0;r<t;r+=1)n[r]=[];for(var a=0,o=e;a<o.length;a++){var i=o[a];n[i.firstCol].push(i)}return n}function rs(e,t){var n=[];if(e){for(i=0;i<t;i+=1)n[i]={affectedInstances:e.affectedInstances,isEvent:e.isEvent,segs:[]};for(var r=0,a=e.segs;r<a.length;r++){var o=a[r];n[o.row].segs.push(o)}}else for(var i=0;i<t;i+=1)n[i]=null;return n}var as=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Mt(t,e),t.prototype.render=function(){var e=this.props,t=this.context.options.navLinks?{"data-navlink":ka(e.date),tabIndex:0}:{};return It(Fi,{date:e.date,dateProfile:e.dateProfile,todayRange:e.todayRange,showDayNumber:e.showDayNumber,extraHookProps:e.extraHookProps,defaultContent:os},(function(n,r){return(r||e.forceDayTop)&&It("div",{className:"fc-daygrid-day-top",ref:n},It("a",Pt({className:"fc-daygrid-day-number"},t),r||It(Ut,null," ")))}))},t}(Fa);function os(e){return e.dayNumberText}var is=Jn({hour:"numeric",minute:"2-digit",omitZeroMinute:!0,meridiem:"narrow"});function ss(e){var t=e.eventRange.ui.display;return"list-item"===t||"auto"===t&&!e.eventRange.def.allDay&&e.firstCol===e.lastCol&&e.isStart&&e.isEnd}var us=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Mt(t,e),t.prototype.render=function(){var e=this.props;return It(Hi,Pt({},e,{extraClassNames:["fc-daygrid-event","fc-daygrid-block-event","fc-h-event"],defaultTimeFormat:is,defaultDisplayEventEnd:e.defaultDisplayEventEnd,disableResizing:!e.seg.eventRange.def.allDay}))},t}(Fa),ls=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Mt(t,e),t.prototype.render=function(){var e=this.props,t=this.context,n=t.options.eventTimeFormat||is,r=Br(e.seg,n,t,!0,e.defaultDisplayEventEnd);return It(Ii,{seg:e.seg,timeText:r,defaultContent:cs,isDragging:e.isDragging,isResizing:!1,isDateSelecting:!1,isSelected:e.isSelected,isPast:e.isPast,isFuture:e.isFuture,isToday:e.isToday},(function(t,n,r,a){return It("a",Pt({className:["fc-daygrid-event","fc-daygrid-dot-event"].concat(n).join(" "),ref:t},(o=e.seg,(i=o.eventRange.def.url)?{href:i}:{})),a);var o,i}))},t}(Fa);function cs(e){return It(Ut,null,It("div",{className:"fc-daygrid-event-dot",style:{borderColor:e.borderColor||e.backgroundColor}}),e.timeText&&It("div",{className:"fc-event-time"},e.timeText),It("div",{className:"fc-event-title"},e.event.title||It(Ut,null," ")))}var ds=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.compileSegs=Fn(fs),t}return Mt(t,e),t.prototype.render=function(){var e=this.props,t=this.compileSegs(e.singlePlacements),n=t.allSegs,r=t.invisibleSegs;return It(Gi,{dateProfile:e.dateProfile,todayRange:e.todayRange,allDayDate:e.allDayDate,moreCnt:e.moreCnt,allSegs:n,hiddenSegs:r,alignmentElRef:e.alignmentElRef,alignGridTop:e.alignGridTop,extraDateSpan:e.extraDateSpan,popoverContent:function(){var t=(e.eventDrag?e.eventDrag.affectedInstances:null)||(e.eventResize?e.eventResize.affectedInstances:null)||{};return It(Ut,null,n.map((function(n){var r=n.eventRange.instance.instanceId;return It("div",{className:"fc-daygrid-event-harness",key:r,style:{visibility:t[r]?"hidden":""}},ss(n)?It(ls,Pt({seg:n,isDragging:!1,isSelected:r===e.eventSelection,defaultDisplayEventEnd:!1},Vr(n,e.todayRange))):It(us,Pt({seg:n,isDragging:!1,isResizing:!1,isDateSelecting:!1,isSelected:r===e.eventSelection,defaultDisplayEventEnd:!1},Vr(n,e.todayRange))))})))}},(function(e,t,n,r,a){return It("a",{ref:e,className:["fc-daygrid-more-link"].concat(t).join(" "),onClick:a},r)}))},t}(Fa);function fs(e){for(var t=[],n=[],r=0,a=e;r<a.length;r++){var o=a[r];t.push(o.seg),o.isVisible||n.push(o.seg)}return{allSegs:t,invisibleSegs:n}}var ps=Jn({week:"narrow"}),hs=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.rootElRef=Ht(),t.handleRootEl=function(e){qa(t.rootElRef,e),qa(t.props.elRef,e)},t}return Mt(t,e),t.prototype.render=function(){var e=this.props,t=this.context,n=this.rootElRef,r=t.options,a=e.date,o=e.dateProfile,i=r.navLinks?{"data-navlink":ka(a,"week"),tabIndex:0}:{};return It(_i,{date:a,dateProfile:o,todayRange:e.todayRange,showDayNumber:e.showDayNumber,extraHookProps:e.extraHookProps,elRef:this.handleRootEl},(function(t,r,s,u){return It("td",Pt({ref:t,className:["fc-daygrid-day"].concat(r,e.extraClassNames||[]).join(" ")},s,e.extraDataAttrs),It("div",{className:"fc-daygrid-day-frame fc-scrollgrid-sync-inner",ref:e.innerElRef},e.showWeekNumber&&It(Bi,{date:a,defaultFormat:ps},(function(e,t,n,r){return It("a",Pt({ref:e,className:["fc-daygrid-week-number"].concat(t).join(" ")},i),r)})),!u&&It(as,{date:a,dateProfile:o,showDayNumber:e.showDayNumber,forceDayTop:e.forceDayTop,todayRange:e.todayRange,extraHookProps:e.extraHookProps}),It("div",{className:"fc-daygrid-day-events",ref:e.fgContentElRef},e.fgContent,It("div",{className:"fc-daygrid-day-bottom",style:{marginTop:e.moreMarginTop}},It(ds,{allDayDate:a,singlePlacements:e.singlePlacements,moreCnt:e.moreCnt,alignmentElRef:n,alignGridTop:!e.showDayNumber,extraDateSpan:e.extraDateSpan,dateProfile:e.dateProfile,eventSelection:e.eventSelection,eventDrag:e.eventDrag,eventResize:e.eventResize,todayRange:e.todayRange}))),It("div",{className:"fc-daygrid-day-bg"},e.bgContent)))}))},t}(La);function gs(e,t,n,r,a,o,i){var s=new ms;s.allowReslicing=!0,s.strictOrder=r,!0===t||!0===n?(s.maxCoord=o,s.hiddenConsumes=!0):"number"==typeof t?s.maxStackCnt=t:"number"==typeof n&&(s.maxStackCnt=n,s.hiddenConsumes=!0);for(var u=[],l=[],c=0;c<e.length;c+=1){var d=a[(S=e[c]).eventRange.instance.instanceId];null!=d?u.push({index:c,spanStart:S.firstCol,spanEnd:S.lastCol+1,thickness:d}):l.push(S)}for(var f=s.addSegs(u),p=function(e,t,n){for(var r=function(e,t){for(var n=[],r=0;r<t;r+=1)n.push([]);for(var a=0,o=e;a<o.length;a++){var i=o[a];for(r=i.spanStart;r<i.spanEnd;r+=1)n[r].push(i)}return n}(e,n.length),a=[],o=[],i=[],s=0;s<n.length;s+=1){for(var u=r[s],l=[],c=0,d=0,f=0,p=u;f<p.length;f++){var h=p[f],g=t[h.segInput.index];l.push({seg:vs(g,s,s+1,n),isVisible:!0,isAbsolute:!1,absoluteTop:0,marginTop:h.levelCoord-c}),c=h.levelCoord+h.thickness}var v=[];c=0,d=0;for(var m=0,y=u;m<y.length;m++){h=y[m],g=t[h.segInput.index];var w=h.spanEnd-h.spanStart>1,b=h.spanStart===s;d+=h.levelCoord-c,c=h.levelCoord+h.thickness,w?(d+=h.thickness,b&&v.push({seg:vs(g,h.spanStart,h.spanEnd,n),isVisible:!0,isAbsolute:!0,absoluteTop:h.levelCoord,marginTop:0})):b&&(v.push({seg:vs(g,h.spanStart,h.spanEnd,n),isVisible:!0,isAbsolute:!1,absoluteTop:0,marginTop:d}),d=0)}a.push(l),o.push(v),i.push(d)}return{singleColPlacements:a,multiColPlacements:o,leftoverMargins:i}}(s.toRects(),e,i),h=p.singleColPlacements,g=p.multiColPlacements,v=p.leftoverMargins,m=[],y=[],w=0,b=l;w<b.length;w++){g[(S=b[w]).firstCol].push({seg:S,isVisible:!1,isAbsolute:!0,absoluteTop:0,marginTop:0});for(var C=S.firstCol;C<=S.lastCol;C+=1)h[C].push({seg:vs(S,C,C+1,i),isVisible:!1,isAbsolute:!1,absoluteTop:0,marginTop:0})}for(C=0;C<i.length;C+=1)m.push(0);for(var E=0,T=f;E<T.length;E++){var D=T[E],S=e[D.segInput.index];g[D.spanStart].push({seg:S,isVisible:!1,isAbsolute:!0,absoluteTop:0,marginTop:0});for(C=D.spanStart;C<D.spanEnd;C+=1)m[C]+=1,h[C].push({seg:vs(S,C,C+1,i),isVisible:!1,isAbsolute:!1,absoluteTop:0,marginTop:0})}for(C=0;C<i.length;C+=1)y.push(v[C]);return{singleColPlacements:h,multiColPlacements:g,moreCnts:m,moreMarginTops:y}}function vs(e,t,n,r){if(e.firstCol===t&&e.lastCol===n-1)return e;var a=e.eventRange,o=a.range,i=Or(o,{start:r[t].date,end:tn(r[n-1].date,1)});return Pt(Pt({},e),{firstCol:t,lastCol:n-1,eventRange:{def:a.def,ui:Pt(Pt({},a.ui),{durationEditable:!1}),instance:a.instance,range:i},isStart:e.isStart&&i.start.valueOf()===o.start.valueOf(),isEnd:e.isEnd&&i.end.valueOf()===o.end.valueOf()})}var ms=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.hiddenConsumes=!1,t.forceHidden={},t}return Mt(t,e),t.prototype.addSegs=function(t){for(var n=this,r=e.prototype.addSegs.call(this,t),a=this.entriesByLevel,o=function(e){return!n.forceHidden[Zo(e)]},i=0;i<a.length;i+=1)a[i]=a[i].filter(o);return r},t.prototype.handleInvalidInsertion=function(t,n,r){var a=this.entriesByLevel,o=this.forceHidden,i=t.nextLevel-1;if(this.hiddenConsumes&&i>=0)for(var s=t.lateralStart;s<t.lateralEnd;s+=1){var u=a[i][s];if(this.allowReslicing){var l=Pt(Pt({},u),{spanStart:Math.max(u.spanStart,n.spanStart),spanEnd:Math.min(u.spanEnd,n.spanEnd)});o[c=Zo(l)]||(o[c]=!0,a[i][s]=l,this.splitEntry(u,n,r))}else{var c;o[c=Zo(u)]||(o[c]=!0,r.push(u))}}return e.prototype.handleInvalidInsertion.call(this,t,n,r)},t}(jo),ys=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.cellElRefs=new Ti,t.frameElRefs=new Ti,t.fgElRefs=new Ti,t.segHarnessRefs=new Ti,t.rootElRef=Ht(),t.state={framePositions:null,maxContentHeight:null,eventInstanceHeights:{}},t}return Mt(t,e),t.prototype.render=function(){var e=this,t=this.props,n=this.state,r=this.context.options,a=t.cells.length,o=ns(t.businessHourSegs,a),i=ns(t.bgEventSegs,a),s=ns(this.getHighlightSegs(),a),u=ns(this.getMirrorSegs(),a),l=gs(Wr(t.fgEventSegs,r.eventOrder),t.dayMaxEvents,t.dayMaxEventRows,r.eventOrderStrict,n.eventInstanceHeights,n.maxContentHeight,t.cells),c=l.singleColPlacements,d=l.multiColPlacements,f=l.moreCnts,p=l.moreMarginTops,h=t.eventDrag&&t.eventDrag.affectedInstances||t.eventResize&&t.eventResize.affectedInstances||{};return It("tr",{ref:this.rootElRef},t.renderIntro&&t.renderIntro(),t.cells.map((function(n,r){var a=e.renderFgSegs(r,t.forPrint?c[r]:d[r],t.todayRange,h),l=e.renderFgSegs(r,function(e,t){if(!e.length)return[];var n=function(e){for(var t={},n=0,r=e;n<r.length;n++)for(var a=r[n],o=0,i=a;o<i.length;o++){var s=i[o];t[s.seg.eventRange.instance.instanceId]=s.absoluteTop}return e}(t);return e.map((function(e){return{seg:e,isVisible:!0,isAbsolute:!0,absoluteTop:n[e.eventRange.instance.instanceId],marginTop:0}}))}(u[r],d),t.todayRange,{},Boolean(t.eventDrag),Boolean(t.eventResize),!1);return It(hs,{key:n.key,elRef:e.cellElRefs.createRef(n.key),innerElRef:e.frameElRefs.createRef(n.key),dateProfile:t.dateProfile,date:n.date,showDayNumber:t.showDayNumbers,showWeekNumber:t.showWeekNumbers&&0===r,forceDayTop:t.showWeekNumbers,todayRange:t.todayRange,eventSelection:t.eventSelection,eventDrag:t.eventDrag,eventResize:t.eventResize,extraHookProps:n.extraHookProps,extraDataAttrs:n.extraDataAttrs,extraClassNames:n.extraClassNames,extraDateSpan:n.extraDateSpan,moreCnt:f[r],moreMarginTop:p[r],singlePlacements:c[r],fgContentElRef:e.fgElRefs.createRef(n.key),fgContent:It(Ut,null,It(Ut,null,a),It(Ut,null,l)),bgContent:It(Ut,null,e.renderFillSegs(s[r],"highlight"),e.renderFillSegs(o[r],"non-business"),e.renderFillSegs(i[r],"bg-event"))})})))},t.prototype.componentDidMount=function(){this.updateSizing(!0)},t.prototype.componentDidUpdate=function(e,t){var n=this.props;this.updateSizing(!En(e,n))},t.prototype.getHighlightSegs=function(){var e=this.props;return e.eventDrag&&e.eventDrag.segs.length?e.eventDrag.segs:e.eventResize&&e.eventResize.segs.length?e.eventResize.segs:e.dateSelectionSegs},t.prototype.getMirrorSegs=function(){var e=this.props;return e.eventResize&&e.eventResize.segs.length?e.eventResize.segs:[]},t.prototype.renderFgSegs=function(e,t,n,r,a,o,i){var s=this.context,u=this.props.eventSelection,l=this.state.framePositions,c=1===this.props.cells.length,d=a||o||i,f=[];if(l)for(var p=0,h=t;p<h.length;p++){var g=h[p],v=g.seg,m=v.eventRange.instance.instanceId,y=m+":"+e,w=g.isVisible&&!r[m],b=g.isAbsolute,C="",E="";b&&(s.isRtl?(E=0,C=l.lefts[v.lastCol]-l.lefts[v.firstCol]):(C=0,E=l.rights[v.firstCol]-l.rights[v.lastCol])),f.push(It("div",{className:"fc-daygrid-event-harness"+(b?" fc-daygrid-event-harness-abs":""),key:y,ref:d?null:this.segHarnessRefs.createRef(y),style:{visibility:w?"":"hidden",marginTop:b?"":g.marginTop,top:b?g.absoluteTop:"",left:C,right:E}},ss(v)?It(ls,Pt({seg:v,isDragging:a,isSelected:m===u,defaultDisplayEventEnd:c},Vr(v,n))):It(us,Pt({seg:v,isDragging:a,isResizing:o,isDateSelecting:i,isSelected:m===u,defaultDisplayEventEnd:c},Vr(v,n)))))}return f},t.prototype.renderFillSegs=function(e,t){var n,r=this.context.isRtl,a=this.props.todayRange,o=this.state.framePositions,i=[];if(o)for(var s=0,u=e;s<u.length;s++){var l=u[s],c=r?{right:0,left:o.lefts[l.lastCol]-o.lefts[l.firstCol]}:{left:0,right:o.rights[l.firstCol]-o.rights[l.lastCol]};i.push(It("div",{key:(n=l.eventRange,n.instance?n.instance.instanceId:n.def.defId+":"+n.range.start.toISOString()),className:"fc-daygrid-bg-harness",style:c},"bg-event"===t?It(Li,Pt({seg:l},Vr(l,a))):qi(t)))}return It.apply(void 0,Ot([Ut,{}],i))},t.prototype.updateSizing=function(e){var t=this.props,n=this.frameElRefs;if(!t.forPrint&&null!==t.clientWidth){if(e){var r=t.cells.map((function(e){return n.currentMap[e.key]}));if(r.length){var a=this.rootElRef.current;this.setState({framePositions:new Pa(a,r,!0,!1)})}}var o=!0===t.dayMaxEvents||!0===t.dayMaxEventRows;this.setState({eventInstanceHeights:this.queryEventInstanceHeights(),maxContentHeight:o?this.computeMaxContentHeight():null})}},t.prototype.queryEventInstanceHeights=function(){var e=this.segHarnessRefs.currentMap,t={};for(var n in e){var r=Math.round(e[n].getBoundingClientRect().height),a=n.split(":")[0];t[a]=Math.max(t[a]||0,r)}return t},t.prototype.computeMaxContentHeight=function(){var e=this.props.cells[0].key,t=this.cellElRefs.currentMap[e],n=this.fgElRefs.currentMap[e];return t.getBoundingClientRect().bottom-n.getBoundingClientRect().top},t.prototype.getCellEls=function(){var e=this.cellElRefs.currentMap;return this.props.cells.map((function(t){return e[t.key]}))},t}(La);ys.addStateEquality({eventInstanceHeights:En});var ws=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.splitBusinessHourSegs=Fn(ts),t.splitBgEventSegs=Fn(ts),t.splitFgEventSegs=Fn(ts),t.splitDateSelectionSegs=Fn(ts),t.splitEventDrag=Fn(rs),t.splitEventResize=Fn(rs),t.rowRefs=new Ti,t.handleRootEl=function(e){t.rootEl=e,e?t.context.registerInteractiveComponent(t,{el:e,isHitComboAllowed:t.props.isHitComboAllowed}):t.context.unregisterInteractiveComponent(t)},t}return Mt(t,e),t.prototype.render=function(){var e=this,t=this.props,n=t.dateProfile,r=t.dayMaxEventRows,a=t.dayMaxEvents,o=t.expandRows,i=t.cells.length,s=this.splitBusinessHourSegs(t.businessHourSegs,i),u=this.splitBgEventSegs(t.bgEventSegs,i),l=this.splitFgEventSegs(t.fgEventSegs,i),c=this.splitDateSelectionSegs(t.dateSelectionSegs,i),d=this.splitEventDrag(t.eventDrag,i),f=this.splitEventResize(t.eventResize,i),p=!0===a||!0===r;return p&&!o&&(p=!1,r=null,a=null),It("div",{className:["fc-daygrid-body",p?"fc-daygrid-body-balanced":"fc-daygrid-body-unbalanced",o?"":"fc-daygrid-body-natural"].join(" "),ref:this.handleRootEl,style:{width:t.clientWidth,minWidth:t.tableMinWidth}},It(pi,{unit:"day"},(function(p,h){return It(Ut,null,It("table",{className:"fc-scrollgrid-sync-table",style:{width:t.clientWidth,minWidth:t.tableMinWidth,height:o?t.clientHeight:""}},t.colGroupNode,It("tbody",null,t.cells.map((function(o,p){return It(ys,{ref:e.rowRefs.createRef(p),key:o.length?o[0].date.toISOString():p,showDayNumbers:i>1,showWeekNumbers:t.showWeekNumbers,todayRange:h,dateProfile:n,cells:o,renderIntro:t.renderRowIntro,businessHourSegs:s[p],eventSelection:t.eventSelection,bgEventSegs:u[p].filter(bs),fgEventSegs:l[p],dateSelectionSegs:c[p],eventDrag:d[p],eventResize:f[p],dayMaxEvents:a,dayMaxEventRows:r,clientWidth:t.clientWidth,clientHeight:t.clientHeight,forPrint:t.forPrint})})))))})))},t.prototype.prepareHits=function(){this.rowPositions=new Pa(this.rootEl,this.rowRefs.collect().map((function(e){return e.getCellEls()[0]})),!1,!0),this.colPositions=new Pa(this.rootEl,this.rowRefs.currentMap[0].getCellEls(),!0,!1)},t.prototype.queryHit=function(e,t){var n=this.colPositions,r=this.rowPositions,a=n.leftToIndex(e),o=r.topToIndex(t);if(null!=o&&null!=a){var i=this.props.cells[o][a];return{dateProfile:this.props.dateProfile,dateSpan:Pt({range:this.getCellRange(o,a),allDay:!0},i.extraDateSpan),dayEl:this.getCellEl(o,a),rect:{left:n.lefts[a],right:n.rights[a],top:r.tops[o],bottom:r.bottoms[o]},layer:0}}return null},t.prototype.getCellEl=function(e,t){return this.rowRefs.currentMap[e].getCellEls()[t]},t.prototype.getCellRange=function(e,t){var n=this.props.cells[e][t].date;return{start:n,end:tn(n,1)}},t}(La);function bs(e){return e.eventRange.def.allDay}var Cs=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.forceDayIfListItem=!0,t}return Mt(t,e),t.prototype.sliceRange=function(e,t){return t.sliceRange(e)},t}(wi),Es=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.slicer=new Cs,t.tableRef=Ht(),t}return Mt(t,e),t.prototype.render=function(){var e=this.props,t=this.context;return It(ws,Pt({ref:this.tableRef},this.slicer.sliceProps(e,e.dateProfile,e.nextDayThreshold,t,e.dayTableModel),{dateProfile:e.dateProfile,cells:e.dayTableModel.cells,colGroupNode:e.colGroupNode,tableMinWidth:e.tableMinWidth,renderRowIntro:e.renderRowIntro,dayMaxEvents:e.dayMaxEvents,dayMaxEventRows:e.dayMaxEventRows,showWeekNumbers:e.showWeekNumbers,expandRows:e.expandRows,headerAlignElRef:e.headerAlignElRef,clientWidth:e.clientWidth,clientHeight:e.clientHeight,forPrint:e.forPrint}))},t}(La);function Ts(e,t){var n=new mi(e.renderRange,t);return new yi(n,/year|month|week/.test(e.currentRangeUnit))}var Ds=za({initialView:"dayGridMonth",views:{dayGrid:{component:function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.buildDayTableModel=Fn(Ts),t.headerRef=Ht(),t.tableRef=Ht(),t}return Mt(t,e),t.prototype.render=function(){var e=this,t=this.context,n=t.options,r=t.dateProfileGenerator,a=this.props,o=this.buildDayTableModel(a.dateProfile,r),i=n.dayHeaders&&It(gi,{ref:this.headerRef,dateProfile:a.dateProfile,dates:o.headerDates,datesRepDistinctDays:1===o.rowCnt}),s=function(t){return It(Es,{ref:e.tableRef,dateProfile:a.dateProfile,dayTableModel:o,businessHours:a.businessHours,dateSelection:a.dateSelection,eventStore:a.eventStore,eventUiBases:a.eventUiBases,eventSelection:a.eventSelection,eventDrag:a.eventDrag,eventResize:a.eventResize,nextDayThreshold:n.nextDayThreshold,colGroupNode:t.tableColGroupNode,tableMinWidth:t.tableMinWidth,dayMaxEvents:n.dayMaxEvents,dayMaxEventRows:n.dayMaxEventRows,showWeekNumbers:n.weekNumbers,expandRows:!a.isHeightAuto,headerAlignElRef:e.headerElRef,clientWidth:t.clientWidth,clientHeight:t.clientHeight,forPrint:a.forPrint})};return n.dayMinWidth?this.renderHScrollLayout(i,s,o.colCnt,n.dayMinWidth):this.renderSimpleLayout(i,s)},t}(es),dateProfileGeneratorClass:function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Mt(t,e),t.prototype.buildRenderRange=function(t,n,r){var a,o=this.props.dateEnv,i=e.prototype.buildRenderRange.call(this,t,n,r),s=i.start,u=i.end;(/^(year|month)$/.test(n)&&(s=o.startOfWeek(s),(a=o.startOfWeek(u)).valueOf()!==u.valueOf()&&(u=en(a,1))),this.props.monthMode&&this.props.fixedWeekCount)&&(u=en(u,6-Math.ceil(rn(s,u)/7)));return{start:s,end:u}},t}(oo)},dayGridDay:{type:"dayGrid",duration:{days:1}},dayGridWeek:{type:"dayGrid",duration:{weeks:1}},dayGridMonth:{type:"dayGrid",duration:{months:1},monthMode:!0,fixedWeekCount:!0}}}),Ss=function(e){var n=e.label,r=e.startDate,o=e.endDate,i=e.linkType,u=s.useHistory(),l=a.useListContext(),c=l.ids,d=l.data,f=l.basePath,p=new URLSearchParams(u.location.search),h=t.useCallback((function(e){var t=e.event;e.jsEvent.preventDefault(),u.push(t.url)}),[]),g=t.useCallback((function(e){var t=e.view;p.set("month",t.currentStart.getMonth()+1),p.set("year",t.currentStart.getFullYear()),u.replace({pathname:u.location.pathname,search:"?"+p.toString()})}),[p]),v=t.useMemo((function(){return c.map((function(e){return{id:e,title:"string"==typeof n?d[e][n]:n(d[e]),start:"string"==typeof r?d[e][r]:r(d[e]),end:"string"==typeof o?d[e][o]:o(d[e]),url:a.linkToRecord(f,e)+"/"+i}}))}),[d,c,f]);return{initialDate:p.has("month")?new Date(p.get("year"),p.get("month")-1):new Date,events:v,datesSet:g,eventClick:h}},ks=i.makeStyles((function(e){return{"@global":{".fc-button":{backgroundColor:e.palette.primary.main+" !important",border:"none !important",opacity:"1 !important"},".fc-day-today":{backgroundColor:e.palette.secondary.light+" !important"},"a.fc-daygrid-dot-event":{color:"black !important"}}}})),Rs=function(e){var t=i.useTheme(),r=Ss(e);return ks(),n.createElement($i,l({plugins:[Ds],locale:e.locale,initialView:"dayGridMonth",eventBackgroundColor:t.palette.primary.main},r))};Rs.defaultProps={linkType:"edit"};
|
|
21
|
+
*/function ts(e,t){for(var n=[],r=0;r<t;r+=1)n[r]=[];for(var a=0,o=e;a<o.length;a++){var i=o[a];n[i.row].push(i)}return n}function ns(e,t){for(var n=[],r=0;r<t;r+=1)n[r]=[];for(var a=0,o=e;a<o.length;a++){var i=o[a];n[i.firstCol].push(i)}return n}function rs(e,t){var n=[];if(e){for(i=0;i<t;i+=1)n[i]={affectedInstances:e.affectedInstances,isEvent:e.isEvent,segs:[]};for(var r=0,a=e.segs;r<a.length;r++){var o=a[r];n[o.row].segs.push(o)}}else for(var i=0;i<t;i+=1)n[i]=null;return n}var as=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Mt(t,e),t.prototype.render=function(){var e=this.props,t=this.context.options.navLinks?{"data-navlink":ka(e.date),tabIndex:0}:{};return It(Fi,{date:e.date,dateProfile:e.dateProfile,todayRange:e.todayRange,showDayNumber:e.showDayNumber,extraHookProps:e.extraHookProps,defaultContent:os},(function(n,r){return(r||e.forceDayTop)&&It("div",{className:"fc-daygrid-day-top",ref:n},It("a",Pt({className:"fc-daygrid-day-number"},t),r||It(Ut,null," ")))}))},t}(Fa);function os(e){return e.dayNumberText}var is=Jn({hour:"numeric",minute:"2-digit",omitZeroMinute:!0,meridiem:"narrow"});function ss(e){var t=e.eventRange.ui.display;return"list-item"===t||"auto"===t&&!e.eventRange.def.allDay&&e.firstCol===e.lastCol&&e.isStart&&e.isEnd}var us=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Mt(t,e),t.prototype.render=function(){var e=this.props;return It(Hi,Pt({},e,{extraClassNames:["fc-daygrid-event","fc-daygrid-block-event","fc-h-event"],defaultTimeFormat:is,defaultDisplayEventEnd:e.defaultDisplayEventEnd,disableResizing:!e.seg.eventRange.def.allDay}))},t}(Fa),ls=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Mt(t,e),t.prototype.render=function(){var e=this.props,t=this.context,n=t.options.eventTimeFormat||is,r=Br(e.seg,n,t,!0,e.defaultDisplayEventEnd);return It(Ii,{seg:e.seg,timeText:r,defaultContent:cs,isDragging:e.isDragging,isResizing:!1,isDateSelecting:!1,isSelected:e.isSelected,isPast:e.isPast,isFuture:e.isFuture,isToday:e.isToday},(function(t,n,r,a){return It("a",Pt({className:["fc-daygrid-event","fc-daygrid-dot-event"].concat(n).join(" "),ref:t},(o=e.seg,(i=o.eventRange.def.url)?{href:i}:{})),a);var o,i}))},t}(Fa);function cs(e){return It(Ut,null,It("div",{className:"fc-daygrid-event-dot",style:{borderColor:e.borderColor||e.backgroundColor}}),e.timeText&&It("div",{className:"fc-event-time"},e.timeText),It("div",{className:"fc-event-title"},e.event.title||It(Ut,null," ")))}var ds=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.compileSegs=Fn(fs),t}return Mt(t,e),t.prototype.render=function(){var e=this.props,t=this.compileSegs(e.singlePlacements),n=t.allSegs,r=t.invisibleSegs;return It(Gi,{dateProfile:e.dateProfile,todayRange:e.todayRange,allDayDate:e.allDayDate,moreCnt:e.moreCnt,allSegs:n,hiddenSegs:r,alignmentElRef:e.alignmentElRef,alignGridTop:e.alignGridTop,extraDateSpan:e.extraDateSpan,popoverContent:function(){var t=(e.eventDrag?e.eventDrag.affectedInstances:null)||(e.eventResize?e.eventResize.affectedInstances:null)||{};return It(Ut,null,n.map((function(n){var r=n.eventRange.instance.instanceId;return It("div",{className:"fc-daygrid-event-harness",key:r,style:{visibility:t[r]?"hidden":""}},ss(n)?It(ls,Pt({seg:n,isDragging:!1,isSelected:r===e.eventSelection,defaultDisplayEventEnd:!1},Vr(n,e.todayRange))):It(us,Pt({seg:n,isDragging:!1,isResizing:!1,isDateSelecting:!1,isSelected:r===e.eventSelection,defaultDisplayEventEnd:!1},Vr(n,e.todayRange))))})))}},(function(e,t,n,r,a){return It("a",{ref:e,className:["fc-daygrid-more-link"].concat(t).join(" "),onClick:a},r)}))},t}(Fa);function fs(e){for(var t=[],n=[],r=0,a=e;r<a.length;r++){var o=a[r];t.push(o.seg),o.isVisible||n.push(o.seg)}return{allSegs:t,invisibleSegs:n}}var ps=Jn({week:"narrow"}),hs=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.rootElRef=Ht(),t.handleRootEl=function(e){qa(t.rootElRef,e),qa(t.props.elRef,e)},t}return Mt(t,e),t.prototype.render=function(){var e=this.props,t=this.context,n=this.rootElRef,r=t.options,a=e.date,o=e.dateProfile,i=r.navLinks?{"data-navlink":ka(a,"week"),tabIndex:0}:{};return It(_i,{date:a,dateProfile:o,todayRange:e.todayRange,showDayNumber:e.showDayNumber,extraHookProps:e.extraHookProps,elRef:this.handleRootEl},(function(t,r,s,u){return It("td",Pt({ref:t,className:["fc-daygrid-day"].concat(r,e.extraClassNames||[]).join(" ")},s,e.extraDataAttrs),It("div",{className:"fc-daygrid-day-frame fc-scrollgrid-sync-inner",ref:e.innerElRef},e.showWeekNumber&&It(Bi,{date:a,defaultFormat:ps},(function(e,t,n,r){return It("a",Pt({ref:e,className:["fc-daygrid-week-number"].concat(t).join(" ")},i),r)})),!u&&It(as,{date:a,dateProfile:o,showDayNumber:e.showDayNumber,forceDayTop:e.forceDayTop,todayRange:e.todayRange,extraHookProps:e.extraHookProps}),It("div",{className:"fc-daygrid-day-events",ref:e.fgContentElRef},e.fgContent,It("div",{className:"fc-daygrid-day-bottom",style:{marginTop:e.moreMarginTop}},It(ds,{allDayDate:a,singlePlacements:e.singlePlacements,moreCnt:e.moreCnt,alignmentElRef:n,alignGridTop:!e.showDayNumber,extraDateSpan:e.extraDateSpan,dateProfile:e.dateProfile,eventSelection:e.eventSelection,eventDrag:e.eventDrag,eventResize:e.eventResize,todayRange:e.todayRange}))),It("div",{className:"fc-daygrid-day-bg"},e.bgContent)))}))},t}(La);function gs(e,t,n,r,a,o,i){var s=new ms;s.allowReslicing=!0,s.strictOrder=r,!0===t||!0===n?(s.maxCoord=o,s.hiddenConsumes=!0):"number"==typeof t?s.maxStackCnt=t:"number"==typeof n&&(s.maxStackCnt=n,s.hiddenConsumes=!0);for(var u=[],l=[],c=0;c<e.length;c+=1){var d=a[(S=e[c]).eventRange.instance.instanceId];null!=d?u.push({index:c,spanStart:S.firstCol,spanEnd:S.lastCol+1,thickness:d}):l.push(S)}for(var f=s.addSegs(u),p=function(e,t,n){for(var r=function(e,t){for(var n=[],r=0;r<t;r+=1)n.push([]);for(var a=0,o=e;a<o.length;a++){var i=o[a];for(r=i.spanStart;r<i.spanEnd;r+=1)n[r].push(i)}return n}(e,n.length),a=[],o=[],i=[],s=0;s<n.length;s+=1){for(var u=r[s],l=[],c=0,d=0,f=0,p=u;f<p.length;f++){var h=p[f],g=t[h.segInput.index];l.push({seg:vs(g,s,s+1,n),isVisible:!0,isAbsolute:!1,absoluteTop:0,marginTop:h.levelCoord-c}),c=h.levelCoord+h.thickness}var v=[];c=0,d=0;for(var m=0,y=u;m<y.length;m++){h=y[m],g=t[h.segInput.index];var w=h.spanEnd-h.spanStart>1,b=h.spanStart===s;d+=h.levelCoord-c,c=h.levelCoord+h.thickness,w?(d+=h.thickness,b&&v.push({seg:vs(g,h.spanStart,h.spanEnd,n),isVisible:!0,isAbsolute:!0,absoluteTop:h.levelCoord,marginTop:0})):b&&(v.push({seg:vs(g,h.spanStart,h.spanEnd,n),isVisible:!0,isAbsolute:!1,absoluteTop:0,marginTop:d}),d=0)}a.push(l),o.push(v),i.push(d)}return{singleColPlacements:a,multiColPlacements:o,leftoverMargins:i}}(s.toRects(),e,i),h=p.singleColPlacements,g=p.multiColPlacements,v=p.leftoverMargins,m=[],y=[],w=0,b=l;w<b.length;w++){g[(S=b[w]).firstCol].push({seg:S,isVisible:!1,isAbsolute:!0,absoluteTop:0,marginTop:0});for(var C=S.firstCol;C<=S.lastCol;C+=1)h[C].push({seg:vs(S,C,C+1,i),isVisible:!1,isAbsolute:!1,absoluteTop:0,marginTop:0})}for(C=0;C<i.length;C+=1)m.push(0);for(var E=0,T=f;E<T.length;E++){var D=T[E],S=e[D.segInput.index];g[D.spanStart].push({seg:S,isVisible:!1,isAbsolute:!0,absoluteTop:0,marginTop:0});for(C=D.spanStart;C<D.spanEnd;C+=1)m[C]+=1,h[C].push({seg:vs(S,C,C+1,i),isVisible:!1,isAbsolute:!1,absoluteTop:0,marginTop:0})}for(C=0;C<i.length;C+=1)y.push(v[C]);return{singleColPlacements:h,multiColPlacements:g,moreCnts:m,moreMarginTops:y}}function vs(e,t,n,r){if(e.firstCol===t&&e.lastCol===n-1)return e;var a=e.eventRange,o=a.range,i=Or(o,{start:r[t].date,end:tn(r[n-1].date,1)});return Pt(Pt({},e),{firstCol:t,lastCol:n-1,eventRange:{def:a.def,ui:Pt(Pt({},a.ui),{durationEditable:!1}),instance:a.instance,range:i},isStart:e.isStart&&i.start.valueOf()===o.start.valueOf(),isEnd:e.isEnd&&i.end.valueOf()===o.end.valueOf()})}var ms=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.hiddenConsumes=!1,t.forceHidden={},t}return Mt(t,e),t.prototype.addSegs=function(t){for(var n=this,r=e.prototype.addSegs.call(this,t),a=this.entriesByLevel,o=function(e){return!n.forceHidden[Zo(e)]},i=0;i<a.length;i+=1)a[i]=a[i].filter(o);return r},t.prototype.handleInvalidInsertion=function(t,n,r){var a=this.entriesByLevel,o=this.forceHidden,i=t.nextLevel-1;if(this.hiddenConsumes&&i>=0)for(var s=t.lateralStart;s<t.lateralEnd;s+=1){var u=a[i][s];if(this.allowReslicing){var l=Pt(Pt({},u),{spanStart:Math.max(u.spanStart,n.spanStart),spanEnd:Math.min(u.spanEnd,n.spanEnd)});o[c=Zo(l)]||(o[c]=!0,a[i][s]=l,this.splitEntry(u,n,r))}else{var c;o[c=Zo(u)]||(o[c]=!0,r.push(u))}}return e.prototype.handleInvalidInsertion.call(this,t,n,r)},t}(jo),ys=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.cellElRefs=new Ti,t.frameElRefs=new Ti,t.fgElRefs=new Ti,t.segHarnessRefs=new Ti,t.rootElRef=Ht(),t.state={framePositions:null,maxContentHeight:null,eventInstanceHeights:{}},t}return Mt(t,e),t.prototype.render=function(){var e=this,t=this.props,n=this.state,r=this.context.options,a=t.cells.length,o=ns(t.businessHourSegs,a),i=ns(t.bgEventSegs,a),s=ns(this.getHighlightSegs(),a),u=ns(this.getMirrorSegs(),a),l=gs(Wr(t.fgEventSegs,r.eventOrder),t.dayMaxEvents,t.dayMaxEventRows,r.eventOrderStrict,n.eventInstanceHeights,n.maxContentHeight,t.cells),c=l.singleColPlacements,d=l.multiColPlacements,f=l.moreCnts,p=l.moreMarginTops,h=t.eventDrag&&t.eventDrag.affectedInstances||t.eventResize&&t.eventResize.affectedInstances||{};return It("tr",{ref:this.rootElRef},t.renderIntro&&t.renderIntro(),t.cells.map((function(n,r){var a=e.renderFgSegs(r,t.forPrint?c[r]:d[r],t.todayRange,h),l=e.renderFgSegs(r,function(e,t){if(!e.length)return[];var n=function(e){for(var t={},n=0,r=e;n<r.length;n++)for(var a=r[n],o=0,i=a;o<i.length;o++){var s=i[o];t[s.seg.eventRange.instance.instanceId]=s.absoluteTop}return e}(t);return e.map((function(e){return{seg:e,isVisible:!0,isAbsolute:!0,absoluteTop:n[e.eventRange.instance.instanceId],marginTop:0}}))}(u[r],d),t.todayRange,{},Boolean(t.eventDrag),Boolean(t.eventResize),!1);return It(hs,{key:n.key,elRef:e.cellElRefs.createRef(n.key),innerElRef:e.frameElRefs.createRef(n.key),dateProfile:t.dateProfile,date:n.date,showDayNumber:t.showDayNumbers,showWeekNumber:t.showWeekNumbers&&0===r,forceDayTop:t.showWeekNumbers,todayRange:t.todayRange,eventSelection:t.eventSelection,eventDrag:t.eventDrag,eventResize:t.eventResize,extraHookProps:n.extraHookProps,extraDataAttrs:n.extraDataAttrs,extraClassNames:n.extraClassNames,extraDateSpan:n.extraDateSpan,moreCnt:f[r],moreMarginTop:p[r],singlePlacements:c[r],fgContentElRef:e.fgElRefs.createRef(n.key),fgContent:It(Ut,null,It(Ut,null,a),It(Ut,null,l)),bgContent:It(Ut,null,e.renderFillSegs(s[r],"highlight"),e.renderFillSegs(o[r],"non-business"),e.renderFillSegs(i[r],"bg-event"))})})))},t.prototype.componentDidMount=function(){this.updateSizing(!0)},t.prototype.componentDidUpdate=function(e,t){var n=this.props;this.updateSizing(!En(e,n))},t.prototype.getHighlightSegs=function(){var e=this.props;return e.eventDrag&&e.eventDrag.segs.length?e.eventDrag.segs:e.eventResize&&e.eventResize.segs.length?e.eventResize.segs:e.dateSelectionSegs},t.prototype.getMirrorSegs=function(){var e=this.props;return e.eventResize&&e.eventResize.segs.length?e.eventResize.segs:[]},t.prototype.renderFgSegs=function(e,t,n,r,a,o,i){var s=this.context,u=this.props.eventSelection,l=this.state.framePositions,c=1===this.props.cells.length,d=a||o||i,f=[];if(l)for(var p=0,h=t;p<h.length;p++){var g=h[p],v=g.seg,m=v.eventRange.instance.instanceId,y=m+":"+e,w=g.isVisible&&!r[m],b=g.isAbsolute,C="",E="";b&&(s.isRtl?(E=0,C=l.lefts[v.lastCol]-l.lefts[v.firstCol]):(C=0,E=l.rights[v.firstCol]-l.rights[v.lastCol])),f.push(It("div",{className:"fc-daygrid-event-harness"+(b?" fc-daygrid-event-harness-abs":""),key:y,ref:d?null:this.segHarnessRefs.createRef(y),style:{visibility:w?"":"hidden",marginTop:b?"":g.marginTop,top:b?g.absoluteTop:"",left:C,right:E}},ss(v)?It(ls,Pt({seg:v,isDragging:a,isSelected:m===u,defaultDisplayEventEnd:c},Vr(v,n))):It(us,Pt({seg:v,isDragging:a,isResizing:o,isDateSelecting:i,isSelected:m===u,defaultDisplayEventEnd:c},Vr(v,n)))))}return f},t.prototype.renderFillSegs=function(e,t){var n,r=this.context.isRtl,a=this.props.todayRange,o=this.state.framePositions,i=[];if(o)for(var s=0,u=e;s<u.length;s++){var l=u[s],c=r?{right:0,left:o.lefts[l.lastCol]-o.lefts[l.firstCol]}:{left:0,right:o.rights[l.firstCol]-o.rights[l.lastCol]};i.push(It("div",{key:(n=l.eventRange,n.instance?n.instance.instanceId:n.def.defId+":"+n.range.start.toISOString()),className:"fc-daygrid-bg-harness",style:c},"bg-event"===t?It(Li,Pt({seg:l},Vr(l,a))):qi(t)))}return It.apply(void 0,Ot([Ut,{}],i))},t.prototype.updateSizing=function(e){var t=this.props,n=this.frameElRefs;if(!t.forPrint&&null!==t.clientWidth){if(e){var r=t.cells.map((function(e){return n.currentMap[e.key]}));if(r.length){var a=this.rootElRef.current;this.setState({framePositions:new Pa(a,r,!0,!1)})}}var o=!0===t.dayMaxEvents||!0===t.dayMaxEventRows;this.setState({eventInstanceHeights:this.queryEventInstanceHeights(),maxContentHeight:o?this.computeMaxContentHeight():null})}},t.prototype.queryEventInstanceHeights=function(){var e=this.segHarnessRefs.currentMap,t={};for(var n in e){var r=Math.round(e[n].getBoundingClientRect().height),a=n.split(":")[0];t[a]=Math.max(t[a]||0,r)}return t},t.prototype.computeMaxContentHeight=function(){var e=this.props.cells[0].key,t=this.cellElRefs.currentMap[e],n=this.fgElRefs.currentMap[e];return t.getBoundingClientRect().bottom-n.getBoundingClientRect().top},t.prototype.getCellEls=function(){var e=this.cellElRefs.currentMap;return this.props.cells.map((function(t){return e[t.key]}))},t}(La);ys.addStateEquality({eventInstanceHeights:En});var ws=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.splitBusinessHourSegs=Fn(ts),t.splitBgEventSegs=Fn(ts),t.splitFgEventSegs=Fn(ts),t.splitDateSelectionSegs=Fn(ts),t.splitEventDrag=Fn(rs),t.splitEventResize=Fn(rs),t.rowRefs=new Ti,t.handleRootEl=function(e){t.rootEl=e,e?t.context.registerInteractiveComponent(t,{el:e,isHitComboAllowed:t.props.isHitComboAllowed}):t.context.unregisterInteractiveComponent(t)},t}return Mt(t,e),t.prototype.render=function(){var e=this,t=this.props,n=t.dateProfile,r=t.dayMaxEventRows,a=t.dayMaxEvents,o=t.expandRows,i=t.cells.length,s=this.splitBusinessHourSegs(t.businessHourSegs,i),u=this.splitBgEventSegs(t.bgEventSegs,i),l=this.splitFgEventSegs(t.fgEventSegs,i),c=this.splitDateSelectionSegs(t.dateSelectionSegs,i),d=this.splitEventDrag(t.eventDrag,i),f=this.splitEventResize(t.eventResize,i),p=!0===a||!0===r;return p&&!o&&(p=!1,r=null,a=null),It("div",{className:["fc-daygrid-body",p?"fc-daygrid-body-balanced":"fc-daygrid-body-unbalanced",o?"":"fc-daygrid-body-natural"].join(" "),ref:this.handleRootEl,style:{width:t.clientWidth,minWidth:t.tableMinWidth}},It(pi,{unit:"day"},(function(p,h){return It(Ut,null,It("table",{className:"fc-scrollgrid-sync-table",style:{width:t.clientWidth,minWidth:t.tableMinWidth,height:o?t.clientHeight:""}},t.colGroupNode,It("tbody",null,t.cells.map((function(o,p){return It(ys,{ref:e.rowRefs.createRef(p),key:o.length?o[0].date.toISOString():p,showDayNumbers:i>1,showWeekNumbers:t.showWeekNumbers,todayRange:h,dateProfile:n,cells:o,renderIntro:t.renderRowIntro,businessHourSegs:s[p],eventSelection:t.eventSelection,bgEventSegs:u[p].filter(bs),fgEventSegs:l[p],dateSelectionSegs:c[p],eventDrag:d[p],eventResize:f[p],dayMaxEvents:a,dayMaxEventRows:r,clientWidth:t.clientWidth,clientHeight:t.clientHeight,forPrint:t.forPrint})})))))})))},t.prototype.prepareHits=function(){this.rowPositions=new Pa(this.rootEl,this.rowRefs.collect().map((function(e){return e.getCellEls()[0]})),!1,!0),this.colPositions=new Pa(this.rootEl,this.rowRefs.currentMap[0].getCellEls(),!0,!1)},t.prototype.queryHit=function(e,t){var n=this.colPositions,r=this.rowPositions,a=n.leftToIndex(e),o=r.topToIndex(t);if(null!=o&&null!=a){var i=this.props.cells[o][a];return{dateProfile:this.props.dateProfile,dateSpan:Pt({range:this.getCellRange(o,a),allDay:!0},i.extraDateSpan),dayEl:this.getCellEl(o,a),rect:{left:n.lefts[a],right:n.rights[a],top:r.tops[o],bottom:r.bottoms[o]},layer:0}}return null},t.prototype.getCellEl=function(e,t){return this.rowRefs.currentMap[e].getCellEls()[t]},t.prototype.getCellRange=function(e,t){var n=this.props.cells[e][t].date;return{start:n,end:tn(n,1)}},t}(La);function bs(e){return e.eventRange.def.allDay}var Cs=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.forceDayIfListItem=!0,t}return Mt(t,e),t.prototype.sliceRange=function(e,t){return t.sliceRange(e)},t}(wi),Es=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.slicer=new Cs,t.tableRef=Ht(),t}return Mt(t,e),t.prototype.render=function(){var e=this.props,t=this.context;return It(ws,Pt({ref:this.tableRef},this.slicer.sliceProps(e,e.dateProfile,e.nextDayThreshold,t,e.dayTableModel),{dateProfile:e.dateProfile,cells:e.dayTableModel.cells,colGroupNode:e.colGroupNode,tableMinWidth:e.tableMinWidth,renderRowIntro:e.renderRowIntro,dayMaxEvents:e.dayMaxEvents,dayMaxEventRows:e.dayMaxEventRows,showWeekNumbers:e.showWeekNumbers,expandRows:e.expandRows,headerAlignElRef:e.headerAlignElRef,clientWidth:e.clientWidth,clientHeight:e.clientHeight,forPrint:e.forPrint}))},t}(La);function Ts(e,t){var n=new mi(e.renderRange,t);return new yi(n,/year|month|week/.test(e.currentRangeUnit))}var Ds=za({initialView:"dayGridMonth",views:{dayGrid:{component:function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.buildDayTableModel=Fn(Ts),t.headerRef=Ht(),t.tableRef=Ht(),t}return Mt(t,e),t.prototype.render=function(){var e=this,t=this.context,n=t.options,r=t.dateProfileGenerator,a=this.props,o=this.buildDayTableModel(a.dateProfile,r),i=n.dayHeaders&&It(gi,{ref:this.headerRef,dateProfile:a.dateProfile,dates:o.headerDates,datesRepDistinctDays:1===o.rowCnt}),s=function(t){return It(Es,{ref:e.tableRef,dateProfile:a.dateProfile,dayTableModel:o,businessHours:a.businessHours,dateSelection:a.dateSelection,eventStore:a.eventStore,eventUiBases:a.eventUiBases,eventSelection:a.eventSelection,eventDrag:a.eventDrag,eventResize:a.eventResize,nextDayThreshold:n.nextDayThreshold,colGroupNode:t.tableColGroupNode,tableMinWidth:t.tableMinWidth,dayMaxEvents:n.dayMaxEvents,dayMaxEventRows:n.dayMaxEventRows,showWeekNumbers:n.weekNumbers,expandRows:!a.isHeightAuto,headerAlignElRef:e.headerElRef,clientWidth:t.clientWidth,clientHeight:t.clientHeight,forPrint:a.forPrint})};return n.dayMinWidth?this.renderHScrollLayout(i,s,o.colCnt,n.dayMinWidth):this.renderSimpleLayout(i,s)},t}(es),dateProfileGeneratorClass:function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Mt(t,e),t.prototype.buildRenderRange=function(t,n,r){var a,o=this.props.dateEnv,i=e.prototype.buildRenderRange.call(this,t,n,r),s=i.start,u=i.end;(/^(year|month)$/.test(n)&&(s=o.startOfWeek(s),(a=o.startOfWeek(u)).valueOf()!==u.valueOf()&&(u=en(a,1))),this.props.monthMode&&this.props.fixedWeekCount)&&(u=en(u,6-Math.ceil(rn(s,u)/7)));return{start:s,end:u}},t}(oo)},dayGridDay:{type:"dayGrid",duration:{days:1}},dayGridWeek:{type:"dayGrid",duration:{weeks:1}},dayGridMonth:{type:"dayGrid",duration:{months:1},monthMode:!0,fixedWeekCount:!0}}}),Ss=function(e){var n=e.label,r=e.startDate,o=e.endDate,i=e.linkType,u=s.useHistory(),l=a.useListContext(),c=l.ids,d=l.data,f=l.basePath,p=new URLSearchParams(u.location.search),h=t.useCallback((function(e){var t=e.event;e.jsEvent.preventDefault(),u.push(t.url)}),[]),g=t.useCallback((function(e){var t=e.view;p.set("month",t.currentStart.getMonth()+1),p.set("year",t.currentStart.getFullYear()),u.replace({pathname:u.location.pathname,search:"?"+p.toString()})}),[p]),v=t.useMemo((function(){return c.filter((function(e){return d[e]})).map((function(e){return{id:e,title:"string"==typeof n?d[e][n]:n(d[e]),start:"string"==typeof r?d[e][r]:r(d[e]),end:"string"==typeof o?d[e][o]:o(d[e]),url:a.linkToRecord(f,e)+"/"+i}}))}),[d,c,f]);return{initialDate:p.has("month")?new Date(p.get("year"),p.get("month")-1):new Date,events:v,datesSet:g,eventClick:h}},ks=i.makeStyles((function(e){return{"@global":{".fc-button":{backgroundColor:e.palette.primary.main+" !important",border:"none !important",opacity:"1 !important"},".fc-day-today":{backgroundColor:e.palette.secondary.light+" !important"},"a.fc-daygrid-dot-event":{color:"black !important"}}}})),Rs=function(e){var t=i.useTheme(),r=Ss(e);return ks(),n.createElement($i,l({plugins:[Ds],locale:e.locale,initialView:"dayGridMonth",eventBackgroundColor:t.palette.primary.main},r))};Rs.defaultProps={linkType:"edit"};
|
|
22
22
|
/*!
|
|
23
23
|
FullCalendar v5.7.2
|
|
24
24
|
Docs & License: https://fullcalendar.io/
|