calendarkit-prov2 2.0.7 → 2.0.9
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 +1 -0
- package/dist/index.d.mts +11 -0
- package/dist/index.d.ts +11 -0
- package/dist/index.js +13 -7
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +13 -7
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -318,6 +318,7 @@ const sidebarMenus: SidebarMenuItem[] = [
|
|
|
318
318
|
- [Documentation](https://react-calendarkit-prov2.vercel.app/)
|
|
319
319
|
- [GitHub Repository](https://github.com/Sayzera/calendarkit-prov2)
|
|
320
320
|
- [npm Package](https://www.npmjs.com/package/calendarkit-prov2)
|
|
321
|
+
- [Publishing to npm](PUBLISHING.md)
|
|
321
322
|
- [Issues](https://github.com/Sayzera/calendarkit-prov2/issues)
|
|
322
323
|
|
|
323
324
|
---
|
package/dist/index.d.mts
CHANGED
|
@@ -264,6 +264,17 @@ interface CalendarProps {
|
|
|
264
264
|
isDarkMode?: boolean;
|
|
265
265
|
onThemeToggle?: () => void;
|
|
266
266
|
hideViewSwitcher?: boolean;
|
|
267
|
+
/**
|
|
268
|
+
* When true, hides the mobile floating action button (FAB) used to create events.
|
|
269
|
+
* Defaults to false (FAB is shown on viewports under 768px when not read-only).
|
|
270
|
+
*/
|
|
271
|
+
hideFab?: boolean;
|
|
272
|
+
/**
|
|
273
|
+
* When true (default), short timed events hide secondary details (time range, description)
|
|
274
|
+
* to fit the card: Week under 60 min, Day under 45 min.
|
|
275
|
+
* Set to false to always show title + time (+ description when space allows).
|
|
276
|
+
*/
|
|
277
|
+
compactShortEvents?: boolean;
|
|
267
278
|
/**
|
|
268
279
|
* Hour (0–23) the Day and Week views initially scroll to on mount.
|
|
269
280
|
* Defaults to 8 (08:00 AM).
|
package/dist/index.d.ts
CHANGED
|
@@ -264,6 +264,17 @@ interface CalendarProps {
|
|
|
264
264
|
isDarkMode?: boolean;
|
|
265
265
|
onThemeToggle?: () => void;
|
|
266
266
|
hideViewSwitcher?: boolean;
|
|
267
|
+
/**
|
|
268
|
+
* When true, hides the mobile floating action button (FAB) used to create events.
|
|
269
|
+
* Defaults to false (FAB is shown on viewports under 768px when not read-only).
|
|
270
|
+
*/
|
|
271
|
+
hideFab?: boolean;
|
|
272
|
+
/**
|
|
273
|
+
* When true (default), short timed events hide secondary details (time range, description)
|
|
274
|
+
* to fit the card: Week under 60 min, Day under 45 min.
|
|
275
|
+
* Set to false to always show title + time (+ description when space allows).
|
|
276
|
+
*/
|
|
277
|
+
compactShortEvents?: boolean;
|
|
267
278
|
/**
|
|
268
279
|
* Hour (0–23) the Day and Week views initially scroll to on mount.
|
|
269
280
|
* Defaults to 8 (08:00 AM).
|
package/dist/index.js
CHANGED
|
@@ -2480,7 +2480,8 @@ var WeekView = ({
|
|
|
2480
2480
|
readonly,
|
|
2481
2481
|
language = "tr",
|
|
2482
2482
|
initialScrollHour = 8,
|
|
2483
|
-
reverseTime = false
|
|
2483
|
+
reverseTime = false,
|
|
2484
|
+
compactShortEvents = true
|
|
2484
2485
|
}) => {
|
|
2485
2486
|
const start = dateFns.startOfWeek(currentDate, { weekStartsOn: 1 });
|
|
2486
2487
|
const end = dateFns.endOfWeek(currentDate, { weekStartsOn: 1 });
|
|
@@ -2616,7 +2617,7 @@ var WeekView = ({
|
|
|
2616
2617
|
const durationMinutes = dateFns.differenceInMinutes(zonedEventEnd, zonedEventStart);
|
|
2617
2618
|
const height = durationMinutes / 60 * hourHeight;
|
|
2618
2619
|
const top = reverseTime ? (1440 - startMinutes - durationMinutes) / 60 * hourHeight : startMinutes / 60 * hourHeight;
|
|
2619
|
-
const isShortEvent = durationMinutes < 60;
|
|
2620
|
+
const isShortEvent = compactShortEvents && durationMinutes < 60;
|
|
2620
2621
|
const resolvedBadge = resolveEventBadge(event, language);
|
|
2621
2622
|
const hasBadge = Boolean(resolvedBadge);
|
|
2622
2623
|
return /* @__PURE__ */ React17__namespace.default.createElement(
|
|
@@ -2721,7 +2722,8 @@ var DayView = ({
|
|
|
2721
2722
|
readonly,
|
|
2722
2723
|
language = "tr",
|
|
2723
2724
|
initialScrollHour = 8,
|
|
2724
|
-
reverseTime = false
|
|
2725
|
+
reverseTime = false,
|
|
2726
|
+
compactShortEvents = true
|
|
2725
2727
|
}) => {
|
|
2726
2728
|
const hours = reverseTime ? Array.from({ length: 24 }, (_, i) => 23 - i) : Array.from({ length: 24 }, (_, i) => i);
|
|
2727
2729
|
const hourHeight = 80;
|
|
@@ -2820,7 +2822,7 @@ var DayView = ({
|
|
|
2820
2822
|
const durationMinutes = dateFns.differenceInMinutes(zonedEnd, zonedStart);
|
|
2821
2823
|
const height = durationMinutes / 60 * hourHeight;
|
|
2822
2824
|
const top = reverseTime ? (1440 - startMinutes - durationMinutes) / 60 * hourHeight : startMinutes / 60 * hourHeight;
|
|
2823
|
-
const isShortEvent = durationMinutes < 45;
|
|
2825
|
+
const isShortEvent = compactShortEvents && durationMinutes < 45;
|
|
2824
2826
|
return /* @__PURE__ */ React17__namespace.default.createElement(
|
|
2825
2827
|
DraggableEvent,
|
|
2826
2828
|
{
|
|
@@ -4325,6 +4327,8 @@ var Scheduler = ({
|
|
|
4325
4327
|
translations,
|
|
4326
4328
|
hideViewSwitcher,
|
|
4327
4329
|
hideLanguageSwitcher,
|
|
4330
|
+
hideFab = false,
|
|
4331
|
+
compactShortEvents = true,
|
|
4328
4332
|
initialScrollHour = 8,
|
|
4329
4333
|
reverseTime: reverseTimeProp = false,
|
|
4330
4334
|
language = "tr",
|
|
@@ -4736,7 +4740,8 @@ var Scheduler = ({
|
|
|
4736
4740
|
readonly: readOnly,
|
|
4737
4741
|
language,
|
|
4738
4742
|
initialScrollHour,
|
|
4739
|
-
reverseTime
|
|
4743
|
+
reverseTime,
|
|
4744
|
+
compactShortEvents
|
|
4740
4745
|
}
|
|
4741
4746
|
),
|
|
4742
4747
|
view === "day" && /* @__PURE__ */ React17__namespace.default.createElement(
|
|
@@ -4752,7 +4757,8 @@ var Scheduler = ({
|
|
|
4752
4757
|
readonly: readOnly,
|
|
4753
4758
|
language,
|
|
4754
4759
|
initialScrollHour,
|
|
4755
|
-
reverseTime
|
|
4760
|
+
reverseTime,
|
|
4761
|
+
compactShortEvents
|
|
4756
4762
|
}
|
|
4757
4763
|
),
|
|
4758
4764
|
view === "agenda" && /* @__PURE__ */ React17__namespace.default.createElement(
|
|
@@ -4866,7 +4872,7 @@ var Scheduler = ({
|
|
|
4866
4872
|
), /* @__PURE__ */ React17__namespace.default.createElement("div", { className: "pl-2" }, /* @__PURE__ */ React17__namespace.default.createElement("div", { className: "font-semibold truncate text-sm" }, activeDragEvent.title), (view === "week" || view === "day") && getDragHeight() && getDragHeight() > 40 && /* @__PURE__ */ React17__namespace.default.createElement("div", { className: "text-xs opacity-80 mt-0.5 flex items-center gap-1" }, /* @__PURE__ */ React17__namespace.default.createElement("svg", { className: "w-3 h-3", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2" }, /* @__PURE__ */ React17__namespace.default.createElement("circle", { cx: "12", cy: "12", r: "10" }), /* @__PURE__ */ React17__namespace.default.createElement("path", { d: "M12 6v6l4 2" })), dateFns.format(activeDragEvent.start, getTimeFormatFull(language)), " - ", dateFns.format(activeDragEvent.end, getTimeFormatFull(language)))), /* @__PURE__ */ React17__namespace.default.createElement("div", { className: "absolute bottom-1.5 right-1.5 opacity-60" }, /* @__PURE__ */ React17__namespace.default.createElement("svg", { className: "w-4 h-4", viewBox: "0 0 24 24", fill: "currentColor" }, /* @__PURE__ */ React17__namespace.default.createElement("circle", { cx: "9", cy: "5", r: "1.5" }), /* @__PURE__ */ React17__namespace.default.createElement("circle", { cx: "15", cy: "5", r: "1.5" }), /* @__PURE__ */ React17__namespace.default.createElement("circle", { cx: "9", cy: "12", r: "1.5" }), /* @__PURE__ */ React17__namespace.default.createElement("circle", { cx: "15", cy: "12", r: "1.5" }), /* @__PURE__ */ React17__namespace.default.createElement("circle", { cx: "9", cy: "19", r: "1.5" }), /* @__PURE__ */ React17__namespace.default.createElement("circle", { cx: "15", cy: "19", r: "1.5" }))))
|
|
4867
4873
|
) : null)
|
|
4868
4874
|
)
|
|
4869
|
-
), isMounted && isMobile && !readOnly && reactDom.createPortal(
|
|
4875
|
+
), isMounted && isMobile && !readOnly && !hideFab && reactDom.createPortal(
|
|
4870
4876
|
/* @__PURE__ */ React17__namespace.default.createElement(
|
|
4871
4877
|
"div",
|
|
4872
4878
|
{
|