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ACnC,iBAAO,eAAe,CAAC,GAAD,EAAM,MAAI,CAAC,kBAAX,EAA+B,MAAI,CAAC,WAApC,EAAiD,KAAjD,CAAtB;AACD,SAXH;AAYE,oBAAY,iBAAC,GAAD,EAA2B;AACrC,iBAAO,CAAC,MAAI,CAAC,cAAL,CAAoB,KAApB,EAA2B;AACjC,YAAA,WAAW,EAAE;AADoB,WAA3B,EAEL,eAAe,CAAC,GAAD,EAAM,MAAI,CAAC,oBAAX,EAAiC,MAAI,CAAC,aAAtC,EAAqD,IAArD,CAFV,CAAD,CAAP;AAGD;AAhBH;AAkBD;AA5WM;AA3CwB,CAApB,C","sourcesContent":["// Styles\nimport './calendar-with-events.sass'\n\n// Types\nimport { VNode, VNodeData } from 'vue'\n\n// Mixins\nimport CalendarBase from './calendar-base'\n\n// Util\nimport props from '../util/props'\nimport {\n VTimestamp,\n getDayIdentifier,\n parseTime,\n} from '../util/timestamp'\nimport {\n VEventParsed,\n VEventInput,\n parseEvent,\n isEventOn,\n} from '../util/events'\n\n// Types\ntype VColorFunction = (event: VEventInput) => string\n\ntype VNameFunction = (event: VEventParsed, timedEvent: boolean) => string\n\ntype VTimeToY = (time: VTimestamp | number | string) => number\n\ntype VEventResetCheck = (date: VTimestamp) => void\n\ntype VEventVisualGetOffset = (visual: VEventVisual, visuals: VEventVisual[]) => number\n\ntype VEventGetter = (day: VTimestamp) => VEventParsed[]\n\ntype VEventVisualGetter = (events: VEventParsed[], timed: boolean) => VEventVisual[]\n\ntype VEventVisualToNode = (visual: VEventVisual, index: number, day: D) => VNode\n\ntype VDailyEventsMap = {\n [date: string]: {\n parent: HTMLElement\n more: HTMLElement | null\n events: HTMLElement[]\n }\n}\n\ninterface VEventVisual {\n offset: number\n event: VEventParsed\n columnCount: number\n column: number\n}\n\ninterface VDaySlotScope extends VTimestamp {\n outside: boolean\n index: number\n}\n\ninterface VDayBodySlotScope extends VDaySlotScope {\n timeToY: VTimeToY\n}\n\n/* @vue/component */\nexport default CalendarBase.extend({\n name: 'calendar-with-events',\n\n props: props.events,\n\n computed: {\n noEvents (): boolean {\n return this.events.length === 0\n },\n parsedEvents (): VEventParsed[] {\n return this.events.map((input, index) => parseEvent(input, index, this.eventStart, this.eventEnd))\n },\n eventColorFunction (): VColorFunction {\n return typeof this.eventColor === 'function'\n ? this.eventColor as VColorFunction\n : () => (this.eventColor as string)\n },\n eventTextColorFunction (): VColorFunction {\n return typeof this.eventTextColor === 'function'\n ? this.eventTextColor as VColorFunction\n : () => (this.eventTextColor as string)\n },\n eventNameFunction (): VNameFunction {\n return typeof this.eventName === 'function'\n ? this.eventName as VNameFunction\n : (event, timedEvent) => {\n const name = event.input[this.eventName as string] as string\n if (event.start.hasTime) {\n if (timedEvent) {\n const showStart = event.start.hour < 12 && event.end.hour >= 12\n const start = this.formatTime(event.start, showStart)\n const end = this.formatTime(event.end, true)\n return `${name}
${start} - ${end}`\n } else {\n const time = this.formatTime(event.start, true)\n return `${time} ${name}`\n }\n }\n return name\n }\n },\n },\n\n methods: {\n formatTime (withTime: VTimestamp, ampm: boolean): string {\n const suffix = ampm ? (withTime.hour < 12 ? 'a' : 'p') : ''\n const hour = withTime.hour % 12 || 12\n const minute = withTime.minute\n\n return minute > 0\n ? (minute < 10\n ? `${hour}:0${minute}${suffix}`\n : `${hour}:${minute}${suffix}`)\n : `${hour}${suffix}`\n },\n updateEventVisibility () {\n if (this.noEvents || !this.eventMore) {\n return\n }\n\n const eventHeight = this.eventHeight\n const eventsMap = this.getEventsMap()\n\n for (const date in eventsMap) {\n const { parent, events, more } = eventsMap[date]\n if (!more) {\n break\n }\n const parentBounds = parent.getBoundingClientRect()\n const last = events.length - 1\n let hide = false\n let hidden = 0\n for (let i = 0; i <= last; i++) {\n if (!hide) {\n const eventBounds = events[i].getBoundingClientRect()\n hide = eventBounds.bottom + eventHeight > parentBounds.bottom && i !== last\n }\n if (hide) {\n const id = events[i].getAttribute('data-event') as string\n this.hideEvents(id)\n hidden++\n }\n }\n\n if (hide) {\n more.style.display = ''\n more.innerHTML = this.$vuetify.lang.t(this.eventMoreText, hidden)\n } else {\n more.style.display = 'none'\n }\n }\n },\n hideEvents (id: string) {\n const elements = this.$refs.events as HTMLElement[]\n\n elements.forEach(el => {\n if (el.getAttribute('data-event') === id) {\n el.style.display = 'none'\n }\n })\n },\n getEventsMap (): VDailyEventsMap {\n const eventsMap: VDailyEventsMap = {}\n const elements = this.$refs.events as HTMLElement[]\n\n if (!elements || !elements.forEach) {\n return eventsMap\n }\n\n elements.forEach(el => {\n const date = el.getAttribute('data-date')\n if (el.parentElement && date) {\n if (!(date in eventsMap)) {\n eventsMap[date] = {\n parent: el.parentElement,\n more: null,\n events: [],\n }\n }\n if (el.getAttribute('data-more')) {\n eventsMap[date].more = el\n } else {\n eventsMap[date].events.push(el)\n el.style.display = ''\n }\n }\n })\n\n return eventsMap\n },\n genDayEvent ({ offset, event }: VEventVisual, index: number, day: VDaySlotScope): VNode {\n const eventHeight = this.eventHeight\n const eventMarginBottom = this.eventMarginBottom\n const relativeOffset = (offset - index) * (eventHeight + eventMarginBottom) // 1 = margin bottom\n const dayIdentifier = getDayIdentifier(day)\n const start = dayIdentifier === event.startIdentifier\n const end = dayIdentifier === event.endIdentifier\n const scope = { event: event.input, day, outside: day.outside, start, end, timed: false }\n\n return this.genEvent(event, scope, start || day.index === 0, false, {\n staticClass: 'v-event',\n class: {\n 'v-event-start': start,\n 'v-event-end': end,\n },\n style: {\n height: `${eventHeight}px`,\n top: `${relativeOffset}px`,\n 'margin-bottom': `${eventMarginBottom}px`,\n },\n attrs: {\n 'data-date': day.date,\n 'data-event': event.index,\n },\n key: event.index,\n ref: 'events',\n refInFor: true,\n })\n },\n genTimedEvent ({ offset, event, columnCount, column }: VEventVisual, index: number, day: VDayBodySlotScope): VNode {\n const dayIdentifier = getDayIdentifier(day)\n const start = event.startIdentifier >= dayIdentifier\n const end = event.endIdentifier > dayIdentifier\n const top = start ? day.timeToY(event.start) : 0\n const bottom = end ? day.timeToY(1440) : day.timeToY(event.end)\n const height = Math.max(this.eventHeight, bottom - top)\n const left = columnCount === -1\n ? offset * 5\n : column * 100 / columnCount\n const right = columnCount === -1\n ? 0\n : Math.max(0, (columnCount - column - 2) * 100 / columnCount + 10)\n const scope = { event: event.input, day, outside: day.outside, start, end, timed: true }\n\n return this.genEvent(event, scope, true, true, {\n staticClass: 'v-event-timed',\n style: {\n top: `${top}px`,\n height: `${height}px`,\n left: `${left}%`,\n right: `${right}%`,\n },\n })\n },\n genEvent (event: VEventParsed, scope: object, showName: boolean, timedEvent: boolean, data: VNodeData): VNode {\n const slot = this.$scopedSlots.event\n const text = this.eventTextColorFunction(event.input)\n const background = this.eventColorFunction(event.input)\n\n return this.$createElement('div',\n this.setTextColor(text,\n this.setBackgroundColor(background, {\n on: this.getDefaultMouseEventHandlers(':event', nativeEvent => ({ ...scope, nativeEvent })),\n directives: [{\n name: 'ripple',\n value: this.eventRipple != null ? this.eventRipple : true,\n }],\n ...data,\n })\n ), slot\n ? slot(scope)\n : (showName ? [this.genName(event, timedEvent)] : undefined)\n )\n },\n genName (event: VEventParsed, timedEvent: boolean): VNode {\n return this.$createElement('div', {\n staticClass: 'pl-1',\n domProps: {\n innerHTML: this.eventNameFunction(event, timedEvent),\n },\n })\n },\n genMore (day: VTimestamp): VNode {\n return this.$createElement('div', {\n staticClass: 'v-event-more pl-1',\n attrs: {\n 'data-date': day.date,\n 'data-more': 1,\n },\n directives: [{\n name: 'ripple',\n value: this.eventRipple != null ? this.eventRipple : true,\n }],\n on: {\n click: () => this.$emit('click:more', day),\n },\n style: {\n display: 'none',\n },\n ref: 'events',\n refInFor: true,\n })\n },\n getEventsForDay (day: VTimestamp): VEventParsed[] {\n const identifier = getDayIdentifier(day)\n\n return this.parsedEvents.filter(\n event => isEventOn(event, identifier)\n )\n },\n getEventsForDayAll (day: VTimestamp): VEventParsed[] {\n const identifier = getDayIdentifier(day)\n\n return this.parsedEvents.filter(\n event => event.allDay && isEventOn(event, identifier)\n )\n },\n getEventsForDayTimed (day: VTimestamp): VEventParsed[] {\n const identifier = getDayIdentifier(day)\n\n return this.parsedEvents.filter(\n event => !event.allDay && isEventOn(event, identifier)\n )\n },\n isSameColumn (a: VEventVisual, b: VEventVisual): boolean {\n const astart = parseTime(a.event.start) as number\n const bstart = parseTime(b.event.start) as number\n const diff = astart - bstart\n const abs = diff < 0 ? -diff : diff\n\n return abs < this.eventOverlapThreshold\n },\n isOverlapping (a: VEventVisual, b: VEventVisual): boolean {\n const astart = parseTime(a.event.start) as number\n const bstart = parseTime(b.event.start) as number\n\n if (a.offset < b.offset && bstart < astart) {\n const aend = astart + this.eventOverlapThreshold\n const bend = parseTime(b.event.end) as number\n return !(astart >= bend || aend <= bstart)\n }\n\n return false\n },\n getScopedSlots () {\n if (this.noEvents) {\n return this.$scopedSlots\n }\n\n /**\n * Over the span of a week (for example) we want to maintain an event in the same row (for weekly and monthly views).\n * We keep track of those rows by indexToOffset. If the value in that array is -1, then we can place an event at that spot.\n * For a daily view with timed events we arrange them based on columns and offsets. If two or more events start at around the\n * same time (eventOverlapThreshold) they go into columns. If one event starts inside another it is indented the appropriate amount.\n * If one event overlaps another after those adjustments are made those events are placed in columns together instead of any defined\n * indents.\n */\n\n const parsedEvents = this.parsedEvents\n const indexToOffset: number[] = parsedEvents.map(event => -1)\n const resetOnWeekday = this.weekdays[0]\n\n const checkReset: VEventResetCheck = day => {\n if (day.weekday === resetOnWeekday) {\n for (let i = 0; i < indexToOffset.length; i++) {\n indexToOffset[i] = -1\n }\n }\n }\n\n const getOffset: VEventVisualGetOffset = (visual, visuals) => {\n let offset = indexToOffset[visual.event.index]\n if (offset === -1) {\n let min = Number.MAX_SAFE_INTEGER\n let max = -1\n visuals.forEach(other => {\n const otherOffset = indexToOffset[other.event.index]\n if (otherOffset !== -1) {\n min = Math.min(min, otherOffset)\n max = Math.max(max, otherOffset)\n }\n })\n offset = min > 0 && max !== -1 ? min - 1 : max + 1\n indexToOffset[visual.event.index] = offset\n }\n return offset\n }\n\n const getVisuals: VEventVisualGetter = (events, timed) => {\n const visuals: VEventVisual[] = events.map(event => ({ event, offset: 0, columnCount: -1, column: -1 }))\n // sort events by start date/time\n visuals.sort((a, b) => a.event.startTimestampIdentifier - b.event.startTimestampIdentifier)\n if (timed) {\n // timed events can be organized into columns\n visuals.forEach(visual => {\n if (visual.columnCount !== -1) {\n return\n }\n const columns: VEventVisual[] = []\n visuals.forEach(other => {\n if (other.columnCount === -1 && this.isSameColumn(visual, other)) {\n columns.push(other)\n }\n })\n if (columns.length > 1) {\n columns.forEach((visual, visualIndex) => {\n visual.column = visualIndex\n visual.columnCount = columns.length\n })\n }\n })\n // for any not organized into columns, if they overlap another event\n // not in a column they are offset\n visuals.forEach(visual => {\n if (visual.columnCount === -1) {\n visuals.forEach(other => {\n const otherOffset = indexToOffset[other.event.index]\n if (otherOffset !== -1 && other.event.endTimestampIdentifier <= visual.event.startTimestampIdentifier) {\n indexToOffset[other.event.index] = -1\n }\n })\n visual.offset = getOffset(visual, visuals)\n }\n })\n // for any not organized into columns, if a previous event overlaps this event\n // join them into the columns\n visuals.forEach(visual => {\n if (visual.columnCount === -1) {\n const columns: VEventVisual[] = [visual]\n visuals.forEach(other => {\n if (other !== visual && other.columnCount === -1 && this.isOverlapping(visual, other)) {\n columns.push(other)\n }\n })\n if (columns.length > 1) {\n columns.forEach((visual, visualIndex) => {\n visual.column = visualIndex\n visual.columnCount = columns.length\n })\n }\n }\n })\n } else {\n visuals.forEach(visual => {\n visual.offset = getOffset(visual, visuals)\n })\n }\n visuals.sort((a, b) => (a.column - b.column) || (a.offset - b.offset))\n return visuals\n }\n\n const getSlotChildren = (day: D, getter: VEventGetter, mapper: VEventVisualToNode, timed: boolean) => {\n checkReset(day)\n const events = getter(day)\n return events.length === 0\n ? undefined\n : getVisuals(events, timed).map((visual, index) => mapper(visual, index, day))\n }\n\n return {\n ...this.$scopedSlots,\n day: (day: VDaySlotScope) => {\n const children = getSlotChildren(day, this.getEventsForDay, this.genDayEvent, false)\n if (children && children.length > 0 && this.eventMore) {\n children.push(this.genMore(day))\n }\n return children\n },\n 'day-header': (day: VDaySlotScope) => {\n return getSlotChildren(day, this.getEventsForDayAll, this.genDayEvent, false)\n },\n 'day-body': (day: VDayBodySlotScope) => {\n return [this.$createElement('div', {\n staticClass: 'v-event-timed-container',\n }, getSlotChildren(day, this.getEventsForDayTimed, this.genTimedEvent, true))]\n },\n }\n },\n },\n})\n"],"sourceRoot":"","file":"calendar-with-events.js"}