@microsoft/sp-listview-extensibility 1.23.2 → 1.24.0-beta.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (76) hide show
  1. package/dist/d37b65ee-c7d8-4570-bc74-2b294ff3b380.manifest.json +6 -11
  2. package/dist/sp-listview-extensibility_none_e2a79004ecc8bfd2e643.js +1 -0
  3. package/dist/tsdoc-metadata.json +1 -1
  4. package/lib-commonjs/commandSet/BaseListViewCommandSet.js +49 -49
  5. package/lib-commonjs/commandSet/Command.js +13 -9
  6. package/lib-commonjs/commandSet/ListViewCommandSetContext.js +54 -70
  7. package/lib-commonjs/common/Flights.js +14 -8
  8. package/lib-commonjs/common/IListItem.js +5 -2
  9. package/lib-commonjs/common/ListItemAccessor.js +15 -25
  10. package/lib-commonjs/common/ListViewAccessor.js +83 -135
  11. package/lib-commonjs/common/ListViewAccessorState.js +13 -10
  12. package/lib-commonjs/fieldCustomizer/BaseFieldCustomizer.js +25 -25
  13. package/lib-commonjs/fieldCustomizer/FieldCustomizerContext.js +36 -43
  14. package/lib-commonjs/formCustomizer/BaseFormCustomizer.js +93 -114
  15. package/lib-commonjs/formCustomizer/FormActionEventArgs.js +27 -26
  16. package/lib-commonjs/formCustomizer/FormCustomizerContext.js +61 -98
  17. package/lib-commonjs/formCustomizer/FormCustomizerHost.js +34 -33
  18. package/lib-commonjs/index.js +79 -37
  19. package/lib-esm/commandSet/BaseListViewCommandSet.js +61 -0
  20. package/{lib → lib-esm}/commandSet/Command.js +4 -8
  21. package/lib-esm/commandSet/ListViewCommandSetContext.js +67 -0
  22. package/{lib → lib-esm}/common/Flights.js +3 -2
  23. package/lib-esm/common/IListItem.js +7 -0
  24. package/{lib → lib-esm}/common/ListItemAccessor.js +8 -10
  25. package/lib-esm/common/ListViewAccessor.js +102 -0
  26. package/{lib → lib-esm}/common/ListViewAccessorState.js +3 -7
  27. package/lib-esm/fieldCustomizer/BaseFieldCustomizer.js +27 -0
  28. package/lib-esm/fieldCustomizer/FieldCustomizerContext.js +34 -0
  29. package/lib-esm/formCustomizer/BaseFormCustomizer.js +106 -0
  30. package/lib-esm/formCustomizer/FormActionEventArgs.js +18 -0
  31. package/lib-esm/formCustomizer/FormCustomizerContext.js +59 -0
  32. package/lib-esm/formCustomizer/FormCustomizerHost.js +47 -0
  33. package/{lib → lib-esm}/index.js +3 -3
  34. package/package.json +35 -8
  35. package/dist/sp-listview-extensibility_none_94ba6a6b18c530c5bdda.js +0 -1
  36. package/lib/commandSet/BaseListViewCommandSet.d.ts.map +0 -1
  37. package/lib/commandSet/BaseListViewCommandSet.js +0 -69
  38. package/lib/commandSet/Command.d.ts.map +0 -1
  39. package/lib/commandSet/ListViewCommandSetContext.d.ts.map +0 -1
  40. package/lib/commandSet/ListViewCommandSetContext.js +0 -87
  41. package/lib/common/Flights.d.ts.map +0 -1
  42. package/lib/common/IListItem.d.ts.map +0 -1
  43. package/lib/common/IListItem.js +0 -2
  44. package/lib/common/ListItemAccessor.d.ts.map +0 -1
  45. package/lib/common/ListViewAccessor.d.ts.map +0 -1
  46. package/lib/common/ListViewAccessor.js +0 -146
  47. package/lib/common/ListViewAccessorState.d.ts.map +0 -1
  48. package/lib/fieldCustomizer/BaseFieldCustomizer.d.ts.map +0 -1
  49. package/lib/fieldCustomizer/BaseFieldCustomizer.js +0 -35
  50. package/lib/fieldCustomizer/FieldCustomizerContext.d.ts.map +0 -1
  51. package/lib/fieldCustomizer/FieldCustomizerContext.js +0 -45
  52. package/lib/formCustomizer/BaseFormCustomizer.d.ts.map +0 -1
  53. package/lib/formCustomizer/BaseFormCustomizer.js +0 -135
  54. package/lib/formCustomizer/FormActionEventArgs.d.ts.map +0 -1
  55. package/lib/formCustomizer/FormActionEventArgs.js +0 -28
  56. package/lib/formCustomizer/FormCustomizerContext.d.ts.map +0 -1
  57. package/lib/formCustomizer/FormCustomizerContext.js +0 -99
  58. package/lib/formCustomizer/FormCustomizerHost.d.ts.map +0 -1
  59. package/lib/formCustomizer/FormCustomizerHost.js +0 -49
  60. package/lib/index.d.ts.map +0 -1
  61. /package/{lib → lib-dts}/commandSet/BaseListViewCommandSet.d.ts +0 -0
  62. /package/{lib → lib-dts}/commandSet/Command.d.ts +0 -0
  63. /package/{lib → lib-dts}/commandSet/ListViewCommandSetContext.d.ts +0 -0
  64. /package/{lib → lib-dts}/common/Flights.d.ts +0 -0
  65. /package/{lib → lib-dts}/common/IListItem.d.ts +0 -0
  66. /package/{lib → lib-dts}/common/ListItemAccessor.d.ts +0 -0
  67. /package/{lib → lib-dts}/common/ListViewAccessor.d.ts +0 -0
  68. /package/{lib → lib-dts}/common/ListViewAccessorState.d.ts +0 -0
  69. /package/{lib → lib-dts}/fieldCustomizer/BaseFieldCustomizer.d.ts +0 -0
  70. /package/{lib → lib-dts}/fieldCustomizer/FieldCustomizerContext.d.ts +0 -0
  71. /package/{lib → lib-dts}/formCustomizer/BaseFormCustomizer.d.ts +0 -0
  72. /package/{lib → lib-dts}/formCustomizer/FormActionEventArgs.d.ts +0 -0
  73. /package/{lib → lib-dts}/formCustomizer/FormCustomizerContext.d.ts +0 -0
  74. /package/{lib → lib-dts}/formCustomizer/FormCustomizerHost.d.ts +0 -0
  75. /package/{lib → lib-dts}/index.d.ts +0 -0
  76. /package/{lib → lib-esm}/sp-listview-extensibility.manifest.json +0 -0
@@ -1,149 +1,97 @@
1
1
  "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.ListViewStateChangedEventArgs = exports.SelectedRowsChangedEventArgs = exports.RowAccessor = exports.ColumnAccessor = void 0;
4
- var tslib_1 = require("tslib");
5
- var sp_core_library_1 = require("@microsoft/sp-core-library");
6
- var ListItemAccessor_1 = tslib_1.__importDefault(require("./ListItemAccessor"));
7
- /**
8
- * Provides access to a ListView column, which is the visual presentation
9
- * of a field.
10
- *
11
- * @remarks
12
- *
13
- * A SharePoint "field" (SPField) defines the data storage for a property of a list item.
14
- * (If the list item represents a document, then the field is sometimes called a "property".)
15
- *
16
- * A "column" is the visual presentation of a field, when displayed by the ListView.
17
- *
18
- * @public
19
- */
20
- var ColumnAccessor = /** @class */ (function () {
21
- /** @internal */
22
- function ColumnAccessor() {
23
- // (mark constructor as internal)
24
- }
25
- return ColumnAccessor;
26
- }());
27
- exports.ColumnAccessor = ColumnAccessor;
28
- /**
29
- * Provides access to a ListView row, which is the visual presentation
30
- * of a SharePoint list item.
31
- *
32
- * @remarks
33
- *
34
- * A SharePoint "list item" (SPListItem) is a data storage record in the content
35
- * management system; it stores an array of values for the associated fields.
36
- *
37
- * A "row" is the visual presentation of a list item, when displayed by the ListView;
38
- * it stores an array of cell values for the associated columns.
39
- *
40
- * @public
41
- */
42
- var RowAccessor = /** @class */ (function (_super) {
43
- tslib_1.__extends(RowAccessor, _super);
44
- /**
45
- * @internal
46
- */
47
- function RowAccessor() {
48
- return _super.call(this) || this;
2
+ Object.defineProperty(exports, "__esModule", {
3
+ value: true
4
+ });
5
+ function _export(target, all) {
6
+ for(var name in all)Object.defineProperty(target, name, {
7
+ enumerable: true,
8
+ get: all[name]
9
+ });
10
+ }
11
+ _export(exports, {
12
+ ColumnAccessor: function() {
13
+ return ColumnAccessor;
14
+ },
15
+ ListViewStateChangedEventArgs: function() {
16
+ return ListViewStateChangedEventArgs;
17
+ },
18
+ RowAccessor: function() {
19
+ return RowAccessor;
20
+ },
21
+ SelectedRowsChangedEventArgs: function() {
22
+ return SelectedRowsChangedEventArgs;
23
+ },
24
+ default: function() {
25
+ return _default;
49
26
  }
50
- return RowAccessor;
51
- }(ListItemAccessor_1.default));
52
- exports.RowAccessor = RowAccessor;
53
- /**
54
- * Arguments for the selected rows changed event.
55
- *
56
- * @public
57
- */
58
- var SelectedRowsChangedEventArgs = /** @class */ (function (_super) {
59
- tslib_1.__extends(SelectedRowsChangedEventArgs, _super);
60
- function SelectedRowsChangedEventArgs() {
61
- return _super !== null && _super.apply(this, arguments) || this;
27
+ });
28
+ const _interop_require_default = require("@swc/helpers/_/_interop_require_default");
29
+ const _spcorelibrary = require("@microsoft/sp-core-library");
30
+ const _ListItemAccessor = /*#__PURE__*/ _interop_require_default._(require("./ListItemAccessor"));
31
+ class ColumnAccessor {
32
+ /** @internal */ constructor(){
33
+ // (mark constructor as internal)
62
34
  }
63
- return SelectedRowsChangedEventArgs;
64
- }(sp_core_library_1.SPEventArgs));
65
- exports.SelectedRowsChangedEventArgs = SelectedRowsChangedEventArgs;
66
- /**
67
- * Arguments for the list view state changed event.
68
- *
69
- * @public
70
- */
71
- var ListViewStateChangedEventArgs = /** @class */ (function (_super) {
72
- tslib_1.__extends(ListViewStateChangedEventArgs, _super);
73
- function ListViewStateChangedEventArgs() {
74
- return _super !== null && _super.apply(this, arguments) || this;
35
+ }
36
+ class RowAccessor extends _ListItemAccessor.default {
37
+ /**
38
+ * @internal
39
+ */ constructor(){
40
+ super();
75
41
  }
76
- return ListViewStateChangedEventArgs;
77
- }(sp_core_library_1.SPEventArgs));
78
- exports.ListViewStateChangedEventArgs = ListViewStateChangedEventArgs;
42
+ }
43
+ class SelectedRowsChangedEventArgs extends _spcorelibrary.SPEventArgs {
44
+ }
45
+ class ListViewStateChangedEventArgs extends _spcorelibrary.SPEventArgs {
46
+ }
79
47
  /**
80
48
  * Provides access to a SharePoint ListView control.
81
49
  *
82
50
  * @public
83
- */
84
- var ListViewAccessor = /** @class */ (function () {
51
+ */ class ListViewAccessor {
85
52
  /**
86
- * @internal
87
- */
88
- function ListViewAccessor(eventPrefix) {
89
- this._isDisposed = false;
90
- this._selectedRowsChangedEvent = new sp_core_library_1.SPEvent(ListViewAccessor._selectedRowsChangedEventName);
91
- this._listViewStateChangedEventName = "".concat(ListViewAccessor._listViewStateChangedEventName).concat(eventPrefix || '');
92
- this._listViewStateChangedEvent = new sp_core_library_1.SPEvent(this._listViewStateChangedEventName);
53
+ * Event that gets raised every time the selected items in the list view change.
54
+ * @eventproperty
55
+ */ get selectedRowsChangedEvent() {
56
+ return this._selectedRowsChangedEvent;
93
57
  }
94
- Object.defineProperty(ListViewAccessor.prototype, "selectedRowsChangedEvent", {
95
- /**
96
- * Event that gets raised every time the selected items in the list view change.
97
- * @eventproperty
98
- */
99
- get: function () {
100
- return this._selectedRowsChangedEvent;
101
- },
102
- enumerable: false,
103
- configurable: true
104
- });
105
- Object.defineProperty(ListViewAccessor.prototype, "listViewStateChangedEvent", {
106
- /**
107
- * Event that gets raised every time the list view state changes.
108
- *
109
- * @eventproperty
110
- */
111
- get: function () {
112
- return this._listViewStateChangedEvent;
113
- },
114
- enumerable: false,
115
- configurable: true
116
- });
117
58
  /**
118
- * @internal
119
- */
120
- ListViewAccessor.prototype.dispose = function () {
121
- sp_core_library_1._SPEventManager.instance.removeEvent(this._listViewStateChangedEventName);
59
+ * Event that gets raised every time the list view state changes.
60
+ *
61
+ * @eventproperty
62
+ */ get listViewStateChangedEvent() {
63
+ return this._listViewStateChangedEvent;
64
+ }
65
+ /**
66
+ * @internal
67
+ */ dispose() {
68
+ _spcorelibrary._SPEventManager.instance.removeEvent(this._listViewStateChangedEventName);
122
69
  this._isDisposed = true;
123
- };
124
- Object.defineProperty(ListViewAccessor.prototype, "isDisposed", {
125
- /**
126
- * @internal
127
- */
128
- get: function () {
129
- return this._isDisposed;
130
- },
131
- enumerable: false,
132
- configurable: true
133
- });
70
+ }
134
71
  /**
135
- * SPEvent name when the selected rows in a list have changed.
136
- *
137
- * @internal
138
- */
139
- ListViewAccessor._selectedRowsChangedEventName = 'listView.selectedRowsChanged';
72
+ * @internal
73
+ */ get isDisposed() {
74
+ return this._isDisposed;
75
+ }
140
76
  /**
141
- * SPEvent name when the list view state has changed.
142
- *
143
- * @internal
144
- */
145
- ListViewAccessor._listViewStateChangedEventName = 'listView.stateChanged';
146
- return ListViewAccessor;
147
- }());
148
- exports.default = ListViewAccessor;
149
- //# sourceMappingURL=ListViewAccessor.js.map
77
+ * @internal
78
+ */ constructor(eventPrefix){
79
+ this._isDisposed = false;
80
+ this._selectedRowsChangedEvent = new _spcorelibrary.SPEvent(ListViewAccessor._selectedRowsChangedEventName);
81
+ this._listViewStateChangedEventName = `${ListViewAccessor._listViewStateChangedEventName}${eventPrefix || ''}`;
82
+ this._listViewStateChangedEvent = new _spcorelibrary.SPEvent(this._listViewStateChangedEventName);
83
+ }
84
+ }
85
+ /**
86
+ * SPEvent name when the selected rows in a list have changed.
87
+ *
88
+ * @internal
89
+ */ ListViewAccessor._selectedRowsChangedEventName = 'listView.selectedRowsChanged';
90
+ /**
91
+ * SPEvent name when the list view state has changed.
92
+ *
93
+ * @internal
94
+ */ ListViewAccessor._listViewStateChangedEventName = 'listView.stateChanged';
95
+ const _default = ListViewAccessor;
96
+
97
+ //# sourceMappingURL=./ListViewAccessor.js.map
@@ -1,13 +1,15 @@
1
1
  "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.ListViewAccessorStateChanges = void 0;
4
- /**
5
- * Describes the type of list view state changes.
6
- *
7
- * @public
8
- */
2
+ Object.defineProperty(exports, "__esModule", {
3
+ value: true
4
+ });
5
+ Object.defineProperty(exports, "ListViewAccessorStateChanges", {
6
+ enumerable: true,
7
+ get: function() {
8
+ return ListViewAccessorStateChanges;
9
+ }
10
+ });
9
11
  var ListViewAccessorStateChanges;
10
- (function (ListViewAccessorStateChanges) {
12
+ (function(ListViewAccessorStateChanges) {
11
13
  ListViewAccessorStateChanges[ListViewAccessorStateChanges["None"] = 0] = "None";
12
14
  ListViewAccessorStateChanges[ListViewAccessorStateChanges["List"] = 1] = "List";
13
15
  ListViewAccessorStateChanges[ListViewAccessorStateChanges["View"] = 2] = "View";
@@ -17,5 +19,6 @@ var ListViewAccessorStateChanges;
17
19
  ListViewAccessorStateChanges[ListViewAccessorStateChanges["AppliedFilters"] = 32] = "AppliedFilters";
18
20
  ListViewAccessorStateChanges[ListViewAccessorStateChanges["Sort"] = 64] = "Sort";
19
21
  ListViewAccessorStateChanges[ListViewAccessorStateChanges["FolderInfo"] = 128] = "FolderInfo";
20
- })(ListViewAccessorStateChanges || (exports.ListViewAccessorStateChanges = ListViewAccessorStateChanges = {}));
21
- //# sourceMappingURL=ListViewAccessorState.js.map
22
+ })(ListViewAccessorStateChanges || (ListViewAccessorStateChanges = {}));
23
+
24
+ //# sourceMappingURL=./ListViewAccessorState.js.map
@@ -1,8 +1,15 @@
1
1
  "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- var tslib_1 = require("tslib");
4
- var sp_core_library_1 = require("@microsoft/sp-core-library");
5
- var sp_extension_base_1 = require("@microsoft/sp-extension-base");
2
+ Object.defineProperty(exports, "__esModule", {
3
+ value: true
4
+ });
5
+ Object.defineProperty(exports, "default", {
6
+ enumerable: true,
7
+ get: function() {
8
+ return _default;
9
+ }
10
+ });
11
+ const _spcorelibrary = require("@microsoft/sp-core-library");
12
+ const _spextensionbase = require("@microsoft/sp-extension-base");
6
13
  /**
7
14
  * This is the base class that third parties should extend when implementing
8
15
  * a client-side extension that customizes the appearance of fields in
@@ -11,27 +18,20 @@ var sp_extension_base_1 = require("@microsoft/sp-extension-base");
11
18
  * In the component manifest, the "extensionType" should be set to "FieldCustomizer".
12
19
  *
13
20
  * @public
14
- */
15
- var BaseFieldCustomizer = /** @class */ (function (_super) {
16
- tslib_1.__extends(BaseFieldCustomizer, _super);
17
- function BaseFieldCustomizer() {
18
- return _super !== null && _super.apply(this, arguments) || this;
19
- }
21
+ */ class BaseFieldCustomizer extends _spextensionbase.BaseExtension {
20
22
  /*
21
- * virtual
22
- */
23
- BaseFieldCustomizer.prototype.onRenderCell = function (event) {
24
- var text = "".concat(event.fieldValue);
23
+ * virtual
24
+ */ onRenderCell(event) {
25
+ const text = `${event.fieldValue}`;
25
26
  event.fieldValue.innerText = text;
26
- };
27
+ }
27
28
  /*
28
- * virtual
29
- */
30
- BaseFieldCustomizer.prototype.onDisposeCell = function (event) {
31
- // (implemented by child class)
32
- };
33
- return BaseFieldCustomizer;
34
- }(sp_extension_base_1.BaseExtension));
35
- (0, sp_core_library_1._ES5CompatibleClass)(BaseFieldCustomizer);
36
- exports.default = BaseFieldCustomizer;
37
- //# sourceMappingURL=BaseFieldCustomizer.js.map
29
+ * virtual
30
+ */ onDisposeCell(event) {
31
+ // (implemented by child class)
32
+ }
33
+ }
34
+ (0, _spcorelibrary._ES5CompatibleClass)(BaseFieldCustomizer);
35
+ const _default = BaseFieldCustomizer;
36
+
37
+ //# sourceMappingURL=./BaseFieldCustomizer.js.map
@@ -1,47 +1,40 @@
1
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
- * This object provides contextual information for BaseFieldCustomizer.
7
- * @public
8
- */
9
- var FieldCustomizerContext = /** @class */ (function (_super) {
10
- tslib_1.__extends(FieldCustomizerContext, _super);
11
- /**
12
- * @internal
13
- */
14
- function FieldCustomizerContext(extensionContextParameters, fieldCustomizerContextParameters) {
15
- var _this = _super.call(this, extensionContextParameters) || this;
16
- _this._listView = fieldCustomizerContextParameters.listView;
17
- _this._field = fieldCustomizerContextParameters.field;
18
- return _this;
2
+ Object.defineProperty(exports, "__esModule", {
3
+ value: true
4
+ });
5
+ Object.defineProperty(exports, "default", {
6
+ enumerable: true,
7
+ get: function() {
8
+ return FieldCustomizerContext;
19
9
  }
10
+ });
11
+ const _spextensionbase = require("@microsoft/sp-extension-base");
12
+ class FieldCustomizerContext extends _spextensionbase.ExtensionContext {
20
13
  /**
21
- * If the field customizer is bounded to the SharePoint list view, this provides access
22
- * to the list view specific functionality; otherwise the value is undefined.
23
- *
24
- * @remarks
25
- * Although the SharePoint list view is the main usage scenario, field customizers
26
- * can be used by other user interface surfaces. For example, in the future SharePoint
27
- * may support field customizers on a display/edit form.
28
- *
29
- * @returns the SharePoint list view, or undefined if there is none.
30
- */
31
- FieldCustomizerContext.prototype.tryGetListView = function () {
14
+ * If the field customizer is bounded to the SharePoint list view, this provides access
15
+ * to the list view specific functionality; otherwise the value is undefined.
16
+ *
17
+ * @remarks
18
+ * Although the SharePoint list view is the main usage scenario, field customizers
19
+ * can be used by other user interface surfaces. For example, in the future SharePoint
20
+ * may support field customizers on a display/edit form.
21
+ *
22
+ * @returns the SharePoint list view, or undefined if there is none.
23
+ */ tryGetListView() {
32
24
  return this._listView;
33
- };
34
- Object.defineProperty(FieldCustomizerContext.prototype, "field", {
35
- /**
36
- * Provides access to the SharePoint field that the customizer will operate on.
37
- */
38
- get: function () {
39
- return this._field;
40
- },
41
- enumerable: false,
42
- configurable: true
43
- });
44
- return FieldCustomizerContext;
45
- }(sp_extension_base_1.ExtensionContext));
46
- exports.default = FieldCustomizerContext;
47
- //# sourceMappingURL=FieldCustomizerContext.js.map
25
+ }
26
+ /**
27
+ * Provides access to the SharePoint field that the customizer will operate on.
28
+ */ get field() {
29
+ return this._field;
30
+ }
31
+ /**
32
+ * @internal
33
+ */ constructor(extensionContextParameters, fieldCustomizerContextParameters){
34
+ super(extensionContextParameters);
35
+ this._listView = fieldCustomizerContextParameters.listView;
36
+ this._field = fieldCustomizerContextParameters.field;
37
+ }
38
+ }
39
+
40
+ //# sourceMappingURL=./FieldCustomizerContext.js.map
@@ -1,137 +1,116 @@
1
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");
2
+ Object.defineProperty(exports, "__esModule", {
3
+ value: true
4
+ });
5
+ Object.defineProperty(exports, "default", {
6
+ enumerable: true,
7
+ get: function() {
8
+ return _default;
9
+ }
10
+ });
11
+ const _spextensionbase = require("@microsoft/sp-extension-base");
12
+ const _spcorelibrary = require("@microsoft/sp-core-library");
13
+ const _FormActionEventArgs = require("./FormActionEventArgs");
7
14
  /**
8
15
  * This is the base class that third parties should extend when implementing
9
16
  * a client-side extension that provides a custom list form (display, new, edit) for a SharePoint list.
10
17
  * @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
+ */ class BaseFormCustomizer extends _spextensionbase.BaseExtension {
19
+ // Readonly protected properties. To change these to readonly once TypeScript supports that feature.
20
+ /**
21
+ * This property is a pointer to the root DOM element of the form. This is a DIV element and contains the whole
22
+ * DOM subtree of the form.
23
+ *
24
+ * @readonly
25
+ */ get domElement() {
26
+ return this.context.domElement;
18
27
  }
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
28
  /**
60
- * @internal
61
- */
62
- BaseFormCustomizer.prototype._init = function (context, propertiesJson, additionalInitParameters) {
29
+ * Display mode of the form: Edit, Display or New.
30
+ *
31
+ * @readonly
32
+ */ get displayMode() {
33
+ return this._displayMode;
34
+ }
35
+ /**
36
+ * Event that gets raised every time the selected items in the list view change.
37
+ * Reserved for the future.
38
+ *
39
+ * @eventproperty
40
+ * @internal
41
+ */ get formActionEvent() {
42
+ return this._formActionEvent;
43
+ }
44
+ /**
45
+ * @internal
46
+ */ _init(context, propertiesJson, additionalInitParameters) {
63
47
  if (additionalInitParameters) {
64
48
  this._displayMode = additionalInitParameters.displayMode;
65
49
  }
66
- return _super.prototype._init.call(this, context, propertiesJson, additionalInitParameters);
67
- };
50
+ return super._init(context, propertiesJson, additionalInitParameters);
51
+ }
68
52
  /**
69
- * @internal
70
- */
71
- BaseFormCustomizer.prototype._internalRender = function () {
53
+ * @internal
54
+ */ _internalRender() {
72
55
  this.render();
73
- };
56
+ }
74
57
  /**
75
- * Internal API to set form's display mode.
76
- * @internal
77
- */
78
- BaseFormCustomizer.prototype._internalSetDisplayMode = function (newDisplayMode) {
58
+ * Internal API to set form's display mode.
59
+ * @internal
60
+ */ _internalSetDisplayMode(newDisplayMode) {
79
61
  this._displayMode = newDisplayMode;
80
- };
62
+ }
81
63
  /**
82
- * Use this method to initiate saving of the form.
83
- *
84
- * @internal
85
- */
86
- BaseFormCustomizer.prototype._save = function () {
87
- sp_core_library_1._SPEventManager.instance.raiseStickyEvent(BaseFormCustomizer._formActionEventName, new FormActionEventArgs_1.FormActionEventArgs(FormActionEventArgs_1.FormAction.Save));
88
- };
64
+ * Use this method to initiate saving of the form.
65
+ *
66
+ * @internal
67
+ */ _save() {
68
+ _spcorelibrary._SPEventManager.instance.raiseStickyEvent(BaseFormCustomizer._formActionEventName, new _FormActionEventArgs.FormActionEventArgs(_FormActionEventArgs.FormAction.Save));
69
+ }
89
70
  /**
90
- * Use this method to initiate closing/cancelling of the form.
91
- *
92
- * @internal
93
- */
94
- BaseFormCustomizer.prototype._close = function () {
95
- sp_core_library_1._SPEventManager.instance.raiseStickyEvent(BaseFormCustomizer._formActionEventName, new FormActionEventArgs_1.FormActionEventArgs(FormActionEventArgs_1.FormAction.Close));
96
- };
71
+ * Use this method to initiate closing/cancelling of the form.
72
+ *
73
+ * @internal
74
+ */ _close() {
75
+ _spcorelibrary._SPEventManager.instance.raiseStickyEvent(BaseFormCustomizer._formActionEventName, new _FormActionEventArgs.FormActionEventArgs(_FormActionEventArgs.FormAction.Close));
76
+ }
97
77
  /**
98
- * Disposes the component.
99
- *
100
- * @remarks
101
- * Please, do not override this method.
102
- * Override the `onDispose` method instead.
103
- */
104
- BaseFormCustomizer.prototype.dispose = function () {
105
- sp_core_library_1._SPEventManager.instance.removeEvent(BaseFormCustomizer._formActionEventName);
106
- _super.prototype.dispose.call(this);
107
- };
78
+ * Disposes the component.
79
+ *
80
+ * @remarks
81
+ * Please, do not override this method.
82
+ * Override the `onDispose` method instead.
83
+ */ dispose() {
84
+ _spcorelibrary._SPEventManager.instance.removeEvent(BaseFormCustomizer._formActionEventName);
85
+ super.dispose();
86
+ }
108
87
  /**
109
- * @internal
110
- */
111
- BaseFormCustomizer.prototype._initializeExtensionType = function () {
112
- _super.prototype._initializeExtensionType.call(this);
88
+ * @internal
89
+ */ _initializeExtensionType() {
90
+ super._initializeExtensionType();
113
91
  this.context._host.logEngagement('init');
114
- };
92
+ }
115
93
  /**
116
- * Call this method after the form has been saved to inform the application that the form has been saved.
117
- */
118
- BaseFormCustomizer.prototype.formSaved = function () {
94
+ * Call this method after the form has been saved to inform the application that the form has been saved.
95
+ */ formSaved() {
119
96
  this.context._host.onSave();
120
- };
97
+ }
121
98
  /**
122
- * Call this method after the form has been closed/cancelled to inform the application that the form has been closed.
123
- */
124
- BaseFormCustomizer.prototype.formClosed = function () {
99
+ * Call this method after the form has been closed/cancelled to inform the application that the form has been closed.
100
+ */ formClosed() {
125
101
  this.context._host.onClose();
126
- };
127
- /**
128
- * SPEvent name when the form action should be performed.
129
- *
130
- * @internal
131
- */
132
- BaseFormCustomizer._formActionEventName = 'formCustomizer.formAction';
133
- return BaseFormCustomizer;
134
- }(sp_extension_base_1.BaseExtension));
135
- (0, sp_core_library_1._ES5CompatibleClass)(BaseFormCustomizer);
136
- exports.default = BaseFormCustomizer;
137
- //# sourceMappingURL=BaseFormCustomizer.js.map
102
+ }
103
+ constructor(...args){
104
+ super(...args);
105
+ this._formActionEvent = new _spcorelibrary.SPEvent(BaseFormCustomizer._formActionEventName);
106
+ }
107
+ }
108
+ /**
109
+ * SPEvent name when the form action should be performed.
110
+ *
111
+ * @internal
112
+ */ BaseFormCustomizer._formActionEventName = 'formCustomizer.formAction';
113
+ (0, _spcorelibrary._ES5CompatibleClass)(BaseFormCustomizer);
114
+ const _default = BaseFormCustomizer;
115
+
116
+ //# sourceMappingURL=./BaseFormCustomizer.js.map