@itwin/appui-react 4.7.0 → 4.7.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.
- package/CHANGELOG.md +15 -1
- package/lib/cjs/appui-react/childwindow/InternalChildWindowManager.d.ts.map +1 -1
- package/lib/cjs/appui-react/childwindow/InternalChildWindowManager.js +10 -14
- package/lib/cjs/appui-react/childwindow/InternalChildWindowManager.js.map +1 -1
- package/lib/cjs/appui-react/childwindow/PopoutWidget.d.ts +3 -1
- package/lib/cjs/appui-react/childwindow/PopoutWidget.d.ts.map +1 -1
- package/lib/cjs/appui-react/childwindow/PopoutWidget.js +2 -5
- package/lib/cjs/appui-react/childwindow/PopoutWidget.js.map +1 -1
- package/lib/cjs/appui-react/content/InternalContentViewManager.js +1 -1
- package/lib/cjs/appui-react/content/InternalContentViewManager.js.map +1 -1
- package/lib/cjs/appui-react/frontstage/FrontstageDef.d.ts.map +1 -1
- package/lib/cjs/appui-react/frontstage/FrontstageDef.js +1 -1
- package/lib/cjs/appui-react/frontstage/FrontstageDef.js.map +1 -1
- package/lib/esm/appui-react/childwindow/InternalChildWindowManager.d.ts.map +1 -1
- package/lib/esm/appui-react/childwindow/InternalChildWindowManager.js +10 -14
- package/lib/esm/appui-react/childwindow/InternalChildWindowManager.js.map +1 -1
- package/lib/esm/appui-react/childwindow/PopoutWidget.d.ts +3 -1
- package/lib/esm/appui-react/childwindow/PopoutWidget.d.ts.map +1 -1
- package/lib/esm/appui-react/childwindow/PopoutWidget.js +2 -5
- package/lib/esm/appui-react/childwindow/PopoutWidget.js.map +1 -1
- package/lib/esm/appui-react/content/InternalContentViewManager.js +1 -1
- package/lib/esm/appui-react/content/InternalContentViewManager.js.map +1 -1
- package/lib/esm/appui-react/frontstage/FrontstageDef.d.ts.map +1 -1
- package/lib/esm/appui-react/frontstage/FrontstageDef.js +1 -1
- package/lib/esm/appui-react/frontstage/FrontstageDef.js.map +1 -1
- package/package.json +9 -9
package/CHANGELOG.md
CHANGED
|
@@ -1,6 +1,20 @@
|
|
|
1
1
|
# Change Log - @itwin/appui-react
|
|
2
2
|
|
|
3
|
-
This log was last generated on
|
|
3
|
+
This log was last generated on Wed, 20 Dec 2023 23:11:37 GMT and should not be manually modified.
|
|
4
|
+
|
|
5
|
+
## 4.7.2
|
|
6
|
+
Wed, 20 Dec 2023 23:11:37 GMT
|
|
7
|
+
|
|
8
|
+
### Updates
|
|
9
|
+
|
|
10
|
+
- Revert Popout reparenting strategy.
|
|
11
|
+
|
|
12
|
+
## 4.7.1
|
|
13
|
+
Thu, 07 Dec 2023 19:40:17 GMT
|
|
14
|
+
|
|
15
|
+
### Updates
|
|
16
|
+
|
|
17
|
+
- Now support `null` Content (allow delay rendering on specific cases)
|
|
4
18
|
|
|
5
19
|
## 4.7.0
|
|
6
20
|
Fri, 01 Dec 2023 20:01:16 GMT
|
|
@@ -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;AAW/B,OAAO,KAAK,EACV,wBAAwB,EACxB,qBAAqB,EACrB,mBAAmB,EACpB,MAAM,oCAAoC,CAAC;
|
|
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;AAW/B,OAAO,KAAK,EACV,wBAAwB,EACxB,qBAAqB,EACrB,mBAAmB,EACpB,MAAM,oCAAoC,CAAC;AAyB5C;;;;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;IAEI,aAAa,CAAC,YAAY,EAAE,UAAU,GAAG,IAAI;IAIpD;;;;OAIG;IAEH,OAAO,CAAC,MAAM;IAoBd;;;;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;IAU3E,OAAO,CAAC,yBAAyB;IA2DjC,gGAAgG;IACzF,QAAQ;IAQf;;;;;OAKG;IACI,KAAK,kBAAmB,MAAM,2CAgBnC;IAGF,OAAO,CAAC,mBAAmB;IAc3B;;;;;;;;OAQG;IAEI,IAAI,CACT,aAAa,EAAE,MAAM,EACrB,KAAK,EAAE,MAAM,EACb,OAAO,EAAE,KAAK,CAAC,SAAS,EACxB,QAAQ,EAAE,wBAAwB,EAClC,mBAAmB,CAAC,EAAE,OAAO;CAuDhC"}
|
|
@@ -20,7 +20,6 @@ const ModalDialogManager_1 = require("../dialog/ModalDialogManager");
|
|
|
20
20
|
const CursorMenu_1 = require("../cursor/cursormenu/CursorMenu");
|
|
21
21
|
const ThemeManager_1 = require("../theme/ThemeManager");
|
|
22
22
|
const UiFramework_1 = require("../UiFramework");
|
|
23
|
-
const appui_layout_react_1 = require("@itwin/appui-layout-react");
|
|
24
23
|
const childHtml = `<!DOCTYPE html>
|
|
25
24
|
<html>
|
|
26
25
|
<head>
|
|
@@ -149,15 +148,14 @@ class InternalChildWindowManager {
|
|
|
149
148
|
(0, CopyStyles_1.copyStyles)(childWindow.document);
|
|
150
149
|
setTimeout(() => {
|
|
151
150
|
this.render(React.createElement(react_redux_1.Provider, { store: UiFramework_1.UiFramework.store },
|
|
152
|
-
React.createElement(
|
|
153
|
-
React.createElement(
|
|
154
|
-
React.createElement(
|
|
155
|
-
React.createElement(
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
React.createElement("div", { className: "uifw-child-window-container nz-widget-widget" }, content)))))), reactConnectionDiv);
|
|
151
|
+
React.createElement(useUiStateStorage_1.UiStateStorageHandler, null,
|
|
152
|
+
React.createElement(ThemeManager_1.ThemeManager, null,
|
|
153
|
+
React.createElement("div", { className: "uifw-child-window-container-host" },
|
|
154
|
+
React.createElement(PopupManager_1.PopupRenderer, null),
|
|
155
|
+
React.createElement(ModalDialogManager_1.ModalDialogRenderer, null),
|
|
156
|
+
React.createElement(ModelessDialogManager_1.ModelessDialogRenderer, null),
|
|
157
|
+
React.createElement(CursorMenu_1.CursorPopupMenu, null),
|
|
158
|
+
React.createElement("div", { className: "uifw-child-window-container nz-widget-widget" }, content))))), reactConnectionDiv);
|
|
161
159
|
});
|
|
162
160
|
});
|
|
163
161
|
childWindow.addEventListener("pagehide", () => {
|
|
@@ -165,6 +163,8 @@ class InternalChildWindowManager {
|
|
|
165
163
|
if (!frontStageDef)
|
|
166
164
|
return;
|
|
167
165
|
frontStageDef.saveChildWindowSizeAndPosition(childWindowId, childWindow);
|
|
166
|
+
// Trigger first so popout can be converted back to main window widget
|
|
167
|
+
this.close(childWindowId, false);
|
|
168
168
|
// UnmountComponentAtNode is deprecated in React 18, so if they are
|
|
169
169
|
// using React 18 and passing in a createRoot function, unmount()
|
|
170
170
|
// will be used
|
|
@@ -173,10 +173,6 @@ class InternalChildWindowManager {
|
|
|
173
173
|
}
|
|
174
174
|
else
|
|
175
175
|
ReactDOM.unmountComponentAtNode(reactConnectionDiv);
|
|
176
|
-
// We need to unmount the child window content before we close it because
|
|
177
|
-
// it is docked in this function and the widget will disappear if we
|
|
178
|
-
// unmount after docked.
|
|
179
|
-
this.close(childWindowId, false);
|
|
180
176
|
});
|
|
181
177
|
}
|
|
182
178
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"InternalChildWindowManager.js","sourceRoot":"","sources":["../../../../src/appui-react/childwindow/InternalChildWindowManager.tsx"],"names":[],"mappings":";AAAA;;;gGAGgG;;;AAEhG;;GAEG;AAEH,6CAA2C;AAC3C,+BAA+B;AAC/B,sCAAsC;AACtC,6CAA0C;AAC1C,6CAAuC;AACvC,oEAAqE;AACrE,wDAAsD;AACtD,2EAAyE;AACzE,qEAAmE;AACnE,gEAAkE;AAClE,wDAAqD;AACrD,gDAA6C;AAM7C,kEAAwE;AAExE,MAAM,SAAS,GAAG;;;;;;;;;;;;;;;;;;;;;QAqBV,CAAC;AAST;;;;KAIK;AACL,MAAa,0BAA0B;IAAvC;QACU,sBAAiB,GAA0B,EAAE,CAAC;QAE9C,WAAM,GAAqC,EAAE,CAAC;QA0JtD;;;;;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,CAAC,CAAC,KAAK,WAAW;gBAAE,OAAO,KAAK,CAAC;YACrC,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;gBACtB,WAAW,CAAC,MAAM,CAAC,KAAK,EAAE,CAAC;aAC5B;iBAAM;gBACL,wDAAwD;gBACxD,MAAM,aAAa,GAAG,yBAAW,CAAC,WAAW,CAAC,mBAAmB,CAAC;gBAClE,aAAa;oBACX,aAAa,CAAC,gCAAgC,CAAC,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I,CAAC,KAAK,CAAC,aAAa,EAAE,IAAI,CAAC,CAAC;aACjC;QACH,CAAC,EACD,KAAK,CACN,CAAC;QAEF,OAAO,IAAI,CAAC;IACd,CAAC;CACF;AA1QD,gEA0QC","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 \"./InternalChildWindowManager.scss\";\nimport * as React from \"react\";\nimport * as ReactDOM from \"react-dom\";\nimport { copyStyles } from \"./CopyStyles\";\nimport { Provider } from \"react-redux\";\nimport { UiStateStorageHandler } from \"../uistate/useUiStateStorage\";\nimport { PopupRenderer } from \"../popup/PopupManager\";\nimport { ModelessDialogRenderer } from \"../dialog/ModelessDialogManager\";\nimport { ModalDialogRenderer } from \"../dialog/ModalDialogManager\";\nimport { CursorPopupMenu } from \"../cursor/cursormenu/CursorMenu\";\nimport { ThemeManager } from \"../theme/ThemeManager\";\nimport { UiFramework } from \"../UiFramework\";\nimport type {\n ChildWindowLocationProps,\n FrameworkChildWindows,\n OpenChildWindowInfo,\n} from \"../framework/FrameworkChildWindows\";\nimport { createLayoutStore, NineZone } from \"@itwin/appui-layout-react\";\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 class=\"iui-root\">\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 // istanbul ignore next: Result of this assignment is only visible in `open`, which is not tested.\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 // istanbul ignore next: Used in `open` which is not tested.\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 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 // istanbul ignore next: Used in `open` which is not tested.\n private renderChildWindowContents(\n childWindow: Window,\n childWindowId: string,\n content: React.ReactNode,\n title: string\n ) {\n childWindow.document.title = title;\n const reactConnectionDiv = childWindow.document.getElementById(\"root\");\n if (reactConnectionDiv) {\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\n setTimeout(() => {\n copyStyles(childWindow.document);\n setTimeout(() => {\n this.render(\n <Provider store={UiFramework.store}>\n <NineZone\n dispatch={() => {}}\n layout={createLayoutStore(\n UiFramework.frontstages.activeFrontstageDef?.nineZoneState\n )}\n >\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 </NineZone>\n </Provider>,\n reactConnectionDiv\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 // 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 } else ReactDOM.unmountComponentAtNode(reactConnectionDiv);\n\n // We need to unmount the child window content before we close it because\n // it is docked in this function and the widget will disappear if we\n // unmount after docked.\n this.close(childWindowId, false);\n });\n }\n }\n\n /** Close all child/pop-out windows. This typically is called when the frontstage is changed. */\n public closeAll() {\n // istanbul ignore next\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 (-1 === windowIndex) return false;\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 &&\n frontStageDef.dockWidgetContainerByContainerId(childWindowId);\n }\n return true;\n };\n\n // istanbul ignore next: Used in `open` which is not tested.\n private adjustWidowLocation(\n location: ChildWindowLocationProps\n ): ChildWindowLocationProps {\n const outLocation = { ...location };\n if (0 === location.top && 0 === location.left) {\n // If no location is provided, prepare position of the new window to be centered against the current window.\n outLocation.left =\n window.outerWidth / 2 + window.screenX - location.width / 2;\n outLocation.top =\n window.outerHeight / 2 + window.screenY - location.height / 2;\n }\n return outLocation;\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 // istanbul ignore next: Would require mocking window.open to return a window object.\n public open(\n childWindowId: string,\n title: string,\n content: React.ReactNode,\n location: ChildWindowLocationProps,\n useDefaultPopoutUrl?: boolean\n ) {\n // first check to see if content is already open in child window\n if (\n this.openChildWindows.findIndex(\n (openWindow) => openWindow.childWindowId === childWindowId\n ) >= 0\n ) {\n return false;\n }\n\n location = this.adjustWidowLocation(location);\n const url = useDefaultPopoutUrl ? \"/iTwinPopup.html\" : \"\";\n const childWindow = 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 if (0 === url.length) {\n childWindow.document.write(childHtml);\n this.renderChildWindowContents(\n childWindow,\n childWindowId,\n content,\n title\n );\n } else {\n childWindow.addEventListener(\n \"load\",\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,6CAA2C;AAC3C,+BAA+B;AAC/B,sCAAsC;AACtC,6CAA0C;AAC1C,6CAAuC;AACvC,oEAAqE;AACrE,wDAAsD;AACtD,2EAAyE;AACzE,qEAAmE;AACnE,gEAAkE;AAClE,wDAAqD;AACrD,gDAA6C;AAO7C,MAAM,SAAS,GAAG;;;;;;;;;;;;;;;;;;;;;QAqBV,CAAC;AAST;;;;KAIK;AACL,MAAa,0BAA0B;IAAvC;QACU,sBAAiB,GAA0B,EAAE,CAAC;QAE9C,WAAM,GAAqC,EAAE,CAAC;QAgJtD;;;;;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,CAAC,CAAC,KAAK,WAAW;gBAAE,OAAO,KAAK,CAAC;YACrC,MAAM,WAAW,GAAG,IAAI,CAAC,gBAAgB,CAAC,WAAW,CAAC,CAAC;YACvD,IAAI,CAAC,gBAAgB,CAAC,MAAM,CAAC,WAAW,EAAE,CAAC,CAAC,CAAC;Y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I,aAAa,EAAE;gBACjB,IAAI,CAAC,KAAK,CAAC,aAAa,EAAE,IAAI,CAAC,CAAC;aACjC;QACH,CAAC,EACD,KAAK,CACN,CAAC;QAEF,OAAO,IAAI,CAAC;IACd,CAAC;CACF;AAhQD,gEAgQC","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 \"./InternalChildWindowManager.scss\";\nimport * as React from \"react\";\nimport * as ReactDOM from \"react-dom\";\nimport { copyStyles } from \"./CopyStyles\";\nimport { Provider } from \"react-redux\";\nimport { UiStateStorageHandler } from \"../uistate/useUiStateStorage\";\nimport { PopupRenderer } from \"../popup/PopupManager\";\nimport { ModelessDialogRenderer } from \"../dialog/ModelessDialogManager\";\nimport { ModalDialogRenderer } from \"../dialog/ModalDialogManager\";\nimport { CursorPopupMenu } from \"../cursor/cursormenu/CursorMenu\";\nimport { ThemeManager } from \"../theme/ThemeManager\";\nimport { UiFramework } from \"../UiFramework\";\nimport type {\n ChildWindowLocationProps,\n FrameworkChildWindows,\n OpenChildWindowInfo,\n} from \"../framework/FrameworkChildWindows\";\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 class=\"iui-root\">\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 // istanbul ignore next: Result of this assignment is only visible in `open`, which is not tested.\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 // istanbul ignore next: Used in `open` which is not tested.\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 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 // istanbul ignore next: Used in `open` which is not tested.\n private renderChildWindowContents(\n childWindow: Window,\n childWindowId: string,\n content: React.ReactNode,\n title: string\n ) {\n childWindow.document.title = title;\n const reactConnectionDiv = childWindow.document.getElementById(\"root\");\n if (reactConnectionDiv) {\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\n setTimeout(() => {\n copyStyles(childWindow.document);\n setTimeout(() => {\n this.render(\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 reactConnectionDiv\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 // Trigger first so popout can be converted back to main window widget\n this.close(childWindowId, false);\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 } 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 // istanbul ignore next\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 (-1 === windowIndex) return false;\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 &&\n frontStageDef.dockWidgetContainerByContainerId(childWindowId);\n }\n return true;\n };\n\n // istanbul ignore next: Used in `open` which is not tested.\n private adjustWidowLocation(\n location: ChildWindowLocationProps\n ): ChildWindowLocationProps {\n const outLocation = { ...location };\n if (0 === location.top && 0 === location.left) {\n // If no location is provided, prepare position of the new window to be centered against the current window.\n outLocation.left =\n window.outerWidth / 2 + window.screenX - location.width / 2;\n outLocation.top =\n window.outerHeight / 2 + window.screenY - location.height / 2;\n }\n return outLocation;\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 // istanbul ignore next: Would require mocking window.open to return a window object.\n public open(\n childWindowId: string,\n title: string,\n content: React.ReactNode,\n location: ChildWindowLocationProps,\n useDefaultPopoutUrl?: boolean\n ) {\n // first check to see if content is already open in child window\n if (\n this.openChildWindows.findIndex(\n (openWindow) => openWindow.childWindowId === childWindowId\n ) >= 0\n ) {\n return false;\n }\n\n location = this.adjustWidowLocation(location);\n const url = useDefaultPopoutUrl ? \"/iTwinPopup.html\" : \"\";\n const childWindow = 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 if (0 === url.length) {\n childWindow.document.write(childHtml);\n this.renderChildWindowContents(\n childWindow,\n childWindowId,\n content,\n title\n );\n } else {\n childWindow.addEventListener(\n \"load\",\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"]}
|
|
@@ -3,12 +3,14 @@
|
|
|
3
3
|
*/
|
|
4
4
|
/// <reference types="react" />
|
|
5
5
|
import "./PopoutWidget.scss";
|
|
6
|
+
import type { WidgetDef } from "../widgets/WidgetDef";
|
|
6
7
|
interface PopoutWidgetProps {
|
|
7
8
|
widgetContainerId: string;
|
|
9
|
+
widgetDef: WidgetDef;
|
|
8
10
|
}
|
|
9
11
|
/** Component used to wrap a widget for use in a child window.
|
|
10
12
|
* @internal
|
|
11
13
|
*/
|
|
12
|
-
export declare function PopoutWidget({ widgetContainerId }: PopoutWidgetProps): JSX.Element;
|
|
14
|
+
export declare function PopoutWidget({ widgetContainerId, widgetDef, }: PopoutWidgetProps): JSX.Element;
|
|
13
15
|
export {};
|
|
14
16
|
//# sourceMappingURL=PopoutWidget.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PopoutWidget.d.ts","sourceRoot":"","sources":["../../../../src/appui-react/childwindow/PopoutWidget.tsx"],"names":[],"mappings":"AAIA;;GAEG;;AAEH,OAAO,qBAAqB,CAAC;
|
|
1
|
+
{"version":3,"file":"PopoutWidget.d.ts","sourceRoot":"","sources":["../../../../src/appui-react/childwindow/PopoutWidget.tsx"],"names":[],"mappings":"AAIA;;GAEG;;AAEH,OAAO,qBAAqB,CAAC;AAE7B,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AAEtD,UAAU,iBAAiB;IACzB,iBAAiB,EAAE,MAAM,CAAC;IAC1B,SAAS,EAAE,SAAS,CAAC;CACtB;AAED;;GAEG;AACH,wBAAgB,YAAY,CAAC,EAC3B,iBAAiB,EACjB,SAAS,GACV,EAAE,iBAAiB,eASnB"}
|
|
@@ -10,14 +10,11 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
10
10
|
exports.PopoutWidget = void 0;
|
|
11
11
|
require("./PopoutWidget.scss");
|
|
12
12
|
const React = require("react");
|
|
13
|
-
const appui_layout_react_1 = require("@itwin/appui-layout-react");
|
|
14
13
|
/** Component used to wrap a widget for use in a child window.
|
|
15
14
|
* @internal
|
|
16
15
|
*/
|
|
17
|
-
function PopoutWidget({ widgetContainerId }) {
|
|
18
|
-
|
|
19
|
-
return (React.createElement("div", { className: "uifw-popout-widget-filled-container", "data-widget-id": widgetContainerId },
|
|
20
|
-
React.createElement(appui_layout_react_1.WidgetProvider, { id: widgetContainerId }, content)));
|
|
16
|
+
function PopoutWidget({ widgetContainerId, widgetDef, }) {
|
|
17
|
+
return (React.createElement("div", { className: "uifw-popout-widget-filled-container", "data-widget-id": widgetContainerId }, widgetDef.reactNode));
|
|
21
18
|
}
|
|
22
19
|
exports.PopoutWidget = PopoutWidget;
|
|
23
20
|
//# sourceMappingURL=PopoutWidget.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PopoutWidget.js","sourceRoot":"","sources":["../../../../src/appui-react/childwindow/PopoutWidget.tsx"],"names":[],"mappings":";AAAA;;;gGAGgG;AAChG;;GAEG;;;AAEH,+BAA6B;AAC7B,+BAA+B;
|
|
1
|
+
{"version":3,"file":"PopoutWidget.js","sourceRoot":"","sources":["../../../../src/appui-react/childwindow/PopoutWidget.tsx"],"names":[],"mappings":";AAAA;;;gGAGgG;AAChG;;GAEG;;;AAEH,+BAA6B;AAC7B,+BAA+B;AAQ/B;;GAEG;AACH,SAAgB,YAAY,CAAC,EAC3B,iBAAiB,EACjB,SAAS,GACS;IAClB,OAAO,CACL,6BACE,SAAS,EAAC,qCAAqC,oBAC/B,iBAAiB,IAEhC,SAAS,CAAC,SAAS,CAChB,CACP,CAAC;AACJ,CAAC;AAZD,oCAYC","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 ChildWindowManager\n */\n\nimport \"./PopoutWidget.scss\";\nimport * as React from \"react\";\nimport type { WidgetDef } from \"../widgets/WidgetDef\";\n\ninterface PopoutWidgetProps {\n widgetContainerId: string;\n widgetDef: WidgetDef;\n}\n\n/** Component used to wrap a widget for use in a child window.\n * @internal\n */\nexport function PopoutWidget({\n widgetContainerId,\n widgetDef,\n}: PopoutWidgetProps) {\n return (\n <div\n className=\"uifw-popout-widget-filled-container\"\n data-widget-id={widgetContainerId}\n >\n {widgetDef.reactNode}\n </div>\n );\n}\n"]}
|
|
@@ -48,7 +48,7 @@ class InternalContentViewManager {
|
|
|
48
48
|
}
|
|
49
49
|
floatingControls.forEach((contentControl) => {
|
|
50
50
|
const node = contentControl.reactNode;
|
|
51
|
-
const key = node
|
|
51
|
+
const key = node?.key;
|
|
52
52
|
const nodeId = key && key.split("::", 1)[0];
|
|
53
53
|
if (nodeId === controlId)
|
|
54
54
|
control = contentControl;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"InternalContentViewManager.js","sourceRoot":"","sources":["../../../../src/appui-react/content/InternalContentViewManager.ts"],"names":[],"mappings":";AAAA;;;gGAGgG;AAChG;;GAEG;;;AAGH,0DAAgD;AAChD,0DAAuD;AAEvD,iFAA8E;AAC9E,wDAAiD;AAEjD,sDAA6C;AAC7C,gDAA6C;AAC7C,oEAGuC;AACvC,yFAAsF;AAEtF;;GAEG;AACH,MAAa,0BAA0B;IAOrC,wDAAwD;IACjD,MAAM,KAAK,WAAW;QAC3B,OAAO,IAAI,CAAC,UAAU,CAAC;IACzB,CAAC;IAED,oDAAoD;IAC7C,MAAM,CAAC,YAAY,CAAC,SAAkB;QAC3C,IAAI,CAAC,UAAU,GAAG,SAAS,CAAC;QAC5B,IAAI,CAAC,uBAAuB,CAAC,IAAI,CAAC,EAAE,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qB,CACjC,OAAmC;QAEnC,IAAI,CAAC,OAAO,IAAI,CAAC,OAAO,CAAC,QAAQ;YAAE,OAAO,KAAK,CAAC;QAChD,OAAO,6BAAa,CAAC,kBAAkB,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC;IAC5D,CAAC;IAED;;;OAGG;IACI,MAAM,KAAK,OAAO;QACvB,OAAO,2DAA4B,CAAC;IACtC,CAAC;IACD;;;OAGG;IACI,MAAM,KAAK,OAAO;QACvB,OAAO,2DAA4B,CAAC;IACtC,CAAC;;AAnQc,qCAAU,GAAY,KAAK,CAAC;AAG3C,yCAAyC;AAClB,kDAAuB,GAAG,IAAI,wCAAqB,EAAE,CAAC;AAa7E,6CAA6C;AACtB,sDAA2B,GAChD,IAAI,4CAAyB,EAAE,CAAC;AAElC,wDAAwD;AAEjC,yDAA8B,GAAG,IAAI,wBAAO,EAE/D,CAAC;AA1BM,gEAA0B","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 ContentView\n */\n\nimport type * as React from \"react\";\nimport { UiEvent } from \"@itwin/appui-abstract\";\nimport { ViewUtilities } from \"../utils/ViewUtilities\";\nimport type { ContentControl } from \"./ContentControl\";\nimport { InternalContentLayoutManager } from \"./InternalContentLayoutManager\";\nimport { IModelApp } from \"@itwin/core-frontend\";\nimport type { ContentGroup } from \"./ContentGroup\";\nimport { Logger } from \"@itwin/core-bentley\";\nimport { UiFramework } from \"../UiFramework\";\nimport {\n ActiveContentChangedEvent,\n MouseDownChangedEvent,\n} from \"../framework/FrameworkContent\";\nimport { InternalContentDialogManager } from \"../dialog/InternalContentDialogManager\";\n\n/** Content View Manager class.\n * @internal\n */\nexport class InternalContentViewManager {\n private static _mouseDown: boolean = false;\n private static _activeContent?: React.ReactNode;\n\n /** Gets the [[MouseDownChangedEvent]] */\n public static readonly onMouseDownChangedEvent = new MouseDownChangedEvent();\n\n /** Determines if the mouse is down in a content view */\n public static get isMouseDown(): boolean {\n return this._mouseDown;\n }\n\n /** Sets the mouse down status for a content view */\n public static setMouseDown(mouseDown: boolean): void {\n this._mouseDown = mouseDown;\n this.onMouseDownChangedEvent.emit({ mouseDown });\n }\n\n /** Gets the [[ActiveContentChangedEvent]] */\n public static readonly onActiveContentChangedEvent =\n new ActiveContentChangedEvent();\n\n /** Fires when floating contents are added or removed */\n\n public static readonly onAvailableContentChangedEvent = new UiEvent<{\n contentId: string;\n }>();\n\n /** Gets the active content as a React.ReactNode. */\n public static getActive(): React.ReactNode | undefined {\n return this._activeContent;\n }\n\n private static getControlFromElement(\n content: React.ReactNode,\n activeContentGroup: ContentGroup | undefined,\n floatingControls: ContentControl[] | undefined,\n logIfNotFound = false\n ) {\n if (floatingControls?.length) {\n // if we find a React node that matches exactly, return its containing control\n let control = floatingControls.find(\n (contentControl) => contentControl.reactNode === content\n );\n if (control) return control;\n\n // if we don't find a React node that matches exactly, rely on the id specified by the creator\n let controlId: string;\n if (content && (content as React.ReactElement<any>).key) {\n const key = (content as React.ReactElement<any>).key as string;\n // key has format `${contentProps.id}::${this.groupId}` which is stored as unique id\n controlId = key.split(\"::\", 1)[0];\n }\n floatingControls.forEach((contentControl: ContentControl) => {\n const node = contentControl.reactNode;\n const key = (node as React.ReactElement<any>).key as string;\n const nodeId = key && key.split(\"::\", 1)[0];\n if (nodeId === controlId) control = contentControl;\n });\n if (control) return control;\n }\n\n // if it's not a floating control, look through the content area views\n // istanbul ignore else\n if (activeContentGroup) {\n const activeContentControl =\n activeContentGroup.getControlFromElement(content);\n if (activeContentControl) return activeContentControl;\n }\n\n if (logIfNotFound)\n Logger.logError(\n UiFramework.loggerCategory(this),\n `getControlFromElement: no control found for element`\n );\n\n return undefined;\n }\n\n /** Return the active ContentControl. */\n public static getActiveContentControl(): ContentControl | undefined {\n let activeContentControl: ContentControl | undefined;\n const activeFrontstageDef = UiFramework.frontstages.activeFrontstageDef;\n\n // istanbul ignore else\n if (this._activeContent && activeFrontstageDef) {\n const activeContentGroup = activeFrontstageDef.contentGroup;\n activeContentControl = this.getControlFromElement(\n this._activeContent,\n activeContentGroup,\n activeFrontstageDef.floatingContentControls\n );\n }\n\n return activeContentControl;\n }\n\n public static addFloatingContentControl(contentControl?: ContentControl) {\n const activeFrontstageDef = UiFramework.frontstages.activeFrontstageDef;\n // istanbul ignore else\n if (activeFrontstageDef && contentControl) {\n activeFrontstageDef.addFloatingContentControl(contentControl);\n }\n }\n\n public static dropFloatingContentControl(contentControl?: ContentControl) {\n const activeFrontstageDef = UiFramework.frontstages.activeFrontstageDef;\n // istanbul ignore else\n if (activeFrontstageDef && contentControl)\n activeFrontstageDef.dropFloatingContentControl(contentControl);\n }\n\n /** Sets the active [[ContentControl]] */\n public static setActive(\n activeContent?: React.ReactNode,\n forceEventProcessing = false\n ): void {\n // istanbul ignore else\n if (this._activeContent !== activeContent || forceEventProcessing) {\n const oldContent = this._activeContent;\n this._activeContent = activeContent;\n\n const activeFrontstageDef = UiFramework.frontstages.activeFrontstageDef;\n\n // istanbul ignore else\n if (activeFrontstageDef) {\n const activeContentGroup = activeFrontstageDef.contentGroup;\n\n // istanbul ignore else\n const oldContentControl = this.getControlFromElement(\n oldContent,\n activeContentGroup,\n activeFrontstageDef.floatingContentControls\n );\n const activeContentControl = this.getControlFromElement(\n activeContent,\n activeContentGroup,\n activeFrontstageDef.floatingContentControls,\n true\n );\n\n // Only call setActiveView if going to or coming from a non-viewport ContentControl\n // istanbul ignore else\n if (activeContentControl) {\n // istanbul ignore next\n const doSetActiveView =\n forceEventProcessing ||\n !activeContentControl.viewport ||\n /* istanbul ignore next */ (oldContentControl &&\n /* istanbul ignore next */ !oldContentControl.viewport);\n\n // istanbul ignore else\n if (doSetActiveView) {\n activeFrontstageDef.setActiveView(\n activeContentControl,\n oldContentControl\n );\n this.onActiveContentChangedEvent.emit({\n activeContent,\n oldContent,\n });\n } else {\n if (\n activeContentControl.viewport &&\n activeContentControl.viewport !==\n IModelApp.viewManager.selectedView\n ) {\n void IModelApp.viewManager.setSelectedView(\n activeContentControl.viewport\n );\n }\n }\n }\n }\n }\n }\n\n /** Refreshes the active [[ContentControl]] */\n public static refreshActive(activeContent: React.ReactNode) {\n this.layouts.refreshActive();\n this.setActive(activeContent, true);\n }\n\n /**\n * Determines if content displays a Sheet view.\n * @param content ContentControl to check\n */\n public static isContentSheetView(\n content: ContentControl | undefined\n ): boolean {\n if (!content || !content.viewport) return false;\n return ViewUtilities.isSheetView(content.viewport);\n }\n\n /**\n * Determines if content displays a Drawing view.\n * @param content ContentControl to check\n */\n public static isContentDrawingView(\n content: ContentControl | undefined\n ): boolean {\n if (!content || !content.viewport) return false;\n return ViewUtilities.isDrawingView(content.viewport);\n }\n\n /**\n * Determines if content displays a Spatial view.\n * @param content ContentControl to check\n */\n public static isContentSpatialView(\n content: ContentControl | undefined\n ): boolean {\n if (!content || !content.viewport) return false;\n return ViewUtilities.isSpatialView(content.viewport);\n }\n\n /**\n * Determines if content displays a Orthographic view.\n * @param content ContentControl to check\n */\n public static isContentOrthographicView(\n content: ContentControl | undefined\n ): boolean {\n if (!content || !content.viewport) return false;\n return ViewUtilities.isOrthographicView(content.viewport);\n }\n\n /**\n * Determines if content displays a 3d view.\n * @param content ContentControl to check\n */\n public static isContent3dView(content: ContentControl | undefined): boolean {\n if (!content || !content.viewport) return false;\n return ViewUtilities.is3dView(content.viewport);\n }\n\n /**\n * Determines if viewport supports use of a camera.\n * @param content ContentControl to check\n */\n public static contentSupportsCamera(\n content: ContentControl | undefined\n ): boolean {\n if (!content || !content.viewport) return false;\n return ViewUtilities.viewSupportsCamera(content.viewport);\n }\n\n /**\n * Manage content layouts.\n * @beta\n */\n public static get layouts() {\n return InternalContentLayoutManager;\n }\n /**\n * Manage dialogs displaying managed content.\n * @beta\n */\n public static get dialogs() {\n return InternalContentDialogManager;\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"InternalContentViewManager.js","sourceRoot":"","sources":["../../../../src/appui-react/content/InternalContentViewManager.ts"],"names":[],"mappings":";AAAA;;;gGAGgG;AAChG;;GAEG;;;AAGH,0DAAgD;AAChD,0DAAuD;AAEvD,iFAA8E;AAC9E,wDAAiD;AAEjD,sDAA6C;AAC7C,gDAA6C;AAC7C,oEAGuC;AACvC,yFAAsF;AAEtF;;GAEG;AACH,MAAa,0BAA0B;IAOrC,wDAAwD;IACjD,MAAM,KAAK,WAAW;QAC3B,OAAO,IAAI,CAAC,UAAU,CAAC;IACzB,CAAC;IAED,oDAAoD;IAC7C,MAAM,CAAC,YAAY,CAAC,SAAkB;QAC3C,IAAI,CAAC,UAAU,GAAG,SAAS,CAAC;QAC5B,IAAI,CAAC,uBAAuB,CAAC,IAAI,CAAC,EAAE,SAAS,EAAE,CAAC,CAAC;IACnD,CAAC;IAYD,oDAAoD;IAC7C,MAAM,CAAC,SAAS;QACrB,OAAO,IAAI,CAAC,cAAc,CAAC;IAC7B,CAAC;IAEO,MAAM,CAAC,qBAAqB,CAClC,OAAwB,EACxB,kBAA4C,EAC5C,gBAA8C,EAC9C,aAAa,GAAG,KAAK;QAErB,IAAI,gBAAgB,EAAE,MAAM,EAAE;YAC5B,8EAA8E;YAC9E,IAAI,OAAO,GAAG,gBAAgB,CAAC,IAAI,CACjC,CAAC,cAAc,EAAE,EAAE,CAAC,cAAc,CAAC,SAAS,KAAK,OAAO,CACzD,CAAC;YACF,IAAI,OAAO;gBAAE,OAAO,OAAO,CAAC;YAE5B,8FAA8F;YAC9F,IAAI,SAAiB,CAAC;YACtB,IAAI,OAAO,IAAK,OAAmC,CAAC,GAAG,EAAE;gBACvD,MAAM,GAAG,GAAI,OAAmC,CAAC,GAAa,CAAC;gBAC/D,oFAAoF;gBACpF,SAAS,GAAG,GAAG,CAAC,KAAK,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;aACnC;YACD,gBAAgB,CAAC,OAAO,CAAC,CAA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CAAC,QAAQ,CAAC,CAAC;IACvD,CAAC;IAED;;;OAGG;IACI,MAAM,CAAC,yBAAyB,CACrC,OAAmC;QAEnC,IAAI,CAAC,OAAO,IAAI,CAAC,OAAO,CAAC,QAAQ;YAAE,OAAO,KAAK,CAAC;QAChD,OAAO,6BAAa,CAAC,kBAAkB,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC;IAC5D,CAAC;IAED;;;OAGG;IACI,MAAM,CAAC,eAAe,CAAC,OAAmC;QAC/D,IAAI,CAAC,OAAO,IAAI,CAAC,OAAO,CAAC,QAAQ;YAAE,OAAO,KAAK,CAAC;QAChD,OAAO,6BAAa,CAAC,QAAQ,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC;IAClD,CAAC;IAED;;;OAGG;IACI,MAAM,CAAC,qBAAqB,CACjC,OAAmC;QAEnC,IAAI,CAAC,OAAO,IAAI,CAAC,OAAO,CAAC,QAAQ;YAAE,OAAO,KAAK,CAAC;QAChD,OAAO,6BAAa,CAAC,kBAAkB,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC;IAC5D,CAAC;IAED;;;OAGG;IACI,MAAM,KAAK,OAAO;QACvB,OAAO,2DAA4B,CAAC;IACtC,CAAC;IACD;;;OAGG;IACI,MAAM,KAAK,OAAO;QACvB,OAAO,2DAA4B,CAAC;IACtC,CAAC;;AAnQc,qCAAU,GAAY,KAAK,CAAC;AAG3C,yCAAyC;AAClB,kDAAuB,GAAG,IAAI,wCAAqB,EAAE,CAAC;AAa7E,6CAA6C;AACtB,sDAA2B,GAChD,IAAI,4CAAyB,EAAE,CAAC;AAElC,wDAAwD;AAEjC,yDAA8B,GAAG,IAAI,wBAAO,EAE/D,CAAC;AA1BM,gEAA0B","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 ContentView\n */\n\nimport type * as React from \"react\";\nimport { UiEvent } from \"@itwin/appui-abstract\";\nimport { ViewUtilities } from \"../utils/ViewUtilities\";\nimport type { ContentControl } from \"./ContentControl\";\nimport { InternalContentLayoutManager } from \"./InternalContentLayoutManager\";\nimport { IModelApp } from \"@itwin/core-frontend\";\nimport type { ContentGroup } from \"./ContentGroup\";\nimport { Logger } from \"@itwin/core-bentley\";\nimport { UiFramework } from \"../UiFramework\";\nimport {\n ActiveContentChangedEvent,\n MouseDownChangedEvent,\n} from \"../framework/FrameworkContent\";\nimport { InternalContentDialogManager } from \"../dialog/InternalContentDialogManager\";\n\n/** Content View Manager class.\n * @internal\n */\nexport class InternalContentViewManager {\n private static _mouseDown: boolean = false;\n private static _activeContent?: React.ReactNode;\n\n /** Gets the [[MouseDownChangedEvent]] */\n public static readonly onMouseDownChangedEvent = new MouseDownChangedEvent();\n\n /** Determines if the mouse is down in a content view */\n public static get isMouseDown(): boolean {\n return this._mouseDown;\n }\n\n /** Sets the mouse down status for a content view */\n public static setMouseDown(mouseDown: boolean): void {\n this._mouseDown = mouseDown;\n this.onMouseDownChangedEvent.emit({ mouseDown });\n }\n\n /** Gets the [[ActiveContentChangedEvent]] */\n public static readonly onActiveContentChangedEvent =\n new ActiveContentChangedEvent();\n\n /** Fires when floating contents are added or removed */\n\n public static readonly onAvailableContentChangedEvent = new UiEvent<{\n contentId: string;\n }>();\n\n /** Gets the active content as a React.ReactNode. */\n public static getActive(): React.ReactNode | undefined {\n return this._activeContent;\n }\n\n private static getControlFromElement(\n content: React.ReactNode,\n activeContentGroup: ContentGroup | undefined,\n floatingControls: ContentControl[] | undefined,\n logIfNotFound = false\n ) {\n if (floatingControls?.length) {\n // if we find a React node that matches exactly, return its containing control\n let control = floatingControls.find(\n (contentControl) => contentControl.reactNode === content\n );\n if (control) return control;\n\n // if we don't find a React node that matches exactly, rely on the id specified by the creator\n let controlId: string;\n if (content && (content as React.ReactElement<any>).key) {\n const key = (content as React.ReactElement<any>).key as string;\n // key has format `${contentProps.id}::${this.groupId}` which is stored as unique id\n controlId = key.split(\"::\", 1)[0];\n }\n floatingControls.forEach((contentControl: ContentControl) => {\n const node = contentControl.reactNode;\n const key = (node as React.ReactElement<any>)?.key as string;\n const nodeId = key && key.split(\"::\", 1)[0];\n if (nodeId === controlId) control = contentControl;\n });\n if (control) return control;\n }\n\n // if it's not a floating control, look through the content area views\n // istanbul ignore else\n if (activeContentGroup) {\n const activeContentControl =\n activeContentGroup.getControlFromElement(content);\n if (activeContentControl) return activeContentControl;\n }\n\n if (logIfNotFound)\n Logger.logError(\n UiFramework.loggerCategory(this),\n `getControlFromElement: no control found for element`\n );\n\n return undefined;\n }\n\n /** Return the active ContentControl. */\n public static getActiveContentControl(): ContentControl | undefined {\n let activeContentControl: ContentControl | undefined;\n const activeFrontstageDef = UiFramework.frontstages.activeFrontstageDef;\n\n // istanbul ignore else\n if (this._activeContent && activeFrontstageDef) {\n const activeContentGroup = activeFrontstageDef.contentGroup;\n activeContentControl = this.getControlFromElement(\n this._activeContent,\n activeContentGroup,\n activeFrontstageDef.floatingContentControls\n );\n }\n\n return activeContentControl;\n }\n\n public static addFloatingContentControl(contentControl?: ContentControl) {\n const activeFrontstageDef = UiFramework.frontstages.activeFrontstageDef;\n // istanbul ignore else\n if (activeFrontstageDef && contentControl) {\n activeFrontstageDef.addFloatingContentControl(contentControl);\n }\n }\n\n public static dropFloatingContentControl(contentControl?: ContentControl) {\n const activeFrontstageDef = UiFramework.frontstages.activeFrontstageDef;\n // istanbul ignore else\n if (activeFrontstageDef && contentControl)\n activeFrontstageDef.dropFloatingContentControl(contentControl);\n }\n\n /** Sets the active [[ContentControl]] */\n public static setActive(\n activeContent?: React.ReactNode,\n forceEventProcessing = false\n ): void {\n // istanbul ignore else\n if (this._activeContent !== activeContent || forceEventProcessing) {\n const oldContent = this._activeContent;\n this._activeContent = activeContent;\n\n const activeFrontstageDef = UiFramework.frontstages.activeFrontstageDef;\n\n // istanbul ignore else\n if (activeFrontstageDef) {\n const activeContentGroup = activeFrontstageDef.contentGroup;\n\n // istanbul ignore else\n const oldContentControl = this.getControlFromElement(\n oldContent,\n activeContentGroup,\n activeFrontstageDef.floatingContentControls\n );\n const activeContentControl = this.getControlFromElement(\n activeContent,\n activeContentGroup,\n activeFrontstageDef.floatingContentControls,\n true\n );\n\n // Only call setActiveView if going to or coming from a non-viewport ContentControl\n // istanbul ignore else\n if (activeContentControl) {\n // istanbul ignore next\n const doSetActiveView =\n forceEventProcessing ||\n !activeContentControl.viewport ||\n /* istanbul ignore next */ (oldContentControl &&\n /* istanbul ignore next */ !oldContentControl.viewport);\n\n // istanbul ignore else\n if (doSetActiveView) {\n activeFrontstageDef.setActiveView(\n activeContentControl,\n oldContentControl\n );\n this.onActiveContentChangedEvent.emit({\n activeContent,\n oldContent,\n });\n } else {\n if (\n activeContentControl.viewport &&\n activeContentControl.viewport !==\n IModelApp.viewManager.selectedView\n ) {\n void IModelApp.viewManager.setSelectedView(\n activeContentControl.viewport\n );\n }\n }\n }\n }\n }\n }\n\n /** Refreshes the active [[ContentControl]] */\n public static refreshActive(activeContent: React.ReactNode) {\n this.layouts.refreshActive();\n this.setActive(activeContent, true);\n }\n\n /**\n * Determines if content displays a Sheet view.\n * @param content ContentControl to check\n */\n public static isContentSheetView(\n content: ContentControl | undefined\n ): boolean {\n if (!content || !content.viewport) return false;\n return ViewUtilities.isSheetView(content.viewport);\n }\n\n /**\n * Determines if content displays a Drawing view.\n * @param content ContentControl to check\n */\n public static isContentDrawingView(\n content: ContentControl | undefined\n ): boolean {\n if (!content || !content.viewport) return false;\n return ViewUtilities.isDrawingView(content.viewport);\n }\n\n /**\n * Determines if content displays a Spatial view.\n * @param content ContentControl to check\n */\n public static isContentSpatialView(\n content: ContentControl | undefined\n ): boolean {\n if (!content || !content.viewport) return false;\n return ViewUtilities.isSpatialView(content.viewport);\n }\n\n /**\n * Determines if content displays a Orthographic view.\n * @param content ContentControl to check\n */\n public static isContentOrthographicView(\n content: ContentControl | undefined\n ): boolean {\n if (!content || !content.viewport) return false;\n return ViewUtilities.isOrthographicView(content.viewport);\n }\n\n /**\n * Determines if content displays a 3d view.\n * @param content ContentControl to check\n */\n public static isContent3dView(content: ContentControl | undefined): boolean {\n if (!content || !content.viewport) return false;\n return ViewUtilities.is3dView(content.viewport);\n }\n\n /**\n * Determines if viewport supports use of a camera.\n * @param content ContentControl to check\n */\n public static contentSupportsCamera(\n content: ContentControl | undefined\n ): boolean {\n if (!content || !content.viewport) return false;\n return ViewUtilities.viewSupportsCamera(content.viewport);\n }\n\n /**\n * Manage content layouts.\n * @beta\n */\n public static get layouts() {\n return InternalContentLayoutManager;\n }\n /**\n * Manage dialogs displaying managed content.\n * @beta\n */\n public static get dialogs() {\n return InternalContentDialogManager;\n }\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FrontstageDef.d.ts","sourceRoot":"","sources":["../../../../src/appui-react/frontstage/FrontstageDef.tsx"],"names":[],"mappings":"AAIA;;GAEG;AAKH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAQ3D,OAAO,KAAK,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAEnE,OAAO,KAAK,EACV,gBAAgB,EAChB,aAAa,EAEd,MAAM,2BAA2B,CAAC;AAYnC,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAChE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AAC5D,OAAO,EAAE,oBAAoB,EAAE,MAAM,yBAAyB,CAAC;AAC/D,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AACjE,OAAO,EAAE,aAAa,EAAmB,MAAM,8BAA8B,CAAC;AAG9E,OAAO,EAAE,SAAS,EAAc,MAAM,sBAAsB,CAAC;AAC7D,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAC/D,OAAO,EAAE,WAA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widgetDef)
|
|
649
649
|
return false;
|
|
650
|
-
const popoutContent = (React.createElement(PopoutWidget_1.PopoutWidget, { widgetContainerId: widgetContainerId }));
|
|
650
|
+
const popoutContent = (React.createElement(PopoutWidget_1.PopoutWidget, { widgetContainerId: widgetContainerId, widgetDef: widgetDef }));
|
|
651
651
|
const popoutWidget = state.popoutWidgets.byId[location.popoutWidgetId];
|
|
652
652
|
const bounds = core_react_1.Rectangle.create(popoutWidget.bounds);
|
|
653
653
|
const position = {
|