@microsoft/sp-listview-extensibility 1.13.1 → 1.14.0
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/d37b65ee-c7d8-4570-bc74-2b294ff3b380.manifest.json +9 -4
- package/dist/index-internal-beta.d.ts +267 -4
- package/dist/index-internal-public.d.ts +267 -4
- package/dist/index-internal.d.ts +267 -4
- package/dist/sp-listview-extensibility_none_a53ef3010444ac520245.js +1 -0
- package/dist/tsdoc-metadata.json +1 -1
- package/lib-commonjs/commandSet/BaseListViewCommandSet.js +17 -4
- package/lib-commonjs/commandSet/ListViewCommandSetContext.js +18 -1
- package/lib-commonjs/common/KillSwitches.js +11 -0
- package/lib-commonjs/common/ListViewAccessor.js +54 -2
- package/lib-commonjs/common/ListViewAccessorState.js +21 -0
- package/lib-commonjs/index.js +3 -0
- package/package.json +5 -5
- package/dist/sp-listview-extensibility_none_abbcd32929f87f9a82df.js +0 -1
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"id": "d37b65ee-c7d8-4570-bc74-2b294ff3b380",
|
|
3
3
|
"alias": "SPListViewExtensibility",
|
|
4
4
|
"componentType": "Library",
|
|
5
|
-
"version": "1.
|
|
5
|
+
"version": "1.14.0",
|
|
6
6
|
"manifestVersion": 2,
|
|
7
7
|
"loaderConfig": {
|
|
8
8
|
"internalModuleBaseUrls": [
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
"scriptResources": {
|
|
13
13
|
"sp-listview-extensibility": {
|
|
14
14
|
"type": "path",
|
|
15
|
-
"path": "sp-listview-
|
|
15
|
+
"path": "sp-listview-extensibility_none_a53ef3010444ac520245.js"
|
|
16
16
|
},
|
|
17
17
|
"tslib": {
|
|
18
18
|
"type": "component",
|
|
@@ -22,12 +22,17 @@
|
|
|
22
22
|
"@microsoft/sp-core-library": {
|
|
23
23
|
"type": "component",
|
|
24
24
|
"id": "7263c7d0-1d6a-45ec-8d85-d4d1d234171b",
|
|
25
|
-
"version": "1.
|
|
25
|
+
"version": "1.14.0"
|
|
26
|
+
},
|
|
27
|
+
"@microsoft/sp-page-context": {
|
|
28
|
+
"type": "component",
|
|
29
|
+
"id": "1c4541f7-5c31-41aa-9fa8-fbc9dc14c0a8",
|
|
30
|
+
"version": "1.14.0"
|
|
26
31
|
},
|
|
27
32
|
"@microsoft/sp-extension-base": {
|
|
28
33
|
"type": "component",
|
|
29
34
|
"id": "0773bd53-a69e-4293-87e6-ba80ea4d614b",
|
|
30
|
-
"version": "1.
|
|
35
|
+
"version": "1.14.0"
|
|
31
36
|
}
|
|
32
37
|
}
|
|
33
38
|
}
|
|
@@ -6,7 +6,9 @@
|
|
|
6
6
|
|
|
7
7
|
import { BaseExtension } from '@microsoft/sp-extension-base';
|
|
8
8
|
import { ExtensionContext } from '@microsoft/sp-extension-base';
|
|
9
|
+
import { Guid } from '@microsoft/sp-core-library';
|
|
9
10
|
import { ICommandSetExtensionManifest } from '@microsoft/sp-module-interfaces';
|
|
11
|
+
import { IDisposable } from '@microsoft/sp-core-library';
|
|
10
12
|
import { SPEvent } from '@microsoft/sp-core-library';
|
|
11
13
|
import { SPEventArgs } from '@microsoft/sp-core-library';
|
|
12
14
|
import { SPField } from '@microsoft/sp-page-context';
|
|
@@ -48,6 +50,7 @@ export declare abstract class BaseListViewCommandSet<TProperties> extends BaseEx
|
|
|
48
50
|
* {@inheritDoc @microsoft/sp-extension-base#BaseExtension.context}
|
|
49
51
|
*/
|
|
50
52
|
readonly context: ListViewCommandSetContext;
|
|
53
|
+
/* Excluded from this release type: _raiseOnChange */
|
|
51
54
|
/* Excluded from this release type: __constructor */
|
|
52
55
|
/**
|
|
53
56
|
* Returns the command with the given id.
|
|
@@ -59,9 +62,9 @@ export declare abstract class BaseListViewCommandSet<TProperties> extends BaseEx
|
|
|
59
62
|
* This event occurs whenever the ListView state changes.
|
|
60
63
|
* virtual
|
|
61
64
|
* @remarks
|
|
62
|
-
* This event allows the implementor to tailor the
|
|
63
|
-
*
|
|
64
|
-
*
|
|
65
|
+
* This event allows the implementor to tailor the visibility of the command.
|
|
66
|
+
*
|
|
67
|
+
* @deprecated Use context.listView.listViewStateChangedEvent instead.
|
|
65
68
|
*/
|
|
66
69
|
onListViewUpdated(event: IListViewCommandSetListViewUpdatedParameters): void;
|
|
67
70
|
/**
|
|
@@ -70,6 +73,10 @@ export declare abstract class BaseListViewCommandSet<TProperties> extends BaseEx
|
|
|
70
73
|
* virtual
|
|
71
74
|
*/
|
|
72
75
|
onExecute(event: IListViewCommandSetExecuteEventParameters): void;
|
|
76
|
+
/**
|
|
77
|
+
* Use this method to fire OnChange event and initialize a reflow of the ListView.
|
|
78
|
+
*/
|
|
79
|
+
raiseOnChange(): void;
|
|
73
80
|
}
|
|
74
81
|
|
|
75
82
|
/**
|
|
@@ -144,6 +151,10 @@ export declare class Command {
|
|
|
144
151
|
* True if the command is visible.
|
|
145
152
|
*/
|
|
146
153
|
visible: boolean;
|
|
154
|
+
/**
|
|
155
|
+
* Whether the command is currently disabled.
|
|
156
|
+
*/
|
|
157
|
+
disabled: boolean | undefined;
|
|
147
158
|
}
|
|
148
159
|
|
|
149
160
|
/**
|
|
@@ -172,6 +183,50 @@ export declare class FieldCustomizerContext extends ExtensionContext {
|
|
|
172
183
|
get field(): SPField;
|
|
173
184
|
}
|
|
174
185
|
|
|
186
|
+
/**
|
|
187
|
+
* Provides information about the state of a column in the list view
|
|
188
|
+
*
|
|
189
|
+
* @public
|
|
190
|
+
*/
|
|
191
|
+
export declare interface IColumn {
|
|
192
|
+
/**
|
|
193
|
+
* The GUID identifier for this field.
|
|
194
|
+
*/
|
|
195
|
+
readonly id: Guid;
|
|
196
|
+
/**
|
|
197
|
+
* The internal name of the field. This name is usually used to find the field.
|
|
198
|
+
*/
|
|
199
|
+
readonly internalName: string;
|
|
200
|
+
/**
|
|
201
|
+
* The type of the field represented as a string
|
|
202
|
+
*/
|
|
203
|
+
readonly fieldType: string;
|
|
204
|
+
/**
|
|
205
|
+
* Whether the field is required for each list item in the list
|
|
206
|
+
*/
|
|
207
|
+
readonly isRequired: boolean;
|
|
208
|
+
/**
|
|
209
|
+
* Whether the column is visible in the view
|
|
210
|
+
*/
|
|
211
|
+
readonly isVisible: boolean;
|
|
212
|
+
/**
|
|
213
|
+
* The display name of the field. This name is shown as column name in UI.
|
|
214
|
+
*/
|
|
215
|
+
readonly displayName: string;
|
|
216
|
+
/**
|
|
217
|
+
* The unique identifier of the client-side component associated with the field.
|
|
218
|
+
*/
|
|
219
|
+
readonly clientSideComponentId: Guid | undefined;
|
|
220
|
+
/**
|
|
221
|
+
* This property is only used when a `ClientSideComponentId` is specified. It is optional.
|
|
222
|
+
*
|
|
223
|
+
* @remarks
|
|
224
|
+
* If non-empty, the string must contain a JSON object with custom initialization properties
|
|
225
|
+
* whose format and meaning are defined by the client-side component.
|
|
226
|
+
*/
|
|
227
|
+
readonly clientSideComponentProperties: string;
|
|
228
|
+
}
|
|
229
|
+
|
|
175
230
|
/* Excluded from this release type: _IExtensionContextParameters */
|
|
176
231
|
|
|
177
232
|
/**
|
|
@@ -206,6 +261,100 @@ export declare interface IFieldCustomizerCellEventParameters {
|
|
|
206
261
|
|
|
207
262
|
/* Excluded from this release type: _IFieldCustomizerContextParameters */
|
|
208
263
|
|
|
264
|
+
/**
|
|
265
|
+
* Provides information about the state of the filters applied to the ListView.
|
|
266
|
+
*
|
|
267
|
+
* @public
|
|
268
|
+
*/
|
|
269
|
+
export declare interface IFilter {
|
|
270
|
+
/**
|
|
271
|
+
* Field name to filter on.
|
|
272
|
+
*/
|
|
273
|
+
readonly fieldName: string;
|
|
274
|
+
/**
|
|
275
|
+
* Values to filter on.
|
|
276
|
+
*/
|
|
277
|
+
values: ReadonlyArray<string>;
|
|
278
|
+
}
|
|
279
|
+
|
|
280
|
+
/**
|
|
281
|
+
* Provides information about the state of the folder in the ListView.
|
|
282
|
+
*
|
|
283
|
+
* @public
|
|
284
|
+
*/
|
|
285
|
+
export declare interface IFolderInfo {
|
|
286
|
+
/**
|
|
287
|
+
* Folder path.
|
|
288
|
+
*/
|
|
289
|
+
readonly folderPath: string;
|
|
290
|
+
}
|
|
291
|
+
|
|
292
|
+
/**
|
|
293
|
+
* Provides information about the list rendered by the ListView.
|
|
294
|
+
*
|
|
295
|
+
* @public
|
|
296
|
+
*/
|
|
297
|
+
export declare interface IList {
|
|
298
|
+
/**
|
|
299
|
+
* List id.
|
|
300
|
+
*/
|
|
301
|
+
readonly guid: Guid;
|
|
302
|
+
/**
|
|
303
|
+
* List title.
|
|
304
|
+
*/
|
|
305
|
+
readonly title: string;
|
|
306
|
+
/**
|
|
307
|
+
* List server relative url.
|
|
308
|
+
*/
|
|
309
|
+
readonly serverRelativeUrl: string;
|
|
310
|
+
}
|
|
311
|
+
|
|
312
|
+
/**
|
|
313
|
+
* Provides information about the state of the ListView.
|
|
314
|
+
*
|
|
315
|
+
* @public
|
|
316
|
+
*/
|
|
317
|
+
export declare interface IListViewAccessorState {
|
|
318
|
+
/**
|
|
319
|
+
* List information.
|
|
320
|
+
*/
|
|
321
|
+
readonly list?: IList;
|
|
322
|
+
/**
|
|
323
|
+
* View information.
|
|
324
|
+
*/
|
|
325
|
+
readonly view?: IView;
|
|
326
|
+
/**
|
|
327
|
+
* Current folder information.
|
|
328
|
+
*/
|
|
329
|
+
readonly folderInfo?: IFolderInfo;
|
|
330
|
+
/**
|
|
331
|
+
* Columns information.
|
|
332
|
+
*/
|
|
333
|
+
readonly columns: ReadonlyArray<IColumn>;
|
|
334
|
+
/**
|
|
335
|
+
* Selected rows information.
|
|
336
|
+
*/
|
|
337
|
+
readonly selectedRows?: ReadonlyArray<IRow>;
|
|
338
|
+
/**
|
|
339
|
+
* Rows information.
|
|
340
|
+
*/
|
|
341
|
+
readonly rows: ReadonlyArray<IRow>;
|
|
342
|
+
/**
|
|
343
|
+
* Applied filters information.
|
|
344
|
+
*/
|
|
345
|
+
readonly appliedFilters?: {
|
|
346
|
+
[fieldName: string]: IFilter;
|
|
347
|
+
};
|
|
348
|
+
/**
|
|
349
|
+
* Sort field name.
|
|
350
|
+
*/
|
|
351
|
+
readonly sortField?: string;
|
|
352
|
+
/**
|
|
353
|
+
* Sort direction.
|
|
354
|
+
*/
|
|
355
|
+
readonly sortAscending?: boolean;
|
|
356
|
+
}
|
|
357
|
+
|
|
209
358
|
/* Excluded from this release type: _IListViewCommandSetContextParameters */
|
|
210
359
|
|
|
211
360
|
/**
|
|
@@ -237,6 +386,41 @@ export declare interface IListViewCommandSetListViewUpdatedParameters {
|
|
|
237
386
|
readonly selectedRows: ReadonlyArray<RowAccessor>;
|
|
238
387
|
}
|
|
239
388
|
|
|
389
|
+
/**
|
|
390
|
+
* Provides information about the list item's state rendered by the ListView.
|
|
391
|
+
*
|
|
392
|
+
* @public
|
|
393
|
+
*/
|
|
394
|
+
export declare interface IRow {
|
|
395
|
+
/**
|
|
396
|
+
* A map of column values for the row. They key is the column internal name and the value
|
|
397
|
+
* is its corresponding value in the row.
|
|
398
|
+
*/
|
|
399
|
+
readonly values: {
|
|
400
|
+
[columnInternalName: string]: Readonly<any>;
|
|
401
|
+
};
|
|
402
|
+
}
|
|
403
|
+
|
|
404
|
+
/**
|
|
405
|
+
* Provides information about the view rendered by the ListView.
|
|
406
|
+
*
|
|
407
|
+
* @public
|
|
408
|
+
*/
|
|
409
|
+
export declare interface IView {
|
|
410
|
+
/**
|
|
411
|
+
* View id.
|
|
412
|
+
*/
|
|
413
|
+
readonly id: Guid;
|
|
414
|
+
/**
|
|
415
|
+
* View title.
|
|
416
|
+
*/
|
|
417
|
+
readonly title: string;
|
|
418
|
+
/**
|
|
419
|
+
* View server relative url.
|
|
420
|
+
*/
|
|
421
|
+
readonly url: string;
|
|
422
|
+
}
|
|
423
|
+
|
|
240
424
|
/**
|
|
241
425
|
* When a field customizer extension is rendering a field, the ListItemAccessor provides
|
|
242
426
|
* access to the associated SharePoint list item.
|
|
@@ -282,14 +466,52 @@ export declare abstract class ListItemAccessor {
|
|
|
282
466
|
*
|
|
283
467
|
* @public
|
|
284
468
|
*/
|
|
285
|
-
export declare abstract class ListViewAccessor {
|
|
469
|
+
export declare abstract class ListViewAccessor implements IDisposable {
|
|
286
470
|
/* Excluded from this release type: _selectedRowsChangedEventName */
|
|
471
|
+
/* Excluded from this release type: _listViewStateChangedEventName */
|
|
287
472
|
private _selectedRowsChangedEvent;
|
|
473
|
+
private _listViewStateChangedEvent;
|
|
474
|
+
private readonly _listViewStateChangedEventName;
|
|
475
|
+
private _isDisposed;
|
|
288
476
|
/* Excluded from this release type: __constructor */
|
|
289
477
|
/**
|
|
290
478
|
* The columns in associated with this view, including hidden columns.
|
|
291
479
|
*/
|
|
292
480
|
abstract get columns(): ReadonlyArray<ColumnAccessor>;
|
|
481
|
+
/**
|
|
482
|
+
* Currently rendered rows in the list view.
|
|
483
|
+
*/
|
|
484
|
+
abstract get rows(): ReadonlyArray<RowAccessor>;
|
|
485
|
+
/**
|
|
486
|
+
* Selected rows in the list view.
|
|
487
|
+
*/
|
|
488
|
+
abstract get selectedRows(): ReadonlyArray<RowAccessor> | undefined;
|
|
489
|
+
/**
|
|
490
|
+
* Basic information about the list rendered by the list view.
|
|
491
|
+
*/
|
|
492
|
+
abstract get list(): IList | undefined;
|
|
493
|
+
/**
|
|
494
|
+
* Basic information about the view rendered by the list view.
|
|
495
|
+
*/
|
|
496
|
+
abstract get view(): IView | undefined;
|
|
497
|
+
/**
|
|
498
|
+
* Folder information for the list view.
|
|
499
|
+
*/
|
|
500
|
+
abstract get folderInfo(): IFolderInfo | undefined;
|
|
501
|
+
/**
|
|
502
|
+
* Filters applied to the list view.
|
|
503
|
+
*/
|
|
504
|
+
abstract get appliedFilters(): {
|
|
505
|
+
[fieldName: string]: IFilter;
|
|
506
|
+
} | undefined;
|
|
507
|
+
/**
|
|
508
|
+
* Sort field name
|
|
509
|
+
*/
|
|
510
|
+
abstract get sortField(): string | undefined;
|
|
511
|
+
/**
|
|
512
|
+
* Specifies whether the list view is sorted ascending or descending.
|
|
513
|
+
*/
|
|
514
|
+
abstract get sortAscending(): boolean | undefined;
|
|
293
515
|
/**
|
|
294
516
|
* Returns the list view column corresponding to the field with the specified internal name,
|
|
295
517
|
* or undefined if none is found.
|
|
@@ -300,6 +522,31 @@ export declare abstract class ListViewAccessor {
|
|
|
300
522
|
* @eventproperty
|
|
301
523
|
*/
|
|
302
524
|
get selectedRowsChangedEvent(): SPEvent<SelectedRowsChangedEventArgs>;
|
|
525
|
+
/**
|
|
526
|
+
* Event that gets raised every time the list view state changes.
|
|
527
|
+
*
|
|
528
|
+
* @eventproperty
|
|
529
|
+
*/
|
|
530
|
+
get listViewStateChangedEvent(): SPEvent<ListViewStateChangedEventArgs>;
|
|
531
|
+
/* Excluded from this release type: dispose */
|
|
532
|
+
/* Excluded from this release type: isDisposed */
|
|
533
|
+
}
|
|
534
|
+
|
|
535
|
+
/**
|
|
536
|
+
* Describes the type of list view state changes.
|
|
537
|
+
*
|
|
538
|
+
* @public
|
|
539
|
+
*/
|
|
540
|
+
export declare enum ListViewAccessorStateChanges {
|
|
541
|
+
None = 0,
|
|
542
|
+
List = 1,
|
|
543
|
+
View = 2,
|
|
544
|
+
Columns = 4,
|
|
545
|
+
SelectedRows = 8,
|
|
546
|
+
Rows = 16,
|
|
547
|
+
AppliedFilters = 32,
|
|
548
|
+
Sort = 64,
|
|
549
|
+
FolderInfo = 128
|
|
303
550
|
}
|
|
304
551
|
|
|
305
552
|
/**
|
|
@@ -321,6 +568,22 @@ export declare class ListViewCommandSetContext extends ExtensionContext {
|
|
|
321
568
|
/* Excluded from this release type: _commands */
|
|
322
569
|
}
|
|
323
570
|
|
|
571
|
+
/**
|
|
572
|
+
* Arguments for the list view state changed event.
|
|
573
|
+
*
|
|
574
|
+
* @public
|
|
575
|
+
*/
|
|
576
|
+
export declare class ListViewStateChangedEventArgs extends SPEventArgs {
|
|
577
|
+
/**
|
|
578
|
+
* Previous state of the ListView.
|
|
579
|
+
*/
|
|
580
|
+
prevState: Readonly<IListViewAccessorState>;
|
|
581
|
+
/**
|
|
582
|
+
* Changes that were made to the ListView state.
|
|
583
|
+
*/
|
|
584
|
+
stateChanges: ListViewAccessorStateChanges;
|
|
585
|
+
}
|
|
586
|
+
|
|
324
587
|
/**
|
|
325
588
|
* Provides access to a ListView row, which is the visual presentation
|
|
326
589
|
* of a SharePoint list item.
|
|
@@ -6,7 +6,9 @@
|
|
|
6
6
|
|
|
7
7
|
import { BaseExtension } from '@microsoft/sp-extension-base';
|
|
8
8
|
import { ExtensionContext } from '@microsoft/sp-extension-base';
|
|
9
|
+
import { Guid } from '@microsoft/sp-core-library';
|
|
9
10
|
import { ICommandSetExtensionManifest } from '@microsoft/sp-module-interfaces';
|
|
11
|
+
import { IDisposable } from '@microsoft/sp-core-library';
|
|
10
12
|
import { SPEvent } from '@microsoft/sp-core-library';
|
|
11
13
|
import { SPEventArgs } from '@microsoft/sp-core-library';
|
|
12
14
|
import { SPField } from '@microsoft/sp-page-context';
|
|
@@ -48,6 +50,7 @@ export declare abstract class BaseListViewCommandSet<TProperties> extends BaseEx
|
|
|
48
50
|
* {@inheritDoc @microsoft/sp-extension-base#BaseExtension.context}
|
|
49
51
|
*/
|
|
50
52
|
readonly context: ListViewCommandSetContext;
|
|
53
|
+
/* Excluded from this release type: _raiseOnChange */
|
|
51
54
|
/* Excluded from this release type: __constructor */
|
|
52
55
|
/**
|
|
53
56
|
* Returns the command with the given id.
|
|
@@ -59,9 +62,9 @@ export declare abstract class BaseListViewCommandSet<TProperties> extends BaseEx
|
|
|
59
62
|
* This event occurs whenever the ListView state changes.
|
|
60
63
|
* virtual
|
|
61
64
|
* @remarks
|
|
62
|
-
* This event allows the implementor to tailor the
|
|
63
|
-
*
|
|
64
|
-
*
|
|
65
|
+
* This event allows the implementor to tailor the visibility of the command.
|
|
66
|
+
*
|
|
67
|
+
* @deprecated Use context.listView.listViewStateChangedEvent instead.
|
|
65
68
|
*/
|
|
66
69
|
onListViewUpdated(event: IListViewCommandSetListViewUpdatedParameters): void;
|
|
67
70
|
/**
|
|
@@ -70,6 +73,10 @@ export declare abstract class BaseListViewCommandSet<TProperties> extends BaseEx
|
|
|
70
73
|
* virtual
|
|
71
74
|
*/
|
|
72
75
|
onExecute(event: IListViewCommandSetExecuteEventParameters): void;
|
|
76
|
+
/**
|
|
77
|
+
* Use this method to fire OnChange event and initialize a reflow of the ListView.
|
|
78
|
+
*/
|
|
79
|
+
raiseOnChange(): void;
|
|
73
80
|
}
|
|
74
81
|
|
|
75
82
|
/**
|
|
@@ -144,6 +151,10 @@ export declare class Command {
|
|
|
144
151
|
* True if the command is visible.
|
|
145
152
|
*/
|
|
146
153
|
visible: boolean;
|
|
154
|
+
/**
|
|
155
|
+
* Whether the command is currently disabled.
|
|
156
|
+
*/
|
|
157
|
+
disabled: boolean | undefined;
|
|
147
158
|
}
|
|
148
159
|
|
|
149
160
|
/**
|
|
@@ -172,6 +183,50 @@ export declare class FieldCustomizerContext extends ExtensionContext {
|
|
|
172
183
|
get field(): SPField;
|
|
173
184
|
}
|
|
174
185
|
|
|
186
|
+
/**
|
|
187
|
+
* Provides information about the state of a column in the list view
|
|
188
|
+
*
|
|
189
|
+
* @public
|
|
190
|
+
*/
|
|
191
|
+
export declare interface IColumn {
|
|
192
|
+
/**
|
|
193
|
+
* The GUID identifier for this field.
|
|
194
|
+
*/
|
|
195
|
+
readonly id: Guid;
|
|
196
|
+
/**
|
|
197
|
+
* The internal name of the field. This name is usually used to find the field.
|
|
198
|
+
*/
|
|
199
|
+
readonly internalName: string;
|
|
200
|
+
/**
|
|
201
|
+
* The type of the field represented as a string
|
|
202
|
+
*/
|
|
203
|
+
readonly fieldType: string;
|
|
204
|
+
/**
|
|
205
|
+
* Whether the field is required for each list item in the list
|
|
206
|
+
*/
|
|
207
|
+
readonly isRequired: boolean;
|
|
208
|
+
/**
|
|
209
|
+
* Whether the column is visible in the view
|
|
210
|
+
*/
|
|
211
|
+
readonly isVisible: boolean;
|
|
212
|
+
/**
|
|
213
|
+
* The display name of the field. This name is shown as column name in UI.
|
|
214
|
+
*/
|
|
215
|
+
readonly displayName: string;
|
|
216
|
+
/**
|
|
217
|
+
* The unique identifier of the client-side component associated with the field.
|
|
218
|
+
*/
|
|
219
|
+
readonly clientSideComponentId: Guid | undefined;
|
|
220
|
+
/**
|
|
221
|
+
* This property is only used when a `ClientSideComponentId` is specified. It is optional.
|
|
222
|
+
*
|
|
223
|
+
* @remarks
|
|
224
|
+
* If non-empty, the string must contain a JSON object with custom initialization properties
|
|
225
|
+
* whose format and meaning are defined by the client-side component.
|
|
226
|
+
*/
|
|
227
|
+
readonly clientSideComponentProperties: string;
|
|
228
|
+
}
|
|
229
|
+
|
|
175
230
|
/* Excluded from this release type: _IExtensionContextParameters */
|
|
176
231
|
|
|
177
232
|
/**
|
|
@@ -206,6 +261,100 @@ export declare interface IFieldCustomizerCellEventParameters {
|
|
|
206
261
|
|
|
207
262
|
/* Excluded from this release type: _IFieldCustomizerContextParameters */
|
|
208
263
|
|
|
264
|
+
/**
|
|
265
|
+
* Provides information about the state of the filters applied to the ListView.
|
|
266
|
+
*
|
|
267
|
+
* @public
|
|
268
|
+
*/
|
|
269
|
+
export declare interface IFilter {
|
|
270
|
+
/**
|
|
271
|
+
* Field name to filter on.
|
|
272
|
+
*/
|
|
273
|
+
readonly fieldName: string;
|
|
274
|
+
/**
|
|
275
|
+
* Values to filter on.
|
|
276
|
+
*/
|
|
277
|
+
values: ReadonlyArray<string>;
|
|
278
|
+
}
|
|
279
|
+
|
|
280
|
+
/**
|
|
281
|
+
* Provides information about the state of the folder in the ListView.
|
|
282
|
+
*
|
|
283
|
+
* @public
|
|
284
|
+
*/
|
|
285
|
+
export declare interface IFolderInfo {
|
|
286
|
+
/**
|
|
287
|
+
* Folder path.
|
|
288
|
+
*/
|
|
289
|
+
readonly folderPath: string;
|
|
290
|
+
}
|
|
291
|
+
|
|
292
|
+
/**
|
|
293
|
+
* Provides information about the list rendered by the ListView.
|
|
294
|
+
*
|
|
295
|
+
* @public
|
|
296
|
+
*/
|
|
297
|
+
export declare interface IList {
|
|
298
|
+
/**
|
|
299
|
+
* List id.
|
|
300
|
+
*/
|
|
301
|
+
readonly guid: Guid;
|
|
302
|
+
/**
|
|
303
|
+
* List title.
|
|
304
|
+
*/
|
|
305
|
+
readonly title: string;
|
|
306
|
+
/**
|
|
307
|
+
* List server relative url.
|
|
308
|
+
*/
|
|
309
|
+
readonly serverRelativeUrl: string;
|
|
310
|
+
}
|
|
311
|
+
|
|
312
|
+
/**
|
|
313
|
+
* Provides information about the state of the ListView.
|
|
314
|
+
*
|
|
315
|
+
* @public
|
|
316
|
+
*/
|
|
317
|
+
export declare interface IListViewAccessorState {
|
|
318
|
+
/**
|
|
319
|
+
* List information.
|
|
320
|
+
*/
|
|
321
|
+
readonly list?: IList;
|
|
322
|
+
/**
|
|
323
|
+
* View information.
|
|
324
|
+
*/
|
|
325
|
+
readonly view?: IView;
|
|
326
|
+
/**
|
|
327
|
+
* Current folder information.
|
|
328
|
+
*/
|
|
329
|
+
readonly folderInfo?: IFolderInfo;
|
|
330
|
+
/**
|
|
331
|
+
* Columns information.
|
|
332
|
+
*/
|
|
333
|
+
readonly columns: ReadonlyArray<IColumn>;
|
|
334
|
+
/**
|
|
335
|
+
* Selected rows information.
|
|
336
|
+
*/
|
|
337
|
+
readonly selectedRows?: ReadonlyArray<IRow>;
|
|
338
|
+
/**
|
|
339
|
+
* Rows information.
|
|
340
|
+
*/
|
|
341
|
+
readonly rows: ReadonlyArray<IRow>;
|
|
342
|
+
/**
|
|
343
|
+
* Applied filters information.
|
|
344
|
+
*/
|
|
345
|
+
readonly appliedFilters?: {
|
|
346
|
+
[fieldName: string]: IFilter;
|
|
347
|
+
};
|
|
348
|
+
/**
|
|
349
|
+
* Sort field name.
|
|
350
|
+
*/
|
|
351
|
+
readonly sortField?: string;
|
|
352
|
+
/**
|
|
353
|
+
* Sort direction.
|
|
354
|
+
*/
|
|
355
|
+
readonly sortAscending?: boolean;
|
|
356
|
+
}
|
|
357
|
+
|
|
209
358
|
/* Excluded from this release type: _IListViewCommandSetContextParameters */
|
|
210
359
|
|
|
211
360
|
/**
|
|
@@ -237,6 +386,41 @@ export declare interface IListViewCommandSetListViewUpdatedParameters {
|
|
|
237
386
|
readonly selectedRows: ReadonlyArray<RowAccessor>;
|
|
238
387
|
}
|
|
239
388
|
|
|
389
|
+
/**
|
|
390
|
+
* Provides information about the list item's state rendered by the ListView.
|
|
391
|
+
*
|
|
392
|
+
* @public
|
|
393
|
+
*/
|
|
394
|
+
export declare interface IRow {
|
|
395
|
+
/**
|
|
396
|
+
* A map of column values for the row. They key is the column internal name and the value
|
|
397
|
+
* is its corresponding value in the row.
|
|
398
|
+
*/
|
|
399
|
+
readonly values: {
|
|
400
|
+
[columnInternalName: string]: Readonly<any>;
|
|
401
|
+
};
|
|
402
|
+
}
|
|
403
|
+
|
|
404
|
+
/**
|
|
405
|
+
* Provides information about the view rendered by the ListView.
|
|
406
|
+
*
|
|
407
|
+
* @public
|
|
408
|
+
*/
|
|
409
|
+
export declare interface IView {
|
|
410
|
+
/**
|
|
411
|
+
* View id.
|
|
412
|
+
*/
|
|
413
|
+
readonly id: Guid;
|
|
414
|
+
/**
|
|
415
|
+
* View title.
|
|
416
|
+
*/
|
|
417
|
+
readonly title: string;
|
|
418
|
+
/**
|
|
419
|
+
* View server relative url.
|
|
420
|
+
*/
|
|
421
|
+
readonly url: string;
|
|
422
|
+
}
|
|
423
|
+
|
|
240
424
|
/**
|
|
241
425
|
* When a field customizer extension is rendering a field, the ListItemAccessor provides
|
|
242
426
|
* access to the associated SharePoint list item.
|
|
@@ -282,14 +466,52 @@ export declare abstract class ListItemAccessor {
|
|
|
282
466
|
*
|
|
283
467
|
* @public
|
|
284
468
|
*/
|
|
285
|
-
export declare abstract class ListViewAccessor {
|
|
469
|
+
export declare abstract class ListViewAccessor implements IDisposable {
|
|
286
470
|
/* Excluded from this release type: _selectedRowsChangedEventName */
|
|
471
|
+
/* Excluded from this release type: _listViewStateChangedEventName */
|
|
287
472
|
private _selectedRowsChangedEvent;
|
|
473
|
+
private _listViewStateChangedEvent;
|
|
474
|
+
private readonly _listViewStateChangedEventName;
|
|
475
|
+
private _isDisposed;
|
|
288
476
|
/* Excluded from this release type: __constructor */
|
|
289
477
|
/**
|
|
290
478
|
* The columns in associated with this view, including hidden columns.
|
|
291
479
|
*/
|
|
292
480
|
abstract get columns(): ReadonlyArray<ColumnAccessor>;
|
|
481
|
+
/**
|
|
482
|
+
* Currently rendered rows in the list view.
|
|
483
|
+
*/
|
|
484
|
+
abstract get rows(): ReadonlyArray<RowAccessor>;
|
|
485
|
+
/**
|
|
486
|
+
* Selected rows in the list view.
|
|
487
|
+
*/
|
|
488
|
+
abstract get selectedRows(): ReadonlyArray<RowAccessor> | undefined;
|
|
489
|
+
/**
|
|
490
|
+
* Basic information about the list rendered by the list view.
|
|
491
|
+
*/
|
|
492
|
+
abstract get list(): IList | undefined;
|
|
493
|
+
/**
|
|
494
|
+
* Basic information about the view rendered by the list view.
|
|
495
|
+
*/
|
|
496
|
+
abstract get view(): IView | undefined;
|
|
497
|
+
/**
|
|
498
|
+
* Folder information for the list view.
|
|
499
|
+
*/
|
|
500
|
+
abstract get folderInfo(): IFolderInfo | undefined;
|
|
501
|
+
/**
|
|
502
|
+
* Filters applied to the list view.
|
|
503
|
+
*/
|
|
504
|
+
abstract get appliedFilters(): {
|
|
505
|
+
[fieldName: string]: IFilter;
|
|
506
|
+
} | undefined;
|
|
507
|
+
/**
|
|
508
|
+
* Sort field name
|
|
509
|
+
*/
|
|
510
|
+
abstract get sortField(): string | undefined;
|
|
511
|
+
/**
|
|
512
|
+
* Specifies whether the list view is sorted ascending or descending.
|
|
513
|
+
*/
|
|
514
|
+
abstract get sortAscending(): boolean | undefined;
|
|
293
515
|
/**
|
|
294
516
|
* Returns the list view column corresponding to the field with the specified internal name,
|
|
295
517
|
* or undefined if none is found.
|
|
@@ -300,6 +522,31 @@ export declare abstract class ListViewAccessor {
|
|
|
300
522
|
* @eventproperty
|
|
301
523
|
*/
|
|
302
524
|
get selectedRowsChangedEvent(): SPEvent<SelectedRowsChangedEventArgs>;
|
|
525
|
+
/**
|
|
526
|
+
* Event that gets raised every time the list view state changes.
|
|
527
|
+
*
|
|
528
|
+
* @eventproperty
|
|
529
|
+
*/
|
|
530
|
+
get listViewStateChangedEvent(): SPEvent<ListViewStateChangedEventArgs>;
|
|
531
|
+
/* Excluded from this release type: dispose */
|
|
532
|
+
/* Excluded from this release type: isDisposed */
|
|
533
|
+
}
|
|
534
|
+
|
|
535
|
+
/**
|
|
536
|
+
* Describes the type of list view state changes.
|
|
537
|
+
*
|
|
538
|
+
* @public
|
|
539
|
+
*/
|
|
540
|
+
export declare enum ListViewAccessorStateChanges {
|
|
541
|
+
None = 0,
|
|
542
|
+
List = 1,
|
|
543
|
+
View = 2,
|
|
544
|
+
Columns = 4,
|
|
545
|
+
SelectedRows = 8,
|
|
546
|
+
Rows = 16,
|
|
547
|
+
AppliedFilters = 32,
|
|
548
|
+
Sort = 64,
|
|
549
|
+
FolderInfo = 128
|
|
303
550
|
}
|
|
304
551
|
|
|
305
552
|
/**
|
|
@@ -321,6 +568,22 @@ export declare class ListViewCommandSetContext extends ExtensionContext {
|
|
|
321
568
|
/* Excluded from this release type: _commands */
|
|
322
569
|
}
|
|
323
570
|
|
|
571
|
+
/**
|
|
572
|
+
* Arguments for the list view state changed event.
|
|
573
|
+
*
|
|
574
|
+
* @public
|
|
575
|
+
*/
|
|
576
|
+
export declare class ListViewStateChangedEventArgs extends SPEventArgs {
|
|
577
|
+
/**
|
|
578
|
+
* Previous state of the ListView.
|
|
579
|
+
*/
|
|
580
|
+
prevState: Readonly<IListViewAccessorState>;
|
|
581
|
+
/**
|
|
582
|
+
* Changes that were made to the ListView state.
|
|
583
|
+
*/
|
|
584
|
+
stateChanges: ListViewAccessorStateChanges;
|
|
585
|
+
}
|
|
586
|
+
|
|
324
587
|
/**
|
|
325
588
|
* Provides access to a ListView row, which is the visual presentation
|
|
326
589
|
* of a SharePoint list item.
|
package/dist/index-internal.d.ts
CHANGED
|
@@ -6,7 +6,9 @@
|
|
|
6
6
|
|
|
7
7
|
import { BaseExtension } from '@microsoft/sp-extension-base';
|
|
8
8
|
import { ExtensionContext } from '@microsoft/sp-extension-base';
|
|
9
|
+
import { Guid } from '@microsoft/sp-core-library';
|
|
9
10
|
import { ICommandSetExtensionManifest } from '@microsoft/sp-module-interfaces';
|
|
11
|
+
import { IDisposable } from '@microsoft/sp-core-library';
|
|
10
12
|
import { SPEvent } from '@microsoft/sp-core-library';
|
|
11
13
|
import { SPEventArgs } from '@microsoft/sp-core-library';
|
|
12
14
|
import { SPField } from '@microsoft/sp-page-context';
|
|
@@ -48,6 +50,7 @@ export declare abstract class BaseListViewCommandSet<TProperties> extends BaseEx
|
|
|
48
50
|
* {@inheritDoc @microsoft/sp-extension-base#BaseExtension.context}
|
|
49
51
|
*/
|
|
50
52
|
readonly context: ListViewCommandSetContext;
|
|
53
|
+
/* Excluded from this release type: _raiseOnChange */
|
|
51
54
|
/* Excluded from this release type: __constructor */
|
|
52
55
|
/**
|
|
53
56
|
* Returns the command with the given id.
|
|
@@ -59,9 +62,9 @@ export declare abstract class BaseListViewCommandSet<TProperties> extends BaseEx
|
|
|
59
62
|
* This event occurs whenever the ListView state changes.
|
|
60
63
|
* virtual
|
|
61
64
|
* @remarks
|
|
62
|
-
* This event allows the implementor to tailor the
|
|
63
|
-
*
|
|
64
|
-
*
|
|
65
|
+
* This event allows the implementor to tailor the visibility of the command.
|
|
66
|
+
*
|
|
67
|
+
* @deprecated Use context.listView.listViewStateChangedEvent instead.
|
|
65
68
|
*/
|
|
66
69
|
onListViewUpdated(event: IListViewCommandSetListViewUpdatedParameters): void;
|
|
67
70
|
/**
|
|
@@ -70,6 +73,10 @@ export declare abstract class BaseListViewCommandSet<TProperties> extends BaseEx
|
|
|
70
73
|
* virtual
|
|
71
74
|
*/
|
|
72
75
|
onExecute(event: IListViewCommandSetExecuteEventParameters): void;
|
|
76
|
+
/**
|
|
77
|
+
* Use this method to fire OnChange event and initialize a reflow of the ListView.
|
|
78
|
+
*/
|
|
79
|
+
raiseOnChange(): void;
|
|
73
80
|
}
|
|
74
81
|
|
|
75
82
|
/**
|
|
@@ -144,6 +151,10 @@ export declare class Command {
|
|
|
144
151
|
* True if the command is visible.
|
|
145
152
|
*/
|
|
146
153
|
visible: boolean;
|
|
154
|
+
/**
|
|
155
|
+
* Whether the command is currently disabled.
|
|
156
|
+
*/
|
|
157
|
+
disabled: boolean | undefined;
|
|
147
158
|
}
|
|
148
159
|
|
|
149
160
|
/**
|
|
@@ -172,6 +183,50 @@ export declare class FieldCustomizerContext extends ExtensionContext {
|
|
|
172
183
|
get field(): SPField;
|
|
173
184
|
}
|
|
174
185
|
|
|
186
|
+
/**
|
|
187
|
+
* Provides information about the state of a column in the list view
|
|
188
|
+
*
|
|
189
|
+
* @public
|
|
190
|
+
*/
|
|
191
|
+
export declare interface IColumn {
|
|
192
|
+
/**
|
|
193
|
+
* The GUID identifier for this field.
|
|
194
|
+
*/
|
|
195
|
+
readonly id: Guid;
|
|
196
|
+
/**
|
|
197
|
+
* The internal name of the field. This name is usually used to find the field.
|
|
198
|
+
*/
|
|
199
|
+
readonly internalName: string;
|
|
200
|
+
/**
|
|
201
|
+
* The type of the field represented as a string
|
|
202
|
+
*/
|
|
203
|
+
readonly fieldType: string;
|
|
204
|
+
/**
|
|
205
|
+
* Whether the field is required for each list item in the list
|
|
206
|
+
*/
|
|
207
|
+
readonly isRequired: boolean;
|
|
208
|
+
/**
|
|
209
|
+
* Whether the column is visible in the view
|
|
210
|
+
*/
|
|
211
|
+
readonly isVisible: boolean;
|
|
212
|
+
/**
|
|
213
|
+
* The display name of the field. This name is shown as column name in UI.
|
|
214
|
+
*/
|
|
215
|
+
readonly displayName: string;
|
|
216
|
+
/**
|
|
217
|
+
* The unique identifier of the client-side component associated with the field.
|
|
218
|
+
*/
|
|
219
|
+
readonly clientSideComponentId: Guid | undefined;
|
|
220
|
+
/**
|
|
221
|
+
* This property is only used when a `ClientSideComponentId` is specified. It is optional.
|
|
222
|
+
*
|
|
223
|
+
* @remarks
|
|
224
|
+
* If non-empty, the string must contain a JSON object with custom initialization properties
|
|
225
|
+
* whose format and meaning are defined by the client-side component.
|
|
226
|
+
*/
|
|
227
|
+
readonly clientSideComponentProperties: string;
|
|
228
|
+
}
|
|
229
|
+
|
|
175
230
|
/* Excluded from this release type: _IExtensionContextParameters */
|
|
176
231
|
|
|
177
232
|
/**
|
|
@@ -206,6 +261,100 @@ export declare interface IFieldCustomizerCellEventParameters {
|
|
|
206
261
|
|
|
207
262
|
/* Excluded from this release type: _IFieldCustomizerContextParameters */
|
|
208
263
|
|
|
264
|
+
/**
|
|
265
|
+
* Provides information about the state of the filters applied to the ListView.
|
|
266
|
+
*
|
|
267
|
+
* @public
|
|
268
|
+
*/
|
|
269
|
+
export declare interface IFilter {
|
|
270
|
+
/**
|
|
271
|
+
* Field name to filter on.
|
|
272
|
+
*/
|
|
273
|
+
readonly fieldName: string;
|
|
274
|
+
/**
|
|
275
|
+
* Values to filter on.
|
|
276
|
+
*/
|
|
277
|
+
values: ReadonlyArray<string>;
|
|
278
|
+
}
|
|
279
|
+
|
|
280
|
+
/**
|
|
281
|
+
* Provides information about the state of the folder in the ListView.
|
|
282
|
+
*
|
|
283
|
+
* @public
|
|
284
|
+
*/
|
|
285
|
+
export declare interface IFolderInfo {
|
|
286
|
+
/**
|
|
287
|
+
* Folder path.
|
|
288
|
+
*/
|
|
289
|
+
readonly folderPath: string;
|
|
290
|
+
}
|
|
291
|
+
|
|
292
|
+
/**
|
|
293
|
+
* Provides information about the list rendered by the ListView.
|
|
294
|
+
*
|
|
295
|
+
* @public
|
|
296
|
+
*/
|
|
297
|
+
export declare interface IList {
|
|
298
|
+
/**
|
|
299
|
+
* List id.
|
|
300
|
+
*/
|
|
301
|
+
readonly guid: Guid;
|
|
302
|
+
/**
|
|
303
|
+
* List title.
|
|
304
|
+
*/
|
|
305
|
+
readonly title: string;
|
|
306
|
+
/**
|
|
307
|
+
* List server relative url.
|
|
308
|
+
*/
|
|
309
|
+
readonly serverRelativeUrl: string;
|
|
310
|
+
}
|
|
311
|
+
|
|
312
|
+
/**
|
|
313
|
+
* Provides information about the state of the ListView.
|
|
314
|
+
*
|
|
315
|
+
* @public
|
|
316
|
+
*/
|
|
317
|
+
export declare interface IListViewAccessorState {
|
|
318
|
+
/**
|
|
319
|
+
* List information.
|
|
320
|
+
*/
|
|
321
|
+
readonly list?: IList;
|
|
322
|
+
/**
|
|
323
|
+
* View information.
|
|
324
|
+
*/
|
|
325
|
+
readonly view?: IView;
|
|
326
|
+
/**
|
|
327
|
+
* Current folder information.
|
|
328
|
+
*/
|
|
329
|
+
readonly folderInfo?: IFolderInfo;
|
|
330
|
+
/**
|
|
331
|
+
* Columns information.
|
|
332
|
+
*/
|
|
333
|
+
readonly columns: ReadonlyArray<IColumn>;
|
|
334
|
+
/**
|
|
335
|
+
* Selected rows information.
|
|
336
|
+
*/
|
|
337
|
+
readonly selectedRows?: ReadonlyArray<IRow>;
|
|
338
|
+
/**
|
|
339
|
+
* Rows information.
|
|
340
|
+
*/
|
|
341
|
+
readonly rows: ReadonlyArray<IRow>;
|
|
342
|
+
/**
|
|
343
|
+
* Applied filters information.
|
|
344
|
+
*/
|
|
345
|
+
readonly appliedFilters?: {
|
|
346
|
+
[fieldName: string]: IFilter;
|
|
347
|
+
};
|
|
348
|
+
/**
|
|
349
|
+
* Sort field name.
|
|
350
|
+
*/
|
|
351
|
+
readonly sortField?: string;
|
|
352
|
+
/**
|
|
353
|
+
* Sort direction.
|
|
354
|
+
*/
|
|
355
|
+
readonly sortAscending?: boolean;
|
|
356
|
+
}
|
|
357
|
+
|
|
209
358
|
/* Excluded from this release type: _IListViewCommandSetContextParameters */
|
|
210
359
|
|
|
211
360
|
/**
|
|
@@ -237,6 +386,41 @@ export declare interface IListViewCommandSetListViewUpdatedParameters {
|
|
|
237
386
|
readonly selectedRows: ReadonlyArray<RowAccessor>;
|
|
238
387
|
}
|
|
239
388
|
|
|
389
|
+
/**
|
|
390
|
+
* Provides information about the list item's state rendered by the ListView.
|
|
391
|
+
*
|
|
392
|
+
* @public
|
|
393
|
+
*/
|
|
394
|
+
export declare interface IRow {
|
|
395
|
+
/**
|
|
396
|
+
* A map of column values for the row. They key is the column internal name and the value
|
|
397
|
+
* is its corresponding value in the row.
|
|
398
|
+
*/
|
|
399
|
+
readonly values: {
|
|
400
|
+
[columnInternalName: string]: Readonly<any>;
|
|
401
|
+
};
|
|
402
|
+
}
|
|
403
|
+
|
|
404
|
+
/**
|
|
405
|
+
* Provides information about the view rendered by the ListView.
|
|
406
|
+
*
|
|
407
|
+
* @public
|
|
408
|
+
*/
|
|
409
|
+
export declare interface IView {
|
|
410
|
+
/**
|
|
411
|
+
* View id.
|
|
412
|
+
*/
|
|
413
|
+
readonly id: Guid;
|
|
414
|
+
/**
|
|
415
|
+
* View title.
|
|
416
|
+
*/
|
|
417
|
+
readonly title: string;
|
|
418
|
+
/**
|
|
419
|
+
* View server relative url.
|
|
420
|
+
*/
|
|
421
|
+
readonly url: string;
|
|
422
|
+
}
|
|
423
|
+
|
|
240
424
|
/**
|
|
241
425
|
* When a field customizer extension is rendering a field, the ListItemAccessor provides
|
|
242
426
|
* access to the associated SharePoint list item.
|
|
@@ -282,14 +466,52 @@ export declare abstract class ListItemAccessor {
|
|
|
282
466
|
*
|
|
283
467
|
* @public
|
|
284
468
|
*/
|
|
285
|
-
export declare abstract class ListViewAccessor {
|
|
469
|
+
export declare abstract class ListViewAccessor implements IDisposable {
|
|
286
470
|
/* Excluded from this release type: _selectedRowsChangedEventName */
|
|
471
|
+
/* Excluded from this release type: _listViewStateChangedEventName */
|
|
287
472
|
private _selectedRowsChangedEvent;
|
|
473
|
+
private _listViewStateChangedEvent;
|
|
474
|
+
private readonly _listViewStateChangedEventName;
|
|
475
|
+
private _isDisposed;
|
|
288
476
|
/* Excluded from this release type: __constructor */
|
|
289
477
|
/**
|
|
290
478
|
* The columns in associated with this view, including hidden columns.
|
|
291
479
|
*/
|
|
292
480
|
abstract get columns(): ReadonlyArray<ColumnAccessor>;
|
|
481
|
+
/**
|
|
482
|
+
* Currently rendered rows in the list view.
|
|
483
|
+
*/
|
|
484
|
+
abstract get rows(): ReadonlyArray<RowAccessor>;
|
|
485
|
+
/**
|
|
486
|
+
* Selected rows in the list view.
|
|
487
|
+
*/
|
|
488
|
+
abstract get selectedRows(): ReadonlyArray<RowAccessor> | undefined;
|
|
489
|
+
/**
|
|
490
|
+
* Basic information about the list rendered by the list view.
|
|
491
|
+
*/
|
|
492
|
+
abstract get list(): IList | undefined;
|
|
493
|
+
/**
|
|
494
|
+
* Basic information about the view rendered by the list view.
|
|
495
|
+
*/
|
|
496
|
+
abstract get view(): IView | undefined;
|
|
497
|
+
/**
|
|
498
|
+
* Folder information for the list view.
|
|
499
|
+
*/
|
|
500
|
+
abstract get folderInfo(): IFolderInfo | undefined;
|
|
501
|
+
/**
|
|
502
|
+
* Filters applied to the list view.
|
|
503
|
+
*/
|
|
504
|
+
abstract get appliedFilters(): {
|
|
505
|
+
[fieldName: string]: IFilter;
|
|
506
|
+
} | undefined;
|
|
507
|
+
/**
|
|
508
|
+
* Sort field name
|
|
509
|
+
*/
|
|
510
|
+
abstract get sortField(): string | undefined;
|
|
511
|
+
/**
|
|
512
|
+
* Specifies whether the list view is sorted ascending or descending.
|
|
513
|
+
*/
|
|
514
|
+
abstract get sortAscending(): boolean | undefined;
|
|
293
515
|
/**
|
|
294
516
|
* Returns the list view column corresponding to the field with the specified internal name,
|
|
295
517
|
* or undefined if none is found.
|
|
@@ -300,6 +522,31 @@ export declare abstract class ListViewAccessor {
|
|
|
300
522
|
* @eventproperty
|
|
301
523
|
*/
|
|
302
524
|
get selectedRowsChangedEvent(): SPEvent<SelectedRowsChangedEventArgs>;
|
|
525
|
+
/**
|
|
526
|
+
* Event that gets raised every time the list view state changes.
|
|
527
|
+
*
|
|
528
|
+
* @eventproperty
|
|
529
|
+
*/
|
|
530
|
+
get listViewStateChangedEvent(): SPEvent<ListViewStateChangedEventArgs>;
|
|
531
|
+
/* Excluded from this release type: dispose */
|
|
532
|
+
/* Excluded from this release type: isDisposed */
|
|
533
|
+
}
|
|
534
|
+
|
|
535
|
+
/**
|
|
536
|
+
* Describes the type of list view state changes.
|
|
537
|
+
*
|
|
538
|
+
* @public
|
|
539
|
+
*/
|
|
540
|
+
export declare enum ListViewAccessorStateChanges {
|
|
541
|
+
None = 0,
|
|
542
|
+
List = 1,
|
|
543
|
+
View = 2,
|
|
544
|
+
Columns = 4,
|
|
545
|
+
SelectedRows = 8,
|
|
546
|
+
Rows = 16,
|
|
547
|
+
AppliedFilters = 32,
|
|
548
|
+
Sort = 64,
|
|
549
|
+
FolderInfo = 128
|
|
303
550
|
}
|
|
304
551
|
|
|
305
552
|
/**
|
|
@@ -321,6 +568,22 @@ export declare class ListViewCommandSetContext extends ExtensionContext {
|
|
|
321
568
|
/* Excluded from this release type: _commands */
|
|
322
569
|
}
|
|
323
570
|
|
|
571
|
+
/**
|
|
572
|
+
* Arguments for the list view state changed event.
|
|
573
|
+
*
|
|
574
|
+
* @public
|
|
575
|
+
*/
|
|
576
|
+
export declare class ListViewStateChangedEventArgs extends SPEventArgs {
|
|
577
|
+
/**
|
|
578
|
+
* Previous state of the ListView.
|
|
579
|
+
*/
|
|
580
|
+
prevState: Readonly<IListViewAccessorState>;
|
|
581
|
+
/**
|
|
582
|
+
* Changes that were made to the ListView state.
|
|
583
|
+
*/
|
|
584
|
+
stateChanges: ListViewAccessorStateChanges;
|
|
585
|
+
}
|
|
586
|
+
|
|
324
587
|
/**
|
|
325
588
|
* Provides access to a ListView row, which is the visual presentation
|
|
326
589
|
* of a SharePoint list item.
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
define("d37b65ee-c7d8-4570-bc74-2b294ff3b380_1.14.0",["tslib","@microsoft/sp-core-library","@microsoft/sp-page-context","@microsoft/sp-extension-base"],function(n,a,i,r){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")}({"17wl":function(e,t){e.exports=n},UWqr:function(e,t){e.exports=a},"X+PM":function(e,t){e.exports=i},ZFc5:function(e,t){e.exports=r},mwqp:function(e,t,n){"use strict";n.r(t),n.d(t,"BaseListViewCommandSet",function(){return s}),n.d(t,"Command",function(){return c}),n.d(t,"ListViewCommandSetContext",function(){return l}),n.d(t,"BaseFieldCustomizer",function(){return f}),n.d(t,"FieldCustomizerContext",function(){return p}),n.d(t,"ListItemAccessor",function(){return m}),n.d(t,"ColumnAccessor",function(){return _}),n.d(t,"RowAccessor",function(){return h}),n.d(t,"SelectedRowsChangedEventArgs",function(){return b}),n.d(t,"ListViewStateChangedEventArgs",function(){return g}),n.d(t,"ListViewAccessor",function(){return v}),n.d(t,"ListViewAccessorStateChanges",function(){return a});var a,i=n("17wl"),r=n("UWqr"),o=n("ZFc5"),s=function(e){function t(){var t=e.call(this)||this;return t._raiseOnChange=void 0,t}return Object(i.__extends)(t,e),t.prototype.tryGetCommand=function(e){return r.Validate.isNonemptyString(e,"id"),this.context._commands.filter(function(t){return t.id===e})[0]},t.prototype.onListViewUpdated=function(e){},t.prototype.onExecute=function(e){},t.prototype.raiseOnChange=function(){this._raiseOnChange&&this._raiseOnChange()},t}(o.BaseExtension),c=function(){},d=n("X+PM"),l=function(e){function t(t,n){var a=e.call(this,t)||this;a._listView=n.listView,a._commandArray=[];for(var i=a.manifest.items,o=0,s=Object.keys(i);o<s.length;o++){var c=s[o];if("command"===i[c].type){var l=i[c].iconImageUrl;l&&!r.UrlUtilities.isDataUrl(l)&&(l=r.UrlUtilities.resolve(l,a.manifest.loaderConfig.internalModuleBaseUrls[0])),a._commandArray.push({id:c,title:i[c].title.default||"",ariaLabel:i[c].ariaLabel?i[c].ariaLabel.default:void 0,iconImageUrl:l,visible:!0,disabled:void 0})}}return!r._SPKillSwitch.isActivated("38c1f92c-5240-42ea-9c8c-8485ae721247")&&a._commandArray.length&&a.serviceScope.whenFinished(function(){var e=a.serviceScope.consume(d.PageContext.serviceKey).cultureInfo.currentUICultureName;a._commandArray.forEach(function(t){var n=i[t.id];t.title=r.Text._getLocalizedString(n.title,e)||"",n.ariaLabel&&(t.ariaLabel=r.Text._getLocalizedString(n.ariaLabel,e))})}),a}return Object(i.__extends)(t,e),Object.defineProperty(t.prototype,"listView",{get:function(){return this._listView},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"_commands",{get:function(){return this._commandArray},enumerable:!1,configurable:!0}),t}(o.ExtensionContext),u=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Object(i.__extends)(t,e),t.prototype.onRenderCell=function(e){var t=""+e.fieldValue;e.fieldValue.innerText=t},t.prototype.onDisposeCell=function(e){},t}(o.BaseExtension),f=u,p=function(e){function t(t,n){var a=e.call(this,t)||this;return a._listView=n.listView,a._field=n.field,a}return Object(i.__extends)(t,e),t.prototype.tryGetListView=function(){return this._listView},Object.defineProperty(t.prototype,"field",{get:function(){return this._field},enumerable:!1,configurable:!0}),t}(o.ExtensionContext),m=function(){},_=function(){},h=function(e){function t(){return e.call(this)||this}return Object(i.__extends)(t,e),t}(m),b=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Object(i.__extends)(t,e),t}(r.SPEventArgs),g=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Object(i.__extends)(t,e),t}(r.SPEventArgs),v=function(){function e(t){this._isDisposed=!1,this._selectedRowsChangedEvent=new r.SPEvent(e._selectedRowsChangedEventName),this._listViewStateChangedEventName=""+e._listViewStateChangedEventName+(t||""),this._listViewStateChangedEvent=new r.SPEvent(this._listViewStateChangedEventName)}return Object.defineProperty(e.prototype,"selectedRowsChangedEvent",{get:function(){return this._selectedRowsChangedEvent},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"listViewStateChangedEvent",{get:function(){return this._listViewStateChangedEvent},enumerable:!1,configurable:!0}),e.prototype.dispose=function(){r._SPEventManager.instance.removeEvent(this._listViewStateChangedEventName),this._isDisposed=!0},Object.defineProperty(e.prototype,"isDisposed",{get:function(){return this._isDisposed},enumerable:!1,configurable:!0}),e._selectedRowsChangedEventName="listView.selectedRowsChanged",e._listViewStateChangedEventName="listView.stateChanged",e}();!function(e){e[e.None=0]="None",e[e.List=1]="List",e[e.View=2]="View",e[e.Columns=4]="Columns",e[e.SelectedRows=8]="SelectedRows",e[e.Rows=16]="Rows",e[e.AppliedFilters=32]="AppliedFilters",e[e.Sort=64]="Sort",e[e.FolderInfo=128]="FolderInfo"}(a||(a={}))}})});
|
package/dist/tsdoc-metadata.json
CHANGED
|
@@ -23,7 +23,12 @@ var BaseListViewCommandSet = /** @class */ (function (_super) {
|
|
|
23
23
|
* @internal
|
|
24
24
|
*/
|
|
25
25
|
function BaseListViewCommandSet() {
|
|
26
|
-
|
|
26
|
+
var _this = _super.call(this) || this;
|
|
27
|
+
/**
|
|
28
|
+
* @internal
|
|
29
|
+
*/
|
|
30
|
+
_this._raiseOnChange = undefined; // provided by Command set adapter
|
|
31
|
+
return _this;
|
|
27
32
|
}
|
|
28
33
|
/**
|
|
29
34
|
* Returns the command with the given id.
|
|
@@ -39,9 +44,9 @@ var BaseListViewCommandSet = /** @class */ (function (_super) {
|
|
|
39
44
|
* This event occurs whenever the ListView state changes.
|
|
40
45
|
* virtual
|
|
41
46
|
* @remarks
|
|
42
|
-
* This event allows the implementor to tailor the
|
|
43
|
-
*
|
|
44
|
-
*
|
|
47
|
+
* This event allows the implementor to tailor the visibility of the command.
|
|
48
|
+
*
|
|
49
|
+
* @deprecated Use context.listView.listViewStateChangedEvent instead.
|
|
45
50
|
*/
|
|
46
51
|
BaseListViewCommandSet.prototype.onListViewUpdated = function (event) {
|
|
47
52
|
// (implemented by child class)
|
|
@@ -54,6 +59,14 @@ var BaseListViewCommandSet = /** @class */ (function (_super) {
|
|
|
54
59
|
BaseListViewCommandSet.prototype.onExecute = function (event) {
|
|
55
60
|
// (implemented by child class)
|
|
56
61
|
};
|
|
62
|
+
/**
|
|
63
|
+
* Use this method to fire OnChange event and initialize a reflow of the ListView.
|
|
64
|
+
*/
|
|
65
|
+
BaseListViewCommandSet.prototype.raiseOnChange = function () {
|
|
66
|
+
if (this._raiseOnChange) {
|
|
67
|
+
this._raiseOnChange();
|
|
68
|
+
}
|
|
69
|
+
};
|
|
57
70
|
return BaseListViewCommandSet;
|
|
58
71
|
}(sp_extension_base_1.BaseExtension));
|
|
59
72
|
exports.default = BaseListViewCommandSet;
|
|
@@ -3,6 +3,8 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
var tslib_1 = require("tslib");
|
|
4
4
|
var sp_extension_base_1 = require("@microsoft/sp-extension-base");
|
|
5
5
|
var sp_core_library_1 = require("@microsoft/sp-core-library");
|
|
6
|
+
var KillSwitches_1 = require("../common/KillSwitches");
|
|
7
|
+
var sp_page_context_1 = require("@microsoft/sp-page-context");
|
|
6
8
|
/**
|
|
7
9
|
* This object provides contextual information for BaseListViewCommandSet.
|
|
8
10
|
* @public
|
|
@@ -32,10 +34,25 @@ var ListViewCommandSetContext = /** @class */ (function (_super) {
|
|
|
32
34
|
? itemsMap[itemId].ariaLabel.default
|
|
33
35
|
: undefined,
|
|
34
36
|
iconImageUrl: iconUrl,
|
|
35
|
-
visible: true
|
|
37
|
+
visible: true,
|
|
38
|
+
disabled: undefined
|
|
36
39
|
});
|
|
37
40
|
}
|
|
38
41
|
}
|
|
42
|
+
// updating title and ariaLabel based on UI culture
|
|
43
|
+
if (!KillSwitches_1.localizedCommandSetTitleKSActivated() && !!_this._commandArray.length) {
|
|
44
|
+
_this.serviceScope.whenFinished(function () {
|
|
45
|
+
var pageContext = _this.serviceScope.consume(sp_page_context_1.PageContext.serviceKey);
|
|
46
|
+
var currentUICulture = pageContext.cultureInfo.currentUICultureName;
|
|
47
|
+
_this._commandArray.forEach(function (command) {
|
|
48
|
+
var item = itemsMap[command.id];
|
|
49
|
+
command.title = sp_core_library_1.Text._getLocalizedString(item.title, currentUICulture) || '';
|
|
50
|
+
if (item.ariaLabel) {
|
|
51
|
+
command.ariaLabel = sp_core_library_1.Text._getLocalizedString(item.ariaLabel, currentUICulture);
|
|
52
|
+
}
|
|
53
|
+
});
|
|
54
|
+
});
|
|
55
|
+
}
|
|
39
56
|
return _this;
|
|
40
57
|
}
|
|
41
58
|
Object.defineProperty(ListViewCommandSetContext.prototype, "listView", {
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.localizedCommandSetTitleKSActivated = void 0;
|
|
4
|
+
var sp_core_library_1 = require("@microsoft/sp-core-library");
|
|
5
|
+
function localizedCommandSetTitleKSActivated() {
|
|
6
|
+
return sp_core_library_1._SPKillSwitch.isActivated('38c1f92c-5240-42ea-9c8c-8485ae721247'
|
|
7
|
+
/* '10/04/2021', 'Getting localized title for the Command Set' */
|
|
8
|
+
);
|
|
9
|
+
}
|
|
10
|
+
exports.localizedCommandSetTitleKSActivated = localizedCommandSetTitleKSActivated;
|
|
11
|
+
//# sourceMappingURL=KillSwitches.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.SelectedRowsChangedEventArgs = exports.RowAccessor = exports.ColumnAccessor = void 0;
|
|
3
|
+
exports.ListViewStateChangedEventArgs = exports.SelectedRowsChangedEventArgs = exports.RowAccessor = exports.ColumnAccessor = void 0;
|
|
4
4
|
var tslib_1 = require("tslib");
|
|
5
5
|
var sp_core_library_1 = require("@microsoft/sp-core-library");
|
|
6
6
|
var ListItemAccessor_1 = tslib_1.__importDefault(require("./ListItemAccessor"));
|
|
@@ -63,6 +63,19 @@ var SelectedRowsChangedEventArgs = /** @class */ (function (_super) {
|
|
|
63
63
|
return SelectedRowsChangedEventArgs;
|
|
64
64
|
}(sp_core_library_1.SPEventArgs));
|
|
65
65
|
exports.SelectedRowsChangedEventArgs = SelectedRowsChangedEventArgs;
|
|
66
|
+
/**
|
|
67
|
+
* Arguments for the list view state changed event.
|
|
68
|
+
*
|
|
69
|
+
* @public
|
|
70
|
+
*/
|
|
71
|
+
var ListViewStateChangedEventArgs = /** @class */ (function (_super) {
|
|
72
|
+
tslib_1.__extends(ListViewStateChangedEventArgs, _super);
|
|
73
|
+
function ListViewStateChangedEventArgs() {
|
|
74
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
75
|
+
}
|
|
76
|
+
return ListViewStateChangedEventArgs;
|
|
77
|
+
}(sp_core_library_1.SPEventArgs));
|
|
78
|
+
exports.ListViewStateChangedEventArgs = ListViewStateChangedEventArgs;
|
|
66
79
|
/**
|
|
67
80
|
* Provides access to a SharePoint ListView control.
|
|
68
81
|
*
|
|
@@ -72,8 +85,11 @@ var ListViewAccessor = /** @class */ (function () {
|
|
|
72
85
|
/**
|
|
73
86
|
* @internal
|
|
74
87
|
*/
|
|
75
|
-
function ListViewAccessor() {
|
|
88
|
+
function ListViewAccessor(eventPrefix) {
|
|
89
|
+
this._isDisposed = false;
|
|
76
90
|
this._selectedRowsChangedEvent = new sp_core_library_1.SPEvent(ListViewAccessor._selectedRowsChangedEventName);
|
|
91
|
+
this._listViewStateChangedEventName = "" + ListViewAccessor._listViewStateChangedEventName + (eventPrefix || '');
|
|
92
|
+
this._listViewStateChangedEvent = new sp_core_library_1.SPEvent(this._listViewStateChangedEventName);
|
|
77
93
|
}
|
|
78
94
|
Object.defineProperty(ListViewAccessor.prototype, "selectedRowsChangedEvent", {
|
|
79
95
|
/**
|
|
@@ -86,11 +102,47 @@ var ListViewAccessor = /** @class */ (function () {
|
|
|
86
102
|
enumerable: false,
|
|
87
103
|
configurable: true
|
|
88
104
|
});
|
|
105
|
+
Object.defineProperty(ListViewAccessor.prototype, "listViewStateChangedEvent", {
|
|
106
|
+
/**
|
|
107
|
+
* Event that gets raised every time the list view state changes.
|
|
108
|
+
*
|
|
109
|
+
* @eventproperty
|
|
110
|
+
*/
|
|
111
|
+
get: function () {
|
|
112
|
+
return this._listViewStateChangedEvent;
|
|
113
|
+
},
|
|
114
|
+
enumerable: false,
|
|
115
|
+
configurable: true
|
|
116
|
+
});
|
|
117
|
+
/**
|
|
118
|
+
* @internal
|
|
119
|
+
*/
|
|
120
|
+
ListViewAccessor.prototype.dispose = function () {
|
|
121
|
+
sp_core_library_1._SPEventManager.instance.removeEvent(this._listViewStateChangedEventName);
|
|
122
|
+
this._isDisposed = true;
|
|
123
|
+
};
|
|
124
|
+
Object.defineProperty(ListViewAccessor.prototype, "isDisposed", {
|
|
125
|
+
/**
|
|
126
|
+
* @internal
|
|
127
|
+
*/
|
|
128
|
+
get: function () {
|
|
129
|
+
return this._isDisposed;
|
|
130
|
+
},
|
|
131
|
+
enumerable: false,
|
|
132
|
+
configurable: true
|
|
133
|
+
});
|
|
89
134
|
/**
|
|
90
135
|
* SPEvent name when the selected rows in a list have changed.
|
|
136
|
+
*
|
|
91
137
|
* @internal
|
|
92
138
|
*/
|
|
93
139
|
ListViewAccessor._selectedRowsChangedEventName = 'listView.selectedRowsChanged';
|
|
140
|
+
/**
|
|
141
|
+
* SPEvent name when the list view state has changed.
|
|
142
|
+
*
|
|
143
|
+
* @internal
|
|
144
|
+
*/
|
|
145
|
+
ListViewAccessor._listViewStateChangedEventName = 'listView.stateChanged';
|
|
94
146
|
return ListViewAccessor;
|
|
95
147
|
}());
|
|
96
148
|
exports.default = ListViewAccessor;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ListViewAccessorStateChanges = void 0;
|
|
4
|
+
/**
|
|
5
|
+
* Describes the type of list view state changes.
|
|
6
|
+
*
|
|
7
|
+
* @public
|
|
8
|
+
*/
|
|
9
|
+
var ListViewAccessorStateChanges;
|
|
10
|
+
(function (ListViewAccessorStateChanges) {
|
|
11
|
+
ListViewAccessorStateChanges[ListViewAccessorStateChanges["None"] = 0] = "None";
|
|
12
|
+
ListViewAccessorStateChanges[ListViewAccessorStateChanges["List"] = 1] = "List";
|
|
13
|
+
ListViewAccessorStateChanges[ListViewAccessorStateChanges["View"] = 2] = "View";
|
|
14
|
+
ListViewAccessorStateChanges[ListViewAccessorStateChanges["Columns"] = 4] = "Columns";
|
|
15
|
+
ListViewAccessorStateChanges[ListViewAccessorStateChanges["SelectedRows"] = 8] = "SelectedRows";
|
|
16
|
+
ListViewAccessorStateChanges[ListViewAccessorStateChanges["Rows"] = 16] = "Rows";
|
|
17
|
+
ListViewAccessorStateChanges[ListViewAccessorStateChanges["AppliedFilters"] = 32] = "AppliedFilters";
|
|
18
|
+
ListViewAccessorStateChanges[ListViewAccessorStateChanges["Sort"] = 64] = "Sort";
|
|
19
|
+
ListViewAccessorStateChanges[ListViewAccessorStateChanges["FolderInfo"] = 128] = "FolderInfo";
|
|
20
|
+
})(ListViewAccessorStateChanges = exports.ListViewAccessorStateChanges || (exports.ListViewAccessorStateChanges = {}));
|
|
21
|
+
//# sourceMappingURL=ListViewAccessorState.js.map
|
package/lib-commonjs/index.js
CHANGED
|
@@ -21,5 +21,8 @@ var ListViewAccessor_1 = require("./common/ListViewAccessor");
|
|
|
21
21
|
Object.defineProperty(exports, "ColumnAccessor", { enumerable: true, get: function () { return ListViewAccessor_1.ColumnAccessor; } });
|
|
22
22
|
Object.defineProperty(exports, "RowAccessor", { enumerable: true, get: function () { return ListViewAccessor_1.RowAccessor; } });
|
|
23
23
|
Object.defineProperty(exports, "SelectedRowsChangedEventArgs", { enumerable: true, get: function () { return ListViewAccessor_1.SelectedRowsChangedEventArgs; } });
|
|
24
|
+
Object.defineProperty(exports, "ListViewStateChangedEventArgs", { enumerable: true, get: function () { return ListViewAccessor_1.ListViewStateChangedEventArgs; } });
|
|
24
25
|
Object.defineProperty(exports, "ListViewAccessor", { enumerable: true, get: function () { return ListViewAccessor_1.default; } });
|
|
26
|
+
var ListViewAccessorState_1 = require("./common/ListViewAccessorState");
|
|
27
|
+
Object.defineProperty(exports, "ListViewAccessorStateChanges", { enumerable: true, get: function () { return ListViewAccessorState_1.ListViewAccessorStateChanges; } });
|
|
25
28
|
//# sourceMappingURL=index.js.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@microsoft/sp-listview-extensibility",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.14.0",
|
|
4
4
|
"description": "SharePoint Framework developer support for customizing the list view",
|
|
5
5
|
"license": "UNLICENSED",
|
|
6
6
|
"main": "lib-commonjs/index.js",
|
|
@@ -10,10 +10,10 @@
|
|
|
10
10
|
"tsdocFlavor": "AEDoc"
|
|
11
11
|
},
|
|
12
12
|
"dependencies": {
|
|
13
|
-
"@microsoft/sp-core-library": "1.
|
|
14
|
-
"@microsoft/sp-extension-base": "1.
|
|
15
|
-
"@microsoft/sp-module-interfaces": "1.
|
|
16
|
-
"@microsoft/sp-page-context": "1.
|
|
13
|
+
"@microsoft/sp-core-library": "1.14.0",
|
|
14
|
+
"@microsoft/sp-extension-base": "1.14.0",
|
|
15
|
+
"@microsoft/sp-module-interfaces": "1.14.0",
|
|
16
|
+
"@microsoft/sp-page-context": "1.14.0",
|
|
17
17
|
"tslib": "~1.10.0"
|
|
18
18
|
},
|
|
19
19
|
"scripts": {},
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
define("d37b65ee-c7d8-4570-bc74-2b294ff3b380_1.13.1",["tslib","@microsoft/sp-core-library","@microsoft/sp-extension-base"],function(n,a,i){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")}({"17wl":function(e,t){e.exports=n},UWqr:function(e,t){e.exports=a},ZFc5:function(e,t){e.exports=i},mwqp:function(e,t,n){"use strict";n.r(t),n.d(t,"BaseListViewCommandSet",function(){return o}),n.d(t,"Command",function(){return s}),n.d(t,"ListViewCommandSetContext",function(){return c}),n.d(t,"BaseFieldCustomizer",function(){return d}),n.d(t,"FieldCustomizerContext",function(){return l}),n.d(t,"ListItemAccessor",function(){return u}),n.d(t,"ColumnAccessor",function(){return f}),n.d(t,"RowAccessor",function(){return p}),n.d(t,"SelectedRowsChangedEventArgs",function(){return m}),n.d(t,"ListViewAccessor",function(){return _});var a=n("17wl"),i=n("UWqr"),r=n("ZFc5"),o=function(e){function t(){return e.call(this)||this}return Object(a.__extends)(t,e),t.prototype.tryGetCommand=function(e){return i.Validate.isNonemptyString(e,"id"),this.context._commands.filter(function(t){return t.id===e})[0]},t.prototype.onListViewUpdated=function(e){},t.prototype.onExecute=function(e){},t}(r.BaseExtension),s=function(){},c=function(e){function t(t,n){var a=e.call(this,t)||this;a._listView=n.listView,a._commandArray=[];for(var r=a.manifest.items,o=0,s=Object.keys(r);o<s.length;o++){var c=s[o];if("command"===r[c].type){var d=r[c].iconImageUrl;d&&!i.UrlUtilities.isDataUrl(d)&&(d=i.UrlUtilities.resolve(d,a.manifest.loaderConfig.internalModuleBaseUrls[0])),a._commandArray.push({id:c,title:r[c].title.default||"",ariaLabel:r[c].ariaLabel?r[c].ariaLabel.default:void 0,iconImageUrl:d,visible:!0})}}return a}return Object(a.__extends)(t,e),Object.defineProperty(t.prototype,"listView",{get:function(){return this._listView},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"_commands",{get:function(){return this._commandArray},enumerable:!1,configurable:!0}),t}(r.ExtensionContext),d=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Object(a.__extends)(t,e),t.prototype.onRenderCell=function(e){var t=""+e.fieldValue;e.fieldValue.innerText=t},t.prototype.onDisposeCell=function(e){},t}(r.BaseExtension),l=function(e){function t(t,n){var a=e.call(this,t)||this;return a._listView=n.listView,a._field=n.field,a}return Object(a.__extends)(t,e),t.prototype.tryGetListView=function(){return this._listView},Object.defineProperty(t.prototype,"field",{get:function(){return this._field},enumerable:!1,configurable:!0}),t}(r.ExtensionContext),u=function(){},f=function(){},p=function(e){function t(){return e.call(this)||this}return Object(a.__extends)(t,e),t}(u),m=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Object(a.__extends)(t,e),t}(i.SPEventArgs),_=function(){function e(){this._selectedRowsChangedEvent=new i.SPEvent(e._selectedRowsChangedEventName)}return Object.defineProperty(e.prototype,"selectedRowsChangedEvent",{get:function(){return this._selectedRowsChangedEvent},enumerable:!1,configurable:!0}),e._selectedRowsChangedEventName="listView.selectedRowsChanged",e}()}})});
|