pixelon 0.5.1 → 0.5.2
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/components/molecules/chat/StructuredContent/components/ReactiveCrud/ContextoDeLaAccion.d.ts +8 -0
- package/dist/components/molecules/chat/StructuredContent/components/ReactiveCrud/types.d.ts +28 -1
- package/dist/index.esm.js +74 -7
- package/dist/index.js +74 -7
- package/dist/styles.css +1 -1
- package/dist/styles.css.map +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { ChatEventBus } from '../../../../../../core/eventBus/chatEventBus';
|
|
2
|
+
import type { RowActionContexto } from './types';
|
|
3
|
+
export interface ContextoDeLaAccionProps {
|
|
4
|
+
contexto: RowActionContexto;
|
|
5
|
+
row: Record<string, unknown>;
|
|
6
|
+
eventBus?: ChatEventBus;
|
|
7
|
+
}
|
|
8
|
+
export declare function ContextoDeLaAccion({ contexto, row, eventBus }: ContextoDeLaAccionProps): import("react/jsx-runtime").JSX.Element | null;
|
|
@@ -140,10 +140,37 @@ export interface RowActionDef {
|
|
|
140
140
|
/** SPEC-002: varias llamadas en orden (ej. inspección = register-inspection foto + video). Si
|
|
141
141
|
* se define, tiene prioridad sobre `endpoint`; todos comparten el mismo contexto del form. */
|
|
142
142
|
endpoints?: EndpointRef[];
|
|
143
|
-
/** Sub-form declarativo para acciones con input (asignar→grúa, completar→precio). SPEC-001 T2.
|
|
143
|
+
/** Sub-form declarativo para acciones con input (asignar→grúa, completar→precio). SPEC-001 T2.
|
|
144
|
+
*
|
|
145
|
+
* SPEC-132 T5 — `contexto` es lo que se está decidiendo, en solo lectura y arriba del todo.
|
|
146
|
+
* Nació del drawer de «Confirmar pago»: pedía el medio y la referencia sin enseñar **ni el
|
|
147
|
+
* importe ni el comprobante** que el cliente acababa de subir. Para ver lo que estaba dando por
|
|
148
|
+
* bueno, la operadora tenía que cancelar, pulsar «Ver», mirar y volver a empezar. Confirmar un
|
|
149
|
+
* ingreso de dinero sin el dinero delante es firmar a ciegas. */
|
|
144
150
|
form?: {
|
|
145
151
|
fields: ReactiveCrudField[];
|
|
146
152
|
payloadMap?: Record<string, string>;
|
|
153
|
+
contexto?: RowActionContexto;
|
|
154
|
+
};
|
|
155
|
+
}
|
|
156
|
+
/** SPEC-132 T5 — lo que hay que tener delante para decidir. */
|
|
157
|
+
export interface RowActionContexto {
|
|
158
|
+
/** Campos de la FILA (no del formulario) que se enseñan como pares etiqueta/valor. */
|
|
159
|
+
campos?: Array<{
|
|
160
|
+
field: string;
|
|
161
|
+
label: string;
|
|
162
|
+
moleculeType?: string;
|
|
163
|
+
}>;
|
|
164
|
+
/** El archivo que se está dando por bueno: se resuelve su URL y se enseña. */
|
|
165
|
+
adjunto?: {
|
|
166
|
+
/** Campo de la fila con el id del documento. */
|
|
167
|
+
idField: string;
|
|
168
|
+
label?: string;
|
|
169
|
+
/** Endpoint que traduce ese id a una URL mirable. Igual que en la vista de detalle. */
|
|
170
|
+
media: {
|
|
171
|
+
service: string;
|
|
172
|
+
urlPath: string;
|
|
173
|
+
};
|
|
147
174
|
};
|
|
148
175
|
}
|
|
149
176
|
/** Vista de detalle ("Ver"): campos read-only + galería de archivos (fotos/videos/docs). */
|
package/dist/index.esm.js
CHANGED
|
@@ -13359,7 +13359,7 @@ function etiquetaDeOpcion(valor, uiProps) {
|
|
|
13359
13359
|
function esNumerico(moleculeType) {
|
|
13360
13360
|
return moleculeType === "INPUT_CURRENCY" || moleculeType === "INPUT_NUMBER";
|
|
13361
13361
|
}
|
|
13362
|
-
function aTexto(valor, uiProps, moleculeType) {
|
|
13362
|
+
function aTexto$1(valor, uiProps, moleculeType) {
|
|
13363
13363
|
if (valor == null || valor === "") return "";
|
|
13364
13364
|
if (typeof valor === "boolean") return valor ? "S\xED" : "No";
|
|
13365
13365
|
if (esNumerico(moleculeType)) {
|
|
@@ -13368,7 +13368,7 @@ function aTexto(valor, uiProps, moleculeType) {
|
|
|
13368
13368
|
}
|
|
13369
13369
|
if (typeof File !== "undefined" && valor instanceof File) return valor.name;
|
|
13370
13370
|
if (Array.isArray(valor)) {
|
|
13371
|
-
const partes = valor.map((v) => aTexto(v, uiProps, moleculeType)).filter(Boolean);
|
|
13371
|
+
const partes = valor.map((v) => aTexto$1(v, uiProps, moleculeType)).filter(Boolean);
|
|
13372
13372
|
return partes.join(", ");
|
|
13373
13373
|
}
|
|
13374
13374
|
if (typeof valor === "object") {
|
|
@@ -13384,7 +13384,7 @@ function resumenParaConfirmar(campos, datos) {
|
|
|
13384
13384
|
if (!datos) return [];
|
|
13385
13385
|
const lineas = [];
|
|
13386
13386
|
for (const campo of campos) {
|
|
13387
|
-
const valor = aTexto(datos[campo.name], campo.uiProps, campo.moleculeType);
|
|
13387
|
+
const valor = aTexto$1(datos[campo.name], campo.uiProps, campo.moleculeType);
|
|
13388
13388
|
if (!valor) continue;
|
|
13389
13389
|
lineas.push({ label: campo.label ?? campo.name, valor });
|
|
13390
13390
|
}
|
|
@@ -14156,7 +14156,7 @@ function getFormatter(key) {
|
|
|
14156
14156
|
}
|
|
14157
14157
|
|
|
14158
14158
|
const OPTIONS_LOAD_ERROR = "No se pudieron cargar las opciones. Int\xE9ntalo de nuevo.";
|
|
14159
|
-
function unwrap$
|
|
14159
|
+
function unwrap$5(raw) {
|
|
14160
14160
|
if (raw && typeof raw === "object" && "response" in raw) {
|
|
14161
14161
|
return raw.response;
|
|
14162
14162
|
}
|
|
@@ -14177,7 +14177,7 @@ function resolveBody(body, ctx) {
|
|
|
14177
14177
|
}
|
|
14178
14178
|
async function loadOptions(eventBus, ep, ctx) {
|
|
14179
14179
|
const raw = await fetchViaEventBus(eventBus, ep.service, ep.url, ep.method, resolveBody(ep.body, ctx));
|
|
14180
|
-
let data = unwrap$
|
|
14180
|
+
let data = unwrap$5(raw);
|
|
14181
14181
|
if (ep.response_path && data && typeof data === "object" && !Array.isArray(data)) {
|
|
14182
14182
|
data = data[ep.response_path];
|
|
14183
14183
|
}
|
|
@@ -14215,7 +14215,7 @@ const mensajeDeError = (e, respaldo) => {
|
|
|
14215
14215
|
};
|
|
14216
14216
|
|
|
14217
14217
|
const REFRESH_INTERVAL_MS = 2e4;
|
|
14218
|
-
function unwrap$
|
|
14218
|
+
function unwrap$4(raw) {
|
|
14219
14219
|
if (raw && typeof raw === "object" && "response" in raw) {
|
|
14220
14220
|
return raw.response;
|
|
14221
14221
|
}
|
|
@@ -14264,7 +14264,7 @@ function useReactiveCrud(config, eventBus) {
|
|
|
14264
14264
|
filters
|
|
14265
14265
|
});
|
|
14266
14266
|
assertOk(raw);
|
|
14267
|
-
const data = unwrap$
|
|
14267
|
+
const data = unwrap$4(raw);
|
|
14268
14268
|
let rows = [];
|
|
14269
14269
|
let total = 0;
|
|
14270
14270
|
if (Array.isArray(data)) {
|
|
@@ -14468,6 +14468,72 @@ const FileField = ({
|
|
|
14468
14468
|
] });
|
|
14469
14469
|
};
|
|
14470
14470
|
|
|
14471
|
+
function unwrap$3(raw) {
|
|
14472
|
+
if (raw && typeof raw === "object" && "response" in raw) {
|
|
14473
|
+
return raw.response;
|
|
14474
|
+
}
|
|
14475
|
+
return raw;
|
|
14476
|
+
}
|
|
14477
|
+
function aTexto(valor, locale, moleculeType) {
|
|
14478
|
+
if (valor == null || valor === "") return "";
|
|
14479
|
+
if (moleculeType === "INPUT_CURRENCY" || moleculeType === "INPUT_NUMBER") {
|
|
14480
|
+
const n = Number(valor);
|
|
14481
|
+
if (!Number.isNaN(n)) return n.toLocaleString(locale || "es-CO");
|
|
14482
|
+
}
|
|
14483
|
+
if (typeof valor === "object") {
|
|
14484
|
+
const o = valor;
|
|
14485
|
+
for (const clave of ["label", "address", "name", "text", "value"]) {
|
|
14486
|
+
if (typeof o[clave] === "string" && o[clave]) return o[clave];
|
|
14487
|
+
}
|
|
14488
|
+
return "";
|
|
14489
|
+
}
|
|
14490
|
+
return String(valor);
|
|
14491
|
+
}
|
|
14492
|
+
function ContextoDeLaAccion({ contexto, row, eventBus }) {
|
|
14493
|
+
const { locale } = useChatConfig();
|
|
14494
|
+
const [urlAdjunto, setUrlAdjunto] = useState("");
|
|
14495
|
+
const [estadoAdjunto, setEstadoAdjunto] = useState("idle");
|
|
14496
|
+
const adjunto = contexto.adjunto;
|
|
14497
|
+
const idAdjunto = adjunto ? String(row[adjunto.idField] ?? "") : "";
|
|
14498
|
+
useEffect(() => {
|
|
14499
|
+
if (!adjunto || !idAdjunto || !eventBus) return;
|
|
14500
|
+
let vivo = true;
|
|
14501
|
+
setEstadoAdjunto("cargando");
|
|
14502
|
+
void (async () => {
|
|
14503
|
+
try {
|
|
14504
|
+
const crudo = unwrap$3(
|
|
14505
|
+
await fetchViaEventBus(eventBus, adjunto.media.service, adjunto.media.urlPath.replace("{id}", idAdjunto), "GET")
|
|
14506
|
+
);
|
|
14507
|
+
const url = typeof crudo === "string" ? crudo : String(crudo?.url ?? "");
|
|
14508
|
+
if (!vivo) return;
|
|
14509
|
+
setUrlAdjunto(url);
|
|
14510
|
+
setEstadoAdjunto(url ? "idle" : "error");
|
|
14511
|
+
} catch {
|
|
14512
|
+
if (vivo) setEstadoAdjunto("error");
|
|
14513
|
+
}
|
|
14514
|
+
})();
|
|
14515
|
+
return () => {
|
|
14516
|
+
vivo = false;
|
|
14517
|
+
};
|
|
14518
|
+
}, [adjunto, idAdjunto, eventBus]);
|
|
14519
|
+
const lineas = (contexto.campos ?? []).map((c) => ({ label: c.label, valor: aTexto(row[c.field], locale, c.moleculeType) })).filter((l) => l.valor);
|
|
14520
|
+
if (lineas.length === 0 && !adjunto) return null;
|
|
14521
|
+
return /* @__PURE__ */ jsxs("div", { className: "px-chat-reactive-crud__contexto", children: [
|
|
14522
|
+
lineas.length > 0 && /* @__PURE__ */ jsx("dl", { className: "px-chat-reactive-crud__contexto-datos", children: lineas.map((l) => /* @__PURE__ */ jsxs("div", { className: "px-chat-reactive-crud__contexto-linea", children: [
|
|
14523
|
+
/* @__PURE__ */ jsx("dt", { children: l.label }),
|
|
14524
|
+
/* @__PURE__ */ jsx("dd", { children: l.valor })
|
|
14525
|
+
] }, l.label)) }),
|
|
14526
|
+
adjunto && /* @__PURE__ */ jsxs("div", { className: "px-chat-reactive-crud__contexto-adjunto", children: [
|
|
14527
|
+
adjunto.label && /* @__PURE__ */ jsx("span", { className: "px-chat-reactive-crud__contexto-adjunto-label", children: adjunto.label }),
|
|
14528
|
+
estadoAdjunto === "cargando" && /* @__PURE__ */ jsx("span", { className: "px-chat-reactive-crud__contexto-nota", children: "Cargando\u2026" }),
|
|
14529
|
+
estadoAdjunto === "error" && /* @__PURE__ */ jsx("span", { role: "alert", className: "px-chat-reactive-crud__contexto-nota", children: "No se pudo cargar el archivo. M\xEDralo en \xABVer\xBB antes de confirmar." }),
|
|
14530
|
+
urlAdjunto && estadoAdjunto === "idle" && // Se abre aparte porque el comprobante de una transferencia puede ser un PDF o una
|
|
14531
|
+
// captura larga, y aquí solo cabe un vistazo.
|
|
14532
|
+
/* @__PURE__ */ jsx("a", { href: urlAdjunto, target: "_blank", rel: "noopener noreferrer", children: /* @__PURE__ */ jsx("img", { src: urlAdjunto, alt: adjunto.label ?? "Archivo adjunto", className: "px-chat-reactive-crud__contexto-imagen" }) })
|
|
14533
|
+
] })
|
|
14534
|
+
] });
|
|
14535
|
+
}
|
|
14536
|
+
|
|
14471
14537
|
const RESPALDO = { miles: ".", decimal: "," };
|
|
14472
14538
|
function separadoresDelLocale(locale) {
|
|
14473
14539
|
if (!locale) return RESPALDO;
|
|
@@ -14623,6 +14689,7 @@ function ActionFormDrawer({ action, row, idField, eventBus, onExecute, onClose }
|
|
|
14623
14689
|
};
|
|
14624
14690
|
const uploading = Object.values(fileEntries).some((list) => list.some((e) => e.status === "uploading"));
|
|
14625
14691
|
return /* @__PURE__ */ jsx(Drawer$1, { isOpen: true, onClose, title: action.label, placement: "right", children: loadingOptions ? /* @__PURE__ */ jsx("div", { className: "px-chat-reactive-crud__action-loading", children: "Cargando\u2026" }) : /* @__PURE__ */ jsxs("div", { className: "px-chat-reactive-crud__action-form", children: [
|
|
14692
|
+
action.form?.contexto && /* @__PURE__ */ jsx(ContextoDeLaAccion, { contexto: action.form.contexto, row, eventBus }),
|
|
14626
14693
|
fileFields.map((f) => /* @__PURE__ */ jsx(
|
|
14627
14694
|
FileField,
|
|
14628
14695
|
{
|
package/dist/index.js
CHANGED
|
@@ -13380,7 +13380,7 @@ function etiquetaDeOpcion(valor, uiProps) {
|
|
|
13380
13380
|
function esNumerico(moleculeType) {
|
|
13381
13381
|
return moleculeType === "INPUT_CURRENCY" || moleculeType === "INPUT_NUMBER";
|
|
13382
13382
|
}
|
|
13383
|
-
function aTexto(valor, uiProps, moleculeType) {
|
|
13383
|
+
function aTexto$1(valor, uiProps, moleculeType) {
|
|
13384
13384
|
if (valor == null || valor === "") return "";
|
|
13385
13385
|
if (typeof valor === "boolean") return valor ? "S\xED" : "No";
|
|
13386
13386
|
if (esNumerico(moleculeType)) {
|
|
@@ -13389,7 +13389,7 @@ function aTexto(valor, uiProps, moleculeType) {
|
|
|
13389
13389
|
}
|
|
13390
13390
|
if (typeof File !== "undefined" && valor instanceof File) return valor.name;
|
|
13391
13391
|
if (Array.isArray(valor)) {
|
|
13392
|
-
const partes = valor.map((v) => aTexto(v, uiProps, moleculeType)).filter(Boolean);
|
|
13392
|
+
const partes = valor.map((v) => aTexto$1(v, uiProps, moleculeType)).filter(Boolean);
|
|
13393
13393
|
return partes.join(", ");
|
|
13394
13394
|
}
|
|
13395
13395
|
if (typeof valor === "object") {
|
|
@@ -13405,7 +13405,7 @@ function resumenParaConfirmar(campos, datos) {
|
|
|
13405
13405
|
if (!datos) return [];
|
|
13406
13406
|
const lineas = [];
|
|
13407
13407
|
for (const campo of campos) {
|
|
13408
|
-
const valor = aTexto(datos[campo.name], campo.uiProps, campo.moleculeType);
|
|
13408
|
+
const valor = aTexto$1(datos[campo.name], campo.uiProps, campo.moleculeType);
|
|
13409
13409
|
if (!valor) continue;
|
|
13410
13410
|
lineas.push({ label: campo.label ?? campo.name, valor });
|
|
13411
13411
|
}
|
|
@@ -14177,7 +14177,7 @@ function getFormatter(key) {
|
|
|
14177
14177
|
}
|
|
14178
14178
|
|
|
14179
14179
|
const OPTIONS_LOAD_ERROR = "No se pudieron cargar las opciones. Int\xE9ntalo de nuevo.";
|
|
14180
|
-
function unwrap$
|
|
14180
|
+
function unwrap$5(raw) {
|
|
14181
14181
|
if (raw && typeof raw === "object" && "response" in raw) {
|
|
14182
14182
|
return raw.response;
|
|
14183
14183
|
}
|
|
@@ -14198,7 +14198,7 @@ function resolveBody(body, ctx) {
|
|
|
14198
14198
|
}
|
|
14199
14199
|
async function loadOptions(eventBus, ep, ctx) {
|
|
14200
14200
|
const raw = await fetchViaEventBus(eventBus, ep.service, ep.url, ep.method, resolveBody(ep.body, ctx));
|
|
14201
|
-
let data = unwrap$
|
|
14201
|
+
let data = unwrap$5(raw);
|
|
14202
14202
|
if (ep.response_path && data && typeof data === "object" && !Array.isArray(data)) {
|
|
14203
14203
|
data = data[ep.response_path];
|
|
14204
14204
|
}
|
|
@@ -14236,7 +14236,7 @@ const mensajeDeError = (e, respaldo) => {
|
|
|
14236
14236
|
};
|
|
14237
14237
|
|
|
14238
14238
|
const REFRESH_INTERVAL_MS = 2e4;
|
|
14239
|
-
function unwrap$
|
|
14239
|
+
function unwrap$4(raw) {
|
|
14240
14240
|
if (raw && typeof raw === "object" && "response" in raw) {
|
|
14241
14241
|
return raw.response;
|
|
14242
14242
|
}
|
|
@@ -14285,7 +14285,7 @@ function useReactiveCrud(config, eventBus) {
|
|
|
14285
14285
|
filters
|
|
14286
14286
|
});
|
|
14287
14287
|
assertOk(raw);
|
|
14288
|
-
const data = unwrap$
|
|
14288
|
+
const data = unwrap$4(raw);
|
|
14289
14289
|
let rows = [];
|
|
14290
14290
|
let total = 0;
|
|
14291
14291
|
if (Array.isArray(data)) {
|
|
@@ -14489,6 +14489,72 @@ const FileField = ({
|
|
|
14489
14489
|
] });
|
|
14490
14490
|
};
|
|
14491
14491
|
|
|
14492
|
+
function unwrap$3(raw) {
|
|
14493
|
+
if (raw && typeof raw === "object" && "response" in raw) {
|
|
14494
|
+
return raw.response;
|
|
14495
|
+
}
|
|
14496
|
+
return raw;
|
|
14497
|
+
}
|
|
14498
|
+
function aTexto(valor, locale, moleculeType) {
|
|
14499
|
+
if (valor == null || valor === "") return "";
|
|
14500
|
+
if (moleculeType === "INPUT_CURRENCY" || moleculeType === "INPUT_NUMBER") {
|
|
14501
|
+
const n = Number(valor);
|
|
14502
|
+
if (!Number.isNaN(n)) return n.toLocaleString(locale || "es-CO");
|
|
14503
|
+
}
|
|
14504
|
+
if (typeof valor === "object") {
|
|
14505
|
+
const o = valor;
|
|
14506
|
+
for (const clave of ["label", "address", "name", "text", "value"]) {
|
|
14507
|
+
if (typeof o[clave] === "string" && o[clave]) return o[clave];
|
|
14508
|
+
}
|
|
14509
|
+
return "";
|
|
14510
|
+
}
|
|
14511
|
+
return String(valor);
|
|
14512
|
+
}
|
|
14513
|
+
function ContextoDeLaAccion({ contexto, row, eventBus }) {
|
|
14514
|
+
const { locale } = useChatConfig();
|
|
14515
|
+
const [urlAdjunto, setUrlAdjunto] = React.useState("");
|
|
14516
|
+
const [estadoAdjunto, setEstadoAdjunto] = React.useState("idle");
|
|
14517
|
+
const adjunto = contexto.adjunto;
|
|
14518
|
+
const idAdjunto = adjunto ? String(row[adjunto.idField] ?? "") : "";
|
|
14519
|
+
React.useEffect(() => {
|
|
14520
|
+
if (!adjunto || !idAdjunto || !eventBus) return;
|
|
14521
|
+
let vivo = true;
|
|
14522
|
+
setEstadoAdjunto("cargando");
|
|
14523
|
+
void (async () => {
|
|
14524
|
+
try {
|
|
14525
|
+
const crudo = unwrap$3(
|
|
14526
|
+
await fetchViaEventBus(eventBus, adjunto.media.service, adjunto.media.urlPath.replace("{id}", idAdjunto), "GET")
|
|
14527
|
+
);
|
|
14528
|
+
const url = typeof crudo === "string" ? crudo : String(crudo?.url ?? "");
|
|
14529
|
+
if (!vivo) return;
|
|
14530
|
+
setUrlAdjunto(url);
|
|
14531
|
+
setEstadoAdjunto(url ? "idle" : "error");
|
|
14532
|
+
} catch {
|
|
14533
|
+
if (vivo) setEstadoAdjunto("error");
|
|
14534
|
+
}
|
|
14535
|
+
})();
|
|
14536
|
+
return () => {
|
|
14537
|
+
vivo = false;
|
|
14538
|
+
};
|
|
14539
|
+
}, [adjunto, idAdjunto, eventBus]);
|
|
14540
|
+
const lineas = (contexto.campos ?? []).map((c) => ({ label: c.label, valor: aTexto(row[c.field], locale, c.moleculeType) })).filter((l) => l.valor);
|
|
14541
|
+
if (lineas.length === 0 && !adjunto) return null;
|
|
14542
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "px-chat-reactive-crud__contexto", children: [
|
|
14543
|
+
lineas.length > 0 && /* @__PURE__ */ jsxRuntime.jsx("dl", { className: "px-chat-reactive-crud__contexto-datos", children: lineas.map((l) => /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "px-chat-reactive-crud__contexto-linea", children: [
|
|
14544
|
+
/* @__PURE__ */ jsxRuntime.jsx("dt", { children: l.label }),
|
|
14545
|
+
/* @__PURE__ */ jsxRuntime.jsx("dd", { children: l.valor })
|
|
14546
|
+
] }, l.label)) }),
|
|
14547
|
+
adjunto && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "px-chat-reactive-crud__contexto-adjunto", children: [
|
|
14548
|
+
adjunto.label && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "px-chat-reactive-crud__contexto-adjunto-label", children: adjunto.label }),
|
|
14549
|
+
estadoAdjunto === "cargando" && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "px-chat-reactive-crud__contexto-nota", children: "Cargando\u2026" }),
|
|
14550
|
+
estadoAdjunto === "error" && /* @__PURE__ */ jsxRuntime.jsx("span", { role: "alert", className: "px-chat-reactive-crud__contexto-nota", children: "No se pudo cargar el archivo. M\xEDralo en \xABVer\xBB antes de confirmar." }),
|
|
14551
|
+
urlAdjunto && estadoAdjunto === "idle" && // Se abre aparte porque el comprobante de una transferencia puede ser un PDF o una
|
|
14552
|
+
// captura larga, y aquí solo cabe un vistazo.
|
|
14553
|
+
/* @__PURE__ */ jsxRuntime.jsx("a", { href: urlAdjunto, target: "_blank", rel: "noopener noreferrer", children: /* @__PURE__ */ jsxRuntime.jsx("img", { src: urlAdjunto, alt: adjunto.label ?? "Archivo adjunto", className: "px-chat-reactive-crud__contexto-imagen" }) })
|
|
14554
|
+
] })
|
|
14555
|
+
] });
|
|
14556
|
+
}
|
|
14557
|
+
|
|
14492
14558
|
const RESPALDO = { miles: ".", decimal: "," };
|
|
14493
14559
|
function separadoresDelLocale(locale) {
|
|
14494
14560
|
if (!locale) return RESPALDO;
|
|
@@ -14644,6 +14710,7 @@ function ActionFormDrawer({ action, row, idField, eventBus, onExecute, onClose }
|
|
|
14644
14710
|
};
|
|
14645
14711
|
const uploading = Object.values(fileEntries).some((list) => list.some((e) => e.status === "uploading"));
|
|
14646
14712
|
return /* @__PURE__ */ jsxRuntime.jsx(Drawer$1, { isOpen: true, onClose, title: action.label, placement: "right", children: loadingOptions ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: "px-chat-reactive-crud__action-loading", children: "Cargando\u2026" }) : /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "px-chat-reactive-crud__action-form", children: [
|
|
14713
|
+
action.form?.contexto && /* @__PURE__ */ jsxRuntime.jsx(ContextoDeLaAccion, { contexto: action.form.contexto, row, eventBus }),
|
|
14647
14714
|
fileFields.map((f) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
14648
14715
|
FileField,
|
|
14649
14716
|
{
|