@operato/event-view 8.0.0-alpha.37 → 8.0.0-alpha.53
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/CHANGELOG.md +9 -0
- package/dist/src/calendar-monthly-styles.js +13 -1
- package/dist/src/calendar-monthly-styles.js.map +1 -1
- package/dist/src/calendar-monthly.d.ts +5 -7
- package/dist/src/calendar-monthly.js +62 -6
- package/dist/src/calendar-monthly.js.map +1 -1
- package/dist/src/calendar-weekly-styles.js +12 -1
- package/dist/src/calendar-weekly-styles.js.map +1 -1
- package/dist/src/calendar-weekly.d.ts +5 -0
- package/dist/src/calendar-weekly.js +73 -3
- package/dist/src/calendar-weekly.js.map +1 -1
- package/dist/stories/index.stories.js +8 -1
- package/dist/stories/index.stories.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +2 -2
- package/src/calendar-monthly-styles.ts +13 -1
- package/src/calendar-monthly.ts +79 -7
- package/src/calendar-weekly-styles.ts +12 -1
- package/src/calendar-weekly.ts +95 -3
- package/stories/index.stories.ts +8 -1
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,15 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
## [8.0.0-alpha.53](https://github.com/hatiolab/operato/compare/v8.0.0-alpha.52...v8.0.0-alpha.53) (2024-12-08)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### :bug: Bug Fix
|
|
10
|
+
|
|
11
|
+
* calendar date range selection ([3645ba2](https://github.com/hatiolab/operato/commit/3645ba29b3d44d9cd93d24ea783101e296484257))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
6
15
|
## [8.0.0-alpha.37](https://github.com/hatiolab/operato/compare/v8.0.0-alpha.36...v8.0.0-alpha.37) (2024-10-20)
|
|
7
16
|
|
|
8
17
|
|
|
@@ -44,7 +44,11 @@ export const CalendarMonthlyStyles = css `
|
|
|
44
44
|
border: var(--calendar-monthly-border, 1px solid rgba(0, 0, 0, 0.1));
|
|
45
45
|
border-width: var(--calendar-monthly-border-width, 0 1px 1px 0px);
|
|
46
46
|
opacity: var(--calendar-monthly-opacity);
|
|
47
|
+
|
|
48
|
+
user-select: none;
|
|
49
|
+
touch-action: none;
|
|
47
50
|
}
|
|
51
|
+
|
|
48
52
|
li:nth-child(7n + 1) {
|
|
49
53
|
border-left-width: 1px;
|
|
50
54
|
}
|
|
@@ -59,10 +63,15 @@ export const CalendarMonthlyStyles = css `
|
|
|
59
63
|
|
|
60
64
|
li[current-month] {
|
|
61
65
|
background-color: var(--calendar-current-month-background-color, var(--md-sys-color-surface-variant));
|
|
62
|
-
color: var(--calendar-current-month-color, var(--md-sys-color-on-surface));
|
|
66
|
+
color: var(--calendar-current-month-color, var(--md-sys-color-on-surface-variant));
|
|
63
67
|
opacity: 1;
|
|
64
68
|
}
|
|
65
69
|
|
|
70
|
+
li[selected] {
|
|
71
|
+
background-color: var(--calendar-monthly-selected-background-color, var(--md-sys-color-tertiary-container));
|
|
72
|
+
color: var(--calendar-monthly-selected-color, var(--md-sys-color-on-tertiary-container));
|
|
73
|
+
}
|
|
74
|
+
|
|
66
75
|
li[date] {
|
|
67
76
|
min-height: var(--calendar-monthly-date-min-height, 120px);
|
|
68
77
|
}
|
|
@@ -96,6 +105,9 @@ export const CalendarMonthlyStyles = css `
|
|
|
96
105
|
border-width: var(--calendar-monthly-event-border-width);
|
|
97
106
|
margin: var(--calendar-monthly-event-margin, 0 0 4px 0);
|
|
98
107
|
padding: var(--calendar-monthly-event-padding, 2px 4px 2px 4px);
|
|
108
|
+
|
|
109
|
+
user-select: all;
|
|
110
|
+
touch-action: all;
|
|
99
111
|
}
|
|
100
112
|
`;
|
|
101
113
|
//# sourceMappingURL=calendar-monthly-styles.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"calendar-monthly-styles.js","sourceRoot":"","sources":["../../src/calendar-monthly-styles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAA;AAEzB,MAAM,CAAC,MAAM,qBAAqB,GAAG,GAAG,CAAA
|
|
1
|
+
{"version":3,"file":"calendar-monthly-styles.js","sourceRoot":"","sources":["../../src/calendar-monthly-styles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAA;AAEzB,MAAM,CAAC,MAAM,qBAAqB,GAAG,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA8GvC,CAAA","sourcesContent":["import { css } from 'lit'\n\nexport const CalendarMonthlyStyles = css`\n :host {\n display: flex;\n flex-direction: column;\n\n --md-text-button-container-height: 24px;\n }\n\n [head] {\n display: flex;\n align-items: center;\n }\n\n [this-month] {\n font-size: x-large;\n }\n\n [nav] {\n margin-left: auto;\n }\n\n ::slotted(*) {\n color: var(--md-sys-color-secondary);\n }\n\n ol {\n flex: 1;\n\n display: grid;\n grid-template-columns: repeat(7, 1fr);\n grid-template-rows: max-content;\n\n padding: 0;\n margin: var(--calendar-monthly-ol-margin, 9px 0);\n border-top: var(--calendar-monthly-ol-top-border, 3px solid #999);\n }\n\n li {\n position: relative;\n\n min-height: 10%;\n list-style: none;\n border: var(--calendar-monthly-border, 1px solid rgba(0, 0, 0, 0.1));\n border-width: var(--calendar-monthly-border-width, 0 1px 1px 0px);\n opacity: var(--calendar-monthly-opacity);\n\n user-select: none;\n touch-action: none;\n }\n\n li:nth-child(7n + 1) {\n border-left-width: 1px;\n }\n\n li[day-of-week] {\n opacity: 1;\n background-color: var(--calendar-current-week-background-color, var(--md-sys-color-surface-variant));\n color: var(--calendar-current-week-color, var(--md-sys-color-on-surface));\n padding: var(--calendar-monthly-label-padding);\n text-align: center;\n }\n\n li[current-month] {\n background-color: var(--calendar-current-month-background-color, var(--md-sys-color-surface-variant));\n color: var(--calendar-current-month-color, var(--md-sys-color-on-surface-variant));\n opacity: 1;\n }\n\n li[selected] {\n background-color: var(--calendar-monthly-selected-background-color, var(--md-sys-color-tertiary-container));\n color: var(--calendar-monthly-selected-color, var(--md-sys-color-on-tertiary-container));\n }\n\n li[date] {\n min-height: var(--calendar-monthly-date-min-height, 120px);\n }\n\n span[date-label] {\n display: block;\n margin: var(--calendar-monthly-date-label-margin);\n text-align: var(--calendar-monthly-label-align, left);\n }\n\n li[today] > span[date-label] {\n display: inline-block;\n background-color: var(--calendar-monthly-date-label-background-color, #cc3300);\n padding: var(--calendar-monthly-date-label-padding);\n border-radius: var(--calendar-monthly-date-label-border-radius, 999em);\n color: var(--calendar-monthly-date-label-color, #fff);\n min-width: 16px;\n text-align: center;\n }\n\n [date] div {\n display: block;\n font-size: small;\n }\n\n [event] {\n display: block;\n background-color: var(--calendar-monthly-background-color);\n color: var(--calendar-monthly-color);\n border: var(--calendar-monthly-event-border);\n border-width: var(--calendar-monthly-event-border-width);\n margin: var(--calendar-monthly-event-margin, 0 0 4px 0);\n padding: var(--calendar-monthly-event-padding, 2px 4px 2px 4px);\n\n user-select: all;\n touch-action: all;\n }\n`\n"]}
|
|
@@ -9,15 +9,13 @@ export declare class CalendarMonthly extends LitElement {
|
|
|
9
9
|
month: number;
|
|
10
10
|
calendar?: CALENDAR;
|
|
11
11
|
eventMap?: Map<Date, BizEvent[]>;
|
|
12
|
+
selections?: [Date, Date] | [];
|
|
13
|
+
pointerDownDate?: Date | null;
|
|
12
14
|
render(): import("lit-html").TemplateResult<1>;
|
|
13
15
|
updated(changes: PropertyValues<this>): Promise<void>;
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
thisMonth?: boolean;
|
|
18
|
-
thisWeek?: boolean;
|
|
19
|
-
today?: boolean;
|
|
20
|
-
}): void;
|
|
16
|
+
handlePointerDown(event: PointerEvent): void;
|
|
17
|
+
handlePointerMove(event: PointerEvent): void;
|
|
18
|
+
handlePointerUp(event: PointerEvent): void;
|
|
21
19
|
moveTo(month: Dayjs): void;
|
|
22
20
|
createDaysForCurrentMonth(year: number, month: number): CALENDAR;
|
|
23
21
|
createDaysForPreviousMonth(year: number, month: number, currentMonth: CALENDAR): CALENDAR;
|
|
@@ -41,16 +41,25 @@ let CalendarMonthly = class CalendarMonthly extends LitElement {
|
|
|
41
41
|
<slot></slot>
|
|
42
42
|
</div>
|
|
43
43
|
|
|
44
|
-
<ol
|
|
44
|
+
<ol
|
|
45
|
+
@pointerdown=${this.handlePointerDown}
|
|
46
|
+
@pointermove=${this.handlePointerMove}
|
|
47
|
+
@pointerup=${this.handlePointerUp}
|
|
48
|
+
>
|
|
45
49
|
${WEEKDAYS.map(date => html ` <li day-of-week>${date}</li> `)}
|
|
46
|
-
${this.calendar?.map(date =>
|
|
47
|
-
|
|
50
|
+
${this.calendar?.map(date => {
|
|
51
|
+
const [from, to] = this.selections || [];
|
|
52
|
+
const { date: thisDate } = date;
|
|
53
|
+
const selected = from && to && thisDate >= from && thisDate <= to;
|
|
54
|
+
return html `
|
|
55
|
+
<li ?today=${date.today} ?current-month=${date.thisMonth} ?selected=${selected} .date=${thisDate} date>
|
|
48
56
|
<span date-label>${date.label}</span>
|
|
49
57
|
<div>
|
|
50
58
|
${(this.eventMap?.get(date?.date) || []).map(({ title, color, template }) => template ? template : html `<span event .style="border-color: ${color};">${title}</span>`)}
|
|
51
59
|
</div>
|
|
52
60
|
</li>
|
|
53
|
-
|
|
61
|
+
`;
|
|
62
|
+
})}
|
|
54
63
|
</ol>
|
|
55
64
|
`;
|
|
56
65
|
}
|
|
@@ -66,12 +75,53 @@ let CalendarMonthly = class CalendarMonthly extends LitElement {
|
|
|
66
75
|
this.calendar = calendar;
|
|
67
76
|
}
|
|
68
77
|
}
|
|
69
|
-
|
|
78
|
+
handlePointerDown(event) {
|
|
79
|
+
const target = event.target;
|
|
80
|
+
if (!target.hasAttribute('date') && !target.hasAttribute('date-label')) {
|
|
81
|
+
return;
|
|
82
|
+
}
|
|
83
|
+
const dateElement = target.closest('[date]');
|
|
84
|
+
const from = dateElement.date;
|
|
85
|
+
this.pointerDownDate = from;
|
|
86
|
+
// 캡처를 설정하지 않음(Touch 디바이스에서 중요)
|
|
87
|
+
target.releasePointerCapture(event.pointerId);
|
|
88
|
+
event.preventDefault();
|
|
89
|
+
}
|
|
90
|
+
handlePointerMove(event) {
|
|
91
|
+
const from = this.pointerDownDate;
|
|
92
|
+
if (!from) {
|
|
93
|
+
return;
|
|
94
|
+
}
|
|
95
|
+
const target = event.target;
|
|
96
|
+
const dateElement = target.closest('[date]');
|
|
97
|
+
if (!dateElement) {
|
|
98
|
+
return;
|
|
99
|
+
}
|
|
100
|
+
const date = dateElement.date;
|
|
101
|
+
this.selections = from > date ? [date, from] : [from, date];
|
|
102
|
+
// 캡처를 설정하지 않음(Touch 디바이스에서 중요)
|
|
103
|
+
target.releasePointerCapture(event.pointerId);
|
|
104
|
+
event.preventDefault();
|
|
105
|
+
}
|
|
106
|
+
handlePointerUp(event) {
|
|
107
|
+
const from = this.pointerDownDate;
|
|
108
|
+
this.pointerDownDate = null;
|
|
109
|
+
if (!from) {
|
|
110
|
+
return;
|
|
111
|
+
}
|
|
112
|
+
const target = event.target;
|
|
113
|
+
const dateElement = target.closest('[date]');
|
|
114
|
+
if (!dateElement) {
|
|
115
|
+
return;
|
|
116
|
+
}
|
|
117
|
+
const date = dateElement.date;
|
|
118
|
+
this.selections = from > date ? [date, from] : [from, date];
|
|
70
119
|
this.dispatchEvent(new CustomEvent('select-date', {
|
|
71
|
-
detail:
|
|
120
|
+
detail: this.selections,
|
|
72
121
|
bubbles: true,
|
|
73
122
|
composed: true
|
|
74
123
|
}));
|
|
124
|
+
event.preventDefault();
|
|
75
125
|
}
|
|
76
126
|
moveTo(month) {
|
|
77
127
|
this.year = month.year();
|
|
@@ -136,6 +186,12 @@ __decorate([
|
|
|
136
186
|
__decorate([
|
|
137
187
|
state()
|
|
138
188
|
], CalendarMonthly.prototype, "eventMap", void 0);
|
|
189
|
+
__decorate([
|
|
190
|
+
state()
|
|
191
|
+
], CalendarMonthly.prototype, "selections", void 0);
|
|
192
|
+
__decorate([
|
|
193
|
+
state()
|
|
194
|
+
], CalendarMonthly.prototype, "pointerDownDate", void 0);
|
|
139
195
|
CalendarMonthly = __decorate([
|
|
140
196
|
customElement('calendar-monthly')
|
|
141
197
|
], CalendarMonthly);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"calendar-monthly.js","sourceRoot":"","sources":["../../src/calendar-monthly.ts"],"names":[],"mappings":";AAAA,OAAO,qCAAqC,CAAA;AAE5C,OAAO,KAAgB,MAAM,iBAAiB,CAAA;AAC9C,OAAO,EAAE,IAAI,EAAE,UAAU,EAAkB,MAAM,KAAK,CAAA;AACtD,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAA;AAElE,OAAO,EAAE,qBAAqB,EAAE,MAAM,2BAA2B,CAAA;AACjE,OAAO,EAAsB,QAAQ,EAAiB,OAAO,EAAE,MAAM,SAAS,CAAA;AAGvE,IAAM,eAAe,GAArB,MAAM,eAAgB,SAAQ,UAAU;IAAxC;;QAKI,SAAI,GAAW,KAAK,EAAE,CAAC,IAAI,EAAE,CAAA;QAC7B,UAAK,GAAW,KAAK,EAAE,CAAC,KAAK,EAAE,CAAA;IAmI1C,CAAC;aAxIQ,WAAM,GAAG,CAAC,qBAAqB,CAAC,AAA1B,CAA0B;IASvC,MAAM;QACJ,OAAO,IAAI,CAAA;;6BAEc,KAAK,CAAC,IAAI,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,CAAC,MAAM,CAAC,QAAQ,IAAI,CAAC,IAAI;;;;qBAI9E,GAAG,EAAE;YACZ,IAAI,CAAC,MAAM,CAAC,KAAK,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B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;sDAA8B;AAEhD;IAAR,KAAK,EAAE;6CAA8B;AAC7B;IAAR,KAAK,EAAE;8CAAgC;AAC/B;IAAR,KAAK,EAAE;iDAAoB;AACnB;IAAR,KAAK,EAAE;iDAAiC;AAR9B,eAAe;IAD3B,aAAa,CAAC,kBAAkB,CAAC;GACrB,eAAe,CAyI3B","sourcesContent":["import '@material/web/button/text-button.js'\n\nimport dayjs, { Dayjs } from 'dayjs/esm/index'\nimport { html, LitElement, PropertyValues } from 'lit'\nimport { customElement, property, state } from 'lit/decorators.js'\n\nimport { CalendarMonthlyStyles } from './calendar-monthly-styles'\nimport { BizEvent, CALENDAR, WEEKDAYS, EventProvider, isToday } from './types'\n\n@customElement('calendar-monthly')\nexport class CalendarMonthly extends LitElement {\n static styles = [CalendarMonthlyStyles]\n\n @property({ type: Object }) eventProvider?: EventProvider\n\n @state() year: number = dayjs().year()\n @state() month: number = dayjs().month()\n @state() calendar?: CALENDAR\n @state() eventMap?: Map<Date, BizEvent[]>\n\n render() {\n return html`\n <div head>\n <div this-month><b>${dayjs(new Date(this.year, this.month)).format('MMMM')}</b> ${this.year}</div>\n\n <div nav>\n <md-text-button\n @click=${() => {\n this.moveTo(dayjs(new Date(this.year, this.month, 1)).subtract(1, 'month'))\n }}\n ><</md-text-button\n >\n <md-text-button\n @click=${() => {\n this.moveTo(dayjs(new Date(dayjs().year(), dayjs().month(), 1)))\n }}\n >Today</md-text-button\n >\n <md-text-button\n @click=${() => {\n this.moveTo(dayjs(new Date(this.year, this.month, 1)).add(1, 'month'))\n }}\n >></md-text-button\n >\n </div>\n\n <slot></slot>\n </div>\n\n <ol>\n ${WEEKDAYS.map(date => html` <li day-of-week>${date}</li> `)}\n ${this.calendar?.map(\n date => html`\n <li ?today=${date.today} ?current-month=${date.thisMonth} date @click=${() => this.selectDate(date)}>\n <span date-label>${date.label}</span>\n <div>\n ${(this.eventMap?.get(date?.date) || []).map(({ title, color, template }) =>\n template ? template : html`<span event .style=\"border-color: ${color};\">${title}</span>`\n )}\n </div>\n </li>\n `\n )}\n </ol>\n `\n }\n\n async updated(changes: PropertyValues<this>) {\n if (changes.has('year') || changes.has('month') || changes.has('eventProvider')) {\n const currentMonth = this.createDaysForCurrentMonth(this.year, this.month)\n\n const calendar = [\n ...this.createDaysForPreviousMonth(this.year, this.month, currentMonth),\n ...currentMonth,\n ...this.createDaysForNextMonth(this.year, this.month, currentMonth)\n ]\n\n this.eventMap = await this.eventProvider?.fetchEventsForCalendar(calendar)\n this.calendar = calendar\n }\n }\n\n selectDate(date: { label: string; date: Date; thisMonth?: boolean; thisWeek?: boolean; today?: boolean }) {\n this.dispatchEvent(\n new CustomEvent('select-date', {\n detail: date,\n bubbles: true,\n composed: true\n })\n )\n }\n\n moveTo(month: Dayjs) {\n this.year = month.year()\n this.month = month.month()\n }\n\n createDaysForCurrentMonth(year: number, month: number): CALENDAR {\n return [...Array(dayjs(new Date(year, month, 1)).daysInMonth())].map((day, index) => {\n const date = new Date(year, month, index + 1)\n const label = index == 0 ? dayjs(date).format('MMM D') : dayjs(date).format('D')\n return {\n date,\n label,\n thisMonth: true,\n today: isToday(date)\n }\n })\n }\n\n createDaysForPreviousMonth(year: number, month: number, currentMonth: CALENDAR): CALENDAR {\n const previousMonth = dayjs(new Date(year, month, 1)).subtract(1, 'month')\n\n const visibleNumberOfDaysFromPreviousMonth = (dayjs(currentMonth[0].date) as any).weekday()\n\n const previousMonthLastMondayDayOfMonth = dayjs(currentMonth[0].date)\n .subtract(visibleNumberOfDaysFromPreviousMonth, 'day')\n .date()\n\n return [...Array(visibleNumberOfDaysFromPreviousMonth)].map((day, index) => {\n const date = new Date(previousMonth.year(), previousMonth.month(), previousMonthLastMondayDayOfMonth + index)\n const label = index == 0 ? dayjs(date).format('MMM D') : dayjs(date).format('D')\n return {\n date,\n label,\n thisMonth: false,\n today: isToday(date)\n }\n })\n }\n\n createDaysForNextMonth(year: number, month: number, currentMonth: CALENDAR): CALENDAR {\n const nextMonth = dayjs(new Date(year, month, 1)).add(1, 'month')\n\n const visibleNumberOfDaysFromNextMonth = 6 - (dayjs(new Date(year, month, currentMonth.length)) as any).weekday()\n\n return [...Array(visibleNumberOfDaysFromNextMonth)].map((day, index) => {\n const date = new Date(nextMonth.year(), nextMonth.month(), index + 1)\n const label = index == 0 ? dayjs(date).format('MMM D') : dayjs(date).format('D')\n return {\n date,\n label,\n thisMonth: false,\n today: isToday(date)\n }\n })\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"calendar-monthly.js","sourceRoot":"","sources":["../../src/calendar-monthly.ts"],"names":[],"mappings":";AAAA,OAAO,qCAAqC,CAAA;AAE5C,OAAO,KAAgB,MAAM,iBAAiB,CAAA;AAC9C,OAAO,EAAE,IAAI,EAAE,UAAU,EAAkB,MAAM,KAAK,CAAA;AACtD,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAA;AAElE,OAAO,EAAE,qBAAqB,EAAE,MAAM,2BAA2B,CAAA;AACjE,OAAO,EAAsB,QAAQ,EAAiB,OAAO,EAAE,MAAM,SAAS,CAAA;AAGvE,IAAM,eAAe,GAArB,MAAM,eAAgB,SAAQ,UAAU;IAAxC;;QAKI,SAAI,GAAW,KAAK,EAAE,CAAC,IAAI,EAAE,CAAA;QAC7B,UAAK,GAAW,KAAK,EAAE,CAAC,KAAK,EAAE,CAAA;IA2M1C,CAAC;aAhNQ,WAAM,GAAG,CAAC,qBAAqB,CAAC,AAA1B,CAA0B;IAYvC,MAAM;QACJ,OAAO,IAAI,CAAA;;6BAEc,KAAK,CAAC,IAAI,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,CAAC,MAAM,CAAC,QAAQ,IAAI,CAAC,IAAI;;;;qBAI9E,GAAG,EAAE;YACZ,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,IAAI,IAAI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AG,CAAC,CAAC,EAAE,OAAO,CAAC,CAAA;QAEjE,MAAM,gCAAgC,GAAG,CAAC,GAAI,KAAK,CAAC,IAAI,IAAI,CAAC,IAAI,EAAE,KAAK,EAAE,YAAY,CAAC,MAAM,CAAC,CAAS,CAAC,OAAO,EAAE,CAAA;QAEjH,OAAO,CAAC,GAAG,KAAK,CAAC,gCAAgC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,KAAK,EAAE,EAAE;YACrE,MAAM,IAAI,GAAG,IAAI,IAAI,CAAC,SAAS,CAAC,IAAI,EAAE,EAAE,SAAS,CAAC,KAAK,EAAE,EAAE,KAAK,GAAG,CAAC,CAAC,CAAA;YACrE,MAAM,KAAK,GAAG,KAAK,IAAI,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,CAAA;YAChF,OAAO;gBACL,IAAI;gBACJ,KAAK;gBACL,SAAS,EAAE,KAAK;gBAChB,KAAK,EAAE,OAAO,CAAC,IAAI,CAAC;aACrB,CAAA;QACH,CAAC,CAAC,CAAA;IACJ,CAAC;;AA7M2B;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;sDAA8B;AAEhD;IAAR,KAAK,EAAE;6CAA8B;AAC7B;IAAR,KAAK,EAAE;8CAAgC;AAC/B;IAAR,KAAK,EAAE;iDAAoB;AACnB;IAAR,KAAK,EAAE;iDAAiC;AAChC;IAAR,KAAK,EAAE;mDAA+B;AAE9B;IAAR,KAAK,EAAE;wDAA8B;AAX3B,eAAe;IAD3B,aAAa,CAAC,kBAAkB,CAAC;GACrB,eAAe,CAiN3B","sourcesContent":["import '@material/web/button/text-button.js'\n\nimport dayjs, { Dayjs } from 'dayjs/esm/index'\nimport { html, LitElement, PropertyValues } from 'lit'\nimport { customElement, property, state } from 'lit/decorators.js'\n\nimport { CalendarMonthlyStyles } from './calendar-monthly-styles'\nimport { BizEvent, CALENDAR, WEEKDAYS, EventProvider, isToday } from './types'\n\n@customElement('calendar-monthly')\nexport class CalendarMonthly extends LitElement {\n static styles = [CalendarMonthlyStyles]\n\n @property({ type: Object }) eventProvider?: EventProvider\n\n @state() year: number = dayjs().year()\n @state() month: number = dayjs().month()\n @state() calendar?: CALENDAR\n @state() eventMap?: Map<Date, BizEvent[]>\n @state() selections?: [Date, Date] | []\n\n @state() pointerDownDate?: Date | null\n\n render() {\n return html`\n <div head>\n <div this-month><b>${dayjs(new Date(this.year, this.month)).format('MMMM')}</b> ${this.year}</div>\n\n <div nav>\n <md-text-button\n @click=${() => {\n this.moveTo(dayjs(new Date(this.year, this.month, 1)).subtract(1, 'month'))\n }}\n ><</md-text-button\n >\n <md-text-button\n @click=${() => {\n this.moveTo(dayjs(new Date(dayjs().year(), dayjs().month(), 1)))\n }}\n >Today</md-text-button\n >\n <md-text-button\n @click=${() => {\n this.moveTo(dayjs(new Date(this.year, this.month, 1)).add(1, 'month'))\n }}\n >></md-text-button\n >\n </div>\n\n <slot></slot>\n </div>\n\n <ol\n @pointerdown=${this.handlePointerDown}\n @pointermove=${this.handlePointerMove}\n @pointerup=${this.handlePointerUp}\n >\n ${WEEKDAYS.map(date => html` <li day-of-week>${date}</li> `)}\n ${this.calendar?.map(date => {\n const [from, to] = this.selections || ([] as any)\n const { date: thisDate } = date\n const selected = from && to && thisDate >= from && thisDate <= to\n\n return html`\n <li ?today=${date.today} ?current-month=${date.thisMonth} ?selected=${selected} .date=${thisDate} date>\n <span date-label>${date.label}</span>\n <div>\n ${(this.eventMap?.get(date?.date) || []).map(({ title, color, template }) =>\n template ? template : html`<span event .style=\"border-color: ${color};\">${title}</span>`\n )}\n </div>\n </li>\n `\n })}\n </ol>\n `\n }\n\n async updated(changes: PropertyValues<this>) {\n if (changes.has('year') || changes.has('month') || changes.has('eventProvider')) {\n const currentMonth = this.createDaysForCurrentMonth(this.year, this.month)\n\n const calendar = [\n ...this.createDaysForPreviousMonth(this.year, this.month, currentMonth),\n ...currentMonth,\n ...this.createDaysForNextMonth(this.year, this.month, currentMonth)\n ]\n\n this.eventMap = await this.eventProvider?.fetchEventsForCalendar(calendar)\n this.calendar = calendar\n }\n }\n\n handlePointerDown(event: PointerEvent) {\n const target = event.target as HTMLElement\n\n if (!target.hasAttribute('date') && !target.hasAttribute('date-label')) {\n return\n }\n\n const dateElement = target.closest('[date]') as HTMLElement\n const from = (dateElement as any).date\n\n this.pointerDownDate = from\n\n // 캡처를 설정하지 않음(Touch 디바이스에서 중요)\n target.releasePointerCapture(event.pointerId)\n\n event.preventDefault()\n }\n\n handlePointerMove(event: PointerEvent) {\n const from = this.pointerDownDate\n\n if (!from) {\n return\n }\n\n const target = event.target as HTMLElement\n const dateElement = target.closest('[date]') as HTMLElement\n\n if (!dateElement) {\n return\n }\n\n const date = (dateElement as any).date\n this.selections = from > date ? [date, from] : [from, date]\n\n // 캡처를 설정하지 않음(Touch 디바이스에서 중요)\n target.releasePointerCapture(event.pointerId)\n\n event.preventDefault()\n }\n\n handlePointerUp(event: PointerEvent) {\n const from = this.pointerDownDate\n\n this.pointerDownDate = null\n\n if (!from) {\n return\n }\n\n const target = event.target as HTMLElement\n const dateElement = target.closest('[date]') as HTMLElement\n\n if (!dateElement) {\n return\n }\n\n const date = (dateElement as any).date\n this.selections = from > date ? [date, from] : [from, date]\n\n this.dispatchEvent(\n new CustomEvent('select-date', {\n detail: this.selections,\n bubbles: true,\n composed: true\n })\n )\n\n event.preventDefault()\n }\n\n moveTo(month: Dayjs) {\n this.year = month.year()\n this.month = month.month()\n }\n\n createDaysForCurrentMonth(year: number, month: number): CALENDAR {\n return [...Array(dayjs(new Date(year, month, 1)).daysInMonth())].map((day, index) => {\n const date = new Date(year, month, index + 1)\n const label = index == 0 ? dayjs(date).format('MMM D') : dayjs(date).format('D')\n return {\n date,\n label,\n thisMonth: true,\n today: isToday(date)\n }\n })\n }\n\n createDaysForPreviousMonth(year: number, month: number, currentMonth: CALENDAR): CALENDAR {\n const previousMonth = dayjs(new Date(year, month, 1)).subtract(1, 'month')\n\n const visibleNumberOfDaysFromPreviousMonth = (dayjs(currentMonth[0].date) as any).weekday()\n\n const previousMonthLastMondayDayOfMonth = dayjs(currentMonth[0].date)\n .subtract(visibleNumberOfDaysFromPreviousMonth, 'day')\n .date()\n\n return [...Array(visibleNumberOfDaysFromPreviousMonth)].map((day, index) => {\n const date = new Date(previousMonth.year(), previousMonth.month(), previousMonthLastMondayDayOfMonth + index)\n const label = index == 0 ? dayjs(date).format('MMM D') : dayjs(date).format('D')\n return {\n date,\n label,\n thisMonth: false,\n today: isToday(date)\n }\n })\n }\n\n createDaysForNextMonth(year: number, month: number, currentMonth: CALENDAR): CALENDAR {\n const nextMonth = dayjs(new Date(year, month, 1)).add(1, 'month')\n\n const visibleNumberOfDaysFromNextMonth = 6 - (dayjs(new Date(year, month, currentMonth.length)) as any).weekday()\n\n return [...Array(visibleNumberOfDaysFromNextMonth)].map((day, index) => {\n const date = new Date(nextMonth.year(), nextMonth.month(), index + 1)\n const label = index == 0 ? dayjs(date).format('MMM D') : dayjs(date).format('D')\n return {\n date,\n label,\n thisMonth: false,\n today: isToday(date)\n }\n })\n }\n}\n"]}
|
|
@@ -50,6 +50,9 @@ export const CalendarWeeklyStyles = css `
|
|
|
50
50
|
border: var(--calendar-weekly-border, 1px solid rgba(0, 0, 0, 0.1));
|
|
51
51
|
border-width: var(--calendar-weekly-border-width, 0 1px 1px 0px);
|
|
52
52
|
opacity: var(--calendar-weekly-opacity);
|
|
53
|
+
|
|
54
|
+
user-select: none;
|
|
55
|
+
touch-action: none;
|
|
53
56
|
}
|
|
54
57
|
|
|
55
58
|
li:nth-child(7n + 1) {
|
|
@@ -65,10 +68,15 @@ export const CalendarWeeklyStyles = css `
|
|
|
65
68
|
}
|
|
66
69
|
|
|
67
70
|
li[current-week] {
|
|
68
|
-
background-color: var(--calendar-current-
|
|
71
|
+
background-color: var(--calendar-current-week-background-color, #fff);
|
|
69
72
|
opacity: 1;
|
|
70
73
|
}
|
|
71
74
|
|
|
75
|
+
li[selected] {
|
|
76
|
+
background-color: var(--calendar-weekly-selected-background-color, var(--md-sys-color-tertiary-container));
|
|
77
|
+
color: var(--calendar-weekly-selected-color, var(--md-sys-color-on-tertiary-container));
|
|
78
|
+
}
|
|
79
|
+
|
|
72
80
|
span[date-label] {
|
|
73
81
|
display: block;
|
|
74
82
|
margin: var(--calendar-weekly-date-label-margin);
|
|
@@ -97,6 +105,9 @@ export const CalendarWeeklyStyles = css `
|
|
|
97
105
|
border-width: var(--calendar-weekly-event-border-width);
|
|
98
106
|
margin: var(--calendar-weekly-event-margin, 0 0 4px 0);
|
|
99
107
|
padding: var(--calendar-weekly-event-padding, 2px 4px 2px 4px);
|
|
108
|
+
|
|
109
|
+
user-select: all;
|
|
110
|
+
touch-action: all;
|
|
100
111
|
}
|
|
101
112
|
`;
|
|
102
113
|
//# sourceMappingURL=calendar-weekly-styles.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"calendar-weekly-styles.js","sourceRoot":"","sources":["../../src/calendar-weekly-styles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAA;AAEzB,MAAM,CAAC,MAAM,oBAAoB,GAAG,GAAG,CAAA
|
|
1
|
+
{"version":3,"file":"calendar-weekly-styles.js","sourceRoot":"","sources":["../../src/calendar-weekly-styles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAA;AAEzB,MAAM,CAAC,MAAM,oBAAoB,GAAG,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA8GtC,CAAA","sourcesContent":["import { css } from 'lit'\n\nexport const CalendarWeeklyStyles = css`\n :host {\n display: flex;\n flex-direction: column;\n color: var(--calendar-weekly-text-color, #585858);\n\n --md-text-button-container-height: 24px;\n --md-sys-color-primary: rgba(var(--secondary-color-rgb), 0.8);\n }\n\n [head] {\n display: flex;\n align-items: center;\n }\n\n [head-week] {\n display: flex;\n align-items: left;\n }\n\n [this-week] {\n font-size: x-large;\n }\n\n [nav] {\n margin-left: auto;\n }\n\n ::slotted(*) {\n color: var(--md-sys-color-primary);\n }\n\n ol {\n flex: 1;\n\n display: grid;\n grid-template-columns: repeat(7, 1fr);\n grid-template-rows: max-content;\n\n padding: 0;\n margin: var(--calendar-weekly-ol-margin, 9px 0);\n border-top: var(--calendar-weekly-ol-top-border, 3px solid #999);\n }\n\n li {\n position: relative;\n\n list-style: none;\n border: var(--calendar-weekly-border, 1px solid rgba(0, 0, 0, 0.1));\n border-width: var(--calendar-weekly-border-width, 0 1px 1px 0px);\n opacity: var(--calendar-weekly-opacity);\n\n user-select: none;\n touch-action: none;\n }\n\n li:nth-child(7n + 1) {\n border-left-width: 1px;\n }\n\n li[day-of-week] {\n opacity: 1;\n background-color: var(--calendar-current-week-background-color, var(--md-sys-color-surface-variant));\n color: var(--calendar-current-week-color, var(--md-sys-color-on-surface));\n padding: var(--calendar-weekly-label-padding);\n text-align: center;\n }\n\n li[current-week] {\n background-color: var(--calendar-current-week-background-color, #fff);\n opacity: 1;\n }\n\n li[selected] {\n background-color: var(--calendar-weekly-selected-background-color, var(--md-sys-color-tertiary-container));\n color: var(--calendar-weekly-selected-color, var(--md-sys-color-on-tertiary-container));\n }\n\n span[date-label] {\n display: block;\n margin: var(--calendar-weekly-date-label-margin);\n text-align: var(--calendar-weekly-label-align, center);\n }\n\n li[today] > span[date-label] {\n display: inline-block;\n background-color: var(--calendar-weekly-date-label-background-color, #cc3300);\n padding: var(--calendar-weekly-date-label-padding);\n border-radius: var(--calendar-weekly-date-label-border-radius, 999em);\n color: var(--calendar-weekly-date-label-color, #fff);\n min-width: 16px;\n text-align: center;\n }\n\n [date] div {\n display: block;\n font-size: small;\n }\n\n [event] {\n display: block;\n background-color: var(--calendar-weekly-background-color);\n border: var(--calendar-weekly-event-border);\n border-width: var(--calendar-weekly-event-border-width);\n margin: var(--calendar-weekly-event-margin, 0 0 4px 0);\n padding: var(--calendar-weekly-event-padding, 2px 4px 2px 4px);\n\n user-select: all;\n touch-action: all;\n }\n`\n"]}
|
|
@@ -10,9 +10,14 @@ export declare class CalendarWeekly extends LitElement {
|
|
|
10
10
|
week: number;
|
|
11
11
|
calendar?: CALENDAR;
|
|
12
12
|
eventMap?: Map<Date, BizEvent[]>;
|
|
13
|
+
selections?: [Date, Date];
|
|
14
|
+
pointerDownDate?: Date | null;
|
|
13
15
|
render(): import("lit-html").TemplateResult<1>;
|
|
14
16
|
updated(changes: PropertyValues<this>): Promise<void>;
|
|
15
17
|
moveTo(year: number, month: number, week: number): void;
|
|
18
|
+
handlePointerDown(event: PointerEvent): void;
|
|
19
|
+
handlePointerMove(event: PointerEvent): void;
|
|
20
|
+
handlePointerUp(event: PointerEvent): void;
|
|
16
21
|
selectDate(date: {
|
|
17
22
|
label: string;
|
|
18
23
|
date: Date;
|
|
@@ -48,16 +48,26 @@ let CalendarWeekly = class CalendarWeekly extends LitElement {
|
|
|
48
48
|
<slot></slot>
|
|
49
49
|
</div>
|
|
50
50
|
|
|
51
|
-
<ol
|
|
51
|
+
<ol
|
|
52
|
+
@pointerdown=${this.handlePointerDown}
|
|
53
|
+
@pointermove=${this.handlePointerMove}
|
|
54
|
+
@pointerup=${this.handlePointerUp}
|
|
55
|
+
>
|
|
52
56
|
${this.calendar?.map((date, index) => {
|
|
57
|
+
const [from, to] = this.selections || [];
|
|
58
|
+
const { date: thisDate } = date;
|
|
59
|
+
const selected = from && to && thisDate >= from && thisDate <= to;
|
|
53
60
|
return html `
|
|
54
|
-
<li ?today=${date.today} day-of-week
|
|
61
|
+
<li ?today=${date.today} day-of-week date .date=${thisDate} ?selected=${selected}>
|
|
55
62
|
<span date-label>${date.label}(${WEEKDAYS[index]})</span>
|
|
56
63
|
</li>
|
|
57
64
|
`;
|
|
58
65
|
})}
|
|
59
66
|
${this.calendar?.map(date => {
|
|
60
|
-
|
|
67
|
+
const [from, to] = this.selections || [];
|
|
68
|
+
const { date: thisDate } = date;
|
|
69
|
+
const selected = from && to && thisDate >= from && thisDate <= to;
|
|
70
|
+
return html `<li date .date=${thisDate} ?selected=${selected}>
|
|
61
71
|
<div>
|
|
62
72
|
${(this.eventMap?.get(date?.date) || []).map(({ title, color, template }) => template ? template : html `<span event .style="border-color: ${color};">${title}</span>`)}
|
|
63
73
|
</div>
|
|
@@ -78,7 +88,61 @@ let CalendarWeekly = class CalendarWeekly extends LitElement {
|
|
|
78
88
|
this.month = month;
|
|
79
89
|
this.week = week;
|
|
80
90
|
}
|
|
91
|
+
handlePointerDown(event) {
|
|
92
|
+
const target = event.target;
|
|
93
|
+
if (!target.hasAttribute('date') && !target.hasAttribute('date-label')) {
|
|
94
|
+
return;
|
|
95
|
+
}
|
|
96
|
+
const dateElement = target.closest('[date]');
|
|
97
|
+
const from = dateElement.date;
|
|
98
|
+
this.pointerDownDate = from;
|
|
99
|
+
// 캡처를 설정하지 않음(Touch 디바이스에서 중요)
|
|
100
|
+
target.releasePointerCapture(event.pointerId);
|
|
101
|
+
event.preventDefault();
|
|
102
|
+
}
|
|
103
|
+
handlePointerMove(event) {
|
|
104
|
+
const from = this.pointerDownDate;
|
|
105
|
+
if (!from) {
|
|
106
|
+
return;
|
|
107
|
+
}
|
|
108
|
+
const target = event.target;
|
|
109
|
+
const dateElement = target.closest('[date]');
|
|
110
|
+
if (!dateElement) {
|
|
111
|
+
return;
|
|
112
|
+
}
|
|
113
|
+
const date = dateElement.date;
|
|
114
|
+
this.selections = from > date ? [date, from] : [from, date];
|
|
115
|
+
// 캡처를 설정하지 않음(Touch 디바이스에서 중요)
|
|
116
|
+
target.releasePointerCapture(event.pointerId);
|
|
117
|
+
event.preventDefault();
|
|
118
|
+
}
|
|
119
|
+
handlePointerUp(event) {
|
|
120
|
+
const from = this.pointerDownDate;
|
|
121
|
+
this.pointerDownDate = null;
|
|
122
|
+
if (!from) {
|
|
123
|
+
return;
|
|
124
|
+
}
|
|
125
|
+
const target = event.target;
|
|
126
|
+
const dateElement = target.closest('[date]');
|
|
127
|
+
if (!dateElement) {
|
|
128
|
+
return;
|
|
129
|
+
}
|
|
130
|
+
const date = dateElement.date;
|
|
131
|
+
this.selections = from > date ? [date, from] : [from, date];
|
|
132
|
+
this.dispatchEvent(new CustomEvent('select-date', {
|
|
133
|
+
detail: this.selections,
|
|
134
|
+
bubbles: true,
|
|
135
|
+
composed: true
|
|
136
|
+
}));
|
|
137
|
+
event.preventDefault();
|
|
138
|
+
}
|
|
81
139
|
selectDate(date) {
|
|
140
|
+
if (date) {
|
|
141
|
+
this.selections = [date.date, date.date];
|
|
142
|
+
}
|
|
143
|
+
else {
|
|
144
|
+
this.selections = undefined;
|
|
145
|
+
}
|
|
82
146
|
this.dispatchEvent(new CustomEvent('select-date', {
|
|
83
147
|
detail: date,
|
|
84
148
|
bubbles: true,
|
|
@@ -125,6 +189,12 @@ __decorate([
|
|
|
125
189
|
__decorate([
|
|
126
190
|
state()
|
|
127
191
|
], CalendarWeekly.prototype, "eventMap", void 0);
|
|
192
|
+
__decorate([
|
|
193
|
+
state()
|
|
194
|
+
], CalendarWeekly.prototype, "selections", void 0);
|
|
195
|
+
__decorate([
|
|
196
|
+
state()
|
|
197
|
+
], CalendarWeekly.prototype, "pointerDownDate", void 0);
|
|
128
198
|
CalendarWeekly = __decorate([
|
|
129
199
|
customElement('calendar-weekly')
|
|
130
200
|
], CalendarWeekly);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"calendar-weekly.js","sourceRoot":"","sources":["../../src/calendar-weekly.ts"],"names":[],"mappings":";AAAA,OAAO,qCAAqC,CAAA;AAE5C,OAAO,KAAgB,MAAM,iBAAiB,CAAA;AAC9C,OAAO,EAAE,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AAM,QAAQ,GAAG,CAAC,CAAA;QAElB,OAAO,CAAC,GAAG,KAAK,CAAC,QAAQ,CAAC,CAAC;aACxB,GAAG,CAAC,CAAC,GAAG,EAAE,KAAK,EAAE,EAAE;YAClB,MAAM,IAAI,GAAG,IAAI,IAAI,CAAC,SAAS,CAAC,IAAI,EAAE,EAAE,SAAS,CAAC,KAAK,EAAE,EAAE,SAAS,CAAC,IAAI,EAAE,GAAG,KAAK,CAAC,CAAA;YACpF,MAAM,KAAK,GAAG,KAAK,CAAC,IAAI,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,CAAA;YACzC,OAAO;gBACL,IAAI;gBACJ,KAAK;gBACL,QAAQ,EAAE,IAAI;gBACd,KAAK,EAAE,OAAO,CAAC,IAAI,CAAC;aACrB,CAAA;QACH,CAAC,CAAC;aACD,OAAO,EAAE,CAAA;IACd,CAAC;;AA/G2B;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;qDAA8B;AAEhD;IAAR,KAAK,EAAE;4CAA8B;AAC7B;IAAR,KAAK,EAAE;6CAAgC;AAC/B;IAAR,KAAK,EAAE;4CAA8B;AAC7B;IAAR,KAAK,EAAE;gDAAoB;AACnB;IAAR,KAAK,EAAE;gDAAiC;AAT9B,cAAc;IAD1B,aAAa,CAAC,iBAAiB,CAAC;GACpB,cAAc,CAmH1B","sourcesContent":["import '@material/web/button/text-button.js'\n\nimport dayjs, { Dayjs } from 'dayjs/esm/index'\nimport { html, LitElement, PropertyValues } from 'lit'\nimport { customElement, property, state } from 'lit/decorators.js'\n\nimport { CalendarWeeklyStyles } from './calendar-weekly-styles'\nimport { BizEvent, CALENDAR, WEEKDAYS, EventProvider, isToday } from './types'\n\n@customElement('calendar-weekly')\nexport class CalendarWeekly extends LitElement {\n static styles = [CalendarWeeklyStyles]\n\n @property({ type: Object }) eventProvider?: EventProvider\n\n @state() year: number = dayjs().year()\n @state() month: number = dayjs().month()\n @state() week: number = dayjs().week()\n @state() calendar?: CALENDAR\n @state() eventMap?: Map<Date, BizEvent[]>\n\n render() {\n return html`\n <div head>\n <div this-week>\n <b>${dayjs(new Date(this.year, this.month)).format('MMMM')}</b> ${this.year} <b>Week ${this.week}</b>\n </div>\n\n <div nav>\n <md-text-button\n @click=${() => {\n const dayJs = this.getLastDateOfWeek(this.year, this.week)\n const prevWeek = dayJs.subtract(1, 'week')\n this.moveTo(prevWeek.year(), prevWeek.month(), prevWeek.week())\n }}\n ><</md-text-button\n >\n <md-text-button\n @click=${() => {\n this.moveTo(dayjs().year(), dayjs().month(), dayjs().week())\n }}\n >Today</md-text-button\n >\n <md-text-button\n @click=${() => {\n const dayJs = this.getLastDateOfWeek(this.year, this.week)\n const nextWeek = dayJs.add(1, 'week')\n this.moveTo(nextWeek.year(), nextWeek.month(), nextWeek.week())\n }}\n >></md-text-button\n >\n </div>\n\n <slot></slot>\n </div>\n\n <ol>\n ${this.calendar?.map((date, index) => {\n return html`\n <li ?today=${date.today} day-of-week @click=${() => this.selectDate(date)}>\n <span date-label>${date.label}(${WEEKDAYS[index]})</span>\n </li>\n `\n })}\n ${this.calendar?.map(date => {\n return html`<li date @click=${() => this.selectDate(date)}>\n <div>\n ${(this.eventMap?.get(date?.date) || []).map(({ title, color, template }) =>\n template ? template : html`<span event .style=\"border-color: ${color};\">${title}</span>`\n )}\n </div>\n </li>`\n })}\n </ol>\n `\n }\n\n async updated(changes: PropertyValues<this>) {\n if (changes.has('year') || changes.has('month') || changes.has('week') || changes.has('eventProvider')) {\n const calendar = this.createDaysForCurrentWeek(this.year, this.week)\n\n this.eventMap = await this.eventProvider?.fetchEventsForCalendar(calendar)\n this.calendar = calendar\n }\n }\n\n moveTo(year: number, month: number, week: number) {\n this.year = year\n this.month = month\n this.week = week\n }\n\n selectDate(date: { label: string; date: Date; thisMonth?: boolean; thisWeek?: boolean; today?: boolean }) {\n this.dispatchEvent(\n new CustomEvent('select-date', {\n detail: date,\n bubbles: true,\n composed: true\n })\n )\n }\n\n getLastDateOfWeek(year: number, week: number): Dayjs {\n const firstWeekLastDay = dayjs(new Date(year, 0, 1)).endOf('w')\n week -= 1 // one-based week, so need the minus-one\n return firstWeekLastDay.add(week, 'w')\n }\n\n createDaysForCurrentWeek(year: number, week: number): CALENDAR {\n const lastDayjs = this.getLastDateOfWeek(year, week)\n const weekDays = 7\n\n return [...Array(weekDays)]\n .map((day, index) => {\n const date = new Date(lastDayjs.year(), lastDayjs.month(), lastDayjs.date() - index)\n const label = dayjs(date).format('MM-DD')\n return {\n date,\n label,\n thisWeek: true,\n today: isToday(date)\n }\n })\n .reverse()\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"calendar-weekly.js","sourceRoot":"","sources":["../../src/calendar-weekly.ts"],"names":[],"mappings":";AAAA,OAAO,qCAAqC,CAAA;AAE5C,OAAO,KAAgB,MAAM,iBAAiB,CAAA;AAC9C,OAAO,EAAE,IAAI,EAAE,UAAU,EAAkB,MAAM,KAAK,CAAA;AACtD,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAA;AAElE,OAAO,EAAE,oBAAoB,EAAE,MAAM,0BAA0B,CAAA;AAC/D,OAAO,EAAsB,QAAQ,EAAiB,OAAO,EAAE,MAAM,SAAS,CAAA;AAGvE,IAAM,cAAc,GAApB,MAAM,cAAe,SAAQ,UAAU;IAAvC;;QAKI,SAAI,GAAW,KAAK,EAAE,CAAC,IAAI,EAAE,CAAA;QAC7B,UAAK,GAAW,KAAK,EAAE,CAAC,KAAK,EAAE,CAAA;QAC/B,SAAI,GAAW,KAAK,EAAE,CAAC,IAAI,EAAE,CAAA;IAwMxC,CAAC;aA9MQ,WAAM,GAAG,CAAC,oBAAoB,CAAC,AAAzB,CAAyB;IAatC,MAAM;QACJ,OAAO,IAAI,CAAA;;;eAGA,KAAK,CAAC,IAAI,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,CAAC,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CAAA;IACd,CAAC;;AA3M2B;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;qDAA8B;AAEhD;IAAR,KAAK,EAAE;4CAA8B;AAC7B;IAAR,KAAK,EAAE;6CAAgC;AAC/B;IAAR,KAAK,EAAE;4CAA8B;AAC7B;IAAR,KAAK,EAAE;gDAAoB;AACnB;IAAR,KAAK,EAAE;gDAAiC;AAChC;IAAR,KAAK,EAAE;kDAA0B;AAEzB;IAAR,KAAK,EAAE;uDAA8B;AAZ3B,cAAc;IAD1B,aAAa,CAAC,iBAAiB,CAAC;GACpB,cAAc,CA+M1B","sourcesContent":["import '@material/web/button/text-button.js'\n\nimport dayjs, { Dayjs } from 'dayjs/esm/index'\nimport { html, LitElement, PropertyValues } from 'lit'\nimport { customElement, property, state } from 'lit/decorators.js'\n\nimport { CalendarWeeklyStyles } from './calendar-weekly-styles'\nimport { BizEvent, CALENDAR, WEEKDAYS, EventProvider, isToday } from './types'\n\n@customElement('calendar-weekly')\nexport class CalendarWeekly extends LitElement {\n static styles = [CalendarWeeklyStyles]\n\n @property({ type: Object }) eventProvider?: EventProvider\n\n @state() year: number = dayjs().year()\n @state() month: number = dayjs().month()\n @state() week: number = dayjs().week()\n @state() calendar?: CALENDAR\n @state() eventMap?: Map<Date, BizEvent[]>\n @state() selections?: [Date, Date]\n\n @state() pointerDownDate?: Date | null\n\n render() {\n return html`\n <div head>\n <div this-week>\n <b>${dayjs(new Date(this.year, this.month)).format('MMMM')}</b> ${this.year} <b>Week ${this.week}</b>\n </div>\n\n <div nav>\n <md-text-button\n @click=${() => {\n const dayJs = this.getLastDateOfWeek(this.year, this.week)\n const prevWeek = dayJs.subtract(1, 'week')\n this.moveTo(prevWeek.year(), prevWeek.month(), prevWeek.week())\n }}\n ><</md-text-button\n >\n <md-text-button\n @click=${() => {\n this.moveTo(dayjs().year(), dayjs().month(), dayjs().week())\n }}\n >Today</md-text-button\n >\n <md-text-button\n @click=${() => {\n const dayJs = this.getLastDateOfWeek(this.year, this.week)\n const nextWeek = dayJs.add(1, 'week')\n this.moveTo(nextWeek.year(), nextWeek.month(), nextWeek.week())\n }}\n >></md-text-button\n >\n </div>\n\n <slot></slot>\n </div>\n\n <ol\n @pointerdown=${this.handlePointerDown}\n @pointermove=${this.handlePointerMove}\n @pointerup=${this.handlePointerUp}\n >\n ${this.calendar?.map((date, index) => {\n const [from, to] = this.selections || ([] as any)\n const { date: thisDate } = date\n const selected = from && to && thisDate >= from && thisDate <= to\n\n return html`\n <li ?today=${date.today} day-of-week date .date=${thisDate} ?selected=${selected}>\n <span date-label>${date.label}(${WEEKDAYS[index]})</span>\n </li>\n `\n })}\n ${this.calendar?.map(date => {\n const [from, to] = this.selections || ([] as any)\n const { date: thisDate } = date\n const selected = from && to && thisDate >= from && thisDate <= to\n\n return html`<li date .date=${thisDate} ?selected=${selected}>\n <div>\n ${(this.eventMap?.get(date?.date) || []).map(({ title, color, template }) =>\n template ? template : html`<span event .style=\"border-color: ${color};\">${title}</span>`\n )}\n </div>\n </li>`\n })}\n </ol>\n `\n }\n\n async updated(changes: PropertyValues<this>) {\n if (changes.has('year') || changes.has('month') || changes.has('week') || changes.has('eventProvider')) {\n const calendar = this.createDaysForCurrentWeek(this.year, this.week)\n\n this.eventMap = await this.eventProvider?.fetchEventsForCalendar(calendar)\n this.calendar = calendar\n }\n }\n\n moveTo(year: number, month: number, week: number) {\n this.year = year\n this.month = month\n this.week = week\n }\n\n handlePointerDown(event: PointerEvent) {\n const target = event.target as HTMLElement\n\n if (!target.hasAttribute('date') && !target.hasAttribute('date-label')) {\n return\n }\n\n const dateElement = target.closest('[date]') as HTMLElement\n const from = (dateElement as any).date\n\n this.pointerDownDate = from\n\n // 캡처를 설정하지 않음(Touch 디바이스에서 중요)\n target.releasePointerCapture(event.pointerId)\n\n event.preventDefault()\n }\n\n handlePointerMove(event: PointerEvent) {\n const from = this.pointerDownDate\n\n if (!from) {\n return\n }\n\n const target = event.target as HTMLElement\n const dateElement = target.closest('[date]') as HTMLElement\n\n if (!dateElement) {\n return\n }\n\n const date = (dateElement as any).date\n this.selections = from > date ? [date, from] : [from, date]\n\n // 캡처를 설정하지 않음(Touch 디바이스에서 중요)\n target.releasePointerCapture(event.pointerId)\n\n event.preventDefault()\n }\n\n handlePointerUp(event: PointerEvent) {\n const from = this.pointerDownDate\n\n this.pointerDownDate = null\n\n if (!from) {\n return\n }\n\n const target = event.target as HTMLElement\n const dateElement = target.closest('[date]') as HTMLElement\n\n if (!dateElement) {\n return\n }\n\n const date = (dateElement as any).date\n this.selections = from > date ? [date, from] : [from, date]\n\n this.dispatchEvent(\n new CustomEvent('select-date', {\n detail: this.selections,\n bubbles: true,\n composed: true\n })\n )\n\n event.preventDefault()\n }\n\n selectDate(date: { label: string; date: Date; thisMonth?: boolean; thisWeek?: boolean; today?: boolean }) {\n if (date) {\n this.selections = [date.date, date.date]\n } else {\n this.selections = undefined\n }\n\n this.dispatchEvent(\n new CustomEvent('select-date', {\n detail: date,\n bubbles: true,\n composed: true\n })\n )\n }\n\n getLastDateOfWeek(year: number, week: number): Dayjs {\n const firstWeekLastDay = dayjs(new Date(year, 0, 1)).endOf('w')\n week -= 1 // one-based week, so need the minus-one\n return firstWeekLastDay.add(week, 'w')\n }\n\n createDaysForCurrentWeek(year: number, week: number): CALENDAR {\n const lastDayjs = this.getLastDateOfWeek(year, week)\n const weekDays = 7\n\n return [...Array(weekDays)]\n .map((day, index) => {\n const date = new Date(lastDayjs.year(), lastDayjs.month(), lastDayjs.date() - index)\n const label = dayjs(date).format('MM-DD')\n return {\n date,\n label,\n thisWeek: true,\n today: isToday(date)\n }\n })\n .reverse()\n }\n}\n"]}
|
|
@@ -84,7 +84,14 @@ const Template = ({ mode = 'monthly' }) => html `
|
|
|
84
84
|
rel="stylesheet"
|
|
85
85
|
/>
|
|
86
86
|
|
|
87
|
-
<ox-event-view
|
|
87
|
+
<ox-event-view
|
|
88
|
+
mode="${mode}"
|
|
89
|
+
.eventProvider=${new SampleEventProvider()}
|
|
90
|
+
@select-date=${(e) => {
|
|
91
|
+
console.log(e.detail);
|
|
92
|
+
}}
|
|
93
|
+
>
|
|
94
|
+
</ox-event-view>
|
|
88
95
|
`;
|
|
89
96
|
export const Regular = Template.bind({});
|
|
90
97
|
Regular.args = {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.stories.js","sourceRoot":"","sources":["../../stories/index.stories.ts"],"names":[],"mappings":"AAAA,OAAO,yBAAyB,CAAA;AAChC,OAAO,EAAE,IAAI,EAAkB,MAAM,KAAK,CAAA;AAG1C,MAAM,mBAAmB;IACvB,KAAK,CAAC,sBAAsB,CAAC,QAAkB;QAC7C,MAAM,GAAG,GAAG,IAAI,GAAG,EAAoB,CAAA;QAEvC,QAAQ,CAAC,OAAO,CAAC,CAAC,EAAE,IAAI,EAAE,EAAE,EAAE,CAC5B,GAAG,CAAC,GAAG,CAAC,IAAI,EAAE;YACZ;gBACE,GAAG,EAAE,YAAY;gBACjB,KAAK,EAAE,QAAQ;gBACf,KAAK,EAAE,QAAQ;aAChB;YACD;gBACE,GAAG,EAAE,YAAY;gBACjB,KAAK,EAAE,QAAQ;gBACf,KAAK,EAAE,MAAM;aACd;YACD;gBACE,GAAG,EAAE,YAAY;gBACjB,KAAK,EAAE,QAAQ;gBACf,KAAK,EAAE,QAAQ;aAChB;YACD;gBACE,GAAG,EAAE,YAAY;gBACjB,KAAK,EAAE,QAAQ;gBACf,KAAK,EAAE,OAAO;aACf;YACD;gBACE,GAAG,EAAE,YAAY;gBACjB,KAAK,EAAE,QAAQ;gBACf,KAAK,EAAE,QAAQ;aAChB;YACD;gBACE,GAAG,EAAE,YAAY;gBACjB,KAAK,EAAE,QAAQ;gBACf,KAAK,EAAE,QAAQ;aAChB;YACD;gBACE,GAAG,EAAE,YAAY;gBACjB,KAAK,EAAE,QAAQ;gBACf,KAAK,EAAE,MAAM;aACd;YACD;gBACE,GAAG,EAAE,YAAY;gBACjB,KAAK,EAAE,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I,EAAE,QAAQ;CACf,CAAA","sourcesContent":["import '../src/ox-event-view.js'\nimport { html, TemplateResult } from 'lit'\nimport { BizEvent, CALENDAR, EventProvider } from '../src/types.js'\n\nclass SampleEventProvider implements EventProvider {\n async fetchEventsForCalendar(calendar: CALENDAR) {\n const map = new Map<Date, BizEvent[]>()\n\n calendar.forEach(({ date }) =>\n map.set(date, [\n {\n due: '2021-08-21',\n title: 'HAHAHA',\n color: 'yellow'\n },\n {\n due: '2021-08-21',\n title: 'HOHOHO',\n color: 'lime'\n },\n {\n due: '2021-08-21',\n title: 'HIHIHI',\n color: 'yellow'\n },\n {\n due: '2021-08-21',\n title: 'HEHEHE',\n color: 'white'\n },\n {\n due: '2021-08-21',\n title: 'KEKEKE',\n color: 'yellow'\n },\n {\n due: '2021-08-21',\n title: 'MEMEME',\n color: 'orange'\n },\n {\n due: '2021-08-21',\n title: 'MOMOMO',\n color: 'lime'\n },\n {\n due: '2021-08-21',\n title: 'QUOQUO',\n color: 'navy'\n },\n {\n due: '2021-08-21',\n title: 'ZZXXCC',\n color: 'gray'\n }\n ])\n )\n\n return map\n }\n}\n\nexport default {\n title: 'EventView',\n component: 'ox-event-view',\n argTypes: {\n mode: { control: 'select', options: ['monthly', 'weekly'], description: 'set event view mode' }\n }\n}\n\ninterface Story<T> {\n (args: T): TemplateResult\n args?: Partial<T>\n argTypes?: Record<string, unknown>\n}\n\ninterface ArgTypes {\n mode?: 'monthly' | 'weekly'\n}\n\nconst Template: Story<ArgTypes> = ({ mode = 'monthly' }: ArgTypes) => html`\n <link rel=\"stylesheet\" href=\"/themes/material-theme.css\" />\n <link rel=\"stylesheet\" href=\"/themes/calendar-theme.css\" />\n\n <link href=\"/themes/app-theme.css\" rel=\"stylesheet\" />\n <link href=\"/themes/light.css\" rel=\"stylesheet\" />\n <link href=\"/themes/dark.css\" rel=\"stylesheet\" />\n <link href=\"/themes/spacing.css\" rel=\"stylesheet\" />\n <link href=\"/themes/grist-theme.css\" rel=\"stylesheet\" />\n <link href=\"/themes/form-theme.css\" rel=\"stylesheet\" />\n\n <link\n href=\"https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL@20..48,100..700,0..1\"\n rel=\"stylesheet\"\n />\n <link\n href=\"https://fonts.googleapis.com/css2?family=Material+Symbols+Rounded:opsz,wght,FILL@20..48,100..700,0..1\"\n rel=\"stylesheet\"\n />\n <link\n href=\"https://fonts.googleapis.com/css2?family=Material+Symbols+Sharp:opsz,wght,FILL@20..48,100..700,0..1\"\n rel=\"stylesheet\"\n />\n\n <ox-event-view\n mode=\"${mode}\"\n .eventProvider=${new SampleEventProvider()}\n @select-date=${(e: CustomEvent) => {\n console.log(e.detail)\n }}\n >\n </ox-event-view>\n`\n\nexport const Regular = Template.bind({})\nRegular.args = {\n mode: 'monthly'\n}\n\nexport const WeeklyEventView = Template.bind({})\nWeeklyEventView.args = {\n mode: 'weekly'\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"fileNames":["../../../node_modules/typescript/lib/lib.es5.d.ts","../../../node_modules/typescript/lib/lib.es2015.d.ts","../../../node_modules/typescript/lib/lib.es2016.d.ts","../../../node_modules/typescript/lib/lib.es2017.d.ts","../../../node_modules/typescript/lib/lib.es2018.d.ts","../../../node_modules/typescript/lib/lib.es2019.d.ts","../../../node_modules/typescript/lib/lib.es2020.d.ts","../../../node_modules/typescript/lib/lib.dom.d.ts","../../../node_modules/typescript/lib/lib.es2015.core.d.ts","../../../node_modules/typescript/lib/lib.es2015.collection.d.ts","../../../node_modules/typescript/lib/lib.es2015.generator.d.ts","../../../node_modules/typescript/lib/lib.es2015.iterable.d.ts","../../../node_modules/typescript/lib/lib.es2015.promise.d.ts","../../../node_modules/typescript/lib/lib.es2015.proxy.d.ts","../../../node_modules/typescript/lib/lib.es2015.reflect.d.ts","../../../node_modules/typescript/lib/lib.es2015.symbol.d.ts","../../../node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts","../../../node_modules/typescript/lib/lib.es2016.array.include.d.ts","../../../node_modules/typescript/lib/lib.es2016.intl.d.ts","../../../node_modules/typescript/lib/lib.es2017.date.d.ts","../../../node_modules/typescript/lib/lib.es2017.object.d.ts","../../../node_modules/typescript/lib/lib.es2017.sharedmemory.d.ts","../../../node_modules/typescript/lib/lib.es2017.string.d.ts","../../../node_modules/typescript/lib/lib.es2017.intl.d.ts","../../../node_modules/typescript/lib/lib.es2017.typedarrays.d.ts","../../../node_modules/typescript/lib/lib.es2018.asyncgenerator.d.ts","../../../node_modules/typescript/lib/lib.es2018.asynciterable.d.ts","../../../node_modules/typescript/lib/lib.es2018.intl.d.ts","../../../node_modules/typescript/lib/lib.es2018.promise.d.ts","../../../node_modules/typescript/lib/lib.es2018.regexp.d.ts","../../../node_modules/typescript/lib/lib.es2019.array.d.ts","../../../node_modules/typescript/lib/lib.es2019.object.d.ts","../../../node_modules/typescript/lib/lib.es2019.string.d.ts","../../../node_modules/typescript/lib/lib.es2019.symbol.d.ts","../../../node_modules/typescript/lib/lib.es2019.intl.d.ts","../../../node_modules/typescript/lib/lib.es2020.bigint.d.ts","../../../node_modules/typescript/lib/lib.es2020.date.d.ts","../../../node_modules/typescript/lib/lib.es2020.promise.d.ts","../../../node_modules/typescript/lib/lib.es2020.sharedmemory.d.ts","../../../node_modules/typescript/lib/lib.es2020.string.d.ts","../../../node_modules/typescript/lib/lib.es2020.symbol.wellknown.d.ts","../../../node_modules/typescript/lib/lib.es2020.intl.d.ts","../../../node_modules/typescript/lib/lib.es2020.number.d.ts","../../../node_modules/typescript/lib/lib.decorators.d.ts","../../../node_modules/typescript/lib/lib.decorators.legacy.d.ts","../../../node_modules/tslib/tslib.d.ts","../../../node_modules/@lit/reactive-element/css-tag.d.ts","../../../node_modules/@lit/reactive-element/reactive-controller.d.ts","../../../node_modules/@lit/reactive-element/reactive-element.d.ts","../../../node_modules/lit-html/directive.d.ts","../../../node_modules/@types/trusted-types/lib/index.d.ts","../../../node_modules/lit-html/lit-html.d.ts","../../../node_modules/lit-element/lit-element.d.ts","../../../node_modules/lit-html/is-server.d.ts","../../../node_modules/lit/index.d.ts","../src/calendar-monthly-styles.ts","../../../node_modules/@material/web/internal/controller/attachable-controller.d.ts","../../../node_modules/@material/web/focus/internal/focus-ring.d.ts","../../../node_modules/@material/web/focus/md-focus-ring.d.ts","../../../node_modules/@material/web/ripple/internal/ripple.d.ts","../../../node_modules/@material/web/ripple/ripple.d.ts","../../../node_modules/@material/web/labs/behaviors/mixin.d.ts","../../../node_modules/@material/web/labs/behaviors/element-internals.d.ts","../../../node_modules/@material/web/internal/controller/form-submitter.d.ts","../../../node_modules/@material/web/button/internal/button.d.ts","../../../node_modules/@material/web/button/internal/text-button.d.ts","../../../node_modules/@material/web/button/text-button.d.ts","../../../node_modules/dayjs/esm/locale/types.d.ts","../../../node_modules/dayjs/esm/locale/index.d.ts","../../../node_modules/dayjs/esm/index.d.ts","../../../node_modules/@lit/reactive-element/decorators/base.d.ts","../../../node_modules/@lit/reactive-element/decorators/custom-element.d.ts","../../../node_modules/@lit/reactive-element/decorators/property.d.ts","../../../node_modules/@lit/reactive-element/decorators/state.d.ts","../../../node_modules/@lit/reactive-element/decorators/event-options.d.ts","../../../node_modules/@lit/reactive-element/decorators/query.d.ts","../../../node_modules/@lit/reactive-element/decorators/query-all.d.ts","../../../node_modules/@lit/reactive-element/decorators/query-async.d.ts","../../../node_modules/@lit/reactive-element/decorators/query-assigned-nodes.d.ts","../../../node_modules/@lit/reactive-element/decorators/query-assigned-elements.d.ts","../../../node_modules/lit/decorators.d.ts","../../../node_modules/dayjs/esm/plugin/weekday/index.d.ts","../../../node_modules/dayjs/esm/plugin/weekofyear/index.d.ts","../src/types.ts","../src/calendar-monthly.ts","../src/calendar-weekly-styles.ts","../src/calendar-weekly.ts","../../../node_modules/@material/web/icon/internal/icon.d.ts","../../../node_modules/@material/web/icon/icon.d.ts","../src/ox-event-view.ts","../src/index.ts","../stories/index.stories.ts","../../../node_modules/@types/node/compatibility/disposable.d.ts","../../../node_modules/@types/node/compatibility/indexable.d.ts","../../../node_modules/@types/node/compatibility/iterators.d.ts","../../../node_modules/@types/node/compatibility/index.d.ts","../../../node_modules/@types/node/ts5.6/globals.typedarray.d.ts","../../../node_modules/@types/node/ts5.6/buffer.buffer.d.ts","../../../node_modules/buffer/index.d.ts","../../../node_modules/undici-types/header.d.ts","../../../node_modules/undici-types/readable.d.ts","../../../node_modules/undici-types/file.d.ts","../../../node_modules/undici-types/fetch.d.ts","../../../node_modules/undici-types/formdata.d.ts","../../../node_modules/undici-types/connector.d.ts","../../../node_modules/undici-types/client.d.ts","../../../node_modules/undici-types/errors.d.ts","../../../node_modules/undici-types/dispatcher.d.ts","../../../node_modules/undici-types/global-dispatcher.d.ts","../../../node_modules/undici-types/global-origin.d.ts","../../../node_modules/undici-types/pool-stats.d.ts","../../../node_modules/undici-types/pool.d.ts","../../../node_modules/undici-types/handlers.d.ts","../../../node_modules/undici-types/balanced-pool.d.ts","../../../node_modules/undici-types/agent.d.ts","../../../node_modules/undici-types/mock-interceptor.d.ts","../../../node_modules/undici-types/mock-agent.d.ts","../../../node_modules/undici-types/mock-client.d.ts","../../../node_modules/undici-types/mock-pool.d.ts","../../../node_modules/undici-types/mock-errors.d.ts","../../../node_modules/undici-types/proxy-agent.d.ts","../../../node_modules/undici-types/env-http-proxy-agent.d.ts","../../../node_modules/undici-types/retry-handler.d.ts","../../../node_modules/undici-types/retry-agent.d.ts","../../../node_modules/undici-types/api.d.ts","../../../node_modules/undici-types/interceptors.d.ts","../../../node_modules/undici-types/util.d.ts","../../../node_modules/undici-types/cookies.d.ts","../../../node_modules/undici-types/patch.d.ts","../../../node_modules/undici-types/websocket.d.ts","../../../node_modules/undici-types/eventsource.d.ts","../../../node_modules/undici-types/filereader.d.ts","../../../node_modules/undici-types/diagnostics-channel.d.ts","../../../node_modules/undici-types/content-type.d.ts","../../../node_modules/undici-types/cache.d.ts","../../../node_modules/undici-types/index.d.ts","../../../node_modules/@types/node/globals.d.ts","../../../node_modules/@types/node/assert.d.ts","../../../node_modules/@types/node/assert/strict.d.ts","../../../node_modules/@types/node/async_hooks.d.ts","../../../node_modules/@types/node/buffer.d.ts","../../../node_modules/@types/node/child_process.d.ts","../../../node_modules/@types/node/cluster.d.ts","../../../node_modules/@types/node/console.d.ts","../../../node_modules/@types/node/constants.d.ts","../../../node_modules/@types/node/crypto.d.ts","../../../node_modules/@types/node/dgram.d.ts","../../../node_modules/@types/node/diagnostics_channel.d.ts","../../../node_modules/@types/node/dns.d.ts","../../../node_modules/@types/node/dns/promises.d.ts","../../../node_modules/@types/node/domain.d.ts","../../../node_modules/@types/node/dom-events.d.ts","../../../node_modules/@types/node/events.d.ts","../../../node_modules/@types/node/fs.d.ts","../../../node_modules/@types/node/fs/promises.d.ts","../../../node_modules/@types/node/http.d.ts","../../../node_modules/@types/node/http2.d.ts","../../../node_modules/@types/node/https.d.ts","../../../node_modules/@types/node/inspector.d.ts","../../../node_modules/@types/node/module.d.ts","../../../node_modules/@types/node/net.d.ts","../../../node_modules/@types/node/os.d.ts","../../../node_modules/@types/node/path.d.ts","../../../node_modules/@types/node/perf_hooks.d.ts","../../../node_modules/@types/node/process.d.ts","../../../node_modules/@types/node/punycode.d.ts","../../../node_modules/@types/node/querystring.d.ts","../../../node_modules/@types/node/readline.d.ts","../../../node_modules/@types/node/readline/promises.d.ts","../../../node_modules/@types/node/repl.d.ts","../../../node_modules/@types/node/sea.d.ts","../../../node_modules/@types/node/sqlite.d.ts","../../../node_modules/@types/node/stream.d.ts","../../../node_modules/@types/node/stream/promises.d.ts","../../../node_modules/@types/node/stream/consumers.d.ts","../../../node_modules/@types/node/stream/web.d.ts","../../../node_modules/@types/node/string_decoder.d.ts","../../../node_modules/@types/node/test.d.ts","../../../node_modules/@types/node/timers.d.ts","../../../node_modules/@types/node/timers/promises.d.ts","../../../node_modules/@types/node/tls.d.ts","../../../node_modules/@types/node/trace_events.d.ts","../../../node_modules/@types/node/tty.d.ts","../../../node_modules/@types/node/url.d.ts","../../../node_modules/@types/node/util.d.ts","../../../node_modules/@types/node/v8.d.ts","../../../node_modules/@types/node/vm.d.ts","../../../node_modules/@types/node/wasi.d.ts","../../../node_modules/@types/node/worker_threads.d.ts","../../../node_modules/@types/node/zlib.d.ts","../../../node_modules/@types/node/ts5.6/index.d.ts","../../../node_modules/@types/mocha/index.d.ts"],"fileIdsList":[[98,141],[71,98,141],[49,71,98,141],[49,71,79,98,141],[73,98,141],[47,48,98,141],[52,55,59,61,62,63,64,98,141],[65,98,141],[55,66,98,141],[55,57,98,141],[55,58,98,141],[55,88,98,141],[52,55,98,141],[55,98,141],[55,63,98,141],[55,62,98,141],[52,55,57,98,141],[55,60,98,141],[98,138,141],[98,140,141],[98,141,146,176],[98,141,142,147,153,154,161,173,184],[98,141,142,143,153,161],[93,94,95,98,141],[98,141,144,185],[98,141,145,146,154,162],[98,141,146,173,181],[98,141,147,149,153,161],[98,140,141,148],[98,141,149,150],[98,141,153],[98,141,151,153],[98,140,141,153],[98,141,153,154,155,173,184],[98,141,153,154,155,168,173,176],[98,136,141,189],[98,136,141,149,153,156,161,173,184],[98,141,153,154,156,157,161,173,181,184],[98,141,156,158,173,181,184],[98,141,153,159],[98,141,160,184,189],[98,141,149,153,161,173],[98,141,162],[98,141,163],[98,140,141,164],[98,138,139,140,141,142,143,144,145,146,147,148,149,150,151,153,154,155,156,157,158,159,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190],[98,141,166],[98,141,167],[98,141,153,168,169],[98,141,168,170,185,187],[98,141,153,173,174,175,176],[98,141,173,175],[98,141,173,174],[98,141,176],[98,141,177],[98,138,141,173],[98,141,153,179,180],[98,141,179,180],[98,141,146,161,173,181],[98,141,182],[141],[96,97,98,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190],[98,141,161,183],[98,141,156,167,184],[98,141,146,185],[98,141,173,186],[98,141,160,187],[98,141,188],[98,141,146,153,155,164,173,184,187,189],[98,141,173,190],[69,98,141],[68,98,141],[70,83,98,141],[70,82,98,141],[49,52,98,141],[52,98,141],[50,51,98,141],[72,73,74,75,76,77,78,79,80,98,141],[49,52,53,54,98,141],[98,108,112,141,184],[98,108,141,173,184],[98,103,141],[98,105,108,141,181,184],[98,141,161,181],[98,141,191],[98,103,141,191],[98,105,108,141,161,184],[98,100,101,104,107,141,153,173,184],[98,108,115,141],[98,100,106,141],[98,108,129,130,141],[98,104,108,141,176,184,191],[98,129,141,191],[98,102,103,141,191],[98,108,141],[98,102,103,104,105,106,107,108,109,110,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,130,131,132,133,134,135,141],[98,108,123,141],[98,108,115,116,141],[98,106,108,116,117,141],[98,107,141],[98,100,103,108,141],[98,108,112,116,117,141],[98,112,141],[98,106,108,111,141,184],[98,100,105,108,115,141],[98,141,173],[98,103,108,129,141,189,191],[46,55,98,141],[46,55,56,67,70,81,84,98,141],[46,55,67,70,81,84,86,98,141],[46,84,90,98,141],[46,55,81,84,85,87,89,98,141],[46,55,70,82,83,98,141],[46,55,84,90,98,141]],"fileInfos":[{"version":"44e584d4f6444f58791784f1d530875970993129442a847597db702a073ca68c","affectsGlobalScope":true,"impliedFormat":1},{"version":"45b7ab580deca34ae9729e97c13cfd999df04416a79116c3bfb483804f85ded4","impliedFormat":1},{"version":"3facaf05f0c5fc569c5649dd359892c98a85557e3e0c847964caeb67076f4d75","impliedFormat":1},{"version":"9a68c0c07ae2fa71b44384a839b7b8d81662a236d4b9ac30916718f7510b1b2d","impliedFormat":1},{"version":"5e1c4c362065a6b95ff952c0eab010f04dcd2c3494e813b493ecfd4fcb9fc0d8","impliedFormat":1},{"version":"68d73b4a11549f9c0b7d352d10e91e5dca8faa3322bfb77b661839c42b1ddec7","impliedFormat":1},{"version":"5efce4fc3c29ea84e8928f97adec086e3dc876365e0982cc8479a07954a3efd4","impliedFormat":1},{"version":"9e8ca8ed051c2697578c023d9c29d6df689a083561feba5c14aedee895853999","affectsGlobalScope":true,"impliedFormat":1},{"version":"6920e1448680767498a0b77c6a00a8e77d14d62c3da8967b171f1ddffa3c18e4","affectsGlobalScope":true,"impliedFormat":1},{"version":"dc2df20b1bcdc8c2d34af4926e2c3ab15ffe1160a63e58b7e09833f616efff44","affectsGlobalScope":true,"impliedFormat":1},{"version":"515d0b7b9bea2e31ea4ec968e9edd2c39d3eebf4a2d5cbd04e88639819ae3b71","affectsGlobalScope":true,"impliedFormat":1},{"version":"45d8ccb3dfd57355eb29749919142d4321a0aa4df6acdfc54e30433d7176600a","affectsGlobalScope":true,"impliedFormat":1},{"version":"0dc1e7ceda9b8b9b455c3a2d67b0412feab00bd2f66656cd8850e8831b08b537","affectsGlobalScope":true,"impliedFormat":1},{"version":"ce691fb9e5c64efb9547083e4a34091bcbe5bdb41027e310ebba8f7d96a98671","affectsGlobalScope":true,"impliedFormat":1},{"version":"8d697a2a929a5fcb38b7a65594020fcef05ec1630804a33748829c5ff53640d0","affectsGlobalScope":true,"impliedFormat":1},{"version":"4ff2a353abf8a80ee399af572debb8faab2d33ad38c4b4474cff7f26e7653b8d","affectsGlobalScope":true,"impliedFormat":1},{"version":"93495ff27b8746f55d19fcbcdbaccc99fd95f19d057aed1bd2c0cafe1335fbf0","affectsGlobalScope":true,"impliedFormat":1},{"version":"6fc23bb8c3965964be8c597310a2878b53a0306edb71d4b5a4dfe760186bcc01","affectsGlobalScope":true,"impliedFormat":1},{"version":"ea011c76963fb15ef1cdd7ce6a6808b46322c527de2077b6cfdf23ae6f5f9ec7","affectsGlobalScope":true,"impliedFormat":1},{"version":"38f0219c9e23c915ef9790ab1d680440d95419ad264816fa15009a8851e79119","affectsGlobalScope":true,"impliedFormat":1},{"version":"69ab18c3b76cd9b1be3d188eaf8bba06112ebbe2f47f6c322b5105a6fbc45a2e","affectsGlobalScope":true,"impliedFormat":1},{"version":"4738f2420687fd85629c9efb470793bb753709c2379e5f85bc1815d875ceadcd","affectsGlobalScope":true,"impliedFormat":1},{"version":"2f11ff796926e0832f9ae148008138ad583bd181899ab7dd768a2666700b1893","affectsGlobalScope":true,"impliedFormat":1},{"version":"4de680d5bb41c17f7f68e0419412ca23c98d5749dcaaea1896172f06435891fc","affectsGlobalScope":true,"impliedFormat":1},{"version":"9fc46429fbe091ac5ad2608c657201eb68b6f1b8341bd6d670047d32ed0a88fa","affectsGlobalScope":true,"impliedFormat":1},{"version":"ac9538681b19688c8eae65811b329d3744af679e0bdfa5d842d0e32524c73e1c","affectsGlobalScope":true,"impliedFormat":1},{"version":"0a969edff4bd52585473d24995c5ef223f6652d6ef46193309b3921d65dd4376","affectsGlobalScope":true,"impliedFormat":1},{"version":"9e9fbd7030c440b33d021da145d3232984c8bb7916f277e8ffd3dc2e3eae2bdb","affectsGlobalScope":true,"impliedFormat":1},{"version":"811ec78f7fefcabbda4bfa93b3eb67d9ae166ef95f9bff989d964061cbf81a0c","affectsGlobalScope":true,"impliedFormat":1},{"version":"717937616a17072082152a2ef351cb51f98802fb4b2fdabd32399843875974ca","affectsGlobalScope":true,"impliedFormat":1},{"version":"d7e7d9b7b50e5f22c915b525acc5a49a7a6584cf8f62d0569e557c5cfc4b2ac2","affectsGlobalScope":true,"impliedFormat":1},{"version":"71c37f4c9543f31dfced6c7840e068c5a5aacb7b89111a4364b1d5276b852557","affectsGlobalScope":true,"impliedFormat":1},{"version":"576711e016cf4f1804676043e6a0a5414252560eb57de9faceee34d79798c850","affectsGlobalScope":true,"impliedFormat":1},{"version":"89c1b1281ba7b8a96efc676b11b264de7a8374c5ea1e6617f11880a13fc56dc6","affectsGlobalScope":true,"impliedFormat":1},{"version":"74f7fa2d027d5b33eb0471c8e82a6c87216223181ec31247c357a3e8e2fddc5b","affectsGlobalScope":true,"impliedFormat":1},{"version":"1a94697425a99354df73d9c8291e2ecd4dddd370aed4023c2d6dee6cccb32666","affectsGlobalScope":true,"impliedFormat":1},{"version":"063600664504610fe3e99b717a1223f8b1900087fab0b4cad1496a114744f8df","affectsGlobalScope":true,"impliedFormat":1},{"version":"934019d7e3c81950f9a8426d093458b65d5aff2c7c1511233c0fd5b941e608ab","affectsGlobalScope":true,"impliedFormat":1},{"version":"bf14a426dbbf1022d11bd08d6b8e709a2e9d246f0c6c1032f3b2edb9a902adbe","affectsGlobalScope":true,"impliedFormat":1},{"version":"e3f9fc0ec0b96a9e642f11eda09c0be83a61c7b336977f8b9fdb1e9788e925fe","affectsGlobalScope":true,"impliedFormat":1},{"version":"59fb2c069260b4ba00b5643b907ef5d5341b167e7d1dbf58dfd895658bda2867","affectsGlobalScope":true,"impliedFormat":1},{"version":"479553e3779be7d4f68e9f40cdb82d038e5ef7592010100410723ceced22a0f7","affectsGlobalScope":true,"impliedFormat":1},{"version":"368af93f74c9c932edd84c58883e736c9e3d53cec1fe24c0b0ff451f529ceab1","affectsGlobalScope":true,"impliedFormat":1},{"version":"33358442698bb565130f52ba79bfd3d4d484ac85fe33f3cb1759c54d18201393","affectsGlobalScope":true,"impliedFormat":1},{"version":"782dec38049b92d4e85c1585fbea5474a219c6984a35b004963b00beb1aab538","affectsGlobalScope":true,"impliedFormat":1},{"version":"a6a5253138c5432c68a1510c70fe78a644fe2e632111ba778e1978010d6edfec","impliedFormat":1},{"version":"e056bb30bf82271634daeee81f772f4a7960085f01f6d4d09c8da1ebe5f6a623","impliedFormat":99},{"version":"5e30131b6a5587fe666926ad1d9807e733c0a597ed12d682669fcaa331aea576","impliedFormat":99},{"version":"86492a546c3308feaf1dde967afd325c321483b5e96f5fa9e9b6e691dc23fa9e","affectsGlobalScope":true,"impliedFormat":99},{"version":"00cb63103f9670f8094c238a4a7e252c8b4c06ba371fea5c44add7e41b7247e4","impliedFormat":99},{"version":"15fe687c59d62741b4494d5e623d497d55eb38966ecf5bea7f36e48fc3fbe15e","impliedFormat":1},{"version":"43f58358870effc43ba93c92c040dee2285cbd8685ddfa77658e498780727c4e","impliedFormat":99},{"version":"9a318e3a8900672b85cd3c8c3a5acf51b88049557a3ae897ccdcf2b85a8f61f9","impliedFormat":99},{"version":"1bcd560deed90a43c51b08aa18f7f55229f2e30974ab5ed1b7bb5721be379013","impliedFormat":99},{"version":"dc08fe04e50bc24d1baded4f33e942222bbdd5d77d6341a93cfe6e4e4586a3be","impliedFormat":99},{"version":"3aa9a4300c799671762de05c396483ef7305f866e0c35f82b657cd5205a5a73e","signature":"472fcc8d2e57ead8b3053190e4d167a30e002445e35ac0a3ea0d91ed10841be4"},{"version":"905800cc110167503d0cf58bb0dd6fa4aaac1e9cedc9bd9c48e5d1f8b5b8d4c8","impliedFormat":99},{"version":"d17be577b99e59611df19ca2cf0356df554f55bb06617c21321fc4ec06b820d0","impliedFormat":99},{"version":"5f30145fbc8ca508ae4e0d90a4fe9eaff490783f380a92f6aa262accdf7887b7","affectsGlobalScope":true,"impliedFormat":99},{"version":"2c887f29f6796ea68247c626acbef560ff29bb8d0042b641e4fc69559841463d","impliedFormat":99},{"version":"f882b77c5939860d599b4b7bc39f741ebcd56123e18b284500f4b8923acd2e72","affectsGlobalScope":true,"impliedFormat":99},{"version":"0230bc76ed3a464531a43d2434d315b9cc2096aaca28bdaa65b8f9dce9f3bc81","impliedFormat":99},{"version":"559d2d1cd7f37dc2ac59e7adce198ad16a5eb0c7273d67b8e4ff72821b7c853f","impliedFormat":99},{"version":"afa8760622183e35e86f516574217eb1853b08cf2168be0bfe991643ece1a8fe","impliedFormat":99},{"version":"769a5a51c85453028684e225eec525a7f277ec659863e0496e5ba31dacf8435c","impliedFormat":99},{"version":"0f28503979e769f6ee6e55350f621dc00e300f15688d52b02edc62d837d29b1d","impliedFormat":99},{"version":"fe869c79d427e84d916011d082def68a793c3c13e157079fec399f250418bd50","affectsGlobalScope":true,"impliedFormat":99},{"version":"73a0ee6395819b063df4b148211985f2e1442945c1a057204cf4cf6281760dc3","affectsGlobalScope":true,"impliedFormat":1},{"version":"7f0717e1c516c7b6b6acbc2177d1bd910a5d1abb757c85182ca8d089c9b6e398","impliedFormat":1},{"version":"3c5bb5207df7095882400323d692957e90ec17323ccff5fd5f29a1ecf3b165d0","impliedFormat":1},{"version":"cdeae34aca6700620ebf3f27cf7d439c3af97595dd6e2729fa4780483add5680","impliedFormat":99},{"version":"3ff87ea3471b51beaf4aa8fd8f4422862b11d343fdbb55bf383e0f8cc195a445","impliedFormat":99},{"version":"1cc188904259bd0985b24d9dc2a160891cb5e94210901466b951716fcdb4ff62","impliedFormat":99},{"version":"732fb71ecb695d6f36ddcbb72ebfe4ff6b6491d45101a00fa2b75a26b80d640f","impliedFormat":99},{"version":"039cb05125d7621f8143616c495b8e6b54249c4e64d2754b80ff93867f7f4b01","impliedFormat":99},{"version":"1b81f1fa82ad30af01ab1cae91ccaddc10c48f5916bbd6d282155e44a65d858d","impliedFormat":99},{"version":"a0fc7a02a75802678a67000607f20266cf1a49dc0e787967efe514e31b9ed0c3","impliedFormat":99},{"version":"5ebf098a1d81d400b8af82807cf19893700335cf91a7b9dbd83a5d737af34b11","impliedFormat":99},{"version":"101cf83ac3f9c5e1a7355a02e4fbe988877ef83c4ebec0ff0f02b2af022254a3","impliedFormat":99},{"version":"d017e2fcd44b46ca80cd2b592a6314e75f5caab5bda230f0f4a45e964049a43a","impliedFormat":99},{"version":"a8992b852521a66f63e0cedc6e1f054b28f972232b6fa5ca59771db6a1c8bbea","impliedFormat":99},{"version":"17a5d07dc6ce4343d625f594693fd887ca453702b5c21299b29cadb4e48b540a","impliedFormat":1},{"version":"bef3344291a5376aa1623daf4fdc1a3c4c711ce7c9f02a404ee43396649ba616","impliedFormat":1},{"version":"416e90ecbc96db7ae72484f14ec0437c0c2d27c867f30103d03d3d26395ea99f","signature":"379fae3ba1db0efbc53b8172052f028c4d5c508d55cc128fcbc7aead322fb97e"},{"version":"dcc969f04614b77eef816129d00a398dcd78feb18f1260e0bb7fa7eb5dd9546b","signature":"6982ef89aef8fa6eab31a928dd4993eef0adbcacc6f449de2278efc368cfaa72"},{"version":"d09b88923cda467e61b7fe16cd83b2e17dc4eaa80161c36ccdf336c42a22c0e4","signature":"48e115797224ff43bdf84638e950523f86cf220b90f50c2a9f27c8971bbaa632"},{"version":"07a6a2eb9dcacfa3578eceff671bfa8dc73624973dce0e895a56c06bd5a0b00e","signature":"cdfc5679fe86c11811f5d1b04e27d42b4ee2c5032a89bf2580e1ffafacefe43e"},{"version":"5565deadc1d553f9f1ef370351432c258d2a6f1a5ca47e574e5430db824468c7","impliedFormat":99},{"version":"4ae1ed87c59518f4e0918a21409ec3020e97037a386b57953c6b9fed9cad6949","affectsGlobalScope":true,"impliedFormat":99},{"version":"d62a95aace1a1b7509cd2f15e0dd91eb105cb2e65b3059fbb3b631c5bef40cfd","signature":"1f1b15c57e5c8cc81559bd6b881ea87a2a9a0114b0c090c9333fbb02def27290"},{"version":"f481ea2631a1333dedf003b788e269f3e0e8f1598c4af582b91ae1ab484a1779","signature":"bf90d5c500d2be8276252beafb8f0c64db0892f5a0149b34f3315dfc665868fc"},{"version":"e2a811540510c6c56387f02ba2cdec6d2967a6b48b1d08b6d677bf0b443c0a4e","signature":"5ef16bd781d361a6c9f77bb612ce034716775c9bbca40917aa62fd363fa0863d"},{"version":"70521b6ab0dcba37539e5303104f29b721bfb2940b2776da4cc818c07e1fefc1","affectsGlobalScope":true,"impliedFormat":1},{"version":"030e350db2525514580ed054f712ffb22d273e6bc7eddc1bb7eda1e0ba5d395e","affectsGlobalScope":true,"impliedFormat":1},{"version":"d153a11543fd884b596587ccd97aebbeed950b26933ee000f94009f1ab142848","affectsGlobalScope":true,"impliedFormat":1},{"version":"21d819c173c0cf7cc3ce57c3276e77fd9a8a01d35a06ad87158781515c9a438a","impliedFormat":1},{"version":"613b21ccdf3be6329d56e6caa13b258c842edf8377be7bc9f014ed14cdcfc308","affectsGlobalScope":true,"impliedFormat":1},{"version":"2d1319e6b5d0efd8c5eae07eb864a00102151e8b9afddd2d45db52e9aae002c4","affectsGlobalScope":true,"impliedFormat":1},{"version":"8e9c23ba78aabc2e0a27033f18737a6df754067731e69dc5f52823957d60a4b6","impliedFormat":1},{"version":"5929864ce17fba74232584d90cb721a89b7ad277220627cc97054ba15a98ea8f","impliedFormat":1},{"version":"24bd580b5743dc56402c440dc7f9a4f5d592ad7a419f25414d37a7bfe11e342b","impliedFormat":1},{"version":"25c8056edf4314820382a5fdb4bb7816999acdcb929c8f75e3f39473b87e85bc","impliedFormat":1},{"version":"c464d66b20788266e5353b48dc4aa6bc0dc4a707276df1e7152ab0c9ae21fad8","impliedFormat":1},{"version":"78d0d27c130d35c60b5e5566c9f1e5be77caf39804636bc1a40133919a949f21","impliedFormat":1},{"version":"c6fd2c5a395f2432786c9cb8deb870b9b0e8ff7e22c029954fabdd692bff6195","impliedFormat":1},{"version":"1d6e127068ea8e104a912e42fc0a110e2aa5a66a356a917a163e8cf9a65e4a75","impliedFormat":1},{"version":"5ded6427296cdf3b9542de4471d2aa8d3983671d4cac0f4bf9c637208d1ced43","impliedFormat":1},{"version":"6bdc71028db658243775263e93a7db2fd2abfce3ca569c3cca5aee6ed5eb186d","impliedFormat":1},{"version":"cadc8aced301244057c4e7e73fbcae534b0f5b12a37b150d80e5a45aa4bebcbd","impliedFormat":1},{"version":"385aab901643aa54e1c36f5ef3107913b10d1b5bb8cbcd933d4263b80a0d7f20","impliedFormat":1},{"version":"9670d44354bab9d9982eca21945686b5c24a3f893db73c0dae0fd74217a4c219","impliedFormat":1},{"version":"0b8a9268adaf4da35e7fa830c8981cfa22adbbe5b3f6f5ab91f6658899e657a7","impliedFormat":1},{"version":"11396ed8a44c02ab9798b7dca436009f866e8dae3c9c25e8c1fbc396880bf1bb","impliedFormat":1},{"version":"ba7bc87d01492633cb5a0e5da8a4a42a1c86270e7b3d2dea5d156828a84e4882","impliedFormat":1},{"version":"4893a895ea92c85345017a04ed427cbd6a1710453338df26881a6019432febdd","impliedFormat":1},{"version":"c21dc52e277bcfc75fac0436ccb75c204f9e1b3fa5e12729670910639f27343e","impliedFormat":1},{"version":"13f6f39e12b1518c6650bbb220c8985999020fe0f21d818e28f512b7771d00f9","impliedFormat":1},{"version":"9b5369969f6e7175740bf51223112ff209f94ba43ecd3bb09eefff9fd675624a","impliedFormat":1},{"version":"4fe9e626e7164748e8769bbf74b538e09607f07ed17c2f20af8d680ee49fc1da","impliedFormat":1},{"version":"24515859bc0b836719105bb6cc3d68255042a9f02a6022b3187948b204946bd2","impliedFormat":1},{"version":"ea0148f897b45a76544ae179784c95af1bd6721b8610af9ffa467a518a086a43","impliedFormat":1},{"version":"24c6a117721e606c9984335f71711877293a9651e44f59f3d21c1ea0856f9cc9","impliedFormat":1},{"version":"dd3273ead9fbde62a72949c97dbec2247ea08e0c6952e701a483d74ef92d6a17","impliedFormat":1},{"version":"405822be75ad3e4d162e07439bac80c6bcc6dbae1929e179cf467ec0b9ee4e2e","impliedFormat":1},{"version":"0db18c6e78ea846316c012478888f33c11ffadab9efd1cc8bcc12daded7a60b6","impliedFormat":1},{"version":"4d2b0eb911816f66abe4970898f97a2cfc902bcd743cbfa5017fad79f7ef90d8","impliedFormat":1},{"version":"bd0532fd6556073727d28da0edfd1736417a3f9f394877b6d5ef6ad88fba1d1a","impliedFormat":1},{"version":"89167d696a849fce5ca508032aabfe901c0868f833a8625d5a9c6e861ef935d2","impliedFormat":1},{"version":"e53a3c2a9f624d90f24bf4588aacd223e7bec1b9d0d479b68d2f4a9e6011147f","impliedFormat":1},{"version":"24b8685c62562f5d98615c5a0c1d05f297cf5065f15246edfe99e81ec4c0e011","impliedFormat":1},{"version":"93507c745e8f29090efb99399c3f77bec07db17acd75634249dc92f961573387","impliedFormat":1},{"version":"339dc5265ee5ed92e536a93a04c4ebbc2128f45eeec6ed29f379e0085283542c","impliedFormat":1},{"version":"4732aec92b20fb28c5fe9ad99521fb59974289ed1e45aecb282616202184064f","impliedFormat":1},{"version":"2e85db9e6fd73cfa3d7f28e0ab6b55417ea18931423bd47b409a96e4a169e8e6","impliedFormat":1},{"version":"c46e079fe54c76f95c67fb89081b3e399da2c7d109e7dca8e4b58d83e332e605","impliedFormat":1},{"version":"bf67d53d168abc1298888693338cb82854bdb2e69ef83f8a0092093c2d562107","impliedFormat":1},{"version":"81184fe8e67d78ac4e5374650f0892d547d665d77da2b2f544b5d84729c4a15d","affectsGlobalScope":true,"impliedFormat":1},{"version":"f6114eb1e8f70ec08816bdaa6ec740a0a7a01f25743e36f655f00157be394374","impliedFormat":1},{"version":"7394959e5a741b185456e1ef5d64599c36c60a323207450991e7a42e08911419","impliedFormat":1},{"version":"76103716ba397bbb61f9fa9c9090dca59f39f9047cb1352b2179c5d8e7f4e8d0","impliedFormat":1},{"version":"53eac70430b30089a3a1959d8306b0f9cfaf0de75224b68ef25243e0b5ad1ca3","affectsGlobalScope":true,"impliedFormat":1},{"version":"4314c7a11517e221f7296b46547dbc4df047115b182f544d072bdccffa57fc72","impliedFormat":1},{"version":"115971d64632ea4742b5b115fb64ed04bcaae2c3c342f13d9ba7e3f9ee39c4e7","impliedFormat":1},{"version":"c2510f124c0293ab80b1777c44d80f812b75612f297b9857406468c0f4dafe29","affectsGlobalScope":true,"impliedFormat":1},{"version":"a40826e8476694e90da94aa008283a7de50d1dafd37beada623863f1901cb7fb","impliedFormat":1},{"version":"46e07db372dd75edc1a26e68f16d1b7ffb34b7ab3db5cdb3e391a3604ad7bb7c","affectsGlobalScope":true,"impliedFormat":1},{"version":"24642567d3729bcc545bacb65ee7c0db423400c7f1ef757cab25d05650064f98","impliedFormat":1},{"version":"e6f5a38687bebe43a4cef426b69d34373ef68be9a6b1538ec0a371e69f309354","impliedFormat":1},{"version":"a6bf63d17324010ca1fbf0389cab83f93389bb0b9a01dc8a346d092f65b3605f","impliedFormat":1},{"version":"e009777bef4b023a999b2e5b9a136ff2cde37dc3f77c744a02840f05b18be8ff","impliedFormat":1},{"version":"1e0d1f8b0adfa0b0330e028c7941b5a98c08b600efe7f14d2d2a00854fb2f393","impliedFormat":1},{"version":"ee1ee365d88c4c6c0c0a5a5701d66ebc27ccd0bcfcfaa482c6e2e7fe7b98edf7","affectsGlobalScope":true,"impliedFormat":1},{"version":"875928df2f3e9a3aed4019539a15d04ff6140a06df6cd1b2feb836d22a81eaca","affectsGlobalScope":true,"impliedFormat":1},{"version":"20b97c3368b1a63d2156deea35d03b125bb07908906eb35e0438042a3bbb3e71","impliedFormat":1},{"version":"02e73584132025781e9ffa7beef9d58ee563954c592eb563dc724ebbfb7424eb","impliedFormat":1},{"version":"ad05f01340829d96e2d85506eaab585ca7a5b20d687448d35f97e2b0855399d8","impliedFormat":1},{"version":"fa56be9b96f747e93b895d8dc2aa4fb9f0816743e6e2abb9d60705e88d4743a2","impliedFormat":1},{"version":"8257c55ff6bff6169142a35fce6811b511d857b4ae4f522cdb6ce20fd2116b2c","impliedFormat":1},{"version":"6d386bc0d7f3afa1d401afc3e00ed6b09205a354a9795196caed937494a713e6","impliedFormat":1},{"version":"3a9e5dddbd6ca9507d0c06a557535ba2224a94a2b0f3e146e8215f93b7e5b3a8","affectsGlobalScope":true,"impliedFormat":1},{"version":"94c4187083503a74f4544503b5a30e2bd7af0032dc739b0c9a7ce87f8bddc7b9","impliedFormat":1},{"version":"b1b6ee0d012aeebe11d776a155d8979730440082797695fc8e2a5c326285678f","impliedFormat":1},{"version":"45875bcae57270aeb3ebc73a5e3fb4c7b9d91d6b045f107c1d8513c28ece71c0","impliedFormat":1},{"version":"3c36ab47df4668254ccc170fc42e7d5116fd86a7e408d8dc220e559837cd2bbb","affectsGlobalScope":true,"impliedFormat":1},{"version":"6f6abdaf8764ef01a552a958f45e795b5e79153b87ddad3af5264b86d2681b72","affectsGlobalScope":true,"impliedFormat":1},{"version":"3f16a7e4deafa527ed9995a772bb380eb7d3c2c0fd4ae178c5263ed18394db2c","impliedFormat":1},{"version":"c6b4e0a02545304935ecbf7de7a8e056a31bb50939b5b321c9d50a405b5a0bba","impliedFormat":1},{"version":"4de73e132bf47437c56b1e8416c60d9d517c8ba3822e7c623b54d4300834dd37","impliedFormat":1},{"version":"e432b0e3761ca9ba734bdd41e19a75fec1454ca8e9769bfdf8b31011854cf06a","impliedFormat":1},{"version":"e1120271ebbc9952fdc7b2dd3e145560e52e06956345e6fdf91d70ca4886464f","impliedFormat":1},{"version":"15c5e91b5f08be34a78e3d976179bf5b7a9cc28dc0ef1ffebffeb3c7812a2dca","impliedFormat":1},{"version":"a8f06c2382a30b7cb89ad2dfc48fc3b2b490f3dafcd839dadc008e4e5d57031d","impliedFormat":1},{"version":"553870e516f8c772b89f3820576152ebc70181d7994d96917bb943e37da7f8a7","impliedFormat":1},{"version":"269929a24b2816343a178008ac9ae9248304d92a8ba8e233055e0ed6dbe6ef71","impliedFormat":1},{"version":"93452d394fdd1dc551ec62f5042366f011a00d342d36d50793b3529bfc9bd633","impliedFormat":1},{"version":"745c4240220559bd340c8aeb6e3c5270a709d3565e934dc22a69c304703956bc","affectsGlobalScope":true,"impliedFormat":1},{"version":"2754d8221d77c7b382096651925eb476f1066b3348da4b73fe71ced7801edada","impliedFormat":1},{"version":"cca97c55398b8699fa3a96ef261b01d200ed2a44d2983586ab1a81d7d7b23cd9","affectsGlobalScope":true,"impliedFormat":1},{"version":"bef91efa0baea5d0e0f0f27b574a8bc100ce62a6d7e70220a0d58af6acab5e89","affectsGlobalScope":true,"impliedFormat":1},{"version":"f59493f68eade5200559e5016b5855f7d12e6381eb6cab9ad8a379af367b3b2d","impliedFormat":1},{"version":"125e3472965f529de239d2bc85b54579fed8e0b060d1d04de6576fb910a6ec7f","impliedFormat":1},{"version":"66ba1b2c3e3a3644a1011cd530fb444a96b1b2dfe2f5e837a002d41a1a799e60","impliedFormat":1},{"version":"7e514f5b852fdbc166b539fdd1f4e9114f29911592a5eb10a94bb3a13ccac3c4","impliedFormat":1},{"version":"7d6ff413e198d25639f9f01f16673e7df4e4bd2875a42455afd4ecc02ef156da","affectsGlobalScope":true,"impliedFormat":1},{"version":"6512c499b32226c5a686ab98f5b33ae15bdebd6b9f3b60f80eeadd95e358f02c","affectsGlobalScope":true,"impliedFormat":1},{"version":"a5c09990a37469b0311a92ce8feeb8682e83918723aedbd445bd7a0f510eaaa3","impliedFormat":1},{"version":"6b29aea17044029b257e5bd4e3e4f765cd72b8d3c11c753f363ab92cc3f9f947","impliedFormat":1},{"version":"ac5ed35e649cdd8143131964336ab9076937fa91802ec760b3ea63b59175c10a","impliedFormat":1},{"version":"d008cf1330c86b37a8128265c80795397c287cecff273bc3ce3a4883405f5112","affectsGlobalScope":true,"impliedFormat":1},{"version":"78dc0513cc4f1642906b74dda42146bcbd9df7401717d6e89ea6d72d12ecb539","impliedFormat":1},{"version":"171fd8807643c46a9d17e843959abdf10480d57d60d38d061fb44a4c8d4a8cc4","impliedFormat":1},{"version":"ed2e21d0d42025b6a09c30fe0923e2ee4f8911f5c41f4ff0525ea0c2fd315e75","affectsGlobalScope":true,"impliedFormat":1}],"root":[56,[84,87],[90,92]],"options":{"allowSyntheticDefaultImports":true,"declaration":true,"esModuleInterop":false,"experimentalDecorators":true,"importHelpers":true,"inlineSources":true,"module":99,"noEmitOnError":true,"outDir":"./","rootDir":"..","skipLibCheck":true,"sourceMap":true,"strict":true,"target":99,"useDefineForClassFields":false},"referencedMap":[[47,1],[71,1],[72,2],[75,3],[73,3],[77,3],[80,4],[79,3],[78,3],[76,3],[74,5],[48,1],[49,6],[65,7],[66,8],[67,9],[58,10],[59,11],[89,12],[88,13],[57,14],[64,15],[63,16],[62,1],[60,17],[61,18],[192,1],[138,19],[139,19],[140,20],[141,21],[142,22],[143,23],[93,1],[96,24],[94,1],[95,1],[144,25],[145,26],[146,27],[147,28],[148,29],[149,30],[150,30],[152,31],[151,32],[153,33],[154,34],[155,35],[137,36],[156,37],[157,38],[158,39],[159,40],[160,41],[161,42],[162,43],[163,44],[164,45],[165,46],[166,47],[167,48],[168,49],[169,49],[170,50],[171,1],[172,1],[173,51],[175,52],[174,53],[176,54],[177,55],[178,56],[179,57],[180,58],[181,59],[182,60],[98,61],[97,1],[191,62],[183,63],[184,64],[185,65],[186,66],[187,67],[188,68],[189,69],[190,70],[51,1],[99,1],[70,71],[69,72],[68,1],[82,73],[83,74],[53,75],[50,76],[54,1],[52,77],[81,78],[55,79],[46,1],[44,1],[45,1],[8,1],[10,1],[9,1],[2,1],[11,1],[12,1],[13,1],[14,1],[15,1],[16,1],[17,1],[18,1],[3,1],[19,1],[4,1],[20,1],[24,1],[21,1],[22,1],[23,1],[25,1],[26,1],[27,1],[5,1],[28,1],[29,1],[30,1],[31,1],[6,1],[35,1],[32,1],[33,1],[34,1],[36,1],[7,1],[37,1],[42,1],[43,1],[38,1],[39,1],[40,1],[41,1],[1,1],[115,80],[125,81],[114,80],[135,82],[106,83],[105,84],[134,85],[128,86],[133,87],[108,88],[122,89],[107,90],[131,91],[103,92],[102,85],[132,93],[104,94],[109,95],[110,1],[113,95],[100,1],[136,96],[126,97],[117,98],[118,99],[120,100],[116,101],[119,102],[129,85],[111,103],[112,104],[121,105],[101,106],[124,97],[123,95],[127,1],[130,107],[56,108],[85,109],[86,108],[87,110],[91,111],[90,112],[84,113],[92,114]],"version":"5.6.3"}
|
|
1
|
+
{"fileNames":["../../../node_modules/typescript/lib/lib.es5.d.ts","../../../node_modules/typescript/lib/lib.es2015.d.ts","../../../node_modules/typescript/lib/lib.es2016.d.ts","../../../node_modules/typescript/lib/lib.es2017.d.ts","../../../node_modules/typescript/lib/lib.es2018.d.ts","../../../node_modules/typescript/lib/lib.es2019.d.ts","../../../node_modules/typescript/lib/lib.es2020.d.ts","../../../node_modules/typescript/lib/lib.dom.d.ts","../../../node_modules/typescript/lib/lib.es2015.core.d.ts","../../../node_modules/typescript/lib/lib.es2015.collection.d.ts","../../../node_modules/typescript/lib/lib.es2015.generator.d.ts","../../../node_modules/typescript/lib/lib.es2015.iterable.d.ts","../../../node_modules/typescript/lib/lib.es2015.promise.d.ts","../../../node_modules/typescript/lib/lib.es2015.proxy.d.ts","../../../node_modules/typescript/lib/lib.es2015.reflect.d.ts","../../../node_modules/typescript/lib/lib.es2015.symbol.d.ts","../../../node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts","../../../node_modules/typescript/lib/lib.es2016.array.include.d.ts","../../../node_modules/typescript/lib/lib.es2016.intl.d.ts","../../../node_modules/typescript/lib/lib.es2017.arraybuffer.d.ts","../../../node_modules/typescript/lib/lib.es2017.date.d.ts","../../../node_modules/typescript/lib/lib.es2017.object.d.ts","../../../node_modules/typescript/lib/lib.es2017.sharedmemory.d.ts","../../../node_modules/typescript/lib/lib.es2017.string.d.ts","../../../node_modules/typescript/lib/lib.es2017.intl.d.ts","../../../node_modules/typescript/lib/lib.es2017.typedarrays.d.ts","../../../node_modules/typescript/lib/lib.es2018.asyncgenerator.d.ts","../../../node_modules/typescript/lib/lib.es2018.asynciterable.d.ts","../../../node_modules/typescript/lib/lib.es2018.intl.d.ts","../../../node_modules/typescript/lib/lib.es2018.promise.d.ts","../../../node_modules/typescript/lib/lib.es2018.regexp.d.ts","../../../node_modules/typescript/lib/lib.es2019.array.d.ts","../../../node_modules/typescript/lib/lib.es2019.object.d.ts","../../../node_modules/typescript/lib/lib.es2019.string.d.ts","../../../node_modules/typescript/lib/lib.es2019.symbol.d.ts","../../../node_modules/typescript/lib/lib.es2019.intl.d.ts","../../../node_modules/typescript/lib/lib.es2020.bigint.d.ts","../../../node_modules/typescript/lib/lib.es2020.date.d.ts","../../../node_modules/typescript/lib/lib.es2020.promise.d.ts","../../../node_modules/typescript/lib/lib.es2020.sharedmemory.d.ts","../../../node_modules/typescript/lib/lib.es2020.string.d.ts","../../../node_modules/typescript/lib/lib.es2020.symbol.wellknown.d.ts","../../../node_modules/typescript/lib/lib.es2020.intl.d.ts","../../../node_modules/typescript/lib/lib.es2020.number.d.ts","../../../node_modules/typescript/lib/lib.decorators.d.ts","../../../node_modules/typescript/lib/lib.decorators.legacy.d.ts","../../../node_modules/tslib/tslib.d.ts","../../../node_modules/@lit/reactive-element/css-tag.d.ts","../../../node_modules/@lit/reactive-element/reactive-controller.d.ts","../../../node_modules/@lit/reactive-element/reactive-element.d.ts","../../../node_modules/lit-html/directive.d.ts","../../../node_modules/@types/trusted-types/lib/index.d.ts","../../../node_modules/lit-html/lit-html.d.ts","../../../node_modules/lit-element/lit-element.d.ts","../../../node_modules/lit-html/is-server.d.ts","../../../node_modules/lit/index.d.ts","../src/calendar-monthly-styles.ts","../../../node_modules/@material/web/internal/controller/attachable-controller.d.ts","../../../node_modules/@material/web/focus/internal/focus-ring.d.ts","../../../node_modules/@material/web/focus/md-focus-ring.d.ts","../../../node_modules/@material/web/ripple/internal/ripple.d.ts","../../../node_modules/@material/web/ripple/ripple.d.ts","../../../node_modules/@material/web/labs/behaviors/mixin.d.ts","../../../node_modules/@material/web/labs/behaviors/element-internals.d.ts","../../../node_modules/@material/web/internal/controller/form-submitter.d.ts","../../../node_modules/@material/web/button/internal/button.d.ts","../../../node_modules/@material/web/button/internal/text-button.d.ts","../../../node_modules/@material/web/button/text-button.d.ts","../../../node_modules/dayjs/esm/locale/types.d.ts","../../../node_modules/dayjs/esm/locale/index.d.ts","../../../node_modules/dayjs/esm/index.d.ts","../../../node_modules/@lit/reactive-element/decorators/base.d.ts","../../../node_modules/@lit/reactive-element/decorators/custom-element.d.ts","../../../node_modules/@lit/reactive-element/decorators/property.d.ts","../../../node_modules/@lit/reactive-element/decorators/state.d.ts","../../../node_modules/@lit/reactive-element/decorators/event-options.d.ts","../../../node_modules/@lit/reactive-element/decorators/query.d.ts","../../../node_modules/@lit/reactive-element/decorators/query-all.d.ts","../../../node_modules/@lit/reactive-element/decorators/query-async.d.ts","../../../node_modules/@lit/reactive-element/decorators/query-assigned-nodes.d.ts","../../../node_modules/@lit/reactive-element/decorators/query-assigned-elements.d.ts","../../../node_modules/lit/decorators.d.ts","../../../node_modules/dayjs/esm/plugin/weekday/index.d.ts","../../../node_modules/dayjs/esm/plugin/weekofyear/index.d.ts","../src/types.ts","../src/calendar-monthly.ts","../src/calendar-weekly-styles.ts","../src/calendar-weekly.ts","../../../node_modules/@material/web/icon/internal/icon.d.ts","../../../node_modules/@material/web/icon/icon.d.ts","../src/ox-event-view.ts","../src/index.ts","../stories/index.stories.ts","../../../node_modules/@types/node/compatibility/disposable.d.ts","../../../node_modules/@types/node/compatibility/indexable.d.ts","../../../node_modules/@types/node/compatibility/iterators.d.ts","../../../node_modules/@types/node/compatibility/index.d.ts","../../../node_modules/@types/node/globals.typedarray.d.ts","../../../node_modules/@types/node/buffer.buffer.d.ts","../../../node_modules/buffer/index.d.ts","../../../node_modules/undici-types/header.d.ts","../../../node_modules/undici-types/readable.d.ts","../../../node_modules/undici-types/file.d.ts","../../../node_modules/undici-types/fetch.d.ts","../../../node_modules/undici-types/formdata.d.ts","../../../node_modules/undici-types/connector.d.ts","../../../node_modules/undici-types/client.d.ts","../../../node_modules/undici-types/errors.d.ts","../../../node_modules/undici-types/dispatcher.d.ts","../../../node_modules/undici-types/global-dispatcher.d.ts","../../../node_modules/undici-types/global-origin.d.ts","../../../node_modules/undici-types/pool-stats.d.ts","../../../node_modules/undici-types/pool.d.ts","../../../node_modules/undici-types/handlers.d.ts","../../../node_modules/undici-types/balanced-pool.d.ts","../../../node_modules/undici-types/agent.d.ts","../../../node_modules/undici-types/mock-interceptor.d.ts","../../../node_modules/undici-types/mock-agent.d.ts","../../../node_modules/undici-types/mock-client.d.ts","../../../node_modules/undici-types/mock-pool.d.ts","../../../node_modules/undici-types/mock-errors.d.ts","../../../node_modules/undici-types/proxy-agent.d.ts","../../../node_modules/undici-types/env-http-proxy-agent.d.ts","../../../node_modules/undici-types/retry-handler.d.ts","../../../node_modules/undici-types/retry-agent.d.ts","../../../node_modules/undici-types/api.d.ts","../../../node_modules/undici-types/interceptors.d.ts","../../../node_modules/undici-types/util.d.ts","../../../node_modules/undici-types/cookies.d.ts","../../../node_modules/undici-types/patch.d.ts","../../../node_modules/undici-types/websocket.d.ts","../../../node_modules/undici-types/eventsource.d.ts","../../../node_modules/undici-types/filereader.d.ts","../../../node_modules/undici-types/diagnostics-channel.d.ts","../../../node_modules/undici-types/content-type.d.ts","../../../node_modules/undici-types/cache.d.ts","../../../node_modules/undici-types/index.d.ts","../../../node_modules/@types/node/globals.d.ts","../../../node_modules/@types/node/assert.d.ts","../../../node_modules/@types/node/assert/strict.d.ts","../../../node_modules/@types/node/async_hooks.d.ts","../../../node_modules/@types/node/buffer.d.ts","../../../node_modules/@types/node/child_process.d.ts","../../../node_modules/@types/node/cluster.d.ts","../../../node_modules/@types/node/console.d.ts","../../../node_modules/@types/node/constants.d.ts","../../../node_modules/@types/node/crypto.d.ts","../../../node_modules/@types/node/dgram.d.ts","../../../node_modules/@types/node/diagnostics_channel.d.ts","../../../node_modules/@types/node/dns.d.ts","../../../node_modules/@types/node/dns/promises.d.ts","../../../node_modules/@types/node/domain.d.ts","../../../node_modules/@types/node/dom-events.d.ts","../../../node_modules/@types/node/events.d.ts","../../../node_modules/@types/node/fs.d.ts","../../../node_modules/@types/node/fs/promises.d.ts","../../../node_modules/@types/node/http.d.ts","../../../node_modules/@types/node/http2.d.ts","../../../node_modules/@types/node/https.d.ts","../../../node_modules/@types/node/inspector.d.ts","../../../node_modules/@types/node/module.d.ts","../../../node_modules/@types/node/net.d.ts","../../../node_modules/@types/node/os.d.ts","../../../node_modules/@types/node/path.d.ts","../../../node_modules/@types/node/perf_hooks.d.ts","../../../node_modules/@types/node/process.d.ts","../../../node_modules/@types/node/punycode.d.ts","../../../node_modules/@types/node/querystring.d.ts","../../../node_modules/@types/node/readline.d.ts","../../../node_modules/@types/node/readline/promises.d.ts","../../../node_modules/@types/node/repl.d.ts","../../../node_modules/@types/node/sea.d.ts","../../../node_modules/@types/node/sqlite.d.ts","../../../node_modules/@types/node/stream.d.ts","../../../node_modules/@types/node/stream/promises.d.ts","../../../node_modules/@types/node/stream/consumers.d.ts","../../../node_modules/@types/node/stream/web.d.ts","../../../node_modules/@types/node/string_decoder.d.ts","../../../node_modules/@types/node/test.d.ts","../../../node_modules/@types/node/timers.d.ts","../../../node_modules/@types/node/timers/promises.d.ts","../../../node_modules/@types/node/tls.d.ts","../../../node_modules/@types/node/trace_events.d.ts","../../../node_modules/@types/node/tty.d.ts","../../../node_modules/@types/node/url.d.ts","../../../node_modules/@types/node/util.d.ts","../../../node_modules/@types/node/v8.d.ts","../../../node_modules/@types/node/vm.d.ts","../../../node_modules/@types/node/wasi.d.ts","../../../node_modules/@types/node/worker_threads.d.ts","../../../node_modules/@types/node/zlib.d.ts","../../../node_modules/@types/node/index.d.ts","../../../node_modules/@types/mocha/index.d.ts"],"fileIdsList":[[99,142],[72,99,142],[50,72,99,142],[50,72,80,99,142],[74,99,142],[48,49,99,142],[53,56,60,62,63,64,65,99,142],[66,99,142],[56,67,99,142],[56,58,99,142],[56,59,99,142],[56,89,99,142],[53,56,99,142],[56,99,142],[56,64,99,142],[56,63,99,142],[53,56,58,99,142],[56,61,99,142],[99,139,142],[99,141,142],[142],[99,142,147,177],[99,142,143,148,154,155,162,174,185],[99,142,143,144,154,162],[94,95,96,99,142],[99,142,145,186],[99,142,146,147,155,163],[99,142,147,174,182],[99,142,148,150,154,162],[99,141,142,149],[99,142,150,151],[99,142,154],[99,142,152,154],[99,141,142,154],[99,142,154,155,156,174,185],[99,142,154,155,156,169,174,177],[99,137,142,190],[99,137,142,150,154,157,162,174,185],[99,142,154,155,157,158,162,174,182,185],[99,142,157,159,174,182,185],[97,98,99,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191],[99,142,154,160],[99,142,161,185,190],[99,142,150,154,162,174],[99,142,163],[99,142,164],[99,141,142,165],[99,139,140,141,142,143,144,145,146,147,148,149,150,151,152,154,155,156,157,158,159,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191],[99,142,167],[99,142,168],[99,142,154,169,170],[99,142,169,171,186,188],[99,142,154,174,175,176,177],[99,142,174,176],[99,142,174,175],[99,142,177],[99,142,178],[99,139,142,174],[99,142,154,180,181],[99,142,180,181],[99,142,147,162,174,182],[99,142,183],[99,142,162,184],[99,142,157,168,185],[99,142,147,186],[99,142,174,187],[99,142,161,188],[99,142,189],[99,142,147,154,156,165,174,185,188,190],[99,142,174,191],[70,99,142],[69,99,142],[71,84,99,142],[71,83,99,142],[50,53,99,142],[53,99,142],[51,52,99,142],[73,74,75,76,77,78,79,80,81,99,142],[50,53,54,55,99,142],[99,109,113,142,185],[99,109,142,174,185],[99,104,142],[99,106,109,142,182,185],[99,142,162,182],[99,142,192],[99,104,142,192],[99,106,109,142,162,185],[99,101,102,105,108,142,154,174,185],[99,109,116,142],[99,101,107,142],[99,109,130,131,142],[99,105,109,142,177,185,192],[99,130,142,192],[99,103,104,142,192],[99,109,142],[99,103,104,105,106,107,108,109,110,111,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,131,132,133,134,135,136,142],[99,109,124,142],[99,109,116,117,142],[99,107,109,117,118,142],[99,108,142],[99,101,104,109,142],[99,109,113,117,118,142],[99,113,142],[99,107,109,112,142,185],[99,101,106,109,116,142],[99,142,174],[99,104,109,130,142,190,192],[47,56,99,142],[47,56,57,68,71,82,85,99,142],[47,56,68,71,82,85,87,99,142],[47,85,91,99,142],[47,56,82,85,86,88,90,99,142],[47,56,71,83,84,99,142],[47,56,85,91,99,142]],"fileInfos":[{"version":"e41c290ef7dd7dab3493e6cbe5909e0148edf4a8dad0271be08edec368a0f7b9","affectsGlobalScope":true,"impliedFormat":1},{"version":"45b7ab580deca34ae9729e97c13cfd999df04416a79116c3bfb483804f85ded4","impliedFormat":1},{"version":"3facaf05f0c5fc569c5649dd359892c98a85557e3e0c847964caeb67076f4d75","impliedFormat":1},{"version":"e44bb8bbac7f10ecc786703fe0a6a4b952189f908707980ba8f3c8975a760962","impliedFormat":1},{"version":"5e1c4c362065a6b95ff952c0eab010f04dcd2c3494e813b493ecfd4fcb9fc0d8","impliedFormat":1},{"version":"68d73b4a11549f9c0b7d352d10e91e5dca8faa3322bfb77b661839c42b1ddec7","impliedFormat":1},{"version":"5efce4fc3c29ea84e8928f97adec086e3dc876365e0982cc8479a07954a3efd4","impliedFormat":1},{"version":"4fd3f3422b2d2a3dfd5cdd0f387b3a8ec45f006c6ea896a4cb41264c2100bb2c","affectsGlobalScope":true,"impliedFormat":1},{"version":"c57796738e7f83dbc4b8e65132f11a377649c00dd3eee333f672b8f0a6bea671","affectsGlobalScope":true,"impliedFormat":1},{"version":"dc2df20b1bcdc8c2d34af4926e2c3ab15ffe1160a63e58b7e09833f616efff44","affectsGlobalScope":true,"impliedFormat":1},{"version":"515d0b7b9bea2e31ea4ec968e9edd2c39d3eebf4a2d5cbd04e88639819ae3b71","affectsGlobalScope":true,"impliedFormat":1},{"version":"62bb211266ee48b2d0edf0d8d1b191f0c24fc379a82bd4c1692a082c540bc6b1","affectsGlobalScope":true,"impliedFormat":1},{"version":"0dc1e7ceda9b8b9b455c3a2d67b0412feab00bd2f66656cd8850e8831b08b537","affectsGlobalScope":true,"impliedFormat":1},{"version":"ce691fb9e5c64efb9547083e4a34091bcbe5bdb41027e310ebba8f7d96a98671","affectsGlobalScope":true,"impliedFormat":1},{"version":"8d697a2a929a5fcb38b7a65594020fcef05ec1630804a33748829c5ff53640d0","affectsGlobalScope":true,"impliedFormat":1},{"version":"4ff2a353abf8a80ee399af572debb8faab2d33ad38c4b4474cff7f26e7653b8d","affectsGlobalScope":true,"impliedFormat":1},{"version":"936e80ad36a2ee83fc3caf008e7c4c5afe45b3cf3d5c24408f039c1d47bdc1df","affectsGlobalScope":true,"impliedFormat":1},{"version":"d15bea3d62cbbdb9797079416b8ac375ae99162a7fba5de2c6c505446486ac0a","affectsGlobalScope":true,"impliedFormat":1},{"version":"68d18b664c9d32a7336a70235958b8997ebc1c3b8505f4f1ae2b7e7753b87618","affectsGlobalScope":true,"impliedFormat":1},{"version":"eb3d66c8327153d8fa7dd03f9c58d351107fe824c79e9b56b462935176cdf12a","affectsGlobalScope":true,"impliedFormat":1},{"version":"38f0219c9e23c915ef9790ab1d680440d95419ad264816fa15009a8851e79119","affectsGlobalScope":true,"impliedFormat":1},{"version":"69ab18c3b76cd9b1be3d188eaf8bba06112ebbe2f47f6c322b5105a6fbc45a2e","affectsGlobalScope":true,"impliedFormat":1},{"version":"fef8cfad2e2dc5f5b3d97a6f4f2e92848eb1b88e897bb7318cef0e2820bceaab","affectsGlobalScope":true,"impliedFormat":1},{"version":"2f11ff796926e0832f9ae148008138ad583bd181899ab7dd768a2666700b1893","affectsGlobalScope":true,"impliedFormat":1},{"version":"4de680d5bb41c17f7f68e0419412ca23c98d5749dcaaea1896172f06435891fc","affectsGlobalScope":true,"impliedFormat":1},{"version":"954296b30da6d508a104a3a0b5d96b76495c709785c1d11610908e63481ee667","affectsGlobalScope":true,"impliedFormat":1},{"version":"ac9538681b19688c8eae65811b329d3744af679e0bdfa5d842d0e32524c73e1c","affectsGlobalScope":true,"impliedFormat":1},{"version":"0a969edff4bd52585473d24995c5ef223f6652d6ef46193309b3921d65dd4376","affectsGlobalScope":true,"impliedFormat":1},{"version":"9e9fbd7030c440b33d021da145d3232984c8bb7916f277e8ffd3dc2e3eae2bdb","affectsGlobalScope":true,"impliedFormat":1},{"version":"811ec78f7fefcabbda4bfa93b3eb67d9ae166ef95f9bff989d964061cbf81a0c","affectsGlobalScope":true,"impliedFormat":1},{"version":"717937616a17072082152a2ef351cb51f98802fb4b2fdabd32399843875974ca","affectsGlobalScope":true,"impliedFormat":1},{"version":"d7e7d9b7b50e5f22c915b525acc5a49a7a6584cf8f62d0569e557c5cfc4b2ac2","affectsGlobalScope":true,"impliedFormat":1},{"version":"71c37f4c9543f31dfced6c7840e068c5a5aacb7b89111a4364b1d5276b852557","affectsGlobalScope":true,"impliedFormat":1},{"version":"576711e016cf4f1804676043e6a0a5414252560eb57de9faceee34d79798c850","affectsGlobalScope":true,"impliedFormat":1},{"version":"89c1b1281ba7b8a96efc676b11b264de7a8374c5ea1e6617f11880a13fc56dc6","affectsGlobalScope":true,"impliedFormat":1},{"version":"74f7fa2d027d5b33eb0471c8e82a6c87216223181ec31247c357a3e8e2fddc5b","affectsGlobalScope":true,"impliedFormat":1},{"version":"f1e2a172204962276504466a6393426d2ca9c54894b1ad0a6c9dad867a65f876","affectsGlobalScope":true,"impliedFormat":1},{"version":"063600664504610fe3e99b717a1223f8b1900087fab0b4cad1496a114744f8df","affectsGlobalScope":true,"impliedFormat":1},{"version":"934019d7e3c81950f9a8426d093458b65d5aff2c7c1511233c0fd5b941e608ab","affectsGlobalScope":true,"impliedFormat":1},{"version":"52ada8e0b6e0482b728070b7639ee42e83a9b1c22d205992756fe020fd9f4a47","affectsGlobalScope":true,"impliedFormat":1},{"version":"3bdefe1bfd4d6dee0e26f928f93ccc128f1b64d5d501ff4a8cf3c6371200e5e6","affectsGlobalScope":true,"impliedFormat":1},{"version":"59fb2c069260b4ba00b5643b907ef5d5341b167e7d1dbf58dfd895658bda2867","affectsGlobalScope":true,"impliedFormat":1},{"version":"639e512c0dfc3fad96a84caad71b8834d66329a1f28dc95e3946c9b58176c73a","affectsGlobalScope":true,"impliedFormat":1},{"version":"368af93f74c9c932edd84c58883e736c9e3d53cec1fe24c0b0ff451f529ceab1","affectsGlobalScope":true,"impliedFormat":1},{"version":"8e7f8264d0fb4c5339605a15daadb037bf238c10b654bb3eee14208f860a32ea","affectsGlobalScope":true,"impliedFormat":1},{"version":"782dec38049b92d4e85c1585fbea5474a219c6984a35b004963b00beb1aab538","affectsGlobalScope":true,"impliedFormat":1},{"version":"a6a5253138c5432c68a1510c70fe78a644fe2e632111ba778e1978010d6edfec","impliedFormat":1},{"version":"e056bb30bf82271634daeee81f772f4a7960085f01f6d4d09c8da1ebe5f6a623","impliedFormat":99},{"version":"5e30131b6a5587fe666926ad1d9807e733c0a597ed12d682669fcaa331aea576","impliedFormat":99},{"version":"86492a546c3308feaf1dde967afd325c321483b5e96f5fa9e9b6e691dc23fa9e","affectsGlobalScope":true,"impliedFormat":99},{"version":"00cb63103f9670f8094c238a4a7e252c8b4c06ba371fea5c44add7e41b7247e4","impliedFormat":99},{"version":"15fe687c59d62741b4494d5e623d497d55eb38966ecf5bea7f36e48fc3fbe15e","impliedFormat":1},{"version":"43f58358870effc43ba93c92c040dee2285cbd8685ddfa77658e498780727c4e","impliedFormat":99},{"version":"9a318e3a8900672b85cd3c8c3a5acf51b88049557a3ae897ccdcf2b85a8f61f9","impliedFormat":99},{"version":"1bcd560deed90a43c51b08aa18f7f55229f2e30974ab5ed1b7bb5721be379013","impliedFormat":99},{"version":"dc08fe04e50bc24d1baded4f33e942222bbdd5d77d6341a93cfe6e4e4586a3be","impliedFormat":99},{"version":"b7c46e7bdcc55743b4f04ca2c917093ef852b636427618759b225c047eb9937d","signature":"472fcc8d2e57ead8b3053190e4d167a30e002445e35ac0a3ea0d91ed10841be4"},{"version":"905800cc110167503d0cf58bb0dd6fa4aaac1e9cedc9bd9c48e5d1f8b5b8d4c8","impliedFormat":99},{"version":"d17be577b99e59611df19ca2cf0356df554f55bb06617c21321fc4ec06b820d0","impliedFormat":99},{"version":"5f30145fbc8ca508ae4e0d90a4fe9eaff490783f380a92f6aa262accdf7887b7","affectsGlobalScope":true,"impliedFormat":99},{"version":"2c887f29f6796ea68247c626acbef560ff29bb8d0042b641e4fc69559841463d","impliedFormat":99},{"version":"f882b77c5939860d599b4b7bc39f741ebcd56123e18b284500f4b8923acd2e72","affectsGlobalScope":true,"impliedFormat":99},{"version":"0230bc76ed3a464531a43d2434d315b9cc2096aaca28bdaa65b8f9dce9f3bc81","impliedFormat":99},{"version":"559d2d1cd7f37dc2ac59e7adce198ad16a5eb0c7273d67b8e4ff72821b7c853f","impliedFormat":99},{"version":"afa8760622183e35e86f516574217eb1853b08cf2168be0bfe991643ece1a8fe","impliedFormat":99},{"version":"769a5a51c85453028684e225eec525a7f277ec659863e0496e5ba31dacf8435c","impliedFormat":99},{"version":"0f28503979e769f6ee6e55350f621dc00e300f15688d52b02edc62d837d29b1d","impliedFormat":99},{"version":"fe869c79d427e84d916011d082def68a793c3c13e157079fec399f250418bd50","affectsGlobalScope":true,"impliedFormat":99},{"version":"73a0ee6395819b063df4b148211985f2e1442945c1a057204cf4cf6281760dc3","affectsGlobalScope":true,"impliedFormat":1},{"version":"7f0717e1c516c7b6b6acbc2177d1bd910a5d1abb757c85182ca8d089c9b6e398","impliedFormat":1},{"version":"3c5bb5207df7095882400323d692957e90ec17323ccff5fd5f29a1ecf3b165d0","impliedFormat":1},{"version":"cdeae34aca6700620ebf3f27cf7d439c3af97595dd6e2729fa4780483add5680","impliedFormat":99},{"version":"3ff87ea3471b51beaf4aa8fd8f4422862b11d343fdbb55bf383e0f8cc195a445","impliedFormat":99},{"version":"1cc188904259bd0985b24d9dc2a160891cb5e94210901466b951716fcdb4ff62","impliedFormat":99},{"version":"732fb71ecb695d6f36ddcbb72ebfe4ff6b6491d45101a00fa2b75a26b80d640f","impliedFormat":99},{"version":"039cb05125d7621f8143616c495b8e6b54249c4e64d2754b80ff93867f7f4b01","impliedFormat":99},{"version":"1b81f1fa82ad30af01ab1cae91ccaddc10c48f5916bbd6d282155e44a65d858d","impliedFormat":99},{"version":"a0fc7a02a75802678a67000607f20266cf1a49dc0e787967efe514e31b9ed0c3","impliedFormat":99},{"version":"5ebf098a1d81d400b8af82807cf19893700335cf91a7b9dbd83a5d737af34b11","impliedFormat":99},{"version":"101cf83ac3f9c5e1a7355a02e4fbe988877ef83c4ebec0ff0f02b2af022254a3","impliedFormat":99},{"version":"d017e2fcd44b46ca80cd2b592a6314e75f5caab5bda230f0f4a45e964049a43a","impliedFormat":99},{"version":"a8992b852521a66f63e0cedc6e1f054b28f972232b6fa5ca59771db6a1c8bbea","impliedFormat":99},{"version":"17a5d07dc6ce4343d625f594693fd887ca453702b5c21299b29cadb4e48b540a","impliedFormat":1},{"version":"bef3344291a5376aa1623daf4fdc1a3c4c711ce7c9f02a404ee43396649ba616","impliedFormat":1},{"version":"416e90ecbc96db7ae72484f14ec0437c0c2d27c867f30103d03d3d26395ea99f","signature":"379fae3ba1db0efbc53b8172052f028c4d5c508d55cc128fcbc7aead322fb97e"},{"version":"04e2b45ad3c835226b28dd8b862ba60c6467e43da3de3151dc25ad7e97bb429f","signature":"9498130f987c03f479c21ff2ba7ccff20c3005c9cfd8b5c38f2ac9f8514c92ca"},{"version":"91d784dd9de44f1c5085f2942b97e314085496ed3bf8e7cd77287dd20a9d4e16","signature":"48e115797224ff43bdf84638e950523f86cf220b90f50c2a9f27c8971bbaa632"},{"version":"af3791d8d51f03446305eaa591612280cebfa00d4fbac3bc21fc928bd4c6ea64","signature":"c079e1202a7821df0cf03001fb755dd9d1924e82259bd0840c23ae5fc52dfe81"},{"version":"5565deadc1d553f9f1ef370351432c258d2a6f1a5ca47e574e5430db824468c7","impliedFormat":99},{"version":"4ae1ed87c59518f4e0918a21409ec3020e97037a386b57953c6b9fed9cad6949","affectsGlobalScope":true,"impliedFormat":99},{"version":"d62a95aace1a1b7509cd2f15e0dd91eb105cb2e65b3059fbb3b631c5bef40cfd","signature":"1f1b15c57e5c8cc81559bd6b881ea87a2a9a0114b0c090c9333fbb02def27290"},{"version":"f481ea2631a1333dedf003b788e269f3e0e8f1598c4af582b91ae1ab484a1779","signature":"bf90d5c500d2be8276252beafb8f0c64db0892f5a0149b34f3315dfc665868fc"},{"version":"406bd66870748c1931dfe37dcffbe294c958ecfec19ad099c44a6b5490159fd8","signature":"5ef16bd781d361a6c9f77bb612ce034716775c9bbca40917aa62fd363fa0863d"},{"version":"70521b6ab0dcba37539e5303104f29b721bfb2940b2776da4cc818c07e1fefc1","affectsGlobalScope":true,"impliedFormat":1},{"version":"030e350db2525514580ed054f712ffb22d273e6bc7eddc1bb7eda1e0ba5d395e","affectsGlobalScope":true,"impliedFormat":1},{"version":"d153a11543fd884b596587ccd97aebbeed950b26933ee000f94009f1ab142848","affectsGlobalScope":true,"impliedFormat":1},{"version":"21d819c173c0cf7cc3ce57c3276e77fd9a8a01d35a06ad87158781515c9a438a","impliedFormat":1},{"version":"a79e62f1e20467e11a904399b8b18b18c0c6eea6b50c1168bf215356d5bebfaf","affectsGlobalScope":true,"impliedFormat":1},{"version":"0fd06258805d26c72f5997e07a23155d322d5f05387adb3744a791fe6a0b042d","affectsGlobalScope":true,"impliedFormat":1},{"version":"8e9c23ba78aabc2e0a27033f18737a6df754067731e69dc5f52823957d60a4b6","impliedFormat":1},{"version":"5929864ce17fba74232584d90cb721a89b7ad277220627cc97054ba15a98ea8f","impliedFormat":1},{"version":"24bd580b5743dc56402c440dc7f9a4f5d592ad7a419f25414d37a7bfe11e342b","impliedFormat":1},{"version":"25c8056edf4314820382a5fdb4bb7816999acdcb929c8f75e3f39473b87e85bc","impliedFormat":1},{"version":"c464d66b20788266e5353b48dc4aa6bc0dc4a707276df1e7152ab0c9ae21fad8","impliedFormat":1},{"version":"78d0d27c130d35c60b5e5566c9f1e5be77caf39804636bc1a40133919a949f21","impliedFormat":1},{"version":"c6fd2c5a395f2432786c9cb8deb870b9b0e8ff7e22c029954fabdd692bff6195","impliedFormat":1},{"version":"1d6e127068ea8e104a912e42fc0a110e2aa5a66a356a917a163e8cf9a65e4a75","impliedFormat":1},{"version":"5ded6427296cdf3b9542de4471d2aa8d3983671d4cac0f4bf9c637208d1ced43","impliedFormat":1},{"version":"6bdc71028db658243775263e93a7db2fd2abfce3ca569c3cca5aee6ed5eb186d","impliedFormat":1},{"version":"cadc8aced301244057c4e7e73fbcae534b0f5b12a37b150d80e5a45aa4bebcbd","impliedFormat":1},{"version":"385aab901643aa54e1c36f5ef3107913b10d1b5bb8cbcd933d4263b80a0d7f20","impliedFormat":1},{"version":"9670d44354bab9d9982eca21945686b5c24a3f893db73c0dae0fd74217a4c219","impliedFormat":1},{"version":"0b8a9268adaf4da35e7fa830c8981cfa22adbbe5b3f6f5ab91f6658899e657a7","impliedFormat":1},{"version":"11396ed8a44c02ab9798b7dca436009f866e8dae3c9c25e8c1fbc396880bf1bb","impliedFormat":1},{"version":"ba7bc87d01492633cb5a0e5da8a4a42a1c86270e7b3d2dea5d156828a84e4882","impliedFormat":1},{"version":"4893a895ea92c85345017a04ed427cbd6a1710453338df26881a6019432febdd","impliedFormat":1},{"version":"c21dc52e277bcfc75fac0436ccb75c204f9e1b3fa5e12729670910639f27343e","impliedFormat":1},{"version":"13f6f39e12b1518c6650bbb220c8985999020fe0f21d818e28f512b7771d00f9","impliedFormat":1},{"version":"9b5369969f6e7175740bf51223112ff209f94ba43ecd3bb09eefff9fd675624a","impliedFormat":1},{"version":"4fe9e626e7164748e8769bbf74b538e09607f07ed17c2f20af8d680ee49fc1da","impliedFormat":1},{"version":"24515859bc0b836719105bb6cc3d68255042a9f02a6022b3187948b204946bd2","impliedFormat":1},{"version":"ea0148f897b45a76544ae179784c95af1bd6721b8610af9ffa467a518a086a43","impliedFormat":1},{"version":"24c6a117721e606c9984335f71711877293a9651e44f59f3d21c1ea0856f9cc9","impliedFormat":1},{"version":"dd3273ead9fbde62a72949c97dbec2247ea08e0c6952e701a483d74ef92d6a17","impliedFormat":1},{"version":"405822be75ad3e4d162e07439bac80c6bcc6dbae1929e179cf467ec0b9ee4e2e","impliedFormat":1},{"version":"0db18c6e78ea846316c012478888f33c11ffadab9efd1cc8bcc12daded7a60b6","impliedFormat":1},{"version":"e61be3f894b41b7baa1fbd6a66893f2579bfad01d208b4ff61daef21493ef0a8","impliedFormat":1},{"version":"bd0532fd6556073727d28da0edfd1736417a3f9f394877b6d5ef6ad88fba1d1a","impliedFormat":1},{"version":"89167d696a849fce5ca508032aabfe901c0868f833a8625d5a9c6e861ef935d2","impliedFormat":1},{"version":"615ba88d0128ed16bf83ef8ccbb6aff05c3ee2db1cc0f89ab50a4939bfc1943f","impliedFormat":1},{"version":"a4d551dbf8746780194d550c88f26cf937caf8d56f102969a110cfaed4b06656","impliedFormat":1},{"version":"8bd86b8e8f6a6aa6c49b71e14c4ffe1211a0e97c80f08d2c8cc98838006e4b88","impliedFormat":1},{"version":"317e63deeb21ac07f3992f5b50cdca8338f10acd4fbb7257ebf56735bf52ab00","impliedFormat":1},{"version":"4732aec92b20fb28c5fe9ad99521fb59974289ed1e45aecb282616202184064f","impliedFormat":1},{"version":"2e85db9e6fd73cfa3d7f28e0ab6b55417ea18931423bd47b409a96e4a169e8e6","impliedFormat":1},{"version":"c46e079fe54c76f95c67fb89081b3e399da2c7d109e7dca8e4b58d83e332e605","impliedFormat":1},{"version":"bf67d53d168abc1298888693338cb82854bdb2e69ef83f8a0092093c2d562107","impliedFormat":1},{"version":"81184fe8e67d78ac4e5374650f0892d547d665d77da2b2f544b5d84729c4a15d","affectsGlobalScope":true,"impliedFormat":1},{"version":"f52e8dacc97d71dcc96af29e49584353f9c54cb916d132e3e768d8b8129c928d","impliedFormat":1},{"version":"7394959e5a741b185456e1ef5d64599c36c60a323207450991e7a42e08911419","impliedFormat":1},{"version":"76103716ba397bbb61f9fa9c9090dca59f39f9047cb1352b2179c5d8e7f4e8d0","impliedFormat":1},{"version":"53eac70430b30089a3a1959d8306b0f9cfaf0de75224b68ef25243e0b5ad1ca3","affectsGlobalScope":true,"impliedFormat":1},{"version":"4314c7a11517e221f7296b46547dbc4df047115b182f544d072bdccffa57fc72","impliedFormat":1},{"version":"115971d64632ea4742b5b115fb64ed04bcaae2c3c342f13d9ba7e3f9ee39c4e7","impliedFormat":1},{"version":"c2510f124c0293ab80b1777c44d80f812b75612f297b9857406468c0f4dafe29","affectsGlobalScope":true,"impliedFormat":1},{"version":"a40826e8476694e90da94aa008283a7de50d1dafd37beada623863f1901cb7fb","impliedFormat":1},{"version":"86956cc2eb9dd371d6fab493d326a574afedebf76eef3fa7833b8e0d9b52d6f1","affectsGlobalScope":true,"impliedFormat":1},{"version":"24642567d3729bcc545bacb65ee7c0db423400c7f1ef757cab25d05650064f98","impliedFormat":1},{"version":"e6f5a38687bebe43a4cef426b69d34373ef68be9a6b1538ec0a371e69f309354","impliedFormat":1},{"version":"a6bf63d17324010ca1fbf0389cab83f93389bb0b9a01dc8a346d092f65b3605f","impliedFormat":1},{"version":"e009777bef4b023a999b2e5b9a136ff2cde37dc3f77c744a02840f05b18be8ff","impliedFormat":1},{"version":"1e0d1f8b0adfa0b0330e028c7941b5a98c08b600efe7f14d2d2a00854fb2f393","impliedFormat":1},{"version":"ee1ee365d88c4c6c0c0a5a5701d66ebc27ccd0bcfcfaa482c6e2e7fe7b98edf7","affectsGlobalScope":true,"impliedFormat":1},{"version":"875928df2f3e9a3aed4019539a15d04ff6140a06df6cd1b2feb836d22a81eaca","affectsGlobalScope":true,"impliedFormat":1},{"version":"e9ad08a376ac84948fcca0013d6f1d4ae4f9522e26b91f87945b97c99d7cc30b","impliedFormat":1},{"version":"eaf9ee1d90a35d56264f0bf39842282c58b9219e112ac7d0c1bce98c6c5da672","impliedFormat":1},{"version":"c15c4427ae7fd1dcd7f312a8a447ac93581b0d4664ddf151ecd07de4bf2bb9d7","impliedFormat":1},{"version":"5135bdd72cc05a8192bd2e92f0914d7fc43ee077d1293dc622a049b7035a0afb","impliedFormat":1},{"version":"4f80de3a11c0d2f1329a72e92c7416b2f7eab14f67e92cac63bb4e8d01c6edc8","impliedFormat":1},{"version":"6d386bc0d7f3afa1d401afc3e00ed6b09205a354a9795196caed937494a713e6","impliedFormat":1},{"version":"75c3400359d59fae5aed4c4a59fcd8a9760cf451e25dc2174cb5e08b9d4803e2","affectsGlobalScope":true,"impliedFormat":1},{"version":"94c4187083503a74f4544503b5a30e2bd7af0032dc739b0c9a7ce87f8bddc7b9","impliedFormat":1},{"version":"b1b6ee0d012aeebe11d776a155d8979730440082797695fc8e2a5c326285678f","impliedFormat":1},{"version":"45875bcae57270aeb3ebc73a5e3fb4c7b9d91d6b045f107c1d8513c28ece71c0","impliedFormat":1},{"version":"3eb62baae4df08c9173e6903d3ca45942ccec8c3659b0565684a75f3292cffbb","affectsGlobalScope":true,"impliedFormat":1},{"version":"a85683ef86875f4ad4c6b7301bbcc63fb379a8d80d3d3fd735ee57f48ef8a47e","affectsGlobalScope":true,"impliedFormat":1},{"version":"3f16a7e4deafa527ed9995a772bb380eb7d3c2c0fd4ae178c5263ed18394db2c","impliedFormat":1},{"version":"c6b4e0a02545304935ecbf7de7a8e056a31bb50939b5b321c9d50a405b5a0bba","impliedFormat":1},{"version":"fab29e6d649aa074a6b91e3bdf2bff484934a46067f6ee97a30fcd9762ae2213","impliedFormat":1},{"version":"8145e07aad6da5f23f2fcd8c8e4c5c13fb26ee986a79d03b0829b8fce152d8b2","impliedFormat":1},{"version":"e1120271ebbc9952fdc7b2dd3e145560e52e06956345e6fdf91d70ca4886464f","impliedFormat":1},{"version":"15c5e91b5f08be34a78e3d976179bf5b7a9cc28dc0ef1ffebffeb3c7812a2dca","impliedFormat":1},{"version":"a8f06c2382a30b7cb89ad2dfc48fc3b2b490f3dafcd839dadc008e4e5d57031d","impliedFormat":1},{"version":"553870e516f8c772b89f3820576152ebc70181d7994d96917bb943e37da7f8a7","impliedFormat":1},{"version":"37ba7b45141a45ce6e80e66f2a96c8a5ab1bcef0fc2d0f56bb58df96ec67e972","impliedFormat":1},{"version":"93452d394fdd1dc551ec62f5042366f011a00d342d36d50793b3529bfc9bd633","impliedFormat":1},{"version":"745c4240220559bd340c8aeb6e3c5270a709d3565e934dc22a69c304703956bc","affectsGlobalScope":true,"impliedFormat":1},{"version":"2754d8221d77c7b382096651925eb476f1066b3348da4b73fe71ced7801edada","impliedFormat":1},{"version":"9212c6e9d80cb45441a3614e95afd7235a55a18584c2ed32d6c1aca5a0c53d93","affectsGlobalScope":true,"impliedFormat":1},{"version":"bef91efa0baea5d0e0f0f27b574a8bc100ce62a6d7e70220a0d58af6acab5e89","affectsGlobalScope":true,"impliedFormat":1},{"version":"282fd2a1268a25345b830497b4b7bf5037a5e04f6a9c44c840cb605e19fea841","impliedFormat":1},{"version":"5360a27d3ebca11b224d7d3e38e3e2c63f8290cb1fcf6c3610401898f8e68bc3","impliedFormat":1},{"version":"66ba1b2c3e3a3644a1011cd530fb444a96b1b2dfe2f5e837a002d41a1a799e60","impliedFormat":1},{"version":"7e514f5b852fdbc166b539fdd1f4e9114f29911592a5eb10a94bb3a13ccac3c4","impliedFormat":1},{"version":"7d6ff413e198d25639f9f01f16673e7df4e4bd2875a42455afd4ecc02ef156da","affectsGlobalScope":true,"impliedFormat":1},{"version":"6bd91a2a356600dee28eb0438082d0799a18a974a6537c4410a796bab749813c","affectsGlobalScope":true,"impliedFormat":1},{"version":"f689c4237b70ae6be5f0e4180e8833f34ace40529d1acc0676ab8fb8f70457d7","impliedFormat":1},{"version":"ae25afbbf1ed5df63a177d67b9048bf7481067f1b8dc9c39212e59db94fc9fc6","impliedFormat":1},{"version":"ac5ed35e649cdd8143131964336ab9076937fa91802ec760b3ea63b59175c10a","impliedFormat":1},{"version":"52a8e7e8a1454b6d1b5ad428efae3870ffc56f2c02d923467f2940c454aa9aec","affectsGlobalScope":true,"impliedFormat":1},{"version":"78dc0513cc4f1642906b74dda42146bcbd9df7401717d6e89ea6d72d12ecb539","impliedFormat":1},{"version":"ad90122e1cb599b3bc06a11710eb5489101be678f2920f2322b0ac3e195af78d","impliedFormat":1},{"version":"29f72ec1289ae3aeda78bf14b38086d3d803262ac13904b400422941a26a3636","affectsGlobalScope":true,"impliedFormat":1}],"root":[57,[85,88],[91,93]],"options":{"allowSyntheticDefaultImports":true,"declaration":true,"esModuleInterop":false,"experimentalDecorators":true,"importHelpers":true,"inlineSources":true,"module":99,"noEmitOnError":true,"outDir":"./","rootDir":"..","skipLibCheck":true,"sourceMap":true,"strict":true,"target":99,"useDefineForClassFields":false},"referencedMap":[[48,1],[72,1],[73,2],[76,3],[74,3],[78,3],[81,4],[80,3],[79,3],[77,3],[75,5],[49,1],[50,6],[66,7],[67,8],[68,9],[59,10],[60,11],[90,12],[89,13],[58,14],[65,15],[64,16],[63,1],[61,17],[62,18],[193,1],[139,19],[140,19],[141,20],[99,21],[142,22],[143,23],[144,24],[94,1],[97,25],[95,1],[96,1],[145,26],[146,27],[147,28],[148,29],[149,30],[150,31],[151,31],[153,32],[152,33],[154,34],[155,35],[156,36],[138,37],[98,1],[157,38],[158,39],[159,40],[192,41],[160,42],[161,43],[162,44],[163,45],[164,46],[165,47],[166,48],[167,49],[168,50],[169,51],[170,51],[171,52],[172,1],[173,1],[174,53],[176,54],[175,55],[177,56],[178,57],[179,58],[180,59],[181,60],[182,61],[183,62],[184,63],[185,64],[186,65],[187,66],[188,67],[189,68],[190,69],[191,70],[52,1],[100,1],[71,71],[70,72],[69,1],[83,73],[84,74],[54,75],[51,76],[55,1],[53,77],[82,78],[56,79],[47,1],[45,1],[46,1],[8,1],[10,1],[9,1],[2,1],[11,1],[12,1],[13,1],[14,1],[15,1],[16,1],[17,1],[18,1],[3,1],[19,1],[20,1],[4,1],[21,1],[25,1],[22,1],[23,1],[24,1],[26,1],[27,1],[28,1],[5,1],[29,1],[30,1],[31,1],[32,1],[6,1],[36,1],[33,1],[34,1],[35,1],[37,1],[7,1],[38,1],[43,1],[44,1],[39,1],[40,1],[41,1],[42,1],[1,1],[116,80],[126,81],[115,80],[136,82],[107,83],[106,84],[135,85],[129,86],[134,87],[109,88],[123,89],[108,90],[132,91],[104,92],[103,85],[133,93],[105,94],[110,95],[111,1],[114,95],[101,1],[137,96],[127,97],[118,98],[119,99],[121,100],[117,101],[120,102],[130,85],[112,103],[113,104],[122,105],[102,106],[125,97],[124,95],[128,1],[131,107],[57,108],[86,109],[87,108],[88,110],[92,111],[91,112],[85,113],[93,114]],"version":"5.7.2"}
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@operato/event-view",
|
|
3
3
|
"description": "Webcomponent event-view following open-wc recommendations",
|
|
4
4
|
"author": "heartyoh@hatiolab.com",
|
|
5
|
-
"version": "8.0.0-alpha.
|
|
5
|
+
"version": "8.0.0-alpha.53",
|
|
6
6
|
"main": "dist/src/index.js",
|
|
7
7
|
"module": "dist/src/index.js",
|
|
8
8
|
"license": "MIT",
|
|
@@ -81,5 +81,5 @@
|
|
|
81
81
|
"prettier --write"
|
|
82
82
|
]
|
|
83
83
|
},
|
|
84
|
-
"gitHead": "
|
|
84
|
+
"gitHead": "27f49f5055d5eac91ac389e73a563c0c0397dc9a"
|
|
85
85
|
}
|
|
@@ -45,7 +45,11 @@ export const CalendarMonthlyStyles = css`
|
|
|
45
45
|
border: var(--calendar-monthly-border, 1px solid rgba(0, 0, 0, 0.1));
|
|
46
46
|
border-width: var(--calendar-monthly-border-width, 0 1px 1px 0px);
|
|
47
47
|
opacity: var(--calendar-monthly-opacity);
|
|
48
|
+
|
|
49
|
+
user-select: none;
|
|
50
|
+
touch-action: none;
|
|
48
51
|
}
|
|
52
|
+
|
|
49
53
|
li:nth-child(7n + 1) {
|
|
50
54
|
border-left-width: 1px;
|
|
51
55
|
}
|
|
@@ -60,10 +64,15 @@ export const CalendarMonthlyStyles = css`
|
|
|
60
64
|
|
|
61
65
|
li[current-month] {
|
|
62
66
|
background-color: var(--calendar-current-month-background-color, var(--md-sys-color-surface-variant));
|
|
63
|
-
color: var(--calendar-current-month-color, var(--md-sys-color-on-surface));
|
|
67
|
+
color: var(--calendar-current-month-color, var(--md-sys-color-on-surface-variant));
|
|
64
68
|
opacity: 1;
|
|
65
69
|
}
|
|
66
70
|
|
|
71
|
+
li[selected] {
|
|
72
|
+
background-color: var(--calendar-monthly-selected-background-color, var(--md-sys-color-tertiary-container));
|
|
73
|
+
color: var(--calendar-monthly-selected-color, var(--md-sys-color-on-tertiary-container));
|
|
74
|
+
}
|
|
75
|
+
|
|
67
76
|
li[date] {
|
|
68
77
|
min-height: var(--calendar-monthly-date-min-height, 120px);
|
|
69
78
|
}
|
|
@@ -97,5 +106,8 @@ export const CalendarMonthlyStyles = css`
|
|
|
97
106
|
border-width: var(--calendar-monthly-event-border-width);
|
|
98
107
|
margin: var(--calendar-monthly-event-margin, 0 0 4px 0);
|
|
99
108
|
padding: var(--calendar-monthly-event-padding, 2px 4px 2px 4px);
|
|
109
|
+
|
|
110
|
+
user-select: all;
|
|
111
|
+
touch-action: all;
|
|
100
112
|
}
|
|
101
113
|
`
|
package/src/calendar-monthly.ts
CHANGED
|
@@ -17,6 +17,9 @@ export class CalendarMonthly extends LitElement {
|
|
|
17
17
|
@state() month: number = dayjs().month()
|
|
18
18
|
@state() calendar?: CALENDAR
|
|
19
19
|
@state() eventMap?: Map<Date, BizEvent[]>
|
|
20
|
+
@state() selections?: [Date, Date] | []
|
|
21
|
+
|
|
22
|
+
@state() pointerDownDate?: Date | null
|
|
20
23
|
|
|
21
24
|
render() {
|
|
22
25
|
return html`
|
|
@@ -47,11 +50,19 @@ export class CalendarMonthly extends LitElement {
|
|
|
47
50
|
<slot></slot>
|
|
48
51
|
</div>
|
|
49
52
|
|
|
50
|
-
<ol
|
|
53
|
+
<ol
|
|
54
|
+
@pointerdown=${this.handlePointerDown}
|
|
55
|
+
@pointermove=${this.handlePointerMove}
|
|
56
|
+
@pointerup=${this.handlePointerUp}
|
|
57
|
+
>
|
|
51
58
|
${WEEKDAYS.map(date => html` <li day-of-week>${date}</li> `)}
|
|
52
|
-
${this.calendar?.map(
|
|
53
|
-
|
|
54
|
-
|
|
59
|
+
${this.calendar?.map(date => {
|
|
60
|
+
const [from, to] = this.selections || ([] as any)
|
|
61
|
+
const { date: thisDate } = date
|
|
62
|
+
const selected = from && to && thisDate >= from && thisDate <= to
|
|
63
|
+
|
|
64
|
+
return html`
|
|
65
|
+
<li ?today=${date.today} ?current-month=${date.thisMonth} ?selected=${selected} .date=${thisDate} date>
|
|
55
66
|
<span date-label>${date.label}</span>
|
|
56
67
|
<div>
|
|
57
68
|
${(this.eventMap?.get(date?.date) || []).map(({ title, color, template }) =>
|
|
@@ -60,7 +71,7 @@ export class CalendarMonthly extends LitElement {
|
|
|
60
71
|
</div>
|
|
61
72
|
</li>
|
|
62
73
|
`
|
|
63
|
-
)}
|
|
74
|
+
})}
|
|
64
75
|
</ol>
|
|
65
76
|
`
|
|
66
77
|
}
|
|
@@ -80,14 +91,75 @@ export class CalendarMonthly extends LitElement {
|
|
|
80
91
|
}
|
|
81
92
|
}
|
|
82
93
|
|
|
83
|
-
|
|
94
|
+
handlePointerDown(event: PointerEvent) {
|
|
95
|
+
const target = event.target as HTMLElement
|
|
96
|
+
|
|
97
|
+
if (!target.hasAttribute('date') && !target.hasAttribute('date-label')) {
|
|
98
|
+
return
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
const dateElement = target.closest('[date]') as HTMLElement
|
|
102
|
+
const from = (dateElement as any).date
|
|
103
|
+
|
|
104
|
+
this.pointerDownDate = from
|
|
105
|
+
|
|
106
|
+
// 캡처를 설정하지 않음(Touch 디바이스에서 중요)
|
|
107
|
+
target.releasePointerCapture(event.pointerId)
|
|
108
|
+
|
|
109
|
+
event.preventDefault()
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
handlePointerMove(event: PointerEvent) {
|
|
113
|
+
const from = this.pointerDownDate
|
|
114
|
+
|
|
115
|
+
if (!from) {
|
|
116
|
+
return
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
const target = event.target as HTMLElement
|
|
120
|
+
const dateElement = target.closest('[date]') as HTMLElement
|
|
121
|
+
|
|
122
|
+
if (!dateElement) {
|
|
123
|
+
return
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
const date = (dateElement as any).date
|
|
127
|
+
this.selections = from > date ? [date, from] : [from, date]
|
|
128
|
+
|
|
129
|
+
// 캡처를 설정하지 않음(Touch 디바이스에서 중요)
|
|
130
|
+
target.releasePointerCapture(event.pointerId)
|
|
131
|
+
|
|
132
|
+
event.preventDefault()
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
handlePointerUp(event: PointerEvent) {
|
|
136
|
+
const from = this.pointerDownDate
|
|
137
|
+
|
|
138
|
+
this.pointerDownDate = null
|
|
139
|
+
|
|
140
|
+
if (!from) {
|
|
141
|
+
return
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
const target = event.target as HTMLElement
|
|
145
|
+
const dateElement = target.closest('[date]') as HTMLElement
|
|
146
|
+
|
|
147
|
+
if (!dateElement) {
|
|
148
|
+
return
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
const date = (dateElement as any).date
|
|
152
|
+
this.selections = from > date ? [date, from] : [from, date]
|
|
153
|
+
|
|
84
154
|
this.dispatchEvent(
|
|
85
155
|
new CustomEvent('select-date', {
|
|
86
|
-
detail:
|
|
156
|
+
detail: this.selections,
|
|
87
157
|
bubbles: true,
|
|
88
158
|
composed: true
|
|
89
159
|
})
|
|
90
160
|
)
|
|
161
|
+
|
|
162
|
+
event.preventDefault()
|
|
91
163
|
}
|
|
92
164
|
|
|
93
165
|
moveTo(month: Dayjs) {
|
|
@@ -51,6 +51,9 @@ export const CalendarWeeklyStyles = css`
|
|
|
51
51
|
border: var(--calendar-weekly-border, 1px solid rgba(0, 0, 0, 0.1));
|
|
52
52
|
border-width: var(--calendar-weekly-border-width, 0 1px 1px 0px);
|
|
53
53
|
opacity: var(--calendar-weekly-opacity);
|
|
54
|
+
|
|
55
|
+
user-select: none;
|
|
56
|
+
touch-action: none;
|
|
54
57
|
}
|
|
55
58
|
|
|
56
59
|
li:nth-child(7n + 1) {
|
|
@@ -66,10 +69,15 @@ export const CalendarWeeklyStyles = css`
|
|
|
66
69
|
}
|
|
67
70
|
|
|
68
71
|
li[current-week] {
|
|
69
|
-
background-color: var(--calendar-current-
|
|
72
|
+
background-color: var(--calendar-current-week-background-color, #fff);
|
|
70
73
|
opacity: 1;
|
|
71
74
|
}
|
|
72
75
|
|
|
76
|
+
li[selected] {
|
|
77
|
+
background-color: var(--calendar-weekly-selected-background-color, var(--md-sys-color-tertiary-container));
|
|
78
|
+
color: var(--calendar-weekly-selected-color, var(--md-sys-color-on-tertiary-container));
|
|
79
|
+
}
|
|
80
|
+
|
|
73
81
|
span[date-label] {
|
|
74
82
|
display: block;
|
|
75
83
|
margin: var(--calendar-weekly-date-label-margin);
|
|
@@ -98,5 +106,8 @@ export const CalendarWeeklyStyles = css`
|
|
|
98
106
|
border-width: var(--calendar-weekly-event-border-width);
|
|
99
107
|
margin: var(--calendar-weekly-event-margin, 0 0 4px 0);
|
|
100
108
|
padding: var(--calendar-weekly-event-padding, 2px 4px 2px 4px);
|
|
109
|
+
|
|
110
|
+
user-select: all;
|
|
111
|
+
touch-action: all;
|
|
101
112
|
}
|
|
102
113
|
`
|
package/src/calendar-weekly.ts
CHANGED
|
@@ -18,6 +18,9 @@ export class CalendarWeekly extends LitElement {
|
|
|
18
18
|
@state() week: number = dayjs().week()
|
|
19
19
|
@state() calendar?: CALENDAR
|
|
20
20
|
@state() eventMap?: Map<Date, BizEvent[]>
|
|
21
|
+
@state() selections?: [Date, Date]
|
|
22
|
+
|
|
23
|
+
@state() pointerDownDate?: Date | null
|
|
21
24
|
|
|
22
25
|
render() {
|
|
23
26
|
return html`
|
|
@@ -54,16 +57,28 @@ export class CalendarWeekly extends LitElement {
|
|
|
54
57
|
<slot></slot>
|
|
55
58
|
</div>
|
|
56
59
|
|
|
57
|
-
<ol
|
|
60
|
+
<ol
|
|
61
|
+
@pointerdown=${this.handlePointerDown}
|
|
62
|
+
@pointermove=${this.handlePointerMove}
|
|
63
|
+
@pointerup=${this.handlePointerUp}
|
|
64
|
+
>
|
|
58
65
|
${this.calendar?.map((date, index) => {
|
|
66
|
+
const [from, to] = this.selections || ([] as any)
|
|
67
|
+
const { date: thisDate } = date
|
|
68
|
+
const selected = from && to && thisDate >= from && thisDate <= to
|
|
69
|
+
|
|
59
70
|
return html`
|
|
60
|
-
<li ?today=${date.today} day-of-week
|
|
71
|
+
<li ?today=${date.today} day-of-week date .date=${thisDate} ?selected=${selected}>
|
|
61
72
|
<span date-label>${date.label}(${WEEKDAYS[index]})</span>
|
|
62
73
|
</li>
|
|
63
74
|
`
|
|
64
75
|
})}
|
|
65
76
|
${this.calendar?.map(date => {
|
|
66
|
-
|
|
77
|
+
const [from, to] = this.selections || ([] as any)
|
|
78
|
+
const { date: thisDate } = date
|
|
79
|
+
const selected = from && to && thisDate >= from && thisDate <= to
|
|
80
|
+
|
|
81
|
+
return html`<li date .date=${thisDate} ?selected=${selected}>
|
|
67
82
|
<div>
|
|
68
83
|
${(this.eventMap?.get(date?.date) || []).map(({ title, color, template }) =>
|
|
69
84
|
template ? template : html`<span event .style="border-color: ${color};">${title}</span>`
|
|
@@ -90,7 +105,84 @@ export class CalendarWeekly extends LitElement {
|
|
|
90
105
|
this.week = week
|
|
91
106
|
}
|
|
92
107
|
|
|
108
|
+
handlePointerDown(event: PointerEvent) {
|
|
109
|
+
const target = event.target as HTMLElement
|
|
110
|
+
|
|
111
|
+
if (!target.hasAttribute('date') && !target.hasAttribute('date-label')) {
|
|
112
|
+
return
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
const dateElement = target.closest('[date]') as HTMLElement
|
|
116
|
+
const from = (dateElement as any).date
|
|
117
|
+
|
|
118
|
+
this.pointerDownDate = from
|
|
119
|
+
|
|
120
|
+
// 캡처를 설정하지 않음(Touch 디바이스에서 중요)
|
|
121
|
+
target.releasePointerCapture(event.pointerId)
|
|
122
|
+
|
|
123
|
+
event.preventDefault()
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
handlePointerMove(event: PointerEvent) {
|
|
127
|
+
const from = this.pointerDownDate
|
|
128
|
+
|
|
129
|
+
if (!from) {
|
|
130
|
+
return
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
const target = event.target as HTMLElement
|
|
134
|
+
const dateElement = target.closest('[date]') as HTMLElement
|
|
135
|
+
|
|
136
|
+
if (!dateElement) {
|
|
137
|
+
return
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
const date = (dateElement as any).date
|
|
141
|
+
this.selections = from > date ? [date, from] : [from, date]
|
|
142
|
+
|
|
143
|
+
// 캡처를 설정하지 않음(Touch 디바이스에서 중요)
|
|
144
|
+
target.releasePointerCapture(event.pointerId)
|
|
145
|
+
|
|
146
|
+
event.preventDefault()
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
handlePointerUp(event: PointerEvent) {
|
|
150
|
+
const from = this.pointerDownDate
|
|
151
|
+
|
|
152
|
+
this.pointerDownDate = null
|
|
153
|
+
|
|
154
|
+
if (!from) {
|
|
155
|
+
return
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
const target = event.target as HTMLElement
|
|
159
|
+
const dateElement = target.closest('[date]') as HTMLElement
|
|
160
|
+
|
|
161
|
+
if (!dateElement) {
|
|
162
|
+
return
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
const date = (dateElement as any).date
|
|
166
|
+
this.selections = from > date ? [date, from] : [from, date]
|
|
167
|
+
|
|
168
|
+
this.dispatchEvent(
|
|
169
|
+
new CustomEvent('select-date', {
|
|
170
|
+
detail: this.selections,
|
|
171
|
+
bubbles: true,
|
|
172
|
+
composed: true
|
|
173
|
+
})
|
|
174
|
+
)
|
|
175
|
+
|
|
176
|
+
event.preventDefault()
|
|
177
|
+
}
|
|
178
|
+
|
|
93
179
|
selectDate(date: { label: string; date: Date; thisMonth?: boolean; thisWeek?: boolean; today?: boolean }) {
|
|
180
|
+
if (date) {
|
|
181
|
+
this.selections = [date.date, date.date]
|
|
182
|
+
} else {
|
|
183
|
+
this.selections = undefined
|
|
184
|
+
}
|
|
185
|
+
|
|
94
186
|
this.dispatchEvent(
|
|
95
187
|
new CustomEvent('select-date', {
|
|
96
188
|
detail: date,
|
package/stories/index.stories.ts
CHANGED
|
@@ -102,7 +102,14 @@ const Template: Story<ArgTypes> = ({ mode = 'monthly' }: ArgTypes) => html`
|
|
|
102
102
|
rel="stylesheet"
|
|
103
103
|
/>
|
|
104
104
|
|
|
105
|
-
<ox-event-view
|
|
105
|
+
<ox-event-view
|
|
106
|
+
mode="${mode}"
|
|
107
|
+
.eventProvider=${new SampleEventProvider()}
|
|
108
|
+
@select-date=${(e: CustomEvent) => {
|
|
109
|
+
console.log(e.detail)
|
|
110
|
+
}}
|
|
111
|
+
>
|
|
112
|
+
</ox-event-view>
|
|
106
113
|
`
|
|
107
114
|
|
|
108
115
|
export const Regular = Template.bind({})
|