@itwin/appui-react 4.0.0-dev.17 → 4.0.0-dev.19

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.
Files changed (185) hide show
  1. package/CHANGELOG.md +43 -18
  2. package/lib/cjs/appui-react/UiFramework.d.ts +10 -20
  3. package/lib/cjs/appui-react/UiFramework.d.ts.map +1 -1
  4. package/lib/cjs/appui-react/UiFramework.js +12 -24
  5. package/lib/cjs/appui-react/UiFramework.js.map +1 -1
  6. package/lib/cjs/appui-react/backstage/BackstageItemUtilities.d.ts +3 -2
  7. package/lib/cjs/appui-react/backstage/BackstageItemUtilities.d.ts.map +1 -1
  8. package/lib/cjs/appui-react/backstage/BackstageItemUtilities.js +4 -4
  9. package/lib/cjs/appui-react/backstage/BackstageItemUtilities.js.map +1 -1
  10. package/lib/cjs/appui-react/childwindow/InternalChildWindowManager.d.ts.map +1 -1
  11. package/lib/cjs/appui-react/childwindow/InternalChildWindowManager.js +4 -4
  12. package/lib/cjs/appui-react/childwindow/InternalChildWindowManager.js.map +1 -1
  13. package/lib/cjs/appui-react/dialog/ContentDialogManager.d.ts +0 -39
  14. package/lib/cjs/appui-react/dialog/ContentDialogManager.d.ts.map +1 -1
  15. package/lib/cjs/appui-react/dialog/ContentDialogManager.js +1 -61
  16. package/lib/cjs/appui-react/dialog/ContentDialogManager.js.map +1 -1
  17. package/lib/cjs/appui-react/dialog/ModalDialogManager.d.ts +0 -30
  18. package/lib/cjs/appui-react/dialog/ModalDialogManager.d.ts.map +1 -1
  19. package/lib/cjs/appui-react/dialog/ModalDialogManager.js +1 -44
  20. package/lib/cjs/appui-react/dialog/ModalDialogManager.js.map +1 -1
  21. package/lib/cjs/appui-react/dialog/ModelessDialogManager.d.ts +0 -39
  22. package/lib/cjs/appui-react/dialog/ModelessDialogManager.d.ts.map +1 -1
  23. package/lib/cjs/appui-react/dialog/ModelessDialogManager.js +1 -60
  24. package/lib/cjs/appui-react/dialog/ModelessDialogManager.js.map +1 -1
  25. package/lib/cjs/appui-react/framework/FrameworkChildWindows.d.ts +1 -1
  26. package/lib/cjs/appui-react/framework/FrameworkChildWindows.js.map +1 -1
  27. package/lib/cjs/appui-react/framework/FrameworkContent.d.ts +2 -2
  28. package/lib/cjs/appui-react/framework/FrameworkContent.js.map +1 -1
  29. package/lib/cjs/appui-react/framework/FrameworkControls.d.ts +1 -1
  30. package/lib/cjs/appui-react/framework/FrameworkControls.js.map +1 -1
  31. package/lib/cjs/appui-react/framework/FrameworkDialogs.d.ts +1 -1
  32. package/lib/cjs/appui-react/framework/FrameworkDialogs.js.map +1 -1
  33. package/lib/cjs/appui-react/framework/FrameworkFrontstages.d.ts +1 -1
  34. package/lib/cjs/appui-react/framework/FrameworkFrontstages.js.map +1 -1
  35. package/lib/cjs/appui-react/framework/FrameworkKeyboardShortcuts.d.ts +1 -1
  36. package/lib/cjs/appui-react/framework/FrameworkKeyboardShortcuts.js.map +1 -1
  37. package/lib/cjs/appui-react/framework/FrameworkToolSettings.d.ts +1 -1
  38. package/lib/cjs/appui-react/framework/FrameworkToolSettings.js.map +1 -1
  39. package/lib/cjs/appui-react/framework/FrameworkVisibility.d.ts +1 -1
  40. package/lib/cjs/appui-react/framework/FrameworkVisibility.js.map +1 -1
  41. package/lib/cjs/appui-react/keyboardshortcut/KeyboardShortcut.d.ts +0 -32
  42. package/lib/cjs/appui-react/keyboardshortcut/KeyboardShortcut.d.ts.map +1 -1
  43. package/lib/cjs/appui-react/keyboardshortcut/KeyboardShortcut.js +1 -55
  44. package/lib/cjs/appui-react/keyboardshortcut/KeyboardShortcut.js.map +1 -1
  45. package/lib/cjs/appui-react/messages/MessageManager.js +2 -3
  46. package/lib/cjs/appui-react/messages/MessageManager.js.map +1 -1
  47. package/lib/cjs/appui-react/statusbar/StatusBarItemUtilities.d.ts +3 -2
  48. package/lib/cjs/appui-react/statusbar/StatusBarItemUtilities.d.ts.map +1 -1
  49. package/lib/cjs/appui-react/statusbar/StatusBarItemUtilities.js.map +1 -1
  50. package/lib/cjs/appui-react/syncui/SyncUiEventDispatcher.d.ts.map +1 -1
  51. package/lib/cjs/appui-react/syncui/SyncUiEventDispatcher.js +4 -0
  52. package/lib/cjs/appui-react/syncui/SyncUiEventDispatcher.js.map +1 -1
  53. package/lib/cjs/appui-react/ui-items-provider/AbstractUiItemsManager.d.ts +34 -0
  54. package/lib/cjs/appui-react/ui-items-provider/AbstractUiItemsManager.d.ts.map +1 -0
  55. package/lib/cjs/appui-react/ui-items-provider/AbstractUiItemsManager.js +500 -0
  56. package/lib/cjs/appui-react/ui-items-provider/AbstractUiItemsManager.js.map +1 -0
  57. package/lib/cjs/appui-react/ui-items-provider/UiItemsManager.d.ts +6 -4
  58. package/lib/cjs/appui-react/ui-items-provider/UiItemsManager.d.ts.map +1 -1
  59. package/lib/cjs/appui-react/ui-items-provider/UiItemsManager.js +33 -6
  60. package/lib/cjs/appui-react/ui-items-provider/UiItemsManager.js.map +1 -1
  61. package/lib/cjs/appui-react.d.ts +0 -7
  62. package/lib/cjs/appui-react.d.ts.map +1 -1
  63. package/lib/cjs/appui-react.js +0 -7
  64. package/lib/cjs/appui-react.js.map +1 -1
  65. package/lib/esm/appui-react/UiFramework.d.ts +10 -20
  66. package/lib/esm/appui-react/UiFramework.d.ts.map +1 -1
  67. package/lib/esm/appui-react/UiFramework.js +12 -24
  68. package/lib/esm/appui-react/UiFramework.js.map +1 -1
  69. package/lib/esm/appui-react/backstage/BackstageItemUtilities.d.ts +3 -2
  70. package/lib/esm/appui-react/backstage/BackstageItemUtilities.d.ts.map +1 -1
  71. package/lib/esm/appui-react/backstage/BackstageItemUtilities.js +4 -4
  72. package/lib/esm/appui-react/backstage/BackstageItemUtilities.js.map +1 -1
  73. package/lib/esm/appui-react/childwindow/InternalChildWindowManager.d.ts.map +1 -1
  74. package/lib/esm/appui-react/childwindow/InternalChildWindowManager.js +4 -4
  75. package/lib/esm/appui-react/childwindow/InternalChildWindowManager.js.map +1 -1
  76. package/lib/esm/appui-react/dialog/ContentDialogManager.d.ts +0 -39
  77. package/lib/esm/appui-react/dialog/ContentDialogManager.d.ts.map +1 -1
  78. package/lib/esm/appui-react/dialog/ContentDialogManager.js +0 -59
  79. package/lib/esm/appui-react/dialog/ContentDialogManager.js.map +1 -1
  80. package/lib/esm/appui-react/dialog/ModalDialogManager.d.ts +0 -30
  81. package/lib/esm/appui-react/dialog/ModalDialogManager.d.ts.map +1 -1
  82. package/lib/esm/appui-react/dialog/ModalDialogManager.js +0 -42
  83. package/lib/esm/appui-react/dialog/ModalDialogManager.js.map +1 -1
  84. package/lib/esm/appui-react/dialog/ModelessDialogManager.d.ts +0 -39
  85. package/lib/esm/appui-react/dialog/ModelessDialogManager.d.ts.map +1 -1
  86. package/lib/esm/appui-react/dialog/ModelessDialogManager.js +0 -58
  87. package/lib/esm/appui-react/dialog/ModelessDialogManager.js.map +1 -1
  88. package/lib/esm/appui-react/framework/FrameworkChildWindows.d.ts +1 -1
  89. package/lib/esm/appui-react/framework/FrameworkChildWindows.js.map +1 -1
  90. package/lib/esm/appui-react/framework/FrameworkContent.d.ts +2 -2
  91. package/lib/esm/appui-react/framework/FrameworkContent.js.map +1 -1
  92. package/lib/esm/appui-react/framework/FrameworkControls.d.ts +1 -1
  93. package/lib/esm/appui-react/framework/FrameworkControls.js.map +1 -1
  94. package/lib/esm/appui-react/framework/FrameworkDialogs.d.ts +1 -1
  95. package/lib/esm/appui-react/framework/FrameworkDialogs.js.map +1 -1
  96. package/lib/esm/appui-react/framework/FrameworkFrontstages.d.ts +1 -1
  97. package/lib/esm/appui-react/framework/FrameworkFrontstages.js.map +1 -1
  98. package/lib/esm/appui-react/framework/FrameworkKeyboardShortcuts.d.ts +1 -1
  99. package/lib/esm/appui-react/framework/FrameworkKeyboardShortcuts.js.map +1 -1
  100. package/lib/esm/appui-react/framework/FrameworkToolSettings.d.ts +1 -1
  101. package/lib/esm/appui-react/framework/FrameworkToolSettings.js.map +1 -1
  102. package/lib/esm/appui-react/framework/FrameworkVisibility.d.ts +1 -1
  103. package/lib/esm/appui-react/framework/FrameworkVisibility.js.map +1 -1
  104. package/lib/esm/appui-react/keyboardshortcut/KeyboardShortcut.d.ts +0 -32
  105. package/lib/esm/appui-react/keyboardshortcut/KeyboardShortcut.d.ts.map +1 -1
  106. package/lib/esm/appui-react/keyboardshortcut/KeyboardShortcut.js +0 -53
  107. package/lib/esm/appui-react/keyboardshortcut/KeyboardShortcut.js.map +1 -1
  108. package/lib/esm/appui-react/messages/MessageManager.js +2 -3
  109. package/lib/esm/appui-react/messages/MessageManager.js.map +1 -1
  110. package/lib/esm/appui-react/statusbar/StatusBarItemUtilities.d.ts +3 -2
  111. package/lib/esm/appui-react/statusbar/StatusBarItemUtilities.d.ts.map +1 -1
  112. package/lib/esm/appui-react/statusbar/StatusBarItemUtilities.js.map +1 -1
  113. package/lib/esm/appui-react/syncui/SyncUiEventDispatcher.d.ts.map +1 -1
  114. package/lib/esm/appui-react/syncui/SyncUiEventDispatcher.js +4 -0
  115. package/lib/esm/appui-react/syncui/SyncUiEventDispatcher.js.map +1 -1
  116. package/lib/esm/appui-react/ui-items-provider/AbstractUiItemsManager.d.ts +34 -0
  117. package/lib/esm/appui-react/ui-items-provider/AbstractUiItemsManager.d.ts.map +1 -0
  118. package/lib/esm/appui-react/ui-items-provider/AbstractUiItemsManager.js +496 -0
  119. package/lib/esm/appui-react/ui-items-provider/AbstractUiItemsManager.js.map +1 -0
  120. package/lib/esm/appui-react/ui-items-provider/UiItemsManager.d.ts +6 -4
  121. package/lib/esm/appui-react/ui-items-provider/UiItemsManager.d.ts.map +1 -1
  122. package/lib/esm/appui-react/ui-items-provider/UiItemsManager.js +33 -6
  123. package/lib/esm/appui-react/ui-items-provider/UiItemsManager.js.map +1 -1
  124. package/lib/esm/appui-react.d.ts +0 -7
  125. package/lib/esm/appui-react.d.ts.map +1 -1
  126. package/lib/esm/appui-react.js +0 -7
  127. package/lib/esm/appui-react.js.map +1 -1
  128. package/lib/public/locales/en/UiFramework.json +0 -45
  129. package/package.json +21 -13
  130. package/lib/cjs/appui-react/childwindow/ChildWindowManager.d.ts +0 -74
  131. package/lib/cjs/appui-react/childwindow/ChildWindowManager.d.ts.map +0 -1
  132. package/lib/cjs/appui-react/childwindow/ChildWindowManager.js +0 -107
  133. package/lib/cjs/appui-react/childwindow/ChildWindowManager.js.map +0 -1
  134. package/lib/cjs/appui-react/configurableui/ConfigurableUiManager.d.ts +0 -66
  135. package/lib/cjs/appui-react/configurableui/ConfigurableUiManager.d.ts.map +0 -1
  136. package/lib/cjs/appui-react/configurableui/ConfigurableUiManager.js +0 -93
  137. package/lib/cjs/appui-react/configurableui/ConfigurableUiManager.js.map +0 -1
  138. package/lib/cjs/appui-react/content/ContentLayoutManager.d.ts +0 -48
  139. package/lib/cjs/appui-react/content/ContentLayoutManager.d.ts.map +0 -1
  140. package/lib/cjs/appui-react/content/ContentLayoutManager.js +0 -69
  141. package/lib/cjs/appui-react/content/ContentLayoutManager.js.map +0 -1
  142. package/lib/cjs/appui-react/content/ContentViewManager.d.ts +0 -63
  143. package/lib/cjs/appui-react/content/ContentViewManager.d.ts.map +0 -1
  144. package/lib/cjs/appui-react/content/ContentViewManager.js +0 -96
  145. package/lib/cjs/appui-react/content/ContentViewManager.js.map +0 -1
  146. package/lib/cjs/appui-react/frontstage/FrontstageManager.d.ts +0 -202
  147. package/lib/cjs/appui-react/frontstage/FrontstageManager.d.ts.map +0 -1
  148. package/lib/cjs/appui-react/frontstage/FrontstageManager.js +0 -269
  149. package/lib/cjs/appui-react/frontstage/FrontstageManager.js.map +0 -1
  150. package/lib/cjs/appui-react/toolsettings/ToolSettingsManager.d.ts +0 -44
  151. package/lib/cjs/appui-react/toolsettings/ToolSettingsManager.d.ts.map +0 -1
  152. package/lib/cjs/appui-react/toolsettings/ToolSettingsManager.js +0 -64
  153. package/lib/cjs/appui-react/toolsettings/ToolSettingsManager.js.map +0 -1
  154. package/lib/cjs/appui-react/utils/UiShowHideManager.d.ts +0 -54
  155. package/lib/cjs/appui-react/utils/UiShowHideManager.d.ts.map +0 -1
  156. package/lib/cjs/appui-react/utils/UiShowHideManager.js +0 -108
  157. package/lib/cjs/appui-react/utils/UiShowHideManager.js.map +0 -1
  158. package/lib/esm/appui-react/childwindow/ChildWindowManager.d.ts +0 -74
  159. package/lib/esm/appui-react/childwindow/ChildWindowManager.d.ts.map +0 -1
  160. package/lib/esm/appui-react/childwindow/ChildWindowManager.js +0 -103
  161. package/lib/esm/appui-react/childwindow/ChildWindowManager.js.map +0 -1
  162. package/lib/esm/appui-react/configurableui/ConfigurableUiManager.d.ts +0 -66
  163. package/lib/esm/appui-react/configurableui/ConfigurableUiManager.d.ts.map +0 -1
  164. package/lib/esm/appui-react/configurableui/ConfigurableUiManager.js +0 -89
  165. package/lib/esm/appui-react/configurableui/ConfigurableUiManager.js.map +0 -1
  166. package/lib/esm/appui-react/content/ContentLayoutManager.d.ts +0 -48
  167. package/lib/esm/appui-react/content/ContentLayoutManager.d.ts.map +0 -1
  168. package/lib/esm/appui-react/content/ContentLayoutManager.js +0 -65
  169. package/lib/esm/appui-react/content/ContentLayoutManager.js.map +0 -1
  170. package/lib/esm/appui-react/content/ContentViewManager.d.ts +0 -63
  171. package/lib/esm/appui-react/content/ContentViewManager.d.ts.map +0 -1
  172. package/lib/esm/appui-react/content/ContentViewManager.js +0 -92
  173. package/lib/esm/appui-react/content/ContentViewManager.js.map +0 -1
  174. package/lib/esm/appui-react/frontstage/FrontstageManager.d.ts +0 -202
  175. package/lib/esm/appui-react/frontstage/FrontstageManager.d.ts.map +0 -1
  176. package/lib/esm/appui-react/frontstage/FrontstageManager.js +0 -265
  177. package/lib/esm/appui-react/frontstage/FrontstageManager.js.map +0 -1
  178. package/lib/esm/appui-react/toolsettings/ToolSettingsManager.d.ts +0 -44
  179. package/lib/esm/appui-react/toolsettings/ToolSettingsManager.d.ts.map +0 -1
  180. package/lib/esm/appui-react/toolsettings/ToolSettingsManager.js +0 -60
  181. package/lib/esm/appui-react/toolsettings/ToolSettingsManager.js.map +0 -1
  182. package/lib/esm/appui-react/utils/UiShowHideManager.d.ts +0 -54
  183. package/lib/esm/appui-react/utils/UiShowHideManager.d.ts.map +0 -1
  184. package/lib/esm/appui-react/utils/UiShowHideManager.js +0 -105
  185. package/lib/esm/appui-react/utils/UiShowHideManager.js.map +0 -1
@@ -12,7 +12,7 @@ import { getClassName, UiAdmin, UiError, UiEvent } from "@itwin/appui-abstract";
12
12
  import { LocalStateStorage, SettingsManager } from "@itwin/core-react";
13
13
  import { UiIModelComponents } from "@itwin/imodel-components-react";
14
14
  import { BackstageManager } from "./backstage/BackstageManager";
15
- import { ChildWindowManager } from "./childwindow/ChildWindowManager";
15
+ import { InternalChildWindowManager } from "./childwindow/InternalChildWindowManager";
16
16
  import { InternalConfigurableUiManager } from "./configurableui/InternalConfigurableUiManager";
17
17
  import { ConfigurableUiActionId } from "./configurableui/state";
18
18
  import { SessionStateActionId } from "./redux/SessionState";
@@ -44,7 +44,7 @@ export class UiVisibilityChangedEvent extends UiEvent {
44
44
  class UiFramework {
45
45
  /**
46
46
  * Operation on the backstage component.
47
- * @beta
47
+ * @public
48
48
  */
49
49
  static get backstage() {
50
50
  // istanbul ignore next
@@ -54,42 +54,42 @@ class UiFramework {
54
54
  }
55
55
  /**
56
56
  * Manage access to the child windows.
57
- * @beta
57
+ * @public
58
58
  */
59
59
  static get childWindows() {
60
60
  return this._childWindowManager;
61
61
  }
62
62
  /**
63
63
  * Manage registered controls
64
- * @beta
64
+ * @public
65
65
  */
66
66
  static get controls() {
67
67
  return InternalConfigurableUiManager;
68
68
  }
69
69
  /**
70
70
  * Manage access to frontstages and related helper methods.
71
- * @beta
71
+ * @public
72
72
  */
73
73
  static get frontstages() {
74
74
  return InternalFrontstageManager;
75
75
  }
76
76
  /**
77
77
  * Manage access and behavior of the tool settings.
78
- * @beta
78
+ * @public
79
79
  */
80
80
  static get toolSettings() {
81
81
  return InternalToolSettingsManager;
82
82
  }
83
83
  /**
84
84
  * Manage content presented by the frontstages.
85
- * @beta
85
+ * @public
86
86
  */
87
87
  static get content() {
88
88
  return InternalContentViewManager;
89
89
  }
90
90
  /**
91
91
  * Manage displayed dialogs.
92
- * @beta
92
+ * @public
93
93
  */
94
94
  static get dialogs() {
95
95
  return {
@@ -99,28 +99,22 @@ class UiFramework {
99
99
  }
100
100
  /**
101
101
  * Manages global keyboard shortcuts
102
- * @beta
102
+ * @public
103
103
  */
104
104
  static get keyboardShortcuts() {
105
105
  return InternalKeyboardShortcutManager;
106
106
  }
107
107
  /**
108
108
  * Manages UI visibility (Show/Hide)
109
- * @beta
109
+ * @public
110
110
  */
111
111
  static get visibility() {
112
112
  return InternalUiShowHideManager;
113
113
  }
114
- /** @public
115
- * @deprecated in 3.7. Use `childWindows` property, name realignment.
116
- */
117
- static get childWindowManager() {
118
- return UiFramework.childWindows; // eslint-disable-line deprecation/deprecation
119
- }
120
114
  /** Registers class that will be informed when the UserSettingsStorage location has been set or changed. This allows
121
115
  * classes to load any previously saved settings from the new storage location. Common storage locations are the browser's
122
116
  * local storage, or the iTwin Product Settings cloud storage available via the SettingsAdmin see `IModelApp.settingsAdmin`.
123
- * @beta
117
+ * @public
124
118
  */
125
119
  static registerUserSettingsProvider(entry) {
126
120
  if (this._uiSettingsProviderRegistry.has(entry.providerId))
@@ -245,12 +239,6 @@ class UiFramework {
245
239
  static get localizationNamespace() {
246
240
  return "UiFramework";
247
241
  }
248
- /** @public
249
- * @deprecated in 3.7. Use `backstage` alternate property, name realignment.
250
- */
251
- static get backstageManager() {
252
- return UiFramework.backstage;
253
- }
254
242
  /** @public */
255
243
  static get hideIsolateEmphasizeActionHandler() {
256
244
  // istanbul ignore next
@@ -540,7 +528,7 @@ UiFramework._frameworkStateKeyInStore = "frameworkState"; // default name
540
528
  /** this provides a default state storage handler */
541
529
  UiFramework._uiStateStorage = new LocalStateStorage();
542
530
  UiFramework._uiSettingsProviderRegistry = new Map();
543
- UiFramework._childWindowManager = new ChildWindowManager(); // eslint-disable-line deprecation/deprecation
531
+ UiFramework._childWindowManager = new InternalChildWindowManager();
544
532
  UiFramework.useDefaultPopoutUrl = false;
545
533
  /** Get Show Ui event.
546
534
  * @public
@@ -1 +1 @@
1
- {"version":3,"file":"UiFramework.js","sourceRoot":"","sources":["../../../src/appui-react/UiFramework.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAKH,OAAO,EAAc,MAAM,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAE1E,OAAO,EAAE,SAAS,EAAoB,QAAQ,EAAa,MAAM,sBAAsB,CAAC;AACxF,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AACvD,OAAO,EAAE,YAAY,EAAE,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC;AAChF,OAAO,EAAE,iBAAiB,EAAE,eAAe,EAAkB,MAAM,mBAAmB,CAAC;AACvF,OAAO,EAAE,kBAAkB,EAAE,MAAM,gCAAgC,CAAC;AACpE,OAAO,EAAE,gBAAgB,EAAE,MAAM,8BAA8B,CAAC;AAChE,OAAO,EAAE,kBAAkB,EAAE,MAAM,kCAAkC,CAAC;AACtE,OAAO,EAAE,6BAA6B,EAAE,MAAM,gDAAgD,CAAC;AAC/F,OAAO,EAAE,sBAAsB,EAAE,MAAM,wBAAwB,CAAC;AAEhE,OAAO,EAA8C,oBAAoB,EAAE,MAAM,sBAAsB,CAAC;AACxG,OAAO,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AACpD,OAAO,EAAqC,2BAA2B,EAAE,MAAM,yCAAyC,CAAC;AACzH,OAAO,EAAE,4BAA4B,EAAE,uBAAuB,EAAE,sBAAsB,EAAE,MAAM,sBAAsB,CAAC;AACrH,OAAO,KAAK,iBAAiB,MAAM,2BAA2B,CAAC;AAC/D,OAAO,KAAK,gBAAgB,MAAM,0BAA0B,CAAC;AAC7D,OAAO,KAAK,kBAAkB,MAAM,2BAA2B,CAAC;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AC1E,CAAC;YACF,MAAM,cAAc,GAAG,IAAI,cAAc,CAAC,SAAS,EAAE,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,WAAW,EAAE,IAAI,EAAE,oBAAoB,CAAC,CAAC;YACzH,MAAM,SAAS,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;;AAtgBc,wBAAY,GAAG,KAAK,CAAC;AAErB,sBAAU,GAAG,6BAA6B,CAAC;AAC3C,qCAAyB,GAAW,gBAAgB,CAAC,CAAE,eAAe;AAIrF,oDAAoD;AACrC,2BAAe,GAAmB,IAAI,iBAAiB,EAAE,CAAC;AAE1D,uCAA2B,GAAsC,IAAI,GAAG,EAAgC,CAAC;AACzG,+BAAmB,GAAG,IAAI,kBAAkB,EAAE,CAAC,CAAC,8CAA8C;AAC/F,+BAAmB,GAAG,KAAK,CAAC;AAsB1C;;GAEG;AACoB,iCAAqB,GAAG,IAAI,wBAAwB,EAAE,CAAC;SApHnE,WAAW","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 { 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 { InternalConfigurableUiManager } from \"./configurableui/InternalConfigurableUiManager\";\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 { SYSTEM_PREFERRED_COLOR_THEME, TOOLBAR_OPACITY_DEFAULT, 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 { InternalUiShowHideManager, UiShowHideSettingsProvider } from \"./utils/InternalUiShowHideManager\";\r\nimport { WidgetManager } from \"./widgets/WidgetManager\";\r\nimport { InternalFrontstageManager } from \"./frontstage/InternalFrontstageManager\";\r\nimport { InternalContentViewManager } from \"./content/InternalContentViewManager\";\r\nimport { InternalModalDialogManager } from \"./dialog/InternalModalDialogManager\";\r\nimport { InternalModelessDialogManager } from \"./dialog/InternalModelessDialogManager\";\r\nimport { InternalKeyboardShortcutManager } from \"./keyboardshortcut/InternalKeyboardShortcut\";\r\nimport { InternalToolSettingsManager } from \"./toolsettings/InternalToolSettingsManager\";\r\nimport { FrameworkBackstage } from \"./framework/FrameworkBackstage\";\r\nimport { FrameworkChildWindows } from \"./framework/FrameworkChildWindows\";\r\nimport { FrameworkControls } from \"./framework/FrameworkControls\";\r\nimport { FrameworkFrontstages } from \"./framework/FrameworkFrontstages\";\r\nimport { FrameworkToolSettings } from \"./framework/FrameworkToolSettings\";\r\nimport { FrameworkContent } from \"./framework/FrameworkContent\";\r\nimport { FrameworkDialogs } from \"./framework/FrameworkDialogs\";\r\nimport { FrameworkKeyboardShortcuts } from \"./framework/FrameworkKeyboardShortcuts\";\r\nimport { FrameworkVisibility } from \"./framework/FrameworkVisibility\";\r\nimport { SyncUiEventDispatcher, SyncUiEventId } from \"./syncui/SyncUiEventDispatcher\";\r\n\r\n// cSpell:ignore Mobi\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/** 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 /**\r\n * Operation on the backstage component.\r\n * @beta\r\n */\r\n public static get backstage(): FrameworkBackstage {\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 /**\r\n * Manage access to the child windows.\r\n * @beta\r\n */\r\n public static get childWindows(): FrameworkChildWindows {\r\n return this._childWindowManager;\r\n }\r\n\r\n /**\r\n * Manage registered controls\r\n * @beta\r\n */\r\n public static get controls(): FrameworkControls {\r\n return InternalConfigurableUiManager;\r\n }\r\n\r\n /**\r\n * Manage access to frontstages and related helper methods.\r\n * @beta\r\n */\r\n public static get frontstages(): FrameworkFrontstages {\r\n return InternalFrontstageManager;\r\n }\r\n\r\n /**\r\n * Manage access and behavior of the tool settings.\r\n * @beta\r\n */\r\n public static get toolSettings(): FrameworkToolSettings {\r\n return InternalToolSettingsManager;\r\n }\r\n\r\n /**\r\n * Manage content presented by the frontstages.\r\n * @beta\r\n */\r\n public static get content(): FrameworkContent {\r\n return InternalContentViewManager;\r\n }\r\n\r\n /**\r\n * Manage displayed dialogs.\r\n * @beta\r\n */\r\n public static get dialogs(): FrameworkDialogs {\r\n return {\r\n modal: InternalModalDialogManager,\r\n modeless: InternalModelessDialogManager,\r\n };\r\n }\r\n\r\n /**\r\n * Manages global keyboard shortcuts\r\n * @beta\r\n */\r\n public static get keyboardShortcuts(): FrameworkKeyboardShortcuts {\r\n return InternalKeyboardShortcutManager;\r\n }\r\n\r\n /**\r\n * Manages UI visibility (Show/Hide)\r\n * @beta\r\n */\r\n public static get visibility(): FrameworkVisibility {\r\n return InternalUiShowHideManager;\r\n }\r\n\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 _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 _childWindowManager = new ChildWindowManager(); // eslint-disable-line deprecation/deprecation\r\n public static useDefaultPopoutUrl = false;\r\n\r\n /** @public\r\n * @deprecated in 3.7. Use `childWindows` property, name realignment.\r\n */\r\n public static get childWindowManager(): ChildWindowManager { // eslint-disable-line deprecation/deprecation\r\n return UiFramework.childWindows as ChildWindowManager; // eslint-disable-line deprecation/deprecation\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 InternalConfigurableUiManager.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 InternalUiShowHideManager.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 * @deprecated in 3.7. Use `backstage` alternate property, name realignment.\r\n */\r\n public static get backstageManager(): BackstageManager {\r\n return UiFramework.backstage as BackstageManager;\r\n }\r\n\r\n /** @public */\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 /** @public */\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.getLocalizedString(key, { ns: UiFramework.localizationNamespace });\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 }\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 InternalFrontstageManager.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 UiFramework.visibility.isUiVisible;\r\n }\r\n\r\n public static setIsUiVisible(visible: boolean) {\r\n if (UiFramework.visibility.isUiVisible !== visible) {\r\n UiFramework.visibility.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 /** UiFramework.setToolbarOpacity() sets the non-hovered opacity to the value specified. Used by UI 2.0 and later.\r\n * @param opacity a value between 0 and 1. The default value is 0.5. IT IS NOT ADVISED TO USE A VALUE BELOW 0.2\r\n * @public\r\n */\r\n public static setToolbarOpacity(opacity: number) {\r\n if (UiFramework.getToolbarOpacity() === opacity)\r\n return;\r\n\r\n UiFramework.dispatchActionToStore(ConfigurableUiActionId.SetToolbarOpacity, opacity, true);\r\n }\r\n\r\n /** UiFramework.getToolbarOpacity() returns a number between 0 and 1 that is the non-hovered opacity for toolbars.\r\n * @public\r\n */\r\n public static getToolbarOpacity(): number {\r\n return UiFramework.frameworkState ? UiFramework.frameworkState.configurableUiState.toolbarOpacity : /* istanbul ignore next */ TOOLBAR_OPACITY_DEFAULT;\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 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 /** Animate Tool Settings on appear */\r\n public static get animateToolSettings(): boolean {\r\n return UiFramework.frameworkState ? UiFramework.frameworkState.configurableUiState.animateToolSettings : /* istanbul ignore next */ false;\r\n }\r\n public static setAnimateToolSettings(value: boolean) {\r\n if (UiFramework.animateToolSettings === value)\r\n return;\r\n UiFramework.dispatchActionToStore(ConfigurableUiActionId.AnimateToolSettings, value, true);\r\n }\r\n\r\n /** Use Tool Name As Tool Settings Widget Tab Label */\r\n public static get useToolAsToolSettingsLabel(): boolean {\r\n return UiFramework.frameworkState ? UiFramework.frameworkState.configurableUiState.useToolAsToolSettingsLabel : /* istanbul ignore next */ false;\r\n }\r\n public static setUseToolAsToolSettingsLabel(value: boolean) {\r\n if (UiFramework.useToolAsToolSettingsLabel === value)\r\n return;\r\n UiFramework.dispatchActionToStore(ConfigurableUiActionId.UseToolAsToolSettingsLabel, value, true);\r\n }\r\n\r\n /** When `true`, panels will close as soon as the mouse leave the panel.\r\n * When `false` (default), panels will close on next click outside the panel.\r\n * @public */\r\n public static get autoCollapseUnpinnedPanels(): boolean {\r\n return UiFramework.frameworkState ? UiFramework.frameworkState.configurableUiState.autoCollapseUnpinnedPanels : /* istanbul ignore next */ false;\r\n }\r\n\r\n /** Method used to enable the automatic closing of an unpinned widget panel as soon as the\r\n * mouse leaves the widget panel. The default behavior is to require a mouse click outside\r\n * the panel before it is closed.\r\n * @public */\r\n\r\n public static setAutoCollapseUnpinnedPanels(value: boolean) {\r\n if (UiFramework.autoCollapseUnpinnedPanels === value)\r\n return;\r\n\r\n UiFramework.dispatchActionToStore(ConfigurableUiActionId.AutoCollapseUnpinnedPanels, 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,OAAO,EAAc,MAAM,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAE1E,OAAO,EAAE,SAAS,EAAoB,QAAQ,EAAa,MAAM,sBAAsB,CAAC;AACxF,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AACvD,OAAO,EAAE,YAAY,EAAE,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,uBAA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,0BAA0B,EAAE,CAAC;AACxD,+BAAmB,GAAG,KAAK,CAAC;AAe1C;;GAEG;AACoB,iCAAqB,GAAG,IAAI,wBAAwB,EAAE,CAAC;SA7GnE,WAAW","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 { 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 { InternalChildWindowManager } from \"./childwindow/InternalChildWindowManager\";\r\nimport { InternalConfigurableUiManager } from \"./configurableui/InternalConfigurableUiManager\";\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 { SYSTEM_PREFERRED_COLOR_THEME, TOOLBAR_OPACITY_DEFAULT, 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 { InternalUiShowHideManager, UiShowHideSettingsProvider } from \"./utils/InternalUiShowHideManager\";\r\nimport { WidgetManager } from \"./widgets/WidgetManager\";\r\nimport { InternalFrontstageManager } from \"./frontstage/InternalFrontstageManager\";\r\nimport { InternalContentViewManager } from \"./content/InternalContentViewManager\";\r\nimport { InternalModalDialogManager } from \"./dialog/InternalModalDialogManager\";\r\nimport { InternalModelessDialogManager } from \"./dialog/InternalModelessDialogManager\";\r\nimport { InternalKeyboardShortcutManager } from \"./keyboardshortcut/InternalKeyboardShortcut\";\r\nimport { InternalToolSettingsManager } from \"./toolsettings/InternalToolSettingsManager\";\r\nimport { FrameworkBackstage } from \"./framework/FrameworkBackstage\";\r\nimport { FrameworkChildWindows } from \"./framework/FrameworkChildWindows\";\r\nimport { FrameworkControls } from \"./framework/FrameworkControls\";\r\nimport { FrameworkFrontstages } from \"./framework/FrameworkFrontstages\";\r\nimport { FrameworkToolSettings } from \"./framework/FrameworkToolSettings\";\r\nimport { FrameworkContent } from \"./framework/FrameworkContent\";\r\nimport { FrameworkDialogs } from \"./framework/FrameworkDialogs\";\r\nimport { FrameworkKeyboardShortcuts } from \"./framework/FrameworkKeyboardShortcuts\";\r\nimport { FrameworkVisibility } from \"./framework/FrameworkVisibility\";\r\nimport { SyncUiEventDispatcher, SyncUiEventId } from \"./syncui/SyncUiEventDispatcher\";\r\n\r\n// cSpell:ignore Mobi\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/** 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 /**\r\n * Operation on the backstage component.\r\n * @public\r\n */\r\n public static get backstage(): FrameworkBackstage {\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 /**\r\n * Manage access to the child windows.\r\n * @public\r\n */\r\n public static get childWindows(): FrameworkChildWindows {\r\n return this._childWindowManager;\r\n }\r\n\r\n /**\r\n * Manage registered controls\r\n * @public\r\n */\r\n public static get controls(): FrameworkControls {\r\n return InternalConfigurableUiManager;\r\n }\r\n\r\n /**\r\n * Manage access to frontstages and related helper methods.\r\n * @public\r\n */\r\n public static get frontstages(): FrameworkFrontstages {\r\n return InternalFrontstageManager;\r\n }\r\n\r\n /**\r\n * Manage access and behavior of the tool settings.\r\n * @public\r\n */\r\n public static get toolSettings(): FrameworkToolSettings {\r\n return InternalToolSettingsManager;\r\n }\r\n\r\n /**\r\n * Manage content presented by the frontstages.\r\n * @public\r\n */\r\n public static get content(): FrameworkContent {\r\n return InternalContentViewManager;\r\n }\r\n\r\n /**\r\n * Manage displayed dialogs.\r\n * @public\r\n */\r\n public static get dialogs(): FrameworkDialogs {\r\n return {\r\n modal: InternalModalDialogManager,\r\n modeless: InternalModelessDialogManager,\r\n };\r\n }\r\n\r\n /**\r\n * Manages global keyboard shortcuts\r\n * @public\r\n */\r\n public static get keyboardShortcuts(): FrameworkKeyboardShortcuts {\r\n return InternalKeyboardShortcutManager;\r\n }\r\n\r\n /**\r\n * Manages UI visibility (Show/Hide)\r\n * @public\r\n */\r\n public static get visibility(): FrameworkVisibility {\r\n return InternalUiShowHideManager;\r\n }\r\n\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 _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 _childWindowManager = new InternalChildWindowManager();\r\n public static useDefaultPopoutUrl = false;\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 * @public\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 InternalConfigurableUiManager.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 InternalUiShowHideManager.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 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 /** @public */\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.getLocalizedString(key, { ns: UiFramework.localizationNamespace });\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 }\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 InternalFrontstageManager.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 UiFramework.visibility.isUiVisible;\r\n }\r\n\r\n public static setIsUiVisible(visible: boolean) {\r\n if (UiFramework.visibility.isUiVisible !== visible) {\r\n UiFramework.visibility.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 /** UiFramework.setToolbarOpacity() sets the non-hovered opacity to the value specified. Used by UI 2.0 and later.\r\n * @param opacity a value between 0 and 1. The default value is 0.5. IT IS NOT ADVISED TO USE A VALUE BELOW 0.2\r\n * @public\r\n */\r\n public static setToolbarOpacity(opacity: number) {\r\n if (UiFramework.getToolbarOpacity() === opacity)\r\n return;\r\n\r\n UiFramework.dispatchActionToStore(ConfigurableUiActionId.SetToolbarOpacity, opacity, true);\r\n }\r\n\r\n /** UiFramework.getToolbarOpacity() returns a number between 0 and 1 that is the non-hovered opacity for toolbars.\r\n * @public\r\n */\r\n public static getToolbarOpacity(): number {\r\n return UiFramework.frameworkState ? UiFramework.frameworkState.configurableUiState.toolbarOpacity : /* istanbul ignore next */ TOOLBAR_OPACITY_DEFAULT;\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 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 /** Animate Tool Settings on appear */\r\n public static get animateToolSettings(): boolean {\r\n return UiFramework.frameworkState ? UiFramework.frameworkState.configurableUiState.animateToolSettings : /* istanbul ignore next */ false;\r\n }\r\n public static setAnimateToolSettings(value: boolean) {\r\n if (UiFramework.animateToolSettings === value)\r\n return;\r\n UiFramework.dispatchActionToStore(ConfigurableUiActionId.AnimateToolSettings, value, true);\r\n }\r\n\r\n /** Use Tool Name As Tool Settings Widget Tab Label */\r\n public static get useToolAsToolSettingsLabel(): boolean {\r\n return UiFramework.frameworkState ? UiFramework.frameworkState.configurableUiState.useToolAsToolSettingsLabel : /* istanbul ignore next */ false;\r\n }\r\n public static setUseToolAsToolSettingsLabel(value: boolean) {\r\n if (UiFramework.useToolAsToolSettingsLabel === value)\r\n return;\r\n UiFramework.dispatchActionToStore(ConfigurableUiActionId.UseToolAsToolSettingsLabel, value, true);\r\n }\r\n\r\n /** When `true`, panels will close as soon as the mouse leave the panel.\r\n * When `false` (default), panels will close on next click outside the panel.\r\n * @public */\r\n public static get autoCollapseUnpinnedPanels(): boolean {\r\n return UiFramework.frameworkState ? UiFramework.frameworkState.configurableUiState.autoCollapseUnpinnedPanels : /* istanbul ignore next */ false;\r\n }\r\n\r\n /** Method used to enable the automatic closing of an unpinned widget panel as soon as the\r\n * mouse leaves the widget panel. The default behavior is to require a mouse click outside\r\n * the panel before it is closed.\r\n * @public */\r\n\r\n public static setAutoCollapseUnpinnedPanels(value: boolean) {\r\n if (UiFramework.autoCollapseUnpinnedPanels === value)\r\n return;\r\n\r\n UiFramework.dispatchActionToStore(ConfigurableUiActionId.AutoCollapseUnpinnedPanels, 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,14 +1,15 @@
1
1
  /** @packageDocumentation
2
2
  * @module Backstage
3
3
  */
4
+ import { IconSpec } from "@itwin/core-react";
4
5
  import { BackstageActionItem, BackstageStageLauncher } from "./BackstageItem";
5
6
  /** Utilities for creating and maintaining backstage items
6
7
  * @beta
7
8
  */
8
9
  export declare namespace BackstageItemUtilities {
9
10
  /** Creates a stage launcher backstage item. */
10
- function createStageLauncher(frontstageId: string, groupPriority: number, itemPriority: number, label: string, subtitle?: string, iconSpec?: string, overrides?: Partial<BackstageStageLauncher>): BackstageStageLauncher;
11
+ function createStageLauncher(frontstageId: string, groupPriority: number, itemPriority: number, label: string, subtitle?: string, icon?: IconSpec, overrides?: Partial<BackstageStageLauncher>): BackstageStageLauncher;
11
12
  /** Creates an action backstage item. */
12
- function createActionItem(itemId: string, groupPriority: number, itemPriority: number, execute: () => void, label: string, subtitle?: string, iconSpec?: string, overrides?: Partial<BackstageActionItem>): BackstageActionItem;
13
+ function createActionItem(itemId: string, groupPriority: number, itemPriority: number, execute: () => void, label: string, subtitle?: string, icon?: IconSpec, overrides?: Partial<BackstageActionItem>): BackstageActionItem;
13
14
  }
14
15
  //# sourceMappingURL=BackstageItemUtilities.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"BackstageItemUtilities.d.ts","sourceRoot":"","sources":["../../../../src/appui-react/backstage/BackstageItemUtilities.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,EAAE,mBAAmB,EAAE,sBAAsB,EAAE,MAAM,iBAAiB,CAAC;AAE9E;;GAEG;AACH,yBAAiB,sBAAsB,CAAC;IACtC,+CAA+C;IAC/C,SAAgB,mBAAmB,CAAC,YAAY,EAAE,MAAM,EAAE,aAAa,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,QAAQ,CAAC,EAAE,MAAM,EAAE,QAAQ,CAAC,EAAE,MAAM,EAAE,SAAS,CAAC,EAAE,OAAO,CAAC,sBAAsB,CAAC,GAAG,sBAAsB,CAW/N;IAED,wCAAwC;IACxC,SAAgB,gBAAgB,CAAC,MAAM,EAAE,MAAM,EAAE,aAAa,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,IAAI,EAAE,KAAK,EAAE,MAAM,EAAE,QAAQ,CAAC,EAAE,MAAM,EAAE,QAAQ,CAAC,EAAE,MAAM,EAAE,SAAS,CAAC,EAAE,OAAO,CAAC,mBAAmB,CAAC,GAAG,mBAAmB,CAWrO;CACF"}
1
+ {"version":3,"file":"BackstageItemUtilities.d.ts","sourceRoot":"","sources":["../../../../src/appui-react/backstage/BackstageItemUtilities.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAC7C,OAAO,EAAE,mBAAmB,EAAE,sBAAsB,EAAE,MAAM,iBAAiB,CAAC;AAE9E;;GAEG;AACH,yBAAiB,sBAAsB,CAAC;IACtC,+CAA+C;IAC/C,SAAgB,mBAAmB,CAAC,YAAY,EAAE,MAAM,EAAE,aAAa,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,QAAQ,CAAC,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,QAAQ,EAAE,SAAS,CAAC,EAAE,OAAO,CAAC,sBAAsB,CAAC,GAAG,sBAAsB,CAW7N;IAED,wCAAwC;IACxC,SAAgB,gBAAgB,CAAC,MAAM,EAAE,MAAM,EAAE,aAAa,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,IAAI,EAAE,KAAK,EAAE,MAAM,EAAE,QAAQ,CAAC,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,QAAQ,EAAE,SAAS,CAAC,EAAE,OAAO,CAAC,mBAAmB,CAAC,GAAG,mBAAmB,CAWnO;CACF"}
@@ -11,10 +11,10 @@
11
11
  export var BackstageItemUtilities;
12
12
  (function (BackstageItemUtilities) {
13
13
  /** Creates a stage launcher backstage item. */
14
- function createStageLauncher(frontstageId, groupPriority, itemPriority, label, subtitle, iconSpec, overrides) {
14
+ function createStageLauncher(frontstageId, groupPriority, itemPriority, label, subtitle, icon, overrides) {
15
15
  return {
16
16
  groupPriority,
17
- icon: iconSpec,
17
+ icon,
18
18
  id: frontstageId,
19
19
  itemPriority,
20
20
  label,
@@ -25,11 +25,11 @@ export var BackstageItemUtilities;
25
25
  }
26
26
  BackstageItemUtilities.createStageLauncher = createStageLauncher;
27
27
  /** Creates an action backstage item. */
28
- function createActionItem(itemId, groupPriority, itemPriority, execute, label, subtitle, iconSpec, overrides) {
28
+ function createActionItem(itemId, groupPriority, itemPriority, execute, label, subtitle, icon, overrides) {
29
29
  return {
30
30
  execute,
31
31
  groupPriority,
32
- icon: iconSpec,
32
+ icon,
33
33
  id: itemId,
34
34
  itemPriority,
35
35
  label,
@@ -1 +1 @@
1
- {"version":3,"file":"BackstageItemUtilities.js","sourceRoot":"","sources":["../../../../src/appui-react/backstage/BackstageItemUtilities.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAIH;;GAEG;AACH,MAAM,KAAW,sBAAsB,CA4BtC;AA5BD,WAAiB,sBAAsB;IACrC,+CAA+C;IAC/C,SAAgB,mBAAmB,CAAC,YAAoB,EAAE,aAAqB,EAAE,YAAoB,EAAE,KAAa,EAAE,QAAiB,EAAE,QAAiB,EAAE,SAA2C;QACrM,OAAO;YACL,aAAa;YACb,IAAI,EAAE,QAAQ;YACd,EAAE,EAAE,YAAY;YAChB,YAAY;YACZ,KAAK;YACL,OAAO,EAAE,YAAY;YACrB,QAAQ;YACR,GAAG,SAAS;SACb,CAAC;IACJ,CAAC;IAXe,0CAAmB,sBAWlC,CAAA;IAED,wCAAwC;IACxC,SAAgB,gBAAgB,CAAC,MAAc,EAAE,aAAqB,EAAE,YAAoB,EAAE,OAAmB,EAAE,KAAa,EAAE,QAAiB,EAAE,QAAiB,EAAE,SAAwC;QAC9M,OAAO;YACL,OAAO;YACP,aAAa;YACb,IAAI,EAAE,QAAQ;YACd,EAAE,EAAE,MAAM;YACV,YAAY;YACZ,KAAK;YACL,QAAQ;YACR,GAAG,SAAS;SACb,CAAC;IACJ,CAAC;IAXe,uCAAgB,mBAW/B,CAAA;AACH,CAAC,EA5BgB,sBAAsB,KAAtB,sBAAsB,QA4BtC","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 Backstage\r\n */\r\n\r\nimport { BackstageActionItem, BackstageStageLauncher } from \"./BackstageItem\";\r\n\r\n/** Utilities for creating and maintaining backstage items\r\n * @beta\r\n */\r\nexport namespace BackstageItemUtilities {\r\n /** Creates a stage launcher backstage item. */\r\n export function createStageLauncher(frontstageId: string, groupPriority: number, itemPriority: number, label: string, subtitle?: string, iconSpec?: string, overrides?: Partial<BackstageStageLauncher>): BackstageStageLauncher {\r\n return {\r\n groupPriority,\r\n icon: iconSpec,\r\n id: frontstageId,\r\n itemPriority,\r\n label,\r\n stageId: frontstageId,\r\n subtitle,\r\n ...overrides,\r\n };\r\n }\r\n\r\n /** Creates an action backstage item. */\r\n export function createActionItem(itemId: string, groupPriority: number, itemPriority: number, execute: () => void, label: string, subtitle?: string, iconSpec?: string, overrides?: Partial<BackstageActionItem>): BackstageActionItem {\r\n return {\r\n execute,\r\n groupPriority,\r\n icon: iconSpec,\r\n id: itemId,\r\n itemPriority,\r\n label,\r\n subtitle,\r\n ...overrides,\r\n };\r\n }\r\n}\r\n"]}
1
+ {"version":3,"file":"BackstageItemUtilities.js","sourceRoot":"","sources":["../../../../src/appui-react/backstage/BackstageItemUtilities.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAKH;;GAEG;AACH,MAAM,KAAW,sBAAsB,CA4BtC;AA5BD,WAAiB,sBAAsB;IACrC,+CAA+C;IAC/C,SAAgB,mBAAmB,CAAC,YAAoB,EAAE,aAAqB,EAAE,YAAoB,EAAE,KAAa,EAAE,QAAiB,EAAE,IAAe,EAAE,SAA2C;QACnM,OAAO;YACL,aAAa;YACb,IAAI;YACJ,EAAE,EAAE,YAAY;YAChB,YAAY;YACZ,KAAK;YACL,OAAO,EAAE,YAAY;YACrB,QAAQ;YACR,GAAG,SAAS;SACb,CAAC;IACJ,CAAC;IAXe,0CAAmB,sBAWlC,CAAA;IAED,wCAAwC;IACxC,SAAgB,gBAAgB,CAAC,MAAc,EAAE,aAAqB,EAAE,YAAoB,EAAE,OAAmB,EAAE,KAAa,EAAE,QAAiB,EAAE,IAAe,EAAE,SAAwC;QAC5M,OAAO;YACL,OAAO;YACP,aAAa;YACb,IAAI;YACJ,EAAE,EAAE,MAAM;YACV,YAAY;YACZ,KAAK;YACL,QAAQ;YACR,GAAG,SAAS;SACb,CAAC;IACJ,CAAC;IAXe,uCAAgB,mBAW/B,CAAA;AACH,CAAC,EA5BgB,sBAAsB,KAAtB,sBAAsB,QA4BtC","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 Backstage\r\n */\r\n\r\nimport { IconSpec } from \"@itwin/core-react\";\r\nimport { BackstageActionItem, BackstageStageLauncher } from \"./BackstageItem\";\r\n\r\n/** Utilities for creating and maintaining backstage items\r\n * @beta\r\n */\r\nexport namespace BackstageItemUtilities {\r\n /** Creates a stage launcher backstage item. */\r\n export function createStageLauncher(frontstageId: string, groupPriority: number, itemPriority: number, label: string, subtitle?: string, icon?: IconSpec, overrides?: Partial<BackstageStageLauncher>): BackstageStageLauncher {\r\n return {\r\n groupPriority,\r\n icon,\r\n id: frontstageId,\r\n itemPriority,\r\n label,\r\n stageId: frontstageId,\r\n subtitle,\r\n ...overrides,\r\n };\r\n }\r\n\r\n /** Creates an action backstage item. */\r\n export function createActionItem(itemId: string, groupPriority: number, itemPriority: number, execute: () => void, label: string, subtitle?: string, icon?: IconSpec, overrides?: Partial<BackstageActionItem>): BackstageActionItem {\r\n return {\r\n execute,\r\n groupPriority,\r\n icon,\r\n id: itemId,\r\n itemPriority,\r\n label,\r\n subtitle,\r\n ...overrides,\r\n };\r\n }\r\n}\r\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"InternalChildWindowManager.d.ts","sourceRoot":"","sources":["../../../../src/appui-react/childwindow/InternalChildWindowManager.tsx"],"names":[],"mappings":"AAKA;;GAEG;AAEH,OAAO,mCAAmC,CAAC;AAC3C,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAY/B,OAAO,EAAE,wBAAwB,EAAE,qBAAqB,EAAE,mBAAmB,EAAE,MAAM,oCAAoC,CAAC;AAyB1H;;;;GAIG;AACH,MAAM,MAAM,UAAU,GAAG,UAAU,CAAC,qBAAqB,CAAC,eAAe,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;AAE/E;;;;KAIK;AACL,qBAAa,0BAA2B,YAAW,qBAAqB;IACtE,OAAO,CAAC,iBAAiB,CAA6B;IACtD,OAAO,CAAC,WAAW,CAAC,CAAa;IAEjC,IAAW,gBAAgB,0BAE1B;IAED;;;;;;;;OAQG;IAEI,aAAa,CAAC,YAAY,EAAE,UAAU,GAAG,IAAI;IAIpD;;;;OAIG;IAEH,OAAO,CAAC,MAAM;IAQd;;;;OAIG;IACI,IAAI,CAAC,aAAa,EAAE,MAAM,GAAG,SAAS,GAAG,mBAAmB,GAAG,SAAS;IAO/E;;;;OAIG;IACI,MAAM,CAAC,aAAa,EAAE,MAAM,GAAG,SAAS,GAAG,IAAI,GAAG,MAAM,GAAG,SAAS;IAS3E,OAAO,CAAC,yBAAyB;IA4CjC,gGAAgG;IACzF,QAAQ;IAMf;;;;;OAKG;IACI,KAAK,kBAAmB,MAAM,2CAcnC;IAGF,OAAO,CAAC,mBAAmB;IAsB3B;;;;;;;;OAQG;IAEI,IAAI,CAAC,aAAa,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,KAAK,CAAC,SAAS,E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-123,7 +123,8 @@ export class InternalChildWindowManager {
123
123
  return childWindow?.childWindowId;
124
124
  }
125
125
  // istanbul ignore next: Used in `open` which is not tested.
126
- renderChildWindowContents(childWindow, childWindowId, content) {
126
+ renderChildWindowContents(childWindow, childWindowId, content, title) {
127
+ childWindow.document.title = title;
127
128
  const reactConnectionDiv = childWindow.document.getElementById("root");
128
129
  if (reactConnectionDiv) {
129
130
  // set openChildWindows now so components can use it when they mount
@@ -205,12 +206,11 @@ export class InternalChildWindowManager {
205
206
  return false;
206
207
  if (0 === url.length) {
207
208
  childWindow.document.write(childHtml);
208
- this.renderChildWindowContents(childWindow, childWindowId, content);
209
+ this.renderChildWindowContents(childWindow, childWindowId, content, title);
209
210
  }
210
211
  else {
211
212
  childWindow.addEventListener("load", () => {
212
- childWindow.document.title = title;
213
- this.renderChildWindowContents(childWindow, childWindowId, content);
213
+ this.renderChildWindowContents(childWindow, childWindowId, content, title);
214
214
  }, false);
215
215
  }
216
216
  window.addEventListener("unload", () => {
@@ -1 +1 @@
1
- {"version":3,"file":"InternalChildWindowManager.js","sourceRoot":"","sources":["../../../../src/appui-react/childwindow/InternalChildWindowManager.tsx"],"names":[],"mappings":"AAAA;;;+FAG+F;AAE/F;;GAEG;AAEH,OAAO,mCAAmC,CAAC;AAC3C,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,QAAQ,MAAM,WAAW,CAAC;AACtC,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AACvC,OAAO,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AACrD,OAAO,EAAE,qBAAqB,EAAE,MAAM,8BAA8B,CAAC;AACrE,OAAO,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AACtD,OAAO,EAAE,sBAAsB,EAAE,MAAM,iCAAiC,CAAC;AACzE,OAAO,EAAE,mBAAmB,EAAE,MAAM,8BAA8B,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,KAAK,CAAC;QACf,IAAI,CAAC,KAAK,GAAG,CAAC,MAAM,EAAE;YACpB,WAAW,CAAC,QAAQ,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC;YACtC,IAAI,CAAC,yBAAyB,CAAC,WAAW,EAAE,aAAa,EAAE,OAAO,CAAC,CAAC;SACrE;aAAM;YACL,WAAW,CAAC,gBAAgB,CAAC,MAAM,EAAE,GAAG,EAAE;gBACxC,WAAW,CAAC,QAAQ,CAAC,KAAK,GAAG,KAAK,CAAC;gBACnC,IAAI,CAAC,yBAAyB,CAAC,WAAW,EAAE,aAAa,EAAE,OAAO,CAAC,CAAC;YACtE,CAAC,EAAE,KAAK,CAAC,CAAC;SACX;QAED,MAAM,CAAC,gBAAgB,CAAC,QAAQ,EAAE,GAAG,EAAE;YACrC,MAAM,aAAa,GAAG,WAAW,CAAC,WAAW,CAAC,mBAAmB,CAAC;YAClE,IAAI,aAAa,EAAE;gBACjB,IAAI,CAAC,KAAK,CAAC,aAAa,EAAE,IAAI,CAAC,CAAC;aACjC;QACH,CAAC,EAAE,KAAK,CAAC,CAAC;QAEV,OAAO,IAAI,CAAC;IACd,CAAC;CACF","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n\r\n/** @packageDocumentation\r\n * @module ChildWindowManager\r\n */\r\n\r\nimport \"./InternalChildWindowManager.scss\";\r\nimport * as React from \"react\";\r\nimport * as ReactDOM from \"react-dom\";\r\nimport { copyStyles } from \"./CopyStyles\";\r\nimport { Provider } from \"react-redux\";\r\nimport { StateManager } from \"../redux/StateManager\";\r\nimport { UiStateStorageHandler } from \"../uistate/useUiStateStorage\";\r\nimport { PopupRenderer } from \"../popup/PopupManager\";\r\nimport { ModelessDialogRenderer } from \"../dialog/ModelessDialogManager\";\r\nimport { ModalDialogRenderer } from \"../dialog/ModalDialogManager\";\r\nimport { CursorPopupMenu } from \"../cursor/cursormenu/CursorMenu\";\r\nimport { ThemeManager } from \"../theme/ThemeManager\";\r\nimport { UiFramework } from \"../UiFramework\";\r\nimport { ChildWindowLocationProps, FrameworkChildWindows, OpenChildWindowInfo } from \"../framework/FrameworkChildWindows\";\r\n\r\nconst childHtml = `<!DOCTYPE html>\r\n<html>\r\n<head>\r\n <meta charset=\"utf-8\" />\r\n <style>\r\n html,\r\n body {\r\n height: 100%;\r\n width: 100%;\r\n margin: 0;\r\n overflow: hidden;\r\n }\r\n #root {\r\n height: 100%;\r\n }\r\n </style>\r\n</head>\r\n<body>\r\n <noscript>You need to enable JavaScript to run this app.</noscript>\r\n <div id=\"root\"></div>\r\n</body>\r\n</html>`;\r\n\r\n/**\r\n * Simplification of non exported CreateRoot parameter, only to be used\r\n * in InternalChildWindowManager and ChildWindowManager\r\n * @internal\r\n */\r\nexport type CreateRoot = Parameters<FrameworkChildWindows[\"useCreateRoot\"]>[0];\r\n\r\n/** Supports opening a child browser window from the main application window. The child window is managed by the main application\r\n * and is running in the same security context. The application must deliver the html file iTwinPopup.html along side its index.html.\r\n * See also: [Child Window Manager]($docs/learning/ui/appui-react/ChildWindows.md)\r\n * @internal\r\n * */\r\nexport class InternalChildWindowManager implements FrameworkChildWindows {\r\n private _openChildWindows: OpenChildWindowInfo[] = [];\r\n private _createRoot?: CreateRoot;\r\n\r\n public get openChildWindows() {\r\n return this._openChildWindows;\r\n }\r\n\r\n /**\r\n * When using React18, the `createRoot` function must be provided in order to render Popout content with React18.\r\n * Do not call if using React 17 or before.\r\n *\r\n * Note: The type of the function is intentionally simplified here.\r\n *\r\n * @param createRootFn Function imported from `import { createRoot } from \"react-dom/client\";`\r\n * @beta Will be removed once the transition to react 18 is complete.\r\n */\r\n // istanbul ignore next: Result of this assignment is only visible in `open`, which is not tested.\r\n public useCreateRoot(createRootFn: CreateRoot): void {\r\n this._createRoot = createRootFn;\r\n }\r\n\r\n /**\r\n * Abstracts ReactDOM.render to use either the _createRoot method or the default ReactDOM.render.\r\n * @param element Element to render.\r\n * @param container Container to render to.\r\n */\r\n // istanbul ignore next: Used in `open` which is not tested.\r\n private render(element: React.FunctionComponentElement<any>, container: Element | DocumentFragment) {\r\n if(this._createRoot) {\r\n this._createRoot(container).render(element);\r\n } else {\r\n ReactDOM.render(element, container);\r\n }\r\n }\r\n\r\n /**\r\n * Returns the OpenChildWindowInfo for the related id.\r\n * @param childWindowId Id of the window to retrieve.\r\n * @returns undefined if not found.\r\n */\r\n public find(childWindowId: string | undefined): OpenChildWindowInfo | undefined {\r\n if (undefined === childWindowId)\r\n return undefined;\r\n\r\n return this.openChildWindows.find((openWindow) => openWindow.childWindowId === childWindowId);\r\n }\r\n\r\n /**\r\n * Return the childWindowId of the provided window.\r\n * @param contentWindow Window element to identify\r\n * @returns undefined if not found\r\n */\r\n public findId(contentWindow: Window | undefined | null): string | undefined {\r\n if (!contentWindow)\r\n return undefined;\r\n\r\n const childWindow = this.openChildWindows.find((openWindow) => openWindow.window === contentWindow);\r\n return childWindow?.childWindowId;\r\n }\r\n\r\n // istanbul ignore next: Used in `open` which is not tested.\r\n private renderChildWindowContents(childWindow: Window, childWindowId: string, content: React.ReactNode) {\r\n const reactConnectionDiv = childWindow.document.getElementById(\"root\");\r\n if (reactConnectionDiv) {\r\n // set openChildWindows now so components can use it when they mount\r\n this._openChildWindows.push({\r\n childWindowId,\r\n window: childWindow,\r\n parentWindow: window,\r\n });\r\n\r\n setTimeout(() => {\r\n copyStyles(childWindow.document);\r\n setTimeout(() => {\r\n this.render(\r\n <Provider store={StateManager.store} >\r\n <UiStateStorageHandler>\r\n <ThemeManager>\r\n <div className=\"uifw-child-window-container-host\">\r\n <PopupRenderer />\r\n <ModalDialogRenderer />\r\n <ModelessDialogRenderer />\r\n <CursorPopupMenu />\r\n <div className=\"uifw-child-window-container nz-widget-widget\">\r\n {content}\r\n </div>\r\n </div>\r\n </ThemeManager>\r\n </UiStateStorageHandler>\r\n </Provider>,\r\n reactConnectionDiv\r\n );\r\n });\r\n });\r\n\r\n childWindow.onbeforeunload = () => {\r\n const frontStageDef = UiFramework.frontstages.activeFrontstageDef;\r\n if (!frontStageDef)\r\n return;\r\n frontStageDef.saveChildWindowSizeAndPosition(childWindowId, childWindow);\r\n this.close(childWindowId, false);\r\n };\r\n }\r\n }\r\n\r\n /** Close all child/pop-out windows. This typically is called when the frontstage is changed. */\r\n public closeAll() {\r\n // istanbul ignore next\r\n this.openChildWindows.forEach((openChildWindow) => openChildWindow.window.close());\r\n this._openChildWindows = [];\r\n }\r\n\r\n /**\r\n * Close a specific child window.\r\n * @param childWindowId Id of the window to close\r\n * @param processWindowClose should the `close` method be called on the closing window. (defaults to true)\r\n * @returns false if the window could not be found.\r\n */\r\n public close = (childWindowId: string, processWindowClose = true) => {\r\n const windowIndex = this.openChildWindows.findIndex((openWindow) => openWindow.childWindowId === childWindowId);\r\n if (-1 === windowIndex)\r\n return false;\r\n const childWindow = this.openChildWindows[windowIndex];\r\n this.openChildWindows.splice(windowIndex, 1);\r\n if (processWindowClose) {\r\n childWindow.window.close();\r\n } else {\r\n // call the following to convert popout to docked widget\r\n const frontStageDef = UiFramework.frontstages.activeFrontstageDef;\r\n frontStageDef && frontStageDef.dockPopoutWidgetContainer(childWindowId);\r\n }\r\n return true;\r\n };\r\n\r\n // istanbul ignore next: Used in `open` which is not tested.\r\n private adjustWidowLocation(location: ChildWindowLocationProps, center?: boolean): ChildWindowLocationProps {\r\n const outLocation = { ...location };\r\n if (0 === location.top && 0 === location.left) {\r\n center = center ?? true;\r\n const windowTop = window.top ?? window;\r\n\r\n // Prepare position of the new window to be centered against the 'parent' window.\r\n if (center) {\r\n outLocation.left =\r\n windowTop.outerWidth / 2 + windowTop.screenX - location.width / 2;\r\n outLocation.top =\r\n windowTop.outerHeight / 2 + windowTop.screenY - location.height / 2;\r\n } else {\r\n if (undefined !== window.screenLeft && undefined !== window.screenTop) {\r\n outLocation.top = window.screenTop + location.top;\r\n outLocation.left = window.screenLeft + location.left;\r\n }\r\n }\r\n }\r\n return outLocation;\r\n }\r\n\r\n /**\r\n * Open a new child window.\r\n * @param childWindowId Id to assign to the newly created window.\r\n * @param title Title to display on the window.\r\n * @param content ReactNode to be rendered in the window.\r\n * @param location Position and size information\r\n * @param useDefaultPopoutUrl use \"/iTwinPopup.html\" as the window Url, \"\" otherwise.\r\n * @returns true if the window is opened successfully.\r\n */\r\n // istanbul ignore next: Would require mocking window.open to return a window object.\r\n public open(childWindowId: string, title: string, content: React.ReactNode, location: ChildWindowLocationProps, useDefaultPopoutUrl?: boolean) {\r\n // first check to see if content is already open in child window\r\n if (this.openChildWindows.findIndex((openWindow) => openWindow.childWindowId === childWindowId) >= 0) {\r\n return false;\r\n }\r\n\r\n location = this.adjustWidowLocation(location);\r\n const url = useDefaultPopoutUrl ? \"/iTwinPopup.html\" : \"\";\r\n const childWindow = window.open(url, \"\", `width=${location.width},height=${location.height},left=${location.left},top=${location.top},menubar=no,resizable=yes,scrollbars=no,status=no,location=no`);\r\n if (!childWindow)\r\n return false;\r\n if (0 === url.length) {\r\n childWindow.document.write(childHtml);\r\n this.renderChildWindowContents(childWindow, childWindowId, content);\r\n } else {\r\n childWindow.addEventListener(\"load\", () => {\r\n childWindow.document.title = title;\r\n this.renderChildWindowContents(childWindow, childWindowId, content);\r\n }, false);\r\n }\r\n\r\n window.addEventListener(\"unload\", () => {\r\n const frontStageDef = UiFramework.frontstages.activeFrontstageDef;\r\n if (frontStageDef) {\r\n this.close(childWindowId, true);\r\n }\r\n }, false);\r\n\r\n return true;\r\n }\r\n}\r\n"]}
1
+ {"version":3,"file":"InternalChildWindowManager.js","sourceRoot":"","sources":["../../../../src/appui-react/childwindow/InternalChildWindowManager.tsx"],"names":[],"mappings":"AAAA;;;+FAG+F;AAE/F;;GAEG;AAEH,OAAO,mCAAmC,CAAC;AAC3C,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,QAAQ,MAAM,WAAW,CA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AAC,EAAE;YACpG,OAAO,KAAK,CAAC;SACd;QAED,QAAQ,GAAG,IAAI,CAAC,mBAAmB,CAAC,QAAQ,CAAC,CAAC;QAC9C,MAAM,GAAG,GAAG,mBAAmB,CAAC,CAAC,CAAC,kBAAkB,CAAC,CAAC,CAAC,EAAE,CAAC;QAC1D,MAAM,WAAW,GAAG,MAAM,CAAC,IAAI,CAAC,GAAG,EAAE,EAAE,EAAE,SAAS,QAAQ,CAAC,KAAK,WAAW,QAAQ,CAAC,MAAM,SAAS,QAAQ,CAAC,IAAI,QAAQ,QAAQ,CAAC,GAAG,+DAA+D,CAAC,CAAC;QACrM,IAAI,CAAC,WAAW;YACd,OAAO,KAAK,CAAC;QACf,IAAI,CAAC,KAAK,GAAG,CAAC,MAAM,EAAE;YACpB,WAAW,CAAC,QAAQ,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC;YACtC,IAAI,CAAC,yBAAyB,CAAC,WAAW,EAAE,aAAa,EAAE,OAAO,EAAE,KAAK,CAAC,CAAC;SAC5E;aAAM;YACL,WAAW,CAAC,gBAAgB,CAAC,MAAM,EAAE,GAAG,EAAE;gBACxC,IAAI,CAAC,yBAAyB,CAAC,WAAW,EAAE,aAAa,EAAE,OAAO,EAAE,KAAK,CAAC,CAAC;YAC7E,CAAC,EAAE,KAAK,CAAC,CAAC;SACX;QAED,MAAM,CAAC,gBAAgB,CAAC,QAAQ,EAAE,GAAG,EAAE;YACrC,MAAM,aAAa,GAAG,WAAW,CAAC,WAAW,CAAC,mBAAmB,CAAC;YAClE,IAAI,aAAa,EAAE;gBACjB,IAAI,CAAC,KAAK,CAAC,aAAa,EAAE,IAAI,CAAC,CAAC;aACjC;QACH,CAAC,EAAE,KAAK,CAAC,CAAC;QAEV,OAAO,IAAI,CAAC;IACd,CAAC;CACF","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n\r\n/** @packageDocumentation\r\n * @module ChildWindowManager\r\n */\r\n\r\nimport \"./InternalChildWindowManager.scss\";\r\nimport * as React from \"react\";\r\nimport * as ReactDOM from \"react-dom\";\r\nimport { copyStyles } from \"./CopyStyles\";\r\nimport { Provider } from \"react-redux\";\r\nimport { StateManager } from \"../redux/StateManager\";\r\nimport { UiStateStorageHandler } from \"../uistate/useUiStateStorage\";\r\nimport { PopupRenderer } from \"../popup/PopupManager\";\r\nimport { ModelessDialogRenderer } from \"../dialog/ModelessDialogManager\";\r\nimport { ModalDialogRenderer } from \"../dialog/ModalDialogManager\";\r\nimport { CursorPopupMenu } from \"../cursor/cursormenu/CursorMenu\";\r\nimport { ThemeManager } from \"../theme/ThemeManager\";\r\nimport { UiFramework } from \"../UiFramework\";\r\nimport { ChildWindowLocationProps, FrameworkChildWindows, OpenChildWindowInfo } from \"../framework/FrameworkChildWindows\";\r\n\r\nconst childHtml = `<!DOCTYPE html>\r\n<html>\r\n<head>\r\n <meta charset=\"utf-8\" />\r\n <style>\r\n html,\r\n body {\r\n height: 100%;\r\n width: 100%;\r\n margin: 0;\r\n overflow: hidden;\r\n }\r\n #root {\r\n height: 100%;\r\n }\r\n </style>\r\n</head>\r\n<body>\r\n <noscript>You need to enable JavaScript to run this app.</noscript>\r\n <div id=\"root\"></div>\r\n</body>\r\n</html>`;\r\n\r\n/**\r\n * Simplification of non exported CreateRoot parameter, only to be used\r\n * in InternalChildWindowManager and ChildWindowManager\r\n * @internal\r\n */\r\nexport type CreateRoot = Parameters<FrameworkChildWindows[\"useCreateRoot\"]>[0];\r\n\r\n/** Supports opening a child browser window from the main application window. The child window is managed by the main application\r\n * and is running in the same security context. The application must deliver the html file iTwinPopup.html along side its index.html.\r\n * See also: [Child Window Manager]($docs/learning/ui/appui-react/ChildWindows.md)\r\n * @internal\r\n * */\r\nexport class InternalChildWindowManager implements FrameworkChildWindows {\r\n private _openChildWindows: OpenChildWindowInfo[] = [];\r\n private _createRoot?: CreateRoot;\r\n\r\n public get openChildWindows() {\r\n return this._openChildWindows;\r\n }\r\n\r\n /**\r\n * When using React18, the `createRoot` function must be provided in order to render Popout content with React18.\r\n * Do not call if using React 17 or before.\r\n *\r\n * Note: The type of the function is intentionally simplified here.\r\n *\r\n * @param createRootFn Function imported from `import { createRoot } from \"react-dom/client\";`\r\n * @beta Will be removed once the transition to react 18 is complete.\r\n */\r\n // istanbul ignore next: Result of this assignment is only visible in `open`, which is not tested.\r\n public useCreateRoot(createRootFn: CreateRoot): void {\r\n this._createRoot = createRootFn;\r\n }\r\n\r\n /**\r\n * Abstracts ReactDOM.render to use either the _createRoot method or the default ReactDOM.render.\r\n * @param element Element to render.\r\n * @param container Container to render to.\r\n */\r\n // istanbul ignore next: Used in `open` which is not tested.\r\n private render(element: React.FunctionComponentElement<any>, container: Element | DocumentFragment) {\r\n if(this._createRoot) {\r\n this._createRoot(container).render(element);\r\n } else {\r\n ReactDOM.render(element, container);\r\n }\r\n }\r\n\r\n /**\r\n * Returns the OpenChildWindowInfo for the related id.\r\n * @param childWindowId Id of the window to retrieve.\r\n * @returns undefined if not found.\r\n */\r\n public find(childWindowId: string | undefined): OpenChildWindowInfo | undefined {\r\n if (undefined === childWindowId)\r\n return undefined;\r\n\r\n return this.openChildWindows.find((openWindow) => openWindow.childWindowId === childWindowId);\r\n }\r\n\r\n /**\r\n * Return the childWindowId of the provided window.\r\n * @param contentWindow Window element to identify\r\n * @returns undefined if not found\r\n */\r\n public findId(contentWindow: Window | undefined | null): string | undefined {\r\n if (!contentWindow)\r\n return undefined;\r\n\r\n const childWindow = this.openChildWindows.find((openWindow) => openWindow.window === contentWindow);\r\n return childWindow?.childWindowId;\r\n }\r\n\r\n // istanbul ignore next: Used in `open` which is not tested.\r\n private renderChildWindowContents(childWindow: Window, childWindowId: string, content: React.ReactNode, title: string) {\r\n childWindow.document.title = title;\r\n const reactConnectionDiv = childWindow.document.getElementById(\"root\");\r\n if (reactConnectionDiv) {\r\n // set openChildWindows now so components can use it when they mount\r\n this._openChildWindows.push({\r\n childWindowId,\r\n window: childWindow,\r\n parentWindow: window,\r\n });\r\n\r\n setTimeout(() => {\r\n copyStyles(childWindow.document);\r\n setTimeout(() => {\r\n this.render(\r\n <Provider store={StateManager.store} >\r\n <UiStateStorageHandler>\r\n <ThemeManager>\r\n <div className=\"uifw-child-window-container-host\">\r\n <PopupRenderer />\r\n <ModalDialogRenderer />\r\n <ModelessDialogRenderer />\r\n <CursorPopupMenu />\r\n <div className=\"uifw-child-window-container nz-widget-widget\">\r\n {content}\r\n </div>\r\n </div>\r\n </ThemeManager>\r\n </UiStateStorageHandler>\r\n </Provider>,\r\n reactConnectionDiv\r\n );\r\n });\r\n });\r\n\r\n childWindow.onbeforeunload = () => {\r\n const frontStageDef = UiFramework.frontstages.activeFrontstageDef;\r\n if (!frontStageDef)\r\n return;\r\n frontStageDef.saveChildWindowSizeAndPosition(childWindowId, childWindow);\r\n this.close(childWindowId, false);\r\n };\r\n }\r\n }\r\n\r\n /** Close all child/pop-out windows. This typically is called when the frontstage is changed. */\r\n public closeAll() {\r\n // istanbul ignore next\r\n this.openChildWindows.forEach((openChildWindow) => openChildWindow.window.close());\r\n this._openChildWindows = [];\r\n }\r\n\r\n /**\r\n * Close a specific child window.\r\n * @param childWindowId Id of the window to close\r\n * @param processWindowClose should the `close` method be called on the closing window. (defaults to true)\r\n * @returns false if the window could not be found.\r\n */\r\n public close = (childWindowId: string, processWindowClose = true) => {\r\n const windowIndex = this.openChildWindows.findIndex((openWindow) => openWindow.childWindowId === childWindowId);\r\n if (-1 === windowIndex)\r\n return false;\r\n const childWindow = this.openChildWindows[windowIndex];\r\n this.openChildWindows.splice(windowIndex, 1);\r\n if (processWindowClose) {\r\n childWindow.window.close();\r\n } else {\r\n // call the following to convert popout to docked widget\r\n const frontStageDef = UiFramework.frontstages.activeFrontstageDef;\r\n frontStageDef && frontStageDef.dockPopoutWidgetContainer(childWindowId);\r\n }\r\n return true;\r\n };\r\n\r\n // istanbul ignore next: Used in `open` which is not tested.\r\n private adjustWidowLocation(location: ChildWindowLocationProps, center?: boolean): ChildWindowLocationProps {\r\n const outLocation = { ...location };\r\n if (0 === location.top && 0 === location.left) {\r\n center = center ?? true;\r\n const windowTop = window.top ?? window;\r\n\r\n // Prepare position of the new window to be centered against the 'parent' window.\r\n if (center) {\r\n outLocation.left =\r\n windowTop.outerWidth / 2 + windowTop.screenX - location.width / 2;\r\n outLocation.top =\r\n windowTop.outerHeight / 2 + windowTop.screenY - location.height / 2;\r\n } else {\r\n if (undefined !== window.screenLeft && undefined !== window.screenTop) {\r\n outLocation.top = window.screenTop + location.top;\r\n outLocation.left = window.screenLeft + location.left;\r\n }\r\n }\r\n }\r\n return outLocation;\r\n }\r\n\r\n /**\r\n * Open a new child window.\r\n * @param childWindowId Id to assign to the newly created window.\r\n * @param title Title to display on the window.\r\n * @param content ReactNode to be rendered in the window.\r\n * @param location Position and size information\r\n * @param useDefaultPopoutUrl use \"/iTwinPopup.html\" as the window Url, \"\" otherwise.\r\n * @returns true if the window is opened successfully.\r\n */\r\n // istanbul ignore next: Would require mocking window.open to return a window object.\r\n public open(childWindowId: string, title: string, content: React.ReactNode, location: ChildWindowLocationProps, useDefaultPopoutUrl?: boolean) {\r\n // first check to see if content is already open in child window\r\n if (this.openChildWindows.findIndex((openWindow) => openWindow.childWindowId === childWindowId) >= 0) {\r\n return false;\r\n }\r\n\r\n location = this.adjustWidowLocation(location);\r\n const url = useDefaultPopoutUrl ? \"/iTwinPopup.html\" : \"\";\r\n const childWindow = window.open(url, \"\", `width=${location.width},height=${location.height},left=${location.left},top=${location.top},menubar=no,resizable=yes,scrollbars=no,status=no,location=no`);\r\n if (!childWindow)\r\n return false;\r\n if (0 === url.length) {\r\n childWindow.document.write(childHtml);\r\n this.renderChildWindowContents(childWindow, childWindowId, content, title);\r\n } else {\r\n childWindow.addEventListener(\"load\", () => {\r\n this.renderChildWindowContents(childWindow, childWindowId, content, title);\r\n }, false);\r\n }\r\n\r\n window.addEventListener(\"unload\", () => {\r\n const frontStageDef = UiFramework.frontstages.activeFrontstageDef;\r\n if (frontStageDef) {\r\n this.close(childWindowId, true);\r\n }\r\n }, false);\r\n\r\n return true;\r\n }\r\n}\r\n"]}
@@ -3,45 +3,6 @@
3
3
  */
4
4
  import { CommonProps } from "@itwin/core-react";
5
5
  import * as React from "react";
6
- import { ContentDialogInfo } from "../framework/FrameworkContent";
7
- /** Content Dialog Manager class displays and manages multiple modeless dialogs
8
- * @public
9
- * @deprecated in 3.7. Use `UiFramework.content.dialog` property.
10
- */
11
- export declare class ContentDialogManager {
12
- /** Initialize the modeless dialog manager.
13
- * @deprecated in 3.7. This is called internally.
14
- */
15
- static initialize(): void;
16
- /** Content Dialog Changed Event */
17
- static get onContentDialogChangedEvent(): import("../framework/FrameworkContent").ContentDialogChangedEvent;
18
- /** @internal */
19
- static get dialogManager(): import("./DialogManagerBase").DialogManagerBase;
20
- /** Get the array of modeless dialogs */
21
- static get dialogs(): import("./DialogManagerBase").DialogInfo[];
22
- /** Open a modeless dialog
23
- * @param dialog The Dialog to open
24
- * @param id The id of the Dialog to open
25
- */
26
- static openDialog(dialog: React.ReactNode, id: string, parentDocument?: Document): void;
27
- /** Close a modeless dialog
28
- * @param id The id of the Dialog to close.
29
- */
30
- static closeDialog(id: string): void;
31
- /** @internal */
32
- static closeAll(): void;
33
- /** Update the dialogs */
34
- static update(): void;
35
- /** Get the active modeless dialog */
36
- static get activeDialog(): React.ReactNode | undefined;
37
- /** Get the count of modeless dialogs */
38
- static get dialogCount(): number;
39
- /** Handle a pointer down event on a modeless dialog */
40
- static handlePointerDownEvent(_event: React.PointerEvent, id: string, updateFunc: () => void): void;
41
- /** Get the z-index for a modeless dialog */
42
- static getDialogZIndex(id: string): number;
43
- static getDialogInfo(id: string): ContentDialogInfo | undefined;
44
- }
45
6
  /** ContentDialogRenderer React component renders modeless dialogs.
46
7
  * @public
47
8
  */
@@ -1 +1 @@
1
- {"version":3,"file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