@microsoft/sp-listview-extensibility 1.14.0 → 1.15.0-rc.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 +6 -6
- package/dist/index-internal-beta.d.ts +152 -2
- package/dist/index-internal-public.d.ts +152 -2
- package/dist/index-internal.d.ts +152 -2
- package/dist/sp-listview-extensibility_none_f3588362212b47a21f78.js +1 -0
- package/dist/tsdoc-metadata.json +1 -1
- package/lib-commonjs/commandSet/Command.js +2 -2
- package/lib-commonjs/commandSet/ListViewCommandSetContext.js +1 -2
- package/lib-commonjs/common/ListViewAccessor.js +1 -1
- package/lib-commonjs/fieldCustomizer/BaseFieldCustomizer.js +1 -1
- package/lib-commonjs/formCustomizer/BaseFormCustomizer.js +127 -0
- package/lib-commonjs/formCustomizer/FormActionEventArgs.js +31 -0
- package/lib-commonjs/formCustomizer/FormCustomizerContext.js +87 -0
- package/lib-commonjs/formCustomizer/FormCustomizerHost.js +52 -0
- package/lib-commonjs/index.js +20 -7
- package/package.json +7 -7
- package/dist/sp-listview-extensibility_none_a53ef3010444ac520245.js +0 -1
- package/lib-commonjs/common/KillSwitches.js +0 -11
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"id": "d37b65ee-c7d8-4570-bc74-2b294ff3b380",
|
|
3
3
|
"alias": "SPListViewExtensibility",
|
|
4
4
|
"componentType": "Library",
|
|
5
|
-
"version": "1.
|
|
5
|
+
"version": "1.15.0",
|
|
6
6
|
"manifestVersion": 2,
|
|
7
7
|
"loaderConfig": {
|
|
8
8
|
"internalModuleBaseUrls": [
|
|
@@ -12,27 +12,27 @@
|
|
|
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",
|
|
24
24
|
"id": "7263c7d0-1d6a-45ec-8d85-d4d1d234171b",
|
|
25
|
-
"version": "1.
|
|
25
|
+
"version": "1.15.0"
|
|
26
26
|
},
|
|
27
27
|
"@microsoft/sp-page-context": {
|
|
28
28
|
"type": "component",
|
|
29
29
|
"id": "1c4541f7-5c31-41aa-9fa8-fbc9dc14c0a8",
|
|
30
|
-
"version": "1.
|
|
30
|
+
"version": "1.15.0"
|
|
31
31
|
},
|
|
32
32
|
"@microsoft/sp-extension-base": {
|
|
33
33
|
"type": "component",
|
|
34
34
|
"id": "0773bd53-a69e-4293-87e6-ba80ea4d614b",
|
|
35
|
-
"version": "1.
|
|
35
|
+
"version": "1.15.0"
|
|
36
36
|
}
|
|
37
37
|
}
|
|
38
38
|
}
|
|
@@ -6,6 +6,7 @@
|
|
|
6
6
|
|
|
7
7
|
import { BaseExtension } from '@microsoft/sp-extension-base';
|
|
8
8
|
import { ExtensionContext } from '@microsoft/sp-extension-base';
|
|
9
|
+
import { FormDisplayMode } from '@microsoft/sp-core-library';
|
|
9
10
|
import { Guid } from '@microsoft/sp-core-library';
|
|
10
11
|
import { ICommandSetExtensionManifest } from '@microsoft/sp-module-interfaces';
|
|
11
12
|
import { IDisposable } from '@microsoft/sp-core-library';
|
|
@@ -31,6 +32,61 @@ export declare abstract class BaseFieldCustomizer<TProperties> extends BaseExten
|
|
|
31
32
|
onDisposeCell(event: IFieldCustomizerCellEventParameters): void;
|
|
32
33
|
}
|
|
33
34
|
|
|
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.
|
|
38
|
+
* @public
|
|
39
|
+
*/
|
|
40
|
+
export declare abstract class BaseFormCustomizer<TProperties> extends BaseExtension<TProperties> {
|
|
41
|
+
/* Excluded from this release type: _formActionEventName */
|
|
42
|
+
/**
|
|
43
|
+
* {@inheritDoc @microsoft/sp-extension-base#BaseExtension.context}
|
|
44
|
+
*/
|
|
45
|
+
readonly context: FormCustomizerContext;
|
|
46
|
+
private readonly _formActionEvent;
|
|
47
|
+
private _displayMode;
|
|
48
|
+
/**
|
|
49
|
+
* This property is a pointer to the root DOM element of the form. This is a DIV element and contains the whole
|
|
50
|
+
* DOM subtree of the form.
|
|
51
|
+
*
|
|
52
|
+
* @readonly
|
|
53
|
+
*/
|
|
54
|
+
protected get domElement(): HTMLElement;
|
|
55
|
+
/**
|
|
56
|
+
* Display mode of the form: Edit, Display or New.
|
|
57
|
+
*
|
|
58
|
+
* @readonly
|
|
59
|
+
*/
|
|
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 */
|
|
75
|
+
/**
|
|
76
|
+
* This API is called to render the form. There is no base implementation of this API and the form is
|
|
77
|
+
* required to override this API.
|
|
78
|
+
*/
|
|
79
|
+
protected abstract render(): void;
|
|
80
|
+
/**
|
|
81
|
+
* Call this method after the form has been saved to inform the application that the form has been saved.
|
|
82
|
+
*/
|
|
83
|
+
protected formSaved(): void;
|
|
84
|
+
/**
|
|
85
|
+
* Call this method after the form has been closed/cancelled to inform the application that the form has been closed.
|
|
86
|
+
*/
|
|
87
|
+
protected formClosed(): void;
|
|
88
|
+
}
|
|
89
|
+
|
|
34
90
|
/**
|
|
35
91
|
* This is the base class that third parties should extend when implementing
|
|
36
92
|
* a client-side extension that provides a command set for a SharePoint list view.
|
|
@@ -111,9 +167,9 @@ export declare abstract class ColumnAccessor {
|
|
|
111
167
|
*
|
|
112
168
|
* @remarks
|
|
113
169
|
* The BaseListViewCommandSet extension type exposes generalized commands that may be displayed as tool bar buttons,
|
|
114
|
-
* context menu items, etc. These commands are initially defined in the extension
|
|
170
|
+
* context menu items, etc. These commands are initially defined in the extension's manifest file. At runtime, the
|
|
115
171
|
* corresponding Command object can be obtained by calling {@link BaseListViewCommandSet.tryGetCommand}.
|
|
116
|
-
* The command
|
|
172
|
+
* The command's appearance can be customized by assigning its properties, for example to hide a command that is not
|
|
117
173
|
* contextually relevant, or to pluralize the title based on the number of selected items.
|
|
118
174
|
* @public
|
|
119
175
|
*/
|
|
@@ -183,6 +239,48 @@ export declare class FieldCustomizerContext extends ExtensionContext {
|
|
|
183
239
|
get field(): SPField;
|
|
184
240
|
}
|
|
185
241
|
|
|
242
|
+
/* Excluded from this release type: FormAction */
|
|
243
|
+
|
|
244
|
+
/* Excluded from this release type: FormActionEventArgs */
|
|
245
|
+
|
|
246
|
+
/**
|
|
247
|
+
* Form Customizer Context. This object contains contxtual services and properties for the form.
|
|
248
|
+
*
|
|
249
|
+
* @public
|
|
250
|
+
*/
|
|
251
|
+
export declare class FormCustomizerContext extends ExtensionContext implements IFormCustomizerContext {
|
|
252
|
+
private _list;
|
|
253
|
+
private _contentType;
|
|
254
|
+
private _folderInfo;
|
|
255
|
+
private _itemId;
|
|
256
|
+
private _domElement;
|
|
257
|
+
private _formCustomizerHost;
|
|
258
|
+
constructor(extensionContextParameters: _IExtensionContextParameters, formCustomizerContextParameters: _IFormCustomizerContextParameters);
|
|
259
|
+
/**
|
|
260
|
+
* The list associated with the form.
|
|
261
|
+
*/
|
|
262
|
+
get list(): IList;
|
|
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
|
+
*/
|
|
278
|
+
get domElement(): HTMLElement;
|
|
279
|
+
/* Excluded from this release type: _host */
|
|
280
|
+
}
|
|
281
|
+
|
|
282
|
+
/* Excluded from this release type: FormCustomizerHost */
|
|
283
|
+
|
|
186
284
|
/**
|
|
187
285
|
* Provides information about the state of a column in the list view
|
|
188
286
|
*
|
|
@@ -227,6 +325,26 @@ export declare interface IColumn {
|
|
|
227
325
|
readonly clientSideComponentProperties: string;
|
|
228
326
|
}
|
|
229
327
|
|
|
328
|
+
/**
|
|
329
|
+
* Provides information about the content type
|
|
330
|
+
*
|
|
331
|
+
* @public
|
|
332
|
+
*/
|
|
333
|
+
export declare interface IContentType {
|
|
334
|
+
/**
|
|
335
|
+
* Content type string id
|
|
336
|
+
*/
|
|
337
|
+
readonly id: string;
|
|
338
|
+
/**
|
|
339
|
+
* Content type name
|
|
340
|
+
*/
|
|
341
|
+
readonly name: string;
|
|
342
|
+
/**
|
|
343
|
+
* Content type schema XML
|
|
344
|
+
*/
|
|
345
|
+
readonly schemaXml: string | undefined;
|
|
346
|
+
}
|
|
347
|
+
|
|
230
348
|
/* Excluded from this release type: _IExtensionContextParameters */
|
|
231
349
|
|
|
232
350
|
/**
|
|
@@ -289,6 +407,38 @@ export declare interface IFolderInfo {
|
|
|
289
407
|
readonly folderPath: string;
|
|
290
408
|
}
|
|
291
409
|
|
|
410
|
+
/**
|
|
411
|
+
* FormCustomizerContext-specific properties.
|
|
412
|
+
*
|
|
413
|
+
* @public
|
|
414
|
+
*/
|
|
415
|
+
export declare interface IFormCustomizerContext {
|
|
416
|
+
/**
|
|
417
|
+
* The list associated with the form.
|
|
418
|
+
*/
|
|
419
|
+
readonly list: IList;
|
|
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
|
+
*/
|
|
435
|
+
readonly domElement: HTMLElement;
|
|
436
|
+
}
|
|
437
|
+
|
|
438
|
+
/* Excluded from this release type: _IFormCustomizerContextParameters */
|
|
439
|
+
|
|
440
|
+
/* Excluded from this release type: IFormCustomizerHostParameters */
|
|
441
|
+
|
|
292
442
|
/**
|
|
293
443
|
* Provides information about the list rendered by the ListView.
|
|
294
444
|
*
|
|
@@ -6,6 +6,7 @@
|
|
|
6
6
|
|
|
7
7
|
import { BaseExtension } from '@microsoft/sp-extension-base';
|
|
8
8
|
import { ExtensionContext } from '@microsoft/sp-extension-base';
|
|
9
|
+
import { FormDisplayMode } from '@microsoft/sp-core-library';
|
|
9
10
|
import { Guid } from '@microsoft/sp-core-library';
|
|
10
11
|
import { ICommandSetExtensionManifest } from '@microsoft/sp-module-interfaces';
|
|
11
12
|
import { IDisposable } from '@microsoft/sp-core-library';
|
|
@@ -31,6 +32,61 @@ export declare abstract class BaseFieldCustomizer<TProperties> extends BaseExten
|
|
|
31
32
|
onDisposeCell(event: IFieldCustomizerCellEventParameters): void;
|
|
32
33
|
}
|
|
33
34
|
|
|
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.
|
|
38
|
+
* @public
|
|
39
|
+
*/
|
|
40
|
+
export declare abstract class BaseFormCustomizer<TProperties> extends BaseExtension<TProperties> {
|
|
41
|
+
/* Excluded from this release type: _formActionEventName */
|
|
42
|
+
/**
|
|
43
|
+
* {@inheritDoc @microsoft/sp-extension-base#BaseExtension.context}
|
|
44
|
+
*/
|
|
45
|
+
readonly context: FormCustomizerContext;
|
|
46
|
+
private readonly _formActionEvent;
|
|
47
|
+
private _displayMode;
|
|
48
|
+
/**
|
|
49
|
+
* This property is a pointer to the root DOM element of the form. This is a DIV element and contains the whole
|
|
50
|
+
* DOM subtree of the form.
|
|
51
|
+
*
|
|
52
|
+
* @readonly
|
|
53
|
+
*/
|
|
54
|
+
protected get domElement(): HTMLElement;
|
|
55
|
+
/**
|
|
56
|
+
* Display mode of the form: Edit, Display or New.
|
|
57
|
+
*
|
|
58
|
+
* @readonly
|
|
59
|
+
*/
|
|
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 */
|
|
75
|
+
/**
|
|
76
|
+
* This API is called to render the form. There is no base implementation of this API and the form is
|
|
77
|
+
* required to override this API.
|
|
78
|
+
*/
|
|
79
|
+
protected abstract render(): void;
|
|
80
|
+
/**
|
|
81
|
+
* Call this method after the form has been saved to inform the application that the form has been saved.
|
|
82
|
+
*/
|
|
83
|
+
protected formSaved(): void;
|
|
84
|
+
/**
|
|
85
|
+
* Call this method after the form has been closed/cancelled to inform the application that the form has been closed.
|
|
86
|
+
*/
|
|
87
|
+
protected formClosed(): void;
|
|
88
|
+
}
|
|
89
|
+
|
|
34
90
|
/**
|
|
35
91
|
* This is the base class that third parties should extend when implementing
|
|
36
92
|
* a client-side extension that provides a command set for a SharePoint list view.
|
|
@@ -111,9 +167,9 @@ export declare abstract class ColumnAccessor {
|
|
|
111
167
|
*
|
|
112
168
|
* @remarks
|
|
113
169
|
* The BaseListViewCommandSet extension type exposes generalized commands that may be displayed as tool bar buttons,
|
|
114
|
-
* context menu items, etc. These commands are initially defined in the extension
|
|
170
|
+
* context menu items, etc. These commands are initially defined in the extension's manifest file. At runtime, the
|
|
115
171
|
* corresponding Command object can be obtained by calling {@link BaseListViewCommandSet.tryGetCommand}.
|
|
116
|
-
* The command
|
|
172
|
+
* The command's appearance can be customized by assigning its properties, for example to hide a command that is not
|
|
117
173
|
* contextually relevant, or to pluralize the title based on the number of selected items.
|
|
118
174
|
* @public
|
|
119
175
|
*/
|
|
@@ -183,6 +239,48 @@ export declare class FieldCustomizerContext extends ExtensionContext {
|
|
|
183
239
|
get field(): SPField;
|
|
184
240
|
}
|
|
185
241
|
|
|
242
|
+
/* Excluded from this release type: FormAction */
|
|
243
|
+
|
|
244
|
+
/* Excluded from this release type: FormActionEventArgs */
|
|
245
|
+
|
|
246
|
+
/**
|
|
247
|
+
* Form Customizer Context. This object contains contxtual services and properties for the form.
|
|
248
|
+
*
|
|
249
|
+
* @public
|
|
250
|
+
*/
|
|
251
|
+
export declare class FormCustomizerContext extends ExtensionContext implements IFormCustomizerContext {
|
|
252
|
+
private _list;
|
|
253
|
+
private _contentType;
|
|
254
|
+
private _folderInfo;
|
|
255
|
+
private _itemId;
|
|
256
|
+
private _domElement;
|
|
257
|
+
private _formCustomizerHost;
|
|
258
|
+
constructor(extensionContextParameters: _IExtensionContextParameters, formCustomizerContextParameters: _IFormCustomizerContextParameters);
|
|
259
|
+
/**
|
|
260
|
+
* The list associated with the form.
|
|
261
|
+
*/
|
|
262
|
+
get list(): IList;
|
|
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
|
+
*/
|
|
278
|
+
get domElement(): HTMLElement;
|
|
279
|
+
/* Excluded from this release type: _host */
|
|
280
|
+
}
|
|
281
|
+
|
|
282
|
+
/* Excluded from this release type: FormCustomizerHost */
|
|
283
|
+
|
|
186
284
|
/**
|
|
187
285
|
* Provides information about the state of a column in the list view
|
|
188
286
|
*
|
|
@@ -227,6 +325,26 @@ export declare interface IColumn {
|
|
|
227
325
|
readonly clientSideComponentProperties: string;
|
|
228
326
|
}
|
|
229
327
|
|
|
328
|
+
/**
|
|
329
|
+
* Provides information about the content type
|
|
330
|
+
*
|
|
331
|
+
* @public
|
|
332
|
+
*/
|
|
333
|
+
export declare interface IContentType {
|
|
334
|
+
/**
|
|
335
|
+
* Content type string id
|
|
336
|
+
*/
|
|
337
|
+
readonly id: string;
|
|
338
|
+
/**
|
|
339
|
+
* Content type name
|
|
340
|
+
*/
|
|
341
|
+
readonly name: string;
|
|
342
|
+
/**
|
|
343
|
+
* Content type schema XML
|
|
344
|
+
*/
|
|
345
|
+
readonly schemaXml: string | undefined;
|
|
346
|
+
}
|
|
347
|
+
|
|
230
348
|
/* Excluded from this release type: _IExtensionContextParameters */
|
|
231
349
|
|
|
232
350
|
/**
|
|
@@ -289,6 +407,38 @@ export declare interface IFolderInfo {
|
|
|
289
407
|
readonly folderPath: string;
|
|
290
408
|
}
|
|
291
409
|
|
|
410
|
+
/**
|
|
411
|
+
* FormCustomizerContext-specific properties.
|
|
412
|
+
*
|
|
413
|
+
* @public
|
|
414
|
+
*/
|
|
415
|
+
export declare interface IFormCustomizerContext {
|
|
416
|
+
/**
|
|
417
|
+
* The list associated with the form.
|
|
418
|
+
*/
|
|
419
|
+
readonly list: IList;
|
|
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
|
+
*/
|
|
435
|
+
readonly domElement: HTMLElement;
|
|
436
|
+
}
|
|
437
|
+
|
|
438
|
+
/* Excluded from this release type: _IFormCustomizerContextParameters */
|
|
439
|
+
|
|
440
|
+
/* Excluded from this release type: IFormCustomizerHostParameters */
|
|
441
|
+
|
|
292
442
|
/**
|
|
293
443
|
* Provides information about the list rendered by the ListView.
|
|
294
444
|
*
|
package/dist/index-internal.d.ts
CHANGED
|
@@ -6,6 +6,7 @@
|
|
|
6
6
|
|
|
7
7
|
import { BaseExtension } from '@microsoft/sp-extension-base';
|
|
8
8
|
import { ExtensionContext } from '@microsoft/sp-extension-base';
|
|
9
|
+
import { FormDisplayMode } from '@microsoft/sp-core-library';
|
|
9
10
|
import { Guid } from '@microsoft/sp-core-library';
|
|
10
11
|
import { ICommandSetExtensionManifest } from '@microsoft/sp-module-interfaces';
|
|
11
12
|
import { IDisposable } from '@microsoft/sp-core-library';
|
|
@@ -31,6 +32,61 @@ export declare abstract class BaseFieldCustomizer<TProperties> extends BaseExten
|
|
|
31
32
|
onDisposeCell(event: IFieldCustomizerCellEventParameters): void;
|
|
32
33
|
}
|
|
33
34
|
|
|
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.
|
|
38
|
+
* @public
|
|
39
|
+
*/
|
|
40
|
+
export declare abstract class BaseFormCustomizer<TProperties> extends BaseExtension<TProperties> {
|
|
41
|
+
/* Excluded from this release type: _formActionEventName */
|
|
42
|
+
/**
|
|
43
|
+
* {@inheritDoc @microsoft/sp-extension-base#BaseExtension.context}
|
|
44
|
+
*/
|
|
45
|
+
readonly context: FormCustomizerContext;
|
|
46
|
+
private readonly _formActionEvent;
|
|
47
|
+
private _displayMode;
|
|
48
|
+
/**
|
|
49
|
+
* This property is a pointer to the root DOM element of the form. This is a DIV element and contains the whole
|
|
50
|
+
* DOM subtree of the form.
|
|
51
|
+
*
|
|
52
|
+
* @readonly
|
|
53
|
+
*/
|
|
54
|
+
protected get domElement(): HTMLElement;
|
|
55
|
+
/**
|
|
56
|
+
* Display mode of the form: Edit, Display or New.
|
|
57
|
+
*
|
|
58
|
+
* @readonly
|
|
59
|
+
*/
|
|
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 */
|
|
75
|
+
/**
|
|
76
|
+
* This API is called to render the form. There is no base implementation of this API and the form is
|
|
77
|
+
* required to override this API.
|
|
78
|
+
*/
|
|
79
|
+
protected abstract render(): void;
|
|
80
|
+
/**
|
|
81
|
+
* Call this method after the form has been saved to inform the application that the form has been saved.
|
|
82
|
+
*/
|
|
83
|
+
protected formSaved(): void;
|
|
84
|
+
/**
|
|
85
|
+
* Call this method after the form has been closed/cancelled to inform the application that the form has been closed.
|
|
86
|
+
*/
|
|
87
|
+
protected formClosed(): void;
|
|
88
|
+
}
|
|
89
|
+
|
|
34
90
|
/**
|
|
35
91
|
* This is the base class that third parties should extend when implementing
|
|
36
92
|
* a client-side extension that provides a command set for a SharePoint list view.
|
|
@@ -111,9 +167,9 @@ export declare abstract class ColumnAccessor {
|
|
|
111
167
|
*
|
|
112
168
|
* @remarks
|
|
113
169
|
* The BaseListViewCommandSet extension type exposes generalized commands that may be displayed as tool bar buttons,
|
|
114
|
-
* context menu items, etc. These commands are initially defined in the extension
|
|
170
|
+
* context menu items, etc. These commands are initially defined in the extension's manifest file. At runtime, the
|
|
115
171
|
* corresponding Command object can be obtained by calling {@link BaseListViewCommandSet.tryGetCommand}.
|
|
116
|
-
* The command
|
|
172
|
+
* The command's appearance can be customized by assigning its properties, for example to hide a command that is not
|
|
117
173
|
* contextually relevant, or to pluralize the title based on the number of selected items.
|
|
118
174
|
* @public
|
|
119
175
|
*/
|
|
@@ -183,6 +239,48 @@ export declare class FieldCustomizerContext extends ExtensionContext {
|
|
|
183
239
|
get field(): SPField;
|
|
184
240
|
}
|
|
185
241
|
|
|
242
|
+
/* Excluded from this release type: FormAction */
|
|
243
|
+
|
|
244
|
+
/* Excluded from this release type: FormActionEventArgs */
|
|
245
|
+
|
|
246
|
+
/**
|
|
247
|
+
* Form Customizer Context. This object contains contxtual services and properties for the form.
|
|
248
|
+
*
|
|
249
|
+
* @public
|
|
250
|
+
*/
|
|
251
|
+
export declare class FormCustomizerContext extends ExtensionContext implements IFormCustomizerContext {
|
|
252
|
+
private _list;
|
|
253
|
+
private _contentType;
|
|
254
|
+
private _folderInfo;
|
|
255
|
+
private _itemId;
|
|
256
|
+
private _domElement;
|
|
257
|
+
private _formCustomizerHost;
|
|
258
|
+
constructor(extensionContextParameters: _IExtensionContextParameters, formCustomizerContextParameters: _IFormCustomizerContextParameters);
|
|
259
|
+
/**
|
|
260
|
+
* The list associated with the form.
|
|
261
|
+
*/
|
|
262
|
+
get list(): IList;
|
|
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
|
+
*/
|
|
278
|
+
get domElement(): HTMLElement;
|
|
279
|
+
/* Excluded from this release type: _host */
|
|
280
|
+
}
|
|
281
|
+
|
|
282
|
+
/* Excluded from this release type: FormCustomizerHost */
|
|
283
|
+
|
|
186
284
|
/**
|
|
187
285
|
* Provides information about the state of a column in the list view
|
|
188
286
|
*
|
|
@@ -227,6 +325,26 @@ export declare interface IColumn {
|
|
|
227
325
|
readonly clientSideComponentProperties: string;
|
|
228
326
|
}
|
|
229
327
|
|
|
328
|
+
/**
|
|
329
|
+
* Provides information about the content type
|
|
330
|
+
*
|
|
331
|
+
* @public
|
|
332
|
+
*/
|
|
333
|
+
export declare interface IContentType {
|
|
334
|
+
/**
|
|
335
|
+
* Content type string id
|
|
336
|
+
*/
|
|
337
|
+
readonly id: string;
|
|
338
|
+
/**
|
|
339
|
+
* Content type name
|
|
340
|
+
*/
|
|
341
|
+
readonly name: string;
|
|
342
|
+
/**
|
|
343
|
+
* Content type schema XML
|
|
344
|
+
*/
|
|
345
|
+
readonly schemaXml: string | undefined;
|
|
346
|
+
}
|
|
347
|
+
|
|
230
348
|
/* Excluded from this release type: _IExtensionContextParameters */
|
|
231
349
|
|
|
232
350
|
/**
|
|
@@ -289,6 +407,38 @@ export declare interface IFolderInfo {
|
|
|
289
407
|
readonly folderPath: string;
|
|
290
408
|
}
|
|
291
409
|
|
|
410
|
+
/**
|
|
411
|
+
* FormCustomizerContext-specific properties.
|
|
412
|
+
*
|
|
413
|
+
* @public
|
|
414
|
+
*/
|
|
415
|
+
export declare interface IFormCustomizerContext {
|
|
416
|
+
/**
|
|
417
|
+
* The list associated with the form.
|
|
418
|
+
*/
|
|
419
|
+
readonly list: IList;
|
|
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
|
+
*/
|
|
435
|
+
readonly domElement: HTMLElement;
|
|
436
|
+
}
|
|
437
|
+
|
|
438
|
+
/* Excluded from this release type: _IFormCustomizerContextParameters */
|
|
439
|
+
|
|
440
|
+
/* Excluded from this release type: IFormCustomizerHostParameters */
|
|
441
|
+
|
|
292
442
|
/**
|
|
293
443
|
* Provides information about the list rendered by the ListView.
|
|
294
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
|
@@ -5,9 +5,9 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
5
5
|
*
|
|
6
6
|
* @remarks
|
|
7
7
|
* The BaseListViewCommandSet extension type exposes generalized commands that may be displayed as tool bar buttons,
|
|
8
|
-
* context menu items, etc. These commands are initially defined in the extension
|
|
8
|
+
* context menu items, etc. These commands are initially defined in the extension's manifest file. At runtime, the
|
|
9
9
|
* corresponding Command object can be obtained by calling {@link BaseListViewCommandSet.tryGetCommand}.
|
|
10
|
-
* The command
|
|
10
|
+
* The command's appearance can be customized by assigning its properties, for example to hide a command that is not
|
|
11
11
|
* contextually relevant, or to pluralize the title based on the number of selected items.
|
|
12
12
|
* @public
|
|
13
13
|
*/
|
|
@@ -3,7 +3,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
var tslib_1 = require("tslib");
|
|
4
4
|
var sp_extension_base_1 = require("@microsoft/sp-extension-base");
|
|
5
5
|
var sp_core_library_1 = require("@microsoft/sp-core-library");
|
|
6
|
-
var KillSwitches_1 = require("../common/KillSwitches");
|
|
7
6
|
var sp_page_context_1 = require("@microsoft/sp-page-context");
|
|
8
7
|
/**
|
|
9
8
|
* This object provides contextual information for BaseListViewCommandSet.
|
|
@@ -40,7 +39,7 @@ var ListViewCommandSetContext = /** @class */ (function (_super) {
|
|
|
40
39
|
}
|
|
41
40
|
}
|
|
42
41
|
// updating title and ariaLabel based on UI culture
|
|
43
|
-
if (
|
|
42
|
+
if (!!_this._commandArray.length) {
|
|
44
43
|
_this.serviceScope.whenFinished(function () {
|
|
45
44
|
var pageContext = _this.serviceScope.consume(sp_page_context_1.PageContext.serviceKey);
|
|
46
45
|
var currentUICulture = pageContext.cultureInfo.currentUICultureName;
|
|
@@ -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
|
/*
|
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
var tslib_1 = require("tslib");
|
|
4
|
+
var sp_extension_base_1 = require("@microsoft/sp-extension-base");
|
|
5
|
+
var sp_core_library_1 = require("@microsoft/sp-core-library");
|
|
6
|
+
var FormActionEventArgs_1 = require("./FormActionEventArgs");
|
|
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.
|
|
10
|
+
* @public
|
|
11
|
+
*/
|
|
12
|
+
var BaseFormCustomizer = /** @class */ (function (_super) {
|
|
13
|
+
tslib_1.__extends(BaseFormCustomizer, _super);
|
|
14
|
+
function BaseFormCustomizer() {
|
|
15
|
+
var _this = _super !== null && _super.apply(this, arguments) || this;
|
|
16
|
+
_this._formActionEvent = new sp_core_library_1.SPEvent(BaseFormCustomizer._formActionEventName);
|
|
17
|
+
return _this;
|
|
18
|
+
}
|
|
19
|
+
Object.defineProperty(BaseFormCustomizer.prototype, "domElement", {
|
|
20
|
+
// Readonly protected properties. To change these to readonly once TypeScript supports that feature.
|
|
21
|
+
/**
|
|
22
|
+
* This property is a pointer to the root DOM element of the form. This is a DIV element and contains the whole
|
|
23
|
+
* DOM subtree of the form.
|
|
24
|
+
*
|
|
25
|
+
* @readonly
|
|
26
|
+
*/
|
|
27
|
+
get: function () {
|
|
28
|
+
return this.context.domElement;
|
|
29
|
+
},
|
|
30
|
+
enumerable: false,
|
|
31
|
+
configurable: true
|
|
32
|
+
});
|
|
33
|
+
Object.defineProperty(BaseFormCustomizer.prototype, "displayMode", {
|
|
34
|
+
/**
|
|
35
|
+
* Display mode of the form: Edit, Display or New.
|
|
36
|
+
*
|
|
37
|
+
* @readonly
|
|
38
|
+
*/
|
|
39
|
+
get: function () {
|
|
40
|
+
return this._displayMode;
|
|
41
|
+
},
|
|
42
|
+
enumerable: false,
|
|
43
|
+
configurable: true
|
|
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
|
+
};
|
|
106
|
+
/**
|
|
107
|
+
* Call this method after the form has been saved to inform the application that the form has been saved.
|
|
108
|
+
*/
|
|
109
|
+
BaseFormCustomizer.prototype.formSaved = function () {
|
|
110
|
+
this.context._host.onSave();
|
|
111
|
+
};
|
|
112
|
+
/**
|
|
113
|
+
* Call this method after the form has been closed/cancelled to inform the application that the form has been closed.
|
|
114
|
+
*/
|
|
115
|
+
BaseFormCustomizer.prototype.formClosed = function () {
|
|
116
|
+
this.context._host.onClose();
|
|
117
|
+
};
|
|
118
|
+
/**
|
|
119
|
+
* SPEvent name when the form action should be performed.
|
|
120
|
+
*
|
|
121
|
+
* @internal
|
|
122
|
+
*/
|
|
123
|
+
BaseFormCustomizer._formActionEventName = 'formCustomizer.formAction';
|
|
124
|
+
return BaseFormCustomizer;
|
|
125
|
+
}(sp_extension_base_1.BaseExtension));
|
|
126
|
+
exports.default = BaseFormCustomizer;
|
|
127
|
+
//# sourceMappingURL=BaseFormCustomizer.js.map
|
|
@@ -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
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
var tslib_1 = require("tslib");
|
|
4
|
+
var sp_extension_base_1 = require("@microsoft/sp-extension-base");
|
|
5
|
+
/**
|
|
6
|
+
* Form Customizer Context. This object contains contxtual services and properties for the form.
|
|
7
|
+
*
|
|
8
|
+
* @public
|
|
9
|
+
*/
|
|
10
|
+
var FormCustomizerContext = /** @class */ (function (_super) {
|
|
11
|
+
tslib_1.__extends(FormCustomizerContext, _super);
|
|
12
|
+
function FormCustomizerContext(extensionContextParameters, formCustomizerContextParameters) {
|
|
13
|
+
var _this = _super.call(this, extensionContextParameters) || this;
|
|
14
|
+
_this._list = formCustomizerContextParameters.list;
|
|
15
|
+
_this._contentType = formCustomizerContextParameters.contentType;
|
|
16
|
+
_this._folderInfo = formCustomizerContextParameters.folderInfo;
|
|
17
|
+
_this._itemId = formCustomizerContextParameters.itemId;
|
|
18
|
+
_this._domElement = formCustomizerContextParameters.domElement;
|
|
19
|
+
_this._formCustomizerHost = formCustomizerContextParameters.host;
|
|
20
|
+
return _this;
|
|
21
|
+
}
|
|
22
|
+
Object.defineProperty(FormCustomizerContext.prototype, "list", {
|
|
23
|
+
/**
|
|
24
|
+
* The list associated with the form.
|
|
25
|
+
*/
|
|
26
|
+
get: function () {
|
|
27
|
+
return this._list;
|
|
28
|
+
},
|
|
29
|
+
enumerable: false,
|
|
30
|
+
configurable: true
|
|
31
|
+
});
|
|
32
|
+
Object.defineProperty(FormCustomizerContext.prototype, "contentType", {
|
|
33
|
+
/**
|
|
34
|
+
* The content type associated with the form.
|
|
35
|
+
*/
|
|
36
|
+
get: function () {
|
|
37
|
+
return this._contentType;
|
|
38
|
+
},
|
|
39
|
+
enumerable: false,
|
|
40
|
+
configurable: true
|
|
41
|
+
});
|
|
42
|
+
Object.defineProperty(FormCustomizerContext.prototype, "folderInfo", {
|
|
43
|
+
/**
|
|
44
|
+
* The folder information where the item is located/should be created.
|
|
45
|
+
*/
|
|
46
|
+
get: function () {
|
|
47
|
+
return this._folderInfo;
|
|
48
|
+
},
|
|
49
|
+
enumerable: false,
|
|
50
|
+
configurable: true
|
|
51
|
+
});
|
|
52
|
+
Object.defineProperty(FormCustomizerContext.prototype, "itemId", {
|
|
53
|
+
/**
|
|
54
|
+
* The item id of the item being edited or viewed.
|
|
55
|
+
*/
|
|
56
|
+
get: function () {
|
|
57
|
+
return this._itemId;
|
|
58
|
+
},
|
|
59
|
+
enumerable: false,
|
|
60
|
+
configurable: true
|
|
61
|
+
});
|
|
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
|
+
*/
|
|
66
|
+
get: function () {
|
|
67
|
+
return this._domElement;
|
|
68
|
+
},
|
|
69
|
+
enumerable: false,
|
|
70
|
+
configurable: true
|
|
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
|
+
});
|
|
84
|
+
return FormCustomizerContext;
|
|
85
|
+
}(sp_extension_base_1.ExtensionContext));
|
|
86
|
+
exports.default = FormCustomizerContext;
|
|
87
|
+
//# sourceMappingURL=FormCustomizerContext.js.map
|
|
@@ -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,25 +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; } });
|
|
22
|
+
var BaseFormCustomizer_1 = require("./formCustomizer/BaseFormCustomizer");
|
|
23
|
+
Object.defineProperty(exports, "BaseFormCustomizer", { enumerable: true, get: function () { return __importDefault(BaseFormCustomizer_1).default; } });
|
|
24
|
+
var FormCustomizerContext_1 = require("./formCustomizer/FormCustomizerContext");
|
|
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; } });
|
|
18
31
|
var ListItemAccessor_1 = require("./common/ListItemAccessor");
|
|
19
|
-
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; } });
|
|
20
33
|
var ListViewAccessor_1 = require("./common/ListViewAccessor");
|
|
21
34
|
Object.defineProperty(exports, "ColumnAccessor", { enumerable: true, get: function () { return ListViewAccessor_1.ColumnAccessor; } });
|
|
22
35
|
Object.defineProperty(exports, "RowAccessor", { enumerable: true, get: function () { return ListViewAccessor_1.RowAccessor; } });
|
|
23
36
|
Object.defineProperty(exports, "SelectedRowsChangedEventArgs", { enumerable: true, get: function () { return ListViewAccessor_1.SelectedRowsChangedEventArgs; } });
|
|
24
37
|
Object.defineProperty(exports, "ListViewStateChangedEventArgs", { enumerable: true, get: function () { return ListViewAccessor_1.ListViewStateChangedEventArgs; } });
|
|
25
|
-
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; } });
|
|
26
39
|
var ListViewAccessorState_1 = require("./common/ListViewAccessorState");
|
|
27
40
|
Object.defineProperty(exports, "ListViewAccessorStateChanges", { enumerable: true, get: function () { return ListViewAccessorState_1.ListViewAccessorStateChanges; } });
|
|
28
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.
|
|
3
|
+
"version": "1.15.0-rc.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,14 +10,14 @@
|
|
|
10
10
|
"tsdocFlavor": "AEDoc"
|
|
11
11
|
},
|
|
12
12
|
"dependencies": {
|
|
13
|
-
"@microsoft/sp-core-library": "1.
|
|
14
|
-
"@microsoft/sp-extension-base": "1.
|
|
15
|
-
"@microsoft/sp-module-interfaces": "1.
|
|
16
|
-
"@microsoft/sp-page-context": "1.
|
|
17
|
-
"tslib": "
|
|
13
|
+
"@microsoft/sp-core-library": "1.15.0-rc.0",
|
|
14
|
+
"@microsoft/sp-extension-base": "1.15.0-rc.0",
|
|
15
|
+
"@microsoft/sp-module-interfaces": "1.15.0-rc.0",
|
|
16
|
+
"@microsoft/sp-page-context": "1.15.0-rc.0",
|
|
17
|
+
"tslib": "2.3.1"
|
|
18
18
|
},
|
|
19
19
|
"scripts": {},
|
|
20
20
|
"engines": {
|
|
21
|
-
"node": ">=12.13.0 <13.0.0 || >=14.15.0 <15.0.0"
|
|
21
|
+
"node": ">=12.13.0 <13.0.0 || >=14.15.0 <15.0.0 || >=16.13.0 <17.0.0"
|
|
22
22
|
}
|
|
23
23
|
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
define("d37b65ee-c7d8-4570-bc74-2b294ff3b380_1.14.0",["tslib","@microsoft/sp-core-library","@microsoft/sp-page-context","@microsoft/sp-extension-base"],function(n,a,i,r){return function(e){var t={};function n(a){if(t[a])return t[a].exports;var i=t[a]={i:a,l:!1,exports:{}};return e[a].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=e,n.c=t,n.d=function(e,t,a){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:a})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var a=Object.create(null);if(n.r(a),Object.defineProperty(a,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)n.d(a,i,function(t){return e[t]}.bind(null,i));return a},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s="mwqp")}({"17wl":function(e,t){e.exports=n},UWqr:function(e,t){e.exports=a},"X+PM":function(e,t){e.exports=i},ZFc5:function(e,t){e.exports=r},mwqp:function(e,t,n){"use strict";n.r(t),n.d(t,"BaseListViewCommandSet",function(){return s}),n.d(t,"Command",function(){return c}),n.d(t,"ListViewCommandSetContext",function(){return l}),n.d(t,"BaseFieldCustomizer",function(){return f}),n.d(t,"FieldCustomizerContext",function(){return p}),n.d(t,"ListItemAccessor",function(){return m}),n.d(t,"ColumnAccessor",function(){return _}),n.d(t,"RowAccessor",function(){return h}),n.d(t,"SelectedRowsChangedEventArgs",function(){return b}),n.d(t,"ListViewStateChangedEventArgs",function(){return g}),n.d(t,"ListViewAccessor",function(){return v}),n.d(t,"ListViewAccessorStateChanges",function(){return a});var a,i=n("17wl"),r=n("UWqr"),o=n("ZFc5"),s=function(e){function t(){var t=e.call(this)||this;return t._raiseOnChange=void 0,t}return Object(i.__extends)(t,e),t.prototype.tryGetCommand=function(e){return r.Validate.isNonemptyString(e,"id"),this.context._commands.filter(function(t){return t.id===e})[0]},t.prototype.onListViewUpdated=function(e){},t.prototype.onExecute=function(e){},t.prototype.raiseOnChange=function(){this._raiseOnChange&&this._raiseOnChange()},t}(o.BaseExtension),c=function(){},d=n("X+PM"),l=function(e){function t(t,n){var a=e.call(this,t)||this;a._listView=n.listView,a._commandArray=[];for(var i=a.manifest.items,o=0,s=Object.keys(i);o<s.length;o++){var c=s[o];if("command"===i[c].type){var l=i[c].iconImageUrl;l&&!r.UrlUtilities.isDataUrl(l)&&(l=r.UrlUtilities.resolve(l,a.manifest.loaderConfig.internalModuleBaseUrls[0])),a._commandArray.push({id:c,title:i[c].title.default||"",ariaLabel:i[c].ariaLabel?i[c].ariaLabel.default:void 0,iconImageUrl:l,visible:!0,disabled:void 0})}}return!r._SPKillSwitch.isActivated("38c1f92c-5240-42ea-9c8c-8485ae721247")&&a._commandArray.length&&a.serviceScope.whenFinished(function(){var e=a.serviceScope.consume(d.PageContext.serviceKey).cultureInfo.currentUICultureName;a._commandArray.forEach(function(t){var n=i[t.id];t.title=r.Text._getLocalizedString(n.title,e)||"",n.ariaLabel&&(t.ariaLabel=r.Text._getLocalizedString(n.ariaLabel,e))})}),a}return Object(i.__extends)(t,e),Object.defineProperty(t.prototype,"listView",{get:function(){return this._listView},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"_commands",{get:function(){return this._commandArray},enumerable:!1,configurable:!0}),t}(o.ExtensionContext),u=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Object(i.__extends)(t,e),t.prototype.onRenderCell=function(e){var t=""+e.fieldValue;e.fieldValue.innerText=t},t.prototype.onDisposeCell=function(e){},t}(o.BaseExtension),f=u,p=function(e){function t(t,n){var a=e.call(this,t)||this;return a._listView=n.listView,a._field=n.field,a}return Object(i.__extends)(t,e),t.prototype.tryGetListView=function(){return this._listView},Object.defineProperty(t.prototype,"field",{get:function(){return this._field},enumerable:!1,configurable:!0}),t}(o.ExtensionContext),m=function(){},_=function(){},h=function(e){function t(){return e.call(this)||this}return Object(i.__extends)(t,e),t}(m),b=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Object(i.__extends)(t,e),t}(r.SPEventArgs),g=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Object(i.__extends)(t,e),t}(r.SPEventArgs),v=function(){function e(t){this._isDisposed=!1,this._selectedRowsChangedEvent=new r.SPEvent(e._selectedRowsChangedEventName),this._listViewStateChangedEventName=""+e._listViewStateChangedEventName+(t||""),this._listViewStateChangedEvent=new r.SPEvent(this._listViewStateChangedEventName)}return Object.defineProperty(e.prototype,"selectedRowsChangedEvent",{get:function(){return this._selectedRowsChangedEvent},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"listViewStateChangedEvent",{get:function(){return this._listViewStateChangedEvent},enumerable:!1,configurable:!0}),e.prototype.dispose=function(){r._SPEventManager.instance.removeEvent(this._listViewStateChangedEventName),this._isDisposed=!0},Object.defineProperty(e.prototype,"isDisposed",{get:function(){return this._isDisposed},enumerable:!1,configurable:!0}),e._selectedRowsChangedEventName="listView.selectedRowsChanged",e._listViewStateChangedEventName="listView.stateChanged",e}();!function(e){e[e.None=0]="None",e[e.List=1]="List",e[e.View=2]="View",e[e.Columns=4]="Columns",e[e.SelectedRows=8]="SelectedRows",e[e.Rows=16]="Rows",e[e.AppliedFilters=32]="AppliedFilters",e[e.Sort=64]="Sort",e[e.FolderInfo=128]="FolderInfo"}(a||(a={}))}})});
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.localizedCommandSetTitleKSActivated = void 0;
|
|
4
|
-
var sp_core_library_1 = require("@microsoft/sp-core-library");
|
|
5
|
-
function localizedCommandSetTitleKSActivated() {
|
|
6
|
-
return sp_core_library_1._SPKillSwitch.isActivated('38c1f92c-5240-42ea-9c8c-8485ae721247'
|
|
7
|
-
/* '10/04/2021', 'Getting localized title for the Command Set' */
|
|
8
|
-
);
|
|
9
|
-
}
|
|
10
|
-
exports.localizedCommandSetTitleKSActivated = localizedCommandSetTitleKSActivated;
|
|
11
|
-
//# sourceMappingURL=KillSwitches.js.map
|