@event-calendar/core 2.7.2 → 3.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +29 -13
- package/index.css +179 -70
- package/index.js +126 -33
- package/package.json +3 -2
- package/src/Calendar.svelte +1 -1
- package/src/lib/date.js +7 -0
- package/src/lib/events.js +41 -31
- package/src/lib/times.js +67 -0
- package/src/lib/utils.js +4 -0
- package/src/lib/view.js +4 -0
- package/src/lib.js +10 -9
- package/src/storage/options.js +5 -0
- package/src/styles/index.scss +19 -77
- package/src/styles/time-grid.scss +74 -0
- package/src/styles/timeline.scss +140 -0
package/src/styles/index.scss
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
@use "theme";
|
|
2
|
+
@use "timeline";
|
|
3
|
+
@use "time-grid";
|
|
2
4
|
|
|
3
5
|
/* Grid */
|
|
4
6
|
.ec-days,
|
|
5
7
|
.ec-day,
|
|
6
|
-
.ec-day-title,
|
|
7
8
|
.ec-resource {
|
|
8
9
|
flex: 1 1 0;
|
|
9
10
|
min-width: 0;
|
|
@@ -139,7 +140,8 @@
|
|
|
139
140
|
.ec-body,
|
|
140
141
|
.ec-days,
|
|
141
142
|
.ec-day,
|
|
142
|
-
.ec-
|
|
143
|
+
.ec-times,
|
|
144
|
+
.ec-day-head {
|
|
143
145
|
border: 1px solid var(--ec-border-color);
|
|
144
146
|
}
|
|
145
147
|
|
|
@@ -204,20 +206,6 @@
|
|
|
204
206
|
padding: 0 4px 0 8px;
|
|
205
207
|
display: flex;
|
|
206
208
|
flex-direction: column;
|
|
207
|
-
justify-content: center;
|
|
208
|
-
}
|
|
209
|
-
|
|
210
|
-
.ec-sidebar-title {
|
|
211
|
-
visibility: hidden;
|
|
212
|
-
overflow-y: hidden;
|
|
213
|
-
height: 0;
|
|
214
|
-
text-align: right;
|
|
215
|
-
|
|
216
|
-
.ec-all-day & {
|
|
217
|
-
visibility: visible;
|
|
218
|
-
height: auto;
|
|
219
|
-
padding: 8px 0;
|
|
220
|
-
}
|
|
221
209
|
}
|
|
222
210
|
|
|
223
211
|
.ec-content {
|
|
@@ -296,6 +284,7 @@
|
|
|
296
284
|
.ec-day-grid {
|
|
297
285
|
.ec-day-head {
|
|
298
286
|
display: block;
|
|
287
|
+
border: none;
|
|
299
288
|
text-align: right;
|
|
300
289
|
padding: 4px 4px 3px;
|
|
301
290
|
}
|
|
@@ -314,7 +303,6 @@
|
|
|
314
303
|
|
|
315
304
|
.ec-list {
|
|
316
305
|
.ec-day-head {
|
|
317
|
-
flex: 1 0 auto;
|
|
318
306
|
background-color: var(--ec-list-day-bg-color);
|
|
319
307
|
border-style: solid none;
|
|
320
308
|
margin: -1px 0 0;
|
|
@@ -345,6 +333,11 @@
|
|
|
345
333
|
&.ec-preview {
|
|
346
334
|
position: relative;
|
|
347
335
|
}
|
|
336
|
+
|
|
337
|
+
.ec-day-grid &,
|
|
338
|
+
.ec-all-day & {
|
|
339
|
+
display: flow-root;
|
|
340
|
+
}
|
|
348
341
|
}
|
|
349
342
|
|
|
350
343
|
.ec-event {
|
|
@@ -364,10 +357,6 @@
|
|
|
364
357
|
position: relative;
|
|
365
358
|
}
|
|
366
359
|
|
|
367
|
-
.ec-time-grid .ec-body & {
|
|
368
|
-
position: absolute;
|
|
369
|
-
}
|
|
370
|
-
|
|
371
360
|
.ec-list & {
|
|
372
361
|
flex-direction: row;
|
|
373
362
|
padding: 8px 14px;
|
|
@@ -391,10 +380,7 @@
|
|
|
391
380
|
position: absolute;
|
|
392
381
|
z-index: 0;
|
|
393
382
|
box-shadow: none;
|
|
394
|
-
display:
|
|
395
|
-
.ec-day:hover & {
|
|
396
|
-
display: flex;
|
|
397
|
-
}
|
|
383
|
+
display: flex;
|
|
398
384
|
}
|
|
399
385
|
}
|
|
400
386
|
|
|
@@ -404,7 +390,8 @@
|
|
|
404
390
|
width: 100%;
|
|
405
391
|
|
|
406
392
|
.ec-day-grid &,
|
|
407
|
-
.ec-all-day
|
|
393
|
+
.ec-all-day &,
|
|
394
|
+
.ec-timeline & {
|
|
408
395
|
flex-direction: row;
|
|
409
396
|
}
|
|
410
397
|
}
|
|
@@ -421,7 +408,8 @@
|
|
|
421
408
|
margin: 0 0 1px 0;
|
|
422
409
|
flex-shrink: 0;
|
|
423
410
|
|
|
424
|
-
.ec-day-grid
|
|
411
|
+
.ec-day-grid &,
|
|
412
|
+
.ec-timeline & {
|
|
425
413
|
margin: 0 3px 0 0;
|
|
426
414
|
max-width: 100%;
|
|
427
415
|
text-overflow: ellipsis;
|
|
@@ -434,17 +422,13 @@
|
|
|
434
422
|
font-weight: inherit;
|
|
435
423
|
|
|
436
424
|
.ec-day-grid &,
|
|
437
|
-
.ec-all-day
|
|
425
|
+
.ec-all-day &,
|
|
426
|
+
.ec-timeline & {
|
|
438
427
|
min-height: 1.5em;
|
|
439
428
|
white-space: nowrap;
|
|
440
429
|
text-overflow: ellipsis;
|
|
441
430
|
}
|
|
442
431
|
|
|
443
|
-
.ec-time-grid .ec-body & {
|
|
444
|
-
position: sticky;
|
|
445
|
-
top: 0;
|
|
446
|
-
}
|
|
447
|
-
|
|
448
432
|
.ec-list & {
|
|
449
433
|
font-size: 1rem;
|
|
450
434
|
}
|
|
@@ -469,44 +453,10 @@
|
|
|
469
453
|
position: absolute;
|
|
470
454
|
background-color: var(--ec-bg-event-color);
|
|
471
455
|
opacity: var(--ec-bg-event-opacity);
|
|
472
|
-
width: 100%;
|
|
473
|
-
z-index: 1;
|
|
474
|
-
}
|
|
475
|
-
|
|
476
|
-
.ec-time,
|
|
477
|
-
.ec-line {
|
|
478
|
-
height: 24px;
|
|
479
456
|
}
|
|
480
457
|
|
|
481
458
|
.ec-time {
|
|
482
|
-
position: relative;
|
|
483
|
-
line-height: 24px;
|
|
484
|
-
top: -12px;
|
|
485
|
-
text-align: right;
|
|
486
459
|
white-space: nowrap;
|
|
487
|
-
|
|
488
|
-
.ec-header &,
|
|
489
|
-
.ec-all-day & {
|
|
490
|
-
visibility: hidden;
|
|
491
|
-
overflow-y: hidden;
|
|
492
|
-
height: 0;
|
|
493
|
-
}
|
|
494
|
-
}
|
|
495
|
-
|
|
496
|
-
.ec-lines {
|
|
497
|
-
width: 8px;
|
|
498
|
-
}
|
|
499
|
-
|
|
500
|
-
.ec-line:not(:first-child):after {
|
|
501
|
-
content: '';
|
|
502
|
-
position: absolute;
|
|
503
|
-
width: 100%;
|
|
504
|
-
border-bottom: 1px solid var(--ec-border-color);
|
|
505
|
-
pointer-events: none;
|
|
506
|
-
}
|
|
507
|
-
|
|
508
|
-
.ec-body:not(.ec-compact) .ec-line:nth-child(even):after {
|
|
509
|
-
border-bottom-style: dotted;
|
|
510
460
|
}
|
|
511
461
|
|
|
512
462
|
.ec-popup {
|
|
@@ -575,7 +525,8 @@
|
|
|
575
525
|
user-select: none;
|
|
576
526
|
|
|
577
527
|
.ec-day-grid &,
|
|
578
|
-
.ec-all-day
|
|
528
|
+
.ec-all-day &,
|
|
529
|
+
.ec-timeline & {
|
|
579
530
|
top: 0;
|
|
580
531
|
right: 0;
|
|
581
532
|
bottom: 0;
|
|
@@ -583,15 +534,6 @@
|
|
|
583
534
|
max-width: 8px;
|
|
584
535
|
cursor: ew-resize;
|
|
585
536
|
}
|
|
586
|
-
|
|
587
|
-
.ec-time-grid .ec-body & {
|
|
588
|
-
left: 0;
|
|
589
|
-
right: 0;
|
|
590
|
-
bottom: 0;
|
|
591
|
-
height: 50%;
|
|
592
|
-
max-height: 8px;
|
|
593
|
-
cursor: ns-resize;
|
|
594
|
-
}
|
|
595
537
|
}
|
|
596
538
|
|
|
597
539
|
.ec-dragging {
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
.ec-time-grid {
|
|
2
|
+
.ec-body {
|
|
3
|
+
.ec-event {
|
|
4
|
+
position: absolute;
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
.ec-event-title {
|
|
8
|
+
position: sticky;
|
|
9
|
+
top: 0;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
.ec-resizer {
|
|
13
|
+
left: 0;
|
|
14
|
+
right: 0;
|
|
15
|
+
bottom: 0;
|
|
16
|
+
height: 50%;
|
|
17
|
+
max-height: 8px;
|
|
18
|
+
cursor: ns-resize;
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
.ec-bg-event {
|
|
23
|
+
width: 100%;
|
|
24
|
+
z-index: 1;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
.ec-time {
|
|
28
|
+
position: relative;
|
|
29
|
+
line-height: 24px;
|
|
30
|
+
top: -12px;
|
|
31
|
+
text-align: right;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
.ec-header .ec-time ,
|
|
35
|
+
.ec-all-day .ec-time {
|
|
36
|
+
visibility: hidden;
|
|
37
|
+
overflow-y: hidden;
|
|
38
|
+
height: 0;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
.ec-time,
|
|
42
|
+
.ec-line {
|
|
43
|
+
height: 24px;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
.ec-lines {
|
|
47
|
+
width: 8px;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
.ec-line:not(:first-child):after {
|
|
51
|
+
content: '';
|
|
52
|
+
position: absolute;
|
|
53
|
+
width: 100%;
|
|
54
|
+
border-bottom: 1px solid var(--ec-border-color);
|
|
55
|
+
pointer-events: none;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
.ec-body:not(.ec-compact) .ec-line:nth-child(even):after {
|
|
59
|
+
border-bottom-style: dotted;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
.ec-sidebar-title {
|
|
63
|
+
visibility: hidden;
|
|
64
|
+
overflow-y: hidden;
|
|
65
|
+
height: 0;
|
|
66
|
+
text-align: right;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
.ec-all-day .ec-sidebar-title {
|
|
70
|
+
visibility: visible;
|
|
71
|
+
height: auto;
|
|
72
|
+
padding: 8px 0;
|
|
73
|
+
}
|
|
74
|
+
}
|
|
@@ -0,0 +1,140 @@
|
|
|
1
|
+
.ec-timeline {
|
|
2
|
+
.ec-container {
|
|
3
|
+
display: flex;
|
|
4
|
+
flex: 1 1 0%;
|
|
5
|
+
min-height: 0;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
.ec-main {
|
|
9
|
+
display: flex;
|
|
10
|
+
flex-direction: column;
|
|
11
|
+
min-width: 0;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
.ec-content {
|
|
15
|
+
flex-direction: column;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
.ec-body {
|
|
19
|
+
flex: 1 1 auto;
|
|
20
|
+
overflow: auto;
|
|
21
|
+
|
|
22
|
+
.ec-content {
|
|
23
|
+
min-height: 100%;
|
|
24
|
+
min-width: max-content;
|
|
25
|
+
position: relative;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
.ec-days {
|
|
29
|
+
flex-shrink: 0;
|
|
30
|
+
&:not(:last-child) {
|
|
31
|
+
flex-grow: 0;
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
.ec-header {
|
|
37
|
+
overflow: hidden;
|
|
38
|
+
|
|
39
|
+
.ec-days {
|
|
40
|
+
min-width: max-content;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
.ec-day {
|
|
44
|
+
flex-basis: auto;
|
|
45
|
+
display: flex;
|
|
46
|
+
flex-direction: column;
|
|
47
|
+
|
|
48
|
+
&:first-child {
|
|
49
|
+
.ec-day-head,
|
|
50
|
+
.ec-time:first-child {
|
|
51
|
+
border: none;
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
.ec-day {
|
|
58
|
+
border: none;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
.ec-day-head {
|
|
62
|
+
border-style: none none none solid;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
.ec-times {
|
|
66
|
+
display: flex;
|
|
67
|
+
border-style: solid none none;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
.ec-time {
|
|
71
|
+
border-left: 1px solid var(--ec-border-color);
|
|
72
|
+
box-sizing: border-box;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
.ec-time, .ec-line {
|
|
76
|
+
width: 52px;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
.ec-events {
|
|
80
|
+
position: relative;
|
|
81
|
+
height: 100%;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
.ec-event {
|
|
85
|
+
position: absolute;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
.ec-bg-event {
|
|
89
|
+
height: 100%;
|
|
90
|
+
z-index: auto;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
.ec-lines {
|
|
94
|
+
display: flex;
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
.ec-line:not(:first-child):after {
|
|
98
|
+
content: '';
|
|
99
|
+
position: absolute;
|
|
100
|
+
height: 100%;
|
|
101
|
+
border-left: 1px solid var(--ec-border-color);
|
|
102
|
+
pointer-events: none;
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
//.ec-body:not(.ec-compact) .ec-line:nth-child(even):after {
|
|
106
|
+
// border-bottom-style: dotted;
|
|
107
|
+
//}
|
|
108
|
+
|
|
109
|
+
.ec-sidebar {
|
|
110
|
+
padding: 0;
|
|
111
|
+
border: 1px solid var(--ec-border-color);
|
|
112
|
+
border-right-style: none;
|
|
113
|
+
|
|
114
|
+
.ec-sidebar-title {
|
|
115
|
+
flex-shrink: 0;
|
|
116
|
+
border-bottom: 1px solid var(--ec-border-color);
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
.ec-content {
|
|
120
|
+
flex: 1;
|
|
121
|
+
overflow: hidden;
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
.ec-resource {
|
|
125
|
+
padding: 0 8px;
|
|
126
|
+
flex-shrink: 0;
|
|
127
|
+
&:not(:last-child) {
|
|
128
|
+
flex-grow: 0;
|
|
129
|
+
border-bottom: 1px solid var(--ec-border-color);
|
|
130
|
+
}
|
|
131
|
+
&:last-child {
|
|
132
|
+
flex-basis: 100%!important; // for vertical scroll needs
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
span {
|
|
136
|
+
padding-top: 8px;
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
}
|