@itwin/appui-react 3.0.0-dev.157 → 3.0.0-dev.163
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/UiFramework.d.ts +8 -0
- package/lib/cjs/appui-react/UiFramework.d.ts.map +1 -1
- package/lib/cjs/appui-react/UiFramework.js +14 -0
- package/lib/cjs/appui-react/UiFramework.js.map +1 -1
- package/lib/cjs/appui-react/configurableui/state.d.ts +4 -1
- package/lib/cjs/appui-react/configurableui/state.d.ts.map +1 -1
- package/lib/cjs/appui-react/configurableui/state.js +7 -0
- package/lib/cjs/appui-react/configurableui/state.js.map +1 -1
- package/lib/cjs/appui-react/content/IModelViewport.d.ts +13 -1
- package/lib/cjs/appui-react/content/IModelViewport.d.ts.map +1 -1
- package/lib/cjs/appui-react/content/IModelViewport.js +18 -5
- package/lib/cjs/appui-react/content/IModelViewport.js.map +1 -1
- package/lib/cjs/appui-react/redux/FrameworkState.d.ts +1 -1
- package/lib/esm/appui-react/UiFramework.d.ts +8 -0
- package/lib/esm/appui-react/UiFramework.d.ts.map +1 -1
- package/lib/esm/appui-react/UiFramework.js +14 -0
- package/lib/esm/appui-react/UiFramework.js.map +1 -1
- package/lib/esm/appui-react/configurableui/state.d.ts +4 -1
- package/lib/esm/appui-react/configurableui/state.d.ts.map +1 -1
- package/lib/esm/appui-react/configurableui/state.js +7 -0
- package/lib/esm/appui-react/configurableui/state.js.map +1 -1
- package/lib/esm/appui-react/content/IModelViewport.d.ts +13 -1
- package/lib/esm/appui-react/content/IModelViewport.d.ts.map +1 -1
- package/lib/esm/appui-react/content/IModelViewport.js +16 -4
- package/lib/esm/appui-react/content/IModelViewport.js.map +1 -1
- package/lib/esm/appui-react/redux/FrameworkState.d.ts +1 -1
- package/package.json +34 -34
|
@@ -382,6 +382,20 @@ export class UiFramework {
|
|
|
382
382
|
static setUseDragInteraction(useDragInteraction) {
|
|
383
383
|
UiFramework.dispatchActionToStore(ConfigurableUiActionId.SetDragInteraction, useDragInteraction, true);
|
|
384
384
|
}
|
|
385
|
+
/** Returns the variable controlling whether the overlay is displayed in a Viewport
|
|
386
|
+
* @public
|
|
387
|
+
*/
|
|
388
|
+
static get viewOverlayDisplay() {
|
|
389
|
+
return UiFramework.frameworkState ? UiFramework.frameworkState.configurableUiState.viewOverlayDisplay : true;
|
|
390
|
+
}
|
|
391
|
+
/** Set the variable that controls display of the view overlay. Applies to all viewports in the app
|
|
392
|
+
* @public
|
|
393
|
+
*/
|
|
394
|
+
static setViewOverlayDisplay(display) {
|
|
395
|
+
if (UiFramework.viewOverlayDisplay === display)
|
|
396
|
+
return;
|
|
397
|
+
UiFramework.dispatchActionToStore(ConfigurableUiActionId.SetViewOverlayDisplay, display);
|
|
398
|
+
}
|
|
385
399
|
/** Send logging message to the telemetry system
|
|
386
400
|
* @internal
|
|
387
401
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"UiFramework.js","sourceRoot":"","sources":["../../../src/appui-react/UiFramework.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAKH,OAAO,EAAc,MAAM,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAE1E,OAAO,EAAE,SAAS,EAAoB,QAAQ,EAAa,MAAM,sBAAsB,CAAC;AACxF,OAAO,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAC;AAC5D,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AACvD,OAAO,EAAE,YAAY,EAAE,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC;AAChF,OAAO,EAAE,iBAAiB,EAAE,eAAe,EAAkB,MAAM,mBAAmB,CAAC;AACvF,OAAO,EAAE,kBAAkB,EAAE,MAAM,gCAAgC,CAAC;AACpE,OAAO,EAAE,gBAAgB,EAAE,MAAM,8BAA8B,CAAC;AAChE,OAAO,EAAE,kBAAkB,EAAE,MAAM,kCAAkC,CAA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aAAa,CAAC,yBAAyB,IAAI,CAAC,OAAO,GAAG,EAAE,sCAAsC,CAAC,CAAC;IAC5G,WAAW,CAAC,YAAY,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;AACzC,CAAC,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 Utilities\r\n */\r\n\r\n// cSpell:ignore configurableui clientservices\r\n\r\nimport { Store } from \"redux\";\r\nimport { GuidString, Logger, ProcessDetector } from \"@itwin/core-bentley\";\r\nimport { Localization, RpcActivity } from \"@itwin/core-common\";\r\nimport { IModelApp, IModelConnection, SnapMode, ViewState } from \"@itwin/core-frontend\";\r\nimport { Presentation } from \"@itwin/presentation-frontend\";\r\nimport { TelemetryEvent } from \"@itwin/core-telemetry\";\r\nimport { getClassName, UiAdmin, UiError, UiEvent } from \"@itwin/appui-abstract\";\r\nimport { LocalStateStorage, SettingsManager, UiStateStorage } from \"@itwin/core-react\";\r\nimport { UiIModelComponents } from \"@itwin/imodel-components-react\";\r\nimport { BackstageManager } from \"./backstage/BackstageManager\";\r\nimport { ChildWindowManager } from \"./childwindow/ChildWindowManager\";\r\nimport { ConfigurableUiManager } from \"./configurableui/ConfigurableUiManager\";\r\nimport { ConfigurableUiActionId } from \"./configurableui/state\";\r\nimport { FrameworkState } from \"./redux/FrameworkState\";\r\nimport { CursorMenuData, PresentationSelectionScope, SessionStateActionId } from \"./redux/SessionState\";\r\nimport { StateManager } from \"./redux/StateManager\";\r\nimport { HideIsolateEmphasizeActionHandler, HideIsolateEmphasizeManager } from \"./selection/HideIsolateEmphasizeManager\";\r\nimport { SyncUiEventDispatcher, SyncUiEventId } from \"./syncui/SyncUiEventDispatcher\";\r\nimport { SYSTEM_PREFERRED_COLOR_THEME, WIDGET_OPACITY_DEFAULT } from \"./theme/ThemeManager\";\r\nimport * as keyinPaletteTools from \"./tools/KeyinPaletteTools\";\r\nimport * as openSettingTools from \"./tools/OpenSettingsTool\";\r\nimport * as restoreLayoutTools from \"./tools/RestoreLayoutTool\";\r\nimport * as toolSettingTools from \"./tools/ToolSettingsTools\";\r\nimport { UiShowHideManager, UiShowHideSettingsProvider } from \"./utils/UiShowHideManager\";\r\nimport { WidgetManager } from \"./widgets/WidgetManager\";\r\nimport { FrontstageManager } from \"./frontstage/FrontstageManager\";\r\n\r\n// cSpell:ignore Mobi\r\n\r\n/** Defined that available UI Versions. It is recommended to always use the latest version available.\r\n * @public\r\n */\r\nexport type FrameworkVersionId = \"1\" | \"2\";\r\n\r\n/** Interface to be implemented but any classes that wants to load their user settings when the UiStateEntry storage class is set.\r\n * @public\r\n */\r\nexport interface UserSettingsProvider {\r\n /** Unique provider Id */\r\n providerId: string;\r\n /** Function to load settings from settings storage */\r\n loadUserSettings(storage: UiStateStorage): Promise<void>;\r\n}\r\n\r\n/** UiVisibility Event Args interface.\r\n * @public\r\n */\r\nexport interface UiVisibilityEventArgs {\r\n visible: boolean;\r\n}\r\n\r\n/** UiVisibility Event class.\r\n * @public\r\n */\r\nexport class UiVisibilityChangedEvent extends UiEvent<UiVisibilityEventArgs> { }\r\n\r\n/** FrameworkVersion Changed Event Args interface.\r\n * @internal\r\n */\r\nexport interface FrameworkVersionChangedEventArgs {\r\n oldVersion: FrameworkVersionId;\r\n version: FrameworkVersionId;\r\n}\r\n\r\n/** FrameworkVersion Changed Event class.\r\n * @internal\r\n */\r\nexport class FrameworkVersionChangedEvent extends UiEvent<FrameworkVersionChangedEventArgs> { }\r\n\r\n/** TrackingTime time argument used by our feature tracking manager as an option argument to the TelemetryClient\r\n * @internal\r\n */\r\nexport interface TrackingTime {\r\n startTime: Date;\r\n endTime: Date;\r\n}\r\n\r\n/**\r\n * Manages the Redux store, localization service and iModel, Project and Login services for the ui-framework package.\r\n * @public\r\n */\r\nexport class UiFramework {\r\n private static _initialized = false;\r\n private static _store?: Store<any>;\r\n private static _complaint = \"UiFramework not initialized\";\r\n private static _frameworkStateKeyInStore: string = \"frameworkState\"; // default name\r\n private static _backstageManager?: BackstageManager;\r\n private static _widgetManager?: WidgetManager;\r\n private static _uiVersion: FrameworkVersionId = \"2\";\r\n private static _hideIsolateEmphasizeActionHandler?: HideIsolateEmphasizeActionHandler;\r\n /** this provides a default state storage handler */\r\n private static _uiStateStorage: UiStateStorage = new LocalStateStorage();\r\n private static _settingsManager?: SettingsManager;\r\n private static _uiSettingsProviderRegistry: Map<string, UserSettingsProvider> = new Map<string, UserSettingsProvider>();\r\n private static _PopupWindowManager = new ChildWindowManager();\r\n public static useDefaultPopoutUrl = false;\r\n\r\n /** @public */\r\n public static get childWindowManager(): ChildWindowManager {\r\n return UiFramework._PopupWindowManager;\r\n }\r\n\r\n /** Registers class that will be informed when the UserSettingsStorage location has been set or changed. This allows\r\n * classes to load any previously saved settings from the new storage location. Common storage locations are the browser's\r\n * local storage, or the iTwin Product Settings cloud storage available via the SettingsAdmin see `IModelApp.settingsAdmin`.\r\n * @beta\r\n */\r\n public static registerUserSettingsProvider(entry: UserSettingsProvider) {\r\n if (this._uiSettingsProviderRegistry.has(entry.providerId))\r\n return false;\r\n\r\n this._uiSettingsProviderRegistry.set(entry.providerId, entry);\r\n return true;\r\n }\r\n\r\n /** Get Show Ui event.\r\n * @public\r\n */\r\n public static readonly onUiVisibilityChanged = new UiVisibilityChangedEvent();\r\n\r\n /**\r\n * Called by the application to initialize the UiFramework. Also initializes UIIModelComponents, UiComponents, UiCore.\r\n * @param store The single Redux store created by the host application. If this is `undefined` then it is assumed that the [[StateManager]] is being used to provide the Redux store.\r\n * @param frameworkStateKey The name of the key used by the app when adding the UiFramework state into the Redux store. If not defined \"frameworkState\" is assumed. This value is ignored if [[StateManager]] is being used. The StateManager use \"frameworkState\".\r\n */\r\n public static async initialize(store: Store<any> | undefined, frameworkStateKey?: string): Promise<void> {\r\n return this.initializeEx(store, frameworkStateKey);\r\n }\r\n\r\n /**\r\n * Called by the application to initialize the UiFramework. Also initializes UIIModelComponents, UiComponents, UiCore.\r\n * @param store The single Redux store created by the host application. If this is `undefined` then it is assumed that the [[StateManager]] is being used to provide the Redux store.\r\n * @param frameworkStateKey The name of the key used by the app when adding the UiFramework state into the Redux store. If not defined \"frameworkState\" is assumed. This value is ignored if [[StateManager]] is being used. The StateManager use \"frameworkState\".\r\n *\r\n * @internal\r\n */\r\n public static async initializeEx(store: Store<any> | undefined, frameworkStateKey?: string): Promise<void> {\r\n if (UiFramework._initialized) {\r\n Logger.logInfo(UiFramework.loggerCategory(UiFramework), `UiFramework.initialize already called`);\r\n return;\r\n }\r\n\r\n /* if store is undefined then the StateManager class should have been initialized by parent app and the apps default set of reducers registered with it.\r\n If the app has no reducers to add and does not initialize a StateManager then just initialize the StateManager with the default framework reducer now */\r\n if (undefined === store && !StateManager.isInitialized(true))\r\n new StateManager();\r\n\r\n UiFramework._store = store;\r\n // ignore setting _frameworkStateKeyInStore if not using store\r\n if (frameworkStateKey && store)\r\n UiFramework._frameworkStateKeyInStore = frameworkStateKey;\r\n\r\n // set up namespace and register all tools from package\r\n const frameworkNamespace = IModelApp.localization?.registerNamespace(UiFramework.localizationNamespace);\r\n [\r\n restoreLayoutTools,\r\n keyinPaletteTools,\r\n openSettingTools,\r\n toolSettingTools,\r\n ].forEach((tool) => IModelApp.tools.registerModule(tool, this.localizationNamespace));\r\n\r\n UiFramework._backstageManager = new BackstageManager();\r\n UiFramework._hideIsolateEmphasizeActionHandler = new HideIsolateEmphasizeManager(); // this allows user to override the default HideIsolateEmphasizeManager implementation.\r\n UiFramework._widgetManager = new WidgetManager();\r\n\r\n // Initialize ui-imodel-components, ui-components, ui-core & ui-abstract\r\n await UiIModelComponents.initialize();\r\n\r\n UiFramework.settingsManager.onSettingsProvidersChanged.addListener(() => {\r\n SyncUiEventDispatcher.dispatchSyncUiEvent(SyncUiEventId.SettingsProvidersChanged);\r\n });\r\n\r\n // Initialize the MessagePresenter interface in UiAdmin for Editor notifications\r\n UiAdmin.messagePresenter = IModelApp.notifications;\r\n\r\n UiFramework._initialized = true;\r\n\r\n // initialize any standalone settings providers that don't need to have defaults set by iModelApp\r\n UiShowHideSettingsProvider.initialize();\r\n\r\n ConfigurableUiManager.initialize();\r\n\r\n return frameworkNamespace;\r\n }\r\n\r\n /** Un-registers the UiFramework internationalization service namespace */\r\n public static terminate() {\r\n UiFramework._store = undefined;\r\n UiFramework._frameworkStateKeyInStore = \"frameworkState\";\r\n if (StateManager.isInitialized(true))\r\n StateManager.clearStore();\r\n // istanbul ignore next\r\n IModelApp.localization?.unregisterNamespace(UiFramework.localizationNamespace);\r\n UiFramework._backstageManager = undefined;\r\n UiFramework._widgetManager = undefined;\r\n UiFramework._hideIsolateEmphasizeActionHandler = undefined;\r\n UiFramework._settingsManager = undefined;\r\n\r\n UiIModelComponents.terminate();\r\n UiShowHideManager.terminate();\r\n UiFramework._initialized = false;\r\n }\r\n\r\n /** Determines if UiFramework has been initialized */\r\n public static get initialized(): boolean { return UiFramework._initialized; }\r\n\r\n /** Property that returns the SettingManager used by AppUI-based applications.\r\n * @public\r\n */\r\n public static get settingsManager() {\r\n if (undefined === UiFramework._settingsManager)\r\n UiFramework._settingsManager = new SettingsManager();\r\n return UiFramework._settingsManager;\r\n }\r\n\r\n /** @public */\r\n public static get frameworkStateKey(): string {\r\n return UiFramework._frameworkStateKeyInStore;\r\n }\r\n\r\n /** The UiFramework state maintained by Redux\r\n * @public\r\n */\r\n public static get frameworkState(): FrameworkState | undefined {\r\n try {\r\n // eslint-disable-next-line dot-notation\r\n return UiFramework.store.getState()[UiFramework.frameworkStateKey];\r\n } catch (_e) {\r\n return undefined;\r\n }\r\n }\r\n\r\n /** The Redux store */\r\n public static get store(): Store<any> {\r\n if (UiFramework._store)\r\n return UiFramework._store;\r\n\r\n // istanbul ignore else\r\n if (!StateManager.isInitialized(true))\r\n throw new UiError(UiFramework.loggerCategory(this), `Error trying to access redux store before either store or StateManager has been initialized.`);\r\n\r\n // istanbul ignore next\r\n return StateManager.store;\r\n }\r\n\r\n /** The internationalization service created by the app.\r\n * @internal\r\n */\r\n public static get localization(): Localization {\r\n // istanbul ignore next\r\n if (!IModelApp.localization)\r\n throw new UiError(UiFramework.loggerCategory(this), `IModelApp.localization has not been defined.`);\r\n return IModelApp.localization;\r\n }\r\n\r\n /** The internationalization service namespace. */\r\n public static get localizationNamespace(): string {\r\n return \"UiFramework\";\r\n }\r\n\r\n /** @public */\r\n public static get backstageManager(): BackstageManager {\r\n // istanbul ignore next\r\n if (!UiFramework._backstageManager)\r\n throw new UiError(UiFramework.loggerCategory(this), UiFramework._complaint);\r\n return UiFramework._backstageManager;\r\n }\r\n\r\n /** @alpha */\r\n public static get hideIsolateEmphasizeActionHandler(): HideIsolateEmphasizeActionHandler {\r\n // istanbul ignore next\r\n if (!UiFramework._hideIsolateEmphasizeActionHandler)\r\n throw new UiError(UiFramework.loggerCategory(this), UiFramework._complaint);\r\n return UiFramework._hideIsolateEmphasizeActionHandler;\r\n }\r\n\r\n /** @alpha */\r\n public static setHideIsolateEmphasizeActionHandler(handler: HideIsolateEmphasizeActionHandler | undefined) {\r\n // istanbul ignore else\r\n if (handler)\r\n UiFramework._hideIsolateEmphasizeActionHandler = handler;\r\n else\r\n UiFramework._hideIsolateEmphasizeActionHandler = new HideIsolateEmphasizeManager();\r\n }\r\n\r\n /** @alpha */\r\n public static get widgetManager(): WidgetManager {\r\n // istanbul ignore next\r\n if (!UiFramework._widgetManager)\r\n throw new UiError(UiFramework.loggerCategory(this), UiFramework._complaint);\r\n return UiFramework._widgetManager;\r\n }\r\n\r\n /** Calls localization.getLocalizedStringWithNamespace with the \"UiFramework\" namespace. Do NOT include the namespace in the key.\r\n * @internal\r\n */\r\n public static translate(key: string | string[]): string {\r\n return IModelApp.localization.getLocalizedStringWithNamespace(UiFramework.localizationNamespace, key);\r\n }\r\n\r\n /** @internal */\r\n public static get packageName(): string {\r\n return \"appui-react\";\r\n }\r\n\r\n /** @internal */\r\n public static loggerCategory(obj: any): string {\r\n const className = getClassName(obj);\r\n const category = UiFramework.packageName + (className ? `.${className}` : \"\");\r\n return category;\r\n }\r\n\r\n public static dispatchActionToStore(type: string, payload: any, immediateSync = false) {\r\n UiFramework.store.dispatch({ type, payload });\r\n if (immediateSync)\r\n SyncUiEventDispatcher.dispatchImmediateSyncUiEvent(type);\r\n else\r\n SyncUiEventDispatcher.dispatchSyncUiEvent(type);\r\n }\r\n\r\n public static setAccudrawSnapMode(snapMode: SnapMode) {\r\n UiFramework.dispatchActionToStore(ConfigurableUiActionId.SetSnapMode, snapMode, true);\r\n }\r\n\r\n public static getAccudrawSnapMode(): SnapMode {\r\n return UiFramework.frameworkState ? UiFramework.frameworkState.configurableUiState.snapMode : /* istanbul ignore next */ SnapMode.NearestKeypoint;\r\n }\r\n\r\n public static getActiveSelectionScope(): string {\r\n return UiFramework.frameworkState ? UiFramework.frameworkState.sessionState.activeSelectionScope : /* istanbul ignore next */ \"element\";\r\n }\r\n\r\n public static setActiveSelectionScope(selectionScopeId: string): void {\r\n // istanbul ignore else\r\n if (UiFramework.frameworkState) {\r\n const foundIndex = UiFramework.frameworkState.sessionState.availableSelectionScopes.findIndex((selectionScope: PresentationSelectionScope) => selectionScope.id === selectionScopeId);\r\n if (-1 !== foundIndex) {\r\n const scope = UiFramework.frameworkState.sessionState.availableSelectionScopes[foundIndex];\r\n UiFramework.dispatchActionToStore(SessionStateActionId.SetSelectionScope, scope.id);\r\n Presentation.selection.scopes.activeScope = scope.id;\r\n }\r\n }\r\n }\r\n\r\n /** @public */\r\n public static openCursorMenu(menuData: CursorMenuData | undefined): void {\r\n UiFramework.dispatchActionToStore(SessionStateActionId.UpdateCursorMenu, menuData);\r\n }\r\n\r\n /** @public */\r\n public static closeCursorMenu(): void {\r\n UiFramework.dispatchActionToStore(SessionStateActionId.UpdateCursorMenu, undefined);\r\n }\r\n\r\n /** @public */\r\n public static getCursorMenuData(): CursorMenuData | undefined {\r\n return UiFramework.frameworkState ? UiFramework.frameworkState.sessionState.cursorMenuData : /* istanbul ignore next */ undefined;\r\n }\r\n\r\n public static getActiveIModelId(): string {\r\n return UiFramework.frameworkState ? UiFramework.frameworkState.sessionState.iModelId : /* istanbul ignore next */ \"\";\r\n }\r\n\r\n public static setActiveIModelId(iModelId: string): void {\r\n UiFramework.dispatchActionToStore(SessionStateActionId.SetActiveIModelId, iModelId);\r\n }\r\n\r\n public static setIModelConnection(iModelConnection: IModelConnection | undefined, immediateSync = false) {\r\n const oldConnection = UiFramework.getIModelConnection();\r\n if (oldConnection !== iModelConnection) {\r\n if (oldConnection?.iModelId)\r\n FrontstageManager.clearFrontstageDefsForIModelId(oldConnection.iModelId);\r\n oldConnection && undefined === iModelConnection && SyncUiEventDispatcher.clearConnectionEvents(oldConnection);\r\n iModelConnection && SyncUiEventDispatcher.initializeConnectionEvents(iModelConnection);\r\n UiFramework.dispatchActionToStore(SessionStateActionId.SetIModelConnection, iModelConnection, immediateSync);\r\n }\r\n UiFramework.setActiveIModelId(iModelConnection?.iModelId ?? \"\");\r\n }\r\n\r\n public static getIModelConnection(): IModelConnection | undefined {\r\n return UiFramework.frameworkState ? UiFramework.frameworkState.sessionState.iModelConnection : /* istanbul ignore next */ undefined;\r\n }\r\n\r\n /** Called by iModelApp to initialize saved UI state from registered UseSettingsProviders\r\n * @public\r\n */\r\n public static async initializeStateFromUserSettingsProviders(immediateSync = false) {\r\n // let any registered providers to load values from the new storage location\r\n const providerKeys = [...this._uiSettingsProviderRegistry.keys()];\r\n for await (const key of providerKeys) {\r\n await this._uiSettingsProviderRegistry.get(key)!.loadUserSettings(UiFramework._uiStateStorage);\r\n }\r\n\r\n // istanbul ignore next\r\n if (immediateSync)\r\n SyncUiEventDispatcher.dispatchImmediateSyncUiEvent(SyncUiEventId.UiStateStorageChanged);\r\n else\r\n SyncUiEventDispatcher.dispatchSyncUiEvent(SyncUiEventId.UiStateStorageChanged);\r\n }\r\n\r\n /** @public */\r\n public static async setUiStateStorage(storage: UiStateStorage, immediateSync = false) {\r\n if (UiFramework._uiStateStorage === storage)\r\n return;\r\n\r\n UiFramework._uiStateStorage = storage;\r\n await this.initializeStateFromUserSettingsProviders(immediateSync);\r\n }\r\n\r\n /** The UI Settings Storage is a convenient wrapper around Local Storage to assist in caching state information across user sessions.\r\n * It was previously used to conflate both the state information across session and the information driven directly from user explicit action,\r\n * which are now handled with user preferences.\r\n * @public\r\n */\r\n public static getUiStateStorage(): UiStateStorage {\r\n return UiFramework._uiStateStorage;\r\n }\r\n\r\n public static setDefaultIModelViewportControlId(iModelViewportControlId: string, immediateSync = false) {\r\n UiFramework.dispatchActionToStore(SessionStateActionId.SetDefaultIModelViewportControlId, iModelViewportControlId, immediateSync);\r\n }\r\n\r\n public static getDefaultIModelViewportControlId(): string | undefined {\r\n return UiFramework.frameworkState ? UiFramework.frameworkState.sessionState.defaultIModelViewportControlId : /* istanbul ignore next */ undefined;\r\n }\r\n\r\n public static setDefaultViewId(viewId: string, immediateSync = false) {\r\n UiFramework.dispatchActionToStore(SessionStateActionId.SetDefaultViewId, viewId, immediateSync);\r\n }\r\n\r\n public static getDefaultViewId(): string | undefined {\r\n return UiFramework.frameworkState ? UiFramework.frameworkState.sessionState.defaultViewId : /* istanbul ignore next */ undefined;\r\n }\r\n\r\n public static setDefaultViewState(viewState: ViewState, immediateSync = false) {\r\n UiFramework.dispatchActionToStore(SessionStateActionId.SetDefaultViewState, viewState, immediateSync);\r\n }\r\n public static getDefaultViewState(): ViewState | undefined {\r\n return UiFramework.frameworkState ? UiFramework.frameworkState.sessionState.defaultViewState : /* istanbul ignore next */ undefined;\r\n }\r\n\r\n /** @public */\r\n public static getAvailableSelectionScopes(): PresentationSelectionScope[] {\r\n return UiFramework.frameworkState ?\r\n UiFramework.frameworkState.sessionState.availableSelectionScopes :\r\n /* istanbul ignore next */\r\n [{ id: \"element\", label: \"Element\" } as PresentationSelectionScope];\r\n }\r\n\r\n public static getIsUiVisible() {\r\n return UiShowHideManager.isUiVisible;\r\n }\r\n\r\n public static setIsUiVisible(visible: boolean) {\r\n if (UiShowHideManager.isUiVisible !== visible) {\r\n UiShowHideManager.isUiVisible = visible;\r\n UiFramework.onUiVisibilityChanged.emit({ visible });\r\n }\r\n }\r\n\r\n public static setColorTheme(theme: string) {\r\n if (UiFramework.getColorTheme() === theme)\r\n return;\r\n\r\n UiFramework.dispatchActionToStore(ConfigurableUiActionId.SetTheme, theme, true);\r\n }\r\n\r\n public static getColorTheme(): string {\r\n return UiFramework.frameworkState ? UiFramework.frameworkState.configurableUiState.theme : /* istanbul ignore next */ SYSTEM_PREFERRED_COLOR_THEME;\r\n }\r\n\r\n public static setWidgetOpacity(opacity: number) {\r\n if (UiFramework.getWidgetOpacity() === opacity)\r\n return;\r\n\r\n UiFramework.dispatchActionToStore(ConfigurableUiActionId.SetWidgetOpacity, opacity, true);\r\n }\r\n\r\n public static getWidgetOpacity(): number {\r\n return UiFramework.frameworkState ? UiFramework.frameworkState.configurableUiState.widgetOpacity : /* istanbul ignore next */ WIDGET_OPACITY_DEFAULT;\r\n }\r\n\r\n public static isMobile() { // eslint-disable-line @itwin/prefer-get\r\n return ProcessDetector.isMobileBrowser;\r\n }\r\n\r\n /** Returns the Ui Version.\r\n * @public\r\n */\r\n public static get uiVersion(): FrameworkVersionId {\r\n return UiFramework.frameworkState ? UiFramework.frameworkState.configurableUiState.frameworkVersion : this._uiVersion;\r\n }\r\n\r\n public static setUiVersion(version: FrameworkVersionId) {\r\n if (UiFramework.uiVersion === version)\r\n return;\r\n\r\n UiFramework.dispatchActionToStore(ConfigurableUiActionId.SetFrameworkVersion, version === \"1\" ? \"1\" : \"2\", true);\r\n }\r\n\r\n public static get useDragInteraction(): boolean {\r\n return UiFramework.frameworkState ? UiFramework.frameworkState.configurableUiState.useDragInteraction : false;\r\n }\r\n\r\n public static setUseDragInteraction(useDragInteraction: boolean) {\r\n UiFramework.dispatchActionToStore(ConfigurableUiActionId.SetDragInteraction, useDragInteraction, true);\r\n }\r\n\r\n /** Send logging message to the telemetry system\r\n * @internal\r\n */\r\n // istanbul ignore next\r\n public static async postTelemetry(eventName: string, eventId?: GuidString, iTwinId?: GuidString, iModeId?: GuidString, changeSetId?: string, time?: TrackingTime, additionalProperties?: { [key: string]: any }): Promise<void> {\r\n if (!IModelApp.authorizationClient)\r\n return;\r\n\r\n try {\r\n const activity: RpcActivity = {\r\n sessionId: IModelApp.sessionId,\r\n activityId: \"\",\r\n applicationId: IModelApp.applicationId,\r\n applicationVersion: IModelApp.applicationVersion,\r\n accessToken: (await IModelApp.authorizationClient.getAccessToken()) ?? \"\",\r\n };\r\n const telemetryEvent = new TelemetryEvent(eventName, eventId, iTwinId, iModeId, changeSetId, time, additionalProperties);\r\n await IModelApp.telemetry.postTelemetry(activity, telemetryEvent);\r\n } catch { }\r\n }\r\n private static _handleFrameworkVersionChangedEvent = (args: FrameworkVersionChangedEventArgs) => {\r\n // Log Ui Version used\r\n Logger.logInfo(UiFramework.loggerCategory(UiFramework), `Ui Version changed to ${args.version} `);\r\n // eslint-disable-next-line @typescript-eslint/no-floating-promises\r\n UiFramework.postTelemetry(`Ui Version changed to ${args.version} `, \"F2772C81-962D-4755-807C-2D675A5FF399\");\r\n UiFramework.setUiVersion(args.version);\r\n };\r\n\r\n /** Determines whether a ContextMenu is open\r\n * @alpha\r\n * */\r\n public static get isContextMenuOpen(): boolean {\r\n const contextMenu = document.querySelector(\"div.core-context-menu-opened\");\r\n return contextMenu !== null && contextMenu !== undefined;\r\n }\r\n}\r\n"]}
|
|
1
|
+
{"version":3,"file":"UiFramework.js","sourceRoot":"","sources":["../../../src/appui-react/UiFramework.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAKH,OAAO,EAAc,MAAM,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAE1E,OAAO,EAAE,SAAS,EAAoB,QAAQ,EAAa,MAAM,sBAAsB,CAAC;AACxF,OAAO,EAAE,YAAY,EAAE,MA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MAAM,WAAW,GAAG,QAAQ,CAAC,aAAa,CAAC,8BAA8B,CAAC,CAAC;QAC3E,OAAO,WAAW,KAAK,IAAI,IAAI,WAAW,KAAK,SAAS,CAAC;IAC3D,CAAC;;AA1dc,wBAAY,GAAG,KAAK,CAAC;AAErB,sBAAU,GAAG,6BAA6B,CAAC;AAC3C,qCAAyB,GAAW,gBAAgB,CAAC,CAAE,eAAe;AAGtE,sBAAU,GAAuB,GAAG,CAAC;AAEpD,oDAAoD;AACrC,2BAAe,GAAmB,IAAI,iBAAiB,EAAE,CAAC;AAE1D,uCAA2B,GAAsC,IAAI,GAAG,EAAgC,CAAC;AACzG,+BAAmB,GAAG,IAAI,kBAAkB,EAAE,CAAC;AAChD,+BAAmB,GAAG,KAAK,CAAC;AAoB1C;;GAEG;AACoB,iCAAqB,GAAG,IAAI,wBAAwB,EAAE,CAAC;AAwa/D,+CAAmC,GAAG,CAAC,IAAsC,EAAE,EAAE;IAC9F,sBAAsB;IACtB,MAAM,CAAC,OAAO,CAAC,WAAW,CAAC,cAAc,CAAC,WAAW,CAAC,EAAE,yBAAyB,IAAI,CAAC,OAAO,GAAG,CAAC,CAAC;IAClG,mEAAmE;IACnE,WAAW,CAAC,aAAa,CAAC,yBAAyB,IAAI,CAAC,OAAO,GAAG,EAAE,sCAAsC,CAAC,CAAC;IAC5G,WAAW,CAAC,YAAY,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;AACzC,CAAC,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 Utilities\r\n */\r\n\r\n// cSpell:ignore configurableui clientservices\r\n\r\nimport { Store } from \"redux\";\r\nimport { GuidString, Logger, ProcessDetector } from \"@itwin/core-bentley\";\r\nimport { Localization, RpcActivity } from \"@itwin/core-common\";\r\nimport { IModelApp, IModelConnection, SnapMode, ViewState } from \"@itwin/core-frontend\";\r\nimport { Presentation } from \"@itwin/presentation-frontend\";\r\nimport { TelemetryEvent } from \"@itwin/core-telemetry\";\r\nimport { getClassName, UiAdmin, UiError, UiEvent } from \"@itwin/appui-abstract\";\r\nimport { LocalStateStorage, SettingsManager, UiStateStorage } from \"@itwin/core-react\";\r\nimport { UiIModelComponents } from \"@itwin/imodel-components-react\";\r\nimport { BackstageManager } from \"./backstage/BackstageManager\";\r\nimport { ChildWindowManager } from \"./childwindow/ChildWindowManager\";\r\nimport { ConfigurableUiManager } from \"./configurableui/ConfigurableUiManager\";\r\nimport { ConfigurableUiActionId } from \"./configurableui/state\";\r\nimport { FrameworkState } from \"./redux/FrameworkState\";\r\nimport { CursorMenuData, PresentationSelectionScope, SessionStateActionId } from \"./redux/SessionState\";\r\nimport { StateManager } from \"./redux/StateManager\";\r\nimport { HideIsolateEmphasizeActionHandler, HideIsolateEmphasizeManager } from \"./selection/HideIsolateEmphasizeManager\";\r\nimport { SyncUiEventDispatcher, SyncUiEventId } from \"./syncui/SyncUiEventDispatcher\";\r\nimport { SYSTEM_PREFERRED_COLOR_THEME, WIDGET_OPACITY_DEFAULT } from \"./theme/ThemeManager\";\r\nimport * as keyinPaletteTools from \"./tools/KeyinPaletteTools\";\r\nimport * as openSettingTools from \"./tools/OpenSettingsTool\";\r\nimport * as restoreLayoutTools from \"./tools/RestoreLayoutTool\";\r\nimport * as toolSettingTools from \"./tools/ToolSettingsTools\";\r\nimport { UiShowHideManager, UiShowHideSettingsProvider } from \"./utils/UiShowHideManager\";\r\nimport { WidgetManager } from \"./widgets/WidgetManager\";\r\nimport { FrontstageManager } from \"./frontstage/FrontstageManager\";\r\n\r\n// cSpell:ignore Mobi\r\n\r\n/** Defined that available UI Versions. It is recommended to always use the latest version available.\r\n * @public\r\n */\r\nexport type FrameworkVersionId = \"1\" | \"2\";\r\n\r\n/** Interface to be implemented but any classes that wants to load their user settings when the UiStateEntry storage class is set.\r\n * @public\r\n */\r\nexport interface UserSettingsProvider {\r\n /** Unique provider Id */\r\n providerId: string;\r\n /** Function to load settings from settings storage */\r\n loadUserSettings(storage: UiStateStorage): Promise<void>;\r\n}\r\n\r\n/** UiVisibility Event Args interface.\r\n * @public\r\n */\r\nexport interface UiVisibilityEventArgs {\r\n visible: boolean;\r\n}\r\n\r\n/** UiVisibility Event class.\r\n * @public\r\n */\r\nexport class UiVisibilityChangedEvent extends UiEvent<UiVisibilityEventArgs> { }\r\n\r\n/** FrameworkVersion Changed Event Args interface.\r\n * @internal\r\n */\r\nexport interface FrameworkVersionChangedEventArgs {\r\n oldVersion: FrameworkVersionId;\r\n version: FrameworkVersionId;\r\n}\r\n\r\n/** FrameworkVersion Changed Event class.\r\n * @internal\r\n */\r\nexport class FrameworkVersionChangedEvent extends UiEvent<FrameworkVersionChangedEventArgs> { }\r\n\r\n/** TrackingTime time argument used by our feature tracking manager as an option argument to the TelemetryClient\r\n * @internal\r\n */\r\nexport interface TrackingTime {\r\n startTime: Date;\r\n endTime: Date;\r\n}\r\n\r\n/**\r\n * Manages the Redux store, localization service and iModel, Project and Login services for the ui-framework package.\r\n * @public\r\n */\r\nexport class UiFramework {\r\n private static _initialized = false;\r\n private static _store?: Store<any>;\r\n private static _complaint = \"UiFramework not initialized\";\r\n private static _frameworkStateKeyInStore: string = \"frameworkState\"; // default name\r\n private static _backstageManager?: BackstageManager;\r\n private static _widgetManager?: WidgetManager;\r\n private static _uiVersion: FrameworkVersionId = \"2\";\r\n private static _hideIsolateEmphasizeActionHandler?: HideIsolateEmphasizeActionHandler;\r\n /** this provides a default state storage handler */\r\n private static _uiStateStorage: UiStateStorage = new LocalStateStorage();\r\n private static _settingsManager?: SettingsManager;\r\n private static _uiSettingsProviderRegistry: Map<string, UserSettingsProvider> = new Map<string, UserSettingsProvider>();\r\n private static _PopupWindowManager = new ChildWindowManager();\r\n public static useDefaultPopoutUrl = false;\r\n\r\n /** @public */\r\n public static get childWindowManager(): ChildWindowManager {\r\n return UiFramework._PopupWindowManager;\r\n }\r\n\r\n /** Registers class that will be informed when the UserSettingsStorage location has been set or changed. This allows\r\n * classes to load any previously saved settings from the new storage location. Common storage locations are the browser's\r\n * local storage, or the iTwin Product Settings cloud storage available via the SettingsAdmin see `IModelApp.settingsAdmin`.\r\n * @beta\r\n */\r\n public static registerUserSettingsProvider(entry: UserSettingsProvider) {\r\n if (this._uiSettingsProviderRegistry.has(entry.providerId))\r\n return false;\r\n\r\n this._uiSettingsProviderRegistry.set(entry.providerId, entry);\r\n return true;\r\n }\r\n\r\n /** Get Show Ui event.\r\n * @public\r\n */\r\n public static readonly onUiVisibilityChanged = new UiVisibilityChangedEvent();\r\n\r\n /**\r\n * Called by the application to initialize the UiFramework. Also initializes UIIModelComponents, UiComponents, UiCore.\r\n * @param store The single Redux store created by the host application. If this is `undefined` then it is assumed that the [[StateManager]] is being used to provide the Redux store.\r\n * @param frameworkStateKey The name of the key used by the app when adding the UiFramework state into the Redux store. If not defined \"frameworkState\" is assumed. This value is ignored if [[StateManager]] is being used. The StateManager use \"frameworkState\".\r\n */\r\n public static async initialize(store: Store<any> | undefined, frameworkStateKey?: string): Promise<void> {\r\n return this.initializeEx(store, frameworkStateKey);\r\n }\r\n\r\n /**\r\n * Called by the application to initialize the UiFramework. Also initializes UIIModelComponents, UiComponents, UiCore.\r\n * @param store The single Redux store created by the host application. If this is `undefined` then it is assumed that the [[StateManager]] is being used to provide the Redux store.\r\n * @param frameworkStateKey The name of the key used by the app when adding the UiFramework state into the Redux store. If not defined \"frameworkState\" is assumed. This value is ignored if [[StateManager]] is being used. The StateManager use \"frameworkState\".\r\n *\r\n * @internal\r\n */\r\n public static async initializeEx(store: Store<any> | undefined, frameworkStateKey?: string): Promise<void> {\r\n if (UiFramework._initialized) {\r\n Logger.logInfo(UiFramework.loggerCategory(UiFramework), `UiFramework.initialize already called`);\r\n return;\r\n }\r\n\r\n /* if store is undefined then the StateManager class should have been initialized by parent app and the apps default set of reducers registered with it.\r\n If the app has no reducers to add and does not initialize a StateManager then just initialize the StateManager with the default framework reducer now */\r\n if (undefined === store && !StateManager.isInitialized(true))\r\n new StateManager();\r\n\r\n UiFramework._store = store;\r\n // ignore setting _frameworkStateKeyInStore if not using store\r\n if (frameworkStateKey && store)\r\n UiFramework._frameworkStateKeyInStore = frameworkStateKey;\r\n\r\n // set up namespace and register all tools from package\r\n const frameworkNamespace = IModelApp.localization?.registerNamespace(UiFramework.localizationNamespace);\r\n [\r\n restoreLayoutTools,\r\n keyinPaletteTools,\r\n openSettingTools,\r\n toolSettingTools,\r\n ].forEach((tool) => IModelApp.tools.registerModule(tool, this.localizationNamespace));\r\n\r\n UiFramework._backstageManager = new BackstageManager();\r\n UiFramework._hideIsolateEmphasizeActionHandler = new HideIsolateEmphasizeManager(); // this allows user to override the default HideIsolateEmphasizeManager implementation.\r\n UiFramework._widgetManager = new WidgetManager();\r\n\r\n // Initialize ui-imodel-components, ui-components, ui-core & ui-abstract\r\n await UiIModelComponents.initialize();\r\n\r\n UiFramework.settingsManager.onSettingsProvidersChanged.addListener(() => {\r\n SyncUiEventDispatcher.dispatchSyncUiEvent(SyncUiEventId.SettingsProvidersChanged);\r\n });\r\n\r\n // Initialize the MessagePresenter interface in UiAdmin for Editor notifications\r\n UiAdmin.messagePresenter = IModelApp.notifications;\r\n\r\n UiFramework._initialized = true;\r\n\r\n // initialize any standalone settings providers that don't need to have defaults set by iModelApp\r\n UiShowHideSettingsProvider.initialize();\r\n\r\n ConfigurableUiManager.initialize();\r\n\r\n return frameworkNamespace;\r\n }\r\n\r\n /** Un-registers the UiFramework internationalization service namespace */\r\n public static terminate() {\r\n UiFramework._store = undefined;\r\n UiFramework._frameworkStateKeyInStore = \"frameworkState\";\r\n if (StateManager.isInitialized(true))\r\n StateManager.clearStore();\r\n // istanbul ignore next\r\n IModelApp.localization?.unregisterNamespace(UiFramework.localizationNamespace);\r\n UiFramework._backstageManager = undefined;\r\n UiFramework._widgetManager = undefined;\r\n UiFramework._hideIsolateEmphasizeActionHandler = undefined;\r\n UiFramework._settingsManager = undefined;\r\n\r\n UiIModelComponents.terminate();\r\n UiShowHideManager.terminate();\r\n UiFramework._initialized = false;\r\n }\r\n\r\n /** Determines if UiFramework has been initialized */\r\n public static get initialized(): boolean { return UiFramework._initialized; }\r\n\r\n /** Property that returns the SettingManager used by AppUI-based applications.\r\n * @public\r\n */\r\n public static get settingsManager() {\r\n if (undefined === UiFramework._settingsManager)\r\n UiFramework._settingsManager = new SettingsManager();\r\n return UiFramework._settingsManager;\r\n }\r\n\r\n /** @public */\r\n public static get frameworkStateKey(): string {\r\n return UiFramework._frameworkStateKeyInStore;\r\n }\r\n\r\n /** The UiFramework state maintained by Redux\r\n * @public\r\n */\r\n public static get frameworkState(): FrameworkState | undefined {\r\n try {\r\n // eslint-disable-next-line dot-notation\r\n return UiFramework.store.getState()[UiFramework.frameworkStateKey];\r\n } catch (_e) {\r\n return undefined;\r\n }\r\n }\r\n\r\n /** The Redux store */\r\n public static get store(): Store<any> {\r\n if (UiFramework._store)\r\n return UiFramework._store;\r\n\r\n // istanbul ignore else\r\n if (!StateManager.isInitialized(true))\r\n throw new UiError(UiFramework.loggerCategory(this), `Error trying to access redux store before either store or StateManager has been initialized.`);\r\n\r\n // istanbul ignore next\r\n return StateManager.store;\r\n }\r\n\r\n /** The internationalization service created by the app.\r\n * @internal\r\n */\r\n public static get localization(): Localization {\r\n // istanbul ignore next\r\n if (!IModelApp.localization)\r\n throw new UiError(UiFramework.loggerCategory(this), `IModelApp.localization has not been defined.`);\r\n return IModelApp.localization;\r\n }\r\n\r\n /** The internationalization service namespace. */\r\n public static get localizationNamespace(): string {\r\n return \"UiFramework\";\r\n }\r\n\r\n /** @public */\r\n public static get backstageManager(): BackstageManager {\r\n // istanbul ignore next\r\n if (!UiFramework._backstageManager)\r\n throw new UiError(UiFramework.loggerCategory(this), UiFramework._complaint);\r\n return UiFramework._backstageManager;\r\n }\r\n\r\n /** @alpha */\r\n public static get hideIsolateEmphasizeActionHandler(): HideIsolateEmphasizeActionHandler {\r\n // istanbul ignore next\r\n if (!UiFramework._hideIsolateEmphasizeActionHandler)\r\n throw new UiError(UiFramework.loggerCategory(this), UiFramework._complaint);\r\n return UiFramework._hideIsolateEmphasizeActionHandler;\r\n }\r\n\r\n /** @alpha */\r\n public static setHideIsolateEmphasizeActionHandler(handler: HideIsolateEmphasizeActionHandler | undefined) {\r\n // istanbul ignore else\r\n if (handler)\r\n UiFramework._hideIsolateEmphasizeActionHandler = handler;\r\n else\r\n UiFramework._hideIsolateEmphasizeActionHandler = new HideIsolateEmphasizeManager();\r\n }\r\n\r\n /** @alpha */\r\n public static get widgetManager(): WidgetManager {\r\n // istanbul ignore next\r\n if (!UiFramework._widgetManager)\r\n throw new UiError(UiFramework.loggerCategory(this), UiFramework._complaint);\r\n return UiFramework._widgetManager;\r\n }\r\n\r\n /** Calls localization.getLocalizedStringWithNamespace with the \"UiFramework\" namespace. Do NOT include the namespace in the key.\r\n * @internal\r\n */\r\n public static translate(key: string | string[]): string {\r\n return IModelApp.localization.getLocalizedStringWithNamespace(UiFramework.localizationNamespace, key);\r\n }\r\n\r\n /** @internal */\r\n public static get packageName(): string {\r\n return \"appui-react\";\r\n }\r\n\r\n /** @internal */\r\n public static loggerCategory(obj: any): string {\r\n const className = getClassName(obj);\r\n const category = UiFramework.packageName + (className ? `.${className}` : \"\");\r\n return category;\r\n }\r\n\r\n public static dispatchActionToStore(type: string, payload: any, immediateSync = false) {\r\n UiFramework.store.dispatch({ type, payload });\r\n if (immediateSync)\r\n SyncUiEventDispatcher.dispatchImmediateSyncUiEvent(type);\r\n else\r\n SyncUiEventDispatcher.dispatchSyncUiEvent(type);\r\n }\r\n\r\n public static setAccudrawSnapMode(snapMode: SnapMode) {\r\n UiFramework.dispatchActionToStore(ConfigurableUiActionId.SetSnapMode, snapMode, true);\r\n }\r\n\r\n public static getAccudrawSnapMode(): SnapMode {\r\n return UiFramework.frameworkState ? UiFramework.frameworkState.configurableUiState.snapMode : /* istanbul ignore next */ SnapMode.NearestKeypoint;\r\n }\r\n\r\n public static getActiveSelectionScope(): string {\r\n return UiFramework.frameworkState ? UiFramework.frameworkState.sessionState.activeSelectionScope : /* istanbul ignore next */ \"element\";\r\n }\r\n\r\n public static setActiveSelectionScope(selectionScopeId: string): void {\r\n // istanbul ignore else\r\n if (UiFramework.frameworkState) {\r\n const foundIndex = UiFramework.frameworkState.sessionState.availableSelectionScopes.findIndex((selectionScope: PresentationSelectionScope) => selectionScope.id === selectionScopeId);\r\n if (-1 !== foundIndex) {\r\n const scope = UiFramework.frameworkState.sessionState.availableSelectionScopes[foundIndex];\r\n UiFramework.dispatchActionToStore(SessionStateActionId.SetSelectionScope, scope.id);\r\n Presentation.selection.scopes.activeScope = scope.id;\r\n }\r\n }\r\n }\r\n\r\n /** @public */\r\n public static openCursorMenu(menuData: CursorMenuData | undefined): void {\r\n UiFramework.dispatchActionToStore(SessionStateActionId.UpdateCursorMenu, menuData);\r\n }\r\n\r\n /** @public */\r\n public static closeCursorMenu(): void {\r\n UiFramework.dispatchActionToStore(SessionStateActionId.UpdateCursorMenu, undefined);\r\n }\r\n\r\n /** @public */\r\n public static getCursorMenuData(): CursorMenuData | undefined {\r\n return UiFramework.frameworkState ? UiFramework.frameworkState.sessionState.cursorMenuData : /* istanbul ignore next */ undefined;\r\n }\r\n\r\n public static getActiveIModelId(): string {\r\n return UiFramework.frameworkState ? UiFramework.frameworkState.sessionState.iModelId : /* istanbul ignore next */ \"\";\r\n }\r\n\r\n public static setActiveIModelId(iModelId: string): void {\r\n UiFramework.dispatchActionToStore(SessionStateActionId.SetActiveIModelId, iModelId);\r\n }\r\n\r\n public static setIModelConnection(iModelConnection: IModelConnection | undefined, immediateSync = false) {\r\n const oldConnection = UiFramework.getIModelConnection();\r\n if (oldConnection !== iModelConnection) {\r\n if (oldConnection?.iModelId)\r\n FrontstageManager.clearFrontstageDefsForIModelId(oldConnection.iModelId);\r\n oldConnection && undefined === iModelConnection && SyncUiEventDispatcher.clearConnectionEvents(oldConnection);\r\n iModelConnection && SyncUiEventDispatcher.initializeConnectionEvents(iModelConnection);\r\n UiFramework.dispatchActionToStore(SessionStateActionId.SetIModelConnection, iModelConnection, immediateSync);\r\n }\r\n UiFramework.setActiveIModelId(iModelConnection?.iModelId ?? \"\");\r\n }\r\n\r\n public static getIModelConnection(): IModelConnection | undefined {\r\n return UiFramework.frameworkState ? UiFramework.frameworkState.sessionState.iModelConnection : /* istanbul ignore next */ undefined;\r\n }\r\n\r\n /** Called by iModelApp to initialize saved UI state from registered UseSettingsProviders\r\n * @public\r\n */\r\n public static async initializeStateFromUserSettingsProviders(immediateSync = false) {\r\n // let any registered providers to load values from the new storage location\r\n const providerKeys = [...this._uiSettingsProviderRegistry.keys()];\r\n for await (const key of providerKeys) {\r\n await this._uiSettingsProviderRegistry.get(key)!.loadUserSettings(UiFramework._uiStateStorage);\r\n }\r\n\r\n // istanbul ignore next\r\n if (immediateSync)\r\n SyncUiEventDispatcher.dispatchImmediateSyncUiEvent(SyncUiEventId.UiStateStorageChanged);\r\n else\r\n SyncUiEventDispatcher.dispatchSyncUiEvent(SyncUiEventId.UiStateStorageChanged);\r\n }\r\n\r\n /** @public */\r\n public static async setUiStateStorage(storage: UiStateStorage, immediateSync = false) {\r\n if (UiFramework._uiStateStorage === storage)\r\n return;\r\n\r\n UiFramework._uiStateStorage = storage;\r\n await this.initializeStateFromUserSettingsProviders(immediateSync);\r\n }\r\n\r\n /** The UI Settings Storage is a convenient wrapper around Local Storage to assist in caching state information across user sessions.\r\n * It was previously used to conflate both the state information across session and the information driven directly from user explicit action,\r\n * which are now handled with user preferences.\r\n * @public\r\n */\r\n public static getUiStateStorage(): UiStateStorage {\r\n return UiFramework._uiStateStorage;\r\n }\r\n\r\n public static setDefaultIModelViewportControlId(iModelViewportControlId: string, immediateSync = false) {\r\n UiFramework.dispatchActionToStore(SessionStateActionId.SetDefaultIModelViewportControlId, iModelViewportControlId, immediateSync);\r\n }\r\n\r\n public static getDefaultIModelViewportControlId(): string | undefined {\r\n return UiFramework.frameworkState ? UiFramework.frameworkState.sessionState.defaultIModelViewportControlId : /* istanbul ignore next */ undefined;\r\n }\r\n\r\n public static setDefaultViewId(viewId: string, immediateSync = false) {\r\n UiFramework.dispatchActionToStore(SessionStateActionId.SetDefaultViewId, viewId, immediateSync);\r\n }\r\n\r\n public static getDefaultViewId(): string | undefined {\r\n return UiFramework.frameworkState ? UiFramework.frameworkState.sessionState.defaultViewId : /* istanbul ignore next */ undefined;\r\n }\r\n\r\n public static setDefaultViewState(viewState: ViewState, immediateSync = false) {\r\n UiFramework.dispatchActionToStore(SessionStateActionId.SetDefaultViewState, viewState, immediateSync);\r\n }\r\n public static getDefaultViewState(): ViewState | undefined {\r\n return UiFramework.frameworkState ? UiFramework.frameworkState.sessionState.defaultViewState : /* istanbul ignore next */ undefined;\r\n }\r\n\r\n /** @public */\r\n public static getAvailableSelectionScopes(): PresentationSelectionScope[] {\r\n return UiFramework.frameworkState ?\r\n UiFramework.frameworkState.sessionState.availableSelectionScopes :\r\n /* istanbul ignore next */\r\n [{ id: \"element\", label: \"Element\" } as PresentationSelectionScope];\r\n }\r\n\r\n public static getIsUiVisible() {\r\n return UiShowHideManager.isUiVisible;\r\n }\r\n\r\n public static setIsUiVisible(visible: boolean) {\r\n if (UiShowHideManager.isUiVisible !== visible) {\r\n UiShowHideManager.isUiVisible = visible;\r\n UiFramework.onUiVisibilityChanged.emit({ visible });\r\n }\r\n }\r\n\r\n public static setColorTheme(theme: string) {\r\n if (UiFramework.getColorTheme() === theme)\r\n return;\r\n\r\n UiFramework.dispatchActionToStore(ConfigurableUiActionId.SetTheme, theme, true);\r\n }\r\n\r\n public static getColorTheme(): string {\r\n return UiFramework.frameworkState ? UiFramework.frameworkState.configurableUiState.theme : /* istanbul ignore next */ SYSTEM_PREFERRED_COLOR_THEME;\r\n }\r\n\r\n public static setWidgetOpacity(opacity: number) {\r\n if (UiFramework.getWidgetOpacity() === opacity)\r\n return;\r\n\r\n UiFramework.dispatchActionToStore(ConfigurableUiActionId.SetWidgetOpacity, opacity, true);\r\n }\r\n\r\n public static getWidgetOpacity(): number {\r\n return UiFramework.frameworkState ? UiFramework.frameworkState.configurableUiState.widgetOpacity : /* istanbul ignore next */ WIDGET_OPACITY_DEFAULT;\r\n }\r\n\r\n public static isMobile() { // eslint-disable-line @itwin/prefer-get\r\n return ProcessDetector.isMobileBrowser;\r\n }\r\n\r\n /** Returns the Ui Version.\r\n * @public\r\n */\r\n public static get uiVersion(): FrameworkVersionId {\r\n return UiFramework.frameworkState ? UiFramework.frameworkState.configurableUiState.frameworkVersion : this._uiVersion;\r\n }\r\n\r\n public static setUiVersion(version: FrameworkVersionId) {\r\n if (UiFramework.uiVersion === version)\r\n return;\r\n\r\n UiFramework.dispatchActionToStore(ConfigurableUiActionId.SetFrameworkVersion, version === \"1\" ? \"1\" : \"2\", true);\r\n }\r\n\r\n public static get useDragInteraction(): boolean {\r\n return UiFramework.frameworkState ? UiFramework.frameworkState.configurableUiState.useDragInteraction : false;\r\n }\r\n\r\n public static setUseDragInteraction(useDragInteraction: boolean) {\r\n UiFramework.dispatchActionToStore(ConfigurableUiActionId.SetDragInteraction, useDragInteraction, true);\r\n }\r\n\r\n /** Returns the variable controlling whether the overlay is displayed in a Viewport\r\n * @public\r\n */\r\n public static get viewOverlayDisplay() {\r\n return UiFramework.frameworkState ? UiFramework.frameworkState.configurableUiState.viewOverlayDisplay : true;\r\n }\r\n /** Set the variable that controls display of the view overlay. Applies to all viewports in the app\r\n * @public\r\n */\r\n public static setViewOverlayDisplay(display: boolean) {\r\n if (UiFramework.viewOverlayDisplay === display)\r\n return;\r\n UiFramework.dispatchActionToStore(ConfigurableUiActionId.SetViewOverlayDisplay, display);\r\n }\r\n /** Send logging message to the telemetry system\r\n * @internal\r\n */\r\n // istanbul ignore next\r\n public static async postTelemetry(eventName: string, eventId?: GuidString, iTwinId?: GuidString, iModeId?: GuidString, changeSetId?: string, time?: TrackingTime, additionalProperties?: { [key: string]: any }): Promise<void> {\r\n if (!IModelApp.authorizationClient)\r\n return;\r\n\r\n try {\r\n const activity: RpcActivity = {\r\n sessionId: IModelApp.sessionId,\r\n activityId: \"\",\r\n applicationId: IModelApp.applicationId,\r\n applicationVersion: IModelApp.applicationVersion,\r\n accessToken: (await IModelApp.authorizationClient.getAccessToken()) ?? \"\",\r\n };\r\n const telemetryEvent = new TelemetryEvent(eventName, eventId, iTwinId, iModeId, changeSetId, time, additionalProperties);\r\n await IModelApp.telemetry.postTelemetry(activity, telemetryEvent);\r\n } catch { }\r\n }\r\n private static _handleFrameworkVersionChangedEvent = (args: FrameworkVersionChangedEventArgs) => {\r\n // Log Ui Version used\r\n Logger.logInfo(UiFramework.loggerCategory(UiFramework), `Ui Version changed to ${args.version} `);\r\n // eslint-disable-next-line @typescript-eslint/no-floating-promises\r\n UiFramework.postTelemetry(`Ui Version changed to ${args.version} `, \"F2772C81-962D-4755-807C-2D675A5FF399\");\r\n UiFramework.setUiVersion(args.version);\r\n };\r\n\r\n /** Determines whether a ContextMenu is open\r\n * @alpha\r\n * */\r\n public static get isContextMenuOpen(): boolean {\r\n const contextMenu = document.querySelector(\"div.core-context-menu-opened\");\r\n return contextMenu !== null && contextMenu !== undefined;\r\n }\r\n}\r\n"]}
|
|
@@ -13,7 +13,8 @@ export declare enum ConfigurableUiActionId {
|
|
|
13
13
|
SetToolPrompt = "configurableui:set_toolprompt",
|
|
14
14
|
SetWidgetOpacity = "configurableui:set_widget_opacity",
|
|
15
15
|
SetDragInteraction = "configurableui:set-drag-interaction",
|
|
16
|
-
SetFrameworkVersion = "configurableui:set-framework-version"
|
|
16
|
+
SetFrameworkVersion = "configurableui:set-framework-version",
|
|
17
|
+
SetViewOverlayDisplay = "configurableui:set-view-overlay-display"
|
|
17
18
|
}
|
|
18
19
|
/** The portion of state managed by the ConfigurableUiReducer.
|
|
19
20
|
* @public
|
|
@@ -25,6 +26,7 @@ export interface ConfigurableUiState {
|
|
|
25
26
|
widgetOpacity: number;
|
|
26
27
|
useDragInteraction: boolean;
|
|
27
28
|
frameworkVersion: FrameworkVersionId;
|
|
29
|
+
viewOverlayDisplay: boolean;
|
|
28
30
|
}
|
|
29
31
|
/** An object with a function that creates each ConfigurableUiReducer that can be handled by our reducer.
|
|
30
32
|
* @public
|
|
@@ -36,6 +38,7 @@ export declare const ConfigurableUiActions: {
|
|
|
36
38
|
setWidgetOpacity: (opacity: number) => import("../redux/redux-ts").ActionWithPayload<ConfigurableUiActionId.SetWidgetOpacity, number>;
|
|
37
39
|
setDragInteraction: (dragInteraction: boolean) => import("../redux/redux-ts").ActionWithPayload<ConfigurableUiActionId.SetDragInteraction, boolean>;
|
|
38
40
|
setFrameworkVersion: (frameworkVersion: FrameworkVersionId) => import("../redux/redux-ts").ActionWithPayload<ConfigurableUiActionId.SetFrameworkVersion, FrameworkVersionId>;
|
|
41
|
+
setViewOverlayDisplay: (displayViewOverlay: boolean) => import("../redux/redux-ts").ActionWithPayload<ConfigurableUiActionId.SetViewOverlayDisplay, boolean>;
|
|
39
42
|
};
|
|
40
43
|
/** Union of ConfigurableUi Redux actions
|
|
41
44
|
* @public
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"state.d.ts","sourceRoot":"","sources":["../../../../src/appui-react/configurableui/state.ts"],"names":[],"mappings":"AAIA;;GAEG;AAGH,OAAO,EAAE,YAAY,EAAgB,MAAM,mBAAmB,CAAC;AAE/D,OAAO,EAAE,kBAAkB,EAAE,MAAM,gBAAgB,CAAC;AAIpD;;;GAGG;AACH,oBAAY,sBAAsB;IAChC,WAAW,gCAAgC;IAC3C,QAAQ,6BAA6B;IACrC,aAAa,kCAAkC;IAC/C,gBAAgB,sCAAsC;IACtD,kBAAkB,wCAAwC;IAC1D,mBAAmB,yCAAyC;
|
|
1
|
+
{"version":3,"file":"state.d.ts","sourceRoot":"","sources":["../../../../src/appui-react/configurableui/state.ts"],"names":[],"mappings":"AAIA;;GAEG;AAGH,OAAO,EAAE,YAAY,EAAgB,MAAM,mBAAmB,CAAC;AAE/D,OAAO,EAAE,kBAAkB,EAAE,MAAM,gBAAgB,CAAC;AAIpD;;;GAGG;AACH,oBAAY,sBAAsB;IAChC,WAAW,gCAAgC;IAC3C,QAAQ,6BAA6B;IACrC,aAAa,kCAAkC;IAC/C,gBAAgB,sCAAsC;IACtD,kBAAkB,wCAAwC;IAC1D,mBAAmB,yCAAyC;IAC5D,qBAAqB,4CAA4C;CAClE;AAED;;GAEG;AACH,MAAM,WAAW,mBAAmB;IAClC,QAAQ,EAAE,MAAM,CAAC;IACjB,UAAU,EAAE,MAAM,CAAC;IACnB,KAAK,EAAE,MAAM,CAAC;IACd,aAAa,EAAE,MAAM,CAAC;IACtB,kBAAkB,EAAE,OAAO,CAAC;IAC5B,gBAAgB,EAAE,kBAAkB,CAAC;IACrC,kBAAkB,EAAE,OAAO,CAAC;CAC7B;AAaD;;GAEG;AACH,eAAO,MAAM,qBAAqB;4BACR,MAAM;sBAGpB,MAAM;gCAGD,MAAM;gCAGT,MAAM;0CACoB,OAAO;4CACL,kBAAkB;gDACd,OAAO;CACpD,CAAC;AAEF;;GAEG;AACH,oBAAY,0BAA0B,GAAG,YAAY,CAAC,OAAO,qBAAqB,CAAC,CAAC;AAEpF;;GAEG;AACH,wBAAgB,qBAAqB,CAAC,KAAK,iCAAoC,EAAE,MAAM,EAAE,0BAA0B,GAAG,mBAAmB,CA6BxI"}
|
|
@@ -21,6 +21,7 @@ export var ConfigurableUiActionId;
|
|
|
21
21
|
ConfigurableUiActionId["SetWidgetOpacity"] = "configurableui:set_widget_opacity";
|
|
22
22
|
ConfigurableUiActionId["SetDragInteraction"] = "configurableui:set-drag-interaction";
|
|
23
23
|
ConfigurableUiActionId["SetFrameworkVersion"] = "configurableui:set-framework-version";
|
|
24
|
+
ConfigurableUiActionId["SetViewOverlayDisplay"] = "configurableui:set-view-overlay-display";
|
|
24
25
|
})(ConfigurableUiActionId || (ConfigurableUiActionId = {}));
|
|
25
26
|
/** used on first call of ConfigurableUiReducer */
|
|
26
27
|
const initialState = {
|
|
@@ -30,6 +31,7 @@ const initialState = {
|
|
|
30
31
|
widgetOpacity: WIDGET_OPACITY_DEFAULT,
|
|
31
32
|
useDragInteraction: false,
|
|
32
33
|
frameworkVersion: "2",
|
|
34
|
+
viewOverlayDisplay: true,
|
|
33
35
|
};
|
|
34
36
|
/** An object with a function that creates each ConfigurableUiReducer that can be handled by our reducer.
|
|
35
37
|
* @public
|
|
@@ -47,6 +49,7 @@ export const ConfigurableUiActions = {
|
|
|
47
49
|
(opacity) => createAction(ConfigurableUiActionId.SetWidgetOpacity, opacity),
|
|
48
50
|
setDragInteraction: (dragInteraction) => createAction(ConfigurableUiActionId.SetDragInteraction, dragInteraction),
|
|
49
51
|
setFrameworkVersion: (frameworkVersion) => createAction(ConfigurableUiActionId.SetFrameworkVersion, frameworkVersion),
|
|
52
|
+
setViewOverlayDisplay: (displayViewOverlay) => createAction(ConfigurableUiActionId.SetViewOverlayDisplay, displayViewOverlay),
|
|
50
53
|
};
|
|
51
54
|
/** Handles actions to update ConfigurableUiState.
|
|
52
55
|
* @public
|
|
@@ -73,6 +76,10 @@ export function ConfigurableUiReducer(state = initialState, action) {
|
|
|
73
76
|
const frameworkVersion = (action.payload);
|
|
74
77
|
return { ...state, frameworkVersion };
|
|
75
78
|
}
|
|
79
|
+
case ConfigurableUiActionId.SetViewOverlayDisplay: {
|
|
80
|
+
const viewOverlayDisplay = (action.payload);
|
|
81
|
+
return { ...state, viewOverlayDisplay };
|
|
82
|
+
}
|
|
76
83
|
}
|
|
77
84
|
return outState;
|
|
78
85
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"state.js","sourceRoot":"","sources":["../../../../src/appui-react/configurableui/state.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAEH,OAAO,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAChD,OAAO,EAAgB,YAAY,EAAE,M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sBAAsB,CAAC,kBAAkB,CAAC,CAAC;YAC9C,OAAO,EAAE,GAAG,KAAK,EAAE,kBAAkB,EAAE,MAAM,CAAC,OAAO,EAAE,CAAC;SACzD;QACD,KAAK,sBAAsB,CAAC,mBAAmB,CAAC,CAAC;YAC/C,MAAM,gBAAgB,GAAG,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;YAC1C,OAAO,EAAE,GAAG,KAAK,EAAE,gBAAgB,EAAE,CAAC;SACvC;QACD,KAAK,sBAAsB,CAAC,qBAAqB,CAAC,CAAC;YACjD,MAAM,kBAAkB,GAAG,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;YAC5C,OAAO,EAAE,GAAG,KAAK,EAAE,kBAAkB,EAAE,CAAC;SACzC;KACF;IACD,OAAO,QAAQ,CAAC;AAClB,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 State\r\n */\r\n\r\nimport { SnapMode } from \"@itwin/core-frontend\";\r\nimport { ActionsUnion, createAction } from \"../redux/redux-ts\";\r\nimport { SYSTEM_PREFERRED_COLOR_THEME, WIDGET_OPACITY_DEFAULT } from \"../theme/ThemeManager\";\r\nimport { FrameworkVersionId } from \"../UiFramework\";\r\n\r\n// cSpell:ignore configurableui snapmode toolprompt\r\n\r\n/** Action Ids used by Redux and to send sync UI components. Typically used to refresh visibility or enable state of control.\r\n * Since these are also used as sync ids they should be in lowercase.\r\n * @public\r\n */\r\nexport enum ConfigurableUiActionId {\r\n SetSnapMode = \"configurableui:set_snapmode\",\r\n SetTheme = \"configurableui:set_theme\",\r\n SetToolPrompt = \"configurableui:set_toolprompt\",\r\n SetWidgetOpacity = \"configurableui:set_widget_opacity\",\r\n SetDragInteraction = \"configurableui:set-drag-interaction\",\r\n SetFrameworkVersion = \"configurableui:set-framework-version\",\r\n SetViewOverlayDisplay = \"configurableui:set-view-overlay-display\",\r\n}\r\n\r\n/** The portion of state managed by the ConfigurableUiReducer.\r\n * @public\r\n */\r\nexport interface ConfigurableUiState {\r\n snapMode: number;\r\n toolPrompt: string;\r\n theme: string;\r\n widgetOpacity: number;\r\n useDragInteraction: boolean;\r\n frameworkVersion: FrameworkVersionId;\r\n viewOverlayDisplay: boolean;\r\n}\r\n\r\n/** used on first call of ConfigurableUiReducer */\r\nconst initialState: ConfigurableUiState = {\r\n snapMode: SnapMode.NearestKeypoint as number,\r\n toolPrompt: \"\",\r\n theme: SYSTEM_PREFERRED_COLOR_THEME,\r\n widgetOpacity: WIDGET_OPACITY_DEFAULT,\r\n useDragInteraction: false,\r\n frameworkVersion: \"2\",\r\n viewOverlayDisplay: true,\r\n};\r\n\r\n/** An object with a function that creates each ConfigurableUiReducer that can be handled by our reducer.\r\n * @public\r\n */\r\nexport const ConfigurableUiActions = { // eslint-disable-line @typescript-eslint/naming-convention\r\n setSnapMode: (snapMode: number) => createAction(ConfigurableUiActionId.SetSnapMode, snapMode),\r\n setTheme:\r\n // istanbul ignore next\r\n (theme: string) => createAction(ConfigurableUiActionId.SetTheme, theme),\r\n setToolPrompt:\r\n // istanbul ignore next\r\n (toolPrompt: string) => createAction(ConfigurableUiActionId.SetToolPrompt, toolPrompt),\r\n setWidgetOpacity:\r\n // istanbul ignore next\r\n (opacity: number) => createAction(ConfigurableUiActionId.SetWidgetOpacity, opacity),\r\n setDragInteraction: (dragInteraction: boolean) => createAction(ConfigurableUiActionId.SetDragInteraction, dragInteraction),\r\n setFrameworkVersion: (frameworkVersion: FrameworkVersionId) => createAction(ConfigurableUiActionId.SetFrameworkVersion, frameworkVersion),\r\n setViewOverlayDisplay: (displayViewOverlay: boolean) => createAction(ConfigurableUiActionId.SetViewOverlayDisplay, displayViewOverlay),\r\n};\r\n\r\n/** Union of ConfigurableUi Redux actions\r\n * @public\r\n */\r\nexport type ConfigurableUiActionsUnion = ActionsUnion<typeof ConfigurableUiActions>;\r\n\r\n/** Handles actions to update ConfigurableUiState.\r\n * @public\r\n */\r\nexport function ConfigurableUiReducer(state: ConfigurableUiState = initialState, action: ConfigurableUiActionsUnion): ConfigurableUiState {\r\n const outState = state;\r\n\r\n switch (action.type) {\r\n case ConfigurableUiActionId.SetSnapMode: {\r\n return { ...state, snapMode: action.payload };\r\n }\r\n case ConfigurableUiActionId.SetToolPrompt: {\r\n return { ...state, toolPrompt: action.payload };\r\n }\r\n case ConfigurableUiActionId.SetTheme: {\r\n return { ...state, theme: action.payload };\r\n }\r\n case ConfigurableUiActionId.SetWidgetOpacity: {\r\n return { ...state, widgetOpacity: action.payload };\r\n }\r\n case ConfigurableUiActionId.SetDragInteraction: {\r\n return { ...state, useDragInteraction: action.payload };\r\n }\r\n case ConfigurableUiActionId.SetFrameworkVersion: {\r\n const frameworkVersion = (action.payload);\r\n return { ...state, frameworkVersion };\r\n }\r\n case ConfigurableUiActionId.SetViewOverlayDisplay: {\r\n const viewOverlayDisplay = (action.payload);\r\n return { ...state, viewOverlayDisplay };\r\n }\r\n }\r\n return outState;\r\n}\r\n"]}
|
|
@@ -32,6 +32,17 @@ export interface IModelViewportControlOptions {
|
|
|
32
32
|
/** Optional property to defer reactNode initialization until first reactNode property in needed. Useful when subclassing the `IModelViewportControl`. */
|
|
33
33
|
deferNodeInitialization?: boolean;
|
|
34
34
|
}
|
|
35
|
+
interface ViewOverlayHostProps {
|
|
36
|
+
viewport: ScreenViewport;
|
|
37
|
+
featureOptions?: {
|
|
38
|
+
[key: string]: any;
|
|
39
|
+
};
|
|
40
|
+
userSuppliedOverlay?: (_viewport: ScreenViewport) => React.ReactNode;
|
|
41
|
+
}
|
|
42
|
+
/** View Overlay component -- exported for testing
|
|
43
|
+
* @internal
|
|
44
|
+
*/
|
|
45
|
+
export declare function ViewOverlayHost({ viewport, featureOptions, userSuppliedOverlay }: ViewOverlayHostProps): JSX.Element | null;
|
|
35
46
|
/** iModel Viewport Control
|
|
36
47
|
* @public
|
|
37
48
|
*/
|
|
@@ -62,8 +73,9 @@ export declare class IModelViewportControl extends ViewportContentControl {
|
|
|
62
73
|
/** Get the React.Element for a ViewSelector change. */
|
|
63
74
|
getReactElementForViewSelectorChange(iModelConnection: IModelConnection, _unusedViewDefinitionId: Id64String, viewState: ViewState, _name: string): React.ReactNode;
|
|
64
75
|
/** Get the default ViewOverlay unless parameter is set to not use it. May be override in an application specific sub-class */
|
|
65
|
-
protected _getViewOverlay: (
|
|
76
|
+
protected _getViewOverlay: (vp: ScreenViewport) => React.ReactNode;
|
|
66
77
|
/** Get the NavigationAidControl associated with this ContentControl */
|
|
67
78
|
get navigationAidControl(): string;
|
|
68
79
|
}
|
|
80
|
+
export {};
|
|
69
81
|
//# sourceMappingURL=IModelViewport.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IModelViewport.d.ts","sourceRoot":"","sources":["../../../../src/appui-react/content/IModelViewport.tsx"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AACjD,OAAO,EAAE,gBAAgB,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AAEnF,OAAO,EAAqB,aAAa,EAAE,MAAM,gCAAgC,CAAC;AAIlF,OAAO,EAAE,sBAAsB,EAAE,MAAM,yCAAyC,CAAC;AAKjF,OAAO,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAC;
|
|
1
|
+
{"version":3,"file":"IModelViewport.d.ts","sourceRoot":"","sources":["../../../../src/appui-react/content/IModelViewport.tsx"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AACjD,OAAO,EAAE,gBAAgB,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,sBAA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AAe,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,GAAG,MAAM,CAAA;KAAE,CAAM;IACpE,SAAS,CAAC,UAAU,EAAE,aAAa,GAAG,SAAS,CAAC;IAChD,SAAS,CAAC,iBAAiB,EAAE,gBAAgB,GAAG,SAAS,CAAC;IAC1D,SAAS,CAAC,2BAA2B,EAAE,OAAO,CAAC;IAC/C,OAAO,CAAC,wBAAwB,CAAC,CAAiD;gBAEtE,IAAI,EAAE,sBAAsB,EAAY,QAAQ,EAAE,4BAA4B;IAY1F,SAAS,CAAC,mBAAmB;cAqBV,YAAY,IAAI,KAAK,CAAC,SAAS;IAOlD;;;OAGG;IACH,OAAO,CAAC,mBAAmB,CAczB;IAEF,6DAA6D;IAC7D,SAAS,CAAC,sCAAsC,IAAI,KAAK,CAAC,SAAS;IAcnE,6DAA6D;IAC7D,SAAS,CAAC,6BAA6B,CAAC,gBAAgB,EAAE,gBAAgB,EAAE,SAAS,EAAE,aAAa,GAAG,KAAK,CAAC,SAAS;IAiBtH,kFAAkF;IAClF,SAAS,CAAC,wBAAwB,CAAC,QAAQ,EAAE,4BAA4B,GAAG,KAAK,CAAC,SAAS;IAK3F,uDAAuD;IACvC,oCAAoC,CAAC,gBAAgB,EAAE,gBAAgB,EAAE,uBAAuB,EAAE,UAAU,EAAE,SAAS,EAAE,SAAS,EAAE,KAAK,EAAE,MAAM,GAAG,KAAK,CAAC,SAAS;IAInL,+HAA+H;IAC/H,SAAS,CAAC,eAAe,OAAQ,cAAc,KAAG,MAAM,SAAS,CAE/D;IAEF,uEAAuE;IACvE,IAAoB,oBAAoB,IAAI,MAAM,CAKjD;CACF"}
|
|
@@ -17,6 +17,7 @@ import { DefaultViewOverlay } from "./DefaultViewOverlay";
|
|
|
17
17
|
import { ViewportContentControl } from "./ViewportContentControl";
|
|
18
18
|
import { StandardRotationNavigationAidControl } from "../navigationaids/StandardRotationNavigationAid";
|
|
19
19
|
import { UiError } from "@itwin/appui-abstract";
|
|
20
|
+
import { useSelector } from "react-redux";
|
|
20
21
|
// create a HOC viewport component that supports unified selection
|
|
21
22
|
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
22
23
|
const UnifiedSelectionViewport = viewWithUnifiedSelection(ViewportComponent);
|
|
@@ -24,6 +25,19 @@ const UnifiedSelectionViewport = viewWithUnifiedSelection(ViewportComponent);
|
|
|
24
25
|
* @public
|
|
25
26
|
*/
|
|
26
27
|
export const IModelConnectedViewport = connectIModelConnectionAndViewState(null, null)(UnifiedSelectionViewport); // eslint-disable-line @typescript-eslint/naming-convention
|
|
28
|
+
/** View Overlay component -- exported for testing
|
|
29
|
+
* @internal
|
|
30
|
+
*/
|
|
31
|
+
// istanbul ignore next
|
|
32
|
+
export function ViewOverlayHost({ viewport, featureOptions, userSuppliedOverlay }) {
|
|
33
|
+
const displayViewOverlay = useSelector((state) => {
|
|
34
|
+
const frameworkState = state[UiFramework.frameworkStateKey];
|
|
35
|
+
return frameworkState ? frameworkState.configurableUiState.viewOverlayDisplay : true;
|
|
36
|
+
});
|
|
37
|
+
if (!displayViewOverlay)
|
|
38
|
+
return null;
|
|
39
|
+
return userSuppliedOverlay ? React.createElement(React.Fragment, null, "userSuppliedOverlay(viewport)") : React.createElement(DefaultViewOverlay, { viewport: viewport, featureOptions: featureOptions });
|
|
40
|
+
}
|
|
27
41
|
/** iModel Viewport Control
|
|
28
42
|
* @public
|
|
29
43
|
*/
|
|
@@ -53,10 +67,8 @@ export class IModelViewportControl extends ViewportContentControl {
|
|
|
53
67
|
return viewState;
|
|
54
68
|
};
|
|
55
69
|
/** Get the default ViewOverlay unless parameter is set to not use it. May be override in an application specific sub-class */
|
|
56
|
-
this._getViewOverlay = (
|
|
57
|
-
|
|
58
|
-
return this._userSuppliedViewOverlay(viewport);
|
|
59
|
-
return React.createElement(DefaultViewOverlay, { viewport: viewport, featureOptions: this._featureOptions });
|
|
70
|
+
this._getViewOverlay = (vp) => {
|
|
71
|
+
return React.createElement(ViewOverlayHost, { viewport: vp, featureOptions: this._featureOptions, userSuppliedOverlay: this._userSuppliedViewOverlay, "data-testid": "ViewOverlay" });
|
|
60
72
|
};
|
|
61
73
|
if (_options.featureOptions)
|
|
62
74
|
this._featureOptions = _options.featureOptions;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IModelViewport.js","sourceRoot":"","sources":["../../../../src/appui-react/content/IModelViewport.tsx"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B,OAAO,EAAE,wBAAwB,EAAE,MAAM,gCAAgC,CAAC;AAC1E,OAAO,EAAE,iBAAiB,EAAiB,MAAM,gCAAgC,CAAC;AAClF,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAEjD,OAAO,EAAE,iBAAiB,EAAE,MAAM,iCAAiC,CAAC;AAEpE,OAAO,EAAE,qBAAqB,EAAE,MAAM,yCAAyC,CAAC;AAChF,OAAO,EAAE,mCAAmC,EAAE,MAAM,wBAAwB,CAAC;AAC7E,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAC7C,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAC1D,OAAO,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAC;AAClE,OAAO,EAAE,oCAAoC,EAAE,MAAM,iDAAiD,CAAC;AACvG,OAAO,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC;AAEhD,kEAAkE;AAClE,gEAAgE;AAChE,MAAM,wBAAwB,GAAG,wBAAwB,CAAC,iBAAiB,CAAC,CAAC;AAE7E;;GAEG;AACH,MAAM,CAAC,MAAM,uBAAuB,GAAG,mCAAmC,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC,wBAAwB,CAAC,CAAC,CAAC,2DAA2D;AAsB7K;;GAEG;AACH,uBAAuB;AACvB,MAAM,OAAO,qBAAsB,SAAQ,sBAAsB;IAU/D,YAAY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AC,QAAQ;YACf,OAAO,KAAK,CAAC,oBAAoB,CAAC;;YAElC,OAAO,oCAAoC,CAAC,eAAe,CAAC;IAChE,CAAC;CACF;AAED,qBAAqB,CAAC,eAAe,CAAC,qBAAqB,CAAC,EAAE,EAAE,qBAAqB,CAAC,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 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 { viewWithUnifiedSelection } from \"@itwin/presentation-components\";\r\nimport { ViewportComponent, ViewStateProp } from \"@itwin/imodel-components-react\";\r\nimport { FillCentered } from \"@itwin/core-react\";\r\n\r\nimport { FrontstageManager } from \"../frontstage/FrontstageManager\";\r\nimport { ConfigurableCreateInfo } from \"../configurableui/ConfigurableUiControl\";\r\nimport { ConfigurableUiManager } from \"../configurableui/ConfigurableUiManager\";\r\nimport { connectIModelConnectionAndViewState } from \"../redux/connectIModel\";\r\nimport { UiFramework } from \"../UiFramework\";\r\nimport { DefaultViewOverlay } from \"./DefaultViewOverlay\";\r\nimport { ViewportContentControl } from \"./ViewportContentControl\";\r\nimport { StandardRotationNavigationAidControl } from \"../navigationaids/StandardRotationNavigationAid\";\r\nimport { UiError } from \"@itwin/appui-abstract\";\r\n\r\n// create a HOC viewport component that supports unified selection\r\n// eslint-disable-next-line @typescript-eslint/naming-convention\r\nconst UnifiedSelectionViewport = viewWithUnifiedSelection(ViewportComponent);\r\n\r\n/** Viewport that is connected to the IModelConnection property in the Redux store. The application must set up the Redux store and include the FrameworkReducer.\r\n * @public\r\n */\r\nexport const IModelConnectedViewport = connectIModelConnectionAndViewState(null, null)(UnifiedSelectionViewport); // eslint-disable-line @typescript-eslint/naming-convention\r\n\r\n/** [[IModelViewportControl]] options. These options are set in the applicationData property of the [[ContentProps]].\r\n * @public\r\n */\r\nexport interface IModelViewportControlOptions {\r\n /** ViewState or a function to return a ViewState */\r\n viewState?: ViewStateProp;\r\n /** IModelConnection of data in Viewport */\r\n iModelConnection?: IModelConnection | (() => IModelConnection);\r\n /** Map of options that can be used to enable/disable features within the view */\r\n featureOptions?: { [key: string]: any };\r\n /** Optional background color which may be used if viewState and iModelConnection are undefined */\r\n bgColor?: string;\r\n /** Optional property to always use the supplied `viewState` property instead of using viewport.view when set */\r\n alwaysUseSuppliedViewState?: boolean;\r\n /** Optional property to supply custom view overlay. Uses when caller want to supply custom overlay component. */\r\n supplyViewOverlay?: (_viewport: ScreenViewport) => React.ReactNode;\r\n /** Optional property to defer reactNode initialization until first reactNode property in needed. Useful when subclassing the `IModelViewportControl`. */\r\n deferNodeInitialization?: boolean;\r\n}\r\n\r\n/** iModel Viewport Control\r\n * @public\r\n */\r\n// istanbul ignore next\r\nexport class IModelViewportControl extends ViewportContentControl {\r\n public static get id() {\r\n return \"UiFramework.IModelViewportControl\";\r\n }\r\n protected _featureOptions: { [key: string]: boolean | string } = {};\r\n protected _viewState: ViewStateProp | undefined;\r\n protected _iModelConnection: IModelConnection | undefined;\r\n protected _alwaysUseSuppliedViewState: boolean;\r\n private _userSuppliedViewOverlay?: (_viewport: ScreenViewport) => React.ReactNode;\r\n\r\n constructor(info: ConfigurableCreateInfo, protected _options: IModelViewportControlOptions) {\r\n super(info, _options);\r\n\r\n if (_options.featureOptions)\r\n this._featureOptions = _options.featureOptions;\r\n this._alwaysUseSuppliedViewState = _options.alwaysUseSuppliedViewState ?? false;\r\n this._userSuppliedViewOverlay = _options.supplyViewOverlay;\r\n\r\n if (!_options.deferNodeInitialization)\r\n this.initializeReactNode();\r\n }\r\n\r\n protected initializeReactNode() {\r\n const options = this._options;\r\n\r\n if (options.viewState)\r\n this._viewState = options.viewState;\r\n\r\n const iModelConnection = (typeof options.iModelConnection === \"function\") ? options.iModelConnection() : options.iModelConnection;\r\n\r\n if (this._viewState && iModelConnection) {\r\n /** Passing _determineViewState as a function reference; it is not called here. */\r\n this._reactNode = this.getImodelViewportReactElement(iModelConnection, this._determineViewState);\r\n } else {\r\n if (UiFramework.getIModelConnection() && UiFramework.getDefaultViewState()) {\r\n this._reactNode = this.getImodelConnectedViewportReactElement();\r\n } else {\r\n this._reactNode = this.getNoContentReactElement(options);\r\n this.setIsReady();\r\n }\r\n }\r\n }\r\n\r\n protected override getReactNode(): React.ReactNode {\r\n if (!React.isValidElement(this._reactNode) && this._options.deferNodeInitialization)\r\n this.initializeReactNode();\r\n\r\n return this.getKeyedReactNode();\r\n }\r\n\r\n /**\r\n * This is passed as a function to the ViewportComponent as the `viewState` prop in getImodelViewportReactElement().\r\n * It is called by ViewportComponent on a mount to resolve the viewState.\r\n */\r\n private _determineViewState = (): ViewState => {\r\n let viewState: ViewState;\r\n\r\n if (this.viewport && !this._alwaysUseSuppliedViewState)\r\n viewState = this.viewport.view;\r\n else if (this._viewState) {\r\n if (typeof this._viewState === \"function\")\r\n viewState = this._viewState();\r\n else\r\n viewState = this._viewState;\r\n } else\r\n throw new UiError(UiFramework.loggerCategory(this), \"No ViewState could be determined\");\r\n\r\n return viewState!;\r\n };\r\n\r\n /** Get the React component that will contain the Viewport */\r\n protected getImodelConnectedViewportReactElement(): React.ReactNode {\r\n return <IModelConnectedViewport\r\n viewportRef={(v: ScreenViewport) => {\r\n this.viewport = v;\r\n // for convenience, if window defined bind viewport to window\r\n if (undefined !== window)\r\n (window as any).viewport = v;\r\n if (!FrontstageManager.isLoading)\r\n FrontstageManager.activeFrontstageDef?.setActiveViewFromViewport(v);\r\n }}\r\n getViewOverlay={this._getViewOverlay}\r\n />;\r\n }\r\n\r\n /** Get the React component that will contain the Viewport */\r\n protected getImodelViewportReactElement(iModelConnection: IModelConnection, viewState: ViewStateProp): React.ReactNode {\r\n return <UnifiedSelectionViewport\r\n viewState={viewState}\r\n imodel={iModelConnection}\r\n controlId={this.controlId}\r\n viewportRef={(v: ScreenViewport) => {\r\n this.viewport = v;\r\n // for convenience, if window defined bind viewport to window\r\n if (undefined !== window)\r\n (window as any).viewport = v;\r\n if (!FrontstageManager.isLoading)\r\n FrontstageManager.activeFrontstageDef?.setActiveViewFromViewport(v);\r\n }}\r\n getViewOverlay={this._getViewOverlay}\r\n />;\r\n }\r\n\r\n /** Get the React component that will be shown when no iModel data is available */\r\n protected getNoContentReactElement(_options: IModelViewportControlOptions): React.ReactNode {\r\n const noContent = UiFramework.translate(\"general.no-content\");\r\n return <FillCentered> {noContent} </FillCentered>;\r\n }\r\n\r\n /** Get the React.Element for a ViewSelector change. */\r\n public override getReactElementForViewSelectorChange(iModelConnection: IModelConnection, _unusedViewDefinitionId: Id64String, viewState: ViewState, _name: string): React.ReactNode {\r\n return this.getImodelViewportReactElement(iModelConnection, viewState);\r\n }\r\n\r\n /** Get the default ViewOverlay unless parameter is set to not use it. May be override in an application specific sub-class */\r\n protected _getViewOverlay = (viewport: ScreenViewport): React.ReactNode => {\r\n if (this._userSuppliedViewOverlay)\r\n return this._userSuppliedViewOverlay(viewport);\r\n\r\n return <DefaultViewOverlay viewport={viewport} featureOptions={this._featureOptions} />;\r\n };\r\n\r\n /** Get the NavigationAidControl associated with this ContentControl */\r\n public override get navigationAidControl(): string {\r\n if (this.viewport)\r\n return super.navigationAidControl;\r\n else\r\n return StandardRotationNavigationAidControl.navigationAidId;\r\n }\r\n}\r\n\r\nConfigurableUiManager.registerControl(IModelViewportControl.id, IModelViewportControl);\r\n"]}
|
|
1
|
+
{"version":3,"file":"IModelViewport.js","sourceRoot":"","sources":["../../../../src/appui-react/content/IModelViewport.tsx"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B,OAAO,EAAE,wBAAwB,EAAE,MAAM,gCAAgC,CAAC;AAC1E,OAAO,EAAE,iBAAiB,E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AAmC,EAAE,SAAoB,EAAE,KAAa;QAC/J,OAAO,IAAI,CAAC,6BAA6B,CAAC,gBAAgB,EAAE,SAAS,CAAC,CAAC;IACzE,CAAC;IAOD,uEAAuE;IACvE,IAAoB,oBAAoB;QACtC,IAAI,IAAI,CAAC,QAAQ;YACf,OAAO,KAAK,CAAC,oBAAoB,CAAC;;YAElC,OAAO,oCAAoC,CAAC,eAAe,CAAC;IAChE,CAAC;CACF;AAED,qBAAqB,CAAC,eAAe,CAAC,qBAAqB,CAAC,EAAE,EAAE,qBAAqB,CAAC,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 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 { viewWithUnifiedSelection } from \"@itwin/presentation-components\";\r\nimport { ViewportComponent, ViewStateProp } from \"@itwin/imodel-components-react\";\r\nimport { FillCentered } from \"@itwin/core-react\";\r\n\r\nimport { FrontstageManager } from \"../frontstage/FrontstageManager\";\r\nimport { ConfigurableCreateInfo } from \"../configurableui/ConfigurableUiControl\";\r\nimport { ConfigurableUiManager } from \"../configurableui/ConfigurableUiManager\";\r\nimport { connectIModelConnectionAndViewState } from \"../redux/connectIModel\";\r\nimport { UiFramework } from \"../UiFramework\";\r\nimport { DefaultViewOverlay } from \"./DefaultViewOverlay\";\r\nimport { ViewportContentControl } from \"./ViewportContentControl\";\r\nimport { StandardRotationNavigationAidControl } from \"../navigationaids/StandardRotationNavigationAid\";\r\nimport { UiError } from \"@itwin/appui-abstract\";\r\nimport { useSelector } from \"react-redux\";\r\nimport { FrameworkState } from \"../redux/FrameworkState\";\r\n\r\n// create a HOC viewport component that supports unified selection\r\n// eslint-disable-next-line @typescript-eslint/naming-convention\r\nconst UnifiedSelectionViewport = viewWithUnifiedSelection(ViewportComponent);\r\n\r\n/** Viewport that is connected to the IModelConnection property in the Redux store. The application must set up the Redux store and include the FrameworkReducer.\r\n * @public\r\n */\r\nexport const IModelConnectedViewport = connectIModelConnectionAndViewState(null, null)(UnifiedSelectionViewport); // eslint-disable-line @typescript-eslint/naming-convention\r\n\r\n/** [[IModelViewportControl]] options. These options are set in the applicationData property of the [[ContentProps]].\r\n * @public\r\n */\r\nexport interface IModelViewportControlOptions {\r\n /** ViewState or a function to return a ViewState */\r\n viewState?: ViewStateProp;\r\n /** IModelConnection of data in Viewport */\r\n iModelConnection?: IModelConnection | (() => IModelConnection);\r\n /** Map of options that can be used to enable/disable features within the view */\r\n featureOptions?: { [key: string]: any };\r\n /** Optional background color which may be used if viewState and iModelConnection are undefined */\r\n bgColor?: string;\r\n /** Optional property to always use the supplied `viewState` property instead of using viewport.view when set */\r\n alwaysUseSuppliedViewState?: boolean;\r\n /** Optional property to supply custom view overlay. Uses when caller want to supply custom overlay component. */\r\n supplyViewOverlay?: (_viewport: ScreenViewport) => React.ReactNode;\r\n /** Optional property to defer reactNode initialization until first reactNode property in needed. Useful when subclassing the `IModelViewportControl`. */\r\n deferNodeInitialization?: boolean;\r\n}\r\n\r\ninterface ViewOverlayHostProps {\r\n viewport: ScreenViewport;\r\n featureOptions?: { [key: string]: any };\r\n userSuppliedOverlay?: (_viewport: ScreenViewport) => React.ReactNode;\r\n}\r\n/** View Overlay component -- exported for testing\r\n * @internal\r\n */\r\n// istanbul ignore next\r\nexport function ViewOverlayHost({viewport, featureOptions, userSuppliedOverlay}: ViewOverlayHostProps) {\r\n const displayViewOverlay = useSelector((state: FrameworkState) => {\r\n const frameworkState = (state as any)[UiFramework.frameworkStateKey];\r\n return frameworkState ? frameworkState.configurableUiState.viewOverlayDisplay : true;\r\n });\r\n if (!displayViewOverlay)\r\n return null;\r\n return userSuppliedOverlay ? <React.Fragment>userSuppliedOverlay(viewport)</React.Fragment> : <DefaultViewOverlay viewport={viewport} featureOptions={featureOptions} />;\r\n}\r\n/** iModel Viewport Control\r\n * @public\r\n */\r\n// istanbul ignore next\r\nexport class IModelViewportControl extends ViewportContentControl {\r\n public static get id() {\r\n return \"UiFramework.IModelViewportControl\";\r\n }\r\n protected _featureOptions: { [key: string]: boolean | string } = {};\r\n protected _viewState: ViewStateProp | undefined;\r\n protected _iModelConnection: IModelConnection | undefined;\r\n protected _alwaysUseSuppliedViewState: boolean;\r\n private _userSuppliedViewOverlay?: (_viewport: ScreenViewport) => React.ReactNode;\r\n\r\n constructor(info: ConfigurableCreateInfo, protected _options: IModelViewportControlOptions) {\r\n super(info, _options);\r\n\r\n if (_options.featureOptions)\r\n this._featureOptions = _options.featureOptions;\r\n this._alwaysUseSuppliedViewState = _options.alwaysUseSuppliedViewState ?? false;\r\n this._userSuppliedViewOverlay = _options.supplyViewOverlay;\r\n\r\n if (!_options.deferNodeInitialization)\r\n this.initializeReactNode();\r\n }\r\n\r\n protected initializeReactNode() {\r\n const options = this._options;\r\n\r\n if (options.viewState)\r\n this._viewState = options.viewState;\r\n\r\n const iModelConnection = (typeof options.iModelConnection === \"function\") ? options.iModelConnection() : options.iModelConnection;\r\n\r\n if (this._viewState && iModelConnection) {\r\n /** Passing _determineViewState as a function reference; it is not called here. */\r\n this._reactNode = this.getImodelViewportReactElement(iModelConnection, this._determineViewState);\r\n } else {\r\n if (UiFramework.getIModelConnection() && UiFramework.getDefaultViewState()) {\r\n this._reactNode = this.getImodelConnectedViewportReactElement();\r\n } else {\r\n this._reactNode = this.getNoContentReactElement(options);\r\n this.setIsReady();\r\n }\r\n }\r\n }\r\n\r\n protected override getReactNode(): React.ReactNode {\r\n if (!React.isValidElement(this._reactNode) && this._options.deferNodeInitialization)\r\n this.initializeReactNode();\r\n\r\n return this.getKeyedReactNode();\r\n }\r\n\r\n /**\r\n * This is passed as a function to the ViewportComponent as the `viewState` prop in getImodelViewportReactElement().\r\n * It is called by ViewportComponent on a mount to resolve the viewState.\r\n */\r\n private _determineViewState = (): ViewState => {\r\n let viewState: ViewState;\r\n\r\n if (this.viewport && !this._alwaysUseSuppliedViewState)\r\n viewState = this.viewport.view;\r\n else if (this._viewState) {\r\n if (typeof this._viewState === \"function\")\r\n viewState = this._viewState();\r\n else\r\n viewState = this._viewState;\r\n } else\r\n throw new UiError(UiFramework.loggerCategory(this), \"No ViewState could be determined\");\r\n\r\n return viewState!;\r\n };\r\n\r\n /** Get the React component that will contain the Viewport */\r\n protected getImodelConnectedViewportReactElement(): React.ReactNode {\r\n return <IModelConnectedViewport\r\n viewportRef={(v: ScreenViewport) => {\r\n this.viewport = v;\r\n // for convenience, if window defined bind viewport to window\r\n if (undefined !== window)\r\n (window as any).viewport = v;\r\n if (!FrontstageManager.isLoading)\r\n FrontstageManager.activeFrontstageDef?.setActiveViewFromViewport(v);\r\n }}\r\n getViewOverlay={this._getViewOverlay}\r\n />;\r\n }\r\n\r\n /** Get the React component that will contain the Viewport */\r\n protected getImodelViewportReactElement(iModelConnection: IModelConnection, viewState: ViewStateProp): React.ReactNode {\r\n return <UnifiedSelectionViewport\r\n viewState={viewState}\r\n imodel={iModelConnection}\r\n controlId={this.controlId}\r\n viewportRef={(v: ScreenViewport) => {\r\n this.viewport = v;\r\n // for convenience, if window defined bind viewport to window\r\n if (undefined !== window)\r\n (window as any).viewport = v;\r\n if (!FrontstageManager.isLoading)\r\n FrontstageManager.activeFrontstageDef?.setActiveViewFromViewport(v);\r\n }}\r\n getViewOverlay={this._getViewOverlay}\r\n />;\r\n }\r\n\r\n /** Get the React component that will be shown when no iModel data is available */\r\n protected getNoContentReactElement(_options: IModelViewportControlOptions): React.ReactNode {\r\n const noContent = UiFramework.translate(\"general.no-content\");\r\n return <FillCentered> {noContent} </FillCentered>;\r\n }\r\n\r\n /** Get the React.Element for a ViewSelector change. */\r\n public override getReactElementForViewSelectorChange(iModelConnection: IModelConnection, _unusedViewDefinitionId: Id64String, viewState: ViewState, _name: string): React.ReactNode {\r\n return this.getImodelViewportReactElement(iModelConnection, viewState);\r\n }\r\n\r\n /** Get the default ViewOverlay unless parameter is set to not use it. May be override in an application specific sub-class */\r\n protected _getViewOverlay = (vp: ScreenViewport): React.ReactNode => {\r\n return <ViewOverlayHost viewport={vp} featureOptions={this._featureOptions} userSuppliedOverlay={this._userSuppliedViewOverlay} data-testid=\"ViewOverlay\"/>;\r\n };\r\n\r\n /** Get the NavigationAidControl associated with this ContentControl */\r\n public override get navigationAidControl(): string {\r\n if (this.viewport)\r\n return super.navigationAidControl;\r\n else\r\n return StandardRotationNavigationAidControl.navigationAidId;\r\n }\r\n}\r\n\r\nConfigurableUiManager.registerControl(IModelViewportControl.id, IModelViewportControl);\r\n"]}
|
|
@@ -16,7 +16,7 @@ export interface FrameworkState {
|
|
|
16
16
|
export declare const FrameworkReducer: (state: import("./redux-ts").CombinedReducerState<{
|
|
17
17
|
configurableUiState: typeof ConfigurableUiReducer;
|
|
18
18
|
sessionState: typeof SessionStateReducer;
|
|
19
|
-
}>, action: import("./redux-ts").DeepReadonlyObject<import("./redux-ts").ActionWithPayload<import("../configurableui/state").ConfigurableUiActionId.SetSnapMode, number>> | import("./redux-ts").DeepReadonlyObject<import("./redux-ts").ActionWithPayload<import("../configurableui/state").ConfigurableUiActionId.SetTheme, string>> | import("./redux-ts").DeepReadonlyObject<import("./redux-ts").ActionWithPayload<import("../configurableui/state").ConfigurableUiActionId.SetToolPrompt, string>> | import("./redux-ts").DeepReadonlyObject<import("./redux-ts").ActionWithPayload<import("../configurableui/state").ConfigurableUiActionId.SetWidgetOpacity, number>> | import("./redux-ts").DeepReadonlyObject<import("./redux-ts").ActionWithPayload<import("../configurableui/state").ConfigurableUiActionId.SetDragInteraction, boolean>> | import("./redux-ts").DeepReadonlyObject<import("./redux-ts").ActionWithPayload<import("../configurableui/state").ConfigurableUiActionId.SetFrameworkVersion, import("../UiFramework").FrameworkVersionId>> | import("./redux-ts").DeepReadonlyObject<import("./redux-ts").ActionWithPayload<import("./SessionState").SessionStateActionId.SetActiveIModelId, string>> | import("./redux-ts").DeepReadonlyObject<import("./redux-ts").ActionWithPayload<import("./SessionState").SessionStateActionId.SetAvailableSelectionScopes, import("./redux-ts").DeepReadonlyArray<import("./SessionState").PresentationSelectionScope>>> | import("./redux-ts").DeepReadonlyObject<import("./redux-ts").ActionWithPayload<import("./SessionState").SessionStateActionId.SetDefaultIModelViewportControlId, string>> | import("./redux-ts").DeepReadonlyObject<import("./redux-ts").ActionWithPayload<import("./SessionState").SessionStateActionId.SetDefaultViewId, string>> | import("./redux-ts").DeepReadonlyObject<import("./redux-ts").ActionWithPayload<import("./SessionState").SessionStateActionId.SetDefaultViewState, any>> | import("./redux-ts").DeepReadonlyObject<import("./redux-ts").ActionWithPayload<import("./SessionState").SessionStateActionId.SetNumItemsSelected, number>> | import("./redux-ts").DeepReadonlyObject<import("./redux-ts").ActionWithPayload<import("./SessionState").SessionStateActionId.SetIModelConnection, any>> | import("./redux-ts").DeepReadonlyObject<import("./redux-ts").ActionWithPayload<import("./SessionState").SessionStateActionId.SetSelectionScope, string>> | import("./redux-ts").DeepReadonlyObject<import("./redux-ts").ActionWithPayload<import("./SessionState").SessionStateActionId.UpdateCursorMenu, import("./redux-ts").DeepReadonlyObject<import("./SessionState").CursorMenuData>>>) => import("./redux-ts").CombinedReducerState<{
|
|
19
|
+
}>, action: import("./redux-ts").DeepReadonlyObject<import("./redux-ts").ActionWithPayload<import("../configurableui/state").ConfigurableUiActionId.SetSnapMode, number>> | import("./redux-ts").DeepReadonlyObject<import("./redux-ts").ActionWithPayload<import("../configurableui/state").ConfigurableUiActionId.SetTheme, string>> | import("./redux-ts").DeepReadonlyObject<import("./redux-ts").ActionWithPayload<import("../configurableui/state").ConfigurableUiActionId.SetToolPrompt, string>> | import("./redux-ts").DeepReadonlyObject<import("./redux-ts").ActionWithPayload<import("../configurableui/state").ConfigurableUiActionId.SetWidgetOpacity, number>> | import("./redux-ts").DeepReadonlyObject<import("./redux-ts").ActionWithPayload<import("../configurableui/state").ConfigurableUiActionId.SetDragInteraction, boolean>> | import("./redux-ts").DeepReadonlyObject<import("./redux-ts").ActionWithPayload<import("../configurableui/state").ConfigurableUiActionId.SetFrameworkVersion, import("../UiFramework").FrameworkVersionId>> | import("./redux-ts").DeepReadonlyObject<import("./redux-ts").ActionWithPayload<import("../configurableui/state").ConfigurableUiActionId.SetViewOverlayDisplay, boolean>> | import("./redux-ts").DeepReadonlyObject<import("./redux-ts").ActionWithPayload<import("./SessionState").SessionStateActionId.SetActiveIModelId, string>> | import("./redux-ts").DeepReadonlyObject<import("./redux-ts").ActionWithPayload<import("./SessionState").SessionStateActionId.SetAvailableSelectionScopes, import("./redux-ts").DeepReadonlyArray<import("./SessionState").PresentationSelectionScope>>> | import("./redux-ts").DeepReadonlyObject<import("./redux-ts").ActionWithPayload<import("./SessionState").SessionStateActionId.SetDefaultIModelViewportControlId, string>> | import("./redux-ts").DeepReadonlyObject<import("./redux-ts").ActionWithPayload<import("./SessionState").SessionStateActionId.SetDefaultViewId, string>> | import("./redux-ts").DeepReadonlyObject<import("./redux-ts").ActionWithPayload<import("./SessionState").SessionStateActionId.SetDefaultViewState, any>> | import("./redux-ts").DeepReadonlyObject<import("./redux-ts").ActionWithPayload<import("./SessionState").SessionStateActionId.SetNumItemsSelected, number>> | import("./redux-ts").DeepReadonlyObject<import("./redux-ts").ActionWithPayload<import("./SessionState").SessionStateActionId.SetIModelConnection, any>> | import("./redux-ts").DeepReadonlyObject<import("./redux-ts").ActionWithPayload<import("./SessionState").SessionStateActionId.SetSelectionScope, string>> | import("./redux-ts").DeepReadonlyObject<import("./redux-ts").ActionWithPayload<import("./SessionState").SessionStateActionId.UpdateCursorMenu, import("./redux-ts").DeepReadonlyObject<import("./SessionState").CursorMenuData>>>) => import("./redux-ts").CombinedReducerState<{
|
|
20
20
|
configurableUiState: typeof ConfigurableUiReducer;
|
|
21
21
|
sessionState: typeof SessionStateReducer;
|
|
22
22
|
}>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@itwin/appui-react",
|
|
3
|
-
"version": "3.0.0-dev.
|
|
3
|
+
"version": "3.0.0-dev.163",
|
|
4
4
|
"description": "UI framework",
|
|
5
5
|
"main": "lib/cjs/appui-react.js",
|
|
6
6
|
"module": "lib/esm/appui-react.js",
|
|
@@ -21,20 +21,20 @@
|
|
|
21
21
|
"url": "http://www.bentley.com"
|
|
22
22
|
},
|
|
23
23
|
"peerDependencies": {
|
|
24
|
-
"@bentley/itwin-client": "^3.0.0-dev.
|
|
25
|
-
"@itwin/appui-abstract": "^3.0.0-dev.
|
|
26
|
-
"@itwin/appui-layout-react": "^3.0.0-dev.
|
|
27
|
-
"@itwin/components-react": "^3.0.0-dev.
|
|
28
|
-
"@itwin/core-bentley": "^3.0.0-dev.
|
|
29
|
-
"@itwin/core-geometry": "^3.0.0-dev.
|
|
30
|
-
"@itwin/core-common": "^3.0.0-dev.
|
|
31
|
-
"@itwin/core-frontend": "^3.0.0-dev.
|
|
32
|
-
"@itwin/core-markup": "^3.0.0-dev.
|
|
33
|
-
"@itwin/core-quantity": "^3.0.0-dev.
|
|
34
|
-
"@itwin/core-react": "^3.0.0-dev.
|
|
35
|
-
"@itwin/imodel-components-react": "^3.0.0-dev.
|
|
36
|
-
"@itwin/presentation-common": "^3.0.0-dev.
|
|
37
|
-
"@itwin/presentation-frontend": "^3.0.0-dev.
|
|
24
|
+
"@bentley/itwin-client": "^3.0.0-dev.163",
|
|
25
|
+
"@itwin/appui-abstract": "^3.0.0-dev.163",
|
|
26
|
+
"@itwin/appui-layout-react": "^3.0.0-dev.163",
|
|
27
|
+
"@itwin/components-react": "^3.0.0-dev.163",
|
|
28
|
+
"@itwin/core-bentley": "^3.0.0-dev.163",
|
|
29
|
+
"@itwin/core-geometry": "^3.0.0-dev.163",
|
|
30
|
+
"@itwin/core-common": "^3.0.0-dev.163",
|
|
31
|
+
"@itwin/core-frontend": "^3.0.0-dev.163",
|
|
32
|
+
"@itwin/core-markup": "^3.0.0-dev.163",
|
|
33
|
+
"@itwin/core-quantity": "^3.0.0-dev.163",
|
|
34
|
+
"@itwin/core-react": "^3.0.0-dev.163",
|
|
35
|
+
"@itwin/imodel-components-react": "^3.0.0-dev.163",
|
|
36
|
+
"@itwin/presentation-common": "^3.0.0-dev.163",
|
|
37
|
+
"@itwin/presentation-frontend": "^3.0.0-dev.163",
|
|
38
38
|
"react": "^17.0.0",
|
|
39
39
|
"react-dom": "^17.0.0",
|
|
40
40
|
"react-redux": "^7.2.2",
|
|
@@ -45,23 +45,23 @@
|
|
|
45
45
|
"NOTE: All tools used by scripts in this package must be listed as devDependencies"
|
|
46
46
|
],
|
|
47
47
|
"devDependencies": {
|
|
48
|
-
"@bentley/itwin-client": "3.0.0-dev.
|
|
49
|
-
"@itwin/appui-abstract": "3.0.0-dev.
|
|
50
|
-
"@itwin/appui-layout-react": "3.0.0-dev.
|
|
51
|
-
"@itwin/build-tools": "3.0.0-dev.
|
|
52
|
-
"@itwin/components-react": "3.0.0-dev.
|
|
53
|
-
"@itwin/core-bentley": "3.0.0-dev.
|
|
54
|
-
"@itwin/core-geometry": "3.0.0-dev.
|
|
55
|
-
"@itwin/core-common": "3.0.0-dev.
|
|
56
|
-
"@itwin/core-frontend": "3.0.0-dev.
|
|
57
|
-
"@itwin/core-markup": "3.0.0-dev.
|
|
58
|
-
"@itwin/core-quantity": "3.0.0-dev.
|
|
59
|
-
"@itwin/core-react": "3.0.0-dev.
|
|
60
|
-
"@itwin/eslint-plugin": "3.0.0-dev.
|
|
61
|
-
"@itwin/imodel-components-react": "3.0.0-dev.
|
|
62
|
-
"@itwin/presentation-common": "3.0.0-dev.
|
|
63
|
-
"@itwin/presentation-frontend": "3.0.0-dev.
|
|
64
|
-
"@itwin/presentation-testing": "3.0.0-dev.
|
|
48
|
+
"@bentley/itwin-client": "3.0.0-dev.163",
|
|
49
|
+
"@itwin/appui-abstract": "3.0.0-dev.163",
|
|
50
|
+
"@itwin/appui-layout-react": "3.0.0-dev.163",
|
|
51
|
+
"@itwin/build-tools": "3.0.0-dev.163",
|
|
52
|
+
"@itwin/components-react": "3.0.0-dev.163",
|
|
53
|
+
"@itwin/core-bentley": "3.0.0-dev.163",
|
|
54
|
+
"@itwin/core-geometry": "3.0.0-dev.163",
|
|
55
|
+
"@itwin/core-common": "3.0.0-dev.163",
|
|
56
|
+
"@itwin/core-frontend": "3.0.0-dev.163",
|
|
57
|
+
"@itwin/core-markup": "3.0.0-dev.163",
|
|
58
|
+
"@itwin/core-quantity": "3.0.0-dev.163",
|
|
59
|
+
"@itwin/core-react": "3.0.0-dev.163",
|
|
60
|
+
"@itwin/eslint-plugin": "3.0.0-dev.163",
|
|
61
|
+
"@itwin/imodel-components-react": "3.0.0-dev.163",
|
|
62
|
+
"@itwin/presentation-common": "3.0.0-dev.163",
|
|
63
|
+
"@itwin/presentation-frontend": "3.0.0-dev.163",
|
|
64
|
+
"@itwin/presentation-testing": "3.0.0-dev.163",
|
|
65
65
|
"@testing-library/react": "^12.0.0",
|
|
66
66
|
"@testing-library/react-hooks": "^7.0.2",
|
|
67
67
|
"@types/chai": "^4.1.4",
|
|
@@ -116,8 +116,8 @@
|
|
|
116
116
|
"dependencies": {
|
|
117
117
|
"@bentley/icons-generic": "^1.0.15",
|
|
118
118
|
"@bentley/icons-generic-webfont": "^1.0.15",
|
|
119
|
-
"@itwin/core-telemetry": "3.0.0-dev.
|
|
120
|
-
"@itwin/presentation-components": "3.0.0-dev.
|
|
119
|
+
"@itwin/core-telemetry": "3.0.0-dev.163",
|
|
120
|
+
"@itwin/presentation-components": "3.0.0-dev.163",
|
|
121
121
|
"@itwin/itwinui-css": "^0.37.0",
|
|
122
122
|
"@itwin/itwinui-react": "^1.27.0",
|
|
123
123
|
"@itwin/browser-authorization": "^0.3.1",
|