@richardmcquiston01/dashboard-widgets-toolkit 0.6.0 → 0.7.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/react.d.cts CHANGED
@@ -1,5 +1,5 @@
1
1
  import { ReactNode, RefObject } from 'react';
2
- import { D as DashboardWidget, W as WidgetSize, a as WidgetFill, G as GraphWidgetData, N as NiceDomain, b as WidgetDefinition, c as DetailProviderOptions, d as DetailData, e as DetailQuery, L as Locale, f as DashboardLayout, A as AlertListWidgetData, B as BarListWidgetData, g as GaugeWidgetData, K as KpiWidgetData, T as TableWidgetData, R as ResolvedTableControls, h as TextWidgetData, i as WidgetData, j as ResolveOptions, k as WidgetContext, l as WidgetProviders } from './scale-D51ZGIF4.cjs';
2
+ import { D as DashboardWidget, W as WidgetSize, a as WidgetFill, G as GraphWidgetData, N as NiceDomain, b as WidgetDefinition, c as DetailProviderOptions, d as DetailData, e as DetailQuery, L as Locale, f as DashboardLayout, A as AlertListWidgetData, B as BarListWidgetData, g as GaugeWidgetData, K as KpiWidgetData, T as TableWidgetData, R as ResolvedTableControls, h as TextWidgetData, i as WidgetData, j as ResolveOptions, k as WidgetContext, l as WidgetProviders } from './scale-W60sXwlI.cjs';
3
3
 
4
4
  interface WidgetCardProps {
5
5
  readonly title: string;
package/dist/react.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import { ReactNode, RefObject } from 'react';
2
- import { D as DashboardWidget, W as WidgetSize, a as WidgetFill, G as GraphWidgetData, N as NiceDomain, b as WidgetDefinition, c as DetailProviderOptions, d as DetailData, e as DetailQuery, L as Locale, f as DashboardLayout, A as AlertListWidgetData, B as BarListWidgetData, g as GaugeWidgetData, K as KpiWidgetData, T as TableWidgetData, R as ResolvedTableControls, h as TextWidgetData, i as WidgetData, j as ResolveOptions, k as WidgetContext, l as WidgetProviders } from './scale-D51ZGIF4.js';
2
+ import { D as DashboardWidget, W as WidgetSize, a as WidgetFill, G as GraphWidgetData, N as NiceDomain, b as WidgetDefinition, c as DetailProviderOptions, d as DetailData, e as DetailQuery, L as Locale, f as DashboardLayout, A as AlertListWidgetData, B as BarListWidgetData, g as GaugeWidgetData, K as KpiWidgetData, T as TableWidgetData, R as ResolvedTableControls, h as TextWidgetData, i as WidgetData, j as ResolveOptions, k as WidgetContext, l as WidgetProviders } from './scale-W60sXwlI.js';
3
3
 
4
4
  interface WidgetCardProps {
5
5
  readonly title: string;
package/dist/react.js CHANGED
@@ -2330,6 +2330,14 @@ function optionalNumber(record, field, path, problems) {
2330
2330
  requireNumber(record, field, path, problems);
2331
2331
  }
2332
2332
  }
2333
+ function optionalSortValue(record, path, problems) {
2334
+ const value = record["value"];
2335
+ if (value !== void 0 && typeof value !== "string" && !(typeof value === "number" && Number.isFinite(value))) {
2336
+ problems.push(
2337
+ `${path}.value must be a string or a finite number, got ${describeType2(value)}.`
2338
+ );
2339
+ }
2340
+ }
2333
2341
  function optionalBoolean(record, field, path, problems) {
2334
2342
  const value = record[field];
2335
2343
  if (value !== void 0 && typeof value !== "boolean") {
@@ -2433,6 +2441,7 @@ function checkPayloadFields(kind, data, problems) {
2433
2441
  }
2434
2442
  eachRecord(row, rowPath, problems, (cell, cellPath) => {
2435
2443
  requireString(cell, "text", cellPath, problems);
2444
+ optionalSortValue(cell, cellPath, problems);
2436
2445
  optionalUrl(
2437
2446
  cell,
2438
2447
  "href",