@iclips/ui 1.0.61 → 1.0.63
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/index.js
CHANGED
|
@@ -2209,22 +2209,35 @@ function fp({
|
|
|
2209
2209
|
logo: n,
|
|
2210
2210
|
showServices: r = !0
|
|
2211
2211
|
}) {
|
|
2212
|
-
const i = (
|
|
2212
|
+
const i = (s) => new Intl.NumberFormat("pt-BR", {
|
|
2213
2213
|
style: "currency",
|
|
2214
2214
|
currency: "BRL"
|
|
2215
|
-
}).format(
|
|
2216
|
-
if (!
|
|
2217
|
-
if (/^\d{2}\/\d{2}\/\d{4}$/.test(
|
|
2218
|
-
return
|
|
2215
|
+
}).format(s), a = (s) => {
|
|
2216
|
+
if (!s || s.trim() === "") return "";
|
|
2217
|
+
if (/^\d{2}\/\d{2}\/\d{4}$/.test(s))
|
|
2218
|
+
return s;
|
|
2219
2219
|
try {
|
|
2220
|
-
const
|
|
2221
|
-
return isNaN(
|
|
2220
|
+
const f = new Date(s);
|
|
2221
|
+
return isNaN(f.getTime()) ? s : f.toLocaleDateString("pt-BR", {
|
|
2222
2222
|
year: "numeric",
|
|
2223
2223
|
month: "long",
|
|
2224
2224
|
day: "numeric"
|
|
2225
2225
|
});
|
|
2226
2226
|
} catch {
|
|
2227
|
-
return
|
|
2227
|
+
return s;
|
|
2228
|
+
}
|
|
2229
|
+
}, o = (s) => {
|
|
2230
|
+
if (!s || s.trim() === "") return "";
|
|
2231
|
+
if (/^\d{2}\/\d{2}\/\d{4}$/.test(s))
|
|
2232
|
+
return s;
|
|
2233
|
+
try {
|
|
2234
|
+
const f = new Date(s);
|
|
2235
|
+
if (isNaN(f.getTime()))
|
|
2236
|
+
return s;
|
|
2237
|
+
const c = String(f.getDate()).padStart(2, "0"), d = String(f.getMonth() + 1).padStart(2, "0"), u = f.getFullYear();
|
|
2238
|
+
return `${c}/${d}/${u}`;
|
|
2239
|
+
} catch {
|
|
2240
|
+
return s;
|
|
2228
2241
|
}
|
|
2229
2242
|
};
|
|
2230
2243
|
return /* @__PURE__ */ b(
|
|
@@ -2356,7 +2369,7 @@ function fp({
|
|
|
2356
2369
|
key: "horasEstimadas",
|
|
2357
2370
|
align: "center",
|
|
2358
2371
|
width: "15%",
|
|
2359
|
-
render: (
|
|
2372
|
+
render: (s) => s ? `${s}h` : "-"
|
|
2360
2373
|
}
|
|
2361
2374
|
],
|
|
2362
2375
|
data: t.servicos,
|
|
@@ -2418,14 +2431,14 @@ function fp({
|
|
|
2418
2431
|
key: "dataVencimento",
|
|
2419
2432
|
width: "30%",
|
|
2420
2433
|
align: "left",
|
|
2421
|
-
render: (
|
|
2434
|
+
render: (s) => o(s)
|
|
2422
2435
|
},
|
|
2423
2436
|
{
|
|
2424
2437
|
header: "Valor (R$)",
|
|
2425
2438
|
key: "valor",
|
|
2426
2439
|
width: "60%",
|
|
2427
2440
|
align: "right",
|
|
2428
|
-
render: (
|
|
2441
|
+
render: (s) => i(s)
|
|
2429
2442
|
}
|
|
2430
2443
|
],
|
|
2431
2444
|
data: t.parcelas,
|
|
@@ -2434,21 +2447,21 @@ function fp({
|
|
|
2434
2447
|
showFooter: !0,
|
|
2435
2448
|
footerContent: /* @__PURE__ */ b("tr", { className: "bg-gray-100 font-semibold", children: [
|
|
2436
2449
|
/* @__PURE__ */ l("td", { colSpan: 2, className: "px-2 py-2 text-left text-xs border-t-2 border-gray-300", children: "Total" }),
|
|
2437
|
-
/* @__PURE__ */ l("td", { className: "px-2 py-2 text-right text-xs border-t-2 border-gray-300", children: i(t.parcelas.reduce((
|
|
2450
|
+
/* @__PURE__ */ l("td", { className: "px-2 py-2 text-right text-xs border-t-2 border-gray-300", children: i(t.parcelas.reduce((s, f) => s + f.valor, 0)) })
|
|
2438
2451
|
] })
|
|
2439
2452
|
}
|
|
2440
2453
|
)
|
|
2441
2454
|
] })
|
|
2442
2455
|
] }),
|
|
2443
|
-
t.clausulas && t.clausulas.length > 0 && /* @__PURE__ */ l(Et, { title: "Cláusulas Contratuais", pageBreak: !0, children: /* @__PURE__ */ l("div", { className: "space-y-6", children: t.clausulas.map((
|
|
2456
|
+
t.clausulas && t.clausulas.length > 0 && /* @__PURE__ */ l(Et, { title: "Cláusulas Contratuais", pageBreak: !0, children: /* @__PURE__ */ l("div", { className: "space-y-6", children: t.clausulas.map((s, f) => /* @__PURE__ */ b("div", { className: "clause avoid-break", children: [
|
|
2444
2457
|
/* @__PURE__ */ b("h4", { className: "font-semibold text-sm mb-2", children: [
|
|
2445
2458
|
"Cláusula ",
|
|
2446
|
-
|
|
2459
|
+
f + 1,
|
|
2447
2460
|
"ª - ",
|
|
2448
|
-
|
|
2461
|
+
s.titulo
|
|
2449
2462
|
] }),
|
|
2450
|
-
/* @__PURE__ */ l("p", { className: "text-sm text-gray-700 leading-relaxed pl-4", children:
|
|
2451
|
-
] },
|
|
2463
|
+
/* @__PURE__ */ l("p", { className: "text-sm text-gray-700 leading-relaxed pl-4", children: s.conteudo })
|
|
2464
|
+
] }, f)) }) }),
|
|
2452
2465
|
t.observacoes && /* @__PURE__ */ l(Et, { title: "Observações", children: /* @__PURE__ */ l("p", { className: "text-sm text-gray-700 leading-relaxed", children: t.observacoes }) }),
|
|
2453
2466
|
/* @__PURE__ */ l(
|
|
2454
2467
|
sp,
|