arxatec-ui 0.1.49 → 0.1.50

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/file-view.js CHANGED
@@ -1,4 +1,4 @@
1
- import { A as e, D as t, G as n, H as r, I as i, J as a, K as o, N as s, P as c, U as l, V as u, W as d, X as f, Y as p, Z as m, a as h, d as g, et as _, g as v, h as y, i as b, j as x, k as S, m as C, n as w, o as T, p as E, r as D, t as O, u as ee } from "./annotation_editor_extensions-fmMq-ZzK.js";
1
+ import { A as e, D as t, G as n, H as r, I as i, J as a, K as o, N as s, P as c, U as l, V as u, W as d, X as f, Y as p, Z as m, a as h, d as g, et as _, g as v, h as y, i as b, j as x, k as S, m as C, n as w, o as T, p as E, r as D, t as O, u as ee } from "./annotation_editor_extensions-CMHXjyKJ.js";
2
2
  import { _ as k, d as A, f as j, g as M, i as te, l as N, m as ne, o as P, p as F, r as re, s as ie, t as ae, u as I, y as L } from "./sheet-D2e7u09C.js";
3
3
  import { createContext as oe, forwardRef as se, useCallback as R, useContext as ce, useEffect as z, useImperativeHandle as le, useLayoutEffect as ue, useMemo as B, useRef as V, useState as H } from "react";
4
4
  import { Fragment as de, jsx as U, jsxs as W } from "react/jsx-runtime";
@@ -22,7 +22,7 @@ import * as _t from "xlsx";
22
22
  //#region src/components/file_view/shared/loading_state/index.tsx
23
23
  var vt = () => /* @__PURE__ */ U(ke, { className: "size-8 animate-spin text-primary" }), yt = () => /* @__PURE__ */ U("div", {
24
24
  className: "p-6 h-full",
25
- children: /* @__PURE__ */ U(y, {
25
+ children: /* @__PURE__ */ U(v, {
26
26
  title: "Sucedio un error inesperado",
27
27
  icon: Se,
28
28
  description: "Sucedio un error, vuelve a intentarlo dentro de un momento, si el error persiste, contacta con soporte.",
@@ -42,7 +42,7 @@ async function bt(e, t) {
42
42
  //#region src/components/file_view/pdf_viewer/components/error_state/index.tsx
43
43
  var xt = () => /* @__PURE__ */ U("div", {
44
44
  className: "p-6 h-full",
45
- children: /* @__PURE__ */ U(y, {
45
+ children: /* @__PURE__ */ U(v, {
46
46
  title: "Sucedio un error inesperado",
47
47
  icon: Se,
48
48
  description: "Sucedio un error, vuelve a intentarlo dentro de un momento, si el error persiste, contacta con soporte.",
@@ -264,7 +264,7 @@ var Tt = ({ url: e, fileName: t, onDownload: n }) => {
264
264
  })
265
265
  ]
266
266
  })]
267
- }), Ot = () => /* @__PURE__ */ U(y, {
267
+ }), Ot = () => /* @__PURE__ */ U(v, {
268
268
  title: "Sucedio un error al cargar la imgen",
269
269
  description: "Vuelve a intentarlo dentro de unos minutos si el error persiste, contacta con soporte",
270
270
  icon: Ee
@@ -661,7 +661,7 @@ var Tt = ({ url: e, fileName: t, onDownload: n }) => {
661
661
  })]
662
662
  }), Jt = ({ played: e, onSeekChange: t }) => /* @__PURE__ */ U("div", {
663
663
  className: "w-full",
664
- children: /* @__PURE__ */ U(v, {
664
+ children: /* @__PURE__ */ U(y, {
665
665
  value: [e * 100],
666
666
  onValueChange: t,
667
667
  min: 0,
@@ -704,7 +704,7 @@ var Tt = ({ url: e, fileName: t, onDownload: n }) => {
704
704
  })
705
705
  }), /* @__PURE__ */ U(I, { children: t ? "Activar sonido" : "Silenciar" })] }), /* @__PURE__ */ U("div", {
706
706
  className: "w-24 hidden sm:block",
707
- children: /* @__PURE__ */ U(v, {
707
+ children: /* @__PURE__ */ U(y, {
708
708
  value: [t ? 0 : e * 100],
709
709
  onValueChange: r,
710
710
  min: 0,
@@ -781,7 +781,7 @@ var Tt = ({ url: e, fileName: t, onDownload: n }) => {
781
781
  children: /* @__PURE__ */ U(F, { className: "w-full h-full" })
782
782
  }), nn = () => /* @__PURE__ */ U("div", {
783
783
  className: "p-4 h-full w-full",
784
- children: /* @__PURE__ */ U(y, {
784
+ children: /* @__PURE__ */ U(v, {
785
785
  title: "Sucedio un error inesperado",
786
786
  icon: Ce,
787
787
  description: "Sucedio un error al cargar el video, vuelve a intentarlo dentro de un momento, si el error persiste, contacta con soporte.",
@@ -874,7 +874,7 @@ var Tt = ({ url: e, fileName: t, onDownload: n }) => {
874
874
  }
875
875
  }, _ = () => {
876
876
  r.current && l(r.current.duration || 0);
877
- }, y = () => {
877
+ }, v = () => {
878
878
  r.current && s(r.current.currentTime || 0);
879
879
  }, b = () => {
880
880
  r.current && (i ? (r.current.pause(), a(!1)) : r.current.play().then(() => a(!0)).catch((e) => {
@@ -968,7 +968,7 @@ var Tt = ({ url: e, fileName: t, onDownload: n }) => {
968
968
  onClick: C,
969
969
  "aria-label": f ? "Activar sonido" : "Silenciar",
970
970
  children: U(f || u === 0 ? Ge : We, { className: "size-4" })
971
- }), /* @__PURE__ */ U(v, {
971
+ }), /* @__PURE__ */ U(y, {
972
972
  value: [f ? 0 : u * 100],
973
973
  max: 100,
974
974
  step: 1,
@@ -985,7 +985,7 @@ var Tt = ({ url: e, fileName: t, onDownload: n }) => {
985
985
  className: "text-xs text-muted-foreground w-10 text-right",
986
986
  children: on(o)
987
987
  }),
988
- /* @__PURE__ */ U(v, {
988
+ /* @__PURE__ */ U(y, {
989
989
  value: [D],
990
990
  max: 100,
991
991
  step: .5,
@@ -1004,7 +1004,7 @@ var Tt = ({ url: e, fileName: t, onDownload: n }) => {
1004
1004
  ref: r,
1005
1005
  src: e,
1006
1006
  onLoadedMetadata: _,
1007
- onTimeUpdate: y,
1007
+ onTimeUpdate: v,
1008
1008
  onEnded: T,
1009
1009
  onError: E
1010
1010
  })
@@ -1095,7 +1095,7 @@ var fn = ({ content: e, mimeType: t, fileName: n, isPending: r = !1, isError: i
1095
1095
  children: /* @__PURE__ */ U(F, { className: "w-full h-96 rounded-md" })
1096
1096
  }) : i || e == null ? /* @__PURE__ */ U("div", {
1097
1097
  className: "p-6 h-full",
1098
- children: /* @__PURE__ */ U(y, {
1098
+ children: /* @__PURE__ */ U(v, {
1099
1099
  title: "No se pudo cargar el código",
1100
1100
  description: "Comprueba que el archivo sea accesible. Si usas URLs externas (p. ej. S3), puede ser necesario un endpoint en el backend que devuelva el contenido como texto.",
1101
1101
  icon: ve,
@@ -1131,7 +1131,7 @@ var fn = ({ content: e, mimeType: t, fileName: n, isPending: r = !1, isError: i
1131
1131
  })]
1132
1132
  }) : t ? /* @__PURE__ */ W("div", {
1133
1133
  className: "p-6 flex flex-col items-center gap-4",
1134
- children: [/* @__PURE__ */ U(y, {
1134
+ children: [/* @__PURE__ */ U(v, {
1135
1135
  title: "No se pudo importar el documento",
1136
1136
  description: n ? "Este tipo de archivo aún no está soportado para edición (p. ej. .doc clásico)." : "Vuelve a intentarlo. Si el error persiste, contacta con soporte.",
1137
1137
  icon: Ce
@@ -1142,7 +1142,7 @@ var fn = ({ content: e, mimeType: t, fileName: n, isPending: r = !1, isError: i
1142
1142
  }) : null]
1143
1143
  }) : r ? /* @__PURE__ */ U("div", {
1144
1144
  className: "p-6",
1145
- children: /* @__PURE__ */ U(y, {
1145
+ children: /* @__PURE__ */ U(v, {
1146
1146
  title: "Contenido vacío",
1147
1147
  description: "No se obtuvo contenido editable a partir del archivo.",
1148
1148
  icon: Ce
@@ -1201,7 +1201,7 @@ var gn = ({ title: e, isPending: t = !1, isError: n = !1, tabs: r = [], defaultT
1201
1201
  }),
1202
1202
  n && /* @__PURE__ */ U("div", {
1203
1203
  className: "p-4",
1204
- children: /* @__PURE__ */ U(y, {
1204
+ children: /* @__PURE__ */ U(v, {
1205
1205
  title: "Sucedio un error inesperado",
1206
1206
  description: "Vuelve a intentarlo dentro de unos minutos, si el error persiste, contacta con soporte.",
1207
1207
  icon: Ce
@@ -3480,7 +3480,7 @@ var Si = ({ annotations: e, selectedId: t, onFocusAnnotation: n, onUpdateAnnotat
3480
3480
  l,
3481
3481
  r,
3482
3482
  n
3483
- ]), _ = o.length, v = _ === 0;
3483
+ ]), _ = o.length, y = _ === 0;
3484
3484
  return /* @__PURE__ */ W("aside", {
3485
3485
  className: "flex h-full min-h-0 w-full max-w-[min(100%,340px)] shrink-0 flex-col border-l border-border bg-card",
3486
3486
  children: [/* @__PURE__ */ W("div", {
@@ -3507,14 +3507,14 @@ var Si = ({ annotations: e, selectedId: t, onFocusAnnotation: n, onUpdateAnnotat
3507
3507
  size: "icon",
3508
3508
  className: "size-7 text-muted-foreground hover:bg-destructive/10 hover:text-destructive disabled:opacity-40",
3509
3509
  "aria-label": "Eliminar todos los bloques",
3510
- disabled: v,
3510
+ disabled: y,
3511
3511
  onClick: a,
3512
3512
  children: /* @__PURE__ */ U(He, { className: "size-4" })
3513
3513
  })
3514
3514
  }), /* @__PURE__ */ U(I, { children: "Eliminar todos los bloques" })] })]
3515
- }), v ? /* @__PURE__ */ U("div", {
3515
+ }), y ? /* @__PURE__ */ U("div", {
3516
3516
  className: "flex min-h-0 flex-1 items-center justify-center p-3",
3517
- children: /* @__PURE__ */ U(y, {
3517
+ children: /* @__PURE__ */ U(v, {
3518
3518
  color: "white",
3519
3519
  size: "sm",
3520
3520
  title: "Sin bloques aún",
@@ -3650,7 +3650,7 @@ var ki = se(function(e, t) {
3650
3650
  ...e
3651
3651
  }) });
3652
3652
  }), Ai = se(function({ fileId: e, mimeType: t, fileName: n, api: r }, i) {
3653
- let { prepareSchemaForPersist: s } = Hr(), { supportsTemplateAnnotations: c, isPdf: u, isDocx: d } = zr(t, n), [p, h] = H(Ci), [g, v] = H(null), [b, x] = H(null), [S, C] = H({}), [w, T] = H(!1), [E, D] = H(1), [O, ee] = H(!1), [A, j] = H(1), [M, te] = H(0), [N, P] = H(!1), [F, re] = H(""), [ie, ae] = H(null), [I, L] = H(!1), oe = V(null), se = V(0), ce = V(null), ue = V(null), B = V(null), [G, fe] = H(null), pe = V(1), me = V({
3653
+ let { prepareSchemaForPersist: s } = Hr(), { supportsTemplateAnnotations: c, isPdf: u, isDocx: d } = zr(t, n), [p, h] = H(Ci), [g, y] = H(null), [b, x] = H(null), [S, C] = H({}), [w, T] = H(!1), [E, D] = H(1), [O, ee] = H(!1), [A, j] = H(1), [M, te] = H(0), [N, P] = H(!1), [F, re] = H(""), [ie, ae] = H(null), [I, L] = H(!1), oe = V(null), se = V(0), ce = V(null), ue = V(null), B = V(null), [G, fe] = H(null), pe = V(1), me = V({
3654
3654
  line: 1,
3655
3655
  rect: 1,
3656
3656
  ellipse: 1
@@ -3804,7 +3804,7 @@ var ki = se(function(e, t) {
3804
3804
  font_family: An.font_family,
3805
3805
  font_size: An.font_size
3806
3806
  });
3807
- h((e) => ({ annotations: [...e.annotations, l] })), v(e), x(null), Ae();
3807
+ h((e) => ({ annotations: [...e.annotations, l] })), y(e), x(null), Ae();
3808
3808
  }, [
3809
3809
  A,
3810
3810
  E,
@@ -3827,7 +3827,7 @@ var ki = se(function(e, t) {
3827
3827
  assetId: n.assetId,
3828
3828
  label: t.name?.trim() || void 0
3829
3829
  });
3830
- h((e) => ({ annotations: [...e.annotations, a] })), v(i), x(null), n.url && C((e) => ({
3830
+ h((e) => ({ annotations: [...e.annotations, a] })), y(i), x(null), n.url && C((e) => ({
3831
3831
  ...e,
3832
3832
  [n.assetId]: n.url
3833
3833
  })), Ae();
@@ -3853,12 +3853,12 @@ var ki = se(function(e, t) {
3853
3853
  await Ie(t);
3854
3854
  }
3855
3855
  }, [Ie]), ze = R((e) => {
3856
- h((t) => ({ annotations: t.annotations.filter((t) => t.id !== e) })), v((t) => t === e ? null : t), Ae();
3856
+ h((t) => ({ annotations: t.annotations.filter((t) => t.id !== e) })), y((t) => t === e ? null : t), Ae();
3857
3857
  }, [Ae]), Be = R(() => {
3858
- h(Ci()), v(null), Ae();
3858
+ h(Ci()), y(null), Ae();
3859
3859
  }, [Ae]), Ve = R((e) => {
3860
3860
  let t = _e.current.annotations.find((t) => t.id === e);
3861
- t && (v(e), j(t.page));
3861
+ t && (y(e), j(t.page));
3862
3862
  }, []);
3863
3863
  z(() => {
3864
3864
  let e = Array.from(new Set(p.annotations.filter(Cn).map((e) => e.assetId).filter((e) => !!e && !S[e])));
@@ -3941,7 +3941,7 @@ var ki = se(function(e, t) {
3941
3941
  }, [O]), ot = u && ve && !K || d && Se && xe === void 0 || Te && we === void 0 || u && !!K && !ie || d && !!xe && !ie, st = u && (ye || !ve && K == null) || d && (Ce || !Se && xe === void 0);
3942
3942
  if (!c) return /* @__PURE__ */ U("div", {
3943
3943
  className: "flex h-full items-center justify-center p-6",
3944
- children: /* @__PURE__ */ U(y, {
3944
+ children: /* @__PURE__ */ U(v, {
3945
3945
  color: "white",
3946
3946
  title: "Formato no disponible para plantilla",
3947
3947
  description: "Las anotaciones de plantilla están disponibles para PDF y Word (.docx).",
@@ -3995,7 +3995,7 @@ var ki = se(function(e, t) {
3995
3995
  children: "Cargando…"
3996
3996
  }), st ? /* @__PURE__ */ U("div", {
3997
3997
  className: "flex h-full items-center justify-center p-6",
3998
- children: /* @__PURE__ */ U(y, {
3998
+ children: /* @__PURE__ */ U(v, {
3999
3999
  color: "white",
4000
4000
  title: d ? "No se pudo cargar la vista desde Word" : "No se pudo cargar el PDF",
4001
4001
  description: d ? "Vuelve a intentarlo. Si el documento es muy complejo, prueba desde la pestaña Documento." : "Vuelve a intentarlo o descarga el archivo desde la pestaña Documento.",
@@ -4015,8 +4015,8 @@ var ki = se(function(e, t) {
4015
4015
  selectedId: g,
4016
4016
  shapeDrawTool: b,
4017
4017
  createShapeLabel: De,
4018
- onSelect: v,
4019
- onClearSelection: () => v(null),
4018
+ onSelect: y,
4019
+ onClearSelection: () => y(null),
4020
4020
  onChangeTextAnnotation: Me,
4021
4021
  onChangeShapeAnnotation: je,
4022
4022
  onShapeDrawToolChange: x,
@@ -4166,7 +4166,7 @@ var zi = ({ mimeType: e, fileName: t, nativeDocumentMimeType: n, renderNativeDoc
4166
4166
  })]
4167
4167
  }) : i ? /* @__PURE__ */ U("div", {
4168
4168
  className: "p-4 h-full",
4169
- children: /* @__PURE__ */ U(y, {
4169
+ children: /* @__PURE__ */ U(v, {
4170
4170
  title: "Transcripción no disponible",
4171
4171
  description: "Este archivo aún no tiene una transcripción o sucedió un error al cargarla.",
4172
4172
  icon: Se,
@@ -4202,7 +4202,7 @@ var zi = ({ mimeType: e, fileName: t, nativeDocumentMimeType: n, renderNativeDoc
4202
4202
  children: /* @__PURE__ */ U(F, { className: "w-full h-96" })
4203
4203
  }) : a ? /* @__PURE__ */ U("div", {
4204
4204
  className: "p-4 h-full",
4205
- children: /* @__PURE__ */ U(y, {
4205
+ children: /* @__PURE__ */ U(v, {
4206
4206
  title: "Resumen no disponible",
4207
4207
  description: "Este tipo de archivo no admite generar un resumen automático.",
4208
4208
  icon: Se,
@@ -4220,7 +4220,7 @@ var zi = ({ mimeType: e, fileName: t, nativeDocumentMimeType: n, renderNativeDoc
4220
4220
  })]
4221
4221
  }) : i ? /* @__PURE__ */ W("div", {
4222
4222
  className: "p-4 h-full flex flex-col items-center justify-center gap-4",
4223
- children: [/* @__PURE__ */ U(y, {
4223
+ children: [/* @__PURE__ */ U(v, {
4224
4224
  title: "No se pudo generar el resumen",
4225
4225
  description: "Vuelve a intentarlo. Si el error persiste, verifica que el archivo tenga contenido legible.",
4226
4226
  icon: Se,
@@ -4261,7 +4261,7 @@ var zi = ({ mimeType: e, fileName: t, nativeDocumentMimeType: n, renderNativeDoc
4261
4261
  children: /* @__PURE__ */ U(F, { className: "w-full h-full rounded-md" })
4262
4262
  }) : n ? /* @__PURE__ */ U("div", {
4263
4263
  className: "p-6",
4264
- children: /* @__PURE__ */ U(y, {
4264
+ children: /* @__PURE__ */ U(v, {
4265
4265
  title: "Sucedio un error inesperado",
4266
4266
  description: "Vuelve a intentarlo dentro de unos minutos, si el error persiste, contacta con soporte.",
4267
4267
  icon: Ce
@@ -4474,7 +4474,7 @@ var $i = ({ file: e }) => {
4474
4474
  }),
4475
4475
  i && /* @__PURE__ */ U("div", {
4476
4476
  className: "absolute inset-0 z-10 flex min-h-0 bg-background p-4",
4477
- children: /* @__PURE__ */ U(y, {
4477
+ children: /* @__PURE__ */ U(v, {
4478
4478
  title: "Error al renderizar el documento",
4479
4479
  description: i,
4480
4480
  icon: Ce,
@@ -4595,7 +4595,7 @@ var ia = ({ file: e }) => {
4595
4595
  }, [e]), o) return /* @__PURE__ */ U(oa, {});
4596
4596
  if (c) return /* @__PURE__ */ U("div", {
4597
4597
  className: "p-4 h-full w-full",
4598
- children: /* @__PURE__ */ U(y, {
4598
+ children: /* @__PURE__ */ U(v, {
4599
4599
  title: "Error al renderizar el documento",
4600
4600
  description: c,
4601
4601
  icon: Ce,
@@ -4650,7 +4650,7 @@ var ia = ({ file: e }) => {
4650
4650
  }), /* @__PURE__ */ U(n, { orientation: "horizontal" })]
4651
4651
  }) : /* @__PURE__ */ U("div", {
4652
4652
  className: "flex-1 flex items-center justify-center p-4",
4653
- children: /* @__PURE__ */ U(y, {
4653
+ children: /* @__PURE__ */ U(v, {
4654
4654
  title: "Hoja vacía",
4655
4655
  description: "Esta hoja no contiene datos.",
4656
4656
  icon: Ve
@@ -4830,7 +4830,7 @@ var ba = [
4830
4830
  }),
4831
4831
  a && /* @__PURE__ */ U("div", {
4832
4832
  className: "p-4",
4833
- children: /* @__PURE__ */ U(y, {
4833
+ children: /* @__PURE__ */ U(v, {
4834
4834
  title: "Error al cargar el documento",
4835
4835
  description: "Vuelve a intentarlo en unos minutos. Si el error persiste, contacta con soporte.",
4836
4836
  icon: Ce