@fullcalendar/moment-timezone 6.0.0-beta.3 → 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 +35 -3
- package/index.cjs +1 -2
- package/index.global.js +2 -2
- package/index.global.min.js +2 -2
- package/index.js +1 -2
- package/package.json +15 -14
package/README.md
CHANGED
@@ -1,8 +1,40 @@
|
|
1
1
|
|
2
2
|
# FullCalendar Moment Timezone Plugin
|
3
3
|
|
4
|
-
|
4
|
+
Enhanced [named time zone](https://fullcalendar.io/docs/timeZone#named-time-zones) functionality with [Moment Timezone](https://momentjs.com/timezone/)
|
5
5
|
|
6
|
-
|
6
|
+
## Installation
|
7
7
|
|
8
|
-
|
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.cjs
CHANGED
@@ -3,8 +3,7 @@
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
4
4
|
|
5
5
|
var index_cjs = require('@fullcalendar/core/index.cjs');
|
6
|
-
var moment = require('moment');
|
7
|
-
require('moment-timezone');
|
6
|
+
var moment = require('moment-timezone');
|
8
7
|
var internal_cjs = require('@fullcalendar/core/internal.cjs');
|
9
8
|
|
10
9
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
package/index.global.js
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
/*!
|
2
|
-
FullCalendar Moment Timezone Plugin v6.0.0
|
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) {
|
package/index.global.min.js
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
/*!
|
2
|
-
FullCalendar Moment Timezone Plugin v6.0.0
|
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/index.js
CHANGED
@@ -1,6 +1,5 @@
|
|
1
1
|
import { createPlugin } from '@fullcalendar/core/index.js';
|
2
|
-
import moment from 'moment';
|
3
|
-
import 'moment-timezone';
|
2
|
+
import moment from 'moment-timezone';
|
4
3
|
import { NamedTimeZoneImpl } from '@fullcalendar/core/internal.js';
|
5
4
|
|
6
5
|
class MomentNamedTimeZone extends NamedTimeZoneImpl {
|
package/package.json
CHANGED
@@ -1,18 +1,27 @@
|
|
1
1
|
{
|
2
2
|
"name": "@fullcalendar/moment-timezone",
|
3
|
-
"version": "6.0.0
|
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
|
-
"
|
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,19 +31,11 @@
|
|
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.3",
|
30
|
-
"moment": "^2.29.1",
|
31
|
-
"moment-timezone": "^0.5.31"
|
32
|
-
},
|
33
34
|
"main": "./index.cjs",
|
34
35
|
"module": "./index.js",
|
35
36
|
"types": "./index.d.ts",
|
36
37
|
"unpkg": "./index.global.min.js",
|
37
|
-
"
|
38
|
+
"jsdelivr": "./index.global.min.js",
|
38
39
|
"exports": {
|
39
40
|
"./package.json": "./package.json",
|
40
41
|
"./index.cjs": "./index.cjs",
|