@microsoft/sp-listview-extensibility 1.15.0-beta.1 → 1.15.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/d37b65ee-c7d8-4570-bc74-2b294ff3b380.manifest.json +2 -2
- package/dist/index-internal-beta.d.ts +82 -18
- package/dist/index-internal-public.d.ts +82 -18
- package/dist/index-internal.d.ts +82 -18
- package/dist/sp-listview-extensibility_none_f3588362212b47a21f78.js +1 -0
- package/dist/tsdoc-metadata.json +1 -1
- package/lib-commonjs/common/ListViewAccessor.js +1 -1
- package/lib-commonjs/fieldCustomizer/BaseFieldCustomizer.js +1 -1
- package/lib-commonjs/formCustomizer/BaseFormCustomizer.js +78 -3
- package/lib-commonjs/formCustomizer/FormActionEventArgs.js +31 -0
- package/lib-commonjs/formCustomizer/FormCustomizerContext.js +36 -6
- package/lib-commonjs/formCustomizer/FormCustomizerHost.js +52 -0
- package/lib-commonjs/index.js +18 -9
- package/package.json +6 -6
- package/dist/sp-listview-extensibility_none_356e5e10e07fd2101e9c.js +0 -1
|
@@ -12,12 +12,12 @@
|
|
|
12
12
|
"scriptResources": {
|
|
13
13
|
"sp-listview-extensibility": {
|
|
14
14
|
"type": "path",
|
|
15
|
-
"path": "sp-listview-
|
|
15
|
+
"path": "sp-listview-extensibility_none_f3588362212b47a21f78.js"
|
|
16
16
|
},
|
|
17
17
|
"tslib": {
|
|
18
18
|
"type": "component",
|
|
19
19
|
"id": "01c4df03-e775-48cb-aa14-171ee5199a15",
|
|
20
|
-
"version": "
|
|
20
|
+
"version": "2.3.1"
|
|
21
21
|
},
|
|
22
22
|
"@microsoft/sp-core-library": {
|
|
23
23
|
"type": "component",
|
|
@@ -33,13 +33,17 @@ export declare abstract class BaseFieldCustomizer<TProperties> extends BaseExten
|
|
|
33
33
|
}
|
|
34
34
|
|
|
35
35
|
/**
|
|
36
|
+
* This is the base class that third parties should extend when implementing
|
|
37
|
+
* a client-side extension that provides a custom list form (display, new, edit) for a SharePoint list.
|
|
36
38
|
* @public
|
|
37
39
|
*/
|
|
38
40
|
export declare abstract class BaseFormCustomizer<TProperties> extends BaseExtension<TProperties> {
|
|
41
|
+
/* Excluded from this release type: _formActionEventName */
|
|
39
42
|
/**
|
|
40
43
|
* {@inheritDoc @microsoft/sp-extension-base#BaseExtension.context}
|
|
41
44
|
*/
|
|
42
45
|
readonly context: FormCustomizerContext;
|
|
46
|
+
private readonly _formActionEvent;
|
|
43
47
|
private _displayMode;
|
|
44
48
|
/**
|
|
45
49
|
* This property is a pointer to the root DOM element of the form. This is a DIV element and contains the whole
|
|
@@ -49,24 +53,30 @@ export declare abstract class BaseFormCustomizer<TProperties> extends BaseExtens
|
|
|
49
53
|
*/
|
|
50
54
|
protected get domElement(): HTMLElement;
|
|
51
55
|
/**
|
|
56
|
+
* Display mode of the form: Edit, Display or New.
|
|
57
|
+
*
|
|
52
58
|
* @readonly
|
|
53
59
|
*/
|
|
54
60
|
protected get displayMode(): FormDisplayMode;
|
|
61
|
+
/* Excluded from this release type: formActionEvent */
|
|
62
|
+
/* Excluded from this release type: _internalRender */
|
|
63
|
+
/* Excluded from this release type: _internalSetDisplayMode */
|
|
64
|
+
/* Excluded from this release type: _save */
|
|
65
|
+
/* Excluded from this release type: _close */
|
|
66
|
+
/**
|
|
67
|
+
* Disposes the component.
|
|
68
|
+
*
|
|
69
|
+
* @remarks
|
|
70
|
+
* Please, do not override this method.
|
|
71
|
+
* Override the `onDispose` method instead.
|
|
72
|
+
*/
|
|
73
|
+
dispose(): void;
|
|
74
|
+
/* Excluded from this release type: _initializeExtensionType */
|
|
55
75
|
/**
|
|
56
76
|
* This API is called to render the form. There is no base implementation of this API and the form is
|
|
57
77
|
* required to override this API.
|
|
58
78
|
*/
|
|
59
79
|
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
80
|
/**
|
|
71
81
|
* Call this method after the form has been saved to inform the application that the form has been saved.
|
|
72
82
|
*/
|
|
@@ -229,23 +239,48 @@ export declare class FieldCustomizerContext extends ExtensionContext {
|
|
|
229
239
|
get field(): SPField;
|
|
230
240
|
}
|
|
231
241
|
|
|
242
|
+
/* Excluded from this release type: FormAction */
|
|
243
|
+
|
|
244
|
+
/* Excluded from this release type: FormActionEventArgs */
|
|
245
|
+
|
|
232
246
|
/**
|
|
247
|
+
* Form Customizer Context. This object contains contxtual services and properties for the form.
|
|
248
|
+
*
|
|
233
249
|
* @public
|
|
234
250
|
*/
|
|
235
251
|
export declare class FormCustomizerContext extends ExtensionContext implements IFormCustomizerContext {
|
|
236
252
|
private _list;
|
|
237
|
-
private
|
|
253
|
+
private _contentType;
|
|
238
254
|
private _folderInfo;
|
|
239
|
-
private
|
|
255
|
+
private _itemId;
|
|
240
256
|
private _domElement;
|
|
257
|
+
private _formCustomizerHost;
|
|
241
258
|
constructor(extensionContextParameters: _IExtensionContextParameters, formCustomizerContextParameters: _IFormCustomizerContextParameters);
|
|
259
|
+
/**
|
|
260
|
+
* The list associated with the form.
|
|
261
|
+
*/
|
|
242
262
|
get list(): IList;
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
263
|
+
/**
|
|
264
|
+
* The content type associated with the form.
|
|
265
|
+
*/
|
|
266
|
+
get contentType(): IContentType;
|
|
267
|
+
/**
|
|
268
|
+
* The folder information where the item is located/should be created.
|
|
269
|
+
*/
|
|
270
|
+
get folderInfo(): IFolderInfo;
|
|
271
|
+
/**
|
|
272
|
+
* The item id of the item being edited or viewed.
|
|
273
|
+
*/
|
|
274
|
+
get itemId(): number | undefined;
|
|
275
|
+
/**
|
|
276
|
+
* The root DOM element of the form. This is a DIV element container for the custom form.
|
|
277
|
+
*/
|
|
246
278
|
get domElement(): HTMLElement;
|
|
279
|
+
/* Excluded from this release type: _host */
|
|
247
280
|
}
|
|
248
281
|
|
|
282
|
+
/* Excluded from this release type: FormCustomizerHost */
|
|
283
|
+
|
|
249
284
|
/**
|
|
250
285
|
* Provides information about the state of a column in the list view
|
|
251
286
|
*
|
|
@@ -296,8 +331,18 @@ export declare interface IColumn {
|
|
|
296
331
|
* @public
|
|
297
332
|
*/
|
|
298
333
|
export declare interface IContentType {
|
|
334
|
+
/**
|
|
335
|
+
* Content type string id
|
|
336
|
+
*/
|
|
299
337
|
readonly id: string;
|
|
338
|
+
/**
|
|
339
|
+
* Content type name
|
|
340
|
+
*/
|
|
300
341
|
readonly name: string;
|
|
342
|
+
/**
|
|
343
|
+
* Content type schema XML
|
|
344
|
+
*/
|
|
345
|
+
readonly schemaXml: string | undefined;
|
|
301
346
|
}
|
|
302
347
|
|
|
303
348
|
/* Excluded from this release type: _IExtensionContextParameters */
|
|
@@ -363,18 +408,37 @@ export declare interface IFolderInfo {
|
|
|
363
408
|
}
|
|
364
409
|
|
|
365
410
|
/**
|
|
411
|
+
* FormCustomizerContext-specific properties.
|
|
412
|
+
*
|
|
366
413
|
* @public
|
|
367
414
|
*/
|
|
368
415
|
export declare interface IFormCustomizerContext {
|
|
416
|
+
/**
|
|
417
|
+
* The list associated with the form.
|
|
418
|
+
*/
|
|
369
419
|
readonly list: IList;
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
420
|
+
/**
|
|
421
|
+
* The content type associated with the form.
|
|
422
|
+
*/
|
|
423
|
+
readonly contentType: IContentType;
|
|
424
|
+
/**
|
|
425
|
+
* The folder information where the item is located/should be created.
|
|
426
|
+
*/
|
|
427
|
+
readonly folderInfo: IFolderInfo;
|
|
428
|
+
/**
|
|
429
|
+
* The item id of the item being edited or viewed.
|
|
430
|
+
*/
|
|
431
|
+
readonly itemId?: number;
|
|
432
|
+
/**
|
|
433
|
+
* The root DOM element of the form. This is a DIV element container for the custom form.
|
|
434
|
+
*/
|
|
373
435
|
readonly domElement: HTMLElement;
|
|
374
436
|
}
|
|
375
437
|
|
|
376
438
|
/* Excluded from this release type: _IFormCustomizerContextParameters */
|
|
377
439
|
|
|
440
|
+
/* Excluded from this release type: IFormCustomizerHostParameters */
|
|
441
|
+
|
|
378
442
|
/**
|
|
379
443
|
* Provides information about the list rendered by the ListView.
|
|
380
444
|
*
|
|
@@ -33,13 +33,17 @@ export declare abstract class BaseFieldCustomizer<TProperties> extends BaseExten
|
|
|
33
33
|
}
|
|
34
34
|
|
|
35
35
|
/**
|
|
36
|
+
* This is the base class that third parties should extend when implementing
|
|
37
|
+
* a client-side extension that provides a custom list form (display, new, edit) for a SharePoint list.
|
|
36
38
|
* @public
|
|
37
39
|
*/
|
|
38
40
|
export declare abstract class BaseFormCustomizer<TProperties> extends BaseExtension<TProperties> {
|
|
41
|
+
/* Excluded from this release type: _formActionEventName */
|
|
39
42
|
/**
|
|
40
43
|
* {@inheritDoc @microsoft/sp-extension-base#BaseExtension.context}
|
|
41
44
|
*/
|
|
42
45
|
readonly context: FormCustomizerContext;
|
|
46
|
+
private readonly _formActionEvent;
|
|
43
47
|
private _displayMode;
|
|
44
48
|
/**
|
|
45
49
|
* This property is a pointer to the root DOM element of the form. This is a DIV element and contains the whole
|
|
@@ -49,24 +53,30 @@ export declare abstract class BaseFormCustomizer<TProperties> extends BaseExtens
|
|
|
49
53
|
*/
|
|
50
54
|
protected get domElement(): HTMLElement;
|
|
51
55
|
/**
|
|
56
|
+
* Display mode of the form: Edit, Display or New.
|
|
57
|
+
*
|
|
52
58
|
* @readonly
|
|
53
59
|
*/
|
|
54
60
|
protected get displayMode(): FormDisplayMode;
|
|
61
|
+
/* Excluded from this release type: formActionEvent */
|
|
62
|
+
/* Excluded from this release type: _internalRender */
|
|
63
|
+
/* Excluded from this release type: _internalSetDisplayMode */
|
|
64
|
+
/* Excluded from this release type: _save */
|
|
65
|
+
/* Excluded from this release type: _close */
|
|
66
|
+
/**
|
|
67
|
+
* Disposes the component.
|
|
68
|
+
*
|
|
69
|
+
* @remarks
|
|
70
|
+
* Please, do not override this method.
|
|
71
|
+
* Override the `onDispose` method instead.
|
|
72
|
+
*/
|
|
73
|
+
dispose(): void;
|
|
74
|
+
/* Excluded from this release type: _initializeExtensionType */
|
|
55
75
|
/**
|
|
56
76
|
* This API is called to render the form. There is no base implementation of this API and the form is
|
|
57
77
|
* required to override this API.
|
|
58
78
|
*/
|
|
59
79
|
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
80
|
/**
|
|
71
81
|
* Call this method after the form has been saved to inform the application that the form has been saved.
|
|
72
82
|
*/
|
|
@@ -229,23 +239,48 @@ export declare class FieldCustomizerContext extends ExtensionContext {
|
|
|
229
239
|
get field(): SPField;
|
|
230
240
|
}
|
|
231
241
|
|
|
242
|
+
/* Excluded from this release type: FormAction */
|
|
243
|
+
|
|
244
|
+
/* Excluded from this release type: FormActionEventArgs */
|
|
245
|
+
|
|
232
246
|
/**
|
|
247
|
+
* Form Customizer Context. This object contains contxtual services and properties for the form.
|
|
248
|
+
*
|
|
233
249
|
* @public
|
|
234
250
|
*/
|
|
235
251
|
export declare class FormCustomizerContext extends ExtensionContext implements IFormCustomizerContext {
|
|
236
252
|
private _list;
|
|
237
|
-
private
|
|
253
|
+
private _contentType;
|
|
238
254
|
private _folderInfo;
|
|
239
|
-
private
|
|
255
|
+
private _itemId;
|
|
240
256
|
private _domElement;
|
|
257
|
+
private _formCustomizerHost;
|
|
241
258
|
constructor(extensionContextParameters: _IExtensionContextParameters, formCustomizerContextParameters: _IFormCustomizerContextParameters);
|
|
259
|
+
/**
|
|
260
|
+
* The list associated with the form.
|
|
261
|
+
*/
|
|
242
262
|
get list(): IList;
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
263
|
+
/**
|
|
264
|
+
* The content type associated with the form.
|
|
265
|
+
*/
|
|
266
|
+
get contentType(): IContentType;
|
|
267
|
+
/**
|
|
268
|
+
* The folder information where the item is located/should be created.
|
|
269
|
+
*/
|
|
270
|
+
get folderInfo(): IFolderInfo;
|
|
271
|
+
/**
|
|
272
|
+
* The item id of the item being edited or viewed.
|
|
273
|
+
*/
|
|
274
|
+
get itemId(): number | undefined;
|
|
275
|
+
/**
|
|
276
|
+
* The root DOM element of the form. This is a DIV element container for the custom form.
|
|
277
|
+
*/
|
|
246
278
|
get domElement(): HTMLElement;
|
|
279
|
+
/* Excluded from this release type: _host */
|
|
247
280
|
}
|
|
248
281
|
|
|
282
|
+
/* Excluded from this release type: FormCustomizerHost */
|
|
283
|
+
|
|
249
284
|
/**
|
|
250
285
|
* Provides information about the state of a column in the list view
|
|
251
286
|
*
|
|
@@ -296,8 +331,18 @@ export declare interface IColumn {
|
|
|
296
331
|
* @public
|
|
297
332
|
*/
|
|
298
333
|
export declare interface IContentType {
|
|
334
|
+
/**
|
|
335
|
+
* Content type string id
|
|
336
|
+
*/
|
|
299
337
|
readonly id: string;
|
|
338
|
+
/**
|
|
339
|
+
* Content type name
|
|
340
|
+
*/
|
|
300
341
|
readonly name: string;
|
|
342
|
+
/**
|
|
343
|
+
* Content type schema XML
|
|
344
|
+
*/
|
|
345
|
+
readonly schemaXml: string | undefined;
|
|
301
346
|
}
|
|
302
347
|
|
|
303
348
|
/* Excluded from this release type: _IExtensionContextParameters */
|
|
@@ -363,18 +408,37 @@ export declare interface IFolderInfo {
|
|
|
363
408
|
}
|
|
364
409
|
|
|
365
410
|
/**
|
|
411
|
+
* FormCustomizerContext-specific properties.
|
|
412
|
+
*
|
|
366
413
|
* @public
|
|
367
414
|
*/
|
|
368
415
|
export declare interface IFormCustomizerContext {
|
|
416
|
+
/**
|
|
417
|
+
* The list associated with the form.
|
|
418
|
+
*/
|
|
369
419
|
readonly list: IList;
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
420
|
+
/**
|
|
421
|
+
* The content type associated with the form.
|
|
422
|
+
*/
|
|
423
|
+
readonly contentType: IContentType;
|
|
424
|
+
/**
|
|
425
|
+
* The folder information where the item is located/should be created.
|
|
426
|
+
*/
|
|
427
|
+
readonly folderInfo: IFolderInfo;
|
|
428
|
+
/**
|
|
429
|
+
* The item id of the item being edited or viewed.
|
|
430
|
+
*/
|
|
431
|
+
readonly itemId?: number;
|
|
432
|
+
/**
|
|
433
|
+
* The root DOM element of the form. This is a DIV element container for the custom form.
|
|
434
|
+
*/
|
|
373
435
|
readonly domElement: HTMLElement;
|
|
374
436
|
}
|
|
375
437
|
|
|
376
438
|
/* Excluded from this release type: _IFormCustomizerContextParameters */
|
|
377
439
|
|
|
440
|
+
/* Excluded from this release type: IFormCustomizerHostParameters */
|
|
441
|
+
|
|
378
442
|
/**
|
|
379
443
|
* Provides information about the list rendered by the ListView.
|
|
380
444
|
*
|
package/dist/index-internal.d.ts
CHANGED
|
@@ -33,13 +33,17 @@ export declare abstract class BaseFieldCustomizer<TProperties> extends BaseExten
|
|
|
33
33
|
}
|
|
34
34
|
|
|
35
35
|
/**
|
|
36
|
+
* This is the base class that third parties should extend when implementing
|
|
37
|
+
* a client-side extension that provides a custom list form (display, new, edit) for a SharePoint list.
|
|
36
38
|
* @public
|
|
37
39
|
*/
|
|
38
40
|
export declare abstract class BaseFormCustomizer<TProperties> extends BaseExtension<TProperties> {
|
|
41
|
+
/* Excluded from this release type: _formActionEventName */
|
|
39
42
|
/**
|
|
40
43
|
* {@inheritDoc @microsoft/sp-extension-base#BaseExtension.context}
|
|
41
44
|
*/
|
|
42
45
|
readonly context: FormCustomizerContext;
|
|
46
|
+
private readonly _formActionEvent;
|
|
43
47
|
private _displayMode;
|
|
44
48
|
/**
|
|
45
49
|
* This property is a pointer to the root DOM element of the form. This is a DIV element and contains the whole
|
|
@@ -49,24 +53,30 @@ export declare abstract class BaseFormCustomizer<TProperties> extends BaseExtens
|
|
|
49
53
|
*/
|
|
50
54
|
protected get domElement(): HTMLElement;
|
|
51
55
|
/**
|
|
56
|
+
* Display mode of the form: Edit, Display or New.
|
|
57
|
+
*
|
|
52
58
|
* @readonly
|
|
53
59
|
*/
|
|
54
60
|
protected get displayMode(): FormDisplayMode;
|
|
61
|
+
/* Excluded from this release type: formActionEvent */
|
|
62
|
+
/* Excluded from this release type: _internalRender */
|
|
63
|
+
/* Excluded from this release type: _internalSetDisplayMode */
|
|
64
|
+
/* Excluded from this release type: _save */
|
|
65
|
+
/* Excluded from this release type: _close */
|
|
66
|
+
/**
|
|
67
|
+
* Disposes the component.
|
|
68
|
+
*
|
|
69
|
+
* @remarks
|
|
70
|
+
* Please, do not override this method.
|
|
71
|
+
* Override the `onDispose` method instead.
|
|
72
|
+
*/
|
|
73
|
+
dispose(): void;
|
|
74
|
+
/* Excluded from this release type: _initializeExtensionType */
|
|
55
75
|
/**
|
|
56
76
|
* This API is called to render the form. There is no base implementation of this API and the form is
|
|
57
77
|
* required to override this API.
|
|
58
78
|
*/
|
|
59
79
|
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
80
|
/**
|
|
71
81
|
* Call this method after the form has been saved to inform the application that the form has been saved.
|
|
72
82
|
*/
|
|
@@ -229,23 +239,48 @@ export declare class FieldCustomizerContext extends ExtensionContext {
|
|
|
229
239
|
get field(): SPField;
|
|
230
240
|
}
|
|
231
241
|
|
|
242
|
+
/* Excluded from this release type: FormAction */
|
|
243
|
+
|
|
244
|
+
/* Excluded from this release type: FormActionEventArgs */
|
|
245
|
+
|
|
232
246
|
/**
|
|
247
|
+
* Form Customizer Context. This object contains contxtual services and properties for the form.
|
|
248
|
+
*
|
|
233
249
|
* @public
|
|
234
250
|
*/
|
|
235
251
|
export declare class FormCustomizerContext extends ExtensionContext implements IFormCustomizerContext {
|
|
236
252
|
private _list;
|
|
237
|
-
private
|
|
253
|
+
private _contentType;
|
|
238
254
|
private _folderInfo;
|
|
239
|
-
private
|
|
255
|
+
private _itemId;
|
|
240
256
|
private _domElement;
|
|
257
|
+
private _formCustomizerHost;
|
|
241
258
|
constructor(extensionContextParameters: _IExtensionContextParameters, formCustomizerContextParameters: _IFormCustomizerContextParameters);
|
|
259
|
+
/**
|
|
260
|
+
* The list associated with the form.
|
|
261
|
+
*/
|
|
242
262
|
get list(): IList;
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
263
|
+
/**
|
|
264
|
+
* The content type associated with the form.
|
|
265
|
+
*/
|
|
266
|
+
get contentType(): IContentType;
|
|
267
|
+
/**
|
|
268
|
+
* The folder information where the item is located/should be created.
|
|
269
|
+
*/
|
|
270
|
+
get folderInfo(): IFolderInfo;
|
|
271
|
+
/**
|
|
272
|
+
* The item id of the item being edited or viewed.
|
|
273
|
+
*/
|
|
274
|
+
get itemId(): number | undefined;
|
|
275
|
+
/**
|
|
276
|
+
* The root DOM element of the form. This is a DIV element container for the custom form.
|
|
277
|
+
*/
|
|
246
278
|
get domElement(): HTMLElement;
|
|
279
|
+
/* Excluded from this release type: _host */
|
|
247
280
|
}
|
|
248
281
|
|
|
282
|
+
/* Excluded from this release type: FormCustomizerHost */
|
|
283
|
+
|
|
249
284
|
/**
|
|
250
285
|
* Provides information about the state of a column in the list view
|
|
251
286
|
*
|
|
@@ -296,8 +331,18 @@ export declare interface IColumn {
|
|
|
296
331
|
* @public
|
|
297
332
|
*/
|
|
298
333
|
export declare interface IContentType {
|
|
334
|
+
/**
|
|
335
|
+
* Content type string id
|
|
336
|
+
*/
|
|
299
337
|
readonly id: string;
|
|
338
|
+
/**
|
|
339
|
+
* Content type name
|
|
340
|
+
*/
|
|
300
341
|
readonly name: string;
|
|
342
|
+
/**
|
|
343
|
+
* Content type schema XML
|
|
344
|
+
*/
|
|
345
|
+
readonly schemaXml: string | undefined;
|
|
301
346
|
}
|
|
302
347
|
|
|
303
348
|
/* Excluded from this release type: _IExtensionContextParameters */
|
|
@@ -363,18 +408,37 @@ export declare interface IFolderInfo {
|
|
|
363
408
|
}
|
|
364
409
|
|
|
365
410
|
/**
|
|
411
|
+
* FormCustomizerContext-specific properties.
|
|
412
|
+
*
|
|
366
413
|
* @public
|
|
367
414
|
*/
|
|
368
415
|
export declare interface IFormCustomizerContext {
|
|
416
|
+
/**
|
|
417
|
+
* The list associated with the form.
|
|
418
|
+
*/
|
|
369
419
|
readonly list: IList;
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
420
|
+
/**
|
|
421
|
+
* The content type associated with the form.
|
|
422
|
+
*/
|
|
423
|
+
readonly contentType: IContentType;
|
|
424
|
+
/**
|
|
425
|
+
* The folder information where the item is located/should be created.
|
|
426
|
+
*/
|
|
427
|
+
readonly folderInfo: IFolderInfo;
|
|
428
|
+
/**
|
|
429
|
+
* The item id of the item being edited or viewed.
|
|
430
|
+
*/
|
|
431
|
+
readonly itemId?: number;
|
|
432
|
+
/**
|
|
433
|
+
* The root DOM element of the form. This is a DIV element container for the custom form.
|
|
434
|
+
*/
|
|
373
435
|
readonly domElement: HTMLElement;
|
|
374
436
|
}
|
|
375
437
|
|
|
376
438
|
/* Excluded from this release type: _IFormCustomizerContextParameters */
|
|
377
439
|
|
|
440
|
+
/* Excluded from this release type: IFormCustomizerHostParameters */
|
|
441
|
+
|
|
378
442
|
/**
|
|
379
443
|
* Provides information about the list rendered by the ListView.
|
|
380
444
|
*
|
|
@@ -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 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={}))}})});
|
package/dist/tsdoc-metadata.json
CHANGED
|
@@ -88,7 +88,7 @@ var ListViewAccessor = /** @class */ (function () {
|
|
|
88
88
|
function ListViewAccessor(eventPrefix) {
|
|
89
89
|
this._isDisposed = false;
|
|
90
90
|
this._selectedRowsChangedEvent = new sp_core_library_1.SPEvent(ListViewAccessor._selectedRowsChangedEventName);
|
|
91
|
-
this._listViewStateChangedEventName = ""
|
|
91
|
+
this._listViewStateChangedEventName = "".concat(ListViewAccessor._listViewStateChangedEventName).concat(eventPrefix || '');
|
|
92
92
|
this._listViewStateChangedEvent = new sp_core_library_1.SPEvent(this._listViewStateChangedEventName);
|
|
93
93
|
}
|
|
94
94
|
Object.defineProperty(ListViewAccessor.prototype, "selectedRowsChangedEvent", {
|
|
@@ -20,7 +20,7 @@ var BaseFieldCustomizer = /** @class */ (function (_super) {
|
|
|
20
20
|
* virtual
|
|
21
21
|
*/
|
|
22
22
|
BaseFieldCustomizer.prototype.onRenderCell = function (event) {
|
|
23
|
-
var text = ""
|
|
23
|
+
var text = "".concat(event.fieldValue);
|
|
24
24
|
event.fieldValue.innerText = text;
|
|
25
25
|
};
|
|
26
26
|
/*
|
|
@@ -2,13 +2,19 @@
|
|
|
2
2
|
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
|
+
var sp_core_library_1 = require("@microsoft/sp-core-library");
|
|
6
|
+
var FormActionEventArgs_1 = require("./FormActionEventArgs");
|
|
5
7
|
/**
|
|
8
|
+
* This is the base class that third parties should extend when implementing
|
|
9
|
+
* a client-side extension that provides a custom list form (display, new, edit) for a SharePoint list.
|
|
6
10
|
* @public
|
|
7
11
|
*/
|
|
8
12
|
var BaseFormCustomizer = /** @class */ (function (_super) {
|
|
9
13
|
tslib_1.__extends(BaseFormCustomizer, _super);
|
|
10
14
|
function BaseFormCustomizer() {
|
|
11
|
-
|
|
15
|
+
var _this = _super !== null && _super.apply(this, arguments) || this;
|
|
16
|
+
_this._formActionEvent = new sp_core_library_1.SPEvent(BaseFormCustomizer._formActionEventName);
|
|
17
|
+
return _this;
|
|
12
18
|
}
|
|
13
19
|
Object.defineProperty(BaseFormCustomizer.prototype, "domElement", {
|
|
14
20
|
// Readonly protected properties. To change these to readonly once TypeScript supports that feature.
|
|
@@ -26,6 +32,8 @@ var BaseFormCustomizer = /** @class */ (function (_super) {
|
|
|
26
32
|
});
|
|
27
33
|
Object.defineProperty(BaseFormCustomizer.prototype, "displayMode", {
|
|
28
34
|
/**
|
|
35
|
+
* Display mode of the form: Edit, Display or New.
|
|
36
|
+
*
|
|
29
37
|
* @readonly
|
|
30
38
|
*/
|
|
31
39
|
get: function () {
|
|
@@ -34,18 +42,85 @@ var BaseFormCustomizer = /** @class */ (function (_super) {
|
|
|
34
42
|
enumerable: false,
|
|
35
43
|
configurable: true
|
|
36
44
|
});
|
|
45
|
+
Object.defineProperty(BaseFormCustomizer.prototype, "formActionEvent", {
|
|
46
|
+
/**
|
|
47
|
+
* Event that gets raised every time the selected items in the list view change.
|
|
48
|
+
* Reserved for the future.
|
|
49
|
+
*
|
|
50
|
+
* @eventproperty
|
|
51
|
+
* @internal
|
|
52
|
+
*/
|
|
53
|
+
get: function () {
|
|
54
|
+
return this._formActionEvent;
|
|
55
|
+
},
|
|
56
|
+
enumerable: false,
|
|
57
|
+
configurable: true
|
|
58
|
+
});
|
|
59
|
+
/**
|
|
60
|
+
* @internal
|
|
61
|
+
*/
|
|
62
|
+
BaseFormCustomizer.prototype._internalRender = function () {
|
|
63
|
+
this.render();
|
|
64
|
+
};
|
|
65
|
+
/**
|
|
66
|
+
* Internal API to set form's display mode.
|
|
67
|
+
* @internal
|
|
68
|
+
*/
|
|
69
|
+
BaseFormCustomizer.prototype._internalSetDisplayMode = function (newDisplayMode) {
|
|
70
|
+
this._displayMode = newDisplayMode;
|
|
71
|
+
};
|
|
72
|
+
/**
|
|
73
|
+
* Use this method to initiate saving of the form.
|
|
74
|
+
*
|
|
75
|
+
* @internal
|
|
76
|
+
*/
|
|
77
|
+
BaseFormCustomizer.prototype._save = function () {
|
|
78
|
+
sp_core_library_1._SPEventManager.instance.raiseStickyEvent(BaseFormCustomizer._formActionEventName, new FormActionEventArgs_1.FormActionEventArgs(FormActionEventArgs_1.FormAction.Save));
|
|
79
|
+
};
|
|
80
|
+
/**
|
|
81
|
+
* Use this method to initiate closing/cancelling of the form.
|
|
82
|
+
*
|
|
83
|
+
* @internal
|
|
84
|
+
*/
|
|
85
|
+
BaseFormCustomizer.prototype._close = function () {
|
|
86
|
+
sp_core_library_1._SPEventManager.instance.raiseStickyEvent(BaseFormCustomizer._formActionEventName, new FormActionEventArgs_1.FormActionEventArgs(FormActionEventArgs_1.FormAction.Close));
|
|
87
|
+
};
|
|
88
|
+
/**
|
|
89
|
+
* Disposes the component.
|
|
90
|
+
*
|
|
91
|
+
* @remarks
|
|
92
|
+
* Please, do not override this method.
|
|
93
|
+
* Override the `onDispose` method instead.
|
|
94
|
+
*/
|
|
95
|
+
BaseFormCustomizer.prototype.dispose = function () {
|
|
96
|
+
sp_core_library_1._SPEventManager.instance.removeEvent(BaseFormCustomizer._formActionEventName);
|
|
97
|
+
_super.prototype.dispose.call(this);
|
|
98
|
+
};
|
|
99
|
+
/**
|
|
100
|
+
* @internal
|
|
101
|
+
*/
|
|
102
|
+
BaseFormCustomizer.prototype._initializeExtensionType = function () {
|
|
103
|
+
_super.prototype._initializeExtensionType.call(this);
|
|
104
|
+
this.context._host.logEngagement('init');
|
|
105
|
+
};
|
|
37
106
|
/**
|
|
38
107
|
* Call this method after the form has been saved to inform the application that the form has been saved.
|
|
39
108
|
*/
|
|
40
109
|
BaseFormCustomizer.prototype.formSaved = function () {
|
|
41
|
-
|
|
110
|
+
this.context._host.onSave();
|
|
42
111
|
};
|
|
43
112
|
/**
|
|
44
113
|
* Call this method after the form has been closed/cancelled to inform the application that the form has been closed.
|
|
45
114
|
*/
|
|
46
115
|
BaseFormCustomizer.prototype.formClosed = function () {
|
|
47
|
-
|
|
116
|
+
this.context._host.onClose();
|
|
48
117
|
};
|
|
118
|
+
/**
|
|
119
|
+
* SPEvent name when the form action should be performed.
|
|
120
|
+
*
|
|
121
|
+
* @internal
|
|
122
|
+
*/
|
|
123
|
+
BaseFormCustomizer._formActionEventName = 'formCustomizer.formAction';
|
|
49
124
|
return BaseFormCustomizer;
|
|
50
125
|
}(sp_extension_base_1.BaseExtension));
|
|
51
126
|
exports.default = BaseFormCustomizer;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.FormActionEventArgs = exports.FormAction = void 0;
|
|
4
|
+
var tslib_1 = require("tslib");
|
|
5
|
+
var sp_core_library_1 = require("@microsoft/sp-core-library");
|
|
6
|
+
/**
|
|
7
|
+
* Available Form actions.
|
|
8
|
+
*
|
|
9
|
+
* @internal
|
|
10
|
+
*/
|
|
11
|
+
var FormAction;
|
|
12
|
+
(function (FormAction) {
|
|
13
|
+
FormAction[FormAction["Save"] = 0] = "Save";
|
|
14
|
+
FormAction[FormAction["Close"] = 1] = "Close";
|
|
15
|
+
})(FormAction = exports.FormAction || (exports.FormAction = {}));
|
|
16
|
+
/**
|
|
17
|
+
* Arguments for the form close/save event.
|
|
18
|
+
*
|
|
19
|
+
* @internal
|
|
20
|
+
*/
|
|
21
|
+
var FormActionEventArgs = /** @class */ (function (_super) {
|
|
22
|
+
tslib_1.__extends(FormActionEventArgs, _super);
|
|
23
|
+
function FormActionEventArgs(formAction) {
|
|
24
|
+
var _this = _super.call(this) || this;
|
|
25
|
+
_this.action = formAction;
|
|
26
|
+
return _this;
|
|
27
|
+
}
|
|
28
|
+
return FormActionEventArgs;
|
|
29
|
+
}(sp_core_library_1.SPEventArgs));
|
|
30
|
+
exports.FormActionEventArgs = FormActionEventArgs;
|
|
31
|
+
//# sourceMappingURL=FormActionEventArgs.js.map
|
|
@@ -3,6 +3,8 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
var tslib_1 = require("tslib");
|
|
4
4
|
var sp_extension_base_1 = require("@microsoft/sp-extension-base");
|
|
5
5
|
/**
|
|
6
|
+
* Form Customizer Context. This object contains contxtual services and properties for the form.
|
|
7
|
+
*
|
|
6
8
|
* @public
|
|
7
9
|
*/
|
|
8
10
|
var FormCustomizerContext = /** @class */ (function (_super) {
|
|
@@ -10,47 +12,75 @@ var FormCustomizerContext = /** @class */ (function (_super) {
|
|
|
10
12
|
function FormCustomizerContext(extensionContextParameters, formCustomizerContextParameters) {
|
|
11
13
|
var _this = _super.call(this, extensionContextParameters) || this;
|
|
12
14
|
_this._list = formCustomizerContextParameters.list;
|
|
13
|
-
_this.
|
|
15
|
+
_this._contentType = formCustomizerContextParameters.contentType;
|
|
14
16
|
_this._folderInfo = formCustomizerContextParameters.folderInfo;
|
|
15
|
-
_this.
|
|
17
|
+
_this._itemId = formCustomizerContextParameters.itemId;
|
|
16
18
|
_this._domElement = formCustomizerContextParameters.domElement;
|
|
19
|
+
_this._formCustomizerHost = formCustomizerContextParameters.host;
|
|
17
20
|
return _this;
|
|
18
21
|
}
|
|
19
22
|
Object.defineProperty(FormCustomizerContext.prototype, "list", {
|
|
23
|
+
/**
|
|
24
|
+
* The list associated with the form.
|
|
25
|
+
*/
|
|
20
26
|
get: function () {
|
|
21
27
|
return this._list;
|
|
22
28
|
},
|
|
23
29
|
enumerable: false,
|
|
24
30
|
configurable: true
|
|
25
31
|
});
|
|
26
|
-
Object.defineProperty(FormCustomizerContext.prototype, "
|
|
32
|
+
Object.defineProperty(FormCustomizerContext.prototype, "contentType", {
|
|
33
|
+
/**
|
|
34
|
+
* The content type associated with the form.
|
|
35
|
+
*/
|
|
27
36
|
get: function () {
|
|
28
|
-
return this.
|
|
37
|
+
return this._contentType;
|
|
29
38
|
},
|
|
30
39
|
enumerable: false,
|
|
31
40
|
configurable: true
|
|
32
41
|
});
|
|
33
42
|
Object.defineProperty(FormCustomizerContext.prototype, "folderInfo", {
|
|
43
|
+
/**
|
|
44
|
+
* The folder information where the item is located/should be created.
|
|
45
|
+
*/
|
|
34
46
|
get: function () {
|
|
35
47
|
return this._folderInfo;
|
|
36
48
|
},
|
|
37
49
|
enumerable: false,
|
|
38
50
|
configurable: true
|
|
39
51
|
});
|
|
40
|
-
Object.defineProperty(FormCustomizerContext.prototype, "
|
|
52
|
+
Object.defineProperty(FormCustomizerContext.prototype, "itemId", {
|
|
53
|
+
/**
|
|
54
|
+
* The item id of the item being edited or viewed.
|
|
55
|
+
*/
|
|
41
56
|
get: function () {
|
|
42
|
-
return this.
|
|
57
|
+
return this._itemId;
|
|
43
58
|
},
|
|
44
59
|
enumerable: false,
|
|
45
60
|
configurable: true
|
|
46
61
|
});
|
|
47
62
|
Object.defineProperty(FormCustomizerContext.prototype, "domElement", {
|
|
63
|
+
/**
|
|
64
|
+
* The root DOM element of the form. This is a DIV element container for the custom form.
|
|
65
|
+
*/
|
|
48
66
|
get: function () {
|
|
49
67
|
return this._domElement;
|
|
50
68
|
},
|
|
51
69
|
enumerable: false,
|
|
52
70
|
configurable: true
|
|
53
71
|
});
|
|
72
|
+
Object.defineProperty(FormCustomizerContext.prototype, "_host", {
|
|
73
|
+
/**
|
|
74
|
+
* Form host to interact with the host application.
|
|
75
|
+
*
|
|
76
|
+
* @internal
|
|
77
|
+
*/
|
|
78
|
+
get: function () {
|
|
79
|
+
return this._formCustomizerHost;
|
|
80
|
+
},
|
|
81
|
+
enumerable: false,
|
|
82
|
+
configurable: true
|
|
83
|
+
});
|
|
54
84
|
return FormCustomizerContext;
|
|
55
85
|
}(sp_extension_base_1.ExtensionContext));
|
|
56
86
|
exports.default = FormCustomizerContext;
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.FormCustomizerHost = void 0;
|
|
4
|
+
/**
|
|
5
|
+
* Form Customizer Host
|
|
6
|
+
*
|
|
7
|
+
* @internal
|
|
8
|
+
*/
|
|
9
|
+
var FormCustomizerHost = /** @class */ (function () {
|
|
10
|
+
function FormCustomizerHost(params) {
|
|
11
|
+
this._onSaveCallback = params.onSaveCallback;
|
|
12
|
+
this._onCloseCallback = params.onCloseCallback;
|
|
13
|
+
this._onErrorCallback = params.onErrorCallback;
|
|
14
|
+
this._logEngagement = params.logEngagement;
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* The host will invoke this._onSaveCallback to inform the application on form save.
|
|
18
|
+
*/
|
|
19
|
+
FormCustomizerHost.prototype.onSave = function () {
|
|
20
|
+
this.logEngagement('onSave');
|
|
21
|
+
this._onSaveCallback();
|
|
22
|
+
};
|
|
23
|
+
/**
|
|
24
|
+
* The host will invoke this._onCloseCallback to inform the application on form close.
|
|
25
|
+
*/
|
|
26
|
+
FormCustomizerHost.prototype.onClose = function () {
|
|
27
|
+
this.logEngagement('onClose');
|
|
28
|
+
this._onCloseCallback();
|
|
29
|
+
};
|
|
30
|
+
/**
|
|
31
|
+
* The host will invoke this._onErrorCallback to inform the application on form error.
|
|
32
|
+
* @param error - Error message
|
|
33
|
+
*/
|
|
34
|
+
FormCustomizerHost.prototype.onError = function (error) {
|
|
35
|
+
this.logEngagement('onError');
|
|
36
|
+
if (this._onErrorCallback) {
|
|
37
|
+
this._onErrorCallback(error);
|
|
38
|
+
}
|
|
39
|
+
};
|
|
40
|
+
/**
|
|
41
|
+
* Logs form engagement event
|
|
42
|
+
* @param eventName - Event name
|
|
43
|
+
*/
|
|
44
|
+
FormCustomizerHost.prototype.logEngagement = function (eventName) {
|
|
45
|
+
if (this._logEngagement) {
|
|
46
|
+
this._logEngagement(eventName);
|
|
47
|
+
}
|
|
48
|
+
};
|
|
49
|
+
return FormCustomizerHost;
|
|
50
|
+
}());
|
|
51
|
+
exports.FormCustomizerHost = FormCustomizerHost;
|
|
52
|
+
//# sourceMappingURL=FormCustomizerHost.js.map
|
package/lib-commonjs/index.js
CHANGED
|
@@ -4,29 +4,38 @@
|
|
|
4
4
|
*
|
|
5
5
|
* @packagedocumentation
|
|
6
6
|
*/
|
|
7
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
8
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
9
|
+
};
|
|
7
10
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
11
|
+
exports.ListViewAccessorStateChanges = exports.ListViewAccessor = exports.ListViewStateChangedEventArgs = exports.SelectedRowsChangedEventArgs = exports.RowAccessor = exports.ColumnAccessor = exports.ListItemAccessor = exports.FormAction = exports.FormActionEventArgs = exports.FormCustomizerHost = exports.FormCustomizerContext = exports.BaseFormCustomizer = exports.FieldCustomizerContext = exports.BaseFieldCustomizer = exports.ListViewCommandSetContext = exports.Command = exports.BaseListViewCommandSet = void 0;
|
|
8
12
|
var BaseListViewCommandSet_1 = require("./commandSet/BaseListViewCommandSet");
|
|
9
|
-
Object.defineProperty(exports, "BaseListViewCommandSet", { enumerable: true, get: function () { return BaseListViewCommandSet_1.default; } });
|
|
13
|
+
Object.defineProperty(exports, "BaseListViewCommandSet", { enumerable: true, get: function () { return __importDefault(BaseListViewCommandSet_1).default; } });
|
|
10
14
|
var Command_1 = require("./commandSet/Command");
|
|
11
|
-
Object.defineProperty(exports, "Command", { enumerable: true, get: function () { return Command_1.default; } });
|
|
15
|
+
Object.defineProperty(exports, "Command", { enumerable: true, get: function () { return __importDefault(Command_1).default; } });
|
|
12
16
|
var ListViewCommandSetContext_1 = require("./commandSet/ListViewCommandSetContext");
|
|
13
|
-
Object.defineProperty(exports, "ListViewCommandSetContext", { enumerable: true, get: function () { return ListViewCommandSetContext_1.default; } });
|
|
17
|
+
Object.defineProperty(exports, "ListViewCommandSetContext", { enumerable: true, get: function () { return __importDefault(ListViewCommandSetContext_1).default; } });
|
|
14
18
|
var BaseFieldCustomizer_1 = require("./fieldCustomizer/BaseFieldCustomizer");
|
|
15
|
-
Object.defineProperty(exports, "BaseFieldCustomizer", { enumerable: true, get: function () { return BaseFieldCustomizer_1.default; } });
|
|
19
|
+
Object.defineProperty(exports, "BaseFieldCustomizer", { enumerable: true, get: function () { return __importDefault(BaseFieldCustomizer_1).default; } });
|
|
16
20
|
var FieldCustomizerContext_1 = require("./fieldCustomizer/FieldCustomizerContext");
|
|
17
|
-
Object.defineProperty(exports, "FieldCustomizerContext", { enumerable: true, get: function () { return FieldCustomizerContext_1.default; } });
|
|
21
|
+
Object.defineProperty(exports, "FieldCustomizerContext", { enumerable: true, get: function () { return __importDefault(FieldCustomizerContext_1).default; } });
|
|
18
22
|
var BaseFormCustomizer_1 = require("./formCustomizer/BaseFormCustomizer");
|
|
19
|
-
Object.defineProperty(exports, "BaseFormCustomizer", { enumerable: true, get: function () { return BaseFormCustomizer_1.default; } });
|
|
23
|
+
Object.defineProperty(exports, "BaseFormCustomizer", { enumerable: true, get: function () { return __importDefault(BaseFormCustomizer_1).default; } });
|
|
20
24
|
var FormCustomizerContext_1 = require("./formCustomizer/FormCustomizerContext");
|
|
21
|
-
Object.defineProperty(exports, "FormCustomizerContext", { enumerable: true, get: function () { return FormCustomizerContext_1.default; } });
|
|
25
|
+
Object.defineProperty(exports, "FormCustomizerContext", { enumerable: true, get: function () { return __importDefault(FormCustomizerContext_1).default; } });
|
|
26
|
+
var FormCustomizerHost_1 = require("./formCustomizer/FormCustomizerHost");
|
|
27
|
+
Object.defineProperty(exports, "FormCustomizerHost", { enumerable: true, get: function () { return FormCustomizerHost_1.FormCustomizerHost; } });
|
|
28
|
+
var FormActionEventArgs_1 = require("./formCustomizer/FormActionEventArgs");
|
|
29
|
+
Object.defineProperty(exports, "FormActionEventArgs", { enumerable: true, get: function () { return FormActionEventArgs_1.FormActionEventArgs; } });
|
|
30
|
+
Object.defineProperty(exports, "FormAction", { enumerable: true, get: function () { return FormActionEventArgs_1.FormAction; } });
|
|
22
31
|
var ListItemAccessor_1 = require("./common/ListItemAccessor");
|
|
23
|
-
Object.defineProperty(exports, "ListItemAccessor", { enumerable: true, get: function () { return ListItemAccessor_1.default; } });
|
|
32
|
+
Object.defineProperty(exports, "ListItemAccessor", { enumerable: true, get: function () { return __importDefault(ListItemAccessor_1).default; } });
|
|
24
33
|
var ListViewAccessor_1 = require("./common/ListViewAccessor");
|
|
25
34
|
Object.defineProperty(exports, "ColumnAccessor", { enumerable: true, get: function () { return ListViewAccessor_1.ColumnAccessor; } });
|
|
26
35
|
Object.defineProperty(exports, "RowAccessor", { enumerable: true, get: function () { return ListViewAccessor_1.RowAccessor; } });
|
|
27
36
|
Object.defineProperty(exports, "SelectedRowsChangedEventArgs", { enumerable: true, get: function () { return ListViewAccessor_1.SelectedRowsChangedEventArgs; } });
|
|
28
37
|
Object.defineProperty(exports, "ListViewStateChangedEventArgs", { enumerable: true, get: function () { return ListViewAccessor_1.ListViewStateChangedEventArgs; } });
|
|
29
|
-
Object.defineProperty(exports, "ListViewAccessor", { enumerable: true, get: function () { return ListViewAccessor_1.default; } });
|
|
38
|
+
Object.defineProperty(exports, "ListViewAccessor", { enumerable: true, get: function () { return __importDefault(ListViewAccessor_1).default; } });
|
|
30
39
|
var ListViewAccessorState_1 = require("./common/ListViewAccessorState");
|
|
31
40
|
Object.defineProperty(exports, "ListViewAccessorStateChanges", { enumerable: true, get: function () { return ListViewAccessorState_1.ListViewAccessorStateChanges; } });
|
|
32
41
|
//# sourceMappingURL=index.js.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@microsoft/sp-listview-extensibility",
|
|
3
|
-
"version": "1.15.0
|
|
3
|
+
"version": "1.15.0",
|
|
4
4
|
"description": "SharePoint Framework developer support for customizing the list view",
|
|
5
5
|
"license": "UNLICENSED",
|
|
6
6
|
"main": "lib-commonjs/index.js",
|
|
@@ -10,11 +10,11 @@
|
|
|
10
10
|
"tsdocFlavor": "AEDoc"
|
|
11
11
|
},
|
|
12
12
|
"dependencies": {
|
|
13
|
-
"@microsoft/sp-core-library": "1.15.0
|
|
14
|
-
"@microsoft/sp-extension-base": "1.15.0
|
|
15
|
-
"@microsoft/sp-module-interfaces": "1.15.0
|
|
16
|
-
"@microsoft/sp-page-context": "1.15.0
|
|
17
|
-
"tslib": "
|
|
13
|
+
"@microsoft/sp-core-library": "1.15.0",
|
|
14
|
+
"@microsoft/sp-extension-base": "1.15.0",
|
|
15
|
+
"@microsoft/sp-module-interfaces": "1.15.0",
|
|
16
|
+
"@microsoft/sp-page-context": "1.15.0",
|
|
17
|
+
"tslib": "2.3.1"
|
|
18
18
|
},
|
|
19
19
|
"scripts": {},
|
|
20
20
|
"engines": {
|
|
@@ -1 +0,0 @@
|
|
|
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={}))}})});
|