@microsoft/sp-listview-extensibility 1.15.2 → 1.16.0-beta.2

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.
Files changed (53) hide show
  1. package/dist/d37b65ee-c7d8-4570-bc74-2b294ff3b380.manifest.json +5 -5
  2. package/dist/index-internal-beta.d.ts +27 -0
  3. package/dist/index-internal-public.d.ts +27 -0
  4. package/dist/index-internal.d.ts +27 -0
  5. package/dist/{sp-listview-extensibility_none_b75c2481bc7e7a5dfc66.js → sp-listview-extensibility_none_8cc6cbcfec42a9a36558.js} +1 -1
  6. package/dist/tsdoc-metadata.json +1 -1
  7. package/lib-commonjs/common/IListItem.js +3 -0
  8. package/lib-commonjs/formCustomizer/BaseFormCustomizer.js +9 -0
  9. package/lib-commonjs/formCustomizer/FormCustomizerContext.js +11 -0
  10. package/package.json +7 -6
  11. package/EULA/Microsoft Sharepoint Framework - Standalone (free) Use Terms - Basque.docx +0 -0
  12. package/EULA/Microsoft Sharepoint Framework - Standalone (free) Use Terms - Bulgarian.docx +0 -0
  13. package/EULA/Microsoft Sharepoint Framework - Standalone (free) Use Terms - Catalan.docx +0 -0
  14. package/EULA/Microsoft Sharepoint Framework - Standalone (free) Use Terms - Chinese (Simplified).docx +0 -0
  15. package/EULA/Microsoft Sharepoint Framework - Standalone (free) Use Terms - Chinese (Traditional).docx +0 -0
  16. package/EULA/Microsoft Sharepoint Framework - Standalone (free) Use Terms - Croatian.docx +0 -0
  17. package/EULA/Microsoft Sharepoint Framework - Standalone (free) Use Terms - Czech.docx +0 -0
  18. package/EULA/Microsoft Sharepoint Framework - Standalone (free) Use Terms - Danish.docx +0 -0
  19. package/EULA/Microsoft Sharepoint Framework - Standalone (free) Use Terms - Dutch.docx +0 -0
  20. package/EULA/Microsoft Sharepoint Framework - Standalone (free) Use Terms - Estonian.docx +0 -0
  21. package/EULA/Microsoft Sharepoint Framework - Standalone (free) Use Terms - Finnish.docx +0 -0
  22. package/EULA/Microsoft Sharepoint Framework - Standalone (free) Use Terms - French.docx +0 -0
  23. package/EULA/Microsoft Sharepoint Framework - Standalone (free) Use Terms - Galician.docx +0 -0
  24. package/EULA/Microsoft Sharepoint Framework - Standalone (free) Use Terms - German.docx +0 -0
  25. package/EULA/Microsoft Sharepoint Framework - Standalone (free) Use Terms - Greek.docx +0 -0
  26. package/EULA/Microsoft Sharepoint Framework - Standalone (free) Use Terms - Hindi.docx +0 -0
  27. package/EULA/Microsoft Sharepoint Framework - Standalone (free) Use Terms - Hungarian.docx +0 -0
  28. package/EULA/Microsoft Sharepoint Framework - Standalone (free) Use Terms - Indonesian.docx +0 -0
  29. package/EULA/Microsoft Sharepoint Framework - Standalone (free) Use Terms - Italian.docx +0 -0
  30. package/EULA/Microsoft Sharepoint Framework - Standalone (free) Use Terms - Japanese.docx +0 -0
  31. package/EULA/Microsoft Sharepoint Framework - Standalone (free) Use Terms - Kazakh.docx +0 -0
  32. package/EULA/Microsoft Sharepoint Framework - Standalone (free) Use Terms - Korean.docx +0 -0
  33. package/EULA/Microsoft Sharepoint Framework - Standalone (free) Use Terms - Latvian.docx +0 -0
  34. package/EULA/Microsoft Sharepoint Framework - Standalone (free) Use Terms - Lithuanian.docx +0 -0
  35. package/EULA/Microsoft Sharepoint Framework - Standalone (free) Use Terms - Malaysian.docx +0 -0
  36. package/EULA/Microsoft Sharepoint Framework - Standalone (free) Use Terms - Norwegian.docx +0 -0
  37. package/EULA/Microsoft Sharepoint Framework - Standalone (free) Use Terms - Polish.docx +0 -0
  38. package/EULA/Microsoft Sharepoint Framework - Standalone (free) Use Terms - Portuguese (Brazil).docx +0 -0
  39. package/EULA/Microsoft Sharepoint Framework - Standalone (free) Use Terms - Portuguese (Portugal).docx +0 -0
  40. package/EULA/Microsoft Sharepoint Framework - Standalone (free) Use Terms - Romanian.docx +0 -0
  41. package/EULA/Microsoft Sharepoint Framework - Standalone (free) Use Terms - Russian.docx +0 -0
  42. package/EULA/Microsoft Sharepoint Framework - Standalone (free) Use Terms - Serbian (Cyrillic).docx +0 -0
  43. package/EULA/Microsoft Sharepoint Framework - Standalone (free) Use Terms - Serbian (Latin).docx +0 -0
  44. package/EULA/Microsoft Sharepoint Framework - Standalone (free) Use Terms - Slovak.docx +0 -0
  45. package/EULA/Microsoft Sharepoint Framework - Standalone (free) Use Terms - Slovenian.docx +0 -0
  46. package/EULA/Microsoft Sharepoint Framework - Standalone (free) Use Terms - Spanish.docx +0 -0
  47. package/EULA/Microsoft Sharepoint Framework - Standalone (free) Use Terms - Swedish.docx +0 -0
  48. package/EULA/Microsoft Sharepoint Framework - Standalone (free) Use Terms - Thai.docx +0 -0
  49. package/EULA/Microsoft Sharepoint Framework - Standalone (free) Use Terms - Turkish.docx +0 -0
  50. package/EULA/Microsoft Sharepoint Framework - Standalone (free) Use Terms - Ukrainian.docx +0 -0
  51. package/EULA/Microsoft Sharepoint Framework - Standalone (free) Use Terms - Valencian.docx +0 -0
  52. package/EULA/Microsoft Sharepoint Framework - Standalone (free) Use Terms - Vietnamese.docx +0 -0
  53. package/EULA/Microsoft Sharepoint Framework - Standalone (free) Use Terms.docx +0 -0
@@ -2,7 +2,7 @@
2
2
  "id": "d37b65ee-c7d8-4570-bc74-2b294ff3b380",
3
3
  "alias": "SPListViewExtensibility",
4
4
  "componentType": "Library",
5
- "version": "1.15.2",
5
+ "version": "1.16.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_b75c2481bc7e7a5dfc66.js"
15
+ "path": "sp-listview-extensibility_none_8cc6cbcfec42a9a36558.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.15.2"
25
+ "version": "1.16.0"
26
26
  },
27
27
  "@microsoft/sp-page-context": {
28
28
  "type": "component",
29
29
  "id": "1c4541f7-5c31-41aa-9fa8-fbc9dc14c0a8",
30
- "version": "1.15.2"
30
+ "version": "1.16.0"
31
31
  },
32
32
  "@microsoft/sp-extension-base": {
33
33
  "type": "component",
34
34
  "id": "0773bd53-a69e-4293-87e6-ba80ea4d614b",
35
- "version": "1.15.2"
35
+ "version": "1.16.0"
36
36
  }
37
37
  }
38
38
  }
@@ -10,6 +10,7 @@ import { FormDisplayMode } from '@microsoft/sp-core-library';
10
10
  import { Guid } from '@microsoft/sp-core-library';
11
11
  import { ICommandSetExtensionManifest } from '@microsoft/sp-module-interfaces';
12
12
  import { IDisposable } from '@microsoft/sp-core-library';
13
+ import type { IODataListItem } from '@microsoft/sp-odata-types';
13
14
  import { SPEvent } from '@microsoft/sp-core-library';
14
15
  import { SPEventArgs } from '@microsoft/sp-core-library';
15
16
  import { SPField } from '@microsoft/sp-page-context';
@@ -59,6 +60,7 @@ export declare abstract class BaseFormCustomizer<TProperties> extends BaseExtens
59
60
  */
60
61
  protected get displayMode(): FormDisplayMode;
61
62
  /* Excluded from this release type: formActionEvent */
63
+ /* Excluded from this release type: _init */
62
64
  /* Excluded from this release type: _internalRender */
63
65
  /* Excluded from this release type: _internalSetDisplayMode */
64
66
  /* Excluded from this release type: _save */
@@ -253,6 +255,7 @@ export declare class FormCustomizerContext extends ExtensionContext implements I
253
255
  private _contentType;
254
256
  private _folderInfo;
255
257
  private _itemId;
258
+ private _item;
256
259
  private _domElement;
257
260
  private _formCustomizerHost;
258
261
  constructor(extensionContextParameters: _IExtensionContextParameters, formCustomizerContextParameters: _IFormCustomizerContextParameters);
@@ -272,6 +275,10 @@ export declare class FormCustomizerContext extends ExtensionContext implements I
272
275
  * The item id of the item being edited or viewed.
273
276
  */
274
277
  get itemId(): number | undefined;
278
+ /**
279
+ * The item data of the item being edited or viewed.
280
+ */
281
+ get item(): IListItem | undefined;
275
282
  /**
276
283
  * The root DOM element of the form. This is a DIV element container for the custom form.
277
284
  */
@@ -281,6 +288,8 @@ export declare class FormCustomizerContext extends ExtensionContext implements I
281
288
 
282
289
  /* Excluded from this release type: FormCustomizerHost */
283
290
 
291
+ /* Excluded from this release type: _IAdditionalInitParameters */
292
+
284
293
  /**
285
294
  * Provides information about the state of a column in the list view
286
295
  *
@@ -339,6 +348,10 @@ export declare interface IContentType {
339
348
  * Content type name
340
349
  */
341
350
  readonly name: string;
351
+ /**
352
+ * Custom formatter JSON for the form
353
+ */
354
+ readonly ClientFormCustomFormatter: string | undefined;
342
355
  /**
343
356
  * Content type schema XML
344
357
  */
@@ -407,6 +420,8 @@ export declare interface IFolderInfo {
407
420
  readonly folderPath: string;
408
421
  }
409
422
 
423
+ /* Excluded from this release type: _IFormCustomizerAdditionalInitParameters */
424
+
410
425
  /**
411
426
  * FormCustomizerContext-specific properties.
412
427
  *
@@ -429,6 +444,10 @@ export declare interface IFormCustomizerContext {
429
444
  * The item id of the item being edited or viewed.
430
445
  */
431
446
  readonly itemId?: number;
447
+ /**
448
+ * The item data of the item being edited or viewed.
449
+ */
450
+ readonly item?: IListItem;
432
451
  /**
433
452
  * The root DOM element of the form. This is a DIV element container for the custom form.
434
453
  */
@@ -459,6 +478,14 @@ export declare interface IList {
459
478
  readonly serverRelativeUrl: string;
460
479
  }
461
480
 
481
+ /**
482
+ * @public
483
+ *
484
+ * Represents an SP.ListItem data (OData).
485
+ */
486
+ export declare interface IListItem extends IODataListItem {
487
+ }
488
+
462
489
  /**
463
490
  * Provides information about the state of the ListView.
464
491
  *
@@ -10,6 +10,7 @@ import { FormDisplayMode } from '@microsoft/sp-core-library';
10
10
  import { Guid } from '@microsoft/sp-core-library';
11
11
  import { ICommandSetExtensionManifest } from '@microsoft/sp-module-interfaces';
12
12
  import { IDisposable } from '@microsoft/sp-core-library';
13
+ import type { IODataListItem } from '@microsoft/sp-odata-types';
13
14
  import { SPEvent } from '@microsoft/sp-core-library';
14
15
  import { SPEventArgs } from '@microsoft/sp-core-library';
15
16
  import { SPField } from '@microsoft/sp-page-context';
@@ -59,6 +60,7 @@ export declare abstract class BaseFormCustomizer<TProperties> extends BaseExtens
59
60
  */
60
61
  protected get displayMode(): FormDisplayMode;
61
62
  /* Excluded from this release type: formActionEvent */
63
+ /* Excluded from this release type: _init */
62
64
  /* Excluded from this release type: _internalRender */
63
65
  /* Excluded from this release type: _internalSetDisplayMode */
64
66
  /* Excluded from this release type: _save */
@@ -253,6 +255,7 @@ export declare class FormCustomizerContext extends ExtensionContext implements I
253
255
  private _contentType;
254
256
  private _folderInfo;
255
257
  private _itemId;
258
+ private _item;
256
259
  private _domElement;
257
260
  private _formCustomizerHost;
258
261
  constructor(extensionContextParameters: _IExtensionContextParameters, formCustomizerContextParameters: _IFormCustomizerContextParameters);
@@ -272,6 +275,10 @@ export declare class FormCustomizerContext extends ExtensionContext implements I
272
275
  * The item id of the item being edited or viewed.
273
276
  */
274
277
  get itemId(): number | undefined;
278
+ /**
279
+ * The item data of the item being edited or viewed.
280
+ */
281
+ get item(): IListItem | undefined;
275
282
  /**
276
283
  * The root DOM element of the form. This is a DIV element container for the custom form.
277
284
  */
@@ -281,6 +288,8 @@ export declare class FormCustomizerContext extends ExtensionContext implements I
281
288
 
282
289
  /* Excluded from this release type: FormCustomizerHost */
283
290
 
291
+ /* Excluded from this release type: _IAdditionalInitParameters */
292
+
284
293
  /**
285
294
  * Provides information about the state of a column in the list view
286
295
  *
@@ -339,6 +348,10 @@ export declare interface IContentType {
339
348
  * Content type name
340
349
  */
341
350
  readonly name: string;
351
+ /**
352
+ * Custom formatter JSON for the form
353
+ */
354
+ readonly ClientFormCustomFormatter: string | undefined;
342
355
  /**
343
356
  * Content type schema XML
344
357
  */
@@ -407,6 +420,8 @@ export declare interface IFolderInfo {
407
420
  readonly folderPath: string;
408
421
  }
409
422
 
423
+ /* Excluded from this release type: _IFormCustomizerAdditionalInitParameters */
424
+
410
425
  /**
411
426
  * FormCustomizerContext-specific properties.
412
427
  *
@@ -429,6 +444,10 @@ export declare interface IFormCustomizerContext {
429
444
  * The item id of the item being edited or viewed.
430
445
  */
431
446
  readonly itemId?: number;
447
+ /**
448
+ * The item data of the item being edited or viewed.
449
+ */
450
+ readonly item?: IListItem;
432
451
  /**
433
452
  * The root DOM element of the form. This is a DIV element container for the custom form.
434
453
  */
@@ -459,6 +478,14 @@ export declare interface IList {
459
478
  readonly serverRelativeUrl: string;
460
479
  }
461
480
 
481
+ /**
482
+ * @public
483
+ *
484
+ * Represents an SP.ListItem data (OData).
485
+ */
486
+ export declare interface IListItem extends IODataListItem {
487
+ }
488
+
462
489
  /**
463
490
  * Provides information about the state of the ListView.
464
491
  *
@@ -10,6 +10,7 @@ import { FormDisplayMode } from '@microsoft/sp-core-library';
10
10
  import { Guid } from '@microsoft/sp-core-library';
11
11
  import { ICommandSetExtensionManifest } from '@microsoft/sp-module-interfaces';
12
12
  import { IDisposable } from '@microsoft/sp-core-library';
13
+ import type { IODataListItem } from '@microsoft/sp-odata-types';
13
14
  import { SPEvent } from '@microsoft/sp-core-library';
14
15
  import { SPEventArgs } from '@microsoft/sp-core-library';
15
16
  import { SPField } from '@microsoft/sp-page-context';
@@ -59,6 +60,7 @@ export declare abstract class BaseFormCustomizer<TProperties> extends BaseExtens
59
60
  */
60
61
  protected get displayMode(): FormDisplayMode;
61
62
  /* Excluded from this release type: formActionEvent */
63
+ /* Excluded from this release type: _init */
62
64
  /* Excluded from this release type: _internalRender */
63
65
  /* Excluded from this release type: _internalSetDisplayMode */
64
66
  /* Excluded from this release type: _save */
@@ -253,6 +255,7 @@ export declare class FormCustomizerContext extends ExtensionContext implements I
253
255
  private _contentType;
254
256
  private _folderInfo;
255
257
  private _itemId;
258
+ private _item;
256
259
  private _domElement;
257
260
  private _formCustomizerHost;
258
261
  constructor(extensionContextParameters: _IExtensionContextParameters, formCustomizerContextParameters: _IFormCustomizerContextParameters);
@@ -272,6 +275,10 @@ export declare class FormCustomizerContext extends ExtensionContext implements I
272
275
  * The item id of the item being edited or viewed.
273
276
  */
274
277
  get itemId(): number | undefined;
278
+ /**
279
+ * The item data of the item being edited or viewed.
280
+ */
281
+ get item(): IListItem | undefined;
275
282
  /**
276
283
  * The root DOM element of the form. This is a DIV element container for the custom form.
277
284
  */
@@ -281,6 +288,8 @@ export declare class FormCustomizerContext extends ExtensionContext implements I
281
288
 
282
289
  /* Excluded from this release type: FormCustomizerHost */
283
290
 
291
+ /* Excluded from this release type: _IAdditionalInitParameters */
292
+
284
293
  /**
285
294
  * Provides information about the state of a column in the list view
286
295
  *
@@ -339,6 +348,10 @@ export declare interface IContentType {
339
348
  * Content type name
340
349
  */
341
350
  readonly name: string;
351
+ /**
352
+ * Custom formatter JSON for the form
353
+ */
354
+ readonly ClientFormCustomFormatter: string | undefined;
342
355
  /**
343
356
  * Content type schema XML
344
357
  */
@@ -407,6 +420,8 @@ export declare interface IFolderInfo {
407
420
  readonly folderPath: string;
408
421
  }
409
422
 
423
+ /* Excluded from this release type: _IFormCustomizerAdditionalInitParameters */
424
+
410
425
  /**
411
426
  * FormCustomizerContext-specific properties.
412
427
  *
@@ -429,6 +444,10 @@ export declare interface IFormCustomizerContext {
429
444
  * The item id of the item being edited or viewed.
430
445
  */
431
446
  readonly itemId?: number;
447
+ /**
448
+ * The item data of the item being edited or viewed.
449
+ */
450
+ readonly item?: IListItem;
432
451
  /**
433
452
  * The root DOM element of the form. This is a DIV element container for the custom form.
434
453
  */
@@ -459,6 +478,14 @@ export declare interface IList {
459
478
  readonly serverRelativeUrl: string;
460
479
  }
461
480
 
481
+ /**
482
+ * @public
483
+ *
484
+ * Represents an SP.ListItem data (OData).
485
+ */
486
+ export declare interface IListItem extends IODataListItem {
487
+ }
488
+
462
489
  /**
463
490
  * Provides information about the state of the ListView.
464
491
  *
@@ -1 +1 @@
1
- define("d37b65ee-c7d8-4570-bc74-2b294ff3b380_1.15.2",["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 b}),n.d(t,"FormCustomizerContext",function(){return g}),n.d(t,"FormCustomizerHost",function(){return v}),n.d(t,"FormActionEventArgs",function(){return _}),n.d(t,"FormAction",function(){return a}),n.d(t,"ListItemAccessor",function(){return y}),n.d(t,"ColumnAccessor",function(){return S}),n.d(t,"RowAccessor",function(){return D}),n.d(t,"SelectedRowsChangedEventArgs",function(){return I}),n.d(t,"ListViewStateChangedEventArgs",function(){return x}),n.d(t,"ListViewAccessor",function(){return C}),n.d(t,"ListViewAccessorStateChanges",function(){return m});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="".concat(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);!function(e){e[e.Save=0]="Save",e[e.Close=1]="Close"}(a||(a={}));var m,_=function(e){function t(t){var n=e.call(this)||this;return n.action=t,n}return Object(i.__extends)(t,e),t}(r.SPEventArgs),h=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n._formActionEvent=new r.SPEvent(t._formActionEventName),n}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}),Object.defineProperty(t.prototype,"formActionEvent",{get:function(){return this._formActionEvent},enumerable:!1,configurable:!0}),t.prototype._internalRender=function(){this.render()},t.prototype._internalSetDisplayMode=function(e){this._displayMode=e},t.prototype._save=function(){r._SPEventManager.instance.raiseStickyEvent(t._formActionEventName,new _(a.Save))},t.prototype._close=function(){r._SPEventManager.instance.raiseStickyEvent(t._formActionEventName,new _(a.Close))},t.prototype.dispose=function(){r._SPEventManager.instance.removeEvent(t._formActionEventName),e.prototype.dispose.call(this)},t.prototype._initializeExtensionType=function(){e.prototype._initializeExtensionType.call(this),this.context._host.logEngagement("init")},t.prototype.formSaved=function(){this.context._host.onSave()},t.prototype.formClosed=function(){this.context._host.onClose()},t._formActionEventName="formCustomizer.formAction",t}(o.BaseExtension),b=h,g=function(e){function t(t,n){var a=e.call(this,t)||this;return a._list=n.list,a._contentType=n.contentType,a._folderInfo=n.folderInfo,a._itemId=n.itemId,a._domElement=n.domElement,a._formCustomizerHost=n.host,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,"contentType",{get:function(){return this._contentType},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"folderInfo",{get:function(){return this._folderInfo},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"itemId",{get:function(){return this._itemId},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"domElement",{get:function(){return this._domElement},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"_host",{get:function(){return this._formCustomizerHost},enumerable:!1,configurable:!0}),t}(o.ExtensionContext),v=function(){function e(e){this._onSaveCallback=e.onSaveCallback,this._onCloseCallback=e.onCloseCallback,this._onErrorCallback=e.onErrorCallback,this._logEngagement=e.logEngagement}return e.prototype.onSave=function(){this.logEngagement("onSave"),this._onSaveCallback()},e.prototype.onClose=function(){this.logEngagement("onClose"),this._onCloseCallback()},e.prototype.onError=function(e){this.logEngagement("onError"),this._onErrorCallback&&this._onErrorCallback(e)},e.prototype.logEngagement=function(e){this._logEngagement&&this._logEngagement(e)},e}(),y=function(){},S=function(){},D=function(e){function t(){return e.call(this)||this}return Object(i.__extends)(t,e),t}(y),I=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Object(i.__extends)(t,e),t}(r.SPEventArgs),x=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Object(i.__extends)(t,e),t}(r.SPEventArgs),C=function(){function e(t){this._isDisposed=!1,this._selectedRowsChangedEvent=new r.SPEvent(e._selectedRowsChangedEventName),this._listViewStateChangedEventName="".concat(e._listViewStateChangedEventName).concat(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"}(m||(m={}))}})});
1
+ define("d37b65ee-c7d8-4570-bc74-2b294ff3b380_1.16.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 b}),n.d(t,"FormCustomizerContext",function(){return g}),n.d(t,"FormCustomizerHost",function(){return v}),n.d(t,"FormActionEventArgs",function(){return _}),n.d(t,"FormAction",function(){return a}),n.d(t,"ListItemAccessor",function(){return y}),n.d(t,"ColumnAccessor",function(){return S}),n.d(t,"RowAccessor",function(){return D}),n.d(t,"SelectedRowsChangedEventArgs",function(){return I}),n.d(t,"ListViewStateChangedEventArgs",function(){return x}),n.d(t,"ListViewAccessor",function(){return C}),n.d(t,"ListViewAccessorStateChanges",function(){return m});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="".concat(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);!function(e){e[e.Save=0]="Save",e[e.Close=1]="Close"}(a||(a={}));var m,_=function(e){function t(t){var n=e.call(this)||this;return n.action=t,n}return Object(i.__extends)(t,e),t}(r.SPEventArgs),h=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n._formActionEvent=new r.SPEvent(t._formActionEventName),n}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}),Object.defineProperty(t.prototype,"formActionEvent",{get:function(){return this._formActionEvent},enumerable:!1,configurable:!0}),t.prototype._init=function(t,n,a){return a&&(this._displayMode=a.displayMode),e.prototype._init.call(this,t,n,a)},t.prototype._internalRender=function(){this.render()},t.prototype._internalSetDisplayMode=function(e){this._displayMode=e},t.prototype._save=function(){r._SPEventManager.instance.raiseStickyEvent(t._formActionEventName,new _(a.Save))},t.prototype._close=function(){r._SPEventManager.instance.raiseStickyEvent(t._formActionEventName,new _(a.Close))},t.prototype.dispose=function(){r._SPEventManager.instance.removeEvent(t._formActionEventName),e.prototype.dispose.call(this)},t.prototype._initializeExtensionType=function(){e.prototype._initializeExtensionType.call(this),this.context._host.logEngagement("init")},t.prototype.formSaved=function(){this.context._host.onSave()},t.prototype.formClosed=function(){this.context._host.onClose()},t._formActionEventName="formCustomizer.formAction",t}(o.BaseExtension),b=h,g=function(e){function t(t,n){var a=e.call(this,t)||this;return a._list=n.list,a._contentType=n.contentType,a._folderInfo=n.folderInfo,a._itemId=n.itemId,a._item=n.item,a._domElement=n.domElement,a._formCustomizerHost=n.host,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,"contentType",{get:function(){return this._contentType},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"folderInfo",{get:function(){return this._folderInfo},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"itemId",{get:function(){return this._itemId},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"item",{get:function(){return this._item},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"domElement",{get:function(){return this._domElement},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"_host",{get:function(){return this._formCustomizerHost},enumerable:!1,configurable:!0}),t}(o.ExtensionContext),v=function(){function e(e){this._onSaveCallback=e.onSaveCallback,this._onCloseCallback=e.onCloseCallback,this._onErrorCallback=e.onErrorCallback,this._logEngagement=e.logEngagement}return e.prototype.onSave=function(){this.logEngagement("onSave"),this._onSaveCallback()},e.prototype.onClose=function(){this.logEngagement("onClose"),this._onCloseCallback()},e.prototype.onError=function(e){this.logEngagement("onError"),this._onErrorCallback&&this._onErrorCallback(e)},e.prototype.logEngagement=function(e){this._logEngagement&&this._logEngagement(e)},e}(),y=function(){},S=function(){},D=function(e){function t(){return e.call(this)||this}return Object(i.__extends)(t,e),t}(y),I=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Object(i.__extends)(t,e),t}(r.SPEventArgs),x=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Object(i.__extends)(t,e),t}(r.SPEventArgs),C=function(){function e(t){this._isDisposed=!1,this._selectedRowsChangedEvent=new r.SPEvent(e._selectedRowsChangedEventName),this._listViewStateChangedEventName="".concat(e._listViewStateChangedEventName).concat(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"}(m||(m={}))}})});
@@ -5,7 +5,7 @@
5
5
  "toolPackages": [
6
6
  {
7
7
  "packageName": "@microsoft/api-extractor",
8
- "packageVersion": "7.24.1"
8
+ "packageVersion": "7.31.2"
9
9
  }
10
10
  ]
11
11
  }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=IListItem.js.map
@@ -56,6 +56,15 @@ var BaseFormCustomizer = /** @class */ (function (_super) {
56
56
  enumerable: false,
57
57
  configurable: true
58
58
  });
59
+ /**
60
+ * @internal
61
+ */
62
+ BaseFormCustomizer.prototype._init = function (context, propertiesJson, additionalInitParameters) {
63
+ if (additionalInitParameters) {
64
+ this._displayMode = additionalInitParameters.displayMode;
65
+ }
66
+ return _super.prototype._init.call(this, context, propertiesJson, additionalInitParameters);
67
+ };
59
68
  /**
60
69
  * @internal
61
70
  */
@@ -15,6 +15,7 @@ var FormCustomizerContext = /** @class */ (function (_super) {
15
15
  _this._contentType = formCustomizerContextParameters.contentType;
16
16
  _this._folderInfo = formCustomizerContextParameters.folderInfo;
17
17
  _this._itemId = formCustomizerContextParameters.itemId;
18
+ _this._item = formCustomizerContextParameters.item;
18
19
  _this._domElement = formCustomizerContextParameters.domElement;
19
20
  _this._formCustomizerHost = formCustomizerContextParameters.host;
20
21
  return _this;
@@ -59,6 +60,16 @@ var FormCustomizerContext = /** @class */ (function (_super) {
59
60
  enumerable: false,
60
61
  configurable: true
61
62
  });
63
+ Object.defineProperty(FormCustomizerContext.prototype, "item", {
64
+ /**
65
+ * The item data of the item being edited or viewed.
66
+ */
67
+ get: function () {
68
+ return this._item;
69
+ },
70
+ enumerable: false,
71
+ configurable: true
72
+ });
62
73
  Object.defineProperty(FormCustomizerContext.prototype, "domElement", {
63
74
  /**
64
75
  * The root DOM element of the form. This is a DIV element container for the custom form.
package/package.json CHANGED
@@ -1,8 +1,9 @@
1
1
  {
2
2
  "name": "@microsoft/sp-listview-extensibility",
3
- "version": "1.15.2",
3
+ "version": "1.16.0-beta.2",
4
4
  "description": "SharePoint Framework developer support for customizing the list view",
5
- "license": "UNLICENSED",
5
+ "license": "https://aka.ms/spfx/license",
6
+ "homepage": "http://aka.ms/spfx",
6
7
  "main": "lib-commonjs/index.js",
7
8
  "module": "lib/index.js",
8
9
  "typings": "dist/index-internal.d.ts",
@@ -10,10 +11,10 @@
10
11
  "tsdocFlavor": "AEDoc"
11
12
  },
12
13
  "dependencies": {
13
- "@microsoft/sp-core-library": "1.15.2",
14
- "@microsoft/sp-extension-base": "1.15.2",
15
- "@microsoft/sp-module-interfaces": "1.15.2",
16
- "@microsoft/sp-page-context": "1.15.2",
14
+ "@microsoft/sp-core-library": "1.16.0-beta.2",
15
+ "@microsoft/sp-extension-base": "1.16.0-beta.2",
16
+ "@microsoft/sp-module-interfaces": "1.16.0-beta.2",
17
+ "@microsoft/sp-page-context": "1.16.0-beta.2",
17
18
  "tslib": "2.3.1"
18
19
  },
19
20
  "scripts": {},