@itwin/appui-react 3.1.0-dev.8 → 3.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +151 -16
- package/lib/cjs/appui-react/UiFramework.d.ts +4 -2
- package/lib/cjs/appui-react/UiFramework.d.ts.map +1 -1
- package/lib/cjs/appui-react/UiFramework.js +7 -3
- package/lib/cjs/appui-react/UiFramework.js.map +1 -1
- package/lib/cjs/appui-react/accudraw/AccuDrawInputField.js +1 -1
- package/lib/cjs/appui-react/accudraw/AccuDrawInputField.js.map +1 -1
- package/lib/cjs/appui-react/backstage/Backstage.d.ts +0 -2
- package/lib/cjs/appui-react/backstage/Backstage.d.ts.map +1 -1
- package/lib/cjs/appui-react/backstage/Backstage.js +0 -1
- package/lib/cjs/appui-react/backstage/Backstage.js.map +1 -1
- package/lib/cjs/appui-react/backstage/BackstageComposerItem.d.ts +1 -0
- package/lib/cjs/appui-react/backstage/BackstageComposerItem.d.ts.map +1 -1
- package/lib/cjs/appui-react/backstage/BackstageComposerItem.js +2 -2
- package/lib/cjs/appui-react/backstage/BackstageComposerItem.js.map +1 -1
- package/lib/cjs/appui-react/configurableui/ConfigurableUiContent.d.ts.map +1 -1
- package/lib/cjs/appui-react/configurableui/ConfigurableUiContent.js +2 -0
- package/lib/cjs/appui-react/configurableui/ConfigurableUiContent.js.map +1 -1
- package/lib/cjs/appui-react/configurableui/ConfigurableUiManager.d.ts.map +1 -1
- package/lib/cjs/appui-react/configurableui/ConfigurableUiManager.js +6 -1
- package/lib/cjs/appui-react/configurableui/ConfigurableUiManager.js.map +1 -1
- package/lib/cjs/appui-react/content/ContentControl.d.ts +6 -0
- package/lib/cjs/appui-react/content/ContentControl.d.ts.map +1 -1
- package/lib/cjs/appui-react/content/ContentControl.js +11 -1
- package/lib/cjs/appui-react/content/ContentControl.js.map +1 -1
- package/lib/cjs/appui-react/content/ContentLayout.d.ts +8 -0
- package/lib/cjs/appui-react/content/ContentLayout.d.ts.map +1 -1
- package/lib/cjs/appui-react/content/ContentLayout.js +43 -36
- package/lib/cjs/appui-react/content/ContentLayout.js.map +1 -1
- package/lib/cjs/appui-react/content/ContentLayout.scss +27 -27
- package/lib/cjs/appui-react/content/ContentViewManager.d.ts +7 -0
- package/lib/cjs/appui-react/content/ContentViewManager.d.ts.map +1 -1
- package/lib/cjs/appui-react/content/ContentViewManager.js +46 -22
- package/lib/cjs/appui-react/content/ContentViewManager.js.map +1 -1
- package/lib/cjs/appui-react/content/FloatingViewportContent.css +9 -0
- package/lib/cjs/appui-react/content/FloatingViewportContent.d.ts +25 -0
- package/lib/cjs/appui-react/content/FloatingViewportContent.d.ts.map +1 -0
- package/lib/cjs/appui-react/content/FloatingViewportContent.js +73 -0
- package/lib/cjs/appui-react/content/FloatingViewportContent.js.map +1 -0
- package/lib/cjs/appui-react/content/IModelViewport.d.ts +1 -1
- package/lib/cjs/appui-react/content/IModelViewport.d.ts.map +1 -1
- package/lib/cjs/appui-react/content/IModelViewport.js +1 -1
- package/lib/cjs/appui-react/content/IModelViewport.js.map +1 -1
- package/lib/cjs/appui-react/content/ViewportContentControl.d.ts +9 -0
- package/lib/cjs/appui-react/content/ViewportContentControl.d.ts.map +1 -1
- package/lib/cjs/appui-react/content/ViewportContentControl.js +24 -1
- package/lib/cjs/appui-react/content/ViewportContentControl.js.map +1 -1
- package/lib/cjs/appui-react/dialog/ContentDialog.d.ts +24 -0
- package/lib/cjs/appui-react/dialog/ContentDialog.d.ts.map +1 -0
- package/lib/cjs/appui-react/dialog/ContentDialog.js +72 -0
- package/lib/cjs/appui-react/dialog/ContentDialog.js.map +1 -0
- package/lib/cjs/appui-react/dialog/ContentDialog.scss +25 -0
- package/lib/cjs/appui-react/dialog/ContentDialogManager.d.ts +65 -0
- package/lib/cjs/appui-react/dialog/ContentDialogManager.d.ts.map +1 -0
- package/lib/cjs/appui-react/dialog/ContentDialogManager.js +148 -0
- package/lib/cjs/appui-react/dialog/ContentDialogManager.js.map +1 -0
- package/lib/cjs/appui-react/frontstage/FrontstageDef.d.ts +9 -0
- package/lib/cjs/appui-react/frontstage/FrontstageDef.d.ts.map +1 -1
- package/lib/cjs/appui-react/frontstage/FrontstageDef.js +65 -7
- package/lib/cjs/appui-react/frontstage/FrontstageDef.js.map +1 -1
- package/lib/cjs/appui-react/frontstage/FrontstageManager.d.ts +3 -0
- package/lib/cjs/appui-react/frontstage/FrontstageManager.d.ts.map +1 -1
- package/lib/cjs/appui-react/frontstage/FrontstageManager.js +8 -0
- package/lib/cjs/appui-react/frontstage/FrontstageManager.js.map +1 -1
- package/lib/cjs/appui-react/hooks/useUiVisibility.d.ts +6 -0
- package/lib/cjs/appui-react/hooks/useUiVisibility.d.ts.map +1 -0
- package/lib/cjs/appui-react/hooks/useUiVisibility.js +27 -0
- package/lib/cjs/appui-react/hooks/useUiVisibility.js.map +1 -0
- package/lib/cjs/appui-react/imodel-components/category-tree/CategoryVisibilityHandler.d.ts.map +1 -1
- package/lib/cjs/appui-react/imodel-components/category-tree/CategoryVisibilityHandler.js +2 -1
- package/lib/cjs/appui-react/imodel-components/category-tree/CategoryVisibilityHandler.js.map +1 -1
- package/lib/cjs/appui-react/imodel-components/models-tree/ModelsTreeSearch.json +3 -3
- package/lib/cjs/appui-react/popup/CardPopup.scss +3 -1
- package/lib/cjs/appui-react/stagepanels/StagePanelDef.d.ts +2 -3
- package/lib/cjs/appui-react/stagepanels/StagePanelDef.d.ts.map +1 -1
- package/lib/cjs/appui-react/stagepanels/StagePanelDef.js +2 -3
- package/lib/cjs/appui-react/stagepanels/StagePanelDef.js.map +1 -1
- package/lib/cjs/appui-react/statusbar/StatusBarComposer.d.ts +3 -0
- package/lib/cjs/appui-react/statusbar/StatusBarComposer.d.ts.map +1 -1
- package/lib/cjs/appui-react/statusbar/StatusBarComposer.js +20 -5
- package/lib/cjs/appui-react/statusbar/StatusBarComposer.js.map +1 -1
- package/lib/cjs/appui-react/timeline/AnalysisAnimationProvider.js +1 -1
- package/lib/cjs/appui-react/timeline/AnalysisAnimationProvider.js.map +1 -1
- package/lib/cjs/appui-react/uiprovider/DefaultDialogGridContainer.scss +3 -0
- package/lib/cjs/appui-react/widget-panels/Content.d.ts.map +1 -1
- package/lib/cjs/appui-react/widget-panels/Content.js +2 -2
- package/lib/cjs/appui-react/widget-panels/Content.js.map +1 -1
- package/lib/cjs/appui-react/widget-panels/Frontstage.d.ts.map +1 -1
- package/lib/cjs/appui-react/widget-panels/Frontstage.js +25 -7
- package/lib/cjs/appui-react/widget-panels/Frontstage.js.map +1 -1
- package/lib/cjs/appui-react/widgets/BasicNavigationWidget.js +2 -2
- package/lib/cjs/appui-react/widgets/BasicNavigationWidget.js.map +1 -1
- package/lib/cjs/appui-react/widgets/BasicToolWidget.d.ts +0 -2
- package/lib/cjs/appui-react/widgets/BasicToolWidget.d.ts.map +1 -1
- package/lib/cjs/appui-react/widgets/BasicToolWidget.js +3 -17
- package/lib/cjs/appui-react/widgets/BasicToolWidget.js.map +1 -1
- package/lib/cjs/appui-react/widgets/ContentToolWidgetComposer.js +2 -2
- package/lib/cjs/appui-react/widgets/ContentToolWidgetComposer.js.map +1 -1
- package/lib/cjs/appui-react/widgets/ViewToolWidgetComposer.js +2 -2
- package/lib/cjs/appui-react/widgets/ViewToolWidgetComposer.js.map +1 -1
- package/lib/cjs/appui-react/widgets/WidgetDef.d.ts +2 -0
- package/lib/cjs/appui-react/widgets/WidgetDef.d.ts.map +1 -1
- package/lib/cjs/appui-react/widgets/WidgetDef.js +2 -0
- package/lib/cjs/appui-react/widgets/WidgetDef.js.map +1 -1
- package/lib/cjs/appui-react/widgets/WidgetManager.js +1 -1
- package/lib/cjs/appui-react/widgets/WidgetManager.js.map +1 -1
- package/lib/cjs/appui-react.d.ts +4 -0
- package/lib/cjs/appui-react.d.ts.map +1 -1
- package/lib/cjs/appui-react.js +4 -0
- package/lib/cjs/appui-react.js.map +1 -1
- package/lib/esm/appui-react/UiFramework.d.ts +4 -2
- package/lib/esm/appui-react/UiFramework.d.ts.map +1 -1
- package/lib/esm/appui-react/UiFramework.js +7 -3
- package/lib/esm/appui-react/UiFramework.js.map +1 -1
- package/lib/esm/appui-react/accudraw/AccuDrawInputField.js +1 -1
- package/lib/esm/appui-react/accudraw/AccuDrawInputField.js.map +1 -1
- package/lib/esm/appui-react/backstage/Backstage.d.ts +0 -2
- package/lib/esm/appui-react/backstage/Backstage.d.ts.map +1 -1
- package/lib/esm/appui-react/backstage/Backstage.js +0 -1
- package/lib/esm/appui-react/backstage/Backstage.js.map +1 -1
- package/lib/esm/appui-react/backstage/BackstageComposerItem.d.ts +1 -0
- package/lib/esm/appui-react/backstage/BackstageComposerItem.d.ts.map +1 -1
- package/lib/esm/appui-react/backstage/BackstageComposerItem.js +2 -2
- package/lib/esm/appui-react/backstage/BackstageComposerItem.js.map +1 -1
- package/lib/esm/appui-react/configurableui/ConfigurableUiContent.d.ts.map +1 -1
- package/lib/esm/appui-react/configurableui/ConfigurableUiContent.js +2 -0
- package/lib/esm/appui-react/configurableui/ConfigurableUiContent.js.map +1 -1
- package/lib/esm/appui-react/configurableui/ConfigurableUiManager.d.ts.map +1 -1
- package/lib/esm/appui-react/configurableui/ConfigurableUiManager.js +6 -1
- package/lib/esm/appui-react/configurableui/ConfigurableUiManager.js.map +1 -1
- package/lib/esm/appui-react/content/ContentControl.d.ts +6 -0
- package/lib/esm/appui-react/content/ContentControl.d.ts.map +1 -1
- package/lib/esm/appui-react/content/ContentControl.js +10 -1
- package/lib/esm/appui-react/content/ContentControl.js.map +1 -1
- package/lib/esm/appui-react/content/ContentLayout.d.ts +8 -0
- package/lib/esm/appui-react/content/ContentLayout.d.ts.map +1 -1
- package/lib/esm/appui-react/content/ContentLayout.js +41 -35
- package/lib/esm/appui-react/content/ContentLayout.js.map +1 -1
- package/lib/esm/appui-react/content/ContentLayout.scss +27 -27
- package/lib/esm/appui-react/content/ContentViewManager.d.ts +7 -0
- package/lib/esm/appui-react/content/ContentViewManager.d.ts.map +1 -1
- package/lib/esm/appui-react/content/ContentViewManager.js +46 -22
- package/lib/esm/appui-react/content/ContentViewManager.js.map +1 -1
- package/lib/esm/appui-react/content/FloatingViewportContent.css +9 -0
- package/lib/esm/appui-react/content/FloatingViewportContent.d.ts +25 -0
- package/lib/esm/appui-react/content/FloatingViewportContent.d.ts.map +1 -0
- package/lib/esm/appui-react/content/FloatingViewportContent.js +69 -0
- package/lib/esm/appui-react/content/FloatingViewportContent.js.map +1 -0
- package/lib/esm/appui-react/content/IModelViewport.d.ts +1 -1
- package/lib/esm/appui-react/content/IModelViewport.d.ts.map +1 -1
- package/lib/esm/appui-react/content/IModelViewport.js +1 -1
- package/lib/esm/appui-react/content/IModelViewport.js.map +1 -1
- package/lib/esm/appui-react/content/ViewportContentControl.d.ts +9 -0
- package/lib/esm/appui-react/content/ViewportContentControl.d.ts.map +1 -1
- package/lib/esm/appui-react/content/ViewportContentControl.js +23 -1
- package/lib/esm/appui-react/content/ViewportContentControl.js.map +1 -1
- package/lib/esm/appui-react/dialog/ContentDialog.d.ts +24 -0
- package/lib/esm/appui-react/dialog/ContentDialog.d.ts.map +1 -0
- package/lib/esm/appui-react/dialog/ContentDialog.js +67 -0
- package/lib/esm/appui-react/dialog/ContentDialog.js.map +1 -0
- package/lib/esm/appui-react/dialog/ContentDialog.scss +25 -0
- package/lib/esm/appui-react/dialog/ContentDialogManager.d.ts +65 -0
- package/lib/esm/appui-react/dialog/ContentDialogManager.d.ts.map +1 -0
- package/lib/esm/appui-react/dialog/ContentDialogManager.js +142 -0
- package/lib/esm/appui-react/dialog/ContentDialogManager.js.map +1 -0
- package/lib/esm/appui-react/frontstage/FrontstageDef.d.ts +9 -0
- package/lib/esm/appui-react/frontstage/FrontstageDef.d.ts.map +1 -1
- package/lib/esm/appui-react/frontstage/FrontstageDef.js +66 -8
- package/lib/esm/appui-react/frontstage/FrontstageDef.js.map +1 -1
- package/lib/esm/appui-react/frontstage/FrontstageManager.d.ts +3 -0
- package/lib/esm/appui-react/frontstage/FrontstageManager.d.ts.map +1 -1
- package/lib/esm/appui-react/frontstage/FrontstageManager.js +8 -0
- package/lib/esm/appui-react/frontstage/FrontstageManager.js.map +1 -1
- package/lib/esm/appui-react/hooks/useUiVisibility.d.ts +6 -0
- package/lib/esm/appui-react/hooks/useUiVisibility.d.ts.map +1 -0
- package/lib/esm/appui-react/hooks/useUiVisibility.js +23 -0
- package/lib/esm/appui-react/hooks/useUiVisibility.js.map +1 -0
- package/lib/esm/appui-react/imodel-components/category-tree/CategoryVisibilityHandler.d.ts.map +1 -1
- package/lib/esm/appui-react/imodel-components/category-tree/CategoryVisibilityHandler.js +2 -1
- package/lib/esm/appui-react/imodel-components/category-tree/CategoryVisibilityHandler.js.map +1 -1
- package/lib/esm/appui-react/imodel-components/models-tree/ModelsTreeSearch.json +3 -3
- package/lib/esm/appui-react/popup/CardPopup.scss +3 -1
- package/lib/esm/appui-react/stagepanels/StagePanelDef.d.ts +2 -3
- package/lib/esm/appui-react/stagepanels/StagePanelDef.d.ts.map +1 -1
- package/lib/esm/appui-react/stagepanels/StagePanelDef.js +1 -2
- package/lib/esm/appui-react/stagepanels/StagePanelDef.js.map +1 -1
- package/lib/esm/appui-react/statusbar/StatusBarComposer.d.ts +3 -0
- package/lib/esm/appui-react/statusbar/StatusBarComposer.d.ts.map +1 -1
- package/lib/esm/appui-react/statusbar/StatusBarComposer.js +20 -5
- package/lib/esm/appui-react/statusbar/StatusBarComposer.js.map +1 -1
- package/lib/esm/appui-react/timeline/AnalysisAnimationProvider.js +1 -1
- package/lib/esm/appui-react/timeline/AnalysisAnimationProvider.js.map +1 -1
- package/lib/esm/appui-react/uiprovider/DefaultDialogGridContainer.scss +3 -0
- package/lib/esm/appui-react/widget-panels/Content.d.ts.map +1 -1
- package/lib/esm/appui-react/widget-panels/Content.js +2 -2
- package/lib/esm/appui-react/widget-panels/Content.js.map +1 -1
- package/lib/esm/appui-react/widget-panels/Frontstage.d.ts.map +1 -1
- package/lib/esm/appui-react/widget-panels/Frontstage.js +25 -7
- package/lib/esm/appui-react/widget-panels/Frontstage.js.map +1 -1
- package/lib/esm/appui-react/widgets/BasicNavigationWidget.js +1 -1
- package/lib/esm/appui-react/widgets/BasicNavigationWidget.js.map +1 -1
- package/lib/esm/appui-react/widgets/BasicToolWidget.d.ts +0 -2
- package/lib/esm/appui-react/widgets/BasicToolWidget.d.ts.map +1 -1
- package/lib/esm/appui-react/widgets/BasicToolWidget.js +1 -14
- package/lib/esm/appui-react/widgets/BasicToolWidget.js.map +1 -1
- package/lib/esm/appui-react/widgets/ContentToolWidgetComposer.js +1 -1
- package/lib/esm/appui-react/widgets/ContentToolWidgetComposer.js.map +1 -1
- package/lib/esm/appui-react/widgets/ViewToolWidgetComposer.js +1 -1
- package/lib/esm/appui-react/widgets/ViewToolWidgetComposer.js.map +1 -1
- package/lib/esm/appui-react/widgets/WidgetDef.d.ts +2 -0
- package/lib/esm/appui-react/widgets/WidgetDef.d.ts.map +1 -1
- package/lib/esm/appui-react/widgets/WidgetDef.js +2 -0
- package/lib/esm/appui-react/widgets/WidgetDef.js.map +1 -1
- package/lib/esm/appui-react/widgets/WidgetManager.js +1 -1
- package/lib/esm/appui-react/widgets/WidgetManager.js.map +1 -1
- package/lib/esm/appui-react.d.ts +4 -0
- package/lib/esm/appui-react.d.ts.map +1 -1
- package/lib/esm/appui-react.js +4 -0
- package/lib/esm/appui-react.js.map +1 -1
- package/package.json +34 -35
package/CHANGELOG.md
CHANGED
|
@@ -1,6 +1,141 @@
|
|
|
1
1
|
# Change Log - @itwin/appui-react
|
|
2
2
|
|
|
3
|
-
This log was last generated on
|
|
3
|
+
This log was last generated on Tue, 29 Mar 2022 20:53:46 GMT and should not be manually modified.
|
|
4
|
+
|
|
5
|
+
## 3.1.0
|
|
6
|
+
Tue, 29 Mar 2022 20:53:46 GMT
|
|
7
|
+
|
|
8
|
+
### Updates
|
|
9
|
+
|
|
10
|
+
- Fix missing parameter in UiManager.getWidgets call and pass provider to isSupportedStage function.
|
|
11
|
+
- Allow initial UI version to be set when UIFramework is initialized.
|
|
12
|
+
- Optimize ModelsTree search ruleset
|
|
13
|
+
- Add data attributes to identify item and its UI provider.
|
|
14
|
+
- Added ContentDialogManager, ContentDialog, and FloatingViewportContentControl to allow imodel viewport in a modeless dialog.
|
|
15
|
+
- Add the ability to Open a collapsed Panel when a request to Open a widget in a collapsed panel is made.
|
|
16
|
+
- Update to itwinui-css version "0.44.0".
|
|
17
|
+
- Fix spelling error in function documentation.
|
|
18
|
+
- Update to @itwin/itwinui-react: 1.32.0
|
|
19
|
+
- Update to latest itwinui-react - requires new compile option allowSyntheticDefaultImports=true.
|
|
20
|
+
|
|
21
|
+
## 3.0.3
|
|
22
|
+
Fri, 25 Mar 2022 15:10:01 GMT
|
|
23
|
+
|
|
24
|
+
_Version update only_
|
|
25
|
+
|
|
26
|
+
## 3.0.2
|
|
27
|
+
Thu, 10 Mar 2022 21:18:13 GMT
|
|
28
|
+
|
|
29
|
+
### Updates
|
|
30
|
+
|
|
31
|
+
- Optimize ModelsTree search ruleset
|
|
32
|
+
- Make fix to displaying a custom view overlay.
|
|
33
|
+
|
|
34
|
+
## 3.0.1
|
|
35
|
+
Thu, 24 Feb 2022 15:26:55 GMT
|
|
36
|
+
|
|
37
|
+
### Updates
|
|
38
|
+
|
|
39
|
+
- React to 3.0 breaking change w.r.t ECSQL Query Row Format
|
|
40
|
+
- Respect min/max size when initializing a panel.
|
|
41
|
+
- Provide FrontstageManager.clearFrontstageProviders method to clear out static maps.
|
|
42
|
+
- Add FrontstageDef.isWidgetDisplayed() to allow apps to query whether their widget is visible.
|
|
43
|
+
- Update ToolbarAutoHidePopup context when widgets autohide.
|
|
44
|
+
- Change initializeNineZoneState to properly handle floating widgets.
|
|
45
|
+
- Remove unecessary dependency on itwin/browser-authorization
|
|
46
|
+
|
|
47
|
+
## 3.0.0
|
|
48
|
+
Mon, 24 Jan 2022 14:00:52 GMT
|
|
49
|
+
|
|
50
|
+
### Updates
|
|
51
|
+
|
|
52
|
+
- Update ClearHideIsolateEmphasize Tool button definition to work on Models and Categories as well as Elements.
|
|
53
|
+
- The Cartographic creation API now takes an interface as an argument with named properties. This will avoid callers mixing up the order of longitude, latitude, and height.
|
|
54
|
+
- Update colorpicker to support RGB input
|
|
55
|
+
- fix code for breaking change to .query() method
|
|
56
|
+
- Existing ruleset configurations were updated to no longer use deprecated rule versions for iModel.js 3.0.
|
|
57
|
+
- Upgrade target to ES2019 and deliver both a CommonJs and ESModule version of package
|
|
58
|
+
- export CategoryVisibilityHandler
|
|
59
|
+
- Fix ecsql row format
|
|
60
|
+
- getAccessToken always returns a token
|
|
61
|
+
- rename contextId -> iTwinId
|
|
62
|
+
- updated @itwin/browser-authorization to 0.3.1
|
|
63
|
+
- rename to @itwin/appui-react
|
|
64
|
+
- Added UserInfo from itwin-client
|
|
65
|
+
- remove ClientRequestContext and its subclasses
|
|
66
|
+
- Made ConfigurableUiManager.closeUi() public
|
|
67
|
+
- Removed OIDC signin/signout and UserProfileBackstageItem
|
|
68
|
+
- Improve performance of determining visibility state of element and element grouping nodes.
|
|
69
|
+
- Removed 'ModelsTreeProps.enablePreloading' flag
|
|
70
|
+
- Promote standard UI providers from beta to public
|
|
71
|
+
- Initialize StateManager store if necessary during UiFramework initialization.
|
|
72
|
+
- Replace usage of I18N with generic Localization interface.
|
|
73
|
+
- Remove use of UiItemsArbiter
|
|
74
|
+
- Remove UserInfo completely
|
|
75
|
+
- Update snapshots
|
|
76
|
+
- Replaced ContextRegistry with generalized ITwinAccess interface
|
|
77
|
+
- Renamed an iModel's parent container to iTwin
|
|
78
|
+
- Removed references to the deleted config-loader package
|
|
79
|
+
- tool.run and tool.parseAndRun are now async methods
|
|
80
|
+
- Support for TypeDoc v0.22.7. Fix various broken docs links.
|
|
81
|
+
- Refactor SynchUiEventDispatcher to use new UiEventDispatcher from appui-abstract. Deprecate obsolete code.
|
|
82
|
+
- Refactored part of AccuDraw UI & Providing AccuDraw UI documentation
|
|
83
|
+
- Create empty frontstage and UiItemsProviders to populate it and update how ContentGroups are defined.
|
|
84
|
+
- Add missing public/beta types to the barrel file.
|
|
85
|
+
- Add required `width` and `height` props for `CategoryTree`, `ModelsTree` and `SpatialContainmentTree`.
|
|
86
|
+
- Remove `IModelConnectedCategoryTree`, `IModelConnectedModelsTree` and `IModelConnectedSpatialContainmentTree`.
|
|
87
|
+
- Remove deprecated `CategoryTreeWithSearchBox`.
|
|
88
|
+
- Remove deprecated `VisibilityComponent`, `VisibilityWidget` and related types.
|
|
89
|
+
- Clean up deprecated Drag & Drop related APIs
|
|
90
|
+
- Add state variable to control display of view overlay in the viewports.
|
|
91
|
+
- Update to default to using UI2.0/AppUI.
|
|
92
|
+
- Deprecate and promote apis
|
|
93
|
+
- Deprecate obsolete APIs. Publish beta APIs from last release.
|
|
94
|
+
- Update links in API doc comments.
|
|
95
|
+
- Make it possible to set label and execute function for BackstageAppButton
|
|
96
|
+
- Upgraded itwinui-react to 1.16.2. Fixed editor sizes.
|
|
97
|
+
- Ensure duplicate items provided via UiItemProviders are filtered out and only one item per Id is used.
|
|
98
|
+
- Add ability to remove stage launcher entry from backstage if only one stage is available.
|
|
99
|
+
- Remove files generated by bad merge
|
|
100
|
+
- Fix bug where ConditionalStringValue used in some status bar components would cause a crash.
|
|
101
|
+
- Ensure nineZoneState is not set in FrontstageDef until 'isReady' is set.
|
|
102
|
+
- Add support for all existing Indicator Props.
|
|
103
|
+
- Updates to enable frontstageDef to be cached per iModelConnection.
|
|
104
|
+
- Add initializeStateFromUserSettingsProviders to initialize UI state.
|
|
105
|
+
- Update ShowHideManager defaults
|
|
106
|
+
- Update comment.
|
|
107
|
+
- Fix warning shown in unit test by ensuring setState is only processed if state component is mounted.
|
|
108
|
+
- Allow widgets supplied by a UiItemsProvider to specify a default state of floating.
|
|
109
|
+
- Deprecated HorizontalTabs in ui-core. Removed older deprecated items. Updated NextVersion.md.
|
|
110
|
+
- Update to latest itwinui-react
|
|
111
|
+
- Clean up css for status bar entries to avoid unwanted text wrapping.
|
|
112
|
+
- Incorporating iTwinUI-CSS and iTwinUI-React into iModel.js
|
|
113
|
+
- Moved iTwinUI style overrides to ui-core from ui-framework
|
|
114
|
+
- Rename ui directories to match new package names.
|
|
115
|
+
- Deprecated Task/Workflow. Promoted AccuDraw UI to @beta. Added AccuDraw and NavigationAids learning docs.
|
|
116
|
+
- Fix bug that sets the icon on MessageBox.NoSymbol the Success icon.
|
|
117
|
+
- Add prop that prevents popup button panel from unmounting when closed.
|
|
118
|
+
- Update to React 17.
|
|
119
|
+
- Created imodel-components folder & package and moved color, lineweight, navigationaids, quantity, timeline & viewport. Deprecated MessageSeverity in ui-core & added it ui-abstract. Added MessagePresenter interface to ui-abstract.
|
|
120
|
+
- Remove react 16 peer dependency.
|
|
121
|
+
- Filter out duplicate tools that may be registered in different UiItemProviders. First one in wins.
|
|
122
|
+
- Remove itwinUi css overrides.
|
|
123
|
+
- UiFramework and UiIModelComponent initialize method no longer take localization argument, uses IModelApp.localization internally.
|
|
124
|
+
- Remove package react-split-pane.
|
|
125
|
+
- Remove WidgetProvider and associated events.
|
|
126
|
+
- Fixed z-index of status messages to be on top of a dialog
|
|
127
|
+
- Update Tool Setting for UI 1.0 to fix refresh bug.
|
|
128
|
+
- BaseUiItemsProvider class and refactor "standard" providers to subclass it.
|
|
129
|
+
- Undeprecate necessary UI 1.0 classes/interfaces
|
|
130
|
+
- Update standard UI item providers to require a providerId so more than one instance may be used within an app. Usually by different packages providing stages.
|
|
131
|
+
- Replaced ui-core Slider with one from iTwinUi-react. Update DefaultViewOverlay to opt-in to dislay of view overlays.
|
|
132
|
+
- Update to latest types/react package
|
|
133
|
+
- reset to use overflow hidden in floating widgets as it messes up auto-sizing and re-sizing.
|
|
134
|
+
- Add support for widget tab icons in UI-2
|
|
135
|
+
- Update CSS used for ToolSettingEntries in grid layout.
|
|
136
|
+
- Get WidgetState and PanelState from NinzoneState when running in UI 2 mode - single source of truth.
|
|
137
|
+
- Lock down and update version numbers so docs will build.
|
|
138
|
+
- Hide widgets with Hidden defaultState when frontstage is activated.
|
|
4
139
|
|
|
5
140
|
## 2.19.28
|
|
6
141
|
Wed, 12 Jan 2022 14:52:38 GMT
|
|
@@ -281,9 +416,9 @@ Mon, 24 May 2021 15:58:39 GMT
|
|
|
281
416
|
- Clean up styling in StatusBar.css
|
|
282
417
|
- Set overflow hidden on content Panes used when stage has multiple content views.
|
|
283
418
|
- Adding ability to override isActive property for BackstageItem
|
|
284
|
-
- Add support for child popup windows.
|
|
419
|
+
- Add support for child popup windows.
|
|
285
420
|
- Replace deprecated ViewManager.forEachViewport() with iterator.
|
|
286
|
-
- Update to latest classnames package
|
|
421
|
+
- Update to latest classnames package
|
|
287
422
|
|
|
288
423
|
## 2.15.6
|
|
289
424
|
Wed, 26 May 2021 15:55:19 GMT
|
|
@@ -440,7 +575,7 @@ Thu, 28 Jan 2021 13:39:27 GMT
|
|
|
440
575
|
|
|
441
576
|
### Updates
|
|
442
577
|
|
|
443
|
-
- Update components that support providing refs via React.forwardRef to work better with document generation.
|
|
578
|
+
- Update components that support providing refs via React.forwardRef to work better with document generation.
|
|
444
579
|
- Fix backstage not updating when props.items are updated.
|
|
445
580
|
- Propagate isDisabled MenuItem property to ContextMenuItem disabled property
|
|
446
581
|
- Added partially visible instances support to VisibilityHandler
|
|
@@ -523,7 +658,7 @@ Thu, 19 Nov 2020 17:03:42 GMT
|
|
|
523
658
|
|
|
524
659
|
### Updates
|
|
525
660
|
|
|
526
|
-
- Revert width change to EnumEditor component instead set width to auto only for docked tool settings.
|
|
661
|
+
- Revert width change to EnumEditor component instead set width to auto only for docked tool settings.
|
|
527
662
|
|
|
528
663
|
## 2.9.0
|
|
529
664
|
Wed, 18 Nov 2020 16:01:50 GMT
|
|
@@ -631,7 +766,7 @@ Thu, 17 Sep 2020 13:16:12 GMT
|
|
|
631
766
|
|
|
632
767
|
### Updates
|
|
633
768
|
|
|
634
|
-
- Add support for a feature flag to control the display of the keyin palette.
|
|
769
|
+
- Add support for a feature flag to control the display of the keyin palette.
|
|
635
770
|
- BadgeType support for Backstage items
|
|
636
771
|
- add itemschanged handler so that items provided can be conditionally hidden
|
|
637
772
|
- Lower case syncEventIds prior to comparison
|
|
@@ -787,7 +922,7 @@ Thu, 28 May 2020 22:48:59 GMT
|
|
|
787
922
|
### Updates
|
|
788
923
|
|
|
789
924
|
- Add missing @itwin/core-markup peerDependency
|
|
790
|
-
- Add commandItemDef to clearHiddenIsolatedEmphasized elements.
|
|
925
|
+
- Add commandItemDef to clearHiddenIsolatedEmphasized elements.
|
|
791
926
|
- Fix z-index of Modeless dialogs.
|
|
792
927
|
- Address React warnings about deprecated methods.
|
|
793
928
|
- Make methods in HideIsolateEmphasizeManager static so they can be called by other packages.
|
|
@@ -828,7 +963,7 @@ Wed, 06 May 2020 13:17:49 GMT
|
|
|
828
963
|
- react to renaming of imodeljs-clients
|
|
829
964
|
- Moved KeyinBrowser component to @beta for 2.0
|
|
830
965
|
- Using center of Messages indicator as target. Added CSS classname overrides to StatusBarComposer for sections. UI 2.0 color tweaks.
|
|
831
|
-
- Fixed FrontendAuthorizationClient type guard.
|
|
966
|
+
- Fixed FrontendAuthorizationClient type guard.
|
|
832
967
|
- Update GroupButton definition to use ReadonlyArray for child items.
|
|
833
968
|
- Modal Frontstage styling
|
|
834
969
|
- Ui 2.0 - Blur the toolbar item background
|
|
@@ -836,7 +971,7 @@ Wed, 06 May 2020 13:17:49 GMT
|
|
|
836
971
|
- Renamed OIDC constructs for consistency; Removed SAML support.
|
|
837
972
|
- Fixed popup location when passing htmlElement to UiAdmin functions
|
|
838
973
|
- Clean up deprecated APIs
|
|
839
|
-
- Hide stage panel when panel state is off.
|
|
974
|
+
- Hide stage panel when panel state is off.
|
|
840
975
|
- Added ability to customize selection handling in VisibilityWidget's Models tree
|
|
841
976
|
- Made React functional component specifications consistent across UI packages
|
|
842
977
|
- Slider component tooltipBelow prop & tooltip styling
|
|
@@ -883,7 +1018,7 @@ Wed, 06 May 2020 13:17:49 GMT
|
|
|
883
1018
|
- Ability to switch to 9-Zone 2.0
|
|
884
1019
|
- Refactor to remove duplicate ComponentGenerator instatiation. Rename filea nd components to remove React reference.
|
|
885
1020
|
- Update auto-generated dialog items to work with the Tool Settings Bar.
|
|
886
|
-
- Moved Property classes and interfaces to ui-abstract package. Created a "DefaultDialogGridContainer" to turn specifications from abstract DialogItems UI into React components.
|
|
1021
|
+
- Moved Property classes and interfaces to ui-abstract package. Created a "DefaultDialogGridContainer" to turn specifications from abstract DialogItems UI into React components.
|
|
887
1022
|
- Refactor DefaultToolSettingsProvider to use DialogItemsManager and remove duplicate code.
|
|
888
1023
|
- Fix Indicator to properly load SVG icons.
|
|
889
1024
|
- Refactor DefaultToolSettingsProvider to use the DialogItem interfaces in place of ToolSettings classes.
|
|
@@ -953,7 +1088,7 @@ Tue, 10 Dec 2019 18:08:56 GMT
|
|
|
953
1088
|
|
|
954
1089
|
- Add useActiveIModelConnection hook.
|
|
955
1090
|
- Allow setting App Iconspec.
|
|
956
|
-
- Setup OidcDesktopClient for Electron use cases.
|
|
1091
|
+
- Setup OidcDesktopClient for Electron use cases.
|
|
957
1092
|
- Fix styling of footer Indicator to work with Themes.
|
|
958
1093
|
- Disallow plugins from adding tools anywhere but the end of a toolbar.
|
|
959
1094
|
- [ModelsTree] Merge same-label Subject nodes to avoid duplication
|
|
@@ -972,7 +1107,7 @@ Tue, 10 Dec 2019 18:08:56 GMT
|
|
|
972
1107
|
- Use exhaustive-deps linter rule.
|
|
973
1108
|
- Ability to opt-in to toolbar drag interaction.
|
|
974
1109
|
- Prevent unnecessary resubscribe in useActiveViewport hook.
|
|
975
|
-
- Visibility Widget: Treat dictionary model as never private in Categories tree.
|
|
1110
|
+
- Visibility Widget: Treat dictionary model as never private in Categories tree.
|
|
976
1111
|
- Ability to specify initialWidth for Zone component.
|
|
977
1112
|
- Removed unused React state variables. Removed unsupported setState calls from render() methods.
|
|
978
1113
|
- Code cleanup based on code analysis report from lgtm. Updated status field fade-in/out animation.
|
|
@@ -1196,7 +1331,7 @@ Mon, 03 Jun 2019 18:09:39 GMT
|
|
|
1196
1331
|
- Release tag cleanup and ui-framework unit tests
|
|
1197
1332
|
- Updated UI package release tags for 1.0 release.
|
|
1198
1333
|
- Fixed release tag warnings in UI packages
|
|
1199
|
-
- Removed use of OidcClientWrapper.
|
|
1334
|
+
- Removed use of OidcClientWrapper.
|
|
1200
1335
|
- Remove console log message output by SyncUiEventDispatcher. Add Logging.
|
|
1201
1336
|
- Changed some release tags from @hidden to @internal
|
|
1202
1337
|
- Add alpha level support for solar timeline
|
|
@@ -1243,9 +1378,9 @@ Mon, 13 May 2019 15:52:05 GMT
|
|
|
1243
1378
|
- Added SignIn presentational component to ui-components. Removed --ignoreMissingTags extract-api option.
|
|
1244
1379
|
- Require React & React-dom 16.8
|
|
1245
1380
|
- Remove IModelApp subclasses
|
|
1246
|
-
- Setup a generic context for tracking client requests, and made various related enhancements to logging, usage tracking and authorization.
|
|
1381
|
+
- Setup a generic context for tracking client requests, and made various related enhancements to logging, usage tracking and authorization.
|
|
1247
1382
|
- Added ViewportDialog in ui-test-app, ui-core/ContributeGuidelines.md. TSLint rules in ui-core for no-default-export & completed-docs. @beta release tags.
|
|
1248
|
-
- Minimized serialization/deserialization costs when round tripping SAML based AccessToken-s.
|
|
1383
|
+
- Minimized serialization/deserialization costs when round tripping SAML based AccessToken-s.
|
|
1249
1384
|
- Rename AppState to SessionState to avoid collision with acutal App's state. Add AvailableSectionScopes to SessionState.
|
|
1250
1385
|
- Move SelectionScope status field from test app to ui-framework. Update icons-generic-webfont version to latest available.
|
|
1251
1386
|
- Remove need to sync SelectionMethod since it is not changed within tool code.
|
|
@@ -1512,7 +1647,7 @@ Thu, 08 Nov 2018 17:59:21 GMT
|
|
|
1512
1647
|
|
|
1513
1648
|
### Updates
|
|
1514
1649
|
|
|
1515
|
-
- OIDC related enhancments (WIP).
|
|
1650
|
+
- OIDC related enhancments (WIP).
|
|
1516
1651
|
- Updated to TypeScript 3.1
|
|
1517
1652
|
- ui-core unit tests. Fixed backstage open issue.
|
|
1518
1653
|
- Zone & Widget initial state, more ui-core unit tests, cleaned up ui-framework index.ts files.
|
|
@@ -91,16 +91,18 @@ export declare class UiFramework {
|
|
|
91
91
|
* Called by the application to initialize the UiFramework. Also initializes UIIModelComponents, UiComponents, UiCore.
|
|
92
92
|
* @param store The single Redux store created by the host application. If this is `undefined` then it is assumed that the [[StateManager]] is being used to provide the Redux store.
|
|
93
93
|
* @param frameworkStateKey The name of the key used by the app when adding the UiFramework state into the Redux store. If not defined "frameworkState" is assumed. This value is ignored if [[StateManager]] is being used. The StateManager use "frameworkState".
|
|
94
|
+
* @param startInUi1Mode Used for legacy applications to start up in the deprecated UI 1 mode. This should not set by newer applications.
|
|
94
95
|
*/
|
|
95
|
-
static initialize(store: Store<any> | undefined, frameworkStateKey?: string): Promise<void>;
|
|
96
|
+
static initialize(store: Store<any> | undefined, frameworkStateKey?: string, startInUi1Mode?: boolean): Promise<void>;
|
|
96
97
|
/**
|
|
97
98
|
* Called by the application to initialize the UiFramework. Also initializes UIIModelComponents, UiComponents, UiCore.
|
|
98
99
|
* @param store The single Redux store created by the host application. If this is `undefined` then it is assumed that the [[StateManager]] is being used to provide the Redux store.
|
|
99
100
|
* @param frameworkStateKey The name of the key used by the app when adding the UiFramework state into the Redux store. If not defined "frameworkState" is assumed. This value is ignored if [[StateManager]] is being used. The StateManager use "frameworkState".
|
|
101
|
+
* @param startInUi1Mode Used for legacy applications to start up in the deprecated UI 1 mode. This should not set by newer applications.
|
|
100
102
|
*
|
|
101
103
|
* @internal
|
|
102
104
|
*/
|
|
103
|
-
static initializeEx(store: Store<any> | undefined, frameworkStateKey?: string): Promise<void>;
|
|
105
|
+
static initializeEx(store: Store<any> | undefined, frameworkStateKey?: string, startInUi1Mode?: boolean): Promise<void>;
|
|
104
106
|
/** Un-registers the UiFramework internationalization service namespace */
|
|
105
107
|
static terminate(): void;
|
|
106
108
|
/** Determines if UiFramework has been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S,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,UAAU,EAAE,OAAO,CAAC,EAAE,UAAU,EAAE,OAAO,CAAC,EAAE,UAAU,EAAE,WAAW,CAAC,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,YAAY,EAAE,oBAAoB,CAAC,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAA;KAAE,GAAG,OAAO,CAAC,IAAI,CAAC;IAgB/N;;SAEK;IACL,WAAkB,iBAAiB,IAAI,OAAO,CAG7C;CACF"}
|
|
@@ -67,18 +67,20 @@ class UiFramework {
|
|
|
67
67
|
* Called by the application to initialize the UiFramework. Also initializes UIIModelComponents, UiComponents, UiCore.
|
|
68
68
|
* @param store The single Redux store created by the host application. If this is `undefined` then it is assumed that the [[StateManager]] is being used to provide the Redux store.
|
|
69
69
|
* @param frameworkStateKey The name of the key used by the app when adding the UiFramework state into the Redux store. If not defined "frameworkState" is assumed. This value is ignored if [[StateManager]] is being used. The StateManager use "frameworkState".
|
|
70
|
+
* @param startInUi1Mode Used for legacy applications to start up in the deprecated UI 1 mode. This should not set by newer applications.
|
|
70
71
|
*/
|
|
71
|
-
static async initialize(store, frameworkStateKey) {
|
|
72
|
-
return this.initializeEx(store, frameworkStateKey);
|
|
72
|
+
static async initialize(store, frameworkStateKey, startInUi1Mode) {
|
|
73
|
+
return this.initializeEx(store, frameworkStateKey, startInUi1Mode);
|
|
73
74
|
}
|
|
74
75
|
/**
|
|
75
76
|
* Called by the application to initialize the UiFramework. Also initializes UIIModelComponents, UiComponents, UiCore.
|
|
76
77
|
* @param store The single Redux store created by the host application. If this is `undefined` then it is assumed that the [[StateManager]] is being used to provide the Redux store.
|
|
77
78
|
* @param frameworkStateKey The name of the key used by the app when adding the UiFramework state into the Redux store. If not defined "frameworkState" is assumed. This value is ignored if [[StateManager]] is being used. The StateManager use "frameworkState".
|
|
79
|
+
* @param startInUi1Mode Used for legacy applications to start up in the deprecated UI 1 mode. This should not set by newer applications.
|
|
78
80
|
*
|
|
79
81
|
* @internal
|
|
80
82
|
*/
|
|
81
|
-
static async initializeEx(store, frameworkStateKey) {
|
|
83
|
+
static async initializeEx(store, frameworkStateKey, startInUi1Mode) {
|
|
82
84
|
var _a;
|
|
83
85
|
if (UiFramework._initialized) {
|
|
84
86
|
core_bentley_1.Logger.logInfo(UiFramework.loggerCategory(UiFramework), `UiFramework.initialize already called`);
|
|
@@ -92,6 +94,8 @@ class UiFramework {
|
|
|
92
94
|
// ignore setting _frameworkStateKeyInStore if not using store
|
|
93
95
|
if (frameworkStateKey && store)
|
|
94
96
|
UiFramework._frameworkStateKeyInStore = frameworkStateKey;
|
|
97
|
+
if (startInUi1Mode)
|
|
98
|
+
UiFramework.store.dispatch({ type: state_1.ConfigurableUiActionId.SetFrameworkVersion, payload: "1" });
|
|
95
99
|
// set up namespace and register all tools from package
|
|
96
100
|
const frameworkNamespace = (_a = core_frontend_1.IModelApp.localization) === null || _a === void 0 ? void 0 : _a.registerNamespace(UiFramework.localizationNamespace);
|
|
97
101
|
[
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"UiFramework.js","sourceRoot":"","sources":["../../../src/appui-react/UiFramework.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAKH,sDAA0E;AAE1E,wDAAwF;AACxF,wEAA4D;AAC5D,0DAAuD;AACvD,0DAAgF;AAChF,kDAAuF;AACvF,4EAAoE;AACpE,mEAAgE;AAChE,yEAAsE;AACtE,kFAA+E;AAC/E,kDAAgE;AAEhE,uDAAwG;AACxG,uDAAoD;AACpD,yFAAyH;AACzH,0EAAsF;AACtF,uDAA4F;AAC5F,+DAA+D;AAC/D,6DAA6D;AAC7D,gEAAgE;AAChE,8DAA8D;AAC9D,iEAA0F;AAC1F,2DAAwD;AACxD,sEAAmE;AA0BnE;;GAEG;AACH,MAAa,wBAAyB,SAAQ,wBAA8B;CAAI;AAAhF,4DAAgF;AAUhF;;GAEG;AACH,MAAa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C,kBAAkB,EAAE,yBAAS,CAAC,kBAAkB;gBAChD,WAAW,EAAE,MAAA,CAAC,MAAM,yBAAS,CAAC,mBAAmB,CAAC,cAAc,EAAE,CAAC,mCAAI,EAAE;aAC1E,CAAC;YACF,MAAM,cAAc,GAAG,IAAI,+BAAc,CAAC,SAAS,EAAE,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,WAAW,EAAE,IAAI,EAAE,oBAAoB,CAAC,CAAC;YACzH,MAAM,yBAAS,CAAC,SAAS,CAAC,aAAa,CAAC,QAAQ,EAAE,cAAc,CAAC,CAAC;SACnE;QAAC,MAAM,GAAG;IACb,CAAC;IACD;;SAEK;IACE,MAAM,KAAK,iBAAiB;QACjC,MAAM,WAAW,GAAG,QAAQ,CAAC,aAAa,CAAC,8BAA8B,CAAC,CAAC;QAC3E,OAAO,WAAW,KAAK,IAAI,IAAI,WAAW,KAAK,SAAS,CAAC;IAC3D,CAAC;;AA9dH,kCA+dC;AA9dgB,wBAAY,GAAG,KAAK,CAAC;AAErB,sBAAU,GAAG,6BAA6B,CAAC;AAC3C,qCAAyB,GAAW,gBAAgB,CAAC,CAAE,eAAe;AAGtE,sBAAU,GAAuB,GAAG,CAAC;AAEpD,oDAAoD;AACrC,2BAAe,GAAmB,IAAI,8BAAiB,EAAE,CAAC;AAE1D,uCAA2B,GAAsC,IAAI,GAAG,EAAgC,CAAC;AACzG,+BAAmB,GAAG,IAAI,uCAAkB,EAAE,CAAC;AAChD,+BAAmB,GAAG,KAAK,CAAC;AAoB1C;;GAEG;AACoB,iCAAqB,GAAG,IAAI,wBAAwB,EAAE,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 Utilities\r\n */\r\n\r\n// cSpell:ignore configurableui clientservices\r\n\r\nimport { Store } from \"redux\";\r\nimport { GuidString, Logger, ProcessDetector } from \"@itwin/core-bentley\";\r\nimport { Localization, RpcActivity } from \"@itwin/core-common\";\r\nimport { IModelApp, IModelConnection, SnapMode, ViewState } from \"@itwin/core-frontend\";\r\nimport { Presentation } from \"@itwin/presentation-frontend\";\r\nimport { TelemetryEvent } from \"@itwin/core-telemetry\";\r\nimport { getClassName, UiAdmin, UiError, UiEvent } from \"@itwin/appui-abstract\";\r\nimport { LocalStateStorage, SettingsManager, UiStateStorage } from \"@itwin/core-react\";\r\nimport { UiIModelComponents } from \"@itwin/imodel-components-react\";\r\nimport { BackstageManager } from \"./backstage/BackstageManager\";\r\nimport { ChildWindowManager } from \"./childwindow/ChildWindowManager\";\r\nimport { ConfigurableUiManager } from \"./configurableui/ConfigurableUiManager\";\r\nimport { ConfigurableUiActionId } from \"./configurableui/state\";\r\nimport { FrameworkState } from \"./redux/FrameworkState\";\r\nimport { CursorMenuData, PresentationSelectionScope, SessionStateActionId } from \"./redux/SessionState\";\r\nimport { StateManager } from \"./redux/StateManager\";\r\nimport { HideIsolateEmphasizeActionHandler, HideIsolateEmphasizeManager } from \"./selection/HideIsolateEmphasizeManager\";\r\nimport { SyncUiEventDispatcher, SyncUiEventId } from \"./syncui/SyncUiEventDispatcher\";\r\nimport { SYSTEM_PREFERRED_COLOR_THEME, WIDGET_OPACITY_DEFAULT } from \"./theme/ThemeManager\";\r\nimport * as keyinPaletteTools from \"./tools/KeyinPaletteTools\";\r\nimport * as openSettingTools from \"./tools/OpenSettingsTool\";\r\nimport * as restoreLayoutTools from \"./tools/RestoreLayoutTool\";\r\nimport * as toolSettingTools from \"./tools/ToolSettingsTools\";\r\nimport { UiShowHideManager, UiShowHideSettingsProvider } from \"./utils/UiShowHideManager\";\r\nimport { WidgetManager } from \"./widgets/WidgetManager\";\r\nimport { FrontstageManager } from \"./frontstage/FrontstageManager\";\r\n\r\n// cSpell:ignore Mobi\r\n\r\n/** Defined that available UI Versions. It is recommended to always use the latest version available.\r\n * @public\r\n */\r\nexport type FrameworkVersionId = \"1\" | \"2\";\r\n\r\n/** Interface to be implemented but any classes that wants to load their user settings when the UiStateEntry storage class is set.\r\n * @public\r\n */\r\nexport interface UserSettingsProvider {\r\n /** Unique provider Id */\r\n providerId: string;\r\n /** Function to load settings from settings storage */\r\n loadUserSettings(storage: UiStateStorage): Promise<void>;\r\n}\r\n\r\n/** UiVisibility Event Args interface.\r\n * @public\r\n */\r\nexport interface UiVisibilityEventArgs {\r\n visible: boolean;\r\n}\r\n\r\n/** UiVisibility Event class.\r\n * @public\r\n */\r\nexport class UiVisibilityChangedEvent extends UiEvent<UiVisibilityEventArgs> { }\r\n\r\n/** FrameworkVersion Changed Event Args interface.\r\n * @internal\r\n */\r\nexport interface FrameworkVersionChangedEventArgs {\r\n oldVersion: FrameworkVersionId;\r\n version: FrameworkVersionId;\r\n}\r\n\r\n/** FrameworkVersion Changed Event class.\r\n * @internal\r\n */\r\nexport class FrameworkVersionChangedEvent extends UiEvent<FrameworkVersionChangedEventArgs> { }\r\n\r\n/** TrackingTime time argument used by our feature tracking manager as an option argument to the TelemetryClient\r\n * @internal\r\n */\r\nexport interface TrackingTime {\r\n startTime: Date;\r\n endTime: Date;\r\n}\r\n\r\n/**\r\n * Manages the Redux store, localization service and iModel, Project and Login services for the ui-framework package.\r\n * @public\r\n */\r\nexport class UiFramework {\r\n private static _initialized = false;\r\n private static _store?: Store<any>;\r\n private static _complaint = \"UiFramework not initialized\";\r\n private static _frameworkStateKeyInStore: string = \"frameworkState\"; // default name\r\n private static _backstageManager?: BackstageManager;\r\n private static _widgetManager?: WidgetManager;\r\n private static _uiVersion: FrameworkVersionId = \"2\";\r\n private static _hideIsolateEmphasizeActionHandler?: HideIsolateEmphasizeActionHandler;\r\n /** this provides a default state storage handler */\r\n private static _uiStateStorage: UiStateStorage = new LocalStateStorage();\r\n private static _settingsManager?: SettingsManager;\r\n private static _uiSettingsProviderRegistry: Map<string, UserSettingsProvider> = new Map<string, UserSettingsProvider>();\r\n private static _PopupWindowManager = new ChildWindowManager();\r\n public static useDefaultPopoutUrl = false;\r\n\r\n /** @public */\r\n public static get childWindowManager(): ChildWindowManager {\r\n return UiFramework._PopupWindowManager;\r\n }\r\n\r\n /** Registers class that will be informed when the UserSettingsStorage location has been set or changed. This allows\r\n * classes to load any previously saved settings from the new storage location. Common storage locations are the browser's\r\n * local storage, or the iTwin Product Settings cloud storage available via the SettingsAdmin see `IModelApp.settingsAdmin`.\r\n * @beta\r\n */\r\n public static registerUserSettingsProvider(entry: UserSettingsProvider) {\r\n if (this._uiSettingsProviderRegistry.has(entry.providerId))\r\n return false;\r\n\r\n this._uiSettingsProviderRegistry.set(entry.providerId, entry);\r\n return true;\r\n }\r\n\r\n /** Get Show Ui event.\r\n * @public\r\n */\r\n public static readonly onUiVisibilityChanged = new UiVisibilityChangedEvent();\r\n\r\n /**\r\n * Called by the application to initialize the UiFramework. Also initializes UIIModelComponents, UiComponents, UiCore.\r\n * @param store The single Redux store created by the host application. If this is `undefined` then it is assumed that the [[StateManager]] is being used to provide the Redux store.\r\n * @param frameworkStateKey The name of the key used by the app when adding the UiFramework state into the Redux store. If not defined \"frameworkState\" is assumed. This value is ignored if [[StateManager]] is being used. The StateManager use \"frameworkState\".\r\n */\r\n public static async initialize(store: Store<any> | undefined, frameworkStateKey?: string): Promise<void> {\r\n return this.initializeEx(store, frameworkStateKey);\r\n }\r\n\r\n /**\r\n * Called by the application to initialize the UiFramework. Also initializes UIIModelComponents, UiComponents, UiCore.\r\n * @param store The single Redux store created by the host application. If this is `undefined` then it is assumed that the [[StateManager]] is being used to provide the Redux store.\r\n * @param frameworkStateKey The name of the key used by the app when adding the UiFramework state into the Redux store. If not defined \"frameworkState\" is assumed. This value is ignored if [[StateManager]] is being used. The StateManager use \"frameworkState\".\r\n *\r\n * @internal\r\n */\r\n public static async initializeEx(store: Store<any> | undefined, frameworkStateKey?: string): Promise<void> {\r\n if (UiFramework._initialized) {\r\n Logger.logInfo(UiFramework.loggerCategory(UiFramework), `UiFramework.initialize already called`);\r\n return;\r\n }\r\n\r\n /* if store is undefined then the StateManager class should have been initialized by parent app and the apps default set of reducers registered with it.\r\n If the app has no reducers to add and does not initialize a StateManager then just initialize the StateManager with the default framework reducer now */\r\n if (undefined === store && !StateManager.isInitialized(true))\r\n new StateManager();\r\n\r\n UiFramework._store = store;\r\n // ignore setting _frameworkStateKeyInStore if not using store\r\n if (frameworkStateKey && store)\r\n UiFramework._frameworkStateKeyInStore = frameworkStateKey;\r\n\r\n // set up namespace and register all tools from package\r\n const frameworkNamespace = IModelApp.localization?.registerNamespace(UiFramework.localizationNamespace);\r\n [\r\n restoreLayoutTools,\r\n keyinPaletteTools,\r\n openSettingTools,\r\n toolSettingTools,\r\n ].forEach((tool) => IModelApp.tools.registerModule(tool, this.localizationNamespace));\r\n\r\n UiFramework._backstageManager = new BackstageManager();\r\n UiFramework._hideIsolateEmphasizeActionHandler = new HideIsolateEmphasizeManager(); // this allows user to override the default HideIsolateEmphasizeManager implementation.\r\n UiFramework._widgetManager = new WidgetManager();\r\n\r\n // Initialize ui-imodel-components, ui-components, ui-core & ui-abstract\r\n await UiIModelComponents.initialize();\r\n\r\n UiFramework.settingsManager.onSettingsProvidersChanged.addListener(() => {\r\n SyncUiEventDispatcher.dispatchSyncUiEvent(SyncUiEventId.SettingsProvidersChanged);\r\n });\r\n\r\n // Initialize the MessagePresenter interface in UiAdmin for Editor notifications\r\n UiAdmin.messagePresenter = IModelApp.notifications;\r\n\r\n UiFramework._initialized = true;\r\n\r\n // initialize any standalone settings providers that don't need to have defaults set by iModelApp\r\n UiShowHideSettingsProvider.initialize();\r\n\r\n ConfigurableUiManager.initialize();\r\n\r\n return frameworkNamespace;\r\n }\r\n\r\n /** Un-registers the UiFramework internationalization service namespace */\r\n public static terminate() {\r\n UiFramework._store = undefined;\r\n UiFramework._frameworkStateKeyInStore = \"frameworkState\";\r\n if (StateManager.isInitialized(true))\r\n StateManager.clearStore();\r\n // istanbul ignore next\r\n IModelApp.localization?.unregisterNamespace(UiFramework.localizationNamespace);\r\n UiFramework._backstageManager = undefined;\r\n UiFramework._widgetManager = undefined;\r\n UiFramework._hideIsolateEmphasizeActionHandler = undefined;\r\n UiFramework._settingsManager = undefined;\r\n\r\n UiIModelComponents.terminate();\r\n UiShowHideManager.terminate();\r\n UiFramework._initialized = false;\r\n }\r\n\r\n /** Determines if UiFramework has been initialized */\r\n public static get initialized(): boolean { return UiFramework._initialized; }\r\n\r\n /** Property that returns the SettingManager used by AppUI-based applications.\r\n * @public\r\n */\r\n public static get settingsManager() {\r\n if (undefined === UiFramework._settingsManager)\r\n UiFramework._settingsManager = new SettingsManager();\r\n return UiFramework._settingsManager;\r\n }\r\n\r\n /** @public */\r\n public static get frameworkStateKey(): string {\r\n return UiFramework._frameworkStateKeyInStore;\r\n }\r\n\r\n /** The UiFramework state maintained by Redux\r\n * @public\r\n */\r\n public static get frameworkState(): FrameworkState | undefined {\r\n try {\r\n // eslint-disable-next-line dot-notation\r\n return UiFramework.store.getState()[UiFramework.frameworkStateKey];\r\n } catch (_e) {\r\n return undefined;\r\n }\r\n }\r\n\r\n /** The Redux store */\r\n public static get store(): Store<any> {\r\n if (UiFramework._store)\r\n return UiFramework._store;\r\n\r\n // istanbul ignore else\r\n if (!StateManager.isInitialized(true))\r\n throw new UiError(UiFramework.loggerCategory(this), `Error trying to access redux store before either store or StateManager has been initialized.`);\r\n\r\n // istanbul ignore next\r\n return StateManager.store;\r\n }\r\n\r\n /** The internationalization service created by the app.\r\n * @internal\r\n */\r\n public static get localization(): Localization {\r\n // istanbul ignore next\r\n if (!IModelApp.localization)\r\n throw new UiError(UiFramework.loggerCategory(this), `IModelApp.localization has not been defined.`);\r\n return IModelApp.localization;\r\n }\r\n\r\n /** The internationalization service namespace. */\r\n public static get localizationNamespace(): string {\r\n return \"UiFramework\";\r\n }\r\n\r\n /** @public */\r\n public static get backstageManager(): BackstageManager {\r\n // istanbul ignore next\r\n if (!UiFramework._backstageManager)\r\n throw new UiError(UiFramework.loggerCategory(this), UiFramework._complaint);\r\n return UiFramework._backstageManager;\r\n }\r\n\r\n /** @alpha */\r\n public static get hideIsolateEmphasizeActionHandler(): HideIsolateEmphasizeActionHandler {\r\n // istanbul ignore next\r\n if (!UiFramework._hideIsolateEmphasizeActionHandler)\r\n throw new UiError(UiFramework.loggerCategory(this), UiFramework._complaint);\r\n return UiFramework._hideIsolateEmphasizeActionHandler;\r\n }\r\n\r\n /** @alpha */\r\n public static setHideIsolateEmphasizeActionHandler(handler: HideIsolateEmphasizeActionHandler | undefined) {\r\n // istanbul ignore else\r\n if (handler)\r\n UiFramework._hideIsolateEmphasizeActionHandler = handler;\r\n else\r\n UiFramework._hideIsolateEmphasizeActionHandler = new HideIsolateEmphasizeManager();\r\n }\r\n\r\n /** @alpha */\r\n public static get widgetManager(): WidgetManager {\r\n // istanbul ignore next\r\n if (!UiFramework._widgetManager)\r\n throw new UiError(UiFramework.loggerCategory(this), UiFramework._complaint);\r\n return UiFramework._widgetManager;\r\n }\r\n\r\n /** Calls localization.getLocalizedStringWithNamespace with the \"UiFramework\" namespace. Do NOT include the namespace in the key.\r\n * @internal\r\n */\r\n public static translate(key: string | string[]): string {\r\n return IModelApp.localization.getLocalizedStringWithNamespace(UiFramework.localizationNamespace, key);\r\n }\r\n\r\n /** @internal */\r\n public static get packageName(): string {\r\n return \"appui-react\";\r\n }\r\n\r\n /** @internal */\r\n public static loggerCategory(obj: any): string {\r\n const className = getClassName(obj);\r\n const category = UiFramework.packageName + (className ? `.${className}` : \"\");\r\n return category;\r\n }\r\n\r\n public static dispatchActionToStore(type: string, payload: any, immediateSync = false) {\r\n UiFramework.store.dispatch({ type, payload });\r\n if (immediateSync)\r\n SyncUiEventDispatcher.dispatchImmediateSyncUiEvent(type);\r\n else\r\n SyncUiEventDispatcher.dispatchSyncUiEvent(type);\r\n }\r\n\r\n public static setAccudrawSnapMode(snapMode: SnapMode) {\r\n UiFramework.dispatchActionToStore(ConfigurableUiActionId.SetSnapMode, snapMode, true);\r\n }\r\n\r\n public static getAccudrawSnapMode(): SnapMode {\r\n return UiFramework.frameworkState ? UiFramework.frameworkState.configurableUiState.snapMode : /* istanbul ignore next */ SnapMode.NearestKeypoint;\r\n }\r\n\r\n public static getActiveSelectionScope(): string {\r\n return UiFramework.frameworkState ? UiFramework.frameworkState.sessionState.activeSelectionScope : /* istanbul ignore next */ \"element\";\r\n }\r\n\r\n public static setActiveSelectionScope(selectionScopeId: string): void {\r\n // istanbul ignore else\r\n if (UiFramework.frameworkState) {\r\n const foundIndex = UiFramework.frameworkState.sessionState.availableSelectionScopes.findIndex((selectionScope: PresentationSelectionScope) => selectionScope.id === selectionScopeId);\r\n if (-1 !== foundIndex) {\r\n const scope = UiFramework.frameworkState.sessionState.availableSelectionScopes[foundIndex];\r\n UiFramework.dispatchActionToStore(SessionStateActionId.SetSelectionScope, scope.id);\r\n Presentation.selection.scopes.activeScope = scope.id;\r\n }\r\n }\r\n }\r\n\r\n /** @public */\r\n public static openCursorMenu(menuData: CursorMenuData | undefined): void {\r\n UiFramework.dispatchActionToStore(SessionStateActionId.UpdateCursorMenu, menuData);\r\n }\r\n\r\n /** @public */\r\n public static closeCursorMenu(): void {\r\n UiFramework.dispatchActionToStore(SessionStateActionId.UpdateCursorMenu, undefined);\r\n }\r\n\r\n /** @public */\r\n public static getCursorMenuData(): CursorMenuData | undefined {\r\n return UiFramework.frameworkState ? UiFramework.frameworkState.sessionState.cursorMenuData : /* istanbul ignore next */ undefined;\r\n }\r\n\r\n public static getActiveIModelId(): string {\r\n return UiFramework.frameworkState ? UiFramework.frameworkState.sessionState.iModelId : /* istanbul ignore next */ \"\";\r\n }\r\n\r\n public static setActiveIModelId(iModelId: string): void {\r\n UiFramework.dispatchActionToStore(SessionStateActionId.SetActiveIModelId, iModelId);\r\n }\r\n\r\n public static setIModelConnection(iModelConnection: IModelConnection | undefined, immediateSync = false) {\r\n const oldConnection = UiFramework.getIModelConnection();\r\n if (oldConnection !== iModelConnection) {\r\n if (oldConnection?.iModelId)\r\n FrontstageManager.clearFrontstageDefsForIModelId(oldConnection.iModelId);\r\n oldConnection && undefined === iModelConnection && SyncUiEventDispatcher.clearConnectionEvents(oldConnection);\r\n iModelConnection && SyncUiEventDispatcher.initializeConnectionEvents(iModelConnection);\r\n UiFramework.dispatchActionToStore(SessionStateActionId.SetIModelConnection, iModelConnection, immediateSync);\r\n }\r\n UiFramework.setActiveIModelId(iModelConnection?.iModelId ?? \"\");\r\n }\r\n\r\n public static getIModelConnection(): IModelConnection | undefined {\r\n return UiFramework.frameworkState ? UiFramework.frameworkState.sessionState.iModelConnection : /* istanbul ignore next */ undefined;\r\n }\r\n\r\n /** Called by iModelApp to initialize saved UI state from registered UseSettingsProviders\r\n * @public\r\n */\r\n public static async initializeStateFromUserSettingsProviders(immediateSync = false) {\r\n // let any registered providers to load values from the new storage location\r\n const providerKeys = [...this._uiSettingsProviderRegistry.keys()];\r\n for await (const key of providerKeys) {\r\n await this._uiSettingsProviderRegistry.get(key)!.loadUserSettings(UiFramework._uiStateStorage);\r\n }\r\n\r\n // istanbul ignore next\r\n if (immediateSync)\r\n SyncUiEventDispatcher.dispatchImmediateSyncUiEvent(SyncUiEventId.UiStateStorageChanged);\r\n else\r\n SyncUiEventDispatcher.dispatchSyncUiEvent(SyncUiEventId.UiStateStorageChanged);\r\n }\r\n\r\n /** @public */\r\n public static async setUiStateStorage(storage: UiStateStorage, immediateSync = false) {\r\n if (UiFramework._uiStateStorage === storage)\r\n return;\r\n\r\n UiFramework._uiStateStorage = storage;\r\n await this.initializeStateFromUserSettingsProviders(immediateSync);\r\n }\r\n\r\n /** The UI Settings Storage is a convenient wrapper around Local Storage to assist in caching state information across user sessions.\r\n * It was previously used to conflate both the state information across session and the information driven directly from user explicit action,\r\n * which are now handled with user preferences.\r\n * @public\r\n */\r\n public static getUiStateStorage(): UiStateStorage {\r\n return UiFramework._uiStateStorage;\r\n }\r\n\r\n public static setDefaultIModelViewportControlId(iModelViewportControlId: string, immediateSync = false) {\r\n UiFramework.dispatchActionToStore(SessionStateActionId.SetDefaultIModelViewportControlId, iModelViewportControlId, immediateSync);\r\n }\r\n\r\n public static getDefaultIModelViewportControlId(): string | undefined {\r\n return UiFramework.frameworkState ? UiFramework.frameworkState.sessionState.defaultIModelViewportControlId : /* istanbul ignore next */ undefined;\r\n }\r\n\r\n public static setDefaultViewId(viewId: string, immediateSync = false) {\r\n UiFramework.dispatchActionToStore(SessionStateActionId.SetDefaultViewId, viewId, immediateSync);\r\n }\r\n\r\n public static getDefaultViewId(): string | undefined {\r\n return UiFramework.frameworkState ? UiFramework.frameworkState.sessionState.defaultViewId : /* istanbul ignore next */ undefined;\r\n }\r\n\r\n public static setDefaultViewState(viewState: ViewState, immediateSync = false) {\r\n UiFramework.dispatchActionToStore(SessionStateActionId.SetDefaultViewState, viewState, immediateSync);\r\n }\r\n public static getDefaultViewState(): ViewState | undefined {\r\n return UiFramework.frameworkState ? UiFramework.frameworkState.sessionState.defaultViewState : /* istanbul ignore next */ undefined;\r\n }\r\n\r\n /** @public */\r\n public static getAvailableSelectionScopes(): PresentationSelectionScope[] {\r\n return UiFramework.frameworkState ?\r\n UiFramework.frameworkState.sessionState.availableSelectionScopes :\r\n /* istanbul ignore next */\r\n [{ id: \"element\", label: \"Element\" } as PresentationSelectionScope];\r\n }\r\n\r\n public static getIsUiVisible() {\r\n return UiShowHideManager.isUiVisible;\r\n }\r\n\r\n public static setIsUiVisible(visible: boolean) {\r\n if (UiShowHideManager.isUiVisible !== visible) {\r\n UiShowHideManager.isUiVisible = visible;\r\n UiFramework.onUiVisibilityChanged.emit({ visible });\r\n }\r\n }\r\n\r\n public static setColorTheme(theme: string) {\r\n if (UiFramework.getColorTheme() === theme)\r\n return;\r\n\r\n UiFramework.dispatchActionToStore(ConfigurableUiActionId.SetTheme, theme, true);\r\n }\r\n\r\n public static getColorTheme(): string {\r\n return UiFramework.frameworkState ? UiFramework.frameworkState.configurableUiState.theme : /* istanbul ignore next */ SYSTEM_PREFERRED_COLOR_THEME;\r\n }\r\n\r\n public static setWidgetOpacity(opacity: number) {\r\n if (UiFramework.getWidgetOpacity() === opacity)\r\n return;\r\n\r\n UiFramework.dispatchActionToStore(ConfigurableUiActionId.SetWidgetOpacity, opacity, true);\r\n }\r\n\r\n public static getWidgetOpacity(): number {\r\n return UiFramework.frameworkState ? UiFramework.frameworkState.configurableUiState.widgetOpacity : /* istanbul ignore next */ WIDGET_OPACITY_DEFAULT;\r\n }\r\n\r\n public static isMobile() { // eslint-disable-line @itwin/prefer-get\r\n return ProcessDetector.isMobileBrowser;\r\n }\r\n\r\n /** Returns the Ui Version.\r\n * @public\r\n */\r\n public static get uiVersion(): FrameworkVersionId {\r\n return UiFramework.frameworkState ? UiFramework.frameworkState.configurableUiState.frameworkVersion : this._uiVersion;\r\n }\r\n\r\n public static setUiVersion(version: FrameworkVersionId) {\r\n if (UiFramework.uiVersion === version)\r\n return;\r\n\r\n UiFramework.dispatchActionToStore(ConfigurableUiActionId.SetFrameworkVersion, version === \"1\" ? \"1\" : \"2\", true);\r\n }\r\n\r\n public static get showWidgetIcon(): boolean {\r\n return UiFramework.frameworkState ? UiFramework.frameworkState.configurableUiState.showWidgetIcon : /* istanbul ignore next */ false;\r\n }\r\n\r\n public static setShowWidgetIcon(value: boolean) {\r\n if (UiFramework.showWidgetIcon === value)\r\n return;\r\n\r\n UiFramework.dispatchActionToStore(ConfigurableUiActionId.SetShowWidgetIcon, value, true);\r\n }\r\n\r\n public static get useDragInteraction(): boolean {\r\n return UiFramework.frameworkState ? UiFramework.frameworkState.configurableUiState.useDragInteraction : false;\r\n }\r\n\r\n public static setUseDragInteraction(useDragInteraction: boolean) {\r\n UiFramework.dispatchActionToStore(ConfigurableUiActionId.SetDragInteraction, useDragInteraction, true);\r\n }\r\n\r\n /** Returns the variable controlling whether the overlay is displayed in a Viewport\r\n * @public\r\n */\r\n public static get viewOverlayDisplay() {\r\n return UiFramework.frameworkState ? UiFramework.frameworkState.configurableUiState.viewOverlayDisplay : /* istanbul ignore next */ true;\r\n }\r\n /** Set the variable that controls display of the view overlay. Applies to all viewports in the app\r\n * @public\r\n */\r\n public static setViewOverlayDisplay(display: boolean) {\r\n if (UiFramework.viewOverlayDisplay === display)\r\n return;\r\n UiFramework.dispatchActionToStore(ConfigurableUiActionId.SetViewOverlayDisplay, display);\r\n }\r\n /** Send logging message to the telemetry system\r\n * @internal\r\n */\r\n // istanbul ignore next\r\n public static async postTelemetry(eventName: string, eventId?: GuidString, iTwinId?: GuidString, iModeId?: GuidString, changeSetId?: string, time?: TrackingTime, additionalProperties?: { [key: string]: any }): Promise<void> {\r\n if (!IModelApp.authorizationClient)\r\n return;\r\n\r\n try {\r\n const activity: RpcActivity = {\r\n sessionId: IModelApp.sessionId,\r\n activityId: \"\",\r\n applicationId: IModelApp.applicationId,\r\n applicationVersion: IModelApp.applicationVersion,\r\n accessToken: (await IModelApp.authorizationClient.getAccessToken()) ?? \"\",\r\n };\r\n const telemetryEvent = new TelemetryEvent(eventName, eventId, iTwinId, iModeId, changeSetId, time, additionalProperties);\r\n await IModelApp.telemetry.postTelemetry(activity, telemetryEvent);\r\n } catch { }\r\n }\r\n /** Determines whether a ContextMenu is open\r\n * @alpha\r\n * */\r\n public static get isContextMenuOpen(): boolean {\r\n const contextMenu = document.querySelector(\"div.core-context-menu-opened\");\r\n return contextMenu !== null && contextMenu !== undefined;\r\n }\r\n}\r\n"]}
|
|
1
|
+
{"version":3,"file":"UiFramework.js","sourceRoot":"","sources":["../../../src/appui-react/UiFramework.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAKH,sDAA0E;AAE1E,wDAAwF;AACxF,wEAA4D;AAC5D,0DAAuD;AACvD,0DAAgF;AAChF,kDAAuF;AACvF,4EAAoE;AACpE,mEAAgE;AAChE,yEAAsE;AACtE,kFAA+E;AAC/E,kDAAgE;AAEhE,uDAAwG;AACxG,uDAAoD;AACpD,yFAAyH;AACzH,0EAAsF;AACtF,uDAA4F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EAAgC,CAAC;AACzG,+BAAmB,GAAG,IAAI,uCAAkB,EAAE,CAAC;AAChD,+BAAmB,GAAG,KAAK,CAAC;AAoB1C;;GAEG;AACoB,iCAAqB,GAAG,IAAI,wBAAwB,EAAE,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 Utilities\r\n */\r\n\r\n// cSpell:ignore configurableui clientservices\r\n\r\nimport { Store } from \"redux\";\r\nimport { GuidString, Logger, ProcessDetector } from \"@itwin/core-bentley\";\r\nimport { Localization, RpcActivity } from \"@itwin/core-common\";\r\nimport { IModelApp, IModelConnection, SnapMode, ViewState } from \"@itwin/core-frontend\";\r\nimport { Presentation } from \"@itwin/presentation-frontend\";\r\nimport { TelemetryEvent } from \"@itwin/core-telemetry\";\r\nimport { getClassName, UiAdmin, UiError, UiEvent } from \"@itwin/appui-abstract\";\r\nimport { LocalStateStorage, SettingsManager, UiStateStorage } from \"@itwin/core-react\";\r\nimport { UiIModelComponents } from \"@itwin/imodel-components-react\";\r\nimport { BackstageManager } from \"./backstage/BackstageManager\";\r\nimport { ChildWindowManager } from \"./childwindow/ChildWindowManager\";\r\nimport { ConfigurableUiManager } from \"./configurableui/ConfigurableUiManager\";\r\nimport { ConfigurableUiActionId } from \"./configurableui/state\";\r\nimport { FrameworkState } from \"./redux/FrameworkState\";\r\nimport { CursorMenuData, PresentationSelectionScope, SessionStateActionId } from \"./redux/SessionState\";\r\nimport { StateManager } from \"./redux/StateManager\";\r\nimport { HideIsolateEmphasizeActionHandler, HideIsolateEmphasizeManager } from \"./selection/HideIsolateEmphasizeManager\";\r\nimport { SyncUiEventDispatcher, SyncUiEventId } from \"./syncui/SyncUiEventDispatcher\";\r\nimport { SYSTEM_PREFERRED_COLOR_THEME, WIDGET_OPACITY_DEFAULT } from \"./theme/ThemeManager\";\r\nimport * as keyinPaletteTools from \"./tools/KeyinPaletteTools\";\r\nimport * as openSettingTools from \"./tools/OpenSettingsTool\";\r\nimport * as restoreLayoutTools from \"./tools/RestoreLayoutTool\";\r\nimport * as toolSettingTools from \"./tools/ToolSettingsTools\";\r\nimport { UiShowHideManager, UiShowHideSettingsProvider } from \"./utils/UiShowHideManager\";\r\nimport { WidgetManager } from \"./widgets/WidgetManager\";\r\nimport { FrontstageManager } from \"./frontstage/FrontstageManager\";\r\n\r\n// cSpell:ignore Mobi\r\n\r\n/** Defined that available UI Versions. It is recommended to always use the latest version available.\r\n * @public\r\n */\r\nexport type FrameworkVersionId = \"1\" | \"2\";\r\n\r\n/** Interface to be implemented but any classes that wants to load their user settings when the UiStateEntry storage class is set.\r\n * @public\r\n */\r\nexport interface UserSettingsProvider {\r\n /** Unique provider Id */\r\n providerId: string;\r\n /** Function to load settings from settings storage */\r\n loadUserSettings(storage: UiStateStorage): Promise<void>;\r\n}\r\n\r\n/** UiVisibility Event Args interface.\r\n * @public\r\n */\r\nexport interface UiVisibilityEventArgs {\r\n visible: boolean;\r\n}\r\n\r\n/** UiVisibility Event class.\r\n * @public\r\n */\r\nexport class UiVisibilityChangedEvent extends UiEvent<UiVisibilityEventArgs> { }\r\n\r\n/** FrameworkVersion Changed Event Args interface.\r\n * @internal\r\n */\r\nexport interface FrameworkVersionChangedEventArgs {\r\n oldVersion: FrameworkVersionId;\r\n version: FrameworkVersionId;\r\n}\r\n\r\n/** FrameworkVersion Changed Event class.\r\n * @internal\r\n */\r\nexport class FrameworkVersionChangedEvent extends UiEvent<FrameworkVersionChangedEventArgs> { }\r\n\r\n/** TrackingTime time argument used by our feature tracking manager as an option argument to the TelemetryClient\r\n * @internal\r\n */\r\nexport interface TrackingTime {\r\n startTime: Date;\r\n endTime: Date;\r\n}\r\n\r\n/**\r\n * Manages the Redux store, localization service and iModel, Project and Login services for the ui-framework package.\r\n * @public\r\n */\r\nexport class UiFramework {\r\n private static _initialized = false;\r\n private static _store?: Store<any>;\r\n private static _complaint = \"UiFramework not initialized\";\r\n private static _frameworkStateKeyInStore: string = \"frameworkState\"; // default name\r\n private static _backstageManager?: BackstageManager;\r\n private static _widgetManager?: WidgetManager;\r\n private static _uiVersion: FrameworkVersionId = \"2\";\r\n private static _hideIsolateEmphasizeActionHandler?: HideIsolateEmphasizeActionHandler;\r\n /** this provides a default state storage handler */\r\n private static _uiStateStorage: UiStateStorage = new LocalStateStorage();\r\n private static _settingsManager?: SettingsManager;\r\n private static _uiSettingsProviderRegistry: Map<string, UserSettingsProvider> = new Map<string, UserSettingsProvider>();\r\n private static _PopupWindowManager = new ChildWindowManager();\r\n public static useDefaultPopoutUrl = false;\r\n\r\n /** @public */\r\n public static get childWindowManager(): ChildWindowManager {\r\n return UiFramework._PopupWindowManager;\r\n }\r\n\r\n /** Registers class that will be informed when the UserSettingsStorage location has been set or changed. This allows\r\n * classes to load any previously saved settings from the new storage location. Common storage locations are the browser's\r\n * local storage, or the iTwin Product Settings cloud storage available via the SettingsAdmin see `IModelApp.settingsAdmin`.\r\n * @beta\r\n */\r\n public static registerUserSettingsProvider(entry: UserSettingsProvider) {\r\n if (this._uiSettingsProviderRegistry.has(entry.providerId))\r\n return false;\r\n\r\n this._uiSettingsProviderRegistry.set(entry.providerId, entry);\r\n return true;\r\n }\r\n\r\n /** Get Show Ui event.\r\n * @public\r\n */\r\n public static readonly onUiVisibilityChanged = new UiVisibilityChangedEvent();\r\n\r\n /**\r\n * Called by the application to initialize the UiFramework. Also initializes UIIModelComponents, UiComponents, UiCore.\r\n * @param store The single Redux store created by the host application. If this is `undefined` then it is assumed that the [[StateManager]] is being used to provide the Redux store.\r\n * @param frameworkStateKey The name of the key used by the app when adding the UiFramework state into the Redux store. If not defined \"frameworkState\" is assumed. This value is ignored if [[StateManager]] is being used. The StateManager use \"frameworkState\".\r\n * @param startInUi1Mode Used for legacy applications to start up in the deprecated UI 1 mode. This should not set by newer applications.\r\n */\r\n public static async initialize(store: Store<any> | undefined, frameworkStateKey?: string, startInUi1Mode?: boolean): Promise<void> {\r\n return this.initializeEx(store, frameworkStateKey, startInUi1Mode);\r\n }\r\n\r\n /**\r\n * Called by the application to initialize the UiFramework. Also initializes UIIModelComponents, UiComponents, UiCore.\r\n * @param store The single Redux store created by the host application. If this is `undefined` then it is assumed that the [[StateManager]] is being used to provide the Redux store.\r\n * @param frameworkStateKey The name of the key used by the app when adding the UiFramework state into the Redux store. If not defined \"frameworkState\" is assumed. This value is ignored if [[StateManager]] is being used. The StateManager use \"frameworkState\".\r\n * @param startInUi1Mode Used for legacy applications to start up in the deprecated UI 1 mode. This should not set by newer applications.\r\n *\r\n * @internal\r\n */\r\n public static async initializeEx(store: Store<any> | undefined, frameworkStateKey?: string, startInUi1Mode?: boolean): Promise<void> {\r\n if (UiFramework._initialized) {\r\n Logger.logInfo(UiFramework.loggerCategory(UiFramework), `UiFramework.initialize already called`);\r\n return;\r\n }\r\n\r\n /* if store is undefined then the StateManager class should have been initialized by parent app and the apps default set of reducers registered with it.\r\n If the app has no reducers to add and does not initialize a StateManager then just initialize the StateManager with the default framework reducer now */\r\n if (undefined === store && !StateManager.isInitialized(true))\r\n new StateManager();\r\n\r\n UiFramework._store = store;\r\n // ignore setting _frameworkStateKeyInStore if not using store\r\n if (frameworkStateKey && store)\r\n UiFramework._frameworkStateKeyInStore = frameworkStateKey;\r\n\r\n if (startInUi1Mode)\r\n UiFramework.store.dispatch({ type: ConfigurableUiActionId.SetFrameworkVersion, payload: \"1\" });\r\n\r\n // set up namespace and register all tools from package\r\n const frameworkNamespace = IModelApp.localization?.registerNamespace(UiFramework.localizationNamespace);\r\n [\r\n restoreLayoutTools,\r\n keyinPaletteTools,\r\n openSettingTools,\r\n toolSettingTools,\r\n ].forEach((tool) => IModelApp.tools.registerModule(tool, this.localizationNamespace));\r\n\r\n UiFramework._backstageManager = new BackstageManager();\r\n UiFramework._hideIsolateEmphasizeActionHandler = new HideIsolateEmphasizeManager(); // this allows user to override the default HideIsolateEmphasizeManager implementation.\r\n UiFramework._widgetManager = new WidgetManager();\r\n\r\n // Initialize ui-imodel-components, ui-components, ui-core & ui-abstract\r\n await UiIModelComponents.initialize();\r\n\r\n UiFramework.settingsManager.onSettingsProvidersChanged.addListener(() => {\r\n SyncUiEventDispatcher.dispatchSyncUiEvent(SyncUiEventId.SettingsProvidersChanged);\r\n });\r\n\r\n // Initialize the MessagePresenter interface in UiAdmin for Editor notifications\r\n UiAdmin.messagePresenter = IModelApp.notifications;\r\n\r\n UiFramework._initialized = true;\r\n\r\n // initialize any standalone settings providers that don't need to have defaults set by iModelApp\r\n UiShowHideSettingsProvider.initialize();\r\n\r\n ConfigurableUiManager.initialize();\r\n\r\n return frameworkNamespace;\r\n }\r\n\r\n /** Un-registers the UiFramework internationalization service namespace */\r\n public static terminate() {\r\n UiFramework._store = undefined;\r\n UiFramework._frameworkStateKeyInStore = \"frameworkState\";\r\n if (StateManager.isInitialized(true))\r\n StateManager.clearStore();\r\n // istanbul ignore next\r\n IModelApp.localization?.unregisterNamespace(UiFramework.localizationNamespace);\r\n UiFramework._backstageManager = undefined;\r\n UiFramework._widgetManager = undefined;\r\n UiFramework._hideIsolateEmphasizeActionHandler = undefined;\r\n UiFramework._settingsManager = undefined;\r\n\r\n UiIModelComponents.terminate();\r\n UiShowHideManager.terminate();\r\n UiFramework._initialized = false;\r\n }\r\n\r\n /** Determines if UiFramework has been initialized */\r\n public static get initialized(): boolean { return UiFramework._initialized; }\r\n\r\n /** Property that returns the SettingManager used by AppUI-based applications.\r\n * @public\r\n */\r\n public static get settingsManager() {\r\n if (undefined === UiFramework._settingsManager)\r\n UiFramework._settingsManager = new SettingsManager();\r\n return UiFramework._settingsManager;\r\n }\r\n\r\n /** @public */\r\n public static get frameworkStateKey(): string {\r\n return UiFramework._frameworkStateKeyInStore;\r\n }\r\n\r\n /** The UiFramework state maintained by Redux\r\n * @public\r\n */\r\n public static get frameworkState(): FrameworkState | undefined {\r\n try {\r\n // eslint-disable-next-line dot-notation\r\n return UiFramework.store.getState()[UiFramework.frameworkStateKey];\r\n } catch (_e) {\r\n return undefined;\r\n }\r\n }\r\n\r\n /** The Redux store */\r\n public static get store(): Store<any> {\r\n if (UiFramework._store)\r\n return UiFramework._store;\r\n\r\n // istanbul ignore else\r\n if (!StateManager.isInitialized(true))\r\n throw new UiError(UiFramework.loggerCategory(this), `Error trying to access redux store before either store or StateManager has been initialized.`);\r\n\r\n // istanbul ignore next\r\n return StateManager.store;\r\n }\r\n\r\n /** The internationalization service created by the app.\r\n * @internal\r\n */\r\n public static get localization(): Localization {\r\n // istanbul ignore next\r\n if (!IModelApp.localization)\r\n throw new UiError(UiFramework.loggerCategory(this), `IModelApp.localization has not been defined.`);\r\n return IModelApp.localization;\r\n }\r\n\r\n /** The internationalization service namespace. */\r\n public static get localizationNamespace(): string {\r\n return \"UiFramework\";\r\n }\r\n\r\n /** @public */\r\n public static get backstageManager(): BackstageManager {\r\n // istanbul ignore next\r\n if (!UiFramework._backstageManager)\r\n throw new UiError(UiFramework.loggerCategory(this), UiFramework._complaint);\r\n return UiFramework._backstageManager;\r\n }\r\n\r\n /** @alpha */\r\n public static get hideIsolateEmphasizeActionHandler(): HideIsolateEmphasizeActionHandler {\r\n // istanbul ignore next\r\n if (!UiFramework._hideIsolateEmphasizeActionHandler)\r\n throw new UiError(UiFramework.loggerCategory(this), UiFramework._complaint);\r\n return UiFramework._hideIsolateEmphasizeActionHandler;\r\n }\r\n\r\n /** @alpha */\r\n public static setHideIsolateEmphasizeActionHandler(handler: HideIsolateEmphasizeActionHandler | undefined) {\r\n // istanbul ignore else\r\n if (handler)\r\n UiFramework._hideIsolateEmphasizeActionHandler = handler;\r\n else\r\n UiFramework._hideIsolateEmphasizeActionHandler = new HideIsolateEmphasizeManager();\r\n }\r\n\r\n /** @alpha */\r\n public static get widgetManager(): WidgetManager {\r\n // istanbul ignore next\r\n if (!UiFramework._widgetManager)\r\n throw new UiError(UiFramework.loggerCategory(this), UiFramework._complaint);\r\n return UiFramework._widgetManager;\r\n }\r\n\r\n /** Calls localization.getLocalizedStringWithNamespace with the \"UiFramework\" namespace. Do NOT include the namespace in the key.\r\n * @internal\r\n */\r\n public static translate(key: string | string[]): string {\r\n return IModelApp.localization.getLocalizedStringWithNamespace(UiFramework.localizationNamespace, key);\r\n }\r\n\r\n /** @internal */\r\n public static get packageName(): string {\r\n return \"appui-react\";\r\n }\r\n\r\n /** @internal */\r\n public static loggerCategory(obj: any): string {\r\n const className = getClassName(obj);\r\n const category = UiFramework.packageName + (className ? `.${className}` : \"\");\r\n return category;\r\n }\r\n\r\n public static dispatchActionToStore(type: string, payload: any, immediateSync = false) {\r\n UiFramework.store.dispatch({ type, payload });\r\n if (immediateSync)\r\n SyncUiEventDispatcher.dispatchImmediateSyncUiEvent(type);\r\n else\r\n SyncUiEventDispatcher.dispatchSyncUiEvent(type);\r\n }\r\n\r\n public static setAccudrawSnapMode(snapMode: SnapMode) {\r\n UiFramework.dispatchActionToStore(ConfigurableUiActionId.SetSnapMode, snapMode, true);\r\n }\r\n\r\n public static getAccudrawSnapMode(): SnapMode {\r\n return UiFramework.frameworkState ? UiFramework.frameworkState.configurableUiState.snapMode : /* istanbul ignore next */ SnapMode.NearestKeypoint;\r\n }\r\n\r\n public static getActiveSelectionScope(): string {\r\n return UiFramework.frameworkState ? UiFramework.frameworkState.sessionState.activeSelectionScope : /* istanbul ignore next */ \"element\";\r\n }\r\n\r\n public static setActiveSelectionScope(selectionScopeId: string): void {\r\n // istanbul ignore else\r\n if (UiFramework.frameworkState) {\r\n const foundIndex = UiFramework.frameworkState.sessionState.availableSelectionScopes.findIndex((selectionScope: PresentationSelectionScope) => selectionScope.id === selectionScopeId);\r\n if (-1 !== foundIndex) {\r\n const scope = UiFramework.frameworkState.sessionState.availableSelectionScopes[foundIndex];\r\n UiFramework.dispatchActionToStore(SessionStateActionId.SetSelectionScope, scope.id);\r\n Presentation.selection.scopes.activeScope = scope.id;\r\n }\r\n }\r\n }\r\n\r\n /** @public */\r\n public static openCursorMenu(menuData: CursorMenuData | undefined): void {\r\n UiFramework.dispatchActionToStore(SessionStateActionId.UpdateCursorMenu, menuData);\r\n }\r\n\r\n /** @public */\r\n public static closeCursorMenu(): void {\r\n UiFramework.dispatchActionToStore(SessionStateActionId.UpdateCursorMenu, undefined);\r\n }\r\n\r\n /** @public */\r\n public static getCursorMenuData(): CursorMenuData | undefined {\r\n return UiFramework.frameworkState ? UiFramework.frameworkState.sessionState.cursorMenuData : /* istanbul ignore next */ undefined;\r\n }\r\n\r\n public static getActiveIModelId(): string {\r\n return UiFramework.frameworkState ? UiFramework.frameworkState.sessionState.iModelId : /* istanbul ignore next */ \"\";\r\n }\r\n\r\n public static setActiveIModelId(iModelId: string): void {\r\n UiFramework.dispatchActionToStore(SessionStateActionId.SetActiveIModelId, iModelId);\r\n }\r\n\r\n public static setIModelConnection(iModelConnection: IModelConnection | undefined, immediateSync = false) {\r\n const oldConnection = UiFramework.getIModelConnection();\r\n if (oldConnection !== iModelConnection) {\r\n if (oldConnection?.iModelId)\r\n FrontstageManager.clearFrontstageDefsForIModelId(oldConnection.iModelId);\r\n oldConnection && undefined === iModelConnection && SyncUiEventDispatcher.clearConnectionEvents(oldConnection);\r\n iModelConnection && SyncUiEventDispatcher.initializeConnectionEvents(iModelConnection);\r\n UiFramework.dispatchActionToStore(SessionStateActionId.SetIModelConnection, iModelConnection, immediateSync);\r\n }\r\n UiFramework.setActiveIModelId(iModelConnection?.iModelId ?? \"\");\r\n }\r\n\r\n public static getIModelConnection(): IModelConnection | undefined {\r\n return UiFramework.frameworkState ? UiFramework.frameworkState.sessionState.iModelConnection : /* istanbul ignore next */ undefined;\r\n }\r\n\r\n /** Called by iModelApp to initialize saved UI state from registered UseSettingsProviders\r\n * @public\r\n */\r\n public static async initializeStateFromUserSettingsProviders(immediateSync = false) {\r\n // let any registered providers to load values from the new storage location\r\n const providerKeys = [...this._uiSettingsProviderRegistry.keys()];\r\n for await (const key of providerKeys) {\r\n await this._uiSettingsProviderRegistry.get(key)!.loadUserSettings(UiFramework._uiStateStorage);\r\n }\r\n\r\n // istanbul ignore next\r\n if (immediateSync)\r\n SyncUiEventDispatcher.dispatchImmediateSyncUiEvent(SyncUiEventId.UiStateStorageChanged);\r\n else\r\n SyncUiEventDispatcher.dispatchSyncUiEvent(SyncUiEventId.UiStateStorageChanged);\r\n }\r\n\r\n /** @public */\r\n public static async setUiStateStorage(storage: UiStateStorage, immediateSync = false) {\r\n if (UiFramework._uiStateStorage === storage)\r\n return;\r\n\r\n UiFramework._uiStateStorage = storage;\r\n await this.initializeStateFromUserSettingsProviders(immediateSync);\r\n }\r\n\r\n /** The UI Settings Storage is a convenient wrapper around Local Storage to assist in caching state information across user sessions.\r\n * It was previously used to conflate both the state information across session and the information driven directly from user explicit action,\r\n * which are now handled with user preferences.\r\n * @public\r\n */\r\n public static getUiStateStorage(): UiStateStorage {\r\n return UiFramework._uiStateStorage;\r\n }\r\n\r\n public static setDefaultIModelViewportControlId(iModelViewportControlId: string, immediateSync = false) {\r\n UiFramework.dispatchActionToStore(SessionStateActionId.SetDefaultIModelViewportControlId, iModelViewportControlId, immediateSync);\r\n }\r\n\r\n public static getDefaultIModelViewportControlId(): string | undefined {\r\n return UiFramework.frameworkState ? UiFramework.frameworkState.sessionState.defaultIModelViewportControlId : /* istanbul ignore next */ undefined;\r\n }\r\n\r\n public static setDefaultViewId(viewId: string, immediateSync = false) {\r\n UiFramework.dispatchActionToStore(SessionStateActionId.SetDefaultViewId, viewId, immediateSync);\r\n }\r\n\r\n public static getDefaultViewId(): string | undefined {\r\n return UiFramework.frameworkState ? UiFramework.frameworkState.sessionState.defaultViewId : /* istanbul ignore next */ undefined;\r\n }\r\n\r\n public static setDefaultViewState(viewState: ViewState, immediateSync = false) {\r\n UiFramework.dispatchActionToStore(SessionStateActionId.SetDefaultViewState, viewState, immediateSync);\r\n }\r\n public static getDefaultViewState(): ViewState | undefined {\r\n return UiFramework.frameworkState ? UiFramework.frameworkState.sessionState.defaultViewState : /* istanbul ignore next */ undefined;\r\n }\r\n\r\n /** @public */\r\n public static getAvailableSelectionScopes(): PresentationSelectionScope[] {\r\n return UiFramework.frameworkState ?\r\n UiFramework.frameworkState.sessionState.availableSelectionScopes :\r\n /* istanbul ignore next */\r\n [{ id: \"element\", label: \"Element\" } as PresentationSelectionScope];\r\n }\r\n\r\n public static getIsUiVisible() {\r\n return UiShowHideManager.isUiVisible;\r\n }\r\n\r\n public static setIsUiVisible(visible: boolean) {\r\n if (UiShowHideManager.isUiVisible !== visible) {\r\n UiShowHideManager.isUiVisible = visible;\r\n UiFramework.onUiVisibilityChanged.emit({ visible });\r\n }\r\n }\r\n\r\n public static setColorTheme(theme: string) {\r\n if (UiFramework.getColorTheme() === theme)\r\n return;\r\n\r\n UiFramework.dispatchActionToStore(ConfigurableUiActionId.SetTheme, theme, true);\r\n }\r\n\r\n public static getColorTheme(): string {\r\n return UiFramework.frameworkState ? UiFramework.frameworkState.configurableUiState.theme : /* istanbul ignore next */ SYSTEM_PREFERRED_COLOR_THEME;\r\n }\r\n\r\n public static setWidgetOpacity(opacity: number) {\r\n if (UiFramework.getWidgetOpacity() === opacity)\r\n return;\r\n\r\n UiFramework.dispatchActionToStore(ConfigurableUiActionId.SetWidgetOpacity, opacity, true);\r\n }\r\n\r\n public static getWidgetOpacity(): number {\r\n return UiFramework.frameworkState ? UiFramework.frameworkState.configurableUiState.widgetOpacity : /* istanbul ignore next */ WIDGET_OPACITY_DEFAULT;\r\n }\r\n\r\n public static isMobile() { // eslint-disable-line @itwin/prefer-get\r\n return ProcessDetector.isMobileBrowser;\r\n }\r\n\r\n /** Returns the Ui Version.\r\n * @public\r\n */\r\n public static get uiVersion(): FrameworkVersionId {\r\n return UiFramework.frameworkState ? UiFramework.frameworkState.configurableUiState.frameworkVersion : this._uiVersion;\r\n }\r\n\r\n public static setUiVersion(version: FrameworkVersionId) {\r\n if (UiFramework.uiVersion === version)\r\n return;\r\n\r\n UiFramework.dispatchActionToStore(ConfigurableUiActionId.SetFrameworkVersion, version === \"1\" ? \"1\" : \"2\", true);\r\n }\r\n\r\n public static get showWidgetIcon(): boolean {\r\n return UiFramework.frameworkState ? UiFramework.frameworkState.configurableUiState.showWidgetIcon : /* istanbul ignore next */ false;\r\n }\r\n\r\n public static setShowWidgetIcon(value: boolean) {\r\n if (UiFramework.showWidgetIcon === value)\r\n return;\r\n\r\n UiFramework.dispatchActionToStore(ConfigurableUiActionId.SetShowWidgetIcon, value, true);\r\n }\r\n\r\n public static get useDragInteraction(): boolean {\r\n return UiFramework.frameworkState ? UiFramework.frameworkState.configurableUiState.useDragInteraction : false;\r\n }\r\n\r\n public static setUseDragInteraction(useDragInteraction: boolean) {\r\n UiFramework.dispatchActionToStore(ConfigurableUiActionId.SetDragInteraction, useDragInteraction, true);\r\n }\r\n\r\n /** Returns the variable controlling whether the overlay is displayed in a Viewport\r\n * @public\r\n */\r\n public static get viewOverlayDisplay() {\r\n return UiFramework.frameworkState ? UiFramework.frameworkState.configurableUiState.viewOverlayDisplay : /* istanbul ignore next */ true;\r\n }\r\n /** Set the variable that controls display of the view overlay. Applies to all viewports in the app\r\n * @public\r\n */\r\n public static setViewOverlayDisplay(display: boolean) {\r\n if (UiFramework.viewOverlayDisplay === display)\r\n return;\r\n UiFramework.dispatchActionToStore(ConfigurableUiActionId.SetViewOverlayDisplay, display);\r\n }\r\n /** Send logging message to the telemetry system\r\n * @internal\r\n */\r\n // istanbul ignore next\r\n public static async postTelemetry(eventName: string, eventId?: GuidString, iTwinId?: GuidString, iModeId?: GuidString, changeSetId?: string, time?: TrackingTime, additionalProperties?: { [key: string]: any }): Promise<void> {\r\n if (!IModelApp.authorizationClient)\r\n return;\r\n\r\n try {\r\n const activity: RpcActivity = {\r\n sessionId: IModelApp.sessionId,\r\n activityId: \"\",\r\n applicationId: IModelApp.applicationId,\r\n applicationVersion: IModelApp.applicationVersion,\r\n accessToken: (await IModelApp.authorizationClient.getAccessToken()) ?? \"\",\r\n };\r\n const telemetryEvent = new TelemetryEvent(eventName, eventId, iTwinId, iModeId, changeSetId, time, additionalProperties);\r\n await IModelApp.telemetry.postTelemetry(activity, telemetryEvent);\r\n } catch { }\r\n }\r\n /** Determines whether a ContextMenu is open\r\n * @alpha\r\n * */\r\n public static get isContextMenuOpen(): boolean {\r\n const contextMenu = document.querySelector(\"div.core-context-menu-opened\");\r\n return contextMenu !== null && contextMenu !== undefined;\r\n }\r\n}\r\n"]}
|
|
@@ -23,7 +23,7 @@ const ForwardRefAccuDrawInput = React.forwardRef(function ForwardRefAccuDrawInpu
|
|
|
23
23
|
const [needValueChanged, setNeedValueChanged] = React.useState(false);
|
|
24
24
|
const [needSelection, setNeedSelection] = React.useState(false);
|
|
25
25
|
const [isFocusField, setIsFocusField] = React.useState(false);
|
|
26
|
-
const inputElementRef = React.useRef();
|
|
26
|
+
const inputElementRef = React.useRef(null);
|
|
27
27
|
const refs = (0, core_react_1.useRefs)(inputElementRef, ref); // combine ref needed for target with the forwardRef needed by the Parent when parent is a Type Editor.
|
|
28
28
|
React.useEffect(() => {
|
|
29
29
|
const formattedValue = FrameworkAccuDraw_1.FrameworkAccuDraw.getFieldDisplayValue(field);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AccuDrawInputField.js","sourceRoot":"","sources":["../../../../src/appui-react/accudraw/AccuDrawInputField.tsx"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,qCAAmC;AACnC,2CAAoC;AACpC,+BAA+B;AAE/B,kDAAyE;AACzE,0DAA6D;AAC7D,wDAA6C;AAC7C,2EAA+E;AAC/E,2DAA4H;AAkC5H,MAAM,uBAAuB,GAAG,KAAK,CAAC,UAAU,CAC9C,SAAS,4BAA4B,CAAC,KAA8B,EAAE,GAAG;IACvE,MAAM,EAAE,SAAS,EAAE,KAAK,EAAE,EAAE,EAAE,KAAK,EAAE,QAAQ,EAAE,cAAc,EAAE,UAAU,EAAE,aAAa,EAAE,KAAK,EA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3E,MAAM,eAAe,GAAG,IAAA,oBAAU,EAAC,2BAA2B,EAC5D,aAAa,IAAI,qBAAqB,EACtC,cAAc,CACf,CAAC;IAEF,OAAO,CACL;QACE,+BAAO,OAAO,EAAE,EAAE,EAAE,SAAS,EAAE,eAAe,EAAE,KAAK,EAAE,UAAU;YAC9D,KAAK;YACL,QAAQ,IAAI,oBAAC,iBAAI,IAAC,QAAQ,EAAE,QAAQ,GAAI,CACnC;QACR,oBAAC,qBAAK,OAAK,UAAU,EAAE,GAAG,EAAE,IAAI,EAAE,EAAE,EAAE,EAAE,EAAE,KAAK,EAAE,WAAW,EAC1D,SAAS,EAAE,eAAe,EAAE,KAAK,EAAE,KAAK,EAAE,YAAY,EAAC,KAAK,EAC5D,QAAQ,EAAE,YAAY,EAAE,SAAS,EAAE,aAAa,EAAE,IAAI,EAAC,OAAO,GAAG;QACnE,8BAAM,SAAS,EAAC,oBAAoB,IACjC,QAAQ,IAAI,oBAAC,iBAAI,IAAC,QAAQ,EAAC,WAAW,GAAG,CACrC,CACN,CACJ,CAAC;AACJ,CAAC,CACF,CAAC;AAEF;;GAEG;AACU,QAAA,kBAAkB,GAA2D,uBAAuB,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 AccuDraw\r\n */\r\n\r\nimport \"./AccuDrawInputField.scss\";\r\nimport classnames from \"classnames\";\r\nimport * as React from \"react\";\r\nimport { ItemField } from \"@itwin/core-frontend\";\r\nimport { CommonProps, Icon, IconSpec, useRefs } from \"@itwin/core-react\";\r\nimport { isLetter, SpecialKey } from \"@itwin/appui-abstract\";\r\nimport { Input } from \"@itwin/itwinui-react\";\r\nimport { KeyboardShortcutManager } from \"../keyboardshortcut/KeyboardShortcut\";\r\nimport { AccuDrawSetFieldFocusEventArgs, AccuDrawSetFieldValueToUiEventArgs, FrameworkAccuDraw } from \"./FrameworkAccuDraw\";\r\n\r\n/** Properties for [[AccuDrawInputField]] component\r\n * @beta\r\n */\r\nexport interface AccuDrawInputFieldProps extends CommonProps {\r\n /** Which AccuDraw field this represents */\r\n field: ItemField;\r\n /** id for the input element */\r\n id: string;\r\n /** Indicates whether field is locked */\r\n isLocked?: boolean;\r\n /** label for the input element */\r\n label?: string;\r\n /** icon for the input element */\r\n iconSpec?: IconSpec;\r\n /** Custom CSS class name for the label */\r\n labelClassName?: string;\r\n /** Custom CSS Style for the label */\r\n labelStyle?: React.CSSProperties;\r\n /** Center justified label */\r\n labelCentered?: boolean;\r\n /** Triggered when the content is changed */\r\n onValueChanged: (stringValue: string) => void;\r\n /** Frequency to poll for changes in value, in milliseconds */\r\n valueChangedDelay?: number;\r\n /** Listens for <Enter> keypress */\r\n onEnterPressed?: () => void;\r\n /** Listens for <Esc> keypress */\r\n onEscPressed?: () => void;\r\n /** Provides ability to return reference to HTMLInputElement */\r\n ref?: React.Ref<HTMLInputElement>;\r\n}\r\n\r\nconst ForwardRefAccuDrawInput = React.forwardRef<HTMLInputElement, AccuDrawInputFieldProps>(\r\n function ForwardRefAccuDrawInputField(props: AccuDrawInputFieldProps, ref) {\r\n const { className, style, id, label, iconSpec, labelClassName, labelStyle, labelCentered, field, isLocked,\r\n onValueChanged, valueChangedDelay, onEnterPressed, onEscPressed, ...inputProps } = props;\r\n const [stringValue, setStringValue] = React.useState(\"\");\r\n const timeoutId = React.useRef(0);\r\n const [needValueChanged, setNeedValueChanged] = React.useState(false);\r\n const [needSelection, setNeedSelection] = React.useState(false);\r\n const [isFocusField, setIsFocusField] = React.useState(false);\r\n const inputElementRef = React.useRef<HTMLInputElement>();\r\n const refs = useRefs(inputElementRef, ref); // combine ref needed for target with the forwardRef needed by the Parent when parent is a Type Editor.\r\n\r\n React.useEffect(() => {\r\n const formattedValue = FrameworkAccuDraw.getFieldDisplayValue(field);\r\n setStringValue(formattedValue);\r\n }, [field]);\r\n\r\n const handleChange = React.useCallback((event: React.ChangeEvent<HTMLInputElement>): void => {\r\n const value = event.currentTarget.value;\r\n\r\n // istanbul ignore next\r\n if (value === undefined)\r\n return;\r\n\r\n // istanbul ignore else\r\n if (stringValue !== value) {\r\n setStringValue(value);\r\n setNeedValueChanged(true);\r\n }\r\n }, [stringValue]);\r\n\r\n const unsetTimeout = (): void => {\r\n // istanbul ignore else\r\n if (timeoutId) {\r\n window.clearTimeout(timeoutId.current);\r\n timeoutId.current = 0;\r\n }\r\n };\r\n\r\n React.useEffect(() => {\r\n // After setStringValue & re-render\r\n // istanbul ignore else\r\n if (needValueChanged) {\r\n if (valueChangedDelay) {\r\n unsetTimeout();\r\n timeoutId.current = window.setTimeout(() => {\r\n onValueChanged(stringValue);\r\n }, valueChangedDelay);\r\n } else {\r\n onValueChanged(stringValue);\r\n }\r\n setNeedValueChanged(false);\r\n }\r\n }, [onValueChanged, valueChangedDelay, stringValue, needValueChanged]);\r\n\r\n React.useEffect(() => {\r\n // On unmount\r\n return () => unsetTimeout();\r\n }, []);\r\n\r\n const handleKeyDown = React.useCallback((e: React.KeyboardEvent) => {\r\n switch (e.key) {\r\n case SpecialKey.Escape:\r\n onEscPressed && onEscPressed();\r\n return;\r\n case SpecialKey.Enter:\r\n onEnterPressed && onEnterPressed();\r\n return;\r\n }\r\n\r\n if (isLetter(e.key)) {\r\n e.preventDefault();\r\n KeyboardShortcutManager.processKey(e.key);\r\n return;\r\n }\r\n }, [onEscPressed, onEnterPressed]);\r\n\r\n React.useEffect(() => {\r\n const handleSetFieldValueToUi = (args: AccuDrawSetFieldValueToUiEventArgs) => {\r\n if (args.field === field && stringValue !== args.formattedValue) {\r\n setStringValue(args.formattedValue);\r\n // istanbul ignore else\r\n if (isFocusField)\r\n setNeedSelection(true);\r\n }\r\n };\r\n return FrameworkAccuDraw.onAccuDrawSetFieldValueToUiEvent.addListener(handleSetFieldValueToUi);\r\n }, [field, isFocusField, stringValue]);\r\n\r\n React.useEffect(() => {\r\n if (needSelection) {\r\n // istanbul ignore else\r\n if (inputElementRef.current)\r\n inputElementRef.current.select();\r\n setNeedSelection(false);\r\n }\r\n }, [needSelection]);\r\n\r\n React.useEffect(() => {\r\n const handleSetFieldFocus = (args: AccuDrawSetFieldFocusEventArgs) => {\r\n setIsFocusField(args.field === field);\r\n };\r\n return FrameworkAccuDraw.onAccuDrawSetFieldFocusEvent.addListener(handleSetFieldFocus);\r\n }, [field]);\r\n\r\n const inputClassNames = classnames(\"uifw-accudraw-input-field\", className);\r\n const labelClassNames = classnames(\"uifw-accudraw-input-label\",\r\n labelCentered && \"uifw-label-centered\",\r\n labelClassName\r\n );\r\n\r\n return (\r\n <>\r\n <label htmlFor={id} className={labelClassNames} style={labelStyle}>\r\n {label}\r\n {iconSpec && <Icon iconSpec={iconSpec} />}\r\n </label>\r\n <Input {...inputProps} ref={refs} id={id} value={stringValue}\r\n className={inputClassNames} style={style} autoComplete=\"off\"\r\n onChange={handleChange} onKeyDown={handleKeyDown} size=\"small\" />\r\n <span className=\"uifw-accudraw-lock\" >\r\n {isLocked && <Icon iconSpec=\"icon-lock\" />}\r\n </span>\r\n </>\r\n );\r\n }\r\n);\r\n\r\n/** Input field for AccuDraw Ui\r\n * @beta\r\n */\r\nexport const AccuDrawInputField: (props: AccuDrawInputFieldProps) => JSX.Element | null = ForwardRefAccuDrawInput;\r\n"]}
|
|
1
|
+
{"version":3,"file":"AccuDrawInputField.js","sourceRoot":"","sources":["../../../../src/appui-react/accudraw/AccuDrawInputField.tsx"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,qCAAmC;AACnC,2CAAoC;AACpC,+BAA+B;AAE/B,kDAAyE;AACzE,0DAA6D;AAC7D,wDAA6C;AAC7C,2EAA+E;AAC/E,2DAA4H;AAkC5H,MAAM,uBAAuB,GAAG,KAAK,CAAC,UAAU,CAC9C,SAAS,4BAA4B,CAAC,KAA8B,EAAE,GAAG;IACvE,MAAM,EAAE,S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,EAAE,CAAC,KAAK,CAAC,CAAC,CAAC;IAEZ,MAAM,eAAe,GAAG,IAAA,oBAAU,EAAC,2BAA2B,EAAE,SAAS,CAAC,CAAC;IAC3E,MAAM,eAAe,GAAG,IAAA,oBAAU,EAAC,2BAA2B,EAC5D,aAAa,IAAI,qBAAqB,EACtC,cAAc,CACf,CAAC;IAEF,OAAO,CACL;QACE,+BAAO,OAAO,EAAE,EAAE,EAAE,SAAS,EAAE,eAAe,EAAE,KAAK,EAAE,UAAU;YAC9D,KAAK;YACL,QAAQ,IAAI,oBAAC,iBAAI,IAAC,QAAQ,EAAE,QAAQ,GAAI,CACnC;QACR,oBAAC,qBAAK,OAAK,UAAU,EAAE,GAAG,EAAE,IAAI,EAAE,EAAE,EAAE,EAAE,EAAE,KAAK,EAAE,WAAW,EAC1D,SAAS,EAAE,eAAe,EAAE,KAAK,EAAE,KAAK,EAAE,YAAY,EAAC,KAAK,EAC5D,QAAQ,EAAE,YAAY,EAAE,SAAS,EAAE,aAAa,EAAE,IAAI,EAAC,OAAO,GAAG;QACnE,8BAAM,SAAS,EAAC,oBAAoB,IACjC,QAAQ,IAAI,oBAAC,iBAAI,IAAC,QAAQ,EAAC,WAAW,GAAG,CACrC,CACN,CACJ,CAAC;AACJ,CAAC,CACF,CAAC;AAEF;;GAEG;AACU,QAAA,kBAAkB,GAA2D,uBAAuB,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 AccuDraw\r\n */\r\n\r\nimport \"./AccuDrawInputField.scss\";\r\nimport classnames from \"classnames\";\r\nimport * as React from \"react\";\r\nimport { ItemField } from \"@itwin/core-frontend\";\r\nimport { CommonProps, Icon, IconSpec, useRefs } from \"@itwin/core-react\";\r\nimport { isLetter, SpecialKey } from \"@itwin/appui-abstract\";\r\nimport { Input } from \"@itwin/itwinui-react\";\r\nimport { KeyboardShortcutManager } from \"../keyboardshortcut/KeyboardShortcut\";\r\nimport { AccuDrawSetFieldFocusEventArgs, AccuDrawSetFieldValueToUiEventArgs, FrameworkAccuDraw } from \"./FrameworkAccuDraw\";\r\n\r\n/** Properties for [[AccuDrawInputField]] component\r\n * @beta\r\n */\r\nexport interface AccuDrawInputFieldProps extends CommonProps {\r\n /** Which AccuDraw field this represents */\r\n field: ItemField;\r\n /** id for the input element */\r\n id: string;\r\n /** Indicates whether field is locked */\r\n isLocked?: boolean;\r\n /** label for the input element */\r\n label?: string;\r\n /** icon for the input element */\r\n iconSpec?: IconSpec;\r\n /** Custom CSS class name for the label */\r\n labelClassName?: string;\r\n /** Custom CSS Style for the label */\r\n labelStyle?: React.CSSProperties;\r\n /** Center justified label */\r\n labelCentered?: boolean;\r\n /** Triggered when the content is changed */\r\n onValueChanged: (stringValue: string) => void;\r\n /** Frequency to poll for changes in value, in milliseconds */\r\n valueChangedDelay?: number;\r\n /** Listens for <Enter> keypress */\r\n onEnterPressed?: () => void;\r\n /** Listens for <Esc> keypress */\r\n onEscPressed?: () => void;\r\n /** Provides ability to return reference to HTMLInputElement */\r\n ref?: React.Ref<HTMLInputElement>;\r\n}\r\n\r\nconst ForwardRefAccuDrawInput = React.forwardRef<HTMLInputElement, AccuDrawInputFieldProps>(\r\n function ForwardRefAccuDrawInputField(props: AccuDrawInputFieldProps, ref) {\r\n const { className, style, id, label, iconSpec, labelClassName, labelStyle, labelCentered, field, isLocked,\r\n onValueChanged, valueChangedDelay, onEnterPressed, onEscPressed, ...inputProps } = props;\r\n const [stringValue, setStringValue] = React.useState(\"\");\r\n const timeoutId = React.useRef(0);\r\n const [needValueChanged, setNeedValueChanged] = React.useState(false);\r\n const [needSelection, setNeedSelection] = React.useState(false);\r\n const [isFocusField, setIsFocusField] = React.useState(false);\r\n const inputElementRef = React.useRef<HTMLInputElement>(null);\r\n const refs = useRefs(inputElementRef, ref); // combine ref needed for target with the forwardRef needed by the Parent when parent is a Type Editor.\r\n\r\n React.useEffect(() => {\r\n const formattedValue = FrameworkAccuDraw.getFieldDisplayValue(field);\r\n setStringValue(formattedValue);\r\n }, [field]);\r\n\r\n const handleChange = React.useCallback((event: React.ChangeEvent<HTMLInputElement>): void => {\r\n const value = event.currentTarget.value;\r\n\r\n // istanbul ignore next\r\n if (value === undefined)\r\n return;\r\n\r\n // istanbul ignore else\r\n if (stringValue !== value) {\r\n setStringValue(value);\r\n setNeedValueChanged(true);\r\n }\r\n }, [stringValue]);\r\n\r\n const unsetTimeout = (): void => {\r\n // istanbul ignore else\r\n if (timeoutId) {\r\n window.clearTimeout(timeoutId.current);\r\n timeoutId.current = 0;\r\n }\r\n };\r\n\r\n React.useEffect(() => {\r\n // After setStringValue & re-render\r\n // istanbul ignore else\r\n if (needValueChanged) {\r\n if (valueChangedDelay) {\r\n unsetTimeout();\r\n timeoutId.current = window.setTimeout(() => {\r\n onValueChanged(stringValue);\r\n }, valueChangedDelay);\r\n } else {\r\n onValueChanged(stringValue);\r\n }\r\n setNeedValueChanged(false);\r\n }\r\n }, [onValueChanged, valueChangedDelay, stringValue, needValueChanged]);\r\n\r\n React.useEffect(() => {\r\n // On unmount\r\n return () => unsetTimeout();\r\n }, []);\r\n\r\n const handleKeyDown = React.useCallback((e: React.KeyboardEvent) => {\r\n switch (e.key) {\r\n case SpecialKey.Escape:\r\n onEscPressed && onEscPressed();\r\n return;\r\n case SpecialKey.Enter:\r\n onEnterPressed && onEnterPressed();\r\n return;\r\n }\r\n\r\n if (isLetter(e.key)) {\r\n e.preventDefault();\r\n KeyboardShortcutManager.processKey(e.key);\r\n return;\r\n }\r\n }, [onEscPressed, onEnterPressed]);\r\n\r\n React.useEffect(() => {\r\n const handleSetFieldValueToUi = (args: AccuDrawSetFieldValueToUiEventArgs) => {\r\n if (args.field === field && stringValue !== args.formattedValue) {\r\n setStringValue(args.formattedValue);\r\n // istanbul ignore else\r\n if (isFocusField)\r\n setNeedSelection(true);\r\n }\r\n };\r\n return FrameworkAccuDraw.onAccuDrawSetFieldValueToUiEvent.addListener(handleSetFieldValueToUi);\r\n }, [field, isFocusField, stringValue]);\r\n\r\n React.useEffect(() => {\r\n if (needSelection) {\r\n // istanbul ignore else\r\n if (inputElementRef.current)\r\n inputElementRef.current.select();\r\n setNeedSelection(false);\r\n }\r\n }, [needSelection]);\r\n\r\n React.useEffect(() => {\r\n const handleSetFieldFocus = (args: AccuDrawSetFieldFocusEventArgs) => {\r\n setIsFocusField(args.field === field);\r\n };\r\n return FrameworkAccuDraw.onAccuDrawSetFieldFocusEvent.addListener(handleSetFieldFocus);\r\n }, [field]);\r\n\r\n const inputClassNames = classnames(\"uifw-accudraw-input-field\", className);\r\n const labelClassNames = classnames(\"uifw-accudraw-input-label\",\r\n labelCentered && \"uifw-label-centered\",\r\n labelClassName\r\n );\r\n\r\n return (\r\n <>\r\n <label htmlFor={id} className={labelClassNames} style={labelStyle}>\r\n {label}\r\n {iconSpec && <Icon iconSpec={iconSpec} />}\r\n </label>\r\n <Input {...inputProps} ref={refs} id={id} value={stringValue}\r\n className={inputClassNames} style={style} autoComplete=\"off\"\r\n onChange={handleChange} onKeyDown={handleKeyDown} size=\"small\" />\r\n <span className=\"uifw-accudraw-lock\" >\r\n {isLocked && <Icon iconSpec=\"icon-lock\" />}\r\n </span>\r\n </>\r\n );\r\n }\r\n);\r\n\r\n/** Input field for AccuDraw Ui\r\n * @beta\r\n */\r\nexport const AccuDrawInputField: (props: AccuDrawInputFieldProps) => JSX.Element | null = ForwardRefAccuDrawInput;\r\n"]}
|
|
@@ -17,7 +17,6 @@ export declare class BackstageEvent extends UiEvent<BackstageEventArgs> {
|
|
|
17
17
|
}
|
|
18
18
|
/** Properties for the [[Backstage]] React component.
|
|
19
19
|
* @public
|
|
20
|
-
* @deprecated use [BackstageComposer]($appui-react) instead.
|
|
21
20
|
*/
|
|
22
21
|
export interface BackstageProps extends CommonProps {
|
|
23
22
|
isVisible?: boolean;
|
|
@@ -33,7 +32,6 @@ interface BackstageState {
|
|
|
33
32
|
}
|
|
34
33
|
/** Backstage React component.
|
|
35
34
|
* @public
|
|
36
|
-
* @deprecated use [BackstageComposer]($appui-react) instead.
|
|
37
35
|
*/
|
|
38
36
|
export declare class Backstage extends React.Component<BackstageProps, BackstageState> {
|
|
39
37
|
static readonly onBackstageEvent: BackstageEvent;
|