react-ecosistema-unp 2.6.0 → 2.7.0

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.
Files changed (80) hide show
  1. package/README.md +3 -1
  2. package/dist/{AppList-CNtk-CBh.js → AppList-BMiq1ohd.js} +65 -65
  3. package/dist/{Button-eLVX04GZ.js → Button-CFf-9Lsg.js} +1 -1
  4. package/dist/{Card-_JzS9Ssz.js → Card-pj1hogT6.js} +2 -2
  5. package/dist/{CardBody-CUEPjltD.js → CardBody-osBHz8Sj.js} +1 -1
  6. package/dist/FormCheck-C44kvYaC.js +109 -0
  7. package/dist/{FormControl-DshWdHuR.js → FormControl-CjlQ5vZ8.js} +6 -6
  8. package/dist/{FormGroup-B8RAswur.js → FormGroup-BKpeUcMi.js} +3 -3
  9. package/dist/{Spinner-D69BfVXa.js → Spinner-DlaZVI7E.js} +1 -1
  10. package/dist/{TabPane-D71zhQGl.js → TabPane-C7rqu9vB.js} +1 -1
  11. package/dist/{Table-cUZFLrPi.js → Table-CYSh6C16.js} +1 -1
  12. package/dist/ThemeProvider-D8TYBK1p.js +41 -0
  13. package/dist/assets/SmartTextArea.css +1 -1
  14. package/dist/cards/tarjeta/Tarjeta.js +3 -3
  15. package/dist/cards/tarjeta/nuevo-elemento/NuevoElemento.js +2 -2
  16. package/dist/cards/tarjeta/seccion-tarjeta/SeccionTarjeta.js +1 -1
  17. package/dist/cards/tarjeta-info/TarjetaInfo.js +3 -3
  18. package/dist/cards/tarjeta-lectura/TarjetaLectura.js +1 -1
  19. package/dist/data/tarjeta-datos/TarjetaDatos.js +2 -2
  20. package/dist/ia/diccionario/analisisRiesgo.js +245 -0
  21. package/dist/ia/diccionario/index.js +9 -0
  22. package/dist/ia/diccionario/tipos.js +4 -0
  23. package/dist/ia/larissa/larissaService.js +160 -0
  24. package/dist/ia/smart-textarea/DiffResult.js +7 -0
  25. package/dist/ia/smart-textarea/SmartTextArea.js +550 -0
  26. package/dist/ia/smart-textarea/diff.js +55 -0
  27. package/dist/ia.js +26 -0
  28. package/dist/{index-HaNVi1BU.js → index-DBLHT45t.js} +61 -61
  29. package/dist/lib/ia/diccionario/analisisRiesgo.d.ts +170 -0
  30. package/dist/lib/ia/diccionario/index.d.ts +10 -0
  31. package/dist/lib/ia/diccionario/tipos.d.ts +40 -0
  32. package/dist/lib/ia/larissa/larissaService.d.ts +153 -0
  33. package/dist/lib/ia/smart-textarea/DiffResult.d.ts +7 -0
  34. package/dist/lib/ia/smart-textarea/SmartTextArea.d.ts +82 -0
  35. package/dist/lib/ia/smart-textarea/diff.d.ts +15 -0
  36. package/dist/lib/ia.d.ts +8 -0
  37. package/dist/lib/ui.d.ts +0 -2
  38. package/dist/shared/app-list/AppList.js +2 -2
  39. package/dist/shared/breadcrumb/Breadcrumb.js +1 -1
  40. package/dist/shared/iconos-sistema/IconosSistema.js +1 -1
  41. package/dist/shared/iconos-sistema/logout-button/LogoutButton.js +1 -1
  42. package/dist/shared/menu-lateral/MenuLateral.js +3 -4
  43. package/dist/shared/notificacion-usuario/NotificacionUsuario.js +20 -21
  44. package/dist/shared/tab-ventana/TabVentana.js +1 -1
  45. package/dist/shared/ventana-tabs/VentanaTabs.js +3 -3
  46. package/dist/tables/custom-data-table/CustomDataTable.js +4 -5
  47. package/dist/tables/custom-data-table-split/CustomDataTableSplit.js +4 -5
  48. package/dist/tables/eco-data-table/components/EcoBandejaEncabezado.js +3 -4
  49. package/dist/tables/eco-data-table/components/EcoDataTable/EcoDataTable.js +14 -14
  50. package/dist/tables/eco-data-table/components/EcoDataTableLoading.js +1 -1
  51. package/dist/tables/eco-data-table/components/EcoDataTablePageStatus.js +1 -1
  52. package/dist/tables/tabla-registros/buscador/Buscador.js +4 -4
  53. package/dist/tables/tabla-registros/encabezado-tabla/EncabezadoTabla.js +3 -4
  54. package/dist/tables/tabla-registros/modal-v2/EcoModal.js +8 -8
  55. package/dist/tables/tabla-registros/tabla/Tabla.js +17 -17
  56. package/dist/ui/alertas/AlertaFormulario.js +1 -1
  57. package/dist/ui/contenido-modal/ContenidoModal.js +1 -1
  58. package/dist/ui/contenido-modal/ContenidoModalv0.1.js +1 -1
  59. package/dist/ui/contenido-modal-v2/ContenidoModalV2.js +3 -3
  60. package/dist/ui/contenido-modal-v2/ModalV2Menu.js +1 -1
  61. package/dist/ui/icono-tooltip/IconoTooltip.js +24 -24
  62. package/dist/ui/items-modal/ItemsModal.js +1 -1
  63. package/dist/ui/nav-formularios-lateral/NavFormulariosLateral.js +1 -1
  64. package/dist/ui/notificacion-popover-v2/NotificacionPopoverV2.js +55 -55
  65. package/dist/ui/paginador/Paginador.js +2 -2
  66. package/dist/ui/seccion-formulario/SeccionFormulario.js +1 -1
  67. package/dist/ui/status-filter-bar/StatusFilterBar.js +7 -7
  68. package/dist/ui/status-semaphore/StatusSemaphore.js +1 -1
  69. package/dist/ui/stepper-v2/StepperV2.js +2 -2
  70. package/dist/ui.js +6 -8
  71. package/dist/utils/eco-provider/EcoContext.js +3 -4
  72. package/dist/utils/modal-radicados/AuxRadicadosComponents/TarjetaRadicado.js +11 -12
  73. package/dist/utils/modal-radicados/DocumentoVisorEstado.js +4 -5
  74. package/dist/utils/modal-radicados/ModalDocumento.js +10 -10
  75. package/dist/utils/modal-radicados/ModalRadicado.js +152 -254
  76. package/dist/utils/unp-historico/UnpHistorico.js +4 -5
  77. package/package.json +5 -2
  78. package/dist/ThemeProvider-Cv61y4Uy.js +0 -27
  79. package/dist/lib/ui/smart-textarea/SmartTextArea.d.ts +0 -17
  80. package/dist/ui/smart-textarea/SmartTextArea.js +0 -123
@@ -1,6 +1,6 @@
1
1
  import { jsx as t, Fragment as s, jsxs as i } from "react/jsx-runtime";
2
2
  import { useState as l, useEffect as N } from "react";
3
- import '../../assets/SmartTextArea.css';import '../../assets/EcoFooter.css';import '../../assets/ResumenEvaluacion.css';import '../../assets/AlertaFormulario.css';import '../../assets/SeccionFormulario.css';import '../../assets/NotificacionPopoverV2.css';import '../../assets/CardGestionLateral.css';import '../../assets/NavFormulariosLateral.css';import '../../assets/DatosBasicosCard.css';import '../../assets/StatusFilterBar.css';import '../../assets/PaginadorV2.css';import '../../assets/StatusSemaphore.css';import '../../assets/TableSkeleton.css';import '../../assets/EcoModalStyles.css';import '../../assets/zIndex.css';import '../../assets/Modal.css';import '../../assets/ContenedorVentana.css';import '../../assets/IconoTooltip.css';import '../../assets/ItemsModal.css';import '../../assets/StepperV2.css';import '../../assets/Paginador.css';import '../../assets/ContenidoModalV2.css';import '../../assets/ContenidoModal.css';import '../../assets/Encabezado.css';import '../../assets/SeccionTarjetaLectura.css';import '../../assets/Logo.css';import '../../assets/TarjetaLectura.css';import '../../assets/ContenedorTarjeta.css';import '../../assets/Bootstrap.css';import '../../assets/Tarjeta.css';import '../../assets/TarjetaInfo.css';/* empty css */
3
+ import '../../assets/EcoFooter.css';import '../../assets/ResumenEvaluacion.css';import '../../assets/AlertaFormulario.css';import '../../assets/SeccionFormulario.css';import '../../assets/NotificacionPopoverV2.css';import '../../assets/CardGestionLateral.css';import '../../assets/NavFormulariosLateral.css';import '../../assets/DatosBasicosCard.css';import '../../assets/StatusFilterBar.css';import '../../assets/PaginadorV2.css';import '../../assets/StatusSemaphore.css';import '../../assets/TableSkeleton.css';import '../../assets/EcoModalStyles.css';import '../../assets/zIndex.css';import '../../assets/Modal.css';import '../../assets/ContenedorVentana.css';import '../../assets/IconoTooltip.css';import '../../assets/ItemsModal.css';import '../../assets/StepperV2.css';import '../../assets/Paginador.css';import '../../assets/ContenidoModalV2.css';import '../../assets/ContenidoModal.css';import '../../assets/Encabezado.css';import '../../assets/SeccionTarjetaLectura.css';import '../../assets/Logo.css';import '../../assets/TarjetaLectura.css';import '../../assets/ContenedorTarjeta.css';import '../../assets/Bootstrap.css';import '../../assets/Tarjeta.css';import '../../assets/TarjetaInfo.css';/* empty css */
4
4
  /* empty css */
5
5
  /* empty css */
6
6
  import "../../cards/tarjeta/seccion-tarjeta/SeccionTarjeta.js";
@@ -39,9 +39,8 @@ import "../sanitizar-html/sanitizarHtml.js";
39
39
  /* empty css */
40
40
  /* empty css */
41
41
  /* empty css */
42
- /* empty css */
43
- import { T as g } from "../../Table-cUZFLrPi.js";
44
- const nt = ({ nuip: r, showMessage: h = !0 }) => {
42
+ import { T as g } from "../../Table-CYSh6C16.js";
43
+ const ot = ({ nuip: r, showMessage: h = !0 }) => {
45
44
  const [c, m] = l({
46
45
  sintesisHechos1: !1,
47
46
  sintesisHehcos2: !1
@@ -175,5 +174,5 @@ const nt = ({ nuip: r, showMessage: h = !0 }) => {
175
174
  ] }) });
176
175
  };
177
176
  export {
178
- nt as UnpHistorico
177
+ ot as UnpHistorico
179
178
  };
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "react-ecosistema-unp",
3
3
  "author": "Ecosistema de Información - Unidad Nacional de Protección",
4
4
  "private": false,
5
- "version": "2.6.0",
5
+ "version": "2.7.0",
6
6
  "type": "module",
7
7
  "exports": {
8
8
  ".": {
@@ -41,6 +41,10 @@
41
41
  "types": "./dist/lib/auth.d.ts",
42
42
  "default": "./dist/auth.js"
43
43
  },
44
+ "./ia": {
45
+ "types": "./dist/lib/ia.d.ts",
46
+ "default": "./dist/ia.js"
47
+ },
44
48
  "./styles/EcoStyles.css": "./dist/assets/Bootstrap.css"
45
49
  },
46
50
  "files": [
@@ -72,7 +76,6 @@
72
76
  "react-router-dom": ">=6.0.0 <=8.0.0"
73
77
  },
74
78
  "dependencies": {
75
- "@fingerprintjs/fingerprintjs": "^5.0.1",
76
79
  "@marsidev/react-turnstile": "^1.1.0",
77
80
  "bootstrap": "^5.3.3",
78
81
  "dompurify": "^3.4.16",
@@ -1,27 +0,0 @@
1
- import * as n from "react";
2
- import { useContext as r } from "react";
3
- import "react/jsx-runtime";
4
- const i = ["xxl", "xl", "lg", "md", "sm", "xs"], x = "xs", o = /* @__PURE__ */ n.createContext({
5
- prefixes: {},
6
- breakpoints: i,
7
- minBreakpoint: x
8
- }), {
9
- Consumer: p,
10
- Provider: a
11
- } = o;
12
- function u(t, e) {
13
- const {
14
- prefixes: s
15
- } = r(o);
16
- return t || s[e] || e;
17
- }
18
- function T() {
19
- const {
20
- dir: t
21
- } = r(o);
22
- return t === "rtl";
23
- }
24
- export {
25
- T as a,
26
- u
27
- };
@@ -1,17 +0,0 @@
1
- import { default as React } from 'react';
2
- export interface SmartTextAreaProps {
3
- value: string;
4
- onChange: (e: React.ChangeEvent<HTMLTextAreaElement>) => void;
5
- label?: string;
6
- name?: string;
7
- rows?: number;
8
- maxLength?: number;
9
- placeholder?: string;
10
- disabled?: boolean;
11
- required?: boolean;
12
- /** Callback que recibe el texto actual y devuelve el texto con tildes corregidas */
13
- onTildes?: (texto: string) => Promise<string>;
14
- /** Callback que recibe el texto actual y devuelve el texto con redacción mejorada */
15
- onRedaccion?: (texto: string) => Promise<string>;
16
- }
17
- export declare const SmartTextArea: React.FC<SmartTextAreaProps>;
@@ -1,123 +0,0 @@
1
- import { jsxs as e, jsx as t, Fragment as R } from "react/jsx-runtime";
2
- import { useState as b, useRef as z } from "react";
3
- import '../../assets/SmartTextArea.css';/* empty css */
4
- const B = ({
5
- value: a,
6
- onChange: f,
7
- label: o,
8
- name: l,
9
- rows: j = 3,
10
- maxLength: d,
11
- placeholder: k,
12
- disabled: u = !1,
13
- required: w = !1,
14
- onTildes: p,
15
- onRedaccion: m
16
- }) => {
17
- const [s, n] = b(null), [c, x] = b(null), [h, i] = b(null), y = z(null), g = !!(p || m), v = async (N) => {
18
- const r = a.trim();
19
- if (!r) return;
20
- const C = N === "tildes" ? p : m;
21
- if (C) {
22
- x(N), n(null), i(null);
23
- try {
24
- const I = await C(r);
25
- n(I);
26
- } catch {
27
- i("No se pudo obtener la corrección. Intenta de nuevo.");
28
- } finally {
29
- x(null);
30
- }
31
- }
32
- }, A = () => {
33
- var r;
34
- if (s === null) return;
35
- f({
36
- target: { value: s, name: l ?? "" }
37
- }), n(null), i(null), (r = y.current) == null || r.focus();
38
- }, E = () => {
39
- n(null), i(null);
40
- };
41
- return /* @__PURE__ */ e("div", { className: "sta-wrapper", children: [
42
- (o || g) && /* @__PURE__ */ e("div", { className: "sta-label-row", children: [
43
- o && /* @__PURE__ */ e("label", { className: "sta-label", htmlFor: l, children: [
44
- o,
45
- w && /* @__PURE__ */ t("span", { className: "sta-required", children: " *" })
46
- ] }),
47
- g && /* @__PURE__ */ e("div", { className: "sta-btn-group", children: [
48
- p && /* @__PURE__ */ t(
49
- "button",
50
- {
51
- type: "button",
52
- className: "sta-btn",
53
- disabled: !!c || u || !a.trim(),
54
- onClick: () => v("tildes"),
55
- title: "Corregir tildes con IA",
56
- children: c === "tildes" ? /* @__PURE__ */ t("span", { className: "sta-spinner" }) : "Tildes"
57
- }
58
- ),
59
- m && /* @__PURE__ */ t(
60
- "button",
61
- {
62
- type: "button",
63
- className: "sta-btn",
64
- disabled: !!c || u || !a.trim(),
65
- onClick: () => v("redaccion"),
66
- title: "Mejorar redacción con IA",
67
- children: c === "redaccion" ? /* @__PURE__ */ t("span", { className: "sta-spinner" }) : "Redacción"
68
- }
69
- )
70
- ] })
71
- ] }),
72
- /* @__PURE__ */ t(
73
- "textarea",
74
- {
75
- ref: y,
76
- id: l,
77
- name: l,
78
- className: `sta-textarea${s ? " sta-textarea--highlight" : ""}`,
79
- value: a,
80
- onChange: f,
81
- rows: j,
82
- maxLength: d,
83
- placeholder: k,
84
- disabled: u
85
- }
86
- ),
87
- d && /* @__PURE__ */ e("span", { className: "sta-counter", children: [
88
- a.length,
89
- " / ",
90
- d
91
- ] }),
92
- (s !== null || h) && /* @__PURE__ */ e("div", { className: "sta-panel", children: [
93
- /* @__PURE__ */ e("div", { className: "sta-panel-header", children: [
94
- /* @__PURE__ */ t("span", { className: "sta-panel-title", children: "Texto corregido" }),
95
- /* @__PURE__ */ t(
96
- "button",
97
- {
98
- type: "button",
99
- className: "sta-panel-close",
100
- onClick: E,
101
- "aria-label": "Cerrar",
102
- children: "×"
103
- }
104
- )
105
- ] }),
106
- h ? /* @__PURE__ */ t("p", { className: "sta-panel-error", children: h }) : /* @__PURE__ */ e(R, { children: [
107
- /* @__PURE__ */ t("p", { className: "sta-panel-text", children: s }),
108
- /* @__PURE__ */ t(
109
- "button",
110
- {
111
- type: "button",
112
- className: "sta-btn sta-btn--replace",
113
- onClick: A,
114
- children: "Reemplazar"
115
- }
116
- )
117
- ] })
118
- ] })
119
- ] });
120
- };
121
- export {
122
- B as SmartTextArea
123
- };