@itwin/core-react 4.0.0-dev.12 → 4.0.0-dev.14
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 +116 -1
- package/ContributeGuidelines.md +17 -14
- package/README.md +2 -2
- package/lib/cjs/core-react/UiCore.d.ts +40 -40
- package/lib/cjs/core-react/UiCore.js +85 -85
- package/lib/cjs/core-react/UiCore.js.map +1 -1
- package/lib/cjs/core-react/autosuggest/AutoSuggest.d.ts +96 -96
- package/lib/cjs/core-react/autosuggest/AutoSuggest.d.ts.map +1 -1
- package/lib/cjs/core-react/autosuggest/AutoSuggest.js +174 -174
- package/lib/cjs/core-react/autosuggest/AutoSuggest.scss +1 -2
- package/lib/cjs/core-react/badge/Badge.d.ts +18 -18
- package/lib/cjs/core-react/badge/Badge.js +26 -26
- package/lib/cjs/core-react/badge/BadgeUtilities.d.ts +12 -12
- package/lib/cjs/core-react/badge/BadgeUtilities.js +38 -38
- package/lib/cjs/core-react/badge/BetaBadge.d.ts +9 -9
- package/lib/cjs/core-react/badge/BetaBadge.js +22 -22
- package/lib/cjs/core-react/badge/NewBadge.d.ts +10 -10
- package/lib/cjs/core-react/badge/NewBadge.js +23 -23
- package/lib/cjs/core-react/base/Centered.d.ts +10 -10
- package/lib/cjs/core-react/base/Centered.js +20 -20
- package/lib/cjs/core-react/base/Div.d.ts +16 -16
- package/lib/cjs/core-react/base/Div.js +20 -20
- package/lib/cjs/core-react/base/DivWithOutsideClick.d.ts +79 -79
- package/lib/cjs/core-react/base/DivWithOutsideClick.js +16 -16
- package/lib/cjs/core-react/base/FillCentered.d.ts +10 -10
- package/lib/cjs/core-react/base/FillCentered.js +20 -20
- package/lib/cjs/core-react/base/FlexWrapContainer.d.ts +11 -11
- package/lib/cjs/core-react/base/FlexWrapContainer.js +21 -21
- package/lib/cjs/core-react/base/Gap.d.ts +15 -15
- package/lib/cjs/core-react/base/Gap.js +20 -20
- package/lib/cjs/core-react/base/Gap.js.map +1 -1
- package/lib/cjs/core-react/base/PointerEvents.d.ts +7 -7
- package/lib/cjs/core-react/base/PointerEvents.js +17 -17
- package/lib/cjs/core-react/base/ScrollView.d.ts +11 -11
- package/lib/cjs/core-react/base/ScrollView.js +21 -21
- package/lib/cjs/core-react/button/UnderlinedButton.d.ts +24 -24
- package/lib/cjs/core-react/button/UnderlinedButton.js +35 -35
- package/lib/cjs/core-react/checklistbox/CheckListBox.d.ts +40 -40
- package/lib/cjs/core-react/checklistbox/CheckListBox.js +42 -42
- package/lib/cjs/core-react/checklistbox/CheckListBox.scss +0 -1
- package/lib/cjs/core-react/classes.scss +0 -2
- package/lib/cjs/core-react/contextmenu/ContextMenu.d.ts +93 -93
- package/lib/cjs/core-react/contextmenu/ContextMenu.d.ts.map +1 -1
- package/lib/cjs/core-react/contextmenu/ContextMenu.js +363 -364
- package/lib/cjs/core-react/contextmenu/ContextMenu.js.map +1 -1
- package/lib/cjs/core-react/contextmenu/ContextMenuDirection.d.ts +18 -18
- package/lib/cjs/core-react/contextmenu/ContextMenuDirection.js +26 -26
- package/lib/cjs/core-react/contextmenu/ContextMenuDivider.d.ts +12 -12
- package/lib/cjs/core-react/contextmenu/ContextMenuDivider.js +23 -23
- package/lib/cjs/core-react/contextmenu/ContextMenuItem.d.ts +61 -61
- package/lib/cjs/core-react/contextmenu/ContextMenuItem.js +108 -108
- package/lib/cjs/core-react/contextmenu/ContextMenuItem.js.map +1 -1
- package/lib/cjs/core-react/contextmenu/ContextSubMenu.d.ts +51 -51
- package/lib/cjs/core-react/contextmenu/ContextSubMenu.d.ts.map +1 -1
- package/lib/cjs/core-react/contextmenu/ContextSubMenu.js +162 -162
- package/lib/cjs/core-react/contextmenu/ContextSubMenu.js.map +1 -1
- package/lib/cjs/core-react/contextmenu/GlobalContextMenu.d.ts +34 -34
- package/lib/cjs/core-react/contextmenu/GlobalContextMenu.js +61 -63
- package/lib/cjs/core-react/contextmenu/GlobalContextMenu.js.map +1 -1
- package/lib/cjs/core-react/contextmenu/PopupContextMenu.d.ts +53 -53
- package/lib/cjs/core-react/contextmenu/PopupContextMenu.js +55 -55
- package/lib/cjs/core-react/contextmenu/TildeFinder.d.ts +18 -18
- package/lib/cjs/core-react/contextmenu/TildeFinder.js +70 -70
- package/lib/cjs/core-react/contextmenu/TildeFinder.js.map +1 -1
- package/lib/cjs/core-react/dialog/Dialog.d.ts +132 -132
- package/lib/cjs/core-react/dialog/Dialog.js +374 -375
- package/lib/cjs/core-react/dialog/Dialog.js.map +1 -1
- package/lib/cjs/core-react/dialog/GlobalDialog.d.ts +28 -28
- package/lib/cjs/core-react/dialog/GlobalDialog.js +52 -53
- package/lib/cjs/core-react/dialog/GlobalDialog.js.map +1 -1
- package/lib/cjs/core-react/elementseparator/ElementSeparator.d.ts +41 -41
- package/lib/cjs/core-react/elementseparator/ElementSeparator.js +163 -163
- package/lib/cjs/core-react/elementseparator/ElementSeparator.js.map +1 -1
- package/lib/cjs/core-react/enums/Alignment.d.ts +22 -22
- package/lib/cjs/core-react/enums/Alignment.js +31 -31
- package/lib/cjs/core-react/enums/CheckBoxState.d.ts +20 -20
- package/lib/cjs/core-react/enums/CheckBoxState.js +19 -19
- package/lib/cjs/core-react/enums/Orientation.d.ts +11 -11
- package/lib/cjs/core-react/enums/Orientation.js +19 -19
- package/lib/cjs/core-react/enums/SortDirection.d.ts +12 -12
- package/lib/cjs/core-react/enums/SortDirection.js +20 -20
- package/lib/cjs/core-react/enums/TimeFormat.d.ts +14 -14
- package/lib/cjs/core-react/enums/TimeFormat.js +22 -22
- package/lib/cjs/core-react/expandable/ExpandableList.d.ts +37 -37
- package/lib/cjs/core-react/expandable/ExpandableList.js +57 -57
- package/lib/cjs/core-react/expandable/ExpandableList.js.map +1 -1
- package/lib/cjs/core-react/focus/ItemKeyboardNavigator.d.ts +53 -53
- package/lib/cjs/core-react/focus/ItemKeyboardNavigator.d.ts.map +1 -1
- package/lib/cjs/core-react/focus/ItemKeyboardNavigator.js +150 -150
- package/lib/cjs/core-react/focustrap/FocusTrap.d.ts +28 -28
- package/lib/cjs/core-react/focustrap/FocusTrap.js +196 -196
- package/lib/cjs/core-react/hocs/withIsPressed.d.ts +77 -77
- package/lib/cjs/core-react/hocs/withIsPressed.js +46 -46
- package/lib/cjs/core-react/hocs/withOnOutsideClick.d.ts +103 -103
- package/lib/cjs/core-react/hocs/withOnOutsideClick.js +114 -115
- package/lib/cjs/core-react/hocs/withOnOutsideClick.js.map +1 -1
- package/lib/cjs/core-react/hocs/withTimeout.d.ts +74 -74
- package/lib/cjs/core-react/hocs/withTimeout.js +46 -46
- package/lib/cjs/core-react/icons/ConditionalIconItem.d.ts +26 -26
- package/lib/cjs/core-react/icons/ConditionalIconItem.js +64 -64
- package/lib/cjs/core-react/icons/IconComponent.d.ts +25 -25
- package/lib/cjs/core-react/icons/IconComponent.d.ts.map +1 -1
- package/lib/cjs/core-react/icons/IconComponent.js +48 -48
- package/lib/cjs/core-react/icons/IconComponent.js.map +1 -1
- package/lib/cjs/core-react/icons/SvgPath.d.ts +23 -23
- package/lib/cjs/core-react/icons/SvgPath.js +27 -27
- package/lib/cjs/core-react/icons/WebFontIcon.d.ts +25 -25
- package/lib/cjs/core-react/icons/WebFontIcon.js +21 -21
- package/lib/cjs/core-react/imagecheckbox/ImageCheckBox.d.ts +42 -42
- package/lib/cjs/core-react/imagecheckbox/ImageCheckBox.js +56 -56
- package/lib/cjs/core-react/index.scss +0 -2
- package/lib/cjs/core-react/inputs/Input.d.ts +20 -20
- package/lib/cjs/core-react/inputs/Input.js +45 -45
- package/lib/cjs/core-react/inputs/InputLabel.d.ts +20 -20
- package/lib/cjs/core-react/inputs/InputLabel.js +41 -41
- package/lib/cjs/core-react/inputs/InputStatus.d.ts +11 -11
- package/lib/cjs/core-react/inputs/InputStatus.js +19 -19
- package/lib/cjs/core-react/inputs/LabeledComponentProps.d.ts +33 -33
- package/lib/cjs/core-react/inputs/LabeledComponentProps.js +9 -9
- package/lib/cjs/core-react/inputs/iconinput/IconInput.d.ts +23 -23
- package/lib/cjs/core-react/inputs/iconinput/IconInput.js +29 -29
- package/lib/cjs/core-react/inputs/numberinput/NumberInput.d.ts +50 -50
- package/lib/cjs/core-react/inputs/numberinput/NumberInput.d.ts.map +1 -1
- package/lib/cjs/core-react/inputs/numberinput/NumberInput.js +153 -153
- package/lib/cjs/core-react/listbox/Listbox.d.ts +55 -55
- package/lib/cjs/core-react/listbox/Listbox.d.ts.map +1 -1
- package/lib/cjs/core-react/listbox/Listbox.js +221 -222
- package/lib/cjs/core-react/listbox/Listbox.js.map +1 -1
- package/lib/cjs/core-react/loading/LoadingBar.d.ts +29 -29
- package/lib/cjs/core-react/loading/LoadingBar.js +40 -40
- package/lib/cjs/core-react/loading/LoadingBar.js.map +1 -1
- package/lib/cjs/core-react/loading/LoadingPrompt.d.ts +39 -39
- package/lib/cjs/core-react/loading/LoadingPrompt.js +44 -44
- package/lib/cjs/core-react/loading/LoadingPrompt.js.map +1 -1
- package/lib/cjs/core-react/loading/LoadingSpinner.d.ts +32 -32
- package/lib/cjs/core-react/loading/LoadingSpinner.d.ts.map +1 -1
- package/lib/cjs/core-react/loading/LoadingSpinner.js +30 -30
- package/lib/cjs/core-react/loading/LoadingSpinner.js.map +1 -1
- package/lib/cjs/core-react/loading/LoadingStatus.d.ts +24 -24
- package/lib/cjs/core-react/loading/LoadingStatus.js +37 -37
- package/lib/cjs/core-react/loading/LoadingStatus.js.map +1 -1
- package/lib/cjs/core-react/messagebox/MessageBox.d.ts +80 -80
- package/lib/cjs/core-react/messagebox/MessageBox.js +114 -114
- package/lib/cjs/core-react/messagebox/MessageBox.js.map +1 -1
- package/lib/cjs/core-react/notification/MessageRenderer.d.ts +19 -19
- package/lib/cjs/core-react/notification/MessageRenderer.js +81 -81
- package/lib/cjs/core-react/notification/MessageRenderer.js.map +1 -1
- package/lib/cjs/core-react/notification/MessageType.d.ts +22 -22
- package/lib/cjs/core-react/notification/MessageType.d.ts.map +1 -1
- package/lib/cjs/core-react/notification/MessageType.js +24 -24
- package/lib/cjs/core-react/popup/Popup.d.ts +111 -111
- package/lib/cjs/core-react/popup/Popup.js +418 -422
- package/lib/cjs/core-react/popup/Popup.js.map +1 -1
- package/lib/cjs/core-react/radialmenu/Annulus.d.ts +54 -54
- package/lib/cjs/core-react/radialmenu/Annulus.js +82 -82
- package/lib/cjs/core-react/radialmenu/RadialMenu.d.ts +97 -97
- package/lib/cjs/core-react/radialmenu/RadialMenu.js +179 -179
- package/lib/cjs/core-react/radialmenu/RadialMenu.js.map +1 -1
- package/lib/cjs/core-react/searchbox/SearchBox.d.ts +52 -52
- package/lib/cjs/core-react/searchbox/SearchBox.js +111 -111
- package/lib/cjs/core-react/searchbox/SearchBox.scss +2 -3
- package/lib/cjs/core-react/settings/SettingsContainer.d.ts +30 -30
- package/lib/cjs/core-react/settings/SettingsContainer.js +121 -121
- package/lib/cjs/core-react/settings/SettingsManager.d.ts +132 -132
- package/lib/cjs/core-react/settings/SettingsManager.js +122 -122
- package/lib/cjs/core-react/style/index.scss +0 -7
- package/lib/cjs/core-react/tabs/Tabs.d.ts +71 -71
- package/lib/cjs/core-react/tabs/Tabs.js +125 -125
- package/lib/cjs/core-react/tabs/VerticalTabs.d.ts +9 -9
- package/lib/cjs/core-react/tabs/VerticalTabs.js +20 -20
- package/lib/cjs/core-react/text/BlockText.d.ts +9 -9
- package/lib/cjs/core-react/text/BlockText.js +20 -20
- package/lib/cjs/core-react/text/BodyText.d.ts +10 -10
- package/lib/cjs/core-react/text/BodyText.js +21 -21
- package/lib/cjs/core-react/text/BodyText.js.map +1 -1
- package/lib/cjs/core-react/text/DisabledText.d.ts +6 -6
- package/lib/cjs/core-react/text/DisabledText.js +20 -20
- package/lib/cjs/core-react/text/FilteredText.d.ts +24 -24
- package/lib/cjs/core-react/text/FilteredText.js +40 -40
- package/lib/cjs/core-react/text/FilteredText.js.map +1 -1
- package/lib/cjs/core-react/text/MutedText.d.ts +10 -10
- package/lib/cjs/core-react/text/MutedText.js +21 -21
- package/lib/cjs/core-react/text/MutedText.js.map +1 -1
- package/lib/cjs/core-react/text/StyledText.d.ts +17 -17
- package/lib/cjs/core-react/text/StyledText.js +21 -21
- package/lib/cjs/core-react/text/StyledText.js.map +1 -1
- package/lib/cjs/core-react/text/TextProps.d.ts +10 -10
- package/lib/cjs/core-react/text/TextProps.js +9 -9
- package/lib/cjs/core-react/tree/Branch.d.ts +19 -19
- package/lib/cjs/core-react/tree/Branch.js +23 -23
- package/lib/cjs/core-react/tree/ExpansionToggle.d.ts +20 -20
- package/lib/cjs/core-react/tree/ExpansionToggle.js +30 -30
- package/lib/cjs/core-react/tree/Node.d.ts +79 -79
- package/lib/cjs/core-react/tree/Node.d.ts.map +1 -1
- package/lib/cjs/core-react/tree/Node.js +87 -88
- package/lib/cjs/core-react/tree/Node.js.map +1 -1
- package/lib/cjs/core-react/tree/Node.scss +0 -15
- package/lib/cjs/core-react/tree/Placeholder.d.ts +22 -22
- package/lib/cjs/core-react/tree/Placeholder.js +31 -31
- package/lib/cjs/core-react/tree/Tree.d.ts +28 -28
- package/lib/cjs/core-react/tree/Tree.js +100 -100
- package/lib/cjs/core-react/uistate/LocalStateStorage.d.ts +16 -16
- package/lib/cjs/core-react/uistate/LocalStateStorage.js +49 -49
- package/lib/cjs/core-react/uistate/UiStateEntry.d.ts +30 -30
- package/lib/cjs/core-react/uistate/UiStateEntry.js +59 -59
- package/lib/cjs/core-react/uistate/UiStateStorage.d.ts +28 -28
- package/lib/cjs/core-react/uistate/UiStateStorage.js +21 -21
- package/lib/cjs/core-react/utils/IconHelper.d.ts +23 -23
- package/lib/cjs/core-react/utils/IconHelper.js +62 -62
- package/lib/cjs/core-react/utils/IconWebComponent.d.ts +10 -10
- package/lib/cjs/core-react/utils/IconWebComponent.js +72 -72
- package/lib/cjs/core-react/utils/IconWebComponent.js.map +1 -1
- package/lib/cjs/core-react/utils/Point.d.ts +37 -37
- package/lib/cjs/core-react/utils/Point.js +73 -73
- package/lib/cjs/core-react/utils/Point.js.map +1 -1
- package/lib/cjs/core-react/utils/Props.d.ts +38 -38
- package/lib/cjs/core-react/utils/Props.d.ts.map +1 -1
- package/lib/cjs/core-react/utils/Props.js +9 -9
- package/lib/cjs/core-react/utils/Rectangle.d.ts +144 -144
- package/lib/cjs/core-react/utils/Rectangle.js +270 -270
- package/lib/cjs/core-react/utils/Rectangle.js.map +1 -1
- package/lib/cjs/core-react/utils/ScrollPositionMaintainer.d.ts +23 -23
- package/lib/cjs/core-react/utils/ScrollPositionMaintainer.js +36 -36
- package/lib/cjs/core-react/utils/Size.d.ts +23 -23
- package/lib/cjs/core-react/utils/Size.js +32 -32
- package/lib/cjs/core-react/utils/Size.js.map +1 -1
- package/lib/cjs/core-react/utils/Timer.d.ts +35 -35
- package/lib/cjs/core-react/utils/Timer.d.ts.map +1 -1
- package/lib/cjs/core-react/utils/Timer.js +64 -64
- package/lib/cjs/core-react/utils/UiGeometry.d.ts +20 -20
- package/lib/cjs/core-react/utils/UiGeometry.js +28 -28
- package/lib/cjs/core-react/utils/flattenChildren.d.ts +8 -8
- package/lib/cjs/core-react/utils/flattenChildren.js +27 -27
- package/lib/cjs/core-react/utils/getBestBWContrastColor.d.ts +7 -7
- package/lib/cjs/core-react/utils/getBestBWContrastColor.js +22 -22
- package/lib/cjs/core-react/utils/getBestBWContrastColor.js.map +1 -1
- package/lib/cjs/core-react/utils/getCssVariable.d.ts +11 -11
- package/lib/cjs/core-react/utils/getCssVariable.js +31 -31
- package/lib/cjs/core-react/utils/getCssVariable.js.map +1 -1
- package/lib/cjs/core-react/utils/getDisplayName.d.ts +8 -8
- package/lib/cjs/core-react/utils/getDisplayName.js +21 -21
- package/lib/cjs/core-react/utils/getUserColor.d.ts +7 -7
- package/lib/cjs/core-react/utils/getUserColor.js +38 -38
- package/lib/cjs/core-react/utils/hooks/ResizeObserverPolyfill.d.ts +4 -4
- package/lib/cjs/core-react/utils/hooks/ResizeObserverPolyfill.d.ts.map +1 -1
- package/lib/cjs/core-react/utils/hooks/ResizeObserverPolyfill.js +19 -19
- package/lib/cjs/core-react/utils/hooks/useCrossOriginPopup.d.ts +7 -7
- package/lib/cjs/core-react/utils/hooks/useCrossOriginPopup.js +88 -89
- package/lib/cjs/core-react/utils/hooks/useCrossOriginPopup.js.map +1 -1
- package/lib/cjs/core-react/utils/hooks/useDisposable.d.ts +17 -17
- package/lib/cjs/core-react/utils/hooks/useDisposable.js +38 -38
- package/lib/cjs/core-react/utils/hooks/useEffectSkipFirst.d.ts +8 -8
- package/lib/cjs/core-react/utils/hooks/useEffectSkipFirst.js +26 -26
- package/lib/cjs/core-react/utils/hooks/useEventListener.d.ts +11 -11
- package/lib/cjs/core-react/utils/hooks/useEventListener.js +43 -43
- package/lib/cjs/core-react/utils/hooks/useInterval.d.ts +5 -5
- package/lib/cjs/core-react/utils/hooks/useInterval.js +36 -36
- package/lib/cjs/core-react/utils/hooks/useLifecycleLogging.d.ts +5 -5
- package/lib/cjs/core-react/utils/hooks/useLifecycleLogging.js +64 -64
- package/lib/cjs/core-react/utils/hooks/useOnOutsideClick.d.ts +12 -12
- package/lib/cjs/core-react/utils/hooks/useOnOutsideClick.d.ts.map +1 -1
- package/lib/cjs/core-react/utils/hooks/useOnOutsideClick.js +92 -92
- package/lib/cjs/core-react/utils/hooks/useProximityToMouse.d.ts +55 -55
- package/lib/cjs/core-react/utils/hooks/useProximityToMouse.js +114 -114
- package/lib/cjs/core-react/utils/hooks/useRefEffect.d.ts +7 -7
- package/lib/cjs/core-react/utils/hooks/useRefEffect.js +23 -23
- package/lib/cjs/core-react/utils/hooks/useRefState.d.ts +21 -21
- package/lib/cjs/core-react/utils/hooks/useRefState.js +35 -35
- package/lib/cjs/core-react/utils/hooks/useRefs.d.ts +12 -12
- package/lib/cjs/core-react/utils/hooks/useRefs.js +53 -53
- package/lib/cjs/core-react/utils/hooks/useResizeObserver.d.ts +39 -39
- package/lib/cjs/core-react/utils/hooks/useResizeObserver.js +203 -208
- package/lib/cjs/core-react/utils/hooks/useResizeObserver.js.map +1 -1
- package/lib/cjs/core-react/utils/hooks/useTargeted.d.ts +8 -8
- package/lib/cjs/core-react/utils/hooks/useTargeted.js +28 -28
- package/lib/cjs/core-react/utils/hooks/useThrottledFn.d.ts +15 -15
- package/lib/cjs/core-react/utils/hooks/useThrottledFn.js +25 -25
- package/lib/cjs/core-react/utils/hooks/useWidgetOpacityContext.d.ts +20 -20
- package/lib/cjs/core-react/utils/hooks/useWidgetOpacityContext.js +27 -27
- package/lib/cjs/core-react/utils/isPromiseLike.d.ts +7 -7
- package/lib/cjs/core-react/utils/isPromiseLike.js +17 -17
- package/lib/cjs/core-react/utils/shallowDiffers.d.ts +11 -11
- package/lib/cjs/core-react/utils/shallowDiffers.js +29 -29
- package/lib/cjs/core-react/utils/typeUtils.d.ts +7 -7
- package/lib/cjs/core-react/utils/typeUtils.d.ts.map +1 -1
- package/lib/cjs/core-react/utils/typeUtils.js +9 -9
- package/lib/cjs/core-react.d.ts +236 -236
- package/lib/cjs/core-react.js +263 -259
- package/lib/cjs/core-react.js.map +1 -1
- package/lib/esm/core-react/UiCore.d.ts +40 -40
- package/lib/esm/core-react/UiCore.js +82 -81
- package/lib/esm/core-react/UiCore.js.map +1 -1
- package/lib/esm/core-react/autosuggest/AutoSuggest.d.ts +96 -96
- package/lib/esm/core-react/autosuggest/AutoSuggest.d.ts.map +1 -1
- package/lib/esm/core-react/autosuggest/AutoSuggest.js +170 -170
- package/lib/esm/core-react/autosuggest/AutoSuggest.scss +1 -2
- package/lib/esm/core-react/badge/Badge.d.ts +18 -18
- package/lib/esm/core-react/badge/Badge.js +22 -22
- package/lib/esm/core-react/badge/BadgeUtilities.d.ts +12 -12
- package/lib/esm/core-react/badge/BadgeUtilities.js +34 -34
- package/lib/esm/core-react/badge/BetaBadge.d.ts +9 -9
- package/lib/esm/core-react/badge/BetaBadge.js +18 -18
- package/lib/esm/core-react/badge/NewBadge.d.ts +10 -10
- package/lib/esm/core-react/badge/NewBadge.js +19 -19
- package/lib/esm/core-react/base/Centered.d.ts +10 -10
- package/lib/esm/core-react/base/Centered.js +16 -16
- package/lib/esm/core-react/base/Div.d.ts +16 -16
- package/lib/esm/core-react/base/Div.js +16 -16
- package/lib/esm/core-react/base/DivWithOutsideClick.d.ts +79 -79
- package/lib/esm/core-react/base/DivWithOutsideClick.js +13 -13
- package/lib/esm/core-react/base/FillCentered.d.ts +10 -10
- package/lib/esm/core-react/base/FillCentered.js +16 -16
- package/lib/esm/core-react/base/FlexWrapContainer.d.ts +11 -11
- package/lib/esm/core-react/base/FlexWrapContainer.js +17 -17
- package/lib/esm/core-react/base/Gap.d.ts +15 -15
- package/lib/esm/core-react/base/Gap.js +16 -16
- package/lib/esm/core-react/base/Gap.js.map +1 -1
- package/lib/esm/core-react/base/PointerEvents.d.ts +7 -7
- package/lib/esm/core-react/base/PointerEvents.js +13 -13
- package/lib/esm/core-react/base/ScrollView.d.ts +11 -11
- package/lib/esm/core-react/base/ScrollView.js +17 -17
- package/lib/esm/core-react/button/UnderlinedButton.d.ts +24 -24
- package/lib/esm/core-react/button/UnderlinedButton.js +31 -31
- package/lib/esm/core-react/checklistbox/CheckListBox.d.ts +40 -40
- package/lib/esm/core-react/checklistbox/CheckListBox.js +36 -36
- package/lib/esm/core-react/checklistbox/CheckListBox.scss +0 -1
- package/lib/esm/core-react/classes.scss +0 -2
- package/lib/esm/core-react/contextmenu/ContextMenu.d.ts +93 -93
- package/lib/esm/core-react/contextmenu/ContextMenu.d.ts.map +1 -1
- package/lib/esm/core-react/contextmenu/ContextMenu.js +360 -360
- package/lib/esm/core-react/contextmenu/ContextMenu.js.map +1 -1
- package/lib/esm/core-react/contextmenu/ContextMenuDirection.d.ts +18 -18
- package/lib/esm/core-react/contextmenu/ContextMenuDirection.js +23 -23
- package/lib/esm/core-react/contextmenu/ContextMenuDivider.d.ts +12 -12
- package/lib/esm/core-react/contextmenu/ContextMenuDivider.js +19 -19
- package/lib/esm/core-react/contextmenu/ContextMenuItem.d.ts +61 -61
- package/lib/esm/core-react/contextmenu/ContextMenuItem.js +105 -104
- package/lib/esm/core-react/contextmenu/ContextMenuItem.js.map +1 -1
- package/lib/esm/core-react/contextmenu/ContextSubMenu.d.ts +51 -51
- package/lib/esm/core-react/contextmenu/ContextSubMenu.d.ts.map +1 -1
- package/lib/esm/core-react/contextmenu/ContextSubMenu.js +159 -158
- package/lib/esm/core-react/contextmenu/ContextSubMenu.js.map +1 -1
- package/lib/esm/core-react/contextmenu/GlobalContextMenu.d.ts +34 -34
- package/lib/esm/core-react/contextmenu/GlobalContextMenu.js +57 -59
- package/lib/esm/core-react/contextmenu/GlobalContextMenu.js.map +1 -1
- package/lib/esm/core-react/contextmenu/PopupContextMenu.d.ts +53 -53
- package/lib/esm/core-react/contextmenu/PopupContextMenu.js +51 -51
- package/lib/esm/core-react/contextmenu/TildeFinder.d.ts +18 -18
- package/lib/esm/core-react/contextmenu/TildeFinder.js +67 -66
- package/lib/esm/core-react/contextmenu/TildeFinder.js.map +1 -1
- package/lib/esm/core-react/dialog/Dialog.d.ts +132 -132
- package/lib/esm/core-react/dialog/Dialog.js +371 -371
- package/lib/esm/core-react/dialog/Dialog.js.map +1 -1
- package/lib/esm/core-react/dialog/GlobalDialog.d.ts +28 -28
- package/lib/esm/core-react/dialog/GlobalDialog.js +48 -49
- package/lib/esm/core-react/dialog/GlobalDialog.js.map +1 -1
- package/lib/esm/core-react/elementseparator/ElementSeparator.d.ts +41 -41
- package/lib/esm/core-react/elementseparator/ElementSeparator.js +159 -159
- package/lib/esm/core-react/elementseparator/ElementSeparator.js.map +1 -1
- package/lib/esm/core-react/enums/Alignment.d.ts +22 -22
- package/lib/esm/core-react/enums/Alignment.js +28 -28
- package/lib/esm/core-react/enums/CheckBoxState.d.ts +20 -20
- package/lib/esm/core-react/enums/CheckBoxState.js +16 -16
- package/lib/esm/core-react/enums/Orientation.d.ts +11 -11
- package/lib/esm/core-react/enums/Orientation.js +16 -16
- package/lib/esm/core-react/enums/SortDirection.d.ts +12 -12
- package/lib/esm/core-react/enums/SortDirection.js +17 -17
- package/lib/esm/core-react/enums/TimeFormat.d.ts +14 -14
- package/lib/esm/core-react/enums/TimeFormat.js +19 -19
- package/lib/esm/core-react/expandable/ExpandableList.d.ts +37 -37
- package/lib/esm/core-react/expandable/ExpandableList.js +54 -53
- package/lib/esm/core-react/expandable/ExpandableList.js.map +1 -1
- package/lib/esm/core-react/focus/ItemKeyboardNavigator.d.ts +53 -53
- package/lib/esm/core-react/focus/ItemKeyboardNavigator.d.ts.map +1 -1
- package/lib/esm/core-react/focus/ItemKeyboardNavigator.js +145 -145
- package/lib/esm/core-react/focustrap/FocusTrap.d.ts +28 -28
- package/lib/esm/core-react/focustrap/FocusTrap.js +191 -191
- package/lib/esm/core-react/hocs/withIsPressed.d.ts +77 -77
- package/lib/esm/core-react/hocs/withIsPressed.js +42 -42
- package/lib/esm/core-react/hocs/withOnOutsideClick.d.ts +103 -103
- package/lib/esm/core-react/hocs/withOnOutsideClick.js +110 -111
- package/lib/esm/core-react/hocs/withOnOutsideClick.js.map +1 -1
- package/lib/esm/core-react/hocs/withTimeout.d.ts +74 -74
- package/lib/esm/core-react/hocs/withTimeout.js +42 -42
- package/lib/esm/core-react/icons/ConditionalIconItem.d.ts +26 -26
- package/lib/esm/core-react/icons/ConditionalIconItem.js +60 -60
- package/lib/esm/core-react/icons/IconComponent.d.ts +25 -25
- package/lib/esm/core-react/icons/IconComponent.d.ts.map +1 -1
- package/lib/esm/core-react/icons/IconComponent.js +44 -44
- package/lib/esm/core-react/icons/IconComponent.js.map +1 -1
- package/lib/esm/core-react/icons/SvgPath.d.ts +23 -23
- package/lib/esm/core-react/icons/SvgPath.js +23 -23
- package/lib/esm/core-react/icons/WebFontIcon.d.ts +25 -25
- package/lib/esm/core-react/icons/WebFontIcon.js +17 -17
- package/lib/esm/core-react/imagecheckbox/ImageCheckBox.d.ts +42 -42
- package/lib/esm/core-react/imagecheckbox/ImageCheckBox.js +52 -52
- package/lib/esm/core-react/index.scss +0 -2
- package/lib/esm/core-react/inputs/Input.d.ts +20 -20
- package/lib/esm/core-react/inputs/Input.js +42 -42
- package/lib/esm/core-react/inputs/InputLabel.d.ts +20 -20
- package/lib/esm/core-react/inputs/InputLabel.js +37 -37
- package/lib/esm/core-react/inputs/InputStatus.d.ts +11 -11
- package/lib/esm/core-react/inputs/InputStatus.js +16 -16
- package/lib/esm/core-react/inputs/LabeledComponentProps.d.ts +33 -33
- package/lib/esm/core-react/inputs/LabeledComponentProps.js +8 -8
- package/lib/esm/core-react/inputs/iconinput/IconInput.d.ts +23 -23
- package/lib/esm/core-react/inputs/iconinput/IconInput.js +26 -26
- package/lib/esm/core-react/inputs/numberinput/NumberInput.d.ts +50 -50
- package/lib/esm/core-react/inputs/numberinput/NumberInput.d.ts.map +1 -1
- package/lib/esm/core-react/inputs/numberinput/NumberInput.js +150 -150
- package/lib/esm/core-react/listbox/Listbox.d.ts +55 -55
- package/lib/esm/core-react/listbox/Listbox.d.ts.map +1 -1
- package/lib/esm/core-react/listbox/Listbox.js +216 -217
- package/lib/esm/core-react/listbox/Listbox.js.map +1 -1
- package/lib/esm/core-react/loading/LoadingBar.d.ts +29 -29
- package/lib/esm/core-react/loading/LoadingBar.js +36 -35
- package/lib/esm/core-react/loading/LoadingBar.js.map +1 -1
- package/lib/esm/core-react/loading/LoadingPrompt.d.ts +39 -39
- package/lib/esm/core-react/loading/LoadingPrompt.js +41 -40
- package/lib/esm/core-react/loading/LoadingPrompt.js.map +1 -1
- package/lib/esm/core-react/loading/LoadingSpinner.d.ts +32 -32
- package/lib/esm/core-react/loading/LoadingSpinner.d.ts.map +1 -1
- package/lib/esm/core-react/loading/LoadingSpinner.js +27 -26
- package/lib/esm/core-react/loading/LoadingSpinner.js.map +1 -1
- package/lib/esm/core-react/loading/LoadingStatus.d.ts +24 -24
- package/lib/esm/core-react/loading/LoadingStatus.js +34 -33
- package/lib/esm/core-react/loading/LoadingStatus.js.map +1 -1
- package/lib/esm/core-react/messagebox/MessageBox.d.ts +80 -80
- package/lib/esm/core-react/messagebox/MessageBox.js +110 -109
- package/lib/esm/core-react/messagebox/MessageBox.js.map +1 -1
- package/lib/esm/core-react/notification/MessageRenderer.d.ts +19 -19
- package/lib/esm/core-react/notification/MessageRenderer.js +77 -77
- package/lib/esm/core-react/notification/MessageRenderer.js.map +1 -1
- package/lib/esm/core-react/notification/MessageType.d.ts +22 -22
- package/lib/esm/core-react/notification/MessageType.d.ts.map +1 -1
- package/lib/esm/core-react/notification/MessageType.js +19 -19
- package/lib/esm/core-react/popup/Popup.d.ts +111 -111
- package/lib/esm/core-react/popup/Popup.js +415 -418
- package/lib/esm/core-react/popup/Popup.js.map +1 -1
- package/lib/esm/core-react/radialmenu/Annulus.d.ts +54 -54
- package/lib/esm/core-react/radialmenu/Annulus.js +75 -75
- package/lib/esm/core-react/radialmenu/RadialMenu.d.ts +97 -97
- package/lib/esm/core-react/radialmenu/RadialMenu.js +175 -174
- package/lib/esm/core-react/radialmenu/RadialMenu.js.map +1 -1
- package/lib/esm/core-react/searchbox/SearchBox.d.ts +52 -52
- package/lib/esm/core-react/searchbox/SearchBox.js +107 -107
- package/lib/esm/core-react/searchbox/SearchBox.scss +2 -3
- package/lib/esm/core-react/settings/SettingsContainer.d.ts +30 -30
- package/lib/esm/core-react/settings/SettingsContainer.js +115 -115
- package/lib/esm/core-react/settings/SettingsManager.d.ts +132 -132
- package/lib/esm/core-react/settings/SettingsManager.js +113 -113
- package/lib/esm/core-react/style/index.scss +0 -7
- package/lib/esm/core-react/tabs/Tabs.d.ts +71 -71
- package/lib/esm/core-react/tabs/Tabs.js +121 -121
- package/lib/esm/core-react/tabs/VerticalTabs.d.ts +9 -9
- package/lib/esm/core-react/tabs/VerticalTabs.js +16 -16
- package/lib/esm/core-react/text/BlockText.d.ts +9 -9
- package/lib/esm/core-react/text/BlockText.js +16 -16
- package/lib/esm/core-react/text/BodyText.d.ts +10 -10
- package/lib/esm/core-react/text/BodyText.js +17 -17
- package/lib/esm/core-react/text/BodyText.js.map +1 -1
- package/lib/esm/core-react/text/DisabledText.d.ts +6 -6
- package/lib/esm/core-react/text/DisabledText.js +16 -16
- package/lib/esm/core-react/text/FilteredText.d.ts +24 -24
- package/lib/esm/core-react/text/FilteredText.js +36 -36
- package/lib/esm/core-react/text/FilteredText.js.map +1 -1
- package/lib/esm/core-react/text/MutedText.d.ts +10 -10
- package/lib/esm/core-react/text/MutedText.js +17 -17
- package/lib/esm/core-react/text/MutedText.js.map +1 -1
- package/lib/esm/core-react/text/StyledText.d.ts +17 -17
- package/lib/esm/core-react/text/StyledText.js +17 -17
- package/lib/esm/core-react/text/StyledText.js.map +1 -1
- package/lib/esm/core-react/text/TextProps.d.ts +10 -10
- package/lib/esm/core-react/text/TextProps.js +8 -8
- package/lib/esm/core-react/tree/Branch.d.ts +19 -19
- package/lib/esm/core-react/tree/Branch.js +19 -19
- package/lib/esm/core-react/tree/ExpansionToggle.d.ts +20 -20
- package/lib/esm/core-react/tree/ExpansionToggle.js +26 -26
- package/lib/esm/core-react/tree/Node.d.ts +79 -79
- package/lib/esm/core-react/tree/Node.d.ts.map +1 -1
- package/lib/esm/core-react/tree/Node.js +83 -84
- package/lib/esm/core-react/tree/Node.js.map +1 -1
- package/lib/esm/core-react/tree/Node.scss +0 -15
- package/lib/esm/core-react/tree/Placeholder.d.ts +22 -22
- package/lib/esm/core-react/tree/Placeholder.js +27 -27
- package/lib/esm/core-react/tree/Tree.d.ts +28 -28
- package/lib/esm/core-react/tree/Tree.js +96 -96
- package/lib/esm/core-react/uistate/LocalStateStorage.d.ts +16 -16
- package/lib/esm/core-react/uistate/LocalStateStorage.js +45 -45
- package/lib/esm/core-react/uistate/UiStateEntry.d.ts +30 -30
- package/lib/esm/core-react/uistate/UiStateEntry.js +55 -55
- package/lib/esm/core-react/uistate/UiStateStorage.d.ts +28 -28
- package/lib/esm/core-react/uistate/UiStateStorage.js +18 -18
- package/lib/esm/core-react/utils/IconHelper.d.ts +23 -23
- package/lib/esm/core-react/utils/IconHelper.js +58 -58
- package/lib/esm/core-react/utils/IconWebComponent.d.ts +10 -10
- package/lib/esm/core-react/utils/IconWebComponent.js +68 -68
- package/lib/esm/core-react/utils/IconWebComponent.js.map +1 -1
- package/lib/esm/core-react/utils/Point.d.ts +37 -37
- package/lib/esm/core-react/utils/Point.js +69 -69
- package/lib/esm/core-react/utils/Point.js.map +1 -1
- package/lib/esm/core-react/utils/Props.d.ts +38 -38
- package/lib/esm/core-react/utils/Props.d.ts.map +1 -1
- package/lib/esm/core-react/utils/Props.js +8 -8
- package/lib/esm/core-react/utils/Rectangle.d.ts +144 -144
- package/lib/esm/core-react/utils/Rectangle.js +266 -266
- package/lib/esm/core-react/utils/Rectangle.js.map +1 -1
- package/lib/esm/core-react/utils/ScrollPositionMaintainer.d.ts +23 -23
- package/lib/esm/core-react/utils/ScrollPositionMaintainer.js +32 -32
- package/lib/esm/core-react/utils/Size.d.ts +23 -23
- package/lib/esm/core-react/utils/Size.js +28 -28
- package/lib/esm/core-react/utils/Size.js.map +1 -1
- package/lib/esm/core-react/utils/Timer.d.ts +35 -35
- package/lib/esm/core-react/utils/Timer.d.ts.map +1 -1
- package/lib/esm/core-react/utils/Timer.js +60 -60
- package/lib/esm/core-react/utils/UiGeometry.d.ts +20 -20
- package/lib/esm/core-react/utils/UiGeometry.js +24 -24
- package/lib/esm/core-react/utils/flattenChildren.d.ts +8 -8
- package/lib/esm/core-react/utils/flattenChildren.js +23 -23
- package/lib/esm/core-react/utils/getBestBWContrastColor.d.ts +7 -7
- package/lib/esm/core-react/utils/getBestBWContrastColor.js +18 -18
- package/lib/esm/core-react/utils/getBestBWContrastColor.js.map +1 -1
- package/lib/esm/core-react/utils/getCssVariable.d.ts +11 -11
- package/lib/esm/core-react/utils/getCssVariable.js +26 -26
- package/lib/esm/core-react/utils/getCssVariable.js.map +1 -1
- package/lib/esm/core-react/utils/getDisplayName.d.ts +8 -8
- package/lib/esm/core-react/utils/getDisplayName.js +17 -17
- package/lib/esm/core-react/utils/getUserColor.d.ts +7 -7
- package/lib/esm/core-react/utils/getUserColor.js +34 -34
- package/lib/esm/core-react/utils/hooks/ResizeObserverPolyfill.d.ts +4 -4
- package/lib/esm/core-react/utils/hooks/ResizeObserverPolyfill.d.ts.map +1 -1
- package/lib/esm/core-react/utils/hooks/ResizeObserverPolyfill.js +16 -16
- package/lib/esm/core-react/utils/hooks/useCrossOriginPopup.d.ts +7 -7
- package/lib/esm/core-react/utils/hooks/useCrossOriginPopup.js +84 -85
- package/lib/esm/core-react/utils/hooks/useCrossOriginPopup.js.map +1 -1
- package/lib/esm/core-react/utils/hooks/useDisposable.d.ts +17 -17
- package/lib/esm/core-react/utils/hooks/useDisposable.js +33 -33
- package/lib/esm/core-react/utils/hooks/useEffectSkipFirst.d.ts +8 -8
- package/lib/esm/core-react/utils/hooks/useEffectSkipFirst.js +22 -22
- package/lib/esm/core-react/utils/hooks/useEventListener.d.ts +11 -11
- package/lib/esm/core-react/utils/hooks/useEventListener.js +39 -39
- package/lib/esm/core-react/utils/hooks/useInterval.d.ts +5 -5
- package/lib/esm/core-react/utils/hooks/useInterval.js +32 -32
- package/lib/esm/core-react/utils/hooks/useLifecycleLogging.d.ts +5 -5
- package/lib/esm/core-react/utils/hooks/useLifecycleLogging.js +60 -60
- package/lib/esm/core-react/utils/hooks/useOnOutsideClick.d.ts +12 -12
- package/lib/esm/core-react/utils/hooks/useOnOutsideClick.d.ts.map +1 -1
- package/lib/esm/core-react/utils/hooks/useOnOutsideClick.js +88 -88
- package/lib/esm/core-react/utils/hooks/useProximityToMouse.d.ts +55 -55
- package/lib/esm/core-react/utils/hooks/useProximityToMouse.js +102 -102
- package/lib/esm/core-react/utils/hooks/useRefEffect.d.ts +7 -7
- package/lib/esm/core-react/utils/hooks/useRefEffect.js +19 -19
- package/lib/esm/core-react/utils/hooks/useRefState.d.ts +21 -21
- package/lib/esm/core-react/utils/hooks/useRefState.js +31 -31
- package/lib/esm/core-react/utils/hooks/useRefs.d.ts +12 -12
- package/lib/esm/core-react/utils/hooks/useRefs.js +48 -48
- package/lib/esm/core-react/utils/hooks/useResizeObserver.d.ts +39 -39
- package/lib/esm/core-react/utils/hooks/useResizeObserver.js +196 -201
- package/lib/esm/core-react/utils/hooks/useResizeObserver.js.map +1 -1
- package/lib/esm/core-react/utils/hooks/useTargeted.d.ts +8 -8
- package/lib/esm/core-react/utils/hooks/useTargeted.js +24 -24
- package/lib/esm/core-react/utils/hooks/useThrottledFn.d.ts +15 -15
- package/lib/esm/core-react/utils/hooks/useThrottledFn.js +21 -21
- package/lib/esm/core-react/utils/hooks/useWidgetOpacityContext.d.ts +20 -20
- package/lib/esm/core-react/utils/hooks/useWidgetOpacityContext.js +23 -23
- package/lib/esm/core-react/utils/isPromiseLike.d.ts +7 -7
- package/lib/esm/core-react/utils/isPromiseLike.js +13 -13
- package/lib/esm/core-react/utils/shallowDiffers.d.ts +11 -11
- package/lib/esm/core-react/utils/shallowDiffers.js +25 -25
- package/lib/esm/core-react/utils/typeUtils.d.ts +7 -7
- package/lib/esm/core-react/utils/typeUtils.d.ts.map +1 -1
- package/lib/esm/core-react/utils/typeUtils.js +8 -8
- package/lib/esm/core-react.d.ts +236 -236
- package/lib/esm/core-react.js +241 -241
- package/package.json +15 -13
- package/ThirdPartyNotices.md +0 -28
- package/lib/cjs/core-react/button/blue-large.scss +0 -12
- package/lib/cjs/core-react/button/blue.scss +0 -17
- package/lib/cjs/core-react/button/button.scss +0 -70
- package/lib/cjs/core-react/button/classes.scss +0 -14
- package/lib/cjs/core-react/button/disabled-large.scss +0 -12
- package/lib/cjs/core-react/button/disabled.scss +0 -17
- package/lib/cjs/core-react/button/hollow-large.scss +0 -13
- package/lib/cjs/core-react/button/hollow.scss +0 -30
- package/lib/cjs/core-react/button/index.scss +0 -14
- package/lib/cjs/core-react/button/primary-large.scss +0 -12
- package/lib/cjs/core-react/button/primary.scss +0 -17
- package/lib/cjs/core-react/button/variables.scss +0 -22
- package/lib/cjs/core-react/checkbox/checkbox.scss +0 -124
- package/lib/cjs/core-react/checkbox/classes.scss +0 -8
- package/lib/cjs/core-react/checkbox/index.scss +0 -8
- package/lib/cjs/core-react/style/data-viz.scss +0 -20
- package/lib/cjs/core-react/style/space.scss +0 -13
- package/lib/cjs/core-react/style/speed.scss +0 -9
- package/lib/cjs/core-react/style/typography.scss +0 -39
- package/lib/cjs/core-react/style/variables.scss +0 -9
- package/lib/esm/core-react/button/blue-large.scss +0 -12
- package/lib/esm/core-react/button/blue.scss +0 -17
- package/lib/esm/core-react/button/button.scss +0 -70
- package/lib/esm/core-react/button/classes.scss +0 -14
- package/lib/esm/core-react/button/disabled-large.scss +0 -12
- package/lib/esm/core-react/button/disabled.scss +0 -17
- package/lib/esm/core-react/button/hollow-large.scss +0 -13
- package/lib/esm/core-react/button/hollow.scss +0 -30
- package/lib/esm/core-react/button/index.scss +0 -14
- package/lib/esm/core-react/button/primary-large.scss +0 -12
- package/lib/esm/core-react/button/primary.scss +0 -17
- package/lib/esm/core-react/button/variables.scss +0 -22
- package/lib/esm/core-react/checkbox/checkbox.scss +0 -124
- package/lib/esm/core-react/checkbox/classes.scss +0 -8
- package/lib/esm/core-react/checkbox/index.scss +0 -8
- package/lib/esm/core-react/style/data-viz.scss +0 -20
- package/lib/esm/core-react/style/space.scss +0 -13
- package/lib/esm/core-react/style/speed.scss +0 -9
- package/lib/esm/core-react/style/typography.scss +0 -39
- package/lib/esm/core-react/style/variables.scss +0 -9
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Dialog.js","sourceRoot":"","sources":["../../../../src/core-react/dialog/Dialog.tsx"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,yBAAuB;AACvB,2CAAoC;AACpC,+BAA+B;AAC/B,0DAAsF;AACtF,qEAAkE;AAClE,sCAAmC;AAGnC,sDAAmD;AACnD,wDAA8C;AAC9C,0DAA8C;AAC9C,oEAAsD;AAEtD,0BAA0B;AAE1B;;GAEG;AACH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ACrB,OAAO,EAAE,MAAM,CAAC,OAAO,IAEtB,UAAU,CACJ,CACV,CAAC;YACJ,CAAC,CAAC,CAAC;SACJ;QACD,OAAO,OAAO,CAAC;IACjB,CAAC;;AAlUH,wBAucC;AApce,mBAAY,GAAyB;IACjD,SAAS,EAAE,eAAe,CAAC,MAAM;IACjC,QAAQ,EAAE,GAAG;IACb,SAAS,EAAE,GAAG;IACd,KAAK,EAAE,KAAK;IACZ,UAAU,EAAE,KAAK;IACjB,SAAS,EAAE,KAAK;IAChB,OAAO,EAAE,KAAK;IACd,KAAK,EAAE,IAAI;IACX,KAAK,EAAE,IAAI;IACX,SAAS,EAAE,KAAK;CACjB,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module Dialog\r\n */\r\n\r\nimport \"./Dialog.scss\";\r\nimport classnames from \"classnames\";\r\nimport * as React from \"react\";\r\nimport { DialogButtonDef, DialogButtonType, SpecialKey } from \"@itwin/appui-abstract\";\r\nimport { DivWithOutsideClick } from \"../base/DivWithOutsideClick\";\r\nimport { UiCore } from \"../UiCore\";\r\nimport { CommonProps } from \"../utils/Props\";\r\nimport { Omit } from \"../utils/typeUtils\";\r\nimport { FocusTrap } from \"../focustrap/FocusTrap\";\r\nimport { Button } from \"@itwin/itwinui-react\";\r\nimport { Icon } from \"../icons/IconComponent\";\r\nimport { SvgClose } from \"@itwin/itwinui-icons-react\";\r\n\r\n// cspell:ignore focustrap\r\n\r\n/** Enum for dialog alignment\r\n * @public\r\n */\r\nexport enum DialogAlignment {\r\n TopLeft = \"top-left\", Top = \"top\", TopRight = \"top-right\",\r\n Left = \"left\", Center = \"center\", Right = \"right\",\r\n BottomLeft = \"bottom-left\", Bottom = \"bottom\", BottomRight = \"bottom-right\",\r\n}\r\n\r\n/** Properties for the [[Dialog]] component\r\n * @public\r\n */\r\nexport interface DialogProps extends Omit<React.AllHTMLAttributes<HTMLDivElement>, \"title\">, CommonProps {\r\n /** Indicates whether to show dialog or not */\r\n opened: boolean;\r\n\r\n /** Indicates whether the user can resize dialog with cursor. Default: false */\r\n resizable?: boolean;\r\n /** Indicates whether the user can move dialog with cursor. Default: false */\r\n movable?: boolean;\r\n /** Indicates whether the content should be inset. Default: true */\r\n inset?: boolean;\r\n /** Indicates whether the focus should be trapped within the dialog. Default: false */\r\n trapFocus?: boolean;\r\n\r\n /** Whether the hide the header. Default: false */\r\n hideHeader?: boolean;\r\n /** Override for the header */\r\n header?: React.ReactNode;\r\n /** Title to show in title bar of dialog */\r\n title?: string | JSX.Element;\r\n /** Footer to show at bottom of dialog. Note: will override buttonCluster */\r\n footer?: string | JSX.Element;\r\n /** List of DialogButtonDef objects specifying buttons and associated onClick events */\r\n buttonCluster?: DialogButtonDef[];\r\n\r\n /** Default alignment of dialog. Default: DialogAlignment.Center */\r\n alignment?: DialogAlignment;\r\n /** Initial x/left position of dialog in px. */\r\n x?: number;\r\n /** Initial y/top position of dialog in px. */\r\n y?: number;\r\n\r\n /** onClick event for X button for dialog */\r\n onClose?: () => void;\r\n /** 'keyup' event for Esc key */\r\n onEscape?: () => void;\r\n /** Triggered when a click is triggered outside of this dialog. */\r\n onOutsideClick?: (event: MouseEvent) => any;\r\n\r\n /** Initial width of dialog. Displayed in px if value is a number; otherwise, displayed in specified CSS unit. Default: \"50%\" */\r\n width?: string | number;\r\n /** Initial height of dialog. Displayed in px if value is a number; otherwise, displayed in specified CSS unit. */\r\n height?: string | number;\r\n /** Minimum width that the dialog may be resized to. Displayed in px if value is a number; otherwise, displayed in specified CSS unit. Default: 300px */\r\n minWidth?: string | number;\r\n /** Minimum height that the dialog may be resized to. Displayed in px if value is a number; otherwise, displayed in specified CSS unit. Default: 100px */\r\n minHeight?: string | number;\r\n /** Maximum width that the dialog may be resized to. Displayed in px if value is a number; otherwise, displayed in specified CSS unit. */\r\n maxWidth?: string | number;\r\n /** Maximum height that the dialog may be resized to. Displayed in px if value is a number; otherwise, displayed in specified CSS unit. */\r\n maxHeight?: string | number;\r\n\r\n /** Whether to show background overlay. Default: true.\r\n * @note Modeless dialogs require an id and an implementation of onModelessPointerDown.\r\n */\r\n modal?: boolean;\r\n /** An id for a modeless dialog */\r\n modelessId?: string;\r\n /** Pointer Down event handler when modeless (modal = false) */\r\n onModelessPointerDown?: (event: React.PointerEvent, id: string) => void;\r\n\r\n /** Custom CSS Style for overlay */\r\n backgroundStyle?: React.CSSProperties;\r\n /** Custom CSS Style for title */\r\n titleStyle?: React.CSSProperties;\r\n /** Custom CSS Style for footer */\r\n footerStyle?: React.CSSProperties;\r\n /** Custom CSS class name for the content */\r\n contentClassName?: string;\r\n /** Custom CSS Style for the content */\r\n contentStyle?: React.CSSProperties;\r\n}\r\n\r\n/** @internal */\r\ninterface DialogState {\r\n rightResizing: boolean;\r\n downResizing: boolean;\r\n moving: boolean;\r\n grabOffsetX: number;\r\n grabOffsetY: number;\r\n x?: number;\r\n y?: number;\r\n width?: number;\r\n height?: number;\r\n positionSet: boolean;\r\n}\r\n\r\n/**\r\n * Dialog React component with optional resizing and dragging functionality\r\n * @public\r\n */\r\nexport class Dialog extends React.Component<DialogProps, DialogState> {\r\n private _parentDocument = document;\r\n private _containerRef = React.createRef<HTMLDivElement>();\r\n public static defaultProps: Partial<DialogProps> = {\r\n alignment: DialogAlignment.Center,\r\n minWidth: 300,\r\n minHeight: 100,\r\n width: \"50%\",\r\n hideHeader: false,\r\n resizable: false,\r\n movable: false,\r\n modal: true,\r\n inset: true,\r\n trapFocus: false,\r\n };\r\n\r\n /** @internal */\r\n public override readonly state: Readonly<DialogState>;\r\n\r\n constructor(props: DialogProps) {\r\n super(props);\r\n this.state = {\r\n rightResizing: false,\r\n downResizing: false,\r\n moving: false,\r\n grabOffsetX: 0,\r\n grabOffsetY: 0,\r\n positionSet: props.x !== undefined || props.y !== undefined,\r\n };\r\n }\r\n\r\n private getParentWindow() {\r\n // istanbul ignore next\r\n return this._parentDocument.defaultView ?? window;\r\n }\r\n\r\n public override componentWillUnmount(): void {\r\n const parentWindow = this.getParentWindow();\r\n parentWindow.removeEventListener(\"pointerup\", this._handlePointerUp, true);\r\n parentWindow.removeEventListener(\"pointermove\", this._handlePointerMove, true);\r\n this._parentDocument.removeEventListener(\"keyup\", this._handleKeyUp, true);\r\n parentWindow.addEventListener(\"resize\", this._handleAppWindowResize);\r\n }\r\n\r\n /** Keep title bar of movable Dialog at least partially visible */\r\n // istanbul ignore next\r\n private _handleAppWindowResize = (): void => {\r\n if (!this._containerRef.current || !this.props.movable)\r\n return;\r\n\r\n const parentWindow = this.getParentWindow();\r\n const { x, y } = this.state;\r\n let newX: number | undefined;\r\n let newY: number | undefined;\r\n\r\n if (undefined !== y && undefined !== x) {\r\n if (y > parentWindow.innerHeight - 32)\r\n newY = parentWindow.innerHeight - 32;\r\n if (x > parentWindow.innerWidth - 32)\r\n newX = parentWindow.innerWidth - 32;\r\n }\r\n\r\n if (newX !== undefined || newY !== undefined)\r\n this.setState({ x: newX !== undefined ? newX : x, y: newY !== undefined ? newY : y, positionSet: true });\r\n };\r\n\r\n public override componentDidMount(): void {\r\n const parentWindow = this.getParentWindow();\r\n parentWindow.addEventListener(\"pointerup\", this._handlePointerUp, true);\r\n this._parentDocument.addEventListener(\"keyup\", this._handleKeyUp, true);\r\n parentWindow.addEventListener(\"resize\", this._handleAppWindowResize);\r\n }\r\n\r\n public handleRefSet = (containerDiv: HTMLDivElement | null) => {\r\n if (containerDiv)\r\n this._parentDocument = containerDiv.ownerDocument;\r\n };\r\n\r\n public override render(): JSX.Element {\r\n const {\r\n opened, title, footer, buttonCluster, onClose, onEscape, onOutsideClick, // eslint-disable-line @typescript-eslint/no-unused-vars\r\n minWidth, minHeight, x, y, width, height, maxHeight, maxWidth,\r\n backgroundStyle, titleStyle, footerStyle, style, contentStyle, contentClassName,\r\n modal, resizable, movable, className, alignment, inset, trapFocus, modelessId, onModelessPointerDown, // eslint-disable-line @typescript-eslint/no-unused-vars\r\n hideHeader, header, ...props } = this.props;\r\n\r\n const containerStyle: React.CSSProperties = {\r\n margin: \"\",\r\n left: x, top: y,\r\n width, height,\r\n };\r\n\r\n if (this.state.x !== undefined || this.state.y !== undefined) {\r\n // istanbul ignore else\r\n if (this.state.x !== undefined) {\r\n containerStyle.marginLeft = \"0\";\r\n containerStyle.marginRight = \"0\";\r\n containerStyle.left = this.state.x;\r\n }\r\n // istanbul ignore else\r\n if (this.state.y !== undefined) {\r\n containerStyle.marginTop = \"0\";\r\n containerStyle.marginBottom = \"0\";\r\n containerStyle.top = this.state.y;\r\n }\r\n }\r\n\r\n if (this.state.width !== undefined || this.state.height !== undefined) {\r\n // istanbul ignore else\r\n if (this.state.width !== undefined)\r\n containerStyle.width = this.state.width;\r\n // istanbul ignore else\r\n if (this.state.height !== undefined)\r\n containerStyle.height = this.state.height;\r\n }\r\n\r\n const minMaxStyle: React.CSSProperties = {};\r\n minMaxStyle.minWidth = (typeof minWidth === \"number\") ? `${minWidth}px` : minWidth;\r\n minMaxStyle.minHeight = (typeof minHeight === \"number\") ? `${minHeight}px` : minHeight;\r\n if (maxWidth !== undefined)\r\n minMaxStyle.maxWidth = (typeof maxWidth === \"number\") ? `${maxWidth}px` : maxWidth;\r\n if (maxHeight !== undefined)\r\n minMaxStyle.maxHeight = (typeof maxHeight === \"number\") ? `${maxHeight}px` : maxHeight;\r\n\r\n const buttons = this.getFooterButtons(this.props);\r\n\r\n const footerElement: React.ReactNode = footer || (buttons.length > 0 && <div className={\"core-dialog-buttons\"}>{buttons}</div>);\r\n\r\n const divStyle: React.CSSProperties = {\r\n ...backgroundStyle,\r\n ...style,\r\n };\r\n\r\n const headerElement = header || (\r\n <div\r\n className={classnames(\r\n \"core-dialog-head\",\r\n { \"core-dialog-movable\": movable },\r\n { \"core-dialog-modal\": modal }\r\n )}\r\n data-testid=\"core-dialog-head\"\r\n onPointerDown={this._handleStartMove}>\r\n <div className={\"core-dialog-title\"} data-testid=\"core-dialog-title\" style={titleStyle}>{title}</div>\r\n <button\r\n className={\"core-focus-trap-ignore-initial core-dialog-close icon\"}\r\n data-testid=\"core-dialog-close\"\r\n onClick={onClose}>\r\n <Icon iconSpec={<SvgClose />} />\r\n </button>\r\n </div>\r\n );\r\n\r\n return (\r\n <div ref={this.handleRefSet}\r\n className={classnames(\r\n \"core-dialog\",\r\n !modal && \"core-dialog-hidden\",\r\n opened && \"core-dialog-opened\",\r\n className,\r\n )}\r\n style={divStyle}\r\n data-testid=\"core-dialog-root\"\r\n {...props}\r\n >\r\n {opened &&\r\n <DivWithOutsideClick onOutsideClick={onOutsideClick}>\r\n <FocusTrap active={trapFocus && modal} returnFocusOnDeactivate={true}>\r\n <div\r\n className={classnames(\"core-dialog-container\", this.getCSSClassNameFromAlignment(alignment))}\r\n style={{ ...containerStyle, ...minMaxStyle }}\r\n data-testid=\"core-dialog-container\"\r\n onPointerDown={this._handleContainerPointerDown}\r\n >\r\n <div className={\"core-dialog-area\"} ref={this._containerRef} style={minMaxStyle}>\r\n {!hideHeader &&\r\n headerElement\r\n }\r\n <div\r\n className={classnames(\r\n \"core-dialog-content\",\r\n { \"core-dialog-content-no-inset\": !inset },\r\n contentClassName)}\r\n style={contentStyle}>\r\n {this.props.children}\r\n </div>\r\n {footerElement &&\r\n <div className={\"core-dialog-footer\"} style={footerStyle}>\r\n {footerElement}\r\n </div>\r\n }\r\n <div\r\n className={classnames(\"core-dialog-drag\", \"core-dialog-drag-right\", { \"core-dialog-drag-enabled\": resizable })}\r\n data-testid=\"core-dialog-drag-right\"\r\n onPointerDown={this._handleStartResizeRight}\r\n />\r\n <div\r\n className={classnames(\"core-dialog-drag\", \"core-dialog-drag-bottom-mid\", { \"core-dialog-drag-enabled\": resizable })}\r\n data-testid=\"core-dialog-drag-bottom\"\r\n onPointerDown={this._handleStartResizeDown}\r\n />\r\n <div\r\n className={classnames(\"core-dialog-drag\", \"core-dialog-drag-bottom-right\", { \"core-dialog-drag-enabled\": resizable })}\r\n data-testid=\"core-dialog-drag-bottom-right\"\r\n onPointerDown={this._handleStartResizeDownRight}\r\n />\r\n </div>\r\n </div>\r\n </FocusTrap>\r\n </DivWithOutsideClick>\r\n }\r\n </div>\r\n );\r\n }\r\n\r\n private getCSSClassNameFromAlignment(alignment?: DialogAlignment): string {\r\n let className = \"\";\r\n\r\n // Drop the alignment CSS class if the Dialog has been sized or moved.\r\n if (this.state.positionSet)\r\n return \"\";\r\n\r\n // istanbul ignore next\r\n if (!alignment)\r\n alignment = DialogAlignment.Center;\r\n\r\n switch (alignment) {\r\n case DialogAlignment.TopLeft:\r\n className = \"core-dialog-top-left\";\r\n break;\r\n case DialogAlignment.Top:\r\n className = \"core-dialog-top\";\r\n break;\r\n case DialogAlignment.TopRight:\r\n className = \"core-dialog-top-right\";\r\n break;\r\n case DialogAlignment.Left:\r\n className = \"core-dialog-left\";\r\n break;\r\n case DialogAlignment.Center:\r\n className = \"core-dialog-center\";\r\n break;\r\n case DialogAlignment.Right:\r\n className = \"core-dialog-right\";\r\n break;\r\n case DialogAlignment.BottomLeft:\r\n className = \"core-dialog-bottom-left\";\r\n break;\r\n case DialogAlignment.Bottom:\r\n className = \"core-dialog-bottom\";\r\n break;\r\n case DialogAlignment.BottomRight:\r\n className = \"core-dialog-bottom-right\";\r\n break;\r\n }\r\n\r\n return className;\r\n }\r\n\r\n private getFooterButtons(props: DialogProps) {\r\n const buttons: React.ReactNode[] = [];\r\n if (props.buttonCluster) {\r\n props.buttonCluster.forEach((button: DialogButtonDef, index: number) => {\r\n let buttonText = \"\";\r\n let buttonClass = classnames(\"core-dialog-button\", `dialog-button-${button.type}`, button.className);\r\n let styleType: \"default\" | \"cta\" | \"high-visibility\" | \"borderless\" | undefined;\r\n\r\n switch (button.type) {\r\n case DialogButtonType.OK:\r\n buttonText = UiCore.translate(\"dialog.ok\");\r\n buttonClass = classnames(buttonClass, button.buttonStyle);\r\n styleType = \"cta\";\r\n break;\r\n case DialogButtonType.Retry:\r\n buttonText = UiCore.translate(\"dialog.retry\");\r\n buttonClass = classnames(buttonClass, button.buttonStyle);\r\n styleType = \"cta\";\r\n break;\r\n case DialogButtonType.Yes:\r\n buttonText = UiCore.translate(\"dialog.yes\");\r\n buttonClass = classnames(buttonClass, button.buttonStyle);\r\n styleType = \"cta\";\r\n break;\r\n case DialogButtonType.No:\r\n buttonText = UiCore.translate(\"dialog.no\");\r\n buttonClass = classnames(buttonClass, button.buttonStyle);\r\n break;\r\n case DialogButtonType.Cancel:\r\n buttonText = UiCore.translate(\"dialog.cancel\");\r\n buttonClass = classnames(buttonClass, button.buttonStyle);\r\n break;\r\n case DialogButtonType.Close:\r\n buttonText = UiCore.translate(\"dialog.close\");\r\n buttonClass = classnames(buttonClass, button.buttonStyle);\r\n break;\r\n case DialogButtonType.Next:\r\n buttonText = UiCore.translate(\"dialog.next\");\r\n buttonClass = classnames(buttonClass, button.buttonStyle);\r\n styleType = \"cta\";\r\n break;\r\n case DialogButtonType.Previous:\r\n buttonText = UiCore.translate(\"dialog.previous\");\r\n buttonClass = classnames(buttonClass, button.buttonStyle);\r\n styleType = \"cta\";\r\n break;\r\n }\r\n\r\n if (button.label) buttonText = button.label;\r\n\r\n buttons.push(\r\n <Button\r\n className={buttonClass}\r\n disabled={button.disabled}\r\n styleType={styleType}\r\n key={index.toString()}\r\n onClick={button.onClick}\r\n >\r\n {buttonText}\r\n </Button>\r\n );\r\n });\r\n }\r\n return buttons;\r\n }\r\n\r\n private _handleKeyUp = (event: KeyboardEvent) => {\r\n if (event.key === SpecialKey.Escape && this.props.opened && this.props.onEscape) {\r\n this.props.onEscape();\r\n }\r\n };\r\n\r\n private _handleContainerPointerDown = (event: React.PointerEvent): void => {\r\n if (!this.props.modal) {\r\n if (this.props.onModelessPointerDown && this.props.modelessId)\r\n this.props.onModelessPointerDown(event, this.props.modelessId);\r\n }\r\n };\r\n\r\n private _handleStartResizeRight = (event: React.PointerEvent): void => {\r\n event.preventDefault();\r\n this.setState({ rightResizing: true });\r\n const parentWindow = this.getParentWindow();\r\n parentWindow.addEventListener(\"pointermove\", this._handlePointerMove, true);\r\n };\r\n\r\n private _handleStartResizeDown = (event: React.PointerEvent): void => {\r\n event.preventDefault();\r\n this.setState({ downResizing: true });\r\n const parentWindow = this.getParentWindow();\r\n parentWindow.addEventListener(\"pointermove\", this._handlePointerMove, true);\r\n };\r\n\r\n private _handleStartResizeDownRight = (event: React.PointerEvent): void => {\r\n event.preventDefault();\r\n this.setState({ downResizing: true, rightResizing: true });\r\n const parentWindow = this.getParentWindow();\r\n parentWindow.addEventListener(\"pointermove\", this._handlePointerMove, true);\r\n };\r\n\r\n private _handleStartMove = (event: React.PointerEvent): void => {\r\n if (!this.props.movable)\r\n return;\r\n\r\n event.preventDefault();\r\n // istanbul ignore else\r\n if (this._containerRef.current) {\r\n const rect = this._containerRef.current.getBoundingClientRect();\r\n const grabOffsetX = event.clientX - rect.left;\r\n const grabOffsetY = event.clientY - rect.top;\r\n this.setState({\r\n grabOffsetX,\r\n grabOffsetY,\r\n moving: true,\r\n });\r\n\r\n const parentWindow = this.getParentWindow();\r\n parentWindow.addEventListener(\"pointermove\", this._handlePointerMove, true);\r\n }\r\n };\r\n\r\n private _handlePointerMove = (event: PointerEvent): void => {\r\n if ((!this.props.resizable && !this.props.movable) || !this._containerRef.current)\r\n return;\r\n\r\n const { minWidth, maxWidth, minHeight, maxHeight, movable } = this.props;\r\n let { x, y, width, height } = this.state;\r\n\r\n // istanbul ignore else\r\n if (x === undefined) { // if x is undefined, so is y, width, and height\r\n const rect = this._containerRef.current.getBoundingClientRect();\r\n width = rect.width, height = rect.height, x = rect.left, y = rect.top;\r\n }\r\n\r\n if (this.props.resizable) {\r\n if (this.state.rightResizing) {\r\n const pointerX = event.clientX;\r\n width = pointerX - x;\r\n // istanbul ignore else\r\n if (typeof minWidth === \"number\")\r\n width = Math.max(width, minWidth);\r\n if (maxWidth !== undefined && typeof maxWidth === \"number\")\r\n width = Math.min(width, maxWidth);\r\n }\r\n\r\n if (this.state.downResizing) {\r\n const pointerY = event.clientY;\r\n height = pointerY - y!;\r\n // istanbul ignore else\r\n if (typeof minHeight === \"number\")\r\n height = Math.max(height, minHeight);\r\n if (maxHeight !== undefined && typeof maxHeight === \"number\")\r\n height = Math.min(height, maxHeight);\r\n }\r\n\r\n this.setState({ width, height });\r\n }\r\n\r\n // istanbul ignore next\r\n if (movable && this.state.moving) {\r\n x = event.clientX - this.state.grabOffsetX;\r\n y = event.clientY - this.state.grabOffsetY;\r\n if (y < 0)\r\n y = 0;\r\n if (event.view) {\r\n if (y > event.view.innerHeight - 32)\r\n y = event.view.innerHeight - 32;\r\n if (x > event.view.innerWidth - 32)\r\n x = event.view.innerWidth - 32;\r\n if (width) {\r\n if (x < (0 - width + 32))\r\n x = 0 - width + 32;\r\n }\r\n }\r\n\r\n this.setState({ x, y, positionSet: true });\r\n }\r\n };\r\n\r\n private _handlePointerUp = (_event: PointerEvent): void => {\r\n if (!this.props.movable && !this.props.resizable)\r\n return;\r\n\r\n // istanbul ignore else\r\n if (this._containerRef.current) {\r\n this.setState({\r\n rightResizing: false,\r\n downResizing: false,\r\n moving: false,\r\n grabOffsetX: 0,\r\n grabOffsetY: 0,\r\n });\r\n }\r\n\r\n const parentWindow = this.getParentWindow();\r\n parentWindow.removeEventListener(\"pointermove\", this._handlePointerMove, true);\r\n };\r\n}\r\n"]}
|
|
1
|
+
{"version":3,"file":"Dialog.js","sourceRoot":"","sources":["../../../../src/core-react/dialog/Dialog.tsx"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,yBAAuB;AACvB,2CAAoC;AACpC,+BAA+B;AAC/B,0DAAsF;AACtF,qEAAkE;AAClE,sCAAmC;AAGnC,sDAAmD;AACnD,wDAA8C;AAC9C,0DAA8C;AAC9C,oEAAsD;AAEtD,0BAA0B;AAE1B;;GAEG;AACH,IAAY,eAIX;AAJD,WAAY,eAAe;IACzB,uCAAo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,CACV,CAAC;YACJ,CAAC,CAAC,CAAC;SACJ;QACD,OAAO,OAAO,CAAC;IACjB,CAAC;;AA/Ta,mBAAY,GAAyB;IACjD,SAAS,EAAE,eAAe,CAAC,MAAM;IACjC,QAAQ,EAAE,GAAG;IACb,SAAS,EAAE,GAAG;IACd,KAAK,EAAE,KAAK;IACZ,UAAU,EAAE,KAAK;IACjB,SAAS,EAAE,KAAK;IAChB,OAAO,EAAE,KAAK;IACd,KAAK,EAAE,IAAI;IACX,KAAK,EAAE,IAAI;IACX,SAAS,EAAE,KAAK;CACjB,AAXyB,CAWxB;AAdS,wBAAM","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module Dialog\r\n */\r\n\r\nimport \"./Dialog.scss\";\r\nimport classnames from \"classnames\";\r\nimport * as React from \"react\";\r\nimport { DialogButtonDef, DialogButtonType, SpecialKey } from \"@itwin/appui-abstract\";\r\nimport { DivWithOutsideClick } from \"../base/DivWithOutsideClick\";\r\nimport { UiCore } from \"../UiCore\";\r\nimport { CommonProps } from \"../utils/Props\";\r\nimport { Omit } from \"../utils/typeUtils\";\r\nimport { FocusTrap } from \"../focustrap/FocusTrap\";\r\nimport { Button } from \"@itwin/itwinui-react\";\r\nimport { Icon } from \"../icons/IconComponent\";\r\nimport { SvgClose } from \"@itwin/itwinui-icons-react\";\r\n\r\n// cspell:ignore focustrap\r\n\r\n/** Enum for dialog alignment\r\n * @public\r\n */\r\nexport enum DialogAlignment {\r\n TopLeft = \"top-left\", Top = \"top\", TopRight = \"top-right\",\r\n Left = \"left\", Center = \"center\", Right = \"right\",\r\n BottomLeft = \"bottom-left\", Bottom = \"bottom\", BottomRight = \"bottom-right\",\r\n}\r\n\r\n/** Properties for the [[Dialog]] component\r\n * @public\r\n */\r\nexport interface DialogProps extends Omit<React.AllHTMLAttributes<HTMLDivElement>, \"title\">, CommonProps {\r\n /** Indicates whether to show dialog or not */\r\n opened: boolean;\r\n\r\n /** Indicates whether the user can resize dialog with cursor. Default: false */\r\n resizable?: boolean;\r\n /** Indicates whether the user can move dialog with cursor. Default: false */\r\n movable?: boolean;\r\n /** Indicates whether the content should be inset. Default: true */\r\n inset?: boolean;\r\n /** Indicates whether the focus should be trapped within the dialog. Default: false */\r\n trapFocus?: boolean;\r\n\r\n /** Whether the hide the header. Default: false */\r\n hideHeader?: boolean;\r\n /** Override for the header */\r\n header?: React.ReactNode;\r\n /** Title to show in title bar of dialog */\r\n title?: string | JSX.Element;\r\n /** Footer to show at bottom of dialog. Note: will override buttonCluster */\r\n footer?: string | JSX.Element;\r\n /** List of DialogButtonDef objects specifying buttons and associated onClick events */\r\n buttonCluster?: DialogButtonDef[];\r\n\r\n /** Default alignment of dialog. Default: DialogAlignment.Center */\r\n alignment?: DialogAlignment;\r\n /** Initial x/left position of dialog in px. */\r\n x?: number;\r\n /** Initial y/top position of dialog in px. */\r\n y?: number;\r\n\r\n /** onClick event for X button for dialog */\r\n onClose?: () => void;\r\n /** 'keyup' event for Esc key */\r\n onEscape?: () => void;\r\n /** Triggered when a click is triggered outside of this dialog. */\r\n onOutsideClick?: (event: MouseEvent) => any;\r\n\r\n /** Initial width of dialog. Displayed in px if value is a number; otherwise, displayed in specified CSS unit. Default: \"50%\" */\r\n width?: string | number;\r\n /** Initial height of dialog. Displayed in px if value is a number; otherwise, displayed in specified CSS unit. */\r\n height?: string | number;\r\n /** Minimum width that the dialog may be resized to. Displayed in px if value is a number; otherwise, displayed in specified CSS unit. Default: 300px */\r\n minWidth?: string | number;\r\n /** Minimum height that the dialog may be resized to. Displayed in px if value is a number; otherwise, displayed in specified CSS unit. Default: 100px */\r\n minHeight?: string | number;\r\n /** Maximum width that the dialog may be resized to. Displayed in px if value is a number; otherwise, displayed in specified CSS unit. */\r\n maxWidth?: string | number;\r\n /** Maximum height that the dialog may be resized to. Displayed in px if value is a number; otherwise, displayed in specified CSS unit. */\r\n maxHeight?: string | number;\r\n\r\n /** Whether to show background overlay. Default: true.\r\n * @note Modeless dialogs require an id and an implementation of onModelessPointerDown.\r\n */\r\n modal?: boolean;\r\n /** An id for a modeless dialog */\r\n modelessId?: string;\r\n /** Pointer Down event handler when modeless (modal = false) */\r\n onModelessPointerDown?: (event: React.PointerEvent, id: string) => void;\r\n\r\n /** Custom CSS Style for overlay */\r\n backgroundStyle?: React.CSSProperties;\r\n /** Custom CSS Style for title */\r\n titleStyle?: React.CSSProperties;\r\n /** Custom CSS Style for footer */\r\n footerStyle?: React.CSSProperties;\r\n /** Custom CSS class name for the content */\r\n contentClassName?: string;\r\n /** Custom CSS Style for the content */\r\n contentStyle?: React.CSSProperties;\r\n}\r\n\r\n/** @internal */\r\ninterface DialogState {\r\n rightResizing: boolean;\r\n downResizing: boolean;\r\n moving: boolean;\r\n grabOffsetX: number;\r\n grabOffsetY: number;\r\n x?: number;\r\n y?: number;\r\n width?: number;\r\n height?: number;\r\n positionSet: boolean;\r\n}\r\n\r\n/**\r\n * Dialog React component with optional resizing and dragging functionality\r\n * @public\r\n */\r\nexport class Dialog extends React.Component<DialogProps, DialogState> {\r\n private _parentDocument = document;\r\n private _containerRef = React.createRef<HTMLDivElement>();\r\n public static defaultProps: Partial<DialogProps> = {\r\n alignment: DialogAlignment.Center,\r\n minWidth: 300,\r\n minHeight: 100,\r\n width: \"50%\",\r\n hideHeader: false,\r\n resizable: false,\r\n movable: false,\r\n modal: true,\r\n inset: true,\r\n trapFocus: false,\r\n };\r\n\r\n /** @internal */\r\n public override readonly state: Readonly<DialogState>;\r\n\r\n constructor(props: DialogProps) {\r\n super(props);\r\n this.state = {\r\n rightResizing: false,\r\n downResizing: false,\r\n moving: false,\r\n grabOffsetX: 0,\r\n grabOffsetY: 0,\r\n positionSet: props.x !== undefined || props.y !== undefined,\r\n };\r\n }\r\n\r\n private getParentWindow() {\r\n // istanbul ignore next\r\n return this._parentDocument.defaultView ?? window;\r\n }\r\n\r\n public override componentWillUnmount(): void {\r\n const parentWindow = this.getParentWindow();\r\n parentWindow.removeEventListener(\"pointerup\", this._handlePointerUp, true);\r\n parentWindow.removeEventListener(\"pointermove\", this._handlePointerMove, true);\r\n this._parentDocument.removeEventListener(\"keyup\", this._handleKeyUp, true);\r\n parentWindow.addEventListener(\"resize\", this._handleAppWindowResize);\r\n }\r\n\r\n /** Keep title bar of movable Dialog at least partially visible */\r\n // istanbul ignore next\r\n private _handleAppWindowResize = (): void => {\r\n if (!this._containerRef.current || !this.props.movable)\r\n return;\r\n\r\n const parentWindow = this.getParentWindow();\r\n const { x, y } = this.state;\r\n let newX: number | undefined;\r\n let newY: number | undefined;\r\n\r\n if (undefined !== y && undefined !== x) {\r\n if (y > parentWindow.innerHeight - 32)\r\n newY = parentWindow.innerHeight - 32;\r\n if (x > parentWindow.innerWidth - 32)\r\n newX = parentWindow.innerWidth - 32;\r\n }\r\n\r\n if (newX !== undefined || newY !== undefined)\r\n this.setState({ x: newX !== undefined ? newX : x, y: newY !== undefined ? newY : y, positionSet: true });\r\n };\r\n\r\n public override componentDidMount(): void {\r\n const parentWindow = this.getParentWindow();\r\n parentWindow.addEventListener(\"pointerup\", this._handlePointerUp, true);\r\n this._parentDocument.addEventListener(\"keyup\", this._handleKeyUp, true);\r\n parentWindow.addEventListener(\"resize\", this._handleAppWindowResize);\r\n }\r\n\r\n public handleRefSet = (containerDiv: HTMLDivElement | null) => {\r\n if (containerDiv)\r\n this._parentDocument = containerDiv.ownerDocument;\r\n };\r\n\r\n public override render(): JSX.Element {\r\n const {\r\n opened, title, footer, buttonCluster, onClose, onEscape, onOutsideClick, // eslint-disable-line @typescript-eslint/no-unused-vars\r\n minWidth, minHeight, x, y, width, height, maxHeight, maxWidth,\r\n backgroundStyle, titleStyle, footerStyle, style, contentStyle, contentClassName,\r\n modal, resizable, movable, className, alignment, inset, trapFocus, modelessId, onModelessPointerDown, // eslint-disable-line @typescript-eslint/no-unused-vars\r\n hideHeader, header, ...props } = this.props;\r\n\r\n const containerStyle: React.CSSProperties = {\r\n margin: \"\",\r\n left: x, top: y,\r\n width, height,\r\n };\r\n\r\n if (this.state.x !== undefined || this.state.y !== undefined) {\r\n // istanbul ignore else\r\n if (this.state.x !== undefined) {\r\n containerStyle.marginLeft = \"0\";\r\n containerStyle.marginRight = \"0\";\r\n containerStyle.left = this.state.x;\r\n }\r\n // istanbul ignore else\r\n if (this.state.y !== undefined) {\r\n containerStyle.marginTop = \"0\";\r\n containerStyle.marginBottom = \"0\";\r\n containerStyle.top = this.state.y;\r\n }\r\n }\r\n\r\n if (this.state.width !== undefined || this.state.height !== undefined) {\r\n // istanbul ignore else\r\n if (this.state.width !== undefined)\r\n containerStyle.width = this.state.width;\r\n // istanbul ignore else\r\n if (this.state.height !== undefined)\r\n containerStyle.height = this.state.height;\r\n }\r\n\r\n const minMaxStyle: React.CSSProperties = {};\r\n minMaxStyle.minWidth = (typeof minWidth === \"number\") ? `${minWidth}px` : minWidth;\r\n minMaxStyle.minHeight = (typeof minHeight === \"number\") ? `${minHeight}px` : minHeight;\r\n if (maxWidth !== undefined)\r\n minMaxStyle.maxWidth = (typeof maxWidth === \"number\") ? `${maxWidth}px` : maxWidth;\r\n if (maxHeight !== undefined)\r\n minMaxStyle.maxHeight = (typeof maxHeight === \"number\") ? `${maxHeight}px` : maxHeight;\r\n\r\n const buttons = this.getFooterButtons(this.props);\r\n\r\n const footerElement: React.ReactNode = footer || (buttons.length > 0 && <div className={\"core-dialog-buttons\"}>{buttons}</div>);\r\n\r\n const divStyle: React.CSSProperties = {\r\n ...backgroundStyle,\r\n ...style,\r\n };\r\n\r\n const headerElement = header || (\r\n <div\r\n className={classnames(\r\n \"core-dialog-head\",\r\n { \"core-dialog-movable\": movable },\r\n { \"core-dialog-modal\": modal }\r\n )}\r\n data-testid=\"core-dialog-head\"\r\n onPointerDown={this._handleStartMove}>\r\n <div className={\"core-dialog-title\"} data-testid=\"core-dialog-title\" style={titleStyle}>{title}</div>\r\n <button\r\n className={\"core-focus-trap-ignore-initial core-dialog-close icon\"}\r\n data-testid=\"core-dialog-close\"\r\n onClick={onClose}>\r\n <Icon iconSpec={<SvgClose />} />\r\n </button>\r\n </div>\r\n );\r\n\r\n return (\r\n <div ref={this.handleRefSet}\r\n className={classnames(\r\n \"core-dialog\",\r\n !modal && \"core-dialog-hidden\",\r\n opened && \"core-dialog-opened\",\r\n className,\r\n )}\r\n style={divStyle}\r\n data-testid=\"core-dialog-root\"\r\n {...props}\r\n >\r\n {opened &&\r\n <DivWithOutsideClick onOutsideClick={onOutsideClick}>\r\n <FocusTrap active={trapFocus && modal} returnFocusOnDeactivate={true}>\r\n <div\r\n className={classnames(\"core-dialog-container\", this.getCSSClassNameFromAlignment(alignment))}\r\n style={{ ...containerStyle, ...minMaxStyle }}\r\n data-testid=\"core-dialog-container\"\r\n onPointerDown={this._handleContainerPointerDown}\r\n >\r\n <div className={\"core-dialog-area\"} ref={this._containerRef} style={minMaxStyle}>\r\n {!hideHeader &&\r\n headerElement\r\n }\r\n <div\r\n className={classnames(\r\n \"core-dialog-content\",\r\n { \"core-dialog-content-no-inset\": !inset },\r\n contentClassName)}\r\n style={contentStyle}>\r\n {this.props.children}\r\n </div>\r\n {footerElement &&\r\n <div className={\"core-dialog-footer\"} style={footerStyle}>\r\n {footerElement}\r\n </div>\r\n }\r\n <div\r\n className={classnames(\"core-dialog-drag\", \"core-dialog-drag-right\", { \"core-dialog-drag-enabled\": resizable })}\r\n data-testid=\"core-dialog-drag-right\"\r\n onPointerDown={this._handleStartResizeRight}\r\n />\r\n <div\r\n className={classnames(\"core-dialog-drag\", \"core-dialog-drag-bottom-mid\", { \"core-dialog-drag-enabled\": resizable })}\r\n data-testid=\"core-dialog-drag-bottom\"\r\n onPointerDown={this._handleStartResizeDown}\r\n />\r\n <div\r\n className={classnames(\"core-dialog-drag\", \"core-dialog-drag-bottom-right\", { \"core-dialog-drag-enabled\": resizable })}\r\n data-testid=\"core-dialog-drag-bottom-right\"\r\n onPointerDown={this._handleStartResizeDownRight}\r\n />\r\n </div>\r\n </div>\r\n </FocusTrap>\r\n </DivWithOutsideClick>\r\n }\r\n </div>\r\n );\r\n }\r\n\r\n private getCSSClassNameFromAlignment(alignment?: DialogAlignment): string {\r\n let className = \"\";\r\n\r\n // Drop the alignment CSS class if the Dialog has been sized or moved.\r\n if (this.state.positionSet)\r\n return \"\";\r\n\r\n // istanbul ignore next\r\n if (!alignment)\r\n alignment = DialogAlignment.Center;\r\n\r\n switch (alignment) {\r\n case DialogAlignment.TopLeft:\r\n className = \"core-dialog-top-left\";\r\n break;\r\n case DialogAlignment.Top:\r\n className = \"core-dialog-top\";\r\n break;\r\n case DialogAlignment.TopRight:\r\n className = \"core-dialog-top-right\";\r\n break;\r\n case DialogAlignment.Left:\r\n className = \"core-dialog-left\";\r\n break;\r\n case DialogAlignment.Center:\r\n className = \"core-dialog-center\";\r\n break;\r\n case DialogAlignment.Right:\r\n className = \"core-dialog-right\";\r\n break;\r\n case DialogAlignment.BottomLeft:\r\n className = \"core-dialog-bottom-left\";\r\n break;\r\n case DialogAlignment.Bottom:\r\n className = \"core-dialog-bottom\";\r\n break;\r\n case DialogAlignment.BottomRight:\r\n className = \"core-dialog-bottom-right\";\r\n break;\r\n }\r\n\r\n return className;\r\n }\r\n\r\n private getFooterButtons(props: DialogProps) {\r\n const buttons: React.ReactNode[] = [];\r\n if (props.buttonCluster) {\r\n props.buttonCluster.forEach((button: DialogButtonDef, index: number) => {\r\n let buttonText = \"\";\r\n let buttonClass = classnames(\"core-dialog-button\", `dialog-button-${button.type}`, button.className);\r\n let styleType: \"default\" | \"cta\" | \"high-visibility\" | \"borderless\" | undefined;\r\n\r\n switch (button.type) {\r\n case DialogButtonType.OK:\r\n buttonText = UiCore.translate(\"dialog.ok\");\r\n buttonClass = classnames(buttonClass, button.buttonStyle);\r\n styleType = \"cta\";\r\n break;\r\n case DialogButtonType.Retry:\r\n buttonText = UiCore.translate(\"dialog.retry\");\r\n buttonClass = classnames(buttonClass, button.buttonStyle);\r\n styleType = \"cta\";\r\n break;\r\n case DialogButtonType.Yes:\r\n buttonText = UiCore.translate(\"dialog.yes\");\r\n buttonClass = classnames(buttonClass, button.buttonStyle);\r\n styleType = \"cta\";\r\n break;\r\n case DialogButtonType.No:\r\n buttonText = UiCore.translate(\"dialog.no\");\r\n buttonClass = classnames(buttonClass, button.buttonStyle);\r\n break;\r\n case DialogButtonType.Cancel:\r\n buttonText = UiCore.translate(\"dialog.cancel\");\r\n buttonClass = classnames(buttonClass, button.buttonStyle);\r\n break;\r\n case DialogButtonType.Close:\r\n buttonText = UiCore.translate(\"dialog.close\");\r\n buttonClass = classnames(buttonClass, button.buttonStyle);\r\n break;\r\n case DialogButtonType.Next:\r\n buttonText = UiCore.translate(\"dialog.next\");\r\n buttonClass = classnames(buttonClass, button.buttonStyle);\r\n styleType = \"cta\";\r\n break;\r\n case DialogButtonType.Previous:\r\n buttonText = UiCore.translate(\"dialog.previous\");\r\n buttonClass = classnames(buttonClass, button.buttonStyle);\r\n styleType = \"cta\";\r\n break;\r\n }\r\n\r\n if (button.label) buttonText = button.label;\r\n\r\n buttons.push(\r\n <Button\r\n className={buttonClass}\r\n disabled={button.disabled}\r\n styleType={styleType}\r\n key={index.toString()}\r\n onClick={button.onClick}\r\n >\r\n {buttonText}\r\n </Button>\r\n );\r\n });\r\n }\r\n return buttons;\r\n }\r\n\r\n private _handleKeyUp = (event: KeyboardEvent) => {\r\n if (event.key === SpecialKey.Escape && this.props.opened && this.props.onEscape) {\r\n this.props.onEscape();\r\n }\r\n };\r\n\r\n private _handleContainerPointerDown = (event: React.PointerEvent): void => {\r\n if (!this.props.modal) {\r\n if (this.props.onModelessPointerDown && this.props.modelessId)\r\n this.props.onModelessPointerDown(event, this.props.modelessId);\r\n }\r\n };\r\n\r\n private _handleStartResizeRight = (event: React.PointerEvent): void => {\r\n event.preventDefault();\r\n this.setState({ rightResizing: true });\r\n const parentWindow = this.getParentWindow();\r\n parentWindow.addEventListener(\"pointermove\", this._handlePointerMove, true);\r\n };\r\n\r\n private _handleStartResizeDown = (event: React.PointerEvent): void => {\r\n event.preventDefault();\r\n this.setState({ downResizing: true });\r\n const parentWindow = this.getParentWindow();\r\n parentWindow.addEventListener(\"pointermove\", this._handlePointerMove, true);\r\n };\r\n\r\n private _handleStartResizeDownRight = (event: React.PointerEvent): void => {\r\n event.preventDefault();\r\n this.setState({ downResizing: true, rightResizing: true });\r\n const parentWindow = this.getParentWindow();\r\n parentWindow.addEventListener(\"pointermove\", this._handlePointerMove, true);\r\n };\r\n\r\n private _handleStartMove = (event: React.PointerEvent): void => {\r\n if (!this.props.movable)\r\n return;\r\n\r\n event.preventDefault();\r\n // istanbul ignore else\r\n if (this._containerRef.current) {\r\n const rect = this._containerRef.current.getBoundingClientRect();\r\n const grabOffsetX = event.clientX - rect.left;\r\n const grabOffsetY = event.clientY - rect.top;\r\n this.setState({\r\n grabOffsetX,\r\n grabOffsetY,\r\n moving: true,\r\n });\r\n\r\n const parentWindow = this.getParentWindow();\r\n parentWindow.addEventListener(\"pointermove\", this._handlePointerMove, true);\r\n }\r\n };\r\n\r\n private _handlePointerMove = (event: PointerEvent): void => {\r\n if ((!this.props.resizable && !this.props.movable) || !this._containerRef.current)\r\n return;\r\n\r\n const { minWidth, maxWidth, minHeight, maxHeight, movable } = this.props;\r\n let { x, y, width, height } = this.state;\r\n\r\n // istanbul ignore else\r\n if (x === undefined) { // if x is undefined, so is y, width, and height\r\n const rect = this._containerRef.current.getBoundingClientRect();\r\n width = rect.width, height = rect.height, x = rect.left, y = rect.top;\r\n }\r\n\r\n if (this.props.resizable) {\r\n if (this.state.rightResizing) {\r\n const pointerX = event.clientX;\r\n width = pointerX - x;\r\n // istanbul ignore else\r\n if (typeof minWidth === \"number\")\r\n width = Math.max(width, minWidth);\r\n if (maxWidth !== undefined && typeof maxWidth === \"number\")\r\n width = Math.min(width, maxWidth);\r\n }\r\n\r\n if (this.state.downResizing) {\r\n const pointerY = event.clientY;\r\n height = pointerY - y!;\r\n // istanbul ignore else\r\n if (typeof minHeight === \"number\")\r\n height = Math.max(height, minHeight);\r\n if (maxHeight !== undefined && typeof maxHeight === \"number\")\r\n height = Math.min(height, maxHeight);\r\n }\r\n\r\n this.setState({ width, height });\r\n }\r\n\r\n // istanbul ignore next\r\n if (movable && this.state.moving) {\r\n x = event.clientX - this.state.grabOffsetX;\r\n y = event.clientY - this.state.grabOffsetY;\r\n if (y < 0)\r\n y = 0;\r\n if (event.view) {\r\n if (y > event.view.innerHeight - 32)\r\n y = event.view.innerHeight - 32;\r\n if (x > event.view.innerWidth - 32)\r\n x = event.view.innerWidth - 32;\r\n if (width) {\r\n if (x < (0 - width + 32))\r\n x = 0 - width + 32;\r\n }\r\n }\r\n\r\n this.setState({ x, y, positionSet: true });\r\n }\r\n };\r\n\r\n private _handlePointerUp = (_event: PointerEvent): void => {\r\n if (!this.props.movable && !this.props.resizable)\r\n return;\r\n\r\n // istanbul ignore else\r\n if (this._containerRef.current) {\r\n this.setState({\r\n rightResizing: false,\r\n downResizing: false,\r\n moving: false,\r\n grabOffsetX: 0,\r\n grabOffsetY: 0,\r\n });\r\n }\r\n\r\n const parentWindow = this.getParentWindow();\r\n parentWindow.removeEventListener(\"pointermove\", this._handlePointerMove, true);\r\n };\r\n}\r\n"]}
|
|
@@ -1,29 +1,29 @@
|
|
|
1
|
-
/** @packageDocumentation
|
|
2
|
-
* @module Dialog
|
|
3
|
-
*/
|
|
4
|
-
import * as React from "react";
|
|
5
|
-
import { DialogProps } from "./Dialog";
|
|
6
|
-
/** Properties for the [[GlobalDialog]] component
|
|
7
|
-
* @public
|
|
8
|
-
*/
|
|
9
|
-
export interface GlobalDialogProps extends DialogProps {
|
|
10
|
-
identifier?: string;
|
|
11
|
-
}
|
|
12
|
-
/** State properties for the [[GlobalDialog]] component
|
|
13
|
-
* @public
|
|
14
|
-
*/
|
|
15
|
-
export interface GlobalDialogState {
|
|
16
|
-
parentDocument: Document | null;
|
|
17
|
-
}
|
|
18
|
-
/** GlobalDialog React component used to display a [[Dialog]] on the top of screen
|
|
19
|
-
* @public
|
|
20
|
-
*/
|
|
21
|
-
export declare class GlobalDialog extends React.Component<GlobalDialogProps, GlobalDialogState> {
|
|
22
|
-
private _container?;
|
|
23
|
-
readonly state: GlobalDialogState;
|
|
24
|
-
constructor(props: GlobalDialogProps);
|
|
25
|
-
private _handleRefSet;
|
|
26
|
-
componentWillUnmount(): void;
|
|
27
|
-
render(): React.ReactNode;
|
|
28
|
-
}
|
|
1
|
+
/** @packageDocumentation
|
|
2
|
+
* @module Dialog
|
|
3
|
+
*/
|
|
4
|
+
import * as React from "react";
|
|
5
|
+
import { DialogProps } from "./Dialog";
|
|
6
|
+
/** Properties for the [[GlobalDialog]] component
|
|
7
|
+
* @public
|
|
8
|
+
*/
|
|
9
|
+
export interface GlobalDialogProps extends DialogProps {
|
|
10
|
+
identifier?: string;
|
|
11
|
+
}
|
|
12
|
+
/** State properties for the [[GlobalDialog]] component
|
|
13
|
+
* @public
|
|
14
|
+
*/
|
|
15
|
+
export interface GlobalDialogState {
|
|
16
|
+
parentDocument: Document | null;
|
|
17
|
+
}
|
|
18
|
+
/** GlobalDialog React component used to display a [[Dialog]] on the top of screen
|
|
19
|
+
* @public
|
|
20
|
+
*/
|
|
21
|
+
export declare class GlobalDialog extends React.Component<GlobalDialogProps, GlobalDialogState> {
|
|
22
|
+
private _container?;
|
|
23
|
+
readonly state: GlobalDialogState;
|
|
24
|
+
constructor(props: GlobalDialogProps);
|
|
25
|
+
private _handleRefSet;
|
|
26
|
+
componentWillUnmount(): void;
|
|
27
|
+
render(): React.ReactNode;
|
|
28
|
+
}
|
|
29
29
|
//# sourceMappingURL=GlobalDialog.d.ts.map
|
|
@@ -1,54 +1,53 @@
|
|
|
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
|
-
/** @packageDocumentation
|
|
7
|
-
* @module Dialog
|
|
8
|
-
*/
|
|
9
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
|
-
exports.GlobalDialog = void 0;
|
|
11
|
-
const React = require("react");
|
|
12
|
-
const ReactDOM = require("react-dom");
|
|
13
|
-
const Dialog_1 = require("./Dialog");
|
|
14
|
-
/** GlobalDialog React component used to display a [[Dialog]] on the top of screen
|
|
15
|
-
* @public
|
|
16
|
-
*/
|
|
17
|
-
class GlobalDialog extends React.Component {
|
|
18
|
-
constructor(props) {
|
|
19
|
-
super(props);
|
|
20
|
-
this.state = {
|
|
21
|
-
parentDocument: null,
|
|
22
|
-
};
|
|
23
|
-
this._handleRefSet = (popupDiv) => {
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
this._container =
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
rt =
|
|
32
|
-
rt
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
exports.GlobalDialog = GlobalDialog;
|
|
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
|
+
/** @packageDocumentation
|
|
7
|
+
* @module Dialog
|
|
8
|
+
*/
|
|
9
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
|
+
exports.GlobalDialog = void 0;
|
|
11
|
+
const React = require("react");
|
|
12
|
+
const ReactDOM = require("react-dom");
|
|
13
|
+
const Dialog_1 = require("./Dialog");
|
|
14
|
+
/** GlobalDialog React component used to display a [[Dialog]] on the top of screen
|
|
15
|
+
* @public
|
|
16
|
+
*/
|
|
17
|
+
class GlobalDialog extends React.Component {
|
|
18
|
+
constructor(props) {
|
|
19
|
+
super(props);
|
|
20
|
+
this.state = {
|
|
21
|
+
parentDocument: null,
|
|
22
|
+
};
|
|
23
|
+
this._handleRefSet = (popupDiv) => {
|
|
24
|
+
const parentDocument = popupDiv?.ownerDocument ?? null;
|
|
25
|
+
if (parentDocument) {
|
|
26
|
+
this._container = parentDocument.createElement("div");
|
|
27
|
+
this._container.id = this.props.identifier !== undefined ? `dialog-${this.props.identifier}` : "core-dialog";
|
|
28
|
+
let rt = parentDocument.getElementById("core-dialog-root");
|
|
29
|
+
if (!rt) {
|
|
30
|
+
rt = parentDocument.createElement("div");
|
|
31
|
+
rt.id = "core-dialog-root";
|
|
32
|
+
parentDocument.body.appendChild(rt);
|
|
33
|
+
}
|
|
34
|
+
rt.appendChild(this._container);
|
|
35
|
+
// used to support component rendering in pop-out window
|
|
36
|
+
this.setState({ parentDocument });
|
|
37
|
+
}
|
|
38
|
+
};
|
|
39
|
+
}
|
|
40
|
+
componentWillUnmount() {
|
|
41
|
+
// istanbul ignore else
|
|
42
|
+
if (this._container && this._container.parentElement) { // cleanup
|
|
43
|
+
this._container.parentElement.removeChild(this._container);
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
render() {
|
|
47
|
+
const { identifier, ...props } = this.props; // eslint-disable-line @typescript-eslint/no-unused-vars
|
|
48
|
+
return (React.createElement("div", { ref: this._handleRefSet }, this.state.parentDocument &&
|
|
49
|
+
ReactDOM.createPortal(React.createElement(Dialog_1.Dialog, { ...props }), this.state.parentDocument.body)));
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
exports.GlobalDialog = GlobalDialog;
|
|
54
53
|
//# sourceMappingURL=GlobalDialog.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GlobalDialog.js","sourceRoot":"","sources":["../../../../src/core-react/dialog/GlobalDialog.tsx"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,+BAA+B;AAC/B,sCAAsC;AACtC,qCAA+C;AAgB/C;;GAEG;AACH,MAAa,YAAa,SAAQ,KAAK,CAAC,SAA+C;IAOrF,YAAY,KAAwB;QAClC,KAAK,CAAC,KAAK,CAAC,CAAC;QALU,UAAK,GAAsB;YAClD,cAAc,EAAE,IAAI;SACrB,CAAC;QAMM,kBAAa,GAAG,CAAC,QAA4B,EAAE,EAAE
|
|
1
|
+
{"version":3,"file":"GlobalDialog.js","sourceRoot":"","sources":["../../../../src/core-react/dialog/GlobalDialog.tsx"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,+BAA+B;AAC/B,sCAAsC;AACtC,qCAA+C;AAgB/C;;GAEG;AACH,MAAa,YAAa,SAAQ,KAAK,CAAC,SAA+C;IAOrF,YAAY,KAAwB;QAClC,KAAK,CAAC,KAAK,CAAC,CAAC;QALU,UAAK,GAAsB;YAClD,cAAc,EAAE,IAAI;SACrB,CAAC;QAMM,kBAAa,GAAG,CAAC,QAA4B,EAAE,EAAE;YACvD,MAAM,cAAc,GAAG,QAAQ,EAAE,aAAa,IAAI,IAAI,CAAC;YACvD,IAAI,cAAc,EAAE;gBAClB,IAAI,CAAC,UAAU,GAAG,cAAc,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC;gBACtD,IAAI,CAAC,UAAU,CAAC,EAAE,GAAG,IAAI,CAAC,KAAK,CAAC,UAAU,KAAK,SAAS,CAAC,CAAC,CAAC,UAAU,IAAI,CAAC,KAAK,CAAC,UAAU,EAAE,CAAC,CAAC,CAAC,aAAa,CAAC;gBAC7G,IAAI,EAAE,GAAG,cAAc,CAAC,cAAc,CAAC,kBAAkB,CAAmB,CAAC;gBAC7E,IAAI,CAAC,EAAE,EAAE;oBACP,EAAE,GAAG,cAAc,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC;oBACzC,EAAE,CAAC,EAAE,GAAG,kBAAkB,CAAC;oBAC3B,cAAc,CAAC,IAAI,CAAC,WAAW,CAAC,EAAE,CAAC,CAAC;iBACrC;gBACD,EAAE,CAAC,WAAW,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;gBAEhC,wDAAwD;gBACxD,IAAI,CAAC,QAAQ,CAAC,EAAE,cAAc,EAAE,CAAC,CAAC;aACnC;QACH,CAAC,CAAC;IAlBF,CAAC;IAoBe,oBAAoB;QAClC,uBAAuB;QACvB,IAAI,IAAI,CAAC,UAAU,IAAI,IAAI,CAAC,UAAU,CAAC,aAAa,EAAE,EAAE,UAAU;YAChE,IAAI,CAAC,UAAU,CAAC,aAAa,CAAC,WAAW,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;SAC5D;IACH,CAAC;IAEe,MAAM;QACpB,MAAM,EAAE,UAAU,EAAE,GAAG,KAAK,EAAE,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC,wDAAwD;QACrG,OAAO,CACL,6BAAK,GAAG,EAAE,IAAI,CAAC,aAAa,IACzB,IAAI,CAAC,KAAK,CAAC,cAAc;YACxB,QAAQ,CAAC,YAAY,CAAC,oBAAC,eAAM,OAAK,KAAK,GAAI,EAAE,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,IAAI,CAAC,CAC1E,CACP,CAAC;IACJ,CAAC;CACF;AA7CD,oCA6CC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module Dialog\r\n */\r\n\r\nimport * as React from \"react\";\r\nimport * as ReactDOM from \"react-dom\";\r\nimport { Dialog, DialogProps } from \"./Dialog\";\r\n\r\n/** Properties for the [[GlobalDialog]] component\r\n * @public\r\n */\r\nexport interface GlobalDialogProps extends DialogProps {\r\n identifier?: string;\r\n}\r\n\r\n/** State properties for the [[GlobalDialog]] component\r\n * @public\r\n */\r\nexport interface GlobalDialogState {\r\n parentDocument: Document | null;\r\n}\r\n\r\n/** GlobalDialog React component used to display a [[Dialog]] on the top of screen\r\n * @public\r\n */\r\nexport class GlobalDialog extends React.Component<GlobalDialogProps, GlobalDialogState> {\r\n private _container?: HTMLDivElement;\r\n\r\n public override readonly state: GlobalDialogState = {\r\n parentDocument: null,\r\n };\r\n\r\n constructor(props: GlobalDialogProps) {\r\n super(props);\r\n }\r\n\r\n private _handleRefSet = (popupDiv: HTMLElement | null) => {\r\n const parentDocument = popupDiv?.ownerDocument ?? null;\r\n if (parentDocument) {\r\n this._container = parentDocument.createElement(\"div\");\r\n this._container.id = this.props.identifier !== undefined ? `dialog-${this.props.identifier}` : \"core-dialog\";\r\n let rt = parentDocument.getElementById(\"core-dialog-root\") as HTMLDivElement;\r\n if (!rt) {\r\n rt = parentDocument.createElement(\"div\");\r\n rt.id = \"core-dialog-root\";\r\n parentDocument.body.appendChild(rt);\r\n }\r\n rt.appendChild(this._container);\r\n\r\n // used to support component rendering in pop-out window\r\n this.setState({ parentDocument });\r\n }\r\n };\r\n\r\n public override componentWillUnmount() {\r\n // istanbul ignore else\r\n if (this._container && this._container.parentElement) { // cleanup\r\n this._container.parentElement.removeChild(this._container);\r\n }\r\n }\r\n\r\n public override render(): React.ReactNode {\r\n const { identifier, ...props } = this.props; // eslint-disable-line @typescript-eslint/no-unused-vars\r\n return (\r\n <div ref={this._handleRefSet}>\r\n {this.state.parentDocument &&\r\n ReactDOM.createPortal(<Dialog {...props} />, this.state.parentDocument.body)}\r\n </div>\r\n );\r\n }\r\n}\r\n"]}
|
|
@@ -1,42 +1,42 @@
|
|
|
1
|
-
/** @packageDocumentation
|
|
2
|
-
* @module ElementSeparator
|
|
3
|
-
*/
|
|
4
|
-
/// <reference types="react" />
|
|
5
|
-
import "./ElementSeparator.scss";
|
|
6
|
-
import { Orientation } from "../enums/Orientation";
|
|
7
|
-
import { CommonProps } from "../utils/Props";
|
|
8
|
-
/**
|
|
9
|
-
* Results returned by onRatioChanged callback for determining new ratio and whether the ratio was updated.
|
|
10
|
-
* @public
|
|
11
|
-
*/
|
|
12
|
-
export interface RatioChangeResult {
|
|
13
|
-
ratio: number;
|
|
14
|
-
}
|
|
15
|
-
/** Properties of [[ElementSeparator]] React component
|
|
16
|
-
* @public
|
|
17
|
-
*/
|
|
18
|
-
export interface ElementSeparatorProps extends CommonProps {
|
|
19
|
-
/** Separator orientation */
|
|
20
|
-
orientation: Orientation;
|
|
21
|
-
/** Ratio between left cell and right cell */
|
|
22
|
-
ratio: number;
|
|
23
|
-
/** Area width or height (depending on orientation) in pixels */
|
|
24
|
-
movableArea?: number;
|
|
25
|
-
/** Separator width or height in pixels. 30 by default */
|
|
26
|
-
separatorSize?: number;
|
|
27
|
-
/** Callback to ratio changed event */
|
|
28
|
-
onRatioChanged?: (ratio: number) => void | RatioChangeResult;
|
|
29
|
-
/** Is resize handle hovered */
|
|
30
|
-
isResizeHandleHovered?: boolean;
|
|
31
|
-
/** Callback to hover event change */
|
|
32
|
-
onResizeHandleHoverChanged?: (isHovered: boolean) => void;
|
|
33
|
-
/** Is resize handle being dragged */
|
|
34
|
-
isResizeHandleBeingDragged?: boolean;
|
|
35
|
-
/** Callback to drag event change */
|
|
36
|
-
onResizeHandleDragChanged?: (isDragStarted: boolean) => void;
|
|
37
|
-
}
|
|
38
|
-
/** A movable button, which allows to change the ratio between left element and right element
|
|
39
|
-
* @public
|
|
40
|
-
*/
|
|
41
|
-
export declare const ElementSeparator: (props: ElementSeparatorProps) => JSX.Element;
|
|
1
|
+
/** @packageDocumentation
|
|
2
|
+
* @module ElementSeparator
|
|
3
|
+
*/
|
|
4
|
+
/// <reference types="react" />
|
|
5
|
+
import "./ElementSeparator.scss";
|
|
6
|
+
import { Orientation } from "../enums/Orientation";
|
|
7
|
+
import { CommonProps } from "../utils/Props";
|
|
8
|
+
/**
|
|
9
|
+
* Results returned by onRatioChanged callback for determining new ratio and whether the ratio was updated.
|
|
10
|
+
* @public
|
|
11
|
+
*/
|
|
12
|
+
export interface RatioChangeResult {
|
|
13
|
+
ratio: number;
|
|
14
|
+
}
|
|
15
|
+
/** Properties of [[ElementSeparator]] React component
|
|
16
|
+
* @public
|
|
17
|
+
*/
|
|
18
|
+
export interface ElementSeparatorProps extends CommonProps {
|
|
19
|
+
/** Separator orientation */
|
|
20
|
+
orientation: Orientation;
|
|
21
|
+
/** Ratio between left cell and right cell */
|
|
22
|
+
ratio: number;
|
|
23
|
+
/** Area width or height (depending on orientation) in pixels */
|
|
24
|
+
movableArea?: number;
|
|
25
|
+
/** Separator width or height in pixels. 30 by default */
|
|
26
|
+
separatorSize?: number;
|
|
27
|
+
/** Callback to ratio changed event */
|
|
28
|
+
onRatioChanged?: (ratio: number) => void | RatioChangeResult;
|
|
29
|
+
/** Is resize handle hovered */
|
|
30
|
+
isResizeHandleHovered?: boolean;
|
|
31
|
+
/** Callback to hover event change */
|
|
32
|
+
onResizeHandleHoverChanged?: (isHovered: boolean) => void;
|
|
33
|
+
/** Is resize handle being dragged */
|
|
34
|
+
isResizeHandleBeingDragged?: boolean;
|
|
35
|
+
/** Callback to drag event change */
|
|
36
|
+
onResizeHandleDragChanged?: (isDragStarted: boolean) => void;
|
|
37
|
+
}
|
|
38
|
+
/** A movable button, which allows to change the ratio between left element and right element
|
|
39
|
+
* @public
|
|
40
|
+
*/
|
|
41
|
+
export declare const ElementSeparator: (props: ElementSeparatorProps) => JSX.Element;
|
|
42
42
|
//# sourceMappingURL=ElementSeparator.d.ts.map
|