@itwin/appui-react 3.1.0-dev.1 → 3.1.0-dev.14
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/lib/cjs/appui-react/backstage/Backstage.d.ts +0 -2
- package/lib/cjs/appui-react/backstage/Backstage.d.ts.map +1 -1
- package/lib/cjs/appui-react/backstage/Backstage.js +0 -1
- package/lib/cjs/appui-react/backstage/Backstage.js.map +1 -1
- package/lib/cjs/appui-react/configurableui/ConfigurableUiContent.d.ts.map +1 -1
- package/lib/cjs/appui-react/configurableui/ConfigurableUiContent.js +2 -0
- package/lib/cjs/appui-react/configurableui/ConfigurableUiContent.js.map +1 -1
- package/lib/cjs/appui-react/configurableui/ConfigurableUiManager.d.ts.map +1 -1
- package/lib/cjs/appui-react/configurableui/ConfigurableUiManager.js +6 -1
- package/lib/cjs/appui-react/configurableui/ConfigurableUiManager.js.map +1 -1
- package/lib/cjs/appui-react/content/ContentControl.d.ts +6 -0
- package/lib/cjs/appui-react/content/ContentControl.d.ts.map +1 -1
- package/lib/cjs/appui-react/content/ContentControl.js +11 -1
- package/lib/cjs/appui-react/content/ContentControl.js.map +1 -1
- package/lib/cjs/appui-react/content/ContentLayout.d.ts +8 -0
- package/lib/cjs/appui-react/content/ContentLayout.d.ts.map +1 -1
- package/lib/cjs/appui-react/content/ContentLayout.js +43 -36
- package/lib/cjs/appui-react/content/ContentLayout.js.map +1 -1
- package/lib/cjs/appui-react/content/ContentLayout.scss +27 -27
- package/lib/cjs/appui-react/content/ContentViewManager.d.ts +7 -0
- package/lib/cjs/appui-react/content/ContentViewManager.d.ts.map +1 -1
- package/lib/cjs/appui-react/content/ContentViewManager.js +46 -22
- package/lib/cjs/appui-react/content/ContentViewManager.js.map +1 -1
- package/lib/cjs/appui-react/content/FloatingViewportContent.css +9 -0
- package/lib/cjs/appui-react/content/FloatingViewportContent.d.ts +25 -0
- package/lib/cjs/appui-react/content/FloatingViewportContent.d.ts.map +1 -0
- package/lib/cjs/appui-react/content/FloatingViewportContent.js +73 -0
- package/lib/cjs/appui-react/content/FloatingViewportContent.js.map +1 -0
- package/lib/cjs/appui-react/content/IModelViewport.d.ts.map +1 -1
- package/lib/cjs/appui-react/content/IModelViewport.js +1 -1
- package/lib/cjs/appui-react/content/IModelViewport.js.map +1 -1
- package/lib/cjs/appui-react/content/ViewportContentControl.d.ts +9 -0
- package/lib/cjs/appui-react/content/ViewportContentControl.d.ts.map +1 -1
- package/lib/cjs/appui-react/content/ViewportContentControl.js +24 -1
- package/lib/cjs/appui-react/content/ViewportContentControl.js.map +1 -1
- package/lib/cjs/appui-react/dialog/ContentDialog.d.ts +24 -0
- package/lib/cjs/appui-react/dialog/ContentDialog.d.ts.map +1 -0
- package/lib/cjs/appui-react/dialog/ContentDialog.js +72 -0
- package/lib/cjs/appui-react/dialog/ContentDialog.js.map +1 -0
- package/lib/cjs/appui-react/dialog/ContentDialog.scss +25 -0
- package/lib/cjs/appui-react/dialog/ContentDialogManager.d.ts +65 -0
- package/lib/cjs/appui-react/dialog/ContentDialogManager.d.ts.map +1 -0
- package/lib/cjs/appui-react/dialog/ContentDialogManager.js +148 -0
- package/lib/cjs/appui-react/dialog/ContentDialogManager.js.map +1 -0
- package/lib/cjs/appui-react/frontstage/FrontstageDef.d.ts +4 -0
- package/lib/cjs/appui-react/frontstage/FrontstageDef.d.ts.map +1 -1
- package/lib/cjs/appui-react/frontstage/FrontstageDef.js +33 -6
- package/lib/cjs/appui-react/frontstage/FrontstageDef.js.map +1 -1
- package/lib/cjs/appui-react/popup/CardPopup.scss +3 -1
- package/lib/cjs/appui-react/widget-panels/Frontstage.d.ts.map +1 -1
- package/lib/cjs/appui-react/widget-panels/Frontstage.js +10 -5
- package/lib/cjs/appui-react/widget-panels/Frontstage.js.map +1 -1
- package/lib/cjs/appui-react.d.ts +3 -0
- package/lib/cjs/appui-react.d.ts.map +1 -1
- package/lib/cjs/appui-react.js +3 -0
- package/lib/cjs/appui-react.js.map +1 -1
- package/lib/esm/appui-react/backstage/Backstage.d.ts +0 -2
- package/lib/esm/appui-react/backstage/Backstage.d.ts.map +1 -1
- package/lib/esm/appui-react/backstage/Backstage.js +0 -1
- package/lib/esm/appui-react/backstage/Backstage.js.map +1 -1
- package/lib/esm/appui-react/configurableui/ConfigurableUiContent.d.ts.map +1 -1
- package/lib/esm/appui-react/configurableui/ConfigurableUiContent.js +2 -0
- package/lib/esm/appui-react/configurableui/ConfigurableUiContent.js.map +1 -1
- package/lib/esm/appui-react/configurableui/ConfigurableUiManager.d.ts.map +1 -1
- package/lib/esm/appui-react/configurableui/ConfigurableUiManager.js +6 -1
- package/lib/esm/appui-react/configurableui/ConfigurableUiManager.js.map +1 -1
- package/lib/esm/appui-react/content/ContentControl.d.ts +6 -0
- package/lib/esm/appui-react/content/ContentControl.d.ts.map +1 -1
- package/lib/esm/appui-react/content/ContentControl.js +10 -1
- package/lib/esm/appui-react/content/ContentControl.js.map +1 -1
- package/lib/esm/appui-react/content/ContentLayout.d.ts +8 -0
- package/lib/esm/appui-react/content/ContentLayout.d.ts.map +1 -1
- package/lib/esm/appui-react/content/ContentLayout.js +41 -35
- package/lib/esm/appui-react/content/ContentLayout.js.map +1 -1
- package/lib/esm/appui-react/content/ContentLayout.scss +27 -27
- package/lib/esm/appui-react/content/ContentViewManager.d.ts +7 -0
- package/lib/esm/appui-react/content/ContentViewManager.d.ts.map +1 -1
- package/lib/esm/appui-react/content/ContentViewManager.js +46 -22
- package/lib/esm/appui-react/content/ContentViewManager.js.map +1 -1
- package/lib/esm/appui-react/content/FloatingViewportContent.css +9 -0
- package/lib/esm/appui-react/content/FloatingViewportContent.d.ts +25 -0
- package/lib/esm/appui-react/content/FloatingViewportContent.d.ts.map +1 -0
- package/lib/esm/appui-react/content/FloatingViewportContent.js +69 -0
- package/lib/esm/appui-react/content/FloatingViewportContent.js.map +1 -0
- package/lib/esm/appui-react/content/IModelViewport.d.ts.map +1 -1
- package/lib/esm/appui-react/content/IModelViewport.js +1 -1
- package/lib/esm/appui-react/content/IModelViewport.js.map +1 -1
- package/lib/esm/appui-react/content/ViewportContentControl.d.ts +9 -0
- package/lib/esm/appui-react/content/ViewportContentControl.d.ts.map +1 -1
- package/lib/esm/appui-react/content/ViewportContentControl.js +23 -1
- package/lib/esm/appui-react/content/ViewportContentControl.js.map +1 -1
- package/lib/esm/appui-react/dialog/ContentDialog.d.ts +24 -0
- package/lib/esm/appui-react/dialog/ContentDialog.d.ts.map +1 -0
- package/lib/esm/appui-react/dialog/ContentDialog.js +67 -0
- package/lib/esm/appui-react/dialog/ContentDialog.js.map +1 -0
- package/lib/esm/appui-react/dialog/ContentDialog.scss +25 -0
- package/lib/esm/appui-react/dialog/ContentDialogManager.d.ts +65 -0
- package/lib/esm/appui-react/dialog/ContentDialogManager.d.ts.map +1 -0
- package/lib/esm/appui-react/dialog/ContentDialogManager.js +142 -0
- package/lib/esm/appui-react/dialog/ContentDialogManager.js.map +1 -0
- package/lib/esm/appui-react/frontstage/FrontstageDef.d.ts +4 -0
- package/lib/esm/appui-react/frontstage/FrontstageDef.d.ts.map +1 -1
- package/lib/esm/appui-react/frontstage/FrontstageDef.js +33 -6
- package/lib/esm/appui-react/frontstage/FrontstageDef.js.map +1 -1
- package/lib/esm/appui-react/popup/CardPopup.scss +3 -1
- package/lib/esm/appui-react/widget-panels/Frontstage.d.ts.map +1 -1
- package/lib/esm/appui-react/widget-panels/Frontstage.js +10 -5
- package/lib/esm/appui-react/widget-panels/Frontstage.js.map +1 -1
- package/lib/esm/appui-react.d.ts +3 -0
- package/lib/esm/appui-react.d.ts.map +1 -1
- package/lib/esm/appui-react.js +3 -0
- package/lib/esm/appui-react.js.map +1 -1
- package/package.json +33 -33
|
@@ -17,7 +17,6 @@ export declare class BackstageEvent extends UiEvent<BackstageEventArgs> {
|
|
|
17
17
|
}
|
|
18
18
|
/** Properties for the [[Backstage]] React component.
|
|
19
19
|
* @public
|
|
20
|
-
* @deprecated use [BackstageComposer]($appui-react) instead.
|
|
21
20
|
*/
|
|
22
21
|
export interface BackstageProps extends CommonProps {
|
|
23
22
|
isVisible?: boolean;
|
|
@@ -33,7 +32,6 @@ interface BackstageState {
|
|
|
33
32
|
}
|
|
34
33
|
/** Backstage React component.
|
|
35
34
|
* @public
|
|
36
|
-
* @deprecated use [BackstageComposer]($appui-react) instead.
|
|
37
35
|
*/
|
|
38
36
|
export declare class Backstage extends React.Component<BackstageProps, BackstageState> {
|
|
39
37
|
static readonly onBackstageEvent: BackstageEvent;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Backstage.d.ts","sourceRoot":"","sources":["../../../../src/appui-react/backstage/Backstage.tsx"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,WAAW,EAAE,QAAQ,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAQnE;;;GAGG;AACH,MAAM,WAAW,kBAAkB;IACjC,SAAS,EAAE,OAAO,CAAC;CACpB;AAED;;GAEG;AACH,qBAAa,cAAe,SAAQ,OAAO,CAAC,kBAAkB,CAAC;CAAI;AAEnE
|
|
1
|
+
{"version":3,"file":"Backstage.d.ts","sourceRoot":"","sources":["../../../../src/appui-react/backstage/Backstage.tsx"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,WAAW,EAAE,QAAQ,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAQnE;;;GAGG;AACH,MAAM,WAAW,kBAAkB;IACjC,SAAS,EAAE,OAAO,CAAC;CACpB;AAED;;GAEG;AACH,qBAAa,cAAe,SAAQ,OAAO,CAAC,kBAAkB,CAAC;CAAI;AAEnE;;GAEG;AACH,MAAM,WAAW,cAAe,SAAQ,WAAW;IACjD,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,MAAM,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAC1B;AAED;;GAEG;AACH,UAAU,cAAc;IACtB,SAAS,EAAE,OAAO,CAAC;CACpB;AAED;;GAEG;AACH,qBAAa,SAAU,SAAQ,KAAK,CAAC,SAAS,CAAC,cAAc,EAAE,cAAc,CAAC;IAE5E,gBAAuB,gBAAgB,iBAAwB;IAC/D,OAAc,kBAAkB,EAAE,OAAO,CAAC;IAE1C,0BAA0B;WACZ,IAAI,IAAI,IAAI;IAI1B,0BAA0B;WACZ,IAAI,IAAI,IAAI;IAI1B,mGAAmG;WACrF,yBAAyB,CAAC,gBAAgB,CAAC,EAAE,QAAQ;IAInE,yCAAyC;IACzC,WAAkB,sBAAsB,sDAEvC;IAED,gBAAgB;IAChB,SAAyB,KAAK,EAAE,cAAc,CAAC;gBAEnC,KAAK,EAAE,cAAc;IASjB,iBAAiB;IAIjB,oBAAoB;IAIpC,OAAO,CAAC,qBAAqB,CAE3B;IAEc,kBAAkB,CAAC,SAAS,EAAE,cAAc;IAK5D,OAAO,CAAC,SAAS;IAQjB,OAAO,CAAC,QAAQ,CAMd;IAEc,MAAM,IAAI,KAAK,CAAC,SAAS;CA0B1C"}
|
|
@@ -22,7 +22,6 @@ class BackstageEvent extends core_react_1.UiEvent {
|
|
|
22
22
|
exports.BackstageEvent = BackstageEvent;
|
|
23
23
|
/** Backstage React component.
|
|
24
24
|
* @public
|
|
25
|
-
* @deprecated use [BackstageComposer]($appui-react) instead.
|
|
26
25
|
*/
|
|
27
26
|
class Backstage extends React.Component {
|
|
28
27
|
constructor(props) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Backstage.js","sourceRoot":"","sources":["../../../../src/appui-react/backstage/Backstage.tsx"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,+BAA+B;AAC/B,kDAAmE;AACnE,kEAAsE;AACtE,iEAA8D;AAC9D,gDAA6C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CAAC,KAAK,CAAC,SAAS,EAC/B,MAAM,EAAE,MAAM,EACd,MAAM,EAAE,IAAI,CAAC,KAAK,CAAC,SAAS,EAC5B,OAAO,EAAE,IAAI,CAAC,QAAQ,EACtB,cAAc,EAAE,cAAc,EAC9B,WAAW,EAAE,IAAI,CAAC,KAAK,CAAC,WAAW,EACnC,KAAK,EAAE,IAAI,CAAC,KAAK,CAAC,KAAK,IAEtB,IAAI,CAAC,KAAK,CAAC,QAAQ,CACP,CAChB,CACwB,CAC5B,CAAC;IACJ,CAAC;;AA/FH,8BAgGC;AA9FwB,0BAAgB,GAAG,IAAI,cAAc,EAAE,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module Backstage\r\n */\r\n\r\nimport * as React from \"react\";\r\nimport { CommonProps, IconSpec, UiEvent } from \"@itwin/core-react\";\r\nimport { Backstage as NZ_Backstage } from \"@itwin/appui-layout-react\";\r\nimport { SafeAreaContext } from \"../safearea/SafeAreaContext\";\r\nimport { UiFramework } from \"../UiFramework\";\r\nimport { BackstageManager } from \"./BackstageManager\";\r\n\r\n// cSpell:ignore safearea\r\n\r\n/** [[BackstageEvent]] arguments.\r\n * @public\r\n * @deprecated use [BackstageComposer]($appui-react) instead.\r\n */\r\nexport interface BackstageEventArgs {\r\n isVisible: boolean;\r\n}\r\n\r\n/** Backstage Event class.\r\n * @public\r\n */\r\nexport class BackstageEvent extends UiEvent<BackstageEventArgs> { } // eslint-disable-line deprecation/deprecation\r\n\r\n/** Properties for the [[Backstage]] React component.\r\n * @public\r\n */\r\nexport interface BackstageProps extends CommonProps {\r\n isVisible?: boolean;\r\n showOverlay?: boolean;\r\n onClose?: () => void;\r\n header?: React.ReactNode;\r\n}\r\n\r\n/** State for the [[Backstage]] React component.\r\n * @internal\r\n */\r\ninterface BackstageState {\r\n isVisible: boolean;\r\n}\r\n\r\n/** Backstage React component.\r\n * @public\r\n */\r\nexport class Backstage extends React.Component<BackstageProps, BackstageState> { // eslint-disable-line deprecation/deprecation\r\n\r\n public static readonly onBackstageEvent = new BackstageEvent();\r\n public static isBackstageVisible: boolean;\r\n\r\n /** Shows the Backstage */\r\n public static show(): void {\r\n UiFramework.backstageManager.open();\r\n }\r\n\r\n /** Hides the Backstage */\r\n public static hide(): void {\r\n UiFramework.backstageManager.close();\r\n }\r\n\r\n /** Get CommandItemDef that will toggle display of Backstage and allow iconSpec to be overridden */\r\n public static getBackstageToggleCommand(overrideIconSpec?: IconSpec) {\r\n return BackstageManager.getBackstageToggleCommand(overrideIconSpec);\r\n }\r\n\r\n /** Command that toggles the Backstage */\r\n public static get backstageToggleCommand() {\r\n return this.getBackstageToggleCommand();\r\n }\r\n\r\n /** @internal */\r\n public override readonly state: BackstageState;\r\n\r\n constructor(props: BackstageProps) { // eslint-disable-line deprecation/deprecation\r\n super(props);\r\n\r\n this.setIsOpen(!!this.props.isVisible);\r\n this.state = {\r\n isVisible: UiFramework.backstageManager.isOpen,\r\n };\r\n }\r\n\r\n public override componentDidMount() {\r\n Backstage.onBackstageEvent.addListener(this._handleBackstageEvent); // eslint-disable-line deprecation/deprecation\r\n }\r\n\r\n public override componentWillUnmount() {\r\n Backstage.onBackstageEvent.removeListener(this._handleBackstageEvent); // eslint-disable-line deprecation/deprecation\r\n }\r\n\r\n private _handleBackstageEvent = (args: BackstageEventArgs) => { // eslint-disable-line deprecation/deprecation\r\n this.setState({ isVisible: args.isVisible });\r\n };\r\n\r\n public override componentDidUpdate(prevProps: BackstageProps) { // eslint-disable-line deprecation/deprecation\r\n if (this.props.isVisible !== prevProps.isVisible)\r\n this.setIsOpen(!!this.props.isVisible);\r\n }\r\n\r\n private setIsOpen(isOpen: boolean) {\r\n if (isOpen) {\r\n UiFramework.backstageManager.open();\r\n } else {\r\n UiFramework.backstageManager.close();\r\n }\r\n }\r\n\r\n private _onClose = () => {\r\n Backstage.hide(); // eslint-disable-line deprecation/deprecation\r\n\r\n /* istanbul ignore else */\r\n if (this.props.onClose)\r\n this.props.onClose();\r\n };\r\n\r\n public override render(): React.ReactNode {\r\n Backstage.isBackstageVisible = this.state.isVisible; // eslint-disable-line deprecation/deprecation\r\n\r\n let header: React.ReactNode = null;\r\n\r\n if (this.props.header)\r\n header = this.props.header;\r\n\r\n return (\r\n <SafeAreaContext.Consumer>\r\n {(safeAreaInsets) => (\r\n <NZ_Backstage\r\n className={this.props.className}\r\n header={header}\r\n isOpen={this.state.isVisible}\r\n onClose={this._onClose}\r\n safeAreaInsets={safeAreaInsets}\r\n showOverlay={this.props.showOverlay}\r\n style={this.props.style}\r\n >\r\n {this.props.children}\r\n </NZ_Backstage>\r\n )}\r\n </SafeAreaContext.Consumer>\r\n );\r\n }\r\n}\r\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ConfigurableUiContent.d.ts","sourceRoot":"","sources":["../../../../src/appui-react/configurableui/ConfigurableUiContent.tsx"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,uBAAuB,CAAC;AAC/B,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,WAAW,EAAS,MAAM,mBAAmB,CAAC;
|
|
1
|
+
{"version":3,"file":"ConfigurableUiContent.d.ts","sourceRoot":"","sources":["../../../../src/appui-react/configurableui/ConfigurableUiContent.tsx"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,uBAAuB,CAAC;AAC/B,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,WAAW,EAAS,MAAM,mBAAmB,CAAC;AAoBvD;;GAEG;AACH,MAAM,WAAW,0BAA2B,SAAQ,WAAW;IAC7D,kCAAkC;IAClC,YAAY,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAE/B,gBAAgB;IAChB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,gBAAgB;IAChB,eAAe,CAAC,EAAE,MAAM,CAAC;CAC1B;AAED;;GAEG;AACH,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,0BAA0B,eAuCtE"}
|
|
@@ -26,6 +26,7 @@ const Pointer_1 = require("../messages/Pointer");
|
|
|
26
26
|
const PopupManager_1 = require("../popup/PopupManager");
|
|
27
27
|
const Frontstage_1 = require("../widget-panels/Frontstage");
|
|
28
28
|
const ConfigurableUiManager_1 = require("./ConfigurableUiManager");
|
|
29
|
+
const ContentDialogManager_1 = require("../dialog/ContentDialogManager");
|
|
29
30
|
/** The ConfigurableUiContent component is the component the pages specified using ConfigurableUi
|
|
30
31
|
* @public
|
|
31
32
|
*/
|
|
@@ -47,6 +48,7 @@ function ConfigurableUiContent(props) {
|
|
|
47
48
|
return (React.createElement("main", { role: "main", id: "uifw-configurableui-wrapper", className: props.className, style: props.style, onMouseMove: handleMouseMove },
|
|
48
49
|
props.appBackstage,
|
|
49
50
|
version === "1" ? React.createElement(FrontstageComposer_1.FrontstageComposer, { style: { position: "relative", height: "100%" } }) : /* istanbul ignore next */ React.createElement(Frontstage_1.WidgetPanelsFrontstage, null),
|
|
51
|
+
React.createElement(ContentDialogManager_1.ContentDialogRenderer, null),
|
|
50
52
|
React.createElement(ModelessDialogManager_1.ModelessDialogRenderer, null),
|
|
51
53
|
React.createElement(ModalDialogManager_1.ModalDialogRenderer, null),
|
|
52
54
|
React.createElement(ElementTooltip_1.ElementTooltip, null),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ConfigurableUiContent.js","sourceRoot":"","sources":["../../../../src/appui-react/configurableui/ConfigurableUiContent.tsx"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,iCAA+B;AAC/B,+BAA+B;AAC/B,kDAAuD;AACvD,mEAAgE;AAChE,gEAAkE;AAClE,iFAA+E;AAC/E,qEAAmE;AACnE,2EAAyE;AACzE,+DAA4D;AAC5D,yEAAsE;AACtE,sEAAmE;AACnE,2EAA+E;AAC/E,mFAAgF;AAChF,uDAA2D;AAC3D,iDAAqD;AACrD,wDAAsD;AACtD,4DAAqE;AACrE,mEAAgE;
|
|
1
|
+
{"version":3,"file":"ConfigurableUiContent.js","sourceRoot":"","sources":["../../../../src/appui-react/configurableui/ConfigurableUiContent.tsx"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,iCAA+B;AAC/B,+BAA+B;AAC/B,kDAAuD;AACvD,mEAAgE;AAChE,gEAAkE;AAClE,iFAA+E;AAC/E,qEAAmE;AACnE,2EAAyE;AACzE,+DAA4D;AAC5D,yEAAsE;AACtE,sEAAmE;AACnE,2EAA+E;AAC/E,mFAAgF;AAChF,uDAA2D;AAC3D,iDAAqD;AACrD,wDAAsD;AACtD,4DAAqE;AACrE,mEAAgE;AAChE,yEAAuE;AAiBvE;;GAEG;AACH,SAAgB,qBAAqB,CAAC,KAAiC;IACrE,MAAM,OAAO,GAAG,IAAA,yCAAmB,GAAE,CAAC;IACtC,KAAK,CAAC,SAAS,CAAC,GAAG,EAAE;QACnB,0CAAuB,CAAC,cAAc,EAAE,CAAC;IAC3C,CAAC,EAAE,EAAE,CAAC,CAAC;IACP,KAAK,CAAC,SAAS,CAAC,GAAG,EAAE;QACnB,6CAAqB,CAAC,eAAe,CAAC,UAAU,CAAC,EAAE,WAAW,EAAE,KAAK,CAAC,WAAW,EAAE,eAAe,EAAE,KAAK,CAAC,eAAe,EAAE,CAAC,CAAC;QAC7H,OAAO,GAAG,EAAE;YACV,6CAAqB,CAAC,eAAe,CAAC,SAAS,EAAE,CAAC;QACpD,CAAC,CAAC;IACJ,CAAC,EAAE,CAAC,KAAK,CAAC,WAAW,EAAE,KAAK,CAAC,eAAe,CAAC,CAAC,CAAC;IAE/C,MAAM,eAAe,GAAG,KAAK,CAAC,WAAW,CAAC,CAAC,CAAmB,EAAE,EAAE;QAChE,MAAM,KAAK,GAAG,IAAI,kBAAK,CAAC,CAAC,CAAC,KAAK,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC;QAC1C,qCAAiB,CAAC,eAAe,CAAC,KAAK,CAAC,CAAC;IAC3C,CAAC,EAAE,EAAE,CAAC,CAAC;IAEP,OAAO,CACL,8BAAM,IAAI,EAAC,MAAM,EACf,EAAE,EAAC,6BAA6B,EAChC,SAAS,EAAE,KAAK,CAAC,SAAS,EAC1B,KAAK,EAAE,KAAK,CAAC,KAAK,EAClB,WAAW,EAAE,eAAe;QAE3B,KAAK,CAAC,YAAY;QAElB,OAAO,KAAK,GAAG,CAAC,CAAC,CAAC,oBAAC,uCAAkB,IAAC,KAAK,EAAE,EAAE,QAAQ,EAAE,UAAU,EAAE,MAAM,EAAE,MAAM,EAAE,GAAI,CAAC,CAAC,CAAC,0BAA0B,CAAC,oBAAC,mCAAsB,OAAG;QAClJ,oBAAC,4CAAqB,OAAG;QACzB,oBAAC,8CAAsB,OAAG;QAC1B,oBAAC,wCAAmB,OAAG;QACvB,oBAAC,+BAAc,OAAG;QAClB,oBAAC,wBAAc,OAAG;QAClB,oBAAC,2CAAoB,OAAG;QACxB,oBAAC,8BAAiB,OAAG;QACrB,oBAAC,4BAAe,OAAG;QACnB,oBAAC,wCAAmB,OAAG;QACvB,oBAAC,4BAAa,OAAG,CACZ,CACR,CAAC;AACJ,CAAC;AAvCD,sDAuCC","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 ConfigurableUi\r\n */\r\n\r\nimport \"./configurableui.scss\";\r\nimport * as React from \"react\";\r\nimport { CommonProps, Point } from \"@itwin/core-react\";\r\nimport { CursorInformation } from \"../cursor/CursorInformation\";\r\nimport { CursorPopupMenu } from \"../cursor/cursormenu/CursorMenu\";\r\nimport { CursorPopupRenderer } from \"../cursor/cursorpopup/CursorPopupManager\";\r\nimport { ModalDialogRenderer } from \"../dialog/ModalDialogManager\";\r\nimport { ModelessDialogRenderer } from \"../dialog/ModelessDialogManager\";\r\nimport { ElementTooltip } from \"../feedback/ElementTooltip\";\r\nimport { FrontstageComposer } from \"../frontstage/FrontstageComposer\";\r\nimport { useFrameworkVersion } from \"../hooks/useFrameworkVersion\";\r\nimport { KeyboardShortcutManager } from \"../keyboardshortcut/KeyboardShortcut\";\r\nimport { KeyboardShortcutMenu } from \"../keyboardshortcut/KeyboardShortcutMenu\";\r\nimport { InputFieldMessage } from \"../messages/InputField\";\r\nimport { PointerMessage } from \"../messages/Pointer\";\r\nimport { PopupRenderer } from \"../popup/PopupManager\";\r\nimport { WidgetPanelsFrontstage } from \"../widget-panels/Frontstage\";\r\nimport { ConfigurableUiManager } from \"./ConfigurableUiManager\";\r\nimport { ContentDialogRenderer } from \"../dialog/ContentDialogManager\";\r\n\r\n// cSpell:ignore cursormenu cursorpopup\r\n\r\n/** Properties for [[ConfigurableUiContent]]\r\n * @public\r\n */\r\nexport interface ConfigurableUiContentProps extends CommonProps {\r\n /** React node of the Backstage */\r\n appBackstage?: React.ReactNode;\r\n\r\n /** @internal */\r\n idleTimeout?: number;\r\n /** @internal */\r\n intervalTimeout?: number;\r\n}\r\n\r\n/** The ConfigurableUiContent component is the component the pages specified using ConfigurableUi\r\n * @public\r\n */\r\nexport function ConfigurableUiContent(props: ConfigurableUiContentProps) {\r\n const version = useFrameworkVersion();\r\n React.useEffect(() => {\r\n KeyboardShortcutManager.setFocusToHome();\r\n }, []);\r\n React.useEffect(() => {\r\n ConfigurableUiManager.activityTracker.initialize({ idleTimeout: props.idleTimeout, intervalTimeout: props.intervalTimeout });\r\n return () => {\r\n ConfigurableUiManager.activityTracker.terminate();\r\n };\r\n }, [props.idleTimeout, props.intervalTimeout]);\r\n\r\n const handleMouseMove = React.useCallback((e: React.MouseEvent) => {\r\n const point = new Point(e.pageX, e.pageY);\r\n CursorInformation.handleMouseMove(point);\r\n }, []);\r\n\r\n return (\r\n <main role=\"main\"\r\n id=\"uifw-configurableui-wrapper\"\r\n className={props.className}\r\n style={props.style}\r\n onMouseMove={handleMouseMove}\r\n >\r\n {props.appBackstage}\r\n {/* eslint-disable-next-line deprecation/deprecation */}\r\n {version === \"1\" ? <FrontstageComposer style={{ position: \"relative\", height: \"100%\" }} /> : /* istanbul ignore next */ <WidgetPanelsFrontstage />}\r\n <ContentDialogRenderer />\r\n <ModelessDialogRenderer />\r\n <ModalDialogRenderer />\r\n <ElementTooltip />\r\n <PointerMessage />\r\n <KeyboardShortcutMenu />\r\n <InputFieldMessage />\r\n <CursorPopupMenu />\r\n <CursorPopupRenderer />\r\n <PopupRenderer />\r\n </main>\r\n );\r\n}\r\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ConfigurableUiManager.d.ts","sourceRoot":"","sources":["../../../../src/appui-react/configurableui/ConfigurableUiManager.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAGhD,OAAO,EAAE,kBAAkB,EAAE,MAAM,kCAAkC,CAAC;AACtE,OAAO,EAA2B,qBAAqB,EAAE,MAAM,sCAAsC,CAAC;AAOtG,OAAO,EAAe,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAC9D,OAAO,EAAmB,aAAa,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AAEzF,OAAO,EAA0B,gCAAgC,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AAK1H,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;
|
|
1
|
+
{"version":3,"file":"ConfigurableUiManager.d.ts","sourceRoot":"","sources":["../../../../src/appui-react/configurableui/ConfigurableUiManager.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAGhD,OAAO,EAAE,kBAAkB,EAAE,MAAM,kCAAkC,CAAC;AACtE,OA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AE,QAAQ,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,GAAG,EAAE,SAAS,CAAC,EAAE,MAAM,GAAG,qBAAqB,GAAG,SAAS;IAWpI;;OAEG;WACW,qBAAqB,CAAC,kBAAkB,EAAE,kBAAkB,GAAG,IAAI;IAIjF;;;;OAIG;WACW,SAAS,CAAC,aAAa,EAAE,aAAa,GAAG,IAAI;IAI3D;;;;OAIG;WACW,YAAY,CAAC,aAAa,EAAE,aAAa,GAAG,IAAI;IAI9D;;;;OAIG;WACW,aAAa,CAAC,iBAAiB,EAAE,iBAAiB,GAAG,IAAI;IAIvE;;OAEG;WACW,qBAAqB,CAAC,YAAY,EAAE,qBAAqB,EAAE,GAAG,IAAI;IAIhF,wDAAwD;WAC1C,iBAAiB,IAAI,WAAW;IAM9C,0CAA0C;WAC5B,OAAO,IAAI,IAAI;CAU9B"}
|
|
@@ -27,6 +27,7 @@ const ModalDialogManager_1 = require("../dialog/ModalDialogManager");
|
|
|
27
27
|
const MessageManager_1 = require("../messages/MessageManager");
|
|
28
28
|
const PopupManager_1 = require("../popup/PopupManager");
|
|
29
29
|
const ActivityTracker_1 = require("./ActivityTracker");
|
|
30
|
+
const ContentDialogManager_1 = require("../dialog/ContentDialogManager");
|
|
30
31
|
/** Ui Activity Event class.
|
|
31
32
|
* @internal
|
|
32
33
|
*/
|
|
@@ -58,8 +59,11 @@ class ConfigurableUiManager {
|
|
|
58
59
|
FrontstageManager_1.FrontstageManager.initialize();
|
|
59
60
|
// Initialize the ToolSettingsManager that manages Tool Settings properties.
|
|
60
61
|
ToolSettingsManager_1.ToolSettingsManager.initialize();
|
|
61
|
-
// Initialize
|
|
62
|
+
// Initialize dialog managers that allow one or more dialogs to be open at a time. These managers adjust the z-indexing
|
|
63
|
+
// to ensure the most recently focused dialog of a specific type displays above its siblings.
|
|
62
64
|
ModelessDialogManager_1.ModelessDialogManager.initialize();
|
|
65
|
+
// ContentDialog have a z-index just above the fixed content views and below all other UI elements.
|
|
66
|
+
ContentDialogManager_1.ContentDialogManager.initialize();
|
|
63
67
|
// Initialize the Keyboard Shortcut manager
|
|
64
68
|
KeyboardShortcut_1.KeyboardShortcutManager.initialize();
|
|
65
69
|
this._initialized = true;
|
|
@@ -169,6 +173,7 @@ class ConfigurableUiManager {
|
|
|
169
173
|
MessageManager_1.MessageManager.closeAllMessages();
|
|
170
174
|
ModelessDialogManager_1.ModelessDialogManager.closeAll();
|
|
171
175
|
ModalDialogManager_1.ModalDialogManager.closeAll();
|
|
176
|
+
ContentDialogManager_1.ContentDialogManager.closeAll();
|
|
172
177
|
KeyboardShortcut_1.KeyboardShortcutManager.closeShortcutsMenu();
|
|
173
178
|
UiFramework_1.UiFramework.closeCursorMenu();
|
|
174
179
|
PopupManager_1.PopupManager.clearPopups();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ConfigurableUiManager.js","sourceRoot":"","sources":["../../../../src/appui-react/configurableui/ConfigurableUiManager.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,sDAAgD;AAChD,0DAAgD;AAChD,uEAAoE;AAEpE,2EAAsG;AACtG,yFAAsF;AACtF,+FAA4F;AAC5F,6EAAiF;AACjF,mGAAuG;AACvG,2EAAwE;AACxE,gDAA6C;AAC7C,2CAA8D;AAC9D,mDAAyF;AACzF,mFAAgF;AAChF,mEAA0H;AAC1H,2EAAwE;AACxE,qEAAkE;AAClE,+DAA4D;AAC5D,wDAAqD;AACrD,uDAAoD;AASpD;;GAEG;AACH,MAAa,eAAgB,SAAQ,wBAA8B;CAAI;AAAvE,0CAAuE;AASvE;;GAEG;AACH,MAAa,eAAgB,SAAQ,wBAA8B;CAAI;AAAvE,0CAAuE;AAEvE;;GAEG;AACH,MAAa,qBAAqB;IAWhC,yEAAyE;IAClE,MAAM,CAAC,UAAU;QACtB,IAAI,IAAI,CAAC,YAAY;YACnB,OAAO;QAET,yBAAyB;QACzB,qBAAqB,CAAC,eAAe,CAAC,oEAAo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AAC,aAA4B;QACrD,0BAAe,CAAC,YAAY,CAAC,aAAa,CAAC,CAAC,CAAI,8CAA8C;IAChG,CAAC;IAED;;;;OAIG;IACI,MAAM,CAAC,aAAa,CAAC,iBAAoC;QAC9D,0BAAe,CAAC,aAAa,CAAC,iBAAiB,CAAC,CAAC,CAAG,8CAA8C;IACpG,CAAC;IAED;;OAEG;IACI,MAAM,CAAC,qBAAqB,CAAC,YAAqC;QACvE,0CAAuB,CAAC,qBAAqB,CAAC,YAAY,CAAC,CAAC;IAC9D,CAAC;IAED,wDAAwD;IACjD,MAAM,CAAC,iBAAiB;QAC7B,MAAM,OAAO,GAAG,QAAQ,CAAC,cAAc,CAAC,6BAA6B,CAAC,CAAC;QACvE,MAAM,WAAW,GAAG,OAAQ,CAAC;QAC7B,OAAO,WAAW,CAAC;IACrB,CAAC;IAED,0CAA0C;IACnC,MAAM,CAAC,OAAO;QACnB,+BAAc,CAAC,gBAAgB,EAAE,CAAC;QAClC,6CAAqB,CAAC,QAAQ,EAAE,CAAC;QACjC,uCAAkB,CAAC,QAAQ,EAAE,CAAC;QAC9B,0CAAuB,CAAC,kBAAkB,EAAE,CAAC;QAC7C,yBAAW,CAAC,eAAe,EAAE,CAAC;QAC9B,2BAAY,CAAC,WAAW,EAAE,CAAC;IAC7B,CAAC;;AAlKH,sDAoKC;AAnKgB,yCAAmB,GAAG,IAAI,GAAG,EAA4C,CAAC;AAC1E,kCAAY,GAAG,KAAK,CAAC;AAEpC,gBAAgB;AACO,qCAAe,GAAG,IAAI,iCAAe,EAAE,CAAC;AAC/D,gBAAgB;AACO,uCAAiB,GAAG,IAAI,eAAe,EAAE,CAAC;AACjE,gBAAgB;AACO,uCAAiB,GAAG,IAAI,eAAe,EAAE,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module ConfigurableUi\r\n */\r\n\r\nimport { BeUiEvent } from \"@itwin/core-bentley\";\r\nimport { UiError } from \"@itwin/appui-abstract\";\r\nimport { FrontstageManager } from \"../frontstage/FrontstageManager\";\r\nimport { FrontstageProvider } from \"../frontstage/FrontstageProvider\";\r\nimport { KeyboardShortcutManager, KeyboardShortcutProps } from \"../keyboardshortcut/KeyboardShortcut\";\r\nimport { CubeNavigationAidControl } from \"../navigationaids/CubeNavigationAidControl\";\r\nimport { DrawingNavigationAidControl } from \"../navigationaids/DrawingNavigationAidControl\";\r\nimport { SheetNavigationAidControl } from \"../navigationaids/SheetNavigationAid\";\r\nimport { StandardRotationNavigationAidControl } from \"../navigationaids/StandardRotationNavigationAid\";\r\nimport { SyncUiEventDispatcher } from \"../syncui/SyncUiEventDispatcher\";\r\nimport { UiFramework } from \"../UiFramework\";\r\nimport { TaskManager, TaskPropsList } from \"../workflow/Task\";\r\nimport { WorkflowManager, WorkflowProps, WorkflowPropsList } from \"../workflow/Workflow\";\r\nimport { ToolSettingsManager } from \"../zones/toolsettings/ToolSettingsManager\";\r\nimport { ConfigurableCreateInfo, ConfigurableUiControlConstructor, ConfigurableUiElement } from \"./ConfigurableUiControl\";\r\nimport { ModelessDialogManager } from \"../dialog/ModelessDialogManager\";\r\nimport { ModalDialogManager } from \"../dialog/ModalDialogManager\";\r\nimport { MessageManager } from \"../messages/MessageManager\";\r\nimport { PopupManager } from \"../popup/PopupManager\";\r\nimport { ActivityTracker } from \"./ActivityTracker\";\r\n\r\n/** Ui Activity Event Args interface.\r\n * @internal\r\n */\r\nexport interface UiActivityEventArgs {\r\n event: Event;\r\n}\r\n\r\n/** Ui Activity Event class.\r\n * @internal\r\n */\r\nexport class UiActivityEvent extends BeUiEvent<UiActivityEventArgs> { }\r\n\r\n/** Ui Interval Event Args interface\r\n * @internal\r\n */\r\nexport interface UiIntervalEventArgs {\r\n idleTimeout?: number;\r\n}\r\n\r\n/** Ui Interval Event class.\r\n * @internal\r\n */\r\nexport class UiIntervalEvent extends BeUiEvent<UiIntervalEventArgs> { }\r\n\r\n/** Configurable Ui Manager maintains controls, Frontstages, Content Groups, Content Layouts, Tasks and Workflows.\r\n * @public\r\n */\r\nexport class ConfigurableUiManager {\r\n private static _registeredControls = new Map<string, ConfigurableUiControlConstructor>();\r\n private static _initialized = false;\r\n\r\n /** @internal */\r\n public static readonly activityTracker = new ActivityTracker();\r\n /** @internal */\r\n public static readonly onUiActivityEvent = new UiActivityEvent();\r\n /** @internal */\r\n public static readonly onUiIntervalEvent = new UiIntervalEvent();\r\n\r\n /** Initializes the ConfigurableUiManager and registers core controls. */\r\n public static initialize() {\r\n if (this._initialized)\r\n return;\r\n\r\n // Register core controls\r\n ConfigurableUiManager.registerControl(StandardRotationNavigationAidControl.navigationAidId, StandardRotationNavigationAidControl);\r\n ConfigurableUiManager.registerControl(SheetNavigationAidControl.navigationAidId, SheetNavigationAidControl);\r\n ConfigurableUiManager.registerControl(DrawingNavigationAidControl.navigationAidId, DrawingNavigationAidControl);\r\n ConfigurableUiManager.registerControl(CubeNavigationAidControl.navigationAidId, CubeNavigationAidControl);\r\n\r\n // Initialize SyncUiEventDispatcher so it can register event callbacks.\r\n SyncUiEventDispatcher.initialize();\r\n\r\n // Initialize the FrontstageManager\r\n FrontstageManager.initialize();\r\n\r\n // Initialize the ToolSettingsManager that manages Tool Settings properties.\r\n ToolSettingsManager.initialize();\r\n\r\n // Initialize the modeless dialog manager.\r\n ModelessDialogManager.initialize();\r\n\r\n // Initialize the Keyboard Shortcut manager\r\n KeyboardShortcutManager.initialize();\r\n\r\n this._initialized = true;\r\n }\r\n\r\n /** Registers a control implementing the [[ConfigurableUiElement]] interface.\r\n * These controls can be a\r\n * [[ContentControl]],\r\n * [[NavigationAidControl]],\r\n * [[StatusBarWidgetControl]],\r\n * [[WidgetControl]] or\r\n * [ToolUiProvider]($appui-react).\r\n * @param classId the class id of the control to register\r\n * @param constructor the constructor of the control to register\r\n */\r\n public static registerControl(classId: string, constructor: ConfigurableUiControlConstructor): void {\r\n if (this._registeredControls.get(classId) !== undefined) {\r\n throw new UiError(UiFramework.loggerCategory(this), `registerControl: classId '${classId}' already registered`);\r\n }\r\n\r\n this._registeredControls.set(classId, constructor);\r\n }\r\n\r\n /** Determines if a control has been registered based on its classId.\r\n * @param classId the class id of the control to test\r\n * @returns true if the control is registered or false if not\r\n */\r\n public static isControlRegistered(classId: string): boolean {\r\n const constructor = this._registeredControls.get(classId);\r\n return constructor !== undefined;\r\n }\r\n\r\n /** Determines if a control has been registered.\r\n * @internal\r\n */\r\n public static getConstructorClassId(constructor: ConfigurableUiControlConstructor): string | undefined {\r\n for (const [key, value] of this._registeredControls.entries()) {\r\n if (value === constructor)\r\n return key;\r\n }\r\n\r\n return undefined;\r\n }\r\n\r\n /** Unregisters a control that has been registered.\r\n * @param classId the class id of the control to unregister\r\n */\r\n public static unregisterControl(classId: string): void {\r\n const constructor = this._registeredControls.get(classId);\r\n if (constructor)\r\n this._registeredControls.delete(classId);\r\n }\r\n\r\n /** Creates a control registered by calling registerControl.\r\n * @param classId the class id of the control to create\r\n * @param uniqueId a unique id for the control\r\n * @param options options passed to the constructor of the control\r\n * @param controlId controlId which may not be unique across all control instances.\r\n * @returns the created control\r\n */\r\n public static createControl(classId: string, uniqueId: string, options?: any, controlId?: string): ConfigurableUiElement | undefined {\r\n const info = new ConfigurableCreateInfo(classId, uniqueId, controlId ?? uniqueId);\r\n const constructor = this._registeredControls.get(info.classId);\r\n if (!constructor) {\r\n throw new UiError(UiFramework.loggerCategory(this), `createControl: classId '${classId}' not registered`);\r\n }\r\n\r\n const control = new constructor(info, options);\r\n return control;\r\n }\r\n\r\n /** Add a Frontstage via a provider into the [[FrontstageManager]].\r\n * @param frontstageProvider Provider of the Frontstage to add\r\n */\r\n public static addFrontstageProvider(frontstageProvider: FrontstageProvider): void {\r\n FrontstageManager.addFrontstageProvider(frontstageProvider);\r\n }\r\n\r\n /** Loads one or more Tasks into the [[TaskManager]].\r\n * @param taskPropsList the list of Tasks to load\r\n * @internal\r\n * @deprecated\r\n */\r\n public static loadTasks(taskPropsList: TaskPropsList): void { // eslint-disable-line deprecation/deprecation\r\n TaskManager.loadTasks(taskPropsList); // eslint-disable-line deprecation/deprecation\r\n }\r\n\r\n /** Loads a Workflow into the [[WorkflowManager]].\r\n * @param workflowProps the Workflow to load\r\n * @internal\r\n * @deprecated\r\n */\r\n public static loadWorkflow(workflowProps: WorkflowProps): void { // eslint-disable-line deprecation/deprecation\r\n WorkflowManager.loadWorkflow(workflowProps); // eslint-disable-line deprecation/deprecation\r\n }\r\n\r\n /** Loads one or more Workflows into the [[WorkflowManager]].\r\n * @param workflowPropsList the list of Workflows to load\r\n * @internal\r\n * @deprecated\r\n */\r\n public static loadWorkflows(workflowPropsList: WorkflowPropsList): void { // eslint-disable-line deprecation/deprecation\r\n WorkflowManager.loadWorkflows(workflowPropsList); // eslint-disable-line deprecation/deprecation\r\n }\r\n\r\n /** Loads one or more Keyboard Shortcuts into the [[KeyboardShortcutManager]].\r\n * @param shortcutList the properties of the Keyboard Shortcuts to load\r\n */\r\n public static loadKeyboardShortcuts(shortcutList: KeyboardShortcutProps[]): void {\r\n KeyboardShortcutManager.loadKeyboardShortcuts(shortcutList);\r\n }\r\n\r\n /** Gets the HTML wrapper element for Configurable UI */\r\n public static getWrapperElement(): HTMLElement {\r\n const wrapper = document.getElementById(\"uifw-configurableui-wrapper\");\r\n const htmlElement = wrapper!;\r\n return htmlElement;\r\n }\r\n\r\n /** Closes all UI popups currently open */\r\n public static closeUi(): void {\r\n MessageManager.closeAllMessages();\r\n ModelessDialogManager.closeAll();\r\n ModalDialogManager.closeAll();\r\n KeyboardShortcutManager.closeShortcutsMenu();\r\n UiFramework.closeCursorMenu();\r\n PopupManager.clearPopups();\r\n }\r\n\r\n}\r\n"]}
|
|
1
|
+
{"version":3,"file":"ConfigurableUiManager.js","sourceRoot":"","sources":["../../../../src/appui-react/configurableui/ConfigurableUiManager.ts"],"names":[],"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0CAA0C;IACnC,MAAM,CAAC,OAAO;QACnB,+BAAc,CAAC,gBAAgB,EAAE,CAAC;QAClC,6CAAqB,CAAC,QAAQ,EAAE,CAAC;QACjC,uCAAkB,CAAC,QAAQ,EAAE,CAAC;QAC9B,2CAAoB,CAAC,QAAQ,EAAE,CAAC;QAChC,0CAAuB,CAAC,kBAAkB,EAAE,CAAC;QAC7C,yBAAW,CAAC,eAAe,EAAE,CAAC;QAC9B,2BAAY,CAAC,WAAW,EAAE,CAAC;IAC7B,CAAC;;AAtKH,sDAwKC;AAvKgB,yCAAmB,GAAG,IAAI,GAAG,EAA4C,CAAC;AAC1E,kCAAY,GAAG,KAAK,CAAC;AAEpC,gBAAgB;AACO,qCAAe,GAAG,IAAI,iCAAe,EAAE,CAAC;AAC/D,gBAAgB;AACO,uCAAiB,GAAG,IAAI,eAAe,EAAE,CAAC;AACjE,gBAAgB;AACO,uCAAiB,GAAG,IAAI,eAAe,EAAE,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module ConfigurableUi\r\n */\r\n\r\nimport { BeUiEvent } from \"@itwin/core-bentley\";\r\nimport { UiError } from \"@itwin/appui-abstract\";\r\nimport { FrontstageManager } from \"../frontstage/FrontstageManager\";\r\nimport { FrontstageProvider } from \"../frontstage/FrontstageProvider\";\r\nimport { KeyboardShortcutManager, KeyboardShortcutProps } from \"../keyboardshortcut/KeyboardShortcut\";\r\nimport { CubeNavigationAidControl } from \"../navigationaids/CubeNavigationAidControl\";\r\nimport { DrawingNavigationAidControl } from \"../navigationaids/DrawingNavigationAidControl\";\r\nimport { SheetNavigationAidControl } from \"../navigationaids/SheetNavigationAid\";\r\nimport { StandardRotationNavigationAidControl } from \"../navigationaids/StandardRotationNavigationAid\";\r\nimport { SyncUiEventDispatcher } from \"../syncui/SyncUiEventDispatcher\";\r\nimport { UiFramework } from \"../UiFramework\";\r\nimport { TaskManager, TaskPropsList } from \"../workflow/Task\";\r\nimport { WorkflowManager, WorkflowProps, WorkflowPropsList } from \"../workflow/Workflow\";\r\nimport { ToolSettingsManager } from \"../zones/toolsettings/ToolSettingsManager\";\r\nimport { ConfigurableCreateInfo, ConfigurableUiControlConstructor, ConfigurableUiElement } from \"./ConfigurableUiControl\";\r\nimport { ModelessDialogManager } from \"../dialog/ModelessDialogManager\";\r\nimport { ModalDialogManager } from \"../dialog/ModalDialogManager\";\r\nimport { MessageManager } from \"../messages/MessageManager\";\r\nimport { PopupManager } from \"../popup/PopupManager\";\r\nimport { ActivityTracker } from \"./ActivityTracker\";\r\nimport { ContentDialogManager } from \"../dialog/ContentDialogManager\";\r\n\r\n/** Ui Activity Event Args interface.\r\n * @internal\r\n */\r\nexport interface UiActivityEventArgs {\r\n event: Event;\r\n}\r\n\r\n/** Ui Activity Event class.\r\n * @internal\r\n */\r\nexport class UiActivityEvent extends BeUiEvent<UiActivityEventArgs> { }\r\n\r\n/** Ui Interval Event Args interface\r\n * @internal\r\n */\r\nexport interface UiIntervalEventArgs {\r\n idleTimeout?: number;\r\n}\r\n\r\n/** Ui Interval Event class.\r\n * @internal\r\n */\r\nexport class UiIntervalEvent extends BeUiEvent<UiIntervalEventArgs> { }\r\n\r\n/** Configurable Ui Manager maintains controls, Frontstages, Content Groups, Content Layouts, Tasks and Workflows.\r\n * @public\r\n */\r\nexport class ConfigurableUiManager {\r\n private static _registeredControls = new Map<string, ConfigurableUiControlConstructor>();\r\n private static _initialized = false;\r\n\r\n /** @internal */\r\n public static readonly activityTracker = new ActivityTracker();\r\n /** @internal */\r\n public static readonly onUiActivityEvent = new UiActivityEvent();\r\n /** @internal */\r\n public static readonly onUiIntervalEvent = new UiIntervalEvent();\r\n\r\n /** Initializes the ConfigurableUiManager and registers core controls. */\r\n public static initialize() {\r\n if (this._initialized)\r\n return;\r\n\r\n // Register core controls\r\n ConfigurableUiManager.registerControl(StandardRotationNavigationAidControl.navigationAidId, StandardRotationNavigationAidControl);\r\n ConfigurableUiManager.registerControl(SheetNavigationAidControl.navigationAidId, SheetNavigationAidControl);\r\n ConfigurableUiManager.registerControl(DrawingNavigationAidControl.navigationAidId, DrawingNavigationAidControl);\r\n ConfigurableUiManager.registerControl(CubeNavigationAidControl.navigationAidId, CubeNavigationAidControl);\r\n\r\n // Initialize SyncUiEventDispatcher so it can register event callbacks.\r\n SyncUiEventDispatcher.initialize();\r\n\r\n // Initialize the FrontstageManager\r\n FrontstageManager.initialize();\r\n\r\n // Initialize the ToolSettingsManager that manages Tool Settings properties.\r\n ToolSettingsManager.initialize();\r\n\r\n // Initialize dialog managers that allow one or more dialogs to be open at a time. These managers adjust the z-indexing\r\n // to ensure the most recently focused dialog of a specific type displays above its siblings.\r\n ModelessDialogManager.initialize();\r\n // ContentDialog have a z-index just above the fixed content views and below all other UI elements.\r\n ContentDialogManager.initialize();\r\n\r\n // Initialize the Keyboard Shortcut manager\r\n KeyboardShortcutManager.initialize();\r\n\r\n this._initialized = true;\r\n }\r\n\r\n /** Registers a control implementing the [[ConfigurableUiElement]] interface.\r\n * These controls can be a\r\n * [[ContentControl]],\r\n * [[NavigationAidControl]],\r\n * [[StatusBarWidgetControl]],\r\n * [[WidgetControl]] or\r\n * [ToolUiProvider]($appui-react).\r\n * @param classId the class id of the control to register\r\n * @param constructor the constructor of the control to register\r\n */\r\n public static registerControl(classId: string, constructor: ConfigurableUiControlConstructor): void {\r\n if (this._registeredControls.get(classId) !== undefined) {\r\n throw new UiError(UiFramework.loggerCategory(this), `registerControl: classId '${classId}' already registered`);\r\n }\r\n\r\n this._registeredControls.set(classId, constructor);\r\n }\r\n\r\n /** Determines if a control has been registered based on its classId.\r\n * @param classId the class id of the control to test\r\n * @returns true if the control is registered or false if not\r\n */\r\n public static isControlRegistered(classId: string): boolean {\r\n const constructor = this._registeredControls.get(classId);\r\n return constructor !== undefined;\r\n }\r\n\r\n /** Determines if a control has been registered.\r\n * @internal\r\n */\r\n public static getConstructorClassId(constructor: ConfigurableUiControlConstructor): string | undefined {\r\n for (const [key, value] of this._registeredControls.entries()) {\r\n if (value === constructor)\r\n return key;\r\n }\r\n\r\n return undefined;\r\n }\r\n\r\n /** Unregisters a control that has been registered.\r\n * @param classId the class id of the control to unregister\r\n */\r\n public static unregisterControl(classId: string): void {\r\n const constructor = this._registeredControls.get(classId);\r\n if (constructor)\r\n this._registeredControls.delete(classId);\r\n }\r\n\r\n /** Creates a control registered by calling registerControl.\r\n * @param classId the class id of the control to create\r\n * @param uniqueId a unique id for the control\r\n * @param options options passed to the constructor of the control\r\n * @param controlId controlId which may not be unique across all control instances.\r\n * @returns the created control\r\n */\r\n public static createControl(classId: string, uniqueId: string, options?: any, controlId?: string): ConfigurableUiElement | undefined {\r\n const info = new ConfigurableCreateInfo(classId, uniqueId, controlId ?? uniqueId);\r\n const constructor = this._registeredControls.get(info.classId);\r\n if (!constructor) {\r\n throw new UiError(UiFramework.loggerCategory(this), `createControl: classId '${classId}' not registered`);\r\n }\r\n\r\n const control = new constructor(info, options);\r\n return control;\r\n }\r\n\r\n /** Add a Frontstage via a provider into the [[FrontstageManager]].\r\n * @param frontstageProvider Provider of the Frontstage to add\r\n */\r\n public static addFrontstageProvider(frontstageProvider: FrontstageProvider): void {\r\n FrontstageManager.addFrontstageProvider(frontstageProvider);\r\n }\r\n\r\n /** Loads one or more Tasks into the [[TaskManager]].\r\n * @param taskPropsList the list of Tasks to load\r\n * @internal\r\n * @deprecated\r\n */\r\n public static loadTasks(taskPropsList: TaskPropsList): void { // eslint-disable-line deprecation/deprecation\r\n TaskManager.loadTasks(taskPropsList); // eslint-disable-line deprecation/deprecation\r\n }\r\n\r\n /** Loads a Workflow into the [[WorkflowManager]].\r\n * @param workflowProps the Workflow to load\r\n * @internal\r\n * @deprecated\r\n */\r\n public static loadWorkflow(workflowProps: WorkflowProps): void { // eslint-disable-line deprecation/deprecation\r\n WorkflowManager.loadWorkflow(workflowProps); // eslint-disable-line deprecation/deprecation\r\n }\r\n\r\n /** Loads one or more Workflows into the [[WorkflowManager]].\r\n * @param workflowPropsList the list of Workflows to load\r\n * @internal\r\n * @deprecated\r\n */\r\n public static loadWorkflows(workflowPropsList: WorkflowPropsList): void { // eslint-disable-line deprecation/deprecation\r\n WorkflowManager.loadWorkflows(workflowPropsList); // eslint-disable-line deprecation/deprecation\r\n }\r\n\r\n /** Loads one or more Keyboard Shortcuts into the [[KeyboardShortcutManager]].\r\n * @param shortcutList the properties of the Keyboard Shortcuts to load\r\n */\r\n public static loadKeyboardShortcuts(shortcutList: KeyboardShortcutProps[]): void {\r\n KeyboardShortcutManager.loadKeyboardShortcuts(shortcutList);\r\n }\r\n\r\n /** Gets the HTML wrapper element for Configurable UI */\r\n public static getWrapperElement(): HTMLElement {\r\n const wrapper = document.getElementById(\"uifw-configurableui-wrapper\");\r\n const htmlElement = wrapper!;\r\n return htmlElement;\r\n }\r\n\r\n /** Closes all UI popups currently open */\r\n public static closeUi(): void {\r\n MessageManager.closeAllMessages();\r\n ModelessDialogManager.closeAll();\r\n ModalDialogManager.closeAll();\r\n ContentDialogManager.closeAll();\r\n KeyboardShortcutManager.closeShortcutsMenu();\r\n UiFramework.closeCursorMenu();\r\n PopupManager.clearPopups();\r\n }\r\n\r\n}\r\n"]}
|
|
@@ -56,4 +56,10 @@ export declare class ContentControl extends ConfigurableUiControl {
|
|
|
56
56
|
/** Get the NavigationAidControl associated with this ContentControl */
|
|
57
57
|
get navigationAidControl(): string;
|
|
58
58
|
}
|
|
59
|
+
/**
|
|
60
|
+
* @beta
|
|
61
|
+
*/
|
|
62
|
+
export declare class FloatingContentControl extends ContentControl {
|
|
63
|
+
constructor(uniqueId: string, name: string, node: React.ReactNode);
|
|
64
|
+
}
|
|
59
65
|
//# sourceMappingURL=ContentControl.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ContentControl.d.ts","sourceRoot":"","sources":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AU,EAAE,KAAK,CAAC,SAAS,CAAC;IACtC,OAAO,CAAC,SAAS,CAAS;IAE1B;;;OAGG;gBACS,IAAI,EAAE,sBAAsB,EAAE,OAAO,EAAE,GAAG;IAItD,mDAAmD;IAC5C,WAAW,IAAI,IAAI;IAG1B,qDAAqD;IAC9C,aAAa,IAAI,IAAI;IAG5B,8EAA8E;IACvE,OAAO,IAAI,yBAAyB;IAE3C,0DAA0D;IAC1D,IAAW,UAAU,IAAI,OAAO,CAAkB;IAClD,uDAAuD;IACvD,IAAW,QAAQ,IAAI,cAAc,GAAG,SAAS,CAAsB;IAEvE,SAAS,CAAC,iBAAiB,IAAI,KAAK,CAAC,SAAS;IAa9C,SAAS,CAAC,YAAY,IAAI,KAAK,CAAC,SAAS;IAIzC,mDAAmD;IACnD,IAAW,SAAS,IAAI,KAAK,CAAC,SAAS,CAEtC;IAED,IAAW,SAAS,CAAC,CAAC,EAAE,KAAK,CAAC,SAAS,EAA0B;IAEjE,uEAAuE;IACvE,IAAW,oBAAoB,IAAI,MAAM,CAExC;CAEF;AAED;;GAEG;AACH,qBAAa,sBAAuB,SAAQ,cAAc;gBAC5C,QAAQ,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,KAAK,CAAC,SAAS;CAIlE"}
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
* @module ContentView
|
|
8
8
|
*/
|
|
9
9
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
|
-
exports.ContentControl = exports.ContentControlActivatedEvent = void 0;
|
|
10
|
+
exports.FloatingContentControl = exports.ContentControl = exports.ContentControlActivatedEvent = void 0;
|
|
11
11
|
const React = require("react");
|
|
12
12
|
const appui_abstract_1 = require("@itwin/appui-abstract");
|
|
13
13
|
const ConfigurableUiControl_1 = require("../configurableui/ConfigurableUiControl");
|
|
@@ -66,4 +66,14 @@ class ContentControl extends ConfigurableUiControl_1.ConfigurableUiControl {
|
|
|
66
66
|
}
|
|
67
67
|
}
|
|
68
68
|
exports.ContentControl = ContentControl;
|
|
69
|
+
/**
|
|
70
|
+
* @beta
|
|
71
|
+
*/
|
|
72
|
+
class FloatingContentControl extends ContentControl {
|
|
73
|
+
constructor(uniqueId, name, node) {
|
|
74
|
+
super(new ConfigurableUiControl_1.ConfigurableCreateInfo(name, uniqueId, name), undefined);
|
|
75
|
+
this._reactNode = node;
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
exports.FloatingContentControl = FloatingContentControl;
|
|
69
79
|
//# sourceMappingURL=ContentControl.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ContentControl.js","sourceRoot":"","sources":["../../../../src/appui-react/content/ContentControl.tsx"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,+BAA+B;AAG/B,0DAAgD;AAChD,mFAAmI;AAUnI;;GAEG;AACH,MAAa,4BAA6B,SAAQ,wBAAyC;CAAI;AAA/F,oEAA+F;AAY/F;;GAEG;AACH,MAAa,cAAe,SAAQ,6CAAqB;IAIvD;;;OAGG;IACH,YAAY,IAA4B,EAAE,OAAY;QACpD,KAAK,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;QAPf,cAAS,GAAG,KAAK,CAAC;IAQ1B,CAAC;IAED,mDAAmD;IAC5C,WAAW;IAClB,CAAC;IAED,qDAAqD;IAC9C,aAAa;IACpB,CAAC;IAED,8EAA8E;IACvE,OAAO,KAAgC,OAAO,iDAAyB,CAAC,OAAO,CAAC,CAAC,CAAC;IAEzF,0DAA0D;IAC1D,IAAW,UAAU,KAAc,OAAO,KAAK,CAAC,CAAC,CAAC;IAClD,uDAAuD;IACvD,IAAW,QAAQ,KAAiC,OAAO,SAAS,CAAC,CAAC,CAAC;IAE7D,iBAAiB;QACzB,IAAI,CAAC,IAAI,CAAC,SAAS,IAAI,KAAK,CAAC,cAAc,CAAC,IAAI,CAAC,UAAU,CAAC,EAAE;YAC5D,uBAAuB;YACvB,IAAI,CAAE,IAAI,CAAC,UAAsC,CAAC,GAAG,EAAE;gBACrD,MAAM,eAAe,GAAQ,EAAE,GAAG,EAAE,IAAI,CAAC,QAAQ,EAAE,CAAC;gBACpD,IAAI,CAAC,UAAU,GAAG,KAAK,CAAC,YAAY,CAAC,IAAI,CAAC,UAAU,EAAE,eAAe,CAAC,CAAC;aACxE;YACD,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC;SACvB;QAED,OAAO,IAAI,CAAC,UAAU,CAAC;IACzB,CAAC;IAES,YAAY;QACpB,OAAO,IAAI,CAAC,iBAAiB,EAAE,CAAC;IAClC,CAAC;IAED,mDAAmD;IACnD,IAAW,SAAS;QAClB,OAAO,IAAI,CAAC,YAAY,EAAE,CAAC;IAC7B,CAAC;IAED,IAAW,SAAS,CAAC,CAAkB,IAAI,IAAI,CAAC,UAAU,GAAG,CAAC,CAAC,CAAC,CAAC;IAEjE,uEAAuE;IACvE,IAAW,oBAAoB;QAC7B,OAAO,EAAE,CAAC;IACZ,CAAC;CAEF;AAzDD,wCAyDC","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 * as React from \"react\";\r\nimport { Id64String } from \"@itwin/core-bentley\";\r\nimport { IModelConnection, ScreenViewport, ViewState } from \"@itwin/core-frontend\";\r\nimport { UiEvent } from \"@itwin/appui-abstract\";\r\nimport { ConfigurableCreateInfo, ConfigurableUiControl, ConfigurableUiControlType } from \"../configurableui/ConfigurableUiControl\";\r\n\r\n/** ControlControl Activated Event Args interface.\r\n * @public\r\n */\r\nexport interface ContentControlActivatedEventArgs {\r\n activeContentControl: ContentControl;\r\n oldContentControl?: ContentControl;\r\n}\r\n\r\n/** ContentControl Activated Event class.\r\n * @public\r\n */\r\nexport class ContentControlActivatedEvent extends UiEvent<ContentControlActivatedEventArgs> { }\r\n\r\n/** Interface to be implemented when the ContentControl supports ViewSelector changes\r\n * @public\r\n */\r\nexport interface SupportsViewSelectorChange {\r\n /** Returns true if this control supports reacting to ViewSelector changes. */\r\n supportsViewSelectorChange: boolean;\r\n /** Process a ViewSelector change. */\r\n processViewSelectorChange(iModel: IModelConnection, viewDefinitionId: Id64String, viewState: ViewState, name: string): Promise<void>;\r\n}\r\n\r\n/** The base class for Frontstage content controls.\r\n * @public\r\n */\r\nexport class ContentControl extends ConfigurableUiControl {\r\n protected _reactNode: React.ReactNode;\r\n private _keyAdded = false;\r\n\r\n /** Creates an instance of ContentControl.\r\n * @param info An object that the subclass must pass to this base class.\r\n * @param options Options provided via the applicationData in a [[ContentProps]].\r\n */\r\n constructor(info: ConfigurableCreateInfo, options: any) {\r\n super(info, options);\r\n }\r\n\r\n /** Called when this ContentControl is activated */\r\n public onActivated(): void {\r\n }\r\n\r\n /** Called when this ContentControl is deactivated */\r\n public onDeactivated(): void {\r\n }\r\n\r\n /** Gets the type of ConfigurableUiControl, which is 'Content' in this case */\r\n public getType(): ConfigurableUiControlType { return ConfigurableUiControlType.Content; }\r\n\r\n /** Returns true if this control is a Viewport control. */\r\n public get isViewport(): boolean { return false; }\r\n /** Returns the ScreenViewport if isViewport is true */\r\n public get viewport(): ScreenViewport | undefined { return undefined; }\r\n\r\n protected getKeyedReactNode(): React.ReactNode {\r\n if (!this._keyAdded && React.isValidElement(this._reactNode)) {\r\n // istanbul ignore else\r\n if (!(this._reactNode as React.ReactElement<any>).key) {\r\n const additionalProps: any = { key: this.uniqueId };\r\n this._reactNode = React.cloneElement(this._reactNode, additionalProps);\r\n }\r\n this._keyAdded = true;\r\n }\r\n\r\n return this._reactNode;\r\n }\r\n\r\n protected getReactNode(): React.ReactNode {\r\n return this.getKeyedReactNode();\r\n }\r\n\r\n /** The React node associated with this control. */\r\n public get reactNode(): React.ReactNode {\r\n return this.getReactNode();\r\n }\r\n\r\n public set reactNode(r: React.ReactNode) { this._reactNode = r; }\r\n\r\n /** Get the NavigationAidControl associated with this ContentControl */\r\n public get navigationAidControl(): string {\r\n return \"\";\r\n }\r\n\r\n}\r\n"]}
|
|
1
|
+
{"version":3,"file":"ContentControl.js","sourceRoot":"","sources":["../../../../src/appui-react/content/ContentControl.tsx"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,+BAA+B;AAG/B,0DAAgD;AAChD,mFAAmI;AAUnI;;GAEG;AACH,MAAa,4BAA6B,SAAQ,wBAAyC;CAAI;AAA/F,oEAA+F;AAY/F;;GAEG;AACH,MAAa,cAAe,SAAQ,6CAAqB;IAIvD;;;OAGG;IACH,YAAY,IAA4B,EAAE,OAAY;QACpD,KAAK,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;QAPf,cAAS,GAAG,KAAK,CAAC;IAQ1B,CAAC;IAED,mDAAmD;IAC5C,WAAW;IAClB,CAAC;IAED,qDAAqD;IAC9C,aAAa;IACpB,CAAC;IAED,8EAA8E;IACvE,OAAO,KAAgC,OAAO,iDAAyB,CAAC,OAAO,CAAC,CAAC,CAAC;IAEzF,0DAA0D;IAC1D,IAAW,UAAU,KAAc,OAAO,KAAK,CAAC,CAAC,CAAC;IAClD,uDAAuD;IACvD,IAAW,QAAQ,KAAiC,OAAO,SAAS,CAAC,CAAC,CAAC;IAE7D,iBAAiB;QACzB,IAAI,CAAC,IAAI,CAAC,SAAS,IAAI,KAAK,CAAC,cAAc,CAAC,IAAI,CAAC,UAAU,CAAC,EAAE;YAC5D,uBAAuB;YACvB,IAAI,CAAE,IAAI,CAAC,UAAsC,CAAC,GAAG,EAAE;gBACrD,MAAM,eAAe,GAAQ,EAAE,GAAG,EAAE,IAAI,CAAC,QAAQ,EAAE,CAAC;gBACpD,IAAI,CAAC,UAAU,GAAG,KAAK,CAAC,YAAY,CAAC,IAAI,CAAC,UAAU,EAAE,eAAe,CAAC,CAAC;aACxE;YACD,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC;SACvB;QAED,OAAO,IAAI,CAAC,UAAU,CAAC;IACzB,CAAC;IAES,YAAY;QACpB,OAAO,IAAI,CAAC,iBAAiB,EAAE,CAAC;IAClC,CAAC;IAED,mDAAmD;IACnD,IAAW,SAAS;QAClB,OAAO,IAAI,CAAC,YAAY,EAAE,CAAC;IAC7B,CAAC;IAED,IAAW,SAAS,CAAC,CAAkB,IAAI,IAAI,CAAC,UAAU,GAAG,CAAC,CAAC,CAAC,CAAC;IAEjE,uEAAuE;IACvE,IAAW,oBAAoB;QAC7B,OAAO,EAAE,CAAC;IACZ,CAAC;CAEF;AAzDD,wCAyDC;AAED;;GAEG;AACH,MAAa,sBAAuB,SAAQ,cAAc;IACxD,YAAY,QAAgB,EAAE,IAAY,EAAE,IAAqB;QAC/D,KAAK,CAAC,IAAI,8CAAsB,CAAC,IAAI,EAAE,QAAQ,EAAE,IAAI,CAAC,EAAE,SAAS,CAAC,CAAC;QACnE,IAAI,CAAC,UAAU,GAAG,IAAI,CAAC;IACzB,CAAC;CACF;AALD,wDAKC","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 * as React from \"react\";\r\nimport { Id64String } from \"@itwin/core-bentley\";\r\nimport { IModelConnection, ScreenViewport, ViewState } from \"@itwin/core-frontend\";\r\nimport { UiEvent } from \"@itwin/appui-abstract\";\r\nimport { ConfigurableCreateInfo, ConfigurableUiControl, ConfigurableUiControlType } from \"../configurableui/ConfigurableUiControl\";\r\n\r\n/** ControlControl Activated Event Args interface.\r\n * @public\r\n */\r\nexport interface ContentControlActivatedEventArgs {\r\n activeContentControl: ContentControl;\r\n oldContentControl?: ContentControl;\r\n}\r\n\r\n/** ContentControl Activated Event class.\r\n * @public\r\n */\r\nexport class ContentControlActivatedEvent extends UiEvent<ContentControlActivatedEventArgs> { }\r\n\r\n/** Interface to be implemented when the ContentControl supports ViewSelector changes\r\n * @public\r\n */\r\nexport interface SupportsViewSelectorChange {\r\n /** Returns true if this control supports reacting to ViewSelector changes. */\r\n supportsViewSelectorChange: boolean;\r\n /** Process a ViewSelector change. */\r\n processViewSelectorChange(iModel: IModelConnection, viewDefinitionId: Id64String, viewState: ViewState, name: string): Promise<void>;\r\n}\r\n\r\n/** The base class for Frontstage content controls.\r\n * @public\r\n */\r\nexport class ContentControl extends ConfigurableUiControl {\r\n protected _reactNode: React.ReactNode;\r\n private _keyAdded = false;\r\n\r\n /** Creates an instance of ContentControl.\r\n * @param info An object that the subclass must pass to this base class.\r\n * @param options Options provided via the applicationData in a [[ContentProps]].\r\n */\r\n constructor(info: ConfigurableCreateInfo, options: any) {\r\n super(info, options);\r\n }\r\n\r\n /** Called when this ContentControl is activated */\r\n public onActivated(): void {\r\n }\r\n\r\n /** Called when this ContentControl is deactivated */\r\n public onDeactivated(): void {\r\n }\r\n\r\n /** Gets the type of ConfigurableUiControl, which is 'Content' in this case */\r\n public getType(): ConfigurableUiControlType { return ConfigurableUiControlType.Content; }\r\n\r\n /** Returns true if this control is a Viewport control. */\r\n public get isViewport(): boolean { return false; }\r\n /** Returns the ScreenViewport if isViewport is true */\r\n public get viewport(): ScreenViewport | undefined { return undefined; }\r\n\r\n protected getKeyedReactNode(): React.ReactNode {\r\n if (!this._keyAdded && React.isValidElement(this._reactNode)) {\r\n // istanbul ignore else\r\n if (!(this._reactNode as React.ReactElement<any>).key) {\r\n const additionalProps: any = { key: this.uniqueId };\r\n this._reactNode = React.cloneElement(this._reactNode, additionalProps);\r\n }\r\n this._keyAdded = true;\r\n }\r\n\r\n return this._reactNode;\r\n }\r\n\r\n protected getReactNode(): React.ReactNode {\r\n return this.getKeyedReactNode();\r\n }\r\n\r\n /** The React node associated with this control. */\r\n public get reactNode(): React.ReactNode {\r\n return this.getReactNode();\r\n }\r\n\r\n public set reactNode(r: React.ReactNode) { this._reactNode = r; }\r\n\r\n /** Get the NavigationAidControl associated with this ContentControl */\r\n public get navigationAidControl(): string {\r\n return \"\";\r\n }\r\n\r\n}\r\n\r\n/**\r\n * @beta\r\n */\r\nexport class FloatingContentControl extends ContentControl {\r\n constructor(uniqueId: string, name: string, node: React.ReactNode) {\r\n super(new ConfigurableCreateInfo(name, uniqueId, name), undefined);\r\n this._reactNode = node;\r\n }\r\n}\r\n"]}
|
|
@@ -6,6 +6,14 @@ import * as React from "react";
|
|
|
6
6
|
import { CommonProps } from "@itwin/core-react";
|
|
7
7
|
import { ContentGroup } from "./ContentGroup";
|
|
8
8
|
import { ContentLayoutProps, LayoutFragmentProps, UiEvent } from "@itwin/appui-abstract";
|
|
9
|
+
/** Properties for [[ContentWrapper]] */
|
|
10
|
+
interface ContentWrapperProps extends CommonProps {
|
|
11
|
+
content: React.ReactNode;
|
|
12
|
+
}
|
|
13
|
+
/** ContentWrapper React component.
|
|
14
|
+
* @internal
|
|
15
|
+
*/
|
|
16
|
+
export declare function ContentWrapper(props: ContentWrapperProps): JSX.Element;
|
|
9
17
|
/** Common interface for HorizontalSplit and VerticalSplit
|
|
10
18
|
*/
|
|
11
19
|
interface LayoutSplit {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ContentLayout.d.ts","sourceRoot":"","sources":["../../../../src/appui-react/content/ContentLayout.tsx"],"names":[],"mappings":"AAIA;;GAEG;AAIH,OAAO,sBAAsB,CAAC;AAE9B,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAAE,WAAW,EAAe,MAAM,mBAAmB,CAAC;AAG7D,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,EAAE,kBAAkB,EAAE,mBAAmB,EAA8E,OAAO,EAAE,MAAM,uBAAuB,CAAC;
|
|
1
|
+
{"version":3,"file":"ContentLayout.d.ts","sourceRoot":"","sources":["../../../../src/appui-react/content/ContentLayout.tsx"],"names":[],"mappings":"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AUrF;AAED;;GAEG;AACH,MAAM,WAAW,+BAA+B;IAC9C,aAAa,EAAE,gBAAgB,CAAC;IAChC,YAAY,EAAE,YAAY,CAAC;CAC5B;AAED;;GAEG;AACH,qBAAa,2BAA4B,SAAQ,OAAO,CAAC,+BAA+B,CAAC;CAAI;AAE7F;GACG;AACH,UAAU,kBAAkB;IAC1B,gBAAgB,EAAE,gBAAgB,CAAC;IACnC,gBAAgB,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACnC,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB;AAED;;GAEG;AACH,MAAM,WAAW,2BAA4B,SAAQ,WAAW;IAC9D,aAAa,EAAE,gBAAgB,CAAC;IAChC,YAAY,EAAE,YAAY,CAAC;IAC3B,cAAc,EAAE,OAAO,CAAC;CACzB;AAED;;GAEG;AACH,qBAAa,aAAc,SAAQ,KAAK,CAAC,SAAS,CAAC,2BAA2B,EAAE,kBAAkB,CAAC;IAEjG,gBAAgB;IAChB,SAAyB,KAAK,EAAE,QAAQ,CAAC,kBAAkB,CAAC,CAAC;gBAEjD,KAAK,EAAE,2BAA2B;IAgB9B,iBAAiB;IAIjB,oBAAoB;IAIpC,OAAO,CAAC,6BAA6B,CAYnC;IAEc,MAAM,IAAI,KAAK,CAAC,SAAS;IAezC,OAAO,CAAC,YAAY,CAElB;IAEF,OAAO,CAAC,UAAU,CAEhB;CACH"}
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
* @module ContentView
|
|
8
8
|
*/
|
|
9
9
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
|
-
exports.ContentLayout = exports.ContentLayoutActivatedEvent = exports.ContentLayoutDef = void 0;
|
|
10
|
+
exports.ContentLayout = exports.ContentLayoutActivatedEvent = exports.ContentLayoutDef = exports.ContentWrapper = void 0;
|
|
11
11
|
// cSpell:ignore contentlayout
|
|
12
12
|
require("./ContentLayout.scss");
|
|
13
13
|
const classnames_1 = require("classnames");
|
|
@@ -18,45 +18,51 @@ const FrontstageManager_1 = require("../frontstage/FrontstageManager");
|
|
|
18
18
|
const UiShowHideManager_1 = require("../utils/UiShowHideManager");
|
|
19
19
|
const appui_abstract_1 = require("@itwin/appui-abstract");
|
|
20
20
|
const ContentViewManager_1 = require("./ContentViewManager");
|
|
21
|
+
const Frontstage_1 = require("../frontstage/Frontstage");
|
|
21
22
|
/** ContentWrapper React component.
|
|
23
|
+
* @internal
|
|
22
24
|
*/
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
25
|
+
function ContentWrapper(props) {
|
|
26
|
+
const { content } = props;
|
|
27
|
+
const [isActive, setIsActive] = React.useState(content === ContentViewManager_1.ContentViewManager.getActiveContent());
|
|
28
|
+
const activeFrontstageDef = (0, Frontstage_1.useActiveFrontstageDef)();
|
|
29
|
+
// istanbul ignore next
|
|
30
|
+
const [hasMultipleContents, setHasMultipleContents] = React.useState(() => {
|
|
31
|
+
var _a, _b, _c;
|
|
32
|
+
return (activeFrontstageDef && (!!((_a = activeFrontstageDef.floatingContentControls) === null || _a === void 0 ? void 0 : _a.length)) ||
|
|
33
|
+
((_c = (_b = activeFrontstageDef === null || activeFrontstageDef === void 0 ? void 0 : activeFrontstageDef.contentGroup) === null || _b === void 0 ? void 0 : _b.getContentControls().length) !== null && _c !== void 0 ? _c : 0) > 1);
|
|
34
|
+
});
|
|
35
|
+
React.useEffect(() => {
|
|
36
|
+
setIsActive(content === ContentViewManager_1.ContentViewManager.getActiveContent());
|
|
37
|
+
}, [content]);
|
|
38
|
+
React.useEffect(() => {
|
|
39
|
+
const handleActiveContentChanged = (args) => {
|
|
40
|
+
var _a, _b, _c;
|
|
41
|
+
setIsActive(content === args.activeContent);
|
|
42
|
+
// istanbul ignore next
|
|
43
|
+
setHasMultipleContents((activeFrontstageDef && (!!((_a = activeFrontstageDef.floatingContentControls) === null || _a === void 0 ? void 0 : _a.length)) ||
|
|
44
|
+
((_c = (_b = activeFrontstageDef === null || activeFrontstageDef === void 0 ? void 0 : activeFrontstageDef.contentGroup) === null || _b === void 0 ? void 0 : _b.getContentControls().length) !== null && _c !== void 0 ? _c : 0) > 1));
|
|
35
45
|
};
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
46
|
+
return ContentViewManager_1.ContentViewManager.onActiveContentChangedEvent.addListener(handleActiveContentChanged);
|
|
47
|
+
}, [activeFrontstageDef, content]);
|
|
48
|
+
const handleMouseDown = React.useCallback(() => {
|
|
49
|
+
ContentViewManager_1.ContentViewManager.setActiveContent(content);
|
|
50
|
+
}, [content]);
|
|
51
|
+
React.useEffect(() => {
|
|
52
|
+
const onAvailableContentChanged = () => {
|
|
53
|
+
var _a, _b, _c;
|
|
54
|
+
// istanbul ignore next
|
|
55
|
+
setHasMultipleContents((activeFrontstageDef && (!!((_a = activeFrontstageDef.floatingContentControls) === null || _a === void 0 ? void 0 : _a.length)) ||
|
|
56
|
+
((_c = (_b = activeFrontstageDef === null || activeFrontstageDef === void 0 ? void 0 : activeFrontstageDef.contentGroup) === null || _b === void 0 ? void 0 : _b.getContentControls().length) !== null && _c !== void 0 ? _c : 0) > 1));
|
|
39
57
|
};
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
}
|
|
47
|
-
componentDidMount() {
|
|
48
|
-
ContentViewManager_1.ContentViewManager.onActiveContentChangedEvent.addListener(this._handleActiveContentChanged);
|
|
49
|
-
}
|
|
50
|
-
componentWillUnmount() {
|
|
51
|
-
ContentViewManager_1.ContentViewManager.onActiveContentChangedEvent.removeListener(this._handleActiveContentChanged);
|
|
52
|
-
}
|
|
53
|
-
// istanbul ignore next
|
|
54
|
-
componentDidUpdate(prevProps, _prevState) {
|
|
55
|
-
if (this.props.content !== prevProps.content) {
|
|
56
|
-
this.setState((_, props) => ({ content: props.content, isActive: props.content === ContentViewManager_1.ContentViewManager.getActiveContent() }));
|
|
57
|
-
}
|
|
58
|
-
}
|
|
58
|
+
return ContentViewManager_1.ContentViewManager.onAvailableContentChangedEvent.addListener(onAvailableContentChanged);
|
|
59
|
+
}, [activeFrontstageDef]);
|
|
60
|
+
const overlayClassName = (0, classnames_1.default)("uifw-contentlayout-overlay-div", isActive && hasMultipleContents ? "uifw-contentlayout-overlay-active" : "uifw-contentlayout-overlay-inactive");
|
|
61
|
+
return (React.createElement("div", { className: (0, classnames_1.default)("uifw-contentlayout-wrapper", props.className), style: props.style, onMouseDown: handleMouseDown, onMouseMove: UiShowHideManager_1.UiShowHideManager.handleContentMouseMove, role: "presentation" },
|
|
62
|
+
content,
|
|
63
|
+
React.createElement("div", { className: overlayClassName })));
|
|
59
64
|
}
|
|
65
|
+
exports.ContentWrapper = ContentWrapper;
|
|
60
66
|
/** Split Container class.
|
|
61
67
|
*/
|
|
62
68
|
class SplitContainer extends React.Component {
|
|
@@ -100,7 +106,8 @@ class SplitContainer extends React.Component {
|
|
|
100
106
|
*/
|
|
101
107
|
class SingleContentContainer extends React.Component {
|
|
102
108
|
render() {
|
|
103
|
-
return (React.createElement("div", { className: (0, classnames_1.default)("uifw-contentlayout-full-size", this.props.className), style: this.props.style, "data-testid": "single-content-container", onMouseMove: UiShowHideManager_1.UiShowHideManager.handleContentMouseMove },
|
|
109
|
+
return (React.createElement("div", { className: (0, classnames_1.default)("uifw-contentlayout-full-size", this.props.className), style: this.props.style, "data-testid": "single-content-container", onMouseMove: UiShowHideManager_1.UiShowHideManager.handleContentMouseMove },
|
|
110
|
+
React.createElement(ContentWrapper, { content: this.props.content, style: { height: "100%", position: "relative" } })));
|
|
104
111
|
}
|
|
105
112
|
}
|
|
106
113
|
/** Minimum split size */
|