@schedule-x/react 2.13.3 → 2.14.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/dist/index.cjs +11 -0
- package/dist/index.cjs.js +11 -0
- package/dist/index.js +11 -1
- package/dist/types/index.d.ts +1 -0
- package/dist/types/use-plugin.d.ts +2 -0
- package/package.json +12 -12
package/dist/index.cjs
CHANGED
|
@@ -61,6 +61,17 @@ function useNextCalendarApp(config, plugins) {
|
|
|
61
61
|
return calendarApp;
|
|
62
62
|
}
|
|
63
63
|
|
|
64
|
+
const usePlugin = (plugin) => {
|
|
65
|
+
const [pluginInstance, setPluginInstance] = react.useState();
|
|
66
|
+
react.useEffect(() => {
|
|
67
|
+
if (typeof window !== 'undefined') {
|
|
68
|
+
setPluginInstance(plugin);
|
|
69
|
+
}
|
|
70
|
+
}, []);
|
|
71
|
+
return pluginInstance;
|
|
72
|
+
};
|
|
73
|
+
|
|
64
74
|
exports.ScheduleXCalendar = ScheduleXCalendar;
|
|
65
75
|
exports.useCalendarApp = useCalendarApp;
|
|
66
76
|
exports.useNextCalendarApp = useNextCalendarApp;
|
|
77
|
+
exports.usePlugin = usePlugin;
|
package/dist/index.cjs.js
CHANGED
|
@@ -61,6 +61,17 @@ function useNextCalendarApp(config, plugins) {
|
|
|
61
61
|
return calendarApp;
|
|
62
62
|
}
|
|
63
63
|
|
|
64
|
+
const usePlugin = (plugin) => {
|
|
65
|
+
const [pluginInstance, setPluginInstance] = react.useState();
|
|
66
|
+
react.useEffect(() => {
|
|
67
|
+
if (typeof window !== 'undefined') {
|
|
68
|
+
setPluginInstance(plugin);
|
|
69
|
+
}
|
|
70
|
+
}, []);
|
|
71
|
+
return pluginInstance;
|
|
72
|
+
};
|
|
73
|
+
|
|
64
74
|
exports.ScheduleXCalendar = ScheduleXCalendar;
|
|
65
75
|
exports.useCalendarApp = useCalendarApp;
|
|
66
76
|
exports.useNextCalendarApp = useNextCalendarApp;
|
|
77
|
+
exports.usePlugin = usePlugin;
|
package/dist/index.js
CHANGED
|
@@ -59,4 +59,14 @@ function useNextCalendarApp(config, plugins) {
|
|
|
59
59
|
return calendarApp;
|
|
60
60
|
}
|
|
61
61
|
|
|
62
|
-
|
|
62
|
+
const usePlugin = (plugin) => {
|
|
63
|
+
const [pluginInstance, setPluginInstance] = useState();
|
|
64
|
+
useEffect(() => {
|
|
65
|
+
if (typeof window !== 'undefined') {
|
|
66
|
+
setPluginInstance(plugin);
|
|
67
|
+
}
|
|
68
|
+
}, []);
|
|
69
|
+
return pluginInstance;
|
|
70
|
+
};
|
|
71
|
+
|
|
72
|
+
export { ScheduleXCalendar, useCalendarApp, useNextCalendarApp, usePlugin };
|
package/dist/types/index.d.ts
CHANGED
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.
|
|
18
|
+
"version": "2.14.0",
|
|
19
19
|
"type": "module",
|
|
20
20
|
"files": [
|
|
21
21
|
"dist"
|
|
@@ -25,13 +25,13 @@
|
|
|
25
25
|
"build": "rollup -c && npm run build:dts",
|
|
26
26
|
"build:dts": "node scripts/build-declarations.mjs",
|
|
27
27
|
"test": "./node_modules/.bin/cypress run",
|
|
28
|
-
"lint": "eslint . --ext ts,tsx --report-unused-disable-directives --max-warnings
|
|
28
|
+
"lint": "eslint . --ext ts,tsx --report-unused-disable-directives --max-warnings 10",
|
|
29
29
|
"preview": "vite preview",
|
|
30
30
|
"format": "prettier --write .",
|
|
31
31
|
"build:publish": "npm run build && npm publish"
|
|
32
32
|
},
|
|
33
33
|
"peerDependencies": {
|
|
34
|
-
"@schedule-x/calendar": "^2.
|
|
34
|
+
"@schedule-x/calendar": "^2.15.1",
|
|
35
35
|
"react": "^16.7.0 || ^17 || ^18 || ^19",
|
|
36
36
|
"react-dom": "^16.7.0 || ^17 || ^18 || ^19"
|
|
37
37
|
},
|
|
@@ -40,15 +40,15 @@
|
|
|
40
40
|
"@rollup/plugin-commonjs": "^28.0.0",
|
|
41
41
|
"@rollup/plugin-node-resolve": "^16.0.0",
|
|
42
42
|
"@rollup/plugin-typescript": "^11.1.5",
|
|
43
|
-
"@schedule-x/calendar-controls": "^2.
|
|
44
|
-
"@schedule-x/drag-and-drop": "^2.
|
|
45
|
-
"@schedule-x/e2e-testing": "^2.
|
|
46
|
-
"@schedule-x/eslint-config": "^2.
|
|
47
|
-
"@schedule-x/event-modal": "^2.
|
|
48
|
-
"@schedule-x/events-service": "^2.
|
|
49
|
-
"@schedule-x/prettier-config": "^2.
|
|
50
|
-
"@schedule-x/shared": "^2.
|
|
51
|
-
"@schedule-x/theme-default": "^2.
|
|
43
|
+
"@schedule-x/calendar-controls": "^2.15.1",
|
|
44
|
+
"@schedule-x/drag-and-drop": "^2.15.1",
|
|
45
|
+
"@schedule-x/e2e-testing": "^2.15.1",
|
|
46
|
+
"@schedule-x/eslint-config": "^2.15.1",
|
|
47
|
+
"@schedule-x/event-modal": "^2.15.1",
|
|
48
|
+
"@schedule-x/events-service": "^2.15.1",
|
|
49
|
+
"@schedule-x/prettier-config": "^2.15.1",
|
|
50
|
+
"@schedule-x/shared": "^2.15.1",
|
|
51
|
+
"@schedule-x/theme-default": "^2.15.1",
|
|
52
52
|
"@semantic-release/changelog": "^6.0.3",
|
|
53
53
|
"@semantic-release/git": "^10.0.1",
|
|
54
54
|
"@types/react": "^18.2.43",
|