@sfperusacdev/sf-ui 0.2.6 → 0.2.7
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/sf-ui.css +1 -1
- package/dist/sf-ui.js +128 -122
- package/dist/sf-ui.js.map +1 -1
- package/dist/sf-ui.umd.cjs +1 -1
- package/dist/sf-ui.umd.cjs.map +1 -1
- package/dist/types/src/components/dashboard/DashboardPageFrame.d.ts +14 -1
- package/package.json +1 -1
|
@@ -3,13 +3,26 @@ export type DashboardDateRange = {
|
|
|
3
3
|
from: string;
|
|
4
4
|
to: string;
|
|
5
5
|
};
|
|
6
|
+
export type DashboardPageFrameMode = "range" | "day";
|
|
6
7
|
export type DashboardPageFrameProps = {
|
|
7
8
|
title: string;
|
|
8
9
|
/** La pregunta que responde el tablero, debajo del título. */
|
|
9
10
|
subtitle?: string;
|
|
11
|
+
/**
|
|
12
|
+
* `range` (por defecto): filtro Desde / Hasta / Comparar. `day`: el tablero mira un solo día, el filtro muestra
|
|
13
|
+
* un único campo (`dayLabel`) ligado a `range.to`; `onApply` recibe `from` tal como vino en `range` y el consumidor
|
|
14
|
+
* decide qué hacer con él. El tercer campo solo aparece si hay algo que decir (`compareLabel` o borrador pendiente).
|
|
15
|
+
*/
|
|
16
|
+
mode?: DashboardPageFrameMode;
|
|
10
17
|
/** Rango aplicado (YYYY-MM-DD). El marco guarda un borrador aparte hasta que el usuario pulsa «Aplicar». */
|
|
11
18
|
range: DashboardDateRange;
|
|
12
19
|
onApply: (range: DashboardDateRange) => void;
|
|
20
|
+
fromLabel?: string;
|
|
21
|
+
toLabel?: string;
|
|
22
|
+
/** Etiqueta del único campo en modo `day`. */
|
|
23
|
+
dayLabel?: string;
|
|
24
|
+
/** Etiqueta del tercer campo (`Comparar` en modo rango, `Nota` en modo día). */
|
|
25
|
+
compareFieldLabel?: string;
|
|
13
26
|
/** Devuelve el mensaje de error si el borrador no es válido; `null` si se puede aplicar. */
|
|
14
27
|
validate?: (range: DashboardDateRange) => string | null;
|
|
15
28
|
/** Error del rango ya aplicado (p. ej. venía inválido en la URL): se muestra y no se pintan los hijos. */
|
|
@@ -40,4 +53,4 @@ export type DashboardPageFrameProps = {
|
|
|
40
53
|
* botón de actualizar y el filtro de rango de fechas con borrador y validación. Los hijos van dentro de
|
|
41
54
|
* `DashboardLayout`, así que `DashboardBoard` encaja directamente.
|
|
42
55
|
*/
|
|
43
|
-
export declare const DashboardPageFrame: ({ title, subtitle, range, onApply, validate, error, loading, updatedAt, live, cutoffLabel, onRefresh, refreshLabel, compareLabel, pendingLabel, applyLabel, filterAriaLabel, slowAfterSeconds, className, children, }: DashboardPageFrameProps) => import("react").JSX.Element;
|
|
56
|
+
export declare const DashboardPageFrame: ({ title, subtitle, mode, range, onApply, fromLabel, toLabel, dayLabel, compareFieldLabel, validate, error, loading, updatedAt, live, cutoffLabel, onRefresh, refreshLabel, compareLabel, pendingLabel, applyLabel, filterAriaLabel, slowAfterSeconds, className, children, }: DashboardPageFrameProps) => import("react").JSX.Element;
|
package/package.json
CHANGED