@richardmcquiston01/dashboard-widgets-toolkit 0.15.0 → 0.17.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 +2225 -1904
- package/dist/core.cjs.map +1 -1
- package/dist/core.d.cts +57 -3
- package/dist/core.d.ts +57 -3
- package/dist/core.js +2211 -1905
- package/dist/core.js.map +1 -1
- package/dist/index.cjs +2225 -1904
- 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 +2211 -1905
- package/dist/index.js.map +1 -1
- package/dist/react.cjs +381 -23
- package/dist/react.cjs.map +1 -1
- package/dist/react.d.cts +30 -2
- package/dist/react.d.ts +30 -2
- package/dist/react.js +381 -23
- package/dist/react.js.map +1 -1
- package/dist/{storage-DwJ-vGJg.d.cts → storage-CRBfjiVZ.d.cts} +184 -62
- package/dist/{storage-DwJ-vGJg.d.ts → storage-CRBfjiVZ.d.ts} +184 -62
- package/package.json +1 -1
|
@@ -431,6 +431,14 @@ interface ProviderOptions {
|
|
|
431
431
|
* and check them again on the server.
|
|
432
432
|
*/
|
|
433
433
|
readonly options: OptionValues;
|
|
434
|
+
/**
|
|
435
|
+
* The view being loaded: `base` (the widget's own kind) unless the viewer
|
|
436
|
+
* chose a view the provider supplies (a `views` entry without `convert`), in
|
|
437
|
+
* which case it is that view's key and the payload must be of that view's
|
|
438
|
+
* kind. Converted views never reach the provider: they are built from the
|
|
439
|
+
* `base` payload.
|
|
440
|
+
*/
|
|
441
|
+
readonly view: string;
|
|
434
442
|
}
|
|
435
443
|
/**
|
|
436
444
|
* Loads one widget's payload. May be sync or async; may throw. The third
|
|
@@ -450,6 +458,11 @@ interface OkWidget {
|
|
|
450
458
|
readonly stale?: boolean;
|
|
451
459
|
/** The widget's resolved option values; present when it declares options. */
|
|
452
460
|
readonly options?: OptionValues;
|
|
461
|
+
/**
|
|
462
|
+
* The view this data was loaded for (`base` or a provider-supplied view's
|
|
463
|
+
* key); present when the widget declares `views`.
|
|
464
|
+
*/
|
|
465
|
+
readonly view?: string;
|
|
453
466
|
}
|
|
454
467
|
interface EmptyWidget {
|
|
455
468
|
readonly definition: WidgetDefinition;
|
|
@@ -500,6 +513,13 @@ interface ResolveOptions extends OptionContext {
|
|
|
500
513
|
* and the option's default is used.
|
|
501
514
|
*/
|
|
502
515
|
readonly optionValues?: Readonly<Record<string, Readonly<Record<string, unknown>> | undefined>>;
|
|
516
|
+
/**
|
|
517
|
+
* The view each widget shows, by widget key. Only views the provider
|
|
518
|
+
* supplies matter here (the provider is asked for that view); converted
|
|
519
|
+
* views are applied later from the base payload. An empty string means no
|
|
520
|
+
* choice (the widget's `defaultView`).
|
|
521
|
+
*/
|
|
522
|
+
readonly viewValues?: Readonly<Record<string, string | undefined>>;
|
|
503
523
|
/**
|
|
504
524
|
* Validate each provider's payload with `validateWidgetData` (and check
|
|
505
525
|
* its kind matches the definition). Default true; turn off only for
|
|
@@ -668,7 +688,7 @@ interface DetailQuery {
|
|
|
668
688
|
readonly pageSize: number;
|
|
669
689
|
}
|
|
670
690
|
/** What a detail provider receives beyond the usual arguments. */
|
|
671
|
-
interface DetailProviderOptions extends ProviderOptions {
|
|
691
|
+
interface DetailProviderOptions extends Omit<ProviderOptions, 'view'> {
|
|
672
692
|
readonly query: DetailQuery;
|
|
673
693
|
}
|
|
674
694
|
/**
|
|
@@ -795,8 +815,14 @@ interface WidgetView {
|
|
|
795
815
|
readonly label: string;
|
|
796
816
|
/** What this view renders; must match what the conversion produces. */
|
|
797
817
|
readonly kind: WidgetKind;
|
|
798
|
-
/**
|
|
799
|
-
|
|
818
|
+
/**
|
|
819
|
+
* Builds this view from the widget's payload. Leave it out and the provider
|
|
820
|
+
* supplies the view instead: it is called with `options.view` set to this
|
|
821
|
+
* view's key and returns a payload of `kind`. That costs one load per view
|
|
822
|
+
* (cached apart), and is the way to show data a conversion can't build, such
|
|
823
|
+
* as a trend behind a KPI.
|
|
824
|
+
*/
|
|
825
|
+
readonly convert?: ViewConversion;
|
|
800
826
|
}
|
|
801
827
|
/** What these functions need from a definition. */
|
|
802
828
|
type ViewsItem = Pick<WidgetDefinition, 'key' | 'kind'> & Partial<Pick<WidgetDefinition, 'views' | 'defaultView' | 'baseViewLabel'>>;
|
|
@@ -812,6 +838,8 @@ declare function viewChoices(item: ViewsItem): readonly {
|
|
|
812
838
|
label: string;
|
|
813
839
|
kind: WidgetKind;
|
|
814
840
|
}[];
|
|
841
|
+
/** Whether the provider supplies this view's payload (it has no `convert`). */
|
|
842
|
+
declare function isProviderView(view: Pick<WidgetView, 'convert'>): boolean;
|
|
815
843
|
/**
|
|
816
844
|
* The view in effect: the viewer's pick when the definition declares it,
|
|
817
845
|
* else `defaultView`, else the base. Always a valid key.
|
|
@@ -819,6 +847,14 @@ declare function viewChoices(item: ViewsItem): readonly {
|
|
|
819
847
|
declare function effectiveViewKey(item: ViewsItem, chosen: string | undefined): string;
|
|
820
848
|
/** The kind the widget renders as under this view key. */
|
|
821
849
|
declare function viewKind(item: ViewsItem, chosen: string | undefined): WidgetKind;
|
|
850
|
+
/**
|
|
851
|
+
* The view the provider is asked for under the viewer's choice: the chosen
|
|
852
|
+
* view when the provider supplies it, else `base` (converted views are built
|
|
853
|
+
* from the base payload, so switching among them never reloads).
|
|
854
|
+
*/
|
|
855
|
+
declare function loadViewKey(item: ViewsItem, chosen: string | undefined): string;
|
|
856
|
+
/** The kind of payload the provider returns for `loadViewKey`. */
|
|
857
|
+
declare function loadViewKind(item: ViewsItem, chosen: string | undefined): WidgetKind;
|
|
822
858
|
/** Options for `convertView`. */
|
|
823
859
|
interface ConvertViewOptions {
|
|
824
860
|
/** Locale for numbers a conversion has to format (graph to table). */
|
|
@@ -837,10 +873,13 @@ declare function convertView(widgetKey: string, view: Pick<WidgetView, 'key' | '
|
|
|
837
873
|
*/
|
|
838
874
|
declare function viewNote(view: WidgetView, data: WidgetData | undefined): string;
|
|
839
875
|
/**
|
|
840
|
-
* The widget as the chosen view shows it
|
|
841
|
-
*
|
|
842
|
-
*
|
|
843
|
-
* failed conversion becomes an `error` widget naming the fix
|
|
876
|
+
* The widget as the chosen view shows it. A converted view gets the payload
|
|
877
|
+
* converted; a view the provider supplies already holds its own payload. The
|
|
878
|
+
* definition's `kind` becomes the view's kind, so renderers work unchanged. A
|
|
879
|
+
* failed conversion becomes an `error` widget naming the fix, and data that
|
|
880
|
+
* was loaded for a different view (a switch is still loading) shows as
|
|
881
|
+
* `loading` rather than in the wrong shape. A widget that isn't `ok`, or whose
|
|
882
|
+
* view is the base, comes back as is.
|
|
844
883
|
*/
|
|
845
884
|
declare function applyView<W extends DashboardWidget>(widget: W, chosen: string | undefined, options?: ConvertViewOptions): DashboardWidget;
|
|
846
885
|
|
|
@@ -931,6 +970,11 @@ interface WidgetDefinition {
|
|
|
931
970
|
readonly defaultView?: string;
|
|
932
971
|
/** What the base view is called in the View field. Default: its kind's name. */
|
|
933
972
|
readonly baseViewLabel?: string;
|
|
973
|
+
/**
|
|
974
|
+
* Set on a clone (see `clones.ts`): the key of the widget it copies. Its
|
|
975
|
+
* data comes from that widget's provider. Authors never set it.
|
|
976
|
+
*/
|
|
977
|
+
readonly sourceKey?: string;
|
|
934
978
|
}
|
|
935
979
|
/** What a viewer may not do to a locked widget. */
|
|
936
980
|
interface WidgetLock {
|
|
@@ -942,6 +986,8 @@ interface WidgetLock {
|
|
|
942
986
|
readonly minimize?: boolean;
|
|
943
987
|
/** Can't be given a title, width or option values of the viewer's own. */
|
|
944
988
|
readonly options?: boolean;
|
|
989
|
+
/** Can't be duplicated into a clone. */
|
|
990
|
+
readonly clone?: boolean;
|
|
945
991
|
}
|
|
946
992
|
/** `WidgetLock` with every default filled in. */
|
|
947
993
|
type ResolvedWidgetLock = Required<WidgetLock>;
|
|
@@ -961,70 +1007,63 @@ declare function sortDefinitions<D extends WidgetDefinition>(definitions: readon
|
|
|
961
1007
|
/** Whether a widget is active and visible to someone with these roles. */
|
|
962
1008
|
declare function isWidgetVisibleTo(definition: WidgetDefinition, roles: readonly string[] | undefined): boolean;
|
|
963
1009
|
|
|
964
|
-
/** The parts of a widget definition that decide its place in a grid. */
|
|
965
|
-
interface GridItem {
|
|
966
|
-
readonly key: string;
|
|
967
|
-
readonly defaultSize?: WidgetSize;
|
|
968
|
-
readonly fill?: WidgetFill;
|
|
969
|
-
readonly width?: number;
|
|
970
|
-
}
|
|
971
|
-
/** Columns in a grid that uses widget `width`. */
|
|
972
|
-
declare const WIDTH_COLUMNS = 12;
|
|
973
|
-
/** Smallest and largest `width`, in twelfths of a row. */
|
|
974
|
-
declare const MIN_WIDGET_WIDTH = 2;
|
|
975
|
-
declare const MAX_WIDGET_WIDTH = 12;
|
|
976
|
-
/** Whether `value` is a valid widget `width`: an integer from 2 to 12. */
|
|
977
|
-
declare function isWidgetWidth(value: unknown): value is number;
|
|
978
|
-
/** The width (in twelfths) a `defaultSize` stands for. Default `medium`. */
|
|
979
|
-
declare function widthForSize(size: WidgetSize | undefined): number;
|
|
980
|
-
/** The 12-column width of an item: its `width`, else from its size. */
|
|
981
|
-
declare function itemWidth(item: GridItem): number;
|
|
982
|
-
/** Whether a grid of `items` should use 12 columns (any item sets `width`). */
|
|
983
|
-
declare function usesWidthColumns(items: readonly GridItem[]): boolean;
|
|
984
|
-
/** Whether the widget should take the columns left over in its row. */
|
|
985
|
-
declare function fillsWidth(fill: WidgetFill | undefined): boolean;
|
|
986
|
-
/** Whether the widget should stretch to the height of its row. */
|
|
987
|
-
declare function fillsHeight(fill: WidgetFill | undefined): boolean;
|
|
988
1010
|
/**
|
|
989
|
-
*
|
|
990
|
-
*
|
|
1011
|
+
* Clones: copies of a widget a viewer made to keep it twice with different
|
|
1012
|
+
* settings (another view, width or option values). A clone is stored as
|
|
1013
|
+
* `{ key, from }` in `layout.clones`, its settings under its own key in
|
|
1014
|
+
* `layout.settings`, and it shares the original's provider. Pure functions,
|
|
1015
|
+
* no I/O.
|
|
991
1016
|
*/
|
|
992
|
-
|
|
1017
|
+
|
|
1018
|
+
/** A widget the viewer made from another. */
|
|
1019
|
+
interface WidgetClone {
|
|
1020
|
+
/** Unique across definitions and clones: `from#1`, `from#2`, ... */
|
|
1021
|
+
readonly key: string;
|
|
1022
|
+
/** The original's key. Always an original, never another clone. */
|
|
1023
|
+
readonly from: string;
|
|
1024
|
+
}
|
|
993
1025
|
/**
|
|
994
|
-
*
|
|
995
|
-
*
|
|
996
|
-
* not fit), then gives the columns left over in each row to the items that
|
|
997
|
-
* `fill` their width, shared evenly (earlier items get the remainder).
|
|
998
|
-
*
|
|
999
|
-
* Returns the column span for each width-filling item, keyed by `key`. Items
|
|
1000
|
-
* that do not fill width keep their normal size and are not in the map.
|
|
1026
|
+
* Most clones `parseLayout` keeps: a safety ceiling against malformed or
|
|
1027
|
+
* hostile JSON, not a product limit (a page's capacity is the real limit).
|
|
1001
1028
|
*/
|
|
1002
|
-
declare
|
|
1029
|
+
declare const MAX_PARSED_CLONES = 500;
|
|
1030
|
+
/** What these functions need from a definition. */
|
|
1031
|
+
type CloneItem = Pick<WidgetDefinition, 'key'> & Partial<Pick<WidgetDefinition, 'title' | 'locked' | 'sourceKey'>>;
|
|
1032
|
+
/** Options for the clone functions. */
|
|
1033
|
+
interface CloneOptions {
|
|
1034
|
+
/** Keep clones that a widget's `locked.clone` forbids (an administrator). */
|
|
1035
|
+
readonly overrideLocks?: boolean;
|
|
1036
|
+
}
|
|
1003
1037
|
/**
|
|
1004
|
-
*
|
|
1005
|
-
*
|
|
1038
|
+
* Reads the `clones` field of a saved layout. Anything malformed is dropped
|
|
1039
|
+
* (wrong types, empty or repeated keys, a clone of itself). Returns undefined
|
|
1040
|
+
* when nothing usable is left.
|
|
1006
1041
|
*/
|
|
1007
|
-
declare function
|
|
1008
|
-
/**
|
|
1009
|
-
|
|
1010
|
-
|
|
1011
|
-
|
|
1012
|
-
readonly spans: readonly number[];
|
|
1013
|
-
}
|
|
1042
|
+
declare function parseClones(raw: unknown): readonly WidgetClone[] | undefined;
|
|
1043
|
+
/** The JSON-ready form of `layout.clones`; undefined when there are none. */
|
|
1044
|
+
declare function serializeClones(clones: readonly WidgetClone[] | undefined): WidgetClone[] | undefined;
|
|
1045
|
+
/** The number in a clone key (`orders#3` is 3), or undefined. */
|
|
1046
|
+
declare function cloneNumber(key: string): number | undefined;
|
|
1014
1047
|
/**
|
|
1015
|
-
* The
|
|
1016
|
-
*
|
|
1017
|
-
*
|
|
1018
|
-
*
|
|
1019
|
-
*
|
|
1048
|
+
* The clones that can exist for these definitions: the original is a real
|
|
1049
|
+
* widget (not itself a clone), the key doesn't shadow another widget, and the
|
|
1050
|
+
* original's `locked.clone` allows it. Returns the same array when nothing is
|
|
1051
|
+
* dropped. Clones already present as definitions (see `withClones`) count as
|
|
1052
|
+
* valid, so the function is idempotent.
|
|
1020
1053
|
*/
|
|
1021
|
-
declare function
|
|
1054
|
+
declare function cleanClones<D extends CloneItem>(definitions: readonly D[], clones: readonly WidgetClone[] | undefined, options?: CloneOptions): readonly WidgetClone[] | undefined;
|
|
1022
1055
|
/**
|
|
1023
|
-
*
|
|
1024
|
-
*
|
|
1025
|
-
*
|
|
1056
|
+
* The definitions with each clone added right after its original. A clone's
|
|
1057
|
+
* definition copies the original's, with its own key, `sourceKey` set to the
|
|
1058
|
+
* original, the title "Original (#n)" and no locks (a clone is the viewer's
|
|
1059
|
+
* to move, hide and delete). Settings still apply on top (`effectiveDefinitions`).
|
|
1060
|
+
* Pass the result to `useWidgets` so clones load, and to the settings and
|
|
1061
|
+
* layout functions. Idempotent; returns the same array when there are no
|
|
1062
|
+
* clones to add.
|
|
1026
1063
|
*/
|
|
1027
|
-
declare function
|
|
1064
|
+
declare function withClones<D extends CloneItem>(definitions: readonly D[], layout: {
|
|
1065
|
+
readonly clones?: readonly WidgetClone[];
|
|
1066
|
+
}, options?: CloneOptions): readonly D[];
|
|
1028
1067
|
|
|
1029
1068
|
/**
|
|
1030
1069
|
* A viewer's own choices for a widget: a title, a width and values for the
|
|
@@ -1110,6 +1149,18 @@ declare function optionValuesFromLayout(definitions: readonly Pick<SettingsItem,
|
|
|
1110
1149
|
}, options?: {
|
|
1111
1150
|
readonly overrideLocks?: boolean;
|
|
1112
1151
|
}): Record<string, Readonly<Record<string, OptionValue>>>;
|
|
1152
|
+
/**
|
|
1153
|
+
* What to pass `useWidgets({ viewValues })` so views the provider supplies
|
|
1154
|
+
* follow the layout: for every widget that declares one, the viewer's chosen
|
|
1155
|
+
* view key, or an empty string for no choice (its `defaultView`). Listing
|
|
1156
|
+
* every such widget means a cleared choice reaches the loader too. Widgets
|
|
1157
|
+
* with only converted views are left out: they need no provider call.
|
|
1158
|
+
*/
|
|
1159
|
+
declare function viewValuesFromLayout(definitions: readonly Pick<SettingsItem, 'key' | 'views' | 'locked'>[], layout: {
|
|
1160
|
+
readonly settings?: LayoutSettings;
|
|
1161
|
+
}, options?: {
|
|
1162
|
+
readonly overrideLocks?: boolean;
|
|
1163
|
+
}): Record<string, string>;
|
|
1113
1164
|
/** Fields `setWidgetSettings` can change; `undefined` clears one. */
|
|
1114
1165
|
interface WidgetSettingsPatch {
|
|
1115
1166
|
readonly title?: string | undefined;
|
|
@@ -1192,6 +1243,12 @@ interface DashboardLayout {
|
|
|
1192
1243
|
* widget key. See `settings.ts`. Absent when they chose nothing.
|
|
1193
1244
|
*/
|
|
1194
1245
|
readonly settings?: LayoutSettings;
|
|
1246
|
+
/**
|
|
1247
|
+
* Widgets the viewer made from others, as `{ key, from }`. Their settings
|
|
1248
|
+
* live in `settings` under their own key. See `clones.ts`. Absent when
|
|
1249
|
+
* there are none.
|
|
1250
|
+
*/
|
|
1251
|
+
readonly clones?: readonly WidgetClone[];
|
|
1195
1252
|
}
|
|
1196
1253
|
/** One page of a paged layout: the same lists as a layout, plus a name. */
|
|
1197
1254
|
interface LayoutPage {
|
|
@@ -1290,6 +1347,71 @@ interface EnforceLocksOptions {
|
|
|
1290
1347
|
*/
|
|
1291
1348
|
declare function enforceLocks<T extends LayoutItem>(definitions: readonly T[], layout: DashboardLayout, options?: EnforceLocksOptions): DashboardLayout;
|
|
1292
1349
|
|
|
1350
|
+
/** The parts of a widget definition that decide its place in a grid. */
|
|
1351
|
+
interface GridItem {
|
|
1352
|
+
readonly key: string;
|
|
1353
|
+
readonly defaultSize?: WidgetSize;
|
|
1354
|
+
readonly fill?: WidgetFill;
|
|
1355
|
+
readonly width?: number;
|
|
1356
|
+
}
|
|
1357
|
+
/** Columns in a grid that uses widget `width`. */
|
|
1358
|
+
declare const WIDTH_COLUMNS = 12;
|
|
1359
|
+
/** Smallest and largest `width`, in twelfths of a row. */
|
|
1360
|
+
declare const MIN_WIDGET_WIDTH = 2;
|
|
1361
|
+
declare const MAX_WIDGET_WIDTH = 12;
|
|
1362
|
+
/** Whether `value` is a valid widget `width`: an integer from 2 to 12. */
|
|
1363
|
+
declare function isWidgetWidth(value: unknown): value is number;
|
|
1364
|
+
/** The width (in twelfths) a `defaultSize` stands for. Default `medium`. */
|
|
1365
|
+
declare function widthForSize(size: WidgetSize | undefined): number;
|
|
1366
|
+
/** The 12-column width of an item: its `width`, else from its size. */
|
|
1367
|
+
declare function itemWidth(item: GridItem): number;
|
|
1368
|
+
/** Whether a grid of `items` should use 12 columns (any item sets `width`). */
|
|
1369
|
+
declare function usesWidthColumns(items: readonly GridItem[]): boolean;
|
|
1370
|
+
/** Whether the widget should take the columns left over in its row. */
|
|
1371
|
+
declare function fillsWidth(fill: WidgetFill | undefined): boolean;
|
|
1372
|
+
/** Whether the widget should stretch to the height of its row. */
|
|
1373
|
+
declare function fillsHeight(fill: WidgetFill | undefined): boolean;
|
|
1374
|
+
/**
|
|
1375
|
+
* Columns a size takes in a grid of `columns` tracks: `large` spans
|
|
1376
|
+
* `largeSpan` (default 2), `full` spans every column, anything else one.
|
|
1377
|
+
*/
|
|
1378
|
+
declare function baseColumnSpan(size: WidgetSize | undefined, columns: number, largeSpan?: number): number;
|
|
1379
|
+
/**
|
|
1380
|
+
* Places `items` in a grid of `columns` tracks the way a sparse grid
|
|
1381
|
+
* auto-places them (left to right, wrapping to a new row when an item does
|
|
1382
|
+
* not fit), then gives the columns left over in each row to the items that
|
|
1383
|
+
* `fill` their width, shared evenly (earlier items get the remainder).
|
|
1384
|
+
*
|
|
1385
|
+
* Returns the column span for each width-filling item, keyed by `key`. Items
|
|
1386
|
+
* that do not fill width keep their normal size and are not in the map.
|
|
1387
|
+
*/
|
|
1388
|
+
declare function fillColumnSpans(items: readonly GridItem[], columns: number, largeSpan?: number): Map<string, number>;
|
|
1389
|
+
/**
|
|
1390
|
+
* Like `fillColumnSpans` for a 12-column grid: each item starts at its
|
|
1391
|
+
* `width` (see `itemWidth`) and width-fillers share the leftover twelfths.
|
|
1392
|
+
*/
|
|
1393
|
+
declare function fillWidthSpans(items: readonly GridItem[]): Map<string, number>;
|
|
1394
|
+
/** One row of a placed grid: the widgets in it and their final column spans. */
|
|
1395
|
+
interface PlacedRow {
|
|
1396
|
+
readonly keys: readonly string[];
|
|
1397
|
+
/** Column spans, in `keys` order, after width-fillers took the leftovers. */
|
|
1398
|
+
readonly spans: readonly number[];
|
|
1399
|
+
}
|
|
1400
|
+
/**
|
|
1401
|
+
* The rows `items` occupy in a 12-column grid, exactly as `fillWidthSpans`
|
|
1402
|
+
* places them: left to right, a widget that doesn't fit in the rest of a row
|
|
1403
|
+
* starts the next row whole (a widget is never split), and width-fillers then
|
|
1404
|
+
* grow into the leftover columns. Growth never changes how many rows there
|
|
1405
|
+
* are.
|
|
1406
|
+
*/
|
|
1407
|
+
declare function placeRows(items: readonly GridItem[]): readonly PlacedRow[];
|
|
1408
|
+
/**
|
|
1409
|
+
* How many of `items`, in order, fit in `maxRows` rows of a 12-column grid.
|
|
1410
|
+
* Placement is left to right, so this is the length of the longest prefix
|
|
1411
|
+
* whose rows number at most `maxRows`.
|
|
1412
|
+
*/
|
|
1413
|
+
declare function fitCount(items: readonly GridItem[], maxRows: number): number;
|
|
1414
|
+
|
|
1293
1415
|
/**
|
|
1294
1416
|
* Pages of widgets: a dashboard split into pages, like the home screens of a
|
|
1295
1417
|
* phone. Each page is a small layout (order, hidden, minimized) with a name
|
|
@@ -1591,4 +1713,4 @@ interface LayoutPersistence {
|
|
|
1591
1713
|
*/
|
|
1592
1714
|
declare function createLayoutPersistence(adapter: StorageAdapter, options?: LayoutPersistenceOptions): LayoutPersistence;
|
|
1593
1715
|
|
|
1594
|
-
export {
|
|
1716
|
+
export { DEFAULT_MAX_LAYOUT_BYTES as $, type AlertListWidgetData as A, type BarListWidgetData as B, type CloneOptions as C, type DashboardWidget as D, type BooleanOption as E, type CachedPayload as F, type GraphWidgetData as G, type ChoiceOption as H, type CloneItem as I, type ColorOption as J, type KpiWidgetData as K, type Locale as L, type ColumnsOption as M, type NiceDomain as N, type OptionValues as O, type PageItem as P, type ConflictPolicy as Q, type ResolvedTableControls as R, type StoreScope as S, type TableWidgetData as T, type ConvertViewOptions as U, DATE_RANGE_PRESETS as V, type WidgetSize as W, DEFAULT_COMPARISON_LABEL as X, DEFAULT_CURRENCY as Y, DEFAULT_DETAIL_PAGE_SIZE as Z, DEFAULT_EMPTY_TEXT as _, type WidgetFill as a, type SortOption as a$, DEFAULT_PAGE_KEY as a0, DEFAULT_PAGE_ROWS as a1, DETAIL_MODES as a2, type DateRangeOption as a3, type DateRangePreset as a4, type DeltaDirection as a5, type DeltaSentiment as a6, type DetailCell as a7, type DetailColumn as a8, type DetailMode as a9, MAX_PARSED_CLONES as aA, MAX_PARSED_PAGES as aB, MAX_PARSED_SETTINGS as aC, MAX_TEXT_OPTION_LENGTH as aD, MAX_WIDGET_OPTIONS as aE, MAX_WIDGET_TITLE_LENGTH as aF, MAX_WIDGET_VIEWS as aG, MAX_WIDGET_WIDTH as aH, MIN_WIDGET_WIDTH as aI, type NormalizeSettingsOptions as aJ, type NumberOption as aK, OPTION_KEY_PATTERN as aL, type Ok as aM, type OkWidget as aN, type OptionContext as aO, type OptionValue as aP, type PageRoom as aQ, type PlacedRow as aR, type ProviderOptions as aS, type ResolvedDetailOptions as aT, type ResolvedWidget as aU, type ResolvedWidgetLock as aV, type RetryOptions as aW, type SaveOptions as aX, type SavedLayout as aY, type SettingsItem as aZ, type SortDirection as a_, type DetailPage as aa, type DetailProvider as ab, type DetailProviders as ac, EMPTY_LAYOUT as ad, type EmptyWidget as ae, type EncodingOptions as af, type EnforceLocksOptions as ag, type Err as ah, type ErrorWidget as ai, type FormatOptions as aj, type GraphPoint as ak, type GraphSeries as al, type GridItem as am, type KpiDelta as an, type KpiDeltaOptions as ao, LAYOUT_ENVELOPE_VERSION as ap, type LayoutItem as aq, type LayoutPage as ar, type LayoutPersistenceOptions as as, type LayoutSettings as at, type LoadedLayout as au, type LoadingWidget as av, MAX_DETAIL_PAGE_SIZE as aw, MAX_GRAPH_SERIES as ax, MAX_PAGE_ROWS as ay, MAX_PAGE_TITLE_LENGTH as az, type WidgetDefinition as b, hasPages as b$, type StorageAdapter as b0, type StorageLogEvent as b1, type StoreErrorCode as b2, type StoreResult as b3, type StoredValue as b4, type TableCell as b5, type TableColumn as b6, type TextOption as b7, VALUE_FORMATS as b8, VIEW_CONVERSIONS as b9, clearWidgetSettings as bA, cloneNumber as bB, coerceOptionValue as bC, convertView as bD, createLayoutPersistence as bE, defaultDetailQuery as bF, defaultOptionValue as bG, defineWidget as bH, deriveDetailData as bI, describeUnknownError as bJ, effectiveDefinitions as bK, effectiveViewKey as bL, emptyTextFor as bM, emptyWidget as bN, enforceLocks as bO, err as bP, failedWidget as bQ, fillColumnSpans as bR, fillWidthSpans as bS, fillsHeight as bT, fillsWidth as bU, finalizeWidget as bV, findView as bW, fitCount as bX, formatCount as bY, formatPercentChange as bZ, formatValue as b_, type ValueFormat as ba, type ViewConversion as bb, type ViewsItem as bc, WIDGET_FILLS as bd, WIDGET_KINDS as be, WIDGET_OPTION_TYPES as bf, WIDGET_SIZES as bg, WIDTH_COLUMNS as bh, type WidgetCache as bi, type WidgetDataOf as bj, type WidgetDetailOptions as bk, type WidgetEmptyState as bl, type WidgetLock as bm, type WidgetOption as bn, type WidgetProvider as bo, type WidgetStatus as bp, type WidgetTableControls as bq, type WidgetView as br, addPage as bs, applyClientOptions as bt, applySettings as bu, applyView as bv, assignPages as bw, baseColumnSpan as bx, cacheKeyFor as by, cleanClones as bz, type DetailProviderOptions as c, resolveTableControls as c$, hasViews as c0, hiddenWidgets as c1, hideWidget as c2, isClientApplied as c3, isColumnKeyFor as c4, isFlexible as c5, isHidden as c6, isIsoInterval as c7, isMinimized as c8, isOptionsLocked as c9, normalizeTitle as cA, ok as cB, optionValuesFor as cC, optionValuesFromLayout as cD, optionsCacheSuffix as cE, pageLayout as cF, pageList as cG, pageOf as cH, pageRoom as cI, pageWidgets as cJ, parseClones as cK, parseDetailQuery as cL, parseLayout as cM, parseSettings as cN, parseSortValue as cO, percentChange as cP, placeRows as cQ, pruneLayout as cR, queryRows as cS, readOnly as cT, removePage as cU, renamePage as cV, resolveDateRange as cW, resolveDetailOptions as cX, resolveOptionValues as cY, resolvePageKey as cZ, resolvePayload as c_, isProviderView as ca, isTitleInUse as cb, isWidgetEmptyState as cc, isWidgetKind as cd, isWidgetVisibleTo as ce, isWidgetWidth as cf, itemWidth as cg, kindLabel as ch, kpiDelta as ci, labelStride as cj, loadViewKey as ck, loadViewKind as cl, loadingWidgets as cm, memoryAdapter as cn, minimizeWidget as co, movePage as cp, moveWidget as cq, moveWidgetBy as cr, moveWidgetDown as cs, moveWidgetToPage as ct, moveWidgetUp as cu, nextPageKey as cv, niceDomain as cw, niceStep as cx, normalizeLayout as cy, normalizeSettings as cz, type DetailData as d, resolveWidget as d0, resolveWidgetLock as d1, resolveWidgetUnapplied as d2, resolveWidgets as d3, restoreWidget as d4, sameOptionValues as d5, serializeClones as d6, serializeDetailQuery as d7, serializeLayout as d8, serializeSettings as d9, withPageLayout as dA, withPrefix as dB, withReadCache as dC, withRetry as dD, setWidgetSettings as da, shareOf as db, showWidget as dc, sortDefinitions as dd, sortFromOptions as de, tableDetailData as df, toggleHidden as dg, toggleMinimized as dh, usesWidthColumns as di, utf8Length as dj, validateDetailData as dk, viewChoices as dl, viewKind as dm, viewNote as dn, viewValuesFromLayout as dp, visibleWidgets as dq, widgetOptionValues as dr, widgetsFor as ds, widthForSize as dt, widthRange as du, widthShareLabel as dv, withClones as dw, withEncoding as dx, withFallback as dy, withLogging as dz, type DetailQuery as e, type DashboardLayout as f, type WidgetViewerSettings as g, type WidgetSettingsPatch as h, type GaugeWidgetData as i, type DetailSort as j, type TextWidgetData as k, type WidgetData as l, type LayoutPersistence as m, type NormalizeOptions as n, type ResolveOptions as o, type WidgetContext as p, type WidgetProviders as q, type PageOptions as r, type Result as s, type WidgetClone as t, type WidgetKind as u, type WidgetPayload as v, type AddPageOptions as w, type AlertListItem as x, BASE_VIEW_KEY as y, type BarListItem as z };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@richardmcquiston01/dashboard-widgets-toolkit",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.17.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",
|