@sincpro/web-ui 1.10.0 → 1.11.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/board/Board.d.ts +51 -0
- package/dist/components/board/Board.js +15 -0
- package/dist/components/board/index.d.ts +1 -0
- package/dist/components/board/index.js +2 -0
- package/dist/components/frame/Chart.d.ts +12 -7
- package/dist/components/frame/Chart.js +17 -17
- package/dist/components/frame/FrameView.d.ts +3 -3
- package/dist/components/frame/FrameView.js +79 -26
- package/dist/components/frame/model.d.ts +12 -3
- package/dist/components/frame/model.js +53 -19
- package/dist/components/index.d.ts +1 -0
- package/dist/components/index.js +1 -0
- package/dist/components/listing/AxisLevels.d.ts +24 -0
- package/dist/components/listing/AxisLevels.js +58 -0
- package/dist/components/listing/ChartExplorer.d.ts +79 -0
- package/dist/components/listing/ChartExplorer.js +114 -0
- package/dist/components/listing/PivotExplorer.js +5 -36
- package/dist/components/listing/index.d.ts +2 -0
- package/dist/components/listing/index.js +2 -0
- package/dist/components/listing/set.d.ts +3 -1
- package/dist/foundations/calendar.d.ts +15 -0
- package/dist/foundations/calendar.js +59 -1
- package/dist/foundations/chart.d.ts +126 -0
- package/dist/foundations/chart.js +297 -0
- package/dist/foundations/copy.d.ts +39 -0
- package/dist/foundations/copy.es.js +27 -0
- package/dist/foundations/copy.js +27 -0
- package/dist/foundations/index.d.ts +2 -1
- package/dist/foundations/index.js +4 -1
- package/dist/foundations/pivot.d.ts +9 -0
- package/dist/foundations/pivot.js +1 -0
- package/dist/primitives/chart/Chart.d.ts +39 -0
- package/dist/primitives/chart/Chart.js +235 -0
- package/dist/primitives/chart/index.d.ts +1 -0
- package/dist/primitives/chart/index.js +1 -0
- package/dist/primitives/index.d.ts +1 -0
- package/dist/primitives/index.js +1 -0
- package/dist/primitives/value/Metric.d.ts +13 -2
- package/dist/primitives/value/Metric.js +25 -3
- package/dist/tokens.css +45 -0
- package/dist/views/list/List.d.ts +2 -1
- package/dist/views/list/List.js +8 -1
- package/dist/views/list/ListView.d.ts +1 -1
- package/dist/views/list/ListView.js +37 -5
- package/dist/views/list/index.d.ts +1 -1
- package/dist/views/list/types.d.ts +34 -0
- package/package.json +4 -2
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
import type { RecordCalendarProps } from "../../components/calendar/RecordCalendar.js";
|
|
2
2
|
import type { RecordGanttProps } from "../../components/gantt/RecordGantt.js";
|
|
3
3
|
import type { BoardStages } from "../../components/listing/BoardColumns.js";
|
|
4
|
+
import type { ChartComparison } from "../../components/listing/ChartExplorer.js";
|
|
4
5
|
import type { ListIdentity } from "../../components/listing/ListingBar.js";
|
|
5
6
|
import type { ListPresent } from "../../components/listing/set.js";
|
|
6
7
|
import type { SortField } from "../../components/listing/SortMenu.js";
|
|
7
8
|
import type { ViewIcon } from "../../components/listing/ViewSwitcher.js";
|
|
8
9
|
import type { RecordTimelineProps } from "../../components/timeline/RecordTimeline.js";
|
|
10
|
+
import type { ChartKind, ChartOrder } from "../../foundations/chart.js";
|
|
9
11
|
import type { GroupableField } from "../../foundations/grouping.js";
|
|
10
12
|
import type { Grouping, GroupLevel, Pile } from "../../foundations/grouping.js";
|
|
11
13
|
import type { Pivot, PivotKey, PivotSpec } from "../../foundations/pivot.js";
|
|
@@ -230,6 +232,36 @@ export type ListPivot<T> = {
|
|
|
230
232
|
/** Which of `spec.measures` start on. The first one by default. */
|
|
231
233
|
defaultMeasures?: readonly string[];
|
|
232
234
|
};
|
|
235
|
+
/**
|
|
236
|
+
* EL GRÁFICO de una lista: la vista gráfica de Odoo. Lee lo mismo que el pivote —un
|
|
237
|
+
* `Pivot`, plegado acá con `spec` o afuera con `folded`— y lo dibuja como barras, líneas o
|
|
238
|
+
* torta. Sus niveles SIGUEN al agrupado del buscador: el primero va en el eje y los demás
|
|
239
|
+
* son las series, como en Odoo.
|
|
240
|
+
*/
|
|
241
|
+
export type ListChart<T> = {
|
|
242
|
+
/** Plegado por quien guarda los datos. Sus ejes son los suyos y no se editan acá. */
|
|
243
|
+
folded?: Pivot;
|
|
244
|
+
/** Cómo plegarlo acá, con las filas en la mano: `rows` es el eje, `columns` las series. */
|
|
245
|
+
spec?: PivotSpec<T>;
|
|
246
|
+
/** Por qué campos se puede partir. Con esto los ejes se eligen sobre el gráfico. */
|
|
247
|
+
fields?: readonly GroupableField[];
|
|
248
|
+
/** La medida con la que abre. La primera de `spec.measures`; `COUNT_MEASURE` para el conteo. */
|
|
249
|
+
defaultMeasure?: string;
|
|
250
|
+
/** Varias medidas, cada una su propio gráfico (nunca dos escalas en un eje). */
|
|
251
|
+
defaultMeasures?: readonly string[];
|
|
252
|
+
kind?: ChartKind;
|
|
253
|
+
/** Cómo abre: apilado (por defecto, como Odoo), acumulado, ordenado. */
|
|
254
|
+
stacked?: boolean;
|
|
255
|
+
cumulative?: boolean;
|
|
256
|
+
order?: ChartOrder;
|
|
257
|
+
/** El período anterior, para dibujarlo al lado: los registros de entonces y sus nombres. */
|
|
258
|
+
compare?: ChartComparison<T>;
|
|
259
|
+
/** Una barra, un punto o una porción: abrir los registros que cayeron ahí. */
|
|
260
|
+
onPoint?: (category: PivotKey, series?: PivotKey) => void;
|
|
261
|
+
height?: number | string;
|
|
262
|
+
/** Con qué nombre se baja. */
|
|
263
|
+
fileName?: string;
|
|
264
|
+
};
|
|
233
265
|
export type ListViewProps<T extends object> = {
|
|
234
266
|
items: readonly T[];
|
|
235
267
|
keyOf: (item: T) => string;
|
|
@@ -339,6 +371,8 @@ export type ListViewProps<T extends object> = {
|
|
|
339
371
|
* elegirlo acá sería adivinar la pregunta.
|
|
340
372
|
*/
|
|
341
373
|
pivot?: ListPivot<T>;
|
|
374
|
+
/** El GRÁFICO: el pivote dibujado. Con esto, `present="chart"` dibuja un `ChartExplorer`. */
|
|
375
|
+
chart?: ListChart<T>;
|
|
342
376
|
/** The presentations the application wrote (`List.Present`), by id. */
|
|
343
377
|
faces?: readonly ListFace<T>[];
|
|
344
378
|
present?: ListPresent;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sincpro/web-ui",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.11.1",
|
|
4
4
|
"description": "An enterprise web design system for business software — ERPs, back offices, management tools — in React and Tailwind: tokens, primitives, components and the two views every management screen is made of.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -26,7 +26,8 @@
|
|
|
26
26
|
"types": "./dist/views/index.d.ts",
|
|
27
27
|
"default": "./dist/views/index.js"
|
|
28
28
|
},
|
|
29
|
-
"./tokens.css": "./dist/tokens.css"
|
|
29
|
+
"./tokens.css": "./dist/tokens.css",
|
|
30
|
+
"./*.css": "./dist/*.css"
|
|
30
31
|
},
|
|
31
32
|
"publishConfig": {
|
|
32
33
|
"access": "public"
|
|
@@ -70,6 +71,7 @@
|
|
|
70
71
|
"react-aria": "^3.53.1",
|
|
71
72
|
"react-aria-components": "^1.22.1",
|
|
72
73
|
"react-pdf": "^11.0.0",
|
|
74
|
+
"recharts": "^3.10.1",
|
|
73
75
|
"streamdown": "^2.7.1",
|
|
74
76
|
"tailwind-variants": "^4.0.0",
|
|
75
77
|
"tailwindcss-react-aria-components": "^2.2.0",
|