@progress/kendo-react-layout 16.2.0-develop.17 → 16.2.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.
- package/EULA.pdf +0 -0
- package/EULA.rtf +2730 -0
- package/EULA.txt +292 -0
- package/dist/cdn/js/kendo-react-layout.js +1 -1
- package/menu/components/Menu.js +1 -1
- package/menu/components/Menu.mjs +107 -100
- package/menu/components/MenuItemLink.js +1 -1
- package/menu/components/MenuItemLink.mjs +4 -4
- package/package-metadata.js +1 -1
- package/package-metadata.mjs +2 -2
- package/package.json +8 -13
- package/timeline/TimelineCard.js +1 -1
- package/timeline/TimelineCard.mjs +11 -11
package/menu/components/Menu.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 ee=require("react"),i=require("prop-types"),k=require("@progress/kendo-react-common"),t=require("../utils/itemsIdsUtils.js"),te=require("../utils/prepareInputItemsForInternalWork.js"),B=require("../utils/getNewItemIdUponKeyboardNavigation.js"),K=require("../utils/hoverDelay.js"),re=require("./MenuItemInternal.js"),ne=require("../utils/DirectionHolder.js"),oe=require("../utils/MouseOverHandler.js");function ce(o){const E=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(o){for(const I in o)if(I!=="default"){const b=Object.getOwnPropertyDescriptor(o,I);Object.defineProperty(E,I,b.get?b:{enumerable:!0,get:()=>o[I]})}}return E.default=o,Object.freeze(E)}const n=ce(ee),U={focusedItemId:t.EMPTY_ID,hoveredItemId:t.EMPTY_ID,tabbableItemId:t.ZERO_LEVEL_ZERO_ITEM_ID},S=n.forwardRef((o,E)=>{const I=n.useRef(null),b=n.useRef(null),M=n.useRef(null),D=n.useRef(new ne.DirectionHolder),h=n.useRef([]),N=n.useRef([]),l=n.useRef(o);l.current=o;const[v,P]=n.useState({...U}),C=n.useRef(v);C.current=v;const w=n.useRef(()=>{}),T=n.useRef(new oe.MouseOverHandler(o.openOnClick,()=>w.current())),{items:j,inputItems:F}=te.prepareInputItemsForInternalWork(o.items,o.children);h.current=j,N.current=F,D.current.setIsDirectionRightToLeft(V());function V(){return!!(l.current.dir!==void 0?l.current.dir==="rtl":I.current&&getComputedStyle(I.current).direction==="rtl")}const g=n.useCallback(()=>{b.current&&(clearTimeout(b.current),b.current=null),M.current&&(clearTimeout(M.current),M.current=null)},[]),H=n.useCallback(()=>{g(),P({...U})},[g]);w.current=H;const O=n.useRef({get element(){return I.current},reset:()=>w.current()});n.useImperativeHandle(E,()=>O.current,[]);const m=n.useCallback(e=>{P(r=>{const c=e===t.EMPTY_ID?r.tabbableItemId:t.getRootParentId(e);return{hoveredItemId:e===t.EMPTY_ID||t.isIdEmptyOrZeroLevel(r.hoveredItemId)&&t.isIdEmptyOrZeroLevel(e)?r.hoveredItemId:t.EMPTY_ID,focusedItemId:e,tabbableItemId:c}})},[]),a=n.useCallback(e=>{P(r=>t.isIdEmptyOrZeroLevel(e)&&t.isIdEmptyOrZeroLevel(r.focusedItemId)?{hoveredItemId:e,focusedItemId:r.focusedItemId,tabbableItemId:r.tabbableItemId}:{hoveredItemId:e,focusedItemId:t.EMPTY_ID,tabbableItemId:t.ZERO_LEVEL_ZERO_ITEM_ID})},[]),f=n.useCallback(e=>t.getItemById(e,N.current),[]),_=n.useCallback((e,r)=>{k.dispatchEvent(l.current.onSelect,e,O.current,{item:f(r),itemId:r})},[f]),L=n.useCallback(e=>!l.current.customCloseItemIds||l.current.customCloseItemIds.indexOf(e)===-1,[]),Y=n.useCallback(e=>{var s,u;const r=l.current,c=C.current;if(r.openOnClick&&c.hoveredItemId!==t.EMPTY_ID){const d=e.target;((s=I.current)==null?void 0:s.contains(d))===!1&&(r.id&&((u=d.closest)!=null&&u.call(d,`[id^="${r.id}_"]`))||a(t.EMPTY_ID))}},[a]),W=n.useCallback(e=>{const r=C.current,c=l.current,s=h.current;if(r.focusedItemId!==t.EMPTY_ID){const u=t.getItemById(r.focusedItemId,s);let d=B.getNewItemIdUponKeyboardNavigation(s,u.id,e.keyCode,e.key,c.vertical,D.current.getIsDirectionRightToLeft());const y=t.getItemById(d,s);if(y!=null&&y.separator&&(d=B.getNewItemIdUponKeyboardNavigation(s,d,e.keyCode,e.key,c.vertical,D.current.getIsDirectionRightToLeft())),u.id!==d&&(e.preventDefault(),m(d)),(e.keyCode===k.Keys.enter||e.keyCode===k.Keys.space)&&!u.disabled&&(T.current.handleItemSelectedViaKeyboard(),_(e,u.id),!e.isDefaultPrevented()&&u.items.length===0&&u.url)){const R=k.sanitizeUrl(u.url);R&&window.location.assign(R)}if(e.keyCode===k.Keys.esc&&t.isIdZeroLevel(u.id)&&c.onClose){const R=f(u.id);c.onClose({target:O.current,item:R,itemId:u.id})}}},[m,_,f]),z=n.useCallback(e=>{const r=C.current,c=l.current,s=c.openOnClick&&!t.isIdZeroLevel(e)&&r.hoveredItemId!==t.EMPTY_ID;(T.current.IsMouseOverEnabled||s)&&(g(),b.current=window.setTimeout(()=>{a(e),b.current=null},K.getHoverOpenDelay(c)))},[g,a]),A=n.useCallback(e=>{const r=C.current,c=l.current,s=c.openOnClick&&!t.isIdZeroLevel(e)&&r.hoveredItemId!==t.EMPTY_ID;(T.current.IsMouseOverEnabled||s)&&L(e)&&(g(),M.current=window.setTimeout(()=>{a(s?t.getDirectParentId(e):t.EMPTY_ID),M.current=null},K.getHoverCloseDelay(c)))},[g,L,a]),G=n.useCallback(e=>{C.current.hoveredItemId===t.EMPTY_ID?m(e):P(c=>({focusedItemId:e,hoveredItemId:c.hoveredItemId,tabbableItemId:t.getRootParentId(e)}))},[m]),$=n.useCallback((e,r)=>{const c=h.current,s=t.getItemById(r,c),u=C.current,d=l.current;if(!s.disabled){const y=t.isIdZeroLevel(r),R=!s.items||s.items.length===0;if(y?(m(r),R||d.openOnClick&&u.hoveredItemId!==t.EMPTY_ID&&t.getRootParentId(u.hoveredItemId)===r?a(t.EMPTY_ID):a(r)):R&&(m(r),a(t.EMPTY_ID)),_(e,r),!e.isDefaultPrevented()&&s.url){const Z=k.sanitizeUrl(s.url);Z&&window.location.assign(Z)}}},[m,a,_]),x=n.useCallback((e,r)=>{const c=l.current;c.onClose&&c.onClose({target:O.current,item:f(e),itemId:e,popupCloseEvent:r})},[f]),J=n.useCallback((e,r)=>{var s;const c=l.current;if(L(e)&&m(t.EMPTY_ID),((s=r.relatedTarget)==null?void 0:s.nodeName)==="LI"){const u=r.relatedTarget.getAttribute("id");if(u!=null&&u.includes(c.id))return}if(t.isIdZeroLevel(e)&&c.onClose){const u=f(e);c.onClose({target:O.current,item:u,itemId:e})}},[L,m,f]),q=n.useRef(o.vertical);n.useEffect(()=>()=>{g()},[g]),n.useEffect(()=>(o.openOnClick&&document.addEventListener("mousedown",Y),()=>{document.removeEventListener("mousedown",Y)}),[o.openOnClick,Y]),n.useEffect(()=>{const e=!!q.current!=!!o.vertical,r=D.current.hasDirectionChanged();(e||r)&&H(),T.current.OpenOnClick=o.openOnClick,q.current=o.vertical});const Q=()=>k.classNames("k-reset","k-header","k-menu",{"k-menu-horizontal":!o.vertical},{"k-menu-vertical":o.vertical},o.className);let p;v.hoveredItemId?p=v.hoveredItemId:v.focusedItemId?p=t.getDirectParentId(v.focusedItemId):p=t.EMPTY_ID;const X=o.animate!==void 0?o.animate:!0;return n.createElement("div",{id:o.id,onKeyDown:W,style:o.style,className:D.current.getIsDirectionRightToLeft()?"k-rtl":void 0,ref:I},n.createElement(re.MenuItemInternalsList,{className:Q(),"aria-orientation":o.vertical?"vertical":void 0,items:h.current,animate:X,isMenuVertical:o.vertical,isDirectionRightToLeft:D.current.getIsDirectionRightToLeft(),focusedItemId:v.focusedItemId,lastItemIdToBeOpened:p,tabbableItemId:v.tabbableItemId,itemRender:o.itemRender,linkRender:o.linkRender,menuGuid:o.id,onMouseLeave:A,onMouseOver:z,onFocus:G,onClick:$,onBlur:J,onOriginalItemNeeded:f,onPopupClose:x,role:o.role}))});S.propTypes={vertical:i.bool,items:i.arrayOf(i.object),style:i.object,animate:i.oneOfType([i.bool,i.shape({openDuration:i.number,closeDuration:i.number})]),dir:i.string,hoverOpenDelay:i.number,hoverCloseDelay:i.number,openOnClick:i.bool,itemRender:i.any,linkRender:i.any,customCloseItemIds:i.arrayOf(i.string),onSelect:i.func,onClose:i.func,role:i.string};S.displayName="Menu";exports.Menu=S;
|
package/menu/components/Menu.mjs
CHANGED
|
@@ -7,180 +7,187 @@
|
|
|
7
7
|
*/
|
|
8
8
|
import * as r from "react";
|
|
9
9
|
import u from "prop-types";
|
|
10
|
-
import { dispatchEvent as
|
|
11
|
-
import { ZERO_LEVEL_ZERO_ITEM_ID as
|
|
12
|
-
import { prepareInputItemsForInternalWork as
|
|
13
|
-
import { getNewItemIdUponKeyboardNavigation as
|
|
14
|
-
import { getHoverOpenDelay as
|
|
15
|
-
import { MenuItemInternalsList as
|
|
16
|
-
import { DirectionHolder as
|
|
17
|
-
import { MouseOverHandler as
|
|
18
|
-
const
|
|
10
|
+
import { dispatchEvent as se, Keys as B, sanitizeUrl as W, classNames as ue } from "@progress/kendo-react-common";
|
|
11
|
+
import { ZERO_LEVEL_ZERO_ITEM_ID as j, EMPTY_ID as i, getRootParentId as _, isIdEmptyOrZeroLevel as P, getItemById as S, isIdZeroLevel as D, getDirectParentId as Z } from "../utils/itemsIdsUtils.mjs";
|
|
12
|
+
import { prepareInputItemsForInternalWork as ie } from "../utils/prepareInputItemsForInternalWork.mjs";
|
|
13
|
+
import { getNewItemIdUponKeyboardNavigation as q } from "../utils/getNewItemIdUponKeyboardNavigation.mjs";
|
|
14
|
+
import { getHoverOpenDelay as le, getHoverCloseDelay as ae } from "../utils/hoverDelay.mjs";
|
|
15
|
+
import { MenuItemInternalsList as de } from "./MenuItemInternal.mjs";
|
|
16
|
+
import { DirectionHolder as me } from "../utils/DirectionHolder.mjs";
|
|
17
|
+
import { MouseOverHandler as fe } from "../utils/MouseOverHandler.mjs";
|
|
18
|
+
const A = {
|
|
19
19
|
focusedItemId: i,
|
|
20
20
|
hoveredItemId: i,
|
|
21
|
-
tabbableItemId:
|
|
22
|
-
},
|
|
23
|
-
const
|
|
21
|
+
tabbableItemId: j
|
|
22
|
+
}, z = r.forwardRef((o, x) => {
|
|
23
|
+
const g = r.useRef(null), h = r.useRef(null), y = r.useRef(null), v = r.useRef(new me()), L = r.useRef([]), F = r.useRef([]), l = r.useRef(o);
|
|
24
24
|
l.current = o;
|
|
25
|
-
const [
|
|
26
|
-
C.current =
|
|
25
|
+
const [I, p] = r.useState({ ...A }), C = r.useRef(I);
|
|
26
|
+
C.current = I;
|
|
27
27
|
const H = r.useRef(() => {
|
|
28
|
-
}),
|
|
28
|
+
}), T = r.useRef(new fe(o.openOnClick, () => H.current())), { items: G, inputItems: Y } = ie(
|
|
29
29
|
o.items,
|
|
30
30
|
o.children
|
|
31
31
|
);
|
|
32
|
-
|
|
33
|
-
function
|
|
34
|
-
return !!(l.current.dir !== void 0 ? l.current.dir === "rtl" :
|
|
32
|
+
L.current = G, F.current = Y, v.current.setIsDirectionRightToLeft($());
|
|
33
|
+
function $() {
|
|
34
|
+
return !!(l.current.dir !== void 0 ? l.current.dir === "rtl" : g.current && getComputedStyle(g.current).direction === "rtl");
|
|
35
35
|
}
|
|
36
36
|
const b = r.useCallback(() => {
|
|
37
|
-
|
|
37
|
+
h.current && (clearTimeout(h.current), h.current = null), y.current && (clearTimeout(y.current), y.current = null);
|
|
38
38
|
}, []), K = r.useCallback(() => {
|
|
39
|
-
b(),
|
|
39
|
+
b(), p({ ...A });
|
|
40
40
|
}, [b]);
|
|
41
41
|
H.current = K;
|
|
42
|
-
const
|
|
42
|
+
const O = r.useRef({
|
|
43
43
|
get element() {
|
|
44
|
-
return
|
|
44
|
+
return g.current;
|
|
45
45
|
},
|
|
46
46
|
reset: () => H.current()
|
|
47
47
|
});
|
|
48
|
-
r.useImperativeHandle(x, () =>
|
|
48
|
+
r.useImperativeHandle(x, () => O.current, []);
|
|
49
49
|
const m = r.useCallback((e) => {
|
|
50
|
-
|
|
50
|
+
p((t) => {
|
|
51
51
|
const n = e === i ? t.tabbableItemId : _(e);
|
|
52
52
|
return { hoveredItemId: e === i || P(t.hoveredItemId) && P(e) ? t.hoveredItemId : i, focusedItemId: e, tabbableItemId: n };
|
|
53
53
|
});
|
|
54
54
|
}, []), a = r.useCallback((e) => {
|
|
55
|
-
|
|
55
|
+
p((t) => P(e) && P(t.focusedItemId) ? {
|
|
56
56
|
hoveredItemId: e,
|
|
57
57
|
focusedItemId: t.focusedItemId,
|
|
58
58
|
tabbableItemId: t.tabbableItemId
|
|
59
|
-
} : { hoveredItemId: e, focusedItemId: i, tabbableItemId:
|
|
60
|
-
}, []),
|
|
59
|
+
} : { hoveredItemId: e, focusedItemId: i, tabbableItemId: j });
|
|
60
|
+
}, []), f = r.useCallback((e) => S(e, F.current), []), E = r.useCallback(
|
|
61
61
|
(e, t) => {
|
|
62
|
-
|
|
63
|
-
item:
|
|
62
|
+
se(l.current.onSelect, e, O.current, {
|
|
63
|
+
item: f(t),
|
|
64
64
|
itemId: t
|
|
65
65
|
});
|
|
66
66
|
},
|
|
67
|
-
[
|
|
68
|
-
),
|
|
67
|
+
[f]
|
|
68
|
+
), M = r.useCallback((e) => !l.current.customCloseItemIds || l.current.customCloseItemIds.indexOf(e) === -1, []), N = r.useCallback(
|
|
69
69
|
(e) => {
|
|
70
70
|
var c, s;
|
|
71
71
|
const t = l.current, n = C.current;
|
|
72
72
|
if (t.openOnClick && n.hoveredItemId !== i) {
|
|
73
73
|
const d = e.target;
|
|
74
|
-
((c =
|
|
74
|
+
((c = g.current) == null ? void 0 : c.contains(d)) === !1 && (t.id && ((s = d.closest) != null && s.call(d, `[id^="${t.id}_"]`)) || a(i));
|
|
75
75
|
}
|
|
76
76
|
},
|
|
77
77
|
[a]
|
|
78
|
-
),
|
|
78
|
+
), J = r.useCallback(
|
|
79
79
|
(e) => {
|
|
80
|
-
const t = C.current, n = l.current, c =
|
|
80
|
+
const t = C.current, n = l.current, c = L.current;
|
|
81
81
|
if (t.focusedItemId !== i) {
|
|
82
82
|
const s = S(t.focusedItemId, c);
|
|
83
|
-
let d =
|
|
83
|
+
let d = q(
|
|
84
84
|
c,
|
|
85
85
|
s.id,
|
|
86
86
|
e.keyCode,
|
|
87
87
|
e.key,
|
|
88
88
|
n.vertical,
|
|
89
|
-
|
|
89
|
+
v.current.getIsDirectionRightToLeft()
|
|
90
90
|
);
|
|
91
|
-
const
|
|
92
|
-
if (
|
|
91
|
+
const R = S(d, c);
|
|
92
|
+
if (R != null && R.separator && (d = q(
|
|
93
93
|
c,
|
|
94
94
|
d,
|
|
95
95
|
e.keyCode,
|
|
96
96
|
e.key,
|
|
97
97
|
n.vertical,
|
|
98
|
-
|
|
99
|
-
)), s.id !== d && (e.preventDefault(), m(d)), (e.keyCode === B.enter || e.keyCode === B.space) && !s.disabled && (
|
|
100
|
-
const
|
|
98
|
+
v.current.getIsDirectionRightToLeft()
|
|
99
|
+
)), s.id !== d && (e.preventDefault(), m(d)), (e.keyCode === B.enter || e.keyCode === B.space) && !s.disabled && (T.current.handleItemSelectedViaKeyboard(), E(e, s.id), !e.isDefaultPrevented() && s.items.length === 0 && s.url)) {
|
|
100
|
+
const k = W(s.url);
|
|
101
|
+
k && window.location.assign(k);
|
|
102
|
+
}
|
|
103
|
+
if (e.keyCode === B.esc && D(s.id) && n.onClose) {
|
|
104
|
+
const k = f(s.id);
|
|
101
105
|
n.onClose({
|
|
102
|
-
target:
|
|
103
|
-
item:
|
|
106
|
+
target: O.current,
|
|
107
|
+
item: k,
|
|
104
108
|
itemId: s.id
|
|
105
109
|
});
|
|
106
110
|
}
|
|
107
111
|
}
|
|
108
112
|
},
|
|
109
|
-
[m,
|
|
110
|
-
),
|
|
113
|
+
[m, E, f]
|
|
114
|
+
), Q = r.useCallback(
|
|
111
115
|
(e) => {
|
|
112
|
-
const t = C.current, n = l.current, c = n.openOnClick && !
|
|
113
|
-
(
|
|
114
|
-
a(e),
|
|
115
|
-
},
|
|
116
|
+
const t = C.current, n = l.current, c = n.openOnClick && !D(e) && t.hoveredItemId !== i;
|
|
117
|
+
(T.current.IsMouseOverEnabled || c) && (b(), h.current = window.setTimeout(() => {
|
|
118
|
+
a(e), h.current = null;
|
|
119
|
+
}, le(n)));
|
|
116
120
|
},
|
|
117
121
|
[b, a]
|
|
118
|
-
),
|
|
122
|
+
), X = r.useCallback(
|
|
119
123
|
(e) => {
|
|
120
|
-
const t = C.current, n = l.current, c = n.openOnClick && !
|
|
121
|
-
(
|
|
122
|
-
a(c ?
|
|
123
|
-
},
|
|
124
|
+
const t = C.current, n = l.current, c = n.openOnClick && !D(e) && t.hoveredItemId !== i;
|
|
125
|
+
(T.current.IsMouseOverEnabled || c) && M(e) && (b(), y.current = window.setTimeout(() => {
|
|
126
|
+
a(c ? Z(e) : i), y.current = null;
|
|
127
|
+
}, ae(n)));
|
|
124
128
|
},
|
|
125
|
-
[b,
|
|
126
|
-
),
|
|
129
|
+
[b, M, a]
|
|
130
|
+
), ee = r.useCallback(
|
|
127
131
|
(e) => {
|
|
128
|
-
C.current.hoveredItemId === i ? m(e) :
|
|
132
|
+
C.current.hoveredItemId === i ? m(e) : p((n) => ({
|
|
129
133
|
focusedItemId: e,
|
|
130
134
|
hoveredItemId: n.hoveredItemId,
|
|
131
135
|
tabbableItemId: _(e)
|
|
132
136
|
}));
|
|
133
137
|
},
|
|
134
138
|
[m]
|
|
135
|
-
),
|
|
139
|
+
), te = r.useCallback(
|
|
136
140
|
(e, t) => {
|
|
137
|
-
const n =
|
|
141
|
+
const n = L.current, c = S(t, n), s = C.current, d = l.current;
|
|
138
142
|
if (!c.disabled) {
|
|
139
|
-
const
|
|
140
|
-
|
|
143
|
+
const R = D(t), k = !c.items || c.items.length === 0;
|
|
144
|
+
if (R ? (m(t), k ? a(i) : d.openOnClick && s.hoveredItemId !== i && _(s.hoveredItemId) === t ? a(i) : a(t)) : k && (m(t), a(i)), E(e, t), !e.isDefaultPrevented() && c.url) {
|
|
145
|
+
const V = W(c.url);
|
|
146
|
+
V && window.location.assign(V);
|
|
147
|
+
}
|
|
141
148
|
}
|
|
142
149
|
},
|
|
143
|
-
[m, a,
|
|
144
|
-
),
|
|
150
|
+
[m, a, E]
|
|
151
|
+
), re = r.useCallback(
|
|
145
152
|
(e, t) => {
|
|
146
153
|
const n = l.current;
|
|
147
154
|
n.onClose && n.onClose({
|
|
148
|
-
target:
|
|
149
|
-
item:
|
|
155
|
+
target: O.current,
|
|
156
|
+
item: f(e),
|
|
150
157
|
itemId: e,
|
|
151
158
|
popupCloseEvent: t
|
|
152
159
|
});
|
|
153
160
|
},
|
|
154
|
-
[
|
|
155
|
-
),
|
|
161
|
+
[f]
|
|
162
|
+
), ne = r.useCallback(
|
|
156
163
|
(e, t) => {
|
|
157
164
|
var c;
|
|
158
165
|
const n = l.current;
|
|
159
|
-
if (
|
|
166
|
+
if (M(e) && m(i), ((c = t.relatedTarget) == null ? void 0 : c.nodeName) === "LI") {
|
|
160
167
|
const s = t.relatedTarget.getAttribute("id");
|
|
161
168
|
if (s != null && s.includes(n.id))
|
|
162
169
|
return;
|
|
163
170
|
}
|
|
164
|
-
if (
|
|
165
|
-
const s =
|
|
171
|
+
if (D(e) && n.onClose) {
|
|
172
|
+
const s = f(e);
|
|
166
173
|
n.onClose({
|
|
167
|
-
target:
|
|
174
|
+
target: O.current,
|
|
168
175
|
item: s,
|
|
169
176
|
itemId: e
|
|
170
177
|
});
|
|
171
178
|
}
|
|
172
179
|
},
|
|
173
|
-
[
|
|
174
|
-
),
|
|
180
|
+
[M, m, f]
|
|
181
|
+
), U = r.useRef(o.vertical);
|
|
175
182
|
r.useEffect(() => () => {
|
|
176
183
|
b();
|
|
177
184
|
}, [b]), r.useEffect(() => (o.openOnClick && document.addEventListener("mousedown", N), () => {
|
|
178
185
|
document.removeEventListener("mousedown", N);
|
|
179
186
|
}), [o.openOnClick, N]), r.useEffect(() => {
|
|
180
|
-
const e = !!
|
|
181
|
-
(e || t) && K(),
|
|
187
|
+
const e = !!U.current != !!o.vertical, t = v.current.hasDirectionChanged();
|
|
188
|
+
(e || t) && K(), T.current.OpenOnClick = o.openOnClick, U.current = o.vertical;
|
|
182
189
|
});
|
|
183
|
-
const
|
|
190
|
+
const oe = () => ue(
|
|
184
191
|
"k-reset",
|
|
185
192
|
"k-header",
|
|
186
193
|
"k-menu",
|
|
@@ -188,46 +195,46 @@ const q = {
|
|
|
188
195
|
{ "k-menu-vertical": o.vertical },
|
|
189
196
|
o.className
|
|
190
197
|
);
|
|
191
|
-
let
|
|
192
|
-
|
|
193
|
-
const
|
|
198
|
+
let w;
|
|
199
|
+
I.hoveredItemId ? w = I.hoveredItemId : I.focusedItemId ? w = Z(I.focusedItemId) : w = i;
|
|
200
|
+
const ce = o.animate !== void 0 ? o.animate : !0;
|
|
194
201
|
return /* @__PURE__ */ r.createElement(
|
|
195
202
|
"div",
|
|
196
203
|
{
|
|
197
204
|
id: o.id,
|
|
198
|
-
onKeyDown:
|
|
205
|
+
onKeyDown: J,
|
|
199
206
|
style: o.style,
|
|
200
|
-
className:
|
|
201
|
-
ref:
|
|
207
|
+
className: v.current.getIsDirectionRightToLeft() ? "k-rtl" : void 0,
|
|
208
|
+
ref: g
|
|
202
209
|
},
|
|
203
210
|
/* @__PURE__ */ r.createElement(
|
|
204
|
-
|
|
211
|
+
de,
|
|
205
212
|
{
|
|
206
|
-
className:
|
|
213
|
+
className: oe(),
|
|
207
214
|
"aria-orientation": o.vertical ? "vertical" : void 0,
|
|
208
|
-
items:
|
|
209
|
-
animate:
|
|
215
|
+
items: L.current,
|
|
216
|
+
animate: ce,
|
|
210
217
|
isMenuVertical: o.vertical,
|
|
211
|
-
isDirectionRightToLeft:
|
|
212
|
-
focusedItemId:
|
|
213
|
-
lastItemIdToBeOpened:
|
|
214
|
-
tabbableItemId:
|
|
218
|
+
isDirectionRightToLeft: v.current.getIsDirectionRightToLeft(),
|
|
219
|
+
focusedItemId: I.focusedItemId,
|
|
220
|
+
lastItemIdToBeOpened: w,
|
|
221
|
+
tabbableItemId: I.tabbableItemId,
|
|
215
222
|
itemRender: o.itemRender,
|
|
216
223
|
linkRender: o.linkRender,
|
|
217
224
|
menuGuid: o.id,
|
|
218
|
-
onMouseLeave:
|
|
219
|
-
onMouseOver:
|
|
220
|
-
onFocus:
|
|
221
|
-
onClick:
|
|
222
|
-
onBlur:
|
|
223
|
-
onOriginalItemNeeded:
|
|
224
|
-
onPopupClose:
|
|
225
|
+
onMouseLeave: X,
|
|
226
|
+
onMouseOver: Q,
|
|
227
|
+
onFocus: ee,
|
|
228
|
+
onClick: te,
|
|
229
|
+
onBlur: ne,
|
|
230
|
+
onOriginalItemNeeded: f,
|
|
231
|
+
onPopupClose: re,
|
|
225
232
|
role: o.role
|
|
226
233
|
}
|
|
227
234
|
)
|
|
228
235
|
);
|
|
229
236
|
});
|
|
230
|
-
|
|
237
|
+
z.propTypes = {
|
|
231
238
|
vertical: u.bool,
|
|
232
239
|
items: u.arrayOf(u.object),
|
|
233
240
|
style: u.object,
|
|
@@ -249,7 +256,7 @@ j.propTypes = {
|
|
|
249
256
|
onClose: u.func,
|
|
250
257
|
role: u.string
|
|
251
258
|
};
|
|
252
|
-
|
|
259
|
+
z.displayName = "Menu";
|
|
253
260
|
export {
|
|
254
|
-
|
|
261
|
+
z as Menu
|
|
255
262
|
};
|
|
@@ -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 o=require("react"),
|
|
8
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("react"),c=require("prop-types"),a=require("@progress/kendo-react-common");function u(e){const n=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const t in e)if(t!=="default"){const r=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(n,t,r.get?r:{enumerable:!0,get:()=>e[t]})}}return n.default=e,Object.freeze(n)}const l=u(o),i=e=>a.classNames("k-link","k-menu-link",{"k-active":e}),s=e=>e.url?l.createElement("a",{className:i(e.opened),href:a.sanitizeUrl(e.url)||void 0,tabIndex:-1},e.children):l.createElement("span",{id:e.id,className:a.classNames(i(e.opened),e.className),style:e.style,role:"presentation"},e.children);s.propTypes={opened:c.bool,url:c.string};exports.MenuItemLink=s;
|
|
@@ -7,8 +7,8 @@
|
|
|
7
7
|
*/
|
|
8
8
|
import * as t from "react";
|
|
9
9
|
import n from "prop-types";
|
|
10
|
-
import { classNames as l } from "@progress/kendo-react-common";
|
|
11
|
-
const a = (e) => l("k-link", "k-menu-link", { "k-active": e }),
|
|
10
|
+
import { sanitizeUrl as i, classNames as l } from "@progress/kendo-react-common";
|
|
11
|
+
const a = (e) => l("k-link", "k-menu-link", { "k-active": e }), r = (e) => e.url ? /* @__PURE__ */ t.createElement("a", { className: a(e.opened), href: i(e.url) || void 0, tabIndex: -1 }, e.children) : /* @__PURE__ */ t.createElement(
|
|
12
12
|
"span",
|
|
13
13
|
{
|
|
14
14
|
id: e.id,
|
|
@@ -18,10 +18,10 @@ const a = (e) => l("k-link", "k-menu-link", { "k-active": e }), m = (e) => e.url
|
|
|
18
18
|
},
|
|
19
19
|
e.children
|
|
20
20
|
);
|
|
21
|
-
|
|
21
|
+
r.propTypes = {
|
|
22
22
|
opened: n.bool,
|
|
23
23
|
url: n.string
|
|
24
24
|
};
|
|
25
25
|
export {
|
|
26
|
-
|
|
26
|
+
r as MenuItemLink
|
|
27
27
|
};
|
package/package-metadata.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 e=Object.freeze({name:"@progress/kendo-react-layout",productName:"KendoReact",productCode:"KENDOUIREACT",productCodes:["KENDOUIREACT"],publishDate:
|
|
8
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=Object.freeze({name:"@progress/kendo-react-layout",productName:"KendoReact",productCode:"KENDOUIREACT",productCodes:["KENDOUIREACT"],publishDate: 1791292207,version:"16.2.0-develop.19",licensingDocsUrl:"https://www.telerik.com/kendo-react-ui/components/my-license/"});exports.packageMetadata=e;
|
package/package-metadata.mjs
CHANGED
|
@@ -7,7 +7,7 @@ export const packageMetadata = Object.freeze({
|
|
|
7
7
|
productName: 'KendoReact',
|
|
8
8
|
productCode: 'KENDOUIREACT',
|
|
9
9
|
productCodes: ['KENDOUIREACT'],
|
|
10
|
-
publishDate:
|
|
11
|
-
version: '16.2.0-develop.
|
|
10
|
+
publishDate: 1791292207,
|
|
11
|
+
version: '16.2.0-develop.19',
|
|
12
12
|
licensingDocsUrl: 'https://www.telerik.com/kendo-react-ui/components/my-license/'
|
|
13
13
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@progress/kendo-react-layout",
|
|
3
|
-
"version": "16.2.0-develop.
|
|
3
|
+
"version": "16.2.0-develop.19",
|
|
4
4
|
"description": "React Layout components enable you to create a perceptive and intuitive layout of web projects. KendoReact Layout package",
|
|
5
5
|
"author": "Progress",
|
|
6
6
|
"license": "SEE LICENSE IN LICENSE.md",
|
|
@@ -26,12 +26,12 @@
|
|
|
26
26
|
"sideEffects": false,
|
|
27
27
|
"peerDependencies": {
|
|
28
28
|
"@progress/kendo-licensing": "^1.7.2",
|
|
29
|
-
"@progress/kendo-react-animation": "16.2.0-develop.
|
|
30
|
-
"@progress/kendo-react-buttons": "16.2.0-develop.
|
|
31
|
-
"@progress/kendo-react-common": "16.2.0-develop.
|
|
32
|
-
"@progress/kendo-react-intl": "16.2.0-develop.
|
|
33
|
-
"@progress/kendo-react-popup": "16.2.0-develop.
|
|
34
|
-
"@progress/kendo-react-progressbars": "16.2.0-develop.
|
|
29
|
+
"@progress/kendo-react-animation": "16.2.0-develop.19",
|
|
30
|
+
"@progress/kendo-react-buttons": "16.2.0-develop.19",
|
|
31
|
+
"@progress/kendo-react-common": "16.2.0-develop.19",
|
|
32
|
+
"@progress/kendo-react-intl": "16.2.0-develop.19",
|
|
33
|
+
"@progress/kendo-react-popup": "16.2.0-develop.19",
|
|
34
|
+
"@progress/kendo-react-progressbars": "16.2.0-develop.19",
|
|
35
35
|
"@progress/kendo-svg-icons": "^4.9.0 || ^5.0.0",
|
|
36
36
|
"react": "^18.0.0 || ^19.0.0",
|
|
37
37
|
"react-dom": "^18.0.0 || ^19.0.0"
|
|
@@ -108,7 +108,7 @@
|
|
|
108
108
|
"package": {
|
|
109
109
|
"productName": "KendoReact",
|
|
110
110
|
"productCode": "KENDOUIREACT",
|
|
111
|
-
"publishDate":
|
|
111
|
+
"publishDate": 1791292207,
|
|
112
112
|
"licensingDocsUrl": "https://www.telerik.com/kendo-react-ui/components/my-license/"
|
|
113
113
|
}
|
|
114
114
|
},
|
|
@@ -118,10 +118,5 @@
|
|
|
118
118
|
},
|
|
119
119
|
"publishConfig": {
|
|
120
120
|
"access": "public"
|
|
121
|
-
},
|
|
122
|
-
"peerDependenciesMeta": {
|
|
123
|
-
"@progress/kendo-svg-icons": {
|
|
124
|
-
"optional": true
|
|
125
|
-
}
|
|
126
121
|
}
|
|
127
122
|
}
|
package/timeline/TimelineCard.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 N=require("react"),
|
|
8
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const N=require("react"),k=require("prop-types"),y=require("../card/Card.js"),A=require("../card/CardHeader.js"),D=require("../card/CardTitle.js"),I=require("../card/CardSubtitle.js"),h=require("../card/CardBody.js"),O=require("../card/CardImage.js"),T=require("../card/CardActions.js"),r=require("@progress/kendo-react-common"),q=require("@progress/kendo-react-animation"),R=require("@progress/kendo-svg-icons"),S=require("@progress/kendo-react-buttons");function z(e){const c=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const l in e)if(l!=="default"){const i=Object.getOwnPropertyDescriptor(e,l);Object.defineProperty(c,l,i.get?i:{enumerable:!0,get:()=>e[l]})}}return c.default=e,Object.freeze(c)}const t=z(N),E=e=>{const{title:l,subtitle:i,actions:o,images:d,description:b}=e.eventData,[s,C]=t.useState(e.eventData.opened||!1),[u,m]=t.useState(!!e.collapsible&&!e.eventData.opened),f=a=>{if(C(!s),e.onChange){const n={syntheticEvent:a,nativeEvent:a.nativeEvent,eventData:e.eventData};e.onChange.call(void 0,n)}},g=a=>{if(e.onActionClick){const n={syntheticEvent:a,nativeEvent:a.nativeEvent,eventData:e.eventData};e.onActionClick.call(void 0,n)}},v=()=>t.createElement(t.Fragment,null,t.createElement(h.CardBody,null,t.createElement("div",{className:"k-card-description"},t.createElement("p",null,b),d&&d.map((a,n)=>t.createElement(O.CardImage,{key:n,src:a.src})))),o&&t.createElement(T.CardActions,null,o.map((a,n)=>t.createElement("a",{key:n,href:r.sanitizeUrl(a.url)||void 0,className:"k-button k-button-md k-rounded-md k-button-flat k-button-flat-primary",onClick:g},a.text))));return t.createElement("div",{"data-testid":"k-timeline-card",className:r.classNames("k-timeline-card",{"k-collapsed":e.collapsible&&u})},t.createElement(y.Card,{id:e.panelId,"aria-label":e.ariaLabel,"aria-live":e.horizontal?void 0:"polite","aria-describedby":e.id,tabIndex:e.tabindex,role:e.horizontal?"tabpanel":"button","aria-expanded":e.collapsible?!u:void 0,className:"k-card-with-callout",onClick:a=>f(a)},t.createElement("span",{style:e.calloutStyle,className:r.classNames("k-timeline-card-callout","k-card-callout",{"k-callout-n":e.horizontal},{"k-callout-e":e.alternated&&!e.horizontal},{"k-callout-w":!e.alternated&&!e.horizontal})}),t.createElement("div",{className:"k-card-inner"},t.createElement(A.CardHeader,null,t.createElement(D.CardTitle,null,t.createElement("span",{className:"k-event-title"},l),e.collapsible&&t.createElement(S.Button,{className:"k-event-collapse",fillMode:"flat",size:"xs",svgIcon:R.chevronRightIcon})),i&&t.createElement(I.CardSubtitle,null,i)),e.collapsible?t.createElement(q.Reveal,{transitionEnterDuration:e.transitionDuration||400,transitionExitDuration:e.transitionDuration||400,onBeforeEnter:()=>m(!1),onAfterExited:()=>m(!0)},s?v():null):v())))};E.propTypes={onChange:k.func,onActionClick:k.func};exports.TimelineCard=E;
|
|
@@ -14,11 +14,11 @@ import { CardSubtitle as A } from "../card/CardSubtitle.mjs";
|
|
|
14
14
|
import { CardBody as D } from "../card/CardBody.mjs";
|
|
15
15
|
import { CardImage as I } from "../card/CardImage.mjs";
|
|
16
16
|
import { CardActions as g } from "../card/CardActions.mjs";
|
|
17
|
-
import { classNames as u } from "@progress/kendo-react-common";
|
|
18
|
-
import { Reveal as
|
|
19
|
-
import { chevronRightIcon as
|
|
20
|
-
import { Button as
|
|
21
|
-
const
|
|
17
|
+
import { classNames as u, sanitizeUrl as y } from "@progress/kendo-react-common";
|
|
18
|
+
import { Reveal as T } from "@progress/kendo-react-animation";
|
|
19
|
+
import { chevronRightIcon as x } from "@progress/kendo-svg-icons";
|
|
20
|
+
import { Button as O } from "@progress/kendo-react-buttons";
|
|
21
|
+
const z = (e) => {
|
|
22
22
|
const { title: v, subtitle: l, actions: i, images: o, description: E } = e.eventData, [c, k] = t.useState(e.eventData.opened || !1), [r, m] = t.useState(!!e.collapsible && !e.eventData.opened), f = (a) => {
|
|
23
23
|
if (k(!c), e.onChange) {
|
|
24
24
|
const n = {
|
|
@@ -41,7 +41,7 @@ const O = (e) => {
|
|
|
41
41
|
"a",
|
|
42
42
|
{
|
|
43
43
|
key: n,
|
|
44
|
-
href: a.url,
|
|
44
|
+
href: y(a.url) || void 0,
|
|
45
45
|
className: "k-button k-button-md k-rounded-md k-button-flat k-button-flat-primary",
|
|
46
46
|
onClick: b
|
|
47
47
|
},
|
|
@@ -80,15 +80,15 @@ const O = (e) => {
|
|
|
80
80
|
}
|
|
81
81
|
),
|
|
82
82
|
/* @__PURE__ */ t.createElement("div", { className: "k-card-inner" }, /* @__PURE__ */ t.createElement(N, null, /* @__PURE__ */ t.createElement(h, null, /* @__PURE__ */ t.createElement("span", { className: "k-event-title" }, v), e.collapsible && /* @__PURE__ */ t.createElement(
|
|
83
|
-
|
|
83
|
+
O,
|
|
84
84
|
{
|
|
85
85
|
className: "k-event-collapse",
|
|
86
86
|
fillMode: "flat",
|
|
87
87
|
size: "xs",
|
|
88
|
-
svgIcon:
|
|
88
|
+
svgIcon: x
|
|
89
89
|
}
|
|
90
90
|
)), l && /* @__PURE__ */ t.createElement(A, null, l)), e.collapsible ? /* @__PURE__ */ t.createElement(
|
|
91
|
-
|
|
91
|
+
T,
|
|
92
92
|
{
|
|
93
93
|
transitionEnterDuration: e.transitionDuration || 400,
|
|
94
94
|
transitionExitDuration: e.transitionDuration || 400,
|
|
@@ -100,10 +100,10 @@ const O = (e) => {
|
|
|
100
100
|
)
|
|
101
101
|
);
|
|
102
102
|
};
|
|
103
|
-
|
|
103
|
+
z.propTypes = {
|
|
104
104
|
onChange: s.func,
|
|
105
105
|
onActionClick: s.func
|
|
106
106
|
};
|
|
107
107
|
export {
|
|
108
|
-
|
|
108
|
+
z as TimelineCard
|
|
109
109
|
};
|