gd-sprest 8.1.4 → 8.1.6
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/methods/loadSPCore.d.ts +1 -1
- package/build/helper/methods/loadSPCore.js +6 -1
- package/build/helper/spCfg.js +2 -2
- package/build/rest.js +1 -1
- package/build/utils/batch.js +17 -6
- package/dist/gd-sprest.d.ts +1 -1
- package/dist/gd-sprest.js +1 -1
- package/dist/gd-sprest.min.js +1 -1
- package/package.json +1 -1
|
@@ -5,11 +5,16 @@ var executor_1 = require("../executor");
|
|
|
5
5
|
/**
|
|
6
6
|
* Loads the core SharePoint JavaScript library for JSOM.
|
|
7
7
|
*/
|
|
8
|
-
exports.loadSPCore = function () {
|
|
8
|
+
exports.loadSPCore = function (additionalLibs) {
|
|
9
9
|
// Return a promise
|
|
10
10
|
return new Promise(function (resolve) {
|
|
11
11
|
// Define the core libraries to load
|
|
12
12
|
var libs = ["init", "MicrosoftAjax", "SP.Runtime", "SP", "SP.Init"];
|
|
13
|
+
// See if we are loading additional libraries
|
|
14
|
+
if (additionalLibs && additionalLibs.length > 0) {
|
|
15
|
+
// Append the libs
|
|
16
|
+
libs = libs.concat(additionalLibs);
|
|
17
|
+
}
|
|
13
18
|
// Parse the libraries
|
|
14
19
|
var counter = 0;
|
|
15
20
|
executor_1.Executor(libs, function (libName) {
|
package/build/helper/spCfg.js
CHANGED
|
@@ -1172,8 +1172,8 @@ exports.SPConfig = function (cfg, webUrl) {
|
|
|
1172
1172
|
resolve(null);
|
|
1173
1173
|
return;
|
|
1174
1174
|
}
|
|
1175
|
-
// Load the core
|
|
1176
|
-
_1.loadSPCore().then(function () { resolve(null); });
|
|
1175
|
+
// Load the core and taxonomy libraries
|
|
1176
|
+
_1.loadSPCore(["sp.taxonomy"]).then(function () { resolve(null); });
|
|
1177
1177
|
});
|
|
1178
1178
|
};
|
|
1179
1179
|
// Return a promise
|
package/build/rest.js
CHANGED
package/build/utils/batch.js
CHANGED
|
@@ -42,12 +42,23 @@ var Batch = /** @class */ (function () {
|
|
|
42
42
|
}]);
|
|
43
43
|
}
|
|
44
44
|
else {
|
|
45
|
-
//
|
|
46
|
-
base.base.batchRequests[base.base.batchRequests.length - 1].
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
45
|
+
// Batch requests are limited to 100 per execution, so we need to add a check for this
|
|
46
|
+
if (base.base.batchRequests[base.base.batchRequests.length - 1].length == 100) {
|
|
47
|
+
// Create a new request
|
|
48
|
+
base.base.batchRequests.push([{
|
|
49
|
+
callback: callback,
|
|
50
|
+
changesetId: lib_1.ContextInfo.generateGUID(),
|
|
51
|
+
targetInfo: new _1.TargetInfo(base.targetInfo)
|
|
52
|
+
}]);
|
|
53
|
+
}
|
|
54
|
+
else {
|
|
55
|
+
// Append the request
|
|
56
|
+
base.base.batchRequests[base.base.batchRequests.length - 1].push({
|
|
57
|
+
callback: callback,
|
|
58
|
+
changesetId: lib_1.ContextInfo.generateGUID(),
|
|
59
|
+
targetInfo: new _1.TargetInfo(base.targetInfo)
|
|
60
|
+
});
|
|
61
|
+
}
|
|
51
62
|
}
|
|
52
63
|
// Return this object
|
|
53
64
|
return base;
|
package/dist/gd-sprest.d.ts
CHANGED