@itwin/appui-abstract 5.0.0-dev.4 → 5.0.0-dev.40
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +28 -1
- package/lib/cjs/appui-abstract/UiAdmin.js +2 -2
- package/lib/cjs/appui-abstract/UiAdmin.js.map +1 -1
- package/lib/cjs/appui-abstract/UiItemsManager.js +3 -3
- package/lib/cjs/appui-abstract/UiItemsManager.js.map +1 -1
- package/lib/cjs/appui-abstract/backstage/BackstageItem.js +24 -24
- package/lib/cjs/appui-abstract/backstage/BackstageItem.js.map +1 -1
- package/lib/cjs/appui-abstract/content/StandardContentLayouts.js +91 -91
- package/lib/cjs/appui-abstract/content/StandardContentLayouts.js.map +1 -1
- package/lib/cjs/appui-abstract/dialogs/DialogItem.d.ts +0 -4
- package/lib/cjs/appui-abstract/dialogs/DialogItem.d.ts.map +1 -1
- package/lib/cjs/appui-abstract/dialogs/DialogItem.js.map +1 -1
- package/lib/cjs/appui-abstract/dialogs/UiLayoutDataProvider.js +7 -7
- package/lib/cjs/appui-abstract/dialogs/UiLayoutDataProvider.js.map +1 -1
- package/lib/cjs/appui-abstract/statusbar/StatusBarItem.js +14 -14
- package/lib/cjs/appui-abstract/statusbar/StatusBarItem.js.map +1 -1
- package/lib/cjs/appui-abstract/toolbars/ToolbarItem.js +14 -14
- package/lib/cjs/appui-abstract/toolbars/ToolbarItem.js.map +1 -1
- package/lib/cjs/appui-abstract/utils/IconSpecUtilities.js +3 -3
- package/lib/cjs/appui-abstract/utils/IconSpecUtilities.js.map +1 -1
- package/lib/esm/appui-abstract/UiAdmin.js +2 -2
- package/lib/esm/appui-abstract/UiAdmin.js.map +1 -1
- package/lib/esm/appui-abstract/UiItemsManager.js +3 -3
- package/lib/esm/appui-abstract/UiItemsManager.js.map +1 -1
- package/lib/esm/appui-abstract/backstage/BackstageItem.js +24 -24
- package/lib/esm/appui-abstract/backstage/BackstageItem.js.map +1 -1
- package/lib/esm/appui-abstract/content/StandardContentLayouts.js +91 -91
- package/lib/esm/appui-abstract/content/StandardContentLayouts.js.map +1 -1
- package/lib/esm/appui-abstract/dialogs/DialogItem.d.ts +0 -4
- package/lib/esm/appui-abstract/dialogs/DialogItem.d.ts.map +1 -1
- package/lib/esm/appui-abstract/dialogs/DialogItem.js.map +1 -1
- package/lib/esm/appui-abstract/dialogs/UiLayoutDataProvider.js +7 -7
- package/lib/esm/appui-abstract/dialogs/UiLayoutDataProvider.js.map +1 -1
- package/lib/esm/appui-abstract/statusbar/StatusBarItem.js +14 -14
- package/lib/esm/appui-abstract/statusbar/StatusBarItem.js.map +1 -1
- package/lib/esm/appui-abstract/toolbars/ToolbarItem.js +14 -14
- package/lib/esm/appui-abstract/toolbars/ToolbarItem.js.map +1 -1
- package/lib/esm/appui-abstract/utils/IconSpecUtilities.js +3 -3
- package/lib/esm/appui-abstract/utils/IconSpecUtilities.js.map +1 -1
- package/package.json +8 -8
@@ -35,29 +35,29 @@ export const isStageLauncher = (item) => {
|
|
35
35
|
* @public
|
36
36
|
*/
|
37
37
|
export class BackstageItemUtilities {
|
38
|
+
/** Creates a stage launcher backstage item */
|
39
|
+
static { this.createStageLauncher = (frontstageId, groupPriority, itemPriority, label, subtitle, icon, overrides) => ({
|
40
|
+
groupPriority,
|
41
|
+
icon,
|
42
|
+
internalData: overrides?.internalData,
|
43
|
+
id: frontstageId,
|
44
|
+
itemPriority,
|
45
|
+
label,
|
46
|
+
stageId: frontstageId,
|
47
|
+
subtitle,
|
48
|
+
...overrides,
|
49
|
+
}); }
|
50
|
+
/** Creates an action backstage item */
|
51
|
+
static { this.createActionItem = (itemId, groupPriority, itemPriority, execute, label, subtitle, icon, overrides) => ({
|
52
|
+
execute,
|
53
|
+
groupPriority,
|
54
|
+
icon,
|
55
|
+
internalData: overrides?.internalData,
|
56
|
+
id: itemId,
|
57
|
+
itemPriority,
|
58
|
+
label,
|
59
|
+
subtitle,
|
60
|
+
...overrides,
|
61
|
+
}); }
|
38
62
|
}
|
39
|
-
/** Creates a stage launcher backstage item */
|
40
|
-
BackstageItemUtilities.createStageLauncher = (frontstageId, groupPriority, itemPriority, label, subtitle, icon, overrides) => ({
|
41
|
-
groupPriority,
|
42
|
-
icon,
|
43
|
-
internalData: overrides?.internalData,
|
44
|
-
id: frontstageId,
|
45
|
-
itemPriority,
|
46
|
-
label,
|
47
|
-
stageId: frontstageId,
|
48
|
-
subtitle,
|
49
|
-
...overrides,
|
50
|
-
});
|
51
|
-
/** Creates an action backstage item */
|
52
|
-
BackstageItemUtilities.createActionItem = (itemId, groupPriority, itemPriority, execute, label, subtitle, icon, overrides) => ({
|
53
|
-
execute,
|
54
|
-
groupPriority,
|
55
|
-
icon,
|
56
|
-
internalData: overrides?.internalData,
|
57
|
-
id: itemId,
|
58
|
-
itemPriority,
|
59
|
-
label,
|
60
|
-
subtitle,
|
61
|
-
...overrides,
|
62
|
-
});
|
63
63
|
//# sourceMappingURL=BackstageItem.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"BackstageItem.js","sourceRoot":"","sources":["../../../../src/appui-abstract/backstage/BackstageItem.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAOH;;;GAGG;AACH,MAAM,CAAN,IAAY,iBAKX;AALD,WAAY,iBAAiB;IAC3B,4CAA4C;IAC5C,qEAAc,CAAA;IACd,kCAAkC;IAClC,2EAAiB,CAAA;AACnB,CAAC,EALW,iBAAiB,KAAjB,iBAAiB,QAK5B;AA4DD;;;GAGG;AACH,MAAM,CAAC,MAAM,YAAY,GAAG,CAAC,IAAmB,EAA+B,EAAE;IAC/E,OAAQ,IAA4B,CAAC,OAAO,KAAK,SAAS,CAAC,CAAC,uDAAuD;AACrH,CAAC,CAAC;AAEF;;;GAGG;AACH,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC,IAAmB,EAAkC,EAAE;IACrF,OAAQ,IAA+B,CAAC,OAAO,KAAK,SAAS,CAAC,CAAC,uDAAuD;AACxH,CAAC,CAAC;AAEF;;;GAGG;AACH,MAAM,OAAO,sBAAsB
|
1
|
+
{"version":3,"file":"BackstageItem.js","sourceRoot":"","sources":["../../../../src/appui-abstract/backstage/BackstageItem.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAOH;;;GAGG;AACH,MAAM,CAAN,IAAY,iBAKX;AALD,WAAY,iBAAiB;IAC3B,4CAA4C;IAC5C,qEAAc,CAAA;IACd,kCAAkC;IAClC,2EAAiB,CAAA;AACnB,CAAC,EALW,iBAAiB,KAAjB,iBAAiB,QAK5B;AA4DD;;;GAGG;AACH,MAAM,CAAC,MAAM,YAAY,GAAG,CAAC,IAAmB,EAA+B,EAAE;IAC/E,OAAQ,IAA4B,CAAC,OAAO,KAAK,SAAS,CAAC,CAAC,uDAAuD;AACrH,CAAC,CAAC;AAEF;;;GAGG;AACH,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC,IAAmB,EAAkC,EAAE;IACrF,OAAQ,IAA+B,CAAC,OAAO,KAAK,SAAS,CAAC,CAAC,uDAAuD;AACxH,CAAC,CAAC;AAEF;;;GAGG;AACH,MAAM,OAAO,sBAAsB;IACjC,8CAA8C;aAChC,wBAAmB,GAAG,CAClC,YAAoB,EAAE,aAAqB,EAAE,YAAoB,EAAE,KAAsC,EACzG,QAA0C,EAAE,IAAsC,EAAE,SAA2C,EACvG,EAAE,CAAC,CAAC;QAC5B,aAAa;QACb,IAAI;QACJ,YAAY,EAAE,SAAS,EAAE,YAAY;QACrC,EAAE,EAAE,YAAY;QAChB,YAAY;QACZ,KAAK;QACL,OAAO,EAAE,YAAY;QACrB,QAAQ;QACR,GAAG,SAAS;KACb,CAAC,CAAC;IAEH,uCAAuC;aACzB,qBAAgB,GAAG,CAC/B,MAAc,EAAE,aAAqB,EAAE,YAAoB,EAAE,OAAmB,EAAE,KAAsC,EACxH,QAA0C,EAAE,IAAsC,EAAE,SAAwC,EACvG,EAAE,CAAC,CAAC;QACzB,OAAO;QACP,aAAa;QACb,IAAI;QACJ,YAAY,EAAE,SAAS,EAAE,YAAY;QACrC,EAAE,EAAE,MAAM;QACV,YAAY;QACZ,KAAK;QACL,QAAQ;QACR,GAAG,SAAS;KACb,CAAC,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module Backstage\n */\n\nimport { BadgeType } from \"../items/BadgeType\";\nimport { ConditionalBooleanValue } from \"../items/ConditionalBooleanValue\";\nimport { ConditionalStringValue } from \"../items/ConditionalStringValue\";\nimport { ProvidedItem } from \"../items/ProvidedItem\";\n\n/** Used to specify the item type added to the backstage menu.\n * @deprecated in 3.6. Use type guards instead.\n * @public\n */\nexport enum BackstageItemType {\n /** Item that executes an action function */\n ActionItem = 1,\n /** Item that activate a stage. */\n StageLauncher = 2,\n}\n\n/** Describes the data needed to insert a button into the backstage menu.\n * @deprecated in 3.6. Use [CommonBackstageItem]($appui-react) instead.\n * @public\n */\nexport interface CommonBackstageItem extends ProvidedItem { // eslint-disable-line @typescript-eslint/no-deprecated\n /** can be used by application to store miscellaneous data. */\n applicationData?: any;\n /** Describes badge. Renders no badge if not specified. */\n readonly badgeType?: BadgeType;\n /** Specifies the item's grouping value. Items are sorted by group and then item priority. When\n * group priority changes a separator is inserted. It is recommended using values 10 through 100, incrementing by 10. This\n * allows extensions enough gaps to insert their own groups.\n */\n readonly groupPriority: number;\n /** Name of icon WebFont entry or if specifying an imported SVG symbol use \"webSvg:\" prefix to imported symbol Id. */\n readonly icon?: string | ConditionalStringValue;\n /** Required unique id of the item. To ensure uniqueness it is suggested that a namespace prefix of the extension name be used. */\n readonly id: string;\n /** optional data to be used by item implementor. */\n readonly internalData?: Map<string, any>;\n /** Describes if the item is visible or hidden. The default is for the item to be visible. */\n readonly isHidden?: boolean | ConditionalBooleanValue;\n /** Describes if the item is enabled or disabled. The default is for the item to be enabled. */\n readonly isDisabled?: boolean | ConditionalBooleanValue;\n /** Priority within a group (recommend using values 1 through 100). */\n readonly itemPriority: number;\n /** Label. */\n readonly label: string | ConditionalStringValue;\n /** Subtitle. */\n readonly subtitle?: string | ConditionalStringValue;\n /** Tooltip. */\n readonly tooltip?: string | ConditionalStringValue;\n /** Describes if the item is active. The default is for the item to be active if stageId matches activeFrontstageId */\n readonly isActive?: boolean | ConditionalBooleanValue;\n}\n\n/** Describes the data needed to insert an action button into the backstage menu.\n * @deprecated in 3.6. Use [BackstageActionItem]($appui-react) instead.\n * @public\n */\nexport interface BackstageActionItem extends CommonBackstageItem { // eslint-disable-line @typescript-eslint/no-deprecated\n readonly execute: () => void;\n}\n\n/** Describes the data needed to insert an action button into the backstage menu.\n * @deprecated in 3.6. Use [BackstageActionItem]($appui-react) instead.\n * @public\n */\nexport interface BackstageStageLauncher extends CommonBackstageItem { // eslint-disable-line @typescript-eslint/no-deprecated\n readonly stageId: string;\n}\n\n/** Describes the data needed to insert a button into the backstage menu.\n * @deprecated in 3.6. Use [BackstageItem]($appui-react) instead.\n * @public\n */\nexport type BackstageItem = BackstageActionItem | BackstageStageLauncher; // eslint-disable-line @typescript-eslint/no-deprecated\n\n/** BackstageActionItem type guard.\n * @deprecated in 3.6. Use [isBackstageActionItem]($appui-react) instead.\n * @public\n */\nexport const isActionItem = (item: BackstageItem): item is BackstageActionItem => { // eslint-disable-line @typescript-eslint/no-deprecated\n return (item as BackstageActionItem).execute !== undefined; // eslint-disable-line @typescript-eslint/no-deprecated\n};\n\n/** BackstageStageLauncher type guard.\n * @deprecated in 3.6. Use [isBackstageStageLauncher]($appui-react) instead.\n * @public\n */\nexport const isStageLauncher = (item: BackstageItem): item is BackstageStageLauncher => { // eslint-disable-line @typescript-eslint/no-deprecated\n return (item as BackstageStageLauncher).stageId !== undefined; // eslint-disable-line @typescript-eslint/no-deprecated\n};\n\n/** Utilities for creating and maintaining backstage items\n * @deprecated in 3.6. Use [BackstageItemUtilities]($appui-react) instead.\n * @public\n */\nexport class BackstageItemUtilities {\n /** Creates a stage launcher backstage item */\n public static createStageLauncher = (\n frontstageId: string, groupPriority: number, itemPriority: number, label: string | ConditionalStringValue,\n subtitle?: string | ConditionalStringValue, icon?: string | ConditionalStringValue, overrides?: Partial<BackstageStageLauncher>, // eslint-disable-line @typescript-eslint/no-deprecated\n ): BackstageStageLauncher => ({ // eslint-disable-line @typescript-eslint/no-deprecated\n groupPriority,\n icon,\n internalData: overrides?.internalData,\n id: frontstageId,\n itemPriority,\n label,\n stageId: frontstageId,\n subtitle,\n ...overrides,\n });\n\n /** Creates an action backstage item */\n public static createActionItem = (\n itemId: string, groupPriority: number, itemPriority: number, execute: () => void, label: string | ConditionalStringValue,\n subtitle?: string | ConditionalStringValue, icon?: string | ConditionalStringValue, overrides?: Partial<BackstageActionItem>, // eslint-disable-line @typescript-eslint/no-deprecated\n ): BackstageActionItem => ({ // eslint-disable-line @typescript-eslint/no-deprecated\n execute,\n groupPriority,\n icon,\n internalData: overrides?.internalData,\n id: itemId,\n itemPriority,\n label,\n subtitle,\n ...overrides,\n });\n}\n"]}
|
@@ -12,96 +12,96 @@
|
|
12
12
|
* @deprecated in 4.10.x. Use `StandardContentLayouts` from `@itwin/appui-react`.
|
13
13
|
*/
|
14
14
|
export class StandardContentLayouts {
|
15
|
+
static { this.singleView = {
|
16
|
+
id: "uia:singleView",
|
17
|
+
description: "Single Content View",
|
18
|
+
}; }
|
19
|
+
static { this.fourQuadrants = {
|
20
|
+
id: "uia:fourQuadrants",
|
21
|
+
description: "Four Views, two stacked on the left, two stacked on the right",
|
22
|
+
verticalSplit: {
|
23
|
+
id: "uia:fourQuadrantVerticalSplit",
|
24
|
+
percentage: 0.50,
|
25
|
+
lock: false,
|
26
|
+
minSizeLeft: 100,
|
27
|
+
minSizeRight: 100,
|
28
|
+
left: { horizontalSplit: { id: "uia:fourQuadrantsLeftHorizontal", percentage: 0.50, top: 0, bottom: 1, lock: false, minSizeTop: 50, minSizeBottom: 50 } },
|
29
|
+
right: { horizontalSplit: { id: "uia:fourQuadrantsRightHorizontal", percentage: 0.50, top: 2, bottom: 3, lock: false, minSizeTop: 50, minSizeBottom: 50 } },
|
30
|
+
},
|
31
|
+
}; }
|
32
|
+
static { this.twoVerticalSplit = {
|
33
|
+
id: "uia:twoVerticalSplit",
|
34
|
+
description: "Two Views, side by side",
|
35
|
+
verticalSplit: {
|
36
|
+
id: "uia:twoViewsVerticalSplit",
|
37
|
+
percentage: 0.50,
|
38
|
+
left: 0,
|
39
|
+
right: 1,
|
40
|
+
},
|
41
|
+
}; }
|
42
|
+
static { this.twoHorizontalSplit = {
|
43
|
+
id: "uia:twoHorizontalSplit",
|
44
|
+
description: "Two views, stack one on top of the other",
|
45
|
+
horizontalSplit: {
|
46
|
+
id: "uia:twoViewsHorizontalSplit",
|
47
|
+
percentage: 0.50,
|
48
|
+
lock: false,
|
49
|
+
top: 0,
|
50
|
+
bottom: 1,
|
51
|
+
},
|
52
|
+
}; }
|
53
|
+
static { this.threeViewsTwoOnLeft = {
|
54
|
+
id: "uia:threeViewsTwoOnLeft",
|
55
|
+
description: "Three views, one on the right with the two on the left stacked one of top of the other",
|
56
|
+
verticalSplit: {
|
57
|
+
id: "uia:twoViewsOnLeftSplit",
|
58
|
+
percentage: 0.50,
|
59
|
+
left: { horizontalSplit: { id: "uia:twoViewsOnLeftHorizontal", percentage: 0.50, top: 0, bottom: 1, lock: false, minSizeTop: 50, minSizeBottom: 50 } },
|
60
|
+
right: 2,
|
61
|
+
},
|
62
|
+
}; }
|
63
|
+
static { this.threeViewsTwoOnRight = {
|
64
|
+
id: "uia:threeViewsTwoOnRight",
|
65
|
+
description: "Three views, one on the left with the two on the right stacked one of top of the other",
|
66
|
+
verticalSplit: {
|
67
|
+
id: "uia:twoViewsOnRightSplit",
|
68
|
+
percentage: 0.50,
|
69
|
+
left: 0,
|
70
|
+
right: { horizontalSplit: { id: "uia:twoViewsOnRightHorizontal", percentage: 0.50, top: 1, bottom: 2, lock: false, minSizeTop: 50, minSizeBottom: 50 } },
|
71
|
+
},
|
72
|
+
}; }
|
73
|
+
static { this.threeViewsTwoOnBottom = {
|
74
|
+
id: "uia:threeViewsTwoOnBottom",
|
75
|
+
description: "Three Views, one on top and two side by side on the bottom",
|
76
|
+
horizontalSplit: {
|
77
|
+
id: "uia:threeViewsTwoOnBottomHorizontal",
|
78
|
+
percentage: 0.50,
|
79
|
+
lock: false,
|
80
|
+
top: 0,
|
81
|
+
bottom: { verticalSplit: { id: "uia:twoViewsOnBottomVertical", percentage: 0.50, left: 1, right: 2, lock: false, minSizeLeft: 50, minSizeRight: 50 } },
|
82
|
+
},
|
83
|
+
}; }
|
84
|
+
static { this.threeViewsTwoOnTop = {
|
85
|
+
id: "uia:threeViewsTwoOnTop",
|
86
|
+
description: "Three Views, two side by side on top and one on the bottom",
|
87
|
+
horizontalSplit: {
|
88
|
+
id: "uia:twoViewsOnTopHorizontal",
|
89
|
+
percentage: 0.50,
|
90
|
+
lock: false,
|
91
|
+
top: { verticalSplit: { id: "uia:twoViewsOnTopVertical", percentage: 0.50, left: 0, right: 1, lock: false, minSizeLeft: 50, minSizeRight: 50 } },
|
92
|
+
bottom: 2,
|
93
|
+
},
|
94
|
+
}; }
|
95
|
+
// provides and iterable list of standard content layouts
|
96
|
+
static { this.availableLayouts = [
|
97
|
+
StandardContentLayouts.singleView,
|
98
|
+
StandardContentLayouts.fourQuadrants,
|
99
|
+
StandardContentLayouts.twoVerticalSplit,
|
100
|
+
StandardContentLayouts.twoHorizontalSplit,
|
101
|
+
StandardContentLayouts.threeViewsTwoOnLeft,
|
102
|
+
StandardContentLayouts.threeViewsTwoOnRight,
|
103
|
+
StandardContentLayouts.threeViewsTwoOnBottom,
|
104
|
+
StandardContentLayouts.threeViewsTwoOnTop,
|
105
|
+
]; }
|
15
106
|
}
|
16
|
-
StandardContentLayouts.singleView = {
|
17
|
-
id: "uia:singleView",
|
18
|
-
description: "Single Content View",
|
19
|
-
};
|
20
|
-
StandardContentLayouts.fourQuadrants = {
|
21
|
-
id: "uia:fourQuadrants",
|
22
|
-
description: "Four Views, two stacked on the left, two stacked on the right",
|
23
|
-
verticalSplit: {
|
24
|
-
id: "uia:fourQuadrantVerticalSplit",
|
25
|
-
percentage: 0.50,
|
26
|
-
lock: false,
|
27
|
-
minSizeLeft: 100,
|
28
|
-
minSizeRight: 100,
|
29
|
-
left: { horizontalSplit: { id: "uia:fourQuadrantsLeftHorizontal", percentage: 0.50, top: 0, bottom: 1, lock: false, minSizeTop: 50, minSizeBottom: 50 } },
|
30
|
-
right: { horizontalSplit: { id: "uia:fourQuadrantsRightHorizontal", percentage: 0.50, top: 2, bottom: 3, lock: false, minSizeTop: 50, minSizeBottom: 50 } },
|
31
|
-
},
|
32
|
-
};
|
33
|
-
StandardContentLayouts.twoVerticalSplit = {
|
34
|
-
id: "uia:twoVerticalSplit",
|
35
|
-
description: "Two Views, side by side",
|
36
|
-
verticalSplit: {
|
37
|
-
id: "uia:twoViewsVerticalSplit",
|
38
|
-
percentage: 0.50,
|
39
|
-
left: 0,
|
40
|
-
right: 1,
|
41
|
-
},
|
42
|
-
};
|
43
|
-
StandardContentLayouts.twoHorizontalSplit = {
|
44
|
-
id: "uia:twoHorizontalSplit",
|
45
|
-
description: "Two views, stack one on top of the other",
|
46
|
-
horizontalSplit: {
|
47
|
-
id: "uia:twoViewsHorizontalSplit",
|
48
|
-
percentage: 0.50,
|
49
|
-
lock: false,
|
50
|
-
top: 0,
|
51
|
-
bottom: 1,
|
52
|
-
},
|
53
|
-
};
|
54
|
-
StandardContentLayouts.threeViewsTwoOnLeft = {
|
55
|
-
id: "uia:threeViewsTwoOnLeft",
|
56
|
-
description: "Three views, one on the right with the two on the left stacked one of top of the other",
|
57
|
-
verticalSplit: {
|
58
|
-
id: "uia:twoViewsOnLeftSplit",
|
59
|
-
percentage: 0.50,
|
60
|
-
left: { horizontalSplit: { id: "uia:twoViewsOnLeftHorizontal", percentage: 0.50, top: 0, bottom: 1, lock: false, minSizeTop: 50, minSizeBottom: 50 } },
|
61
|
-
right: 2,
|
62
|
-
},
|
63
|
-
};
|
64
|
-
StandardContentLayouts.threeViewsTwoOnRight = {
|
65
|
-
id: "uia:threeViewsTwoOnRight",
|
66
|
-
description: "Three views, one on the left with the two on the right stacked one of top of the other",
|
67
|
-
verticalSplit: {
|
68
|
-
id: "uia:twoViewsOnRightSplit",
|
69
|
-
percentage: 0.50,
|
70
|
-
left: 0,
|
71
|
-
right: { horizontalSplit: { id: "uia:twoViewsOnRightHorizontal", percentage: 0.50, top: 1, bottom: 2, lock: false, minSizeTop: 50, minSizeBottom: 50 } },
|
72
|
-
},
|
73
|
-
};
|
74
|
-
StandardContentLayouts.threeViewsTwoOnBottom = {
|
75
|
-
id: "uia:threeViewsTwoOnBottom",
|
76
|
-
description: "Three Views, one on top and two side by side on the bottom",
|
77
|
-
horizontalSplit: {
|
78
|
-
id: "uia:threeViewsTwoOnBottomHorizontal",
|
79
|
-
percentage: 0.50,
|
80
|
-
lock: false,
|
81
|
-
top: 0,
|
82
|
-
bottom: { verticalSplit: { id: "uia:twoViewsOnBottomVertical", percentage: 0.50, left: 1, right: 2, lock: false, minSizeLeft: 50, minSizeRight: 50 } },
|
83
|
-
},
|
84
|
-
};
|
85
|
-
StandardContentLayouts.threeViewsTwoOnTop = {
|
86
|
-
id: "uia:threeViewsTwoOnTop",
|
87
|
-
description: "Three Views, two side by side on top and one on the bottom",
|
88
|
-
horizontalSplit: {
|
89
|
-
id: "uia:twoViewsOnTopHorizontal",
|
90
|
-
percentage: 0.50,
|
91
|
-
lock: false,
|
92
|
-
top: { verticalSplit: { id: "uia:twoViewsOnTopVertical", percentage: 0.50, left: 0, right: 1, lock: false, minSizeLeft: 50, minSizeRight: 50 } },
|
93
|
-
bottom: 2,
|
94
|
-
},
|
95
|
-
};
|
96
|
-
// provides and iterable list of standard content layouts
|
97
|
-
StandardContentLayouts.availableLayouts = [
|
98
|
-
StandardContentLayouts.singleView,
|
99
|
-
StandardContentLayouts.fourQuadrants,
|
100
|
-
StandardContentLayouts.twoVerticalSplit,
|
101
|
-
StandardContentLayouts.twoHorizontalSplit,
|
102
|
-
StandardContentLayouts.threeViewsTwoOnLeft,
|
103
|
-
StandardContentLayouts.threeViewsTwoOnRight,
|
104
|
-
StandardContentLayouts.threeViewsTwoOnBottom,
|
105
|
-
StandardContentLayouts.threeViewsTwoOnTop,
|
106
|
-
];
|
107
107
|
//# sourceMappingURL=StandardContentLayouts.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"StandardContentLayouts.js","sourceRoot":"","sources":["../../../../src/appui-abstract/content/StandardContentLayouts.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAIH,qDAAqD;AAErD;;;;GAIG;AACH,MAAM,OAAO,sBAAsB
|
1
|
+
{"version":3,"file":"StandardContentLayouts.js","sourceRoot":"","sources":["../../../../src/appui-abstract/content/StandardContentLayouts.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAIH,qDAAqD;AAErD;;;;GAIG;AACH,MAAM,OAAO,sBAAsB;aACV,eAAU,GAAuB;QACtD,EAAE,EAAE,gBAAgB;QACpB,WAAW,EAAE,qBAAqB;KACnC,CAAC;aAEqB,kBAAa,GAAuB;QACzD,EAAE,EAAE,mBAAmB;QACvB,WAAW,EAAE,+DAA+D;QAC5E,aAAa,EAAE;YACb,EAAE,EAAE,+BAA+B;YACnC,UAAU,EAAE,IAAI;YAChB,IAAI,EAAE,KAAK;YACX,WAAW,EAAE,GAAG;YAChB,YAAY,EAAE,GAAG;YACjB,IAAI,EAAE,EAAE,eAAe,EAAE,EAAE,EAAE,EAAE,iCAAiC,EAAE,UAAU,EAAE,IAAI,EAAE,GAAG,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,UAAU,EAAE,EAAE,EAAE,aAAa,EAAE,EAAE,EAAE,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AAgB;QACvC,sBAAsB,CAAC,kBAAkB;QACzC,sBAAsB,CAAC,mBAAmB;QAC1C,sBAAsB,CAAC,oBAAoB;QAC3C,sBAAsB,CAAC,qBAAqB;QAC5C,sBAAsB,CAAC,kBAAkB;KAC1C,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module ContentView\n */\n\nimport { ContentLayoutProps } from \"./ContentLayoutProps\";\n\n/* eslint-disable @typescript-eslint/no-deprecated */\n\n/**\n * Class that define Standard Content Layouts that can be used to specify how the content is arranged in a frontstage.\n * @public\n * @deprecated in 4.10.x. Use `StandardContentLayouts` from `@itwin/appui-react`.\n */\nexport class StandardContentLayouts {\n public static readonly singleView: ContentLayoutProps = {\n id: \"uia:singleView\",\n description: \"Single Content View\",\n };\n\n public static readonly fourQuadrants: ContentLayoutProps = {\n id: \"uia:fourQuadrants\",\n description: \"Four Views, two stacked on the left, two stacked on the right\",\n verticalSplit: {\n id: \"uia:fourQuadrantVerticalSplit\",\n percentage: 0.50,\n lock: false,\n minSizeLeft: 100,\n minSizeRight: 100,\n left: { horizontalSplit: { id: \"uia:fourQuadrantsLeftHorizontal\", percentage: 0.50, top: 0, bottom: 1, lock: false, minSizeTop: 50, minSizeBottom: 50 } },\n right: { horizontalSplit: { id: \"uia:fourQuadrantsRightHorizontal\", percentage: 0.50, top: 2, bottom: 3, lock: false, minSizeTop: 50, minSizeBottom: 50 } },\n },\n };\n\n public static readonly twoVerticalSplit: ContentLayoutProps = {\n id: \"uia:twoVerticalSplit\",\n description: \"Two Views, side by side\",\n verticalSplit: {\n id: \"uia:twoViewsVerticalSplit\",\n percentage: 0.50,\n left: 0,\n right: 1,\n },\n };\n public static readonly twoHorizontalSplit: ContentLayoutProps = {\n id: \"uia:twoHorizontalSplit\",\n description: \"Two views, stack one on top of the other\",\n horizontalSplit: {\n id: \"uia:twoViewsHorizontalSplit\",\n percentage: 0.50,\n lock: false,\n top: 0,\n bottom: 1,\n },\n };\n\n public static readonly threeViewsTwoOnLeft: ContentLayoutProps = {\n id: \"uia:threeViewsTwoOnLeft\",\n description: \"Three views, one on the right with the two on the left stacked one of top of the other\",\n verticalSplit: {\n id: \"uia:twoViewsOnLeftSplit\",\n percentage: 0.50,\n left: { horizontalSplit: { id: \"uia:twoViewsOnLeftHorizontal\", percentage: 0.50, top: 0, bottom: 1, lock: false, minSizeTop: 50, minSizeBottom: 50 } },\n right: 2,\n },\n };\n\n public static readonly threeViewsTwoOnRight: ContentLayoutProps = {\n id: \"uia:threeViewsTwoOnRight\",\n description: \"Three views, one on the left with the two on the right stacked one of top of the other\",\n verticalSplit: {\n id: \"uia:twoViewsOnRightSplit\",\n percentage: 0.50,\n left: 0,\n right: { horizontalSplit: { id: \"uia:twoViewsOnRightHorizontal\", percentage: 0.50, top: 1, bottom: 2, lock: false, minSizeTop: 50, minSizeBottom: 50 } },\n },\n };\n\n public static readonly threeViewsTwoOnBottom: ContentLayoutProps = {\n id: \"uia:threeViewsTwoOnBottom\",\n description: \"Three Views, one on top and two side by side on the bottom\",\n horizontalSplit: {\n id: \"uia:threeViewsTwoOnBottomHorizontal\",\n percentage: 0.50,\n lock: false,\n top: 0,\n bottom: { verticalSplit: { id: \"uia:twoViewsOnBottomVertical\", percentage: 0.50, left: 1, right: 2, lock: false, minSizeLeft: 50, minSizeRight: 50 } },\n },\n };\n\n public static readonly threeViewsTwoOnTop: ContentLayoutProps = {\n id: \"uia:threeViewsTwoOnTop\",\n description: \"Three Views, two side by side on top and one on the bottom\",\n horizontalSplit: {\n id: \"uia:twoViewsOnTopHorizontal\",\n percentage: 0.50,\n lock: false,\n top: { verticalSplit: { id: \"uia:twoViewsOnTopVertical\", percentage: 0.50, left: 0, right: 1, lock: false, minSizeLeft: 50, minSizeRight: 50 } },\n bottom: 2,\n },\n };\n\n // provides and iterable list of standard content layouts\n public static readonly availableLayouts: ContentLayoutProps[] = [\n StandardContentLayouts.singleView,\n StandardContentLayouts.fourQuadrants,\n StandardContentLayouts.twoVerticalSplit,\n StandardContentLayouts.twoHorizontalSplit,\n StandardContentLayouts.threeViewsTwoOnLeft,\n StandardContentLayouts.threeViewsTwoOnRight,\n StandardContentLayouts.threeViewsTwoOnBottom,\n StandardContentLayouts.threeViewsTwoOnTop,\n ];\n\n}\n"]}
|
@@ -17,10 +17,6 @@ export interface EditorPosition {
|
|
17
17
|
rowPriority: number;
|
18
18
|
/** Determines the column position for the type editor */
|
19
19
|
columnIndex: number;
|
20
|
-
/** Number of columns to occupy. Defaults to 1
|
21
|
-
* @deprecated in 2.19. No longer necessary, ignored.
|
22
|
-
*/
|
23
|
-
columnSpan?: number;
|
24
20
|
}
|
25
21
|
/** [[BaseDialogItem]] contains only the members necessary to create a PropertyRecord.
|
26
22
|
* @public
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"DialogItem.d.ts","sourceRoot":"","sources":["../../../../src/appui-abstract/dialogs/DialogItem.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,EAAE,mBAAmB,EAAE,MAAM,2BAA2B,CAAC;AAEhE;;GAEG;AACH,MAAM,WAAW,eAAe;IAC9B,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,IAAI,CAAC;IACzC,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AACD;;GAEG;AACH,MAAM,WAAW,cAAc;IAC7B,iDAAiD;IACjD,WAAW,EAAE,MAAM,CAAC;IACpB,yDAAyD;IACzD,WAAW,EAAE,MAAM,CAAC;
|
1
|
+
{"version":3,"file":"DialogItem.d.ts","sourceRoot":"","sources":["../../../../src/appui-abstract/dialogs/DialogItem.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,EAAE,mBAAmB,EAAE,MAAM,2BAA2B,CAAC;AAEhE;;GAEG;AACH,MAAM,WAAW,eAAe;IAC9B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AAW,KAAK,IAIM,CAAC,CAFtB;IAED,IAAW,KAAK,CAAC,GAAG,EAAE,CAAC,EAEtB;IAED,IAAW,IAAI,WAEd;IAED,IAAW,YAAY,CAAC,GAAG,EAAE,MAAM,GAAG,SAAS,EAE9C;IAED,IAAW,YAAY,IAJM,MAAM,GAAG,SAAS,CAM9C;IAED,IAAW,eAAe,IAWM,eAAe,CAF9C;IAED,IAAW,eAAe,CAAC,GAAG,EAAE,eAAe,EAG9C;IAED,IAAW,QAAQ,IAAI,sBAAsB,CAG5C;IAED,IAAW,IAAI,IAAI,kBAAkB,CAEpC;IAEM,YAAY,CAAC,cAAc,EAAE,cAAc,EAAE,YAAY,CAAC,EAAE,UAAU,GAAG,UAAU;CAG3F"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"DialogItem.js","sourceRoot":"","sources":["../../../../src/appui-abstract/dialogs/DialogItem.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;
|
1
|
+
{"version":3,"file":"DialogItem.js","sourceRoot":"","sources":["../../../../src/appui-abstract/dialogs/DialogItem.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAqDH;;GAEG;AACH,MAAM,OAAO,cAAc;IACzB,YAAmB,WAAgC,EAAU,MAAS,EAAU,aAAsB,EAAU,WAAqB;QAAlH,gBAAW,GAAX,WAAW,CAAqB;QAAU,WAAM,GAAN,MAAM,CAAG;QAAU,kBAAa,GAAb,aAAa,CAAS;QAAU,gBAAW,GAAX,WAAW,CAAU;IAAI,CAAC;IAE1I,IAAW,UAAU;QACnB,OAAO,CAAC,CAAC,IAAI,CAAC,WAAW,CAAC;IAC5B,CAAC;IAED,IAAW,UAAU,CAAC,GAAY;QAChC,IAAI,CAAC,WAAW,GAAG,GAAG,CAAC;IACzB,CAAC;IAED,IAAW,KAAK;QACd,OAAO,IAAI,CAAC,MAAM,CAAC;IACrB,CAAC;IAED,IAAW,KAAK,CAAC,GAAM;QACrB,IAAI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,CAAC,eAAe,EAAE,QAAQ,EAAE,IAAI,CAAC,WAAW,EAAE,cAAc,EAAE,UAAU,EAAE,IAAI,CAAC,WAAW,EAAE,YAAY,EAAE,CAAC;IACjI,CAAC;CACF","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module Dialog\n */\n\nimport { PropertyDescription } from \"../properties/Description\";\n\n/** [[DialogItemValue]] Interface of PrimitiveValue types that have type editor support for use in dialogs.\n * @public\n */\nexport interface DialogItemValue {\n value?: number | string | boolean | Date;\n displayValue?: string;\n}\n/** [[EditorPosition]] Interface used to identify the location of the item a DialogItem property value.\n * @public\n */\nexport interface EditorPosition {\n /** Determine the order the row is shown in UI */\n rowPriority: number;\n /** Determines the column position for the type editor */\n columnIndex: number;\n}\n\n/** [[BaseDialogItem]] contains only the members necessary to create a PropertyRecord.\n * @public\n */\nexport interface BaseDialogItem {\n readonly value: DialogItemValue;\n readonly property: PropertyDescription;\n readonly isDisabled?: boolean;\n}\n/** [[DialogItem]] is the specification that the display engine turns into a UI item.\n * @public\n */\nexport interface DialogItem extends BaseDialogItem {\n readonly editorPosition: EditorPosition;\n readonly lockProperty?: BaseDialogItem;\n}\n\n/** [[DialogPropertyItem]] us the specification to use if you are defining the components directly, e.g., in React\n * @public\n */\nexport interface DialogPropertyItem {\n readonly value: DialogItemValue;\n readonly propertyName: string;\n}\n\n/** [[DialogPropertySyncItem]] is used to pass sync messages for DialogPropertyItems\n * @public\n */\nexport interface DialogPropertySyncItem extends DialogPropertyItem {\n readonly isDisabled?: boolean;\n readonly property?: PropertyDescription;\n}\n\n/** [[DialogProperty]] is a generic helper class that assists working with properties used by UiLayoutDataProvider implementations (i.e. Tool Settings and Dynamic Dialogs).\n * @public\n */\nexport class DialogProperty<T> {\n constructor(public description: PropertyDescription, private _value: T, private _displayValue?: string, private _isDisabled?: boolean) { }\n\n public get isDisabled() {\n return !!this._isDisabled;\n }\n\n public set isDisabled(val: boolean) {\n this._isDisabled = val;\n }\n\n public get value() {\n return this._value;\n }\n\n public set value(val: T) {\n this._value = val;\n }\n\n public get name() {\n return this.description.name;\n }\n\n public set displayValue(val: string | undefined) {\n this._displayValue = val;\n }\n\n public get displayValue() {\n return this._displayValue;\n }\n\n public get dialogItemValue() {\n // istanbul ignore else\n if (typeof this._value === \"string\" || typeof this._value === \"number\" || typeof this._value === \"undefined\" || typeof this._value === \"boolean\" || this._value instanceof Date)\n return {\n value: this._value,\n displayValue: this._displayValue,\n } as DialogItemValue;\n // istanbul ignore next\n throw new Error(\"Not valid primitive type\");\n }\n\n public set dialogItemValue(val: DialogItemValue) {\n this._value = val.value as unknown as T;\n this._displayValue = val.displayValue;\n }\n\n public get syncItem(): DialogPropertySyncItem {\n const isDisabled = this._isDisabled;\n return { propertyName: this.name, value: this.dialogItemValue, isDisabled };\n }\n\n public get item(): DialogPropertyItem {\n return { propertyName: this.name, value: this.dialogItemValue };\n }\n\n public toDialogItem(editorPosition: EditorPosition, lockProperty?: DialogItem): DialogItem {\n return { value: this.dialogItemValue, property: this.description, editorPosition, isDisabled: this._isDisabled, lockProperty };\n }\n}\n"]}
|
@@ -128,6 +128,13 @@ export class UiLayoutDataProvider extends UiDataProvider {
|
|
128
128
|
return !!baseDialogItem.isDisabled;
|
129
129
|
return !value.value;
|
130
130
|
}
|
131
|
+
/** Gets a property record for a given dialog item */
|
132
|
+
static { this.getPropertyRecord = (dialogItem) => {
|
133
|
+
const propertyValue = { valueFormat: PropertyValueFormat.Primitive, value: dialogItem.value.value, displayValue: dialogItem.value.displayValue };
|
134
|
+
const record = new PropertyRecord(propertyValue, dialogItem.property);
|
135
|
+
record.isDisabled = UiLayoutDataProvider.getItemDisabledState(dialogItem);
|
136
|
+
return record;
|
137
|
+
}; }
|
131
138
|
/** Determines if a dialog row only contains button group editors */
|
132
139
|
static onlyContainButtonGroupEditors(row) {
|
133
140
|
for (const item of row.items) {
|
@@ -138,13 +145,6 @@ export class UiLayoutDataProvider extends UiDataProvider {
|
|
138
145
|
return true;
|
139
146
|
}
|
140
147
|
}
|
141
|
-
/** Gets a property record for a given dialog item */
|
142
|
-
UiLayoutDataProvider.getPropertyRecord = (dialogItem) => {
|
143
|
-
const propertyValue = { valueFormat: PropertyValueFormat.Primitive, value: dialogItem.value.value, displayValue: dialogItem.value.displayValue };
|
144
|
-
const record = new PropertyRecord(propertyValue, dialogItem.property);
|
145
|
-
record.isDisabled = UiLayoutDataProvider.getItemDisabledState(dialogItem);
|
146
|
-
return record;
|
147
|
-
};
|
148
148
|
/** [[DialogLayoutDataProvider]] Abstract class that allows property values to be passed between hosting API and Dialog that generates and arranges components dynamically
|
149
149
|
* including the buttons at the bottom of the dialog.
|
150
150
|
* @public
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"UiLayoutDataProvider.js","sourceRoot":"","sources":["../../../../src/appui-abstract/dialogs/UiLayoutDataProvider.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAEH,OAAO,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAChD,OAAO,EAAwB,wBAAwB,EAA6B,MAAM,4BAA4B,CAAC;AACvH,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AACtD,OAAO,EAAkB,mBAAmB,EAAE,MAAM,qBAAqB,CAAC;AAE1E,OAAO,EAAwB,oBAAoB,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAE9F;;GAEG;AACH,MAAM,CAAN,IAAY,gBAUX;AAVD,WAAY,gBAAgB;IAC1B,6BAAS,CAAA;IACT,mCAAe,CAAA;IACf,6BAAS,CAAA;IACT,qCAAiB,CAAA;IACjB,+BAAW,CAAA;IACX,6BAAS,CAAA;IACT,mCAAe,CAAA;IACf,iCAAa,CAAA;IACb,yCAAqB,CAAA;AACvB,CAAC,EAVW,gBAAgB,KAAhB,gBA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C,MAAM,EAAE,OAAO,EAAE,GAAG,EAAE,GAAG,CAAC,EAAE,CAAC,CAAC;QACpE,OAAO,OAAO,CAAC;IACjB,CAAC;CACF","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module Dialog\n */\n\nimport { BeUiEvent } from \"@itwin/core-bentley\";\nimport { PropertyEditorParams, PropertyEditorParamTypes, SuppressLabelEditorParams } from \"../properties/EditorParams\";\nimport { PropertyRecord } from \"../properties/Record\";\nimport { PrimitiveValue, PropertyValueFormat } from \"../properties/Value\";\nimport { BaseDialogItem, DialogItem, DialogPropertyItem, DialogPropertySyncItem } from \"./DialogItem\";\nimport { PropertyChangeResult, PropertyChangeStatus, UiDataProvider } from \"./UiDataProvider\";\n\n/** Enum for button types. Determines button label, and default button style.\n * @public\n */\nexport enum DialogButtonType {\n None = \"\",\n Close = \"close\",\n OK = \"ok\",\n Cancel = \"cancel\",\n Yes = \"yes\",\n No = \"no\",\n Retry = \"retry\",\n Next = \"next\",\n Previous = \"previous\"\n}\n\n/** Enum for button style.\n * @public\n */\nexport enum DialogButtonStyle {\n None = \"\",\n Primary = \"iui-cta\",\n Hollow = \"iui-default\",\n Blue = \"iui-high-visibility\",\n}\n\n/** Interface for a dialog button in a button cluster\n * @public\n */\nexport interface DialogButtonDef {\n /** type of button */\n type: DialogButtonType;\n /** Triggered on button click */\n onClick: () => void;\n /** Which button style to decorate button width */\n buttonStyle?: DialogButtonStyle;\n /** Disable the button */\n disabled?: boolean;\n /** Custom label */\n label?: string;\n /** Custom CSS class */\n className?: string;\n}\n\n/** [[DialogRow]] is the interface that groups dialog items into rows for building UI\n * @public\n */\nexport interface DialogRow {\n priority: number;\n items: DialogItem[];\n}\n\n/**\n * @public\n */\nexport abstract class UiLayoutDataProvider extends UiDataProvider {\n private _items: ReadonlyArray<DialogItem> | undefined;\n\n /** Applies changes from one or more properties - some dialogs will use this to send a bulk set of changes back to the provider */\n public override processChangesInUi(properties: DialogPropertyItem[]): PropertyChangeResult {\n // Default implementation is to just pass each property to applyUiPropertyChange\n properties.forEach((property) => this.applyUiPropertyChange(property));\n return { status: PropertyChangeStatus.Success };\n }\n\n /** Applies change of a single property - this is the default method used when property editors are dynamically generated. */\n // istanbul ignore next\n public applyUiPropertyChange = (_updatedValue: DialogPropertySyncItem): void => {\n throw (new Error(\"Derived UiDataProvider should implement this to apply change to a single property.\"));\n };\n\n private _rows: DialogRow[] | undefined;\n\n /** Array of dialog rows */\n public get rows(): DialogRow[] {\n if (!this._rows) {\n this._rows = this.layoutDialogRows();\n }\n return this._rows;\n }\n\n protected loadItemsInternal(items: ReadonlyArray<DialogItem> | undefined) {\n this._items = items ? items : [];\n this._rows = this.layoutDialogRows();\n }\n\n /** Called by UI to request available properties that can be bound to user supplied UI components (See Tool1UiProvider for example). */\n // istanbul ignore next\n public supplyDialogItems(): DialogItem[] | undefined {\n throw (new Error(\"Derived UiDataProvider must implement this method to supply set of properties.\"));\n }\n\n public get items(): ReadonlyArray<DialogItem> {\n if (undefined === this._items) {\n this.loadItemsInternal(this.supplyDialogItems());\n }\n return this._items!;\n }\n\n /** Called to inform listeners that new properties are ready for display in UI. */\n public reloadDialogItems(emitEvent = true) {\n this.loadItemsInternal(this.supplyDialogItems());\n // istanbul ignore else\n if (emitEvent)\n this.fireItemsReloadedEvent();\n }\n\n /**\n * @internal\n */\n public layoutDialogRows(): DialogRow[] {\n const rows: DialogRow[] = [];\n\n this.items.forEach((item) => {\n const row = rows.find((value) => value.priority === item.editorPosition.rowPriority);\n if (row) {\n row.items.push(item);\n } else {\n rows.push({ priority: item.editorPosition.rowPriority, items: [item] });\n }\n });\n\n // sort rows\n rows.sort((a: DialogRow, b: DialogRow) => a.priority - b.priority);\n // sort records\n rows.forEach((row: DialogRow) => row.items.sort((a: DialogItem, b: DialogItem) => a.editorPosition.columnIndex - b.editorPosition.columnIndex));\n return rows;\n }\n\n /** Determines if a dialog item editor wants a label */\n public static editorWantsLabel(item: DialogItem): boolean {\n if (item.property.editor && item.property.editor.params) {\n const params = item.property.editor.params.find((param: PropertyEditorParams) => param.type === PropertyEditorParamTypes.SuppressEditorLabel) as SuppressLabelEditorParams;\n // istanbul ignore else\n if (params)\n return false;\n }\n return true;\n }\n\n /** Determines if a dialog items has an associated lock property */\n public static hasAssociatedLockProperty(item: DialogItem): boolean {\n return !!item.lockProperty;\n }\n\n /** Gets the disabled state for a given dialog item */\n public static getItemDisabledState(baseDialogItem: BaseDialogItem): boolean {\n const dialogItem = baseDialogItem as DialogItem;\n // istanbul ignore else\n if (dialogItem === undefined || dialogItem.lockProperty === undefined)\n return !!baseDialogItem.isDisabled;\n const value = dialogItem.lockProperty.value;\n // istanbul ignore next\n if (value === undefined)\n return !!baseDialogItem.isDisabled;\n\n return !value.value;\n }\n\n /** Gets a property record for a given dialog item */\n public static getPropertyRecord = (dialogItem: BaseDialogItem): PropertyRecord => {\n const propertyValue = { valueFormat: PropertyValueFormat.Primitive, value: dialogItem.value.value, displayValue: dialogItem.value.displayValue };\n const record = new PropertyRecord(propertyValue as PrimitiveValue, dialogItem.property);\n record.isDisabled = UiLayoutDataProvider.getItemDisabledState(dialogItem);\n return record;\n };\n\n /** Determines if a dialog row only contains button group editors */\n public static onlyContainButtonGroupEditors(row: DialogRow): boolean {\n for (const item of row.items) {\n // istanbul ignore else\n if (UiLayoutDataProvider.hasAssociatedLockProperty(item) || undefined === item.property.editor || \"enum-buttongroup\" !== item.property.editor.name || UiLayoutDataProvider.editorWantsLabel(item))\n return false;\n }\n return true;\n }\n}\n\n/** [[DialogLayoutDataProvider]] Abstract class that allows property values to be passed between hosting API and Dialog that generates and arranges components dynamically\n * including the buttons at the bottom of the dialog.\n * @public\n */\nexport abstract class DialogLayoutDataProvider extends UiLayoutDataProvider {\n public onButtonsReloadedEvent = new BeUiEvent<void>();\n\n /** Called to inform listeners that modal dialog button data needs to be refreshed. */\n public fireDialogButtonsReloadEvent() {\n this.onButtonsReloadedEvent.emit();\n }\n\n public supplyButtonData(): DialogButtonDef[] | undefined {\n // Derived class should override\n const buttons: DialogButtonDef[] = [];\n // istanbul ignore next\n buttons.push({ type: DialogButtonType.OK, onClick: () => { } });\n // istanbul ignore next\n buttons.push({ type: DialogButtonType.Cancel, onClick: () => { } });\n return buttons;\n }\n}\n"]}
|
1
|
+
{"version":3,"file":"UiLayoutDataProvider.js","sourceRoot":"","sources":["../../../../src/appui-abstract/dialogs/UiLayoutDataProvider.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAEH,OAAO,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAChD,OAAO,EAAwB,wBAAwB,EAA6B,MAAM,4BAA4B,CAAC;AACvH,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AACtD,OAAO,EAAkB,mBAAmB,EAAE,MAAM,qBAAqB,CAAC;AAE1E,OAAO,EAAwB,oBAAoB,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAE9F;;GAEG;AACH,MAAM,CAAN,IAAY,gBAUX;AAVD,WAAY,gBAAgB;IAC1B,6BAAS,CAAA;IACT,mCAAe,CAAA;IACf,6BAAS,CAAA;IACT,qCAAiB,CAAA;IACjB,+BAAW,CAAA;IACX,6BAAS,CAAA;IACT,mCAAe,CAAA;IACf,iCAAa,CAAA;IACb,yCAAqB,CAAA;AACvB,CAAC,EAVW,gBAAgB,KAAhB,gBAAgB,QAU3B;AAED;;GAEG;AACH,MAAM,CAAN,IAAY,iBAKX;AALD,WAAY,iBAAiB;IAC3B,8BAAS,CAAA;IACT,wCAAmB,CAAA;IACnB,2CAAsB,CAAA;IACtB,iDAA4B,CAAA;AAC9B,CAAC,EALW,iBAAiB,KAAjB,iBAAiB,QAK5B;AA4BD;;GAEG;AACH,MAAM,OAAgB,oBAAqB,SAAQ,cAAc;IAAjE;;QAUE,6HAA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M,CAAC;IAChB,CAAC,AAL8B,CAK7B;IAEF,oEAAoE;IAC7D,MAAM,CAAC,6BAA6B,CAAC,GAAc;QACxD,KAAK,MAAM,IAAI,IAAI,GAAG,CAAC,KAAK,EAAE,CAAC;YAC7B,uBAAuB;YACvB,IAAI,oBAAoB,CAAC,yBAAyB,CAAC,IAAI,CAAC,IAAI,SAAS,KAAK,IAAI,CAAC,QAAQ,CAAC,MAAM,IAAI,kBAAkB,KAAK,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAC,IAAI,IAAI,oBAAoB,CAAC,gBAAgB,CAAC,IAAI,CAAC;gBAC/L,OAAO,KAAK,CAAC;QACjB,CAAC;QACD,OAAO,IAAI,CAAC;IACd,CAAC;;AAGH;;;GAGG;AACH,MAAM,OAAgB,wBAAyB,SAAQ,oBAAoB;IAA3E;;QACS,2BAAsB,GAAG,IAAI,SAAS,EAAQ,CAAC;IAgBxD,CAAC;IAdC,sFAAsF;IAC/E,4BAA4B;QACjC,IAAI,CAAC,sBAAsB,CAAC,IAAI,EAAE,CAAC;IACrC,CAAC;IAEM,gBAAgB;QACrB,gCAAgC;QAChC,MAAM,OAAO,GAAsB,EAAE,CAAC;QACtC,uBAAuB;QACvB,OAAO,CAAC,IAAI,CAAC,EAAE,IAAI,EAAE,gBAAgB,CAAC,EAAE,EAAE,OAAO,EAAE,GAAG,EAAE,GAAG,CAAC,EAAE,CAAC,CAAC;QAChE,uBAAuB;QACvB,OAAO,CAAC,IAAI,CAAC,EAAE,IAAI,EAAE,gBAAgB,CAAC,MAAM,EAAE,OAAO,EAAE,GAAG,EAAE,GAAG,CAAC,EAAE,CAAC,CAAC;QACpE,OAAO,OAAO,CAAC;IACjB,CAAC;CACF","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module Dialog\n */\n\nimport { BeUiEvent } from \"@itwin/core-bentley\";\nimport { PropertyEditorParams, PropertyEditorParamTypes, SuppressLabelEditorParams } from \"../properties/EditorParams\";\nimport { PropertyRecord } from \"../properties/Record\";\nimport { PrimitiveValue, PropertyValueFormat } from \"../properties/Value\";\nimport { BaseDialogItem, DialogItem, DialogPropertyItem, DialogPropertySyncItem } from \"./DialogItem\";\nimport { PropertyChangeResult, PropertyChangeStatus, UiDataProvider } from \"./UiDataProvider\";\n\n/** Enum for button types. Determines button label, and default button style.\n * @public\n */\nexport enum DialogButtonType {\n None = \"\",\n Close = \"close\",\n OK = \"ok\",\n Cancel = \"cancel\",\n Yes = \"yes\",\n No = \"no\",\n Retry = \"retry\",\n Next = \"next\",\n Previous = \"previous\"\n}\n\n/** Enum for button style.\n * @public\n */\nexport enum DialogButtonStyle {\n None = \"\",\n Primary = \"iui-cta\",\n Hollow = \"iui-default\",\n Blue = \"iui-high-visibility\",\n}\n\n/** Interface for a dialog button in a button cluster\n * @public\n */\nexport interface DialogButtonDef {\n /** type of button */\n type: DialogButtonType;\n /** Triggered on button click */\n onClick: () => void;\n /** Which button style to decorate button width */\n buttonStyle?: DialogButtonStyle;\n /** Disable the button */\n disabled?: boolean;\n /** Custom label */\n label?: string;\n /** Custom CSS class */\n className?: string;\n}\n\n/** [[DialogRow]] is the interface that groups dialog items into rows for building UI\n * @public\n */\nexport interface DialogRow {\n priority: number;\n items: DialogItem[];\n}\n\n/**\n * @public\n */\nexport abstract class UiLayoutDataProvider extends UiDataProvider {\n private _items: ReadonlyArray<DialogItem> | undefined;\n\n /** Applies changes from one or more properties - some dialogs will use this to send a bulk set of changes back to the provider */\n public override processChangesInUi(properties: DialogPropertyItem[]): PropertyChangeResult {\n // Default implementation is to just pass each property to applyUiPropertyChange\n properties.forEach((property) => this.applyUiPropertyChange(property));\n return { status: PropertyChangeStatus.Success };\n }\n\n /** Applies change of a single property - this is the default method used when property editors are dynamically generated. */\n // istanbul ignore next\n public applyUiPropertyChange = (_updatedValue: DialogPropertySyncItem): void => {\n throw (new Error(\"Derived UiDataProvider should implement this to apply change to a single property.\"));\n };\n\n private _rows: DialogRow[] | undefined;\n\n /** Array of dialog rows */\n public get rows(): DialogRow[] {\n if (!this._rows) {\n this._rows = this.layoutDialogRows();\n }\n return this._rows;\n }\n\n protected loadItemsInternal(items: ReadonlyArray<DialogItem> | undefined) {\n this._items = items ? items : [];\n this._rows = this.layoutDialogRows();\n }\n\n /** Called by UI to request available properties that can be bound to user supplied UI components (See Tool1UiProvider for example). */\n // istanbul ignore next\n public supplyDialogItems(): DialogItem[] | undefined {\n throw (new Error(\"Derived UiDataProvider must implement this method to supply set of properties.\"));\n }\n\n public get items(): ReadonlyArray<DialogItem> {\n if (undefined === this._items) {\n this.loadItemsInternal(this.supplyDialogItems());\n }\n return this._items!;\n }\n\n /** Called to inform listeners that new properties are ready for display in UI. */\n public reloadDialogItems(emitEvent = true) {\n this.loadItemsInternal(this.supplyDialogItems());\n // istanbul ignore else\n if (emitEvent)\n this.fireItemsReloadedEvent();\n }\n\n /**\n * @internal\n */\n public layoutDialogRows(): DialogRow[] {\n const rows: DialogRow[] = [];\n\n this.items.forEach((item) => {\n const row = rows.find((value) => value.priority === item.editorPosition.rowPriority);\n if (row) {\n row.items.push(item);\n } else {\n rows.push({ priority: item.editorPosition.rowPriority, items: [item] });\n }\n });\n\n // sort rows\n rows.sort((a: DialogRow, b: DialogRow) => a.priority - b.priority);\n // sort records\n rows.forEach((row: DialogRow) => row.items.sort((a: DialogItem, b: DialogItem) => a.editorPosition.columnIndex - b.editorPosition.columnIndex));\n return rows;\n }\n\n /** Determines if a dialog item editor wants a label */\n public static editorWantsLabel(item: DialogItem): boolean {\n if (item.property.editor && item.property.editor.params) {\n const params = item.property.editor.params.find((param: PropertyEditorParams) => param.type === PropertyEditorParamTypes.SuppressEditorLabel) as SuppressLabelEditorParams;\n // istanbul ignore else\n if (params)\n return false;\n }\n return true;\n }\n\n /** Determines if a dialog items has an associated lock property */\n public static hasAssociatedLockProperty(item: DialogItem): boolean {\n return !!item.lockProperty;\n }\n\n /** Gets the disabled state for a given dialog item */\n public static getItemDisabledState(baseDialogItem: BaseDialogItem): boolean {\n const dialogItem = baseDialogItem as DialogItem;\n // istanbul ignore else\n if (dialogItem === undefined || dialogItem.lockProperty === undefined)\n return !!baseDialogItem.isDisabled;\n const value = dialogItem.lockProperty.value;\n // istanbul ignore next\n if (value === undefined)\n return !!baseDialogItem.isDisabled;\n\n return !value.value;\n }\n\n /** Gets a property record for a given dialog item */\n public static getPropertyRecord = (dialogItem: BaseDialogItem): PropertyRecord => {\n const propertyValue = { valueFormat: PropertyValueFormat.Primitive, value: dialogItem.value.value, displayValue: dialogItem.value.displayValue };\n const record = new PropertyRecord(propertyValue as PrimitiveValue, dialogItem.property);\n record.isDisabled = UiLayoutDataProvider.getItemDisabledState(dialogItem);\n return record;\n };\n\n /** Determines if a dialog row only contains button group editors */\n public static onlyContainButtonGroupEditors(row: DialogRow): boolean {\n for (const item of row.items) {\n // istanbul ignore else\n if (UiLayoutDataProvider.hasAssociatedLockProperty(item) || undefined === item.property.editor || \"enum-buttongroup\" !== item.property.editor.name || UiLayoutDataProvider.editorWantsLabel(item))\n return false;\n }\n return true;\n }\n}\n\n/** [[DialogLayoutDataProvider]] Abstract class that allows property values to be passed between hosting API and Dialog that generates and arranges components dynamically\n * including the buttons at the bottom of the dialog.\n * @public\n */\nexport abstract class DialogLayoutDataProvider extends UiLayoutDataProvider {\n public onButtonsReloadedEvent = new BeUiEvent<void>();\n\n /** Called to inform listeners that modal dialog button data needs to be refreshed. */\n public fireDialogButtonsReloadEvent() {\n this.onButtonsReloadedEvent.emit();\n }\n\n public supplyButtonData(): DialogButtonDef[] | undefined {\n // Derived class should override\n const buttons: DialogButtonDef[] = [];\n // istanbul ignore next\n buttons.push({ type: DialogButtonType.OK, onClick: () => { } });\n // istanbul ignore next\n buttons.push({ type: DialogButtonType.Cancel, onClick: () => { } });\n return buttons;\n }\n}\n"]}
|
@@ -63,19 +63,19 @@ export const isAbstractStatusBarCustomItem = (item) => {
|
|
63
63
|
* @public
|
64
64
|
*/
|
65
65
|
export class AbstractStatusBarItemUtilities {
|
66
|
+
/** Creates a StatusBar item to perform an action */
|
67
|
+
static { this.createActionItem = (id, section, itemPriority, icon, tooltip, execute, overrides) => ({
|
68
|
+
id, section, itemPriority,
|
69
|
+
icon, tooltip,
|
70
|
+
execute,
|
71
|
+
...overrides,
|
72
|
+
}); }
|
73
|
+
/** Creates a StatusBar item to display a label */
|
74
|
+
static { this.createLabelItem = (id, section, itemPriority, icon, label, labelSide = StatusBarLabelSide.Right, overrides) => ({
|
75
|
+
id, section, itemPriority,
|
76
|
+
icon, label,
|
77
|
+
labelSide,
|
78
|
+
...overrides,
|
79
|
+
}); }
|
66
80
|
}
|
67
|
-
/** Creates a StatusBar item to perform an action */
|
68
|
-
AbstractStatusBarItemUtilities.createActionItem = (id, section, itemPriority, icon, tooltip, execute, overrides) => ({
|
69
|
-
id, section, itemPriority,
|
70
|
-
icon, tooltip,
|
71
|
-
execute,
|
72
|
-
...overrides,
|
73
|
-
});
|
74
|
-
/** Creates a StatusBar item to display a label */
|
75
|
-
AbstractStatusBarItemUtilities.createLabelItem = (id, section, itemPriority, icon, label, labelSide = StatusBarLabelSide.Right, overrides) => ({
|
76
|
-
id, section, itemPriority,
|
77
|
-
icon, label,
|
78
|
-
labelSide,
|
79
|
-
...overrides,
|
80
|
-
});
|
81
81
|
//# sourceMappingURL=StatusBarItem.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"StatusBarItem.js","sourceRoot":"","sources":["../../../../src/appui-abstract/statusbar/StatusBarItem.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAOH;;;GAGG;AACH,MAAM,CAAN,IAAY,gBAeX;AAfD,WAAY,gBAAgB;IAC1B,4CAA4C;IAC5C,6DAAW,CAAA;IACX,4CAA4C;IAC5C,uDAAQ,CAAA;IACR,mCAAmC;IACnC,yDAAS,C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OAAyB,EAAE,YAAoB,EAAE,IAAqC,EAAE,KAAsC,EAAE,SAAS,GAAG,kBAAkB,CAAC,KAAK,EAAE,SAA+C,EAA8B,EAAE,CAAC,CAAC;QAClS,EAAE,EAAE,OAAO,EAAE,YAAY;QACzB,IAAI,EAAE,KAAK;QACX,SAAS;QACT,GAAG,SAAS;KACb,CAAC,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module StatusBar\n */\n\nimport { BadgeType } from \"../items/BadgeType\";\nimport { ConditionalBooleanValue } from \"../items/ConditionalBooleanValue\";\nimport { ConditionalStringValue } from \"../items/ConditionalStringValue\";\nimport { ProvidedItem } from \"../items/ProvidedItem\";\n\n/** Status bar Groups/Sections from Left to Right\n * @deprecated in 3.6. Use [StatusBarSection]($appui-react) instead.\n * @public\n */\nexport enum StatusBarSection {\n /** area for tool assistance and messages */\n Message = 0,\n /** area for tool assistance and messages */\n Left = 0, // eslint-disable-line @typescript-eslint/no-duplicate-enum-values\n /** items specific to stage/task */\n Stage = 1,\n /** items specific to stage/task */\n Center = 1, // eslint-disable-line @typescript-eslint/no-duplicate-enum-values\n /** Select scope and selection info */\n Selection = 2,\n /** Select scope and selection info */\n Right = 2, // eslint-disable-line @typescript-eslint/no-duplicate-enum-values\n /** items that only show based on context */\n Context = 3,\n}\n\n/** Defines which side of Icon where label is placed\n * @deprecated in 3.6. Use [StatusBarLabelSide]($appui-react) instead.\n * @public\n */\nexport enum StatusBarLabelSide {\n /** Label is placed left side of icon. This is the default if not specified */\n Left,\n /** Label is placed on right side of icon. */\n Right,\n}\n\n/** Type for StatusBar Item Id\n * @deprecated in 3.6. Please use `CommonStatusBarItem[\"id\"]` from @itwin/appui-react.\n * @public\n */\nexport type StatusBarItemId = CommonStatusBarItem[\"id\"];\n\n/** Describes the data needed to insert a button into the status bar.\n * @deprecated in 3.6. Use [CommonStatusBarItem]($appui-react) instead.\n * @public\n */\nexport interface AbstractStatusBarItem extends ProvidedItem { // eslint-disable-line @typescript-eslint/no-deprecated\n /** can be used by application to store miscellaneous data. */\n applicationData?: any;\n /** Describes badge. Renders no badge if not specified. */\n readonly badgeType?: BadgeType;\n /** Required unique id of the item. To ensure uniqueness it is suggested that a namespace prefix of the extension name be used. */\n readonly id: string;\n /** optional data to used by item implementor. */\n readonly internalData?: Map<string, any>;\n /** Describes if the item is visible or hidden. The default is for the item to be visible. */\n readonly isHidden?: boolean | ConditionalBooleanValue;\n /** Describes if the item is enabled or disabled. The default is for the item to be enabled. */\n readonly isDisabled?: boolean | ConditionalBooleanValue;\n /** Priority within a section (recommend using values 1 through 100). */\n readonly itemPriority: number;\n /** status bar section */\n readonly section: StatusBarSection; // eslint-disable-line @typescript-eslint/no-deprecated\n}\n\n/** Describes the data needed to insert an action item into the status bar.\n * @deprecated in 3.6. Use [StatusBarActionItem]($appui-react) instead.\n * @public\n */\nexport interface AbstractStatusBarActionItem extends AbstractStatusBarItem { // eslint-disable-line @typescript-eslint/no-deprecated\n /** method to execute when icon is pressed */\n readonly execute: () => void;\n /** Name of icon WebFont entry or if specifying an imported SVG symbol use \"webSvg:\" prefix to imported symbol Id. */\n readonly icon?: string | ConditionalStringValue;\n /** Label. */\n readonly label?: string | ConditionalStringValue;\n /** tooltip. */\n readonly tooltip?: string | ConditionalStringValue;\n}\n\n/** Describes the data needed to insert a label item with an optional icon into the status bar.\n * @deprecated in 3.6. Use [StatusBarLabelItem]($appui-react) instead.\n * @public\n */\nexport interface AbstractStatusBarLabelItem extends AbstractStatusBarItem { // eslint-disable-line @typescript-eslint/no-deprecated\n /** Name of icon WebFont entry or if specifying an imported SVG symbol use \"webSvg:\" prefix to imported symbol Id. */\n readonly icon?: string | ConditionalStringValue;\n /** Label. */\n readonly label: string | ConditionalStringValue;\n /** Defines which side of icon to display label if icon is defined. */\n readonly labelSide?: StatusBarLabelSide; // eslint-disable-line @typescript-eslint/no-deprecated\n}\n\n/** Describes the data needed to insert a custom item into the status bar. This is used to allow extension\n * implementer to create a framework specific component.\n * @deprecated in 3.6. Use [StatusBarCustomItem]($appui-react) instead.\n * @public\n */\nexport interface AbstractStatusBarCustomItem extends AbstractStatusBarItem { // eslint-disable-line @typescript-eslint/no-deprecated\n readonly isCustom: true;\n}\n\n/** Describes the data needed to insert a button into the status bar.\n * @deprecated in 3.6. Use [StatusBarItem]($appui-react) instead.\n * @public\n */\nexport type CommonStatusBarItem = AbstractStatusBarActionItem | AbstractStatusBarLabelItem | AbstractStatusBarCustomItem; // eslint-disable-line @typescript-eslint/no-deprecated\n\n/** AbstractStatusBarActionItem type guard.\n * @deprecated in 3.6. Use [isStatusBarActionItem]($appui-react) instead.\n * @public\n */\nexport const isAbstractStatusBarActionItem = (item: CommonStatusBarItem): item is AbstractStatusBarActionItem => { // eslint-disable-line @typescript-eslint/no-deprecated\n return (item as AbstractStatusBarActionItem).execute !== undefined; // eslint-disable-line @typescript-eslint/no-deprecated\n};\n\n/** AbstractStatusBarLabelItem type guard.\n * @deprecated in 3.6. Use [isStatusBarLabelItem]($appui-react) instead.\n * @public\n */\nexport const isAbstractStatusBarLabelItem = (item: CommonStatusBarItem): item is AbstractStatusBarLabelItem => { // eslint-disable-line @typescript-eslint/no-deprecated\n return (item as AbstractStatusBarLabelItem).label !== undefined && (item as AbstractStatusBarActionItem).execute === undefined; // eslint-disable-line @typescript-eslint/no-deprecated\n};\n\n/** AbstractStatusBarCustomItem type guard.\n * @deprecated in 3.6. Use [isStatusBarCustomItem]($appui-react) instead.\n * @public\n */\nexport const isAbstractStatusBarCustomItem = (item: CommonStatusBarItem): item is AbstractStatusBarCustomItem => { // eslint-disable-line @typescript-eslint/no-deprecated\n return !!(item as AbstractStatusBarCustomItem).isCustom; // eslint-disable-line @typescript-eslint/no-deprecated\n};\n\n/** Helper class to create Abstract StatusBar Item definitions.\n * @deprecated in 3.6. Use [StatusBarItemUtilities]($appui-react) instead.\n * @public\n */\nexport class AbstractStatusBarItemUtilities {\n /** Creates a StatusBar item to perform an action */\n public static createActionItem = (id: string, section: StatusBarSection, itemPriority: number, icon: string | ConditionalStringValue, tooltip: string | ConditionalStringValue, execute: () => void, overrides?: Partial<AbstractStatusBarCustomItem>): AbstractStatusBarActionItem => ({ // eslint-disable-line @typescript-eslint/no-deprecated\n id, section, itemPriority,\n icon, tooltip,\n execute,\n ...overrides,\n });\n\n /** Creates a StatusBar item to display a label */\n public static createLabelItem = (id: string, section: StatusBarSection, itemPriority: number, icon: string | ConditionalStringValue, label: string | ConditionalStringValue, labelSide = StatusBarLabelSide.Right, overrides?: Partial<AbstractStatusBarLabelItem>): AbstractStatusBarLabelItem => ({ // eslint-disable-line @typescript-eslint/no-deprecated\n id, section, itemPriority,\n icon, label,\n labelSide,\n ...overrides,\n });\n}\n"]}
|
@@ -31,6 +31,20 @@ export var ToolbarOrientation;
|
|
31
31
|
* @public
|
32
32
|
*/
|
33
33
|
export class ToolbarItemUtilities {
|
34
|
+
/** Creates an Action Button */
|
35
|
+
static { this.createActionButton = (id, itemPriority, icon, label, execute, overrides) => ({
|
36
|
+
id, itemPriority,
|
37
|
+
icon, label,
|
38
|
+
execute,
|
39
|
+
...overrides,
|
40
|
+
}); }
|
41
|
+
/** Creates a Group button. */
|
42
|
+
static { this.createGroupButton = (id, itemPriority, icon, label, items, overrides) => ({
|
43
|
+
id, itemPriority,
|
44
|
+
icon, label,
|
45
|
+
items,
|
46
|
+
...overrides,
|
47
|
+
}); }
|
34
48
|
/** ActionButton type guard. */
|
35
49
|
static isActionButton(item) {
|
36
50
|
return item.execute !== undefined;
|
@@ -44,18 +58,4 @@ export class ToolbarItemUtilities {
|
|
44
58
|
return !!item.isCustom;
|
45
59
|
}
|
46
60
|
}
|
47
|
-
/** Creates an Action Button */
|
48
|
-
ToolbarItemUtilities.createActionButton = (id, itemPriority, icon, label, execute, overrides) => ({
|
49
|
-
id, itemPriority,
|
50
|
-
icon, label,
|
51
|
-
execute,
|
52
|
-
...overrides,
|
53
|
-
});
|
54
|
-
/** Creates a Group button. */
|
55
|
-
ToolbarItemUtilities.createGroupButton = (id, itemPriority, icon, label, items, overrides) => ({
|
56
|
-
id, itemPriority,
|
57
|
-
icon, label,
|
58
|
-
items,
|
59
|
-
...overrides,
|
60
|
-
});
|
61
61
|
//# sourceMappingURL=ToolbarItem.js.map
|