@astryxdesign/core 0.1.6-canary.1b61ba6 → 0.1.6-canary.1d64659
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/README.md +0 -2
- package/dist/AlertDialog/AlertDialog.d.ts +1 -1
- package/dist/AlertDialog/AlertDialog.d.ts.map +1 -1
- package/dist/AlertDialog/AlertDialog.js +1 -4
- package/dist/AppShell/AppShell.d.ts.map +1 -1
- package/dist/AppShell/AppShell.js +1 -3
- package/dist/AvatarGroup/AvatarGroup.d.ts +1 -1
- package/dist/AvatarGroup/AvatarGroup.d.ts.map +1 -1
- package/dist/AvatarGroup/AvatarGroup.js +1 -4
- package/dist/Banner/Banner.d.ts.map +1 -1
- package/dist/Banner/Banner.js +6 -8
- package/dist/Breadcrumbs/Breadcrumbs.d.ts +1 -1
- package/dist/Breadcrumbs/Breadcrumbs.d.ts.map +1 -1
- package/dist/Breadcrumbs/Breadcrumbs.js +1 -4
- package/dist/Button/Button.d.ts.map +1 -1
- package/dist/Button/Button.js +4 -34
- package/dist/ButtonGroup/ButtonGroup.d.ts +5 -20
- package/dist/ButtonGroup/ButtonGroup.d.ts.map +1 -1
- package/dist/ButtonGroup/ButtonGroup.js +11 -27
- package/dist/Calendar/Calendar.d.ts.map +1 -1
- package/dist/Calendar/Calendar.js +5 -8
- package/dist/Carousel/Carousel.d.ts +1 -1
- package/dist/Carousel/Carousel.d.ts.map +1 -1
- package/dist/Carousel/Carousel.js +5 -8
- package/dist/Chat/ChatComposer.d.ts.map +1 -1
- package/dist/Chat/ChatComposer.js +1 -4
- package/dist/Chat/ChatComposerDrawer.d.ts +1 -1
- package/dist/Chat/ChatComposerDrawer.d.ts.map +1 -1
- package/dist/Chat/ChatComposerDrawer.js +2 -9
- package/dist/Chat/ChatComposerInput.d.ts.map +1 -1
- package/dist/Chat/ChatComposerInput.js +2 -6
- package/dist/Chat/ChatLayout.d.ts +11 -1
- package/dist/Chat/ChatLayout.d.ts.map +1 -1
- package/dist/Chat/ChatLayout.js +4 -6
- package/dist/Chat/ChatLayoutScrollButton.d.ts.map +1 -1
- package/dist/Chat/ChatLayoutScrollButton.js +2 -4
- package/dist/Chat/ChatMessage.d.ts +1 -1
- package/dist/Chat/ChatMessage.d.ts.map +1 -1
- package/dist/Chat/ChatMessage.js +2 -8
- package/dist/Chat/ChatMessageBubble.d.ts +1 -1
- package/dist/Chat/ChatMessageBubble.d.ts.map +1 -1
- package/dist/Chat/ChatMessageBubble.js +1 -3
- package/dist/Chat/ChatMessageList.d.ts +1 -1
- package/dist/Chat/ChatMessageList.d.ts.map +1 -1
- package/dist/Chat/ChatMessageList.js +1 -3
- package/dist/Chat/ChatMessageMetadata.d.ts.map +1 -1
- package/dist/Chat/ChatMessageMetadata.js +8 -13
- package/dist/Chat/ChatPastedTextToken.d.ts.map +1 -1
- package/dist/Chat/ChatPastedTextToken.js +1 -3
- package/dist/Chat/ChatSendButton.d.ts.map +1 -1
- package/dist/Chat/ChatSendButton.js +1 -3
- package/dist/Chat/index.d.ts +1 -1
- package/dist/Chat/index.d.ts.map +1 -1
- package/dist/Chat/useChatStreamScroll.d.ts +1 -12
- package/dist/Chat/useChatStreamScroll.d.ts.map +1 -1
- package/dist/Chat/useChatStreamScroll.js +6 -43
- package/dist/Chat/useSpeechRecognition.d.ts.map +1 -1
- package/dist/Chat/useSpeechRecognition.js +2 -4
- package/dist/Chat/useTriggerMenu.d.ts.map +1 -1
- package/dist/Chat/useTriggerMenu.js +2 -4
- package/dist/CheckboxList/CheckboxList.d.ts +1 -1
- package/dist/CheckboxList/CheckboxList.d.ts.map +1 -1
- package/dist/CheckboxList/CheckboxList.js +1 -3
- package/dist/CheckboxList/CheckboxListItem.d.ts.map +1 -1
- package/dist/CheckboxList/CheckboxListItem.js +1 -3
- package/dist/Citation/Citation.d.ts.map +1 -1
- package/dist/Citation/Citation.js +2 -10
- package/dist/CodeBlock/CodeBlock.d.ts.map +1 -1
- package/dist/CodeBlock/CodeBlock.js +2 -4
- package/dist/CommandPalette/CommandPalette.d.ts +1 -1
- package/dist/CommandPalette/CommandPalette.d.ts.map +1 -1
- package/dist/CommandPalette/CommandPalette.js +3 -8
- package/dist/CommandPalette/CommandPaletteInput.d.ts +1 -1
- package/dist/CommandPalette/CommandPaletteInput.d.ts.map +1 -1
- package/dist/CommandPalette/CommandPaletteInput.js +1 -4
- package/dist/CommandPalette/CommandPaletteList.d.ts +1 -1
- package/dist/CommandPalette/CommandPaletteList.d.ts.map +1 -1
- package/dist/CommandPalette/CommandPaletteList.js +1 -4
- package/dist/ContextMenu/ContextMenu.d.ts +1 -1
- package/dist/ContextMenu/ContextMenu.d.ts.map +1 -1
- package/dist/ContextMenu/ContextMenu.js +1 -4
- package/dist/DateInput/DateInput.d.ts +1 -1
- package/dist/DateInput/DateInput.d.ts.map +1 -1
- package/dist/DateInput/DateInput.js +5 -10
- package/dist/DateRangeInput/DateRangeInput.d.ts +1 -1
- package/dist/DateRangeInput/DateRangeInput.d.ts.map +1 -1
- package/dist/DateRangeInput/DateRangeInput.js +6 -11
- package/dist/DateTimeInput/DateTimeInput.d.ts +1 -1
- package/dist/DateTimeInput/DateTimeInput.d.ts.map +1 -1
- package/dist/DateTimeInput/DateTimeInput.js +7 -15
- package/dist/Dialog/Dialog.d.ts.map +1 -1
- package/dist/Dialog/Dialog.js +12 -15
- package/dist/Dialog/DialogHeader.d.ts +1 -1
- package/dist/Dialog/DialogHeader.d.ts.map +1 -1
- package/dist/Dialog/DialogHeader.js +3 -7
- package/dist/DropdownMenu/DropdownMenu.d.ts +1 -1
- package/dist/DropdownMenu/DropdownMenu.d.ts.map +1 -1
- package/dist/DropdownMenu/DropdownMenu.js +5 -11
- package/dist/FileInput/FileInput.d.ts.map +1 -1
- package/dist/FileInput/FileInput.js +1 -11
- package/dist/Lightbox/Lightbox.d.ts.map +1 -1
- package/dist/Lightbox/Lightbox.js +4 -6
- package/dist/Link/Link.d.ts +1 -1
- package/dist/Link/Link.d.ts.map +1 -1
- package/dist/Link/Link.js +1 -4
- package/dist/Markdown/Markdown.d.ts.map +1 -1
- package/dist/Markdown/Markdown.js +8 -10
- package/dist/MobileNav/MobileNav.d.ts.map +1 -1
- package/dist/MobileNav/MobileNav.js +2 -4
- package/dist/MobileNav/MobileNavToggle.d.ts +1 -1
- package/dist/MobileNav/MobileNavToggle.d.ts.map +1 -1
- package/dist/MobileNav/MobileNavToggle.js +1 -4
- package/dist/MoreMenu/MoreMenu.d.ts +1 -1
- package/dist/MoreMenu/MoreMenu.d.ts.map +1 -1
- package/dist/MoreMenu/MoreMenu.js +1 -4
- package/dist/MultiSelector/MultiSelector.d.ts +1 -1
- package/dist/MultiSelector/MultiSelector.d.ts.map +1 -1
- package/dist/MultiSelector/MultiSelector.js +6 -13
- package/dist/NavItem/index.d.ts +9 -0
- package/dist/NavItem/index.d.ts.map +1 -0
- package/dist/NavItem/index.js +10 -0
- package/dist/NumberInput/NumberInput.d.ts.map +1 -1
- package/dist/NumberInput/NumberInput.js +1 -5
- package/dist/Outline/Outline.d.ts +1 -1
- package/dist/Outline/Outline.d.ts.map +1 -1
- package/dist/Outline/Outline.js +1 -4
- package/dist/Pagination/Pagination.d.ts +1 -1
- package/dist/Pagination/Pagination.d.ts.map +1 -1
- package/dist/Pagination/Pagination.js +11 -38
- package/dist/Popover/usePopover.d.ts.map +1 -1
- package/dist/Popover/usePopover.js +1 -4
- package/dist/PowerSearch/PowerSearch.d.ts +1 -1
- package/dist/PowerSearch/PowerSearch.d.ts.map +1 -1
- package/dist/PowerSearch/PowerSearch.js +12 -22
- package/dist/PowerSearch/PowerSearchEditPopover.d.ts +1 -1
- package/dist/PowerSearch/PowerSearchEditPopover.d.ts.map +1 -1
- package/dist/PowerSearch/PowerSearchEditPopover.js +20 -26
- package/dist/PowerSearch/PowerSearchToken.d.ts.map +1 -1
- package/dist/PowerSearch/PowerSearchToken.js +3 -7
- package/dist/PowerSearch/PowerSearchValueEditor.d.ts.map +1 -1
- package/dist/PowerSearch/PowerSearchValueEditor.js +21 -34
- package/dist/PowerSearch/formatFilterValue.d.ts +1 -2
- package/dist/PowerSearch/formatFilterValue.d.ts.map +1 -1
- package/dist/PowerSearch/formatFilterValue.js +9 -19
- package/dist/PowerSearch/index.d.ts +1 -2
- package/dist/PowerSearch/index.d.ts.map +1 -1
- package/dist/PowerSearch/index.js +0 -1
- package/dist/PowerSearch/types.d.ts +2 -28
- 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 +8 -15
- package/dist/Resizable/ResizeHandle.d.ts +1 -1
- package/dist/Resizable/ResizeHandle.d.ts.map +1 -1
- package/dist/Resizable/ResizeHandle.js +1 -4
- package/dist/Selector/Selector.d.ts.map +1 -1
- package/dist/Selector/Selector.js +5 -11
- package/dist/SideNav/SideNav.d.ts.map +1 -1
- package/dist/SideNav/SideNav.js +2 -4
- package/dist/SideNav/SideNavCollapseButton.d.ts.map +1 -1
- package/dist/SideNav/SideNavCollapseButton.js +1 -3
- package/dist/SideNav/SideNavHeading.d.ts.map +1 -1
- package/dist/SideNav/SideNavHeading.js +3 -5
- package/dist/SideNav/SideNavItem.d.ts.map +1 -1
- package/dist/SideNav/SideNavItem.js +1 -7
- package/dist/TabList/TabList.d.ts +1 -1
- package/dist/TabList/TabList.d.ts.map +1 -1
- package/dist/TabList/TabList.js +1 -4
- package/dist/Table/BaseTable.d.ts.map +1 -1
- package/dist/Table/BaseTable.js +16 -29
- package/dist/Table/Table.d.ts.map +1 -1
- package/dist/Table/Table.js +3 -5
- package/dist/Table/plugins/columnResize/useTableColumnResize.js +1 -1
- package/dist/Table/plugins/filtering/useTableFiltering.d.ts.map +1 -1
- package/dist/Table/plugins/filtering/useTableFiltering.js +19 -56
- package/dist/Table/plugins/groupedRows/useTableGroupedRows.d.ts.map +1 -1
- package/dist/Table/plugins/groupedRows/useTableGroupedRows.js +4 -11
- package/dist/Table/plugins/pagination/useTablePagination.d.ts.map +1 -1
- package/dist/Table/plugins/pagination/useTablePagination.js +3 -6
- package/dist/Table/plugins/rowExpansion/useTableRowExpansion.d.ts.map +1 -1
- package/dist/Table/plugins/rowExpansion/useTableRowExpansion.js +6 -8
- package/dist/Table/plugins/selection/useTableSelection.d.ts.map +1 -1
- package/dist/Table/plugins/selection/useTableSelection.js +2 -5
- package/dist/Table/plugins/sortable/useTableSortable.d.ts.map +1 -1
- package/dist/Table/plugins/sortable/useTableSortable.js +4 -6
- package/dist/Table/plugins/stickyColumns/useTableStickyColumns.js +2 -2
- package/dist/Table/types.d.ts +10 -17
- package/dist/Table/types.d.ts.map +1 -1
- package/dist/TextInput/TextInput.d.ts.map +1 -1
- package/dist/TextInput/TextInput.js +1 -5
- package/dist/Thumbnail/Thumbnail.d.ts.map +1 -1
- package/dist/Thumbnail/Thumbnail.js +2 -8
- package/dist/TimeInput/TimeInput.d.ts +1 -1
- package/dist/TimeInput/TimeInput.d.ts.map +1 -1
- package/dist/TimeInput/TimeInput.js +2 -7
- package/dist/Toast/Toast.d.ts.map +1 -1
- package/dist/Toast/Toast.js +1 -3
- package/dist/Toast/ToastViewport.d.ts.map +1 -1
- package/dist/Toast/ToastViewport.js +1 -3
- package/dist/Token/Token.d.ts.map +1 -1
- package/dist/Token/Token.js +2 -8
- package/dist/Tokenizer/Tokenizer.d.ts.map +1 -1
- package/dist/Tokenizer/Tokenizer.js +1 -3
- package/dist/TopNav/TopNav.d.ts +1 -1
- package/dist/TopNav/TopNav.d.ts.map +1 -1
- package/dist/TopNav/TopNav.js +1 -4
- package/dist/TopNav/TopNavHeading.d.ts.map +1 -1
- package/dist/TopNav/TopNavHeading.js +3 -5
- package/dist/TreeList/TreeList.d.ts.map +1 -1
- package/dist/TreeList/TreeList.js +1 -5
- package/dist/TreeList/TreeListItem.d.ts.map +1 -1
- package/dist/TreeList/TreeListItem.js +1 -7
- package/dist/Typeahead/BaseTypeahead.d.ts.map +1 -1
- package/dist/Typeahead/BaseTypeahead.js +4 -8
- package/dist/Typeahead/Typeahead.d.ts.map +1 -1
- package/dist/Typeahead/Typeahead.js +1 -3
- package/dist/VisuallyHidden/VisuallyHidden.d.ts +0 -1
- package/dist/VisuallyHidden/VisuallyHidden.d.ts.map +1 -1
- package/dist/VisuallyHidden/VisuallyHidden.js +0 -1
- package/dist/astryx.css +1 -3
- package/dist/astryx.umd.js +60 -62
- package/dist/astryx.umd.js.map +4 -4
- package/dist/index.d.ts +0 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +0 -3
- package/package.json +2 -23
- package/src/AlertDialog/AlertDialog.tsx +1 -4
- package/src/AppShell/AppShell.doc.mjs +2 -8
- package/src/AppShell/AppShell.tsx +1 -3
- package/src/AvatarGroup/AvatarGroup.tsx +1 -4
- package/src/Banner/Banner.tsx +5 -10
- package/src/Breadcrumbs/Breadcrumbs.tsx +1 -4
- package/src/Button/Button.tsx +4 -34
- package/src/ButtonGroup/ButtonGroup.test.tsx +2 -386
- package/src/ButtonGroup/ButtonGroup.tsx +11 -27
- package/src/Calendar/Calendar.tsx +5 -8
- package/src/Card/Card.doc.mjs +3 -3
- package/src/Carousel/Carousel.tsx +7 -10
- package/src/Chat/ChatComposer.tsx +1 -5
- package/src/Chat/ChatComposerDrawer.tsx +2 -9
- package/src/Chat/ChatComposerInput.tsx +4 -10
- package/src/Chat/ChatLayout.test.tsx +2 -127
- package/src/Chat/ChatLayout.tsx +12 -5
- package/src/Chat/ChatLayoutScrollButton.tsx +2 -4
- package/src/Chat/ChatMessage.tsx +1 -5
- package/src/Chat/ChatMessageBubble.tsx +0 -2
- package/src/Chat/ChatMessageList.doc.mjs +1 -1
- package/src/Chat/ChatMessageList.tsx +0 -2
- package/src/Chat/ChatMessageMetadata.tsx +9 -15
- package/src/Chat/ChatPastedTextToken.tsx +1 -3
- package/src/Chat/ChatSendButton.tsx +1 -3
- package/src/Chat/ChatToolCalls.doc.mjs +1 -1
- package/src/Chat/index.ts +0 -1
- package/src/Chat/useChatStreamScroll.ts +11 -67
- package/src/Chat/useSpeechRecognition.ts +2 -11
- package/src/Chat/useTriggerMenu.tsx +2 -4
- package/src/CheckboxList/CheckboxList.doc.mjs +1 -1
- package/src/CheckboxList/CheckboxList.tsx +0 -2
- package/src/CheckboxList/CheckboxListItem.tsx +1 -7
- package/src/Citation/Citation.tsx +2 -4
- package/src/ClickableCard/ClickableCard.doc.mjs +1 -1
- package/src/CodeBlock/CodeBlock.tsx +2 -4
- package/src/CommandPalette/CommandPalette.tsx +3 -10
- package/src/CommandPalette/CommandPaletteInput.test.tsx +1 -1
- package/src/CommandPalette/CommandPaletteInput.tsx +1 -5
- package/src/CommandPalette/CommandPaletteList.tsx +1 -4
- package/src/ContextMenu/ContextMenu.tsx +1 -4
- package/src/DateInput/DateInput.doc.mjs +2 -2
- package/src/DateInput/DateInput.tsx +5 -13
- package/src/DateRangeInput/DateRangeInput.doc.mjs +1 -1
- package/src/DateRangeInput/DateRangeInput.tsx +6 -14
- package/src/DateTimeInput/DateTimeInput.doc.mjs +2 -2
- package/src/DateTimeInput/DateTimeInput.tsx +7 -17
- package/src/Dialog/Dialog.tsx +15 -11
- package/src/Dialog/DialogHeader.tsx +3 -7
- package/src/DropdownMenu/DropdownMenu.tsx +8 -12
- package/src/Field/Field.doc.mjs +2 -2
- package/src/FileInput/FileInput.test.tsx +1 -40
- package/src/FileInput/FileInput.tsx +1 -12
- package/src/Grid/Grid.doc.mjs +5 -5
- package/src/InputGroup/InputGroup.doc.mjs +1 -1
- package/src/Lightbox/Lightbox.doc.mjs +2 -7
- package/src/Lightbox/Lightbox.tsx +4 -6
- package/src/Link/Link.tsx +1 -4
- package/src/Markdown/Markdown.tsx +4 -12
- package/src/MobileNav/MobileNav.tsx +2 -4
- package/src/MobileNav/MobileNavToggle.tsx +3 -5
- package/src/MoreMenu/MoreMenu.tsx +1 -4
- package/src/MultiSelector/MultiSelector.tsx +5 -14
- package/src/NavItem/index.ts +11 -0
- package/src/NumberInput/NumberInput.tsx +1 -3
- package/src/Outline/Outline.tsx +1 -4
- package/src/OverflowList/OverflowList.doc.mjs +2 -2
- package/src/Pagination/Pagination.tsx +12 -35
- package/src/Popover/usePopover.tsx +1 -6
- package/src/PowerSearch/PowerSearch.doc.mjs +4 -4
- package/src/PowerSearch/PowerSearch.tsx +10 -22
- package/src/PowerSearch/PowerSearchEditPopover.tsx +20 -27
- package/src/PowerSearch/PowerSearchToken.tsx +6 -17
- package/src/PowerSearch/PowerSearchValueEditor.tsx +21 -34
- package/src/PowerSearch/formatFilterValue.ts +8 -21
- package/src/PowerSearch/index.ts +0 -5
- package/src/PowerSearch/types.ts +9 -33
- package/src/PowerSearch/usePowerSearchConfig.ts +27 -59
- package/src/PowerSearch/usePowerSearchSource.ts +8 -17
- package/src/RadioList/RadioList.doc.mjs +1 -1
- package/src/Resizable/ResizeHandle.tsx +1 -4
- package/src/Section/Section.doc.mjs +4 -4
- package/src/SelectableCard/SelectableCard.doc.mjs +1 -1
- package/src/Selector/Selector.tsx +6 -11
- package/src/SideNav/SideNav.tsx +2 -4
- package/src/SideNav/SideNavCollapseButton.tsx +1 -3
- package/src/SideNav/SideNavHeading.tsx +3 -5
- package/src/SideNav/SideNavItem.tsx +1 -3
- 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/TabList/TabList.tsx +1 -4
- package/src/Table/BaseTable.tsx +19 -36
- package/src/Table/Table.test.tsx +1 -132
- package/src/Table/Table.tsx +4 -6
- package/src/Table/plugins/columnResize/useTableColumnResize.tsx +1 -1
- package/src/Table/plugins/filtering/useTableFiltering.tsx +30 -31
- package/src/Table/plugins/groupedRows/useTableGroupedRows.tsx +4 -6
- package/src/Table/plugins/pagination/useTablePagination.tsx +1 -4
- package/src/Table/plugins/rowExpansion/useTableRowExpansion.tsx +8 -9
- package/src/Table/plugins/selection/useTableSelection.tsx +7 -6
- package/src/Table/plugins/sortable/useTableSortable.tsx +5 -8
- package/src/Table/plugins/stickyColumns/useTableStickyColumns.tsx +4 -4
- package/src/Table/types.ts +12 -18
- package/src/Table/useTableFiltering.doc.mjs +2 -2
- package/src/Table/useTableSortable.doc.mjs +11 -11
- package/src/Text/Text.doc.mjs +2 -2
- package/src/TextInput/TextInput.tsx +1 -3
- package/src/Thumbnail/Thumbnail.tsx +2 -4
- package/src/TimeInput/TimeInput.doc.mjs +2 -2
- package/src/TimeInput/TimeInput.tsx +2 -6
- package/src/Timestamp/Timestamp.doc.mjs +4 -4
- package/src/Toast/Toast.tsx +1 -3
- package/src/Toast/ToastViewport.tsx +1 -3
- package/src/Token/Token.tsx +2 -4
- 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.tsx +1 -4
- package/src/TopNav/TopNavHeading.tsx +3 -5
- package/src/TreeList/TreeList.tsx +1 -5
- package/src/TreeList/TreeListItem.tsx +1 -6
- package/src/Typeahead/BaseTypeahead.tsx +4 -11
- package/src/Typeahead/Typeahead.doc.mjs +1 -1
- package/src/Typeahead/Typeahead.tsx +1 -3
- package/src/VisuallyHidden/VisuallyHidden.tsx +0 -1
- package/src/index.ts +0 -3
- package/dist/PowerSearch/resolveOperatorLabel.d.ts +0 -23
- package/dist/PowerSearch/resolveOperatorLabel.d.ts.map +0 -1
- package/dist/PowerSearch/resolveOperatorLabel.js +0 -28
- package/dist/authoring/doc.d.ts +0 -145
- package/dist/authoring/doc.d.ts.map +0 -1
- package/dist/authoring/doc.js +0 -100
- package/dist/authoring/index.d.ts +0 -29
- package/dist/authoring/index.d.ts.map +0 -1
- package/dist/authoring/index.js +0 -28
- package/dist/authoring/integration.d.ts +0 -35
- package/dist/authoring/integration.d.ts.map +0 -1
- package/dist/authoring/integration.js +0 -30
- package/dist/authoring/template.d.ts +0 -66
- package/dist/authoring/template.d.ts.map +0 -1
- package/dist/authoring/template.js +0 -55
- package/dist/config.d.ts +0 -80
- package/dist/config.d.ts.map +0 -1
- package/dist/config.js +0 -40
- package/dist/i18n/InternationalizationContext.d.ts +0 -12
- package/dist/i18n/InternationalizationContext.d.ts.map +0 -1
- package/dist/i18n/InternationalizationContext.js +0 -29
- package/dist/i18n/InternationalizationProvider.d.ts +0 -62
- package/dist/i18n/InternationalizationProvider.d.ts.map +0 -1
- package/dist/i18n/InternationalizationProvider.js +0 -44
- package/dist/i18n/index.d.ts +0 -24
- package/dist/i18n/index.d.ts.map +0 -1
- package/dist/i18n/index.js +0 -21
- package/dist/i18n/resolve.d.ts +0 -22
- package/dist/i18n/resolve.d.ts.map +0 -1
- package/dist/i18n/resolve.js +0 -141
- package/dist/i18n/translator.d.ts +0 -25
- package/dist/i18n/translator.d.ts.map +0 -1
- package/dist/i18n/translator.js +0 -1
- package/dist/i18n/types.d.ts +0 -47
- package/dist/i18n/types.d.ts.map +0 -1
- package/dist/i18n/types.js +0 -1
- package/dist/i18n/useTranslator.d.ts +0 -15
- package/dist/i18n/useTranslator.d.ts.map +0 -1
- package/dist/i18n/useTranslator.js +0 -39
- package/locales/en.json +0 -746
- package/locales/pseudo.json +0 -560
- package/src/Chat/useChatStreamScroll.test.tsx +0 -168
- package/src/PowerSearch/formatFilterValue.test.ts +0 -282
- package/src/PowerSearch/resolveOperatorLabel.ts +0 -34
- package/src/authoring/doc.ts +0 -166
- package/src/authoring/index.test.ts +0 -52
- package/src/authoring/index.ts +0 -50
- package/src/authoring/integration.ts +0 -42
- package/src/authoring/template.ts +0 -74
- package/src/config.test.ts +0 -16
- package/src/config.ts +0 -92
- package/src/docPropLiterals.test.ts +0 -938
- package/src/i18n/InternationalizationContext.ts +0 -39
- package/src/i18n/InternationalizationProvider.doc.mjs +0 -72
- package/src/i18n/InternationalizationProvider.tsx +0 -83
- package/src/i18n/__tests__/e2e-pagination.test.tsx +0 -172
- package/src/i18n/__tests__/e2e-powersearch.test.tsx +0 -130
- package/src/i18n/__tests__/resolve.test.ts +0 -284
- package/src/i18n/index.ts +0 -32
- package/src/i18n/resolve.ts +0 -165
- package/src/i18n/translator.ts +0 -31
- package/src/i18n/types.ts +0 -53
- package/src/i18n/useTranslator.doc.mjs +0 -46
- package/src/i18n/useTranslator.ts +0 -50
|
@@ -31,9 +31,7 @@ import { useInternalConfig } from "./useInternalConfig.js";
|
|
|
31
31
|
import { usePowerSearchSource } from "./usePowerSearchSource.js";
|
|
32
32
|
import { formatFilterValue } from "./formatFilterValue.js";
|
|
33
33
|
import { PowerSearchEditPopover } from "./PowerSearchEditPopover.js";
|
|
34
|
-
import { resolveOperatorLabel } from "./resolveOperatorLabel.js";
|
|
35
34
|
import { themeProps } from "../utils/themeProps.js";
|
|
36
|
-
import { useTranslator } from "../i18n/index.js";
|
|
37
35
|
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
38
36
|
// =============================================================================
|
|
39
37
|
// Icon mapping for typeahead entries
|
|
@@ -367,9 +365,9 @@ export function PowerSearch({
|
|
|
367
365
|
config: configProp,
|
|
368
366
|
filters,
|
|
369
367
|
onChange,
|
|
370
|
-
label
|
|
368
|
+
label = 'Search',
|
|
371
369
|
isLabelHidden = true,
|
|
372
|
-
placeholder
|
|
370
|
+
placeholder = 'Search...',
|
|
373
371
|
hasAutoFocus = false,
|
|
374
372
|
hasClear = true,
|
|
375
373
|
isReadOnly = false,
|
|
@@ -380,7 +378,7 @@ export function PowerSearch({
|
|
|
380
378
|
onBlur,
|
|
381
379
|
status,
|
|
382
380
|
maxTokenLength = 40,
|
|
383
|
-
popoverSaveButtonLabel
|
|
381
|
+
popoverSaveButtonLabel = 'Apply',
|
|
384
382
|
timezoneID,
|
|
385
383
|
tokenOverflowBehavior,
|
|
386
384
|
endContent,
|
|
@@ -397,10 +395,6 @@ export function PowerSearch({
|
|
|
397
395
|
const size = useSize(sizeProp, 'md');
|
|
398
396
|
const config = useInternalConfig(configProp);
|
|
399
397
|
const searchSource = usePowerSearchSource(config);
|
|
400
|
-
const t = useTranslator();
|
|
401
|
-
const label = labelFromProps ?? t('@astryx.powersearch.label');
|
|
402
|
-
const placeholder = placeholderFromProps ?? t('@astryx.powersearch.placeholder');
|
|
403
|
-
const popoverSaveButtonLabel = popoverSaveButtonLabelFromProps ?? t('@astryx.powersearch.editor.apply');
|
|
404
398
|
const tokenizerRef = useRef(null);
|
|
405
399
|
const [popoverState, setPopoverStateRaw] = useState({
|
|
406
400
|
type: 'idle'
|
|
@@ -453,9 +447,8 @@ export function PowerSearch({
|
|
|
453
447
|
return filters.map((filter, index) => {
|
|
454
448
|
const field = config.getField(filter.field);
|
|
455
449
|
const operator = config.getOperator(filter.field, filter.operator);
|
|
456
|
-
const
|
|
457
|
-
const
|
|
458
|
-
const valueStr = operator ? formatFilterValue(config, operator.value, filter.value, maxTokenLength, t, timezoneID) : '';
|
|
450
|
+
const operatorLabel = operator?.label ? `: ${operator.label}` : '';
|
|
451
|
+
const valueStr = operator ? formatFilterValue(config, operator.value, filter.value, maxTokenLength, timezoneID) : '';
|
|
459
452
|
const displayLabel = valueStr ? `${field?.label ?? filter.field}${operatorLabel} ${valueStr}` : `${field?.label ?? filter.field}${operatorLabel}`;
|
|
460
453
|
return {
|
|
461
454
|
id: `filter-${index}-${filter.field}-${filter.operator}`,
|
|
@@ -468,7 +461,7 @@ export function PowerSearch({
|
|
|
468
461
|
}
|
|
469
462
|
};
|
|
470
463
|
});
|
|
471
|
-
}, [filters, config, maxTokenLength, timezoneID
|
|
464
|
+
}, [filters, config, maxTokenLength, timezoneID]);
|
|
472
465
|
|
|
473
466
|
// Handle tokenizer onChange (field selected from typeahead)
|
|
474
467
|
const handleTokenizerChange = useCallback((_items, change) => {
|
|
@@ -603,7 +596,7 @@ export function PowerSearch({
|
|
|
603
596
|
|
|
604
597
|
// Default token rendering
|
|
605
598
|
const fieldLabel = field?.label ?? '';
|
|
606
|
-
const operatorLabel = operator
|
|
599
|
+
const operatorLabel = operator?.label ?? '';
|
|
607
600
|
const tokenLabel = `${fieldLabel}: ${operatorLabel}`.trim();
|
|
608
601
|
const adjustedMaxLength = Math.max(maxTokenLength - fieldLabel.length - operatorLabel.length, 10);
|
|
609
602
|
const valueContent = operator && filter ? /*#__PURE__*/_jsx(PowerSearchTokenValue, {
|
|
@@ -634,7 +627,7 @@ export function PowerSearch({
|
|
|
634
627
|
onRemove: handleRemove,
|
|
635
628
|
isDisabled: isDisabled
|
|
636
629
|
});
|
|
637
|
-
}, [filters, config, configProp, maxTokenLength, size, isReadOnly, isDisabled, handleTokenClick, componentOverrides
|
|
630
|
+
}, [filters, config, configProp, maxTokenLength, size, isReadOnly, isDisabled, handleTokenClick, componentOverrides]);
|
|
638
631
|
|
|
639
632
|
// Custom typeahead item renderer — adds field icon and description
|
|
640
633
|
const renderItem = useCallback(item => {
|
|
@@ -706,20 +699,17 @@ export function PowerSearch({
|
|
|
706
699
|
}, [popoverPartialFilter, popoverState, EditorOverride, configProp, config, handlePopoverSave, handlePopoverCancel, popoverSaveButtonLabel, isReadOnly]);
|
|
707
700
|
|
|
708
701
|
// Plain-text form of the result count, shared by the visible label and the
|
|
709
|
-
// screen-reader announcement so the two never drift.
|
|
710
|
-
// the number formatting + `result` vs `results` in one message so translators
|
|
711
|
-
// can match the locale's plural rules.
|
|
702
|
+
// screen-reader announcement so the two never drift.
|
|
712
703
|
const resultCountText = useMemo(() => {
|
|
713
704
|
if (resultCount == null) {
|
|
714
705
|
return null;
|
|
715
706
|
}
|
|
716
707
|
if (typeof resultCount === 'number') {
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
});
|
|
708
|
+
const formatted = new Intl.NumberFormat().format(resultCount);
|
|
709
|
+
return `${formatted} ${resultCount === 1 ? 'result' : 'results'}`;
|
|
720
710
|
}
|
|
721
711
|
return resultCount;
|
|
722
|
-
}, [resultCount
|
|
712
|
+
}, [resultCount]);
|
|
723
713
|
|
|
724
714
|
// Announce result-count changes to screen readers through a polite live
|
|
725
715
|
// region, mirroring the way Typeahead announces its dropdown result count.
|
|
@@ -25,5 +25,5 @@ export interface PowerSearchEditPopoverProps {
|
|
|
25
25
|
/** Whether the filter is read-only. */
|
|
26
26
|
isReadOnly?: boolean;
|
|
27
27
|
}
|
|
28
|
-
export declare function PowerSearchEditPopover({ config, filter: initialFilter, mode, onSave, onCancel, saveButtonLabel
|
|
28
|
+
export declare function PowerSearchEditPopover({ config, filter: initialFilter, mode, onSave, onCancel, saveButtonLabel, isReadOnly, }: PowerSearchEditPopoverProps): React.JSX.Element;
|
|
29
29
|
//# sourceMappingURL=PowerSearchEditPopover.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PowerSearchEditPopover.d.ts","sourceRoot":"","sources":["../../src/PowerSearch/PowerSearchEditPopover.tsx"],"names":[],"mappings":"AAIA;;;;;;;;GAQG;AAEH,OAAO,KAA0D,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"PowerSearchEditPopover.d.ts","sourceRoot":"","sources":["../../src/PowerSearch/PowerSearchEditPopover.tsx"],"names":[],"mappings":"AAIA;;;;;;;;GAQG;AAEH,OAAO,KAA0D,MAAM,OAAO,CAAC;AAS/E,OAAO,KAAK,EAAC,cAAc,EAAC,MAAM,qBAAqB,CAAC;AACxD,OAAO,KAAK,EACV,iBAAiB,EACjB,aAAa,EAGd,MAAM,SAAS,CAAC;AAgDjB,MAAM,WAAW,2BAA2B;IAC1C,MAAM,EAAE,cAAc,CAAC;IACvB,uCAAuC;IACvC,MAAM,EAAE,aAAa,CAAC;IACtB,qDAAqD;IACrD,IAAI,EAAE,QAAQ,GAAG,MAAM,CAAC;IACxB,6EAA6E;IAC7E,MAAM,EAAE,CAAC,MAAM,EAAE,iBAAiB,GAAG,IAAI,KAAK,IAAI,CAAC;IACnD,wDAAwD;IACxD,QAAQ,EAAE,MAAM,IAAI,CAAC;IACrB,kDAAkD;IAClD,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,uCAAuC;IACvC,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB;AA4eD,wBAAgB,sBAAsB,CAAC,EACrC,MAAM,EACN,MAAM,EAAE,aAAa,EACrB,IAAI,EACJ,MAAM,EACN,QAAQ,EACR,eAAyB,EACzB,UAAkB,GACnB,EAAE,2BAA2B,qBA+Q7B"}
|
|
@@ -18,11 +18,9 @@ import { Selector } from "../Selector/index.js";
|
|
|
18
18
|
import { HStack, VStack } from "../Stack/index.js";
|
|
19
19
|
import { Icon } from "../Icon/index.js";
|
|
20
20
|
import { TreeList } from "../TreeList/index.js";
|
|
21
|
-
import { useTranslator } from "../i18n/index.js";
|
|
22
21
|
import "../theme/tokens.stylex.js";
|
|
23
22
|
import { spacingVars, typeScaleVars } from "../theme/tokens.stylex.js";
|
|
24
23
|
import { PowerSearchValueEditor } from "./PowerSearchValueEditor.js";
|
|
25
|
-
import { resolveOperatorLabel } from "./resolveOperatorLabel.js";
|
|
26
24
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
27
25
|
// =============================================================================
|
|
28
26
|
// Editable filter state for recursive nesting
|
|
@@ -131,7 +129,6 @@ function NestedSubFilterRow({
|
|
|
131
129
|
onChange,
|
|
132
130
|
isReadOnly
|
|
133
131
|
}) {
|
|
134
|
-
const t = useTranslator();
|
|
135
132
|
const fieldOptions = useMemo(() => config.getVisibleFields().map(field => ({
|
|
136
133
|
value: field.key,
|
|
137
134
|
label: field.label
|
|
@@ -140,9 +137,9 @@ function NestedSubFilterRow({
|
|
|
140
137
|
const operators = config.getVisibleOperators(subFilter.field);
|
|
141
138
|
return operators.map(op => ({
|
|
142
139
|
value: op.key,
|
|
143
|
-
label:
|
|
140
|
+
label: op.label
|
|
144
141
|
}));
|
|
145
|
-
}, [config, subFilter.field
|
|
142
|
+
}, [config, subFilter.field]);
|
|
146
143
|
const currentOperator = subFilter.operator ? config.getOperator(subFilter.field, subFilter.operator) : undefined;
|
|
147
144
|
const operatorValue = currentOperator?.value;
|
|
148
145
|
const isEmptyType = operatorValue?.type === 'empty';
|
|
@@ -182,7 +179,7 @@ function NestedSubFilterRow({
|
|
|
182
179
|
className: "x2lah0s x1oysuqx"
|
|
183
180
|
},
|
|
184
181
|
children: /*#__PURE__*/_jsx(Selector, {
|
|
185
|
-
label:
|
|
182
|
+
label: "Field",
|
|
186
183
|
isLabelHidden: true,
|
|
187
184
|
options: fieldOptions,
|
|
188
185
|
value: subFilter.field,
|
|
@@ -195,7 +192,7 @@ function NestedSubFilterRow({
|
|
|
195
192
|
className: "x2lah0s xzjbwwf"
|
|
196
193
|
},
|
|
197
194
|
children: /*#__PURE__*/_jsx(Selector, {
|
|
198
|
-
label:
|
|
195
|
+
label: "Operator",
|
|
199
196
|
isLabelHidden: true,
|
|
200
197
|
options: operatorOptions,
|
|
201
198
|
value: subFilter.operator,
|
|
@@ -230,7 +227,6 @@ function NestedEditor({
|
|
|
230
227
|
onPartialFilterChange,
|
|
231
228
|
isReadOnly
|
|
232
229
|
}) {
|
|
233
|
-
const t = useTranslator();
|
|
234
230
|
const [subFilters, setSubFilters] = useState(() => {
|
|
235
231
|
if (partialFilter.value && partialFilter.value.type === 'nested') {
|
|
236
232
|
return partialFilter.value.value.map(f => initEditableFilter(config, f));
|
|
@@ -298,7 +294,7 @@ function NestedEditor({
|
|
|
298
294
|
children.push({
|
|
299
295
|
id: `${itemPath.join('-')}-add`,
|
|
300
296
|
label: /*#__PURE__*/_jsx(Button, {
|
|
301
|
-
label:
|
|
297
|
+
label: "+ Add filter",
|
|
302
298
|
onClick: () => handleAdd(itemPath),
|
|
303
299
|
variant: "ghost",
|
|
304
300
|
size: "sm"
|
|
@@ -316,7 +312,7 @@ function NestedEditor({
|
|
|
316
312
|
isExpanded: true,
|
|
317
313
|
children,
|
|
318
314
|
endContent: !isReadOnly ? /*#__PURE__*/_jsx(Button, {
|
|
319
|
-
label:
|
|
315
|
+
label: "Remove filter",
|
|
320
316
|
icon: /*#__PURE__*/_jsx(Icon, {
|
|
321
317
|
icon: "close",
|
|
322
318
|
size: "sm"
|
|
@@ -338,7 +334,7 @@ function NestedEditor({
|
|
|
338
334
|
isReadOnly: isReadOnly
|
|
339
335
|
}),
|
|
340
336
|
endContent: !isReadOnly ? /*#__PURE__*/_jsx(Button, {
|
|
341
|
-
label:
|
|
337
|
+
label: "Remove filter",
|
|
342
338
|
icon: /*#__PURE__*/_jsx(Icon, {
|
|
343
339
|
icon: "close",
|
|
344
340
|
size: "sm"
|
|
@@ -357,7 +353,7 @@ function NestedEditor({
|
|
|
357
353
|
treeChildren.push({
|
|
358
354
|
id: 'add-filter',
|
|
359
355
|
label: /*#__PURE__*/_jsx(Button, {
|
|
360
|
-
label:
|
|
356
|
+
label: "+ Add filter",
|
|
361
357
|
onClick: () => handleAdd([]),
|
|
362
358
|
variant: "ghost",
|
|
363
359
|
size: "sm"
|
|
@@ -373,7 +369,7 @@ function NestedEditor({
|
|
|
373
369
|
className: "x1iyjqo2 x2lah0s"
|
|
374
370
|
},
|
|
375
371
|
children: /*#__PURE__*/_jsx(Selector, {
|
|
376
|
-
label:
|
|
372
|
+
label: "Group operator",
|
|
377
373
|
isLabelHidden: true,
|
|
378
374
|
options: operatorOptions,
|
|
379
375
|
value: partialFilter.operator,
|
|
@@ -381,7 +377,7 @@ function NestedEditor({
|
|
|
381
377
|
isDisabled: isReadOnly,
|
|
382
378
|
size: "md"
|
|
383
379
|
})
|
|
384
|
-
}) : operatorOptions[0]?.label ??
|
|
380
|
+
}) : operatorOptions[0]?.label ?? 'Group'
|
|
385
381
|
});
|
|
386
382
|
const items = [{
|
|
387
383
|
id: 'nested-root',
|
|
@@ -405,11 +401,9 @@ export function PowerSearchEditPopover({
|
|
|
405
401
|
mode,
|
|
406
402
|
onSave,
|
|
407
403
|
onCancel,
|
|
408
|
-
saveButtonLabel
|
|
404
|
+
saveButtonLabel = 'Apply',
|
|
409
405
|
isReadOnly = false
|
|
410
406
|
}) {
|
|
411
|
-
const t = useTranslator();
|
|
412
|
-
const saveButtonLabel = saveButtonLabelFromProps ?? t('@astryx.powersearch.editor.apply');
|
|
413
407
|
const [partialFilter, setPartialFilter] = useState(initialFilter);
|
|
414
408
|
const valueEditorRef = useRef(null);
|
|
415
409
|
|
|
@@ -438,9 +432,9 @@ export function PowerSearchEditPopover({
|
|
|
438
432
|
const operators = config.getVisibleOperators(partialFilter.field);
|
|
439
433
|
return operators.map(op => ({
|
|
440
434
|
value: op.key,
|
|
441
|
-
label:
|
|
435
|
+
label: op.label
|
|
442
436
|
}));
|
|
443
|
-
}, [config, partialFilter.field
|
|
437
|
+
}, [config, partialFilter.field]);
|
|
444
438
|
const handleFieldChange = useCallback(fieldKey => {
|
|
445
439
|
const defaultOp = config.getDefaultOperator(fieldKey);
|
|
446
440
|
setPartialFilter({
|
|
@@ -537,7 +531,7 @@ export function PowerSearchEditPopover({
|
|
|
537
531
|
className: "x1iyjqo2 xs83m0k xeuugli"
|
|
538
532
|
},
|
|
539
533
|
children: /*#__PURE__*/_jsx(Selector, {
|
|
540
|
-
label:
|
|
534
|
+
label: "Field",
|
|
541
535
|
isLabelHidden: true,
|
|
542
536
|
options: fieldOptions,
|
|
543
537
|
value: partialFilter.field,
|
|
@@ -563,14 +557,14 @@ export function PowerSearchEditPopover({
|
|
|
563
557
|
gap: 2,
|
|
564
558
|
hAlign: "between",
|
|
565
559
|
children: [!isReadOnly && mode === 'edit' ? /*#__PURE__*/_jsx(Button, {
|
|
566
|
-
label:
|
|
560
|
+
label: "Delete",
|
|
567
561
|
onClick: handleDelete,
|
|
568
562
|
variant: "ghost",
|
|
569
563
|
size: "sm"
|
|
570
564
|
}) : /*#__PURE__*/_jsx("div", {}), /*#__PURE__*/_jsxs(HStack, {
|
|
571
565
|
gap: 2,
|
|
572
566
|
children: [/*#__PURE__*/_jsx(Button, {
|
|
573
|
-
label:
|
|
567
|
+
label: "Cancel",
|
|
574
568
|
onClick: onCancel,
|
|
575
569
|
variant: "ghost",
|
|
576
570
|
size: "sm"
|
|
@@ -602,7 +596,7 @@ export function PowerSearchEditPopover({
|
|
|
602
596
|
className: "x1iyjqo2 xs83m0k xeuugli"
|
|
603
597
|
},
|
|
604
598
|
children: /*#__PURE__*/_jsx(Selector, {
|
|
605
|
-
label:
|
|
599
|
+
label: "Field",
|
|
606
600
|
isLabelHidden: true,
|
|
607
601
|
options: fieldOptions,
|
|
608
602
|
value: partialFilter.field,
|
|
@@ -615,7 +609,7 @@ export function PowerSearchEditPopover({
|
|
|
615
609
|
className: "x1iyjqo2 x2lah0s"
|
|
616
610
|
},
|
|
617
611
|
children: /*#__PURE__*/_jsx(Selector, {
|
|
618
|
-
label:
|
|
612
|
+
label: "Operator",
|
|
619
613
|
isLabelHidden: true,
|
|
620
614
|
options: operatorOptions,
|
|
621
615
|
value: partialFilter.operator,
|
|
@@ -646,14 +640,14 @@ export function PowerSearchEditPopover({
|
|
|
646
640
|
gap: 2,
|
|
647
641
|
hAlign: "between",
|
|
648
642
|
children: [!isReadOnly && mode === 'edit' ? /*#__PURE__*/_jsx(Button, {
|
|
649
|
-
label:
|
|
643
|
+
label: "Delete",
|
|
650
644
|
onClick: handleDelete,
|
|
651
645
|
variant: "ghost",
|
|
652
646
|
size: "sm"
|
|
653
647
|
}) : /*#__PURE__*/_jsx("div", {}), /*#__PURE__*/_jsxs(HStack, {
|
|
654
648
|
gap: 2,
|
|
655
649
|
children: [/*#__PURE__*/_jsx(Button, {
|
|
656
|
-
label:
|
|
650
|
+
label: "Cancel",
|
|
657
651
|
onClick: onCancel,
|
|
658
652
|
variant: "ghost",
|
|
659
653
|
size: "sm"
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PowerSearchToken.d.ts","sourceRoot":"","sources":["../../src/PowerSearch/PowerSearchToken.tsx"],"names":[],"mappings":"AAIA;;;;;GAKG;AAEH,OAAO,KAAK,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"PowerSearchToken.d.ts","sourceRoot":"","sources":["../../src/PowerSearch/PowerSearchToken.tsx"],"names":[],"mappings":"AAIA;;;;;GAKG;AAEH,OAAO,KAAK,MAAM,OAAO,CAAC;AAM1B,OAAO,KAAK,EAAC,qBAAqB,EAAC,MAAM,SAAS,CAAC;AAQnD;;;;;;GAMG;AACH,wBAAgB,gBAAgB,CAAC,EAC/B,MAAM,EAAE,UAAU,EAClB,MAAM,EACN,KAAK,EACL,QAAQ,EACR,SAAS,EACT,OAAO,EACP,QAAQ,EACR,UAAU,GACX,EAAE,qBAAqB,qBAmCvB;yBA5Ce,gBAAgB"}
|
|
@@ -11,11 +11,9 @@
|
|
|
11
11
|
import React from 'react';
|
|
12
12
|
import * as stylex from '@stylexjs/stylex';
|
|
13
13
|
import { Token } from "../Token/index.js";
|
|
14
|
-
import { useTranslator } from "../i18n/index.js";
|
|
15
14
|
import "../theme/tokens.stylex.js";
|
|
16
15
|
import { fontWeightVars } from "../theme/tokens.stylex.js";
|
|
17
16
|
import { formatFilterValue } from "./formatFilterValue.js";
|
|
18
|
-
import { resolveOperatorLabel } from "./resolveOperatorLabel.js";
|
|
19
17
|
import { useInternalConfig } from "./useInternalConfig.js";
|
|
20
18
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
21
19
|
/**
|
|
@@ -36,13 +34,11 @@ export function PowerSearchToken({
|
|
|
36
34
|
isDisabled
|
|
37
35
|
}) {
|
|
38
36
|
const config = useInternalConfig(configProp);
|
|
39
|
-
const t = useTranslator();
|
|
40
37
|
const fieldLabel = field.label;
|
|
41
|
-
const
|
|
42
|
-
const operatorLabel = resolvedOperatorLabel ? `: ${resolvedOperatorLabel}` : '';
|
|
38
|
+
const operatorLabel = operator.label ? `: ${operator.label}` : '';
|
|
43
39
|
const tokenLabel = `${fieldLabel}${operatorLabel}`;
|
|
44
|
-
const adjustedMaxLength = Math.max(maxLength - fieldLabel.length -
|
|
45
|
-
const valueStr = formatFilterValue(config, operator.value, filter.value, adjustedMaxLength
|
|
40
|
+
const adjustedMaxLength = Math.max(maxLength - fieldLabel.length - (operator.label?.length ?? 0), 10);
|
|
41
|
+
const valueStr = formatFilterValue(config, operator.value, filter.value, adjustedMaxLength);
|
|
46
42
|
const valueContent = valueStr ? /*#__PURE__*/_jsx("span", {
|
|
47
43
|
...{
|
|
48
44
|
className: "x1lvx875"
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PowerSearchValueEditor.d.ts","sourceRoot":"","sources":["../../src/PowerSearch/PowerSearchValueEditor.tsx"],"names":[],"mappings":"AAIA;;;;;;;;GAQG;AAEH,OAAO,KAA6B,MAAM,OAAO,CAAC;AAClD,OAAO,KAAK,EACV,aAAa,EACb,WAAW,EAGZ,MAAM,SAAS,CAAC;AACjB,OAAO,KAAK,EAAC,cAAc,EAAC,MAAM,qBAAqB,CAAC;
|
|
1
|
+
{"version":3,"file":"PowerSearchValueEditor.d.ts","sourceRoot":"","sources":["../../src/PowerSearch/PowerSearchValueEditor.tsx"],"names":[],"mappings":"AAIA;;;;;;;;GAQG;AAEH,OAAO,KAA6B,MAAM,OAAO,CAAC;AAClD,OAAO,KAAK,EACV,aAAa,EACb,WAAW,EAGZ,MAAM,SAAS,CAAC;AACjB,OAAO,KAAK,EAAC,cAAc,EAAC,MAAM,qBAAqB,CAAC;AAcxD,MAAM,WAAW,2BAA2B;IAC1C,aAAa,EAAE,aAAa,CAAC;IAC7B,WAAW,EAAE,WAAW,GAAG,SAAS,CAAC;IACrC,QAAQ,EAAE,CAAC,KAAK,EAAE,WAAW,EAAE,UAAU,CAAC,EAAE,OAAO,KAAK,IAAI,CAAC;IAC7D,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,MAAM,EAAE,cAAc,CAAC;IACvB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AA4jBD,wBAAgB,sBAAsB,CAAC,EACrC,aAAa,EACb,WAAW,EACX,QAAQ,EACR,OAAO,EACP,UAAU,GACX,EAAE,2BAA2B,4BA0H7B"}
|
|
@@ -20,7 +20,6 @@ import { TimeInput } from "../TimeInput/index.js";
|
|
|
20
20
|
import { Selector } from "../Selector/index.js";
|
|
21
21
|
import { Tokenizer } from "../Tokenizer/index.js";
|
|
22
22
|
import { Typeahead } from "../Typeahead/index.js";
|
|
23
|
-
import { useTranslator } from "../i18n/index.js";
|
|
24
23
|
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
25
24
|
// =============================================================================
|
|
26
25
|
// Helpers
|
|
@@ -54,7 +53,6 @@ function StringEditor({
|
|
|
54
53
|
onChange,
|
|
55
54
|
onEnter: _onEnter
|
|
56
55
|
}) {
|
|
57
|
-
const t = useTranslator();
|
|
58
56
|
const currentValue = filterValue?.type === 'string' ? filterValue.value : '';
|
|
59
57
|
|
|
60
58
|
// When a searchSource is provided, render a typeahead instead of a plain
|
|
@@ -65,7 +63,7 @@ function StringEditor({
|
|
|
65
63
|
label: currentValue
|
|
66
64
|
} : null;
|
|
67
65
|
return /*#__PURE__*/_jsx(Typeahead, {
|
|
68
|
-
label:
|
|
66
|
+
label: "Value",
|
|
69
67
|
isLabelHidden: true,
|
|
70
68
|
searchSource: operatorValue.searchSource,
|
|
71
69
|
value: selectedItem,
|
|
@@ -82,15 +80,15 @@ function StringEditor({
|
|
|
82
80
|
});
|
|
83
81
|
}
|
|
84
82
|
},
|
|
85
|
-
placeholder:
|
|
83
|
+
placeholder: "Search...",
|
|
86
84
|
debounceMs: 150
|
|
87
85
|
});
|
|
88
86
|
}
|
|
89
87
|
return /*#__PURE__*/_jsx(TextInput, {
|
|
90
|
-
label:
|
|
88
|
+
label: "Value",
|
|
91
89
|
isLabelHidden: true,
|
|
92
90
|
value: currentValue,
|
|
93
|
-
placeholder:
|
|
91
|
+
placeholder: "Enter value...",
|
|
94
92
|
onChange: value => {
|
|
95
93
|
onChange({
|
|
96
94
|
type: 'string',
|
|
@@ -104,7 +102,6 @@ function StringListEditor({
|
|
|
104
102
|
filterValue,
|
|
105
103
|
onChange
|
|
106
104
|
}) {
|
|
107
|
-
const t = useTranslator();
|
|
108
105
|
const currentValue = useMemo(() => {
|
|
109
106
|
if (filterValue?.type !== 'string_list') {
|
|
110
107
|
return [];
|
|
@@ -129,7 +126,7 @@ function StringListEditor({
|
|
|
129
126
|
// or when isArbitraryStringAllowed is explicitly set (#1107).
|
|
130
127
|
const hasCreate = operatorValue.isArbitraryStringAllowed || !operatorValue.searchSource;
|
|
131
128
|
return /*#__PURE__*/_jsx(Tokenizer, {
|
|
132
|
-
label:
|
|
129
|
+
label: "Values",
|
|
133
130
|
isLabelHidden: true,
|
|
134
131
|
searchSource: source,
|
|
135
132
|
value: currentValue,
|
|
@@ -139,7 +136,7 @@ function StringListEditor({
|
|
|
139
136
|
value: items.map(item => item.label)
|
|
140
137
|
});
|
|
141
138
|
},
|
|
142
|
-
placeholder:
|
|
139
|
+
placeholder: "Add values...",
|
|
143
140
|
debounceMs: operatorValue.searchSource ? 150 : 0,
|
|
144
141
|
hasCreate: hasCreate
|
|
145
142
|
});
|
|
@@ -149,10 +146,9 @@ function IntegerEditor({
|
|
|
149
146
|
filterValue,
|
|
150
147
|
onChange
|
|
151
148
|
}) {
|
|
152
|
-
const t = useTranslator();
|
|
153
149
|
const currentValue = filterValue?.type === 'integer' ? filterValue.value : undefined;
|
|
154
150
|
return /*#__PURE__*/_jsx(NumberInput, {
|
|
155
|
-
label:
|
|
151
|
+
label: "Value",
|
|
156
152
|
isLabelHidden: true,
|
|
157
153
|
value: currentValue ?? null,
|
|
158
154
|
onChange: value => {
|
|
@@ -165,7 +161,7 @@ function IntegerEditor({
|
|
|
165
161
|
max: operatorValue.maxValue,
|
|
166
162
|
units: operatorValue.units,
|
|
167
163
|
isIntegerOnly: true,
|
|
168
|
-
placeholder:
|
|
164
|
+
placeholder: "Enter number..."
|
|
169
165
|
});
|
|
170
166
|
}
|
|
171
167
|
function FloatEditor({
|
|
@@ -173,10 +169,9 @@ function FloatEditor({
|
|
|
173
169
|
filterValue,
|
|
174
170
|
onChange
|
|
175
171
|
}) {
|
|
176
|
-
const t = useTranslator();
|
|
177
172
|
const currentValue = filterValue?.type === 'float' ? filterValue.value : undefined;
|
|
178
173
|
return /*#__PURE__*/_jsx(NumberInput, {
|
|
179
|
-
label:
|
|
174
|
+
label: "Value",
|
|
180
175
|
isLabelHidden: true,
|
|
181
176
|
value: currentValue ?? null,
|
|
182
177
|
onChange: value => {
|
|
@@ -188,7 +183,7 @@ function FloatEditor({
|
|
|
188
183
|
min: operatorValue.minValue,
|
|
189
184
|
max: operatorValue.maxValue,
|
|
190
185
|
units: operatorValue.units,
|
|
191
|
-
placeholder:
|
|
186
|
+
placeholder: "Enter number..."
|
|
192
187
|
});
|
|
193
188
|
}
|
|
194
189
|
function TimeEditor({
|
|
@@ -196,10 +191,9 @@ function TimeEditor({
|
|
|
196
191
|
filterValue,
|
|
197
192
|
onChange
|
|
198
193
|
}) {
|
|
199
|
-
const t = useTranslator();
|
|
200
194
|
const currentValue = filterValue?.type === 'time' ? filterValue.value : undefined;
|
|
201
195
|
return /*#__PURE__*/_jsx(TimeInput, {
|
|
202
|
-
label:
|
|
196
|
+
label: "Time",
|
|
203
197
|
isLabelHidden: true,
|
|
204
198
|
value: currentValue,
|
|
205
199
|
onChange: value => {
|
|
@@ -218,7 +212,6 @@ function DateAbsoluteEditor({
|
|
|
218
212
|
filterValue,
|
|
219
213
|
onChange
|
|
220
214
|
}) {
|
|
221
|
-
const t = useTranslator();
|
|
222
215
|
// Convert unixSeconds to ISO date string for the date input
|
|
223
216
|
const currentValue = useMemo(() => {
|
|
224
217
|
if (filterValue?.type !== 'date_absolute') {
|
|
@@ -228,7 +221,7 @@ function DateAbsoluteEditor({
|
|
|
228
221
|
return date.toISOString().split('T')[0];
|
|
229
222
|
}, [filterValue]);
|
|
230
223
|
return /*#__PURE__*/_jsx(DateInput, {
|
|
231
|
-
label:
|
|
224
|
+
label: "Date",
|
|
232
225
|
isLabelHidden: true,
|
|
233
226
|
value: currentValue,
|
|
234
227
|
onChange: value => {
|
|
@@ -247,7 +240,6 @@ function DateRelativeEditor({
|
|
|
247
240
|
filterValue,
|
|
248
241
|
onChange
|
|
249
242
|
}) {
|
|
250
|
-
const t = useTranslator();
|
|
251
243
|
const currentValue = filterValue?.type === 'date_relative' ? filterValue.value : undefined;
|
|
252
244
|
const options = useMemo(() => {
|
|
253
245
|
const result = [];
|
|
@@ -284,7 +276,7 @@ function DateRelativeEditor({
|
|
|
284
276
|
return result;
|
|
285
277
|
}, [operatorValue.isPastAllowed, operatorValue.isFutureAllowed]);
|
|
286
278
|
return /*#__PURE__*/_jsx(Selector, {
|
|
287
|
-
label:
|
|
279
|
+
label: "Relative date",
|
|
288
280
|
isLabelHidden: true,
|
|
289
281
|
options: options,
|
|
290
282
|
value: currentValue,
|
|
@@ -300,7 +292,6 @@ function DateRangeEditor({
|
|
|
300
292
|
filterValue,
|
|
301
293
|
onChange
|
|
302
294
|
}) {
|
|
303
|
-
const t = useTranslator();
|
|
304
295
|
const startValue = useMemo(() => {
|
|
305
296
|
if (filterValue?.type !== 'date_range') {
|
|
306
297
|
return undefined;
|
|
@@ -355,12 +346,12 @@ function DateRangeEditor({
|
|
|
355
346
|
}, [filterValue, onChange]);
|
|
356
347
|
return /*#__PURE__*/_jsxs(_Fragment, {
|
|
357
348
|
children: [/*#__PURE__*/_jsx(DateInput, {
|
|
358
|
-
label:
|
|
349
|
+
label: "Start date",
|
|
359
350
|
isLabelHidden: true,
|
|
360
351
|
value: startValue,
|
|
361
352
|
onChange: handleStartChange
|
|
362
353
|
}), /*#__PURE__*/_jsx(DateInput, {
|
|
363
|
-
label:
|
|
354
|
+
label: "End date",
|
|
364
355
|
isLabelHidden: true,
|
|
365
356
|
value: endValue,
|
|
366
357
|
onChange: handleEndChange
|
|
@@ -372,14 +363,13 @@ function EnumEditor({
|
|
|
372
363
|
filterValue,
|
|
373
364
|
onChange
|
|
374
365
|
}) {
|
|
375
|
-
const t = useTranslator();
|
|
376
366
|
const currentValue = filterValue?.type === 'enum' ? filterValue.value : undefined;
|
|
377
367
|
const options = useMemo(() => operatorValue.values.map(item => ({
|
|
378
368
|
value: item.value,
|
|
379
369
|
label: item.label
|
|
380
370
|
})), [operatorValue.values]);
|
|
381
371
|
return /*#__PURE__*/_jsx(Selector, {
|
|
382
|
-
label:
|
|
372
|
+
label: "Value",
|
|
383
373
|
isLabelHidden: true,
|
|
384
374
|
options: options,
|
|
385
375
|
value: currentValue,
|
|
@@ -396,7 +386,6 @@ function EnumListEditor({
|
|
|
396
386
|
filterValue,
|
|
397
387
|
onChange
|
|
398
388
|
}) {
|
|
399
|
-
const t = useTranslator();
|
|
400
389
|
const items = useMemo(() => enumItemsToSearchableItems(operatorValue.values), [operatorValue.values]);
|
|
401
390
|
const source = useMemo(() => createStaticSource(items), [items]);
|
|
402
391
|
const currentValue = useMemo(() => {
|
|
@@ -412,7 +401,7 @@ function EnumListEditor({
|
|
|
412
401
|
});
|
|
413
402
|
}, [filterValue, operatorValue.values]);
|
|
414
403
|
return /*#__PURE__*/_jsx(Tokenizer, {
|
|
415
|
-
label:
|
|
404
|
+
label: "Values",
|
|
416
405
|
isLabelHidden: true,
|
|
417
406
|
searchSource: source,
|
|
418
407
|
value: currentValue,
|
|
@@ -422,7 +411,7 @@ function EnumListEditor({
|
|
|
422
411
|
value: selectedItems.map(item => item.id)
|
|
423
412
|
});
|
|
424
413
|
},
|
|
425
|
-
placeholder:
|
|
414
|
+
placeholder: "Select values...",
|
|
426
415
|
hasEntriesOnFocus: true,
|
|
427
416
|
debounceMs: 0
|
|
428
417
|
});
|
|
@@ -432,7 +421,6 @@ function EntityListEditor({
|
|
|
432
421
|
filterValue,
|
|
433
422
|
onChange
|
|
434
423
|
}) {
|
|
435
|
-
const t = useTranslator();
|
|
436
424
|
const source = useMemo(() => {
|
|
437
425
|
if (operatorValue.searchSource) {
|
|
438
426
|
return operatorValue.searchSource;
|
|
@@ -457,7 +445,7 @@ function EntityListEditor({
|
|
|
457
445
|
}));
|
|
458
446
|
}, [filterValue]);
|
|
459
447
|
return /*#__PURE__*/_jsx(Tokenizer, {
|
|
460
|
-
label:
|
|
448
|
+
label: "Entities",
|
|
461
449
|
isLabelHidden: true,
|
|
462
450
|
searchSource: source,
|
|
463
451
|
value: currentValue,
|
|
@@ -478,7 +466,7 @@ function EntityListEditor({
|
|
|
478
466
|
});
|
|
479
467
|
},
|
|
480
468
|
renderItem: operatorValue.renderItem,
|
|
481
|
-
placeholder:
|
|
469
|
+
placeholder: "Search...",
|
|
482
470
|
debounceMs: operatorValue.searchSource ? 150 : 0
|
|
483
471
|
});
|
|
484
472
|
}
|
|
@@ -488,7 +476,6 @@ function CustomEditor({
|
|
|
488
476
|
onChange,
|
|
489
477
|
isDisabled
|
|
490
478
|
}) {
|
|
491
|
-
const t = useTranslator();
|
|
492
479
|
const currentValue = filterValue?.type === 'custom' ? filterValue.value : null;
|
|
493
480
|
const EditorComponent = operatorValue.Editor;
|
|
494
481
|
return /*#__PURE__*/_jsx(EditorComponent, {
|
|
@@ -501,7 +488,7 @@ function CustomEditor({
|
|
|
501
488
|
});
|
|
502
489
|
}
|
|
503
490
|
},
|
|
504
|
-
placeholder:
|
|
491
|
+
placeholder: "Enter value...",
|
|
505
492
|
value: currentValue
|
|
506
493
|
});
|
|
507
494
|
}
|
|
@@ -9,6 +9,5 @@
|
|
|
9
9
|
*/
|
|
10
10
|
import type { OperatorValue, FilterValue } from './types';
|
|
11
11
|
import type { InternalConfig } from './useInternalConfig';
|
|
12
|
-
|
|
13
|
-
export declare function formatFilterValue(_config: InternalConfig, operatorValue: OperatorValue, filterValue: FilterValue, maxLength: number, t: TranslatorFn, timezoneID?: string): string;
|
|
12
|
+
export declare function formatFilterValue(_config: InternalConfig, operatorValue: OperatorValue, filterValue: FilterValue, maxLength: number, timezoneID?: string): string;
|
|
14
13
|
//# sourceMappingURL=formatFilterValue.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"formatFilterValue.d.ts","sourceRoot":"","sources":["../../src/PowerSearch/formatFilterValue.ts"],"names":[],"mappings":"AAEA;;;;;;;;GAQG;AAEH,OAAO,KAAK,EAAC,aAAa,EAAE,WAAW,EAAW,MAAM,SAAS,CAAC;AAClE,OAAO,KAAK,EAAC,cAAc,EAAC,MAAM,qBAAqB,CAAC;
|
|
1
|
+
{"version":3,"file":"formatFilterValue.d.ts","sourceRoot":"","sources":["../../src/PowerSearch/formatFilterValue.ts"],"names":[],"mappings":"AAEA;;;;;;;;GAQG;AAEH,OAAO,KAAK,EAAC,aAAa,EAAE,WAAW,EAAW,MAAM,SAAS,CAAC;AAClE,OAAO,KAAK,EAAC,cAAc,EAAC,MAAM,qBAAqB,CAAC;AA2CxD,wBAAgB,iBAAiB,CAC/B,OAAO,EAAE,cAAc,EACvB,aAAa,EAAE,aAAa,EAC5B,WAAW,EAAE,WAAW,EACxB,SAAS,EAAE,MAAM,EACjB,UAAU,CAAC,EAAE,MAAM,GAClB,MAAM,CA8GR"}
|