@progress/kendo-react-scheduler 16.1.0-develop.17 → 16.1.0-develop.19

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.
@@ -6,164 +6,204 @@
6
6
  *-------------------------------------------------------------------------------------------
7
7
  */
8
8
  import * as e from "react";
9
- import j from "prop-types";
10
- import { BaseView as q } from "../../components/BaseView.mjs";
11
- import { ZonedDate as v, firstDayInWeek as A, firstDayOfMonth as J, getDate as N, addDays as Q, lastDayOfMonth as X, MS_PER_DAY as V } from "@progress/kendo-date-math";
12
- import { classNames as _ } from "@progress/kendo-react-common";
9
+ import oe from "prop-types";
10
+ import { BaseView as re } from "../../components/BaseView.mjs";
11
+ import { ZonedDate as b, firstDayInWeek as $, firstDayOfMonth as ae, getDate as G, addDays as ne, lastDayOfMonth as se, MS_PER_DAY as B } from "@progress/kendo-date-math";
12
+ import { classNames as R } from "@progress/kendo-react-common";
13
13
  import { VerticalResourceIterator as I } from "../common/VerticalResourceIterator.mjs";
14
- import { HorizontalResourceIterator as O } from "../common/HorizontalResourceIterator.mjs";
15
- import { useGroupRowHeightSync as ee } from "../../hooks/useGroupRowHeightSync.mjs";
16
- import { mapItemsToSlots as te, mapSlotsToItems as oe, orderSort as re, toUTCDateTime as H } from "../../utils/index.mjs";
17
- import { monthViewTitle as $, messages as ne } from "../../messages/index.mjs";
18
- import { SchedulerEditSlot as ae } from "../../slots/SchedulerEditSlot.mjs";
19
- import { useInternationalization as se } from "@progress/kendo-react-intl";
20
- import { DAY_SLOT_HEADER_HEIGHT as Y, DAYS_IN_WEEK_COUNT as U } from "../../constants/index.mjs";
21
- import { toRanges as le } from "../../services/rangeService.mjs";
22
- import { toSlots as me } from "../../services/slotsService.mjs";
23
- import { toOccurrences as ie } from "../../services/occurrenceService.mjs";
24
- import { toItems as ce } from "../../services/itemsService.mjs";
25
- import { ShowMoreItemsButton as de } from "../../components/ShowMoreItemsButton.mjs";
26
- import { MoreEventsPopover as ue } from "../../components/MoreEventsPopover.mjs";
27
- import { SchedulerEditItem as he } from "../../items/SchedulerEditItem.mjs";
28
- import { useSchedulerPropsContext as fe, useSchedulerDataContext as Se, useSchedulerDateContext as De, useSchedulerActiveViewContext as ge, useSchedulerViewsContext as pe, useSchedulerGroupsContext as Ee, useSchedulerOrientationContext as we, useSchedulerDateRangeContext as ye, useSchedulerFieldsContext as Ce } from "../../context/SchedulerContext.mjs";
29
- import { SchedulerResourceIteratorContext as F } from "../../context/SchedulerResourceIteratorContext.mjs";
30
- import { DateHeaderCell as Te } from "../../components/DateHeaderCell.mjs";
31
- const ke = { skeleton: "dd" }, B = (o) => {
32
- const { group: i, timezone: n, resources: d } = fe(), E = o.editItem || he, g = o.editSlot || ae, [u] = Se(), [w, p] = De(), [, y] = ge(), R = pe(), f = Ee(), S = we(), s = ye(), G = se(), M = Ce(), b = e.useRef(null), D = o.itemsPerSlot || Re.itemsPerSlot, m = e.useMemo(
33
- () => le(s, { step: V * U, timezone: n }),
34
- [s.start.getTime(), s.end.getTime(), n]
35
- ), c = e.useMemo(
36
- () => me(s, { step: V }, { groups: f, ranges: m }),
37
- [s.start.getTime(), s.end.getTime(), f, m]
38
- ), z = e.useMemo(
39
- () => ie(u, { dateRange: s, fields: M, timezone: n }),
40
- [u, s.start.getTime(), s.end.getTime(), M, n]
41
- ), h = e.useMemo(
42
- () => ce(z, { timezone: n }, { groups: f, ranges: m }),
43
- [z, n, f, m]
44
- ), [C, T] = e.useState({ show: !1, anchor: null, slot: null }), L = e.useCallback((t) => {
45
- T({
14
+ import { HorizontalResourceIterator as U } from "../common/HorizontalResourceIterator.mjs";
15
+ import { mapItemsToSlots as le, mapSlotsToItems as me, orderSort as ce, toUTCDateTime as Y } from "../../utils/index.mjs";
16
+ import { monthViewTitle as F, messages as ie } from "../../messages/index.mjs";
17
+ import { SchedulerEditSlot as de } from "../../slots/SchedulerEditSlot.mjs";
18
+ import { useInternationalization as ue } from "@progress/kendo-react-intl";
19
+ import { MORE_BUTTON_HEIGHT as L, DAY_SLOT_HEADER_HEIGHT as N, DAYS_IN_WEEK_COUNT as Z } from "../../constants/index.mjs";
20
+ import { toGroupResources as he, expandResources as fe } from "../common/utils.mjs";
21
+ import { toRanges as ge } from "../../services/rangeService.mjs";
22
+ import { toSlots as Se } from "../../services/slotsService.mjs";
23
+ import { toOccurrences as De } from "../../services/occurrenceService.mjs";
24
+ import { toItems as Ee } from "../../services/itemsService.mjs";
25
+ import { ShowMoreItemsButton as K } from "../../components/ShowMoreItemsButton.mjs";
26
+ import { MoreEventsPopover as ke } from "../../components/MoreEventsPopover.mjs";
27
+ import { SchedulerEditItem as pe } from "../../items/SchedulerEditItem.mjs";
28
+ import { useSchedulerPropsContext as we, useSchedulerDataContext as ye, useSchedulerDateContext as Ce, useSchedulerActiveViewContext as Te, useSchedulerViewsContext as ve, useSchedulerGroupsContext as Me, useSchedulerOrientationContext as Re, useSchedulerDateRangeContext as Ne, useSchedulerFieldsContext as ze } from "../../context/SchedulerContext.mjs";
29
+ import { SchedulerResourceIteratorContext as z } from "../../context/SchedulerResourceIteratorContext.mjs";
30
+ import { DateHeaderCell as be } from "../../components/DateHeaderCell.mjs";
31
+ const W = { skeleton: "dd" }, j = (t) => {
32
+ const { group: m, timezone: l, resources: i } = we(), C = t.editItem || pe, g = t.editSlot || de, [S] = ye(), [E, k] = Ce(), [, T] = Te(), A = ve(), p = Me(), D = Re(), c = Ne(), P = ue(), _ = ze(), q = e.useRef(null), h = t.itemsPerSlot || Pe.itemsPerSlot, d = e.useMemo(
33
+ () => ge(c, { step: B * Z, timezone: l }),
34
+ [c.start.getTime(), c.end.getTime(), l]
35
+ ), u = e.useMemo(
36
+ () => Se(c, { step: B }, { groups: p, ranges: d }),
37
+ [c.start.getTime(), c.end.getTime(), p, d]
38
+ ), x = e.useMemo(
39
+ () => De(S, { dateRange: c, fields: _, timezone: l }),
40
+ [S, c.start.getTime(), c.end.getTime(), _, l]
41
+ ), f = e.useMemo(
42
+ () => Ee(x, { timezone: l }, { groups: p, ranges: d }),
43
+ [x, l, p, d]
44
+ ), [v, M] = e.useState({ show: !1, anchor: null, slot: null }), O = e.useCallback((o) => {
45
+ M({
46
46
  show: !0,
47
- anchor: t.target.element,
48
- slot: t.target.slot || null
47
+ anchor: o.target.element,
48
+ slot: o.target.slot || null
49
49
  });
50
- }, []), K = e.useCallback(() => {
51
- T({ show: !1, anchor: null, slot: null });
52
- }, []), W = e.useCallback(
53
- (t) => {
54
- const r = R.find((l) => l.props.name === "day");
55
- !y || !r || !r.props.name || (y(r.props.name), p(t.start), T({ show: !1, anchor: null, slot: null }));
50
+ }, []), J = e.useCallback(() => {
51
+ M({ show: !1, anchor: null, slot: null });
52
+ }, []), Q = e.useCallback(
53
+ (o) => {
54
+ const r = A.find((s) => s.props.name === "day");
55
+ !T || !r || !r.props.name || (T(r.props.name), k(o.start), M({ show: !1, anchor: null, slot: null }));
56
56
  },
57
- [y, p, R]
57
+ [T, k, A]
58
58
  );
59
- e.useMemo(() => te(h, c, !0), [h, c]), e.useMemo(() => oe(h, c, !0), [h, c]), ee(b, [u, m, f, S]);
60
- const P = /* @__PURE__ */ e.createElement(F.Consumer, null, ({ groupIndex: t }) => /* @__PURE__ */ e.createElement("div", { className: "k-scheduler-row", key: t }, c.filter((r) => r.group.index === t && r.range.index === 0).map((r, l) => /* @__PURE__ */ e.createElement(
61
- Te,
59
+ e.useMemo(() => le(f, u, !0), [f, u]), e.useMemo(() => me(f, u, !0), [f, u]);
60
+ const w = e.useMemo(() => he(m, i), [m, i]), X = e.useMemo(
61
+ () => fe(w, w.length - 1),
62
+ [w]
63
+ ), ee = w.length > 0, V = /* @__PURE__ */ e.createElement(z.Consumer, null, ({ groupIndex: o }) => /* @__PURE__ */ e.createElement("div", { className: "k-scheduler-row", key: o }, u.filter((r) => r.group.index === o && r.range.index === 0).map((r, s) => /* @__PURE__ */ e.createElement(
64
+ be,
62
65
  {
63
- as: o.dateHeaderCell,
64
- key: l,
65
- "data-dayslot-index": l,
66
- date: v.fromLocalDate(
66
+ as: t.dateHeaderCell,
67
+ key: s,
68
+ "data-dayslot-index": s,
69
+ date: b.fromLocalDate(
67
70
  new Date(
68
71
  r.zonedEnd.getTime() - (r.zonedEnd.getTime() - r.zonedStart.getTime()) / 2
69
72
  ),
70
- n
73
+ l
71
74
  ),
72
75
  start: r.start,
73
76
  end: r.end,
74
77
  format: { skeleton: "EEEE" }
75
78
  }
76
- )))), x = /* @__PURE__ */ e.createElement(F.Consumer, null, ({ groupIndex: t }) => m.map((r, l) => /* @__PURE__ */ e.createElement("div", { className: "k-scheduler-row", key: l }, c.filter((a) => a.group.index === t && a.range.index === l).map((a, k, Z) => /* @__PURE__ */ e.createElement(
79
+ )))), H = /* @__PURE__ */ e.createElement(z.Consumer, null, ({ groupIndex: o }) => d.map((r, s) => /* @__PURE__ */ e.createElement("div", { className: "k-scheduler-row", key: s }, u.filter((a) => a.group.index === o && a.range.index === s).map((a, n, y) => /* @__PURE__ */ e.createElement(
77
80
  g,
78
81
  {
79
- slot: o.slot,
80
- viewSlot: o.viewSlot,
81
- key: k,
82
- form: o.form,
82
+ slot: t.slot,
83
+ viewSlot: t.viewSlot,
84
+ key: n,
85
+ form: t.form,
83
86
  ...a,
84
87
  expandable: {
85
- offsetTop: Y,
86
- offsetBottom: D < a.items.length ? 15 : 0
88
+ offsetTop: N,
89
+ offsetBottom: L
87
90
  },
88
- onDataAction: o.onDataAction,
89
- col: S === "horizontal" ? Z.length * (t || 0) + k : k,
90
- row: S === "horizontal" ? l : m.length * (t || 0) + l,
91
- editable: o.editable,
92
- className: _({
93
- "k-other-month": a.zonedStart.getMonth() !== w.getMonth()
91
+ onDataAction: t.onDataAction,
92
+ col: D === "horizontal" ? y.length * (o || 0) + n : n,
93
+ row: D === "horizontal" ? s : d.length * (o || 0) + s,
94
+ editable: t.editable,
95
+ className: R({
96
+ "k-other-month": a.zonedStart.getMonth() !== E.getMonth()
94
97
  })
95
98
  },
96
- /* @__PURE__ */ e.createElement("span", { className: "k-link k-nav-day" }, G.formatDate(a.zonedStart, ke)),
97
- D < a.items.length && /* @__PURE__ */ e.createElement(
98
- de,
99
+ /* @__PURE__ */ e.createElement("span", { className: "k-link k-nav-day" }, P.formatDate(a.zonedStart, W)),
100
+ h < a.items.length && /* @__PURE__ */ e.createElement(
101
+ K,
99
102
  {
100
103
  slot: a,
101
- hiddenCount: a.items.length - D,
102
- onClick: L
104
+ hiddenCount: a.items.length - h,
105
+ onClick: O
103
106
  }
104
107
  )
105
108
  )))));
106
109
  return /* @__PURE__ */ e.createElement(
107
- q,
110
+ re,
108
111
  {
109
- props: o,
110
- slots: c,
111
- ranges: m,
112
- className: _("k-scheduler-monthview", o.className)
112
+ props: t,
113
+ slots: u,
114
+ ranges: d,
115
+ className: R("k-scheduler-monthview", t.className)
113
116
  },
114
- /* @__PURE__ */ e.createElement("div", { className: "k-scheduler-head" }, S === "horizontal" ? /* @__PURE__ */ e.createElement(O, { nested: !0, resources: d, group: i }, P) : /* @__PURE__ */ e.createElement(I, { resources: d, group: i }, P)),
115
- /* @__PURE__ */ e.createElement("div", { className: "k-scheduler-body", ref: b }, S === "horizontal" ? /* @__PURE__ */ e.createElement(O, { resources: d, group: i }, x) : /* @__PURE__ */ e.createElement(I, { nested: !0, resources: d, group: i }, x), h.filter((t) => t.order === null || t.order < D).sort(re).map((t) => /* @__PURE__ */ e.createElement(
116
- E,
117
+ /* @__PURE__ */ e.createElement("div", { className: "k-scheduler-head" }, D === "horizontal" ? /* @__PURE__ */ e.createElement(U, { nested: !0, resources: i, group: m }, V) : /* @__PURE__ */ e.createElement(I, { resources: i, group: m }, V)),
118
+ /* @__PURE__ */ e.createElement("div", { className: "k-scheduler-body", ref: q }, D === "horizontal" && ee ? d.map((o, r) => /* @__PURE__ */ e.createElement("div", { className: "k-scheduler-group k-group-horizontal", key: r }, /* @__PURE__ */ e.createElement("div", { className: "k-scheduler-row" }, X.map((s, a) => /* @__PURE__ */ e.createElement("div", { key: a, className: "k-scheduler-cell k-group-cell" }, /* @__PURE__ */ e.createElement(
119
+ z.Provider,
117
120
  {
118
- item: o.item,
119
- viewItem: o.viewItem,
120
- form: o.form,
121
- key: t.isRecurring ? `${t.uid}:${t.group.index}:${t.range.index}:${t.originalStart}` : `${t.uid}:${t.group.index}:${t.range.index}`,
122
- ...t,
123
- onDataAction: o.onDataAction,
124
- slotHeaderOffset: Y,
121
+ value: { resource: s, groupIndex: a }
122
+ },
123
+ /* @__PURE__ */ e.createElement("div", { className: "k-scheduler-row" }, u.filter(
124
+ (n) => n.group.index === a && n.range.index === r
125
+ ).map((n, y, te) => /* @__PURE__ */ e.createElement(
126
+ g,
127
+ {
128
+ slot: t.slot,
129
+ viewSlot: t.viewSlot,
130
+ key: y,
131
+ form: t.form,
132
+ ...n,
133
+ expandable: {
134
+ offsetTop: N,
135
+ offsetBottom: L
136
+ },
137
+ onDataAction: t.onDataAction,
138
+ col: te.length * a + y,
139
+ row: r,
140
+ editable: t.editable,
141
+ className: R({
142
+ "k-other-month": n.zonedStart.getMonth() !== E.getMonth()
143
+ })
144
+ },
145
+ /* @__PURE__ */ e.createElement("span", { className: "k-link k-nav-day" }, P.formatDate(n.zonedStart, W)),
146
+ h < n.items.length && /* @__PURE__ */ e.createElement(
147
+ K,
148
+ {
149
+ slot: n,
150
+ hiddenCount: n.items.length - h,
151
+ onClick: O
152
+ }
153
+ )
154
+ )))
155
+ )))))) : D === "horizontal" ? /* @__PURE__ */ e.createElement(U, { resources: i, group: m }, H) : /* @__PURE__ */ e.createElement(I, { nested: !0, resources: i, group: m }, H), f.filter((o) => o.order === null || o.order < h).sort(ce).map((o) => /* @__PURE__ */ e.createElement(
156
+ C,
157
+ {
158
+ item: t.item,
159
+ viewItem: t.viewItem,
160
+ form: t.form,
161
+ key: o.isRecurring ? `${o.uid}:${o.group.index}:${o.range.index}:${o.originalStart}` : `${o.uid}:${o.group.index}:${o.range.index}`,
162
+ ...o,
163
+ onDataAction: t.onDataAction,
164
+ slotHeaderOffset: N,
125
165
  vertical: !1,
126
- editable: o.editable,
166
+ editable: t.editable,
127
167
  ignoreIsAllDay: !0
128
168
  }
129
169
  ))),
130
170
  /* @__PURE__ */ e.createElement(
131
- ue,
171
+ ke,
132
172
  {
133
- show: C.show,
134
- anchor: C.anchor,
135
- slot: C.slot,
136
- items: h,
137
- itemsPerSlot: D,
138
- onDayClick: W,
139
- onClose: K
173
+ show: v.show,
174
+ anchor: v.anchor,
175
+ slot: v.slot,
176
+ items: f,
177
+ itemsPerSlot: h,
178
+ onDayClick: Q,
179
+ onClose: J
140
180
  }
141
181
  )
142
182
  );
143
- }, ve = ({ intl: o, date: i, timezone: n }) => {
144
- const d = A(J(N(i)), o.firstDay()), E = Q(A(X(N(i)), o.firstDay()), U), g = v.fromUTCDate(H(d), n), u = v.fromUTCDate(H(E), n), w = new Date(g.getTime()), p = new Date(u.getTime());
183
+ }, Ae = ({ intl: t, date: m, timezone: l }) => {
184
+ const i = $(ae(G(m)), t.firstDay()), C = ne($(se(G(m)), t.firstDay()), Z), g = b.fromUTCDate(Y(i), l), S = b.fromUTCDate(Y(C), l), E = new Date(g.getTime()), k = new Date(S.getTime());
145
185
  return {
146
- start: w,
147
- end: p,
186
+ start: E,
187
+ end: k,
148
188
  zonedStart: g,
149
- zonedEnd: u
189
+ zonedEnd: S
150
190
  };
151
- }, Re = {
191
+ }, Pe = {
152
192
  name: "month",
153
- dateRange: ve,
193
+ dateRange: Ae,
154
194
  slotDuration: 1440,
155
195
  slotDivision: 1,
156
196
  itemsPerSlot: 2,
157
197
  numberOfDays: 31,
158
- title: (o) => o.toLanguageString($, ne[$]),
198
+ title: (t) => t.toLanguageString(F, ie[F]),
159
199
  selectedDateFormat: "{0:Y}",
160
200
  selectedShortDateFormat: "{0:y}"
161
- }, Me = {
162
- itemsPerSlot: j.number
201
+ }, _e = {
202
+ itemsPerSlot: oe.number
163
203
  };
164
- B.propTypes = Me;
165
- B.displayName = "KendoReactSchedulerMonthView";
204
+ j.propTypes = _e;
205
+ j.displayName = "KendoReactSchedulerMonthView";
166
206
  export {
167
- B as MonthView,
168
- Re as monthViewDefaultProps
207
+ j as MonthView,
208
+ Pe as monthViewDefaultProps
169
209
  };
@@ -1,8 +0,0 @@
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 v=require("react"),O=require("@progress/kendo-react-common");function H(r){const l=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(r){for(const n in r)if(n!=="default"){const o=Object.getOwnPropertyDescriptor(r,n);Object.defineProperty(l,n,o.get?o:{enumerable:!0,get:()=>r[n]})}}return l.default=r,Object.freeze(l)}const c=H(v),R=(r,l)=>{const n=c.useRef(0),o=c.useRef(null),[,y]=c.useReducer(e=>e+1,0),m=c.useCallback(()=>{const e=o.current,t=r.current;e&&t&&e.observe(t,{attributes:!0,attributeFilter:["style"],subtree:!0})},[r]),d=c.useCallback(()=>{const e=r.current;if(!e)return null;const t=e.querySelectorAll(":scope > .k-scheduler-group > .k-scheduler-row > .k-group-cell");return t.length<2?null:Array.from(t).map(u=>Array.from(u.querySelectorAll(":scope > .k-scheduler-row")))},[r]),k=c.useCallback(e=>{var p,a,w;(p=o.current)==null||p.disconnect();let t=!1;const u=(w=(a=e[0])==null?void 0:a.length)!=null?w:0;for(let i=0;i<u;i++){for(const f of e){const s=f[i];if(!s)continue;s.querySelectorAll(":scope > .k-slot-cell").forEach(b=>{b.style.removeProperty("height")})}let g=0;for(const f of e){const s=f[i];s&&(g=Math.max(g,s.offsetHeight))}for(const f of e){const s=f[i];if(!s)continue;s.querySelectorAll(":scope > .k-slot-cell").forEach(b=>{b.offsetHeight!==g&&(t=!0),b.style.height=`${g}px`})}}return m(),t},[m]),h=c.useCallback(()=>{const e=d();e&&k(e)&&y()},[d,k,y]);O.useIsomorphicLayoutEffect(h,l);const C=c.useCallback(()=>{clearTimeout(n.current),n.current=window.setTimeout(h,50)},[h]);c.useEffect(()=>{const e=r.current;if(!e)return;o.current&&o.current.disconnect();const t=new MutationObserver(u=>{u.some(a=>a.target instanceof HTMLElement&&a.target.classList.contains("k-slot-cell"))&&C()});return o.current=t,t.observe(e,{attributes:!0,attributeFilter:["style"],subtree:!0}),C(),()=>{clearTimeout(n.current),t.disconnect(),o.current=null}},l)};exports.useGroupRowHeightSync=R;
@@ -1,84 +0,0 @@
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 r from "react";
9
- import { useIsomorphicLayoutEffect as S } from "@progress/kendo-react-common";
10
- const A = (c, b) => {
11
- const h = r.useRef(0), s = r.useRef(null), [, m] = r.useReducer((e) => e + 1, 0), y = r.useCallback(() => {
12
- const e = s.current, t = c.current;
13
- e && t && e.observe(t, {
14
- attributes: !0,
15
- attributeFilter: ["style"],
16
- subtree: !0
17
- });
18
- }, [c]), C = r.useCallback(() => {
19
- const e = c.current;
20
- if (!e)
21
- return null;
22
- const t = e.querySelectorAll(":scope > .k-scheduler-group > .k-scheduler-row > .k-group-cell");
23
- return t.length < 2 ? null : Array.from(t).map(
24
- (n) => Array.from(n.querySelectorAll(":scope > .k-scheduler-row"))
25
- );
26
- }, [c]), k = r.useCallback((e) => {
27
- var p, l, w;
28
- (p = s.current) == null || p.disconnect();
29
- let t = !1;
30
- const n = (w = (l = e[0]) == null ? void 0 : l.length) != null ? w : 0;
31
- for (let u = 0; u < n; u++) {
32
- for (const a of e) {
33
- const o = a[u];
34
- if (!o)
35
- continue;
36
- o.querySelectorAll(":scope > .k-slot-cell").forEach((f) => {
37
- f.style.removeProperty("height");
38
- });
39
- }
40
- let i = 0;
41
- for (const a of e) {
42
- const o = a[u];
43
- o && (i = Math.max(i, o.offsetHeight));
44
- }
45
- for (const a of e) {
46
- const o = a[u];
47
- if (!o)
48
- continue;
49
- o.querySelectorAll(":scope > .k-slot-cell").forEach((f) => {
50
- f.offsetHeight !== i && (t = !0), f.style.height = `${i}px`;
51
- });
52
- }
53
- }
54
- return y(), t;
55
- }, [y]), g = r.useCallback(() => {
56
- const e = C();
57
- e && k(e) && m();
58
- }, [C, k, m]);
59
- S(g, b);
60
- const d = r.useCallback(() => {
61
- clearTimeout(h.current), h.current = window.setTimeout(g, 50);
62
- }, [g]);
63
- r.useEffect(() => {
64
- const e = c.current;
65
- if (!e)
66
- return;
67
- s.current && s.current.disconnect();
68
- const t = new MutationObserver((n) => {
69
- n.some(
70
- (l) => l.target instanceof HTMLElement && l.target.classList.contains("k-slot-cell")
71
- ) && d();
72
- });
73
- return s.current = t, t.observe(e, {
74
- attributes: !0,
75
- attributeFilter: ["style"],
76
- subtree: !0
77
- }), d(), () => {
78
- clearTimeout(h.current), t.disconnect(), s.current = null;
79
- };
80
- }, b);
81
- };
82
- export {
83
- A as useGroupRowHeightSync
84
- };