@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,7 +1,7 @@
|
|
|
1
1
|
/** @packageDocumentation
|
|
2
2
|
* @module StandardUiItemsProvider
|
|
3
3
|
*/
|
|
4
|
-
import {
|
|
4
|
+
import { BaseUiItemsProvider, CommonStatusBarItem } from "@itwin/appui-abstract";
|
|
5
5
|
/**
|
|
6
6
|
* Defines what items to include from the provider. If any items are
|
|
7
7
|
* specified then only those items will be added to statusbar.
|
|
@@ -22,12 +22,9 @@ export interface DefaultStatusbarItems {
|
|
|
22
22
|
* Provide standard tools for the SimpleStatusbarWidget
|
|
23
23
|
* @public
|
|
24
24
|
*/
|
|
25
|
-
export declare class StandardStatusbarItemsProvider
|
|
26
|
-
private _providerId;
|
|
25
|
+
export declare class StandardStatusbarItemsProvider extends BaseUiItemsProvider {
|
|
27
26
|
private _defaultItems?;
|
|
28
|
-
|
|
29
|
-
constructor(_providerId: string, _defaultItems?: DefaultStatusbarItems | undefined, _isSupportedStage?: ((stageId: string, stageUsage: string, stageAppData?: any) => boolean) | undefined);
|
|
30
|
-
get id(): string;
|
|
27
|
+
constructor(providerId: string, _defaultItems?: DefaultStatusbarItems | undefined, isSupportedStage?: (stageId: string, stageUsage: string, stageAppData?: any) => boolean);
|
|
31
28
|
/**
|
|
32
29
|
* static function to register the StandardStatusbarItemsProvider
|
|
33
30
|
* @param providerId - unique identifier for this instance of the provider. This is required in case separate packages want
|
|
@@ -37,8 +34,7 @@ export declare class StandardStatusbarItemsProvider implements UiItemsProvider {
|
|
|
37
34
|
* @param isSupportedStage - optional function that will be called to determine if tools should be added to current stage. If not set and
|
|
38
35
|
* the current stage's `usage` is set to `StageUsage.General` then the provider will add items to frontstage.
|
|
39
36
|
*/
|
|
40
|
-
static register(providerId: string, defaultItems?: DefaultStatusbarItems, isSupportedStage?: (stageId: string, stageUsage: string, stageAppData?: any) => boolean):
|
|
41
|
-
|
|
42
|
-
provideStatusBarItems(stageId: string, stageUsage: string, stageAppData?: any): CommonStatusBarItem[];
|
|
37
|
+
static register(providerId: string, defaultItems?: DefaultStatusbarItems, isSupportedStage?: (stageId: string, stageUsage: string, stageAppData?: any) => boolean): StandardStatusbarItemsProvider;
|
|
38
|
+
provideStatusBarItemsInternal(_stageId: string, _stageUsage: string, _stageAppData?: any): CommonStatusBarItem[];
|
|
43
39
|
}
|
|
44
40
|
//# sourceMappingURL=StandardStatusbarItemsProvider.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"StandardStatusbarItemsProvider.d.ts","sourceRoot":"","sources":["../../../../src/appui-react/ui-items-provider/StandardStatusbarItemsProvider.tsx"],"names":[],"mappings":"AAIA;;GAEG;AAGH,OAAO,EAAE,mBAAmB,
|
|
1
|
+
{"version":3,"file":"StandardStatusbarItemsProvider.d.ts","sourceRoot":"","sources":["../../../../src/appui-react/ui-items-provider/StandardStatusbarItemsProvider.tsx"],"names":[],"mappings":"AAIA;;GAEG;AAGH,OAAO,EAAE,mBAAmB,EAAE,mBAAmB,EAAoC,MAAM,uBAAuB,CAAC;AAanH;;;;GAIG;AACH,MAAM,WAAW,qBAAqB;IACpC,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,0BAA0B,CAAC,EAAE,OAAO,CAAC;IACrC,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,2BAA2B,CAAC,EAAE,OAAO,CAAC;IACtC,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAC7B,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,aAAa,CAAC,EAAE,OAAO,CAAC;CACzB;AAED;;;GAGG;AACH,qBAAa,8BAA+B,SAAQ,mBAAmB;IACrC,OAAO,CAAC,aAAa,CAAC;gBAA1C,UAAU,EAAE,MAAM,EAAU,aAAa,CAAC,mCAAuB,EAAE,gBAAgB,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,EAAE,YAAY,CAAC,EAAE,GAAG,KAAK,OAAO;IAItK;;;;;;;;MAQE;WACY,QAAQ,CAAC,UAAU,EAAE,MAAM,EAAE,YAAY,CAAC,EAAE,qBAAqB,EAAE,gBAAgB,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,EAAE,YAAY,CAAC,EAAE,GAAG,KAAK,OAAO;IAMxJ,6BAA6B,CAAC,QAAQ,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,EAAE,aAAa,CAAC,EAAE,GAAG,GAAG,mBAAmB,EAAE;CA0CjI"}
|
|
@@ -25,13 +25,11 @@ const SelectionScope_1 = require("../statusfields/SelectionScope");
|
|
|
25
25
|
* Provide standard tools for the SimpleStatusbarWidget
|
|
26
26
|
* @public
|
|
27
27
|
*/
|
|
28
|
-
class StandardStatusbarItemsProvider {
|
|
29
|
-
constructor(
|
|
30
|
-
|
|
28
|
+
class StandardStatusbarItemsProvider extends appui_abstract_1.BaseUiItemsProvider {
|
|
29
|
+
constructor(providerId, _defaultItems, isSupportedStage) {
|
|
30
|
+
super(providerId, isSupportedStage);
|
|
31
31
|
this._defaultItems = _defaultItems;
|
|
32
|
-
this._isSupportedStage = _isSupportedStage;
|
|
33
32
|
}
|
|
34
|
-
get id() { return this._providerId; }
|
|
35
33
|
/**
|
|
36
34
|
* static function to register the StandardStatusbarItemsProvider
|
|
37
35
|
* @param providerId - unique identifier for this instance of the provider. This is required in case separate packages want
|
|
@@ -42,54 +40,43 @@ class StandardStatusbarItemsProvider {
|
|
|
42
40
|
* the current stage's `usage` is set to `StageUsage.General` then the provider will add items to frontstage.
|
|
43
41
|
*/
|
|
44
42
|
static register(providerId, defaultItems, isSupportedStage) {
|
|
45
|
-
|
|
43
|
+
const provider = new StandardStatusbarItemsProvider(providerId, defaultItems, isSupportedStage);
|
|
44
|
+
appui_abstract_1.UiItemsManager.register(provider);
|
|
45
|
+
return provider;
|
|
46
46
|
}
|
|
47
|
-
|
|
48
|
-
appui_abstract_1.UiItemsManager.unregister(providerId);
|
|
49
|
-
}
|
|
50
|
-
provideStatusBarItems(stageId, stageUsage, stageAppData) {
|
|
47
|
+
provideStatusBarItemsInternal(_stageId, _stageUsage, _stageAppData) {
|
|
51
48
|
const statusBarItems = [];
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
49
|
+
if (!this._defaultItems || this._defaultItems.messageCenter) {
|
|
50
|
+
const MessageCenter = (0, withMessageCenterFieldProps_1.withMessageCenterFieldProps)(MessageCenter_1.MessageCenterField);
|
|
51
|
+
statusBarItems.push(StatusBarItemUtilities_1.StatusBarItemUtilities.createStatusBarItem("uifw.MessageCenter", appui_abstract_1.StatusBarSection.Left, 10, React.createElement(MessageCenter, null)));
|
|
52
|
+
}
|
|
53
|
+
if (!this._defaultItems || this._defaultItems.toolAssistance) {
|
|
54
|
+
if (!this._defaultItems || this._defaultItems.preToolAssistanceSeparator)
|
|
55
|
+
statusBarItems.push(StatusBarItemUtilities_1.StatusBarItemUtilities.createStatusBarItem("uifw.PreToolAssistance", appui_abstract_1.StatusBarSection.Left, 15, React.createElement(appui_layout_react_1.FooterSeparator, null)));
|
|
56
|
+
const ToolAssistance = (0, withStatusFieldProps_1.withStatusFieldProps)(ToolAssistanceField_1.ToolAssistanceField);
|
|
57
|
+
statusBarItems.push(StatusBarItemUtilities_1.StatusBarItemUtilities.createStatusBarItem("uifw.ToolAssistance", appui_abstract_1.StatusBarSection.Left, 20, React.createElement(ToolAssistance, null)));
|
|
58
|
+
if (!this._defaultItems || this._defaultItems.postToolAssistanceSeparator)
|
|
59
|
+
statusBarItems.push(StatusBarItemUtilities_1.StatusBarItemUtilities.createStatusBarItem("uifw.PostToolAssistance", appui_abstract_1.StatusBarSection.Left, 25, React.createElement(appui_layout_react_1.FooterSeparator, null)));
|
|
60
|
+
}
|
|
61
|
+
if (!this._defaultItems || this._defaultItems.activityCenter) {
|
|
62
|
+
const ActivityCenter = (0, withStatusFieldProps_1.withStatusFieldProps)(ActivityCenter_1.ActivityCenterField);
|
|
63
|
+
statusBarItems.push(StatusBarItemUtilities_1.StatusBarItemUtilities.createStatusBarItem("uifw.ActivityCenter", appui_abstract_1.StatusBarSection.Left, 30, React.createElement(ActivityCenter, null)));
|
|
64
|
+
}
|
|
65
|
+
if (!this._defaultItems || this._defaultItems.accuSnapModePicker) {
|
|
66
|
+
const SnapMode = (0, withMessageCenterFieldProps_1.withMessageCenterFieldProps)(SnapMode_1.SnapModeField);
|
|
67
|
+
statusBarItems.push(StatusBarItemUtilities_1.StatusBarItemUtilities.createStatusBarItem("uifw.SnapMode", appui_abstract_1.StatusBarSection.Center, 10, React.createElement(SnapMode, null)));
|
|
68
|
+
}
|
|
69
|
+
if (!this._defaultItems || this._defaultItems.tileLoadIndicator) {
|
|
70
|
+
const TileLoadIndicator = (0, withStatusFieldProps_1.withStatusFieldProps)(TileLoadingIndicator_1.TileLoadingIndicator);
|
|
71
|
+
statusBarItems.push(StatusBarItemUtilities_1.StatusBarItemUtilities.createStatusBarItem("uifw.TileLoadIndicator", appui_abstract_1.StatusBarSection.Right, 10, React.createElement(TileLoadIndicator, null)));
|
|
55
72
|
}
|
|
56
|
-
|
|
57
|
-
|
|
73
|
+
if (!this._defaultItems || this._defaultItems.selectionScope) {
|
|
74
|
+
const SelectionScope = (0, withStatusFieldProps_1.withStatusFieldProps)(SelectionScope_1.SelectionScopeField);
|
|
75
|
+
statusBarItems.push(StatusBarItemUtilities_1.StatusBarItemUtilities.createStatusBarItem("uifw.SelectionScope", appui_abstract_1.StatusBarSection.Right, 20, React.createElement(SelectionScope, null)));
|
|
58
76
|
}
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
const MessageCenter = (0, withMessageCenterFieldProps_1.withMessageCenterFieldProps)(MessageCenter_1.MessageCenterField);
|
|
63
|
-
statusBarItems.push(StatusBarItemUtilities_1.StatusBarItemUtilities.createStatusBarItem("uifw.MessageCenter", appui_abstract_1.StatusBarSection.Left, 10, React.createElement(MessageCenter, null)));
|
|
64
|
-
}
|
|
65
|
-
if (!this._defaultItems || this._defaultItems.toolAssistance) {
|
|
66
|
-
if (!this._defaultItems || this._defaultItems.preToolAssistanceSeparator)
|
|
67
|
-
statusBarItems.push(StatusBarItemUtilities_1.StatusBarItemUtilities.createStatusBarItem("uifw.PreToolAssistance", appui_abstract_1.StatusBarSection.Left, 15, React.createElement(appui_layout_react_1.FooterSeparator, null)));
|
|
68
|
-
const ToolAssistance = (0, withStatusFieldProps_1.withStatusFieldProps)(ToolAssistanceField_1.ToolAssistanceField);
|
|
69
|
-
statusBarItems.push(StatusBarItemUtilities_1.StatusBarItemUtilities.createStatusBarItem("uifw.ToolAssistance", appui_abstract_1.StatusBarSection.Left, 20, React.createElement(ToolAssistance, null)));
|
|
70
|
-
if (!this._defaultItems || this._defaultItems.postToolAssistanceSeparator)
|
|
71
|
-
statusBarItems.push(StatusBarItemUtilities_1.StatusBarItemUtilities.createStatusBarItem("uifw.PostToolAssistance", appui_abstract_1.StatusBarSection.Left, 25, React.createElement(appui_layout_react_1.FooterSeparator, null)));
|
|
72
|
-
}
|
|
73
|
-
if (!this._defaultItems || this._defaultItems.activityCenter) {
|
|
74
|
-
const ActivityCenter = (0, withStatusFieldProps_1.withStatusFieldProps)(ActivityCenter_1.ActivityCenterField);
|
|
75
|
-
statusBarItems.push(StatusBarItemUtilities_1.StatusBarItemUtilities.createStatusBarItem("uifw.ActivityCenter", appui_abstract_1.StatusBarSection.Left, 30, React.createElement(ActivityCenter, null)));
|
|
76
|
-
}
|
|
77
|
-
if (!this._defaultItems || this._defaultItems.accuSnapModePicker) {
|
|
78
|
-
const SnapMode = (0, withMessageCenterFieldProps_1.withMessageCenterFieldProps)(SnapMode_1.SnapModeField);
|
|
79
|
-
statusBarItems.push(StatusBarItemUtilities_1.StatusBarItemUtilities.createStatusBarItem("uifw.SnapMode", appui_abstract_1.StatusBarSection.Center, 10, React.createElement(SnapMode, null)));
|
|
80
|
-
}
|
|
81
|
-
if (!this._defaultItems || this._defaultItems.tileLoadIndicator) {
|
|
82
|
-
const TileLoadIndicator = (0, withStatusFieldProps_1.withStatusFieldProps)(TileLoadingIndicator_1.TileLoadingIndicator);
|
|
83
|
-
statusBarItems.push(StatusBarItemUtilities_1.StatusBarItemUtilities.createStatusBarItem("uifw.TileLoadIndicator", appui_abstract_1.StatusBarSection.Right, 10, React.createElement(TileLoadIndicator, null)));
|
|
84
|
-
}
|
|
85
|
-
if (!this._defaultItems || this._defaultItems.selectionScope) {
|
|
86
|
-
const SelectionScope = (0, withStatusFieldProps_1.withStatusFieldProps)(SelectionScope_1.SelectionScopeField);
|
|
87
|
-
statusBarItems.push(StatusBarItemUtilities_1.StatusBarItemUtilities.createStatusBarItem("uifw.SelectionScope", appui_abstract_1.StatusBarSection.Right, 20, React.createElement(SelectionScope, null)));
|
|
88
|
-
}
|
|
89
|
-
if (!this._defaultItems || this._defaultItems.selectionInfo) {
|
|
90
|
-
const SelectionInfo = (0, withStatusFieldProps_1.withStatusFieldProps)(SelectionInfo_1.SelectionInfoField);
|
|
91
|
-
statusBarItems.push(StatusBarItemUtilities_1.StatusBarItemUtilities.createStatusBarItem("uifw.SelectionInfo", appui_abstract_1.StatusBarSection.Right, 30, React.createElement(SelectionInfo, null)));
|
|
92
|
-
}
|
|
77
|
+
if (!this._defaultItems || this._defaultItems.selectionInfo) {
|
|
78
|
+
const SelectionInfo = (0, withStatusFieldProps_1.withStatusFieldProps)(SelectionInfo_1.SelectionInfoField);
|
|
79
|
+
statusBarItems.push(StatusBarItemUtilities_1.StatusBarItemUtilities.createStatusBarItem("uifw.SelectionInfo", appui_abstract_1.StatusBarSection.Right, 30, React.createElement(SelectionInfo, null)));
|
|
93
80
|
}
|
|
94
81
|
return statusBarItems;
|
|
95
82
|
}
|
|
@@ -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,+BAA+B;AAC/B,0DAA2H;AAC3H,kEAA4D;AAC5D,gFAA6E;AAC7E,4FAAyF;AACzF,4EAAyE;AACzE,iEAAmE;AACnE,0FAAuF;AACvF,mEAAqE;AACrE,uDAAyD;AACzD,iEAAmE;AACnE,2FAAwF;AACxF,mEAAqE;AAmBrE;;;GAGG;AACH,MAAa,8BAA8B;IACzC,YAAoB,WAAmB,EAAU,aAAqC,EAAU,iBAAwF;QAApK,gBAAW,GAAX,WAAW,CAAQ;QAAU,kBAAa,GAAb,aAAa,CAAwB;QAAU,sBAAiB,GAAjB,iBAAiB,CAAuE;IAAI,CAAC;IAE7L,IAAW,EAAE,KAAa,OAAO,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC;IAEpD;;;;;;;;MAQE;IACK,MAAM,CAAC,QAAQ,CAAC,UAAkB,EAAE,YAAoC,EAAE,gBAAuF;QACtK,+BAAc,CAAC,QAAQ,CAAC,IAAI,8BAA8B,CAAC,UAAU,EAAE,YAAY,EAAE,gBAAgB,CAAC,CAAC,CAAC;IAC1G,CAAC;IAEM,MAAM,CAAC,UAAU,CAAC,UAAkB;QACzC,+BAAc,CAAC,UAAU,CAAC,UAAU,CAAC,CAAC;IACxC,CAAC;IAEM,qBAAqB,CAAC,OAAe,EAAE,UAAkB,EAAE,YAAkB;QAClF,MAAM,cAAc,GAA0B,EAAE,CAAC;QACjD,IAAI,cAAc,GAAG,KAAK,CAAC;QAE3B,IAAI,IAAI,CAAC,iBAAiB,EAAE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CAAC,CAAC,CAAC;aACxI;YAED,IAAI,CAAC,IAAI,CAAC,aAAa,IAAI,IAAI,CAAC,aAAa,CAAC,aAAa,EAAE;gBAC3D,MAAM,aAAa,GAAG,IAAA,2CAAoB,EAAC,kCAAkB,CAAC,CAAC;gBAC/D,cAAc,CAAC,IAAI,CAAC,+CAAsB,CAAC,mBAAmB,CAAC,oBAAoB,EAAE,iCAAgB,CAAC,KAAK,EAAE,EAAE,EAAE,oBAAC,aAAa,OAAG,CAAC,CAAC,CAAC;aACtI;SACF;QAED,OAAO,cAAc,CAAC;IACxB,CAAC;CACF;AA3ED,wEA2EC","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,+BAA+B;AAC/B,0DAAmH;AACnH,kEAA4D;AAC5D,gFAA6E;AAC7E,4FAAyF;AACzF,4EAAyE;AACzE,iEAAmE;AACnE,0FAAuF;AACvF,mEAAqE;AACrE,uDAAyD;AACzD,iEAAmE;AACnE,2FAAwF;AACxF,mEAAqE;AAmBrE;;;GAGG;AACH,MAAa,8BAA+B,SAAQ,oCAAmB;IACrE,YAAY,UAAkB,EAAU,aAAqC,EAAE,gBAAuF;QACpK,KAAK,CAAC,UAAU,EAAE,gBAAgB,CAAC,CAAC;QADE,kBAAa,GAAb,aAAa,CAAwB;IAE7E,CAAC;IAED;;;;;;;;MAQE;IACK,MAAM,CAAC,QAAQ,CAAC,UAAkB,EAAE,YAAoC,EAAE,gBAAuF;QACtK,MAAM,QAAQ,GAAG,IAAI,8BAA8B,CAAC,UAAU,EAAE,YAAY,EAAE,gBAAgB,CAAC,CAAC;QAChG,+BAAc,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC;QAClC,OAAO,QAAQ,CAAC;IAClB,CAAC;IAEe,6BAA6B,CAAC,QAAgB,EAAE,WAAmB,EAAE,aAAmB;QACtG,MAAM,cAAc,GAA0B,EAAE,CAAC;QACjD,IAAI,CAAC,IAAI,CAAC,aAAa,IAAI,IAAI,CAAC,aAAa,CAAC,aAAa,EAAE;YAC3D,MAAM,aAAa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ED,OAAO,cAAc,CAAC;IACxB,CAAC;CACF;AA9DD,wEA8DC","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"}
|
|
@@ -44,6 +44,8 @@ class AppUiSettings {
|
|
|
44
44
|
await this.dragInteraction.saveSetting(UiFramework_1.UiFramework.getUiStateStorage());
|
|
45
45
|
if (args.eventIds.has("configurableui:set-framework-version"))
|
|
46
46
|
await this.frameworkVersion.saveSetting(UiFramework_1.UiFramework.getUiStateStorage());
|
|
47
|
+
if (args.eventIds.has("configurableui:set-show-widget-icon"))
|
|
48
|
+
await this.showWidgetIcon.saveSetting(UiFramework_1.UiFramework.getUiStateStorage());
|
|
47
49
|
if (args.eventIds.has("configurableui:set_widget_opacity"))
|
|
48
50
|
await this.widgetOpacity.saveSetting(UiFramework_1.UiFramework.getUiStateStorage());
|
|
49
51
|
};
|
|
@@ -52,6 +54,8 @@ class AppUiSettings {
|
|
|
52
54
|
this._settings.push(this.colorTheme);
|
|
53
55
|
this.dragInteraction = new core_react_1.UiStateEntry(AppUiSettings._settingNamespace, "DragInteraction", () => UiFramework_1.UiFramework.useDragInteraction, (value) => UiFramework_1.UiFramework.setUseDragInteraction(value), defaults.dragInteraction);
|
|
54
56
|
this._settings.push(this.dragInteraction);
|
|
57
|
+
this.showWidgetIcon = new core_react_1.UiStateEntry(AppUiSettings._settingNamespace, "ShowWidgetIcon", () => UiFramework_1.UiFramework.showWidgetIcon, (value) => UiFramework_1.UiFramework.setShowWidgetIcon(value), defaults.showWidgetIcon);
|
|
58
|
+
this._settings.push(this.showWidgetIcon);
|
|
55
59
|
this.frameworkVersion = new core_react_1.UiStateEntry(AppUiSettings._settingNamespace, "FrameworkVersion", () => UiFramework_1.UiFramework.uiVersion, (value) => UiFramework_1.UiFramework.setUiVersion(value), defaults.frameworkVersion);
|
|
56
60
|
this._settings.push(this.frameworkVersion);
|
|
57
61
|
this.widgetOpacity = new core_react_1.UiStateEntry(AppUiSettings._settingNamespace, "WidgetOpacity", () => UiFramework_1.UiFramework.getWidgetOpacity(), (value) => UiFramework_1.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,kDAAiE;AAEjE,2EAAwE;AACxE,gDAAuF;
|
|
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;AAevF;;;;;;;;;;GAUG;AACH,MAAa,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,yBA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,CAAC,iBAAiB,EAAE,eAAe,EAC5F,GAAG,EAAE,CAAC,yBAAW,CAAC,gBAAgB,EAAE,EAAE,CAAC,KAAa,EAAE,EAAE,CAAC,yBAAW,CAAC,gBAAgB,CAAC,KAAK,CAAC,EAAE,QAAQ,CAAC,aAAa,CAAC,CAAC;QACxH,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC;QAExC,6CAAqB,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;;AAhFH,sCAiFC;AA9EgB,+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;AA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K"}
|
|
@@ -31,6 +31,7 @@ const Tab_1 = require("./Tab");
|
|
|
31
31
|
const Toolbars_1 = require("./Toolbars");
|
|
32
32
|
const ToolSettings_1 = require("./ToolSettings");
|
|
33
33
|
const useEscapeSetFocusToHome_1 = require("../hooks/useEscapeSetFocusToHome");
|
|
34
|
+
const react_redux_1 = require("react-redux");
|
|
34
35
|
const panelZoneKeys = ["start", "middle", "end"];
|
|
35
36
|
// istanbul ignore next
|
|
36
37
|
const WidgetPanelsFrontstageComponent = React.memo(function WidgetPanelsFrontstageComponent() {
|
|
@@ -178,9 +179,13 @@ function ActiveFrontstageDefProvider({ frontstageDef }) {
|
|
|
178
179
|
useFrontstageManager(frontstageDef);
|
|
179
180
|
useItemsManager(frontstageDef);
|
|
180
181
|
const labels = useLabels();
|
|
182
|
+
const showWidgetIcon = (0, react_redux_1.useSelector)((state) => {
|
|
183
|
+
const frameworkState = state[UiFramework_1.UiFramework.frameworkStateKey];
|
|
184
|
+
return !!frameworkState.configurableUiState.showWidgetIcon;
|
|
185
|
+
});
|
|
181
186
|
const handleKeyDown = (0, useEscapeSetFocusToHome_1.useEscapeSetFocusToHome)();
|
|
182
187
|
return (React.createElement("div", { className: "uifw-widgetPanels-frontstage", onKeyDown: handleKeyDown, role: "presentation" },
|
|
183
|
-
React.createElement(appui_layout_react_1.NineZone, { dispatch: dispatch, labels: labels, state: nineZone, tab: tabElement, toolSettingsContent: toolSettingsContent, widgetContent: widgetContent }, widgetPanelsFrontstage)));
|
|
188
|
+
React.createElement(appui_layout_react_1.NineZone, { dispatch: dispatch, labels: labels, state: nineZone, tab: tabElement, showWidgetIcon: showWidgetIcon, toolSettingsContent: toolSettingsContent, widgetContent: widgetContent }, widgetPanelsFrontstage)));
|
|
184
189
|
}
|
|
185
190
|
exports.ActiveFrontstageDefProvider = ActiveFrontstageDefProvider;
|
|
186
191
|
/** @internal */
|
|
@@ -208,6 +213,7 @@ function addWidgets(state, widgets, side, widgetId) {
|
|
|
208
213
|
const label = getWidgetLabel(widget.label);
|
|
209
214
|
state = (0, appui_layout_react_1.addTab)(state, widget.id, {
|
|
210
215
|
label,
|
|
216
|
+
iconSpec: widget.iconSpec,
|
|
211
217
|
preferredPanelWidgetSize: widget.preferredPanelSize,
|
|
212
218
|
canPopout: widget.canPopout,
|
|
213
219
|
isFloatingStateWindowResizable: widget.isFloatingStateWindowResizable,
|
|
@@ -240,6 +246,7 @@ function appendWidgets(state, widgetDefs, side, preferredWidgetIndex) {
|
|
|
240
246
|
const userSized = saveTab ? saveTab.userSized : undefined;
|
|
241
247
|
state = (0, appui_layout_react_1.addTab)(state, widgetDef.id, {
|
|
242
248
|
label,
|
|
249
|
+
iconSpec: widgetDef.iconSpec,
|
|
243
250
|
canPopout: widgetDef.canPopout,
|
|
244
251
|
preferredPanelWidgetSize,
|
|
245
252
|
preferredFloatingWidgetSize,
|
|
@@ -607,6 +614,7 @@ function restoreNineZoneState(frontstageDef, saved) {
|
|
|
607
614
|
draft.tabs[tab.id] = {
|
|
608
615
|
...tab,
|
|
609
616
|
label: getWidgetLabel((_a = widgetDef === null || widgetDef === void 0 ? void 0 : widgetDef.label) !== null && _a !== void 0 ? _a : "undefined"),
|
|
617
|
+
iconSpec: widgetDef === null || widgetDef === void 0 ? void 0 : widgetDef.iconSpec,
|
|
610
618
|
canPopout: widgetDef === null || widgetDef === void 0 ? void 0 : widgetDef.canPopout,
|
|
611
619
|
isFloatingStateWindowResizable: widgetDef === null || widgetDef === void 0 ? void 0 : widgetDef.isFloatingStateWindowResizable,
|
|
612
620
|
};
|
|
@@ -627,7 +635,7 @@ function restoreNineZoneState(frontstageDef, saved) {
|
|
|
627
635
|
exports.restoreNineZoneState = restoreNineZoneState;
|
|
628
636
|
/** Prepares NineZoneState to be saved.
|
|
629
637
|
* @note Removes toolSettings tab.
|
|
630
|
-
* @note Removes tab labels.
|
|
638
|
+
* @note Removes tab labels and iconSpec.
|
|
631
639
|
* @internal
|
|
632
640
|
*/
|
|
633
641
|
function packNineZoneState(state) {
|