@itwin/appui-react 3.3.0-dev.7 → 3.3.0-dev.70
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +48 -1
- 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/backstage/BackstageComposer.d.ts +2 -2
- package/lib/cjs/appui-react/backstage/BackstageComposer.d.ts.map +1 -1
- package/lib/cjs/appui-react/backstage/BackstageComposer.js.map +1 -1
- package/lib/cjs/appui-react/configurableui/ConfigurableUiContent.js +1 -1
- package/lib/cjs/appui-react/configurableui/ConfigurableUiContent.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/content/ContentGroup.d.ts.map +1 -1
- package/lib/cjs/appui-react/content/ContentGroup.js +0 -2
- package/lib/cjs/appui-react/content/ContentGroup.js.map +1 -1
- package/lib/cjs/appui-react/content/ContentViewManager.d.ts.map +1 -1
- package/lib/cjs/appui-react/content/ContentViewManager.js +6 -2
- package/lib/cjs/appui-react/content/ContentViewManager.js.map +1 -1
- package/lib/cjs/appui-react/feedback/ElementTooltip.d.ts.map +1 -1
- package/lib/cjs/appui-react/feedback/ElementTooltip.js +1 -0
- package/lib/cjs/appui-react/feedback/ElementTooltip.js.map +1 -1
- package/lib/cjs/appui-react/frontstage/FrontstageDef.d.ts.map +1 -1
- package/lib/cjs/appui-react/frontstage/FrontstageDef.js +14 -3
- package/lib/cjs/appui-react/frontstage/FrontstageDef.js.map +1 -1
- package/lib/cjs/appui-react/frontstage/FrontstageManager.d.ts.map +1 -1
- package/lib/cjs/appui-react/frontstage/FrontstageManager.js +2 -0
- package/lib/cjs/appui-react/frontstage/FrontstageManager.js.map +1 -1
- package/lib/cjs/appui-react/frontstage/StandardFrontstageProvider.d.ts +2 -0
- package/lib/cjs/appui-react/frontstage/StandardFrontstageProvider.d.ts.map +1 -1
- package/lib/cjs/appui-react/frontstage/StandardFrontstageProvider.js +4 -3
- package/lib/cjs/appui-react/frontstage/StandardFrontstageProvider.js.map +1 -1
- package/lib/cjs/appui-react/imodel-components/models-tree/Hierarchy.GroupedByClass.json +2 -0
- package/lib/cjs/appui-react/imodel-components/models-tree/Hierarchy.json +2 -0
- package/lib/cjs/appui-react/imodel-components/models-tree/ModelsVisibilityHandler.d.ts.map +1 -1
- package/lib/cjs/appui-react/imodel-components/models-tree/ModelsVisibilityHandler.js +40 -27
- package/lib/cjs/appui-react/imodel-components/models-tree/ModelsVisibilityHandler.js.map +1 -1
- package/lib/cjs/appui-react/popup/KeyinPalettePanel.d.ts.map +1 -1
- package/lib/cjs/appui-react/popup/KeyinPalettePanel.js +13 -10
- package/lib/cjs/appui-react/popup/KeyinPalettePanel.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/stagepanels/StagePanelDef.d.ts +2 -0
- package/lib/cjs/appui-react/stagepanels/StagePanelDef.d.ts.map +1 -1
- package/lib/cjs/appui-react/statusbar/StatusBarWidgetControl.d.ts +6 -2
- package/lib/cjs/appui-react/statusbar/StatusBarWidgetControl.d.ts.map +1 -1
- package/lib/cjs/appui-react/statusbar/StatusBarWidgetControl.js.map +1 -1
- package/lib/cjs/appui-react/statusfields/MessageCenter.d.ts +1 -1
- package/lib/cjs/appui-react/statusfields/MessageCenter.d.ts.map +1 -1
- package/lib/cjs/appui-react/statusfields/MessageCenter.js +21 -10
- package/lib/cjs/appui-react/statusfields/MessageCenter.js.map +1 -1
- package/lib/cjs/appui-react/statusfields/SelectionScope.js +1 -1
- package/lib/cjs/appui-react/statusfields/SelectionScope.js.map +1 -1
- package/lib/cjs/appui-react/statusfields/SnapMode.d.ts +0 -1
- package/lib/cjs/appui-react/statusfields/SnapMode.d.ts.map +1 -1
- package/lib/cjs/appui-react/statusfields/SnapMode.js +0 -2
- package/lib/cjs/appui-react/statusfields/SnapMode.js.map +1 -1
- package/lib/cjs/appui-react/statusfields/StatusFieldProps.d.ts +8 -4
- package/lib/cjs/appui-react/statusfields/StatusFieldProps.d.ts.map +1 -1
- package/lib/cjs/appui-react/statusfields/StatusFieldProps.js +0 -7
- package/lib/cjs/appui-react/statusfields/StatusFieldProps.js.map +1 -1
- package/lib/cjs/appui-react/statusfields/ViewAttributes.d.ts.map +1 -1
- package/lib/cjs/appui-react/statusfields/ViewAttributes.js +1 -0
- package/lib/cjs/appui-react/statusfields/ViewAttributes.js.map +1 -1
- package/lib/cjs/appui-react/statusfields/toolassistance/ToolAssistanceField.d.ts +1 -0
- package/lib/cjs/appui-react/statusfields/toolassistance/ToolAssistanceField.d.ts.map +1 -1
- package/lib/cjs/appui-react/statusfields/toolassistance/ToolAssistanceField.js +13 -9
- package/lib/cjs/appui-react/statusfields/toolassistance/ToolAssistanceField.js.map +1 -1
- package/lib/cjs/appui-react/syncui/SyncUiEventDispatcher.d.ts.map +1 -1
- package/lib/cjs/appui-react/syncui/SyncUiEventDispatcher.js +19 -16
- package/lib/cjs/appui-react/syncui/SyncUiEventDispatcher.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/Content.d.ts.map +1 -1
- package/lib/cjs/appui-react/widget-panels/Content.js +10 -0
- package/lib/cjs/appui-react/widget-panels/Content.js.map +1 -1
- package/lib/cjs/appui-react/widget-panels/Frontstage.d.ts +9 -1
- package/lib/cjs/appui-react/widget-panels/Frontstage.d.ts.map +1 -1
- package/lib/cjs/appui-react/widget-panels/Frontstage.js +110 -14
- package/lib/cjs/appui-react/widget-panels/Frontstage.js.map +1 -1
- package/lib/cjs/appui-react/widget-panels/useTransientState.d.ts +8 -0
- package/lib/cjs/appui-react/widget-panels/useTransientState.d.ts.map +1 -0
- package/lib/cjs/appui-react/widget-panels/useTransientState.js +19 -0
- package/lib/cjs/appui-react/widget-panels/useTransientState.js.map +1 -0
- package/lib/cjs/appui-react/widget-panels/useWidgetDirection.d.ts.map +1 -1
- package/lib/cjs/appui-react/widget-panels/useWidgetDirection.js +1 -0
- package/lib/cjs/appui-react/widget-panels/useWidgetDirection.js.map +1 -1
- package/lib/cjs/appui-react/widgets/WidgetDef.d.ts +4 -0
- package/lib/cjs/appui-react/widgets/WidgetDef.d.ts.map +1 -1
- package/lib/cjs/appui-react/widgets/WidgetDef.js +9 -2
- package/lib/cjs/appui-react/widgets/WidgetDef.js.map +1 -1
- package/lib/cjs/appui-react/widgets/WidgetHost.d.ts.map +1 -1
- package/lib/cjs/appui-react/widgets/WidgetHost.js +3 -1
- package/lib/cjs/appui-react/widgets/WidgetHost.js.map +1 -1
- package/lib/cjs/appui-react.d.ts +1 -0
- package/lib/cjs/appui-react.d.ts.map +1 -1
- package/lib/cjs/appui-react.js +1 -0
- package/lib/cjs/appui-react.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/backstage/BackstageComposer.d.ts +2 -2
- package/lib/esm/appui-react/backstage/BackstageComposer.d.ts.map +1 -1
- package/lib/esm/appui-react/backstage/BackstageComposer.js.map +1 -1
- package/lib/esm/appui-react/configurableui/ConfigurableUiContent.js +1 -1
- package/lib/esm/appui-react/configurableui/ConfigurableUiContent.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/content/ContentGroup.d.ts.map +1 -1
- package/lib/esm/appui-react/content/ContentGroup.js +0 -2
- package/lib/esm/appui-react/content/ContentGroup.js.map +1 -1
- package/lib/esm/appui-react/content/ContentViewManager.d.ts.map +1 -1
- package/lib/esm/appui-react/content/ContentViewManager.js +6 -2
- package/lib/esm/appui-react/content/ContentViewManager.js.map +1 -1
- package/lib/esm/appui-react/feedback/ElementTooltip.d.ts.map +1 -1
- package/lib/esm/appui-react/feedback/ElementTooltip.js +1 -0
- package/lib/esm/appui-react/feedback/ElementTooltip.js.map +1 -1
- package/lib/esm/appui-react/frontstage/FrontstageDef.d.ts.map +1 -1
- package/lib/esm/appui-react/frontstage/FrontstageDef.js +14 -3
- package/lib/esm/appui-react/frontstage/FrontstageDef.js.map +1 -1
- package/lib/esm/appui-react/frontstage/FrontstageManager.d.ts.map +1 -1
- package/lib/esm/appui-react/frontstage/FrontstageManager.js +2 -0
- package/lib/esm/appui-react/frontstage/FrontstageManager.js.map +1 -1
- package/lib/esm/appui-react/frontstage/StandardFrontstageProvider.d.ts +2 -0
- package/lib/esm/appui-react/frontstage/StandardFrontstageProvider.d.ts.map +1 -1
- package/lib/esm/appui-react/frontstage/StandardFrontstageProvider.js +4 -3
- package/lib/esm/appui-react/frontstage/StandardFrontstageProvider.js.map +1 -1
- package/lib/esm/appui-react/imodel-components/models-tree/Hierarchy.GroupedByClass.json +2 -0
- package/lib/esm/appui-react/imodel-components/models-tree/Hierarchy.json +2 -0
- package/lib/esm/appui-react/imodel-components/models-tree/ModelsVisibilityHandler.d.ts.map +1 -1
- package/lib/esm/appui-react/imodel-components/models-tree/ModelsVisibilityHandler.js +40 -27
- package/lib/esm/appui-react/imodel-components/models-tree/ModelsVisibilityHandler.js.map +1 -1
- package/lib/esm/appui-react/popup/KeyinPalettePanel.d.ts.map +1 -1
- package/lib/esm/appui-react/popup/KeyinPalettePanel.js +13 -10
- package/lib/esm/appui-react/popup/KeyinPalettePanel.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/stagepanels/StagePanelDef.d.ts +2 -0
- package/lib/esm/appui-react/stagepanels/StagePanelDef.d.ts.map +1 -1
- package/lib/esm/appui-react/statusbar/StatusBarWidgetControl.d.ts +6 -2
- package/lib/esm/appui-react/statusbar/StatusBarWidgetControl.d.ts.map +1 -1
- package/lib/esm/appui-react/statusbar/StatusBarWidgetControl.js.map +1 -1
- package/lib/esm/appui-react/statusfields/MessageCenter.d.ts +1 -1
- package/lib/esm/appui-react/statusfields/MessageCenter.d.ts.map +1 -1
- package/lib/esm/appui-react/statusfields/MessageCenter.js +21 -10
- package/lib/esm/appui-react/statusfields/MessageCenter.js.map +1 -1
- package/lib/esm/appui-react/statusfields/SelectionScope.js +1 -1
- package/lib/esm/appui-react/statusfields/SelectionScope.js.map +1 -1
- package/lib/esm/appui-react/statusfields/SnapMode.d.ts +0 -1
- package/lib/esm/appui-react/statusfields/SnapMode.d.ts.map +1 -1
- package/lib/esm/appui-react/statusfields/SnapMode.js +0 -2
- package/lib/esm/appui-react/statusfields/SnapMode.js.map +1 -1
- package/lib/esm/appui-react/statusfields/StatusFieldProps.d.ts +8 -4
- package/lib/esm/appui-react/statusfields/StatusFieldProps.d.ts.map +1 -1
- package/lib/esm/appui-react/statusfields/StatusFieldProps.js +0 -7
- package/lib/esm/appui-react/statusfields/StatusFieldProps.js.map +1 -1
- package/lib/esm/appui-react/statusfields/ViewAttributes.d.ts.map +1 -1
- package/lib/esm/appui-react/statusfields/ViewAttributes.js +1 -0
- package/lib/esm/appui-react/statusfields/ViewAttributes.js.map +1 -1
- package/lib/esm/appui-react/statusfields/toolassistance/ToolAssistanceField.d.ts +1 -0
- package/lib/esm/appui-react/statusfields/toolassistance/ToolAssistanceField.d.ts.map +1 -1
- package/lib/esm/appui-react/statusfields/toolassistance/ToolAssistanceField.js +13 -9
- package/lib/esm/appui-react/statusfields/toolassistance/ToolAssistanceField.js.map +1 -1
- package/lib/esm/appui-react/syncui/SyncUiEventDispatcher.d.ts.map +1 -1
- package/lib/esm/appui-react/syncui/SyncUiEventDispatcher.js +19 -16
- package/lib/esm/appui-react/syncui/SyncUiEventDispatcher.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/Content.d.ts.map +1 -1
- package/lib/esm/appui-react/widget-panels/Content.js +10 -0
- package/lib/esm/appui-react/widget-panels/Content.js.map +1 -1
- package/lib/esm/appui-react/widget-panels/Frontstage.d.ts +9 -1
- package/lib/esm/appui-react/widget-panels/Frontstage.d.ts.map +1 -1
- package/lib/esm/appui-react/widget-panels/Frontstage.js +111 -15
- package/lib/esm/appui-react/widget-panels/Frontstage.js.map +1 -1
- package/lib/esm/appui-react/widget-panels/useTransientState.d.ts +8 -0
- package/lib/esm/appui-react/widget-panels/useTransientState.d.ts.map +1 -0
- package/lib/esm/appui-react/widget-panels/useTransientState.js +15 -0
- package/lib/esm/appui-react/widget-panels/useTransientState.js.map +1 -0
- package/lib/esm/appui-react/widget-panels/useWidgetDirection.d.ts.map +1 -1
- package/lib/esm/appui-react/widget-panels/useWidgetDirection.js +1 -0
- package/lib/esm/appui-react/widget-panels/useWidgetDirection.js.map +1 -1
- package/lib/esm/appui-react/widgets/WidgetDef.d.ts +4 -0
- package/lib/esm/appui-react/widgets/WidgetDef.d.ts.map +1 -1
- package/lib/esm/appui-react/widgets/WidgetDef.js +9 -2
- package/lib/esm/appui-react/widgets/WidgetDef.js.map +1 -1
- package/lib/esm/appui-react/widgets/WidgetHost.d.ts.map +1 -1
- package/lib/esm/appui-react/widgets/WidgetHost.js +3 -1
- package/lib/esm/appui-react/widgets/WidgetHost.js.map +1 -1
- package/lib/esm/appui-react.d.ts +1 -0
- package/lib/esm/appui-react.d.ts.map +1 -1
- package/lib/esm/appui-react.js +1 -0
- package/lib/esm/appui-react.js.map +1 -1
- package/lib/public/locales/en/UiFramework.json +6 -1
- package/package.json +37 -37
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AppUiSettings.js","sourceRoot":"","sources":["../../../../src/appui-react/uistate/AppUiSettings.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,kDAAiE;AAEjE,2EAAwE;AACxE,gDAAuF;AAkBvF;;;;;;;;;;GAUG;AACH,MAAa,aAAa;IAqBxB,YAAY,QAAuC;QApBnC,eAAU,GAAG,uBAAuB,CAAC;QAG7C,cAAS,GAA6B,EAAE,CAAC;QACzC,2BAAsB,GAAG,KAAK,CAAC;QAU/B,kBAAa,GAAG,CAAC,KAAa,EAAE,EAAE;YACxC,yBAAW,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC;YACjC,6FAA6F;YAC7F,MAAM,CAAC,YAAY,CAAC,OAAO,CAAC,mBAAmB,EAAE,KAAK,CAAC,CAAC;QAC1D,CAAC,CAAC;QAwCM,sBAAiB,GAAG,KAAK,EAAE,IAAqB,EAAE,EAAE;YAC1D,IAAI,IAAI,CAAC,sBAAsB;gBAC7B,OAAO;YAET,IAAI,IAAI,CAAC,QAAQ,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AAC,CAAC;SAChD;QACD,IAAI,CAAC,sBAAsB,GAAG,KAAK,CAAC;IACtC,CAAC;IAEM,KAAK,CAAC,gBAAgB,CAAC,OAAuB;QACnD,MAAM,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;IAC5B,CAAC;;AAlGH,sCAmGC;AAhGgB,+BAAiB,GAAG,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 Settings\r\n */\r\n\r\nimport { UiStateEntry, UiStateStorage } from \"@itwin/core-react\";\r\nimport { UiSyncEventArgs } from \"@itwin/appui-abstract\";\r\nimport { SyncUiEventDispatcher } from \"../syncui/SyncUiEventDispatcher\";\r\nimport { FrameworkVersionId, UiFramework, UserSettingsProvider } from \"../UiFramework\";\r\n\r\n// cSpell:ignore configurableui\r\n\r\n/** Default values that may be specified for [[AppUiSettings]].\r\n * @public\r\n */\r\nexport interface InitialAppUiSettings {\r\n colorTheme: string;\r\n dragInteraction: boolean;\r\n frameworkVersion: FrameworkVersionId;\r\n widgetOpacity: number;\r\n showWidgetIcon?: boolean;\r\n /** @alpha */\r\n autoCollapseUnpinnedPanels?: boolean;\r\n animateToolSettings?: boolean;\r\n}\r\n\r\n/** These are the UI settings that are stored in the Redux store. They control the color theme, the UI version,\r\n * how toolbar group buttons work, and the opacity of widgets in 1.0 and floating widget in 2.0 when the cursor\r\n * is not inside them. It is expect that an IModelApp using App UI components will create and register AppUiSettings with\r\n * defaults specific to their application. This would be done by calling the following.\r\n *\r\n * ```ts\r\n * UiFramework.registerUserSettingsProvider(new AppUiSettings(defaults));\r\n * ```\r\n *\r\n * @public\r\n */\r\nexport class AppUiSettings implements UserSettingsProvider {\r\n public readonly providerId = \"AppUiSettingsProvider\";\r\n\r\n private static _settingNamespace = \"AppUiSettings\";\r\n private _settings: Array<UiStateEntry<any>> = [];\r\n private _applyingLocalSettings = false;\r\n\r\n public colorTheme: UiStateEntry<string>;\r\n public dragInteraction: UiStateEntry<boolean>;\r\n public frameworkVersion: UiStateEntry<FrameworkVersionId>;\r\n public widgetOpacity: UiStateEntry<number>;\r\n public showWidgetIcon: UiStateEntry<boolean>;\r\n public autoCollapseUnpinnedPanels: UiStateEntry<boolean>;\r\n public animateToolSettings: UiStateEntry<boolean>;\r\n\r\n private setColorTheme = (theme: string) => {\r\n UiFramework.setColorTheme(theme);\r\n // always store to local storage to avoid flicker during startup if user is not yet logged-in\r\n window.localStorage.setItem(\"uifw:defaultTheme\", theme);\r\n };\r\n\r\n constructor(defaults: Partial<InitialAppUiSettings>) {\r\n this._settings = [];\r\n\r\n this.colorTheme = new UiStateEntry<string>(AppUiSettings._settingNamespace, \"ColorTheme\", UiFramework.getColorTheme, this.setColorTheme, defaults.colorTheme);\r\n this._settings.push(this.colorTheme);\r\n\r\n this.dragInteraction = new UiStateEntry<boolean>(AppUiSettings._settingNamespace, \"DragInteraction\",\r\n () => UiFramework.useDragInteraction,\r\n (value: boolean) => UiFramework.setUseDragInteraction(value), defaults.dragInteraction);\r\n this._settings.push(this.dragInteraction);\r\n\r\n this.showWidgetIcon = new UiStateEntry<boolean>(AppUiSettings._settingNamespace, \"ShowWidgetIcon\",\r\n () => UiFramework.showWidgetIcon,\r\n (value: boolean) => UiFramework.setShowWidgetIcon(value), defaults.showWidgetIcon);\r\n this._settings.push(this.showWidgetIcon);\r\n\r\n this.autoCollapseUnpinnedPanels = new UiStateEntry<boolean>(AppUiSettings._settingNamespace, \"AutoCollapseUnpinnedPanels\",\r\n () => UiFramework.autoCollapseUnpinnedPanels,\r\n (value: boolean) => UiFramework.setAutoCollapseUnpinnedPanels(value), defaults.autoCollapseUnpinnedPanels);\r\n this._settings.push(this.autoCollapseUnpinnedPanels);\r\n\r\n this.frameworkVersion = new UiStateEntry<FrameworkVersionId>(AppUiSettings._settingNamespace, \"FrameworkVersion\",\r\n () => UiFramework.uiVersion,\r\n (value: FrameworkVersionId) => UiFramework.setUiVersion(value), defaults.frameworkVersion);\r\n this._settings.push(this.frameworkVersion);\r\n\r\n this.widgetOpacity = new UiStateEntry<number>(AppUiSettings._settingNamespace, \"WidgetOpacity\",\r\n () => UiFramework.getWidgetOpacity(), (value: number) => UiFramework.setWidgetOpacity(value), defaults.widgetOpacity);\r\n this._settings.push(this.widgetOpacity);\r\n\r\n this.animateToolSettings = new UiStateEntry<boolean>(AppUiSettings._settingNamespace, \"AnimateToolSettings\",\r\n () => UiFramework.animateToolSettings,\r\n (value: boolean) => UiFramework.setAnimateToolSettings(value), defaults.animateToolSettings);\r\n this._settings.push(this.animateToolSettings);\r\n\r\n SyncUiEventDispatcher.onSyncUiEvent.addListener(this.handleSyncUiEvent);\r\n }\r\n\r\n private handleSyncUiEvent = async (args: UiSyncEventArgs) => {\r\n if (this._applyingLocalSettings)\r\n return;\r\n\r\n if (args.eventIds.has(\"configurableui:set_theme\")) {\r\n await this.colorTheme.saveSetting(UiFramework.getUiStateStorage());\r\n // always store as default theme in local storage to avoid flicker during startup if user is not yet logged-in\r\n window.localStorage.setItem(\"uifw:defaultTheme\", UiFramework.getColorTheme());\r\n }\r\n\r\n if (args.eventIds.has(\"configurableui:set-drag-interaction\"))\r\n await this.dragInteraction.saveSetting(UiFramework.getUiStateStorage());\r\n\r\n if (args.eventIds.has(\"configurableui:set-framework-version\"))\r\n await this.frameworkVersion.saveSetting(UiFramework.getUiStateStorage());\r\n\r\n if (args.eventIds.has(\"configurableui:set-show-widget-icon\"))\r\n await this.showWidgetIcon.saveSetting(UiFramework.getUiStateStorage());\r\n\r\n if (args.eventIds.has(\"configurableui:set-auto-collapse-unpinned-panels\"))\r\n await this.autoCollapseUnpinnedPanels.saveSetting(UiFramework.getUiStateStorage());\r\n\r\n if (args.eventIds.has(\"configurableui:set_widget_opacity\"))\r\n await this.widgetOpacity.saveSetting(UiFramework.getUiStateStorage());\r\n\r\n if (args.eventIds.has(\"configurableui:set-animate-tool-settings\"))\r\n await this.animateToolSettings.saveSetting(UiFramework.getUiStateStorage());\r\n };\r\n\r\n public async apply(storage: UiStateStorage): Promise<void> {\r\n this._applyingLocalSettings = true;\r\n for await (const setting of this._settings) {\r\n await setting.getSettingAndApplyValue(storage);\r\n }\r\n this._applyingLocalSettings = false;\r\n }\r\n\r\n public async loadUserSettings(storage: UiStateStorage): Promise<void> {\r\n await this.apply(storage);\r\n }\r\n}\r\n"]}
|
|
1
|
+
{"version":3,"file":"AppUiSettings.js","sourceRoot":"","sources":["../../../../src/appui-react/uistate/AppUiSettings.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,kDAAiE;AAEjE,2EAAwE;AACxE,gDAAuF;AAmBvF;;;;;;;;;;GAUG;AACH,MAAa,aAAa;IAsBxB,YAAY,QAAuC;QArBnC,eAAU,GAAG,uBAAuB,CAAC;QAG7C,cAAS,GAA6B,EAAE,CAAC;QACzC,2BAAsB,GAAG,KAAK,CAAC;QAW/B,kBAAa,GAAG,CAAC,KAAa,EAAE,EAAE;YACxC,yBAAW,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC;YACjC,6FAA6F;YAC7F,MAAM,CAAC,YAAY,CAAC,OAAO,CAAC,mBAAmB,EAAE,KAAK,CAAC,CAAC;QAC1D,CAAC,CAAC;QA6CM,sBAAiB,GAAG,KAAK,EAAE,IAAqB,EAAE,EAAE;YAC1D,IAAI,IAAI,CAAC,sBAAsB;gBAC7B,OAAO;YAET,IAAI,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,0BAA0B,CAAC,EAAE;gBACjD,MAAM,IAAI,CAAC,UAAU,CAAC,WAAW,CAAC,yBAAW,CAAC,iBAAiB,EAAE,CAAC,CAAC;gBACnE,8GAA8G;gBAC9G,MAAM,CAAC,YAAY,CAAC,OAAO,CAAC,mBAAmB,EAAE,yBAAW,CAAC,aAAa,EAAE,CAAC,CAAC;aAC/E;Y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AC,iBAAiB,CAAC,CAAC;IAC1E,CAAC;IAkCM,KAAK,CAAC,KAAK,CAAC,OAAuB;QACxC,IAAI,CAAC,sBAAsB,GAAG,IAAI,CAAC;QACnC,IAAI,KAAK,EAAE,MAAM,OAAO,IAAI,IAAI,CAAC,SAAS,EAAE;YAC1C,MAAM,OAAO,CAAC,uBAAuB,CAAC,OAAO,CAAC,CAAC;SAChD;QACD,IAAI,CAAC,sBAAsB,GAAG,KAAK,CAAC;IACtC,CAAC;IAEM,KAAK,CAAC,gBAAgB,CAAC,OAAuB;QACnD,MAAM,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;IAC5B,CAAC;;AA3GH,sCA4GC;AAzGgB,+BAAiB,GAAG,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 Settings\r\n */\r\n\r\nimport { UiStateEntry, UiStateStorage } from \"@itwin/core-react\";\r\nimport { UiSyncEventArgs } from \"@itwin/appui-abstract\";\r\nimport { SyncUiEventDispatcher } from \"../syncui/SyncUiEventDispatcher\";\r\nimport { FrameworkVersionId, UiFramework, UserSettingsProvider } from \"../UiFramework\";\r\n\r\n// cSpell:ignore configurableui\r\n\r\n/** Default values that may be specified for [[AppUiSettings]].\r\n * @public\r\n */\r\nexport interface InitialAppUiSettings {\r\n colorTheme: string;\r\n dragInteraction: boolean;\r\n frameworkVersion: FrameworkVersionId;\r\n widgetOpacity: number;\r\n showWidgetIcon?: boolean;\r\n /** @alpha */\r\n autoCollapseUnpinnedPanels?: boolean;\r\n animateToolSettings?: boolean;\r\n useToolAsToolSettingsLabel?: boolean;\r\n}\r\n\r\n/** These are the UI settings that are stored in the Redux store. They control the color theme, the UI version,\r\n * how toolbar group buttons work, and the opacity of widgets in 1.0 and floating widget in 2.0 when the cursor\r\n * is not inside them. It is expect that an IModelApp using App UI components will create and register AppUiSettings with\r\n * defaults specific to their application. This would be done by calling the following.\r\n *\r\n * ```ts\r\n * UiFramework.registerUserSettingsProvider(new AppUiSettings(defaults));\r\n * ```\r\n *\r\n * @public\r\n */\r\nexport class AppUiSettings implements UserSettingsProvider {\r\n public readonly providerId = \"AppUiSettingsProvider\";\r\n\r\n private static _settingNamespace = \"AppUiSettings\";\r\n private _settings: Array<UiStateEntry<any>> = [];\r\n private _applyingLocalSettings = false;\r\n\r\n public colorTheme: UiStateEntry<string>;\r\n public dragInteraction: UiStateEntry<boolean>;\r\n public frameworkVersion: UiStateEntry<FrameworkVersionId>;\r\n public widgetOpacity: UiStateEntry<number>;\r\n public showWidgetIcon: UiStateEntry<boolean>;\r\n public autoCollapseUnpinnedPanels: UiStateEntry<boolean>;\r\n public animateToolSettings: UiStateEntry<boolean>;\r\n public useToolAsToolSettingsLabel: UiStateEntry<boolean>;\r\n\r\n private setColorTheme = (theme: string) => {\r\n UiFramework.setColorTheme(theme);\r\n // always store to local storage to avoid flicker during startup if user is not yet logged-in\r\n window.localStorage.setItem(\"uifw:defaultTheme\", theme);\r\n };\r\n\r\n constructor(defaults: Partial<InitialAppUiSettings>) {\r\n this._settings = [];\r\n\r\n this.colorTheme = new UiStateEntry<string>(AppUiSettings._settingNamespace, \"ColorTheme\", UiFramework.getColorTheme, this.setColorTheme, defaults.colorTheme);\r\n this._settings.push(this.colorTheme);\r\n\r\n this.dragInteraction = new UiStateEntry<boolean>(AppUiSettings._settingNamespace, \"DragInteraction\",\r\n () => UiFramework.useDragInteraction,\r\n (value: boolean) => UiFramework.setUseDragInteraction(value), defaults.dragInteraction);\r\n this._settings.push(this.dragInteraction);\r\n\r\n this.showWidgetIcon = new UiStateEntry<boolean>(AppUiSettings._settingNamespace, \"ShowWidgetIcon\",\r\n () => UiFramework.showWidgetIcon,\r\n (value: boolean) => UiFramework.setShowWidgetIcon(value), defaults.showWidgetIcon);\r\n this._settings.push(this.showWidgetIcon);\r\n\r\n this.autoCollapseUnpinnedPanels = new UiStateEntry<boolean>(AppUiSettings._settingNamespace, \"AutoCollapseUnpinnedPanels\",\r\n () => UiFramework.autoCollapseUnpinnedPanels,\r\n (value: boolean) => UiFramework.setAutoCollapseUnpinnedPanels(value), defaults.autoCollapseUnpinnedPanels);\r\n this._settings.push(this.autoCollapseUnpinnedPanels);\r\n\r\n this.frameworkVersion = new UiStateEntry<FrameworkVersionId>(AppUiSettings._settingNamespace, \"FrameworkVersion\",\r\n () => UiFramework.uiVersion,\r\n (value: FrameworkVersionId) => UiFramework.setUiVersion(value), defaults.frameworkVersion);\r\n this._settings.push(this.frameworkVersion);\r\n\r\n this.widgetOpacity = new UiStateEntry<number>(AppUiSettings._settingNamespace, \"WidgetOpacity\",\r\n () => UiFramework.getWidgetOpacity(), (value: number) => UiFramework.setWidgetOpacity(value), defaults.widgetOpacity);\r\n this._settings.push(this.widgetOpacity);\r\n\r\n this.animateToolSettings = new UiStateEntry<boolean>(AppUiSettings._settingNamespace, \"AnimateToolSettings\",\r\n () => UiFramework.animateToolSettings,\r\n (value: boolean) => UiFramework.setAnimateToolSettings(value), defaults.animateToolSettings);\r\n this._settings.push(this.animateToolSettings);\r\n\r\n this.useToolAsToolSettingsLabel = new UiStateEntry<boolean>(AppUiSettings._settingNamespace, \"UseToolAsToolSettingsLabel\",\r\n () => UiFramework.useToolAsToolSettingsLabel,\r\n (value: boolean) => UiFramework.setUseToolAsToolSettingsLabel(value), defaults.useToolAsToolSettingsLabel);\r\n this._settings.push(this.useToolAsToolSettingsLabel);\r\n\r\n SyncUiEventDispatcher.onSyncUiEvent.addListener(this.handleSyncUiEvent);\r\n }\r\n\r\n private handleSyncUiEvent = async (args: UiSyncEventArgs) => {\r\n if (this._applyingLocalSettings)\r\n return;\r\n\r\n if (args.eventIds.has(\"configurableui:set_theme\")) {\r\n await this.colorTheme.saveSetting(UiFramework.getUiStateStorage());\r\n // always store as default theme in local storage to avoid flicker during startup if user is not yet logged-in\r\n window.localStorage.setItem(\"uifw:defaultTheme\", UiFramework.getColorTheme());\r\n }\r\n\r\n if (args.eventIds.has(\"configurableui:set-drag-interaction\"))\r\n await this.dragInteraction.saveSetting(UiFramework.getUiStateStorage());\r\n\r\n if (args.eventIds.has(\"configurableui:set-framework-version\"))\r\n await this.frameworkVersion.saveSetting(UiFramework.getUiStateStorage());\r\n\r\n if (args.eventIds.has(\"configurableui:set-show-widget-icon\"))\r\n await this.showWidgetIcon.saveSetting(UiFramework.getUiStateStorage());\r\n\r\n if (args.eventIds.has(\"configurableui:set-auto-collapse-unpinned-panels\"))\r\n await this.autoCollapseUnpinnedPanels.saveSetting(UiFramework.getUiStateStorage());\r\n\r\n if (args.eventIds.has(\"configurableui:set_widget_opacity\"))\r\n await this.widgetOpacity.saveSetting(UiFramework.getUiStateStorage());\r\n\r\n if (args.eventIds.has(\"configurableui:set-animate-tool-settings\"))\r\n await this.animateToolSettings.saveSetting(UiFramework.getUiStateStorage());\r\n\r\n if (args.eventIds.has(\"configurableui:set-use-tool-as-tool-settings-label\"))\r\n await this.useToolAsToolSettingsLabel.saveSetting(UiFramework.getUiStateStorage());\r\n };\r\n\r\n public async apply(storage: UiStateStorage): Promise<void> {\r\n this._applyingLocalSettings = true;\r\n for await (const setting of this._settings) {\r\n await setting.getSettingAndApplyValue(storage);\r\n }\r\n this._applyingLocalSettings = false;\r\n }\r\n\r\n public async loadUserSettings(storage: UiStateStorage): Promise<void> {\r\n await this.apply(storage);\r\n }\r\n}\r\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Content.d.ts","sourceRoot":"","sources":["../../../../src/appui-react/widget-panels/Content.tsx"],"names":[],"mappings":";AAWA,OAAO,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;
|
|
1
|
+
{"version":3,"file":"Content.d.ts","sourceRoot":"","sources":["../../../../src/appui-react/widget-panels/Content.tsx"],"names":[],"mappings":";AAWA,OAAO,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AAKjD,gBAAgB;AAChB,wBAAgB,aAAa,gBAqB5B;AAED,gBAAgB;AAChB,wBAAgB,YAAY,IAAI,SAAS,GAAG,SAAS,CAyBpD"}
|
|
@@ -13,12 +13,22 @@ const appui_abstract_1 = require("@itwin/appui-abstract");
|
|
|
13
13
|
const appui_layout_react_1 = require("@itwin/appui-layout-react");
|
|
14
14
|
const Frontstage_1 = require("../frontstage/Frontstage");
|
|
15
15
|
const FrontstageManager_1 = require("../frontstage/FrontstageManager");
|
|
16
|
+
const useTransientState_1 = require("./useTransientState");
|
|
16
17
|
/** @internal */
|
|
17
18
|
function WidgetContent() {
|
|
18
19
|
var _a, _b, _c;
|
|
19
20
|
const widget = useWidgetDef();
|
|
20
21
|
// istanbul ignore next
|
|
21
22
|
const itemId = (_b = (_a = widget === null || widget === void 0 ? void 0 : widget.id) !== null && _a !== void 0 ? _a : widget === null || widget === void 0 ? void 0 : widget.label) !== null && _b !== void 0 ? _b : "unknown";
|
|
23
|
+
const onSave = React.useCallback(() => {
|
|
24
|
+
// istanbul ignore next
|
|
25
|
+
widget === null || widget === void 0 ? void 0 : widget.saveTransientState();
|
|
26
|
+
}, [widget]);
|
|
27
|
+
const onRestore = React.useCallback(() => {
|
|
28
|
+
// istanbul ignore next
|
|
29
|
+
widget === null || widget === void 0 ? void 0 : widget.restoreTransientState();
|
|
30
|
+
}, [widget]);
|
|
31
|
+
(0, useTransientState_1.useTransientState)(onSave, onRestore);
|
|
22
32
|
return (React.createElement(appui_layout_react_1.ScrollableWidgetContent, { itemId: itemId, providerId: (_c = widget === null || widget === void 0 ? void 0 : widget.initialProps) === null || _c === void 0 ? void 0 : _c.providerId }, widget === null || widget === void 0 ? void 0 : widget.reactNode));
|
|
23
33
|
}
|
|
24
34
|
exports.WidgetContent = WidgetContent;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Content.js","sourceRoot":"","sources":["../../../../src/appui-react/widget-panels/Content.tsx"],"names":[],"mappings":";;;AAAA;;;+FAG+F;AAC/F;;GAEG;AACH,+BAA+B;AAC/B,0DAAuD;AACvD,kEAAkF;AAClF,yDAAkE;AAElE,uEAAoE;
|
|
1
|
+
{"version":3,"file":"Content.js","sourceRoot":"","sources":["../../../../src/appui-react/widget-panels/Content.tsx"],"names":[],"mappings":";;;AAAA;;;+FAG+F;AAC/F;;GAEG;AACH,+BAA+B;AAC/B,0DAAuD;AACvD,kEAAkF;AAClF,yDAAkE;AAElE,uEAAoE;AAEpE,2DAAwD;AAExD,gBAAgB;AAChB,SAAgB,aAAa;;IAC3B,MAAM,MAAM,GAAG,YAAY,EAAE,CAAC;IAC9B,uBAAuB;IACvB,MAAM,MAAM,GAAG,MAAA,MAAA,MAAM,aAAN,MAAM,uBAAN,MAAM,CAAE,EAAE,mCAAI,MAAM,aAAN,MAAM,uBAAN,MAAM,CAAE,KAAK,mCAAI,SAAS,CAAC;IACxD,MAAM,MAAM,GAAG,KAAK,CAAC,WAAW,CAAC,GAAG,EAAE;QACpC,uBAAuB;QACvB,MAAM,aAAN,MAAM,uBAAN,MAAM,CAAE,kBAAkB,EAAE,CAAC;IAC/B,CAAC,EAAE,CAAC,MAAM,CAAC,CAAC,CAAC;IACb,MAAM,SAAS,GAAG,KAAK,CAAC,WAAW,CAAC,GAAG,EAAE;QACvC,uBAAuB;QACvB,MAAM,aAAN,MAAM,uBAAN,MAAM,CAAE,qBAAqB,EAAE,CAAC;IAClC,CAAC,EAAE,CAAC,MAAM,CAAC,CAAC,CAAC;IACb,IAAA,qCAAiB,EAAC,MAAM,EAAE,SAAS,CAAC,CAAC;IACrC,OAAO,CACL,oBAAC,4CAAuB,IACtB,MAAM,EAAE,MAAM,EACd,UAAU,EAAE,MAAA,MAAM,aAAN,MAAM,uBAAN,MAAM,CAAE,YAAY,0CAAE,UAAU,IAE3C,MAAM,aAAN,MAAM,uBAAN,MAAM,CAAE,SAAS,CACM,CAC3B,CAAC;AACJ,CAAC;AArBD,sCAqBC;AAED,gBAAgB;AAChB,SAAgB,YAAY;IAC1B,MAAM,KAAK,GAAG,KAAK,CAAC,UAAU,CAAC,iCAAY,CAAC,CAAC;IAC7C,MAAM,UAAU,GAAG,IAAA,mCAAsB,GAAE,CAAC;IAC5C,MAAM,CAAC,SAAS,EAAE,YAAY,CAAC,GAAG,KAAK,CAAC,QAAQ,CAAC,GAAG,EAAE,CAAC,UAAU,aAAV,UAAU,uBAAV,UAAU,CAAE,aAAa,CAAC,KAAK,CAAC,CAAC,CAAC;IAEzF,KAAK,CAAC,SAAS,CAAC,GAAG,EAAE;QACnB,MAAM,QAAQ,GAAG,CAAC,IAA6C,EAAE,EAAE;YACjE,uBAAuB;YACvB,IAAI,IAAI,CAAC,aAAa,KAAK,UAAU,IAAI,CAAC,UAAU,IAAI,UAAU,CAAC,cAAc,IAAI,UAAU,CAAC,oBAAoB;gBAClH,OAAO;YACT,YAAY,CAAC,UAAU,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC,CAAC;QAChD,CAAC,CAAC;QACF,OAAO,qCAAiB,CAAC,qCAAqC,CAAC,WAAW,CAAC,QAAQ,CAAC,CAAC;IACvF,CAAC,EAAE,CAAC,UAAU,EAAE,KAAK,CAAC,CAAC,CAAC;IAExB,KAAK,CAAC,SAAS,CAAC,GAAG,EAAE;QACnB,uBAAuB;QACvB,MAAM,gBAAgB,GAAG,GAAG,EAAE;YAC5B,YAAY,CAAC,UAAU,aAAV,UAAU,uBAAV,UAAU,CAAE,aAAa,CAAC,KAAK,CAAC,CAAC,CAAC;QACjD,CAAC,CAAC;QAEF,OAAO,+BAAc,CAAC,2BAA2B,CAAC,WAAW,CAAC,gBAAgB,CAAC,CAAC;IAClF,CAAC,EAAE,CAAC,UAAU,EAAE,KAAK,CAAC,CAAC,CAAC;IAExB,OAAO,SAAS,CAAC;AACnB,CAAC;AAzBD,oCAyBC","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 Widget\r\n */\r\nimport * as React from \"react\";\r\nimport { UiItemsManager } from \"@itwin/appui-abstract\";\r\nimport { ScrollableWidgetContent, TabIdContext } from \"@itwin/appui-layout-react\";\r\nimport { useActiveFrontstageDef } from \"../frontstage/Frontstage\";\r\nimport { WidgetDef } from \"../widgets/WidgetDef\";\r\nimport { FrontstageManager } from \"../frontstage/FrontstageManager\";\r\nimport { FrontstageNineZoneStateChangedEventArgs } from \"../frontstage/FrontstageDef\";\r\nimport { useTransientState } from \"./useTransientState\";\r\n\r\n/** @internal */\r\nexport function WidgetContent() {\r\n const widget = useWidgetDef();\r\n // istanbul ignore next\r\n const itemId = widget?.id ?? widget?.label ?? \"unknown\";\r\n const onSave = React.useCallback(() => {\r\n // istanbul ignore next\r\n widget?.saveTransientState();\r\n }, [widget]);\r\n const onRestore = React.useCallback(() => {\r\n // istanbul ignore next\r\n widget?.restoreTransientState();\r\n }, [widget]);\r\n useTransientState(onSave, onRestore);\r\n return (\r\n <ScrollableWidgetContent\r\n itemId={itemId}\r\n providerId={widget?.initialProps?.providerId}\r\n >\r\n {widget?.reactNode}\r\n </ScrollableWidgetContent>\r\n );\r\n}\r\n\r\n/** @internal */\r\nexport function useWidgetDef(): WidgetDef | undefined {\r\n const tabId = React.useContext(TabIdContext);\r\n const frontstage = useActiveFrontstageDef();\r\n const [widgetDef, setWidgetDef] = React.useState(() => frontstage?.findWidgetDef(tabId));\r\n\r\n React.useEffect(() => {\r\n const listener = (args: FrontstageNineZoneStateChangedEventArgs) => {\r\n // istanbul ignore next\r\n if (args.frontstageDef !== frontstage || !frontstage || frontstage.isStageClosing || frontstage.isApplicationClosing)\r\n return;\r\n setWidgetDef(frontstage.findWidgetDef(tabId));\r\n };\r\n return FrontstageManager.onFrontstageNineZoneStateChangedEvent.addListener(listener);\r\n }, [frontstage, tabId]);\r\n\r\n React.useEffect(() => {\r\n // istanbul ignore next\r\n const handlerActivated = () => {\r\n setWidgetDef(frontstage?.findWidgetDef(tabId));\r\n };\r\n\r\n return UiItemsManager.onUiProviderRegisteredEvent.addListener(handlerActivated);\r\n }, [frontstage, tabId]);\r\n\r\n return widgetDef;\r\n}\r\n"]}
|
|
@@ -114,6 +114,7 @@ export declare const setWidgetState: (base: {
|
|
|
114
114
|
readonly side: PanelSide;
|
|
115
115
|
};
|
|
116
116
|
readonly userSized?: boolean | undefined;
|
|
117
|
+
readonly hidden?: boolean | undefined;
|
|
117
118
|
};
|
|
118
119
|
};
|
|
119
120
|
readonly allIds: readonly string[];
|
|
@@ -235,6 +236,7 @@ export declare const setWidgetState: (base: {
|
|
|
235
236
|
readonly canPopout?: boolean | undefined;
|
|
236
237
|
readonly userSized?: boolean | undefined;
|
|
237
238
|
readonly isFloatingStateWindowResizable?: boolean | undefined;
|
|
239
|
+
readonly hideWithUiWhenFloating?: boolean | undefined;
|
|
238
240
|
};
|
|
239
241
|
};
|
|
240
242
|
readonly toolSettings: {
|
|
@@ -286,6 +288,7 @@ export declare const showWidget: (base: {
|
|
|
286
288
|
readonly side: PanelSide;
|
|
287
289
|
};
|
|
288
290
|
readonly userSized?: boolean | undefined;
|
|
291
|
+
readonly hidden?: boolean | undefined;
|
|
289
292
|
};
|
|
290
293
|
};
|
|
291
294
|
readonly allIds: readonly string[];
|
|
@@ -407,6 +410,7 @@ export declare const showWidget: (base: {
|
|
|
407
410
|
readonly canPopout?: boolean | undefined;
|
|
408
411
|
readonly userSized?: boolean | undefined;
|
|
409
412
|
readonly isFloatingStateWindowResizable?: boolean | undefined;
|
|
413
|
+
readonly hideWithUiWhenFloating?: boolean | undefined;
|
|
410
414
|
};
|
|
411
415
|
};
|
|
412
416
|
readonly toolSettings: {
|
|
@@ -458,6 +462,7 @@ export declare const expandWidget: (base: {
|
|
|
458
462
|
readonly side: PanelSide;
|
|
459
463
|
};
|
|
460
464
|
readonly userSized?: boolean | undefined;
|
|
465
|
+
readonly hidden?: boolean | undefined;
|
|
461
466
|
};
|
|
462
467
|
};
|
|
463
468
|
readonly allIds: readonly string[];
|
|
@@ -579,6 +584,7 @@ export declare const expandWidget: (base: {
|
|
|
579
584
|
readonly canPopout?: boolean | undefined;
|
|
580
585
|
readonly userSized?: boolean | undefined;
|
|
581
586
|
readonly isFloatingStateWindowResizable?: boolean | undefined;
|
|
587
|
+
readonly hideWithUiWhenFloating?: boolean | undefined;
|
|
582
588
|
};
|
|
583
589
|
};
|
|
584
590
|
readonly toolSettings: {
|
|
@@ -630,6 +636,7 @@ export declare const setWidgetLabel: (base: {
|
|
|
630
636
|
readonly side: PanelSide;
|
|
631
637
|
};
|
|
632
638
|
readonly userSized?: boolean | undefined;
|
|
639
|
+
readonly hidden?: boolean | undefined;
|
|
633
640
|
};
|
|
634
641
|
};
|
|
635
642
|
readonly allIds: readonly string[];
|
|
@@ -751,6 +758,7 @@ export declare const setWidgetLabel: (base: {
|
|
|
751
758
|
readonly canPopout?: boolean | undefined;
|
|
752
759
|
readonly userSized?: boolean | undefined;
|
|
753
760
|
readonly isFloatingStateWindowResizable?: boolean | undefined;
|
|
761
|
+
readonly hideWithUiWhenFloating?: boolean | undefined;
|
|
754
762
|
};
|
|
755
763
|
};
|
|
756
764
|
readonly toolSettings: {
|
|
@@ -781,7 +789,7 @@ export declare const FRONTSTAGE_SETTINGS_NAMESPACE = "uifw-frontstageSettings";
|
|
|
781
789
|
/** @internal */
|
|
782
790
|
export declare function getFrontstageStateSettingName(frontstageId: WidgetPanelsFrontstageState["id"]): string;
|
|
783
791
|
/** @internal */
|
|
784
|
-
export declare function useFrontstageManager(frontstageDef: FrontstageDef): void;
|
|
792
|
+
export declare function useFrontstageManager(frontstageDef: FrontstageDef, useToolAsToolSettingsLabel?: boolean): void;
|
|
785
793
|
/** @internal */
|
|
786
794
|
export declare function useItemsManager(frontstageDef: FrontstageDef): void;
|
|
787
795
|
/** @internal */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Frontstage.d.ts","sourceRoot":"","sources":["../../../../src/appui-react/widget-panels/Frontstage.tsx"],"names":[],"mappings":"AAMA;;GAEG;AAIH,OAAO,mBAAmB,CAAC;AAE3B,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAAsC,WAAW,EAAE,MAAM,uBAAuB,CAAC;AACxF,OAAO,EAAmB,oBAAoB,EAAE,oBAAoB,EAAE,MAAM,mBAAmB,CAAC;AAEhG,OAAO,
|
|
1
|
+
{"version":3,"file":"Frontstage.d.ts","sourceRoot":"","sources":["../../../../src/appui-react/widget-panels/Frontstage.tsx"],"names":[],"mappings":"AAMA;;GAEG;AAIH,OAAO,mBAAmB,CAAC;AAE3B,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAAsC,WAAW,EAAE,MAAM,uBAAuB,CAAC;AACxF,OAAO,EAAmB,oBAAoB,EAAE,oBAAoB,EAAE,MAAM,mBAAmB,CAAC;AAEhG,OAAO,EAGmE,gBAAgB,EAAE,cAAc,EAAE,aAAa,EACjG,SAAS,EAAyB,QAAQ,EACjE,MAAM,2BAA2B,CAAC;AAEnC,OAAO,EAAE,aAAa,EAAgE,MAAM,6BAA6B,CAAC;AAG1H,OAAO,EAAE,eAAe,EAAE,qBAAqB,EAAE,MAAM,8BAA8B,CAAC;AAGtF,OAAO,EAAE,SAAS,EAAgD,MAAM,sBAAsB,CAAC;AAC/F,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAoD7C,gBAAgB;AAChB,wBAAgB,gBAAgB,CAAC,aAAa,EAAE,aAAa,6BAgB5D;AAcD;;GAEG;AACH,wBAAgB,qBAAqB,CAAC,aAAa,EAAE,aAAa,QAejE;AAsBD,gBAAgB;AAChB,wBAAgB,mBAAmB,CAAC,aAAa,EAAE,aAAa,oBA8B/D;AAED,gBAAgB;AAChB,eAAO,MAAM,sBAAsB,oCAqBjC,CAAC;AAKH,gBAAgB;AAChB,wBAAgB,2B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Aa,EAAE,aAAa,EAAE,0BAA0B,CAAC,EAAE,OAAO,QA0FtG;AAED,gBAAgB;AAEhB,wBAAgB,eAAe,CAAC,aAAa,EAAE,aAAa,QAsB3D;AAkBD,gBAAgB;AAChB,wBAAsB,yCAAyC,CAAC,KAAK,EAAE,aAAa,EAAE,OAAO,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,EAAE,aAAa,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,0BA4BtK"}
|
|
@@ -34,6 +34,7 @@ const ToolSettings_1 = require("./ToolSettings");
|
|
|
34
34
|
const useEscapeSetFocusToHome_1 = require("../hooks/useEscapeSetFocusToHome");
|
|
35
35
|
const react_redux_1 = require("react-redux");
|
|
36
36
|
const useUiVisibility_1 = require("../hooks/useUiVisibility");
|
|
37
|
+
const core_frontend_1 = require("@itwin/core-frontend");
|
|
37
38
|
const panelZoneKeys = ["start", "end"];
|
|
38
39
|
const WidgetInternals = React.memo(function WidgetInternals() {
|
|
39
40
|
const activeModalFrontstageInfo = (0, ModalFrontstageComposer_1.useActiveModalFrontstageInfo)();
|
|
@@ -184,7 +185,6 @@ function ActiveFrontstageDefProvider({ frontstageDef }) {
|
|
|
184
185
|
useUpdateNineZoneSize(frontstageDef);
|
|
185
186
|
useSavedFrontstageState(frontstageDef);
|
|
186
187
|
useSaveFrontstageSettings(frontstageDef);
|
|
187
|
-
useFrontstageManager(frontstageDef);
|
|
188
188
|
useItemsManager(frontstageDef);
|
|
189
189
|
const labels = useLabels();
|
|
190
190
|
const uiIsVisible = (0, useUiVisibility_1.useUiVisibility)();
|
|
@@ -200,6 +200,11 @@ function ActiveFrontstageDefProvider({ frontstageDef }) {
|
|
|
200
200
|
const frameworkState = state[UiFramework_1.UiFramework.frameworkStateKey];
|
|
201
201
|
return !!frameworkState.configurableUiState.animateToolSettings;
|
|
202
202
|
});
|
|
203
|
+
const useToolAsToolSettingsLabel = (0, react_redux_1.useSelector)((state) => {
|
|
204
|
+
const frameworkState = state[UiFramework_1.UiFramework.frameworkStateKey];
|
|
205
|
+
return !!frameworkState.configurableUiState.useToolAsToolSettingsLabel;
|
|
206
|
+
});
|
|
207
|
+
useFrontstageManager(frontstageDef, useToolAsToolSettingsLabel);
|
|
203
208
|
const handleKeyDown = (0, useEscapeSetFocusToHome_1.useEscapeSetFocusToHome)();
|
|
204
209
|
return (React.createElement("div", { className: "uifw-widgetPanels-frontstage", onKeyDown: handleKeyDown, role: "presentation" },
|
|
205
210
|
React.createElement(appui_layout_react_1.NineZone, { dispatch: dispatch, labels: labels, state: nineZone, tab: tabElement, showWidgetIcon: showWidgetIcon, autoCollapseUnpinnedPanels: autoCollapseUnpinnedPanels, toolSettingsContent: toolSettingsContent, widgetContent: widgetContent, animateDockedToolSettings: animateToolSettings, uiIsVisible: uiIsVisible }, widgetPanelsFrontstage)));
|
|
@@ -235,6 +240,7 @@ function addWidgets(state, widgets, side, widgetId) {
|
|
|
235
240
|
preferredFloatingWidgetSize: widget.defaultFloatingSize,
|
|
236
241
|
canPopout: widget.canPopout,
|
|
237
242
|
isFloatingStateWindowResizable: widget.isFloatingStateWindowResizable,
|
|
243
|
+
hideWithUiWhenFloating: !!widget.hideWithUiWhenFloating,
|
|
238
244
|
});
|
|
239
245
|
tabs.push(widget.id);
|
|
240
246
|
}
|
|
@@ -275,6 +281,7 @@ function appendWidgets(state, widgetDefs, side, preferredWidgetIndex) {
|
|
|
275
281
|
preferredPopoutWidgetSize,
|
|
276
282
|
userSized,
|
|
277
283
|
isFloatingStateWindowResizable: widgetDef.isFloatingStateWindowResizable,
|
|
284
|
+
hideWithUiWhenFloating: !!widgetDef.hideWithUiWhenFloating,
|
|
278
285
|
});
|
|
279
286
|
if (widgetDef.isFloatingStateSupported && widgetDef.defaultState === appui_abstract_1.WidgetState.Floating) {
|
|
280
287
|
const floatingContainerId = (_a = widgetDef.floatingContainerId) !== null && _a !== void 0 ? _a : (0, appui_layout_react_1.getUniqueId)();
|
|
@@ -667,6 +674,20 @@ function restoreNineZoneState(frontstageDef, saved) {
|
|
|
667
674
|
return restored;
|
|
668
675
|
}
|
|
669
676
|
exports.restoreNineZoneState = restoreNineZoneState;
|
|
677
|
+
/**
|
|
678
|
+
* Checks to see whether a widget id is one of our generated uuids
|
|
679
|
+
* @param uuid the string value to test
|
|
680
|
+
* @returns boolean
|
|
681
|
+
*/
|
|
682
|
+
function isUUID(uuid) {
|
|
683
|
+
const s = `${uuid}`;
|
|
684
|
+
const result = s.match("^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$");
|
|
685
|
+
// istanbul ignore else
|
|
686
|
+
if (result === null) {
|
|
687
|
+
return false;
|
|
688
|
+
}
|
|
689
|
+
return true;
|
|
690
|
+
}
|
|
670
691
|
/** Prepares NineZoneState to be saved.
|
|
671
692
|
* @note Removes toolSettings tab.
|
|
672
693
|
* @note Removes tab labels and iconSpec.
|
|
@@ -681,6 +702,9 @@ function packNineZoneState(state) {
|
|
|
681
702
|
for (const [, tab] of Object.entries(state.tabs)) {
|
|
682
703
|
if (tab.id === appui_layout_react_1.toolSettingsTabId)
|
|
683
704
|
continue;
|
|
705
|
+
// istanbul ignore else
|
|
706
|
+
if (isUUID(tab.id))
|
|
707
|
+
continue;
|
|
684
708
|
draft.tabs[tab.id] = {
|
|
685
709
|
id: tab.id,
|
|
686
710
|
preferredFloatingWidgetSize: tab.preferredFloatingWidgetSize,
|
|
@@ -690,6 +714,18 @@ function packNineZoneState(state) {
|
|
|
690
714
|
};
|
|
691
715
|
}
|
|
692
716
|
});
|
|
717
|
+
packed = (0, immer_1.default)(packed, (draft) => {
|
|
718
|
+
for (const [, floatingWidget] of Object.entries(state.floatingWidgets.byId)) {
|
|
719
|
+
const widgetId = floatingWidget.id;
|
|
720
|
+
// istanbul ignore else
|
|
721
|
+
if (isUUID(widgetId)) {
|
|
722
|
+
const idIndex = draft.floatingWidgets.allIds.indexOf(widgetId);
|
|
723
|
+
draft.floatingWidgets.allIds.splice(idIndex, 1);
|
|
724
|
+
delete draft.floatingWidgets.byId[widgetId];
|
|
725
|
+
delete draft.widgets[widgetId];
|
|
726
|
+
}
|
|
727
|
+
}
|
|
728
|
+
});
|
|
693
729
|
return packed;
|
|
694
730
|
}
|
|
695
731
|
exports.packNineZoneState = packNineZoneState;
|
|
@@ -701,12 +737,14 @@ function isPanelCollapsed(zoneStates, panelStates) {
|
|
|
701
737
|
}
|
|
702
738
|
exports.isPanelCollapsed = isPanelCollapsed;
|
|
703
739
|
function addRemovedTab(nineZone, widgetDef) {
|
|
740
|
+
var _a, _b;
|
|
704
741
|
const newTab = (0, appui_layout_react_1.createTabState)(widgetDef.id, {
|
|
705
742
|
label: getWidgetLabel(widgetDef.label),
|
|
706
743
|
canPopout: widgetDef.canPopout,
|
|
707
744
|
iconSpec: widgetDef.iconSpec,
|
|
708
745
|
preferredPanelWidgetSize: widgetDef.preferredPanelSize,
|
|
709
746
|
isFloatingStateWindowResizable: widgetDef.isFloatingStateWindowResizable,
|
|
747
|
+
hideWithUiWhenFloating: !!widgetDef.hideWithUiWhenFloating,
|
|
710
748
|
});
|
|
711
749
|
nineZone.tabs[newTab.id] = newTab;
|
|
712
750
|
if (widgetDef.tabLocation.widgetId in nineZone.widgets) {
|
|
@@ -715,6 +753,18 @@ function addRemovedTab(nineZone, widgetDef) {
|
|
|
715
753
|
const newTabWidget = nineZone.widgets[widgetId];
|
|
716
754
|
newTabWidget.tabs.splice(widgetDef.tabLocation.tabIndex, 0, newTab.id);
|
|
717
755
|
}
|
|
756
|
+
else if (widgetDef.tabLocation.floating) {
|
|
757
|
+
const id = widgetDef.tabLocation.widgetId;
|
|
758
|
+
if (id in nineZone.floatingWidgets.byId) {
|
|
759
|
+
nineZone.floatingWidgets.allIds.push(id);
|
|
760
|
+
nineZone.floatingWidgets.byId[id].hidden = false;
|
|
761
|
+
(0, appui_layout_react_1.addWidgetTabToDraftFloatingPanel)(nineZone, (_a = widgetDef.floatingContainerId) !== null && _a !== void 0 ? _a : widgetDef.id, widgetDef.id, nineZone.floatingWidgets.byId[id].home, newTab);
|
|
762
|
+
}
|
|
763
|
+
else {
|
|
764
|
+
const home = { side: widgetDef.tabLocation.side, widgetId: widgetDef.floatingContainerId, widgetIndex: 0 };
|
|
765
|
+
(0, appui_layout_react_1.addWidgetTabToDraftFloatingPanel)(nineZone, (_b = widgetDef.floatingContainerId) !== null && _b !== void 0 ? _b : widgetDef.id, widgetDef.id, home, newTab);
|
|
766
|
+
}
|
|
767
|
+
}
|
|
718
768
|
else {
|
|
719
769
|
const newTabPanel = nineZone.panels[widgetDef.tabLocation.side];
|
|
720
770
|
if (newTabPanel.maxWidgetCount === newTabPanel.widgets.length) {
|
|
@@ -734,7 +784,7 @@ function addRemovedTab(nineZone, widgetDef) {
|
|
|
734
784
|
}
|
|
735
785
|
/** @internal */
|
|
736
786
|
exports.setWidgetState = (0, immer_1.default)((nineZone, widgetDef, state) => {
|
|
737
|
-
var _a;
|
|
787
|
+
var _a, _b;
|
|
738
788
|
if (state === appui_abstract_1.WidgetState.Open) {
|
|
739
789
|
const id = widgetDef.id;
|
|
740
790
|
let location = (0, appui_layout_react_1.findTab)(nineZone, id);
|
|
@@ -743,6 +793,9 @@ exports.setWidgetState = (0, immer_1.default)((nineZone, widgetDef, state) => {
|
|
|
743
793
|
location = (0, appui_layout_react_1.findTab)(nineZone, id);
|
|
744
794
|
(0, core_bentley_1.assert)(!!location);
|
|
745
795
|
}
|
|
796
|
+
if (!!widgetDef.tabLocation.floating) {
|
|
797
|
+
nineZone.floatingWidgets.byId[(_a = widgetDef.floatingContainerId) !== null && _a !== void 0 ? _a : widgetDef.id].hidden = false;
|
|
798
|
+
}
|
|
746
799
|
const widget = nineZone.widgets[location.widgetId];
|
|
747
800
|
widget.minimized = false;
|
|
748
801
|
widget.activeTabId = id;
|
|
@@ -753,7 +806,7 @@ exports.setWidgetState = (0, immer_1.default)((nineZone, widgetDef, state) => {
|
|
|
753
806
|
panel.collapsed && (panel.collapsed = false);
|
|
754
807
|
// istanbul ignore next
|
|
755
808
|
if (undefined === panel.size || 0 === panel.size) {
|
|
756
|
-
panel.size = (
|
|
809
|
+
panel.size = (_b = panel.minSize) !== null && _b !== void 0 ? _b : 200;
|
|
757
810
|
}
|
|
758
811
|
}
|
|
759
812
|
}
|
|
@@ -781,16 +834,31 @@ function hideWidget(state, widgetDef) {
|
|
|
781
834
|
const location = (0, appui_layout_react_1.findTab)(state, widgetDef.id);
|
|
782
835
|
if (!location)
|
|
783
836
|
return;
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
837
|
+
if ((0, appui_layout_react_1.isFloatingLocation)(location)) {
|
|
838
|
+
const widget = state.floatingWidgets.byId[location.widgetId];
|
|
839
|
+
widgetDef.setFloatingContainerId(location.floatingWidgetId);
|
|
840
|
+
widgetDef.tabLocation = {
|
|
841
|
+
side: widget.home.side,
|
|
842
|
+
tabIndex: widget.home.widgetIndex,
|
|
843
|
+
widgetId: widgetDef.id,
|
|
844
|
+
widgetIndex: widget.home.widgetIndex,
|
|
845
|
+
floating: true,
|
|
846
|
+
};
|
|
847
|
+
}
|
|
848
|
+
else
|
|
849
|
+
// istanbul ignore else
|
|
850
|
+
if (!(0, appui_layout_react_1.isPopoutLocation)(location)) {
|
|
851
|
+
const widgetId = location.widgetId;
|
|
852
|
+
const side = "side" in location ? location.side : "left";
|
|
853
|
+
const widgetIndex = "side" in location ? state.panels[side].widgets.indexOf(widgetId) : 0;
|
|
854
|
+
const tabIndex = state.widgets[location.widgetId].tabs.indexOf(widgetDef.id);
|
|
855
|
+
widgetDef.tabLocation = {
|
|
856
|
+
side,
|
|
857
|
+
tabIndex,
|
|
858
|
+
widgetId,
|
|
859
|
+
widgetIndex,
|
|
860
|
+
};
|
|
861
|
+
}
|
|
794
862
|
(0, appui_layout_react_1.removeTab)(state, widgetDef.id);
|
|
795
863
|
}
|
|
796
864
|
/** @internal */
|
|
@@ -931,7 +999,7 @@ const createListener = (frontstageDef, listener) => {
|
|
|
931
999
|
};
|
|
932
1000
|
};
|
|
933
1001
|
/** @internal */
|
|
934
|
-
function useFrontstageManager(frontstageDef) {
|
|
1002
|
+
function useFrontstageManager(frontstageDef, useToolAsToolSettingsLabel) {
|
|
935
1003
|
React.useEffect(() => {
|
|
936
1004
|
const listener = createListener(frontstageDef, ({ widgetDef, widgetState }) => {
|
|
937
1005
|
(0, core_bentley_1.assert)(!!frontstageDef.nineZoneState);
|
|
@@ -992,6 +1060,34 @@ function useFrontstageManager(frontstageDef) {
|
|
|
992
1060
|
FrontstageManager_1.FrontstageManager.onWidgetLabelChangedEvent.removeListener(listener);
|
|
993
1061
|
};
|
|
994
1062
|
}, [frontstageDef]);
|
|
1063
|
+
const defaultLabel = React.useMemo(() => UiFramework_1.UiFramework.translate("widget.labels.toolSettings"), []);
|
|
1064
|
+
React.useEffect(() => {
|
|
1065
|
+
const updateLabel = createListener(frontstageDef, () => {
|
|
1066
|
+
var _a;
|
|
1067
|
+
const toolId = FrontstageManager_1.FrontstageManager.activeToolId;
|
|
1068
|
+
(0, core_bentley_1.assert)(!!frontstageDef.nineZoneState);
|
|
1069
|
+
const label = useToolAsToolSettingsLabel ?
|
|
1070
|
+
((_a = core_frontend_1.IModelApp.tools.find(toolId)) === null || _a === void 0 ? void 0 : _a.flyover) || defaultLabel : defaultLabel;
|
|
1071
|
+
frontstageDef.nineZoneState = (0, exports.setWidgetLabel)(frontstageDef.nineZoneState, appui_layout_react_1.toolSettingsTabId, label);
|
|
1072
|
+
});
|
|
1073
|
+
// Whenever the frontstageDef or the useTool... changes, keep the label up to date.
|
|
1074
|
+
updateLabel();
|
|
1075
|
+
// If useTool... is true, listen for events to keep up the label up to date.
|
|
1076
|
+
if (useToolAsToolSettingsLabel) {
|
|
1077
|
+
FrontstageManager_1.FrontstageManager.onFrontstageReadyEvent.addListener(updateLabel);
|
|
1078
|
+
FrontstageManager_1.FrontstageManager.onFrontstageRestoreLayoutEvent.addListener(updateLabel);
|
|
1079
|
+
FrontstageManager_1.FrontstageManager.onToolActivatedEvent.addListener(updateLabel);
|
|
1080
|
+
FrontstageManager_1.FrontstageManager.onToolSettingsReloadEvent.addListener(updateLabel);
|
|
1081
|
+
}
|
|
1082
|
+
return () => {
|
|
1083
|
+
if (useToolAsToolSettingsLabel) {
|
|
1084
|
+
FrontstageManager_1.FrontstageManager.onFrontstageReadyEvent.removeListener(updateLabel);
|
|
1085
|
+
FrontstageManager_1.FrontstageManager.onFrontstageRestoreLayoutEvent.removeListener(updateLabel);
|
|
1086
|
+
FrontstageManager_1.FrontstageManager.onToolActivatedEvent.removeListener(updateLabel);
|
|
1087
|
+
FrontstageManager_1.FrontstageManager.onToolSettingsReloadEvent.removeListener(updateLabel);
|
|
1088
|
+
}
|
|
1089
|
+
};
|
|
1090
|
+
}, [frontstageDef, useToolAsToolSettingsLabel, defaultLabel]);
|
|
995
1091
|
}
|
|
996
1092
|
exports.useFrontstageManager = useFrontstageManager;
|
|
997
1093
|
/** @internal */
|