@progress/kendo-react-layout 9.0.0-develop.2 → 9.0.0-develop.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +82 -82
- package/actionsheet/ActionSheet.js +1 -1
- package/actionsheet/ActionSheet.mjs +25 -38
- package/actionsheet/ActionSheetFooter.mjs +1 -10
- package/actionsheet/ActionSheetHeader.mjs +1 -10
- package/actionsheet/ActionSheetItem.mjs +10 -7
- package/appbar/AppBar.mjs +5 -30
- package/appbar/AppBarSection.mjs +4 -17
- package/appbar/AppBarSpacer.mjs +6 -16
- package/bottomnavigation/BottomNavigation.mjs +30 -54
- package/bottomnavigation/BottomNavigationItem.mjs +63 -61
- package/breadcrumb/Breadcrumb.mjs +39 -63
- package/breadcrumb/BreadcrumbDelimiter.mjs +29 -24
- package/breadcrumb/BreadcrumbLink.mjs +16 -18
- package/breadcrumb/BreadcrumbListItem.mjs +31 -29
- package/breadcrumb/BreadcrumbOrderedList.mjs +47 -42
- package/card/Avatar.mjs +15 -1
- package/card/CardBody.mjs +1 -11
- package/card/CardFooter.mjs +1 -11
- package/card/CardHeader.mjs +1 -11
- package/card/CardImage.mjs +1 -4
- package/card/CardSubtitle.mjs +1 -11
- package/card/CardTitle.mjs +1 -11
- package/dist/cdn/js/kendo-react-layout.js +1 -1
- package/drawer/Drawer.mjs +10 -21
- package/drawer/DrawerContent.mjs +6 -3
- package/drawer/DrawerItem.mjs +10 -10
- package/drawer/DrawerNavigation.mjs +109 -130
- package/expansionpanel/ExpansionPanel.mjs +12 -15
- package/expansionpanel/ExpansionPanelContent.mjs +3 -9
- package/gridlayout/GridLayout.mjs +1 -10
- package/gridlayout/GridLayoutItem.mjs +1 -10
- package/menu/components/MenuItemLink.mjs +4 -17
- package/menu/utils/getNewItemIdUponKeyboardNavigation.js +1 -1
- package/menu/utils/getNewItemIdUponKeyboardNavigation.mjs +55 -57
- package/menu/utils/hoverDelay.js +1 -1
- package/menu/utils/hoverDelay.mjs +2 -2
- package/menu/utils/itemsIdsUtils.js +1 -1
- package/menu/utils/itemsIdsUtils.mjs +14 -18
- package/menu/utils/misc.js +1 -1
- package/menu/utils/misc.mjs +2 -2
- package/menu/utils/prepareInputItemsForInternalWork.js +1 -1
- package/menu/utils/prepareInputItemsForInternalWork.mjs +30 -31
- package/package-metadata.mjs +1 -1
- package/package.json +6 -6
- package/panelbar/PanelBar.mjs +2 -7
- package/panelbar/util.js +1 -1
- package/panelbar/util.mjs +27 -40
- package/splitter/SplitterBar.mjs +23 -40
- package/splitter/SplitterPane.mjs +1 -11
- package/stacklayout/StackLayout.mjs +2 -14
- package/stepper/Step.mjs +25 -46
- package/stepper/Stepper.js +1 -1
- package/stepper/Stepper.mjs +59 -78
- package/tabstrip/TabStripContent.mjs +2 -14
- package/tabstrip/TabStripTab.mjs +2 -9
- package/tilelayout/InternalTile.mjs +31 -19
- package/tilelayout/ResizeHandlers.mjs +7 -1
- package/tilelayout/TileLayout.mjs +24 -20
- package/timeline/TimelineCard.mjs +1 -4
- package/timeline/TimelineHorizontal.mjs +52 -63
- package/timeline/TimelineVertical.mjs +7 -5
- package/timeline/utils.mjs +4 -1
|
@@ -6,117 +6,115 @@
|
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
8
|
"use client";
|
|
9
|
-
import { Keys as
|
|
10
|
-
import { isIdZeroLevel as i, getFirstChildId as N, getRootParentId as b, getDirectParentId as
|
|
9
|
+
import { Keys as e } from "@progress/kendo-react-common";
|
|
10
|
+
import { isIdZeroLevel as i, getFirstChildId as N, getRootParentId as b, getDirectParentId as a, getShortId as O, isIdFirstLevel as q, getItemById as D, getDirectSiblingIdForLevelZero as P, createId as J } from "./itemsIdsUtils.mjs";
|
|
11
11
|
const Q = /\S/;
|
|
12
|
-
function V(
|
|
13
|
-
const H =
|
|
12
|
+
function V(g, n, G, S, l, c) {
|
|
13
|
+
const H = u();
|
|
14
14
|
switch (G) {
|
|
15
|
-
case
|
|
15
|
+
case e.left:
|
|
16
16
|
return x();
|
|
17
|
-
case
|
|
17
|
+
case e.right:
|
|
18
18
|
return B();
|
|
19
|
-
case
|
|
19
|
+
case e.up:
|
|
20
20
|
return A();
|
|
21
|
-
case
|
|
21
|
+
case e.down:
|
|
22
22
|
return z();
|
|
23
|
-
case
|
|
24
|
-
case
|
|
23
|
+
case e.enter:
|
|
24
|
+
case e.space:
|
|
25
25
|
return R();
|
|
26
|
-
case
|
|
26
|
+
case e.home:
|
|
27
27
|
return W();
|
|
28
|
-
case
|
|
28
|
+
case e.end:
|
|
29
29
|
return Z();
|
|
30
|
-
case
|
|
30
|
+
case e.esc:
|
|
31
31
|
return _();
|
|
32
32
|
default:
|
|
33
33
|
return X() ? M() : n;
|
|
34
34
|
}
|
|
35
35
|
function x() {
|
|
36
|
-
return
|
|
36
|
+
return l ? c ? F() : U() : c ? C() : K();
|
|
37
37
|
}
|
|
38
38
|
function B() {
|
|
39
|
-
return
|
|
39
|
+
return l ? c ? U() : F() : c ? K() : C();
|
|
40
40
|
}
|
|
41
41
|
function z() {
|
|
42
|
-
return
|
|
42
|
+
return l ? f() : i(n) ? d() : f();
|
|
43
43
|
}
|
|
44
44
|
function A() {
|
|
45
|
-
return
|
|
45
|
+
return l ? s() : i(n) ? E() : s();
|
|
46
46
|
}
|
|
47
47
|
function R() {
|
|
48
|
-
return H.disabled ? n :
|
|
48
|
+
return H.disabled ? n : h() ? N(n) : b(n);
|
|
49
49
|
}
|
|
50
50
|
function W() {
|
|
51
51
|
return y()[0].id;
|
|
52
52
|
}
|
|
53
53
|
function Z() {
|
|
54
|
-
const
|
|
55
|
-
return
|
|
54
|
+
const t = y();
|
|
55
|
+
return t[t.length - 1].id;
|
|
56
56
|
}
|
|
57
57
|
function _() {
|
|
58
|
-
return i(n) ? n :
|
|
58
|
+
return i(n) ? n : a(n);
|
|
59
59
|
}
|
|
60
60
|
function M() {
|
|
61
|
-
const
|
|
61
|
+
const t = S.toLowerCase(), r = y(), o = Number(O(n)), p = r.slice(o + 1).concat(r.slice(0, o + 1)).find((j) => (j.text || "").toLowerCase().startsWith(t));
|
|
62
62
|
return p ? p.id : n;
|
|
63
63
|
}
|
|
64
64
|
function K() {
|
|
65
|
-
return i(n) ?
|
|
65
|
+
return i(n) ? s() : q(n) ? d(s(b(n))) : a(n);
|
|
66
66
|
}
|
|
67
67
|
function U() {
|
|
68
|
-
return i(n) ? E() :
|
|
68
|
+
return i(n) ? E() : a(n);
|
|
69
69
|
}
|
|
70
70
|
function C() {
|
|
71
|
-
return i(n) ?
|
|
72
|
-
|
|
71
|
+
return i(n) ? f() : d(
|
|
72
|
+
h() ? n : f(b(n))
|
|
73
73
|
);
|
|
74
74
|
}
|
|
75
75
|
function F() {
|
|
76
|
-
return
|
|
77
|
-
i(n) ||
|
|
76
|
+
return d(
|
|
77
|
+
i(n) || h() ? n : f(b(n))
|
|
78
78
|
);
|
|
79
79
|
}
|
|
80
|
-
function
|
|
81
|
-
return v(!0,
|
|
80
|
+
function d(t) {
|
|
81
|
+
return v(!0, t);
|
|
82
82
|
}
|
|
83
|
-
function E(
|
|
84
|
-
return v(!1,
|
|
83
|
+
function E(t) {
|
|
84
|
+
return v(!1, t);
|
|
85
85
|
}
|
|
86
86
|
function X() {
|
|
87
87
|
return S.length === 1 && Q.test(S);
|
|
88
88
|
}
|
|
89
|
-
function
|
|
90
|
-
return
|
|
89
|
+
function u(t, r) {
|
|
90
|
+
return t === void 0 && (t = n), r === void 0 && (r = g), D(t, r);
|
|
91
91
|
}
|
|
92
|
-
function
|
|
93
|
-
return
|
|
92
|
+
function h(t) {
|
|
93
|
+
return u(t).items.length > 0;
|
|
94
94
|
}
|
|
95
|
-
function
|
|
96
|
-
return L(!1,
|
|
95
|
+
function s(t) {
|
|
96
|
+
return L(!1, t);
|
|
97
97
|
}
|
|
98
|
-
function
|
|
99
|
-
return L(!0,
|
|
98
|
+
function f(t) {
|
|
99
|
+
return L(!0, t);
|
|
100
100
|
}
|
|
101
|
-
function $(
|
|
102
|
-
const
|
|
103
|
-
return
|
|
101
|
+
function $(t) {
|
|
102
|
+
const r = u(t).items;
|
|
103
|
+
return r[r.length - 1].id;
|
|
104
104
|
}
|
|
105
105
|
function y() {
|
|
106
|
-
return i(n) ?
|
|
107
|
-
}
|
|
108
|
-
function v(
|
|
109
|
-
|
|
110
|
-
const o =
|
|
111
|
-
return
|
|
112
|
-
}
|
|
113
|
-
function L(
|
|
114
|
-
if (
|
|
115
|
-
return P(
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
return J(P(e, w, p), o);
|
|
119
|
-
}
|
|
106
|
+
return i(n) ? g : u(a(n), g).items;
|
|
107
|
+
}
|
|
108
|
+
function v(t, r) {
|
|
109
|
+
r === void 0 && (r = n);
|
|
110
|
+
const o = u(r);
|
|
111
|
+
return h(r) && !o.disabled ? t ? N(r) : $(r) : r;
|
|
112
|
+
}
|
|
113
|
+
function L(t, r) {
|
|
114
|
+
if (r === void 0 && (r = n), i(r))
|
|
115
|
+
return P(t, r, g.length);
|
|
116
|
+
const o = a(r), w = O(r), p = u(o).items.length;
|
|
117
|
+
return J(P(t, w, p), o);
|
|
120
118
|
}
|
|
121
119
|
}
|
|
122
120
|
export {
|
package/menu/utils/hoverDelay.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 client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});function
|
|
8
|
+
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});function o(e){return e.hoverOpenDelay!==void 0?e.hoverOpenDelay:e.openOnClick?0:100}function l(e){return e.hoverCloseDelay!==void 0?e.hoverCloseDelay:100}exports.getHoverCloseDelay=l;exports.getHoverOpenDelay=o;
|
|
@@ -9,10 +9,10 @@
|
|
|
9
9
|
function n(e) {
|
|
10
10
|
return e.hoverOpenDelay !== void 0 ? e.hoverOpenDelay : e.openOnClick ? 0 : 100;
|
|
11
11
|
}
|
|
12
|
-
function
|
|
12
|
+
function o(e) {
|
|
13
13
|
return e.hoverCloseDelay !== void 0 ? e.hoverCloseDelay : 100;
|
|
14
14
|
}
|
|
15
15
|
export {
|
|
16
|
-
|
|
16
|
+
o as getHoverCloseDelay,
|
|
17
17
|
n as getHoverOpenDelay
|
|
18
18
|
};
|
|
@@ -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 client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o="",s="0",
|
|
8
|
+
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o="",s="0",e="_";function c(t,r){if(u(t))return r[Number(t)];const n=r[Number(g(t))];return n.items?c(f(t),n.items):void 0}function g(t){return i(t)?t:t.split(e)[0]}function f(t){if(i(t))return t;const r=t.indexOf(e);return t.substring(r+1)}function S(t){return l("0",t)}function E(t,r){return r.indexOf(t)===0?r.length===t.length||r.charAt(t.length)===e:!1}function l(t,r){return r?r+e+t:t}function O(t){const r=t.lastIndexOf(e);return r<0?o:t.substring(0,r)}function i(t){return t===o||t.indexOf(e)<0}function u(t){return t!==o&&t.indexOf(e)<0}function b(t){return P(t)===1}function d(t){return a(t)===s}function a(t){const r=t.lastIndexOf(e);return r<0?t:t.substring(r+1)}function L(t,r,n){return u(r)?t?Number(r)<n-1?(Number(r)+1).toString():"0":Number(r)>0?(Number(r)-1).toString():(n-1).toString():r}function P(t){return t.split(e).length-1}exports.EMPTY_ID=o;exports.SEPARATOR=e;exports.ZERO_LEVEL_ZERO_ITEM_ID=s;exports.createId=l;exports.getDirectParentId=O;exports.getDirectSiblingIdForLevelZero=L;exports.getFirstChildId=S;exports.getIdWithoutRootParentId=f;exports.getItemById=c;exports.getRootParentId=g;exports.getShortId=a;exports.isFirstItemFromSiblings=d;exports.isIdEmptyOrZeroLevel=i;exports.isIdFirstLevel=b;exports.isIdZeroLevel=u;exports.shouldOpenItem=E;
|
|
@@ -7,32 +7,28 @@
|
|
|
7
7
|
*/
|
|
8
8
|
"use client";
|
|
9
9
|
const u = "", c = "0", t = "_";
|
|
10
|
-
function
|
|
10
|
+
function f(n, r) {
|
|
11
11
|
if (i(n))
|
|
12
12
|
return r[Number(n)];
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
return e.items ? s(g(n), e.items) : void 0;
|
|
16
|
-
}
|
|
13
|
+
const e = r[Number(s(n))];
|
|
14
|
+
return e.items ? f(g(n), e.items) : void 0;
|
|
17
15
|
}
|
|
18
|
-
function
|
|
16
|
+
function s(n) {
|
|
19
17
|
return o(n) ? n : n.split(t)[0];
|
|
20
18
|
}
|
|
21
19
|
function g(n) {
|
|
22
20
|
if (o(n))
|
|
23
21
|
return n;
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
return n.substring(r + 1);
|
|
27
|
-
}
|
|
22
|
+
const r = n.indexOf(t);
|
|
23
|
+
return n.substring(r + 1);
|
|
28
24
|
}
|
|
29
25
|
function b(n) {
|
|
30
|
-
return
|
|
26
|
+
return a("0", n);
|
|
31
27
|
}
|
|
32
28
|
function x(n, r) {
|
|
33
29
|
return r.indexOf(n) === 0 ? r.length === n.length || r.charAt(n.length) === t : !1;
|
|
34
30
|
}
|
|
35
|
-
function
|
|
31
|
+
function a(n, r) {
|
|
36
32
|
return r ? r + t + n : n;
|
|
37
33
|
}
|
|
38
34
|
function O(n) {
|
|
@@ -49,9 +45,9 @@ function E(n) {
|
|
|
49
45
|
return S(n) === 1;
|
|
50
46
|
}
|
|
51
47
|
function p(n) {
|
|
52
|
-
return
|
|
48
|
+
return l(n) === c;
|
|
53
49
|
}
|
|
54
|
-
function
|
|
50
|
+
function l(n) {
|
|
55
51
|
const r = n.lastIndexOf(t);
|
|
56
52
|
return r < 0 ? n : n.substring(r + 1);
|
|
57
53
|
}
|
|
@@ -65,14 +61,14 @@ export {
|
|
|
65
61
|
u as EMPTY_ID,
|
|
66
62
|
t as SEPARATOR,
|
|
67
63
|
c as ZERO_LEVEL_ZERO_ITEM_ID,
|
|
68
|
-
|
|
64
|
+
a as createId,
|
|
69
65
|
O as getDirectParentId,
|
|
70
66
|
L as getDirectSiblingIdForLevelZero,
|
|
71
67
|
b as getFirstChildId,
|
|
72
68
|
g as getIdWithoutRootParentId,
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
69
|
+
f as getItemById,
|
|
70
|
+
s as getRootParentId,
|
|
71
|
+
l as getShortId,
|
|
76
72
|
p as isFirstItemFromSiblings,
|
|
77
73
|
o as isIdEmptyOrZeroLevel,
|
|
78
74
|
E as isIdFirstLevel,
|
package/menu/utils/misc.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 client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("../consts.js"),d=require("./itemsIdsUtils.js");function
|
|
8
|
+
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("../consts.js"),d=require("./itemsIdsUtils.js");function u(t,r,e){const o=i(t,r,e);return e?o==="downward"?n.POPUP_SETTINGS_RTL.downward:n.POPUP_SETTINGS_RTL.leftward:o==="downward"?n.POPUP_SETTINGS.downward:n.POPUP_SETTINGS.rightward}function i(t,r,e){return d.isIdZeroLevel(t)?r?e?"leftward":"rightward":"downward":e?"leftward":"rightward"}function l(t){return t?"rtl":"ltr"}function P(t,r){return`${t}_${r}`}exports.convertBoolDirectionToString=l;exports.getChildrenPosition=i;exports.getDOMElementId=P;exports.getPopupSettings=u;
|
package/menu/utils/misc.mjs
CHANGED
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
"use client";
|
|
9
9
|
import { POPUP_SETTINGS_RTL as o, POPUP_SETTINGS as d } from "../consts.mjs";
|
|
10
10
|
import { isIdZeroLevel as i } from "./itemsIdsUtils.mjs";
|
|
11
|
-
function
|
|
11
|
+
function l(r, n, t) {
|
|
12
12
|
const e = w(r, n, t);
|
|
13
13
|
return t ? e === "downward" ? o.downward : o.leftward : e === "downward" ? d.downward : d.rightward;
|
|
14
14
|
}
|
|
@@ -25,5 +25,5 @@ export {
|
|
|
25
25
|
f as convertBoolDirectionToString,
|
|
26
26
|
w as getChildrenPosition,
|
|
27
27
|
P as getDOMElementId,
|
|
28
|
-
|
|
28
|
+
l as getPopupSettings
|
|
29
29
|
};
|
|
@@ -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 client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const y=require("react"),s=require("./itemsIdsUtils.js"),R=require("../components/MenuItem.js");function O(t){const n=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const e in t)if(e!=="default"){const r=Object.getOwnPropertyDescriptor(t,e);Object.defineProperty(n,e,r.get?r:{enumerable:!0,get:()=>t[e]})}}return n.default=t,Object.freeze(n)}const S=O(y);function C(t,n){if(t&&t.length>0)return{items:u(t),inputItems:t};if(c(n).length>0){const e=h(c(n));return{items:u(e),inputItems:e}}
|
|
8
|
+
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const y=require("react"),s=require("./itemsIdsUtils.js"),R=require("../components/MenuItem.js");function O(t){const n=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const e in t)if(e!=="default"){const r=Object.getOwnPropertyDescriptor(t,e);Object.defineProperty(n,e,r.get?r:{enumerable:!0,get:()=>t[e]})}}return n.default=t,Object.freeze(n)}const S=O(y);function C(t,n){if(t&&t.length>0)return{items:u(t),inputItems:t};if(c(n).length>0){const e=h(c(n));return{items:u(e),inputItems:e}}return{items:[],inputItems:[]}}function b(t,n){const e={},{text:r,url:o,icon:i,svgIcon:a,disabled:d,cssClass:l,cssStyle:f,render:p,linkRender:I,contentRender:m,data:g,separator:v}=t||n.props;return r!==void 0&&(e.text=r),o!==void 0&&(e.url=o),i!==void 0&&(e.icon=i),a!==void 0&&(e.svgIcon=a),d!==void 0&&(e.disabled=d),l!==void 0&&(e.cssClass=l),f!==void 0&&(e.cssStyle=f),p!==void 0&&(e.render=p),I!==void 0&&(e.linkRender=I),m!==void 0&&(e.contentRender=m),g!==void 0&&(e.data=g),v!==void 0&&(e.separator=v),e}function c(t){return S.Children.toArray(t).filter(n=>n&&n.type===R.MenuItem)}function h(t){const n=[];for(let e=0;e<t.length;e++){const r=t[e],o=b(void 0,r),i=h(c(r.props.children));i.length>0&&(o.items=i),n.push(o)}return n}function u(t,n){const e=[];for(let r=0;r<t.length;r++){const o=t[r],i=b(o);i.id=s.createId(r.toString(),n),i.isLastFromSiblings=r===t.length-1,i.separator=o.separator===!0,i.items=_(o,i),e.push(i)}return e}function _(t,n){return t.contentRender?[{contentParentItemId:n.id,id:s.createId(s.ZERO_LEVEL_ZERO_ITEM_ID,n.id),isLastFromSiblings:!0,separator:!1,contentRender:t.contentRender,items:[]}]:t.items?u(t.items,n.id):[]}exports.prepareInputItemsForInternalWork=C;
|
|
@@ -9,66 +9,65 @@
|
|
|
9
9
|
import * as C from "react";
|
|
10
10
|
import { createId as g, ZERO_LEVEL_ZERO_ITEM_ID as y } from "./itemsIdsUtils.mjs";
|
|
11
11
|
import { MenuItem as x } from "../components/MenuItem.mjs";
|
|
12
|
-
function L(
|
|
13
|
-
if (
|
|
12
|
+
function L(e, n) {
|
|
13
|
+
if (e && e.length > 0)
|
|
14
14
|
return {
|
|
15
|
-
items: c(
|
|
16
|
-
inputItems:
|
|
15
|
+
items: c(e),
|
|
16
|
+
inputItems: e
|
|
17
17
|
};
|
|
18
18
|
if (s(n).length > 0) {
|
|
19
|
-
const
|
|
20
|
-
return { items: c(
|
|
21
|
-
}
|
|
22
|
-
|
|
19
|
+
const t = R(s(n));
|
|
20
|
+
return { items: c(t), inputItems: t };
|
|
21
|
+
}
|
|
22
|
+
return { items: [], inputItems: [] };
|
|
23
23
|
}
|
|
24
|
-
function h(
|
|
25
|
-
|
|
26
|
-
const {
|
|
24
|
+
function h(e, n) {
|
|
25
|
+
const t = {}, {
|
|
27
26
|
text: i,
|
|
28
27
|
url: o,
|
|
29
28
|
icon: r,
|
|
30
29
|
svgIcon: d,
|
|
31
|
-
disabled:
|
|
32
|
-
cssClass:
|
|
33
|
-
cssStyle:
|
|
30
|
+
disabled: u,
|
|
31
|
+
cssClass: f,
|
|
32
|
+
cssStyle: l,
|
|
34
33
|
render: a,
|
|
35
34
|
linkRender: p,
|
|
36
35
|
contentRender: m,
|
|
37
36
|
data: I,
|
|
38
37
|
separator: v
|
|
39
|
-
} =
|
|
40
|
-
return i !== void 0 && (
|
|
38
|
+
} = e || n.props;
|
|
39
|
+
return i !== void 0 && (t.text = i), o !== void 0 && (t.url = o), r !== void 0 && (t.icon = r), d !== void 0 && (t.svgIcon = d), u !== void 0 && (t.disabled = u), f !== void 0 && (t.cssClass = f), l !== void 0 && (t.cssStyle = l), a !== void 0 && (t.render = a), p !== void 0 && (t.linkRender = p), m !== void 0 && (t.contentRender = m), I !== void 0 && (t.data = I), v !== void 0 && (t.separator = v), t;
|
|
41
40
|
}
|
|
42
|
-
function s(
|
|
43
|
-
return C.Children.toArray(
|
|
41
|
+
function s(e) {
|
|
42
|
+
return C.Children.toArray(e).filter((n) => n && n.type === x);
|
|
44
43
|
}
|
|
45
|
-
function R(
|
|
44
|
+
function R(e) {
|
|
46
45
|
const n = [];
|
|
47
|
-
for (let
|
|
48
|
-
const i = t
|
|
46
|
+
for (let t = 0; t < e.length; t++) {
|
|
47
|
+
const i = e[t], o = h(void 0, i), r = R(s(i.props.children));
|
|
49
48
|
r.length > 0 && (o.items = r), n.push(o);
|
|
50
49
|
}
|
|
51
50
|
return n;
|
|
52
51
|
}
|
|
53
|
-
function c(
|
|
54
|
-
const
|
|
55
|
-
for (let i = 0; i <
|
|
56
|
-
const o =
|
|
57
|
-
r.id = g(i.toString(), n), r.isLastFromSiblings = i ===
|
|
52
|
+
function c(e, n) {
|
|
53
|
+
const t = [];
|
|
54
|
+
for (let i = 0; i < e.length; i++) {
|
|
55
|
+
const o = e[i], r = h(o);
|
|
56
|
+
r.id = g(i.toString(), n), r.isLastFromSiblings = i === e.length - 1, r.separator = o.separator === !0, r.items = E(o, r), t.push(r);
|
|
58
57
|
}
|
|
59
|
-
return
|
|
58
|
+
return t;
|
|
60
59
|
}
|
|
61
|
-
function E(
|
|
62
|
-
return
|
|
60
|
+
function E(e, n) {
|
|
61
|
+
return e.contentRender ? [
|
|
63
62
|
{
|
|
64
63
|
contentParentItemId: n.id,
|
|
65
64
|
id: g(y, n.id),
|
|
66
65
|
isLastFromSiblings: !0,
|
|
67
66
|
separator: !1,
|
|
68
|
-
contentRender:
|
|
67
|
+
contentRender: e.contentRender,
|
|
69
68
|
items: []
|
|
70
69
|
}
|
|
71
|
-
] :
|
|
70
|
+
] : e.items ? c(e.items, n.id) : [];
|
|
72
71
|
}
|
|
73
72
|
export {
|
|
74
73
|
L as prepareInputItemsForInternalWork
|
package/package-metadata.mjs
CHANGED
|
@@ -10,7 +10,7 @@ const e = {
|
|
|
10
10
|
name: "@progress/kendo-react-layout",
|
|
11
11
|
productName: "KendoReact",
|
|
12
12
|
productCodes: ["KENDOUIREACT", "KENDOUICOMPLETE"],
|
|
13
|
-
publishDate:
|
|
13
|
+
publishDate: 1729494539,
|
|
14
14
|
version: "",
|
|
15
15
|
licensingDocsUrl: "https://www.telerik.com/kendo-react-ui/components/my-license/"
|
|
16
16
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@progress/kendo-react-layout",
|
|
3
|
-
"version": "9.0.0-develop.
|
|
3
|
+
"version": "9.0.0-develop.3",
|
|
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",
|
|
@@ -23,11 +23,11 @@
|
|
|
23
23
|
"sideEffects": false,
|
|
24
24
|
"peerDependencies": {
|
|
25
25
|
"@progress/kendo-licensing": "^1.3.4",
|
|
26
|
-
"@progress/kendo-react-animation": "9.0.0-develop.
|
|
27
|
-
"@progress/kendo-react-common": "9.0.0-develop.
|
|
28
|
-
"@progress/kendo-react-intl": "9.0.0-develop.
|
|
29
|
-
"@progress/kendo-react-popup": "9.0.0-develop.
|
|
30
|
-
"@progress/kendo-react-progressbars": "9.0.0-develop.
|
|
26
|
+
"@progress/kendo-react-animation": "9.0.0-develop.3",
|
|
27
|
+
"@progress/kendo-react-common": "9.0.0-develop.3",
|
|
28
|
+
"@progress/kendo-react-intl": "9.0.0-develop.3",
|
|
29
|
+
"@progress/kendo-react-popup": "9.0.0-develop.3",
|
|
30
|
+
"@progress/kendo-react-progressbars": "9.0.0-develop.3",
|
|
31
31
|
"@progress/kendo-svg-icons": "^3.0.0",
|
|
32
32
|
"react": "^16.8.2 || ^17.0.0 || ^18.0.0",
|
|
33
33
|
"react-dom": "^16.8.2 || ^17.0.0 || ^18.0.0"
|
package/panelbar/PanelBar.mjs
CHANGED
|
@@ -157,10 +157,7 @@ const h = class h extends c.Component {
|
|
|
157
157
|
render() {
|
|
158
158
|
const a = {
|
|
159
159
|
"aria-activedescendant": this.activeDescendant
|
|
160
|
-
}, p = q(
|
|
161
|
-
"k-panelbar",
|
|
162
|
-
this.props.className
|
|
163
|
-
);
|
|
160
|
+
}, p = q("k-panelbar", this.props.className);
|
|
164
161
|
return /* @__PURE__ */ c.createElement(
|
|
165
162
|
"ul",
|
|
166
163
|
{
|
|
@@ -197,9 +194,7 @@ h.propTypes = {
|
|
|
197
194
|
"PanelBar children should be either PanelBarItem or Array of PanelBarItem."
|
|
198
195
|
);
|
|
199
196
|
} else if (t.type !== m)
|
|
200
|
-
return new Error(
|
|
201
|
-
"PanelBar child should be either PanelBarItem or Array of PanelBarItem."
|
|
202
|
-
);
|
|
197
|
+
return new Error("PanelBar child should be either PanelBarItem or Array of PanelBarItem.");
|
|
203
198
|
return null;
|
|
204
199
|
}
|
|
205
200
|
return null;
|
package/panelbar/util.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 client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const B=require("react"),
|
|
8
|
+
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const B=require("react"),l=require("./PanelBarItem.js"),d=require("./interfaces/NavigationAction.js");function F(n){const r=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(n){for(const e in n)if(e!=="default"){const o=Object.getOwnPropertyDescriptor(n,e);Object.defineProperty(r,e,o.get?o:{enumerable:!0,get:()=>n[e]})}}return r.default=n,Object.freeze(r)}const i=F(B),O=n=>typeof n!="object"||!("type"in n)||n.type!==l.PanelBarItem,y=({animation:n=!0,keepItemsMounted:r=!1,state:e,expanded:o,handleSelect:a,children:t,parentExpanded:c=!0,level:s=0,parentPrivateKey:f=[]})=>{const b=i.Children.toArray(t).filter(O),q=b.length?b:t;return i.Children.map(q,(p,C)=>{if(p&&p.type===l.PanelBarItem){let m;const u=g(p,f,C);if(p.props.children){const A={animation:n,keepItemsMounted:r,state:e,expanded:o,handleSelect:a,children:p.props.children,parentExpanded:(o||[]).indexOf(u)>-1,level:s+1,parentPrivateKey:[...f,u]};m=y(A)}return i.cloneElement(p,{...p.props,animation:p.props.animation!==void 0?p.props.animation:n,keepItemsMounted:r,id:p.props.id||`k-panelbar-item-default-${u}`,uniquePrivateKey:u,parentUniquePrivateKey:f,parentExpanded:c,level:s,expanded:(o||[]).indexOf(u)>-1,focused:e.focused===u&&e.wrapperFocused,selected:e.selected===u,children:m,onSelect:a})}return i.createElement("div",{className:"k-panelbar-content"},p)})},x=n=>{const r=i.Children.toArray(n.children)[0];return r?g(r,[],0):""},I=(n,r,e={expanded:n.expanded||[],selected:n.selected||"",focused:n.focused||"",wrapperFocused:!1},o=!0,a=[])=>(i.Children.map(n.children,(t,c)=>{if(t&&t.type===l.PanelBarItem){const s=g(t,a,c);!t.props.disabled&&o&&(t.props.selected&&(e.selected=s),t.props.focused&&(e.focused=s),t.props.expanded&&(r==="multiple"?e.expanded.push(s):r==="single"&&(e.expanded=[s])),t.props.children&&(e=I(t.props,r,e,!!t.props.expanded,[...a,s])))}}),e),g=(n,r,e)=>n&&n.props&&n.props.id?n.props.id:r.length?r[r.length-1]+`.${e}`:`.${e}`;function P(n,r=[]){return(n||[]).forEach(e=>{e.disabled||(r.push(e),e.expanded&&e.children&&P(e.children,r))}),r}function v(n,r=[]){return i.Children.forEach(n,e=>{e&&e.props&&!e.props.disabled&&(r.push(e),e.props.children&&v(e.props.children,r))}),r}function E(n,r=[]){return i.Children.forEach(n,e=>{e&&e.props&&(e.props.expanded||e.props.parentExpanded)&&(r.push(e),e.props.children&&E(e.props.children,r))}),r}const N=n=>n!=null;exports.PanelBarUtils=void 0;(n=>{function r(e){return e.map((o,a)=>{let t;return o.content&&(t=o.content),o.children&&(t=r(o.children)),i.createElement(l.PanelBarItem,{...o,children:t,key:o.id||a})})}n.mapItemsToComponents=r})(exports.PanelBarUtils||(exports.PanelBarUtils={}));const S=(n,r)=>n.length!==r.length?!1:n.every((e,o)=>e===r[o]),j=(n,r,e,o,a)=>{let t;if(a===d.NavigationAction.First||a===d.NavigationAction.Last)switch(a){case d.NavigationAction.First:t=n[0];break;case d.NavigationAction.Last:t=n[n.length-1];break}else n.forEach((c,s)=>{if(c.props.uniquePrivateKey===(e.uniquePrivateKey||o)){const f=s+r<0?n.length-1:s+r>n.length-1?0:s+r;t=n[f]}});return t};exports.flatChildren=v;exports.flatVisibleChildren=E;exports.flatVisibleItems=P;exports.getFirstId=x;exports.getFocusedChild=j;exports.getInitialState=I;exports.isArrayEqual=S;exports.isPresent=N;exports.renderChildren=y;
|
package/panelbar/util.mjs
CHANGED
|
@@ -20,11 +20,11 @@ const I = (r) => typeof r != "object" || !("type" in r) || r.type !== g, F = ({
|
|
|
20
20
|
level: s = 0,
|
|
21
21
|
parentPrivateKey: c = []
|
|
22
22
|
}) => {
|
|
23
|
-
const
|
|
23
|
+
const l = u.Children.toArray(o).filter(I), b = l.length ? l : o;
|
|
24
24
|
return u.Children.map(b, (a, x) => {
|
|
25
25
|
if (a && a.type === g) {
|
|
26
26
|
let y;
|
|
27
|
-
const f =
|
|
27
|
+
const f = m(a, c, x);
|
|
28
28
|
if (a.props.children) {
|
|
29
29
|
const v = {
|
|
30
30
|
animation: r,
|
|
@@ -39,30 +39,27 @@ const I = (r) => typeof r != "object" || !("type" in r) || r.type !== g, F = ({
|
|
|
39
39
|
};
|
|
40
40
|
y = F(v);
|
|
41
41
|
}
|
|
42
|
-
return u.cloneElement(
|
|
43
|
-
a,
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
);
|
|
60
|
-
} else
|
|
61
|
-
return /* @__PURE__ */ u.createElement("div", { className: "k-panelbar-content" }, a);
|
|
42
|
+
return u.cloneElement(a, {
|
|
43
|
+
...a.props,
|
|
44
|
+
animation: a.props.animation !== void 0 ? a.props.animation : r,
|
|
45
|
+
keepItemsMounted: n,
|
|
46
|
+
id: a.props.id || `k-panelbar-item-default-${f}`,
|
|
47
|
+
uniquePrivateKey: f,
|
|
48
|
+
parentUniquePrivateKey: c,
|
|
49
|
+
parentExpanded: i,
|
|
50
|
+
level: s,
|
|
51
|
+
expanded: (p || []).indexOf(f) > -1,
|
|
52
|
+
focused: e.focused === f && e.wrapperFocused,
|
|
53
|
+
selected: e.selected === f,
|
|
54
|
+
children: y,
|
|
55
|
+
onSelect: t
|
|
56
|
+
});
|
|
57
|
+
}
|
|
58
|
+
return /* @__PURE__ */ u.createElement("div", { className: "k-panelbar-content" }, a);
|
|
62
59
|
});
|
|
63
60
|
}, $ = (r) => {
|
|
64
61
|
const n = u.Children.toArray(r.children)[0];
|
|
65
|
-
return n ?
|
|
62
|
+
return n ? m(n, [], 0) : "";
|
|
66
63
|
}, q = (r, n, e = {
|
|
67
64
|
expanded: r.expanded || [],
|
|
68
65
|
selected: r.selected || "",
|
|
@@ -70,16 +67,13 @@ const I = (r) => typeof r != "object" || !("type" in r) || r.type !== g, F = ({
|
|
|
70
67
|
wrapperFocused: !1
|
|
71
68
|
}, p = !0, t = []) => (u.Children.map(r.children, (o, i) => {
|
|
72
69
|
if (o && o.type === g) {
|
|
73
|
-
const s =
|
|
74
|
-
!o.props.disabled && p && (o.props.selected && (e.selected = s), o.props.focused && (e.focused = s), o.props.expanded && (n === "multiple" ? e.expanded.push(s) : n === "single" && (e.expanded = [s])), o.props.children && (e = q(
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
!!o.props.expanded,
|
|
79
|
-
[...t, s]
|
|
80
|
-
)));
|
|
70
|
+
const s = m(o, t, i);
|
|
71
|
+
!o.props.disabled && p && (o.props.selected && (e.selected = s), o.props.focused && (e.focused = s), o.props.expanded && (n === "multiple" ? e.expanded.push(s) : n === "single" && (e.expanded = [s])), o.props.children && (e = q(o.props, n, e, !!o.props.expanded, [
|
|
72
|
+
...t,
|
|
73
|
+
s
|
|
74
|
+
])));
|
|
81
75
|
}
|
|
82
|
-
}), e),
|
|
76
|
+
}), e), m = (r, n, e) => r && r.props && r.props.id ? r.props.id : n.length ? n[n.length - 1] + `.${e}` : `.${e}`;
|
|
83
77
|
function C(r, n = []) {
|
|
84
78
|
return (r || []).forEach((e) => {
|
|
85
79
|
e.disabled || (n.push(e), e.expanded && e.children && C(e.children, n));
|
|
@@ -101,14 +95,7 @@ var E;
|
|
|
101
95
|
function n(e) {
|
|
102
96
|
return e.map((p, t) => {
|
|
103
97
|
let o;
|
|
104
|
-
return p.content && (o = p.content), p.children && (o = n(p.children)), /* @__PURE__ */ u.createElement(
|
|
105
|
-
g,
|
|
106
|
-
{
|
|
107
|
-
...p,
|
|
108
|
-
children: o,
|
|
109
|
-
key: p.id || t
|
|
110
|
-
}
|
|
111
|
-
);
|
|
98
|
+
return p.content && (o = p.content), p.children && (o = n(p.children)), /* @__PURE__ */ u.createElement(g, { ...p, children: o, key: p.id || t });
|
|
112
99
|
});
|
|
113
100
|
}
|
|
114
101
|
r.mapItemsToComponents = n;
|