@itwin/appui-react 3.3.0-dev.32 → 3.3.0-dev.33
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 +3 -0
- package/lib/cjs/appui-react/UiFramework.d.ts.map +1 -1
- package/lib/cjs/appui-react/UiFramework.js +9 -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 +6 -0
- package/lib/cjs/appui-react/configurableui/state.js.map +1 -1
- package/lib/cjs/appui-react/redux/FrameworkState.d.ts +1 -1
- package/lib/cjs/appui-react/settings/ui/UiSettingsPage.d.ts.map +1 -1
- package/lib/cjs/appui-react/settings/ui/UiSettingsPage.js +12 -3
- package/lib/cjs/appui-react/settings/ui/UiSettingsPage.js.map +1 -1
- package/lib/cjs/appui-react/uistate/AppUiSettings.d.ts +2 -0
- package/lib/cjs/appui-react/uistate/AppUiSettings.d.ts.map +1 -1
- package/lib/cjs/appui-react/uistate/AppUiSettings.js +4 -0
- package/lib/cjs/appui-react/uistate/AppUiSettings.js.map +1 -1
- package/lib/cjs/appui-react/widget-panels/Frontstage.d.ts +1 -1
- package/lib/cjs/appui-react/widget-panels/Frontstage.d.ts.map +1 -1
- package/lib/cjs/appui-react/widget-panels/Frontstage.js +35 -2
- package/lib/cjs/appui-react/widget-panels/Frontstage.js.map +1 -1
- package/lib/esm/appui-react/UiFramework.d.ts +3 -0
- package/lib/esm/appui-react/UiFramework.d.ts.map +1 -1
- package/lib/esm/appui-react/UiFramework.js +9 -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 +6 -0
- package/lib/esm/appui-react/configurableui/state.js.map +1 -1
- package/lib/esm/appui-react/redux/FrameworkState.d.ts +1 -1
- package/lib/esm/appui-react/settings/ui/UiSettingsPage.d.ts.map +1 -1
- package/lib/esm/appui-react/settings/ui/UiSettingsPage.js +12 -3
- package/lib/esm/appui-react/settings/ui/UiSettingsPage.js.map +1 -1
- package/lib/esm/appui-react/uistate/AppUiSettings.d.ts +2 -0
- package/lib/esm/appui-react/uistate/AppUiSettings.d.ts.map +1 -1
- package/lib/esm/appui-react/uistate/AppUiSettings.js +4 -0
- package/lib/esm/appui-react/uistate/AppUiSettings.js.map +1 -1
- package/lib/esm/appui-react/widget-panels/Frontstage.d.ts +1 -1
- package/lib/esm/appui-react/widget-panels/Frontstage.d.ts.map +1 -1
- package/lib/esm/appui-react/widget-panels/Frontstage.js +35 -2
- package/lib/esm/appui-react/widget-panels/Frontstage.js.map +1 -1
- package/lib/public/locales/en/UiFramework.json +6 -1
- package/package.json +32 -32
|
@@ -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,kBAAk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B,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","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 * @param startInUi1Mode Used for legacy applications to start up in the deprecated UI 1 mode. This should not set by newer applications.\r\n */\r\n public static async initialize(store: Store<any> | undefined, frameworkStateKey?: string, startInUi1Mode?: boolean): Promise<void> {\r\n return this.initializeEx(store, frameworkStateKey, startInUi1Mode);\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 * @param startInUi1Mode Used for legacy applications to start up in the deprecated UI 1 mode. This should not set by newer applications.\r\n *\r\n * @internal\r\n */\r\n public static async initializeEx(store: Store<any> | undefined, frameworkStateKey?: string, startInUi1Mode?: boolean): 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 if (startInUi1Mode)\r\n UiFramework.store.dispatch({ type: ConfigurableUiActionId.SetFrameworkVersion, payload: \"1\" });\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 showWidgetIcon(): boolean {\r\n return UiFramework.frameworkState ? UiFramework.frameworkState.configurableUiState.showWidgetIcon : /* istanbul ignore next */ false;\r\n }\r\n\r\n public static setShowWidgetIcon(value: boolean) {\r\n if (UiFramework.showWidgetIcon === value)\r\n return;\r\n\r\n UiFramework.dispatchActionToStore(ConfigurableUiActionId.SetShowWidgetIcon, value, true);\r\n }\r\n /** Animate Tool Settings on appear */\r\n public static get animateToolSettings(): boolean {\r\n return UiFramework.frameworkState ? UiFramework.frameworkState.configurableUiState.animateToolSettings : /* istanbul ignore next */ false;\r\n }\r\n public static setAnimateToolSettings(value: boolean) {\r\n if (UiFramework.animateToolSettings === value)\r\n return;\r\n UiFramework.dispatchActionToStore(ConfigurableUiActionId.AnimateToolSettings, value, true);\r\n }\r\n\r\n /** @alpha */\r\n public static get autoCollapseUnpinnedPanels(): boolean {\r\n return UiFramework.frameworkState ? UiFramework.frameworkState.configurableUiState.autoCollapseUnpinnedPanels : /* istanbul ignore next */ false;\r\n }\r\n\r\n /** Method used to enable the automatic closing of an unpinned widget panel as soon as the\r\n * mouse leaves the widget panel. The default behavior is to require a mouse click outside\r\n * the panel before it is closed.\r\n * @alpha */\r\n\r\n public static setAutoCollapseUnpinnedPanels(value: boolean) {\r\n if (UiFramework.autoCollapseUnpinnedPanels === value)\r\n return;\r\n\r\n UiFramework.dispatchActionToStore(ConfigurableUiActionId.AutoCollapseUnpinnedPanels, value, 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 : /* istanbul ignore next */ 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 /** 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,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*---------------------------------------------------------------------------------------------\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 * @param startInUi1Mode Used for legacy applications to start up in the deprecated UI 1 mode. This should not set by newer applications.\r\n */\r\n public static async initialize(store: Store<any> | undefined, frameworkStateKey?: string, startInUi1Mode?: boolean): Promise<void> {\r\n return this.initializeEx(store, frameworkStateKey, startInUi1Mode);\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 * @param startInUi1Mode Used for legacy applications to start up in the deprecated UI 1 mode. This should not set by newer applications.\r\n *\r\n * @internal\r\n */\r\n public static async initializeEx(store: Store<any> | undefined, frameworkStateKey?: string, startInUi1Mode?: boolean): 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 if (startInUi1Mode)\r\n UiFramework.store.dispatch({ type: ConfigurableUiActionId.SetFrameworkVersion, payload: \"1\" });\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 showWidgetIcon(): boolean {\r\n return UiFramework.frameworkState ? UiFramework.frameworkState.configurableUiState.showWidgetIcon : /* istanbul ignore next */ false;\r\n }\r\n\r\n public static setShowWidgetIcon(value: boolean) {\r\n if (UiFramework.showWidgetIcon === value)\r\n return;\r\n\r\n UiFramework.dispatchActionToStore(ConfigurableUiActionId.SetShowWidgetIcon, value, true);\r\n }\r\n /** Animate Tool Settings on appear */\r\n public static get animateToolSettings(): boolean {\r\n return UiFramework.frameworkState ? UiFramework.frameworkState.configurableUiState.animateToolSettings : /* istanbul ignore next */ false;\r\n }\r\n public static setAnimateToolSettings(value: boolean) {\r\n if (UiFramework.animateToolSettings === value)\r\n return;\r\n UiFramework.dispatchActionToStore(ConfigurableUiActionId.AnimateToolSettings, value, true);\r\n }\r\n\r\n /** Use Tool Name As Tool Settings Widget Tab Label */\r\n public static get useToolAsToolSettingsLabel(): boolean {\r\n return UiFramework.frameworkState ? UiFramework.frameworkState.configurableUiState.useToolAsToolSettingsLabel : /* istanbul ignore next */ false;\r\n }\r\n public static setUseToolAsToolSettingsLabel(value: boolean) {\r\n if (UiFramework.useToolAsToolSettingsLabel === value)\r\n return;\r\n UiFramework.dispatchActionToStore(ConfigurableUiActionId.UseToolAsToolSettingsLabel, value, true);\r\n }\r\n\r\n /** @alpha */\r\n public static get autoCollapseUnpinnedPanels(): boolean {\r\n return UiFramework.frameworkState ? UiFramework.frameworkState.configurableUiState.autoCollapseUnpinnedPanels : /* istanbul ignore next */ false;\r\n }\r\n\r\n /** Method used to enable the automatic closing of an unpinned widget panel as soon as the\r\n * mouse leaves the widget panel. The default behavior is to require a mouse click outside\r\n * the panel before it is closed.\r\n * @alpha */\r\n\r\n public static setAutoCollapseUnpinnedPanels(value: boolean) {\r\n if (UiFramework.autoCollapseUnpinnedPanels === value)\r\n return;\r\n\r\n UiFramework.dispatchActionToStore(ConfigurableUiActionId.AutoCollapseUnpinnedPanels, value, 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 : /* istanbul ignore next */ 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 /** 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"]}
|
|
@@ -18,7 +18,8 @@ export declare enum ConfigurableUiActionId {
|
|
|
18
18
|
/** @alpha */
|
|
19
19
|
AutoCollapseUnpinnedPanels = "configurableui:set-auto-collapse-unpinned-panels",
|
|
20
20
|
SetViewOverlayDisplay = "configurableui:set-view-overlay-display",
|
|
21
|
-
AnimateToolSettings = "configurableui:set-animate-tool-settings"
|
|
21
|
+
AnimateToolSettings = "configurableui:set-animate-tool-settings",
|
|
22
|
+
UseToolAsToolSettingsLabel = "configurableui:set-use-tool-as-tool-settings-label"
|
|
22
23
|
}
|
|
23
24
|
/** The portion of state managed by the ConfigurableUiReducer.
|
|
24
25
|
* @public
|
|
@@ -35,6 +36,7 @@ export interface ConfigurableUiState {
|
|
|
35
36
|
autoCollapseUnpinnedPanels: boolean;
|
|
36
37
|
viewOverlayDisplay: boolean;
|
|
37
38
|
animateToolSettings: boolean;
|
|
39
|
+
useToolAsToolSettingsLabel: boolean;
|
|
38
40
|
}
|
|
39
41
|
/** An object with a function that creates each ConfigurableUiReducer that can be handled by our reducer.
|
|
40
42
|
* @public
|
|
@@ -50,6 +52,7 @@ export declare const ConfigurableUiActions: {
|
|
|
50
52
|
setAutoCollapseUnpinnedPanels: (autoCollapse: boolean) => import("../redux/redux-ts").ActionWithPayload<ConfigurableUiActionId.AutoCollapseUnpinnedPanels, boolean>;
|
|
51
53
|
setViewOverlayDisplay: (displayViewOverlay: boolean) => import("../redux/redux-ts").ActionWithPayload<ConfigurableUiActionId.SetViewOverlayDisplay, boolean>;
|
|
52
54
|
setAnimateToolSettings: (animateToolSettings: boolean) => import("../redux/redux-ts").ActionWithPayload<ConfigurableUiActionId.AnimateToolSettings, boolean>;
|
|
55
|
+
setUseToolAsToolSettingsLabel: (useToolAsToolSettingsLabel: boolean) => import("../redux/redux-ts").ActionWithPayload<ConfigurableUiActionId.UseToolAsToolSettingsLabel, boolean>;
|
|
53
56
|
};
|
|
54
57
|
/** Union of ConfigurableUi Redux actions
|
|
55
58
|
* @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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BAA0B,EAAE,OAAO,CAAC;CACrC;AAiBD;;GAEG;AACH,eAAO,MAAM,qBAAqB;4BACR,MAAM;sBAGpB,MAAM;gCAGD,MAAM;gCAGT,MAAM;0CACoB,OAAO;4CACL,kBAAkB;wCACtB,OAAO;kDACG,OAAO;gDACT,OAAO;kDACL,OAAO;gEACO,OAAO;CACpE,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,CAwCxI"}
|
|
@@ -26,6 +26,7 @@ export var ConfigurableUiActionId;
|
|
|
26
26
|
ConfigurableUiActionId["AutoCollapseUnpinnedPanels"] = "configurableui:set-auto-collapse-unpinned-panels";
|
|
27
27
|
ConfigurableUiActionId["SetViewOverlayDisplay"] = "configurableui:set-view-overlay-display";
|
|
28
28
|
ConfigurableUiActionId["AnimateToolSettings"] = "configurableui:set-animate-tool-settings";
|
|
29
|
+
ConfigurableUiActionId["UseToolAsToolSettingsLabel"] = "configurableui:set-use-tool-as-tool-settings-label";
|
|
29
30
|
})(ConfigurableUiActionId || (ConfigurableUiActionId = {}));
|
|
30
31
|
/** used on first call of ConfigurableUiReducer */
|
|
31
32
|
const initialState = {
|
|
@@ -39,6 +40,7 @@ const initialState = {
|
|
|
39
40
|
autoCollapseUnpinnedPanels: false,
|
|
40
41
|
viewOverlayDisplay: true,
|
|
41
42
|
animateToolSettings: false,
|
|
43
|
+
useToolAsToolSettingsLabel: false,
|
|
42
44
|
};
|
|
43
45
|
/** An object with a function that creates each ConfigurableUiReducer that can be handled by our reducer.
|
|
44
46
|
* @public
|
|
@@ -60,6 +62,7 @@ export const ConfigurableUiActions = {
|
|
|
60
62
|
setAutoCollapseUnpinnedPanels: (autoCollapse) => createAction(ConfigurableUiActionId.AutoCollapseUnpinnedPanels, autoCollapse),
|
|
61
63
|
setViewOverlayDisplay: (displayViewOverlay) => createAction(ConfigurableUiActionId.SetViewOverlayDisplay, displayViewOverlay),
|
|
62
64
|
setAnimateToolSettings: (animateToolSettings) => createAction(ConfigurableUiActionId.AnimateToolSettings, animateToolSettings),
|
|
65
|
+
setUseToolAsToolSettingsLabel: (useToolAsToolSettingsLabel) => createAction(ConfigurableUiActionId.UseToolAsToolSettingsLabel, useToolAsToolSettingsLabel),
|
|
63
66
|
};
|
|
64
67
|
/** Handles actions to update ConfigurableUiState.
|
|
65
68
|
* @public
|
|
@@ -98,6 +101,9 @@ export function ConfigurableUiReducer(state = initialState, action) {
|
|
|
98
101
|
case ConfigurableUiActionId.AnimateToolSettings: {
|
|
99
102
|
return { ...state, animateToolSettings: action.payload };
|
|
100
103
|
}
|
|
104
|
+
case ConfigurableUiActionId.UseToolAsToolSettingsLabel: {
|
|
105
|
+
return { ...state, useToolAsToolSettingsLabel: action.payload };
|
|
106
|
+
}
|
|
101
107
|
}
|
|
102
108
|
return outState;
|
|
103
109
|
}
|
|
@@ -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,MAAM,mBAAmB,CAAC;AAC/D,OAAO,EAAE,4BAA4B,EAAE,sBAAsB,EAAE,MAAM,uBAAuB,CAAC;AAG7F,mDAAmD;AAEnD;;;GAGG;AACH,MAAM,CAAN,IAAY,
|
|
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,MAAM,mBAAmB,CAAC;AAC/D,O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AAQ,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 SetShowWidgetIcon = \"configurableui:set-show-widget-icon\",\r\n /** @alpha */\r\n AutoCollapseUnpinnedPanels = \"configurableui:set-auto-collapse-unpinned-panels\",\r\n SetViewOverlayDisplay = \"configurableui:set-view-overlay-display\",\r\n AnimateToolSettings = \"configurableui:set-animate-tool-settings\",\r\n UseToolAsToolSettingsLabel = \"configurableui:set-use-tool-as-tool-settings-label\",\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 showWidgetIcon: boolean;\r\n /** @alpha */\r\n autoCollapseUnpinnedPanels: boolean;\r\n viewOverlayDisplay: boolean;\r\n animateToolSettings: boolean;\r\n useToolAsToolSettingsLabel: 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 showWidgetIcon: true,\r\n autoCollapseUnpinnedPanels: false,\r\n viewOverlayDisplay: true,\r\n animateToolSettings: false,\r\n useToolAsToolSettingsLabel: false,\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 setShowWidgetIcon: (showWidgetIcon: boolean) => createAction(ConfigurableUiActionId.SetShowWidgetIcon, showWidgetIcon),\r\n setAutoCollapseUnpinnedPanels: (autoCollapse: boolean) => createAction(ConfigurableUiActionId.AutoCollapseUnpinnedPanels, autoCollapse),\r\n setViewOverlayDisplay: (displayViewOverlay: boolean) => createAction(ConfigurableUiActionId.SetViewOverlayDisplay, displayViewOverlay),\r\n setAnimateToolSettings: (animateToolSettings: boolean) => createAction(ConfigurableUiActionId.AnimateToolSettings, animateToolSettings),\r\n setUseToolAsToolSettingsLabel: (useToolAsToolSettingsLabel: boolean) => createAction(ConfigurableUiActionId.UseToolAsToolSettingsLabel, useToolAsToolSettingsLabel),\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.SetShowWidgetIcon: {\r\n return { ...state, showWidgetIcon: action.payload };\r\n }\r\n case ConfigurableUiActionId.AutoCollapseUnpinnedPanels: {\r\n return { ...state, autoCollapseUnpinnedPanels: action.payload };\r\n }\r\n case ConfigurableUiActionId.SetViewOverlayDisplay: {\r\n return { ...state, viewOverlayDisplay: action.payload };\r\n }\r\n case ConfigurableUiActionId.AnimateToolSettings: {\r\n return { ...state, animateToolSettings: action.payload };\r\n }\r\n case ConfigurableUiActionId.UseToolAsToolSettingsLabel: {\r\n return { ...state, useToolAsToolSettingsLabel: action.payload };\r\n }\r\n }\r\n return outState;\r\n}\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("../configurableui/state").ConfigurableUiActionId.SetShowWidgetIcon, boolean>> | import("./redux-ts").DeepReadonlyObject<import("./redux-ts").ActionWithPayload<import("../configurableui/state").ConfigurableUiActionId.AutoCollapseUnpinnedPanels, boolean>> | import("./redux-ts").DeepReadonlyObject<import("./redux-ts").ActionWithPayload<import("../configurableui/state").ConfigurableUiActionId.SetViewOverlayDisplay, boolean>> | import("./redux-ts").DeepReadonlyObject<import("./redux-ts").ActionWithPayload<import("../configurableui/state").ConfigurableUiActionId.AnimateToolSettings, 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<{
|
|
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.SetShowWidgetIcon, boolean>> | import("./redux-ts").DeepReadonlyObject<import("./redux-ts").ActionWithPayload<import("../configurableui/state").ConfigurableUiActionId.AutoCollapseUnpinnedPanels, boolean>> | import("./redux-ts").DeepReadonlyObject<import("./redux-ts").ActionWithPayload<import("../configurableui/state").ConfigurableUiActionId.SetViewOverlayDisplay, boolean>> | import("./redux-ts").DeepReadonlyObject<import("./redux-ts").ActionWithPayload<import("../configurableui/state").ConfigurableUiActionId.AnimateToolSettings, boolean>> | import("./redux-ts").DeepReadonlyObject<import("./redux-ts").ActionWithPayload<import("../configurableui/state").ConfigurableUiActionId.UseToolAsToolSettingsLabel, 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
|
}>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"UiSettingsPage.d.ts","sourceRoot":"","sources":["../../../../../src/appui-react/settings/ui/UiSettingsPage.tsx"],"names":[],"mappings":"AAIA;;GAEG;;AAKH,OAAO,uBAAuB,CAAC;AAE/B,OAAO,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AAQrD;;;;;;;;;;;;;GAaG;AACH,wBAAgB,cAAc,CAAC,EAAE,8BAA8B,EAAE,EAAE;IAAE,8BAA8B,EAAE,OAAO,CAAA;CAAE,
|
|
1
|
+
{"version":3,"file":"UiSettingsPage.d.ts","sourceRoot":"","sources":["../../../../../src/appui-react/settings/ui/UiSettingsPage.tsx"],"names":[],"mappings":"AAIA;;GAEG;;AAKH,OAAO,uBAAuB,CAAC;AAE/B,OAAO,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AAQrD;;;;;;;;;;;;;GAaG;AACH,wBAAgB,cAAc,CAAC,EAAE,8BAA8B,EAAE,EAAE;IAAE,8BAA8B,EAAE,OAAO,CAAA;CAAE,eAwL7G;AAwBD;;;;GAIG;AACH,wBAAgB,yBAAyB,CAAC,YAAY,EAAE,MAAM,EAAE,8BAA8B,CAAC,EAAE,OAAO,GAAG,gBAAgB,CAS1H"}
|
|
@@ -53,12 +53,15 @@ export function UiSettingsPage({ allowSettingUiFrameworkVersion }) {
|
|
|
53
53
|
const autoCollapseUnpinnedPanelsDescription = React.useRef(UiFramework.translate("settings.uiSettingsPage.autoCollapseUnpinnedPanelsDescription"));
|
|
54
54
|
const animateToolSettingsTitle = React.useRef(UiFramework.translate("settings.uiSettingsPage.animateToolSettingsTitle"));
|
|
55
55
|
const animateToolSettingsDescription = React.useRef(UiFramework.translate("settings.uiSettingsPage.animateToolSettingsDescription"));
|
|
56
|
+
const useToolAsToolSettingsLabelTitle = React.useRef(UiFramework.translate("settings.uiSettingsPage.useToolAsToolSettingsLabelTitle"));
|
|
57
|
+
const useToolAsToolSettingsLabelDescription = React.useRef(UiFramework.translate("settings.uiSettingsPage.useToolAsToolSettingsLabelDescription"));
|
|
56
58
|
const [theme, setTheme] = React.useState(() => UiFramework.getColorTheme());
|
|
57
59
|
const [uiVersion, setUiVersion] = React.useState(() => UiFramework.uiVersion);
|
|
58
60
|
const [useDragInteraction, setUseDragInteraction] = React.useState(() => UiFramework.useDragInteraction);
|
|
59
61
|
const [showWidgetIcon, setShowWidgetIcon] = React.useState(() => UiFramework.showWidgetIcon);
|
|
60
62
|
const [autoCollapseUnpinnedPanels, setAutoCollapseUnpinnedPanels] = React.useState(() => UiFramework.autoCollapseUnpinnedPanels);
|
|
61
63
|
const [animateToolSettings, setAnimateToolSettings] = React.useState(() => UiFramework.animateToolSettings);
|
|
64
|
+
const [useToolAsToolSettingsLabel, setUseToolAsToolSettingsLabel] = React.useState(() => UiFramework.useToolAsToolSettingsLabel);
|
|
62
65
|
const [widgetOpacity, setWidgetOpacity] = React.useState(() => UiFramework.getWidgetOpacity());
|
|
63
66
|
const [autoHideUi, setAutoHideUi] = React.useState(() => UiShowHideManager.autoHideUi);
|
|
64
67
|
const [useProximityOpacity, setUseProximityOpacity] = React.useState(() => UiShowHideManager.useProximityOpacity);
|
|
@@ -66,7 +69,7 @@ export function UiSettingsPage({ allowSettingUiFrameworkVersion }) {
|
|
|
66
69
|
React.useEffect(() => {
|
|
67
70
|
const syncIdsOfInterest = ["configurableui:set_theme", "configurableui:set_widget_opacity", "configurableui:set-show-widget-icon",
|
|
68
71
|
"configurableui:set-drag-interaction", "configurableui:set-framework-version",
|
|
69
|
-
"configurableui:set-auto-collapse-unpinned-panels", "configurableui:set-animate-tool-settings", SyncUiEventId.ShowHideManagerSettingChange];
|
|
72
|
+
"configurableui:set-auto-collapse-unpinned-panels", "configurableui:set-animate-tool-settings", "configurableui:set-use-tool-as-tool-settings-label", SyncUiEventId.ShowHideManagerSettingChange];
|
|
70
73
|
const handleSyncUiEvent = (args) => {
|
|
71
74
|
// istanbul ignore else
|
|
72
75
|
if (syncIdsOfInterest.some((value) => args.eventIds.has(value))) {
|
|
@@ -92,11 +95,13 @@ export function UiSettingsPage({ allowSettingUiFrameworkVersion }) {
|
|
|
92
95
|
setSnapWidgetOpacity(UiShowHideManager.snapWidgetOpacity);
|
|
93
96
|
if (UiFramework.animateToolSettings !== animateToolSettings)
|
|
94
97
|
setAnimateToolSettings(UiFramework.animateToolSettings);
|
|
98
|
+
if (UiFramework.useToolAsToolSettingsLabel !== useToolAsToolSettingsLabel)
|
|
99
|
+
setUseToolAsToolSettingsLabel(UiFramework.useToolAsToolSettingsLabel);
|
|
95
100
|
}
|
|
96
101
|
};
|
|
97
102
|
return SyncUiEventDispatcher.onSyncUiEvent.addListener(handleSyncUiEvent);
|
|
98
103
|
}, [autoCollapseUnpinnedPanels, autoHideUi, showWidgetIcon, snapWidgetOpacity, theme, uiVersion,
|
|
99
|
-
useDragInteraction, useProximityOpacity, widgetOpacity, animateToolSettings]);
|
|
104
|
+
useDragInteraction, useProximityOpacity, widgetOpacity, animateToolSettings, useToolAsToolSettingsLabel]);
|
|
100
105
|
const defaultThemeOption = { label: systemPreferredLabel.current, value: SYSTEM_PREFERRED_COLOR_THEME };
|
|
101
106
|
const themeOptions = [
|
|
102
107
|
defaultThemeOption,
|
|
@@ -137,6 +142,9 @@ export function UiSettingsPage({ allowSettingUiFrameworkVersion }) {
|
|
|
137
142
|
UiFramework.setAnimateToolSettings(!animateToolSettings);
|
|
138
143
|
}, [animateToolSettings]);
|
|
139
144
|
const currentTheme = UiFramework.getColorTheme();
|
|
145
|
+
const OnToggleUseToolAsToolSettingsLabel = React.useCallback(async () => {
|
|
146
|
+
UiFramework.setUseToolAsToolSettingsLabel(!useToolAsToolSettingsLabel);
|
|
147
|
+
}, [useToolAsToolSettingsLabel]);
|
|
140
148
|
return (React.createElement("div", { className: "uifw-settings" },
|
|
141
149
|
React.createElement(SettingsItem, { title: themeTitle.current, description: themeDescription.current, settingUi: React.createElement("div", { "data-testid": "select-theme-container", className: "select-theme-container" },
|
|
142
150
|
React.createElement(Select, { value: currentTheme, onChange: onThemeChange, options: themeOptions, "data-testid": "select-theme", size: "small" })) }),
|
|
@@ -148,7 +156,8 @@ export function UiSettingsPage({ allowSettingUiFrameworkVersion }) {
|
|
|
148
156
|
React.createElement(SettingsItem, { title: snapWidgetOpacityTitle.current, description: snapWidgetOpacityDescription.current, settingUi: React.createElement(ToggleSwitch, { checked: snapWidgetOpacity, onChange: onSnapWidgetOpacityChange }) }),
|
|
149
157
|
React.createElement(SettingsItem, { title: widgetIconTitle.current, description: widgetIconDescription.current, settingUi: React.createElement(ToggleSwitch, { checked: showWidgetIcon, onChange: onWidgetIconChange }) }),
|
|
150
158
|
React.createElement(SettingsItem, { title: autoCollapseUnpinnedPanelsTitle.current, description: autoCollapseUnpinnedPanelsDescription.current, settingUi: React.createElement(ToggleSwitch, { checked: autoCollapseUnpinnedPanels, onChange: onAutoCollapseUnpinnedPanelsChange }) }),
|
|
151
|
-
React.createElement(SettingsItem, { title: animateToolSettingsTitle.current, description: animateToolSettingsDescription.current, settingUi: React.createElement(ToggleSwitch, { checked: animateToolSettings, onChange: OnToggleAnimateToolSettings }) })
|
|
159
|
+
React.createElement(SettingsItem, { title: animateToolSettingsTitle.current, description: animateToolSettingsDescription.current, settingUi: React.createElement(ToggleSwitch, { checked: animateToolSettings, onChange: OnToggleAnimateToolSettings }) }),
|
|
160
|
+
React.createElement(SettingsItem, { title: useToolAsToolSettingsLabelTitle.current, description: useToolAsToolSettingsLabelDescription.current, settingUi: React.createElement(ToggleSwitch, { checked: useToolAsToolSettingsLabel, onChange: OnToggleUseToolAsToolSettingsLabel }) })),
|
|
152
161
|
React.createElement(SettingsItem, { title: widgetOpacityTitle.current, description: widgetOpacityDescription.current, settingUi: React.createElement(Slider, { style: { flex: "1" }, values: [widgetOpacity], step: 0.05, onChange: onWidgetOpacityChange, min: 0.20, max: 1.0, maxLabel: "1.0", tickLabels: ["", "", "", "", ""] }) })));
|
|
153
162
|
}
|
|
154
163
|
function SettingsItem(props) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"UiSettingsPage.js","sourceRoot":"","sources":["../../../../../src/appui-react/settings/ui/UiSettingsPage.tsx"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAEH,yCAAyC;AAEzC,OAAO,oBAAoB,MAAM,kDAAkD,CAAC;AACpF,OAAO,uBAAuB,CAAC;AAC/B,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAChD,OAAO,EAAE,UAAU,EAAE,4BAA4B,EAAE,MAAM,0BAA0B,CAAC;AACpF,OAAO,EAAE,iBAAiB,EAAE,MAAM,+BAA+B,CAAC;AAClE,OAAO,EAAE,qBAAqB,EAAE,aAAa,EAAE,MAAM,oCAAoC,CAAC;AAC1F,OAAO,EAAE,iBAAiB,EAAmB,MAAM,uBAAuB,CAAC;AAC3E,OAAO,EAAE,MAAM,EAAgB,MAAM,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AAElF;;;;;;;;;;;;;GAaG;AACH,MAAM,UAAU,cAAc,CAAC,EAAE,8BAA8B,EAA+C;IAC5G,MAAM,UAAU,GAAG,KAAK,CAAC,MAAM,CAAC,WAAW,CAAC,SAAS,CAAC,oCAAoC,CAAC,CAAC,CAAC;IAC7F,MAAM,gBAAgB,GAAG,KAAK,CAAC,MAAM,CAAC,WAAW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AAE,EAAE,EAAE,EAAE,EAAE,EAAE,CAAC,GAAI,GAE5E,CACE,CACP,CAAC;AACJ,CAAC;AAQD,SAAS,YAAY,CAAC,KAAwB;IAC5C,MAAM,EAAE,KAAK,EAAE,WAAW,EAAE,SAAS,EAAE,GAAG,KAAK,CAAC;IAEhD,OAAO,CACL,6BAAK,SAAS,EAAC,oBAAoB;QACjC,6BAAK,SAAS,EAAC,kBAAkB;YAC/B,8BAAM,SAAS,EAAC,OAAO,IAAE,KAAK,CAAQ;YACtC,8BAAM,SAAS,EAAC,aAAa,IAAE,WAAW,CAAQ,CAC9C;QACN,6BAAK,SAAS,EAAC,mBAAmB,IAC/B,SAAS,CACN,CACF,CACP,CAAC;AACJ,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,yBAAyB,CAAC,YAAoB,EAAE,8BAAwC;IACtG,OAAO;QACL,YAAY,EAAE,KAAK,EAAE,qBAAqB;QAC1C,KAAK,EAAE,WAAW,CAAC,SAAS,CAAC,+BAA+B,CAAC;QAC7D,IAAI,EAAE,iBAAiB,CAAC,0BAA0B,CAAC,oBAAoB,CAAC;QACxE,IAAI,EAAE,oBAAC,cAAc,IAAC,8BAA8B,EAAE,CAAC,CAAC,8BAA8B,GAAI;QAC1F,UAAU,EAAE,KAAK;QACjB,OAAO,EAAE,WAAW,CAAC,SAAS,CAAC,iCAAiC,CAAC;KAClE,CAAC;AACJ,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 Settings\r\n */\r\n\r\n// cSpell:ignore configurableui checkmark\r\n\r\nimport widowSettingsIconSvg from \"@bentley/icons-generic/icons/window-settings.svg\";\r\nimport \"./UiSettingsPage.scss\";\r\nimport * as React from \"react\";\r\nimport { SettingsTabEntry } from \"@itwin/core-react\";\r\nimport { UiFramework } from \"../../UiFramework\";\r\nimport { ColorTheme, SYSTEM_PREFERRED_COLOR_THEME } from \"../../theme/ThemeManager\";\r\nimport { UiShowHideManager } from \"../../utils/UiShowHideManager\";\r\nimport { SyncUiEventDispatcher, SyncUiEventId } from \"../../syncui/SyncUiEventDispatcher\";\r\nimport { IconSpecUtilities, UiSyncEventArgs } from \"@itwin/appui-abstract\";\r\nimport { Select, SelectOption, Slider, ToggleSwitch } from \"@itwin/itwinui-react\";\r\n\r\n/** UiSettingsPage displaying the active UI settings. This page lets users set the following settings.\r\n *\r\n * - theme - Dark, Light, or based on OS preference.\r\n * - auto hide - Starts a timer and blanks out ui components that overlay content if there is no mouse movement for a period of time.\r\n * - drag interaction - If set, toolbar group buttons require a press and drag or a long press to open. In this mode a child action\r\n * item is shown as the group button and is activated when button is clicked. If a different child item is selected, it becomes the\r\n * active group button item.\r\n * - use proximity - Changes the opacity of toolbar from transparent to opaque as the mouse moves closer.\r\n * - snap widget opacity - triggers an abrupt change from transparent to opaque for tool and navigation widgets, instead of a gradual change based on mouse location.\r\n * - widget opacity - determines how transparent floating widgets in V2 and all widgets in V1 become when the mouse in not in them.\r\n * - UI version - if allowed by props, the UI version can be toggled between V1 and V2.\r\n *\r\n * @beta\r\n */\r\nexport function UiSettingsPage({ allowSettingUiFrameworkVersion }: { allowSettingUiFrameworkVersion: boolean }) {\r\n const themeTitle = React.useRef(UiFramework.translate(\"settings.uiSettingsPage.themeTitle\"));\r\n const themeDescription = React.useRef(UiFramework.translate(\"settings.uiSettingsPage.themeDescription\"));\r\n const autoHideTitle = React.useRef(UiFramework.translate(\"settings.uiSettingsPage.autoHideTitle\"));\r\n const autoHideDescription = React.useRef(UiFramework.translate(\"settings.uiSettingsPage.autoHideDescription\"));\r\n const dragInteractionTitle = React.useRef(UiFramework.translate(\"settings.uiSettingsPage.dragInteractionTitle\"));\r\n const dragInteractionDescription = React.useRef(UiFramework.translate(\"settings.uiSettingsPage.dragInteractionDescription\"));\r\n const useNewUiTitle = React.useRef(UiFramework.translate(\"settings.uiSettingsPage.newUiTitle\"));\r\n const useNewUiDescription = React.useRef(UiFramework.translate(\"settings.uiSettingsPage.newUiDescription\"));\r\n const useProximityOpacityTitle = React.useRef(UiFramework.translate(\"settings.uiSettingsPage.useProximityOpacityTitle\"));\r\n const useProximityOpacityDescription = React.useRef(UiFramework.translate(\"settings.uiSettingsPage.useProximityOpacityDescription\"));\r\n const snapWidgetOpacityTitle = React.useRef(UiFramework.translate(\"settings.uiSettingsPage.snapWidgetOpacityTitle\"));\r\n const snapWidgetOpacityDescription = React.useRef(UiFramework.translate(\"settings.uiSettingsPage.snapWidgetOpacityDescription\"));\r\n const darkLabel = React.useRef(UiFramework.translate(\"settings.uiSettingsPage.dark\"));\r\n const lightLabel = React.useRef(UiFramework.translate(\"settings.uiSettingsPage.light\"));\r\n const systemPreferredLabel = React.useRef(UiFramework.translate(\"settings.uiSettingsPage.systemPreferred\"));\r\n const widgetOpacityTitle = React.useRef(UiFramework.translate(\"settings.uiSettingsPage.widgetOpacityTitle\"));\r\n const widgetOpacityDescription = React.useRef(UiFramework.translate(\"settings.uiSettingsPage.widgetOpacityDescription\"));\r\n const widgetIconTitle = React.useRef(UiFramework.translate(\"settings.uiSettingsPage.widgetIconTitle\"));\r\n const widgetIconDescription = React.useRef(UiFramework.translate(\"settings.uiSettingsPage.widgetIconDescription\"));\r\n const autoCollapseUnpinnedPanelsTitle = React.useRef(UiFramework.translate(\"settings.uiSettingsPage.autoCollapseUnpinnedPanelsTitle\"));\r\n const autoCollapseUnpinnedPanelsDescription = React.useRef(UiFramework.translate(\"settings.uiSettingsPage.autoCollapseUnpinnedPanelsDescription\"));\r\n const animateToolSettingsTitle = React.useRef(UiFramework.translate(\"settings.uiSettingsPage.animateToolSettingsTitle\"));\r\n const animateToolSettingsDescription = React.useRef(UiFramework.translate(\"settings.uiSettingsPage.animateToolSettingsDescription\"));\r\n\r\n const [theme, setTheme] = React.useState(() => UiFramework.getColorTheme());\r\n const [uiVersion, setUiVersion] = React.useState(() => UiFramework.uiVersion);\r\n const [useDragInteraction, setUseDragInteraction] = React.useState(() => UiFramework.useDragInteraction);\r\n const [showWidgetIcon, setShowWidgetIcon] = React.useState(() => UiFramework.showWidgetIcon);\r\n const [autoCollapseUnpinnedPanels, setAutoCollapseUnpinnedPanels] = React.useState(() => UiFramework.autoCollapseUnpinnedPanels);\r\n const [animateToolSettings, setAnimateToolSettings] = React.useState(() => UiFramework.animateToolSettings);\r\n const [widgetOpacity, setWidgetOpacity] = React.useState(() => UiFramework.getWidgetOpacity());\r\n const [autoHideUi, setAutoHideUi] = React.useState(() => UiShowHideManager.autoHideUi);\r\n const [useProximityOpacity, setUseProximityOpacity] = React.useState(() => UiShowHideManager.useProximityOpacity);\r\n const [snapWidgetOpacity, setSnapWidgetOpacity] = React.useState(() => UiShowHideManager.snapWidgetOpacity);\r\n\r\n React.useEffect(() => {\r\n const syncIdsOfInterest = [\"configurableui:set_theme\", \"configurableui:set_widget_opacity\", \"configurableui:set-show-widget-icon\",\r\n \"configurableui:set-drag-interaction\", \"configurableui:set-framework-version\",\r\n \"configurableui:set-auto-collapse-unpinned-panels\", \"configurableui:set-animate-tool-settings\", SyncUiEventId.ShowHideManagerSettingChange];\r\n\r\n const handleSyncUiEvent = (args: UiSyncEventArgs) => {\r\n // istanbul ignore else\r\n if (syncIdsOfInterest.some((value: string): boolean => args.eventIds.has(value))) {\r\n if (UiFramework.getColorTheme() !== theme)\r\n setTheme(UiFramework.getColorTheme());\r\n if (UiShowHideManager.autoHideUi !== autoHideUi)\r\n setAutoHideUi(UiShowHideManager.autoHideUi);\r\n if (UiFramework.uiVersion !== uiVersion)\r\n setUiVersion(UiFramework.uiVersion);\r\n if (UiFramework.useDragInteraction !== useDragInteraction)\r\n setUseDragInteraction(UiFramework.useDragInteraction);\r\n if (UiFramework.showWidgetIcon !== showWidgetIcon)\r\n setShowWidgetIcon(UiFramework.showWidgetIcon);\r\n if (UiFramework.autoCollapseUnpinnedPanels !== autoCollapseUnpinnedPanels)\r\n setAutoCollapseUnpinnedPanels(UiFramework.autoCollapseUnpinnedPanels);\r\n if (UiFramework.getWidgetOpacity() !== widgetOpacity)\r\n setWidgetOpacity(UiFramework.getWidgetOpacity());\r\n if (UiShowHideManager.autoHideUi !== autoHideUi)\r\n setAutoHideUi(UiShowHideManager.autoHideUi);\r\n if (UiShowHideManager.useProximityOpacity !== useProximityOpacity)\r\n setUseProximityOpacity(UiShowHideManager.useProximityOpacity);\r\n if (UiShowHideManager.snapWidgetOpacity !== snapWidgetOpacity)\r\n setSnapWidgetOpacity(UiShowHideManager.snapWidgetOpacity);\r\n if (UiFramework.animateToolSettings !== animateToolSettings)\r\n setAnimateToolSettings(UiFramework.animateToolSettings);\r\n }\r\n };\r\n return SyncUiEventDispatcher.onSyncUiEvent.addListener(handleSyncUiEvent);\r\n }, [autoCollapseUnpinnedPanels, autoHideUi, showWidgetIcon, snapWidgetOpacity, theme, uiVersion,\r\n useDragInteraction, useProximityOpacity, widgetOpacity, animateToolSettings]);\r\n\r\n const defaultThemeOption = { label: systemPreferredLabel.current, value: SYSTEM_PREFERRED_COLOR_THEME };\r\n const themeOptions: SelectOption<string>[] = [\r\n defaultThemeOption,\r\n { label: lightLabel.current, value: ColorTheme.Light },\r\n { label: darkLabel.current, value: ColorTheme.Dark },\r\n ];\r\n\r\n const onThemeChange = React.useCallback((newValue: string) => {\r\n UiFramework.setColorTheme(newValue);\r\n }, []);\r\n\r\n const onAutoHideChange = React.useCallback(async () => {\r\n UiShowHideManager.autoHideUi = !autoHideUi;\r\n }, [autoHideUi]);\r\n\r\n const onUseProximityOpacityChange = React.useCallback(async () => {\r\n UiShowHideManager.useProximityOpacity = !useProximityOpacity;\r\n }, [useProximityOpacity]);\r\n\r\n const onSnapWidgetOpacityChange = React.useCallback(async () => {\r\n UiShowHideManager.snapWidgetOpacity = !snapWidgetOpacity;\r\n }, [snapWidgetOpacity]);\r\n\r\n const onWidgetIconChange = React.useCallback(async () => {\r\n UiFramework.setShowWidgetIcon(!showWidgetIcon);\r\n }, [showWidgetIcon]);\r\n\r\n const onAutoCollapseUnpinnedPanelsChange = React.useCallback(async () => {\r\n UiFramework.setAutoCollapseUnpinnedPanels(!autoCollapseUnpinnedPanels);\r\n }, [autoCollapseUnpinnedPanels]);\r\n\r\n const onWidgetOpacityChange = React.useCallback(async (values: readonly number[]) => {\r\n // istanbul ignore else\r\n if (values.length > 0) {\r\n UiFramework.setWidgetOpacity(values[0]);\r\n }\r\n }, []);\r\n const onToggleFrameworkVersion = React.useCallback(async () => {\r\n UiFramework.setUiVersion(uiVersion === \"2\" ? \"1\" : \"2\");\r\n }, [uiVersion]);\r\n\r\n const onToggleDragInteraction = React.useCallback(async () => {\r\n UiFramework.setUseDragInteraction(!useDragInteraction);\r\n }, [useDragInteraction]);\r\n\r\n const OnToggleAnimateToolSettings = React.useCallback(async () => {\r\n UiFramework.setAnimateToolSettings(!animateToolSettings);\r\n }, [animateToolSettings]);\r\n const currentTheme = UiFramework.getColorTheme();\r\n\r\n return (\r\n <div className=\"uifw-settings\">\r\n <SettingsItem title={themeTitle.current} description={themeDescription.current}\r\n settingUi={\r\n <div data-testid=\"select-theme-container\" className=\"select-theme-container\">\r\n <Select\r\n value={currentTheme}\r\n onChange={onThemeChange}\r\n options={themeOptions}\r\n data-testid=\"select-theme\"\r\n size=\"small\"\r\n />\r\n </div>\r\n }\r\n />\r\n <SettingsItem title={autoHideTitle.current} description={autoHideDescription.current}\r\n settingUi={<ToggleSwitch checked={autoHideUi} onChange={onAutoHideChange} />}\r\n />\r\n {allowSettingUiFrameworkVersion && <SettingsItem title={useNewUiTitle.current} description={useNewUiDescription.current}\r\n settingUi={<ToggleSwitch checked={UiFramework.uiVersion === \"2\"} onChange={onToggleFrameworkVersion} />}\r\n />}\r\n {UiFramework.uiVersion === \"2\" && <>\r\n <SettingsItem title={dragInteractionTitle.current} description={dragInteractionDescription.current}\r\n settingUi={<ToggleSwitch checked={useDragInteraction} onChange={onToggleDragInteraction} />}\r\n />\r\n <SettingsItem title={useProximityOpacityTitle.current} description={useProximityOpacityDescription.current}\r\n settingUi={<ToggleSwitch checked={useProximityOpacity} onChange={onUseProximityOpacityChange} />}\r\n />\r\n <SettingsItem title={snapWidgetOpacityTitle.current} description={snapWidgetOpacityDescription.current}\r\n settingUi={<ToggleSwitch checked={snapWidgetOpacity} onChange={onSnapWidgetOpacityChange} />}\r\n />\r\n <SettingsItem title={widgetIconTitle.current} description={widgetIconDescription.current}\r\n settingUi={<ToggleSwitch checked={showWidgetIcon} onChange={onWidgetIconChange} />}\r\n />\r\n <SettingsItem title={autoCollapseUnpinnedPanelsTitle.current} description={autoCollapseUnpinnedPanelsDescription.current}\r\n settingUi={<ToggleSwitch checked={autoCollapseUnpinnedPanels} onChange={onAutoCollapseUnpinnedPanelsChange} />}\r\n />\r\n <SettingsItem title={animateToolSettingsTitle.current} description={animateToolSettingsDescription.current}\r\n settingUi={<ToggleSwitch checked={animateToolSettings} onChange={OnToggleAnimateToolSettings} />}\r\n />\r\n\r\n </>\r\n }\r\n <SettingsItem title={widgetOpacityTitle.current} description={widgetOpacityDescription.current}\r\n settingUi={\r\n <Slider style={{ flex: \"1\" }} values={[widgetOpacity]} step={0.05} onChange={onWidgetOpacityChange}\r\n min={0.20} max={1.0} maxLabel=\"1.0\" tickLabels={[\"\", \"\", \"\", \"\", \"\"]} />\r\n }\r\n />\r\n </div>\r\n );\r\n}\r\n\r\ninterface SettingsItemProps {\r\n title: string;\r\n description: string;\r\n settingUi: React.ReactNode;\r\n}\r\n\r\nfunction SettingsItem(props: SettingsItemProps) {\r\n const { title, description, settingUi } = props;\r\n\r\n return (\r\n <div className=\"uifw-settings-item\">\r\n <div className=\"panel left-panel\">\r\n <span className=\"title\">{title}</span>\r\n <span className=\"description\">{description}</span>\r\n </div>\r\n <div className=\"panel right-panel\">\r\n {settingUi}\r\n </div>\r\n </div>\r\n );\r\n}\r\n\r\n/**\r\n * Return a SettingsTabEntry that can be used to define the available settings that can be set for an application.\r\n * @param itemPriority - Used to define the order of the entry in the Settings Stage\r\n * @beta\r\n */\r\nexport function getUiSettingsManagerEntry(itemPriority: number, allowSettingUiFrameworkVersion?: boolean): SettingsTabEntry {\r\n return {\r\n itemPriority, tabId: \"uifw:UiStateStorage\",\r\n label: UiFramework.translate(\"settings.uiSettingsPage.label\"),\r\n icon: IconSpecUtilities.createWebComponentIconSpec(widowSettingsIconSvg),\r\n page: <UiSettingsPage allowSettingUiFrameworkVersion={!!allowSettingUiFrameworkVersion} />,\r\n isDisabled: false,\r\n tooltip: UiFramework.translate(\"settings.uiSettingsPage.tooltip\"),\r\n };\r\n}\r\n"]}
|
|
1
|
+
{"version":3,"file":"UiSettingsPage.js","sourceRoot":"","sources":["../../../../../src/appui-react/settings/ui/UiSettingsPage.tsx"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAEH,yCAAyC;AAEzC,OAAO,oBAAoB,MAAM,kDAAkD,CAAC;AACpF,OAAO,uBAAuB,CAAC;AAC/B,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAChD,OAAO,EAAE,UAAU,EAAE,4BAA4B,EAAE,MAAM,0BAA0B,CAAC;AACpF,OAAO,EAAE,iBAAiB,EAAE,MAAM,+BAA+B,CAAC;AAClE,OAAO,EAAE,qBAAqB,EAAE,aAAa,EAAE,MAAM,oCAAoC,CAAC;AAC1F,OAAO,EAAE,iBAAiB,EAAmB,MAAM,uBAAuB,CAAC;AAC3E,OAAO,EAAE,MAAM,EAAgB,MAAM,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AAElF;;;;;;;;;;;;;GAaG;AACH,MAAM,UAAU,cAAc,CAAC,EAAE,8BAA8B,EAA+C;IAC5G,MAAM,UAAU,GAAG,KAAK,CAAC,MAAM,CAAC,WAAW,CAAC,SAAS,CAAC,oCAAoC,CAAC,CAAC,CAAC;IAC7F,MAAM,gBAAg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AW,CAAQ,CAC9C;QACN,6BAAK,SAAS,EAAC,mBAAmB,IAC/B,SAAS,CACN,CACF,CACP,CAAC;AACJ,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,yBAAyB,CAAC,YAAoB,EAAE,8BAAwC;IACtG,OAAO;QACL,YAAY,EAAE,KAAK,EAAE,qBAAqB;QAC1C,KAAK,EAAE,WAAW,CAAC,SAAS,CAAC,+BAA+B,CAAC;QAC7D,IAAI,EAAE,iBAAiB,CAAC,0BAA0B,CAAC,oBAAoB,CAAC;QACxE,IAAI,EAAE,oBAAC,cAAc,IAAC,8BAA8B,EAAE,CAAC,CAAC,8BAA8B,GAAI;QAC1F,UAAU,EAAE,KAAK;QACjB,OAAO,EAAE,WAAW,CAAC,SAAS,CAAC,iCAAiC,CAAC;KAClE,CAAC;AACJ,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 Settings\r\n */\r\n\r\n// cSpell:ignore configurableui checkmark\r\n\r\nimport widowSettingsIconSvg from \"@bentley/icons-generic/icons/window-settings.svg\";\r\nimport \"./UiSettingsPage.scss\";\r\nimport * as React from \"react\";\r\nimport { SettingsTabEntry } from \"@itwin/core-react\";\r\nimport { UiFramework } from \"../../UiFramework\";\r\nimport { ColorTheme, SYSTEM_PREFERRED_COLOR_THEME } from \"../../theme/ThemeManager\";\r\nimport { UiShowHideManager } from \"../../utils/UiShowHideManager\";\r\nimport { SyncUiEventDispatcher, SyncUiEventId } from \"../../syncui/SyncUiEventDispatcher\";\r\nimport { IconSpecUtilities, UiSyncEventArgs } from \"@itwin/appui-abstract\";\r\nimport { Select, SelectOption, Slider, ToggleSwitch } from \"@itwin/itwinui-react\";\r\n\r\n/** UiSettingsPage displaying the active UI settings. This page lets users set the following settings.\r\n *\r\n * - theme - Dark, Light, or based on OS preference.\r\n * - auto hide - Starts a timer and blanks out ui components that overlay content if there is no mouse movement for a period of time.\r\n * - drag interaction - If set, toolbar group buttons require a press and drag or a long press to open. In this mode a child action\r\n * item is shown as the group button and is activated when button is clicked. If a different child item is selected, it becomes the\r\n * active group button item.\r\n * - use proximity - Changes the opacity of toolbar from transparent to opaque as the mouse moves closer.\r\n * - snap widget opacity - triggers an abrupt change from transparent to opaque for tool and navigation widgets, instead of a gradual change based on mouse location.\r\n * - widget opacity - determines how transparent floating widgets in V2 and all widgets in V1 become when the mouse in not in them.\r\n * - UI version - if allowed by props, the UI version can be toggled between V1 and V2.\r\n *\r\n * @beta\r\n */\r\nexport function UiSettingsPage({ allowSettingUiFrameworkVersion }: { allowSettingUiFrameworkVersion: boolean }) {\r\n const themeTitle = React.useRef(UiFramework.translate(\"settings.uiSettingsPage.themeTitle\"));\r\n const themeDescription = React.useRef(UiFramework.translate(\"settings.uiSettingsPage.themeDescription\"));\r\n const autoHideTitle = React.useRef(UiFramework.translate(\"settings.uiSettingsPage.autoHideTitle\"));\r\n const autoHideDescription = React.useRef(UiFramework.translate(\"settings.uiSettingsPage.autoHideDescription\"));\r\n const dragInteractionTitle = React.useRef(UiFramework.translate(\"settings.uiSettingsPage.dragInteractionTitle\"));\r\n const dragInteractionDescription = React.useRef(UiFramework.translate(\"settings.uiSettingsPage.dragInteractionDescription\"));\r\n const useNewUiTitle = React.useRef(UiFramework.translate(\"settings.uiSettingsPage.newUiTitle\"));\r\n const useNewUiDescription = React.useRef(UiFramework.translate(\"settings.uiSettingsPage.newUiDescription\"));\r\n const useProximityOpacityTitle = React.useRef(UiFramework.translate(\"settings.uiSettingsPage.useProximityOpacityTitle\"));\r\n const useProximityOpacityDescription = React.useRef(UiFramework.translate(\"settings.uiSettingsPage.useProximityOpacityDescription\"));\r\n const snapWidgetOpacityTitle = React.useRef(UiFramework.translate(\"settings.uiSettingsPage.snapWidgetOpacityTitle\"));\r\n const snapWidgetOpacityDescription = React.useRef(UiFramework.translate(\"settings.uiSettingsPage.snapWidgetOpacityDescription\"));\r\n const darkLabel = React.useRef(UiFramework.translate(\"settings.uiSettingsPage.dark\"));\r\n const lightLabel = React.useRef(UiFramework.translate(\"settings.uiSettingsPage.light\"));\r\n const systemPreferredLabel = React.useRef(UiFramework.translate(\"settings.uiSettingsPage.systemPreferred\"));\r\n const widgetOpacityTitle = React.useRef(UiFramework.translate(\"settings.uiSettingsPage.widgetOpacityTitle\"));\r\n const widgetOpacityDescription = React.useRef(UiFramework.translate(\"settings.uiSettingsPage.widgetOpacityDescription\"));\r\n const widgetIconTitle = React.useRef(UiFramework.translate(\"settings.uiSettingsPage.widgetIconTitle\"));\r\n const widgetIconDescription = React.useRef(UiFramework.translate(\"settings.uiSettingsPage.widgetIconDescription\"));\r\n const autoCollapseUnpinnedPanelsTitle = React.useRef(UiFramework.translate(\"settings.uiSettingsPage.autoCollapseUnpinnedPanelsTitle\"));\r\n const autoCollapseUnpinnedPanelsDescription = React.useRef(UiFramework.translate(\"settings.uiSettingsPage.autoCollapseUnpinnedPanelsDescription\"));\r\n const animateToolSettingsTitle = React.useRef(UiFramework.translate(\"settings.uiSettingsPage.animateToolSettingsTitle\"));\r\n const animateToolSettingsDescription = React.useRef(UiFramework.translate(\"settings.uiSettingsPage.animateToolSettingsDescription\"));\r\n const useToolAsToolSettingsLabelTitle = React.useRef(UiFramework.translate(\"settings.uiSettingsPage.useToolAsToolSettingsLabelTitle\"));\r\n const useToolAsToolSettingsLabelDescription = React.useRef(UiFramework.translate(\"settings.uiSettingsPage.useToolAsToolSettingsLabelDescription\"));\r\n\r\n const [theme, setTheme] = React.useState(() => UiFramework.getColorTheme());\r\n const [uiVersion, setUiVersion] = React.useState(() => UiFramework.uiVersion);\r\n const [useDragInteraction, setUseDragInteraction] = React.useState(() => UiFramework.useDragInteraction);\r\n const [showWidgetIcon, setShowWidgetIcon] = React.useState(() => UiFramework.showWidgetIcon);\r\n const [autoCollapseUnpinnedPanels, setAutoCollapseUnpinnedPanels] = React.useState(() => UiFramework.autoCollapseUnpinnedPanels);\r\n const [animateToolSettings, setAnimateToolSettings] = React.useState(() => UiFramework.animateToolSettings);\r\n const [useToolAsToolSettingsLabel, setUseToolAsToolSettingsLabel] = React.useState(() => UiFramework.useToolAsToolSettingsLabel);\r\n const [widgetOpacity, setWidgetOpacity] = React.useState(() => UiFramework.getWidgetOpacity());\r\n const [autoHideUi, setAutoHideUi] = React.useState(() => UiShowHideManager.autoHideUi);\r\n const [useProximityOpacity, setUseProximityOpacity] = React.useState(() => UiShowHideManager.useProximityOpacity);\r\n const [snapWidgetOpacity, setSnapWidgetOpacity] = React.useState(() => UiShowHideManager.snapWidgetOpacity);\r\n\r\n React.useEffect(() => {\r\n const syncIdsOfInterest = [\"configurableui:set_theme\", \"configurableui:set_widget_opacity\", \"configurableui:set-show-widget-icon\",\r\n \"configurableui:set-drag-interaction\", \"configurableui:set-framework-version\",\r\n \"configurableui:set-auto-collapse-unpinned-panels\", \"configurableui:set-animate-tool-settings\", \"configurableui:set-use-tool-as-tool-settings-label\", SyncUiEventId.ShowHideManagerSettingChange];\r\n\r\n const handleSyncUiEvent = (args: UiSyncEventArgs) => {\r\n // istanbul ignore else\r\n if (syncIdsOfInterest.some((value: string): boolean => args.eventIds.has(value))) {\r\n if (UiFramework.getColorTheme() !== theme)\r\n setTheme(UiFramework.getColorTheme());\r\n if (UiShowHideManager.autoHideUi !== autoHideUi)\r\n setAutoHideUi(UiShowHideManager.autoHideUi);\r\n if (UiFramework.uiVersion !== uiVersion)\r\n setUiVersion(UiFramework.uiVersion);\r\n if (UiFramework.useDragInteraction !== useDragInteraction)\r\n setUseDragInteraction(UiFramework.useDragInteraction);\r\n if (UiFramework.showWidgetIcon !== showWidgetIcon)\r\n setShowWidgetIcon(UiFramework.showWidgetIcon);\r\n if (UiFramework.autoCollapseUnpinnedPanels !== autoCollapseUnpinnedPanels)\r\n setAutoCollapseUnpinnedPanels(UiFramework.autoCollapseUnpinnedPanels);\r\n if (UiFramework.getWidgetOpacity() !== widgetOpacity)\r\n setWidgetOpacity(UiFramework.getWidgetOpacity());\r\n if (UiShowHideManager.autoHideUi !== autoHideUi)\r\n setAutoHideUi(UiShowHideManager.autoHideUi);\r\n if (UiShowHideManager.useProximityOpacity !== useProximityOpacity)\r\n setUseProximityOpacity(UiShowHideManager.useProximityOpacity);\r\n if (UiShowHideManager.snapWidgetOpacity !== snapWidgetOpacity)\r\n setSnapWidgetOpacity(UiShowHideManager.snapWidgetOpacity);\r\n if (UiFramework.animateToolSettings !== animateToolSettings)\r\n setAnimateToolSettings(UiFramework.animateToolSettings);\r\n if (UiFramework.useToolAsToolSettingsLabel !== useToolAsToolSettingsLabel)\r\n setUseToolAsToolSettingsLabel(UiFramework.useToolAsToolSettingsLabel);\r\n }\r\n };\r\n return SyncUiEventDispatcher.onSyncUiEvent.addListener(handleSyncUiEvent);\r\n }, [autoCollapseUnpinnedPanels, autoHideUi, showWidgetIcon, snapWidgetOpacity, theme, uiVersion,\r\n useDragInteraction, useProximityOpacity, widgetOpacity, animateToolSettings, useToolAsToolSettingsLabel]);\r\n\r\n const defaultThemeOption = { label: systemPreferredLabel.current, value: SYSTEM_PREFERRED_COLOR_THEME };\r\n const themeOptions: SelectOption<string>[] = [\r\n defaultThemeOption,\r\n { label: lightLabel.current, value: ColorTheme.Light },\r\n { label: darkLabel.current, value: ColorTheme.Dark },\r\n ];\r\n\r\n const onThemeChange = React.useCallback((newValue: string) => {\r\n UiFramework.setColorTheme(newValue);\r\n }, []);\r\n\r\n const onAutoHideChange = React.useCallback(async () => {\r\n UiShowHideManager.autoHideUi = !autoHideUi;\r\n }, [autoHideUi]);\r\n\r\n const onUseProximityOpacityChange = React.useCallback(async () => {\r\n UiShowHideManager.useProximityOpacity = !useProximityOpacity;\r\n }, [useProximityOpacity]);\r\n\r\n const onSnapWidgetOpacityChange = React.useCallback(async () => {\r\n UiShowHideManager.snapWidgetOpacity = !snapWidgetOpacity;\r\n }, [snapWidgetOpacity]);\r\n\r\n const onWidgetIconChange = React.useCallback(async () => {\r\n UiFramework.setShowWidgetIcon(!showWidgetIcon);\r\n }, [showWidgetIcon]);\r\n\r\n const onAutoCollapseUnpinnedPanelsChange = React.useCallback(async () => {\r\n UiFramework.setAutoCollapseUnpinnedPanels(!autoCollapseUnpinnedPanels);\r\n }, [autoCollapseUnpinnedPanels]);\r\n\r\n const onWidgetOpacityChange = React.useCallback(async (values: readonly number[]) => {\r\n // istanbul ignore else\r\n if (values.length > 0) {\r\n UiFramework.setWidgetOpacity(values[0]);\r\n }\r\n }, []);\r\n const onToggleFrameworkVersion = React.useCallback(async () => {\r\n UiFramework.setUiVersion(uiVersion === \"2\" ? \"1\" : \"2\");\r\n }, [uiVersion]);\r\n\r\n const onToggleDragInteraction = React.useCallback(async () => {\r\n UiFramework.setUseDragInteraction(!useDragInteraction);\r\n }, [useDragInteraction]);\r\n\r\n const OnToggleAnimateToolSettings = React.useCallback(async () => {\r\n UiFramework.setAnimateToolSettings(!animateToolSettings);\r\n }, [animateToolSettings]);\r\n const currentTheme = UiFramework.getColorTheme();\r\n\r\n const OnToggleUseToolAsToolSettingsLabel = React.useCallback(async () => {\r\n UiFramework.setUseToolAsToolSettingsLabel(!useToolAsToolSettingsLabel);\r\n }, [useToolAsToolSettingsLabel]);\r\n\r\n return (\r\n <div className=\"uifw-settings\">\r\n <SettingsItem title={themeTitle.current} description={themeDescription.current}\r\n settingUi={\r\n <div data-testid=\"select-theme-container\" className=\"select-theme-container\">\r\n <Select\r\n value={currentTheme}\r\n onChange={onThemeChange}\r\n options={themeOptions}\r\n data-testid=\"select-theme\"\r\n size=\"small\"\r\n />\r\n </div>\r\n }\r\n />\r\n <SettingsItem title={autoHideTitle.current} description={autoHideDescription.current}\r\n settingUi={<ToggleSwitch checked={autoHideUi} onChange={onAutoHideChange} />}\r\n />\r\n {allowSettingUiFrameworkVersion && <SettingsItem title={useNewUiTitle.current} description={useNewUiDescription.current}\r\n settingUi={<ToggleSwitch checked={UiFramework.uiVersion === \"2\"} onChange={onToggleFrameworkVersion} />}\r\n />}\r\n {UiFramework.uiVersion === \"2\" && <>\r\n <SettingsItem title={dragInteractionTitle.current} description={dragInteractionDescription.current}\r\n settingUi={<ToggleSwitch checked={useDragInteraction} onChange={onToggleDragInteraction} />}\r\n />\r\n <SettingsItem title={useProximityOpacityTitle.current} description={useProximityOpacityDescription.current}\r\n settingUi={<ToggleSwitch checked={useProximityOpacity} onChange={onUseProximityOpacityChange} />}\r\n />\r\n <SettingsItem title={snapWidgetOpacityTitle.current} description={snapWidgetOpacityDescription.current}\r\n settingUi={<ToggleSwitch checked={snapWidgetOpacity} onChange={onSnapWidgetOpacityChange} />}\r\n />\r\n <SettingsItem title={widgetIconTitle.current} description={widgetIconDescription.current}\r\n settingUi={<ToggleSwitch checked={showWidgetIcon} onChange={onWidgetIconChange} />}\r\n />\r\n <SettingsItem title={autoCollapseUnpinnedPanelsTitle.current} description={autoCollapseUnpinnedPanelsDescription.current}\r\n settingUi={<ToggleSwitch checked={autoCollapseUnpinnedPanels} onChange={onAutoCollapseUnpinnedPanelsChange} />}\r\n />\r\n <SettingsItem title={animateToolSettingsTitle.current} description={animateToolSettingsDescription.current}\r\n settingUi={<ToggleSwitch checked={animateToolSettings} onChange={OnToggleAnimateToolSettings} />}\r\n />\r\n <SettingsItem title={useToolAsToolSettingsLabelTitle.current} description={useToolAsToolSettingsLabelDescription.current}\r\n settingUi={<ToggleSwitch checked={useToolAsToolSettingsLabel} onChange={OnToggleUseToolAsToolSettingsLabel} />}\r\n />\r\n </>\r\n }\r\n <SettingsItem title={widgetOpacityTitle.current} description={widgetOpacityDescription.current}\r\n settingUi={\r\n <Slider style={{ flex: \"1\" }} values={[widgetOpacity]} step={0.05} onChange={onWidgetOpacityChange}\r\n min={0.20} max={1.0} maxLabel=\"1.0\" tickLabels={[\"\", \"\", \"\", \"\", \"\"]} />\r\n }\r\n />\r\n </div>\r\n );\r\n}\r\n\r\ninterface SettingsItemProps {\r\n title: string;\r\n description: string;\r\n settingUi: React.ReactNode;\r\n}\r\n\r\nfunction SettingsItem(props: SettingsItemProps) {\r\n const { title, description, settingUi } = props;\r\n\r\n return (\r\n <div className=\"uifw-settings-item\">\r\n <div className=\"panel left-panel\">\r\n <span className=\"title\">{title}</span>\r\n <span className=\"description\">{description}</span>\r\n </div>\r\n <div className=\"panel right-panel\">\r\n {settingUi}\r\n </div>\r\n </div>\r\n );\r\n}\r\n\r\n/**\r\n * Return a SettingsTabEntry that can be used to define the available settings that can be set for an application.\r\n * @param itemPriority - Used to define the order of the entry in the Settings Stage\r\n * @beta\r\n */\r\nexport function getUiSettingsManagerEntry(itemPriority: number, allowSettingUiFrameworkVersion?: boolean): SettingsTabEntry {\r\n return {\r\n itemPriority, tabId: \"uifw:UiStateStorage\",\r\n label: UiFramework.translate(\"settings.uiSettingsPage.label\"),\r\n icon: IconSpecUtilities.createWebComponentIconSpec(widowSettingsIconSvg),\r\n page: <UiSettingsPage allowSettingUiFrameworkVersion={!!allowSettingUiFrameworkVersion} />,\r\n isDisabled: false,\r\n tooltip: UiFramework.translate(\"settings.uiSettingsPage.tooltip\"),\r\n };\r\n}\r\n"]}
|
|
@@ -15,6 +15,7 @@ export interface InitialAppUiSettings {
|
|
|
15
15
|
/** @alpha */
|
|
16
16
|
autoCollapseUnpinnedPanels?: boolean;
|
|
17
17
|
animateToolSettings?: boolean;
|
|
18
|
+
useToolAsToolSettingsLabel?: boolean;
|
|
18
19
|
}
|
|
19
20
|
/** These are the UI settings that are stored in the Redux store. They control the color theme, the UI version,
|
|
20
21
|
* how toolbar group buttons work, and the opacity of widgets in 1.0 and floating widget in 2.0 when the cursor
|
|
@@ -39,6 +40,7 @@ export declare class AppUiSettings implements UserSettingsProvider {
|
|
|
39
40
|
showWidgetIcon: UiStateEntry<boolean>;
|
|
40
41
|
autoCollapseUnpinnedPanels: UiStateEntry<boolean>;
|
|
41
42
|
animateToolSettings: UiStateEntry<boolean>;
|
|
43
|
+
useToolAsToolSettingsLabel: UiStateEntry<boolean>;
|
|
42
44
|
private setColorTheme;
|
|
43
45
|
constructor(defaults: Partial<InitialAppUiSettings>);
|
|
44
46
|
private handleSyncUiEvent;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AppUiSettings.d.ts","sourceRoot":"","sources":["../../../../src/appui-react/uistate/AppUiSettings.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,EAAE,YAAY,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAGjE,OAAO,EAAE,kBAAkB,EAAe,oBAAoB,EAAE,MAAM,gBAAgB,CAAC;AAIvF;;GAEG;AACH,MAAM,WAAW,oBAAoB;IACnC,UAAU,EAAE,MAAM,CAAC;IACnB,eAAe,EAAE,OAAO,CAAC;IACzB,gBAAgB,EAAE,kBAAkB,CAAC;IACrC,aAAa,EAAE,MAAM,CAAC;IACtB,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,aAAa;IACb,0BAA0B,CAAC,EAAE,OAAO,CAAC;IACrC,mBAAmB,CAAC,EAAE,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"AppUiSettings.d.ts","sourceRoot":"","sources":["../../../../src/appui-react/uistate/AppUiSettings.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,EAAE,YAAY,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAGjE,OAAO,EAAE,kBAAkB,EAAe,oBAAoB,EAAE,MAAM,gBAAgB,CAAC;AAIvF;;GAEG;AACH,MAAM,WAAW,oBAAoB;IACnC,UAAU,EAAE,MAAM,CAAC;IACnB,eAAe,EAAE,OAAO,CAAC;IACzB,gBAAgB,EAAE,kBAAkB,CAAC;IACrC,aAAa,EAAE,MAAM,CAAC;IACtB,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,aAAa;IACb,0BAA0B,CAAC,EAAE,OAAO,CAAC;IACrC,mBAAmB,CAAC,EAAE,OAAO,CAAC;IAC9B,0BAA0B,CAAC,EA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