calendarkit-prov2 2.0.8 → 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/dist/index.d.mts +6 -0
- package/dist/index.d.ts +6 -0
- package/dist/index.js +11 -6
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +11 -6
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -269,6 +269,12 @@ interface CalendarProps {
|
|
|
269
269
|
* Defaults to false (FAB is shown on viewports under 768px when not read-only).
|
|
270
270
|
*/
|
|
271
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;
|
|
272
278
|
/**
|
|
273
279
|
* Hour (0–23) the Day and Week views initially scroll to on mount.
|
|
274
280
|
* Defaults to 8 (08:00 AM).
|
package/dist/index.d.ts
CHANGED
|
@@ -269,6 +269,12 @@ interface CalendarProps {
|
|
|
269
269
|
* Defaults to false (FAB is shown on viewports under 768px when not read-only).
|
|
270
270
|
*/
|
|
271
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;
|
|
272
278
|
/**
|
|
273
279
|
* Hour (0–23) the Day and Week views initially scroll to on mount.
|
|
274
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
|
{
|
|
@@ -4326,6 +4328,7 @@ var Scheduler = ({
|
|
|
4326
4328
|
hideViewSwitcher,
|
|
4327
4329
|
hideLanguageSwitcher,
|
|
4328
4330
|
hideFab = false,
|
|
4331
|
+
compactShortEvents = true,
|
|
4329
4332
|
initialScrollHour = 8,
|
|
4330
4333
|
reverseTime: reverseTimeProp = false,
|
|
4331
4334
|
language = "tr",
|
|
@@ -4737,7 +4740,8 @@ var Scheduler = ({
|
|
|
4737
4740
|
readonly: readOnly,
|
|
4738
4741
|
language,
|
|
4739
4742
|
initialScrollHour,
|
|
4740
|
-
reverseTime
|
|
4743
|
+
reverseTime,
|
|
4744
|
+
compactShortEvents
|
|
4741
4745
|
}
|
|
4742
4746
|
),
|
|
4743
4747
|
view === "day" && /* @__PURE__ */ React17__namespace.default.createElement(
|
|
@@ -4753,7 +4757,8 @@ var Scheduler = ({
|
|
|
4753
4757
|
readonly: readOnly,
|
|
4754
4758
|
language,
|
|
4755
4759
|
initialScrollHour,
|
|
4756
|
-
reverseTime
|
|
4760
|
+
reverseTime,
|
|
4761
|
+
compactShortEvents
|
|
4757
4762
|
}
|
|
4758
4763
|
),
|
|
4759
4764
|
view === "agenda" && /* @__PURE__ */ React17__namespace.default.createElement(
|