Skip to content

Commit f56b298

Browse files
authored
v3 (#279)
1 parent 7d6d2d1 commit f56b298

5 files changed

Lines changed: 88 additions & 63 deletions

File tree

cypress/pages/001-smoke/001-smoke.tsx

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ import {
1414
} from '@schedule-x/calendar'
1515
import '../index.css'
1616
import '@schedule-x/theme-default/dist/index.css'
17+
import 'temporal-polyfill/global'
1718

1819
// eslint-disable-next-line react-refresh/only-export-components
1920
function App() {
@@ -24,11 +25,12 @@ function App() {
2425
{
2526
id: '1',
2627
title: 'Event 1',
27-
start: '2023-12-15 06:00',
28-
end: '2023-12-15 08:00',
28+
start: Temporal.ZonedDateTime.from('2023-12-15T06:00:00+09:00[Asia/Tokyo]'),
29+
end: Temporal.ZonedDateTime.from('2023-12-15T08:00:00+09:00[Asia/Tokyo]'),
2930
},
3031
],
31-
selectedDate: '2023-12-15',
32+
selectedDate: Temporal.PlainDate.from('2023-12-15'),
33+
timezone: 'Asia/Tokyo',
3234
})
3335

3436
return (

cypress/pages/002-custom-events/002-custom-events.tsx

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ import CustomTimeGridEvent from './components/CustomTimeGridEvent.tsx'
1818
import CustomDateGridEvent from './components/CustomDateGridEvent.tsx'
1919
import CustomMonthAgendaEvent from './components/CustomMonthAgendaEvent.tsx'
2020
import CustomMonthGridEvent from './components/CustomMonthGridEvent.tsx'
21+
import 'temporal-polyfill/global'
2122

2223
// eslint-disable-next-line react-refresh/only-export-components
2324
function App() {
@@ -30,17 +31,18 @@ function App() {
3031
{
3132
id: '1',
3233
title: 'Event 1',
33-
start: '2023-12-15 06:00',
34-
end: '2023-12-15 08:00',
34+
start: Temporal.ZonedDateTime.from('2023-12-15T06:00:00+09:00[Asia/Tokyo]'),
35+
end: Temporal.ZonedDateTime.from('2023-12-15T08:00:00+09:00[Asia/Tokyo]'),
3536
},
3637
{
3738
id: '2',
3839
title: 'Event 2',
39-
start: '2023-12-14',
40-
end: '2023-12-14',
40+
start: Temporal.PlainDate.from('2023-12-14'),
41+
end: Temporal.PlainDate.from('2023-12-14'),
4142
},
4243
],
43-
selectedDate: '2023-12-15',
44+
selectedDate: Temporal.PlainDate.from('2023-12-15'),
45+
timezone: 'Asia/Tokyo',
4446
})
4547

4648
return (

development/App.tsx

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -14,36 +14,38 @@ import CustomDateGridEvent from './components/CustomDateGridEvent.tsx'
1414
import CustomEventModal from './components/CustomEventModal.tsx'
1515
import { createEventsServicePlugin } from '@schedule-x/events-service'
1616
import { createCalendarControlsPlugin } from '@schedule-x/calendar-controls'
17+
import 'temporal-polyfill/global'
1718

1819
function App() {
1920
const calendarApp = useCalendarApp(
2021
{
2122
views: [viewMonthGrid, viewDay, viewWeek, viewMonthAgenda],
22-
selectedDate: '2023-12-22',
23+
selectedDate: Temporal.PlainDate.from('2023-12-22'),
24+
timezone: 'Asia/Tokyo',
2325
events: [
2426
{
2527
id: '0',
2628
title: 'Event 0',
27-
start: '2023-12-22',
28-
end: '2023-12-22',
29+
start: Temporal.PlainDate.from('2023-12-22'),
30+
end: Temporal.PlainDate.from('2023-12-22'),
2931
},
3032
{
3133
id: '1',
3234
title: 'Event 1',
33-
start: '2023-12-22 05:00',
34-
end: '2023-12-22 07:00',
35+
start: Temporal.ZonedDateTime.from('2023-12-22T05:00:00+09:00[Asia/Tokyo]'),
36+
end: Temporal.ZonedDateTime.from('2023-12-22T07:00:00+09:00[Asia/Tokyo]'),
3537
},
3638
{
3739
id: '2',
3840
title: 'Event 2',
39-
start: '2023-12-22 05:00',
40-
end: '2023-12-22 07:00',
41+
start: Temporal.ZonedDateTime.from('2023-12-22T05:00:00+09:00[Asia/Tokyo]'),
42+
end: Temporal.ZonedDateTime.from('2023-12-22T07:00:00+09:00[Asia/Tokyo]'),
4143
},
4244
{
4345
id: '3',
4446
title: 'Event 3',
45-
start: '2023-12-23 05:00',
46-
end: '2023-12-23 07:00',
47+
start: Temporal.ZonedDateTime.from('2023-12-23T05:00:00+09:00[Asia/Tokyo]'),
48+
end: Temporal.ZonedDateTime.from('2023-12-23T07:00:00+09:00[Asia/Tokyo]'),
4749
},
4850
],
4951
},

package-lock.json

Lines changed: 54 additions & 36 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
"main": "dist/index.cjs",
1616
"module": "dist/index.js",
1717
"types": "dist/types/index.d.ts",
18-
"version": "2.36.0",
18+
"version": "3.0.0",
1919
"type": "module",
2020
"files": [
2121
"dist"
@@ -31,7 +31,7 @@
3131
"build:publish": "npm run build && npm publish"
3232
},
3333
"peerDependencies": {
34-
"@schedule-x/calendar": "^2.25.0",
34+
"@schedule-x/calendar": "^3.0.0",
3535
"react": "^16.7.0 || ^17 || ^18 || ^19",
3636
"react-dom": "^16.7.0 || ^17 || ^18 || ^19"
3737
},
@@ -40,15 +40,15 @@
4040
"@rollup/plugin-commonjs": "^28.0.0",
4141
"@rollup/plugin-node-resolve": "^16.0.0",
4242
"@rollup/plugin-typescript": "^11.1.5",
43-
"@schedule-x/calendar-controls": "^2.25.0",
44-
"@schedule-x/drag-and-drop": "^2.25.0",
45-
"@schedule-x/e2e-testing": "^2.25.0",
43+
"@schedule-x/calendar-controls": "^3.0.0",
44+
"@schedule-x/drag-and-drop": "^3.0.0",
45+
"@schedule-x/e2e-testing": "^3.0.0",
4646
"@schedule-x/eslint-config": "^2.22.0",
47-
"@schedule-x/event-modal": "^2.25.0",
48-
"@schedule-x/events-service": "^2.25.0",
49-
"@schedule-x/prettier-config": "^2.25.0",
50-
"@schedule-x/shared": "^2.25.0",
51-
"@schedule-x/theme-default": "^2.25.0",
47+
"@schedule-x/event-modal": "^3.0.0",
48+
"@schedule-x/events-service": "^3.0.0",
49+
"@schedule-x/prettier-config": "^2.22.0",
50+
"@schedule-x/shared": "^3.0.0",
51+
"@schedule-x/theme-default": "^3.0.0",
5252
"@semantic-release/changelog": "^6.0.3",
5353
"@semantic-release/git": "^10.0.1",
5454
"@types/react": "^18.2.43",
@@ -66,6 +66,7 @@
6666
"rollup-plugin-peer-deps-external": "^2.2.4",
6767
"rollup-plugin-postcss": "^4.0.2",
6868
"semantic-release": "^24.0.0",
69+
"temporal-polyfill": "^0.3.0",
6970
"typescript": "^5.6.2",
7071
"vite": "^5.0.8"
7172
},

0 commit comments

Comments
 (0)