gd-sprest 8.0.6 → 8.0.8
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/@types/helper/spCfg.d.ts
CHANGED
|
@@ -520,7 +520,7 @@ export interface ISPConfigProps {
|
|
|
520
520
|
ListCfg?: Array<ISPCfgListInfo>;
|
|
521
521
|
|
|
522
522
|
/** Event for the logging of the configuration. */
|
|
523
|
-
onLogMessage?: (msg: string) => void;
|
|
523
|
+
onLogMessage?: (msg: string, isError?: boolean) => void;
|
|
524
524
|
|
|
525
525
|
/** The web part configuration. */
|
|
526
526
|
WebPartCfg?: Array<ISPCfgWebPartInfo>;
|
|
@@ -9,23 +9,30 @@ exports.loadSPCore = function () {
|
|
|
9
9
|
return new Promise(function (resolve) {
|
|
10
10
|
// Define the core libraries to load
|
|
11
11
|
var libs = ["init", "MicrosoftAjax", "SP.Runtime", "SP"];
|
|
12
|
-
|
|
13
|
-
for (var i = 0; i < libs.length; i++) {
|
|
12
|
+
var _loop_1 = function (i) {
|
|
14
13
|
var libName = libs[i];
|
|
15
14
|
// See if a script already exists
|
|
16
15
|
if (document.querySelector("script[title='" + libName + "']") == null) {
|
|
17
16
|
// Log
|
|
18
17
|
console.debug("[gd-sprest] Loading the core library: " + libName);
|
|
19
|
-
//
|
|
20
|
-
var
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
18
|
+
// Create the script element to load the library
|
|
19
|
+
var elScript_1 = document.createElement("script");
|
|
20
|
+
elScript_1.title = libName;
|
|
21
|
+
elScript_1.src = document.location.origin + "/_layouts/15/" + libName + ".js";
|
|
22
|
+
// Wait for the previous library to load
|
|
23
|
+
setTimeout(function () {
|
|
24
|
+
// Load the script
|
|
25
|
+
document.head.appendChild(elScript_1);
|
|
26
|
+
}, 10 * i);
|
|
24
27
|
}
|
|
25
28
|
else {
|
|
26
29
|
// Log
|
|
27
30
|
console.debug("[gd-sprest] Core library already loaded: " + libName);
|
|
28
31
|
}
|
|
32
|
+
};
|
|
33
|
+
// Parse the libraries
|
|
34
|
+
for (var i = 0; i < libs.length; i++) {
|
|
35
|
+
_loop_1(i);
|
|
29
36
|
}
|
|
30
37
|
// Resolve the request
|
|
31
38
|
resolve();
|
package/build/helper/spCfg.js
CHANGED
package/build/rest.js
CHANGED
package/dist/gd-sprest.d.ts
CHANGED
|
@@ -3997,7 +3997,7 @@ declare module 'gd-sprest/helper/spCfg' {
|
|
|
3997
3997
|
ListCfg?: Array<ISPCfgListInfo>;
|
|
3998
3998
|
|
|
3999
3999
|
/** Event for the logging of the configuration. */
|
|
4000
|
-
onLogMessage?: (msg: string) => void;
|
|
4000
|
+
onLogMessage?: (msg: string, isError?: boolean) => void;
|
|
4001
4001
|
|
|
4002
4002
|
/** The web part configuration. */
|
|
4003
4003
|
WebPartCfg?: Array<ISPCfgWebPartInfo>;
|