@progress/kendo-react-layout 9.4.0-develop.6 → 9.4.0-develop.7
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/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.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 +16 -17
- package/tabstrip/TabStripContent.js +1 -1
- package/tabstrip/TabStripContent.mjs +0 -1
- package/tabstrip/TabStripNavigation.js +1 -1
- package/tabstrip/TabStripNavigation.mjs +25 -26
- 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,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: 1738077047,version:"9.4.0-develop.7",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: 1738077047,
|
|
14
|
+
version: "9.4.0-develop.7",
|
|
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.7",
|
|
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.7",
|
|
30
|
+
"@progress/kendo-react-common": "9.4.0-develop.7",
|
|
31
|
+
"@progress/kendo-react-intl": "9.4.0-develop.7",
|
|
32
|
+
"@progress/kendo-react-popup": "9.4.0-develop.7",
|
|
33
|
+
"@progress/kendo-react-progressbars": "9.4.0-develop.7",
|
|
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": 1738077047,
|
|
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;
|
package/panelbar/util.mjs
CHANGED
|
@@ -5,8 +5,7 @@
|
|
|
5
5
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
|
-
|
|
9
|
-
import * as u from "react";
|
|
8
|
+
import * as f from "react";
|
|
10
9
|
import { PanelBarItem as g } from "./PanelBarItem.mjs";
|
|
11
10
|
import { NavigationAction as d } from "./interfaces/NavigationAction.mjs";
|
|
12
11
|
const I = (r) => typeof r != "object" || !("type" in r) || r.type !== g, F = ({
|
|
@@ -20,11 +19,11 @@ const I = (r) => typeof r != "object" || !("type" in r) || r.type !== g, F = ({
|
|
|
20
19
|
level: s = 0,
|
|
21
20
|
parentPrivateKey: c = []
|
|
22
21
|
}) => {
|
|
23
|
-
const l =
|
|
24
|
-
return
|
|
22
|
+
const l = f.Children.toArray(o).filter(I), b = l.length ? l : o;
|
|
23
|
+
return f.Children.map(b, (a, x) => {
|
|
25
24
|
if (a && a.type === g) {
|
|
26
25
|
let y;
|
|
27
|
-
const
|
|
26
|
+
const u = m(a, c, x);
|
|
28
27
|
if (a.props.children) {
|
|
29
28
|
const v = {
|
|
30
29
|
animation: r,
|
|
@@ -33,39 +32,39 @@ const I = (r) => typeof r != "object" || !("type" in r) || r.type !== g, F = ({
|
|
|
33
32
|
expanded: p,
|
|
34
33
|
handleSelect: t,
|
|
35
34
|
children: a.props.children,
|
|
36
|
-
parentExpanded: (p || []).indexOf(
|
|
35
|
+
parentExpanded: (p || []).indexOf(u) > -1,
|
|
37
36
|
level: s + 1,
|
|
38
|
-
parentPrivateKey: [...c,
|
|
37
|
+
parentPrivateKey: [...c, u]
|
|
39
38
|
};
|
|
40
39
|
y = F(v);
|
|
41
40
|
}
|
|
42
|
-
return
|
|
41
|
+
return f.cloneElement(a, {
|
|
43
42
|
...a.props,
|
|
44
43
|
animation: a.props.animation !== void 0 ? a.props.animation : r,
|
|
45
44
|
keepItemsMounted: n,
|
|
46
|
-
id: a.props.id || `k-panelbar-item-default-${
|
|
47
|
-
uniquePrivateKey:
|
|
45
|
+
id: a.props.id || `k-panelbar-item-default-${u}`,
|
|
46
|
+
uniquePrivateKey: u,
|
|
48
47
|
parentUniquePrivateKey: c,
|
|
49
48
|
parentExpanded: i,
|
|
50
49
|
level: s,
|
|
51
|
-
expanded: (p || []).indexOf(
|
|
52
|
-
focused: e.focused ===
|
|
53
|
-
selected: e.selected ===
|
|
50
|
+
expanded: (p || []).indexOf(u) > -1,
|
|
51
|
+
focused: e.focused === u && e.wrapperFocused,
|
|
52
|
+
selected: e.selected === u,
|
|
54
53
|
children: y,
|
|
55
54
|
onSelect: t
|
|
56
55
|
});
|
|
57
56
|
}
|
|
58
|
-
return /* @__PURE__ */
|
|
57
|
+
return /* @__PURE__ */ f.createElement("div", { className: "k-panelbar-content" }, a);
|
|
59
58
|
});
|
|
60
59
|
}, $ = (r) => {
|
|
61
|
-
const n =
|
|
60
|
+
const n = f.Children.toArray(r.children)[0];
|
|
62
61
|
return n ? m(n, [], 0) : "";
|
|
63
62
|
}, q = (r, n, e = {
|
|
64
63
|
expanded: r.expanded || [],
|
|
65
64
|
selected: r.selected || "",
|
|
66
65
|
focused: r.focused || "",
|
|
67
66
|
wrapperFocused: !1
|
|
68
|
-
}, p = !0, t = []) => (
|
|
67
|
+
}, p = !0, t = []) => (f.Children.map(r.children, (o, i) => {
|
|
69
68
|
if (o && o.type === g) {
|
|
70
69
|
const s = m(o, t, i);
|
|
71
70
|
!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, [
|
|
@@ -80,12 +79,12 @@ function C(r, n = []) {
|
|
|
80
79
|
}), n;
|
|
81
80
|
}
|
|
82
81
|
function k(r, n = []) {
|
|
83
|
-
return
|
|
82
|
+
return f.Children.forEach(r, (e) => {
|
|
84
83
|
e && e.props && !e.props.disabled && (n.push(e), e.props.children && k(e.props.children, n));
|
|
85
84
|
}), n;
|
|
86
85
|
}
|
|
87
86
|
function P(r, n = []) {
|
|
88
|
-
return
|
|
87
|
+
return f.Children.forEach(r, (e) => {
|
|
89
88
|
e && e.props && (e.props.expanded || e.props.parentExpanded) && (n.push(e), e.props.children && P(e.props.children, n));
|
|
90
89
|
}), n;
|
|
91
90
|
}
|
|
@@ -95,7 +94,7 @@ var E;
|
|
|
95
94
|
function n(e) {
|
|
96
95
|
return e.map((p, t) => {
|
|
97
96
|
let o;
|
|
98
|
-
return p.content && (o = p.content), p.children && (o = n(p.children)), /* @__PURE__ */
|
|
97
|
+
return p.content && (o = p.content), p.children && (o = n(p.children)), /* @__PURE__ */ f.createElement(g, { ...p, children: o, key: p.id || t });
|
|
99
98
|
});
|
|
100
99
|
}
|
|
101
100
|
r.mapItemsToComponents = n;
|
package/splitter/Splitter.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 R=require("react"),B=require("./SplitterPane.js"),_=require("./SplitterBar.js"),T=require("@progress/kendo-react-common"),k=require("../package-metadata.js"),C=require("./messages/index.js"),N=require("@progress/kendo-react-intl");function w(d){const i=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(d){for(const e in d)if(e!=="default"){const t=Object.getOwnPropertyDescriptor(d,e);Object.defineProperty(i,e,t.get?t:{enumerable:!0,get:()=>d[e]})}}return i.default=d,Object.freeze(i)}const S=w(R),q={collapsible:!1,collapsed:!1,resizable:!0,scrollable:!0},L=150,b=class b extends S.Component{constructor(i){super(i),this._container=null,this.validatePanes=e=>{if(!e.filter(n=>n.size===void 0).length)throw new Error("The Splitter should have at least one pane without a set size.")},this.mapPaneOptions=(e,t)=>{const n=this.orientation,{dragIndex:r,isDragging:a}=this.state,l=[];for(let s=0;s<t.length;s++){let o=!1;const p=t[s];S.isValidElement(p)&&(o=p.type.displayName==="Splitter");let h=!1;a&&r!==void 0&&(h=r===s||r+1===s),l.push({...q,orientation:n,containsSplitter:o,overlay:h,...(e||[])[s]})}return l},this.mapSplitterPanes=(e,t)=>{const n=N.provideLocalizationService(this).toLanguageString(C.splitBarLabel,C.messages[C.splitBarLabel]);return e.map((r,a)=>{let l;const s=a*2,o=s+1;if(a+1<e.length){const h=e[a+1];l=S.createElement(_.SplitterBar,{key:o,index:a,orientation:r.orientation,prev:r,next:h,ariaLabel:n,onDrag:this.onBarDragResize,onToggle:this.onBarToggle,onKeyboardResize:this.onBarKeyboardResize,isRtl:this.isRtl})}return[S.createElement(B.SplitterPane,{key:s,...r},t[a]),l]})},this.onBarToggle=(e,t)=>{const r=this.panesOptions(this.panesContent).map((a,l)=>{const s=this.getPaneProps(a);return l===e?{...s,collapsed:!a.collapsed}:{...s}});this.props.onChange&&this.props.onChange({newState:r,isLast:!0,nativeEvent:t})},this.onBarDragResize=(e,t,n,r,a)=>{const l=new Date().getTime(),{pageX:s,pageY:o}=e,{prevElement:p,nextElement:h}=this.surroudingPanes(t);if(!p||!h)return;if(r){this.setState({isDragging:!0,dragIndex:n,startTime:l,originalX:s,originalY:o,originalPrevSize:this.elementSize(p),originalNextSize:this.elementSize(h)});return}const{originalPrevSize:P,originalNextSize:c,startTime:v,originalX:f,originalY:m}=this.state;if(!r&&l-v<L){a&&this.resetDragState();return}let g;this.orientation==="vertical"?g=o-m:this.isRtl?g=f-s:g=s-f,this.resize(n,n+1,P,c,g,a,e),a&&this.resetDragState()},this.onBarKeyboardResize=(e,t,n,r)=>{const{prevElement:a,nextElement:l}=this.surroudingPanes(e),s=this.elementSize(a),o=this.elementSize(l);this.resize(t,t+1,s,o,n,!0,r)},this.containerSize=()=>this._container?this.elementSize(this._container,!0):0,this.panesOptions=e=>this.mapPaneOptions(this.panes,e),this.elementSize=(e,t)=>{const n=t?"client":"offset";return this.orientation==="vertical"?e[`${n}Height`]:e[`${n}Width`]},this.clamp=(e,t,n)=>Math.min(t,Math.max(e,n)),this.fixedSize=e=>e&&e.length>0,T.validatePackage(k.packageMetadata),this.state={isDragging:!1,dragIndex:void 0,startTime:0,originalX:0,originalY:0,originalPrevSize:0,originalNextSize:0,panes:i.defaultPanes||[]}}get isControlledState(){return this.props.panes!==void 0}get panes(){return this.panesDuringOnChange!==void 0?this.panesDuringOnChange:this.isControlledState?this.props.panes:this.state.panes}get orientation(){return this.props.orientation||"horizontal"}get isRtl(){return this._container&&getComputedStyle(this._container).direction==="rtl"||!1}get panesContent(){return S.Children.toArray(this.props.children).filter(i=>i)}render(){const i=this.panesContent,e=this.panesOptions(i),t=T.classNames("k-splitter","k-splitter-flex",`k-splitter-${this.orientation}`,this.props.className);return this.validatePanes(e),S.createElement("div",{id:this.props.id,style:this.props.style,ref:n=>this._container=n,className:t},this.mapSplitterPanes(e,i))}surroudingPanes(i){return{prevElement:i.previousElementSibling,nextElement:i.nextElementSibling}}isPercent(i){return/%$/.test(i)}toPixels(i,e){let t=parseInt(i,10);return this.isPercent(i)&&(t=e*t/100),t}resetDragState(){this.setState({isDragging:!1,dragIndex:void 0,startTime:0,originalX:0,originalY:0,originalPrevSize:0,originalNextSize:0})}resize(i,e,t,n,r,a,l){const s=this.panesOptions(this.panesContent),o=s[i],p=s[e],h=t+n,P=this.containerSize(),c=u=>this.toPixels(u,P),v={index:i,initialSize:t,min:c(o.min)||h-c(p.max)||0,max:c(o.max)||h-c(p.min)||h},f={index:e,initialSize:n,min:c(p.min)||h-c(o.max)||0,max:c(p.max)||h-c(o.min)||h},m=(u,x)=>{const z=s[u.index],E=this.clamp(u.min,u.max,u.initialSize+x);return this.isPercent(z.size||"")?100*E/P+"%":E+"px"};let g,O;this.fixedSize(o.size)&&this.fixedSize(p.size)?(g=m(v,r),O=m(f,-r)):p.collapsible||this.fixedSize(p.size)?O=m(f,-r):g=m(v,r);const y=s.map((u,x)=>{const z=this.getPaneProps(u);return x===i?{...z,size:g}:x===e?{...z,size:O}:{...z}});this.panesDuringOnChange=y,this.isControlledState||this.setState({panes:y}),this.props.onChange&&this.props.onChange({newState:y,isLast:a,nativeEvent:l}),this.panesDuringOnChange=void 0}getPaneProps(i){const{orientation:e,overlay:t,containsSplitter:n,...r}=i;return r}};b.displayName="Splitter";let D=b;exports.Splitter=D;
|
package/splitter/Splitter.mjs
CHANGED
|
@@ -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 S from "react";
|
|
10
9
|
import { SplitterPane as T } from "./SplitterPane.mjs";
|
|
11
10
|
import { SplitterBar as b } from "./SplitterBar.mjs";
|
package/splitter/SplitterBar.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 h=require("react"),p=require("@progress/kendo-react-common"),r=require("@progress/kendo-svg-icons");function b(c){const a=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(c){for(const s in c)if(s!=="default"){const e=Object.getOwnPropertyDescriptor(c,s);Object.defineProperty(a,s,e.get?e:{enumerable:!0,get:()=>c[s]})}}return a.default=c,Object.freeze(a)}const l=b(h);class f extends l.Component{constructor(a){super(a),this.draggable=null,this.spliterBarRef=l.createRef(),this.onDrag=(s,e,i)=>{const{event:o}=s,{onDrag:n,index:t}=this.props,g=this.draggable&&this.draggable.element;g&&!this.isStatic&&this.isDraggable&&n(o,g,t,e,i)},this.onFocus=()=>{this.setState({focused:!0})},this.onBlur=()=>{this.setState({focused:!1})},this.onToggle=s=>{const{onToggle:e,index:i,prev:o,next:n}=this.props;(o.collapsible||n.collapsible)&&e(o.collapsible?i:i+1,s)},this.onPrevToggle=s=>{const{onToggle:e,index:i,prev:o}=this.props;o.collapsible&&e(i,s)},this.onNextToggle=s=>{const{onToggle:e,index:i,next:o}=this.props;o.collapsible&&e(i+1,s)},this.onKeyDown=s=>{this.navigation.triggerKeyboardEvent(s)},this.state={focused:!1}}get isStatic(){const{prev:a,next:s}=this.props,e=a.resizable&&s.resizable,i=a.collapsible||s.collapsible;return!e&&!i}get isDraggable(){const{prev:a,next:s}=this.props,e=a.resizable&&s.resizable,i=a.collapsed||s.collapsed;return!!e&&!i}get isHorizontal(){return this.props.orientation==="horizontal"}componentDidMount(){const a=this.draggable&&this.draggable.element,{index:s,onKeyboardResize:e}=this.props,i=this.isHorizontal;a&&(this.navigation=new p.Navigation({tabIndex:0,root:this.spliterBarRef,selectors:[".k-splitter .k-splitbar"],keyboardEvents:{keydown:{ArrowLeft:(o,n,t)=>{i&&(t.preventDefault(),this.isDraggable&&e(a,s,-10,t),(t.metaKey||t.ctrlKey)&&(e(a,s,0,t),this.isDraggable?this.onPrevToggle(t):this.onNextToggle(t)))},ArrowRight:(o,n,t)=>{i&&(t.preventDefault(),this.isDraggable&&e(a,s,10,t),(t.metaKey||t.ctrlKey)&&(e(a,s,0,t),this.isDraggable?this.onNextToggle(t):this.onPrevToggle(t)))},ArrowDown:(o,n,t)=>{i||(t.preventDefault(),this.isDraggable&&e(a,s,10,t),(t.metaKey||t.ctrlKey)&&(e(a,s,0,t),this.isDraggable?this.onNextToggle(t):this.onPrevToggle(t)))},ArrowUp:(o,n,t)=>{i||(t.preventDefault(),this.isDraggable&&e(a,s,-10,t),(t.metaKey||t.ctrlKey)&&(e(a,s,0,t),this.isDraggable?this.onPrevToggle(t):this.onNextToggle(t)))},Enter:(o,n,t)=>{t.preventDefault(),this.onToggle(t)}}}}))}render(){const a=this.isDraggable,s=this.isStatic,e=this.isHorizontal,i=p.classNames("k-splitbar",{"k-focus":this.state.focused,"k-splitbar-horizontal":e,"k-splitbar-vertical":!e,"k-splitbar-draggable-horizontal":e&&a,"k-splitbar-draggable-vertical":!e&&a,"k-splitbar-static-horizontal":e&&s,"k-splitbar-static-vertical":!e&&s});return l.createElement(p.Draggable,{onPress:o=>this.onDrag(o,!0,!1),onDrag:o=>this.onDrag(o,!1,!1),onRelease:o=>this.onDrag(o,!1,!0),ref:o=>{this.draggable=o}},l.createElement("div",{ref:this.spliterBarRef,tabIndex:s?-1:0,role:"separator","aria-valuenow":0,"aria-label":this.props.ariaLabel,"aria-orientation":e?"vertical":void 0,"aria-keyshortcuts":"ArrowLeft ArrowRight ArrowUp ArrowDown",className:i,style:{touchAction:"none"},onFocus:this.onFocus,onBlur:this.onBlur,onDoubleClick:this.onToggle,onKeyDown:this.onKeyDown},this.props.prev.collapsible&&l.createElement("div",{className:"k-collapse-prev",onClick:this.onPrevToggle},l.createElement(p.IconWrap,{name:this.props.prev.collapsible?e?this.props.prev.collapsed?this.props.isRtl?"caret-alt-left":"caret-alt-right":this.props.isRtl?"caret-alt-right":"caret-alt-left":this.props.prev.collapsed?"caret-alt-down":"caret-alt-up":void 0,icon:this.props.prev.collapsible?e?this.props.prev.collapsed?this.props.isRtl?r.caretAltLeftIcon:r.caretAltRightIcon:this.props.isRtl?r.caretAltRightIcon:r.caretAltLeftIcon:this.props.prev.collapsed?r.caretAltDownIcon:r.caretAltUpIcon:void 0,size:"xsmall"})),l.createElement("div",{className:"k-resize-handle"}),this.props.next.collapsible&&l.createElement("div",{className:"k-collapse-next",onClick:this.onNextToggle},l.createElement(p.IconWrap,{name:this.props.next.collapsible?e?this.props.next.collapsed?this.props.isRtl?"caret-alt-right":"caret-alt-left":this.props.isRtl?"caret-alt-left":"caret-alt-right":this.props.next.collapsed?"caret-alt-up":"caret-alt-down":void 0,icon:this.props.next.collapsible?e?this.props.next.collapsed?this.props.isRtl?r.caretAltRightIcon:r.caretAltLeftIcon:this.props.isRtl?r.caretAltLeftIcon:r.caretAltRightIcon:this.props.next.collapsed?r.caretAltUpIcon:r.caretAltDownIcon:void 0,size:"xsmall"}))))}}exports.SplitterBar=f;
|
package/splitter/SplitterBar.mjs
CHANGED
|
@@ -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 l from "react";
|
|
10
9
|
import { Navigation as d, classNames as f, Draggable as u, IconWrap as g } from "@progress/kendo-react-common";
|
|
11
10
|
import { caretAltLeftIcon as n, caretAltRightIcon as p, caretAltDownIcon as h, caretAltUpIcon as b } from "@progress/kendo-svg-icons";
|
package/splitter/SplitterPane.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 y=require("react"),k=require("@progress/kendo-react-common");function g(t){const n=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const e in t)if(e!=="default"){const l=Object.getOwnPropertyDescriptor(t,e);Object.defineProperty(n,e,l.get?l:{enumerable:!0,get:()=>t[e]})}}return n.default=t,Object.freeze(n)}const s=g(y);class v extends s.Component{render(){const{id:n,size:e,collapsed:l,overlay:a,containsSplitter:r,collapsible:o,resizable:c,scrollable:i,keepMounted:p,style:d,className:u}=this.props,m=e&&e.length>0,f={flexBasis:e,...d},b=k.classNames("k-pane",{"k-hidden":l,hidden:l,"k-pane-flex":r,"k-pane-static":!c&&!o||m,"k-scrollable":i},u);return s.createElement("div",{id:n,role:"group",style:f,className:b},!l||p?this.props.children:void 0,a?s.createElement("div",{className:"k-splitter-overlay k-overlay"}):void 0)}}exports.SplitterPane=v;
|
|
@@ -5,38 +5,37 @@
|
|
|
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 l from "react";
|
|
10
9
|
import { classNames as h } from "@progress/kendo-react-common";
|
|
11
10
|
class x extends l.Component {
|
|
12
11
|
render() {
|
|
13
12
|
const {
|
|
14
|
-
id:
|
|
13
|
+
id: a,
|
|
15
14
|
size: e,
|
|
16
15
|
collapsed: s,
|
|
17
|
-
overlay:
|
|
16
|
+
overlay: t,
|
|
18
17
|
containsSplitter: o,
|
|
19
|
-
collapsible:
|
|
20
|
-
resizable:
|
|
18
|
+
collapsible: r,
|
|
19
|
+
resizable: n,
|
|
21
20
|
scrollable: i,
|
|
22
|
-
keepMounted:
|
|
23
|
-
style:
|
|
21
|
+
keepMounted: p,
|
|
22
|
+
style: c,
|
|
24
23
|
className: d
|
|
25
24
|
} = this.props, m = e && e.length > 0, k = {
|
|
26
25
|
flexBasis: e,
|
|
27
|
-
...
|
|
26
|
+
...c
|
|
28
27
|
}, v = h(
|
|
29
28
|
"k-pane",
|
|
30
29
|
{
|
|
31
30
|
"k-hidden": s,
|
|
32
31
|
hidden: s,
|
|
33
32
|
"k-pane-flex": o,
|
|
34
|
-
"k-pane-static": !
|
|
33
|
+
"k-pane-static": !n && !r || m,
|
|
35
34
|
"k-scrollable": i
|
|
36
35
|
},
|
|
37
36
|
d
|
|
38
37
|
);
|
|
39
|
-
return /* @__PURE__ */ l.createElement("div", { id:
|
|
38
|
+
return /* @__PURE__ */ l.createElement("div", { id: a, role: "group", style: k, className: v }, !s || p ? this.props.children : void 0, t ? /* @__PURE__ */ l.createElement("div", { className: "k-splitter-overlay k-overlay" }) : void 0);
|
|
40
39
|
}
|
|
41
40
|
}
|
|
42
41
|
export {
|
|
@@ -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="splitBarLabel",s={[e]:"split bar"};exports.messages=s;exports.splitBarLabel=e;
|
|
@@ -5,11 +5,10 @@
|
|
|
5
5
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
|
-
"
|
|
9
|
-
const s = "splitBarLabel", e = {
|
|
8
|
+
const s = "splitBarLabel", a = {
|
|
10
9
|
[s]: "split bar"
|
|
11
10
|
};
|
|
12
11
|
export {
|
|
13
|
-
|
|
12
|
+
a as messages,
|
|
14
13
|
s as splitBarLabel
|
|
15
14
|
};
|