@richardmcquiston01/dashboard-widgets-toolkit 0.9.0 → 0.11.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/dist/core.cjs +1827 -31
- package/dist/core.cjs.map +1 -1
- package/dist/core.d.cts +13 -48
- package/dist/core.d.ts +13 -48
- package/dist/core.js +1773 -32
- package/dist/core.js.map +1 -1
- package/dist/index.cjs +1827 -31
- 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 +1773 -32
- package/dist/index.js.map +1 -1
- package/dist/react.cjs +1601 -196
- package/dist/react.cjs.map +1 -1
- package/dist/react.d.cts +113 -6
- package/dist/react.d.ts +113 -6
- package/dist/react.js +1602 -198
- package/dist/react.js.map +1 -1
- package/dist/storage-VaaysVnZ.d.cts +1333 -0
- package/dist/storage-VaaysVnZ.d.ts +1333 -0
- package/dist/styles.css +138 -0
- package/package.json +1 -1
- package/dist/scale-CrXxawQn.d.cts +0 -723
- package/dist/scale-CrXxawQn.d.ts +0 -723
package/dist/core.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { b as WidgetDefinition,
|
|
2
|
-
export {
|
|
1
|
+
import { b as WidgetDefinition, D as DashboardWidget, n as WidgetContext, m as ResolveOptions, o as WidgetProviders, p as WidgetKind, q as Result, r as WidgetPayload } from './storage-VaaysVnZ.cjs';
|
|
2
|
+
export { s as AddPageOptions, t as AlertListItem, A as AlertListWidgetData, u as BarListItem, B as BarListWidgetData, v as BooleanOption, C as CachedPayload, w as ChoiceOption, x as ColorOption, y as ColumnsOption, z as ConflictPolicy, E as DATE_RANGE_PRESETS, F as DEFAULT_COMPARISON_LABEL, H as DEFAULT_CURRENCY, I as DEFAULT_DETAIL_PAGE_SIZE, J as DEFAULT_EMPTY_TEXT, M as DEFAULT_MAX_LAYOUT_BYTES, Q as DEFAULT_PAGE_KEY, U as DEFAULT_PAGE_ROWS, V as DETAIL_MODES, f as DashboardLayout, X as DateRangeOption, Y as DateRangePreset, Z as DeltaDirection, _ as DeltaSentiment, $ as DetailCell, a0 as DetailColumn, d as DetailData, a1 as DetailMode, a2 as DetailPage, a3 as DetailProvider, c as DetailProviderOptions, a4 as DetailProviders, e as DetailQuery, h as DetailSort, a5 as EMPTY_LAYOUT, a6 as EmptyWidget, a7 as EncodingOptions, a8 as EnforceLocksOptions, a9 as Err, aa as ErrorWidget, ab as FormatOptions, g as GaugeWidgetData, ac as GraphPoint, ad as GraphSeries, G as GraphWidgetData, ae as GridItem, af as KpiDelta, ag as KpiDeltaOptions, K as KpiWidgetData, ah as LAYOUT_ENVELOPE_VERSION, ai as LayoutItem, aj as LayoutPage, k as LayoutPersistence, ak as LayoutPersistenceOptions, al as LoadedLayout, am as LoadingWidget, L as Locale, an as MAX_DETAIL_PAGE_SIZE, ao as MAX_GRAPH_SERIES, ap as MAX_PAGE_ROWS, aq as MAX_PAGE_TITLE_LENGTH, ar as MAX_PARSED_PAGES, as as MAX_TEXT_OPTION_LENGTH, at as MAX_WIDGET_OPTIONS, au as MAX_WIDGET_WIDTH, av as MIN_WIDGET_WIDTH, N as NiceDomain, l as NormalizeOptions, aw as NumberOption, ax as OPTION_KEY_PATTERN, ay as Ok, az as OkWidget, aA as OptionContext, aB as OptionValue, O as OptionValues, P as PageItem, aC as PageOptions, aD as PageRoom, aE as PlacedRow, aF as ProviderOptions, aG as ResolvedDetailOptions, R as ResolvedTableControls, aH as ResolvedWidget, aI as ResolvedWidgetLock, aJ as RetryOptions, aK as SaveOptions, aL as SavedLayout, aM as SortDirection, aN as SortOption, aO as StorageAdapter, aP as StorageLogEvent, aQ as StoreErrorCode, aR as StoreResult, S as StoreScope, aS as StoredValue, aT as TableCell, aU as TableColumn, T as TableWidgetData, aV as TextOption, i as TextWidgetData, aW as VALUE_FORMATS, aX as ValueFormat, aY as WIDGET_FILLS, aZ as WIDGET_KINDS, a_ as WIDGET_OPTION_TYPES, a$ as WIDGET_SIZES, b0 as WIDTH_COLUMNS, b1 as WidgetCache, j as WidgetData, b2 as WidgetDataOf, b3 as WidgetDetailOptions, b4 as WidgetEmptyState, a as WidgetFill, b5 as WidgetLock, b6 as WidgetOption, b7 as WidgetProvider, W as WidgetSize, b8 as WidgetStatus, b9 as WidgetTableControls, ba as addPage, bb as applyClientOptions, bc as assignPages, bd as baseColumnSpan, be as cacheKeyFor, bf as coerceOptionValue, bg as createLayoutPersistence, bh as defaultDetailQuery, bi as defaultOptionValue, bj as defineWidget, bk as deriveDetailData, bl as describeUnknownError, bm as emptyTextFor, bn as emptyWidget, bo as enforceLocks, bp as err, bq as failedWidget, br as fillColumnSpans, bs as fillWidthSpans, bt as fillsHeight, bu as fillsWidth, bv as finalizeWidget, bw as fitCount, bx as formatCount, by as formatPercentChange, bz as formatValue, bA as hasPages, bB as hiddenWidgets, bC as hideWidget, bD as isClientApplied, bE as isColumnKeyFor, bF as isHidden, bG as isIsoInterval, bH as isMinimized, bI as isWidgetEmptyState, bJ as isWidgetKind, bK as isWidgetVisibleTo, bL as isWidgetWidth, bM as itemWidth, bN as kpiDelta, bO as labelStride, bP as loadingWidgets, bQ as memoryAdapter, bR as minimizeWidget, bS as movePage, bT as moveWidget, bU as moveWidgetBy, bV as moveWidgetDown, bW as moveWidgetToPage, bX as moveWidgetUp, bY as nextPageKey, bZ as niceDomain, b_ as niceStep, b$ as normalizeLayout, c0 as ok, c1 as optionValuesFor, c2 as optionsCacheSuffix, c3 as pageLayout, c4 as pageList, c5 as pageOf, c6 as pageRoom, c7 as pageWidgets, c8 as parseDetailQuery, c9 as parseLayout, ca as parseSortValue, cb as percentChange, cc as placeRows, cd as pruneLayout, ce as queryRows, cf as readOnly, cg as removePage, ch as renamePage, ci as resolveDateRange, cj as resolveDetailOptions, ck as resolveOptionValues, cl as resolvePageKey, cm as resolvePayload, cn as resolveTableControls, co as resolveWidget, cp as resolveWidgetLock, cq as resolveWidgetUnapplied, cr as resolveWidgets, cs as restoreWidget, ct as sameOptionValues, cu as serializeDetailQuery, cv as serializeLayout, cw as shareOf, cx as showWidget, cy as sortDefinitions, cz as sortFromOptions, cA as tableDetailData, cB as toggleHidden, cC as toggleMinimized, cD as usesWidthColumns, cE as utf8Length, cF as validateDetailData, cG as visibleWidgets, cH as widgetsFor, cI as widthForSize, cJ as withEncoding, cK as withFallback, cL as withLogging, cM as withPageLayout, cN as withPrefix, cO as withReadCache, cP as withRetry } from './storage-VaaysVnZ.cjs';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* Maker Toolkit compatibility. Its API (`apps/api/src/widgets`) serves
|
|
@@ -33,51 +33,6 @@ interface LegacyWidgetDefinition {
|
|
|
33
33
|
*/
|
|
34
34
|
declare function fromLegacyDefinition(legacy: LegacyWidgetDefinition): WidgetDefinition | null;
|
|
35
35
|
|
|
36
|
-
/** The parts of a widget definition that decide its place in a grid. */
|
|
37
|
-
interface GridItem {
|
|
38
|
-
readonly key: string;
|
|
39
|
-
readonly defaultSize?: WidgetSize;
|
|
40
|
-
readonly fill?: WidgetFill;
|
|
41
|
-
readonly width?: number;
|
|
42
|
-
}
|
|
43
|
-
/** Columns in a grid that uses widget `width`. */
|
|
44
|
-
declare const WIDTH_COLUMNS = 12;
|
|
45
|
-
/** Smallest and largest `width`, in twelfths of a row. */
|
|
46
|
-
declare const MIN_WIDGET_WIDTH = 2;
|
|
47
|
-
declare const MAX_WIDGET_WIDTH = 12;
|
|
48
|
-
/** Whether `value` is a valid widget `width`: an integer from 2 to 12. */
|
|
49
|
-
declare function isWidgetWidth(value: unknown): value is number;
|
|
50
|
-
/** The width (in twelfths) a `defaultSize` stands for. Default `medium`. */
|
|
51
|
-
declare function widthForSize(size: WidgetSize | undefined): number;
|
|
52
|
-
/** The 12-column width of an item: its `width`, else from its size. */
|
|
53
|
-
declare function itemWidth(item: GridItem): number;
|
|
54
|
-
/** Whether a grid of `items` should use 12 columns (any item sets `width`). */
|
|
55
|
-
declare function usesWidthColumns(items: readonly GridItem[]): boolean;
|
|
56
|
-
/** Whether the widget should take the columns left over in its row. */
|
|
57
|
-
declare function fillsWidth(fill: WidgetFill | undefined): boolean;
|
|
58
|
-
/** Whether the widget should stretch to the height of its row. */
|
|
59
|
-
declare function fillsHeight(fill: WidgetFill | undefined): boolean;
|
|
60
|
-
/**
|
|
61
|
-
* Columns a size takes in a grid of `columns` tracks: `large` spans
|
|
62
|
-
* `largeSpan` (default 2), `full` spans every column, anything else one.
|
|
63
|
-
*/
|
|
64
|
-
declare function baseColumnSpan(size: WidgetSize | undefined, columns: number, largeSpan?: number): number;
|
|
65
|
-
/**
|
|
66
|
-
* Places `items` in a grid of `columns` tracks the way a sparse grid
|
|
67
|
-
* auto-places them (left to right, wrapping to a new row when an item does
|
|
68
|
-
* not fit), then gives the columns left over in each row to the items that
|
|
69
|
-
* `fill` their width, shared evenly (earlier items get the remainder).
|
|
70
|
-
*
|
|
71
|
-
* Returns the column span for each width-filling item, keyed by `key`. Items
|
|
72
|
-
* that do not fill width keep their normal size and are not in the map.
|
|
73
|
-
*/
|
|
74
|
-
declare function fillColumnSpans(items: readonly GridItem[], columns: number, largeSpan?: number): Map<string, number>;
|
|
75
|
-
/**
|
|
76
|
-
* Like `fillColumnSpans` for a 12-column grid: each item starts at its
|
|
77
|
-
* `width` (see `itemWidth`) and width-fillers share the leftover twelfths.
|
|
78
|
-
*/
|
|
79
|
-
declare function fillWidthSpans(items: readonly GridItem[]): Map<string, number>;
|
|
80
|
-
|
|
81
36
|
/**
|
|
82
37
|
* Loads widgets one by one, after the first render, and reports each result
|
|
83
38
|
* as it arrives. It is the logic behind the React `useWidgets` hook, kept
|
|
@@ -117,6 +72,16 @@ interface WidgetLoader {
|
|
|
117
72
|
* than the interval would otherwise be restarted forever and never finish).
|
|
118
73
|
*/
|
|
119
74
|
refresh(key?: string, options?: RefreshOptions): void;
|
|
75
|
+
/**
|
|
76
|
+
* Sets the values chosen for a widget's options (all of them: keys left out
|
|
77
|
+
* go back to their defaults). A choice only the toolkit applies (`sort` or
|
|
78
|
+
* `columns` with `apply: 'client'`) re-derives the payload it already has.
|
|
79
|
+
* A choice your provider sees reloads that widget alone: what is shown stays
|
|
80
|
+
* (marked `stale`) until the new data arrives, and an earlier answer for the
|
|
81
|
+
* same choices comes back from the cache. Does nothing when the resolved
|
|
82
|
+
* values don't change.
|
|
83
|
+
*/
|
|
84
|
+
setOptions(key: string, chosen: Readonly<Record<string, unknown>>): void;
|
|
120
85
|
/** Aborts everything in flight and ignores any later result. */
|
|
121
86
|
dispose(): void;
|
|
122
87
|
}
|
|
@@ -159,4 +124,4 @@ declare function validateWidgetData(value: unknown, options?: ValidateWidgetData
|
|
|
159
124
|
*/
|
|
160
125
|
declare function validateWidgetDefinition(value: unknown): Result<WidgetDefinition>;
|
|
161
126
|
|
|
162
|
-
export { DashboardWidget, type
|
|
127
|
+
export { DashboardWidget, type LegacyWidgetDefinition, MAX_REPORTED_PROBLEMS, type RefreshOptions, ResolveOptions, Result, type ValidateWidgetDataOptions, WidgetContext, WidgetDefinition, WidgetKind, type WidgetLoader, type WidgetLoaderOptions, WidgetPayload, WidgetProviders, createWidgetLoader, fromLegacyDefinition, isSafeHref, isSafeImageUrl, upgradeLegacyWidgetData, validateWidgetData, validateWidgetDefinition };
|
package/dist/core.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { b as WidgetDefinition,
|
|
2
|
-
export {
|
|
1
|
+
import { b as WidgetDefinition, D as DashboardWidget, n as WidgetContext, m as ResolveOptions, o as WidgetProviders, p as WidgetKind, q as Result, r as WidgetPayload } from './storage-VaaysVnZ.js';
|
|
2
|
+
export { s as AddPageOptions, t as AlertListItem, A as AlertListWidgetData, u as BarListItem, B as BarListWidgetData, v as BooleanOption, C as CachedPayload, w as ChoiceOption, x as ColorOption, y as ColumnsOption, z as ConflictPolicy, E as DATE_RANGE_PRESETS, F as DEFAULT_COMPARISON_LABEL, H as DEFAULT_CURRENCY, I as DEFAULT_DETAIL_PAGE_SIZE, J as DEFAULT_EMPTY_TEXT, M as DEFAULT_MAX_LAYOUT_BYTES, Q as DEFAULT_PAGE_KEY, U as DEFAULT_PAGE_ROWS, V as DETAIL_MODES, f as DashboardLayout, X as DateRangeOption, Y as DateRangePreset, Z as DeltaDirection, _ as DeltaSentiment, $ as DetailCell, a0 as DetailColumn, d as DetailData, a1 as DetailMode, a2 as DetailPage, a3 as DetailProvider, c as DetailProviderOptions, a4 as DetailProviders, e as DetailQuery, h as DetailSort, a5 as EMPTY_LAYOUT, a6 as EmptyWidget, a7 as EncodingOptions, a8 as EnforceLocksOptions, a9 as Err, aa as ErrorWidget, ab as FormatOptions, g as GaugeWidgetData, ac as GraphPoint, ad as GraphSeries, G as GraphWidgetData, ae as GridItem, af as KpiDelta, ag as KpiDeltaOptions, K as KpiWidgetData, ah as LAYOUT_ENVELOPE_VERSION, ai as LayoutItem, aj as LayoutPage, k as LayoutPersistence, ak as LayoutPersistenceOptions, al as LoadedLayout, am as LoadingWidget, L as Locale, an as MAX_DETAIL_PAGE_SIZE, ao as MAX_GRAPH_SERIES, ap as MAX_PAGE_ROWS, aq as MAX_PAGE_TITLE_LENGTH, ar as MAX_PARSED_PAGES, as as MAX_TEXT_OPTION_LENGTH, at as MAX_WIDGET_OPTIONS, au as MAX_WIDGET_WIDTH, av as MIN_WIDGET_WIDTH, N as NiceDomain, l as NormalizeOptions, aw as NumberOption, ax as OPTION_KEY_PATTERN, ay as Ok, az as OkWidget, aA as OptionContext, aB as OptionValue, O as OptionValues, P as PageItem, aC as PageOptions, aD as PageRoom, aE as PlacedRow, aF as ProviderOptions, aG as ResolvedDetailOptions, R as ResolvedTableControls, aH as ResolvedWidget, aI as ResolvedWidgetLock, aJ as RetryOptions, aK as SaveOptions, aL as SavedLayout, aM as SortDirection, aN as SortOption, aO as StorageAdapter, aP as StorageLogEvent, aQ as StoreErrorCode, aR as StoreResult, S as StoreScope, aS as StoredValue, aT as TableCell, aU as TableColumn, T as TableWidgetData, aV as TextOption, i as TextWidgetData, aW as VALUE_FORMATS, aX as ValueFormat, aY as WIDGET_FILLS, aZ as WIDGET_KINDS, a_ as WIDGET_OPTION_TYPES, a$ as WIDGET_SIZES, b0 as WIDTH_COLUMNS, b1 as WidgetCache, j as WidgetData, b2 as WidgetDataOf, b3 as WidgetDetailOptions, b4 as WidgetEmptyState, a as WidgetFill, b5 as WidgetLock, b6 as WidgetOption, b7 as WidgetProvider, W as WidgetSize, b8 as WidgetStatus, b9 as WidgetTableControls, ba as addPage, bb as applyClientOptions, bc as assignPages, bd as baseColumnSpan, be as cacheKeyFor, bf as coerceOptionValue, bg as createLayoutPersistence, bh as defaultDetailQuery, bi as defaultOptionValue, bj as defineWidget, bk as deriveDetailData, bl as describeUnknownError, bm as emptyTextFor, bn as emptyWidget, bo as enforceLocks, bp as err, bq as failedWidget, br as fillColumnSpans, bs as fillWidthSpans, bt as fillsHeight, bu as fillsWidth, bv as finalizeWidget, bw as fitCount, bx as formatCount, by as formatPercentChange, bz as formatValue, bA as hasPages, bB as hiddenWidgets, bC as hideWidget, bD as isClientApplied, bE as isColumnKeyFor, bF as isHidden, bG as isIsoInterval, bH as isMinimized, bI as isWidgetEmptyState, bJ as isWidgetKind, bK as isWidgetVisibleTo, bL as isWidgetWidth, bM as itemWidth, bN as kpiDelta, bO as labelStride, bP as loadingWidgets, bQ as memoryAdapter, bR as minimizeWidget, bS as movePage, bT as moveWidget, bU as moveWidgetBy, bV as moveWidgetDown, bW as moveWidgetToPage, bX as moveWidgetUp, bY as nextPageKey, bZ as niceDomain, b_ as niceStep, b$ as normalizeLayout, c0 as ok, c1 as optionValuesFor, c2 as optionsCacheSuffix, c3 as pageLayout, c4 as pageList, c5 as pageOf, c6 as pageRoom, c7 as pageWidgets, c8 as parseDetailQuery, c9 as parseLayout, ca as parseSortValue, cb as percentChange, cc as placeRows, cd as pruneLayout, ce as queryRows, cf as readOnly, cg as removePage, ch as renamePage, ci as resolveDateRange, cj as resolveDetailOptions, ck as resolveOptionValues, cl as resolvePageKey, cm as resolvePayload, cn as resolveTableControls, co as resolveWidget, cp as resolveWidgetLock, cq as resolveWidgetUnapplied, cr as resolveWidgets, cs as restoreWidget, ct as sameOptionValues, cu as serializeDetailQuery, cv as serializeLayout, cw as shareOf, cx as showWidget, cy as sortDefinitions, cz as sortFromOptions, cA as tableDetailData, cB as toggleHidden, cC as toggleMinimized, cD as usesWidthColumns, cE as utf8Length, cF as validateDetailData, cG as visibleWidgets, cH as widgetsFor, cI as widthForSize, cJ as withEncoding, cK as withFallback, cL as withLogging, cM as withPageLayout, cN as withPrefix, cO as withReadCache, cP as withRetry } from './storage-VaaysVnZ.js';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* Maker Toolkit compatibility. Its API (`apps/api/src/widgets`) serves
|
|
@@ -33,51 +33,6 @@ interface LegacyWidgetDefinition {
|
|
|
33
33
|
*/
|
|
34
34
|
declare function fromLegacyDefinition(legacy: LegacyWidgetDefinition): WidgetDefinition | null;
|
|
35
35
|
|
|
36
|
-
/** The parts of a widget definition that decide its place in a grid. */
|
|
37
|
-
interface GridItem {
|
|
38
|
-
readonly key: string;
|
|
39
|
-
readonly defaultSize?: WidgetSize;
|
|
40
|
-
readonly fill?: WidgetFill;
|
|
41
|
-
readonly width?: number;
|
|
42
|
-
}
|
|
43
|
-
/** Columns in a grid that uses widget `width`. */
|
|
44
|
-
declare const WIDTH_COLUMNS = 12;
|
|
45
|
-
/** Smallest and largest `width`, in twelfths of a row. */
|
|
46
|
-
declare const MIN_WIDGET_WIDTH = 2;
|
|
47
|
-
declare const MAX_WIDGET_WIDTH = 12;
|
|
48
|
-
/** Whether `value` is a valid widget `width`: an integer from 2 to 12. */
|
|
49
|
-
declare function isWidgetWidth(value: unknown): value is number;
|
|
50
|
-
/** The width (in twelfths) a `defaultSize` stands for. Default `medium`. */
|
|
51
|
-
declare function widthForSize(size: WidgetSize | undefined): number;
|
|
52
|
-
/** The 12-column width of an item: its `width`, else from its size. */
|
|
53
|
-
declare function itemWidth(item: GridItem): number;
|
|
54
|
-
/** Whether a grid of `items` should use 12 columns (any item sets `width`). */
|
|
55
|
-
declare function usesWidthColumns(items: readonly GridItem[]): boolean;
|
|
56
|
-
/** Whether the widget should take the columns left over in its row. */
|
|
57
|
-
declare function fillsWidth(fill: WidgetFill | undefined): boolean;
|
|
58
|
-
/** Whether the widget should stretch to the height of its row. */
|
|
59
|
-
declare function fillsHeight(fill: WidgetFill | undefined): boolean;
|
|
60
|
-
/**
|
|
61
|
-
* Columns a size takes in a grid of `columns` tracks: `large` spans
|
|
62
|
-
* `largeSpan` (default 2), `full` spans every column, anything else one.
|
|
63
|
-
*/
|
|
64
|
-
declare function baseColumnSpan(size: WidgetSize | undefined, columns: number, largeSpan?: number): number;
|
|
65
|
-
/**
|
|
66
|
-
* Places `items` in a grid of `columns` tracks the way a sparse grid
|
|
67
|
-
* auto-places them (left to right, wrapping to a new row when an item does
|
|
68
|
-
* not fit), then gives the columns left over in each row to the items that
|
|
69
|
-
* `fill` their width, shared evenly (earlier items get the remainder).
|
|
70
|
-
*
|
|
71
|
-
* Returns the column span for each width-filling item, keyed by `key`. Items
|
|
72
|
-
* that do not fill width keep their normal size and are not in the map.
|
|
73
|
-
*/
|
|
74
|
-
declare function fillColumnSpans(items: readonly GridItem[], columns: number, largeSpan?: number): Map<string, number>;
|
|
75
|
-
/**
|
|
76
|
-
* Like `fillColumnSpans` for a 12-column grid: each item starts at its
|
|
77
|
-
* `width` (see `itemWidth`) and width-fillers share the leftover twelfths.
|
|
78
|
-
*/
|
|
79
|
-
declare function fillWidthSpans(items: readonly GridItem[]): Map<string, number>;
|
|
80
|
-
|
|
81
36
|
/**
|
|
82
37
|
* Loads widgets one by one, after the first render, and reports each result
|
|
83
38
|
* as it arrives. It is the logic behind the React `useWidgets` hook, kept
|
|
@@ -117,6 +72,16 @@ interface WidgetLoader {
|
|
|
117
72
|
* than the interval would otherwise be restarted forever and never finish).
|
|
118
73
|
*/
|
|
119
74
|
refresh(key?: string, options?: RefreshOptions): void;
|
|
75
|
+
/**
|
|
76
|
+
* Sets the values chosen for a widget's options (all of them: keys left out
|
|
77
|
+
* go back to their defaults). A choice only the toolkit applies (`sort` or
|
|
78
|
+
* `columns` with `apply: 'client'`) re-derives the payload it already has.
|
|
79
|
+
* A choice your provider sees reloads that widget alone: what is shown stays
|
|
80
|
+
* (marked `stale`) until the new data arrives, and an earlier answer for the
|
|
81
|
+
* same choices comes back from the cache. Does nothing when the resolved
|
|
82
|
+
* values don't change.
|
|
83
|
+
*/
|
|
84
|
+
setOptions(key: string, chosen: Readonly<Record<string, unknown>>): void;
|
|
120
85
|
/** Aborts everything in flight and ignores any later result. */
|
|
121
86
|
dispose(): void;
|
|
122
87
|
}
|
|
@@ -159,4 +124,4 @@ declare function validateWidgetData(value: unknown, options?: ValidateWidgetData
|
|
|
159
124
|
*/
|
|
160
125
|
declare function validateWidgetDefinition(value: unknown): Result<WidgetDefinition>;
|
|
161
126
|
|
|
162
|
-
export { DashboardWidget, type
|
|
127
|
+
export { DashboardWidget, type LegacyWidgetDefinition, MAX_REPORTED_PROBLEMS, type RefreshOptions, ResolveOptions, Result, type ValidateWidgetDataOptions, WidgetContext, WidgetDefinition, WidgetKind, type WidgetLoader, type WidgetLoaderOptions, WidgetPayload, WidgetProviders, createWidgetLoader, fromLegacyDefinition, isSafeHref, isSafeImageUrl, upgradeLegacyWidgetData, validateWidgetData, validateWidgetDefinition };
|