@sincpro/web-ui 2.0.0 → 2.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.
Files changed (119) hide show
  1. package/dist/components/activity/Activity.d.ts +13 -14
  2. package/dist/components/activity/Activity.js +1 -1
  3. package/dist/components/activity/Messages.d.ts +5 -5
  4. package/dist/components/activity/Messages.js +8 -8
  5. package/dist/components/form/Form.js +6 -6
  6. package/dist/components/form/index.js +2 -2
  7. package/dist/components/frame/FrameView.d.ts +5 -5
  8. package/dist/components/frame/FrameView.js +4 -4
  9. package/dist/components/listing/GroupingLevels.d.ts +22 -22
  10. package/dist/components/listing/GroupingLevels.js +9 -9
  11. package/dist/components/listing/Listing.d.ts +11 -11
  12. package/dist/components/listing/Listing.js +11 -11
  13. package/dist/components/listing/ListingBar.js +11 -11
  14. package/dist/components/listing/Row.d.ts +19 -19
  15. package/dist/components/listing/Row.js +25 -25
  16. package/dist/components/listing/SortMenu.d.ts +36 -36
  17. package/dist/components/listing/SortMenu.js +6 -6
  18. package/dist/components/listing/grouping.d.ts +16 -16
  19. package/dist/components/listing/grouping.js +6 -6
  20. package/dist/components/listing/index.js +1 -1
  21. package/dist/components/listing/modelColumns.d.ts +25 -25
  22. package/dist/components/listing/modelColumns.js +24 -24
  23. package/dist/components/listing/pages.js +4 -4
  24. package/dist/components/listing/set.d.ts +18 -18
  25. package/dist/components/navigation/index.js +2 -2
  26. package/dist/components/record/RecordSkeleton.js +7 -7
  27. package/dist/components/search/CriteriaBuilder.d.ts +22 -22
  28. package/dist/components/search/CriteriaBuilder.js +31 -31
  29. package/dist/components/search/CriteriaChips.d.ts +9 -9
  30. package/dist/components/search/CriteriaChips.js +12 -12
  31. package/dist/components/search/FilterBuilder.d.ts +67 -67
  32. package/dist/components/search/FilterBuilder.js +104 -104
  33. package/dist/components/search/JoinWord.d.ts +1 -1
  34. package/dist/components/search/JoinWord.js +14 -14
  35. package/dist/components/search/JsonEditor.d.ts +8 -8
  36. package/dist/components/search/JsonEditor.js +16 -16
  37. package/dist/components/search/SearchBar.d.ts +34 -34
  38. package/dist/components/search/SearchBar.js +110 -110
  39. package/dist/components/search/criteria.d.ts +61 -61
  40. package/dist/components/search/criteria.js +39 -39
  41. package/dist/components/search/datePeriods.d.ts +47 -48
  42. package/dist/components/search/datePeriods.js +29 -29
  43. package/dist/components/search/dateRanges.d.ts +27 -27
  44. package/dist/components/search/dateRanges.js +16 -16
  45. package/dist/components/search/index.js +13 -13
  46. package/dist/components/search/model.d.ts +28 -28
  47. package/dist/components/search/model.js +21 -21
  48. package/dist/components/search/query.d.ts +71 -71
  49. package/dist/components/search/query.js +119 -119
  50. package/dist/components/shell/AppFrame.js +3 -3
  51. package/dist/components/shell/index.js +1 -1
  52. package/dist/foundations/calendar.d.ts +27 -27
  53. package/dist/foundations/calendar.js +72 -72
  54. package/dist/foundations/chart.d.ts +57 -57
  55. package/dist/foundations/chart.js +27 -27
  56. package/dist/foundations/copy.d.ts +96 -94
  57. package/dist/foundations/copy.es.js +1 -0
  58. package/dist/foundations/copy.js +1 -0
  59. package/dist/foundations/grouping.d.ts +175 -175
  60. package/dist/foundations/grouping.js +0 -0
  61. package/dist/foundations/index.d.ts +1 -1
  62. package/dist/foundations/index.js +21 -21
  63. package/dist/foundations/pivot.d.ts +133 -131
  64. package/dist/foundations/pivot.js +54 -54
  65. package/dist/foundations/pivotSheet.d.ts +36 -36
  66. package/dist/foundations/pivotSheet.js +0 -0
  67. package/dist/foundations/slots.d.ts +38 -38
  68. package/dist/foundations/slots.js +18 -18
  69. package/dist/foundations/sticky.d.ts +28 -28
  70. package/dist/foundations/sticky.js +59 -59
  71. package/dist/foundations/xlsx.d.ts +47 -47
  72. package/dist/foundations/xlsx.js +0 -0
  73. package/dist/primitives/block/Line.d.ts +4 -4
  74. package/dist/primitives/block/Line.js +28 -28
  75. package/dist/primitives/block/index.js +2 -2
  76. package/dist/primitives/cell/index.js +2 -2
  77. package/dist/primitives/choice/index.js +3 -3
  78. package/dist/primitives/date/Calendar.d.ts +7 -1
  79. package/dist/primitives/date/Calendar.js +13 -3
  80. package/dist/primitives/date/DatePicker.d.ts +4 -1
  81. package/dist/primitives/date/DatePicker.js +2 -2
  82. package/dist/primitives/date/index.js +3 -3
  83. package/dist/primitives/disclosure/index.js +1 -1
  84. package/dist/primitives/menu/Menu.d.ts +3 -3
  85. package/dist/primitives/notice/Callout.d.ts +30 -30
  86. package/dist/primitives/notice/Callout.js +6 -6
  87. package/dist/primitives/overlay/index.js +3 -3
  88. package/dist/primitives/picker/Picker.d.ts +6 -0
  89. package/dist/primitives/picker/Picker.js +27 -4
  90. package/dist/primitives/picker/index.js +2 -2
  91. package/dist/primitives/table/DataTable.d.ts +32 -32
  92. package/dist/primitives/table/DataTable.js +24 -24
  93. package/dist/primitives/table/EditableTable.d.ts +10 -10
  94. package/dist/primitives/table/EditableTable.js +9 -9
  95. package/dist/primitives/table/ReportTable.js +7 -7
  96. package/dist/primitives/table/SheetTable.d.ts +13 -13
  97. package/dist/primitives/table/SheetTable.js +14 -14
  98. package/dist/primitives/table/Table.js +8 -8
  99. package/dist/primitives/tabs/Tabs.d.ts +46 -46
  100. package/dist/primitives/tabs/Tabs.js +7 -7
  101. package/dist/primitives/tag/index.js +2 -2
  102. package/dist/primitives/toolbar/index.js +1 -1
  103. package/dist/primitives/value/Copyable.d.ts +22 -22
  104. package/dist/primitives/value/Copyable.js +9 -9
  105. package/dist/tokens.css +17 -17
  106. package/dist/views/list/List.d.ts +36 -36
  107. package/dist/views/list/List.js +19 -19
  108. package/dist/views/list/ListView.js +74 -74
  109. package/dist/views/list/columns.d.ts +10 -10
  110. package/dist/views/list/columns.js +10 -10
  111. package/dist/views/list/derive.d.ts +30 -30
  112. package/dist/views/list/derive.js +49 -49
  113. package/dist/views/list/index.js +2 -2
  114. package/dist/views/list/presentations.js +3 -3
  115. package/dist/views/list/types.d.ts +109 -109
  116. package/dist/views/record/Record.d.ts +14 -14
  117. package/dist/views/record/Record.js +24 -24
  118. package/dist/views/record/index.js +1 -1
  119. package/package.json +1 -1
@@ -1,66 +1,66 @@
1
1
  import type { Surface } from "../../foundations/types.js";
2
2
  import { type SortState } from "../../primitives/table/sorting.js";
3
3
  /**
4
- * ORDENAR — por uno o por varios campos, desde la barra.
4
+ * SORT — by one or several fields, from the bar.
5
5
  *
6
- * Context: ordenar era una capacidad de `DataTable` y de nadie más. Se hacía
7
- * clic en el encabezado de la columna, que es la forma correcta **cuando hay
8
- * encabezados**. En filas, en tablero y en la planilla no los hay, así que
9
- * cambiar de presentación no perdía sólo el orden puesto: perdía la posibilidad
10
- * de ordenar.
6
+ * Context: sorting was a capability of `DataTable` and of nothing else. You
7
+ * clicked the column header, which is the right way **when there are
8
+ * headers**. In rows, board and sheet there are none, so
9
+ * changing presentation lost not only the order set: it lost the ability
10
+ * to sort.
11
11
  *
12
- * El orden es del CONJUNTO y no de la presentación, igual que los niveles y que
13
- * lo plegado. Por eso el control vive en la barra y no adentro de la tabla, y
14
- * por eso la tabla sigue teniendo además sus encabezados: son dos puertas a lo
15
- * mismo, y la de los encabezados es más rápida cuando existe.
12
+ * The order belongs to the SET and not to the presentation, like the levels and
13
+ * the folding. That is why the control lives in the bar and not inside the table, and
14
+ * why the table still has its headers as well: they are two doors to the
15
+ * same thing, and the headers' one is faster when it exists.
16
16
  *
17
- * ── Varios criterios, y por eso un panel y no un menú ───────────────
17
+ * ── Several criteria, and so a panel and not a menu ─────────────────
18
18
  *
19
- * Se decía que ordenar por dos campos era «un desempate que hace el motor» y
20
- * que alcanzaba con elegir uno. La gente pidió lo contrario en la pantalla: por
21
- * fecha, y en la misma fecha por cliente, y después por producto. El motor ya
22
- * lo aceptaba (`order: [...]`); faltaba poder decirlo. Un orden de N campos
23
- * tiene ORDEN entre ellos —el segundo sólo decide entre las filas que el
24
- * primero dejó iguales—, y eso un menú de tildes no lo expresa: hace falta una
25
- * lista que se reordena. Es la de React Aria (`GridList` + `useDragAndDrop`):
26
- * se arrastra con el mouse, y con el teclado desde el asa (Enter, flechas,
27
- * Enter), anunciado.
19
+ * It used to be said that sorting by two fields was «a tie-break done by the engine» and
20
+ * that choosing one was enough. People asked for the opposite on screen: by
21
+ * date, and within the same date by customer, and then by product. The engine
22
+ * already accepted it (`order: [...]`); what was missing was being able to say it. An order of N fields
23
+ * has an ORDER among them —the second only decides between the rows the
24
+ * first left equal—, and a menu of ticks cannot express that: it takes a
25
+ * list that reorders. It is React Aria's (`GridList` + `useDragAndDrop`):
26
+ * dragged with the mouse, and with the keyboard from the handle (Enter, arrows,
27
+ * Enter), announced.
28
28
  */
29
29
  export type SortField<T = unknown> = {
30
30
  field: string;
31
31
  label: string;
32
32
  /**
33
- * Por qué valor se ordena, cuando ordena el NAVEGADOR.
33
+ * What value it is sorted by, when the BROWSER sorts.
34
34
  *
35
- * Ausente = ya viene ordenado de donde salió. Es la misma división que tiene
36
- * el agrupado con `piles`: un conjunto que el servidor pagina no se puede
37
- * ordenar acá —ordenar doce filas de ciento ochenta y siete da un orden
38
- * falso— así que ahí el orden viaja en la lectura y esto sólo lo refleja.
35
+ * Absent = it already comes sorted from where it came. It is the same split the
36
+ * grouping has with `piles`: a set the server paginates cannot be
37
+ * sorted here —sorting twelve rows out of a hundred and eighty-seven gives a false
38
+ * order— so there the order travels in the read and this only reflects it.
39
39
  */
40
40
  value?: (item: T) => string | number | null | undefined;
41
- /** Qué quiere decir «ascendente» para este campo. Sin esto, «ascendente».
42
- * Una fecha asciende de vieja a nueva y un importe de chico a grande, y
43
- * decirlo evita el clic de prueba. */
41
+ /** What «ascendente» means for this field. Without this, «ascendente».
42
+ * A date ascends from old to new and an amount from small to large, and
43
+ * saying so avoids the trial click. */
44
44
  ascLabel?: string;
45
45
  descLabel?: string;
46
46
  };
47
47
  export type SortMenuProps = {
48
- /** Por qué campos se puede ordenar. Sin ninguno, el control no se dibuja. */
48
+ /** Which fields it can be sorted by. With none, the control is not drawn. */
49
49
  fields: readonly SortField<never>[];
50
- /** El orden, de afuera hacia adentro. Vacío es «como llegaron». */
50
+ /** The order, from outside in. Empty is «as they arrived». */
51
51
  sort: readonly SortState[];
52
52
  onSortChange: (next: SortState[]) => void;
53
53
  surface?: Surface;
54
54
  };
55
55
  /**
56
- * Las filas, ordenadas acá, por cada criterio en su orden.
56
+ * The rows, sorted here, by each criterion in its order.
57
57
  *
58
- * Sólo por los campos que declaran `value`; los demás se saltean —ordenar una
59
- * página de un conjunto que se pagina afuera produce un orden que es mentira,
60
- * porque ordena las doce que llegaron y no las ciento ochenta y siete. Sin
61
- * ningún criterio legible, se devuelven tal cual.
58
+ * Only by the fields that declare `value`; the rest are skipped —sorting a
59
+ * page of a set paginated elsewhere produces an order that is a lie,
60
+ * because it sorts the twelve that arrived and not the hundred and eighty-seven. With
61
+ * no readable criterion, they are returned as is.
62
62
  *
63
- * Los faltantes van SIEMPRE al final, suba o baje el orden (ver `compareBy`).
63
+ * The missing ones go ALWAYS at the end, whether the order goes up or down (see `compareBy`).
64
64
  */
65
65
  export declare function sortItems<T>(items: readonly T[], fields: readonly SortField<T>[], sort: readonly SortState[] | undefined): readonly T[];
66
66
  export declare function SortMenu({ fields, sort, onSortChange, surface }: SortMenuProps): import("react").JSX.Element | null;
@@ -7,14 +7,14 @@ import { compareBy, flipSort, moveSort, } from "../../primitives/table/sorting.j
7
7
  import { ArrowDownUp, ArrowDownWideNarrow, ArrowUpNarrowWide, ChevronDown, GripVertical, Plus, X, } from "lucide-react";
8
8
  import { Button as AriaButton, Dialog, DialogTrigger, GridList, GridListItem, useDragAndDrop, } from "react-aria-components";
9
9
  /**
10
- * Las filas, ordenadas acá, por cada criterio en su orden.
10
+ * The rows, sorted here, by each criterion in its order.
11
11
  *
12
- * Sólo por los campos que declaran `value`; los demás se saltean —ordenar una
13
- * página de un conjunto que se pagina afuera produce un orden que es mentira,
14
- * porque ordena las doce que llegaron y no las ciento ochenta y siete. Sin
15
- * ningún criterio legible, se devuelven tal cual.
12
+ * Only by the fields that declare `value`; the rest are skipped —sorting a
13
+ * page of a set paginated elsewhere produces an order that is a lie,
14
+ * because it sorts the twelve that arrived and not the hundred and eighty-seven. With
15
+ * no readable criterion, they are returned as is.
16
16
  *
17
- * Los faltantes van SIEMPRE al final, suba o baje el orden (ver `compareBy`).
17
+ * The missing ones go ALWAYS at the end, whether the order goes up or down (see `compareBy`).
18
18
  */
19
19
  export function sortItems(items, fields, sort) {
20
20
  if (sort === undefined || sort.length === 0)
@@ -1,31 +1,31 @@
1
1
  import { type GroupGrain, type GroupLevel } from "../../foundations/grouping.js";
2
2
  /**
3
- * LOS NIVELES, como estado que alguien edita.
3
+ * THE LEVELS, as state somebody edits.
4
4
  *
5
- * El vocabulario —qué es un nivel, qué es un montón, cómo se identifica— vive en
6
- * `system/grouping.ts`, porque lo hablan las DOS capas: la lista arma el árbol y
7
- * la tabla lo dibuja, y una primitiva no puede importar de un contexto. Acá
8
- * queda sólo el CONTROL, que es de la lista como lo son el de columnas y el de
9
- * plegado.
5
+ * The vocabulary —what a level is, what a heap is, how it is identified— lives in
6
+ * `system/grouping.ts`, because BOTH layers speak it: the list builds the tree and
7
+ * the table draws it, and a primitive cannot import from a context. Here
8
+ * only the CONTROL stays, which belongs to the list as do the columns' and the
9
+ * folding's.
10
10
  */
11
- /** Los niveles puestos, y las cuatro cosas que se les hacen. El orden ES la
12
- * jerarquía: mover un nivel de lugar cambia por qué se parte primero. */
11
+ /** The levels set, and the four things done to them. The order IS the
12
+ * hierarchy: moving a level changes what is split first. */
13
13
  export type GroupingControl = {
14
14
  levels: readonly GroupLevel[];
15
15
  /**
16
- * Pone un nivel. Un campo de fecha puede estar puesto con VARIOS granos —«por
17
- * mes y adentro por día»— así que lo que no se duplica es el par campo+grano,
18
- * no el campo. Agrupar dos veces por exactamente lo mismo parte en montones de
19
- * uno, y eso siempre es un error de tipeo.
16
+ * Sets a level. A date field can be set with SEVERAL grains —«by
17
+ * month and inside it by day»— so what is not duplicated is the field+grain pair,
18
+ * not the field. Grouping twice by exactly the same splits into heaps of
19
+ * one, and that is always a typo.
20
20
  */
21
21
  add: (field: string, grain?: GroupGrain) => void;
22
22
  remove: (field: string, grain?: GroupGrain) => void;
23
- /** Tildar y destildar en un gesto, que es lo que hace una casilla. */
23
+ /** Tick and untick in one gesture, which is what a checkbox does. */
24
24
  toggle: (field: string, grain?: GroupGrain) => void;
25
25
  has: (field: string, grain?: GroupGrain) => boolean;
26
- /** Mueve un nivel `delta` lugares. Se queda en los bordes en vez de dar la
27
- * vuelta: llegar al primero y volver al último no es lo que nadie espera de
28
- * una flecha «subir». */
26
+ /** Moves a level `delta` places. It stays at the edges instead of wrapping
27
+ * around: reaching the first and coming back to the last is not what anyone expects of
28
+ * an «up» arrow. */
29
29
  move: (field: string, delta: number) => void;
30
30
  clear: () => void;
31
31
  };
@@ -13,16 +13,16 @@ export function useGroupingControl(options = {}) {
13
13
  const add = useCallback((field, grain) => {
14
14
  if (levels.some((one) => levelKey(one) === keyOf(field, grain)))
15
15
  return;
16
- /* Se normaliza SIEMPRE y no sólo al agregar fechas: es la única forma de
17
- que tildar «día» y después «mes» dé «mes › día» sin que quien tilda
18
- tenga que saber en qué orden hacerlo. */
16
+ /* It is normalised ALWAYS and not only when adding dates: it is the only way
17
+ for ticking «día» and then «mes» to give «mes › día» without whoever ticks
18
+ having to know in which order to do it. */
19
19
  setLevels(normalizeLevels([...levels, grain === undefined ? { field } : { field, grain }]));
20
20
  }, [levels, setLevels]);
21
21
  const remove = useCallback((field, grain) => {
22
22
  setLevels(grain === undefined && !levels.some((one) => levelKey(one) === field)
23
- ? /* Sin grano y sin coincidencia exacta: se saca el campo ENTERO, con
24
- todos sus granos. Es lo que quiere decir la × de un campo de
25
- fecha que está puesto por mes y por día. */
23
+ ? /* No grain and no exact match: the WHOLE field is taken out, with
24
+ all its grains. It is what the × of a date field set
25
+ by month and by day means. */
26
26
  levels.filter((one) => one.field !== field)
27
27
  : levels.filter((one) => levelKey(one) !== keyOf(field, grain)));
28
28
  }, [levels, setLevels]);
@@ -14,7 +14,7 @@ export { useSelection } from "./selection.js";
14
14
  export { useSetControl } from "./set.js";
15
15
  export { toggleCollapsed, useTreeControl, } from "./tree.js";
16
16
  export { ViewSwitcher, } from "./ViewSwitcher.js";
17
- /* El control de los niveles. El vocabulario está en `system/grouping.ts`. */
17
+ /* The grouping levels' control. The vocabulary is in `system/grouping.ts`. */
18
18
  export { AxisLevels, levelId, levelLabeler, } from "./AxisLevels.js";
19
19
  export { BoardColumns, } from "./BoardColumns.js";
20
20
  export { ChartExplorer, } from "./ChartExplorer.js";
@@ -1,33 +1,33 @@
1
1
  import { type ModelCellKind } from "./modelCells.js";
2
2
  import { type ModelDefinition } from "../search/model.js";
3
3
  import type { DataColumn } from "../../primitives/table/DataTable.js";
4
- /** Qué campo del modelo muestra una columna declarada a mano.
4
+ /** Which model field a hand-declared column shows.
5
5
  *
6
- * Sin esto, «filas» y `row_count` son dos cosas distintas y el campo
7
- * aparecería dos veces: una con el rótulo bueno y otra cruda. */
6
+ * Without this, «filas» and `row_count` are two different things and the field
7
+ * would appear twice: once with the good label and once raw. */
8
8
  export type ClaimedField = {
9
9
  id: string;
10
10
  field?: string;
11
11
  };
12
- /** Los campos que las columnas declaradas ya contestan.
12
+ /** The fields the declared columns already answer.
13
13
  *
14
14
  * in [{id:"rows", field:"row_count"}, {id:"name"}]
15
15
  * out Set {"row_count", "name"}
16
16
  *
17
- * El `id` cuenta como reclamo cuando coincide con el nombre del campo: la
18
- * mayoría de las columnas se llaman como lo que muestran. */
17
+ * The `id` counts as a claim when it matches the field's name: most
18
+ * columns are named after what they show. */
19
19
  export declare function claimedFields(columns: readonly ClaimedField[]): Set<string>;
20
- /** Un valor del registro, en algo que una celda pueda ordenar y dibujar.
20
+ /** A record value, into something a cell can sort and draw.
21
21
  *
22
- * in ["edad","sexo"] un `text[]`
22
+ * in ["edad","sexo"] a `text[]`
23
23
  * out "edad, sexo"
24
- * in [] una lista vacía no es un texto vacío
25
- * out null la tabla dibuja «—»
24
+ * in [] an empty list is not an empty text
25
+ * out null the table draws «—»
26
26
  * in "2026-09-13T04:17:00"
27
27
  * out "2026-09-13T04:17:00"
28
28
  *
29
- * Las fechas se dejan como vienen —ISO— porque en ISO el orden alfabético ES
30
- * el cronológico, y así la columna ordena bien sin parsear nada. */
29
+ * Dates are left as they come —ISO— because in ISO alphabetical order IS
30
+ * chronological, and so the column sorts well without parsing anything. */
31
31
  export declare function readModelValue(raw: unknown): string | number | boolean | null;
32
32
  /** How a field of the model is drawn, by its `type` and in any case — «Email» and `email` are
33
33
  * the same field. A type not known here stays `text`, exactly as before.
@@ -38,22 +38,22 @@ export declare function readModelValue(raw: unknown): string | number | boolean
38
38
  */
39
39
  export declare function modelCellKind(type: string): ModelCellKind;
40
40
  /**
41
- * Las columnas declaradas, más una por cada campo del modelo que ninguna
42
- * contestaba.
41
+ * The declared columns, plus one for each model field that none
42
+ * answered.
43
43
  *
44
- * in model el `model_meta_data` de `account.move` — 12 campos
45
- * in declared 6 columnas escritas a mano en la vista
46
- * out las 6, y detrás `journal_id`, `currency_id`, `invoice_origin`,
44
+ * in model the `model_meta_data` of `account.move` — 12 fields
45
+ * in declared 6 columns written by hand in the view
46
+ * out the 6, and behind them `journal_id`, `currency_id`, `invoice_origin`,
47
47
  * `payment_reference`, `fiscal_position_id`, `company_id`,
48
- * `move_type`, todas apagadas
48
+ * `move_type`, all switched off
49
49
  *
50
- * El rótulo de las agregadas sale de `model.translations` en el idioma pedido —el mismo
51
- * `translations()` que el modelo publica para todo lo demás—, con el `default` que ese mismo
52
- * modelo declaró si el idioma no está, y el nombre del campo tal cual sólo si el modelo no
53
- * dijo ninguna palabra sobre él. Nunca puede desincronizarse con el motor porque sale de la
54
- * MISMA respuesta que nombra el campo — a diferencia de un diccionario mantenido acá.
50
+ * The label of the added ones comes from `model.translations` in the requested language —the same
51
+ * `translations()` the model publishes for everything else—, with the `default` that same
52
+ * model declared if the language is missing, and the field's name as is only if the model
53
+ * said no word about it. It can never get out of sync with the engine because it comes from the
54
+ * SAME answer that names the field — unlike a dictionary maintained here.
55
55
  *
56
- * `model === null` —todavía no llegó la definición— devuelve las declaradas sin
57
- * tocar, que es exactamente lo que había antes.
56
+ * `model === null` —the definition has not arrived yet— returns the declared ones
57
+ * untouched, which is exactly what there was before.
58
58
  */
59
59
  export declare function columnsFromModel<T extends object>(declared: readonly DataColumn<T>[], model: ModelDefinition | null | undefined, locale?: string): DataColumn<T>[];
@@ -2,13 +2,13 @@ import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import { ModelCell } from "./modelCells.js";
3
3
  import { fieldLabel, isNumericType, } from "../search/model.js";
4
4
  import { formatDuration } from "../../primitives/field/duration.js";
5
- /** Los campos que las columnas declaradas ya contestan.
5
+ /** The fields the declared columns already answer.
6
6
  *
7
7
  * in [{id:"rows", field:"row_count"}, {id:"name"}]
8
8
  * out Set {"row_count", "name"}
9
9
  *
10
- * El `id` cuenta como reclamo cuando coincide con el nombre del campo: la
11
- * mayoría de las columnas se llaman como lo que muestran. */
10
+ * The `id` counts as a claim when it matches the field's name: most
11
+ * columns are named after what they show. */
12
12
  export function claimedFields(columns) {
13
13
  const claimed = new Set();
14
14
  for (const column of columns) {
@@ -18,17 +18,17 @@ export function claimedFields(columns) {
18
18
  }
19
19
  return claimed;
20
20
  }
21
- /** Un valor del registro, en algo que una celda pueda ordenar y dibujar.
21
+ /** A record value, into something a cell can sort and draw.
22
22
  *
23
- * in ["edad","sexo"] un `text[]`
23
+ * in ["edad","sexo"] a `text[]`
24
24
  * out "edad, sexo"
25
- * in [] una lista vacía no es un texto vacío
26
- * out null la tabla dibuja «—»
25
+ * in [] an empty list is not an empty text
26
+ * out null the table draws «—»
27
27
  * in "2026-09-13T04:17:00"
28
28
  * out "2026-09-13T04:17:00"
29
29
  *
30
- * Las fechas se dejan como vienen —ISO— porque en ISO el orden alfabético ES
31
- * el cronológico, y así la columna ordena bien sin parsear nada. */
30
+ * Dates are left as they come —ISO— because in ISO alphabetical order IS
31
+ * chronological, and so the column sorts well without parsing anything. */
32
32
  export function readModelValue(raw) {
33
33
  if (raw === null || raw === undefined)
34
34
  return null;
@@ -71,8 +71,8 @@ export function modelCellKind(type) {
71
71
  return "number";
72
72
  return KIND_OF_TYPE[type.toLowerCase()] ?? "text";
73
73
  }
74
- /** Cuánto ancho merece un campo, por su tipo. Una huella son 64 caracteres y
75
- * una cuenta son seis: darles el mismo ancho arruina las dos. */
74
+ /** How much width a field deserves, by its type. A fingerprint is 64 characters and
75
+ * an account is six: giving them the same width ruins both. */
76
76
  function widthFor(kind) {
77
77
  if (kind === "number" || kind === "duration")
78
78
  return 120;
@@ -83,23 +83,23 @@ function widthFor(kind) {
83
83
  return 260;
84
84
  }
85
85
  /**
86
- * Las columnas declaradas, más una por cada campo del modelo que ninguna
87
- * contestaba.
86
+ * The declared columns, plus one for each model field that none
87
+ * answered.
88
88
  *
89
- * in model el `model_meta_data` de `account.move` — 12 campos
90
- * in declared 6 columnas escritas a mano en la vista
91
- * out las 6, y detrás `journal_id`, `currency_id`, `invoice_origin`,
89
+ * in model the `model_meta_data` of `account.move` — 12 fields
90
+ * in declared 6 columns written by hand in the view
91
+ * out the 6, and behind them `journal_id`, `currency_id`, `invoice_origin`,
92
92
  * `payment_reference`, `fiscal_position_id`, `company_id`,
93
- * `move_type`, todas apagadas
93
+ * `move_type`, all switched off
94
94
  *
95
- * El rótulo de las agregadas sale de `model.translations` en el idioma pedido —el mismo
96
- * `translations()` que el modelo publica para todo lo demás—, con el `default` que ese mismo
97
- * modelo declaró si el idioma no está, y el nombre del campo tal cual sólo si el modelo no
98
- * dijo ninguna palabra sobre él. Nunca puede desincronizarse con el motor porque sale de la
99
- * MISMA respuesta que nombra el campo — a diferencia de un diccionario mantenido acá.
95
+ * The label of the added ones comes from `model.translations` in the requested language —the same
96
+ * `translations()` the model publishes for everything else—, with the `default` that same
97
+ * model declared if the language is missing, and the field's name as is only if the model
98
+ * said no word about it. It can never get out of sync with the engine because it comes from the
99
+ * SAME answer that names the field — unlike a dictionary maintained here.
100
100
  *
101
- * `model === null` —todavía no llegó la definición— devuelve las declaradas sin
102
- * tocar, que es exactamente lo que había antes.
101
+ * `model === null` —the definition has not arrived yet— returns the declared ones
102
+ * untouched, which is exactly what there was before.
103
103
  */
104
104
  export function columnsFromModel(declared, model, locale = "default") {
105
105
  if (model === null || model === undefined)
@@ -47,10 +47,10 @@ export function usePagination(items, options = {}) {
47
47
  setPageSize(clampSize(next));
48
48
  setPage(1);
49
49
  },
50
- /* Se mueve desde `current` y no desde `page`, que es el que puede haber
51
- quedado alto: si estabas en la 3 y un filtro dejó dos páginas, `page`
52
- sigue en 3 mientras se muestra la 2, y `p - 1` volvía a 2 — o sea que
53
- «anterior» no hacía nada hasta el segundo clic. */
50
+ /* It moves from `current` and not from `page`, which may have been left
51
+ too high: if you were on 3 and a filter left two pages, `page` stays
52
+ at 3 while 2 is shown, and `p - 1` went back to 2 — so «previous»
53
+ did nothing until the second click. */
54
54
  ...(current > 1 ? { onPrev: () => setPage(current - 1) } : {}),
55
55
  ...(current < pages ? { onNext: () => setPage(current + 1) } : {}),
56
56
  },
@@ -14,26 +14,26 @@ import { type Pages } from "./pages.js";
14
14
  * reset the page size). Uncontrolled when the screen is the only owner.
15
15
  */
16
16
  /**
17
- * Las maneras de mirar un conjunto. **Vive acá y no en el arquetipo** porque
18
- * son dos los que preguntan lo mismo —una lista y un marco— y la definición
19
- * tiene que ser una sola.
17
+ * The ways of looking at a set. **It lives here and not in the archetype** because
18
+ * two of them ask the same thing —a list and a frame— and the definition
19
+ * has to be only one.
20
20
  *
21
- * Era dos: `ListPresent` en `archetype/ListView.tsx` y esta copia. Mientras las
22
- * dos decían `rows | table | board` nadie lo notaba; agregar `sheet` a una dejó
23
- * cuatro vistas sin compilar, que es exactamente lo que pasa cuando la misma
24
- * idea está escrita dos veces.
21
+ * There were two: `ListPresent` in `archetype/ListView.tsx` and this copy. While the
22
+ * two said `rows | table | board` nobody noticed; adding `sheet` to one left
23
+ * four views not compiling, which is exactly what happens when the same
24
+ * idea is written twice.
25
25
  *
26
- * rows / board no hay columnas: nombre, fichas y meta.
27
- * table las columnas las DECLARA el código.
28
- * sheet las columnas salen del ARCHIVO — puede haber cuarenta y un
29
- * millón de filas, así que va virtualizada.
30
- * report columnas de período y filas en JERARQUÍA que termina en
31
- * totales. No se ordena: el orden ES el informe.
32
- * pivot dos EJES a la vez. Una fila es un montón y una columna
33
- * también; lo que se lee está en el cruce. Tampoco se
34
- * ordena: el orden de cada eje es el de sus claves.
35
- * chart el mismo pivote, dibujado: barras, líneas o torta. El
36
- * primer agrupado es el eje y el segundo, las series.
26
+ * rows / board no columns: name, cards and meta.
27
+ * table the columns are DECLARED by the code.
28
+ * sheet the columns come from the FILE — there may be forty-one
29
+ * million rows, so it is virtualised.
30
+ * report period columns and rows in a HIERARCHY that ends in
31
+ * totals. It is not sorted: the order IS the report.
32
+ * pivot two AXES at once. A row is a heap and so is a column;
33
+ * what is read is at the crossing. It is not
34
+ * sorted either: the order of each axis is that of its keys.
35
+ * chart the same pivot, drawn: bars, lines or pie. The
36
+ * first grouping is the axis and the second, the series.
37
37
  */
38
38
  export type BuiltInPresent = "rows" | "table" | "board" | "sheet" | "report" | "pivot" | "chart" | "calendar" | "gantt" | "timeline";
39
39
  /** A presentation of a list: one the package draws, or the `id` of a `List.Present` the
@@ -1,3 +1,3 @@
1
- /* LA NAVEGACIÓN — el árbol lateral de una aplicación. La paleta de comandos (⌘K) es del
2
- espacio de trabajo (composer), no de acá. */
1
+ /* NAVIGATION — an application's side tree. The command palette (⌘K) belongs to the
2
+ workspace (composer), not here. */
3
3
  export { NavigationTree, } from "./NavigationTree.js";
@@ -2,15 +2,15 @@
2
2
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
3
  import { byDensity, useDensity } from "../../foundations/density.js";
4
4
  /* ==================================================================== *
5
- * LA FICHA, MIENTRAS LLEGA.
5
+ * THE RECORD'S SHEET, WHILE IT ARRIVES.
6
6
  *
7
- * Factura y cliente contestaban la espera con `Empty`: «Cargando…» en el
8
- * medio de la página. Eso es la frase de «no hay nada», y el registro sí
9
- * está — todavía no llegó. La silueta es la de la ficha: el riel, el nombre,
10
- * los cuatro hechos, las solapas y el cuerpo. Cuando el registro aparece,
11
- * cae en el mismo lugar.
7
+ * Invoice and customer answered the wait with `Empty`: «Cargando…» in the
8
+ * middle of the page. That is the phrase for «there is nothing», and the record
9
+ * does exist — it has not arrived yet. The silhouette is the sheet's: the rail, the name,
10
+ * the four facts, the tabs and the body. When the record appears,
11
+ * it lands in the same place.
12
12
  *
13
- * Sin brillo. Un pulso ya quiere decir «este estado está vivo».
13
+ * No shimmer. A pulse already means «this state is alive».
14
14
  * ==================================================================== */
15
15
  const HECHOS = ["w-16", "w-12", "w-20", "w-24"];
16
16
  const SOLAPAS = ["w-14", "w-16", "w-20"];