jclib-ui 1.0.128 → 1.0.129
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/jclib-ui.es.js +18 -3
- package/dist/jclib-ui.es.js.map +1 -1
- package/dist/jclib-ui.umd.js +10 -2
- package/dist/jclib-ui.umd.js.map +1 -1
- package/package.json +1 -1
package/dist/jclib-ui.es.js
CHANGED
|
@@ -4234,6 +4234,12 @@ const TableContainer = styled.table`
|
|
|
4234
4234
|
width: 100%;
|
|
4235
4235
|
margin-bottom: 8px;
|
|
4236
4236
|
|
|
4237
|
+
tr {
|
|
4238
|
+
--table-line-height: 36px;
|
|
4239
|
+
/* min-height: var(--table-line-height); */
|
|
4240
|
+
height: var(--table-line-height);
|
|
4241
|
+
}
|
|
4242
|
+
|
|
4237
4243
|
th,
|
|
4238
4244
|
td {
|
|
4239
4245
|
font-size: var(--font-size);
|
|
@@ -4306,9 +4312,11 @@ const TableContainer = styled.table`
|
|
|
4306
4312
|
}
|
|
4307
4313
|
|
|
4308
4314
|
@media (max-width: ${({ sizeBreak }) => sizeBreak || "767"}px) {
|
|
4315
|
+
tr,
|
|
4309
4316
|
th,
|
|
4310
4317
|
td {
|
|
4311
4318
|
font-size: 1rem;
|
|
4319
|
+
height: auto;
|
|
4312
4320
|
}
|
|
4313
4321
|
|
|
4314
4322
|
thead {
|
|
@@ -4519,6 +4527,7 @@ function Table({
|
|
|
4519
4527
|
sizeBreak = 767,
|
|
4520
4528
|
msgSemDados = "Nenhum registro encontrado!"
|
|
4521
4529
|
}) {
|
|
4530
|
+
var _a;
|
|
4522
4531
|
if (colunas) {
|
|
4523
4532
|
colunas.forEach((e) => {
|
|
4524
4533
|
if (e.tipo && (e.tipo == "money" || e.tipo == "currency")) {
|
|
@@ -4526,10 +4535,16 @@ function Table({
|
|
|
4526
4535
|
}
|
|
4527
4536
|
});
|
|
4528
4537
|
}
|
|
4538
|
+
let incColActions = false;
|
|
4539
|
+
if (acoes && acoes.acoes) {
|
|
4540
|
+
const newAcoes = (_a = acoes == null ? void 0 : acoes.acoes) == null ? void 0 : _a.filter((e) => e.ativa ?? true);
|
|
4541
|
+
acoes.acoes = newAcoes;
|
|
4542
|
+
incColActions = acoes.acoes.length > 0;
|
|
4543
|
+
}
|
|
4529
4544
|
if (!dados || dados.length == 0)
|
|
4530
4545
|
return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "alert alert-warning", children: msgSemDados });
|
|
4531
4546
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(Container$7, { children: /* @__PURE__ */ jsxRuntimeExports.jsxs(TableContainer, { alignTop, sizeBreak, hasBorder: border, children: [
|
|
4532
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(TableHead, { colunas, incColActions
|
|
4547
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(TableHead, { colunas, incColActions }),
|
|
4533
4548
|
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
4534
4549
|
TableBody,
|
|
4535
4550
|
{
|
|
@@ -4602,8 +4617,8 @@ function TableBody({ colunas, acoes, opcoes, dados, colorir }) {
|
|
|
4602
4617
|
colId
|
|
4603
4618
|
);
|
|
4604
4619
|
}),
|
|
4605
|
-
acoes && /* @__PURE__ */ jsxRuntimeExports.jsx("td", { className: "acoes", style: { width }, children: /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "acoes-layout", children: [
|
|
4606
|
-
|
|
4620
|
+
acoes && ((_a2 = acoes.acoes) == null ? void 0 : _a2.length) > 0 && /* @__PURE__ */ jsxRuntimeExports.jsx("td", { className: "acoes", style: { width }, children: /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "acoes-layout", children: [
|
|
4621
|
+
acoes == null ? void 0 : acoes.acoes.map((acao, key) => /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
4607
4622
|
"span",
|
|
4608
4623
|
{
|
|
4609
4624
|
onClick: () => {
|