@proteos/ui 0.47.0 → 0.48.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/index.cjs +39 -4
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +35 -2
- package/dist/index.d.ts +35 -2
- package/dist/index.js +38 -6
- package/dist/index.js.map +1 -1
- package/package.json +3 -2
- package/src/components/channel-icon/channel-icon.tsx +2 -0
- package/src/components/orb/index.ts +2 -0
- package/src/components/orb/orb.stories.tsx +25 -0
- package/src/components/orb/orb.tsx +57 -0
- package/src/components/record-filter/chip-value.tsx +17 -2
- package/src/components/record-filter/field-label.ts +29 -0
- package/src/components/record-filter/index.ts +1 -0
- package/src/components/record-filter/record-filter-chips.tsx +7 -1
- package/src/components/record-filter/record-filter.stories.tsx +3 -3
- package/src/components/record-filter/record-filter.test.tsx +86 -0
- package/src/components/record-filter/types.ts +2 -1
- package/src/index.ts +1 -0
- package/src/styles.css +1 -0
package/dist/index.d.cts
CHANGED
|
@@ -9,6 +9,7 @@ import { Key, BreadcrumbsProps as BreadcrumbsProps$1, ButtonProps as ButtonProps
|
|
|
9
9
|
import { ColumnDef, SortingState, OnChangeFn, Row } from '@tanstack/react-table';
|
|
10
10
|
import * as tailwind_merge from 'tailwind-merge';
|
|
11
11
|
import { Message, Conversation, UpdateDraftRequest, ContactAddress, ConversationClient, SendRecipient } from '@proteos/sdk';
|
|
12
|
+
import { OrbState, OrbTheme } from 'thinking-orbs';
|
|
12
13
|
import { ClassValue } from 'clsx';
|
|
13
14
|
|
|
14
15
|
declare const attachmentChipStyles: tailwind_variants.TVReturnType<{
|
|
@@ -1925,6 +1926,23 @@ type NavGroupProps = Omit<DisclosureProps, 'children'> & {
|
|
|
1925
1926
|
* vertical guide rule and pick up nested styling automatically. */
|
|
1926
1927
|
declare function NavGroup({ icon, label, children, className, ...props }: NavGroupProps): react_jsx_runtime.JSX.Element;
|
|
1927
1928
|
|
|
1929
|
+
type OrbSizeToken = 'xs' | 'sm' | 'md' | 'lg';
|
|
1930
|
+
interface OrbProps {
|
|
1931
|
+
/** xs 12 · sm 20 (native inline) · md 40 · lg 64 (native avatar). Default `sm`. */
|
|
1932
|
+
size?: OrbSizeToken;
|
|
1933
|
+
/** Animation state; defaults to `solving` (the working indicator). */
|
|
1934
|
+
state?: OrbState;
|
|
1935
|
+
/** Speed multiplier (1 = tuned speed); e.g. 0.2 for a slow idle shimmer. */
|
|
1936
|
+
speed?: number;
|
|
1937
|
+
/** Pin the ink instead of auto-detecting — `dark` renders light dots (for
|
|
1938
|
+
* a dark chip like the launcher's black circle). */
|
|
1939
|
+
theme?: OrbTheme;
|
|
1940
|
+
className?: string;
|
|
1941
|
+
/** Accessible name; omitting it hides the orb from assistive tech. */
|
|
1942
|
+
label?: string;
|
|
1943
|
+
}
|
|
1944
|
+
declare function Orb({ size, state, speed, theme, className, label }: OrbProps): react_jsx_runtime.JSX.Element;
|
|
1945
|
+
|
|
1928
1946
|
declare function Popover(props: DialogTriggerProps): react_jsx_runtime.JSX.Element;
|
|
1929
1947
|
type PopoverContentProps = Omit<PopoverProps, 'children'> & {
|
|
1930
1948
|
/** Dialog children. Supports the render-prop form `({ close }) => …`. */
|
|
@@ -2027,7 +2045,8 @@ type FilterFieldOption = {
|
|
|
2027
2045
|
type FilterField = {
|
|
2028
2046
|
/** Dot-path to the attribute, e.g. `'owner.email'`. Stable identifier. */
|
|
2029
2047
|
path: string;
|
|
2030
|
-
/** Full nested label, e.g. `'Owner
|
|
2048
|
+
/** Full nested label, e.g. `'Owner · Email'` — parts joined with
|
|
2049
|
+
* `FIELD_LABEL_SEPARATOR`. Used in pickers. */
|
|
2031
2050
|
label: string;
|
|
2032
2051
|
/** Leaf label only, e.g. `'Email'`. Used in chips. */
|
|
2033
2052
|
shortLabel: string;
|
|
@@ -2130,6 +2149,20 @@ type AttributePickerProps = {
|
|
|
2130
2149
|
};
|
|
2131
2150
|
declare function AttributePicker({ fields, value, onChange, autoFocus, isDisabled, size, className, }: AttributePickerProps): react_jsx_runtime.JSX.Element;
|
|
2132
2151
|
|
|
2152
|
+
/**
|
|
2153
|
+
* U+00B7 MIDDLE DOT, spaced. The same separator the app already uses for
|
|
2154
|
+
* breadcrumb-ish text ("Segment · SaaS decision makers"), and quieter than a
|
|
2155
|
+
* slash at the small type sizes these labels render at — the eye reads the
|
|
2156
|
+
* words, not the punctuation.
|
|
2157
|
+
*/
|
|
2158
|
+
declare const FIELD_LABEL_SEPARATOR = " \u00B7 ";
|
|
2159
|
+
/**
|
|
2160
|
+
* Joins breadcrumb parts with {@link FIELD_LABEL_SEPARATOR}, skipping empties
|
|
2161
|
+
* so a field with no parent renders as its own label rather than with a
|
|
2162
|
+
* leading separator.
|
|
2163
|
+
*/
|
|
2164
|
+
declare function joinFieldLabel(...parts: ReadonlyArray<string | undefined | null>): string;
|
|
2165
|
+
|
|
2133
2166
|
/**
|
|
2134
2167
|
* Per-value-item renderer. Called once per value (twice for arity 'n'
|
|
2135
2168
|
* with two items, etc.) AFTER arity orchestration. Return `undefined`
|
|
@@ -2743,4 +2776,4 @@ declare function Tooltip({ className, offset, ...props }: TooltipProps): react_j
|
|
|
2743
2776
|
|
|
2744
2777
|
declare function cn(...inputs: ClassValue[]): string;
|
|
2745
2778
|
|
|
2746
|
-
export { ATTRIBUTE_TYPES, ATTRIBUTE_TYPE_ICONS, type ActionsColumnOptions, AttachmentChip, type AttachmentChipProps, type AttachmentChipVariants, AttributePicker, type AttributePickerProps, AttributeType, AttributeTypeIcon, type AttributeTypeIconProps, Avatar, AvatarGroup, type AvatarGroupItem, type AvatarGroupProps, type AvatarGroupVariants, type AvatarProps, type AvatarVariants, Badge, BadgeMultiSelect, type BadgeMultiSelectOption, type BadgeMultiSelectProps, type BadgeProps, type BadgeVariants, BooleanCell, type BooleanCellProps, type BreadcrumbItem, Breadcrumbs, type BreadcrumbsProps, Button, type ButtonProps, type ButtonVariants, COLUMN_DRAG_KIND, Card, CardBody, CardContent, CardEyebrow, CardFeatureTitle, CardFooter, CardHeader, type CardProps, CardTitle, type CardVariants, ChannelIcon, type ChannelIconProps, Checkbox, CheckboxGroup, type CheckboxGroupProps, type CheckboxProps, ChipValue, type ChipValueItemRenderer, type ChipValueProps, ColorInput, type ColorInputProps, type ColumnDragData, Combobox, type ComboboxOption, type ComboboxProps, Command, CommandHint, type CommandHintProps, type CommandHintTone, type CommandProps, type ComparisonOperator, type ComposerAttachment, type ComposerConnectionPicker, type ComposerSendInput, type ComposerValue, CurrencyInput, type CurrencyInputOption, type CurrencyInputProps, type CurrencyInputValue, DRAFT_OUTCOME_LABEL, DataTable, DataTableEmpty, type DataTableEmptyProps, DataTableError, type DataTableErrorProps, type DataTableProps, DataTableSkeleton, type DataTableSkeletonProps, DateCell, type DateCellProps, DatePicker, type DatePickerProps, DateTimeCell, type DateTimeCellProps, DateTimePicker, type DateTimePickerProps, type DraftMessageActions, DraftMessageCard, type DraftMessageCardProps, type DraftMessageClient, DraftMessageComposer, type DraftMessageComposerProps, type DraftMessageOutcome, DraftMessageReview, type DraftMessageReviewProps, type DraftReviewOutcome, EmptyState, type EmptyStateProps, type EmptyStateVariants, ErrorAnimation, type ErrorAnimationProps, type FieldAppearance, FieldCaret, type FieldControlVariants, type FieldSize, FileField, type FileFieldProps, type FileFieldValue, FileViewer, FileViewerFallbackCard, type FileViewerFallbackCardProps, type FileViewerFallbackCardVariants, type FileViewerKind, type FileViewerProps, type FileViewerVariants, type FilterElement, type FilterField, type FilterFieldOption, type FilterFieldRelation, type FilterFieldType, type FilterGroup, FilterRow, type FilterRowProps, type FilterValue, FilterValueInput, type FilterValueInputProps, type FilterValueInputRenderer, IconPicker, type IconPickerProps, ImageAttachment, type ImageAttachmentProps, type ImageAttachmentVariants, ImageLightbox, type ImageLightboxProps, type ImageLightboxVariants, type InfiniteQueryLike, Input, type InputProps, Kbd, type KbdProps, type KeyCombo, LinkCell, type LinkCellProps, type LogicalOperator, type LucideIconName, MAX_COMPOSER_ATTACHMENT_BYTES, Menu, MenuItem, type MenuItemProps, MenuPopover, type MenuPopoverProps, type MenuProps, MenuTrigger, MessageComposer, type MessageComposerProps, Modal, ModalBody, ModalContent, type ModalContentProps, ModalDescription, ModalFooter, ModalHeader, ModalTitle, MultiSelect, type MultiSelectOption, type MultiSelectProps, NavGroup, type NavGroupProps, NavItem, type NavItemProps, type NavItemVariants, NavSection, type NavSectionProps, OPERATORS, type OperatorArity, type OperatorDescriptor, OperatorPicker, type OperatorPickerProps, PROTECTED_COMBOS, Popover, PopoverContent, type PopoverContentProps, PopoverPanelBody, PopoverPanelFooter, PopoverPanelHeader, PressableCard, type PressableCardProps, ProgressBar, type ProgressBarProps, type ProgressBarVariants, Radio, RadioGroup, type RadioGroupProps, type RadioProps, RecipientSelect, type RecipientSelectProps, RecordFilterBuilderPanel, type RecordFilterBuilderPanelProps, RecordFilterButton, type RecordFilterButtonProps, RecordFilterChips, type RecordFilterChipsProps, RecordFilterEditor, type RecordFilterEditorProps, RenderChipItemProvider, RenderValueInputProvider, SELECTION_COLUMN_ID, type SearchRecipients, SegmentedControl, type SegmentedControlOption, type SegmentedControlProps, type SegmentedControlVariants, Select, type SelectOption, type SelectProps, Separator, type SeparatorProps, Skeleton, type SkeletonProps, type SkeletonVariants, type SortDirection, SubmenuTrigger, SuccessAnimation, type SuccessAnimationProps, Switch, type SwitchProps, Table, TableBody, type TableBodyProps, TableCell, type TableCellProps, TableHeader, TableHeaderCell, type TableHeaderCellProps, type TableHeaderProps, TableHeaderSpacer, type TableProps, TableRow, type TableRowProps, TableScroller, type TableVariants, Tabs, type TabsListProps, type TabsPanelProps, type TabsRootProps, type TabsTriggerProps, type TabsVariants, TagInput, type TagInputProps, type TerminalKind, Textarea, type TextareaProps, TimeField, type TimeFieldProps, type ToastContent, type ToastOptions, type ToastQueue, ToastRegion, type ToastRegionProps, type ToastVariant, type ToastVariants, Tooltip, type TooltipProps, TooltipTrigger, TruncateCell, type TruncateCellProps, type UseCommandOptions, type UseEscapeKeyOptions, type UseInfiniteScrollSentinelOptions, __resetDraftMessageActions, __resetDraftMessageOutcomes, addLeaf as addFilterLeaf, addPendingLeaf, addSubgroup, arityOf, attachmentChipStyles, avatarGroupStyles, avatarStyles, badgeStyles, buttonStyles, cardStyles, channelIcon, cn, countLeaves, createDraftMessageClient, createToastQueue, defaultValueFor, draftMessageCardStyles, draftMessageComposerStyles, draftOutcomeFor, emptyStateStyles, fieldControlStyles, fieldErrorStyles, fieldHintStyles, fieldLabelStyles, fileViewerFallbackCardStyles, fileViewerStyles, formatFileSize, formatValue, iconForContentType, imageAttachmentStyles, imageLightboxStyles, isColumnDragData, isDraftReviewOutcome, isEditableTarget, isPreviewableImageName, makeActionsColumn, messageComposerStyles, navItemStyles, normalizeHexColor, operatorById, operatorsForType, parseCombo, progressBarStyles, publishDraftMessageOutcome, rebaseRowOnFieldChange, rebaseRowOnOperatorChange, registerDraftMessageActions, removeLeaf, removeSubgroup, replaceLeaf, resolveLucideIcon, resolveLucideIconName, segmentedControlStyles, setJoiner, skeletonStyles, subscribeDraftMessageOutcome, tableCellStyles, tableHeaderCellStyles, tabsStyles, terminalKindFor, toastStyles, updateLeaf, updateSubgroup, useAttributeTypeIcon, useCommand, useDiscoveryActive, useDraftMessageActions, useDraftMessageOutcome, useEscapeKey, useInfiniteScrollSentinel, useRenderChipItem, useRenderValueInput, useShowDetails, viewerKindForContentType, wrapLeafInGroup };
|
|
2779
|
+
export { ATTRIBUTE_TYPES, ATTRIBUTE_TYPE_ICONS, type ActionsColumnOptions, AttachmentChip, type AttachmentChipProps, type AttachmentChipVariants, AttributePicker, type AttributePickerProps, AttributeType, AttributeTypeIcon, type AttributeTypeIconProps, Avatar, AvatarGroup, type AvatarGroupItem, type AvatarGroupProps, type AvatarGroupVariants, type AvatarProps, type AvatarVariants, Badge, BadgeMultiSelect, type BadgeMultiSelectOption, type BadgeMultiSelectProps, type BadgeProps, type BadgeVariants, BooleanCell, type BooleanCellProps, type BreadcrumbItem, Breadcrumbs, type BreadcrumbsProps, Button, type ButtonProps, type ButtonVariants, COLUMN_DRAG_KIND, Card, CardBody, CardContent, CardEyebrow, CardFeatureTitle, CardFooter, CardHeader, type CardProps, CardTitle, type CardVariants, ChannelIcon, type ChannelIconProps, Checkbox, CheckboxGroup, type CheckboxGroupProps, type CheckboxProps, ChipValue, type ChipValueItemRenderer, type ChipValueProps, ColorInput, type ColorInputProps, type ColumnDragData, Combobox, type ComboboxOption, type ComboboxProps, Command, CommandHint, type CommandHintProps, type CommandHintTone, type CommandProps, type ComparisonOperator, type ComposerAttachment, type ComposerConnectionPicker, type ComposerSendInput, type ComposerValue, CurrencyInput, type CurrencyInputOption, type CurrencyInputProps, type CurrencyInputValue, DRAFT_OUTCOME_LABEL, DataTable, DataTableEmpty, type DataTableEmptyProps, DataTableError, type DataTableErrorProps, type DataTableProps, DataTableSkeleton, type DataTableSkeletonProps, DateCell, type DateCellProps, DatePicker, type DatePickerProps, DateTimeCell, type DateTimeCellProps, DateTimePicker, type DateTimePickerProps, type DraftMessageActions, DraftMessageCard, type DraftMessageCardProps, type DraftMessageClient, DraftMessageComposer, type DraftMessageComposerProps, type DraftMessageOutcome, DraftMessageReview, type DraftMessageReviewProps, type DraftReviewOutcome, EmptyState, type EmptyStateProps, type EmptyStateVariants, ErrorAnimation, type ErrorAnimationProps, FIELD_LABEL_SEPARATOR, type FieldAppearance, FieldCaret, type FieldControlVariants, type FieldSize, FileField, type FileFieldProps, type FileFieldValue, FileViewer, FileViewerFallbackCard, type FileViewerFallbackCardProps, type FileViewerFallbackCardVariants, type FileViewerKind, type FileViewerProps, type FileViewerVariants, type FilterElement, type FilterField, type FilterFieldOption, type FilterFieldRelation, type FilterFieldType, type FilterGroup, FilterRow, type FilterRowProps, type FilterValue, FilterValueInput, type FilterValueInputProps, type FilterValueInputRenderer, IconPicker, type IconPickerProps, ImageAttachment, type ImageAttachmentProps, type ImageAttachmentVariants, ImageLightbox, type ImageLightboxProps, type ImageLightboxVariants, type InfiniteQueryLike, Input, type InputProps, Kbd, type KbdProps, type KeyCombo, LinkCell, type LinkCellProps, type LogicalOperator, type LucideIconName, MAX_COMPOSER_ATTACHMENT_BYTES, Menu, MenuItem, type MenuItemProps, MenuPopover, type MenuPopoverProps, type MenuProps, MenuTrigger, MessageComposer, type MessageComposerProps, Modal, ModalBody, ModalContent, type ModalContentProps, ModalDescription, ModalFooter, ModalHeader, ModalTitle, MultiSelect, type MultiSelectOption, type MultiSelectProps, NavGroup, type NavGroupProps, NavItem, type NavItemProps, type NavItemVariants, NavSection, type NavSectionProps, OPERATORS, type OperatorArity, type OperatorDescriptor, OperatorPicker, type OperatorPickerProps, Orb, type OrbProps, type OrbSizeToken, PROTECTED_COMBOS, Popover, PopoverContent, type PopoverContentProps, PopoverPanelBody, PopoverPanelFooter, PopoverPanelHeader, PressableCard, type PressableCardProps, ProgressBar, type ProgressBarProps, type ProgressBarVariants, Radio, RadioGroup, type RadioGroupProps, type RadioProps, RecipientSelect, type RecipientSelectProps, RecordFilterBuilderPanel, type RecordFilterBuilderPanelProps, RecordFilterButton, type RecordFilterButtonProps, RecordFilterChips, type RecordFilterChipsProps, RecordFilterEditor, type RecordFilterEditorProps, RenderChipItemProvider, RenderValueInputProvider, SELECTION_COLUMN_ID, type SearchRecipients, SegmentedControl, type SegmentedControlOption, type SegmentedControlProps, type SegmentedControlVariants, Select, type SelectOption, type SelectProps, Separator, type SeparatorProps, Skeleton, type SkeletonProps, type SkeletonVariants, type SortDirection, SubmenuTrigger, SuccessAnimation, type SuccessAnimationProps, Switch, type SwitchProps, Table, TableBody, type TableBodyProps, TableCell, type TableCellProps, TableHeader, TableHeaderCell, type TableHeaderCellProps, type TableHeaderProps, TableHeaderSpacer, type TableProps, TableRow, type TableRowProps, TableScroller, type TableVariants, Tabs, type TabsListProps, type TabsPanelProps, type TabsRootProps, type TabsTriggerProps, type TabsVariants, TagInput, type TagInputProps, type TerminalKind, Textarea, type TextareaProps, TimeField, type TimeFieldProps, type ToastContent, type ToastOptions, type ToastQueue, ToastRegion, type ToastRegionProps, type ToastVariant, type ToastVariants, Tooltip, type TooltipProps, TooltipTrigger, TruncateCell, type TruncateCellProps, type UseCommandOptions, type UseEscapeKeyOptions, type UseInfiniteScrollSentinelOptions, __resetDraftMessageActions, __resetDraftMessageOutcomes, addLeaf as addFilterLeaf, addPendingLeaf, addSubgroup, arityOf, attachmentChipStyles, avatarGroupStyles, avatarStyles, badgeStyles, buttonStyles, cardStyles, channelIcon, cn, countLeaves, createDraftMessageClient, createToastQueue, defaultValueFor, draftMessageCardStyles, draftMessageComposerStyles, draftOutcomeFor, emptyStateStyles, fieldControlStyles, fieldErrorStyles, fieldHintStyles, fieldLabelStyles, fileViewerFallbackCardStyles, fileViewerStyles, formatFileSize, formatValue, iconForContentType, imageAttachmentStyles, imageLightboxStyles, isColumnDragData, isDraftReviewOutcome, isEditableTarget, isPreviewableImageName, joinFieldLabel, makeActionsColumn, messageComposerStyles, navItemStyles, normalizeHexColor, operatorById, operatorsForType, parseCombo, progressBarStyles, publishDraftMessageOutcome, rebaseRowOnFieldChange, rebaseRowOnOperatorChange, registerDraftMessageActions, removeLeaf, removeSubgroup, replaceLeaf, resolveLucideIcon, resolveLucideIconName, segmentedControlStyles, setJoiner, skeletonStyles, subscribeDraftMessageOutcome, tableCellStyles, tableHeaderCellStyles, tabsStyles, terminalKindFor, toastStyles, updateLeaf, updateSubgroup, useAttributeTypeIcon, useCommand, useDiscoveryActive, useDraftMessageActions, useDraftMessageOutcome, useEscapeKey, useInfiniteScrollSentinel, useRenderChipItem, useRenderValueInput, useShowDetails, viewerKindForContentType, wrapLeafInGroup };
|
package/dist/index.d.ts
CHANGED
|
@@ -9,6 +9,7 @@ import { Key, BreadcrumbsProps as BreadcrumbsProps$1, ButtonProps as ButtonProps
|
|
|
9
9
|
import { ColumnDef, SortingState, OnChangeFn, Row } from '@tanstack/react-table';
|
|
10
10
|
import * as tailwind_merge from 'tailwind-merge';
|
|
11
11
|
import { Message, Conversation, UpdateDraftRequest, ContactAddress, ConversationClient, SendRecipient } from '@proteos/sdk';
|
|
12
|
+
import { OrbState, OrbTheme } from 'thinking-orbs';
|
|
12
13
|
import { ClassValue } from 'clsx';
|
|
13
14
|
|
|
14
15
|
declare const attachmentChipStyles: tailwind_variants.TVReturnType<{
|
|
@@ -1925,6 +1926,23 @@ type NavGroupProps = Omit<DisclosureProps, 'children'> & {
|
|
|
1925
1926
|
* vertical guide rule and pick up nested styling automatically. */
|
|
1926
1927
|
declare function NavGroup({ icon, label, children, className, ...props }: NavGroupProps): react_jsx_runtime.JSX.Element;
|
|
1927
1928
|
|
|
1929
|
+
type OrbSizeToken = 'xs' | 'sm' | 'md' | 'lg';
|
|
1930
|
+
interface OrbProps {
|
|
1931
|
+
/** xs 12 · sm 20 (native inline) · md 40 · lg 64 (native avatar). Default `sm`. */
|
|
1932
|
+
size?: OrbSizeToken;
|
|
1933
|
+
/** Animation state; defaults to `solving` (the working indicator). */
|
|
1934
|
+
state?: OrbState;
|
|
1935
|
+
/** Speed multiplier (1 = tuned speed); e.g. 0.2 for a slow idle shimmer. */
|
|
1936
|
+
speed?: number;
|
|
1937
|
+
/** Pin the ink instead of auto-detecting — `dark` renders light dots (for
|
|
1938
|
+
* a dark chip like the launcher's black circle). */
|
|
1939
|
+
theme?: OrbTheme;
|
|
1940
|
+
className?: string;
|
|
1941
|
+
/** Accessible name; omitting it hides the orb from assistive tech. */
|
|
1942
|
+
label?: string;
|
|
1943
|
+
}
|
|
1944
|
+
declare function Orb({ size, state, speed, theme, className, label }: OrbProps): react_jsx_runtime.JSX.Element;
|
|
1945
|
+
|
|
1928
1946
|
declare function Popover(props: DialogTriggerProps): react_jsx_runtime.JSX.Element;
|
|
1929
1947
|
type PopoverContentProps = Omit<PopoverProps, 'children'> & {
|
|
1930
1948
|
/** Dialog children. Supports the render-prop form `({ close }) => …`. */
|
|
@@ -2027,7 +2045,8 @@ type FilterFieldOption = {
|
|
|
2027
2045
|
type FilterField = {
|
|
2028
2046
|
/** Dot-path to the attribute, e.g. `'owner.email'`. Stable identifier. */
|
|
2029
2047
|
path: string;
|
|
2030
|
-
/** Full nested label, e.g. `'Owner
|
|
2048
|
+
/** Full nested label, e.g. `'Owner · Email'` — parts joined with
|
|
2049
|
+
* `FIELD_LABEL_SEPARATOR`. Used in pickers. */
|
|
2031
2050
|
label: string;
|
|
2032
2051
|
/** Leaf label only, e.g. `'Email'`. Used in chips. */
|
|
2033
2052
|
shortLabel: string;
|
|
@@ -2130,6 +2149,20 @@ type AttributePickerProps = {
|
|
|
2130
2149
|
};
|
|
2131
2150
|
declare function AttributePicker({ fields, value, onChange, autoFocus, isDisabled, size, className, }: AttributePickerProps): react_jsx_runtime.JSX.Element;
|
|
2132
2151
|
|
|
2152
|
+
/**
|
|
2153
|
+
* U+00B7 MIDDLE DOT, spaced. The same separator the app already uses for
|
|
2154
|
+
* breadcrumb-ish text ("Segment · SaaS decision makers"), and quieter than a
|
|
2155
|
+
* slash at the small type sizes these labels render at — the eye reads the
|
|
2156
|
+
* words, not the punctuation.
|
|
2157
|
+
*/
|
|
2158
|
+
declare const FIELD_LABEL_SEPARATOR = " \u00B7 ";
|
|
2159
|
+
/**
|
|
2160
|
+
* Joins breadcrumb parts with {@link FIELD_LABEL_SEPARATOR}, skipping empties
|
|
2161
|
+
* so a field with no parent renders as its own label rather than with a
|
|
2162
|
+
* leading separator.
|
|
2163
|
+
*/
|
|
2164
|
+
declare function joinFieldLabel(...parts: ReadonlyArray<string | undefined | null>): string;
|
|
2165
|
+
|
|
2133
2166
|
/**
|
|
2134
2167
|
* Per-value-item renderer. Called once per value (twice for arity 'n'
|
|
2135
2168
|
* with two items, etc.) AFTER arity orchestration. Return `undefined`
|
|
@@ -2743,4 +2776,4 @@ declare function Tooltip({ className, offset, ...props }: TooltipProps): react_j
|
|
|
2743
2776
|
|
|
2744
2777
|
declare function cn(...inputs: ClassValue[]): string;
|
|
2745
2778
|
|
|
2746
|
-
export { ATTRIBUTE_TYPES, ATTRIBUTE_TYPE_ICONS, type ActionsColumnOptions, AttachmentChip, type AttachmentChipProps, type AttachmentChipVariants, AttributePicker, type AttributePickerProps, AttributeType, AttributeTypeIcon, type AttributeTypeIconProps, Avatar, AvatarGroup, type AvatarGroupItem, type AvatarGroupProps, type AvatarGroupVariants, type AvatarProps, type AvatarVariants, Badge, BadgeMultiSelect, type BadgeMultiSelectOption, type BadgeMultiSelectProps, type BadgeProps, type BadgeVariants, BooleanCell, type BooleanCellProps, type BreadcrumbItem, Breadcrumbs, type BreadcrumbsProps, Button, type ButtonProps, type ButtonVariants, COLUMN_DRAG_KIND, Card, CardBody, CardContent, CardEyebrow, CardFeatureTitle, CardFooter, CardHeader, type CardProps, CardTitle, type CardVariants, ChannelIcon, type ChannelIconProps, Checkbox, CheckboxGroup, type CheckboxGroupProps, type CheckboxProps, ChipValue, type ChipValueItemRenderer, type ChipValueProps, ColorInput, type ColorInputProps, type ColumnDragData, Combobox, type ComboboxOption, type ComboboxProps, Command, CommandHint, type CommandHintProps, type CommandHintTone, type CommandProps, type ComparisonOperator, type ComposerAttachment, type ComposerConnectionPicker, type ComposerSendInput, type ComposerValue, CurrencyInput, type CurrencyInputOption, type CurrencyInputProps, type CurrencyInputValue, DRAFT_OUTCOME_LABEL, DataTable, DataTableEmpty, type DataTableEmptyProps, DataTableError, type DataTableErrorProps, type DataTableProps, DataTableSkeleton, type DataTableSkeletonProps, DateCell, type DateCellProps, DatePicker, type DatePickerProps, DateTimeCell, type DateTimeCellProps, DateTimePicker, type DateTimePickerProps, type DraftMessageActions, DraftMessageCard, type DraftMessageCardProps, type DraftMessageClient, DraftMessageComposer, type DraftMessageComposerProps, type DraftMessageOutcome, DraftMessageReview, type DraftMessageReviewProps, type DraftReviewOutcome, EmptyState, type EmptyStateProps, type EmptyStateVariants, ErrorAnimation, type ErrorAnimationProps, type FieldAppearance, FieldCaret, type FieldControlVariants, type FieldSize, FileField, type FileFieldProps, type FileFieldValue, FileViewer, FileViewerFallbackCard, type FileViewerFallbackCardProps, type FileViewerFallbackCardVariants, type FileViewerKind, type FileViewerProps, type FileViewerVariants, type FilterElement, type FilterField, type FilterFieldOption, type FilterFieldRelation, type FilterFieldType, type FilterGroup, FilterRow, type FilterRowProps, type FilterValue, FilterValueInput, type FilterValueInputProps, type FilterValueInputRenderer, IconPicker, type IconPickerProps, ImageAttachment, type ImageAttachmentProps, type ImageAttachmentVariants, ImageLightbox, type ImageLightboxProps, type ImageLightboxVariants, type InfiniteQueryLike, Input, type InputProps, Kbd, type KbdProps, type KeyCombo, LinkCell, type LinkCellProps, type LogicalOperator, type LucideIconName, MAX_COMPOSER_ATTACHMENT_BYTES, Menu, MenuItem, type MenuItemProps, MenuPopover, type MenuPopoverProps, type MenuProps, MenuTrigger, MessageComposer, type MessageComposerProps, Modal, ModalBody, ModalContent, type ModalContentProps, ModalDescription, ModalFooter, ModalHeader, ModalTitle, MultiSelect, type MultiSelectOption, type MultiSelectProps, NavGroup, type NavGroupProps, NavItem, type NavItemProps, type NavItemVariants, NavSection, type NavSectionProps, OPERATORS, type OperatorArity, type OperatorDescriptor, OperatorPicker, type OperatorPickerProps, PROTECTED_COMBOS, Popover, PopoverContent, type PopoverContentProps, PopoverPanelBody, PopoverPanelFooter, PopoverPanelHeader, PressableCard, type PressableCardProps, ProgressBar, type ProgressBarProps, type ProgressBarVariants, Radio, RadioGroup, type RadioGroupProps, type RadioProps, RecipientSelect, type RecipientSelectProps, RecordFilterBuilderPanel, type RecordFilterBuilderPanelProps, RecordFilterButton, type RecordFilterButtonProps, RecordFilterChips, type RecordFilterChipsProps, RecordFilterEditor, type RecordFilterEditorProps, RenderChipItemProvider, RenderValueInputProvider, SELECTION_COLUMN_ID, type SearchRecipients, SegmentedControl, type SegmentedControlOption, type SegmentedControlProps, type SegmentedControlVariants, Select, type SelectOption, type SelectProps, Separator, type SeparatorProps, Skeleton, type SkeletonProps, type SkeletonVariants, type SortDirection, SubmenuTrigger, SuccessAnimation, type SuccessAnimationProps, Switch, type SwitchProps, Table, TableBody, type TableBodyProps, TableCell, type TableCellProps, TableHeader, TableHeaderCell, type TableHeaderCellProps, type TableHeaderProps, TableHeaderSpacer, type TableProps, TableRow, type TableRowProps, TableScroller, type TableVariants, Tabs, type TabsListProps, type TabsPanelProps, type TabsRootProps, type TabsTriggerProps, type TabsVariants, TagInput, type TagInputProps, type TerminalKind, Textarea, type TextareaProps, TimeField, type TimeFieldProps, type ToastContent, type ToastOptions, type ToastQueue, ToastRegion, type ToastRegionProps, type ToastVariant, type ToastVariants, Tooltip, type TooltipProps, TooltipTrigger, TruncateCell, type TruncateCellProps, type UseCommandOptions, type UseEscapeKeyOptions, type UseInfiniteScrollSentinelOptions, __resetDraftMessageActions, __resetDraftMessageOutcomes, addLeaf as addFilterLeaf, addPendingLeaf, addSubgroup, arityOf, attachmentChipStyles, avatarGroupStyles, avatarStyles, badgeStyles, buttonStyles, cardStyles, channelIcon, cn, countLeaves, createDraftMessageClient, createToastQueue, defaultValueFor, draftMessageCardStyles, draftMessageComposerStyles, draftOutcomeFor, emptyStateStyles, fieldControlStyles, fieldErrorStyles, fieldHintStyles, fieldLabelStyles, fileViewerFallbackCardStyles, fileViewerStyles, formatFileSize, formatValue, iconForContentType, imageAttachmentStyles, imageLightboxStyles, isColumnDragData, isDraftReviewOutcome, isEditableTarget, isPreviewableImageName, makeActionsColumn, messageComposerStyles, navItemStyles, normalizeHexColor, operatorById, operatorsForType, parseCombo, progressBarStyles, publishDraftMessageOutcome, rebaseRowOnFieldChange, rebaseRowOnOperatorChange, registerDraftMessageActions, removeLeaf, removeSubgroup, replaceLeaf, resolveLucideIcon, resolveLucideIconName, segmentedControlStyles, setJoiner, skeletonStyles, subscribeDraftMessageOutcome, tableCellStyles, tableHeaderCellStyles, tabsStyles, terminalKindFor, toastStyles, updateLeaf, updateSubgroup, useAttributeTypeIcon, useCommand, useDiscoveryActive, useDraftMessageActions, useDraftMessageOutcome, useEscapeKey, useInfiniteScrollSentinel, useRenderChipItem, useRenderValueInput, useShowDetails, viewerKindForContentType, wrapLeafInGroup };
|
|
2779
|
+
export { ATTRIBUTE_TYPES, ATTRIBUTE_TYPE_ICONS, type ActionsColumnOptions, AttachmentChip, type AttachmentChipProps, type AttachmentChipVariants, AttributePicker, type AttributePickerProps, AttributeType, AttributeTypeIcon, type AttributeTypeIconProps, Avatar, AvatarGroup, type AvatarGroupItem, type AvatarGroupProps, type AvatarGroupVariants, type AvatarProps, type AvatarVariants, Badge, BadgeMultiSelect, type BadgeMultiSelectOption, type BadgeMultiSelectProps, type BadgeProps, type BadgeVariants, BooleanCell, type BooleanCellProps, type BreadcrumbItem, Breadcrumbs, type BreadcrumbsProps, Button, type ButtonProps, type ButtonVariants, COLUMN_DRAG_KIND, Card, CardBody, CardContent, CardEyebrow, CardFeatureTitle, CardFooter, CardHeader, type CardProps, CardTitle, type CardVariants, ChannelIcon, type ChannelIconProps, Checkbox, CheckboxGroup, type CheckboxGroupProps, type CheckboxProps, ChipValue, type ChipValueItemRenderer, type ChipValueProps, ColorInput, type ColorInputProps, type ColumnDragData, Combobox, type ComboboxOption, type ComboboxProps, Command, CommandHint, type CommandHintProps, type CommandHintTone, type CommandProps, type ComparisonOperator, type ComposerAttachment, type ComposerConnectionPicker, type ComposerSendInput, type ComposerValue, CurrencyInput, type CurrencyInputOption, type CurrencyInputProps, type CurrencyInputValue, DRAFT_OUTCOME_LABEL, DataTable, DataTableEmpty, type DataTableEmptyProps, DataTableError, type DataTableErrorProps, type DataTableProps, DataTableSkeleton, type DataTableSkeletonProps, DateCell, type DateCellProps, DatePicker, type DatePickerProps, DateTimeCell, type DateTimeCellProps, DateTimePicker, type DateTimePickerProps, type DraftMessageActions, DraftMessageCard, type DraftMessageCardProps, type DraftMessageClient, DraftMessageComposer, type DraftMessageComposerProps, type DraftMessageOutcome, DraftMessageReview, type DraftMessageReviewProps, type DraftReviewOutcome, EmptyState, type EmptyStateProps, type EmptyStateVariants, ErrorAnimation, type ErrorAnimationProps, FIELD_LABEL_SEPARATOR, type FieldAppearance, FieldCaret, type FieldControlVariants, type FieldSize, FileField, type FileFieldProps, type FileFieldValue, FileViewer, FileViewerFallbackCard, type FileViewerFallbackCardProps, type FileViewerFallbackCardVariants, type FileViewerKind, type FileViewerProps, type FileViewerVariants, type FilterElement, type FilterField, type FilterFieldOption, type FilterFieldRelation, type FilterFieldType, type FilterGroup, FilterRow, type FilterRowProps, type FilterValue, FilterValueInput, type FilterValueInputProps, type FilterValueInputRenderer, IconPicker, type IconPickerProps, ImageAttachment, type ImageAttachmentProps, type ImageAttachmentVariants, ImageLightbox, type ImageLightboxProps, type ImageLightboxVariants, type InfiniteQueryLike, Input, type InputProps, Kbd, type KbdProps, type KeyCombo, LinkCell, type LinkCellProps, type LogicalOperator, type LucideIconName, MAX_COMPOSER_ATTACHMENT_BYTES, Menu, MenuItem, type MenuItemProps, MenuPopover, type MenuPopoverProps, type MenuProps, MenuTrigger, MessageComposer, type MessageComposerProps, Modal, ModalBody, ModalContent, type ModalContentProps, ModalDescription, ModalFooter, ModalHeader, ModalTitle, MultiSelect, type MultiSelectOption, type MultiSelectProps, NavGroup, type NavGroupProps, NavItem, type NavItemProps, type NavItemVariants, NavSection, type NavSectionProps, OPERATORS, type OperatorArity, type OperatorDescriptor, OperatorPicker, type OperatorPickerProps, Orb, type OrbProps, type OrbSizeToken, PROTECTED_COMBOS, Popover, PopoverContent, type PopoverContentProps, PopoverPanelBody, PopoverPanelFooter, PopoverPanelHeader, PressableCard, type PressableCardProps, ProgressBar, type ProgressBarProps, type ProgressBarVariants, Radio, RadioGroup, type RadioGroupProps, type RadioProps, RecipientSelect, type RecipientSelectProps, RecordFilterBuilderPanel, type RecordFilterBuilderPanelProps, RecordFilterButton, type RecordFilterButtonProps, RecordFilterChips, type RecordFilterChipsProps, RecordFilterEditor, type RecordFilterEditorProps, RenderChipItemProvider, RenderValueInputProvider, SELECTION_COLUMN_ID, type SearchRecipients, SegmentedControl, type SegmentedControlOption, type SegmentedControlProps, type SegmentedControlVariants, Select, type SelectOption, type SelectProps, Separator, type SeparatorProps, Skeleton, type SkeletonProps, type SkeletonVariants, type SortDirection, SubmenuTrigger, SuccessAnimation, type SuccessAnimationProps, Switch, type SwitchProps, Table, TableBody, type TableBodyProps, TableCell, type TableCellProps, TableHeader, TableHeaderCell, type TableHeaderCellProps, type TableHeaderProps, TableHeaderSpacer, type TableProps, TableRow, type TableRowProps, TableScroller, type TableVariants, Tabs, type TabsListProps, type TabsPanelProps, type TabsRootProps, type TabsTriggerProps, type TabsVariants, TagInput, type TagInputProps, type TerminalKind, Textarea, type TextareaProps, TimeField, type TimeFieldProps, type ToastContent, type ToastOptions, type ToastQueue, ToastRegion, type ToastRegionProps, type ToastVariant, type ToastVariants, Tooltip, type TooltipProps, TooltipTrigger, TruncateCell, type TruncateCellProps, type UseCommandOptions, type UseEscapeKeyOptions, type UseInfiniteScrollSentinelOptions, __resetDraftMessageActions, __resetDraftMessageOutcomes, addLeaf as addFilterLeaf, addPendingLeaf, addSubgroup, arityOf, attachmentChipStyles, avatarGroupStyles, avatarStyles, badgeStyles, buttonStyles, cardStyles, channelIcon, cn, countLeaves, createDraftMessageClient, createToastQueue, defaultValueFor, draftMessageCardStyles, draftMessageComposerStyles, draftOutcomeFor, emptyStateStyles, fieldControlStyles, fieldErrorStyles, fieldHintStyles, fieldLabelStyles, fileViewerFallbackCardStyles, fileViewerStyles, formatFileSize, formatValue, iconForContentType, imageAttachmentStyles, imageLightboxStyles, isColumnDragData, isDraftReviewOutcome, isEditableTarget, isPreviewableImageName, joinFieldLabel, makeActionsColumn, messageComposerStyles, navItemStyles, normalizeHexColor, operatorById, operatorsForType, parseCombo, progressBarStyles, publishDraftMessageOutcome, rebaseRowOnFieldChange, rebaseRowOnOperatorChange, registerDraftMessageActions, removeLeaf, removeSubgroup, replaceLeaf, resolveLucideIcon, resolveLucideIconName, segmentedControlStyles, setJoiner, skeletonStyles, subscribeDraftMessageOutcome, tableCellStyles, tableHeaderCellStyles, tabsStyles, terminalKindFor, toastStyles, updateLeaf, updateSubgroup, useAttributeTypeIcon, useCommand, useDiscoveryActive, useDraftMessageActions, useDraftMessageOutcome, useEscapeKey, useInfiniteScrollSentinel, useRenderChipItem, useRenderValueInput, useShowDetails, viewerKindForContentType, wrapLeafInGroup };
|
package/dist/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { cn, Button, Skeleton } from './chunk-IKAX76MB.js';
|
|
2
2
|
export { Button, Skeleton, buttonStyles, cn, skeletonStyles } from './chunk-IKAX76MB.js';
|
|
3
|
-
import { icons, Paperclip, BookText, Banknote, UsersRound, User, Link2, Braces, Brackets, ToggleLeft, CircleDot, Calendar, Hash, Type, File, FileImage, FileText, FileSpreadsheet, FileArchive, Loader2, X, Shapes, Search, AudioLines, Video, Mic, AtSign, MessagesSquare, Camera, Send, Linkedin, MessageCircle, Mail, Pipette, ChevronDown, GripVertical, SendHorizontal, CircleX, Download, ChevronRight as ChevronRight$1, CircleCheck, CircleAlert, Info } from 'lucide-react';
|
|
3
|
+
import { icons, Paperclip, BookText, Banknote, UsersRound, User, Link2, Braces, Brackets, ToggleLeft, CircleDot, Calendar, Hash, Type, File, FileImage, FileText, FileSpreadsheet, FileArchive, Loader2, X, Shapes, Search, Phone, AudioLines, Video, Mic, AtSign, MessagesSquare, Camera, Send, Linkedin, MessageCircle, Mail, Pipette, ChevronDown, GripVertical, SendHorizontal, CircleX, Download, ChevronRight as ChevronRight$1, CircleCheck, CircleAlert, Info } from 'lucide-react';
|
|
4
4
|
import { tv } from 'tailwind-variants';
|
|
5
5
|
import { Tabs as Tabs$1, TabPanel, Tab, TabList, MenuTrigger as MenuTrigger$1, SubmenuTrigger as SubmenuTrigger$1, DialogTrigger, Popover as Popover$1, Dialog, DropZone, Text, FileTrigger, Heading, Label, Input as Input$1, ListBox, ListBoxItem, Breadcrumbs as Breadcrumbs$1, Breadcrumb, Link, Button as Button$1, Checkbox as Checkbox$1, CheckboxGroup as CheckboxGroup$1, FieldError, TextField, ComboBox, ComboBoxStateContext, Select as Select$1, DatePicker as DatePicker$1, Group, DateInput, DateSegment, SelectValue, ModalOverlay, Modal as Modal$1, Menu as Menu$1, MenuItem as MenuItem$1, Disclosure, DisclosurePanel, ProgressBar as ProgressBar$1, RadioGroup as RadioGroup$1, Radio as Radio$1, Separator as Separator$1, Switch as Switch$1, TextArea, TimeField as TimeField$1, UNSTABLE_ToastQueue, UNSTABLE_ToastRegion, UNSTABLE_Toast, UNSTABLE_ToastContent, TooltipTrigger as TooltipTrigger$1, Tooltip as Tooltip$1, Calendar as Calendar$1, CalendarGrid, CalendarGridHeader, CalendarHeaderCell, CalendarGridBody, CalendarCell, DatePickerStateContext } from 'react-aria-components';
|
|
6
6
|
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
@@ -12,6 +12,7 @@ import { reorderWithEdge } from '@atlaskit/pragmatic-drag-and-drop-hitbox/util/r
|
|
|
12
12
|
import { useReactTable, getCoreRowModel, flexRender } from '@tanstack/react-table';
|
|
13
13
|
import { useVirtualizer } from '@tanstack/react-virtual';
|
|
14
14
|
import { combine } from '@atlaskit/pragmatic-drag-and-drop/combine';
|
|
15
|
+
import { ThinkingOrb } from 'thinking-orbs';
|
|
15
16
|
import { parseDate } from '@internationalized/date';
|
|
16
17
|
|
|
17
18
|
function Popover(props) {
|
|
@@ -1249,7 +1250,8 @@ var CHANNEL_ICONS = {
|
|
|
1249
1250
|
"google-meet": Video,
|
|
1250
1251
|
"teams-meeting": Video,
|
|
1251
1252
|
"webex-meeting": Video,
|
|
1252
|
-
adhoc: AudioLines
|
|
1253
|
+
adhoc: AudioLines,
|
|
1254
|
+
phone: Phone
|
|
1253
1255
|
};
|
|
1254
1256
|
function channelIcon(channel) {
|
|
1255
1257
|
return CHANNEL_ICONS[channel] ?? MessagesSquare;
|
|
@@ -5292,6 +5294,24 @@ function NavGroup({ icon, label, children, className, ...props }) {
|
|
|
5292
5294
|
) })
|
|
5293
5295
|
] });
|
|
5294
5296
|
}
|
|
5297
|
+
var SIZE_PX = { xs: 12, sm: 20, md: 40, lg: 64 };
|
|
5298
|
+
var DESIGN = { xs: 20, sm: 20, md: 64, lg: 64 };
|
|
5299
|
+
function Orb({ size = "sm", state = "solving", speed, theme, className, label }) {
|
|
5300
|
+
const px = SIZE_PX[size];
|
|
5301
|
+
const design = DESIGN[size];
|
|
5302
|
+
return /* @__PURE__ */ jsx(
|
|
5303
|
+
ThinkingOrb,
|
|
5304
|
+
{
|
|
5305
|
+
state,
|
|
5306
|
+
size: design,
|
|
5307
|
+
...speed !== void 0 ? { speed } : {},
|
|
5308
|
+
...theme !== void 0 ? { theme } : {},
|
|
5309
|
+
className: cn("inline-block shrink-0", className),
|
|
5310
|
+
...px !== design ? { style: { width: px, height: px } } : {},
|
|
5311
|
+
...label ? { "aria-label": label } : { "aria-hidden": true }
|
|
5312
|
+
}
|
|
5313
|
+
);
|
|
5314
|
+
}
|
|
5295
5315
|
var progressBarStyles = tv({
|
|
5296
5316
|
slots: {
|
|
5297
5317
|
track: "relative overflow-hidden rounded-pill bg-surface-2 w-full",
|
|
@@ -5426,6 +5446,12 @@ function FieldTypeTag({ children }) {
|
|
|
5426
5446
|
return /* @__PURE__ */ jsx("span", { className: "font-mono text-[10px] uppercase tracking-[0.08em] text-ink-4", children });
|
|
5427
5447
|
}
|
|
5428
5448
|
|
|
5449
|
+
// src/components/record-filter/field-label.ts
|
|
5450
|
+
var FIELD_LABEL_SEPARATOR = " \xB7 ";
|
|
5451
|
+
function joinFieldLabel(...parts) {
|
|
5452
|
+
return parts.filter((part) => !!part && part.length > 0).join(FIELD_LABEL_SEPARATOR);
|
|
5453
|
+
}
|
|
5454
|
+
|
|
5429
5455
|
// src/components/record-filter/operators.ts
|
|
5430
5456
|
var OPERATORS = [
|
|
5431
5457
|
{
|
|
@@ -5557,7 +5583,7 @@ function ChipItem({
|
|
|
5557
5583
|
if (custom !== void 0) return /* @__PURE__ */ jsx(Fragment, { children: custom });
|
|
5558
5584
|
}
|
|
5559
5585
|
if (field.type === "enum") {
|
|
5560
|
-
const option = field
|
|
5586
|
+
const option = findEnumOption(field, value);
|
|
5561
5587
|
return /* @__PURE__ */ jsx(
|
|
5562
5588
|
Badge,
|
|
5563
5589
|
{
|
|
@@ -5573,6 +5599,9 @@ function ChipItem({
|
|
|
5573
5599
|
function Em({ children }) {
|
|
5574
5600
|
return /* @__PURE__ */ jsx("span", { className: "font-mono text-[12px] text-ink-4", children });
|
|
5575
5601
|
}
|
|
5602
|
+
function findEnumOption(field, value) {
|
|
5603
|
+
return field.options?.find((option) => option.value === value);
|
|
5604
|
+
}
|
|
5576
5605
|
function formatValue(field, operator, value) {
|
|
5577
5606
|
const arity = arityOf(operator);
|
|
5578
5607
|
if (arity === 0) return "";
|
|
@@ -5580,13 +5609,16 @@ function formatValue(field, operator, value) {
|
|
|
5580
5609
|
const arr = Array.isArray(value) ? value : typeof value === "string" && value.length > 0 ? value.split(",") : [];
|
|
5581
5610
|
if (arr.length === 0) return "\u2014";
|
|
5582
5611
|
if (field.type === "enum") {
|
|
5583
|
-
const labels = arr.map((v) => field
|
|
5612
|
+
const labels = arr.map((v) => findEnumOption(field, v)?.label ?? v);
|
|
5584
5613
|
return labels.length <= 2 ? labels.join(", ") : `${labels[0]}, ${labels[1]} +${labels.length - 2}`;
|
|
5585
5614
|
}
|
|
5586
5615
|
return arr.length <= 2 ? arr.join(", ") : `${arr[0]}, ${arr[1]} +${arr.length - 2}`;
|
|
5587
5616
|
}
|
|
5588
5617
|
if (field.type === "boolean") return value === true || value === "true" ? "true" : "false";
|
|
5589
5618
|
if (value === "" || value == null) return "\u2014";
|
|
5619
|
+
if (field.type === "enum") {
|
|
5620
|
+
return findEnumOption(field, String(value))?.label ?? String(value);
|
|
5621
|
+
}
|
|
5590
5622
|
if (field.type === "number" || field.type === "integer") {
|
|
5591
5623
|
const n = Number(value);
|
|
5592
5624
|
return Number.isFinite(n) ? n.toLocaleString() : String(value);
|
|
@@ -7194,7 +7226,7 @@ function Chip2({
|
|
|
7194
7226
|
/* @__PURE__ */ jsxs("span", { className: "font-sans text-[12.5px] text-ink-2", children: [
|
|
7195
7227
|
field.parentLabel ? /* @__PURE__ */ jsxs("span", { className: "text-ink-4", children: [
|
|
7196
7228
|
field.parentLabel,
|
|
7197
|
-
|
|
7229
|
+
FIELD_LABEL_SEPARATOR
|
|
7198
7230
|
] }) : null,
|
|
7199
7231
|
/* @__PURE__ */ jsx("span", { className: "text-ink", children: field.shortLabel })
|
|
7200
7232
|
] }),
|
|
@@ -7705,6 +7737,6 @@ function Tooltip({ className, offset = 6, ...props }) {
|
|
|
7705
7737
|
);
|
|
7706
7738
|
}
|
|
7707
7739
|
|
|
7708
|
-
export { ATTRIBUTE_TYPES, ATTRIBUTE_TYPE_ICONS, AttachmentChip, AttributePicker, AttributeType, AttributeTypeIcon, Avatar, AvatarGroup, Badge, BadgeMultiSelect, BooleanCell, Breadcrumbs, COLUMN_DRAG_KIND, Card, CardBody, CardContent, CardEyebrow, CardFeatureTitle, CardFooter, CardHeader, CardTitle, ChannelIcon, Checkbox, CheckboxGroup, ChipValue, ColorInput, Combobox, Command, CommandHint, CurrencyInput, DRAFT_OUTCOME_LABEL, DataTable, DataTableEmpty, DataTableError, DataTableSkeleton, DateCell, DatePicker, DateTimeCell, DateTimePicker, DraftMessageCard, DraftMessageComposer, DraftMessageReview, EmptyState, ErrorAnimation, FieldCaret, FileField, FileViewer, FileViewerFallbackCard, FilterRow, FilterValueInput, IconPicker, ImageAttachment, ImageLightbox, Input, Kbd, LinkCell, MAX_COMPOSER_ATTACHMENT_BYTES, Menu, MenuItem, MenuPopover, MenuTrigger, MessageComposer, Modal, ModalBody, ModalContent, ModalDescription, ModalFooter, ModalHeader, ModalTitle, MultiSelect, NavGroup, NavItem, NavSection, OPERATORS, OperatorPicker, PROTECTED_COMBOS, Popover, PopoverContent, PopoverPanelBody, PopoverPanelFooter, PopoverPanelHeader, PressableCard, ProgressBar, Radio, RadioGroup, RecipientSelect, RecordFilterBuilderPanel, RecordFilterButton, RecordFilterChips, RecordFilterEditor, RenderChipItemProvider, RenderValueInputProvider, SELECTION_COLUMN_ID, SegmentedControl, Select, Separator, SubmenuTrigger, SuccessAnimation, Switch, Table, TableBody, TableCell, TableHeader, TableHeaderCell, TableHeaderSpacer, TableRow, TableScroller, Tabs, TagInput, Textarea, TimeField, ToastRegion, Tooltip, TooltipTrigger, TruncateCell, __resetDraftMessageActions, __resetDraftMessageOutcomes, addLeaf as addFilterLeaf, addPendingLeaf, addSubgroup, arityOf, attachmentChipStyles, avatarGroupStyles, avatarStyles, badgeStyles, cardStyles2 as cardStyles, channelIcon, countLeaves, createDraftMessageClient, createToastQueue, defaultValueFor, draftMessageCardStyles, draftMessageComposerStyles, draftOutcomeFor, emptyStateStyles, fieldControlStyles, fieldErrorStyles, fieldHintStyles, fieldLabelStyles, fileViewerFallbackCardStyles, fileViewerStyles, formatFileSize, formatValue, iconForContentType, imageAttachmentStyles, imageLightboxStyles, isColumnDragData, isDraftReviewOutcome, isEditableTarget, isPreviewableImageName, makeActionsColumn, messageComposerStyles, navItemStyles, normalizeHexColor, operatorById, operatorsForType, parseCombo, progressBarStyles, publishDraftMessageOutcome, rebaseRowOnFieldChange, rebaseRowOnOperatorChange, registerDraftMessageActions, removeLeaf, removeSubgroup, replaceLeaf, resolveLucideIcon, resolveLucideIconName, segmentedControlStyles, setJoiner, subscribeDraftMessageOutcome, tableCellStyles, tableHeaderCellStyles, tabsStyles, terminalKindFor, toastStyles, updateLeaf, updateSubgroup, useAttributeTypeIcon, useCommand, useDiscoveryActive, useDraftMessageActions, useDraftMessageOutcome, useEscapeKey, useInfiniteScrollSentinel, useRenderChipItem, useRenderValueInput, useShowDetails, viewerKindForContentType, wrapLeafInGroup };
|
|
7740
|
+
export { ATTRIBUTE_TYPES, ATTRIBUTE_TYPE_ICONS, AttachmentChip, AttributePicker, AttributeType, AttributeTypeIcon, Avatar, AvatarGroup, Badge, BadgeMultiSelect, BooleanCell, Breadcrumbs, COLUMN_DRAG_KIND, Card, CardBody, CardContent, CardEyebrow, CardFeatureTitle, CardFooter, CardHeader, CardTitle, ChannelIcon, Checkbox, CheckboxGroup, ChipValue, ColorInput, Combobox, Command, CommandHint, CurrencyInput, DRAFT_OUTCOME_LABEL, DataTable, DataTableEmpty, DataTableError, DataTableSkeleton, DateCell, DatePicker, DateTimeCell, DateTimePicker, DraftMessageCard, DraftMessageComposer, DraftMessageReview, EmptyState, ErrorAnimation, FIELD_LABEL_SEPARATOR, FieldCaret, FileField, FileViewer, FileViewerFallbackCard, FilterRow, FilterValueInput, IconPicker, ImageAttachment, ImageLightbox, Input, Kbd, LinkCell, MAX_COMPOSER_ATTACHMENT_BYTES, Menu, MenuItem, MenuPopover, MenuTrigger, MessageComposer, Modal, ModalBody, ModalContent, ModalDescription, ModalFooter, ModalHeader, ModalTitle, MultiSelect, NavGroup, NavItem, NavSection, OPERATORS, OperatorPicker, Orb, PROTECTED_COMBOS, Popover, PopoverContent, PopoverPanelBody, PopoverPanelFooter, PopoverPanelHeader, PressableCard, ProgressBar, Radio, RadioGroup, RecipientSelect, RecordFilterBuilderPanel, RecordFilterButton, RecordFilterChips, RecordFilterEditor, RenderChipItemProvider, RenderValueInputProvider, SELECTION_COLUMN_ID, SegmentedControl, Select, Separator, SubmenuTrigger, SuccessAnimation, Switch, Table, TableBody, TableCell, TableHeader, TableHeaderCell, TableHeaderSpacer, TableRow, TableScroller, Tabs, TagInput, Textarea, TimeField, ToastRegion, Tooltip, TooltipTrigger, TruncateCell, __resetDraftMessageActions, __resetDraftMessageOutcomes, addLeaf as addFilterLeaf, addPendingLeaf, addSubgroup, arityOf, attachmentChipStyles, avatarGroupStyles, avatarStyles, badgeStyles, cardStyles2 as cardStyles, channelIcon, countLeaves, createDraftMessageClient, createToastQueue, defaultValueFor, draftMessageCardStyles, draftMessageComposerStyles, draftOutcomeFor, emptyStateStyles, fieldControlStyles, fieldErrorStyles, fieldHintStyles, fieldLabelStyles, fileViewerFallbackCardStyles, fileViewerStyles, formatFileSize, formatValue, iconForContentType, imageAttachmentStyles, imageLightboxStyles, isColumnDragData, isDraftReviewOutcome, isEditableTarget, isPreviewableImageName, joinFieldLabel, makeActionsColumn, messageComposerStyles, navItemStyles, normalizeHexColor, operatorById, operatorsForType, parseCombo, progressBarStyles, publishDraftMessageOutcome, rebaseRowOnFieldChange, rebaseRowOnOperatorChange, registerDraftMessageActions, removeLeaf, removeSubgroup, replaceLeaf, resolveLucideIcon, resolveLucideIconName, segmentedControlStyles, setJoiner, subscribeDraftMessageOutcome, tableCellStyles, tableHeaderCellStyles, tabsStyles, terminalKindFor, toastStyles, updateLeaf, updateSubgroup, useAttributeTypeIcon, useCommand, useDiscoveryActive, useDraftMessageActions, useDraftMessageOutcome, useEscapeKey, useInfiniteScrollSentinel, useRenderChipItem, useRenderValueInput, useShowDetails, viewerKindForContentType, wrapLeafInGroup };
|
|
7709
7741
|
//# sourceMappingURL=index.js.map
|
|
7710
7742
|
//# sourceMappingURL=index.js.map
|