gd-sprest 8.2.7 → 8.2.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/@types/helper/executor.d.ts +1 -1
- package/@types/lib/search.d.ts +1 -0
- package/build/helper/spCfg.js +2 -0
- package/build/lib/search.js +3 -1
- package/build/mapper/def.js +11 -0
- package/build/rest.js +1 -1
- package/dist/gd-sprest.d.ts +2 -1
- package/dist/gd-sprest.js +1 -1
- package/dist/gd-sprest.min.js +1 -1
- package/package.json +2 -2
|
@@ -10,5 +10,5 @@ export const Executor: IExecutor;
|
|
|
10
10
|
* Executor
|
|
11
11
|
*/
|
|
12
12
|
export interface IExecutor {
|
|
13
|
-
<T = any>(methodParams: Array<T>, method: (param: T) => PromiseLike<any |
|
|
13
|
+
<T = any>(methodParams: Array<T>, method: (param: T) => PromiseLike<any | void> | void, onExecuted?: (...args) => PromiseLike<any | undefined> | void): PromiseLike<any | undefined>;
|
|
14
14
|
}
|
package/@types/lib/search.d.ts
CHANGED
package/build/helper/spCfg.js
CHANGED
|
@@ -1059,6 +1059,8 @@ exports.SPConfig = function (cfg, webUrl) {
|
|
|
1059
1059
|
view.ViewFields().removeAllViewFields().execute(true);
|
|
1060
1060
|
// Parse the view fields
|
|
1061
1061
|
for (var i = 0; i < cfg.ViewFields.length; i++) {
|
|
1062
|
+
// Log
|
|
1063
|
+
logMessage("[gd-sprest][View] Add view field '" + cfg.ViewFields[i] + "' to the view.");
|
|
1062
1064
|
// Add the view field
|
|
1063
1065
|
view.ViewFields().addViewField(cfg.ViewFields[i]).execute(true);
|
|
1064
1066
|
}
|
package/build/lib/search.js
CHANGED
|
@@ -46,6 +46,8 @@ exports.Search.postQuery = function (props) {
|
|
|
46
46
|
// Return a promise
|
|
47
47
|
return new Promise(function (resolve, reject) {
|
|
48
48
|
var queryProps = props.query;
|
|
49
|
+
// Set the get all items flag
|
|
50
|
+
var getAllItems = typeof (props.getAllItems) === "boolean" ? props.getAllItems : false;
|
|
49
51
|
// Compute the row count
|
|
50
52
|
var rowCount = 500;
|
|
51
53
|
if (typeof (queryProps.RowLimit) === "number") {
|
|
@@ -78,7 +80,7 @@ exports.Search.postQuery = function (props) {
|
|
|
78
80
|
props.onQueryCompleted ? props.onQueryCompleted(request.postquery) : null;
|
|
79
81
|
// See if more results exist
|
|
80
82
|
var results = request.postquery.PrimaryQueryResult.RelevantResults;
|
|
81
|
-
if (results.TotalRows > results.RowCount) {
|
|
83
|
+
if (getAllItems && results.TotalRows > results.RowCount) {
|
|
82
84
|
var search = exports.Search(props.url, props.targetInfo);
|
|
83
85
|
var useBatch = typeof (props.useBatch) === "boolean" ? props.useBatch : true;
|
|
84
86
|
// Compute the total # of requests that we need to make
|
package/build/mapper/def.js
CHANGED
|
@@ -6936,12 +6936,23 @@ exports.Mapper = {
|
|
|
6936
6936
|
},
|
|
6937
6937
|
setShowInDisplayForm: {
|
|
6938
6938
|
argNames: ["value"],
|
|
6939
|
+
requestType: utils_1.RequestType.PostWithArgsValueOnly
|
|
6939
6940
|
},
|
|
6940
6941
|
setShowInEditForm: {
|
|
6941
6942
|
argNames: ["value"],
|
|
6943
|
+
requestType: utils_1.RequestType.PostWithArgsValueOnly
|
|
6942
6944
|
},
|
|
6943
6945
|
setShowInNewForm: {
|
|
6944
6946
|
argNames: ["value"],
|
|
6947
|
+
requestType: utils_1.RequestType.PostWithArgsValueOnly
|
|
6948
|
+
},
|
|
6949
|
+
update: {
|
|
6950
|
+
argNames: ["properties"],
|
|
6951
|
+
inheritMetadataType: true,
|
|
6952
|
+
metadataType: "SP.Field",
|
|
6953
|
+
name: "",
|
|
6954
|
+
requestMethod: "MERGE",
|
|
6955
|
+
requestType: utils_1.RequestType.PostBodyNoArgs
|
|
6945
6956
|
},
|
|
6946
6957
|
},
|
|
6947
6958
|
"SP.TenantSettings": {
|
package/build/rest.js
CHANGED
package/dist/gd-sprest.d.ts
CHANGED
|
@@ -1613,6 +1613,7 @@ declare module 'gd-sprest/lib/search' {
|
|
|
1613
1613
|
* Search Post Query
|
|
1614
1614
|
*/
|
|
1615
1615
|
export interface ISearchPostQuery {
|
|
1616
|
+
getAllItems?: boolean;
|
|
1616
1617
|
onQueryCompleted?: (results: SearchResult) => void;
|
|
1617
1618
|
query: SearchRequest
|
|
1618
1619
|
targetInfo?: ITargetInfoProps;
|
|
@@ -2125,7 +2126,7 @@ declare module 'gd-sprest/helper/executor' {
|
|
|
2125
2126
|
* Executor
|
|
2126
2127
|
*/
|
|
2127
2128
|
export interface IExecutor {
|
|
2128
|
-
<T = any>(methodParams: Array<T>, method: (param: T) => PromiseLike<any |
|
|
2129
|
+
<T = any>(methodParams: Array<T>, method: (param: T) => PromiseLike<any | void> | void, onExecuted?: (...args) => PromiseLike<any | undefined> | void): PromiseLike<any | undefined>;
|
|
2129
2130
|
}
|
|
2130
2131
|
}
|
|
2131
2132
|
|