@itwin/core-react 3.7.15 → 3.7.17
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +11 -1
- package/lib/cjs/core-react/autosuggest/AutoSuggest.d.ts +1 -1
- package/lib/cjs/core-react/autosuggest/AutoSuggest.d.ts.map +1 -1
- package/lib/cjs/core-react/autosuggest/AutoSuggest.js.map +1 -1
- package/lib/cjs/core-react/badge/Badge.d.ts +1 -1
- package/lib/cjs/core-react/badge/Badge.d.ts.map +1 -1
- package/lib/cjs/core-react/badge/Badge.js.map +1 -1
- package/lib/cjs/core-react/badge/BetaBadge.d.ts +2 -2
- package/lib/cjs/core-react/badge/BetaBadge.d.ts.map +1 -1
- package/lib/cjs/core-react/badge/NewBadge.d.ts +2 -2
- package/lib/cjs/core-react/badge/NewBadge.d.ts.map +1 -1
- package/lib/cjs/core-react/base/Centered.d.ts +2 -2
- package/lib/cjs/core-react/base/Centered.d.ts.map +1 -1
- package/lib/cjs/core-react/base/Div.d.ts +2 -2
- package/lib/cjs/core-react/base/Div.d.ts.map +1 -1
- package/lib/cjs/core-react/base/DivWithOutsideClick.d.ts +2 -2
- package/lib/cjs/core-react/base/FillCentered.d.ts +2 -2
- package/lib/cjs/core-react/base/FillCentered.d.ts.map +1 -1
- package/lib/cjs/core-react/base/FlexWrapContainer.d.ts +2 -2
- package/lib/cjs/core-react/base/FlexWrapContainer.d.ts.map +1 -1
- package/lib/cjs/core-react/base/Gap.d.ts +2 -2
- package/lib/cjs/core-react/base/Gap.d.ts.map +1 -1
- package/lib/cjs/core-react/base/ScrollView.d.ts +2 -2
- package/lib/cjs/core-react/base/ScrollView.d.ts.map +1 -1
- package/lib/cjs/core-react/button/Button.d.ts +1 -1
- package/lib/cjs/core-react/button/UnderlinedButton.d.ts +1 -1
- package/lib/cjs/core-react/button/UnderlinedButton.d.ts.map +1 -1
- package/lib/cjs/core-react/checkbox/Checkbox.d.ts +1 -1
- package/lib/cjs/core-react/checklistbox/CheckListBox.d.ts +3 -3
- package/lib/cjs/core-react/checklistbox/CheckListBox.d.ts.map +1 -1
- package/lib/cjs/core-react/contextmenu/ContextMenu.d.ts +1 -1
- package/lib/cjs/core-react/contextmenu/ContextMenu.d.ts.map +1 -1
- package/lib/cjs/core-react/contextmenu/ContextMenu.js.map +1 -1
- package/lib/cjs/core-react/contextmenu/ContextMenuDivider.d.ts +1 -1
- package/lib/cjs/core-react/contextmenu/ContextMenuDivider.d.ts.map +1 -1
- package/lib/cjs/core-react/contextmenu/ContextMenuDivider.js.map +1 -1
- package/lib/cjs/core-react/contextmenu/ContextMenuItem.d.ts +1 -1
- package/lib/cjs/core-react/contextmenu/ContextMenuItem.d.ts.map +1 -1
- package/lib/cjs/core-react/contextmenu/ContextMenuItem.js.map +1 -1
- package/lib/cjs/core-react/contextmenu/ContextSubMenu.d.ts +2 -2
- package/lib/cjs/core-react/contextmenu/ContextSubMenu.d.ts.map +1 -1
- package/lib/cjs/core-react/contextmenu/ContextSubMenu.js +3 -1
- package/lib/cjs/core-react/contextmenu/ContextSubMenu.js.map +1 -1
- package/lib/cjs/core-react/contextmenu/PopupContextMenu.d.ts +1 -1
- package/lib/cjs/core-react/contextmenu/PopupContextMenu.d.ts.map +1 -1
- package/lib/cjs/core-react/dialog/Dialog.d.ts +3 -3
- package/lib/cjs/core-react/dialog/Dialog.d.ts.map +1 -1
- package/lib/cjs/core-react/dialog/Dialog.js.map +1 -1
- package/lib/cjs/core-react/elementseparator/ElementSeparator.d.ts +2 -2
- package/lib/cjs/core-react/elementseparator/ElementSeparator.d.ts.map +1 -1
- package/lib/cjs/core-react/expandable/ExpandableBlock.d.ts +2 -2
- package/lib/cjs/core-react/expandable/ExpandableBlock.d.ts.map +1 -1
- package/lib/cjs/core-react/expandable/ExpandableBlock.js.map +1 -1
- package/lib/cjs/core-react/expandable/ExpandableList.d.ts +1 -1
- package/lib/cjs/core-react/expandable/ExpandableList.d.ts.map +1 -1
- package/lib/cjs/core-react/expandable/ExpandableList.js.map +1 -1
- package/lib/cjs/core-react/focustrap/FocusTrap.d.ts +1 -1
- package/lib/cjs/core-react/focustrap/FocusTrap.d.ts.map +1 -1
- package/lib/cjs/core-react/form/Field.d.ts +1 -1
- package/lib/cjs/core-react/form/Form.d.ts +1 -1
- package/lib/cjs/core-react/hocs/withIsPressed.d.ts +2 -2
- package/lib/cjs/core-react/hocs/withOnOutsideClick.d.ts +2 -2
- package/lib/cjs/core-react/hocs/withTimeout.d.ts +2 -2
- package/lib/cjs/core-react/icons/IconComponent.d.ts +1 -1
- package/lib/cjs/core-react/icons/IconComponent.d.ts.map +1 -1
- package/lib/cjs/core-react/icons/SvgPath.d.ts +1 -1
- package/lib/cjs/core-react/icons/SvgSprite.d.ts +1 -1
- package/lib/cjs/core-react/icons/WebFontIcon.d.ts +1 -1
- package/lib/cjs/core-react/icons/WebFontIcon.d.ts.map +1 -1
- package/lib/cjs/core-react/imagecheckbox/ImageCheckBox.d.ts +1 -1
- package/lib/cjs/core-react/imagecheckbox/ImageCheckBox.js +1 -1
- package/lib/cjs/core-react/imagecheckbox/ImageCheckBox.js.map +1 -1
- package/lib/cjs/core-react/inputs/Input.d.ts +1 -1
- package/lib/cjs/core-react/inputs/Input.d.ts.map +1 -1
- package/lib/cjs/core-react/inputs/Input.js.map +1 -1
- package/lib/cjs/core-react/inputs/InputLabel.d.ts +1 -1
- package/lib/cjs/core-react/inputs/InputLabel.d.ts.map +1 -1
- package/lib/cjs/core-react/inputs/InputLabel.js.map +1 -1
- package/lib/cjs/core-react/inputs/LabeledInput.d.ts +2 -2
- package/lib/cjs/core-react/inputs/LabeledInput.d.ts.map +1 -1
- package/lib/cjs/core-react/inputs/LabeledTextarea.d.ts +2 -2
- package/lib/cjs/core-react/inputs/LabeledTextarea.d.ts.map +1 -1
- package/lib/cjs/core-react/inputs/Textarea.d.ts +1 -1
- package/lib/cjs/core-react/inputs/Textarea.d.ts.map +1 -1
- package/lib/cjs/core-react/inputs/Textarea.js.map +1 -1
- package/lib/cjs/core-react/inputs/iconinput/IconInput.d.ts +1 -1
- package/lib/cjs/core-react/inputs/iconinput/IconInput.d.ts.map +1 -1
- package/lib/cjs/core-react/inputs/iconinput/IconInput.js.map +1 -1
- package/lib/cjs/core-react/inputs/numberinput/NumberInput.d.ts +1 -1
- package/lib/cjs/core-react/inputs/numberinput/NumberInput.d.ts.map +1 -1
- package/lib/cjs/core-react/inputs/numberinput/NumberInput.js.map +1 -1
- package/lib/cjs/core-react/listbox/Listbox.d.ts +2 -2
- package/lib/cjs/core-react/listbox/Listbox.d.ts.map +1 -1
- package/lib/cjs/core-react/loading/LoadingBar.d.ts +1 -1
- package/lib/cjs/core-react/loading/LoadingPrompt.d.ts +1 -1
- package/lib/cjs/core-react/loading/LoadingSpinner.d.ts +1 -1
- package/lib/cjs/core-react/loading/LoadingStatus.d.ts +1 -1
- package/lib/cjs/core-react/loading/Spinner.d.ts +1 -1
- package/lib/cjs/core-react/messagebox/MessageBox.d.ts +3 -3
- package/lib/cjs/core-react/messagebox/MessageBox.d.ts.map +1 -1
- package/lib/cjs/core-react/messagebox/MessageBox.js.map +1 -1
- package/lib/cjs/core-react/notification/MessageRenderer.d.ts +2 -2
- package/lib/cjs/core-react/notification/MessageRenderer.d.ts.map +1 -1
- package/lib/cjs/core-react/progress-indicators/ProgressBar.d.ts +2 -2
- package/lib/cjs/core-react/progress-indicators/ProgressBar.d.ts.map +1 -1
- package/lib/cjs/core-react/progress-indicators/ProgressSpinner.d.ts +1 -1
- package/lib/cjs/core-react/progress-indicators/ProgressSpinner.d.ts.map +1 -1
- package/lib/cjs/core-react/radialmenu/RadialMenu.d.ts +2 -2
- package/lib/cjs/core-react/radialmenu/RadialMenu.d.ts.map +1 -1
- package/lib/cjs/core-react/radialmenu/RadialMenu.js.map +1 -1
- package/lib/cjs/core-react/radio/Radio.d.ts +1 -1
- package/lib/cjs/core-react/radio/Radio.d.ts.map +1 -1
- package/lib/cjs/core-react/radio/Radio.js.map +1 -1
- package/lib/cjs/core-react/select/LabeledSelect.d.ts +1 -1
- package/lib/cjs/core-react/select/LabeledSelect.d.ts.map +1 -1
- package/lib/cjs/core-react/select/LabeledSelect.js.map +1 -1
- package/lib/cjs/core-react/select/LabeledThemedSelect.d.ts +2 -2
- package/lib/cjs/core-react/select/LabeledThemedSelect.d.ts.map +1 -1
- package/lib/cjs/core-react/select/Select.d.ts +1 -1
- package/lib/cjs/core-react/select/Select.d.ts.map +1 -1
- package/lib/cjs/core-react/select/Select.js.map +1 -1
- package/lib/cjs/core-react/select/ThemedSelect.d.ts +1 -1
- package/lib/cjs/core-react/select/ThemedSelect.d.ts.map +1 -1
- package/lib/cjs/core-react/settings/SettingsContainer.d.ts +2 -2
- package/lib/cjs/core-react/settings/SettingsContainer.d.ts.map +1 -1
- package/lib/cjs/core-react/settings/SettingsManager.d.ts +3 -3
- package/lib/cjs/core-react/settings/SettingsManager.d.ts.map +1 -1
- package/lib/cjs/core-react/settings/SettingsManager.js.map +1 -1
- package/lib/cjs/core-react/slider/Slider.d.ts +1 -1
- package/lib/cjs/core-react/slider/Slider.d.ts.map +1 -1
- package/lib/cjs/core-react/splitbutton/SplitButton.d.ts +1 -1
- package/lib/cjs/core-react/splitbutton/SplitButton.d.ts.map +1 -1
- package/lib/cjs/core-react/splitbutton/SplitButton.js.map +1 -1
- package/lib/cjs/core-react/tabs/HorizontalTabs.d.ts +2 -2
- package/lib/cjs/core-react/tabs/HorizontalTabs.d.ts.map +1 -1
- package/lib/cjs/core-react/tabs/Tabs.d.ts +4 -4
- package/lib/cjs/core-react/tabs/Tabs.d.ts.map +1 -1
- package/lib/cjs/core-react/tabs/Tabs.js.map +1 -1
- package/lib/cjs/core-react/tabs/VerticalTabs.d.ts +2 -2
- package/lib/cjs/core-react/tabs/VerticalTabs.d.ts.map +1 -1
- package/lib/cjs/core-react/text/BlockText.d.ts +2 -2
- package/lib/cjs/core-react/text/BlockText.d.ts.map +1 -1
- package/lib/cjs/core-react/text/BodyText.d.ts +2 -2
- package/lib/cjs/core-react/text/BodyText.d.ts.map +1 -1
- package/lib/cjs/core-react/text/DisabledText.d.ts +5 -2
- package/lib/cjs/core-react/text/DisabledText.d.ts.map +1 -1
- package/lib/cjs/core-react/text/FilteredText.d.ts +1 -1
- package/lib/cjs/core-react/text/FilteredText.d.ts.map +1 -1
- package/lib/cjs/core-react/text/Headline.d.ts +2 -2
- package/lib/cjs/core-react/text/Headline.d.ts.map +1 -1
- package/lib/cjs/core-react/text/LeadingText.d.ts +2 -2
- package/lib/cjs/core-react/text/LeadingText.d.ts.map +1 -1
- package/lib/cjs/core-react/text/LeadingText2.d.ts +2 -2
- package/lib/cjs/core-react/text/LeadingText2.d.ts.map +1 -1
- package/lib/cjs/core-react/text/MutedText.d.ts +2 -2
- package/lib/cjs/core-react/text/MutedText.d.ts.map +1 -1
- package/lib/cjs/core-react/text/SmallText.d.ts +2 -2
- package/lib/cjs/core-react/text/SmallText.d.ts.map +1 -1
- package/lib/cjs/core-react/text/StyledText.d.ts +2 -2
- package/lib/cjs/core-react/text/StyledText.d.ts.map +1 -1
- package/lib/cjs/core-react/text/Subheading.d.ts +2 -2
- package/lib/cjs/core-react/text/Subheading.d.ts.map +1 -1
- package/lib/cjs/core-react/text/Subheading2.d.ts +2 -2
- package/lib/cjs/core-react/text/Subheading2.d.ts.map +1 -1
- package/lib/cjs/core-react/text/Title.d.ts +2 -2
- package/lib/cjs/core-react/text/Title.d.ts.map +1 -1
- package/lib/cjs/core-react/text/Title2.d.ts +2 -2
- package/lib/cjs/core-react/text/Title2.d.ts.map +1 -1
- package/lib/cjs/core-react/tiles/FeaturedTile.d.ts +2 -2
- package/lib/cjs/core-react/tiles/FeaturedTile.d.ts.map +1 -1
- package/lib/cjs/core-react/tiles/MinimalFeaturedTile.d.ts +2 -2
- package/lib/cjs/core-react/tiles/MinimalFeaturedTile.d.ts.map +1 -1
- package/lib/cjs/core-react/tiles/MinimalTile.d.ts +2 -2
- package/lib/cjs/core-react/tiles/MinimalTile.d.ts.map +1 -1
- package/lib/cjs/core-react/tiles/Tile.d.ts +1 -1
- package/lib/cjs/core-react/tiles/Tile.d.ts.map +1 -1
- package/lib/cjs/core-react/tiles/Tile.js.map +1 -1
- package/lib/cjs/core-react/toggle/LabeledToggle.d.ts +1 -1
- package/lib/cjs/core-react/toggle/LabeledToggle.d.ts.map +1 -1
- package/lib/cjs/core-react/toggle/LabeledToggle.js.map +1 -1
- package/lib/cjs/core-react/toggle/Toggle.d.ts +1 -1
- package/lib/cjs/core-react/toggle/Toggle.d.ts.map +1 -1
- package/lib/cjs/core-react/toggle/Toggle.js +3 -1
- package/lib/cjs/core-react/toggle/Toggle.js.map +1 -1
- package/lib/cjs/core-react/tooltip/Tooltip.d.ts +1 -1
- package/lib/cjs/core-react/tooltip/Tooltip.d.ts.map +1 -1
- package/lib/cjs/core-react/tree/Branch.d.ts +1 -1
- package/lib/cjs/core-react/tree/ExpansionToggle.d.ts +1 -1
- package/lib/cjs/core-react/tree/Node.d.ts +1 -1
- package/lib/cjs/core-react/tree/Placeholder.d.ts +1 -1
- package/lib/cjs/core-react/tree/Tree.d.ts +1 -1
- package/lib/cjs/core-react/utils/hooks/useResizeObserver.d.ts +3 -3
- package/lib/cjs/core-react/utils/hooks/useResizeObserver.d.ts.map +1 -1
- package/lib/cjs/core-react/utils/hooks/useResizeObserver.js.map +1 -1
- package/lib/esm/core-react/autosuggest/AutoSuggest.d.ts +1 -1
- package/lib/esm/core-react/autosuggest/AutoSuggest.d.ts.map +1 -1
- package/lib/esm/core-react/autosuggest/AutoSuggest.js.map +1 -1
- package/lib/esm/core-react/badge/Badge.d.ts +1 -1
- package/lib/esm/core-react/badge/Badge.d.ts.map +1 -1
- package/lib/esm/core-react/badge/Badge.js.map +1 -1
- package/lib/esm/core-react/badge/BetaBadge.d.ts +2 -2
- package/lib/esm/core-react/badge/BetaBadge.d.ts.map +1 -1
- package/lib/esm/core-react/badge/NewBadge.d.ts +2 -2
- package/lib/esm/core-react/badge/NewBadge.d.ts.map +1 -1
- package/lib/esm/core-react/base/Centered.d.ts +2 -2
- package/lib/esm/core-react/base/Centered.d.ts.map +1 -1
- package/lib/esm/core-react/base/Div.d.ts +2 -2
- package/lib/esm/core-react/base/Div.d.ts.map +1 -1
- package/lib/esm/core-react/base/DivWithOutsideClick.d.ts +2 -2
- package/lib/esm/core-react/base/FillCentered.d.ts +2 -2
- package/lib/esm/core-react/base/FillCentered.d.ts.map +1 -1
- package/lib/esm/core-react/base/FlexWrapContainer.d.ts +2 -2
- package/lib/esm/core-react/base/FlexWrapContainer.d.ts.map +1 -1
- package/lib/esm/core-react/base/Gap.d.ts +2 -2
- package/lib/esm/core-react/base/Gap.d.ts.map +1 -1
- package/lib/esm/core-react/base/ScrollView.d.ts +2 -2
- package/lib/esm/core-react/base/ScrollView.d.ts.map +1 -1
- package/lib/esm/core-react/button/Button.d.ts +1 -1
- package/lib/esm/core-react/button/UnderlinedButton.d.ts +1 -1
- package/lib/esm/core-react/button/UnderlinedButton.d.ts.map +1 -1
- package/lib/esm/core-react/checkbox/Checkbox.d.ts +1 -1
- package/lib/esm/core-react/checklistbox/CheckListBox.d.ts +3 -3
- package/lib/esm/core-react/checklistbox/CheckListBox.d.ts.map +1 -1
- package/lib/esm/core-react/contextmenu/ContextMenu.d.ts +1 -1
- package/lib/esm/core-react/contextmenu/ContextMenu.d.ts.map +1 -1
- package/lib/esm/core-react/contextmenu/ContextMenu.js.map +1 -1
- package/lib/esm/core-react/contextmenu/ContextMenuDivider.d.ts +1 -1
- package/lib/esm/core-react/contextmenu/ContextMenuDivider.d.ts.map +1 -1
- package/lib/esm/core-react/contextmenu/ContextMenuDivider.js.map +1 -1
- package/lib/esm/core-react/contextmenu/ContextMenuItem.d.ts +1 -1
- package/lib/esm/core-react/contextmenu/ContextMenuItem.d.ts.map +1 -1
- package/lib/esm/core-react/contextmenu/ContextMenuItem.js.map +1 -1
- package/lib/esm/core-react/contextmenu/ContextSubMenu.d.ts +2 -2
- package/lib/esm/core-react/contextmenu/ContextSubMenu.d.ts.map +1 -1
- package/lib/esm/core-react/contextmenu/ContextSubMenu.js +3 -1
- package/lib/esm/core-react/contextmenu/ContextSubMenu.js.map +1 -1
- package/lib/esm/core-react/contextmenu/PopupContextMenu.d.ts +1 -1
- package/lib/esm/core-react/contextmenu/PopupContextMenu.d.ts.map +1 -1
- package/lib/esm/core-react/dialog/Dialog.d.ts +3 -3
- package/lib/esm/core-react/dialog/Dialog.d.ts.map +1 -1
- package/lib/esm/core-react/dialog/Dialog.js.map +1 -1
- package/lib/esm/core-react/elementseparator/ElementSeparator.d.ts +2 -2
- package/lib/esm/core-react/elementseparator/ElementSeparator.d.ts.map +1 -1
- package/lib/esm/core-react/expandable/ExpandableBlock.d.ts +2 -2
- package/lib/esm/core-react/expandable/ExpandableBlock.d.ts.map +1 -1
- package/lib/esm/core-react/expandable/ExpandableBlock.js.map +1 -1
- package/lib/esm/core-react/expandable/ExpandableList.d.ts +1 -1
- package/lib/esm/core-react/expandable/ExpandableList.d.ts.map +1 -1
- package/lib/esm/core-react/expandable/ExpandableList.js.map +1 -1
- package/lib/esm/core-react/focustrap/FocusTrap.d.ts +1 -1
- package/lib/esm/core-react/focustrap/FocusTrap.d.ts.map +1 -1
- package/lib/esm/core-react/form/Field.d.ts +1 -1
- package/lib/esm/core-react/form/Form.d.ts +1 -1
- package/lib/esm/core-react/hocs/withIsPressed.d.ts +2 -2
- package/lib/esm/core-react/hocs/withOnOutsideClick.d.ts +2 -2
- package/lib/esm/core-react/hocs/withTimeout.d.ts +2 -2
- package/lib/esm/core-react/icons/IconComponent.d.ts +1 -1
- package/lib/esm/core-react/icons/IconComponent.d.ts.map +1 -1
- package/lib/esm/core-react/icons/SvgPath.d.ts +1 -1
- package/lib/esm/core-react/icons/SvgSprite.d.ts +1 -1
- package/lib/esm/core-react/icons/WebFontIcon.d.ts +1 -1
- package/lib/esm/core-react/icons/WebFontIcon.d.ts.map +1 -1
- package/lib/esm/core-react/imagecheckbox/ImageCheckBox.d.ts +1 -1
- package/lib/esm/core-react/imagecheckbox/ImageCheckBox.js +1 -1
- package/lib/esm/core-react/imagecheckbox/ImageCheckBox.js.map +1 -1
- package/lib/esm/core-react/inputs/Input.d.ts +1 -1
- package/lib/esm/core-react/inputs/Input.d.ts.map +1 -1
- package/lib/esm/core-react/inputs/Input.js.map +1 -1
- package/lib/esm/core-react/inputs/InputLabel.d.ts +1 -1
- package/lib/esm/core-react/inputs/InputLabel.d.ts.map +1 -1
- package/lib/esm/core-react/inputs/InputLabel.js.map +1 -1
- package/lib/esm/core-react/inputs/LabeledInput.d.ts +2 -2
- package/lib/esm/core-react/inputs/LabeledInput.d.ts.map +1 -1
- package/lib/esm/core-react/inputs/LabeledTextarea.d.ts +2 -2
- package/lib/esm/core-react/inputs/LabeledTextarea.d.ts.map +1 -1
- package/lib/esm/core-react/inputs/Textarea.d.ts +1 -1
- package/lib/esm/core-react/inputs/Textarea.d.ts.map +1 -1
- package/lib/esm/core-react/inputs/Textarea.js.map +1 -1
- package/lib/esm/core-react/inputs/iconinput/IconInput.d.ts +1 -1
- package/lib/esm/core-react/inputs/iconinput/IconInput.d.ts.map +1 -1
- package/lib/esm/core-react/inputs/iconinput/IconInput.js.map +1 -1
- package/lib/esm/core-react/inputs/numberinput/NumberInput.d.ts +1 -1
- package/lib/esm/core-react/inputs/numberinput/NumberInput.d.ts.map +1 -1
- package/lib/esm/core-react/inputs/numberinput/NumberInput.js.map +1 -1
- package/lib/esm/core-react/listbox/Listbox.d.ts +2 -2
- package/lib/esm/core-react/listbox/Listbox.d.ts.map +1 -1
- package/lib/esm/core-react/loading/LoadingBar.d.ts +1 -1
- package/lib/esm/core-react/loading/LoadingPrompt.d.ts +1 -1
- package/lib/esm/core-react/loading/LoadingSpinner.d.ts +1 -1
- package/lib/esm/core-react/loading/LoadingStatus.d.ts +1 -1
- package/lib/esm/core-react/loading/Spinner.d.ts +1 -1
- package/lib/esm/core-react/messagebox/MessageBox.d.ts +3 -3
- package/lib/esm/core-react/messagebox/MessageBox.d.ts.map +1 -1
- package/lib/esm/core-react/messagebox/MessageBox.js.map +1 -1
- package/lib/esm/core-react/notification/MessageRenderer.d.ts +2 -2
- package/lib/esm/core-react/notification/MessageRenderer.d.ts.map +1 -1
- package/lib/esm/core-react/progress-indicators/ProgressBar.d.ts +2 -2
- package/lib/esm/core-react/progress-indicators/ProgressBar.d.ts.map +1 -1
- package/lib/esm/core-react/progress-indicators/ProgressSpinner.d.ts +1 -1
- package/lib/esm/core-react/progress-indicators/ProgressSpinner.d.ts.map +1 -1
- package/lib/esm/core-react/radialmenu/RadialMenu.d.ts +2 -2
- package/lib/esm/core-react/radialmenu/RadialMenu.d.ts.map +1 -1
- package/lib/esm/core-react/radialmenu/RadialMenu.js.map +1 -1
- package/lib/esm/core-react/radio/Radio.d.ts +1 -1
- package/lib/esm/core-react/radio/Radio.d.ts.map +1 -1
- package/lib/esm/core-react/radio/Radio.js.map +1 -1
- package/lib/esm/core-react/select/LabeledSelect.d.ts +1 -1
- package/lib/esm/core-react/select/LabeledSelect.d.ts.map +1 -1
- package/lib/esm/core-react/select/LabeledSelect.js.map +1 -1
- package/lib/esm/core-react/select/LabeledThemedSelect.d.ts +2 -2
- package/lib/esm/core-react/select/LabeledThemedSelect.d.ts.map +1 -1
- package/lib/esm/core-react/select/Select.d.ts +1 -1
- package/lib/esm/core-react/select/Select.d.ts.map +1 -1
- package/lib/esm/core-react/select/Select.js.map +1 -1
- package/lib/esm/core-react/select/ThemedSelect.d.ts +1 -1
- package/lib/esm/core-react/select/ThemedSelect.d.ts.map +1 -1
- package/lib/esm/core-react/settings/SettingsContainer.d.ts +2 -2
- package/lib/esm/core-react/settings/SettingsContainer.d.ts.map +1 -1
- package/lib/esm/core-react/settings/SettingsManager.d.ts +3 -3
- package/lib/esm/core-react/settings/SettingsManager.d.ts.map +1 -1
- package/lib/esm/core-react/settings/SettingsManager.js.map +1 -1
- package/lib/esm/core-react/slider/Slider.d.ts +1 -1
- package/lib/esm/core-react/slider/Slider.d.ts.map +1 -1
- package/lib/esm/core-react/splitbutton/SplitButton.d.ts +1 -1
- package/lib/esm/core-react/splitbutton/SplitButton.d.ts.map +1 -1
- package/lib/esm/core-react/splitbutton/SplitButton.js.map +1 -1
- package/lib/esm/core-react/tabs/HorizontalTabs.d.ts +2 -2
- package/lib/esm/core-react/tabs/HorizontalTabs.d.ts.map +1 -1
- package/lib/esm/core-react/tabs/Tabs.d.ts +4 -4
- package/lib/esm/core-react/tabs/Tabs.d.ts.map +1 -1
- package/lib/esm/core-react/tabs/Tabs.js.map +1 -1
- package/lib/esm/core-react/tabs/VerticalTabs.d.ts +2 -2
- package/lib/esm/core-react/tabs/VerticalTabs.d.ts.map +1 -1
- package/lib/esm/core-react/text/BlockText.d.ts +2 -2
- package/lib/esm/core-react/text/BlockText.d.ts.map +1 -1
- package/lib/esm/core-react/text/BodyText.d.ts +2 -2
- package/lib/esm/core-react/text/BodyText.d.ts.map +1 -1
- package/lib/esm/core-react/text/DisabledText.d.ts +5 -2
- package/lib/esm/core-react/text/DisabledText.d.ts.map +1 -1
- package/lib/esm/core-react/text/FilteredText.d.ts +1 -1
- package/lib/esm/core-react/text/FilteredText.d.ts.map +1 -1
- package/lib/esm/core-react/text/Headline.d.ts +2 -2
- package/lib/esm/core-react/text/Headline.d.ts.map +1 -1
- package/lib/esm/core-react/text/LeadingText.d.ts +2 -2
- package/lib/esm/core-react/text/LeadingText.d.ts.map +1 -1
- package/lib/esm/core-react/text/LeadingText2.d.ts +2 -2
- package/lib/esm/core-react/text/LeadingText2.d.ts.map +1 -1
- package/lib/esm/core-react/text/MutedText.d.ts +2 -2
- package/lib/esm/core-react/text/MutedText.d.ts.map +1 -1
- package/lib/esm/core-react/text/SmallText.d.ts +2 -2
- package/lib/esm/core-react/text/SmallText.d.ts.map +1 -1
- package/lib/esm/core-react/text/StyledText.d.ts +2 -2
- package/lib/esm/core-react/text/StyledText.d.ts.map +1 -1
- package/lib/esm/core-react/text/Subheading.d.ts +2 -2
- package/lib/esm/core-react/text/Subheading.d.ts.map +1 -1
- package/lib/esm/core-react/text/Subheading2.d.ts +2 -2
- package/lib/esm/core-react/text/Subheading2.d.ts.map +1 -1
- package/lib/esm/core-react/text/Title.d.ts +2 -2
- package/lib/esm/core-react/text/Title.d.ts.map +1 -1
- package/lib/esm/core-react/text/Title2.d.ts +2 -2
- package/lib/esm/core-react/text/Title2.d.ts.map +1 -1
- package/lib/esm/core-react/tiles/FeaturedTile.d.ts +2 -2
- package/lib/esm/core-react/tiles/FeaturedTile.d.ts.map +1 -1
- package/lib/esm/core-react/tiles/MinimalFeaturedTile.d.ts +2 -2
- package/lib/esm/core-react/tiles/MinimalFeaturedTile.d.ts.map +1 -1
- package/lib/esm/core-react/tiles/MinimalTile.d.ts +2 -2
- package/lib/esm/core-react/tiles/MinimalTile.d.ts.map +1 -1
- package/lib/esm/core-react/tiles/Tile.d.ts +1 -1
- package/lib/esm/core-react/tiles/Tile.d.ts.map +1 -1
- package/lib/esm/core-react/tiles/Tile.js.map +1 -1
- package/lib/esm/core-react/toggle/LabeledToggle.d.ts +1 -1
- package/lib/esm/core-react/toggle/LabeledToggle.d.ts.map +1 -1
- package/lib/esm/core-react/toggle/LabeledToggle.js.map +1 -1
- package/lib/esm/core-react/toggle/Toggle.d.ts +1 -1
- package/lib/esm/core-react/toggle/Toggle.d.ts.map +1 -1
- package/lib/esm/core-react/toggle/Toggle.js +3 -1
- package/lib/esm/core-react/toggle/Toggle.js.map +1 -1
- package/lib/esm/core-react/tooltip/Tooltip.d.ts +1 -1
- package/lib/esm/core-react/tooltip/Tooltip.d.ts.map +1 -1
- package/lib/esm/core-react/tree/Branch.d.ts +1 -1
- package/lib/esm/core-react/tree/ExpansionToggle.d.ts +1 -1
- package/lib/esm/core-react/tree/Node.d.ts +1 -1
- package/lib/esm/core-react/tree/Placeholder.d.ts +1 -1
- package/lib/esm/core-react/tree/Tree.d.ts +1 -1
- package/lib/esm/core-react/utils/hooks/useResizeObserver.d.ts +3 -3
- package/lib/esm/core-react/utils/hooks/useResizeObserver.d.ts.map +1 -1
- package/lib/esm/core-react/utils/hooks/useResizeObserver.js.map +1 -1
- package/package.json +10 -10
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/** @packageDocumentation
|
|
2
2
|
* @module Base
|
|
3
3
|
*/
|
|
4
|
-
|
|
4
|
+
import * as React from "react";
|
|
5
5
|
import { CommonProps } from "../utils/Props";
|
|
6
6
|
/** Properties for the [[Gap]] component.
|
|
7
7
|
* @public
|
|
@@ -12,5 +12,5 @@ export interface GapProps extends CommonProps {
|
|
|
12
12
|
/** Horizontal gap or space React component. Defaults to 10px.
|
|
13
13
|
* @public
|
|
14
14
|
*/
|
|
15
|
-
export declare function Gap(props: GapProps): JSX.Element;
|
|
15
|
+
export declare function Gap(props: GapProps): React.JSX.Element;
|
|
16
16
|
//# sourceMappingURL=Gap.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Gap.d.ts","sourceRoot":"","sources":["../../../../src/core-react/base/Gap.tsx"],"names":[],"mappings":"AAIA;;GAEG
|
|
1
|
+
{"version":3,"file":"Gap.d.ts","sourceRoot":"","sources":["../../../../src/core-react/base/Gap.tsx"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAE7C;;GAEG;AACH,MAAM,WAAW,QAAS,SAAQ,WAAW;IAC3C,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED;;GAEG;AACH,wBAAgB,GAAG,CAAC,KAAK,EAAE,QAAQ,qBAOlC"}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
/** @packageDocumentation
|
|
2
2
|
* @module Base
|
|
3
3
|
*/
|
|
4
|
-
|
|
4
|
+
import * as React from "react";
|
|
5
5
|
import { CommonDivProps } from "../utils/Props";
|
|
6
6
|
/** Scroll View React functional component.
|
|
7
7
|
* Scrolls content vertically and
|
|
8
8
|
* has the 'overflow-y: auto' CSS property and has a height and width of 100%.
|
|
9
9
|
* @public
|
|
10
10
|
*/
|
|
11
|
-
export declare function ScrollView(props: CommonDivProps): JSX.Element;
|
|
11
|
+
export declare function ScrollView(props: CommonDivProps): React.JSX.Element;
|
|
12
12
|
//# sourceMappingURL=ScrollView.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ScrollView.d.ts","sourceRoot":"","sources":["../../../../src/core-react/base/ScrollView.tsx"],"names":[],"mappings":"AAIA;;GAEG
|
|
1
|
+
{"version":3,"file":"ScrollView.d.ts","sourceRoot":"","sources":["../../../../src/core-react/base/ScrollView.tsx"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAGhD;;;;GAIG;AACH,wBAAgB,UAAU,CAAC,KAAK,EAAE,cAAc,qBAE/C"}
|
|
@@ -41,7 +41,7 @@ export interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElemen
|
|
|
41
41
|
*/
|
|
42
42
|
export declare class Button extends React.PureComponent<ButtonProps> {
|
|
43
43
|
private getIuiButtonType;
|
|
44
|
-
render(): JSX.Element;
|
|
44
|
+
render(): React.JSX.Element;
|
|
45
45
|
}
|
|
46
46
|
/** @internal */
|
|
47
47
|
export declare function getButtonTypeClassName(buttonType?: ButtonType): string;
|
|
@@ -21,5 +21,5 @@ export interface UnderlinedButtonProps {
|
|
|
21
21
|
/** A React component that makes text clickable and underlined
|
|
22
22
|
* @public
|
|
23
23
|
*/
|
|
24
|
-
export declare function UnderlinedButton(props: UnderlinedButtonProps): JSX.Element;
|
|
24
|
+
export declare function UnderlinedButton(props: UnderlinedButtonProps): React.JSX.Element;
|
|
25
25
|
//# sourceMappingURL=UnderlinedButton.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"UnderlinedButton.d.ts","sourceRoot":"","sources":["../../../../src/core-react/button/UnderlinedButton.tsx"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,yBAAyB,CAAC;AAEjC,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B;;GAEG;AACH,MAAM,WAAW,qBAAqB;IACpC,iDAAiD;IACjD,QAAQ,EAAE,MAAM,GAAG,KAAK,CAAC,SAAS,CAAC;IACnC,2BAA2B;IAC3B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,0BAA0B;IAC1B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,gCAAgC;IAChC,OAAO,CAAC,EAAE,CAAC,CAAC,EAAE,KAAK,CAAC,UAAU,KAAK,IAAI,CAAC;IACxC,2BAA2B;IAC3B,UAAU,CAAC,EAAE,MAAM,IAAI,CAAC;CACzB;AAED;;GAEG;AACH,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,qBAAqB,
|
|
1
|
+
{"version":3,"file":"UnderlinedButton.d.ts","sourceRoot":"","sources":["../../../../src/core-react/button/UnderlinedButton.tsx"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,yBAAyB,CAAC;AAEjC,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B;;GAEG;AACH,MAAM,WAAW,qBAAqB;IACpC,iDAAiD;IACjD,QAAQ,EAAE,MAAM,GAAG,KAAK,CAAC,SAAS,CAAC;IACnC,2BAA2B;IAC3B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,0BAA0B;IAC1B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,gCAAgC;IAChC,OAAO,CAAC,EAAE,CAAC,CAAC,EAAE,KAAK,CAAC,UAAU,KAAK,IAAI,CAAC;IACxC,2BAA2B;IAC3B,UAAU,CAAC,EAAE,MAAM,IAAI,CAAC;CACzB;AAED;;GAEG;AACH,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,qBAAqB,qBAkC5D"}
|
|
@@ -52,6 +52,6 @@ export declare class Checkbox extends React.PureComponent<CheckboxProps> {
|
|
|
52
52
|
componentDidMount(): void;
|
|
53
53
|
/** @internal */
|
|
54
54
|
componentDidUpdate(_prevProps: CheckboxProps): void;
|
|
55
|
-
render(): JSX.Element;
|
|
55
|
+
render(): React.JSX.Element;
|
|
56
56
|
}
|
|
57
57
|
//# sourceMappingURL=Checkbox.d.ts.map
|
|
@@ -23,16 +23,16 @@ export interface CheckListBoxItemProps extends CommonProps {
|
|
|
23
23
|
* @public
|
|
24
24
|
*/
|
|
25
25
|
export declare class CheckListBoxItem extends React.PureComponent<CheckListBoxItemProps> {
|
|
26
|
-
render(): JSX.Element;
|
|
26
|
+
render(): React.JSX.Element;
|
|
27
27
|
}
|
|
28
28
|
/** Separator added to a [[CheckListBox]].
|
|
29
29
|
* @public
|
|
30
30
|
*/
|
|
31
|
-
export declare function CheckListBoxSeparator(): JSX.Element;
|
|
31
|
+
export declare function CheckListBoxSeparator(): React.JSX.Element;
|
|
32
32
|
/** React component showing a list of Checkbox items.
|
|
33
33
|
* @public
|
|
34
34
|
*/
|
|
35
35
|
export declare class CheckListBox extends React.PureComponent<CommonProps> {
|
|
36
|
-
render(): JSX.Element;
|
|
36
|
+
render(): React.JSX.Element;
|
|
37
37
|
}
|
|
38
38
|
//# sourceMappingURL=CheckListBox.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CheckListBox.d.ts","sourceRoot":"","sources":["../../../../src/core-react/checklistbox/CheckListBox.tsx"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,qBAAqB,CAAC;AAE7B,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAE7C;;GAEG;AACH,MAAM,WAAW,qBAAsB,SAAQ,WAAW;IACxD,YAAY;IACZ,KAAK,EAAE,MAAM,CAAC;IACd,mDAAmD;IACnD,OAAO,CAAC,EAAE,O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 -68,7 +68,7 @@ export declare class ContextMenu extends React.PureComponent<ContextMenuProps, C
|
|
|
68
68
|
static autoFlip: (dir: ContextMenuDirection, rect: DOMRectReadOnly, windowWidth: number, windowHeight: number) => ContextMenuDirection;
|
|
69
69
|
private _handleHotKeyParsed;
|
|
70
70
|
private _handleOnOutsideClick;
|
|
71
|
-
render(): JSX.Element;
|
|
71
|
+
render(): React.JSX.Element;
|
|
72
72
|
/** @internal */
|
|
73
73
|
static getCSSClassNameFromDirection: (direction?: ContextMenuDirection | undefined) => string;
|
|
74
74
|
private _injectMenuItemProps;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ContextMenu.d.ts","sourceRoot":"","sources":["../../../../src/core-react/contextmenu/ContextMenu.tsx"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,oBAAoB,CAAC;AAE5B,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAE7C,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAE9D,OAAO,EAAE,cAAc,EAAuB,MAAM,kBAAkB,CAAC;AAEvE;;IAEI;AACJ,MAAM,WAAW,gBAAiB,SAAQ,WAAW;IACnD,+CAA+C;IAC/C,MAAM,EAAE,OAAO,CAAC;IAChB,gFAAgF;IAChF,SAAS,CAAC,EAAE,oBAAoB,CAAC;IACjC,uDAAuD;IACvD,cAAc,CAAC,EAAE,CAAC,KAAK,EAAE,UAAU,KAAK,GAAG,CAAC;IAC5C,4CAA4C;IAC5C,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,GAAG,KAAK,GAAG,CAAC;IAC/B,oCAAoC;IACpC,KAAK,CAAC,EAAE,CAAC,IAAI,EAAE,GAAG,KAAK,GAAG,CAAC;IAC3B,wEAAwE;IACxE,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,wEAAwE;IACxE,SAAS,CAAC,EAAE,OAAO,CAAC;IACp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ACzC,OAAO,EAAE,CAAC;IAEZ,QAAQ,SAAS,EAAE;QACjB,KAAK,oBAAoB,CAAC,OAAO;YAC/B,SAAS,GAAG,8CAA8C,CAAC;YAC3D,MAAM;QACR,KAAK,oBAAoB,CAAC,GAAG;YAC3B,SAAS,GAAG,uBAAuB,CAAC;YACpC,MAAM;QACR,KAAK,oBAAoB,CAAC,QAAQ;YAChC,SAAS,GAAG,+CAA+C,CAAC;YAC5D,MAAM;QACR,KAAK,oBAAoB,CAAC,IAAI;YAC5B,SAAS,GAAG,wBAAwB,CAAC;YACrC,MAAM;QACR,KAAK,oBAAoB,CAAC,MAAM;YAC9B,SAAS,GAAG,0BAA0B,CAAC;YACvC,MAAM;QACR,KAAK,oBAAoB,CAAC,KAAK;YAC7B,SAAS,GAAG,yBAAyB,CAAC;YACtC,MAAM;QACR,KAAK,oBAAoB,CAAC,UAAU;YAClC,SAAS,GAAG,iDAAiD,CAAC;YAC9D,MAAM;QACR,KAAK,oBAAoB,CAAC,MAAM;YAC9B,SAAS,GAAG,0BAA0B,CAAC;YACvC,MAAM;QACR,KAAK,oBAAoB,CAAC,WAAW;YACnC,SAAS,GAAG,kDAAkD,CAAC;YAC/D,MAAM;KACT;IAED,OAAO,SAAS,CAAC;AACnB,CAAC,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module ContextMenu\r\n */\r\n\r\nimport \"./ContextMenu.scss\";\r\nimport classnames from \"classnames\";\r\nimport * as React from \"react\";\r\nimport { ConditionalBooleanValue, SpecialKey } from \"@itwin/appui-abstract\";\r\nimport { CommonProps } from \"../utils/Props\";\r\nimport { DivWithOutsideClick } from \"../base/DivWithOutsideClick\";\r\nimport { ContextMenuDirection } from \"./ContextMenuDirection\";\r\nimport { ContextMenuItem, ContextMenuItemProps } from \"./ContextMenuItem\";\r\nimport { ContextSubMenu, ContextSubMenuProps } from \"./ContextSubMenu\";\r\n\r\n/** Properties for the [[ContextMenu]] component\r\n * @public\r\n */\r\nexport interface ContextMenuProps extends CommonProps {\r\n /** Whether ContextMenu is currently opened. */\r\n opened: boolean;\r\n /** Which direction the menu opens. Default: ContextMenuDirection.BottomRight */\r\n direction?: ContextMenuDirection;\r\n /** When click is registered outside of ContextMenu. */\r\n onOutsideClick?: (event: MouseEvent) => any;\r\n /** When list item or submenu is selected */\r\n onSelect?: (event: any) => any;\r\n /** when Escape button is pressed */\r\n onEsc?: (data: any) => any;\r\n /** Whether menu flips directions based on screen edge. Default: true */\r\n autoflip?: boolean;\r\n /** Whether menu hugs screen edge when autoflip is off. Default: true */\r\n edgeLimit?: boolean;\r\n /** Whether Hotkey press selects item, or just highlights item. Default: true */\r\n hotkeySelect?: boolean;\r\n /** starting menu item selected index Default: -1 */\r\n selectedIndex?: number;\r\n /** whether menu floats on the viewport, or the page. When false, container elements can clip menu with overflow: hidden; Default: true */\r\n floating?: boolean;\r\n /** @internal */\r\n parentMenu?: ContextMenu;\r\n /** @internal */\r\n parentSubmenu?: ContextSubMenu;\r\n /** @internal */\r\n ignoreNextKeyUp?: boolean;\r\n}\r\n\r\n/** @internal */\r\ninterface ContextMenuState {\r\n selectedIndex: number;\r\n direction: ContextMenuDirection;\r\n ignoreNextKeyUp: boolean;\r\n}\r\n\r\n/**\r\n * A context menu populated with [[ContextMenuItem]] components.\r\n * Can be nested using [[ContextSubMenu]] component.\r\n * @public\r\n */\r\nexport class ContextMenu extends React.PureComponent<ContextMenuProps, ContextMenuState> {\r\n private _rootElement: HTMLElement | null = null;\r\n private _menuElement: HTMLElement | null = null;\r\n private _selectedElement: ContextMenuItem | ContextSubMenu | null = null;\r\n private _length: number = 0;\r\n private _hotKeyMap: Map<number, string> = new Map();\r\n\r\n private _lastChildren: React.ReactNode;\r\n private _lastDirection: ContextMenuDirection | undefined = ContextMenuDirection.BottomRight;\r\n private _lastSelectedIndex: number = 0;\r\n private _injectedChildren: React.ReactNode;\r\n private _parentWindowHeight: number = 0;\r\n private _parentWindowWidth: number = 0;\r\n\r\n public static defaultProps: Partial<ContextMenuProps> = {\r\n direction: ContextMenuDirection.BottomRight,\r\n autoflip: true,\r\n edgeLimit: true,\r\n hotkeySelect: true,\r\n selectedIndex: -1,\r\n floating: true,\r\n };\r\n\r\n /** @internal */\r\n public override readonly state: Readonly<ContextMenuState>;\r\n constructor(props: ContextMenuProps) {\r\n super(props);\r\n this.state = {\r\n selectedIndex: this.props.selectedIndex!,\r\n direction: props.direction!,\r\n ignoreNextKeyUp: props.ignoreNextKeyUp!,\r\n };\r\n }\r\n\r\n /** @internal */\r\n public static autoFlip = (dir: ContextMenuDirection, rect: DOMRectReadOnly, windowWidth: number, windowHeight: number): ContextMenuDirection => {\r\n if (rect.right > windowWidth) {\r\n switch (dir) {\r\n case ContextMenuDirection.TopRight:\r\n dir = ContextMenuDirection.TopLeft;\r\n break;\r\n case ContextMenuDirection.Right:\r\n dir = ContextMenuDirection.Left;\r\n break;\r\n case ContextMenuDirection.BottomRight:\r\n dir = ContextMenuDirection.BottomLeft;\r\n break;\r\n }\r\n }\r\n if (rect.left < 0) {\r\n switch (dir) {\r\n case ContextMenuDirection.TopLeft:\r\n dir = ContextMenuDirection.TopRight;\r\n break;\r\n case ContextMenuDirection.Left:\r\n dir = ContextMenuDirection.Right;\r\n break;\r\n case ContextMenuDirection.BottomLeft:\r\n dir = ContextMenuDirection.BottomRight;\r\n break;\r\n }\r\n }\r\n if (rect.bottom > windowHeight) {\r\n switch (dir) {\r\n case ContextMenuDirection.BottomLeft:\r\n dir = ContextMenuDirection.TopLeft;\r\n break;\r\n case ContextMenuDirection.Bottom:\r\n dir = ContextMenuDirection.Top;\r\n break;\r\n case ContextMenuDirection.BottomRight:\r\n dir = ContextMenuDirection.TopRight;\r\n break;\r\n }\r\n }\r\n if (rect.top < 0) {\r\n switch (dir) {\r\n case ContextMenuDirection.TopLeft:\r\n dir = ContextMenuDirection.BottomLeft;\r\n break;\r\n case ContextMenuDirection.Top:\r\n dir = ContextMenuDirection.Bottom;\r\n break;\r\n case ContextMenuDirection.TopRight:\r\n dir = ContextMenuDirection.BottomRight;\r\n break;\r\n }\r\n }\r\n return dir;\r\n };\r\n\r\n private _handleHotKeyParsed = (index: number, hotKey: string) => {\r\n this._hotKeyMap.set(index, hotKey);\r\n };\r\n\r\n // istanbul ignore next\r\n private _handleOnOutsideClick = (event: MouseEvent): void => {\r\n if (this.props.opened && this.props.onOutsideClick)\r\n this.props.onOutsideClick(event);\r\n };\r\n\r\n public override render(): JSX.Element {\r\n const {\r\n opened, direction, onOutsideClick, onSelect, onEsc, autoflip, edgeLimit, hotkeySelect, // eslint-disable-line @typescript-eslint/no-unused-vars\r\n selectedIndex, floating, parentMenu, parentSubmenu, children, className, ignoreNextKeyUp, // eslint-disable-line @typescript-eslint/no-unused-vars\r\n ...props } = this.props;\r\n const renderDirection = parentMenu === undefined ? this.state.direction : direction;\r\n\r\n if (this._lastChildren !== children || this._lastDirection !== renderDirection || this._lastSelectedIndex !== this.state.selectedIndex) {\r\n this._injectedChildren = this._injectMenuItemProps(children, renderDirection, this.state.selectedIndex);\r\n this._lastChildren = children;\r\n this._lastDirection = renderDirection;\r\n this._lastSelectedIndex = this.state.selectedIndex;\r\n }\r\n\r\n const classNames = classnames(\"core-context-menu\", className);\r\n\r\n return (\r\n <div\r\n role=\"presentation\"\r\n className={classNames}\r\n onKeyUp={this._handleKeyUp}\r\n onClick={this._handleClick}\r\n data-testid=\"core-context-menu-root\"\r\n {...props}\r\n ref={this._rootRef}>\r\n <DivWithOutsideClick onOutsideClick={this._handleOnOutsideClick}>\r\n <div\r\n ref={this._menuRef}\r\n role=\"menu\"\r\n tabIndex={0}\r\n data-testid=\"core-context-menu-container\"\r\n className={classnames(\"core-context-menu-container\",\r\n opened && \"core-context-menu-opened\",\r\n floating && \"core-context-menu-floating\",\r\n ContextMenu.getCSSClassNameFromDirection(renderDirection),\r\n )}>\r\n {this._injectedChildren}\r\n </div>\r\n </DivWithOutsideClick>\r\n </div>\r\n );\r\n }\r\n\r\n /** @internal */\r\n public static getCSSClassNameFromDirection = (direction?: ContextMenuDirection): string => {\r\n let className = \"\";\r\n\r\n // istanbul ignore next\r\n if (direction === undefined)\r\n direction = ContextMenuDirection.BottomRight;\r\n\r\n if (direction === ContextMenuDirection.None)\r\n return \"\";\r\n\r\n switch (direction) {\r\n case ContextMenuDirection.TopLeft:\r\n className = \"core-context-menu-top core-context-menu-left\";\r\n break;\r\n case ContextMenuDirection.Top:\r\n className = \"core-context-menu-top\";\r\n break;\r\n case ContextMenuDirection.TopRight:\r\n className = \"core-context-menu-top core-context-menu-right\";\r\n break;\r\n case ContextMenuDirection.Left:\r\n className = \"core-context-menu-left\";\r\n break;\r\n case ContextMenuDirection.Center:\r\n className = \"core-context-menu-center\";\r\n break;\r\n case ContextMenuDirection.Right:\r\n className = \"core-context-menu-right\";\r\n break;\r\n case ContextMenuDirection.BottomLeft:\r\n className = \"core-context-menu-bottom core-context-menu-left\";\r\n break;\r\n case ContextMenuDirection.Bottom:\r\n className = \"core-context-menu-bottom\";\r\n break;\r\n case ContextMenuDirection.BottomRight:\r\n className = \"core-context-menu-bottom core-context-menu-right\";\r\n break;\r\n }\r\n\r\n return className;\r\n };\r\n\r\n private _injectMenuItemProps = (children: React.ReactNode, direction: ContextMenuDirection | undefined, selectedIndex: number) => {\r\n let index = 0;\r\n // add inheritance data to submenu children\r\n const ch = React.Children.map(children, (child: React.ReactNode) => {\r\n // Capture only ContextSubMenus and ContextMenuItems.\r\n if (child && typeof child === \"object\" && \"props\" in child && (child.type === ContextSubMenu || child.type === ContextMenuItem) &&\r\n !ConditionalBooleanValue.getValue(child.props.disabled) && !ConditionalBooleanValue.getValue(child.props.hidden)) {\r\n const id = index; // get separate id variable so value stays the same when onHover is called later.\r\n const onHover = () => {\r\n this.setState({ selectedIndex: id });\r\n this.focus();\r\n };\r\n const ref = (el: ContextSubMenu | ContextMenuItem | null) => {\r\n if (selectedIndex === id) // only save to this._selectedElement if previously captured bool is true\r\n this._selectedElement = el;\r\n };\r\n const boundHandleHotKeyParse = this._handleHotKeyParsed.bind(this, id); // bind local callback for specific index\r\n const childProps: Partial<ContextSubMenuProps & ContextMenuItemProps & { ref: typeof ref }> = {\r\n parentMenu: this,\r\n ref,\r\n onHover,\r\n isSelected: selectedIndex === id,\r\n onHotKeyParsed: boundHandleHotKeyParse,\r\n };\r\n if (child.type === ContextSubMenu) { // add direction only to sub-menus\r\n childProps.direction = child.props.direction || /* istanbul ignore next */ direction;\r\n }\r\n index++;\r\n return React.cloneElement(child, childProps);\r\n } else return child; // Else, pass through unmodified\r\n });\r\n this._length = index;\r\n return ch;\r\n };\r\n\r\n private _rootRef = (el: HTMLDivElement | null) => {\r\n this._rootElement = el;\r\n };\r\n\r\n private _menuRef = (el: HTMLDivElement | null) => {\r\n this._menuElement = el;\r\n };\r\n\r\n private getWindow() {\r\n const el = this._rootElement ? this._rootElement : /* istanbul ignore next */ this._menuElement;\r\n const parentDocument = el!.ownerDocument;\r\n // istanbul ignore next\r\n return parentDocument.defaultView ?? window;\r\n }\r\n\r\n /** @internal */\r\n public override componentDidMount() {\r\n const parentWindow = this.getWindow();\r\n parentWindow.addEventListener(\"focus\", this._handleFocusChange);\r\n parentWindow.addEventListener(\"mouseup\", this._handleFocusChange);\r\n\r\n this.checkRenderDirection();\r\n\r\n if (this.props.opened)\r\n this.focus();\r\n }\r\n\r\n /** @internal */\r\n public override componentWillUnmount() {\r\n const parentWindow = this.getWindow();\r\n parentWindow.removeEventListener(\"focus\", this._handleFocusChange);\r\n parentWindow.removeEventListener(\"mouseup\", this._handleFocusChange);\r\n }\r\n\r\n private checkRenderDirection() {\r\n const { direction, autoflip, parentMenu } = this.props;\r\n const parentWindow = this.getWindow();\r\n\r\n let renderDirection = parentMenu === undefined ? this.state.direction : direction;\r\n\r\n if (parentWindow.innerHeight === this._parentWindowHeight && parentWindow.innerWidth === this._parentWindowWidth)\r\n return;\r\n this._parentWindowHeight = parentWindow.innerHeight;\r\n this._parentWindowWidth = parentWindow.innerWidth;\r\n\r\n // check if menu should flip\r\n if (parentWindow && autoflip && parentMenu === undefined) {\r\n const menuRect = this.getRect();\r\n renderDirection = ContextMenu.autoFlip(renderDirection!, menuRect, parentWindow.innerWidth, parentWindow.innerHeight);\r\n // istanbul ignore next\r\n if (renderDirection !== this.state.direction)\r\n this.setState({ direction: renderDirection });\r\n }\r\n }\r\n\r\n public focus = () => {\r\n // istanbul ignore else\r\n if (this._menuElement)\r\n this._menuElement.focus();\r\n };\r\n\r\n public blur = () => {\r\n // istanbul ignore else\r\n if (this._menuElement)\r\n this._menuElement.blur();\r\n };\r\n\r\n public getRect = (): DOMRect => {\r\n let clientRect = DOMRect.fromRect({ x: 0, y: 0, width: 0, height: 0});\r\n\r\n // istanbul ignore else\r\n if (this._menuElement) {\r\n clientRect = this._menuElement.getBoundingClientRect();\r\n }\r\n return clientRect;\r\n };\r\n\r\n private _handleFocusChange = (event: any): void => {\r\n // istanbul ignore else\r\n if (this._rootElement && this.props.opened && event.target instanceof Node && this.props.onOutsideClick && !this._rootElement.contains(event.target))\r\n this.props.onOutsideClick(event);\r\n };\r\n\r\n private _handleClick = (event: React.MouseEvent<HTMLDivElement>): void => {\r\n if (this.props.onSelect)\r\n this.props.onSelect(event);\r\n };\r\n\r\n private _handleKeyUp = (event: React.KeyboardEvent<HTMLDivElement>): void => {\r\n if (this.state.ignoreNextKeyUp) {\r\n this.setState({ ignoreNextKeyUp: false });\r\n return;\r\n }\r\n\r\n // istanbul ignore else\r\n if (event.key) {\r\n for (const [key, value] of this._hotKeyMap) {\r\n if (!this.props.hotkeySelect! && key > this.state.selectedIndex) { // Start search at current index.\r\n if (event.key.toUpperCase() === value) {\r\n this.setState({ selectedIndex: key });\r\n return;\r\n }\r\n }\r\n }\r\n for (const [key, value] of this._hotKeyMap) {\r\n if (event.key.toUpperCase() === value) {\r\n this.setState({ selectedIndex: key }, () => {\r\n if (this.props.hotkeySelect && this._selectedElement) {\r\n this._selectedElement.select();\r\n }\r\n });\r\n event.stopPropagation();\r\n return;\r\n }\r\n }\r\n }\r\n\r\n if (event.key === SpecialKey.ArrowLeft) {\r\n event.stopPropagation();\r\n if (this.props.parentMenu && this.props.parentSubmenu) {\r\n this.props.parentSubmenu.close();\r\n this.props.parentMenu.focus();\r\n }\r\n if (this.props.onEsc)\r\n this.props.onEsc(event);\r\n }\r\n\r\n if (event.key === SpecialKey.Escape) {\r\n // istanbul ignore else\r\n if (this.props.onEsc)\r\n this.props.onEsc(event);\r\n }\r\n\r\n if ((event.key === SpecialKey.Enter || event.key === SpecialKey.ArrowRight) && this._selectedElement) {\r\n event.stopPropagation();\r\n\r\n // istanbul ignore else\r\n if (event.key === SpecialKey.Enter || /* istanbul ignore next */ this._selectedElement instanceof ContextSubMenu) {\r\n // istanbul ignore else\r\n if (this._selectedElement.select)\r\n this._selectedElement.select();\r\n }\r\n }\r\n\r\n let { selectedIndex } = this.state;\r\n if (event.key === SpecialKey.ArrowUp || event.key === SpecialKey.ArrowDown) {\r\n event.stopPropagation();\r\n if (selectedIndex === -1) {\r\n selectedIndex = 0;\r\n } else {\r\n if (event.key === SpecialKey.ArrowUp) {\r\n if (this.state.selectedIndex === 0)\r\n selectedIndex = this._length - 1;\r\n else\r\n selectedIndex--;\r\n }\r\n if (event.key === SpecialKey.ArrowDown) {\r\n if (this.state.selectedIndex === this._length - 1)\r\n selectedIndex = 0;\r\n else\r\n selectedIndex++;\r\n }\r\n }\r\n }\r\n this.setState({ selectedIndex });\r\n };\r\n\r\n public override componentDidUpdate(prevProps: ContextMenuProps) {\r\n if (prevProps.selectedIndex !== this.props.selectedIndex) {\r\n this.setState((_, props) => ({ selectedIndex: props.selectedIndex! }));\r\n }\r\n if (!prevProps.opened && this.props.opened) {\r\n this.setState((_, props) => ({ selectedIndex: props.selectedIndex! }));\r\n }\r\n if (!this.props.parentMenu) {\r\n // const direction = this.props.direction!;\r\n // if ((!this.props.opened && prevProps.opened && direction !== this.state.direction) || prevProps.direction !== direction)\r\n this.checkRenderDirection();\r\n }\r\n }\r\n}\r\n"]}
|
|
1
|
+
{"version":3,"file":"ContextMenu.js","sourceRoot":"","sources":["../../../../src/core-react/contextmenu/ContextMenu.tsx"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAEH,OAAO,oBAAoB,CAAC;AAC5B,OAAO,UAAU,MAAM,YAAY,CAAC;AACpC,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,uBAAuB,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AAE5E,OAAO,EAAE,mBAAmB,EAAE,MAAM,6BAA6B,CAAC;AAClE,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAC9D,OAAO,EAAE,eAAe,EAAwB,MAAM,mBAAmB,CAAC;AAC1E,OAAO,EAAE,cAAc,EAAuB,MAAM,kBAAkB,CAAC;AAyCvE;;;;IAII;AACJ,MAAM,OAAO,WAAY,SAAQ,KAAK,CAAC,aAAiD;IAyBtF,YAAY,KAAuB;QACjC,KAAK,CAAC,KAAK,CAAC,CAAC;QAzBP,iBAAY,GAAuB,IAAI,CAAC;QACxC,iBAAY,GAAuB,IAAI,CAAC;QACxC,qBAAgB,GAA4C,IAAI,CAAC;QACjE,YAAO,GAAW,CAAC,CAAC;QACpB,eAAU,GAAwB,IAAI,GAAG,EAAE,CAAC;QAG5C,mBAAc,GAAqC,oBAAoB,CAAC,WAAW,CAAC;QACpF,uBAAkB,GAAW,CAAC,CAAC;QAE/B,wBAAmB,GAAW,CAAC,CAAC;QAChC,uBAAkB,GAAW,CAAC,CAAC;QA+E/B,wBAAmB,GAAG,CAAC,KAAa,EAAE,MAAc,EAAE,EAAE;YAC9D,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC;QACrC,CAAC,CAAC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B,SAAS,GAAG,8CAA8C,CAAC;YAC3D,MAAM;QACR,KAAK,oBAAoB,CAAC,GAAG;YAC3B,SAAS,GAAG,uBAAuB,CAAC;YACpC,MAAM;QACR,KAAK,oBAAoB,CAAC,QAAQ;YAChC,SAAS,GAAG,+CAA+C,CAAC;YAC5D,MAAM;QACR,KAAK,oBAAoB,CAAC,IAAI;YAC5B,SAAS,GAAG,wBAAwB,CAAC;YACrC,MAAM;QACR,KAAK,oBAAoB,CAAC,MAAM;YAC9B,SAAS,GAAG,0BAA0B,CAAC;YACvC,MAAM;QACR,KAAK,oBAAoB,CAAC,KAAK;YAC7B,SAAS,GAAG,yBAAyB,CAAC;YACtC,MAAM;QACR,KAAK,oBAAoB,CAAC,UAAU;YAClC,SAAS,GAAG,iDAAiD,CAAC;YAC9D,MAAM;QACR,KAAK,oBAAoB,CAAC,MAAM;YAC9B,SAAS,GAAG,0BAA0B,CAAC;YACvC,MAAM;QACR,KAAK,oBAAoB,CAAC,WAAW;YACnC,SAAS,GAAG,kDAAkD,CAAC;YAC/D,MAAM;KACT;IAED,OAAO,SAAS,CAAC;AACnB,CAAC,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module ContextMenu\r\n */\r\n\r\nimport \"./ContextMenu.scss\";\r\nimport classnames from \"classnames\";\r\nimport * as React from \"react\";\r\nimport { ConditionalBooleanValue, SpecialKey } from \"@itwin/appui-abstract\";\r\nimport { CommonProps } from \"../utils/Props\";\r\nimport { DivWithOutsideClick } from \"../base/DivWithOutsideClick\";\r\nimport { ContextMenuDirection } from \"./ContextMenuDirection\";\r\nimport { ContextMenuItem, ContextMenuItemProps } from \"./ContextMenuItem\";\r\nimport { ContextSubMenu, ContextSubMenuProps } from \"./ContextSubMenu\";\r\n\r\n/** Properties for the [[ContextMenu]] component\r\n * @public\r\n */\r\nexport interface ContextMenuProps extends CommonProps {\r\n /** Whether ContextMenu is currently opened. */\r\n opened: boolean;\r\n /** Which direction the menu opens. Default: ContextMenuDirection.BottomRight */\r\n direction?: ContextMenuDirection;\r\n /** When click is registered outside of ContextMenu. */\r\n onOutsideClick?: (event: MouseEvent) => any;\r\n /** When list item or submenu is selected */\r\n onSelect?: (event: any) => any;\r\n /** when Escape button is pressed */\r\n onEsc?: (data: any) => any;\r\n /** Whether menu flips directions based on screen edge. Default: true */\r\n autoflip?: boolean;\r\n /** Whether menu hugs screen edge when autoflip is off. Default: true */\r\n edgeLimit?: boolean;\r\n /** Whether Hotkey press selects item, or just highlights item. Default: true */\r\n hotkeySelect?: boolean;\r\n /** starting menu item selected index Default: -1 */\r\n selectedIndex?: number;\r\n /** whether menu floats on the viewport, or the page. When false, container elements can clip menu with overflow: hidden; Default: true */\r\n floating?: boolean;\r\n /** @internal */\r\n parentMenu?: ContextMenu;\r\n /** @internal */\r\n parentSubmenu?: ContextSubMenu;\r\n /** @internal */\r\n ignoreNextKeyUp?: boolean;\r\n}\r\n\r\n/** @internal */\r\ninterface ContextMenuState {\r\n selectedIndex: number;\r\n direction: ContextMenuDirection;\r\n ignoreNextKeyUp: boolean;\r\n}\r\n\r\n/**\r\n * A context menu populated with [[ContextMenuItem]] components.\r\n * Can be nested using [[ContextSubMenu]] component.\r\n * @public\r\n */\r\nexport class ContextMenu extends React.PureComponent<ContextMenuProps, ContextMenuState> {\r\n private _rootElement: HTMLElement | null = null;\r\n private _menuElement: HTMLElement | null = null;\r\n private _selectedElement: ContextMenuItem | ContextSubMenu | null = null;\r\n private _length: number = 0;\r\n private _hotKeyMap: Map<number, string> = new Map();\r\n\r\n private _lastChildren: React.ReactNode;\r\n private _lastDirection: ContextMenuDirection | undefined = ContextMenuDirection.BottomRight;\r\n private _lastSelectedIndex: number = 0;\r\n private _injectedChildren: React.ReactNode;\r\n private _parentWindowHeight: number = 0;\r\n private _parentWindowWidth: number = 0;\r\n\r\n public static defaultProps: Partial<ContextMenuProps> = {\r\n direction: ContextMenuDirection.BottomRight,\r\n autoflip: true,\r\n edgeLimit: true,\r\n hotkeySelect: true,\r\n selectedIndex: -1,\r\n floating: true,\r\n };\r\n\r\n /** @internal */\r\n public override readonly state: Readonly<ContextMenuState>;\r\n constructor(props: ContextMenuProps) {\r\n super(props);\r\n this.state = {\r\n selectedIndex: this.props.selectedIndex!,\r\n direction: props.direction!,\r\n ignoreNextKeyUp: props.ignoreNextKeyUp!,\r\n };\r\n }\r\n\r\n /** @internal */\r\n public static autoFlip = (dir: ContextMenuDirection, rect: DOMRectReadOnly, windowWidth: number, windowHeight: number): ContextMenuDirection => {\r\n if (rect.right > windowWidth) {\r\n switch (dir) {\r\n case ContextMenuDirection.TopRight:\r\n dir = ContextMenuDirection.TopLeft;\r\n break;\r\n case ContextMenuDirection.Right:\r\n dir = ContextMenuDirection.Left;\r\n break;\r\n case ContextMenuDirection.BottomRight:\r\n dir = ContextMenuDirection.BottomLeft;\r\n break;\r\n }\r\n }\r\n if (rect.left < 0) {\r\n switch (dir) {\r\n case ContextMenuDirection.TopLeft:\r\n dir = ContextMenuDirection.TopRight;\r\n break;\r\n case ContextMenuDirection.Left:\r\n dir = ContextMenuDirection.Right;\r\n break;\r\n case ContextMenuDirection.BottomLeft:\r\n dir = ContextMenuDirection.BottomRight;\r\n break;\r\n }\r\n }\r\n if (rect.bottom > windowHeight) {\r\n switch (dir) {\r\n case ContextMenuDirection.BottomLeft:\r\n dir = ContextMenuDirection.TopLeft;\r\n break;\r\n case ContextMenuDirection.Bottom:\r\n dir = ContextMenuDirection.Top;\r\n break;\r\n case ContextMenuDirection.BottomRight:\r\n dir = ContextMenuDirection.TopRight;\r\n break;\r\n }\r\n }\r\n if (rect.top < 0) {\r\n switch (dir) {\r\n case ContextMenuDirection.TopLeft:\r\n dir = ContextMenuDirection.BottomLeft;\r\n break;\r\n case ContextMenuDirection.Top:\r\n dir = ContextMenuDirection.Bottom;\r\n break;\r\n case ContextMenuDirection.TopRight:\r\n dir = ContextMenuDirection.BottomRight;\r\n break;\r\n }\r\n }\r\n return dir;\r\n };\r\n\r\n private _handleHotKeyParsed = (index: number, hotKey: string) => {\r\n this._hotKeyMap.set(index, hotKey);\r\n };\r\n\r\n // istanbul ignore next\r\n private _handleOnOutsideClick = (event: MouseEvent): void => {\r\n if (this.props.opened && this.props.onOutsideClick)\r\n this.props.onOutsideClick(event);\r\n };\r\n\r\n public override render(): React.JSX.Element {\r\n const {\r\n opened, direction, onOutsideClick, onSelect, onEsc, autoflip, edgeLimit, hotkeySelect, // eslint-disable-line @typescript-eslint/no-unused-vars\r\n selectedIndex, floating, parentMenu, parentSubmenu, children, className, ignoreNextKeyUp, // eslint-disable-line @typescript-eslint/no-unused-vars\r\n ...props } = this.props;\r\n const renderDirection = parentMenu === undefined ? this.state.direction : direction;\r\n\r\n if (this._lastChildren !== children || this._lastDirection !== renderDirection || this._lastSelectedIndex !== this.state.selectedIndex) {\r\n this._injectedChildren = this._injectMenuItemProps(children, renderDirection, this.state.selectedIndex);\r\n this._lastChildren = children;\r\n this._lastDirection = renderDirection;\r\n this._lastSelectedIndex = this.state.selectedIndex;\r\n }\r\n\r\n const classNames = classnames(\"core-context-menu\", className);\r\n\r\n return (\r\n <div\r\n role=\"presentation\"\r\n className={classNames}\r\n onKeyUp={this._handleKeyUp}\r\n onClick={this._handleClick}\r\n data-testid=\"core-context-menu-root\"\r\n {...props}\r\n ref={this._rootRef}>\r\n <DivWithOutsideClick onOutsideClick={this._handleOnOutsideClick}>\r\n <div\r\n ref={this._menuRef}\r\n role=\"menu\"\r\n tabIndex={0}\r\n data-testid=\"core-context-menu-container\"\r\n className={classnames(\"core-context-menu-container\",\r\n opened && \"core-context-menu-opened\",\r\n floating && \"core-context-menu-floating\",\r\n ContextMenu.getCSSClassNameFromDirection(renderDirection),\r\n )}>\r\n {this._injectedChildren}\r\n </div>\r\n </DivWithOutsideClick>\r\n </div>\r\n );\r\n }\r\n\r\n /** @internal */\r\n public static getCSSClassNameFromDirection = (direction?: ContextMenuDirection): string => {\r\n let className = \"\";\r\n\r\n // istanbul ignore next\r\n if (direction === undefined)\r\n direction = ContextMenuDirection.BottomRight;\r\n\r\n if (direction === ContextMenuDirection.None)\r\n return \"\";\r\n\r\n switch (direction) {\r\n case ContextMenuDirection.TopLeft:\r\n className = \"core-context-menu-top core-context-menu-left\";\r\n break;\r\n case ContextMenuDirection.Top:\r\n className = \"core-context-menu-top\";\r\n break;\r\n case ContextMenuDirection.TopRight:\r\n className = \"core-context-menu-top core-context-menu-right\";\r\n break;\r\n case ContextMenuDirection.Left:\r\n className = \"core-context-menu-left\";\r\n break;\r\n case ContextMenuDirection.Center:\r\n className = \"core-context-menu-center\";\r\n break;\r\n case ContextMenuDirection.Right:\r\n className = \"core-context-menu-right\";\r\n break;\r\n case ContextMenuDirection.BottomLeft:\r\n className = \"core-context-menu-bottom core-context-menu-left\";\r\n break;\r\n case ContextMenuDirection.Bottom:\r\n className = \"core-context-menu-bottom\";\r\n break;\r\n case ContextMenuDirection.BottomRight:\r\n className = \"core-context-menu-bottom core-context-menu-right\";\r\n break;\r\n }\r\n\r\n return className;\r\n };\r\n\r\n private _injectMenuItemProps = (children: React.ReactNode, direction: ContextMenuDirection | undefined, selectedIndex: number) => {\r\n let index = 0;\r\n // add inheritance data to submenu children\r\n const ch = React.Children.map(children, (child: React.ReactNode) => {\r\n // Capture only ContextSubMenus and ContextMenuItems.\r\n if (child && typeof child === \"object\" && \"props\" in child && (child.type === ContextSubMenu || child.type === ContextMenuItem) &&\r\n !ConditionalBooleanValue.getValue(child.props.disabled) && !ConditionalBooleanValue.getValue(child.props.hidden)) {\r\n const id = index; // get separate id variable so value stays the same when onHover is called later.\r\n const onHover = () => {\r\n this.setState({ selectedIndex: id });\r\n this.focus();\r\n };\r\n const ref = (el: ContextSubMenu | ContextMenuItem | null) => {\r\n if (selectedIndex === id) // only save to this._selectedElement if previously captured bool is true\r\n this._selectedElement = el;\r\n };\r\n const boundHandleHotKeyParse = this._handleHotKeyParsed.bind(this, id); // bind local callback for specific index\r\n const childProps: Partial<ContextSubMenuProps & ContextMenuItemProps & { ref: typeof ref }> = {\r\n parentMenu: this,\r\n ref,\r\n onHover,\r\n isSelected: selectedIndex === id,\r\n onHotKeyParsed: boundHandleHotKeyParse,\r\n };\r\n if (child.type === ContextSubMenu) { // add direction only to sub-menus\r\n childProps.direction = child.props.direction || /* istanbul ignore next */ direction;\r\n }\r\n index++;\r\n return React.cloneElement(child, childProps);\r\n } else return child; // Else, pass through unmodified\r\n });\r\n this._length = index;\r\n return ch;\r\n };\r\n\r\n private _rootRef = (el: HTMLDivElement | null) => {\r\n this._rootElement = el;\r\n };\r\n\r\n private _menuRef = (el: HTMLDivElement | null) => {\r\n this._menuElement = el;\r\n };\r\n\r\n private getWindow() {\r\n const el = this._rootElement ? this._rootElement : /* istanbul ignore next */ this._menuElement;\r\n const parentDocument = el!.ownerDocument;\r\n // istanbul ignore next\r\n return parentDocument.defaultView ?? window;\r\n }\r\n\r\n /** @internal */\r\n public override componentDidMount() {\r\n const parentWindow = this.getWindow();\r\n parentWindow.addEventListener(\"focus\", this._handleFocusChange);\r\n parentWindow.addEventListener(\"mouseup\", this._handleFocusChange);\r\n\r\n this.checkRenderDirection();\r\n\r\n if (this.props.opened)\r\n this.focus();\r\n }\r\n\r\n /** @internal */\r\n public override componentWillUnmount() {\r\n const parentWindow = this.getWindow();\r\n parentWindow.removeEventListener(\"focus\", this._handleFocusChange);\r\n parentWindow.removeEventListener(\"mouseup\", this._handleFocusChange);\r\n }\r\n\r\n private checkRenderDirection() {\r\n const { direction, autoflip, parentMenu } = this.props;\r\n const parentWindow = this.getWindow();\r\n\r\n let renderDirection = parentMenu === undefined ? this.state.direction : direction;\r\n\r\n if (parentWindow.innerHeight === this._parentWindowHeight && parentWindow.innerWidth === this._parentWindowWidth)\r\n return;\r\n this._parentWindowHeight = parentWindow.innerHeight;\r\n this._parentWindowWidth = parentWindow.innerWidth;\r\n\r\n // check if menu should flip\r\n if (parentWindow && autoflip && parentMenu === undefined) {\r\n const menuRect = this.getRect();\r\n renderDirection = ContextMenu.autoFlip(renderDirection!, menuRect, parentWindow.innerWidth, parentWindow.innerHeight);\r\n // istanbul ignore next\r\n if (renderDirection !== this.state.direction)\r\n this.setState({ direction: renderDirection });\r\n }\r\n }\r\n\r\n public focus = () => {\r\n // istanbul ignore else\r\n if (this._menuElement)\r\n this._menuElement.focus();\r\n };\r\n\r\n public blur = () => {\r\n // istanbul ignore else\r\n if (this._menuElement)\r\n this._menuElement.blur();\r\n };\r\n\r\n public getRect = (): DOMRect => {\r\n let clientRect = DOMRect.fromRect({ x: 0, y: 0, width: 0, height: 0});\r\n\r\n // istanbul ignore else\r\n if (this._menuElement) {\r\n clientRect = this._menuElement.getBoundingClientRect();\r\n }\r\n return clientRect;\r\n };\r\n\r\n private _handleFocusChange = (event: any): void => {\r\n // istanbul ignore else\r\n if (this._rootElement && this.props.opened && event.target instanceof Node && this.props.onOutsideClick && !this._rootElement.contains(event.target))\r\n this.props.onOutsideClick(event);\r\n };\r\n\r\n private _handleClick = (event: React.MouseEvent<HTMLDivElement>): void => {\r\n if (this.props.onSelect)\r\n this.props.onSelect(event);\r\n };\r\n\r\n private _handleKeyUp = (event: React.KeyboardEvent<HTMLDivElement>): void => {\r\n if (this.state.ignoreNextKeyUp) {\r\n this.setState({ ignoreNextKeyUp: false });\r\n return;\r\n }\r\n\r\n // istanbul ignore else\r\n if (event.key) {\r\n for (const [key, value] of this._hotKeyMap) {\r\n if (!this.props.hotkeySelect! && key > this.state.selectedIndex) { // Start search at current index.\r\n if (event.key.toUpperCase() === value) {\r\n this.setState({ selectedIndex: key });\r\n return;\r\n }\r\n }\r\n }\r\n for (const [key, value] of this._hotKeyMap) {\r\n if (event.key.toUpperCase() === value) {\r\n this.setState({ selectedIndex: key }, () => {\r\n if (this.props.hotkeySelect && this._selectedElement) {\r\n this._selectedElement.select();\r\n }\r\n });\r\n event.stopPropagation();\r\n return;\r\n }\r\n }\r\n }\r\n\r\n if (event.key === SpecialKey.ArrowLeft) {\r\n event.stopPropagation();\r\n if (this.props.parentMenu && this.props.parentSubmenu) {\r\n this.props.parentSubmenu.close();\r\n this.props.parentMenu.focus();\r\n }\r\n if (this.props.onEsc)\r\n this.props.onEsc(event);\r\n }\r\n\r\n if (event.key === SpecialKey.Escape) {\r\n // istanbul ignore else\r\n if (this.props.onEsc)\r\n this.props.onEsc(event);\r\n }\r\n\r\n if ((event.key === SpecialKey.Enter || event.key === SpecialKey.ArrowRight) && this._selectedElement) {\r\n event.stopPropagation();\r\n\r\n // istanbul ignore else\r\n if (event.key === SpecialKey.Enter || /* istanbul ignore next */ this._selectedElement instanceof ContextSubMenu) {\r\n // istanbul ignore else\r\n if (this._selectedElement.select)\r\n this._selectedElement.select();\r\n }\r\n }\r\n\r\n let { selectedIndex } = this.state;\r\n if (event.key === SpecialKey.ArrowUp || event.key === SpecialKey.ArrowDown) {\r\n event.stopPropagation();\r\n if (selectedIndex === -1) {\r\n selectedIndex = 0;\r\n } else {\r\n if (event.key === SpecialKey.ArrowUp) {\r\n if (this.state.selectedIndex === 0)\r\n selectedIndex = this._length - 1;\r\n else\r\n selectedIndex--;\r\n }\r\n if (event.key === SpecialKey.ArrowDown) {\r\n if (this.state.selectedIndex === this._length - 1)\r\n selectedIndex = 0;\r\n else\r\n selectedIndex++;\r\n }\r\n }\r\n }\r\n this.setState({ selectedIndex });\r\n };\r\n\r\n public override componentDidUpdate(prevProps: ContextMenuProps) {\r\n if (prevProps.selectedIndex !== this.props.selectedIndex) {\r\n this.setState((_, props) => ({ selectedIndex: props.selectedIndex! }));\r\n }\r\n if (!prevProps.opened && this.props.opened) {\r\n this.setState((_, props) => ({ selectedIndex: props.selectedIndex! }));\r\n }\r\n if (!this.props.parentMenu) {\r\n // const direction = this.props.direction!;\r\n // if ((!this.props.opened && prevProps.opened && direction !== this.state.direction) || prevProps.direction !== direction)\r\n this.checkRenderDirection();\r\n }\r\n }\r\n}\r\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ContextMenuDivider.d.ts","sourceRoot":"","sources":["../../../../src/core-react/contextmenu/ContextMenuDivider.tsx"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAE7C;;;GAGG;AACH,qBAAa,kBAAmB,SAAQ,KAAK,CAAC,aAAa,CAAC,WAAW,CAAC;IACtD,MAAM,IAAI,GAAG,CAAC,OAAO;
|
|
1
|
+
{"version":3,"file":"ContextMenuDivider.d.ts","sourceRoot":"","sources":["../../../../src/core-react/contextmenu/ContextMenuDivider.tsx"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAE7C;;;GAGG;AACH,qBAAa,kBAAmB,SAAQ,KAAK,CAAC,aAAa,CAAC,WAAW,CAAC;IACtD,MAAM,IAAI,KAAK,CAAC,GAAG,CAAC,OAAO;CAM5C"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ContextMenuDivider.js","sourceRoot":"","sources":["../../../../src/core-react/contextmenu/ContextMenuDivider.tsx"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,UAAU,MAAM,YAAY,CAAC;AAGpC;;;GAGG;AACH,MAAM,OAAO,kBAAmB,SAAQ,KAAK,CAAC,aAA0B;IACtD,MAAM;QACpB,MAAM,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,GAAG,IAAI,CAAC,KAAK,CAAC;QAC3C,OAAO,CACL,gCAAS,KAAK,iBAAc,2BAA2B,EAAC,SAAS,EAAE,UAAU,CAAC,2BAA2B,EAAE,SAAS,CAAC,GAAI,CAC1H,CAAC;IACJ,CAAC;CACF","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module ContextMenu\r\n */\r\n\r\nimport * as React from \"react\";\r\nimport classnames from \"classnames\";\r\nimport { CommonProps } from \"../utils/Props\";\r\n\r\n/**\r\n * Menu Divider for [[ContextMenu]]. Inserts a line between items, used for list item grouping.\r\n * @public\r\n */\r\nexport class ContextMenuDivider extends React.PureComponent<CommonProps> {\r\n public override render(): JSX.Element {\r\n const { className, ...props } = this.props;\r\n return (\r\n <div {...props} data-testid=\"core-context-menu-divider\" className={classnames(\"core-context-menu-divider\", className)} />\r\n );\r\n }\r\n}\r\n"]}
|
|
1
|
+
{"version":3,"file":"ContextMenuDivider.js","sourceRoot":"","sources":["../../../../src/core-react/contextmenu/ContextMenuDivider.tsx"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,UAAU,MAAM,YAAY,CAAC;AAGpC;;;GAGG;AACH,MAAM,OAAO,kBAAmB,SAAQ,KAAK,CAAC,aAA0B;IACtD,MAAM;QACpB,MAAM,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,GAAG,IAAI,CAAC,KAAK,CAAC;QAC3C,OAAO,CACL,gCAAS,KAAK,iBAAc,2BAA2B,EAAC,SAAS,EAAE,UAAU,CAAC,2BAA2B,EAAE,SAAS,CAAC,GAAI,CAC1H,CAAC;IACJ,CAAC;CACF","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module ContextMenu\r\n */\r\n\r\nimport * as React from \"react\";\r\nimport classnames from \"classnames\";\r\nimport { CommonProps } from \"../utils/Props\";\r\n\r\n/**\r\n * Menu Divider for [[ContextMenu]]. Inserts a line between items, used for list item grouping.\r\n * @public\r\n */\r\nexport class ContextMenuDivider extends React.PureComponent<CommonProps> {\r\n public override render(): React.JSX.Element {\r\n const { className, ...props } = this.props;\r\n return (\r\n <div {...props} data-testid=\"core-context-menu-divider\" className={classnames(\"core-context-menu-divider\", className)} />\r\n );\r\n }\r\n}\r\n"]}
|
|
@@ -48,7 +48,7 @@ export declare class ContextMenuItem extends React.PureComponent<ContextMenuItem
|
|
|
48
48
|
constructor(props: ContextMenuItemProps);
|
|
49
49
|
/** @internal */
|
|
50
50
|
readonly state: Readonly<ContextMenuItemState>;
|
|
51
|
-
render(): JSX.Element;
|
|
51
|
+
render(): React.JSX.Element;
|
|
52
52
|
componentDidMount(): void;
|
|
53
53
|
componentDidUpdate(prevProps: ContextMenuItemProps): void;
|
|
54
54
|
private _updateHotkey;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ContextMenuItem.d.ts","sourceRoot":"","sources":["../../../../src/core-react/contextmenu/ContextMenuItem.tsx"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAAE,SAAS,EAAE,uBAAuB,EAAc,MAAM,uBAAuB,CAAC;AACvF,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAC7C,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAG5C,OAAO,EAAQ,QAAQ,EAAE,MAAM,wBAAwB,CAAC;AAExD;;GAEG;AACH,MAAM,WAAW,oBAAqB,SAAQ,IAAI,CAAC,KAAK,CAAC,iBAAiB,CAAC,cAAc,CAAC,EAAE,UAAU,GAAG,QAAQ,CAAC,EAAE,WAAW;IAC7H,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,GAAG,KAAK,GAAG,CA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,QAAQ,EAAE,SAAS,GAAI,CACzB;YAEP,KAAK;gBACJ,6BAAK,SAAS,EAAC,yBAAyB,IACrC,KAAK,CACF,CAEJ,CACP,CAAC;IACJ,CAAC;IAEe,iBAAiB;QAC/B,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC;IAC1C,CAAC;IAEe,kBAAkB,CAAC,SAA+B;QAChE,IAAI,IAAI,CAAC,KAAK,CAAC,QAAQ,KAAK,SAAS,CAAC,QAAQ,EAAE;YAC9C,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC;SACzC;IACH,CAAC;;AAxED,gBAAgB;AACF,4BAAY,GAAkC;IAC1D,QAAQ,EAAE,KAAK;IACf,MAAM,EAAE,KAAK;IACb,UAAU,EAAE,KAAK;CAClB,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module ContextMenu\r\n */\r\n\r\nimport * as React from \"react\";\r\nimport classnames from \"classnames\";\r\nimport { BadgeType, ConditionalBooleanValue, SpecialKey } from \"@itwin/appui-abstract\";\r\nimport { CommonProps } from \"../utils/Props\";\r\nimport { ContextMenu } from \"./ContextMenu\";\r\nimport { BadgeUtilities } from \"../badge/BadgeUtilities\";\r\nimport { TildeFinder } from \"./TildeFinder\";\r\nimport { Icon, IconSpec } from \"../icons/IconComponent\";\r\n\r\n/** Properties for the [[ContextMenuItem]] component\r\n * @public\r\n */\r\nexport interface ContextMenuItemProps extends Omit<React.AllHTMLAttributes<HTMLDivElement>, \"disabled\" | \"hidden\">, CommonProps {\r\n onSelect?: (event: any) => any;\r\n /** @internal */\r\n onHotKeyParsed?: (hotKey: string) => void;\r\n /** Icon to display in the left margin. */\r\n icon?: IconSpec;\r\n /** Disables any onSelect calls, hover/keyboard highlighting, and grays item. */\r\n disabled?: boolean | ConditionalBooleanValue;\r\n /** Indicates whether the item is visible or hidden. The default is for the item to be visible. */\r\n hidden?: boolean | ConditionalBooleanValue;\r\n /** Badge to be overlaid on the item. */\r\n badgeType?: BadgeType;\r\n /** Icon to display in the right margin. */\r\n iconRight?: IconSpec;\r\n /** Hide the icon container. This can be used to eliminate space used to display an icon at the left of the menu item. */\r\n hideIconContainer?: boolean;\r\n /** @internal */\r\n onHover?: () => any;\r\n /* @internal */\r\n isSelected?: boolean;\r\n /** @internal */\r\n parentMenu?: ContextMenu;\r\n}\r\n\r\n/** @internal */\r\ninterface ContextMenuItemState {\r\n hotKey?: string;\r\n}\r\n\r\n/**\r\n * Menu Item class for use within a [[ContextMenu]] component.\r\n * @public\r\n */\r\nexport class ContextMenuItem extends React.PureComponent<ContextMenuItemProps, ContextMenuItemState> {\r\n private _root: HTMLElement | null = null;\r\n private _lastChildren: React.ReactNode;\r\n private _parsedChildren: React.ReactNode;\r\n /** @internal */\r\n public static defaultProps: Partial<ContextMenuItemProps> = {\r\n disabled: false,\r\n hidden: false,\r\n isSelected: false,\r\n };\r\n constructor(props: ContextMenuItemProps) {\r\n super(props);\r\n }\r\n /** @internal */\r\n public override readonly state: Readonly<ContextMenuItemState> = {};\r\n public override render(): JSX.Element {\r\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\r\n const { onClick, className, style, onSelect, icon, disabled, hidden, onHover, isSelected, parentMenu, onHotKeyParsed, badgeType, iconRight,\r\n hideIconContainer, ...props } = this.props;\r\n const badge = BadgeUtilities.getComponentForBadgeType(badgeType);\r\n const isDisabled = ConditionalBooleanValue.getValue(disabled);\r\n const isHidden = ConditionalBooleanValue.getValue(hidden);\r\n\r\n if (this._lastChildren !== this.props.children) {\r\n this._parsedChildren = TildeFinder.findAfterTilde(this.props.children).node;\r\n this._lastChildren = this.props.children;\r\n }\r\n\r\n return (\r\n <div\r\n {...props}\r\n ref={(el) => { this._root = el; }}\r\n onClick={this._handleClick}\r\n style={style}\r\n onFocus={this._handleFocus}\r\n onKeyUp={this._handleKeyUp}\r\n onMouseOver={this._handleMouseOver}\r\n data-testid={\"core-context-menu-item\"}\r\n className={classnames(\"core-context-menu-item\", className,\r\n isDisabled && \"core-context-menu-disabled\",\r\n isHidden && \"core-context-menu-hidden\",\r\n isSelected && \"core-context-menu-is-selected\")\r\n }\r\n role=\"menuitem\"\r\n tabIndex={isSelected ? 0 : -1}\r\n aria-disabled={isDisabled}\r\n aria-hidden={isHidden}\r\n >\r\n {!hideIconContainer && <div className=\"core-context-menu-icon\">\r\n {icon !== undefined && <Icon iconSpec={icon} />}\r\n </div>}\r\n <div className={\"core-context-menu-content\"}>\r\n {this._parsedChildren}\r\n </div>\r\n {iconRight &&\r\n <div className={classnames(\"core-context-menu-icon\", \"core-context-menu-icon-right\")}>\r\n <Icon iconSpec={iconRight} />\r\n </div>\r\n }\r\n {badge &&\r\n <div className=\"core-context-menu-badge\">\r\n {badge}\r\n </div>\r\n }\r\n </div>\r\n );\r\n }\r\n\r\n public override componentDidMount() {\r\n this._updateHotkey(this.props.children);\r\n }\r\n\r\n public override componentDidUpdate(prevProps: ContextMenuItemProps) {\r\n if (this.props.children !== prevProps.children) {\r\n this._updateHotkey(this.props.children);\r\n }\r\n }\r\n\r\n private _updateHotkey = (node: React.ReactNode) => {\r\n let hotKey: string | undefined;\r\n const isDisabled = ConditionalBooleanValue.getValue(this.props.disabled);\r\n const isHidden = ConditionalBooleanValue.getValue(this.props.hidden);\r\n if (!isDisabled && !isHidden)\r\n hotKey = TildeFinder.findAfterTilde(node).character;\r\n else\r\n hotKey = undefined;\r\n if (hotKey && hotKey !== this.state.hotKey) {\r\n this.setState({ hotKey });\r\n if (this.props.onHotKeyParsed)\r\n this.props.onHotKeyParsed(hotKey);\r\n }\r\n };\r\n\r\n private _handleFocus = (event: React.FocusEvent<HTMLDivElement>) => {\r\n event.stopPropagation();\r\n };\r\n\r\n private _handleMouseOver = (_event: React.MouseEvent<HTMLDivElement>) => {\r\n // istanbul ignore else\r\n if (this._root && this._root.style.visibility !== \"hidden\" && this.props.onHover) {\r\n this.props.onHover();\r\n }\r\n };\r\n\r\n public select = () => {\r\n // istanbul ignore else\r\n if (this._root) {\r\n this._root.click();\r\n if (this.props.parentMenu && this.props.parentMenu.props.parentSubmenu)\r\n this.props.parentMenu.props.parentSubmenu.close(true);\r\n }\r\n };\r\n\r\n private _handleClick = (event: React.MouseEvent<HTMLDivElement>) => {\r\n const isDisabled = ConditionalBooleanValue.getValue(this.props.disabled);\r\n if (isDisabled)\r\n return;\r\n\r\n if (this.props.onClick)\r\n this.props.onClick(event);\r\n if (this.props.onSelect)\r\n this.props.onSelect(event);\r\n };\r\n\r\n private _handleKeyUp = (event: React.KeyboardEvent<HTMLDivElement>) => {\r\n const isDisabled = ConditionalBooleanValue.getValue(this.props.disabled);\r\n if (event.key === SpecialKey.Enter && this.props.onSelect !== undefined && !isDisabled) {\r\n this.props.onSelect(event);\r\n }\r\n };\r\n}\r\n"]}
|
|
1
|
+
{"version":3,"file":"ContextMenuItem.js","sourceRoot":"","sources":["../../../../src/core-react/contextmenu/ContextMenuItem.tsx"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,UAAU,MAAM,YAAY,CAAC;AACpC,OAAO,EAAa,uBAAuB,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AAGvF,OAAO,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AACzD,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,IAAI,EAAY,MAAM,wBAAwB,CAAC;AAkCxD;;;GAGG;AACH,MAAM,OAAO,eAAgB,SAAQ,KAAK,CAAC,aAAyD;IAUlG,YAAY,KAA2B;QACrC,KAAK,CAAC,KAAK,CAAC,CAAC;QAVP,UAAK,GAAuB,IAAI,CAAC;QAYz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B,IACxC,IAAI,CAAC,eAAe,CACjB;YACL,SAAS;gBACR,6BAAK,SAAS,EAAE,UAAU,CAAC,wBAAwB,EAAE,8BAA8B,CAAC;oBAClF,oBAAC,IAAI,IAAC,QAAQ,EAAE,SAAS,GAAI,CACzB;YAEP,KAAK;gBACJ,6BAAK,SAAS,EAAC,yBAAyB,IACrC,KAAK,CACF,CAEJ,CACP,CAAC;IACJ,CAAC;IAEe,iBAAiB;QAC/B,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC;IAC1C,CAAC;IAEe,kBAAkB,CAAC,SAA+B;QAChE,IAAI,IAAI,CAAC,KAAK,CAAC,QAAQ,KAAK,SAAS,CAAC,QAAQ,EAAE;YAC9C,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC;SACzC;IACH,CAAC;;AAxED,gBAAgB;AACF,4BAAY,GAAkC;IAC1D,QAAQ,EAAE,KAAK;IACf,MAAM,EAAE,KAAK;IACb,UAAU,EAAE,KAAK;CAClB,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module ContextMenu\r\n */\r\n\r\nimport * as React from \"react\";\r\nimport classnames from \"classnames\";\r\nimport { BadgeType, ConditionalBooleanValue, SpecialKey } from \"@itwin/appui-abstract\";\r\nimport { CommonProps } from \"../utils/Props\";\r\nimport { ContextMenu } from \"./ContextMenu\";\r\nimport { BadgeUtilities } from \"../badge/BadgeUtilities\";\r\nimport { TildeFinder } from \"./TildeFinder\";\r\nimport { Icon, IconSpec } from \"../icons/IconComponent\";\r\n\r\n/** Properties for the [[ContextMenuItem]] component\r\n * @public\r\n */\r\nexport interface ContextMenuItemProps extends Omit<React.AllHTMLAttributes<HTMLDivElement>, \"disabled\" | \"hidden\">, CommonProps {\r\n onSelect?: (event: any) => any;\r\n /** @internal */\r\n onHotKeyParsed?: (hotKey: string) => void;\r\n /** Icon to display in the left margin. */\r\n icon?: IconSpec;\r\n /** Disables any onSelect calls, hover/keyboard highlighting, and grays item. */\r\n disabled?: boolean | ConditionalBooleanValue;\r\n /** Indicates whether the item is visible or hidden. The default is for the item to be visible. */\r\n hidden?: boolean | ConditionalBooleanValue;\r\n /** Badge to be overlaid on the item. */\r\n badgeType?: BadgeType;\r\n /** Icon to display in the right margin. */\r\n iconRight?: IconSpec;\r\n /** Hide the icon container. This can be used to eliminate space used to display an icon at the left of the menu item. */\r\n hideIconContainer?: boolean;\r\n /** @internal */\r\n onHover?: () => any;\r\n /* @internal */\r\n isSelected?: boolean;\r\n /** @internal */\r\n parentMenu?: ContextMenu;\r\n}\r\n\r\n/** @internal */\r\ninterface ContextMenuItemState {\r\n hotKey?: string;\r\n}\r\n\r\n/**\r\n * Menu Item class for use within a [[ContextMenu]] component.\r\n * @public\r\n */\r\nexport class ContextMenuItem extends React.PureComponent<ContextMenuItemProps, ContextMenuItemState> {\r\n private _root: HTMLElement | null = null;\r\n private _lastChildren: React.ReactNode;\r\n private _parsedChildren: React.ReactNode;\r\n /** @internal */\r\n public static defaultProps: Partial<ContextMenuItemProps> = {\r\n disabled: false,\r\n hidden: false,\r\n isSelected: false,\r\n };\r\n constructor(props: ContextMenuItemProps) {\r\n super(props);\r\n }\r\n /** @internal */\r\n public override readonly state: Readonly<ContextMenuItemState> = {};\r\n public override render(): React.JSX.Element {\r\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\r\n const { onClick, className, style, onSelect, icon, disabled, hidden, onHover, isSelected, parentMenu, onHotKeyParsed, badgeType, iconRight,\r\n hideIconContainer, ...props } = this.props;\r\n const badge = BadgeUtilities.getComponentForBadgeType(badgeType);\r\n const isDisabled = ConditionalBooleanValue.getValue(disabled);\r\n const isHidden = ConditionalBooleanValue.getValue(hidden);\r\n\r\n if (this._lastChildren !== this.props.children) {\r\n this._parsedChildren = TildeFinder.findAfterTilde(this.props.children).node;\r\n this._lastChildren = this.props.children;\r\n }\r\n\r\n return (\r\n <div\r\n {...props}\r\n ref={(el) => { this._root = el; }}\r\n onClick={this._handleClick}\r\n style={style}\r\n onFocus={this._handleFocus}\r\n onKeyUp={this._handleKeyUp}\r\n onMouseOver={this._handleMouseOver}\r\n data-testid={\"core-context-menu-item\"}\r\n className={classnames(\"core-context-menu-item\", className,\r\n isDisabled && \"core-context-menu-disabled\",\r\n isHidden && \"core-context-menu-hidden\",\r\n isSelected && \"core-context-menu-is-selected\")\r\n }\r\n role=\"menuitem\"\r\n tabIndex={isSelected ? 0 : -1}\r\n aria-disabled={isDisabled}\r\n aria-hidden={isHidden}\r\n >\r\n {!hideIconContainer && <div className=\"core-context-menu-icon\">\r\n {icon !== undefined && <Icon iconSpec={icon} />}\r\n </div>}\r\n <div className={\"core-context-menu-content\"}>\r\n {this._parsedChildren}\r\n </div>\r\n {iconRight &&\r\n <div className={classnames(\"core-context-menu-icon\", \"core-context-menu-icon-right\")}>\r\n <Icon iconSpec={iconRight} />\r\n </div>\r\n }\r\n {badge &&\r\n <div className=\"core-context-menu-badge\">\r\n {badge}\r\n </div>\r\n }\r\n </div>\r\n );\r\n }\r\n\r\n public override componentDidMount() {\r\n this._updateHotkey(this.props.children);\r\n }\r\n\r\n public override componentDidUpdate(prevProps: ContextMenuItemProps) {\r\n if (this.props.children !== prevProps.children) {\r\n this._updateHotkey(this.props.children);\r\n }\r\n }\r\n\r\n private _updateHotkey = (node: React.ReactNode) => {\r\n let hotKey: string | undefined;\r\n const isDisabled = ConditionalBooleanValue.getValue(this.props.disabled);\r\n const isHidden = ConditionalBooleanValue.getValue(this.props.hidden);\r\n if (!isDisabled && !isHidden)\r\n hotKey = TildeFinder.findAfterTilde(node).character;\r\n else\r\n hotKey = undefined;\r\n if (hotKey && hotKey !== this.state.hotKey) {\r\n this.setState({ hotKey });\r\n if (this.props.onHotKeyParsed)\r\n this.props.onHotKeyParsed(hotKey);\r\n }\r\n };\r\n\r\n private _handleFocus = (event: React.FocusEvent<HTMLDivElement>) => {\r\n event.stopPropagation();\r\n };\r\n\r\n private _handleMouseOver = (_event: React.MouseEvent<HTMLDivElement>) => {\r\n // istanbul ignore else\r\n if (this._root && this._root.style.visibility !== \"hidden\" && this.props.onHover) {\r\n this.props.onHover();\r\n }\r\n };\r\n\r\n public select = () => {\r\n // istanbul ignore else\r\n if (this._root) {\r\n this._root.click();\r\n if (this.props.parentMenu && this.props.parentMenu.props.parentSubmenu)\r\n this.props.parentMenu.props.parentSubmenu.close(true);\r\n }\r\n };\r\n\r\n private _handleClick = (event: React.MouseEvent<HTMLDivElement>) => {\r\n const isDisabled = ConditionalBooleanValue.getValue(this.props.disabled);\r\n if (isDisabled)\r\n return;\r\n\r\n if (this.props.onClick)\r\n this.props.onClick(event);\r\n if (this.props.onSelect)\r\n this.props.onSelect(event);\r\n };\r\n\r\n private _handleKeyUp = (event: React.KeyboardEvent<HTMLDivElement>) => {\r\n const isDisabled = ConditionalBooleanValue.getValue(this.props.disabled);\r\n if (event.key === SpecialKey.Enter && this.props.onSelect !== undefined && !isDisabled) {\r\n this.props.onSelect(event);\r\n }\r\n };\r\n}\r\n"]}
|
|
@@ -11,7 +11,7 @@ import { ContextMenuDirection } from "./ContextMenuDirection";
|
|
|
11
11
|
*/
|
|
12
12
|
export interface ContextSubMenuProps extends Omit<ContextMenuItemProps, "label">, Omit<ContextMenuProps, "label">, CommonProps {
|
|
13
13
|
/** Text/jsx to display in the list item */
|
|
14
|
-
label: string | JSX.Element;
|
|
14
|
+
label: string | React.JSX.Element;
|
|
15
15
|
/** @internal */
|
|
16
16
|
onHotKeyParsed?: (hotKey: string) => void;
|
|
17
17
|
}
|
|
@@ -35,7 +35,7 @@ export declare class ContextSubMenu extends React.Component<ContextSubMenuProps,
|
|
|
35
35
|
/** @internal */
|
|
36
36
|
readonly state: Readonly<ContextSubMenuState>;
|
|
37
37
|
constructor(props: ContextSubMenuProps);
|
|
38
|
-
render(): JSX.Element;
|
|
38
|
+
render(): React.JSX.Element;
|
|
39
39
|
componentDidMount(): void;
|
|
40
40
|
componentWillUnmount(): void;
|
|
41
41
|
componentDidUpdate(prevProps: ContextSubMenuProps, prevState: ContextSubMenuState): void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ContextSubMenu.d.ts","sourceRoot":"","sources":["../../../../src/core-react/contextmenu/ContextSubMenu.tsx"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B,OAAO,EAAE,oBAAoB,EAAE,MAAM,mBAAmB,CAAC;AACzD,OAAO,EAAe,gBAAgB,EAAE,MAAM,eAAe,CAAC;AAC9D,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAC7C,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAI9D;;GAEG;AACH,MAAM,WAAW,mBAAoB,SAAQ,IAAI,CAAC,oBAAoB,EAAE,OAAO,CAAC,EAAE,IAAI,CAAC,gBAAgB,EAAE,OAAO,CAAC,EAAE,WAAW;IAC5H,2CAA2C;IAC3C,KAAK,EAAE,MAAM,GAAG,GAAG,CAAC,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"ContextSubMenu.d.ts","sourceRoot":"","sources":["../../../../src/core-react/contextmenu/ContextSubMenu.tsx"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B,OAAO,EAAE,oBAAoB,EAAE,MAAM,mBAAmB,CAAC;AACzD,OAAO,EAAe,gBAAgB,EAAE,MAAM,eAAe,CAAC;AAC9D,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAC7C,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAI9D;;GAEG;AACH,MAAM,WAAW,mBAAoB,SAAQ,IAAI,CAAC,oBAA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105
105
|
}
|
|
106
106
|
return (
|
|
107
107
|
// eslint-disable-next-line jsx-a11y/mouse-events-have-key-events
|
|
108
|
-
React.createElement("div", { className: classnames("core-context-submenu", ContextMenu.getCSSClassNameFromDirection(renderDirection), className),
|
|
108
|
+
React.createElement("div", { className: classnames("core-context-submenu", ContextMenu.getCSSClassNameFromDirection(renderDirection), className),
|
|
109
|
+
// eslint-disable-next-line jsx-a11y/mouse-events-have-key-events
|
|
110
|
+
onMouseOver: this._handleMouseOver, ref: (el) => { this._subMenuElement = el; }, "data-testid": "core-context-submenu", ...props },
|
|
109
111
|
React.createElement("div", { onClick: this._handleClick, ref: (el) => { this._menuButtonElement = el; }, className: classnames("core-context-menu-item", "core-context-submenu-container", isDisabled && "core-context-menu-disabled", isHidden && "core-context-menu-hidden", isSelected && "core-context-menu-is-selected"), "data-testid": "core-context-submenu-container", role: "menuitem", tabIndex: isSelected ? 0 : -1, "aria-disabled": isDisabled, "aria-hidden": isHidden, "aria-haspopup": true },
|
|
110
112
|
React.createElement("div", { className: classnames("core-context-menu-icon", "icon", icon instanceof ConditionalStringValue && icon.value, typeof icon === "string" && icon) }),
|
|
111
113
|
React.createElement("div", { className: "core-context-menu-content" }, this._parsedLabel),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ContextSubMenu.js","sourceRoot":"","sources":["../../../../src/core-react/contextmenu/ContextSubMenu.tsx"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,UAAU,MAAM,YAAY,CAAC;AACpC,OAAO,EAAE,uBAAuB,EAAE,sBAAsB,EAAE,MAAM,uBAAuB,CAAC;AAExF,OAAO,EAAE,WAAW,EAAoB,MAAM,eAAe,CAAC;AAE9D,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAC9D,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE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H,IAAI,CAAC,oBAAoB,EAAE,CAAC;QAC9B,IAAI,IAAI,CAAC,KAAK,CAAC,KAAK,KAAK,SAAS,CAAC,KAAK,EAAE;YACxC,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;SACtC;IACH,CAAC;IAEO,SAAS;QACf,MAAM,EAAE,GAAG,IAAI,CAAC,eAAe,CAAC;QAChC,MAAM,cAAc,GAAG,EAAG,CAAC,aAAa,CAAC;QACzC,OAAO,cAAc,CAAC,WAAW,CAAC;IACpC,CAAC;IAEO,oBAAoB;QAC1B,MAAM,EAAE,QAAQ,EAAE,GAAG,IAAI,CAAC,KAAK,CAAC;QAChC,MAAM,YAAY,GAAG,IAAI,CAAC,SAAS,EAAE,CAAC;QACtC,IAAI,eAAe,GAAG,IAAI,CAAC,KAAK,CAAC,SAAS,CAAC;QAC3C,uBAAuB;QACvB,IAAI,YAAY,IAAI,QAAQ,IAAI,IAAI,CAAC,YAAY,EAAE;YACjD,MAAM,QAAQ,GAAG,IAAI,CAAC,YAAY,CAAC,OAAO,EAAE,CAAC;YAC7C,eAAe,GAAG,WAAW,CAAC,QAAQ,CAAC,eAAe,EAAE,QAAQ,EAAE,YAAY,CAAC,UAAU,EAAE,YAAY,CAAC,WAAW,CAAC,CAAC;YACrH,uBAAuB;YACvB,IAAI,eAAe,KAAK,IAAI,CAAC,KAAK,CAAC,SAAS;gBAC1C,IAAI,CAAC,QAAQ,CAAC,EAAE,SAAS,EAAE,eAAe,EAAE,CAAC,CAAC;SACjD;IACH,CAAC;;AA3Ha,2BAAY,GAAiC;IACzD,SAAS,EAAE,oBAAoB,CAAC,WAAW;IAC3C,QAAQ,EAAE,KAAK;IACf,MAAM,EAAE,KAAK;IACb,QAAQ,EAAE,IAAI;IACd,UAAU,EAAE,KAAK;IACjB,aAAa,EAAE,CAAC;CACjB,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module ContextMenu\r\n */\r\n\r\nimport * as React from \"react\";\r\nimport classnames from \"classnames\";\r\nimport { ConditionalBooleanValue, ConditionalStringValue } from \"@itwin/appui-abstract\";\r\nimport { ContextMenuItemProps } from \"./ContextMenuItem\";\r\nimport { ContextMenu, ContextMenuProps } from \"./ContextMenu\";\r\nimport { CommonProps } from \"../utils/Props\";\r\nimport { ContextMenuDirection } from \"./ContextMenuDirection\";\r\nimport { TildeFinder } from \"./TildeFinder\";\r\nimport { BadgeUtilities } from \"../badge/BadgeUtilities\";\r\n\r\n/** Properties for the [[ContextSubMenu]] component\r\n * @public\r\n */\r\nexport interface ContextSubMenuProps extends Omit<ContextMenuItemProps, \"label\">, Omit<ContextMenuProps, \"label\">, CommonProps {\r\n /** Text/jsx to display in the list item */\r\n label: string | JSX.Element;\r\n /** @internal */\r\n onHotKeyParsed?: (hotKey: string) => void;\r\n}\r\n\r\n/** @internal */\r\ninterface ContextSubMenuState {\r\n opened: boolean;\r\n direction: ContextMenuDirection;\r\n hotKey?: string;\r\n}\r\n\r\n/**\r\n * Submenu wrapper class for use within a [[ContextMenu]] component.\r\n * @public\r\n */\r\nexport class ContextSubMenu extends React.Component<ContextSubMenuProps, ContextSubMenuState> {\r\n private _menuElement: ContextMenu | null = null;\r\n private _subMenuElement: HTMLElement | null = null;\r\n private _menuButtonElement: HTMLElement | null = null;\r\n\r\n private _lastLabel: React.ReactNode;\r\n private _parsedLabel: React.ReactNode;\r\n\r\n public static defaultProps: Partial<ContextSubMenuProps> = {\r\n direction: ContextMenuDirection.BottomRight,\r\n disabled: false,\r\n hidden: false,\r\n autoflip: true,\r\n isSelected: false,\r\n selectedIndex: 0,\r\n };\r\n\r\n /** @internal */\r\n public override readonly state: Readonly<ContextSubMenuState>;\r\n constructor(props: ContextSubMenuProps) {\r\n super(props);\r\n this.state = {\r\n opened: false,\r\n direction: props.direction!,\r\n };\r\n }\r\n\r\n public override render(): JSX.Element {\r\n const {\r\n label,\r\n opened, direction, onOutsideClick, onEsc, autoflip, edgeLimit, selectedIndex, floating, parentMenu, parentSubmenu, // eslint-disable-line @typescript-eslint/no-unused-vars\r\n onSelect, icon, disabled, hidden, onHover, isSelected, onHotKeyParsed, // eslint-disable-line @typescript-eslint/no-unused-vars\r\n children, onClick, className, badgeType, ...props } = this.props; // eslint-disable-line @typescript-eslint/no-unused-vars\r\n\r\n const onOutsideClickWrapper = (event: MouseEvent) => {\r\n this.close();\r\n onOutsideClick && onOutsideClick(event);\r\n };\r\n const contextMenuProps = { onOutsideClick: onOutsideClickWrapper, onSelect, onEsc, autoflip, edgeLimit, selectedIndex, floating, parentMenu };\r\n const badge = BadgeUtilities.getComponentForBadgeType(badgeType);\r\n const renderDirection = this.state.direction;\r\n const isDisabled = ConditionalBooleanValue.getValue(disabled);\r\n const isHidden = ConditionalBooleanValue.getValue(hidden);\r\n\r\n if (this._lastLabel !== label) {\r\n this._parsedLabel = TildeFinder.findAfterTilde(label).node;\r\n this._lastLabel = label;\r\n }\r\n return (\r\n // eslint-disable-next-line jsx-a11y/mouse-events-have-key-events\r\n <div className={classnames(\"core-context-submenu\", ContextMenu.getCSSClassNameFromDirection(renderDirection), className)}\r\n onMouseOver={this._handleMouseOver}\r\n ref={(el) => { this._subMenuElement = el; }}\r\n data-testid=\"core-context-submenu\"\r\n {...props} >\r\n {/* eslint-disable-next-line jsx-a11y/click-events-have-key-events */}\r\n <div\r\n onClick={this._handleClick}\r\n ref={(el) => { this._menuButtonElement = el; }}\r\n className={classnames(\"core-context-menu-item\",\r\n \"core-context-submenu-container\",\r\n isDisabled && \"core-context-menu-disabled\",\r\n isHidden && \"core-context-menu-hidden\",\r\n isSelected && \"core-context-menu-is-selected\")}\r\n data-testid=\"core-context-submenu-container\"\r\n role=\"menuitem\"\r\n tabIndex={isSelected ? 0 : -1}\r\n aria-disabled={isDisabled}\r\n aria-hidden={isHidden}\r\n aria-haspopup={true}\r\n >\r\n <div className={classnames(\"core-context-menu-icon\", \"icon\", icon instanceof ConditionalStringValue && icon.value, typeof icon === \"string\" && icon)} />\r\n <div className={\"core-context-menu-content\"}>{this._parsedLabel}</div>\r\n <div className={classnames(\"core-context-submenu-arrow\", \"icon\", \"icon-caret-right\")} />\r\n {badge &&\r\n <div className=\"core-context-menu-badge\">\r\n {badge}\r\n </div>\r\n }\r\n </div>\r\n <ContextMenu\r\n ref={(el) => { this._menuElement = el; }}\r\n className=\"core-context-submenu-popup\"\r\n opened={this.state.opened}\r\n direction={renderDirection}\r\n parentSubmenu={this}\r\n {...contextMenuProps} >\r\n {children}\r\n </ContextMenu>\r\n </div>\r\n );\r\n }\r\n\r\n public override componentDidMount() {\r\n document.addEventListener(\"click\", this._handleClickGlobal);\r\n this._updateHotkey(this.props.label);\r\n\r\n this.checkRenderDirection();\r\n }\r\n\r\n public override componentWillUnmount() {\r\n document.removeEventListener(\"click\", this._handleClickGlobal);\r\n }\r\n\r\n public override componentDidUpdate(prevProps: ContextSubMenuProps, prevState: ContextSubMenuState) {\r\n const direction = this.props.direction!;\r\n if ((this.state.opened !== prevState.opened && direction !== this.state.direction) || prevProps.direction !== direction)\r\n this.checkRenderDirection();\r\n if (this.props.label !== prevProps.label) {\r\n this._updateHotkey(this.props.label);\r\n }\r\n }\r\n\r\n private getWindow() {\r\n const el = this._subMenuElement;\r\n const parentDocument = el!.ownerDocument;\r\n return parentDocument.defaultView;\r\n }\r\n\r\n private checkRenderDirection() {\r\n const { autoflip } = this.props;\r\n const parentWindow = this.getWindow();\r\n let renderDirection = this.state.direction;\r\n // istanbul ignore else\r\n if (parentWindow && autoflip && this._menuElement) {\r\n const menuRect = this._menuElement.getRect();\r\n renderDirection = ContextMenu.autoFlip(renderDirection, menuRect, parentWindow.innerWidth, parentWindow.innerHeight);\r\n // istanbul ignore next\r\n if (renderDirection !== this.state.direction)\r\n this.setState({ direction: renderDirection });\r\n }\r\n }\r\n\r\n private _updateHotkey = (node: React.ReactNode) => {\r\n let hotKey: string | undefined;\r\n const isDisabled = ConditionalBooleanValue.getValue(this.props.disabled);\r\n const isHidden = ConditionalBooleanValue.getValue(this.props.hidden);\r\n if (!isDisabled && !isHidden)\r\n hotKey = TildeFinder.findAfterTilde(node).character;\r\n else\r\n hotKey = undefined;\r\n if (hotKey && hotKey !== this.state.hotKey) {\r\n this.setState({ hotKey });\r\n if (this.props.onHotKeyParsed)\r\n this.props.onHotKeyParsed(hotKey);\r\n }\r\n };\r\n\r\n public select = () => {\r\n this.setState({ opened: true }, () => {\r\n // istanbul ignore else\r\n if (this._menuElement)\r\n this._menuElement.focus();\r\n if (this.props.onSelect !== undefined)\r\n this.props.onSelect(undefined);\r\n });\r\n };\r\n\r\n public close = (propagate?: boolean) => {\r\n this.setState({ opened: false }, () => {\r\n // istanbul ignore else\r\n if (this._menuElement)\r\n this._menuElement.blur();\r\n });\r\n // istanbul ignore next\r\n if (propagate && this.props.parentMenu && this.props.parentMenu.props.parentSubmenu) {\r\n this.props.parentMenu.props.parentSubmenu.close(true);\r\n }\r\n };\r\n\r\n private _handleMouseOver = (_event: React.MouseEvent<HTMLDivElement>) => {\r\n // istanbul ignore else\r\n if (this._menuButtonElement && this._menuButtonElement.style.visibility !== \"hidden\" && this.props.onHover) {\r\n this.props.onHover();\r\n }\r\n };\r\n\r\n private _handleClick = (event: any) => {\r\n event.stopPropagation();\r\n\r\n const isDisabled = ConditionalBooleanValue.getValue(this.props.disabled);\r\n\r\n // istanbul ignore else\r\n if (!isDisabled) {\r\n // istanbul ignore else\r\n if (this.props.onClick !== undefined)\r\n this.props.onClick(event);\r\n // istanbul ignore next\r\n if (this.props.opened)\r\n this.close();\r\n else\r\n this.select();\r\n }\r\n };\r\n\r\n private _handleClickGlobal = (event: any) => {\r\n if (this._subMenuElement && !this._subMenuElement.contains(event.target))\r\n this.setState((_prevState) => ({ opened: false }));\r\n };\r\n}\r\n"]}
|
|
1
|
+
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AE,YAAY,CAAC,WAAW,CAAC,CAAC;YACrH,uBAAuB;YACvB,IAAI,eAAe,KAAK,IAAI,CAAC,KAAK,CAAC,SAAS;gBAC1C,IAAI,CAAC,QAAQ,CAAC,EAAE,SAAS,EAAE,eAAe,EAAE,CAAC,CAAC;SACjD;IACH,CAAC;;AA5Ha,2BAAY,GAAiC;IACzD,SAAS,EAAE,oBAAoB,CAAC,WAAW;IAC3C,QAAQ,EAAE,KAAK;IACf,MAAM,EAAE,KAAK;IACb,QAAQ,EAAE,IAAI;IACd,UAAU,EAAE,KAAK;IACjB,aAAa,EAAE,CAAC;CACjB,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module ContextMenu\r\n */\r\n\r\nimport * as React from \"react\";\r\nimport classnames from \"classnames\";\r\nimport { ConditionalBooleanValue, ConditionalStringValue } from \"@itwin/appui-abstract\";\r\nimport { ContextMenuItemProps } from \"./ContextMenuItem\";\r\nimport { ContextMenu, ContextMenuProps } from \"./ContextMenu\";\r\nimport { CommonProps } from \"../utils/Props\";\r\nimport { ContextMenuDirection } from \"./ContextMenuDirection\";\r\nimport { TildeFinder } from \"./TildeFinder\";\r\nimport { BadgeUtilities } from \"../badge/BadgeUtilities\";\r\n\r\n/** Properties for the [[ContextSubMenu]] component\r\n * @public\r\n */\r\nexport interface ContextSubMenuProps extends Omit<ContextMenuItemProps, \"label\">, Omit<ContextMenuProps, \"label\">, CommonProps {\r\n /** Text/jsx to display in the list item */\r\n label: string | React.JSX.Element;\r\n /** @internal */\r\n onHotKeyParsed?: (hotKey: string) => void;\r\n}\r\n\r\n/** @internal */\r\ninterface ContextSubMenuState {\r\n opened: boolean;\r\n direction: ContextMenuDirection;\r\n hotKey?: string;\r\n}\r\n\r\n/**\r\n * Submenu wrapper class for use within a [[ContextMenu]] component.\r\n * @public\r\n */\r\nexport class ContextSubMenu extends React.Component<ContextSubMenuProps, ContextSubMenuState> {\r\n private _menuElement: ContextMenu | null = null;\r\n private _subMenuElement: HTMLElement | null = null;\r\n private _menuButtonElement: HTMLElement | null = null;\r\n\r\n private _lastLabel: React.ReactNode;\r\n private _parsedLabel: React.ReactNode;\r\n\r\n public static defaultProps: Partial<ContextSubMenuProps> = {\r\n direction: ContextMenuDirection.BottomRight,\r\n disabled: false,\r\n hidden: false,\r\n autoflip: true,\r\n isSelected: false,\r\n selectedIndex: 0,\r\n };\r\n\r\n /** @internal */\r\n public override readonly state: Readonly<ContextSubMenuState>;\r\n constructor(props: ContextSubMenuProps) {\r\n super(props);\r\n this.state = {\r\n opened: false,\r\n direction: props.direction!,\r\n };\r\n }\r\n\r\n public override render(): React.JSX.Element {\r\n const {\r\n label,\r\n opened, direction, onOutsideClick, onEsc, autoflip, edgeLimit, selectedIndex, floating, parentMenu, parentSubmenu, // eslint-disable-line @typescript-eslint/no-unused-vars\r\n onSelect, icon, disabled, hidden, onHover, isSelected, onHotKeyParsed, // eslint-disable-line @typescript-eslint/no-unused-vars\r\n children, onClick, className, badgeType, ...props } = this.props; // eslint-disable-line @typescript-eslint/no-unused-vars\r\n\r\n const onOutsideClickWrapper = (event: MouseEvent) => {\r\n this.close();\r\n onOutsideClick && onOutsideClick(event);\r\n };\r\n const contextMenuProps = { onOutsideClick: onOutsideClickWrapper, onSelect, onEsc, autoflip, edgeLimit, selectedIndex, floating, parentMenu };\r\n const badge = BadgeUtilities.getComponentForBadgeType(badgeType);\r\n const renderDirection = this.state.direction;\r\n const isDisabled = ConditionalBooleanValue.getValue(disabled);\r\n const isHidden = ConditionalBooleanValue.getValue(hidden);\r\n\r\n if (this._lastLabel !== label) {\r\n this._parsedLabel = TildeFinder.findAfterTilde(label).node;\r\n this._lastLabel = label;\r\n }\r\n return (\r\n // eslint-disable-next-line jsx-a11y/mouse-events-have-key-events\r\n <div className={classnames(\"core-context-submenu\", ContextMenu.getCSSClassNameFromDirection(renderDirection), className)}\r\n // eslint-disable-next-line jsx-a11y/mouse-events-have-key-events\r\n onMouseOver={this._handleMouseOver}\r\n ref={(el) => { this._subMenuElement = el; }}\r\n data-testid=\"core-context-submenu\"\r\n {...props} >\r\n {/* eslint-disable-next-line jsx-a11y/click-events-have-key-events */}\r\n <div\r\n onClick={this._handleClick}\r\n ref={(el) => { this._menuButtonElement = el; }}\r\n className={classnames(\"core-context-menu-item\",\r\n \"core-context-submenu-container\",\r\n isDisabled && \"core-context-menu-disabled\",\r\n isHidden && \"core-context-menu-hidden\",\r\n isSelected && \"core-context-menu-is-selected\")}\r\n data-testid=\"core-context-submenu-container\"\r\n role=\"menuitem\"\r\n tabIndex={isSelected ? 0 : -1}\r\n aria-disabled={isDisabled}\r\n aria-hidden={isHidden}\r\n aria-haspopup={true}\r\n >\r\n <div className={classnames(\"core-context-menu-icon\", \"icon\", icon instanceof ConditionalStringValue && icon.value, typeof icon === \"string\" && icon)} />\r\n <div className={\"core-context-menu-content\"}>{this._parsedLabel}</div>\r\n <div className={classnames(\"core-context-submenu-arrow\", \"icon\", \"icon-caret-right\")} />\r\n {badge &&\r\n <div className=\"core-context-menu-badge\">\r\n {badge}\r\n </div>\r\n }\r\n </div>\r\n <ContextMenu\r\n ref={(el) => { this._menuElement = el; }}\r\n className=\"core-context-submenu-popup\"\r\n opened={this.state.opened}\r\n direction={renderDirection}\r\n parentSubmenu={this}\r\n {...contextMenuProps} >\r\n {children}\r\n </ContextMenu>\r\n </div>\r\n );\r\n }\r\n\r\n public override componentDidMount() {\r\n document.addEventListener(\"click\", this._handleClickGlobal);\r\n this._updateHotkey(this.props.label);\r\n\r\n this.checkRenderDirection();\r\n }\r\n\r\n public override componentWillUnmount() {\r\n document.removeEventListener(\"click\", this._handleClickGlobal);\r\n }\r\n\r\n public override componentDidUpdate(prevProps: ContextSubMenuProps, prevState: ContextSubMenuState) {\r\n const direction = this.props.direction!;\r\n if ((this.state.opened !== prevState.opened && direction !== this.state.direction) || prevProps.direction !== direction)\r\n this.checkRenderDirection();\r\n if (this.props.label !== prevProps.label) {\r\n this._updateHotkey(this.props.label);\r\n }\r\n }\r\n\r\n private getWindow() {\r\n const el = this._subMenuElement;\r\n const parentDocument = el!.ownerDocument;\r\n return parentDocument.defaultView;\r\n }\r\n\r\n private checkRenderDirection() {\r\n const { autoflip } = this.props;\r\n const parentWindow = this.getWindow();\r\n let renderDirection = this.state.direction;\r\n // istanbul ignore else\r\n if (parentWindow && autoflip && this._menuElement) {\r\n const menuRect = this._menuElement.getRect();\r\n renderDirection = ContextMenu.autoFlip(renderDirection, menuRect, parentWindow.innerWidth, parentWindow.innerHeight);\r\n // istanbul ignore next\r\n if (renderDirection !== this.state.direction)\r\n this.setState({ direction: renderDirection });\r\n }\r\n }\r\n\r\n private _updateHotkey = (node: React.ReactNode) => {\r\n let hotKey: string | undefined;\r\n const isDisabled = ConditionalBooleanValue.getValue(this.props.disabled);\r\n const isHidden = ConditionalBooleanValue.getValue(this.props.hidden);\r\n if (!isDisabled && !isHidden)\r\n hotKey = TildeFinder.findAfterTilde(node).character;\r\n else\r\n hotKey = undefined;\r\n if (hotKey && hotKey !== this.state.hotKey) {\r\n this.setState({ hotKey });\r\n if (this.props.onHotKeyParsed)\r\n this.props.onHotKeyParsed(hotKey);\r\n }\r\n };\r\n\r\n public select = () => {\r\n this.setState({ opened: true }, () => {\r\n // istanbul ignore else\r\n if (this._menuElement)\r\n this._menuElement.focus();\r\n if (this.props.onSelect !== undefined)\r\n this.props.onSelect(undefined);\r\n });\r\n };\r\n\r\n public close = (propagate?: boolean) => {\r\n this.setState({ opened: false }, () => {\r\n // istanbul ignore else\r\n if (this._menuElement)\r\n this._menuElement.blur();\r\n });\r\n // istanbul ignore next\r\n if (propagate && this.props.parentMenu && this.props.parentMenu.props.parentSubmenu) {\r\n this.props.parentMenu.props.parentSubmenu.close(true);\r\n }\r\n };\r\n\r\n private _handleMouseOver = (_event: React.MouseEvent<HTMLDivElement>) => {\r\n // istanbul ignore else\r\n if (this._menuButtonElement && this._menuButtonElement.style.visibility !== \"hidden\" && this.props.onHover) {\r\n this.props.onHover();\r\n }\r\n };\r\n\r\n private _handleClick = (event: any) => {\r\n event.stopPropagation();\r\n\r\n const isDisabled = ConditionalBooleanValue.getValue(this.props.disabled);\r\n\r\n // istanbul ignore else\r\n if (!isDisabled) {\r\n // istanbul ignore else\r\n if (this.props.onClick !== undefined)\r\n this.props.onClick(event);\r\n // istanbul ignore next\r\n if (this.props.opened)\r\n this.close();\r\n else\r\n this.select();\r\n }\r\n };\r\n\r\n private _handleClickGlobal = (event: any) => {\r\n if (this._subMenuElement && !this._subMenuElement.contains(event.target))\r\n this.setState((_prevState) => ({ opened: false }));\r\n };\r\n}\r\n"]}
|
|
@@ -50,5 +50,5 @@ export interface PopupContextMenuProps extends CommonProps {
|
|
|
50
50
|
/** Component that displays a ContextMenu within a Popup component, allowing the target element to be specified.
|
|
51
51
|
* @public
|
|
52
52
|
*/
|
|
53
|
-
export declare function PopupContextMenu(props: PopupContextMenuProps): JSX.Element;
|
|
53
|
+
export declare function PopupContextMenu(props: PopupContextMenuProps): React.JSX.Element;
|
|
54
54
|
//# sourceMappingURL=PopupContextMenu.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PopupContextMenu.d.ts","sourceRoot":"","sources":["../../../../src/core-react/contextmenu/PopupContextMenu.tsx"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AACzD,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAG7C;;GAEG;AACH,MAAM,WAAW,qBAAsB,SAAQ,WAAW;IACxD,sEAAsE;IACtE,MAAM,EAAE,OAAO,CAAC;IAChB,6FAA6F;IAC7F,QAAQ,CAAC,EAAE,gBAAgB,CAAC;IAC5B,uCAAuC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D,aAAa,CAAC,EAAE,MAAM,CAAC;IAEvB,wBAAwB;IACxB,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAC5B;AAED;;GAEG;AACH,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,qBAAqB,qBAiB5D"}
|
|
@@ -39,9 +39,9 @@ export interface DialogProps extends Omit<React.AllHTMLAttributes<HTMLDivElement
|
|
|
39
39
|
/** Override for the header */
|
|
40
40
|
header?: React.ReactNode;
|
|
41
41
|
/** Title to show in title bar of dialog */
|
|
42
|
-
title?: string | JSX.Element;
|
|
42
|
+
title?: string | React.JSX.Element;
|
|
43
43
|
/** Footer to show at bottom of dialog. Note: will override buttonCluster */
|
|
44
|
-
footer?: string | JSX.Element;
|
|
44
|
+
footer?: string | React.JSX.Element;
|
|
45
45
|
/** List of DialogButtonDef objects specifying buttons and associated onClick events */
|
|
46
46
|
buttonCluster?: DialogButtonDef[];
|
|
47
47
|
/** Default alignment of dialog. Default: DialogAlignment.Center */
|
|
@@ -117,7 +117,7 @@ export declare class Dialog extends React.Component<DialogProps, DialogState> {
|
|
|
117
117
|
private _handleAppWindowResize;
|
|
118
118
|
componentDidMount(): void;
|
|
119
119
|
handleRefSet: (containerDiv: HTMLDivElement | null) => void;
|
|
120
|
-
render(): JSX.Element;
|
|
120
|
+
render(): React.JSX.Element;
|
|
121
121
|
private getCSSClassNameFromAlignment;
|
|
122
122
|
private getFooterButtons;
|
|
123
123
|
private _handleKeyUp;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Dialog.d.ts","sourceRoot":"","sources":["../../../../src/core-react/dialog/Dialog.tsx"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,eAAe,CAAC;AAEvB,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,eAAe,EAAgC,MAAM,uBAAuB,CAAC;AAGtF,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAC7C,OAAO,EAAE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