@asteby/metacore-runtime-react 50.2.0 → 52.0.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.
- package/CHANGELOG.md +25 -0
- package/README.md +26 -0
- package/dist/activity-diff.d.ts +5 -0
- package/dist/activity-diff.d.ts.map +1 -1
- package/dist/activity-timeline.d.ts.map +1 -1
- package/dist/activity-timeline.js +10 -3
- package/dist/audit-info.d.ts.map +1 -1
- package/dist/audit-info.js +17 -3
- package/dist/barcode-scanner.js +4 -4
- package/dist/dialogs/dynamic-record.d.ts +3 -1
- package/dist/dialogs/dynamic-record.d.ts.map +1 -1
- package/dist/dialogs/dynamic-record.js +19 -6
- package/dist/dynamic-columns.d.ts +6 -0
- package/dist/dynamic-columns.d.ts.map +1 -1
- package/dist/dynamic-columns.js +41 -7
- package/dist/dynamic-date-field.js +1 -1
- package/dist/dynamic-form.js +2 -2
- package/dist/dynamic-kanban.js +6 -5
- package/dist/dynamic-table.d.ts.map +1 -1
- package/dist/dynamic-table.js +6 -4
- package/dist/index.d.ts +2 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -1
- package/dist/org-runtime-context.d.ts +65 -0
- package/dist/org-runtime-context.d.ts.map +1 -1
- package/dist/org-runtime-context.js +24 -0
- package/dist/org-runtime-provider.d.ts +25 -1
- package/dist/org-runtime-provider.d.ts.map +1 -1
- package/dist/org-runtime-provider.js +3 -3
- package/dist/provenance.d.ts +216 -0
- package/dist/provenance.d.ts.map +1 -0
- package/dist/provenance.js +386 -0
- package/dist/record-history.d.ts.map +1 -1
- package/dist/record-history.js +6 -2
- package/dist/sidebar-layout-manager.js +2 -2
- package/dist/widgets/widget-card.d.ts +7 -2
- package/dist/widgets/widget-card.d.ts.map +1 -1
- package/dist/widgets/widget-card.js +6 -3
- package/package.json +3 -3
- package/src/__tests__/org-runtime-number-locale-system-actor.test.tsx +80 -0
- package/src/__tests__/provenance.test.tsx +209 -0
- package/src/activity-diff.tsx +5 -0
- package/src/activity-timeline.tsx +16 -2
- package/src/audit-info.tsx +20 -3
- package/src/barcode-scanner.tsx +4 -4
- package/src/dialogs/dynamic-record.tsx +26 -5
- package/src/dynamic-columns.tsx +68 -6
- package/src/dynamic-date-field.tsx +1 -1
- package/src/dynamic-form.tsx +2 -2
- package/src/dynamic-kanban.tsx +6 -5
- package/src/dynamic-table.tsx +6 -4
- package/src/index.ts +2 -0
- package/src/org-runtime-context.ts +92 -0
- package/src/org-runtime-provider.tsx +50 -3
- package/src/provenance.tsx +585 -0
- package/src/record-history.tsx +17 -4
- package/src/sidebar-layout-manager.tsx +2 -2
- package/src/widgets/widget-card.tsx +26 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,30 @@
|
|
|
1
1
|
# @asteby/metacore-runtime-react
|
|
2
2
|
|
|
3
|
+
## 52.0.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- 420ff5b: Procedencia de registros: `ProvenanceBadge`, `AuthorshipCell`, `ProvenanceActorChip` y `NotificationProvenanceAvatar` muestran persona sola, agente solo (nombre/avatar de `OrgRuntimeProvider agentActor`), sistema/integración con su origen y «persona con agente» con avatar superpuesto y tooltip accesible (quién autorizó, qué propuso el agente y cuándo). La columna created_by de las tablas dinámicas, el detalle del registro, `AuditInfo`, `RecordHistory` y `ActivityTimeline` los usan por defecto cuando la fila trae `created_by.provenance` (kernel `provenance`). Nuevos `agentActor` y `provenanceOrigin` en `OrgRuntimeProvider`; claves i18n `provenance.*` en es/en.
|
|
8
|
+
- 47d97d9: Textos en español neutro (es-MX) en lugar de voseo: «Elige una fecha» en `DynamicDateField`, «Apunta al código de barras», «Usa un lector físico o escribe el código a mano» y «toca la linterna» en el escáner, y «Arrastra, renombra y agrupa» / «Crea una sección o recarga el menú actual» en el gestor del menú lateral.
|
|
9
|
+
|
|
10
|
+
### Patch Changes
|
|
11
|
+
|
|
12
|
+
- Updated dependencies [944dd83]
|
|
13
|
+
- @asteby/metacore-ui@2.28.0
|
|
14
|
+
|
|
15
|
+
## 51.0.0
|
|
16
|
+
|
|
17
|
+
### Minor Changes
|
|
18
|
+
|
|
19
|
+
- bdc8a60: OrgRuntimeProvider: nuevas props opcionales `numberLocales` (p. ej. `{ es: 'es-MX' }`, formatea números y dinero de celdas, totales del pie, kanban y diálogo de registro con el locale de la org) y `systemActor` (`{ name, avatarUrl }` para el actor de sistema en celdas `creator`/`created_by.*`, AuditInfo, ActivityTimeline, RecordHistory y el diálogo). Nuevos `useNumberLocale`, `resolveNumberLocale`, `useSystemActor` e `isSystemActorColumn`. Sin las props no cambia nada. Corrige que un idioma `en-US` fechara en español en las columnas dinámicas.
|
|
20
|
+
- bdc8a60: `WidgetError` acepta `onRetry` y `retryLabel` para reintentar un widget fallido; ahora anuncia el error con `role="alert"`.
|
|
21
|
+
|
|
22
|
+
### Patch Changes
|
|
23
|
+
|
|
24
|
+
- Updated dependencies [019192d]
|
|
25
|
+
- Updated dependencies [bdc8a60]
|
|
26
|
+
- @asteby/metacore-ui@2.27.0
|
|
27
|
+
|
|
3
28
|
## 50.2.0
|
|
4
29
|
|
|
5
30
|
### Minor Changes
|
package/README.md
CHANGED
|
@@ -148,6 +148,32 @@ export function Shell({ children }) {
|
|
|
148
148
|
- Activación exitosa desbloquea **sin recargar**: el host refresca el `state` y el gate se desmonta.
|
|
149
149
|
- **Gateo por rol** con `canActivate` (default `true`): cuando es `false`, el modal bloqueante se muestra **sin formulario** de activación y en su lugar aparece `readOnlyMessage` (default: *"Contacta al administrador de la plataforma para activar la licencia."*). Así solo el Platform Root/superadmin activa; los demás usuarios ven el bloqueo con la indicación de a quién contactar.
|
|
150
150
|
|
|
151
|
+
## Configuración de la organización (`OrgRuntimeProvider`)
|
|
152
|
+
|
|
153
|
+
Envuelve la app autenticada una vez y todas las tablas, kanban, diálogos y
|
|
154
|
+
fichas leen la configuración de la org por contexto:
|
|
155
|
+
|
|
156
|
+
```tsx
|
|
157
|
+
<OrgRuntimeProvider
|
|
158
|
+
timeZone={org.timezone} // 'America/Mexico_City' — fechas en la zona de la org
|
|
159
|
+
currency={org.currency_code} // 'MXN' — moneda por defecto
|
|
160
|
+
numberLocales={{ es: 'es-MX' }} // números y dinero como en México: 11,461.50 (no 11.461,50)
|
|
161
|
+
systemActor={{ name: 'Gobi', avatarUrl: '/brand/gobi.png' }} // quién aparece cuando "lo hizo el sistema"
|
|
162
|
+
>
|
|
163
|
+
<App />
|
|
164
|
+
</OrgRuntimeProvider>
|
|
165
|
+
```
|
|
166
|
+
|
|
167
|
+
- `numberLocales` mapea idioma de la UI → locale de `Intl` (primero el idioma
|
|
168
|
+
completo, luego la base). Aplica a celdas `number`/`currency`, totales del
|
|
169
|
+
pie, kanban (tarjetas y totales por carril) y el diálogo de registro. Las
|
|
170
|
+
fechas siguen el idioma (`es`/`en`). Hooks: `useNumberLocale(lang)`,
|
|
171
|
+
`resolveNumberLocale(lang, map)`.
|
|
172
|
+
- `systemActor` reemplaza el «Sistema» genérico en celdas `creator` /
|
|
173
|
+
`created_by.*`, `AuditInfo`, `ActivityTimeline`, `RecordHistory` y el diálogo
|
|
174
|
+
de registro. Sin provider se conserva «Sistema». Hook: `useSystemActor()`;
|
|
175
|
+
regla compartida: `isSystemActorColumn(renderAs, key, namePath)`.
|
|
176
|
+
|
|
151
177
|
## Minimal usage
|
|
152
178
|
|
|
153
179
|
```tsx
|
package/dist/activity-diff.d.ts
CHANGED
|
@@ -25,6 +25,11 @@ export interface ActivityEvent {
|
|
|
25
25
|
correlation_id?: string | null;
|
|
26
26
|
actor_id?: string | null;
|
|
27
27
|
actor_label?: string | null;
|
|
28
|
+
/**
|
|
29
|
+
* Provenance of the change (kernel `provenance`, JSON string or object):
|
|
30
|
+
* person, agent, system or integration, and the mode. Optional.
|
|
31
|
+
*/
|
|
32
|
+
provenance?: unknown;
|
|
28
33
|
/** Storage path of the actor's avatar image, when the backend resolves one. */
|
|
29
34
|
actor_avatar?: string | null;
|
|
30
35
|
addon_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AAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE;QAAE,IAAI,EAAE,OAAO,CAAC;QAAC,EAAE,EAAE,OAAO,CAAA;KAAE,CAAC,GAAG,IAAI,CAAA;IAC/D,OAAO,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IACvB,gFAAgF;IAChF,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IACtB,WAAW,EAAE,MAAM,CAAA;CACtB;AAED,MAAM,WAAW,iBAAiB;IAC9B,oCAAoC;IACpC,KAAK,EAAE,aAAa,CAAA;IACpB;;;;OAIG;IACH,OAAO,CAAC,EAAE,gBAAgB,EAAE,CAAA;IAC5B,qDAAqD;IACrD,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,sDAAsD;IACtD,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,uCAAuC;IACvC,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,yCAAyC;IACzC,SAAS,CAAC,EAAE,MAAM,CAAA;CACrB;AA8GD;;;;GAIG;AACH,eAAO,MAAM,YAAY,EAAE,KAAK,CAAC,EAAE,CAAC,iBAAiB,CAmLpD,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"activity-timeline.d.ts","sourceRoot":"","sources":["../src/activity-timeline.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;
|
|
1
|
+
{"version":3,"file":"activity-timeline.d.ts","sourceRoot":"","sources":["../src/activity-timeline.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAiC9B,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAA;AAC/C,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAA;AAOpD,MAAM,WAAW,qBAAqB;IAClC;;;OAGG;IACH,MAAM,EAAE,aAAa,EAAE,CAAA;IACvB;;;;;;;OAOG;IACH,cAAc,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,gBAAgB,EAAE,GAAG,SAAS,CAAA;IAClE,wCAAwC;IACxC,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,yCAAyC;IACzC,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,uCAAuC;IACvC,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,yCAAyC;IACzC,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB;;;OAGG;IACH,WAAW,CAAC,EAAE,OAAO,CAAA;CACxB;AAiRD;;;;;;;GAOG;AACH,eAAO,MAAM,gBAAgB,EAAE,KAAK,CAAC,EAAE,CAAC,qBAAqB,CA8N5D,CAAA"}
|
|
@@ -14,6 +14,8 @@ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-run
|
|
|
14
14
|
* per-model via the `resolveColumns(model)` injected function. No fetch.
|
|
15
15
|
*/
|
|
16
16
|
import * as React from 'react';
|
|
17
|
+
import { useSystemActor } from './org-runtime-context';
|
|
18
|
+
import { parseProvenance, ProvenanceAvatar, useResolvedAuthorship } from './provenance';
|
|
17
19
|
import { formatDistanceToNow } from 'date-fns';
|
|
18
20
|
import { es, enUS } from 'date-fns/locale';
|
|
19
21
|
import { ChevronDown, ChevronRight, Clock, Filter, X, Layers, Activity, } from 'lucide-react';
|
|
@@ -84,7 +86,12 @@ function uniqueValues(events, key) {
|
|
|
84
86
|
const GroupCard = ({ group, resolveColumns, timeZone, currency, locale, dateLocale, isOpen, onToggle, }) => {
|
|
85
87
|
const { root, events, changedFieldCount } = group;
|
|
86
88
|
const isMulti = events.length > 1;
|
|
87
|
-
const
|
|
89
|
+
const systemName = useSystemActor()?.name || 'Sistema';
|
|
90
|
+
const authorship = useResolvedAuthorship({
|
|
91
|
+
provenance: parseProvenance(root.provenance),
|
|
92
|
+
person: root.actor_label ? { name: root.actor_label } : undefined,
|
|
93
|
+
});
|
|
94
|
+
const actor = authorship?.label || root.actor_label || root.actor_id || systemName;
|
|
88
95
|
const dotColor = actionDotColor(root.action);
|
|
89
96
|
const timeAgo = (() => {
|
|
90
97
|
try {
|
|
@@ -109,9 +116,9 @@ const GroupCard = ({ group, resolveColumns, timeZone, currency, locale, dateLoca
|
|
|
109
116
|
const summaryLine = root.summary
|
|
110
117
|
? root.summary
|
|
111
118
|
: `${actor} ${ACTION_LABELS_ES[root.action.toLowerCase()] ?? root.action} ${root.model}`;
|
|
112
|
-
return (_jsx(Collapsible, { open: isOpen, onOpenChange: onToggle, children: _jsxs("div", { className: "relative", children: [_jsx("span", { className: "absolute -left-5 top-4 h-2.5 w-2.5 rounded-full border-2 border-background -translate-x-[4px]", style: { background: dotColor }, "aria-hidden": "true" }), _jsxs("div", { className: "rounded-lg border border-border/60 bg-card overflow-hidden", children: [_jsx(CollapsibleTrigger, { asChild: true, children: _jsxs("button", { type: "button", className: "w-full flex items-start gap-3 px-4 py-3 text-left hover:bg-muted/30 transition-colors", children: [_jsx(Avatar, { className: "h-7 w-7 rounded-full shrink-0 mt-0.5", children: _jsx(AvatarFallback, { className: "text-[9px] font-bold bg-primary/10 text-primary", children: getInitials(actor) }) }), _jsxs("div", { className: "flex-1 min-w-0", children: [_jsx("p", { className: "text-sm font-medium text-foreground truncate", title: summaryLine, children: summaryLine }), _jsxs("div", { className: "flex items-center gap-2 mt-1 flex-wrap", children: [_jsxs("span", { className: "inline-flex items-center gap-1 text-xs text-muted-foreground", children: [_jsx(Clock, { className: "h-3 w-3 opacity-60 shrink-0" }), _jsx("span", { title: fullDate, children: timeAgo })] }), _jsx(Badge, { variant: "outline", className: "text-[10px] px-1.5 py-0 h-4", children: root.model }), isMulti && (_jsxs("span", { className: "inline-flex items-center gap-1 text-xs text-muted-foreground", children: [_jsx(Layers, { className: "h-3 w-3 opacity-60 shrink-0" }), events.length, " eventos"] })), changedFieldCount > 0 && (_jsxs("span", { className: "text-xs text-muted-foreground", children: [changedFieldCount, " campo", changedFieldCount !== 1 ? 's' : ''] }))] })] }), _jsx("span", { className: "shrink-0 text-muted-foreground mt-1", children: isOpen ? _jsx(ChevronDown, { className: "h-4 w-4" }) : _jsx(ChevronRight, { className: "h-4 w-4" }) })] }) }), _jsx(CollapsibleContent, { children: _jsx("div", { className: "border-t border-border/40 divide-y divide-border/30", children: events.map((ev, idx) => {
|
|
119
|
+
return (_jsx(Collapsible, { open: isOpen, onOpenChange: onToggle, children: _jsxs("div", { className: "relative", children: [_jsx("span", { className: "absolute -left-5 top-4 h-2.5 w-2.5 rounded-full border-2 border-background -translate-x-[4px]", style: { background: dotColor }, "aria-hidden": "true" }), _jsxs("div", { className: "rounded-lg border border-border/60 bg-card overflow-hidden", children: [_jsx(CollapsibleTrigger, { asChild: true, children: _jsxs("button", { type: "button", className: "w-full flex items-start gap-3 px-4 py-3 text-left hover:bg-muted/30 transition-colors", children: [authorship ? (_jsxs("span", { className: "mt-0.5 shrink-0", title: authorship.description, children: [_jsx(ProvenanceAvatar, { authorship: authorship, size: "sm" }), _jsx("span", { className: "sr-only", children: authorship.description })] })) : (_jsx(Avatar, { className: "h-7 w-7 rounded-full shrink-0 mt-0.5", children: _jsx(AvatarFallback, { className: "text-[9px] font-bold bg-primary/10 text-primary", children: getInitials(actor) }) })), _jsxs("div", { className: "flex-1 min-w-0", children: [_jsx("p", { className: "text-sm font-medium text-foreground truncate", title: summaryLine, children: summaryLine }), _jsxs("div", { className: "flex items-center gap-2 mt-1 flex-wrap", children: [_jsxs("span", { className: "inline-flex items-center gap-1 text-xs text-muted-foreground", children: [_jsx(Clock, { className: "h-3 w-3 opacity-60 shrink-0" }), _jsx("span", { title: fullDate, children: timeAgo })] }), _jsx(Badge, { variant: "outline", className: "text-[10px] px-1.5 py-0 h-4", children: root.model }), isMulti && (_jsxs("span", { className: "inline-flex items-center gap-1 text-xs text-muted-foreground", children: [_jsx(Layers, { className: "h-3 w-3 opacity-60 shrink-0" }), events.length, " eventos"] })), changedFieldCount > 0 && (_jsxs("span", { className: "text-xs text-muted-foreground", children: [changedFieldCount, " campo", changedFieldCount !== 1 ? 's' : ''] }))] })] }), _jsx("span", { className: "shrink-0 text-muted-foreground mt-1", children: isOpen ? _jsx(ChevronDown, { className: "h-4 w-4" }) : _jsx(ChevronRight, { className: "h-4 w-4" }) })] }) }), _jsx(CollapsibleContent, { children: _jsx("div", { className: "border-t border-border/40 divide-y divide-border/30", children: events.map((ev, idx) => {
|
|
113
120
|
const cols = resolveColumns(ev.model);
|
|
114
|
-
const evActor = ev.actor_label || ev.actor_id ||
|
|
121
|
+
const evActor = ev.actor_label || ev.actor_id || systemName;
|
|
115
122
|
return (_jsxs("div", { className: "px-4 py-3 space-y-2", children: [isMulti && (_jsxs("div", { className: "flex items-center gap-2 text-xs text-muted-foreground", children: [_jsx("span", { className: "font-medium text-foreground/70", children: ev.model }), _jsx("span", { children: "\u00B7" }), _jsx("span", { children: evActor }), idx > 0 && (_jsxs(_Fragment, { children: [_jsx("span", { children: "\u00B7" }), _jsx("span", { title: ev.occurred_at, children: (() => {
|
|
116
123
|
try {
|
|
117
124
|
return formatDistanceToNow(new Date(ev.occurred_at), { addSuffix: true, locale: dateLocale });
|
package/dist/audit-info.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"audit-info.d.ts","sourceRoot":"","sources":["../src/audit-info.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AACH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;
|
|
1
|
+
{"version":3,"file":"audit-info.d.ts","sourceRoot":"","sources":["../src/audit-info.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AACH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAW9B,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,SAAS,CAAA;AAExC,gFAAgF;AAChF,eAAO,MAAM,eAAe,yCAAyC,CAAA;AAWrE;;;GAGG;AACH,wBAAgB,aAAa,CAAC,GAAG,EAAE,OAAO,GAAG,SAAS,GAAG,SAAS,CASjE;AAED,MAAM,WAAW,UAAU;IACvB,oBAAoB;IACpB,IAAI,EAAE,MAAM,CAAA;IACZ,oEAAoE;IACpE,QAAQ,EAAE,OAAO,CAAA;CACpB;AAED,uEAAuE;AACvE,wBAAgB,iBAAiB,CAC7B,GAAG,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAC5B,QAAQ,EAAE,MAAM,GAAG,SAAS,EAC5B,IAAI,EAAE;IAAE,YAAY,CAAC,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,MAAM,GAAG,SAAS,CAAC;IAAC,WAAW,EAAE,MAAM,CAAA;CAAE,GACjF,UAAU,GAAG,IAAI,CAmBnB;AAyBD,MAAM,WAAW,cAAc;IAC3B,oEAAoE;IACpE,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI,GAAG,SAAS,CAAA;IAClD,uDAAuD;IACvD,KAAK,EAAE,SAAS,GAAG,IAAI,GAAG,SAAS,CAAA;IACnC,4EAA4E;IAC5E,YAAY,CAAC,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,MAAM,GAAG,SAAS,CAAA;IACjD,2DAA2D;IAC3D,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,oDAAoD;IACpD,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,0CAA0C;IAC1C,WAAW,CAAC,EAAE,OAAO,CAAA;IACrB,SAAS,CAAC,EAAE,MAAM,CAAA;CACrB;AAYD,wBAAgB,SAAS,CAAC,EACtB,MAAM,EACN,KAAK,EACL,YAAY,EACZ,QAAQ,EACR,MAAM,EACN,WAAmB,EACnB,SAAS,GACZ,EAAE,cAAc,4BAwFhB"}
|
package/dist/audit-info.js
CHANGED
|
@@ -25,7 +25,8 @@ import { cn } from '@asteby/metacore-ui/lib';
|
|
|
25
25
|
import { formatDateCell } from './dynamic-columns';
|
|
26
26
|
import { objectLabel } from './dynamic-relation-helpers';
|
|
27
27
|
import { isNilUuid } from './nil-uuid';
|
|
28
|
-
import { useTimeZone } from './org-runtime-context';
|
|
28
|
+
import { useSystemActor, useTimeZone } from './org-runtime-context';
|
|
29
|
+
import { readProvenance, useResolvedAuthorship } from './provenance';
|
|
29
30
|
/** The kernel's actor for unattended work (schedules, webhooks, connectors). */
|
|
30
31
|
export const SYSTEM_ACTOR_ID = '00000000-0000-0000-0000-000000000001';
|
|
31
32
|
const AUDIT_KEYS = [
|
|
@@ -103,7 +104,10 @@ const COPY = {
|
|
|
103
104
|
export function AuditInfo({ record, audit, resolveActor, timeZone, locale, defaultOpen = false, className, }) {
|
|
104
105
|
const { t, i18n } = useTranslation();
|
|
105
106
|
const ctxTz = useTimeZone();
|
|
107
|
+
const systemActor = useSystemActor();
|
|
106
108
|
const [open, setOpen] = React.useState(defaultOpen);
|
|
109
|
+
// Stored creation provenance (person with agent, agent, system, integration).
|
|
110
|
+
const authorship = useResolvedAuthorship({ provenance: readProvenance(record ?? undefined) });
|
|
107
111
|
const meta = readAuditMeta(audit);
|
|
108
112
|
if (!meta || !record)
|
|
109
113
|
return null;
|
|
@@ -116,9 +120,19 @@ export function AuditInfo({ record, audit, resolveActor, timeZone, locale, defau
|
|
|
116
120
|
const f = atCol ? formatDateCell(record[atCol], undefined, dfLocale, tz) : null;
|
|
117
121
|
if (!f)
|
|
118
122
|
return null;
|
|
119
|
-
const actor = resolveAuditActor(record, byCol, { resolveActor, systemLabel: tt('system') });
|
|
123
|
+
const actor = resolveAuditActor(record, byCol, { resolveActor, systemLabel: systemActor?.name || tt('system') });
|
|
120
124
|
const date = new Date(record[atCol]);
|
|
121
125
|
const relative = formatDistanceToNow(date, { addSuffix: true, locale: dfLocale });
|
|
126
|
+
if (key === 'created' && authorship) {
|
|
127
|
+
return {
|
|
128
|
+
key,
|
|
129
|
+
text: tt(whoKey, { who: authorship.label }),
|
|
130
|
+
detail: authorship.description,
|
|
131
|
+
absolute: f.display,
|
|
132
|
+
title: f.title,
|
|
133
|
+
relative,
|
|
134
|
+
};
|
|
135
|
+
}
|
|
122
136
|
return {
|
|
123
137
|
key,
|
|
124
138
|
text: actor ? tt(whoKey, { who: actor.name }) : tt(whenKey),
|
|
@@ -138,5 +152,5 @@ export function AuditInfo({ record, audit, resolveActor, timeZone, locale, defau
|
|
|
138
152
|
if (lines.length === 0)
|
|
139
153
|
return null;
|
|
140
154
|
const Chevron = open ? ChevronDown : ChevronRight;
|
|
141
|
-
return (_jsxs("div", { className: cn('text-xs text-muted-foreground', className), "data-testid": "audit-info", children: [_jsxs("button", { type: "button", className: "flex items-center gap-1.5 hover:text-foreground", "aria-expanded": open, onClick: () => setOpen(o => !o), children: [_jsx(Chevron, { className: "h-3.5 w-3.5" }), _jsx(History, { className: "h-3.5 w-3.5" }), _jsx("span", { children: tt('title') })] }), open && (_jsx("ul", { className: "mt-2 space-y-1 pl-6", children: lines.map(l => (_jsxs("li", { "data-audit-line": l.key, children: [_jsx("span", { children: l.text }), ' · ', _jsx("time", { title: l.title, children: l.absolute }), _jsxs("span", { className: "opacity-70", children: [" (", l.relative, ")"] })] }, l.key))) }))] }));
|
|
155
|
+
return (_jsxs("div", { className: cn('text-xs text-muted-foreground', className), "data-testid": "audit-info", children: [_jsxs("button", { type: "button", className: "flex items-center gap-1.5 hover:text-foreground", "aria-expanded": open, onClick: () => setOpen(o => !o), children: [_jsx(Chevron, { className: "h-3.5 w-3.5" }), _jsx(History, { className: "h-3.5 w-3.5" }), _jsx("span", { children: tt('title') })] }), open && (_jsx("ul", { className: "mt-2 space-y-1 pl-6", children: lines.map(l => (_jsxs("li", { "data-audit-line": l.key, children: [_jsx("span", { title: l.detail, children: l.text }), l.detail ? _jsxs("span", { className: "sr-only", children: [" (", l.detail, ")"] }) : null, ' · ', _jsx("time", { title: l.title, children: l.absolute }), _jsxs("span", { className: "opacity-70", children: [" (", l.relative, ")"] })] }, l.key))) }))] }));
|
|
142
156
|
}
|
package/dist/barcode-scanner.js
CHANGED
|
@@ -93,7 +93,7 @@ export function useScanBeep() {
|
|
|
93
93
|
* condicionalmente (`open`) dentro de un ancestro `relative` cuando uses el
|
|
94
94
|
* posicionamiento `absolute` por defecto.
|
|
95
95
|
*/
|
|
96
|
-
export function BarcodeScanner({ open, onClose, onDetected, continuous = true, beepOnScan = true, title = 'Escanear código', hint = '
|
|
96
|
+
export function BarcodeScanner({ open, onClose, onDetected, continuous = true, beepOnScan = true, title = 'Escanear código', hint = 'Apunta al código de barras', position = 'absolute', feedback = null, }) {
|
|
97
97
|
const videoRef = React.useRef(null);
|
|
98
98
|
const streamRef = React.useRef(null);
|
|
99
99
|
const rafRef = React.useRef(null);
|
|
@@ -134,7 +134,7 @@ export function BarcodeScanner({ open, onClose, onDetected, continuous = true, b
|
|
|
134
134
|
setTorchOn(false);
|
|
135
135
|
const Ctor = getDetectorCtor();
|
|
136
136
|
if (!navigator.mediaDevices?.getUserMedia || !Ctor) {
|
|
137
|
-
setError('Tu navegador no soporta escaneo por cámara.
|
|
137
|
+
setError('Tu navegador no soporta escaneo por cámara. Usa un lector físico (escribe en el campo) o escribe el código a mano.');
|
|
138
138
|
return;
|
|
139
139
|
}
|
|
140
140
|
let cancelled = false;
|
|
@@ -194,7 +194,7 @@ export function BarcodeScanner({ open, onClose, onDetected, continuous = true, b
|
|
|
194
194
|
const name = e?.name;
|
|
195
195
|
setError(name === 'NotAllowedError'
|
|
196
196
|
? 'Permiso de cámara denegado. Habilitalo en el navegador para escanear.'
|
|
197
|
-
: 'No se pudo abrir la cámara.
|
|
197
|
+
: 'No se pudo abrir la cámara. Usa un lector físico o escribe el código a mano.');
|
|
198
198
|
}
|
|
199
199
|
})();
|
|
200
200
|
return () => {
|
|
@@ -214,7 +214,7 @@ export function BarcodeScanner({ open, onClose, onDetected, continuous = true, b
|
|
|
214
214
|
: 'max-w-[90%] rounded-full bg-emerald-500 px-4 py-2.5 text-center text-sm font-semibold text-white shadow-lg', children: feedback.message }) })) : null, _jsx("p", { className: "absolute bottom-8 left-0 right-0 px-4 text-center text-sm text-white/90", children: !ready
|
|
215
215
|
? 'Abriendo cámara…'
|
|
216
216
|
: torchAvailable
|
|
217
|
-
? `${hint} ·
|
|
217
|
+
? `${hint} · toca la linterna si está oscuro`
|
|
218
218
|
: hint })] })) })] }));
|
|
219
219
|
}
|
|
220
220
|
export default BarcodeScanner;
|
|
@@ -251,10 +251,12 @@ export declare function ReadonlyEditField({ field, value }: {
|
|
|
251
251
|
field: FieldDef;
|
|
252
252
|
value: any;
|
|
253
253
|
}): import("react").JSX.Element;
|
|
254
|
-
export declare function ViewValue({ field, value: rawValue, record, getImageUrl: getImageUrlProp, timeZone: timeZoneProp, currency: currencyProp, }: {
|
|
254
|
+
export declare function ViewValue({ field, value: rawValue, record, getImageUrl: getImageUrlProp, timeZone: timeZoneProp, currency: currencyProp, model, }: {
|
|
255
255
|
field: FieldDef;
|
|
256
256
|
value: any;
|
|
257
257
|
record: any;
|
|
258
|
+
/** Model key; lets the host origin resolver name legacy system rows. */
|
|
259
|
+
model?: string;
|
|
258
260
|
/** Optional override; when omitted falls back to the nearest provider/identity. */
|
|
259
261
|
getImageUrl?: GetImageUrl;
|
|
260
262
|
/** Optional override; when omitted falls back to the nearest provider. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dynamic-record.d.ts","sourceRoot":"","sources":["../../src/dialogs/dynamic-record.tsx"],"names":[],"mappings":"AAcA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,SAAS,CAAA;AA+C1C,OAAO,EAAsB,KAAK,cAAc,EAAE,MAAM,yBAAyB,CAAA;AAGjF,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,UAAU,CAAA;AAsB3C,OAAO,EAAkB,KAAK,SAAS,EAAE,MAAM,oBAAoB,CAAA;AAEnE,OAAO,EAAqC,KAAK,WAAW,EAAE,MAAM,sBAAsB,CAAA;
|
|
1
|
+
{"version":3,"file":"dynamic-record.d.ts","sourceRoot":"","sources":["../../src/dialogs/dyn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AA;IACjB,0EAA0E;IAC1E,QAAQ,CAAC,EAAE,MAAM,CAAA;CACpB,+BA6UA;AAwLD,wBAAgB,SAAS,CAAC,EAAE,KAAK,EAAE,KAAK,EAAE,QAAQ,EAAE,MAAM,EAAE,OAAO,EAAE,KAAK,EAAE,EAAE;IAC1E,KAAK,EAAE,QAAQ,CAAA;IACf,KAAK,EAAE,GAAG,CAAA;IACV,QAAQ,EAAE,CAAC,GAAG,EAAE,GAAG,KAAK,IAAI,CAAA;IAC5B,iFAAiF;IACjF,MAAM,CAAC,EAAE,GAAG,CAAA;IACZ,8EAA8E;IAC9E,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,uEAAuE;IACvE,KAAK,CAAC,EAAE,MAAM,CAAA;CACjB,+BA0RA"}
|
|
@@ -54,7 +54,8 @@ import { generateBadgeStyles } from '@asteby/metacore-ui/lib';
|
|
|
54
54
|
import { CollectionCell } from '../collection-cell';
|
|
55
55
|
import { ImageUrlContext, identityImageUrl } from '../image-url-context';
|
|
56
56
|
import { getFieldWidget, useFieldWidgetRegistryVersion } from '../field-widget-registry';
|
|
57
|
-
import { TimeZoneContext, CurrencyContext } from '../org-runtime-context';
|
|
57
|
+
import { TimeZoneContext, CurrencyContext, useNumberLocale, useSystemActor } from '../org-runtime-context';
|
|
58
|
+
import { AuthorshipCell, hasSpecialAuthorship, readProvenance } from '../provenance';
|
|
58
59
|
/**
|
|
59
60
|
* Lowercase, accent-free, hyphenated slug ("Asociaciones Médicas" →
|
|
60
61
|
* "asociaciones-medicas"). Pure — used by `FieldDef.deriveFrom`.
|
|
@@ -992,8 +993,10 @@ function RelationViewValue({ field, value, record, stack = false, }) {
|
|
|
992
993
|
};
|
|
993
994
|
return (_jsxs("div", { className: "flex items-center gap-2 py-1", children: [_jsx(OptionLead, { option: lead, size: 24 }), _jsx("span", { className: "text-sm", children: label ?? '—' })] }));
|
|
994
995
|
}
|
|
995
|
-
export function ViewValue({ field, value: rawValue, record, getImageUrl: getImageUrlProp, timeZone: timeZoneProp, currency: currencyProp, }) {
|
|
996
|
+
export function ViewValue({ field, value: rawValue, record, getImageUrl: getImageUrlProp, timeZone: timeZoneProp, currency: currencyProp, model, }) {
|
|
996
997
|
const { t, i18n } = useTranslation();
|
|
998
|
+
const numberLocale = useNumberLocale(i18n.language);
|
|
999
|
+
const systemActor = useSystemActor();
|
|
997
1000
|
const ctxImageUrl = useContext(ImageUrlContext);
|
|
998
1001
|
const ctxTimeZone = useContext(TimeZoneContext);
|
|
999
1002
|
const ctxCurrency = useContext(CurrencyContext);
|
|
@@ -1013,6 +1016,15 @@ export function ViewValue({ field, value: rawValue, record, getImageUrl: getImag
|
|
|
1013
1016
|
renderAs === 'user' ||
|
|
1014
1017
|
field.key === 'created_by' ||
|
|
1015
1018
|
field.key === 'created_by_id') {
|
|
1019
|
+
const isCreatedByField = field.key === 'created_by' ||
|
|
1020
|
+
field.key === 'created_by_id' ||
|
|
1021
|
+
(typeof field.key === 'string' && field.key.startsWith('created_by.')) ||
|
|
1022
|
+
renderAs === 'creator';
|
|
1023
|
+
// Provenance: person with the agent, the agent alone, the system or an
|
|
1024
|
+
// integration with its origin (kernel `provenance`).
|
|
1025
|
+
if (isCreatedByField && (hasSpecialAuthorship(record) || readProvenance(record))) {
|
|
1026
|
+
return (_jsx("div", { className: "py-1", children: _jsx(AuthorshipCell, { row: record, model: model, variant: "inline" }) }));
|
|
1027
|
+
}
|
|
1016
1028
|
const user = createdBySibling(rawValue, record);
|
|
1017
1029
|
if (user) {
|
|
1018
1030
|
return (_jsxs("div", { className: "flex items-center gap-2 py-1", children: [user.avatar ? (_jsx("img", { src: getImageUrl(String(user.avatar)), alt: user.name ?? '', className: "h-6 w-6 rounded-full object-cover" })) : null, _jsx("span", { className: "text-sm", children: user.name ?? user.email ?? '—' })] }));
|
|
@@ -1024,7 +1036,7 @@ export function ViewValue({ field, value: rawValue, record, getImageUrl: getImag
|
|
|
1024
1036
|
(typeof field.key === 'string' && field.key.startsWith('created_by.')) ||
|
|
1025
1037
|
renderAs === 'creator';
|
|
1026
1038
|
if (isCreatedBy) {
|
|
1027
|
-
return _jsx("p", { className: "text-sm py-1", children:
|
|
1039
|
+
return _jsx("p", { className: "text-sm py-1", children: systemActor?.name || t('common.system', { defaultValue: 'Sistema' }) });
|
|
1028
1040
|
}
|
|
1029
1041
|
return _jsx("p", { className: "text-sm py-1 text-muted-foreground", children: "\u2014" });
|
|
1030
1042
|
}
|
|
@@ -1110,7 +1122,7 @@ export function ViewValue({ field, value: rawValue, record, getImageUrl: getImag
|
|
|
1110
1122
|
const num = typeof value === 'number' ? value : Number(value);
|
|
1111
1123
|
if (!isNaN(num)) {
|
|
1112
1124
|
const resolvedCurrency = field.styleConfig?.currency || currency || 'USD';
|
|
1113
|
-
const localeTag =
|
|
1125
|
+
const localeTag = numberLocale || 'es';
|
|
1114
1126
|
const formatted = new Intl.NumberFormat(localeTag, {
|
|
1115
1127
|
style: 'currency',
|
|
1116
1128
|
currency: resolvedCurrency,
|
|
@@ -1175,7 +1187,7 @@ export function ViewValue({ field, value: rawValue, record, getImageUrl: getImag
|
|
|
1175
1187
|
// to surface — render readable key/value pairs instead of falling through to
|
|
1176
1188
|
// String(value) ("[object Object]").
|
|
1177
1189
|
if (value !== null && typeof value === 'object') {
|
|
1178
|
-
return (_jsx(StructuredViewValue, { value: value, field: field, locale:
|
|
1190
|
+
return (_jsx(StructuredViewValue, { value: value, field: field, locale: numberLocale, t: t }));
|
|
1179
1191
|
}
|
|
1180
1192
|
const display = formatDisplayValue(value, field);
|
|
1181
1193
|
// Free text may embed URLs (a github body, notes, a long-text field). Turn
|
|
@@ -1283,6 +1295,7 @@ export function EditField({ field, value, onChange, record, invalid, error }) {
|
|
|
1283
1295
|
? 'border-destructive ring-1 ring-destructive/30 focus-visible:ring-destructive aria-invalid:border-destructive'
|
|
1284
1296
|
: undefined;
|
|
1285
1297
|
const { t, i18n } = useTranslation();
|
|
1298
|
+
const numberLocale = useNumberLocale(i18n.language);
|
|
1286
1299
|
const editFieldImageUrl = useContext(ImageUrlContext);
|
|
1287
1300
|
const dialogModel = useContext(RecordDialogModelContext);
|
|
1288
1301
|
// Host-registered widget (`widget: "<name>"`) wins over every built-in and
|
|
@@ -1297,7 +1310,7 @@ export function EditField({ field, value, onChange, record, invalid, error }) {
|
|
|
1297
1310
|
// with the same inline table the detail view uses — a localized, ref-resolved
|
|
1298
1311
|
// mini-table — instead of an input that stringifies to "[object Object]".
|
|
1299
1312
|
if (isLineItemsField(field, value)) {
|
|
1300
|
-
return (_jsxs("div", { className: "space-y-1", children: [_jsx("div", { className: "rounded-md border bg-muted/30 p-2", children: _jsx(CollectionCell, { value: value, itemFields: fieldItemFields(field), variant: "inline", locale:
|
|
1313
|
+
return (_jsxs("div", { className: "space-y-1", children: [_jsx("div", { className: "rounded-md border bg-muted/30 p-2", children: _jsx(CollectionCell, { value: value, itemFields: fieldItemFields(field), variant: "inline", locale: numberLocale, t: t, getImageUrl: editFieldImageUrl }) }), _jsx("p", { className: "text-[11px] text-muted-foreground", children: t('datatable.readOnly', { defaultValue: 'Solo lectura' }) })] }));
|
|
1301
1314
|
}
|
|
1302
1315
|
if (field.type === 'boolean') {
|
|
1303
1316
|
return (_jsxs("div", { className: "flex items-center gap-2 py-1", children: [_jsx(Switch, { checked: !!value, onCheckedChange: onChange }), _jsx("span", { className: "text-sm text-muted-foreground", children: value ? 'Sí' : 'No' })] }));
|
|
@@ -152,6 +152,12 @@ export declare const resolveRelationImage: (col: ColumnDefinition, row: any) =>
|
|
|
152
152
|
export declare function resolveMissingActorLabel(renderAs: string | undefined, colKey: string | undefined, namePath: string | undefined, t?: (key: string, options?: {
|
|
153
153
|
defaultValue?: string;
|
|
154
154
|
}) => string): string;
|
|
155
|
+
/**
|
|
156
|
+
* True when an EMPTY actor in this cell means "the system did it": `creator`
|
|
157
|
+
* cells and `created_by.*` columns. Exported so hosts and renderers share the
|
|
158
|
+
* rule with resolveMissingActorLabel.
|
|
159
|
+
*/
|
|
160
|
+
export declare function isSystemActorColumn(renderAs: string | undefined, colKey: string | undefined, namePath: string | undefined): boolean;
|
|
155
161
|
/**
|
|
156
162
|
* Coerces a creator/user cell value into a display string. Backends often put
|
|
157
163
|
* the whole `{name,avatar,email}` sibling at `created_by` (column key =
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dynamic-columns.d.ts","sourceRoot":"","sources":["../src/dynamic-columns.tsx"],"names":[],"mappings":"AAcA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAE9B,OAAO,EAAU,KAAK,MAAM,EAAE,MAAM,UAAU,CAAA;
|
|
1
|
+
{"version":3,"file":"dynamic-columns.d.ts","sourceRoot":"","sources":["../src/dynamic-columns.tsx"],"names":[],"mappings":"AAcA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAE9B,OAAO,EAAU,KAAK,MAAM,EAAE,MAAM,UAAU,CAAA;AA0C9C,OAAO,KAAK,EAAiB,gBAAgB,EAAE,MAAM,SAAS,CAAA;AAE9D,OAAO,KAAK,EAER,iBAAiB,EACjB,kBAAkB,EACrB,MAAM,wBAAwB,CAAA;AAE/B,qEAAqE;AACrE,MAAM,WAAW,qBAAqB;IAClC;;;;OAIG;IACH,WAAW,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,MAAM,CAAA;IACtC;;;;OAIG;IACH,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB;;;;;OAKG;IACH,kBAAkB,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,EAAE,GAAG,EAAE,gBAAgB,KAAK,MAAM,CAAA;CACtE;AA0BD;;;;GAIG;AACH,eAAO,MAAM,eAAe,GAAI,KAAK,gBAAgB,EAAE,cAAc,MAAM,KAAG,MACzB,CAAA;AAQrD;;;;;GAKG;AACH,eAAO,MAAM,WAAW,GAAI,KAAK,gBAAgB,KAAG,MAAM,GAAG,SAG5D,CAAA;AAED;;;;;;GAMG;AACH,eAAO,MAAM,oBAAoB,GAC7B,KAAK,gBAAgB,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,EAAE,OAAO,CAAA;CAClB,CAgCA,CAAA;AAED,wBAAgB,4BAA4B,CACxC,OAAO,GAAE,qBAA0B,GACpC,iBAAiB,CA0tBnB;AAED;;;;GAIG;AACH,eAAO,MAAM,wBAAwB,EAAE,iBACL,CAAA"}
|
package/dist/dynamic-columns.js
CHANGED
|
@@ -21,6 +21,8 @@ import { Avatar, AvatarFallback, AvatarImage, Badge, Checkbox, InitialsAvatar, }
|
|
|
21
21
|
import { DataTableColumnHeader, FilterableColumnHeader, } from '@asteby/metacore-ui/data-table';
|
|
22
22
|
import { generateBadgeStyles, getInitials, relationChipStyles, } from '@asteby/metacore-ui/lib';
|
|
23
23
|
import { Progress } from './dialogs/_primitives';
|
|
24
|
+
import { useSystemActor } from './org-runtime-context';
|
|
25
|
+
import { AuthorshipCell, hasSpecialAuthorship } from './provenance';
|
|
24
26
|
import { humanizeToken, translateMetadataLabel } from './dynamic-columns-helpers';
|
|
25
27
|
import { objectLabel } from './dynamic-relation-helpers';
|
|
26
28
|
import { OptionBadge, RelationThumbnail, ImageStack, statusColorFor, useIsDarkTheme, } from './display-value';
|
|
@@ -458,18 +460,26 @@ export const resolveRelationImage = (col, row) => {
|
|
|
458
460
|
* avatar/user/search empties stay "N/A" (unassigned person).
|
|
459
461
|
*/
|
|
460
462
|
export function resolveMissingActorLabel(renderAs, colKey, namePath, t) {
|
|
463
|
+
if (isSystemActorColumn(renderAs, colKey, namePath)) {
|
|
464
|
+
return t ? t('common.system', { defaultValue: 'Sistema' }) : 'Sistema';
|
|
465
|
+
}
|
|
466
|
+
return 'N/A';
|
|
467
|
+
}
|
|
468
|
+
/**
|
|
469
|
+
* True when an EMPTY actor in this cell means "the system did it": `creator`
|
|
470
|
+
* cells and `created_by.*` columns. Exported so hosts and renderers share the
|
|
471
|
+
* rule with resolveMissingActorLabel.
|
|
472
|
+
*/
|
|
473
|
+
export function isSystemActorColumn(renderAs, colKey, namePath) {
|
|
461
474
|
const path = namePath || '';
|
|
462
475
|
const key = colKey || '';
|
|
463
|
-
|
|
476
|
+
return (renderAs === 'creator' ||
|
|
477
|
+
key === 'created_by' ||
|
|
464
478
|
key === 'created_by_id' ||
|
|
465
479
|
key.startsWith('created_by.') ||
|
|
466
480
|
path === 'created_by' ||
|
|
467
481
|
path === 'created_by.name' ||
|
|
468
|
-
path.startsWith('created_by.');
|
|
469
|
-
if (renderAs === 'creator' || isCreatedByColumn) {
|
|
470
|
-
return t ? t('common.system', { defaultValue: 'Sistema' }) : 'Sistema';
|
|
471
|
-
}
|
|
472
|
-
return 'N/A';
|
|
482
|
+
path.startsWith('created_by.'));
|
|
473
483
|
}
|
|
474
484
|
/**
|
|
475
485
|
* Coerces a creator/user cell value into a display string. Backends often put
|
|
@@ -625,6 +635,15 @@ const ReferenceCell = ({ col, row }) => {
|
|
|
625
635
|
* JSX serves every variant.
|
|
626
636
|
*/
|
|
627
637
|
const AvatarCell = ({ name, desc, avatarSrc, getImageUrl }) => (_jsxs("div", { className: "flex items-center gap-3 min-w-0", children: [_jsxs(Avatar, { className: "h-8 w-8 rounded-lg ring-1 ring-border/50", children: [_jsx(AvatarImage, { src: avatarSrc ? getImageUrl(avatarSrc) : '', alt: name, className: "object-cover" }), _jsx(AvatarFallback, { className: "text-[10px] font-bold bg-primary/5 text-primary rounded-lg", children: getInitials(name) })] }), _jsxs("div", { className: "flex flex-col min-w-0 overflow-hidden", children: [_jsx("span", { className: "font-medium text-sm truncate leading-none mb-0.5 text-foreground/90", children: name }), desc && (_jsx("span", { className: "text-[11px] text-muted-foreground truncate leading-none", children: desc }))] })] }));
|
|
638
|
+
/**
|
|
639
|
+
* Avatar cell for the system actor: the OrgRuntimeProvider `systemActor`
|
|
640
|
+
* name/avatar when set, else the localized fallback label with initials.
|
|
641
|
+
*/
|
|
642
|
+
const identityUrl = (p) => p;
|
|
643
|
+
const SystemActorCell = ({ fallbackName, desc, getImageUrl }) => {
|
|
644
|
+
const actor = useSystemActor();
|
|
645
|
+
return (_jsx(AvatarCell, { name: actor?.name || fallbackName, desc: desc, avatarSrc: actor?.avatarUrl, getImageUrl: actor?.avatarUrl ? identityUrl : getImageUrl }));
|
|
646
|
+
};
|
|
628
647
|
/**
|
|
629
648
|
* Builds the canonical column factory used by `<DynamicTable>` when the host
|
|
630
649
|
* does not supply its own. Pass `{ getImageUrl, apiBaseUrl }` to wire avatar
|
|
@@ -657,7 +676,12 @@ export function makeDefaultGetDynamicColumns(helpers = {}) {
|
|
|
657
676
|
const apiBaseUrl = helpers.apiBaseUrl ?? '';
|
|
658
677
|
const normalizeImagePath = helpers.normalizeImagePath;
|
|
659
678
|
return function defaultGetDynamicColumns(metadata, onAction, t, currentLanguage, filterConfigs, timeZone, currency, rowActionPredicate) {
|
|
660
|
-
|
|
679
|
+
// Model key for the provenance origin resolver: last endpoint segment
|
|
680
|
+
// ("/data/findings" → "findings").
|
|
681
|
+
const model = (metadata.endpoint || '').split('?')[0].split('/').filter(Boolean).pop();
|
|
682
|
+
// currentLanguage may be a regional number locale (es-MX, en-US) when
|
|
683
|
+
// the host sets OrgRuntimeProvider numberLocales; dates key off its base.
|
|
684
|
+
const dateLocale = currentLanguage?.toLowerCase().startsWith('en') ? enUS : es;
|
|
661
685
|
const columns = [
|
|
662
686
|
{
|
|
663
687
|
id: 'select',
|
|
@@ -843,6 +867,16 @@ export function makeDefaultGetDynamicColumns(helpers = {}) {
|
|
|
843
867
|
const name = resolvedName ||
|
|
844
868
|
resolveMissingActorLabel(renderAs, col.key, namePath, t);
|
|
845
869
|
const desc = getNestedValue(row.original, col.description || '');
|
|
870
|
+
// Provenance (kernel `provenance`): a person with
|
|
871
|
+
// the agent, the agent alone, or the system /
|
|
872
|
+
// an integration with its origin.
|
|
873
|
+
if (isSystemActorColumn(renderAs, col.key, namePath) &&
|
|
874
|
+
hasSpecialAuthorship(row.original)) {
|
|
875
|
+
return _jsx(AuthorshipCell, { row: row.original, model: model });
|
|
876
|
+
}
|
|
877
|
+
if (!resolvedName && isSystemActorColumn(renderAs, col.key, namePath)) {
|
|
878
|
+
return (_jsx(SystemActorCell, { fallbackName: String(name), desc: desc ? String(desc) : undefined, getImageUrl: getImageUrl }));
|
|
879
|
+
}
|
|
846
880
|
const avatarSrc = resolveAvatarSrc(col, row.original, value, apiBaseUrl);
|
|
847
881
|
return (_jsx(AvatarCell, { name: String(name), desc: desc ? String(desc) : undefined, avatarSrc: avatarSrc, getImageUrl: getImageUrl }));
|
|
848
882
|
}
|
|
@@ -39,7 +39,7 @@ export function DynamicDateField({ field, value, onChange, invalid }) {
|
|
|
39
39
|
const [open, setOpen] = useState(false);
|
|
40
40
|
const selected = toDate(value);
|
|
41
41
|
return (_jsxs(Popover, { open: open, onOpenChange: setOpen, children: [_jsx(PopoverTrigger, { asChild: true, children: _jsxs(Button, { type: "button", variant: "outline", id: field.key, "data-empty": !selected, "aria-invalid": invalid || undefined, className: 'w-full justify-start text-start font-normal data-[empty=true]:text-muted-foreground' +
|
|
42
|
-
(invalid ? ' border-destructive ring-1 ring-destructive/30' : ''), children: [_jsx(CalendarIcon, { className: "mr-2 size-4 shrink-0 opacity-50" }), _jsx("span", { className: "truncate", children: selected ? label(selected) : (field.placeholder || '
|
|
42
|
+
(invalid ? ' border-destructive ring-1 ring-destructive/30' : ''), children: [_jsx(CalendarIcon, { className: "mr-2 size-4 shrink-0 opacity-50" }), _jsx("span", { className: "truncate", children: selected ? label(selected) : (field.placeholder || 'Elige una fecha') })] }) }), _jsx(PopoverContent, { className: "w-auto p-0", align: "start", children: _jsx(Calendar, { mode: "single", captionLayout: "dropdown", selected: selected, defaultMonth: selected, onSelect: (d) => {
|
|
43
43
|
onChange(d ? toISO(d) : '');
|
|
44
44
|
setOpen(false);
|
|
45
45
|
} }) })] }));
|
package/dist/dynamic-form.js
CHANGED
|
@@ -313,7 +313,7 @@ function FieldRenderer({ field, value, onChange, initialValues, values, effectiv
|
|
|
313
313
|
* Input de texto/número con opción de ESCANEO por cámara para "llenar rápido".
|
|
314
314
|
* Cuando el campo declara `scan` (alias `scannable`) y el navegador soporta
|
|
315
315
|
* `BarcodeDetector`, agrega un botón de cámara: el código escaneado se escribe
|
|
316
|
-
* en el input y el escáner SE QUEDA ABIERTO (continuo) por si
|
|
316
|
+
* en el input y el escáner SE QUEDA ABIERTO (continuo) por si quieres corregir o
|
|
317
317
|
* escanear otro — lo cerrás con la X. Sin el flag o sin soporte, es un Input
|
|
318
318
|
* normal (retrocompat total).
|
|
319
319
|
*/
|
|
@@ -324,7 +324,7 @@ function ScannableInput({ field, value, onChange, type, }) {
|
|
|
324
324
|
// `isCameraScanSupported()`: en un navegador sin `BarcodeDetector` el botón
|
|
325
325
|
// seguía sin verse en escritorio aunque el campo lo pidiera, y el usuario no
|
|
326
326
|
// entendía por qué el POS sí lo mostraba y el form no. El BarcodeScanner ya
|
|
327
|
-
// degrada con un mensaje ("
|
|
327
|
+
// degrada con un mensaje ("usa un lector físico / escribe a mano") cuando no
|
|
328
328
|
// hay soporte, así que mostrar el botón es seguro y consistente.
|
|
329
329
|
const scanEnabled = !!(field.scan ?? field.scannable);
|
|
330
330
|
const input = (_jsx(Input, { id: field.key, type: type, value: value ?? '', onChange: (e) => {
|
package/dist/dynamic-kanban.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
2
|
import { useCallback, useContext, useEffect, useId, useLayoutEffect, useMemo, useRef, useState, useSyncExternalStore, } from 'react';
|
|
3
3
|
import { useTranslation } from 'react-i18next';
|
|
4
|
-
import { useTimeZone, useCurrency } from './org-runtime-context';
|
|
4
|
+
import { useTimeZone, useCurrency, useNumberLocale } from './org-runtime-context';
|
|
5
5
|
import { QueryClient, QueryClientContext, QueryClientProvider, useQueryClient, } from '@tanstack/react-query';
|
|
6
6
|
import { useI18nResourceVersion } from './use-i18n-resource-version';
|
|
7
7
|
import { DndContext, KeyboardSensor, PointerSensor, closestCenter, defaultDropAnimationSideEffects, pointerWithin, rectIntersection, useSensor, useSensors, useDraggable, useDroppable, } from '@dnd-kit/core';
|
|
@@ -598,6 +598,7 @@ const CARD_FIELDS_SHOWN = 3;
|
|
|
598
598
|
const NO_MOVES = Object.freeze({});
|
|
599
599
|
function DynamicKanbanBoard({ model, endpoint, refreshTrigger, realtime: realtimeProp, onCardClick, onAction, isRowActionVisible: rowActionPredicate, pageSize = 50, lanePageSize = 25, timeZone: timeZoneProp, currency: currencyProp, defaultFilters, groupBy: groupByProp, }) {
|
|
600
600
|
const { t, i18n } = useTranslation();
|
|
601
|
+
const numberLocale = useNumberLocale(i18n.language);
|
|
601
602
|
// The org's timezone/currency: an explicit prop wins, else the app-wide
|
|
602
603
|
// OrgRuntimeProvider (without it, money fell back to USD).
|
|
603
604
|
const orgTimeZone = useTimeZone();
|
|
@@ -1531,7 +1532,7 @@ function DynamicKanbanBoard({ model, endpoint, refreshTrigger, realtime: realtim
|
|
|
1531
1532
|
? aggregateCols.map((col) => ({
|
|
1532
1533
|
key: col.key,
|
|
1533
1534
|
label: t(col.label, { defaultValue: col.label }),
|
|
1534
|
-
value: formatAggregateTotal(col, (laneSums[col.key] ?? 0) + (delta?.sums[col.key] ?? 0), currency,
|
|
1535
|
+
value: formatAggregateTotal(col, (laneSums[col.key] ?? 0) + (delta?.sums[col.key] ?? 0), currency, numberLocale),
|
|
1535
1536
|
}))
|
|
1536
1537
|
: [];
|
|
1537
1538
|
// Nothing left to fetch once every card the server counts is loaded
|
|
@@ -1570,7 +1571,7 @@ function DynamicKanbanBoard({ model, endpoint, refreshTrigger, realtime: realtim
|
|
|
1570
1571
|
extraFilters,
|
|
1571
1572
|
configurable: isConfigurable(stage),
|
|
1572
1573
|
onConfigure: () => openConfigStage(stage),
|
|
1573
|
-
children: loadingData && cards.length === 0 ? (_jsxs(_Fragment, { children: [_jsx(Skeleton, { className: "h-20 w-full" }), _jsx(Skeleton, { className: "h-20 w-full" })] })) : cards.length === 0 ? (_jsx("p", { className: "px-1 py-6 text-center text-xs text-muted-foreground", children: t('kanban.emptyLane', { defaultValue: 'Sin tarjetas' }) })) : (cards.map((card) => (_jsx(KanbanCard, { card: card, titleCol: titleCol, fieldCols: fieldCols, showAllFields: explicitCard, actions: rowActions, stageField: lifecycleStageField(metadata), rowActionPredicate: rowActionPredicate, locale:
|
|
1574
|
+
children: loadingData && cards.length === 0 ? (_jsxs(_Fragment, { children: [_jsx(Skeleton, { className: "h-20 w-full" }), _jsx(Skeleton, { className: "h-20 w-full" })] })) : cards.length === 0 ? (_jsx("p", { className: "px-1 py-6 text-center text-xs text-muted-foreground", children: t('kanban.emptyLane', { defaultValue: 'Sin tarjetas' }) })) : (cards.map((card) => (_jsx(KanbanCard, { card: card, titleCol: titleCol, fieldCols: fieldCols, showAllFields: explicitCard, actions: rowActions, stageField: lifecycleStageField(metadata), rowActionPredicate: rowActionPredicate, locale: numberLocale, timeZone: timeZone, currency: currency, onClick: onCardClick, onAction: handleInternalAction, pending: card.id != null && String(card.id) in moveOverrides }, String(card.id))))),
|
|
1574
1575
|
};
|
|
1575
1576
|
};
|
|
1576
1577
|
// Props for one smart (virtual) lane — a read-only, filter-defined column.
|
|
@@ -1584,7 +1585,7 @@ function DynamicKanbanBoard({ model, endpoint, refreshTrigger, realtime: realtim
|
|
|
1584
1585
|
refreshTrigger,
|
|
1585
1586
|
onEdit: openEditStage,
|
|
1586
1587
|
onDelete: openDeleteStage,
|
|
1587
|
-
renderCard: (card) => (_jsx(KanbanCard, { card: card, titleCol: titleCol, fieldCols: fieldCols, showAllFields: explicitCard, actions: rowActions, stageField: lifecycleStageField(metadata), rowActionPredicate: rowActionPredicate, locale:
|
|
1588
|
+
renderCard: (card) => (_jsx(KanbanCard, { card: card, titleCol: titleCol, fieldCols: fieldCols, showAllFields: explicitCard, actions: rowActions, stageField: lifecycleStageField(metadata), rowActionPredicate: rowActionPredicate, locale: numberLocale, timeZone: timeZone, currency: currency, onClick: onCardClick, onAction: handleInternalAction, draggable: false })),
|
|
1588
1589
|
});
|
|
1589
1590
|
const showResetOrder = laneReorderEnabled && (stageLayout.hasCustomLayout || !!laneOrderOverride);
|
|
1590
1591
|
return (_jsxs("div", { className: "flex flex-col gap-3", children: [_jsxs("div", { className: "flex flex-wrap items-center gap-2", "data-testid": "kanban-filters", children: [_jsxs("div", { className: "relative", children: [_jsx(Search, { className: "pointer-events-none absolute left-2.5 top-1/2 h-3.5 w-3.5 -translate-y-1/2 text-muted-foreground" }), _jsx(Input, { value: globalFilter, onChange: (e) => setGlobalFilter(e.target.value), placeholder: t('kanban.searchPlaceholder', { defaultValue: 'Buscar...' }), className: "h-8 w-52 pl-8 text-sm" })] }), filterFields.length > 0 && (_jsxs(Sheet, { open: filtersOpen, onOpenChange: setFiltersOpen, children: [_jsx(SheetTrigger, { asChild: true, children: _jsxs(Button, { variant: "outline", size: "sm", className: "h-8 gap-1.5", children: [_jsx(ListFilter, { className: "h-3.5 w-3.5" }), t('kanban.filters', { defaultValue: 'Filtros' }), activeFilterCount > 0 && (_jsx(Badge, { variant: "secondary", className: "ml-0.5 h-4 min-w-4 justify-center rounded-full px-1 text-[10px] tabular-nums", children: activeFilterCount }))] }) }), _jsxs(SheetContent, { side: "right", className: "flex w-80 flex-col gap-0 p-0 sm:max-w-sm", children: [_jsx(SheetHeader, { className: "space-y-0 border-b px-4 py-3", children: _jsx(SheetTitle, { className: "text-sm", children: t('kanban.filters', { defaultValue: 'Filtros' }) }) }), _jsxs("div", { className: "flex flex-1 flex-col gap-1 overflow-y-auto px-4 py-3", children: [activeFields.length > 0 && (_jsxs(_Fragment, { children: [_jsx("p", { className: "px-0.5 pb-1 text-[11px] font-medium uppercase tracking-wide text-muted-foreground", children: t('kanban.activeFilters', {
|
|
@@ -1607,7 +1608,7 @@ function DynamicKanbanBoard({ model, endpoint, refreshTrigger, realtime: realtim
|
|
|
1607
1608
|
// drop itself is refused in onDragEnd.
|
|
1608
1609
|
droppableDisabled: false, laneProps: buildLaneProps(lane.stage) }, lane.stage.key)) : laneReorderEnabled ? (_jsx(SortableSmartLane, { droppableDisabled: !!activeId, smartProps: buildSmartProps(lane.stage) }, `smart-${lane.stage.key}`)) : (_jsx(SmartLane, { ...buildSmartProps(lane.stage) }, `smart-${lane.stage.key}`))), unassignedStage && (_jsx(DroppableStageLane, {
|
|
1609
1610
|
// "Sin etapa" is not a value a card can be given.
|
|
1610
|
-
droppableDisabled: !!activeId, laneProps: buildLaneProps(unassignedStage) }, UNASSIGNED_LANE)), customStages.available && (_jsx(AddStageColumn, { onClick: openCreateStage }))] }) }), _jsx(PortalDragOverlay, { dropAnimation: DROP_ANIMATION, zIndex: 60, children: activeCard ? (_jsx(CardPreview, { card: activeCard, titleCol: titleCol, fieldCols: fieldCols, showAllFields: explicitCard, locale:
|
|
1611
|
+
droppableDisabled: !!activeId, laneProps: buildLaneProps(unassignedStage) }, UNASSIGNED_LANE)), customStages.available && (_jsx(AddStageColumn, { onClick: openCreateStage }))] }) }), _jsx(PortalDragOverlay, { dropAnimation: DROP_ANIMATION, zIndex: 60, children: activeCard ? (_jsx(CardPreview, { card: activeCard, titleCol: titleCol, fieldCols: fieldCols, showAllFields: explicitCard, locale: numberLocale, timeZone: timeZone, currency: currency, blocked: overBlocked })) : null }), rowActionDialogs] }), customStages.available && (_jsxs(_Fragment, { children: [_jsx(CustomStageDialog, { open: stageDialogOpen, onOpenChange: setStageDialogOpen, model: model, columns: metadata?.columns ?? [], initial: editingStage, nextPosition: nextStagePosition, onCreate: customStages.create, onUpdate: customStages.update }), _jsx(CustomStageDeleteDialog, { open: !!deletingStage, onOpenChange: (o) => {
|
|
1611
1612
|
if (!o)
|
|
1612
1613
|
setDeletingStage(null);
|
|
1613
1614
|
}, stage: deletingStage, reassignTargets: stages.map((s) => ({
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dynamic-table.d.ts","sourceRoot":"","sources":["../src/dynamic-table.tsx"],"names":[],"mappings":"AAYA,OAAO,EAAsE,KAAK,SAAS,EAAE,MAAM,OAAO,CAAA;AAM1G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