@progress/kendo-react-layout 5.4.0-dev.202205200719 → 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/AppBarProps.js +1 -0
- package/dist/es/appbar/interfaces/AppBarSectionProps.js +1 -0
- package/dist/es/appbar/interfaces/AppBarSpacerProps.d.ts +4 -0
- package/dist/es/appbar/interfaces/AppBarSpacerProps.js +1 -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/bottomnavigation/BottomNavigationItemProps.js +1 -0
- package/dist/es/bottomnavigation/BottomNavigationProps.js +1 -0
- package/dist/es/bottomnavigation/models/events.js +1 -0
- package/dist/es/bottomnavigation/models/utils.d.ts +16 -16
- 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 +6 -5
- package/dist/es/card/CardActions.js +1 -1
- package/dist/es/card/interfaces/AvatarProps.js +1 -0
- package/dist/es/card/interfaces/CardActionsProps.js +1 -0
- package/dist/es/card/interfaces/CardBodyProps.js +1 -0
- package/dist/es/card/interfaces/CardFooterProps.js +1 -0
- package/dist/es/card/interfaces/CardHandle.js +1 -0
- package/dist/es/card/interfaces/CardHeaderProps.js +1 -0
- package/dist/es/card/interfaces/CardImageProps.js +1 -0
- package/dist/es/card/interfaces/CardProps.js +1 -0
- package/dist/es/card/interfaces/CardSubtitleProps.js +1 -0
- package/dist/es/card/interfaces/CardTitleProps.js +1 -0
- 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 +6 -4
- package/dist/es/drawer/DrawerNavigation.d.ts +1 -1
- package/dist/es/drawer/DrawerNavigation.js +2 -2
- package/dist/es/drawer/context/DrawerContext.d.ts +1 -1
- package/dist/es/drawer/interfaces/DrawerAnimation.js +1 -0
- package/dist/es/drawer/interfaces/DrawerContentProps.js +1 -0
- package/dist/es/drawer/interfaces/DrawerItemHandle.js +1 -0
- package/dist/es/drawer/interfaces/DrawerItemProps.d.ts +1 -1
- package/dist/es/drawer/interfaces/DrawerItemProps.js +1 -0
- package/dist/es/drawer/interfaces/DrawerNavigationProps.js +1 -0
- package/dist/es/drawer/interfaces/DrawerProps.js +1 -0
- package/dist/es/drawer/interfaces/DrawerSelectEvent.js +1 -0
- package/dist/es/expansionpanel/ExpansionPanel.d.ts +1 -1
- package/dist/es/expansionpanel/index.js +1 -0
- package/dist/es/expansionpanel/interfaces.js +1 -0
- 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/gridlayout/interfaces/GridLayoutColumnProps.js +1 -0
- package/dist/es/gridlayout/interfaces/GridLayoutItemProps.js +1 -0
- package/dist/es/gridlayout/interfaces/GridLayoutProps.js +1 -0
- package/dist/es/gridlayout/interfaces/GridLayoutRowProps.js +1 -0
- package/dist/es/main.js +37 -0
- package/dist/es/menu/BaseMenuItemInternalProps.js +1 -0
- package/dist/es/menu/MenuProps.js +1 -0
- package/dist/es/menu/components/Menu.d.ts +2 -2
- package/dist/es/menu/components/Menu.js +5 -1
- package/dist/es/menu/components/MenuItem.d.ts +1 -1
- package/dist/es/menu/components/MenuItem.js +3 -1
- package/dist/es/menu/components/MenuItemArrow.js +3 -1
- package/dist/es/menu/components/MenuItemInternal.d.ts +4 -4
- package/dist/es/menu/components/MenuItemInternal.js +8 -6
- package/dist/es/menu/components/MenuItemInternalsList.js +3 -1
- package/dist/es/menu/components/MenuItemLink.js +3 -1
- package/dist/es/menu/events.js +1 -0
- package/dist/es/menu/models/BaseMenuItem.d.ts +4 -0
- package/dist/es/menu/models/BaseMenuItem.js +1 -0
- package/dist/es/menu/models/MenuItemModel.js +1 -0
- package/dist/es/menu/utils/DirectionHolder.d.ts +1 -1
- package/dist/es/menu/utils/MouseOverHandler.d.ts +2 -2
- package/dist/es/menu/utils/MouseOverHandler.js +3 -2
- package/dist/es/menu/utils/misc.js +1 -1
- package/dist/es/package-metadata.js +1 -1
- package/dist/es/panelbar/PanelBar.d.ts +6 -6
- package/dist/es/panelbar/PanelBar.js +19 -8
- package/dist/es/panelbar/PanelBarItem.js +6 -4
- package/dist/es/panelbar/interfaces/PanelBarItemClickEventArguments.js +1 -0
- package/dist/es/panelbar/interfaces/PanelBarItemProps.js +1 -0
- package/dist/es/panelbar/interfaces/PanelBarProps.js +1 -0
- package/dist/es/panelbar/interfaces/PanelBarSelectEventArguments.js +1 -0
- package/dist/es/panelbar/interfaces/RenderPanelBarItem.js +1 -0
- package/dist/es/panelbar/util.js +14 -5
- package/dist/es/splitter/Splitter.d.ts +5 -5
- package/dist/es/splitter/Splitter.js +20 -17
- package/dist/es/splitter/SplitterBar.d.ts +3 -3
- package/dist/es/splitter/SplitterBar.js +8 -5
- package/dist/es/splitter/SplitterPane.js +3 -1
- package/dist/es/stacklayout/StackLayout.d.ts +1 -1
- package/dist/es/stacklayout/StackLayout.js +1 -1
- package/dist/es/stacklayout/StackLayoutProps.js +1 -0
- package/dist/es/stepper/Step.d.ts +1 -1
- package/dist/es/stepper/Step.js +8 -6
- package/dist/es/stepper/Stepper.d.ts +1 -1
- package/dist/es/stepper/Stepper.js +4 -1
- package/dist/es/stepper/interfaces/StepChangeEvent.js +1 -0
- package/dist/es/stepper/interfaces/StepFocusEvent.js +1 -0
- package/dist/es/stepper/interfaces/StepHandle.js +1 -0
- package/dist/es/stepper/interfaces/StepProps.js +1 -0
- package/dist/es/stepper/interfaces/StepperChangeEvent.js +1 -0
- package/dist/es/stepper/interfaces/StepperFocusEvent.js +1 -0
- package/dist/es/stepper/interfaces/StepperHandle.js +1 -0
- package/dist/es/stepper/interfaces/StepperOnNavigateEvent.js +1 -0
- package/dist/es/stepper/interfaces/StepperProps.js +1 -0
- package/dist/es/stepper/messages/index.d.ts +1 -1
- package/dist/es/tabstrip/TabStrip.js +4 -2
- package/dist/es/tabstrip/TabStripContent.d.ts +5 -1
- package/dist/es/tabstrip/TabStripContent.js +4 -2
- package/dist/es/tabstrip/TabStripNavigation.d.ts +1 -1
- package/dist/es/tabstrip/TabStripNavigation.js +3 -1
- package/dist/es/tabstrip/TabStripNavigationItem.js +3 -1
- package/dist/es/tabstrip/TabStripTab.d.ts +6 -2
- package/dist/es/tabstrip/TabStripTab.js +9 -1
- package/dist/es/tilelayout/InternalTile.d.ts +4 -3
- package/dist/es/tilelayout/InternalTile.js +12 -10
- package/dist/es/tilelayout/ResizeHandlers.d.ts +1 -1
- package/dist/es/tilelayout/ResizeHandlers.js +3 -1
- package/dist/es/tilelayout/TileLayout.d.ts +2 -2
- package/dist/es/tilelayout/TileLayout.js +6 -4
- package/dist/es/tilelayout/interfaces/main.js +1 -0
- package/dist/npm/appbar/AppBar.d.ts +1 -1
- package/dist/npm/appbar/AppBar.js +5 -4
- package/dist/npm/appbar/AppBarSection.d.ts +1 -1
- package/dist/npm/appbar/AppBarSection.js +3 -2
- package/dist/npm/appbar/AppBarSpacer.d.ts +1 -1
- package/dist/npm/appbar/AppBarSpacer.js +3 -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 +9 -8
- package/dist/npm/bottomnavigation/BottomNavigationItem.d.ts +1 -1
- package/dist/npm/bottomnavigation/BottomNavigationItem.js +4 -3
- package/dist/npm/bottomnavigation/models/utils.d.ts +16 -16
- package/dist/npm/bottomnavigation/models/utils.js +1 -0
- package/dist/npm/breadcrumb/Breadcrumb.d.ts +1 -1
- package/dist/npm/breadcrumb/Breadcrumb.js +6 -5
- package/dist/npm/breadcrumb/BreadcrumbDelimiter.d.ts +1 -1
- package/dist/npm/breadcrumb/BreadcrumbDelimiter.js +3 -3
- package/dist/npm/breadcrumb/BreadcrumbLink.d.ts +1 -1
- package/dist/npm/breadcrumb/BreadcrumbLink.js +6 -5
- package/dist/npm/breadcrumb/BreadcrumbListItem.d.ts +1 -1
- package/dist/npm/breadcrumb/BreadcrumbListItem.js +3 -3
- package/dist/npm/breadcrumb/BreadcrumbOrderedList.d.ts +1 -1
- package/dist/npm/breadcrumb/BreadcrumbOrderedList.js +3 -3
- package/dist/npm/card/Avatar.js +10 -8
- package/dist/npm/card/Card.d.ts +1 -1
- package/dist/npm/card/Card.js +8 -6
- package/dist/npm/card/CardActions.js +4 -2
- package/dist/npm/card/CardBody.js +4 -2
- package/dist/npm/card/CardFooter.js +4 -2
- package/dist/npm/card/CardHeader.js +4 -2
- package/dist/npm/card/CardImage.js +4 -2
- package/dist/npm/card/CardSubtitle.js +4 -2
- package/dist/npm/card/CardTitle.js +4 -2
- package/dist/npm/card/interfaces/Enums.js +1 -0
- package/dist/npm/drawer/Drawer.d.ts +1 -1
- package/dist/npm/drawer/Drawer.js +13 -7
- package/dist/npm/drawer/DrawerContent.d.ts +1 -1
- package/dist/npm/drawer/DrawerContent.js +2 -1
- package/dist/npm/drawer/DrawerItem.d.ts +1 -1
- package/dist/npm/drawer/DrawerItem.js +9 -6
- package/dist/npm/drawer/DrawerNavigation.d.ts +1 -1
- package/dist/npm/drawer/DrawerNavigation.js +4 -3
- package/dist/npm/drawer/context/DrawerContext.d.ts +1 -1
- package/dist/npm/drawer/context/DrawerContext.js +1 -0
- 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 +8 -7
- package/dist/npm/expansionpanel/ExpansionPanelContent.js +2 -1
- package/dist/npm/expansionpanel/index.js +17 -5
- package/dist/npm/gridlayout/GridLayout.d.ts +1 -1
- package/dist/npm/gridlayout/GridLayout.js +7 -6
- package/dist/npm/gridlayout/GridLayoutItem.d.ts +1 -1
- package/dist/npm/gridlayout/GridLayoutItem.js +4 -3
- package/dist/npm/main.js +95 -47
- package/dist/npm/menu/components/Menu.d.ts +2 -2
- package/dist/npm/menu/components/Menu.js +22 -17
- package/dist/npm/menu/components/MenuItem.d.ts +1 -1
- package/dist/npm/menu/components/MenuItem.js +4 -1
- package/dist/npm/menu/components/MenuItemArrow.js +6 -3
- package/dist/npm/menu/components/MenuItemInternal.d.ts +4 -4
- package/dist/npm/menu/components/MenuItemInternal.js +17 -14
- package/dist/npm/menu/components/MenuItemInternalsList.js +5 -2
- package/dist/npm/menu/components/MenuItemLink.js +6 -3
- package/dist/npm/menu/consts.js +1 -0
- 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/DirectionHolder.js +1 -0
- package/dist/npm/menu/utils/MouseOverHandler.d.ts +2 -2
- package/dist/npm/menu/utils/MouseOverHandler.js +4 -2
- package/dist/npm/menu/utils/getNewItemIdUponKeyboardNavigation.js +25 -24
- package/dist/npm/menu/utils/hoverDelay.js +1 -0
- package/dist/npm/menu/utils/itemsIdsUtils.js +1 -0
- package/dist/npm/menu/utils/misc.js +3 -2
- package/dist/npm/menu/utils/prepareInputItemsForInternalWork.js +3 -2
- package/dist/npm/package-metadata.js +2 -1
- package/dist/npm/panelbar/PanelBar.d.ts +6 -6
- package/dist/npm/panelbar/PanelBar.js +28 -16
- package/dist/npm/panelbar/PanelBarItem.js +11 -8
- package/dist/npm/panelbar/interfaces/NavigationAction.js +1 -0
- package/dist/npm/panelbar/util.js +26 -11
- package/dist/npm/splitter/Splitter.d.ts +5 -5
- package/dist/npm/splitter/Splitter.js +22 -18
- package/dist/npm/splitter/SplitterBar.d.ts +3 -3
- package/dist/npm/splitter/SplitterBar.js +12 -8
- package/dist/npm/splitter/SplitterPane.js +5 -2
- package/dist/npm/stacklayout/StackLayout.d.ts +1 -1
- package/dist/npm/stacklayout/StackLayout.js +5 -4
- package/dist/npm/stepper/Step.d.ts +1 -1
- package/dist/npm/stepper/Step.js +14 -11
- package/dist/npm/stepper/Stepper.d.ts +1 -1
- package/dist/npm/stepper/Stepper.js +12 -8
- package/dist/npm/stepper/contants.js +1 -0
- package/dist/npm/stepper/context/StepperContext.js +1 -0
- package/dist/npm/stepper/interfaces/StepperOnNavigateEvent.js +2 -0
- package/dist/npm/stepper/messages/index.d.ts +1 -1
- package/dist/npm/stepper/messages/index.js +2 -1
- package/dist/npm/tabstrip/TabStrip.js +7 -4
- package/dist/npm/tabstrip/TabStripContent.d.ts +5 -1
- package/dist/npm/tabstrip/TabStripContent.js +7 -4
- package/dist/npm/tabstrip/TabStripNavigation.d.ts +1 -1
- package/dist/npm/tabstrip/TabStripNavigation.js +6 -3
- package/dist/npm/tabstrip/TabStripNavigationItem.js +5 -2
- package/dist/npm/tabstrip/TabStripTab.d.ts +6 -2
- package/dist/npm/tabstrip/TabStripTab.js +10 -1
- package/dist/npm/tilelayout/InternalTile.d.ts +4 -3
- package/dist/npm/tilelayout/InternalTile.js +14 -11
- package/dist/npm/tilelayout/ResizeHandlers.d.ts +1 -1
- package/dist/npm/tilelayout/ResizeHandlers.js +4 -1
- package/dist/npm/tilelayout/TileLayout.d.ts +2 -2
- package/dist/npm/tilelayout/TileLayout.js +10 -7
- package/dist/systemjs/kendo-react-layout.js +1 -1
- package/package.json +14 -14
|
@@ -9,6 +9,7 @@ export interface InternalTileProps extends TileLayoutItem {
|
|
|
9
9
|
index: number;
|
|
10
10
|
defaultPosition: TileStrictPosition;
|
|
11
11
|
ignoreDrag?: (event: any) => boolean;
|
|
12
|
+
children?: React.ReactNode;
|
|
12
13
|
}
|
|
13
14
|
/**
|
|
14
15
|
* @hidden
|
|
@@ -42,7 +43,7 @@ export declare class InternalTile extends React.Component<InternalTileProps, {
|
|
|
42
43
|
resizable: boolean;
|
|
43
44
|
reorderable: boolean;
|
|
44
45
|
};
|
|
45
|
-
protected
|
|
46
|
+
protected get reorderable(): boolean;
|
|
46
47
|
state: {
|
|
47
48
|
rtl: boolean;
|
|
48
49
|
};
|
|
@@ -53,7 +54,7 @@ export declare class InternalTile extends React.Component<InternalTileProps, {
|
|
|
53
54
|
dragging: boolean;
|
|
54
55
|
resizing: boolean;
|
|
55
56
|
element: HTMLElement | null;
|
|
56
|
-
|
|
57
|
+
get dragElement(): HTMLElement | null | undefined;
|
|
57
58
|
ignoreDrag: boolean;
|
|
58
59
|
pressOffset: {
|
|
59
60
|
x: number;
|
|
@@ -80,7 +81,7 @@ export declare class InternalTile extends React.Component<InternalTileProps, {
|
|
|
80
81
|
/**
|
|
81
82
|
* @hidden
|
|
82
83
|
*/
|
|
83
|
-
getSnapshotBeforeUpdate(_: any):
|
|
84
|
+
getSnapshotBeforeUpdate(_: any): null;
|
|
84
85
|
/**
|
|
85
86
|
* @hidden
|
|
86
87
|
*/
|
|
@@ -3,10 +3,12 @@ var __extends = (this && this.__extends) || (function () {
|
|
|
3
3
|
var extendStatics = function (d, b) {
|
|
4
4
|
extendStatics = Object.setPrototypeOf ||
|
|
5
5
|
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
6
|
-
function (d, b) { for (var p in b) if (
|
|
6
|
+
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
7
7
|
return extendStatics(d, b);
|
|
8
8
|
};
|
|
9
9
|
return function (d, b) {
|
|
10
|
+
if (typeof b !== "function" && b !== null)
|
|
11
|
+
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
10
12
|
extendStatics(d, b);
|
|
11
13
|
function __() { this.constructor = d; }
|
|
12
14
|
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
@@ -24,6 +26,7 @@ var __assign = (this && this.__assign) || function () {
|
|
|
24
26
|
return __assign.apply(this, arguments);
|
|
25
27
|
};
|
|
26
28
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
|
+
exports.InternalTile = void 0;
|
|
27
30
|
var React = require("react");
|
|
28
31
|
var PropTypes = require("prop-types");
|
|
29
32
|
var kendo_react_common_1 = require("@progress/kendo-react-common");
|
|
@@ -72,7 +75,7 @@ var InternalTile = /** @class */ (function (_super) {
|
|
|
72
75
|
else {
|
|
73
76
|
_this.dragElement.style.marginRight = -dX + 'px';
|
|
74
77
|
}
|
|
75
|
-
_this.dragElement.style.height = "calc(100% + "
|
|
78
|
+
_this.dragElement.style.height = "calc(100% + ".concat(dY, "px)");
|
|
76
79
|
}
|
|
77
80
|
_this.element.classList.add('k-layout-item-hint', 'k-layout-item-hint-resize');
|
|
78
81
|
if (_this.preventDataOps) {
|
|
@@ -141,7 +144,7 @@ var InternalTile = /** @class */ (function (_super) {
|
|
|
141
144
|
x: e.event.clientX - rec.x - _this.pressOffset.x + _this.currentTranslate.x,
|
|
142
145
|
y: e.event.clientY - rec.y - _this.pressOffset.y + _this.currentTranslate.y
|
|
143
146
|
};
|
|
144
|
-
dragElement.style.transform = "translate("
|
|
147
|
+
dragElement.style.transform = "translate(".concat(_this.currentTranslate.x, "px, ").concat(_this.currentTranslate.y, "px)");
|
|
145
148
|
dragElement.style.transition = 'transform 0s';
|
|
146
149
|
if (_this.preventDataOps) {
|
|
147
150
|
return;
|
|
@@ -175,7 +178,7 @@ var InternalTile = /** @class */ (function (_super) {
|
|
|
175
178
|
var dragElement = _this.dragElement;
|
|
176
179
|
if (dragElement) {
|
|
177
180
|
dragElement.style.transform = 'translate(0px, 0px)';
|
|
178
|
-
dragElement.style.transition = "transform "
|
|
181
|
+
dragElement.style.transition = "transform ".concat(ANIMATION_DURATION, "ms cubic-bezier(0.2, 0, 0, 1) 0s");
|
|
179
182
|
dragElement.style.marginRight = '0px';
|
|
180
183
|
dragElement.style.marginLeft = '0px';
|
|
181
184
|
dragElement.style.height = '100%';
|
|
@@ -189,14 +192,14 @@ var InternalTile = /** @class */ (function (_super) {
|
|
|
189
192
|
get: function () {
|
|
190
193
|
return this.props.reorderable !== undefined ? this.props.reorderable : InternalTile.defaultProps.reorderable;
|
|
191
194
|
},
|
|
192
|
-
enumerable:
|
|
195
|
+
enumerable: false,
|
|
193
196
|
configurable: true
|
|
194
197
|
});
|
|
195
198
|
Object.defineProperty(InternalTile.prototype, "dragElement", {
|
|
196
199
|
get: function () {
|
|
197
200
|
return this.draggable ? this.draggable.element : undefined;
|
|
198
201
|
},
|
|
199
|
-
enumerable:
|
|
202
|
+
enumerable: false,
|
|
200
203
|
configurable: true
|
|
201
204
|
});
|
|
202
205
|
InternalTile.prototype.componentDidMount = function () {
|
|
@@ -217,8 +220,8 @@ var InternalTile = /** @class */ (function (_super) {
|
|
|
217
220
|
}
|
|
218
221
|
var position = this.props.defaultPosition;
|
|
219
222
|
var resizable = this.props.resizable !== undefined ? this.props.resizable : InternalTile.defaultProps.resizable;
|
|
220
|
-
var itemStyles = __assign({ gridColumnStart: position.col, gridColumnEnd: "span "
|
|
221
|
-
var card = (React.createElement("div", { ref: function (e) { _this.draggable = e ? ({ element: e }) : null; }, className: kendo_react_common_1.classNames('k-tilelayout-item k-card', { 'k-cursor-grab': this.reorderable }, this.props.className), style: __assign({ height: '100%' }, this.props.style) },
|
|
223
|
+
var itemStyles = __assign({ gridColumnStart: position.col, gridColumnEnd: "span ".concat(position.colSpan), gridRowStart: position.row, gridRowEnd: "span ".concat(position.rowSpan), outline: 'none', order: position.order }, this.props.hintStyle);
|
|
224
|
+
var card = (React.createElement("div", { ref: function (e) { _this.draggable = e ? ({ element: e }) : null; }, className: (0, kendo_react_common_1.classNames)('k-tilelayout-item k-card', { 'k-cursor-grab': this.reorderable }, this.props.className), style: __assign({ height: '100%' }, this.props.style) },
|
|
222
225
|
this.props.children,
|
|
223
226
|
React.createElement(ResizeHandlers_1.ResizeHandlers, { onPress: this.handlePress, onResize: this.handleResize, resizable: resizable, rtl: this.state.rtl })));
|
|
224
227
|
return (React.createElement("div", { ref: function (e) { _this.element = e; }, style: itemStyles, className: this.props.hintClassName },
|
|
@@ -258,7 +261,7 @@ var InternalTile = /** @class */ (function (_super) {
|
|
|
258
261
|
this.pressXY.x += this.state.rtl ? -diffCol : diffCol;
|
|
259
262
|
var diffRow = newBox.height - oldBox.height;
|
|
260
263
|
var currentBot = parseFloat(dragElement.style.height.substring(12));
|
|
261
|
-
dragElement.style.height = "calc(100% + "
|
|
264
|
+
dragElement.style.height = "calc(100% + ".concat((currentBot + diffRow), "px)");
|
|
262
265
|
this.pressXY.y += diffRow;
|
|
263
266
|
}
|
|
264
267
|
var deltaX = oldBox.left - newBox.left;
|
|
@@ -284,11 +287,11 @@ var InternalTile = /** @class */ (function (_super) {
|
|
|
284
287
|
if (!domNode) {
|
|
285
288
|
return;
|
|
286
289
|
}
|
|
287
|
-
domNode.style.transform = "translate("
|
|
290
|
+
domNode.style.transform = "translate(".concat(deltaX, "px, ").concat(deltaY, "px)");
|
|
288
291
|
domNode.style.transition = 'transform 0s';
|
|
289
292
|
requestAnimationFrame(function () {
|
|
290
293
|
domNode.style.transform = '';
|
|
291
|
-
domNode.style.transition = "transform "
|
|
294
|
+
domNode.style.transition = "transform ".concat(ANIMATION_DURATION, "ms cubic-bezier(0.2, 0, 0, 1) 0s");
|
|
292
295
|
});
|
|
293
296
|
});
|
|
294
297
|
};
|
|
@@ -16,5 +16,5 @@ export interface ResizeHandlersProps {
|
|
|
16
16
|
*/
|
|
17
17
|
export declare class ResizeHandlers extends React.Component<ResizeHandlersProps, {}> {
|
|
18
18
|
handleResize: (event: any, isEnd: boolean, direction: any) => void;
|
|
19
|
-
render(): JSX.Element;
|
|
19
|
+
render(): JSX.Element | null;
|
|
20
20
|
}
|
|
@@ -3,10 +3,12 @@ var __extends = (this && this.__extends) || (function () {
|
|
|
3
3
|
var extendStatics = function (d, b) {
|
|
4
4
|
extendStatics = Object.setPrototypeOf ||
|
|
5
5
|
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
6
|
-
function (d, b) { for (var p in b) if (
|
|
6
|
+
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
7
7
|
return extendStatics(d, b);
|
|
8
8
|
};
|
|
9
9
|
return function (d, b) {
|
|
10
|
+
if (typeof b !== "function" && b !== null)
|
|
11
|
+
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
10
12
|
extendStatics(d, b);
|
|
11
13
|
function __() { this.constructor = d; }
|
|
12
14
|
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
@@ -24,6 +26,7 @@ var __assign = (this && this.__assign) || function () {
|
|
|
24
26
|
return __assign.apply(this, arguments);
|
|
25
27
|
};
|
|
26
28
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
|
+
exports.ResizeHandlers = void 0;
|
|
27
30
|
var React = require("react");
|
|
28
31
|
var kendo_react_common_1 = require("@progress/kendo-react-common");
|
|
29
32
|
/**
|
|
@@ -124,7 +124,7 @@ export declare class TileLayout extends React.Component<TileLayoutProps, TileLay
|
|
|
124
124
|
/**
|
|
125
125
|
* Gets the HTML element of the TileLayout component.
|
|
126
126
|
*/
|
|
127
|
-
|
|
127
|
+
get element(): HTMLDivElement | null;
|
|
128
128
|
/**
|
|
129
129
|
* @hidden
|
|
130
130
|
*/
|
|
@@ -138,7 +138,7 @@ export declare class TileLayout extends React.Component<TileLayoutProps, TileLay
|
|
|
138
138
|
rowSpan: number;
|
|
139
139
|
colSpan: number;
|
|
140
140
|
} & TilePosition)[];
|
|
141
|
-
};
|
|
141
|
+
} | null;
|
|
142
142
|
/**
|
|
143
143
|
* @hidden
|
|
144
144
|
*/
|
|
@@ -3,10 +3,12 @@ var __extends = (this && this.__extends) || (function () {
|
|
|
3
3
|
var extendStatics = function (d, b) {
|
|
4
4
|
extendStatics = Object.setPrototypeOf ||
|
|
5
5
|
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
6
|
-
function (d, b) { for (var p in b) if (
|
|
6
|
+
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
7
7
|
return extendStatics(d, b);
|
|
8
8
|
};
|
|
9
9
|
return function (d, b) {
|
|
10
|
+
if (typeof b !== "function" && b !== null)
|
|
11
|
+
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
10
12
|
extendStatics(d, b);
|
|
11
13
|
function __() { this.constructor = d; }
|
|
12
14
|
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
@@ -24,6 +26,7 @@ var __assign = (this && this.__assign) || function () {
|
|
|
24
26
|
return __assign.apply(this, arguments);
|
|
25
27
|
};
|
|
26
28
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
|
+
exports.TileLayout = void 0;
|
|
27
30
|
var React = require("react");
|
|
28
31
|
var PropTypes = require("prop-types");
|
|
29
32
|
var kendo_react_common_1 = require("@progress/kendo-react-common");
|
|
@@ -98,7 +101,7 @@ var TileLayout = /** @class */ (function (_super) {
|
|
|
98
101
|
}
|
|
99
102
|
if (shouldUpdate) {
|
|
100
103
|
_this.setState({ positions: positions });
|
|
101
|
-
kendo_react_common_1.dispatchEvent(_this.props.onReposition, {}, _this, { value: positions });
|
|
104
|
+
(0, kendo_react_common_1.dispatchEvent)(_this.props.onReposition, {}, _this, { value: positions });
|
|
102
105
|
}
|
|
103
106
|
};
|
|
104
107
|
return _this;
|
|
@@ -110,7 +113,7 @@ var TileLayout = /** @class */ (function (_super) {
|
|
|
110
113
|
get: function () {
|
|
111
114
|
return this._element;
|
|
112
115
|
},
|
|
113
|
-
enumerable:
|
|
116
|
+
enumerable: false,
|
|
114
117
|
configurable: true
|
|
115
118
|
});
|
|
116
119
|
/**
|
|
@@ -135,11 +138,11 @@ var TileLayout = /** @class */ (function (_super) {
|
|
|
135
138
|
var _this = this;
|
|
136
139
|
var _a = this.props, className = _a.className, _b = _a.columns, columns = _b === void 0 ? 3 : _b, _c = _a.columnWidth, columnWidth = _c === void 0 ? '1fr' : _c, gap = _a.gap, _d = _a.rowHeight, rowHeight = _d === void 0 ? '1fr' : _d, style = _a.style, _e = _a.autoFlow, autoFlow = _e === void 0 ? 'column' : _e, _f = _a.items, items = _f === void 0 ? [] : _f;
|
|
137
140
|
var gapValue = gap
|
|
138
|
-
? ""
|
|
141
|
+
? "".concat(typeof gap.rows === 'number' ? gap.rows + 'px' : gap.rows) + ' ' + "".concat(typeof gap.columns === 'number' ? gap.columns + 'px' : gap.columns)
|
|
139
142
|
: 16;
|
|
140
|
-
var tileLayoutStyles = __assign({ gridTemplateColumns: "repeat("
|
|
141
|
-
return (React.createElement("div", { ref: function (el) { _this._element = el; }, dir: this.props.dir, className: kendo_react_common_1.classNames('k-tilelayout', AUTO_FLOW_CLASSES[autoFlow], className), style: tileLayoutStyles, id: this.props.id, children: items.map(function (tile, index) {
|
|
142
|
-
return (React.createElement(InternalTile_1.InternalTile, { key: _this.props.dataItemKey ? kendo_react_common_1.getter(_this.props.dataItemKey)(tile) : index, update: _this.update, defaultPosition: _this.state.positions[index], index: index, resizable: tile.resizable, reorderable: tile.reorderable, style: tile.style, className: tile.className, hintClassName: tile.hintClassName, hintStyle: tile.hintStyle, ignoreDrag: _this.props.ignoreDrag }, tile.item ? tile.item : (React.createElement(React.Fragment, null,
|
|
143
|
+
var tileLayoutStyles = __assign({ gridTemplateColumns: "repeat(".concat(columns, ", minmax(0px, ").concat(typeof columnWidth === 'number' ? columnWidth + 'px' : columnWidth, "))"), gridAutoRows: "minmax(0px, ".concat(typeof rowHeight === 'number' ? rowHeight + 'px' : rowHeight, ")"), gap: gapValue, padding: gapValue }, style);
|
|
144
|
+
return (React.createElement("div", { ref: function (el) { _this._element = el; }, dir: this.props.dir, className: (0, kendo_react_common_1.classNames)('k-tilelayout', AUTO_FLOW_CLASSES[autoFlow], className), style: tileLayoutStyles, id: this.props.id, children: items.map(function (tile, index) {
|
|
145
|
+
return (React.createElement(InternalTile_1.InternalTile, { key: _this.props.dataItemKey ? (0, kendo_react_common_1.getter)(_this.props.dataItemKey)(tile) : index, update: _this.update, defaultPosition: _this.state.positions[index], index: index, resizable: tile.resizable, reorderable: tile.reorderable, style: tile.style, className: tile.className, hintClassName: tile.hintClassName, hintStyle: tile.hintStyle, ignoreDrag: _this.props.ignoreDrag }, tile.item ? tile.item : (React.createElement(React.Fragment, null,
|
|
143
146
|
React.createElement("div", { className: "k-tilelayout-item-header k-card-header" }, React.isValidElement(tile.header) ? tile.header : React.createElement("h5", { className: 'k-card-title' }, tile.header)),
|
|
144
147
|
React.createElement("div", { className: 'k-tilelayout-item-body k-card-body' }, tile.body)))));
|
|
145
148
|
}) }));
|