@itwin/appui-react 3.0.0-dev.170 → 3.0.0-dev.175
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/LICENSE.md +1 -1
- package/lib/cjs/appui-react/UiFramework.d.ts +2 -0
- package/lib/cjs/appui-react/UiFramework.d.ts.map +1 -1
- package/lib/cjs/appui-react/UiFramework.js +8 -0
- package/lib/cjs/appui-react/UiFramework.js.map +1 -1
- package/lib/cjs/appui-react/configurableui/state.d.ts +3 -0
- package/lib/cjs/appui-react/configurableui/state.d.ts.map +1 -1
- package/lib/cjs/appui-react/configurableui/state.js +7 -2
- 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 +26 -17
- package/lib/cjs/appui-react/settings/ui/UiSettingsPage.js.map +1 -1
- package/lib/cjs/appui-react/stagepanels/StagePanelDef.d.ts +24 -0
- package/lib/cjs/appui-react/stagepanels/StagePanelDef.d.ts.map +1 -1
- package/lib/cjs/appui-react/statusfields/Indicator.js +1 -1
- package/lib/cjs/appui-react/statusfields/Indicator.js.map +1 -1
- package/lib/cjs/appui-react/statusfields/Indicator.scss +0 -9
- package/lib/cjs/appui-react/ui-items-provider/StandardContentToolsProvider.d.ts +6 -10
- package/lib/cjs/appui-react/ui-items-provider/StandardContentToolsProvider.d.ts.map +1 -1
- package/lib/cjs/appui-react/ui-items-provider/StandardContentToolsProvider.js +14 -35
- package/lib/cjs/appui-react/ui-items-provider/StandardContentToolsProvider.js.map +1 -1
- package/lib/cjs/appui-react/ui-items-provider/StandardNavigationToolsProvider.d.ts +5 -9
- package/lib/cjs/appui-react/ui-items-provider/StandardNavigationToolsProvider.d.ts.map +1 -1
- package/lib/cjs/appui-react/ui-items-provider/StandardNavigationToolsProvider.js +9 -19
- package/lib/cjs/appui-react/ui-items-provider/StandardNavigationToolsProvider.js.map +1 -1
- package/lib/cjs/appui-react/ui-items-provider/StandardStatusbarItemsProvider.d.ts +5 -9
- package/lib/cjs/appui-react/ui-items-provider/StandardStatusbarItemsProvider.d.ts.map +1 -1
- package/lib/cjs/appui-react/ui-items-provider/StandardStatusbarItemsProvider.js +36 -49
- package/lib/cjs/appui-react/ui-items-provider/StandardStatusbarItemsProvider.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 +94 -2
- package/lib/cjs/appui-react/widget-panels/Frontstage.d.ts.map +1 -1
- package/lib/cjs/appui-react/widget-panels/Frontstage.js +10 -2
- package/lib/cjs/appui-react/widget-panels/Frontstage.js.map +1 -1
- package/lib/cjs/appui-react/widgets/ViewToolWidgetComposer.d.ts +0 -1
- package/lib/cjs/appui-react/widgets/ViewToolWidgetComposer.d.ts.map +1 -1
- package/lib/cjs/appui-react/widgets/ViewToolWidgetComposer.js +0 -1
- package/lib/cjs/appui-react/widgets/ViewToolWidgetComposer.js.map +1 -1
- package/lib/esm/appui-react/UiFramework.d.ts +2 -0
- package/lib/esm/appui-react/UiFramework.d.ts.map +1 -1
- package/lib/esm/appui-react/UiFramework.js +8 -0
- package/lib/esm/appui-react/UiFramework.js.map +1 -1
- package/lib/esm/appui-react/configurableui/state.d.ts +3 -0
- package/lib/esm/appui-react/configurableui/state.d.ts.map +1 -1
- package/lib/esm/appui-react/configurableui/state.js +7 -2
- 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 +26 -17
- package/lib/esm/appui-react/settings/ui/UiSettingsPage.js.map +1 -1
- package/lib/esm/appui-react/stagepanels/StagePanelDef.d.ts +24 -0
- package/lib/esm/appui-react/stagepanels/StagePanelDef.d.ts.map +1 -1
- package/lib/esm/appui-react/statusfields/Indicator.js +1 -1
- package/lib/esm/appui-react/statusfields/Indicator.js.map +1 -1
- package/lib/esm/appui-react/statusfields/Indicator.scss +0 -9
- package/lib/esm/appui-react/ui-items-provider/StandardContentToolsProvider.d.ts +6 -10
- package/lib/esm/appui-react/ui-items-provider/StandardContentToolsProvider.d.ts.map +1 -1
- package/lib/esm/appui-react/ui-items-provider/StandardContentToolsProvider.js +15 -36
- package/lib/esm/appui-react/ui-items-provider/StandardContentToolsProvider.js.map +1 -1
- package/lib/esm/appui-react/ui-items-provider/StandardNavigationToolsProvider.d.ts +5 -9
- package/lib/esm/appui-react/ui-items-provider/StandardNavigationToolsProvider.d.ts.map +1 -1
- package/lib/esm/appui-react/ui-items-provider/StandardNavigationToolsProvider.js +10 -20
- package/lib/esm/appui-react/ui-items-provider/StandardNavigationToolsProvider.js.map +1 -1
- package/lib/esm/appui-react/ui-items-provider/StandardStatusbarItemsProvider.d.ts +5 -9
- package/lib/esm/appui-react/ui-items-provider/StandardStatusbarItemsProvider.d.ts.map +1 -1
- package/lib/esm/appui-react/ui-items-provider/StandardStatusbarItemsProvider.js +37 -50
- package/lib/esm/appui-react/ui-items-provider/StandardStatusbarItemsProvider.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 +94 -2
- package/lib/esm/appui-react/widget-panels/Frontstage.d.ts.map +1 -1
- package/lib/esm/appui-react/widget-panels/Frontstage.js +10 -2
- package/lib/esm/appui-react/widget-panels/Frontstage.js.map +1 -1
- package/lib/esm/appui-react/widgets/ViewToolWidgetComposer.d.ts +0 -1
- package/lib/esm/appui-react/widgets/ViewToolWidgetComposer.d.ts.map +1 -1
- package/lib/esm/appui-react/widgets/ViewToolWidgetComposer.js +0 -1
- package/lib/esm/appui-react/widgets/ViewToolWidgetComposer.js.map +1 -1
- package/lib/public/locales/en/UiFramework.json +3 -1
- package/package.json +34 -34
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"StandardStatusbarItemsProvider.js","sourceRoot":"","sources":["../../../../src/appui-react/ui-items-provider/StandardStatusbarItemsProvider.tsx"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAuB,UAAU,EAAE,gBAAgB,EAAE,cAAc,EAAmB,MAAM,uBAAuB,CAAC;AAC3H,OAAO,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAC;AAC5D,OAAO,EAAE,sBAAsB,EAAE,MAAM,qCAAqC,CAAC;AAC7E,OAAO,EAAE,mBAAmB,EAAE,MAAM,oDAAoD,CAAC;AACzF,OAAO,EAAE,oBAAoB,EAAE,MAAM,mCAAmC,CAAC;AACzE,OAAO,EAAE,kBAAkB,EAAE,MAAM,+BAA+B,CAAC;AACnE,OAAO,EAAE,2BAA2B,EAAE,MAAM,0CAA0C,CAAC;AACvF,OAAO,EAAE,mBAAmB,EAAE,MAAM,gCAAgC,CAAC;AACrE,OAAO,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAC;AACzD,OAAO,EAAE,kBAAkB,EAAE,MAAM,+BAA+B,CAAC;AACnE,OAAO,EAAE,oBAAoB,EAAE,MAAM,kDAAkD,CAAC;AACxF,OAAO,EAAE,mBAAmB,EAAE,MAAM,gCAAgC,CAAC;AAmBrE;;;GAGG;AACH,MAAM,OAAO,8BAA8B;IACzC,YAAoB,WAAmB,EAAU,aAAqC,EAAU,i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QAAQ,OAAG,CAAC,CAAC,CAAC;aAC7H;YAED,IAAI,CAAC,IAAI,CAAC,aAAa,IAAI,IAAI,CAAC,aAAa,CAAC,iBAAiB,EAAE;gBAC/D,MAAM,iBAAiB,GAAG,oBAAoB,CAAC,oBAAoB,CAAC,CAAC;gBACrE,cAAc,CAAC,IAAI,CAAC,sBAAsB,CAAC,mBAAmB,CAAC,wBAAwB,EAAE,gBAAgB,CAAC,KAAK,EAAE,EAAE,EAAE,oBAAC,iBAAiB,OAAG,CAAC,CAAC,CAAC;aAC9I;YAED,IAAI,CAAC,IAAI,CAAC,aAAa,IAAI,IAAI,CAAC,aAAa,CAAC,cAAc,EAAE;gBAC5D,MAAM,cAAc,GAAG,oBAAoB,CAAC,mBAAmB,CAAC,CAAC;gBACjE,cAAc,CAAC,IAAI,CAAC,sBAAsB,CAAC,mBAAmB,CAAC,qBAAqB,EAAE,gBAAgB,CAAC,KAAK,EAAE,EAAE,EAAE,oBAAC,cAAc,OAAG,CAAC,CAAC,CAAC;aACxI;YAED,IAAI,CAAC,IAAI,CAAC,aAAa,IAAI,IAAI,CAAC,aAAa,CAAC,aAAa,EAAE;gBAC3D,MAAM,aAAa,GAAG,oBAAoB,CAAC,kBAAkB,CAAC,CAAC;gBAC/D,cAAc,CAAC,IAAI,CAAC,sBAAsB,CAAC,mBAAmB,CAAC,oBAAoB,EAAE,gBAAgB,CAAC,KAAK,EAAE,EAAE,EAAE,oBAAC,aAAa,OAAG,CAAC,CAAC,CAAC;aACtI;SACF;QAED,OAAO,cAAc,CAAC;IACxB,CAAC;CACF","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 StandardUiItemsProvider\r\n */\r\n\r\nimport * as React from \"react\";\r\nimport { CommonStatusBarItem, StageUsage, StatusBarSection, UiItemsManager, UiItemsProvider } from \"@itwin/appui-abstract\";\r\nimport { FooterSeparator } from \"@itwin/appui-layout-react\";\r\nimport { StatusBarItemUtilities } from \"../statusbar/StatusBarItemUtilities\";\r\nimport { ToolAssistanceField } from \"../statusfields/toolassistance/ToolAssistanceField\";\r\nimport { withStatusFieldProps } from \"../statusbar/withStatusFieldProps\";\r\nimport { MessageCenterField } from \"../statusfields/MessageCenter\";\r\nimport { withMessageCenterFieldProps } from \"../statusbar/withMessageCenterFieldProps\";\r\nimport { ActivityCenterField } from \"../statusfields/ActivityCenter\";\r\nimport { SnapModeField } from \"../statusfields/SnapMode\";\r\nimport { SelectionInfoField } from \"../statusfields/SelectionInfo\";\r\nimport { TileLoadingIndicator } from \"../statusfields/tileloading/TileLoadingIndicator\";\r\nimport { SelectionScopeField } from \"../statusfields/SelectionScope\";\r\n\r\n/**\r\n * Defines what items to include from the provider. If any items are\r\n * specified then only those items will be added to statusbar.\r\n * @public\r\n */\r\nexport interface DefaultStatusbarItems {\r\n messageCenter?: boolean;\r\n preToolAssistanceSeparator?: boolean;\r\n toolAssistance?: boolean;\r\n postToolAssistanceSeparator?: boolean;\r\n activityCenter?: boolean;\r\n accuSnapModePicker?: boolean;\r\n tileLoadIndicator?: boolean;\r\n selectionScope?: boolean;\r\n selectionInfo?: boolean;\r\n}\r\n\r\n/**\r\n * Provide standard tools for the SimpleStatusbarWidget\r\n * @public\r\n */\r\nexport class StandardStatusbarItemsProvider implements UiItemsProvider {\r\n constructor(private _providerId: string, private _defaultItems?: DefaultStatusbarItems, private _isSupportedStage?: (stageId: string, stageUsage: string, stageAppData?: any) => boolean) { }\r\n\r\n public get id(): string { return this._providerId; }\r\n\r\n /**\r\n * static function to register the StandardStatusbarItemsProvider\r\n * @param providerId - unique identifier for this instance of the provider. This is required in case separate packages want\r\n * to set up custom stage with their own subset of standard status bar items.\r\n * @param defaultItems - if undefined all available tools are provided to stage. If defined only those\r\n * specific tool buttons are shown.\r\n * @param isSupportedStage - optional function that will be called to determine if tools should be added to current stage. If not set and\r\n * the current stage's `usage` is set to `StageUsage.General` then the provider will add items to frontstage.\r\n */\r\n public static register(providerId: string, defaultItems?: DefaultStatusbarItems, isSupportedStage?: (stageId: string, stageUsage: string, stageAppData?: any) => boolean) {\r\n UiItemsManager.register(new StandardStatusbarItemsProvider(providerId, defaultItems, isSupportedStage));\r\n }\r\n\r\n public static unregister(providerId: string) {\r\n UiItemsManager.unregister(providerId);\r\n }\r\n\r\n public provideStatusBarItems(stageId: string, stageUsage: string, stageAppData?: any): CommonStatusBarItem[] {\r\n const statusBarItems: CommonStatusBarItem[] = [];\r\n let provideToStage = false;\r\n\r\n if (this._isSupportedStage) {\r\n provideToStage = this._isSupportedStage(stageId, stageUsage, stageAppData);\r\n } else {\r\n provideToStage = (stageUsage === StageUsage.General);\r\n }\r\n\r\n /* istanbul ignore else */\r\n if (provideToStage) {\r\n if (!this._defaultItems || this._defaultItems.messageCenter) {\r\n const MessageCenter = withMessageCenterFieldProps(MessageCenterField);\r\n statusBarItems.push(StatusBarItemUtilities.createStatusBarItem(\"uifw.MessageCenter\", StatusBarSection.Left, 10, <MessageCenter />));\r\n }\r\n if (!this._defaultItems || this._defaultItems.toolAssistance) {\r\n if (!this._defaultItems || this._defaultItems.preToolAssistanceSeparator)\r\n statusBarItems.push(StatusBarItemUtilities.createStatusBarItem(\"uifw.PreToolAssistance\", StatusBarSection.Left, 15, <FooterSeparator />));\r\n\r\n const ToolAssistance = withStatusFieldProps(ToolAssistanceField);\r\n statusBarItems.push(StatusBarItemUtilities.createStatusBarItem(\"uifw.ToolAssistance\", StatusBarSection.Left, 20, <ToolAssistance />));\r\n\r\n if (!this._defaultItems || this._defaultItems.postToolAssistanceSeparator)\r\n statusBarItems.push(StatusBarItemUtilities.createStatusBarItem(\"uifw.PostToolAssistance\", StatusBarSection.Left, 25, <FooterSeparator />));\r\n }\r\n if (!this._defaultItems || this._defaultItems.activityCenter) {\r\n const ActivityCenter = withStatusFieldProps(ActivityCenterField);\r\n statusBarItems.push(StatusBarItemUtilities.createStatusBarItem(\"uifw.ActivityCenter\", StatusBarSection.Left, 30, <ActivityCenter />));\r\n }\r\n if (!this._defaultItems || this._defaultItems.accuSnapModePicker) {\r\n const SnapMode = withMessageCenterFieldProps(SnapModeField);\r\n statusBarItems.push(StatusBarItemUtilities.createStatusBarItem(\"uifw.SnapMode\", StatusBarSection.Center, 10, <SnapMode />));\r\n }\r\n\r\n if (!this._defaultItems || this._defaultItems.tileLoadIndicator) {\r\n const TileLoadIndicator = withStatusFieldProps(TileLoadingIndicator);\r\n statusBarItems.push(StatusBarItemUtilities.createStatusBarItem(\"uifw.TileLoadIndicator\", StatusBarSection.Right, 10, <TileLoadIndicator />));\r\n }\r\n\r\n if (!this._defaultItems || this._defaultItems.selectionScope) {\r\n const SelectionScope = withStatusFieldProps(SelectionScopeField);\r\n statusBarItems.push(StatusBarItemUtilities.createStatusBarItem(\"uifw.SelectionScope\", StatusBarSection.Right, 20, <SelectionScope />));\r\n }\r\n\r\n if (!this._defaultItems || this._defaultItems.selectionInfo) {\r\n const SelectionInfo = withStatusFieldProps(SelectionInfoField);\r\n statusBarItems.push(StatusBarItemUtilities.createStatusBarItem(\"uifw.SelectionInfo\", StatusBarSection.Right, 30, <SelectionInfo />));\r\n }\r\n }\r\n\r\n return statusBarItems;\r\n }\r\n}\r\n"]}
|
|
1
|
+
{"version":3,"file":"StandardStatusbarItemsProvider.js","sourceRoot":"","sources":["../../../../src/appui-react/ui-items-provider/StandardStatusbarItemsProvider.tsx"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,mBAAmB,EAAuB,gBAAgB,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AACnH,OAAO,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAC;AAC5D,OAAO,EAAE,sBAAsB,EAAE,MAAM,qCAAqC,CAAC;AAC7E,OAAO,EAAE,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a,CAAC,CAAC;YAC5D,cAAc,CAAC,IAAI,CAAC,sBAAsB,CAAC,mBAAmB,CAAC,eAAe,EAAE,gBAAgB,CAAC,MAAM,EAAE,EAAE,EAAE,oBAAC,QAAQ,OAAG,CAAC,CAAC,CAAC;SAC7H;QAED,IAAI,CAAC,IAAI,CAAC,aAAa,IAAI,IAAI,CAAC,aAAa,CAAC,iBAAiB,EAAE;YAC/D,MAAM,iBAAiB,GAAG,oBAAoB,CAAC,oBAAoB,CAAC,CAAC;YACrE,cAAc,CAAC,IAAI,CAAC,sBAAsB,CAAC,mBAAmB,CAAC,wBAAwB,EAAE,gBAAgB,CAAC,KAAK,EAAE,EAAE,EAAE,oBAAC,iBAAiB,OAAG,CAAC,CAAC,CAAC;SAC9I;QAED,IAAI,CAAC,IAAI,CAAC,aAAa,IAAI,IAAI,CAAC,aAAa,CAAC,cAAc,EAAE;YAC5D,MAAM,cAAc,GAAG,oBAAoB,CAAC,mBAAmB,CAAC,CAAC;YACjE,cAAc,CAAC,IAAI,CAAC,sBAAsB,CAAC,mBAAmB,CAAC,qBAAqB,EAAE,gBAAgB,CAAC,KAAK,EAAE,EAAE,EAAE,oBAAC,cAAc,OAAG,CAAC,CAAC,CAAC;SACxI;QAED,IAAI,CAAC,IAAI,CAAC,aAAa,IAAI,IAAI,CAAC,aAAa,CAAC,aAAa,EAAE;YAC3D,MAAM,aAAa,GAAG,oBAAoB,CAAC,kBAAkB,CAAC,CAAC;YAC/D,cAAc,CAAC,IAAI,CAAC,sBAAsB,CAAC,mBAAmB,CAAC,oBAAoB,EAAE,gBAAgB,CAAC,KAAK,EAAE,EAAE,EAAE,oBAAC,aAAa,OAAG,CAAC,CAAC,CAAC;SACtI;QAED,OAAO,cAAc,CAAC;IACxB,CAAC;CACF","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 StandardUiItemsProvider\r\n */\r\n\r\nimport * as React from \"react\";\r\nimport { BaseUiItemsProvider, CommonStatusBarItem, StatusBarSection, UiItemsManager } from \"@itwin/appui-abstract\";\r\nimport { FooterSeparator } from \"@itwin/appui-layout-react\";\r\nimport { StatusBarItemUtilities } from \"../statusbar/StatusBarItemUtilities\";\r\nimport { ToolAssistanceField } from \"../statusfields/toolassistance/ToolAssistanceField\";\r\nimport { withStatusFieldProps } from \"../statusbar/withStatusFieldProps\";\r\nimport { MessageCenterField } from \"../statusfields/MessageCenter\";\r\nimport { withMessageCenterFieldProps } from \"../statusbar/withMessageCenterFieldProps\";\r\nimport { ActivityCenterField } from \"../statusfields/ActivityCenter\";\r\nimport { SnapModeField } from \"../statusfields/SnapMode\";\r\nimport { SelectionInfoField } from \"../statusfields/SelectionInfo\";\r\nimport { TileLoadingIndicator } from \"../statusfields/tileloading/TileLoadingIndicator\";\r\nimport { SelectionScopeField } from \"../statusfields/SelectionScope\";\r\n\r\n/**\r\n * Defines what items to include from the provider. If any items are\r\n * specified then only those items will be added to statusbar.\r\n * @public\r\n */\r\nexport interface DefaultStatusbarItems {\r\n messageCenter?: boolean;\r\n preToolAssistanceSeparator?: boolean;\r\n toolAssistance?: boolean;\r\n postToolAssistanceSeparator?: boolean;\r\n activityCenter?: boolean;\r\n accuSnapModePicker?: boolean;\r\n tileLoadIndicator?: boolean;\r\n selectionScope?: boolean;\r\n selectionInfo?: boolean;\r\n}\r\n\r\n/**\r\n * Provide standard tools for the SimpleStatusbarWidget\r\n * @public\r\n */\r\nexport class StandardStatusbarItemsProvider extends BaseUiItemsProvider {\r\n constructor(providerId: string, private _defaultItems?: DefaultStatusbarItems, isSupportedStage?: (stageId: string, stageUsage: string, stageAppData?: any) => boolean) {\r\n super(providerId, isSupportedStage);\r\n }\r\n\r\n /**\r\n * static function to register the StandardStatusbarItemsProvider\r\n * @param providerId - unique identifier for this instance of the provider. This is required in case separate packages want\r\n * to set up custom stage with their own subset of standard status bar items.\r\n * @param defaultItems - if undefined all available tools are provided to stage. If defined only those\r\n * specific tool buttons are shown.\r\n * @param isSupportedStage - optional function that will be called to determine if tools should be added to current stage. If not set and\r\n * the current stage's `usage` is set to `StageUsage.General` then the provider will add items to frontstage.\r\n */\r\n public static register(providerId: string, defaultItems?: DefaultStatusbarItems, isSupportedStage?: (stageId: string, stageUsage: string, stageAppData?: any) => boolean) {\r\n const provider = new StandardStatusbarItemsProvider(providerId, defaultItems, isSupportedStage);\r\n UiItemsManager.register(provider);\r\n return provider;\r\n }\r\n\r\n public override provideStatusBarItemsInternal(_stageId: string, _stageUsage: string, _stageAppData?: any): CommonStatusBarItem[] {\r\n const statusBarItems: CommonStatusBarItem[] = [];\r\n if (!this._defaultItems || this._defaultItems.messageCenter) {\r\n const MessageCenter = withMessageCenterFieldProps(MessageCenterField);\r\n statusBarItems.push(StatusBarItemUtilities.createStatusBarItem(\"uifw.MessageCenter\", StatusBarSection.Left, 10, <MessageCenter />));\r\n }\r\n if (!this._defaultItems || this._defaultItems.toolAssistance) {\r\n if (!this._defaultItems || this._defaultItems.preToolAssistanceSeparator)\r\n statusBarItems.push(StatusBarItemUtilities.createStatusBarItem(\"uifw.PreToolAssistance\", StatusBarSection.Left, 15, <FooterSeparator />));\r\n\r\n const ToolAssistance = withStatusFieldProps(ToolAssistanceField);\r\n statusBarItems.push(StatusBarItemUtilities.createStatusBarItem(\"uifw.ToolAssistance\", StatusBarSection.Left, 20, <ToolAssistance />));\r\n\r\n if (!this._defaultItems || this._defaultItems.postToolAssistanceSeparator)\r\n statusBarItems.push(StatusBarItemUtilities.createStatusBarItem(\"uifw.PostToolAssistance\", StatusBarSection.Left, 25, <FooterSeparator />));\r\n }\r\n if (!this._defaultItems || this._defaultItems.activityCenter) {\r\n const ActivityCenter = withStatusFieldProps(ActivityCenterField);\r\n statusBarItems.push(StatusBarItemUtilities.createStatusBarItem(\"uifw.ActivityCenter\", StatusBarSection.Left, 30, <ActivityCenter />));\r\n }\r\n if (!this._defaultItems || this._defaultItems.accuSnapModePicker) {\r\n const SnapMode = withMessageCenterFieldProps(SnapModeField);\r\n statusBarItems.push(StatusBarItemUtilities.createStatusBarItem(\"uifw.SnapMode\", StatusBarSection.Center, 10, <SnapMode />));\r\n }\r\n\r\n if (!this._defaultItems || this._defaultItems.tileLoadIndicator) {\r\n const TileLoadIndicator = withStatusFieldProps(TileLoadingIndicator);\r\n statusBarItems.push(StatusBarItemUtilities.createStatusBarItem(\"uifw.TileLoadIndicator\", StatusBarSection.Right, 10, <TileLoadIndicator />));\r\n }\r\n\r\n if (!this._defaultItems || this._defaultItems.selectionScope) {\r\n const SelectionScope = withStatusFieldProps(SelectionScopeField);\r\n statusBarItems.push(StatusBarItemUtilities.createStatusBarItem(\"uifw.SelectionScope\", StatusBarSection.Right, 20, <SelectionScope />));\r\n }\r\n\r\n if (!this._defaultItems || this._defaultItems.selectionInfo) {\r\n const SelectionInfo = withStatusFieldProps(SelectionInfoField);\r\n statusBarItems.push(StatusBarItemUtilities.createStatusBarItem(\"uifw.SelectionInfo\", StatusBarSection.Right, 30, <SelectionInfo />));\r\n }\r\n\r\n return statusBarItems;\r\n }\r\n}\r\n"]}
|
|
@@ -11,6 +11,7 @@ export interface InitialAppUiSettings {
|
|
|
11
11
|
dragInteraction: boolean;
|
|
12
12
|
frameworkVersion: FrameworkVersionId;
|
|
13
13
|
widgetOpacity: number;
|
|
14
|
+
showWidgetIcon?: boolean;
|
|
14
15
|
}
|
|
15
16
|
/** These are the UI settings that are stored in the Redux store. They control the color theme, the UI version,
|
|
16
17
|
* how toolbar group buttons work, and the opacity of widgets in 1.0 and floating widget in 2.0 when the cursor
|
|
@@ -32,6 +33,7 @@ export declare class AppUiSettings implements UserSettingsProvider {
|
|
|
32
33
|
dragInteraction: UiStateEntry<boolean>;
|
|
33
34
|
frameworkVersion: UiStateEntry<FrameworkVersionId>;
|
|
34
35
|
widgetOpacity: UiStateEntry<number>;
|
|
36
|
+
showWidgetIcon: UiStateEntry<boolean>;
|
|
35
37
|
private setColorTheme;
|
|
36
38
|
constructor(defaults: Partial<InitialAppUiSettings>);
|
|
37
39
|
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;
|
|
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;CAC1B;AAED;;;;;;;;;;GAUG;AACH,qBAAa,aAAc,YAAW,oBAAoB;IACxD,SAAgB,UAAU,2BAA2B;IAErD,OAAO,CAAC,MAAM,CAAC,iBAAiB,CAAmB;IACnD,OAAO,CAAC,SAAS,CAAgC;IACjD,OAAO,CAAC,sBAAsB,CAAS;IAEhC,UAAU,EAAE,YAAY,CAAC,MAAM,CAAC,CAAC;IACjC,eAAe,EAAE,YAAY,CAAC,OAAO,CAAC,CAAC;IACvC,gBAAgB,EAAE,YAAY,CAAC,kBAAkB,CAAC,CAAC;IACnD,aAAa,EAAE,YAAY,CAAC,MAAM,CAAC,CAAC;IACpC,cAAc,EAAE,YAAY,CAAC,OAAO,CAAC,CAAC;IAE7C,OAAO,CAAC,aAAa,CAInB;gBAEU,QAAQ,EAAE,OAAO,CAAC,oBAAoB,CAAC;IA4BnD,OAAO,CAAC,iBAAiB,CAqBvB;IAEW,KAAK,CAAC,OAAO,EAAE,cAAc,GAAG,OAAO,CAAC,IAAI,CAAC;IAQ7C,gBAAgB,CAAC,OAAO,EAAE,cAAc,GAAG,OAAO,CAAC,IAAI,CAAC;CAGtE"}
|
|
@@ -41,6 +41,8 @@ export class AppUiSettings {
|
|
|
41
41
|
await this.dragInteraction.saveSetting(UiFramework.getUiStateStorage());
|
|
42
42
|
if (args.eventIds.has("configurableui:set-framework-version"))
|
|
43
43
|
await this.frameworkVersion.saveSetting(UiFramework.getUiStateStorage());
|
|
44
|
+
if (args.eventIds.has("configurableui:set-show-widget-icon"))
|
|
45
|
+
await this.showWidgetIcon.saveSetting(UiFramework.getUiStateStorage());
|
|
44
46
|
if (args.eventIds.has("configurableui:set_widget_opacity"))
|
|
45
47
|
await this.widgetOpacity.saveSetting(UiFramework.getUiStateStorage());
|
|
46
48
|
};
|
|
@@ -49,6 +51,8 @@ export class AppUiSettings {
|
|
|
49
51
|
this._settings.push(this.colorTheme);
|
|
50
52
|
this.dragInteraction = new UiStateEntry(AppUiSettings._settingNamespace, "DragInteraction", () => UiFramework.useDragInteraction, (value) => UiFramework.setUseDragInteraction(value), defaults.dragInteraction);
|
|
51
53
|
this._settings.push(this.dragInteraction);
|
|
54
|
+
this.showWidgetIcon = new UiStateEntry(AppUiSettings._settingNamespace, "ShowWidgetIcon", () => UiFramework.showWidgetIcon, (value) => UiFramework.setShowWidgetIcon(value), defaults.showWidgetIcon);
|
|
55
|
+
this._settings.push(this.showWidgetIcon);
|
|
52
56
|
this.frameworkVersion = new UiStateEntry(AppUiSettings._settingNamespace, "FrameworkVersion", () => UiFramework.uiVersion, (value) => UiFramework.setUiVersion(value), defaults.frameworkVersion);
|
|
53
57
|
this._settings.push(this.frameworkVersion);
|
|
54
58
|
this.widgetOpacity = new UiStateEntry(AppUiSettings._settingNamespace, "WidgetOpacity", () => UiFramework.getWidgetOpacity(), (value) => UiFramework.setWidgetOpacity(value), defaults.widgetOpacity);
|
|
@@ -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,OAAO,EAAE,YAAY,EAAkB,MAAM,mBAAmB,CAAC;AAEjE,OAAO,EAAE,qBAAqB,EAAE,MAAM,iCAAiC,CAAC;AACxE,OAAO,EAAsB,WAAW,EAAwB,MAAM,gBAAgB,CAAC;
|
|
1
|
+
{"version":3,"file":"AppUiSettings.js","sourceRoot":"","sources":["../../../../src/appui-react/uistate/AppUiSettings.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAEH,OAAO,EAAE,YAAY,EAAkB,MAAM,mBAAmB,CAAC;AAEjE,OAAO,EAAE,qBAAqB,EAAE,MAAM,iCAAiC,CAAC;AACxE,OAAO,EAAsB,WAAW,EAAwB,MAAM,gBAAgB,CAAC;AAevF;;;;;;;;;;GAUG;AACH,MAAM,OAAO,aAAa;IAmBxB,YAAY,QAAuC;QAlBnC,eAAU,GAAG,uBAAuB,CAAC;QAG7C,cAAS,GAA6B,EAAE,CAAC;QACzC,2BAAsB,GAAG,KAAK,CAAC;QAQ/B,kBAAa,GAAG,CAAC,KAAa,EAAE,EAAE;YACxC,WAAW,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC;YACjC,6FAA6F;YAC7F,MAAM,CAAC,YAAY,CAAC,OAAO,CAAC,mBA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AAC,gBAAgB,CAAC,KAAK,CAAC,EAAE,QAAQ,CAAC,aAAa,CAAC,CAAC;QACxH,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC;QAExC,qBAAqB,CAAC,aAAa,CAAC,WAAW,CAAC,IAAI,CAAC,iBAAiB,CAAC,CAAC;IAC1E,CAAC;IAyBM,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;;AA7Ec,+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}\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\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.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 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_widget_opacity\"))\r\n await this.widgetOpacity.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"]}
|
|
@@ -62,7 +62,7 @@ export declare function initializeNineZoneState(frontstageDef: FrontstageDef): N
|
|
|
62
62
|
export declare function restoreNineZoneState(frontstageDef: FrontstageDef, saved: SavedNineZoneState): NineZoneState;
|
|
63
63
|
/** Prepares NineZoneState to be saved.
|
|
64
64
|
* @note Removes toolSettings tab.
|
|
65
|
-
* @note Removes tab labels.
|
|
65
|
+
* @note Removes tab labels and iconSpec.
|
|
66
66
|
* @internal
|
|
67
67
|
*/
|
|
68
68
|
export declare function packNineZoneState(state: NineZoneState): SavedNineZoneState;
|
|
@@ -77,7 +77,7 @@ export interface WidgetPanelsFrontstageState {
|
|
|
77
77
|
version: number;
|
|
78
78
|
stateVersion: number;
|
|
79
79
|
}
|
|
80
|
-
declare type SavedTabState = Omit<TabState, "label" | "canPopout" | "isFloatingStateWindowResizable">;
|
|
80
|
+
declare type SavedTabState = Omit<TabState, "label" | "canPopout" | "isFloatingStateWindowResizable" | "iconSpec">;
|
|
81
81
|
interface SavedTabsState {
|
|
82
82
|
readonly [id: string]: SavedTabState;
|
|
83
83
|
}
|
|
@@ -193,6 +193,29 @@ export declare const setWidgetState: (base: {
|
|
|
193
193
|
readonly [x: string]: {
|
|
194
194
|
readonly id: string;
|
|
195
195
|
readonly label: string;
|
|
196
|
+
readonly iconSpec?: boolean | React.ReactText | {
|
|
197
|
+
readonly type: string | React.JSXElementConstructor<any>;
|
|
198
|
+
readonly props: any;
|
|
199
|
+
readonly key: React.Key | null;
|
|
200
|
+
} | {} | {
|
|
201
|
+
readonly [Symbol.iterator]: () => Iterator<React.ReactNode, any, undefined>;
|
|
202
|
+
} | {
|
|
203
|
+
readonly key: React.Key | null;
|
|
204
|
+
readonly children: boolean | React.ReactText | {
|
|
205
|
+
readonly type: string | React.JSXElementConstructor<any>;
|
|
206
|
+
readonly props: any;
|
|
207
|
+
readonly key: React.Key | null;
|
|
208
|
+
} | {} | {
|
|
209
|
+
readonly [Symbol.iterator]: () => Iterator<React.ReactNode, any, undefined>;
|
|
210
|
+
} | any | null | undefined;
|
|
211
|
+
readonly type: string | React.JSXElementConstructor<any>;
|
|
212
|
+
readonly props: any;
|
|
213
|
+
} | {
|
|
214
|
+
readonly stringGetter: () => string;
|
|
215
|
+
readonly syncEventIds: readonly string[];
|
|
216
|
+
readonly value: string;
|
|
217
|
+
readonly refresh: () => boolean;
|
|
218
|
+
} | null | undefined;
|
|
196
219
|
readonly preferredFloatingWidgetSize?: {
|
|
197
220
|
readonly width: number;
|
|
198
221
|
readonly height: number;
|
|
@@ -338,6 +361,29 @@ export declare const showWidget: (base: {
|
|
|
338
361
|
readonly [x: string]: {
|
|
339
362
|
readonly id: string;
|
|
340
363
|
readonly label: string;
|
|
364
|
+
readonly iconSpec?: boolean | React.ReactText | {
|
|
365
|
+
readonly type: string | React.JSXElementConstructor<any>;
|
|
366
|
+
readonly props: any;
|
|
367
|
+
readonly key: React.Key | null;
|
|
368
|
+
} | {} | {
|
|
369
|
+
readonly [Symbol.iterator]: () => Iterator<React.ReactNode, any, undefined>;
|
|
370
|
+
} | {
|
|
371
|
+
readonly key: React.Key | null;
|
|
372
|
+
readonly children: boolean | React.ReactText | {
|
|
373
|
+
readonly type: string | React.JSXElementConstructor<any>;
|
|
374
|
+
readonly props: any;
|
|
375
|
+
readonly key: React.Key | null;
|
|
376
|
+
} | {} | {
|
|
377
|
+
readonly [Symbol.iterator]: () => Iterator<React.ReactNode, any, undefined>;
|
|
378
|
+
} | any | null | undefined;
|
|
379
|
+
readonly type: string | React.JSXElementConstructor<any>;
|
|
380
|
+
readonly props: any;
|
|
381
|
+
} | {
|
|
382
|
+
readonly stringGetter: () => string;
|
|
383
|
+
readonly syncEventIds: readonly string[];
|
|
384
|
+
readonly value: string;
|
|
385
|
+
readonly refresh: () => boolean;
|
|
386
|
+
} | null | undefined;
|
|
341
387
|
readonly preferredFloatingWidgetSize?: {
|
|
342
388
|
readonly width: number;
|
|
343
389
|
readonly height: number;
|
|
@@ -483,6 +529,29 @@ export declare const expandWidget: (base: {
|
|
|
483
529
|
readonly [x: string]: {
|
|
484
530
|
readonly id: string;
|
|
485
531
|
readonly label: string;
|
|
532
|
+
readonly iconSpec?: boolean | React.ReactText | {
|
|
533
|
+
readonly type: string | React.JSXElementConstructor<any>;
|
|
534
|
+
readonly props: any;
|
|
535
|
+
readonly key: React.Key | null;
|
|
536
|
+
} | {} | {
|
|
537
|
+
readonly [Symbol.iterator]: () => Iterator<React.ReactNode, any, undefined>;
|
|
538
|
+
} | {
|
|
539
|
+
readonly key: React.Key | null;
|
|
540
|
+
readonly children: boolean | React.ReactText | {
|
|
541
|
+
readonly type: string | React.JSXElementConstructor<any>;
|
|
542
|
+
readonly props: any;
|
|
543
|
+
readonly key: React.Key | null;
|
|
544
|
+
} | {} | {
|
|
545
|
+
readonly [Symbol.iterator]: () => Iterator<React.ReactNode, any, undefined>;
|
|
546
|
+
} | any | null | undefined;
|
|
547
|
+
readonly type: string | React.JSXElementConstructor<any>;
|
|
548
|
+
readonly props: any;
|
|
549
|
+
} | {
|
|
550
|
+
readonly stringGetter: () => string;
|
|
551
|
+
readonly syncEventIds: readonly string[];
|
|
552
|
+
readonly value: string;
|
|
553
|
+
readonly refresh: () => boolean;
|
|
554
|
+
} | null | undefined;
|
|
486
555
|
readonly preferredFloatingWidgetSize?: {
|
|
487
556
|
readonly width: number;
|
|
488
557
|
readonly height: number;
|
|
@@ -628,6 +697,29 @@ export declare const setWidgetLabel: (base: {
|
|
|
628
697
|
readonly [x: string]: {
|
|
629
698
|
readonly id: string;
|
|
630
699
|
readonly label: string;
|
|
700
|
+
readonly iconSpec?: boolean | React.ReactText | {
|
|
701
|
+
readonly type: string | React.JSXElementConstructor<any>;
|
|
702
|
+
readonly props: any;
|
|
703
|
+
readonly key: React.Key | null;
|
|
704
|
+
} | {} | {
|
|
705
|
+
readonly [Symbol.iterator]: () => Iterator<React.ReactNode, any, undefined>;
|
|
706
|
+
} | {
|
|
707
|
+
readonly key: React.Key | null;
|
|
708
|
+
readonly children: boolean | React.ReactText | {
|
|
709
|
+
readonly type: string | React.JSXElementConstructor<any>;
|
|
710
|
+
readonly props: any;
|
|
711
|
+
readonly key: React.Key | null;
|
|
712
|
+
} | {} | {
|
|
713
|
+
readonly [Symbol.iterator]: () => Iterator<React.ReactNode, any, undefined>;
|
|
714
|
+
} | any | null | undefined;
|
|
715
|
+
readonly type: string | React.JSXElementConstructor<any>;
|
|
716
|
+
readonly props: any;
|
|
717
|
+
} | {
|
|
718
|
+
readonly stringGetter: () => string;
|
|
719
|
+
readonly syncEventIds: readonly string[];
|
|
720
|
+
readonly value: string;
|
|
721
|
+
readonly refresh: () => boolean;
|
|
722
|
+
} | null | undefined;
|
|
631
723
|
readonly preferredFloatingWidgetSize?: {
|
|
632
724
|
readonly width: number;
|
|
633
725
|
readonly height: number;
|
|
@@ -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;AAChG,OAAO,EAGiD,gBAAgB,EAAE,cAAc,EAAE,aAAa,EAC/E,SAAS,EAAqC,QAAQ,EAC7E,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;
|
|
1
|
+
{"version":3,"file":"Frontstage.d.ts","sourceRoot":"","sources":["../../../../src/appui-react/widget-panels/Frontstage.tsx"],"names":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} from "./ToolSettings";
|
|
30
30
|
import { useEscapeSetFocusToHome } from "../hooks/useEscapeSetFocusToHome";
|
|
31
|
+
import { useSelector } from "react-redux";
|
|
31
32
|
const panelZoneKeys = ["start", "middle", "end"];
|
|
32
33
|
// istanbul ignore next
|
|
33
34
|
const WidgetPanelsFrontstageComponent = React.memo(function WidgetPanelsFrontstageComponent() {
|
|
@@ -172,9 +173,13 @@ export function ActiveFrontstageDefProvider({ frontstageDef }) {
|
|
|
172
173
|
useFrontstageManager(frontstageDef);
|
|
173
174
|
useItemsManager(frontstageDef);
|
|
174
175
|
const labels = useLabels();
|
|
176
|
+
const showWidgetIcon = useSelector((state) => {
|
|
177
|
+
const frameworkState = state[UiFramework.frameworkStateKey];
|
|
178
|
+
return !!frameworkState.configurableUiState.showWidgetIcon;
|
|
179
|
+
});
|
|
175
180
|
const handleKeyDown = useEscapeSetFocusToHome();
|
|
176
181
|
return (React.createElement("div", { className: "uifw-widgetPanels-frontstage", onKeyDown: handleKeyDown, role: "presentation" },
|
|
177
|
-
React.createElement(NineZone, { dispatch: dispatch, labels: labels, state: nineZone, tab: tabElement, toolSettingsContent: toolSettingsContent, widgetContent: widgetContent }, widgetPanelsFrontstage)));
|
|
182
|
+
React.createElement(NineZone, { dispatch: dispatch, labels: labels, state: nineZone, tab: tabElement, showWidgetIcon: showWidgetIcon, toolSettingsContent: toolSettingsContent, widgetContent: widgetContent }, widgetPanelsFrontstage)));
|
|
178
183
|
}
|
|
179
184
|
/** @internal */
|
|
180
185
|
export function useLabels() {
|
|
@@ -200,6 +205,7 @@ export function addWidgets(state, widgets, side, widgetId) {
|
|
|
200
205
|
const label = getWidgetLabel(widget.label);
|
|
201
206
|
state = addTab(state, widget.id, {
|
|
202
207
|
label,
|
|
208
|
+
iconSpec: widget.iconSpec,
|
|
203
209
|
preferredPanelWidgetSize: widget.preferredPanelSize,
|
|
204
210
|
canPopout: widget.canPopout,
|
|
205
211
|
isFloatingStateWindowResizable: widget.isFloatingStateWindowResizable,
|
|
@@ -231,6 +237,7 @@ export function appendWidgets(state, widgetDefs, side, preferredWidgetIndex) {
|
|
|
231
237
|
const userSized = saveTab ? saveTab.userSized : undefined;
|
|
232
238
|
state = addTab(state, widgetDef.id, {
|
|
233
239
|
label,
|
|
240
|
+
iconSpec: widgetDef.iconSpec,
|
|
234
241
|
canPopout: widgetDef.canPopout,
|
|
235
242
|
preferredPanelWidgetSize,
|
|
236
243
|
preferredFloatingWidgetSize,
|
|
@@ -589,6 +596,7 @@ export function restoreNineZoneState(frontstageDef, saved) {
|
|
|
589
596
|
draft.tabs[tab.id] = {
|
|
590
597
|
...tab,
|
|
591
598
|
label: getWidgetLabel((_a = widgetDef === null || widgetDef === void 0 ? void 0 : widgetDef.label) !== null && _a !== void 0 ? _a : "undefined"),
|
|
599
|
+
iconSpec: widgetDef === null || widgetDef === void 0 ? void 0 : widgetDef.iconSpec,
|
|
592
600
|
canPopout: widgetDef === null || widgetDef === void 0 ? void 0 : widgetDef.canPopout,
|
|
593
601
|
isFloatingStateWindowResizable: widgetDef === null || widgetDef === void 0 ? void 0 : widgetDef.isFloatingStateWindowResizable,
|
|
594
602
|
};
|
|
@@ -608,7 +616,7 @@ export function restoreNineZoneState(frontstageDef, saved) {
|
|
|
608
616
|
}
|
|
609
617
|
/** Prepares NineZoneState to be saved.
|
|
610
618
|
* @note Removes toolSettings tab.
|
|
611
|
-
* @note Removes tab labels.
|
|
619
|
+
* @note Removes tab labels and iconSpec.
|
|
612
620
|
* @internal
|
|
613
621
|
*/
|
|
614
622
|
export function packNineZoneState(state) {
|