spitfirepm 23.9000.3 → 23.9000.5
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/dist/sfRESTClient.d.ts +22 -3
- package/dist/sfRESTClient.js +52 -18
- package/dist/sfRESTClient.js.map +1 -1
- package/package.json +1 -1
package/dist/sfRESTClient.d.ts
CHANGED
|
@@ -141,13 +141,22 @@ declare class PartStorageData {
|
|
|
141
141
|
* @param client sfRestClient
|
|
142
142
|
* @param partName something like ActionItems or ProjectCA
|
|
143
143
|
* @param forDocType GUID
|
|
144
|
-
* @param forProject project ID
|
|
144
|
+
* @param forProject project ID; if empty client.GetPageProjectKey() is used
|
|
145
145
|
* @param context
|
|
146
146
|
* @param usingCfg if supplied, stored, otherwise resolved
|
|
147
147
|
* @returns
|
|
148
|
+
* @see RegisterRestoredCFG
|
|
148
149
|
*/
|
|
149
150
|
static PartStorageDataFactory(client: sfRestClient, partName: string, forDocType: GUID | undefined, forProject: GUID | undefined, context: string | undefined, usingCfg?: UIDisplayPart): PartStorageData;
|
|
150
|
-
|
|
151
|
+
/**
|
|
152
|
+
*
|
|
153
|
+
* @param client
|
|
154
|
+
* @param lookupName
|
|
155
|
+
* @param usingCfg
|
|
156
|
+
* @returns
|
|
157
|
+
* @see RegisterRestoredLookupCFG
|
|
158
|
+
*/
|
|
159
|
+
static PartStorageDataLookupFactory(client: sfRestClient, lookupName: string, usingCfg?: UIDisplayPart): PartStorageData;
|
|
151
160
|
static GetPartContextKey(partName: string, forDocType: GUID | undefined, forProject: GUID | undefined, context: string | undefined): PartContextKey;
|
|
152
161
|
GetDataModelBuildContextKey(): string;
|
|
153
162
|
protected constructor(client: sfRestClient, partName: string, forDocType: GUID | undefined, forProject: GUID | undefined, context: string | undefined);
|
|
@@ -426,6 +435,14 @@ export declare class sfRestClient {
|
|
|
426
435
|
* @see GetPartCFG
|
|
427
436
|
*/
|
|
428
437
|
RegisterRestoredCFG(partName: string, forDocType?: GUID, forProject?: string, partContext?: string, recoveredCFG?: UIDisplayPart): UIDisplayPart;
|
|
438
|
+
/**
|
|
439
|
+
* Tell the cfg manager about a lookup that was recovered from local storage
|
|
440
|
+
* @param lookupName
|
|
441
|
+
* @param recoveredCFG NOT optional, you are responsible for it being current
|
|
442
|
+
* @returns the cfg object
|
|
443
|
+
* @see GetPartCFG
|
|
444
|
+
*/
|
|
445
|
+
RegisterRestoredLookupCFG(lookupName: string, recoveredCFG: UIDisplayPart): UIDisplayPart;
|
|
429
446
|
/**
|
|
430
447
|
* Async Get of Lookup column configuration data
|
|
431
448
|
* @param lookupName name of required Lookup
|
|
@@ -540,7 +557,9 @@ export declare class sfRestClient {
|
|
|
540
557
|
protected static _SessionClientGetWCC: _SessionClientGetWCCShare | null;
|
|
541
558
|
protected static _SessionClientGetUCFKMap: JQueryXHR | null;
|
|
542
559
|
private static _MakeFakeWCC;
|
|
543
|
-
/** applies changes to connection properties
|
|
560
|
+
/** applies changes to connection properties
|
|
561
|
+
* @see SharePageContext
|
|
562
|
+
*/
|
|
544
563
|
UpdateWCCData(newWCC: WCCData): WCCData;
|
|
545
564
|
/**
|
|
546
565
|
* For each passed URI, If page does not already have a matching SCRIPT element, adds one
|
package/dist/sfRESTClient.js
CHANGED
|
@@ -8,7 +8,7 @@ const BrowserExtensionChecker_1 = require("./BrowserExtensionChecker");
|
|
|
8
8
|
const RESTClientBase = require("./APIClientBase"); // avoid conflict with same in SwaggerClient when loaded by classic UI
|
|
9
9
|
const string_extensions_1 = require("./string.extensions");
|
|
10
10
|
//import {dialog} from "jquery-ui";
|
|
11
|
-
const ClientPackageVersion = "23.9000.
|
|
11
|
+
const ClientPackageVersion = "23.9000.5";
|
|
12
12
|
// originally modified for typescript and linter requirements by Uladzislau Kumakou of XB Software
|
|
13
13
|
var LoggingLevels;
|
|
14
14
|
(function (LoggingLevels) {
|
|
@@ -72,14 +72,17 @@ class PartStorageData {
|
|
|
72
72
|
* @param client sfRestClient
|
|
73
73
|
* @param partName something like ActionItems or ProjectCA
|
|
74
74
|
* @param forDocType GUID
|
|
75
|
-
* @param forProject project ID
|
|
75
|
+
* @param forProject project ID; if empty client.GetPageProjectKey() is used
|
|
76
76
|
* @param context
|
|
77
77
|
* @param usingCfg if supplied, stored, otherwise resolved
|
|
78
78
|
* @returns
|
|
79
|
+
* @see RegisterRestoredCFG
|
|
79
80
|
*/
|
|
80
81
|
static PartStorageDataFactory(client, partName, forDocType, forProject, context, usingCfg) {
|
|
81
|
-
|
|
82
|
-
|
|
82
|
+
if (!forProject)
|
|
83
|
+
forProject = client.GetPageProjectKey();
|
|
84
|
+
const ReferenceKey = PartStorageData.GetPartContextKey(partName, forDocType, forProject, context);
|
|
85
|
+
let thisPart;
|
|
83
86
|
if (PartStorageData._LoadedParts.has(ReferenceKey))
|
|
84
87
|
thisPart = PartStorageData._LoadedParts.get(ReferenceKey);
|
|
85
88
|
else {
|
|
@@ -91,7 +94,7 @@ class PartStorageData {
|
|
|
91
94
|
});
|
|
92
95
|
return thisPart;
|
|
93
96
|
}
|
|
94
|
-
|
|
97
|
+
const api = new SwaggerClients_1.UICFGClient(PartStorageData._SiteURL);
|
|
95
98
|
try {
|
|
96
99
|
thisPart._InitializationResultPromise = api.getLiveDisplay(partName, forDocType, forProject, context);
|
|
97
100
|
if (thisPart._InitializationResultPromise) {
|
|
@@ -108,13 +111,28 @@ class PartStorageData {
|
|
|
108
111
|
}
|
|
109
112
|
return thisPart;
|
|
110
113
|
}
|
|
111
|
-
|
|
114
|
+
/**
|
|
115
|
+
*
|
|
116
|
+
* @param client
|
|
117
|
+
* @param lookupName
|
|
118
|
+
* @param usingCfg
|
|
119
|
+
* @returns
|
|
120
|
+
* @see RegisterRestoredLookupCFG
|
|
121
|
+
*/
|
|
122
|
+
static PartStorageDataLookupFactory(client, lookupName, usingCfg) {
|
|
112
123
|
var ReferenceKey = PartStorageData.GetPartContextKey(lookupName, "lookup", "lookup", "lookup");
|
|
113
124
|
var thisPart;
|
|
114
125
|
if (PartStorageData._LoadedParts.has(ReferenceKey))
|
|
115
126
|
thisPart = PartStorageData._LoadedParts.get(ReferenceKey);
|
|
116
127
|
else {
|
|
117
128
|
thisPart = new PartStorageData(client, lookupName, "lookup", "lookup", "lookup");
|
|
129
|
+
if (usingCfg && usingCfg.PartName === lookupName) {
|
|
130
|
+
thisPart._InitializationResultPromise = new Promise((preloaded) => {
|
|
131
|
+
thisPart.CFG = usingCfg;
|
|
132
|
+
preloaded(usingCfg);
|
|
133
|
+
});
|
|
134
|
+
return thisPart;
|
|
135
|
+
}
|
|
118
136
|
var api = new SwaggerClients_1.UICFGClient(PartStorageData._SiteURL);
|
|
119
137
|
thisPart._InitializationResultPromise = api.getLookupDisplay(lookupName);
|
|
120
138
|
if (thisPart._InitializationResultPromise) {
|
|
@@ -1018,6 +1036,19 @@ class sfRestClient {
|
|
|
1018
1036
|
const thisPart = PartStorageData.PartStorageDataFactory(this, partName, forDocType, forProject, partContext, recoveredCFG);
|
|
1019
1037
|
return recoveredCFG;
|
|
1020
1038
|
}
|
|
1039
|
+
/**
|
|
1040
|
+
* Tell the cfg manager about a lookup that was recovered from local storage
|
|
1041
|
+
* @param lookupName
|
|
1042
|
+
* @param recoveredCFG NOT optional, you are responsible for it being current
|
|
1043
|
+
* @returns the cfg object
|
|
1044
|
+
* @see GetPartCFG
|
|
1045
|
+
*/
|
|
1046
|
+
RegisterRestoredLookupCFG(lookupName, recoveredCFG) {
|
|
1047
|
+
if (!recoveredCFG)
|
|
1048
|
+
throw new Error(`RegisterRestoredCFG(${lookupName}) requires recoveredCFG object `);
|
|
1049
|
+
const thisPart = PartStorageData.PartStorageDataLookupFactory(this, lookupName, recoveredCFG);
|
|
1050
|
+
return recoveredCFG;
|
|
1051
|
+
}
|
|
1021
1052
|
/**
|
|
1022
1053
|
* Async Get of Lookup column configuration data
|
|
1023
1054
|
* @param lookupName name of required Lookup
|
|
@@ -1878,17 +1909,18 @@ class sfRestClient {
|
|
|
1878
1909
|
sfRestClient.RecentDocumentList = [new _SwaggerClientExports.MenuAction()];
|
|
1879
1910
|
sfRestClient.RecentDocumentList[0].Enabled = false;
|
|
1880
1911
|
sfRestClient.RecentDocumentList[0].ItemText = ' (still loading...)';
|
|
1881
|
-
|
|
1882
|
-
.
|
|
1883
|
-
|
|
1884
|
-
|
|
1885
|
-
|
|
1886
|
-
|
|
1887
|
-
|
|
1888
|
-
|
|
1889
|
-
|
|
1890
|
-
|
|
1891
|
-
|
|
1912
|
+
if (!RESTClient.IsDocumentPage())
|
|
1913
|
+
api.getRecentDocs()
|
|
1914
|
+
.then((recentList) => {
|
|
1915
|
+
if (recentList)
|
|
1916
|
+
sfRestClient.RecentDocumentList = recentList;
|
|
1917
|
+
else
|
|
1918
|
+
sfRestClient.RecentDocumentList[0].ItemText = 'Documents will appear here as you open them';
|
|
1919
|
+
})
|
|
1920
|
+
.catch((reason) => {
|
|
1921
|
+
console.warn('LoadUserSessionInfo().getRecentDocs()', reason);
|
|
1922
|
+
sfRestClient.RecentDocumentList[0].ItemText = 'None available';
|
|
1923
|
+
});
|
|
1892
1924
|
}
|
|
1893
1925
|
if (!apiResult)
|
|
1894
1926
|
console.warn("LoadUserSessionInfo failed to getWCC");
|
|
@@ -1944,7 +1976,9 @@ class sfRestClient {
|
|
|
1944
1976
|
FakeWCC.UserKey = "00000000-0000-0000-0000-000000000000";
|
|
1945
1977
|
return FakeWCC;
|
|
1946
1978
|
}
|
|
1947
|
-
/** applies changes to connection properties
|
|
1979
|
+
/** applies changes to connection properties
|
|
1980
|
+
* @see SharePageContext
|
|
1981
|
+
*/
|
|
1948
1982
|
UpdateWCCData(newWCC) {
|
|
1949
1983
|
var RESTClient = this;
|
|
1950
1984
|
var ChangeList = new Map();
|