@progress/kendo-react-layout 9.4.0-develop.1 → 9.4.0-develop.10
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/actionsheet/ActionSheet.js +1 -1
- package/actionsheet/ActionSheet.mjs +0 -1
- package/actionsheet/ActionSheetContent.js +1 -1
- package/actionsheet/ActionSheetContent.mjs +5 -6
- package/actionsheet/ActionSheetFooter.js +1 -1
- package/actionsheet/ActionSheetFooter.mjs +0 -1
- package/actionsheet/ActionSheetHeader.js +1 -1
- package/actionsheet/ActionSheetHeader.mjs +7 -8
- package/actionsheet/ActionSheetItem.js +1 -1
- package/actionsheet/ActionSheetItem.mjs +0 -1
- package/appbar/AppBar.js +1 -1
- package/appbar/AppBar.mjs +10 -11
- package/appbar/AppBarSection.js +1 -1
- package/appbar/AppBarSection.mjs +11 -12
- package/appbar/AppBarSpacer.js +1 -1
- package/appbar/AppBarSpacer.mjs +3 -4
- package/bottomnavigation/BottomNavigation.js +1 -1
- package/bottomnavigation/BottomNavigation.mjs +23 -24
- package/bottomnavigation/BottomNavigationItem.js +1 -1
- package/bottomnavigation/BottomNavigationItem.mjs +11 -12
- package/bottomnavigation/models/utils.js +1 -1
- package/bottomnavigation/models/utils.mjs +4 -5
- package/breadcrumb/Breadcrumb.js +1 -1
- package/breadcrumb/Breadcrumb.mjs +0 -1
- package/breadcrumb/BreadcrumbDelimiter.js +1 -1
- package/breadcrumb/BreadcrumbDelimiter.mjs +0 -1
- package/breadcrumb/BreadcrumbLink.js +1 -1
- package/breadcrumb/BreadcrumbLink.mjs +0 -1
- package/breadcrumb/BreadcrumbListItem.js +1 -1
- package/breadcrumb/BreadcrumbListItem.mjs +0 -1
- package/breadcrumb/BreadcrumbOrderedList.js +1 -1
- package/breadcrumb/BreadcrumbOrderedList.mjs +6 -7
- package/card/Avatar.js +1 -1
- package/card/Avatar.mjs +0 -1
- package/card/Card.js +1 -1
- package/card/Card.mjs +0 -1
- package/card/CardActions.js +1 -1
- package/card/CardActions.mjs +4 -5
- package/card/CardBody.js +1 -1
- package/card/CardBody.mjs +4 -5
- package/card/CardFooter.js +1 -1
- package/card/CardFooter.mjs +0 -1
- package/card/CardHeader.js +1 -1
- package/card/CardHeader.mjs +0 -1
- package/card/CardImage.js +1 -1
- package/card/CardImage.mjs +3 -4
- package/card/CardSubtitle.js +1 -1
- package/card/CardSubtitle.mjs +0 -1
- package/card/CardTitle.js +1 -1
- package/card/CardTitle.mjs +4 -5
- package/card/interfaces/Enums.js +1 -1
- package/card/interfaces/Enums.mjs +4 -5
- package/contextmenu/ContextMenu.js +1 -1
- package/contextmenu/ContextMenu.mjs +0 -1
- package/dist/cdn/js/kendo-react-layout.js +8 -1
- package/drawer/Drawer.js +1 -1
- package/drawer/Drawer.mjs +6 -7
- package/drawer/DrawerContent.js +1 -1
- package/drawer/DrawerContent.mjs +0 -1
- package/drawer/DrawerItem.js +1 -1
- package/drawer/DrawerItem.mjs +4 -5
- package/drawer/DrawerNavigation.js +1 -1
- package/drawer/DrawerNavigation.mjs +0 -1
- package/drawer/context/DrawerContext.js +1 -1
- package/drawer/context/DrawerContext.mjs +2 -3
- package/expansionpanel/ExpansionPanel.js +1 -1
- package/expansionpanel/ExpansionPanel.mjs +21 -22
- package/expansionpanel/ExpansionPanelContent.js +1 -1
- package/expansionpanel/ExpansionPanelContent.mjs +0 -1
- package/gridlayout/GridLayout.js +1 -1
- package/gridlayout/GridLayout.mjs +9 -10
- package/gridlayout/GridLayoutItem.js +1 -1
- package/gridlayout/GridLayoutItem.mjs +0 -1
- package/index.d.mts +92 -16
- package/index.d.ts +92 -16
- package/index.js +2 -1
- package/menu/components/Menu.js +1 -1
- package/menu/components/Menu.mjs +0 -1
- package/menu/components/MenuItem.js +1 -1
- package/menu/components/MenuItem.mjs +2 -3
- package/menu/components/MenuItemArrow.js +1 -1
- package/menu/components/MenuItemArrow.mjs +0 -1
- package/menu/components/MenuItemInternal.js +1 -1
- package/menu/components/MenuItemInternal.mjs +0 -1
- package/menu/components/MenuItemLink.js +1 -1
- package/menu/components/MenuItemLink.mjs +0 -1
- package/menu/consts.js +1 -1
- package/menu/consts.mjs +0 -1
- package/menu/utils/DirectionHolder.js +1 -1
- package/menu/utils/DirectionHolder.mjs +0 -1
- package/menu/utils/MouseOverHandler.js +1 -1
- package/menu/utils/MouseOverHandler.mjs +0 -1
- package/menu/utils/getNewItemIdUponKeyboardNavigation.js +1 -1
- package/menu/utils/getNewItemIdUponKeyboardNavigation.mjs +0 -1
- package/menu/utils/hoverDelay.js +1 -1
- package/menu/utils/hoverDelay.mjs +0 -1
- package/menu/utils/itemsIdsUtils.js +1 -1
- package/menu/utils/itemsIdsUtils.mjs +0 -1
- package/menu/utils/misc.js +1 -1
- package/menu/utils/misc.mjs +11 -12
- package/menu/utils/prepareInputItemsForInternalWork.js +1 -1
- package/menu/utils/prepareInputItemsForInternalWork.mjs +3 -4
- package/package-metadata.js +1 -1
- package/package-metadata.mjs +2 -3
- package/package.json +7 -7
- package/panelbar/PanelBar.js +1 -1
- package/panelbar/PanelBar.mjs +33 -34
- package/panelbar/PanelBarItem.js +1 -1
- package/panelbar/PanelBarItem.mjs +0 -1
- package/panelbar/interfaces/NavigationAction.js +1 -1
- package/panelbar/interfaces/NavigationAction.mjs +0 -1
- package/panelbar/util.js +1 -1
- package/panelbar/util.mjs +18 -19
- package/splitter/Splitter.js +1 -1
- package/splitter/Splitter.mjs +0 -1
- package/splitter/SplitterBar.js +1 -1
- package/splitter/SplitterBar.mjs +0 -1
- package/splitter/SplitterPane.js +1 -1
- package/splitter/SplitterPane.mjs +9 -10
- package/splitter/messages/index.js +1 -1
- package/splitter/messages/index.mjs +2 -3
- package/stacklayout/StackLayout.js +1 -1
- package/stacklayout/StackLayout.mjs +3 -4
- package/stepper/Step.js +1 -1
- package/stepper/Step.mjs +15 -16
- package/stepper/Stepper.js +1 -1
- package/stepper/Stepper.mjs +0 -1
- package/stepper/contants.js +1 -1
- package/stepper/contants.mjs +0 -1
- package/stepper/context/StepperContext.js +1 -1
- package/stepper/context/StepperContext.mjs +0 -1
- package/stepper/messages/index.js +1 -1
- package/stepper/messages/index.mjs +0 -1
- package/tabstrip/TabStrip.js +1 -1
- package/tabstrip/TabStrip.mjs +110 -79
- package/tabstrip/TabStripContent.js +1 -1
- package/tabstrip/TabStripContent.mjs +0 -1
- package/tabstrip/TabStripNavigation.js +1 -1
- package/tabstrip/TabStripNavigation.mjs +110 -117
- package/tabstrip/TabStripNavigationItem.js +1 -1
- package/tabstrip/TabStripNavigationItem.mjs +7 -8
- package/tabstrip/TabStripTab.js +1 -1
- package/tabstrip/TabStripTab.mjs +4 -5
- package/tabstrip/messages/index.js +1 -1
- package/tabstrip/messages/index.mjs +0 -1
- package/tilelayout/InternalTile.js +1 -1
- package/tilelayout/InternalTile.mjs +0 -1
- package/tilelayout/ResizeHandlers.js +1 -1
- package/tilelayout/ResizeHandlers.mjs +10 -11
- package/tilelayout/TileLayout.js +1 -1
- package/tilelayout/TileLayout.mjs +0 -1
- package/timeline/Timeline.js +1 -1
- package/timeline/Timeline.mjs +17 -18
- package/timeline/TimelineCard.js +1 -1
- package/timeline/TimelineCard.mjs +4 -5
- package/timeline/TimelineHorizontal.js +1 -1
- package/timeline/TimelineHorizontal.mjs +0 -1
- package/timeline/TimelineVertical.js +1 -1
- package/timeline/TimelineVertical.mjs +0 -1
- package/timeline/utils.js +1 -1
- package/timeline/utils.mjs +6 -7
|
@@ -5,7 +5,6 @@
|
|
|
5
5
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
|
-
"use client";
|
|
9
8
|
import * as e from "react";
|
|
10
9
|
import t from "prop-types";
|
|
11
10
|
import { classNames as r } from "@progress/kendo-react-common";
|
package/menu/consts.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
|
|
8
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o={vertical:"top",horizontal:"left"},t={vertical:"top",horizontal:"right"},i={vertical:"flip",horizontal:"fit"},l={vertical:"fit",horizontal:"flip"},n={downward:{anchorAlign:{vertical:"bottom",horizontal:"right"},popupAlign:t,collision:i},leftward:{anchorAlign:{vertical:"top",horizontal:"left"},popupAlign:t,collision:l}},r={downward:{anchorAlign:{vertical:"bottom",horizontal:"left"},popupAlign:o,collision:i},rightward:{anchorAlign:{vertical:"top",horizontal:"right"},popupAlign:o,collision:l}};exports.POPUP_SETTINGS=r;exports.POPUP_SETTINGS_RTL=n;
|
package/menu/consts.mjs
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
|
|
8
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});class e{constructor(){this.phase="Initialized"}getIsDirectionRightToLeft(){return this.isDirectionRightToLeft}setIsDirectionRightToLeft(i){this.phase=this.phase==="NotInitialized"?"Initialized":"NewValueReceived",this.previousIsDirectionRightToLeft=this.isDirectionRightToLeft,this.isDirectionRightToLeft=i}hasDirectionChanged(){return this.phase==="NewValueReceived"?this.previousIsDirectionRightToLeft!==this.isDirectionRightToLeft:!1}}exports.DirectionHolder=e;
|
|
@@ -5,7 +5,6 @@
|
|
|
5
5
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
|
-
"use client";
|
|
9
8
|
class e {
|
|
10
9
|
constructor() {
|
|
11
10
|
this.phase = "Initialized";
|
|
@@ -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
|
|
8
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});class i{constructor(e,s,t){this.openOnClick=e,this.resetMenu=s,this.openItem=t,this.mouseDown=!1,this.openOnClick=e,this.isMouseOverEnabled=!e}set OpenOnClick(e){!!e!=!!this.openOnClick&&(this.mouseDown=!1,this.isMouseOverEnabled=!e),this.openOnClick=e}handleItemSelectedViaKeyboard(){this.openOnClick&&(this.isMouseOverEnabled=!1,this.resetMenu())}get IsMouseOverEnabled(){return this.isMouseOverEnabled}handleItemMouseDown(){this.mouseDown=!0}handleItemFocus(){this.openOnClick&&!this.mouseDown&&(this.isMouseOverEnabled=!0),this.mouseDown=!1}handleItemClick(e,s){this.openOnClick&&(this.isMouseOverEnabled?s&&(this.isMouseOverEnabled=!1,this.resetMenu()):(this.isMouseOverEnabled=!0,this.openItem(e)))}}exports.MouseOverHandler=i;
|
|
@@ -5,7 +5,6 @@
|
|
|
5
5
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
|
-
"use client";
|
|
9
8
|
class n {
|
|
10
9
|
constructor(e, s, i) {
|
|
11
10
|
this.openOnClick = e, this.resetMenu = s, this.openItem = i, this.mouseDown = !1, this.openOnClick = e, this.isMouseOverEnabled = !e;
|
|
@@ -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
|
|
8
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("@progress/kendo-react-common"),n=require("./itemsIdsUtils.js"),A=/\S/;function M(u,e,P,y,l,d){const Z=g();switch(P){case i.Keys.left:return E();case i.Keys.right:return w();case i.Keys.up:return O();case i.Keys.down:return N();case i.Keys.enter:case i.Keys.space:return R();case i.Keys.home:return D();case i.Keys.end:return G();case i.Keys.esc:return H();default:return q()?B():e}function E(){return l?d?v():S():d?p():b()}function w(){return l?d?S():v():d?b():p()}function N(){return l?a():n.isIdZeroLevel(e)?s():a()}function O(){return l?c():n.isIdZeroLevel(e)?L():c()}function R(){return Z.disabled?e:f()?n.getFirstChildId(e):n.getRootParentId(e)}function D(){return K()[0].id}function G(){const t=K();return t[t.length-1].id}function H(){return n.isIdZeroLevel(e)?e:n.getDirectParentId(e)}function B(){const t=y.toLowerCase(),r=K(),o=Number(n.getShortId(e)),h=r.slice(o+1).concat(r.slice(0,o+1)).find(z=>(z.text||"").toLowerCase().startsWith(t));return h?h.id:e}function b(){return n.isIdZeroLevel(e)?c():n.isIdFirstLevel(e)?s(c(n.getRootParentId(e))):n.getDirectParentId(e)}function S(){return n.isIdZeroLevel(e)?L():n.getDirectParentId(e)}function p(){return n.isIdZeroLevel(e)?a():s(f()?e:a(n.getRootParentId(e)))}function v(){return s(n.isIdZeroLevel(e)||f()?e:a(n.getRootParentId(e)))}function s(t){return U(!0,t)}function L(t){return U(!1,t)}function q(){return y.length===1&&A.test(y)}function g(t,r){return t===void 0&&(t=e),r===void 0&&(r=u),n.getItemById(t,r)}function f(t){return g(t).items.length>0}function c(t){return C(!1,t)}function a(t){return C(!0,t)}function x(t){const r=g(t).items;return r[r.length-1].id}function K(){return n.isIdZeroLevel(e)?u:g(n.getDirectParentId(e),u).items}function U(t,r){r===void 0&&(r=e);const o=g(r);return f(r)&&!o.disabled?t?n.getFirstChildId(r):x(r):r}function C(t,r){if(r===void 0&&(r=e),n.isIdZeroLevel(r))return n.getDirectSiblingIdForLevelZero(t,r,u.length);const o=n.getDirectParentId(r),F=n.getShortId(r),h=g(o).items.length;return n.createId(n.getDirectSiblingIdForLevelZero(t,F,h),o)}}exports.getNewItemIdUponKeyboardNavigation=M;
|
|
@@ -5,7 +5,6 @@
|
|
|
5
5
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
|
-
"use client";
|
|
9
8
|
import { Keys as e } from "@progress/kendo-react-common";
|
|
10
9
|
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
10
|
const Q = /\S/;
|
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
|
|
8
|
+
"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;
|
|
@@ -5,7 +5,6 @@
|
|
|
5
5
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
|
-
"use client";
|
|
9
8
|
function n(e) {
|
|
10
9
|
return e.hoverOpenDelay !== void 0 ? e.hoverOpenDelay : e.openOnClick ? 0 : 100;
|
|
11
10
|
}
|
|
@@ -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
|
|
8
|
+
"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;
|
|
@@ -5,7 +5,6 @@
|
|
|
5
5
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
|
-
"use client";
|
|
9
8
|
const u = "", c = "0", t = "_";
|
|
10
9
|
function f(n, r) {
|
|
11
10
|
if (i(n))
|
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
|
|
8
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("../consts.js"),d=require("./itemsIdsUtils.js");function u(r,t,e){const o=i(r,t,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(r,t,e){return d.isIdZeroLevel(r)?t?e?"leftward":"rightward":"downward":e?"leftward":"rightward"}function P(r){return r?"rtl":"ltr"}function l(r,t){return`${r}_${t}`}exports.convertBoolDirectionToString=P;exports.getChildrenPosition=i;exports.getDOMElementId=l;exports.getPopupSettings=u;
|
package/menu/utils/misc.mjs
CHANGED
|
@@ -5,25 +5,24 @@
|
|
|
5
5
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
|
-
|
|
9
|
-
import {
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
return t ? e === "downward" ? o.downward : o.leftward : e === "downward" ? d.downward : d.rightward;
|
|
8
|
+
import { POPUP_SETTINGS_RTL as d, POPUP_SETTINGS as e } from "../consts.mjs";
|
|
9
|
+
import { isIdZeroLevel as w } from "./itemsIdsUtils.mjs";
|
|
10
|
+
function f(r, n, t) {
|
|
11
|
+
const o = i(r, n, t);
|
|
12
|
+
return t ? o === "downward" ? d.downward : d.leftward : o === "downward" ? e.downward : e.rightward;
|
|
14
13
|
}
|
|
15
|
-
function
|
|
16
|
-
return
|
|
14
|
+
function i(r, n, t) {
|
|
15
|
+
return w(r) ? n ? t ? "leftward" : "rightward" : "downward" : t ? "leftward" : "rightward";
|
|
17
16
|
}
|
|
18
|
-
function
|
|
17
|
+
function l(r) {
|
|
19
18
|
return r ? "rtl" : "ltr";
|
|
20
19
|
}
|
|
21
20
|
function P(r, n) {
|
|
22
21
|
return `${r}_${n}`;
|
|
23
22
|
}
|
|
24
23
|
export {
|
|
25
|
-
|
|
26
|
-
|
|
24
|
+
l as convertBoolDirectionToString,
|
|
25
|
+
i as getChildrenPosition,
|
|
27
26
|
P as getDOMElementId,
|
|
28
|
-
|
|
27
|
+
f as getPopupSettings
|
|
29
28
|
};
|
|
@@ -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
|
|
8
|
+
"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;
|
|
@@ -5,7 +5,6 @@
|
|
|
5
5
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
|
-
"use client";
|
|
9
8
|
import * as C from "react";
|
|
10
9
|
import { createId as g, ZERO_LEVEL_ZERO_ITEM_ID as y } from "./itemsIdsUtils.mjs";
|
|
11
10
|
import { MenuItem as x } from "../components/MenuItem.mjs";
|
|
@@ -29,14 +28,14 @@ function h(e, n) {
|
|
|
29
28
|
svgIcon: d,
|
|
30
29
|
disabled: u,
|
|
31
30
|
cssClass: f,
|
|
32
|
-
cssStyle:
|
|
33
|
-
render:
|
|
31
|
+
cssStyle: a,
|
|
32
|
+
render: l,
|
|
34
33
|
linkRender: p,
|
|
35
34
|
contentRender: m,
|
|
36
35
|
data: I,
|
|
37
36
|
separator: v
|
|
38
37
|
} = 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),
|
|
38
|
+
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), a !== void 0 && (t.cssStyle = a), l !== void 0 && (t.render = l), 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;
|
|
40
39
|
}
|
|
41
40
|
function s(e) {
|
|
42
41
|
return C.Children.toArray(e).filter((n) => n && n.type === x);
|
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
|
|
8
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e={name:"@progress/kendo-react-layout",productName:"KendoReact",productCode:"KENDOUIREACT",productCodes:["KENDOUIREACT"],publishDate: 1738310036,version:"9.4.0-develop.10",licensingDocsUrl:"https://www.telerik.com/kendo-react-ui/components/my-license/"};exports.packageMetadata=e;
|
package/package-metadata.mjs
CHANGED
|
@@ -5,14 +5,13 @@
|
|
|
5
5
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
|
-
"use client";
|
|
9
8
|
const e = {
|
|
10
9
|
name: "@progress/kendo-react-layout",
|
|
11
10
|
productName: "KendoReact",
|
|
12
11
|
productCode: "KENDOUIREACT",
|
|
13
12
|
productCodes: ["KENDOUIREACT"],
|
|
14
|
-
publishDate:
|
|
15
|
-
version: "9.4.0-develop.
|
|
13
|
+
publishDate: 1738310036,
|
|
14
|
+
version: "9.4.0-develop.10",
|
|
16
15
|
licensingDocsUrl: "https://www.telerik.com/kendo-react-ui/components/my-license/"
|
|
17
16
|
};
|
|
18
17
|
export {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@progress/kendo-react-layout",
|
|
3
|
-
"version": "9.4.0-develop.
|
|
3
|
+
"version": "9.4.0-develop.10",
|
|
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,11 +26,11 @@
|
|
|
26
26
|
"sideEffects": false,
|
|
27
27
|
"peerDependencies": {
|
|
28
28
|
"@progress/kendo-licensing": "^1.3.4",
|
|
29
|
-
"@progress/kendo-react-animation": "9.4.0-develop.
|
|
30
|
-
"@progress/kendo-react-common": "9.4.0-develop.
|
|
31
|
-
"@progress/kendo-react-intl": "9.4.0-develop.
|
|
32
|
-
"@progress/kendo-react-popup": "9.4.0-develop.
|
|
33
|
-
"@progress/kendo-react-progressbars": "9.4.0-develop.
|
|
29
|
+
"@progress/kendo-react-animation": "9.4.0-develop.10",
|
|
30
|
+
"@progress/kendo-react-common": "9.4.0-develop.10",
|
|
31
|
+
"@progress/kendo-react-intl": "9.4.0-develop.10",
|
|
32
|
+
"@progress/kendo-react-popup": "9.4.0-develop.10",
|
|
33
|
+
"@progress/kendo-react-progressbars": "9.4.0-develop.10",
|
|
34
34
|
"@progress/kendo-svg-icons": "^4.0.0",
|
|
35
35
|
"react": "^16.8.2 || ^17.0.0 || ^18.0.0 || ^19.0.0 || ^19.0.0-rc",
|
|
36
36
|
"react-dom": "^16.8.2 || ^17.0.0 || ^18.0.0 || ^19.0.0 || ^19.0.0-rc"
|
|
@@ -60,7 +60,7 @@
|
|
|
60
60
|
"package": {
|
|
61
61
|
"productName": "KendoReact",
|
|
62
62
|
"productCode": "KENDOUIREACT",
|
|
63
|
-
"publishDate":
|
|
63
|
+
"publishDate": 1738310036,
|
|
64
64
|
"licensingDocsUrl": "https://www.telerik.com/kendo-react-ui/components/my-license/"
|
|
65
65
|
}
|
|
66
66
|
},
|
package/panelbar/PanelBar.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
|
|
8
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const b=require("react"),l=require("prop-types"),v=require("./PanelBarItem.js"),p=require("./util.js"),o=require("@progress/kendo-react-common"),k=require("../package-metadata.js"),a=require("./interfaces/NavigationAction.js");function P(d){const n=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(d){for(const r in d)if(r!=="default"){const e=Object.getOwnPropertyDescriptor(d,r);Object.defineProperty(n,r,e.get?e:{enumerable:!0,get:()=>d[r]})}}return n.default=d,Object.freeze(n)}const u=P(b),g=class g extends u.Component{constructor(n){super(n),this._element=null,this.showLicenseWatermark=!1,this.handleSelect=e=>{this.onSelect(e),this.onFocus(e)},this.onSelect=e=>{const c=p.flatChildren(u.Children.toArray(this.children));let i,s;switch(c.forEach(t=>{t.props.uniquePrivateKey===(e.uniquePrivateKey||this.state.focused)&&(i=t)}),this.expandMode){case"single":s=[...i.props.parentUniquePrivateKey,i.props.uniquePrivateKey],p.isArrayEqual(this.expandedItems,s)&&(i.props.parentUniquePrivateKey?s=[...i.props.parentUniquePrivateKey]:s=[]);break;case"multiple":{s=this.expandedItems.slice();const t=s.indexOf(i.props.uniquePrivateKey);t===-1?s.push(i.props.uniquePrivateKey):s.splice(t,1);break}default:s=this.expandedItems.slice();break}this.setState({selected:i.props.uniquePrivateKey,expanded:s}),this.props.onSelect&&this.props.onSelect.call(void 0,{target:i,expandedItems:s})},this.onFocus=(e,c=0,i)=>{const s=p.flatVisibleChildren(u.Children.toArray(this.children)),t=p.getFocusedChild(s,c,e,this.state.focused,i);if(t){const h=this.expandedItems.slice();if(i===a.NavigationAction.Right&&t&&t.props&&t.props.children&&t.props.children.length>0){if(h.push(t.props.uniquePrivateKey),this.setState({expanded:[...new Set(h)]}),t.props.expanded){const f=t.props.children[0].props.uniquePrivateKey;this.setState({focused:f})}}else if(i===a.NavigationAction.Left&&(t&&t.props&&t.props.parentUniquePrivateKey&&t.props.parentUniquePrivateKey.length>0||t&&t.props&&!t.props.disabled&&t.props.children&&t.props.children.length>0)){const f=t.props.parentUniquePrivateKey;if(t.props.expanded){const m=t.props.uniquePrivateKey,x=h.indexOf(m);h.splice(x,1),this.setState({expanded:h})}else if(t.props.level>0){const m=t.props.parentUniquePrivateKey[f.length-1];this.setState({focused:m})}}else this.activeDescendant=t.props.id,this.setState({focused:t.props.uniquePrivateKey})}},this.onNavigate=(e,c)=>{let i;switch(c){case a.NavigationAction.First:this.onFocus(e,i,a.NavigationAction.First);break;case a.NavigationAction.Last:this.onFocus(e,i,a.NavigationAction.Last);break;case a.NavigationAction.Left:this.onFocus(e,i,a.NavigationAction.Left);break;case a.NavigationAction.Right:this.onFocus(e,i,a.NavigationAction.Right);break;case a.NavigationAction.Previous:i=-1,this.onFocus(e,i);break;case a.NavigationAction.Next:i=1,this.onFocus(e,i);break;case a.NavigationAction.Toggle:this.onSelect(e);break}},this.handleWrapperFocus=()=>{clearTimeout(this.nextTickId),this.state.wrapperFocused||this.setState({wrapperFocused:!0})},this.handleWrapperBlur=()=>{this.nextTick(()=>{this.setState({wrapperFocused:!1})})},this.handleKeyDown=e=>{const c=this._element&&getComputedStyle(this._element).direction==="rtl"||!1;if(e.target===e.currentTarget){const i=e.keyCode;let s;switch(i){case o.Keys.left:s=c?a.NavigationAction.Right:a.NavigationAction.Left;break;case o.Keys.up:s=a.NavigationAction.Previous;break;case o.Keys.right:s=c?a.NavigationAction.Left:a.NavigationAction.Right;break;case o.Keys.down:s=a.NavigationAction.Next;break;case o.Keys.home:s=a.NavigationAction.First;break;case o.Keys.end:s=a.NavigationAction.Last;break;case o.Keys.space:case o.Keys.enter:s=a.NavigationAction.Toggle;break;default:s=null;break}s!==null&&(e.preventDefault(),this.onNavigate(e,s))}},o.validatePackage(k.packageMetadata),this.showLicenseWatermark=o.shouldShowValidationUI(k.packageMetadata);const r=p.getInitialState(n,this.expandMode);r.focused||(r.focused=p.getFirstId(n)),this.state=r}get expandMode(){return this.props.expandMode||"multiple"}get selectedItem(){const{selected:n=this.state.selected}=this.props;return n}get expandedItems(){return this.props.isControlled?this.props.expanded||[]:this.state.expanded}get children(){const n={...this.state,selected:this.selectedItem},r={animation:this.props.animation,keepItemsMounted:this.props.keepItemsMounted,state:n,expanded:this.expandedItems,handleSelect:this.handleSelect,children:this.props.children};return p.renderChildren(r)}render(){const n={"aria-activedescendant":this.activeDescendant},r=o.classNames("k-panelbar",this.props.className);return u.createElement("ul",{ref:e=>{this._element=e},dir:this.props.dir,role:"tree",tabIndex:0,onKeyDown:this.handleKeyDown,onFocus:this.handleWrapperFocus,onBlur:this.handleWrapperBlur,className:r,style:this.props.style,...n},this.children,this.showLicenseWatermark&&u.createElement(o.WatermarkOverlay,null))}nextTick(n){this.nextTickId=window.setTimeout(()=>n())}};g.propTypes={animation:l.bool,children:function(n,r){const e=n[r];if(e){if(Array.isArray(e)){for(const c of e)if(!c.type||c.type!==v.PanelBarItem)return new Error("PanelBar children should be either PanelBarItem or Array of PanelBarItem.")}else if(e.type!==v.PanelBarItem)return new Error("PanelBar child should be either PanelBarItem or Array of PanelBarItem.");return null}return null},dir:l.string,selected:l.string,expanded:l.arrayOf(l.string),focused:l.string,expandMode:l.oneOf(["single","multiple"]),className:l.string,keepItemsMounted:l.bool,onSelect:l.func,style:l.object},g.defaultProps={expandMode:"multiple",animation:!0,keepItemsMounted:!1};let y=g;exports.PanelBar=y;
|
package/panelbar/PanelBar.mjs
CHANGED
|
@@ -5,51 +5,50 @@
|
|
|
5
5
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
|
-
"use client";
|
|
9
8
|
import * as c from "react";
|
|
10
9
|
import o from "prop-types";
|
|
11
10
|
import { PanelBarItem as m } from "./PanelBarItem.mjs";
|
|
12
11
|
import { flatChildren as k, isArrayEqual as P, flatVisibleChildren as b, getFocusedChild as I, getInitialState as S, getFirstId as K, renderChildren as v } from "./util.mjs";
|
|
13
12
|
import { Keys as l, validatePackage as w, shouldShowValidationUI as F, classNames as q, WatermarkOverlay as C } from "@progress/kendo-react-common";
|
|
14
13
|
import { packageMetadata as y } from "../package-metadata.mjs";
|
|
15
|
-
import { NavigationAction as
|
|
14
|
+
import { NavigationAction as i } from "./interfaces/NavigationAction.mjs";
|
|
16
15
|
const h = class h extends c.Component {
|
|
17
16
|
constructor(a) {
|
|
18
17
|
super(a), this._element = null, this.showLicenseWatermark = !1, this.handleSelect = (t) => {
|
|
19
18
|
this.onSelect(t), this.onFocus(t);
|
|
20
19
|
}, this.onSelect = (t) => {
|
|
21
20
|
const n = k(c.Children.toArray(this.children));
|
|
22
|
-
let s,
|
|
21
|
+
let s, r;
|
|
23
22
|
switch (n.forEach((e) => {
|
|
24
23
|
e.props.uniquePrivateKey === (t.uniquePrivateKey || this.state.focused) && (s = e);
|
|
25
24
|
}), this.expandMode) {
|
|
26
25
|
case "single":
|
|
27
|
-
|
|
26
|
+
r = [...s.props.parentUniquePrivateKey, s.props.uniquePrivateKey], P(this.expandedItems, r) && (s.props.parentUniquePrivateKey ? r = [...s.props.parentUniquePrivateKey] : r = []);
|
|
28
27
|
break;
|
|
29
28
|
case "multiple": {
|
|
30
|
-
|
|
31
|
-
const e =
|
|
32
|
-
e === -1 ?
|
|
29
|
+
r = this.expandedItems.slice();
|
|
30
|
+
const e = r.indexOf(s.props.uniquePrivateKey);
|
|
31
|
+
e === -1 ? r.push(s.props.uniquePrivateKey) : r.splice(e, 1);
|
|
33
32
|
break;
|
|
34
33
|
}
|
|
35
34
|
default:
|
|
36
|
-
|
|
35
|
+
r = this.expandedItems.slice();
|
|
37
36
|
break;
|
|
38
37
|
}
|
|
39
|
-
this.setState({ selected: s.props.uniquePrivateKey, expanded:
|
|
38
|
+
this.setState({ selected: s.props.uniquePrivateKey, expanded: r }), this.props.onSelect && this.props.onSelect.call(void 0, {
|
|
40
39
|
target: s,
|
|
41
|
-
expandedItems:
|
|
40
|
+
expandedItems: r
|
|
42
41
|
});
|
|
43
42
|
}, this.onFocus = (t, n = 0, s) => {
|
|
44
|
-
const
|
|
43
|
+
const r = b(c.Children.toArray(this.children)), e = I(r, n, t, this.state.focused, s);
|
|
45
44
|
if (e) {
|
|
46
45
|
const d = this.expandedItems.slice();
|
|
47
|
-
if (s ===
|
|
46
|
+
if (s === i.Right && e && e.props && e.props.children && e.props.children.length > 0) {
|
|
48
47
|
if (d.push(e.props.uniquePrivateKey), this.setState({ expanded: [...new Set(d)] }), e.props.expanded) {
|
|
49
48
|
const u = e.props.children[0].props.uniquePrivateKey;
|
|
50
49
|
this.setState({ focused: u });
|
|
51
50
|
}
|
|
52
|
-
} else if (s ===
|
|
51
|
+
} else if (s === i.Left && (e && e.props && e.props.parentUniquePrivateKey && e.props.parentUniquePrivateKey.length > 0 || e && e.props && !e.props.disabled && e.props.children && e.props.children.length > 0)) {
|
|
53
52
|
const u = e.props.parentUniquePrivateKey;
|
|
54
53
|
if (e.props.expanded) {
|
|
55
54
|
const f = e.props.uniquePrivateKey, g = d.indexOf(f);
|
|
@@ -64,25 +63,25 @@ const h = class h extends c.Component {
|
|
|
64
63
|
}, this.onNavigate = (t, n) => {
|
|
65
64
|
let s;
|
|
66
65
|
switch (n) {
|
|
67
|
-
case
|
|
68
|
-
this.onFocus(t, s,
|
|
66
|
+
case i.First:
|
|
67
|
+
this.onFocus(t, s, i.First);
|
|
69
68
|
break;
|
|
70
|
-
case
|
|
71
|
-
this.onFocus(t, s,
|
|
69
|
+
case i.Last:
|
|
70
|
+
this.onFocus(t, s, i.Last);
|
|
72
71
|
break;
|
|
73
|
-
case
|
|
74
|
-
this.onFocus(t, s,
|
|
72
|
+
case i.Left:
|
|
73
|
+
this.onFocus(t, s, i.Left);
|
|
75
74
|
break;
|
|
76
|
-
case
|
|
77
|
-
this.onFocus(t, s,
|
|
75
|
+
case i.Right:
|
|
76
|
+
this.onFocus(t, s, i.Right);
|
|
78
77
|
break;
|
|
79
|
-
case
|
|
78
|
+
case i.Previous:
|
|
80
79
|
s = -1, this.onFocus(t, s);
|
|
81
80
|
break;
|
|
82
|
-
case
|
|
81
|
+
case i.Next:
|
|
83
82
|
s = 1, this.onFocus(t, s);
|
|
84
83
|
break;
|
|
85
|
-
case
|
|
84
|
+
case i.Toggle:
|
|
86
85
|
this.onSelect(t);
|
|
87
86
|
break;
|
|
88
87
|
}
|
|
@@ -96,35 +95,35 @@ const h = class h extends c.Component {
|
|
|
96
95
|
const n = this._element && getComputedStyle(this._element).direction === "rtl" || !1;
|
|
97
96
|
if (t.target === t.currentTarget) {
|
|
98
97
|
const s = t.keyCode;
|
|
99
|
-
let
|
|
98
|
+
let r;
|
|
100
99
|
switch (s) {
|
|
101
100
|
case l.left:
|
|
102
|
-
|
|
101
|
+
r = n ? i.Right : i.Left;
|
|
103
102
|
break;
|
|
104
103
|
case l.up:
|
|
105
|
-
|
|
104
|
+
r = i.Previous;
|
|
106
105
|
break;
|
|
107
106
|
case l.right:
|
|
108
|
-
|
|
107
|
+
r = n ? i.Left : i.Right;
|
|
109
108
|
break;
|
|
110
109
|
case l.down:
|
|
111
|
-
|
|
110
|
+
r = i.Next;
|
|
112
111
|
break;
|
|
113
112
|
case l.home:
|
|
114
|
-
|
|
113
|
+
r = i.First;
|
|
115
114
|
break;
|
|
116
115
|
case l.end:
|
|
117
|
-
|
|
116
|
+
r = i.Last;
|
|
118
117
|
break;
|
|
119
118
|
case l.space:
|
|
120
119
|
case l.enter:
|
|
121
|
-
|
|
120
|
+
r = i.Toggle;
|
|
122
121
|
break;
|
|
123
122
|
default:
|
|
124
|
-
|
|
123
|
+
r = null;
|
|
125
124
|
break;
|
|
126
125
|
}
|
|
127
|
-
|
|
126
|
+
r !== null && (t.preventDefault(), this.onNavigate(t, r));
|
|
128
127
|
}
|
|
129
128
|
}, w(y), this.showLicenseWatermark = F(y);
|
|
130
129
|
const p = S(a, this.expandMode);
|
package/panelbar/PanelBarItem.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
|
|
8
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const P=require("react"),t=require("prop-types"),c=require("@progress/kendo-react-common"),y=require("@progress/kendo-svg-icons"),T=require("@progress/kendo-react-animation");function A(i){const n=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(i){for(const e in i)if(e!=="default"){const s=Object.getOwnPropertyDescriptor(i,e);Object.defineProperty(n,e,s.get?s:{enumerable:!0,get:()=>i[e]})}}return n.default=i,Object.freeze(n)}const a=A(P);function j({imageUrl:i,icon:n,svgIcon:e,iconClass:s}){return i?a.createElement("img",{role:"presentation",className:"k-panelbar-item-icon k-image",src:i}):n||e?a.createElement(c.IconWrap,{className:"k-panelbar-item-icon",name:n,icon:e}):s?a.createElement("span",{role:"presentation",className:"k-panelbar-item-icon "+s}):null}const d=class d extends a.PureComponent{constructor(n){super(n),this.handleItemClick=()=>{const{onSelect:e,disabled:s,id:p}=this.props;e&&!s&&e.call(void 0,{uniquePrivateKey:this.props.uniquePrivateKey,id:p,target:this})},this.childFactory=e=>this.props.keepItemsMounted?a.cloneElement(e,{...e.props,in:this.props.expanded}):e,this.state={show:n.expanded||!1}}render(){const{id:n,children:e,title:s,uniquePrivateKey:p,disabled:r,selected:m,focused:g,expanded:o,className:v,level:h,headerClassName:N,animation:b,keepItemsMounted:l}=this.props,E={role:"treeitem","aria-disabled":r,"aria-hidden":!r&&!o,"aria-selected":!r&&m,"aria-expanded":!r&&o&&!!e},x=c.classNames("k-panelbar-item",{"k-panelbar-header":h===0,"k-expanded":o&&!!e,"k-disabled":r},`k-level-${h}`,v),I=c.classNames("k-link",{"k-selected":!r&&m,"k-focus":g},N),S={display:"block"},C=j(this.props),O=!r&&e?a.createElement(c.IconWrap,{name:o?"chevron-up":"chevron-down",icon:o?y.chevronUpIcon:y.chevronDownIcon,className:c.classNames("k-panelbar-toggle",o?"k-panelbar-collapse":"k-panelbar-expand")}):null;let k=!1;e&&e[0]&&Array.isArray(e)&&(k=e[0].type===d);const q=k?a.createElement("ul",{role:"group","aria-expanded":o,"aria-hidden":!o,className:"k-panelbar-group",style:{display:l?this.state.show?"block":"none":"block"}},e):e,f=!r&&o||l?q:null,w=(b===void 0||b)&&!r&&e?a.createElement(T.Reveal,{transitionEnterDuration:200,transitionExitDuration:200,key:p+"_animation",style:S,children:f,childFactory:l&&this.childFactory,unmountOnExit:!l,onBeforeEnter:()=>l&&this.setState({show:!0}),onAfterExited:()=>l&&this.setState({show:!1})}):f;return a.createElement("li",{id:n,className:x,...E},a.createElement("span",{className:I,onClick:this.handleItemClick},C,a.createElement("span",{className:"k-panelbar-item-text"},s),O),w)}};d.propTypes={animation:t.bool,children:t.any,className:t.string,icon:t.string,iconClass:t.string,imageUrl:t.string,svgIcon:c.svgIconPropType,expanded:t.bool,disabled:t.bool,onSelect:t.func,selected:t.bool,level:t.number,title:t.oneOfType([t.string,t.element]),id:t.oneOfType([t.string,t.number]),focused:t.bool,keepItemsMounted:t.bool},d.defaultProps={title:"Untitled"};let u=d;exports.PanelBarItem=u;
|
|
@@ -5,7 +5,6 @@
|
|
|
5
5
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
|
-
"use client";
|
|
9
8
|
import * as n from "react";
|
|
10
9
|
import t from "prop-types";
|
|
11
10
|
import { svgIconPropType as P, classNames as p, IconWrap as y } from "@progress/kendo-react-common";
|
|
@@ -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
|
|
8
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});var r=(e=>(e[e.Toggle=0]="Toggle",e[e.Next=1]="Next",e[e.Previous=2]="Previous",e[e.First=3]="First",e[e.Last=4]="Last",e[e.Left=5]="Left",e[e.Right=6]="Right",e))(r||{});exports.NavigationAction=r;
|
|
@@ -5,7 +5,6 @@
|
|
|
5
5
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
|
-
"use client";
|
|
9
8
|
var r = /* @__PURE__ */ ((e) => (e[e.Toggle = 0] = "Toggle", e[e.Next = 1] = "Next", e[e.Previous = 2] = "Previous", e[e.First = 3] = "First", e[e.Last = 4] = "Last", e[e.Left = 5] = "Left", e[e.Right = 6] = "Right", e))(r || {});
|
|
10
9
|
export {
|
|
11
10
|
r as NavigationAction
|
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
|
|
8
|
+
"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;
|