@flytedan/flytebot-design-system 0.66.0 → 0.67.1
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/index.cjs +15 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +15 -4
- package/dist/index.d.ts +15 -4
- package/dist/index.js +15 -2
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/styles/components.css +27 -2
package/dist/index.d.cts
CHANGED
|
@@ -1290,6 +1290,16 @@ interface FilterFieldSelect extends FilterFieldBase {
|
|
|
1290
1290
|
type: "select";
|
|
1291
1291
|
options: FilterFieldOption[];
|
|
1292
1292
|
}
|
|
1293
|
+
/** A filter whose value is set from outside FilterBar, by a link or the host's own state (MP-312). Its
|
|
1294
|
+
* chip paints `valueLabel` and carries an x that removes it; the chip opens no picker, and the field
|
|
1295
|
+
* is never offered in the Filter menu, so a person can neither add nor edit it. The value in
|
|
1296
|
+
* `filters` is whatever the host set (any non-empty string); the label is the host's to provide, and
|
|
1297
|
+
* so are loading and error states (pass a placeholder label until the real one is known). */
|
|
1298
|
+
interface FilterFieldFixed extends FilterFieldBase {
|
|
1299
|
+
type: "fixed";
|
|
1300
|
+
/** What the chip paints for the value, e.g. a sheet's name. */
|
|
1301
|
+
valueLabel: string;
|
|
1302
|
+
}
|
|
1293
1303
|
/** Include/exclude, shared by every field whose value is a set of options. */
|
|
1294
1304
|
type FilterOperator = "in" | "notIn";
|
|
1295
1305
|
interface FilterMultiSelectValue {
|
|
@@ -1396,11 +1406,11 @@ interface FilterFieldDate extends FilterFieldBase {
|
|
|
1396
1406
|
* picker. text/select keep their original bare-string value shape unchanged, so an
|
|
1397
1407
|
* existing consumer needs no migration; every other variant's value is a small typed
|
|
1398
1408
|
* object of its own (see FilterValue). */
|
|
1399
|
-
type FilterField = FilterFieldText | FilterFieldSelect | FilterFieldMultiSelect | FilterFieldRange | FilterFieldDate;
|
|
1409
|
+
type FilterField = FilterFieldText | FilterFieldSelect | FilterFieldFixed | FilterFieldMultiSelect | FilterFieldRange | FilterFieldDate;
|
|
1400
1410
|
/** The value shape a given declared field reads/writes, so a consumer can type its own
|
|
1401
1411
|
* `filters` record precisely instead of `Record<string, unknown>` — e.g.
|
|
1402
1412
|
* `Record<"schools", FilterValue<typeof schoolsField>>`. */
|
|
1403
|
-
type FilterValue<F extends FilterField> = F extends FilterFieldText ? string : F extends FilterFieldSelect ? string : F extends FilterFieldMultiSelect ? FilterMultiSelectValue : F extends FilterFieldRange ? FilterRangeValue : F extends FilterFieldDate ? FilterDateValue : never;
|
|
1413
|
+
type FilterValue<F extends FilterField> = F extends FilterFieldText ? string : F extends FilterFieldSelect | FilterFieldFixed ? string : F extends FilterFieldMultiSelect ? FilterMultiSelectValue : F extends FilterFieldRange ? FilterRangeValue : F extends FilterFieldDate ? FilterDateValue : never;
|
|
1404
1414
|
interface FilterBarProps extends Omit<React.HTMLAttributes<HTMLSpanElement>, "onChange"> {
|
|
1405
1415
|
/** Every filter a consumer can add. Order here is the order in the "add filter" list. */
|
|
1406
1416
|
fields: FilterField[];
|
|
@@ -1462,6 +1472,7 @@ type FilterValidation = {
|
|
|
1462
1472
|
* all call it on any candidate value:
|
|
1463
1473
|
* - text: a string.
|
|
1464
1474
|
* - select: one of the field's own option values.
|
|
1475
|
+
* - fixed: nothing; its value is the host's, so no edit is valid.
|
|
1465
1476
|
* - multiSelect: `{ operator, values }` with at least one `{ value, label }` option, no
|
|
1466
1477
|
* more than the field's `maxValues`, and an operator the field allows.
|
|
1467
1478
|
* - date, withinDays: a whole number of days from 1 to the field's maxDays, which is
|
|
@@ -1553,7 +1564,7 @@ interface StatTileDisplayProps extends StatTileBaseProps, React.HTMLAttributes<H
|
|
|
1553
1564
|
* tile wears the brand border and fill. */
|
|
1554
1565
|
interface StatTilePressProps extends StatTileBaseProps, Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, "onClick" | "type" | "disabled" | "value"> {
|
|
1555
1566
|
onPress: () => void;
|
|
1556
|
-
/** Whether the list is currently filtered by this tile.
|
|
1567
|
+
/** Whether the list is currently filtered by this tile. Give it (true or false) only for a tile that toggles a filter: it sets `aria-pressed`. Omit it for a tile that acts without a state (it jumps somewhere), which is then a plain button. */
|
|
1557
1568
|
pressed?: boolean;
|
|
1558
1569
|
/** Shown but cannot be pressed (nothing to go to). A `loading` tile is never pressable either. */
|
|
1559
1570
|
disabled?: boolean;
|
|
@@ -5391,4 +5402,4 @@ declare function CornerStackPortal({ slot, children }: {
|
|
|
5391
5402
|
children?: React.ReactNode;
|
|
5392
5403
|
}): React.ReactPortal | null;
|
|
5393
5404
|
|
|
5394
|
-
export { AccountMenu, type AccountMenuLink, type AccountMenuProps, AgentChatPanel, type AgentChatPanelProps, AnchoredPopover, type AnchoredPopoverProps, AnimNum, type AnimNumProps, ApiSpecBrowser, type ApiSpecBrowserProps, type AppEntry, AppShell, type AppShellProps, AppSwitcher, type AppSwitcherProps, AppearanceMenu, type AppearanceMenuProps, type AppearancePrefs, AppearanceProvider, type AppearanceProviderProps, type AppearanceStore, type AppearanceStoreOptions, type Attachment, Avatar, type AvatarProps, AvatarStack, type AvatarStackProps, Badge, type BadgeProps, Banner, type BannerProps, type BannerTone, BarList, type BarListProps, type BarListRow, BudgetReallocator, type BudgetReallocatorProps, Button, type ButtonProps, CHANNELS, CHANNEL_WEIGHTS, CHAT_UNAVAILABLE, COPIED_FEEDBACK_MS, CORNER_STACK_INSET_PROPERTY, Calendar, type CalendarProps, Card, CardGrid, type CardGridProps, type CardProps, CardRow, type CardRowProps, ChannelContribution, type ChannelContributionChannel, type ChannelContributionProps, ChannelMeta, type ChannelMetaRecord, ChannelTag, type ChannelTagProps, ChannelWeightOf, type ChatAdapter, ChatComposer, type ChatComposerProps, type ChatEngine, type ChatEngineOptions, ChatKit, type ChatMessage, type ChatRenderContext, ChatSessionBar, type ChatSessionBarProps, ChatTranscript, type ChatTranscriptProps, ChatTurn, type ChatTurnProps, Checkbox, type CheckboxProps, type Citation, Citations, type CitationsProps, Clamp, type ClampProps, ClockFace, type ClockFaceProps, CodeBlock, type CodeBlockProps, CodeEditor, type CodeEditorDiagnostic, type CodeEditorProps, Collapsible, type CollapsibleProps, ComingSoon, type ComingSoonProps, type ContextUsage, CornerStackPortal, type CornerStackSlot, type CreateVersionStoreOptions, CsiBadge, type CsiBadgeProps, CsiHero, type CsiHeroProps, CsiMeter, type CsiMeterProps, DEFAULT_PREFS, DEFAULT_STORAGE_KEY, DEFAULT_TOAST_DURATION_MS, DataTable, type DataTableColumn, type DataTablePhoneRole, type DataTableProps, DatePicker, type DatePickerProps, type DemoSessionControls, DemoSessionProvider, type DeviceSession, DiffBlock, type DiffBlockProps, DonutChart, type DonutChartProps, type DonutSegment, Drawer, type DrawerProps, Dropzone, DropzoneKit, type DropzoneProps, ENTITY_ROW_METRIC_WIDTH, type EditorTrigger, EmptyState, type EmptyStateProps, type EndpointSpec, EntityRow, type EntityRowAction, type EntityRowContent, type EntityRowMetric, EntityRowMetrics, type EntityRowMetricsProps, type EntityRowProps, FILE_VIEWER_CSV_ROW_LIMIT, FILE_VIEWER_TEXT_LIMIT, type Fact, FactList, type FactListProps, FeatureGate, type FeatureGateProps, type FeatureStatus, FileBrowser, type FileBrowserFile, type FileBrowserFolder, type FileBrowserPermissions, type FileBrowserProps, FileChip, type FileChipProps, FileGrid, type FileGridProps, FileKit, FilePickButton, type FilePickButtonProps, type FileRejection, FileStrip, type FileStripProps, FileTile, type FileTileProps, type FileUploadHandler, FileViewer, type FileViewerProps, FilterBar, type FilterBarProps, type FilterDateValue, type FilterField, type FilterFieldDate, type FilterFieldMultiSelect, type FilterFieldOption, type FilterFieldRange, type FilterFieldSelect, type FilterFieldText, type FilterMultiSelectValue, type FilterOperator, type FilterRangeValue, type FilterResolveMatch, type FilterResolveResult, type FilterValidation, type FilterValue, Flag$1 as Flag, type FlagExplanation, type FlagProps, FlytedeskBrand, type FlytedeskBrandProps, FlytedeskMark, type FlytedeskMarkProps, FormatEta, FunnelChart, type FunnelChartProps, type FunnelStep, Gate, GatePending, type GatePendingProps, type GateProps, IMPORTANCE_LEVELS, IconButton, type IconButtonProps, type ImportanceLevel, type ImportanceLevelId, ImportanceTag, type ImportanceTagProps, type ImportanceTokens, Input, type InputProps, type Job, type JobAction, type JobCardStatus, type JobStatus, JobTray, type JobTrayProps, Json, KeyHint, type KeyHintProps, type KeysetEnvelope, type KeysetServerTable, LAYER_STEP, type ListEnvelope, LoadingRegion, type LoadingRegionProps, Markdown, MarkdownEditor, type MarkdownEditorHandle, type MarkdownEditorProps, MarkdownInline, type MarkdownProps, type MentionSource, Menu, MenuButton, type MenuButtonProps, type MenuItem, type MenuProps, MessageBody, type MessageBodyProps, type MessageGroup, Meter, type MeterProps, type MeterSegment, type MeterSegmentInput, MixGap, type MixGapProps, type MixGapRow, MockJobKit, type MockJobStatus, Modal, type ModalProps, ModeSwitch, type ModeSwitchProps, type Model, ModelControls, type ModelControlsProps, NumberInput, type NumberInputProps, OVERLAY_CEILING, POPOVER_BODY_MIN, type Packet, PacketCard, type PacketCardProps, type PacketSchema, type Pager, Pagination, type PaginationProps, PermissionDenied, type PermissionDeniedProps, type PermissionGroup, PermissionHint, type PermissionItem, type Phase, type PhaseStatus, PhasedProgress, type PhasedProgressProps, type Placement, type PollOptions, Popover, type PopoverProps, type PreferenceCriterion, PreferenceMeter, type PreferenceMeterProps, type ProfileFieldDef, type ProfileFieldType, type ProfileNotificationDef, ProfilePage, type ProfilePageProps, ProgressBar, type ProgressBarProps, QueryKit, type QueryPaging, type QueryUrlAdapter, type QueryUrlOptions, type QueuedTurn, QuotaRow, type QuotaRowProps, ROOT_STEP, Radio, type RadioProps, RangeSlider, type RangeSliderProps, RelativeTime, type RelativeTimeProps, type RoadmapItem, type RoadmapResult, RoadmapTimeline, type RoadmapTimelineProps, type Role, RunActions, type RunActionsProps, type RunConfig, RuntimeKit, type RuntimeSummary, SaturationDistribution, type SaturationDistributionCampus, type SaturationDistributionProps, ScoreMeter, type ScoreMeterProps, ScreenHead, type ScreenHeadProps, SearchField, type SearchFieldProps, SegmentedControl, type SegmentedControlProps, SegmentedMeter, type SegmentedMeterProps, Select, type SelectOption, type SelectProps, type SendMessageResult, type ServerTable, type ServerTableBase, type Session, type SessionContextValue, type Flag as SessionFlag, SessionKit, SessionProvider, type SessionProviderProps, type SessionRole, SessionScreen, type SessionScreenKind, type SessionScreenProps, type SessionStats, type SessionUser, SidebarNav, type SidebarNavItem, type SidebarNavProps, Skeleton, type SkeletonProps, SkeletonText, type SkeletonTextProps, type SlashCommand, Slider, type SliderProps, type SortDirection, type SortEntry, SortMenu, type SortMenuField, type SortMenuProps, type SpecModule, Spinner, type SpinnerProps, type StackedLayer, type StackedLayerOptions, StackedLayerProvider, StatGrid, type StatGridProps, StatTile, type StatTileProps, type Step, StepList, type StepListProps, type StreamHandlers, type Suggestion, SurroundSound, type SurroundSoundProps, Switch, type SwitchProps, type TabItem, type TableQuery, Tabs, type TabsProps, Tag, type TagProps, TestModeBar, type TestModeBarProps, type TextScale, Textarea, type TextareaProps, type ThemeMode, ThinkingBlock, type ThinkingBlockProps, type ThreadSummary, TimePicker, type TimePickerProps, Toast, type ToastApi, type ToastOptions, type ToastProps, ToastProvider, Tooltip, type TooltipApi, type TooltipBinding, type TooltipPlacement, type TooltipProps, Topbar, type TopbarProps, TranscriptKit, TransferList, type TransferListProps, type TransferListSide, type TransferListSideProps, TrendChart, type TrendChartProps, type TrendSeries, USChoropleth, type USChoroplethProps, type StateFigure as USChoroplethState, type ChoroplethValue as USChoroplethValue, US_STATE_CODES, type UsageLimit, UseFeatureStatus, type UseKeysetTableOptions, type UseResponsiveRailOptions, type UseResponsiveRailResult, UseRuntimeMode, type UseServerTableOptions, type UseTooltipOptions, type User, VIRTUAL_LIST_BUFFER_ROWS, VIRTUAL_LIST_ROW_GAP, type VersionRecord, type VersionStore, VirtualList, type VirtualListProps, type VirtualLoadedBand, type VirtualWindow, type VoiceHandler, __resetLayerStackForTests, acceptMatches, anyOfFilter, applyAppearance, applyPrefs, channelWeightOf, computeNeedMore, computeVirtualWindow, copyToClipboard, createLocalStorageAppearanceStore, createVersionStore, eqFilter, extensionOf, extractClipboardFiles, filterFiles, formatAbsolute, formatBytes, formatClock, formatDocumentTitle, formatDuration, formatEta, formatRelative, formatShare, groupMessages, hasModifier, historyUrlAdapter, iconForMime, importanceLevel, importanceTokens, installFlytedeskFavicon, isImage, isSystemMessage, isUsStateCode, isWithinLayerTree, jobBucket, languageLabel, loadPrefs, markdownToText, meterFormats, modifierLabel, parseDelimited, pastedTextName, pluralizeUnit, preferenceScore, preferenceSegments, rangeFilter, readQueryFromUrl, resolveTheme, revokeAttachment, savePrefs, toAttachment, tokenize, useAppearancePrefs, useAppearanceStore, useChatEngine, useCopyToClipboard, useCornerStackSlot, useDocumentTitle, useFeatureStatus, useLayerZIndex, usePopoverPosition, useResponsiveRail, useRuntimeMode, useServerTable, useSessionContext, useStackedLayer, useStagedFiles, useToast, useTooltip, validateFilterValue, visibleMessages, watchAppearance, writeQueryToUrl };
|
|
5405
|
+
export { AccountMenu, type AccountMenuLink, type AccountMenuProps, AgentChatPanel, type AgentChatPanelProps, AnchoredPopover, type AnchoredPopoverProps, AnimNum, type AnimNumProps, ApiSpecBrowser, type ApiSpecBrowserProps, type AppEntry, AppShell, type AppShellProps, AppSwitcher, type AppSwitcherProps, AppearanceMenu, type AppearanceMenuProps, type AppearancePrefs, AppearanceProvider, type AppearanceProviderProps, type AppearanceStore, type AppearanceStoreOptions, type Attachment, Avatar, type AvatarProps, AvatarStack, type AvatarStackProps, Badge, type BadgeProps, Banner, type BannerProps, type BannerTone, BarList, type BarListProps, type BarListRow, BudgetReallocator, type BudgetReallocatorProps, Button, type ButtonProps, CHANNELS, CHANNEL_WEIGHTS, CHAT_UNAVAILABLE, COPIED_FEEDBACK_MS, CORNER_STACK_INSET_PROPERTY, Calendar, type CalendarProps, Card, CardGrid, type CardGridProps, type CardProps, CardRow, type CardRowProps, ChannelContribution, type ChannelContributionChannel, type ChannelContributionProps, ChannelMeta, type ChannelMetaRecord, ChannelTag, type ChannelTagProps, ChannelWeightOf, type ChatAdapter, ChatComposer, type ChatComposerProps, type ChatEngine, type ChatEngineOptions, ChatKit, type ChatMessage, type ChatRenderContext, ChatSessionBar, type ChatSessionBarProps, ChatTranscript, type ChatTranscriptProps, ChatTurn, type ChatTurnProps, Checkbox, type CheckboxProps, type Citation, Citations, type CitationsProps, Clamp, type ClampProps, ClockFace, type ClockFaceProps, CodeBlock, type CodeBlockProps, CodeEditor, type CodeEditorDiagnostic, type CodeEditorProps, Collapsible, type CollapsibleProps, ComingSoon, type ComingSoonProps, type ContextUsage, CornerStackPortal, type CornerStackSlot, type CreateVersionStoreOptions, CsiBadge, type CsiBadgeProps, CsiHero, type CsiHeroProps, CsiMeter, type CsiMeterProps, DEFAULT_PREFS, DEFAULT_STORAGE_KEY, DEFAULT_TOAST_DURATION_MS, DataTable, type DataTableColumn, type DataTablePhoneRole, type DataTableProps, DatePicker, type DatePickerProps, type DemoSessionControls, DemoSessionProvider, type DeviceSession, DiffBlock, type DiffBlockProps, DonutChart, type DonutChartProps, type DonutSegment, Drawer, type DrawerProps, Dropzone, DropzoneKit, type DropzoneProps, ENTITY_ROW_METRIC_WIDTH, type EditorTrigger, EmptyState, type EmptyStateProps, type EndpointSpec, EntityRow, type EntityRowAction, type EntityRowContent, type EntityRowMetric, EntityRowMetrics, type EntityRowMetricsProps, type EntityRowProps, FILE_VIEWER_CSV_ROW_LIMIT, FILE_VIEWER_TEXT_LIMIT, type Fact, FactList, type FactListProps, FeatureGate, type FeatureGateProps, type FeatureStatus, FileBrowser, type FileBrowserFile, type FileBrowserFolder, type FileBrowserPermissions, type FileBrowserProps, FileChip, type FileChipProps, FileGrid, type FileGridProps, FileKit, FilePickButton, type FilePickButtonProps, type FileRejection, FileStrip, type FileStripProps, FileTile, type FileTileProps, type FileUploadHandler, FileViewer, type FileViewerProps, FilterBar, type FilterBarProps, type FilterDateValue, type FilterField, type FilterFieldDate, type FilterFieldFixed, type FilterFieldMultiSelect, type FilterFieldOption, type FilterFieldRange, type FilterFieldSelect, type FilterFieldText, type FilterMultiSelectValue, type FilterOperator, type FilterRangeValue, type FilterResolveMatch, type FilterResolveResult, type FilterValidation, type FilterValue, Flag$1 as Flag, type FlagExplanation, type FlagProps, FlytedeskBrand, type FlytedeskBrandProps, FlytedeskMark, type FlytedeskMarkProps, FormatEta, FunnelChart, type FunnelChartProps, type FunnelStep, Gate, GatePending, type GatePendingProps, type GateProps, IMPORTANCE_LEVELS, IconButton, type IconButtonProps, type ImportanceLevel, type ImportanceLevelId, ImportanceTag, type ImportanceTagProps, type ImportanceTokens, Input, type InputProps, type Job, type JobAction, type JobCardStatus, type JobStatus, JobTray, type JobTrayProps, Json, KeyHint, type KeyHintProps, type KeysetEnvelope, type KeysetServerTable, LAYER_STEP, type ListEnvelope, LoadingRegion, type LoadingRegionProps, Markdown, MarkdownEditor, type MarkdownEditorHandle, type MarkdownEditorProps, MarkdownInline, type MarkdownProps, type MentionSource, Menu, MenuButton, type MenuButtonProps, type MenuItem, type MenuProps, MessageBody, type MessageBodyProps, type MessageGroup, Meter, type MeterProps, type MeterSegment, type MeterSegmentInput, MixGap, type MixGapProps, type MixGapRow, MockJobKit, type MockJobStatus, Modal, type ModalProps, ModeSwitch, type ModeSwitchProps, type Model, ModelControls, type ModelControlsProps, NumberInput, type NumberInputProps, OVERLAY_CEILING, POPOVER_BODY_MIN, type Packet, PacketCard, type PacketCardProps, type PacketSchema, type Pager, Pagination, type PaginationProps, PermissionDenied, type PermissionDeniedProps, type PermissionGroup, PermissionHint, type PermissionItem, type Phase, type PhaseStatus, PhasedProgress, type PhasedProgressProps, type Placement, type PollOptions, Popover, type PopoverProps, type PreferenceCriterion, PreferenceMeter, type PreferenceMeterProps, type ProfileFieldDef, type ProfileFieldType, type ProfileNotificationDef, ProfilePage, type ProfilePageProps, ProgressBar, type ProgressBarProps, QueryKit, type QueryPaging, type QueryUrlAdapter, type QueryUrlOptions, type QueuedTurn, QuotaRow, type QuotaRowProps, ROOT_STEP, Radio, type RadioProps, RangeSlider, type RangeSliderProps, RelativeTime, type RelativeTimeProps, type RoadmapItem, type RoadmapResult, RoadmapTimeline, type RoadmapTimelineProps, type Role, RunActions, type RunActionsProps, type RunConfig, RuntimeKit, type RuntimeSummary, SaturationDistribution, type SaturationDistributionCampus, type SaturationDistributionProps, ScoreMeter, type ScoreMeterProps, ScreenHead, type ScreenHeadProps, SearchField, type SearchFieldProps, SegmentedControl, type SegmentedControlProps, SegmentedMeter, type SegmentedMeterProps, Select, type SelectOption, type SelectProps, type SendMessageResult, type ServerTable, type ServerTableBase, type Session, type SessionContextValue, type Flag as SessionFlag, SessionKit, SessionProvider, type SessionProviderProps, type SessionRole, SessionScreen, type SessionScreenKind, type SessionScreenProps, type SessionStats, type SessionUser, SidebarNav, type SidebarNavItem, type SidebarNavProps, Skeleton, type SkeletonProps, SkeletonText, type SkeletonTextProps, type SlashCommand, Slider, type SliderProps, type SortDirection, type SortEntry, SortMenu, type SortMenuField, type SortMenuProps, type SpecModule, Spinner, type SpinnerProps, type StackedLayer, type StackedLayerOptions, StackedLayerProvider, StatGrid, type StatGridProps, StatTile, type StatTileProps, type Step, StepList, type StepListProps, type StreamHandlers, type Suggestion, SurroundSound, type SurroundSoundProps, Switch, type SwitchProps, type TabItem, type TableQuery, Tabs, type TabsProps, Tag, type TagProps, TestModeBar, type TestModeBarProps, type TextScale, Textarea, type TextareaProps, type ThemeMode, ThinkingBlock, type ThinkingBlockProps, type ThreadSummary, TimePicker, type TimePickerProps, Toast, type ToastApi, type ToastOptions, type ToastProps, ToastProvider, Tooltip, type TooltipApi, type TooltipBinding, type TooltipPlacement, type TooltipProps, Topbar, type TopbarProps, TranscriptKit, TransferList, type TransferListProps, type TransferListSide, type TransferListSideProps, TrendChart, type TrendChartProps, type TrendSeries, USChoropleth, type USChoroplethProps, type StateFigure as USChoroplethState, type ChoroplethValue as USChoroplethValue, US_STATE_CODES, type UsageLimit, UseFeatureStatus, type UseKeysetTableOptions, type UseResponsiveRailOptions, type UseResponsiveRailResult, UseRuntimeMode, type UseServerTableOptions, type UseTooltipOptions, type User, VIRTUAL_LIST_BUFFER_ROWS, VIRTUAL_LIST_ROW_GAP, type VersionRecord, type VersionStore, VirtualList, type VirtualListProps, type VirtualLoadedBand, type VirtualWindow, type VoiceHandler, __resetLayerStackForTests, acceptMatches, anyOfFilter, applyAppearance, applyPrefs, channelWeightOf, computeNeedMore, computeVirtualWindow, copyToClipboard, createLocalStorageAppearanceStore, createVersionStore, eqFilter, extensionOf, extractClipboardFiles, filterFiles, formatAbsolute, formatBytes, formatClock, formatDocumentTitle, formatDuration, formatEta, formatRelative, formatShare, groupMessages, hasModifier, historyUrlAdapter, iconForMime, importanceLevel, importanceTokens, installFlytedeskFavicon, isImage, isSystemMessage, isUsStateCode, isWithinLayerTree, jobBucket, languageLabel, loadPrefs, markdownToText, meterFormats, modifierLabel, parseDelimited, pastedTextName, pluralizeUnit, preferenceScore, preferenceSegments, rangeFilter, readQueryFromUrl, resolveTheme, revokeAttachment, savePrefs, toAttachment, tokenize, useAppearancePrefs, useAppearanceStore, useChatEngine, useCopyToClipboard, useCornerStackSlot, useDocumentTitle, useFeatureStatus, useLayerZIndex, usePopoverPosition, useResponsiveRail, useRuntimeMode, useServerTable, useSessionContext, useStackedLayer, useStagedFiles, useToast, useTooltip, validateFilterValue, visibleMessages, watchAppearance, writeQueryToUrl };
|
package/dist/index.d.ts
CHANGED
|
@@ -1290,6 +1290,16 @@ interface FilterFieldSelect extends FilterFieldBase {
|
|
|
1290
1290
|
type: "select";
|
|
1291
1291
|
options: FilterFieldOption[];
|
|
1292
1292
|
}
|
|
1293
|
+
/** A filter whose value is set from outside FilterBar, by a link or the host's own state (MP-312). Its
|
|
1294
|
+
* chip paints `valueLabel` and carries an x that removes it; the chip opens no picker, and the field
|
|
1295
|
+
* is never offered in the Filter menu, so a person can neither add nor edit it. The value in
|
|
1296
|
+
* `filters` is whatever the host set (any non-empty string); the label is the host's to provide, and
|
|
1297
|
+
* so are loading and error states (pass a placeholder label until the real one is known). */
|
|
1298
|
+
interface FilterFieldFixed extends FilterFieldBase {
|
|
1299
|
+
type: "fixed";
|
|
1300
|
+
/** What the chip paints for the value, e.g. a sheet's name. */
|
|
1301
|
+
valueLabel: string;
|
|
1302
|
+
}
|
|
1293
1303
|
/** Include/exclude, shared by every field whose value is a set of options. */
|
|
1294
1304
|
type FilterOperator = "in" | "notIn";
|
|
1295
1305
|
interface FilterMultiSelectValue {
|
|
@@ -1396,11 +1406,11 @@ interface FilterFieldDate extends FilterFieldBase {
|
|
|
1396
1406
|
* picker. text/select keep their original bare-string value shape unchanged, so an
|
|
1397
1407
|
* existing consumer needs no migration; every other variant's value is a small typed
|
|
1398
1408
|
* object of its own (see FilterValue). */
|
|
1399
|
-
type FilterField = FilterFieldText | FilterFieldSelect | FilterFieldMultiSelect | FilterFieldRange | FilterFieldDate;
|
|
1409
|
+
type FilterField = FilterFieldText | FilterFieldSelect | FilterFieldFixed | FilterFieldMultiSelect | FilterFieldRange | FilterFieldDate;
|
|
1400
1410
|
/** The value shape a given declared field reads/writes, so a consumer can type its own
|
|
1401
1411
|
* `filters` record precisely instead of `Record<string, unknown>` — e.g.
|
|
1402
1412
|
* `Record<"schools", FilterValue<typeof schoolsField>>`. */
|
|
1403
|
-
type FilterValue<F extends FilterField> = F extends FilterFieldText ? string : F extends FilterFieldSelect ? string : F extends FilterFieldMultiSelect ? FilterMultiSelectValue : F extends FilterFieldRange ? FilterRangeValue : F extends FilterFieldDate ? FilterDateValue : never;
|
|
1413
|
+
type FilterValue<F extends FilterField> = F extends FilterFieldText ? string : F extends FilterFieldSelect | FilterFieldFixed ? string : F extends FilterFieldMultiSelect ? FilterMultiSelectValue : F extends FilterFieldRange ? FilterRangeValue : F extends FilterFieldDate ? FilterDateValue : never;
|
|
1404
1414
|
interface FilterBarProps extends Omit<React.HTMLAttributes<HTMLSpanElement>, "onChange"> {
|
|
1405
1415
|
/** Every filter a consumer can add. Order here is the order in the "add filter" list. */
|
|
1406
1416
|
fields: FilterField[];
|
|
@@ -1462,6 +1472,7 @@ type FilterValidation = {
|
|
|
1462
1472
|
* all call it on any candidate value:
|
|
1463
1473
|
* - text: a string.
|
|
1464
1474
|
* - select: one of the field's own option values.
|
|
1475
|
+
* - fixed: nothing; its value is the host's, so no edit is valid.
|
|
1465
1476
|
* - multiSelect: `{ operator, values }` with at least one `{ value, label }` option, no
|
|
1466
1477
|
* more than the field's `maxValues`, and an operator the field allows.
|
|
1467
1478
|
* - date, withinDays: a whole number of days from 1 to the field's maxDays, which is
|
|
@@ -1553,7 +1564,7 @@ interface StatTileDisplayProps extends StatTileBaseProps, React.HTMLAttributes<H
|
|
|
1553
1564
|
* tile wears the brand border and fill. */
|
|
1554
1565
|
interface StatTilePressProps extends StatTileBaseProps, Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, "onClick" | "type" | "disabled" | "value"> {
|
|
1555
1566
|
onPress: () => void;
|
|
1556
|
-
/** Whether the list is currently filtered by this tile.
|
|
1567
|
+
/** Whether the list is currently filtered by this tile. Give it (true or false) only for a tile that toggles a filter: it sets `aria-pressed`. Omit it for a tile that acts without a state (it jumps somewhere), which is then a plain button. */
|
|
1557
1568
|
pressed?: boolean;
|
|
1558
1569
|
/** Shown but cannot be pressed (nothing to go to). A `loading` tile is never pressable either. */
|
|
1559
1570
|
disabled?: boolean;
|
|
@@ -5391,4 +5402,4 @@ declare function CornerStackPortal({ slot, children }: {
|
|
|
5391
5402
|
children?: React.ReactNode;
|
|
5392
5403
|
}): React.ReactPortal | null;
|
|
5393
5404
|
|
|
5394
|
-
export { AccountMenu, type AccountMenuLink, type AccountMenuProps, AgentChatPanel, type AgentChatPanelProps, AnchoredPopover, type AnchoredPopoverProps, AnimNum, type AnimNumProps, ApiSpecBrowser, type ApiSpecBrowserProps, type AppEntry, AppShell, type AppShellProps, AppSwitcher, type AppSwitcherProps, AppearanceMenu, type AppearanceMenuProps, type AppearancePrefs, AppearanceProvider, type AppearanceProviderProps, type AppearanceStore, type AppearanceStoreOptions, type Attachment, Avatar, type AvatarProps, AvatarStack, type AvatarStackProps, Badge, type BadgeProps, Banner, type BannerProps, type BannerTone, BarList, type BarListProps, type BarListRow, BudgetReallocator, type BudgetReallocatorProps, Button, type ButtonProps, CHANNELS, CHANNEL_WEIGHTS, CHAT_UNAVAILABLE, COPIED_FEEDBACK_MS, CORNER_STACK_INSET_PROPERTY, Calendar, type CalendarProps, Card, CardGrid, type CardGridProps, type CardProps, CardRow, type CardRowProps, ChannelContribution, type ChannelContributionChannel, type ChannelContributionProps, ChannelMeta, type ChannelMetaRecord, ChannelTag, type ChannelTagProps, ChannelWeightOf, type ChatAdapter, ChatComposer, type ChatComposerProps, type ChatEngine, type ChatEngineOptions, ChatKit, type ChatMessage, type ChatRenderContext, ChatSessionBar, type ChatSessionBarProps, ChatTranscript, type ChatTranscriptProps, ChatTurn, type ChatTurnProps, Checkbox, type CheckboxProps, type Citation, Citations, type CitationsProps, Clamp, type ClampProps, ClockFace, type ClockFaceProps, CodeBlock, type CodeBlockProps, CodeEditor, type CodeEditorDiagnostic, type CodeEditorProps, Collapsible, type CollapsibleProps, ComingSoon, type ComingSoonProps, type ContextUsage, CornerStackPortal, type CornerStackSlot, type CreateVersionStoreOptions, CsiBadge, type CsiBadgeProps, CsiHero, type CsiHeroProps, CsiMeter, type CsiMeterProps, DEFAULT_PREFS, DEFAULT_STORAGE_KEY, DEFAULT_TOAST_DURATION_MS, DataTable, type DataTableColumn, type DataTablePhoneRole, type DataTableProps, DatePicker, type DatePickerProps, type DemoSessionControls, DemoSessionProvider, type DeviceSession, DiffBlock, type DiffBlockProps, DonutChart, type DonutChartProps, type DonutSegment, Drawer, type DrawerProps, Dropzone, DropzoneKit, type DropzoneProps, ENTITY_ROW_METRIC_WIDTH, type EditorTrigger, EmptyState, type EmptyStateProps, type EndpointSpec, EntityRow, type EntityRowAction, type EntityRowContent, type EntityRowMetric, EntityRowMetrics, type EntityRowMetricsProps, type EntityRowProps, FILE_VIEWER_CSV_ROW_LIMIT, FILE_VIEWER_TEXT_LIMIT, type Fact, FactList, type FactListProps, FeatureGate, type FeatureGateProps, type FeatureStatus, FileBrowser, type FileBrowserFile, type FileBrowserFolder, type FileBrowserPermissions, type FileBrowserProps, FileChip, type FileChipProps, FileGrid, type FileGridProps, FileKit, FilePickButton, type FilePickButtonProps, type FileRejection, FileStrip, type FileStripProps, FileTile, type FileTileProps, type FileUploadHandler, FileViewer, type FileViewerProps, FilterBar, type FilterBarProps, type FilterDateValue, type FilterField, type FilterFieldDate, type FilterFieldMultiSelect, type FilterFieldOption, type FilterFieldRange, type FilterFieldSelect, type FilterFieldText, type FilterMultiSelectValue, type FilterOperator, type FilterRangeValue, type FilterResolveMatch, type FilterResolveResult, type FilterValidation, type FilterValue, Flag$1 as Flag, type FlagExplanation, type FlagProps, FlytedeskBrand, type FlytedeskBrandProps, FlytedeskMark, type FlytedeskMarkProps, FormatEta, FunnelChart, type FunnelChartProps, type FunnelStep, Gate, GatePending, type GatePendingProps, type GateProps, IMPORTANCE_LEVELS, IconButton, type IconButtonProps, type ImportanceLevel, type ImportanceLevelId, ImportanceTag, type ImportanceTagProps, type ImportanceTokens, Input, type InputProps, type Job, type JobAction, type JobCardStatus, type JobStatus, JobTray, type JobTrayProps, Json, KeyHint, type KeyHintProps, type KeysetEnvelope, type KeysetServerTable, LAYER_STEP, type ListEnvelope, LoadingRegion, type LoadingRegionProps, Markdown, MarkdownEditor, type MarkdownEditorHandle, type MarkdownEditorProps, MarkdownInline, type MarkdownProps, type MentionSource, Menu, MenuButton, type MenuButtonProps, type MenuItem, type MenuProps, MessageBody, type MessageBodyProps, type MessageGroup, Meter, type MeterProps, type MeterSegment, type MeterSegmentInput, MixGap, type MixGapProps, type MixGapRow, MockJobKit, type MockJobStatus, Modal, type ModalProps, ModeSwitch, type ModeSwitchProps, type Model, ModelControls, type ModelControlsProps, NumberInput, type NumberInputProps, OVERLAY_CEILING, POPOVER_BODY_MIN, type Packet, PacketCard, type PacketCardProps, type PacketSchema, type Pager, Pagination, type PaginationProps, PermissionDenied, type PermissionDeniedProps, type PermissionGroup, PermissionHint, type PermissionItem, type Phase, type PhaseStatus, PhasedProgress, type PhasedProgressProps, type Placement, type PollOptions, Popover, type PopoverProps, type PreferenceCriterion, PreferenceMeter, type PreferenceMeterProps, type ProfileFieldDef, type ProfileFieldType, type ProfileNotificationDef, ProfilePage, type ProfilePageProps, ProgressBar, type ProgressBarProps, QueryKit, type QueryPaging, type QueryUrlAdapter, type QueryUrlOptions, type QueuedTurn, QuotaRow, type QuotaRowProps, ROOT_STEP, Radio, type RadioProps, RangeSlider, type RangeSliderProps, RelativeTime, type RelativeTimeProps, type RoadmapItem, type RoadmapResult, RoadmapTimeline, type RoadmapTimelineProps, type Role, RunActions, type RunActionsProps, type RunConfig, RuntimeKit, type RuntimeSummary, SaturationDistribution, type SaturationDistributionCampus, type SaturationDistributionProps, ScoreMeter, type ScoreMeterProps, ScreenHead, type ScreenHeadProps, SearchField, type SearchFieldProps, SegmentedControl, type SegmentedControlProps, SegmentedMeter, type SegmentedMeterProps, Select, type SelectOption, type SelectProps, type SendMessageResult, type ServerTable, type ServerTableBase, type Session, type SessionContextValue, type Flag as SessionFlag, SessionKit, SessionProvider, type SessionProviderProps, type SessionRole, SessionScreen, type SessionScreenKind, type SessionScreenProps, type SessionStats, type SessionUser, SidebarNav, type SidebarNavItem, type SidebarNavProps, Skeleton, type SkeletonProps, SkeletonText, type SkeletonTextProps, type SlashCommand, Slider, type SliderProps, type SortDirection, type SortEntry, SortMenu, type SortMenuField, type SortMenuProps, type SpecModule, Spinner, type SpinnerProps, type StackedLayer, type StackedLayerOptions, StackedLayerProvider, StatGrid, type StatGridProps, StatTile, type StatTileProps, type Step, StepList, type StepListProps, type StreamHandlers, type Suggestion, SurroundSound, type SurroundSoundProps, Switch, type SwitchProps, type TabItem, type TableQuery, Tabs, type TabsProps, Tag, type TagProps, TestModeBar, type TestModeBarProps, type TextScale, Textarea, type TextareaProps, type ThemeMode, ThinkingBlock, type ThinkingBlockProps, type ThreadSummary, TimePicker, type TimePickerProps, Toast, type ToastApi, type ToastOptions, type ToastProps, ToastProvider, Tooltip, type TooltipApi, type TooltipBinding, type TooltipPlacement, type TooltipProps, Topbar, type TopbarProps, TranscriptKit, TransferList, type TransferListProps, type TransferListSide, type TransferListSideProps, TrendChart, type TrendChartProps, type TrendSeries, USChoropleth, type USChoroplethProps, type StateFigure as USChoroplethState, type ChoroplethValue as USChoroplethValue, US_STATE_CODES, type UsageLimit, UseFeatureStatus, type UseKeysetTableOptions, type UseResponsiveRailOptions, type UseResponsiveRailResult, UseRuntimeMode, type UseServerTableOptions, type UseTooltipOptions, type User, VIRTUAL_LIST_BUFFER_ROWS, VIRTUAL_LIST_ROW_GAP, type VersionRecord, type VersionStore, VirtualList, type VirtualListProps, type VirtualLoadedBand, type VirtualWindow, type VoiceHandler, __resetLayerStackForTests, acceptMatches, anyOfFilter, applyAppearance, applyPrefs, channelWeightOf, computeNeedMore, computeVirtualWindow, copyToClipboard, createLocalStorageAppearanceStore, createVersionStore, eqFilter, extensionOf, extractClipboardFiles, filterFiles, formatAbsolute, formatBytes, formatClock, formatDocumentTitle, formatDuration, formatEta, formatRelative, formatShare, groupMessages, hasModifier, historyUrlAdapter, iconForMime, importanceLevel, importanceTokens, installFlytedeskFavicon, isImage, isSystemMessage, isUsStateCode, isWithinLayerTree, jobBucket, languageLabel, loadPrefs, markdownToText, meterFormats, modifierLabel, parseDelimited, pastedTextName, pluralizeUnit, preferenceScore, preferenceSegments, rangeFilter, readQueryFromUrl, resolveTheme, revokeAttachment, savePrefs, toAttachment, tokenize, useAppearancePrefs, useAppearanceStore, useChatEngine, useCopyToClipboard, useCornerStackSlot, useDocumentTitle, useFeatureStatus, useLayerZIndex, usePopoverPosition, useResponsiveRail, useRuntimeMode, useServerTable, useSessionContext, useStackedLayer, useStagedFiles, useToast, useTooltip, validateFilterValue, visibleMessages, watchAppearance, writeQueryToUrl };
|
|
5405
|
+
export { AccountMenu, type AccountMenuLink, type AccountMenuProps, AgentChatPanel, type AgentChatPanelProps, AnchoredPopover, type AnchoredPopoverProps, AnimNum, type AnimNumProps, ApiSpecBrowser, type ApiSpecBrowserProps, type AppEntry, AppShell, type AppShellProps, AppSwitcher, type AppSwitcherProps, AppearanceMenu, type AppearanceMenuProps, type AppearancePrefs, AppearanceProvider, type AppearanceProviderProps, type AppearanceStore, type AppearanceStoreOptions, type Attachment, Avatar, type AvatarProps, AvatarStack, type AvatarStackProps, Badge, type BadgeProps, Banner, type BannerProps, type BannerTone, BarList, type BarListProps, type BarListRow, BudgetReallocator, type BudgetReallocatorProps, Button, type ButtonProps, CHANNELS, CHANNEL_WEIGHTS, CHAT_UNAVAILABLE, COPIED_FEEDBACK_MS, CORNER_STACK_INSET_PROPERTY, Calendar, type CalendarProps, Card, CardGrid, type CardGridProps, type CardProps, CardRow, type CardRowProps, ChannelContribution, type ChannelContributionChannel, type ChannelContributionProps, ChannelMeta, type ChannelMetaRecord, ChannelTag, type ChannelTagProps, ChannelWeightOf, type ChatAdapter, ChatComposer, type ChatComposerProps, type ChatEngine, type ChatEngineOptions, ChatKit, type ChatMessage, type ChatRenderContext, ChatSessionBar, type ChatSessionBarProps, ChatTranscript, type ChatTranscriptProps, ChatTurn, type ChatTurnProps, Checkbox, type CheckboxProps, type Citation, Citations, type CitationsProps, Clamp, type ClampProps, ClockFace, type ClockFaceProps, CodeBlock, type CodeBlockProps, CodeEditor, type CodeEditorDiagnostic, type CodeEditorProps, Collapsible, type CollapsibleProps, ComingSoon, type ComingSoonProps, type ContextUsage, CornerStackPortal, type CornerStackSlot, type CreateVersionStoreOptions, CsiBadge, type CsiBadgeProps, CsiHero, type CsiHeroProps, CsiMeter, type CsiMeterProps, DEFAULT_PREFS, DEFAULT_STORAGE_KEY, DEFAULT_TOAST_DURATION_MS, DataTable, type DataTableColumn, type DataTablePhoneRole, type DataTableProps, DatePicker, type DatePickerProps, type DemoSessionControls, DemoSessionProvider, type DeviceSession, DiffBlock, type DiffBlockProps, DonutChart, type DonutChartProps, type DonutSegment, Drawer, type DrawerProps, Dropzone, DropzoneKit, type DropzoneProps, ENTITY_ROW_METRIC_WIDTH, type EditorTrigger, EmptyState, type EmptyStateProps, type EndpointSpec, EntityRow, type EntityRowAction, type EntityRowContent, type EntityRowMetric, EntityRowMetrics, type EntityRowMetricsProps, type EntityRowProps, FILE_VIEWER_CSV_ROW_LIMIT, FILE_VIEWER_TEXT_LIMIT, type Fact, FactList, type FactListProps, FeatureGate, type FeatureGateProps, type FeatureStatus, FileBrowser, type FileBrowserFile, type FileBrowserFolder, type FileBrowserPermissions, type FileBrowserProps, FileChip, type FileChipProps, FileGrid, type FileGridProps, FileKit, FilePickButton, type FilePickButtonProps, type FileRejection, FileStrip, type FileStripProps, FileTile, type FileTileProps, type FileUploadHandler, FileViewer, type FileViewerProps, FilterBar, type FilterBarProps, type FilterDateValue, type FilterField, type FilterFieldDate, type FilterFieldFixed, type FilterFieldMultiSelect, type FilterFieldOption, type FilterFieldRange, type FilterFieldSelect, type FilterFieldText, type FilterMultiSelectValue, type FilterOperator, type FilterRangeValue, type FilterResolveMatch, type FilterResolveResult, type FilterValidation, type FilterValue, Flag$1 as Flag, type FlagExplanation, type FlagProps, FlytedeskBrand, type FlytedeskBrandProps, FlytedeskMark, type FlytedeskMarkProps, FormatEta, FunnelChart, type FunnelChartProps, type FunnelStep, Gate, GatePending, type GatePendingProps, type GateProps, IMPORTANCE_LEVELS, IconButton, type IconButtonProps, type ImportanceLevel, type ImportanceLevelId, ImportanceTag, type ImportanceTagProps, type ImportanceTokens, Input, type InputProps, type Job, type JobAction, type JobCardStatus, type JobStatus, JobTray, type JobTrayProps, Json, KeyHint, type KeyHintProps, type KeysetEnvelope, type KeysetServerTable, LAYER_STEP, type ListEnvelope, LoadingRegion, type LoadingRegionProps, Markdown, MarkdownEditor, type MarkdownEditorHandle, type MarkdownEditorProps, MarkdownInline, type MarkdownProps, type MentionSource, Menu, MenuButton, type MenuButtonProps, type MenuItem, type MenuProps, MessageBody, type MessageBodyProps, type MessageGroup, Meter, type MeterProps, type MeterSegment, type MeterSegmentInput, MixGap, type MixGapProps, type MixGapRow, MockJobKit, type MockJobStatus, Modal, type ModalProps, ModeSwitch, type ModeSwitchProps, type Model, ModelControls, type ModelControlsProps, NumberInput, type NumberInputProps, OVERLAY_CEILING, POPOVER_BODY_MIN, type Packet, PacketCard, type PacketCardProps, type PacketSchema, type Pager, Pagination, type PaginationProps, PermissionDenied, type PermissionDeniedProps, type PermissionGroup, PermissionHint, type PermissionItem, type Phase, type PhaseStatus, PhasedProgress, type PhasedProgressProps, type Placement, type PollOptions, Popover, type PopoverProps, type PreferenceCriterion, PreferenceMeter, type PreferenceMeterProps, type ProfileFieldDef, type ProfileFieldType, type ProfileNotificationDef, ProfilePage, type ProfilePageProps, ProgressBar, type ProgressBarProps, QueryKit, type QueryPaging, type QueryUrlAdapter, type QueryUrlOptions, type QueuedTurn, QuotaRow, type QuotaRowProps, ROOT_STEP, Radio, type RadioProps, RangeSlider, type RangeSliderProps, RelativeTime, type RelativeTimeProps, type RoadmapItem, type RoadmapResult, RoadmapTimeline, type RoadmapTimelineProps, type Role, RunActions, type RunActionsProps, type RunConfig, RuntimeKit, type RuntimeSummary, SaturationDistribution, type SaturationDistributionCampus, type SaturationDistributionProps, ScoreMeter, type ScoreMeterProps, ScreenHead, type ScreenHeadProps, SearchField, type SearchFieldProps, SegmentedControl, type SegmentedControlProps, SegmentedMeter, type SegmentedMeterProps, Select, type SelectOption, type SelectProps, type SendMessageResult, type ServerTable, type ServerTableBase, type Session, type SessionContextValue, type Flag as SessionFlag, SessionKit, SessionProvider, type SessionProviderProps, type SessionRole, SessionScreen, type SessionScreenKind, type SessionScreenProps, type SessionStats, type SessionUser, SidebarNav, type SidebarNavItem, type SidebarNavProps, Skeleton, type SkeletonProps, SkeletonText, type SkeletonTextProps, type SlashCommand, Slider, type SliderProps, type SortDirection, type SortEntry, SortMenu, type SortMenuField, type SortMenuProps, type SpecModule, Spinner, type SpinnerProps, type StackedLayer, type StackedLayerOptions, StackedLayerProvider, StatGrid, type StatGridProps, StatTile, type StatTileProps, type Step, StepList, type StepListProps, type StreamHandlers, type Suggestion, SurroundSound, type SurroundSoundProps, Switch, type SwitchProps, type TabItem, type TableQuery, Tabs, type TabsProps, Tag, type TagProps, TestModeBar, type TestModeBarProps, type TextScale, Textarea, type TextareaProps, type ThemeMode, ThinkingBlock, type ThinkingBlockProps, type ThreadSummary, TimePicker, type TimePickerProps, Toast, type ToastApi, type ToastOptions, type ToastProps, ToastProvider, Tooltip, type TooltipApi, type TooltipBinding, type TooltipPlacement, type TooltipProps, Topbar, type TopbarProps, TranscriptKit, TransferList, type TransferListProps, type TransferListSide, type TransferListSideProps, TrendChart, type TrendChartProps, type TrendSeries, USChoropleth, type USChoroplethProps, type StateFigure as USChoroplethState, type ChoroplethValue as USChoroplethValue, US_STATE_CODES, type UsageLimit, UseFeatureStatus, type UseKeysetTableOptions, type UseResponsiveRailOptions, type UseResponsiveRailResult, UseRuntimeMode, type UseServerTableOptions, type UseTooltipOptions, type User, VIRTUAL_LIST_BUFFER_ROWS, VIRTUAL_LIST_ROW_GAP, type VersionRecord, type VersionStore, VirtualList, type VirtualListProps, type VirtualLoadedBand, type VirtualWindow, type VoiceHandler, __resetLayerStackForTests, acceptMatches, anyOfFilter, applyAppearance, applyPrefs, channelWeightOf, computeNeedMore, computeVirtualWindow, copyToClipboard, createLocalStorageAppearanceStore, createVersionStore, eqFilter, extensionOf, extractClipboardFiles, filterFiles, formatAbsolute, formatBytes, formatClock, formatDocumentTitle, formatDuration, formatEta, formatRelative, formatShare, groupMessages, hasModifier, historyUrlAdapter, iconForMime, importanceLevel, importanceTokens, installFlytedeskFavicon, isImage, isSystemMessage, isUsStateCode, isWithinLayerTree, jobBucket, languageLabel, loadPrefs, markdownToText, meterFormats, modifierLabel, parseDelimited, pastedTextName, pluralizeUnit, preferenceScore, preferenceSegments, rangeFilter, readQueryFromUrl, resolveTheme, revokeAttachment, savePrefs, toAttachment, tokenize, useAppearancePrefs, useAppearanceStore, useChatEngine, useCopyToClipboard, useCornerStackSlot, useDocumentTitle, useFeatureStatus, useLayerZIndex, usePopoverPosition, useResponsiveRail, useRuntimeMode, useServerTable, useSessionContext, useStackedLayer, useStagedFiles, useToast, useTooltip, validateFilterValue, visibleMessages, watchAppearance, writeQueryToUrl };
|
package/dist/index.js
CHANGED
|
@@ -3857,6 +3857,7 @@ function isFieldSet(field, value) {
|
|
|
3857
3857
|
switch (field.type) {
|
|
3858
3858
|
case "text":
|
|
3859
3859
|
case "select":
|
|
3860
|
+
case "fixed":
|
|
3860
3861
|
return isSet(value);
|
|
3861
3862
|
case "multiSelect": {
|
|
3862
3863
|
const v = value;
|
|
@@ -3896,6 +3897,8 @@ function validateFilterValue(field, value) {
|
|
|
3896
3897
|
switch (field.type) {
|
|
3897
3898
|
case "text":
|
|
3898
3899
|
return typeof value === "string" ? { ok: true } : { ok: false, reason: "Enter text" };
|
|
3900
|
+
case "fixed":
|
|
3901
|
+
return { ok: false, reason: "This filter is set from outside and cannot be edited" };
|
|
3899
3902
|
case "select":
|
|
3900
3903
|
return field.options.some((o) => o.value === value) ? { ok: true } : { ok: false, reason: "Pick one of the options" };
|
|
3901
3904
|
case "multiSelect": {
|
|
@@ -3977,6 +3980,8 @@ function chipLabel(field, value) {
|
|
|
3977
3980
|
switch (field.type) {
|
|
3978
3981
|
case "text":
|
|
3979
3982
|
return String(value ?? "");
|
|
3983
|
+
case "fixed":
|
|
3984
|
+
return field.valueLabel;
|
|
3980
3985
|
case "select": {
|
|
3981
3986
|
const chosen = field.options.find((o) => o.value === value);
|
|
3982
3987
|
return chosen ? chosen.label : String(value ?? "");
|
|
@@ -4614,7 +4619,7 @@ function FilterBar({ fields = [], filters, onFilterChange, onFilterRemove, align
|
|
|
4614
4619
|
target?.focus();
|
|
4615
4620
|
}
|
|
4616
4621
|
}, [panel]);
|
|
4617
|
-
const addableFields = fields.filter((f) => !isFieldSet(f, filters[f.key]));
|
|
4622
|
+
const addableFields = fields.filter((f) => f.type !== "fixed" && !isFieldSet(f, filters[f.key]));
|
|
4618
4623
|
const activeCount = activeFilterCount(fields, filters);
|
|
4619
4624
|
const canAdd = addableFields.length > 0;
|
|
4620
4625
|
const showCount = showActiveCount && activeCount > 0;
|
|
@@ -4708,6 +4713,14 @@ function FilterBar({ fields = [], filters, onFilterChange, onFilterRemove, align
|
|
|
4708
4713
|
}
|
|
4709
4714
|
const set = isFieldSet(field, value);
|
|
4710
4715
|
if (!editing && !set) return null;
|
|
4716
|
+
if (field.type === "fixed") {
|
|
4717
|
+
const fixedText = field.label + ": " + field.valueLabel;
|
|
4718
|
+
return /* @__PURE__ */ jsx50("span", { className: "fd-filterbar-chip", children: /* @__PURE__ */ jsxs41("span", { className: "fd-tag fd-filterbar-fixed", role: "group", title: fixedText, "aria-label": fixedText, children: [
|
|
4719
|
+
field.icon ? /* @__PURE__ */ jsx50("i", { className: "ph ph-" + field.icon, "aria-hidden": "true" }) : null,
|
|
4720
|
+
/* @__PURE__ */ jsx50("span", { className: "fd-tag-label", children: /* @__PURE__ */ jsx50(MiddleEllipsis, { text: field.icon ? field.valueLabel : fixedText }) }),
|
|
4721
|
+
/* @__PURE__ */ jsx50("button", { type: "button", className: "fd-tag-remove", "aria-label": "Remove " + fixedText, onClick: () => removeField(field), children: /* @__PURE__ */ jsx50("i", { className: "ph ph-x", "aria-hidden": "true" }) })
|
|
4722
|
+
] }) }, field.key);
|
|
4723
|
+
}
|
|
4711
4724
|
const chipRef = editing ? editAnchorRef : void 0;
|
|
4712
4725
|
const toggleOrClose = () => editing ? closeEditing() : startEditing(field.key);
|
|
4713
4726
|
const remove = () => {
|
|
@@ -4841,7 +4854,7 @@ function StatTile(props) {
|
|
|
4841
4854
|
] });
|
|
4842
4855
|
const classes = (...extra) => ["fd-stat", ...extra, compact3 ? "fd-stat-compact" : "", className].filter(Boolean).join(" ");
|
|
4843
4856
|
if (rest.onPress) {
|
|
4844
|
-
const { onPress, pressed
|
|
4857
|
+
const { onPress, pressed, disabled = false, ...buttonRest } = rest;
|
|
4845
4858
|
return /* @__PURE__ */ jsx52("button", { type: "button", className: classes("fd-stat-pressable"), "aria-pressed": pressed, disabled: disabled || loading, onClick: onPress, ...buttonRest, children: content });
|
|
4846
4859
|
}
|
|
4847
4860
|
return /* @__PURE__ */ jsx52("div", { className: classes(), ...rest, children: content });
|