@operato/event-view 7.1.27 → 7.1.32

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.
@@ -1,123 +0,0 @@
1
- import '../src/ox-event-view.js'
2
- import { html, TemplateResult } from 'lit'
3
- import { BizEvent, CALENDAR, EventProvider } from '../src/types.js'
4
-
5
- class SampleEventProvider implements EventProvider {
6
- async fetchEventsForCalendar(calendar: CALENDAR) {
7
- const map = new Map<Date, BizEvent[]>()
8
-
9
- calendar.forEach(({ date }) =>
10
- map.set(date, [
11
- {
12
- due: '2021-08-21',
13
- title: 'HAHAHA',
14
- color: 'yellow'
15
- },
16
- {
17
- due: '2021-08-21',
18
- title: 'HOHOHO',
19
- color: 'lime'
20
- },
21
- {
22
- due: '2021-08-21',
23
- title: 'HIHIHI',
24
- color: 'yellow'
25
- },
26
- {
27
- due: '2021-08-21',
28
- title: 'HEHEHE',
29
- color: 'white'
30
- },
31
- {
32
- due: '2021-08-21',
33
- title: 'KEKEKE',
34
- color: 'yellow'
35
- },
36
- {
37
- due: '2021-08-21',
38
- title: 'MEMEME',
39
- color: 'orange'
40
- },
41
- {
42
- due: '2021-08-21',
43
- title: 'MOMOMO',
44
- color: 'lime'
45
- },
46
- {
47
- due: '2021-08-21',
48
- title: 'QUOQUO',
49
- color: 'navy'
50
- },
51
- {
52
- due: '2021-08-21',
53
- title: 'ZZXXCC',
54
- color: 'gray'
55
- }
56
- ])
57
- )
58
-
59
- return map
60
- }
61
- }
62
-
63
- export default {
64
- title: 'EventView',
65
- component: 'ox-event-view',
66
- argTypes: {
67
- mode: { control: 'select', options: ['monthly', 'weekly'], description: 'set event view mode' }
68
- }
69
- }
70
-
71
- interface Story<T> {
72
- (args: T): TemplateResult
73
- args?: Partial<T>
74
- argTypes?: Record<string, unknown>
75
- }
76
-
77
- interface ArgTypes {
78
- mode?: 'monthly' | 'weekly'
79
- }
80
-
81
- const Template: Story<ArgTypes> = ({ mode = 'monthly' }: ArgTypes) => html`
82
- <link rel="stylesheet" href="/themes/material-theme.css" />
83
- <link rel="stylesheet" href="/themes/calendar-theme.css" />
84
-
85
- <link href="/themes/app-theme.css" rel="stylesheet" />
86
- <link href="/themes/light.css" rel="stylesheet" />
87
- <link href="/themes/dark.css" rel="stylesheet" />
88
- <link href="/themes/spacing.css" rel="stylesheet" />
89
- <link href="/themes/grist-theme.css" rel="stylesheet" />
90
- <link href="/themes/form-theme.css" rel="stylesheet" />
91
-
92
- <link
93
- href="https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL@20..48,100..700,0..1"
94
- rel="stylesheet"
95
- />
96
- <link
97
- href="https://fonts.googleapis.com/css2?family=Material+Symbols+Rounded:opsz,wght,FILL@20..48,100..700,0..1"
98
- rel="stylesheet"
99
- />
100
- <link
101
- href="https://fonts.googleapis.com/css2?family=Material+Symbols+Sharp:opsz,wght,FILL@20..48,100..700,0..1"
102
- rel="stylesheet"
103
- />
104
-
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>
113
- `
114
-
115
- export const Regular = Template.bind({})
116
- Regular.args = {
117
- mode: 'monthly'
118
- }
119
-
120
- export const WeeklyEventView = Template.bind({})
121
- WeeklyEventView.args = {
122
- mode: 'weekly'
123
- }
package/tsconfig.json DELETED
@@ -1,25 +0,0 @@
1
- {
2
- "compilerOptions": {
3
- "target": "esnext",
4
- "module": "esnext",
5
- "moduleResolution": "node",
6
- "resolveJsonModule": true,
7
- "noEmitOnError": true,
8
- "lib": ["es2017", "dom"],
9
- "strict": true,
10
- "esModuleInterop": false,
11
- "allowSyntheticDefaultImports": true,
12
- "experimentalDecorators": true,
13
- "useDefineForClassFields": false,
14
- "importHelpers": true,
15
- "outDir": "dist",
16
- "sourceMap": true,
17
- "inlineSources": true,
18
- "rootDir": "./",
19
- "declaration": true,
20
- "incremental": true,
21
- "skipLibCheck": true,
22
- "types": ["node", "mocha"]
23
- },
24
- "include": ["**/*.ts", "*.d.ts"]
25
- }
@@ -1,27 +0,0 @@
1
- // import { hmrPlugin, presets } from '@open-wc/dev-server-hmr';
2
-
3
- /** Use Hot Module replacement by adding --hmr to the start command */
4
- const hmr = process.argv.includes('--hmr');
5
-
6
- export default /** @type {import('@web/dev-server').DevServerConfig} */ ({
7
- open: '/demo/',
8
- /** Use regular watch mode if HMR is not enabled. */
9
- watch: !hmr,
10
- /** Resolve bare module imports */
11
- nodeResolve: {
12
- exportConditions: ['browser', 'development'],
13
- },
14
-
15
- /** Compile JS for older browsers. Requires @web/dev-server-esbuild plugin */
16
- // esbuildTarget: 'auto'
17
-
18
- /** Set appIndex to enable SPA routing */
19
- // appIndex: 'demo/index.html',
20
-
21
- plugins: [
22
- /** Use Hot Module Replacement by uncommenting. Requires @open-wc/dev-server-hmr plugin */
23
- // hmr && hmrPlugin({ exclude: ['**/*/node_modules/**/*'], presets: [presets.litElement] }),
24
- ],
25
-
26
- // See documentation for all available options
27
- });
@@ -1,41 +0,0 @@
1
- // import { playwrightLauncher } from '@web/test-runner-playwright';
2
-
3
- const filteredLogs = ['Running in dev mode', 'lit-html is in dev mode'];
4
-
5
- export default /** @type {import("@web/test-runner").TestRunnerConfig} */ ({
6
- /** Test files to run */
7
- files: 'dist/test/**/*.test.js',
8
-
9
- /** Resolve bare module imports */
10
- nodeResolve: {
11
- exportConditions: ['browser', 'development'],
12
- },
13
-
14
- /** Filter out lit dev mode logs */
15
- filterBrowserLogs(log) {
16
- for (const arg of log.args) {
17
- if (typeof arg === 'string' && filteredLogs.some(l => arg.includes(l))) {
18
- return false;
19
- }
20
- }
21
- return true;
22
- },
23
-
24
- /** Compile JS for older browsers. Requires @web/dev-server-esbuild plugin */
25
- // esbuildTarget: 'auto',
26
-
27
- /** Amount of browsers to run concurrently */
28
- // concurrentBrowsers: 2,
29
-
30
- /** Amount of test files per browser to test concurrently */
31
- // concurrency: 1,
32
-
33
- /** Browsers to run tests on */
34
- // browsers: [
35
- // playwrightLauncher({ product: 'chromium' }),
36
- // playwrightLauncher({ product: 'firefox' }),
37
- // playwrightLauncher({ product: 'webkit' }),
38
- // ],
39
-
40
- // See documentation for all available options
41
- });