jattac.libs.web.responsive-table 0.1.2 → 0.1.4
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/README.md +14 -9
- package/dist/Data/IFooterColumnDefinition.d.ts +13 -0
- package/dist/index.js +12 -9
- package/dist/index.js.map +1 -1
- package/gemini/project_analysis.md +41 -0
- package/package.json +1 -1
- package/src/Data/IFooterColumnDefinition.ts +21 -6
- package/src/Styles/ResponsiveTable.module.css +29 -0
- package/src/UI/ResponsiveTable.tsx +28 -7
package/README.md
CHANGED
|
@@ -8,7 +8,7 @@ ResponsiveTable is a powerful, lightweight, and fully responsive React component
|
|
|
8
8
|
- **Highly Customizable**: Tailor the look and feel of columns, headers, and footers.
|
|
9
9
|
- **Dynamic Data Handling**: Define columns and footers based on your data or application state.
|
|
10
10
|
- **Delightful Animations**: Includes an optional skeleton loader and staggered row entrance animations.
|
|
11
|
-
- **Interactive Elements**: Easily add click handlers for rows and
|
|
11
|
+
- **Interactive Elements**: Easily add click handlers for rows, headers, and footer cells.
|
|
12
12
|
- **Performant**: Built with performance in mind, including debounced resize handling.
|
|
13
13
|
- **Easy to Use**: A simple and intuitive API for quick integration.
|
|
14
14
|
|
|
@@ -96,7 +96,7 @@ import ResponsiveTable from 'jattac.libs.web.responsive-table';
|
|
|
96
96
|
const ClickableRows = () => {
|
|
97
97
|
const columns = [
|
|
98
98
|
{ displayLabel: 'Product', cellRenderer: (row) => row.product },
|
|
99
|
-
{ displayLabel: 'Price', cellRenderer: (row) =>
|
|
99
|
+
{ displayLabel: 'Price', cellRenderer: (row) => `${row.price.toFixed(2)}` },
|
|
100
100
|
];
|
|
101
101
|
|
|
102
102
|
const data = [
|
|
@@ -183,9 +183,9 @@ const DynamicColumns = ({ isAdmin }) => {
|
|
|
183
183
|
};
|
|
184
184
|
```
|
|
185
185
|
|
|
186
|
-
### Example 5:
|
|
186
|
+
### Example 5: Advanced Footer with Labels and Interactivity
|
|
187
187
|
|
|
188
|
-
You can add a footer to display summary information, such as totals or averages. The footer is also responsive and will appear correctly in both desktop and mobile views.
|
|
188
|
+
You can add a footer to display summary information, such as totals or averages. The footer is also responsive and will appear correctly in both desktop and mobile views. With the enhanced footer functionality, you can provide explicit labels for mobile view and add click handlers to footer cells.
|
|
189
189
|
|
|
190
190
|
```jsx
|
|
191
191
|
import React from 'react';
|
|
@@ -195,7 +195,7 @@ const TableWithFooter = () => {
|
|
|
195
195
|
const columns = [
|
|
196
196
|
{ displayLabel: 'Item', cellRenderer: (row) => row.item },
|
|
197
197
|
{ displayLabel: 'Quantity', cellRenderer: (row) => row.quantity },
|
|
198
|
-
{ displayLabel: 'Price', cellRenderer: (row) =>
|
|
198
|
+
{ displayLabel: 'Price', cellRenderer: (row) => `${row.price.toFixed(2)}` },
|
|
199
199
|
];
|
|
200
200
|
|
|
201
201
|
const data = [
|
|
@@ -215,7 +215,9 @@ const TableWithFooter = () => {
|
|
|
215
215
|
},
|
|
216
216
|
{
|
|
217
217
|
colSpan: 1,
|
|
218
|
+
displayLabel: 'Total',
|
|
218
219
|
cellRenderer: () => <strong>${total.toFixed(2)}</strong>,
|
|
220
|
+
onCellClick: () => alert('Total clicked!'),
|
|
219
221
|
},
|
|
220
222
|
],
|
|
221
223
|
},
|
|
@@ -260,10 +262,13 @@ const TableWithFooter = () => {
|
|
|
260
262
|
|
|
261
263
|
### `IFooterColumnDefinition`
|
|
262
264
|
|
|
263
|
-
| Property | Type | Required | Description
|
|
264
|
-
| -------------- | ----------------- | -------- |
|
|
265
|
-
| `colSpan` | `number` | Yes | The number of columns the footer cell should span.
|
|
266
|
-
| `cellRenderer` | `() => ReactNode` | Yes | A function that returns the content for the footer cell.
|
|
265
|
+
| Property | Type | Required | Description |
|
|
266
|
+
| -------------- | ----------------- | -------- | ------------------------------------------------------------------------------ |
|
|
267
|
+
| `colSpan` | `number` | Yes | The number of columns the footer cell should span. |
|
|
268
|
+
| `cellRenderer` | `() => ReactNode` | Yes | A function that returns the content for the footer cell. |
|
|
269
|
+
| `displayLabel` | `ReactNode` | No | An optional, explicit label for the footer cell, especially for mobile view. |
|
|
270
|
+
| `onCellClick` | `() => void` | No | An optional click handler for the footer cell. |
|
|
271
|
+
| `className` | `string` | No | Optional class name for custom styling of the footer cell. |
|
|
267
272
|
|
|
268
273
|
## License
|
|
269
274
|
|
|
@@ -2,4 +2,17 @@ import { ReactNode } from 'react';
|
|
|
2
2
|
export default interface IFooterColumnDefinition {
|
|
3
3
|
colSpan: number;
|
|
4
4
|
cellRenderer: () => ReactNode;
|
|
5
|
+
/**
|
|
6
|
+
* An optional, explicit label for the footer cell, especially for mobile view.
|
|
7
|
+
* If not provided, the table could try to infer it from the corresponding column.
|
|
8
|
+
*/
|
|
9
|
+
displayLabel?: ReactNode;
|
|
10
|
+
/**
|
|
11
|
+
* An optional click handler for the footer cell.
|
|
12
|
+
*/
|
|
13
|
+
onCellClick?: () => void;
|
|
14
|
+
/**
|
|
15
|
+
* Optional class name for custom styling of the footer cell.
|
|
16
|
+
*/
|
|
17
|
+
className?: string;
|
|
5
18
|
}
|
package/dist/index.js
CHANGED
|
@@ -6,7 +6,7 @@ function styleInject(css, ref) {
|
|
|
6
6
|
if ( ref === void 0 ) ref = {};
|
|
7
7
|
var insertAt = ref.insertAt;
|
|
8
8
|
|
|
9
|
-
if (
|
|
9
|
+
if (typeof document === 'undefined') { return; }
|
|
10
10
|
|
|
11
11
|
var head = document.head || document.getElementsByTagName('head')[0];
|
|
12
12
|
var style = document.createElement('style');
|
|
@@ -29,8 +29,8 @@ function styleInject(css, ref) {
|
|
|
29
29
|
}
|
|
30
30
|
}
|
|
31
31
|
|
|
32
|
-
var css_248z = "/* Using CSS variables for a more maintainable and themeable design */\n:root {\n --table-border-color: #e0e0e0;\n --table-header-bg: #f8f9fa;\n --table-row-hover-bg: #f1f3f5;\n --table-row-stripe-bg: #fdfdfd;\n --card-bg: #ffffff;\n --card-border-color: #e0e0e0;\n --card-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);\n --text-color: #212529;\n --text-color-muted: #6c757d;\n --interactive-color: #0056b3;\n}\n\n/* Mobile Card View */\n.ResponsiveTable-module_card__b-U2v {\n background-color: var(--card-bg);\n border: 1px solid var(--card-border-color);\n margin-bottom: 1rem;\n border-radius: 8px;\n overflow: hidden;\n box-shadow: var(--card-shadow);\n transition: box-shadow 0.2s ease-in-out;\n}\n\n.ResponsiveTable-module_card__b-U2v:hover {\n box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);\n}\n\n/* This is not used in the component, but keeping it styled in case it's added back */\n.ResponsiveTable-module_card-header__Ttk51 {\n background-color: var(--table-header-bg);\n padding: 0.75rem 1rem;\n font-weight: 600; /* Bolder */\n border-bottom: 1px solid var(--table-border-color);\n}\n\n.ResponsiveTable-module_card-body__XIy0h {\n padding: 1rem;\n font-size: 0.9rem;\n}\n\n.ResponsiveTable-module_card-body__XIy0h p {\n margin: 0 0 0.75rem;\n display: flex;\n justify-content: space-between;\n}\n\n.ResponsiveTable-module_card-body__XIy0h p:last-child {\n margin-bottom: 0;\n}\n\n.ResponsiveTable-module_card-body__XIy0h span:first-child {\n font-weight: 600;\n color: var(--text-color);\n margin-right: 0.5rem;\n}\n\n/* Desktop Table View */\n.ResponsiveTable-module_responsiveTable__4y-Od {\n width: 100%;\n border-collapse: collapse;\n color: var(--text-color);\n}\n\n.ResponsiveTable-module_responsiveTable__4y-Od thead th {\n background-color: var(--table-header-bg);\n position: sticky;\n top: 0;\n z-index: 2;\n font-weight: 600;\n text-align: left;\n padding: 1rem;\n border-bottom: 2px solid var(--table-border-color);\n}\n\n.ResponsiveTable-module_responsiveTable__4y-Od td {\n padding: 1rem;\n border-bottom: 1px solid var(--table-border-color);\n text-align: left;\n}\n\n/* Remove alternating row colors for a cleaner look */\n.ResponsiveTable-module_responsiveTable__4y-Od tr {\n background-color: var(--card-bg);\n transition: background-color 0.2s ease-in-out;\n}\n\n/* Modern hover effect */\n.ResponsiveTable-module_responsiveTable__4y-Od tr:hover {\n background-color: var(--table-row-hover-bg);\n}\n\n/* Clickable Header Style */\n.ResponsiveTable-module_clickableHeader__xHQhF {\n cursor: pointer;\n color: var(--interactive-color);\n}\n\n.ResponsiveTable-module_clickableHeader__xHQhF:hover {\n text-decoration: underline;\n}\n\n.ResponsiveTable-module_responsiveTable__4y-Od tfoot {\n background-color: var(--table-header-bg);\n border-top: 2px solid var(--table-border-color);\n font-weight: 600;\n}\n\n.ResponsiveTable-module_footerCell__8H-uG {\n padding: 1rem;\n text-align: right;\n}\n\n/* No Data State */\n\n/* Staggered Entrance Animation */\n.ResponsiveTable-module_animatedRow__SFjrJ {\n animation: ResponsiveTable-module_fadeInUp__jMCS7 0.5s ease-out forwards;\n opacity: 0;\n}\n\n@keyframes ResponsiveTable-module_fadeInUp__jMCS7 {\n from {\n opacity: 0;\n transform: translateY(20px);\n }\n to {\n opacity: 1;\n transform: translateY(0);\n }\n}\n\n/* Skeleton Loader */\n.ResponsiveTable-module_skeleton__XxsXW {\n background-color: #e0e0e0;\n border-radius: 4px;\n position: relative;\n overflow: hidden;\n}\n\n.ResponsiveTable-module_skeleton__XxsXW::after {\n content: '';\n position: absolute;\n top: 0;\n left: -150%;\n width: 150%;\n height: 100%;\n background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);\n animation: ResponsiveTable-module_shimmer__H8PhC 1.5s infinite;\n}\n\n.ResponsiveTable-module_skeletonText__T-Lgq {\n height: 1.2em;\n width: 100%;\n}\n\n.ResponsiveTable-module_skeletonCard__AYVwL {\n background-color: var(--card-bg);\n border: 1px solid var(--card-border-color);\n margin-bottom: 1rem;\n border-radius: 8px;\n overflow: hidden;\n padding: 1rem;\n}\n\n@keyframes ResponsiveTable-module_shimmer__H8PhC {\n 0% {\n transform: translateX(0);\n }\n 100% {\n transform: translateX(100%);\n }\n}\n.ResponsiveTable-module_noDataWrapper__Rj-k3 {\n color: var(--text-color-muted); /* Softer color */\n display: flex;\n justify-content: center;\n align-items: center;\n height: 100%;\n gap: 10px;\n padding: 40px;\n background-color: var(--table-header-bg);\n border: 1px dashed var(--table-border-color);\n border-radius: 8px;\n}\n\n.ResponsiveTable-module_noData__IpwNq {\n text-align: center;\n font-weight: 500; /* Less aggressive than bold */\n font-size: 1rem;\n}\n";
|
|
33
|
-
var styles = {"card":"ResponsiveTable-module_card__b-U2v","card-header":"ResponsiveTable-module_card-header__Ttk51","card-body":"ResponsiveTable-module_card-body__XIy0h","responsiveTable":"ResponsiveTable-module_responsiveTable__4y-Od","clickableHeader":"ResponsiveTable-module_clickableHeader__xHQhF","footerCell":"ResponsiveTable-module_footerCell__8H-uG","
|
|
32
|
+
var css_248z = "/* Using CSS variables for a more maintainable and themeable design */\n:root {\n --table-border-color: #e0e0e0;\n --table-header-bg: #f8f9fa;\n --table-row-hover-bg: #f1f3f5;\n --table-row-stripe-bg: #fdfdfd;\n --card-bg: #ffffff;\n --card-border-color: #e0e0e0;\n --card-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);\n --text-color: #212529;\n --text-color-muted: #6c757d;\n --interactive-color: #0056b3;\n}\n\n/* Mobile Card View */\n.ResponsiveTable-module_card__b-U2v {\n background-color: var(--card-bg);\n border: 1px solid var(--card-border-color);\n margin-bottom: 1rem;\n border-radius: 8px;\n overflow: hidden;\n box-shadow: var(--card-shadow);\n transition: box-shadow 0.2s ease-in-out;\n}\n\n.ResponsiveTable-module_card__b-U2v:hover {\n box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);\n}\n\n/* This is not used in the component, but keeping it styled in case it's added back */\n.ResponsiveTable-module_card-header__Ttk51 {\n background-color: var(--table-header-bg);\n padding: 0.75rem 1rem;\n font-weight: 600; /* Bolder */\n border-bottom: 1px solid var(--table-border-color);\n}\n\n.ResponsiveTable-module_card-body__XIy0h {\n padding: 1rem;\n font-size: 0.9rem;\n}\n\n.ResponsiveTable-module_card-body__XIy0h p {\n margin: 0 0 0.75rem;\n display: flex;\n justify-content: space-between;\n}\n\n.ResponsiveTable-module_card-body__XIy0h p:last-child {\n margin-bottom: 0;\n}\n\n.ResponsiveTable-module_card-body__XIy0h span:first-child {\n font-weight: 600;\n color: var(--text-color);\n margin-right: 0.5rem;\n}\n\n/* Desktop Table View */\n.ResponsiveTable-module_responsiveTable__4y-Od {\n width: 100%;\n border-collapse: collapse;\n color: var(--text-color);\n}\n\n.ResponsiveTable-module_responsiveTable__4y-Od thead th {\n background-color: var(--table-header-bg);\n position: sticky;\n top: 0;\n z-index: 2;\n font-weight: 600;\n text-align: left;\n padding: 1rem;\n border-bottom: 2px solid var(--table-border-color);\n}\n\n.ResponsiveTable-module_responsiveTable__4y-Od td {\n padding: 1rem;\n border-bottom: 1px solid var(--table-border-color);\n text-align: left;\n}\n\n/* Remove alternating row colors for a cleaner look */\n.ResponsiveTable-module_responsiveTable__4y-Od tr {\n background-color: var(--card-bg);\n transition: background-color 0.2s ease-in-out;\n}\n\n/* Modern hover effect */\n.ResponsiveTable-module_responsiveTable__4y-Od tr:hover {\n background-color: var(--table-row-hover-bg);\n}\n\n/* Clickable Header Style */\n.ResponsiveTable-module_clickableHeader__xHQhF {\n cursor: pointer;\n color: var(--interactive-color);\n}\n\n.ResponsiveTable-module_clickableHeader__xHQhF:hover {\n text-decoration: underline;\n}\n\n.ResponsiveTable-module_responsiveTable__4y-Od tfoot {\n background-color: var(--table-header-bg);\n border-top: 2px solid var(--table-border-color);\n font-weight: 600;\n}\n\n.ResponsiveTable-module_footerCell__8H-uG {\n padding: 1rem;\n text-align: right;\n}\n\n.ResponsiveTable-module_clickableFooterCell__WB9Ss {\n cursor: pointer;\n color: var(--interactive-color);\n}\n\n.ResponsiveTable-module_clickableFooterCell__WB9Ss:hover {\n text-decoration: underline;\n}\n\n.ResponsiveTable-module_footerCard__-NE2M {\n background-color: var(--table-header-bg);\n border: 1px solid var(--card-border-color);\n margin-bottom: 1rem;\n border-radius: 8px;\n overflow: hidden;\n box-shadow: var(--card-shadow);\n}\n\n.ResponsiveTable-module_footer-card-body__CtBMv {\n padding: 1rem;\n font-size: 0.9rem;\n}\n\n.ResponsiveTable-module_footer-card-row__Vv6Ur {\n margin: 0 0 0.75rem;\n display: flex;\n justify-content: space-between;\n}\n\n/* No Data State */\n\n/* Staggered Entrance Animation */\n.ResponsiveTable-module_animatedRow__SFjrJ {\n animation: ResponsiveTable-module_fadeInUp__jMCS7 0.5s ease-out forwards;\n opacity: 0;\n}\n\n@keyframes ResponsiveTable-module_fadeInUp__jMCS7 {\n from {\n opacity: 0;\n transform: translateY(20px);\n }\n to {\n opacity: 1;\n transform: translateY(0);\n }\n}\n\n/* Skeleton Loader */\n.ResponsiveTable-module_skeleton__XxsXW {\n background-color: #e0e0e0;\n border-radius: 4px;\n position: relative;\n overflow: hidden;\n}\n\n.ResponsiveTable-module_skeleton__XxsXW::after {\n content: '';\n position: absolute;\n top: 0;\n left: -150%;\n width: 150%;\n height: 100%;\n background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);\n animation: ResponsiveTable-module_shimmer__H8PhC 1.5s infinite;\n}\n\n.ResponsiveTable-module_skeletonText__T-Lgq {\n height: 1.2em;\n width: 100%;\n}\n\n.ResponsiveTable-module_skeletonCard__AYVwL {\n background-color: var(--card-bg);\n border: 1px solid var(--card-border-color);\n margin-bottom: 1rem;\n border-radius: 8px;\n overflow: hidden;\n padding: 1rem;\n}\n\n@keyframes ResponsiveTable-module_shimmer__H8PhC {\n 0% {\n transform: translateX(0);\n }\n 100% {\n transform: translateX(100%);\n }\n}\n.ResponsiveTable-module_noDataWrapper__Rj-k3 {\n color: var(--text-color-muted); /* Softer color */\n display: flex;\n justify-content: center;\n align-items: center;\n height: 100%;\n gap: 10px;\n padding: 40px;\n background-color: var(--table-header-bg);\n border: 1px dashed var(--table-border-color);\n border-radius: 8px;\n}\n\n.ResponsiveTable-module_noData__IpwNq {\n text-align: center;\n font-weight: 500; /* Less aggressive than bold */\n font-size: 1rem;\n}\n";
|
|
33
|
+
var styles = {"card":"ResponsiveTable-module_card__b-U2v","card-header":"ResponsiveTable-module_card-header__Ttk51","card-body":"ResponsiveTable-module_card-body__XIy0h","responsiveTable":"ResponsiveTable-module_responsiveTable__4y-Od","clickableHeader":"ResponsiveTable-module_clickableHeader__xHQhF","footerCell":"ResponsiveTable-module_footerCell__8H-uG","clickableFooterCell":"ResponsiveTable-module_clickableFooterCell__WB9Ss","footerCard":"ResponsiveTable-module_footerCard__-NE2M","footer-card-body":"ResponsiveTable-module_footer-card-body__CtBMv","footer-card-row":"ResponsiveTable-module_footer-card-row__Vv6Ur","animatedRow":"ResponsiveTable-module_animatedRow__SFjrJ","skeleton":"ResponsiveTable-module_skeleton__XxsXW","skeletonText":"ResponsiveTable-module_skeletonText__T-Lgq","skeletonCard":"ResponsiveTable-module_skeletonCard__AYVwL","noDataWrapper":"ResponsiveTable-module_noDataWrapper__Rj-k3","noData":"ResponsiveTable-module_noData__IpwNq"};
|
|
34
34
|
styleInject(css_248z);
|
|
35
35
|
|
|
36
36
|
// Class component
|
|
@@ -136,14 +136,19 @@ class ResponsiveTable extends React.Component {
|
|
|
136
136
|
if (!this.props.footerRows || this.props.footerRows.length === 0) {
|
|
137
137
|
return null;
|
|
138
138
|
}
|
|
139
|
-
return (React.createElement("tfoot", null, this.props.footerRows.map((row, rowIndex) => (React.createElement("tr", { key: rowIndex }, row.columns.map((col, colIndex) => (React.createElement("td", { key: colIndex, colSpan: col.colSpan, className: styles.footerCell }, col.cellRenderer()))))))));
|
|
139
|
+
return (React.createElement("tfoot", null, this.props.footerRows.map((row, rowIndex) => (React.createElement("tr", { key: rowIndex }, row.columns.map((col, colIndex) => (React.createElement("td", { key: colIndex, colSpan: col.colSpan, className: `${styles.footerCell} ${col.className || ''} ${col.onCellClick ? styles.clickableFooterCell : ''}`, onClick: col.onCellClick }, col.cellRenderer()))))))));
|
|
140
140
|
}
|
|
141
141
|
get mobileFooter() {
|
|
142
142
|
if (!this.props.footerRows || this.props.footerRows.length === 0) {
|
|
143
143
|
return null;
|
|
144
144
|
}
|
|
145
|
-
return (React.createElement("div", { className: styles
|
|
146
|
-
React.createElement("div", { className: styles['card-body'] }, this.props.footerRows.map((row, rowIndex) => (React.createElement("div", { key: rowIndex }, row.columns.map((col, colIndex) =>
|
|
145
|
+
return (React.createElement("div", { className: styles.footerCard },
|
|
146
|
+
React.createElement("div", { className: styles['footer-card-body'] }, this.props.footerRows.map((row, rowIndex) => (React.createElement("div", { key: rowIndex }, row.columns.map((col, colIndex) => {
|
|
147
|
+
const label = col.displayLabel;
|
|
148
|
+
return (React.createElement("p", { key: colIndex, className: `${styles['footer-card-row']} ${col.className || ''} ${col.onCellClick ? styles.clickableFooterCell : ''}`, onClick: col.onCellClick },
|
|
149
|
+
label && (React.createElement("span", { className: styles['card-label'] }, label)),
|
|
150
|
+
React.createElement("span", { className: styles['card-value'] }, col.cellRenderer())));
|
|
151
|
+
})))))));
|
|
147
152
|
}
|
|
148
153
|
get skeletonView() {
|
|
149
154
|
const skeletonRowCount = 5; // Or make this configurable
|
|
@@ -172,9 +177,7 @@ class ResponsiveTable extends React.Component {
|
|
|
172
177
|
const clickableHeaderClassName = this.getClickableHeaderClassName(onHeaderClickCallback, colDef);
|
|
173
178
|
return (React.createElement("div", { key: colIndex, className: styles['card-row'] },
|
|
174
179
|
React.createElement("p", null,
|
|
175
|
-
React.createElement("span", { className: `${styles['card-label']} ${clickableHeaderClassName}`, onClick: onHeaderClickCallback ? () => onHeaderClickCallback(colDef.interactivity.id) : undefined },
|
|
176
|
-
colDef.displayLabel,
|
|
177
|
-
":"),
|
|
180
|
+
React.createElement("span", { className: `${styles['card-label']} ${clickableHeaderClassName}`, onClick: onHeaderClickCallback ? () => onHeaderClickCallback(colDef.interactivity.id) : undefined }, colDef.displayLabel),
|
|
178
181
|
React.createElement("span", { className: styles['card-value'] }, colDef.cellRenderer(row)))));
|
|
179
182
|
}))))),
|
|
180
183
|
this.mobileFooter));
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../node_modules/style-inject/dist/style-inject.es.js","../src/UI/ResponsiveTable.tsx"],"sourcesContent":["function styleInject(css, ref) {\n if ( ref === void 0 ) ref = {};\n var insertAt = ref.insertAt;\n\n if (!css || typeof document === 'undefined') { return; }\n\n var head = document.head || document.getElementsByTagName('head')[0];\n var style = document.createElement('style');\n style.type = 'text/css';\n\n if (insertAt === 'top') {\n if (head.firstChild) {\n head.insertBefore(style, head.firstChild);\n } else {\n head.appendChild(style);\n }\n } else {\n head.appendChild(style);\n }\n\n if (style.styleSheet) {\n style.styleSheet.cssText = css;\n } else {\n style.appendChild(document.createTextNode(css));\n }\n}\n\nexport default styleInject;\n",null],"names":["Component"],"mappings":";;;;AAAA,SAAS,WAAW,CAAC,GAAG,EAAE,GAAG,EAAE;AAC/B,EAAE,KAAK,GAAG,KAAK,KAAK,CAAC,GAAG,GAAG,GAAG,EAAE,CAAC;AACjC,EAAE,IAAI,QAAQ,GAAG,GAAG,CAAC,QAAQ,CAAC;AAC9B;AACA,EAAE,IAAI,CAAC,GAAG,IAAI,OAAO,QAAQ,KAAK,WAAW,EAAE,EAAE,OAAO,EAAE;AAC1D;AACA,EAAE,IAAI,IAAI,GAAG,QAAQ,CAAC,IAAI,IAAI,QAAQ,CAAC,oBAAoB,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC;AACvE,EAAE,IAAI,KAAK,GAAG,QAAQ,CAAC,aAAa,CAAC,OAAO,CAAC,CAAC;AAC9C,EAAE,KAAK,CAAC,IAAI,GAAG,UAAU,CAAC;AAC1B;AACA,EAAE,IAAI,QAAQ,KAAK,KAAK,EAAE;AAC1B,IAAI,IAAI,IAAI,CAAC,UAAU,EAAE;AACzB,MAAM,IAAI,CAAC,YAAY,CAAC,KAAK,EAAE,IAAI,CAAC,UAAU,CAAC,CAAC;AAChD,KAAK,MAAM;AACX,MAAM,IAAI,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC;AAC9B,KAAK;AACL,GAAG,MAAM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M,CAAA,aAAA,CAAA,MAAA,EAAA,EAAA,KAAK,EAAO,MAAA,CAAA,MAAA,CAAA,EAAA,EAAA,IAAI,CAAC,aAAa,CACjC,EAAA,EAAA,IAAI,CAAC,mBAAmB,CAAC,gBAAgB,EAAE,QAAQ,CAAC,CAAC,YAAY,CAAC,GAAG,CAAC,CAClE,CACJ,CACN,CAAC,CACC,CACN,CAAC,CACI;AACP,gBAAA,IAAI,CAAC,WAAW,CACX,CACJ,EACN;KACH;IAED,MAAM,GAAA;AACJ,QAAA,IAAI,IAAI,CAAC,KAAK,CAAC,SAAS,EAAE;YACxB,OAAO,IAAI,CAAC,YAAY,CAAC;SAC1B;AAED,QAAA,IAAI,CAAC,IAAI,CAAC,OAAO,EAAE;YACjB,OAAO,IAAI,CAAC,eAAe,CAAC;SAC7B;AACD,QAAA,IAAI,IAAI,CAAC,KAAK,CAAC,QAAQ,EAAE;YACvB,OAAO,IAAI,CAAC,UAAU,CAAC;SACxB;QAED,OAAO,IAAI,CAAC,eAAe,CAAC;KAC7B;AACF;;;;","x_google_ignoreList":[0]}
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../node_modules/style-inject/dist/style-inject.es.js","../src/UI/ResponsiveTable.tsx"],"sourcesContent":["function styleInject(css, ref) {\n if ( ref === void 0 ) ref = {};\n var insertAt = ref.insertAt;\n\n if (!css || typeof document === 'undefined') { return; }\n\n var head = document.head || document.getElementsByTagName('head')[0];\n var style = document.createElement('style');\n style.type = 'text/css';\n\n if (insertAt === 'top') {\n if (head.firstChild) {\n head.insertBefore(style, head.firstChild);\n } else {\n head.appendChild(style);\n }\n } else {\n head.appendChild(style);\n }\n\n if (style.styleSheet) {\n style.styleSheet.cssText = css;\n } else {\n style.appendChild(document.createTextNode(css));\n }\n}\n\nexport default styleInject;\n",null],"names":["Component"],"mappings":";;;;AAAA,SAAS,WAAW,CAAC,GAAG,EAAE,GAAG,EAAE;AAC/B,EAAE,KAAK,GAAG,KAAK,MAAM,GAAG,GAAG,GA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AGxB,OAAO,IAAI,CAAC,eAAe;;AAE9B;;;;","x_google_ignoreList":[0]}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
|
|
2
|
+
Based on the files, here's an in-depth understanding of the project:
|
|
3
|
+
|
|
4
|
+
**Project Goal:**
|
|
5
|
+
|
|
6
|
+
The project, `jattac.libs.web.responsive-table`, is a reusable **React component library** that provides a highly customizable and responsive table. The key feature is its ability to transform from a traditional tabular layout on larger screens to a more readable card-based layout on mobile devices.
|
|
7
|
+
|
|
8
|
+
**Core Functionality & Features:**
|
|
9
|
+
|
|
10
|
+
* **Responsiveness:** This is the primary selling point. It automatically adapts the table's presentation based on the screen width (`mobileBreakpoint` prop), ensuring a good user experience on both desktop and mobile.
|
|
11
|
+
* **Data-Driven:** The table is populated with data passed through the `data` prop. The structure of the table (columns) is defined by the `columnDefinitions` prop.
|
|
12
|
+
* **Customizable Rendering:** The `cellRenderer` function in the column definitions allows developers to render any React component within a cell, enabling rich content like buttons, links, formatted text, and more.
|
|
13
|
+
* **Dynamic Columns:** Column definitions can be functions, allowing for the dynamic creation of columns based on application state or data properties (e.g., showing an "Admin Actions" column only for admin users).
|
|
14
|
+
* **Interactivity:**
|
|
15
|
+
* **Row Clicks:** The `onRowClick` prop allows for handling clicks on entire table rows.
|
|
16
|
+
* **Header Clicks:** The `interactivity` property on a column definition enables click handlers for table headers, useful for sorting or filtering actions.
|
|
17
|
+
* **Loading and Empty States:**
|
|
18
|
+
* It provides a `isLoading` prop to display a skeleton loader while data is being fetched, improving the user experience.
|
|
19
|
+
* A customizable `noDataComponent` can be shown when there's no data to display.
|
|
20
|
+
* **Animations:** It supports optional staggered entrance animations for rows (`animateOnLoad` prop) to make the table feel more dynamic.
|
|
21
|
+
* **Table Footer:** The `footerRows` prop allows for adding a footer to the table, which is also responsive. This is useful for displaying summary information like totals.
|
|
22
|
+
* **Styling:** It uses CSS Modules (`ResponsiveTable.module.css`) for scoped styling, preventing style conflicts with other parts of an application. It also uses CSS variables for easy theming.
|
|
23
|
+
|
|
24
|
+
**Project Structure & Technology Stack:**
|
|
25
|
+
|
|
26
|
+
* **Language:** TypeScript (`.ts`, `.tsx`) and JavaScript for the build configuration.
|
|
27
|
+
* **Framework:** React.
|
|
28
|
+
* **Build Tool:** Rollup is used to bundle the library for distribution. The `rollup.config.js` file defines the build process, including plugins for handling TypeScript, PostCSS (for CSS Modules), and resolving dependencies.
|
|
29
|
+
* **Package Manager:** npm.
|
|
30
|
+
* **Linting & Formatting:** ESLint and Prettier are used to maintain code quality and consistency.
|
|
31
|
+
* **Testing:** While no test files are present, the `package.json` includes dependencies for `@testing-library/react`, indicating that testing is intended for this project.
|
|
32
|
+
* **Distribution:** The `dist` directory (ignored by Git) is the output for the bundled library, which is then published to npm. The `package.json` defines the entry points (`main`, `module`, `types`).
|
|
33
|
+
|
|
34
|
+
**Development & Maintenance:**
|
|
35
|
+
|
|
36
|
+
* The project includes shell scripts (`set-origin-urls.sh`, `update-dependancies.sh`) to help with development tasks like updating remote URLs and managing dependencies.
|
|
37
|
+
* The `README.md` is comprehensive, providing clear installation instructions, getting-started examples, and a detailed API reference. This is crucial for a library intended for other developers to use.
|
|
38
|
+
|
|
39
|
+
**Overall Impression:**
|
|
40
|
+
|
|
41
|
+
This is a well-structured and well-documented React component library. It solves a common problem (responsive tables) with a modern and flexible approach. The focus on customization, performance (debounced resize handling), and developer experience (clear documentation, helpful scripts) makes it a high-quality project. The use of TypeScript, CSS Modules, and a proper build process are all signs of a professional and maintainable codebase.
|
package/package.json
CHANGED
|
@@ -1,6 +1,21 @@
|
|
|
1
|
-
import { ReactNode } from 'react';
|
|
2
|
-
|
|
3
|
-
export default interface IFooterColumnDefinition {
|
|
4
|
-
colSpan: number;
|
|
5
|
-
cellRenderer: () => ReactNode;
|
|
6
|
-
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
|
|
3
|
+
export default interface IFooterColumnDefinition {
|
|
4
|
+
colSpan: number;
|
|
5
|
+
cellRenderer: () => ReactNode;
|
|
6
|
+
/**
|
|
7
|
+
* An optional, explicit label for the footer cell, especially for mobile view.
|
|
8
|
+
* If not provided, the table could try to infer it from the corresponding column.
|
|
9
|
+
*/
|
|
10
|
+
displayLabel?: ReactNode;
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* An optional click handler for the footer cell.
|
|
14
|
+
*/
|
|
15
|
+
onCellClick?: () => void;
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* Optional class name for custom styling of the footer cell.
|
|
19
|
+
*/
|
|
20
|
+
className?: string;
|
|
21
|
+
}
|
|
@@ -112,6 +112,35 @@
|
|
|
112
112
|
text-align: right;
|
|
113
113
|
}
|
|
114
114
|
|
|
115
|
+
.clickableFooterCell {
|
|
116
|
+
cursor: pointer;
|
|
117
|
+
color: var(--interactive-color);
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
.clickableFooterCell:hover {
|
|
121
|
+
text-decoration: underline;
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
.footerCard {
|
|
125
|
+
background-color: var(--table-header-bg);
|
|
126
|
+
border: 1px solid var(--card-border-color);
|
|
127
|
+
margin-bottom: 1rem;
|
|
128
|
+
border-radius: 8px;
|
|
129
|
+
overflow: hidden;
|
|
130
|
+
box-shadow: var(--card-shadow);
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
.footer-card-body {
|
|
134
|
+
padding: 1rem;
|
|
135
|
+
font-size: 0.9rem;
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
.footer-card-row {
|
|
139
|
+
margin: 0 0 0.75rem;
|
|
140
|
+
display: flex;
|
|
141
|
+
justify-content: space-between;
|
|
142
|
+
}
|
|
143
|
+
|
|
115
144
|
/* No Data State */
|
|
116
145
|
|
|
117
146
|
/* Staggered Entrance Animation */
|
|
@@ -159,7 +159,12 @@ class ResponsiveTable<TData> extends Component<IProps<TData>, IState> {
|
|
|
159
159
|
{this.props.footerRows.map((row, rowIndex) => (
|
|
160
160
|
<tr key={rowIndex}>
|
|
161
161
|
{row.columns.map((col, colIndex) => (
|
|
162
|
-
<td
|
|
162
|
+
<td
|
|
163
|
+
key={colIndex}
|
|
164
|
+
colSpan={col.colSpan}
|
|
165
|
+
className={`${styles.footerCell} ${col.className || ''} ${col.onCellClick ? styles.clickableFooterCell : ''}`}
|
|
166
|
+
onClick={col.onCellClick}
|
|
167
|
+
>
|
|
163
168
|
{col.cellRenderer()}
|
|
164
169
|
</td>
|
|
165
170
|
))}
|
|
@@ -175,13 +180,29 @@ class ResponsiveTable<TData> extends Component<IProps<TData>, IState> {
|
|
|
175
180
|
}
|
|
176
181
|
|
|
177
182
|
return (
|
|
178
|
-
<div className={styles
|
|
179
|
-
<div className={styles['card-body']}>
|
|
183
|
+
<div className={styles.footerCard}>
|
|
184
|
+
<div className={styles['footer-card-body']}>
|
|
180
185
|
{this.props.footerRows.map((row, rowIndex) => (
|
|
181
186
|
<div key={rowIndex}>
|
|
182
|
-
{row.columns.map((col, colIndex) =>
|
|
183
|
-
|
|
184
|
-
|
|
187
|
+
{row.columns.map((col, colIndex) => {
|
|
188
|
+
const label = col.displayLabel;
|
|
189
|
+
return (
|
|
190
|
+
<p
|
|
191
|
+
key={colIndex}
|
|
192
|
+
className={`${styles['footer-card-row']} ${col.className || ''} ${
|
|
193
|
+
col.onCellClick ? styles.clickableFooterCell : ''
|
|
194
|
+
}`}
|
|
195
|
+
onClick={col.onCellClick}
|
|
196
|
+
>
|
|
197
|
+
{label && (
|
|
198
|
+
<span className={styles['card-label']}>
|
|
199
|
+
{label}
|
|
200
|
+
</span>
|
|
201
|
+
)}
|
|
202
|
+
<span className={styles['card-value']}>{col.cellRenderer()}</span>
|
|
203
|
+
</p>
|
|
204
|
+
);
|
|
205
|
+
})}
|
|
185
206
|
</div>
|
|
186
207
|
))}
|
|
187
208
|
</div>
|
|
@@ -262,7 +283,7 @@ class ResponsiveTable<TData> extends Component<IProps<TData>, IState> {
|
|
|
262
283
|
onHeaderClickCallback ? () => onHeaderClickCallback(colDef.interactivity!.id) : undefined
|
|
263
284
|
}
|
|
264
285
|
>
|
|
265
|
-
{colDef.displayLabel}
|
|
286
|
+
{colDef.displayLabel}
|
|
266
287
|
</span>
|
|
267
288
|
<span className={styles['card-value']}>{colDef.cellRenderer(row)}</span>
|
|
268
289
|
</p>
|