@sincpro/web-ui 2.0.0 → 2.2.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 (143) hide show
  1. package/README.md +45 -0
  2. package/dist/components/activity/Activity.d.ts +13 -14
  3. package/dist/components/activity/Activity.js +1 -1
  4. package/dist/components/activity/Messages.d.ts +5 -5
  5. package/dist/components/activity/Messages.js +8 -8
  6. package/dist/components/attachments/Attachments.d.ts +7 -1
  7. package/dist/components/attachments/Attachments.js +8 -2
  8. package/dist/components/board/Board.d.ts +32 -2
  9. package/dist/components/board/Board.js +27 -4
  10. package/dist/components/board/index.d.ts +1 -1
  11. package/dist/components/board/index.js +2 -1
  12. package/dist/components/form/Form.js +6 -6
  13. package/dist/components/form/index.js +2 -2
  14. package/dist/components/frame/FrameView.d.ts +5 -5
  15. package/dist/components/frame/FrameView.js +4 -4
  16. package/dist/components/listing/GroupingLevels.d.ts +22 -22
  17. package/dist/components/listing/GroupingLevels.js +9 -9
  18. package/dist/components/listing/Listing.d.ts +11 -11
  19. package/dist/components/listing/Listing.js +11 -11
  20. package/dist/components/listing/ListingBar.js +11 -11
  21. package/dist/components/listing/Row.d.ts +19 -19
  22. package/dist/components/listing/Row.js +27 -27
  23. package/dist/components/listing/SortMenu.d.ts +36 -36
  24. package/dist/components/listing/SortMenu.js +6 -6
  25. package/dist/components/listing/grouping.d.ts +16 -16
  26. package/dist/components/listing/grouping.js +6 -6
  27. package/dist/components/listing/index.js +1 -1
  28. package/dist/components/listing/modelColumns.d.ts +25 -25
  29. package/dist/components/listing/modelColumns.js +24 -24
  30. package/dist/components/listing/pages.js +4 -4
  31. package/dist/components/listing/set.d.ts +18 -18
  32. package/dist/components/navigation/NavigationTree.js +2 -2
  33. package/dist/components/navigation/index.js +2 -2
  34. package/dist/components/record/RecordSkeleton.js +7 -7
  35. package/dist/components/search/CriteriaBuilder.d.ts +22 -22
  36. package/dist/components/search/CriteriaBuilder.js +31 -31
  37. package/dist/components/search/CriteriaChips.d.ts +9 -9
  38. package/dist/components/search/CriteriaChips.js +12 -12
  39. package/dist/components/search/FilterBuilder.d.ts +67 -67
  40. package/dist/components/search/FilterBuilder.js +104 -104
  41. package/dist/components/search/JoinWord.d.ts +1 -1
  42. package/dist/components/search/JoinWord.js +14 -14
  43. package/dist/components/search/JsonEditor.d.ts +8 -8
  44. package/dist/components/search/JsonEditor.js +16 -16
  45. package/dist/components/search/SearchBar.d.ts +34 -34
  46. package/dist/components/search/SearchBar.js +140 -117
  47. package/dist/components/search/criteria.d.ts +61 -61
  48. package/dist/components/search/criteria.js +39 -39
  49. package/dist/components/search/datePeriods.d.ts +47 -48
  50. package/dist/components/search/datePeriods.js +29 -29
  51. package/dist/components/search/dateRanges.d.ts +27 -27
  52. package/dist/components/search/dateRanges.js +16 -16
  53. package/dist/components/search/index.js +13 -13
  54. package/dist/components/search/model.d.ts +28 -28
  55. package/dist/components/search/model.js +21 -21
  56. package/dist/components/search/query.d.ts +71 -71
  57. package/dist/components/search/query.js +119 -119
  58. package/dist/components/shell/AppFrame.d.ts +9 -2
  59. package/dist/components/shell/AppFrame.js +102 -14
  60. package/dist/components/shell/Sidebar.d.ts +34 -0
  61. package/dist/components/shell/Sidebar.js +32 -0
  62. package/dist/components/shell/TopBar.d.ts +2 -0
  63. package/dist/components/shell/TopBar.js +13 -9
  64. package/dist/components/shell/index.d.ts +2 -0
  65. package/dist/components/shell/index.js +5 -1
  66. package/dist/components/shell/sidebarDrawer.d.ts +26 -0
  67. package/dist/components/shell/sidebarDrawer.js +22 -0
  68. package/dist/foundations/calendar.d.ts +27 -27
  69. package/dist/foundations/calendar.js +72 -72
  70. package/dist/foundations/chart.d.ts +57 -57
  71. package/dist/foundations/chart.js +27 -27
  72. package/dist/foundations/copy.d.ts +109 -94
  73. package/dist/foundations/copy.es.js +10 -2
  74. package/dist/foundations/copy.js +10 -2
  75. package/dist/foundations/grouping.d.ts +175 -175
  76. package/dist/foundations/grouping.js +0 -0
  77. package/dist/foundations/index.d.ts +1 -1
  78. package/dist/foundations/index.js +21 -21
  79. package/dist/foundations/pivot.d.ts +133 -131
  80. package/dist/foundations/pivot.js +54 -54
  81. package/dist/foundations/pivotSheet.d.ts +36 -36
  82. package/dist/foundations/pivotSheet.js +0 -0
  83. package/dist/foundations/slots.d.ts +38 -38
  84. package/dist/foundations/slots.js +18 -18
  85. package/dist/foundations/sticky.d.ts +28 -28
  86. package/dist/foundations/sticky.js +59 -59
  87. package/dist/foundations/xlsx.d.ts +47 -47
  88. package/dist/foundations/xlsx.js +0 -0
  89. package/dist/primitives/block/Line.d.ts +4 -4
  90. package/dist/primitives/block/Line.js +28 -28
  91. package/dist/primitives/block/index.js +2 -2
  92. package/dist/primitives/cell/index.js +2 -2
  93. package/dist/primitives/choice/index.js +3 -3
  94. package/dist/primitives/date/Calendar.d.ts +7 -1
  95. package/dist/primitives/date/Calendar.js +13 -3
  96. package/dist/primitives/date/DatePicker.d.ts +4 -1
  97. package/dist/primitives/date/DatePicker.js +2 -2
  98. package/dist/primitives/date/index.js +3 -3
  99. package/dist/primitives/disclosure/index.js +1 -1
  100. package/dist/primitives/field/DropZone.d.ts +22 -3
  101. package/dist/primitives/field/DropZone.js +33 -12
  102. package/dist/primitives/menu/Menu.d.ts +10 -6
  103. package/dist/primitives/menu/Menu.js +4 -3
  104. package/dist/primitives/notice/Callout.d.ts +30 -30
  105. package/dist/primitives/notice/Callout.js +6 -6
  106. package/dist/primitives/overlay/index.js +3 -3
  107. package/dist/primitives/picker/Picker.d.ts +6 -0
  108. package/dist/primitives/picker/Picker.js +27 -4
  109. package/dist/primitives/picker/index.js +2 -2
  110. package/dist/primitives/table/DataTable.d.ts +32 -32
  111. package/dist/primitives/table/DataTable.js +24 -24
  112. package/dist/primitives/table/EditableTable.d.ts +10 -10
  113. package/dist/primitives/table/EditableTable.js +9 -9
  114. package/dist/primitives/table/ReportTable.js +7 -7
  115. package/dist/primitives/table/SheetTable.d.ts +13 -13
  116. package/dist/primitives/table/SheetTable.js +14 -14
  117. package/dist/primitives/table/Table.js +8 -8
  118. package/dist/primitives/tabs/Tabs.d.ts +46 -46
  119. package/dist/primitives/tabs/Tabs.js +4 -30
  120. package/dist/primitives/tag/Count.d.ts +23 -0
  121. package/dist/primitives/tag/Count.js +59 -0
  122. package/dist/primitives/tag/index.d.ts +1 -0
  123. package/dist/primitives/tag/index.js +5 -2
  124. package/dist/primitives/toolbar/index.js +1 -1
  125. package/dist/primitives/value/Copyable.d.ts +22 -22
  126. package/dist/primitives/value/Copyable.js +9 -9
  127. package/dist/primitives/value/Metric.d.ts +7 -2
  128. package/dist/primitives/value/Metric.js +12 -4
  129. package/dist/tokens.css +164 -57
  130. package/dist/views/list/List.d.ts +36 -36
  131. package/dist/views/list/List.js +19 -19
  132. package/dist/views/list/ListView.js +74 -74
  133. package/dist/views/list/columns.d.ts +10 -10
  134. package/dist/views/list/columns.js +10 -10
  135. package/dist/views/list/derive.d.ts +30 -30
  136. package/dist/views/list/derive.js +49 -49
  137. package/dist/views/list/index.js +2 -2
  138. package/dist/views/list/presentations.js +3 -3
  139. package/dist/views/list/types.d.ts +109 -109
  140. package/dist/views/record/Record.d.ts +14 -14
  141. package/dist/views/record/Record.js +24 -24
  142. package/dist/views/record/index.js +1 -1
  143. package/package.json +1 -1
@@ -3,71 +3,71 @@ import type { ModelDefinition } from "./model.js";
3
3
  import type { Surface } from "../../foundations/types.js";
4
4
  import type { MenuGroup } from "../../primitives/menu/Menu.js";
5
5
  import { type ReactNode } from "react";
6
- /** Dónde se puede buscar. Lo declara el dominio, no esta pieza. */
6
+ /** Where you can search. The domain declares it, not this piece. */
7
7
  export interface SearchFacet {
8
8
  id: string;
9
- /** Cómo se lee en la sugerencia y en la ficha: «nombre», «columnas». */
9
+ /** How it reads in the suggestion and on the chip: «nombre», «columnas». */
10
10
  label: string;
11
11
  }
12
12
  /**
13
- * La CONJUNCIÓN entre dos recortes: «y» o «o».
13
+ * The CONJUNCTION between two cuts: «y» or «o».
14
14
  *
15
- * Con `onToggle` se puede tocar, y eso no es un adorno: «vencidas Y de este
16
- * mes» y «vencidas O de este mes» son dos listas completamente distintas, y
17
- * hasta acá cuál de las dos era estaba decidido por dentro y no se podía cambiar
18
- * sin abrir el constructor. Sin `onToggle` es una palabra y nada más — que es lo
19
- * correcto entre dos ejes, donde la Y no es una opción.
15
+ * With `onToggle` it can be touched, and that is no ornament: «vencidas Y de este
16
+ * mes» and «vencidas O de este mes» are two completely different lists, and
17
+ * until now which of the two it was was decided inside and could not be changed
18
+ * without opening the builder. Without `onToggle` it is a word and nothing more — which is
19
+ * right between two axes, where AND is not an option.
20
20
  */
21
21
  /**
22
- * Lo que la barra necesita. Está aparte de la función porque es el contrato: lo
23
- * que una lista tiene que darle para que la barra pregunte, y nada más.
22
+ * What the bar needs. It is apart from the function because it is the contract: what
23
+ * a list has to give it for the bar to ask, and nothing more.
24
24
  */
25
25
  export type SearchBarProps = {
26
26
  facets: readonly SearchFacet[];
27
27
  /**
28
- * El modelo, cuando la lista lo tiene.
28
+ * The model, when the list has it.
29
29
  *
30
- * Es lo que convierte la barra de «buscar un texto en un campo» a «hacer una
31
- * pregunta»: de acá salen el tipo de cada campo —y con él qué se le puede
32
- * escribir—, los operadores que acepta, sus valores posibles si es un enum, y
33
- * por qué columna se busca un relacional. Sin esto, `facets` sigue funcionando
34
- * como siempre: cada faceta es un campo de texto.
30
+ * It is what turns the bar from «search a text in a field» into «ask a
31
+ * question»: from here come each field's type —and with it what can be
32
+ * written to it—, the operators it accepts, its possible values if it is an enum, and
33
+ * by which column a relational is searched. Without this, `facets` keeps working
34
+ * as always: each facet is a text field.
35
35
  */
36
36
  model?: ModelDefinition;
37
37
  /**
38
- * TODO lo que la barra tiene puesto: los niveles de agrupado y los filtros, en
39
- * una sola lista de instancias.
38
+ * EVERYTHING the bar has set: the grouping levels and the filters, in
39
+ * a single list of instances.
40
40
  *
41
- * Una sola y no tres porque son lo mismo con clases distintas —ver
42
- * `criteria.ts`—: lo que entra por el numeral, lo que se escribe a mano, lo
43
- * que un filtro declarado trae con nombre y lo que sale del constructor son
44
- * todas instancias, y por eso todas se leen, se tocan y se sacan igual.
41
+ * A single one and not three because they are the same with different kinds —see
42
+ * `criteria.ts`—: what enters through the hash sign, what is written by hand, what
43
+ * a declared filter brings with a name and what comes out of the builder are
44
+ * all instances, and that is why they are all read, touched and removed the same.
45
45
  */
46
46
  criteria: readonly SearchCriteria[];
47
47
  onCriteriaChange: (next: SearchCriteria[]) => void;
48
48
  placeholder?: string;
49
- /** Lo que el panel OFRECE. Lo puesto no sale de acá: sale de `criteria`. */
49
+ /** What the panel OFFERS. What is set does not come from here: it comes from `criteria`. */
50
50
  filters?: readonly MenuGroup[];
51
51
  /**
52
- * El editor de niveles de agrupado: `<GroupingLevels …/>`.
52
+ * The grouping levels editor: `<GroupingLevels …/>`.
53
53
  *
54
- * Va en la MISMA columna del panel donde están los filtros, porque es la misma
55
- * pregunta —«qué parte de esto estoy mirando»— y separarlos obliga a abrir dos
56
- * cosas para armar un recorte sin poder ver los dos estados a la vez.
54
+ * It goes in the SAME panel column where the filters are, because it is the same
55
+ * question —«which part of this am I looking at»— and separating them forces opening two
56
+ * things to build a cut without being able to see both states at once.
57
57
  */
58
58
  grouping?: ReactNode;
59
59
  /**
60
- * Alguien escribió `#and`, `#or` o `#not` y la barra abrió un nodo: esto avisa
61
- * cuál, por si quien compone quiere hacer algo más con eso.
60
+ * Somebody wrote `#and`, `#or` or `#not` and the bar opened a node: this says
61
+ * which, in case whoever composes wants to do something more with it.
62
62
  */
63
63
  onOpenGroup?: (join: CriteriaJoin) => void;
64
64
  favorites?: readonly MenuGroup[];
65
65
  onFilterSelect?: (id: string) => void;
66
66
  onFavoriteSelect?: (id: string) => void;
67
67
  /**
68
- * Abre el constructor. Recibe la RUTA de la instancia que se tocó, cuando se
69
- * tocó una: el constructor abre ahí, en vez de abrir en la primera regla y
70
- * obligar a buscar la que uno venía mirando entre doce.
68
+ * Opens the builder. It receives the PATH of the instance that was touched, when one
69
+ * was touched: the builder opens there, instead of opening on the first rule and
70
+ * forcing you to search for the one you were looking at among twelve.
71
71
  */
72
72
  onOpenBuilder?: (path?: CriteriaPath) => void;
73
73
  /**
@@ -80,12 +80,12 @@ export type SearchBarProps = {
80
80
  * enum's value, a number a numeric field answers): then that goes first and this after it.
81
81
  */
82
82
  literal?: (text: string) => BuiltCondition | BuiltFilter | null;
83
- /** Lo que va pegado al campo, a su derecha. */
83
+ /** What goes stuck to the field, on its right. */
84
84
  trailing?: ReactNode;
85
85
  /** How many facets the bar shows before folding the rest into «+N»; the grouping chain
86
86
  * counts as one. On a narrow bar only the first shows. `Infinity` never folds. */
87
87
  collapseAfter?: number;
88
- /** Por default la hereda de la superficie que la envuelve. */
88
+ /** By default it inherits it from the surface that wraps it. */
89
89
  surface?: Surface;
90
90
  };
91
91
  export declare function SearchBar({ facets, model, criteria, onCriteriaChange, placeholder, filters, grouping, onOpenGroup, favorites, onFilterSelect, onFavoriteSelect, onOpenBuilder, literal, trailing, collapseAfter, surface, }: SearchBarProps): import("react").JSX.Element;