@bagelink/vue 1.2.15 → 1.2.20
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/CalendarTypes.d.ts +13 -0
- package/dist/components/calendar/CalendarTypes.d.ts.map +1 -0
- package/dist/components/calendar/Index.vue.d.ts +39 -507
- package/dist/components/calendar/Index.vue.d.ts.map +1 -1
- package/dist/components/calendar/utils.d.ts +31 -0
- package/dist/components/calendar/utils.d.ts.map +1 -0
- package/dist/components/calendar/views/AgendaView.vue.d.ts +16 -0
- package/dist/components/calendar/views/AgendaView.vue.d.ts.map +1 -0
- package/dist/components/calendar/views/DayView.vue.d.ts +50 -0
- package/dist/components/calendar/views/DayView.vue.d.ts.map +1 -0
- package/dist/components/calendar/views/MonthView.vue.d.ts +20 -0
- package/dist/components/calendar/views/MonthView.vue.d.ts.map +1 -0
- package/dist/components/calendar/views/WeekView.vue.d.ts +33 -0
- package/dist/components/calendar/views/WeekView.vue.d.ts.map +1 -0
- package/dist/components/form/BglMultiStepForm.vue.d.ts +63 -0
- package/dist/components/form/BglMultiStepForm.vue.d.ts.map +1 -0
- package/dist/components/form/index.d.ts +1 -0
- package/dist/components/form/index.d.ts.map +1 -1
- package/dist/components/form/inputs/CodeEditor/Index.vue.d.ts.map +1 -1
- package/dist/components/form/inputs/DateInput.vue.d.ts +3 -3
- package/dist/components/form/inputs/DateInput.vue.d.ts.map +1 -1
- package/dist/components/form/inputs/DatePicker.vue.d.ts +3 -3
- package/dist/components/form/inputs/DatePicker.vue.d.ts.map +1 -1
- package/dist/components/form/inputs/SelectInput.vue.d.ts.map +1 -1
- package/dist/index.cjs +2241 -3891
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.mjs +2242 -3892
- package/dist/style.css +567 -633
- package/dist/utils/BagelFormUtils.d.ts +4 -2
- package/dist/utils/BagelFormUtils.d.ts.map +1 -1
- package/dist/utils/calendar/EDate.d.ts +2 -0
- package/dist/utils/calendar/EDate.d.ts.map +1 -0
- package/dist/utils/calendar/Helpers.d.ts +19 -0
- package/dist/utils/calendar/Helpers.d.ts.map +1 -0
- package/dist/utils/calendar/constants.d.ts +3 -0
- package/dist/utils/calendar/constants.d.ts.map +1 -0
- package/dist/utils/calendar/dateUtils.d.ts +30 -0
- package/dist/utils/calendar/dateUtils.d.ts.map +1 -0
- package/dist/utils/calendar/event.interface.d.ts +32 -0
- package/dist/utils/calendar/event.interface.d.ts.map +1 -0
- package/dist/utils/calendar/time.d.ts +117 -0
- package/dist/utils/calendar/time.d.ts.map +1 -0
- package/dist/utils/calendar/types.d.ts +27 -0
- package/dist/utils/calendar/types.d.ts.map +1 -0
- package/dist/utils/calendar/typings.d.ts +87 -0
- package/dist/utils/calendar/typings.d.ts.map +1 -0
- package/dist/utils/calendar/week.d.ts +117 -0
- package/dist/utils/calendar/week.d.ts.map +1 -0
- package/package.json +1 -1
- package/src/components/calendar/CalendarTypes.ts +13 -0
- package/src/components/calendar/Index.vue +124 -389
- package/src/components/calendar/utils.ts +70 -0
- package/src/components/calendar/views/AgendaView.vue +263 -0
- package/src/components/calendar/views/DayView.vue +373 -0
- package/src/components/calendar/views/MonthView.vue +313 -0
- package/src/components/calendar/views/WeekView.vue +431 -0
- package/src/components/form/BglMultiStepForm.vue +383 -69
- package/src/components/form/index.ts +1 -0
- package/src/components/form/inputs/CodeEditor/Index.vue +11 -0
- package/src/components/form/inputs/DateInput.vue +3 -3
- package/src/components/form/inputs/DatePicker.vue +35 -30
- package/src/components/form/inputs/SelectInput.vue +2 -0
- package/src/components/form/inputs/Upload/upload.types.d.ts +0 -1
- package/src/index.ts +2 -2
- package/src/styles/inputs.css +138 -137
- package/src/styles/layout.css +3 -2
- package/src/styles/mobilLayout.css +4 -2
- package/src/utils/BagelFormUtils.ts +6 -2
- package/src/utils/calendar/EDate.ts +0 -0
- package/src/{components/calendar/helpers → utils/calendar}/Helpers.ts +6 -6
- package/src/utils/calendar/constants.ts +2 -0
- package/src/utils/{timeAgo.ts → calendar/dateUtils.ts} +38 -1
- package/src/utils/calendar/event.interface.ts +33 -0
- package/src/{components/calendar/helpers/Time.ts → utils/calendar/time.ts} +15 -15
- package/src/utils/calendar/types.ts +27 -0
- package/src/{components/calendar/typings/config.interface.ts → utils/calendar/typings.ts} +13 -6
- package/src/utils/calendar/week.ts +588 -0
- package/src/components/calendar/assets/base.css +0 -60
- package/src/components/calendar/components/header/Header.vue +0 -153
- package/src/components/calendar/components/month/AgendaEventTile.vue +0 -135
- package/src/components/calendar/components/month/AgendaEvents.vue +0 -72
- package/src/components/calendar/components/month/Day.vue +0 -256
- package/src/components/calendar/components/month/Event.vue +0 -164
- package/src/components/calendar/components/month/Month.vue +0 -241
- package/src/components/calendar/components/month/WeekDay.vue +0 -15
- package/src/components/calendar/components/partials/EventFlyout.vue +0 -430
- package/src/components/calendar/components/week/Day.vue +0 -198
- package/src/components/calendar/components/week/DayEvent.vue +0 -584
- package/src/components/calendar/components/week/DayTimeline.vue +0 -80
- package/src/components/calendar/components/week/FullDayEvent.vue +0 -121
- package/src/components/calendar/components/week/Week.vue +0 -414
- package/src/components/calendar/components/week/WeekTimeline.vue +0 -101
- package/src/components/calendar/constants.ts +0 -13
- package/src/components/calendar/helpers/DayIntervals.ts +0 -48
- package/src/components/calendar/helpers/EDate.ts +0 -18
- package/src/components/calendar/helpers/Errors.ts +0 -69
- package/src/components/calendar/helpers/EventChange.ts +0 -88
- package/src/components/calendar/helpers/EventConcurrency.ts +0 -69
- package/src/components/calendar/helpers/EventFlyoutPosition.ts +0 -96
- package/src/components/calendar/helpers/EventPosition.ts +0 -154
- package/src/components/calendar/helpers/EventsFilter.ts +0 -50
- package/src/components/calendar/helpers/Week.ts +0 -37
- package/src/components/calendar/language/index.ts +0 -41
- package/src/components/calendar/language/keys.ts +0 -99
- package/src/components/calendar/models/Event.ts +0 -112
- package/src/components/calendar/styles/_mixins.css +0 -21
- package/src/components/calendar/styles/_variables.css +0 -47
- package/src/components/calendar/typings/interfaces/day.interface.ts +0 -10
- package/src/components/calendar/typings/interfaces/event.interface.ts +0 -32
- package/src/components/calendar/typings/interfaces/full-day-events-week.type.ts +0 -8
- package/src/components/calendar/typings/interfaces/period.interface.ts +0 -5
- package/src/components/calendar/typings/interfaces/time-modes.ts +0 -11
- package/src/components/calendar/typings/types.ts +0 -27
|
@@ -1,164 +0,0 @@
|
|
|
1
|
-
<script setup lang="ts">
|
|
2
|
-
import type { PropType } from 'vue'
|
|
3
|
-
import type Time from '../../helpers/Time'
|
|
4
|
-
import type { ConfigInterface } from '../../typings/config.interface'
|
|
5
|
-
import type { DayInterface } from '../../typings/interfaces/day.interface'
|
|
6
|
-
import type { EventInterface } from '../../typings/interfaces/event.interface'
|
|
7
|
-
import { computed, ref, onMounted } from 'vue'
|
|
8
|
-
import { DATE_TIME_STRING_PATTERN, EVENT_COLORS } from '../../constants'
|
|
9
|
-
|
|
10
|
-
const props = defineProps({
|
|
11
|
-
time: {
|
|
12
|
-
type: Object as PropType<Time>,
|
|
13
|
-
required: true,
|
|
14
|
-
},
|
|
15
|
-
calendarEvent: {
|
|
16
|
-
type: Object as PropType<EventInterface>,
|
|
17
|
-
required: true,
|
|
18
|
-
},
|
|
19
|
-
config: {
|
|
20
|
-
type: Object as PropType<ConfigInterface>,
|
|
21
|
-
required: true,
|
|
22
|
-
},
|
|
23
|
-
day: {
|
|
24
|
-
type: Object as PropType<DayInterface>,
|
|
25
|
-
required: true,
|
|
26
|
-
},
|
|
27
|
-
})
|
|
28
|
-
|
|
29
|
-
const emit = defineEmits<{
|
|
30
|
-
(e: 'eventWasClicked', payload: { clickedEvent: EventInterface, eventElement: HTMLElement | null }): void
|
|
31
|
-
}>()
|
|
32
|
-
|
|
33
|
-
const colors = ref(EVENT_COLORS as { [key: string]: string })
|
|
34
|
-
const eventBackgroundColor = ref('')
|
|
35
|
-
const eventIdPrefix = 'calendar-month__event-'
|
|
36
|
-
|
|
37
|
-
const isCustomEvent = computed(() => {
|
|
38
|
-
if (Array.isArray(props.calendarEvent.isCustom)) {
|
|
39
|
-
return props.calendarEvent.isCustom.includes('month')
|
|
40
|
-
}
|
|
41
|
-
return props.calendarEvent.isCustom || false
|
|
42
|
-
})
|
|
43
|
-
|
|
44
|
-
const eventTimeStart = computed(() => {
|
|
45
|
-
return DATE_TIME_STRING_PATTERN.test(props.calendarEvent.time.start)
|
|
46
|
-
? props.time.getLocalizedTime(props.calendarEvent.time.start)
|
|
47
|
-
: null
|
|
48
|
-
})
|
|
49
|
-
|
|
50
|
-
const elementId = computed(() => eventIdPrefix + props.calendarEvent.id + props.time.dateStringFrom(props.day.dateTimeString))
|
|
51
|
-
|
|
52
|
-
const elementDraggableAttribute = computed(() => {
|
|
53
|
-
const {
|
|
54
|
-
year: startYear,
|
|
55
|
-
month: startMonth,
|
|
56
|
-
date: startDate,
|
|
57
|
-
} = props.time.getAllVariablesFromDateTimeString(props.calendarEvent.time.start)
|
|
58
|
-
|
|
59
|
-
const {
|
|
60
|
-
year: endYear,
|
|
61
|
-
month: endMonth,
|
|
62
|
-
date: endDate,
|
|
63
|
-
} = props.time.getAllVariablesFromDateTimeString(props.calendarEvent.time.end)
|
|
64
|
-
|
|
65
|
-
const eventIsSingleDay = startYear === endYear && startMonth === endMonth && startDate === endDate
|
|
66
|
-
const dragAndDropIsDisabled = props.calendarEvent.disableDnD && props.calendarEvent.disableDnD.includes('month')
|
|
67
|
-
|
|
68
|
-
return props.calendarEvent.isEditable && eventIsSingleDay && !dragAndDropIsDisabled ? true : undefined
|
|
69
|
-
})
|
|
70
|
-
|
|
71
|
-
function setColors() {
|
|
72
|
-
if (
|
|
73
|
-
props.calendarEvent.colorScheme
|
|
74
|
-
&& props.config.style?.colorSchemes
|
|
75
|
-
&& props.config.style.colorSchemes[props.calendarEvent.colorScheme]
|
|
76
|
-
) {
|
|
77
|
-
return (eventBackgroundColor.value = props.config.style.colorSchemes[props.calendarEvent.colorScheme].backgroundColor)
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
if (props.calendarEvent.color) {
|
|
81
|
-
return (eventBackgroundColor.value = colors.value[props.calendarEvent.color])
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
return (eventBackgroundColor.value = colors.value.blue)
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
function handleClickOnEvent() {
|
|
88
|
-
const eventElement = document.getElementById(elementId.value)
|
|
89
|
-
emit('eventWasClicked', {
|
|
90
|
-
clickedEvent: props.calendarEvent,
|
|
91
|
-
eventElement,
|
|
92
|
-
})
|
|
93
|
-
}
|
|
94
|
-
|
|
95
|
-
function handleDragStart(dragEvent: DragEvent) {
|
|
96
|
-
if (!dragEvent || !dragEvent.dataTransfer) return
|
|
97
|
-
dragEvent.dataTransfer.effectAllowed = 'move'
|
|
98
|
-
dragEvent.dataTransfer.setData('json', JSON.stringify(props.calendarEvent))
|
|
99
|
-
}
|
|
100
|
-
|
|
101
|
-
onMounted(() => {
|
|
102
|
-
setColors()
|
|
103
|
-
})
|
|
104
|
-
</script>
|
|
105
|
-
|
|
106
|
-
<template>
|
|
107
|
-
<div
|
|
108
|
-
v-if="config.isSmall"
|
|
109
|
-
class="calendar-month__event"
|
|
110
|
-
/>
|
|
111
|
-
|
|
112
|
-
<template v-else>
|
|
113
|
-
<div
|
|
114
|
-
v-if="isCustomEvent"
|
|
115
|
-
:id="elementId"
|
|
116
|
-
class="is-event"
|
|
117
|
-
data-ref="custom-event"
|
|
118
|
-
:class="{ grab: elementDraggableAttribute }"
|
|
119
|
-
:draggable="elementDraggableAttribute"
|
|
120
|
-
@dragstart="handleDragStart"
|
|
121
|
-
@click="handleClickOnEvent"
|
|
122
|
-
>
|
|
123
|
-
<slot
|
|
124
|
-
name="monthEvent"
|
|
125
|
-
:event-data="calendarEvent"
|
|
126
|
-
/>
|
|
127
|
-
</div>
|
|
128
|
-
|
|
129
|
-
<div
|
|
130
|
-
v-else
|
|
131
|
-
:id="elementId"
|
|
132
|
-
data-ref="default-event"
|
|
133
|
-
class="calendar-month__event hover is-event flex align-items-center overflow-hidden radius-05 txt10 px-025 pointer user-select-none gap-025 bg-white"
|
|
134
|
-
:class="{ 'is-draggable': elementDraggableAttribute }"
|
|
135
|
-
:draggable="elementDraggableAttribute"
|
|
136
|
-
@dragstart="handleDragStart"
|
|
137
|
-
@click="handleClickOnEvent"
|
|
138
|
-
>
|
|
139
|
-
<span class="calendar-month__event-color round flex-shrink-0" />
|
|
140
|
-
|
|
141
|
-
<span
|
|
142
|
-
v-if="eventTimeStart && !calendarEvent.originalEvent"
|
|
143
|
-
class="calendar-month__event-time opacity-6 flex-shrink-0"
|
|
144
|
-
>
|
|
145
|
-
{{ eventTimeStart }}
|
|
146
|
-
</span>
|
|
147
|
-
<span class="calendar-month__event-title1 white-space ellipsis ">
|
|
148
|
-
{{ calendarEvent.title }}
|
|
149
|
-
</span>
|
|
150
|
-
</div>
|
|
151
|
-
</template>
|
|
152
|
-
</template>
|
|
153
|
-
|
|
154
|
-
<style scoped>
|
|
155
|
-
.calendar-month__event:active {
|
|
156
|
-
z-index: 100;
|
|
157
|
-
}
|
|
158
|
-
|
|
159
|
-
.calendar-month__event .calendar-month__event-color {
|
|
160
|
-
background-color: v-bind(eventBackgroundColor);
|
|
161
|
-
width: 6px;
|
|
162
|
-
height: 6px;
|
|
163
|
-
}
|
|
164
|
-
</style>
|
|
@@ -1,241 +0,0 @@
|
|
|
1
|
-
<script setup lang="ts">
|
|
2
|
-
import type { PropType } from 'vue'
|
|
3
|
-
import type Time from '../../helpers/Time'
|
|
4
|
-
import type { ConfigInterface } from '../../typings/config.interface'
|
|
5
|
-
import type { DayInterface } from '../../typings/interfaces/day.interface'
|
|
6
|
-
import type { EventInterface } from '../../typings/interfaces/event.interface'
|
|
7
|
-
import type { PeriodInterface } from '../../typings/interfaces/period.interface'
|
|
8
|
-
import { ref, onMounted } from 'vue'
|
|
9
|
-
import EDate from '../../helpers/EDate'
|
|
10
|
-
import EventPosition from '../../helpers/EventPosition'
|
|
11
|
-
import Helpers from '../../helpers/Helpers'
|
|
12
|
-
import EventFlyout from '../partials/EventFlyout.vue'
|
|
13
|
-
import AgendaEvents from './AgendaEvents.vue'
|
|
14
|
-
import Day from './Day.vue'
|
|
15
|
-
import WeekDay from './WeekDay.vue'
|
|
16
|
-
|
|
17
|
-
const props = defineProps({
|
|
18
|
-
config: {
|
|
19
|
-
type: Object as PropType<ConfigInterface>,
|
|
20
|
-
required: true,
|
|
21
|
-
},
|
|
22
|
-
time: {
|
|
23
|
-
type: Object as PropType<Time>,
|
|
24
|
-
required: true,
|
|
25
|
-
},
|
|
26
|
-
period: {
|
|
27
|
-
type: Object as PropType<PeriodInterface>,
|
|
28
|
-
required: true,
|
|
29
|
-
},
|
|
30
|
-
eventsProp: {
|
|
31
|
-
type: Array as PropType<EventInterface[]>,
|
|
32
|
-
default: () => [],
|
|
33
|
-
},
|
|
34
|
-
})
|
|
35
|
-
|
|
36
|
-
const emit = defineEmits<{
|
|
37
|
-
(e: 'editEvent', event: any): void
|
|
38
|
-
(e: 'deleteEvent', event: any): void
|
|
39
|
-
(e: 'updatedPeriod', period: any): void
|
|
40
|
-
(e: 'eventWasClicked', event: any): void
|
|
41
|
-
(e: 'eventWasDragged', event: any): void
|
|
42
|
-
(e: 'dateWasClicked', date: any): void
|
|
43
|
-
}>()
|
|
44
|
-
|
|
45
|
-
const EventPositionHelper = new EventPosition()
|
|
46
|
-
|
|
47
|
-
const month = ref<DayInterface[][]>([])
|
|
48
|
-
const selectedEvent = ref<EventInterface | null>(null)
|
|
49
|
-
const selectedEventElement = ref<any | null>(null)
|
|
50
|
-
const events = ref(props.eventsProp)
|
|
51
|
-
const fullDayEvents = ref<EventInterface[]>([])
|
|
52
|
-
const selectedDay = ref<DayInterface | null>(null)
|
|
53
|
-
|
|
54
|
-
function initMonth() {
|
|
55
|
-
month.value = []
|
|
56
|
-
sortOutFullDayEvents()
|
|
57
|
-
setMonth()
|
|
58
|
-
if (props.config.isSmall) setInitialSelectedDay()
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
function setMonth() {
|
|
62
|
-
const { month: currentMonth, fullYear } = new EDate(props.period.selectedDate)
|
|
63
|
-
const calendarMonth = props.time.getCalendarMonthSplitInWeeks(
|
|
64
|
-
fullYear,
|
|
65
|
-
currentMonth
|
|
66
|
-
)
|
|
67
|
-
|
|
68
|
-
const monthWithEvents = calendarMonth.map((week) => {
|
|
69
|
-
return week.map((day) => {
|
|
70
|
-
const dateTimeString = props.time.getDateTimeStringFromDate(day)
|
|
71
|
-
const dayEvents = events.value.filter((event) => {
|
|
72
|
-
return props.time.dateStringsHaveEqualDates(event.time.start, dateTimeString)
|
|
73
|
-
})
|
|
74
|
-
|
|
75
|
-
return {
|
|
76
|
-
isTrailingOrLeadingDate: props.time.isTrailingOrLeadingDate(day, currentMonth),
|
|
77
|
-
dayName: props.time.getLocalizedNameOfWeekday(day),
|
|
78
|
-
dateTimeString: props.time.getDateTimeStringFromDate(day),
|
|
79
|
-
events: dayEvents,
|
|
80
|
-
}
|
|
81
|
-
})
|
|
82
|
-
})
|
|
83
|
-
|
|
84
|
-
month.value = EventPositionHelper.positionFullDayEventsInMonth(
|
|
85
|
-
monthWithEvents,
|
|
86
|
-
fullDayEvents.value
|
|
87
|
-
)
|
|
88
|
-
}
|
|
89
|
-
|
|
90
|
-
function sortOutFullDayEvents() {
|
|
91
|
-
const timedEvents = []
|
|
92
|
-
const fullDayEventsArray = []
|
|
93
|
-
|
|
94
|
-
for (const calendarEvent of events.value) {
|
|
95
|
-
if (Helpers.getEventType(calendarEvent, props.time) === 'SINGLE_DAY_TIMED') {
|
|
96
|
-
timedEvents.push(calendarEvent)
|
|
97
|
-
} else {
|
|
98
|
-
fullDayEventsArray.push(calendarEvent)
|
|
99
|
-
}
|
|
100
|
-
}
|
|
101
|
-
|
|
102
|
-
events.value = timedEvents
|
|
103
|
-
fullDayEvents.value = fullDayEventsArray
|
|
104
|
-
}
|
|
105
|
-
|
|
106
|
-
function handleClickOnEvent(event: {
|
|
107
|
-
eventElement: HTMLDivElement
|
|
108
|
-
clickedEvent: EventInterface
|
|
109
|
-
}) {
|
|
110
|
-
emit('eventWasClicked', event)
|
|
111
|
-
selectedEventElement.value = event.eventElement
|
|
112
|
-
selectedEvent.value = event.clickedEvent
|
|
113
|
-
}
|
|
114
|
-
|
|
115
|
-
function handleEventWasDragged(calendarEvent: EventInterface) {
|
|
116
|
-
emit('eventWasDragged', calendarEvent)
|
|
117
|
-
const newEvents = [...events.value, ...fullDayEvents.value].filter(
|
|
118
|
-
e => e.id !== calendarEvent.id
|
|
119
|
-
)
|
|
120
|
-
newEvents.push(calendarEvent)
|
|
121
|
-
events.value = []
|
|
122
|
-
fullDayEvents.value = []
|
|
123
|
-
events.value = newEvents
|
|
124
|
-
initMonth()
|
|
125
|
-
}
|
|
126
|
-
|
|
127
|
-
function setInitialSelectedDay() {
|
|
128
|
-
const selectedDayDateString = props.time.getDateStringFromDate(props.period.selectedDate)
|
|
129
|
-
selectedDay.value = month.value.flat().find((day) => {
|
|
130
|
-
return props.time.dateStringFrom(day.dateTimeString) === selectedDayDateString
|
|
131
|
-
}) || null
|
|
132
|
-
}
|
|
133
|
-
|
|
134
|
-
onMounted(() => {
|
|
135
|
-
initMonth()
|
|
136
|
-
})
|
|
137
|
-
</script>
|
|
138
|
-
|
|
139
|
-
<template>
|
|
140
|
-
<div class="calendar-month relative column w-100p h-100p overflow-y flex flex-stretch">
|
|
141
|
-
<div
|
|
142
|
-
class="flex space-between"
|
|
143
|
-
>
|
|
144
|
-
<WeekDay
|
|
145
|
-
v-for="(day, dayIndex) in month[0]"
|
|
146
|
-
:key="dayIndex"
|
|
147
|
-
class=" txt-center flex-shrink flex-grow"
|
|
148
|
-
:config="config"
|
|
149
|
-
:day="day"
|
|
150
|
-
:time="time"
|
|
151
|
-
/>
|
|
152
|
-
</div>
|
|
153
|
-
<div class="calendar-month__weeks h-100p flex-grow flex flex-stretch column space-between">
|
|
154
|
-
<div
|
|
155
|
-
v-for="(week, weekIndex) in month"
|
|
156
|
-
:key="weekIndex"
|
|
157
|
-
class="calendar-month__week"
|
|
158
|
-
>
|
|
159
|
-
<Day
|
|
160
|
-
v-for="(day, dayIndex) in week"
|
|
161
|
-
:key="dayIndex"
|
|
162
|
-
:config="config"
|
|
163
|
-
:day="day"
|
|
164
|
-
:time="time"
|
|
165
|
-
:is-selected="selectedDay?.dateTimeString === day.dateTimeString"
|
|
166
|
-
@eventWasDragged="handleEventWasDragged"
|
|
167
|
-
@dateWasClicked="emit('dateWasClicked', $event)"
|
|
168
|
-
@dayWasSelected="selectedDay = $event"
|
|
169
|
-
@updatedPeriod="emit('updatedPeriod', $event)"
|
|
170
|
-
>
|
|
171
|
-
<!-- @eventWasClicked="handleClickOnEvent" -->
|
|
172
|
-
<template #monthEvent="{ eventData }">
|
|
173
|
-
<slot
|
|
174
|
-
:event-data="eventData"
|
|
175
|
-
name="monthEvent"
|
|
176
|
-
/>
|
|
177
|
-
</template>
|
|
178
|
-
|
|
179
|
-
<template #dayCell="{ dayData }">
|
|
180
|
-
<slot
|
|
181
|
-
:day-data="dayData"
|
|
182
|
-
name="dayCell"
|
|
183
|
-
/>
|
|
184
|
-
</template>
|
|
185
|
-
</Day>
|
|
186
|
-
</div>
|
|
187
|
-
</div>
|
|
188
|
-
|
|
189
|
-
<div
|
|
190
|
-
v-if="!(config.month?.showEventsOnMobileView === false)"
|
|
191
|
-
class="calendar-month__day_events w-100p pt-1 m_pb-1"
|
|
192
|
-
>
|
|
193
|
-
<AgendaEvents
|
|
194
|
-
v-if="selectedDay"
|
|
195
|
-
:config="config"
|
|
196
|
-
:time="time"
|
|
197
|
-
:day="selectedDay"
|
|
198
|
-
@eventWasClicked="handleClickOnEvent"
|
|
199
|
-
/>
|
|
200
|
-
</div>
|
|
201
|
-
|
|
202
|
-
<EventFlyout
|
|
203
|
-
v-if="!config.eventDialog || !config.eventDialog.isDisabled"
|
|
204
|
-
:calendar-event-prop="selectedEvent"
|
|
205
|
-
:event-element="selectedEventElement"
|
|
206
|
-
:time="time"
|
|
207
|
-
:config="config"
|
|
208
|
-
@hide="selectedEvent = null"
|
|
209
|
-
@editEvent="emit('editEvent', $event)"
|
|
210
|
-
@deleteEvent="emit('deleteEvent', $event)"
|
|
211
|
-
>
|
|
212
|
-
<template #default="p">
|
|
213
|
-
<slot
|
|
214
|
-
name="eventDialog"
|
|
215
|
-
:event-dialog-data="p.eventDialogData"
|
|
216
|
-
:close-event-dialog="p.closeEventDialog"
|
|
217
|
-
/>
|
|
218
|
-
</template>
|
|
219
|
-
</EventFlyout>
|
|
220
|
-
</div>
|
|
221
|
-
</template>
|
|
222
|
-
|
|
223
|
-
<style>
|
|
224
|
-
.calendar-month__week {
|
|
225
|
-
display: flex;
|
|
226
|
-
flex: 1;
|
|
227
|
-
}
|
|
228
|
-
.calendar-month__week:first-child {
|
|
229
|
-
border-top: var(--qalendar-border-gray-thin);
|
|
230
|
-
}
|
|
231
|
-
.calendar-root.mode-is-month.qalendar-is-small .calendar-month.h-100p{
|
|
232
|
-
height: auto !important;
|
|
233
|
-
}
|
|
234
|
-
.calendar-root.mode-is-month.qalendar-is-small .calendar-month__weeks{
|
|
235
|
-
display: block !important;
|
|
236
|
-
height: auto !important;
|
|
237
|
-
}
|
|
238
|
-
.calendar-root.mode-is-month.qalendar-is-small .calendar-month__weekday{
|
|
239
|
-
height: 40px !important;
|
|
240
|
-
}
|
|
241
|
-
</style>
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
<script setup lang="ts">
|
|
2
|
-
import type { DayInterface } from '../../typings/interfaces/day.interface'
|
|
3
|
-
|
|
4
|
-
defineProps<{
|
|
5
|
-
day: DayInterface
|
|
6
|
-
}>()
|
|
7
|
-
</script>
|
|
8
|
-
|
|
9
|
-
<template>
|
|
10
|
-
<span
|
|
11
|
-
class="txt12 normal block color-black pb-025"
|
|
12
|
-
>
|
|
13
|
-
{{ day.dayName }}
|
|
14
|
-
</span>
|
|
15
|
-
</template>
|