@fullcalendar/moment-timezone 6.0.0-beta.4 → 6.0.0

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/README.md CHANGED
@@ -1,8 +1,40 @@
1
1
 
2
2
  # FullCalendar Moment Timezone Plugin
3
3
 
4
- A connector to the moment-timezone library
4
+ Enhanced [named time zone](https://fullcalendar.io/docs/timeZone#named-time-zones) functionality with [Moment Timezone](https://momentjs.com/timezone/)
5
5
 
6
- [View the docs »](https://fullcalendar.io/docs/moment-timezone-plugin)
6
+ ## Installation
7
7
 
8
- This package was created from the [FullCalendar monorepo »](https://github.com/fullcalendar/fullcalendar)
8
+ First, ensure Moment Timezone is installed:
9
+
10
+ ```sh
11
+ npm install moment-timezone
12
+ ```
13
+
14
+ Then, install the FullCalendar core package, the Moment Timezone plugin, and any other plugins (like [daygrid](https://fullcalendar.io/docs/month-view)):
15
+
16
+ ```sh
17
+ npm install @fullcalendar/core @fullcalendar/moment-timezone @fullcalendar/daygrid
18
+ ```
19
+
20
+ ## Usage
21
+
22
+ Instantiate a Calendar with the necessary plugin:
23
+
24
+ ```js
25
+ import { Calendar } from '@fullcalendar/core'
26
+ import momentTimezonePlugin from '@fullcalendar/moment-timezone'
27
+ import dayGridPlugin from '@fullcalendar/daygrid'
28
+
29
+ const calendarEl = document.getElementById('calendar')
30
+ const calendar = new Calendar(calendarEl, {
31
+ plugins: [
32
+ momentTimezonePlugin,
33
+ dayGridPlugin
34
+ ],
35
+ initialView: 'dayGridMonth',
36
+ timeZone: 'America/New_York' // enhance named time zones
37
+ })
38
+
39
+ calendar.render()
40
+ ```
package/index.global.js CHANGED
@@ -1,6 +1,6 @@
1
1
  /*!
2
- FullCalendar Moment Timezone Plugin v6.0.0-beta.4
3
- Docs & License: https://fullcalendar.io/
2
+ FullCalendar Moment Timezone Plugin v6.0.0
3
+ Docs & License: https://fullcalendar.io/docs/moment-timezone-plugin
4
4
  (c) 2022 Adam Shaw
5
5
  */
6
6
  FullCalendar.MomentTimezone = (function (exports, internal, core, moment) {
@@ -1,6 +1,6 @@
1
1
  /*!
2
- FullCalendar Moment Timezone Plugin v6.0.0-beta.4
3
- Docs & License: https://fullcalendar.io/
2
+ FullCalendar Moment Timezone Plugin v6.0.0
3
+ Docs & License: https://fullcalendar.io/docs/moment-timezone-plugin
4
4
  (c) 2022 Adam Shaw
5
5
  */
6
6
  FullCalendar.MomentTimezone=function(e,t,n,a){"use strict";function l(e){return e&&e.__esModule?e:{default:e}}var r=l(a);class u extends t.NamedTimeZoneImpl{offsetForArray(e){return r.default.tz(e,this.timeZoneName).utcOffset()}timestampToArray(e){return r.default.tz(e,this.timeZoneName).toArray()}}var m=n.createPlugin({name:"@fullcalendar/moment-timezone",namedTimeZonedImpl:u});return t.globalPlugins.push(m),e.default=m,Object.defineProperty(e,"__esModule",{value:!0}),e}({},FullCalendar.Internal,FullCalendar,moment);
package/package.json CHANGED
@@ -1,18 +1,27 @@
1
1
  {
2
2
  "name": "@fullcalendar/moment-timezone",
3
- "version": "6.0.0-beta.4",
3
+ "version": "6.0.0",
4
+ "title": "FullCalendar Moment Timezone Plugin",
5
+ "description": "Enhanced named time zone functionality with Moment Timezone",
4
6
  "keywords": [
5
7
  "calendar",
6
8
  "event",
7
- "full-sized"
9
+ "full-sized",
10
+ "fullcalendar",
11
+ "moment",
12
+ "moment-timezone",
13
+ "timezone"
8
14
  ],
9
- "homepage": "https://fullcalendar.io/",
10
- "docs": "https://fullcalendar.io/docs/moment-timezone-plugin",
15
+ "homepage": "https://fullcalendar.io/docs/moment-timezone-plugin",
16
+ "peerDependencies": {
17
+ "@fullcalendar/core": "~6.0.0",
18
+ "moment-timezone": "^0.5.31"
19
+ },
20
+ "type": "module",
11
21
  "bugs": "https://fullcalendar.io/reporting-bugs",
12
22
  "repository": {
13
23
  "type": "git",
14
24
  "url": "https://github.com/fullcalendar/fullcalendar.git",
15
- "homepage": "https://github.com/fullcalendar/fullcalendar",
16
25
  "directory": "packages/moment-timezone"
17
26
  },
18
27
  "license": "MIT",
@@ -22,13 +31,6 @@
22
31
  "url": "http://arshaw.com/"
23
32
  },
24
33
  "copyright": "2022 Adam Shaw",
25
- "type": "module",
26
- "title": "FullCalendar Moment Timezone Plugin",
27
- "description": "A connector to the moment-timezone library",
28
- "peerDependencies": {
29
- "@fullcalendar/core": "6.0.0-beta.4",
30
- "moment-timezone": "^0.5.31"
31
- },
32
34
  "main": "./index.cjs",
33
35
  "module": "./index.js",
34
36
  "types": "./index.d.ts",