gd-sprest 8.2.6 → 8.2.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/executor.d.ts +1 -1
- package/@types/helper/spCfg.d.ts +3 -0
- package/build/helper/spCfg.js +13 -1
- package/build/mapper/def.js +11 -0
- package/build/rest.js +1 -1
- package/dist/gd-sprest.d.ts +4 -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/helper/spCfg.d.ts
CHANGED
|
@@ -378,6 +378,9 @@ export interface ISPCfgListInfo {
|
|
|
378
378
|
/** The title default value. */
|
|
379
379
|
TitleFieldDefaultValue?: string;
|
|
380
380
|
|
|
381
|
+
/** The title description. */
|
|
382
|
+
TitleFieldDescription?: string;
|
|
383
|
+
|
|
381
384
|
/** The title display name. */
|
|
382
385
|
TitleFieldDisplayName?: string;
|
|
383
386
|
|
package/build/helper/spCfg.js
CHANGED
|
@@ -988,13 +988,19 @@ exports.SPConfig = function (cfg, webUrl) {
|
|
|
988
988
|
// Return a promise
|
|
989
989
|
return new Promise(function (resolve, reject) {
|
|
990
990
|
// Ensure an update is required
|
|
991
|
-
if (cfgList.
|
|
991
|
+
if (cfgList.TitleFieldDefaultValue || cfgList.TitleFieldDescription || cfgList.TitleFieldDisplayName ||
|
|
992
|
+
cfgList.TitleFieldIndexed || cfgList.TitleFieldRequired || cfgList.TitleFieldUniqueValues) {
|
|
992
993
|
var values = {};
|
|
993
994
|
// See if we are setting a default value
|
|
994
995
|
if (cfgList.TitleFieldDefaultValue) {
|
|
995
996
|
// Update the values
|
|
996
997
|
values["DefaultValue"] = cfgList.TitleFieldDefaultValue;
|
|
997
998
|
}
|
|
999
|
+
// See if we are setting the description
|
|
1000
|
+
if (cfgList.TitleFieldDescription) {
|
|
1001
|
+
// Update the values
|
|
1002
|
+
values["Description"] = cfgList.TitleFieldDescription;
|
|
1003
|
+
}
|
|
998
1004
|
// See if the title field is being updated
|
|
999
1005
|
if (cfgList.TitleFieldDisplayName) {
|
|
1000
1006
|
// Update the values
|
|
@@ -1019,8 +1025,12 @@ exports.SPConfig = function (cfg, webUrl) {
|
|
|
1019
1025
|
// Update the field name
|
|
1020
1026
|
list.Fields.getByInternalNameOrTitle("Title").update(values).execute(function () {
|
|
1021
1027
|
// Log
|
|
1028
|
+
cfgList.TitleFieldDefaultValue ? logMessage("[gd-sprest][List] The 'Title' field's default value was updated to '" + cfgList.TitleFieldDefaultValue + "'.") : null;
|
|
1029
|
+
cfgList.TitleFieldDescription ? logMessage("[gd-sprest][List] The 'Title' field's description was updated to '" + cfgList.TitleFieldDescription + "'.") : null;
|
|
1022
1030
|
cfgList.TitleFieldDisplayName ? logMessage("[gd-sprest][List] The 'Title' field's display name was updated to '" + cfgList.TitleFieldDisplayName + "'.") : null;
|
|
1023
1031
|
cfgList.TitleFieldIndexed ? logMessage("[gd-sprest][List] The 'Title' field's has been indexed.") : null;
|
|
1032
|
+
cfgList.TitleFieldRequired ? logMessage("[gd-sprest][List] The 'Title' field's required flag was updated to '" + cfgList.TitleFieldRequired + "'.") : null;
|
|
1033
|
+
cfgList.TitleFieldUniqueValues ? logMessage("[gd-sprest][List] The 'Title' field's unique values flag was updated to '" + cfgList.TitleFieldUniqueValues + "'.") : null;
|
|
1024
1034
|
// Resolve the promise
|
|
1025
1035
|
resolve();
|
|
1026
1036
|
}, reject);
|
|
@@ -1049,6 +1059,8 @@ exports.SPConfig = function (cfg, webUrl) {
|
|
|
1049
1059
|
view.ViewFields().removeAllViewFields().execute(true);
|
|
1050
1060
|
// Parse the view fields
|
|
1051
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.");
|
|
1052
1064
|
// Add the view field
|
|
1053
1065
|
view.ViewFields().addViewField(cfg.ViewFields[i]).execute(true);
|
|
1054
1066
|
}
|
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
|
@@ -2125,7 +2125,7 @@ declare module 'gd-sprest/helper/executor' {
|
|
|
2125
2125
|
* Executor
|
|
2126
2126
|
*/
|
|
2127
2127
|
export interface IExecutor {
|
|
2128
|
-
<T = any>(methodParams: Array<T>, method: (param: T) => PromiseLike<any |
|
|
2128
|
+
<T = any>(methodParams: Array<T>, method: (param: T) => PromiseLike<any | void> | void, onExecuted?: (...args) => PromiseLike<any | undefined> | void): PromiseLike<any | undefined>;
|
|
2129
2129
|
}
|
|
2130
2130
|
}
|
|
2131
2131
|
|
|
@@ -3858,6 +3858,9 @@ declare module 'gd-sprest/helper/spCfg' {
|
|
|
3858
3858
|
/** The title default value. */
|
|
3859
3859
|
TitleFieldDefaultValue?: string;
|
|
3860
3860
|
|
|
3861
|
+
/** The title description. */
|
|
3862
|
+
TitleFieldDescription?: string;
|
|
3863
|
+
|
|
3861
3864
|
/** The title display name. */
|
|
3862
3865
|
TitleFieldDisplayName?: string;
|
|
3863
3866
|
|