@richardmcquiston01/dashboard-widgets-toolkit 0.1.0 → 0.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.
- package/README.md +23 -0
- package/dist/core.cjs +53 -0
- package/dist/core.cjs.map +1 -1
- package/dist/core.d.cts +29 -3
- package/dist/core.d.ts +29 -3
- package/dist/core.js +49 -1
- package/dist/core.js.map +1 -1
- package/dist/index.cjs +53 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +49 -1
- package/dist/index.js.map +1 -1
- package/dist/react.cjs +94 -2
- package/dist/react.cjs.map +1 -1
- package/dist/react.d.cts +11 -2
- package/dist/react.d.ts +11 -2
- package/dist/react.js +95 -3
- package/dist/react.js.map +1 -1
- package/dist/{scale-WlRozDCf.d.cts → scale-Bhjc5Eqt.d.cts} +11 -1
- package/dist/{scale-WlRozDCf.d.ts → scale-Bhjc5Eqt.d.ts} +11 -1
- package/dist/styles.css +4 -0
- package/package.json +1 -1
|
@@ -158,6 +158,14 @@ declare function emptyTextFor(payload: WidgetPayload): string | null;
|
|
|
158
158
|
/** A size hint for grid layouts; renderers may map it to column spans. */
|
|
159
159
|
declare const WIDGET_SIZES: readonly ["small", "medium", "large", "full"];
|
|
160
160
|
type WidgetSize = (typeof WIDGET_SIZES)[number];
|
|
161
|
+
/**
|
|
162
|
+
* How a widget fills free space in a grid layout. `height` stretches it to
|
|
163
|
+
* the height of its row; `width` widens it to take the columns left over in
|
|
164
|
+
* its row; `both` does both. Absent, a widget is only as big as its content
|
|
165
|
+
* and `defaultSize`.
|
|
166
|
+
*/
|
|
167
|
+
declare const WIDGET_FILLS: readonly ["height", "width", "both"];
|
|
168
|
+
type WidgetFill = (typeof WIDGET_FILLS)[number];
|
|
161
169
|
/**
|
|
162
170
|
* What a widget is, independent of its data. Mirrors Maker Toolkit's
|
|
163
171
|
* `widget` table (`widget_key`, `title`, `description`, `view_type`,
|
|
@@ -176,6 +184,8 @@ interface WidgetDefinition {
|
|
|
176
184
|
/** False hides it from every user. Default true. */
|
|
177
185
|
readonly active?: boolean;
|
|
178
186
|
readonly defaultSize?: WidgetSize;
|
|
187
|
+
/** Fill free space in the row (height, width or both). Default: none. */
|
|
188
|
+
readonly fill?: WidgetFill;
|
|
179
189
|
}
|
|
180
190
|
/**
|
|
181
191
|
* Identity helper that keeps the literal `kind` (so typed providers can be
|
|
@@ -413,4 +423,4 @@ declare function niceDomain(values: readonly number[], tickCount?: number): Nice
|
|
|
413
423
|
*/
|
|
414
424
|
declare function labelStride(count: number, maxLabels?: number): number;
|
|
415
425
|
|
|
416
|
-
export {
|
|
426
|
+
export { emptyWidget as $, type AlertListWidgetData as A, type BarListWidgetData as B, type ValueFormat as C, type DashboardWidget as D, EMPTY_LAYOUT as E, type FormatOptions as F, type GraphWidgetData as G, WIDGET_FILLS as H, WIDGET_KINDS as I, WIDGET_SIZES as J, type KpiWidgetData as K, type Locale as L, MAX_GRAPH_SERIES as M, type NiceDomain as N, type OkWidget as O, type WidgetContext as P, type WidgetDataOf as Q, type ResolveOptions as R, type WidgetEmptyState as S, type TableWidgetData as T, type WidgetProvider as U, VALUE_FORMATS as V, type WidgetSize as W, type WidgetProviders as X, type WidgetStatus as Y, defineWidget as Z, emptyTextFor as _, type WidgetFill as a, failedWidget as a0, formatCount as a1, formatPercentChange as a2, formatValue as a3, hiddenWidgets as a4, hideWidget as a5, isHidden as a6, isMinimized as a7, isWidgetEmptyState as a8, isWidgetKind as a9, isWidgetVisibleTo as aa, kpiDelta as ab, labelStride as ac, loadingWidgets as ad, minimizeWidget as ae, moveWidget as af, moveWidgetBy as ag, moveWidgetDown as ah, moveWidgetUp as ai, niceDomain as aj, niceStep as ak, parseLayout as al, percentChange as am, pruneLayout as an, resolvePayload as ao, resolveWidget as ap, resolveWidgets as aq, restoreWidget as ar, serializeLayout as as, shareOf as at, showWidget as au, sortDefinitions as av, toggleHidden as aw, toggleMinimized as ax, visibleWidgets as ay, widgetsFor as az, type DashboardLayout as b, type GaugeWidgetData as c, type TextWidgetData as d, type WidgetData as e, type WidgetDefinition as f, type WidgetKind as g, type WidgetPayload as h, type AlertListItem as i, type BarListItem as j, DEFAULT_COMPARISON_LABEL as k, DEFAULT_CURRENCY as l, DEFAULT_EMPTY_TEXT as m, type DeltaDirection as n, type DeltaSentiment as o, type EmptyWidget as p, type ErrorWidget as q, type GraphPoint as r, type GraphSeries as s, type KpiDelta as t, type KpiDeltaOptions as u, type LayoutItem as v, type LoadingWidget as w, type ResolvedWidget as x, type TableCell as y, type TableColumn as z };
|
|
@@ -158,6 +158,14 @@ declare function emptyTextFor(payload: WidgetPayload): string | null;
|
|
|
158
158
|
/** A size hint for grid layouts; renderers may map it to column spans. */
|
|
159
159
|
declare const WIDGET_SIZES: readonly ["small", "medium", "large", "full"];
|
|
160
160
|
type WidgetSize = (typeof WIDGET_SIZES)[number];
|
|
161
|
+
/**
|
|
162
|
+
* How a widget fills free space in a grid layout. `height` stretches it to
|
|
163
|
+
* the height of its row; `width` widens it to take the columns left over in
|
|
164
|
+
* its row; `both` does both. Absent, a widget is only as big as its content
|
|
165
|
+
* and `defaultSize`.
|
|
166
|
+
*/
|
|
167
|
+
declare const WIDGET_FILLS: readonly ["height", "width", "both"];
|
|
168
|
+
type WidgetFill = (typeof WIDGET_FILLS)[number];
|
|
161
169
|
/**
|
|
162
170
|
* What a widget is, independent of its data. Mirrors Maker Toolkit's
|
|
163
171
|
* `widget` table (`widget_key`, `title`, `description`, `view_type`,
|
|
@@ -176,6 +184,8 @@ interface WidgetDefinition {
|
|
|
176
184
|
/** False hides it from every user. Default true. */
|
|
177
185
|
readonly active?: boolean;
|
|
178
186
|
readonly defaultSize?: WidgetSize;
|
|
187
|
+
/** Fill free space in the row (height, width or both). Default: none. */
|
|
188
|
+
readonly fill?: WidgetFill;
|
|
179
189
|
}
|
|
180
190
|
/**
|
|
181
191
|
* Identity helper that keeps the literal `kind` (so typed providers can be
|
|
@@ -413,4 +423,4 @@ declare function niceDomain(values: readonly number[], tickCount?: number): Nice
|
|
|
413
423
|
*/
|
|
414
424
|
declare function labelStride(count: number, maxLabels?: number): number;
|
|
415
425
|
|
|
416
|
-
export {
|
|
426
|
+
export { emptyWidget as $, type AlertListWidgetData as A, type BarListWidgetData as B, type ValueFormat as C, type DashboardWidget as D, EMPTY_LAYOUT as E, type FormatOptions as F, type GraphWidgetData as G, WIDGET_FILLS as H, WIDGET_KINDS as I, WIDGET_SIZES as J, type KpiWidgetData as K, type Locale as L, MAX_GRAPH_SERIES as M, type NiceDomain as N, type OkWidget as O, type WidgetContext as P, type WidgetDataOf as Q, type ResolveOptions as R, type WidgetEmptyState as S, type TableWidgetData as T, type WidgetProvider as U, VALUE_FORMATS as V, type WidgetSize as W, type WidgetProviders as X, type WidgetStatus as Y, defineWidget as Z, emptyTextFor as _, type WidgetFill as a, failedWidget as a0, formatCount as a1, formatPercentChange as a2, formatValue as a3, hiddenWidgets as a4, hideWidget as a5, isHidden as a6, isMinimized as a7, isWidgetEmptyState as a8, isWidgetKind as a9, isWidgetVisibleTo as aa, kpiDelta as ab, labelStride as ac, loadingWidgets as ad, minimizeWidget as ae, moveWidget as af, moveWidgetBy as ag, moveWidgetDown as ah, moveWidgetUp as ai, niceDomain as aj, niceStep as ak, parseLayout as al, percentChange as am, pruneLayout as an, resolvePayload as ao, resolveWidget as ap, resolveWidgets as aq, restoreWidget as ar, serializeLayout as as, shareOf as at, showWidget as au, sortDefinitions as av, toggleHidden as aw, toggleMinimized as ax, visibleWidgets as ay, widgetsFor as az, type DashboardLayout as b, type GaugeWidgetData as c, type TextWidgetData as d, type WidgetData as e, type WidgetDefinition as f, type WidgetKind as g, type WidgetPayload as h, type AlertListItem as i, type BarListItem as j, DEFAULT_COMPARISON_LABEL as k, DEFAULT_CURRENCY as l, DEFAULT_EMPTY_TEXT as m, type DeltaDirection as n, type DeltaSentiment as o, type EmptyWidget as p, type ErrorWidget as q, type GraphPoint as r, type GraphSeries as s, type KpiDelta as t, type KpiDeltaOptions as u, type LayoutItem as v, type LoadingWidget as w, type ResolvedWidget as x, type TableCell as y, type TableColumn as z };
|
package/dist/styles.css
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@richardmcquiston01/dashboard-widgets-toolkit",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.2.0",
|
|
4
4
|
"description": "Framework-agnostic dashboard widget toolkit: typed widget definitions and data payloads (KPI, gauge, table, bar list, alert list, chart), user layout (order, hide, minimise), and React renderers. Bring your own data providers.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"dashboard",
|