gd-sprest-bs 10.4.7 → 10.4.9
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/build/webparts/base/wpSpfx.js +31 -13
- package/dist/gd-sprest-bs-icons.js +1 -1
- package/dist/gd-sprest-bs-icons.min.js +1 -1
- package/dist/gd-sprest-bs.d.ts +1 -0
- package/dist/gd-sprest-bs.js +1 -1
- package/dist/gd-sprest-bs.min.js +1 -1
- package/package.json +1 -1
- package/src/webparts/base/types.d.ts +1 -0
- package/src/webparts/base/wpSPFx.ts +30 -11
|
@@ -21,6 +21,7 @@ var _SPFxWebPart = /** @class */ (function () {
|
|
|
21
21
|
/** The configuration modal. */
|
|
22
22
|
// Constructor
|
|
23
23
|
function _SPFxWebPart(props) {
|
|
24
|
+
var _this = this;
|
|
24
25
|
this._cfg = null;
|
|
25
26
|
this._props = null;
|
|
26
27
|
/** The configuration form. */
|
|
@@ -45,23 +46,40 @@ var _SPFxWebPart = /** @class */ (function () {
|
|
|
45
46
|
}
|
|
46
47
|
catch (_a) { }
|
|
47
48
|
}
|
|
48
|
-
//
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
if (isEdit) {
|
|
49
|
+
// Set the webpart properties pane to trigger the modal from displaying
|
|
50
|
+
var propertyPageConfig = this._props.spfx.getPropertyPaneConfiguration;
|
|
51
|
+
this._props.spfx.getPropertyPaneConfiguration = function () {
|
|
52
|
+
// Display the modal
|
|
53
|
+
_this._modal.show();
|
|
54
|
+
// Call the original event
|
|
55
|
+
return propertyPageConfig ? propertyPageConfig() : null;
|
|
56
|
+
};
|
|
57
|
+
// See if this is the workbench
|
|
58
|
+
if (window.location.pathname.indexOf("workbench.aspx") > 0) {
|
|
59
59
|
// Render the configuration button
|
|
60
60
|
this.renderEdit();
|
|
61
|
+
// Render the solution
|
|
62
|
+
this.render();
|
|
61
63
|
}
|
|
62
64
|
else {
|
|
63
|
-
//
|
|
64
|
-
|
|
65
|
+
// See if this is a classic page
|
|
66
|
+
if (gd_sprest_1.Helper.SP.Ribbon.exists) {
|
|
67
|
+
// Set the flag
|
|
68
|
+
isEdit = gd_sprest_1.Helper.WebPart.isEditMode();
|
|
69
|
+
}
|
|
70
|
+
else {
|
|
71
|
+
// Set the flag
|
|
72
|
+
isEdit = this._props.spfx.displayMode == gd_sprest_1.SPTypes.FormDisplayMode.Edit;
|
|
73
|
+
}
|
|
74
|
+
// Ensure we are in edit mode
|
|
75
|
+
if (isEdit) {
|
|
76
|
+
// Render the configuration button
|
|
77
|
+
this.renderEdit();
|
|
78
|
+
}
|
|
79
|
+
else {
|
|
80
|
+
// Render the webpart
|
|
81
|
+
this.render();
|
|
82
|
+
}
|
|
65
83
|
}
|
|
66
84
|
}
|
|
67
85
|
Object.defineProperty(_SPFxWebPart.prototype, "Form", {
|