@itwin/core-react 4.11.0 → 4.13.0
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 +21 -1
- package/ContributeGuidelines.md +2 -2
- package/lib/cjs/core-react/UiCore.d.ts +2 -6
- package/lib/cjs/core-react/UiCore.d.ts.map +1 -1
- package/lib/cjs/core-react/UiCore.js +2 -18
- package/lib/cjs/core-react/UiCore.js.map +1 -1
- package/lib/cjs/core-react/UiCore.json +31 -0
- 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 +2 -2
- package/lib/cjs/core-react/autosuggest/AutoSuggest.js.map +1 -1
- package/lib/cjs/core-react/badge/Badge.d.ts +6 -9
- package/lib/cjs/core-react/badge/Badge.d.ts.map +1 -1
- package/lib/cjs/core-react/badge/Badge.js +10 -9
- package/lib/cjs/core-react/badge/Badge.js.map +1 -1
- package/lib/{esm/core-react/badge/BadgeUtilities.d.ts → cjs/core-react/badge/BadgeType.d.ts} +1 -9
- package/lib/cjs/core-react/badge/BadgeType.d.ts.map +1 -0
- package/lib/cjs/core-react/{useTranslation.js → badge/BadgeType.js} +9 -13
- package/lib/cjs/core-react/badge/BadgeType.js.map +1 -0
- package/lib/cjs/core-react/badge/NewBadge.d.ts +2 -3
- package/lib/cjs/core-react/badge/NewBadge.d.ts.map +1 -1
- package/lib/cjs/core-react/badge/NewBadge.js +6 -7
- package/lib/cjs/core-react/badge/NewBadge.js.map +1 -1
- package/lib/cjs/core-react/badge/NewBadge.scss +2 -3
- package/lib/cjs/core-react/badge/TechnicalPreviewBadge.d.ts +10 -0
- package/lib/cjs/core-react/badge/TechnicalPreviewBadge.d.ts.map +1 -0
- package/lib/cjs/core-react/badge/TechnicalPreviewBadge.js +29 -0
- package/lib/cjs/core-react/badge/TechnicalPreviewBadge.js.map +1 -0
- package/lib/cjs/core-react/badge/{Badge.scss → TechnicalPreviewBadge.scss} +1 -7
- package/lib/cjs/core-react/base/Centered.d.ts +1 -0
- package/lib/cjs/core-react/base/Centered.d.ts.map +1 -1
- package/lib/cjs/core-react/base/Centered.js +2 -0
- package/lib/cjs/core-react/base/Centered.js.map +1 -1
- package/lib/cjs/core-react/base/Div.d.ts +2 -0
- package/lib/cjs/core-react/base/Div.d.ts.map +1 -1
- package/lib/cjs/core-react/base/Div.js +2 -0
- package/lib/cjs/core-react/base/Div.js.map +1 -1
- package/lib/cjs/core-react/base/DivWithOutsideClick.d.ts +1 -0
- package/lib/cjs/core-react/base/DivWithOutsideClick.d.ts.map +1 -1
- package/lib/cjs/core-react/base/DivWithOutsideClick.js +1 -0
- package/lib/cjs/core-react/base/DivWithOutsideClick.js.map +1 -1
- package/lib/cjs/core-react/base/FillCentered.d.ts +1 -0
- package/lib/cjs/core-react/base/FillCentered.d.ts.map +1 -1
- package/lib/cjs/core-react/base/FillCentered.js +2 -0
- package/lib/cjs/core-react/base/FillCentered.js.map +1 -1
- package/lib/cjs/core-react/base/FlexWrapContainer.d.ts +1 -0
- package/lib/cjs/core-react/base/FlexWrapContainer.d.ts.map +1 -1
- package/lib/cjs/core-react/base/FlexWrapContainer.js +2 -0
- package/lib/cjs/core-react/base/FlexWrapContainer.js.map +1 -1
- package/lib/cjs/core-react/base/Gap.d.ts +2 -0
- package/lib/cjs/core-react/base/Gap.d.ts.map +1 -1
- package/lib/cjs/core-react/base/Gap.js +3 -1
- package/lib/cjs/core-react/base/Gap.js.map +1 -1
- package/lib/cjs/core-react/base/ScrollView.d.ts +1 -0
- package/lib/cjs/core-react/base/ScrollView.d.ts.map +1 -1
- package/lib/cjs/core-react/base/ScrollView.js +2 -0
- package/lib/cjs/core-react/base/ScrollView.js.map +1 -1
- package/lib/cjs/core-react/button/UnderlinedButton.d.ts +2 -0
- package/lib/cjs/core-react/button/UnderlinedButton.d.ts.map +1 -1
- package/lib/cjs/core-react/button/UnderlinedButton.js +2 -0
- package/lib/cjs/core-react/button/UnderlinedButton.js.map +1 -1
- package/lib/cjs/core-react/checklistbox/CheckListBox.d.ts +4 -0
- package/lib/cjs/core-react/checklistbox/CheckListBox.d.ts.map +1 -1
- package/lib/cjs/core-react/checklistbox/CheckListBox.js +4 -0
- package/lib/cjs/core-react/checklistbox/CheckListBox.js.map +1 -1
- package/lib/cjs/core-react/contextmenu/ContextMenu.d.ts.map +1 -1
- package/lib/cjs/core-react/contextmenu/ContextMenu.js +1 -2
- package/lib/cjs/core-react/contextmenu/ContextMenu.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 +3 -3
- package/lib/cjs/core-react/contextmenu/ContextMenuItem.js.map +1 -1
- package/lib/cjs/core-react/contextmenu/ContextSubMenu.d.ts.map +1 -1
- package/lib/cjs/core-react/contextmenu/ContextSubMenu.js +3 -3
- package/lib/cjs/core-react/contextmenu/ContextSubMenu.js.map +1 -1
- package/lib/cjs/core-react/contextmenu/GlobalContextMenu.js +3 -5
- package/lib/cjs/core-react/contextmenu/GlobalContextMenu.js.map +1 -1
- package/lib/cjs/core-react/dialog/Dialog.d.ts +4 -0
- package/lib/cjs/core-react/dialog/Dialog.d.ts.map +1 -1
- package/lib/cjs/core-react/dialog/Dialog.js +69 -53
- package/lib/cjs/core-react/dialog/Dialog.js.map +1 -1
- package/lib/cjs/core-react/dialog/GlobalDialog.d.ts +3 -0
- package/lib/cjs/core-react/dialog/GlobalDialog.d.ts.map +1 -1
- package/lib/cjs/core-react/dialog/GlobalDialog.js +7 -3
- package/lib/cjs/core-react/dialog/GlobalDialog.js.map +1 -1
- package/lib/cjs/core-react/elementseparator/ElementSeparator.d.ts +4 -2
- package/lib/cjs/core-react/elementseparator/ElementSeparator.d.ts.map +1 -1
- package/lib/cjs/core-react/elementseparator/ElementSeparator.js +5 -3
- package/lib/cjs/core-react/elementseparator/ElementSeparator.js.map +1 -1
- package/lib/cjs/core-react/expandable/ExpandableList.d.ts +3 -3
- package/lib/cjs/core-react/expandable/ExpandableList.d.ts.map +1 -1
- package/lib/cjs/core-react/expandable/ExpandableList.js +5 -2
- package/lib/cjs/core-react/expandable/ExpandableList.js.map +1 -1
- package/lib/cjs/core-react/hocs/withOnOutsideClick.js +1 -2
- package/lib/cjs/core-react/hocs/withOnOutsideClick.js.map +1 -1
- package/lib/cjs/core-react/icons/IconComponent.d.ts.map +1 -1
- package/lib/cjs/core-react/icons/IconComponent.js +22 -12
- package/lib/cjs/core-react/icons/IconComponent.js.map +1 -1
- package/lib/cjs/core-react/imagecheckbox/ImageCheckBox.d.ts +3 -2
- package/lib/cjs/core-react/imagecheckbox/ImageCheckBox.d.ts.map +1 -1
- package/lib/cjs/core-react/imagecheckbox/ImageCheckBox.js +3 -2
- package/lib/cjs/core-react/imagecheckbox/ImageCheckBox.js.map +1 -1
- package/lib/cjs/core-react/inputs/InputLabel.d.ts +2 -0
- package/lib/cjs/core-react/inputs/InputLabel.d.ts.map +1 -1
- package/lib/cjs/core-react/inputs/InputLabel.js +5 -0
- package/lib/cjs/core-react/inputs/InputLabel.js.map +1 -1
- package/lib/cjs/core-react/inputs/InputStatus.d.ts +1 -0
- package/lib/cjs/core-react/inputs/InputStatus.d.ts.map +1 -1
- package/lib/cjs/core-react/inputs/InputStatus.js +1 -0
- package/lib/cjs/core-react/inputs/InputStatus.js.map +1 -1
- package/lib/cjs/core-react/inputs/LabeledComponentProps.d.ts +2 -0
- package/lib/cjs/core-react/inputs/LabeledComponentProps.d.ts.map +1 -1
- package/lib/cjs/core-react/inputs/LabeledComponentProps.js.map +1 -1
- package/lib/cjs/core-react/inputs/iconinput/IconInput.d.ts +2 -0
- package/lib/cjs/core-react/inputs/iconinput/IconInput.d.ts.map +1 -1
- package/lib/cjs/core-react/inputs/iconinput/IconInput.js +3 -0
- package/lib/cjs/core-react/inputs/iconinput/IconInput.js.map +1 -1
- package/lib/cjs/core-react/inputs/numberinput/NumberInput.d.ts +3 -0
- package/lib/cjs/core-react/inputs/numberinput/NumberInput.d.ts.map +1 -1
- package/lib/cjs/core-react/inputs/numberinput/NumberInput.js +1 -0
- package/lib/cjs/core-react/inputs/numberinput/NumberInput.js.map +1 -1
- package/lib/cjs/core-react/l10n/LocalizationProvider.d.ts +20 -0
- package/lib/cjs/core-react/l10n/LocalizationProvider.d.ts.map +1 -0
- package/lib/cjs/core-react/l10n/LocalizationProvider.js +29 -0
- package/lib/cjs/core-react/l10n/LocalizationProvider.js.map +1 -0
- package/lib/cjs/core-react/l10n/usePackageTranslation.d.ts +15 -0
- package/lib/cjs/core-react/l10n/usePackageTranslation.d.ts.map +1 -0
- package/lib/cjs/core-react/l10n/usePackageTranslation.js +64 -0
- package/lib/cjs/core-react/l10n/usePackageTranslation.js.map +1 -0
- package/lib/cjs/core-react/l10n/useTranslation.d.ts +7 -0
- package/lib/cjs/core-react/l10n/useTranslation.d.ts.map +1 -0
- package/lib/cjs/core-react/l10n/useTranslation.js +30 -0
- package/lib/cjs/core-react/l10n/useTranslation.js.map +1 -0
- package/lib/cjs/core-react/listbox/Listbox.d.ts +14 -14
- package/lib/cjs/core-react/listbox/Listbox.d.ts.map +1 -1
- package/lib/cjs/core-react/listbox/Listbox.js +8 -10
- package/lib/cjs/core-react/listbox/Listbox.js.map +1 -1
- package/lib/cjs/core-react/loading/LoadingBar.d.ts +3 -2
- package/lib/cjs/core-react/loading/LoadingBar.d.ts.map +1 -1
- package/lib/cjs/core-react/loading/LoadingBar.js +2 -2
- package/lib/cjs/core-react/loading/LoadingBar.js.map +1 -1
- package/lib/cjs/core-react/loading/LoadingPrompt.d.ts +3 -2
- package/lib/cjs/core-react/loading/LoadingPrompt.d.ts.map +1 -1
- package/lib/cjs/core-react/loading/LoadingPrompt.js +2 -2
- package/lib/cjs/core-react/loading/LoadingPrompt.js.map +1 -1
- package/lib/cjs/core-react/loading/LoadingSpinner.d.ts +4 -2
- package/lib/cjs/core-react/loading/LoadingSpinner.d.ts.map +1 -1
- package/lib/cjs/core-react/loading/LoadingSpinner.js +2 -2
- package/lib/cjs/core-react/loading/LoadingSpinner.js.map +1 -1
- package/lib/cjs/core-react/loading/LoadingStatus.d.ts +3 -2
- package/lib/cjs/core-react/loading/LoadingStatus.d.ts.map +1 -1
- package/lib/cjs/core-react/loading/LoadingStatus.js +2 -2
- package/lib/cjs/core-react/loading/LoadingStatus.js.map +1 -1
- package/lib/cjs/core-react/messagebox/MessageBox.d.ts.map +1 -1
- package/lib/cjs/core-react/messagebox/MessageBox.js +3 -1
- package/lib/cjs/core-react/messagebox/MessageBox.js.map +1 -1
- package/lib/cjs/core-react/notification/MessageRenderer.js +1 -1
- package/lib/cjs/core-react/notification/MessageRenderer.js.map +1 -1
- package/lib/cjs/core-react/popup/Popup.js +4 -8
- package/lib/cjs/core-react/popup/Popup.js.map +1 -1
- package/lib/cjs/core-react/radialmenu/Annulus.d.ts +7 -8
- package/lib/cjs/core-react/radialmenu/Annulus.d.ts.map +1 -1
- package/lib/cjs/core-react/radialmenu/Annulus.js +7 -8
- package/lib/cjs/core-react/radialmenu/Annulus.js.map +1 -1
- package/lib/cjs/core-react/radialmenu/RadialMenu.d.ts +0 -1
- 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/searchbox/SearchBox.d.ts +3 -3
- package/lib/cjs/core-react/searchbox/SearchBox.d.ts.map +1 -1
- package/lib/cjs/core-react/searchbox/SearchBox.js +15 -9
- package/lib/cjs/core-react/searchbox/SearchBox.js.map +1 -1
- package/lib/cjs/core-react/settings/SettingsContainer.d.ts.map +1 -1
- package/lib/cjs/core-react/settings/SettingsContainer.js +8 -4
- package/lib/cjs/core-react/settings/SettingsContainer.js.map +1 -1
- package/lib/cjs/core-react/settings/SettingsManager.d.ts +10 -7
- package/lib/cjs/core-react/settings/SettingsManager.d.ts.map +1 -1
- package/lib/cjs/core-react/settings/SettingsManager.js +14 -12
- package/lib/cjs/core-react/settings/SettingsManager.js.map +1 -1
- package/lib/cjs/core-react/tabs/Tabs.d.ts +5 -5
- package/lib/cjs/core-react/tabs/Tabs.d.ts.map +1 -1
- package/lib/cjs/core-react/tabs/Tabs.js +1 -0
- package/lib/cjs/core-react/tabs/Tabs.js.map +1 -1
- package/lib/cjs/core-react/tabs/VerticalTabs.d.ts +1 -0
- package/lib/cjs/core-react/tabs/VerticalTabs.d.ts.map +1 -1
- package/lib/cjs/core-react/tabs/VerticalTabs.js +2 -0
- package/lib/cjs/core-react/tabs/VerticalTabs.js.map +1 -1
- package/lib/cjs/core-react/text/BlockText.d.ts +1 -0
- package/lib/cjs/core-react/text/BlockText.d.ts.map +1 -1
- package/lib/cjs/core-react/text/BlockText.js +2 -0
- package/lib/cjs/core-react/text/BlockText.js.map +1 -1
- package/lib/cjs/core-react/text/BodyText.d.ts +1 -1
- package/lib/cjs/core-react/text/BodyText.d.ts.map +1 -1
- package/lib/cjs/core-react/text/BodyText.js +2 -1
- package/lib/cjs/core-react/text/BodyText.js.map +1 -1
- package/lib/cjs/core-react/text/DisabledText.d.ts +1 -0
- package/lib/cjs/core-react/text/DisabledText.d.ts.map +1 -1
- package/lib/cjs/core-react/text/DisabledText.js +2 -1
- package/lib/cjs/core-react/text/DisabledText.js.map +1 -1
- package/lib/cjs/core-react/text/MutedText.d.ts.map +1 -1
- package/lib/cjs/core-react/text/MutedText.js +1 -0
- package/lib/cjs/core-react/text/MutedText.js.map +1 -1
- package/lib/cjs/core-react/text/StyledText.d.ts +1 -0
- package/lib/cjs/core-react/text/StyledText.d.ts.map +1 -1
- package/lib/cjs/core-react/text/StyledText.js.map +1 -1
- package/lib/cjs/core-react/text/TextProps.d.ts +1 -0
- package/lib/cjs/core-react/text/TextProps.d.ts.map +1 -1
- package/lib/cjs/core-react/text/TextProps.js.map +1 -1
- package/lib/cjs/core-react/tree/ExpansionToggle.d.ts +1 -3
- package/lib/cjs/core-react/tree/ExpansionToggle.d.ts.map +1 -1
- package/lib/cjs/core-react/tree/ExpansionToggle.js +9 -10
- package/lib/cjs/core-react/tree/ExpansionToggle.js.map +1 -1
- package/lib/cjs/core-react/tree/Node.js +1 -2
- package/lib/cjs/core-react/tree/Node.js.map +1 -1
- package/lib/cjs/core-react/utils/IconWebComponent.d.ts +4 -2
- package/lib/cjs/core-react/utils/IconWebComponent.d.ts.map +1 -1
- package/lib/cjs/core-react/utils/IconWebComponent.js +10 -6
- package/lib/cjs/core-react/utils/IconWebComponent.js.map +1 -1
- package/lib/cjs/core-react/utils/getCssVariable.js +1 -1
- package/lib/cjs/core-react/utils/getCssVariable.js.map +1 -1
- package/lib/cjs/core-react/utils/getObjectClassName.js +2 -3
- package/lib/cjs/core-react/utils/getObjectClassName.js.map +1 -1
- package/lib/cjs/core-react/utils/hooks/ResizeObserverPolyfill.d.ts +4 -1
- package/lib/cjs/core-react/utils/hooks/ResizeObserverPolyfill.d.ts.map +1 -1
- package/lib/cjs/core-react/utils/hooks/ResizeObserverPolyfill.js +5 -2
- package/lib/cjs/core-react/utils/hooks/ResizeObserverPolyfill.js.map +1 -1
- package/lib/cjs/core-react/utils/hooks/useCrossOriginPopup.d.ts +1 -1
- package/lib/cjs/core-react/utils/hooks/useCrossOriginPopup.js +2 -3
- package/lib/cjs/core-react/utils/hooks/useCrossOriginPopup.js.map +1 -1
- package/lib/cjs/core-react/utils/hooks/useResizeObserver.d.ts.map +1 -1
- package/lib/cjs/core-react/utils/hooks/useResizeObserver.js +12 -16
- package/lib/cjs/core-react/utils/hooks/useResizeObserver.js.map +1 -1
- package/lib/cjs/core-react.d.ts +3 -3
- package/lib/cjs/core-react.d.ts.map +1 -1
- package/lib/cjs/core-react.js +12 -9
- package/lib/cjs/core-react.js.map +1 -1
- package/lib/esm/core-react/UiCore.d.ts +2 -6
- package/lib/esm/core-react/UiCore.d.ts.map +1 -1
- package/lib/esm/core-react/UiCore.js +2 -18
- package/lib/esm/core-react/UiCore.js.map +1 -1
- package/lib/esm/core-react/UiCore.json +31 -0
- 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 +1 -1
- package/lib/esm/core-react/autosuggest/AutoSuggest.js.map +1 -1
- package/lib/esm/core-react/badge/Badge.d.ts +6 -9
- package/lib/esm/core-react/badge/Badge.d.ts.map +1 -1
- package/lib/esm/core-react/badge/Badge.js +10 -9
- package/lib/esm/core-react/badge/Badge.js.map +1 -1
- package/lib/{cjs/core-react/badge/BadgeUtilities.d.ts → esm/core-react/badge/BadgeType.d.ts} +1 -9
- package/lib/esm/core-react/badge/BadgeType.d.ts.map +1 -0
- package/lib/esm/core-react/badge/BadgeType.js +13 -0
- package/lib/esm/core-react/badge/BadgeType.js.map +1 -0
- package/lib/esm/core-react/badge/NewBadge.d.ts +2 -3
- package/lib/esm/core-react/badge/NewBadge.d.ts.map +1 -1
- package/lib/esm/core-react/badge/NewBadge.js +6 -7
- package/lib/esm/core-react/badge/NewBadge.js.map +1 -1
- package/lib/esm/core-react/badge/NewBadge.scss +2 -3
- package/lib/esm/core-react/badge/TechnicalPreviewBadge.d.ts +10 -0
- package/lib/esm/core-react/badge/TechnicalPreviewBadge.d.ts.map +1 -0
- package/lib/esm/core-react/badge/TechnicalPreviewBadge.js +25 -0
- package/lib/esm/core-react/badge/TechnicalPreviewBadge.js.map +1 -0
- package/lib/esm/core-react/badge/{Badge.scss → TechnicalPreviewBadge.scss} +1 -7
- package/lib/esm/core-react/base/Centered.d.ts +1 -0
- package/lib/esm/core-react/base/Centered.d.ts.map +1 -1
- package/lib/esm/core-react/base/Centered.js +2 -0
- package/lib/esm/core-react/base/Centered.js.map +1 -1
- package/lib/esm/core-react/base/Div.d.ts +2 -0
- package/lib/esm/core-react/base/Div.d.ts.map +1 -1
- package/lib/esm/core-react/base/Div.js +2 -0
- package/lib/esm/core-react/base/Div.js.map +1 -1
- package/lib/esm/core-react/base/DivWithOutsideClick.d.ts +1 -0
- package/lib/esm/core-react/base/DivWithOutsideClick.d.ts.map +1 -1
- package/lib/esm/core-react/base/DivWithOutsideClick.js +1 -0
- package/lib/esm/core-react/base/DivWithOutsideClick.js.map +1 -1
- package/lib/esm/core-react/base/FillCentered.d.ts +1 -0
- package/lib/esm/core-react/base/FillCentered.d.ts.map +1 -1
- package/lib/esm/core-react/base/FillCentered.js +2 -0
- package/lib/esm/core-react/base/FillCentered.js.map +1 -1
- package/lib/esm/core-react/base/FlexWrapContainer.d.ts +1 -0
- package/lib/esm/core-react/base/FlexWrapContainer.d.ts.map +1 -1
- package/lib/esm/core-react/base/FlexWrapContainer.js +2 -0
- package/lib/esm/core-react/base/FlexWrapContainer.js.map +1 -1
- package/lib/esm/core-react/base/Gap.d.ts +2 -0
- package/lib/esm/core-react/base/Gap.d.ts.map +1 -1
- package/lib/esm/core-react/base/Gap.js +3 -1
- package/lib/esm/core-react/base/Gap.js.map +1 -1
- package/lib/esm/core-react/base/ScrollView.d.ts +1 -0
- package/lib/esm/core-react/base/ScrollView.d.ts.map +1 -1
- package/lib/esm/core-react/base/ScrollView.js +2 -0
- package/lib/esm/core-react/base/ScrollView.js.map +1 -1
- package/lib/esm/core-react/button/UnderlinedButton.d.ts +2 -0
- package/lib/esm/core-react/button/UnderlinedButton.d.ts.map +1 -1
- package/lib/esm/core-react/button/UnderlinedButton.js +2 -0
- package/lib/esm/core-react/button/UnderlinedButton.js.map +1 -1
- package/lib/esm/core-react/checklistbox/CheckListBox.d.ts +4 -0
- package/lib/esm/core-react/checklistbox/CheckListBox.d.ts.map +1 -1
- package/lib/esm/core-react/checklistbox/CheckListBox.js +4 -0
- package/lib/esm/core-react/checklistbox/CheckListBox.js.map +1 -1
- package/lib/esm/core-react/contextmenu/ContextMenu.d.ts.map +1 -1
- package/lib/esm/core-react/contextmenu/ContextMenu.js +1 -2
- package/lib/esm/core-react/contextmenu/ContextMenu.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 +3 -3
- package/lib/esm/core-react/contextmenu/ContextMenuItem.js.map +1 -1
- package/lib/esm/core-react/contextmenu/ContextSubMenu.d.ts.map +1 -1
- package/lib/esm/core-react/contextmenu/ContextSubMenu.js +3 -3
- package/lib/esm/core-react/contextmenu/ContextSubMenu.js.map +1 -1
- package/lib/esm/core-react/contextmenu/GlobalContextMenu.js +3 -5
- package/lib/esm/core-react/contextmenu/GlobalContextMenu.js.map +1 -1
- package/lib/esm/core-react/dialog/Dialog.d.ts +4 -0
- package/lib/esm/core-react/dialog/Dialog.d.ts.map +1 -1
- package/lib/esm/core-react/dialog/Dialog.js +69 -53
- package/lib/esm/core-react/dialog/Dialog.js.map +1 -1
- package/lib/esm/core-react/dialog/GlobalDialog.d.ts +3 -0
- package/lib/esm/core-react/dialog/GlobalDialog.d.ts.map +1 -1
- package/lib/esm/core-react/dialog/GlobalDialog.js +7 -3
- package/lib/esm/core-react/dialog/GlobalDialog.js.map +1 -1
- package/lib/esm/core-react/elementseparator/ElementSeparator.d.ts +4 -2
- package/lib/esm/core-react/elementseparator/ElementSeparator.d.ts.map +1 -1
- package/lib/esm/core-react/elementseparator/ElementSeparator.js +5 -3
- package/lib/esm/core-react/elementseparator/ElementSeparator.js.map +1 -1
- package/lib/esm/core-react/expandable/ExpandableList.d.ts +3 -3
- package/lib/esm/core-react/expandable/ExpandableList.d.ts.map +1 -1
- package/lib/esm/core-react/expandable/ExpandableList.js +5 -2
- package/lib/esm/core-react/expandable/ExpandableList.js.map +1 -1
- package/lib/esm/core-react/hocs/withOnOutsideClick.js +1 -2
- package/lib/esm/core-react/hocs/withOnOutsideClick.js.map +1 -1
- package/lib/esm/core-react/icons/IconComponent.d.ts.map +1 -1
- package/lib/esm/core-react/icons/IconComponent.js +21 -11
- package/lib/esm/core-react/icons/IconComponent.js.map +1 -1
- package/lib/esm/core-react/imagecheckbox/ImageCheckBox.d.ts +3 -2
- package/lib/esm/core-react/imagecheckbox/ImageCheckBox.d.ts.map +1 -1
- package/lib/esm/core-react/imagecheckbox/ImageCheckBox.js +3 -2
- package/lib/esm/core-react/imagecheckbox/ImageCheckBox.js.map +1 -1
- package/lib/esm/core-react/inputs/InputLabel.d.ts +2 -0
- package/lib/esm/core-react/inputs/InputLabel.d.ts.map +1 -1
- package/lib/esm/core-react/inputs/InputLabel.js +5 -0
- package/lib/esm/core-react/inputs/InputLabel.js.map +1 -1
- package/lib/esm/core-react/inputs/InputStatus.d.ts +1 -0
- package/lib/esm/core-react/inputs/InputStatus.d.ts.map +1 -1
- package/lib/esm/core-react/inputs/InputStatus.js +1 -0
- package/lib/esm/core-react/inputs/InputStatus.js.map +1 -1
- package/lib/esm/core-react/inputs/LabeledComponentProps.d.ts +2 -0
- package/lib/esm/core-react/inputs/LabeledComponentProps.d.ts.map +1 -1
- package/lib/esm/core-react/inputs/LabeledComponentProps.js.map +1 -1
- package/lib/esm/core-react/inputs/iconinput/IconInput.d.ts +2 -0
- package/lib/esm/core-react/inputs/iconinput/IconInput.d.ts.map +1 -1
- package/lib/esm/core-react/inputs/iconinput/IconInput.js +3 -0
- package/lib/esm/core-react/inputs/iconinput/IconInput.js.map +1 -1
- package/lib/esm/core-react/inputs/numberinput/NumberInput.d.ts +3 -0
- package/lib/esm/core-react/inputs/numberinput/NumberInput.d.ts.map +1 -1
- package/lib/esm/core-react/inputs/numberinput/NumberInput.js +1 -0
- package/lib/esm/core-react/inputs/numberinput/NumberInput.js.map +1 -1
- package/lib/esm/core-react/l10n/LocalizationProvider.d.ts +20 -0
- package/lib/esm/core-react/l10n/LocalizationProvider.d.ts.map +1 -0
- package/lib/esm/core-react/l10n/LocalizationProvider.js +24 -0
- package/lib/esm/core-react/l10n/LocalizationProvider.js.map +1 -0
- package/lib/esm/core-react/l10n/usePackageTranslation.d.ts +15 -0
- package/lib/esm/core-react/l10n/usePackageTranslation.d.ts.map +1 -0
- package/lib/esm/core-react/l10n/usePackageTranslation.js +60 -0
- package/lib/esm/core-react/l10n/usePackageTranslation.js.map +1 -0
- package/lib/esm/core-react/l10n/useTranslation.d.ts +7 -0
- package/lib/esm/core-react/l10n/useTranslation.d.ts.map +1 -0
- package/lib/esm/core-react/l10n/useTranslation.js +26 -0
- package/lib/esm/core-react/l10n/useTranslation.js.map +1 -0
- package/lib/esm/core-react/listbox/Listbox.d.ts +14 -14
- package/lib/esm/core-react/listbox/Listbox.d.ts.map +1 -1
- package/lib/esm/core-react/listbox/Listbox.js +8 -10
- package/lib/esm/core-react/listbox/Listbox.js.map +1 -1
- package/lib/esm/core-react/loading/LoadingBar.d.ts +3 -2
- package/lib/esm/core-react/loading/LoadingBar.d.ts.map +1 -1
- package/lib/esm/core-react/loading/LoadingBar.js +2 -2
- package/lib/esm/core-react/loading/LoadingBar.js.map +1 -1
- package/lib/esm/core-react/loading/LoadingPrompt.d.ts +3 -2
- package/lib/esm/core-react/loading/LoadingPrompt.d.ts.map +1 -1
- package/lib/esm/core-react/loading/LoadingPrompt.js +2 -2
- package/lib/esm/core-react/loading/LoadingPrompt.js.map +1 -1
- package/lib/esm/core-react/loading/LoadingSpinner.d.ts +4 -2
- package/lib/esm/core-react/loading/LoadingSpinner.d.ts.map +1 -1
- package/lib/esm/core-react/loading/LoadingSpinner.js +2 -2
- package/lib/esm/core-react/loading/LoadingSpinner.js.map +1 -1
- package/lib/esm/core-react/loading/LoadingStatus.d.ts +3 -2
- package/lib/esm/core-react/loading/LoadingStatus.d.ts.map +1 -1
- package/lib/esm/core-react/loading/LoadingStatus.js +2 -2
- package/lib/esm/core-react/loading/LoadingStatus.js.map +1 -1
- package/lib/esm/core-react/messagebox/MessageBox.d.ts.map +1 -1
- package/lib/esm/core-react/messagebox/MessageBox.js +3 -1
- package/lib/esm/core-react/messagebox/MessageBox.js.map +1 -1
- package/lib/esm/core-react/notification/MessageRenderer.js +1 -1
- package/lib/esm/core-react/notification/MessageRenderer.js.map +1 -1
- package/lib/esm/core-react/popup/Popup.js +4 -8
- package/lib/esm/core-react/popup/Popup.js.map +1 -1
- package/lib/esm/core-react/radialmenu/Annulus.d.ts +7 -8
- package/lib/esm/core-react/radialmenu/Annulus.d.ts.map +1 -1
- package/lib/esm/core-react/radialmenu/Annulus.js +7 -8
- package/lib/esm/core-react/radialmenu/Annulus.js.map +1 -1
- package/lib/esm/core-react/radialmenu/RadialMenu.d.ts +0 -1
- 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/searchbox/SearchBox.d.ts +3 -3
- package/lib/esm/core-react/searchbox/SearchBox.d.ts.map +1 -1
- package/lib/esm/core-react/searchbox/SearchBox.js +15 -9
- package/lib/esm/core-react/searchbox/SearchBox.js.map +1 -1
- package/lib/esm/core-react/settings/SettingsContainer.d.ts.map +1 -1
- package/lib/esm/core-react/settings/SettingsContainer.js +8 -4
- package/lib/esm/core-react/settings/SettingsContainer.js.map +1 -1
- package/lib/esm/core-react/settings/SettingsManager.d.ts +10 -7
- package/lib/esm/core-react/settings/SettingsManager.d.ts.map +1 -1
- package/lib/esm/core-react/settings/SettingsManager.js +13 -10
- package/lib/esm/core-react/settings/SettingsManager.js.map +1 -1
- package/lib/esm/core-react/tabs/Tabs.d.ts +5 -5
- package/lib/esm/core-react/tabs/Tabs.d.ts.map +1 -1
- package/lib/esm/core-react/tabs/Tabs.js +1 -0
- package/lib/esm/core-react/tabs/Tabs.js.map +1 -1
- package/lib/esm/core-react/tabs/VerticalTabs.d.ts +1 -0
- package/lib/esm/core-react/tabs/VerticalTabs.d.ts.map +1 -1
- package/lib/esm/core-react/tabs/VerticalTabs.js +2 -0
- package/lib/esm/core-react/tabs/VerticalTabs.js.map +1 -1
- package/lib/esm/core-react/text/BlockText.d.ts +1 -0
- package/lib/esm/core-react/text/BlockText.d.ts.map +1 -1
- package/lib/esm/core-react/text/BlockText.js +2 -0
- package/lib/esm/core-react/text/BlockText.js.map +1 -1
- package/lib/esm/core-react/text/BodyText.d.ts +1 -1
- package/lib/esm/core-react/text/BodyText.d.ts.map +1 -1
- package/lib/esm/core-react/text/BodyText.js +2 -1
- package/lib/esm/core-react/text/BodyText.js.map +1 -1
- package/lib/esm/core-react/text/DisabledText.d.ts +1 -0
- package/lib/esm/core-react/text/DisabledText.d.ts.map +1 -1
- package/lib/esm/core-react/text/DisabledText.js +2 -1
- package/lib/esm/core-react/text/DisabledText.js.map +1 -1
- package/lib/esm/core-react/text/MutedText.d.ts.map +1 -1
- package/lib/esm/core-react/text/MutedText.js +1 -0
- package/lib/esm/core-react/text/MutedText.js.map +1 -1
- package/lib/esm/core-react/text/StyledText.d.ts +1 -0
- package/lib/esm/core-react/text/StyledText.d.ts.map +1 -1
- package/lib/esm/core-react/text/StyledText.js.map +1 -1
- package/lib/esm/core-react/text/TextProps.d.ts +1 -0
- package/lib/esm/core-react/text/TextProps.d.ts.map +1 -1
- package/lib/esm/core-react/text/TextProps.js.map +1 -1
- package/lib/esm/core-react/tree/ExpansionToggle.d.ts +1 -3
- package/lib/esm/core-react/tree/ExpansionToggle.d.ts.map +1 -1
- package/lib/esm/core-react/tree/ExpansionToggle.js +9 -10
- package/lib/esm/core-react/tree/ExpansionToggle.js.map +1 -1
- package/lib/esm/core-react/tree/Node.js +1 -2
- package/lib/esm/core-react/tree/Node.js.map +1 -1
- package/lib/esm/core-react/utils/IconWebComponent.d.ts +4 -2
- package/lib/esm/core-react/utils/IconWebComponent.d.ts.map +1 -1
- package/lib/esm/core-react/utils/IconWebComponent.js +8 -5
- package/lib/esm/core-react/utils/IconWebComponent.js.map +1 -1
- package/lib/esm/core-react/utils/getCssVariable.js +1 -1
- package/lib/esm/core-react/utils/getCssVariable.js.map +1 -1
- package/lib/esm/core-react/utils/getObjectClassName.js +2 -3
- package/lib/esm/core-react/utils/getObjectClassName.js.map +1 -1
- package/lib/esm/core-react/utils/hooks/ResizeObserverPolyfill.d.ts +4 -1
- package/lib/esm/core-react/utils/hooks/ResizeObserverPolyfill.d.ts.map +1 -1
- package/lib/esm/core-react/utils/hooks/ResizeObserverPolyfill.js +3 -1
- package/lib/esm/core-react/utils/hooks/ResizeObserverPolyfill.js.map +1 -1
- package/lib/esm/core-react/utils/hooks/useCrossOriginPopup.d.ts +1 -1
- package/lib/esm/core-react/utils/hooks/useCrossOriginPopup.js +2 -3
- package/lib/esm/core-react/utils/hooks/useCrossOriginPopup.js.map +1 -1
- package/lib/esm/core-react/utils/hooks/useResizeObserver.d.ts.map +1 -1
- package/lib/esm/core-react/utils/hooks/useResizeObserver.js +13 -17
- package/lib/esm/core-react/utils/hooks/useResizeObserver.js.map +1 -1
- package/lib/esm/core-react.d.ts +3 -3
- package/lib/esm/core-react.d.ts.map +1 -1
- package/lib/esm/core-react.js +5 -4
- package/lib/esm/core-react.js.map +1 -1
- package/package.json +8 -33
- package/lib/cjs/core-react/badge/BadgeUtilities.d.ts.map +0 -1
- package/lib/cjs/core-react/badge/BadgeUtilities.js +0 -43
- package/lib/cjs/core-react/badge/BadgeUtilities.js.map +0 -1
- package/lib/cjs/core-react/badge/BetaBadge.d.ts +0 -10
- package/lib/cjs/core-react/badge/BetaBadge.d.ts.map +0 -1
- package/lib/cjs/core-react/badge/BetaBadge.js +0 -23
- package/lib/cjs/core-react/badge/BetaBadge.js.map +0 -1
- package/lib/cjs/core-react/badge/new-feature-badge.svg +0 -1
- package/lib/cjs/core-react/badge/technical-preview-badge.svg +0 -1
- package/lib/cjs/core-react/useTranslation.d.ts +0 -10
- package/lib/cjs/core-react/useTranslation.d.ts.map +0 -1
- package/lib/cjs/core-react/useTranslation.js.map +0 -1
- package/lib/esm/core-react/badge/BadgeUtilities.d.ts.map +0 -1
- package/lib/esm/core-react/badge/BadgeUtilities.js +0 -39
- package/lib/esm/core-react/badge/BadgeUtilities.js.map +0 -1
- package/lib/esm/core-react/badge/BetaBadge.d.ts +0 -10
- package/lib/esm/core-react/badge/BetaBadge.d.ts.map +0 -1
- package/lib/esm/core-react/badge/BetaBadge.js +0 -19
- package/lib/esm/core-react/badge/BetaBadge.js.map +0 -1
- package/lib/esm/core-react/badge/new-feature-badge.svg +0 -1
- package/lib/esm/core-react/badge/technical-preview-badge.svg +0 -1
- package/lib/esm/core-react/useTranslation.d.ts +0 -10
- package/lib/esm/core-react/useTranslation.d.ts.map +0 -1
- package/lib/esm/core-react/useTranslation.js +0 -16
- package/lib/esm/core-react/useTranslation.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useCrossOriginPopup.js","sourceRoot":"","sources":["../../../../../src/core-react/utils/hooks/useCrossOriginPopup.tsx"],"names":[],"mappings":";AAAA;;;gGAGgG;AAChG;;GAEG;;;AAEH,+BAA+B;AAC/B,+CAA4C;AAE5C;;GAEG;AACH,SAAgB,mBAAmB,CACjC,OAAgB,EAChB,GAAuB,EACvB,KAAa,EACb,KAAa,EACb,MAAc,EACd,OAAmB;IAEnB,MAAM,CAAC,oBAAoB,EAAE,uBAAuB,CAAC,GAAG,KAAK,CAAC,QAAQ,EAEnE,CAAC;IAEJ,gHAAgH;IAChH,oCAAoC;IACpC,MAAM,WAAW,GAAG,KAAK,CAAC,MAAM,EAAU,CAAC;IAC3C,MAAM,QAAQ,GAAG,KAAK,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;IACnC,MAAM,UAAU,GAAG,KAAK,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;IACvC,MAAM,UAAU,GAAG,KAAK,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;IACvC,MAAM,WAAW,GAAG,KAAK,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;IACzC,MAAM,YAAY,GAAG,KAAK,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;IAE3C,KAAK,CAAC,SAA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,KAAK,CAAC,SAAS,CAAC,GAAG,EAAE;QACnB,OAAO,GAAG,EAAE;YACV,UAAU,EAAE,CAAC;QACf,CAAC,CAAC;IACJ,CAAC,EAAE,CAAC,UAAU,CAAC,CAAC,CAAC;IAEjB,oDAAoD;IACpD,IAAA,yBAAW,EAAC,gBAAgB,EAAE,oBAAoB,CAAC,CAAC;IAEpD,yBAAyB;IACzB,oEAAoE;IACpE,KAAK,CAAC,SAAS,CAAC,GAAG,EAAE;QACnB,6EAA6E;QAC7E,IAAI,OAAO,IAAI,WAAW,CAAC,OAAO,KAAK,SAAS,EAAE;YAChD,MAAM,KAAK,GAAG,MAAM,CAAC,IAAI,CACvB,QAAQ,CAAC,OAAO,EAChB,UAAU,CAAC,OAAO,EAClB,SAAS,UAAU,CAAC,OAAO,WAAW,WAAW,CAAC,OAAO,EAAE,CAC5D,CAAC;YACF,IAAI,KAAK,EAAE;gBACT,KAAK,CAAC,KAAK,EAAE,CAAC;gBACd,WAAW,CAAC,OAAO,GAAG,KAAK,CAAC;gBAE5B,iEAAiE;gBACjE,uBAAuB,CAAC,IAAI,CAAC,CAAC;aAC/B;SACF;QAED,sEAAsE;QACtE,IAAI,CAAC,OAAO,IAAI,WAAW,CAAC,OAAO,KAAK,SAAS,EAAE;YACjD,WAAW,CAAC,OAAO,CAAC,KAAK,EAAE,CAAC;YAE5B,iBAAiB,EAAE,CAAC;SACrB;IACH,CAAC,EAAE,CAAC,iBAAiB,EAAE,OAAO,CAAC,CAAC,CAAC;AACnC,CAAC;AA5GD,kDA4GC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n * See LICENSE.md in the project root for license terms and full copyright notice.\n *--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module Utilities\n */\n\nimport * as React from \"react\";\nimport { useInterval } from \"./useInterval\";\n\n/** Hook that will show a popup window\n * @public\n */\nexport function useCrossOriginPopup(\n visible: boolean,\n url: string | undefined,\n title: string,\n width: number,\n height: number,\n onClose: () => void\n) {\n const [checkPopupAliveDelay, setCheckPopupAliveDelay] = React.useState<\n number | undefined\n >();\n\n // ONLY re-render the popup when visibility changes, any other changes get deferred until next visibility change\n // hence the massive use of 'useRef'\n const popupWindow = React.useRef<Window>();\n const savedUrl = React.useRef(url);\n const savedTitle = React.useRef(title);\n const savedWidth = React.useRef(width);\n const savedHeight = React.useRef(height);\n const savedOnClose = React.useRef(onClose);\n\n React.useEffect(() => {\n savedUrl.current = url;\n }, [url]);\n React.useEffect(() => {\n savedTitle.current = title;\n }, [title]);\n React.useEffect(() => {\n savedWidth.current = width;\n }, [width]);\n React.useEffect(() => {\n savedHeight.current = height;\n }, [height]);\n React.useEffect(() => {\n savedOnClose.current = onClose;\n }, [onClose]);\n\n // Cleanup method after a popup closure. Also calls the OnClose callback.\n const handleClosedPopup = React.useCallback(() => {\n savedOnClose.current();\n setCheckPopupAliveDelay(undefined);\n popupWindow.current = undefined;\n }, []);\n\n const closePopup = React.useCallback(() => {\n if (popupWindow.current !== undefined) {\n popupWindow.current.close(); // Manually close the popup\n handleClosedPopup();\n }\n }, [handleClosedPopup]);\n\n const checkPopupClosed = React.useCallback(() => {\n if (popupWindow.current?.closed) {\n // Popup has been closed by end-user, inform our host and cleanup\n handleClosedPopup();\n }\n }, [handleClosedPopup]);\n\n // Close popup when parent window get closed\n React.useEffect(() => {\n window.onbeforeunload = (_event) => {\n closePopup();\n };\n return () => {\n window.onbeforeunload = null;\n };\n }, [closePopup]);\n\n // Whenever the hook is unloaded, make sure the underlying popup get closed.\n // Note: An interval is used to check if popup was closed by user: because we access\n // a cross domain resource inside the popup, we don't have access to popup window events.\n // As a workaround, we periodically check if popup is still alive.\n // Reference: https://stackoverflow.com/questions/9388380/capture-the-close-event-of-popup-window-in-javascript/48240128#48240128\n React.useEffect(() => {\n return () => {\n closePopup();\n };\n }, [closePopup]);\n\n // Timer that checks if popup was closed by end-user\n useInterval(checkPopupClosed, checkPopupAliveDelay);\n\n // ==> Main render effect\n // Monitors visibility changes and open/close the popup accordingly.\n React.useEffect(() => {\n // If visible and a popup window is not already open, open a new popup window\n if (visible && popupWindow.current === undefined) {\n const popup = window.open(\n savedUrl.current,\n savedTitle.current,\n `width=${savedWidth.current},height=${savedHeight.current}`\n );\n if (popup) {\n popup.focus();\n popupWindow.current = popup;\n\n // Start and interval that will check if popup got closed by user\n setCheckPopupAliveDelay(1000);\n }\n }\n\n // If not visible but a previous popup window is still open, close it.\n if (!visible && popupWindow.current !== undefined) {\n popupWindow.current.close();\n\n handleClosedPopup();\n }\n }, [handleClosedPopup, visible]);\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useResizeObserver.d.ts","sourceRoot":"","sources":["../../../../../src/core-react/utils/hooks/useResizeObserver.tsx"],"names":[],"mappings":"AAIA;;GAEG;AACH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAK/B;;GAEG;AACH,wBAAgB,iBAAiB,CAAC,CAAC,SAAS,OAAO,EACjD,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,KAAK,IAAI,
|
|
1
|
+
{"version":3,"file":"useResizeObserver.d.ts","sourceRoot":"","sources":["../../../../../src/core-react/utils/hooks/useResizeObserver.tsx"],"names":[],"mappings":"AAIA;;GAEG;AACH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAK/B;;GAEG;AACH,wBAAgB,iBAAiB,CAAC,CAAC,SAAS,OAAO,EACjD,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,KAAK,IAAI,sCA0HnD;AAED;;;;GAIG;AACH,wBAAgB,uBAAuB,CACrC,SAAS,EAAE,WAAW,GAAG,IAAI,EAC7B,QAAQ,CAAC,EAAE,CAAC,KAAK,CAAC,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,MAAM,KAAK,IAAI,0BAgHrD;AAED;;GAEG;AACH,MAAM,WAAW,eAAe;IAC9B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED;;;GAGG;AACH,wBAAgB,qBAAqB,CAAC,EACpC,cAAc,EACd,MAAM,GACP,EAAE;IACD,cAAc,EAAE,WAAW,GAAG,IAAI,CAAC;IACnC,MAAM,EAAE,CAAC,KAAK,EAAE,eAAe,KAAK,KAAK,CAAC,YAAY,CAAC;CACxD,sEAGA;AAED;;;;;GAKG;AACH,wBAAgB,0BAA0B,CAAC,EACzC,QAAQ,EACR,QAAQ,GACT,EAAE;IACD,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,KAAK,IAAI,CAAC;IAClD,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAC5B,qBA2CA"}
|
|
@@ -23,20 +23,18 @@ function useResizeObserver(onResize) {
|
|
|
23
23
|
const owningWindowRef = React.useRef(null);
|
|
24
24
|
// istanbul ignore next
|
|
25
25
|
const resizeObserverCleanup = () => {
|
|
26
|
-
var _a;
|
|
27
26
|
if (rafRef.current)
|
|
28
27
|
owningWindowRef.current.cancelAnimationFrame(rafRef.current);
|
|
29
|
-
|
|
28
|
+
resizeObserver.current?.disconnect();
|
|
30
29
|
resizeObserver.current = null;
|
|
31
30
|
};
|
|
32
31
|
React.useEffect(() => {
|
|
33
32
|
isMountedRef.current = true;
|
|
34
33
|
return () => {
|
|
35
|
-
var _a;
|
|
36
34
|
isMountedRef.current = false;
|
|
37
35
|
if (rafRef.current)
|
|
38
36
|
owningWindowRef.current.cancelAnimationFrame(rafRef.current);
|
|
39
|
-
|
|
37
|
+
owningWindowRef.current?.removeEventListener("beforeunload", resizeObserverCleanup);
|
|
40
38
|
};
|
|
41
39
|
}, []);
|
|
42
40
|
const processResize = React.useCallback((target) => {
|
|
@@ -70,7 +68,8 @@ function useResizeObserver(onResize) {
|
|
|
70
68
|
}
|
|
71
69
|
}, [processResize]);
|
|
72
70
|
const observerRef = (0, useRefEffect_1.useRefEffect)((instance) => {
|
|
73
|
-
|
|
71
|
+
const RO = (0, ResizeObserverPolyfill_1.getResizeObserver)();
|
|
72
|
+
resizeObserver.current = new RO(handleResize);
|
|
74
73
|
if (instance) {
|
|
75
74
|
resizeObserver.current.observe(instance);
|
|
76
75
|
const newBounds = instance.getBoundingClientRect();
|
|
@@ -78,10 +77,8 @@ function useResizeObserver(onResize) {
|
|
|
78
77
|
bounds.current = newBounds;
|
|
79
78
|
}
|
|
80
79
|
return () => {
|
|
81
|
-
var _a;
|
|
82
80
|
instance &&
|
|
83
|
-
(
|
|
84
|
-
/* istanbul ignore next */ (_a = resizeObserver.current) === null || _a === void 0 ? void 0 : _a.unobserve(instance));
|
|
81
|
+
/* istanbul ignore next */ resizeObserver.current?.unobserve(instance);
|
|
85
82
|
resizeObserver.current = null;
|
|
86
83
|
};
|
|
87
84
|
}, [handleResize, onResize]);
|
|
@@ -105,8 +102,8 @@ exports.useResizeObserver = useResizeObserver;
|
|
|
105
102
|
* @internal
|
|
106
103
|
*/
|
|
107
104
|
function useLayoutResizeObserver(inElement, onResize) {
|
|
108
|
-
const inBoundingRect = inElement
|
|
109
|
-
const [bounds, setBounds] = React.useState({ width: inBoundingRect
|
|
105
|
+
const inBoundingRect = inElement?.getBoundingClientRect();
|
|
106
|
+
const [bounds, setBounds] = React.useState({ width: inBoundingRect?.width, height: inBoundingRect?.height });
|
|
110
107
|
const [watchedElement, setWatchedElement] = React.useState(inElement);
|
|
111
108
|
const resizeObserver = React.useRef(null);
|
|
112
109
|
const rafRef = React.useRef(0); // set to non-zero when requestAnimationFrame processing is active
|
|
@@ -114,10 +111,9 @@ function useLayoutResizeObserver(inElement, onResize) {
|
|
|
114
111
|
const owningWindowRef = React.useRef(null);
|
|
115
112
|
// istanbul ignore next
|
|
116
113
|
const resizeObserverCleanup = () => {
|
|
117
|
-
var _a;
|
|
118
114
|
if (rafRef.current)
|
|
119
115
|
owningWindowRef.current.cancelAnimationFrame(rafRef.current);
|
|
120
|
-
|
|
116
|
+
resizeObserver.current?.disconnect();
|
|
121
117
|
resizeObserver.current = null;
|
|
122
118
|
};
|
|
123
119
|
React.useEffect(() => {
|
|
@@ -171,12 +167,12 @@ function useLayoutResizeObserver(inElement, onResize) {
|
|
|
171
167
|
if (!watchedElement) {
|
|
172
168
|
return;
|
|
173
169
|
}
|
|
174
|
-
|
|
170
|
+
const RO = (0, ResizeObserverPolyfill_1.getResizeObserver)();
|
|
171
|
+
resizeObserver.current = new RO(handleResize);
|
|
175
172
|
resizeObserver.current.observe(watchedElement);
|
|
176
173
|
return () => {
|
|
177
|
-
var _a;
|
|
178
174
|
// istanbul ignore next
|
|
179
|
-
|
|
175
|
+
resizeObserver.current?.disconnect();
|
|
180
176
|
resizeObserver.current = null;
|
|
181
177
|
};
|
|
182
178
|
}, [handleResize, watchedElement]);
|
|
@@ -216,7 +212,7 @@ function ResizableContainerObserver({ onResize, children, }) {
|
|
|
216
212
|
}, [hasChildren]);
|
|
217
213
|
const processResize = React.useCallback((width, height) => {
|
|
218
214
|
// istanbul ignore next
|
|
219
|
-
onResize(width
|
|
215
|
+
onResize(width ?? 0, height ?? 0);
|
|
220
216
|
}, [onResize]);
|
|
221
217
|
useLayoutResizeObserver(containerElement, processResize);
|
|
222
218
|
const style = hasChildren
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useResizeObserver.js","sourceRoot":"","sources":["../../../../../src/core-react/utils/hooks/useResizeObserver.tsx"],"names":[],"mappings":";;;AAAA;;;gGAGgG;AAChG;;GAEG;AACH,+BAA+B;AAC/B,qEAA0D;AAC1D,iDAA8C;AAC9C,uCAAoC;AAEpC;;GAEG;AACH,SAAgB,iBAAiB,CAC/B,QAAkD;IAElD,MAAM,MAAM,GAAG,KAAK,CAAC,MAAM,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,CAAC,CAAC;IACrD,MAAM,cAAc,GAAG,K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AM,EAAE;QACnC,CAAC,CAAC,EAAE,OAAO,EAAE,MAAM,EAAE,CAAC;IAExB,OAAO,CACL,6BACE,GAAG,EAAE,YAAY,EACjB,SAAS,EAAC,4BAA4B,EACtC,KAAK,EAAE,KAAK,IAEX,WAAW,IAAI,QAAQ,CACpB,CACP,CAAC;AACJ,CAAC;AAjDD,gEAiDC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n * See LICENSE.md in the project root for license terms and full copyright notice.\n *--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module Utilities\n */\nimport * as React from \"react\";\nimport { ResizeObserver } from \"./ResizeObserverPolyfill\";\nimport { useRefEffect } from \"./useRefEffect\";\nimport { useRefs } from \"./useRefs\";\n\n/** Uses ResizeObserver API to notify about element bound changes.\n * @internal\n */\nexport function useResizeObserver<T extends Element>(\n onResize?: (width: number, height: number) => void\n) {\n const bounds = React.useRef({ width: 0, height: 0 });\n const resizeObserver = React.useRef<ResizeObserver | null>(null);\n const rafRef = React.useRef(0); // set to non-zero when requestAnimationFrame processing is active\n const isMountedRef = React.useRef(false);\n const owningWindowRef = React.useRef<any>(null);\n\n // istanbul ignore next\n const resizeObserverCleanup = () => {\n if (rafRef.current)\n owningWindowRef.current.cancelAnimationFrame(rafRef.current);\n\n resizeObserver.current?.disconnect();\n resizeObserver.current = null;\n };\n\n React.useEffect(() => {\n isMountedRef.current = true;\n return () => {\n isMountedRef.current = false;\n if (rafRef.current)\n owningWindowRef.current.cancelAnimationFrame(rafRef.current);\n owningWindowRef.current?.removeEventListener(\n \"beforeunload\",\n resizeObserverCleanup\n );\n };\n }, []);\n\n const processResize = React.useCallback(\n (target: HTMLElement) => {\n const newBounds = target.getBoundingClientRect();\n // istanbul ignore else\n if (\n isMountedRef.current &&\n (bounds.current.width !== newBounds.width ||\n bounds.current.height !== newBounds.height)\n ) {\n bounds.current = newBounds;\n onResize && onResize(newBounds.width, newBounds.height);\n }\n },\n [onResize]\n );\n\n const handleResize = React.useCallback(\n (entries: any[]) => {\n // istanbul ignore if\n if (\n !isMountedRef.current ||\n !Array.isArray(entries) ||\n 0 === entries.length\n ) {\n return;\n }\n const target = entries[0].target as HTMLElement;\n // istanbul ignore next\n owningWindowRef.current &&\n owningWindowRef.current.removeEventListener(\n \"beforeunload\",\n resizeObserverCleanup\n );\n\n owningWindowRef.current = target.ownerDocument.defaultView;\n // istanbul ignore else\n if (owningWindowRef.current) {\n owningWindowRef.current.addEventListener(\n \"unload\",\n resizeObserverCleanup\n );\n\n // using requestAnimationFrame to stop the \"ResizeObserver loop completed with undelivered notifications.\" and\n // \"ResizeObserver loop limit exceeded\" messages reported to window.onError\n rafRef.current = owningWindowRef.current.requestAnimationFrame(() =>\n processResize(target)\n );\n }\n },\n [processResize]\n );\n\n const observerRef = useRefEffect(\n (instance: T | null) => {\n resizeObserver.current = new ResizeObserver(handleResize);\n if (instance) {\n resizeObserver.current.observe(instance);\n const newBounds = instance.getBoundingClientRect();\n onResize && onResize(newBounds.width, newBounds.height);\n bounds.current = newBounds;\n }\n\n return () => {\n instance &&\n /* istanbul ignore next */ resizeObserver.current?.unobserve(\n instance\n );\n resizeObserver.current = null;\n };\n },\n [handleResize, onResize]\n );\n\n const handleRef = React.useCallback(\n (instance: Element | null) => {\n const newBounds = instance && instance.getBoundingClientRect();\n // istanbul ignore if\n if (\n newBounds &&\n (bounds.current.width !== newBounds.width ||\n bounds.current.height !== newBounds.height)\n ) {\n bounds.current = newBounds;\n onResize && onResize(newBounds.width, newBounds.height);\n }\n },\n [onResize]\n );\n\n const ref = useRefs(handleRef, observerRef);\n return ref;\n}\n\n/** React hook that uses ResizeObserver API to notify about element bound changes. Note: to work similar to ReactResizeDetector\n * width and height are initialized as undefined and only set during after mount if bounds are non-zero. This implementation properly\n * handles observing element in pop-out/child windows.\n * @internal\n */\nexport function useLayoutResizeObserver(\n inElement: HTMLElement | null,\n onResize?: (width?: number, height?: number) => void\n) {\n const inBoundingRect = inElement?.getBoundingClientRect();\n const [bounds, setBounds] = React.useState<{\n width?: number;\n height?: number;\n }>({ width: inBoundingRect?.width, height: inBoundingRect?.height });\n const [watchedElement, setWatchedElement] = React.useState(inElement);\n const resizeObserver = React.useRef<ResizeObserver | null>(null);\n const rafRef = React.useRef(0); // set to non-zero when requestAnimationFrame processing is active\n const isMountedRef = React.useRef(false);\n const owningWindowRef = React.useRef<any>(null);\n\n // istanbul ignore next\n const resizeObserverCleanup = () => {\n if (rafRef.current)\n owningWindowRef.current.cancelAnimationFrame(rafRef.current);\n\n resizeObserver.current?.disconnect();\n resizeObserver.current = null;\n };\n\n React.useEffect(() => {\n isMountedRef.current = true;\n setWatchedElement(inElement);\n\n // istanbul ignore next\n if (inElement) {\n const newBounds = inElement.getBoundingClientRect();\n onResize && onResize(newBounds.width, newBounds.height);\n setBounds(newBounds);\n }\n\n return () => {\n isMountedRef.current = false;\n rafRef.current &&\n owningWindowRef.current &&\n owningWindowRef.current.cancelAnimationFrame(rafRef.current);\n owningWindowRef.current &&\n owningWindowRef.current.removeEventListener(\n \"beforeunload\",\n resizeObserverCleanup\n );\n };\n }, [onResize, inElement]);\n\n const processResize = React.useCallback(\n (target: HTMLElement) => {\n const newBounds = target.getBoundingClientRect();\n // istanbul ignore next\n if (\n isMountedRef.current &&\n (bounds.width !== newBounds.width || bounds.height !== newBounds.height)\n ) {\n onResize && onResize(newBounds.width, newBounds.height);\n setBounds(newBounds);\n }\n },\n [bounds.height, bounds.width, onResize]\n );\n\n const handleResize = React.useCallback(\n (entries: any[]) => {\n // istanbul ignore next\n if (\n !isMountedRef.current ||\n !Array.isArray(entries) ||\n 0 === entries.length\n ) {\n return;\n }\n const target = entries[0].target as HTMLElement;\n // istanbul ignore next\n if (owningWindowRef.current)\n owningWindowRef.current.removeEventListener(\n \"beforeunload\",\n resizeObserverCleanup\n );\n\n owningWindowRef.current = target.ownerDocument.defaultView;\n // istanbul ignore else\n if (owningWindowRef.current) {\n owningWindowRef.current.addEventListener(\n \"unload\",\n resizeObserverCleanup\n );\n\n // using requestAnimationFrame to stop the \"ResizeObserver loop completed with undelivered notifications.\" and\n // \"ResizeObserver loop limit exceeded\" messages reported to window.onError\n rafRef.current = owningWindowRef.current.requestAnimationFrame(() =>\n processResize(target)\n );\n }\n },\n [processResize]\n );\n\n React.useLayoutEffect(() => {\n if (!watchedElement) {\n return;\n }\n resizeObserver.current = new ResizeObserver(handleResize);\n resizeObserver.current.observe(watchedElement);\n return () => {\n // istanbul ignore next\n resizeObserver.current?.disconnect();\n resizeObserver.current = null;\n };\n }, [handleResize, watchedElement]);\n\n return [bounds.width, bounds.height];\n}\n\n/** Prop the ElementResizeObserver sends to the render function.\n * @public\n */\nexport interface RenderPropsArgs {\n width?: number;\n height?: number;\n}\n\n/** ElementResizeObserver provides functionality similar to ReactResizeDetector when a render function is specified. This implementation properly handles\n * observing element in pop-out/child windows.\n * @public\n */\nexport function ElementResizeObserver({\n watchedElement,\n render,\n}: {\n watchedElement: HTMLElement | null;\n render: (props: RenderPropsArgs) => React.ReactElement;\n}) {\n const [width, height] = useLayoutResizeObserver(watchedElement);\n return render({ width, height });\n}\n\n/** ResizableContainerObserver is a component that provides the functionality similar to the ReactResizeDetector option that call a function when\n * the observed element is resized. This implementation properly handles observing element in pop-out/child windows. If children nodes are defined then\n * the div added by the component is considered the container whose size will be observed. If no children are provided then the component will report\n * size changes from its parent container.\n * @public\n */\nexport function ResizableContainerObserver({\n onResize,\n children,\n}: {\n onResize: (width: number, height: number) => void;\n children?: React.ReactNode;\n}) {\n const containerRef = React.useRef<HTMLDivElement>(null); // set to non-zero when requestAnimationFrame processing is active\n const [containerElement, setContainerElement] =\n React.useState<HTMLElement | null>(null);\n const isMountedRef = React.useRef(false);\n const hasChildren = React.Children.count(children) !== 0;\n\n // if no children are specified then monitor size of parent element.\n React.useEffect(() => {\n // istanbul ignore next\n if (!isMountedRef.current && containerRef.current) {\n isMountedRef.current = true;\n const hasParent = !!containerRef.current.parentElement;\n setContainerElement(\n hasChildren && hasParent\n ? containerRef.current\n : containerRef.current.parentElement\n );\n }\n }, [hasChildren]);\n\n const processResize = React.useCallback(\n (width?: number, height?: number) => {\n // istanbul ignore next\n onResize(width ?? 0, height ?? 0);\n },\n [onResize]\n );\n\n useLayoutResizeObserver(containerElement, processResize);\n const style: React.CSSProperties = hasChildren\n ? { width: \"100%\", height: \"100%\" }\n : { display: \"none\" };\n\n return (\n <div\n ref={containerRef}\n className=\"uicore-resizable-container\"\n style={style}\n >\n {hasChildren && children}\n </div>\n );\n}\n"]}
|
|
1
|
+
{"version":3,"file":"useResizeObserver.js","sourceRoot":"","sources":["../../../../../src/core-react/utils/hooks/useResizeObserver.tsx"],"names":[],"mappings":";;;AAAA;;;gGAGgG;AAChG;;GAEG;AACH,+BAA+B;AAC/B,qEAA6D;AAC7D,iDAA8C;AAC9C,uCAAoC;AAEpC;;GAEG;AACH,SAAgB,iBAAiB,CAC/B,QAAkD;IAElD,MAAM,MAAM,GAAG,KAAK,CAAC,MAAM,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,CAAC,CAAC;IACrD,MAAM,cAAc,GAAG,KAAK,CAAC,MAAM,CAAwB,IAAI,CAAC,CAAC;IACjE,MAAM,MAAM,GAAG,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,kEAAkE;IAClG,MAAM,YAAY,GAAG,KAAK,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;IACzC,MAAM,eAAe,GAAG,KAAK,CAAC,MAAM,CAAM,IAAI,CAAC,CAAC;IAEhD,uBAAuB;IACvB,MAAM,qBAAqB,GAAG,GAAG,EAAE;QACjC,IAAI,MAAM,CAAC,OAAO;YAChB,eAAe,CAAC,OAAO,CAAC,oBAAoB,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;QAE/D,cAAc,CAAC,OAAO,EAAE,UAAU,EAAE,CAAC;QACrC,cAAc,CAAC,OAAO,GAAG,IAAI,C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CAAC,OAAO,GAAG,IAAI,CAAC;YAC5B,MAAM,SAAS,GAAG,CAAC,CAAC,YAAY,CAAC,OAAO,CAAC,aAAa,CAAC;YACvD,mBAAmB,CACjB,WAAW,IAAI,SAAS;gBACtB,CAAC,CAAC,YAAY,CAAC,OAAO;gBACtB,CAAC,CAAC,YAAY,CAAC,OAAO,CAAC,aAAa,CACvC,CAAC;SACH;IACH,CAAC,EAAE,CAAC,WAAW,CAAC,CAAC,CAAC;IAElB,MAAM,aAAa,GAAG,KAAK,CAAC,WAAW,CACrC,CAAC,KAAc,EAAE,MAAe,EAAE,EAAE;QAClC,uBAAuB;QACvB,QAAQ,CAAC,KAAK,IAAI,CAAC,EAAE,MAAM,IAAI,CAAC,CAAC,CAAC;IACpC,CAAC,EACD,CAAC,QAAQ,CAAC,CACX,CAAC;IAEF,uBAAuB,CAAC,gBAAgB,EAAE,aAAa,CAAC,CAAC;IACzD,MAAM,KAAK,GAAwB,WAAW;QAC5C,CAAC,CAAC,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE;QACnC,CAAC,CAAC,EAAE,OAAO,EAAE,MAAM,EAAE,CAAC;IAExB,OAAO,CACL,6BACE,GAAG,EAAE,YAAY,EACjB,SAAS,EAAC,4BAA4B,EACtC,KAAK,EAAE,KAAK,IAEX,WAAW,IAAI,QAAQ,CACpB,CACP,CAAC;AACJ,CAAC;AAjDD,gEAiDC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n * See LICENSE.md in the project root for license terms and full copyright notice.\n *--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module Utilities\n */\nimport * as React from \"react\";\nimport { getResizeObserver } from \"./ResizeObserverPolyfill\";\nimport { useRefEffect } from \"./useRefEffect\";\nimport { useRefs } from \"./useRefs\";\n\n/** Uses ResizeObserver API to notify about element bound changes.\n * @internal\n */\nexport function useResizeObserver<T extends Element>(\n onResize?: (width: number, height: number) => void\n) {\n const bounds = React.useRef({ width: 0, height: 0 });\n const resizeObserver = React.useRef<ResizeObserver | null>(null);\n const rafRef = React.useRef(0); // set to non-zero when requestAnimationFrame processing is active\n const isMountedRef = React.useRef(false);\n const owningWindowRef = React.useRef<any>(null);\n\n // istanbul ignore next\n const resizeObserverCleanup = () => {\n if (rafRef.current)\n owningWindowRef.current.cancelAnimationFrame(rafRef.current);\n\n resizeObserver.current?.disconnect();\n resizeObserver.current = null;\n };\n\n React.useEffect(() => {\n isMountedRef.current = true;\n return () => {\n isMountedRef.current = false;\n if (rafRef.current)\n owningWindowRef.current.cancelAnimationFrame(rafRef.current);\n owningWindowRef.current?.removeEventListener(\n \"beforeunload\",\n resizeObserverCleanup\n );\n };\n }, []);\n\n const processResize = React.useCallback(\n (target: HTMLElement) => {\n const newBounds = target.getBoundingClientRect();\n // istanbul ignore else\n if (\n isMountedRef.current &&\n (bounds.current.width !== newBounds.width ||\n bounds.current.height !== newBounds.height)\n ) {\n bounds.current = newBounds;\n onResize && onResize(newBounds.width, newBounds.height);\n }\n },\n [onResize]\n );\n\n const handleResize = React.useCallback(\n (entries: any[]) => {\n // istanbul ignore if\n if (\n !isMountedRef.current ||\n !Array.isArray(entries) ||\n 0 === entries.length\n ) {\n return;\n }\n const target = entries[0].target as HTMLElement;\n // istanbul ignore next\n owningWindowRef.current &&\n owningWindowRef.current.removeEventListener(\n \"beforeunload\",\n resizeObserverCleanup\n );\n\n owningWindowRef.current = target.ownerDocument.defaultView;\n // istanbul ignore else\n if (owningWindowRef.current) {\n owningWindowRef.current.addEventListener(\n \"unload\",\n resizeObserverCleanup\n );\n\n // using requestAnimationFrame to stop the \"ResizeObserver loop completed with undelivered notifications.\" and\n // \"ResizeObserver loop limit exceeded\" messages reported to window.onError\n rafRef.current = owningWindowRef.current.requestAnimationFrame(() =>\n processResize(target)\n );\n }\n },\n [processResize]\n );\n\n const observerRef = useRefEffect(\n (instance: T | null) => {\n const RO = getResizeObserver();\n resizeObserver.current = new RO(handleResize);\n if (instance) {\n resizeObserver.current.observe(instance);\n const newBounds = instance.getBoundingClientRect();\n onResize && onResize(newBounds.width, newBounds.height);\n bounds.current = newBounds;\n }\n\n return () => {\n instance &&\n /* istanbul ignore next */ resizeObserver.current?.unobserve(\n instance\n );\n resizeObserver.current = null;\n };\n },\n [handleResize, onResize]\n );\n\n const handleRef = React.useCallback(\n (instance: Element | null) => {\n const newBounds = instance && instance.getBoundingClientRect();\n // istanbul ignore if\n if (\n newBounds &&\n (bounds.current.width !== newBounds.width ||\n bounds.current.height !== newBounds.height)\n ) {\n bounds.current = newBounds;\n onResize && onResize(newBounds.width, newBounds.height);\n }\n },\n [onResize]\n );\n\n const ref = useRefs(handleRef, observerRef);\n return ref;\n}\n\n/** React hook that uses ResizeObserver API to notify about element bound changes. Note: to work similar to ReactResizeDetector\n * width and height are initialized as undefined and only set during after mount if bounds are non-zero. This implementation properly\n * handles observing element in pop-out/child windows.\n * @internal\n */\nexport function useLayoutResizeObserver(\n inElement: HTMLElement | null,\n onResize?: (width?: number, height?: number) => void\n) {\n const inBoundingRect = inElement?.getBoundingClientRect();\n const [bounds, setBounds] = React.useState<{\n width?: number;\n height?: number;\n }>({ width: inBoundingRect?.width, height: inBoundingRect?.height });\n const [watchedElement, setWatchedElement] = React.useState(inElement);\n const resizeObserver = React.useRef<ResizeObserver | null>(null);\n const rafRef = React.useRef(0); // set to non-zero when requestAnimationFrame processing is active\n const isMountedRef = React.useRef(false);\n const owningWindowRef = React.useRef<any>(null);\n\n // istanbul ignore next\n const resizeObserverCleanup = () => {\n if (rafRef.current)\n owningWindowRef.current.cancelAnimationFrame(rafRef.current);\n\n resizeObserver.current?.disconnect();\n resizeObserver.current = null;\n };\n\n React.useEffect(() => {\n isMountedRef.current = true;\n setWatchedElement(inElement);\n\n // istanbul ignore next\n if (inElement) {\n const newBounds = inElement.getBoundingClientRect();\n onResize && onResize(newBounds.width, newBounds.height);\n setBounds(newBounds);\n }\n\n return () => {\n isMountedRef.current = false;\n rafRef.current &&\n owningWindowRef.current &&\n owningWindowRef.current.cancelAnimationFrame(rafRef.current);\n owningWindowRef.current &&\n owningWindowRef.current.removeEventListener(\n \"beforeunload\",\n resizeObserverCleanup\n );\n };\n }, [onResize, inElement]);\n\n const processResize = React.useCallback(\n (target: HTMLElement) => {\n const newBounds = target.getBoundingClientRect();\n // istanbul ignore next\n if (\n isMountedRef.current &&\n (bounds.width !== newBounds.width || bounds.height !== newBounds.height)\n ) {\n onResize && onResize(newBounds.width, newBounds.height);\n setBounds(newBounds);\n }\n },\n [bounds.height, bounds.width, onResize]\n );\n\n const handleResize = React.useCallback(\n (entries: any[]) => {\n // istanbul ignore next\n if (\n !isMountedRef.current ||\n !Array.isArray(entries) ||\n 0 === entries.length\n ) {\n return;\n }\n const target = entries[0].target as HTMLElement;\n // istanbul ignore next\n if (owningWindowRef.current)\n owningWindowRef.current.removeEventListener(\n \"beforeunload\",\n resizeObserverCleanup\n );\n\n owningWindowRef.current = target.ownerDocument.defaultView;\n // istanbul ignore else\n if (owningWindowRef.current) {\n owningWindowRef.current.addEventListener(\n \"unload\",\n resizeObserverCleanup\n );\n\n // using requestAnimationFrame to stop the \"ResizeObserver loop completed with undelivered notifications.\" and\n // \"ResizeObserver loop limit exceeded\" messages reported to window.onError\n rafRef.current = owningWindowRef.current.requestAnimationFrame(() =>\n processResize(target)\n );\n }\n },\n [processResize]\n );\n\n React.useLayoutEffect(() => {\n if (!watchedElement) {\n return;\n }\n const RO = getResizeObserver();\n resizeObserver.current = new RO(handleResize);\n resizeObserver.current.observe(watchedElement);\n return () => {\n // istanbul ignore next\n resizeObserver.current?.disconnect();\n resizeObserver.current = null;\n };\n }, [handleResize, watchedElement]);\n\n return [bounds.width, bounds.height];\n}\n\n/** Prop the ElementResizeObserver sends to the render function.\n * @public\n */\nexport interface RenderPropsArgs {\n width?: number;\n height?: number;\n}\n\n/** ElementResizeObserver provides functionality similar to ReactResizeDetector when a render function is specified. This implementation properly handles\n * observing element in pop-out/child windows.\n * @public\n */\nexport function ElementResizeObserver({\n watchedElement,\n render,\n}: {\n watchedElement: HTMLElement | null;\n render: (props: RenderPropsArgs) => React.ReactElement;\n}) {\n const [width, height] = useLayoutResizeObserver(watchedElement);\n return render({ width, height });\n}\n\n/** ResizableContainerObserver is a component that provides the functionality similar to the ReactResizeDetector option that call a function when\n * the observed element is resized. This implementation properly handles observing element in pop-out/child windows. If children nodes are defined then\n * the div added by the component is considered the container whose size will be observed. If no children are provided then the component will report\n * size changes from its parent container.\n * @public\n */\nexport function ResizableContainerObserver({\n onResize,\n children,\n}: {\n onResize: (width: number, height: number) => void;\n children?: React.ReactNode;\n}) {\n const containerRef = React.useRef<HTMLDivElement>(null); // set to non-zero when requestAnimationFrame processing is active\n const [containerElement, setContainerElement] =\n React.useState<HTMLElement | null>(null);\n const isMountedRef = React.useRef(false);\n const hasChildren = React.Children.count(children) !== 0;\n\n // if no children are specified then monitor size of parent element.\n React.useEffect(() => {\n // istanbul ignore next\n if (!isMountedRef.current && containerRef.current) {\n isMountedRef.current = true;\n const hasParent = !!containerRef.current.parentElement;\n setContainerElement(\n hasChildren && hasParent\n ? containerRef.current\n : containerRef.current.parentElement\n );\n }\n }, [hasChildren]);\n\n const processResize = React.useCallback(\n (width?: number, height?: number) => {\n // istanbul ignore next\n onResize(width ?? 0, height ?? 0);\n },\n [onResize]\n );\n\n useLayoutResizeObserver(containerElement, processResize);\n const style: React.CSSProperties = hasChildren\n ? { width: \"100%\", height: \"100%\" }\n : { display: \"none\" };\n\n return (\n <div\n ref={containerRef}\n className=\"uicore-resizable-container\"\n style={style}\n >\n {hasChildren && children}\n </div>\n );\n}\n"]}
|
package/lib/cjs/core-react.d.ts
CHANGED
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
export * from "./core-react/UiCore";
|
|
2
2
|
export * from "./core-react/badge/Badge";
|
|
3
|
-
export * from "./core-react/badge/
|
|
4
|
-
export * from "./core-react/badge/BetaBadge";
|
|
5
|
-
export * from "./core-react/badge/NewBadge";
|
|
3
|
+
export * from "./core-react/badge/BadgeType";
|
|
6
4
|
export * from "./core-react/base/Div";
|
|
7
5
|
export * from "./core-react/base/DivWithOutsideClick";
|
|
8
6
|
export * from "./core-react/base/Centered";
|
|
@@ -34,6 +32,8 @@ export * from "./core-react/focustrap/FocusTrap";
|
|
|
34
32
|
export * from "./core-react/hocs/withIsPressed";
|
|
35
33
|
export * from "./core-react/hocs/withOnOutsideClick";
|
|
36
34
|
export * from "./core-react/hocs/withTimeout";
|
|
35
|
+
export { LocalizationProvider } from "./core-react/l10n/LocalizationProvider";
|
|
36
|
+
export { usePackageTranslation } from "./core-react/l10n/usePackageTranslation";
|
|
37
37
|
export * from "./core-react/icons/ConditionalIconItem";
|
|
38
38
|
export * from "./core-react/icons/IconComponent";
|
|
39
39
|
export * from "./core-react/icons/SvgPath";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"core-react.d.ts","sourceRoot":"","sources":["../../src/core-react.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"core-react.d.ts","sourceRoot":"","sources":["../../src/core-react.ts"],"names":[],"mappings":"AAIA,cAAc,qBAAqB,CAAC;AAEpC,cAAc,0BAA0B,CAAC;AACzC,cAAc,8BAA8B,CAAC;AAE7C,cAAc,uBAAuB,CAAC;AACtC,cAAc,uCAAuC,CAAC;AACtD,cAAc,4BAA4B,CAAC;AAC3C,cAAc,gCAAgC,CAAC;AAC/C,cAAc,qCAAqC,CAAC;AACpD,cAAc,uBAAuB,CAAC;AACtC,cAAc,iCAAiC,CAAC;AAChD,cAAc,8BAA8B,CAAC;AAE7C,cAAc,sCAAsC,CAAC;AAErD,cAAc,wCAAwC,CAAC;AAEvD,cAAc,sCAAsC,CAAC;AACrD,cAAc,+CAA+C,CAAC;AAC9D,cAAc,6CAA6C,CAAC;AAC5D,cAAc,0CAA0C,CAAC;AACzD,cAAc,yCAAyC,CAAC;AACxD,cAAc,4CAA4C,CAAC;AAC3D,cAAc,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C;AAC3D,cAAc,8CAA8C,CAAC;AAC7D,cAAc,uCAAuC,CAAC;AACtD,cAAc,kCAAkC,CAAC;AACjD,cAAc,sCAAsC,CAAC;AACrD,cAAc,4CAA4C,CAAC;AAC3D,cAAc,sCAAsC,CAAC;AACrD,cAAc,kDAAkD,CAAC;AACjE,cAAc,sCAAsC,CAAC;AACrD,cAAc,8CAA8C,CAAC;AAI7D;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG"}
|
package/lib/cjs/core-react.js
CHANGED
|
@@ -1,8 +1,4 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
/*---------------------------------------------------------------------------------------------
|
|
3
|
-
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
|
|
4
|
-
* See LICENSE.md in the project root for license terms and full copyright notice.
|
|
5
|
-
*--------------------------------------------------------------------------------------------*/
|
|
6
2
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
7
3
|
if (k2 === undefined) k2 = k;
|
|
8
4
|
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
@@ -18,13 +14,14 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
18
14
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
19
15
|
};
|
|
20
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
21
|
-
exports.TreeNodePlaceholder = exports.Tree = exports.TreeNode = exports.TreeBranch = exports.ExpansionToggle = void 0;
|
|
22
|
-
|
|
17
|
+
exports.TreeNodePlaceholder = exports.Tree = exports.TreeNode = exports.TreeBranch = exports.ExpansionToggle = exports.usePackageTranslation = exports.LocalizationProvider = void 0;
|
|
18
|
+
/*---------------------------------------------------------------------------------------------
|
|
19
|
+
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
|
|
20
|
+
* See LICENSE.md in the project root for license terms and full copyright notice.
|
|
21
|
+
*--------------------------------------------------------------------------------------------*/
|
|
23
22
|
__exportStar(require("./core-react/UiCore"), exports);
|
|
24
23
|
__exportStar(require("./core-react/badge/Badge"), exports);
|
|
25
|
-
__exportStar(require("./core-react/badge/
|
|
26
|
-
__exportStar(require("./core-react/badge/BetaBadge"), exports);
|
|
27
|
-
__exportStar(require("./core-react/badge/NewBadge"), exports);
|
|
24
|
+
__exportStar(require("./core-react/badge/BadgeType"), exports);
|
|
28
25
|
__exportStar(require("./core-react/base/Div"), exports);
|
|
29
26
|
__exportStar(require("./core-react/base/DivWithOutsideClick"), exports);
|
|
30
27
|
__exportStar(require("./core-react/base/Centered"), exports);
|
|
@@ -56,6 +53,10 @@ __exportStar(require("./core-react/focustrap/FocusTrap"), exports);
|
|
|
56
53
|
__exportStar(require("./core-react/hocs/withIsPressed"), exports);
|
|
57
54
|
__exportStar(require("./core-react/hocs/withOnOutsideClick"), exports);
|
|
58
55
|
__exportStar(require("./core-react/hocs/withTimeout"), exports);
|
|
56
|
+
var LocalizationProvider_1 = require("./core-react/l10n/LocalizationProvider");
|
|
57
|
+
Object.defineProperty(exports, "LocalizationProvider", { enumerable: true, get: function () { return LocalizationProvider_1.LocalizationProvider; } });
|
|
58
|
+
var usePackageTranslation_1 = require("./core-react/l10n/usePackageTranslation");
|
|
59
|
+
Object.defineProperty(exports, "usePackageTranslation", { enumerable: true, get: function () { return usePackageTranslation_1.usePackageTranslation; } });
|
|
59
60
|
__exportStar(require("./core-react/icons/ConditionalIconItem"), exports);
|
|
60
61
|
__exportStar(require("./core-react/icons/IconComponent"), exports);
|
|
61
62
|
__exportStar(require("./core-react/icons/SvgPath"), exports);
|
|
@@ -104,6 +105,7 @@ __exportStar(require("./core-react/uistate/UiStateEntry"), exports);
|
|
|
104
105
|
__exportStar(require("./core-react/uistate/UiStateStorage"), exports);
|
|
105
106
|
__exportStar(require("./core-react/uistate/LocalStateStorage"), exports);
|
|
106
107
|
__exportStar(require("./core-react/utils/IconHelper"), exports);
|
|
108
|
+
const IconWebComponent_1 = require("./core-react/utils/IconWebComponent");
|
|
107
109
|
__exportStar(require("./core-react/utils/Point"), exports);
|
|
108
110
|
__exportStar(require("./core-react/utils/Props"), exports);
|
|
109
111
|
__exportStar(require("./core-react/utils/Rectangle"), exports);
|
|
@@ -134,6 +136,7 @@ __exportStar(require("./core-react/utils/hooks/useTargeted"), exports);
|
|
|
134
136
|
__exportStar(require("./core-react/utils/hooks/useWidgetOpacityContext"), exports);
|
|
135
137
|
__exportStar(require("./core-react/utils/hooks/useInterval"), exports);
|
|
136
138
|
__exportStar(require("./core-react/utils/hooks/useCrossOriginPopup"), exports);
|
|
139
|
+
(0, IconWebComponent_1.registerIconWebComponent)();
|
|
137
140
|
/** @docs-package-description
|
|
138
141
|
* The core-react package contains general purpose React components, such as Dialog, MessageBox, SearchBox, RadialMenu and SplitButton.
|
|
139
142
|
* For more information, see [learning about core-react]($docs/learning/ui/core/index.md).
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"core-react.js","sourceRoot":"","sources":["../../src/core-react.ts"],"names":[],"mappings":";AAAA;;;gGAGgG;;;;;;;;;;;;;;;;;AAEhG,gFAAgF;AAEhF,sDAAoC;AAEpC,2DAAyC;AACzC,oEAAkD;AAClD,+DAA6C;AAC7C,8DAA4C;AAE5C,wDAAsC;AACtC,wEAAsD;AACtD,6DAA2C;AAC3C,iEAA+C;AAC/C,sEAAoD;AACpD,wDA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ACxC,2DAAyC;AACzC,gEAA8C;AAC9C,qEAAmD;AACnD,4EAA0D;AAC1D,oEAAkD;AAClD,oEAAkD;AAClD,kEAAgD;AAChD,oEAAkD;AAClD,+DAA6C;AAC7C,mEAAiD;AACjD,8EAA4D;AAC5D,wEAAsD;AAEtD,yEAAuD;AACvD,8EAA4D;AAC5D,4EAA0D;AAC1D,kFAAgE;AAChE,6EAA2D;AAC3D,+EAA6D;AAC7D,wEAAsD;AACtD,mEAAiD;AACjD,uEAAqD;AACrD,6EAA2D;AAC3D,uEAAqD;AACrD,mFAAiE;AACjE,uEAAqD;AACrD,+EAA6D;AAE7D;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n * See LICENSE.md in the project root for license terms and full copyright notice.\n *--------------------------------------------------------------------------------------------*/\n\n// cSpell:ignore focustrap imagecheckbox iconinput hocs numberinput numericinput\n\nexport * from \"./core-react/UiCore\";\n\nexport * from \"./core-react/badge/Badge\";\nexport * from \"./core-react/badge/BadgeUtilities\";\nexport * from \"./core-react/badge/BetaBadge\";\nexport * from \"./core-react/badge/NewBadge\";\n\nexport * from \"./core-react/base/Div\";\nexport * from \"./core-react/base/DivWithOutsideClick\";\nexport * from \"./core-react/base/Centered\";\nexport * from \"./core-react/base/FillCentered\";\nexport * from \"./core-react/base/FlexWrapContainer\";\nexport * from \"./core-react/base/Gap\";\nexport * from \"./core-react/base/PointerEvents\";\nexport * from \"./core-react/base/ScrollView\";\n\nexport * from \"./core-react/button/UnderlinedButton\";\n\nexport * from \"./core-react/checklistbox/CheckListBox\";\n\nexport * from \"./core-react/contextmenu/ContextMenu\";\nexport * from \"./core-react/contextmenu/ContextMenuDirection\";\nexport * from \"./core-react/contextmenu/ContextMenuDivider\";\nexport * from \"./core-react/contextmenu/ContextMenuItem\";\nexport * from \"./core-react/contextmenu/ContextSubMenu\";\nexport * from \"./core-react/contextmenu/GlobalContextMenu\";\nexport * from \"./core-react/contextmenu/PopupContextMenu\";\n\nexport * from \"./core-react/dialog/Dialog\";\nexport * from \"./core-react/dialog/GlobalDialog\";\n\nexport * from \"./core-react/elementseparator/ElementSeparator\";\n\nexport * from \"./core-react/enums/Alignment\";\nexport * from \"./core-react/enums/CheckBoxState\";\nexport * from \"./core-react/enums/Orientation\";\nexport * from \"./core-react/enums/SortDirection\";\nexport * from \"./core-react/enums/TimeFormat\";\n\nexport * from \"./core-react/expandable/ExpandableList\";\n\nexport * from \"./core-react/focus/ItemKeyboardNavigator\";\nexport * from \"./core-react/focustrap/FocusTrap\";\n\nexport * from \"./core-react/hocs/withIsPressed\";\nexport * from \"./core-react/hocs/withOnOutsideClick\";\nexport * from \"./core-react/hocs/withTimeout\";\n\nexport * from \"./core-react/icons/ConditionalIconItem\";\nexport * from \"./core-react/icons/IconComponent\";\nexport * from \"./core-react/icons/SvgPath\";\nexport * from \"./core-react/icons/WebFontIcon\";\n\nexport * from \"./core-react/autosuggest/AutoSuggest\";\n\nexport * from \"./core-react/imagecheckbox/ImageCheckBox\";\n\nexport * from \"./core-react/inputs/InputLabel\";\nexport * from \"./core-react/inputs/InputStatus\";\nexport * from \"./core-react/inputs/iconinput/IconInput\";\nexport * from \"./core-react/inputs/LabeledComponentProps\";\nexport * from \"./core-react/inputs/numberinput/NumberInput\";\n\nexport * from \"./core-react/listbox/Listbox\";\n\nexport * from \"./core-react/loading/LoadingBar\";\nexport * from \"./core-react/loading/LoadingPrompt\";\nexport * from \"./core-react/loading/LoadingSpinner\";\nexport * from \"./core-react/loading/LoadingStatus\";\n\nexport * from \"./core-react/messagebox/MessageBox\";\n\nexport * from \"./core-react/notification/MessageRenderer\";\nexport * from \"./core-react/notification/MessageType\";\n\nexport * from \"./core-react/popup/Popup\";\n\nexport * from \"./core-react/radialmenu/RadialMenu\";\nexport * from \"./core-react/radialmenu/Annulus\";\n\nexport * from \"./core-react/searchbox/SearchBox\";\n\nexport * from \"./core-react/settings/SettingsManager\";\nexport * from \"./core-react/settings/SettingsContainer\";\n\nexport * from \"./core-react/tabs/VerticalTabs\";\nexport * from \"./core-react/tabs/Tabs\";\n\nexport * from \"./core-react/text/BodyText\";\nexport * from \"./core-react/text/BlockText\";\nexport * from \"./core-react/text/DisabledText\";\nexport * from \"./core-react/text/FilteredText\";\nexport * from \"./core-react/text/MutedText\";\nexport * from \"./core-react/text/StyledText\";\nexport * from \"./core-react/text/TextProps\";\n\nexport {\n ExpansionToggle,\n ExpansionToggleProps,\n} from \"./core-react/tree/ExpansionToggle\";\nexport { TreeBranch, TreeBranchProps } from \"./core-react/tree/Branch\";\nexport {\n TreeNode,\n TreeNodeProps,\n NodeCheckboxProps,\n NodeCheckboxRenderer,\n NodeCheckboxRenderProps,\n} from \"./core-react/tree/Node\";\nexport { Tree, TreeProps } from \"./core-react/tree/Tree\";\nexport {\n TreeNodePlaceholder,\n TreeNodePlaceholderProps,\n} from \"./core-react/tree/Placeholder\";\n\nexport * from \"./core-react/uistate/UiStateEntry\";\nexport * from \"./core-react/uistate/UiStateStorage\";\nexport * from \"./core-react/uistate/LocalStateStorage\";\n\nexport * from \"./core-react/utils/IconHelper\";\nexport * from \"./core-react/utils/Point\";\nexport * from \"./core-react/utils/Props\";\nexport * from \"./core-react/utils/Rectangle\";\nexport * from \"./core-react/utils/Size\";\nexport * from \"./core-react/utils/Timer\";\nexport * from \"./core-react/utils/UiGeometry\";\nexport * from \"./core-react/utils/flattenChildren\";\nexport * from \"./core-react/utils/getBestBWContrastColor\";\nexport * from \"./core-react/utils/getCssVariable\";\nexport * from \"./core-react/utils/getDisplayName\";\nexport * from \"./core-react/utils/getUserColor\";\nexport * from \"./core-react/utils/shallowDiffers\";\nexport * from \"./core-react/utils/typeUtils\";\nexport * from \"./core-react/utils/isPromiseLike\";\nexport * from \"./core-react/utils/ScrollPositionMaintainer\";\nexport * from \"./core-react/utils/getObjectClassName\";\n\nexport * from \"./core-react/utils/hooks/useDisposable\";\nexport * from \"./core-react/utils/hooks/useEffectSkipFirst\";\nexport * from \"./core-react/utils/hooks/useEventListener\";\nexport * from \"./core-react/utils/hooks/ResizeObserverPolyfill\";\nexport * from \"./core-react/utils/hooks/useOnOutsideClick\";\nexport * from \"./core-react/utils/hooks/useProximityToMouse\";\nexport * from \"./core-react/utils/hooks/useRefEffect\";\nexport * from \"./core-react/utils/hooks/useRefs\";\nexport * from \"./core-react/utils/hooks/useRefState\";\nexport * from \"./core-react/utils/hooks/useResizeObserver\";\nexport * from \"./core-react/utils/hooks/useTargeted\";\nexport * from \"./core-react/utils/hooks/useWidgetOpacityContext\";\nexport * from \"./core-react/utils/hooks/useInterval\";\nexport * from \"./core-react/utils/hooks/useCrossOriginPopup\";\n\n/** @docs-package-description\n * The core-react package contains general purpose React components, such as Dialog, MessageBox, SearchBox, RadialMenu and SplitButton.\n * For more information, see [learning about core-react]($docs/learning/ui/core/index.md).\n */\n/**\n * @docs-group-description AutoSuggest\n * Component for input with an auto-suggestion dropdown.\n */\n/**\n * @docs-group-description Base\n * Low-level classes and components for building application UI.\n */\n/**\n * @docs-group-description Button\n * Components for working with various Buttons.\n */\n/**\n * @docs-group-description Checkbox\n * Component is a wrapper for the `<input type=\"checkbox\">` HTML element.\n */\n/**\n * @docs-group-description CheckListBox\n * Components for working with a Check listbox.\n */\n/**\n * @docs-group-description Common\n * Common classes and enums used across various UI components.\n */\n/**\n * @docs-group-description ContextMenu\n * Components for working with a Context Menu.\n */\n/**\n * @docs-group-description Dialog\n * Components for working with a Dialog or MessageBox.\n */\n/**\n * @docs-group-description ElementSeparator\n * Components for working with a ElementSeparator.\n */\n/**\n * @docs-group-description Expandable\n * Components for working with a ExpandableBlock or ExpandableList.\n */\n/**\n * @docs-group-description Form\n * Components used to create a Form using supplied properties to specify fields.\n */\n/**\n * @docs-group-description Icon\n * Component that renders core-react icon when given an icon name or SVG source.\n */\n/**\n * @docs-group-description Inputs\n * Components for working with input controls, such as Input, IconInput and NumberInput.\n */\n/**\n * @docs-group-description Loading\n * Components for working with Loading spinners and progress indicators and bars.\n */\n/**\n * @docs-group-description Notification\n * Components for working with messages and tooltips.\n */\n/**\n * @docs-group-description Popup\n * Components for working with a Popup.\n */\n/**\n * @docs-group-description RadialMenu\n * Components for working with a RadialMenu.\n */\n/**\n * @docs-group-description Radio\n * Component is a wrapper for the `<input type=\"radio\">` HTML element.\n */\n/**\n * @docs-group-description SearchBox\n * Components for working with a SearchBox.\n */\n/**\n * @docs-group-description Select\n * Component is a wrapper for the `<select>` HTML element.\n */\n/**\n * @docs-group-description Settings\n * Manager and UI Components that allow users to modify settings for different packages and extensions.\n */\n/**\n * @docs-group-description Slider\n * Component displays a range slider with thumbs for changing the value.\n */\n/**\n * @docs-group-description SplitButton\n * Components for working with a SplitButton.\n */\n/**\n * @docs-group-description Tabs\n * Components for working with horizontal or vertical tabs.\n */\n/**\n * @docs-group-description Text\n * Components for working with styled text.\n */\n/**\n * @docs-group-description Tiles\n * Components for a container rendering elements that can be grouped together.\n */\n/**\n * @docs-group-description Toggle\n * Components for working with a Toggle switch.\n */\n/**\n * @docs-group-description Tooltip\n * Components for working with a Tooltip.\n */\n/**\n * @docs-group-description Tree\n * Presentation React components for working with a Tree.\n */\n/**\n * @docs-group-description UiStateStorage\n * Interfaces and classes for working with persistent UI settings.\n */\n/**\n * @docs-group-description Utilities\n * Various utility classes, functions and React hooks for working with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C7C,8DAA4C;AAE5C,qEAG2C;AAFzC,kHAAA,eAAe,OAAA;AAGjB,mDAAuE;AAA9D,oGAAA,UAAU,OAAA;AACnB,+CAMgC;AAL9B,gGAAA,QAAQ,OAAA;AAMV,+CAAyD;AAAhD,4FAAA,IAAI,OAAA;AACb,6DAGuC;AAFrC,kHAAA,mBAAmB,OAAA;AAIrB,oEAAkD;AAClD,sEAAoD;AACpD,yEAAuD;AAEvD,gEAA8C;AAC9C,0EAA+E;AAC/E,2DAAyC;AACzC,2DAAyC;AACzC,+DAA6C;AAC7C,0DAAwC;AACxC,2DAAyC;AACzC,gEAA8C;AAC9C,qEAAmD;AACnD,4EAA0D;AAC1D,oEAAkD;AAClD,oEAAkD;AAClD,kEAAgD;AAChD,oEAAkD;AAClD,+DAA6C;AAC7C,mEAAiD;AACjD,8EAA4D;AAC5D,wEAAsD;AAEtD,yEAAuD;AACvD,8EAA4D;AAC5D,4EAA0D;AAC1D,kFAAgE;AAChE,6EAA2D;AAC3D,+EAA6D;AAC7D,wEAAsD;AACtD,mEAAiD;AACjD,uEAAqD;AACrD,6EAA2D;AAC3D,uEAAqD;AACrD,mFAAiE;AACjE,uEAAqD;AACrD,+EAA6D;AAE7D,IAAA,2CAAwB,GAAE,CAAC;AAE3B;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n * See LICENSE.md in the project root for license terms and full copyright notice.\n *--------------------------------------------------------------------------------------------*/\nexport * from \"./core-react/UiCore\";\n\nexport * from \"./core-react/badge/Badge\";\nexport * from \"./core-react/badge/BadgeType\";\n\nexport * from \"./core-react/base/Div\";\nexport * from \"./core-react/base/DivWithOutsideClick\";\nexport * from \"./core-react/base/Centered\";\nexport * from \"./core-react/base/FillCentered\";\nexport * from \"./core-react/base/FlexWrapContainer\";\nexport * from \"./core-react/base/Gap\";\nexport * from \"./core-react/base/PointerEvents\";\nexport * from \"./core-react/base/ScrollView\";\n\nexport * from \"./core-react/button/UnderlinedButton\";\n\nexport * from \"./core-react/checklistbox/CheckListBox\";\n\nexport * from \"./core-react/contextmenu/ContextMenu\";\nexport * from \"./core-react/contextmenu/ContextMenuDirection\";\nexport * from \"./core-react/contextmenu/ContextMenuDivider\";\nexport * from \"./core-react/contextmenu/ContextMenuItem\";\nexport * from \"./core-react/contextmenu/ContextSubMenu\";\nexport * from \"./core-react/contextmenu/GlobalContextMenu\";\nexport * from \"./core-react/contextmenu/PopupContextMenu\";\n\nexport * from \"./core-react/dialog/Dialog\";\nexport * from \"./core-react/dialog/GlobalDialog\";\n\nexport * from \"./core-react/elementseparator/ElementSeparator\";\n\nexport * from \"./core-react/enums/Alignment\";\nexport * from \"./core-react/enums/CheckBoxState\";\nexport * from \"./core-react/enums/Orientation\";\nexport * from \"./core-react/enums/SortDirection\";\nexport * from \"./core-react/enums/TimeFormat\";\n\nexport * from \"./core-react/expandable/ExpandableList\";\n\nexport * from \"./core-react/focus/ItemKeyboardNavigator\";\nexport * from \"./core-react/focustrap/FocusTrap\";\n\nexport * from \"./core-react/hocs/withIsPressed\";\nexport * from \"./core-react/hocs/withOnOutsideClick\";\nexport * from \"./core-react/hocs/withTimeout\";\n\nexport { LocalizationProvider } from \"./core-react/l10n/LocalizationProvider\";\nexport { usePackageTranslation } from \"./core-react/l10n/usePackageTranslation\";\n\nexport * from \"./core-react/icons/ConditionalIconItem\";\nexport * from \"./core-react/icons/IconComponent\";\nexport * from \"./core-react/icons/SvgPath\";\nexport * from \"./core-react/icons/WebFontIcon\";\n\nexport * from \"./core-react/autosuggest/AutoSuggest\";\n\nexport * from \"./core-react/imagecheckbox/ImageCheckBox\";\n\nexport * from \"./core-react/inputs/InputLabel\";\nexport * from \"./core-react/inputs/InputStatus\";\nexport * from \"./core-react/inputs/iconinput/IconInput\";\nexport * from \"./core-react/inputs/LabeledComponentProps\";\nexport * from \"./core-react/inputs/numberinput/NumberInput\";\n\nexport * from \"./core-react/listbox/Listbox\";\n\nexport * from \"./core-react/loading/LoadingBar\";\nexport * from \"./core-react/loading/LoadingPrompt\";\nexport * from \"./core-react/loading/LoadingSpinner\";\nexport * from \"./core-react/loading/LoadingStatus\";\n\nexport * from \"./core-react/messagebox/MessageBox\";\n\nexport * from \"./core-react/notification/MessageRenderer\";\nexport * from \"./core-react/notification/MessageType\";\n\nexport * from \"./core-react/popup/Popup\";\n\nexport * from \"./core-react/radialmenu/RadialMenu\";\nexport * from \"./core-react/radialmenu/Annulus\";\n\nexport * from \"./core-react/searchbox/SearchBox\";\n\nexport * from \"./core-react/settings/SettingsManager\";\nexport * from \"./core-react/settings/SettingsContainer\";\n\nexport * from \"./core-react/tabs/VerticalTabs\";\nexport * from \"./core-react/tabs/Tabs\";\n\nexport * from \"./core-react/text/BodyText\";\nexport * from \"./core-react/text/BlockText\";\nexport * from \"./core-react/text/DisabledText\";\nexport * from \"./core-react/text/FilteredText\";\nexport * from \"./core-react/text/MutedText\";\nexport * from \"./core-react/text/StyledText\";\nexport * from \"./core-react/text/TextProps\";\n\nexport {\n ExpansionToggle,\n ExpansionToggleProps,\n} from \"./core-react/tree/ExpansionToggle\";\nexport { TreeBranch, TreeBranchProps } from \"./core-react/tree/Branch\";\nexport {\n TreeNode,\n TreeNodeProps,\n NodeCheckboxProps,\n NodeCheckboxRenderer,\n NodeCheckboxRenderProps,\n} from \"./core-react/tree/Node\";\nexport { Tree, TreeProps } from \"./core-react/tree/Tree\";\nexport {\n TreeNodePlaceholder,\n TreeNodePlaceholderProps,\n} from \"./core-react/tree/Placeholder\";\n\nexport * from \"./core-react/uistate/UiStateEntry\";\nexport * from \"./core-react/uistate/UiStateStorage\";\nexport * from \"./core-react/uistate/LocalStateStorage\";\n\nexport * from \"./core-react/utils/IconHelper\";\nimport { registerIconWebComponent } from \"./core-react/utils/IconWebComponent\";\nexport * from \"./core-react/utils/Point\";\nexport * from \"./core-react/utils/Props\";\nexport * from \"./core-react/utils/Rectangle\";\nexport * from \"./core-react/utils/Size\";\nexport * from \"./core-react/utils/Timer\";\nexport * from \"./core-react/utils/UiGeometry\";\nexport * from \"./core-react/utils/flattenChildren\";\nexport * from \"./core-react/utils/getBestBWContrastColor\";\nexport * from \"./core-react/utils/getCssVariable\";\nexport * from \"./core-react/utils/getDisplayName\";\nexport * from \"./core-react/utils/getUserColor\";\nexport * from \"./core-react/utils/shallowDiffers\";\nexport * from \"./core-react/utils/typeUtils\";\nexport * from \"./core-react/utils/isPromiseLike\";\nexport * from \"./core-react/utils/ScrollPositionMaintainer\";\nexport * from \"./core-react/utils/getObjectClassName\";\n\nexport * from \"./core-react/utils/hooks/useDisposable\";\nexport * from \"./core-react/utils/hooks/useEffectSkipFirst\";\nexport * from \"./core-react/utils/hooks/useEventListener\";\nexport * from \"./core-react/utils/hooks/ResizeObserverPolyfill\";\nexport * from \"./core-react/utils/hooks/useOnOutsideClick\";\nexport * from \"./core-react/utils/hooks/useProximityToMouse\";\nexport * from \"./core-react/utils/hooks/useRefEffect\";\nexport * from \"./core-react/utils/hooks/useRefs\";\nexport * from \"./core-react/utils/hooks/useRefState\";\nexport * from \"./core-react/utils/hooks/useResizeObserver\";\nexport * from \"./core-react/utils/hooks/useTargeted\";\nexport * from \"./core-react/utils/hooks/useWidgetOpacityContext\";\nexport * from \"./core-react/utils/hooks/useInterval\";\nexport * from \"./core-react/utils/hooks/useCrossOriginPopup\";\n\nregisterIconWebComponent();\n\n/** @docs-package-description\n * The core-react package contains general purpose React components, such as Dialog, MessageBox, SearchBox, RadialMenu and SplitButton.\n * For more information, see [learning about core-react]($docs/learning/ui/core/index.md).\n */\n/**\n * @docs-group-description AutoSuggest\n * Component for input with an auto-suggestion dropdown.\n */\n/**\n * @docs-group-description Base\n * Low-level classes and components for building application UI.\n */\n/**\n * @docs-group-description Button\n * Components for working with various Buttons.\n */\n/**\n * @docs-group-description Checkbox\n * Component is a wrapper for the `<input type=\"checkbox\">` HTML element.\n */\n/**\n * @docs-group-description CheckListBox\n * Components for working with a Check listbox.\n */\n/**\n * @docs-group-description Common\n * Common classes and enums used across various UI components.\n */\n/**\n * @docs-group-description ContextMenu\n * Components for working with a Context Menu.\n */\n/**\n * @docs-group-description Dialog\n * Components for working with a Dialog or MessageBox.\n */\n/**\n * @docs-group-description ElementSeparator\n * Components for working with a ElementSeparator.\n */\n/**\n * @docs-group-description Expandable\n * Components for working with a ExpandableBlock or ExpandableList.\n */\n/**\n * @docs-group-description Form\n * Components used to create a Form using supplied properties to specify fields.\n */\n/**\n * @docs-group-description Icon\n * Component that renders core-react icon when given an icon name or SVG source.\n */\n/**\n * @docs-group-description Inputs\n * Components for working with input controls, such as Input, IconInput and NumberInput.\n */\n/**\n * @docs-group-description Loading\n * Components for working with Loading spinners and progress indicators and bars.\n */\n/**\n * @docs-group-description Notification\n * Components for working with messages and tooltips.\n */\n/**\n * @docs-group-description Popup\n * Components for working with a Popup.\n */\n/**\n * @docs-group-description RadialMenu\n * Components for working with a RadialMenu.\n */\n/**\n * @docs-group-description Radio\n * Component is a wrapper for the `<input type=\"radio\">` HTML element.\n */\n/**\n * @docs-group-description SearchBox\n * Components for working with a SearchBox.\n */\n/**\n * @docs-group-description Select\n * Component is a wrapper for the `<select>` HTML element.\n */\n/**\n * @docs-group-description Settings\n * Manager and UI Components that allow users to modify settings for different packages and extensions.\n */\n/**\n * @docs-group-description Slider\n * Component displays a range slider with thumbs for changing the value.\n */\n/**\n * @docs-group-description SplitButton\n * Components for working with a SplitButton.\n */\n/**\n * @docs-group-description Tabs\n * Components for working with horizontal or vertical tabs.\n */\n/**\n * @docs-group-description Text\n * Components for working with styled text.\n */\n/**\n * @docs-group-description Tiles\n * Components for a container rendering elements that can be grouped together.\n */\n/**\n * @docs-group-description Toggle\n * Components for working with a Toggle switch.\n */\n/**\n * @docs-group-description Tooltip\n * Components for working with a Tooltip.\n */\n/**\n * @docs-group-description Tree\n * Presentation React components for working with a Tree.\n */\n/**\n * @docs-group-description UiStateStorage\n * Interfaces and classes for working with persistent UI settings.\n */\n/**\n * @docs-group-description Utilities\n * Various utility classes, functions and React hooks for working with a UI.\n */\n"]}
|
|
@@ -7,8 +7,7 @@ import "./colorvariables.scss";
|
|
|
7
7
|
import "./layout-variables.scss";
|
|
8
8
|
import "./classes.scss";
|
|
9
9
|
import type { Localization } from "@itwin/core-common";
|
|
10
|
-
/**
|
|
11
|
-
* Manages the Localization service for the core-react package.
|
|
10
|
+
/** Manages the Localization service for the core-react package.
|
|
12
11
|
* @public
|
|
13
12
|
*/
|
|
14
13
|
export declare class UiCore {
|
|
@@ -23,13 +22,10 @@ export declare class UiCore {
|
|
|
23
22
|
static terminate(): void;
|
|
24
23
|
/** Determines if UiCore has been initialized */
|
|
25
24
|
static get initialized(): boolean;
|
|
26
|
-
/** The internationalization service created by the host application.
|
|
27
|
-
* @internal
|
|
28
|
-
*/
|
|
29
|
-
static get localization(): Localization;
|
|
30
25
|
/** The internationalization service namespace. */
|
|
31
26
|
static get localizationNamespace(): string;
|
|
32
27
|
/** Calls localization.getLocalizedString with the "UiCore" namespace. Do NOT include the namespace in the key.
|
|
28
|
+
* @deprecated in 4.12.x. Do not use this internally, this is replaced by `useTranslation`.
|
|
33
29
|
* @internal
|
|
34
30
|
*/
|
|
35
31
|
static translate(key: string | string[]): string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"UiCore.d.ts","sourceRoot":"","sources":["../../../src/core-react/UiCore.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH,4EAA4E;AAC5E,OAAO,oBAAoB,CAAC;AAC5B,OAAO,uBAAuB,CAAC;AAC/B,OAAO,yBAAyB,CAAC;AACjC,OAAO,gBAAgB,CAAC;AAGxB,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;
|
|
1
|
+
{"version":3,"file":"UiCore.d.ts","sourceRoot":"","sources":["../../../src/core-react/UiCore.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH,4EAA4E;AAC5E,OAAO,oBAAoB,CAAC;AAC5B,OAAO,uBAAuB,CAAC;AAC/B,OAAO,yBAAyB,CAAC;AACjC,OAAO,gBAAgB,CAAC;AAGxB,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAGvD;;GAEG;AACH,qBAAa,MAAM;IACjB,OAAO,CAAC,MAAM,CAAC,YAAY,CAAS;IACpC,OAAO,CAAC,MAAM,CAAC,aAAa,CAAC,CAAe;IAE5C;;;OAGG;WACiB,UAAU,CAAC,YAAY,EAAE,YAAY,GAAG,OAAO,CAAC,IAAI,CAAC;IAezE,oDAAoD;WACtC,SAAS;IAQvB,gDAAgD;IAChD,WAAkB,WAAW,IAAI,OAAO,CAEvC;IAED,kDAAkD;IAClD,WAAkB,qBAAqB,IAAI,MAAM,CAEhD;IAED;;;OAGG;WACW,SAAS,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,EAAE,GAAG,MAAM;IAavD,gBAAgB;IAChB,WAAkB,WAAW,IAAI,MAAM,CAEtC;IAED,gBAAgB;WACF,cAAc,CAAC,GAAG,EAAE,GAAG,GAAG,MAAM;CAK/C"}
|
|
@@ -11,12 +11,8 @@ import "./colorvariables.scss";
|
|
|
11
11
|
import "./layout-variables.scss";
|
|
12
12
|
import "./classes.scss";
|
|
13
13
|
import { Logger } from "@itwin/core-bentley";
|
|
14
|
-
import { UiError } from "@itwin/appui-abstract";
|
|
15
|
-
import { IconWebComponent } from "./utils/IconWebComponent";
|
|
16
14
|
import { getObjectClassName } from "./utils/getObjectClassName";
|
|
17
|
-
|
|
18
|
-
/**
|
|
19
|
-
* Manages the Localization service for the core-react package.
|
|
15
|
+
/** Manages the Localization service for the core-react package.
|
|
20
16
|
* @public
|
|
21
17
|
*/
|
|
22
18
|
class UiCore {
|
|
@@ -31,8 +27,6 @@ class UiCore {
|
|
|
31
27
|
}
|
|
32
28
|
UiCore._localization = localization;
|
|
33
29
|
await UiCore._localization.registerNamespace(UiCore.localizationNamespace);
|
|
34
|
-
if (window.customElements.get("svg-loader") === undefined)
|
|
35
|
-
window.customElements.define("svg-loader", IconWebComponent);
|
|
36
30
|
UiCore._initialized = true;
|
|
37
31
|
}
|
|
38
32
|
/** Unregisters the UiCore localization namespace */
|
|
@@ -46,22 +40,12 @@ class UiCore {
|
|
|
46
40
|
static get initialized() {
|
|
47
41
|
return UiCore._initialized;
|
|
48
42
|
}
|
|
49
|
-
/** The internationalization service created by the host application.
|
|
50
|
-
* @internal
|
|
51
|
-
*/
|
|
52
|
-
static get localization() {
|
|
53
|
-
// istanbul ignore else
|
|
54
|
-
if (!UiCore._localization)
|
|
55
|
-
// eslint-disable-next-line deprecation/deprecation
|
|
56
|
-
throw new UiError(UiCore.loggerCategory(this), "localization: UiCore.initialize has not been called. Unable to return Localization object.");
|
|
57
|
-
// istanbul ignore next
|
|
58
|
-
return UiCore._localization;
|
|
59
|
-
}
|
|
60
43
|
/** The internationalization service namespace. */
|
|
61
44
|
static get localizationNamespace() {
|
|
62
45
|
return "UiCore";
|
|
63
46
|
}
|
|
64
47
|
/** Calls localization.getLocalizedString with the "UiCore" namespace. Do NOT include the namespace in the key.
|
|
48
|
+
* @deprecated in 4.12.x. Do not use this internally, this is replaced by `useTranslation`.
|
|
65
49
|
* @internal
|
|
66
50
|
*/
|
|
67
51
|
static translate(key) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"UiCore.js","sourceRoot":"","sources":["../../../src/core-react/UiCore.ts"],"names":[],"mappings":"AAAA;;;gGAGgG;AAChG;;GAEG;AAEH,4EAA4E;AAC5E,OAAO,oBAAoB,CAAC;AAC5B,OAAO,uBAAuB,CAAC;AAC/B,OAAO,yBAAyB,CAAC;AACjC,OAAO,gBAAgB,CAAC;AAExB,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAE7C,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"UiCore.js","sourceRoot":"","sources":["../../../src/core-react/UiCore.ts"],"names":[],"mappings":"AAAA;;;gGAGgG;AAChG;;GAEG;AAEH,4EAA4E;AAC5E,OAAO,oBAAoB,CAAC;AAC5B,OAAO,uBAAuB,CAAC;AAC/B,OAAO,yBAAyB,CAAC;AACjC,OAAO,gBAAgB,CAAC;AAExB,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAE7C,OAAO,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAC;AAEhE;;GAEG;AACH,MAAa,MAAM;IAIjB;;;OAGG;IACI,MAAM,CAAC,KAAK,CAAC,UAAU,CAAC,YAA0B;QACvD,IAAI,MAAM,CAAC,YAAY,EAAE;YACvB,MAAM,CAAC,OAAO,CACZ,MAAM,CAAC,cAAc,CAAC,MAAM,CAAC,EAC7B,kCAAkC,CACnC,CAAC;YACF,OAAO;SACR;QAED,MAAM,CAAC,aAAa,GAAG,YAAY,CAAC;QACpC,MAAM,MAAM,CAAC,aAAa,CAAC,iBAAiB,CAAC,MAAM,CAAC,qBAAqB,CAAC,CAAC;QAE3E,MAAM,CAAC,YAAY,GAAG,IAAI,CAAC;IAC7B,CAAC;IAED,oDAAoD;IAC7C,MAAM,CAAC,SAAS;QACrB,IAAI,MAAM,CAAC,aAAa;YACtB,MAAM,CAAC,aAAa,CAAC,mBAAmB,CAAC,MAAM,CAAC,qBAAqB,CAAC,CAAC;QACzE,MAAM,CAAC,aAAa,GAAG,SAAS,CAAC;QAEjC,MAAM,CAAC,YAAY,GAAG,KAAK,CAAC;IAC9B,CAAC;IAED,gDAAgD;IACzC,MAAM,KAAK,WAAW;QAC3B,OAAO,MAAM,CAAC,YAAY,CAAC;IAC7B,CAAC;IAED,kDAAkD;IAC3C,MAAM,KAAK,qBAAqB;QACrC,OAAO,QAAQ,CAAC;IAClB,CAAC;IAED;;;OAGG;IACI,MAAM,CAAC,SAAS,CAAC,GAAsB;QAC5C,IAAI,CAAC,MAAM,CAAC,aAAa,EAAE;YACzB,MAAM,CAAC,QAAQ,CACb,MAAM,CAAC,cAAc,CAAC,IAAI,CAAC,EAC3B,4FAA4F,CAC7F,CAAC;YACF,OAAO,EAAE,CAAC;SACX;QACD,OAAO,MAAM,CAAC,aAAa,CAAC,kBAAkB,CAC5C,GAAG,MAAM,CAAC,qBAAqB,IAAI,GAAG,EAAE,CACzC,CAAC;IACJ,CAAC;IAED,gBAAgB;IACT,MAAM,KAAK,WAAW;QAC3B,OAAO,YAAY,CAAC;IACtB,CAAC;IAED,gBAAgB;IACT,MAAM,CAAC,cAAc,CAAC,GAAQ;QACnC,MAAM,SAAS,GAAG,kBAAkB,CAAC,GAAG,CAAC,CAAC;QAC1C,MAAM,QAAQ,GAAG,MAAM,CAAC,WAAW,GAAG,CAAC,SAAS,CAAC,CAAC,CAAC,IAAI,SAAS,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC;QACzE,OAAO,QAAQ,CAAC;IAClB,CAAC;;AApEc,mBAAY,GAAG,KAAK,CAAC;SADzB,MAAM","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n * See LICENSE.md in the project root for license terms and full copyright notice.\n *--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module Utilities\n */\n\n/** Import color variables, layout variables and Sass classes barrel file */\nimport \"./colorthemes.scss\";\nimport \"./colorvariables.scss\";\nimport \"./layout-variables.scss\";\nimport \"./classes.scss\";\n\nimport { Logger } from \"@itwin/core-bentley\";\nimport type { Localization } from \"@itwin/core-common\";\nimport { getObjectClassName } from \"./utils/getObjectClassName\";\n\n/** Manages the Localization service for the core-react package.\n * @public\n */\nexport class UiCore {\n private static _initialized = false;\n private static _localization?: Localization;\n\n /**\n * Registers the Localization service namespace for UiCore.\n * @param localization The internationalization service created by the host application.\n */\n public static async initialize(localization: Localization): Promise<void> {\n if (UiCore._initialized) {\n Logger.logInfo(\n UiCore.loggerCategory(UiCore),\n `UiCore.initialize already called`\n );\n return;\n }\n\n UiCore._localization = localization;\n await UiCore._localization.registerNamespace(UiCore.localizationNamespace);\n\n UiCore._initialized = true;\n }\n\n /** Unregisters the UiCore localization namespace */\n public static terminate() {\n if (UiCore._localization)\n UiCore._localization.unregisterNamespace(UiCore.localizationNamespace);\n UiCore._localization = undefined;\n\n UiCore._initialized = false;\n }\n\n /** Determines if UiCore has been initialized */\n public static get initialized(): boolean {\n return UiCore._initialized;\n }\n\n /** The internationalization service namespace. */\n public static get localizationNamespace(): string {\n return \"UiCore\";\n }\n\n /** Calls localization.getLocalizedString with the \"UiCore\" namespace. Do NOT include the namespace in the key.\n * @deprecated in 4.12.x. Do not use this internally, this is replaced by `useTranslation`.\n * @internal\n */\n public static translate(key: string | string[]): string {\n if (!UiCore._localization) {\n Logger.logError(\n UiCore.loggerCategory(this),\n `translate: UiCore must be initialize with a localization provider. Returning blank string.`\n );\n return \"\";\n }\n return UiCore._localization.getLocalizedString(\n `${UiCore.localizationNamespace}:${key}`\n );\n }\n\n /** @internal */\n public static get packageName(): string {\n return \"core-react\";\n }\n\n /** @internal */\n public static loggerCategory(obj: any): string {\n const className = getObjectClassName(obj);\n const category = UiCore.packageName + (className ? `.${className}` : \"\");\n return category;\n }\n}\n"]}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
{
|
|
2
|
+
"form": {
|
|
3
|
+
"submitButtonLabel": "Submit",
|
|
4
|
+
"errorPrefix": "Error:",
|
|
5
|
+
"errorSuffix": "Please review input and try again."
|
|
6
|
+
},
|
|
7
|
+
"general": {
|
|
8
|
+
"search": "Search",
|
|
9
|
+
"clear": "Clear"
|
|
10
|
+
},
|
|
11
|
+
"dialog": {
|
|
12
|
+
"ok": "OK",
|
|
13
|
+
"retry": "Retry",
|
|
14
|
+
"yes": "Yes",
|
|
15
|
+
"no": "No",
|
|
16
|
+
"cancel": "Cancel",
|
|
17
|
+
"close": "Close",
|
|
18
|
+
"next": "Next",
|
|
19
|
+
"previous": "Previous"
|
|
20
|
+
},
|
|
21
|
+
"reactselect": {
|
|
22
|
+
"noSelectOption": "Option not found"
|
|
23
|
+
},
|
|
24
|
+
"tree": {
|
|
25
|
+
"expand": "Expand",
|
|
26
|
+
"collapse": "Collapse"
|
|
27
|
+
},
|
|
28
|
+
"elementSeparator": {
|
|
29
|
+
"label": "Resizer"
|
|
30
|
+
}
|
|
31
|
+
}
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
*/
|
|
4
4
|
import "./AutoSuggest.scss";
|
|
5
5
|
import * as React from "react";
|
|
6
|
-
import
|
|
6
|
+
import ReactAutosuggest from "react-autosuggest";
|
|
7
7
|
import type { CommonProps } from "../utils/Props";
|
|
8
8
|
/** Data for the [[AutoSuggest]] options
|
|
9
9
|
* @public
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AutoSuggest.d.ts","sourceRoot":"","sources":["../../../../src/core-react/autosuggest/AutoSuggest.tsx"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,oBAAoB,CAAC;AAC5B,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B,OAAO,
|
|
1
|
+
{"version":3,"file":"AutoSuggest.d.ts","sourceRoot":"","sources":["../../../../src/core-react/autosuggest/AutoSuggest.tsx"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,oBAAoB,CAAC;AAC5B,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B,OAAO,gBAAgB,MAAM,mBAAmB,CAAC;AAEjD,OAAO,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";
|
|
10
10
|
import { Logger } from "@itwin/core-bentley";
|
|
11
11
|
import { Input } from "@itwin/itwinui-react";
|
|
12
|
-
import
|
|
12
|
+
import ReactAutosuggest from "react-autosuggest";
|
|
13
13
|
import { Key } from "ts-key-enum";
|
|
14
14
|
import { UiCore } from "../UiCore";
|
|
15
15
|
/** Auto Suggest React component. Uses the react-autosuggest component internally.
|