componenteshospitais 3.3.4 → 3.3.5

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/cjs/index.js CHANGED
@@ -16349,9 +16349,9 @@ var styles$1 = {"tableContainer":"tableStandard-module_tableContainer__W2g84","t
16349
16349
  styleInject(css_248z$1);
16350
16350
 
16351
16351
  var TableStandard = function (_a) {
16352
- var dados = _a.dados, onRowClick = _a.onRowClick, _b = _a.idColumn, idColumn = _b === void 0 ? 'id' : _b, onActionClick = _a.onActionClick, onDownloadClick = _a.onDownloadClick, onViewClick = _a.onViewClick, _c = _a.showActionColumn, showActionColumn = _c === void 0 ? false : _c, _d = _a.showDownloadButton, showDownloadButton = _d === void 0 ? false : _d, _e = _a.showExcelDownloadButton, showExcelDownloadButton = _e === void 0 ? false : _e, _f = _a.showViewButton, showViewButton = _f === void 0 ? false : _f, _g = _a.cor, cor = _g === void 0 ? false : _g, _h = _a.numeroPaginas, numeroPaginas = _h === void 0 ? 10 : _h, empresa = _a.empresa;
16353
- var _j = React.useState(null), selectedRow = _j[0], setSelectedRow = _j[1];
16354
- var _k = React.useState(1), currentPage = _k[0], setCurrentPage = _k[1];
16352
+ var dados = _a.dados, onRowClick = _a.onRowClick, _b = _a.idColumn, idColumn = _b === void 0 ? 'id' : _b, onActionClick = _a.onActionClick, onDownloadClick = _a.onDownloadClick, onViewClick = _a.onViewClick, _c = _a.showActionColumn, showActionColumn = _c === void 0 ? false : _c, _d = _a.showDownloadButton, showDownloadButton = _d === void 0 ? false : _d, _e = _a.showExcelDownloadButton, showExcelDownloadButton = _e === void 0 ? false : _e, _f = _a.showViewButton, showViewButton = _f === void 0 ? false : _f, _g = _a.cor, cor = _g === void 0 ? false : _g, _h = _a.numeroPaginas, numeroPaginas = _h === void 0 ? 10 : _h, empresa = _a.empresa, _j = _a.paginacao, paginacao = _j === void 0 ? true : _j;
16353
+ var _k = React.useState(null), selectedRow = _k[0], setSelectedRow = _k[1];
16354
+ var _l = React.useState(1), currentPage = _l[0], setCurrentPage = _l[1];
16355
16355
  var ultimoItem = currentPage * numeroPaginas;
16356
16356
  var primeiroItem = ultimoItem - numeroPaginas;
16357
16357
  var currentItems = dados.slice(primeiroItem, ultimoItem);
@@ -16411,7 +16411,7 @@ var TableStandard = function (_a) {
16411
16411
  onViewClick(row[idColumn]);
16412
16412
  }, className: styles$1.actionButton, title: 'Visualizar' },
16413
16413
  React.createElement(FaEye, null)))))))); }))),
16414
- React.createElement("div", { className: "".concat(empresaClass, " ").concat(styles$1.pagination) }, pageNumbers.map(function (number) { return (React.createElement("button", { key: number, onClick: function () { return setCurrentPage(number); }, className: "".concat(styles$1.pageButton, " ").concat(currentPage === number ? styles$1.activePage : '') }, number)); }))));
16414
+ paginacao === true && (React.createElement("div", { className: "".concat(empresaClass, " ").concat(styles$1.pagination) }, pageNumbers.map(function (number) { return (React.createElement("button", { key: number, onClick: function () { return setCurrentPage(number); }, className: "".concat(styles$1.pageButton, " ").concat(currentPage === number ? styles$1.activePage : '') }, number)); })))));
16415
16415
  };
16416
16416
 
16417
16417
  var TextAreaField = function (_a) {
package/dist/esm/index.js CHANGED
@@ -16347,9 +16347,9 @@ var styles$1 = {"tableContainer":"tableStandard-module_tableContainer__W2g84","t
16347
16347
  styleInject(css_248z$1);
16348
16348
 
16349
16349
  var TableStandard = function (_a) {
16350
- var dados = _a.dados, onRowClick = _a.onRowClick, _b = _a.idColumn, idColumn = _b === void 0 ? 'id' : _b, onActionClick = _a.onActionClick, onDownloadClick = _a.onDownloadClick, onViewClick = _a.onViewClick, _c = _a.showActionColumn, showActionColumn = _c === void 0 ? false : _c, _d = _a.showDownloadButton, showDownloadButton = _d === void 0 ? false : _d, _e = _a.showExcelDownloadButton, showExcelDownloadButton = _e === void 0 ? false : _e, _f = _a.showViewButton, showViewButton = _f === void 0 ? false : _f, _g = _a.cor, cor = _g === void 0 ? false : _g, _h = _a.numeroPaginas, numeroPaginas = _h === void 0 ? 10 : _h, empresa = _a.empresa;
16351
- var _j = useState(null), selectedRow = _j[0], setSelectedRow = _j[1];
16352
- var _k = useState(1), currentPage = _k[0], setCurrentPage = _k[1];
16350
+ var dados = _a.dados, onRowClick = _a.onRowClick, _b = _a.idColumn, idColumn = _b === void 0 ? 'id' : _b, onActionClick = _a.onActionClick, onDownloadClick = _a.onDownloadClick, onViewClick = _a.onViewClick, _c = _a.showActionColumn, showActionColumn = _c === void 0 ? false : _c, _d = _a.showDownloadButton, showDownloadButton = _d === void 0 ? false : _d, _e = _a.showExcelDownloadButton, showExcelDownloadButton = _e === void 0 ? false : _e, _f = _a.showViewButton, showViewButton = _f === void 0 ? false : _f, _g = _a.cor, cor = _g === void 0 ? false : _g, _h = _a.numeroPaginas, numeroPaginas = _h === void 0 ? 10 : _h, empresa = _a.empresa, _j = _a.paginacao, paginacao = _j === void 0 ? true : _j;
16351
+ var _k = useState(null), selectedRow = _k[0], setSelectedRow = _k[1];
16352
+ var _l = useState(1), currentPage = _l[0], setCurrentPage = _l[1];
16353
16353
  var ultimoItem = currentPage * numeroPaginas;
16354
16354
  var primeiroItem = ultimoItem - numeroPaginas;
16355
16355
  var currentItems = dados.slice(primeiroItem, ultimoItem);
@@ -16409,7 +16409,7 @@ var TableStandard = function (_a) {
16409
16409
  onViewClick(row[idColumn]);
16410
16410
  }, className: styles$1.actionButton, title: 'Visualizar' },
16411
16411
  React.createElement(FaEye, null)))))))); }))),
16412
- React.createElement("div", { className: "".concat(empresaClass, " ").concat(styles$1.pagination) }, pageNumbers.map(function (number) { return (React.createElement("button", { key: number, onClick: function () { return setCurrentPage(number); }, className: "".concat(styles$1.pageButton, " ").concat(currentPage === number ? styles$1.activePage : '') }, number)); }))));
16412
+ paginacao === true && (React.createElement("div", { className: "".concat(empresaClass, " ").concat(styles$1.pagination) }, pageNumbers.map(function (number) { return (React.createElement("button", { key: number, onClick: function () { return setCurrentPage(number); }, className: "".concat(styles$1.pageButton, " ").concat(currentPage === number ? styles$1.activePage : '') }, number)); })))));
16413
16413
  };
16414
16414
 
16415
16415
  var TextAreaField = function (_a) {
@@ -16,6 +16,7 @@ export interface TableStandardProps {
16
16
  cor?: boolean;
17
17
  numeroPaginas?: number;
18
18
  empresa: '1' | '2' | '3' | '4' | '5' | '6';
19
+ paginacao?: boolean;
19
20
  }
20
21
  declare const TableStandard: React.FC<TableStandardProps>;
21
22
  export default TableStandard;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "componenteshospitais",
3
- "version": "3.3.4",
3
+ "version": "3.3.5",
4
4
  "main": "dist/cjs/index.js",
5
5
  "module": "dist/esm/index.js",
6
6
  "types": "dist/types/index.d.ts",
@@ -21,6 +21,7 @@ export interface TableStandardProps {
21
21
  cor?: boolean;
22
22
  numeroPaginas?: number;
23
23
  empresa: '1' | '2' | '3' | '4' | '5' | '6';
24
+ paginacao?: boolean;
24
25
  }
25
26
 
26
27
  const TableStandard: React.FC<TableStandardProps> = ({
@@ -36,7 +37,8 @@ const TableStandard: React.FC<TableStandardProps> = ({
36
37
  showViewButton = false,
37
38
  cor = false,
38
39
  numeroPaginas = 10,
39
- empresa
40
+ empresa,
41
+ paginacao = true
40
42
  }) => {
41
43
  const [selectedRow, setSelectedRow] = useState<string | null>(null);
42
44
  const [currentPage, setCurrentPage] = useState(1);
@@ -158,17 +160,19 @@ const TableStandard: React.FC<TableStandardProps> = ({
158
160
  </tbody>
159
161
  </table>
160
162
  {/******************* Paginação ********************************/}
161
- <div className={`${empresaClass} ${styles.pagination}`}>
162
- {pageNumbers.map(number => (
163
- <button
164
- key={number}
165
- onClick={() => setCurrentPage(number)}
166
- className={`${styles.pageButton} ${currentPage === number ? styles.activePage : ''}`}
167
- >
168
- {number}
169
- </button>
170
- ))}
171
- </div>
163
+ {paginacao === true && (
164
+ <div className={`${empresaClass} ${styles.pagination}`}>
165
+ {pageNumbers.map(number => (
166
+ <button
167
+ key={number}
168
+ onClick={() => setCurrentPage(number)}
169
+ className={`${styles.pageButton} ${currentPage === number ? styles.activePage : ''}`}
170
+ >
171
+ {number}
172
+ </button>
173
+ ))}
174
+ </div>
175
+ )}
172
176
  </div>
173
177
  );
174
178
  };