@sincpro/web-ui 1.11.1 → 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 (120) 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 +35 -22
  28. package/dist/components/search/CriteriaBuilder.js +95 -85
  29. package/dist/components/search/CriteriaChips.d.ts +9 -9
  30. package/dist/components/search/CriteriaChips.js +13 -13
  31. package/dist/components/search/FilterBuilder.d.ts +72 -71
  32. package/dist/components/search/FilterBuilder.js +190 -145
  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 +21 -18
  37. package/dist/components/search/SearchBar.d.ts +34 -34
  38. package/dist/components/search/SearchBar.js +113 -113
  39. package/dist/components/search/criteria.d.ts +86 -74
  40. package/dist/components/search/criteria.js +44 -43
  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.d.ts +2 -2
  46. package/dist/components/search/index.js +14 -14
  47. package/dist/components/search/model.d.ts +28 -28
  48. package/dist/components/search/model.js +21 -21
  49. package/dist/components/search/query.d.ts +71 -71
  50. package/dist/components/search/query.js +119 -119
  51. package/dist/components/shell/AppFrame.js +3 -3
  52. package/dist/components/shell/index.js +1 -1
  53. package/dist/foundations/calendar.d.ts +27 -27
  54. package/dist/foundations/calendar.js +72 -72
  55. package/dist/foundations/chart.d.ts +57 -57
  56. package/dist/foundations/chart.js +27 -27
  57. package/dist/foundations/copy.d.ts +104 -94
  58. package/dist/foundations/copy.es.js +6 -1
  59. package/dist/foundations/copy.js +6 -1
  60. package/dist/foundations/grouping.d.ts +175 -175
  61. package/dist/foundations/grouping.js +0 -0
  62. package/dist/foundations/index.d.ts +1 -1
  63. package/dist/foundations/index.js +21 -21
  64. package/dist/foundations/pivot.d.ts +133 -131
  65. package/dist/foundations/pivot.js +54 -54
  66. package/dist/foundations/pivotSheet.d.ts +36 -36
  67. package/dist/foundations/pivotSheet.js +0 -0
  68. package/dist/foundations/slots.d.ts +38 -38
  69. package/dist/foundations/slots.js +18 -18
  70. package/dist/foundations/sticky.d.ts +28 -28
  71. package/dist/foundations/sticky.js +59 -59
  72. package/dist/foundations/xlsx.d.ts +47 -47
  73. package/dist/foundations/xlsx.js +0 -0
  74. package/dist/primitives/block/Line.d.ts +4 -4
  75. package/dist/primitives/block/Line.js +28 -28
  76. package/dist/primitives/block/index.js +2 -2
  77. package/dist/primitives/cell/index.js +2 -2
  78. package/dist/primitives/choice/index.js +3 -3
  79. package/dist/primitives/date/Calendar.d.ts +7 -1
  80. package/dist/primitives/date/Calendar.js +13 -3
  81. package/dist/primitives/date/DatePicker.d.ts +4 -1
  82. package/dist/primitives/date/DatePicker.js +2 -2
  83. package/dist/primitives/date/index.js +3 -3
  84. package/dist/primitives/disclosure/index.js +1 -1
  85. package/dist/primitives/menu/Menu.d.ts +3 -3
  86. package/dist/primitives/notice/Callout.d.ts +30 -30
  87. package/dist/primitives/notice/Callout.js +6 -6
  88. package/dist/primitives/overlay/index.js +3 -3
  89. package/dist/primitives/picker/Picker.d.ts +6 -0
  90. package/dist/primitives/picker/Picker.js +27 -4
  91. package/dist/primitives/picker/index.js +2 -2
  92. package/dist/primitives/table/DataTable.d.ts +32 -32
  93. package/dist/primitives/table/DataTable.js +24 -24
  94. package/dist/primitives/table/EditableTable.d.ts +10 -10
  95. package/dist/primitives/table/EditableTable.js +9 -9
  96. package/dist/primitives/table/ReportTable.js +7 -7
  97. package/dist/primitives/table/SheetTable.d.ts +13 -13
  98. package/dist/primitives/table/SheetTable.js +14 -14
  99. package/dist/primitives/table/Table.js +8 -8
  100. package/dist/primitives/tabs/Tabs.d.ts +46 -46
  101. package/dist/primitives/tabs/Tabs.js +7 -7
  102. package/dist/primitives/tag/index.js +2 -2
  103. package/dist/primitives/toolbar/index.js +1 -1
  104. package/dist/primitives/value/Copyable.d.ts +22 -22
  105. package/dist/primitives/value/Copyable.js +9 -9
  106. package/dist/tokens.css +17 -17
  107. package/dist/views/list/List.d.ts +36 -36
  108. package/dist/views/list/List.js +19 -19
  109. package/dist/views/list/ListView.js +74 -74
  110. package/dist/views/list/columns.d.ts +10 -10
  111. package/dist/views/list/columns.js +10 -10
  112. package/dist/views/list/derive.d.ts +30 -30
  113. package/dist/views/list/derive.js +49 -49
  114. package/dist/views/list/index.js +2 -2
  115. package/dist/views/list/presentations.js +3 -3
  116. package/dist/views/list/types.d.ts +109 -109
  117. package/dist/views/record/Record.d.ts +14 -14
  118. package/dist/views/record/Record.js +24 -24
  119. package/dist/views/record/index.js +1 -1
  120. package/package.json +1 -1
@@ -1,97 +1,97 @@
1
1
  import { type ModelDefinition } from "./model.js";
2
- /** Qué clase de valor tiene un campo. Sale del `type` que publica el modelo y es
3
- * lo que decide qué se le puede preguntar. */
2
+ /** What kind of value a field has. It comes from the `type` the model publishes and is
3
+ * what decides what can be asked of it. */
4
4
  export type QueryKind = "text" | "number" | "date" | "boolean" | "choice" | "relation";
5
- /** Un campo por el que se puede preguntar desde la barra. */
5
+ /** A field that can be asked about from the bar. */
6
6
  export type QueryField = {
7
- /** Contra qué campo va la condición. Para un relacional es la columna que lo
8
- * identifica y no el relacional en sí: el motor no compara un agregado. */
7
+ /** Which field the condition goes against. For a relational it is the column that
8
+ * identifies it and not the relational itself: the engine does not compare an aggregate. */
9
9
  field: string;
10
10
  label: string;
11
11
  kind: QueryKind;
12
- /** Los operadores que el modelo acepta para él, en el orden que los publicó. */
12
+ /** The operators the model accepts for it, in the order it published them. */
13
13
  ops: readonly string[];
14
- /** Los valores posibles, cuando es un enum: de ahí sale la tercera lista. */
14
+ /** The possible values, when it is an enum: the third list comes from there. */
15
15
  choices?: readonly string[];
16
- /** Cuando se llega por una relación: contra qué agregado se está preguntando
17
- * de verdad. Es lo que deja escribir «el proyecto se llama X» sin que nadie
18
- * sepa que por dentro se compara otra columna. */
16
+ /** When reached through a relation: which aggregate is really being asked
17
+ * about. It is what lets you write «el proyecto se llama X» without anyone
18
+ * knowing that inside, another column is compared. */
19
19
  through?: string;
20
20
  };
21
- /** Qué forma tiene lo que alguien escribió. Es lo que decide qué campos pueden
22
- * contestarlo. */
21
+ /** What shape what somebody wrote has. It is what decides which fields can
22
+ * answer it. */
23
23
  export type ValueShape = "empty" | "text" | "glob" | "number" | "date";
24
- /** Lo tipeado, ya leído: el operador que trae puesto —si lo trae— y su forma. */
24
+ /** What was typed, already read: the operator it brings in front —if it does— and its shape. */
25
25
  export type TypedValue = {
26
26
  op?: string;
27
27
  value: string;
28
28
  shape: ValueShape;
29
- /** Se escribió `#`: se está eligiendo el ATRIBUTO y no un valor. */
29
+ /** `#` was written: the ATTRIBUTE is being chosen and not a value. */
30
30
  attribute?: true;
31
- /** Se escribió `#and`, `#or` o `#not`: no se está eligiendo un atributo, se
32
- * está ABRIENDO UN GRUPO para meter adentro lo que venga. */
31
+ /** `#and`, `#or` or `#not` was written: no attribute is being chosen, a
32
+ * GROUP is being OPENED to put what comes next inside. */
33
33
  opens?: "all" | "any" | "not";
34
34
  };
35
35
  /**
36
- * Lee lo que alguien escribió: el operador que trae adelante, el valor, y de qué
37
- * forma es.
36
+ * Reads what somebody wrote: the operator it brings in front, the value, and what
37
+ * shape it is.
38
38
  *
39
- * Un molde —`*.csv`, `ventas_*`— es distinto de un texto: se busca con `like` y
40
- * el `*` se traduce al comodín del motor. Un texto suelto NO es un molde
41
- * implícito: quien escribe `test` está pidiendo lo que contenga «test», y quien
42
- * escribe `*.csv` está pidiendo lo que TERMINE en «.csv», que es otra pregunta.
39
+ * A pattern —`*.csv`, `ventas_*`— is different from a text: it is searched with `like` and
40
+ * the `*` is translated to the engine's wildcard. A loose text is NOT an implicit
41
+ * pattern: whoever writes `test` is asking for what contains «test», and whoever
42
+ * writes `*.csv` is asking for what ENDS in «.csv», which is another question.
43
43
  */
44
44
  export declare function readTyped(text: string): TypedValue;
45
- /** El molde, con el comodín que entiende el motor. `*` es lo que la gente
46
- * escribe —y lo que escribe una terminal— y `%` es lo que entiende un `like`. */
45
+ /** The pattern, with the wildcard the engine understands. `*` is what people
46
+ * write —and what a terminal writes— and `%` is what a `like` understands. */
47
47
  export declare function globToLike(value: string): string;
48
48
  /**
49
- * Los campos por los que la barra puede preguntar, sacados del modelo.
49
+ * The fields the bar can ask about, taken from the model.
50
50
  *
51
- * Un relacional entra por la columna que lo IDENTIFICA y con el rótulo de la
52
- * relación: preguntar «el cliente se llama Ferretería» es una pregunta sobre el
53
- * cliente aunque por dentro compare su nombre. Un relacional sin `identifiedBy`
54
- * no entra: no hay nada contra qué comparar, y ofrecerlo sería ofrecer una
55
- * pregunta que no se puede contestar.
51
+ * A relational enters through the column that IDENTIFIES it and with the relation's
52
+ * label: asking «el cliente se llama Ferretería» is a question about the
53
+ * customer even if inside it compares its name. A relational without `identifiedBy`
54
+ * does not enter: there is nothing to compare against, and offering it would be offering a
55
+ * question that cannot be answered.
56
56
  */
57
57
  export declare function queryFields(model: ModelDefinition, locale: string): QueryField[];
58
58
  /**
59
- * Si un campo puede contestar lo que se escribió.
59
+ * Whether a field can answer what was written.
60
60
  *
61
- * Manda el OPERADOR cuando se escribió uno, porque es lo que dice qué clase de
62
- * pregunta es:
61
+ * The OPERATOR rules when one was written, because it is what says what kind of
62
+ * question it is:
63
63
  *
64
- * = / != todo. Cualquier cosa se compara contra sí misma, así que
65
- * escribir `=` abre la lista entera en vez de adivinar de qué
66
- * clase es un valor que todavía no se escribió.
67
- * > >= < <= sólo lo ORDENADO —un número, una fecha—. «Mayor que» sobre
68
- * un texto es una comparación alfabética que nadie pidió.
64
+ * = / != everything. Anything is compared against itself, so
65
+ * writing `=` opens the whole list instead of guessing what
66
+ * kind a value that has not been written yet is.
67
+ * > >= < <= only what is ORDERED —a number, a date—. «Mayor que» on
68
+ * a text is an alphabetical comparison nobody asked for.
69
69
  *
70
- * Sin operador escrito manda la FORMA del valor: `*.csv` es un molde y sólo lo
71
- * contesta algo con letras; `100` sólo algo con números. Ofrecer «filas» para
72
- * `*.csv` es ofrecer una pregunta que da cero.
70
+ * With no operator written the value's SHAPE rules: `*.csv` is a pattern and only
71
+ * something with letters answers it; `100` only something with numbers. Offering «filas» for
72
+ * `*.csv` is offering a question that gives zero.
73
73
  */
74
74
  export declare function answers(field: QueryField, typed: TypedValue): boolean;
75
75
  /**
76
- * Con qué operador se pregunta, cuando nadie lo eligió.
76
+ * Which operator to ask with, when nobody chose one.
77
77
  *
78
- * El que se escribió gana. Si no, el que la forma pide: un molde se pregunta con
79
- * `like`, un texto con `like` si el campo lo acepta —«contiene» es lo que quiere
80
- * quien escribe media palabra— y todo lo demás con `=`.
78
+ * The one written wins. Otherwise, the one the shape asks for: a pattern is asked with
79
+ * `like`, a text with `like` if the field accepts it —«contiene» is what whoever
80
+ * writes half a word wants— and everything else with `=`.
81
81
  */
82
82
  export declare function defaultOp(field: QueryField, typed: TypedValue): string;
83
- /** El valor tal como viaja: un molde se traduce al comodín del motor, y lo demás
84
- * va como se escribió. */
83
+ /** The value as it travels: a pattern is translated to the engine's wildcard, and the rest
84
+ * goes as it was written. */
85
85
  export declare function valueFor(op: string, typed: TypedValue): string;
86
- /** Una pregunta a medio escribir: lo que ya se eligió y lo que se está
87
- * tipeando. */
86
+ /** A half-written question: what has already been chosen and what is being
87
+ * typed. */
88
88
  export type QueryDraft = {
89
89
  field?: QueryField;
90
90
  op?: string;
91
91
  text: string;
92
92
  };
93
93
  export type QuerySuggestion =
94
- /** Seguir por este campo. Todavía falta el operador y el valor. */
94
+ /** Continue with this field. The operator and the value are still missing. */
95
95
  {
96
96
  kind: "field";
97
97
  id: string;
@@ -99,21 +99,21 @@ export type QuerySuggestion =
99
99
  hint?: string;
100
100
  field: QueryField;
101
101
  }
102
- /** Preguntar con este operador. */
102
+ /** Ask with this operator. */
103
103
  | {
104
104
  kind: "op";
105
105
  id: string;
106
106
  label: string;
107
107
  op: string;
108
108
  }
109
- /** Abrir un GRUPO: lo que se escriba después entra adentro. */
109
+ /** Open a GROUP: what is written afterwards goes inside. */
110
110
  | {
111
111
  kind: "group";
112
112
  id: string;
113
113
  label: string;
114
114
  join: "all" | "any" | "not";
115
115
  }
116
- /** La pregunta entera, lista para entrar como ficha. */
116
+ /** The whole question, ready to enter as a chip. */
117
117
  | {
118
118
  kind: "condition";
119
119
  id: string;
@@ -132,20 +132,20 @@ export type QuerySuggestion =
132
132
  hint: string;
133
133
  text: string;
134
134
  };
135
- /** Cómo se llama un operador para quien lo lee. Sale de la copia, así que un
136
- * operador que el servidor agregue aparece con su símbolo hasta que alguien le
137
- * ponga palabra — y no desaparece. */
135
+ /** What an operator is called for whoever reads it. It comes from the copy, so an
136
+ * operator the server adds appears with its symbol until somebody gives it
137
+ * a word — and does not disappear. */
138
138
  export declare function opLabel(op: string): string;
139
- /** Si el operador no lleva valor: preguntar si algo está vacío no necesita que
140
- * se escriba nada. */
139
+ /** Whether the operator takes no value: asking whether something is empty needs nothing
140
+ * to be written. */
141
141
  export declare function withoutValue(op: string): boolean;
142
142
  /**
143
- * Si el operador compara contra DOS valores.
143
+ * Whether the operator compares against TWO values.
144
144
  *
145
- * La barra escribe UNO —es una línea, no un formulario— así que éstos no se
146
- * ofrecen acá: elegir «está entre» y escribir un número arma medio rango, que
147
- * no es una pregunta más laxa sino una que el motor no puede contestar. Se
148
- * preguntan en el constructor, que tiene los dos campos.
145
+ * The bar writes ONE —it is a line, not a form— so these are not
146
+ * offered here: choosing «está entre» and writing a number builds half a range, which
147
+ * is not a laxer question but one the engine cannot answer. They are
148
+ * asked in the builder, which has both fields.
149
149
  */
150
150
  export declare function withTwoValues(op: string): boolean;
151
151
  export declare function suggest(draft: QueryDraft, fields: readonly QueryField[],
@@ -154,16 +154,16 @@ options?: {
154
154
  literal?: boolean;
155
155
  }): QuerySuggestion[];
156
156
  /**
157
- * CÓMO SE LEE UNA CONDICIÓN, en un solo lugar.
157
+ * HOW A CONDITION IS READ, in one place.
158
158
  *
159
- * La usan la barra —para la ficha de lo que alguien acaba de preguntar— y el
160
- * constructor —para la ficha y para el árbol de lo que ya está armado—. Una
161
- * sola, porque la misma condición escrita de dos maneras se lee distinta en dos
162
- * pantallas y nadie sabe cuál de las dos es la que filtra.
159
+ * It is used by the bar —for the chip of what somebody just asked— and the
160
+ * builder —for the chip and for the tree of what is already built—. Only
161
+ * one, because the same condition written two ways reads differently on two
162
+ * screens and nobody knows which of the two is the one that filters.
163
163
  *
164
- * Toma el RÓTULO ya resuelto y no el campo: quién sabe cómo se llama
165
- * `row_count` es el modelo, y esto sólo sabe armar la frase.
164
+ * It takes the label ALREADY resolved and not the field: who knows what
165
+ * `row_count` is called is the model, and this only knows how to build the sentence.
166
166
  */
167
167
  export declare function sayCondition(label: string, op: string, value: string): string;
168
- /** Cómo se lee una pregunta ya hecha, para la ficha: «el nombre contiene test». */
168
+ /** How an already-made question reads, for the chip: «el nombre contiene test». */
169
169
  export declare function describeCondition(field: QueryField, op: string, value: string): string;