@event-calendar/core 1.5.0 → 2.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 +91 -59
- package/index.js +277 -255
- package/package.json +2 -2
- package/src/Buttons.svelte +9 -9
- package/src/lib/a11y.js +30 -0
- package/src/lib/actions.js +4 -10
- package/src/lib/date.js +9 -77
- package/src/lib/dom.js +7 -5
- package/src/lib/events.js +12 -8
- package/src/lib/stores.js +6 -7
- package/src/lib/utils.js +4 -4
- package/src/lib.js +1 -0
- package/src/storage/state.js +20 -17
- package/src/storage/stores.js +5 -5
package/index.js
CHANGED
|
@@ -1,44 +1,45 @@
|
|
|
1
|
-
import { run_all, is_function, noop, identity, tick, SvelteComponent, init, safe_not_equal, empty, insert,
|
|
1
|
+
import { run_all, is_function, noop, identity, tick, SvelteComponent, init, safe_not_equal, ensure_array_like, empty, insert, detach, destroy_each, component_subscribe, set_store_value, element, text, attr, append, listen, set_data, action_destroyer, transition_in, group_outros, check_outros, transition_out, space, create_component, mount_component, destroy_component, construct_svelte_component, set_style, get_current_component } from 'svelte/internal';
|
|
2
2
|
import { getContext, setContext, beforeUpdate } from 'svelte';
|
|
3
3
|
import { writable, derived, get, readable } from 'svelte/store';
|
|
4
4
|
|
|
5
|
-
function
|
|
6
|
-
return
|
|
5
|
+
function keyEnter(fn) {
|
|
6
|
+
return function (e) {
|
|
7
|
+
return e.key === 'Enter' || e.key === ' ' ? fn.call(this, e) : undefined;
|
|
8
|
+
};
|
|
7
9
|
}
|
|
8
10
|
|
|
9
|
-
function
|
|
10
|
-
return
|
|
11
|
+
function btnTextDay(text) {
|
|
12
|
+
return btnText(text, 'day');
|
|
11
13
|
}
|
|
12
14
|
|
|
13
|
-
function
|
|
14
|
-
return
|
|
15
|
+
function btnTextWeek(text) {
|
|
16
|
+
return btnText(text, 'week');
|
|
15
17
|
}
|
|
16
18
|
|
|
17
|
-
function
|
|
18
|
-
return
|
|
19
|
+
function btnTextMonth(text) {
|
|
20
|
+
return btnText(text, 'month');
|
|
19
21
|
}
|
|
20
22
|
|
|
21
|
-
function
|
|
22
|
-
return
|
|
23
|
+
function btnTextYear(text) {
|
|
24
|
+
return btnText(text, 'year');
|
|
23
25
|
}
|
|
24
26
|
|
|
25
|
-
function
|
|
26
|
-
return
|
|
27
|
+
function btnText(text, period) {
|
|
28
|
+
return {
|
|
29
|
+
...text,
|
|
30
|
+
next: 'Next ' + period,
|
|
31
|
+
prev: 'Previous ' + period
|
|
32
|
+
};
|
|
27
33
|
}
|
|
28
34
|
|
|
29
35
|
function setContent(node, content) {
|
|
30
36
|
let actions = {
|
|
31
37
|
update(content) {
|
|
32
|
-
|
|
33
|
-
node.removeChild(node.lastChild);
|
|
34
|
-
}
|
|
35
|
-
if (!isObject(content)) {
|
|
38
|
+
if (typeof content == 'string') {
|
|
36
39
|
node.innerText = content;
|
|
37
|
-
} else if (content
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
}
|
|
41
|
-
} else if (content.html) {
|
|
40
|
+
} else if (content?.domNodes) {
|
|
41
|
+
node.replaceChildren(...content.domNodes);
|
|
42
|
+
} else if (content?.html) {
|
|
42
43
|
node.innerHTML = content.html;
|
|
43
44
|
}
|
|
44
45
|
}
|
|
@@ -161,43 +162,6 @@ function toISOString(date) {
|
|
|
161
162
|
return date.toISOString().substring(0, 19);
|
|
162
163
|
}
|
|
163
164
|
|
|
164
|
-
function formatRange(start, end, intl) {
|
|
165
|
-
if (start.getFullYear() !== end.getFullYear()) {
|
|
166
|
-
return intl.format(start) + ' - ' + intl.format(end);
|
|
167
|
-
}
|
|
168
|
-
|
|
169
|
-
let diff = [];
|
|
170
|
-
if (start.getMonth() !== end.getMonth()) {
|
|
171
|
-
diff.push('month');
|
|
172
|
-
}
|
|
173
|
-
if (start.getDate() !== end.getDate()) {
|
|
174
|
-
diff.push('day');
|
|
175
|
-
}
|
|
176
|
-
|
|
177
|
-
if (!diff.length) {
|
|
178
|
-
return intl.format(start);
|
|
179
|
-
}
|
|
180
|
-
|
|
181
|
-
let opts1 = intl.resolvedOptions();
|
|
182
|
-
let opts2 = {};
|
|
183
|
-
for (let key of diff) {
|
|
184
|
-
opts2[key] = opts1[key];
|
|
185
|
-
}
|
|
186
|
-
let intl2 = new Intl.DateTimeFormat(opts1.locale, opts2);
|
|
187
|
-
|
|
188
|
-
let full1 = intl.format(start);
|
|
189
|
-
let full2 = intl.format(end);
|
|
190
|
-
let part1 = intl2.format(start);
|
|
191
|
-
let part2 = intl2.format(end);
|
|
192
|
-
|
|
193
|
-
let common = _commonChunks(full1, part1, full2, part2);
|
|
194
|
-
if (common) {
|
|
195
|
-
return common.head + part1 + ' - ' + part2 + common.tail;
|
|
196
|
-
}
|
|
197
|
-
|
|
198
|
-
return full1 + ' - ' + full2;
|
|
199
|
-
}
|
|
200
|
-
|
|
201
165
|
function datesEqual(date1, ...dates2) {
|
|
202
166
|
return dates2.every(date2 => date1.getTime() === date2.getTime());
|
|
203
167
|
}
|
|
@@ -221,6 +185,15 @@ function noTimePart(date) {
|
|
|
221
185
|
return typeof date === 'string' && date.length <= 10;
|
|
222
186
|
}
|
|
223
187
|
|
|
188
|
+
/**
|
|
189
|
+
* Copy time from one date to another
|
|
190
|
+
*/
|
|
191
|
+
function copyTime(toDate, fromDate) {
|
|
192
|
+
toDate.setUTCHours(fromDate.getUTCHours(), fromDate.getUTCMinutes(), fromDate.getUTCSeconds(), 0);
|
|
193
|
+
|
|
194
|
+
return toDate;
|
|
195
|
+
}
|
|
196
|
+
|
|
224
197
|
/**
|
|
225
198
|
* Private functions
|
|
226
199
|
*/
|
|
@@ -248,62 +221,48 @@ function _fromISOString(str) {
|
|
|
248
221
|
));
|
|
249
222
|
}
|
|
250
223
|
|
|
251
|
-
function
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
let res1;
|
|
255
|
-
[i, res1] = _cut(str1, substr1, i);
|
|
256
|
-
if (!res1) {
|
|
257
|
-
break;
|
|
258
|
-
}
|
|
259
|
-
|
|
260
|
-
let j = 0;
|
|
261
|
-
while (j < str2.length) {
|
|
262
|
-
let res2;
|
|
263
|
-
[j, res2] = _cut(str2, substr2, j);
|
|
264
|
-
if (!res2) {
|
|
265
|
-
break;
|
|
266
|
-
}
|
|
224
|
+
function debounce(fn, handle, queueStore) {
|
|
225
|
+
queueStore.update(queue => queue.set(handle, fn));
|
|
226
|
+
}
|
|
267
227
|
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
}
|
|
228
|
+
function flushDebounce(queue) {
|
|
229
|
+
run_all(queue);
|
|
230
|
+
queue.clear();
|
|
231
|
+
}
|
|
273
232
|
|
|
274
|
-
|
|
233
|
+
function assign(...args) {
|
|
234
|
+
return Object.assign(...args);
|
|
275
235
|
}
|
|
276
236
|
|
|
277
|
-
function
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
let end = start + substr.length;
|
|
237
|
+
function keys(object) {
|
|
238
|
+
return Object.keys(object);
|
|
239
|
+
}
|
|
281
240
|
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
}];
|
|
286
|
-
}
|
|
241
|
+
function floor(value) {
|
|
242
|
+
return Math.floor(value);
|
|
243
|
+
}
|
|
287
244
|
|
|
288
|
-
|
|
245
|
+
function min(...args) {
|
|
246
|
+
return Math.min(...args);
|
|
289
247
|
}
|
|
290
248
|
|
|
291
|
-
function
|
|
292
|
-
|
|
249
|
+
function max(...args) {
|
|
250
|
+
return Math.max(...args);
|
|
293
251
|
}
|
|
294
252
|
|
|
295
|
-
function
|
|
296
|
-
|
|
297
|
-
queue.clear();
|
|
253
|
+
function symbol() {
|
|
254
|
+
return Symbol('ec');
|
|
298
255
|
}
|
|
299
256
|
|
|
300
|
-
function createElement(tag, className,
|
|
257
|
+
function createElement(tag, className, content) {
|
|
301
258
|
let el = document.createElement(tag);
|
|
302
259
|
el.className = className;
|
|
303
|
-
if (
|
|
304
|
-
el.
|
|
305
|
-
} else if (
|
|
306
|
-
el.
|
|
260
|
+
if (typeof content == 'string') {
|
|
261
|
+
el.innerText = content;
|
|
262
|
+
} else if (content.domNodes) {
|
|
263
|
+
el.replaceChildren(...content.domNodes);
|
|
264
|
+
} else if (content.html) {
|
|
265
|
+
el.innerHTML = content.html;
|
|
307
266
|
}
|
|
308
267
|
return el;
|
|
309
268
|
}
|
|
@@ -505,10 +464,14 @@ function repositionEvent(chunk, longChunks, height) {
|
|
|
505
464
|
}
|
|
506
465
|
|
|
507
466
|
function createEventContent(chunk, displayEventEnd, eventContent, theme, _intlEventTime, _view) {
|
|
508
|
-
let timeText = _intlEventTime.
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
467
|
+
let timeText = _intlEventTime.formatRange(
|
|
468
|
+
chunk.start,
|
|
469
|
+
displayEventEnd && chunk.event.display !== 'pointer'
|
|
470
|
+
? copyTime(cloneDate(chunk.start), chunk.end) // make Intl.formatRange output only the time part
|
|
471
|
+
: chunk.start
|
|
472
|
+
);
|
|
473
|
+
let content;
|
|
474
|
+
|
|
512
475
|
if (eventContent) {
|
|
513
476
|
content = is_function(eventContent)
|
|
514
477
|
? eventContent({
|
|
@@ -524,14 +487,14 @@ function createEventContent(chunk, displayEventEnd, eventContent, theme, _intlEv
|
|
|
524
487
|
break;
|
|
525
488
|
case 'pointer':
|
|
526
489
|
content = {
|
|
527
|
-
domNodes: [createElement('div', theme.eventTime,
|
|
490
|
+
domNodes: [createElement('div', theme.eventTime, timeText)]
|
|
528
491
|
};
|
|
529
492
|
break;
|
|
530
493
|
default:
|
|
531
494
|
content = {
|
|
532
495
|
domNodes: [
|
|
533
|
-
...chunk.event.allDay ? [] : [createElement('div', theme.eventTime,
|
|
534
|
-
createElement('div', theme.eventTitle, chunk.event.
|
|
496
|
+
...chunk.event.allDay ? [] : [createElement('div', theme.eventTime, timeText)],
|
|
497
|
+
createElement('div', theme.eventTitle, chunk.event.title)
|
|
535
498
|
]
|
|
536
499
|
};
|
|
537
500
|
}
|
|
@@ -608,7 +571,7 @@ function pointerEvent(display) {
|
|
|
608
571
|
|
|
609
572
|
function writable2(value, parser, start) {
|
|
610
573
|
return {
|
|
611
|
-
...writable(
|
|
574
|
+
...writable(value, start),
|
|
612
575
|
parse: parser
|
|
613
576
|
};
|
|
614
577
|
}
|
|
@@ -647,12 +610,11 @@ function intl(locale, format) {
|
|
|
647
610
|
|
|
648
611
|
function intlRange(locale, format) {
|
|
649
612
|
return derived([locale, format], ([$locale, $format]) => {
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
let intl = new Intl.DateTimeFormat($locale, $format);
|
|
613
|
+
let intl = is_function($format)
|
|
614
|
+
? {formatRange: $format}
|
|
615
|
+
: new Intl.DateTimeFormat($locale, $format);
|
|
654
616
|
return {
|
|
655
|
-
|
|
617
|
+
formatRange: (start, end) => intl.formatRange(toLocalDate(start), toLocalDate(end))
|
|
656
618
|
};
|
|
657
619
|
});
|
|
658
620
|
}
|
|
@@ -807,7 +769,7 @@ function diff(options) {
|
|
|
807
769
|
}
|
|
808
770
|
|
|
809
771
|
function monthMode(state) {
|
|
810
|
-
return derived(state.view, $view => $view
|
|
772
|
+
return derived(state.view, $view => $view?.startsWith('dayGrid'));
|
|
811
773
|
}
|
|
812
774
|
|
|
813
775
|
function activeRange(state) {
|
|
@@ -880,11 +842,11 @@ function viewDates(state) {
|
|
|
880
842
|
|
|
881
843
|
function viewTitle(state) {
|
|
882
844
|
return derived(
|
|
883
|
-
[state.date, state._activeRange, state.
|
|
884
|
-
([$date, $_activeRange, $
|
|
845
|
+
[state.date, state._activeRange, state._intlTitle, state._monthMode],
|
|
846
|
+
([$date, $_activeRange, $_intlTitle, $_monthMode]) => {
|
|
885
847
|
return $_monthMode
|
|
886
|
-
? $
|
|
887
|
-
: $
|
|
848
|
+
? $_intlTitle.formatRange($date, $date)
|
|
849
|
+
: $_intlTitle.formatRange($_activeRange.start, subtractDay(cloneDate($_activeRange.end)));
|
|
888
850
|
}
|
|
889
851
|
);
|
|
890
852
|
}
|
|
@@ -1000,9 +962,13 @@ class State {
|
|
|
1000
962
|
plugins = plugins || [];
|
|
1001
963
|
|
|
1002
964
|
// Create options
|
|
1003
|
-
let options
|
|
965
|
+
let options= createOptions(plugins);
|
|
1004
966
|
let parsers = createParsers(options, plugins);
|
|
1005
967
|
|
|
968
|
+
// Parse options
|
|
969
|
+
options = parseOpts(options, parsers);
|
|
970
|
+
input = parseOpts(input, parsers);
|
|
971
|
+
|
|
1006
972
|
// Create stores for options
|
|
1007
973
|
for (let [option, value] of Object.entries(options)) {
|
|
1008
974
|
this[option] = writable2(value, parsers[option]);
|
|
@@ -1018,10 +984,10 @@ class State {
|
|
|
1018
984
|
this._events = events(this);
|
|
1019
985
|
this._now = now();
|
|
1020
986
|
this._today = today(this);
|
|
1021
|
-
this._intlEventTime =
|
|
987
|
+
this._intlEventTime = intlRange(this.locale, this.eventTimeFormat);
|
|
1022
988
|
this._intlSlotLabel = intl(this.locale, this.slotLabelFormat);
|
|
1023
989
|
this._intlDayHeader = intl(this.locale, this.dayHeaderFormat);
|
|
1024
|
-
this.
|
|
990
|
+
this._intlTitle = intlRange(this.locale, this.titleFormat);
|
|
1025
991
|
this._bodyEl = writable(undefined);
|
|
1026
992
|
this._scrollable = writable(false);
|
|
1027
993
|
this._viewTitle = viewTitle(this);
|
|
@@ -1049,13 +1015,9 @@ class State {
|
|
|
1049
1015
|
}
|
|
1050
1016
|
|
|
1051
1017
|
// Set options for each view
|
|
1052
|
-
let
|
|
1053
|
-
parseOpts(commonOpts, this);
|
|
1054
|
-
let views = new Set([...Object.keys(options.views), ...Object.keys(input.views || {})]);
|
|
1018
|
+
let views = new Set([...keys(options.views), ...keys(input.views ?? {})]);
|
|
1055
1019
|
for (let view of views) {
|
|
1056
|
-
let
|
|
1057
|
-
parseOpts(viewOpts, this);
|
|
1058
|
-
let opts = assign({}, commonOpts, viewOpts);
|
|
1020
|
+
let opts = assign({}, options, options.views[view] ?? {}, input, input.views?.[view] ?? {});
|
|
1059
1021
|
// Change view component when view changes
|
|
1060
1022
|
this.view.subscribe(newView => {
|
|
1061
1023
|
if (newView === view) {
|
|
@@ -1066,7 +1028,7 @@ class State {
|
|
|
1066
1028
|
}
|
|
1067
1029
|
});
|
|
1068
1030
|
// Process options
|
|
1069
|
-
for (let key of
|
|
1031
|
+
for (let key of keys(opts)) {
|
|
1070
1032
|
if (this.hasOwnProperty(key) && key[0] !== '_') {
|
|
1071
1033
|
let {set, _set, ...rest} = this[key];
|
|
1072
1034
|
|
|
@@ -1094,17 +1056,20 @@ class State {
|
|
|
1094
1056
|
}
|
|
1095
1057
|
}
|
|
1096
1058
|
|
|
1097
|
-
function parseOpts(opts,
|
|
1098
|
-
|
|
1099
|
-
|
|
1100
|
-
|
|
1101
|
-
|
|
1102
|
-
|
|
1059
|
+
function parseOpts(opts, parsers) {
|
|
1060
|
+
let result = {};
|
|
1061
|
+
for (let key of keys(opts)) {
|
|
1062
|
+
result[key] = parsers[key] ? parsers[key](opts[key]) : opts[key];
|
|
1063
|
+
}
|
|
1064
|
+
if (opts.views) {
|
|
1065
|
+
for (let view of keys(opts.views)) {
|
|
1066
|
+
result.views[view] = parseOpts(opts.views[view], parsers);
|
|
1103
1067
|
}
|
|
1104
1068
|
}
|
|
1069
|
+
return result;
|
|
1105
1070
|
}
|
|
1106
1071
|
|
|
1107
|
-
/* packages/core/src/Buttons.svelte generated by Svelte
|
|
1072
|
+
/* packages/core/src/Buttons.svelte generated by Svelte v4.1.1 */
|
|
1108
1073
|
|
|
1109
1074
|
function get_each_context$2(ctx, list, i) {
|
|
1110
1075
|
const child_ctx = ctx.slice();
|
|
@@ -1112,12 +1077,12 @@ function get_each_context$2(ctx, list, i) {
|
|
|
1112
1077
|
return child_ctx;
|
|
1113
1078
|
}
|
|
1114
1079
|
|
|
1115
|
-
// (38:
|
|
1116
|
-
function
|
|
1117
|
-
let
|
|
1080
|
+
// (38:27)
|
|
1081
|
+
function create_if_block_4(ctx) {
|
|
1082
|
+
let button_1;
|
|
1118
1083
|
let t_value = /*$buttonText*/ ctx[5][/*button*/ ctx[23]] + "";
|
|
1119
1084
|
let t;
|
|
1120
|
-
let
|
|
1085
|
+
let button_1_class_value;
|
|
1121
1086
|
let mounted;
|
|
1122
1087
|
let dispose;
|
|
1123
1088
|
|
|
@@ -1127,19 +1092,19 @@ function create_else_block$1(ctx) {
|
|
|
1127
1092
|
|
|
1128
1093
|
return {
|
|
1129
1094
|
c() {
|
|
1130
|
-
|
|
1095
|
+
button_1 = element("button");
|
|
1131
1096
|
t = text(t_value);
|
|
1132
1097
|
|
|
1133
|
-
attr(
|
|
1098
|
+
attr(button_1, "class", button_1_class_value = "" + (/*$theme*/ ctx[3].button + (/*$view*/ ctx[6] === /*button*/ ctx[23]
|
|
1134
1099
|
? ' ' + /*$theme*/ ctx[3].active
|
|
1135
1100
|
: '') + " ec-" + /*button*/ ctx[23]));
|
|
1136
1101
|
},
|
|
1137
1102
|
m(target, anchor) {
|
|
1138
|
-
insert(target,
|
|
1139
|
-
append(
|
|
1103
|
+
insert(target, button_1, anchor);
|
|
1104
|
+
append(button_1, t);
|
|
1140
1105
|
|
|
1141
1106
|
if (!mounted) {
|
|
1142
|
-
dispose = listen(
|
|
1107
|
+
dispose = listen(button_1, "click", click_handler_1);
|
|
1143
1108
|
mounted = true;
|
|
1144
1109
|
}
|
|
1145
1110
|
},
|
|
@@ -1147,86 +1112,94 @@ function create_else_block$1(ctx) {
|
|
|
1147
1112
|
ctx = new_ctx;
|
|
1148
1113
|
if (dirty & /*$buttonText, buttons*/ 33 && t_value !== (t_value = /*$buttonText*/ ctx[5][/*button*/ ctx[23]] + "")) set_data(t, t_value);
|
|
1149
1114
|
|
|
1150
|
-
if (dirty & /*$theme, $view, buttons*/ 73 &&
|
|
1115
|
+
if (dirty & /*$theme, $view, buttons*/ 73 && button_1_class_value !== (button_1_class_value = "" + (/*$theme*/ ctx[3].button + (/*$view*/ ctx[6] === /*button*/ ctx[23]
|
|
1151
1116
|
? ' ' + /*$theme*/ ctx[3].active
|
|
1152
1117
|
: '') + " ec-" + /*button*/ ctx[23]))) {
|
|
1153
|
-
attr(
|
|
1118
|
+
attr(button_1, "class", button_1_class_value);
|
|
1154
1119
|
}
|
|
1155
1120
|
},
|
|
1156
1121
|
d(detaching) {
|
|
1157
|
-
if (detaching)
|
|
1122
|
+
if (detaching) {
|
|
1123
|
+
detach(button_1);
|
|
1124
|
+
}
|
|
1125
|
+
|
|
1158
1126
|
mounted = false;
|
|
1159
1127
|
dispose();
|
|
1160
1128
|
}
|
|
1161
1129
|
};
|
|
1162
1130
|
}
|
|
1163
1131
|
|
|
1164
|
-
// (36:
|
|
1165
|
-
function
|
|
1166
|
-
let
|
|
1132
|
+
// (36:32)
|
|
1133
|
+
function create_if_block_3(ctx) {
|
|
1134
|
+
let button_1;
|
|
1167
1135
|
let t_value = /*$buttonText*/ ctx[5][/*button*/ ctx[23]] + "";
|
|
1168
1136
|
let t;
|
|
1169
|
-
let
|
|
1137
|
+
let button_1_class_value;
|
|
1170
1138
|
let mounted;
|
|
1171
1139
|
let dispose;
|
|
1172
1140
|
|
|
1173
1141
|
return {
|
|
1174
1142
|
c() {
|
|
1175
|
-
|
|
1143
|
+
button_1 = element("button");
|
|
1176
1144
|
t = text(t_value);
|
|
1177
|
-
attr(
|
|
1178
|
-
|
|
1145
|
+
attr(button_1, "class", button_1_class_value = "" + (/*$theme*/ ctx[3].button + " ec-" + /*button*/ ctx[23]));
|
|
1146
|
+
button_1.disabled = /*isToday*/ ctx[1];
|
|
1179
1147
|
},
|
|
1180
1148
|
m(target, anchor) {
|
|
1181
|
-
insert(target,
|
|
1182
|
-
append(
|
|
1149
|
+
insert(target, button_1, anchor);
|
|
1150
|
+
append(button_1, t);
|
|
1183
1151
|
|
|
1184
1152
|
if (!mounted) {
|
|
1185
|
-
dispose = listen(
|
|
1153
|
+
dispose = listen(button_1, "click", /*click_handler*/ ctx[19]);
|
|
1186
1154
|
mounted = true;
|
|
1187
1155
|
}
|
|
1188
1156
|
},
|
|
1189
1157
|
p(ctx, dirty) {
|
|
1190
1158
|
if (dirty & /*$buttonText, buttons*/ 33 && t_value !== (t_value = /*$buttonText*/ ctx[5][/*button*/ ctx[23]] + "")) set_data(t, t_value);
|
|
1191
1159
|
|
|
1192
|
-
if (dirty & /*$theme, buttons*/ 9 &&
|
|
1193
|
-
attr(
|
|
1160
|
+
if (dirty & /*$theme, buttons*/ 9 && button_1_class_value !== (button_1_class_value = "" + (/*$theme*/ ctx[3].button + " ec-" + /*button*/ ctx[23]))) {
|
|
1161
|
+
attr(button_1, "class", button_1_class_value);
|
|
1194
1162
|
}
|
|
1195
1163
|
|
|
1196
1164
|
if (dirty & /*isToday*/ 2) {
|
|
1197
|
-
|
|
1165
|
+
button_1.disabled = /*isToday*/ ctx[1];
|
|
1198
1166
|
}
|
|
1199
1167
|
},
|
|
1200
1168
|
d(detaching) {
|
|
1201
|
-
if (detaching)
|
|
1169
|
+
if (detaching) {
|
|
1170
|
+
detach(button_1);
|
|
1171
|
+
}
|
|
1172
|
+
|
|
1202
1173
|
mounted = false;
|
|
1203
1174
|
dispose();
|
|
1204
1175
|
}
|
|
1205
1176
|
};
|
|
1206
1177
|
}
|
|
1207
1178
|
|
|
1208
|
-
// (34:
|
|
1209
|
-
function
|
|
1210
|
-
let
|
|
1179
|
+
// (34:31)
|
|
1180
|
+
function create_if_block_2(ctx) {
|
|
1181
|
+
let button_1;
|
|
1211
1182
|
let i;
|
|
1212
1183
|
let i_class_value;
|
|
1213
|
-
let
|
|
1184
|
+
let button_1_class_value;
|
|
1185
|
+
let button_1_aria_label_value;
|
|
1214
1186
|
let mounted;
|
|
1215
1187
|
let dispose;
|
|
1216
1188
|
|
|
1217
1189
|
return {
|
|
1218
1190
|
c() {
|
|
1219
|
-
|
|
1191
|
+
button_1 = element("button");
|
|
1220
1192
|
i = element("i");
|
|
1221
1193
|
attr(i, "class", i_class_value = "" + (/*$theme*/ ctx[3].icon + " ec-" + /*button*/ ctx[23]));
|
|
1222
|
-
attr(
|
|
1194
|
+
attr(button_1, "class", button_1_class_value = "" + (/*$theme*/ ctx[3].button + " ec-" + /*button*/ ctx[23]));
|
|
1195
|
+
attr(button_1, "aria-label", button_1_aria_label_value = /*$buttonText*/ ctx[5].next);
|
|
1223
1196
|
},
|
|
1224
1197
|
m(target, anchor) {
|
|
1225
|
-
insert(target,
|
|
1226
|
-
append(
|
|
1198
|
+
insert(target, button_1, anchor);
|
|
1199
|
+
append(button_1, i);
|
|
1227
1200
|
|
|
1228
1201
|
if (!mounted) {
|
|
1229
|
-
dispose = listen(
|
|
1202
|
+
dispose = listen(button_1, "click", /*next*/ ctx[17]);
|
|
1230
1203
|
mounted = true;
|
|
1231
1204
|
}
|
|
1232
1205
|
},
|
|
@@ -1235,12 +1208,19 @@ function create_if_block_3(ctx) {
|
|
|
1235
1208
|
attr(i, "class", i_class_value);
|
|
1236
1209
|
}
|
|
1237
1210
|
|
|
1238
|
-
if (dirty & /*$theme, buttons*/ 9 &&
|
|
1239
|
-
attr(
|
|
1211
|
+
if (dirty & /*$theme, buttons*/ 9 && button_1_class_value !== (button_1_class_value = "" + (/*$theme*/ ctx[3].button + " ec-" + /*button*/ ctx[23]))) {
|
|
1212
|
+
attr(button_1, "class", button_1_class_value);
|
|
1213
|
+
}
|
|
1214
|
+
|
|
1215
|
+
if (dirty & /*$buttonText*/ 32 && button_1_aria_label_value !== (button_1_aria_label_value = /*$buttonText*/ ctx[5].next)) {
|
|
1216
|
+
attr(button_1, "aria-label", button_1_aria_label_value);
|
|
1240
1217
|
}
|
|
1241
1218
|
},
|
|
1242
1219
|
d(detaching) {
|
|
1243
|
-
if (detaching)
|
|
1220
|
+
if (detaching) {
|
|
1221
|
+
detach(button_1);
|
|
1222
|
+
}
|
|
1223
|
+
|
|
1244
1224
|
mounted = false;
|
|
1245
1225
|
dispose();
|
|
1246
1226
|
}
|
|
@@ -1248,27 +1228,29 @@ function create_if_block_3(ctx) {
|
|
|
1248
1228
|
}
|
|
1249
1229
|
|
|
1250
1230
|
// (32:31)
|
|
1251
|
-
function
|
|
1252
|
-
let
|
|
1231
|
+
function create_if_block_1(ctx) {
|
|
1232
|
+
let button_1;
|
|
1253
1233
|
let i;
|
|
1254
1234
|
let i_class_value;
|
|
1255
|
-
let
|
|
1235
|
+
let button_1_class_value;
|
|
1236
|
+
let button_1_aria_label_value;
|
|
1256
1237
|
let mounted;
|
|
1257
1238
|
let dispose;
|
|
1258
1239
|
|
|
1259
1240
|
return {
|
|
1260
1241
|
c() {
|
|
1261
|
-
|
|
1242
|
+
button_1 = element("button");
|
|
1262
1243
|
i = element("i");
|
|
1263
1244
|
attr(i, "class", i_class_value = "" + (/*$theme*/ ctx[3].icon + " ec-" + /*button*/ ctx[23]));
|
|
1264
|
-
attr(
|
|
1245
|
+
attr(button_1, "class", button_1_class_value = "" + (/*$theme*/ ctx[3].button + " ec-" + /*button*/ ctx[23]));
|
|
1246
|
+
attr(button_1, "aria-label", button_1_aria_label_value = /*$buttonText*/ ctx[5].prev);
|
|
1265
1247
|
},
|
|
1266
1248
|
m(target, anchor) {
|
|
1267
|
-
insert(target,
|
|
1268
|
-
append(
|
|
1249
|
+
insert(target, button_1, anchor);
|
|
1250
|
+
append(button_1, i);
|
|
1269
1251
|
|
|
1270
1252
|
if (!mounted) {
|
|
1271
|
-
dispose = listen(
|
|
1253
|
+
dispose = listen(button_1, "click", /*prev*/ ctx[16]);
|
|
1272
1254
|
mounted = true;
|
|
1273
1255
|
}
|
|
1274
1256
|
},
|
|
@@ -1277,83 +1259,94 @@ function create_if_block_2(ctx) {
|
|
|
1277
1259
|
attr(i, "class", i_class_value);
|
|
1278
1260
|
}
|
|
1279
1261
|
|
|
1280
|
-
if (dirty & /*$theme, buttons*/ 9 &&
|
|
1281
|
-
attr(
|
|
1262
|
+
if (dirty & /*$theme, buttons*/ 9 && button_1_class_value !== (button_1_class_value = "" + (/*$theme*/ ctx[3].button + " ec-" + /*button*/ ctx[23]))) {
|
|
1263
|
+
attr(button_1, "class", button_1_class_value);
|
|
1264
|
+
}
|
|
1265
|
+
|
|
1266
|
+
if (dirty & /*$buttonText*/ 32 && button_1_aria_label_value !== (button_1_aria_label_value = /*$buttonText*/ ctx[5].prev)) {
|
|
1267
|
+
attr(button_1, "aria-label", button_1_aria_label_value);
|
|
1282
1268
|
}
|
|
1283
1269
|
},
|
|
1284
1270
|
d(detaching) {
|
|
1285
|
-
if (detaching)
|
|
1271
|
+
if (detaching) {
|
|
1272
|
+
detach(button_1);
|
|
1273
|
+
}
|
|
1274
|
+
|
|
1286
1275
|
mounted = false;
|
|
1287
1276
|
dispose();
|
|
1288
1277
|
}
|
|
1289
1278
|
};
|
|
1290
1279
|
}
|
|
1291
1280
|
|
|
1292
|
-
// (
|
|
1293
|
-
function
|
|
1281
|
+
// (29:4) {#if button == 'title'}
|
|
1282
|
+
function create_if_block$1(ctx) {
|
|
1294
1283
|
let h2;
|
|
1295
|
-
let t;
|
|
1296
1284
|
let h2_class_value;
|
|
1285
|
+
let setContent_action;
|
|
1286
|
+
let mounted;
|
|
1287
|
+
let dispose;
|
|
1297
1288
|
|
|
1298
1289
|
return {
|
|
1299
1290
|
c() {
|
|
1300
1291
|
h2 = element("h2");
|
|
1301
|
-
t = text(/*$_viewTitle*/ ctx[4]);
|
|
1302
1292
|
attr(h2, "class", h2_class_value = /*$theme*/ ctx[3].title);
|
|
1303
1293
|
},
|
|
1304
1294
|
m(target, anchor) {
|
|
1305
1295
|
insert(target, h2, anchor);
|
|
1306
|
-
|
|
1296
|
+
|
|
1297
|
+
if (!mounted) {
|
|
1298
|
+
dispose = action_destroyer(setContent_action = setContent.call(null, h2, /*$_viewTitle*/ ctx[4]));
|
|
1299
|
+
mounted = true;
|
|
1300
|
+
}
|
|
1307
1301
|
},
|
|
1308
1302
|
p(ctx, dirty) {
|
|
1309
|
-
if (dirty & /*$_viewTitle*/ 16) set_data(t, /*$_viewTitle*/ ctx[4]);
|
|
1310
|
-
|
|
1311
1303
|
if (dirty & /*$theme*/ 8 && h2_class_value !== (h2_class_value = /*$theme*/ ctx[3].title)) {
|
|
1312
1304
|
attr(h2, "class", h2_class_value);
|
|
1313
1305
|
}
|
|
1306
|
+
|
|
1307
|
+
if (setContent_action && is_function(setContent_action.update) && dirty & /*$_viewTitle*/ 16) setContent_action.update.call(null, /*$_viewTitle*/ ctx[4]);
|
|
1314
1308
|
},
|
|
1315
1309
|
d(detaching) {
|
|
1316
|
-
if (detaching)
|
|
1310
|
+
if (detaching) {
|
|
1311
|
+
detach(h2);
|
|
1312
|
+
}
|
|
1313
|
+
|
|
1314
|
+
mounted = false;
|
|
1315
|
+
dispose();
|
|
1317
1316
|
}
|
|
1318
1317
|
};
|
|
1319
1318
|
}
|
|
1320
1319
|
|
|
1321
|
-
// (29:4) {#if button == ''}
|
|
1322
|
-
function create_if_block$1(ctx) {
|
|
1323
|
-
return { c: noop, m: noop, p: noop, d: noop };
|
|
1324
|
-
}
|
|
1325
|
-
|
|
1326
1320
|
// (28:0) {#each buttons as button}
|
|
1327
1321
|
function create_each_block$2(ctx) {
|
|
1328
1322
|
let if_block_anchor;
|
|
1329
1323
|
|
|
1330
1324
|
function select_block_type(ctx, dirty) {
|
|
1331
|
-
if (/*button*/ ctx[23] == '') return create_if_block$1;
|
|
1332
|
-
if (/*button*/ ctx[23] == '
|
|
1333
|
-
if (/*button*/ ctx[23] == '
|
|
1334
|
-
if (/*button*/ ctx[23]
|
|
1335
|
-
if (/*button*/ ctx[23]
|
|
1336
|
-
return create_else_block$1;
|
|
1325
|
+
if (/*button*/ ctx[23] == 'title') return create_if_block$1;
|
|
1326
|
+
if (/*button*/ ctx[23] == 'prev') return create_if_block_1;
|
|
1327
|
+
if (/*button*/ ctx[23] == 'next') return create_if_block_2;
|
|
1328
|
+
if (/*button*/ ctx[23] == 'today') return create_if_block_3;
|
|
1329
|
+
if (/*button*/ ctx[23] != '') return create_if_block_4;
|
|
1337
1330
|
}
|
|
1338
1331
|
|
|
1339
1332
|
let current_block_type = select_block_type(ctx);
|
|
1340
|
-
let if_block = current_block_type(ctx);
|
|
1333
|
+
let if_block = current_block_type && current_block_type(ctx);
|
|
1341
1334
|
|
|
1342
1335
|
return {
|
|
1343
1336
|
c() {
|
|
1344
|
-
if_block.c();
|
|
1337
|
+
if (if_block) if_block.c();
|
|
1345
1338
|
if_block_anchor = empty();
|
|
1346
1339
|
},
|
|
1347
1340
|
m(target, anchor) {
|
|
1348
|
-
if_block.m(target, anchor);
|
|
1341
|
+
if (if_block) if_block.m(target, anchor);
|
|
1349
1342
|
insert(target, if_block_anchor, anchor);
|
|
1350
1343
|
},
|
|
1351
1344
|
p(ctx, dirty) {
|
|
1352
1345
|
if (current_block_type === (current_block_type = select_block_type(ctx)) && if_block) {
|
|
1353
1346
|
if_block.p(ctx, dirty);
|
|
1354
1347
|
} else {
|
|
1355
|
-
if_block.d(1);
|
|
1356
|
-
if_block = current_block_type(ctx);
|
|
1348
|
+
if (if_block) if_block.d(1);
|
|
1349
|
+
if_block = current_block_type && current_block_type(ctx);
|
|
1357
1350
|
|
|
1358
1351
|
if (if_block) {
|
|
1359
1352
|
if_block.c();
|
|
@@ -1362,15 +1355,20 @@ function create_each_block$2(ctx) {
|
|
|
1362
1355
|
}
|
|
1363
1356
|
},
|
|
1364
1357
|
d(detaching) {
|
|
1365
|
-
|
|
1366
|
-
|
|
1358
|
+
if (detaching) {
|
|
1359
|
+
detach(if_block_anchor);
|
|
1360
|
+
}
|
|
1361
|
+
|
|
1362
|
+
if (if_block) {
|
|
1363
|
+
if_block.d(detaching);
|
|
1364
|
+
}
|
|
1367
1365
|
}
|
|
1368
1366
|
};
|
|
1369
1367
|
}
|
|
1370
1368
|
|
|
1371
1369
|
function create_fragment$3(ctx) {
|
|
1372
1370
|
let each_1_anchor;
|
|
1373
|
-
let each_value = /*buttons*/ ctx[0];
|
|
1371
|
+
let each_value = ensure_array_like(/*buttons*/ ctx[0]);
|
|
1374
1372
|
let each_blocks = [];
|
|
1375
1373
|
|
|
1376
1374
|
for (let i = 0; i < each_value.length; i += 1) {
|
|
@@ -1395,8 +1393,8 @@ function create_fragment$3(ctx) {
|
|
|
1395
1393
|
insert(target, each_1_anchor, anchor);
|
|
1396
1394
|
},
|
|
1397
1395
|
p(ctx, [dirty]) {
|
|
1398
|
-
if (dirty &
|
|
1399
|
-
each_value = /*buttons*/ ctx[0];
|
|
1396
|
+
if (dirty & /*$theme, $_viewTitle, buttons, $buttonText, prev, next, isToday, $date, today, $view*/ 229503) {
|
|
1397
|
+
each_value = ensure_array_like(/*buttons*/ ctx[0]);
|
|
1400
1398
|
let i;
|
|
1401
1399
|
|
|
1402
1400
|
for (i = 0; i < each_value.length; i += 1) {
|
|
@@ -1421,8 +1419,11 @@ function create_fragment$3(ctx) {
|
|
|
1421
1419
|
i: noop,
|
|
1422
1420
|
o: noop,
|
|
1423
1421
|
d(detaching) {
|
|
1422
|
+
if (detaching) {
|
|
1423
|
+
detach(each_1_anchor);
|
|
1424
|
+
}
|
|
1425
|
+
|
|
1424
1426
|
destroy_each(each_blocks, detaching);
|
|
1425
|
-
if (detaching) detach(each_1_anchor);
|
|
1426
1427
|
}
|
|
1427
1428
|
};
|
|
1428
1429
|
}
|
|
@@ -1509,7 +1510,7 @@ class Buttons extends SvelteComponent {
|
|
|
1509
1510
|
}
|
|
1510
1511
|
}
|
|
1511
1512
|
|
|
1512
|
-
/* packages/core/src/Toolbar.svelte generated by Svelte
|
|
1513
|
+
/* packages/core/src/Toolbar.svelte generated by Svelte v4.1.1 */
|
|
1513
1514
|
|
|
1514
1515
|
function get_each_context$1(ctx, list, i) {
|
|
1515
1516
|
const child_ctx = ctx.slice();
|
|
@@ -1525,34 +1526,34 @@ function get_each_context_1(ctx, list, i) {
|
|
|
1525
1526
|
|
|
1526
1527
|
// (28:16) {:else}
|
|
1527
1528
|
function create_else_block(ctx) {
|
|
1528
|
-
let
|
|
1529
|
+
let buttons_1;
|
|
1529
1530
|
let current;
|
|
1530
|
-
|
|
1531
|
+
buttons_1 = new Buttons({ props: { buttons: /*buttons*/ ctx[8] } });
|
|
1531
1532
|
|
|
1532
1533
|
return {
|
|
1533
1534
|
c() {
|
|
1534
|
-
create_component(
|
|
1535
|
+
create_component(buttons_1.$$.fragment);
|
|
1535
1536
|
},
|
|
1536
1537
|
m(target, anchor) {
|
|
1537
|
-
mount_component(
|
|
1538
|
+
mount_component(buttons_1, target, anchor);
|
|
1538
1539
|
current = true;
|
|
1539
1540
|
},
|
|
1540
1541
|
p(ctx, dirty) {
|
|
1541
|
-
const
|
|
1542
|
-
if (dirty & /*sections*/ 1)
|
|
1543
|
-
|
|
1542
|
+
const buttons_1_changes = {};
|
|
1543
|
+
if (dirty & /*sections*/ 1) buttons_1_changes.buttons = /*buttons*/ ctx[8];
|
|
1544
|
+
buttons_1.$set(buttons_1_changes);
|
|
1544
1545
|
},
|
|
1545
1546
|
i(local) {
|
|
1546
1547
|
if (current) return;
|
|
1547
|
-
transition_in(
|
|
1548
|
+
transition_in(buttons_1.$$.fragment, local);
|
|
1548
1549
|
current = true;
|
|
1549
1550
|
},
|
|
1550
1551
|
o(local) {
|
|
1551
|
-
transition_out(
|
|
1552
|
+
transition_out(buttons_1.$$.fragment, local);
|
|
1552
1553
|
current = false;
|
|
1553
1554
|
},
|
|
1554
1555
|
d(detaching) {
|
|
1555
|
-
destroy_component(
|
|
1556
|
+
destroy_component(buttons_1, detaching);
|
|
1556
1557
|
}
|
|
1557
1558
|
};
|
|
1558
1559
|
}
|
|
@@ -1560,26 +1561,26 @@ function create_else_block(ctx) {
|
|
|
1560
1561
|
// (24:16) {#if buttons.length > 1}
|
|
1561
1562
|
function create_if_block(ctx) {
|
|
1562
1563
|
let div;
|
|
1563
|
-
let
|
|
1564
|
+
let buttons_1;
|
|
1564
1565
|
let div_class_value;
|
|
1565
1566
|
let current;
|
|
1566
|
-
|
|
1567
|
+
buttons_1 = new Buttons({ props: { buttons: /*buttons*/ ctx[8] } });
|
|
1567
1568
|
|
|
1568
1569
|
return {
|
|
1569
1570
|
c() {
|
|
1570
1571
|
div = element("div");
|
|
1571
|
-
create_component(
|
|
1572
|
+
create_component(buttons_1.$$.fragment);
|
|
1572
1573
|
attr(div, "class", div_class_value = /*$theme*/ ctx[1].buttonGroup);
|
|
1573
1574
|
},
|
|
1574
1575
|
m(target, anchor) {
|
|
1575
1576
|
insert(target, div, anchor);
|
|
1576
|
-
mount_component(
|
|
1577
|
+
mount_component(buttons_1, div, null);
|
|
1577
1578
|
current = true;
|
|
1578
1579
|
},
|
|
1579
1580
|
p(ctx, dirty) {
|
|
1580
|
-
const
|
|
1581
|
-
if (dirty & /*sections*/ 1)
|
|
1582
|
-
|
|
1581
|
+
const buttons_1_changes = {};
|
|
1582
|
+
if (dirty & /*sections*/ 1) buttons_1_changes.buttons = /*buttons*/ ctx[8];
|
|
1583
|
+
buttons_1.$set(buttons_1_changes);
|
|
1583
1584
|
|
|
1584
1585
|
if (!current || dirty & /*$theme*/ 2 && div_class_value !== (div_class_value = /*$theme*/ ctx[1].buttonGroup)) {
|
|
1585
1586
|
attr(div, "class", div_class_value);
|
|
@@ -1587,16 +1588,19 @@ function create_if_block(ctx) {
|
|
|
1587
1588
|
},
|
|
1588
1589
|
i(local) {
|
|
1589
1590
|
if (current) return;
|
|
1590
|
-
transition_in(
|
|
1591
|
+
transition_in(buttons_1.$$.fragment, local);
|
|
1591
1592
|
current = true;
|
|
1592
1593
|
},
|
|
1593
1594
|
o(local) {
|
|
1594
|
-
transition_out(
|
|
1595
|
+
transition_out(buttons_1.$$.fragment, local);
|
|
1595
1596
|
current = false;
|
|
1596
1597
|
},
|
|
1597
1598
|
d(detaching) {
|
|
1598
|
-
if (detaching)
|
|
1599
|
-
|
|
1599
|
+
if (detaching) {
|
|
1600
|
+
detach(div);
|
|
1601
|
+
}
|
|
1602
|
+
|
|
1603
|
+
destroy_component(buttons_1);
|
|
1600
1604
|
}
|
|
1601
1605
|
};
|
|
1602
1606
|
}
|
|
@@ -1665,8 +1669,11 @@ function create_each_block_1(ctx) {
|
|
|
1665
1669
|
current = false;
|
|
1666
1670
|
},
|
|
1667
1671
|
d(detaching) {
|
|
1672
|
+
if (detaching) {
|
|
1673
|
+
detach(if_block_anchor);
|
|
1674
|
+
}
|
|
1675
|
+
|
|
1668
1676
|
if_blocks[current_block_type_index].d(detaching);
|
|
1669
|
-
if (detaching) detach(if_block_anchor);
|
|
1670
1677
|
}
|
|
1671
1678
|
};
|
|
1672
1679
|
}
|
|
@@ -1676,7 +1683,7 @@ function create_each_block$1(ctx) {
|
|
|
1676
1683
|
let div;
|
|
1677
1684
|
let t;
|
|
1678
1685
|
let current;
|
|
1679
|
-
let each_value_1 = /*sections*/ ctx[0][/*key*/ ctx[5]];
|
|
1686
|
+
let each_value_1 = ensure_array_like(/*sections*/ ctx[0][/*key*/ ctx[5]]);
|
|
1680
1687
|
let each_blocks = [];
|
|
1681
1688
|
|
|
1682
1689
|
for (let i = 0; i < each_value_1.length; i += 1) {
|
|
@@ -1711,7 +1718,7 @@ function create_each_block$1(ctx) {
|
|
|
1711
1718
|
},
|
|
1712
1719
|
p(ctx, dirty) {
|
|
1713
1720
|
if (dirty & /*$theme, sections, Object*/ 3) {
|
|
1714
|
-
each_value_1 = /*sections*/ ctx[0][/*key*/ ctx[5]];
|
|
1721
|
+
each_value_1 = ensure_array_like(/*sections*/ ctx[0][/*key*/ ctx[5]]);
|
|
1715
1722
|
let i;
|
|
1716
1723
|
|
|
1717
1724
|
for (i = 0; i < each_value_1.length; i += 1) {
|
|
@@ -1756,7 +1763,10 @@ function create_each_block$1(ctx) {
|
|
|
1756
1763
|
current = false;
|
|
1757
1764
|
},
|
|
1758
1765
|
d(detaching) {
|
|
1759
|
-
if (detaching)
|
|
1766
|
+
if (detaching) {
|
|
1767
|
+
detach(div);
|
|
1768
|
+
}
|
|
1769
|
+
|
|
1760
1770
|
destroy_each(each_blocks, detaching);
|
|
1761
1771
|
}
|
|
1762
1772
|
};
|
|
@@ -1766,7 +1776,7 @@ function create_fragment$2(ctx) {
|
|
|
1766
1776
|
let div;
|
|
1767
1777
|
let div_class_value;
|
|
1768
1778
|
let current;
|
|
1769
|
-
let each_value = Object.keys(/*sections*/ ctx[0]);
|
|
1779
|
+
let each_value = ensure_array_like(Object.keys(/*sections*/ ctx[0]));
|
|
1770
1780
|
let each_blocks = [];
|
|
1771
1781
|
|
|
1772
1782
|
for (let i = 0; i < each_value.length; i += 1) {
|
|
@@ -1800,7 +1810,7 @@ function create_fragment$2(ctx) {
|
|
|
1800
1810
|
},
|
|
1801
1811
|
p(ctx, [dirty]) {
|
|
1802
1812
|
if (dirty & /*sections, Object, $theme*/ 3) {
|
|
1803
|
-
each_value = Object.keys(/*sections*/ ctx[0]);
|
|
1813
|
+
each_value = ensure_array_like(Object.keys(/*sections*/ ctx[0]));
|
|
1804
1814
|
let i;
|
|
1805
1815
|
|
|
1806
1816
|
for (i = 0; i < each_value.length; i += 1) {
|
|
@@ -1849,7 +1859,10 @@ function create_fragment$2(ctx) {
|
|
|
1849
1859
|
current = false;
|
|
1850
1860
|
},
|
|
1851
1861
|
d(detaching) {
|
|
1852
|
-
if (detaching)
|
|
1862
|
+
if (detaching) {
|
|
1863
|
+
detach(div);
|
|
1864
|
+
}
|
|
1865
|
+
|
|
1853
1866
|
destroy_each(each_blocks, detaching);
|
|
1854
1867
|
}
|
|
1855
1868
|
};
|
|
@@ -1883,7 +1896,7 @@ class Toolbar extends SvelteComponent {
|
|
|
1883
1896
|
}
|
|
1884
1897
|
}
|
|
1885
1898
|
|
|
1886
|
-
/* packages/core/src/Auxiliary.svelte generated by Svelte
|
|
1899
|
+
/* packages/core/src/Auxiliary.svelte generated by Svelte v4.1.1 */
|
|
1887
1900
|
|
|
1888
1901
|
function get_each_context(ctx, list, i) {
|
|
1889
1902
|
const child_ctx = ctx.slice();
|
|
@@ -1898,7 +1911,7 @@ function create_each_block(ctx) {
|
|
|
1898
1911
|
let current;
|
|
1899
1912
|
var switch_value = /*component*/ ctx[11];
|
|
1900
1913
|
|
|
1901
|
-
function switch_props(ctx) {
|
|
1914
|
+
function switch_props(ctx, dirty) {
|
|
1902
1915
|
return {};
|
|
1903
1916
|
}
|
|
1904
1917
|
|
|
@@ -1949,7 +1962,10 @@ function create_each_block(ctx) {
|
|
|
1949
1962
|
current = false;
|
|
1950
1963
|
},
|
|
1951
1964
|
d(detaching) {
|
|
1952
|
-
if (detaching)
|
|
1965
|
+
if (detaching) {
|
|
1966
|
+
detach(switch_instance_anchor);
|
|
1967
|
+
}
|
|
1968
|
+
|
|
1953
1969
|
if (switch_instance) destroy_component(switch_instance, detaching);
|
|
1954
1970
|
}
|
|
1955
1971
|
};
|
|
@@ -1958,7 +1974,7 @@ function create_each_block(ctx) {
|
|
|
1958
1974
|
function create_fragment$1(ctx) {
|
|
1959
1975
|
let each_1_anchor;
|
|
1960
1976
|
let current;
|
|
1961
|
-
let each_value = /*$_auxiliary*/ ctx[0];
|
|
1977
|
+
let each_value = ensure_array_like(/*$_auxiliary*/ ctx[0]);
|
|
1962
1978
|
let each_blocks = [];
|
|
1963
1979
|
|
|
1964
1980
|
for (let i = 0; i < each_value.length; i += 1) {
|
|
@@ -1989,7 +2005,7 @@ function create_fragment$1(ctx) {
|
|
|
1989
2005
|
},
|
|
1990
2006
|
p(ctx, [dirty]) {
|
|
1991
2007
|
if (dirty & /*$_auxiliary*/ 1) {
|
|
1992
|
-
each_value = /*$_auxiliary*/ ctx[0];
|
|
2008
|
+
each_value = ensure_array_like(/*$_auxiliary*/ ctx[0]);
|
|
1993
2009
|
let i;
|
|
1994
2010
|
|
|
1995
2011
|
for (i = 0; i < each_value.length; i += 1) {
|
|
@@ -2034,8 +2050,11 @@ function create_fragment$1(ctx) {
|
|
|
2034
2050
|
current = false;
|
|
2035
2051
|
},
|
|
2036
2052
|
d(detaching) {
|
|
2053
|
+
if (detaching) {
|
|
2054
|
+
detach(each_1_anchor);
|
|
2055
|
+
}
|
|
2056
|
+
|
|
2037
2057
|
destroy_each(each_blocks, detaching);
|
|
2038
|
-
if (detaching) detach(each_1_anchor);
|
|
2039
2058
|
}
|
|
2040
2059
|
};
|
|
2041
2060
|
}
|
|
@@ -2085,7 +2104,7 @@ class Auxiliary extends SvelteComponent {
|
|
|
2085
2104
|
}
|
|
2086
2105
|
}
|
|
2087
2106
|
|
|
2088
|
-
/* packages/core/src/Calendar.svelte generated by Svelte
|
|
2107
|
+
/* packages/core/src/Calendar.svelte generated by Svelte v4.1.1 */
|
|
2089
2108
|
|
|
2090
2109
|
function create_fragment(ctx) {
|
|
2091
2110
|
let div;
|
|
@@ -2101,7 +2120,7 @@ function create_fragment(ctx) {
|
|
|
2101
2120
|
toolbar = new Toolbar({});
|
|
2102
2121
|
var switch_value = /*$_viewComponent*/ ctx[5];
|
|
2103
2122
|
|
|
2104
|
-
function switch_props(ctx) {
|
|
2123
|
+
function switch_props(ctx, dirty) {
|
|
2105
2124
|
return {};
|
|
2106
2125
|
}
|
|
2107
2126
|
|
|
@@ -2195,10 +2214,13 @@ function create_fragment(ctx) {
|
|
|
2195
2214
|
current = false;
|
|
2196
2215
|
},
|
|
2197
2216
|
d(detaching) {
|
|
2198
|
-
if (detaching)
|
|
2217
|
+
if (detaching) {
|
|
2218
|
+
detach(div);
|
|
2219
|
+
detach(t1);
|
|
2220
|
+
}
|
|
2221
|
+
|
|
2199
2222
|
destroy_component(toolbar);
|
|
2200
2223
|
if (switch_instance) destroy_component(switch_instance);
|
|
2201
|
-
if (detaching) detach(t1);
|
|
2202
2224
|
destroy_component(auxiliary, detaching);
|
|
2203
2225
|
mounted = false;
|
|
2204
2226
|
dispose();
|
|
@@ -2473,4 +2495,4 @@ class Calendar extends SvelteComponent {
|
|
|
2473
2495
|
}
|
|
2474
2496
|
}
|
|
2475
2497
|
|
|
2476
|
-
export { DAY_IN_SECONDS, addDay, addDuration, ancestor, assign, bgEvent, cloneDate, cloneEvent, createDate, createDuration, createElement, createEventChunk, createEventClasses, createEventContent, createEventSources, createEvents, createView, datesEqual, debounce, Calendar as default, derived2, eventIntersects, floor, flushDebounce,
|
|
2498
|
+
export { DAY_IN_SECONDS, addDay, addDuration, ancestor, assign, bgEvent, btnTextDay, btnTextMonth, btnTextWeek, btnTextYear, cloneDate, cloneEvent, copyTime, createDate, createDuration, createElement, createEventChunk, createEventClasses, createEventContent, createEventSources, createEvents, createView, datesEqual, debounce, Calendar as default, derived2, eventIntersects, floor, flushDebounce, getElementWithPayload, getPayload, ghostEvent, hasPayload, hasYScroll, height, helperEvent, intl, intlRange, keyEnter, keys, max, min, nextClosestDay, noTimePart, outsideEvent, pointerEvent, prepareEventChunks, prevClosestDay, previewEvent, rect, repositionEvent, setContent, setMidnight, setPayload, sortEventChunks, subtractDay, subtractDuration, symbol, toEventWithLocalDates, toISOString, toLocalDate, toViewWithLocalDates, writable2 };
|