@asteby/metacore-runtime-react 30.0.3 → 30.0.5

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 CHANGED
@@ -1,5 +1,20 @@
1
1
  # @asteby/metacore-runtime-react
2
2
 
3
+ ## 30.0.5
4
+
5
+ ### Patch Changes
6
+
7
+ - 9604dc4: fix(runtime): OptionThumb cae a iniciales si el avatar 404 (no caja invisible)
8
+ - Updated dependencies [a0c3e39]
9
+ - @asteby/metacore-ui@2.14.3
10
+
11
+ ## 30.0.4
12
+
13
+ ### Patch Changes
14
+
15
+ - 1cd72ee: fix(types): ActionDefinition.steps para que el build de release compile
16
+ - 11d12ae: DynamicSelectField: `staticOptions`, `descriptionAsBadge` y `hideCreate` para reutilizar el mismo picker en modales federados (despacho / taller) con listas filtradas en cliente.
17
+
3
18
  ## 30.0.3
4
19
 
5
20
  ### Patch Changes
@@ -1 +1 @@
1
- {"version":3,"file":"action-modal-dispatcher.d.ts","sourceRoot":"","sources":["../src/action-modal-dispatcher.tsx"],"names":[],"mappings":"AA0DA,OAAO,EACH,KAAK,cAAc,EACnB,KAAK,gBAAgB,EAExB,MAAM,sBAAsB,CAAA;AAE7B,YAAY,EAAE,cAAc,EAAE,gBAAgB,EAAE,CAAA;AA0FhD,wBAAgB,qBAAqB,CAAC,EAClC,IAAI,EACJ,YAAY,EACZ,MAAM,EACN,KAAK,EACL,MAAM,EACN,QAAQ,EACR,SAAS,GACZ,EAAE,gBAAgB,sCA+DlB"}
1
+ {"version":3,"file":"action-modal-dispatcher.d.ts","sourceRoot":"","sources":["../src/action-modal-dispatcher.tsx"],"names":[],"mappings":"AA4DA,OAAO,EACH,KAAK,cAAc,EACnB,KAAK,gBAAgB,EAExB,MAAM,sBAAsB,CAAA;AAE7B,YAAY,EAAE,cAAc,EAAE,gBAAgB,EAAE,CAAA;AA0FhD,wBAAgB,qBAAqB,CAAC,EAClC,IAAI,EACJ,YAAY,EACZ,MAAM,EACN,KAAK,EACL,MAAM,EACN,QAAQ,EACR,SAAS,GACZ,EAAE,gBAAgB,sCAoElB"}
@@ -1,9 +1,11 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  // ActionModalDispatcher — renders the right modal for a custom action:
3
3
  // 1) Custom component from the SDK registry → use it
4
- // 2) action.fields[] → GenericActionModal (form)
5
- // 3) action.confirm → ConfirmActionDialog
6
- // 4) otherwise nothing (caller executes immediately)
4
+ // 2) action.fields[] / action.steps[] → GenericActionModal / WizardActionModal
5
+ // 3) action.confirm OR action.confirmMessage → ConfirmActionDialog
6
+ // 4) action.executable (host opened the modal; federated UI missing)
7
+ // ConfirmActionDialog so a click never silently no-ops
8
+ // 5) otherwise → null (caller should execute immediately without opening us)
7
9
  //
8
10
  // The host injects its axios-like client via <ApiProvider>; we no longer
9
11
  // depend on a bundler alias to `@/lib/api`.
@@ -96,7 +98,12 @@ export function ActionModalDispatcher({ open, onOpenChange, action, model, recor
96
98
  if (action.fields && action.fields.length > 0) {
97
99
  return (_jsx(GenericActionModal, { open: open, onOpenChange: onOpenChange, action: action, model: model, record: record, endpoint: endpoint, onSuccess: onSuccess }));
98
100
  }
99
- if (action.confirm) {
101
+ // confirm_message alone is confirmation intent (v3 manifests often omit the
102
+ // boolean). Hosts also mark every wasm action `executable` and open THIS
103
+ // dispatcher; without a confirm/fields/custom UI we used to return null and
104
+ // the row click did nothing. Treat message-only + executable-open as confirm.
105
+ const wantsConfirm = !!(action.confirm || action.confirmMessage);
106
+ if (wantsConfirm || (open && action.executable)) {
100
107
  return (_jsx(ConfirmActionDialog, { open: open, onOpenChange: onOpenChange, action: action, model: model, record: record, endpoint: endpoint, onSuccess: onSuccess }));
101
108
  }
102
109
  return null;
@@ -1 +1 @@
1
- {"version":3,"file":"dynamic-row-actions.d.ts","sourceRoot":"","sources":["../src/dynamic-row-actions.tsx"],"names":[],"mappings":"AAoCA,OAAO,KAAK,EAAE,aAAa,EAAk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AAM,EAAE,GAAG,EAAE,GAAG,KAAK,IAAI,CAAA;IAC7C,4EAA4E;IAC5E,SAAS,EAAE,MAAM,IAAI,CAAA;CACxB;AAED,MAAM,WAAW,iBAAiB;IAC9B,+CAA+C;IAC/C,oBAAoB,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,GAAG,EAAE,GAAG,KAAK,OAAO,CAAC,IAAI,CAAC,CAAA;IACjE;;;OAGG;IACH,OAAO,EAAE,KAAK,CAAC,YAAY,CAAA;CAC9B;AAED;;;GAGG;AACH,wBAAgB,oBAAoB,CAAC,EACjC,KAAK,EACL,QAAQ,EACR,gBAAgB,EAChB,QAAQ,EACR,QAAQ,EACR,SAAS,GACZ,EAAE,0BAA0B,GAAG,iBAAiB,CA2HhD"}
@@ -58,7 +58,11 @@ export function useDynamicRowActions({ model, endpoint, mutationEndpoint, metada
58
58
  return;
59
59
  }
60
60
  const actionDef = metadata?.actions?.find((a) => a.key === action);
61
- if (actionDef && (actionDef.fields?.length || actionDef.confirm || actionDef.executable)) {
61
+ // Open the dispatcher when there is ANY UI surface (fields, wizard
62
+ // steps, confirm bool, confirmMessage, or host `executable`). A
63
+ // confirm_message without confirm:true used to fall through / open and
64
+ // then render null — derive confirm so the ConfirmActionDialog path wins.
65
+ if (actionDef && (actionDef.fields?.length || actionDef.steps?.length || actionDef.confirm || actionDef.confirmMessage || actionDef.executable)) {
62
66
  setActionModal({
63
67
  open: true,
64
68
  action: {
@@ -66,9 +70,10 @@ export function useDynamicRowActions({ model, endpoint, mutationEndpoint, metada
66
70
  label: actionDef.label,
67
71
  icon: actionDef.icon || 'Zap',
68
72
  color: actionDef.color,
69
- confirm: actionDef.confirm,
73
+ confirm: !!(actionDef.confirm || actionDef.confirmMessage),
70
74
  confirmMessage: actionDef.confirmMessage,
71
75
  fields: actionDef.fields,
76
+ steps: actionDef.steps,
72
77
  requiresState: actionDef.requiresState,
73
78
  executable: actionDef.executable,
74
79
  },
@@ -58,7 +58,25 @@ export interface DynamicSelectFieldProps {
58
58
  * on open) so the label resolves to the NAME instead of showing the raw id.
59
59
  */
60
60
  readonly?: boolean;
61
+ /**
62
+ * Caller-owned options (e.g. warehouses filtered by available stock for a
63
+ * dispatch line). When set, skips `/options` and filters these client-side
64
+ * by the search box. Federated process modals use this so they share the
65
+ * same DynamicSelect chrome without reinventing a lighter picker.
66
+ */
67
+ staticOptions?: readonly ResolvedOption[] | null;
68
+ /**
69
+ * Render `option.description` as a trailing Badge (stock, codes, …) instead
70
+ * of the default muted subtitle under the label.
71
+ */
72
+ descriptionAsBadge?: boolean;
73
+ /**
74
+ * Hide the inline "+" create affordance even when `field.ref` is set.
75
+ * Useful for static / filtered lists where creating a new record is not
76
+ * meaningful in context.
77
+ */
78
+ hideCreate?: boolean;
61
79
  }
62
- export declare function DynamicSelectField({ field, value, onChange, seedOption, dependsValue, dependsHint, readonly, }: DynamicSelectFieldProps): import("react").JSX.Element;
80
+ export declare function DynamicSelectField({ field, value, onChange, seedOption, dependsValue, dependsHint, readonly, staticOptions, descriptionAsBadge, hideCreate, }: DynamicSelectFieldProps): import("react").JSX.Element;
63
81
  export default DynamicSelectField;
64
82
  //# sourceMappingURL=dynamic-select-field.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"dynamic-select-field.d.ts","sourceRoot":"","sources":["../src/dynamic-select-field.tsx"],"names":[],"mappings":"AAyCA,OAAO,EAAsB,KAAK,cAAc,EAAE,MAAM,wBAAwB,CAAA;AAEhF,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,SAAS,CAAA;AAE7C;;;;GAIG;AACH,eAAO,MAAM,oBAAoB,gDAAgD,CAAA;AAEjF;;;;;;;;GAQG;AACH,wBAAgB,WAAW,CAAC,EACxB,KAAK,EACL,IAAI,EACJ,IAAS,GACZ,EAAE;IACC,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IACrB,IAAI,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IACpB,IAAI,CAAC,EAAE,MAAM,C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,IAAI,CAAA;IACpB,IAAI,CAAC,EAAE,MAAM,CAAA;CAChB,+BA4BA;AAED;;;;GAIG;AACH,wBAAgB,UAAU,CAAC,EACvB,MAAM,EACN,IAAS,GACZ,EAAE;IACC,MAAM,CAAC,EAAE,IAAI,CAAC,cAAc,EAAE,OAAO,GAAG,OAAO,GAAG,MAAM,GAAG,OAAO,CAAC,GAAG,IAAI,CAAA;IAC1E,IAAI,CAAC,EAAE,MAAM,CAAA;CAChB,sCA4BA;AAWD,MAAM,WAAW,uBAAuB;IACpC,KAAK,EAAE,cAAc,CAAA;IACrB,KAAK,EAAE,GAAG,CAAA;IACV,QAAQ,EAAE,CAAC,CAAC,EAAE,GAAG,KAAK,IAAI,CAAA;IAC1B;;;;;OAKG;IACH,UAAU,CAAC,EAAE,cAAc,GAAG,IAAI,CAAA;IAClC;;;;;;OAMG;IACH,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,6EAA6E;IAC7E,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB;;;;;;OAMG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB;;;;;OAKG;IACH,aAAa,CAAC,EAAE,SAAS,cAAc,EAAE,GAAG,IAAI,CAAA;IAChD;;;OAGG;IACH,kBAAkB,CAAC,EAAE,OAAO,CAAA;IAC5B;;;;OAIG;IACH,UAAU,CAAC,EAAE,OAAO,CAAA;CACvB;AAED,wBAAgB,kBAAkB,CAAC,EAC/B,KAAK,EACL,KAAK,EACL,QAAQ,EACR,UAAU,EACV,YAAY,EACZ,WAAW,EACX,QAAgB,EAChB,aAAoB,EACpB,kBAA0B,EAC1B,UAAkB,GACrB,EAAE,uBAAuB,+BA8SzB;AAED,eAAe,kBAAkB,CAAA"}
@@ -23,7 +23,7 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
23
23
  // value). A dedicated `?ids=` lookup is a follow-up; create flows — the common
24
24
  // case — start empty and never hit this.
25
25
  import { useEffect, useRef, useState } from 'react';
26
- import { Button, Command, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, Popover, PopoverContent, PopoverTrigger, InitialsAvatar, } from '@asteby/metacore-ui/primitives';
26
+ import { Badge, Button, Command, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, Popover, PopoverContent, PopoverTrigger, InitialsAvatar, } from '@asteby/metacore-ui/primitives';
27
27
  import { Check, ChevronsUpDown, Loader2, Plus, ScanLine } from 'lucide-react';
28
28
  import { resolveColorCss } from '@asteby/metacore-ui/lib';
29
29
  import { BarcodeScanner } from './barcode-scanner';
@@ -46,8 +46,11 @@ export const DEFAULT_DEPENDS_HINT = 'Selecciona primero el campo del que depende
46
46
  * federated addon don't always survive the host's class scan.
47
47
  */
48
48
  export function OptionThumb({ image, name, size = 20, }) {
49
+ const [broken, setBroken] = useState(false);
49
50
  const box = { width: size, height: size };
50
- if (!image) {
51
+ // Missing or 404 image (bare avatar filenames often 404) → initials, never
52
+ // an invisible box that looks like "no avatar".
53
+ if (!image || broken) {
51
54
  return _jsx(InitialsAvatar, { name: name, size: size, rounded: "sm", tone: "neutral" });
52
55
  }
53
56
  // A lucide icon name stored where an image url/path is expected (the `icon`
@@ -55,12 +58,7 @@ export function OptionThumb({ image, name, size = 20, }) {
55
58
  if (isLucideIconName(image)) {
56
59
  return (_jsx("span", { className: "flex shrink-0 items-center justify-center rounded-sm bg-muted", style: box, "aria-hidden": true, children: _jsx(DynamicIcon, { name: image, className: "size-4" }) }));
57
60
  }
58
- return (_jsx("img", { src: image, alt: "", "aria-hidden": true, loading: "lazy", className: "shrink-0 rounded-sm object-cover", style: box,
59
- // A broken image url shouldn't leave a torn-icon glyph; collapse to
60
- // the neutral placeholder background instead.
61
- onError: (e) => {
62
- e.currentTarget.style.visibility = 'hidden';
63
- } }));
61
+ return (_jsx("img", { src: image, alt: "", "aria-hidden": true, loading: "lazy", className: "shrink-0 rounded-sm object-cover", style: box, onError: () => setBroken(true) }));
64
62
  }
65
63
  /**
66
64
  * Leading visual for an option: a photo thumbnail (FK relations with an image),
@@ -93,7 +91,7 @@ function useDebounced(value, ms) {
93
91
  }, [value, ms]);
94
92
  return debounced;
95
93
  }
96
- export function DynamicSelectField({ field, value, onChange, seedOption, dependsValue, dependsHint, readonly = false, }) {
94
+ export function DynamicSelectField({ field, value, onChange, seedOption, dependsValue, dependsHint, readonly = false, staticOptions = null, descriptionAsBadge = false, hideCreate = false, }) {
97
95
  const [open, setOpen] = useState(false);
98
96
  const [search, setSearch] = useState('');
99
97
  const [scanOpen, setScanOpen] = useState(false);
@@ -125,7 +123,8 @@ export function DynamicSelectField({ field, value, onChange, seedOption, depends
125
123
  const dependsOn = getDependsOn(field);
126
124
  const scope = dependsValue ? String(dependsValue) : '';
127
125
  const blockedByDependency = !!dependsOn && scope === '';
128
- const { options, loading } = useOptionsResolver({
126
+ const useStatic = Array.isArray(staticOptions);
127
+ const { options: fetchedOptions, loading: fetchLoading } = useOptionsResolver({
129
128
  modelKey: '',
130
129
  fieldKey: source.fieldKey,
131
130
  ref: source.ref,
@@ -142,8 +141,19 @@ export function DynamicSelectField({ field, value, onChange, seedOption, depends
142
141
  // changes while open). A picker blocked by an unset dependency never
143
142
  // fetches. A readonly cell fetches eagerly so its value's label resolves
144
143
  // to the name without the user ever opening it.
145
- enabled: (open || readonly) && !blockedByDependency,
144
+ // Static lists never hit the network.
145
+ enabled: !useStatic && (open || readonly) && !blockedByDependency,
146
146
  });
147
+ const options = useStatic
148
+ ? staticOptions.filter((o) => {
149
+ if (!debounced)
150
+ return true;
151
+ const q = debounced.toLowerCase();
152
+ return (String(o.label ?? '').toLowerCase().includes(q) ||
153
+ String(o.description ?? '').toLowerCase().includes(q));
154
+ })
155
+ : fetchedOptions;
156
+ const loading = useStatic ? false : fetchLoading;
147
157
  // When the depended-on value changes, the previously-picked option no longer
148
158
  // belongs to the new scope, so clear the selection (skip the initial mount).
149
159
  const prevScopeRef = useRef(scope);
@@ -209,12 +219,18 @@ export function DynamicSelectField({ field, value, onChange, seedOption, depends
209
219
  return (_jsxs("div", { className: "flex w-full min-w-0 items-center gap-1.5", children: [_jsxs(Popover, { open: open && !blockedByDependency, onOpenChange: (o) => { if (!blockedByDependency)
210
220
  setOpen(o); }, children: [_jsx(PopoverTrigger, { asChild: true, children: _jsxs(Button, { type: "button", variant: "outline", role: "combobox", "aria-expanded": open, id: field.key, disabled: blockedByDependency, className: "min-w-0 flex-1 justify-between font-normal", "data-empty": !value, "data-depends-blocked": blockedByDependency ? '' : undefined, children: [_jsxs("span", { className: "flex min-w-0 flex-1 items-center gap-2 text-left", children: [value && selectedOption ? (_jsx(OptionLead, { option: selectedOption, size: 20 })) : null, _jsx("span", { className: 'min-w-0 flex-1 truncate ' + (selectedLabel ? '' : 'text-muted-foreground'), children: blockedByDependency
211
221
  ? (dependsHint || DEFAULT_DEPENDS_HINT)
212
- : selectedLabel || field.placeholder || 'Buscar…' })] }), _jsx(ChevronsUpDown, { className: "ml-2 size-4 shrink-0 opacity-50" })] }) }), _jsx(PopoverContent, { className: "p-0", align: "start",
222
+ : selectedLabel || field.placeholder || 'Buscar…' }), descriptionAsBadge && selectedOption?.description ? (_jsx(Badge, { variant: "secondary", className: "shrink-0 font-normal tabular-nums", children: selectedOption.description })) : null] }), _jsx(ChevronsUpDown, { className: "ml-2 size-4 shrink-0 opacity-50" })] }) }), _jsx(PopoverContent, { className: "p-0", align: "start",
213
223
  // Match the trigger width without an arbitrary Tailwind class
214
224
  // (those don't always survive a consuming app's Tailwind scan).
215
- style: { width: 'var(--radix-popover-trigger-width)' }, children: _jsxs(Command, { shouldFilter: false, children: [_jsx(CommandInput, { placeholder: field.placeholder || 'Buscar…', value: search, onValueChange: setSearch }), _jsxs(CommandList, { children: [loading && (_jsxs("div", { className: "text-muted-foreground flex items-center justify-center gap-2 py-6 text-sm", children: [_jsx(Loader2, { className: "size-4 animate-spin" }), "Buscando\u2026"] })), !loading && options.length === 0 && (_jsx(CommandEmpty, { children: debounced ? 'Sin resultados' : 'Escribí para buscar…' })), !loading && options.length > 0 && (_jsx(CommandGroup, { className: "max-h-64 overflow-auto", children: options.map((opt) => {
225
+ style: { width: 'var(--radix-popover-trigger-width)' }, children: _jsxs(Command, { shouldFilter: false, children: [_jsx(CommandInput, { placeholder: field.placeholder || 'Buscar…', value: search, onValueChange: setSearch }), _jsxs(CommandList, { children: [loading && (_jsxs("div", { className: "text-muted-foreground flex items-center justify-center gap-2 py-6 text-sm", children: [_jsx(Loader2, { className: "size-4 animate-spin" }), "Buscando\u2026"] })), !loading && options.length === 0 && (_jsx(CommandEmpty, { children: useStatic
226
+ ? debounced
227
+ ? 'Sin resultados'
228
+ : 'Sin opciones'
229
+ : debounced
230
+ ? 'Sin resultados'
231
+ : 'Escribí para buscar…' })), !loading && options.length > 0 && (_jsx(CommandGroup, { className: "max-h-64 overflow-auto", children: options.map((opt) => {
216
232
  const isSel = String(opt.id) === String(value);
217
- return (_jsxs(CommandItem, { value: String(opt.id), onSelect: () => handlePick(opt), children: [_jsx(Check, { className: 'mr-2 size-4 shrink-0 ' + (isSel ? 'opacity-100' : 'opacity-0') }), _jsx(OptionLead, { option: opt, size: 24 }), _jsxs("div", { className: "ml-2 flex min-w-0 flex-col", children: [_jsx("span", { className: "truncate", children: opt.label }), opt.description && (_jsx("span", { className: "text-muted-foreground truncate text-xs", children: opt.description }))] })] }, String(opt.id)));
218
- }) }))] })] }) })] }), scanEnabled && (_jsx(Button, { type: "button", variant: "outline", size: "icon", className: "size-9 shrink-0", onClick: () => setScanOpen(true), title: "Escanear con la c\u00E1mara", "aria-label": "Escanear c\u00F3digo de barras con la c\u00E1mara", children: _jsx(ScanLine, { className: "size-4" }) })), fieldRef && (_jsx(Button, { type: "button", variant: "outline", size: "icon", className: "size-9 shrink-0", onClick: openCreate, title: `Crear ${field.label ?? fieldRef}`, "aria-label": `Crear ${field.label ?? fieldRef}`, children: _jsx(Plus, { className: "size-4" }) })), scanEnabled && (_jsx(BarcodeScanner, { open: scanOpen, onClose: () => setScanOpen(false), onDetected: handleScanDetected, continuous: false, position: "fixed", title: `Escanear ${field.label ?? ''}`.trim() }))] }));
233
+ return (_jsxs(CommandItem, { value: String(opt.id), onSelect: () => handlePick(opt), children: [_jsx(Check, { className: 'mr-2 size-4 shrink-0 ' + (isSel ? 'opacity-100' : 'opacity-0') }), _jsx(OptionLead, { option: opt, size: 24 }), descriptionAsBadge ? (_jsxs("div", { className: "ml-2 flex min-w-0 flex-1 items-center gap-2", children: [_jsx("span", { className: "min-w-0 flex-1 truncate", children: opt.label }), opt.description ? (_jsx(Badge, { variant: "secondary", className: "shrink-0 font-normal tabular-nums", children: opt.description })) : null] })) : (_jsxs("div", { className: "ml-2 flex min-w-0 flex-col", children: [_jsx("span", { className: "truncate", children: opt.label }), opt.description && (_jsx("span", { className: "text-muted-foreground truncate text-xs", children: opt.description }))] }))] }, String(opt.id)));
234
+ }) }))] })] }) })] }), scanEnabled && (_jsx(Button, { type: "button", variant: "outline", size: "icon", className: "size-9 shrink-0", onClick: () => setScanOpen(true), title: "Escanear con la c\u00E1mara", "aria-label": "Escanear c\u00F3digo de barras con la c\u00E1mara", children: _jsx(ScanLine, { className: "size-4" }) })), fieldRef && !hideCreate && !useStatic && (_jsx(Button, { type: "button", variant: "outline", size: "icon", className: "size-9 shrink-0", onClick: openCreate, title: `Crear ${field.label ?? fieldRef}`, "aria-label": `Crear ${field.label ?? fieldRef}`, children: _jsx(Plus, { className: "size-4" }) })), scanEnabled && (_jsx(BarcodeScanner, { open: scanOpen, onClose: () => setScanOpen(false), onDetected: handleScanDetected, continuous: false, position: "fixed", title: `Escanear ${field.label ?? ''}`.trim() }))] }));
219
235
  }
220
236
  export default DynamicSelectField;
package/dist/types.d.ts CHANGED
@@ -594,6 +594,8 @@ export interface ActionDefinition {
594
594
  confirm?: boolean;
595
595
  confirmMessage?: string;
596
596
  fields?: ActionFieldDef[];
597
+ /** Multi-step wizard form; when present the dispatcher renders a wizard. */
598
+ steps?: ActionStep[];
597
599
  requiresState?: string[];
598
600
  executable?: bo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B,OAAO,EAAE,OAAO,CAAA;IAChB,IAAI,EAAE,CAAC,CAAA;IACP,IAAI,CAAC,EAAE,cAAc,CAAA;IACrB,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAA;IAC7B,OAAO,CAAC,EAAE,MAAM,CAAA;CACnB;AAED,MAAM,WAAW,cAAc;IAC3B,YAAY,EAAE,MAAM,CAAA;IACpB,IAAI,EAAE,MAAM,CAAA;IACZ,SAAS,EAAE,MAAM,CAAA;IACjB,QAAQ,EAAE,MAAM,CAAA;IAChB,EAAE,EAAE,MAAM,CAAA;IACV,KAAK,EAAE,MAAM,CAAA;CAChB;AAKD,8EAA8E;AAC9E,MAAM,WAAW,UAAU;IACvB,KAAK,EAAE,MAAM,CAAA;IACb,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,MAAM,EAAE,cAAc,EAAE,CAAA;CAC3B;AAED,MAAM,WAAW,cAAc;IAC3B,GAAG,EAAE,MAAM,CAAA;IACX,KAAK,EAAE,MAAM,CAAA;IACb,IAAI,EAAE,MAAM,CAAA;IACZ,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,cAAc,CAAC,EAAE,MAAM,CAAA;IACvB,MAAM,CAAC,EAAE,cAAc,EAAE,CAAA;IACzB,4EAA4E;IAC5E,KAAK,CAAC,EAAE,UAAU,EAAE,CAAA;IACpB,aAAa,CAAC,EAAE,MAAM,EAAE,CAAA;IACxB,UAAU,CAAC,EAAE,OAAO,CAAA;IACpB,SAAS,CAAC,EAAE,KAAK,GAAG,OAAO,GAAG,QAAQ,CAAA;CACzC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@asteby/metacore-runtime-react",
3
- "version": "30.0.3",
3
+ "version": "30.0.5",
4
4
  "description": "React runtime for metacore hosts — renders addon contributions dynamically",
5
5
  "repository": {
6
6
  "type": "git",
@@ -37,8 +37,8 @@
37
37
  "react-i18next": ">=13",
38
38
  "sonner": ">=1.7",
39
39
  "zustand": ">=5",
40
- "@asteby/metacore-ui": "^2.14.1",
41
- "@asteby/metacore-sdk": "^3.4.0"
40
+ "@asteby/metacore-sdk": "^3.4.0",
41
+ "@asteby/metacore-ui": "^2.14.3"
42
42
  },
43
43
  "peerDependenciesMeta": {
44
44
  "@tanstack/react-router": {
@@ -68,7 +68,7 @@
68
68
  "vitest": "^4.0.0",
69
69
  "zustand": "^5.0.0",
70
70
  "@asteby/metacore-sdk": "3.4.0",
71
- "@asteby/metacore-ui": "2.14.1"
71
+ "@asteby/metacore-ui": "2.14.3"
72
72
  },
73
73
  "scripts": {
74
74
  "build": "tsc -p tsconfig.json",
@@ -1,8 +1,10 @@
1
1
  // ActionModalDispatcher — renders the right modal for a custom action:
2
2
  // 1) Custom component from the SDK registry → use it
3
- // 2) action.fields[] → GenericActionModal (form)
4
- // 3) action.confirm → ConfirmActionDialog
5
- // 4) otherwise nothing (caller executes immediately)
3
+ // 2) action.fields[] / action.steps[] → GenericActionModal / WizardActionModal
4
+ // 3) action.confirm OR action.confirmMessage → ConfirmActionDialog
5
+ // 4) action.executable (host opened the modal; federated UI missing)
6
+ // ConfirmActionDialog so a click never silently no-ops
7
+ // 5) otherwise → null (caller should execute immediately without opening us)
6
8
  //
7
9
  // The host injects its axios-like client via <ApiProvider>; we no longer
8
10
  // depend on a bundler alias to `@/lib/api`.
@@ -208,7 +210,12 @@ export function ActionModalDispatcher({
208
210
  )
209
211
  }
210
212
 
211
- if (action.confirm) {
213
+ // confirm_message alone is confirmation intent (v3 manifests often omit the
214
+ // boolean). Hosts also mark every wasm action `executable` and open THIS
215
+ // dispatcher; without a confirm/fields/custom UI we used to return null and
216
+ // the row click did nothing. Treat message-only + executable-open as confirm.
217
+ const wantsConfirm = !!(action.confirm || action.confirmMessage)
218
+ if (wantsConfirm || (open && action.executable)) {
212
219
  return (
213
220
  <ConfirmActionDialog
214
221
  open={open}
@@ -120,7 +120,11 @@ export function useDynamicRowActions({
120
120
  return
121
121
  }
122
122
  const actionDef = metadata?.actions?.find((a) => a.key === action)
123
- if (actionDef && (actionDef.fields?.length || actionDef.confirm || actionDef.executable)) {
123
+ // Open the dispatcher when there is ANY UI surface (fields, wizard
124
+ // steps, confirm bool, confirmMessage, or host `executable`). A
125
+ // confirm_message without confirm:true used to fall through / open and
126
+ // then render null — derive confirm so the ConfirmActionDialog path wins.
127
+ if (actionDef && (actionDef.fields?.length || actionDef.steps?.length || actionDef.confirm || actionDef.confirmMessage || actionDef.executable)) {
124
128
  setActionModal({
125
129
  open: true,
126
130
  action: {
@@ -128,9 +132,10 @@ export function useDynamicRowActions({
128
132
  label: actionDef.label,
129
133
  icon: actionDef.icon || 'Zap',
130
134
  color: actionDef.color,
131
- confirm: actionDef.confirm,
135
+ confirm: !!(actionDef.confirm || actionDef.confirmMessage),
132
136
  confirmMessage: actionDef.confirmMessage,
133
137
  fields: actionDef.fields,
138
+ steps: actionDef.steps,
134
139
  requiresState: actionDef.requiresState,
135
140
  executable: actionDef.executable,
136
141
  },
@@ -23,6 +23,7 @@
23
23
  // case — start empty and never hit this.
24
24
  import { useEffect, useRef, useState } from 'react'
25
25
  import {
26
+ Badge,
26
27
  Button,
27
28
  Command,
28
29
  CommandEmpty,
@@ -68,8 +69,11 @@ export function OptionThumb({
68
69
  name?: string | null
69
70
  size?: number
70
71
  }) {
72
+ const [broken, setBroken] = useState(false)
71
73
  const box = { width: size, height: size }
72
- if (!image) {
74
+ // Missing or 404 image (bare avatar filenames often 404) → initials, never
75
+ // an invisible box that looks like "no avatar".
76
+ if (!image || broken) {
73
77
  return <InitialsAvatar name={name} size={size} rounded="sm" tone="neutral" />
74
78
  }
75
79
  // A lucide icon name stored where an image url/path is expected (the `icon`
@@ -89,11 +93,7 @@ export function OptionThumb({
89
93
  loading="lazy"
90
94
  className="shrink-0 rounded-sm object-cover"
91
95
  style={box}
92
- // A broken image url shouldn't leave a torn-icon glyph; collapse to
93
- // the neutral placeholder background instead.
94
- onError={(e) => {
95
- e.currentTarget.style.visibility = 'hidden'
96
- }}
96
+ onError={() => setBroken(true)}
97
97
  />
98
98
  )
99
99
  }
@@ -177,6 +177,24 @@ export interface DynamicSelectFieldProps {
177
177
  * on open) so the label resolves to the NAME instead of showing the raw id.
178
178
  */
179
179
  readonly?: boolean
180
+ /**
181
+ * Caller-owned options (e.g. warehouses filtered by available stock for a
182
+ * dispatch line). When set, skips `/options` and filters these client-side
183
+ * by the search box. Federated process modals use this so they share the
184
+ * same DynamicSelect chrome without reinventing a lighter picker.
185
+ */
186
+ staticOptions?: readonly ResolvedOption[] | null
187
+ /**
188
+ * Render `option.description` as a trailing Badge (stock, codes, …) instead
189
+ * of the default muted subtitle under the label.
190
+ */
191
+ descriptionAsBadge?: boolean
192
+ /**
193
+ * Hide the inline "+" create affordance even when `field.ref` is set.
194
+ * Useful for static / filtered lists where creating a new record is not
195
+ * meaningful in context.
196
+ */
197
+ hideCreate?: boolean
180
198
  }
181
199
 
182
200
  export function DynamicSelectField({
@@ -187,6 +205,9 @@ export function DynamicSelectField({
187
205
  dependsValue,
188
206
  dependsHint,
189
207
  readonly = false,
208
+ staticOptions = null,
209
+ descriptionAsBadge = false,
210
+ hideCreate = false,
190
211
  }: DynamicSelectFieldProps) {
191
212
  const [open, setOpen] = useState(false)
192
213
  const [search, setSearch] = useState('')
@@ -224,7 +245,9 @@ export function DynamicSelectField({
224
245
  const scope = dependsValue ? String(dependsValue) : ''
225
246
  const blockedByDependency = !!dependsOn && scope === ''
226
247
 
227
- const { options, loading } = useOptionsResolver({
248
+ const useStatic = Array.isArray(staticOptions)
249
+
250
+ const { options: fetchedOptions, loading: fetchLoading } = useOptionsResolver({
228
251
  modelKey: '',
229
252
  fieldKey: source.fieldKey,
230
253
  ref: source.ref,
@@ -241,9 +264,22 @@ export function DynamicSelectField({
241
264
  // changes while open). A picker blocked by an unset dependency never
242
265
  // fetches. A readonly cell fetches eagerly so its value's label resolves
243
266
  // to the name without the user ever opening it.
244
- enabled: (open || readonly) && !blockedByDependency,
267
+ // Static lists never hit the network.
268
+ enabled: !useStatic && (open || readonly) && !blockedByDependency,
245
269
  })
246
270
 
271
+ const options = useStatic
272
+ ? (staticOptions as ResolvedOption[]).filter((o) => {
273
+ if (!debounced) return true
274
+ const q = debounced.toLowerCase()
275
+ return (
276
+ String(o.label ?? '').toLowerCase().includes(q) ||
277
+ String(o.description ?? '').toLowerCase().includes(q)
278
+ )
279
+ })
280
+ : fetchedOptions
281
+ const loading = useStatic ? false : fetchLoading
282
+
247
283
  // When the depended-on value changes, the previously-picked option no longer
248
284
  // belongs to the new scope, so clear the selection (skip the initial mount).
249
285
  const prevScopeRef = useRef<string>(scope)
@@ -356,6 +392,11 @@ export function DynamicSelectField({
356
392
  ? (dependsHint || DEFAULT_DEPENDS_HINT)
357
393
  : selectedLabel || field.placeholder || 'Buscar…'}
358
394
  </span>
395
+ {descriptionAsBadge && selectedOption?.description ? (
396
+ <Badge variant="secondary" className="shrink-0 font-normal tabular-nums">
397
+ {selectedOption.description}
398
+ </Badge>
399
+ ) : null}
359
400
  </span>
360
401
  <ChevronsUpDown className="ml-2 size-4 shrink-0 opacity-50" />
361
402
  </Button>
@@ -382,7 +423,13 @@ export function DynamicSelectField({
382
423
  )}
383
424
  {!loading && options.length === 0 && (
384
425
  <CommandEmpty>
385
- {debounced ? 'Sin resultados' : 'Escribí para buscar…'}
426
+ {useStatic
427
+ ? debounced
428
+ ? 'Sin resultados'
429
+ : 'Sin opciones'
430
+ : debounced
431
+ ? 'Sin resultados'
432
+ : 'Escribí para buscar…'}
386
433
  </CommandEmpty>
387
434
  )}
388
435
  {!loading && options.length > 0 && (
@@ -397,14 +444,25 @@ export function DynamicSelectField({
397
444
  >
398
445
  <Check className={'mr-2 size-4 shrink-0 ' + (isSel ? 'opacity-100' : 'opacity-0')} />
399
446
  <OptionLead option={opt} size={24} />
400
- <div className="ml-2 flex min-w-0 flex-col">
401
- <span className="truncate">{opt.label}</span>
402
- {opt.description && (
403
- <span className="text-muted-foreground truncate text-xs">
404
- {opt.description}
405
- </span>
406
- )}
407
- </div>
447
+ {descriptionAsBadge ? (
448
+ <div className="ml-2 flex min-w-0 flex-1 items-center gap-2">
449
+ <span className="min-w-0 flex-1 truncate">{opt.label}</span>
450
+ {opt.description ? (
451
+ <Badge variant="secondary" className="shrink-0 font-normal tabular-nums">
452
+ {opt.description}
453
+ </Badge>
454
+ ) : null}
455
+ </div>
456
+ ) : (
457
+ <div className="ml-2 flex min-w-0 flex-col">
458
+ <span className="truncate">{opt.label}</span>
459
+ {opt.description && (
460
+ <span className="text-muted-foreground truncate text-xs">
461
+ {opt.description}
462
+ </span>
463
+ )}
464
+ </div>
465
+ )}
408
466
  </CommandItem>
409
467
  )
410
468
  })}
@@ -427,7 +485,7 @@ export function DynamicSelectField({
427
485
  <ScanLine className="size-4" />
428
486
  </Button>
429
487
  )}
430
- {fieldRef && (
488
+ {fieldRef && !hideCreate && !useStatic && (
431
489
  <Button
432
490
  type="button"
433
491
  variant="outline"
package/src/types.ts CHANGED
@@ -651,6 +651,8 @@ export interface ActionDefinition {
651
651
  confirm?: boolean
652
652
  confirmMessage?: string
653
653
  fields?: ActionFieldDef[]
654
+ /** Multi-step wizard form; when present the dispatcher renders a wizard. */
655
+ steps?: ActionStep[]
654
656
  requiresState?: string[]
655
657
  executable?: boolean
656
658
  /**