@itwin/appui-react 4.0.0-dev.16 → 4.0.0-dev.18
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 +43 -18
- package/lib/cjs/appui-react/UiFramework.d.ts +10 -20
- package/lib/cjs/appui-react/UiFramework.d.ts.map +1 -1
- package/lib/cjs/appui-react/UiFramework.js +12 -24
- package/lib/cjs/appui-react/UiFramework.js.map +1 -1
- package/lib/cjs/appui-react/childwindow/InternalChildWindowManager.d.ts.map +1 -1
- package/lib/cjs/appui-react/childwindow/InternalChildWindowManager.js +4 -4
- package/lib/cjs/appui-react/childwindow/InternalChildWindowManager.js.map +1 -1
- package/lib/cjs/appui-react/dialog/ContentDialogManager.d.ts +0 -39
- package/lib/cjs/appui-react/dialog/ContentDialogManager.d.ts.map +1 -1
- package/lib/cjs/appui-react/dialog/ContentDialogManager.js +1 -61
- package/lib/cjs/appui-react/dialog/ContentDialogManager.js.map +1 -1
- package/lib/cjs/appui-react/dialog/ModalDialogManager.d.ts +0 -30
- package/lib/cjs/appui-react/dialog/ModalDialogManager.d.ts.map +1 -1
- package/lib/cjs/appui-react/dialog/ModalDialogManager.js +1 -44
- package/lib/cjs/appui-react/dialog/ModalDialogManager.js.map +1 -1
- package/lib/cjs/appui-react/dialog/ModelessDialogManager.d.ts +0 -39
- package/lib/cjs/appui-react/dialog/ModelessDialogManager.d.ts.map +1 -1
- package/lib/cjs/appui-react/dialog/ModelessDialogManager.js +1 -60
- package/lib/cjs/appui-react/dialog/ModelessDialogManager.js.map +1 -1
- package/lib/cjs/appui-react/framework/FrameworkChildWindows.d.ts +1 -1
- package/lib/cjs/appui-react/framework/FrameworkChildWindows.js.map +1 -1
- package/lib/cjs/appui-react/framework/FrameworkContent.d.ts +2 -2
- package/lib/cjs/appui-react/framework/FrameworkContent.js.map +1 -1
- package/lib/cjs/appui-react/framework/FrameworkControls.d.ts +1 -1
- package/lib/cjs/appui-react/framework/FrameworkControls.js.map +1 -1
- package/lib/cjs/appui-react/framework/FrameworkDialogs.d.ts +1 -1
- package/lib/cjs/appui-react/framework/FrameworkDialogs.js.map +1 -1
- package/lib/cjs/appui-react/framework/FrameworkFrontstages.d.ts +7 -3
- package/lib/cjs/appui-react/framework/FrameworkFrontstages.d.ts.map +1 -1
- package/lib/cjs/appui-react/framework/FrameworkFrontstages.js.map +1 -1
- package/lib/cjs/appui-react/framework/FrameworkKeyboardShortcuts.d.ts +1 -1
- package/lib/cjs/appui-react/framework/FrameworkKeyboardShortcuts.js.map +1 -1
- package/lib/cjs/appui-react/framework/FrameworkToolSettings.d.ts +1 -1
- package/lib/cjs/appui-react/framework/FrameworkToolSettings.js.map +1 -1
- package/lib/cjs/appui-react/framework/FrameworkVisibility.d.ts +1 -1
- package/lib/cjs/appui-react/framework/FrameworkVisibility.js.map +1 -1
- package/lib/cjs/appui-react/frontstage/FrontstageDef.d.ts +1 -1
- package/lib/cjs/appui-react/frontstage/FrontstageDef.d.ts.map +1 -1
- package/lib/cjs/appui-react/frontstage/FrontstageDef.js +12 -3
- package/lib/cjs/appui-react/frontstage/FrontstageDef.js.map +1 -1
- package/lib/cjs/appui-react/frontstage/InternalFrontstageManager.d.ts +6 -2
- package/lib/cjs/appui-react/frontstage/InternalFrontstageManager.d.ts.map +1 -1
- package/lib/cjs/appui-react/frontstage/InternalFrontstageManager.js +5 -1
- package/lib/cjs/appui-react/frontstage/InternalFrontstageManager.js.map +1 -1
- package/lib/cjs/appui-react/keyboardshortcut/KeyboardShortcut.d.ts +0 -32
- package/lib/cjs/appui-react/keyboardshortcut/KeyboardShortcut.d.ts.map +1 -1
- package/lib/cjs/appui-react/keyboardshortcut/KeyboardShortcut.js +1 -55
- package/lib/cjs/appui-react/keyboardshortcut/KeyboardShortcut.js.map +1 -1
- package/lib/cjs/appui-react/messages/MessageManager.js +2 -3
- package/lib/cjs/appui-react/messages/MessageManager.js.map +1 -1
- package/lib/cjs/appui-react/stagepanels/StagePanelDef.d.ts +13 -197
- package/lib/cjs/appui-react/stagepanels/StagePanelDef.d.ts.map +1 -1
- package/lib/cjs/appui-react/stagepanels/StagePanelDef.js +32 -4
- package/lib/cjs/appui-react/stagepanels/StagePanelDef.js.map +1 -1
- package/lib/cjs/appui-react/ui-items-provider/AbstractUiItemsManager.d.ts +34 -0
- package/lib/cjs/appui-react/ui-items-provider/AbstractUiItemsManager.d.ts.map +1 -0
- package/lib/cjs/appui-react/ui-items-provider/AbstractUiItemsManager.js +500 -0
- package/lib/cjs/appui-react/ui-items-provider/AbstractUiItemsManager.js.map +1 -0
- package/lib/cjs/appui-react/ui-items-provider/UiItemsManager.d.ts +6 -4
- package/lib/cjs/appui-react/ui-items-provider/UiItemsManager.d.ts.map +1 -1
- package/lib/cjs/appui-react/ui-items-provider/UiItemsManager.js +33 -6
- package/lib/cjs/appui-react/ui-items-provider/UiItemsManager.js.map +1 -1
- package/lib/cjs/appui-react.d.ts +0 -7
- package/lib/cjs/appui-react.d.ts.map +1 -1
- package/lib/cjs/appui-react.js +0 -7
- package/lib/cjs/appui-react.js.map +1 -1
- package/lib/esm/appui-react/UiFramework.d.ts +10 -20
- package/lib/esm/appui-react/UiFramework.d.ts.map +1 -1
- package/lib/esm/appui-react/UiFramework.js +12 -24
- package/lib/esm/appui-react/UiFramework.js.map +1 -1
- package/lib/esm/appui-react/childwindow/InternalChildWindowManager.d.ts.map +1 -1
- package/lib/esm/appui-react/childwindow/InternalChildWindowManager.js +4 -4
- package/lib/esm/appui-react/childwindow/InternalChildWindowManager.js.map +1 -1
- package/lib/esm/appui-react/dialog/ContentDialogManager.d.ts +0 -39
- package/lib/esm/appui-react/dialog/ContentDialogManager.d.ts.map +1 -1
- package/lib/esm/appui-react/dialog/ContentDialogManager.js +0 -59
- package/lib/esm/appui-react/dialog/ContentDialogManager.js.map +1 -1
- package/lib/esm/appui-react/dialog/ModalDialogManager.d.ts +0 -30
- package/lib/esm/appui-react/dialog/ModalDialogManager.d.ts.map +1 -1
- package/lib/esm/appui-react/dialog/ModalDialogManager.js +0 -42
- package/lib/esm/appui-react/dialog/ModalDialogManager.js.map +1 -1
- package/lib/esm/appui-react/dialog/ModelessDialogManager.d.ts +0 -39
- package/lib/esm/appui-react/dialog/ModelessDialogManager.d.ts.map +1 -1
- package/lib/esm/appui-react/dialog/ModelessDialogManager.js +0 -58
- package/lib/esm/appui-react/dialog/ModelessDialogManager.js.map +1 -1
- package/lib/esm/appui-react/framework/FrameworkChildWindows.d.ts +1 -1
- package/lib/esm/appui-react/framework/FrameworkChildWindows.js.map +1 -1
- package/lib/esm/appui-react/framework/FrameworkContent.d.ts +2 -2
- package/lib/esm/appui-react/framework/FrameworkContent.js.map +1 -1
- package/lib/esm/appui-react/framework/FrameworkControls.d.ts +1 -1
- package/lib/esm/appui-react/framework/FrameworkControls.js.map +1 -1
- package/lib/esm/appui-react/framework/FrameworkDialogs.d.ts +1 -1
- package/lib/esm/appui-react/framework/FrameworkDialogs.js.map +1 -1
- package/lib/esm/appui-react/framework/FrameworkFrontstages.d.ts +7 -3
- package/lib/esm/appui-react/framework/FrameworkFrontstages.d.ts.map +1 -1
- package/lib/esm/appui-react/framework/FrameworkFrontstages.js.map +1 -1
- package/lib/esm/appui-react/framework/FrameworkKeyboardShortcuts.d.ts +1 -1
- package/lib/esm/appui-react/framework/FrameworkKeyboardShortcuts.js.map +1 -1
- package/lib/esm/appui-react/framework/FrameworkToolSettings.d.ts +1 -1
- package/lib/esm/appui-react/framework/FrameworkToolSettings.js.map +1 -1
- package/lib/esm/appui-react/framework/FrameworkVisibility.d.ts +1 -1
- package/lib/esm/appui-react/framework/FrameworkVisibility.js.map +1 -1
- package/lib/esm/appui-react/frontstage/FrontstageDef.d.ts +1 -1
- package/lib/esm/appui-react/frontstage/FrontstageDef.d.ts.map +1 -1
- package/lib/esm/appui-react/frontstage/FrontstageDef.js +12 -3
- package/lib/esm/appui-react/frontstage/FrontstageDef.js.map +1 -1
- package/lib/esm/appui-react/frontstage/InternalFrontstageManager.d.ts +6 -2
- package/lib/esm/appui-react/frontstage/InternalFrontstageManager.d.ts.map +1 -1
- package/lib/esm/appui-react/frontstage/InternalFrontstageManager.js +5 -1
- package/lib/esm/appui-react/frontstage/InternalFrontstageManager.js.map +1 -1
- package/lib/esm/appui-react/keyboardshortcut/KeyboardShortcut.d.ts +0 -32
- package/lib/esm/appui-react/keyboardshortcut/KeyboardShortcut.d.ts.map +1 -1
- package/lib/esm/appui-react/keyboardshortcut/KeyboardShortcut.js +0 -53
- package/lib/esm/appui-react/keyboardshortcut/KeyboardShortcut.js.map +1 -1
- package/lib/esm/appui-react/messages/MessageManager.js +2 -3
- package/lib/esm/appui-react/messages/MessageManager.js.map +1 -1
- package/lib/esm/appui-react/stagepanels/StagePanelDef.d.ts +13 -197
- package/lib/esm/appui-react/stagepanels/StagePanelDef.d.ts.map +1 -1
- package/lib/esm/appui-react/stagepanels/StagePanelDef.js +31 -3
- package/lib/esm/appui-react/stagepanels/StagePanelDef.js.map +1 -1
- package/lib/esm/appui-react/ui-items-provider/AbstractUiItemsManager.d.ts +34 -0
- package/lib/esm/appui-react/ui-items-provider/AbstractUiItemsManager.d.ts.map +1 -0
- package/lib/esm/appui-react/ui-items-provider/AbstractUiItemsManager.js +496 -0
- package/lib/esm/appui-react/ui-items-provider/AbstractUiItemsManager.js.map +1 -0
- package/lib/esm/appui-react/ui-items-provider/UiItemsManager.d.ts +6 -4
- package/lib/esm/appui-react/ui-items-provider/UiItemsManager.d.ts.map +1 -1
- package/lib/esm/appui-react/ui-items-provider/UiItemsManager.js +33 -6
- package/lib/esm/appui-react/ui-items-provider/UiItemsManager.js.map +1 -1
- package/lib/esm/appui-react.d.ts +0 -7
- package/lib/esm/appui-react.d.ts.map +1 -1
- package/lib/esm/appui-react.js +0 -7
- package/lib/esm/appui-react.js.map +1 -1
- package/lib/public/locales/en/UiFramework.json +0 -45
- package/package.json +21 -13
- package/lib/cjs/appui-react/childwindow/ChildWindowManager.d.ts +0 -74
- package/lib/cjs/appui-react/childwindow/ChildWindowManager.d.ts.map +0 -1
- package/lib/cjs/appui-react/childwindow/ChildWindowManager.js +0 -107
- package/lib/cjs/appui-react/childwindow/ChildWindowManager.js.map +0 -1
- package/lib/cjs/appui-react/configurableui/ConfigurableUiManager.d.ts +0 -66
- package/lib/cjs/appui-react/configurableui/ConfigurableUiManager.d.ts.map +0 -1
- package/lib/cjs/appui-react/configurableui/ConfigurableUiManager.js +0 -93
- package/lib/cjs/appui-react/configurableui/ConfigurableUiManager.js.map +0 -1
- package/lib/cjs/appui-react/content/ContentLayoutManager.d.ts +0 -48
- package/lib/cjs/appui-react/content/ContentLayoutManager.d.ts.map +0 -1
- package/lib/cjs/appui-react/content/ContentLayoutManager.js +0 -69
- package/lib/cjs/appui-react/content/ContentLayoutManager.js.map +0 -1
- package/lib/cjs/appui-react/content/ContentViewManager.d.ts +0 -63
- package/lib/cjs/appui-react/content/ContentViewManager.d.ts.map +0 -1
- package/lib/cjs/appui-react/content/ContentViewManager.js +0 -96
- package/lib/cjs/appui-react/content/ContentViewManager.js.map +0 -1
- package/lib/cjs/appui-react/frontstage/FrontstageManager.d.ts +0 -202
- package/lib/cjs/appui-react/frontstage/FrontstageManager.d.ts.map +0 -1
- package/lib/cjs/appui-react/frontstage/FrontstageManager.js +0 -269
- package/lib/cjs/appui-react/frontstage/FrontstageManager.js.map +0 -1
- package/lib/cjs/appui-react/toolsettings/ToolSettingsManager.d.ts +0 -44
- package/lib/cjs/appui-react/toolsettings/ToolSettingsManager.d.ts.map +0 -1
- package/lib/cjs/appui-react/toolsettings/ToolSettingsManager.js +0 -64
- package/lib/cjs/appui-react/toolsettings/ToolSettingsManager.js.map +0 -1
- package/lib/cjs/appui-react/utils/UiShowHideManager.d.ts +0 -54
- package/lib/cjs/appui-react/utils/UiShowHideManager.d.ts.map +0 -1
- package/lib/cjs/appui-react/utils/UiShowHideManager.js +0 -108
- package/lib/cjs/appui-react/utils/UiShowHideManager.js.map +0 -1
- package/lib/esm/appui-react/childwindow/ChildWindowManager.d.ts +0 -74
- package/lib/esm/appui-react/childwindow/ChildWindowManager.d.ts.map +0 -1
- package/lib/esm/appui-react/childwindow/ChildWindowManager.js +0 -103
- package/lib/esm/appui-react/childwindow/ChildWindowManager.js.map +0 -1
- package/lib/esm/appui-react/configurableui/ConfigurableUiManager.d.ts +0 -66
- package/lib/esm/appui-react/configurableui/ConfigurableUiManager.d.ts.map +0 -1
- package/lib/esm/appui-react/configurableui/ConfigurableUiManager.js +0 -89
- package/lib/esm/appui-react/configurableui/ConfigurableUiManager.js.map +0 -1
- package/lib/esm/appui-react/content/ContentLayoutManager.d.ts +0 -48
- package/lib/esm/appui-react/content/ContentLayoutManager.d.ts.map +0 -1
- package/lib/esm/appui-react/content/ContentLayoutManager.js +0 -65
- package/lib/esm/appui-react/content/ContentLayoutManager.js.map +0 -1
- package/lib/esm/appui-react/content/ContentViewManager.d.ts +0 -63
- package/lib/esm/appui-react/content/ContentViewManager.d.ts.map +0 -1
- package/lib/esm/appui-react/content/ContentViewManager.js +0 -92
- package/lib/esm/appui-react/content/ContentViewManager.js.map +0 -1
- package/lib/esm/appui-react/frontstage/FrontstageManager.d.ts +0 -202
- package/lib/esm/appui-react/frontstage/FrontstageManager.d.ts.map +0 -1
- package/lib/esm/appui-react/frontstage/FrontstageManager.js +0 -265
- package/lib/esm/appui-react/frontstage/FrontstageManager.js.map +0 -1
- package/lib/esm/appui-react/toolsettings/ToolSettingsManager.d.ts +0 -44
- package/lib/esm/appui-react/toolsettings/ToolSettingsManager.d.ts.map +0 -1
- package/lib/esm/appui-react/toolsettings/ToolSettingsManager.js +0 -60
- package/lib/esm/appui-react/toolsettings/ToolSettingsManager.js.map +0 -1
- package/lib/esm/appui-react/utils/UiShowHideManager.d.ts +0 -54
- package/lib/esm/appui-react/utils/UiShowHideManager.d.ts.map +0 -1
- package/lib/esm/appui-react/utils/UiShowHideManager.js +0 -105
- package/lib/esm/appui-react/utils/UiShowHideManager.js.map +0 -1
|
@@ -126,7 +126,8 @@ class InternalChildWindowManager {
|
|
|
126
126
|
return childWindow?.childWindowId;
|
|
127
127
|
}
|
|
128
128
|
// istanbul ignore next: Used in `open` which is not tested.
|
|
129
|
-
renderChildWindowContents(childWindow, childWindowId, content) {
|
|
129
|
+
renderChildWindowContents(childWindow, childWindowId, content, title) {
|
|
130
|
+
childWindow.document.title = title;
|
|
130
131
|
const reactConnectionDiv = childWindow.document.getElementById("root");
|
|
131
132
|
if (reactConnectionDiv) {
|
|
132
133
|
// set openChildWindows now so components can use it when they mount
|
|
@@ -208,12 +209,11 @@ class InternalChildWindowManager {
|
|
|
208
209
|
return false;
|
|
209
210
|
if (0 === url.length) {
|
|
210
211
|
childWindow.document.write(childHtml);
|
|
211
|
-
this.renderChildWindowContents(childWindow, childWindowId, content);
|
|
212
|
+
this.renderChildWindowContents(childWindow, childWindowId, content, title);
|
|
212
213
|
}
|
|
213
214
|
else {
|
|
214
215
|
childWindow.addEventListener("load", () => {
|
|
215
|
-
childWindow
|
|
216
|
-
this.renderChildWindowContents(childWindow, childWindowId, content);
|
|
216
|
+
this.renderChildWindowContents(childWindow, childWindowId, content, title);
|
|
217
217
|
}, false);
|
|
218
218
|
}
|
|
219
219
|
window.addEventListener("unload", () => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"InternalChildWindowManager.js","sourceRoot":"","sources":["../../../../src/appui-react/childwindow/InternalChildWindowManager.tsx"],"names":[],"mappings":";AAAA;;;+FAG+F;;;AAE/F;;GAEG;AAEH,6CAA2C;AAC3C,+BAA+B;AAC/B,sCAAsC;AACtC,6CAA0C;AAC1C,6CAAuC;AACvC,wDAAqD;AACrD,oEAAqE;AACrE,wDAAsD;AACtD,2EAAyE;AACzE,qEAAmE;AACnE,gEAAkE;AAClE,wDAAqD;AACrD,gDAA6C;AAG7C,MAAM,SAAS,GAAG;;;;;;;;;;;;;;;;;;;;;QAqBV,CAAC;AAST;;;;KAIK;AACL,MAAa,0BAA0B;IAAvC;QACU,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,EAAE;gBACxC,WAAW,CAAC,QAAQ,CAAC,KAAK,GAAG,KAAK,CAAC;gBACnC,IAAI,CAAC,yBAAyB,CAAC,WAAW,EAAE,aAAa,EAAE,OAAO,CAAC,CAAC;YACtE,CAAC,EAAE,KAAK,CAAC,CAAC;SACX;QAED,MAAM,CAAC,gBAAgB,CAAC,QAAQ,EAAE,GAAG,EAAE;YACrC,MAAM,aAAa,GAAG,yBAAW,CAAC,WAAW,CAAC,mBAAmB,CAAC;YAClE,IAAI,aAAa,EAAE;gBACjB,IAAI,CAAC,KAAK,CAAC,aAAa,EAAE,IAAI,CAAC,CAAC;aACjC;QACH,CAAC,EAAE,KAAK,CAAC,CAAC;QAEV,OAAO,IAAI,CAAC;IACd,CAAC;CACF;AAtMD,gEAsMC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n\r\n/** @packageDocumentation\r\n * @module ChildWindowManager\r\n */\r\n\r\nimport \"./InternalChildWindowManager.scss\";\r\nimport * as React from \"react\";\r\nimport * as ReactDOM from \"react-dom\";\r\nimport { copyStyles } from \"./CopyStyles\";\r\nimport { Provider } from \"react-redux\";\r\nimport { StateManager } from \"../redux/StateManager\";\r\nimport { UiStateStorageHandler } from \"../uistate/useUiStateStorage\";\r\nimport { PopupRenderer } from \"../popup/PopupManager\";\r\nimport { ModelessDialogRenderer } from \"../dialog/ModelessDialogManager\";\r\nimport { ModalDialogRenderer } from \"../dialog/ModalDialogManager\";\r\nimport { CursorPopupMenu } from \"../cursor/cursormenu/CursorMenu\";\r\nimport { ThemeManager } from \"../theme/ThemeManager\";\r\nimport { UiFramework } from \"../UiFramework\";\r\nimport { ChildWindowLocationProps, FrameworkChildWindows, OpenChildWindowInfo } from \"../framework/FrameworkChildWindows\";\r\n\r\nconst childHtml = `<!DOCTYPE html>\r\n<html>\r\n<head>\r\n <meta charset=\"utf-8\" />\r\n <style>\r\n html,\r\n body {\r\n height: 100%;\r\n width: 100%;\r\n margin: 0;\r\n overflow: hidden;\r\n }\r\n #root {\r\n height: 100%;\r\n }\r\n </style>\r\n</head>\r\n<body>\r\n <noscript>You need to enable JavaScript to run this app.</noscript>\r\n <div id=\"root\"></div>\r\n</body>\r\n</html>`;\r\n\r\n/**\r\n * Simplification of non exported CreateRoot parameter, only to be used\r\n * in InternalChildWindowManager and ChildWindowManager\r\n * @internal\r\n */\r\nexport type CreateRoot = Parameters<FrameworkChildWindows[\"useCreateRoot\"]>[0];\r\n\r\n/** Supports opening a child browser window from the main application window. The child window is managed by the main application\r\n * and is running in the same security context. The application must deliver the html file iTwinPopup.html along side its index.html.\r\n * See also: [Child Window Manager]($docs/learning/ui/appui-react/ChildWindows.md)\r\n * @internal\r\n * */\r\nexport class InternalChildWindowManager implements FrameworkChildWindows {\r\n private _openChildWindows: OpenChildWindowInfo[] = [];\r\n private _createRoot?: CreateRoot;\r\n\r\n public get openChildWindows() {\r\n return this._openChildWindows;\r\n }\r\n\r\n /**\r\n * When using React18, the `createRoot` function must be provided in order to render Popout content with React18.\r\n * Do not call if using React 17 or before.\r\n *\r\n * Note: The type of the function is intentionally simplified here.\r\n *\r\n * @param createRootFn Function imported from `import { createRoot } from \"react-dom/client\";`\r\n * @beta Will be removed once the transition to react 18 is complete.\r\n */\r\n // istanbul ignore next: Result of this assignment is only visible in `open`, which is not tested.\r\n public useCreateRoot(createRootFn: CreateRoot): void {\r\n this._createRoot = createRootFn;\r\n }\r\n\r\n /**\r\n * Abstracts ReactDOM.render to use either the _createRoot method or the default ReactDOM.render.\r\n * @param element Element to render.\r\n * @param container Container to render to.\r\n */\r\n // istanbul ignore next: Used in `open` which is not tested.\r\n private render(element: React.FunctionComponentElement<any>, container: Element | DocumentFragment) {\r\n if(this._createRoot) {\r\n this._createRoot(container).render(element);\r\n } else {\r\n ReactDOM.render(element, container);\r\n }\r\n }\r\n\r\n /**\r\n * Returns the OpenChildWindowInfo for the related id.\r\n * @param childWindowId Id of the window to retrieve.\r\n * @returns undefined if not found.\r\n */\r\n public find(childWindowId: string | undefined): OpenChildWindowInfo | undefined {\r\n if (undefined === childWindowId)\r\n return undefined;\r\n\r\n return this.openChildWindows.find((openWindow) => openWindow.childWindowId === childWindowId);\r\n }\r\n\r\n /**\r\n * Return the childWindowId of the provided window.\r\n * @param contentWindow Window element to identify\r\n * @returns undefined if not found\r\n */\r\n public findId(contentWindow: Window | undefined | null): string | undefined {\r\n if (!contentWindow)\r\n return undefined;\r\n\r\n const childWindow = this.openChildWindows.find((openWindow) => openWindow.window === contentWindow);\r\n return childWindow?.childWindowId;\r\n }\r\n\r\n // istanbul ignore next: Used in `open` which is not tested.\r\n private renderChildWindowContents(childWindow: Window, childWindowId: string, content: React.ReactNode) {\r\n const reactConnectionDiv = childWindow.document.getElementById(\"root\");\r\n if (reactConnectionDiv) {\r\n // set openChildWindows now so components can use it when they mount\r\n this._openChildWindows.push({\r\n childWindowId,\r\n window: childWindow,\r\n parentWindow: window,\r\n });\r\n\r\n setTimeout(() => {\r\n copyStyles(childWindow.document);\r\n setTimeout(() => {\r\n this.render(\r\n <Provider store={StateManager.store} >\r\n <UiStateStorageHandler>\r\n <ThemeManager>\r\n <div className=\"uifw-child-window-container-host\">\r\n <PopupRenderer />\r\n <ModalDialogRenderer />\r\n <ModelessDialogRenderer />\r\n <CursorPopupMenu />\r\n <div className=\"uifw-child-window-container nz-widget-widget\">\r\n {content}\r\n </div>\r\n </div>\r\n </ThemeManager>\r\n </UiStateStorageHandler>\r\n </Provider>,\r\n reactConnectionDiv\r\n );\r\n });\r\n });\r\n\r\n childWindow.onbeforeunload = () => {\r\n const frontStageDef = UiFramework.frontstages.activeFrontstageDef;\r\n if (!frontStageDef)\r\n return;\r\n frontStageDef.saveChildWindowSizeAndPosition(childWindowId, childWindow);\r\n this.close(childWindowId, false);\r\n };\r\n }\r\n }\r\n\r\n /** Close all child/pop-out windows. This typically is called when the frontstage is changed. */\r\n public closeAll() {\r\n // istanbul ignore next\r\n this.openChildWindows.forEach((openChildWindow) => openChildWindow.window.close());\r\n this._openChildWindows = [];\r\n }\r\n\r\n /**\r\n * Close a specific child window.\r\n * @param childWindowId Id of the window to close\r\n * @param processWindowClose should the `close` method be called on the closing window. (defaults to true)\r\n * @returns false if the window could not be found.\r\n */\r\n public close = (childWindowId: string, processWindowClose = true) => {\r\n const windowIndex = this.openChildWindows.findIndex((openWindow) => openWindow.childWindowId === childWindowId);\r\n if (-1 === windowIndex)\r\n return false;\r\n const childWindow = this.openChildWindows[windowIndex];\r\n this.openChildWindows.splice(windowIndex, 1);\r\n if (processWindowClose) {\r\n childWindow.window.close();\r\n } else {\r\n // call the following to convert popout to docked widget\r\n const frontStageDef = UiFramework.frontstages.activeFrontstageDef;\r\n frontStageDef && frontStageDef.dockPopoutWidgetContainer(childWindowId);\r\n }\r\n return true;\r\n };\r\n\r\n // istanbul ignore next: Used in `open` which is not tested.\r\n private adjustWidowLocation(location: ChildWindowLocationProps, center?: boolean): ChildWindowLocationProps {\r\n const outLocation = { ...location };\r\n if (0 === location.top && 0 === location.left) {\r\n center = center ?? true;\r\n const windowTop = window.top ?? window;\r\n\r\n // Prepare position of the new window to be centered against the 'parent' window.\r\n if (center) {\r\n outLocation.left =\r\n windowTop.outerWidth / 2 + windowTop.screenX - location.width / 2;\r\n outLocation.top =\r\n windowTop.outerHeight / 2 + windowTop.screenY - location.height / 2;\r\n } else {\r\n if (undefined !== window.screenLeft && undefined !== window.screenTop) {\r\n outLocation.top = window.screenTop + location.top;\r\n outLocation.left = window.screenLeft + location.left;\r\n }\r\n }\r\n }\r\n return outLocation;\r\n }\r\n\r\n /**\r\n * Open a new child window.\r\n * @param childWindowId Id to assign to the newly created window.\r\n * @param title Title to display on the window.\r\n * @param content ReactNode to be rendered in the window.\r\n * @param location Position and size information\r\n * @param useDefaultPopoutUrl use \"/iTwinPopup.html\" as the window Url, \"\" otherwise.\r\n * @returns true if the window is opened successfully.\r\n */\r\n // istanbul ignore next: Would require mocking window.open to return a window object.\r\n public open(childWindowId: string, title: string, content: React.ReactNode, location: ChildWindowLocationProps, useDefaultPopoutUrl?: boolean) {\r\n // first check to see if content is already open in child window\r\n if (this.openChildWindows.findIndex((openWindow) => openWindow.childWindowId === childWindowId) >= 0) {\r\n return false;\r\n }\r\n\r\n location = this.adjustWidowLocation(location);\r\n const url = useDefaultPopoutUrl ? \"/iTwinPopup.html\" : \"\";\r\n const childWindow = window.open(url, \"\", `width=${location.width},height=${location.height},left=${location.left},top=${location.top},menubar=no,resizable=yes,scrollbars=no,status=no,location=no`);\r\n if (!childWindow)\r\n return false;\r\n if (0 === url.length) {\r\n childWindow.document.write(childHtml);\r\n this.renderChildWindowContents(childWindow, childWindowId, content);\r\n } else {\r\n childWindow.addEventListener(\"load\", () => {\r\n childWindow.document.title = title;\r\n this.renderChildWindowContents(childWindow, childWindowId, content);\r\n }, false);\r\n }\r\n\r\n window.addEventListener(\"unload\", () => {\r\n const frontStageDef = UiFramework.frontstages.activeFrontstageDef;\r\n if (frontStageDef) {\r\n this.close(childWindowId, true);\r\n }\r\n }, false);\r\n\r\n return true;\r\n }\r\n}\r\n"]}
|
|
1
|
+
{"version":3,"file":"InternalChildWindowManager.js","sourceRoot":"","sources":["../../../../src/appui-react/childwindow/InternalChildWindowManager.tsx"],"names":[],"mappings":";AAAA;;;+FAG+F;;;AAE/F;;GAEG;AAEH,6CAA2C;AAC3C,+BAA+B;AAC/B,sCAAsC;AACtC,6CAA0C;AAC1C,6CAAuC;AACvC,wDAAqD;AACrD,oEAAqE;AACrE,wDAAsD;AACtD,2EAAyE;AACzE,qEAAmE;AACnE,gEAAkE;AAClE,wDAAqD;AACrD,gDAA6C;AAG7C,MAAM,SAAS,GAAG;;;;;;;;;;;;;;;;;;;;;QAqBV,CAAC;AAST;;;;KAIK;AACL,MAAa,0BAA0B;IAAvC;QACU,sBAAiB,GAA0B,EAAE,CAAC;QAiHtD;;;;;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W,CAAC,gBAAgB,CAAC,MAAM,EAAE,GAAG,EAAE;gBACxC,IAAI,CAAC,yBAAyB,CAAC,WAAW,EAAE,aAAa,EAAE,OAAO,EAAE,KAAK,CAAC,CAAC;YAC7E,CAAC,EAAE,KAAK,CAAC,CAAC;SACX;QAED,MAAM,CAAC,gBAAgB,CAAC,QAAQ,EAAE,GAAG,EAAE;YACrC,MAAM,aAAa,GAAG,yBAAW,CAAC,WAAW,CAAC,mBAAmB,CAAC;YAClE,IAAI,aAAa,EAAE;gBACjB,IAAI,CAAC,KAAK,CAAC,aAAa,EAAE,IAAI,CAAC,CAAC;aACjC;QACH,CAAC,EAAE,KAAK,CAAC,CAAC;QAEV,OAAO,IAAI,CAAC;IACd,CAAC;CACF;AAtMD,gEAsMC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n\r\n/** @packageDocumentation\r\n * @module ChildWindowManager\r\n */\r\n\r\nimport \"./InternalChildWindowManager.scss\";\r\nimport * as React from \"react\";\r\nimport * as ReactDOM from \"react-dom\";\r\nimport { copyStyles } from \"./CopyStyles\";\r\nimport { Provider } from \"react-redux\";\r\nimport { StateManager } from \"../redux/StateManager\";\r\nimport { UiStateStorageHandler } from \"../uistate/useUiStateStorage\";\r\nimport { PopupRenderer } from \"../popup/PopupManager\";\r\nimport { ModelessDialogRenderer } from \"../dialog/ModelessDialogManager\";\r\nimport { ModalDialogRenderer } from \"../dialog/ModalDialogManager\";\r\nimport { CursorPopupMenu } from \"../cursor/cursormenu/CursorMenu\";\r\nimport { ThemeManager } from \"../theme/ThemeManager\";\r\nimport { UiFramework } from \"../UiFramework\";\r\nimport { ChildWindowLocationProps, FrameworkChildWindows, OpenChildWindowInfo } from \"../framework/FrameworkChildWindows\";\r\n\r\nconst childHtml = `<!DOCTYPE html>\r\n<html>\r\n<head>\r\n <meta charset=\"utf-8\" />\r\n <style>\r\n html,\r\n body {\r\n height: 100%;\r\n width: 100%;\r\n margin: 0;\r\n overflow: hidden;\r\n }\r\n #root {\r\n height: 100%;\r\n }\r\n </style>\r\n</head>\r\n<body>\r\n <noscript>You need to enable JavaScript to run this app.</noscript>\r\n <div id=\"root\"></div>\r\n</body>\r\n</html>`;\r\n\r\n/**\r\n * Simplification of non exported CreateRoot parameter, only to be used\r\n * in InternalChildWindowManager and ChildWindowManager\r\n * @internal\r\n */\r\nexport type CreateRoot = Parameters<FrameworkChildWindows[\"useCreateRoot\"]>[0];\r\n\r\n/** Supports opening a child browser window from the main application window. The child window is managed by the main application\r\n * and is running in the same security context. The application must deliver the html file iTwinPopup.html along side its index.html.\r\n * See also: [Child Window Manager]($docs/learning/ui/appui-react/ChildWindows.md)\r\n * @internal\r\n * */\r\nexport class InternalChildWindowManager implements FrameworkChildWindows {\r\n private _openChildWindows: OpenChildWindowInfo[] = [];\r\n private _createRoot?: CreateRoot;\r\n\r\n public get openChildWindows() {\r\n return this._openChildWindows;\r\n }\r\n\r\n /**\r\n * When using React18, the `createRoot` function must be provided in order to render Popout content with React18.\r\n * Do not call if using React 17 or before.\r\n *\r\n * Note: The type of the function is intentionally simplified here.\r\n *\r\n * @param createRootFn Function imported from `import { createRoot } from \"react-dom/client\";`\r\n * @beta Will be removed once the transition to react 18 is complete.\r\n */\r\n // istanbul ignore next: Result of this assignment is only visible in `open`, which is not tested.\r\n public useCreateRoot(createRootFn: CreateRoot): void {\r\n this._createRoot = createRootFn;\r\n }\r\n\r\n /**\r\n * Abstracts ReactDOM.render to use either the _createRoot method or the default ReactDOM.render.\r\n * @param element Element to render.\r\n * @param container Container to render to.\r\n */\r\n // istanbul ignore next: Used in `open` which is not tested.\r\n private render(element: React.FunctionComponentElement<any>, container: Element | DocumentFragment) {\r\n if(this._createRoot) {\r\n this._createRoot(container).render(element);\r\n } else {\r\n ReactDOM.render(element, container);\r\n }\r\n }\r\n\r\n /**\r\n * Returns the OpenChildWindowInfo for the related id.\r\n * @param childWindowId Id of the window to retrieve.\r\n * @returns undefined if not found.\r\n */\r\n public find(childWindowId: string | undefined): OpenChildWindowInfo | undefined {\r\n if (undefined === childWindowId)\r\n return undefined;\r\n\r\n return this.openChildWindows.find((openWindow) => openWindow.childWindowId === childWindowId);\r\n }\r\n\r\n /**\r\n * Return the childWindowId of the provided window.\r\n * @param contentWindow Window element to identify\r\n * @returns undefined if not found\r\n */\r\n public findId(contentWindow: Window | undefined | null): string | undefined {\r\n if (!contentWindow)\r\n return undefined;\r\n\r\n const childWindow = this.openChildWindows.find((openWindow) => openWindow.window === contentWindow);\r\n return childWindow?.childWindowId;\r\n }\r\n\r\n // istanbul ignore next: Used in `open` which is not tested.\r\n private renderChildWindowContents(childWindow: Window, childWindowId: string, content: React.ReactNode, title: string) {\r\n childWindow.document.title = title;\r\n const reactConnectionDiv = childWindow.document.getElementById(\"root\");\r\n if (reactConnectionDiv) {\r\n // set openChildWindows now so components can use it when they mount\r\n this._openChildWindows.push({\r\n childWindowId,\r\n window: childWindow,\r\n parentWindow: window,\r\n });\r\n\r\n setTimeout(() => {\r\n copyStyles(childWindow.document);\r\n setTimeout(() => {\r\n this.render(\r\n <Provider store={StateManager.store} >\r\n <UiStateStorageHandler>\r\n <ThemeManager>\r\n <div className=\"uifw-child-window-container-host\">\r\n <PopupRenderer />\r\n <ModalDialogRenderer />\r\n <ModelessDialogRenderer />\r\n <CursorPopupMenu />\r\n <div className=\"uifw-child-window-container nz-widget-widget\">\r\n {content}\r\n </div>\r\n </div>\r\n </ThemeManager>\r\n </UiStateStorageHandler>\r\n </Provider>,\r\n reactConnectionDiv\r\n );\r\n });\r\n });\r\n\r\n childWindow.onbeforeunload = () => {\r\n const frontStageDef = UiFramework.frontstages.activeFrontstageDef;\r\n if (!frontStageDef)\r\n return;\r\n frontStageDef.saveChildWindowSizeAndPosition(childWindowId, childWindow);\r\n this.close(childWindowId, false);\r\n };\r\n }\r\n }\r\n\r\n /** Close all child/pop-out windows. This typically is called when the frontstage is changed. */\r\n public closeAll() {\r\n // istanbul ignore next\r\n this.openChildWindows.forEach((openChildWindow) => openChildWindow.window.close());\r\n this._openChildWindows = [];\r\n }\r\n\r\n /**\r\n * Close a specific child window.\r\n * @param childWindowId Id of the window to close\r\n * @param processWindowClose should the `close` method be called on the closing window. (defaults to true)\r\n * @returns false if the window could not be found.\r\n */\r\n public close = (childWindowId: string, processWindowClose = true) => {\r\n const windowIndex = this.openChildWindows.findIndex((openWindow) => openWindow.childWindowId === childWindowId);\r\n if (-1 === windowIndex)\r\n return false;\r\n const childWindow = this.openChildWindows[windowIndex];\r\n this.openChildWindows.splice(windowIndex, 1);\r\n if (processWindowClose) {\r\n childWindow.window.close();\r\n } else {\r\n // call the following to convert popout to docked widget\r\n const frontStageDef = UiFramework.frontstages.activeFrontstageDef;\r\n frontStageDef && frontStageDef.dockPopoutWidgetContainer(childWindowId);\r\n }\r\n return true;\r\n };\r\n\r\n // istanbul ignore next: Used in `open` which is not tested.\r\n private adjustWidowLocation(location: ChildWindowLocationProps, center?: boolean): ChildWindowLocationProps {\r\n const outLocation = { ...location };\r\n if (0 === location.top && 0 === location.left) {\r\n center = center ?? true;\r\n const windowTop = window.top ?? window;\r\n\r\n // Prepare position of the new window to be centered against the 'parent' window.\r\n if (center) {\r\n outLocation.left =\r\n windowTop.outerWidth / 2 + windowTop.screenX - location.width / 2;\r\n outLocation.top =\r\n windowTop.outerHeight / 2 + windowTop.screenY - location.height / 2;\r\n } else {\r\n if (undefined !== window.screenLeft && undefined !== window.screenTop) {\r\n outLocation.top = window.screenTop + location.top;\r\n outLocation.left = window.screenLeft + location.left;\r\n }\r\n }\r\n }\r\n return outLocation;\r\n }\r\n\r\n /**\r\n * Open a new child window.\r\n * @param childWindowId Id to assign to the newly created window.\r\n * @param title Title to display on the window.\r\n * @param content ReactNode to be rendered in the window.\r\n * @param location Position and size information\r\n * @param useDefaultPopoutUrl use \"/iTwinPopup.html\" as the window Url, \"\" otherwise.\r\n * @returns true if the window is opened successfully.\r\n */\r\n // istanbul ignore next: Would require mocking window.open to return a window object.\r\n public open(childWindowId: string, title: string, content: React.ReactNode, location: ChildWindowLocationProps, useDefaultPopoutUrl?: boolean) {\r\n // first check to see if content is already open in child window\r\n if (this.openChildWindows.findIndex((openWindow) => openWindow.childWindowId === childWindowId) >= 0) {\r\n return false;\r\n }\r\n\r\n location = this.adjustWidowLocation(location);\r\n const url = useDefaultPopoutUrl ? \"/iTwinPopup.html\" : \"\";\r\n const childWindow = window.open(url, \"\", `width=${location.width},height=${location.height},left=${location.left},top=${location.top},menubar=no,resizable=yes,scrollbars=no,status=no,location=no`);\r\n if (!childWindow)\r\n return false;\r\n if (0 === url.length) {\r\n childWindow.document.write(childHtml);\r\n this.renderChildWindowContents(childWindow, childWindowId, content, title);\r\n } else {\r\n childWindow.addEventListener(\"load\", () => {\r\n this.renderChildWindowContents(childWindow, childWindowId, content, title);\r\n }, false);\r\n }\r\n\r\n window.addEventListener(\"unload\", () => {\r\n const frontStageDef = UiFramework.frontstages.activeFrontstageDef;\r\n if (frontStageDef) {\r\n this.close(childWindowId, true);\r\n }\r\n }, false);\r\n\r\n return true;\r\n }\r\n}\r\n"]}
|
|
@@ -3,45 +3,6 @@
|
|
|
3
3
|
*/
|
|
4
4
|
import { CommonProps } from "@itwin/core-react";
|
|
5
5
|
import * as React from "react";
|
|
6
|
-
import { ContentDialogInfo } from "../framework/FrameworkContent";
|
|
7
|
-
/** Content Dialog Manager class displays and manages multiple modeless dialogs
|
|
8
|
-
* @public
|
|
9
|
-
* @deprecated in 3.7. Use `UiFramework.content.dialog` property.
|
|
10
|
-
*/
|
|
11
|
-
export declare class ContentDialogManager {
|
|
12
|
-
/** Initialize the modeless dialog manager.
|
|
13
|
-
* @deprecated in 3.7. This is called internally.
|
|
14
|
-
*/
|
|
15
|
-
static initialize(): void;
|
|
16
|
-
/** Content Dialog Changed Event */
|
|
17
|
-
static get onContentDialogChangedEvent(): import("../framework/FrameworkContent").ContentDialogChangedEvent;
|
|
18
|
-
/** @internal */
|
|
19
|
-
static get dialogManager(): import("./DialogManagerBase").DialogManagerBase;
|
|
20
|
-
/** Get the array of modeless dialogs */
|
|
21
|
-
static get dialogs(): import("./DialogManagerBase").DialogInfo[];
|
|
22
|
-
/** Open a modeless dialog
|
|
23
|
-
* @param dialog The Dialog to open
|
|
24
|
-
* @param id The id of the Dialog to open
|
|
25
|
-
*/
|
|
26
|
-
static openDialog(dialog: React.ReactNode, id: string, parentDocument?: Document): void;
|
|
27
|
-
/** Close a modeless dialog
|
|
28
|
-
* @param id The id of the Dialog to close.
|
|
29
|
-
*/
|
|
30
|
-
static closeDialog(id: string): void;
|
|
31
|
-
/** @internal */
|
|
32
|
-
static closeAll(): void;
|
|
33
|
-
/** Update the dialogs */
|
|
34
|
-
static update(): void;
|
|
35
|
-
/** Get the active modeless dialog */
|
|
36
|
-
static get activeDialog(): React.ReactNode | undefined;
|
|
37
|
-
/** Get the count of modeless dialogs */
|
|
38
|
-
static get dialogCount(): number;
|
|
39
|
-
/** Handle a pointer down event on a modeless dialog */
|
|
40
|
-
static handlePointerDownEvent(_event: React.PointerEvent, id: string, updateFunc: () => void): void;
|
|
41
|
-
/** Get the z-index for a modeless dialog */
|
|
42
|
-
static getDialogZIndex(id: string): number;
|
|
43
|
-
static getDialogInfo(id: string): ContentDialogInfo | undefined;
|
|
44
|
-
}
|
|
45
6
|
/** ContentDialogRenderer React component renders modeless dialogs.
|
|
46
7
|
* @public
|
|
47
8
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ContentDialogManager.d.ts","sourceRoot":"","sources":["../../../../src/appui-react/dialog/ContentDialogManager.tsx"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAChD,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"ContentDialogManager.d.ts","sourceRoot":"","sources":["../../../../src/appui-react/dialog/ContentDialogManager.tsx"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAChD,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAI/B;;GAEG;AACH,qBAAa,qBAAsB,SAAQ,KAAK,CAAC,aAAa,CAAC,WAAW,CAAC;gBAE7D,KAAK,EAAE,WAAW;IAId,MAAM,IAAI,KAAK,CAAC,SAAS;CAK1C"}
|
|
@@ -7,70 +7,10 @@
|
|
|
7
7
|
* @module Dialog
|
|
8
8
|
*/
|
|
9
9
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
|
-
exports.ContentDialogRenderer =
|
|
10
|
+
exports.ContentDialogRenderer = void 0;
|
|
11
11
|
const React = require("react");
|
|
12
12
|
const DialogManagerBase_1 = require("./DialogManagerBase");
|
|
13
13
|
const InternalContentDialogManager_1 = require("./InternalContentDialogManager");
|
|
14
|
-
// cSpell:ignore ZINDEX modeless
|
|
15
|
-
/** Content Dialog Manager class displays and manages multiple modeless dialogs
|
|
16
|
-
* @public
|
|
17
|
-
* @deprecated in 3.7. Use `UiFramework.content.dialog` property.
|
|
18
|
-
*/
|
|
19
|
-
class ContentDialogManager {
|
|
20
|
-
/** Initialize the modeless dialog manager.
|
|
21
|
-
* @deprecated in 3.7. This is called internally.
|
|
22
|
-
*/
|
|
23
|
-
static initialize() {
|
|
24
|
-
return InternalContentDialogManager_1.InternalContentDialogManager.initialize();
|
|
25
|
-
}
|
|
26
|
-
/** Content Dialog Changed Event */
|
|
27
|
-
static get onContentDialogChangedEvent() { return InternalContentDialogManager_1.InternalContentDialogManager.onContentDialogChangedEvent; }
|
|
28
|
-
/** @internal */
|
|
29
|
-
static get dialogManager() { return InternalContentDialogManager_1.InternalContentDialogManager.dialogManager; }
|
|
30
|
-
/** Get the array of modeless dialogs */
|
|
31
|
-
static get dialogs() { return InternalContentDialogManager_1.InternalContentDialogManager.dialogs; }
|
|
32
|
-
/** Open a modeless dialog
|
|
33
|
-
* @param dialog The Dialog to open
|
|
34
|
-
* @param id The id of the Dialog to open
|
|
35
|
-
*/
|
|
36
|
-
static openDialog(dialog, id, parentDocument = document) {
|
|
37
|
-
return InternalContentDialogManager_1.InternalContentDialogManager.open(dialog, id, parentDocument);
|
|
38
|
-
}
|
|
39
|
-
/** Close a modeless dialog
|
|
40
|
-
* @param id The id of the Dialog to close.
|
|
41
|
-
*/
|
|
42
|
-
static closeDialog(id) {
|
|
43
|
-
return InternalContentDialogManager_1.InternalContentDialogManager.close(id);
|
|
44
|
-
}
|
|
45
|
-
/** @internal */
|
|
46
|
-
static closeAll() {
|
|
47
|
-
return InternalContentDialogManager_1.InternalContentDialogManager.closeAll();
|
|
48
|
-
}
|
|
49
|
-
/** Update the dialogs */
|
|
50
|
-
static update() {
|
|
51
|
-
return InternalContentDialogManager_1.InternalContentDialogManager.update();
|
|
52
|
-
}
|
|
53
|
-
/** Get the active modeless dialog */
|
|
54
|
-
static get activeDialog() {
|
|
55
|
-
return InternalContentDialogManager_1.InternalContentDialogManager.active;
|
|
56
|
-
}
|
|
57
|
-
/** Get the count of modeless dialogs */
|
|
58
|
-
static get dialogCount() {
|
|
59
|
-
return InternalContentDialogManager_1.InternalContentDialogManager.count;
|
|
60
|
-
}
|
|
61
|
-
/** Handle a pointer down event on a modeless dialog */
|
|
62
|
-
static handlePointerDownEvent(_event, id, updateFunc) {
|
|
63
|
-
return InternalContentDialogManager_1.InternalContentDialogManager.handlePointerDownEvent(_event, id, updateFunc);
|
|
64
|
-
}
|
|
65
|
-
/** Get the z-index for a modeless dialog */
|
|
66
|
-
static getDialogZIndex(id) {
|
|
67
|
-
return InternalContentDialogManager_1.InternalContentDialogManager.getZIndex(id);
|
|
68
|
-
}
|
|
69
|
-
static getDialogInfo(id) {
|
|
70
|
-
return InternalContentDialogManager_1.InternalContentDialogManager.getInfo(id);
|
|
71
|
-
}
|
|
72
|
-
}
|
|
73
|
-
exports.ContentDialogManager = ContentDialogManager;
|
|
74
14
|
/** ContentDialogRenderer React component renders modeless dialogs.
|
|
75
15
|
* @public
|
|
76
16
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ContentDialogManager.js","sourceRoot":"","sources":["../../../../src/appui-react/dialog/ContentDialogManager.tsx"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAGH,+BAA+B;
|
|
1
|
+
{"version":3,"file":"ContentDialogManager.js","sourceRoot":"","sources":["../../../../src/appui-react/dialog/ContentDialogManager.tsx"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAGH,+BAA+B;AAC/B,2DAAyD;AACzD,iFAA0F;AAE1F;;GAEG;AACH,MAAa,qBAAsB,SAAQ,KAAK,CAAC,aAA0B;IAEzE,YAAY,KAAkB;QAC5B,KAAK,CAAC,KAAK,CAAC,CAAC;IACf,CAAC;IAEe,MAAM;QACpB,OAAO,CACL,oBAAC,sCAAkB,OAAK,IAAI,CAAC,KAAK,EAAE,aAAa,EAAE,2DAAQ,CAAC,aAAa,GAAI,CAC9E,CAAC;IACJ,CAAC;CACF;AAXD,sDAWC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module Dialog\r\n */\r\n\r\nimport { CommonProps } from \"@itwin/core-react\";\r\nimport * as React from \"react\";\r\nimport { DialogRendererBase } from \"./DialogManagerBase\";\r\nimport { InternalContentDialogManager as internal } from \"./InternalContentDialogManager\";\r\n\r\n/** ContentDialogRenderer React component renders modeless dialogs.\r\n * @public\r\n */\r\nexport class ContentDialogRenderer extends React.PureComponent<CommonProps> {\r\n\r\n constructor(props: CommonProps) {\r\n super(props);\r\n }\r\n\r\n public override render(): React.ReactNode {\r\n return (\r\n <DialogRendererBase {...this.props} dialogManager={internal.dialogManager} />\r\n );\r\n }\r\n}\r\n"]}
|
|
@@ -10,34 +10,4 @@ export declare class ModalDialogRenderer extends React.PureComponent<CommonProps
|
|
|
10
10
|
constructor(props: CommonProps);
|
|
11
11
|
render(): React.ReactNode;
|
|
12
12
|
}
|
|
13
|
-
/** Modal Dialog Manager class displays and manages multiple modal dialogs
|
|
14
|
-
* @public
|
|
15
|
-
* @deprecated in 3.7. Use `UiFramework.dialogs.modal` property.
|
|
16
|
-
*/
|
|
17
|
-
export declare class ModalDialogManager {
|
|
18
|
-
/** Modal Dialog Changed Event */
|
|
19
|
-
static get onModalDialogChangedEvent(): import("../framework/FrameworkDialogs").ModalDialogChangedEvent;
|
|
20
|
-
/** @internal */
|
|
21
|
-
static get dialogManager(): import("./DialogManagerBase").DialogManagerBase;
|
|
22
|
-
/** Get the array of modal dialogs */
|
|
23
|
-
static get dialogs(): import("./DialogManagerBase").DialogInfo[];
|
|
24
|
-
/** Open a modal dialog
|
|
25
|
-
* @param dialog The Dialog to open
|
|
26
|
-
* @param id The id of the Dialog. If one is not provided, an id is generated.
|
|
27
|
-
* @param parentDocument The Document used to determine the owning window.
|
|
28
|
-
*/
|
|
29
|
-
static openDialog(dialog: React.ReactNode, id?: string, parentDocument?: Document): void;
|
|
30
|
-
/** Close a modal dialog
|
|
31
|
-
* @param dialog The Dialog to open. If one is not specified, the active dialog will be closed.
|
|
32
|
-
*/
|
|
33
|
-
static closeDialog(dialog?: React.ReactNode): void;
|
|
34
|
-
/** @internal */
|
|
35
|
-
static closeAll(): void;
|
|
36
|
-
/** Update the dialogs */
|
|
37
|
-
static update(): void;
|
|
38
|
-
/** Get the active modal dialog */
|
|
39
|
-
static get activeDialog(): React.ReactNode | undefined;
|
|
40
|
-
/** Get the count of modal dialogs */
|
|
41
|
-
static get dialogCount(): number;
|
|
42
|
-
}
|
|
43
13
|
//# sourceMappingURL=ModalDialogManager.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ModalDialogManager.d.ts","sourceRoot":"","sources":["../../../../src/appui-react/dialog/ModalDialogManager.tsx"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAIhD;;GAEG;AACH,qBAAa,mBAAoB,SAAQ,KAAK,CAAC,aAAa,CAAC,WAAW,CAAC;gBAE3D,KAAK,EAAE,WAAW;IAId,MAAM,IAAI,KAAK,CAAC,SAAS;CAK1C
|
|
1
|
+
{"version":3,"file":"ModalDialogManager.d.ts","sourceRoot":"","sources":["../../../../src/appui-react/dialog/ModalDialogManager.tsx"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAIhD;;GAEG;AACH,qBAAa,mBAAoB,SAAQ,KAAK,CAAC,aAAa,CAAC,WAAW,CAAC;gBAE3D,KAAK,EAAE,WAAW;IAId,MAAM,IAAI,KAAK,CAAC,SAAS;CAK1C"}
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
* @module Dialog
|
|
8
8
|
*/
|
|
9
9
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
|
-
exports.
|
|
10
|
+
exports.ModalDialogRenderer = void 0;
|
|
11
11
|
const React = require("react");
|
|
12
12
|
const DialogManagerBase_1 = require("./DialogManagerBase");
|
|
13
13
|
const InternalModalDialogManager_1 = require("./InternalModalDialogManager");
|
|
@@ -23,47 +23,4 @@ class ModalDialogRenderer extends React.PureComponent {
|
|
|
23
23
|
}
|
|
24
24
|
}
|
|
25
25
|
exports.ModalDialogRenderer = ModalDialogRenderer;
|
|
26
|
-
/** Modal Dialog Manager class displays and manages multiple modal dialogs
|
|
27
|
-
* @public
|
|
28
|
-
* @deprecated in 3.7. Use `UiFramework.dialogs.modal` property.
|
|
29
|
-
*/
|
|
30
|
-
class ModalDialogManager {
|
|
31
|
-
/** Modal Dialog Changed Event */
|
|
32
|
-
static get onModalDialogChangedEvent() { return InternalModalDialogManager_1.InternalModalDialogManager.onModalDialogChangedEvent; }
|
|
33
|
-
/** @internal */
|
|
34
|
-
static get dialogManager() { return InternalModalDialogManager_1.InternalModalDialogManager.dialogManager; }
|
|
35
|
-
/** Get the array of modal dialogs */
|
|
36
|
-
static get dialogs() { return InternalModalDialogManager_1.InternalModalDialogManager.dialogs; }
|
|
37
|
-
/** Open a modal dialog
|
|
38
|
-
* @param dialog The Dialog to open
|
|
39
|
-
* @param id The id of the Dialog. If one is not provided, an id is generated.
|
|
40
|
-
* @param parentDocument The Document used to determine the owning window.
|
|
41
|
-
*/
|
|
42
|
-
static openDialog(dialog, id, parentDocument = document) {
|
|
43
|
-
InternalModalDialogManager_1.InternalModalDialogManager.open(dialog, id, parentDocument);
|
|
44
|
-
}
|
|
45
|
-
/** Close a modal dialog
|
|
46
|
-
* @param dialog The Dialog to open. If one is not specified, the active dialog will be closed.
|
|
47
|
-
*/
|
|
48
|
-
static closeDialog(dialog) {
|
|
49
|
-
InternalModalDialogManager_1.InternalModalDialogManager.close(dialog);
|
|
50
|
-
}
|
|
51
|
-
/** @internal */
|
|
52
|
-
static closeAll() {
|
|
53
|
-
InternalModalDialogManager_1.InternalModalDialogManager.closeAll();
|
|
54
|
-
}
|
|
55
|
-
/** Update the dialogs */
|
|
56
|
-
static update() {
|
|
57
|
-
InternalModalDialogManager_1.InternalModalDialogManager.update();
|
|
58
|
-
}
|
|
59
|
-
/** Get the active modal dialog */
|
|
60
|
-
static get activeDialog() {
|
|
61
|
-
return InternalModalDialogManager_1.InternalModalDialogManager.active;
|
|
62
|
-
}
|
|
63
|
-
/** Get the count of modal dialogs */
|
|
64
|
-
static get dialogCount() {
|
|
65
|
-
return InternalModalDialogManager_1.InternalModalDialogManager.count;
|
|
66
|
-
}
|
|
67
|
-
}
|
|
68
|
-
exports.ModalDialogManager = ModalDialogManager;
|
|
69
26
|
//# sourceMappingURL=ModalDialogManager.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ModalDialogManager.js","sourceRoot":"","sources":["../../../../src/appui-react/dialog/ModalDialogManager.tsx"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,+BAA+B;AAE/B,2DAAyD;AACzD,6EAAsF;AAEtF;;GAEG;AACH,MAAa,mBAAoB,SAAQ,KAAK,CAAC,aAA0B;IAEvE,YAAY,KAAkB;QAC5B,KAAK,CAAC,KAAK,CAAC,CAAC;IACf,CAAC;IAEe,MAAM;QACpB,OAAO,CACL,oBAAC,sCAAkB,OAAK,IAAI,CAAC,KAAK,EAAE,aAAa,EAAE,uDAAQ,CAAC,aAAa,GAAI,CAC9E,CAAC;IACJ,CAAC;CACF;AAXD,kDAWC
|
|
1
|
+
{"version":3,"file":"ModalDialogManager.js","sourceRoot":"","sources":["../../../../src/appui-react/dialog/ModalDialogManager.tsx"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,+BAA+B;AAE/B,2DAAyD;AACzD,6EAAsF;AAEtF;;GAEG;AACH,MAAa,mBAAoB,SAAQ,KAAK,CAAC,aAA0B;IAEvE,YAAY,KAAkB;QAC5B,KAAK,CAAC,KAAK,CAAC,CAAC;IACf,CAAC;IAEe,MAAM;QACpB,OAAO,CACL,oBAAC,sCAAkB,OAAK,IAAI,CAAC,KAAK,EAAE,aAAa,EAAE,uDAAQ,CAAC,aAAa,GAAI,CAC9E,CAAC;IACJ,CAAC;CACF;AAXD,kDAWC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module Dialog\r\n */\r\n\r\nimport * as React from \"react\";\r\nimport { CommonProps } from \"@itwin/core-react\";\r\nimport { DialogRendererBase } from \"./DialogManagerBase\";\r\nimport { InternalModalDialogManager as internal } from \"./InternalModalDialogManager\";\r\n\r\n/** ModalDialogRenderer React component renders modal dialogs\r\n * @public\r\n */\r\nexport class ModalDialogRenderer extends React.PureComponent<CommonProps> {\r\n\r\n constructor(props: CommonProps) {\r\n super(props);\r\n }\r\n\r\n public override render(): React.ReactNode {\r\n return (\r\n <DialogRendererBase {...this.props} dialogManager={internal.dialogManager} />\r\n );\r\n }\r\n}\r\n"]}
|
|
@@ -3,7 +3,6 @@
|
|
|
3
3
|
*/
|
|
4
4
|
import * as React from "react";
|
|
5
5
|
import { CommonProps } from "@itwin/core-react";
|
|
6
|
-
import { ModelessDialogInfo } from "../framework/FrameworkDialogs";
|
|
7
6
|
/** ModelessDialogRenderer React component renders modeless dialogs.
|
|
8
7
|
* @public
|
|
9
8
|
*/
|
|
@@ -11,42 +10,4 @@ export declare class ModelessDialogRenderer extends React.PureComponent<CommonPr
|
|
|
11
10
|
constructor(props: CommonProps);
|
|
12
11
|
render(): React.ReactNode;
|
|
13
12
|
}
|
|
14
|
-
/** Modeless Dialog Manager class displays and manages multiple modeless dialogs
|
|
15
|
-
* @public
|
|
16
|
-
* @deprecated in 3.7. Use `UiFramework.dialogs.modeless` property.
|
|
17
|
-
*/
|
|
18
|
-
export declare class ModelessDialogManager {
|
|
19
|
-
/** Initialize the modeless dialog manager
|
|
20
|
-
* @deprecated in 3.7. This is called internally.
|
|
21
|
-
*/
|
|
22
|
-
static initialize(): void;
|
|
23
|
-
/** Modeless Dialog Changed Event */
|
|
24
|
-
static get onModelessDialogChangedEvent(): import("../framework/FrameworkDialogs").ModelessDialogChangedEvent;
|
|
25
|
-
/** @internal */
|
|
26
|
-
static get dialogManager(): import("./DialogManagerBase").DialogManagerBase;
|
|
27
|
-
/** Get the array of modeless dialogs */
|
|
28
|
-
static get dialogs(): import("./DialogManagerBase").DialogInfo[];
|
|
29
|
-
/** Open a modeless dialog
|
|
30
|
-
* @param dialog The Dialog to open
|
|
31
|
-
* @param id The id of the Dialog to open
|
|
32
|
-
*/
|
|
33
|
-
static openDialog(dialog: React.ReactNode, id: string, parentDocument?: Document): void;
|
|
34
|
-
/** Close a modeless dialog
|
|
35
|
-
* @param id The id of the Dialog to close.
|
|
36
|
-
*/
|
|
37
|
-
static closeDialog(id: string): void;
|
|
38
|
-
/** @internal */
|
|
39
|
-
static closeAll(): void;
|
|
40
|
-
/** Update the dialogs */
|
|
41
|
-
static update(): void;
|
|
42
|
-
/** Get the active modeless dialog */
|
|
43
|
-
static get activeDialog(): React.ReactNode | undefined;
|
|
44
|
-
/** Get the count of modeless dialogs */
|
|
45
|
-
static get dialogCount(): number;
|
|
46
|
-
/** Handle a pointer down event on a modeless dialog */
|
|
47
|
-
static handlePointerDownEvent(_event: React.PointerEvent, id: string, updateFunc: () => void): void;
|
|
48
|
-
/** Get the z-index for a modeless dialog */
|
|
49
|
-
static getDialogZIndex(id: string): number;
|
|
50
|
-
static getDialogInfo(id: string): ModelessDialogInfo | undefined;
|
|
51
|
-
}
|
|
52
13
|
//# sourceMappingURL=ModelessDialogManager.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ModelessDialogManager.d.ts","sourceRoot":"","sources":["../../../../src/appui-react/dialog/ModelessDialogManager.tsx"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;
|
|
1
|
+
{"version":3,"file":"ModelessDialogManager.d.ts","sourceRoot":"","sources":["../../../../src/appui-react/dialog/ModelessDialogManager.tsx"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAMhD;;GAEG;AACH,qBAAa,sBAAuB,SAAQ,KAAK,CAAC,aAAa,CAAC,WAAW,CAAC;gBAE9D,KAAK,EAAE,WAAW;IAId,MAAM,IAAI,KAAK,CAAC,SAAS;CAK1C"}
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
* @module Dialog
|
|
8
8
|
*/
|
|
9
9
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
|
-
exports.
|
|
10
|
+
exports.ModelessDialogRenderer = void 0;
|
|
11
11
|
const React = require("react");
|
|
12
12
|
const DialogManagerBase_1 = require("./DialogManagerBase");
|
|
13
13
|
const InternalModelessDialogManager_1 = require("./InternalModelessDialogManager");
|
|
@@ -24,63 +24,4 @@ class ModelessDialogRenderer extends React.PureComponent {
|
|
|
24
24
|
}
|
|
25
25
|
}
|
|
26
26
|
exports.ModelessDialogRenderer = ModelessDialogRenderer;
|
|
27
|
-
/** Modeless Dialog Manager class displays and manages multiple modeless dialogs
|
|
28
|
-
* @public
|
|
29
|
-
* @deprecated in 3.7. Use `UiFramework.dialogs.modeless` property.
|
|
30
|
-
*/
|
|
31
|
-
class ModelessDialogManager {
|
|
32
|
-
/** Initialize the modeless dialog manager
|
|
33
|
-
* @deprecated in 3.7. This is called internally.
|
|
34
|
-
*/
|
|
35
|
-
static initialize() {
|
|
36
|
-
InternalModelessDialogManager_1.InternalModelessDialogManager.initialize();
|
|
37
|
-
}
|
|
38
|
-
/** Modeless Dialog Changed Event */
|
|
39
|
-
static get onModelessDialogChangedEvent() { return InternalModelessDialogManager_1.InternalModelessDialogManager.onModelessDialogChangedEvent; }
|
|
40
|
-
/** @internal */
|
|
41
|
-
static get dialogManager() { return InternalModelessDialogManager_1.InternalModelessDialogManager.dialogManager; }
|
|
42
|
-
/** Get the array of modeless dialogs */
|
|
43
|
-
static get dialogs() { return InternalModelessDialogManager_1.InternalModelessDialogManager.dialogs; }
|
|
44
|
-
/** Open a modeless dialog
|
|
45
|
-
* @param dialog The Dialog to open
|
|
46
|
-
* @param id The id of the Dialog to open
|
|
47
|
-
*/
|
|
48
|
-
static openDialog(dialog, id, parentDocument = document) {
|
|
49
|
-
return InternalModelessDialogManager_1.InternalModelessDialogManager.open(dialog, id, parentDocument);
|
|
50
|
-
}
|
|
51
|
-
/** Close a modeless dialog
|
|
52
|
-
* @param id The id of the Dialog to close.
|
|
53
|
-
*/
|
|
54
|
-
static closeDialog(id) {
|
|
55
|
-
return InternalModelessDialogManager_1.InternalModelessDialogManager.close(id);
|
|
56
|
-
}
|
|
57
|
-
/** @internal */
|
|
58
|
-
static closeAll() {
|
|
59
|
-
return InternalModelessDialogManager_1.InternalModelessDialogManager.closeAll();
|
|
60
|
-
}
|
|
61
|
-
/** Update the dialogs */
|
|
62
|
-
static update() {
|
|
63
|
-
return InternalModelessDialogManager_1.InternalModelessDialogManager.update();
|
|
64
|
-
}
|
|
65
|
-
/** Get the active modeless dialog */
|
|
66
|
-
static get activeDialog() {
|
|
67
|
-
return InternalModelessDialogManager_1.InternalModelessDialogManager.active;
|
|
68
|
-
}
|
|
69
|
-
/** Get the count of modeless dialogs */
|
|
70
|
-
static get dialogCount() {
|
|
71
|
-
return InternalModelessDialogManager_1.InternalModelessDialogManager.count;
|
|
72
|
-
}
|
|
73
|
-
/** Handle a pointer down event on a modeless dialog */
|
|
74
|
-
static handlePointerDownEvent(_event, id, updateFunc) {
|
|
75
|
-
return InternalModelessDialogManager_1.InternalModelessDialogManager.handlePointerDownEvent(_event, id, updateFunc);
|
|
76
|
-
}
|
|
77
|
-
/** Get the z-index for a modeless dialog */
|
|
78
|
-
static getDialogZIndex(id) {
|
|
79
|
-
return InternalModelessDialogManager_1.InternalModelessDialogManager.getZIndex(id);
|
|
80
|
-
}
|
|
81
|
-
static getDialogInfo(id) {
|
|
82
|
-
return InternalModelessDialogManager_1.InternalModelessDialogManager.getInfo(id);
|
|
83
|
-
}
|
|
84
|
-
}
|
|
85
|
-
exports.ModelessDialogManager = ModelessDialogManager;
|
|
86
27
|
//# sourceMappingURL=ModelessDialogManager.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ModelessDialogManager.js","sourceRoot":"","sources":["../../../../src/appui-react/dialog/ModelessDialogManager.tsx"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,+BAA+B;AAE/B,2DAAyD;
|
|
1
|
+
{"version":3,"file":"ModelessDialogManager.js","sourceRoot":"","sources":["../../../../src/appui-react/dialog/ModelessDialogManager.tsx"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,+BAA+B;AAE/B,2DAAyD;AACzD,mFAA4F;AAE5F,gCAAgC;AAEhC;;GAEG;AACH,MAAa,sBAAuB,SAAQ,KAAK,CAAC,aAA0B;IAE1E,YAAY,KAAkB;QAC5B,KAAK,CAAC,KAAK,CAAC,CAAC;IACf,CAAC;IAEe,MAAM;QACpB,OAAO,CACL,oBAAC,sCAAkB,OAAK,IAAI,CAAC,KAAK,EAAE,aAAa,EAAE,6DAAQ,CAAC,aAAa,GAAI,CAC9E,CAAC;IACJ,CAAC;CACF;AAXD,wDAWC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module Dialog\r\n */\r\n\r\nimport * as React from \"react\";\r\nimport { CommonProps } from \"@itwin/core-react\";\r\nimport { DialogRendererBase } from \"./DialogManagerBase\";\r\nimport { InternalModelessDialogManager as internal } from \"./InternalModelessDialogManager\";\r\n\r\n// cSpell:ignore ZINDEX modeless\r\n\r\n/** ModelessDialogRenderer React component renders modeless dialogs.\r\n * @public\r\n */\r\nexport class ModelessDialogRenderer extends React.PureComponent<CommonProps> {\r\n\r\n constructor(props: CommonProps) {\r\n super(props);\r\n }\r\n\r\n public override render(): React.ReactNode {\r\n return (\r\n <DialogRendererBase {...this.props} dialogManager={internal.dialogManager} />\r\n );\r\n }\r\n}\r\n\r\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FrameworkChildWindows.js","sourceRoot":"","sources":["../../../../src/appui-react/framework/FrameworkChildWindows.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module ChildWindowManager\r\n */\r\n\r\n/** @public */\r\nexport interface OpenChildWindowInfo {\r\n childWindowId: string;\r\n window: Window;\r\n parentWindow: Window;\r\n}\r\n\r\n/** @public */\r\nexport interface ChildWindowLocationProps {\r\n width: number;\r\n height: number;\r\n left: number;\r\n top: number;\r\n}\r\n\r\n/**\r\n * Basic recreation of the `createRoot` function type, intentionally not exported.\r\n */\r\ntype CreateRoot = (container: Element | DocumentFragment) => {\r\n render(children: React.ReactNode): void;\r\n};\r\n\r\n/**\r\n * [[UiFramework.childWindows]] interface.\r\n * @
|
|
1
|
+
{"version":3,"file":"FrameworkChildWindows.js","sourceRoot":"","sources":["../../../../src/appui-react/framework/FrameworkChildWindows.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module ChildWindowManager\r\n */\r\n\r\n/** @public */\r\nexport interface OpenChildWindowInfo {\r\n childWindowId: string;\r\n window: Window;\r\n parentWindow: Window;\r\n}\r\n\r\n/** @public */\r\nexport interface ChildWindowLocationProps {\r\n width: number;\r\n height: number;\r\n left: number;\r\n top: number;\r\n}\r\n\r\n/**\r\n * Basic recreation of the `createRoot` function type, intentionally not exported.\r\n */\r\ntype CreateRoot = (container: Element | DocumentFragment) => {\r\n render(children: React.ReactNode): void;\r\n};\r\n\r\n/**\r\n * [[UiFramework.childWindows]] interface.\r\n * @public\r\n */\r\nexport interface FrameworkChildWindows {\r\n /**\r\n * List of currently open child windows;\r\n */\r\n readonly openChildWindows: OpenChildWindowInfo[];\r\n\r\n /**\r\n * When using React18, the `createRoot` function must be provided in order to render Popout content with React18.\r\n * Do not call if using React 17 or before.\r\n *\r\n * Note: The type of the function is intentionally simplified here.\r\n *\r\n * @param createRootFn Function imported from `import { createRoot } from \"react-dom/client\";`\r\n * @beta Will be removed once the transition to react 18 is complete.\r\n */\r\n useCreateRoot(createRootFn: CreateRoot): void;\r\n\r\n /**\r\n * Returns the OpenChildWindowInfo for the related id.\r\n * @param childWindowId Id of the window to retrieve.\r\n * @returns undefined if not found.\r\n */\r\n find(childWindowId: string | undefined): OpenChildWindowInfo | undefined;\r\n\r\n /**\r\n * Return the childWindowId of the provided window.\r\n * @param contentWindow Window element to identify\r\n * @returns undefined if not found\r\n */\r\n findId(contentWindow: Window | undefined | null): string | undefined;\r\n\r\n /** Close all child/pop-out windows. This typically is called when the frontstage is changed. */\r\n closeAll(): void;\r\n\r\n /**\r\n * Close a specific child window.\r\n * @param childWindowId Id of the window to close\r\n * @param processWindowClose should the `close` method be called on the closing window. (defaults to true)\r\n * @returns false if the window could not be found.\r\n */\r\n close(childWindowId: string, processWindowClose?: boolean): boolean;\r\n\r\n /**\r\n * Open a new child window.\r\n * @param childWindowId Id to assign to the newly created window.\r\n * @param title Title to display on the window.\r\n * @param content ReactNode to be rendered in the window.\r\n * @param location Position and size information\r\n * @param useDefaultPopoutUrl use \"/iTwinPopup.html\" as the window Url, \"\" otherwise.\r\n * @returns true if the window is opened successfully.\r\n */\r\n open(childWindowId: string, title: string, content: React.ReactNode, location: ChildWindowLocationProps, useDefaultPopoutUrl?: boolean): boolean;\r\n}\r\n"]}
|
|
@@ -47,7 +47,7 @@ export interface ContentDialogInfo {
|
|
|
47
47
|
}
|
|
48
48
|
/**
|
|
49
49
|
* [[UiFramework.content]] interface
|
|
50
|
-
* @
|
|
50
|
+
* @public
|
|
51
51
|
*/
|
|
52
52
|
export interface FrameworkContent {
|
|
53
53
|
/** Gets the [[MouseDownChangedEvent]] */
|
|
@@ -104,7 +104,7 @@ export interface FrameworkContent {
|
|
|
104
104
|
contentSupportsCamera(content: ContentControl | undefined): boolean;
|
|
105
105
|
/**
|
|
106
106
|
* Manage content layouts.
|
|
107
|
-
* @
|
|
107
|
+
* @public
|
|
108
108
|
*/
|
|
109
109
|
readonly layouts: {
|
|
110
110
|
/** build a layout key that is unique for group layout combination */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FrameworkContent.js","sourceRoot":"","sources":["../../../../src/appui-react/framework/FrameworkContent.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,0DAAoE;AAIpE,mEAAiE;AAWjE;;GAEG;AACH,MAAa,qBAAsB,SAAQ,wBAAkC;CAAI;AAAjF,sDAAiF;AAYjF;;GAEG;AACH,MAAa,yBAA0B,SAAQ,wBAAsC;CAAI;AAAzF,8DAAyF;AAEzF;;GAEG;AACH,MAAa,yBAA0B,SAAQ,sCAAkB;CAAI;AAArE,8DAAqE","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module ContentView\r\n */\r\n\r\nimport { ContentLayoutProps, UiEvent } from \"@itwin/appui-abstract\";\r\nimport { ContentControl } from \"../content/ContentControl\";\r\nimport { ContentGroup, ContentGroupProps } from \"../content/ContentGroup\";\r\nimport { ContentLayoutDef } from \"../content/ContentLayout\";\r\nimport { DialogChangedEvent } from \"../dialog/DialogManagerBase\";\r\nimport { FrameworkStackedDialog } from \"./FrameworkDialogs\";\r\n\r\n/** [[MouseDownChangedEvent]] Args interface.\r\n * @public\r\n */\r\nexport interface MouseDownChangedEventArgs {\r\n /** Indicates whether the mouse is down */\r\n mouseDown: boolean;\r\n}\r\n\r\n/** Mouse Down Changed Event class.\r\n * @public\r\n */\r\nexport class MouseDownChangedEvent extends UiEvent<MouseDownChangedEventArgs> { }\r\n\r\n/** [[ActiveContentChangedEvent]] Args interface.\r\n * @public\r\n */\r\nexport interface ActiveContentChangedEventArgs {\r\n /** React node of the old content */\r\n oldContent?: React.ReactNode;\r\n /** React node of the newly active content */\r\n activeContent?: React.ReactNode;\r\n}\r\n\r\n/** Active Content Changed Event class.\r\n * @public\r\n */\r\nexport class ActiveContentChangedEvent extends UiEvent<ActiveContentChangedEventArgs> { }\r\n\r\n/** Content Dialog Changed Event class.\r\n * @public\r\n */\r\nexport class ContentDialogChangedEvent extends DialogChangedEvent { }\r\n\r\n/** @public */\r\nexport interface ContentDialogInfo {\r\n reactNode: React.ReactNode;\r\n zIndex: number;\r\n parentDocument: Document;\r\n}\r\n\r\n/**\r\n * [[UiFramework.content]] interface\r\n * @
|
|
1
|
+
{"version":3,"file":"FrameworkContent.js","sourceRoot":"","sources":["../../../../src/appui-react/framework/FrameworkContent.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,0DAAoE;AAIpE,mEAAiE;AAWjE;;GAEG;AACH,MAAa,qBAAsB,SAAQ,wBAAkC;CAAI;AAAjF,sDAAiF;AAYjF;;GAEG;AACH,MAAa,yBAA0B,SAAQ,wBAAsC;CAAI;AAAzF,8DAAyF;AAEzF;;GAEG;AACH,MAAa,yBAA0B,SAAQ,sCAAkB;CAAI;AAArE,8DAAqE","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module ContentView\r\n */\r\n\r\nimport { ContentLayoutProps, UiEvent } from \"@itwin/appui-abstract\";\r\nimport { ContentControl } from \"../content/ContentControl\";\r\nimport { ContentGroup, ContentGroupProps } from \"../content/ContentGroup\";\r\nimport { ContentLayoutDef } from \"../content/ContentLayout\";\r\nimport { DialogChangedEvent } from \"../dialog/DialogManagerBase\";\r\nimport { FrameworkStackedDialog } from \"./FrameworkDialogs\";\r\n\r\n/** [[MouseDownChangedEvent]] Args interface.\r\n * @public\r\n */\r\nexport interface MouseDownChangedEventArgs {\r\n /** Indicates whether the mouse is down */\r\n mouseDown: boolean;\r\n}\r\n\r\n/** Mouse Down Changed Event class.\r\n * @public\r\n */\r\nexport class MouseDownChangedEvent extends UiEvent<MouseDownChangedEventArgs> { }\r\n\r\n/** [[ActiveContentChangedEvent]] Args interface.\r\n * @public\r\n */\r\nexport interface ActiveContentChangedEventArgs {\r\n /** React node of the old content */\r\n oldContent?: React.ReactNode;\r\n /** React node of the newly active content */\r\n activeContent?: React.ReactNode;\r\n}\r\n\r\n/** Active Content Changed Event class.\r\n * @public\r\n */\r\nexport class ActiveContentChangedEvent extends UiEvent<ActiveContentChangedEventArgs> { }\r\n\r\n/** Content Dialog Changed Event class.\r\n * @public\r\n */\r\nexport class ContentDialogChangedEvent extends DialogChangedEvent { }\r\n\r\n/** @public */\r\nexport interface ContentDialogInfo {\r\n reactNode: React.ReactNode;\r\n zIndex: number;\r\n parentDocument: Document;\r\n}\r\n\r\n/**\r\n * [[UiFramework.content]] interface\r\n * @public\r\n */\r\nexport interface FrameworkContent {\r\n /** Gets the [[MouseDownChangedEvent]] */\r\n readonly onMouseDownChangedEvent: MouseDownChangedEvent;\r\n\r\n /** Determines if the mouse is down in a content view */\r\n readonly isMouseDown: boolean;\r\n\r\n /** Sets the mouse down status for a content view */\r\n setMouseDown(mouseDown: boolean): void;\r\n\r\n /** Gets the [[ActiveContentChangedEvent]] */\r\n readonly onActiveContentChangedEvent: ActiveContentChangedEvent;\r\n\r\n /** Fires when floating contents are added or removed */\r\n\r\n readonly onAvailableContentChangedEvent: UiEvent<{ contentId: string }>;\r\n\r\n /** Gets the active content as a React.ReactNode. */\r\n getActive(): React.ReactNode | undefined;\r\n\r\n /** Return the active ContentControl. */\r\n getActiveContentControl(): ContentControl | undefined;\r\n\r\n addFloatingContentControl(contentControl?: ContentControl): void;\r\n\r\n dropFloatingContentControl(contentControl?: ContentControl): void;\r\n\r\n /** Sets the active [[ContentControl]] */\r\n setActive(activeContent?: React.ReactNode, forceEventProcessing?: boolean): void;\r\n\r\n /** Refreshes the active [[ContentControl]] */\r\n refreshActive(activeContent: React.ReactNode): void;\r\n\r\n /**\r\n * Determines if content displays a Sheet view.\r\n * @param content ContentControl to check\r\n */\r\n isContentSheetView(content: ContentControl | undefined): boolean;\r\n\r\n /**\r\n * Determines if content displays a Drawing view.\r\n * @param content ContentControl to check\r\n */\r\n isContentDrawingView(content: ContentControl | undefined): boolean;\r\n\r\n /**\r\n * Determines if content displays a Spatial view.\r\n * @param content ContentControl to check\r\n */\r\n isContentSpatialView(content: ContentControl | undefined): boolean;\r\n\r\n /**\r\n * Determines if content displays a Orthographic view.\r\n * @param content ContentControl to check\r\n */\r\n isContentOrthographicView(content: ContentControl | undefined): boolean;\r\n\r\n /**\r\n * Determines if content displays a 3d view.\r\n * @param content ContentControl to check\r\n */\r\n isContent3dView(content: ContentControl | undefined): boolean;\r\n\r\n /**\r\n * Determines if viewport supports use of a camera.\r\n * @param content ContentControl to check\r\n */\r\n contentSupportsCamera(content: ContentControl | undefined): boolean;\r\n\r\n /**\r\n * Manage content layouts.\r\n * @public\r\n */\r\n readonly layouts: {\r\n /** build a layout key that is unique for group layout combination */\r\n getKey(props: { contentGroupId: string, layoutId: string }): string;\r\n\r\n /** Return a LayoutDef that is specific to a content group.\r\n * @returns the [[ContentLayoutDef]] if found, or undefined otherwise\r\n */\r\n getForGroup(contentGroupProps: ContentGroupProps | ContentGroup, overrideContentLayout?: ContentLayoutProps): ContentLayoutDef;\r\n\r\n /** Finds a Content Layout with a given id.\r\n * @param layoutKey group specific layout id, see `getLayoutKey`\r\n * @returns the [[ContentLayoutDef]] if found, or undefined otherwise\r\n */\r\n find(layoutKey: string): ContentLayoutDef | undefined;\r\n\r\n /** Adds a Content Layout.\r\n * @param layoutId the id of the Content Layout to add\r\n * @param layoutDef the Content Layout definition to add\r\n */\r\n add(layoutId: string, layoutDef: ContentLayoutDef): void;\r\n\r\n /** Gets the active Content Layout */\r\n readonly activeLayout: ContentLayoutDef | undefined;\r\n\r\n /** Gets the active Content Group */\r\n readonly activeContentGroup: ContentGroup | undefined;\r\n\r\n /** Sets the active Content Layout, Content Group and Content Control.\r\n * @param contentLayoutDef Content layout to make active\r\n * @param contentGroup Content Group to make active\r\n */\r\n setActive(contentLayoutDef: ContentLayoutDef, contentGroup: ContentGroup): Promise<void>;\r\n\r\n /** Sets the active Content Group.\r\n * @param contentGroup Content Group to make active\r\n */\r\n setActiveContentGroup(contentGroup: ContentGroup): Promise<void>;\r\n\r\n /** Refreshes the active layout and content group.\r\n */\r\n refreshActive(): void;\r\n };\r\n /**\r\n * Manage dialogs displaying managed content.\r\n * @beta\r\n */\r\n readonly dialogs: FrameworkStackedDialog<ContentDialogInfo> & {\r\n /** Content Dialog Changed Event */\r\n readonly onContentDialogChangedEvent: ContentDialogChangedEvent;\r\n };\r\n}\r\n"]}
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
import { ConfigurableUiControlConstructor, ConfigurableUiElement } from "../configurableui/ConfigurableUiControl";
|
|
5
5
|
/**
|
|
6
6
|
* [[UiFramework.controls]] interface
|
|
7
|
-
* @
|
|
7
|
+
* @public
|
|
8
8
|
*/
|
|
9
9
|
export interface FrameworkControls {
|
|
10
10
|
/** Registers a control implementing the [[ConfigurableUiElement]] interface.
|