@vendorflow/components 2.0.79 → 2.0.80
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.
|
@@ -19,6 +19,7 @@ var faker_1 = __importDefault(require("faker"));
|
|
|
19
19
|
var DataTable_1 = require("./DataTable");
|
|
20
20
|
exports.Columns = [
|
|
21
21
|
{
|
|
22
|
+
id: 'fullName',
|
|
22
23
|
Header: 'Full Name',
|
|
23
24
|
columns: [
|
|
24
25
|
__assign({ Header: 'First Name', accessor: 'firstName' }, (0, DataTable_1.getColumnFilterConfig)('text')),
|
|
@@ -112,7 +112,7 @@ function DataTable(_a) {
|
|
|
112
112
|
var scrollbarWidth = (0, react_scrollbar_size_1.default)().width;
|
|
113
113
|
var _h = __read((0, react_2.useState)(0), 2), scrollLeft = _h[0], setScrollLeft = _h[1];
|
|
114
114
|
var _j = (labels || { noMatchLabel: NO_MATCH_TEXT }).noMatchLabel, noMatchLabel = _j === void 0 ? NO_MATCH_TEXT : _j;
|
|
115
|
-
var _k = options || {}, rowExpandingConfig = _k.rowExpanding, filtersConfig = _k.filters, globalSearchConfig = _k.globalSearch, columnHidingConfig = _k.columnHiding, paginationConfig = _k.pagination, sortingConfig = _k.sorting, virtualizeConfig = _k.virtualize;
|
|
115
|
+
var _k = options || {}, rowExpandingConfig = _k.rowExpanding, filtersConfig = _k.filters, globalSearchConfig = _k.globalSearch, columnHidingConfig = _k.columnHiding, paginationConfig = _k.pagination, sortingConfig = _k.sorting, tableConfig = _k.table, virtualizeConfig = _k.virtualize;
|
|
116
116
|
var ExpandedComponent = (rowExpandingConfig || {}).Component;
|
|
117
117
|
var allColumns = instance.allColumns, getTableProps = instance.getTableProps, gotoPage = instance.gotoPage, headerGroups = instance.headerGroups, page = instance.page, prepareRow = instance.prepareRow, rows = instance.rows, setAllFilters = instance.setAllFilters, setPageSize = instance.setPageSize, setFilter = instance.setFilter, setGlobalFilter = instance.setGlobalFilter, state = instance.state, totalColumnsWidth = instance.totalColumnsWidth;
|
|
118
118
|
var pageOptions = ((_b = options === null || options === void 0 ? void 0 : options.pagination) === null || _b === void 0 ? void 0 : _b.rowsPerPageOptions) || instance.pageOptions;
|
|
@@ -162,9 +162,9 @@ function DataTable(_a) {
|
|
|
162
162
|
}
|
|
163
163
|
}, [scrollLeft]);
|
|
164
164
|
return ((0, react_1.jsx)(material_1.Paper, __assign({ ref: rootRef, css: (0, react_1.css)(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n width: calc(100% - ", "px);\n height: 100%;\n position: relative;\n "], ["\n width: calc(100% - ", "px);\n height: 100%;\n position: relative;\n "])), hasScrollbar.vertical ? scrollbarWidth : 0), className: "DataTable" }, restOfProps),
|
|
165
|
-
(0, react_1.jsx)("div", { ref: toolbarRef, className: "DataTable__Toolbar" },
|
|
165
|
+
!(tableConfig === null || tableConfig === void 0 ? void 0 : tableConfig.hideToolbar) && ((0, react_1.jsx)("div", { ref: toolbarRef, className: "DataTable__Toolbar" },
|
|
166
166
|
(0, react_1.jsx)(Toolbar_1.default, { title: title, allColumns: allColumns, columnNameById: columnNameById, globalFilter: globalFilter, enableFilters: filtersConfig === null || filtersConfig === void 0 ? void 0 : filtersConfig.enabled, enableGlobalSearch: globalSearchConfig === null || globalSearchConfig === void 0 ? void 0 : globalSearchConfig.enabled, enableHideColumns: columnHidingConfig === null || columnHidingConfig === void 0 ? void 0 : columnHidingConfig.enabled, hasRowsSelected: hasRowsSelected, numRowsSelected: numRowsSelected, setAllFilters: setAllFilters, setGlobalFilter: (globalSearchConfig === null || globalSearchConfig === void 0 ? void 0 : globalSearchConfig.setGlobalFilter) ? globalSearchConfig === null || globalSearchConfig === void 0 ? void 0 : globalSearchConfig.setGlobalFilter : setGlobalFilter, renderActions: renderActions, renderRowSelectActions: renderRowSelectActions }),
|
|
167
|
-
(filtersConfig === null || filtersConfig === void 0 ? void 0 : filtersConfig.enabled) && ((0, react_1.jsx)(AppliedFilters_1.default, { columnNameById: columnNameById, filters: filters, setFilter: setFilter }))),
|
|
167
|
+
(filtersConfig === null || filtersConfig === void 0 ? void 0 : filtersConfig.enabled) && ((0, react_1.jsx)(AppliedFilters_1.default, { columnNameById: columnNameById, filters: filters, setFilter: setFilter })))),
|
|
168
168
|
(0, react_1.jsx)("div", { className: "DataTable__TableContainer", css: (0, react_1.css)(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n height: ", "px;\n "], ["\n height: ", "px;\n "])), containerHeight) },
|
|
169
169
|
(0, react_1.jsx)(Table_1.default, { getTableProps: getTableProps, css: (0, react_1.css)(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n width: 100%;\n display: grid;\n grid-template-rows: auto 1fr;\n "], ["\n width: 100%;\n display: grid;\n grid-template-rows: auto 1fr;\n "]))) },
|
|
170
170
|
(0, react_1.jsx)(material_1.TableHead, { ref: tableHeadRef, className: "DataTable__TableHead", component: "div", css: (0, react_1.css)(templateObject_4 || (templateObject_4 = __makeTemplateObject(["\n && {\n display: block;\n height: auto;\n width: calc(100% - ", "px);\n overflow-x: auto;\n -ms-overflow-style: none; /* IE and Edge */\n scrollbar-width: none; /* Firefox */\n\n &::-webkit-scrollbar {\n /* Hide scrollbar for Chrome, Safari and Opera */\n display: none;\n }\n }\n "], ["\n && {\n display: block;\n height: auto;\n width: calc(100% - ", "px);\n overflow-x: auto;\n -ms-overflow-style: none; /* IE and Edge */\n scrollbar-width: none; /* Firefox */\n\n &::-webkit-scrollbar {\n /* Hide scrollbar for Chrome, Safari and Opera */\n display: none;\n }\n }\n "])), hasScrollbar.vertical ? scrollbarWidth : 0), onScroll: function (evt) {
|
|
@@ -69,7 +69,6 @@ function DataTable() {
|
|
|
69
69
|
data: data,
|
|
70
70
|
options: options,
|
|
71
71
|
defaultColumn: { minWidth: 50, width: 150 },
|
|
72
|
-
initialState: { hiddenColumns: ['firstName'] },
|
|
73
72
|
});
|
|
74
73
|
return (react_1.default.createElement(material_1.ThemeProvider, { theme: (0, material_1.createTheme)() },
|
|
75
74
|
react_1.default.createElement("div", { style: { height: '700px', width: '640px' } },
|