caplink-saas-ui-shared-component-library 0.4.6 → 0.4.7
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.es.js +25 -7
- package/dist/index.es.js.map +1 -1
- package/dist/index.umd.js +1 -1
- package/dist/index.umd.js.map +1 -1
- package/package.json +1 -1
package/dist/index.es.js
CHANGED
|
@@ -8394,9 +8394,19 @@ function Ty(e) {
|
|
|
8394
8394
|
);
|
|
8395
8395
|
}
|
|
8396
8396
|
function Py(e) {
|
|
8397
|
-
const { mode: t, value: n, onBlur: r, onChange: o, onPaste: s, column: i, coordinates: a } = e, c =
|
|
8398
|
-
(
|
|
8399
|
-
|
|
8397
|
+
const { mode: t, value: n, onBlur: r, onChange: o, onPaste: s, column: i, coordinates: a } = e, c = me(() => {
|
|
8398
|
+
if (typeof n == "string" && n.includes("/")) {
|
|
8399
|
+
const [u, d, f] = n.split("/");
|
|
8400
|
+
return `${f}-${d}-${u}`;
|
|
8401
|
+
}
|
|
8402
|
+
if (typeof n == "string" && n.includes("-") && n.includes("T")) {
|
|
8403
|
+
const [u] = n.split("T");
|
|
8404
|
+
return u;
|
|
8405
|
+
}
|
|
8406
|
+
return n;
|
|
8407
|
+
}, [n]), l = Q(
|
|
8408
|
+
(u) => {
|
|
8409
|
+
u.preventDefault(), s?.(u);
|
|
8400
8410
|
},
|
|
8401
8411
|
[s]
|
|
8402
8412
|
);
|
|
@@ -8406,9 +8416,9 @@ function Py(e) {
|
|
|
8406
8416
|
type: "date",
|
|
8407
8417
|
placeholder: "aa/bb/cccc",
|
|
8408
8418
|
onBlur: r,
|
|
8409
|
-
onPaste:
|
|
8410
|
-
value:
|
|
8411
|
-
onChange: (
|
|
8419
|
+
onPaste: l,
|
|
8420
|
+
value: c,
|
|
8421
|
+
onChange: (u) => o?.({ data: u.target.value }),
|
|
8412
8422
|
className: fe("sl-h-full sl-w-full sl-bg-transparent sl-pl-1 sl-text-sm sl-outline-none"),
|
|
8413
8423
|
"data-cypress": `table-cell-date-${i.id}-${a.row}`,
|
|
8414
8424
|
"aria-readonly": t === "readonly"
|
|
@@ -8416,7 +8426,15 @@ function Py(e) {
|
|
|
8416
8426
|
);
|
|
8417
8427
|
}
|
|
8418
8428
|
function Oy(e) {
|
|
8419
|
-
const { value: t, column: n, coordinates: r, mode: o } = e, s =
|
|
8429
|
+
const { value: t, column: n, coordinates: r, mode: o } = e, s = me(() => {
|
|
8430
|
+
if (!t)
|
|
8431
|
+
return "dd/mm/aaaa";
|
|
8432
|
+
const i = (a) => {
|
|
8433
|
+
const c = new Date(a.getTime() + a.getTimezoneOffset() * 6e4);
|
|
8434
|
+
return Intl.DateTimeFormat("pt-BR", { dateStyle: "short" }).format(c);
|
|
8435
|
+
};
|
|
8436
|
+
return t instanceof Date ? i(t) : typeof t == "string" && t.includes("-") ? i(new Date(t)) : String(t);
|
|
8437
|
+
}, [t]);
|
|
8420
8438
|
return /* @__PURE__ */ g.jsx(
|
|
8421
8439
|
"div",
|
|
8422
8440
|
{
|