@operato/event-view 7.1.6 → 7.1.27
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 +23 -0
- package/dist/src/calendar-monthly-styles.js +17 -5
- package/dist/src/calendar-monthly-styles.js.map +1 -1
- package/dist/src/calendar-monthly.d.ts +5 -0
- package/dist/src/calendar-monthly.js +68 -5
- package/dist/src/calendar-monthly.js.map +1 -1
- package/dist/src/calendar-weekly-styles.js +14 -3
- package/dist/src/calendar-weekly-styles.js.map +1 -1
- package/dist/src/calendar-weekly.d.ts +12 -0
- package/dist/src/calendar-weekly.js +83 -4
- package/dist/src/calendar-weekly.js.map +1 -1
- package/dist/src/ox-event-view.js +2 -1
- package/dist/src/ox-event-view.js.map +1 -1
- package/dist/src/types.d.ts +1 -1
- package/dist/src/types.js.map +1 -1
- package/dist/stories/index.stories.d.ts +1 -1
- package/dist/stories/index.stories.js +9 -2
- 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 +17 -5
- package/src/calendar-monthly.ts +88 -6
- package/src/calendar-weekly-styles.ts +14 -3
- package/src/calendar-weekly.ts +108 -4
- package/src/ox-event-view.ts +2 -1
- package/src/types.ts +1 -1
- package/stories/index.stories.ts +10 -3
- package/themes/calendar-theme.css +4 -1
package/stories/index.stories.ts
CHANGED
|
@@ -3,7 +3,7 @@ import { html, TemplateResult } from 'lit'
|
|
|
3
3
|
import { BizEvent, CALENDAR, EventProvider } from '../src/types.js'
|
|
4
4
|
|
|
5
5
|
class SampleEventProvider implements EventProvider {
|
|
6
|
-
fetchEventsForCalendar(calendar: CALENDAR) {
|
|
6
|
+
async fetchEventsForCalendar(calendar: CALENDAR) {
|
|
7
7
|
const map = new Map<Date, BizEvent[]>()
|
|
8
8
|
|
|
9
9
|
calendar.forEach(({ date }) =>
|
|
@@ -75,7 +75,7 @@ interface Story<T> {
|
|
|
75
75
|
}
|
|
76
76
|
|
|
77
77
|
interface ArgTypes {
|
|
78
|
-
mode?:
|
|
78
|
+
mode?: 'monthly' | 'weekly'
|
|
79
79
|
}
|
|
80
80
|
|
|
81
81
|
const Template: Story<ArgTypes> = ({ mode = 'monthly' }: ArgTypes) => html`
|
|
@@ -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({})
|
|
@@ -9,7 +9,8 @@ body {
|
|
|
9
9
|
/* monthly layout */
|
|
10
10
|
--calendar-monthly-ol-margin: var(--margin-default) 0;
|
|
11
11
|
--calendar-monthly-ol-top-border: 2px solid var(--md-sys-color-secondary);
|
|
12
|
-
--calendar-current-
|
|
12
|
+
--calendar-current-month-background-color: var(--md-sys-color-surface-variant);
|
|
13
|
+
--calendar-current-month-color: var(--md-sys-color-on-surface);
|
|
13
14
|
--calendar-monthly-label-align: left;
|
|
14
15
|
--calendar-monthly-label-padding: var(--padding-narrow) 0;
|
|
15
16
|
--calendar-monthly-label-color: var(--md-sys-color-secondary);
|
|
@@ -18,6 +19,7 @@ body {
|
|
|
18
19
|
--calendar-monthly-date-label-margin: var(--margin-narrow);
|
|
19
20
|
--calendar-monthly-date-label-padding: 0px 6px;
|
|
20
21
|
--calendar-monthly-date-label-color: var(--md-sys-color-on-primary);
|
|
22
|
+
--calendar-monthly-date-min-height: 120px;
|
|
21
23
|
|
|
22
24
|
--calendar-monthly-background-color: #f4f4f4;
|
|
23
25
|
--calendar-monthly-event-border-radius: var(--border-radius);
|
|
@@ -35,6 +37,7 @@ body {
|
|
|
35
37
|
--calendar-weekly-ol-margin: var(--margin-default) 0;
|
|
36
38
|
--calendar-weekly-ol-top-border: 2px solid var(--md-sys-color-secondary);
|
|
37
39
|
--calendar-current-week-background-color: var(--md-sys-color-surface-variant);
|
|
40
|
+
--calendar-current-week-color: var(--md-sys-color-on-surface);
|
|
38
41
|
--calendar-weekly-label-align: center;
|
|
39
42
|
--calendar-weekly-label-padding: var(--padding-narrow) 0;
|
|
40
43
|
--calendar-weekly-label-color: var(--md-sys-color-secondary);
|