@progress/kendo-react-layout 4.13.0-dev.202111230848 → 4.13.0-dev.202111291459

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.
@@ -5,7 +5,7 @@ export var packageMetadata = {
5
5
  name: '@progress/kendo-react-layout',
6
6
  productName: 'KendoReact',
7
7
  productCodes: ['KENDOUIREACT', 'KENDOUICOMPLETE'],
8
- publishDate: 1637656382,
8
+ publishDate: 1638196973,
9
9
  version: '',
10
10
  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'
11
11
  };
@@ -41,6 +41,10 @@ export interface TileLayoutProps {
41
41
  * Specifies the default height of the rows ([see example]({% slug overview_tilelayout %}#toc-tilelayout-configuration-options)).
42
42
  */
43
43
  rowHeight?: number | string;
44
+ /**
45
+ * Represents the `key` field of the TileLayout item. Used for setting unique keys to the TileLayout items.
46
+ */
47
+ dataItemKey?: string;
44
48
  /**
45
49
  * The collection of items that will be rendered in the TileLayout
46
50
  * ([see example]({% slug overview_tilelayout %}#toc-tilelayout-configuration-options)).
@@ -92,6 +96,7 @@ export declare class TileLayout extends React.Component<TileLayoutProps, TileLay
92
96
  columns: PropTypes.Requireable<number>;
93
97
  columnWidth: PropTypes.Requireable<string | number>;
94
98
  rowHeight: PropTypes.Requireable<string | number>;
99
+ dataItemKey: PropTypes.Requireable<string>;
95
100
  items: PropTypes.Requireable<any[]>;
96
101
  positions: PropTypes.Requireable<any[]>;
97
102
  autoFlow: PropTypes.Requireable<string>;
@@ -24,7 +24,7 @@ var __assign = (this && this.__assign) || function () {
24
24
  };
25
25
  import * as React from 'react';
26
26
  import * as PropTypes from 'prop-types';
27
- import { classNames, dispatchEvent } from '@progress/kendo-react-common';
27
+ import { getter, classNames, dispatchEvent } from '@progress/kendo-react-common';
28
28
  import { InternalTile } from './InternalTile';
29
29
  /**
30
30
  * @hidden
@@ -137,7 +137,7 @@ var TileLayout = /** @class */ (function (_super) {
137
137
  : 16;
138
138
  var tileLayoutStyles = __assign({ gridTemplateColumns: "repeat(" + columns + ", minmax(0px, " + (typeof columnWidth === 'number' ? columnWidth + 'px' : columnWidth) + "))", gridAutoRows: "minmax(0px, " + (typeof rowHeight === 'number' ? rowHeight + 'px' : rowHeight) + ")", gap: gapValue, padding: gapValue }, style);
139
139
  return (React.createElement("div", { ref: function (el) { _this._element = el; }, dir: this.props.dir, className: classNames('k-tilelayout', AUTO_FLOW_CLASSES[autoFlow], className), style: tileLayoutStyles, id: this.props.id, children: items.map(function (tile, index) {
140
- return (React.createElement(InternalTile, { key: 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,
140
+ return (React.createElement(InternalTile, { key: _this.props.dataItemKey ? 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,
141
141
  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)),
142
142
  React.createElement("div", { className: 'k-tilelayout-item-body k-card-body' }, tile.body)))));
143
143
  }) }));
@@ -154,6 +154,7 @@ var TileLayout = /** @class */ (function (_super) {
154
154
  columns: PropTypes.number,
155
155
  columnWidth: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
156
156
  rowHeight: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
157
+ dataItemKey: PropTypes.string,
157
158
  items: PropTypes.array,
158
159
  positions: PropTypes.array,
159
160
  autoFlow: PropTypes.oneOf(['column', 'row', 'column dense', 'row dense', 'unset']),
@@ -7,7 +7,7 @@ exports.packageMetadata = {
7
7
  name: '@progress/kendo-react-layout',
8
8
  productName: 'KendoReact',
9
9
  productCodes: ['KENDOUIREACT', 'KENDOUICOMPLETE'],
10
- publishDate: 1637656382,
10
+ publishDate: 1638196973,
11
11
  version: '',
12
12
  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'
13
13
  };
@@ -41,6 +41,10 @@ export interface TileLayoutProps {
41
41
  * Specifies the default height of the rows ([see example]({% slug overview_tilelayout %}#toc-tilelayout-configuration-options)).
42
42
  */
43
43
  rowHeight?: number | string;
44
+ /**
45
+ * Represents the `key` field of the TileLayout item. Used for setting unique keys to the TileLayout items.
46
+ */
47
+ dataItemKey?: string;
44
48
  /**
45
49
  * The collection of items that will be rendered in the TileLayout
46
50
  * ([see example]({% slug overview_tilelayout %}#toc-tilelayout-configuration-options)).
@@ -92,6 +96,7 @@ export declare class TileLayout extends React.Component<TileLayoutProps, TileLay
92
96
  columns: PropTypes.Requireable<number>;
93
97
  columnWidth: PropTypes.Requireable<string | number>;
94
98
  rowHeight: PropTypes.Requireable<string | number>;
99
+ dataItemKey: PropTypes.Requireable<string>;
95
100
  items: PropTypes.Requireable<any[]>;
96
101
  positions: PropTypes.Requireable<any[]>;
97
102
  autoFlow: PropTypes.Requireable<string>;
@@ -139,7 +139,7 @@ var TileLayout = /** @class */ (function (_super) {
139
139
  : 16;
140
140
  var tileLayoutStyles = __assign({ gridTemplateColumns: "repeat(" + columns + ", minmax(0px, " + (typeof columnWidth === 'number' ? columnWidth + 'px' : columnWidth) + "))", gridAutoRows: "minmax(0px, " + (typeof rowHeight === 'number' ? rowHeight + 'px' : rowHeight) + ")", gap: gapValue, padding: gapValue }, style);
141
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: 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,
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
143
  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
144
  React.createElement("div", { className: 'k-tilelayout-item-body k-card-body' }, tile.body)))));
145
145
  }) }));
@@ -156,6 +156,7 @@ var TileLayout = /** @class */ (function (_super) {
156
156
  columns: PropTypes.number,
157
157
  columnWidth: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
158
158
  rowHeight: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
159
+ dataItemKey: PropTypes.string,
159
160
  items: PropTypes.array,
160
161
  positions: PropTypes.array,
161
162
  autoFlow: PropTypes.oneOf(['column', 'row', 'column dense', 'row dense', 'unset']),