@asteby/metacore-runtime-react 27.0.0 → 27.1.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 +11 -0
- package/dist/dynamic-columns.d.ts.map +1 -1
- package/dist/dynamic-columns.js +7 -7
- package/package.json +1 -1
- package/src/dynamic-columns.tsx +7 -12
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,16 @@
|
|
|
1
1
|
# @asteby/metacore-runtime-react
|
|
2
2
|
|
|
3
|
+
## 27.1.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- 056e231: La celda de relación en tablas dinámicas queda PLANA: se elimina la cápsula
|
|
8
|
+
redondeada con tinte por label alrededor de [avatar + nombre + subtítulo]. Una
|
|
9
|
+
referencia es dato, no estado — la pastilla hacía que un listado de productos o
|
|
10
|
+
almacenes se lea como una pared de badges. Identifica al registro el thumb
|
|
11
|
+
cuadrado-redondeado (imagen del registro, o inicial neutra como fallback) junto
|
|
12
|
+
a texto plano. Los badges de enum/estado conservan su pastilla de color.
|
|
13
|
+
|
|
3
14
|
## 27.0.0
|
|
4
15
|
|
|
5
16
|
### Minor Changes
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dynamic-columns.d.ts","sourceRoot":"","sources":["../src/dynamic-columns.tsx"],"names":[],"mappings":"AAgBA,OAAO,EAAU,KAAK,MAAM,EAAE,MAAM,UAAU,CAAA;AAwC9C,OAAO,KAAK,EAAiB,gBAAgB,EAAE,MAAM,SAAS,CAAA;AAE9D,OAAO,KAAK,EAER,iBAAiB,EACpB,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;CACtB;AA0BD;;;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AAI,KAAK,IAAI,CAAC,gBAAgB,EAAE,KAAK,CAAC,KAAG,MAGnE,CAAA;AAED,6EAA6E;AAC7E,eAAO,MAAM,eAAe,2DAA4D,CAAA;AAExF;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAgB,cAAc,CAC1B,KAAK,EAAE,OAAO,EACd,QAAQ,EAAE,MAAM,GAAG,SAAS,EAC5B,MAAM,EAAE,MAAM,EACd,QAAQ,CAAC,EAAE,MAAM,GAClB;IAAE,OAAO,EAAE,MAAM,CAAC;IAAC,KAAK,CAAC,EAAE,MAAM,CAAA;CAAE,GAAG,IAAI,CA6C5C;AAED;;;;;;;GAOG;AACH,eAAO,MAAM,oBAAoB,GAAI,KAAK,gBAAgB,EAAE,KAAK,GAAG,KAAG,MAWtE,CAAA;AAED;;;;;;GAMG;AACH,eAAO,MAAM,oBAAoB,GAAI,KAAK,gBAAgB,EAAE,KAAK,GAAG,KAAG,MAOtE,CAAA;AAED;;;;;;;GAOG;AACH,eAAO,MAAM,uBAAuB,GAAI,KAAK,gBAAgB,EAAE,KAAK,GAAG,KAAG,MAOzE,CAAA;AA+ID;;;;GAIG;AACH,wBAAgB,4BAA4B,CACxC,OAAO,GAAE,qBAA0B,GACpC,iBAAiB,CAqmBnB;AAED;;;;GAIG;AACH,eAAO,MAAM,wBAAwB,EAAE,iBACL,CAAA"}
|
package/dist/dynamic-columns.js
CHANGED
|
@@ -365,18 +365,18 @@ export const resolveRelationSubtitle = (col, row) => {
|
|
|
365
365
|
* every `belongs_to` column (category, supplier, brand, …) without per-addon code.
|
|
366
366
|
*/
|
|
367
367
|
const RelationCell = ({ col, row, getImageUrl }) => {
|
|
368
|
-
const isDark = useIsDarkTheme();
|
|
369
368
|
const display = resolveRelationLabel(col, row);
|
|
370
369
|
if (!display)
|
|
371
370
|
return _jsx(EmptyCell, {});
|
|
372
371
|
const image = resolveRelationImage(col, row);
|
|
373
372
|
const subtitle = resolveRelationSubtitle(col, row);
|
|
374
|
-
//
|
|
375
|
-
//
|
|
376
|
-
//
|
|
377
|
-
//
|
|
378
|
-
|
|
379
|
-
|
|
373
|
+
// FLAT reference cell: no tinted capsule around the pair. A reference is
|
|
374
|
+
// data, not a status — the pill treatment (and its per-label tint) made a
|
|
375
|
+
// products/warehouses listing read as a wall of badges. What identifies the
|
|
376
|
+
// record is the ROUNDED-SQUARE thumb (the record's image, or the neutral
|
|
377
|
+
// initials fallback) next to plain text; enum/status badges keep their
|
|
378
|
+
// colored pill so the two vocabularies stay distinct.
|
|
379
|
+
return (_jsxs("span", { className: "inline-flex max-w-[220px] items-center gap-1.5 text-sm font-medium", title: subtitle ? `${display} · ${subtitle}` : display, children: [image ? (_jsx(RelationThumbnail, { src: image, alt: display, getImageUrl: getImageUrl, size: subtitle ? 24 : 18 })) : (_jsx(InitialsAvatar, { name: display, size: subtitle ? 24 : 18, rounded: "sm", tone: "neutral" })), subtitle ? (_jsxs("span", { className: "flex flex-col leading-tight min-w-0", children: [_jsx("span", { className: "truncate", children: display }), _jsx("span", { className: "truncate text-[0.7rem] opacity-70", children: subtitle })] })) : (_jsx("span", { className: "truncate", children: display }))] }));
|
|
380
380
|
};
|
|
381
381
|
/**
|
|
382
382
|
* Renders a SAP-style polymorphic source-document reference as a navigable
|
package/package.json
CHANGED
package/src/dynamic-columns.tsx
CHANGED
|
@@ -495,29 +495,24 @@ const RelationCell: React.FC<{
|
|
|
495
495
|
row: any
|
|
496
496
|
getImageUrl?: (path: string) => string
|
|
497
497
|
}> = ({ col, row, getImageUrl }) => {
|
|
498
|
-
const isDark = useIsDarkTheme()
|
|
499
498
|
const display = resolveRelationLabel(col, row)
|
|
500
499
|
if (!display) return <EmptyCell />
|
|
501
500
|
const image = resolveRelationImage(col, row)
|
|
502
501
|
const subtitle = resolveRelationSubtitle(col, row)
|
|
503
|
-
//
|
|
504
|
-
//
|
|
505
|
-
//
|
|
506
|
-
//
|
|
507
|
-
|
|
502
|
+
// FLAT reference cell: no tinted capsule around the pair. A reference is
|
|
503
|
+
// data, not a status — the pill treatment (and its per-label tint) made a
|
|
504
|
+
// products/warehouses listing read as a wall of badges. What identifies the
|
|
505
|
+
// record is the ROUNDED-SQUARE thumb (the record's image, or the neutral
|
|
506
|
+
// initials fallback) next to plain text; enum/status badges keep their
|
|
507
|
+
// colored pill so the two vocabularies stay distinct.
|
|
508
508
|
return (
|
|
509
509
|
<span
|
|
510
|
-
className="inline-flex max-w-[220px] items-center gap-1.5
|
|
511
|
-
style={chipStyles}
|
|
510
|
+
className="inline-flex max-w-[220px] items-center gap-1.5 text-sm font-medium"
|
|
512
511
|
title={subtitle ? `${display} · ${subtitle}` : display}
|
|
513
512
|
>
|
|
514
513
|
{image ? (
|
|
515
514
|
<RelationThumbnail src={image} alt={display} getImageUrl={getImageUrl} size={subtitle ? 24 : 18} />
|
|
516
515
|
) : (
|
|
517
|
-
// No image on the resolved sibling: a deterministic initials avatar
|
|
518
|
-
// (shared InitialsAvatar) keyed on the label, so the "producto"-style
|
|
519
|
-
// cross-addon relation reads as a colored badge instead of text-only —
|
|
520
|
-
// matching the picker and detail surfaces.
|
|
521
516
|
<InitialsAvatar name={display} size={subtitle ? 24 : 18} rounded="sm" tone="neutral" />
|
|
522
517
|
)}
|
|
523
518
|
{subtitle ? (
|