@progress/kendo-react-grid 5.16.0-dev.202307201227 → 5.16.0-dev.202307241523

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/es/Grid.d.ts CHANGED
@@ -114,6 +114,7 @@ export declare class Grid extends React.Component<GridProps> {
114
114
  private _data;
115
115
  private _slicedData;
116
116
  private wrapperScrollTop;
117
+ private showLicenseWatermark;
117
118
  /**
118
119
  * A getter of the current columns. Gets the current column width or current columns, or any other [`GridColumnProps`]({% slug api_grid_gridcolumnprops %}) for each defined column. Can be used on each Grid instance. To obtain the instance of the rendered Grid, use the `ref` callback. The following example demonstrates how to reorder the columns by dragging their handlers and check the properties afterwards. You can check the result in the browser console.
119
120
  *
package/dist/es/Grid.js CHANGED
@@ -59,7 +59,7 @@ import { operators } from './filterCommon';
59
59
  import { FooterRow } from './footer/FooterRow';
60
60
  import { normalize } from './paging/GridPagerSettings';
61
61
  import { pagerMessagesMap } from './messages';
62
- import { validatePackage } from '@progress/kendo-react-common';
62
+ import { validatePackage, shouldShowValidationUI, WatermarkOverlay } from '@progress/kendo-react-common';
63
63
  import { packageMetadata } from './package-metadata';
64
64
  import { GridDetailCell } from './cells/GridDetailCell';
65
65
  import { GridDetailHierarchyCell } from './cells/GridDetailHierarchyCell';
@@ -106,6 +106,7 @@ var Grid = /** @class */ (function (_super) {
106
106
  _this._data = [];
107
107
  _this._slicedData = undefined;
108
108
  _this.wrapperScrollTop = 0;
109
+ _this.showLicenseWatermark = false;
109
110
  _this.headerRef = React.createRef();
110
111
  _this.headerElementRef = React.createRef();
111
112
  _this._element = null;
@@ -443,6 +444,7 @@ var Grid = /** @class */ (function (_super) {
443
444
  return _this._data.filter(function (item) { return item.rowType === 'data'; }).map(function (item) { return item.dataItem; });
444
445
  };
445
446
  validatePackage(packageMetadata);
447
+ _this.showLicenseWatermark = shouldShowValidationUI(packageMetadata);
446
448
  var groupable = _this.props.groupable === true ||
447
449
  (typeof _this.props.groupable === 'object') && _this.props.groupable.enabled !== false;
448
450
  var VS = _this.getVirtualScroll(props);
@@ -593,7 +595,7 @@ var Grid = /** @class */ (function (_super) {
593
595
  * @hidden
594
596
  */
595
597
  Grid.prototype.render = function () {
596
- var _a, _b, _c;
598
+ var _a, _b, _c, _d;
597
599
  var _this = this;
598
600
  var total = this.props.total || 0;
599
601
  var idPrefix = navigationTools.getIdPrefix(this.navigationStateRef);
@@ -607,7 +609,7 @@ var Grid = /** @class */ (function (_super) {
607
609
  total = total || this.props.data.total;
608
610
  }
609
611
  var groupingFooter = (typeof this.props.groupable === 'object') && this.props.groupable.footer || 'none';
610
- var _d = this.flatData(propsData, groupingFooter, this.props.skip || 0, this.props.group, this.props.expandField, this.props.filter, this.props.sort), resolvedGroupsCount = _d.resolvedGroupsCount, flattedData = _d.flattedData;
612
+ var _e = this.flatData(propsData, groupingFooter, this.props.skip || 0, this.props.group, this.props.expandField, this.props.filter, this.props.sort), resolvedGroupsCount = _e.resolvedGroupsCount, flattedData = _e.flattedData;
611
613
  this._data = flattedData;
612
614
  var groupable = this.props.groupable === true ||
613
615
  (typeof this.props.groupable === 'object') && this.props.groupable.enabled !== false;
@@ -624,17 +626,17 @@ var Grid = /** @class */ (function (_super) {
624
626
  child.type.displayName === 'KendoReactGridNoRecords'; });
625
627
  var leafColumns = this._columns.filter(function (c) { return c.children.length === 0; });
626
628
  var groupingPanel = groupable && (React.createElement(GroupPanel, { group: this.props.group || [], groupChange: this.groupChange, pressHandler: this.dragLogic.pressHandler, dragHandler: this.dragLogic.dragHandler, releaseHandler: this.dragLogic.releaseHandler, refCallback: this.dragLogic.refGroupPanelDiv, resolveTitle: this.resolveTitle }));
627
- var _e = this.props, sort = _e.sort, sortable = _e.sortable, group = _e.group, filter = _e.filter, filterable = _e.filterable, _f = _e.filterOperators, filterOperators = _f === void 0 ? operators : _f, headerCellRender = _e.headerCellRender, columnMenu = _e.columnMenu;
629
+ var _f = this.props, sort = _f.sort, sortable = _f.sortable, group = _f.group, filter = _f.filter, filterable = _f.filterable, _g = _f.filterOperators, filterOperators = _g === void 0 ? operators : _g, headerCellRender = _f.headerCellRender, columnMenu = _f.columnMenu;
628
630
  var header = (React.createElement(Header, { size: this.props.size, columnResize: this.columnResize, staticHeaders: this.props.scrollable !== 'none', scrollableDataElement: function () { return _this.vs.container; }, draggable: this.props.reorderable || groupable, ref: this.headerRef, elemRef: this.headerElementRef, headerRow: this.getHeaderRow(sort, sortable, group, groupable, filter, filterable, filterOperators, headerCellRender, columnMenu, this._columns, this._columnsMap), filterRow: this.props.filterable && React.createElement(FilterRow, { cells: this.props.cells, size: this.props.size, columns: this._columns, filter: this.props.filter, filterOperators: this.props.filterOperators || operators, filterChange: this.filterChange, sort: this.props.sort, cellRender: this.props.filterCellRender, isRtl: this.isRtl, ariaRowIndex: this._columnsMap.length + 1 }) || undefined, cols: leafColumns.map(function (column, index) { return (React.createElement("col", { key: index.toString(), width: column.width !== undefined ?
629
631
  Math.floor(parseFloat(column.width.toString())) + 'px' : undefined })); }) }));
630
632
  var scrollLeft = this.vs && this.vs.container && this.vs.container.scrollLeft || 0;
631
633
  var tableWidth = parseFloat(((this.props.style || {}).width || '').toString());
632
- var _g = tableColumnsVirtualization({
634
+ var _h = tableColumnsVirtualization({
633
635
  enabled: this.props.columnVirtualization,
634
636
  columns: leafColumns,
635
637
  tableViewPortWidth: tableWidth,
636
638
  scrollLeft: scrollLeft
637
- }), colSpans = _g.colSpans, isColHidden = _g.hiddenColumns;
639
+ }), colSpans = _h.colSpans, isColHidden = _h.hiddenColumns;
638
640
  var dataRow = function (item, rowId, rowDataIndex) {
639
641
  var isInEdit = false;
640
642
  var selectedValue = _this.props.selectedField ? getNestedValue(_this.props.selectedField, item.dataItem) : undefined;
@@ -759,7 +761,7 @@ var Grid = /** @class */ (function (_super) {
759
761
  React.createElement(TableSelection, { selectable: this.props.selectable, onRelease: this.selectionRelease, childRef: function (table) {
760
762
  _this.tableElement = table;
761
763
  } },
762
- React.createElement("table", { style: { userSelect: tableUserSelect, display: tableDisplay } },
764
+ React.createElement("table", { className: classNames('k-table k-grid-table', (_b = {}, _b["k-table-".concat(kendoThemeMaps.sizeMap[this.props.size] || this.props.size)] = this.props.size, _b)), style: { userSelect: tableUserSelect, display: tableDisplay } },
763
765
  colGroups,
764
766
  header,
765
767
  React.createElement("tbody", __assign({ role: 'rowgroup', className: 'k-table-tbody' }, tableKeyboardNavigationBodyAttributes), body),
@@ -777,12 +779,12 @@ var Grid = /** @class */ (function (_super) {
777
779
  }
778
780
  }
779
781
  return (React.createElement(TableKeyboardNavigationContext.Provider, { value: this.contextStateRef.current },
780
- React.createElement("div", __assign({ id: this.props.id, style: wrapperStyle, className: classNames('k-grid', (_b = {
782
+ React.createElement("div", __assign({ id: this.props.id, style: wrapperStyle, className: classNames('k-grid', (_c = {
781
783
  'k-grid-md': !this.props.size
782
784
  },
783
- _b["k-grid-".concat(kendoThemeMaps.sizeMap[this.props.size] || this.props.size)] = this.props.size,
784
- _b['k-grid-virtual'] = this.props.scrollable === 'virtual',
785
- _b), this.props.className), ref: function (el) {
785
+ _c["k-grid-".concat(kendoThemeMaps.sizeMap[this.props.size] || this.props.size)] = this.props.size,
786
+ _c['k-grid-virtual'] = this.props.scrollable === 'virtual',
787
+ _c), this.props.className), ref: function (el) {
786
788
  _this._element = el;
787
789
  }, role: "grid", "aria-colcount": leafColumns.length, "aria-rowcount": total, "aria-label": this.props.ariaLabel, onKeyDown: this.onKeyDown, onFocus: this.onFocus }, tableKeyboardNavigationScopeAttributes),
788
790
  toolbar,
@@ -794,11 +796,11 @@ var Grid = /** @class */ (function (_super) {
794
796
  React.createElement(TableSelection, { selectable: this.props.selectable, onRelease: this.selectionRelease, childRef: function (table) {
795
797
  _this.tableElement = table;
796
798
  } },
797
- React.createElement("table", { className: classNames('k-table k-grid-table', (_c = {
799
+ React.createElement("table", { className: classNames('k-table k-grid-table', (_d = {
798
800
  'k-table-md': !this.props.size
799
801
  },
800
- _c["k-table-".concat(kendoThemeMaps.sizeMap[this.props.size] || this.props.size)] = this.props.size,
801
- _c)), role: "presentation", style: { userSelect: tableUserSelect, display: tableDisplay } },
802
+ _d["k-table-".concat(kendoThemeMaps.sizeMap[this.props.size] || this.props.size)] = this.props.size,
803
+ _d)), role: "presentation", style: { userSelect: tableUserSelect, display: tableDisplay } },
802
804
  colGroups,
803
805
  React.createElement("tbody", __assign({ className: 'k-table-tbody', ref: this.tableBodyRef, role: 'rowgroup' }, tableKeyboardNavigationBodyAttributes), body)))),
804
806
  React.createElement("div", { className: "k-height-container", role: "presentation" },
@@ -808,7 +810,8 @@ var Grid = /** @class */ (function (_super) {
808
810
  this.props.pageable && pager,
809
811
  enableDragClues && (React.createElement(React.Fragment, null,
810
812
  React.createElement(DropClue, { ref: this.dragLogic.refDropElementClue }),
811
- React.createElement(DragClue, { ref: this.dragLogic.refDragElementClue }))))));
813
+ React.createElement(DragClue, { ref: this.dragLogic.refDragElementClue }))),
814
+ this.showLicenseWatermark && React.createElement(WatermarkOverlay, null))));
812
815
  };
813
816
  Grid.prototype.selectionChange = function (options) {
814
817
  if (this.props.onSelectionChange) {
@@ -5,7 +5,7 @@ export var packageMetadata = {
5
5
  name: '@progress/kendo-react-grid',
6
6
  productName: 'KendoReact',
7
7
  productCodes: ['KENDOUIREACT', 'KENDOUICOMPLETE'],
8
- publishDate: 1689854301,
8
+ publishDate: 1690210928,
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
  };
@@ -114,6 +114,7 @@ export declare class Grid extends React.Component<GridProps> {
114
114
  private _data;
115
115
  private _slicedData;
116
116
  private wrapperScrollTop;
117
+ private showLicenseWatermark;
117
118
  /**
118
119
  * A getter of the current columns. Gets the current column width or current columns, or any other [`GridColumnProps`]({% slug api_grid_gridcolumnprops %}) for each defined column. Can be used on each Grid instance. To obtain the instance of the rendered Grid, use the `ref` callback. The following example demonstrates how to reorder the columns by dragging their handlers and check the properties afterwards. You can check the result in the browser console.
119
120
  *
package/dist/npm/Grid.js CHANGED
@@ -109,6 +109,7 @@ var Grid = /** @class */ (function (_super) {
109
109
  _this._data = [];
110
110
  _this._slicedData = undefined;
111
111
  _this.wrapperScrollTop = 0;
112
+ _this.showLicenseWatermark = false;
112
113
  _this.headerRef = React.createRef();
113
114
  _this.headerElementRef = React.createRef();
114
115
  _this._element = null;
@@ -446,6 +447,7 @@ var Grid = /** @class */ (function (_super) {
446
447
  return _this._data.filter(function (item) { return item.rowType === 'data'; }).map(function (item) { return item.dataItem; });
447
448
  };
448
449
  (0, kendo_react_common_2.validatePackage)(package_metadata_1.packageMetadata);
450
+ _this.showLicenseWatermark = (0, kendo_react_common_2.shouldShowValidationUI)(package_metadata_1.packageMetadata);
449
451
  var groupable = _this.props.groupable === true ||
450
452
  (typeof _this.props.groupable === 'object') && _this.props.groupable.enabled !== false;
451
453
  var VS = _this.getVirtualScroll(props);
@@ -596,7 +598,7 @@ var Grid = /** @class */ (function (_super) {
596
598
  * @hidden
597
599
  */
598
600
  Grid.prototype.render = function () {
599
- var _a, _b, _c;
601
+ var _a, _b, _c, _d;
600
602
  var _this = this;
601
603
  var total = this.props.total || 0;
602
604
  var idPrefix = kendo_react_data_tools_1.tableKeyboardNavigationTools.getIdPrefix(this.navigationStateRef);
@@ -610,7 +612,7 @@ var Grid = /** @class */ (function (_super) {
610
612
  total = total || this.props.data.total;
611
613
  }
612
614
  var groupingFooter = (typeof this.props.groupable === 'object') && this.props.groupable.footer || 'none';
613
- var _d = this.flatData(propsData, groupingFooter, this.props.skip || 0, this.props.group, this.props.expandField, this.props.filter, this.props.sort), resolvedGroupsCount = _d.resolvedGroupsCount, flattedData = _d.flattedData;
615
+ var _e = this.flatData(propsData, groupingFooter, this.props.skip || 0, this.props.group, this.props.expandField, this.props.filter, this.props.sort), resolvedGroupsCount = _e.resolvedGroupsCount, flattedData = _e.flattedData;
614
616
  this._data = flattedData;
615
617
  var groupable = this.props.groupable === true ||
616
618
  (typeof this.props.groupable === 'object') && this.props.groupable.enabled !== false;
@@ -627,17 +629,17 @@ var Grid = /** @class */ (function (_super) {
627
629
  child.type.displayName === 'KendoReactGridNoRecords'; });
628
630
  var leafColumns = this._columns.filter(function (c) { return c.children.length === 0; });
629
631
  var groupingPanel = groupable && (React.createElement(GroupPanel_1.GroupPanel, { group: this.props.group || [], groupChange: this.groupChange, pressHandler: this.dragLogic.pressHandler, dragHandler: this.dragLogic.dragHandler, releaseHandler: this.dragLogic.releaseHandler, refCallback: this.dragLogic.refGroupPanelDiv, resolveTitle: this.resolveTitle }));
630
- var _e = this.props, sort = _e.sort, sortable = _e.sortable, group = _e.group, filter = _e.filter, filterable = _e.filterable, _f = _e.filterOperators, filterOperators = _f === void 0 ? filterCommon_1.operators : _f, headerCellRender = _e.headerCellRender, columnMenu = _e.columnMenu;
632
+ var _f = this.props, sort = _f.sort, sortable = _f.sortable, group = _f.group, filter = _f.filter, filterable = _f.filterable, _g = _f.filterOperators, filterOperators = _g === void 0 ? filterCommon_1.operators : _g, headerCellRender = _f.headerCellRender, columnMenu = _f.columnMenu;
631
633
  var header = (React.createElement(Header_1.Header, { size: this.props.size, columnResize: this.columnResize, staticHeaders: this.props.scrollable !== 'none', scrollableDataElement: function () { return _this.vs.container; }, draggable: this.props.reorderable || groupable, ref: this.headerRef, elemRef: this.headerElementRef, headerRow: this.getHeaderRow(sort, sortable, group, groupable, filter, filterable, filterOperators, headerCellRender, columnMenu, this._columns, this._columnsMap), filterRow: this.props.filterable && React.createElement(FilterRow_1.FilterRow, { cells: this.props.cells, size: this.props.size, columns: this._columns, filter: this.props.filter, filterOperators: this.props.filterOperators || filterCommon_1.operators, filterChange: this.filterChange, sort: this.props.sort, cellRender: this.props.filterCellRender, isRtl: this.isRtl, ariaRowIndex: this._columnsMap.length + 1 }) || undefined, cols: leafColumns.map(function (column, index) { return (React.createElement("col", { key: index.toString(), width: column.width !== undefined ?
632
634
  Math.floor(parseFloat(column.width.toString())) + 'px' : undefined })); }) }));
633
635
  var scrollLeft = this.vs && this.vs.container && this.vs.container.scrollLeft || 0;
634
636
  var tableWidth = parseFloat(((this.props.style || {}).width || '').toString());
635
- var _g = (0, kendo_react_data_tools_1.tableColumnsVirtualization)({
637
+ var _h = (0, kendo_react_data_tools_1.tableColumnsVirtualization)({
636
638
  enabled: this.props.columnVirtualization,
637
639
  columns: leafColumns,
638
640
  tableViewPortWidth: tableWidth,
639
641
  scrollLeft: scrollLeft
640
- }), colSpans = _g.colSpans, isColHidden = _g.hiddenColumns;
642
+ }), colSpans = _h.colSpans, isColHidden = _h.hiddenColumns;
641
643
  var dataRow = function (item, rowId, rowDataIndex) {
642
644
  var isInEdit = false;
643
645
  var selectedValue = _this.props.selectedField ? (0, index_1.getNestedValue)(_this.props.selectedField, item.dataItem) : undefined;
@@ -762,7 +764,7 @@ var Grid = /** @class */ (function (_super) {
762
764
  React.createElement(kendo_react_data_tools_1.TableSelection, { selectable: this.props.selectable, onRelease: this.selectionRelease, childRef: function (table) {
763
765
  _this.tableElement = table;
764
766
  } },
765
- React.createElement("table", { style: { userSelect: tableUserSelect, display: tableDisplay } },
767
+ React.createElement("table", { className: (0, kendo_react_common_1.classNames)('k-table k-grid-table', (_b = {}, _b["k-table-".concat(kendo_react_common_1.kendoThemeMaps.sizeMap[this.props.size] || this.props.size)] = this.props.size, _b)), style: { userSelect: tableUserSelect, display: tableDisplay } },
766
768
  colGroups,
767
769
  header,
768
770
  React.createElement("tbody", __assign({ role: 'rowgroup', className: 'k-table-tbody' }, kendo_react_data_tools_1.tableKeyboardNavigationBodyAttributes), body),
@@ -780,12 +782,12 @@ var Grid = /** @class */ (function (_super) {
780
782
  }
781
783
  }
782
784
  return (React.createElement(kendo_react_data_tools_1.TableKeyboardNavigationContext.Provider, { value: this.contextStateRef.current },
783
- React.createElement("div", __assign({ id: this.props.id, style: wrapperStyle, className: (0, kendo_react_common_1.classNames)('k-grid', (_b = {
785
+ React.createElement("div", __assign({ id: this.props.id, style: wrapperStyle, className: (0, kendo_react_common_1.classNames)('k-grid', (_c = {
784
786
  'k-grid-md': !this.props.size
785
787
  },
786
- _b["k-grid-".concat(kendo_react_common_1.kendoThemeMaps.sizeMap[this.props.size] || this.props.size)] = this.props.size,
787
- _b['k-grid-virtual'] = this.props.scrollable === 'virtual',
788
- _b), this.props.className), ref: function (el) {
788
+ _c["k-grid-".concat(kendo_react_common_1.kendoThemeMaps.sizeMap[this.props.size] || this.props.size)] = this.props.size,
789
+ _c['k-grid-virtual'] = this.props.scrollable === 'virtual',
790
+ _c), this.props.className), ref: function (el) {
789
791
  _this._element = el;
790
792
  }, role: "grid", "aria-colcount": leafColumns.length, "aria-rowcount": total, "aria-label": this.props.ariaLabel, onKeyDown: this.onKeyDown, onFocus: this.onFocus }, kendo_react_data_tools_1.tableKeyboardNavigationScopeAttributes),
791
793
  toolbar,
@@ -797,11 +799,11 @@ var Grid = /** @class */ (function (_super) {
797
799
  React.createElement(kendo_react_data_tools_1.TableSelection, { selectable: this.props.selectable, onRelease: this.selectionRelease, childRef: function (table) {
798
800
  _this.tableElement = table;
799
801
  } },
800
- React.createElement("table", { className: (0, kendo_react_common_1.classNames)('k-table k-grid-table', (_c = {
802
+ React.createElement("table", { className: (0, kendo_react_common_1.classNames)('k-table k-grid-table', (_d = {
801
803
  'k-table-md': !this.props.size
802
804
  },
803
- _c["k-table-".concat(kendo_react_common_1.kendoThemeMaps.sizeMap[this.props.size] || this.props.size)] = this.props.size,
804
- _c)), role: "presentation", style: { userSelect: tableUserSelect, display: tableDisplay } },
805
+ _d["k-table-".concat(kendo_react_common_1.kendoThemeMaps.sizeMap[this.props.size] || this.props.size)] = this.props.size,
806
+ _d)), role: "presentation", style: { userSelect: tableUserSelect, display: tableDisplay } },
805
807
  colGroups,
806
808
  React.createElement("tbody", __assign({ className: 'k-table-tbody', ref: this.tableBodyRef, role: 'rowgroup' }, kendo_react_data_tools_1.tableKeyboardNavigationBodyAttributes), body)))),
807
809
  React.createElement("div", { className: "k-height-container", role: "presentation" },
@@ -811,7 +813,8 @@ var Grid = /** @class */ (function (_super) {
811
813
  this.props.pageable && pager,
812
814
  enableDragClues && (React.createElement(React.Fragment, null,
813
815
  React.createElement(kendo_react_data_tools_1.DropClue, { ref: this.dragLogic.refDropElementClue }),
814
- React.createElement(kendo_react_data_tools_1.DragClue, { ref: this.dragLogic.refDragElementClue }))))));
816
+ React.createElement(kendo_react_data_tools_1.DragClue, { ref: this.dragLogic.refDragElementClue }))),
817
+ this.showLicenseWatermark && React.createElement(kendo_react_common_2.WatermarkOverlay, null))));
815
818
  };
816
819
  Grid.prototype.selectionChange = function (options) {
817
820
  if (this.props.onSelectionChange) {
@@ -8,7 +8,7 @@ exports.packageMetadata = {
8
8
  name: '@progress/kendo-react-grid',
9
9
  productName: 'KendoReact',
10
10
  productCodes: ['KENDOUIREACT', 'KENDOUICOMPLETE'],
11
- publishDate: 1689854301,
11
+ publishDate: 1690210928,
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
  };