pge-front-common 10.4.8 → 10.4.10
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/lib/components/Table/index.d.ts +1 -1
- package/lib/components/Table/index.types.d.ts +2 -0
- package/lib/index.d.ts +3 -1
- package/lib/index.esm.js +12 -5
- package/lib/index.esm.js.map +1 -1
- package/lib/index.js +12 -5
- package/lib/index.js.map +1 -1
- package/package.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { TableComponentProps } from "./index.types";
|
|
3
|
-
declare const TableComponent: ({ columns, data, onSort, renderCell, onActionClick, noRecordsMessage, hasIcon, renderActionIconCell, columnIcon }: TableComponentProps) => React.JSX.Element;
|
|
3
|
+
declare const TableComponent: ({ columns, data, onSort, renderCell, onActionClick, noRecordsMessage, hasIcon, renderActionIconCell, columnIcon, iconColumnName, setBorderTable, }: TableComponentProps) => React.JSX.Element;
|
|
4
4
|
export default TableComponent;
|
package/lib/index.d.ts
CHANGED
|
@@ -304,9 +304,11 @@ interface TableComponentProps {
|
|
|
304
304
|
hasIcon?: boolean;
|
|
305
305
|
renderActionIconCell: (item: any) => React__default.JSX.Element | null;
|
|
306
306
|
columnIcon?: React__default.ReactNode;
|
|
307
|
+
iconColumnName?: string;
|
|
308
|
+
setBorderTable?: boolean;
|
|
307
309
|
}
|
|
308
310
|
|
|
309
|
-
declare const TableComponent: ({ columns, data, onSort, renderCell, onActionClick, noRecordsMessage, hasIcon, renderActionIconCell, columnIcon }: TableComponentProps) => React__default.JSX.Element;
|
|
311
|
+
declare const TableComponent: ({ columns, data, onSort, renderCell, onActionClick, noRecordsMessage, hasIcon, renderActionIconCell, columnIcon, iconColumnName, setBorderTable, }: TableComponentProps) => React__default.JSX.Element;
|
|
310
312
|
|
|
311
313
|
declare const IconDownload: (props?: SVGProps<SVGSVGElement>) => React__default.JSX.Element;
|
|
312
314
|
|
package/lib/index.esm.js
CHANGED
|
@@ -8522,12 +8522,13 @@ var Title = function (_a) {
|
|
|
8522
8522
|
return React__default.createElement("h1", { className: styles$1.title__home }, title);
|
|
8523
8523
|
};
|
|
8524
8524
|
|
|
8525
|
-
var css_248z$1 = ".styles-module__tableResponsive___X3Pht {\r\n overflow-x: auto;\r\n border: 1px solid #e5e7eb;\r\n border-radius: 0.75rem;\r\n}\r\n\r\n.styles-module__table___u86d0 {\r\n width: 100%;\r\n border-collapse: collapse;\r\n border-radius: 8px 8px 0px 0px;\r\n}\r\n\r\n.styles-module__thead___31Y6o {\r\n background-color: #005a92;\r\n color: white;\r\n border-radius: 8px 8px 0px 0px;\r\n height: 40px;\r\n}\r\n\r\n.styles-module__th___HfMyp {\r\n padding: 16px 30px 16px 24px;\r\n cursor: pointer;\r\n position: relative;\r\n\r\n font-size: 14px;\r\n font-weight: 700;\r\n line-height: 19.07px;\r\n text-align: left;\r\n white-space: nowrap;\r\n}\r\n\r\n.styles-module__sortIndicator___TCKlV {\r\n display: inline-flex;\r\n align-items: center;\r\n margin-left: 8px;\r\n}\r\n\r\n.styles-module__sortAsc___FSCqV,\r\n.styles-module__sortDesc___gqFDu {\r\n margin: 0 2px;\r\n}\r\n\r\n.styles-module__tbody___gl0AK {\r\n border-top: 1px solid #e0e0e0;\r\n}\r\n\r\n.styles-module__rowWhite___ANenF {\r\n background-color: #eeeeee;\r\n}\r\n\r\n.styles-module__rowGray___Fq6QZ {\r\n background-color: #f6f6f6;\r\n}\r\n\r\n.styles-module__tr___0ZMLo:hover {\r\n background-color: #e0f7fa;\r\n}\r\n\r\n.styles-module__td___qg16D {\r\n text-align: start;\r\n padding: 8px 24px;\r\n white-space: nowrap;\r\n}\r\n\r\n.styles-module__noRecords___rkZTs {\r\n padding: 28px;\r\n text-align: center;\r\n color: #777;\r\n}\r\n\r\n.styles-module__actionHeader___GMevA {\r\n text-align: center; /* Center align header content if needed */\r\n}\r\n\r\n.styles-module__actionCell___kijis {\r\n text-align: center; /* Center align cell content */\r\n}\r\n\r\n.styles-module__actionIcon___knjpp {\r\n background: none;\r\n border: none;\r\n cursor: pointer;\r\n color: #ff0000; /* Red color for delete icon */\r\n font-size: 16px;\r\n padding: 0;\r\n margin: 0;\r\n}\r\n";
|
|
8526
|
-
var styles = {"tableResponsive":"styles-module__tableResponsive___X3Pht","table":"styles-module__table___u86d0","thead":"styles-module__thead___31Y6o","th":"styles-module__th___HfMyp","sortIndicator":"styles-module__sortIndicator___TCKlV","sortAsc":"styles-module__sortAsc___FSCqV","sortDesc":"styles-module__sortDesc___gqFDu","tbody":"styles-module__tbody___gl0AK","rowWhite":"styles-module__rowWhite___ANenF","rowGray":"styles-module__rowGray___Fq6QZ","tr":"styles-module__tr___0ZMLo","td":"styles-module__td___qg16D","noRecords":"styles-module__noRecords___rkZTs","actionHeader":"styles-module__actionHeader___GMevA","actionCell":"styles-module__actionCell___kijis","actionIcon":"styles-module__actionIcon___knjpp"};
|
|
8525
|
+
var css_248z$1 = ".styles-module__tableResponsive___X3Pht {\r\n overflow-x: auto;\r\n border: 1px solid #e5e7eb;\r\n border-radius: 0.75rem;\r\n}\r\n\r\n.styles-module__tableResponse__setBorderRadius___KbRux {\r\n border-radius: 0;\r\n border-top-left-radius: 0.75rem;\r\n border-top-right-radius: 0.75rem;\r\n}\r\n\r\n.styles-module__table___u86d0 {\r\n width: 100%;\r\n border-collapse: collapse;\r\n border-radius: 8px 8px 0px 0px;\r\n}\r\n\r\n.styles-module__thead___31Y6o {\r\n background-color: #005a92;\r\n color: white;\r\n border-radius: 8px 8px 0px 0px;\r\n height: 40px;\r\n}\r\n\r\n.styles-module__th___HfMyp {\r\n padding: 16px 30px 16px 24px;\r\n cursor: pointer;\r\n position: relative;\r\n\r\n font-size: 14px;\r\n font-weight: 700;\r\n line-height: 19.07px;\r\n text-align: left;\r\n white-space: nowrap;\r\n}\r\n\r\n.styles-module__sortIndicator___TCKlV {\r\n display: inline-flex;\r\n align-items: center;\r\n margin-left: 8px;\r\n}\r\n\r\n.styles-module__sortAsc___FSCqV,\r\n.styles-module__sortDesc___gqFDu {\r\n margin: 0 2px;\r\n}\r\n\r\n.styles-module__tbody___gl0AK {\r\n border-top: 1px solid #e0e0e0;\r\n}\r\n\r\n.styles-module__rowWhite___ANenF {\r\n background-color: #eeeeee;\r\n}\r\n\r\n.styles-module__rowGray___Fq6QZ {\r\n background-color: #f6f6f6;\r\n}\r\n\r\n.styles-module__tr___0ZMLo:hover {\r\n background-color: #e0f7fa;\r\n}\r\n\r\n.styles-module__td___qg16D {\r\n text-align: start;\r\n padding: 8px 24px;\r\n white-space: nowrap;\r\n}\r\n\r\n.styles-module__noRecords___rkZTs {\r\n padding: 28px;\r\n text-align: center;\r\n color: #777;\r\n}\r\n\r\n.styles-module__actionHeader___GMevA {\r\n text-align: center; /* Center align header content if needed */\r\n}\r\n\r\n.styles-module__actionCell___kijis {\r\n text-align: center; /* Center align cell content */\r\n}\r\n\r\n.styles-module__actionIcon___knjpp {\r\n background: none;\r\n border: none;\r\n cursor: pointer;\r\n color: #ff0000; /* Red color for delete icon */\r\n font-size: 16px;\r\n padding: 0;\r\n margin: 0;\r\n}\r\n";
|
|
8526
|
+
var styles = {"tableResponsive":"styles-module__tableResponsive___X3Pht","tableResponse__setBorderRadius":"styles-module__tableResponse__setBorderRadius___KbRux","table":"styles-module__table___u86d0","thead":"styles-module__thead___31Y6o","th":"styles-module__th___HfMyp","sortIndicator":"styles-module__sortIndicator___TCKlV","sortAsc":"styles-module__sortAsc___FSCqV","sortDesc":"styles-module__sortDesc___gqFDu","tbody":"styles-module__tbody___gl0AK","rowWhite":"styles-module__rowWhite___ANenF","rowGray":"styles-module__rowGray___Fq6QZ","tr":"styles-module__tr___0ZMLo","td":"styles-module__td___qg16D","noRecords":"styles-module__noRecords___rkZTs","actionHeader":"styles-module__actionHeader___GMevA","actionCell":"styles-module__actionCell___kijis","actionIcon":"styles-module__actionIcon___knjpp"};
|
|
8527
8527
|
styleInject(css_248z$1);
|
|
8528
8528
|
|
|
8529
8529
|
var TableComponent = function (_a) {
|
|
8530
|
-
var
|
|
8530
|
+
var _b;
|
|
8531
|
+
var columns = _a.columns, data = _a.data, onSort = _a.onSort, renderCell = _a.renderCell, onActionClick = _a.onActionClick, _c = _a.noRecordsMessage, noRecordsMessage = _c === void 0 ? "Nenhum registro encontrado" : _c, hasIcon = _a.hasIcon, renderActionIconCell = _a.renderActionIconCell, columnIcon = _a.columnIcon, iconColumnName = _a.iconColumnName, setBorderTable = _a.setBorderTable;
|
|
8531
8532
|
var handleSort = function (uid) {
|
|
8532
8533
|
if (onSort)
|
|
8533
8534
|
onSort(uid);
|
|
@@ -8538,7 +8539,10 @@ var TableComponent = function (_a) {
|
|
|
8538
8539
|
}
|
|
8539
8540
|
return renderCell(item, column.uid);
|
|
8540
8541
|
};
|
|
8541
|
-
return (React__default.createElement("div", { className: styles.tableResponsive },
|
|
8542
|
+
return (React__default.createElement("div", { className: clsx(styles.tableResponsive, (_b = {},
|
|
8543
|
+
_b[styles.tableResponse__setBorderRadius] = setBorderTable,
|
|
8544
|
+
_b)) },
|
|
8545
|
+
" ",
|
|
8542
8546
|
React__default.createElement("table", { className: styles.table },
|
|
8543
8547
|
React__default.createElement("thead", { className: styles.thead },
|
|
8544
8548
|
React__default.createElement("tr", null,
|
|
@@ -8546,7 +8550,10 @@ var TableComponent = function (_a) {
|
|
|
8546
8550
|
column.name,
|
|
8547
8551
|
" ",
|
|
8548
8552
|
columnIcon && columnIcon)); }),
|
|
8549
|
-
hasIcon && React__default.createElement("th", { className: styles.th }
|
|
8553
|
+
hasIcon && (React__default.createElement("th", { className: styles.th },
|
|
8554
|
+
iconColumnName || "Ações",
|
|
8555
|
+
" ",
|
|
8556
|
+
columnIcon && columnIcon)))),
|
|
8550
8557
|
React__default.createElement("tbody", { className: styles.tbody }, data.length > 0 ? (data.map(function (item, index) { return (React__default.createElement("tr", { key: item.id || index, className: index % 2 === 0 ? styles.rowWhite : styles.rowGray },
|
|
8551
8558
|
columns.map(function (column) { return (React__default.createElement("td", { key: item.id + column.uid, className: styles.td }, renderColumnCell(item, column))); }),
|
|
8552
8559
|
hasIcon && (React__default.createElement("td", { className: styles.actionCell }, renderActionIconCell(item))))); })) : (React__default.createElement("tr", null,
|