@schedule-x/react 2.1.0 → 2.1.2
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/dist/index.cjs +4 -4
- package/dist/index.cjs.js +4 -4
- package/dist/index.js +4 -4
- package/dist/types/use-calendar-app.d.ts +5 -2
- package/package.json +11 -8
package/dist/index.cjs
CHANGED
|
@@ -44,15 +44,15 @@ function ScheduleXCalendar({ calendarApp, customComponents }) {
|
|
|
44
44
|
})] }) }));
|
|
45
45
|
}
|
|
46
46
|
|
|
47
|
-
function useCalendarApp(config) {
|
|
48
|
-
const [calendarApp] = react.useState(() => calendar.createCalendar(config));
|
|
47
|
+
function useCalendarApp(config, plugins) {
|
|
48
|
+
const [calendarApp] = react.useState(() => calendar.createCalendar(config, plugins));
|
|
49
49
|
return calendarApp;
|
|
50
50
|
}
|
|
51
|
-
function useNextCalendarApp(config) {
|
|
51
|
+
function useNextCalendarApp(config, plugins) {
|
|
52
52
|
const [calendarApp, setCalendarApp] = react.useState();
|
|
53
53
|
react.useEffect(() => {
|
|
54
54
|
if (typeof window !== 'undefined') {
|
|
55
|
-
setCalendarApp(calendar.createCalendar(config));
|
|
55
|
+
setCalendarApp(calendar.createCalendar(config, plugins));
|
|
56
56
|
}
|
|
57
57
|
}, []);
|
|
58
58
|
return calendarApp;
|
package/dist/index.cjs.js
CHANGED
|
@@ -44,15 +44,15 @@ function ScheduleXCalendar({ calendarApp, customComponents }) {
|
|
|
44
44
|
})] }) }));
|
|
45
45
|
}
|
|
46
46
|
|
|
47
|
-
function useCalendarApp(config) {
|
|
48
|
-
const [calendarApp] = react.useState(() => calendar.createCalendar(config));
|
|
47
|
+
function useCalendarApp(config, plugins) {
|
|
48
|
+
const [calendarApp] = react.useState(() => calendar.createCalendar(config, plugins));
|
|
49
49
|
return calendarApp;
|
|
50
50
|
}
|
|
51
|
-
function useNextCalendarApp(config) {
|
|
51
|
+
function useNextCalendarApp(config, plugins) {
|
|
52
52
|
const [calendarApp, setCalendarApp] = react.useState();
|
|
53
53
|
react.useEffect(() => {
|
|
54
54
|
if (typeof window !== 'undefined') {
|
|
55
|
-
setCalendarApp(calendar.createCalendar(config));
|
|
55
|
+
setCalendarApp(calendar.createCalendar(config, plugins));
|
|
56
56
|
}
|
|
57
57
|
}, []);
|
|
58
58
|
return calendarApp;
|
package/dist/index.js
CHANGED
|
@@ -42,15 +42,15 @@ function ScheduleXCalendar({ calendarApp, customComponents }) {
|
|
|
42
42
|
})] }) }));
|
|
43
43
|
}
|
|
44
44
|
|
|
45
|
-
function useCalendarApp(config) {
|
|
46
|
-
const [calendarApp] = useState(() => createCalendar(config));
|
|
45
|
+
function useCalendarApp(config, plugins) {
|
|
46
|
+
const [calendarApp] = useState(() => createCalendar(config, plugins));
|
|
47
47
|
return calendarApp;
|
|
48
48
|
}
|
|
49
|
-
function useNextCalendarApp(config) {
|
|
49
|
+
function useNextCalendarApp(config, plugins) {
|
|
50
50
|
const [calendarApp, setCalendarApp] = useState();
|
|
51
51
|
useEffect(() => {
|
|
52
52
|
if (typeof window !== 'undefined') {
|
|
53
|
-
setCalendarApp(createCalendar(config));
|
|
53
|
+
setCalendarApp(createCalendar(config, plugins));
|
|
54
54
|
}
|
|
55
55
|
}, []);
|
|
56
56
|
return calendarApp;
|
|
@@ -1,3 +1,6 @@
|
|
|
1
1
|
import { CalendarApp, CalendarConfig } from '@schedule-x/calendar';
|
|
2
|
-
|
|
3
|
-
export declare function
|
|
2
|
+
import { PluginBase } from '@schedule-x/shared';
|
|
3
|
+
export declare function useCalendarApp<Plugins extends PluginBase<string>[]>(config: CalendarConfig, plugins?: Plugins): CalendarApp & { [Name in Plugins[number]["name"]]: Extract<Plugins[number], {
|
|
4
|
+
name: Name;
|
|
5
|
+
}>; };
|
|
6
|
+
export declare function useNextCalendarApp<Plugins extends PluginBase<string>[]>(config: CalendarConfig, plugins?: Plugins): CalendarApp | undefined;
|
package/package.json
CHANGED
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
"main": "dist/index.cjs",
|
|
16
16
|
"module": "dist/index.js",
|
|
17
17
|
"types": "dist/types/index.d.ts",
|
|
18
|
-
"version": "2.1.
|
|
18
|
+
"version": "2.1.2",
|
|
19
19
|
"type": "module",
|
|
20
20
|
"files": [
|
|
21
21
|
"dist"
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
"build:publish": "npm run build && npm publish"
|
|
32
32
|
},
|
|
33
33
|
"peerDependencies": {
|
|
34
|
-
"@schedule-x/calendar": "^2.
|
|
34
|
+
"@schedule-x/calendar": "^2.2.1",
|
|
35
35
|
"react": "^16.7.0 || ^17 || ^18",
|
|
36
36
|
"react-dom": "^16.7.0 || ^17 || ^18"
|
|
37
37
|
},
|
|
@@ -40,11 +40,14 @@
|
|
|
40
40
|
"@rollup/plugin-commonjs": "^26.0.0",
|
|
41
41
|
"@rollup/plugin-node-resolve": "^15.2.3",
|
|
42
42
|
"@rollup/plugin-typescript": "^11.1.5",
|
|
43
|
-
"@schedule-x/
|
|
44
|
-
"@schedule-x/
|
|
45
|
-
"@schedule-x/
|
|
46
|
-
"@schedule-x/
|
|
47
|
-
"@schedule-x/
|
|
43
|
+
"@schedule-x/calendar-controls": "^2.2.1",
|
|
44
|
+
"@schedule-x/drag-and-drop": "^2.2.1",
|
|
45
|
+
"@schedule-x/e2e-testing": "^2.2.1",
|
|
46
|
+
"@schedule-x/eslint-config": "^2.2.1",
|
|
47
|
+
"@schedule-x/event-modal": "^2.2.1",
|
|
48
|
+
"@schedule-x/events-service": "^2.2.1",
|
|
49
|
+
"@schedule-x/prettier-config": "^2.2.1",
|
|
50
|
+
"@schedule-x/shared": "^2.2.1",
|
|
48
51
|
"@schedule-x/theme-default": "^2.0.0",
|
|
49
52
|
"@semantic-release/changelog": "^6.0.3",
|
|
50
53
|
"@semantic-release/git": "^10.0.1",
|
|
@@ -63,7 +66,7 @@
|
|
|
63
66
|
"rollup-plugin-peer-deps-external": "^2.2.4",
|
|
64
67
|
"rollup-plugin-postcss": "^4.0.2",
|
|
65
68
|
"semantic-release": "^24.0.0",
|
|
66
|
-
"typescript": "^5.
|
|
69
|
+
"typescript": "^5.6.2",
|
|
67
70
|
"vite": "^5.0.8"
|
|
68
71
|
},
|
|
69
72
|
"overrides": {
|