@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 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;;;;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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AAe,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"}
@@ -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
- // Deterministic, SUBTLE color keyed on the resolved label lighter than
375
- // enum badges (soft tint, no heavy fill) so category/brand chips read as
376
- // alive yet stay visually distinct from option/status badges. Inline style
377
- // (hex-derived) bypasses the host tailwind safelist.
378
- const chipStyles = relationChipStyles(display, { isDark });
379
- return (_jsxs("span", { className: "inline-flex max-w-[220px] items-center gap-1.5 rounded-md px-2 py-0.5 text-sm font-medium", style: chipStyles, 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 }))] }));
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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@asteby/metacore-runtime-react",
3
- "version": "27.0.0",
3
+ "version": "27.1.0",
4
4
  "description": "React runtime for metacore hosts — renders addon contributions dynamically",
5
5
  "repository": {
6
6
  "type": "git",
@@ -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
- // Deterministic, SUBTLE color keyed on the resolved label lighter than
504
- // enum badges (soft tint, no heavy fill) so category/brand chips read as
505
- // alive yet stay visually distinct from option/status badges. Inline style
506
- // (hex-derived) bypasses the host tailwind safelist.
507
- const chipStyles = relationChipStyles(display, { isDark })
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 rounded-md px-2 py-0.5 text-sm font-medium"
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 ? (