@progress/kendo-react-scheduler 16.3.0-develop.9 → 16.4.0-develop.1
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/NOTICE.txt +19 -19
- package/Scheduler.d.ts +46 -0
- package/Scheduler.js +1 -1
- package/Scheduler.mjs +322 -297
- package/components/EventOverviewPopover.d.ts +36 -0
- package/components/EventOverviewPopover.js +8 -0
- package/components/EventOverviewPopover.mjs +133 -0
- package/components/MoreEventsPopover.js +1 -1
- package/components/MoreEventsPopover.mjs +40 -39
- package/components/SchedulerForm.js +1 -1
- package/components/SchedulerForm.mjs +7 -6
- package/components/SchedulerQuickCreateForm.d.ts +63 -0
- package/components/SchedulerQuickCreateForm.js +8 -0
- package/components/SchedulerQuickCreateForm.mjs +144 -0
- package/components/ShowMoreItemsButton.js +1 -1
- package/components/ShowMoreItemsButton.mjs +1 -1
- package/dist/cdn/js/kendo-react-scheduler.js +1 -1
- package/editors/KeepResetCustomEventsDialog.d.ts +19 -0
- package/editors/KeepResetCustomEventsDialog.js +8 -0
- package/editors/KeepResetCustomEventsDialog.mjs +34 -0
- package/editors/SchedulerFormEditor.d.ts +18 -4
- package/editors/SchedulerFormEditor.js +1 -1
- package/editors/SchedulerFormEditor.mjs +273 -238
- package/editors/SchedulerRecurrenceDialog.js +1 -1
- package/editors/SchedulerRecurrenceDialog.mjs +142 -135
- package/editors/ZonedSplitDateTime.d.ts +30 -0
- package/editors/ZonedSplitDateTime.js +1 -1
- package/editors/ZonedSplitDateTime.mjs +58 -47
- package/hooks/index.d.ts +4 -0
- package/hooks/useCloseOnAnchorScrollOut.d.ts +18 -0
- package/hooks/useCloseOnAnchorScrollOut.js +8 -0
- package/hooks/useCloseOnAnchorScrollOut.mjs +51 -0
- package/hooks/useDeferredClick.d.ts +26 -0
- package/hooks/useDeferredClick.js +8 -0
- package/hooks/useDeferredClick.mjs +24 -0
- package/hooks/useEventOverviewPlacement.d.ts +23 -0
- package/hooks/useEventOverviewPlacement.js +8 -0
- package/hooks/useEventOverviewPlacement.mjs +14 -0
- package/hooks/useQuickCreatePlacement.d.ts +26 -0
- package/hooks/useQuickCreatePlacement.js +8 -0
- package/hooks/useQuickCreatePlacement.mjs +28 -0
- package/hooks/useSlotExpand.d.ts +2 -1
- package/hooks/useSlotExpand.js +1 -1
- package/hooks/useSlotExpand.mjs +107 -49
- package/index.d.mts +3 -1
- package/index.d.ts +3 -1
- package/index.js +1 -1
- package/index.mjs +112 -107
- package/items/SchedulerEditItem.js +1 -1
- package/items/SchedulerEditItem.mjs +600 -509
- package/items/SchedulerItem.d.ts +2 -0
- package/items/SchedulerItem.js +1 -1
- package/items/SchedulerItem.mjs +137 -130
- package/items/SchedulerProportionalViewItem.js +1 -1
- package/items/SchedulerProportionalViewItem.mjs +95 -91
- package/items/SchedulerViewItem.js +1 -1
- package/items/SchedulerViewItem.mjs +168 -157
- package/items/hooks/use-drag-item.js +1 -1
- package/items/hooks/use-drag-item.mjs +46 -45
- package/items/hooks/use-resize-item.d.ts +1 -0
- package/items/hooks/use-resize-item.js +1 -1
- package/items/hooks/use-resize-item.mjs +84 -78
- package/messages/index.d.ts +33 -0
- package/messages/index.js +1 -1
- package/messages/index.mjs +158 -136
- package/package-metadata.js +1 -1
- package/package-metadata.mjs +2 -2
- package/package.json +13 -13
- package/recurrence/RecurrenceEditor.js +1 -1
- package/recurrence/RecurrenceEditor.mjs +64 -64
- package/recurrence/common.d.ts +10 -0
- package/recurrence/common.js +1 -1
- package/recurrence/common.mjs +48 -44
- package/services/itemsService.d.ts +5 -2
- package/services/itemsService.js +1 -1
- package/services/itemsService.mjs +36 -36
- package/slots/SchedulerEditSlot.d.ts +15 -0
- package/slots/SchedulerEditSlot.js +1 -1
- package/slots/SchedulerEditSlot.mjs +162 -92
- package/slots/SchedulerViewSlot.js +1 -1
- package/slots/SchedulerViewSlot.mjs +7 -7
- package/utils/index.d.ts +2 -0
- package/utils/index.js +1 -1
- package/utils/index.mjs +103 -99
- package/views/agenda/AgendaView.js +1 -1
- package/views/agenda/AgendaView.mjs +32 -30
- package/views/common/SchedulerDrag.js +1 -1
- package/views/common/SchedulerDrag.mjs +26 -23
- package/views/common/SchedulerResize.js +1 -1
- package/views/common/SchedulerResize.mjs +29 -26
- package/views/day/MultiDayView.js +1 -1
- package/views/day/MultiDayView.mjs +160 -152
|
@@ -5,4 +5,4 @@
|
|
|
5
5
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
8
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const A=require("react"),v=require("@progress/kendo-react-dateinputs"),_=require("../context/SchedulerContext.js"),c=require("./ZonedDateTime.js");function w(t){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const n in t)if(n!=="default"){const s=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(e,n,s.get?s:{enumerable:!0,get:()=>t[n]})}}return e.default=t,Object.freeze(e)}const o=w(A),p={minute:15},S=(t,e)=>!!(t&&(e==null?void 0:e.getFullYear())===t.getFullYear()&&e.getMonth()===t.getMonth()&&e.getDate()===t.getDate()),O=t=>{const{value:e,onChange:n,isAllDay:s,connector:f,connectorElement:E,dateId:h,timeId:C,fieldError:L,ariaLabel:M,timeAriaLabel:P,min:d,max:g,steps:b=p}=t,{timezone:l}=_.useSchedulerPropsContext(),a=o.useMemo(()=>e?c.readDateAsLocal(e,l):null,[e,l]),u=o.useMemo(()=>d?c.readDateAsLocal(d,l):void 0,[d,l]),m=o.useMemo(()=>g?c.readDateAsLocal(g,l):void 0,[g,l]),k=S(a,u)?u:void 0,x=S(a,m)?m:void 0,T=o.useCallback(i=>{if(!i.value||!n)return;const r=new Date(i.value);a&&r.setHours(a.getHours(),a.getMinutes(),a.getSeconds()),n({value:c.readDateWithTimezone(r,l)})},[n,a,l]),y=o.useCallback(i=>{if(!i.value||!n)return;const r=new Date(a||new Date);r.setHours(i.value.getHours(),i.value.getMinutes(),0,0),n({value:c.readDateWithTimezone(r,l)})},[n,a,l]),D=!!L;return s?o.createElement(v.DatePicker,{id:h,value:a,onChange:T,valid:!D,ariaLabel:M,min:u,max:m}):o.createElement(o.Fragment,null,o.createElement(v.DatePicker,{id:h,value:a,onChange:T,valid:!D,ariaLabel:M,min:u,max:m}),E||f&&o.createElement("span",{className:"k-scheduler-datetime-label"},f),o.createElement(v.TimePicker,{id:C,value:a,onChange:y,valid:!D,ariaLabel:P,min:k,max:x,steps:b}))};exports.DEFAULT_TIME_STEPS=p;exports.ZonedSplitDateTime=O;
|
|
@@ -5,68 +5,79 @@
|
|
|
5
5
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
|
-
import * as
|
|
9
|
-
import { DatePicker as
|
|
10
|
-
import { useSchedulerPropsContext as
|
|
11
|
-
import { readDateAsLocal as
|
|
12
|
-
const
|
|
8
|
+
import * as t from "react";
|
|
9
|
+
import { DatePicker as E, TimePicker as H } from "@progress/kendo-react-dateinputs";
|
|
10
|
+
import { useSchedulerPropsContext as I } from "../context/SchedulerContext.mjs";
|
|
11
|
+
import { readDateAsLocal as v, readDateWithTimezone as f } from "./ZonedDateTime.mjs";
|
|
12
|
+
const P = { minute: 15 }, p = (o, n) => !!(o && (n == null ? void 0 : n.getFullYear()) === o.getFullYear() && n.getMonth() === o.getMonth() && n.getDate() === o.getDate()), Y = (o) => {
|
|
13
13
|
const {
|
|
14
|
-
value:
|
|
15
|
-
onChange:
|
|
16
|
-
isAllDay:
|
|
17
|
-
connector:
|
|
18
|
-
connectorElement:
|
|
19
|
-
dateId:
|
|
20
|
-
timeId:
|
|
21
|
-
fieldError:
|
|
22
|
-
ariaLabel:
|
|
23
|
-
timeAriaLabel:
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
14
|
+
value: n,
|
|
15
|
+
onChange: l,
|
|
16
|
+
isAllDay: C,
|
|
17
|
+
connector: g,
|
|
18
|
+
connectorElement: x,
|
|
19
|
+
dateId: D,
|
|
20
|
+
timeId: T,
|
|
21
|
+
fieldError: L,
|
|
22
|
+
ariaLabel: h,
|
|
23
|
+
timeAriaLabel: S,
|
|
24
|
+
min: c,
|
|
25
|
+
max: u,
|
|
26
|
+
steps: k = P
|
|
27
|
+
} = o, { timezone: a } = I(), e = t.useMemo(() => n ? v(n, a) : null, [n, a]), s = t.useMemo(() => c ? v(c, a) : void 0, [c, a]), m = t.useMemo(() => u ? v(u, a) : void 0, [u, a]), w = p(e, s) ? s : void 0, A = p(e, m) ? m : void 0, M = t.useCallback(
|
|
28
|
+
(i) => {
|
|
29
|
+
if (!i.value || !l)
|
|
27
30
|
return;
|
|
28
|
-
const
|
|
29
|
-
e &&
|
|
31
|
+
const r = new Date(i.value);
|
|
32
|
+
e && r.setHours(e.getHours(), e.getMinutes(), e.getSeconds()), l({ value: f(r, a) });
|
|
30
33
|
},
|
|
31
|
-
[
|
|
32
|
-
),
|
|
33
|
-
(
|
|
34
|
-
if (!
|
|
34
|
+
[l, e, a]
|
|
35
|
+
), F = t.useCallback(
|
|
36
|
+
(i) => {
|
|
37
|
+
if (!i.value || !l)
|
|
35
38
|
return;
|
|
36
|
-
const
|
|
37
|
-
|
|
39
|
+
const r = new Date(e || /* @__PURE__ */ new Date());
|
|
40
|
+
r.setHours(i.value.getHours(), i.value.getMinutes(), 0, 0), l({ value: f(r, a) });
|
|
38
41
|
},
|
|
39
|
-
[
|
|
40
|
-
),
|
|
41
|
-
return
|
|
42
|
-
|
|
42
|
+
[l, e, a]
|
|
43
|
+
), d = !!L;
|
|
44
|
+
return C ? /* @__PURE__ */ t.createElement(
|
|
45
|
+
E,
|
|
43
46
|
{
|
|
44
|
-
id:
|
|
47
|
+
id: D,
|
|
45
48
|
value: e,
|
|
46
|
-
onChange:
|
|
47
|
-
valid: !
|
|
48
|
-
ariaLabel:
|
|
49
|
+
onChange: M,
|
|
50
|
+
valid: !d,
|
|
51
|
+
ariaLabel: h,
|
|
52
|
+
min: s,
|
|
53
|
+
max: m
|
|
49
54
|
}
|
|
50
|
-
) : /* @__PURE__ */
|
|
51
|
-
|
|
55
|
+
) : /* @__PURE__ */ t.createElement(t.Fragment, null, /* @__PURE__ */ t.createElement(
|
|
56
|
+
E,
|
|
52
57
|
{
|
|
53
|
-
id:
|
|
58
|
+
id: D,
|
|
54
59
|
value: e,
|
|
55
|
-
onChange:
|
|
56
|
-
valid: !
|
|
57
|
-
ariaLabel:
|
|
60
|
+
onChange: M,
|
|
61
|
+
valid: !d,
|
|
62
|
+
ariaLabel: h,
|
|
63
|
+
min: s,
|
|
64
|
+
max: m
|
|
58
65
|
}
|
|
59
|
-
),
|
|
60
|
-
|
|
66
|
+
), x || g && /* @__PURE__ */ t.createElement("span", { className: "k-scheduler-datetime-label" }, g), /* @__PURE__ */ t.createElement(
|
|
67
|
+
H,
|
|
61
68
|
{
|
|
62
|
-
id:
|
|
69
|
+
id: T,
|
|
63
70
|
value: e,
|
|
64
|
-
onChange:
|
|
65
|
-
valid: !
|
|
66
|
-
ariaLabel:
|
|
71
|
+
onChange: F,
|
|
72
|
+
valid: !d,
|
|
73
|
+
ariaLabel: S,
|
|
74
|
+
min: w,
|
|
75
|
+
max: A,
|
|
76
|
+
steps: k
|
|
67
77
|
}
|
|
68
78
|
));
|
|
69
79
|
};
|
|
70
80
|
export {
|
|
71
|
-
|
|
81
|
+
P as DEFAULT_TIME_STEPS,
|
|
82
|
+
Y as ZonedSplitDateTime
|
|
72
83
|
};
|
package/hooks/index.d.ts
CHANGED
|
@@ -17,3 +17,7 @@ export * from './useSchedulerItem.js';
|
|
|
17
17
|
export * from './use-items-focus.js';
|
|
18
18
|
export * from './use-slots-focus.js';
|
|
19
19
|
export * from './useToolbarResponsive.js';
|
|
20
|
+
export * from './useQuickCreatePlacement.js';
|
|
21
|
+
export * from './useEventOverviewPlacement.js';
|
|
22
|
+
export * from './useCloseOnAnchorScrollOut.js';
|
|
23
|
+
export * from './useDeferredClick.js';
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
*-------------------------------------------------------------------------------------------
|
|
4
|
+
* Copyright © 2026 Progress Software Corporation. All rights reserved.
|
|
5
|
+
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
|
+
*-------------------------------------------------------------------------------------------
|
|
7
|
+
*/
|
|
8
|
+
/**
|
|
9
|
+
* @hidden
|
|
10
|
+
*
|
|
11
|
+
* Closes a Scheduler popover when its anchor (a slot, event, or "show more"
|
|
12
|
+
* button) is scrolled outside the visible area of any scrollable container in
|
|
13
|
+
* the Scheduler, either horizontally or vertically. The visible area excludes
|
|
14
|
+
* the sticky header and side column, so the popover also closes once the anchor
|
|
15
|
+
* slides behind them. Mirrors the Grid column menu behavior, where the menu
|
|
16
|
+
* dismisses once its anchor leaves the viewport of the scroll container.
|
|
17
|
+
*/
|
|
18
|
+
export declare const useCloseOnAnchorScrollOut: (show: boolean, anchor: HTMLElement | null, onClose?: () => void) => void;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
*-------------------------------------------------------------------------------------------
|
|
4
|
+
* Copyright © 2026 Progress Software Corporation. All rights reserved.
|
|
5
|
+
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
|
+
*-------------------------------------------------------------------------------------------
|
|
7
|
+
*/
|
|
8
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const u=require("react");function f(r){const o=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(r){for(const t in r)if(t!=="default"){const e=Object.getOwnPropertyDescriptor(r,t);Object.defineProperty(o,t,e.get?e:{enumerable:!0,get:()=>r[t]})}}return o.default=r,Object.freeze(o)}const a=f(u),g=/(auto|scroll|overlay)/,h=r=>{const o=[];let t=r.parentElement;for(;t;){const{overflow:e,overflowX:n,overflowY:c}=getComputedStyle(t);if(g.test(`${e}${n}${c}`)&&o.push(t),t.classList.contains("k-scheduler"))break;t=t.parentElement}return o},d=(r,o)=>{const t=r.getBoundingClientRect(),e={top:t.top,left:t.left,right:t.right,bottom:t.bottom},n=r.querySelector(".k-scheduler-head");n&&!n.contains(o)&&(e.top=Math.max(e.top,n.getBoundingClientRect().bottom));const c=r.querySelector(".k-sticky-cell");if(c&&!o.closest(".k-sticky-cell")){const l=c.getBoundingClientRect();l.left-t.left<=t.right-l.right?e.left=Math.max(e.left,l.right):e.right=Math.min(e.right,l.left)}return e},m=(r,o,t)=>{a.useEffect(()=>{if(!r||!o||!t)return;const e=h(o);if(e.length===0)return;const n=()=>{const l=o.getBoundingClientRect();return e.some(i=>{const s=d(i,o);return l.bottom<=s.top||l.top>=s.bottom||l.right<=s.left||l.left>=s.right})},c=()=>{n()&&t()};return e.forEach(l=>l.addEventListener("scroll",c,{passive:!0})),()=>{e.forEach(l=>l.removeEventListener("scroll",c))}},[r,o,t])};exports.useCloseOnAnchorScrollOut=m;
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
*-------------------------------------------------------------------------------------------
|
|
4
|
+
* Copyright © 2026 Progress Software Corporation. All rights reserved.
|
|
5
|
+
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
|
+
*-------------------------------------------------------------------------------------------
|
|
7
|
+
*/
|
|
8
|
+
import * as f from "react";
|
|
9
|
+
const u = /(auto|scroll|overlay)/, g = (r) => {
|
|
10
|
+
const l = [];
|
|
11
|
+
let t = r.parentElement;
|
|
12
|
+
for (; t; ) {
|
|
13
|
+
const { overflow: e, overflowX: c, overflowY: n } = getComputedStyle(t);
|
|
14
|
+
if (u.test(`${e}${c}${n}`) && l.push(t), t.classList.contains("k-scheduler"))
|
|
15
|
+
break;
|
|
16
|
+
t = t.parentElement;
|
|
17
|
+
}
|
|
18
|
+
return l;
|
|
19
|
+
}, a = (r, l) => {
|
|
20
|
+
const t = r.getBoundingClientRect(), e = { top: t.top, left: t.left, right: t.right, bottom: t.bottom }, c = r.querySelector(".k-scheduler-head");
|
|
21
|
+
c && !c.contains(l) && (e.top = Math.max(e.top, c.getBoundingClientRect().bottom));
|
|
22
|
+
const n = r.querySelector(".k-sticky-cell");
|
|
23
|
+
if (n && !l.closest(".k-sticky-cell")) {
|
|
24
|
+
const o = n.getBoundingClientRect();
|
|
25
|
+
o.left - t.left <= t.right - o.right ? e.left = Math.max(e.left, o.right) : e.right = Math.min(e.right, o.left);
|
|
26
|
+
}
|
|
27
|
+
return e;
|
|
28
|
+
}, h = (r, l, t) => {
|
|
29
|
+
f.useEffect(() => {
|
|
30
|
+
if (!r || !l || !t)
|
|
31
|
+
return;
|
|
32
|
+
const e = g(l);
|
|
33
|
+
if (e.length === 0)
|
|
34
|
+
return;
|
|
35
|
+
const c = () => {
|
|
36
|
+
const o = l.getBoundingClientRect();
|
|
37
|
+
return e.some((i) => {
|
|
38
|
+
const s = a(i, l);
|
|
39
|
+
return o.bottom <= s.top || o.top >= s.bottom || o.right <= s.left || o.left >= s.right;
|
|
40
|
+
});
|
|
41
|
+
}, n = () => {
|
|
42
|
+
c() && t();
|
|
43
|
+
};
|
|
44
|
+
return e.forEach((o) => o.addEventListener("scroll", n, { passive: !0 })), () => {
|
|
45
|
+
e.forEach((o) => o.removeEventListener("scroll", n));
|
|
46
|
+
};
|
|
47
|
+
}, [r, l, t]);
|
|
48
|
+
};
|
|
49
|
+
export {
|
|
50
|
+
h as useCloseOnAnchorScrollOut
|
|
51
|
+
};
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
*-------------------------------------------------------------------------------------------
|
|
4
|
+
* Copyright © 2026 Progress Software Corporation. All rights reserved.
|
|
5
|
+
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
|
+
*-------------------------------------------------------------------------------------------
|
|
7
|
+
*/
|
|
8
|
+
/** @hidden */
|
|
9
|
+
export interface DeferredClick {
|
|
10
|
+
/** Schedules `callback` to run after the double-click window elapses. */
|
|
11
|
+
schedule: (callback: () => void) => void;
|
|
12
|
+
/** Cancels a pending scheduled callback, if any. */
|
|
13
|
+
cancel: () => void;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* @hidden
|
|
17
|
+
*
|
|
18
|
+
* Defers a single-click action so a following double-click can cancel it.
|
|
19
|
+
*
|
|
20
|
+
* The Scheduler opens a popover on click and the full editor on double-click.
|
|
21
|
+
* Because the browser fires a `click` before `dblclick`, the popover would flash
|
|
22
|
+
* open for a moment before the editor. Deferring the click action by the
|
|
23
|
+
* double-click window and cancelling it from the double-click handler prevents
|
|
24
|
+
* that flash while keeping the single-click behavior intact.
|
|
25
|
+
*/
|
|
26
|
+
export declare const useDeferredClick: (delay?: number) => DeferredClick;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
*-------------------------------------------------------------------------------------------
|
|
4
|
+
* Copyright © 2026 Progress Software Corporation. All rights reserved.
|
|
5
|
+
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
|
+
*-------------------------------------------------------------------------------------------
|
|
7
|
+
*/
|
|
8
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("react");function o(r){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(r){for(const e in r)if(e!=="default"){const c=Object.getOwnPropertyDescriptor(r,e);Object.defineProperty(t,e,c.get?c:{enumerable:!0,get:()=>r[e]})}}return t.default=r,Object.freeze(t)}const n=o(l),s=200,a=(r=s)=>{const t=n.useRef(null),e=n.useCallback(()=>{t.current!==null&&(clearTimeout(t.current),t.current=null)},[]),c=n.useCallback(u=>{e(),t.current=setTimeout(()=>{t.current=null,u()},r)},[e,r]);return n.useEffect(()=>e,[e]),{schedule:c,cancel:e}};exports.useDeferredClick=a;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
*-------------------------------------------------------------------------------------------
|
|
4
|
+
* Copyright © 2026 Progress Software Corporation. All rights reserved.
|
|
5
|
+
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
|
+
*-------------------------------------------------------------------------------------------
|
|
7
|
+
*/
|
|
8
|
+
import * as c from "react";
|
|
9
|
+
const l = 200, s = (u = l) => {
|
|
10
|
+
const e = c.useRef(null), t = c.useCallback(() => {
|
|
11
|
+
e.current !== null && (clearTimeout(e.current), e.current = null);
|
|
12
|
+
}, []), r = c.useCallback(
|
|
13
|
+
(n) => {
|
|
14
|
+
t(), e.current = setTimeout(() => {
|
|
15
|
+
e.current = null, n();
|
|
16
|
+
}, u);
|
|
17
|
+
},
|
|
18
|
+
[t, u]
|
|
19
|
+
);
|
|
20
|
+
return c.useEffect(() => t, [t]), { schedule: r, cancel: t };
|
|
21
|
+
};
|
|
22
|
+
export {
|
|
23
|
+
s as useDeferredClick
|
|
24
|
+
};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
*-------------------------------------------------------------------------------------------
|
|
4
|
+
* Copyright © 2026 Progress Software Corporation. All rights reserved.
|
|
5
|
+
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
|
+
*-------------------------------------------------------------------------------------------
|
|
7
|
+
*/
|
|
8
|
+
import { PopoverPosition, PopoverCollision } from '@progress/kendo-react-tooltip';
|
|
9
|
+
/** @hidden */
|
|
10
|
+
export interface EventOverviewPlacement {
|
|
11
|
+
position: PopoverPosition;
|
|
12
|
+
collision: PopoverCollision;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* @hidden
|
|
16
|
+
*
|
|
17
|
+
* Resolves the EventOverview popover placement.
|
|
18
|
+
*
|
|
19
|
+
* Hardcoded per design: the popover is always placed to the right of the
|
|
20
|
+
* anchored event and fits on both axes (no flip). The structure is kept so the
|
|
21
|
+
* shape-aware logic can be restored later if needed.
|
|
22
|
+
*/
|
|
23
|
+
export declare const useEventOverviewPlacement: () => EventOverviewPlacement;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
*-------------------------------------------------------------------------------------------
|
|
4
|
+
* Copyright © 2026 Progress Software Corporation. All rights reserved.
|
|
5
|
+
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
|
+
*-------------------------------------------------------------------------------------------
|
|
7
|
+
*/
|
|
8
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e={position:"right",collision:{horizontal:"fit",vertical:"fit"}},t=()=>e;exports.useEventOverviewPlacement=t;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
*-------------------------------------------------------------------------------------------
|
|
4
|
+
* Copyright © 2026 Progress Software Corporation. All rights reserved.
|
|
5
|
+
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
|
+
*-------------------------------------------------------------------------------------------
|
|
7
|
+
*/
|
|
8
|
+
const t = {
|
|
9
|
+
position: "right",
|
|
10
|
+
collision: { horizontal: "fit", vertical: "fit" }
|
|
11
|
+
}, i = () => t;
|
|
12
|
+
export {
|
|
13
|
+
i as useEventOverviewPlacement
|
|
14
|
+
};
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
*-------------------------------------------------------------------------------------------
|
|
4
|
+
* Copyright © 2026 Progress Software Corporation. All rights reserved.
|
|
5
|
+
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
|
+
*-------------------------------------------------------------------------------------------
|
|
7
|
+
*/
|
|
8
|
+
import { PopoverPosition, PopoverCollision } from '@progress/kendo-react-tooltip';
|
|
9
|
+
/** @hidden */
|
|
10
|
+
export interface QuickCreatePlacement {
|
|
11
|
+
position: PopoverPosition;
|
|
12
|
+
collision: PopoverCollision;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* @hidden
|
|
16
|
+
*
|
|
17
|
+
* Resolves the QuickCreate popover placement from the rendered column layout
|
|
18
|
+
* instead of the active view type. Columns are derived from the visible day
|
|
19
|
+
* span and horizontal grouping, so Day/Week/WorkWeek all behave consistently
|
|
20
|
+
* (e.g. a WorkWeekView collapsed to a single day is treated as one column).
|
|
21
|
+
*
|
|
22
|
+
* The Timeline view is the exception: its slots are fixed-width cells on a
|
|
23
|
+
* horizontal time axis, so the day-based column count does not describe slot
|
|
24
|
+
* width. It is always treated as multi-column (side placement).
|
|
25
|
+
*/
|
|
26
|
+
export declare const useQuickCreatePlacement: () => QuickCreatePlacement;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
*-------------------------------------------------------------------------------------------
|
|
4
|
+
* Copyright © 2026 Progress Software Corporation. All rights reserved.
|
|
5
|
+
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
|
+
*-------------------------------------------------------------------------------------------
|
|
7
|
+
*/
|
|
8
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("react"),s=require("@progress/kendo-date-math"),r=require("../context/SchedulerContext.js");function l(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const o=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,o.get?o:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const d=l(a),m={position:"top",collision:{horizontal:"fit",vertical:"flip"}},c={position:"right",collision:{horizontal:"flip",vertical:"fit"}},f=()=>{const[e]=r.useSchedulerActiveViewContext(),t=r.useSchedulerDateRangeContext(),n=r.useSchedulerGroupsContext(),o=r.useSchedulerOrientationContext();return d.useMemo(()=>{if(e==="timeline")return c;const i=Math.max(1,Math.round((t.end.getTime()-t.start.getTime())/s.MS_PER_DAY)),u=o==="horizontal"?Math.max(1,n.length):1;return i*u<=1?m:c},[e,t,n,o])};exports.useQuickCreatePlacement=f;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
*-------------------------------------------------------------------------------------------
|
|
4
|
+
* Copyright © 2026 Progress Software Corporation. All rights reserved.
|
|
5
|
+
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
|
+
*-------------------------------------------------------------------------------------------
|
|
7
|
+
*/
|
|
8
|
+
import * as c from "react";
|
|
9
|
+
import { MS_PER_DAY as a } from "@progress/kendo-date-math";
|
|
10
|
+
import { useSchedulerActiveViewContext as l, useSchedulerDateRangeContext as u, useSchedulerGroupsContext as m, useSchedulerOrientationContext as h } from "../context/SchedulerContext.mjs";
|
|
11
|
+
const p = {
|
|
12
|
+
position: "top",
|
|
13
|
+
collision: { horizontal: "fit", vertical: "flip" }
|
|
14
|
+
}, i = {
|
|
15
|
+
position: "right",
|
|
16
|
+
collision: { horizontal: "flip", vertical: "fit" }
|
|
17
|
+
}, g = () => {
|
|
18
|
+
const [e] = l(), t = u(), o = m(), n = h();
|
|
19
|
+
return c.useMemo(() => {
|
|
20
|
+
if (e === "timeline")
|
|
21
|
+
return i;
|
|
22
|
+
const r = Math.max(1, Math.round((t.end.getTime() - t.start.getTime()) / a)), s = n === "horizontal" ? Math.max(1, o.length) : 1;
|
|
23
|
+
return r * s <= 1 ? p : i;
|
|
24
|
+
}, [e, t, o, n]);
|
|
25
|
+
};
|
|
26
|
+
export {
|
|
27
|
+
g as useQuickCreatePlacement
|
|
28
|
+
};
|
package/hooks/useSlotExpand.d.ts
CHANGED
|
@@ -5,8 +5,9 @@
|
|
|
5
5
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
|
+
import { Item } from '../models/index.js';
|
|
8
9
|
import { SchedulerSlotHandle } from '../slots/SchedulerSlot.js';
|
|
9
10
|
import { SchedulerSlotExpandableConfig } from '../slots/SchedulerViewSlot.js';
|
|
10
11
|
import * as React from 'react';
|
|
11
12
|
/** @hidden */
|
|
12
|
-
export declare const useSlotExpand: (slot: React.RefObject<SchedulerSlotHandle | null>, config?: boolean | SchedulerSlotExpandableConfig) => void;
|
|
13
|
+
export declare const useSlotExpand: (slot: React.RefObject<SchedulerSlotHandle | null>, config?: boolean | SchedulerSlotExpandableConfig, style?: React.CSSProperties, items?: Item[]) => void;
|
package/hooks/useSlotExpand.js
CHANGED
|
@@ -5,4 +5,4 @@
|
|
|
5
5
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
8
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const z=require("react"),w=require("../views/common/utils.js"),I=require("../constants/index.js"),D=require("../context/SchedulerContext.js");function C(e){const r=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const s in e)if(s!=="default"){const f=Object.getOwnPropertyDescriptor(e,s);Object.defineProperty(r,s,f.get?f:{enumerable:!0,get:()=>e[s]})}}return r.default=e,Object.freeze(r)}const v=C(z),F=e=>{const r=new Map;Array.from(e.querySelectorAll(".k-resource-row")).filter(t=>!t.classList.contains("k-resource-cell")).forEach(t=>{var p;const n=t.getAttribute("data-depth-index"),c=t.getAttribute("data-resource-index");if(n===null||c===null)return;const l=`${n}:${c}`;r.set(l,Math.max((p=r.get(l))!=null?p:0,t.clientHeight-I.BORDER_WIDTH))});const f=[];Array.from(e.querySelectorAll(".k-resource-cell")).forEach(t=>{const n=t.getAttribute("data-depth-index"),c=t.getAttribute("data-resource-index");if(n===null||c===null)return;const l=r.get(`${n}:${c}`);if(l===void 0)return;const p=Math.round(l-w.getPadding(t));f.push({cell:t,height:p,minHeight:p>0?`${p}px`:""})}),f.forEach(({cell:t,height:n,minHeight:c})=>{t.style.minHeight!==c&&w.setRect(t,{height:n},!0)})},E=new Set;let x;const T=e=>{E.add(e),x===void 0&&(x=window.requestAnimationFrame(()=>{x=void 0;const r=Array.from(E);E.clear();const s=new Set;r.map(h=>{try{return h()}catch{return}}).forEach(h=>{if(!h)return;const{element:t,minHeight:n}=h,c=n&&n>0?`${n}px`:"";if(t.style.minHeight!==c){w.setRect(t,{height:n!=null?n:0},!0);const l=t.closest(".k-scheduler-layout");l&&s.add(l)}}),s.forEach(F)}))},K=e=>{E.delete(e),E.size===0&&x!==void 0&&(window.cancelAnimationFrame(x),x=void 0)},N=(e,r,s,f)=>{const h=D.useSchedulerElementContext(),t=!!r,n=typeof r=="object"&&r.offsetTop?r.offsetTop:0,c=typeof r=="object"&&r.offsetBottom?r.offsetBottom:0,l=f!=null?f:e.current&&e.current.props.items,p=l?JSON.stringify(l.map(i=>{var d,u;return[i.uid,i.isRecurring&&(u=(d=i.originalStart)==null?void 0:d.getTime())!=null?u:null]})):"",P=s?`${s.padding}|${s.paddingTop}|${s.paddingBottom}`:"",b=v.useCallback(()=>{if(!t||!e.current)return;const i=e.current.element,d=e.current.props;if(!i)return;const u=w.getPadding(i),o=new Map;let y=!1;const m=d.items.filter(a=>a._ref.current);m.forEach(a=>{var A,H,k,M,$;if(!a._ref.current)return;const{height:R}=w.getRect(a._ref.current.element),O=(k=(H=(A=a._ref.current)==null?void 0:A._order)!=null?H:a.order)!=null?k:-1;(M=a._ref.current.element)!=null&&M.style.top&&(y=!0),(($=o.get(O))!=null?$:0)<R&&o.set(O,R)});let g;if(!y||o.size===0)return{element:i,minHeight:null};const _=Math.max(...Array.from(o.keys())),j=_+1,q=Math.max(...Array.from(o.values()));g=0;for(let a=0;a<=_;a++)g+=o.has(a)?o.get(a):q;const B=j*I.BORDER_WIDTH*2+g-u+n+c;return{element:i,minHeight:m.length?B:null}},[t,c,n,e]),S=v.useCallback(()=>{T(b)},[b]);v.useEffect(()=>{var i;if(!t){const d=e.current;if(d!=null&&d.element){const u=(i=d.props.style)==null?void 0:i.minHeight;d.element.style.minHeight=typeof u=="number"?`${u}px`:u!=null?u:""}return}return T(b),()=>K(b)},[b,t,e,p,P]),v.useEffect(()=>{if(!t||!e.current)return;const u=e.current.props.items.filter(o=>o._ref.current).map(o=>{if(!o._ref.current||!o._ref.current.element||!h.current)return;const y=window.ResizeObserver,m=y&&new y(S);m&&m.observe(o._ref.current.element);const g=new MutationObserver(S);return g.observe(o._ref.current.element,{attributes:!0,attributeFilter:["style"]}),()=>{m&&m.disconnect(),g.disconnect()}});return()=>{u.forEach(o=>o&&o())}},[t,S,h,e,p])};exports.useSlotExpand=N;
|
package/hooks/useSlotExpand.mjs
CHANGED
|
@@ -5,67 +5,125 @@
|
|
|
5
5
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
|
-
import * as
|
|
9
|
-
import { getPadding as
|
|
10
|
-
import { BORDER_WIDTH as
|
|
11
|
-
import { useSchedulerElementContext as
|
|
12
|
-
const
|
|
13
|
-
const
|
|
14
|
-
|
|
8
|
+
import * as w from "react";
|
|
9
|
+
import { getPadding as O, getRect as q, setRect as B } from "../views/common/utils.mjs";
|
|
10
|
+
import { BORDER_WIDTH as T } from "../constants/index.mjs";
|
|
11
|
+
import { useSchedulerElementContext as j } from "../context/SchedulerContext.mjs";
|
|
12
|
+
const D = (t) => {
|
|
13
|
+
const o = /* @__PURE__ */ new Map();
|
|
14
|
+
Array.from(t.querySelectorAll(".k-resource-row")).filter(
|
|
15
|
+
(e) => !e.classList.contains("k-resource-cell")
|
|
16
|
+
).forEach((e) => {
|
|
17
|
+
var f;
|
|
18
|
+
const r = e.getAttribute("data-depth-index"), s = e.getAttribute("data-resource-index");
|
|
19
|
+
if (r === null || s === null)
|
|
15
20
|
return;
|
|
16
|
-
const
|
|
17
|
-
|
|
21
|
+
const a = `${r}:${s}`;
|
|
22
|
+
o.set(a, Math.max((f = o.get(a)) != null ? f : 0, e.clientHeight - T));
|
|
23
|
+
});
|
|
24
|
+
const m = [];
|
|
25
|
+
Array.from(t.querySelectorAll(".k-resource-cell")).forEach((e) => {
|
|
26
|
+
const r = e.getAttribute("data-depth-index"), s = e.getAttribute("data-resource-index");
|
|
27
|
+
if (r === null || s === null)
|
|
18
28
|
return;
|
|
19
|
-
const
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
29
|
+
const a = o.get(`${r}:${s}`);
|
|
30
|
+
if (a === void 0)
|
|
31
|
+
return;
|
|
32
|
+
const f = Math.round(a - O(e));
|
|
33
|
+
m.push({ cell: e, height: f, minHeight: f > 0 ? `${f}px` : "" });
|
|
34
|
+
}), m.forEach(({ cell: e, height: r, minHeight: s }) => {
|
|
35
|
+
e.style.minHeight !== s && B(e, { height: r }, !0);
|
|
36
|
+
});
|
|
37
|
+
}, E = /* @__PURE__ */ new Set();
|
|
38
|
+
let x;
|
|
39
|
+
const I = (t) => {
|
|
40
|
+
E.add(t), x === void 0 && (x = window.requestAnimationFrame(() => {
|
|
41
|
+
x = void 0;
|
|
42
|
+
const o = Array.from(E);
|
|
43
|
+
E.clear();
|
|
44
|
+
const d = /* @__PURE__ */ new Set();
|
|
45
|
+
o.map((p) => {
|
|
46
|
+
try {
|
|
47
|
+
return p();
|
|
48
|
+
} catch {
|
|
49
|
+
return;
|
|
50
|
+
}
|
|
51
|
+
}).forEach((p) => {
|
|
52
|
+
if (!p)
|
|
53
|
+
return;
|
|
54
|
+
const { element: e, minHeight: r } = p, s = r && r > 0 ? `${r}px` : "";
|
|
55
|
+
if (e.style.minHeight !== s) {
|
|
56
|
+
B(e, { height: r != null ? r : 0 }, !0);
|
|
57
|
+
const a = e.closest(".k-scheduler-layout");
|
|
58
|
+
a && d.add(a);
|
|
59
|
+
}
|
|
60
|
+
}), d.forEach(D);
|
|
61
|
+
}));
|
|
62
|
+
}, K = (t) => {
|
|
63
|
+
E.delete(t), E.size === 0 && x !== void 0 && (window.cancelAnimationFrame(x), x = void 0);
|
|
64
|
+
}, W = (t, o, d, m) => {
|
|
65
|
+
const p = j(), e = !!o, r = typeof o == "object" && o.offsetTop ? o.offsetTop : 0, s = typeof o == "object" && o.offsetBottom ? o.offsetBottom : 0, a = m != null ? m : t.current && t.current.props.items, f = a ? JSON.stringify(
|
|
66
|
+
a.map((c) => {
|
|
67
|
+
var l, i;
|
|
68
|
+
return [c.uid, c.isRecurring && (i = (l = c.originalStart) == null ? void 0 : l.getTime()) != null ? i : null];
|
|
69
|
+
})
|
|
70
|
+
) : "", z = d ? `${d.padding}|${d.paddingTop}|${d.paddingBottom}` : "", y = w.useCallback(() => {
|
|
71
|
+
if (!e || !t.current)
|
|
72
|
+
return;
|
|
73
|
+
const c = t.current.element, l = t.current.props;
|
|
74
|
+
if (!c)
|
|
75
|
+
return;
|
|
76
|
+
const i = O(c), n = /* @__PURE__ */ new Map();
|
|
77
|
+
let b = !1;
|
|
78
|
+
const h = l.items.filter((u) => u._ref.current);
|
|
79
|
+
h.forEach((u) => {
|
|
80
|
+
var R, S, $, k, M;
|
|
81
|
+
if (!u._ref.current)
|
|
25
82
|
return;
|
|
26
|
-
const { height:
|
|
27
|
-
(
|
|
83
|
+
const { height: H } = q(u._ref.current.element), _ = ($ = (S = (R = u._ref.current) == null ? void 0 : R._order) != null ? S : u.order) != null ? $ : -1;
|
|
84
|
+
(k = u._ref.current.element) != null && k.style.top && (b = !0), ((M = n.get(_)) != null ? M : 0) < H && n.set(_, H);
|
|
28
85
|
});
|
|
29
|
-
let
|
|
30
|
-
if (!
|
|
31
|
-
|
|
86
|
+
let g;
|
|
87
|
+
if (!b || n.size === 0)
|
|
88
|
+
return { element: c, minHeight: null };
|
|
89
|
+
const A = Math.max(...Array.from(n.keys())), C = A + 1, F = Math.max(...Array.from(n.values()));
|
|
90
|
+
g = 0;
|
|
91
|
+
for (let u = 0; u <= A; u++)
|
|
92
|
+
g += n.has(u) ? n.get(u) : F;
|
|
93
|
+
const P = C * T * 2 + g - i + r + s;
|
|
94
|
+
return { element: c, minHeight: h.length ? P : null };
|
|
95
|
+
}, [e, s, r, t]), v = w.useCallback(() => {
|
|
96
|
+
I(y);
|
|
97
|
+
}, [y]);
|
|
98
|
+
w.useEffect(() => {
|
|
99
|
+
var c;
|
|
100
|
+
if (!e) {
|
|
101
|
+
const l = t.current;
|
|
102
|
+
if (l != null && l.element) {
|
|
103
|
+
const i = (c = l.props.style) == null ? void 0 : c.minHeight;
|
|
104
|
+
l.element.style.minHeight = typeof i == "number" ? `${i}px` : i != null ? i : "";
|
|
105
|
+
}
|
|
32
106
|
return;
|
|
33
|
-
} else {
|
|
34
|
-
const t = Math.max(...Array.from(e.keys()));
|
|
35
|
-
v = t + 1;
|
|
36
|
-
const a = Math.max(...Array.from(e.values()));
|
|
37
|
-
u = 0;
|
|
38
|
-
for (let c = 0; c <= t; c++)
|
|
39
|
-
u += e.has(c) ? e.get(c) : a;
|
|
40
107
|
}
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
const O = v * A * 2 + u - d + E + _;
|
|
45
|
-
s.length ? z(o, { height: O }, !0) : o && (o.style.minHeight = "");
|
|
46
|
-
}, [n, r]), l = f.useCallback(() => {
|
|
47
|
-
m.current !== void 0 && window.cancelAnimationFrame(m.current), m.current = window.requestAnimationFrame(() => {
|
|
48
|
-
p();
|
|
49
|
-
});
|
|
50
|
-
}, [p]);
|
|
51
|
-
f.useEffect(p, [r, r.current && r.current.props, n]), f.useEffect(() => {
|
|
52
|
-
if (!r.current)
|
|
108
|
+
return I(y), () => K(y);
|
|
109
|
+
}, [y, e, t, f, z]), w.useEffect(() => {
|
|
110
|
+
if (!e || !t.current)
|
|
53
111
|
return;
|
|
54
|
-
const
|
|
55
|
-
if (!
|
|
112
|
+
const i = t.current.props.items.filter((n) => n._ref.current).map((n) => {
|
|
113
|
+
if (!n._ref.current || !n._ref.current.element || !p.current)
|
|
56
114
|
return;
|
|
57
|
-
const
|
|
58
|
-
|
|
59
|
-
const
|
|
60
|
-
return
|
|
61
|
-
|
|
115
|
+
const b = window.ResizeObserver, h = b && new b(v);
|
|
116
|
+
h && h.observe(n._ref.current.element);
|
|
117
|
+
const g = new MutationObserver(v);
|
|
118
|
+
return g.observe(n._ref.current.element, { attributes: !0, attributeFilter: ["style"] }), () => {
|
|
119
|
+
h && h.disconnect(), g.disconnect();
|
|
62
120
|
};
|
|
63
121
|
});
|
|
64
122
|
return () => {
|
|
65
|
-
|
|
123
|
+
i.forEach((n) => n && n());
|
|
66
124
|
};
|
|
67
|
-
}, [
|
|
125
|
+
}, [e, v, p, t, f]);
|
|
68
126
|
};
|
|
69
127
|
export {
|
|
70
|
-
|
|
128
|
+
W as useSlotExpand
|
|
71
129
|
};
|