@astryxdesign/core 0.1.5 → 0.1.6-canary.02f2602
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/CHANGELOG.md +24 -0
- package/README.md +2 -0
- package/dist/AlertDialog/AlertDialog.d.ts +1 -1
- package/dist/AlertDialog/AlertDialog.d.ts.map +1 -1
- package/dist/AlertDialog/AlertDialog.js +21 -18
- package/dist/AlertDialog/useImperativeAlertDialog.d.ts +0 -2
- package/dist/AlertDialog/useImperativeAlertDialog.d.ts.map +1 -1
- package/dist/AlertDialog/useImperativeAlertDialog.js +3 -5
- package/dist/AppShell/AppShell.d.ts.map +1 -1
- package/dist/AppShell/AppShell.js +55 -53
- package/dist/AspectRatio/AspectRatio.js +5 -5
- package/dist/Avatar/Avatar.js +19 -19
- package/dist/Avatar/AvatarStatusDot.js +5 -5
- package/dist/AvatarGroup/AvatarGroup.d.ts +1 -1
- package/dist/AvatarGroup/AvatarGroup.d.ts.map +1 -1
- package/dist/AvatarGroup/AvatarGroup.js +9 -6
- package/dist/AvatarGroup/AvatarGroupOverflow.js +5 -5
- package/dist/Badge/Badge.js +3 -3
- package/dist/Banner/Banner.d.ts.map +1 -1
- package/dist/Banner/Banner.js +32 -30
- package/dist/Blockquote/Blockquote.js +7 -7
- package/dist/Breadcrumbs/BreadcrumbItem.js +17 -17
- package/dist/Breadcrumbs/Breadcrumbs.d.ts +1 -1
- package/dist/Breadcrumbs/Breadcrumbs.d.ts.map +1 -1
- package/dist/Breadcrumbs/Breadcrumbs.js +11 -8
- package/dist/Button/Button.d.ts.map +1 -1
- package/dist/Button/Button.js +53 -23
- package/dist/ButtonGroup/ButtonGroup.d.ts +20 -5
- package/dist/ButtonGroup/ButtonGroup.d.ts.map +1 -1
- package/dist/ButtonGroup/ButtonGroup.js +34 -18
- package/dist/Calendar/Calendar.d.ts.map +1 -1
- package/dist/Calendar/Calendar.js +51 -48
- package/dist/Card/Card.js +3 -3
- package/dist/Carousel/Carousel.d.ts +1 -1
- package/dist/Carousel/Carousel.d.ts.map +1 -1
- package/dist/Carousel/Carousel.js +27 -24
- package/dist/Center/Center.js +3 -3
- package/dist/Chat/ChatComposer.d.ts.map +1 -1
- package/dist/Chat/ChatComposer.js +27 -24
- package/dist/Chat/ChatComposerDrawer.d.ts +1 -1
- package/dist/Chat/ChatComposerDrawer.d.ts.map +1 -1
- package/dist/Chat/ChatComposerDrawer.js +23 -16
- package/dist/Chat/ChatComposerInput.d.ts.map +1 -1
- package/dist/Chat/ChatComposerInput.js +20 -16
- package/dist/Chat/ChatDictationButton.js +10 -10
- package/dist/Chat/ChatLayout.d.ts +1 -11
- package/dist/Chat/ChatLayout.d.ts.map +1 -1
- package/dist/Chat/ChatLayout.js +23 -21
- package/dist/Chat/ChatLayoutScrollButton.d.ts.map +1 -1
- package/dist/Chat/ChatLayoutScrollButton.js +13 -11
- package/dist/Chat/ChatMessage.d.ts +1 -1
- package/dist/Chat/ChatMessage.d.ts.map +1 -1
- package/dist/Chat/ChatMessage.js +20 -14
- package/dist/Chat/ChatMessageBubble.d.ts +1 -1
- package/dist/Chat/ChatMessageBubble.d.ts.map +1 -1
- package/dist/Chat/ChatMessageBubble.js +10 -8
- package/dist/Chat/ChatMessageList.d.ts +1 -1
- package/dist/Chat/ChatMessageList.d.ts.map +1 -1
- package/dist/Chat/ChatMessageList.js +17 -15
- package/dist/Chat/ChatMessageMetadata.d.ts.map +1 -1
- package/dist/Chat/ChatMessageMetadata.js +24 -19
- package/dist/Chat/ChatPastedTextToken.d.ts.map +1 -1
- package/dist/Chat/ChatPastedTextToken.js +16 -14
- package/dist/Chat/ChatSendButton.d.ts.map +1 -1
- package/dist/Chat/ChatSendButton.js +6 -4
- package/dist/Chat/ChatSystemMessage.js +11 -11
- package/dist/Chat/ChatTokenizedText.js +8 -8
- package/dist/Chat/ChatToolCalls.js +73 -73
- package/dist/Chat/useSpeechRecognition.d.ts.map +1 -1
- package/dist/Chat/useSpeechRecognition.js +4 -2
- package/dist/Chat/useTriggerMenu.d.ts.map +1 -1
- package/dist/Chat/useTriggerMenu.js +19 -17
- package/dist/CheckboxInput/CheckboxInput.d.ts.map +1 -1
- package/dist/CheckboxInput/CheckboxInput.js +26 -24
- package/dist/CheckboxList/CheckboxList.d.ts +1 -1
- package/dist/CheckboxList/CheckboxList.d.ts.map +1 -1
- package/dist/CheckboxList/CheckboxList.js +12 -10
- package/dist/CheckboxList/CheckboxListItem.d.ts.map +1 -1
- package/dist/CheckboxList/CheckboxListItem.js +8 -6
- package/dist/Citation/Citation.d.ts.map +1 -1
- package/dist/Citation/Citation.js +20 -12
- package/dist/ClickableCard/ClickableCard.js +6 -6
- package/dist/Code/Code.js +3 -3
- package/dist/CodeBlock/CodeBlock.d.ts.map +1 -1
- package/dist/CodeBlock/CodeBlock.js +114 -96
- package/dist/Collapsible/Collapsible.js +11 -11
- package/dist/Collapsible/CollapsibleGroup.js +7 -7
- package/dist/CommandPalette/CommandPalette.d.ts +1 -1
- package/dist/CommandPalette/CommandPalette.d.ts.map +1 -1
- package/dist/CommandPalette/CommandPalette.js +39 -34
- package/dist/CommandPalette/CommandPaletteEmpty.js +3 -3
- package/dist/CommandPalette/CommandPaletteFooter.js +16 -16
- package/dist/CommandPalette/CommandPaletteGroup.js +5 -5
- package/dist/CommandPalette/CommandPaletteInput.d.ts +1 -1
- package/dist/CommandPalette/CommandPaletteInput.d.ts.map +1 -1
- package/dist/CommandPalette/CommandPaletteInput.js +17 -14
- package/dist/CommandPalette/CommandPaletteItem.js +3 -3
- package/dist/CommandPalette/CommandPaletteList.d.ts +1 -1
- package/dist/CommandPalette/CommandPaletteList.d.ts.map +1 -1
- package/dist/CommandPalette/CommandPaletteList.js +7 -4
- package/dist/ContextMenu/ContextMenu.d.ts +1 -1
- package/dist/ContextMenu/ContextMenu.d.ts.map +1 -1
- package/dist/ContextMenu/ContextMenu.js +14 -11
- package/dist/DateInput/DateInput.d.ts +1 -1
- package/dist/DateInput/DateInput.d.ts.map +1 -1
- package/dist/DateInput/DateInput.js +28 -23
- package/dist/DateRangeInput/DateRangeInput.d.ts +1 -1
- package/dist/DateRangeInput/DateRangeInput.d.ts.map +1 -1
- package/dist/DateRangeInput/DateRangeInput.js +32 -27
- package/dist/DateTimeInput/DateTimeInput.d.ts +1 -1
- package/dist/DateTimeInput/DateTimeInput.d.ts.map +1 -1
- package/dist/DateTimeInput/DateTimeInput.js +41 -33
- package/dist/Dialog/Dialog.js +9 -9
- package/dist/Dialog/DialogHeader.d.ts.map +1 -1
- package/dist/Dialog/DialogHeader.js +20 -18
- package/dist/Dialog/useImperativeDialog.js +3 -3
- package/dist/Divider/Divider.js +7 -7
- package/dist/DropdownMenu/DropdownMenu.d.ts +1 -1
- package/dist/DropdownMenu/DropdownMenu.d.ts.map +1 -1
- package/dist/DropdownMenu/DropdownMenu.js +21 -15
- package/dist/DropdownMenu/DropdownMenuItem.js +3 -3
- package/dist/DropdownMenu/renderDropdownItems.js +10 -10
- package/dist/EmptyState/EmptyState.d.ts +4 -1
- package/dist/EmptyState/EmptyState.d.ts.map +1 -1
- package/dist/EmptyState/EmptyState.js +9 -9
- package/dist/Field/Field.js +17 -17
- package/dist/Field/FieldLabel.js +15 -15
- package/dist/Field/InputClearButton.js +5 -5
- package/dist/FieldStatus/FieldStatus.js +3 -3
- package/dist/FileInput/FileInput.d.ts.map +1 -1
- package/dist/FileInput/FileInput.js +34 -30
- package/dist/FormLayout/FormLayout.js +5 -5
- package/dist/Grid/Grid.js +3 -3
- package/dist/Grid/GridSpan.js +3 -3
- package/dist/HStack/HStack.js +3 -3
- package/dist/Heading/Heading.js +10 -10
- package/dist/HoverCard/HoverCard.js +9 -9
- package/dist/HoverCard/useHoverCard.js +3 -3
- package/dist/Icon/Icon.js +11 -11
- package/dist/Icon/defaultIcons.js +116 -116
- package/dist/IconButton/IconButton.js +3 -3
- package/dist/InputGroup/InputGroup.js +9 -9
- package/dist/InputGroup/InputGroupText.js +3 -3
- package/dist/Item/Item.js +17 -17
- package/dist/Kbd/Kbd.js +5 -5
- package/dist/Layer/LayerProvider.js +7 -7
- package/dist/Layer/useLayer.js +5 -5
- package/dist/Layout/Layout.js +21 -21
- package/dist/Layout/LayoutContent.js +3 -3
- package/dist/Layout/LayoutFooter.js +5 -5
- package/dist/Layout/LayoutHeader.js +5 -5
- package/dist/Layout/LayoutPanel.js +3 -3
- package/dist/Lightbox/Lightbox.d.ts.map +1 -1
- package/dist/Lightbox/Lightbox.js +35 -33
- package/dist/Lightbox/useLightbox.d.ts +0 -1
- package/dist/Lightbox/useLightbox.d.ts.map +1 -1
- package/dist/Lightbox/useLightbox.js +3 -4
- package/dist/Link/Link.d.ts +5 -3
- package/dist/Link/Link.d.ts.map +1 -1
- package/dist/Link/Link.js +47 -18
- package/dist/Link/LinkProvider.js +3 -3
- package/dist/Link/useLinkify.js +3 -3
- package/dist/List/List.js +11 -11
- package/dist/List/ListItem.js +11 -11
- package/dist/Markdown/Markdown.d.ts.map +1 -1
- package/dist/Markdown/Markdown.js +111 -109
- package/dist/MetadataList/MetadataList.js +10 -10
- package/dist/MetadataList/MetadataListItem.js +15 -15
- package/dist/MobileNav/MobileNav.d.ts.map +1 -1
- package/dist/MobileNav/MobileNav.js +19 -17
- package/dist/MobileNav/MobileNavToggle.d.ts +1 -1
- package/dist/MobileNav/MobileNavToggle.d.ts.map +1 -1
- package/dist/MobileNav/MobileNavToggle.js +9 -6
- package/dist/MoreMenu/MoreMenu.d.ts +1 -1
- package/dist/MoreMenu/MoreMenu.d.ts.map +1 -1
- package/dist/MoreMenu/MoreMenu.js +7 -4
- package/dist/MultiSelector/MultiSelector.d.ts +1 -1
- package/dist/MultiSelector/MultiSelector.d.ts.map +1 -1
- package/dist/MultiSelector/MultiSelector.js +69 -62
- package/dist/NavIcon/NavIcon.js +3 -3
- package/dist/NavMenu/NavHeadingMenu.js +5 -5
- package/dist/NavMenu/NavHeadingMenuItem.js +8 -8
- package/dist/NumberInput/NumberInput.d.ts.map +1 -1
- package/dist/NumberInput/NumberInput.js +21 -17
- package/dist/Outline/Outline.d.ts +1 -1
- package/dist/Outline/Outline.d.ts.map +1 -1
- package/dist/Outline/Outline.js +19 -16
- package/dist/OverflowList/OverflowList.js +8 -8
- package/dist/Overlay/Overlay.js +3 -3
- package/dist/Overlay/OverlayScrim.js +5 -5
- package/dist/Overlay/useOverlay.d.ts +0 -3
- package/dist/Overlay/useOverlay.d.ts.map +1 -1
- package/dist/Overlay/useOverlay.js +3 -6
- package/dist/Pagination/Pagination.d.ts +1 -1
- package/dist/Pagination/Pagination.d.ts.map +1 -1
- package/dist/Pagination/Pagination.js +73 -46
- package/dist/Popover/Popover.js +16 -16
- package/dist/Popover/usePopover.d.ts.map +1 -1
- package/dist/Popover/usePopover.js +11 -8
- package/dist/PowerSearch/PowerSearch.d.ts +1 -1
- package/dist/PowerSearch/PowerSearch.d.ts.map +1 -1
- package/dist/PowerSearch/PowerSearch.js +95 -85
- package/dist/PowerSearch/PowerSearchEditPopover.d.ts +1 -1
- package/dist/PowerSearch/PowerSearchEditPopover.d.ts.map +1 -1
- package/dist/PowerSearch/PowerSearchEditPopover.js +109 -103
- package/dist/PowerSearch/PowerSearchFilterEditor.js +3 -3
- package/dist/PowerSearch/PowerSearchToken.d.ts.map +1 -1
- package/dist/PowerSearch/PowerSearchToken.js +12 -8
- package/dist/PowerSearch/PowerSearchValueEditor.d.ts.map +1 -1
- package/dist/PowerSearch/PowerSearchValueEditor.js +88 -75
- package/dist/PowerSearch/formatFilterValue.d.ts +2 -1
- package/dist/PowerSearch/formatFilterValue.d.ts.map +1 -1
- package/dist/PowerSearch/formatFilterValue.js +19 -9
- package/dist/PowerSearch/index.d.ts +2 -1
- package/dist/PowerSearch/index.d.ts.map +1 -1
- package/dist/PowerSearch/index.js +1 -0
- package/dist/PowerSearch/resolveOperatorLabel.d.ts +23 -0
- package/dist/PowerSearch/resolveOperatorLabel.d.ts.map +1 -0
- package/dist/PowerSearch/resolveOperatorLabel.js +28 -0
- package/dist/PowerSearch/types.d.ts +28 -2
- package/dist/PowerSearch/types.d.ts.map +1 -1
- package/dist/PowerSearch/usePowerSearchConfig.d.ts.map +1 -1
- package/dist/PowerSearch/usePowerSearchConfig.js +27 -27
- package/dist/PowerSearch/usePowerSearchSource.d.ts.map +1 -1
- package/dist/PowerSearch/usePowerSearchSource.js +15 -8
- package/dist/ProgressBar/ProgressBar.js +13 -13
- package/dist/RadioList/RadioList.js +7 -7
- package/dist/RadioList/RadioListItem.js +18 -18
- package/dist/Resizable/ResizeHandle.d.ts +1 -1
- package/dist/Resizable/ResizeHandle.d.ts.map +1 -1
- package/dist/Resizable/ResizeHandle.js +10 -7
- package/dist/Section/Section.js +5 -5
- package/dist/SegmentedControl/SegmentedControl.js +5 -5
- package/dist/SegmentedControl/SegmentedControlItem.js +7 -7
- package/dist/SelectableCard/SelectableCard.js +5 -5
- package/dist/Selector/Selector.d.ts.map +1 -1
- package/dist/Selector/Selector.js +57 -51
- package/dist/Selector/SelectorOption.js +3 -3
- package/dist/SideNav/SideNav.d.ts.map +1 -1
- package/dist/SideNav/SideNav.js +38 -36
- package/dist/SideNav/SideNavCollapseButton.d.ts.map +1 -1
- package/dist/SideNav/SideNavCollapseButton.js +8 -6
- package/dist/SideNav/SideNavHeading.d.ts.map +1 -1
- package/dist/SideNav/SideNavHeading.js +92 -90
- package/dist/SideNav/SideNavItem.d.ts.map +1 -1
- package/dist/SideNav/SideNavItem.js +49 -43
- package/dist/SideNav/SideNavSection.js +14 -14
- package/dist/Skeleton/Skeleton.js +3 -3
- package/dist/Slider/Slider.js +23 -23
- package/dist/Spinner/Spinner.js +9 -9
- package/dist/StatusDot/StatusDot.js +5 -5
- package/dist/Switch/Switch.d.ts.map +1 -1
- package/dist/Switch/Switch.js +29 -27
- package/dist/TabList/Tab.js +18 -18
- package/dist/TabList/TabList.d.ts +1 -1
- package/dist/TabList/TabList.d.ts.map +1 -1
- package/dist/TabList/TabList.js +9 -6
- package/dist/TabList/TabMenu.js +23 -23
- package/dist/Table/BaseTable.d.ts.map +1 -1
- package/dist/Table/BaseTable.js +39 -37
- package/dist/Table/Table.d.ts.map +1 -1
- package/dist/Table/Table.js +10 -8
- package/dist/Table/TableBody.js +3 -3
- package/dist/Table/TableCell.js +3 -3
- package/dist/Table/TableFooter.js +3 -3
- package/dist/Table/TableHeader.js +3 -3
- package/dist/Table/TableHeaderCell.js +3 -3
- package/dist/Table/TableRow.js +5 -5
- package/dist/Table/index.d.ts +4 -0
- package/dist/Table/index.d.ts.map +1 -1
- package/dist/Table/index.js +2 -0
- package/dist/Table/plugins/columnResize/useTableColumnResize.js +9 -9
- package/dist/Table/plugins/filtering/useTableFiltering.d.ts.map +1 -1
- package/dist/Table/plugins/filtering/useTableFiltering.js +127 -90
- package/dist/Table/plugins/groupedRows/index.d.ts +3 -0
- package/dist/Table/plugins/groupedRows/index.d.ts.map +1 -0
- package/dist/Table/plugins/groupedRows/index.js +3 -0
- package/dist/Table/plugins/groupedRows/useTableGroupedRows.d.ts +78 -0
- package/dist/Table/plugins/groupedRows/useTableGroupedRows.d.ts.map +1 -0
- package/dist/Table/plugins/groupedRows/useTableGroupedRows.js +257 -0
- package/dist/Table/plugins/pagination/useTablePagination.d.ts.map +1 -1
- package/dist/Table/plugins/pagination/useTablePagination.js +12 -9
- package/dist/Table/plugins/rowExpansion/useTableRowExpansion.d.ts +1 -1
- package/dist/Table/plugins/rowExpansion/useTableRowExpansion.d.ts.map +1 -1
- package/dist/Table/plugins/rowExpansion/useTableRowExpansion.js +30 -28
- package/dist/Table/plugins/rowIndex/index.d.ts +3 -0
- package/dist/Table/plugins/rowIndex/index.d.ts.map +1 -0
- package/dist/Table/plugins/rowIndex/index.js +3 -0
- package/dist/Table/plugins/rowIndex/useTableRowIndex.d.ts +50 -0
- package/dist/Table/plugins/rowIndex/useTableRowIndex.d.ts.map +1 -0
- package/dist/Table/plugins/rowIndex/useTableRowIndex.js +91 -0
- package/dist/Table/plugins/selection/useTableSelection.d.ts.map +1 -1
- package/dist/Table/plugins/selection/useTableSelection.js +23 -20
- package/dist/Table/plugins/sortable/useTableSortable.d.ts.map +1 -1
- package/dist/Table/plugins/sortable/useTableSortable.js +23 -21
- package/dist/Table/tableContextMenu.js +9 -9
- package/dist/Text/Text.js +10 -10
- package/dist/TextArea/TextArea.js +14 -14
- package/dist/TextInput/TextInput.d.ts.map +1 -1
- package/dist/TextInput/TextInput.js +20 -16
- package/dist/Thumbnail/Thumbnail.d.ts.map +1 -1
- package/dist/Thumbnail/Thumbnail.js +37 -31
- package/dist/TimeInput/TimeInput.d.ts +1 -1
- package/dist/TimeInput/TimeInput.d.ts.map +1 -1
- package/dist/TimeInput/TimeInput.js +28 -23
- package/dist/Timestamp/Timestamp.d.ts.map +1 -1
- package/dist/Timestamp/Timestamp.js +29 -14
- package/dist/Toast/Toast.d.ts.map +1 -1
- package/dist/Toast/Toast.js +17 -15
- package/dist/Toast/ToastViewport.d.ts.map +1 -1
- package/dist/Toast/ToastViewport.js +14 -12
- package/dist/Toast/useToast.js +4 -4
- package/dist/ToggleButton/ToggleButton.js +12 -12
- package/dist/ToggleButton/ToggleButtonGroup.js +5 -5
- package/dist/Token/Token.d.ts.map +1 -1
- package/dist/Token/Token.js +29 -23
- package/dist/Tokenizer/Tokenizer.d.ts.map +1 -1
- package/dist/Tokenizer/Tokenizer.js +33 -31
- package/dist/Toolbar/Toolbar.js +18 -18
- package/dist/Tooltip/Tooltip.js +11 -11
- package/dist/Tooltip/useTooltip.js +3 -3
- package/dist/TopNav/TopNav.d.ts +2 -1
- package/dist/TopNav/TopNav.d.ts.map +1 -1
- package/dist/TopNav/TopNav.js +36 -33
- package/dist/TopNav/TopNavHeading.d.ts.map +1 -1
- package/dist/TopNav/TopNavHeading.js +72 -70
- package/dist/TopNav/TopNavItem.js +5 -5
- package/dist/TopNav/TopNavMegaMenu.js +30 -30
- package/dist/TopNav/TopNavMegaMenuFeaturedCard.js +10 -10
- package/dist/TopNav/TopNavMegaMenuItem.js +16 -16
- package/dist/TopNav/TopNavMenu.js +32 -32
- package/dist/TreeList/TreeList.d.ts.map +1 -1
- package/dist/TreeList/TreeList.js +13 -9
- package/dist/TreeList/TreeListBranches.js +11 -11
- package/dist/TreeList/TreeListItem.d.ts.map +1 -1
- package/dist/TreeList/TreeListItem.js +37 -31
- package/dist/Typeahead/BaseTypeahead.d.ts.map +1 -1
- package/dist/Typeahead/BaseTypeahead.js +26 -22
- package/dist/Typeahead/Typeahead.d.ts.map +1 -1
- package/dist/Typeahead/Typeahead.js +15 -13
- package/dist/Typeahead/TypeaheadItem.js +10 -10
- package/dist/VStack/VStack.js +3 -3
- package/dist/VisuallyHidden/VisuallyHidden.d.ts +1 -3
- package/dist/VisuallyHidden/VisuallyHidden.d.ts.map +1 -1
- package/dist/VisuallyHidden/VisuallyHidden.js +1 -3
- package/dist/astryx.css +20 -2
- package/dist/astryx.umd.js +66 -64
- package/dist/astryx.umd.js.map +4 -4
- package/dist/authoring/doc.d.ts +145 -0
- package/dist/authoring/doc.d.ts.map +1 -0
- package/dist/authoring/doc.js +100 -0
- package/dist/authoring/index.d.ts +29 -0
- package/dist/authoring/index.d.ts.map +1 -0
- package/dist/authoring/index.js +28 -0
- package/dist/authoring/integration.d.ts +35 -0
- package/dist/authoring/integration.d.ts.map +1 -0
- package/dist/authoring/integration.js +30 -0
- package/dist/authoring/template.d.ts +66 -0
- package/dist/authoring/template.d.ts.map +1 -0
- package/dist/authoring/template.js +55 -0
- package/dist/config.d.ts +80 -0
- package/dist/config.d.ts.map +1 -0
- package/dist/config.js +40 -0
- package/dist/hooks/useKeyboardHint.js +9 -9
- package/dist/i18n/InternationalizationContext.d.ts +12 -0
- package/dist/i18n/InternationalizationContext.d.ts.map +1 -0
- package/dist/i18n/InternationalizationContext.js +29 -0
- package/dist/i18n/InternationalizationProvider.d.ts +62 -0
- package/dist/i18n/InternationalizationProvider.d.ts.map +1 -0
- package/dist/i18n/InternationalizationProvider.js +44 -0
- package/dist/i18n/index.d.ts +24 -0
- package/dist/i18n/index.d.ts.map +1 -0
- package/dist/i18n/index.js +21 -0
- package/dist/i18n/resolve.d.ts +22 -0
- package/dist/i18n/resolve.d.ts.map +1 -0
- package/dist/i18n/resolve.js +141 -0
- package/dist/i18n/translator.d.ts +25 -0
- package/dist/i18n/translator.d.ts.map +1 -0
- package/dist/i18n/translator.js +1 -0
- package/dist/i18n/types.d.ts +47 -0
- package/dist/i18n/types.d.ts.map +1 -0
- package/dist/i18n/types.js +1 -0
- package/dist/i18n/useTranslator.d.ts +15 -0
- package/dist/i18n/useTranslator.d.ts.map +1 -0
- package/dist/i18n/useTranslator.js +39 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -0
- package/dist/theme/MediaTheme.js +3 -3
- package/dist/theme/Theme.js +7 -7
- package/dist/theme/syntax/SyntaxTheme.js +5 -5
- package/locales/en.json +746 -0
- package/locales/pseudo.json +560 -0
- package/package.json +24 -3
- package/src/AlertDialog/AlertDialog.doc.mjs +5 -0
- package/src/AlertDialog/AlertDialog.tsx +4 -1
- package/src/AlertDialog/useImperativeAlertDialog.tsx +0 -2
- package/src/AppShell/AppShell.doc.mjs +8 -2
- package/src/AppShell/AppShell.tsx +3 -1
- package/src/AvatarGroup/AvatarGroup.tsx +4 -1
- package/src/Banner/Banner.tsx +10 -5
- package/src/Breadcrumbs/Breadcrumbs.tsx +4 -1
- package/src/Button/Button.tsx +34 -4
- package/src/ButtonGroup/ButtonGroup.test.tsx +386 -2
- package/src/ButtonGroup/ButtonGroup.tsx +27 -11
- package/src/Calendar/Calendar.tsx +8 -5
- package/src/Card/Card.doc.mjs +3 -3
- package/src/Carousel/Carousel.tsx +10 -7
- package/src/Chat/ChatComposer.tsx +5 -1
- package/src/Chat/ChatComposerDrawer.tsx +9 -2
- package/src/Chat/ChatComposerInput.tsx +10 -4
- package/src/Chat/ChatLayout.tsx +5 -12
- package/src/Chat/ChatLayoutScrollButton.tsx +4 -2
- package/src/Chat/ChatMessage.tsx +5 -1
- package/src/Chat/ChatMessageBubble.tsx +2 -0
- package/src/Chat/ChatMessageList.doc.mjs +1 -1
- package/src/Chat/ChatMessageList.tsx +2 -0
- package/src/Chat/ChatMessageMetadata.tsx +15 -9
- package/src/Chat/ChatPastedTextToken.tsx +3 -1
- package/src/Chat/ChatSendButton.tsx +3 -1
- package/src/Chat/ChatToolCalls.doc.mjs +1 -1
- package/src/Chat/useSpeechRecognition.ts +11 -2
- package/src/Chat/useTriggerMenu.tsx +4 -2
- package/src/CheckboxInput/CheckboxInput.test.tsx +16 -0
- package/src/CheckboxInput/CheckboxInput.tsx +4 -2
- package/src/CheckboxList/CheckboxList.doc.mjs +6 -1
- package/src/CheckboxList/CheckboxList.tsx +2 -0
- package/src/CheckboxList/CheckboxListItem.tsx +7 -1
- package/src/Citation/Citation.tsx +4 -2
- package/src/ClickableCard/ClickableCard.doc.mjs +1 -1
- package/src/CodeBlock/CodeBlock.tsx +91 -40
- package/src/Collapsible/Collapsible.doc.mjs +3 -3
- package/src/CommandPalette/CommandPalette.tsx +10 -3
- package/src/CommandPalette/CommandPaletteInput.test.tsx +1 -1
- package/src/CommandPalette/CommandPaletteInput.tsx +5 -1
- package/src/CommandPalette/CommandPaletteList.tsx +4 -1
- package/src/ContextMenu/ContextMenu.tsx +4 -1
- package/src/DateInput/DateInput.doc.mjs +2 -2
- package/src/DateInput/DateInput.tsx +13 -5
- package/src/DateRangeInput/DateRangeInput.doc.mjs +7 -7
- package/src/DateRangeInput/DateRangeInput.tsx +14 -6
- package/src/DateTimeInput/DateTimeInput.doc.mjs +2 -2
- package/src/DateTimeInput/DateTimeInput.tsx +17 -7
- package/src/Dialog/DialogHeader.tsx +4 -2
- package/src/DropdownMenu/DropdownMenu.tsx +12 -8
- package/src/EmptyState/EmptyState.doc.mjs +3 -3
- package/src/EmptyState/EmptyState.tsx +4 -1
- package/src/Field/Field.doc.mjs +2 -2
- package/src/FileInput/FileInput.tsx +3 -1
- package/src/Grid/Grid.doc.mjs +5 -5
- package/src/InputGroup/InputGroup.doc.mjs +1 -1
- package/src/Layer/useLayer.doc.mjs +2 -2
- package/src/Lightbox/Lightbox.doc.mjs +7 -2
- package/src/Lightbox/Lightbox.tsx +6 -4
- package/src/Lightbox/useLightbox.tsx +0 -1
- package/src/Link/Link.test.tsx +74 -2
- package/src/Link/Link.tsx +48 -3
- package/src/Markdown/Markdown.tsx +12 -4
- package/src/MobileNav/MobileNav.tsx +4 -2
- package/src/MobileNav/MobileNavToggle.tsx +5 -3
- package/src/MoreMenu/MoreMenu.tsx +4 -1
- package/src/MultiSelector/MultiSelector.tsx +14 -5
- package/src/NumberInput/NumberInput.tsx +3 -1
- package/src/Outline/Outline.tsx +4 -1
- package/src/OverflowList/OverflowList.doc.mjs +2 -2
- package/src/Overlay/useOverlay.tsx +0 -3
- package/src/Pagination/Pagination.tsx +35 -12
- package/src/Popover/usePopover.tsx +6 -1
- package/src/PowerSearch/PowerSearch.doc.mjs +9 -4
- package/src/PowerSearch/PowerSearch.tsx +22 -10
- package/src/PowerSearch/PowerSearchEditPopover.tsx +27 -20
- package/src/PowerSearch/PowerSearchToken.tsx +17 -6
- package/src/PowerSearch/PowerSearchValueEditor.tsx +34 -21
- package/src/PowerSearch/formatFilterValue.test.ts +282 -0
- package/src/PowerSearch/formatFilterValue.ts +21 -8
- package/src/PowerSearch/index.ts +5 -0
- package/src/PowerSearch/resolveOperatorLabel.ts +34 -0
- package/src/PowerSearch/types.ts +33 -9
- package/src/PowerSearch/usePowerSearchConfig.ts +59 -27
- package/src/PowerSearch/usePowerSearchSource.ts +17 -8
- package/src/RadioList/RadioList.doc.mjs +1 -1
- package/src/Resizable/ResizeHandle.tsx +4 -1
- package/src/Section/Section.doc.mjs +4 -4
- package/src/SelectableCard/SelectableCard.doc.mjs +1 -1
- package/src/Selector/Selector.tsx +11 -6
- package/src/SideNav/SideNav.tsx +4 -2
- package/src/SideNav/SideNavCollapseButton.tsx +3 -1
- package/src/SideNav/SideNavHeading.tsx +5 -3
- package/src/SideNav/SideNavItem.tsx +3 -1
- package/src/Slider/Slider.doc.mjs +2 -2
- package/src/Stack/Stack.doc.mjs +10 -10
- package/src/Switch/Switch.doc.mjs +2 -2
- package/src/Switch/Switch.test.tsx +16 -0
- package/src/Switch/Switch.tsx +4 -2
- package/src/TabList/TabList.tsx +4 -1
- package/src/Table/BaseTable.tsx +8 -1
- package/src/Table/Table.doc.mjs +1 -1
- package/src/Table/Table.tsx +3 -1
- package/src/Table/index.ts +7 -0
- package/src/Table/plugins/filtering/useTableFiltering.tsx +31 -30
- package/src/Table/plugins/groupedRows/index.ts +7 -0
- package/src/Table/plugins/groupedRows/useTableGroupedRows.test.tsx +231 -0
- package/src/Table/plugins/groupedRows/useTableGroupedRows.tsx +351 -0
- package/src/Table/plugins/pagination/useTablePagination.tsx +4 -1
- package/src/Table/plugins/rowExpansion/useTableRowExpansion.tsx +8 -4
- package/src/Table/plugins/rowIndex/index.ts +4 -0
- package/src/Table/plugins/rowIndex/useTableRowIndex.test.tsx +132 -0
- package/src/Table/plugins/rowIndex/useTableRowIndex.tsx +114 -0
- package/src/Table/plugins/selection/useTableSelection.tsx +6 -7
- package/src/Table/plugins/sortable/useTableSortable.tsx +8 -5
- package/src/Table/useTableFiltering.doc.mjs +2 -2
- package/src/Table/useTableGroupedRows.doc.mjs +71 -0
- package/src/Table/useTableRowIndex.doc.mjs +50 -0
- package/src/Table/useTableSortable.doc.mjs +11 -11
- package/src/Text/Text.doc.mjs +2 -2
- package/src/TextInput/TextInput.tsx +3 -1
- package/src/Thumbnail/Thumbnail.tsx +4 -2
- package/src/TimeInput/TimeInput.doc.mjs +2 -2
- package/src/TimeInput/TimeInput.tsx +6 -2
- package/src/Timestamp/Timestamp.doc.mjs +4 -4
- package/src/Timestamp/Timestamp.test.tsx +120 -7
- package/src/Timestamp/Timestamp.tsx +21 -1
- package/src/Toast/Toast.tsx +3 -1
- package/src/Toast/ToastViewport.tsx +3 -1
- package/src/Token/Token.tsx +4 -2
- package/src/Tokenizer/Tokenizer.doc.mjs +2 -2
- package/src/Tokenizer/Tokenizer.tsx +4 -4
- package/src/Toolbar/Toolbar.doc.mjs +1 -1
- package/src/TopNav/TopNav.doc.mjs +1 -0
- package/src/TopNav/TopNav.test.tsx +30 -0
- package/src/TopNav/TopNav.tsx +6 -4
- package/src/TopNav/TopNavHeading.tsx +5 -3
- package/src/TreeList/TreeList.tsx +5 -1
- package/src/TreeList/TreeListItem.tsx +6 -1
- package/src/Typeahead/BaseTypeahead.tsx +11 -4
- package/src/Typeahead/Typeahead.doc.mjs +1 -1
- package/src/Typeahead/Typeahead.tsx +3 -1
- package/src/VisuallyHidden/VisuallyHidden.tsx +1 -3
- package/src/authoring/doc.ts +166 -0
- package/src/authoring/index.test.ts +52 -0
- package/src/authoring/index.ts +50 -0
- package/src/authoring/integration.ts +42 -0
- package/src/authoring/template.ts +74 -0
- package/src/config.test.ts +16 -0
- package/src/config.ts +92 -0
- package/src/docPropLiterals.test.ts +902 -0
- package/src/hooks/useHotkeys.doc.mjs +5 -5
- package/src/i18n/InternationalizationContext.ts +39 -0
- package/src/i18n/InternationalizationProvider.doc.mjs +72 -0
- package/src/i18n/InternationalizationProvider.tsx +83 -0
- package/src/i18n/__tests__/e2e-pagination.test.tsx +172 -0
- package/src/i18n/__tests__/e2e-powersearch.test.tsx +130 -0
- package/src/i18n/__tests__/resolve.test.ts +284 -0
- package/src/i18n/index.ts +32 -0
- package/src/i18n/resolve.ts +165 -0
- package/src/i18n/translator.ts +31 -0
- package/src/i18n/types.ts +53 -0
- package/src/i18n/useTranslator.doc.mjs +46 -0
- package/src/i18n/useTranslator.ts +50 -0
- package/src/index.ts +3 -0
- package/dist/NavItem/index.d.ts +0 -9
- package/dist/NavItem/index.d.ts.map +0 -1
- package/dist/NavItem/index.js +0 -10
- package/src/NavItem/index.ts +0 -11
|
@@ -23,7 +23,7 @@ export const docs = {
|
|
|
23
23
|
},
|
|
24
24
|
{
|
|
25
25
|
name: 'onChange',
|
|
26
|
-
type:
|
|
26
|
+
type: "(filters: ReadonlyArray<PowerSearchFilter>, changeType: 'add' | 'edit' | 'remove', index: number) => void",
|
|
27
27
|
description:
|
|
28
28
|
"Called when filters change. changeType is 'add', 'edit', or 'remove'. index is the affected filter's position.",
|
|
29
29
|
required: true,
|
|
@@ -79,7 +79,7 @@ export const docs = {
|
|
|
79
79
|
},
|
|
80
80
|
{
|
|
81
81
|
name: 'status',
|
|
82
|
-
type: '
|
|
82
|
+
type: "{type: 'warning' | 'error' | 'success', message?: string}",
|
|
83
83
|
description:
|
|
84
84
|
'Validation status object with type and optional message.',
|
|
85
85
|
},
|
|
@@ -145,6 +145,11 @@ export const docs = {
|
|
|
145
145
|
{ guidance: false, description: 'Wrap a disabled PowerSearch in Tooltip to explain why it is disabled; disabled controls swallow the hover events the wrapper needs. Use the disabledMessage prop instead.' },
|
|
146
146
|
],
|
|
147
147
|
},
|
|
148
|
+
theming: {
|
|
149
|
+
targets: [
|
|
150
|
+
{className: 'astryx-power-search'},
|
|
151
|
+
],
|
|
152
|
+
},
|
|
148
153
|
};
|
|
149
154
|
|
|
150
155
|
// -------------------------------------------------------
|
|
@@ -172,7 +177,7 @@ export const docsZh = {
|
|
|
172
177
|
},
|
|
173
178
|
{
|
|
174
179
|
name: 'onChange',
|
|
175
|
-
type:
|
|
180
|
+
type: "(filters: ReadonlyArray<PowerSearchFilter>, changeType: 'add' | 'edit' | 'remove', index: number) => void",
|
|
176
181
|
description:
|
|
177
182
|
"当过滤器变更时调用。changeType 为 'add'、'edit' 或 'remove'。index 为受影响的过滤器位置。",
|
|
178
183
|
required: true,
|
|
@@ -227,7 +232,7 @@ export const docsZh = {
|
|
|
227
232
|
},
|
|
228
233
|
{
|
|
229
234
|
name: 'status',
|
|
230
|
-
type: '
|
|
235
|
+
type: "{type: 'warning' | 'error' | 'success', message?: string}",
|
|
231
236
|
description: '带有类型和可选消息的验证状态对象。',
|
|
232
237
|
},
|
|
233
238
|
{
|
|
@@ -52,7 +52,9 @@ import {useInternalConfig} from './useInternalConfig';
|
|
|
52
52
|
import {usePowerSearchSource} from './usePowerSearchSource';
|
|
53
53
|
import {formatFilterValue} from './formatFilterValue';
|
|
54
54
|
import {PowerSearchEditPopover} from './PowerSearchEditPopover';
|
|
55
|
+
import {resolveOperatorLabel} from './resolveOperatorLabel';
|
|
55
56
|
import {themeProps} from '../utils/themeProps';
|
|
57
|
+
import {useTranslator} from '../i18n';
|
|
56
58
|
import type {
|
|
57
59
|
PowerSearchConfig,
|
|
58
60
|
PowerSearchFilter,
|
|
@@ -513,9 +515,9 @@ export function PowerSearch({
|
|
|
513
515
|
config: configProp,
|
|
514
516
|
filters,
|
|
515
517
|
onChange,
|
|
516
|
-
label
|
|
518
|
+
label: labelFromProps,
|
|
517
519
|
isLabelHidden = true,
|
|
518
|
-
placeholder
|
|
520
|
+
placeholder: placeholderFromProps,
|
|
519
521
|
hasAutoFocus = false,
|
|
520
522
|
hasClear = true,
|
|
521
523
|
isReadOnly = false,
|
|
@@ -526,7 +528,7 @@ export function PowerSearch({
|
|
|
526
528
|
onBlur,
|
|
527
529
|
status,
|
|
528
530
|
maxTokenLength = 40,
|
|
529
|
-
popoverSaveButtonLabel
|
|
531
|
+
popoverSaveButtonLabel: popoverSaveButtonLabelFromProps,
|
|
530
532
|
timezoneID,
|
|
531
533
|
tokenOverflowBehavior,
|
|
532
534
|
endContent,
|
|
@@ -543,6 +545,12 @@ export function PowerSearch({
|
|
|
543
545
|
const size = useSize(sizeProp, 'md');
|
|
544
546
|
const config = useInternalConfig(configProp);
|
|
545
547
|
const searchSource = usePowerSearchSource(config);
|
|
548
|
+
const t = useTranslator();
|
|
549
|
+
const label = labelFromProps ?? t('@astryx.powersearch.label');
|
|
550
|
+
const placeholder =
|
|
551
|
+
placeholderFromProps ?? t('@astryx.powersearch.placeholder');
|
|
552
|
+
const popoverSaveButtonLabel =
|
|
553
|
+
popoverSaveButtonLabelFromProps ?? t('@astryx.powersearch.editor.apply');
|
|
546
554
|
const tokenizerRef = useRef<TokenizerHandle>(null);
|
|
547
555
|
|
|
548
556
|
const [popoverState, setPopoverStateRaw] = useState<PopoverState>({
|
|
@@ -598,13 +606,15 @@ export function PowerSearch({
|
|
|
598
606
|
return filters.map((filter, index) => {
|
|
599
607
|
const field = config.getField(filter.field);
|
|
600
608
|
const operator = config.getOperator(filter.field, filter.operator);
|
|
601
|
-
const
|
|
609
|
+
const resolvedOp = operator ? resolveOperatorLabel(operator, t) : '';
|
|
610
|
+
const operatorLabel = resolvedOp ? `: ${resolvedOp}` : '';
|
|
602
611
|
const valueStr = operator
|
|
603
612
|
? formatFilterValue(
|
|
604
613
|
config,
|
|
605
614
|
operator.value,
|
|
606
615
|
filter.value,
|
|
607
616
|
maxTokenLength,
|
|
617
|
+
t,
|
|
608
618
|
timezoneID,
|
|
609
619
|
)
|
|
610
620
|
: '';
|
|
@@ -624,7 +634,7 @@ export function PowerSearch({
|
|
|
624
634
|
},
|
|
625
635
|
};
|
|
626
636
|
});
|
|
627
|
-
}, [filters, config, maxTokenLength, timezoneID]);
|
|
637
|
+
}, [filters, config, maxTokenLength, timezoneID, t]);
|
|
628
638
|
|
|
629
639
|
// Handle tokenizer onChange (field selected from typeahead)
|
|
630
640
|
const handleTokenizerChange = useCallback(
|
|
@@ -787,7 +797,7 @@ export function PowerSearch({
|
|
|
787
797
|
|
|
788
798
|
// Default token rendering
|
|
789
799
|
const fieldLabel = field?.label ?? '';
|
|
790
|
-
const operatorLabel = operator
|
|
800
|
+
const operatorLabel = operator ? resolveOperatorLabel(operator, t) : '';
|
|
791
801
|
const tokenLabel = `${fieldLabel}: ${operatorLabel}`.trim();
|
|
792
802
|
const adjustedMaxLength = Math.max(
|
|
793
803
|
maxTokenLength - fieldLabel.length - operatorLabel.length,
|
|
@@ -843,6 +853,7 @@ export function PowerSearch({
|
|
|
843
853
|
isDisabled,
|
|
844
854
|
handleTokenClick,
|
|
845
855
|
componentOverrides,
|
|
856
|
+
t,
|
|
846
857
|
],
|
|
847
858
|
);
|
|
848
859
|
|
|
@@ -948,17 +959,18 @@ export function PowerSearch({
|
|
|
948
959
|
]);
|
|
949
960
|
|
|
950
961
|
// Plain-text form of the result count, shared by the visible label and the
|
|
951
|
-
// screen-reader announcement so the two never drift.
|
|
962
|
+
// screen-reader announcement so the two never drift. The ICU plural handles
|
|
963
|
+
// the number formatting + `result` vs `results` in one message so translators
|
|
964
|
+
// can match the locale's plural rules.
|
|
952
965
|
const resultCountText = useMemo((): string | null => {
|
|
953
966
|
if (resultCount == null) {
|
|
954
967
|
return null;
|
|
955
968
|
}
|
|
956
969
|
if (typeof resultCount === 'number') {
|
|
957
|
-
|
|
958
|
-
return `${formatted} ${resultCount === 1 ? 'result' : 'results'}`;
|
|
970
|
+
return t('@astryx.powersearch.resultCount', {count: resultCount});
|
|
959
971
|
}
|
|
960
972
|
return resultCount;
|
|
961
|
-
}, [resultCount]);
|
|
973
|
+
}, [resultCount, t]);
|
|
962
974
|
|
|
963
975
|
// Announce result-count changes to screen readers through a polite live
|
|
964
976
|
// region, mirroring the way Typeahead announces its dropdown result count.
|
|
@@ -19,8 +19,10 @@ import {Selector} from '../Selector';
|
|
|
19
19
|
import {HStack, VStack} from '../Stack';
|
|
20
20
|
import {Icon} from '../Icon';
|
|
21
21
|
import {TreeList, type TreeListItemData} from '../TreeList';
|
|
22
|
+
import {useTranslator} from '../i18n';
|
|
22
23
|
import {spacingVars, typeScaleVars} from '../theme/tokens.stylex';
|
|
23
24
|
import {PowerSearchValueEditor} from './PowerSearchValueEditor';
|
|
25
|
+
import {resolveOperatorLabel} from './resolveOperatorLabel';
|
|
24
26
|
import type {InternalConfig} from './useInternalConfig';
|
|
25
27
|
import type {
|
|
26
28
|
PowerSearchFilter,
|
|
@@ -238,6 +240,7 @@ function NestedSubFilterRow({
|
|
|
238
240
|
onChange,
|
|
239
241
|
isReadOnly,
|
|
240
242
|
}: NestedSubFilterRowProps) {
|
|
243
|
+
const t = useTranslator();
|
|
241
244
|
const fieldOptions = useMemo(
|
|
242
245
|
() =>
|
|
243
246
|
config.getVisibleFields().map(field => ({
|
|
@@ -251,9 +254,9 @@ function NestedSubFilterRow({
|
|
|
251
254
|
const operators = config.getVisibleOperators(subFilter.field);
|
|
252
255
|
return operators.map(op => ({
|
|
253
256
|
value: op.key,
|
|
254
|
-
label: op
|
|
257
|
+
label: resolveOperatorLabel(op, t),
|
|
255
258
|
}));
|
|
256
|
-
}, [config, subFilter.field]);
|
|
259
|
+
}, [config, subFilter.field, t]);
|
|
257
260
|
|
|
258
261
|
const currentOperator = subFilter.operator
|
|
259
262
|
? config.getOperator(subFilter.field, subFilter.operator)
|
|
@@ -308,7 +311,7 @@ function NestedSubFilterRow({
|
|
|
308
311
|
<HStack gap={2} vAlign="center">
|
|
309
312
|
<div {...stylex.props(styles.nestedFieldSelector)}>
|
|
310
313
|
<Selector
|
|
311
|
-
label=
|
|
314
|
+
label={t('@astryx.powersearch.editor.field')}
|
|
312
315
|
isLabelHidden
|
|
313
316
|
options={fieldOptions}
|
|
314
317
|
value={subFilter.field}
|
|
@@ -320,7 +323,7 @@ function NestedSubFilterRow({
|
|
|
320
323
|
{operatorOptions.length > 0 && (
|
|
321
324
|
<div {...stylex.props(styles.nestedOperatorSelector)}>
|
|
322
325
|
<Selector
|
|
323
|
-
label=
|
|
326
|
+
label={t('@astryx.powersearch.editor.operator')}
|
|
324
327
|
isLabelHidden
|
|
325
328
|
options={operatorOptions}
|
|
326
329
|
value={subFilter.operator}
|
|
@@ -366,6 +369,7 @@ function NestedEditor({
|
|
|
366
369
|
onPartialFilterChange,
|
|
367
370
|
isReadOnly,
|
|
368
371
|
}: NestedEditorProps) {
|
|
372
|
+
const t = useTranslator();
|
|
369
373
|
const [subFilters, setSubFilters] = useState<EditablePartialFilter[]>(() => {
|
|
370
374
|
if (partialFilter.value && partialFilter.value.type === 'nested') {
|
|
371
375
|
return partialFilter.value.value.map(f => initEditableFilter(config, f));
|
|
@@ -468,7 +472,7 @@ function NestedEditor({
|
|
|
468
472
|
id: `${itemPath.join('-')}-add`,
|
|
469
473
|
label: (
|
|
470
474
|
<Button
|
|
471
|
-
label=
|
|
475
|
+
label={t('@astryx.powersearch.editor.addFilter')}
|
|
472
476
|
onClick={() => handleAdd(itemPath)}
|
|
473
477
|
variant="ghost"
|
|
474
478
|
size="sm"
|
|
@@ -491,7 +495,7 @@ function NestedEditor({
|
|
|
491
495
|
children,
|
|
492
496
|
endContent: !isReadOnly ? (
|
|
493
497
|
<Button
|
|
494
|
-
label=
|
|
498
|
+
label={t('@astryx.powersearch.editor.removeFilter')}
|
|
495
499
|
icon={<Icon icon="close" size="sm" />}
|
|
496
500
|
variant="ghost"
|
|
497
501
|
size="sm"
|
|
@@ -515,7 +519,7 @@ function NestedEditor({
|
|
|
515
519
|
),
|
|
516
520
|
endContent: !isReadOnly ? (
|
|
517
521
|
<Button
|
|
518
|
-
label=
|
|
522
|
+
label={t('@astryx.powersearch.editor.removeFilter')}
|
|
519
523
|
icon={<Icon icon="close" size="sm" />}
|
|
520
524
|
variant="ghost"
|
|
521
525
|
size="sm"
|
|
@@ -536,7 +540,7 @@ function NestedEditor({
|
|
|
536
540
|
id: 'add-filter',
|
|
537
541
|
label: (
|
|
538
542
|
<Button
|
|
539
|
-
label=
|
|
543
|
+
label={t('@astryx.powersearch.editor.addFilter')}
|
|
540
544
|
onClick={() => handleAdd([])}
|
|
541
545
|
variant="ghost"
|
|
542
546
|
size="sm"
|
|
@@ -550,7 +554,7 @@ function NestedEditor({
|
|
|
550
554
|
{operatorOptions.length > 1 ? (
|
|
551
555
|
<div {...stylex.props(styles.operatorSelector)}>
|
|
552
556
|
<Selector
|
|
553
|
-
label=
|
|
557
|
+
label={t('@astryx.powersearch.editor.groupOperator')}
|
|
554
558
|
isLabelHidden
|
|
555
559
|
options={operatorOptions}
|
|
556
560
|
value={partialFilter.operator}
|
|
@@ -560,7 +564,7 @@ function NestedEditor({
|
|
|
560
564
|
/>
|
|
561
565
|
</div>
|
|
562
566
|
) : (
|
|
563
|
-
(operatorOptions[0]?.label ?? '
|
|
567
|
+
(operatorOptions[0]?.label ?? t('@astryx.powersearch.editor.group'))
|
|
564
568
|
)}
|
|
565
569
|
</div>
|
|
566
570
|
);
|
|
@@ -587,9 +591,12 @@ export function PowerSearchEditPopover({
|
|
|
587
591
|
mode,
|
|
588
592
|
onSave,
|
|
589
593
|
onCancel,
|
|
590
|
-
saveButtonLabel
|
|
594
|
+
saveButtonLabel: saveButtonLabelFromProps,
|
|
591
595
|
isReadOnly = false,
|
|
592
596
|
}: PowerSearchEditPopoverProps) {
|
|
597
|
+
const t = useTranslator();
|
|
598
|
+
const saveButtonLabel =
|
|
599
|
+
saveButtonLabelFromProps ?? t('@astryx.powersearch.editor.apply');
|
|
593
600
|
const [partialFilter, setPartialFilter] =
|
|
594
601
|
useState<PartialFilter>(initialFilter);
|
|
595
602
|
const valueEditorRef = useRef<HTMLDivElement>(null);
|
|
@@ -628,9 +635,9 @@ export function PowerSearchEditPopover({
|
|
|
628
635
|
const operators = config.getVisibleOperators(partialFilter.field);
|
|
629
636
|
return operators.map(op => ({
|
|
630
637
|
value: op.key,
|
|
631
|
-
label: op
|
|
638
|
+
label: resolveOperatorLabel(op, t),
|
|
632
639
|
}));
|
|
633
|
-
}, [config, partialFilter.field]);
|
|
640
|
+
}, [config, partialFilter.field, t]);
|
|
634
641
|
|
|
635
642
|
const handleFieldChange = useCallback(
|
|
636
643
|
(fieldKey: string) => {
|
|
@@ -732,7 +739,7 @@ export function PowerSearchEditPopover({
|
|
|
732
739
|
<HStack gap={2}>
|
|
733
740
|
<div {...stylex.props(styles.fieldSelector)}>
|
|
734
741
|
<Selector
|
|
735
|
-
label=
|
|
742
|
+
label={t('@astryx.powersearch.editor.field')}
|
|
736
743
|
isLabelHidden
|
|
737
744
|
options={fieldOptions}
|
|
738
745
|
value={partialFilter.field}
|
|
@@ -756,7 +763,7 @@ export function PowerSearchEditPopover({
|
|
|
756
763
|
<HStack gap={2} hAlign="between">
|
|
757
764
|
{!isReadOnly && mode === 'edit' ? (
|
|
758
765
|
<Button
|
|
759
|
-
label=
|
|
766
|
+
label={t('@astryx.powersearch.editor.delete')}
|
|
760
767
|
onClick={handleDelete}
|
|
761
768
|
variant="ghost"
|
|
762
769
|
size="sm"
|
|
@@ -766,7 +773,7 @@ export function PowerSearchEditPopover({
|
|
|
766
773
|
)}
|
|
767
774
|
<HStack gap={2}>
|
|
768
775
|
<Button
|
|
769
|
-
label=
|
|
776
|
+
label={t('@astryx.powersearch.editor.cancel')}
|
|
770
777
|
onClick={onCancel}
|
|
771
778
|
variant="ghost"
|
|
772
779
|
size="sm"
|
|
@@ -791,7 +798,7 @@ export function PowerSearchEditPopover({
|
|
|
791
798
|
<HStack gap={2}>
|
|
792
799
|
<div {...stylex.props(styles.fieldSelector)}>
|
|
793
800
|
<Selector
|
|
794
|
-
label=
|
|
801
|
+
label={t('@astryx.powersearch.editor.field')}
|
|
795
802
|
isLabelHidden
|
|
796
803
|
options={fieldOptions}
|
|
797
804
|
value={partialFilter.field}
|
|
@@ -803,7 +810,7 @@ export function PowerSearchEditPopover({
|
|
|
803
810
|
{showOperatorSelector && operatorOptions.length > 0 && (
|
|
804
811
|
<div {...stylex.props(styles.operatorSelector)}>
|
|
805
812
|
<Selector
|
|
806
|
-
label=
|
|
813
|
+
label={t('@astryx.powersearch.editor.operator')}
|
|
807
814
|
isLabelHidden
|
|
808
815
|
options={operatorOptions}
|
|
809
816
|
value={partialFilter.operator}
|
|
@@ -832,7 +839,7 @@ export function PowerSearchEditPopover({
|
|
|
832
839
|
<HStack gap={2} hAlign="between">
|
|
833
840
|
{!isReadOnly && mode === 'edit' ? (
|
|
834
841
|
<Button
|
|
835
|
-
label=
|
|
842
|
+
label={t('@astryx.powersearch.editor.delete')}
|
|
836
843
|
onClick={handleDelete}
|
|
837
844
|
variant="ghost"
|
|
838
845
|
size="sm"
|
|
@@ -842,7 +849,7 @@ export function PowerSearchEditPopover({
|
|
|
842
849
|
)}
|
|
843
850
|
<HStack gap={2}>
|
|
844
851
|
<Button
|
|
845
|
-
label=
|
|
852
|
+
label={t('@astryx.powersearch.editor.cancel')}
|
|
846
853
|
onClick={onCancel}
|
|
847
854
|
variant="ghost"
|
|
848
855
|
size="sm"
|
|
@@ -12,8 +12,10 @@
|
|
|
12
12
|
import React from 'react';
|
|
13
13
|
import * as stylex from '@stylexjs/stylex';
|
|
14
14
|
import {Token} from '../Token';
|
|
15
|
+
import {useTranslator} from '../i18n';
|
|
15
16
|
import {fontWeightVars} from '../theme/tokens.stylex';
|
|
16
17
|
import {formatFilterValue} from './formatFilterValue';
|
|
18
|
+
import {resolveOperatorLabel} from './resolveOperatorLabel';
|
|
17
19
|
import {useInternalConfig} from './useInternalConfig';
|
|
18
20
|
import type {PowerSearchTokenProps} from './types';
|
|
19
21
|
|
|
@@ -41,13 +43,17 @@ export function PowerSearchToken({
|
|
|
41
43
|
isDisabled,
|
|
42
44
|
}: PowerSearchTokenProps) {
|
|
43
45
|
const config = useInternalConfig(configProp);
|
|
46
|
+
const t = useTranslator();
|
|
44
47
|
|
|
45
48
|
const fieldLabel = field.label;
|
|
46
|
-
const
|
|
49
|
+
const resolvedOperatorLabel = resolveOperatorLabel(operator, t);
|
|
50
|
+
const operatorLabel = resolvedOperatorLabel
|
|
51
|
+
? `: ${resolvedOperatorLabel}`
|
|
52
|
+
: '';
|
|
47
53
|
const tokenLabel = `${fieldLabel}${operatorLabel}`;
|
|
48
54
|
|
|
49
55
|
const adjustedMaxLength = Math.max(
|
|
50
|
-
maxLength - fieldLabel.length -
|
|
56
|
+
maxLength - fieldLabel.length - resolvedOperatorLabel.length,
|
|
51
57
|
10,
|
|
52
58
|
);
|
|
53
59
|
|
|
@@ -56,6 +62,7 @@ export function PowerSearchToken({
|
|
|
56
62
|
operator.value,
|
|
57
63
|
filter.value,
|
|
58
64
|
adjustedMaxLength,
|
|
65
|
+
t,
|
|
59
66
|
);
|
|
60
67
|
|
|
61
68
|
const valueContent = valueStr ? (
|
|
@@ -66,10 +73,14 @@ export function PowerSearchToken({
|
|
|
66
73
|
<Token
|
|
67
74
|
label={tokenLabel}
|
|
68
75
|
endContent={valueContent}
|
|
69
|
-
onClick={
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
76
|
+
onClick={
|
|
77
|
+
onClick
|
|
78
|
+
? (e: React.MouseEvent) => {
|
|
79
|
+
e.stopPropagation();
|
|
80
|
+
onClick();
|
|
81
|
+
}
|
|
82
|
+
: undefined
|
|
83
|
+
}
|
|
73
84
|
onRemove={onRemove}
|
|
74
85
|
isDisabled={isDisabled}
|
|
75
86
|
/>
|
|
@@ -32,6 +32,7 @@ import {TimeInput} from '../TimeInput';
|
|
|
32
32
|
import {Selector} from '../Selector';
|
|
33
33
|
import {Tokenizer} from '../Tokenizer';
|
|
34
34
|
import {Typeahead} from '../Typeahead';
|
|
35
|
+
import {useTranslator} from '../i18n';
|
|
35
36
|
|
|
36
37
|
export interface PowerSearchValueEditorProps {
|
|
37
38
|
operatorValue: OperatorValue;
|
|
@@ -85,6 +86,7 @@ function StringEditor({
|
|
|
85
86
|
onChange: (value: FilterValue, shouldSave?: boolean) => void;
|
|
86
87
|
onEnter?: () => void;
|
|
87
88
|
}) {
|
|
89
|
+
const t = useTranslator();
|
|
88
90
|
const currentValue = filterValue?.type === 'string' ? filterValue.value : '';
|
|
89
91
|
|
|
90
92
|
// When a searchSource is provided, render a typeahead instead of a plain
|
|
@@ -96,7 +98,7 @@ function StringEditor({
|
|
|
96
98
|
|
|
97
99
|
return (
|
|
98
100
|
<Typeahead
|
|
99
|
-
label=
|
|
101
|
+
label={t('@astryx.powersearch.valueEditor.value')}
|
|
100
102
|
isLabelHidden
|
|
101
103
|
searchSource={operatorValue.searchSource}
|
|
102
104
|
value={selectedItem}
|
|
@@ -107,7 +109,7 @@ function StringEditor({
|
|
|
107
109
|
onChange({type: 'string', value: ''});
|
|
108
110
|
}
|
|
109
111
|
}}
|
|
110
|
-
placeholder=
|
|
112
|
+
placeholder={t('@astryx.powersearch.valueEditor.searchPlaceholder')}
|
|
111
113
|
debounceMs={150}
|
|
112
114
|
/>
|
|
113
115
|
);
|
|
@@ -115,10 +117,10 @@ function StringEditor({
|
|
|
115
117
|
|
|
116
118
|
return (
|
|
117
119
|
<TextInput
|
|
118
|
-
label=
|
|
120
|
+
label={t('@astryx.powersearch.valueEditor.value')}
|
|
119
121
|
isLabelHidden
|
|
120
122
|
value={currentValue}
|
|
121
|
-
placeholder=
|
|
123
|
+
placeholder={t('@astryx.powersearch.valueEditor.enterValuePlaceholder')}
|
|
122
124
|
onChange={(value: string) => {
|
|
123
125
|
onChange({type: 'string', value});
|
|
124
126
|
}}
|
|
@@ -135,6 +137,7 @@ function StringListEditor({
|
|
|
135
137
|
filterValue: FilterValue | undefined;
|
|
136
138
|
onChange: (value: FilterValue) => void;
|
|
137
139
|
}) {
|
|
140
|
+
const t = useTranslator();
|
|
138
141
|
const currentValue: SearchableItem[] = useMemo(() => {
|
|
139
142
|
if (filterValue?.type !== 'string_list') {
|
|
140
143
|
return [];
|
|
@@ -160,7 +163,7 @@ function StringListEditor({
|
|
|
160
163
|
|
|
161
164
|
return (
|
|
162
165
|
<Tokenizer
|
|
163
|
-
label=
|
|
166
|
+
label={t('@astryx.powersearch.valueEditor.values')}
|
|
164
167
|
isLabelHidden
|
|
165
168
|
searchSource={source}
|
|
166
169
|
value={currentValue}
|
|
@@ -170,7 +173,7 @@ function StringListEditor({
|
|
|
170
173
|
value: items.map(item => item.label),
|
|
171
174
|
});
|
|
172
175
|
}}
|
|
173
|
-
placeholder=
|
|
176
|
+
placeholder={t('@astryx.powersearch.valueEditor.addValuesPlaceholder')}
|
|
174
177
|
debounceMs={operatorValue.searchSource ? 150 : 0}
|
|
175
178
|
hasCreate={hasCreate}
|
|
176
179
|
/>
|
|
@@ -186,12 +189,13 @@ function IntegerEditor({
|
|
|
186
189
|
filterValue: FilterValue | undefined;
|
|
187
190
|
onChange: (value: FilterValue) => void;
|
|
188
191
|
}) {
|
|
192
|
+
const t = useTranslator();
|
|
189
193
|
const currentValue =
|
|
190
194
|
filterValue?.type === 'integer' ? filterValue.value : undefined;
|
|
191
195
|
|
|
192
196
|
return (
|
|
193
197
|
<NumberInput
|
|
194
|
-
label=
|
|
198
|
+
label={t('@astryx.powersearch.valueEditor.value')}
|
|
195
199
|
isLabelHidden
|
|
196
200
|
value={currentValue ?? null}
|
|
197
201
|
onChange={(value: number) => {
|
|
@@ -201,7 +205,7 @@ function IntegerEditor({
|
|
|
201
205
|
max={operatorValue.maxValue}
|
|
202
206
|
units={operatorValue.units}
|
|
203
207
|
isIntegerOnly
|
|
204
|
-
placeholder=
|
|
208
|
+
placeholder={t('@astryx.powersearch.valueEditor.enterNumberPlaceholder')}
|
|
205
209
|
/>
|
|
206
210
|
);
|
|
207
211
|
}
|
|
@@ -215,12 +219,13 @@ function FloatEditor({
|
|
|
215
219
|
filterValue: FilterValue | undefined;
|
|
216
220
|
onChange: (value: FilterValue) => void;
|
|
217
221
|
}) {
|
|
222
|
+
const t = useTranslator();
|
|
218
223
|
const currentValue =
|
|
219
224
|
filterValue?.type === 'float' ? filterValue.value : undefined;
|
|
220
225
|
|
|
221
226
|
return (
|
|
222
227
|
<NumberInput
|
|
223
|
-
label=
|
|
228
|
+
label={t('@astryx.powersearch.valueEditor.value')}
|
|
224
229
|
isLabelHidden
|
|
225
230
|
value={currentValue ?? null}
|
|
226
231
|
onChange={(value: number) => {
|
|
@@ -229,7 +234,7 @@ function FloatEditor({
|
|
|
229
234
|
min={operatorValue.minValue}
|
|
230
235
|
max={operatorValue.maxValue}
|
|
231
236
|
units={operatorValue.units}
|
|
232
|
-
placeholder=
|
|
237
|
+
placeholder={t('@astryx.powersearch.valueEditor.enterNumberPlaceholder')}
|
|
233
238
|
/>
|
|
234
239
|
);
|
|
235
240
|
}
|
|
@@ -243,6 +248,7 @@ function TimeEditor({
|
|
|
243
248
|
filterValue: FilterValue | undefined;
|
|
244
249
|
onChange: (value: FilterValue) => void;
|
|
245
250
|
}) {
|
|
251
|
+
const t = useTranslator();
|
|
246
252
|
const currentValue =
|
|
247
253
|
filterValue?.type === 'time'
|
|
248
254
|
? (filterValue.value as ISOTimeString)
|
|
@@ -250,7 +256,7 @@ function TimeEditor({
|
|
|
250
256
|
|
|
251
257
|
return (
|
|
252
258
|
<TimeInput
|
|
253
|
-
label=
|
|
259
|
+
label={t('@astryx.powersearch.valueEditor.time')}
|
|
254
260
|
isLabelHidden
|
|
255
261
|
value={currentValue}
|
|
256
262
|
onChange={value => {
|
|
@@ -272,6 +278,7 @@ function DateAbsoluteEditor({
|
|
|
272
278
|
filterValue: FilterValue | undefined;
|
|
273
279
|
onChange: (value: FilterValue) => void;
|
|
274
280
|
}) {
|
|
281
|
+
const t = useTranslator();
|
|
275
282
|
// Convert unixSeconds to ISO date string for the date input
|
|
276
283
|
const currentValue = useMemo(() => {
|
|
277
284
|
if (filterValue?.type !== 'date_absolute') {
|
|
@@ -283,7 +290,7 @@ function DateAbsoluteEditor({
|
|
|
283
290
|
|
|
284
291
|
return (
|
|
285
292
|
<DateInput
|
|
286
|
-
label=
|
|
293
|
+
label={t('@astryx.powersearch.valueEditor.date')}
|
|
287
294
|
isLabelHidden
|
|
288
295
|
value={currentValue}
|
|
289
296
|
onChange={value => {
|
|
@@ -305,6 +312,7 @@ function DateRelativeEditor({
|
|
|
305
312
|
filterValue: FilterValue | undefined;
|
|
306
313
|
onChange: (value: FilterValue, shouldSave?: boolean) => void;
|
|
307
314
|
}) {
|
|
315
|
+
const t = useTranslator();
|
|
308
316
|
const currentValue =
|
|
309
317
|
filterValue?.type === 'date_relative' ? filterValue.value : undefined;
|
|
310
318
|
|
|
@@ -342,7 +350,7 @@ function DateRelativeEditor({
|
|
|
342
350
|
|
|
343
351
|
return (
|
|
344
352
|
<Selector
|
|
345
|
-
label=
|
|
353
|
+
label={t('@astryx.powersearch.valueEditor.relativeDate')}
|
|
346
354
|
isLabelHidden
|
|
347
355
|
options={options}
|
|
348
356
|
value={currentValue}
|
|
@@ -361,6 +369,7 @@ function DateRangeEditor({
|
|
|
361
369
|
filterValue: FilterValue | undefined;
|
|
362
370
|
onChange: (value: FilterValue) => void;
|
|
363
371
|
}) {
|
|
372
|
+
const t = useTranslator();
|
|
364
373
|
const startValue = useMemo(() => {
|
|
365
374
|
if (filterValue?.type !== 'date_range') {
|
|
366
375
|
return undefined;
|
|
@@ -428,13 +437,13 @@ function DateRangeEditor({
|
|
|
428
437
|
return (
|
|
429
438
|
<>
|
|
430
439
|
<DateInput
|
|
431
|
-
label=
|
|
440
|
+
label={t('@astryx.powersearch.valueEditor.startDate')}
|
|
432
441
|
isLabelHidden
|
|
433
442
|
value={startValue}
|
|
434
443
|
onChange={handleStartChange}
|
|
435
444
|
/>
|
|
436
445
|
<DateInput
|
|
437
|
-
label=
|
|
446
|
+
label={t('@astryx.powersearch.valueEditor.endDate')}
|
|
438
447
|
isLabelHidden
|
|
439
448
|
value={endValue}
|
|
440
449
|
onChange={handleEndChange}
|
|
@@ -452,6 +461,7 @@ function EnumEditor({
|
|
|
452
461
|
filterValue: FilterValue | undefined;
|
|
453
462
|
onChange: (value: FilterValue, shouldSave?: boolean) => void;
|
|
454
463
|
}) {
|
|
464
|
+
const t = useTranslator();
|
|
455
465
|
const currentValue =
|
|
456
466
|
filterValue?.type === 'enum' ? filterValue.value : undefined;
|
|
457
467
|
|
|
@@ -466,7 +476,7 @@ function EnumEditor({
|
|
|
466
476
|
|
|
467
477
|
return (
|
|
468
478
|
<Selector
|
|
469
|
-
label=
|
|
479
|
+
label={t('@astryx.powersearch.valueEditor.value')}
|
|
470
480
|
isLabelHidden
|
|
471
481
|
options={options}
|
|
472
482
|
value={currentValue}
|
|
@@ -486,6 +496,7 @@ function EnumListEditor({
|
|
|
486
496
|
filterValue: FilterValue | undefined;
|
|
487
497
|
onChange: (value: FilterValue) => void;
|
|
488
498
|
}) {
|
|
499
|
+
const t = useTranslator();
|
|
489
500
|
const items = useMemo(
|
|
490
501
|
() => enumItemsToSearchableItems(operatorValue.values),
|
|
491
502
|
[operatorValue.values],
|
|
@@ -505,7 +516,7 @@ function EnumListEditor({
|
|
|
505
516
|
|
|
506
517
|
return (
|
|
507
518
|
<Tokenizer
|
|
508
|
-
label=
|
|
519
|
+
label={t('@astryx.powersearch.valueEditor.values')}
|
|
509
520
|
isLabelHidden
|
|
510
521
|
searchSource={source}
|
|
511
522
|
value={currentValue}
|
|
@@ -515,7 +526,7 @@ function EnumListEditor({
|
|
|
515
526
|
value: selectedItems.map(item => item.id),
|
|
516
527
|
});
|
|
517
528
|
}}
|
|
518
|
-
placeholder=
|
|
529
|
+
placeholder={t('@astryx.powersearch.valueEditor.selectValuesPlaceholder')}
|
|
519
530
|
hasEntriesOnFocus
|
|
520
531
|
debounceMs={0}
|
|
521
532
|
/>
|
|
@@ -531,6 +542,7 @@ function EntityListEditor({
|
|
|
531
542
|
filterValue: FilterValue | undefined;
|
|
532
543
|
onChange: (value: FilterValue) => void;
|
|
533
544
|
}) {
|
|
545
|
+
const t = useTranslator();
|
|
534
546
|
const source = useMemo<SearchSource<SearchableItem>>(() => {
|
|
535
547
|
if (operatorValue.searchSource) {
|
|
536
548
|
return operatorValue.searchSource;
|
|
@@ -555,7 +567,7 @@ function EntityListEditor({
|
|
|
555
567
|
|
|
556
568
|
return (
|
|
557
569
|
<Tokenizer
|
|
558
|
-
label=
|
|
570
|
+
label={t('@astryx.powersearch.valueEditor.entities')}
|
|
559
571
|
isLabelHidden
|
|
560
572
|
searchSource={source}
|
|
561
573
|
value={currentValue}
|
|
@@ -574,7 +586,7 @@ function EntityListEditor({
|
|
|
574
586
|
});
|
|
575
587
|
}}
|
|
576
588
|
renderItem={operatorValue.renderItem}
|
|
577
|
-
placeholder=
|
|
589
|
+
placeholder={t('@astryx.powersearch.valueEditor.searchPlaceholder')}
|
|
578
590
|
debounceMs={operatorValue.searchSource ? 150 : 0}
|
|
579
591
|
/>
|
|
580
592
|
);
|
|
@@ -591,6 +603,7 @@ function CustomEditor({
|
|
|
591
603
|
onChange: (value: FilterValue) => void;
|
|
592
604
|
isDisabled?: boolean;
|
|
593
605
|
}) {
|
|
606
|
+
const t = useTranslator();
|
|
594
607
|
const currentValue =
|
|
595
608
|
filterValue?.type === 'custom' ? filterValue.value : null;
|
|
596
609
|
const EditorComponent = operatorValue.Editor;
|
|
@@ -603,7 +616,7 @@ function CustomEditor({
|
|
|
603
616
|
onChange({type: 'custom', value});
|
|
604
617
|
}
|
|
605
618
|
}}
|
|
606
|
-
placeholder=
|
|
619
|
+
placeholder={t('@astryx.powersearch.valueEditor.enterValuePlaceholder')}
|
|
607
620
|
value={currentValue}
|
|
608
621
|
/>
|
|
609
622
|
);
|