@columenlabs/lumen-ui 0.1.14 → 0.1.15
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/lumen-widget.js +6 -2
- package/package.json +2 -2
package/dist/lumen-widget.js
CHANGED
|
@@ -6,7 +6,7 @@ import { OUTLOOK_INDEXES, marketWindows, } from '@columenlabs/lumen-ui-types/mar
|
|
|
6
6
|
// nothing new is fetched; market and price chart widgets read their own data. LumenLayout lays the
|
|
7
7
|
// cards out; this file draws the card frame every card shares (its header, ↻ and ⋯ menu), each
|
|
8
8
|
// widget, the Edit layout bar, Add widget (Pre-built and Build your own) and Edit widget.
|
|
9
|
-
import { ALLOCATION_MAX, VIEW_CARD_KIND_NAMES, WIDGET_STYLES, controlOn, isDollarFormat, isRowCard, isTableCard, trendBuckets, viewCardKinds, viewCardSchema, viewWidgetCatalog, widgetStyleId, widgetStyleOf, } from '@columenlabs/lumen-ui-types/views';
|
|
9
|
+
import { ALLOCATION_MAX, VIEW_CARD_KIND_NAMES, WIDGET_STYLES, controlOn, isDollarFormat, isOwnTile, isRowCard, isTableCard, trendBuckets, viewCardKinds, viewCardSchema, viewWidgetCatalog, widgetStyleId, widgetStyleOf, } from '@columenlabs/lumen-ui-types/views';
|
|
10
10
|
import { ActivityIcon, ArrowDownIcon, ArrowUpIcon, BarChart3Icon, CandlestickChartIcon, ChartLineIcon, ChartPieIcon, CheckIcon, CodeIcon, CopyIcon, DatabaseIcon, EyeOffIcon, FoldVerticalIcon, FunnelIcon, GripVerticalIcon, InfoIcon, LayoutGridIcon, ListOrderedIcon, MoreHorizontalIcon, PackageIcon, PencilIcon, PlusIcon, RotateCcwIcon, Rows3Icon, SparklesIcon, SquareIcon, TableIcon, Trash2Icon, TrendingUpIcon, WrenchIcon, XIcon, } from 'lucide-react';
|
|
11
11
|
import { useEffect, useMemo, useRef, useState } from 'react';
|
|
12
12
|
import { useAssistant, useAssistantName } from './assistant-context.js';
|
|
@@ -381,10 +381,14 @@ export function LumenSavedWidget({ widget, title, domain, rows, fields, merge, o
|
|
|
381
381
|
const number = widget.kind === 'metric' && 'tile' in widget;
|
|
382
382
|
const head = row ? domain.tilesHead?.(rows) : undefined;
|
|
383
383
|
const compact = number;
|
|
384
|
+
// A Number widget reads as its main number's label over the number; its name stands in without one.
|
|
385
|
+
const label = widget.kind === 'metric' && 'tile' in widget && isOwnTile(widget.tile)
|
|
386
|
+
? widget.tile.label.trim()
|
|
387
|
+
: '';
|
|
384
388
|
const frame = {
|
|
385
389
|
id: widget.id,
|
|
386
390
|
kind: widget.kind,
|
|
387
|
-
title: head?.title ?? title,
|
|
391
|
+
title: head?.title ?? (label || title),
|
|
388
392
|
compact,
|
|
389
393
|
controls,
|
|
390
394
|
link,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@columenlabs/lumen-ui",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.15",
|
|
4
4
|
"description": "Lumen: shared React components (frame, views, widgets, charts, drawers).",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -41,7 +41,7 @@
|
|
|
41
41
|
"@codemirror/lang-javascript": "6.2.5",
|
|
42
42
|
"@codemirror/lang-json": "6.0.2",
|
|
43
43
|
"@codemirror/lang-sql": "6.10.0",
|
|
44
|
-
"@columenlabs/lumen-ui-types": "0.1.
|
|
44
|
+
"@columenlabs/lumen-ui-types": "0.1.15",
|
|
45
45
|
"@dnd-kit/core": "6.3.1",
|
|
46
46
|
"@dnd-kit/sortable": "10.0.0",
|
|
47
47
|
"@dnd-kit/utilities": "3.2.2",
|