@astryxdesign/core 0.7.7-canary.c0929c8 → 0.7.7-canary.c19ca12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/AlertDialog/AlertDialog.d.ts +4 -1
- package/dist/AlertDialog/AlertDialog.d.ts.map +1 -1
- package/dist/AlertDialog/AlertDialog.js +36 -6
- package/dist/AppShell/useCloseMobileDrawerOnActivate.d.ts +13 -0
- package/dist/AppShell/useCloseMobileDrawerOnActivate.d.ts.map +1 -0
- package/dist/AppShell/useCloseMobileDrawerOnActivate.js +45 -0
- package/dist/BottomSheet/BottomSheet.d.ts.map +1 -1
- package/dist/BottomSheet/BottomSheet.js +79 -9
- package/dist/BottomSheet/BottomSheetPanel.d.ts.map +1 -1
- package/dist/BottomSheet/BottomSheetPanel.js +23 -4
- package/dist/BottomSheet/bottomSheetStack.d.ts.map +1 -1
- package/dist/BottomSheet/bottomSheetStack.js +5 -4
- package/dist/BottomSheet/useSheetGestures.d.ts.map +1 -1
- package/dist/BottomSheet/useSheetGestures.js +3 -1
- package/dist/Breadcrumbs/BreadcrumbItem.d.ts +2 -1
- package/dist/Breadcrumbs/BreadcrumbItem.d.ts.map +1 -1
- package/dist/Breadcrumbs/BreadcrumbItem.js +7 -3
- package/dist/Button/Button.d.ts.map +1 -1
- package/dist/Button/Button.js +47 -3
- package/dist/CheckboxInput/CheckboxInput.d.ts.map +1 -1
- package/dist/CheckboxInput/CheckboxInput.js +13 -2
- package/dist/CheckboxList/CheckboxList.d.ts.map +1 -1
- package/dist/CheckboxList/CheckboxList.js +7 -1
- package/dist/CheckboxList/CheckboxListContext.d.ts +6 -0
- package/dist/CheckboxList/CheckboxListContext.d.ts.map +1 -1
- package/dist/CheckboxList/CheckboxListItem.d.ts.map +1 -1
- package/dist/CheckboxList/CheckboxListItem.js +10 -2
- package/dist/ComplexSelector/ComplexSelector.d.ts +4 -1
- package/dist/ComplexSelector/ComplexSelector.d.ts.map +1 -1
- package/dist/ComplexSelector/ComplexSelector.js +14 -4
- package/dist/ContextMenu/ContextMenu.js +2 -2
- package/dist/DateInput/DateInput.d.ts.map +1 -1
- package/dist/DateInput/DateInput.js +5 -2
- package/dist/DateInput/MonthScroller.d.ts.map +1 -1
- package/dist/DateInput/MonthScroller.js +13 -27
- package/dist/DateInput/Wheel.d.ts.map +1 -1
- package/dist/DateInput/Wheel.js +22 -41
- package/dist/DateTimeInput/DateTimeInput.d.ts.map +1 -1
- package/dist/DateTimeInput/DateTimeInput.js +5 -2
- package/dist/Dialog/Dialog.d.ts.map +1 -1
- package/dist/Dialog/Dialog.js +23 -45
- package/dist/Drawer/Drawer.d.ts.map +1 -1
- package/dist/Drawer/Drawer.js +15 -11
- package/dist/Drawer/useDrawerDialogPresence.d.ts.map +1 -1
- package/dist/Drawer/useDrawerDialogPresence.js +5 -1
- package/dist/Field/Field.js +2 -2
- package/dist/Field/PanelSearchInput.d.ts +9 -1
- package/dist/Field/PanelSearchInput.d.ts.map +1 -1
- package/dist/Field/PanelSearchInput.js +3 -1
- package/dist/HoverCard/HoverCard.d.ts +4 -3
- package/dist/HoverCard/HoverCard.d.ts.map +1 -1
- package/dist/HoverCard/HoverCard.js +27 -2
- package/dist/HoverCard/useHoverCard.d.ts +5 -4
- package/dist/HoverCard/useHoverCard.d.ts.map +1 -1
- package/dist/HoverCard/useHoverCard.js +17 -31
- package/dist/Icon/Icon.d.ts +5 -1
- package/dist/Icon/Icon.d.ts.map +1 -1
- package/dist/Icon/Icon.js +5 -2
- package/dist/InfoTip/InfoTip.d.ts +63 -0
- package/dist/InfoTip/InfoTip.d.ts.map +1 -0
- package/dist/InfoTip/InfoTip.js +126 -0
- package/dist/InfoTip/index.d.ts +10 -0
- package/dist/InfoTip/index.d.ts.map +1 -0
- package/dist/InfoTip/index.js +12 -0
- package/dist/Layer/layerAnimations.stylex.d.ts +7 -8
- package/dist/Layer/layerAnimations.stylex.d.ts.map +1 -1
- package/dist/Layer/layerAnimations.stylex.js +25 -20
- package/dist/Layer/useBackdropPress.d.ts +27 -0
- package/dist/Layer/useBackdropPress.d.ts.map +1 -0
- package/dist/Layer/useBackdropPress.js +53 -0
- package/dist/Layer/usePressPin.d.ts +20 -10
- package/dist/Layer/usePressPin.d.ts.map +1 -1
- package/dist/Layer/usePressPin.js +66 -18
- package/dist/Lightbox/Lightbox.d.ts.map +1 -1
- package/dist/Lightbox/Lightbox.js +18 -0
- package/dist/MobileNav/MobileNav.js +0 -1
- package/dist/MultiSelector/hooks.d.ts.map +1 -1
- package/dist/MultiSelector/hooks.js +2 -4
- package/dist/Outline/Outline.d.ts +2 -4
- package/dist/Outline/Outline.d.ts.map +1 -1
- package/dist/Outline/Outline.js +4 -52
- package/dist/Outline/useOutlineFromMarkdown.d.ts.map +1 -1
- package/dist/Outline/useOutlineFromMarkdown.js +1 -0
- package/dist/Outline/useScrollSpy.js +3 -3
- package/dist/PowerSearch/PowerSearch.d.ts +36 -3
- package/dist/PowerSearch/PowerSearch.d.ts.map +1 -1
- package/dist/PowerSearch/PowerSearch.js +571 -302
- package/dist/PowerSearch/PowerSearchBottomSheet.d.ts +100 -0
- package/dist/PowerSearch/PowerSearchBottomSheet.d.ts.map +1 -0
- package/dist/PowerSearch/PowerSearchBottomSheet.js +1913 -0
- package/dist/PowerSearch/PowerSearchEditPopover.d.ts +32 -1
- package/dist/PowerSearch/PowerSearchEditPopover.d.ts.map +1 -1
- package/dist/PowerSearch/PowerSearchEditPopover.js +17 -6
- package/dist/PowerSearch/PowerSearchValueEditor.d.ts +38 -3
- package/dist/PowerSearch/PowerSearchValueEditor.d.ts.map +1 -1
- package/dist/PowerSearch/PowerSearchValueEditor.js +170 -61
- package/dist/PowerSearch/formatFilterValue.d.ts +7 -0
- package/dist/PowerSearch/formatFilterValue.d.ts.map +1 -1
- package/dist/PowerSearch/formatFilterValue.js +11 -1
- package/dist/PowerSearch/formatTokenValue.d.ts +28 -0
- package/dist/PowerSearch/formatTokenValue.d.ts.map +1 -0
- package/dist/PowerSearch/formatTokenValue.js +160 -0
- package/dist/PowerSearch/powerSearchSheetUtils.d.ts +65 -0
- package/dist/PowerSearch/powerSearchSheetUtils.d.ts.map +1 -0
- package/dist/PowerSearch/powerSearchSheetUtils.js +168 -0
- package/dist/RadioList/RadioList.d.ts.map +1 -1
- package/dist/RadioList/RadioList.js +8 -2
- package/dist/RadioList/RadioListItem.d.ts +1 -1
- package/dist/RadioList/RadioListItem.d.ts.map +1 -1
- package/dist/RadioList/RadioListItem.js +5 -3
- package/dist/Resizable/ResizeHandle.d.ts.map +1 -1
- package/dist/Resizable/ResizeHandle.js +118 -260
- package/dist/Resizable/resizeGesture.d.ts +91 -0
- package/dist/Resizable/resizeGesture.d.ts.map +1 -0
- package/dist/Resizable/resizeGesture.js +251 -0
- package/dist/SegmentedControl/SegmentedControl.d.ts +3 -1
- package/dist/SegmentedControl/SegmentedControl.d.ts.map +1 -1
- package/dist/SegmentedControl/SegmentedControl.js +115 -8
- package/dist/SegmentedControl/SegmentedControlContext.d.ts +6 -0
- package/dist/SegmentedControl/SegmentedControlContext.d.ts.map +1 -1
- package/dist/SegmentedControl/SegmentedControlItem.d.ts +1 -0
- package/dist/SegmentedControl/SegmentedControlItem.d.ts.map +1 -1
- package/dist/SegmentedControl/SegmentedControlItem.js +8 -1
- package/dist/SegmentedControl/useSegmentedSelectionMotion.d.ts +357 -0
- package/dist/SegmentedControl/useSegmentedSelectionMotion.d.ts.map +1 -0
- package/dist/SegmentedControl/useSegmentedSelectionMotion.js +1349 -0
- package/dist/SegmentedControl/useSegmentedTouchTracking.d.ts +70 -0
- package/dist/SegmentedControl/useSegmentedTouchTracking.d.ts.map +1 -0
- package/dist/SegmentedControl/useSegmentedTouchTracking.js +264 -0
- package/dist/Selector/Selector.d.ts.map +1 -1
- package/dist/Selector/Selector.js +96 -67
- package/dist/Selector/optionShape.d.ts +24 -0
- package/dist/Selector/optionShape.d.ts.map +1 -0
- package/dist/Selector/optionShape.js +48 -0
- package/dist/Selector/selectableOptionEntries.d.ts +20 -0
- package/dist/Selector/selectableOptionEntries.d.ts.map +1 -0
- package/dist/Selector/selectableOptionEntries.js +38 -0
- package/dist/Selector/utils.d.ts +2 -17
- package/dist/Selector/utils.d.ts.map +1 -1
- package/dist/Selector/utils.js +3 -51
- package/dist/SideNav/SideNavItem.d.ts.map +1 -1
- package/dist/SideNav/SideNavItem.js +3 -9
- package/dist/Slider/sliderTouchController.js +2 -2
- package/dist/Spinner/Spinner.d.ts +1 -1
- package/dist/Spinner/Spinner.d.ts.map +1 -1
- package/dist/Spinner/Spinner.js +60 -58
- package/dist/Switch/switchTouch.d.ts +0 -7
- package/dist/Switch/switchTouch.d.ts.map +1 -1
- package/dist/Switch/switchTouch.js +2 -10
- package/dist/Switch/useSwitchTouch.d.ts +2 -11
- package/dist/Switch/useSwitchTouch.d.ts.map +1 -1
- package/dist/Switch/useSwitchTouch.js +35 -93
- package/dist/Table/BaseTable.d.ts.map +1 -1
- package/dist/Table/BaseTable.js +29 -8
- package/dist/TextInput/TextInput.d.ts +2 -2
- package/dist/TextInput/TextInput.d.ts.map +1 -1
- package/dist/TextInput/TextInput.js +10 -7
- package/dist/Toast/Toast.d.ts +11 -1
- package/dist/Toast/Toast.d.ts.map +1 -1
- package/dist/Toast/Toast.js +30 -15
- package/dist/Toast/ToastViewport.d.ts.map +1 -1
- package/dist/Toast/ToastViewport.js +94 -34
- package/dist/Toast/types.d.ts +9 -3
- package/dist/Toast/types.d.ts.map +1 -1
- package/dist/Token/Token.d.ts +2 -2
- package/dist/Token/Token.d.ts.map +1 -1
- package/dist/Token/Token.js +13 -4
- package/dist/Token/TokenNamingContext.d.ts +14 -0
- package/dist/Token/TokenNamingContext.d.ts.map +1 -0
- package/dist/Token/TokenNamingContext.js +23 -0
- package/dist/Tokenizer/Tokenizer.d.ts +46 -59
- package/dist/Tokenizer/Tokenizer.d.ts.map +1 -1
- package/dist/Tokenizer/Tokenizer.js +40 -57
- package/dist/Tokenizer/TokenizerBottomSheet.d.ts +25 -28
- package/dist/Tokenizer/TokenizerBottomSheet.d.ts.map +1 -1
- package/dist/Tokenizer/TokenizerBottomSheet.js +157 -54
- package/dist/Tokenizer/TokenizerItemRemovableContext.d.ts +3 -0
- package/dist/Tokenizer/TokenizerItemRemovableContext.d.ts.map +1 -0
- package/dist/Tokenizer/TokenizerItemRemovableContext.js +19 -0
- package/dist/Tooltip/Tooltip.d.ts +25 -30
- package/dist/Tooltip/Tooltip.d.ts.map +1 -1
- package/dist/Tooltip/Tooltip.js +24 -5
- package/dist/Tooltip/index.d.ts +1 -1
- package/dist/Tooltip/index.d.ts.map +1 -1
- package/dist/Tooltip/useTooltip.d.ts +45 -28
- package/dist/Tooltip/useTooltip.d.ts.map +1 -1
- package/dist/Tooltip/useTooltip.js +52 -59
- package/dist/TopNav/TopNavItem.d.ts.map +1 -1
- package/dist/TopNav/TopNavItem.js +4 -7
- package/dist/TopNav/TopNavMegaMenuItem.d.ts.map +1 -1
- package/dist/TopNav/TopNavMegaMenuItem.js +4 -7
- package/dist/TopNav/TopNavMenu.d.ts.map +1 -1
- package/dist/TopNav/TopNavMenu.js +4 -7
- package/dist/Typeahead/TypeaheadItem.d.ts +2 -1
- package/dist/Typeahead/TypeaheadItem.d.ts.map +1 -1
- package/dist/animator/createAnimator.d.ts +98 -0
- package/dist/animator/createAnimator.d.ts.map +1 -0
- package/dist/animator/createAnimator.js +259 -0
- package/dist/astryx.css +96 -7
- package/dist/gestures/GestureHost.d.ts +27 -1
- package/dist/gestures/GestureHost.d.ts.map +1 -1
- package/dist/gestures/GestureHost.js +157 -21
- package/dist/gestures/PressTracker.d.ts.map +1 -1
- package/dist/gestures/PressTracker.js +4 -3
- package/dist/hooks/actionGroupTracker.d.ts +7 -4
- package/dist/hooks/actionGroupTracker.d.ts.map +1 -1
- package/dist/hooks/actionGroupTracker.js +19 -56
- package/dist/hooks/index.d.ts +1 -0
- package/dist/hooks/index.d.ts.map +1 -1
- package/dist/hooks/index.js +1 -0
- package/dist/hooks/pressGroupContext.d.ts +6 -0
- package/dist/hooks/pressGroupContext.d.ts.map +1 -0
- package/dist/hooks/pressGroupContext.js +20 -0
- package/dist/hooks/useActionGroupTracking.d.ts +53 -0
- package/dist/hooks/useActionGroupTracking.d.ts.map +1 -0
- package/dist/hooks/useActionGroupTracking.js +174 -0
- package/dist/hooks/useAnimator.d.ts +41 -0
- package/dist/hooks/useAnimator.d.ts.map +1 -0
- package/dist/hooks/useAnimator.js +70 -0
- package/dist/hooks/useAttachment.d.ts +1 -1
- package/dist/hooks/useAttachment.js +1 -1
- package/dist/hooks/useHighlightedOptionScroll.d.ts +11 -1
- package/dist/hooks/useHighlightedOptionScroll.d.ts.map +1 -1
- package/dist/hooks/useHighlightedOptionScroll.js +112 -11
- package/dist/hooks/useInputStatusIcon.d.ts +1 -1
- package/dist/hooks/useInputStatusIcon.d.ts.map +1 -1
- package/dist/hooks/useInputStatusIcon.js +2 -2
- package/dist/hooks/useLongPress.d.ts +6 -2
- package/dist/hooks/useLongPress.d.ts.map +1 -1
- package/dist/hooks/useLongPress.js +95 -15
- package/dist/hooks/useMediaQuery.d.ts +2 -1
- package/dist/hooks/useMediaQuery.d.ts.map +1 -1
- package/dist/hooks/useMediaQuery.js +7 -4
- package/dist/hooks/useMenuPress.d.ts.map +1 -1
- package/dist/hooks/useMenuPress.js +4 -2
- package/dist/i18n/generated-english/InfoTip/InfoTip.generated.d.ts +8 -0
- package/dist/i18n/generated-english/InfoTip/InfoTip.generated.d.ts.map +1 -0
- package/dist/i18n/generated-english/InfoTip/InfoTip.generated.js +12 -0
- package/dist/i18n/generated-english/PowerSearch/PowerSearch.generated.d.ts.map +1 -1
- package/dist/i18n/generated-english/PowerSearch/PowerSearch.generated.js +1 -0
- package/dist/i18n/generated-english/PowerSearch/PowerSearchBottomSheet.generated.d.ts +8 -0
- package/dist/i18n/generated-english/PowerSearch/PowerSearchBottomSheet.generated.d.ts.map +1 -0
- package/dist/i18n/generated-english/PowerSearch/PowerSearchBottomSheet.generated.js +42 -0
- package/dist/i18n/generated-english/PowerSearch/PowerSearchValueEditor.generated.d.ts.map +1 -1
- package/dist/i18n/generated-english/PowerSearch/PowerSearchValueEditor.generated.js +6 -0
- package/dist/i18n/generated-english/PowerSearch/formatTokenValue.generated.d.ts +8 -0
- package/dist/i18n/generated-english/PowerSearch/formatTokenValue.generated.d.ts.map +1 -0
- package/dist/i18n/generated-english/PowerSearch/formatTokenValue.generated.js +14 -0
- package/dist/i18n/generated-english/Tokenizer/TokenizerBottomSheet.generated.d.ts.map +1 -1
- package/dist/i18n/generated-english/Tokenizer/TokenizerBottomSheet.generated.js +7 -1
- package/dist/i18n/generated-locales/en.generated.d.ts.map +1 -1
- package/dist/i18n/generated-locales/en.generated.js +33 -1
- package/dist/i18n/generated-locales/pseudo.generated.d.ts.map +1 -1
- package/dist/i18n/generated-locales/pseudo.generated.js +33 -1
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +5 -0
- package/dist/internal/SheetConfirmation.d.ts +11 -0
- package/dist/internal/SheetConfirmation.d.ts.map +1 -0
- package/dist/internal/SheetConfirmation.js +92 -0
- package/dist/internal/indicatorPress.stylex.d.ts +20 -0
- package/dist/internal/indicatorPress.stylex.d.ts.map +1 -0
- package/dist/internal/indicatorPress.stylex.js +26 -0
- package/dist/internal/sheetDraft.d.ts +35 -0
- package/dist/internal/sheetDraft.d.ts.map +1 -0
- package/dist/internal/sheetDraft.js +65 -0
- package/dist/internal/touch-sheet.d.ts +21 -0
- package/dist/internal/touch-sheet.d.ts.map +1 -0
- package/dist/internal/touch-sheet.js +19 -0
- package/dist/internal/useDismissSearchOnTouchDrag.d.ts +24 -0
- package/dist/internal/useDismissSearchOnTouchDrag.d.ts.map +1 -0
- package/dist/internal/useDismissSearchOnTouchDrag.js +56 -0
- package/dist/motion/animator.d.ts +14 -14
- package/dist/motion/animator.d.ts.map +1 -1
- package/dist/motion/animator.js +41 -18
- package/dist/motion/reducedMotion.d.ts +24 -0
- package/dist/motion/reducedMotion.d.ts.map +1 -1
- package/dist/motion/reducedMotion.js +78 -1
- package/dist/motion/roles.d.ts +7 -1
- package/dist/motion/roles.d.ts.map +1 -1
- package/dist/motion/roles.js +20 -1
- package/dist/motion/uikit/alert.d.ts +41 -0
- package/dist/motion/uikit/alert.d.ts.map +1 -0
- package/dist/motion/uikit/alert.js +43 -0
- package/dist/motion/uikit/index.d.ts +6 -5
- package/dist/motion/uikit/index.d.ts.map +1 -1
- package/dist/motion/uikit/index.js +6 -5
- package/dist/motion/uikit/segmented.d.ts +55 -0
- package/dist/motion/uikit/segmented.d.ts.map +1 -0
- package/dist/motion/uikit/segmented.js +77 -0
- package/dist/motion/uikit/springs.d.ts +0 -18
- package/dist/motion/uikit/springs.d.ts.map +1 -1
- package/dist/motion/uikit/springs.js +5 -21
- package/dist/privateAttributes/pressGroupItem.stylex.d.ts +15 -0
- package/dist/privateAttributes/pressGroupItem.stylex.d.ts.map +1 -0
- package/dist/privateAttributes/pressGroupItem.stylex.js +23 -0
- package/dist/privateAttributes/segmentTitle.stylex.d.ts +5 -0
- package/dist/privateAttributes/segmentTitle.stylex.d.ts.map +1 -0
- package/dist/privateAttributes/segmentTitle.stylex.js +22 -0
- package/dist/utils/browserClickWait.d.ts +35 -0
- package/dist/utils/browserClickWait.d.ts.map +1 -0
- package/dist/utils/browserClickWait.js +123 -0
- package/dist/utils/clickGuard.d.ts +14 -1
- package/dist/utils/clickGuard.d.ts.map +1 -1
- package/dist/utils/clickGuard.js +46 -1
- package/dist/utils/dateParser.d.ts.map +1 -1
- package/dist/utils/dateParser.js +12 -0
- package/dist/utils/focusReturn.d.ts +15 -0
- package/dist/utils/focusReturn.d.ts.map +1 -1
- package/dist/utils/focusReturn.js +28 -0
- package/dist/utils/interactionOverlay.stylex.d.ts +3 -2
- package/dist/utils/interactionOverlay.stylex.d.ts.map +1 -1
- package/dist/utils/interactionOverlay.stylex.js +3 -2
- package/dist/utils/pressFeedback.d.ts.map +1 -1
- package/dist/utils/pressFeedback.js +19 -6
- package/dist/utils/triggerFocus.d.ts +36 -0
- package/dist/utils/triggerFocus.d.ts.map +1 -0
- package/dist/utils/triggerFocus.js +65 -0
- package/locales/en.json +128 -0
- package/locales/pseudo.json +96 -0
- package/package.json +18 -8
- package/src/AlertDialog/AlertDialog.doc.mjs +2 -2
- package/src/AlertDialog/AlertDialog.tsx +37 -5
- package/src/AppShell/useCloseMobileDrawerOnActivate.ts +52 -0
- package/src/BottomSheet/BottomSheet.tsx +95 -10
- package/src/BottomSheet/BottomSheetPanel.tsx +40 -5
- package/src/BottomSheet/bottomSheetStack.ts +8 -4
- package/src/BottomSheet/useSheetGestures.ts +3 -1
- package/src/Breadcrumbs/BreadcrumbItem.tsx +13 -3
- package/src/Button/Button.tsx +63 -5
- package/src/CheckboxInput/CheckboxInput.doc.mjs +18 -0
- package/src/CheckboxInput/CheckboxInput.tsx +36 -9
- package/src/CheckboxList/CheckboxList.doc.mjs +4 -2
- package/src/CheckboxList/CheckboxList.tsx +6 -0
- package/src/CheckboxList/CheckboxListContext.tsx +6 -0
- package/src/CheckboxList/CheckboxListItem.tsx +11 -2
- package/src/ComplexSelector/ComplexSelector.tsx +20 -5
- package/src/ContextMenu/ContextMenu.tsx +2 -2
- package/src/DateInput/DateInput.tsx +8 -2
- package/src/DateInput/MonthScroller.tsx +18 -22
- package/src/DateInput/Wheel.tsx +30 -32
- package/src/DateTimeInput/DateTimeInput.tsx +8 -2
- package/src/Dialog/Dialog.tsx +54 -45
- package/src/Drawer/Drawer.tsx +28 -11
- package/src/Drawer/useDrawerDialogPresence.ts +5 -1
- package/src/Field/Field.tsx +2 -2
- package/src/Field/PanelSearchInput.tsx +11 -0
- package/src/HoverCard/HoverCard.doc.mjs +4 -2
- package/src/HoverCard/HoverCard.tsx +35 -4
- package/src/HoverCard/useHoverCard.doc.mjs +178 -36
- package/src/HoverCard/useHoverCard.tsx +46 -52
- package/src/Icon/Icon.doc.mjs +49 -8
- package/src/Icon/Icon.tsx +15 -7
- package/src/InfoTip/InfoTip.doc.mjs +192 -0
- package/src/InfoTip/InfoTip.tsx +186 -0
- package/src/InfoTip/index.ts +14 -0
- package/src/Layer/layerAnimations.stylex.ts +24 -16
- package/src/Layer/useBackdropPress.ts +81 -0
- package/src/Layer/usePressPin.ts +86 -26
- package/src/Lightbox/Lightbox.tsx +18 -0
- package/src/MobileNav/MobileNav.tsx +1 -1
- package/src/MultiSelector/hooks.ts +2 -4
- package/src/Outline/Outline.doc.mjs +177 -51
- package/src/Outline/Outline.tsx +5 -57
- package/src/Outline/useOutlineFromMarkdown.doc.mjs +157 -0
- package/src/Outline/useOutlineFromMarkdown.ts +1 -0
- package/src/Outline/useScrollSpy.ts +3 -3
- package/src/PowerSearch/PowerSearch.doc.mjs +55 -6
- package/src/PowerSearch/PowerSearch.tsx +798 -324
- package/src/PowerSearch/PowerSearchBottomSheet.tsx +2515 -0
- package/src/PowerSearch/PowerSearchEditPopover.tsx +28 -6
- package/src/PowerSearch/PowerSearchValueEditor.tsx +203 -38
- package/src/PowerSearch/formatFilterValue.ts +18 -1
- package/src/PowerSearch/formatTokenValue.ts +215 -0
- package/src/PowerSearch/powerSearchSheetUtils.ts +224 -0
- package/src/RadioList/RadioList.doc.mjs +4 -2
- package/src/RadioList/RadioList.tsx +7 -2
- package/src/RadioList/RadioListItem.tsx +5 -3
- package/src/Resizable/ResizeHandle.tsx +133 -328
- package/src/Resizable/resizeGesture.ts +368 -0
- package/src/SegmentedControl/SegmentedControl.doc.mjs +3 -3
- package/src/SegmentedControl/SegmentedControl.tsx +179 -5
- package/src/SegmentedControl/SegmentedControlContext.ts +6 -0
- package/src/SegmentedControl/SegmentedControlItem.tsx +12 -1
- package/src/SegmentedControl/useSegmentedSelectionMotion.ts +1640 -0
- package/src/SegmentedControl/useSegmentedTouchTracking.ts +308 -0
- package/src/Selector/Selector.tsx +136 -89
- package/src/Selector/optionShape.ts +64 -0
- package/src/Selector/selectableOptionEntries.ts +39 -0
- package/src/Selector/utils.ts +9 -68
- package/src/SideNav/SideNavItem.tsx +3 -7
- package/src/Slider/sliderTouchController.ts +2 -2
- package/src/Spinner/Spinner.tsx +77 -63
- package/src/Switch/switchTouch.ts +2 -10
- package/src/Switch/useSwitchTouch.ts +38 -104
- package/src/Table/BaseTable.tsx +46 -12
- package/src/TextInput/TextInput.tsx +11 -10
- package/src/Toast/Toast.doc.mjs +4 -3
- package/src/Toast/Toast.tsx +57 -32
- package/src/Toast/ToastViewport.tsx +121 -35
- package/src/Toast/types.ts +9 -3
- package/src/Token/Token.tsx +15 -4
- package/src/Token/TokenNamingContext.ts +28 -0
- package/src/Tokenizer/Tokenizer.doc.mjs +16 -0
- package/src/Tokenizer/Tokenizer.tsx +89 -85
- package/src/Tokenizer/TokenizerBottomSheet.tsx +219 -93
- package/src/Tokenizer/TokenizerItemRemovableContext.ts +24 -0
- package/src/Tooltip/Tooltip.doc.mjs +123 -54
- package/src/Tooltip/Tooltip.tsx +36 -39
- package/src/Tooltip/index.ts +0 -1
- package/src/Tooltip/useTooltip.doc.mjs +171 -33
- package/src/Tooltip/useTooltip.tsx +98 -86
- package/src/TopNav/TopNavItem.tsx +6 -5
- package/src/TopNav/TopNavMegaMenuItem.tsx +6 -5
- package/src/TopNav/TopNavMenu.tsx +6 -5
- package/src/Typeahead/TypeaheadItem.doc.mjs +6 -3
- package/src/Typeahead/TypeaheadItem.tsx +2 -1
- package/src/animator/createAnimator.doc.mjs +153 -0
- package/src/animator/createAnimator.ts +324 -0
- package/src/gestures/GestureHost.ts +198 -20
- package/src/gestures/PressTracker.ts +4 -3
- package/src/gestures/README.md +7 -1
- package/src/hooks/actionGroupTracker.ts +32 -61
- package/src/hooks/index.ts +2 -0
- package/src/hooks/pressGroupContext.ts +21 -0
- package/src/hooks/useActionGroupTracking.ts +224 -0
- package/src/hooks/useAnimator.doc.mjs +109 -0
- package/src/hooks/useAnimator.ts +67 -0
- package/src/hooks/useAttachment.ts +1 -1
- package/src/hooks/useHighlightedOptionScroll.ts +123 -15
- package/src/hooks/useInputStatusIcon.tsx +3 -2
- package/src/hooks/useLongPress.doc.mjs +2 -2
- package/src/hooks/useLongPress.ts +136 -15
- package/src/hooks/useMediaQuery.doc.mjs +2 -2
- package/src/hooks/useMediaQuery.ts +13 -4
- package/src/hooks/useMenuPress.ts +8 -2
- package/src/i18n/generated-english/InfoTip/InfoTip.generated.ts +13 -0
- package/src/i18n/generated-english/PowerSearch/PowerSearch.generated.ts +1 -0
- package/src/i18n/generated-english/PowerSearch/PowerSearchBottomSheet.generated.ts +43 -0
- package/src/i18n/generated-english/PowerSearch/PowerSearchValueEditor.generated.ts +6 -0
- package/src/i18n/generated-english/PowerSearch/formatTokenValue.generated.ts +15 -0
- package/src/i18n/generated-english/Tokenizer/TokenizerBottomSheet.generated.ts +7 -1
- package/src/i18n/generated-locales/en.generated.ts +43 -0
- package/src/i18n/generated-locales/pseudo.generated.ts +44 -0
- package/src/index.ts +14 -0
- package/src/internal/SheetConfirmation.tsx +101 -0
- package/src/internal/indicatorPress.stylex.ts +24 -0
- package/src/internal/sheetDraft.ts +80 -0
- package/src/internal/touch-sheet.ts +21 -0
- package/src/internal/useDismissSearchOnTouchDrag.ts +69 -0
- package/src/motion/MEASUREMENTS.md +7 -0
- package/src/motion/README.md +9 -5
- package/src/motion/animator.ts +61 -29
- package/src/motion/reducedMotion.ts +79 -1
- package/src/motion/roles.ts +20 -1
- package/src/motion/uikit/alert.ts +43 -0
- package/src/motion/uikit/index.ts +5 -5
- package/src/motion/uikit/segmented.ts +74 -0
- package/src/motion/uikit/springs.ts +5 -21
- package/src/privateAttributes/pressGroupItem.stylex.ts +23 -0
- package/src/privateAttributes/segmentTitle.stylex.ts +22 -0
- package/src/utils/browserClickWait.ts +133 -0
- package/src/utils/clickGuard.ts +64 -1
- package/src/utils/dateParser.ts +16 -0
- package/src/utils/focusReturn.ts +30 -0
- package/src/utils/interactionOverlay.stylex.ts +3 -2
- package/src/utils/pressFeedback.ts +19 -6
- package/src/utils/triggerFocus.ts +80 -0
- package/dist/internal/tokenizer-presentation.d.ts +0 -21
- package/dist/internal/tokenizer-presentation.d.ts.map +0 -1
- package/dist/internal/tokenizer-presentation.js +0 -21
- package/src/internal/tokenizer-presentation.ts +0 -25
|
@@ -1,13 +1,15 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @file PowerSearchEditPopover.tsx
|
|
3
3
|
* @input InternalConfig, PartialFilter
|
|
4
|
-
* @output Edit popover content with field/operator selectors and value editor
|
|
4
|
+
* @output Edit popover content with field/operator selectors and value editor;
|
|
5
|
+
* the built-in NestedEditor the sheet presentation's value step shares
|
|
5
6
|
* @position Sub-component; consumed by PowerSearch
|
|
6
7
|
*
|
|
7
8
|
* SYNC: When modified, update:
|
|
8
9
|
* - /packages/core/src/PowerSearch/index.ts
|
|
9
10
|
*/
|
|
10
11
|
import React from 'react';
|
|
12
|
+
import * as stylex from '@stylexjs/stylex';
|
|
11
13
|
import type { InternalConfig } from './useInternalConfig.js';
|
|
12
14
|
import type { PowerSearchFilter, PartialFilter } from './types.js';
|
|
13
15
|
export interface PowerSearchEditPopoverProps {
|
|
@@ -27,5 +29,34 @@ export interface PowerSearchEditPopoverProps {
|
|
|
27
29
|
/** Whether the filter is read-only. */
|
|
28
30
|
isReadOnly?: boolean;
|
|
29
31
|
}
|
|
32
|
+
export interface NestedEditorProps {
|
|
33
|
+
config: InternalConfig;
|
|
34
|
+
partialFilter: PartialFilter;
|
|
35
|
+
operatorOptions: {
|
|
36
|
+
value: string;
|
|
37
|
+
label: string;
|
|
38
|
+
}[];
|
|
39
|
+
onOperatorChange: (operatorKey: string) => void;
|
|
40
|
+
onPartialFilterChange: (filter: PartialFilter) => void;
|
|
41
|
+
maxMenuItems?: number;
|
|
42
|
+
isReadOnly: boolean;
|
|
43
|
+
/** Styles for the editor's tree root (the sheet makes it a query container). */
|
|
44
|
+
xstyle?: stylex.StyleXStyles;
|
|
45
|
+
/**
|
|
46
|
+
* Whether the tree root offers the group-operator picker when the field has
|
|
47
|
+
* several operators. The popover shows it; the sheet presentation's value
|
|
48
|
+
* step owns the operator choice in its own Operator group and hides it.
|
|
49
|
+
* @default true
|
|
50
|
+
*/
|
|
51
|
+
hasRootOperatorPicker?: boolean;
|
|
52
|
+
}
|
|
53
|
+
/**
|
|
54
|
+
* The built-in editor for a `nested` value: a tree of sub-filters with Add,
|
|
55
|
+
* field/operator/value rows and removal. The popover renders it below its
|
|
56
|
+
* field selector; the sheet presentation's value step renders the same editor
|
|
57
|
+
* in its body, so a `nested` filter is created
|
|
58
|
+
* and edited the same way in both presentations.
|
|
59
|
+
*/
|
|
60
|
+
export declare function NestedEditor({ config, partialFilter, operatorOptions, onOperatorChange, onPartialFilterChange, maxMenuItems, isReadOnly, xstyle, hasRootOperatorPicker, }: NestedEditorProps): React.JSX.Element;
|
|
30
61
|
export declare function PowerSearchEditPopover({ config, filter: initialFilter, mode, onSave, onCancel, saveButtonLabel: saveButtonLabelFromProps, maxMenuItems, isReadOnly, }: PowerSearchEditPopoverProps): React.JSX.Element;
|
|
31
62
|
//# sourceMappingURL=PowerSearchEditPopover.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PowerSearchEditPopover.d.ts","sourceRoot":"","sources":["../../src/PowerSearch/PowerSearchEditPopover.tsx"],"names":[],"mappings":"AAIA
|
|
1
|
+
{"version":3,"file":"PowerSearchEditPopover.d.ts","sourceRoot":"","sources":["../../src/PowerSearch/PowerSearchEditPopover.tsx"],"names":[],"mappings":"AAIA;;;;;;;;;GASG;AAEH,OAAO,KAA0D,MAAM,OAAO,CAAC;AAC/E,OAAO,KAAK,MAAM,MAAM,kBAAkB,CAAC;AAa3C,OAAO,KAAK,EAAC,cAAc,EAAC,MAAM,qBAAqB,CAAC;AACxD,OAAO,KAAK,EACV,iBAAiB,EACjB,aAAa,EAId,MAAM,SAAS,CAAC;AAsEjB,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,6DAA6D;IAC7D,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,uCAAuC;IACvC,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB;AAyQD,MAAM,WAAW,iBAAiB;IAChC,MAAM,EAAE,cAAc,CAAC;IACvB,aAAa,EAAE,aAAa,CAAC;IAC7B,eAAe,EAAE;QAAC,KAAK,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAC,EAAE,CAAC;IAClD,gBAAgB,EAAE,CAAC,WAAW,EAAE,MAAM,KAAK,IAAI,CAAC;IAChD,qBAAqB,EAAE,CAAC,MAAM,EAAE,aAAa,KAAK,IAAI,CAAC;IACvD,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,UAAU,EAAE,OAAO,CAAC;IACpB,gFAAgF;IAChF,MAAM,CAAC,EAAE,MAAM,CAAC,YAAY,CAAC;IAC7B;;;;;OAKG;IACH,qBAAqB,CAAC,EAAE,OAAO,CAAC;CACjC;AAED;;;;;;GAMG;AACH,wBAAgB,YAAY,CAAC,EAC3B,MAAM,EACN,aAAa,EACb,eAAe,EACf,gBAAgB,EAChB,qBAAqB,EACrB,YAAY,EACZ,UAAU,EACV,MAAM,EACN,qBAA4B,GAC7B,EAAE,iBAAiB,qBAwNnB;AA0CD,wBAAgB,sBAAsB,CAAC,EACrC,MAAM,EACN,MAAM,EAAE,aAAa,EACrB,IAAI,EACJ,MAAM,EACN,QAAQ,EACR,eAAe,EAAE,wBAAwB,EACzC,YAAY,EACZ,UAAkB,GACnB,EAAE,2BAA2B,qBAsS7B"}
|
|
@@ -5,7 +5,8 @@
|
|
|
5
5
|
/**
|
|
6
6
|
* @file PowerSearchEditPopover.tsx
|
|
7
7
|
* @input InternalConfig, PartialFilter
|
|
8
|
-
* @output Edit popover content with field/operator selectors and value editor
|
|
8
|
+
* @output Edit popover content with field/operator selectors and value editor;
|
|
9
|
+
* the built-in NestedEditor the sheet presentation's value step shares
|
|
9
10
|
* @position Sub-component; consumed by PowerSearch
|
|
10
11
|
*
|
|
11
12
|
* SYNC: When modified, update:
|
|
@@ -241,14 +242,23 @@ function NestedSubFilterRow({
|
|
|
241
242
|
// Nested editor
|
|
242
243
|
// =============================================================================
|
|
243
244
|
|
|
244
|
-
|
|
245
|
+
/**
|
|
246
|
+
* The built-in editor for a `nested` value: a tree of sub-filters with Add,
|
|
247
|
+
* field/operator/value rows and removal. The popover renders it below its
|
|
248
|
+
* field selector; the sheet presentation's value step renders the same editor
|
|
249
|
+
* in its body, so a `nested` filter is created
|
|
250
|
+
* and edited the same way in both presentations.
|
|
251
|
+
*/
|
|
252
|
+
export function NestedEditor({
|
|
245
253
|
config,
|
|
246
254
|
partialFilter,
|
|
247
255
|
operatorOptions,
|
|
248
256
|
onOperatorChange,
|
|
249
257
|
onPartialFilterChange,
|
|
250
258
|
maxMenuItems,
|
|
251
|
-
isReadOnly
|
|
259
|
+
isReadOnly,
|
|
260
|
+
xstyle,
|
|
261
|
+
hasRootOperatorPicker = true
|
|
252
262
|
}) {
|
|
253
263
|
const t = useComponentTranslator();
|
|
254
264
|
const [subFilters, setSubFilters] = useState(() => {
|
|
@@ -390,7 +400,7 @@ function NestedEditor({
|
|
|
390
400
|
...{
|
|
391
401
|
className: "xcr08ib"
|
|
392
402
|
},
|
|
393
|
-
children: operatorOptions.length > 1 ? /*#__PURE__*/_jsx("div", {
|
|
403
|
+
children: hasRootOperatorPicker && operatorOptions.length > 1 ? /*#__PURE__*/_jsx("div", {
|
|
394
404
|
...{
|
|
395
405
|
className: "x1iyjqo2 x2lah0s x193iq5w"
|
|
396
406
|
},
|
|
@@ -403,7 +413,7 @@ function NestedEditor({
|
|
|
403
413
|
isDisabled: isReadOnly,
|
|
404
414
|
size: "md"
|
|
405
415
|
})
|
|
406
|
-
}) : operatorOptions[0]?.label ?? t('@astryx.powersearch.editor.group')
|
|
416
|
+
}) : operatorOptions.find(option => option.value === partialFilter.operator)?.label ?? operatorOptions[0]?.label ?? t('@astryx.powersearch.editor.group')
|
|
407
417
|
});
|
|
408
418
|
const items = [{
|
|
409
419
|
id: 'nested-root',
|
|
@@ -413,7 +423,8 @@ function NestedEditor({
|
|
|
413
423
|
}];
|
|
414
424
|
return /*#__PURE__*/_jsx(TreeList, {
|
|
415
425
|
items: items,
|
|
416
|
-
density: "balanced"
|
|
426
|
+
density: "balanced",
|
|
427
|
+
xstyle: xstyle
|
|
417
428
|
});
|
|
418
429
|
}
|
|
419
430
|
|
|
@@ -1,8 +1,11 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @file PowerSearchValueEditor.tsx
|
|
3
|
-
* @input OperatorValue, FilterValue, onChange callback
|
|
3
|
+
* @input OperatorValue, FilterValue, onChange callback, and the presentation
|
|
4
|
+
* the editor renders in
|
|
4
5
|
* @output Renders the appropriate editor for a filter value type
|
|
5
|
-
* @position Sub-component; consumed by PowerSearchEditPopover
|
|
6
|
+
* @position Sub-component; consumed by PowerSearchEditPopover (popover
|
|
7
|
+
* presentation) and PowerSearchBottomSheet (sheet presentation, which
|
|
8
|
+
* renders the closed vocabularies as rows itself)
|
|
6
9
|
*
|
|
7
10
|
* SYNC: When modified, update:
|
|
8
11
|
* - /packages/core/src/PowerSearch/index.ts
|
|
@@ -10,6 +13,7 @@
|
|
|
10
13
|
import React from 'react';
|
|
11
14
|
import type { OperatorValue, FilterValue } from './types.js';
|
|
12
15
|
import type { InternalConfig } from './useInternalConfig.js';
|
|
16
|
+
import type { TranslatorFn } from '../i18n/index.js';
|
|
13
17
|
export interface PowerSearchValueEditorProps {
|
|
14
18
|
operatorValue: OperatorValue;
|
|
15
19
|
filterValue: FilterValue | undefined;
|
|
@@ -20,6 +24,37 @@ export interface PowerSearchValueEditorProps {
|
|
|
20
24
|
maxMenuItems?: number;
|
|
21
25
|
isDisabled?: boolean;
|
|
22
26
|
timezoneID?: string;
|
|
27
|
+
/**
|
|
28
|
+
* Called when a staged value no longer stands — the number input's draft is
|
|
29
|
+
* empty or does not parse — so the sheet presentation's confirm action
|
|
30
|
+
* disables again. Only the `bottom-sheet` presentation stages as typed; the
|
|
31
|
+
* popover commits on blur or Enter and never calls this.
|
|
32
|
+
*/
|
|
33
|
+
onUnstage?: () => void;
|
|
34
|
+
/**
|
|
35
|
+
* Where the editor renders. In the `bottom-sheet` presentation the inputs
|
|
36
|
+
* fill the sheet's width, number inputs stage every parseable keystroke
|
|
37
|
+
* (the sheet's footer confirms; there is no Enter-to-save), the date range
|
|
38
|
+
* shows one month, and list values open the Tokenizer's own sheet titled
|
|
39
|
+
* with `fieldLabel`.
|
|
40
|
+
* @default 'popover'
|
|
41
|
+
*/
|
|
42
|
+
presentation?: 'popover' | 'bottom-sheet';
|
|
43
|
+
/** The field's label; names the Tokenizer sheet in the sheet presentation. */
|
|
44
|
+
fieldLabel?: string;
|
|
23
45
|
}
|
|
24
|
-
|
|
46
|
+
/**
|
|
47
|
+
* The relative-date choices an operator offers, in display order. Shared by
|
|
48
|
+
* the popover's Selector and the sheet presentation's rows so both list the
|
|
49
|
+
* same values. With `t` the labels resolve through the catalog's ICU plural
|
|
50
|
+
* messages (the sheet presentation's rows); without it they are the popover
|
|
51
|
+
* editor's own literals. In English the two read identically.
|
|
52
|
+
*/
|
|
53
|
+
export declare function buildRelativeDateOptions(operatorValue: OperatorValue & {
|
|
54
|
+
type: 'date_relative';
|
|
55
|
+
}, t?: TranslatorFn): {
|
|
56
|
+
value: string;
|
|
57
|
+
label: string;
|
|
58
|
+
}[];
|
|
59
|
+
export declare function PowerSearchValueEditor({ operatorValue, filterValue, onChange, onEnter, maxMenuItems, isDisabled, onUnstage, presentation, fieldLabel, }: PowerSearchValueEditorProps): React.JSX.Element | null;
|
|
25
60
|
//# sourceMappingURL=PowerSearchValueEditor.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PowerSearchValueEditor.d.ts","sourceRoot":"","sources":["../../src/PowerSearch/PowerSearchValueEditor.tsx"],"names":[],"mappings":"AAIA
|
|
1
|
+
{"version":3,"file":"PowerSearchValueEditor.d.ts","sourceRoot":"","sources":["../../src/PowerSearch/PowerSearchValueEditor.tsx"],"names":[],"mappings":"AAIA;;;;;;;;;;;GAWG;AAEH,OAAO,KAMN,MAAM,OAAO,CAAC;AACf,OAAO,KAAK,EACV,aAAa,EACb,WAAW,EAIZ,MAAM,SAAS,CAAC;AACjB,OAAO,KAAK,EAAC,cAAc,EAAC,MAAM,qBAAqB,CAAC;AAoBxD,OAAO,KAAK,EAAC,YAAY,EAAC,MAAM,SAAS,CAAC;AAS1C,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,6DAA6D;IAC7D,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB;;;;;OAKG;IACH,SAAS,CAAC,EAAE,MAAM,IAAI,CAAC;IACvB;;;;;;;OAOG;IACH,YAAY,CAAC,EAAE,SAAS,GAAG,cAAc,CAAC;IAC1C,8EAA8E;IAC9E,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AA6dD;;;;;;GAMG;AACH,wBAAgB,wBAAwB,CACtC,aAAa,EAAE,aAAa,GAAG;IAAC,IAAI,EAAE,eAAe,CAAA;CAAC,EACtD,CAAC,CAAC,EAAE,YAAY,GACf;IAAC,KAAK,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAC,EAAE,CAsBlC;AA+TD,wBAAgB,sBAAsB,CAAC,EACrC,aAAa,EACb,WAAW,EACX,QAAQ,EACR,OAAO,EACP,YAAY,EACZ,UAAU,EACV,SAAS,EACT,YAAwB,EACxB,UAAU,GACX,EAAE,2BAA2B,4BAsJ7B"}
|
|
@@ -4,9 +4,12 @@
|
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
6
|
* @file PowerSearchValueEditor.tsx
|
|
7
|
-
* @input OperatorValue, FilterValue, onChange callback
|
|
7
|
+
* @input OperatorValue, FilterValue, onChange callback, and the presentation
|
|
8
|
+
* the editor renders in
|
|
8
9
|
* @output Renders the appropriate editor for a filter value type
|
|
9
|
-
* @position Sub-component; consumed by PowerSearchEditPopover
|
|
10
|
+
* @position Sub-component; consumed by PowerSearchEditPopover (popover
|
|
11
|
+
* presentation) and PowerSearchBottomSheet (sheet presentation, which
|
|
12
|
+
* renders the closed vocabularies as rows itself)
|
|
10
13
|
*
|
|
11
14
|
* SYNC: When modified, update:
|
|
12
15
|
* - /packages/core/src/PowerSearch/index.ts
|
|
@@ -21,7 +24,7 @@ import { DateRangeInput } from "../DateRangeInput/index.js";
|
|
|
21
24
|
import { resolveDateTimeRangePart } from "./resolveDateTimeRangePart.js";
|
|
22
25
|
import { TimeInput } from "../TimeInput/index.js";
|
|
23
26
|
import { Selector } from "../Selector/index.js";
|
|
24
|
-
import { Tokenizer } from "../Tokenizer/
|
|
27
|
+
import { Tokenizer } from "../Tokenizer/Tokenizer.js";
|
|
25
28
|
import { Typeahead } from "../Typeahead/index.js";
|
|
26
29
|
import { useLocale } from "../i18n/index.js";
|
|
27
30
|
import { registerEnglishFallback, useComponentTranslator } from "../i18n/useComponentTranslator.js";
|
|
@@ -63,9 +66,11 @@ function StringEditor({
|
|
|
63
66
|
onChange,
|
|
64
67
|
onEnter: _onEnter,
|
|
65
68
|
maxMenuItems,
|
|
66
|
-
isDisabled
|
|
69
|
+
isDisabled,
|
|
70
|
+
presentation
|
|
67
71
|
}) {
|
|
68
72
|
const t = useComponentTranslator();
|
|
73
|
+
const width = presentation === 'bottom-sheet' ? '100%' : undefined;
|
|
69
74
|
const currentValue = filterValue?.type === 'string' ? filterValue.value : '';
|
|
70
75
|
|
|
71
76
|
// When a searchSource is provided, render a typeahead instead of a plain
|
|
@@ -96,7 +101,8 @@ function StringEditor({
|
|
|
96
101
|
},
|
|
97
102
|
placeholder: t('@astryx.powersearch.valueEditor.searchPlaceholder'),
|
|
98
103
|
debounceMs: 150,
|
|
99
|
-
maxMenuItems: maxMenuItems
|
|
104
|
+
maxMenuItems: maxMenuItems,
|
|
105
|
+
width: width
|
|
100
106
|
});
|
|
101
107
|
}
|
|
102
108
|
return /*#__PURE__*/_jsx(TextInput, {
|
|
@@ -110,7 +116,8 @@ function StringEditor({
|
|
|
110
116
|
type: 'string',
|
|
111
117
|
value
|
|
112
118
|
});
|
|
113
|
-
}
|
|
119
|
+
},
|
|
120
|
+
width: width
|
|
114
121
|
});
|
|
115
122
|
}
|
|
116
123
|
function StringListEditor({
|
|
@@ -118,9 +125,12 @@ function StringListEditor({
|
|
|
118
125
|
filterValue,
|
|
119
126
|
onChange,
|
|
120
127
|
maxMenuItems,
|
|
121
|
-
isDisabled
|
|
128
|
+
isDisabled,
|
|
129
|
+
presentation,
|
|
130
|
+
fieldLabel
|
|
122
131
|
}) {
|
|
123
132
|
const t = useComponentTranslator();
|
|
133
|
+
const isSheet = presentation === 'bottom-sheet';
|
|
124
134
|
const currentValue = useMemo(() => {
|
|
125
135
|
if (filterValue?.type !== 'string_list') {
|
|
126
136
|
return [];
|
|
@@ -144,8 +154,12 @@ function StringListEditor({
|
|
|
144
154
|
// Enable creatable mode when no searchSource is provided (free-text tags)
|
|
145
155
|
// or when isArbitraryStringAllowed is explicitly set (#1107).
|
|
146
156
|
const hasCreate = operatorValue.isArbitraryStringAllowed || !operatorValue.searchSource;
|
|
157
|
+
|
|
158
|
+
// In the sheet presentation the list value edits through the Tokenizer's
|
|
159
|
+
// own sheet, titled with the field's label; a popover menu inside a sheet
|
|
160
|
+
// would stack a second anchored layer on a surface the person is already in.
|
|
147
161
|
return /*#__PURE__*/_jsx(Tokenizer, {
|
|
148
|
-
label: t('@astryx.powersearch.valueEditor.values'),
|
|
162
|
+
label: isSheet && fieldLabel != null ? fieldLabel : t('@astryx.powersearch.valueEditor.values'),
|
|
149
163
|
isLabelHidden: true,
|
|
150
164
|
isDisabled: isDisabled,
|
|
151
165
|
searchSource: source,
|
|
@@ -159,7 +173,11 @@ function StringListEditor({
|
|
|
159
173
|
placeholder: t('@astryx.powersearch.valueEditor.addValuesPlaceholder'),
|
|
160
174
|
debounceMs: operatorValue.searchSource ? 150 : 0,
|
|
161
175
|
hasCreate: hasCreate,
|
|
162
|
-
maxMenuItems: maxMenuItems
|
|
176
|
+
maxMenuItems: maxMenuItems,
|
|
177
|
+
width: isSheet ? '100%' : undefined,
|
|
178
|
+
experimental: isSheet ? {
|
|
179
|
+
presentation: 'bottom-sheet'
|
|
180
|
+
} : undefined
|
|
163
181
|
});
|
|
164
182
|
}
|
|
165
183
|
function useNumberEditorHandlers({
|
|
@@ -168,7 +186,9 @@ function useNumberEditorHandlers({
|
|
|
168
186
|
max,
|
|
169
187
|
isIntegerOnly,
|
|
170
188
|
onChange,
|
|
171
|
-
onEnter
|
|
189
|
+
onEnter,
|
|
190
|
+
onUnstage,
|
|
191
|
+
stagesAsTyped
|
|
172
192
|
}) {
|
|
173
193
|
const locale = useLocale();
|
|
174
194
|
const pendingDecisionRef = useRef(null);
|
|
@@ -186,14 +206,23 @@ function useNumberEditorHandlers({
|
|
|
186
206
|
pendingDecisionRef.current = null;
|
|
187
207
|
}, []);
|
|
188
208
|
const handleInput = useCallback(event => {
|
|
189
|
-
|
|
209
|
+
const decision = resolveNumberInputCommit(event.currentTarget.value, {
|
|
190
210
|
min,
|
|
191
211
|
max,
|
|
192
212
|
isIntegerOnly,
|
|
193
213
|
locale,
|
|
194
214
|
hasClear: false
|
|
195
215
|
});
|
|
196
|
-
|
|
216
|
+
pendingDecisionRef.current = decision;
|
|
217
|
+
if (stagesAsTyped) {
|
|
218
|
+
if (decision.type === 'commit') {
|
|
219
|
+
onChange(toFilterValue(decision.value));
|
|
220
|
+
} else {
|
|
221
|
+
// Cleared, or not a number: nothing stands to confirm.
|
|
222
|
+
onUnstage?.();
|
|
223
|
+
}
|
|
224
|
+
}
|
|
225
|
+
}, [isIntegerOnly, locale, max, min, onChange, onUnstage, stagesAsTyped, toFilterValue]);
|
|
197
226
|
const handleEnter = useCallback(() => {
|
|
198
227
|
const decision = pendingDecisionRef.current;
|
|
199
228
|
pendingDecisionRef.current = null;
|
|
@@ -221,7 +250,9 @@ function IntegerEditor({
|
|
|
221
250
|
filterValue,
|
|
222
251
|
onChange,
|
|
223
252
|
onEnter,
|
|
224
|
-
|
|
253
|
+
onUnstage,
|
|
254
|
+
isDisabled,
|
|
255
|
+
presentation
|
|
225
256
|
}) {
|
|
226
257
|
const t = useComponentTranslator();
|
|
227
258
|
const currentValue = filterValue?.type === 'integer' ? filterValue.value : undefined;
|
|
@@ -231,7 +262,9 @@ function IntegerEditor({
|
|
|
231
262
|
max: operatorValue.maxValue,
|
|
232
263
|
isIntegerOnly: true,
|
|
233
264
|
onChange,
|
|
234
|
-
onEnter
|
|
265
|
+
onEnter,
|
|
266
|
+
onUnstage,
|
|
267
|
+
stagesAsTyped: presentation === 'bottom-sheet'
|
|
235
268
|
});
|
|
236
269
|
return /*#__PURE__*/_jsx(NumberInput, {
|
|
237
270
|
label: t('@astryx.powersearch.valueEditor.value'),
|
|
@@ -247,7 +280,8 @@ function IntegerEditor({
|
|
|
247
280
|
max: operatorValue.maxValue,
|
|
248
281
|
units: operatorValue.units,
|
|
249
282
|
isIntegerOnly: true,
|
|
250
|
-
placeholder: t('@astryx.powersearch.valueEditor.enterNumberPlaceholder')
|
|
283
|
+
placeholder: t('@astryx.powersearch.valueEditor.enterNumberPlaceholder'),
|
|
284
|
+
width: presentation === 'bottom-sheet' ? '100%' : undefined
|
|
251
285
|
});
|
|
252
286
|
}
|
|
253
287
|
function FloatEditor({
|
|
@@ -255,7 +289,9 @@ function FloatEditor({
|
|
|
255
289
|
filterValue,
|
|
256
290
|
onChange,
|
|
257
291
|
onEnter,
|
|
258
|
-
|
|
292
|
+
onUnstage,
|
|
293
|
+
isDisabled,
|
|
294
|
+
presentation
|
|
259
295
|
}) {
|
|
260
296
|
const t = useComponentTranslator();
|
|
261
297
|
const currentValue = filterValue?.type === 'float' ? filterValue.value : undefined;
|
|
@@ -265,7 +301,9 @@ function FloatEditor({
|
|
|
265
301
|
max: operatorValue.maxValue,
|
|
266
302
|
isIntegerOnly: false,
|
|
267
303
|
onChange,
|
|
268
|
-
onEnter
|
|
304
|
+
onEnter,
|
|
305
|
+
onUnstage,
|
|
306
|
+
stagesAsTyped: presentation === 'bottom-sheet'
|
|
269
307
|
});
|
|
270
308
|
return /*#__PURE__*/_jsx(NumberInput, {
|
|
271
309
|
label: t('@astryx.powersearch.valueEditor.value'),
|
|
@@ -280,14 +318,16 @@ function FloatEditor({
|
|
|
280
318
|
min: operatorValue.minValue,
|
|
281
319
|
max: operatorValue.maxValue,
|
|
282
320
|
units: operatorValue.units,
|
|
283
|
-
placeholder: t('@astryx.powersearch.valueEditor.enterNumberPlaceholder')
|
|
321
|
+
placeholder: t('@astryx.powersearch.valueEditor.enterNumberPlaceholder'),
|
|
322
|
+
width: presentation === 'bottom-sheet' ? '100%' : undefined
|
|
284
323
|
});
|
|
285
324
|
}
|
|
286
325
|
function TimeEditor({
|
|
287
326
|
operatorValue,
|
|
288
327
|
filterValue,
|
|
289
328
|
onChange,
|
|
290
|
-
isDisabled
|
|
329
|
+
isDisabled,
|
|
330
|
+
presentation
|
|
291
331
|
}) {
|
|
292
332
|
const t = useComponentTranslator();
|
|
293
333
|
const currentValue = filterValue?.type === 'time' ? filterValue.value : undefined;
|
|
@@ -305,13 +345,15 @@ function TimeEditor({
|
|
|
305
345
|
}
|
|
306
346
|
},
|
|
307
347
|
min: operatorValue.minValue,
|
|
308
|
-
max: operatorValue.maxValue
|
|
348
|
+
max: operatorValue.maxValue,
|
|
349
|
+
width: presentation === 'bottom-sheet' ? '100%' : undefined
|
|
309
350
|
});
|
|
310
351
|
}
|
|
311
352
|
function DateAbsoluteEditor({
|
|
312
353
|
filterValue,
|
|
313
354
|
onChange,
|
|
314
|
-
isDisabled
|
|
355
|
+
isDisabled,
|
|
356
|
+
presentation
|
|
315
357
|
}) {
|
|
316
358
|
const t = useComponentTranslator();
|
|
317
359
|
// Convert unixSeconds to ISO date string for the date input
|
|
@@ -335,9 +377,68 @@ function DateAbsoluteEditor({
|
|
|
335
377
|
unixSeconds
|
|
336
378
|
});
|
|
337
379
|
}
|
|
338
|
-
}
|
|
380
|
+
},
|
|
381
|
+
width: presentation === 'bottom-sheet' ? '100%' : undefined
|
|
339
382
|
});
|
|
340
383
|
}
|
|
384
|
+
const RELATIVE_DATE_UNITS = [{
|
|
385
|
+
unit: 'day',
|
|
386
|
+
plural: 'days',
|
|
387
|
+
amounts: [1, 3, 7, 14, 30],
|
|
388
|
+
ago: '@astryx.powersearch.sheet.relativeDaysAgo',
|
|
389
|
+
fromNow: '@astryx.powersearch.sheet.relativeDaysFromNow'
|
|
390
|
+
}, {
|
|
391
|
+
unit: 'week',
|
|
392
|
+
plural: 'weeks',
|
|
393
|
+
amounts: [1, 2, 4],
|
|
394
|
+
ago: '@astryx.powersearch.sheet.relativeWeeksAgo',
|
|
395
|
+
fromNow: '@astryx.powersearch.sheet.relativeWeeksFromNow'
|
|
396
|
+
}, {
|
|
397
|
+
unit: 'month',
|
|
398
|
+
plural: 'months',
|
|
399
|
+
amounts: [1, 3, 6, 12],
|
|
400
|
+
ago: '@astryx.powersearch.sheet.relativeMonthsAgo',
|
|
401
|
+
fromNow: '@astryx.powersearch.sheet.relativeMonthsFromNow'
|
|
402
|
+
}];
|
|
403
|
+
|
|
404
|
+
/**
|
|
405
|
+
* The relative-date choices an operator offers, in display order. Shared by
|
|
406
|
+
* the popover's Selector and the sheet presentation's rows so both list the
|
|
407
|
+
* same values. With `t` the labels resolve through the catalog's ICU plural
|
|
408
|
+
* messages (the sheet presentation's rows); without it they are the popover
|
|
409
|
+
* editor's own literals. In English the two read identically.
|
|
410
|
+
*/
|
|
411
|
+
export function buildRelativeDateOptions(operatorValue, t) {
|
|
412
|
+
const result = [];
|
|
413
|
+
for (const {
|
|
414
|
+
unit,
|
|
415
|
+
plural,
|
|
416
|
+
amounts,
|
|
417
|
+
ago,
|
|
418
|
+
fromNow
|
|
419
|
+
} of RELATIVE_DATE_UNITS) {
|
|
420
|
+
for (const amount of amounts) {
|
|
421
|
+
const unitWord = amount === 1 ? unit : plural;
|
|
422
|
+
if (operatorValue.isPastAllowed !== false) {
|
|
423
|
+
result.push({
|
|
424
|
+
value: `${amount}${unit[0]}_ago`,
|
|
425
|
+
label: t ? t(ago, {
|
|
426
|
+
count: amount
|
|
427
|
+
}) : `${amount} ${unitWord} ago`
|
|
428
|
+
});
|
|
429
|
+
}
|
|
430
|
+
if (operatorValue.isFutureAllowed !== false) {
|
|
431
|
+
result.push({
|
|
432
|
+
value: `${amount}${unit[0]}_from_now`,
|
|
433
|
+
label: t ? t(fromNow, {
|
|
434
|
+
count: amount
|
|
435
|
+
}) : `${amount} ${unitWord} from now`
|
|
436
|
+
});
|
|
437
|
+
}
|
|
438
|
+
}
|
|
439
|
+
}
|
|
440
|
+
return result;
|
|
441
|
+
}
|
|
341
442
|
function DateRelativeEditor({
|
|
342
443
|
operatorValue,
|
|
343
444
|
filterValue,
|
|
@@ -346,40 +447,18 @@ function DateRelativeEditor({
|
|
|
346
447
|
}) {
|
|
347
448
|
const t = useComponentTranslator();
|
|
348
449
|
const currentValue = filterValue?.type === 'date_relative' ? filterValue.value : undefined;
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
for (const {
|
|
362
|
-
unit,
|
|
363
|
-
plural
|
|
364
|
-
} of units) {
|
|
365
|
-
const amounts = unit === 'day' ? [1, 3, 7, 14, 30] : unit === 'week' ? [1, 2, 4] : [1, 3, 6, 12];
|
|
366
|
-
for (const amount of amounts) {
|
|
367
|
-
if (operatorValue.isPastAllowed !== false) {
|
|
368
|
-
result.push({
|
|
369
|
-
value: `${amount}${unit[0]}_ago`,
|
|
370
|
-
label: `${amount} ${amount === 1 ? unit : plural} ago`
|
|
371
|
-
});
|
|
372
|
-
}
|
|
373
|
-
if (operatorValue.isFutureAllowed !== false) {
|
|
374
|
-
result.push({
|
|
375
|
-
value: `${amount}${unit[0]}_from_now`,
|
|
376
|
-
label: `${amount} ${amount === 1 ? unit : plural} from now`
|
|
377
|
-
});
|
|
378
|
-
}
|
|
379
|
-
}
|
|
380
|
-
}
|
|
381
|
-
return result;
|
|
382
|
-
}, [operatorValue.isPastAllowed, operatorValue.isFutureAllowed]);
|
|
450
|
+
|
|
451
|
+
// The choices depend on the two flags only; a config that rebuilds its
|
|
452
|
+
// operator objects per render keeps the same memoized list.
|
|
453
|
+
const {
|
|
454
|
+
isPastAllowed,
|
|
455
|
+
isFutureAllowed
|
|
456
|
+
} = operatorValue;
|
|
457
|
+
const options = useMemo(() => buildRelativeDateOptions({
|
|
458
|
+
type: 'date_relative',
|
|
459
|
+
isPastAllowed,
|
|
460
|
+
isFutureAllowed
|
|
461
|
+
}), [isPastAllowed, isFutureAllowed]);
|
|
383
462
|
return /*#__PURE__*/_jsx(Selector, {
|
|
384
463
|
label: t('@astryx.powersearch.valueEditor.relativeDate'),
|
|
385
464
|
isLabelHidden: true,
|
|
@@ -397,7 +476,8 @@ function DateRelativeEditor({
|
|
|
397
476
|
function DateRangeEditor({
|
|
398
477
|
filterValue,
|
|
399
478
|
onChange,
|
|
400
|
-
isDisabled
|
|
479
|
+
isDisabled,
|
|
480
|
+
presentation
|
|
401
481
|
}) {
|
|
402
482
|
const t = useComponentTranslator();
|
|
403
483
|
const currentValue = useMemo(() => {
|
|
@@ -448,6 +528,10 @@ function DateRangeEditor({
|
|
|
448
528
|
value: currentValue,
|
|
449
529
|
onChange: handleChange,
|
|
450
530
|
hasClear: false
|
|
531
|
+
// A phone-wide sheet fits one month; the popover keeps the default.
|
|
532
|
+
,
|
|
533
|
+
numberOfMonths: presentation === 'bottom-sheet' ? 1 : undefined,
|
|
534
|
+
width: presentation === 'bottom-sheet' ? '100%' : undefined
|
|
451
535
|
})
|
|
452
536
|
});
|
|
453
537
|
}
|
|
@@ -525,9 +609,12 @@ function EntityListEditor({
|
|
|
525
609
|
filterValue,
|
|
526
610
|
onChange,
|
|
527
611
|
maxMenuItems,
|
|
528
|
-
isDisabled
|
|
612
|
+
isDisabled,
|
|
613
|
+
presentation,
|
|
614
|
+
fieldLabel
|
|
529
615
|
}) {
|
|
530
616
|
const t = useComponentTranslator();
|
|
617
|
+
const isSheet = presentation === 'bottom-sheet';
|
|
531
618
|
const source = useMemo(() => {
|
|
532
619
|
if (operatorValue.searchSource) {
|
|
533
620
|
return operatorValue.searchSource;
|
|
@@ -551,8 +638,11 @@ function EntityListEditor({
|
|
|
551
638
|
} : undefined
|
|
552
639
|
}));
|
|
553
640
|
}, [filterValue]);
|
|
641
|
+
|
|
642
|
+
// Sheet presentation: the Tokenizer's own sheet, titled with the field
|
|
643
|
+
// label, as for string_list.
|
|
554
644
|
return /*#__PURE__*/_jsx(Tokenizer, {
|
|
555
|
-
label: t('@astryx.powersearch.valueEditor.entities'),
|
|
645
|
+
label: isSheet && fieldLabel != null ? fieldLabel : t('@astryx.powersearch.valueEditor.entities'),
|
|
556
646
|
isLabelHidden: true,
|
|
557
647
|
isDisabled: isDisabled,
|
|
558
648
|
searchSource: source,
|
|
@@ -576,7 +666,11 @@ function EntityListEditor({
|
|
|
576
666
|
renderItem: operatorValue.renderItem,
|
|
577
667
|
placeholder: t('@astryx.powersearch.valueEditor.searchPlaceholder'),
|
|
578
668
|
debounceMs: operatorValue.searchSource ? 150 : 0,
|
|
579
|
-
maxMenuItems: maxMenuItems
|
|
669
|
+
maxMenuItems: maxMenuItems,
|
|
670
|
+
width: isSheet ? '100%' : undefined,
|
|
671
|
+
experimental: isSheet ? {
|
|
672
|
+
presentation: 'bottom-sheet'
|
|
673
|
+
} : undefined
|
|
580
674
|
});
|
|
581
675
|
}
|
|
582
676
|
function CustomEditor({
|
|
@@ -613,7 +707,10 @@ export function PowerSearchValueEditor({
|
|
|
613
707
|
onChange,
|
|
614
708
|
onEnter,
|
|
615
709
|
maxMenuItems,
|
|
616
|
-
isDisabled
|
|
710
|
+
isDisabled,
|
|
711
|
+
onUnstage,
|
|
712
|
+
presentation = 'popover',
|
|
713
|
+
fieldLabel
|
|
617
714
|
}) {
|
|
618
715
|
switch (operatorValue.type) {
|
|
619
716
|
case 'empty':
|
|
@@ -621,6 +718,7 @@ export function PowerSearchValueEditor({
|
|
|
621
718
|
case 'string':
|
|
622
719
|
return /*#__PURE__*/_jsx(StringEditor, {
|
|
623
720
|
isDisabled: isDisabled,
|
|
721
|
+
presentation: presentation,
|
|
624
722
|
operatorValue: operatorValue,
|
|
625
723
|
filterValue: filterValue,
|
|
626
724
|
onChange: onChange,
|
|
@@ -630,6 +728,8 @@ export function PowerSearchValueEditor({
|
|
|
630
728
|
case 'string_list':
|
|
631
729
|
return /*#__PURE__*/_jsx(StringListEditor, {
|
|
632
730
|
isDisabled: isDisabled,
|
|
731
|
+
presentation: presentation,
|
|
732
|
+
fieldLabel: fieldLabel,
|
|
633
733
|
operatorValue: operatorValue,
|
|
634
734
|
filterValue: filterValue,
|
|
635
735
|
onChange: onChange,
|
|
@@ -638,6 +738,8 @@ export function PowerSearchValueEditor({
|
|
|
638
738
|
case 'integer':
|
|
639
739
|
return /*#__PURE__*/_jsx(IntegerEditor, {
|
|
640
740
|
isDisabled: isDisabled,
|
|
741
|
+
presentation: presentation,
|
|
742
|
+
onUnstage: onUnstage,
|
|
641
743
|
operatorValue: operatorValue,
|
|
642
744
|
filterValue: filterValue,
|
|
643
745
|
onChange: onChange,
|
|
@@ -646,6 +748,8 @@ export function PowerSearchValueEditor({
|
|
|
646
748
|
case 'float':
|
|
647
749
|
return /*#__PURE__*/_jsx(FloatEditor, {
|
|
648
750
|
isDisabled: isDisabled,
|
|
751
|
+
presentation: presentation,
|
|
752
|
+
onUnstage: onUnstage,
|
|
649
753
|
operatorValue: operatorValue,
|
|
650
754
|
filterValue: filterValue,
|
|
651
755
|
onChange: onChange,
|
|
@@ -654,6 +758,7 @@ export function PowerSearchValueEditor({
|
|
|
654
758
|
case 'time':
|
|
655
759
|
return /*#__PURE__*/_jsx(TimeEditor, {
|
|
656
760
|
isDisabled: isDisabled,
|
|
761
|
+
presentation: presentation,
|
|
657
762
|
operatorValue: operatorValue,
|
|
658
763
|
filterValue: filterValue,
|
|
659
764
|
onChange: onChange
|
|
@@ -661,6 +766,7 @@ export function PowerSearchValueEditor({
|
|
|
661
766
|
case 'date_absolute':
|
|
662
767
|
return /*#__PURE__*/_jsx(DateAbsoluteEditor, {
|
|
663
768
|
isDisabled: isDisabled,
|
|
769
|
+
presentation: presentation,
|
|
664
770
|
operatorValue: operatorValue,
|
|
665
771
|
filterValue: filterValue,
|
|
666
772
|
onChange: onChange
|
|
@@ -675,6 +781,7 @@ export function PowerSearchValueEditor({
|
|
|
675
781
|
case 'date_range':
|
|
676
782
|
return /*#__PURE__*/_jsx(DateRangeEditor, {
|
|
677
783
|
isDisabled: isDisabled,
|
|
784
|
+
presentation: presentation,
|
|
678
785
|
operatorValue: operatorValue,
|
|
679
786
|
filterValue: filterValue,
|
|
680
787
|
onChange: onChange
|
|
@@ -696,6 +803,8 @@ export function PowerSearchValueEditor({
|
|
|
696
803
|
case 'entity_list':
|
|
697
804
|
return /*#__PURE__*/_jsx(EntityListEditor, {
|
|
698
805
|
isDisabled: isDisabled,
|
|
806
|
+
presentation: presentation,
|
|
807
|
+
fieldLabel: fieldLabel,
|
|
699
808
|
operatorValue: operatorValue,
|
|
700
809
|
filterValue: filterValue,
|
|
701
810
|
onChange: onChange,
|
|
@@ -10,6 +10,13 @@
|
|
|
10
10
|
import type { OperatorValue, FilterValue } from './types.js';
|
|
11
11
|
import type { InternalConfig } from './useInternalConfig.js';
|
|
12
12
|
import type { Locale, TranslatorFn } from '../i18n/index.js';
|
|
13
|
+
/**
|
|
14
|
+
* A number in the provider locale's digits, decimal mark, and — unless the
|
|
15
|
+
* options say otherwise — grouping. The shared number helper for
|
|
16
|
+
* PowerSearch's own readings of a value — this module owns the raw `Intl`
|
|
17
|
+
* access.
|
|
18
|
+
*/
|
|
19
|
+
export declare function formatSharedNumber(value: number, locale: Locale, options?: Pick<Intl.NumberFormatOptions, 'useGrouping' | 'maximumFractionDigits'>): string;
|
|
13
20
|
export declare function formatDateAbsolute(unixSeconds: number, locale: Locale, timezoneID?: string): string;
|
|
14
21
|
/**
|
|
15
22
|
* Compact date-only rendering (no time-of-day) for the token pill's inline
|