@microsoft/sp-listview-extensibility 1.22.0-beta.1 → 1.22.0-beta.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (44) hide show
  1. package/lib/commandSet/BaseListViewCommandSet.d.ts +82 -0
  2. package/lib/commandSet/BaseListViewCommandSet.d.ts.map +1 -0
  3. package/lib/commandSet/BaseListViewCommandSet.js +68 -0
  4. package/lib/commandSet/Command.d.ts +51 -0
  5. package/lib/commandSet/Command.d.ts.map +1 -0
  6. package/lib/commandSet/Command.js +18 -0
  7. package/lib/commandSet/ListViewCommandSetContext.d.ts +43 -0
  8. package/lib/commandSet/ListViewCommandSetContext.d.ts.map +1 -0
  9. package/lib/commandSet/ListViewCommandSetContext.js +84 -0
  10. package/lib/common/IListItem.d.ts +9 -0
  11. package/lib/common/IListItem.d.ts.map +1 -0
  12. package/lib/common/IListItem.js +2 -0
  13. package/lib/common/ListItemAccessor.d.ts +42 -0
  14. package/lib/common/ListItemAccessor.d.ts.map +1 -0
  15. package/lib/common/ListItemAccessor.js +25 -0
  16. package/lib/common/ListViewAccessor.d.ts +168 -0
  17. package/lib/common/ListViewAccessor.d.ts.map +1 -0
  18. package/lib/common/ListViewAccessor.js +146 -0
  19. package/lib/common/ListViewAccessorState.d.ts +207 -0
  20. package/lib/common/ListViewAccessorState.d.ts.map +1 -0
  21. package/lib/common/ListViewAccessorState.js +18 -0
  22. package/lib/fieldCustomizer/BaseFieldCustomizer.d.ts +51 -0
  23. package/lib/fieldCustomizer/BaseFieldCustomizer.d.ts.map +1 -0
  24. package/lib/fieldCustomizer/BaseFieldCustomizer.js +33 -0
  25. package/lib/fieldCustomizer/FieldCustomizerContext.d.ts +41 -0
  26. package/lib/fieldCustomizer/FieldCustomizerContext.d.ts.map +1 -0
  27. package/lib/fieldCustomizer/FieldCustomizerContext.js +45 -0
  28. package/lib/formCustomizer/BaseFormCustomizer.d.ts +102 -0
  29. package/lib/formCustomizer/BaseFormCustomizer.d.ts.map +1 -0
  30. package/lib/formCustomizer/BaseFormCustomizer.js +134 -0
  31. package/lib/formCustomizer/FormActionEventArgs.d.ts +23 -0
  32. package/lib/formCustomizer/FormActionEventArgs.d.ts.map +1 -0
  33. package/lib/formCustomizer/FormActionEventArgs.js +28 -0
  34. package/lib/formCustomizer/FormCustomizerContext.d.ts +95 -0
  35. package/lib/formCustomizer/FormCustomizerContext.d.ts.map +1 -0
  36. package/lib/formCustomizer/FormCustomizerContext.js +96 -0
  37. package/lib/formCustomizer/FormCustomizerHost.d.ts +42 -0
  38. package/lib/formCustomizer/FormCustomizerHost.d.ts.map +1 -0
  39. package/lib/formCustomizer/FormCustomizerHost.js +49 -0
  40. package/lib/index.d.ts +19 -0
  41. package/lib/index.d.ts.map +1 -0
  42. package/lib/index.js +18 -0
  43. package/lib/sp-listview-extensibility.manifest.json +9 -0
  44. package/package.json +7 -7
@@ -0,0 +1,134 @@
1
+ import { __extends } from "tslib";
2
+ import { BaseExtension } from '@microsoft/sp-extension-base';
3
+ import { SPEvent, _SPEventManager } from '@microsoft/sp-core-library';
4
+ import { FormAction, FormActionEventArgs } from './FormActionEventArgs';
5
+ /**
6
+ * This is the base class that third parties should extend when implementing
7
+ * a client-side extension that provides a custom list form (display, new, edit) for a SharePoint list.
8
+ * @public
9
+ */
10
+ var BaseFormCustomizer = /** @class */ (function (_super) {
11
+ __extends(BaseFormCustomizer, _super);
12
+ function BaseFormCustomizer() {
13
+ var _this = _super !== null && _super.apply(this, arguments) || this;
14
+ _this._formActionEvent = new SPEvent(BaseFormCustomizer._formActionEventName);
15
+ return _this;
16
+ }
17
+ Object.defineProperty(BaseFormCustomizer.prototype, "domElement", {
18
+ // Readonly protected properties. To change these to readonly once TypeScript supports that feature.
19
+ /**
20
+ * This property is a pointer to the root DOM element of the form. This is a DIV element and contains the whole
21
+ * DOM subtree of the form.
22
+ *
23
+ * @readonly
24
+ */
25
+ get: function () {
26
+ return this.context.domElement;
27
+ },
28
+ enumerable: false,
29
+ configurable: true
30
+ });
31
+ Object.defineProperty(BaseFormCustomizer.prototype, "displayMode", {
32
+ /**
33
+ * Display mode of the form: Edit, Display or New.
34
+ *
35
+ * @readonly
36
+ */
37
+ get: function () {
38
+ return this._displayMode;
39
+ },
40
+ enumerable: false,
41
+ configurable: true
42
+ });
43
+ Object.defineProperty(BaseFormCustomizer.prototype, "formActionEvent", {
44
+ /**
45
+ * Event that gets raised every time the selected items in the list view change.
46
+ * Reserved for the future.
47
+ *
48
+ * @eventproperty
49
+ * @internal
50
+ */
51
+ get: function () {
52
+ return this._formActionEvent;
53
+ },
54
+ enumerable: false,
55
+ configurable: true
56
+ });
57
+ /**
58
+ * @internal
59
+ */
60
+ BaseFormCustomizer.prototype._init = function (context, propertiesJson, additionalInitParameters) {
61
+ if (additionalInitParameters) {
62
+ this._displayMode = additionalInitParameters.displayMode;
63
+ }
64
+ return _super.prototype._init.call(this, context, propertiesJson, additionalInitParameters);
65
+ };
66
+ /**
67
+ * @internal
68
+ */
69
+ BaseFormCustomizer.prototype._internalRender = function () {
70
+ this.render();
71
+ };
72
+ /**
73
+ * Internal API to set form's display mode.
74
+ * @internal
75
+ */
76
+ BaseFormCustomizer.prototype._internalSetDisplayMode = function (newDisplayMode) {
77
+ this._displayMode = newDisplayMode;
78
+ };
79
+ /**
80
+ * Use this method to initiate saving of the form.
81
+ *
82
+ * @internal
83
+ */
84
+ BaseFormCustomizer.prototype._save = function () {
85
+ _SPEventManager.instance.raiseStickyEvent(BaseFormCustomizer._formActionEventName, new FormActionEventArgs(FormAction.Save));
86
+ };
87
+ /**
88
+ * Use this method to initiate closing/cancelling of the form.
89
+ *
90
+ * @internal
91
+ */
92
+ BaseFormCustomizer.prototype._close = function () {
93
+ _SPEventManager.instance.raiseStickyEvent(BaseFormCustomizer._formActionEventName, new FormActionEventArgs(FormAction.Close));
94
+ };
95
+ /**
96
+ * Disposes the component.
97
+ *
98
+ * @remarks
99
+ * Please, do not override this method.
100
+ * Override the `onDispose` method instead.
101
+ */
102
+ BaseFormCustomizer.prototype.dispose = function () {
103
+ _SPEventManager.instance.removeEvent(BaseFormCustomizer._formActionEventName);
104
+ _super.prototype.dispose.call(this);
105
+ };
106
+ /**
107
+ * @internal
108
+ */
109
+ BaseFormCustomizer.prototype._initializeExtensionType = function () {
110
+ _super.prototype._initializeExtensionType.call(this);
111
+ this.context._host.logEngagement('init');
112
+ };
113
+ /**
114
+ * Call this method after the form has been saved to inform the application that the form has been saved.
115
+ */
116
+ BaseFormCustomizer.prototype.formSaved = function () {
117
+ this.context._host.onSave();
118
+ };
119
+ /**
120
+ * Call this method after the form has been closed/cancelled to inform the application that the form has been closed.
121
+ */
122
+ BaseFormCustomizer.prototype.formClosed = function () {
123
+ this.context._host.onClose();
124
+ };
125
+ /**
126
+ * SPEvent name when the form action should be performed.
127
+ *
128
+ * @internal
129
+ */
130
+ BaseFormCustomizer._formActionEventName = 'formCustomizer.formAction';
131
+ return BaseFormCustomizer;
132
+ }(BaseExtension));
133
+ export default BaseFormCustomizer;
134
+ //# sourceMappingURL=BaseFormCustomizer.js.map
@@ -0,0 +1,23 @@
1
+ import { SPEventArgs } from '@microsoft/sp-core-library';
2
+ /**
3
+ * Available Form actions.
4
+ *
5
+ * @internal
6
+ */
7
+ export declare enum FormAction {
8
+ Save = 0,
9
+ Close = 1
10
+ }
11
+ /**
12
+ * Arguments for the form close/save event.
13
+ *
14
+ * @internal
15
+ */
16
+ export declare class FormActionEventArgs extends SPEventArgs {
17
+ /**
18
+ * The action that should be performed on the form.
19
+ */
20
+ action: FormAction;
21
+ constructor(formAction: FormAction);
22
+ }
23
+ //# sourceMappingURL=FormActionEventArgs.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"FormActionEventArgs.d.ts","sourceRoot":"","sources":["../../src/formCustomizer/FormActionEventArgs.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAC;AAEzD;;;;GAIG;AACH,oBAAY,UAAU;IACpB,IAAI,IAAA;IACJ,KAAK,IAAA;CACN;AAED;;;;GAIG;AACH,qBAAa,mBAAoB,SAAQ,WAAW;IAClD;;OAEG;IACI,MAAM,EAAG,UAAU,CAAC;gBAER,UAAU,EAAE,UAAU;CAI1C"}
@@ -0,0 +1,28 @@
1
+ import { __extends } from "tslib";
2
+ import { SPEventArgs } from '@microsoft/sp-core-library';
3
+ /**
4
+ * Available Form actions.
5
+ *
6
+ * @internal
7
+ */
8
+ export var FormAction;
9
+ (function (FormAction) {
10
+ FormAction[FormAction["Save"] = 0] = "Save";
11
+ FormAction[FormAction["Close"] = 1] = "Close";
12
+ })(FormAction || (FormAction = {}));
13
+ /**
14
+ * Arguments for the form close/save event.
15
+ *
16
+ * @internal
17
+ */
18
+ var FormActionEventArgs = /** @class */ (function (_super) {
19
+ __extends(FormActionEventArgs, _super);
20
+ function FormActionEventArgs(formAction) {
21
+ var _this = _super.call(this) || this;
22
+ _this.action = formAction;
23
+ return _this;
24
+ }
25
+ return FormActionEventArgs;
26
+ }(SPEventArgs));
27
+ export { FormActionEventArgs };
28
+ //# sourceMappingURL=FormActionEventArgs.js.map
@@ -0,0 +1,95 @@
1
+ import { ExtensionContext, type _IExtensionContextParameters } from '@microsoft/sp-extension-base';
2
+ import type { IListItem } from '../common/IListItem';
3
+ import type { IContentType, IFolderInfo, IList } from '../common/ListViewAccessorState';
4
+ import type { FormCustomizerHost } from './FormCustomizerHost';
5
+ /**
6
+ * Parameters to instantiate the FormCustomizerContext.
7
+ *
8
+ * @internal
9
+ */
10
+ export interface IFormCustomizerContextParameters {
11
+ readonly list: IList;
12
+ readonly contentType: IContentType;
13
+ readonly folderInfo: IFolderInfo;
14
+ readonly itemId?: number;
15
+ readonly item?: IListItem;
16
+ readonly domElement: HTMLElement;
17
+ readonly host: FormCustomizerHost;
18
+ }
19
+ /**
20
+ * FormCustomizerContext-specific properties.
21
+ *
22
+ * @public
23
+ */
24
+ export interface IFormCustomizerContext {
25
+ /**
26
+ * The list associated with the form.
27
+ */
28
+ readonly list: IList;
29
+ /**
30
+ * The content type associated with the form.
31
+ */
32
+ readonly contentType: IContentType;
33
+ /**
34
+ * The folder information where the item is located/should be created.
35
+ */
36
+ readonly folderInfo: IFolderInfo;
37
+ /**
38
+ * The item id of the item being edited or viewed.
39
+ */
40
+ readonly itemId?: number;
41
+ /**
42
+ * The item data of the item being edited or viewed.
43
+ */
44
+ readonly item?: IListItem;
45
+ /**
46
+ * The root DOM element of the form. This is a DIV element container for the custom form.
47
+ */
48
+ readonly domElement: HTMLElement;
49
+ }
50
+ /**
51
+ * Form Customizer Context. This object contains contextual services and properties for the form.
52
+ *
53
+ * @public
54
+ */
55
+ export default class FormCustomizerContext extends ExtensionContext implements IFormCustomizerContext {
56
+ private _list;
57
+ private _contentType;
58
+ private _folderInfo;
59
+ private _itemId;
60
+ private _item;
61
+ private _domElement;
62
+ private _formCustomizerHost;
63
+ constructor(extensionContextParameters: _IExtensionContextParameters, formCustomizerContextParameters: IFormCustomizerContextParameters);
64
+ /**
65
+ * The list associated with the form.
66
+ */
67
+ get list(): IList;
68
+ /**
69
+ * The content type associated with the form.
70
+ */
71
+ get contentType(): IContentType;
72
+ /**
73
+ * The folder information where the item is located/should be created.
74
+ */
75
+ get folderInfo(): IFolderInfo;
76
+ /**
77
+ * The item id of the item being edited or viewed.
78
+ */
79
+ get itemId(): number | undefined;
80
+ /**
81
+ * The item data of the item being edited or viewed.
82
+ */
83
+ get item(): IListItem | undefined;
84
+ /**
85
+ * The root DOM element of the form. This is a DIV element container for the custom form.
86
+ */
87
+ get domElement(): HTMLElement;
88
+ /**
89
+ * Form host to interact with the host application.
90
+ *
91
+ * @internal
92
+ */
93
+ get _host(): FormCustomizerHost;
94
+ }
95
+ //# sourceMappingURL=FormCustomizerContext.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"FormCustomizerContext.d.ts","sourceRoot":"","sources":["../../src/formCustomizer/FormCustomizerContext.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,KAAK,4BAA4B,EAAE,MAAM,8BAA8B,CAAC;AACnG,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AACrD,OAAO,KAAK,EAAE,YAAY,EAAE,WAAW,EAAE,KAAK,EAAE,MAAM,iCAAiC,CAAC;AACxF,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAE/D;;;;GAIG;AACH,MAAM,WAAW,gCAAgC;IAC/C,QAAQ,CAAC,IAAI,EAAE,KAAK,CAAC;IACrB,QAAQ,CAAC,WAAW,EAAE,YAAY,CAAC;IACnC,QAAQ,CAAC,UAAU,EAAE,WAAW,CAAC;IACjC,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,IAAI,CAAC,EAAE,SAAS,CAAC;IAC1B,QAAQ,CAAC,UAAU,EAAE,WAAW,CAAC;IACjC,QAAQ,CAAC,IAAI,EAAE,kBAAkB,CAAC;CACnC;AAED;;;;GAIG;AACH,MAAM,WAAW,sBAAsB;IACrC;;OAEG;IACH,QAAQ,CAAC,IAAI,EAAE,KAAK,CAAC;IACrB;;OAEG;IACH,QAAQ,CAAC,WAAW,EAAE,YAAY,CAAC;IACnC;;OAEG;IACH,QAAQ,CAAC,UAAU,EAAE,WAAW,CAAC;IACjC;;OAEG;IACH,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC;IACzB;;OAEG;IACH,QAAQ,CAAC,IAAI,CAAC,EAAE,SAAS,CAAC;IAC1B;;OAEG;IACH,QAAQ,CAAC,UAAU,EAAE,WAAW,CAAC;CAClC;AAED;;;;GAIG;AACH,MAAM,CAAC,OAAO,OAAO,qBAAsB,SAAQ,gBAAiB,YAAW,sBAAsB;IACnG,OAAO,CAAC,KAAK,CAAQ;IACrB,OAAO,CAAC,YAAY,CAAe;IACnC,OAAO,CAAC,WAAW,CAAc;IACjC,OAAO,CAAC,OAAO,CAAqB;IACpC,OAAO,CAAC,KAAK,CAAwB;IACrC,OAAO,CAAC,WAAW,CAAc;IACjC,OAAO,CAAC,mBAAmB,CAAqB;gBAG9C,0BAA0B,EAAE,4BAA4B,EACxD,+BAA+B,EAAE,gCAAgC;IAanE;;OAEG;IACH,IAAW,IAAI,IAAI,KAAK,CAEvB;IAED;;OAEG;IACH,IAAW,WAAW,IAAI,YAAY,CAErC;IAED;;OAEG;IACH,IAAW,UAAU,IAAI,WAAW,CAEnC;IAED;;OAEG;IACH,IAAW,MAAM,IAAI,MAAM,GAAG,SAAS,CAEtC;IAED;;OAEG;IACH,IAAW,IAAI,IAAI,SAAS,GAAG,SAAS,CAEvC;IAED;;OAEG;IACH,IAAW,UAAU,IAAI,WAAW,CAEnC;IAED;;;;OAIG;IACH,IAAW,KAAK,IAAI,kBAAkB,CAErC;CACF"}
@@ -0,0 +1,96 @@
1
+ import { __extends } from "tslib";
2
+ import { ExtensionContext } from '@microsoft/sp-extension-base';
3
+ /**
4
+ * Form Customizer Context. This object contains contextual services and properties for the form.
5
+ *
6
+ * @public
7
+ */
8
+ var FormCustomizerContext = /** @class */ (function (_super) {
9
+ __extends(FormCustomizerContext, _super);
10
+ function FormCustomizerContext(extensionContextParameters, formCustomizerContextParameters) {
11
+ var _this = _super.call(this, extensionContextParameters) || this;
12
+ _this._list = formCustomizerContextParameters.list;
13
+ _this._contentType = formCustomizerContextParameters.contentType;
14
+ _this._folderInfo = formCustomizerContextParameters.folderInfo;
15
+ _this._itemId = formCustomizerContextParameters.itemId;
16
+ _this._item = formCustomizerContextParameters.item;
17
+ _this._domElement = formCustomizerContextParameters.domElement;
18
+ _this._formCustomizerHost = formCustomizerContextParameters.host;
19
+ return _this;
20
+ }
21
+ Object.defineProperty(FormCustomizerContext.prototype, "list", {
22
+ /**
23
+ * The list associated with the form.
24
+ */
25
+ get: function () {
26
+ return this._list;
27
+ },
28
+ enumerable: false,
29
+ configurable: true
30
+ });
31
+ Object.defineProperty(FormCustomizerContext.prototype, "contentType", {
32
+ /**
33
+ * The content type associated with the form.
34
+ */
35
+ get: function () {
36
+ return this._contentType;
37
+ },
38
+ enumerable: false,
39
+ configurable: true
40
+ });
41
+ Object.defineProperty(FormCustomizerContext.prototype, "folderInfo", {
42
+ /**
43
+ * The folder information where the item is located/should be created.
44
+ */
45
+ get: function () {
46
+ return this._folderInfo;
47
+ },
48
+ enumerable: false,
49
+ configurable: true
50
+ });
51
+ Object.defineProperty(FormCustomizerContext.prototype, "itemId", {
52
+ /**
53
+ * The item id of the item being edited or viewed.
54
+ */
55
+ get: function () {
56
+ return this._itemId;
57
+ },
58
+ enumerable: false,
59
+ configurable: true
60
+ });
61
+ Object.defineProperty(FormCustomizerContext.prototype, "item", {
62
+ /**
63
+ * The item data of the item being edited or viewed.
64
+ */
65
+ get: function () {
66
+ return this._item;
67
+ },
68
+ enumerable: false,
69
+ configurable: true
70
+ });
71
+ Object.defineProperty(FormCustomizerContext.prototype, "domElement", {
72
+ /**
73
+ * The root DOM element of the form. This is a DIV element container for the custom form.
74
+ */
75
+ get: function () {
76
+ return this._domElement;
77
+ },
78
+ enumerable: false,
79
+ configurable: true
80
+ });
81
+ Object.defineProperty(FormCustomizerContext.prototype, "_host", {
82
+ /**
83
+ * Form host to interact with the host application.
84
+ *
85
+ * @internal
86
+ */
87
+ get: function () {
88
+ return this._formCustomizerHost;
89
+ },
90
+ enumerable: false,
91
+ configurable: true
92
+ });
93
+ return FormCustomizerContext;
94
+ }(ExtensionContext));
95
+ export default FormCustomizerContext;
96
+ //# sourceMappingURL=FormCustomizerContext.js.map
@@ -0,0 +1,42 @@
1
+ /**
2
+ * Host parameters
3
+ *
4
+ * @internal
5
+ */
6
+ export interface IFormCustomizerHostParameters {
7
+ onSaveCallback: () => void;
8
+ onCloseCallback: () => void;
9
+ onErrorCallback?: (error: string) => void;
10
+ logEngagement?: (eventName: string) => void;
11
+ }
12
+ /**
13
+ * Form Customizer Host
14
+ *
15
+ * @internal
16
+ */
17
+ export declare class FormCustomizerHost {
18
+ private readonly _onSaveCallback;
19
+ private readonly _onCloseCallback;
20
+ private readonly _onErrorCallback;
21
+ private readonly _logEngagement;
22
+ constructor(params: IFormCustomizerHostParameters);
23
+ /**
24
+ * The host will invoke this._onSaveCallback to inform the application on form save.
25
+ */
26
+ onSave(): void;
27
+ /**
28
+ * The host will invoke this._onCloseCallback to inform the application on form close.
29
+ */
30
+ onClose(): void;
31
+ /**
32
+ * The host will invoke this._onErrorCallback to inform the application on form error.
33
+ * @param error - Error message
34
+ */
35
+ onError(error: string): void;
36
+ /**
37
+ * Logs form engagement event
38
+ * @param eventName - Event name
39
+ */
40
+ logEngagement(eventName: string): void;
41
+ }
42
+ //# sourceMappingURL=FormCustomizerHost.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"FormCustomizerHost.d.ts","sourceRoot":"","sources":["../../src/formCustomizer/FormCustomizerHost.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,MAAM,WAAW,6BAA6B;IAC5C,cAAc,EAAE,MAAM,IAAI,CAAC;IAC3B,eAAe,EAAE,MAAM,IAAI,CAAC;IAC5B,eAAe,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAC1C,aAAa,CAAC,EAAE,CAAC,SAAS,EAAE,MAAM,KAAK,IAAI,CAAC;CAC7C;AAED;;;;GAIG;AACH,qBAAa,kBAAkB;IAC7B,OAAO,CAAC,QAAQ,CAAC,eAAe,CAAa;IAC7C,OAAO,CAAC,QAAQ,CAAC,gBAAgB,CAAa;IAC9C,OAAO,CAAC,QAAQ,CAAC,gBAAgB,CAAwC;IACzE,OAAO,CAAC,QAAQ,CAAC,cAAc,CAA4C;gBAExD,MAAM,EAAE,6BAA6B;IAOxD;;OAEG;IACI,MAAM,IAAI,IAAI;IAKrB;;OAEG;IACI,OAAO,IAAI,IAAI;IAKtB;;;OAGG;IACI,OAAO,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI;IAOnC;;;OAGG;IACI,aAAa,CAAC,SAAS,EAAE,MAAM,GAAG,IAAI;CAK9C"}
@@ -0,0 +1,49 @@
1
+ /**
2
+ * Form Customizer Host
3
+ *
4
+ * @internal
5
+ */
6
+ var FormCustomizerHost = /** @class */ (function () {
7
+ function FormCustomizerHost(params) {
8
+ this._onSaveCallback = params.onSaveCallback;
9
+ this._onCloseCallback = params.onCloseCallback;
10
+ this._onErrorCallback = params.onErrorCallback;
11
+ this._logEngagement = params.logEngagement;
12
+ }
13
+ /**
14
+ * The host will invoke this._onSaveCallback to inform the application on form save.
15
+ */
16
+ FormCustomizerHost.prototype.onSave = function () {
17
+ this.logEngagement('onSave');
18
+ this._onSaveCallback();
19
+ };
20
+ /**
21
+ * The host will invoke this._onCloseCallback to inform the application on form close.
22
+ */
23
+ FormCustomizerHost.prototype.onClose = function () {
24
+ this.logEngagement('onClose');
25
+ this._onCloseCallback();
26
+ };
27
+ /**
28
+ * The host will invoke this._onErrorCallback to inform the application on form error.
29
+ * @param error - Error message
30
+ */
31
+ FormCustomizerHost.prototype.onError = function (error) {
32
+ this.logEngagement('onError');
33
+ if (this._onErrorCallback) {
34
+ this._onErrorCallback(error);
35
+ }
36
+ };
37
+ /**
38
+ * Logs form engagement event
39
+ * @param eventName - Event name
40
+ */
41
+ FormCustomizerHost.prototype.logEngagement = function (eventName) {
42
+ if (this._logEngagement) {
43
+ this._logEngagement(eventName);
44
+ }
45
+ };
46
+ return FormCustomizerHost;
47
+ }());
48
+ export { FormCustomizerHost };
49
+ //# sourceMappingURL=FormCustomizerHost.js.map
package/lib/index.d.ts ADDED
@@ -0,0 +1,19 @@
1
+ /**
2
+ * SharePoint Framework support for customizing the list view.
3
+ *
4
+ * @packagedocumentation
5
+ */
6
+ export { default as BaseListViewCommandSet, type IListViewCommandSetListViewUpdatedParameters, type IListViewCommandSetExecuteEventParameters } from './commandSet/BaseListViewCommandSet';
7
+ export { default as Command } from './commandSet/Command';
8
+ export { default as ListViewCommandSetContext, type IListViewCommandSetContextParameters as _IListViewCommandSetContextParameters } from './commandSet/ListViewCommandSetContext';
9
+ export { default as BaseFieldCustomizer, type IFieldCustomizerCellEventParameters } from './fieldCustomizer/BaseFieldCustomizer';
10
+ export { default as FieldCustomizerContext, type IFieldCustomizerContextParameters as _IFieldCustomizerContextParameters } from './fieldCustomizer/FieldCustomizerContext';
11
+ export { default as BaseFormCustomizer, type IFormCustomizerAdditionalInitParameters as _IFormCustomizerAdditionalInitParameters } from './formCustomizer/BaseFormCustomizer';
12
+ export { default as FormCustomizerContext, type IFormCustomizerContextParameters as _IFormCustomizerContextParameters, type IFormCustomizerContext } from './formCustomizer/FormCustomizerContext';
13
+ export { FormCustomizerHost } from './formCustomizer/FormCustomizerHost';
14
+ export { FormActionEventArgs, FormAction } from './formCustomizer/FormActionEventArgs';
15
+ export { default as ListItemAccessor } from './common/ListItemAccessor';
16
+ export { ColumnAccessor, RowAccessor, SelectedRowsChangedEventArgs, ListViewStateChangedEventArgs, default as ListViewAccessor } from './common/ListViewAccessor';
17
+ export { ListViewAccessorStateChanges, type IColumn, type IRow, type IFilter, type IFolderInfo, type IList, type IView, type IContentType, type IListViewAccessorState } from './common/ListViewAccessorState';
18
+ export type { IListItem } from './common/IListItem';
19
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EACL,OAAO,IAAI,sBAAsB,EACjC,KAAK,4CAA4C,EACjD,KAAK,yCAAyC,EAC/C,MAAM,qCAAqC,CAAC;AAE7C,OAAO,EAAE,OAAO,IAAI,OAAO,EAAE,MAAM,sBAAsB,CAAC;AAE1D,OAAO,EACL,OAAO,IAAI,yBAAyB,EACpC,KAAK,oCAAoC,IAAI,qCAAqC,EACnF,MAAM,wCAAwC,CAAC;AAEhD,OAAO,EACL,OAAO,IAAI,mBAAmB,EAC9B,KAAK,mCAAmC,EACzC,MAAM,uCAAuC,CAAC;AAE/C,OAAO,EACL,OAAO,IAAI,sBAAsB,EACjC,KAAK,iCAAiC,IAAI,kCAAkC,EAC7E,MAAM,0CAA0C,CAAC;AAElD,OAAO,EACL,OAAO,IAAI,kBAAkB,EAC7B,KAAK,uCAAuC,IAAI,wCAAwC,EACzF,MAAM,qCAAqC,CAAC;AAE7C,OAAO,EACL,OAAO,IAAI,qBAAqB,EAChC,KAAK,gCAAgC,IAAI,iCAAiC,EAC1E,KAAK,sBAAsB,EAC5B,MAAM,wCAAwC,CAAC;AAEhD,OAAO,EAAE,kBAAkB,EAAE,MAAM,qCAAqC,CAAC;AACzE,OAAO,EAAE,mBAAmB,EAAE,UAAU,EAAE,MAAM,sCAAsC,CAAC;AACvF,OAAO,EAAE,OAAO,IAAI,gBAAgB,EAAE,MAAM,2BAA2B,CAAC;AAExE,OAAO,EACL,cAAc,EACd,WAAW,EACX,4BAA4B,EAC5B,6BAA6B,EAC7B,OAAO,IAAI,gBAAgB,EAC5B,MAAM,2BAA2B,CAAC;AAEnC,OAAO,EACL,4BAA4B,EAC5B,KAAK,OAAO,EACZ,KAAK,IAAI,EACT,KAAK,OAAO,EACZ,KAAK,WAAW,EAChB,KAAK,KAAK,EACV,KAAK,KAAK,EACV,KAAK,YAAY,EACjB,KAAK,sBAAsB,EAC5B,MAAM,gCAAgC,CAAC;AAExC,YAAY,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC"}
package/lib/index.js ADDED
@@ -0,0 +1,18 @@
1
+ /**
2
+ * SharePoint Framework support for customizing the list view.
3
+ *
4
+ * @packagedocumentation
5
+ */
6
+ export { default as BaseListViewCommandSet } from './commandSet/BaseListViewCommandSet';
7
+ export { default as Command } from './commandSet/Command';
8
+ export { default as ListViewCommandSetContext } from './commandSet/ListViewCommandSetContext';
9
+ export { default as BaseFieldCustomizer } from './fieldCustomizer/BaseFieldCustomizer';
10
+ export { default as FieldCustomizerContext } from './fieldCustomizer/FieldCustomizerContext';
11
+ export { default as BaseFormCustomizer } from './formCustomizer/BaseFormCustomizer';
12
+ export { default as FormCustomizerContext } from './formCustomizer/FormCustomizerContext';
13
+ export { FormCustomizerHost } from './formCustomizer/FormCustomizerHost';
14
+ export { FormActionEventArgs, FormAction } from './formCustomizer/FormActionEventArgs';
15
+ export { default as ListItemAccessor } from './common/ListItemAccessor';
16
+ export { ColumnAccessor, RowAccessor, SelectedRowsChangedEventArgs, ListViewStateChangedEventArgs, default as ListViewAccessor } from './common/ListViewAccessor';
17
+ export { ListViewAccessorStateChanges } from './common/ListViewAccessorState';
18
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1,9 @@
1
+ {
2
+ "$schema": "https://developer.microsoft.com/json-schemas/spfx/client-side-component-manifest.schema.json",
3
+
4
+ "id": "d37b65ee-c7d8-4570-bc74-2b294ff3b380",
5
+ "alias": "SPListViewExtensibility",
6
+ "componentType": "Library",
7
+ "version": "*",
8
+ "manifestVersion": 2
9
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@microsoft/sp-listview-extensibility",
3
- "version": "1.22.0-beta.1",
3
+ "version": "1.22.0-beta.3",
4
4
  "description": "SharePoint Framework developer support for customizing the list view",
5
5
  "license": "https://aka.ms/spfx/license",
6
6
  "homepage": "http://aka.ms/spfx",
@@ -11,18 +11,18 @@
11
11
  "tsdocFlavor": "AEDoc"
12
12
  },
13
13
  "devDependencies": {
14
- "@rushstack/heft": "0.73.6",
14
+ "@rushstack/heft": "0.74.3",
15
15
  "eslint": "8.57.1",
16
- "@microsoft/sp-odata-types": "1.22.0-beta.1",
16
+ "@microsoft/sp-odata-types": "1.22.0-beta.3",
17
17
  "@msinternal/spfx-internal-web-build-rig": "0.1.0"
18
18
  },
19
19
  "dependencies": {
20
20
  "@swc/helpers": "0.5.12",
21
21
  "tslib": "2.3.1",
22
- "@microsoft/sp-module-interfaces": "1.22.0-beta.1",
23
- "@microsoft/sp-page-context": "1.22.0-beta.1",
24
- "@microsoft/sp-core-library": "1.22.0-beta.1",
25
- "@microsoft/sp-extension-base": "1.22.0-beta.1"
22
+ "@microsoft/sp-extension-base": "1.22.0-beta.3",
23
+ "@microsoft/sp-page-context": "1.22.0-beta.3",
24
+ "@microsoft/sp-module-interfaces": "1.22.0-beta.3",
25
+ "@microsoft/sp-core-library": "1.22.0-beta.3"
26
26
  },
27
27
  "engines": {
28
28
  "node": ">=18.17.1 <19.0.0 || >=22.14.0 < 23.0.0"