@microsoft/sp-top-actions 1.16.1 → 1.17.0-beta.3
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/dist/d5c7f2a5-a8e2-431c-9161-70d4d6396f79.manifest.json +2 -2
- package/dist/index-internal-beta.d.ts +186 -16
- package/dist/index-internal-public.d.ts +199 -3
- package/dist/index-internal.d.ts +199 -3
- package/dist/{sp-top-actions_none_f5755ff8c36326e27320.js → sp-top-actions_none_55e41bcef66090aab96f.js} +1 -1
- package/dist/tsdoc-metadata.json +1 -1
- package/lib-commonjs/index.js +3 -0
- package/lib-commonjs/topActionsFields/topActionsButton/ITopActionsButton.js +4 -0
- package/lib-commonjs/topActionsFields/topActionsDropdown/ITopActionsDropdown.js +4 -0
- package/lib-commonjs/topActionsFields/topActionsField/topActionsField.js +23 -0
- package/package.json +5 -8
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"id": "d5c7f2a5-a8e2-431c-9161-70d4d6396f79",
|
|
4
4
|
"alias": "SpTopActions",
|
|
5
5
|
"componentType": "Library",
|
|
6
|
-
"version": "1.
|
|
6
|
+
"version": "1.17.0",
|
|
7
7
|
"loaderConfig": {
|
|
8
8
|
"internalModuleBaseUrls": [
|
|
9
9
|
"https://localhost:4321/dist/"
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
"scriptResources": {
|
|
13
13
|
"sp-top-actions": {
|
|
14
14
|
"type": "path",
|
|
15
|
-
"path": "sp-top-
|
|
15
|
+
"path": "sp-top-actions_none_55e41bcef66090aab96f.js"
|
|
16
16
|
}
|
|
17
17
|
}
|
|
18
18
|
}
|
|
@@ -1,33 +1,203 @@
|
|
|
1
|
-
import
|
|
1
|
+
import type * as React_2 from 'react';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* The configurations used to define a webpart's top actions.
|
|
5
|
+
*
|
|
6
|
+
* @public
|
|
7
|
+
*/
|
|
8
|
+
export declare interface ITopActions {
|
|
9
|
+
/**
|
|
10
|
+
* List of top actions configurations
|
|
11
|
+
*/
|
|
12
|
+
readonly topActions: ITopActionsField[];
|
|
13
|
+
/**
|
|
14
|
+
* Triggered once the top action configuration state has been executed for the specified property path
|
|
15
|
+
* @param actionName - the specified property path that has been altered
|
|
16
|
+
* @param updatedValue - the updated value passed by top actions for the specified actionName
|
|
17
|
+
*/
|
|
18
|
+
onExecute(actionName: string, updatedValue: any): void;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* TopActions button props.
|
|
23
|
+
*
|
|
24
|
+
* @public
|
|
25
|
+
*/
|
|
26
|
+
export declare interface ITopActionsButtonProps {
|
|
27
|
+
/**
|
|
28
|
+
* Display text of the element.
|
|
29
|
+
*/
|
|
30
|
+
readonly text: string;
|
|
31
|
+
/**
|
|
32
|
+
* The button icon to display.
|
|
33
|
+
*/
|
|
34
|
+
readonly icon?: string;
|
|
35
|
+
/**
|
|
36
|
+
* Description of the action this button takes.
|
|
37
|
+
*/
|
|
38
|
+
readonly description?: string;
|
|
39
|
+
/**
|
|
40
|
+
* Whether the button is disabled.
|
|
41
|
+
*/
|
|
42
|
+
readonly disabled?: boolean;
|
|
43
|
+
/**
|
|
44
|
+
* The aria label of the button for the benefit of screen readers.
|
|
45
|
+
*/
|
|
46
|
+
readonly ariaLabel?: string;
|
|
47
|
+
/**
|
|
48
|
+
* Detailed description of the button for the benefit of screen readers.
|
|
49
|
+
*
|
|
50
|
+
*Button types will need more information provided to screen reader.
|
|
51
|
+
*/
|
|
52
|
+
readonly ariaDescription?: string;
|
|
53
|
+
/* Excluded from this release type: themableSvg */
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
/**
|
|
57
|
+
* TopActions Dropdown option props.
|
|
58
|
+
*
|
|
59
|
+
* @public
|
|
60
|
+
*/
|
|
61
|
+
export declare interface ITopActionsDropdownOption {
|
|
62
|
+
/**
|
|
63
|
+
* Title (tooltip) text displayed when hovering over an item.
|
|
64
|
+
*/
|
|
65
|
+
readonly title?: string;
|
|
66
|
+
/**
|
|
67
|
+
* A required key to uniquely identify the option.
|
|
68
|
+
*/
|
|
69
|
+
readonly key: string | number;
|
|
70
|
+
/**
|
|
71
|
+
* The text string for the option.
|
|
72
|
+
*/
|
|
73
|
+
readonly text: string;
|
|
74
|
+
/**
|
|
75
|
+
* The Icon component props for choice field.
|
|
76
|
+
*/
|
|
77
|
+
readonly iconProps?: ITopActionsDropdownOptionIconProps;
|
|
78
|
+
/**
|
|
79
|
+
* The src of image for choice field.
|
|
80
|
+
*/
|
|
81
|
+
readonly imageSrc?: string;
|
|
82
|
+
/**
|
|
83
|
+
* The src of image for choice field which is selected.
|
|
84
|
+
*/
|
|
85
|
+
readonly selectedImageSrc?: string;
|
|
86
|
+
/**
|
|
87
|
+
* The width and height of the image in px for choice field.
|
|
88
|
+
*/
|
|
89
|
+
readonly imageSize?: {
|
|
90
|
+
readonly width: number;
|
|
91
|
+
readonly height: number;
|
|
92
|
+
};
|
|
93
|
+
/**
|
|
94
|
+
* Whether the choice group option is disabled or not.
|
|
95
|
+
*/
|
|
96
|
+
readonly disabled?: boolean;
|
|
97
|
+
/**
|
|
98
|
+
* Whether the choice group option is checked or not.
|
|
99
|
+
*
|
|
100
|
+
* Default value is false.
|
|
101
|
+
*/
|
|
102
|
+
readonly checked?: boolean;
|
|
103
|
+
/**
|
|
104
|
+
* The aria label of the choice group option for the benefit of screen readers.
|
|
105
|
+
*/
|
|
106
|
+
readonly ariaLabel?: string;
|
|
107
|
+
/* Excluded from this release type: themableSvg */
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
/**
|
|
111
|
+
* TopActions Dropdown icon props.
|
|
112
|
+
*
|
|
113
|
+
* @public
|
|
114
|
+
*/
|
|
115
|
+
export declare interface ITopActionsDropdownOptionIconProps {
|
|
116
|
+
/**
|
|
117
|
+
* The name of the icon to use from the Office Fabric icon set.
|
|
118
|
+
*/
|
|
119
|
+
readonly officeFabricIconFontName?: string | null;
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
/**
|
|
123
|
+
* TopActions Dropdown props.
|
|
124
|
+
*
|
|
125
|
+
* @public
|
|
126
|
+
*/
|
|
127
|
+
export declare interface ITopActionsDropdownProps {
|
|
128
|
+
/**
|
|
129
|
+
* The options for the choice group.
|
|
130
|
+
*/
|
|
131
|
+
readonly options: ITopActionsDropdownOption[];
|
|
132
|
+
/**
|
|
133
|
+
* Adds functionality to create an action dropdown where
|
|
134
|
+
* the selected choice is not highlighted at the top level.
|
|
135
|
+
*
|
|
136
|
+
* The TitleButton is always displayed on the toolbar.
|
|
137
|
+
*/
|
|
138
|
+
readonly titleButton?: ITopActionsButtonProps;
|
|
139
|
+
}
|
|
2
140
|
|
|
3
141
|
/**
|
|
4
142
|
* Configuration used for a single Top Action command.
|
|
5
|
-
*
|
|
143
|
+
*
|
|
144
|
+
* @public
|
|
6
145
|
*/
|
|
7
|
-
export declare
|
|
146
|
+
export declare interface ITopActionsField<TProperties = any> {
|
|
8
147
|
/**
|
|
9
|
-
*
|
|
148
|
+
* Display name for the action which can be used in a tooltip or aria-label.
|
|
10
149
|
*/
|
|
11
150
|
readonly title?: string;
|
|
12
|
-
|
|
151
|
+
/**
|
|
152
|
+
* Type of the top actions field.
|
|
153
|
+
*/
|
|
154
|
+
readonly type: TopActionsFieldType;
|
|
155
|
+
/**
|
|
156
|
+
* Target property from the web part's property bag.
|
|
157
|
+
*/
|
|
158
|
+
readonly targetProperty: string;
|
|
159
|
+
/**
|
|
160
|
+
* Whether this control should be focused.
|
|
161
|
+
*
|
|
162
|
+
* @remarks
|
|
163
|
+
* The default value is false.
|
|
164
|
+
*/
|
|
165
|
+
readonly shouldFocus?: boolean;
|
|
166
|
+
/**
|
|
167
|
+
* Strongly typed properties object. Specific to each field type.
|
|
168
|
+
*
|
|
169
|
+
* @remarks
|
|
170
|
+
* Example: Dropdown has ITopActionsChoiceGroupProps, Button has ITopActionsButtonProps props.
|
|
171
|
+
*
|
|
172
|
+
* @privateRemarks
|
|
173
|
+
* - These props are from the office-ui-fabric-react.
|
|
174
|
+
* These props may not be extensive as the fabric-react ones. This is intentional.
|
|
175
|
+
* - We are not including any callbacks as part of the props, as this might end up breaking
|
|
176
|
+
* the internal flow and cause unwanted problems.
|
|
177
|
+
* - These are in line with property pane props as top actions consumes from the same
|
|
178
|
+
* source as property pane.
|
|
179
|
+
*
|
|
180
|
+
* We are including only those which are supported by the web part framework.
|
|
181
|
+
*/
|
|
182
|
+
readonly properties: TProperties;
|
|
183
|
+
}
|
|
13
184
|
|
|
14
185
|
/**
|
|
15
|
-
*
|
|
16
|
-
*
|
|
17
|
-
*
|
|
18
|
-
*
|
|
186
|
+
* Enum for all the supported Top Actions field types.
|
|
187
|
+
*
|
|
188
|
+
* Names should be consistent with those in office-ui-fabric-react, be careful to get letter casing correct.
|
|
189
|
+
*
|
|
190
|
+
* @public
|
|
19
191
|
*/
|
|
20
|
-
export declare
|
|
192
|
+
export declare enum TopActionsFieldType {
|
|
21
193
|
/**
|
|
22
|
-
*
|
|
194
|
+
* Choice Group field.
|
|
23
195
|
*/
|
|
24
|
-
|
|
196
|
+
Dropdown = 10,
|
|
25
197
|
/**
|
|
26
|
-
*
|
|
27
|
-
* @param actionName - the specified property path that has been altered
|
|
28
|
-
* @param newValue - the new value for the specified actionName
|
|
198
|
+
* Button field.
|
|
29
199
|
*/
|
|
30
|
-
|
|
200
|
+
Button = 11
|
|
31
201
|
}
|
|
32
202
|
|
|
33
203
|
export { }
|
|
@@ -1,7 +1,203 @@
|
|
|
1
|
-
import
|
|
1
|
+
import type * as React_2 from 'react';
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
/**
|
|
4
|
+
* The configurations used to define a webpart's top actions.
|
|
5
|
+
*
|
|
6
|
+
* @public
|
|
7
|
+
*/
|
|
8
|
+
export declare interface ITopActions {
|
|
9
|
+
/**
|
|
10
|
+
* List of top actions configurations
|
|
11
|
+
*/
|
|
12
|
+
readonly topActions: ITopActionsField[];
|
|
13
|
+
/**
|
|
14
|
+
* Triggered once the top action configuration state has been executed for the specified property path
|
|
15
|
+
* @param actionName - the specified property path that has been altered
|
|
16
|
+
* @param updatedValue - the updated value passed by top actions for the specified actionName
|
|
17
|
+
*/
|
|
18
|
+
onExecute(actionName: string, updatedValue: any): void;
|
|
19
|
+
}
|
|
4
20
|
|
|
5
|
-
|
|
21
|
+
/**
|
|
22
|
+
* TopActions button props.
|
|
23
|
+
*
|
|
24
|
+
* @public
|
|
25
|
+
*/
|
|
26
|
+
export declare interface ITopActionsButtonProps {
|
|
27
|
+
/**
|
|
28
|
+
* Display text of the element.
|
|
29
|
+
*/
|
|
30
|
+
readonly text: string;
|
|
31
|
+
/**
|
|
32
|
+
* The button icon to display.
|
|
33
|
+
*/
|
|
34
|
+
readonly icon?: string;
|
|
35
|
+
/**
|
|
36
|
+
* Description of the action this button takes.
|
|
37
|
+
*/
|
|
38
|
+
readonly description?: string;
|
|
39
|
+
/**
|
|
40
|
+
* Whether the button is disabled.
|
|
41
|
+
*/
|
|
42
|
+
readonly disabled?: boolean;
|
|
43
|
+
/**
|
|
44
|
+
* The aria label of the button for the benefit of screen readers.
|
|
45
|
+
*/
|
|
46
|
+
readonly ariaLabel?: string;
|
|
47
|
+
/**
|
|
48
|
+
* Detailed description of the button for the benefit of screen readers.
|
|
49
|
+
*
|
|
50
|
+
*Button types will need more information provided to screen reader.
|
|
51
|
+
*/
|
|
52
|
+
readonly ariaDescription?: string;
|
|
53
|
+
/* Excluded from this release type: themableSvg */
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
/**
|
|
57
|
+
* TopActions Dropdown option props.
|
|
58
|
+
*
|
|
59
|
+
* @public
|
|
60
|
+
*/
|
|
61
|
+
export declare interface ITopActionsDropdownOption {
|
|
62
|
+
/**
|
|
63
|
+
* Title (tooltip) text displayed when hovering over an item.
|
|
64
|
+
*/
|
|
65
|
+
readonly title?: string;
|
|
66
|
+
/**
|
|
67
|
+
* A required key to uniquely identify the option.
|
|
68
|
+
*/
|
|
69
|
+
readonly key: string | number;
|
|
70
|
+
/**
|
|
71
|
+
* The text string for the option.
|
|
72
|
+
*/
|
|
73
|
+
readonly text: string;
|
|
74
|
+
/**
|
|
75
|
+
* The Icon component props for choice field.
|
|
76
|
+
*/
|
|
77
|
+
readonly iconProps?: ITopActionsDropdownOptionIconProps;
|
|
78
|
+
/**
|
|
79
|
+
* The src of image for choice field.
|
|
80
|
+
*/
|
|
81
|
+
readonly imageSrc?: string;
|
|
82
|
+
/**
|
|
83
|
+
* The src of image for choice field which is selected.
|
|
84
|
+
*/
|
|
85
|
+
readonly selectedImageSrc?: string;
|
|
86
|
+
/**
|
|
87
|
+
* The width and height of the image in px for choice field.
|
|
88
|
+
*/
|
|
89
|
+
readonly imageSize?: {
|
|
90
|
+
readonly width: number;
|
|
91
|
+
readonly height: number;
|
|
92
|
+
};
|
|
93
|
+
/**
|
|
94
|
+
* Whether the choice group option is disabled or not.
|
|
95
|
+
*/
|
|
96
|
+
readonly disabled?: boolean;
|
|
97
|
+
/**
|
|
98
|
+
* Whether the choice group option is checked or not.
|
|
99
|
+
*
|
|
100
|
+
* Default value is false.
|
|
101
|
+
*/
|
|
102
|
+
readonly checked?: boolean;
|
|
103
|
+
/**
|
|
104
|
+
* The aria label of the choice group option for the benefit of screen readers.
|
|
105
|
+
*/
|
|
106
|
+
readonly ariaLabel?: string;
|
|
107
|
+
/* Excluded from this release type: themableSvg */
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
/**
|
|
111
|
+
* TopActions Dropdown icon props.
|
|
112
|
+
*
|
|
113
|
+
* @public
|
|
114
|
+
*/
|
|
115
|
+
export declare interface ITopActionsDropdownOptionIconProps {
|
|
116
|
+
/**
|
|
117
|
+
* The name of the icon to use from the Office Fabric icon set.
|
|
118
|
+
*/
|
|
119
|
+
readonly officeFabricIconFontName?: string | null;
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
/**
|
|
123
|
+
* TopActions Dropdown props.
|
|
124
|
+
*
|
|
125
|
+
* @public
|
|
126
|
+
*/
|
|
127
|
+
export declare interface ITopActionsDropdownProps {
|
|
128
|
+
/**
|
|
129
|
+
* The options for the choice group.
|
|
130
|
+
*/
|
|
131
|
+
readonly options: ITopActionsDropdownOption[];
|
|
132
|
+
/**
|
|
133
|
+
* Adds functionality to create an action dropdown where
|
|
134
|
+
* the selected choice is not highlighted at the top level.
|
|
135
|
+
*
|
|
136
|
+
* The TitleButton is always displayed on the toolbar.
|
|
137
|
+
*/
|
|
138
|
+
readonly titleButton?: ITopActionsButtonProps;
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
/**
|
|
142
|
+
* Configuration used for a single Top Action command.
|
|
143
|
+
*
|
|
144
|
+
* @public
|
|
145
|
+
*/
|
|
146
|
+
export declare interface ITopActionsField<TProperties = any> {
|
|
147
|
+
/**
|
|
148
|
+
* Display name for the action which can be used in a tooltip or aria-label.
|
|
149
|
+
*/
|
|
150
|
+
readonly title?: string;
|
|
151
|
+
/**
|
|
152
|
+
* Type of the top actions field.
|
|
153
|
+
*/
|
|
154
|
+
readonly type: TopActionsFieldType;
|
|
155
|
+
/**
|
|
156
|
+
* Target property from the web part's property bag.
|
|
157
|
+
*/
|
|
158
|
+
readonly targetProperty: string;
|
|
159
|
+
/**
|
|
160
|
+
* Whether this control should be focused.
|
|
161
|
+
*
|
|
162
|
+
* @remarks
|
|
163
|
+
* The default value is false.
|
|
164
|
+
*/
|
|
165
|
+
readonly shouldFocus?: boolean;
|
|
166
|
+
/**
|
|
167
|
+
* Strongly typed properties object. Specific to each field type.
|
|
168
|
+
*
|
|
169
|
+
* @remarks
|
|
170
|
+
* Example: Dropdown has ITopActionsChoiceGroupProps, Button has ITopActionsButtonProps props.
|
|
171
|
+
*
|
|
172
|
+
* @privateRemarks
|
|
173
|
+
* - These props are from the office-ui-fabric-react.
|
|
174
|
+
* These props may not be extensive as the fabric-react ones. This is intentional.
|
|
175
|
+
* - We are not including any callbacks as part of the props, as this might end up breaking
|
|
176
|
+
* the internal flow and cause unwanted problems.
|
|
177
|
+
* - These are in line with property pane props as top actions consumes from the same
|
|
178
|
+
* source as property pane.
|
|
179
|
+
*
|
|
180
|
+
* We are including only those which are supported by the web part framework.
|
|
181
|
+
*/
|
|
182
|
+
readonly properties: TProperties;
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
/**
|
|
186
|
+
* Enum for all the supported Top Actions field types.
|
|
187
|
+
*
|
|
188
|
+
* Names should be consistent with those in office-ui-fabric-react, be careful to get letter casing correct.
|
|
189
|
+
*
|
|
190
|
+
* @public
|
|
191
|
+
*/
|
|
192
|
+
export declare enum TopActionsFieldType {
|
|
193
|
+
/**
|
|
194
|
+
* Choice Group field.
|
|
195
|
+
*/
|
|
196
|
+
Dropdown = 10,
|
|
197
|
+
/**
|
|
198
|
+
* Button field.
|
|
199
|
+
*/
|
|
200
|
+
Button = 11
|
|
201
|
+
}
|
|
6
202
|
|
|
7
203
|
export { }
|
package/dist/index-internal.d.ts
CHANGED
|
@@ -1,7 +1,203 @@
|
|
|
1
|
-
import
|
|
1
|
+
import type * as React_2 from 'react';
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
/**
|
|
4
|
+
* The configurations used to define a webpart's top actions.
|
|
5
|
+
*
|
|
6
|
+
* @public
|
|
7
|
+
*/
|
|
8
|
+
export declare interface ITopActions {
|
|
9
|
+
/**
|
|
10
|
+
* List of top actions configurations
|
|
11
|
+
*/
|
|
12
|
+
readonly topActions: ITopActionsField[];
|
|
13
|
+
/**
|
|
14
|
+
* Triggered once the top action configuration state has been executed for the specified property path
|
|
15
|
+
* @param actionName - the specified property path that has been altered
|
|
16
|
+
* @param updatedValue - the updated value passed by top actions for the specified actionName
|
|
17
|
+
*/
|
|
18
|
+
onExecute(actionName: string, updatedValue: any): void;
|
|
19
|
+
}
|
|
4
20
|
|
|
5
|
-
|
|
21
|
+
/**
|
|
22
|
+
* TopActions button props.
|
|
23
|
+
*
|
|
24
|
+
* @public
|
|
25
|
+
*/
|
|
26
|
+
export declare interface ITopActionsButtonProps {
|
|
27
|
+
/**
|
|
28
|
+
* Display text of the element.
|
|
29
|
+
*/
|
|
30
|
+
readonly text: string;
|
|
31
|
+
/**
|
|
32
|
+
* The button icon to display.
|
|
33
|
+
*/
|
|
34
|
+
readonly icon?: string;
|
|
35
|
+
/**
|
|
36
|
+
* Description of the action this button takes.
|
|
37
|
+
*/
|
|
38
|
+
readonly description?: string;
|
|
39
|
+
/**
|
|
40
|
+
* Whether the button is disabled.
|
|
41
|
+
*/
|
|
42
|
+
readonly disabled?: boolean;
|
|
43
|
+
/**
|
|
44
|
+
* The aria label of the button for the benefit of screen readers.
|
|
45
|
+
*/
|
|
46
|
+
readonly ariaLabel?: string;
|
|
47
|
+
/**
|
|
48
|
+
* Detailed description of the button for the benefit of screen readers.
|
|
49
|
+
*
|
|
50
|
+
*Button types will need more information provided to screen reader.
|
|
51
|
+
*/
|
|
52
|
+
readonly ariaDescription?: string;
|
|
53
|
+
/* Excluded from this release type: themableSvg */
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
/**
|
|
57
|
+
* TopActions Dropdown option props.
|
|
58
|
+
*
|
|
59
|
+
* @public
|
|
60
|
+
*/
|
|
61
|
+
export declare interface ITopActionsDropdownOption {
|
|
62
|
+
/**
|
|
63
|
+
* Title (tooltip) text displayed when hovering over an item.
|
|
64
|
+
*/
|
|
65
|
+
readonly title?: string;
|
|
66
|
+
/**
|
|
67
|
+
* A required key to uniquely identify the option.
|
|
68
|
+
*/
|
|
69
|
+
readonly key: string | number;
|
|
70
|
+
/**
|
|
71
|
+
* The text string for the option.
|
|
72
|
+
*/
|
|
73
|
+
readonly text: string;
|
|
74
|
+
/**
|
|
75
|
+
* The Icon component props for choice field.
|
|
76
|
+
*/
|
|
77
|
+
readonly iconProps?: ITopActionsDropdownOptionIconProps;
|
|
78
|
+
/**
|
|
79
|
+
* The src of image for choice field.
|
|
80
|
+
*/
|
|
81
|
+
readonly imageSrc?: string;
|
|
82
|
+
/**
|
|
83
|
+
* The src of image for choice field which is selected.
|
|
84
|
+
*/
|
|
85
|
+
readonly selectedImageSrc?: string;
|
|
86
|
+
/**
|
|
87
|
+
* The width and height of the image in px for choice field.
|
|
88
|
+
*/
|
|
89
|
+
readonly imageSize?: {
|
|
90
|
+
readonly width: number;
|
|
91
|
+
readonly height: number;
|
|
92
|
+
};
|
|
93
|
+
/**
|
|
94
|
+
* Whether the choice group option is disabled or not.
|
|
95
|
+
*/
|
|
96
|
+
readonly disabled?: boolean;
|
|
97
|
+
/**
|
|
98
|
+
* Whether the choice group option is checked or not.
|
|
99
|
+
*
|
|
100
|
+
* Default value is false.
|
|
101
|
+
*/
|
|
102
|
+
readonly checked?: boolean;
|
|
103
|
+
/**
|
|
104
|
+
* The aria label of the choice group option for the benefit of screen readers.
|
|
105
|
+
*/
|
|
106
|
+
readonly ariaLabel?: string;
|
|
107
|
+
/* Excluded from this release type: themableSvg */
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
/**
|
|
111
|
+
* TopActions Dropdown icon props.
|
|
112
|
+
*
|
|
113
|
+
* @public
|
|
114
|
+
*/
|
|
115
|
+
export declare interface ITopActionsDropdownOptionIconProps {
|
|
116
|
+
/**
|
|
117
|
+
* The name of the icon to use from the Office Fabric icon set.
|
|
118
|
+
*/
|
|
119
|
+
readonly officeFabricIconFontName?: string | null;
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
/**
|
|
123
|
+
* TopActions Dropdown props.
|
|
124
|
+
*
|
|
125
|
+
* @public
|
|
126
|
+
*/
|
|
127
|
+
export declare interface ITopActionsDropdownProps {
|
|
128
|
+
/**
|
|
129
|
+
* The options for the choice group.
|
|
130
|
+
*/
|
|
131
|
+
readonly options: ITopActionsDropdownOption[];
|
|
132
|
+
/**
|
|
133
|
+
* Adds functionality to create an action dropdown where
|
|
134
|
+
* the selected choice is not highlighted at the top level.
|
|
135
|
+
*
|
|
136
|
+
* The TitleButton is always displayed on the toolbar.
|
|
137
|
+
*/
|
|
138
|
+
readonly titleButton?: ITopActionsButtonProps;
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
/**
|
|
142
|
+
* Configuration used for a single Top Action command.
|
|
143
|
+
*
|
|
144
|
+
* @public
|
|
145
|
+
*/
|
|
146
|
+
export declare interface ITopActionsField<TProperties = any> {
|
|
147
|
+
/**
|
|
148
|
+
* Display name for the action which can be used in a tooltip or aria-label.
|
|
149
|
+
*/
|
|
150
|
+
readonly title?: string;
|
|
151
|
+
/**
|
|
152
|
+
* Type of the top actions field.
|
|
153
|
+
*/
|
|
154
|
+
readonly type: TopActionsFieldType;
|
|
155
|
+
/**
|
|
156
|
+
* Target property from the web part's property bag.
|
|
157
|
+
*/
|
|
158
|
+
readonly targetProperty: string;
|
|
159
|
+
/**
|
|
160
|
+
* Whether this control should be focused.
|
|
161
|
+
*
|
|
162
|
+
* @remarks
|
|
163
|
+
* The default value is false.
|
|
164
|
+
*/
|
|
165
|
+
readonly shouldFocus?: boolean;
|
|
166
|
+
/**
|
|
167
|
+
* Strongly typed properties object. Specific to each field type.
|
|
168
|
+
*
|
|
169
|
+
* @remarks
|
|
170
|
+
* Example: Dropdown has ITopActionsChoiceGroupProps, Button has ITopActionsButtonProps props.
|
|
171
|
+
*
|
|
172
|
+
* @privateRemarks
|
|
173
|
+
* - These props are from the office-ui-fabric-react.
|
|
174
|
+
* These props may not be extensive as the fabric-react ones. This is intentional.
|
|
175
|
+
* - We are not including any callbacks as part of the props, as this might end up breaking
|
|
176
|
+
* the internal flow and cause unwanted problems.
|
|
177
|
+
* - These are in line with property pane props as top actions consumes from the same
|
|
178
|
+
* source as property pane.
|
|
179
|
+
*
|
|
180
|
+
* We are including only those which are supported by the web part framework.
|
|
181
|
+
*/
|
|
182
|
+
readonly properties: TProperties;
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
/**
|
|
186
|
+
* Enum for all the supported Top Actions field types.
|
|
187
|
+
*
|
|
188
|
+
* Names should be consistent with those in office-ui-fabric-react, be careful to get letter casing correct.
|
|
189
|
+
*
|
|
190
|
+
* @public
|
|
191
|
+
*/
|
|
192
|
+
export declare enum TopActionsFieldType {
|
|
193
|
+
/**
|
|
194
|
+
* Choice Group field.
|
|
195
|
+
*/
|
|
196
|
+
Dropdown = 10,
|
|
197
|
+
/**
|
|
198
|
+
* Button field.
|
|
199
|
+
*/
|
|
200
|
+
Button = 11
|
|
201
|
+
}
|
|
6
202
|
|
|
7
203
|
export { }
|
|
@@ -1 +1 @@
|
|
|
1
|
-
define("d5c7f2a5-a8e2-431c-9161-70d4d6396f79_1.
|
|
1
|
+
define("d5c7f2a5-a8e2-431c-9161-70d4d6396f79_1.17.0",[],function(){return function(e){var t={};function n(a){if(t[a])return t[a].exports;var i=t[a]={i:a,l:!1,exports:{}};return e[a].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=e,n.c=t,n.d=function(e,t,a){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:a})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var a=Object.create(null);if(n.r(a),Object.defineProperty(a,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)n.d(a,i,function(t){return e[t]}.bind(null,i));return a},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s="mwqp")}({mwqp:function(e,t,n){"use strict";var a;n.r(t),n.d(t,"TopActionsFieldType",function(){return a}),function(e){e[e.Dropdown=10]="Dropdown",e[e.Button=11]="Button"}(a||(a={}))}})});
|
package/dist/tsdoc-metadata.json
CHANGED
package/lib-commonjs/index.js
CHANGED
|
@@ -7,4 +7,7 @@
|
|
|
7
7
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
8
|
var tslib_1 = require("tslib");
|
|
9
9
|
tslib_1.__exportStar(require("./ITopActions"), exports);
|
|
10
|
+
tslib_1.__exportStar(require("./topActionsFields/topActionsField/topActionsField"), exports);
|
|
11
|
+
tslib_1.__exportStar(require("./topActionsFields/topActionsButton/ITopActionsButton"), exports);
|
|
12
|
+
tslib_1.__exportStar(require("./topActionsFields/topActionsDropdown/ITopActionsDropdown"), exports);
|
|
10
13
|
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// Copyright (c) Microsoft. All rights reserved.
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.TopActionsFieldType = void 0;
|
|
5
|
+
/**
|
|
6
|
+
* Enum for all the supported Top Actions field types.
|
|
7
|
+
*
|
|
8
|
+
* Names should be consistent with those in office-ui-fabric-react, be careful to get letter casing correct.
|
|
9
|
+
*
|
|
10
|
+
* @public
|
|
11
|
+
*/
|
|
12
|
+
var TopActionsFieldType;
|
|
13
|
+
(function (TopActionsFieldType) {
|
|
14
|
+
/**
|
|
15
|
+
* Choice Group field.
|
|
16
|
+
*/
|
|
17
|
+
TopActionsFieldType[TopActionsFieldType["Dropdown"] = 10] = "Dropdown";
|
|
18
|
+
/**
|
|
19
|
+
* Button field.
|
|
20
|
+
*/
|
|
21
|
+
TopActionsFieldType[TopActionsFieldType["Button"] = 11] = "Button";
|
|
22
|
+
})(TopActionsFieldType = exports.TopActionsFieldType || (exports.TopActionsFieldType = {}));
|
|
23
|
+
//# sourceMappingURL=topActionsField.js.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@microsoft/sp-top-actions",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.17.0-beta.3",
|
|
4
4
|
"description": "SharePoint Framework support for the web part top actions user interface.",
|
|
5
5
|
"license": "https://aka.ms/spfx/license",
|
|
6
6
|
"homepage": "http://aka.ms/spfx",
|
|
@@ -8,14 +8,11 @@
|
|
|
8
8
|
"module": "lib/index.js",
|
|
9
9
|
"typings": "dist/index-internal.d.ts",
|
|
10
10
|
"devDependencies": {
|
|
11
|
-
"@
|
|
12
|
-
"@odsp-web-tools/internal-node-rig": "0.1.0",
|
|
13
|
-
"@rushstack/heft": "0.47.11",
|
|
11
|
+
"@rushstack/heft": "0.49.7",
|
|
14
12
|
"@types/react": "17.0.45",
|
|
15
|
-
"@types/react-dom": "17.0.17"
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
"@microsoft/sp-property-pane": "1.16.1"
|
|
13
|
+
"@types/react-dom": "17.0.17",
|
|
14
|
+
"@ms/spfx-internal-web-build-rig": "0.1.0",
|
|
15
|
+
"@odsp-web-tools/internal-node-rig": "0.1.0"
|
|
19
16
|
},
|
|
20
17
|
"scripts": {
|
|
21
18
|
"build": "heft test --clean",
|