@razorpay/blade 12.110.0 → 12.119.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/assets/spark/colorama-center-gradient-map-dark.jpg +0 -0
- package/assets/spark/colorama-gradient-map-dark.png +0 -0
- package/build/lib/native/components/AnimateInteractions/AnimateInteractions.native.js +5 -5
- package/build/lib/native/components/AnimateInteractions/AnimateInteractions.native.js.map +1 -1
- package/build/lib/native/components/AnimateInteractions/AnimateInteractionsProvider.js +6 -0
- package/build/lib/native/components/AnimateInteractions/AnimateInteractionsProvider.js.map +1 -0
- package/build/lib/native/components/BaseMotion/BaseMotion.native.js +22 -0
- package/build/lib/native/components/BaseMotion/BaseMotion.native.js.map +1 -0
- package/build/lib/native/components/BaseMotion/baseMotionInterpreter.native.js +11 -0
- package/build/lib/native/components/BaseMotion/baseMotionInterpreter.native.js.map +1 -0
- package/build/lib/native/components/BaseMotion/baseMotionUtils.js +4 -0
- package/build/lib/native/components/BaseMotion/baseMotionUtils.js.map +1 -0
- package/build/lib/native/components/BaseMotion/index.js +3 -0
- package/build/lib/native/components/BaseMotion/index.js.map +1 -0
- package/build/lib/native/components/BaseMotion/types.js +2 -0
- package/build/lib/native/components/BaseMotion/types.js.map +1 -0
- package/build/lib/native/components/Button/BaseButton/BaseButton.js +3 -3
- package/build/lib/native/components/Button/BaseButton/BaseButton.js.map +1 -1
- package/build/lib/native/components/Button/BaseButton/buttonTokens.js +1 -1
- package/build/lib/native/components/Button/BaseButton/buttonTokens.js.map +1 -1
- package/build/lib/native/components/Charts/AreaChart/AreaChart.native.js +2 -1
- package/build/lib/native/components/Charts/AreaChart/AreaChart.native.js.map +1 -1
- package/build/lib/native/components/Charts/CommonChartComponents/CommonChartComponents.native.js +2 -2
- package/build/lib/native/components/Charts/CommonChartComponents/CommonChartComponents.native.js.map +1 -1
- package/build/lib/native/components/Charts/CommonChartComponents/index.js +1 -1
- package/build/lib/native/components/Charts/CommonChartComponents/tokens.js +2 -2
- package/build/lib/native/components/Charts/CommonChartComponents/tokens.js.map +1 -1
- package/build/lib/native/components/Charts/LineChart/LineChart.native.js +4 -2
- package/build/lib/native/components/Charts/LineChart/LineChart.native.js.map +1 -1
- package/build/lib/native/components/Charts/utils/nullBridgeUtils.js +4 -0
- package/build/lib/native/components/Charts/utils/nullBridgeUtils.js.map +1 -0
- package/build/lib/native/components/Charts/utils/referenceBandUtils.js +6 -0
- package/build/lib/native/components/Charts/utils/referenceBandUtils.js.map +1 -0
- package/build/lib/native/components/CounterInput/CounterInput.native.js +3 -2
- package/build/lib/native/components/CounterInput/CounterInput.native.js.map +1 -1
- package/build/lib/native/components/CounterInput/token.js +2 -2
- package/build/lib/native/components/CounterInput/token.js.map +1 -1
- package/build/lib/native/components/DatePicker/Calendar.native.js +2 -2
- package/build/lib/native/components/DatePicker/Calendar.native.js.map +1 -1
- package/build/lib/native/components/DatePicker/utils.js +2 -2
- package/build/lib/native/components/DatePicker/utils.js.map +1 -1
- package/build/lib/native/components/Dropdown/Dropdown.js +1 -1
- package/build/lib/native/components/Dropdown/Dropdown.js.map +1 -1
- package/build/lib/native/components/Dropdown/FilterChipSelectInput.native.js +2 -1
- package/build/lib/native/components/Dropdown/FilterChipSelectInput.native.js.map +1 -1
- package/build/lib/native/components/Dropdown/dropdownUtils.js +1 -1
- package/build/lib/native/components/Dropdown/dropdownUtils.js.map +1 -1
- package/build/lib/native/components/Dropdown/filterChipSelectInputUtils.js +4 -0
- package/build/lib/native/components/Dropdown/filterChipSelectInputUtils.js.map +1 -0
- package/build/lib/native/components/Dropdown/useDropdown.js +1 -1
- package/build/lib/native/components/Dropdown/useDropdown.js.map +1 -1
- package/build/lib/native/components/Fade/Fade.native.js +7 -5
- package/build/lib/native/components/Fade/Fade.native.js.map +1 -1
- package/build/lib/native/components/FilterChip/BaseFilterChip.native.js +2 -2
- package/build/lib/native/components/FilterChip/BaseFilterChip.native.js.map +1 -1
- package/build/lib/native/components/FloatingActionButton/FloatingActionButton.js +14 -0
- package/build/lib/native/components/FloatingActionButton/FloatingActionButton.js.map +1 -0
- package/build/lib/native/components/FloatingActionButton/FloatingActionButtonContainer.native.js +20 -0
- package/build/lib/native/components/FloatingActionButton/FloatingActionButtonContainer.native.js.map +1 -0
- package/build/lib/native/components/FloatingActionButton/index.js +2 -0
- package/build/lib/native/components/FloatingActionButton/index.js.map +1 -0
- package/build/lib/native/components/GenUI/GenUIContext.native.js +2 -2
- package/build/lib/native/components/GenUI/GenUIContext.native.js.map +1 -1
- package/build/lib/native/components/GenUI/index.js +1 -1
- package/build/lib/native/components/Icons/BookmarkFilledIcon/BookmarkFilledIcon.js +14 -0
- package/build/lib/native/components/Icons/BookmarkFilledIcon/BookmarkFilledIcon.js.map +1 -0
- package/build/lib/native/components/Icons/BookmarkFilledIcon/index.js +2 -0
- package/build/lib/native/components/Icons/BookmarkFilledIcon/index.js.map +1 -0
- package/build/lib/native/components/Icons/index.js +1 -0
- package/build/lib/native/components/Icons/index.js.map +1 -1
- package/build/lib/native/components/Input/BaseInput/StyledBaseInput.native.js +1 -1
- package/build/lib/native/components/Input/BaseInput/StyledBaseInput.native.js.map +1 -1
- package/build/lib/native/components/Input/OTPInput/OTPInput.js +1 -1
- package/build/lib/native/components/Input/OTPInput/OTPInput.js.map +1 -1
- package/build/lib/native/components/Morph/Morph.native.js +9 -5
- package/build/lib/native/components/Morph/Morph.native.js.map +1 -1
- package/build/lib/native/components/Move/Move.native.js +8 -5
- package/build/lib/native/components/Move/Move.native.js.map +1 -1
- package/build/lib/native/components/Scale/Scale.native.js +7 -5
- package/build/lib/native/components/Scale/Scale.native.js.map +1 -1
- package/build/lib/native/components/SegmentedControl/SegmentedControl.native.js +27 -0
- package/build/lib/native/components/SegmentedControl/SegmentedControl.native.js.map +1 -0
- package/build/lib/native/components/SegmentedControl/SegmentedControlContext.js +8 -0
- package/build/lib/native/components/SegmentedControl/SegmentedControlContext.js.map +1 -0
- package/build/lib/native/components/SegmentedControl/SegmentedControlItem.native.js +18 -0
- package/build/lib/native/components/SegmentedControl/SegmentedControlItem.native.js.map +1 -0
- package/build/lib/native/components/SegmentedControl/index.js +3 -0
- package/build/lib/native/components/SegmentedControl/index.js.map +1 -0
- package/build/lib/native/components/SegmentedControl/segmentedControlTokens.js +4 -0
- package/build/lib/native/components/SegmentedControl/segmentedControlTokens.js.map +1 -0
- package/build/lib/native/components/Slide/Slide.native.js +7 -5
- package/build/lib/native/components/Slide/Slide.native.js.map +1 -1
- package/build/lib/native/components/Spark/RzpGlass/utils.native.js +1 -1
- package/build/lib/native/components/Spark/RzpGlass/utils.native.js.map +1 -1
- package/build/lib/native/components/Stagger/Stagger.native.js +10 -5
- package/build/lib/native/components/Stagger/Stagger.native.js.map +1 -1
- package/build/lib/native/components/Stagger/StaggerProvider.js +6 -0
- package/build/lib/native/components/Stagger/StaggerProvider.js.map +1 -0
- package/build/lib/native/components/TreeView/TreeView.native.js +4 -0
- package/build/lib/native/components/TreeView/TreeView.native.js.map +1 -0
- package/build/lib/native/components/TreeView/index.native.js +2 -0
- package/build/lib/native/components/TreeView/index.native.js.map +1 -0
- package/build/lib/native/components/index.js +10 -2
- package/build/lib/native/components/index.js.map +1 -1
- package/build/lib/native/tokens/global/colors.js +1 -1
- package/build/lib/native/tokens/global/colors.js.map +1 -1
- package/build/lib/native/tokens/index.js +1 -0
- package/build/lib/native/tokens/index.js.map +1 -1
- package/build/lib/native/tokens/theme/bladeNeutralTheme.js +15 -0
- package/build/lib/native/tokens/theme/bladeNeutralTheme.js.map +1 -0
- package/build/lib/native/tokens/theme/bladeTheme.js +1 -1
- package/build/lib/native/tokens/theme/bladeTheme.js.map +1 -1
- package/build/lib/native/tokens/theme/index.js +1 -0
- package/build/lib/native/tokens/theme/index.js.map +1 -1
- package/build/lib/native/tokens/theme/theme.js.map +1 -1
- package/build/lib/native/utils/componentZIndices.js +1 -1
- package/build/lib/native/utils/componentZIndices.js.map +1 -1
- package/build/lib/native/utils/metaAttribute/metaConstants.js +1 -1
- package/build/lib/native/utils/metaAttribute/metaConstants.js.map +1 -1
- package/build/lib/native/utils/msToSeconds.js +4 -0
- package/build/lib/native/utils/msToSeconds.js.map +1 -0
- package/build/lib/native/utils/useControlledDropdownInput/useControlledDropdownInput.js +1 -1
- package/build/lib/native/utils/useControlledDropdownInput/useControlledDropdownInput.js.map +1 -1
- package/build/lib/web/development/_virtual/flatten.js +1 -1
- package/build/lib/web/development/_virtual/flatten3.js +1 -1
- package/build/lib/web/development/components/AnimateInteractions/AnimateInteractions.web.js +1 -1
- package/build/lib/web/development/components/AnimateInteractions/AnimateInteractionsProvider.js +2 -1
- package/build/lib/web/development/components/AnimateInteractions/AnimateInteractionsProvider.js.map +1 -1
- package/build/lib/web/development/components/AnimateInteractions/{useFocusWithin.js → useFocusWithin.web.js} +1 -1
- package/build/lib/web/development/components/AnimateInteractions/useFocusWithin.web.js.map +1 -0
- package/build/lib/web/development/components/Button/BaseButton/BaseButton.js +124 -73
- package/build/lib/web/development/components/Button/BaseButton/BaseButton.js.map +1 -1
- package/build/lib/web/development/components/Button/BaseButton/buttonTokens.js +68 -2
- package/build/lib/web/development/components/Button/BaseButton/buttonTokens.js.map +1 -1
- package/build/lib/web/development/components/Charts/AreaChart/AreaChart.web.js +206 -18
- package/build/lib/web/development/components/Charts/AreaChart/AreaChart.web.js.map +1 -1
- package/build/lib/web/development/components/Charts/CommonChartComponents/CommonChartComponents.web.js +159 -43
- package/build/lib/web/development/components/Charts/CommonChartComponents/CommonChartComponents.web.js.map +1 -1
- package/build/lib/web/development/components/Charts/CommonChartComponents/index.js +1 -1
- package/build/lib/web/development/components/Charts/CommonChartComponents/tokens.js +15 -2
- package/build/lib/web/development/components/Charts/CommonChartComponents/tokens.js.map +1 -1
- package/build/lib/web/development/components/Charts/LineChart/LineChart.web.js +272 -15
- package/build/lib/web/development/components/Charts/LineChart/LineChart.web.js.map +1 -1
- package/build/lib/web/development/components/Charts/LineChart/useReferenceBand.js +195 -0
- package/build/lib/web/development/components/Charts/LineChart/useReferenceBand.js.map +1 -0
- package/build/lib/web/development/components/Charts/utils/nullBridgeUtils.js +175 -0
- package/build/lib/web/development/components/Charts/utils/nullBridgeUtils.js.map +1 -0
- package/build/lib/web/development/components/Charts/utils/referenceBandUtils.js +66 -0
- package/build/lib/web/development/components/Charts/utils/referenceBandUtils.js.map +1 -0
- package/build/lib/web/development/components/CounterInput/CounterInput.web.js +29 -5
- package/build/lib/web/development/components/CounterInput/CounterInput.web.js.map +1 -1
- package/build/lib/web/development/components/CounterInput/StyledCounterInput.js +20 -4
- package/build/lib/web/development/components/CounterInput/StyledCounterInput.js.map +1 -1
- package/build/lib/web/development/components/CounterInput/token.js +6 -1
- package/build/lib/web/development/components/CounterInput/token.js.map +1 -1
- package/build/lib/web/development/components/DatePicker/BaseDatePicker.web.js +28 -1
- package/build/lib/web/development/components/DatePicker/BaseDatePicker.web.js.map +1 -1
- package/build/lib/web/development/components/DatePicker/Calendar.web.js +9 -2
- package/build/lib/web/development/components/DatePicker/Calendar.web.js.map +1 -1
- package/build/lib/web/development/components/DatePicker/FilterChipDatePicker/DatePickerFilterChip.web.js +4 -1
- package/build/lib/web/development/components/DatePicker/FilterChipDatePicker/DatePickerFilterChip.web.js.map +1 -1
- package/build/lib/web/development/components/DatePicker/utils.js +21 -1
- package/build/lib/web/development/components/DatePicker/utils.js.map +1 -1
- package/build/lib/web/development/components/Dropdown/Dropdown.js +4 -1
- package/build/lib/web/development/components/Dropdown/Dropdown.js.map +1 -1
- package/build/lib/web/development/components/Dropdown/FilterChipGroup.web.js +40 -5
- package/build/lib/web/development/components/Dropdown/FilterChipGroup.web.js.map +1 -1
- package/build/lib/web/development/components/Dropdown/FilterChipSelectInput.web.js +30 -32
- package/build/lib/web/development/components/Dropdown/FilterChipSelectInput.web.js.map +1 -1
- package/build/lib/web/development/components/Dropdown/dropdownUtils.js +28 -2
- package/build/lib/web/development/components/Dropdown/dropdownUtils.js.map +1 -1
- package/build/lib/web/development/components/Dropdown/filterChipSelectInputUtils.js +60 -0
- package/build/lib/web/development/components/Dropdown/filterChipSelectInputUtils.js.map +1 -0
- package/build/lib/web/development/components/Dropdown/useDropdown.js +91 -5
- package/build/lib/web/development/components/Dropdown/useDropdown.js.map +1 -1
- package/build/lib/web/development/components/FilterChip/BaseFilterChip.web.js +35 -11
- package/build/lib/web/development/components/FilterChip/BaseFilterChip.web.js.map +1 -1
- package/build/lib/web/development/components/FloatingActionButton/FloatingActionButton.js +126 -0
- package/build/lib/web/development/components/FloatingActionButton/FloatingActionButton.js.map +1 -0
- package/build/lib/web/development/components/FloatingActionButton/FloatingActionButtonContainer.web.js +45 -0
- package/build/lib/web/development/components/FloatingActionButton/FloatingActionButtonContainer.web.js.map +1 -0
- package/build/lib/web/development/components/FloatingActionButton/index.js +2 -0
- package/build/lib/web/development/components/FloatingActionButton/index.js.map +1 -0
- package/build/lib/web/development/components/GenUI/GenUIComponents.web.js.map +1 -1
- package/build/lib/web/development/components/GenUI/GenUIContext.web.js +9 -1
- package/build/lib/web/development/components/GenUI/GenUIContext.web.js.map +1 -1
- package/build/lib/web/development/components/GenUI/GenUIProvider.web.js +17 -0
- package/build/lib/web/development/components/GenUI/GenUIProvider.web.js.map +1 -1
- package/build/lib/web/development/components/GenUI/GenUISchemaRenderer.web.js +31 -6
- package/build/lib/web/development/components/GenUI/GenUISchemaRenderer.web.js.map +1 -1
- package/build/lib/web/development/components/GenUI/index.js +1 -1
- package/build/lib/web/development/components/Icons/BookmarkFilledIcon/BookmarkFilledIcon.js +44 -0
- package/build/lib/web/development/components/Icons/BookmarkFilledIcon/BookmarkFilledIcon.js.map +1 -0
- package/build/lib/web/development/components/Icons/BookmarkFilledIcon/index.js +2 -0
- package/build/lib/web/development/components/Icons/BookmarkFilledIcon/index.js.map +1 -0
- package/build/lib/web/development/components/Icons/index.js +1 -0
- package/build/lib/web/development/components/Icons/index.js.map +1 -1
- package/build/lib/web/development/components/Input/OTPInput/OTPInput.js +3 -0
- package/build/lib/web/development/components/Input/OTPInput/OTPInput.js.map +1 -1
- package/build/lib/web/development/components/PopupArrow/PopupArrow.web.js +7 -1
- package/build/lib/web/development/components/PopupArrow/PopupArrow.web.js.map +1 -1
- package/build/lib/web/development/components/RollingText/RollingText.web.js +27 -20
- package/build/lib/web/development/components/RollingText/RollingText.web.js.map +1 -1
- package/build/lib/web/development/components/SegmentedControl/SegmentedControl.web.js +196 -0
- package/build/lib/web/development/components/SegmentedControl/SegmentedControl.web.js.map +1 -0
- package/build/lib/web/development/components/SegmentedControl/SegmentedControlContext.js +18 -0
- package/build/lib/web/development/components/SegmentedControl/SegmentedControlContext.js.map +1 -0
- package/build/lib/web/development/components/SegmentedControl/SegmentedControlIndicator.web.js +109 -0
- package/build/lib/web/development/components/SegmentedControl/SegmentedControlIndicator.web.js.map +1 -0
- package/build/lib/web/development/components/SegmentedControl/SegmentedControlItem.web.js +170 -0
- package/build/lib/web/development/components/SegmentedControl/SegmentedControlItem.web.js.map +1 -0
- package/build/lib/web/development/components/SegmentedControl/index.js +3 -0
- package/build/lib/web/development/components/SegmentedControl/index.js.map +1 -0
- package/build/lib/web/development/components/SegmentedControl/segmentedControlTokens.js +53 -0
- package/build/lib/web/development/components/SegmentedControl/segmentedControlTokens.js.map +1 -0
- package/build/lib/web/development/components/Spark/RzpGlass/RzpGlass.js +16 -7
- package/build/lib/web/development/components/Spark/RzpGlass/RzpGlass.js.map +1 -1
- package/build/lib/web/development/components/Spark/RzpGlass/RzpGlassMount.js +24 -6
- package/build/lib/web/development/components/Spark/RzpGlass/RzpGlassMount.js.map +1 -1
- package/build/lib/web/development/components/Spark/RzpGlass/presets.js +30 -1
- package/build/lib/web/development/components/Spark/RzpGlass/presets.js.map +1 -1
- package/build/lib/web/development/components/Spark/RzpGlass/rzpGlassShader.js +1 -1
- package/build/lib/web/development/components/Spark/RzpGlass/rzpGlassShader.js.map +1 -1
- package/build/lib/web/development/components/Spark/RzpGlass/utils.js +26 -10
- package/build/lib/web/development/components/Spark/RzpGlass/utils.js.map +1 -1
- package/build/lib/web/development/components/SpotlightPopoverTour/Tour.web.js +31 -18
- package/build/lib/web/development/components/SpotlightPopoverTour/Tour.web.js.map +1 -1
- package/build/lib/web/development/components/SpotlightPopoverTour/TourMask.web.js +14 -3
- package/build/lib/web/development/components/SpotlightPopoverTour/TourMask.web.js.map +1 -1
- package/build/lib/web/development/components/SpotlightPopoverTour/TourPopover.web.js +23 -4
- package/build/lib/web/development/components/SpotlightPopoverTour/TourPopover.web.js.map +1 -1
- package/build/lib/web/development/components/SpotlightPopoverTour/utils.js +58 -1
- package/build/lib/web/development/components/SpotlightPopoverTour/utils.js.map +1 -1
- package/build/lib/web/development/components/Stagger/StaggerProvider.js.map +1 -1
- package/build/lib/web/development/components/TreeView/StyledTreeViewRow.web.js +41 -0
- package/build/lib/web/development/components/TreeView/StyledTreeViewRow.web.js.map +1 -0
- package/build/lib/web/development/components/TreeView/TreeView.web.js +696 -0
- package/build/lib/web/development/components/TreeView/TreeView.web.js.map +1 -0
- package/build/lib/web/development/components/TreeView/TreeViewAnimator.web.js +184 -0
- package/build/lib/web/development/components/TreeView/TreeViewAnimator.web.js.map +1 -0
- package/build/lib/web/development/components/TreeView/TreeViewChevron.web.js +73 -0
- package/build/lib/web/development/components/TreeView/TreeViewChevron.web.js.map +1 -0
- package/build/lib/web/development/components/TreeView/TreeViewItem.web.js +295 -0
- package/build/lib/web/development/components/TreeView/TreeViewItem.web.js.map +1 -0
- package/build/lib/web/development/components/TreeView/TreeViewLoadMore.web.js +173 -0
- package/build/lib/web/development/components/TreeView/TreeViewLoadMore.web.js.map +1 -0
- package/build/lib/web/development/components/TreeView/componentIds.js +8 -0
- package/build/lib/web/development/components/TreeView/componentIds.js.map +1 -0
- package/build/lib/web/development/components/TreeView/index.web.js +4 -0
- package/build/lib/web/development/components/TreeView/index.web.js.map +1 -0
- package/build/lib/web/development/components/TreeView/treeViewUtils.js +475 -0
- package/build/lib/web/development/components/TreeView/treeViewUtils.js.map +1 -0
- package/build/lib/web/development/components/TreeView/useTreeView.js +24 -0
- package/build/lib/web/development/components/TreeView/useTreeView.js.map +1 -0
- package/build/lib/web/development/components/index.js +12 -2
- package/build/lib/web/development/components/index.js.map +1 -1
- package/build/lib/web/development/node_modules/es-toolkit/dist/array/flatten.js +1 -1
- package/build/lib/web/development/node_modules/es-toolkit/dist/compat/array/flatten.js +1 -1
- package/build/lib/web/development/node_modules/es-toolkit/dist/compat/array/sortBy.js +2 -2
- package/build/lib/web/development/node_modules/es-toolkit/dist/compat/object/omit.js +2 -2
- package/build/lib/web/development/tokens/global/colors.js +2 -2
- package/build/lib/web/development/tokens/global/colors.js.map +1 -1
- package/build/lib/web/development/tokens/index.js +1 -0
- package/build/lib/web/development/tokens/index.js.map +1 -1
- package/build/lib/web/development/tokens/theme/bladeNeutralTheme.js +1439 -0
- package/build/lib/web/development/tokens/theme/bladeNeutralTheme.js.map +1 -0
- package/build/lib/web/development/tokens/theme/bladeTheme.js +48 -12
- package/build/lib/web/development/tokens/theme/bladeTheme.js.map +1 -1
- package/build/lib/web/development/tokens/theme/index.js +1 -0
- package/build/lib/web/development/tokens/theme/index.js.map +1 -1
- package/build/lib/web/development/tokens/theme/theme.js.map +1 -1
- package/build/lib/web/development/utils/componentZIndices.js +2 -0
- package/build/lib/web/development/utils/componentZIndices.js.map +1 -1
- package/build/lib/web/development/utils/metaAttribute/metaConstants.js +7 -1
- package/build/lib/web/development/utils/metaAttribute/metaConstants.js.map +1 -1
- package/build/lib/web/development/utils/useControlledDropdownInput/useControlledDropdownInput.js +12 -4
- package/build/lib/web/development/utils/useControlledDropdownInput/useControlledDropdownInput.js.map +1 -1
- package/build/lib/web/development/utils/useTruncationTitle/useTruncationTitle.web.js +2 -2
- package/build/lib/web/development/utils/useTruncationTitle/useTruncationTitle.web.js.map +1 -1
- package/build/lib/web/production/_virtual/flatten.js +1 -1
- package/build/lib/web/production/_virtual/flatten3.js +1 -1
- package/build/lib/web/production/components/AnimateInteractions/AnimateInteractions.web.js +1 -1
- package/build/lib/web/production/components/AnimateInteractions/AnimateInteractionsProvider.js +2 -1
- package/build/lib/web/production/components/AnimateInteractions/AnimateInteractionsProvider.js.map +1 -1
- package/build/lib/web/production/components/AnimateInteractions/{useFocusWithin.js → useFocusWithin.web.js} +1 -1
- package/build/lib/web/production/components/AnimateInteractions/useFocusWithin.web.js.map +1 -0
- package/build/lib/web/production/components/Button/BaseButton/BaseButton.js +124 -73
- package/build/lib/web/production/components/Button/BaseButton/BaseButton.js.map +1 -1
- package/build/lib/web/production/components/Button/BaseButton/buttonTokens.js +68 -2
- package/build/lib/web/production/components/Button/BaseButton/buttonTokens.js.map +1 -1
- package/build/lib/web/production/components/Charts/AreaChart/AreaChart.web.js +206 -18
- package/build/lib/web/production/components/Charts/AreaChart/AreaChart.web.js.map +1 -1
- package/build/lib/web/production/components/Charts/CommonChartComponents/CommonChartComponents.web.js +159 -43
- package/build/lib/web/production/components/Charts/CommonChartComponents/CommonChartComponents.web.js.map +1 -1
- package/build/lib/web/production/components/Charts/CommonChartComponents/index.js +1 -1
- package/build/lib/web/production/components/Charts/CommonChartComponents/tokens.js +15 -2
- package/build/lib/web/production/components/Charts/CommonChartComponents/tokens.js.map +1 -1
- package/build/lib/web/production/components/Charts/LineChart/LineChart.web.js +272 -15
- package/build/lib/web/production/components/Charts/LineChart/LineChart.web.js.map +1 -1
- package/build/lib/web/production/components/Charts/LineChart/useReferenceBand.js +195 -0
- package/build/lib/web/production/components/Charts/LineChart/useReferenceBand.js.map +1 -0
- package/build/lib/web/production/components/Charts/utils/nullBridgeUtils.js +175 -0
- package/build/lib/web/production/components/Charts/utils/nullBridgeUtils.js.map +1 -0
- package/build/lib/web/production/components/Charts/utils/referenceBandUtils.js +66 -0
- package/build/lib/web/production/components/Charts/utils/referenceBandUtils.js.map +1 -0
- package/build/lib/web/production/components/CounterInput/CounterInput.web.js +29 -5
- package/build/lib/web/production/components/CounterInput/CounterInput.web.js.map +1 -1
- package/build/lib/web/production/components/CounterInput/StyledCounterInput.js +20 -4
- package/build/lib/web/production/components/CounterInput/StyledCounterInput.js.map +1 -1
- package/build/lib/web/production/components/CounterInput/token.js +6 -1
- package/build/lib/web/production/components/CounterInput/token.js.map +1 -1
- package/build/lib/web/production/components/DatePicker/BaseDatePicker.web.js +28 -1
- package/build/lib/web/production/components/DatePicker/BaseDatePicker.web.js.map +1 -1
- package/build/lib/web/production/components/DatePicker/Calendar.web.js +9 -2
- package/build/lib/web/production/components/DatePicker/Calendar.web.js.map +1 -1
- package/build/lib/web/production/components/DatePicker/FilterChipDatePicker/DatePickerFilterChip.web.js +4 -1
- package/build/lib/web/production/components/DatePicker/FilterChipDatePicker/DatePickerFilterChip.web.js.map +1 -1
- package/build/lib/web/production/components/DatePicker/utils.js +21 -1
- package/build/lib/web/production/components/DatePicker/utils.js.map +1 -1
- package/build/lib/web/production/components/Dropdown/Dropdown.js +4 -1
- package/build/lib/web/production/components/Dropdown/Dropdown.js.map +1 -1
- package/build/lib/web/production/components/Dropdown/FilterChipGroup.web.js +40 -5
- package/build/lib/web/production/components/Dropdown/FilterChipGroup.web.js.map +1 -1
- package/build/lib/web/production/components/Dropdown/FilterChipSelectInput.web.js +30 -32
- package/build/lib/web/production/components/Dropdown/FilterChipSelectInput.web.js.map +1 -1
- package/build/lib/web/production/components/Dropdown/dropdownUtils.js +28 -2
- package/build/lib/web/production/components/Dropdown/dropdownUtils.js.map +1 -1
- package/build/lib/web/production/components/Dropdown/filterChipSelectInputUtils.js +60 -0
- package/build/lib/web/production/components/Dropdown/filterChipSelectInputUtils.js.map +1 -0
- package/build/lib/web/production/components/Dropdown/useDropdown.js +91 -5
- package/build/lib/web/production/components/Dropdown/useDropdown.js.map +1 -1
- package/build/lib/web/production/components/FilterChip/BaseFilterChip.web.js +35 -11
- package/build/lib/web/production/components/FilterChip/BaseFilterChip.web.js.map +1 -1
- package/build/lib/web/production/components/FloatingActionButton/FloatingActionButton.js +126 -0
- package/build/lib/web/production/components/FloatingActionButton/FloatingActionButton.js.map +1 -0
- package/build/lib/web/production/components/FloatingActionButton/FloatingActionButtonContainer.web.js +45 -0
- package/build/lib/web/production/components/FloatingActionButton/FloatingActionButtonContainer.web.js.map +1 -0
- package/build/lib/web/production/components/FloatingActionButton/index.js +2 -0
- package/build/lib/web/production/components/FloatingActionButton/index.js.map +1 -0
- package/build/lib/web/production/components/GenUI/GenUIComponents.web.js.map +1 -1
- package/build/lib/web/production/components/GenUI/GenUIContext.web.js +9 -1
- package/build/lib/web/production/components/GenUI/GenUIContext.web.js.map +1 -1
- package/build/lib/web/production/components/GenUI/GenUIProvider.web.js +17 -0
- package/build/lib/web/production/components/GenUI/GenUIProvider.web.js.map +1 -1
- package/build/lib/web/production/components/GenUI/GenUISchemaRenderer.web.js +31 -6
- package/build/lib/web/production/components/GenUI/GenUISchemaRenderer.web.js.map +1 -1
- package/build/lib/web/production/components/GenUI/index.js +1 -1
- package/build/lib/web/production/components/Icons/BookmarkFilledIcon/BookmarkFilledIcon.js +44 -0
- package/build/lib/web/production/components/Icons/BookmarkFilledIcon/BookmarkFilledIcon.js.map +1 -0
- package/build/lib/web/production/components/Icons/BookmarkFilledIcon/index.js +2 -0
- package/build/lib/web/production/components/Icons/BookmarkFilledIcon/index.js.map +1 -0
- package/build/lib/web/production/components/Icons/index.js +1 -0
- package/build/lib/web/production/components/Icons/index.js.map +1 -1
- package/build/lib/web/production/components/Input/OTPInput/OTPInput.js +3 -0
- package/build/lib/web/production/components/Input/OTPInput/OTPInput.js.map +1 -1
- package/build/lib/web/production/components/PopupArrow/PopupArrow.web.js +7 -1
- package/build/lib/web/production/components/PopupArrow/PopupArrow.web.js.map +1 -1
- package/build/lib/web/production/components/RollingText/RollingText.web.js +27 -20
- package/build/lib/web/production/components/RollingText/RollingText.web.js.map +1 -1
- package/build/lib/web/production/components/SegmentedControl/SegmentedControl.web.js +196 -0
- package/build/lib/web/production/components/SegmentedControl/SegmentedControl.web.js.map +1 -0
- package/build/lib/web/production/components/SegmentedControl/SegmentedControlContext.js +18 -0
- package/build/lib/web/production/components/SegmentedControl/SegmentedControlContext.js.map +1 -0
- package/build/lib/web/production/components/SegmentedControl/SegmentedControlIndicator.web.js +109 -0
- package/build/lib/web/production/components/SegmentedControl/SegmentedControlIndicator.web.js.map +1 -0
- package/build/lib/web/production/components/SegmentedControl/SegmentedControlItem.web.js +170 -0
- package/build/lib/web/production/components/SegmentedControl/SegmentedControlItem.web.js.map +1 -0
- package/build/lib/web/production/components/SegmentedControl/index.js +3 -0
- package/build/lib/web/production/components/SegmentedControl/index.js.map +1 -0
- package/build/lib/web/production/components/SegmentedControl/segmentedControlTokens.js +53 -0
- package/build/lib/web/production/components/SegmentedControl/segmentedControlTokens.js.map +1 -0
- package/build/lib/web/production/components/Spark/RzpGlass/RzpGlass.js +16 -7
- package/build/lib/web/production/components/Spark/RzpGlass/RzpGlass.js.map +1 -1
- package/build/lib/web/production/components/Spark/RzpGlass/RzpGlassMount.js +24 -6
- package/build/lib/web/production/components/Spark/RzpGlass/RzpGlassMount.js.map +1 -1
- package/build/lib/web/production/components/Spark/RzpGlass/presets.js +30 -1
- package/build/lib/web/production/components/Spark/RzpGlass/presets.js.map +1 -1
- package/build/lib/web/production/components/Spark/RzpGlass/rzpGlassShader.js +1 -1
- package/build/lib/web/production/components/Spark/RzpGlass/rzpGlassShader.js.map +1 -1
- package/build/lib/web/production/components/Spark/RzpGlass/utils.js +26 -10
- package/build/lib/web/production/components/Spark/RzpGlass/utils.js.map +1 -1
- package/build/lib/web/production/components/SpotlightPopoverTour/Tour.web.js +31 -18
- package/build/lib/web/production/components/SpotlightPopoverTour/Tour.web.js.map +1 -1
- package/build/lib/web/production/components/SpotlightPopoverTour/TourMask.web.js +14 -3
- package/build/lib/web/production/components/SpotlightPopoverTour/TourMask.web.js.map +1 -1
- package/build/lib/web/production/components/SpotlightPopoverTour/TourPopover.web.js +23 -4
- package/build/lib/web/production/components/SpotlightPopoverTour/TourPopover.web.js.map +1 -1
- package/build/lib/web/production/components/SpotlightPopoverTour/utils.js +58 -1
- package/build/lib/web/production/components/SpotlightPopoverTour/utils.js.map +1 -1
- package/build/lib/web/production/components/Stagger/StaggerProvider.js.map +1 -1
- package/build/lib/web/production/components/TreeView/StyledTreeViewRow.web.js +41 -0
- package/build/lib/web/production/components/TreeView/StyledTreeViewRow.web.js.map +1 -0
- package/build/lib/web/production/components/TreeView/TreeView.web.js +696 -0
- package/build/lib/web/production/components/TreeView/TreeView.web.js.map +1 -0
- package/build/lib/web/production/components/TreeView/TreeViewAnimator.web.js +184 -0
- package/build/lib/web/production/components/TreeView/TreeViewAnimator.web.js.map +1 -0
- package/build/lib/web/production/components/TreeView/TreeViewChevron.web.js +73 -0
- package/build/lib/web/production/components/TreeView/TreeViewChevron.web.js.map +1 -0
- package/build/lib/web/production/components/TreeView/TreeViewItem.web.js +295 -0
- package/build/lib/web/production/components/TreeView/TreeViewItem.web.js.map +1 -0
- package/build/lib/web/production/components/TreeView/TreeViewLoadMore.web.js +173 -0
- package/build/lib/web/production/components/TreeView/TreeViewLoadMore.web.js.map +1 -0
- package/build/lib/web/production/components/TreeView/componentIds.js +8 -0
- package/build/lib/web/production/components/TreeView/componentIds.js.map +1 -0
- package/build/lib/web/production/components/TreeView/index.web.js +4 -0
- package/build/lib/web/production/components/TreeView/index.web.js.map +1 -0
- package/build/lib/web/production/components/TreeView/treeViewUtils.js +475 -0
- package/build/lib/web/production/components/TreeView/treeViewUtils.js.map +1 -0
- package/build/lib/web/production/components/TreeView/useTreeView.js +24 -0
- package/build/lib/web/production/components/TreeView/useTreeView.js.map +1 -0
- package/build/lib/web/production/components/index.js +12 -2
- package/build/lib/web/production/components/index.js.map +1 -1
- package/build/lib/web/production/node_modules/es-toolkit/dist/array/flatten.js +1 -1
- package/build/lib/web/production/node_modules/es-toolkit/dist/compat/array/flatten.js +1 -1
- package/build/lib/web/production/node_modules/es-toolkit/dist/compat/array/sortBy.js +2 -2
- package/build/lib/web/production/node_modules/es-toolkit/dist/compat/object/omit.js +2 -2
- package/build/lib/web/production/tokens/global/colors.js +2 -2
- package/build/lib/web/production/tokens/global/colors.js.map +1 -1
- package/build/lib/web/production/tokens/index.js +1 -0
- package/build/lib/web/production/tokens/index.js.map +1 -1
- package/build/lib/web/production/tokens/theme/bladeNeutralTheme.js +1439 -0
- package/build/lib/web/production/tokens/theme/bladeNeutralTheme.js.map +1 -0
- package/build/lib/web/production/tokens/theme/bladeTheme.js +48 -12
- package/build/lib/web/production/tokens/theme/bladeTheme.js.map +1 -1
- package/build/lib/web/production/tokens/theme/index.js +1 -0
- package/build/lib/web/production/tokens/theme/index.js.map +1 -1
- package/build/lib/web/production/tokens/theme/theme.js.map +1 -1
- package/build/lib/web/production/utils/componentZIndices.js +2 -0
- package/build/lib/web/production/utils/componentZIndices.js.map +1 -1
- package/build/lib/web/production/utils/metaAttribute/metaConstants.js +7 -1
- package/build/lib/web/production/utils/metaAttribute/metaConstants.js.map +1 -1
- package/build/lib/web/production/utils/useControlledDropdownInput/useControlledDropdownInput.js +12 -4
- package/build/lib/web/production/utils/useControlledDropdownInput/useControlledDropdownInput.js.map +1 -1
- package/build/lib/web/production/utils/useTruncationTitle/useTruncationTitle.web.js +2 -2
- package/build/lib/web/production/utils/useTruncationTitle/useTruncationTitle.web.js.map +1 -1
- package/build/types/components/index.d.ts +794 -25
- package/build/types/components/index.native.d.ts +872 -29
- package/build/types/tokens/index.d.ts +11 -4
- package/build/types/tokens/index.native.d.ts +11 -4
- package/build/types/utils/index.d.ts +8 -3
- package/build/types/utils/index.native.d.ts +8 -3
- package/package.json +2 -2
- package/build/lib/web/development/components/AnimateInteractions/useFocusWithin.js.map +0 -1
- package/build/lib/web/production/components/AnimateInteractions/useFocusWithin.js.map +0 -1
|
@@ -0,0 +1,475 @@
|
|
|
1
|
+
import _toConsumableArray from '@babel/runtime/helpers/toConsumableArray';
|
|
2
|
+
import React__default from 'react';
|
|
3
|
+
import { componentIds } from './componentIds.js';
|
|
4
|
+
import '../../utils/isValidAllowedChildren/index.js';
|
|
5
|
+
import '../../utils/logger/index.js';
|
|
6
|
+
import { getComponentId } from '../../utils/isValidAllowedChildren/isValidAllowedChildren.js';
|
|
7
|
+
import { throwBladeError, logger } from '../../utils/logger/logger.js';
|
|
8
|
+
|
|
9
|
+
function _createForOfIteratorHelper(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t["return"] || t["return"](); } finally { if (u) throw o; } } }; }
|
|
10
|
+
function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
|
|
11
|
+
function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
|
|
12
|
+
var treeViewAllowedChildren = [componentIds.TreeViewItem, componentIds.TreeViewLoadMore];
|
|
13
|
+
var TREEVIEW_MAX_RECOMMENDED_LEVEL = 3;
|
|
14
|
+
var DEFAULT_LOAD_MORE_LABEL = 'Show more';
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* Internal value assigned to TreeViewLoadMore rows so they can participate
|
|
18
|
+
* in the flat registration list without colliding with consumer values
|
|
19
|
+
*/
|
|
20
|
+
var makeLoadMoreValue = function makeLoadMoreValue(parentValue, posInSet) {
|
|
21
|
+
return "__blade-tree-load-more__".concat(parentValue !== null && parentValue !== void 0 ? parentValue : '$root', "__").concat(posInSet);
|
|
22
|
+
};
|
|
23
|
+
var isTreeViewLoadMoreValue = function isTreeViewLoadMoreValue(value) {
|
|
24
|
+
return value.startsWith('__blade-tree-load-more__');
|
|
25
|
+
};
|
|
26
|
+
/**
|
|
27
|
+
* Walks the TreeView children and returns the normalized node registry,
|
|
28
|
+
* the flat Dropdown registration list, and runs dev-time validations (B10)
|
|
29
|
+
*/
|
|
30
|
+
var getTreeViewProperties = function getTreeViewProperties(children) {
|
|
31
|
+
var orderedNodes = [];
|
|
32
|
+
var nodeMap = {};
|
|
33
|
+
var rootValues = [];
|
|
34
|
+
var options = [];
|
|
35
|
+
var maxLevel = 0;
|
|
36
|
+
var _walkLevel = function walkLevel(_ref) {
|
|
37
|
+
var levelChildren = _ref.levelChildren,
|
|
38
|
+
parentValue = _ref.parentValue,
|
|
39
|
+
level = _ref.level,
|
|
40
|
+
isParentDisabled = _ref.isParentDisabled;
|
|
41
|
+
var childArray = React__default.Children.toArray(levelChildren);
|
|
42
|
+
var setSize = childArray.length;
|
|
43
|
+
var selectableLeafValues = [];
|
|
44
|
+
var childValues = [];
|
|
45
|
+
var loadMoreCountInLevel = 0;
|
|
46
|
+
if (level > maxLevel) {
|
|
47
|
+
maxLevel = level;
|
|
48
|
+
}
|
|
49
|
+
childArray.forEach(function (child, childIndex) {
|
|
50
|
+
var childComponentId = getComponentId(child);
|
|
51
|
+
if (! /*#__PURE__*/React__default.isValidElement(child) || !childComponentId || !treeViewAllowedChildren.includes(childComponentId)) {
|
|
52
|
+
throwBladeError({
|
|
53
|
+
message: "Only ".concat(treeViewAllowedChildren.join(', '), " are supported inside TreeView"),
|
|
54
|
+
moduleName: 'TreeView'
|
|
55
|
+
});
|
|
56
|
+
return;
|
|
57
|
+
}
|
|
58
|
+
var posInSet = childIndex + 1;
|
|
59
|
+
if (childComponentId === componentIds.TreeViewLoadMore) {
|
|
60
|
+
var _loadMoreProps$childr;
|
|
61
|
+
var loadMoreProps = child.props;
|
|
62
|
+
loadMoreCountInLevel++;
|
|
63
|
+
if (true) {
|
|
64
|
+
if (loadMoreCountInLevel > 1) {
|
|
65
|
+
logger({
|
|
66
|
+
type: 'warn',
|
|
67
|
+
moduleName: 'TreeViewLoadMore',
|
|
68
|
+
message: 'Only one TreeViewLoadMore is expected per branch'
|
|
69
|
+
});
|
|
70
|
+
}
|
|
71
|
+
if (childIndex !== childArray.length - 1) {
|
|
72
|
+
logger({
|
|
73
|
+
type: 'warn',
|
|
74
|
+
moduleName: 'TreeViewLoadMore',
|
|
75
|
+
message: 'TreeViewLoadMore should be the last child of its branch'
|
|
76
|
+
});
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
var loadMoreValue = makeLoadMoreValue(parentValue, posInSet);
|
|
80
|
+
var _node = {
|
|
81
|
+
kind: 'loadMore',
|
|
82
|
+
title: (_loadMoreProps$childr = loadMoreProps.children) !== null && _loadMoreProps$childr !== void 0 ? _loadMoreProps$childr : DEFAULT_LOAD_MORE_LABEL,
|
|
83
|
+
value: loadMoreValue,
|
|
84
|
+
parentValue: parentValue,
|
|
85
|
+
level: level,
|
|
86
|
+
posInSet: posInSet,
|
|
87
|
+
setSize: setSize,
|
|
88
|
+
isDisabled: isParentDisabled,
|
|
89
|
+
isBranch: false,
|
|
90
|
+
isSelectable: false,
|
|
91
|
+
hasRenderedChildren: false,
|
|
92
|
+
defaultIsExpanded: false,
|
|
93
|
+
isLoading: Boolean(loadMoreProps.isLoading),
|
|
94
|
+
childValues: [],
|
|
95
|
+
selectableLeafValues: [],
|
|
96
|
+
optionIndex: -1
|
|
97
|
+
};
|
|
98
|
+
if (!isParentDisabled) {
|
|
99
|
+
options.push({
|
|
100
|
+
title: _node.title,
|
|
101
|
+
value: loadMoreValue,
|
|
102
|
+
onClickTrigger: function onClickTrigger() {
|
|
103
|
+
if (!loadMoreProps.isLoading) {
|
|
104
|
+
loadMoreProps.onClick();
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
});
|
|
108
|
+
_node.optionIndex = options.length - 1;
|
|
109
|
+
}
|
|
110
|
+
orderedNodes.push(_node);
|
|
111
|
+
nodeMap[loadMoreValue] = _node;
|
|
112
|
+
childValues.push(loadMoreValue);
|
|
113
|
+
if (parentValue === null) {
|
|
114
|
+
rootValues.push(loadMoreValue);
|
|
115
|
+
}
|
|
116
|
+
return;
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
// TreeViewItem
|
|
120
|
+
var itemProps = child.props;
|
|
121
|
+
var title = itemProps.title,
|
|
122
|
+
value = itemProps.value,
|
|
123
|
+
isDisabled = itemProps.isDisabled,
|
|
124
|
+
hasChildren = itemProps.hasChildren,
|
|
125
|
+
onClick = itemProps.onClick;
|
|
126
|
+
if (nodeMap[value]) {
|
|
127
|
+
throwBladeError({
|
|
128
|
+
message: "Duplicate value \"".concat(value, "\" found in TreeViewItem. Values must be unique across the tree"),
|
|
129
|
+
moduleName: 'TreeView'
|
|
130
|
+
});
|
|
131
|
+
return;
|
|
132
|
+
}
|
|
133
|
+
var effectiveDisabled = Boolean(isDisabled) || isParentDisabled;
|
|
134
|
+
var hasRenderedChildren = React__default.Children.count(itemProps.children) > 0;
|
|
135
|
+
var isBranch = hasRenderedChildren || Boolean(hasChildren);
|
|
136
|
+
if (true && itemProps.isSelectable === false && !isBranch) {
|
|
137
|
+
logger({
|
|
138
|
+
type: 'warn',
|
|
139
|
+
moduleName: 'TreeViewItem',
|
|
140
|
+
message: "isSelectable={false} on \"".concat(value, "\" is ignored. It is only supported on branch items - leaf items are always selectable")
|
|
141
|
+
});
|
|
142
|
+
}
|
|
143
|
+
var node = {
|
|
144
|
+
kind: 'item',
|
|
145
|
+
title: title,
|
|
146
|
+
value: value,
|
|
147
|
+
parentValue: parentValue,
|
|
148
|
+
level: level,
|
|
149
|
+
posInSet: posInSet,
|
|
150
|
+
setSize: setSize,
|
|
151
|
+
isDisabled: effectiveDisabled,
|
|
152
|
+
isBranch: isBranch,
|
|
153
|
+
// leaves are always selectable; only branches can opt out
|
|
154
|
+
isSelectable: !isBranch || itemProps.isSelectable !== false,
|
|
155
|
+
hasRenderedChildren: hasRenderedChildren,
|
|
156
|
+
defaultIsExpanded: Boolean(itemProps.defaultIsExpanded),
|
|
157
|
+
controlledIsExpanded: itemProps.isExpanded,
|
|
158
|
+
onExpandChange: itemProps.onExpandChange,
|
|
159
|
+
isLoading: Boolean(itemProps.isLoading),
|
|
160
|
+
childValues: [],
|
|
161
|
+
selectableLeafValues: [],
|
|
162
|
+
optionIndex: -1
|
|
163
|
+
};
|
|
164
|
+
if (!effectiveDisabled) {
|
|
165
|
+
options.push({
|
|
166
|
+
title: title,
|
|
167
|
+
value: value,
|
|
168
|
+
onClickTrigger: function onClickTrigger(isSelected) {
|
|
169
|
+
onClick === null || onClick === void 0 || onClick({
|
|
170
|
+
name: value,
|
|
171
|
+
value: isSelected
|
|
172
|
+
});
|
|
173
|
+
}
|
|
174
|
+
});
|
|
175
|
+
node.optionIndex = options.length - 1;
|
|
176
|
+
}
|
|
177
|
+
orderedNodes.push(node);
|
|
178
|
+
nodeMap[value] = node;
|
|
179
|
+
childValues.push(value);
|
|
180
|
+
if (parentValue === null) {
|
|
181
|
+
rootValues.push(value);
|
|
182
|
+
}
|
|
183
|
+
if (hasRenderedChildren) {
|
|
184
|
+
var subtree = _walkLevel({
|
|
185
|
+
levelChildren: itemProps.children,
|
|
186
|
+
parentValue: value,
|
|
187
|
+
level: level + 1,
|
|
188
|
+
isParentDisabled: effectiveDisabled
|
|
189
|
+
});
|
|
190
|
+
node.childValues = subtree.childValues;
|
|
191
|
+
node.selectableLeafValues = subtree.selectableLeafValues;
|
|
192
|
+
}
|
|
193
|
+
if (isBranch) {
|
|
194
|
+
selectableLeafValues.push.apply(selectableLeafValues, _toConsumableArray(node.selectableLeafValues));
|
|
195
|
+
} else if (!effectiveDisabled) {
|
|
196
|
+
selectableLeafValues.push(value);
|
|
197
|
+
}
|
|
198
|
+
});
|
|
199
|
+
return {
|
|
200
|
+
selectableLeafValues: selectableLeafValues,
|
|
201
|
+
childValues: childValues
|
|
202
|
+
};
|
|
203
|
+
};
|
|
204
|
+
_walkLevel({
|
|
205
|
+
levelChildren: children,
|
|
206
|
+
parentValue: null,
|
|
207
|
+
level: 1,
|
|
208
|
+
isParentDisabled: false
|
|
209
|
+
});
|
|
210
|
+
if (true && maxLevel > TREEVIEW_MAX_RECOMMENDED_LEVEL) {
|
|
211
|
+
logger({
|
|
212
|
+
type: 'warn',
|
|
213
|
+
moduleName: 'TreeView',
|
|
214
|
+
message: "TreeView is nested ".concat(maxLevel, " levels deep. Nesting beyond ").concat(TREEVIEW_MAX_RECOMMENDED_LEVEL, " levels is not recommended")
|
|
215
|
+
});
|
|
216
|
+
}
|
|
217
|
+
return {
|
|
218
|
+
orderedNodes: orderedNodes,
|
|
219
|
+
nodeMap: nodeMap,
|
|
220
|
+
rootValues: rootValues,
|
|
221
|
+
options: options,
|
|
222
|
+
maxLevel: maxLevel
|
|
223
|
+
};
|
|
224
|
+
};
|
|
225
|
+
|
|
226
|
+
/**
|
|
227
|
+
* A selectable leaf is an enabled item without children (loaded or promised)
|
|
228
|
+
*/
|
|
229
|
+
var isSelectableLeaf = function isSelectableLeaf(node) {
|
|
230
|
+
return node.kind === 'item' && !node.isBranch && !node.isDisabled;
|
|
231
|
+
};
|
|
232
|
+
|
|
233
|
+
/**
|
|
234
|
+
* Derived branch checkbox state (B2). Never stored.
|
|
235
|
+
*
|
|
236
|
+
* - 'all': every enabled, loaded, selectable leaf descendant is selected (disabled descendants are ignored)
|
|
237
|
+
* - 'none': no selectable leaf descendant is selected (also for branches without loaded leaves)
|
|
238
|
+
* - 'some': anything in between (renders as indeterminate)
|
|
239
|
+
*/
|
|
240
|
+
var getBranchSelectionState = function getBranchSelectionState(node, selectedValues) {
|
|
241
|
+
if (node.selectableLeafValues.length === 0) {
|
|
242
|
+
return 'none';
|
|
243
|
+
}
|
|
244
|
+
var selectedCount = 0;
|
|
245
|
+
var _iterator = _createForOfIteratorHelper(node.selectableLeafValues),
|
|
246
|
+
_step;
|
|
247
|
+
try {
|
|
248
|
+
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
249
|
+
var leafValue = _step.value;
|
|
250
|
+
if (selectedValues.has(leafValue)) {
|
|
251
|
+
selectedCount++;
|
|
252
|
+
}
|
|
253
|
+
}
|
|
254
|
+
} catch (err) {
|
|
255
|
+
_iterator.e(err);
|
|
256
|
+
} finally {
|
|
257
|
+
_iterator.f();
|
|
258
|
+
}
|
|
259
|
+
if (selectedCount === 0) {
|
|
260
|
+
return 'none';
|
|
261
|
+
}
|
|
262
|
+
if (selectedCount === node.selectableLeafValues.length) {
|
|
263
|
+
return 'all';
|
|
264
|
+
}
|
|
265
|
+
return 'some';
|
|
266
|
+
};
|
|
267
|
+
|
|
268
|
+
/**
|
|
269
|
+
* Values of the topmost fully-selected branches (B3).
|
|
270
|
+
* When a branch is fully selected, its descendants branches are not included
|
|
271
|
+
*/
|
|
272
|
+
var getSelectedGroups = function getSelectedGroups(_ref2) {
|
|
273
|
+
var rootValues = _ref2.rootValues,
|
|
274
|
+
nodeMap = _ref2.nodeMap,
|
|
275
|
+
selectedValues = _ref2.selectedValues;
|
|
276
|
+
var selectedGroups = [];
|
|
277
|
+
var _visit = function visit(value) {
|
|
278
|
+
var node = nodeMap[value];
|
|
279
|
+
if (!node || node.kind === 'loadMore' || !node.isBranch || node.isDisabled) {
|
|
280
|
+
return;
|
|
281
|
+
}
|
|
282
|
+
if (getBranchSelectionState(node, selectedValues) === 'all') {
|
|
283
|
+
selectedGroups.push(value);
|
|
284
|
+
return;
|
|
285
|
+
}
|
|
286
|
+
node.childValues.forEach(_visit);
|
|
287
|
+
};
|
|
288
|
+
rootValues.forEach(_visit);
|
|
289
|
+
return selectedGroups;
|
|
290
|
+
};
|
|
291
|
+
|
|
292
|
+
/**
|
|
293
|
+
* Selected leaf values in document order
|
|
294
|
+
*/
|
|
295
|
+
var getSelectedLeafValues = function getSelectedLeafValues(orderedNodes, selectedValues) {
|
|
296
|
+
return orderedNodes.filter(function (node) {
|
|
297
|
+
return isSelectableLeaf(node) && selectedValues.has(node.value);
|
|
298
|
+
}).map(function (node) {
|
|
299
|
+
return node.value;
|
|
300
|
+
});
|
|
301
|
+
};
|
|
302
|
+
|
|
303
|
+
/**
|
|
304
|
+
* Smallest describing set for trigger display (D5):
|
|
305
|
+
* topmost fully-selected branches count as 1 each, remaining selected leaves count individually.
|
|
306
|
+
* Returns undefined when nothing is selected
|
|
307
|
+
*/
|
|
308
|
+
var getDisplayOverride = function getDisplayOverride(_ref3) {
|
|
309
|
+
var orderedNodes = _ref3.orderedNodes,
|
|
310
|
+
rootValues = _ref3.rootValues,
|
|
311
|
+
nodeMap = _ref3.nodeMap,
|
|
312
|
+
selectedValues = _ref3.selectedValues;
|
|
313
|
+
var selectedGroups = getSelectedGroups({
|
|
314
|
+
rootValues: rootValues,
|
|
315
|
+
nodeMap: nodeMap,
|
|
316
|
+
selectedValues: selectedValues
|
|
317
|
+
});
|
|
318
|
+
var coveredLeafValues = new Set(selectedGroups.flatMap(function (groupValue) {
|
|
319
|
+
return nodeMap[groupValue].selectableLeafValues;
|
|
320
|
+
}));
|
|
321
|
+
var entries = [];
|
|
322
|
+
// Walk in document order so groups and leaves stay in a stable, predictable order
|
|
323
|
+
var _iterator2 = _createForOfIteratorHelper(orderedNodes),
|
|
324
|
+
_step2;
|
|
325
|
+
try {
|
|
326
|
+
for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
|
|
327
|
+
var node = _step2.value;
|
|
328
|
+
if (selectedGroups.includes(node.value)) {
|
|
329
|
+
entries.push(node);
|
|
330
|
+
} else if (isSelectableLeaf(node) && selectedValues.has(node.value) && !coveredLeafValues.has(node.value)) {
|
|
331
|
+
entries.push(node);
|
|
332
|
+
}
|
|
333
|
+
}
|
|
334
|
+
} catch (err) {
|
|
335
|
+
_iterator2.e(err);
|
|
336
|
+
} finally {
|
|
337
|
+
_iterator2.f();
|
|
338
|
+
}
|
|
339
|
+
if (entries.length === 0) {
|
|
340
|
+
return undefined;
|
|
341
|
+
}
|
|
342
|
+
return {
|
|
343
|
+
label: entries[0].title,
|
|
344
|
+
count: entries.length
|
|
345
|
+
};
|
|
346
|
+
};
|
|
347
|
+
|
|
348
|
+
/**
|
|
349
|
+
* Values of rows that are currently traversable: enabled and not hidden under a collapsed
|
|
350
|
+
* (or disabled) ancestor. Used by the keyboard maps of both modes. LoadMore rows included
|
|
351
|
+
*/
|
|
352
|
+
var getVisibleValues = function getVisibleValues(_ref4) {
|
|
353
|
+
var orderedNodes = _ref4.orderedNodes,
|
|
354
|
+
nodeMap = _ref4.nodeMap,
|
|
355
|
+
expandedValues = _ref4.expandedValues;
|
|
356
|
+
var isVisible = function isVisible(node) {
|
|
357
|
+
if (node.isDisabled) {
|
|
358
|
+
return false;
|
|
359
|
+
}
|
|
360
|
+
var parentValue = node.parentValue;
|
|
361
|
+
while (parentValue !== null) {
|
|
362
|
+
var _nodeMap$parentValue$, _nodeMap$parentValue;
|
|
363
|
+
if (!expandedValues.has(parentValue)) {
|
|
364
|
+
return false;
|
|
365
|
+
}
|
|
366
|
+
parentValue = (_nodeMap$parentValue$ = (_nodeMap$parentValue = nodeMap[parentValue]) === null || _nodeMap$parentValue === void 0 ? void 0 : _nodeMap$parentValue.parentValue) !== null && _nodeMap$parentValue$ !== void 0 ? _nodeMap$parentValue$ : null;
|
|
367
|
+
}
|
|
368
|
+
return true;
|
|
369
|
+
};
|
|
370
|
+
return orderedNodes.filter(isVisible).map(function (node) {
|
|
371
|
+
return node.value;
|
|
372
|
+
});
|
|
373
|
+
};
|
|
374
|
+
|
|
375
|
+
/**
|
|
376
|
+
* Option indices (Dropdown mode) of currently visible rows, used for visibility-aware
|
|
377
|
+
* keyboard traversal (mirrors AutoComplete's filteredValues mechanism)
|
|
378
|
+
*/
|
|
379
|
+
var getVisibleOptionIndices = function getVisibleOptionIndices(_ref5) {
|
|
380
|
+
var orderedNodes = _ref5.orderedNodes,
|
|
381
|
+
nodeMap = _ref5.nodeMap,
|
|
382
|
+
expandedValues = _ref5.expandedValues;
|
|
383
|
+
return getVisibleValues({
|
|
384
|
+
orderedNodes: orderedNodes,
|
|
385
|
+
nodeMap: nodeMap,
|
|
386
|
+
expandedValues: expandedValues
|
|
387
|
+
}).map(function (value) {
|
|
388
|
+
return nodeMap[value].optionIndex;
|
|
389
|
+
}).filter(function (optionIndex) {
|
|
390
|
+
return optionIndex >= 0;
|
|
391
|
+
});
|
|
392
|
+
};
|
|
393
|
+
|
|
394
|
+
/**
|
|
395
|
+
* Standalone multiple-selection toggle (B2 cascade).
|
|
396
|
+
* Returns a new Set - toggling a branch toggles all its enabled, loaded leaves
|
|
397
|
+
*/
|
|
398
|
+
var getSelectionOnNodeToggle = function getSelectionOnNodeToggle(_ref6) {
|
|
399
|
+
var node = _ref6.node,
|
|
400
|
+
selectedValues = _ref6.selectedValues;
|
|
401
|
+
var next = new Set(selectedValues);
|
|
402
|
+
if (node.isBranch) {
|
|
403
|
+
var shouldDeselect = getBranchSelectionState(node, selectedValues) === 'all';
|
|
404
|
+
var _iterator3 = _createForOfIteratorHelper(node.selectableLeafValues),
|
|
405
|
+
_step3;
|
|
406
|
+
try {
|
|
407
|
+
for (_iterator3.s(); !(_step3 = _iterator3.n()).done;) {
|
|
408
|
+
var leafValue = _step3.value;
|
|
409
|
+
if (shouldDeselect) {
|
|
410
|
+
next["delete"](leafValue);
|
|
411
|
+
} else {
|
|
412
|
+
next.add(leafValue);
|
|
413
|
+
}
|
|
414
|
+
}
|
|
415
|
+
} catch (err) {
|
|
416
|
+
_iterator3.e(err);
|
|
417
|
+
} finally {
|
|
418
|
+
_iterator3.f();
|
|
419
|
+
}
|
|
420
|
+
return next;
|
|
421
|
+
}
|
|
422
|
+
if (next.has(node.value)) {
|
|
423
|
+
next["delete"](node.value);
|
|
424
|
+
} else {
|
|
425
|
+
next.add(node.value);
|
|
426
|
+
}
|
|
427
|
+
return next;
|
|
428
|
+
};
|
|
429
|
+
|
|
430
|
+
/**
|
|
431
|
+
* B6: newly loaded children inherit the parent's selection.
|
|
432
|
+
* A new leaf becomes selected iff its nearest pre-existing ancestor branch
|
|
433
|
+
* was fully selected (with at least one leaf) before the new children arrived
|
|
434
|
+
*/
|
|
435
|
+
var getSelectionAfterLoad = function getSelectionAfterLoad(_ref7) {
|
|
436
|
+
var previousNodeMap = _ref7.previousNodeMap,
|
|
437
|
+
nodeMap = _ref7.nodeMap,
|
|
438
|
+
orderedNodes = _ref7.orderedNodes,
|
|
439
|
+
selectedValues = _ref7.selectedValues;
|
|
440
|
+
var next = new Set(selectedValues);
|
|
441
|
+
var _iterator4 = _createForOfIteratorHelper(orderedNodes),
|
|
442
|
+
_step4;
|
|
443
|
+
try {
|
|
444
|
+
for (_iterator4.s(); !(_step4 = _iterator4.n()).done;) {
|
|
445
|
+
var node = _step4.value;
|
|
446
|
+
if (!isSelectableLeaf(node) || previousNodeMap[node.value]) {
|
|
447
|
+
continue;
|
|
448
|
+
}
|
|
449
|
+
|
|
450
|
+
// find the nearest ancestor that existed before this load
|
|
451
|
+
var ancestorValue = node.parentValue;
|
|
452
|
+
while (ancestorValue !== null && !previousNodeMap[ancestorValue]) {
|
|
453
|
+
var _nodeMap$ancestorValu, _nodeMap$ancestorValu2;
|
|
454
|
+
ancestorValue = (_nodeMap$ancestorValu = (_nodeMap$ancestorValu2 = nodeMap[ancestorValue]) === null || _nodeMap$ancestorValu2 === void 0 ? void 0 : _nodeMap$ancestorValu2.parentValue) !== null && _nodeMap$ancestorValu !== void 0 ? _nodeMap$ancestorValu : null;
|
|
455
|
+
}
|
|
456
|
+
if (ancestorValue === null) {
|
|
457
|
+
continue;
|
|
458
|
+
}
|
|
459
|
+
var previousAncestor = previousNodeMap[ancestorValue];
|
|
460
|
+
if (previousAncestor.selectableLeafValues.length > 0 && previousAncestor.selectableLeafValues.every(function (leafValue) {
|
|
461
|
+
return selectedValues.has(leafValue);
|
|
462
|
+
})) {
|
|
463
|
+
next.add(node.value);
|
|
464
|
+
}
|
|
465
|
+
}
|
|
466
|
+
} catch (err) {
|
|
467
|
+
_iterator4.e(err);
|
|
468
|
+
} finally {
|
|
469
|
+
_iterator4.f();
|
|
470
|
+
}
|
|
471
|
+
return next;
|
|
472
|
+
};
|
|
473
|
+
|
|
474
|
+
export { DEFAULT_LOAD_MORE_LABEL, TREEVIEW_MAX_RECOMMENDED_LEVEL, getBranchSelectionState, getDisplayOverride, getSelectedGroups, getSelectedLeafValues, getSelectionAfterLoad, getSelectionOnNodeToggle, getTreeViewProperties, getVisibleOptionIndices, getVisibleValues, isSelectableLeaf, isTreeViewLoadMoreValue, makeLoadMoreValue };
|
|
475
|
+
//# sourceMappingURL=treeViewUtils.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"treeViewUtils.js","sources":["../../../../../../src/components/TreeView/treeViewUtils.ts"],"sourcesContent":["import React from 'react';\nimport { componentIds } from './componentIds';\nimport type {\n BranchSelectionStateType,\n TreeViewDisplayOverrideType,\n TreeViewItemProps,\n TreeViewLoadMoreProps,\n TreeViewNodeType,\n} from './types';\nimport type { OptionsType } from '~components/Dropdown/useDropdown';\nimport { getComponentId } from '~utils/isValidAllowedChildren';\nimport { logger, throwBladeError } from '~utils/logger';\n\nconst treeViewAllowedChildren = [componentIds.TreeViewItem, componentIds.TreeViewLoadMore];\n\nconst TREEVIEW_MAX_RECOMMENDED_LEVEL = 3;\nconst DEFAULT_LOAD_MORE_LABEL = 'Show more';\n\n/**\n * Internal value assigned to TreeViewLoadMore rows so they can participate\n * in the flat registration list without colliding with consumer values\n */\nconst makeLoadMoreValue = (parentValue: string | null, posInSet: number): string =>\n `__blade-tree-load-more__${parentValue ?? '$root'}__${posInSet}`;\n\nconst isTreeViewLoadMoreValue = (value: string): boolean =>\n value.startsWith('__blade-tree-load-more__');\n\ntype TreeViewPropertiesType = {\n /**\n * All rows in document order (including disabled subtrees, which render but are not registered)\n */\n orderedNodes: TreeViewNodeType[];\n nodeMap: Record<string, TreeViewNodeType>;\n /**\n * Values of the root level rows, in document order\n */\n rootValues: string[];\n /**\n * Flat registration list for Dropdown mode. Same shape as ActionList's options.\n * Contains every enabled row (branch, leaf, loadMore) in document order; disabled subtrees excluded\n */\n options: OptionsType;\n maxLevel: number;\n};\n\n/**\n * Walks the TreeView children and returns the normalized node registry,\n * the flat Dropdown registration list, and runs dev-time validations (B10)\n */\nconst getTreeViewProperties = (children: React.ReactNode): TreeViewPropertiesType => {\n const orderedNodes: TreeViewNodeType[] = [];\n const nodeMap: Record<string, TreeViewNodeType> = {};\n const rootValues: string[] = [];\n const options: OptionsType = [];\n let maxLevel = 0;\n\n const walkLevel = ({\n levelChildren,\n parentValue,\n level,\n isParentDisabled,\n }: {\n levelChildren: React.ReactNode;\n parentValue: string | null;\n level: number;\n isParentDisabled: boolean;\n }): { selectableLeafValues: string[]; childValues: string[] } => {\n const childArray = React.Children.toArray(levelChildren);\n const setSize = childArray.length;\n const selectableLeafValues: string[] = [];\n const childValues: string[] = [];\n let loadMoreCountInLevel = 0;\n\n if (level > maxLevel) {\n maxLevel = level;\n }\n\n childArray.forEach((child, childIndex) => {\n const childComponentId = getComponentId(child);\n if (\n !React.isValidElement(child) ||\n !childComponentId ||\n !treeViewAllowedChildren.includes(childComponentId)\n ) {\n throwBladeError({\n message: `Only ${treeViewAllowedChildren.join(', ')} are supported inside TreeView`,\n moduleName: 'TreeView',\n });\n return;\n }\n\n const posInSet = childIndex + 1;\n\n if (childComponentId === componentIds.TreeViewLoadMore) {\n const loadMoreProps = child.props as TreeViewLoadMoreProps;\n loadMoreCountInLevel++;\n if (__DEV__) {\n if (loadMoreCountInLevel > 1) {\n logger({\n type: 'warn',\n moduleName: 'TreeViewLoadMore',\n message: 'Only one TreeViewLoadMore is expected per branch',\n });\n }\n if (childIndex !== childArray.length - 1) {\n logger({\n type: 'warn',\n moduleName: 'TreeViewLoadMore',\n message: 'TreeViewLoadMore should be the last child of its branch',\n });\n }\n }\n\n const loadMoreValue = makeLoadMoreValue(parentValue, posInSet);\n const node: TreeViewNodeType = {\n kind: 'loadMore',\n title: loadMoreProps.children ?? DEFAULT_LOAD_MORE_LABEL,\n value: loadMoreValue,\n parentValue,\n level,\n posInSet,\n setSize,\n isDisabled: isParentDisabled,\n isBranch: false,\n isSelectable: false,\n hasRenderedChildren: false,\n defaultIsExpanded: false,\n isLoading: Boolean(loadMoreProps.isLoading),\n childValues: [],\n selectableLeafValues: [],\n optionIndex: -1,\n };\n\n if (!isParentDisabled) {\n options.push({\n title: node.title,\n value: loadMoreValue,\n onClickTrigger: () => {\n if (!loadMoreProps.isLoading) {\n loadMoreProps.onClick();\n }\n },\n });\n node.optionIndex = options.length - 1;\n }\n\n orderedNodes.push(node);\n nodeMap[loadMoreValue] = node;\n childValues.push(loadMoreValue);\n if (parentValue === null) {\n rootValues.push(loadMoreValue);\n }\n return;\n }\n\n // TreeViewItem\n const itemProps = child.props as TreeViewItemProps;\n const { title, value, isDisabled, hasChildren, onClick } = itemProps;\n\n if (nodeMap[value]) {\n throwBladeError({\n message: `Duplicate value \"${value}\" found in TreeViewItem. Values must be unique across the tree`,\n moduleName: 'TreeView',\n });\n return;\n }\n\n const effectiveDisabled = Boolean(isDisabled) || isParentDisabled;\n const hasRenderedChildren = React.Children.count(itemProps.children) > 0;\n const isBranch = hasRenderedChildren || Boolean(hasChildren);\n\n if (__DEV__ && itemProps.isSelectable === false && !isBranch) {\n logger({\n type: 'warn',\n moduleName: 'TreeViewItem',\n message: `isSelectable={false} on \"${value}\" is ignored. It is only supported on branch items - leaf items are always selectable`,\n });\n }\n\n const node: TreeViewNodeType = {\n kind: 'item',\n title,\n value,\n parentValue,\n level,\n posInSet,\n setSize,\n isDisabled: effectiveDisabled,\n isBranch,\n // leaves are always selectable; only branches can opt out\n isSelectable: !isBranch || itemProps.isSelectable !== false,\n hasRenderedChildren,\n defaultIsExpanded: Boolean(itemProps.defaultIsExpanded),\n controlledIsExpanded: itemProps.isExpanded,\n onExpandChange: itemProps.onExpandChange,\n isLoading: Boolean(itemProps.isLoading),\n childValues: [],\n selectableLeafValues: [],\n optionIndex: -1,\n };\n\n if (!effectiveDisabled) {\n options.push({\n title,\n value,\n onClickTrigger: (isSelected) => {\n onClick?.({ name: value, value: isSelected });\n },\n });\n node.optionIndex = options.length - 1;\n }\n\n orderedNodes.push(node);\n nodeMap[value] = node;\n childValues.push(value);\n if (parentValue === null) {\n rootValues.push(value);\n }\n\n if (hasRenderedChildren) {\n const subtree = walkLevel({\n levelChildren: itemProps.children,\n parentValue: value,\n level: level + 1,\n isParentDisabled: effectiveDisabled,\n });\n node.childValues = subtree.childValues;\n node.selectableLeafValues = subtree.selectableLeafValues;\n }\n\n if (isBranch) {\n selectableLeafValues.push(...node.selectableLeafValues);\n } else if (!effectiveDisabled) {\n selectableLeafValues.push(value);\n }\n });\n\n return { selectableLeafValues, childValues };\n };\n\n walkLevel({ levelChildren: children, parentValue: null, level: 1, isParentDisabled: false });\n\n if (__DEV__ && maxLevel > TREEVIEW_MAX_RECOMMENDED_LEVEL) {\n logger({\n type: 'warn',\n moduleName: 'TreeView',\n message: `TreeView is nested ${maxLevel} levels deep. Nesting beyond ${TREEVIEW_MAX_RECOMMENDED_LEVEL} levels is not recommended`,\n });\n }\n\n return { orderedNodes, nodeMap, rootValues, options, maxLevel };\n};\n\n/**\n * A selectable leaf is an enabled item without children (loaded or promised)\n */\nconst isSelectableLeaf = (node: TreeViewNodeType): boolean =>\n node.kind === 'item' && !node.isBranch && !node.isDisabled;\n\n/**\n * Derived branch checkbox state (B2). Never stored.\n *\n * - 'all': every enabled, loaded, selectable leaf descendant is selected (disabled descendants are ignored)\n * - 'none': no selectable leaf descendant is selected (also for branches without loaded leaves)\n * - 'some': anything in between (renders as indeterminate)\n */\nconst getBranchSelectionState = (\n node: TreeViewNodeType,\n selectedValues: Set<string>,\n): BranchSelectionStateType => {\n if (node.selectableLeafValues.length === 0) {\n return 'none';\n }\n\n let selectedCount = 0;\n for (const leafValue of node.selectableLeafValues) {\n if (selectedValues.has(leafValue)) {\n selectedCount++;\n }\n }\n\n if (selectedCount === 0) {\n return 'none';\n }\n\n if (selectedCount === node.selectableLeafValues.length) {\n return 'all';\n }\n\n return 'some';\n};\n\n/**\n * Values of the topmost fully-selected branches (B3).\n * When a branch is fully selected, its descendants branches are not included\n */\nconst getSelectedGroups = ({\n rootValues,\n nodeMap,\n selectedValues,\n}: {\n rootValues: string[];\n nodeMap: Record<string, TreeViewNodeType>;\n selectedValues: Set<string>;\n}): string[] => {\n const selectedGroups: string[] = [];\n\n const visit = (value: string): void => {\n const node = nodeMap[value];\n if (!node || node.kind === 'loadMore' || !node.isBranch || node.isDisabled) {\n return;\n }\n\n if (getBranchSelectionState(node, selectedValues) === 'all') {\n selectedGroups.push(value);\n return;\n }\n\n node.childValues.forEach(visit);\n };\n\n rootValues.forEach(visit);\n return selectedGroups;\n};\n\n/**\n * Selected leaf values in document order\n */\nconst getSelectedLeafValues = (\n orderedNodes: TreeViewNodeType[],\n selectedValues: Set<string>,\n): string[] =>\n orderedNodes\n .filter((node) => isSelectableLeaf(node) && selectedValues.has(node.value))\n .map((node) => node.value);\n\n/**\n * Smallest describing set for trigger display (D5):\n * topmost fully-selected branches count as 1 each, remaining selected leaves count individually.\n * Returns undefined when nothing is selected\n */\nconst getDisplayOverride = ({\n orderedNodes,\n rootValues,\n nodeMap,\n selectedValues,\n}: {\n orderedNodes: TreeViewNodeType[];\n rootValues: string[];\n nodeMap: Record<string, TreeViewNodeType>;\n selectedValues: Set<string>;\n}): TreeViewDisplayOverrideType | undefined => {\n const selectedGroups = getSelectedGroups({ rootValues, nodeMap, selectedValues });\n const coveredLeafValues = new Set(\n selectedGroups.flatMap((groupValue) => nodeMap[groupValue].selectableLeafValues),\n );\n\n const entries: TreeViewNodeType[] = [];\n // Walk in document order so groups and leaves stay in a stable, predictable order\n for (const node of orderedNodes) {\n if (selectedGroups.includes(node.value)) {\n entries.push(node);\n } else if (\n isSelectableLeaf(node) &&\n selectedValues.has(node.value) &&\n !coveredLeafValues.has(node.value)\n ) {\n entries.push(node);\n }\n }\n\n if (entries.length === 0) {\n return undefined;\n }\n\n return { label: entries[0].title, count: entries.length };\n};\n\n/**\n * Values of rows that are currently traversable: enabled and not hidden under a collapsed\n * (or disabled) ancestor. Used by the keyboard maps of both modes. LoadMore rows included\n */\nconst getVisibleValues = ({\n orderedNodes,\n nodeMap,\n expandedValues,\n}: {\n orderedNodes: TreeViewNodeType[];\n nodeMap: Record<string, TreeViewNodeType>;\n expandedValues: Set<string>;\n}): string[] => {\n const isVisible = (node: TreeViewNodeType): boolean => {\n if (node.isDisabled) {\n return false;\n }\n let parentValue = node.parentValue;\n while (parentValue !== null) {\n if (!expandedValues.has(parentValue)) {\n return false;\n }\n parentValue = nodeMap[parentValue]?.parentValue ?? null;\n }\n return true;\n };\n\n return orderedNodes.filter(isVisible).map((node) => node.value);\n};\n\n/**\n * Option indices (Dropdown mode) of currently visible rows, used for visibility-aware\n * keyboard traversal (mirrors AutoComplete's filteredValues mechanism)\n */\nconst getVisibleOptionIndices = ({\n orderedNodes,\n nodeMap,\n expandedValues,\n}: {\n orderedNodes: TreeViewNodeType[];\n nodeMap: Record<string, TreeViewNodeType>;\n expandedValues: Set<string>;\n}): number[] =>\n getVisibleValues({ orderedNodes, nodeMap, expandedValues })\n .map((value) => nodeMap[value].optionIndex)\n .filter((optionIndex) => optionIndex >= 0);\n\n/**\n * Standalone multiple-selection toggle (B2 cascade).\n * Returns a new Set - toggling a branch toggles all its enabled, loaded leaves\n */\nconst getSelectionOnNodeToggle = ({\n node,\n selectedValues,\n}: {\n node: TreeViewNodeType;\n selectedValues: Set<string>;\n}): Set<string> => {\n const next = new Set(selectedValues);\n\n if (node.isBranch) {\n const shouldDeselect = getBranchSelectionState(node, selectedValues) === 'all';\n for (const leafValue of node.selectableLeafValues) {\n if (shouldDeselect) {\n next.delete(leafValue);\n } else {\n next.add(leafValue);\n }\n }\n return next;\n }\n\n if (next.has(node.value)) {\n next.delete(node.value);\n } else {\n next.add(node.value);\n }\n return next;\n};\n\n/**\n * B6: newly loaded children inherit the parent's selection.\n * A new leaf becomes selected iff its nearest pre-existing ancestor branch\n * was fully selected (with at least one leaf) before the new children arrived\n */\nconst getSelectionAfterLoad = ({\n previousNodeMap,\n nodeMap,\n orderedNodes,\n selectedValues,\n}: {\n previousNodeMap: Record<string, TreeViewNodeType>;\n nodeMap: Record<string, TreeViewNodeType>;\n orderedNodes: TreeViewNodeType[];\n selectedValues: Set<string>;\n}): Set<string> => {\n const next = new Set(selectedValues);\n\n for (const node of orderedNodes) {\n if (!isSelectableLeaf(node) || previousNodeMap[node.value]) {\n continue;\n }\n\n // find the nearest ancestor that existed before this load\n let ancestorValue = node.parentValue;\n while (ancestorValue !== null && !previousNodeMap[ancestorValue]) {\n ancestorValue = nodeMap[ancestorValue]?.parentValue ?? null;\n }\n\n if (ancestorValue === null) {\n continue;\n }\n\n const previousAncestor = previousNodeMap[ancestorValue];\n if (\n previousAncestor.selectableLeafValues.length > 0 &&\n previousAncestor.selectableLeafValues.every((leafValue) => selectedValues.has(leafValue))\n ) {\n next.add(node.value);\n }\n }\n\n return next;\n};\n\nexport {\n getTreeViewProperties,\n getBranchSelectionState,\n getSelectedGroups,\n getSelectedLeafValues,\n getDisplayOverride,\n getVisibleValues,\n getVisibleOptionIndices,\n getSelectionOnNodeToggle,\n getSelectionAfterLoad,\n isSelectableLeaf,\n isTreeViewLoadMoreValue,\n makeLoadMoreValue,\n TREEVIEW_MAX_RECOMMENDED_LEVEL,\n DEFAULT_LOAD_MORE_LABEL,\n};\nexport type { TreeViewPropertiesType };\n"],"names":["treeViewAllowedChildren","componentIds","TreeViewItem","TreeViewLoadMore","TREEVIEW_MAX_RECOMMENDED_LEVEL","DEFAULT_LOAD_MORE_LABEL","makeLoadMoreValue","parentValue","posInSet","concat","isTreeViewLoadMoreValue","value","startsWith","getTreeViewProperties","children","orderedNodes","nodeMap","rootValues","options","maxLevel","walkLevel","_ref","levelChildren","level","isParentDisabled","childArray","React","Children","toArray","setSize","length","selectableLeafValues","childValues","loadMoreCountInLevel","forEach","child","childIndex","childComponentId","getComponentId","isValidElement","includes","throwBladeError","message","join","moduleName","_loadMoreProps$childr","loadMoreProps","props","logger","type","loadMoreValue","node","kind","title","isDisabled","isBranch","isSelectable","hasRenderedChildren","defaultIsExpanded","isLoading","Boolean","optionIndex","push","onClickTrigger","onClick","itemProps","hasChildren","effectiveDisabled","count","controlledIsExpanded","isExpanded","onExpandChange","isSelected","name","subtree","apply","_toConsumableArray","isSelectableLeaf","getBranchSelectionState","selectedValues","selectedCount","_iterator","_createForOfIteratorHelper","_step","s","n","done","leafValue","has","err","e","f","getSelectedGroups","_ref2","selectedGroups","visit","getSelectedLeafValues","filter","map","getDisplayOverride","_ref3","coveredLeafValues","Set","flatMap","groupValue","entries","_iterator2","_step2","undefined","label","getVisibleValues","_ref4","expandedValues","isVisible","_nodeMap$parentValue$","_nodeMap$parentValue","getVisibleOptionIndices","_ref5","getSelectionOnNodeToggle","_ref6","next","shouldDeselect","_iterator3","_step3","add","getSelectionAfterLoad","_ref7","previousNodeMap","_iterator4","_step4","ancestorValue","_nodeMap$ancestorValu","_nodeMap$ancestorValu2","previousAncestor","every"],"mappings":";;;;;;;;;;;AAaA,IAAMA,uBAAuB,GAAG,CAACC,YAAY,CAACC,YAAY,EAAED,YAAY,CAACE,gBAAgB,CAAC,CAAA;AAEpFC,IAAAA,8BAA8B,GAAG,EAAC;AAClCC,IAAAA,uBAAuB,GAAG,YAAW;;AAE3C;AACA;AACA;AACA;AACA,IAAMC,iBAAiB,GAAG,SAApBA,iBAAiBA,CAAIC,WAA0B,EAAEC,QAAgB,EAAA;AAAA,EAAA,OAAA,0BAAA,CAAAC,MAAA,CAC1C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AA;AAAA,OAAA,CAAC,EACzF;AACAiC,QAAAA,IAAI,CAACI,GAAG,CAACzE,IAAI,CAACxC,KAAK,CAAC,CAAA;AACtB,OAAA;AACF,KAAA;AAAC,GAAA,CAAA,OAAA8E,GAAA,EAAA;IAAAuC,UAAA,CAAAtC,CAAA,CAAAD,GAAA,CAAA,CAAA;AAAA,GAAA,SAAA;AAAAuC,IAAAA,UAAA,CAAArC,CAAA,EAAA,CAAA;AAAA,GAAA;AAED,EAAA,OAAO6B,IAAI,CAAA;AACb;;;;"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import React__default from 'react';
|
|
2
|
+
import '../../utils/logger/index.js';
|
|
3
|
+
import { throwBladeError } from '../../utils/logger/logger.js';
|
|
4
|
+
|
|
5
|
+
var TreeViewContext = /*#__PURE__*/React__default.createContext(null);
|
|
6
|
+
var useTreeViewContext = function useTreeViewContext() {
|
|
7
|
+
var context = React__default.useContext(TreeViewContext);
|
|
8
|
+
if (!context) {
|
|
9
|
+
throwBladeError({
|
|
10
|
+
message: 'TreeViewItem and TreeViewLoadMore must be used within TreeView',
|
|
11
|
+
moduleName: 'TreeView'
|
|
12
|
+
});
|
|
13
|
+
}
|
|
14
|
+
return context;
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* Provides the parent TreeViewItem's value to nested rows.
|
|
19
|
+
* null at the root level. Used by TreeViewLoadMore to find its own node in the registry
|
|
20
|
+
*/
|
|
21
|
+
var TreeViewParentContext = /*#__PURE__*/React__default.createContext(null);
|
|
22
|
+
|
|
23
|
+
export { TreeViewContext, TreeViewParentContext, useTreeViewContext };
|
|
24
|
+
//# sourceMappingURL=useTreeView.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useTreeView.js","sources":["../../../../../../src/components/TreeView/useTreeView.ts"],"sourcesContent":["import React from 'react';\nimport type { TreeViewNodeType } from './types';\nimport { throwBladeError } from '~utils/logger';\n\ntype TreeViewContextType = {\n /**\n * Effective selection type. Inside Dropdown, inherited from Dropdown's selectionType\n */\n selectionType: 'single' | 'multiple';\n /**\n * true when TreeView is rendered inside a Dropdown (detected via dropdownBaseId)\n */\n isInsideDropdown: boolean;\n /**\n * Base id for row DOM ids in standalone mode\n */\n baseId: string;\n nodeMap: Record<string, TreeViewNodeType>;\n /**\n * Source of truth for selection state, unified across modes:\n * - standalone: TreeView-owned Set of selected values\n * - Dropdown: derived from Dropdown's selectedIndices\n */\n selectedValuesSet: Set<string>;\n /**\n * Values of currently expanded branches (uncontrolled state merged with controlled `isExpanded` props)\n */\n expandedValues: Set<string>;\n /**\n * The row that currently holds tabIndex=0 in standalone mode (roving tabindex)\n */\n tabbableValue: string | null;\n /**\n * Standalone row selection (single select / multiple cascade toggle)\n */\n onNodeSelect: (value: string) => void;\n /**\n * Toggles expansion of a branch (both modes)\n */\n onNodeExpandToggle: (value: string) => void;\n /**\n * Dropdown-mode row click routing (leaf -> selectOption, branch multiple -> batch toggle, loadMore -> onClick)\n */\n onDropdownNodeClick: (event: React.MouseEvent<HTMLButtonElement>, value: string) => void;\n /**\n * Rows register their DOM node for focus management and scroll-into-view\n */\n registerRowRef: (value: string, element: HTMLElement | null) => void;\n /**\n * Standalone: updates the roving tabindex target when a row receives focus\n */\n setFocusedValue: (value: string) => void;\n};\n\nconst TreeViewContext = React.createContext<TreeViewContextType | null>(null);\n\nconst useTreeViewContext = (): TreeViewContextType => {\n const context = React.useContext(TreeViewContext);\n if (!context) {\n throwBladeError({\n message: 'TreeViewItem and TreeViewLoadMore must be used within TreeView',\n moduleName: 'TreeView',\n });\n }\n return context!;\n};\n\n/**\n * Provides the parent TreeViewItem's value to nested rows.\n * null at the root level. Used by TreeViewLoadMore to find its own node in the registry\n */\nconst TreeViewParentContext = React.createContext<string | null>(null);\n\nexport { TreeViewContext, TreeViewParentContext, useTreeViewContext };\nexport type { TreeViewContextType };\n"],"names":["TreeViewContext","React","createContext","useTreeViewContext","context","useContext","throwBladeError","message","moduleName","TreeViewParentContext"],"mappings":";;;;AAsDA,IAAMA,eAAe,gBAAGC,cAAK,CAACC,aAAa,CAA6B,IAAI,EAAC;AAE7E,IAAMC,kBAAkB,GAAG,SAArBA,kBAAkBA,GAA8B;AACpD,EAAA,IAAMC,OAAO,GAAGH,cAAK,CAACI,UAAU,CAACL,eAAe,CAAC,CAAA;EACjD,IAAI,CAACI,OAAO,EAAE;AACZE,IAAAA,eAAe,CAAC;AACdC,MAAAA,OAAO,EAAE,gEAAgE;AACzEC,MAAAA,UAAU,EAAE,UAAA;AACd,KAAC,CAAC,CAAA;AACJ,GAAA;AACA,EAAA,OAAOJ,OAAO,CAAA;AAChB,EAAC;;AAED;AACA;AACA;AACA;AACA,IAAMK,qBAAqB,gBAAGR,cAAK,CAACC,aAAa,CAAgB,IAAI;;;;"}
|
|
@@ -33,6 +33,7 @@ import './Elevate/index.js';
|
|
|
33
33
|
import './EmptyState/index.js';
|
|
34
34
|
import './Fade/index.js';
|
|
35
35
|
import './FileUpload/index.js';
|
|
36
|
+
import './FloatingActionButton/index.js';
|
|
36
37
|
import './Icons/index.js';
|
|
37
38
|
import './InfoGroup/index.js';
|
|
38
39
|
import './Indicator/index.js';
|
|
@@ -59,6 +60,7 @@ import './QuickFilters/index.js';
|
|
|
59
60
|
import './Radio/index.js';
|
|
60
61
|
import './TrustBadge/index.js';
|
|
61
62
|
import './Scale/index.js';
|
|
63
|
+
import './SegmentedControl/index.js';
|
|
62
64
|
import './SideNav/index.js';
|
|
63
65
|
import './Skeleton/index.js';
|
|
64
66
|
import './SkipNav/index.web.js';
|
|
@@ -75,6 +77,7 @@ import './TimePicker/index.js';
|
|
|
75
77
|
import './Tooltip/index.js';
|
|
76
78
|
import './Toast/index.js';
|
|
77
79
|
import './TopNav/index.js';
|
|
80
|
+
import './TreeView/index.web.js';
|
|
78
81
|
import './types.js';
|
|
79
82
|
import './Typography/index.js';
|
|
80
83
|
import './VisuallyHidden/index.web.js';
|
|
@@ -128,7 +131,7 @@ export { ChartLine, ChartLineWrapper } from './Charts/LineChart/LineChart.web.js
|
|
|
128
131
|
export { ChartArea, ChartAreaWrapper } from './Charts/AreaChart/AreaChart.web.js';
|
|
129
132
|
export { ChartDonut, ChartDonutCell, ChartDonutWrapper } from './Charts/DonutChart/DonutChart.web.js';
|
|
130
133
|
export { ChartBar, ChartBarWrapper } from './Charts/BarChart/BarChart.web.js';
|
|
131
|
-
export { ChartCartesianGrid, ChartLegend, ChartReferenceLine, ChartTooltip, ChartXAxis, ChartYAxis } from './Charts/CommonChartComponents/CommonChartComponents.web.js';
|
|
134
|
+
export { ChartCartesianGrid, ChartLegend, ChartReferenceBand, ChartReferenceLine, ChartTooltip, ChartXAxis, ChartYAxis } from './Charts/CommonChartComponents/CommonChartComponents.web.js';
|
|
132
135
|
export { CommonChartComponentsContext, useCommonChartComponentsContext } from './Charts/CommonChartComponents/CommonChartComponentsContext.js';
|
|
133
136
|
export { DEFAULT_COLOR, componentId } from './Charts/CommonChartComponents/tokens.js';
|
|
134
137
|
export { ChartSankey, ChartSankeyWrapper } from './Charts/SankeyChart/SankeyChart.web.js';
|
|
@@ -160,6 +163,7 @@ export { EmptyState } from './EmptyState/EmptyState.web.js';
|
|
|
160
163
|
export { Fade } from './Fade/Fade.web.js';
|
|
161
164
|
export { FileUpload } from './FileUpload/FileUpload.web.js';
|
|
162
165
|
export { FileUploadItem } from './FileUpload/FileUploadItem.js';
|
|
166
|
+
export { FloatingActionButton } from './FloatingActionButton/FloatingActionButton.js';
|
|
163
167
|
export { default as AcceptPaymentsFilledIcon } from './Icons/AcceptPaymentsFilledIcon/AcceptPaymentsFilledIcon.js';
|
|
164
168
|
export { default as AcceptPaymentsIcon } from './Icons/AcceptPaymentsIcon/AcceptPaymentsIcon.js';
|
|
165
169
|
export { default as ActivityIcon } from './Icons/ActivityIcon/ActivityIcon.js';
|
|
@@ -227,6 +231,7 @@ export { default as BillMeIcon } from './Icons/BillMeIcon/BillMeIcon.js';
|
|
|
227
231
|
export { default as BluetoothIcon } from './Icons/BluetoothIcon/BluetoothIcon.js';
|
|
228
232
|
export { default as BoldIcon } from './Icons/BoldIcon/BoldIcon.js';
|
|
229
233
|
export { default as BookIcon } from './Icons/BookIcon/BookIcon.js';
|
|
234
|
+
export { default as BookmarkFilledIcon } from './Icons/BookmarkFilledIcon/BookmarkFilledIcon.js';
|
|
230
235
|
export { default as BookmarkIcon } from './Icons/BookmarkIcon/BookmarkIcon.js';
|
|
231
236
|
export { default as BoxIcon } from './Icons/BoxIcon/BoxIcon.js';
|
|
232
237
|
export { default as BriefcaseIcon } from './Icons/BriefcaseIcon/BriefcaseIcon.js';
|
|
@@ -652,6 +657,8 @@ export { Radio } from './Radio/Radio.js';
|
|
|
652
657
|
export { RadioGroup } from './Radio/RadioGroup/RadioGroup.js';
|
|
653
658
|
export { TrustBadge } from './TrustBadge/TrustBadge.web.js';
|
|
654
659
|
export { Scale } from './Scale/Scale.web.js';
|
|
660
|
+
export { SegmentedControl } from './SegmentedControl/SegmentedControl.web.js';
|
|
661
|
+
export { SegmentedControlItem } from './SegmentedControl/SegmentedControlItem.web.js';
|
|
655
662
|
export { SideNav } from './SideNav/SideNav.web.js';
|
|
656
663
|
export { SideNavLink } from './SideNav/SideNavItems/SideNavLink.web.js';
|
|
657
664
|
export { SideNavLevel } from './SideNav/SideNavLevel.web.js';
|
|
@@ -694,6 +701,9 @@ export { TopNavOverlayThemeOverride } from './TopNav/TopNavOverlayThemeOverride.
|
|
|
694
701
|
export { TabNav, TabNavItems } from './TopNav/TabNav/TabNav.web.js';
|
|
695
702
|
export { TabNavItem } from './TopNav/TabNav/TabNavItem.web.js';
|
|
696
703
|
export { TopNav, TopNavActions, TopNavBrand, TopNavContent } from './TopNav/TopNav.web.js';
|
|
704
|
+
export { TreeView } from './TreeView/TreeView.web.js';
|
|
705
|
+
export { TreeViewItem } from './TreeView/TreeViewItem.web.js';
|
|
706
|
+
export { TreeViewLoadMore } from './TreeView/TreeViewLoadMore.web.js';
|
|
697
707
|
export { Heading, getHeadingProps } from './Typography/Heading/Heading.js';
|
|
698
708
|
export { Text, getTextProps } from './Typography/Text/Text.js';
|
|
699
709
|
export { Code } from './Typography/Code/Code.js';
|
|
@@ -707,7 +717,7 @@ export { ListView } from './ListView/ListView.web.js';
|
|
|
707
717
|
export { ListViewFilters } from './ListView/ListViewFilters.web.js';
|
|
708
718
|
export { Preview, PreviewBody, PreviewFooter, PreviewHeader } from './Preview/Preview.web.js';
|
|
709
719
|
export { GenUIProvider } from './GenUI/GenUIProvider.web.js';
|
|
710
|
-
export { useGenUI, useGenUIAction } from './GenUI/GenUIContext.web.js';
|
|
720
|
+
export { useGenUI, useGenUIAction, useGenUIComponentActions } from './GenUI/GenUIContext.web.js';
|
|
711
721
|
export { GenUISchemaRenderer } from './GenUI/GenUISchemaRenderer.web.js';
|
|
712
722
|
export { RzpGlass as RazorSense } from './Spark/RzpGlass/RzpGlass.js';
|
|
713
723
|
export { preloadRazorSenseAssets } from './Spark/RzpGlass/utils.js';
|