Comparing version 7.4.2 to 7.5.0
"use strict"; | ||
var __assign = (this && this.__assign) || function () { | ||
__assign = Object.assign || function(t) { | ||
for (var s, i = 1, n = arguments.length; i < n; i++) { | ||
s = arguments[i]; | ||
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) | ||
t[p] = s[p]; | ||
} | ||
return t; | ||
}; | ||
return __assign.apply(this, arguments); | ||
}; | ||
var __importStar = (this && this.__importStar) || function (mod) { | ||
@@ -11,8 +22,13 @@ if (mod && mod.__esModule) return mod; | ||
var React = __importStar(require("react")); | ||
var ComponentUtils_1 = require("../../Utils/ComponentUtils"); | ||
var Loading = function (props) { | ||
var enabled = props.enabled, text = props.text; | ||
var _a; | ||
var enabled = props.enabled, text = props.text, childComponents = props.childComponents; | ||
if (enabled) { | ||
return (React.createElement("div", { className: 'ka-loading' }, | ||
var _b = ComponentUtils_1.getElementCustomization({ | ||
className: 'ka-loading', | ||
}, props, (_a = childComponents) === null || _a === void 0 ? void 0 : _a.loading), elementAttributes = _b.elementAttributes, content = _b.content; | ||
return (React.createElement("div", __assign({}, elementAttributes), content || (React.createElement(React.Fragment, null, | ||
React.createElement("div", { className: 'ka-loading-icon' }), | ||
text && (React.createElement("div", { className: 'ka-loading-text' }, text)))); | ||
text && (React.createElement("div", { className: 'ka-loading-text' }, text)))))); | ||
} | ||
@@ -19,0 +35,0 @@ return (React.createElement(React.Fragment, null)); |
@@ -30,5 +30,5 @@ "use strict"; | ||
var Loading_1 = __importDefault(require("../Loading/Loading")); | ||
var Popup_1 = __importDefault(require("../Popup/Popup")); | ||
var TablePaging_1 = require("../TablePaging/TablePaging"); | ||
var TableWrapper_1 = require("../TableWrapper/TableWrapper"); | ||
var Popup_1 = __importDefault(require("../Popup/Popup")); | ||
exports.Table = function (props) { | ||
@@ -53,3 +53,3 @@ var _a; | ||
PagingUtils_1.isPagingShown(enums_1.PagingPosition.Bottom, paging) && React.createElement(TablePaging_1.TablePaging, __assign({}, props)), | ||
React.createElement(Loading_1.default, __assign({}, loading)), | ||
React.createElement(Loading_1.default, __assign({}, loading, { childComponents: childComponents })), | ||
columns.map(function (column) { | ||
@@ -56,0 +56,0 @@ return column.isHeaderFilterPopupShown |
import { ITableProps } from '../'; | ||
import { ICellEditorProps, ICellProps, ICellTextProps, IDataRowProps, IFilterRowEditorProps, IGroupRowProps, IGroupSummaryCellProps, IGroupSummaryRowProps, IHeadCellProps, IHeadCellResizeProps, IHeaderFilterButtonProps, IHeadRowProps, INoDataRowProps, IPagingIndexProps, IPagingProps, IPagingSizeProps, IPopupContentItemProps, IPopupContentProps, ISummaryCellProps, ISummaryRowProps, ITableBodyProps, ITableFootProps, ITableHeadProps } from '../props'; | ||
import { ICellEditorProps, ICellProps, ICellTextProps, IDataRowProps, IFilterRowEditorProps, IGroupRowProps, IGroupSummaryCellProps, IGroupSummaryRowProps, IHeadCellProps, IHeadCellResizeProps, IHeaderFilterButtonProps, IHeadRowProps, ILoadingProps, INoDataRowProps, IPagingIndexProps, IPagingProps, IPagingSizeProps, IPopupContentItemProps, IPopupContentProps, ISummaryCellProps, ISummaryRowProps, ITableBodyProps, ITableFootProps, ITableHeadProps } from '../props'; | ||
import { ChildComponent } from './ChildComponent'; | ||
@@ -21,2 +21,3 @@ export declare class ChildComponents { | ||
headRow?: ChildComponent<IHeadRowProps>; | ||
loading?: ChildComponent<ILoadingProps>; | ||
noDataRow?: ChildComponent<INoDataRowProps>; | ||
@@ -23,0 +24,0 @@ paging?: ChildComponent<IPagingProps>; |
{ | ||
"name": "ka-table", | ||
"version": "7.4.2", | ||
"version": "7.5.0", | ||
"license": "MIT", | ||
@@ -5,0 +5,0 @@ "repository": "github:komarovalexander/ka-table", |
@@ -219,2 +219,3 @@ import { IRowsProps } from './Components/Rows/Rows'; | ||
export interface ILoadingProps { | ||
childComponents?: ChildComponents; | ||
enabled?: boolean; | ||
@@ -221,0 +222,0 @@ text?: string; |
306251
6065