@microsoft/sp-listview-extensibility 1.14.0-beta.5 → 1.15.0-beta.1

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.
@@ -2,7 +2,7 @@
2
2
  "id": "d37b65ee-c7d8-4570-bc74-2b294ff3b380",
3
3
  "alias": "SPListViewExtensibility",
4
4
  "componentType": "Library",
5
- "version": "1.14.0",
5
+ "version": "1.15.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-extensibility_none_ed92a9a99f00e681761d.js"
15
+ "path": "sp-listview-extensibility_none_356e5e10e07fd2101e9c.js"
16
16
  },
17
17
  "tslib": {
18
18
  "type": "component",
@@ -22,17 +22,17 @@
22
22
  "@microsoft/sp-core-library": {
23
23
  "type": "component",
24
24
  "id": "7263c7d0-1d6a-45ec-8d85-d4d1d234171b",
25
- "version": "1.14.0"
25
+ "version": "1.15.0"
26
26
  },
27
27
  "@microsoft/sp-page-context": {
28
28
  "type": "component",
29
29
  "id": "1c4541f7-5c31-41aa-9fa8-fbc9dc14c0a8",
30
- "version": "1.14.0"
30
+ "version": "1.15.0"
31
31
  },
32
32
  "@microsoft/sp-extension-base": {
33
33
  "type": "component",
34
34
  "id": "0773bd53-a69e-4293-87e6-ba80ea4d614b",
35
- "version": "1.14.0"
35
+ "version": "1.15.0"
36
36
  }
37
37
  }
38
38
  }
@@ -6,6 +6,7 @@
6
6
 
7
7
  import { BaseExtension } from '@microsoft/sp-extension-base';
8
8
  import { ExtensionContext } from '@microsoft/sp-extension-base';
9
+ import { FormDisplayMode } from '@microsoft/sp-core-library';
9
10
  import { Guid } from '@microsoft/sp-core-library';
10
11
  import { ICommandSetExtensionManifest } from '@microsoft/sp-module-interfaces';
11
12
  import { IDisposable } from '@microsoft/sp-core-library';
@@ -31,6 +32,51 @@ export declare abstract class BaseFieldCustomizer<TProperties> extends BaseExten
31
32
  onDisposeCell(event: IFieldCustomizerCellEventParameters): void;
32
33
  }
33
34
 
35
+ /**
36
+ * @public
37
+ */
38
+ export declare abstract class BaseFormCustomizer<TProperties> extends BaseExtension<TProperties> {
39
+ /**
40
+ * {@inheritDoc @microsoft/sp-extension-base#BaseExtension.context}
41
+ */
42
+ readonly context: FormCustomizerContext;
43
+ private _displayMode;
44
+ /**
45
+ * This property is a pointer to the root DOM element of the form. This is a DIV element and contains the whole
46
+ * DOM subtree of the form.
47
+ *
48
+ * @readonly
49
+ */
50
+ protected get domElement(): HTMLElement;
51
+ /**
52
+ * @readonly
53
+ */
54
+ protected get displayMode(): FormDisplayMode;
55
+ /**
56
+ * This API is called to render the form. There is no base implementation of this API and the form is
57
+ * required to override this API.
58
+ */
59
+ protected abstract render(): void;
60
+ /**
61
+ * Use this method to implement save logic for the form.
62
+ * formSaved should be called at the end of the method.
63
+ */
64
+ protected abstract onSave(): void;
65
+ /**
66
+ * Use this method to implement cancel logic for the form.
67
+ * formClosed should be called at the end of the method.
68
+ */
69
+ protected abstract onClose(): void;
70
+ /**
71
+ * Call this method after the form has been saved to inform the application that the form has been saved.
72
+ */
73
+ protected formSaved(): void;
74
+ /**
75
+ * Call this method after the form has been closed/cancelled to inform the application that the form has been closed.
76
+ */
77
+ protected formClosed(): void;
78
+ }
79
+
34
80
  /**
35
81
  * This is the base class that third parties should extend when implementing
36
82
  * a client-side extension that provides a command set for a SharePoint list view.
@@ -111,9 +157,9 @@ export declare abstract class ColumnAccessor {
111
157
  *
112
158
  * @remarks
113
159
  * The BaseListViewCommandSet extension type exposes generalized commands that may be displayed as tool bar buttons,
114
- * context menu items, etc. These commands are initially defined in the extensions manifest file. At runtime, the
160
+ * context menu items, etc. These commands are initially defined in the extension's manifest file. At runtime, the
115
161
  * corresponding Command object can be obtained by calling {@link BaseListViewCommandSet.tryGetCommand}.
116
- * The commands appearance can be customized by assigning its properties, for example to hide a command that is not
162
+ * The command's appearance can be customized by assigning its properties, for example to hide a command that is not
117
163
  * contextually relevant, or to pluralize the title based on the number of selected items.
118
164
  * @public
119
165
  */
@@ -151,6 +197,10 @@ export declare class Command {
151
197
  * True if the command is visible.
152
198
  */
153
199
  visible: boolean;
200
+ /**
201
+ * Whether the command is currently disabled.
202
+ */
203
+ disabled: boolean | undefined;
154
204
  }
155
205
 
156
206
  /**
@@ -179,10 +229,27 @@ export declare class FieldCustomizerContext extends ExtensionContext {
179
229
  get field(): SPField;
180
230
  }
181
231
 
232
+ /**
233
+ * @public
234
+ */
235
+ export declare class FormCustomizerContext extends ExtensionContext implements IFormCustomizerContext {
236
+ private _list;
237
+ private _contentTypes;
238
+ private _folderInfo;
239
+ private _itemIds;
240
+ private _domElement;
241
+ constructor(extensionContextParameters: _IExtensionContextParameters, formCustomizerContextParameters: _IFormCustomizerContextParameters);
242
+ get list(): IList;
243
+ get contentTypes(): IContentType[];
244
+ get folderInfo(): IFolderInfo | undefined;
245
+ get itemIds(): number[] | undefined;
246
+ get domElement(): HTMLElement;
247
+ }
248
+
182
249
  /**
183
250
  * Provides information about the state of a column in the list view
184
251
  *
185
- * @beta
252
+ * @public
186
253
  */
187
254
  export declare interface IColumn {
188
255
  /**
@@ -223,6 +290,16 @@ export declare interface IColumn {
223
290
  readonly clientSideComponentProperties: string;
224
291
  }
225
292
 
293
+ /**
294
+ * Provides information about the content type
295
+ *
296
+ * @public
297
+ */
298
+ export declare interface IContentType {
299
+ readonly id: string;
300
+ readonly name: string;
301
+ }
302
+
226
303
  /* Excluded from this release type: _IExtensionContextParameters */
227
304
 
228
305
  /**
@@ -260,7 +337,7 @@ export declare interface IFieldCustomizerCellEventParameters {
260
337
  /**
261
338
  * Provides information about the state of the filters applied to the ListView.
262
339
  *
263
- * @beta
340
+ * @public
264
341
  */
265
342
  export declare interface IFilter {
266
343
  /**
@@ -276,7 +353,7 @@ export declare interface IFilter {
276
353
  /**
277
354
  * Provides information about the state of the folder in the ListView.
278
355
  *
279
- * @beta
356
+ * @public
280
357
  */
281
358
  export declare interface IFolderInfo {
282
359
  /**
@@ -285,10 +362,23 @@ export declare interface IFolderInfo {
285
362
  readonly folderPath: string;
286
363
  }
287
364
 
365
+ /**
366
+ * @public
367
+ */
368
+ export declare interface IFormCustomizerContext {
369
+ readonly list: IList;
370
+ readonly contentTypes: IContentType[];
371
+ readonly folderInfo?: IFolderInfo;
372
+ readonly itemIds?: number[];
373
+ readonly domElement: HTMLElement;
374
+ }
375
+
376
+ /* Excluded from this release type: _IFormCustomizerContextParameters */
377
+
288
378
  /**
289
379
  * Provides information about the list rendered by the ListView.
290
380
  *
291
- * @beta
381
+ * @public
292
382
  */
293
383
  export declare interface IList {
294
384
  /**
@@ -308,7 +398,7 @@ export declare interface IList {
308
398
  /**
309
399
  * Provides information about the state of the ListView.
310
400
  *
311
- * @beta
401
+ * @public
312
402
  */
313
403
  export declare interface IListViewAccessorState {
314
404
  /**
@@ -385,7 +475,7 @@ export declare interface IListViewCommandSetListViewUpdatedParameters {
385
475
  /**
386
476
  * Provides information about the list item's state rendered by the ListView.
387
477
  *
388
- * @beta
478
+ * @public
389
479
  */
390
480
  export declare interface IRow {
391
481
  /**
@@ -400,7 +490,7 @@ export declare interface IRow {
400
490
  /**
401
491
  * Provides information about the view rendered by the ListView.
402
492
  *
403
- * @beta
493
+ * @public
404
494
  */
405
495
  export declare interface IView {
406
496
  /**
@@ -476,52 +566,36 @@ export declare abstract class ListViewAccessor implements IDisposable {
476
566
  abstract get columns(): ReadonlyArray<ColumnAccessor>;
477
567
  /**
478
568
  * Currently rendered rows in the list view.
479
- *
480
- * @beta
481
569
  */
482
570
  abstract get rows(): ReadonlyArray<RowAccessor>;
483
571
  /**
484
572
  * Selected rows in the list view.
485
- *
486
- * @beta
487
573
  */
488
574
  abstract get selectedRows(): ReadonlyArray<RowAccessor> | undefined;
489
575
  /**
490
576
  * Basic information about the list rendered by the list view.
491
- *
492
- * @beta
493
577
  */
494
578
  abstract get list(): IList | undefined;
495
579
  /**
496
580
  * Basic information about the view rendered by the list view.
497
- *
498
- * @beta
499
581
  */
500
582
  abstract get view(): IView | undefined;
501
583
  /**
502
584
  * Folder information for the list view.
503
- *
504
- * @beta
505
585
  */
506
586
  abstract get folderInfo(): IFolderInfo | undefined;
507
587
  /**
508
588
  * Filters applied to the list view.
509
- *
510
- * @beta
511
589
  */
512
590
  abstract get appliedFilters(): {
513
591
  [fieldName: string]: IFilter;
514
592
  } | undefined;
515
593
  /**
516
594
  * Sort field name
517
- *
518
- * @beta
519
595
  */
520
596
  abstract get sortField(): string | undefined;
521
597
  /**
522
598
  * Specifies whether the list view is sorted ascending or descending.
523
- *
524
- * @beta
525
599
  */
526
600
  abstract get sortAscending(): boolean | undefined;
527
601
  /**
@@ -537,7 +611,6 @@ export declare abstract class ListViewAccessor implements IDisposable {
537
611
  /**
538
612
  * Event that gets raised every time the list view state changes.
539
613
  *
540
- * @beta
541
614
  * @eventproperty
542
615
  */
543
616
  get listViewStateChangedEvent(): SPEvent<ListViewStateChangedEventArgs>;
@@ -548,7 +621,7 @@ export declare abstract class ListViewAccessor implements IDisposable {
548
621
  /**
549
622
  * Describes the type of list view state changes.
550
623
  *
551
- * @beta
624
+ * @public
552
625
  */
553
626
  export declare enum ListViewAccessorStateChanges {
554
627
  None = 0,
@@ -584,7 +657,7 @@ export declare class ListViewCommandSetContext extends ExtensionContext {
584
657
  /**
585
658
  * Arguments for the list view state changed event.
586
659
  *
587
- * @beta
660
+ * @public
588
661
  */
589
662
  export declare class ListViewStateChangedEventArgs extends SPEventArgs {
590
663
  /**
@@ -6,6 +6,7 @@
6
6
 
7
7
  import { BaseExtension } from '@microsoft/sp-extension-base';
8
8
  import { ExtensionContext } from '@microsoft/sp-extension-base';
9
+ import { FormDisplayMode } from '@microsoft/sp-core-library';
9
10
  import { Guid } from '@microsoft/sp-core-library';
10
11
  import { ICommandSetExtensionManifest } from '@microsoft/sp-module-interfaces';
11
12
  import { IDisposable } from '@microsoft/sp-core-library';
@@ -31,6 +32,51 @@ export declare abstract class BaseFieldCustomizer<TProperties> extends BaseExten
31
32
  onDisposeCell(event: IFieldCustomizerCellEventParameters): void;
32
33
  }
33
34
 
35
+ /**
36
+ * @public
37
+ */
38
+ export declare abstract class BaseFormCustomizer<TProperties> extends BaseExtension<TProperties> {
39
+ /**
40
+ * {@inheritDoc @microsoft/sp-extension-base#BaseExtension.context}
41
+ */
42
+ readonly context: FormCustomizerContext;
43
+ private _displayMode;
44
+ /**
45
+ * This property is a pointer to the root DOM element of the form. This is a DIV element and contains the whole
46
+ * DOM subtree of the form.
47
+ *
48
+ * @readonly
49
+ */
50
+ protected get domElement(): HTMLElement;
51
+ /**
52
+ * @readonly
53
+ */
54
+ protected get displayMode(): FormDisplayMode;
55
+ /**
56
+ * This API is called to render the form. There is no base implementation of this API and the form is
57
+ * required to override this API.
58
+ */
59
+ protected abstract render(): void;
60
+ /**
61
+ * Use this method to implement save logic for the form.
62
+ * formSaved should be called at the end of the method.
63
+ */
64
+ protected abstract onSave(): void;
65
+ /**
66
+ * Use this method to implement cancel logic for the form.
67
+ * formClosed should be called at the end of the method.
68
+ */
69
+ protected abstract onClose(): void;
70
+ /**
71
+ * Call this method after the form has been saved to inform the application that the form has been saved.
72
+ */
73
+ protected formSaved(): void;
74
+ /**
75
+ * Call this method after the form has been closed/cancelled to inform the application that the form has been closed.
76
+ */
77
+ protected formClosed(): void;
78
+ }
79
+
34
80
  /**
35
81
  * This is the base class that third parties should extend when implementing
36
82
  * a client-side extension that provides a command set for a SharePoint list view.
@@ -111,9 +157,9 @@ export declare abstract class ColumnAccessor {
111
157
  *
112
158
  * @remarks
113
159
  * The BaseListViewCommandSet extension type exposes generalized commands that may be displayed as tool bar buttons,
114
- * context menu items, etc. These commands are initially defined in the extensions manifest file. At runtime, the
160
+ * context menu items, etc. These commands are initially defined in the extension's manifest file. At runtime, the
115
161
  * corresponding Command object can be obtained by calling {@link BaseListViewCommandSet.tryGetCommand}.
116
- * The commands appearance can be customized by assigning its properties, for example to hide a command that is not
162
+ * The command's appearance can be customized by assigning its properties, for example to hide a command that is not
117
163
  * contextually relevant, or to pluralize the title based on the number of selected items.
118
164
  * @public
119
165
  */
@@ -151,6 +197,10 @@ export declare class Command {
151
197
  * True if the command is visible.
152
198
  */
153
199
  visible: boolean;
200
+ /**
201
+ * Whether the command is currently disabled.
202
+ */
203
+ disabled: boolean | undefined;
154
204
  }
155
205
 
156
206
  /**
@@ -179,7 +229,76 @@ export declare class FieldCustomizerContext extends ExtensionContext {
179
229
  get field(): SPField;
180
230
  }
181
231
 
182
- /* Excluded from this release type: IColumn */
232
+ /**
233
+ * @public
234
+ */
235
+ export declare class FormCustomizerContext extends ExtensionContext implements IFormCustomizerContext {
236
+ private _list;
237
+ private _contentTypes;
238
+ private _folderInfo;
239
+ private _itemIds;
240
+ private _domElement;
241
+ constructor(extensionContextParameters: _IExtensionContextParameters, formCustomizerContextParameters: _IFormCustomizerContextParameters);
242
+ get list(): IList;
243
+ get contentTypes(): IContentType[];
244
+ get folderInfo(): IFolderInfo | undefined;
245
+ get itemIds(): number[] | undefined;
246
+ get domElement(): HTMLElement;
247
+ }
248
+
249
+ /**
250
+ * Provides information about the state of a column in the list view
251
+ *
252
+ * @public
253
+ */
254
+ export declare interface IColumn {
255
+ /**
256
+ * The GUID identifier for this field.
257
+ */
258
+ readonly id: Guid;
259
+ /**
260
+ * The internal name of the field. This name is usually used to find the field.
261
+ */
262
+ readonly internalName: string;
263
+ /**
264
+ * The type of the field represented as a string
265
+ */
266
+ readonly fieldType: string;
267
+ /**
268
+ * Whether the field is required for each list item in the list
269
+ */
270
+ readonly isRequired: boolean;
271
+ /**
272
+ * Whether the column is visible in the view
273
+ */
274
+ readonly isVisible: boolean;
275
+ /**
276
+ * The display name of the field. This name is shown as column name in UI.
277
+ */
278
+ readonly displayName: string;
279
+ /**
280
+ * The unique identifier of the client-side component associated with the field.
281
+ */
282
+ readonly clientSideComponentId: Guid | undefined;
283
+ /**
284
+ * This property is only used when a `ClientSideComponentId` is specified. It is optional.
285
+ *
286
+ * @remarks
287
+ * If non-empty, the string must contain a JSON object with custom initialization properties
288
+ * whose format and meaning are defined by the client-side component.
289
+ */
290
+ readonly clientSideComponentProperties: string;
291
+ }
292
+
293
+ /**
294
+ * Provides information about the content type
295
+ *
296
+ * @public
297
+ */
298
+ export declare interface IContentType {
299
+ readonly id: string;
300
+ readonly name: string;
301
+ }
183
302
 
184
303
  /* Excluded from this release type: _IExtensionContextParameters */
185
304
 
@@ -215,13 +334,112 @@ export declare interface IFieldCustomizerCellEventParameters {
215
334
 
216
335
  /* Excluded from this release type: _IFieldCustomizerContextParameters */
217
336
 
218
- /* Excluded from this release type: IFilter */
337
+ /**
338
+ * Provides information about the state of the filters applied to the ListView.
339
+ *
340
+ * @public
341
+ */
342
+ export declare interface IFilter {
343
+ /**
344
+ * Field name to filter on.
345
+ */
346
+ readonly fieldName: string;
347
+ /**
348
+ * Values to filter on.
349
+ */
350
+ values: ReadonlyArray<string>;
351
+ }
219
352
 
220
- /* Excluded from this release type: IFolderInfo */
353
+ /**
354
+ * Provides information about the state of the folder in the ListView.
355
+ *
356
+ * @public
357
+ */
358
+ export declare interface IFolderInfo {
359
+ /**
360
+ * Folder path.
361
+ */
362
+ readonly folderPath: string;
363
+ }
221
364
 
222
- /* Excluded from this release type: IList */
365
+ /**
366
+ * @public
367
+ */
368
+ export declare interface IFormCustomizerContext {
369
+ readonly list: IList;
370
+ readonly contentTypes: IContentType[];
371
+ readonly folderInfo?: IFolderInfo;
372
+ readonly itemIds?: number[];
373
+ readonly domElement: HTMLElement;
374
+ }
223
375
 
224
- /* Excluded from this release type: IListViewAccessorState */
376
+ /* Excluded from this release type: _IFormCustomizerContextParameters */
377
+
378
+ /**
379
+ * Provides information about the list rendered by the ListView.
380
+ *
381
+ * @public
382
+ */
383
+ export declare interface IList {
384
+ /**
385
+ * List id.
386
+ */
387
+ readonly guid: Guid;
388
+ /**
389
+ * List title.
390
+ */
391
+ readonly title: string;
392
+ /**
393
+ * List server relative url.
394
+ */
395
+ readonly serverRelativeUrl: string;
396
+ }
397
+
398
+ /**
399
+ * Provides information about the state of the ListView.
400
+ *
401
+ * @public
402
+ */
403
+ export declare interface IListViewAccessorState {
404
+ /**
405
+ * List information.
406
+ */
407
+ readonly list?: IList;
408
+ /**
409
+ * View information.
410
+ */
411
+ readonly view?: IView;
412
+ /**
413
+ * Current folder information.
414
+ */
415
+ readonly folderInfo?: IFolderInfo;
416
+ /**
417
+ * Columns information.
418
+ */
419
+ readonly columns: ReadonlyArray<IColumn>;
420
+ /**
421
+ * Selected rows information.
422
+ */
423
+ readonly selectedRows?: ReadonlyArray<IRow>;
424
+ /**
425
+ * Rows information.
426
+ */
427
+ readonly rows: ReadonlyArray<IRow>;
428
+ /**
429
+ * Applied filters information.
430
+ */
431
+ readonly appliedFilters?: {
432
+ [fieldName: string]: IFilter;
433
+ };
434
+ /**
435
+ * Sort field name.
436
+ */
437
+ readonly sortField?: string;
438
+ /**
439
+ * Sort direction.
440
+ */
441
+ readonly sortAscending?: boolean;
442
+ }
225
443
 
226
444
  /* Excluded from this release type: _IListViewCommandSetContextParameters */
227
445
 
@@ -254,9 +472,40 @@ export declare interface IListViewCommandSetListViewUpdatedParameters {
254
472
  readonly selectedRows: ReadonlyArray<RowAccessor>;
255
473
  }
256
474
 
257
- /* Excluded from this release type: IRow */
475
+ /**
476
+ * Provides information about the list item's state rendered by the ListView.
477
+ *
478
+ * @public
479
+ */
480
+ export declare interface IRow {
481
+ /**
482
+ * A map of column values for the row. They key is the column internal name and the value
483
+ * is its corresponding value in the row.
484
+ */
485
+ readonly values: {
486
+ [columnInternalName: string]: Readonly<any>;
487
+ };
488
+ }
258
489
 
259
- /* Excluded from this release type: IView */
490
+ /**
491
+ * Provides information about the view rendered by the ListView.
492
+ *
493
+ * @public
494
+ */
495
+ export declare interface IView {
496
+ /**
497
+ * View id.
498
+ */
499
+ readonly id: Guid;
500
+ /**
501
+ * View title.
502
+ */
503
+ readonly title: string;
504
+ /**
505
+ * View server relative url.
506
+ */
507
+ readonly url: string;
508
+ }
260
509
 
261
510
  /**
262
511
  * When a field customizer extension is rendering a field, the ListItemAccessor provides
@@ -315,14 +564,40 @@ export declare abstract class ListViewAccessor implements IDisposable {
315
564
  * The columns in associated with this view, including hidden columns.
316
565
  */
317
566
  abstract get columns(): ReadonlyArray<ColumnAccessor>;
318
- /* Excluded from this release type: rows */
319
- /* Excluded from this release type: selectedRows */
320
- /* Excluded from this release type: list */
321
- /* Excluded from this release type: view */
322
- /* Excluded from this release type: folderInfo */
323
- /* Excluded from this release type: appliedFilters */
324
- /* Excluded from this release type: sortField */
325
- /* Excluded from this release type: sortAscending */
567
+ /**
568
+ * Currently rendered rows in the list view.
569
+ */
570
+ abstract get rows(): ReadonlyArray<RowAccessor>;
571
+ /**
572
+ * Selected rows in the list view.
573
+ */
574
+ abstract get selectedRows(): ReadonlyArray<RowAccessor> | undefined;
575
+ /**
576
+ * Basic information about the list rendered by the list view.
577
+ */
578
+ abstract get list(): IList | undefined;
579
+ /**
580
+ * Basic information about the view rendered by the list view.
581
+ */
582
+ abstract get view(): IView | undefined;
583
+ /**
584
+ * Folder information for the list view.
585
+ */
586
+ abstract get folderInfo(): IFolderInfo | undefined;
587
+ /**
588
+ * Filters applied to the list view.
589
+ */
590
+ abstract get appliedFilters(): {
591
+ [fieldName: string]: IFilter;
592
+ } | undefined;
593
+ /**
594
+ * Sort field name
595
+ */
596
+ abstract get sortField(): string | undefined;
597
+ /**
598
+ * Specifies whether the list view is sorted ascending or descending.
599
+ */
600
+ abstract get sortAscending(): boolean | undefined;
326
601
  /**
327
602
  * Returns the list view column corresponding to the field with the specified internal name,
328
603
  * or undefined if none is found.
@@ -333,12 +608,32 @@ export declare abstract class ListViewAccessor implements IDisposable {
333
608
  * @eventproperty
334
609
  */
335
610
  get selectedRowsChangedEvent(): SPEvent<SelectedRowsChangedEventArgs>;
336
- /* Excluded from this release type: listViewStateChangedEvent */
611
+ /**
612
+ * Event that gets raised every time the list view state changes.
613
+ *
614
+ * @eventproperty
615
+ */
616
+ get listViewStateChangedEvent(): SPEvent<ListViewStateChangedEventArgs>;
337
617
  /* Excluded from this release type: dispose */
338
618
  /* Excluded from this release type: isDisposed */
339
619
  }
340
620
 
341
- /* Excluded from this release type: ListViewAccessorStateChanges */
621
+ /**
622
+ * Describes the type of list view state changes.
623
+ *
624
+ * @public
625
+ */
626
+ export declare enum ListViewAccessorStateChanges {
627
+ None = 0,
628
+ List = 1,
629
+ View = 2,
630
+ Columns = 4,
631
+ SelectedRows = 8,
632
+ Rows = 16,
633
+ AppliedFilters = 32,
634
+ Sort = 64,
635
+ FolderInfo = 128
636
+ }
342
637
 
343
638
  /**
344
639
  * This object provides contextual information for BaseListViewCommandSet.
@@ -359,7 +654,21 @@ export declare class ListViewCommandSetContext extends ExtensionContext {
359
654
  /* Excluded from this release type: _commands */
360
655
  }
361
656
 
362
- /* Excluded from this release type: ListViewStateChangedEventArgs */
657
+ /**
658
+ * Arguments for the list view state changed event.
659
+ *
660
+ * @public
661
+ */
662
+ export declare class ListViewStateChangedEventArgs extends SPEventArgs {
663
+ /**
664
+ * Previous state of the ListView.
665
+ */
666
+ prevState: Readonly<IListViewAccessorState>;
667
+ /**
668
+ * Changes that were made to the ListView state.
669
+ */
670
+ stateChanges: ListViewAccessorStateChanges;
671
+ }
363
672
 
364
673
  /**
365
674
  * Provides access to a ListView row, which is the visual presentation
@@ -6,6 +6,7 @@
6
6
 
7
7
  import { BaseExtension } from '@microsoft/sp-extension-base';
8
8
  import { ExtensionContext } from '@microsoft/sp-extension-base';
9
+ import { FormDisplayMode } from '@microsoft/sp-core-library';
9
10
  import { Guid } from '@microsoft/sp-core-library';
10
11
  import { ICommandSetExtensionManifest } from '@microsoft/sp-module-interfaces';
11
12
  import { IDisposable } from '@microsoft/sp-core-library';
@@ -31,6 +32,51 @@ export declare abstract class BaseFieldCustomizer<TProperties> extends BaseExten
31
32
  onDisposeCell(event: IFieldCustomizerCellEventParameters): void;
32
33
  }
33
34
 
35
+ /**
36
+ * @public
37
+ */
38
+ export declare abstract class BaseFormCustomizer<TProperties> extends BaseExtension<TProperties> {
39
+ /**
40
+ * {@inheritDoc @microsoft/sp-extension-base#BaseExtension.context}
41
+ */
42
+ readonly context: FormCustomizerContext;
43
+ private _displayMode;
44
+ /**
45
+ * This property is a pointer to the root DOM element of the form. This is a DIV element and contains the whole
46
+ * DOM subtree of the form.
47
+ *
48
+ * @readonly
49
+ */
50
+ protected get domElement(): HTMLElement;
51
+ /**
52
+ * @readonly
53
+ */
54
+ protected get displayMode(): FormDisplayMode;
55
+ /**
56
+ * This API is called to render the form. There is no base implementation of this API and the form is
57
+ * required to override this API.
58
+ */
59
+ protected abstract render(): void;
60
+ /**
61
+ * Use this method to implement save logic for the form.
62
+ * formSaved should be called at the end of the method.
63
+ */
64
+ protected abstract onSave(): void;
65
+ /**
66
+ * Use this method to implement cancel logic for the form.
67
+ * formClosed should be called at the end of the method.
68
+ */
69
+ protected abstract onClose(): void;
70
+ /**
71
+ * Call this method after the form has been saved to inform the application that the form has been saved.
72
+ */
73
+ protected formSaved(): void;
74
+ /**
75
+ * Call this method after the form has been closed/cancelled to inform the application that the form has been closed.
76
+ */
77
+ protected formClosed(): void;
78
+ }
79
+
34
80
  /**
35
81
  * This is the base class that third parties should extend when implementing
36
82
  * a client-side extension that provides a command set for a SharePoint list view.
@@ -111,9 +157,9 @@ export declare abstract class ColumnAccessor {
111
157
  *
112
158
  * @remarks
113
159
  * The BaseListViewCommandSet extension type exposes generalized commands that may be displayed as tool bar buttons,
114
- * context menu items, etc. These commands are initially defined in the extensions manifest file. At runtime, the
160
+ * context menu items, etc. These commands are initially defined in the extension's manifest file. At runtime, the
115
161
  * corresponding Command object can be obtained by calling {@link BaseListViewCommandSet.tryGetCommand}.
116
- * The commands appearance can be customized by assigning its properties, for example to hide a command that is not
162
+ * The command's appearance can be customized by assigning its properties, for example to hide a command that is not
117
163
  * contextually relevant, or to pluralize the title based on the number of selected items.
118
164
  * @public
119
165
  */
@@ -151,6 +197,10 @@ export declare class Command {
151
197
  * True if the command is visible.
152
198
  */
153
199
  visible: boolean;
200
+ /**
201
+ * Whether the command is currently disabled.
202
+ */
203
+ disabled: boolean | undefined;
154
204
  }
155
205
 
156
206
  /**
@@ -179,10 +229,27 @@ export declare class FieldCustomizerContext extends ExtensionContext {
179
229
  get field(): SPField;
180
230
  }
181
231
 
232
+ /**
233
+ * @public
234
+ */
235
+ export declare class FormCustomizerContext extends ExtensionContext implements IFormCustomizerContext {
236
+ private _list;
237
+ private _contentTypes;
238
+ private _folderInfo;
239
+ private _itemIds;
240
+ private _domElement;
241
+ constructor(extensionContextParameters: _IExtensionContextParameters, formCustomizerContextParameters: _IFormCustomizerContextParameters);
242
+ get list(): IList;
243
+ get contentTypes(): IContentType[];
244
+ get folderInfo(): IFolderInfo | undefined;
245
+ get itemIds(): number[] | undefined;
246
+ get domElement(): HTMLElement;
247
+ }
248
+
182
249
  /**
183
250
  * Provides information about the state of a column in the list view
184
251
  *
185
- * @beta
252
+ * @public
186
253
  */
187
254
  export declare interface IColumn {
188
255
  /**
@@ -223,6 +290,16 @@ export declare interface IColumn {
223
290
  readonly clientSideComponentProperties: string;
224
291
  }
225
292
 
293
+ /**
294
+ * Provides information about the content type
295
+ *
296
+ * @public
297
+ */
298
+ export declare interface IContentType {
299
+ readonly id: string;
300
+ readonly name: string;
301
+ }
302
+
226
303
  /* Excluded from this release type: _IExtensionContextParameters */
227
304
 
228
305
  /**
@@ -260,7 +337,7 @@ export declare interface IFieldCustomizerCellEventParameters {
260
337
  /**
261
338
  * Provides information about the state of the filters applied to the ListView.
262
339
  *
263
- * @beta
340
+ * @public
264
341
  */
265
342
  export declare interface IFilter {
266
343
  /**
@@ -276,7 +353,7 @@ export declare interface IFilter {
276
353
  /**
277
354
  * Provides information about the state of the folder in the ListView.
278
355
  *
279
- * @beta
356
+ * @public
280
357
  */
281
358
  export declare interface IFolderInfo {
282
359
  /**
@@ -285,10 +362,23 @@ export declare interface IFolderInfo {
285
362
  readonly folderPath: string;
286
363
  }
287
364
 
365
+ /**
366
+ * @public
367
+ */
368
+ export declare interface IFormCustomizerContext {
369
+ readonly list: IList;
370
+ readonly contentTypes: IContentType[];
371
+ readonly folderInfo?: IFolderInfo;
372
+ readonly itemIds?: number[];
373
+ readonly domElement: HTMLElement;
374
+ }
375
+
376
+ /* Excluded from this release type: _IFormCustomizerContextParameters */
377
+
288
378
  /**
289
379
  * Provides information about the list rendered by the ListView.
290
380
  *
291
- * @beta
381
+ * @public
292
382
  */
293
383
  export declare interface IList {
294
384
  /**
@@ -308,7 +398,7 @@ export declare interface IList {
308
398
  /**
309
399
  * Provides information about the state of the ListView.
310
400
  *
311
- * @beta
401
+ * @public
312
402
  */
313
403
  export declare interface IListViewAccessorState {
314
404
  /**
@@ -385,7 +475,7 @@ export declare interface IListViewCommandSetListViewUpdatedParameters {
385
475
  /**
386
476
  * Provides information about the list item's state rendered by the ListView.
387
477
  *
388
- * @beta
478
+ * @public
389
479
  */
390
480
  export declare interface IRow {
391
481
  /**
@@ -400,7 +490,7 @@ export declare interface IRow {
400
490
  /**
401
491
  * Provides information about the view rendered by the ListView.
402
492
  *
403
- * @beta
493
+ * @public
404
494
  */
405
495
  export declare interface IView {
406
496
  /**
@@ -476,52 +566,36 @@ export declare abstract class ListViewAccessor implements IDisposable {
476
566
  abstract get columns(): ReadonlyArray<ColumnAccessor>;
477
567
  /**
478
568
  * Currently rendered rows in the list view.
479
- *
480
- * @beta
481
569
  */
482
570
  abstract get rows(): ReadonlyArray<RowAccessor>;
483
571
  /**
484
572
  * Selected rows in the list view.
485
- *
486
- * @beta
487
573
  */
488
574
  abstract get selectedRows(): ReadonlyArray<RowAccessor> | undefined;
489
575
  /**
490
576
  * Basic information about the list rendered by the list view.
491
- *
492
- * @beta
493
577
  */
494
578
  abstract get list(): IList | undefined;
495
579
  /**
496
580
  * Basic information about the view rendered by the list view.
497
- *
498
- * @beta
499
581
  */
500
582
  abstract get view(): IView | undefined;
501
583
  /**
502
584
  * Folder information for the list view.
503
- *
504
- * @beta
505
585
  */
506
586
  abstract get folderInfo(): IFolderInfo | undefined;
507
587
  /**
508
588
  * Filters applied to the list view.
509
- *
510
- * @beta
511
589
  */
512
590
  abstract get appliedFilters(): {
513
591
  [fieldName: string]: IFilter;
514
592
  } | undefined;
515
593
  /**
516
594
  * Sort field name
517
- *
518
- * @beta
519
595
  */
520
596
  abstract get sortField(): string | undefined;
521
597
  /**
522
598
  * Specifies whether the list view is sorted ascending or descending.
523
- *
524
- * @beta
525
599
  */
526
600
  abstract get sortAscending(): boolean | undefined;
527
601
  /**
@@ -537,7 +611,6 @@ export declare abstract class ListViewAccessor implements IDisposable {
537
611
  /**
538
612
  * Event that gets raised every time the list view state changes.
539
613
  *
540
- * @beta
541
614
  * @eventproperty
542
615
  */
543
616
  get listViewStateChangedEvent(): SPEvent<ListViewStateChangedEventArgs>;
@@ -548,7 +621,7 @@ export declare abstract class ListViewAccessor implements IDisposable {
548
621
  /**
549
622
  * Describes the type of list view state changes.
550
623
  *
551
- * @beta
624
+ * @public
552
625
  */
553
626
  export declare enum ListViewAccessorStateChanges {
554
627
  None = 0,
@@ -584,7 +657,7 @@ export declare class ListViewCommandSetContext extends ExtensionContext {
584
657
  /**
585
658
  * Arguments for the list view state changed event.
586
659
  *
587
- * @beta
660
+ * @public
588
661
  */
589
662
  export declare class ListViewStateChangedEventArgs extends SPEventArgs {
590
663
  /**
@@ -0,0 +1 @@
1
+ define("d37b65ee-c7d8-4570-bc74-2b294ff3b380_1.15.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,"BaseFormCustomizer",function(){return _}),n.d(t,"FormCustomizerContext",function(){return h}),n.d(t,"ListItemAccessor",function(){return b}),n.d(t,"ColumnAccessor",function(){return g}),n.d(t,"RowAccessor",function(){return v}),n.d(t,"SelectedRowsChangedEventArgs",function(){return y}),n.d(t,"ListViewStateChangedEventArgs",function(){return S}),n.d(t,"ListViewAccessor",function(){return D}),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 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(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Object(i.__extends)(t,e),Object.defineProperty(t.prototype,"domElement",{get:function(){return this.context.domElement},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"displayMode",{get:function(){return this._displayMode},enumerable:!1,configurable:!0}),t.prototype.formSaved=function(){},t.prototype.formClosed=function(){},t}(o.BaseExtension),_=m,h=function(e){function t(t,n){var a=e.call(this,t)||this;return a._list=n.list,a._contentTypes=n.contentTypes,a._folderInfo=n.folderInfo,a._itemIds=n.itemIds,a._domElement=n.domElement,a}return Object(i.__extends)(t,e),Object.defineProperty(t.prototype,"list",{get:function(){return this._list},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"contentTypes",{get:function(){return this._contentTypes},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"folderInfo",{get:function(){return this._folderInfo},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"itemIds",{get:function(){return this._itemIds},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"domElement",{get:function(){return this._domElement},enumerable:!1,configurable:!0}),t}(o.ExtensionContext),b=function(){},g=function(){},v=function(e){function t(){return e.call(this)||this}return Object(i.__extends)(t,e),t}(b),y=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Object(i.__extends)(t,e),t}(r.SPEventArgs),S=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Object(i.__extends)(t,e),t}(r.SPEventArgs),D=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={}))}})});
@@ -5,9 +5,9 @@ Object.defineProperty(exports, "__esModule", { value: true });
5
5
  *
6
6
  * @remarks
7
7
  * The BaseListViewCommandSet extension type exposes generalized commands that may be displayed as tool bar buttons,
8
- * context menu items, etc. These commands are initially defined in the extensions manifest file. At runtime, the
8
+ * context menu items, etc. These commands are initially defined in the extension's manifest file. At runtime, the
9
9
  * corresponding Command object can be obtained by calling {@link BaseListViewCommandSet.tryGetCommand}.
10
- * The commands appearance can be customized by assigning its properties, for example to hide a command that is not
10
+ * The command's appearance can be customized by assigning its properties, for example to hide a command that is not
11
11
  * contextually relevant, or to pluralize the title based on the number of selected items.
12
12
  * @public
13
13
  */
@@ -3,7 +3,6 @@ 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
6
  var sp_page_context_1 = require("@microsoft/sp-page-context");
8
7
  /**
9
8
  * This object provides contextual information for BaseListViewCommandSet.
@@ -34,12 +33,13 @@ var ListViewCommandSetContext = /** @class */ (function (_super) {
34
33
  ? itemsMap[itemId].ariaLabel.default
35
34
  : undefined,
36
35
  iconImageUrl: iconUrl,
37
- visible: true
36
+ visible: true,
37
+ disabled: undefined
38
38
  });
39
39
  }
40
40
  }
41
41
  // updating title and ariaLabel based on UI culture
42
- if (!KillSwitches_1.localizedCommandSetTitleKSActivated() && !!_this._commandArray.length) {
42
+ if (!!_this._commandArray.length) {
43
43
  _this.serviceScope.whenFinished(function () {
44
44
  var pageContext = _this.serviceScope.consume(sp_page_context_1.PageContext.serviceKey);
45
45
  var currentUICulture = pageContext.cultureInfo.currentUICultureName;
@@ -66,7 +66,7 @@ exports.SelectedRowsChangedEventArgs = SelectedRowsChangedEventArgs;
66
66
  /**
67
67
  * Arguments for the list view state changed event.
68
68
  *
69
- * @beta
69
+ * @public
70
70
  */
71
71
  var ListViewStateChangedEventArgs = /** @class */ (function (_super) {
72
72
  tslib_1.__extends(ListViewStateChangedEventArgs, _super);
@@ -106,7 +106,6 @@ var ListViewAccessor = /** @class */ (function () {
106
106
  /**
107
107
  * Event that gets raised every time the list view state changes.
108
108
  *
109
- * @beta
110
109
  * @eventproperty
111
110
  */
112
111
  get: function () {
@@ -4,7 +4,7 @@ exports.ListViewAccessorStateChanges = void 0;
4
4
  /**
5
5
  * Describes the type of list view state changes.
6
6
  *
7
- * @beta
7
+ * @public
8
8
  */
9
9
  var ListViewAccessorStateChanges;
10
10
  (function (ListViewAccessorStateChanges) {
@@ -0,0 +1,52 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ var tslib_1 = require("tslib");
4
+ var sp_extension_base_1 = require("@microsoft/sp-extension-base");
5
+ /**
6
+ * @public
7
+ */
8
+ var BaseFormCustomizer = /** @class */ (function (_super) {
9
+ tslib_1.__extends(BaseFormCustomizer, _super);
10
+ function BaseFormCustomizer() {
11
+ return _super !== null && _super.apply(this, arguments) || this;
12
+ }
13
+ Object.defineProperty(BaseFormCustomizer.prototype, "domElement", {
14
+ // Readonly protected properties. To change these to readonly once TypeScript supports that feature.
15
+ /**
16
+ * This property is a pointer to the root DOM element of the form. This is a DIV element and contains the whole
17
+ * DOM subtree of the form.
18
+ *
19
+ * @readonly
20
+ */
21
+ get: function () {
22
+ return this.context.domElement;
23
+ },
24
+ enumerable: false,
25
+ configurable: true
26
+ });
27
+ Object.defineProperty(BaseFormCustomizer.prototype, "displayMode", {
28
+ /**
29
+ * @readonly
30
+ */
31
+ get: function () {
32
+ return this._displayMode;
33
+ },
34
+ enumerable: false,
35
+ configurable: true
36
+ });
37
+ /**
38
+ * Call this method after the form has been saved to inform the application that the form has been saved.
39
+ */
40
+ BaseFormCustomizer.prototype.formSaved = function () {
41
+ // TODO: inform the application that the form has been closed.
42
+ };
43
+ /**
44
+ * Call this method after the form has been closed/cancelled to inform the application that the form has been closed.
45
+ */
46
+ BaseFormCustomizer.prototype.formClosed = function () {
47
+ // TODO: inform the application that the form has been closed.
48
+ };
49
+ return BaseFormCustomizer;
50
+ }(sp_extension_base_1.BaseExtension));
51
+ exports.default = BaseFormCustomizer;
52
+ //# sourceMappingURL=BaseFormCustomizer.js.map
@@ -0,0 +1,57 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ var tslib_1 = require("tslib");
4
+ var sp_extension_base_1 = require("@microsoft/sp-extension-base");
5
+ /**
6
+ * @public
7
+ */
8
+ var FormCustomizerContext = /** @class */ (function (_super) {
9
+ tslib_1.__extends(FormCustomizerContext, _super);
10
+ function FormCustomizerContext(extensionContextParameters, formCustomizerContextParameters) {
11
+ var _this = _super.call(this, extensionContextParameters) || this;
12
+ _this._list = formCustomizerContextParameters.list;
13
+ _this._contentTypes = formCustomizerContextParameters.contentTypes;
14
+ _this._folderInfo = formCustomizerContextParameters.folderInfo;
15
+ _this._itemIds = formCustomizerContextParameters.itemIds;
16
+ _this._domElement = formCustomizerContextParameters.domElement;
17
+ return _this;
18
+ }
19
+ Object.defineProperty(FormCustomizerContext.prototype, "list", {
20
+ get: function () {
21
+ return this._list;
22
+ },
23
+ enumerable: false,
24
+ configurable: true
25
+ });
26
+ Object.defineProperty(FormCustomizerContext.prototype, "contentTypes", {
27
+ get: function () {
28
+ return this._contentTypes;
29
+ },
30
+ enumerable: false,
31
+ configurable: true
32
+ });
33
+ Object.defineProperty(FormCustomizerContext.prototype, "folderInfo", {
34
+ get: function () {
35
+ return this._folderInfo;
36
+ },
37
+ enumerable: false,
38
+ configurable: true
39
+ });
40
+ Object.defineProperty(FormCustomizerContext.prototype, "itemIds", {
41
+ get: function () {
42
+ return this._itemIds;
43
+ },
44
+ enumerable: false,
45
+ configurable: true
46
+ });
47
+ Object.defineProperty(FormCustomizerContext.prototype, "domElement", {
48
+ get: function () {
49
+ return this._domElement;
50
+ },
51
+ enumerable: false,
52
+ configurable: true
53
+ });
54
+ return FormCustomizerContext;
55
+ }(sp_extension_base_1.ExtensionContext));
56
+ exports.default = FormCustomizerContext;
57
+ //# sourceMappingURL=FormCustomizerContext.js.map
@@ -15,6 +15,10 @@ var BaseFieldCustomizer_1 = require("./fieldCustomizer/BaseFieldCustomizer");
15
15
  Object.defineProperty(exports, "BaseFieldCustomizer", { enumerable: true, get: function () { return BaseFieldCustomizer_1.default; } });
16
16
  var FieldCustomizerContext_1 = require("./fieldCustomizer/FieldCustomizerContext");
17
17
  Object.defineProperty(exports, "FieldCustomizerContext", { enumerable: true, get: function () { return FieldCustomizerContext_1.default; } });
18
+ var BaseFormCustomizer_1 = require("./formCustomizer/BaseFormCustomizer");
19
+ Object.defineProperty(exports, "BaseFormCustomizer", { enumerable: true, get: function () { return BaseFormCustomizer_1.default; } });
20
+ var FormCustomizerContext_1 = require("./formCustomizer/FormCustomizerContext");
21
+ Object.defineProperty(exports, "FormCustomizerContext", { enumerable: true, get: function () { return FormCustomizerContext_1.default; } });
18
22
  var ListItemAccessor_1 = require("./common/ListItemAccessor");
19
23
  Object.defineProperty(exports, "ListItemAccessor", { enumerable: true, get: function () { return ListItemAccessor_1.default; } });
20
24
  var ListViewAccessor_1 = require("./common/ListViewAccessor");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@microsoft/sp-listview-extensibility",
3
- "version": "1.14.0-beta.5",
3
+ "version": "1.15.0-beta.1",
4
4
  "description": "SharePoint Framework developer support for customizing the list view",
5
5
  "license": "UNLICENSED",
6
6
  "main": "lib-commonjs/index.js",
@@ -10,14 +10,14 @@
10
10
  "tsdocFlavor": "AEDoc"
11
11
  },
12
12
  "dependencies": {
13
- "@microsoft/sp-core-library": "1.14.0-beta.5",
14
- "@microsoft/sp-extension-base": "1.14.0-beta.5",
15
- "@microsoft/sp-module-interfaces": "1.14.0-beta.5",
16
- "@microsoft/sp-page-context": "1.14.0-beta.5",
13
+ "@microsoft/sp-core-library": "1.15.0-beta.1",
14
+ "@microsoft/sp-extension-base": "1.15.0-beta.1",
15
+ "@microsoft/sp-module-interfaces": "1.15.0-beta.1",
16
+ "@microsoft/sp-page-context": "1.15.0-beta.1",
17
17
  "tslib": "~1.10.0"
18
18
  },
19
19
  "scripts": {},
20
20
  "engines": {
21
- "node": ">=12.13.0 <13.0.0 || >=14.15.0 <15.0.0"
21
+ "node": ">=12.13.0 <13.0.0 || >=14.15.0 <15.0.0 || >=16.13.0 <17.0.0"
22
22
  }
23
23
  }
@@ -1 +0,0 @@
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})}}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={}))}})});
@@ -1,11 +0,0 @@
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