@bagelink/vue 1.2.25 → 1.2.33
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/components/calendar/views/DayView.vue.d.ts.map +1 -1
- package/dist/components/calendar/views/MonthView.vue.d.ts +162 -2
- package/dist/components/calendar/views/MonthView.vue.d.ts.map +1 -1
- package/dist/components/calendar/views/WeekView.vue.d.ts +162 -2
- package/dist/components/calendar/views/WeekView.vue.d.ts.map +1 -1
- package/dist/index.cjs +19 -21
- package/dist/index.mjs +19 -21
- package/dist/style.css +70 -70
- package/dist/utils/calendar/dateUtils.d.ts +15 -9
- package/dist/utils/calendar/dateUtils.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/components/calendar/Index.vue +3 -3
- package/src/components/calendar/views/AgendaView.vue +1 -1
- package/src/components/calendar/views/DayView.vue +2 -1
- package/src/components/calendar/views/MonthView.vue +5 -4
- package/src/components/calendar/views/WeekView.vue +6 -5
- package/src/components/form/inputs/DateInput.vue +2 -2
- package/src/utils/calendar/dateUtils.ts +21 -27
package/dist/index.mjs
CHANGED
|
@@ -588,7 +588,7 @@ const _sfc_main$15 = /* @__PURE__ */ defineComponent({
|
|
|
588
588
|
onClick: withModifiers(($event) => emit2("eventClick", event), ["stop"])
|
|
589
589
|
}, [
|
|
590
590
|
createElementVNode("div", _hoisted_3$C, [
|
|
591
|
-
createElementVNode("div", _hoisted_4$p, toDisplayString(unref(formatDate)(event.start_time, "HH:mm")), 1),
|
|
591
|
+
createElementVNode("div", _hoisted_4$p, toDisplayString(unref(formatDate)(event.start_time, { fmt: "HH:mm" })), 1),
|
|
592
592
|
createElementVNode("div", _hoisted_5$o, [
|
|
593
593
|
createElementVNode("div", _hoisted_6$l, toDisplayString(event.title), 1),
|
|
594
594
|
createElementVNode("div", {
|
|
@@ -603,7 +603,7 @@ const _sfc_main$15 = /* @__PURE__ */ defineComponent({
|
|
|
603
603
|
};
|
|
604
604
|
}
|
|
605
605
|
});
|
|
606
|
-
const AgendaView = /* @__PURE__ */ _export_sfc(_sfc_main$15, [["__scopeId", "data-v-
|
|
606
|
+
const AgendaView = /* @__PURE__ */ _export_sfc(_sfc_main$15, [["__scopeId", "data-v-520aee85"]]);
|
|
607
607
|
function calculatePopoverPosition(target, popoverWidth = 300, popoverHeight = 150) {
|
|
608
608
|
const rect = target.getBoundingClientRect();
|
|
609
609
|
const { scrollY, scrollX, innerHeight, innerWidth } = window;
|
|
@@ -855,7 +855,7 @@ const _sfc_main$14 = /* @__PURE__ */ defineComponent({
|
|
|
855
855
|
};
|
|
856
856
|
}
|
|
857
857
|
});
|
|
858
|
-
const DayView = /* @__PURE__ */ _export_sfc(_sfc_main$14, [["__scopeId", "data-v-
|
|
858
|
+
const DayView = /* @__PURE__ */ _export_sfc(_sfc_main$14, [["__scopeId", "data-v-bc647d79"]]);
|
|
859
859
|
const _hoisted_1$V = { class: "month-view" };
|
|
860
860
|
const _hoisted_2$G = { class: "month-header" };
|
|
861
861
|
const _hoisted_3$A = { class: "month-grid" };
|
|
@@ -969,7 +969,7 @@ const _sfc_main$13 = /* @__PURE__ */ defineComponent({
|
|
|
969
969
|
"other-month": !day.isCurrentMonth
|
|
970
970
|
}])
|
|
971
971
|
}, [
|
|
972
|
-
createElementVNode("div", _hoisted_4$n, toDisplayString(unref(
|
|
972
|
+
createElementVNode("div", _hoisted_4$n, toDisplayString(unref(fmtDate)(day.date, { fmt: "DD" })), 1),
|
|
973
973
|
createElementVNode("div", _hoisted_5$m, [
|
|
974
974
|
isMobile.value ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
|
|
975
975
|
day.events.length > 0 ? (openBlock(), createElementBlock("div", _hoisted_6$j)) : createCommentVNode("", true)
|
|
@@ -981,7 +981,7 @@ const _sfc_main$13 = /* @__PURE__ */ defineComponent({
|
|
|
981
981
|
onClick: withModifiers(($event) => unref(slots).eventContent ? openPopover$1(event, $event) : emit2("eventClick", event), ["stop"])
|
|
982
982
|
}, [
|
|
983
983
|
createElementVNode("div", _hoisted_8$7, toDisplayString(event.title), 1),
|
|
984
|
-
createElementVNode("div", _hoisted_9$6, toDisplayString(unref(
|
|
984
|
+
createElementVNode("div", _hoisted_9$6, toDisplayString(unref(fmtDate)(event.start_time, { fmt: "HH:mm" })), 1)
|
|
985
985
|
], 12, _hoisted_7$f);
|
|
986
986
|
}), 128))
|
|
987
987
|
])
|
|
@@ -1011,7 +1011,7 @@ const _sfc_main$13 = /* @__PURE__ */ defineComponent({
|
|
|
1011
1011
|
};
|
|
1012
1012
|
}
|
|
1013
1013
|
});
|
|
1014
|
-
const MonthView = /* @__PURE__ */ _export_sfc(_sfc_main$13, [["__scopeId", "data-v-
|
|
1014
|
+
const MonthView = /* @__PURE__ */ _export_sfc(_sfc_main$13, [["__scopeId", "data-v-e972943e"]]);
|
|
1015
1015
|
const _hoisted_1$U = { class: "w-100p overflow-hidden m_overflow h-100p grid" };
|
|
1016
1016
|
const _hoisted_2$F = { class: "weekGrid border-bottom me-1" };
|
|
1017
1017
|
const _hoisted_3$z = { class: "overflow h-100p pe-05" };
|
|
@@ -1208,13 +1208,13 @@ const _sfc_main$12 = /* @__PURE__ */ defineComponent({
|
|
|
1208
1208
|
key: day.toISOString(),
|
|
1209
1209
|
class: "day-header p-05 txt-center"
|
|
1210
1210
|
}, [
|
|
1211
|
-
createTextVNode(toDisplayString(unref(
|
|
1211
|
+
createTextVNode(toDisplayString(unref(fmtDate)(day, { fmt: "DDD" })) + " ", 1),
|
|
1212
1212
|
createElementVNode("span", {
|
|
1213
1213
|
class: normalizeClass(["txt-12 round p-025", {
|
|
1214
1214
|
"color-gray": day.toDateString() !== (/* @__PURE__ */ new Date()).toDateString(),
|
|
1215
1215
|
"bg-primary color-white": day.toDateString() === (/* @__PURE__ */ new Date()).toDateString()
|
|
1216
1216
|
}])
|
|
1217
|
-
}, toDisplayString(unref(
|
|
1217
|
+
}, toDisplayString(unref(fmtDate)(day, { fmt: "DD" })), 3)
|
|
1218
1218
|
]);
|
|
1219
1219
|
}), 128))
|
|
1220
1220
|
]),
|
|
@@ -1260,7 +1260,7 @@ const _sfc_main$12 = /* @__PURE__ */ defineComponent({
|
|
|
1260
1260
|
}, [
|
|
1261
1261
|
createElementVNode("div", _hoisted_5$l, [
|
|
1262
1262
|
createElementVNode("div", _hoisted_6$i, toDisplayString(event.title), 1),
|
|
1263
|
-
createElementVNode("div", _hoisted_7$e, toDisplayString(unref(
|
|
1263
|
+
createElementVNode("div", _hoisted_7$e, toDisplayString(unref(fmtDate)(event.start_time, { fmt: "HH:mm" })), 1)
|
|
1264
1264
|
])
|
|
1265
1265
|
], 12, _hoisted_4$m);
|
|
1266
1266
|
}), 128))
|
|
@@ -1302,7 +1302,7 @@ const _sfc_main$12 = /* @__PURE__ */ defineComponent({
|
|
|
1302
1302
|
};
|
|
1303
1303
|
}
|
|
1304
1304
|
});
|
|
1305
|
-
const WeekView = /* @__PURE__ */ _export_sfc(_sfc_main$12, [["__scopeId", "data-v-
|
|
1305
|
+
const WeekView = /* @__PURE__ */ _export_sfc(_sfc_main$12, [["__scopeId", "data-v-c29ed3b2"]]);
|
|
1306
1306
|
const _hoisted_1$T = { class: "calendar" };
|
|
1307
1307
|
const _hoisted_2$E = { class: "flex m_block m_pb-1" };
|
|
1308
1308
|
const _hoisted_3$y = { class: "txt-light my-0" };
|
|
@@ -1370,8 +1370,8 @@ const _sfc_main$11 = /* @__PURE__ */ defineComponent({
|
|
|
1370
1370
|
return openBlock(), createElementBlock("div", _hoisted_1$T, [
|
|
1371
1371
|
createElementVNode("div", _hoisted_2$E, [
|
|
1372
1372
|
createElementVNode("h3", _hoisted_3$y, [
|
|
1373
|
-
createElementVNode("b", null, toDisplayString(unref(
|
|
1374
|
-
createTextVNode(" " + toDisplayString(unref(
|
|
1373
|
+
createElementVNode("b", null, toDisplayString(unref(fmtDate)(currentDate.value, { fmt: "MMMM" })), 1),
|
|
1374
|
+
createTextVNode(" " + toDisplayString(unref(fmtDate)(currentDate.value, { fmt: "YYYY" })), 1)
|
|
1375
1375
|
]),
|
|
1376
1376
|
createElementVNode("div", _hoisted_4$l, [
|
|
1377
1377
|
createVNode(unref(_sfc_main$W), {
|
|
@@ -1431,7 +1431,7 @@ const _sfc_main$11 = /* @__PURE__ */ defineComponent({
|
|
|
1431
1431
|
};
|
|
1432
1432
|
}
|
|
1433
1433
|
});
|
|
1434
|
-
const Index$1 = /* @__PURE__ */ _export_sfc(_sfc_main$11, [["__scopeId", "data-v-
|
|
1434
|
+
const Index$1 = /* @__PURE__ */ _export_sfc(_sfc_main$11, [["__scopeId", "data-v-98cddf40"]]);
|
|
1435
1435
|
const _hoisted_1$S = {
|
|
1436
1436
|
key: 0,
|
|
1437
1437
|
class: "card_label"
|
|
@@ -15125,7 +15125,7 @@ const _sfc_main$L = /* @__PURE__ */ defineComponent({
|
|
|
15125
15125
|
function useFormatting() {
|
|
15126
15126
|
const formatDisplayDate2 = (date2) => {
|
|
15127
15127
|
if (!date2) return "";
|
|
15128
|
-
return
|
|
15128
|
+
return fmtDate(date2, { fmt: props2.enableTime ? "DD.MM.YY HH:mm" : "DD.MM.YY" });
|
|
15129
15129
|
};
|
|
15130
15130
|
const parseUserInput2 = (input) => {
|
|
15131
15131
|
const date2 = new Date(input);
|
|
@@ -15273,7 +15273,7 @@ const _sfc_main$L = /* @__PURE__ */ defineComponent({
|
|
|
15273
15273
|
};
|
|
15274
15274
|
}
|
|
15275
15275
|
});
|
|
15276
|
-
const DateInput = /* @__PURE__ */ _export_sfc(_sfc_main$L, [["__scopeId", "data-v-
|
|
15276
|
+
const DateInput = /* @__PURE__ */ _export_sfc(_sfc_main$L, [["__scopeId", "data-v-a0f799e6"]]);
|
|
15277
15277
|
const _hoisted_1$D = { class: "bagel-input" };
|
|
15278
15278
|
const _hoisted_2$r = {
|
|
15279
15279
|
key: 0,
|
|
@@ -36412,12 +36412,13 @@ function getDatePartsMap(date2, locale2, timeZone) {
|
|
|
36412
36412
|
const _datePartsMapNow = getDatePartsMap(/* @__PURE__ */ new Date(), getBrowserNavigatorLocale());
|
|
36413
36413
|
const _orderedDateTokens = Object.keys(_datePartsMapNow).sort((a2, b2) => b2.length - a2.length);
|
|
36414
36414
|
const _tokenRegExPattern = new RegExp(_orderedDateTokens.map((token) => token).join("|"), "g");
|
|
36415
|
-
|
|
36415
|
+
function formatDate(date2, opts = {}) {
|
|
36416
|
+
let { fmt: format2, locale: locale2, tz: timeZone } = opts;
|
|
36416
36417
|
if (!date2) return "";
|
|
36417
36418
|
format2 = format2 || "DD.MM.YY";
|
|
36418
36419
|
locale2 = locale2 || getBrowserNavigatorLocale();
|
|
36419
36420
|
try {
|
|
36420
|
-
const d2 = typeof date2 === "string" ? new Date(date2) : date2;
|
|
36421
|
+
const d2 = typeof date2 === "string" || typeof date2 === "number" ? new Date(date2) : date2;
|
|
36421
36422
|
if (Number.isNaN(d2.getTime())) {
|
|
36422
36423
|
console.warn("Invalid date provided to formatDate:", date2);
|
|
36423
36424
|
return "";
|
|
@@ -36461,11 +36462,8 @@ const formatDate = (date2, format2, locale2, timeZone) => {
|
|
|
36461
36462
|
console.warn(`Error formatting date: ${date2} with format: ${format2}`, error);
|
|
36462
36463
|
return "";
|
|
36463
36464
|
}
|
|
36464
|
-
};
|
|
36465
|
-
function fmtDate(opts) {
|
|
36466
|
-
const { date: date2, format: format2, locale: locale2, timeZone } = opts;
|
|
36467
|
-
return formatDate(date2, format2, locale2, timeZone);
|
|
36468
36465
|
}
|
|
36466
|
+
const fmtDate = formatDate;
|
|
36469
36467
|
const IMAGE_FORMATS = ["jpeg", "png", "webp", "avif", "apng", "gif", "avifs", "svg", "bmp", "jpg", "heic", "heif", "ico", "cur", "tif", "tiff"];
|
|
36470
36468
|
const IMAGE_FORMATS_REGEXP = new RegExp(`(${IMAGE_FORMATS.join("|")})$`, "i");
|
|
36471
36469
|
const VIDEO_FORMATS = ["mp4", "webm", "ogg", "mov", "avi", "flv", "wmv", "mkv", "ts", "m3u8"];
|
package/dist/style.css
CHANGED
|
@@ -310,45 +310,45 @@ display: block;
|
|
|
310
310
|
border-radius: var(--input-border-radius);
|
|
311
311
|
}
|
|
312
312
|
|
|
313
|
-
.agenda-view[data-v-
|
|
313
|
+
.agenda-view[data-v-520aee85] {
|
|
314
314
|
display: flex;
|
|
315
315
|
flex-direction: column;
|
|
316
316
|
height: 100%;
|
|
317
317
|
overflow: hidden;
|
|
318
318
|
}
|
|
319
|
-
.agenda-header[data-v-
|
|
319
|
+
.agenda-header[data-v-520aee85] {
|
|
320
320
|
display: flex;
|
|
321
321
|
padding: 0.5rem;
|
|
322
322
|
border-bottom: 1px solid var(--border-color);
|
|
323
323
|
}
|
|
324
|
-
.time-column[data-v-
|
|
324
|
+
.time-column[data-v-520aee85] {
|
|
325
325
|
width: 100px;
|
|
326
326
|
flex-shrink: 0;
|
|
327
327
|
}
|
|
328
|
-
.event-column[data-v-
|
|
328
|
+
.event-column[data-v-520aee85] {
|
|
329
329
|
flex-grow: 1;
|
|
330
330
|
}
|
|
331
|
-
.agenda-content[data-v-
|
|
331
|
+
.agenda-content[data-v-520aee85] {
|
|
332
332
|
flex-grow: 1;
|
|
333
333
|
overflow-y: auto;
|
|
334
334
|
padding: 1rem;
|
|
335
335
|
}
|
|
336
|
-
.event[data-v-
|
|
336
|
+
.event[data-v-520aee85] {
|
|
337
337
|
margin-bottom: 1rem;
|
|
338
338
|
border-radius: 4px;
|
|
339
339
|
overflow: hidden;
|
|
340
340
|
cursor: pointer;
|
|
341
341
|
transition: all 0.2s ease;
|
|
342
342
|
}
|
|
343
|
-
.event[data-v-
|
|
343
|
+
.event[data-v-520aee85]:hover {
|
|
344
344
|
transform: scale(1.01);
|
|
345
345
|
}
|
|
346
|
-
.event-content[data-v-
|
|
346
|
+
.event-content[data-v-520aee85] {
|
|
347
347
|
display: flex;
|
|
348
348
|
height: 100%;
|
|
349
349
|
color: white;
|
|
350
350
|
}
|
|
351
|
-
.event-time[data-v-
|
|
351
|
+
.event-time[data-v-520aee85] {
|
|
352
352
|
width: 100px;
|
|
353
353
|
flex-shrink: 0;
|
|
354
354
|
padding: 0.5rem;
|
|
@@ -356,107 +356,107 @@ display: block;
|
|
|
356
356
|
align-items: center;
|
|
357
357
|
font-size: 0.9rem;
|
|
358
358
|
}
|
|
359
|
-
.event-details[data-v-
|
|
359
|
+
.event-details[data-v-520aee85] {
|
|
360
360
|
flex-grow: 1;
|
|
361
361
|
padding: 0.5rem;
|
|
362
362
|
border-left: 1px solid rgba(255, 255, 255, 0.2);
|
|
363
363
|
}
|
|
364
|
-
.event-title[data-v-
|
|
364
|
+
.event-title[data-v-520aee85] {
|
|
365
365
|
font-size: 1rem;
|
|
366
366
|
margin-bottom: 0.25rem;
|
|
367
367
|
}
|
|
368
|
-
.event-day[data-v-
|
|
368
|
+
.event-day[data-v-520aee85] {
|
|
369
369
|
font-size: 0.8rem;
|
|
370
370
|
opacity: 0.8;
|
|
371
371
|
}
|
|
372
|
-
.event-day.today[data-v-
|
|
372
|
+
.event-day.today[data-v-520aee85] {
|
|
373
373
|
color: var(--bgl-primary);
|
|
374
374
|
opacity: 1;
|
|
375
375
|
}
|
|
376
376
|
@media (max-width: 768px) {
|
|
377
|
-
.agenda-header[data-v-
|
|
377
|
+
.agenda-header[data-v-520aee85] {
|
|
378
378
|
padding: 0.5rem;
|
|
379
379
|
}
|
|
380
|
-
.time-column[data-v-
|
|
380
|
+
.time-column[data-v-520aee85] {
|
|
381
381
|
width: 80px;
|
|
382
382
|
}
|
|
383
|
-
.event-content[data-v-
|
|
383
|
+
.event-content[data-v-520aee85] {
|
|
384
384
|
font-size: 0.9rem;
|
|
385
385
|
}
|
|
386
|
-
.event-time[data-v-
|
|
386
|
+
.event-time[data-v-520aee85] {
|
|
387
387
|
width: 80px;
|
|
388
388
|
font-size: 0.8rem;
|
|
389
389
|
}
|
|
390
|
-
.event-title[data-v-
|
|
390
|
+
.event-title[data-v-520aee85] {
|
|
391
391
|
font-size: 0.9rem;
|
|
392
392
|
}
|
|
393
|
-
.event-day[data-v-
|
|
393
|
+
.event-day[data-v-520aee85] {
|
|
394
394
|
font-size: 0.7rem;
|
|
395
395
|
}
|
|
396
396
|
}
|
|
397
397
|
|
|
398
|
-
.dayGrid[data-v-
|
|
398
|
+
.dayGrid[data-v-bc647d79]{
|
|
399
399
|
display: grid;
|
|
400
400
|
grid-template-columns: 5rem 1fr;
|
|
401
401
|
}
|
|
402
|
-
.time-column[data-v-
|
|
402
|
+
.time-column[data-v-bc647d79] {
|
|
403
403
|
width: 80px;
|
|
404
404
|
flex-shrink: 0;
|
|
405
405
|
}
|
|
406
|
-
.events-column[data-v-
|
|
406
|
+
.events-column[data-v-bc647d79] {
|
|
407
407
|
flex-grow: 1;
|
|
408
408
|
position: relative;
|
|
409
409
|
border-inline-start: 1px solid var(--border-color);
|
|
410
410
|
}
|
|
411
|
-
.date-header[data-v-
|
|
411
|
+
.date-header[data-v-bc647d79] {
|
|
412
412
|
padding: 0.5rem;
|
|
413
413
|
text-align: center;
|
|
414
414
|
}
|
|
415
|
-
.day-header .events-column[data-v-
|
|
415
|
+
.day-header .events-column[data-v-bc647d79] {
|
|
416
416
|
border-inline-start: 1px solid transparent;
|
|
417
417
|
}
|
|
418
|
-
.time-slot[data-v-
|
|
418
|
+
.time-slot[data-v-bc647d79] {
|
|
419
419
|
height: 30px;
|
|
420
420
|
display: flex;
|
|
421
421
|
align-items: center;
|
|
422
422
|
justify-content: center;
|
|
423
423
|
}
|
|
424
|
-
.time-slots[data-v-
|
|
424
|
+
.time-slots[data-v-bc647d79] {
|
|
425
425
|
flex-grow: 1;
|
|
426
426
|
display: flex;
|
|
427
427
|
overflow: auto;
|
|
428
428
|
position: relative;
|
|
429
429
|
}
|
|
430
|
-
.event[data-v-
|
|
430
|
+
.event[data-v-bc647d79] {
|
|
431
431
|
left: 10px;
|
|
432
432
|
right: 10px;
|
|
433
433
|
}
|
|
434
|
-
.event[data-v-
|
|
434
|
+
.event[data-v-bc647d79]:hover {
|
|
435
435
|
z-index: 2;
|
|
436
436
|
transform: scale(1.02);
|
|
437
437
|
}
|
|
438
|
-
.event-content[data-v-
|
|
438
|
+
.event-content[data-v-bc647d79] {
|
|
439
439
|
padding: 0.5rem;
|
|
440
440
|
color: white;
|
|
441
441
|
font-size: 0.9rem;
|
|
442
442
|
height: 100%;
|
|
443
443
|
overflow: hidden;
|
|
444
444
|
}
|
|
445
|
-
.event-title[data-v-
|
|
445
|
+
.event-title[data-v-bc647d79] {
|
|
446
446
|
white-space: nowrap;
|
|
447
447
|
overflow: hidden;
|
|
448
448
|
text-overflow: ellipsis;
|
|
449
449
|
}
|
|
450
|
-
.event-time[data-v-
|
|
450
|
+
.event-time[data-v-bc647d79] {
|
|
451
451
|
font-size: 0.8rem;
|
|
452
452
|
}
|
|
453
|
-
.drag-preview[data-v-
|
|
453
|
+
.drag-preview[data-v-bc647d79] {
|
|
454
454
|
background-color: rgba(var(--bgl-primary-rgb), 0.1);
|
|
455
455
|
}
|
|
456
|
-
.current-time-line[data-v-
|
|
456
|
+
.current-time-line[data-v-bc647d79] {
|
|
457
457
|
height: 2px;
|
|
458
458
|
}
|
|
459
|
-
.custom-popover[data-v-
|
|
459
|
+
.custom-popover[data-v-bc647d79] {
|
|
460
460
|
position: fixed;
|
|
461
461
|
z-index: 1000;
|
|
462
462
|
min-width: 250px;
|
|
@@ -464,10 +464,10 @@ display: block;
|
|
|
464
464
|
background-color: white;
|
|
465
465
|
border-radius: 4px;
|
|
466
466
|
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
|
|
467
|
-
animation: fadeIn-
|
|
467
|
+
animation: fadeIn-bc647d79 0.2s ease;
|
|
468
468
|
transform-origin: center left;
|
|
469
469
|
}
|
|
470
|
-
@keyframes fadeIn-
|
|
470
|
+
@keyframes fadeIn-bc647d79 {
|
|
471
471
|
from {
|
|
472
472
|
opacity: 0;
|
|
473
473
|
transform: scale(0.95);
|
|
@@ -478,23 +478,23 @@ to {
|
|
|
478
478
|
}
|
|
479
479
|
}
|
|
480
480
|
|
|
481
|
-
.month-view[data-v-
|
|
481
|
+
.month-view[data-v-e972943e] {
|
|
482
482
|
display: flex;
|
|
483
483
|
flex-direction: column;
|
|
484
484
|
height: 100%;
|
|
485
485
|
overflow: hidden;
|
|
486
486
|
}
|
|
487
|
-
.month-header[data-v-
|
|
487
|
+
.month-header[data-v-e972943e] {
|
|
488
488
|
display: grid;
|
|
489
489
|
grid-template-columns: repeat(7, 1fr);
|
|
490
490
|
border-bottom: 1px solid var(--border-color);
|
|
491
491
|
}
|
|
492
|
-
.weekday[data-v-
|
|
492
|
+
.weekday[data-v-e972943e] {
|
|
493
493
|
padding: 0.5rem;
|
|
494
494
|
text-align: center;
|
|
495
495
|
color: var(--text-muted);
|
|
496
496
|
}
|
|
497
|
-
.month-grid[data-v-
|
|
497
|
+
.month-grid[data-v-e972943e] {
|
|
498
498
|
display: grid;
|
|
499
499
|
grid-template-columns: repeat(7, 1fr);
|
|
500
500
|
grid-template-rows: repeat(6, 1fr);
|
|
@@ -502,7 +502,7 @@ to {
|
|
|
502
502
|
overflow: auto;
|
|
503
503
|
border-inline-end: 1px solid var(--border-color);
|
|
504
504
|
}
|
|
505
|
-
.day-cell[data-v-
|
|
505
|
+
.day-cell[data-v-e972943e] {
|
|
506
506
|
border-inline-start: 1px solid var(--border-color);
|
|
507
507
|
border-bottom: 1px solid var(--border-color);
|
|
508
508
|
padding: 0.5rem;
|
|
@@ -510,24 +510,24 @@ to {
|
|
|
510
510
|
display: flex;
|
|
511
511
|
flex-direction: column;
|
|
512
512
|
}
|
|
513
|
-
.day-number[data-v-
|
|
513
|
+
.day-number[data-v-e972943e] {
|
|
514
514
|
margin-bottom: 0.5rem;
|
|
515
515
|
}
|
|
516
|
-
.other-month[data-v-
|
|
516
|
+
.other-month[data-v-e972943e] {
|
|
517
517
|
background-color: var(--bgl-gray-light);
|
|
518
518
|
color: var(--bgl-gray);
|
|
519
519
|
}
|
|
520
|
-
.today[data-v-
|
|
520
|
+
.today[data-v-e972943e] {
|
|
521
521
|
background-color: var(--bgl-primary-light);
|
|
522
522
|
}
|
|
523
|
-
.today .day-number[data-v-
|
|
523
|
+
.today .day-number[data-v-e972943e] {
|
|
524
524
|
color: var(--bgl-primary);
|
|
525
525
|
}
|
|
526
|
-
.day-events[data-v-
|
|
526
|
+
.day-events[data-v-e972943e] {
|
|
527
527
|
flex-grow: 1;
|
|
528
528
|
overflow-y: auto;
|
|
529
529
|
}
|
|
530
|
-
.event-item[data-v-
|
|
530
|
+
.event-item[data-v-e972943e] {
|
|
531
531
|
margin-bottom: 0.25rem;
|
|
532
532
|
padding: 0.25rem;
|
|
533
533
|
border-radius: 4px;
|
|
@@ -536,17 +536,17 @@ to {
|
|
|
536
536
|
cursor: pointer;
|
|
537
537
|
transition: all 0.2s ease;
|
|
538
538
|
}
|
|
539
|
-
.event-title[data-v-
|
|
539
|
+
.event-title[data-v-e972943e] {
|
|
540
540
|
font-weight: 500;
|
|
541
541
|
white-space: nowrap;
|
|
542
542
|
overflow: hidden;
|
|
543
543
|
text-overflow: ellipsis;
|
|
544
544
|
}
|
|
545
|
-
.event-time[data-v-
|
|
545
|
+
.event-time[data-v-e972943e] {
|
|
546
546
|
font-size: 0.7rem;
|
|
547
547
|
opacity: 0.8;
|
|
548
548
|
}
|
|
549
|
-
.event-dot[data-v-
|
|
549
|
+
.event-dot[data-v-e972943e] {
|
|
550
550
|
width: 6px;
|
|
551
551
|
height: 6px;
|
|
552
552
|
background-color: var(--bgl-primary);
|
|
@@ -554,20 +554,20 @@ to {
|
|
|
554
554
|
margin: 0.25rem auto;
|
|
555
555
|
}
|
|
556
556
|
@media (max-width: 768px) {
|
|
557
|
-
.day-cell[data-v-
|
|
557
|
+
.day-cell[data-v-e972943e] {
|
|
558
558
|
min-height: 60px;
|
|
559
559
|
padding: 0.25rem;
|
|
560
560
|
}
|
|
561
|
-
.day-number[data-v-
|
|
561
|
+
.day-number[data-v-e972943e] {
|
|
562
562
|
font-size: 0.8rem;
|
|
563
563
|
margin-bottom: 0.25rem;
|
|
564
564
|
}
|
|
565
|
-
.weekday[data-v-
|
|
565
|
+
.weekday[data-v-e972943e] {
|
|
566
566
|
font-size: 0.8rem;
|
|
567
567
|
padding: 0.25rem;
|
|
568
568
|
}
|
|
569
569
|
}
|
|
570
|
-
.custom-popover[data-v-
|
|
570
|
+
.custom-popover[data-v-e972943e] {
|
|
571
571
|
position: fixed;
|
|
572
572
|
z-index: 1000;
|
|
573
573
|
min-width: 250px;
|
|
@@ -575,10 +575,10 @@ to {
|
|
|
575
575
|
background-color: white;
|
|
576
576
|
border-radius: 4px;
|
|
577
577
|
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
|
|
578
|
-
animation: fadeIn-
|
|
578
|
+
animation: fadeIn-e972943e 0.2s ease;
|
|
579
579
|
transform-origin: center left;
|
|
580
580
|
}
|
|
581
|
-
@keyframes fadeIn-
|
|
581
|
+
@keyframes fadeIn-e972943e {
|
|
582
582
|
from {
|
|
583
583
|
opacity: 0;
|
|
584
584
|
transform: scale(0.95);
|
|
@@ -589,49 +589,49 @@ to {
|
|
|
589
589
|
}
|
|
590
590
|
}
|
|
591
591
|
|
|
592
|
-
.weekGrid[data-v-
|
|
592
|
+
.weekGrid[data-v-c29ed3b2]{
|
|
593
593
|
display: grid;
|
|
594
594
|
grid-template-columns: 5rem repeat(7, 1fr);
|
|
595
595
|
}
|
|
596
|
-
.days-column[data-v-
|
|
596
|
+
.days-column[data-v-c29ed3b2] {
|
|
597
597
|
flex-grow: 1;
|
|
598
598
|
display: flex;
|
|
599
599
|
}
|
|
600
|
-
.time-slot[data-v-
|
|
600
|
+
.time-slot[data-v-c29ed3b2] {
|
|
601
601
|
height: 30px;
|
|
602
602
|
display: flex;
|
|
603
603
|
align-items: center;
|
|
604
604
|
justify-content: center;
|
|
605
605
|
color: var(--text-muted);
|
|
606
606
|
}
|
|
607
|
-
.time-slots[data-v-
|
|
607
|
+
.time-slots[data-v-c29ed3b2] {
|
|
608
608
|
flex-grow: 1;
|
|
609
609
|
display: flex;
|
|
610
610
|
overflow: auto;
|
|
611
611
|
position: relative;
|
|
612
612
|
}
|
|
613
|
-
.day-column[data-v-
|
|
613
|
+
.day-column[data-v-c29ed3b2] {
|
|
614
614
|
flex: 1;
|
|
615
615
|
}
|
|
616
|
-
.event[data-v-
|
|
616
|
+
.event[data-v-c29ed3b2] {
|
|
617
617
|
margin-right: 2px;
|
|
618
618
|
}
|
|
619
|
-
.event[data-v-
|
|
619
|
+
.event[data-v-c29ed3b2]:hover {
|
|
620
620
|
z-index: 1;
|
|
621
621
|
}
|
|
622
|
-
.drag-preview[data-v-
|
|
622
|
+
.drag-preview[data-v-c29ed3b2] {
|
|
623
623
|
border: 2px solid var(--bgl-primary);
|
|
624
624
|
}
|
|
625
|
-
.current-time-line[data-v-
|
|
625
|
+
.current-time-line[data-v-c29ed3b2] {
|
|
626
626
|
height: 2px;
|
|
627
627
|
}
|
|
628
|
-
.custom-popover[data-v-
|
|
628
|
+
.custom-popover[data-v-c29ed3b2] {
|
|
629
629
|
min-width: 250px;
|
|
630
630
|
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
|
|
631
|
-
animation: fadeIn-
|
|
631
|
+
animation: fadeIn-c29ed3b2 0.2s ease;
|
|
632
632
|
transform-origin: center left;
|
|
633
633
|
}
|
|
634
|
-
@keyframes fadeIn-
|
|
634
|
+
@keyframes fadeIn-c29ed3b2 {
|
|
635
635
|
from {
|
|
636
636
|
opacity: 0;
|
|
637
637
|
transform: scale(0.95);
|
|
@@ -644,7 +644,7 @@ to {
|
|
|
644
644
|
@media screen and (max-width: 910px) {
|
|
645
645
|
}
|
|
646
646
|
|
|
647
|
-
.calendar[data-v-
|
|
647
|
+
.calendar[data-v-98cddf40] {
|
|
648
648
|
display: flex;
|
|
649
649
|
flex-direction: column;
|
|
650
650
|
height: 100%;
|
|
@@ -1462,7 +1462,7 @@ pre code.hljs{
|
|
|
1462
1462
|
opacity: 0.4;
|
|
1463
1463
|
}
|
|
1464
1464
|
|
|
1465
|
-
.date-picker-container[data-v-
|
|
1465
|
+
.date-picker-container[data-v-a0f799e6] {
|
|
1466
1466
|
width: 100%;
|
|
1467
1467
|
}
|
|
1468
1468
|
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { DateLike } from '@vueuse/core';
|
|
1
2
|
import { AvailableTimeLanguages, DateTimeAcceptedFormats } from '../../types/timeAgoT';
|
|
2
3
|
interface TimeDeltaOptions {
|
|
3
4
|
day?: number;
|
|
@@ -32,16 +33,21 @@ export declare function getDatePartsMap(date: Date, locale: Intl.LocalesArgument
|
|
|
32
33
|
YY: string;
|
|
33
34
|
YYYY: string;
|
|
34
35
|
};
|
|
35
|
-
export type FormatDateFn = (date?: string | Date, format?: DateTimeAcceptedFormats, locale?: string, timeZone?: string) => string;
|
|
36
|
-
export type FormatDateFnParams = Parameters<FormatDateFn>;
|
|
37
|
-
export type FormatDateFnReturn = ReturnType<FormatDateFn>;
|
|
38
36
|
export interface FormatDateOptions {
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
timeZone?: FormatDateFnParams[3];
|
|
37
|
+
fmt?: DateTimeAcceptedFormats;
|
|
38
|
+
locale?: Intl.LocalesArgument;
|
|
39
|
+
tz?: string;
|
|
43
40
|
}
|
|
44
|
-
|
|
45
|
-
|
|
41
|
+
/**
|
|
42
|
+
* Formats a date based on the provided format string, locale, and timezone.
|
|
43
|
+
* @param date The date to format (string or Date object).
|
|
44
|
+
* @param opts Options for formatting the date.
|
|
45
|
+
* @param opts.fmt The format string (default is 'DD.MM.YY').
|
|
46
|
+
* @param opts.locale The locale to use for formatting (default is browser's locale).
|
|
47
|
+
* @param opts.tz The timezone to use for formatting (default is local timezone).
|
|
48
|
+
* @returns Formatted date string.
|
|
49
|
+
*/
|
|
50
|
+
export declare function formatDate(date?: DateLike, opts?: FormatDateOptions): string;
|
|
51
|
+
export declare const fmtDate: typeof formatDate;
|
|
46
52
|
export {};
|
|
47
53
|
//# sourceMappingURL=dateUtils.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dateUtils.d.ts","sourceRoot":"","sources":["../../../src/utils/calendar/dateUtils.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,sBAAsB,EAAE,uBAAuB,EAAkC,MAAM,sBAAsB,CAAA;AAE3H,UAAU,gBAAgB;IACzB,GAAG,CAAC,EAAE,MAAM,CAAA;IACZ,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,IAAI,CAAC,EAAE,MAAM,CAAA;CACb;AAED,wBAAgB,SAAS,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,EAAE,OAAO,EAAE,gBAAgB,QAyBvE;AAqDD,wBAAgB,OAAO,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,EAAE,IAAI,GAAE,sBAA6B,UAsD/E;AASD;;;;;GAKG;AACH,wBAAgB,cAAc,CAAC,IAAI,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,GAAG,IAAI,CAgDjE;AAED,wBAAgB,eAAe,CAAC,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,CAAC,eAAe,EAAE,QAAQ,CAAC,EAAE,MAAM;;;;;;;;;;;;;;EAoB1F;AAcD,MAAM,
|
|
1
|
+
{"version":3,"file":"dateUtils.d.ts","sourceRoot":"","sources":["../../../src/utils/calendar/dateUtils.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAA;AAC5C,OAAO,KAAK,EAAE,sBAAsB,EAAE,uBAAuB,EAAkC,MAAM,sBAAsB,CAAA;AAE3H,UAAU,gBAAgB;IACzB,GAAG,CAAC,EAAE,MAAM,CAAA;IACZ,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,IAAI,CAAC,EAAE,MAAM,CAAA;CACb;AAED,wBAAgB,SAAS,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,EAAE,OAAO,EAAE,gBAAgB,QAyBvE;AAqDD,wBAAgB,OAAO,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,EAAE,IAAI,GAAE,sBAA6B,UAsD/E;AASD;;;;;GAKG;AACH,wBAAgB,cAAc,CAAC,IAAI,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,GAAG,IAAI,CAgDjE;AAED,wBAAgB,eAAe,CAAC,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,CAAC,eAAe,EAAE,QAAQ,CAAC,EAAE,MAAM;;;;;;;;;;;;;;EAoB1F;AAcD,MAAM,WAAW,iBAAiB;IACjC,GAAG,CAAC,EAAE,uBAAuB,CAAA;IAC7B,MAAM,CAAC,EAAE,IAAI,CAAC,eAAe,CAAA;IAC7B,EAAE,CAAC,EAAE,MAAM,CAAA;CACX;AACD;;;;;;;;GAQG;AACH,wBAAgB,UAAU,CACzB,IAAI,CAAC,EAAE,QAAQ,EACf,IAAI,GAAE,iBAAsB,GAC1B,MAAM,CAkER;AACD,eAAO,MAAM,OAAO,mBAAa,CAAA"}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
2
|
import type { Component } from 'vue'
|
|
3
3
|
import type { CalendarEvent, CalendarView, WeekStart } from './CalendarTypes'
|
|
4
|
-
import { timeDelta, Btn,
|
|
4
|
+
import { timeDelta, Btn, ListItem, Dropdown, fmtDate } from '@bagelink/vue'
|
|
5
5
|
import { ref, computed } from 'vue'
|
|
6
6
|
import AgendaView from './views/AgendaView.vue'
|
|
7
7
|
import DayView from './views/DayView.vue'
|
|
@@ -97,8 +97,8 @@ defineExpose({ visibleDateRange })
|
|
|
97
97
|
<div class="calendar">
|
|
98
98
|
<div class="flex m_block m_pb-1">
|
|
99
99
|
<h3 class="txt-light my-0">
|
|
100
|
-
<b>{{
|
|
101
|
-
{{
|
|
100
|
+
<b>{{ fmtDate(currentDate, { fmt: 'MMMM' }) }}</b>
|
|
101
|
+
{{ fmtDate(currentDate, { fmt: 'YYYY' }) }}
|
|
102
102
|
</h3>
|
|
103
103
|
<div class="ms-auto flex gap-025">
|
|
104
104
|
<Dropdown thin :value="currentView" iconEnd="keyboard_arrow_down" color="gray">
|
|
@@ -141,7 +141,7 @@ onUnmounted(() => {
|
|
|
141
141
|
>
|
|
142
142
|
<div class="event-content">
|
|
143
143
|
<div class="event-time">
|
|
144
|
-
{{ formatDate(event.start_time, 'HH:mm') }}
|
|
144
|
+
{{ formatDate(event.start_time, { fmt: 'HH:mm' }) }}
|
|
145
145
|
</div>
|
|
146
146
|
<div class="event-details">
|
|
147
147
|
<div class="event-title">
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
|
+
import type { SetupContext } from 'vue'
|
|
2
3
|
import type { CalendarEvent } from '../CalendarTypes'
|
|
3
4
|
import type { PopoverState } from '../utils'
|
|
4
5
|
import { formatDate } from '@bagelink/vue'
|
|
@@ -18,7 +19,7 @@ const emit = defineEmits<{
|
|
|
18
19
|
(e: 'eventCreate', event: { start_time: Date, end_time: Date }): void
|
|
19
20
|
}>()
|
|
20
21
|
|
|
21
|
-
const slots = useSlots()
|
|
22
|
+
const slots: SetupContext['slots'] = useSlots()
|
|
22
23
|
|
|
23
24
|
// Configuration constants
|
|
24
25
|
const slotHeight = 60
|