@itwin/appui-react 4.14.1 → 4.14.2

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 (44) hide show
  1. package/CHANGELOG.md +10 -1
  2. package/lib/cjs/appui-react/childwindow/ChildWindowConfig.d.ts +4 -0
  3. package/lib/cjs/appui-react/childwindow/ChildWindowConfig.d.ts.map +1 -1
  4. package/lib/cjs/appui-react/childwindow/ChildWindowConfig.js.map +1 -1
  5. package/lib/cjs/appui-react/childwindow/InternalChildWindowManager.d.ts.map +1 -1
  6. package/lib/cjs/appui-react/childwindow/InternalChildWindowManager.js +8 -2
  7. package/lib/cjs/appui-react/childwindow/InternalChildWindowManager.js.map +1 -1
  8. package/lib/cjs/appui-react/configurableui/ConfigurableUiContent.d.ts.map +1 -1
  9. package/lib/cjs/appui-react/configurableui/ConfigurableUiContent.js +8 -8
  10. package/lib/cjs/appui-react/configurableui/ConfigurableUiContent.js.map +1 -1
  11. package/lib/cjs/appui-react/dialog/DialogManagerBase.d.ts +3 -2
  12. package/lib/cjs/appui-react/dialog/DialogManagerBase.d.ts.map +1 -1
  13. package/lib/cjs/appui-react/dialog/DialogManagerBase.js +16 -9
  14. package/lib/cjs/appui-react/dialog/DialogManagerBase.js.map +1 -1
  15. package/lib/cjs/appui-react/dialog/DialogManagerBase.scss +11 -0
  16. package/lib/cjs/appui-react/statusbar/popup/StatusBarPopover.d.ts +2 -2
  17. package/lib/cjs/appui-react/statusbar/popup/StatusBarPopover.d.ts.map +1 -1
  18. package/lib/cjs/appui-react/statusbar/popup/StatusBarPopover.js +6 -2
  19. package/lib/cjs/appui-react/statusbar/popup/StatusBarPopover.js.map +1 -1
  20. package/lib/cjs/appui-react.d.ts +2 -2
  21. package/lib/cjs/appui-react.js +2 -2
  22. package/lib/cjs/appui-react.js.map +1 -1
  23. package/lib/esm/appui-react/childwindow/ChildWindowConfig.d.ts +4 -0
  24. package/lib/esm/appui-react/childwindow/ChildWindowConfig.d.ts.map +1 -1
  25. package/lib/esm/appui-react/childwindow/ChildWindowConfig.js.map +1 -1
  26. package/lib/esm/appui-react/childwindow/InternalChildWindowManager.d.ts.map +1 -1
  27. package/lib/esm/appui-react/childwindow/InternalChildWindowManager.js +8 -2
  28. package/lib/esm/appui-react/childwindow/InternalChildWindowManager.js.map +1 -1
  29. package/lib/esm/appui-react/configurableui/ConfigurableUiContent.d.ts.map +1 -1
  30. package/lib/esm/appui-react/configurableui/ConfigurableUiContent.js +8 -8
  31. package/lib/esm/appui-react/configurableui/ConfigurableUiContent.js.map +1 -1
  32. package/lib/esm/appui-react/dialog/DialogManagerBase.d.ts +3 -2
  33. package/lib/esm/appui-react/dialog/DialogManagerBase.d.ts.map +1 -1
  34. package/lib/esm/appui-react/dialog/DialogManagerBase.js +16 -9
  35. package/lib/esm/appui-react/dialog/DialogManagerBase.js.map +1 -1
  36. package/lib/esm/appui-react/dialog/DialogManagerBase.scss +11 -0
  37. package/lib/esm/appui-react/statusbar/popup/StatusBarPopover.d.ts +2 -2
  38. package/lib/esm/appui-react/statusbar/popup/StatusBarPopover.d.ts.map +1 -1
  39. package/lib/esm/appui-react/statusbar/popup/StatusBarPopover.js +6 -2
  40. package/lib/esm/appui-react/statusbar/popup/StatusBarPopover.js.map +1 -1
  41. package/lib/esm/appui-react.d.ts +2 -2
  42. package/lib/esm/appui-react.js +2 -2
  43. package/lib/esm/appui-react.js.map +1 -1
  44. package/package.json +7 -7
package/CHANGELOG.md CHANGED
@@ -1,6 +1,15 @@
1
1
  # Change Log - @itwin/appui-react
2
2
 
3
- This log was last generated on Tue, 11 Jun 2024 15:58:29 GMT and should not be manually modified.
3
+ This log was last generated on Mon, 22 Jul 2024 21:23:09 GMT and should not be manually modified.
4
+
5
+ ## 4.14.2
6
+ Mon, 22 Jul 2024 21:23:09 GMT
7
+
8
+ ### Updates
9
+
10
+ - Fix an issue where Popup is rendered outside of a StatusBarPopover.
11
+ - Fix an issue where widget is rendered above the dialog backdrop.
12
+ - Fixed popout widget changing position on a secondary montitor.
4
13
 
5
14
  ## 4.14.1
6
15
  Tue, 11 Jun 2024 15:58:29 GMT
@@ -7,6 +7,10 @@ export interface ChildWindow extends Window {
7
7
  expectedWidth?: number;
8
8
  /** Expected height of the child window. */
9
9
  expectedHeight?: number;
10
+ /** Expected top value of the child window. */
11
+ expectedTop?: number;
12
+ /** Expected left value of the child window. */
13
+ expectedLeft?: number;
10
14
  /** Difference between expected child window width and actual value when opened. */
11
15
  deltaWidth?: number;
12
16
  /** Difference between expected child window height and actual value when opened. */
@@ -1 +1 @@
1
- {"version":3,"file":"ChildWindowConfig.d.ts","sourceRoot":"","sources":["../../../../src/appui-react/childwindow/ChildWindowConfig.ts"],"names":[],"mappings":"AAIA;;;GAGG;AACH,MAAM,WAAW,WAAY,SAAQ,MAAM;IACzC,0CAA0C;IAC1C,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,2CAA2C;IAC3C,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,mFAAmF;IACnF,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,oFAAoF;IACpF,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,wFAAwF;IACxF,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,uFAAuF;IACvF,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB"}
1
+ {"version":3,"file":"ChildWindowConfig.d.ts","sourceRoot":"","sources":["../../../../src/appui-react/childwindow/ChildWindowConfig.ts"],"names":[],"mappings":"AAIA;;;GAGG;AACH,MAAM,WAAW,WAAY,SAAQ,MAAM;IACzC,0CAA0C;IAC1C,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,2CAA2C;IAC3C,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,8CAA8C;IAC9C,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,+CAA+C;IAC/C,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,mFAAmF;IACnF,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,oFAAoF;IACpF,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,wFAAwF;IACxF,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,uFAAuF;IACvF,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB"}
@@ -1 +1 @@
1
- {"version":3,"file":"ChildWindowConfig.js","sourceRoot":"","sources":["../../../../src/appui-react/childwindow/ChildWindowConfig.ts"],"names":[],"mappings":"","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n * See LICENSE.md in the project root for license terms and full copyright notice.\n *--------------------------------------------------------------------------------------------*/\n/**\n * An extension of a Window to be used for Popout Widgets.\n * @internal\n */\nexport interface ChildWindow extends Window {\n /** Expected width of the child window. */\n expectedWidth?: number;\n /** Expected height of the child window. */\n expectedHeight?: number;\n /** Difference between expected child window width and actual value when opened. */\n deltaWidth?: number;\n /** Difference between expected child window height and actual value when opened. */\n deltaHeight?: number;\n /** Difference between expected child window left value and actual value when opened. */\n deltaLeft?: number;\n /** Difference between expected child window top value and actual value when opened. */\n deltaTop?: number;\n}\n"]}
1
+ {"version":3,"file":"ChildWindowConfig.js","sourceRoot":"","sources":["../../../../src/appui-react/childwindow/ChildWindowConfig.ts"],"names":[],"mappings":"","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n * See LICENSE.md in the project root for license terms and full copyright notice.\n *--------------------------------------------------------------------------------------------*/\n/**\n * An extension of a Window to be used for Popout Widgets.\n * @internal\n */\nexport interface ChildWindow extends Window {\n /** Expected width of the child window. */\n expectedWidth?: number;\n /** Expected height of the child window. */\n expectedHeight?: number;\n /** Expected top value of the child window. */\n expectedTop?: number;\n /** Expected left value of the child window. */\n expectedLeft?: number;\n /** Difference between expected child window width and actual value when opened. */\n deltaWidth?: number;\n /** Difference between expected child window height and actual value when opened. */\n deltaHeight?: number;\n /** Difference between expected child window left value and actual value when opened. */\n deltaLeft?: number;\n /** Difference between expected child window top value and actual value when opened. */\n deltaTop?: number;\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"InternalChildWindowManager.d.ts","sourceRoot":"","sources":["../../../../src/appui-react/childwindow/InternalChildWindowManager.tsx"],"names":[],"mappings":"AAKA;;GAEG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAO/B,OAAO,KAAK,EACV,wBAAwB,EACxB,qBAAqB,EACrB,mBAAmB,EACpB,MAAM,oCAAoC,CAAC;AAO5C,OAAO,mCAAmC,CAAC;AA0B3C;;;;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;IACjC,OAAO,CAAC,MAAM,CAAwC;IAEtD,IAAW,gBAAgB,0BAE1B;IAED;;;;;;;;OAQG;IACI,aAAa,CAAC,YAAY,EAAE,UAAU,GAAG,IAAI;IAIpD;;;;OAIG;IACH,OAAO,CAAC,MAAM;IAqBd;;;;OAIG;IACI,IAAI,CACT,aAAa,EAAE,MAAM,GAAG,SAAS,GAChC,mBAAmB,GAAG,SAAS;IAQlC;;;;OAIG;IACI,MAAM,CAAC,aAAa,EAAE,MAAM,GAAG,SAAS,GAAG,IAAI,GAAG,MAAM,GAAG,SAAS;IAS3E,OAAO,CAAC,yBAAyB;IA8FjC,gGAAgG;IACzF,QAAQ;IAOf;;;;;OAKG;IACI,KAAK,kBAAmB,MAAM,2CAkBnC;IAEF,OAAO,CAAC,oBAAoB;IAU5B;;;;;;;;OAQG;IACI,IAAI,CACT,aAAa,EAAE,MAAM,EACrB,KAAK,EAAE,MAAM,EACb,OAAO,EAAE,KAAK,CAAC,SAAS,EACxB,QAAQ,EAAE,wBAAwB,EAClC,mBAAmB,CAAC,EAAE,OAAO;CA2DhC"}
1
+ {"version":3,"file":"InternalChildWindowManager.d.ts","sourceRoot":"","sources":["../../../../src/appui-react/childwindow/InternalChildWindowManager.tsx"],"names":[],"mappings":"AAKA;;GAEG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAO/B,OAAO,KAAK,EACV,wBAAwB,EACxB,qBAAqB,EACrB,mBAAmB,EACpB,MAAM,oCAAoC,CAAC;AAO5C,OAAO,mCAAmC,CAAC;AA0B3C;;;;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;IACjC,OAAO,CAAC,MAAM,CAAwC;IAEtD,IAAW,gBAAgB,0BAE1B;IAED;;;;;;;;OAQG;IACI,aAAa,CAAC,YAAY,EAAE,UAAU,GAAG,IAAI;IAIpD;;;;OAIG;IACH,OAAO,CAAC,MAAM;IAqBd;;;;OAIG;IACI,IAAI,CACT,aAAa,EAAE,MAAM,GAAG,SAAS,GAChC,mBAAmB,GAAG,SAAS;IAQlC;;;;OAIG;IACI,MAAM,CAAC,aAAa,EAAE,MAAM,GAAG,SAAS,GAAG,IAAI,GAAG,MAAM,GAAG,SAAS;IAS3E,OAAO,CAAC,yBAAyB;IAqGjC,gGAAgG;IACzF,QAAQ;IAOf;;;;;OAKG;IACI,KAAK,kBAAmB,MAAM,2CAkBnC;IAEF,OAAO,CAAC,oBAAoB;IAU5B;;;;;;;;OAQG;IACI,IAAI,CACT,aAAa,EAAE,MAAM,EACrB,KAAK,EAAE,MAAM,EACb,OAAO,EAAE,KAAK,CAAC,SAAS,EACxB,QAAQ,EAAE,wBAAwB,EAClC,mBAAmB,CAAC,EAAE,OAAO;CA2DhC"}
@@ -180,6 +180,12 @@ class InternalChildWindowManager {
180
180
  childWindow.deltaHeight =
181
181
  childWindow.expectedHeight - childWindow.innerHeight;
182
182
  }
183
+ if (childWindow.expectedLeft && childWindow.expectedTop) {
184
+ childWindow.deltaLeft =
185
+ childWindow.expectedLeft - childWindow.screenLeft;
186
+ childWindow.deltaTop =
187
+ childWindow.expectedTop - childWindow.screenTop;
188
+ }
183
189
  });
184
190
  });
185
191
  childWindow.addEventListener("pagehide", () => {
@@ -235,8 +241,8 @@ class InternalChildWindowManager {
235
241
  return false;
236
242
  childWindow.expectedHeight = location.height;
237
243
  childWindow.expectedWidth = location.width;
238
- childWindow.deltaLeft = location.left - childWindow.screenLeft;
239
- childWindow.deltaTop = location.top - childWindow.screenTop;
244
+ childWindow.expectedLeft = location.left;
245
+ childWindow.expectedTop = location.top;
240
246
  if (url.length === 0) {
241
247
  childWindow.document.write(childHtml);
242
248
  this.renderChildWindowContents(childWindow, childWindowId, content, title);
@@ -1 +1 @@
1
- {"version":3,"file":"InternalChildWindowManager.js","sourceRoot":"","sources":["../../../../src/appui-react/childwindow/InternalChildWindowManager.tsx"],"names":[],"mappings":";AAAA;;;gGAGgG;;;AAEhG;;GAEG;AAEH,+BAA+B;AAC/B,sCAAsC;AACtC,6CAAuC;AACvC,gDAA6C;AAC7C,gEAAkE;AAClE,qEAAmE;AACnE,2EAAyE;AAMzE,sEAAgE;AAChE,wDAAsD;AACtD,wDAAqD;AACrD,oEAAqE;AAErE,6CAA0C;AAC1C,6CAA2C;AAC3C,wFAAqF;AAErF,MAAM,SAAS,GAAG;;;;;;;;;;;;;;;;;;;;;QAqBV,CAAC;AAST;;;;KAIK;AACL,MAAa,0BAA0B;IAAvC;QACU,sBAAiB,GAA0B,EAAE,CAAC;QAE9C,WAAM,GAAqC,EAAE,CAAC;QAgLtD;;;;;WAKG;QACI,UAAK,GAAG,CAAC,aAAqB,EAAE,kBAAkB,GAAG,IAAI,EAAE,EAAE;YAClE,MAAM,WAAW,GAAG,IAAI,CAAC,gBAAg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AC5B,WAAW,EACX,aAAa,EACb,OAAO,EACP,KAAK,CACN,CAAC;QACJ,CAAC;aAAM,CAAC;YACN,WAAW,CAAC,gBAAgB,CAC1B,kBAAkB,EAClB,GAAG,EAAE;gBACH,IAAI,CAAC,yBAAyB,CAC5B,WAAW,EACX,aAAa,EACb,OAAO,EACP,KAAK,CACN,CAAC;YACJ,CAAC,EACD,KAAK,CACN,CAAC;QACJ,CAAC;QAED,MAAM,CAAC,gBAAgB,CACrB,QAAQ,EACR,GAAG,EAAE;YACH,MAAM,aAAa,GAAG,yBAAW,CAAC,WAAW,CAAC,mBAAmB,CAAC;YAClE,IAAI,aAAa,EAAE,CAAC;gBAClB,IAAI,CAAC,KAAK,CAAC,aAAa,EAAE,IAAI,CAAC,CAAC;YAClC,CAAC;QACH,CAAC,EACD,KAAK,CACN,CAAC;QAEF,OAAO,IAAI,CAAC;IACd,CAAC;CACF;AAhSD,gEAgSC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n * See LICENSE.md in the project root for license terms and full copyright notice.\n *--------------------------------------------------------------------------------------------*/\n\n/** @packageDocumentation\n * @module ChildWindowManager\n */\n\nimport * as React from \"react\";\nimport * as ReactDOM from \"react-dom\";\nimport { Provider } from \"react-redux\";\nimport { UiFramework } from \"../UiFramework\";\nimport { CursorPopupMenu } from \"../cursor/cursormenu/CursorMenu\";\nimport { ModalDialogRenderer } from \"../dialog/ModalDialogManager\";\nimport { ModelessDialogRenderer } from \"../dialog/ModelessDialogManager\";\nimport type {\n ChildWindowLocationProps,\n FrameworkChildWindows,\n OpenChildWindowInfo,\n} from \"../framework/FrameworkChildWindows\";\nimport { TabIdContext } from \"../layout/widget/ContentRenderer\";\nimport { PopupRenderer } from \"../popup/PopupManager\";\nimport { ThemeManager } from \"../theme/ThemeManager\";\nimport { UiStateStorageHandler } from \"../uistate/useUiStateStorage\";\nimport type { ChildWindow } from \"./ChildWindowConfig\";\nimport { copyStyles } from \"./CopyStyles\";\nimport \"./InternalChildWindowManager.scss\";\nimport { usePopoutsStore } from \"../preview/reparent-popout-widgets/usePopoutsStore\";\n\nconst childHtml = `<!DOCTYPE html>\n<html>\n<head>\n <meta charset=\"utf-8\" />\n <style>\n html,\n body {\n height: 100%;\n width: 100%;\n margin: 0;\n overflow: hidden;\n }\n #root {\n height: 100%;\n }\n </style>\n</head>\n<body>\n <noscript>You need to enable JavaScript to run this app.</noscript>\n <div id=\"root\"></div>\n</body>\n</html>`;\n\n/**\n * Simplification of non exported CreateRoot parameter, only to be used\n * in InternalChildWindowManager and ChildWindowManager\n * @internal\n */\nexport type CreateRoot = Parameters<FrameworkChildWindows[\"useCreateRoot\"]>[0];\n\n/** Supports opening a child browser window from the main application window. The child window is managed by the main application\n * and is running in the same security context. The application must deliver the html file iTwinPopup.html along side its index.html.\n * See also: [Child Window Manager]($docs/learning/ui/appui-react/ChildWindows.md)\n * @internal\n * */\nexport class InternalChildWindowManager implements FrameworkChildWindows {\n private _openChildWindows: OpenChildWindowInfo[] = [];\n private _createRoot?: CreateRoot;\n private _roots: { [childwindowId: string]: any } = {};\n\n public get openChildWindows() {\n return this._openChildWindows;\n }\n\n /**\n * When using React 18, the `createRoot` function must be provided in order to render Popout content with React 18.\n * Do not call if using React 17 or before.\n *\n * Note: The type of the function is intentionally simplified here.\n *\n * @param createRootFn Function imported from `import { createRoot } from \"react-dom/client\";`\n * @beta Will be removed once the transition to React 18 is complete.\n */\n public useCreateRoot(createRootFn: CreateRoot): void {\n this._createRoot = createRootFn;\n }\n\n /**\n * Abstracts ReactDOM.render to use either the _createRoot method or the default ReactDOM.render.\n * @param element Element to render.\n * @param container Container to render to.\n */\n private render(\n element: React.FunctionComponentElement<any>,\n container: Element | DocumentFragment\n ) {\n // If createRoot is passed in for React 18 we have to render differently\n // than without it. React 17 vs React 18. We need to save the root to\n // unmount it.\n if (this._createRoot) {\n const childWindowId = UiFramework.childWindows.findId(\n container.ownerDocument.defaultView\n );\n if (childWindowId) {\n this._roots[childWindowId] = this._createRoot(container);\n this._roots[childWindowId].render(element);\n }\n } else {\n // eslint-disable-next-line react/no-deprecated, deprecation/deprecation\n ReactDOM.render(element, container);\n }\n }\n\n /**\n * Returns the OpenChildWindowInfo for the related id.\n * @param childWindowId Id of the window to retrieve.\n * @returns undefined if not found.\n */\n public find(\n childWindowId: string | undefined\n ): OpenChildWindowInfo | undefined {\n if (undefined === childWindowId) return undefined;\n\n return this.openChildWindows.find(\n (openWindow) => openWindow.childWindowId === childWindowId\n );\n }\n\n /**\n * Return the childWindowId of the provided window.\n * @param contentWindow Window element to identify\n * @returns undefined if not found\n */\n public findId(contentWindow: Window | undefined | null): string | undefined {\n if (!contentWindow) return undefined;\n\n const childWindow = this.openChildWindows.find(\n (openWindow) => openWindow.window === contentWindow\n );\n return childWindow?.childWindowId;\n }\n\n private renderChildWindowContents(\n childWindow: ChildWindow,\n childWindowId: string,\n content: React.ReactNode,\n title: string\n ) {\n childWindow.document.title = title;\n\n const reactConnectionDiv = childWindow.document.getElementById(\"root\");\n if (reactConnectionDiv && content && React.isValidElement(content)) {\n // set openChildWindows now so components can use it when they mount\n this._openChildWindows.push({\n childWindowId,\n window: childWindow,\n parentWindow: window,\n });\n let element: React.FunctionComponentElement<any>;\n if (content.props.widgetDef) {\n const tabId = content.props.widgetDef.id as string;\n element = (\n <Provider store={UiFramework.store}>\n <TabIdContext.Provider value={tabId}>\n <UiStateStorageHandler>\n <ThemeManager>\n <div className=\"uifw-child-window-container-host\">\n <PopupRenderer />\n <ModalDialogRenderer />\n <ModelessDialogRenderer />\n <CursorPopupMenu />\n <div className=\"uifw-child-window-container nz-widget-widget\">\n {content}\n </div>\n </div>\n </ThemeManager>\n </UiStateStorageHandler>\n </TabIdContext.Provider>\n </Provider>\n );\n } else {\n element = (\n <Provider store={UiFramework.store}>\n <UiStateStorageHandler>\n <ThemeManager>\n <div className=\"uifw-child-window-container-host\">\n <PopupRenderer />\n <ModalDialogRenderer />\n <ModelessDialogRenderer />\n <CursorPopupMenu />\n <div className=\"uifw-child-window-container nz-widget-widget\">\n {content}\n </div>\n </div>\n </ThemeManager>\n </UiStateStorageHandler>\n </Provider>\n );\n }\n\n setTimeout(() => {\n copyStyles(childWindow.document);\n setTimeout(() => {\n this.render(element, reactConnectionDiv);\n\n if (childWindow.expectedHeight && childWindow.expectedWidth) {\n childWindow.deltaWidth =\n childWindow.expectedWidth - childWindow.innerWidth;\n childWindow.deltaHeight =\n childWindow.expectedHeight - childWindow.innerHeight;\n }\n });\n });\n\n childWindow.addEventListener(\"pagehide\", () => {\n const frontStageDef = UiFramework.frontstages.activeFrontstageDef;\n if (!frontStageDef) return;\n frontStageDef.saveChildWindowSizeAndPosition(\n childWindowId,\n childWindow\n );\n\n // Trigger first so popout can be converted back to main window widget\n this.close(childWindowId, false);\n\n // UnmountComponentAtNode is deprecated in React 18, so if they are\n // using React 18 and passing in a createRoot function, unmount()\n // will be used\n if (this._roots[childWindowId]) {\n this._roots[childWindowId].unmount();\n // eslint-disable-next-line react/no-deprecated, deprecation/deprecation\n } else ReactDOM.unmountComponentAtNode(reactConnectionDiv);\n });\n }\n }\n\n /** Close all child/pop-out windows. This typically is called when the frontstage is changed. */\n public closeAll() {\n this.openChildWindows.forEach((openChildWindow) =>\n openChildWindow.window.close()\n );\n this._openChildWindows = [];\n }\n\n /**\n * Close a specific child window.\n * @param childWindowId Id of the window to close.\n * @param processWindowClose should the `close` method be called on the closing window. (defaults to true).\n * @returns false if the window could not be found.\n */\n public close = (childWindowId: string, processWindowClose = true) => {\n const windowIndex = this.openChildWindows.findIndex(\n (openWindow) => openWindow.childWindowId === childWindowId\n );\n if (windowIndex === -1) return false;\n const { onClosePopoutWidget } = usePopoutsStore.getState();\n onClosePopoutWidget.raiseEvent({ windowId: childWindowId });\n\n const childWindow = this.openChildWindows[windowIndex];\n this.openChildWindows.splice(windowIndex, 1);\n if (processWindowClose) {\n childWindow.window.close();\n } else {\n // call the following to convert popout to docked widget\n const frontStageDef = UiFramework.frontstages.activeFrontstageDef;\n frontStageDef?.dockWidgetContainerByContainerId(childWindowId);\n }\n return true;\n };\n\n private adjustWindowLocation(location: ChildWindowLocationProps) {\n // If no location is provided, child window will open in the center of the current window.\n if (location.top === 0 && location.left === 0) {\n location.left =\n window.outerWidth / 2 + window.screenX - location.width / 2;\n location.top =\n window.outerHeight / 2 + window.screenY - location.height / 2;\n }\n }\n\n /**\n * Open a new child window.\n * @param childWindowId Id to assign to the newly created window.\n * @param title Title to display on the window.\n * @param content ReactNode to be rendered in the window.\n * @param location Position and size information\n * @param useDefaultPopoutUrl use \"/iTwinPopup.html\" as the window Url, \"\" otherwise.\n * @returns true if the window is opened successfully.\n */\n public open(\n childWindowId: string,\n title: string,\n content: React.ReactNode,\n location: ChildWindowLocationProps,\n useDefaultPopoutUrl?: boolean\n ) {\n if (\n this.openChildWindows.some(\n (openWindow) => openWindow.childWindowId === childWindowId\n )\n ) {\n return false;\n }\n\n this.adjustWindowLocation(location);\n const url = useDefaultPopoutUrl ? \"/iTwinPopup.html\" : \"\";\n const childWindow: ChildWindow | null = window.open(\n url,\n \"\",\n `width=${location.width},height=${location.height},left=${location.left},top=${location.top},menubar=no,resizable=yes,scrollbars=no,status=no,location=no`\n );\n if (!childWindow) return false;\n childWindow.expectedHeight = location.height;\n childWindow.expectedWidth = location.width;\n childWindow.deltaLeft = location.left - childWindow.screenLeft;\n childWindow.deltaTop = location.top - childWindow.screenTop;\n\n if (url.length === 0) {\n childWindow.document.write(childHtml);\n this.renderChildWindowContents(\n childWindow,\n childWindowId,\n content,\n title\n );\n } else {\n childWindow.addEventListener(\n \"DOMContentLoaded\",\n () => {\n this.renderChildWindowContents(\n childWindow,\n childWindowId,\n content,\n title\n );\n },\n false\n );\n }\n\n window.addEventListener(\n \"unload\",\n () => {\n const frontStageDef = UiFramework.frontstages.activeFrontstageDef;\n if (frontStageDef) {\n this.close(childWindowId, true);\n }\n },\n false\n );\n\n return true;\n }\n}\n"]}
1
+ {"version":3,"file":"InternalChildWindowManager.js","sourceRoot":"","sources":["../../../../src/appui-react/childwindow/InternalChildWindowManager.tsx"],"names":[],"mappings":";AAAA;;;gGAGgG;;;AAEhG;;GAEG;AAEH,+BAA+B;AAC/B,sCAAsC;AACtC,6CAAuC;AACvC,gDAA6C;AAC7C,gEAAkE;AAClE,qEAAmE;AACnE,2EAAyE;AAMzE,sEAAgE;AAChE,wDAAsD;AACtD,wDAAqD;AACrD,oEAAqE;AAErE,6CAA0C;AAC1C,6CAA2C;AAC3C,wFAAqF;AAErF,MAAM,SAAS,GAAG;;;;;;;;;;;;;;;;;;;;;QAqBV,CAAC;AAST;;;;KAIK;AACL,MAAa,0BAA0B;IAAvC;QACU,sBAAiB,GAA0B,EAAE,CAAC;QAE9C,WAAM,GAAqC,EAAE,CAAC;QAuLtD;;;;;WAKG;QACI,UAAK,GAAG,CAAC,aAAqB,EAAE,kBAAkB,GAAG,IAAI,EAAE,EAAE;YAClE,MAAM,WAAW,GAAG,IAAI,CAAC,gBAAgB,CAAC,SAAS,CACjD,CAAC,UAAU,EAAE,EAAE,CAAC,UAAU,CAAC,aAAa,KAAK,aAAa,CAC3D,CAAC;YACF,IAAI,WAAW,KAAK,CAAC,CAAC;gBAAE,OAAO,KAAK,CAAC;YACrC,MAAM,EAAE,mBAAmB,EAAE,GAAG,iCAAe,CAAC,QAAQ,EAAE,CAAC;YAC3D,mBAAmB,CAAC,UAAU,CAAC,EAAE,QAAQ,EAAE,aAAa,EAAE,CAAC,CAAC;YAE5D,MAAM,WAAW,GAAG,IAAI,CAAC,gBAAgB,CAAC,WAAW,CAAC,CAAC;YACvD,IAAI,CAAC,gBAAgB,CAAC,MAAM,CAAC,WAAW,EAAE,CAAC,CAAC,CAAC;YAC7C,IAAI,kBAAkB,EAAE,CAAC;gBACvB,WAAW,CAAC,MAAM,CAAC,KAAK,EAAE,CAAC;YAC7B,CAAC;iBAAM,CAAC;gBACN,wDAAwD;gBACxD,MAAM,aAAa,GAAG,yBAAW,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AC;gBAClB,IAAI,CAAC,KAAK,CAAC,aAAa,EAAE,IAAI,CAAC,CAAC;YAClC,CAAC;QACH,CAAC,EACD,KAAK,CACN,CAAC;QAEF,OAAO,IAAI,CAAC;IACd,CAAC;CACF;AAvSD,gEAuSC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n * See LICENSE.md in the project root for license terms and full copyright notice.\n *--------------------------------------------------------------------------------------------*/\n\n/** @packageDocumentation\n * @module ChildWindowManager\n */\n\nimport * as React from \"react\";\nimport * as ReactDOM from \"react-dom\";\nimport { Provider } from \"react-redux\";\nimport { UiFramework } from \"../UiFramework\";\nimport { CursorPopupMenu } from \"../cursor/cursormenu/CursorMenu\";\nimport { ModalDialogRenderer } from \"../dialog/ModalDialogManager\";\nimport { ModelessDialogRenderer } from \"../dialog/ModelessDialogManager\";\nimport type {\n ChildWindowLocationProps,\n FrameworkChildWindows,\n OpenChildWindowInfo,\n} from \"../framework/FrameworkChildWindows\";\nimport { TabIdContext } from \"../layout/widget/ContentRenderer\";\nimport { PopupRenderer } from \"../popup/PopupManager\";\nimport { ThemeManager } from \"../theme/ThemeManager\";\nimport { UiStateStorageHandler } from \"../uistate/useUiStateStorage\";\nimport type { ChildWindow } from \"./ChildWindowConfig\";\nimport { copyStyles } from \"./CopyStyles\";\nimport \"./InternalChildWindowManager.scss\";\nimport { usePopoutsStore } from \"../preview/reparent-popout-widgets/usePopoutsStore\";\n\nconst childHtml = `<!DOCTYPE html>\n<html>\n<head>\n <meta charset=\"utf-8\" />\n <style>\n html,\n body {\n height: 100%;\n width: 100%;\n margin: 0;\n overflow: hidden;\n }\n #root {\n height: 100%;\n }\n </style>\n</head>\n<body>\n <noscript>You need to enable JavaScript to run this app.</noscript>\n <div id=\"root\"></div>\n</body>\n</html>`;\n\n/**\n * Simplification of non exported CreateRoot parameter, only to be used\n * in InternalChildWindowManager and ChildWindowManager\n * @internal\n */\nexport type CreateRoot = Parameters<FrameworkChildWindows[\"useCreateRoot\"]>[0];\n\n/** Supports opening a child browser window from the main application window. The child window is managed by the main application\n * and is running in the same security context. The application must deliver the html file iTwinPopup.html along side its index.html.\n * See also: [Child Window Manager]($docs/learning/ui/appui-react/ChildWindows.md)\n * @internal\n * */\nexport class InternalChildWindowManager implements FrameworkChildWindows {\n private _openChildWindows: OpenChildWindowInfo[] = [];\n private _createRoot?: CreateRoot;\n private _roots: { [childwindowId: string]: any } = {};\n\n public get openChildWindows() {\n return this._openChildWindows;\n }\n\n /**\n * When using React 18, the `createRoot` function must be provided in order to render Popout content with React 18.\n * Do not call if using React 17 or before.\n *\n * Note: The type of the function is intentionally simplified here.\n *\n * @param createRootFn Function imported from `import { createRoot } from \"react-dom/client\";`\n * @beta Will be removed once the transition to React 18 is complete.\n */\n public useCreateRoot(createRootFn: CreateRoot): void {\n this._createRoot = createRootFn;\n }\n\n /**\n * Abstracts ReactDOM.render to use either the _createRoot method or the default ReactDOM.render.\n * @param element Element to render.\n * @param container Container to render to.\n */\n private render(\n element: React.FunctionComponentElement<any>,\n container: Element | DocumentFragment\n ) {\n // If createRoot is passed in for React 18 we have to render differently\n // than without it. React 17 vs React 18. We need to save the root to\n // unmount it.\n if (this._createRoot) {\n const childWindowId = UiFramework.childWindows.findId(\n container.ownerDocument.defaultView\n );\n if (childWindowId) {\n this._roots[childWindowId] = this._createRoot(container);\n this._roots[childWindowId].render(element);\n }\n } else {\n // eslint-disable-next-line react/no-deprecated, deprecation/deprecation\n ReactDOM.render(element, container);\n }\n }\n\n /**\n * Returns the OpenChildWindowInfo for the related id.\n * @param childWindowId Id of the window to retrieve.\n * @returns undefined if not found.\n */\n public find(\n childWindowId: string | undefined\n ): OpenChildWindowInfo | undefined {\n if (undefined === childWindowId) return undefined;\n\n return this.openChildWindows.find(\n (openWindow) => openWindow.childWindowId === childWindowId\n );\n }\n\n /**\n * Return the childWindowId of the provided window.\n * @param contentWindow Window element to identify\n * @returns undefined if not found\n */\n public findId(contentWindow: Window | undefined | null): string | undefined {\n if (!contentWindow) return undefined;\n\n const childWindow = this.openChildWindows.find(\n (openWindow) => openWindow.window === contentWindow\n );\n return childWindow?.childWindowId;\n }\n\n private renderChildWindowContents(\n childWindow: ChildWindow,\n childWindowId: string,\n content: React.ReactNode,\n title: string\n ) {\n childWindow.document.title = title;\n\n const reactConnectionDiv = childWindow.document.getElementById(\"root\");\n if (reactConnectionDiv && content && React.isValidElement(content)) {\n // set openChildWindows now so components can use it when they mount\n this._openChildWindows.push({\n childWindowId,\n window: childWindow,\n parentWindow: window,\n });\n let element: React.FunctionComponentElement<any>;\n if (content.props.widgetDef) {\n const tabId = content.props.widgetDef.id as string;\n element = (\n <Provider store={UiFramework.store}>\n <TabIdContext.Provider value={tabId}>\n <UiStateStorageHandler>\n <ThemeManager>\n <div className=\"uifw-child-window-container-host\">\n <PopupRenderer />\n <ModalDialogRenderer />\n <ModelessDialogRenderer />\n <CursorPopupMenu />\n <div className=\"uifw-child-window-container nz-widget-widget\">\n {content}\n </div>\n </div>\n </ThemeManager>\n </UiStateStorageHandler>\n </TabIdContext.Provider>\n </Provider>\n );\n } else {\n element = (\n <Provider store={UiFramework.store}>\n <UiStateStorageHandler>\n <ThemeManager>\n <div className=\"uifw-child-window-container-host\">\n <PopupRenderer />\n <ModalDialogRenderer />\n <ModelessDialogRenderer />\n <CursorPopupMenu />\n <div className=\"uifw-child-window-container nz-widget-widget\">\n {content}\n </div>\n </div>\n </ThemeManager>\n </UiStateStorageHandler>\n </Provider>\n );\n }\n\n setTimeout(() => {\n copyStyles(childWindow.document);\n setTimeout(() => {\n this.render(element, reactConnectionDiv);\n\n if (childWindow.expectedHeight && childWindow.expectedWidth) {\n childWindow.deltaWidth =\n childWindow.expectedWidth - childWindow.innerWidth;\n childWindow.deltaHeight =\n childWindow.expectedHeight - childWindow.innerHeight;\n }\n\n if (childWindow.expectedLeft && childWindow.expectedTop) {\n childWindow.deltaLeft =\n childWindow.expectedLeft - childWindow.screenLeft;\n childWindow.deltaTop =\n childWindow.expectedTop - childWindow.screenTop;\n }\n });\n });\n\n childWindow.addEventListener(\"pagehide\", () => {\n const frontStageDef = UiFramework.frontstages.activeFrontstageDef;\n if (!frontStageDef) return;\n frontStageDef.saveChildWindowSizeAndPosition(\n childWindowId,\n childWindow\n );\n\n // Trigger first so popout can be converted back to main window widget\n this.close(childWindowId, false);\n\n // UnmountComponentAtNode is deprecated in React 18, so if they are\n // using React 18 and passing in a createRoot function, unmount()\n // will be used\n if (this._roots[childWindowId]) {\n this._roots[childWindowId].unmount();\n // eslint-disable-next-line react/no-deprecated, deprecation/deprecation\n } else ReactDOM.unmountComponentAtNode(reactConnectionDiv);\n });\n }\n }\n\n /** Close all child/pop-out windows. This typically is called when the frontstage is changed. */\n public closeAll() {\n this.openChildWindows.forEach((openChildWindow) =>\n openChildWindow.window.close()\n );\n this._openChildWindows = [];\n }\n\n /**\n * Close a specific child window.\n * @param childWindowId Id of the window to close.\n * @param processWindowClose should the `close` method be called on the closing window. (defaults to true).\n * @returns false if the window could not be found.\n */\n public close = (childWindowId: string, processWindowClose = true) => {\n const windowIndex = this.openChildWindows.findIndex(\n (openWindow) => openWindow.childWindowId === childWindowId\n );\n if (windowIndex === -1) return false;\n const { onClosePopoutWidget } = usePopoutsStore.getState();\n onClosePopoutWidget.raiseEvent({ windowId: childWindowId });\n\n const childWindow = this.openChildWindows[windowIndex];\n this.openChildWindows.splice(windowIndex, 1);\n if (processWindowClose) {\n childWindow.window.close();\n } else {\n // call the following to convert popout to docked widget\n const frontStageDef = UiFramework.frontstages.activeFrontstageDef;\n frontStageDef?.dockWidgetContainerByContainerId(childWindowId);\n }\n return true;\n };\n\n private adjustWindowLocation(location: ChildWindowLocationProps) {\n // If no location is provided, child window will open in the center of the current window.\n if (location.top === 0 && location.left === 0) {\n location.left =\n window.outerWidth / 2 + window.screenX - location.width / 2;\n location.top =\n window.outerHeight / 2 + window.screenY - location.height / 2;\n }\n }\n\n /**\n * Open a new child window.\n * @param childWindowId Id to assign to the newly created window.\n * @param title Title to display on the window.\n * @param content ReactNode to be rendered in the window.\n * @param location Position and size information\n * @param useDefaultPopoutUrl use \"/iTwinPopup.html\" as the window Url, \"\" otherwise.\n * @returns true if the window is opened successfully.\n */\n public open(\n childWindowId: string,\n title: string,\n content: React.ReactNode,\n location: ChildWindowLocationProps,\n useDefaultPopoutUrl?: boolean\n ) {\n if (\n this.openChildWindows.some(\n (openWindow) => openWindow.childWindowId === childWindowId\n )\n ) {\n return false;\n }\n\n this.adjustWindowLocation(location);\n const url = useDefaultPopoutUrl ? \"/iTwinPopup.html\" : \"\";\n const childWindow: ChildWindow | null = window.open(\n url,\n \"\",\n `width=${location.width},height=${location.height},left=${location.left},top=${location.top},menubar=no,resizable=yes,scrollbars=no,status=no,location=no`\n );\n if (!childWindow) return false;\n childWindow.expectedHeight = location.height;\n childWindow.expectedWidth = location.width;\n childWindow.expectedLeft = location.left;\n childWindow.expectedTop = location.top;\n\n if (url.length === 0) {\n childWindow.document.write(childHtml);\n this.renderChildWindowContents(\n childWindow,\n childWindowId,\n content,\n title\n );\n } else {\n childWindow.addEventListener(\n \"DOMContentLoaded\",\n () => {\n this.renderChildWindowContents(\n childWindow,\n childWindowId,\n content,\n title\n );\n },\n false\n );\n }\n\n window.addEventListener(\n \"unload\",\n () => {\n const frontStageDef = UiFramework.frontstages.activeFrontstageDef;\n if (frontStageDef) {\n this.close(childWindowId, true);\n }\n },\n false\n );\n\n return true;\n }\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"ConfigurableUiContent.d.ts","sourceRoot":"","sources":["../../../../src/appui-react/configurableui/ConfigurableUiContent.tsx"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,8BAA8B,CAAC;AACtC,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAqBrD;;GAEG;AACH,MAAM,WAAW,0BAA2B,SAAQ,WAAW;IAC7D,kCAAkC;IAClC,YAAY,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAE/B,gBAAgB;IAChB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,gBAAgB;IAChB,eAAe,CAAC,EAAE,MAAM,CAAC;CAC1B;AAED;;;GAGG;AACH,eAAO,MAAM,cAAc,4BAAkD,CAAC;AAE9E;;GAEG;AACH,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,0BAA0B,qBA6DtE"}
1
+ {"version":3,"file":"ConfigurableUiContent.d.ts","sourceRoot":"","sources":["../../../../src/appui-react/configurableui/ConfigurableUiContent.tsx"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,8BAA8B,CAAC;AACtC,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAqBrD;;GAEG;AACH,MAAM,WAAW,0BAA2B,SAAQ,WAAW;IAC7D,kCAAkC;IAClC,YAAY,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAE/B,gBAAgB;IAChB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,gBAAgB;IAChB,eAAe,CAAC,EAAE,MAAM,CAAC;CAC1B;AAED;;;GAGG;AACH,eAAO,MAAM,cAAc,4BAAkD,CAAC;AAE9E;;GAEG;AACH,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,0BAA0B,qBA0DtE"}
@@ -36,7 +36,7 @@ exports.WrapperContext = React.createContext(document.body);
36
36
  * @public
37
37
  */
38
38
  function ConfigurableUiContent(props) {
39
- const [mainElement, setMainElement] = React.useState(null);
39
+ const [mainElement, setMainElement] = React.useState();
40
40
  const [portalContainer, setPortalContainer] = React.useState();
41
41
  React.useEffect(() => {
42
42
  UiFramework_1.UiFramework.keyboardShortcuts.setFocusToHome();
@@ -54,14 +54,11 @@ function ConfigurableUiContent(props) {
54
54
  const point = new core_react_1.Point(e.pageX, e.pageY);
55
55
  CursorInformation_1.CursorInformation.handleMouseMove(point);
56
56
  }, []);
57
- return (React.createElement("main", { role: "main", id: "uifw-configurableui-wrapper", className: props.className, style: props.style, onMouseMove: handleMouseMove, ref: setMainElement },
58
- React.createElement(exports.WrapperContext.Provider, { value: mainElement },
57
+ return (React.createElement("main", { role: "main", id: "uifw-configurableui-wrapper", className: props.className, style: props.style, onMouseMove: handleMouseMove, ref: (el) => setMainElement(el ?? undefined) },
58
+ React.createElement(exports.WrapperContext.Provider, { value: mainElement ?? document.body },
59
59
  React.createElement(itwinui_react_1.ThemeProvider, { style: { height: "100%" }, portalContainer: portalContainer },
60
60
  props.appBackstage,
61
61
  React.createElement(Frontstage_1.WidgetPanelsFrontstage, null),
62
- React.createElement(ContentDialogManager_1.ContentDialogRenderer, null),
63
- React.createElement(ModelessDialogManager_1.ModelessDialogRenderer, null),
64
- React.createElement(ModalDialogManager_1.ModalDialogRenderer, null),
65
62
  React.createElement(ElementTooltip_1.ElementTooltip, null),
66
63
  React.createElement(Pointer_1.PointerMessage, null),
67
64
  React.createElement(KeyboardShortcutMenu_1.KeyboardShortcutMenu, null),
@@ -69,8 +66,11 @@ function ConfigurableUiContent(props) {
69
66
  React.createElement(CursorMenu_1.CursorPopupMenu, null),
70
67
  React.createElement(CursorPopupManager_1.CursorPopupRenderer, null),
71
68
  React.createElement(PopupManager_1.PopupRenderer, null),
72
- React.createElement(MessageRenderer_1.MessageRenderer, null))),
73
- React.createElement("div", { className: "uifw-configurableui-portalContainer", ref: (instance) => setPortalContainer(instance ?? undefined) })));
69
+ React.createElement(MessageRenderer_1.MessageRenderer, null),
70
+ React.createElement("div", { className: "uifw-configurableui-portalContainer", ref: (instance) => setPortalContainer(instance ?? undefined) },
71
+ React.createElement(ContentDialogManager_1.ContentDialogRenderer, null),
72
+ React.createElement(ModelessDialogManager_1.ModelessDialogRenderer, null),
73
+ React.createElement(ModalDialogManager_1.ModalDialogRenderer, null))))));
74
74
  }
75
75
  exports.ConfigurableUiContent = ConfigurableUiContent;
76
76
  //# sourceMappingURL=ConfigurableUiContent.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"ConfigurableUiContent.js","sourceRoot":"","sources":["../../../../src/appui-react/configurableui/ConfigurableUiContent.tsx"],"names":[],"mappings":";AAAA;;;gGAGgG;AAChG;;GAEG;;;AAEH,wCAAsC;AACtC,+BAA+B;AAE/B,kDAA0C;AAC1C,wDAAqD;AACrD,mEAAgE;AAChE,gEAAkE;AAClE,iFAA+E;AAC/E,qEAAmE;AACnE,2EAAyE;AACzE,+DAA4D;AAC5D,mFAAgF;AAChF,uDAA2D;AAC3D,iDAAqD;AACrD,wDAAsD;AACtD,4DAAqE;AACrE,yEAAuE;AACvE,gDAA6C;AAC7C,mFAAgF;AAChF,iEAA8D;AAiB9D;;;GAGG;AACU,QAAA,cAAc,GAAG,KAAK,CAAC,aAAa,CAAc,QAAQ,CAAC,IAAI,CAAC,CAAC;AAE9E;;GAEG;AACH,SAAgB,qBAAqB,CAAC,KAAiC;IACrE,MAAM,CAAC,WAAW,EAAE,cAAc,CAAC,GAAG,KAAK,CAAC,QAAQ,CAClD,IAAI,CACL,CAAC;IACF,MAAM,CAAC,eAAe,EAAE,kBAAkB,CAAC,GAAG,KAAK,CAAC,QAAQ,EAEzD,CAAC;IACJ,KAAK,CAAC,SAAS,CAAC,GAAG,EAAE;QACnB,yBAAW,CAAC,iBAAiB,CAAC,cAAc,EAAE,CAAC;IACjD,CAAC,EAAE,EAAE,CAAC,CAAC;IAEP,KAAK,CAAC,SAAS,CAAC,GAAG,EAAE;QACnB,6DAA6B,CAAC,eAAe,CAAC,UAAU,CAAC;YACvD,WAAW,EAAE,KAAK,CAAC,WAAW;YAC9B,eAAe,EAAE,KAAK,CAAC,eAAe;SACvC,CAAC,CAAC;QACH,OAAO,GAAG,EAAE;YACV,6DAA6B,CAAC,eAAe,CAAC,SAAS,EAAE,CAAC;QAC5D,CAAC,CAAC;IACJ,CAAC,EAAE,CAAC,KAAK,CAAC,WAAW,EAAE,KAAK,CAAC,eAAe,CAAC,CAAC,CAAC;IAE/C,MAAM,eAAe,GAAG,KAAK,CAAC,WAAW,CAAC,CAAC,CAAmB,EAAE,EAAE;QAChE,MAAM,KAAK,GAAG,IAAI,kBAAK,CAAC,CAAC,CAAC,KAAK,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC;QAC1C,qCAAiB,CAAC,eAAe,CAAC,KAAK,CAAC,CAAC;IAC3C,CAAC,EAAE,EAAE,CAAC,CAAC;IAEP,OAAO,CACL,8BACE,IAAI,EAAC,MAAM,EACX,EAAE,EAAC,6BAA6B,EAChC,SAAS,EAAE,KAAK,CAAC,SAAS,EAC1B,KAAK,EAAE,KAAK,CAAC,KAAK,EAClB,WAAW,EAAE,eAAe,EAC5B,GAAG,EAAE,cAAc;QAEnB,oBAAC,sBAAc,CAAC,QAAQ,IAAC,KAAK,EAAE,WAAY;YAC1C,oBAAC,6BAAa,IACZ,KAAK,EAAE,EAAE,MAAM,EAAE,MAAM,EAAE,EACzB,eAAe,EAAE,eAAe;gBAE/B,KAAK,CAAC,YAAY;gBACnB,oBAAC,mCAAsB,OAAG;gBAC1B,oBAAC,4CAAqB,OAAG;gBACzB,oBAAC,8CAAsB,OAAG;gBAC1B,oBAAC,wCAAmB,OAAG;gBACvB,oBAAC,+BAAc,OAAG;gBAClB,oBAAC,wBAAc,OAAG;gBAClB,oBAAC,2CAAoB,OAAG;gBACxB,oBAAC,8BAAiB,OAAG;gBACrB,oBAAC,4BAAe,OAAG;gBACnB,oBAAC,wCAAmB,OAAG;gBACvB,oBAAC,4BAAa,OAAG;gBACjB,oBAAC,iCAAe,OAAG,CACL,CACQ;QAC1B,6BACE,SAAS,EAAC,qCAAqC,EAC/C,GAAG,EAAE,CAAC,QAAQ,EAAE,EAAE,CAAC,kBAAkB,CAAC,QAAQ,IAAI,SAAS,CAAC,GAC5D,CACG,CACR,CAAC;AACJ,CAAC;AA7DD,sDA6DC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n * See LICENSE.md in the project root for license terms and full copyright notice.\n *--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module ConfigurableUi\n */\n\nimport \"./ConfigurableUiContent.scss\";\nimport * as React from \"react\";\nimport type { CommonProps } from \"@itwin/core-react\";\nimport { Point } from \"@itwin/core-react\";\nimport { ThemeProvider } from \"@itwin/itwinui-react\";\nimport { CursorInformation } from \"../cursor/CursorInformation\";\nimport { CursorPopupMenu } from \"../cursor/cursormenu/CursorMenu\";\nimport { CursorPopupRenderer } from \"../cursor/cursorpopup/CursorPopupManager\";\nimport { ModalDialogRenderer } from \"../dialog/ModalDialogManager\";\nimport { ModelessDialogRenderer } from \"../dialog/ModelessDialogManager\";\nimport { ElementTooltip } from \"../feedback/ElementTooltip\";\nimport { KeyboardShortcutMenu } from \"../keyboardshortcut/KeyboardShortcutMenu\";\nimport { InputFieldMessage } from \"../messages/InputField\";\nimport { PointerMessage } from \"../messages/Pointer\";\nimport { PopupRenderer } from \"../popup/PopupManager\";\nimport { WidgetPanelsFrontstage } from \"../widget-panels/Frontstage\";\nimport { ContentDialogRenderer } from \"../dialog/ContentDialogManager\";\nimport { UiFramework } from \"../UiFramework\";\nimport { InternalConfigurableUiManager } from \"./InternalConfigurableUiManager\";\nimport { MessageRenderer } from \"../messages/MessageRenderer\";\n\n// cSpell:ignore cursormenu cursorpopup\n\n/** Properties for [[ConfigurableUiContent]]\n * @public\n */\nexport interface ConfigurableUiContentProps extends CommonProps {\n /** React node of the Backstage */\n appBackstage?: React.ReactNode;\n\n /** @internal */\n idleTimeout?: number;\n /** @internal */\n intervalTimeout?: number;\n}\n\n/**\n * Allows children to get the bounds or other properties of the wrapper element.\n * @internal\n */\nexport const WrapperContext = React.createContext<HTMLElement>(document.body);\n\n/** The ConfigurableUiContent component is the component the pages specified using ConfigurableUi\n * @public\n */\nexport function ConfigurableUiContent(props: ConfigurableUiContentProps) {\n const [mainElement, setMainElement] = React.useState<HTMLElement | null>(\n null\n );\n const [portalContainer, setPortalContainer] = React.useState<\n HTMLElement | undefined\n >();\n React.useEffect(() => {\n UiFramework.keyboardShortcuts.setFocusToHome();\n }, []);\n\n React.useEffect(() => {\n InternalConfigurableUiManager.activityTracker.initialize({\n idleTimeout: props.idleTimeout,\n intervalTimeout: props.intervalTimeout,\n });\n return () => {\n InternalConfigurableUiManager.activityTracker.terminate();\n };\n }, [props.idleTimeout, props.intervalTimeout]);\n\n const handleMouseMove = React.useCallback((e: React.MouseEvent) => {\n const point = new Point(e.pageX, e.pageY);\n CursorInformation.handleMouseMove(point);\n }, []);\n\n return (\n <main\n role=\"main\"\n id=\"uifw-configurableui-wrapper\"\n className={props.className}\n style={props.style}\n onMouseMove={handleMouseMove}\n ref={setMainElement}\n >\n <WrapperContext.Provider value={mainElement!}>\n <ThemeProvider\n style={{ height: \"100%\" }}\n portalContainer={portalContainer}\n >\n {props.appBackstage}\n <WidgetPanelsFrontstage />\n <ContentDialogRenderer />\n <ModelessDialogRenderer />\n <ModalDialogRenderer />\n <ElementTooltip />\n <PointerMessage />\n <KeyboardShortcutMenu />\n <InputFieldMessage />\n <CursorPopupMenu />\n <CursorPopupRenderer />\n <PopupRenderer />\n <MessageRenderer />\n </ThemeProvider>\n </WrapperContext.Provider>\n <div\n className=\"uifw-configurableui-portalContainer\"\n ref={(instance) => setPortalContainer(instance ?? undefined)}\n />\n </main>\n );\n}\n"]}
1
+ {"version":3,"file":"ConfigurableUiContent.js","sourceRoot":"","sources":["../../../../src/appui-react/configurableui/ConfigurableUiContent.tsx"],"names":[],"mappings":";AAAA;;;gGAGgG;AAChG;;GAEG;;;AAEH,wCAAsC;AACtC,+BAA+B;AAE/B,kDAA0C;AAC1C,wDAAqD;AACrD,mEAAgE;AAChE,gEAAkE;AAClE,iFAA+E;AAC/E,qEAAmE;AACnE,2EAAyE;AACzE,+DAA4D;AAC5D,mFAAgF;AAChF,uDAA2D;AAC3D,iDAAqD;AACrD,wDAAsD;AACtD,4DAAqE;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AAK,CAAC,KAAK,EAClB,WAAW,EAAE,eAAe,EAC5B,GAAG,EAAE,CAAC,EAAE,EAAE,EAAE,CAAC,cAAc,CAAC,EAAE,IAAI,SAAS,CAAC;QAE5C,oBAAC,sBAAc,CAAC,QAAQ,IAAC,KAAK,EAAE,WAAW,IAAI,QAAQ,CAAC,IAAI;YAC1D,oBAAC,6BAAa,IACZ,KAAK,EAAE,EAAE,MAAM,EAAE,MAAM,EAAE,EACzB,eAAe,EAAE,eAAe;gBAE/B,KAAK,CAAC,YAAY;gBACnB,oBAAC,mCAAsB,OAAG;gBAC1B,oBAAC,+BAAc,OAAG;gBAClB,oBAAC,wBAAc,OAAG;gBAClB,oBAAC,2CAAoB,OAAG;gBACxB,oBAAC,8BAAiB,OAAG;gBACrB,oBAAC,4BAAe,OAAG;gBACnB,oBAAC,wCAAmB,OAAG;gBACvB,oBAAC,4BAAa,OAAG;gBACjB,oBAAC,iCAAe,OAAG;gBACnB,6BACE,SAAS,EAAC,qCAAqC,EAC/C,GAAG,EAAE,CAAC,QAAQ,EAAE,EAAE,CAAC,kBAAkB,CAAC,QAAQ,IAAI,SAAS,CAAC;oBAE5D,oBAAC,4CAAqB,OAAG;oBACzB,oBAAC,8CAAsB,OAAG;oBAC1B,oBAAC,wCAAmB,OAAG,CACnB,CACQ,CACQ,CACrB,CACR,CAAC;AACJ,CAAC;AA1DD,sDA0DC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n * See LICENSE.md in the project root for license terms and full copyright notice.\n *--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module ConfigurableUi\n */\n\nimport \"./ConfigurableUiContent.scss\";\nimport * as React from \"react\";\nimport type { CommonProps } from \"@itwin/core-react\";\nimport { Point } from \"@itwin/core-react\";\nimport { ThemeProvider } from \"@itwin/itwinui-react\";\nimport { CursorInformation } from \"../cursor/CursorInformation\";\nimport { CursorPopupMenu } from \"../cursor/cursormenu/CursorMenu\";\nimport { CursorPopupRenderer } from \"../cursor/cursorpopup/CursorPopupManager\";\nimport { ModalDialogRenderer } from \"../dialog/ModalDialogManager\";\nimport { ModelessDialogRenderer } from \"../dialog/ModelessDialogManager\";\nimport { ElementTooltip } from \"../feedback/ElementTooltip\";\nimport { KeyboardShortcutMenu } from \"../keyboardshortcut/KeyboardShortcutMenu\";\nimport { InputFieldMessage } from \"../messages/InputField\";\nimport { PointerMessage } from \"../messages/Pointer\";\nimport { PopupRenderer } from \"../popup/PopupManager\";\nimport { WidgetPanelsFrontstage } from \"../widget-panels/Frontstage\";\nimport { ContentDialogRenderer } from \"../dialog/ContentDialogManager\";\nimport { UiFramework } from \"../UiFramework\";\nimport { InternalConfigurableUiManager } from \"./InternalConfigurableUiManager\";\nimport { MessageRenderer } from \"../messages/MessageRenderer\";\n\n// cSpell:ignore cursormenu cursorpopup\n\n/** Properties for [[ConfigurableUiContent]]\n * @public\n */\nexport interface ConfigurableUiContentProps extends CommonProps {\n /** React node of the Backstage */\n appBackstage?: React.ReactNode;\n\n /** @internal */\n idleTimeout?: number;\n /** @internal */\n intervalTimeout?: number;\n}\n\n/**\n * Allows children to get the bounds or other properties of the wrapper element.\n * @internal\n */\nexport const WrapperContext = React.createContext<HTMLElement>(document.body);\n\n/** The ConfigurableUiContent component is the component the pages specified using ConfigurableUi\n * @public\n */\nexport function ConfigurableUiContent(props: ConfigurableUiContentProps) {\n const [mainElement, setMainElement] = React.useState<HTMLElement>();\n const [portalContainer, setPortalContainer] = React.useState<HTMLElement>();\n React.useEffect(() => {\n UiFramework.keyboardShortcuts.setFocusToHome();\n }, []);\n\n React.useEffect(() => {\n InternalConfigurableUiManager.activityTracker.initialize({\n idleTimeout: props.idleTimeout,\n intervalTimeout: props.intervalTimeout,\n });\n return () => {\n InternalConfigurableUiManager.activityTracker.terminate();\n };\n }, [props.idleTimeout, props.intervalTimeout]);\n\n const handleMouseMove = React.useCallback((e: React.MouseEvent) => {\n const point = new Point(e.pageX, e.pageY);\n CursorInformation.handleMouseMove(point);\n }, []);\n\n return (\n <main\n role=\"main\"\n id=\"uifw-configurableui-wrapper\"\n className={props.className}\n style={props.style}\n onMouseMove={handleMouseMove}\n ref={(el) => setMainElement(el ?? undefined)}\n >\n <WrapperContext.Provider value={mainElement ?? document.body}>\n <ThemeProvider\n style={{ height: \"100%\" }}\n portalContainer={portalContainer}\n >\n {props.appBackstage}\n <WidgetPanelsFrontstage />\n <ElementTooltip />\n <PointerMessage />\n <KeyboardShortcutMenu />\n <InputFieldMessage />\n <CursorPopupMenu />\n <CursorPopupRenderer />\n <PopupRenderer />\n <MessageRenderer />\n <div\n className=\"uifw-configurableui-portalContainer\"\n ref={(instance) => setPortalContainer(instance ?? undefined)}\n >\n <ContentDialogRenderer />\n <ModelessDialogRenderer />\n <ModalDialogRenderer />\n </div>\n </ThemeProvider>\n </WrapperContext.Provider>\n </main>\n );\n}\n"]}
@@ -1,6 +1,7 @@
1
1
  /** @packageDocumentation
2
2
  * @module Dialog
3
3
  */
4
+ import "./DialogManagerBase.scss";
4
5
  import * as React from "react";
5
6
  import type { BeUiEvent } from "@itwin/core-bentley";
6
7
  import { UiEvent } from "@itwin/appui-abstract";
@@ -68,9 +69,9 @@ export interface DialogRendererProps {
68
69
  dialogManager: DialogManagerBase;
69
70
  style?: React.CSSProperties;
70
71
  }
71
- /** @internal */
72
72
  interface DialogRendererState {
73
- parentDocument: Document | null;
73
+ parentDocument: Document | undefined;
74
+ renderer: HTMLElement | undefined;
74
75
  }
75
76
  /** DialogRenderer React component.
76
77
  * @internal
@@ -1 +1 @@
1
- {"version":3,"file":"DialogManagerBase.d.ts","sourceRoot":"","sources":["../../../../src/appui-react/dialog/DialogManagerBase.tsx"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAErD,OAAO,EAAE,OAAO,EAAE,MAAM,uBAAuB,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IAC3B,cAAc,EAAE,QAAQ,GAAG,SAAS,CAAC;IACrC,QAAQ,EAAE,WAAW,GAAG,SAAS,CAAC;CACnC;AACD;;GAEG;AACH,qBAAa,kBAAmB,SAAQ,KAAK,CAAC,aAAa,CACzD,mBAAmB,EACnB,mBAAmB,CACpB;IACC,gBAAgB;IAChB,SAAyB,KAAK,EAAE,mBAAmB,CAGjD;IAEF,OAAO,CAAC,aAAa,CAKnB;IAEc,MAAM,IAAI,KAAK,CAAC,SAAS;IA0BzB,iBAAiB,IAAI,IAAI;IAMzB,oBAAoB,IAAI,IAAI;IAO5C,OAAO,CAAC,yBAAyB,CAE/B;CACH"}
@@ -8,11 +8,13 @@
8
8
  */
9
9
  Object.defineProperty(exports, "__esModule", { value: true });
10
10
  exports.DialogRendererBase = exports.DialogManagerBase = exports.DialogChangedEvent = void 0;
11
+ require("./DialogManagerBase.scss");
11
12
  const React = require("react");
12
13
  const core_bentley_1 = require("@itwin/core-bentley");
13
14
  const appui_abstract_1 = require("@itwin/appui-abstract");
14
15
  const UiFramework_1 = require("../UiFramework");
15
16
  const core_react_1 = require("@itwin/core-react");
17
+ const itwinui_react_1 = require("@itwin/itwinui-react");
16
18
  /** Dialog Changed Event class.
17
19
  * @public
18
20
  * @deprecated in 4.13.x. This class should not be used by applications to instantiate objects.
@@ -125,10 +127,14 @@ class DialogRendererBase extends React.PureComponent {
125
127
  super(...arguments);
126
128
  /** @internal */
127
129
  this.state = {
128
- parentDocument: null,
130
+ parentDocument: undefined,
131
+ renderer: undefined,
129
132
  };
130
- this._handleRefSet = (popupDiv) => {
131
- this.setState({ parentDocument: popupDiv?.ownerDocument ?? null });
133
+ this._handleRefSet = (el) => {
134
+ this.setState({
135
+ parentDocument: el?.ownerDocument ?? undefined,
136
+ renderer: el ?? undefined,
137
+ });
132
138
  };
133
139
  // eslint-disable-next-line deprecation/deprecation
134
140
  this._handleDialogChangedEvent = (_args) => {
@@ -138,12 +144,13 @@ class DialogRendererBase extends React.PureComponent {
138
144
  render() {
139
145
  if (this.props.dialogManager.dialogCount <= 0)
140
146
  return null;
141
- return (React.createElement("div", { className: "appui-react-dialog-render-container", ref: this._handleRefSet }, this.state.parentDocument &&
142
- this.props.dialogManager.dialogs
143
- .filter((info) => info.parentDocument === this.state.parentDocument)
144
- .map((dialogInfo) => {
145
- return (React.createElement(React.Fragment, { key: dialogInfo.id }, dialogInfo.reactNode));
146
- })));
147
+ return (React.createElement("div", { className: "uifw-dialog-dialogManagerBase_renderer", ref: this._handleRefSet },
148
+ React.createElement(itwinui_react_1.ThemeProvider, { portalContainer: this.state.renderer }, this.state.parentDocument &&
149
+ this.props.dialogManager.dialogs
150
+ .filter((info) => info.parentDocument === this.state.parentDocument)
151
+ .map((info) => {
152
+ return (React.createElement(React.Fragment, { key: info.id }, info.reactNode));
153
+ }))));
147
154
  }
148
155
  componentDidMount() {
149
156
  this.props.dialogManager.onDialogChangedEvent.addListener(this._handleDialogChangedEvent);
@@ -1 +1 @@
1
- {"version":3,"file":"DialogManagerBase.js","sourceRoot":"","sources":["../../../../src/appui-react/dialog/DialogManagerBase.tsx"],"names":[],"mappings":";AAAA;;;gGAGgG;AAChG;;GAEG;;;AAEH,+BAA+B;AAE/B,sDAA6C;AAC7C,0DAAgD;AAChD,gDAA6C;AAC7C,kDAA2D;AAW3D;;;GAGG;AACH,mDAAmD;AACnD,MAAa,kBAAmB,SAAQ,wBAA+B;CAAG;AAA1E,gDAA0E;AAW1E,+DAA+D;AAC/D,MAAM,cAAc,GAAG,KAAK,CAAC;AAE7B;;GAEG;AACH,MAAa,iBAAiB;IAO5B,mDAAmD;IACnD,YAAY,oBAAuD;QAN3D,aAAQ,GAAiB,IAAI,KAAK,EAAc,CAAC;QAOvD,IAAI,CAAC,qBAAqB,GAAG,oBAAoB,CAAC;IACpD,CAAC;IAED,6CAA6C;IACtC,MAAM,CAAC,UAAU;QACtB,iBAAiB,CAAC,UAAU,GAAG,iBAAiB,CAAC,sBAAsB,EAAE,CAAC;IAC5E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;IAEe,oBAAoB;QAClC,IAAI,CAAC,KAAK,CAAC,aAAa,CAAC,oBAAoB,CAAC,cAAc,CAC1D,IAAI,CAAC,yBAAyB,CAC/B,CAAC;IACJ,CAAC;CAMF;AAnDD,gDAmDC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n * See LICENSE.md in the project root for license terms and full copyright notice.\n *--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module Dialog\n */\n\nimport * as React from \"react\";\nimport type { BeUiEvent } from \"@itwin/core-bentley\";\nimport { Logger } from \"@itwin/core-bentley\";\nimport { UiEvent } from \"@itwin/appui-abstract\";\nimport { UiFramework } from \"../UiFramework\";\nimport { getCssVariableAsNumber } from \"@itwin/core-react\";\n\n/** Dialog Stack Changed Event Args class.\n * @public\n * @deprecated in 4.13.x. Event args are inferred from a listener. If explicit type is needed use a type helper.\n */\nexport interface DialogChangedEventArgs {\n dialogCount: number;\n activeDialog: React.ReactNode | undefined;\n}\n\n/** Dialog Changed Event class.\n * @public\n * @deprecated in 4.13.x. This class should not be used by applications to instantiate objects.\n */\n// eslint-disable-next-line deprecation/deprecation\nexport class DialogChangedEvent extends UiEvent<DialogChangedEventArgs> {}\n\n/** Information maintained by a Dialog Manager about a dialog\n * @public\n */\nexport interface DialogInfo {\n reactNode: React.ReactNode;\n id: string;\n parentDocument: Document;\n}\n\n/** Used if the 'dialog' z-index CSS variable cannot be read */\nconst ZINDEX_DEFAULT = 12000;\n\n/** Dialog Manager class.\n * @internal\n */\nexport class DialogManagerBase {\n private static _sId = 0;\n private _dialogs: DialogInfo[] = new Array<DialogInfo>();\n // eslint-disable-next-line deprecation/deprecation\n private _onDialogChangedEvent: BeUiEvent<DialogChangedEventArgs>;\n private static _topZIndex = ZINDEX_DEFAULT;\n\n // eslint-disable-next-line deprecation/deprecation\n constructor(onDialogChangedEvent: BeUiEvent<DialogChangedEventArgs>) {\n this._onDialogChangedEvent = onDialogChangedEvent;\n }\n\n /** Initialize the modeless dialog manager */\n public static initialize(): void {\n DialogManagerBase._topZIndex = DialogManagerBase.getDialogZIndexDefault();\n }\n\n public static get topZIndex(): number {\n return DialogManagerBase._topZIndex;\n }\n\n public static set topZIndex(zIndex: number) {\n DialogManagerBase._topZIndex = zIndex;\n }\n public get dialogs() {\n return this._dialogs;\n }\n\n // eslint-disable-next-line deprecation/deprecation\n public get onDialogChangedEvent(): BeUiEvent<DialogChangedEventArgs> {\n return this._onDialogChangedEvent;\n }\n\n public static getDialogZIndexDefault(): number {\n const variable = \"--uicore-z-index-dialog\";\n const value = getCssVariableAsNumber(variable);\n\n if (!isNaN(value)) return value;\n\n Logger.logError(\n UiFramework.loggerCategory(this),\n `'${variable}' CSS variable not found`\n );\n return ZINDEX_DEFAULT;\n }\n\n /**\n * Triggers opening a dialog.\n * @param dialog Dialog React component.\n * @param id The unique Id the identifies the dialog.\n * @param parentDocument Optional document required when displaying a dialog in a child popup window.\n */\n public openDialog(\n dialog: React.ReactNode,\n id?: string,\n parentDocument?: Document\n ): void {\n if (!id) id = `Dialog-${++DialogManagerBase._sId}`;\n\n const owningDoc = parentDocument ?? document;\n this.pushDialog({ reactNode: dialog, id, parentDocument: owningDoc });\n }\n\n /** @internal */\n public pushDialog(dialogInfo: DialogInfo): void {\n this._dialogs.push(dialogInfo);\n this.emitDialogChangedEvent();\n }\n\n public closeDialog(dialog?: React.ReactNode): void {\n let targetDialog = dialog;\n if (!dialog) targetDialog = this.activeDialog;\n\n this.removeDialog(targetDialog);\n this.emitDialogChangedEvent();\n }\n\n /** @internal */\n public closeAll(): void {\n this._dialogs = [];\n this.emitDialogChangedEvent();\n }\n\n /** @internal */\n public removeDialog(dialog: React.ReactNode): void {\n const index = this._dialogs.findIndex((dialogInfo: DialogInfo) => {\n return dialog === dialogInfo.reactNode;\n });\n if (index >= 0) this._dialogs.splice(index, 1);\n if (this._dialogs.length < 1)\n DialogManagerBase.topZIndex = DialogManagerBase.getDialogZIndexDefault();\n }\n\n public emitDialogChangedEvent(): void {\n this._onDialogChangedEvent.emit({\n dialogCount: this.dialogCount,\n activeDialog: this.activeDialog,\n });\n }\n\n public update(): void {\n this.emitDialogChangedEvent();\n }\n\n public get activeDialog(): React.ReactNode | undefined {\n if (this._dialogs.length > 0)\n return this._dialogs[this._dialogs.length - 1].reactNode;\n\n return undefined;\n }\n\n public get dialogCount(): number {\n return this._dialogs.length;\n }\n}\n\n/** Properties for the [[DialogRendererBase]] component\n * @internal\n */\nexport interface DialogRendererProps {\n dialogManager: DialogManagerBase;\n style?: React.CSSProperties;\n}\n\n/** @internal */\ninterface DialogRendererState {\n parentDocument: Document | null;\n}\n/** DialogRenderer React component.\n * @internal\n */\nexport class DialogRendererBase extends React.PureComponent<\n DialogRendererProps,\n DialogRendererState\n> {\n /** @internal */\n public override readonly state: DialogRendererState = {\n parentDocument: null,\n };\n\n private _handleRefSet = (popupDiv: HTMLElement | null) => {\n this.setState({ parentDocument: popupDiv?.ownerDocument ?? null });\n };\n\n public override render(): React.ReactNode {\n if (this.props.dialogManager.dialogCount <= 0) return null;\n\n return (\n <div\n className=\"appui-react-dialog-render-container\"\n ref={this._handleRefSet}\n >\n {this.state.parentDocument &&\n this.props.dialogManager.dialogs\n .filter((info) => info.parentDocument === this.state.parentDocument)\n .map((dialogInfo: DialogInfo) => {\n return (\n <React.Fragment key={dialogInfo.id}>\n {dialogInfo.reactNode}\n </React.Fragment>\n );\n })}\n </div>\n );\n }\n\n public override componentDidMount(): void {\n this.props.dialogManager.onDialogChangedEvent.addListener(\n this._handleDialogChangedEvent\n );\n }\n\n public override componentWillUnmount(): void {\n this.props.dialogManager.onDialogChangedEvent.removeListener(\n this._handleDialogChangedEvent\n );\n }\n\n // eslint-disable-next-line deprecation/deprecation\n private _handleDialogChangedEvent = (_args: DialogChangedEventArgs) => {\n this.forceUpdate();\n };\n}\n"]}
1
+ {"version":3,"file":"DialogManagerBase.js","sourceRoot":"","sources":["../../../../src/appui-react/dialog/DialogManag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I,CAAC;YAAE,OAAO,IAAI,CAAC;QAE3D,OAAO,CACL,6BACE,SAAS,EAAC,wCAAwC,EAClD,GAAG,EAAE,IAAI,CAAC,aAAa;YAEvB,oBAAC,6BAAa,IAAC,eAAe,EAAE,IAAI,CAAC,KAAK,CAAC,QAAQ,IAChD,IAAI,CAAC,KAAK,CAAC,cAAc;gBACxB,IAAI,CAAC,KAAK,CAAC,aAAa,CAAC,OAAO;qBAC7B,MAAM,CACL,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,cAAc,KAAK,IAAI,CAAC,KAAK,CAAC,cAAc,CAC5D;qBACA,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE;oBACZ,OAAO,CACL,oBAAC,KAAK,CAAC,QAAQ,IAAC,GAAG,EAAE,IAAI,CAAC,EAAE,IACzB,IAAI,CAAC,SAAS,CACA,CAClB,CAAC;gBACJ,CAAC,CAAC,CACQ,CACZ,CACP,CAAC;IACJ,CAAC;IAEe,iBAAiB;QAC/B,IAAI,CAAC,KAAK,CAAC,aAAa,CAAC,oBAAoB,CAAC,WAAW,CACvD,IAAI,CAAC,yBAAyB,CAC/B,CAAC;IACJ,CAAC;IAEe,oBAAoB;QAClC,IAAI,CAAC,KAAK,CAAC,aAAa,CAAC,oBAAoB,CAAC,cAAc,CAC1D,IAAI,CAAC,yBAAyB,CAC/B,CAAC;IACJ,CAAC;CAMF;AA3DD,gDA2DC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n * See LICENSE.md in the project root for license terms and full copyright notice.\n *--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module Dialog\n */\n\nimport \"./DialogManagerBase.scss\";\nimport * as React from \"react\";\nimport type { BeUiEvent } from \"@itwin/core-bentley\";\nimport { Logger } from \"@itwin/core-bentley\";\nimport { UiEvent } from \"@itwin/appui-abstract\";\nimport { UiFramework } from \"../UiFramework\";\nimport { getCssVariableAsNumber } from \"@itwin/core-react\";\nimport { ThemeProvider } from \"@itwin/itwinui-react\";\n\n/** Dialog Stack Changed Event Args class.\n * @public\n * @deprecated in 4.13.x. Event args are inferred from a listener. If explicit type is needed use a type helper.\n */\nexport interface DialogChangedEventArgs {\n dialogCount: number;\n activeDialog: React.ReactNode | undefined;\n}\n\n/** Dialog Changed Event class.\n * @public\n * @deprecated in 4.13.x. This class should not be used by applications to instantiate objects.\n */\n// eslint-disable-next-line deprecation/deprecation\nexport class DialogChangedEvent extends UiEvent<DialogChangedEventArgs> {}\n\n/** Information maintained by a Dialog Manager about a dialog\n * @public\n */\nexport interface DialogInfo {\n reactNode: React.ReactNode;\n id: string;\n parentDocument: Document;\n}\n\n/** Used if the 'dialog' z-index CSS variable cannot be read */\nconst ZINDEX_DEFAULT = 12000;\n\n/** Dialog Manager class.\n * @internal\n */\nexport class DialogManagerBase {\n private static _sId = 0;\n private _dialogs: DialogInfo[] = new Array<DialogInfo>();\n // eslint-disable-next-line deprecation/deprecation\n private _onDialogChangedEvent: BeUiEvent<DialogChangedEventArgs>;\n private static _topZIndex = ZINDEX_DEFAULT;\n\n // eslint-disable-next-line deprecation/deprecation\n constructor(onDialogChangedEvent: BeUiEvent<DialogChangedEventArgs>) {\n this._onDialogChangedEvent = onDialogChangedEvent;\n }\n\n /** Initialize the modeless dialog manager */\n public static initialize(): void {\n DialogManagerBase._topZIndex = DialogManagerBase.getDialogZIndexDefault();\n }\n\n public static get topZIndex(): number {\n return DialogManagerBase._topZIndex;\n }\n\n public static set topZIndex(zIndex: number) {\n DialogManagerBase._topZIndex = zIndex;\n }\n public get dialogs() {\n return this._dialogs;\n }\n\n // eslint-disable-next-line deprecation/deprecation\n public get onDialogChangedEvent(): BeUiEvent<DialogChangedEventArgs> {\n return this._onDialogChangedEvent;\n }\n\n public static getDialogZIndexDefault(): number {\n const variable = \"--uicore-z-index-dialog\";\n const value = getCssVariableAsNumber(variable);\n\n if (!isNaN(value)) return value;\n\n Logger.logError(\n UiFramework.loggerCategory(this),\n `'${variable}' CSS variable not found`\n );\n return ZINDEX_DEFAULT;\n }\n\n /**\n * Triggers opening a dialog.\n * @param dialog Dialog React component.\n * @param id The unique Id the identifies the dialog.\n * @param parentDocument Optional document required when displaying a dialog in a child popup window.\n */\n public openDialog(\n dialog: React.ReactNode,\n id?: string,\n parentDocument?: Document\n ): void {\n if (!id) id = `Dialog-${++DialogManagerBase._sId}`;\n\n const owningDoc = parentDocument ?? document;\n this.pushDialog({ reactNode: dialog, id, parentDocument: owningDoc });\n }\n\n /** @internal */\n public pushDialog(dialogInfo: DialogInfo): void {\n this._dialogs.push(dialogInfo);\n this.emitDialogChangedEvent();\n }\n\n public closeDialog(dialog?: React.ReactNode): void {\n let targetDialog = dialog;\n if (!dialog) targetDialog = this.activeDialog;\n\n this.removeDialog(targetDialog);\n this.emitDialogChangedEvent();\n }\n\n /** @internal */\n public closeAll(): void {\n this._dialogs = [];\n this.emitDialogChangedEvent();\n }\n\n /** @internal */\n public removeDialog(dialog: React.ReactNode): void {\n const index = this._dialogs.findIndex((dialogInfo: DialogInfo) => {\n return dialog === dialogInfo.reactNode;\n });\n if (index >= 0) this._dialogs.splice(index, 1);\n if (this._dialogs.length < 1)\n DialogManagerBase.topZIndex = DialogManagerBase.getDialogZIndexDefault();\n }\n\n public emitDialogChangedEvent(): void {\n this._onDialogChangedEvent.emit({\n dialogCount: this.dialogCount,\n activeDialog: this.activeDialog,\n });\n }\n\n public update(): void {\n this.emitDialogChangedEvent();\n }\n\n public get activeDialog(): React.ReactNode | undefined {\n if (this._dialogs.length > 0)\n return this._dialogs[this._dialogs.length - 1].reactNode;\n\n return undefined;\n }\n\n public get dialogCount(): number {\n return this._dialogs.length;\n }\n}\n\n/** Properties for the [[DialogRendererBase]] component\n * @internal\n */\nexport interface DialogRendererProps {\n dialogManager: DialogManagerBase;\n style?: React.CSSProperties;\n}\n\ninterface DialogRendererState {\n parentDocument: Document | undefined;\n renderer: HTMLElement | undefined;\n}\n/** DialogRenderer React component.\n * @internal\n */\nexport class DialogRendererBase extends React.PureComponent<\n DialogRendererProps,\n DialogRendererState\n> {\n /** @internal */\n public override readonly state: DialogRendererState = {\n parentDocument: undefined,\n renderer: undefined,\n };\n\n private _handleRefSet = (el: HTMLElement | null) => {\n this.setState({\n parentDocument: el?.ownerDocument ?? undefined,\n renderer: el ?? undefined,\n });\n };\n\n public override render(): React.ReactNode {\n if (this.props.dialogManager.dialogCount <= 0) return null;\n\n return (\n <div\n className=\"uifw-dialog-dialogManagerBase_renderer\"\n ref={this._handleRefSet}\n >\n <ThemeProvider portalContainer={this.state.renderer}>\n {this.state.parentDocument &&\n this.props.dialogManager.dialogs\n .filter(\n (info) => info.parentDocument === this.state.parentDocument\n )\n .map((info) => {\n return (\n <React.Fragment key={info.id}>\n {info.reactNode}\n </React.Fragment>\n );\n })}\n </ThemeProvider>\n </div>\n );\n }\n\n public override componentDidMount(): void {\n this.props.dialogManager.onDialogChangedEvent.addListener(\n this._handleDialogChangedEvent\n );\n }\n\n public override componentWillUnmount(): void {\n this.props.dialogManager.onDialogChangedEvent.removeListener(\n this._handleDialogChangedEvent\n );\n }\n\n // eslint-disable-next-line deprecation/deprecation\n private _handleDialogChangedEvent = (_args: DialogChangedEventArgs) => {\n this.forceUpdate();\n };\n}\n"]}
@@ -0,0 +1,11 @@
1
+ /*---------------------------------------------------------------------------------------------
2
+ * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
3
+ * See LICENSE.md in the project root for license terms and full copyright notice.
4
+ *--------------------------------------------------------------------------------------------*/
5
+ @import "~@itwin/core-react/lib/cjs/core-react/z-index";
6
+
7
+ .uifw-dialog-dialogManagerBase_renderer {
8
+ position: relative;
9
+
10
+ @include uicore-z-index(dialog);
11
+ }
@@ -4,14 +4,14 @@
4
4
  import * as React from "react";
5
5
  import { Popover } from "@itwin/itwinui-react";
6
6
  import { ButtonExpandIndicator } from "./ExpandIndicator";
7
- import type { CommonProps } from "@itwin/core-react";
7
+ import { type CommonProps } from "@itwin/core-react";
8
8
  type StatusBarPopoverProps = CommonProps & Pick<React.ComponentProps<typeof Popover>, "content" | "children" | "visible" | "onVisibleChange" | "closeOnOutsideClick">;
9
9
  /** Popover component used in `StatusBar` component.
10
10
  * This component should wrap the element that triggers the popover.
11
11
  * @note Add the `StatusBarPopover.ExpandIndicator` to popover trigger buttons.
12
12
  * @public
13
13
  */
14
- export declare function StatusBarPopover(props: StatusBarPopoverProps): React.JSX.Element;
14
+ export declare function StatusBarPopover({ content, ...props }: StatusBarPopoverProps): React.JSX.Element;
15
15
  /** Components used in `StatusBarPopover`.
16
16
  * @public
17
17
  */
@@ -1 +1 @@
1
- {"version":3,"file":"StatusBarPopover.d.ts","sourceRoot":"","sources":["../../../../../src/appui-react/statusbar/popup/StatusBarPopover.tsx"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAC;AAC/C,OAAO,EAAE,qBAAqB,EAAE,MAAM,mBAAmB,CAAC;AAC1D,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAErD,KAAK,qBAAqB,GAAG,WAAW,GACtC,IAAI,CACF,KAAK,CAAC,cAAc,CAAC,OAAO,OAAO,CAAC,EAClC,SAAS,GACT,UAAU,GACV,SAAS,GACT,iBAAiB,GACjB,qBAAqB,CACxB,CAAC;AAEJ;;;;GAIG;AACH,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,qBAAqB,qBAW5D;AAED;;GAEG;AACH,yBAAiB,gBAAgB,CAAC;IAChC;;OAEG;IACI,MAAM,eAAe,8BAAwB,CAAC;CACtD"}
1
+ {"version":3,"file":"StatusBarPopover.d.ts","sourceRoot":"","sources":["../../../../../src/appui-react/statusbar/popup/StatusBarPopover.tsx"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAC;AAC/C,OAAO,EAAE,qBAAqB,EAAE,MAAM,mBAAmB,CAAC;AAC1D,OAAO,EAAE,KAAK,WAAW,EAAgB,MAAM,mBAAmB,CAAC;AAEnE,KAAK,qBAAqB,GAAG,WAAW,GACtC,IAAI,CACF,KAAK,CAAC,cAAc,CAAC,OAAO,OAAO,CAAC,EAClC,SAAS,GACT,UAAU,GACV,SAAS,GACT,iBAAiB,GACjB,qBAAqB,CACxB,CAAC;AAEJ;;;;GAIG;AACH,wBAAgB,gBAAgB,CAAC,EAAE,OAAO,EAAE,GAAG,KAAK,EAAE,EAAE,qBAAqB,qBAsB5E;AAED;;GAEG;AACH,yBAAiB,gBAAgB,CAAC;IAChC;;OAEG;IACI,MAAM,eAAe,8BAAwB,CAAC;CACtD"}
@@ -11,14 +11,18 @@ exports.StatusBarPopover = void 0;
11
11
  const React = require("react");
12
12
  const itwinui_react_1 = require("@itwin/itwinui-react");
13
13
  const ExpandIndicator_1 = require("./ExpandIndicator");
14
+ const core_react_1 = require("@itwin/core-react");
14
15
  /** Popover component used in `StatusBar` component.
15
16
  * This component should wrap the element that triggers the popover.
16
17
  * @note Add the `StatusBarPopover.ExpandIndicator` to popover trigger buttons.
17
18
  * @public
18
19
  */
19
- function StatusBarPopover(props) {
20
- return (React.createElement(itwinui_react_1.Popover, { ...props, placement: "top", applyBackground: true, middleware: {
20
+ function StatusBarPopover({ content, ...props }) {
21
+ const [portalTarget, setPortalTarget] = React.useState(undefined);
22
+ return (React.createElement(itwinui_react_1.Popover, { ...props, content: React.createElement(core_react_1.PopupContext.Provider, { value: portalTarget }, content), placement: "top", applyBackground: true, middleware: {
21
23
  offset: 4,
24
+ }, ref: (el) => {
25
+ setPortalTarget(el ?? undefined);
22
26
  } }));
23
27
  }
24
28
  exports.StatusBarPopover = StatusBarPopover;
@@ -1 +1 @@
1
- {"version":3,"file":"StatusBarPopover.js","sourceRoot":"","sources":["../../../../../src/appui-react/statusbar/popup/StatusBarPopover.tsx"],"names":[],"mappings":";AAAA;;;gGAGgG;AAChG;;GAEG;;;AAEH,+BAA+B;AAC/B,wDAA+C;AAC/C,uDAA0D;AAa1D;;;;GAIG;AACH,SAAgB,gBAAgB,CAAC,KAA4B;IAC3D,OAAO,CACL,oBAAC,uBAAO,OACF,KAAK,EACT,SAAS,EAAC,KAAK,EACf,eAAe,QACf,UAAU,EAAE;YACV,MAAM,EAAE,CAAC;SACV,GACD,CACH,CAAC;AACJ,CAAC;AAXD,4CAWC;AAED;;GAEG;AACH,WAAiB,gBAAgB;IAC/B;;OAEG;IACU,gCAAe,GAAG,uCAAqB,CAAC;AACvD,CAAC,EALgB,gBAAgB,gCAAhB,gBAAgB,QAKhC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n * See LICENSE.md in the project root for license terms and full copyright notice.\n *--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module StatusBar\n */\n\nimport * as React from \"react\";\nimport { Popover } from \"@itwin/itwinui-react\";\nimport { ButtonExpandIndicator } from \"./ExpandIndicator\";\nimport type { CommonProps } from \"@itwin/core-react\";\n\ntype StatusBarPopoverProps = CommonProps &\n Pick<\n React.ComponentProps<typeof Popover>,\n | \"content\"\n | \"children\"\n | \"visible\"\n | \"onVisibleChange\"\n | \"closeOnOutsideClick\"\n >;\n\n/** Popover component used in `StatusBar` component.\n * This component should wrap the element that triggers the popover.\n * @note Add the `StatusBarPopover.ExpandIndicator` to popover trigger buttons.\n * @public\n */\nexport function StatusBarPopover(props: StatusBarPopoverProps) {\n return (\n <Popover\n {...props}\n placement=\"top\"\n applyBackground\n middleware={{\n offset: 4,\n }}\n />\n );\n}\n\n/** Components used in `StatusBarPopover`.\n * @public\n */\nexport namespace StatusBarPopover {\n /** Indicator to be used in popover trigger buttons to show expandable content.\n * @public\n */\n export const ExpandIndicator = ButtonExpandIndicator;\n}\n"]}
1
+ {"version":3,"file":"StatusBarPopover.js","sourceRoot":"","sources":["../../../../../src/appui-react/statusbar/popup/StatusBarPopover.tsx"],"names":[],"mappings":";AAAA;;;gGAGgG;AAChG;;GAEG;;;AAEH,+BAA+B;AAC/B,wDAA+C;AAC/C,uDAA0D;AAC1D,kDAAmE;AAYnE;;;;GAIG;AACH,SAAgB,gBAAgB,CAAC,EAAE,OAAO,EAAE,GAAG,KAAK,EAAyB;IAC3E,MAAM,CAAC,YAAY,EAAE,eAAe,CAAC,GAAG,KAAK,CAAC,QAAQ,CAEpD,SAAS,CAAC,CAAC;IACb,OAAO,CACL,oBAAC,uBAAO,OACF,KAAK,EACT,OAAO,EACL,oBAAC,yBAAY,CAAC,QAAQ,IAAC,KAAK,EAAE,YAAY,IACvC,OAAO,CACc,EAE1B,SAAS,EAAC,KAAK,EACf,eAAe,QACf,UAAU,EAAE;YACV,MAAM,EAAE,CAAC;SACV,EACD,GAAG,EAAE,CAAC,EAAE,EAAE,EAAE;YACV,eAAe,CAAC,EAAE,IAAI,SAAS,CAAC,CAAC;QACnC,CAAC,GACD,CACH,CAAC;AACJ,CAAC;AAtBD,4CAsBC;AAED;;GAEG;AACH,WAAiB,gBAAgB;IAC/B;;OAEG;IACU,gCAAe,GAAG,uCAAqB,CAAC;AACvD,CAAC,EALgB,gBAAgB,gCAAhB,gBAAgB,QAKhC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n * See LICENSE.md in the project root for license terms and full copyright notice.\n *--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module StatusBar\n */\n\nimport * as React from \"react\";\nimport { Popover } from \"@itwin/itwinui-react\";\nimport { ButtonExpandIndicator } from \"./ExpandIndicator\";\nimport { type CommonProps, PopupContext } from \"@itwin/core-react\";\n\ntype StatusBarPopoverProps = CommonProps &\n Pick<\n React.ComponentProps<typeof Popover>,\n | \"content\"\n | \"children\"\n | \"visible\"\n | \"onVisibleChange\"\n | \"closeOnOutsideClick\"\n >;\n\n/** Popover component used in `StatusBar` component.\n * This component should wrap the element that triggers the popover.\n * @note Add the `StatusBarPopover.ExpandIndicator` to popover trigger buttons.\n * @public\n */\nexport function StatusBarPopover({ content, ...props }: StatusBarPopoverProps) {\n const [portalTarget, setPortalTarget] = React.useState<\n HTMLElement | undefined\n >(undefined);\n return (\n <Popover\n {...props}\n content={\n <PopupContext.Provider value={portalTarget}>\n {content}\n </PopupContext.Provider>\n }\n placement=\"top\"\n applyBackground\n middleware={{\n offset: 4,\n }}\n ref={(el) => {\n setPortalTarget(el ?? undefined);\n }}\n />\n );\n}\n\n/** Components used in `StatusBarPopover`.\n * @public\n */\nexport namespace StatusBarPopover {\n /** Indicator to be used in popover trigger buttons to show expandable content.\n * @public\n */\n export const ExpandIndicator = ButtonExpandIndicator;\n}\n"]}
@@ -221,7 +221,7 @@ export * from "./appui-react/toolsettings/DefaultToolSettingsProvider";
221
221
  /** @docs-package-description
222
222
  * The ui-framework package contains classes and components for specifying the application UI consisting of the
223
223
  * Backstage, Frontstages, Content Views, Tool Bars, Status Bars, Widgets and Panels.
224
- * For more information, see [learning about appui-react]($docs/learning/ui/appui-react/index.md).
224
+ * For more information, see [the AppUI learning docs]($docs/ui/appui/get-started.md).
225
225
  */
226
226
  /**
227
227
  * @docs-group-description AccuDraw
@@ -325,7 +325,7 @@ export * from "./appui-react/toolsettings/DefaultToolSettingsProvider";
325
325
  */
326
326
  /**
327
327
  * @docs-group-description ToolSettings
328
- * Classes for working Tool Settings. See learning documentation [Tool Settings]($docs/learning/ui/appui-react/toolsettings.md).
328
+ * Classes for working Tool Settings. See learning documentation [Tool Settings]($docs/ui/appui/configure-frontstage.md#tool-settings).
329
329
  */
330
330
  /**
331
331
  * @docs-group-description UiProvider
@@ -242,7 +242,7 @@ __exportStar(require("./appui-react/toolsettings/DefaultToolSettingsProvider"),
242
242
  /** @docs-package-description
243
243
  * The ui-framework package contains classes and components for specifying the application UI consisting of the
244
244
  * Backstage, Frontstages, Content Views, Tool Bars, Status Bars, Widgets and Panels.
245
- * For more information, see [learning about appui-react]($docs/learning/ui/appui-react/index.md).
245
+ * For more information, see [the AppUI learning docs]($docs/ui/appui/get-started.md).
246
246
  */
247
247
  /**
248
248
  * @docs-group-description AccuDraw
@@ -346,7 +346,7 @@ __exportStar(require("./appui-react/toolsettings/DefaultToolSettingsProvider"),
346
346
  */
347
347
  /**
348
348
  * @docs-group-description ToolSettings
349
- * Classes for working Tool Settings. See learning documentation [Tool Settings]($docs/learning/ui/appui-react/toolsettings.md).
349
+ * Classes for working Tool Settings. See learning documentation [Tool Settings]($docs/ui/appui/configure-frontstage.md#tool-settings).
350
350
  */
351
351
  /**
352
352
  * @docs-group-description UiProvider