@progress/kendo-react-layout 5.4.0-dev.202205271059 → 5.4.0-dev.202206061009
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/dist/cdn/js/kendo-react-layout.js +1 -1
- package/dist/es/appbar/AppBar.d.ts +1 -1
- package/dist/es/appbar/AppBarSection.d.ts +1 -1
- package/dist/es/appbar/AppBarSpacer.d.ts +1 -1
- package/dist/es/appbar/interfaces/AppBarSpacerProps.d.ts +4 -0
- package/dist/es/bottomnavigation/BottomNavigation.d.ts +1 -1
- package/dist/es/bottomnavigation/BottomNavigation.js +1 -1
- package/dist/es/bottomnavigation/BottomNavigationItem.d.ts +1 -1
- package/dist/es/bottomnavigation/BottomNavigationItem.js +1 -1
- package/dist/es/breadcrumb/Breadcrumb.d.ts +1 -1
- package/dist/es/breadcrumb/BreadcrumbDelimiter.d.ts +1 -1
- package/dist/es/breadcrumb/BreadcrumbDelimiter.js +0 -1
- package/dist/es/breadcrumb/BreadcrumbLink.d.ts +1 -1
- package/dist/es/breadcrumb/BreadcrumbListItem.d.ts +1 -1
- package/dist/es/breadcrumb/BreadcrumbListItem.js +0 -1
- package/dist/es/breadcrumb/BreadcrumbOrderedList.d.ts +1 -1
- package/dist/es/breadcrumb/BreadcrumbOrderedList.js +0 -1
- package/dist/es/card/Avatar.js +5 -5
- package/dist/es/card/Card.d.ts +1 -1
- package/dist/es/card/Card.js +1 -1
- package/dist/es/card/CardActions.js +1 -1
- package/dist/es/drawer/Drawer.d.ts +1 -1
- package/dist/es/drawer/Drawer.js +9 -4
- package/dist/es/drawer/DrawerContent.d.ts +1 -1
- package/dist/es/drawer/DrawerItem.d.ts +1 -1
- package/dist/es/drawer/DrawerItem.js +2 -2
- package/dist/es/drawer/DrawerNavigation.d.ts +1 -1
- package/dist/es/drawer/context/DrawerContext.d.ts +1 -1
- package/dist/es/drawer/interfaces/DrawerItemProps.d.ts +1 -1
- package/dist/es/expansionpanel/ExpansionPanel.d.ts +1 -1
- package/dist/es/gridlayout/GridLayout.d.ts +1 -1
- package/dist/es/gridlayout/GridLayout.js +3 -3
- package/dist/es/gridlayout/GridLayoutItem.d.ts +1 -1
- package/dist/es/gridlayout/GridLayoutItem.js +1 -1
- package/dist/es/menu/components/Menu.d.ts +2 -2
- package/dist/es/menu/components/Menu.js +2 -0
- package/dist/es/menu/components/MenuItem.d.ts +1 -1
- package/dist/es/menu/components/MenuItemInternal.js +1 -1
- package/dist/es/menu/models/BaseMenuItem.d.ts +4 -0
- package/dist/es/menu/utils/DirectionHolder.d.ts +1 -1
- package/dist/es/menu/utils/MouseOverHandler.js +1 -0
- package/dist/es/menu/utils/misc.js +1 -1
- package/dist/es/package-metadata.js +1 -1
- package/dist/es/panelbar/PanelBar.d.ts +2 -2
- package/dist/es/panelbar/PanelBar.js +10 -6
- package/dist/es/panelbar/PanelBarItem.js +1 -1
- package/dist/es/panelbar/util.js +13 -9
- package/dist/es/splitter/Splitter.js +4 -3
- package/dist/es/splitter/SplitterBar.js +1 -0
- package/dist/es/stacklayout/StackLayout.d.ts +1 -1
- package/dist/es/stacklayout/StackLayout.js +1 -1
- package/dist/es/stepper/Step.d.ts +1 -1
- package/dist/es/stepper/Step.js +4 -4
- package/dist/es/stepper/Stepper.d.ts +1 -1
- package/dist/es/stepper/Stepper.js +4 -1
- package/dist/es/stepper/interfaces/StepperOnNavigateEvent.js +1 -0
- package/dist/es/tabstrip/TabStripContent.d.ts +5 -1
- package/dist/es/tabstrip/TabStripNavigation.d.ts +1 -1
- package/dist/es/tabstrip/TabStripTab.d.ts +3 -3
- package/dist/es/tilelayout/InternalTile.d.ts +3 -2
- package/dist/es/tilelayout/InternalTile.js +7 -7
- package/dist/es/tilelayout/ResizeHandlers.d.ts +1 -1
- package/dist/es/tilelayout/TileLayout.d.ts +1 -1
- package/dist/es/tilelayout/TileLayout.js +2 -2
- package/dist/npm/appbar/AppBar.d.ts +1 -1
- package/dist/npm/appbar/AppBar.js +4 -4
- package/dist/npm/appbar/AppBarSection.d.ts +1 -1
- package/dist/npm/appbar/AppBarSection.js +2 -2
- package/dist/npm/appbar/AppBarSpacer.d.ts +1 -1
- package/dist/npm/appbar/AppBarSpacer.js +2 -2
- package/dist/npm/appbar/interfaces/AppBarSpacerProps.d.ts +4 -0
- package/dist/npm/bottomnavigation/BottomNavigation.d.ts +1 -1
- package/dist/npm/bottomnavigation/BottomNavigation.js +8 -8
- package/dist/npm/bottomnavigation/BottomNavigationItem.d.ts +1 -1
- package/dist/npm/bottomnavigation/BottomNavigationItem.js +3 -3
- package/dist/npm/breadcrumb/Breadcrumb.d.ts +1 -1
- package/dist/npm/breadcrumb/Breadcrumb.js +5 -5
- package/dist/npm/breadcrumb/BreadcrumbDelimiter.d.ts +1 -1
- package/dist/npm/breadcrumb/BreadcrumbDelimiter.js +2 -3
- package/dist/npm/breadcrumb/BreadcrumbLink.d.ts +1 -1
- package/dist/npm/breadcrumb/BreadcrumbLink.js +5 -5
- package/dist/npm/breadcrumb/BreadcrumbListItem.d.ts +1 -1
- package/dist/npm/breadcrumb/BreadcrumbListItem.js +2 -3
- package/dist/npm/breadcrumb/BreadcrumbOrderedList.d.ts +1 -1
- package/dist/npm/breadcrumb/BreadcrumbOrderedList.js +2 -3
- package/dist/npm/card/Avatar.js +7 -7
- package/dist/npm/card/Card.d.ts +1 -1
- package/dist/npm/card/Card.js +2 -2
- package/dist/npm/card/CardActions.js +1 -1
- package/dist/npm/card/CardBody.js +1 -1
- package/dist/npm/card/CardFooter.js +1 -1
- package/dist/npm/card/CardHeader.js +1 -1
- package/dist/npm/card/CardImage.js +1 -1
- package/dist/npm/card/CardSubtitle.js +1 -1
- package/dist/npm/card/CardTitle.js +1 -1
- package/dist/npm/drawer/Drawer.d.ts +1 -1
- package/dist/npm/drawer/Drawer.js +12 -7
- package/dist/npm/drawer/DrawerContent.d.ts +1 -1
- package/dist/npm/drawer/DrawerContent.js +1 -1
- package/dist/npm/drawer/DrawerItem.d.ts +1 -1
- package/dist/npm/drawer/DrawerItem.js +4 -4
- package/dist/npm/drawer/DrawerNavigation.d.ts +1 -1
- package/dist/npm/drawer/DrawerNavigation.js +1 -1
- package/dist/npm/drawer/context/DrawerContext.d.ts +1 -1
- package/dist/npm/drawer/interfaces/DrawerItemProps.d.ts +1 -1
- package/dist/npm/expansionpanel/ExpansionPanel.d.ts +1 -1
- package/dist/npm/expansionpanel/ExpansionPanel.js +7 -7
- package/dist/npm/expansionpanel/ExpansionPanelContent.js +1 -1
- package/dist/npm/expansionpanel/index.js +5 -1
- package/dist/npm/gridlayout/GridLayout.d.ts +1 -1
- package/dist/npm/gridlayout/GridLayout.js +6 -6
- package/dist/npm/gridlayout/GridLayoutItem.d.ts +1 -1
- package/dist/npm/gridlayout/GridLayoutItem.js +3 -3
- package/dist/npm/main.js +5 -1
- package/dist/npm/menu/components/Menu.d.ts +2 -2
- package/dist/npm/menu/components/Menu.js +18 -16
- package/dist/npm/menu/components/MenuItem.d.ts +1 -1
- package/dist/npm/menu/components/MenuItemArrow.js +2 -2
- package/dist/npm/menu/components/MenuItemInternal.js +9 -9
- package/dist/npm/menu/components/MenuItemInternalsList.js +1 -1
- package/dist/npm/menu/components/MenuItemLink.js +2 -2
- package/dist/npm/menu/models/BaseMenuItem.d.ts +4 -0
- package/dist/npm/menu/utils/DirectionHolder.d.ts +1 -1
- package/dist/npm/menu/utils/MouseOverHandler.js +1 -0
- package/dist/npm/menu/utils/getNewItemIdUponKeyboardNavigation.js +24 -24
- package/dist/npm/menu/utils/misc.js +2 -2
- package/dist/npm/menu/utils/prepareInputItemsForInternalWork.js +2 -2
- package/dist/npm/package-metadata.js +1 -1
- package/dist/npm/panelbar/PanelBar.d.ts +2 -2
- package/dist/npm/panelbar/PanelBar.js +18 -14
- package/dist/npm/panelbar/PanelBarItem.js +5 -5
- package/dist/npm/panelbar/util.js +14 -10
- package/dist/npm/splitter/Splitter.js +5 -4
- package/dist/npm/splitter/SplitterBar.js +4 -3
- package/dist/npm/splitter/SplitterPane.js +1 -1
- package/dist/npm/stacklayout/StackLayout.d.ts +1 -1
- package/dist/npm/stacklayout/StackLayout.js +4 -4
- package/dist/npm/stepper/Step.d.ts +1 -1
- package/dist/npm/stepper/Step.js +9 -9
- package/dist/npm/stepper/Stepper.d.ts +1 -1
- package/dist/npm/stepper/Stepper.js +11 -8
- package/dist/npm/stepper/interfaces/StepperOnNavigateEvent.js +1 -0
- package/dist/npm/tabstrip/TabStrip.js +2 -2
- package/dist/npm/tabstrip/TabStripContent.d.ts +5 -1
- package/dist/npm/tabstrip/TabStripContent.js +2 -2
- package/dist/npm/tabstrip/TabStripNavigation.d.ts +1 -1
- package/dist/npm/tabstrip/TabStripNavigation.js +2 -2
- package/dist/npm/tabstrip/TabStripNavigationItem.js +1 -1
- package/dist/npm/tabstrip/TabStripTab.d.ts +3 -3
- package/dist/npm/tilelayout/InternalTile.d.ts +3 -2
- package/dist/npm/tilelayout/InternalTile.js +8 -8
- package/dist/npm/tilelayout/ResizeHandlers.d.ts +1 -1
- package/dist/npm/tilelayout/TileLayout.d.ts +1 -1
- package/dist/npm/tilelayout/TileLayout.js +5 -5
- package/dist/systemjs/kendo-react-layout.js +1 -1
- package/package.json +14 -14
|
@@ -77,7 +77,7 @@ var MenuItemInternal = /** @class */ (function (_super) {
|
|
|
77
77
|
var item = this.props.item;
|
|
78
78
|
var itemId = item.id;
|
|
79
79
|
return (React.createElement(React.Fragment, null,
|
|
80
|
-
React.createElement("li", { className: this.getMenuItemClassName(item), style: item.cssStyle, tabIndex: itemId === this.props.tabbableItemId ? 0 : -1, onMouseOver: this.onMouseOver, onMouseLeave: this.onMouseLeave, onMouseDown: function (event) { return _this.props.onMouseDown(event); }, onBlur: function () { return _this.props.onBlur(itemId); }, onFocus: function () { return _this.props.onFocus(itemId); }, onClick: function (event) { return _this.props.onClick(event, itemId); }, role: "menuitem", "aria-disabled": item.disabled ? true : undefined, "aria-haspopup": item.items.length > 0 ? true : undefined, "aria-expanded": item.items.length > 0 ? this.Opened : undefined, "aria-label": item.text, "aria-owns": this.Opened ? misc_1.getDOMElementId(this.props.menuGuid, itemId) : undefined, ref: function (el) { return _this.itemElement = el; }, key: "0" }, this.contentRender ? this.renderContent() : this.renderMenuItemLink()),
|
|
80
|
+
React.createElement("li", { className: this.getMenuItemClassName(item), style: item.cssStyle, tabIndex: itemId === this.props.tabbableItemId ? 0 : -1, onMouseOver: this.onMouseOver, onMouseLeave: this.onMouseLeave, onMouseDown: function (event) { return _this.props.onMouseDown(event); }, onBlur: function () { return _this.props.onBlur(itemId); }, onFocus: function () { return _this.props.onFocus(itemId); }, onClick: function (event) { return _this.props.onClick(event, itemId); }, role: "menuitem", "aria-disabled": item.disabled ? true : undefined, "aria-haspopup": item.items.length > 0 ? true : undefined, "aria-expanded": item.items.length > 0 ? this.Opened : undefined, "aria-label": item.text, "aria-owns": this.Opened ? (0, misc_1.getDOMElementId)(this.props.menuGuid, itemId) : undefined, ref: function (el) { return _this.itemElement = el; }, key: "0" }, this.contentRender ? this.renderContent() : this.renderMenuItemLink()),
|
|
81
81
|
this.renderPopupIfOpened()));
|
|
82
82
|
};
|
|
83
83
|
MenuItemInternal.prototype.renderContent = function () {
|
|
@@ -88,7 +88,7 @@ var MenuItemInternal = /** @class */ (function (_super) {
|
|
|
88
88
|
MenuItemInternal.prototype.renderMenuItemLink = function () {
|
|
89
89
|
var item = this.props.item;
|
|
90
90
|
if (this.linkRender) {
|
|
91
|
-
return (React.createElement(this.linkRender, { item: this.props.onOriginalItemNeeded(item.id), itemId: item.id, opened: this.Opened, dir: misc_1.convertBoolDirectionToString(this.props.isDirectionRightToLeft) }));
|
|
91
|
+
return (React.createElement(this.linkRender, { item: this.props.onOriginalItemNeeded(item.id), itemId: item.id, opened: this.Opened, dir: (0, misc_1.convertBoolDirectionToString)(this.props.isDirectionRightToLeft) }));
|
|
92
92
|
}
|
|
93
93
|
else {
|
|
94
94
|
var textOrItemRender = this.itemRender ?
|
|
@@ -103,7 +103,7 @@ var MenuItemInternal = /** @class */ (function (_super) {
|
|
|
103
103
|
MenuItemInternal.prototype.renderPopupIfOpened = function () {
|
|
104
104
|
if (this.Opened) {
|
|
105
105
|
var itemId = this.props.item.id;
|
|
106
|
-
var _a = misc_1.getPopupSettings(itemId, this.props.isMenuVertical, this.props.isDirectionRightToLeft), anchorAlign = _a.anchorAlign, popupAlign = _a.popupAlign, collision = _a.collision;
|
|
106
|
+
var _a = (0, misc_1.getPopupSettings)(itemId, this.props.isMenuVertical, this.props.isDirectionRightToLeft), anchorAlign = _a.anchorAlign, popupAlign = _a.popupAlign, collision = _a.collision;
|
|
107
107
|
return (React.createElement(kendo_react_popup_1.Popup, { anchor: this.itemElement, show: true, popupClass: this.getPopupClassName(), anchorAlign: anchorAlign, popupAlign: popupAlign, collision: collision, animate: false, key: "1" },
|
|
108
108
|
React.createElement(MenuItemInternalsList_1.MenuItemInternalsList, { parentItemId: itemId, items: this.props.item.items, menuGuid: this.props.menuGuid, focusedItemId: this.props.focusedItemId, lastItemIdToBeOpened: this.props.lastItemIdToBeOpened, tabbableItemId: this.props.tabbableItemId, itemRender: this.props.itemRender, linkRender: this.props.linkRender, isMenuVertical: this.props.isMenuVertical, isDirectionRightToLeft: this.props.isDirectionRightToLeft, className: "k-group k-menu-group k-reset", onMouseOver: this.props.onMouseOver, onMouseLeave: this.props.onMouseLeave, onMouseDown: this.props.onMouseDown, onBlur: this.props.onBlur, onFocus: this.props.onFocus, onClick: this.props.onClick, onOriginalItemNeeded: this.props.onOriginalItemNeeded })));
|
|
109
109
|
}
|
|
@@ -113,11 +113,11 @@ var MenuItemInternal = /** @class */ (function (_super) {
|
|
|
113
113
|
};
|
|
114
114
|
MenuItemInternal.prototype.renderMenuIconIfApplicable = function () {
|
|
115
115
|
return this.props.item.icon ?
|
|
116
|
-
React.createElement("span", { className: "k-icon k-i-"
|
|
116
|
+
React.createElement("span", { className: "k-icon k-i-".concat(this.props.item.icon), role: "presentation", key: "0" }) : null;
|
|
117
117
|
};
|
|
118
118
|
MenuItemInternal.prototype.renderArrowIfApplicable = function () {
|
|
119
119
|
return this.props.item.items.length > 0 ?
|
|
120
|
-
(React.createElement(MenuItemArrow_1.MenuItemArrow, { itemId: this.props.item.id, verticalMenu: this.props.isMenuVertical, dir: misc_1.convertBoolDirectionToString(this.props.isDirectionRightToLeft), key: "2" })) : null;
|
|
120
|
+
(React.createElement(MenuItemArrow_1.MenuItemArrow, { itemId: this.props.item.id, verticalMenu: this.props.isMenuVertical, dir: (0, misc_1.convertBoolDirectionToString)(this.props.isDirectionRightToLeft), key: "2" })) : null;
|
|
121
121
|
};
|
|
122
122
|
Object.defineProperty(MenuItemInternal.prototype, "itemRender", {
|
|
123
123
|
get: function () {
|
|
@@ -144,7 +144,7 @@ var MenuItemInternal = /** @class */ (function (_super) {
|
|
|
144
144
|
get: function () {
|
|
145
145
|
var props = this.props;
|
|
146
146
|
return props.item.items.length > 0 &&
|
|
147
|
-
itemsIdsUtils_1.shouldOpenItem(props.item.id, props.lastItemIdToBeOpened) &&
|
|
147
|
+
(0, itemsIdsUtils_1.shouldOpenItem)(props.item.id, props.lastItemIdToBeOpened) &&
|
|
148
148
|
// HACK: Wait for the second render because otherwise the scenario of
|
|
149
149
|
// popup inside popup throws an error (for example, hover of item with id '0_0').
|
|
150
150
|
!this.isFirstRender;
|
|
@@ -153,11 +153,11 @@ var MenuItemInternal = /** @class */ (function (_super) {
|
|
|
153
153
|
configurable: true
|
|
154
154
|
});
|
|
155
155
|
MenuItemInternal.prototype.getPopupClassName = function () {
|
|
156
|
-
return kendo_react_common_1.classNames('k-menu-popup', { 'k-rtl': this.props.isDirectionRightToLeft });
|
|
156
|
+
return (0, kendo_react_common_1.classNames)('k-menu-popup', { 'k-rtl': this.props.isDirectionRightToLeft });
|
|
157
157
|
};
|
|
158
158
|
MenuItemInternal.prototype.getMenuItemClassName = function (item) {
|
|
159
|
-
return kendo_react_common_1.classNames('k-item', 'k-menu-item', {
|
|
160
|
-
'k-first': itemsIdsUtils_1.isFirstItemFromSiblings(item.id),
|
|
159
|
+
return (0, kendo_react_common_1.classNames)('k-item', 'k-menu-item', {
|
|
160
|
+
'k-first': (0, itemsIdsUtils_1.isFirstItemFromSiblings)(item.id),
|
|
161
161
|
'k-last': item.isLastFromSiblings,
|
|
162
162
|
'k-disabled': item.disabled
|
|
163
163
|
}, item.cssClass);
|
|
@@ -38,7 +38,7 @@ var MenuItemInternalsList = /** @class */ (function (_super) {
|
|
|
38
38
|
}
|
|
39
39
|
MenuItemInternalsList.prototype.render = function () {
|
|
40
40
|
var parentItemId = this.props.parentItemId;
|
|
41
|
-
return (React.createElement("ul", { className: this.props.className, role: parentItemId !== undefined ? 'menu' : 'menubar', id: parentItemId !== undefined ? misc_1.getDOMElementId(this.props.menuGuid, parentItemId) : undefined, onMouseOver: parentItemId !== undefined ? this.onMouseOver : undefined, onMouseLeave: parentItemId !== undefined ? this.onMouseLeave : undefined, "aria-orientation": this.props['aria-orientation'] }, this.renderChildItems()));
|
|
41
|
+
return (React.createElement("ul", { className: this.props.className, role: parentItemId !== undefined ? 'menu' : 'menubar', id: parentItemId !== undefined ? (0, misc_1.getDOMElementId)(this.props.menuGuid, parentItemId) : undefined, onMouseOver: parentItemId !== undefined ? this.onMouseOver : undefined, onMouseLeave: parentItemId !== undefined ? this.onMouseLeave : undefined, "aria-orientation": this.props['aria-orientation'] }, this.renderChildItems()));
|
|
42
42
|
};
|
|
43
43
|
MenuItemInternalsList.prototype.renderChildItems = function () {
|
|
44
44
|
var _this = this;
|
|
@@ -32,11 +32,11 @@ var MenuItemLink = /** @class */ (function (_super) {
|
|
|
32
32
|
return (React.createElement("a", { className: this.getMenuItemClassName(), role: "presentation", href: this.props.url, tabIndex: -1 }, this.props.children));
|
|
33
33
|
}
|
|
34
34
|
else {
|
|
35
|
-
return (React.createElement("span", { id: this.props.id, className: kendo_react_common_1.classNames(this.getMenuItemClassName(), this.props.className), style: this.props.style, role: "presentation" }, this.props.children));
|
|
35
|
+
return (React.createElement("span", { id: this.props.id, className: (0, kendo_react_common_1.classNames)(this.getMenuItemClassName(), this.props.className), style: this.props.style, role: "presentation" }, this.props.children));
|
|
36
36
|
}
|
|
37
37
|
};
|
|
38
38
|
MenuItemLink.prototype.getMenuItemClassName = function () {
|
|
39
|
-
return kendo_react_common_1.classNames('k-link', 'k-menu-link', {
|
|
39
|
+
return (0, kendo_react_common_1.classNames)('k-link', 'k-menu-link', {
|
|
40
40
|
'k-active': this.props.opened
|
|
41
41
|
});
|
|
42
42
|
};
|
|
@@ -5,7 +5,7 @@ export declare class DirectionHolder {
|
|
|
5
5
|
private phase;
|
|
6
6
|
private previousIsDirectionRightToLeft?;
|
|
7
7
|
private isDirectionRightToLeft?;
|
|
8
|
-
getIsDirectionRightToLeft(): boolean;
|
|
8
|
+
getIsDirectionRightToLeft(): boolean | undefined;
|
|
9
9
|
setIsDirectionRightToLeft(value: boolean): void;
|
|
10
10
|
hasDirectionChanged(): boolean;
|
|
11
11
|
}
|
|
@@ -9,6 +9,7 @@ var MouseOverHandler = /** @class */ (function () {
|
|
|
9
9
|
this.openOnClick = openOnClick;
|
|
10
10
|
this.resetMenu = resetMenu;
|
|
11
11
|
this.openItem = openItem;
|
|
12
|
+
this.mouseDown = false;
|
|
12
13
|
this.openOnClick = openOnClick;
|
|
13
14
|
this.isMouseOverEnabled = openOnClick ? false : true;
|
|
14
15
|
}
|
|
@@ -55,7 +55,7 @@ function getNewItemIdUponKeyboardNavigation(sourceItems, sourceItemId, keyCode,
|
|
|
55
55
|
return getNextSiblingId();
|
|
56
56
|
}
|
|
57
57
|
else {
|
|
58
|
-
if (itemsIdsUtils_1.isIdZeroLevel(sourceItemId)) {
|
|
58
|
+
if ((0, itemsIdsUtils_1.isIdZeroLevel)(sourceItemId)) {
|
|
59
59
|
return getFirstChildIdForEnabledItemOrGetSameId();
|
|
60
60
|
}
|
|
61
61
|
else {
|
|
@@ -68,7 +68,7 @@ function getNewItemIdUponKeyboardNavigation(sourceItems, sourceItemId, keyCode,
|
|
|
68
68
|
return getPrevSiblingId();
|
|
69
69
|
}
|
|
70
70
|
else {
|
|
71
|
-
if (itemsIdsUtils_1.isIdZeroLevel(sourceItemId)) {
|
|
71
|
+
if ((0, itemsIdsUtils_1.isIdZeroLevel)(sourceItemId)) {
|
|
72
72
|
return getLastChildIdForEnabledItemOrGetSameId();
|
|
73
73
|
}
|
|
74
74
|
else {
|
|
@@ -81,7 +81,7 @@ function getNewItemIdUponKeyboardNavigation(sourceItems, sourceItemId, keyCode,
|
|
|
81
81
|
return sourceItemId;
|
|
82
82
|
}
|
|
83
83
|
else {
|
|
84
|
-
return hasChildren() ? itemsIdsUtils_1.getFirstChildId(sourceItemId) : itemsIdsUtils_1.getRootParentId(sourceItemId);
|
|
84
|
+
return hasChildren() ? (0, itemsIdsUtils_1.getFirstChildId)(sourceItemId) : (0, itemsIdsUtils_1.getRootParentId)(sourceItemId);
|
|
85
85
|
}
|
|
86
86
|
}
|
|
87
87
|
function getIdUponHomeKey() {
|
|
@@ -92,12 +92,12 @@ function getNewItemIdUponKeyboardNavigation(sourceItems, sourceItemId, keyCode,
|
|
|
92
92
|
return siblings[siblings.length - 1].id;
|
|
93
93
|
}
|
|
94
94
|
function getIdUponEscKey() {
|
|
95
|
-
return itemsIdsUtils_1.isIdZeroLevel(sourceItemId) ? sourceItemId : itemsIdsUtils_1.getDirectParentId(sourceItemId);
|
|
95
|
+
return (0, itemsIdsUtils_1.isIdZeroLevel)(sourceItemId) ? sourceItemId : (0, itemsIdsUtils_1.getDirectParentId)(sourceItemId);
|
|
96
96
|
}
|
|
97
97
|
function getIdUponSearchByChar() {
|
|
98
98
|
var searchChar = key.toLowerCase();
|
|
99
99
|
var siblings = getSiblings();
|
|
100
|
-
var currentItemIndex = Number(itemsIdsUtils_1.getShortId(sourceItemId));
|
|
100
|
+
var currentItemIndex = Number((0, itemsIdsUtils_1.getShortId)(sourceItemId));
|
|
101
101
|
var itemsToSearch = siblings.slice(currentItemIndex + 1).concat(siblings.slice(0, currentItemIndex + 1));
|
|
102
102
|
var matchedSibling = itemsToSearch.find(function (item) {
|
|
103
103
|
return (item.text || '').toLowerCase().startsWith(searchChar);
|
|
@@ -106,37 +106,37 @@ function getNewItemIdUponKeyboardNavigation(sourceItems, sourceItemId, keyCode,
|
|
|
106
106
|
}
|
|
107
107
|
// #region Left Key Internals
|
|
108
108
|
function getIdUponLeftKeyForHorizontalMenu() {
|
|
109
|
-
if (itemsIdsUtils_1.isIdZeroLevel(sourceItemId)) {
|
|
109
|
+
if ((0, itemsIdsUtils_1.isIdZeroLevel)(sourceItemId)) {
|
|
110
110
|
return getPrevSiblingId();
|
|
111
111
|
}
|
|
112
|
-
else if (itemsIdsUtils_1.isIdFirstLevel(sourceItemId)) {
|
|
113
|
-
return getFirstChildIdForEnabledItemOrGetSameId(getPrevSiblingId(itemsIdsUtils_1.getRootParentId(sourceItemId)));
|
|
112
|
+
else if ((0, itemsIdsUtils_1.isIdFirstLevel)(sourceItemId)) {
|
|
113
|
+
return getFirstChildIdForEnabledItemOrGetSameId(getPrevSiblingId((0, itemsIdsUtils_1.getRootParentId)(sourceItemId)));
|
|
114
114
|
}
|
|
115
115
|
else {
|
|
116
|
-
return itemsIdsUtils_1.getDirectParentId(sourceItemId);
|
|
116
|
+
return (0, itemsIdsUtils_1.getDirectParentId)(sourceItemId);
|
|
117
117
|
}
|
|
118
118
|
}
|
|
119
119
|
function getIdUponLeftKeyForVerticalMenu() {
|
|
120
|
-
if (itemsIdsUtils_1.isIdZeroLevel(sourceItemId)) {
|
|
120
|
+
if ((0, itemsIdsUtils_1.isIdZeroLevel)(sourceItemId)) {
|
|
121
121
|
return getLastChildIdForEnabledItemOrGetSameId();
|
|
122
122
|
}
|
|
123
123
|
else {
|
|
124
|
-
return itemsIdsUtils_1.getDirectParentId(sourceItemId);
|
|
124
|
+
return (0, itemsIdsUtils_1.getDirectParentId)(sourceItemId);
|
|
125
125
|
}
|
|
126
126
|
}
|
|
127
127
|
// #endregion
|
|
128
128
|
// #region Right Key Internals
|
|
129
129
|
function getIdUponRightKeyForHorizontalMenu() {
|
|
130
|
-
if (itemsIdsUtils_1.isIdZeroLevel(sourceItemId)) {
|
|
130
|
+
if ((0, itemsIdsUtils_1.isIdZeroLevel)(sourceItemId)) {
|
|
131
131
|
return getNextSiblingId();
|
|
132
132
|
}
|
|
133
133
|
else {
|
|
134
|
-
return getFirstChildIdForEnabledItemOrGetSameId(hasChildren() ? sourceItemId : getNextSiblingId(itemsIdsUtils_1.getRootParentId(sourceItemId)));
|
|
134
|
+
return getFirstChildIdForEnabledItemOrGetSameId(hasChildren() ? sourceItemId : getNextSiblingId((0, itemsIdsUtils_1.getRootParentId)(sourceItemId)));
|
|
135
135
|
}
|
|
136
136
|
}
|
|
137
137
|
function getIdUponRightKeyForVerticalMenu() {
|
|
138
|
-
return getFirstChildIdForEnabledItemOrGetSameId(itemsIdsUtils_1.isIdZeroLevel(sourceItemId) || hasChildren() ?
|
|
139
|
-
sourceItemId : getNextSiblingId(itemsIdsUtils_1.getRootParentId(sourceItemId)));
|
|
138
|
+
return getFirstChildIdForEnabledItemOrGetSameId((0, itemsIdsUtils_1.isIdZeroLevel)(sourceItemId) || hasChildren() ?
|
|
139
|
+
sourceItemId : getNextSiblingId((0, itemsIdsUtils_1.getRootParentId)(sourceItemId)));
|
|
140
140
|
}
|
|
141
141
|
// #endregion
|
|
142
142
|
// #region Utils
|
|
@@ -156,7 +156,7 @@ function getNewItemIdUponKeyboardNavigation(sourceItems, sourceItemId, keyCode,
|
|
|
156
156
|
if (items === undefined) {
|
|
157
157
|
items = sourceItems;
|
|
158
158
|
}
|
|
159
|
-
return itemsIdsUtils_1.getItemById(itemId, items);
|
|
159
|
+
return (0, itemsIdsUtils_1.getItemById)(itemId, items);
|
|
160
160
|
}
|
|
161
161
|
function hasChildren(itemId) {
|
|
162
162
|
return getItemById(itemId).items.length > 0;
|
|
@@ -172,8 +172,8 @@ function getNewItemIdUponKeyboardNavigation(sourceItems, sourceItemId, keyCode,
|
|
|
172
172
|
return itemChildren[itemChildren.length - 1].id;
|
|
173
173
|
}
|
|
174
174
|
function getSiblings() {
|
|
175
|
-
return itemsIdsUtils_1.isIdZeroLevel(sourceItemId) ?
|
|
176
|
-
sourceItems : getItemById(itemsIdsUtils_1.getDirectParentId(sourceItemId), sourceItems).items;
|
|
175
|
+
return (0, itemsIdsUtils_1.isIdZeroLevel)(sourceItemId) ?
|
|
176
|
+
sourceItems : getItemById((0, itemsIdsUtils_1.getDirectParentId)(sourceItemId), sourceItems).items;
|
|
177
177
|
}
|
|
178
178
|
function getFirstOrLastChildIdForEnabledItemOrGetSameId(getFirstChild, itemId) {
|
|
179
179
|
if (itemId === undefined) {
|
|
@@ -181,7 +181,7 @@ function getNewItemIdUponKeyboardNavigation(sourceItems, sourceItemId, keyCode,
|
|
|
181
181
|
}
|
|
182
182
|
var item = getItemById(itemId);
|
|
183
183
|
if (hasChildren(itemId) && !item.disabled) {
|
|
184
|
-
return getFirstChild ? itemsIdsUtils_1.getFirstChildId(itemId) : getLastChildId(itemId);
|
|
184
|
+
return getFirstChild ? (0, itemsIdsUtils_1.getFirstChildId)(itemId) : getLastChildId(itemId);
|
|
185
185
|
}
|
|
186
186
|
else {
|
|
187
187
|
return itemId;
|
|
@@ -191,14 +191,14 @@ function getNewItemIdUponKeyboardNavigation(sourceItems, sourceItemId, keyCode,
|
|
|
191
191
|
if (itemId === undefined) {
|
|
192
192
|
itemId = sourceItemId;
|
|
193
193
|
}
|
|
194
|
-
if (itemsIdsUtils_1.isIdZeroLevel(itemId)) {
|
|
195
|
-
return itemsIdsUtils_1.getDirectSiblingIdForLevelZero(next, itemId, sourceItems.length);
|
|
194
|
+
if ((0, itemsIdsUtils_1.isIdZeroLevel)(itemId)) {
|
|
195
|
+
return (0, itemsIdsUtils_1.getDirectSiblingIdForLevelZero)(next, itemId, sourceItems.length);
|
|
196
196
|
}
|
|
197
197
|
else {
|
|
198
|
-
var directParentId = itemsIdsUtils_1.getDirectParentId(itemId);
|
|
199
|
-
var shortId = itemsIdsUtils_1.getShortId(itemId);
|
|
198
|
+
var directParentId = (0, itemsIdsUtils_1.getDirectParentId)(itemId);
|
|
199
|
+
var shortId = (0, itemsIdsUtils_1.getShortId)(itemId);
|
|
200
200
|
var siblingsCount = getItemById(directParentId).items.length;
|
|
201
|
-
return itemsIdsUtils_1.createId(itemsIdsUtils_1.getDirectSiblingIdForLevelZero(next, shortId, siblingsCount), directParentId);
|
|
201
|
+
return (0, itemsIdsUtils_1.createId)((0, itemsIdsUtils_1.getDirectSiblingIdForLevelZero)(next, shortId, siblingsCount), directParentId);
|
|
202
202
|
}
|
|
203
203
|
}
|
|
204
204
|
// #endregion
|
|
@@ -20,7 +20,7 @@ exports.getPopupSettings = getPopupSettings;
|
|
|
20
20
|
* @hidden
|
|
21
21
|
*/
|
|
22
22
|
function getChildrenPosition(itemId, isMenuVertical, isDirectionRightToLeft) {
|
|
23
|
-
if (itemsIdsUtils_1.isIdZeroLevel(itemId)) {
|
|
23
|
+
if ((0, itemsIdsUtils_1.isIdZeroLevel)(itemId)) {
|
|
24
24
|
if (isMenuVertical) {
|
|
25
25
|
return isDirectionRightToLeft ? 'leftward' : 'rightward';
|
|
26
26
|
}
|
|
@@ -44,6 +44,6 @@ exports.convertBoolDirectionToString = convertBoolDirectionToString;
|
|
|
44
44
|
* @hidden
|
|
45
45
|
*/
|
|
46
46
|
function getDOMElementId(menuGuid, itemId) {
|
|
47
|
-
return menuGuid
|
|
47
|
+
return "".concat(menuGuid, "_").concat(itemId);
|
|
48
48
|
}
|
|
49
49
|
exports.getDOMElementId = getDOMElementId;
|
|
@@ -80,7 +80,7 @@ function convertInputModelsToInternalOnesHelper(inputModels, parentId) {
|
|
|
80
80
|
for (var index = 0; index < inputModels.length; index++) {
|
|
81
81
|
var inputModel = inputModels[index];
|
|
82
82
|
var internalModel = copyInputItemWithoutChildren(inputModel);
|
|
83
|
-
internalModel.id = itemsIdsUtils_1.createId(index.toString(), parentId);
|
|
83
|
+
internalModel.id = (0, itemsIdsUtils_1.createId)(index.toString(), parentId);
|
|
84
84
|
internalModel.isLastFromSiblings = index === inputModels.length - 1;
|
|
85
85
|
internalModel.items = copyOrCreateModelChildren(inputModel, internalModel);
|
|
86
86
|
result.push(internalModel);
|
|
@@ -91,7 +91,7 @@ function copyOrCreateModelChildren(inputModel, internalModel) {
|
|
|
91
91
|
if (inputModel.contentRender) {
|
|
92
92
|
return [{
|
|
93
93
|
contentParentItemId: internalModel.id,
|
|
94
|
-
id: itemsIdsUtils_1.createId(itemsIdsUtils_1.ZERO_LEVEL_ZERO_ITEM_ID, internalModel.id),
|
|
94
|
+
id: (0, itemsIdsUtils_1.createId)(itemsIdsUtils_1.ZERO_LEVEL_ZERO_ITEM_ID, internalModel.id),
|
|
95
95
|
isLastFromSiblings: true,
|
|
96
96
|
contentRender: inputModel.contentRender,
|
|
97
97
|
items: []
|
|
@@ -8,7 +8,7 @@ exports.packageMetadata = {
|
|
|
8
8
|
name: '@progress/kendo-react-layout',
|
|
9
9
|
productName: 'KendoReact',
|
|
10
10
|
productCodes: ['KENDOUIREACT', 'KENDOUICOMPLETE'],
|
|
11
|
-
publishDate:
|
|
11
|
+
publishDate: 1654509261,
|
|
12
12
|
version: '',
|
|
13
13
|
licensingDocsUrl: 'https://www.telerik.com/kendo-react-ui/my-license/?utm_medium=product&utm_source=kendoreact&utm_campaign=kendo-ui-react-purchase-license-keys-warning'
|
|
14
14
|
};
|
|
@@ -18,10 +18,10 @@ export declare class PanelBar extends React.Component<PanelBarProps, PanelBarSta
|
|
|
18
18
|
*/
|
|
19
19
|
static propTypes: {
|
|
20
20
|
animation: PropTypes.Requireable<boolean>;
|
|
21
|
-
children: (props: PanelBarProps, propName: any) => Error;
|
|
21
|
+
children: (props: PanelBarProps, propName: any) => Error | null | undefined;
|
|
22
22
|
dir: PropTypes.Requireable<string>;
|
|
23
23
|
selected: PropTypes.Requireable<string>;
|
|
24
|
-
expanded: PropTypes.Requireable<string[]>;
|
|
24
|
+
expanded: PropTypes.Requireable<(string | null)[]>;
|
|
25
25
|
focused: PropTypes.Requireable<string>;
|
|
26
26
|
expandMode: PropTypes.Requireable<string>;
|
|
27
27
|
className: PropTypes.Requireable<string>;
|
|
@@ -25,10 +25,14 @@ var __assign = (this && this.__assign) || function () {
|
|
|
25
25
|
};
|
|
26
26
|
return __assign.apply(this, arguments);
|
|
27
27
|
};
|
|
28
|
-
var __spreadArray = (this && this.__spreadArray) || function (to, from) {
|
|
29
|
-
for (var i = 0,
|
|
30
|
-
|
|
31
|
-
|
|
28
|
+
var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
|
29
|
+
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
|
|
30
|
+
if (ar || !(i in from)) {
|
|
31
|
+
if (!ar) ar = Array.prototype.slice.call(from, 0, i);
|
|
32
|
+
ar[i] = from[i];
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
return to.concat(ar || Array.prototype.slice.call(from));
|
|
32
36
|
};
|
|
33
37
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
34
38
|
exports.PanelBar = void 0;
|
|
@@ -56,7 +60,7 @@ var PanelBar = /** @class */ (function (_super) {
|
|
|
56
60
|
* @hidden
|
|
57
61
|
*/
|
|
58
62
|
_this.onSelect = function (event) {
|
|
59
|
-
var flattenChildren = util_1.flatChildren(React.Children.toArray(_this.children));
|
|
63
|
+
var flattenChildren = (0, util_1.flatChildren)(React.Children.toArray(_this.children));
|
|
60
64
|
var selectedChild;
|
|
61
65
|
var newExpanded;
|
|
62
66
|
flattenChildren.forEach(function (child) {
|
|
@@ -66,10 +70,10 @@ var PanelBar = /** @class */ (function (_super) {
|
|
|
66
70
|
});
|
|
67
71
|
switch (_this.expandMode) {
|
|
68
72
|
case 'single':
|
|
69
|
-
newExpanded = __spreadArray(__spreadArray([], selectedChild.props.parentUniquePrivateKey), [selectedChild.props.uniquePrivateKey]);
|
|
70
|
-
if (util_1.isArrayEqual(_this.expandedItems, newExpanded)) {
|
|
73
|
+
newExpanded = __spreadArray(__spreadArray([], selectedChild.props.parentUniquePrivateKey, true), [selectedChild.props.uniquePrivateKey], false);
|
|
74
|
+
if ((0, util_1.isArrayEqual)(_this.expandedItems, newExpanded)) {
|
|
71
75
|
if (selectedChild.props.parentUniquePrivateKey) {
|
|
72
|
-
newExpanded = __spreadArray([], selectedChild.props.parentUniquePrivateKey);
|
|
76
|
+
newExpanded = __spreadArray([], selectedChild.props.parentUniquePrivateKey, true);
|
|
73
77
|
}
|
|
74
78
|
else {
|
|
75
79
|
newExpanded = [];
|
|
@@ -98,7 +102,7 @@ var PanelBar = /** @class */ (function (_super) {
|
|
|
98
102
|
*/
|
|
99
103
|
_this.onFocus = function (event, step) {
|
|
100
104
|
if (step === void 0) { step = 0; }
|
|
101
|
-
var flattenChildren = util_1.flatVisibleChildren(React.Children.toArray(_this.children));
|
|
105
|
+
var flattenChildren = (0, util_1.flatVisibleChildren)(React.Children.toArray(_this.children));
|
|
102
106
|
var focusedChild;
|
|
103
107
|
flattenChildren.forEach(function (child, ixd) {
|
|
104
108
|
if (child.props.uniquePrivateKey === (event.uniquePrivateKey || _this.state.focused)) {
|
|
@@ -178,10 +182,10 @@ var PanelBar = /** @class */ (function (_super) {
|
|
|
178
182
|
}
|
|
179
183
|
}
|
|
180
184
|
};
|
|
181
|
-
kendo_react_common_2.validatePackage(package_metadata_1.packageMetadata);
|
|
182
|
-
var initialState = util_1.getInitialState(props, _this.expandMode);
|
|
185
|
+
(0, kendo_react_common_2.validatePackage)(package_metadata_1.packageMetadata);
|
|
186
|
+
var initialState = (0, util_1.getInitialState)(props, _this.expandMode);
|
|
183
187
|
if (!initialState.focused) {
|
|
184
|
-
initialState.focused = util_1.getFirstId(props);
|
|
188
|
+
initialState.focused = (0, util_1.getFirstId)(props);
|
|
185
189
|
}
|
|
186
190
|
_this.state = initialState;
|
|
187
191
|
return _this;
|
|
@@ -220,7 +224,7 @@ var PanelBar = /** @class */ (function (_super) {
|
|
|
220
224
|
handleSelect: this.handleSelect,
|
|
221
225
|
children: this.props.children
|
|
222
226
|
};
|
|
223
|
-
return util_1.renderChildren(renderState);
|
|
227
|
+
return (0, util_1.renderChildren)(renderState);
|
|
224
228
|
},
|
|
225
229
|
enumerable: false,
|
|
226
230
|
configurable: true
|
|
@@ -233,7 +237,7 @@ var PanelBar = /** @class */ (function (_super) {
|
|
|
233
237
|
var ariaProps = {
|
|
234
238
|
'aria-activedescendant': this.activeDescendant
|
|
235
239
|
};
|
|
236
|
-
var className = kendo_react_common_1.classNames('k-panelbar', this.props.className);
|
|
240
|
+
var className = (0, kendo_react_common_1.classNames)('k-panelbar', this.props.className);
|
|
237
241
|
return (React.createElement("ul", __assign({ ref: function (div) { _this._element = div; }, dir: this.props.dir, role: 'tree', tabIndex: 0, onKeyDown: this.handleKeyDown, onFocus: this.handleWrapperFocus, onBlur: this.handleWrapperBlur, className: className, style: this.props.style }, ariaProps), this.children));
|
|
238
242
|
};
|
|
239
243
|
PanelBar.prototype.nextTick = function (f) {
|
|
@@ -40,7 +40,7 @@ function iconElement(_a) {
|
|
|
40
40
|
return (React.createElement("img", { role: "presentation", className: 'k-panelbar-item-icon k-image', src: imageUrl }));
|
|
41
41
|
}
|
|
42
42
|
else if (icon) {
|
|
43
|
-
var iconClasses = kendo_react_common_1.classNames('k-panelbar-item-icon', 'k-icon', 'k-i-' + icon);
|
|
43
|
+
var iconClasses = (0, kendo_react_common_1.classNames)('k-panelbar-item-icon', 'k-icon', 'k-i-' + icon);
|
|
44
44
|
return (React.createElement("span", { role: "presentation", className: iconClasses }));
|
|
45
45
|
}
|
|
46
46
|
else if (iconClass) {
|
|
@@ -87,17 +87,17 @@ var PanelBarItem = /** @class */ (function (_super) {
|
|
|
87
87
|
'aria-selected': !disabled && selected,
|
|
88
88
|
'aria-expanded': !disabled && expanded && !!children
|
|
89
89
|
};
|
|
90
|
-
var panelBarItemClassName = kendo_react_common_1.classNames('k-item', {
|
|
90
|
+
var panelBarItemClassName = (0, kendo_react_common_1.classNames)('k-item', {
|
|
91
91
|
'k-panelbar-header': level === 0,
|
|
92
92
|
'k-panelbar-item': level !== 0,
|
|
93
93
|
'k-state-expanded': expanded && !!children
|
|
94
|
-
}, "k-level-"
|
|
95
|
-
var panelBarLinkClassName = kendo_react_common_1.classNames('k-link', {
|
|
94
|
+
}, "k-level-".concat(level), className);
|
|
95
|
+
var panelBarLinkClassName = (0, kendo_react_common_1.classNames)('k-link', {
|
|
96
96
|
'k-selected': !disabled && selected,
|
|
97
97
|
'k-focus': !disabled && focused,
|
|
98
98
|
'k-disabled': disabled
|
|
99
99
|
}, headerClassName);
|
|
100
|
-
var panelBarItemArrowClassName = kendo_react_common_1.classNames('k-panelbar-toggle', 'k-icon', (_a = {},
|
|
100
|
+
var panelBarItemArrowClassName = (0, kendo_react_common_1.classNames)('k-panelbar-toggle', 'k-icon', (_a = {},
|
|
101
101
|
_a['k-i-arrow-chevron-up'] = expanded && !!children,
|
|
102
102
|
_a['k-panelbar-collapse'] = expanded && !!children,
|
|
103
103
|
_a['k-i-arrow-chevron-down'] = !expanded && !!children,
|
|
@@ -10,10 +10,14 @@ var __assign = (this && this.__assign) || function () {
|
|
|
10
10
|
};
|
|
11
11
|
return __assign.apply(this, arguments);
|
|
12
12
|
};
|
|
13
|
-
var __spreadArray = (this && this.__spreadArray) || function (to, from) {
|
|
14
|
-
for (var i = 0,
|
|
15
|
-
|
|
16
|
-
|
|
13
|
+
var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
|
14
|
+
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
|
|
15
|
+
if (ar || !(i in from)) {
|
|
16
|
+
if (!ar) ar = Array.prototype.slice.call(from, 0, i);
|
|
17
|
+
ar[i] = from[i];
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
return to.concat(ar || Array.prototype.slice.call(from));
|
|
17
21
|
};
|
|
18
22
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
19
23
|
exports.isArrayEqual = exports.PanelBarUtils = exports.isPresent = exports.flatVisibleChildren = exports.flatChildren = exports.flatVisibleItems = exports.getInitialState = exports.getFirstId = exports.renderChildren = void 0;
|
|
@@ -38,11 +42,11 @@ var renderChildren = function (_a) {
|
|
|
38
42
|
children: child.props.children,
|
|
39
43
|
parentExpanded: (expanded || []).indexOf(privateKey) > -1,
|
|
40
44
|
level: level + 1,
|
|
41
|
-
parentPrivateKey: __spreadArray(__spreadArray([], parentPrivateKey), [privateKey])
|
|
45
|
+
parentPrivateKey: __spreadArray(__spreadArray([], parentPrivateKey, true), [privateKey], false)
|
|
42
46
|
};
|
|
43
|
-
nestedChildren = exports.renderChildren(renderState);
|
|
47
|
+
nestedChildren = (0, exports.renderChildren)(renderState);
|
|
44
48
|
}
|
|
45
|
-
return React.cloneElement(child, __assign(__assign({}, child.props), { animation: child.props.animation !== undefined ? child.props.animation : animation, keepItemsMounted: keepItemsMounted, id: child.props.id || "k-panelbar-item-default-"
|
|
49
|
+
return React.cloneElement(child, __assign(__assign({}, child.props), { animation: child.props.animation !== undefined ? child.props.animation : animation, keepItemsMounted: keepItemsMounted, id: child.props.id || "k-panelbar-item-default-".concat(privateKey), uniquePrivateKey: privateKey, parentUniquePrivateKey: parentPrivateKey, parentExpanded: parentExpanded, level: level, expanded: (expanded || []).indexOf(privateKey) > -1, focused: state.focused === privateKey && state.wrapperFocused, selected: state.selected === privateKey, children: nestedChildren, onSelect: handleSelect }));
|
|
46
50
|
}
|
|
47
51
|
else {
|
|
48
52
|
return React.createElement("div", { className: "k-panelbar-content k-content" }, child);
|
|
@@ -92,7 +96,7 @@ var getInitialState = function (props, expandMode, result, parentExpanded, paren
|
|
|
92
96
|
}
|
|
93
97
|
}
|
|
94
98
|
if (child.props.children) {
|
|
95
|
-
result = exports.getInitialState(child.props, expandMode, result, !!child.props.expanded, __spreadArray(__spreadArray([], parentPrivateKey), [privateKey]));
|
|
99
|
+
result = (0, exports.getInitialState)(child.props, expandMode, result, !!child.props.expanded, __spreadArray(__spreadArray([], parentPrivateKey, true), [privateKey], false));
|
|
96
100
|
}
|
|
97
101
|
}
|
|
98
102
|
}
|
|
@@ -107,8 +111,8 @@ var getId = function (child, parentPrivateKey, idx) {
|
|
|
107
111
|
return child && child.props && child.props.id
|
|
108
112
|
? child.props.id
|
|
109
113
|
: parentPrivateKey.length
|
|
110
|
-
? parentPrivateKey[parentPrivateKey.length - 1] +
|
|
111
|
-
: "."
|
|
114
|
+
? parentPrivateKey[parentPrivateKey.length - 1] + ".".concat(idx)
|
|
115
|
+
: ".".concat(idx);
|
|
112
116
|
};
|
|
113
117
|
/**
|
|
114
118
|
* @hidden
|
|
@@ -89,6 +89,7 @@ var Splitter = /** @class */ (function (_super) {
|
|
|
89
89
|
*/
|
|
90
90
|
function Splitter(props) {
|
|
91
91
|
var _this = _super.call(this, props) || this;
|
|
92
|
+
_this._container = null;
|
|
92
93
|
_this.validatePanes = function (panesOptions) {
|
|
93
94
|
var withoutSize = panesOptions.filter(function (pane) { return pane.size === undefined; });
|
|
94
95
|
if (!withoutSize.length) {
|
|
@@ -204,15 +205,15 @@ var Splitter = /** @class */ (function (_super) {
|
|
|
204
205
|
_this.elementSize = function (el, isContainer) {
|
|
205
206
|
var sizeType = isContainer ? 'client' : 'offset';
|
|
206
207
|
if (_this.orientation === 'vertical') {
|
|
207
|
-
return el[sizeType
|
|
208
|
+
return el["".concat(sizeType, "Height")];
|
|
208
209
|
}
|
|
209
210
|
else {
|
|
210
|
-
return el[sizeType
|
|
211
|
+
return el["".concat(sizeType, "Width")];
|
|
211
212
|
}
|
|
212
213
|
};
|
|
213
214
|
_this.clamp = function (min, max, v) { return Math.min(max, Math.max(min, v)); };
|
|
214
215
|
_this.fixedSize = function (size) { return size && size.length > 0; };
|
|
215
|
-
kendo_react_common_2.validatePackage(package_metadata_1.packageMetadata);
|
|
216
|
+
(0, kendo_react_common_2.validatePackage)(package_metadata_1.packageMetadata);
|
|
216
217
|
_this.state = {
|
|
217
218
|
isDragging: false,
|
|
218
219
|
dragIndex: undefined,
|
|
@@ -269,7 +270,7 @@ var Splitter = /** @class */ (function (_super) {
|
|
|
269
270
|
var _this = this;
|
|
270
271
|
var panesContent = this.panesContent;
|
|
271
272
|
var panesOptions = this.panesOptions(panesContent);
|
|
272
|
-
var className = kendo_react_common_1.classNames('k-widget', 'k-splitter', 'k-splitter-flex', "k-splitter-"
|
|
273
|
+
var className = (0, kendo_react_common_1.classNames)('k-widget', 'k-splitter', 'k-splitter-flex', "k-splitter-".concat(this.orientation), this.props.className);
|
|
273
274
|
this.validatePanes(panesOptions);
|
|
274
275
|
return (React.createElement("div", { style: this.props.style, ref: function (ref) { return _this._container = ref; }, className: className }, this.mapSplitterPanes(panesOptions, panesContent)));
|
|
275
276
|
};
|
|
@@ -25,6 +25,7 @@ var SplitterBar = /** @class */ (function (_super) {
|
|
|
25
25
|
__extends(SplitterBar, _super);
|
|
26
26
|
function SplitterBar(props) {
|
|
27
27
|
var _this = _super.call(this, props) || this;
|
|
28
|
+
_this.draggable = null;
|
|
28
29
|
_this.onDrag = function (data, isFirst, isLast) {
|
|
29
30
|
var event = data.event;
|
|
30
31
|
var _a = _this.props, onDrag = _a.onDrag, index = _a.index;
|
|
@@ -100,7 +101,7 @@ var SplitterBar = /** @class */ (function (_super) {
|
|
|
100
101
|
var prev = _this.props.prev;
|
|
101
102
|
var isCollapsible = prev.collapsible;
|
|
102
103
|
var isCollapsed = prev.collapsed;
|
|
103
|
-
return kendo_react_common_1.classNames('k-icon', (_a = {},
|
|
104
|
+
return (0, kendo_react_common_1.classNames)('k-icon', (_a = {},
|
|
104
105
|
_a['k-hidden'] = !isCollapsible,
|
|
105
106
|
_a['k-collapse-prev'] = isCollapsible,
|
|
106
107
|
_a['k-i-arrow-60-left'] = isCollapsible && isHorizontal && !isCollapsed,
|
|
@@ -114,7 +115,7 @@ var SplitterBar = /** @class */ (function (_super) {
|
|
|
114
115
|
var next = _this.props.next;
|
|
115
116
|
var isCollapsible = next.collapsible;
|
|
116
117
|
var isCollapsed = next.collapsed;
|
|
117
|
-
return kendo_react_common_1.classNames('k-icon', (_a = {},
|
|
118
|
+
return (0, kendo_react_common_1.classNames)('k-icon', (_a = {},
|
|
118
119
|
_a['k-hidden'] = !isCollapsible,
|
|
119
120
|
_a['k-collapse-next'] = isCollapsible,
|
|
120
121
|
_a['k-i-arrow-60-right'] = isCollapsible && isHorizontal && !isCollapsed,
|
|
@@ -161,7 +162,7 @@ var SplitterBar = /** @class */ (function (_super) {
|
|
|
161
162
|
var isDraggable = this.isDraggable;
|
|
162
163
|
var isStatic = this.isStatic;
|
|
163
164
|
var isHorizontal = this.isHorizontal;
|
|
164
|
-
var barClasses = kendo_react_common_1.classNames('k-splitbar', (_a = {},
|
|
165
|
+
var barClasses = (0, kendo_react_common_1.classNames)('k-splitbar', (_a = {},
|
|
165
166
|
_a['k-focus'] = this.state.focused,
|
|
166
167
|
_a['k-splitbar-horizontal'] = isHorizontal,
|
|
167
168
|
_a['k-splitbar-vertical'] = !isHorizontal,
|
|
@@ -33,7 +33,7 @@ var SplitterPane = /** @class */ (function (_super) {
|
|
|
33
33
|
var style = {
|
|
34
34
|
flexBasis: size
|
|
35
35
|
};
|
|
36
|
-
var paneClasses = kendo_react_common_1.classNames('k-pane', (_a = {},
|
|
36
|
+
var paneClasses = (0, kendo_react_common_1.classNames)('k-pane', (_a = {},
|
|
37
37
|
_a['k-state-hidden'] = collapsed,
|
|
38
38
|
_a['hidden'] = collapsed,
|
|
39
39
|
_a['k-pane-flex'] = containsSplitter,
|
|
@@ -34,4 +34,4 @@ export interface StackLayoutHandle {
|
|
|
34
34
|
* ReactDOM.render(<App />, document.querySelector('my-app'));
|
|
35
35
|
* ```
|
|
36
36
|
*/
|
|
37
|
-
export declare const StackLayout: React.ForwardRefExoticComponent<StackLayoutProps & React.RefAttributes<StackLayoutHandle>>;
|
|
37
|
+
export declare const StackLayout: React.ForwardRefExoticComponent<StackLayoutProps & React.RefAttributes<StackLayoutHandle | null>>;
|
|
@@ -42,19 +42,19 @@ var kendo_react_common_1 = require("@progress/kendo-react-common");
|
|
|
42
42
|
* ```
|
|
43
43
|
*/
|
|
44
44
|
exports.StackLayout = React.forwardRef(function (props, ref) {
|
|
45
|
-
kendo_licensing_1.validatePackage(package_metadata_1.packageMetadata);
|
|
45
|
+
(0, kendo_licensing_1.validatePackage)(package_metadata_1.packageMetadata);
|
|
46
46
|
var elementRef = React.useRef(null);
|
|
47
47
|
var getImperativeHandle = React.useCallback(function () { return ({
|
|
48
48
|
element: elementRef.current
|
|
49
49
|
}); }, []);
|
|
50
50
|
React.useImperativeHandle(ref, getImperativeHandle);
|
|
51
51
|
var className = props.className, style = props.style, id = props.id, children = props.children;
|
|
52
|
-
var layoutId = React.useMemo(function () { return kendo_react_common_1.guid(); }, []);
|
|
52
|
+
var layoutId = React.useMemo(function () { return (0, kendo_react_common_1.guid)(); }, []);
|
|
53
53
|
var orientation = React.useMemo(function () { return props.orientation || defaultProps.orientation; }, [props.orientation]);
|
|
54
54
|
var isHorizontal = orientation === 'horizontal';
|
|
55
55
|
var hAlign = React.useMemo(function () { return props.align && props.align.horizontal ? props.align.horizontal : defaultProps.hAlign; }, [props.align]);
|
|
56
56
|
var vAlign = React.useMemo(function () { return props.align && props.align.vertical ? props.align.vertical : defaultProps.vAlign; }, [props.align]);
|
|
57
|
-
var stackLayoutClasses = React.useMemo(function () { return kendo_react_common_1.classNames('k-stack-layout', {
|
|
57
|
+
var stackLayoutClasses = React.useMemo(function () { return (0, kendo_react_common_1.classNames)('k-stack-layout', {
|
|
58
58
|
'k-hstack': orientation === 'horizontal',
|
|
59
59
|
'k-vstack': orientation === 'vertical',
|
|
60
60
|
'k-justify-content-start': isHorizontal && hAlign === 'start' || !isHorizontal && vAlign === 'top',
|
|
@@ -66,7 +66,7 @@ exports.StackLayout = React.forwardRef(function (props, ref) {
|
|
|
66
66
|
'k-align-items-end': !isHorizontal && hAlign === 'end' || isHorizontal && vAlign === 'bottom',
|
|
67
67
|
'k-align-items-stretch': !isHorizontal && hAlign === 'stretch' || isHorizontal && vAlign === 'stretch'
|
|
68
68
|
}, className); }, [orientation, isHorizontal, hAlign, vAlign, className]);
|
|
69
|
-
var stackLayoutStyles = __assign({ gap: ""
|
|
69
|
+
var stackLayoutStyles = __assign({ gap: "".concat(typeof props.gap === 'number' ? props.gap + 'px' : props.gap) }, style);
|
|
70
70
|
return (React.createElement("div", { ref: elementRef, className: stackLayoutClasses, style: stackLayoutStyles, id: id || layoutId }, children));
|
|
71
71
|
});
|
|
72
72
|
var defaultProps = {
|
|
@@ -20,4 +20,4 @@ import { StepProps } from './interfaces/StepProps';
|
|
|
20
20
|
* ReactDOM.render(<App />, document.querySelector('my-app'));
|
|
21
21
|
* ```
|
|
22
22
|
*/
|
|
23
|
-
export declare const Step: React.ForwardRefExoticComponent<Pick<StepProps,
|
|
23
|
+
export declare const Step: React.ForwardRefExoticComponent<Pick<StepProps, keyof StepProps> & React.RefAttributes<StepHandle | null>>;
|