@sincpro/web-ui 1.9.0 → 1.11.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.
Files changed (95) hide show
  1. package/dist/components/board/Board.d.ts +51 -0
  2. package/dist/components/board/Board.js +15 -0
  3. package/dist/components/board/index.d.ts +1 -0
  4. package/dist/components/board/index.js +2 -0
  5. package/dist/components/canvas/Canvas.d.ts +14 -0
  6. package/dist/components/canvas/Canvas.js +9 -0
  7. package/dist/components/canvas/canvas.css +19 -0
  8. package/dist/components/canvas/index.d.ts +1 -0
  9. package/dist/components/canvas/index.js +2 -0
  10. package/dist/components/chat/ChatComposer.d.ts +10 -0
  11. package/dist/components/chat/ChatComposer.js +29 -0
  12. package/dist/components/chat/ChatThread.d.ts +13 -0
  13. package/dist/components/chat/ChatThread.js +76 -0
  14. package/dist/components/chat/ConversationList.d.ts +22 -0
  15. package/dist/components/chat/ConversationList.js +22 -0
  16. package/dist/components/chat/index.d.ts +4 -0
  17. package/dist/components/chat/index.js +5 -0
  18. package/dist/components/chat/model.d.ts +30 -0
  19. package/dist/components/chat/model.js +53 -0
  20. package/dist/components/frame/Chart.d.ts +12 -7
  21. package/dist/components/frame/Chart.js +17 -17
  22. package/dist/components/frame/FrameView.d.ts +3 -3
  23. package/dist/components/frame/FrameView.js +79 -26
  24. package/dist/components/frame/model.d.ts +12 -3
  25. package/dist/components/frame/model.js +53 -19
  26. package/dist/components/index.d.ts +4 -0
  27. package/dist/components/index.js +4 -0
  28. package/dist/components/listing/AxisLevels.d.ts +24 -0
  29. package/dist/components/listing/AxisLevels.js +58 -0
  30. package/dist/components/listing/ChartExplorer.d.ts +79 -0
  31. package/dist/components/listing/ChartExplorer.js +114 -0
  32. package/dist/components/listing/ColumnsMenu.d.ts +7 -1
  33. package/dist/components/listing/ColumnsMenu.js +16 -5
  34. package/dist/components/listing/GroupingLevels.d.ts +5 -1
  35. package/dist/components/listing/GroupingLevels.js +7 -4
  36. package/dist/components/listing/ListingBar.js +2 -2
  37. package/dist/components/listing/PivotExplorer.js +5 -36
  38. package/dist/components/listing/index.d.ts +2 -0
  39. package/dist/components/listing/index.js +2 -0
  40. package/dist/components/listing/set.d.ts +3 -1
  41. package/dist/components/preview/FilePreview.d.ts +19 -0
  42. package/dist/components/preview/FilePreview.js +112 -0
  43. package/dist/components/preview/PdfPreview.d.ts +7 -0
  44. package/dist/components/preview/PdfPreview.js +47 -0
  45. package/dist/components/preview/index.d.ts +1 -0
  46. package/dist/components/preview/index.js +2 -0
  47. package/dist/components/record/SmartButtons.js +1 -1
  48. package/dist/components/search/FieldPath.d.ts +54 -0
  49. package/dist/components/search/FieldPath.js +159 -0
  50. package/dist/components/search/FilterBuilder.d.ts +38 -5
  51. package/dist/components/search/FilterBuilder.js +129 -25
  52. package/dist/components/search/SearchBar.js +7 -2
  53. package/dist/components/search/criteria.d.ts +23 -1
  54. package/dist/components/search/index.d.ts +4 -2
  55. package/dist/components/search/index.js +4 -0
  56. package/dist/components/search/paths.d.ts +49 -0
  57. package/dist/components/search/paths.js +75 -0
  58. package/dist/components/shell/TopBar.js +1 -1
  59. package/dist/foundations/calendar.d.ts +15 -0
  60. package/dist/foundations/calendar.js +59 -1
  61. package/dist/foundations/chart.d.ts +126 -0
  62. package/dist/foundations/chart.js +297 -0
  63. package/dist/foundations/copy.d.ts +125 -0
  64. package/dist/foundations/copy.es.js +90 -0
  65. package/dist/foundations/copy.js +84 -0
  66. package/dist/foundations/index.d.ts +2 -1
  67. package/dist/foundations/index.js +4 -1
  68. package/dist/foundations/pivot.d.ts +9 -0
  69. package/dist/foundations/pivot.js +1 -0
  70. package/dist/primitives/chart/Chart.d.ts +39 -0
  71. package/dist/primitives/chart/Chart.js +235 -0
  72. package/dist/primitives/chart/index.d.ts +1 -0
  73. package/dist/primitives/chart/index.js +1 -0
  74. package/dist/primitives/field/Field.js +2 -1
  75. package/dist/primitives/index.d.ts +1 -0
  76. package/dist/primitives/index.js +1 -0
  77. package/dist/primitives/notice/Callout.d.ts +4 -1
  78. package/dist/primitives/notice/Callout.js +12 -2
  79. package/dist/primitives/notice/Notice.d.ts +26 -2
  80. package/dist/primitives/notice/Notice.js +64 -4
  81. package/dist/primitives/notice/Toast.js +10 -1
  82. package/dist/primitives/value/Markdown.d.ts +9 -0
  83. package/dist/primitives/value/Markdown.js +18 -0
  84. package/dist/primitives/value/Metric.d.ts +13 -2
  85. package/dist/primitives/value/Metric.js +25 -3
  86. package/dist/primitives/value/index.d.ts +1 -0
  87. package/dist/primitives/value/index.js +1 -0
  88. package/dist/tokens.css +73 -0
  89. package/dist/views/list/List.d.ts +2 -1
  90. package/dist/views/list/List.js +8 -1
  91. package/dist/views/list/ListView.d.ts +1 -1
  92. package/dist/views/list/ListView.js +37 -5
  93. package/dist/views/list/index.d.ts +1 -1
  94. package/dist/views/list/types.d.ts +34 -0
  95. package/package.json +5 -1
@@ -359,6 +359,8 @@ export type UiCopy = {
359
359
  field: string;
360
360
  /** A field with nothing in it: said, not a silent success. */
361
361
  empty: string;
362
+ /** On an error: copies the whole report (what it said, the detail, when, where). */
363
+ report: string;
362
364
  };
363
365
  /** The rich-text editor: its toolbar, its link form, its list of people to mention. */
364
366
  richText: {
@@ -650,6 +652,45 @@ export type UiCopy = {
650
652
  download: string;
651
653
  fromSearch: string;
652
654
  };
655
+ /** The chart of a set (`Chart`, `ChartExplorer`): Odoo's graph view. */
656
+ chart: {
657
+ /** The count of rows, offered as a measure. */
658
+ count: string;
659
+ /** The tail gathered into one bar or slice. */
660
+ rest: string;
661
+ empty: string;
662
+ /** A pie cannot draw a negative part. */
663
+ pieNegative: string;
664
+ /** Series (or slices) left out because the measure does not add up. */
665
+ hidden: string;
666
+ kind: string;
667
+ bar: string;
668
+ line: string;
669
+ pie: string;
670
+ measure: string;
671
+ categoriesAxis: string;
672
+ seriesAxis: string;
673
+ stacked: string;
674
+ cumulative: string;
675
+ ascending: string;
676
+ descending: string;
677
+ /** A legend entry is a toggle: it hides or shows its series. */
678
+ hideSeries: string;
679
+ showSeries: string;
680
+ /** What a press on a bar, a point or a slice does. */
681
+ open: string;
682
+ /** The measures a frame offers for each numeric column. */
683
+ sumOf: string;
684
+ averageOf: string;
685
+ /** The tooltip of a comparison: now against before, as a change. */
686
+ change: string;
687
+ /** The toggle that draws the previous period: «Comparar con {name}». */
688
+ compareWith: string;
689
+ /** The measure menu's label with more than one on: «importe +1». */
690
+ moreMeasures: string;
691
+ /** A metric's change, against a named period: «vs 2025». */
692
+ against: string;
693
+ };
653
694
  /** A person as a value: who is not there, and the ways to reach who is. */
654
695
  person: {
655
696
  unassigned: string;
@@ -804,6 +845,90 @@ export type UiCopy = {
804
845
  failed: string;
805
846
  retry: string;
806
847
  };
848
+ /** The field picker that walks relations: «Líneas > Impuestos > Monto». */
849
+ fieldPath: {
850
+ /** The trigger with nothing chosen. */
851
+ choose: string;
852
+ search: string;
853
+ back: string;
854
+ loading: string;
855
+ failed: string;
856
+ failedHint: string;
857
+ empty: string;
858
+ /** The first option inside a relation: choosing the relation itself. `{label}`. */
859
+ self: string;
860
+ /** Said after a relation's name: pressing it shows its fields. */
861
+ opens: string;
862
+ /** Add a column or a grouping level from a related field. */
863
+ addColumn: string;
864
+ addLevel: string;
865
+ /** How many of the records reached through a to-many relation must match. */
866
+ match: {
867
+ label: string;
868
+ any: string;
869
+ none: string;
870
+ all: string;
871
+ };
872
+ /** A filter through a relation said in words. `{relation}` and `{inner}`. */
873
+ say: {
874
+ any: string;
875
+ none: string;
876
+ all: string;
877
+ one: string;
878
+ };
879
+ };
880
+ /** The file preview a person opens from a file: the kind decides the renderer. */
881
+ preview: {
882
+ label: string;
883
+ download: string;
884
+ /** No renderer for this kind: said, with the download still there. */
885
+ unsupported: string;
886
+ loading: string;
887
+ /** The renderer failed. The technical text goes in the error report. */
888
+ failed: string;
889
+ /** `{page}` and `{total}`. */
890
+ page: string;
891
+ previousPage: string;
892
+ nextPage: string;
893
+ fit: string;
894
+ actualSize: string;
895
+ /** `{size}` is the file size, already written for the locale. */
896
+ kind: {
897
+ image: string;
898
+ pdf: string;
899
+ text: string;
900
+ markdown: string;
901
+ other: string;
902
+ };
903
+ };
904
+ /** A conversation: the thread of messages and the composer under it. */
905
+ chat: {
906
+ thread: string;
907
+ empty: string;
908
+ loadOlder: string;
909
+ loadingOlder: string;
910
+ jumpLatest: string;
911
+ today: string;
912
+ yesterday: string;
913
+ /** The composer's accessible name and its placeholder. */
914
+ composer: string;
915
+ placeholder: string;
916
+ send: string;
917
+ /** `{count}` is the number of unread messages. */
918
+ unread: string;
919
+ conversations: string;
920
+ newMessages: string;
921
+ /** A message that is written but not yet confirmed by the server. */
922
+ sending: string;
923
+ };
924
+ /** A canvas of nodes and connections (a diagram, a flow). */
925
+ canvas: {
926
+ label: string;
927
+ zoomIn: string;
928
+ zoomOut: string;
929
+ fit: string;
930
+ readOnly: string;
931
+ };
807
932
  /** The theme switch: the three choices an app offers for the palette. */
808
933
  theme: {
809
934
  /** The name of the control — what a screen reader says for the group. */
@@ -267,6 +267,7 @@ export const SPANISH_COPY = {
267
267
  failed: "No se pudo copiar",
268
268
  field: "Copiar «{label}»",
269
269
  empty: "No hay nada que copiar",
270
+ report: "Copiar el error",
270
271
  },
271
272
  richText: {
272
273
  toolbar: "Formato del texto",
@@ -442,6 +443,33 @@ export const SPANISH_COPY = {
442
443
  download: "Descargar",
443
444
  fromSearch: "del agrupado del buscador",
444
445
  },
446
+ chart: {
447
+ count: "cantidad",
448
+ rest: "otros ({count})",
449
+ empty: "No hay nada que graficar.",
450
+ pieNegative: "Una torta no puede mostrar valores negativos: probá con barras.",
451
+ hidden: "{count} más no se dibujan: esta medida no se suma, así que no se pueden juntar en «otros». El pivote las muestra todas.",
452
+ kind: "Tipo de gráfico",
453
+ bar: "Barras",
454
+ line: "Líneas",
455
+ pie: "Torta",
456
+ measure: "Medida",
457
+ categoriesAxis: "Eje",
458
+ seriesAxis: "Series",
459
+ stacked: "Apilar",
460
+ cumulative: "Acumulado",
461
+ ascending: "De menor a mayor",
462
+ descending: "De mayor a menor",
463
+ hideSeries: "Esconder {name}",
464
+ showSeries: "Mostrar {name}",
465
+ open: "Abrir {name}",
466
+ sumOf: "suma de {name}",
467
+ averageOf: "promedio de {name}",
468
+ change: "variación",
469
+ compareWith: "Comparar con {name}",
470
+ moreMeasures: "{name} +{count}",
471
+ against: "vs {name}",
472
+ },
445
473
  person: {
446
474
  unassigned: "sin asignar",
447
475
  email: "Escribir un correo",
@@ -544,6 +572,68 @@ export const SPANISH_COPY = {
544
572
  failed: "No se pudo subir el archivo.",
545
573
  retry: "Reintentar",
546
574
  },
575
+ fieldPath: {
576
+ choose: "Elegir un campo",
577
+ search: "Buscar un campo",
578
+ back: "Volver",
579
+ loading: "Cargando los campos…",
580
+ failed: "No se pudieron cargar los campos.",
581
+ failedHint: "Probá de nuevo en un momento, o copiá el error para quien mantiene el modelo.",
582
+ empty: "Ningún campo coincide.",
583
+ self: "«{label}» (el registro)",
584
+ opens: "muestra sus campos",
585
+ addColumn: "Agregar columna",
586
+ addLevel: "Agrupar por otro campo",
587
+ match: { label: "Cuántos de «{relation}»", any: "alguno", none: "ninguno", all: "todos" },
588
+ say: {
589
+ any: "alguno de {relation} con {inner}",
590
+ none: "ninguno de {relation} con {inner}",
591
+ all: "todos los de {relation} con {inner}",
592
+ one: "{relation} > {inner}",
593
+ },
594
+ },
595
+ preview: {
596
+ label: "Vista previa",
597
+ download: "Descargar",
598
+ unsupported: "No hay vista previa para este tipo de archivo. Igual lo podés descargar.",
599
+ loading: "Cargando la vista previa…",
600
+ failed: "No se pudo mostrar el archivo.",
601
+ page: "Página {page} de {total}",
602
+ previousPage: "Página anterior",
603
+ nextPage: "Página siguiente",
604
+ fit: "Ajustar",
605
+ actualSize: "Tamaño real",
606
+ kind: {
607
+ image: "Imagen",
608
+ pdf: "PDF",
609
+ text: "Texto",
610
+ markdown: "Documento",
611
+ other: "Archivo",
612
+ },
613
+ },
614
+ chat: {
615
+ thread: "Conversación",
616
+ empty: "Todavía no hay mensajes. Escribí el primero.",
617
+ loadOlder: "Cargar mensajes anteriores",
618
+ loadingOlder: "Cargando mensajes anteriores…",
619
+ jumpLatest: "Ir al último mensaje",
620
+ today: "Hoy",
621
+ yesterday: "Ayer",
622
+ composer: "Mensaje",
623
+ placeholder: "Escribí un mensaje… Enter lo envía, Shift+Enter hace otro renglón",
624
+ send: "Enviar",
625
+ unread: "{count} sin leer",
626
+ conversations: "Conversaciones",
627
+ newMessages: "Mensajes nuevos",
628
+ sending: "Enviando…",
629
+ },
630
+ canvas: {
631
+ label: "Lienzo",
632
+ zoomIn: "Acercar",
633
+ zoomOut: "Alejar",
634
+ fit: "Ajustar a la pantalla",
635
+ readOnly: "Solo lectura",
636
+ },
547
637
  theme: {
548
638
  label: "Tema",
549
639
  system: "Sistema",
@@ -215,6 +215,7 @@ export const ENGLISH_COPY = {
215
215
  failed: "Could not copy",
216
216
  field: "Copy «{label}»",
217
217
  empty: "Nothing to copy",
218
+ report: "Copy the error",
218
219
  },
219
220
  richText: {
220
221
  toolbar: "Text formatting",
@@ -432,6 +433,33 @@ export const ENGLISH_COPY = {
432
433
  download: "Download",
433
434
  fromSearch: "from the search's grouping",
434
435
  },
436
+ chart: {
437
+ count: "count",
438
+ rest: "others ({count})",
439
+ empty: "Nothing to chart.",
440
+ pieNegative: "A pie cannot show negative values — try bars.",
441
+ hidden: "{count} more not drawn: this measure does not add up, so they cannot be gathered into «others». The pivot shows them all.",
442
+ kind: "Chart type",
443
+ bar: "Bars",
444
+ line: "Lines",
445
+ pie: "Pie",
446
+ measure: "Measure",
447
+ categoriesAxis: "Axis",
448
+ seriesAxis: "Series",
449
+ stacked: "Stack",
450
+ cumulative: "Cumulative",
451
+ ascending: "Smallest first",
452
+ descending: "Largest first",
453
+ hideSeries: "Hide {name}",
454
+ showSeries: "Show {name}",
455
+ open: "Open {name}",
456
+ sumOf: "sum of {name}",
457
+ averageOf: "average of {name}",
458
+ change: "change",
459
+ compareWith: "Compare with {name}",
460
+ moreMeasures: "{name} +{count}",
461
+ against: "vs {name}",
462
+ },
435
463
  person: {
436
464
  unassigned: "unassigned",
437
465
  email: "Write an email",
@@ -539,6 +567,62 @@ export const ENGLISH_COPY = {
539
567
  failed: "The file could not be uploaded.",
540
568
  retry: "Try again",
541
569
  },
570
+ fieldPath: {
571
+ choose: "Choose a field",
572
+ search: "Search a field",
573
+ back: "Back",
574
+ loading: "Loading the fields…",
575
+ failed: "The fields could not be loaded.",
576
+ failedHint: "Try again in a moment, or copy the error for whoever maintains the model.",
577
+ empty: "No field matches.",
578
+ self: "«{label}» itself",
579
+ opens: "shows its fields",
580
+ addColumn: "Add a column",
581
+ addLevel: "Group by another field",
582
+ match: { label: "How many of «{relation}»", any: "some", none: "none", all: "all" },
583
+ say: {
584
+ any: "some of {relation} with {inner}",
585
+ none: "none of {relation} with {inner}",
586
+ all: "all of {relation} with {inner}",
587
+ one: "{relation} > {inner}",
588
+ },
589
+ },
590
+ preview: {
591
+ label: "Preview",
592
+ download: "Download",
593
+ unsupported: "There is no preview for this kind of file. You can still download it.",
594
+ loading: "Loading the preview…",
595
+ failed: "The file could not be shown.",
596
+ page: "Page {page} of {total}",
597
+ previousPage: "Previous page",
598
+ nextPage: "Next page",
599
+ fit: "Fit",
600
+ actualSize: "Actual size",
601
+ kind: { image: "Image", pdf: "PDF", text: "Text", markdown: "Document", other: "File" },
602
+ },
603
+ chat: {
604
+ thread: "Conversation",
605
+ empty: "No messages yet. Write the first one.",
606
+ loadOlder: "Load earlier messages",
607
+ loadingOlder: "Loading earlier messages…",
608
+ jumpLatest: "Jump to the latest",
609
+ today: "Today",
610
+ yesterday: "Yesterday",
611
+ composer: "Message",
612
+ placeholder: "Write a message… Enter sends, Shift+Enter starts a new line",
613
+ send: "Send",
614
+ unread: "{count} unread",
615
+ conversations: "Conversations",
616
+ newMessages: "New messages",
617
+ sending: "Sending…",
618
+ },
619
+ canvas: {
620
+ label: "Canvas",
621
+ zoomIn: "Zoom in",
622
+ zoomOut: "Zoom out",
623
+ fit: "Fit to screen",
624
+ readOnly: "Read only",
625
+ },
542
626
  theme: {
543
627
  label: "Theme",
544
628
  system: "System",
@@ -8,9 +8,10 @@ export type { OpenTarget, Size, Surface, Tone } from "./types.js";
8
8
  /** El castellano del sistema, para quien lo quiera instalar entero. */
9
9
  export { SPANISH_COPY } from "./copy.es.js";
10
10
  export { flatten, loose, pick, pickAll, propsOf, slot, slotOf, type Slotted, } from "./slots.js";
11
- export { dateKey, dateLabel, grainName, monthName, } from "./calendar.js";
11
+ export { dateKey, dateKeysBetween, dateLabel, grainName, monthName, nextDateKey, } from "./calendar.js";
12
12
  export { GRAIN_ORDER, type GroupableField, type GroupGrain, type Grouping, type GroupLevel, itemPath, levelKey, moveLevel, normalizeLevels, pathKey, pathLabels, type Pile, pileCount, type PileFoot, pileFoot, pileIsOpen, pileItems, pileLabel, type PileLabelOf, type PileOf, pilesFrom, pilesOf, } from "./grouping.js";
13
13
  export { axisLabels, axisSpans, keyStarts, type Pivot, type PivotAxis, type PivotCell, type PivotCrossing, type PivotFold, pivotFrom, pivotIsEmpty, type PivotKey, type PivotLevel, type PivotMargin, type PivotMeasure, pivotOf, type PivotSource, type PivotSpec, } from "./pivot.js";
14
+ export { chartCompare, type ChartData, chartFromPivot, chartFromRecord, type ChartKind, type ChartMeasure, chartMeasures, type ChartOrder, type ChartPoint, type ChartReading, COUNT_MEASURE, orderChart, SERIES_COLORS, } from "./chart.js";
14
15
  export { downloadPivot, pivotSheet, type PivotSheetOptions, pivotXlsx, } from "./pivotSheet.js";
15
16
  export { STICKY_TOP, stickyReset, stickyTop, useScrollBox, useStickyLayer, } from "./sticky.js";
16
17
  export { columnName, downloadXlsx, writeXlsx, type XlsxCell, type XlsxMerge, type XlsxSheet, } from "./xlsx.js";
@@ -19,7 +19,7 @@ export { flatten, loose, pick, pickAll, propsOf, slot, slotOf, } from "./slots.j
19
19
  /* EL CALENDARIO — de una fecha a una clave y de una clave a un rótulo. Los meses
20
20
  y los días de la semana los dice `Intl` con el `locale` de la copia; la semana
21
21
  y el trimestre son las dos únicas palabras que hay que escribir. */
22
- export { dateKey, dateLabel, grainName, monthName, } from "./calendar.js";
22
+ export { dateKey, dateKeysBetween, dateLabel, grainName, monthName, nextDateKey, } from "./calendar.js";
23
23
  /* LA AGRUPACIÓN — el vocabulario, que hablan las dos capas: la lista arma el
24
24
  árbol de montones y la tabla lo dibuja. Vive acá y no en `contexts/list`
25
25
  porque una primitiva no puede importar de un contexto. */
@@ -28,6 +28,9 @@ export { GRAIN_ORDER, itemPath, levelKey, moveLevel, normalizeLevels, pathKey, p
28
28
  Que los márgenes vengan de la base y que un agujero no sea un cero son reglas
29
29
  del CONTRATO, no del dibujo, y por eso viven de este lado. */
30
30
  export { axisLabels, axisSpans, keyStarts, pivotFrom, pivotIsEmpty, pivotOf, } from "./pivot.js";
31
+ /* EL GRÁFICO — un pivote leído como marcas. Lee el mismo `Pivot`, así que sirve igual para
32
+ registros, un dataset o lo plegado en el servidor; un diccionario entra por su helper. */
33
+ export { chartCompare, chartFromPivot, chartFromRecord, chartMeasures, COUNT_MEASURE, orderChart, SERIES_COLORS, } from "./chart.js";
31
34
  /* LA PLANILLA: la misma grilla, en un archivo. El escritor es genérico y no
32
35
  sabe de pivotes; `pivotSheet` es el que traduce uno. */
33
36
  export { downloadPivot, pivotSheet, pivotXlsx, } from "./pivotSheet.js";
@@ -100,6 +100,15 @@ export type PivotMeasure = {
100
100
  * sigue pudiendo sumar, que es lo que no se puede perder.
101
101
  */
102
102
  numberFormat?: string;
103
+ /**
104
+ * La medida SE SUMA: el pliegue de dos montones juntos es la suma de sus pliegues —un
105
+ * importe, un conteo—. Un promedio no, y una mediana tampoco.
106
+ *
107
+ * Lo lee el gráfico, que a veces tiene que juntar una cola en «otros» o acumular una
108
+ * línea: con esto la suma dice la verdad, y sin esto la cola se deja afuera y se avisa,
109
+ * porque sumar promedios inventa un número que nadie plegó (la regla 2 de arriba).
110
+ */
111
+ additive?: boolean;
103
112
  };
104
113
  /**
105
114
  * Un CRUCE ya plegado: cuántas filas hay debajo y qué dan las medidas.
@@ -133,6 +133,7 @@ export function pivotFrom(items, spec) {
133
133
  header: one.header,
134
134
  ...(one.format === undefined ? {} : { format: one.format }),
135
135
  ...(one.numberFormat === undefined ? {} : { numberFormat: one.numberFormat }),
136
+ ...(one.additive === undefined ? {} : { additive: one.additive }),
136
137
  })),
137
138
  cell: (row, column) => crossings.get(crossKey(row, column)),
138
139
  rowTotal: (row) => rowMargins.get(pathKey(row)),
@@ -0,0 +1,39 @@
1
+ import { type ChartData, type ChartKind } from "../../foundations/chart.js";
2
+ import type { PivotKey } from "../../foundations/pivot.js";
3
+ /**
4
+ * A CHART: the numbers of a set, as marks — bars, lines or a pie.
5
+ *
6
+ * Context: «series» used to be a column of 6 px progress bars stretched across the page, the
7
+ * number 1,200 px away from its bar, and an empty bin drawn with a stub as if it had data. It
8
+ * answered one question (how one column spreads) and Odoo's graph view answers the one an
9
+ * ERP actually asks: the set split by one field, maybe by a second, and a measure in each
10
+ * crossing. That is a pivot, so this draws `ChartData`, which `chartFromPivot` reads off any
11
+ * `Pivot` — records, a dataset, or one folded by the server.
12
+ *
13
+ * Drawn with Recharts (SVG): its fills take `var(--color-*)`, so a token and the dark theme
14
+ * reach the marks with no re-render, which no canvas engine does. What it draws follows the
15
+ * system's chart rules — thin marks (≤ 24 px), a 4 px rounded data end and square at the
16
+ * baseline, hairline solid grid, text in text tokens and never in a series colour, one hue
17
+ * for one series (`data`), the categorical palette only from two, a legend only from two,
18
+ * and no animation: a chart that moves when it loads is decoration (MOTION in tokens.css).
19
+ *
20
+ * A primitive: it knows nothing about lists or toolbars. `ChartExplorer` puts the controls
21
+ * around it; anyone can draw it alone with a `ChartData`.
22
+ */
23
+ export type ChartProps = {
24
+ data: ChartData;
25
+ kind?: ChartKind;
26
+ /** Series one on top of the other (bars), or areas stacked (lines). */
27
+ stacked?: boolean;
28
+ /** Bars lying down. By default they lie down when the names are long or many — a column
29
+ * chart with thirty customers is thirty unreadable tick labels. */
30
+ horizontal?: boolean;
31
+ /** A bar, a point or a slice was pressed: open what fell there. `series` is absent when
32
+ * the press means every series (a point of a line with several). */
33
+ onPoint?: (category: PivotKey, series?: PivotKey) => void;
34
+ /** The accessible name: what this chart shows. */
35
+ label: string;
36
+ /** The plot's height. By default the chart decides: lying bars grow with their rows. */
37
+ height?: number | string;
38
+ };
39
+ export declare function Chart({ data, kind, stacked: stackedProp, horizontal: horizontalProp, onPoint, label, height, }: ChartProps): import("react").JSX.Element;