@nivaro/react 0.3.43 → 0.3.45

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.
Files changed (33) hide show
  1. package/dist/full.css +1 -1
  2. package/dist/hooks/useSessionRecorder.js +1 -1
  3. package/dist/index.d.ts +38 -5
  4. package/dist/shared/components/CollectionBrowserView.js +1390 -1358
  5. package/dist/shared/components/DataTable.js +356 -334
  6. package/dist/shared/components/ProfileView.js +16 -21
  7. package/dist/shared/components/command-center/CommandCenterView.js +90 -355
  8. package/dist/shared/components/command-center/Header.js +70 -0
  9. package/dist/shared/components/command-center/PeekPanel.js +6 -0
  10. package/dist/shared/components/command-center/api.js +26 -0
  11. package/dist/shared/components/command-center/panels/AttentionPanel.js +6 -0
  12. package/dist/shared/components/command-center/panels/FeedPanel.js +33 -0
  13. package/dist/shared/components/command-center/panels/FlowPanel.js +61 -0
  14. package/dist/shared/components/command-center/panels/ForecastPanel.js +6 -0
  15. package/dist/shared/components/command-center/panels/MapPanel.js +74 -0
  16. package/dist/shared/components/command-center/panels/PartnersPanel.js +6 -0
  17. package/dist/shared/components/command-center/panels/PeoplePanel.js +47 -0
  18. package/dist/shared/components/command-center/panels/RegionPicker.js +6 -0
  19. package/dist/shared/components/command-center/panels/SystemPanel.js +53 -0
  20. package/dist/shared/components/command-center/panels/ThroughputPanel.js +6 -0
  21. package/dist/shared/components/command-center/panels/TimeBar.js +10 -0
  22. package/dist/shared/components/command-center/panels/TrafficPanel.js +11 -0
  23. package/dist/shared/components/command-center/panels/WorkloadPanel.js +6 -0
  24. package/dist/shared/components/command-center/panels/registry.js +28 -0
  25. package/dist/shared/components/command-center/state.js +12 -0
  26. package/dist/shared/components/command-center/theme.js +66 -0
  27. package/dist/shared/components/imports/ImportConsole.js +48 -47
  28. package/dist/shared/components/notifications/TestMyRules.js +39 -38
  29. package/dist/shared/components/profile/TeamsConnect.js +2 -2
  30. package/dist/shared/components/queue/QueueQuickFilters.js +81 -63
  31. package/dist/shared/components/queue/QueueWorklist.js +598 -586
  32. package/dist/shared/lib/quick-filter-cascade.js +29 -0
  33. package/package.json +1 -1
@@ -9,7 +9,7 @@ import { noteReplayEvent as _e, createReplayCheckoutState as De } from "../share
9
9
  import { emitReplayTap as Te, setReplayRecorderMode as N, registerReplayCapture as qe, clipEndOffset as Le, withClipKind as Pe } from "../shared/lib/replay-capture.js";
10
10
  import { instrumentConsole as Ne, instrumentRequests as Fe, redactSecrets as Me } from "../shared/lib/replay-context.js";
11
11
  import { instrumentSocket as Oe } from "../shared/lib/replay-socket.js";
12
- const Ue = "nivaro-react@0.3.43", j = 1e4, We = 150, He = 3e3, Ke = 600, $e = (n) => `nvr_replay_resume${n ? `:${n}` : ""}`, G = () => typeof navigator > "u" || navigator.onLine !== !1;
12
+ const Ue = "nivaro-react@0.3.45", j = 1e4, We = 150, He = 3e3, Ke = 600, $e = (n) => `nvr_replay_resume${n ? `:${n}` : ""}`, G = () => typeof navigator > "u" || navigator.onLine !== !1;
13
13
  function Be(n) {
14
14
  return typeof n.url != "string" || typeof fetch != "function" ? null : (f, a) => {
15
15
  const u = typeof n.getToken == "function" ? n.getToken() : void 0, d = { "Content-Type": "application/json" };
package/dist/index.d.ts CHANGED
@@ -1278,6 +1278,14 @@ declare type CascadeRule_2 = {
1278
1278
  on_unavailable?: CascadeSwapConfig;
1279
1279
  };
1280
1280
 
1281
+ /** Another filter's picks: rows of `collection` whose `field` is one of `values`. */
1282
+ declare interface CascadeSelection {
1283
+ collection: string;
1284
+ /** 'id' when the picks are row ids; otherwise the column the picks are values of (a display field). */
1285
+ field: string;
1286
+ values: Array<string | number>;
1287
+ }
1288
+
1281
1289
  /** A parent→child picker cascade. `on_unavailable` opts a rule into the
1282
1290
  * swap: when the USER changes the parent this session and a row's current
1283
1291
  * value is no longer offered under the new parent, the row is re-pointed to
@@ -2159,12 +2167,27 @@ declare interface ColumnPreset {
2159
2167
  columns: string[];
2160
2168
  }
2161
2169
 
2170
+ /**
2171
+ * Command Center — one live board answering "what is happening in the business right now":
2172
+ * where the work physically is (map), what's moving (flow, throughput, feed), what needs
2173
+ * someone (attention), who's on (people) and a one-line system status that hands off to the
2174
+ * Traffic Map (the machine's own board). Every number clicks through to its real surface.
2175
+ *
2176
+ * Structure: this shell owns the board state (state.tsx) and lays out the panel registry
2177
+ * (panels/registry.ts); each panel is its own module reading useCc() + useCcQuery(). The
2178
+ * contract with the API is types.ts.
2179
+ *
2180
+ * Hosts: NivaroProvider + NavigationContext required.
2181
+ */
2162
2182
  export declare function CommandCenterView({
2163
- /** Geo collections offered in the map layer picker; first is the default. */
2164
- geoCollections, recordUrl }: {
2183
+ /** Fallback map collections when the instance has no Command Center config yet. */
2184
+ geoCollections, recordUrl, isAdmin, kiosk }: {
2165
2185
  geoCollections?: string[];
2166
- /** Host route for a clicked pin's record — defaults to the admin shape. */
2186
+ /** Host route for a record — defaults to the admin shape. */
2167
2187
  recordUrl?: (collection: string, id: string) => string;
2188
+ isAdmin?: boolean;
2189
+ /** Wallboard link token (read-only board). */
2190
+ kiosk?: string | null;
2168
2191
  }): JSX.Element;
2169
2192
 
2170
2193
  export declare function CommentPanel({ collection, item, title, defaultExpanded, queuedComments, onQueueComment }: {
@@ -2390,7 +2413,7 @@ export declare function dashboardPretendDownOptions(widgets: Array<{
2390
2413
  field?: string | null;
2391
2414
  }>, labels?: Record<string, string | null | undefined>): PretendDownOption[];
2392
2415
 
2393
- export declare function DataTable<T = Record<string, unknown>>({ columns, rows, rowKey, total, page, limit, isLoading, isError, errorMessage, sort, onSortChange, onPageChange, onRowClick, onRowContextMenu, searchValue, onSearchChange, searchPlaceholder, filterDefs, filterValues, onFilterChange, toolbarRight, emptyMessage, minBodyHeight, fillHeight, footer, hideFilterRow, nowrapCells, density, pinFirstColumn, columnPins, onColumnPinChange, columnFilterRow, hScrollProxy, selectedIds, onSelectionChange, rowClassName, rowDragProps, rowTitle, enterKey, rowGroups, collapsedGroups, onToggleGroup }: DataTableProps<T>): React_2.JSX.Element;
2416
+ export declare function DataTable<T = Record<string, unknown>>({ columns, rows, rowKey, total, page, limit, isLoading, isError, errorMessage, onRetry, sort, onSortChange, onPageChange, onRowClick, onRowContextMenu, searchValue, onSearchChange, searchPlaceholder, filterDefs, filterValues, onFilterChange, toolbarRight, emptyMessage, minBodyHeight, fillHeight, footer, hideFilterRow, nowrapCells, density, pinFirstColumn, columnPins, onColumnPinChange, columnFilterRow, hScrollProxy, selectedIds, onSelectionChange, rowClassName, rowDragProps, rowTitle, enterKey, rowGroups, collapsedGroups, onToggleGroup }: DataTableProps<T>): React_2.JSX.Element;
2394
2417
 
2395
2418
  export declare interface DataTableProps<T = Record<string, unknown>> {
2396
2419
  columns: Column<T>[];
@@ -2402,6 +2425,8 @@ export declare interface DataTableProps<T = Record<string, unknown>> {
2402
2425
  isLoading?: boolean;
2403
2426
  isError?: boolean;
2404
2427
  errorMessage?: string;
2428
+ /** Shown as "Try again" on the error banner. */
2429
+ onRetry?: () => void;
2405
2430
  sort?: string;
2406
2431
  onSortChange?: (sort: string) => void;
2407
2432
  onPageChange: (page: number) => void;
@@ -3377,10 +3402,18 @@ export declare interface FilterDef {
3377
3402
  }[];
3378
3403
  /** 'combobox' only: server-backed autocomplete. Called (debounced) with the search
3379
3404
  * text; overrides `options` when provided. */
3380
- loadOptions?: (search: string) => Promise<{
3405
+ loadOptions?: (search: string, context?: {
3406
+ narrowBy: CascadeSelection[];
3407
+ }) => Promise<{
3381
3408
  label: string;
3382
3409
  value: string;
3383
3410
  }[]>;
3411
+ /** What this facet's values are (rows of `collection` by `field`): other facets' options
3412
+ * cascade from its picks (Zone → its Regions). */
3413
+ cascade?: {
3414
+ collection: string;
3415
+ field: string;
3416
+ };
3384
3417
  /** 'combobox' only: allow selecting multiple values (filter matches ANY of them). */
3385
3418
  multi?: boolean;
3386
3419
  /** Options are narrowed to the viewer's restricted scope — renders an amber badge. */