@esri/solution-simple-types 1.1.2 → 1.2.0
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/esm/dashboard.d.ts +0 -1
- package/dist/esm/dashboard.js +55 -56
- package/dist/esm/dashboard.js.map +1 -1
- package/dist/esm/helpers/convert-item-to-template.d.ts +3 -2
- package/dist/esm/helpers/convert-item-to-template.js +35 -37
- package/dist/esm/helpers/convert-item-to-template.js.map +1 -1
- package/dist/esm/helpers/create-item-from-template.js +33 -41
- package/dist/esm/helpers/create-item-from-template.js.map +1 -1
- package/dist/esm/helpers/update-notebook-data.js +1 -1
- package/dist/esm/helpers/update-notebook-data.js.map +1 -1
- package/dist/esm/notebook.d.ts +3 -2
- package/dist/esm/notebook.js +16 -15
- package/dist/esm/notebook.js.map +1 -1
- package/dist/esm/oic.d.ts +3 -2
- package/dist/esm/oic.js +30 -29
- package/dist/esm/oic.js.map +1 -1
- package/dist/esm/quickcapture.d.ts +3 -2
- package/dist/esm/quickcapture.js +22 -21
- package/dist/esm/quickcapture.js.map +1 -1
- package/dist/esm/simple-types.d.ts +3 -2
- package/dist/esm/simple-types.js +4 -3
- package/dist/esm/simple-types.js.map +1 -1
- package/dist/esm/webmap.d.ts +3 -2
- package/dist/esm/webmap.js +39 -39
- package/dist/esm/webmap.js.map +1 -1
- package/dist/esm/webmappingapplication.d.ts +3 -2
- package/dist/esm/webmappingapplication.js +126 -128
- package/dist/esm/webmappingapplication.js.map +1 -1
- package/dist/esm/workforce.d.ts +3 -2
- package/dist/esm/workforce.js +4 -3
- package/dist/esm/workforce.js.map +1 -1
- package/dist/node/dashboard.d.ts +0 -1
- package/dist/node/dashboard.js +56 -57
- package/dist/node/dashboard.js.map +1 -1
- package/dist/node/helpers/convert-item-to-template.d.ts +3 -2
- package/dist/node/helpers/convert-item-to-template.js +43 -45
- package/dist/node/helpers/convert-item-to-template.js.map +1 -1
- package/dist/node/helpers/create-item-from-template.js +37 -45
- package/dist/node/helpers/create-item-from-template.js.map +1 -1
- package/dist/node/helpers/notebook-helpers.js +3 -3
- package/dist/node/helpers/notebook-helpers.js.map +1 -1
- package/dist/node/helpers/quickcapture-helpers.js +2 -2
- package/dist/node/helpers/quickcapture-helpers.js.map +1 -1
- package/dist/node/helpers/simple-type-helpers.js +2 -2
- package/dist/node/helpers/simple-type-helpers.js.map +1 -1
- package/dist/node/helpers/update-notebook-data.js +2 -2
- package/dist/node/helpers/update-notebook-data.js.map +1 -1
- package/dist/node/index.js +6 -6
- package/dist/node/index.js.map +1 -1
- package/dist/node/notebook.d.ts +3 -2
- package/dist/node/notebook.js +18 -17
- package/dist/node/notebook.js.map +1 -1
- package/dist/node/oic.d.ts +3 -2
- package/dist/node/oic.js +31 -30
- package/dist/node/oic.js.map +1 -1
- package/dist/node/quickcapture.d.ts +3 -2
- package/dist/node/quickcapture.js +24 -23
- package/dist/node/quickcapture.js.map +1 -1
- package/dist/node/simple-types.d.ts +3 -2
- package/dist/node/simple-types.js +9 -8
- package/dist/node/simple-types.js.map +1 -1
- package/dist/node/webmap.d.ts +3 -2
- package/dist/node/webmap.js +40 -40
- package/dist/node/webmap.js.map +1 -1
- package/dist/node/webmappingapplication.d.ts +3 -2
- package/dist/node/webmappingapplication.js +127 -129
- package/dist/node/webmappingapplication.js.map +1 -1
- package/dist/node/workforce.d.ts +3 -2
- package/dist/node/workforce.js +5 -4
- package/dist/node/workforce.js.map +1 -1
- package/dist/umd/dashboard.d.ts +0 -1
- package/dist/umd/helpers/convert-item-to-template.d.ts +3 -2
- package/dist/umd/notebook.d.ts +3 -2
- package/dist/umd/oic.d.ts +3 -2
- package/dist/umd/quickcapture.d.ts +3 -2
- package/dist/umd/simple-types.d.ts +3 -2
- package/dist/umd/simple-types.umd.js +2142 -2152
- package/dist/umd/simple-types.umd.js.map +1 -1
- package/dist/umd/simple-types.umd.min.js +3 -3
- package/dist/umd/simple-types.umd.min.js.map +1 -1
- package/dist/umd/webmap.d.ts +3 -2
- package/dist/umd/webmappingapplication.d.ts +3 -2
- package/dist/umd/workforce.d.ts +3 -2
- package/package.json +23 -23
|
@@ -19,11 +19,12 @@ import { ICreateItemFromTemplateResponse, IDatasourceInfo, IItemProgressCallback
|
|
|
19
19
|
*
|
|
20
20
|
* @param solutionItemId The solution to contain the template
|
|
21
21
|
* @param itemInfo Info about the item
|
|
22
|
-
* @param
|
|
22
|
+
* @param destAuthentication Credentials for requests to the destination organization
|
|
23
|
+
* @param srcAuthentication Credentials for requests to source items
|
|
23
24
|
* @param templateDictionary Hash of facts: folder id, org URL, adlib replacements
|
|
24
25
|
* @return A promise that will resolve when the template has been created
|
|
25
26
|
*/
|
|
26
|
-
export declare function convertItemToTemplate(solutionItemId: string, itemInfo: any,
|
|
27
|
+
export declare function convertItemToTemplate(solutionItemId: string, itemInfo: any, destAuthentication: UserSession, srcAuthentication: UserSession, templateDictionary: any): Promise<IItemTemplate>;
|
|
27
28
|
/**
|
|
28
29
|
* Delegate to simpleType creator
|
|
29
30
|
*
|
package/dist/esm/simple-types.js
CHANGED
|
@@ -29,12 +29,13 @@ import * as simpleTypeHelpers from "./helpers/simple-type-helpers";
|
|
|
29
29
|
*
|
|
30
30
|
* @param solutionItemId The solution to contain the template
|
|
31
31
|
* @param itemInfo Info about the item
|
|
32
|
-
* @param
|
|
32
|
+
* @param destAuthentication Credentials for requests to the destination organization
|
|
33
|
+
* @param srcAuthentication Credentials for requests to source items
|
|
33
34
|
* @param templateDictionary Hash of facts: folder id, org URL, adlib replacements
|
|
34
35
|
* @return A promise that will resolve when the template has been created
|
|
35
36
|
*/
|
|
36
|
-
export function convertItemToTemplate(solutionItemId, itemInfo,
|
|
37
|
-
return simpleTypeHelpers.convertItemToTemplate(solutionItemId, itemInfo,
|
|
37
|
+
export function convertItemToTemplate(solutionItemId, itemInfo, destAuthentication, srcAuthentication, templateDictionary) {
|
|
38
|
+
return simpleTypeHelpers.convertItemToTemplate(solutionItemId, itemInfo, destAuthentication, srcAuthentication, templateDictionary);
|
|
38
39
|
}
|
|
39
40
|
/**
|
|
40
41
|
* Delegate to simpleType creator
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"simple-types.js","sourceRoot":"","sources":["../../src/simple-types.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH;;;;GAIG;AAEH,OAAO,KAAK,SAAS,MAAM,aAAa,CAAC;AACzC,OAAO,KAAK,MAAM,MAAM,UAAU,CAAC;AACnC,OAAO,KAAK,qBAAqB,MAAM,yBAAyB,CAAC;AAEjE,OAAO,EAML,gCAAgC,EAEjC,MAAM,uBAAuB,CAAC;AAE/B,+CAA+C;AAC/C,OAAO,KAAK,iBAAiB,MAAM,+BAA+B,CAAC;AAEnE
|
|
1
|
+
{"version":3,"file":"simple-types.js","sourceRoot":"","sources":["../../src/simple-types.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH;;;;GAIG;AAEH,OAAO,KAAK,SAAS,MAAM,aAAa,CAAC;AACzC,OAAO,KAAK,MAAM,MAAM,UAAU,CAAC;AACnC,OAAO,KAAK,qBAAqB,MAAM,yBAAyB,CAAC;AAEjE,OAAO,EAML,gCAAgC,EAEjC,MAAM,uBAAuB,CAAC;AAE/B,+CAA+C;AAC/C,OAAO,KAAK,iBAAiB,MAAM,+BAA+B,CAAC;AAEnE;;;;;;;;;GASG;AACH,MAAM,UAAU,qBAAqB,CACnC,cAAsB,EACtB,QAAa,EACb,kBAA+B,EAC/B,iBAA8B,EAC9B,kBAAuB;IAEvB,OAAO,iBAAiB,CAAC,qBAAqB,CAC5C,cAAc,EACd,QAAQ,EACR,kBAAkB,EAClB,iBAAiB,EACjB,kBAAkB,CACnB,CAAC;AACJ,CAAC;AAED;;;;;;;GAOG;AACH,MAAM,UAAU,sBAAsB,CACpC,QAAuB,EACvB,kBAAuB,EACvB,yBAAsC,EACtC,oBAA2C;IAE3C,OAAO,iBAAiB,CAAC,sBAAsB,CAC7C,QAAQ,EACR,kBAAkB,EAClB,yBAAyB,EACzB,oBAAoB,CACrB,CAAC;AACJ,CAAC;AAED;;;;;;;;GAQG;AACH,MAAM,UAAU,0BAA0B,CACxC,gBAA+B,EAC/B,eAAkC,EAClC,IAAY;IAEZ,QAAQ,IAAI,EAAE;QACZ,KAAK,yBAAyB;YAC5B,qBAAqB,CAAC,0BAA0B,CAC9C,gBAAgB,EAChB,eAAe,CAChB,CAAC;YACF,MAAM;QACR,KAAK,WAAW;YACd,SAAS,CAAC,0BAA0B,CAAC,gBAAgB,EAAE,eAAe,CAAC,CAAC;YACxE,MAAM;QACR,KAAK,SAAS;YACZ,MAAM,CAAC,0BAA0B,CAAC,gBAAgB,EAAE,eAAe,CAAC,CAAC;YACrE,MAAM;KACT;IACD,OAAO,gBAAgB,CAAC;AAC1B,CAAC;AAED;;;;;;;;;GASG;AACH,MAAM,UAAU,WAAW,CACzB,MAAc,EACd,IAAY,EACZ,SAAgB,EAChB,QAAuB,EACvB,SAA0B,EAC1B,kBAAuB,EACvB,cAA2B;IAE3B,OAAO,gCAAgC,CACrC,MAAM,EACN,kBAAkB,EAClB,cAAc,CACf,CAAC;AACJ,CAAC"}
|
package/dist/esm/webmap.d.ts
CHANGED
|
@@ -18,10 +18,11 @@ import * as common from "@esri/solution-common";
|
|
|
18
18
|
* Converts an AGOL webmap item to a template.
|
|
19
19
|
*
|
|
20
20
|
* @param itemTemplate Template for the webmap item
|
|
21
|
-
* @param
|
|
21
|
+
* @param destAuthentication Credentials for requests to the destination organization
|
|
22
|
+
* @param srcAuthentication Credentials for requests to source items
|
|
22
23
|
* @return Template for the solution item that contains key details for item reconstruction
|
|
23
24
|
*/
|
|
24
|
-
export declare function convertItemToTemplate(itemTemplate: common.IItemTemplate,
|
|
25
|
+
export declare function convertItemToTemplate(itemTemplate: common.IItemTemplate, destAuthentication: common.UserSession, srcAuthentication: common.UserSession): Promise<common.IItemTemplate>;
|
|
25
26
|
/**
|
|
26
27
|
* Gets the ids of the dependencies of an AGOL webmap item.
|
|
27
28
|
*
|
package/dist/esm/webmap.js
CHANGED
|
@@ -19,24 +19,25 @@ import * as common from "@esri/solution-common";
|
|
|
19
19
|
*
|
|
20
20
|
* @protected
|
|
21
21
|
*/
|
|
22
|
-
|
|
22
|
+
const WEBMAP_APP_URL_PART = "home/webmap/viewer.html?webmap=";
|
|
23
23
|
// ------------------------------------------------------------------------------------------------------------------ //
|
|
24
24
|
/**
|
|
25
25
|
* Converts an AGOL webmap item to a template.
|
|
26
26
|
*
|
|
27
27
|
* @param itemTemplate Template for the webmap item
|
|
28
|
-
* @param
|
|
28
|
+
* @param destAuthentication Credentials for requests to the destination organization
|
|
29
|
+
* @param srcAuthentication Credentials for requests to source items
|
|
29
30
|
* @return Template for the solution item that contains key details for item reconstruction
|
|
30
31
|
*/
|
|
31
|
-
export function convertItemToTemplate(itemTemplate,
|
|
32
|
-
return new Promise(
|
|
32
|
+
export function convertItemToTemplate(itemTemplate, destAuthentication, srcAuthentication) {
|
|
33
|
+
return new Promise((resolve, reject) => {
|
|
33
34
|
// Templatize the app URL
|
|
34
35
|
itemTemplate.item.url =
|
|
35
36
|
common.checkUrlPathTermination(common.placeholder(common.SERVER_NAME)) +
|
|
36
37
|
WEBMAP_APP_URL_PART +
|
|
37
38
|
itemTemplate.item.id; // templatized id
|
|
38
39
|
// Extract dependencies
|
|
39
|
-
_extractDependencies(itemTemplate,
|
|
40
|
+
_extractDependencies(itemTemplate, srcAuthentication).then((results) => {
|
|
40
41
|
itemTemplate.dependencies = results.dependencies;
|
|
41
42
|
// Templatize the map layer ids after we've extracted them as dependencies
|
|
42
43
|
if (itemTemplate.data) {
|
|
@@ -46,7 +47,7 @@ export function convertItemToTemplate(itemTemplate, authentication) {
|
|
|
46
47
|
_excludeInitialState(itemTemplate.data);
|
|
47
48
|
}
|
|
48
49
|
resolve(itemTemplate);
|
|
49
|
-
},
|
|
50
|
+
}, e => reject(common.fail(e)));
|
|
50
51
|
});
|
|
51
52
|
}
|
|
52
53
|
/**
|
|
@@ -58,15 +59,15 @@ export function convertItemToTemplate(itemTemplate, authentication) {
|
|
|
58
59
|
* @protected
|
|
59
60
|
*/
|
|
60
61
|
export function _extractDependencies(itemTemplate, authentication) {
|
|
61
|
-
return new Promise(
|
|
62
|
-
|
|
62
|
+
return new Promise((resolve, reject) => {
|
|
63
|
+
const dependencies = [];
|
|
63
64
|
if (itemTemplate.data) {
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
_getLayerIds(layersAndTables, dependencies, authentication).then(
|
|
65
|
+
const layers = itemTemplate.data.operationalLayers || [];
|
|
66
|
+
const tables = itemTemplate.data.tables || [];
|
|
67
|
+
const layersAndTables = layers.concat(tables);
|
|
68
|
+
_getLayerIds(layersAndTables, dependencies, authentication).then(results => {
|
|
68
69
|
resolve(results);
|
|
69
|
-
},
|
|
70
|
+
}, e => reject(common.fail(e)));
|
|
70
71
|
}
|
|
71
72
|
else {
|
|
72
73
|
resolve({
|
|
@@ -99,18 +100,18 @@ export function _excludeInitialState(data) {
|
|
|
99
100
|
* @protected
|
|
100
101
|
*/
|
|
101
102
|
export function _getLayerIds(layerList, dependencies, authentication) {
|
|
102
|
-
return new Promise(
|
|
103
|
-
|
|
104
|
-
|
|
103
|
+
return new Promise((resolve, reject) => {
|
|
104
|
+
const urlHash = {};
|
|
105
|
+
const options = {
|
|
105
106
|
f: "json",
|
|
106
107
|
authentication: authentication
|
|
107
108
|
};
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
109
|
+
const layerPromises = [];
|
|
110
|
+
const layerChecks = {};
|
|
111
|
+
const layers = layerList.filter(layer => {
|
|
111
112
|
if (layer.url && layer.url.indexOf("{{velocityUrl}}") < 0) {
|
|
112
|
-
|
|
113
|
-
|
|
113
|
+
const results = /.+FeatureServer/g.exec(layer.url);
|
|
114
|
+
const baseUrl = Array.isArray(results) && results.length > 0 ? results[0] : undefined;
|
|
114
115
|
if (baseUrl) {
|
|
115
116
|
// avoid redundant checks when we have a layer with subLayers
|
|
116
117
|
if (Object.keys(layerChecks).indexOf(baseUrl) < 0) {
|
|
@@ -128,10 +129,10 @@ export function _getLayerIds(layerList, dependencies, authentication) {
|
|
|
128
129
|
}
|
|
129
130
|
});
|
|
130
131
|
if (layerPromises.length > 0) {
|
|
131
|
-
Promise.all(layerPromises).then(
|
|
132
|
-
serviceResponses.forEach(
|
|
132
|
+
Promise.all(layerPromises).then(serviceResponses => {
|
|
133
|
+
serviceResponses.forEach((serviceResponse, i) => {
|
|
133
134
|
if (common.getProp(serviceResponse, "serviceItemId")) {
|
|
134
|
-
|
|
135
|
+
const id = serviceResponse.serviceItemId;
|
|
135
136
|
if (dependencies.indexOf(id) < 0) {
|
|
136
137
|
dependencies.push(id);
|
|
137
138
|
}
|
|
@@ -142,7 +143,7 @@ export function _getLayerIds(layerList, dependencies, authentication) {
|
|
|
142
143
|
dependencies: dependencies,
|
|
143
144
|
urlHash: urlHash
|
|
144
145
|
});
|
|
145
|
-
},
|
|
146
|
+
}, e => reject(common.fail(e)));
|
|
146
147
|
}
|
|
147
148
|
else {
|
|
148
149
|
resolve({
|
|
@@ -160,12 +161,11 @@ export function _getLayerIds(layerList, dependencies, authentication) {
|
|
|
160
161
|
* @return void
|
|
161
162
|
* @protected
|
|
162
163
|
*/
|
|
163
|
-
export function _templatizeWebmapLayerIdsAndUrls(layerList, urlHash) {
|
|
164
|
-
|
|
165
|
-
layerList.forEach(function (layer) {
|
|
164
|
+
export function _templatizeWebmapLayerIdsAndUrls(layerList = [], urlHash) {
|
|
165
|
+
layerList.forEach((layer) => {
|
|
166
166
|
if (layer.url) {
|
|
167
|
-
|
|
168
|
-
|
|
167
|
+
const layerId = layer.url.substr(layer.url.lastIndexOf("/") + 1);
|
|
168
|
+
const id = Object.keys(urlHash).indexOf(layer.url) > -1
|
|
169
169
|
? urlHash[layer.url]
|
|
170
170
|
: undefined;
|
|
171
171
|
if (id) {
|
|
@@ -183,12 +183,12 @@ export function _templatizeWebmapLayerIdsAndUrls(layerList, urlHash) {
|
|
|
183
183
|
* @returns The solutionTemplate with templatized field references
|
|
184
184
|
*/
|
|
185
185
|
export function postProcessFieldReferences(solutionTemplate, datasourceInfos) {
|
|
186
|
-
|
|
186
|
+
const paths = [
|
|
187
187
|
"data.operationalLayers",
|
|
188
188
|
"data.tables",
|
|
189
189
|
"data.applicationProperties.viewing.search.layers"
|
|
190
190
|
];
|
|
191
|
-
paths.forEach(
|
|
191
|
+
paths.forEach(p => _templatizeProperty(solutionTemplate, datasourceInfos, p));
|
|
192
192
|
return solutionTemplate;
|
|
193
193
|
}
|
|
194
194
|
/**
|
|
@@ -199,7 +199,7 @@ export function postProcessFieldReferences(solutionTemplate, datasourceInfos) {
|
|
|
199
199
|
* @param path A string path to the object property to templatize
|
|
200
200
|
*/
|
|
201
201
|
export function _templatizeProperty(solutionTemplate, datasourceInfos, path) {
|
|
202
|
-
|
|
202
|
+
const objs = common.getProp(solutionTemplate, path);
|
|
203
203
|
if (objs) {
|
|
204
204
|
common.setProp(solutionTemplate, path, _templatize(objs, datasourceInfos));
|
|
205
205
|
}
|
|
@@ -212,10 +212,10 @@ export function _templatizeProperty(solutionTemplate, datasourceInfos, path) {
|
|
|
212
212
|
* @returns updated instances of the objects
|
|
213
213
|
*/
|
|
214
214
|
export function _templatize(objs, datasourceInfos) {
|
|
215
|
-
objs.forEach(
|
|
216
|
-
|
|
215
|
+
objs.forEach(obj => {
|
|
216
|
+
const ds = _getDatasourceInfo(obj, datasourceInfos);
|
|
217
217
|
if (ds) {
|
|
218
|
-
|
|
218
|
+
const fieldNames = ds.fields.map(f => f.name);
|
|
219
219
|
common._templatizePopupInfo(obj, ds, ds.basePath, ds.itemId, fieldNames);
|
|
220
220
|
common._templatizeDefinitionEditor(obj, ds.basePath, fieldNames);
|
|
221
221
|
if (obj.layerDefinition) {
|
|
@@ -223,7 +223,7 @@ export function _templatize(objs, datasourceInfos) {
|
|
|
223
223
|
common._templatizeDefinitionExpression(obj.layerDefinition, ds.basePath, fieldNames);
|
|
224
224
|
}
|
|
225
225
|
// used for applicationProperties search layers
|
|
226
|
-
|
|
226
|
+
const fieldName = common.getProp(obj, "field.name");
|
|
227
227
|
if (fieldName) {
|
|
228
228
|
common.setProp(obj, "field.name", common._templatizeFieldName(fieldName, obj, ds.itemId, ds.basePath));
|
|
229
229
|
}
|
|
@@ -239,8 +239,8 @@ export function _templatize(objs, datasourceInfos) {
|
|
|
239
239
|
* @returns datasourceInfo for the given object id
|
|
240
240
|
*/
|
|
241
241
|
export function _getDatasourceInfo(obj, datasourceInfos) {
|
|
242
|
-
|
|
243
|
-
datasourceInfos.some(
|
|
242
|
+
let datasourceInfo;
|
|
243
|
+
datasourceInfos.some(ds => {
|
|
244
244
|
if (ds.ids.indexOf(obj.id) > -1) {
|
|
245
245
|
datasourceInfo = ds;
|
|
246
246
|
return true;
|
package/dist/esm/webmap.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"webmap.js","sourceRoot":"","sources":["../../src/webmap.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,KAAK,MAAM,MAAM,uBAAuB,CAAC;AAEhD;;;;GAIG;AACH,
|
|
1
|
+
{"version":3,"file":"webmap.js","sourceRoot":"","sources":["../../src/webmap.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,KAAK,MAAM,MAAM,uBAAuB,CAAC;AAEhD;;;;GAIG;AACH,MAAM,mBAAmB,GAAW,iCAAiC,CAAC;AAEtE,wHAAwH;AAExH;;;;;;;GAOG;AACH,MAAM,UAAU,qBAAqB,CACnC,YAAkC,EAClC,kBAAsC,EACtC,iBAAqC;IAErC,OAAO,IAAI,OAAO,CAAuB,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE;QAC3D,yBAAyB;QACzB,YAAY,CAAC,IAAI,CAAC,GAAG;YACnB,MAAM,CAAC,uBAAuB,CAAC,MAAM,CAAC,WAAW,CAAC,MAAM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oBAAoB,CAAC,SAAS,EAAE,GAAG,EAAE,EAAE,CAAC,MAAM,EAAE,EAAE,CAAC,QAAQ,CAAC,CACpE,CAAC;aACH;SACF;IACH,CAAC,CAAC,CAAC;IAEH,OAAO,IAAI,CAAC;AACd,CAAC;AAED;;;;;;GAMG;AACH,MAAM,UAAU,kBAAkB,CAChC,GAAQ,EACR,eAAyC;IAEzC,IAAI,cAAmB,CAAC;IACxB,eAAe,CAAC,IAAI,CAAC,EAAE,CAAC,EAAE;QACxB,IAAI,EAAE,CAAC,GAAG,CAAC,OAAO,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC,EAAE;YAC/B,cAAc,GAAG,EAAE,CAAC;YACpB,OAAO,IAAI,CAAC;SACb;aAAM;YACL,OAAO,KAAK,CAAC;SACd;IACH,CAAC,CAAC,CAAC;IACH,OAAO,cAAc,CAAC;AACxB,CAAC"}
|
|
@@ -18,10 +18,11 @@ import * as common from "@esri/solution-common";
|
|
|
18
18
|
* Converts a web mapping application item into a template.
|
|
19
19
|
*
|
|
20
20
|
* @param itemInfo Info about the item
|
|
21
|
-
* @param
|
|
21
|
+
* @param destAuthentication Credentials for requests to the destination organization
|
|
22
|
+
* @param srcAuthentication Credentials for requests to source items
|
|
22
23
|
* @return A promise that will resolve when the template has been created
|
|
23
24
|
*/
|
|
24
|
-
export declare function convertItemToTemplate(itemTemplate: common.IItemTemplate,
|
|
25
|
+
export declare function convertItemToTemplate(itemTemplate: common.IItemTemplate, destAuthentication: common.UserSession, srcAuthentication: common.UserSession): Promise<common.IItemTemplate>;
|
|
25
26
|
export declare function templatizeDatasources(itemTemplate: common.IItemTemplate, authentication: common.UserSession, portalUrl: string): Promise<common.IItemTemplate>;
|
|
26
27
|
export declare function templatizeWidgets(itemTemplate: common.IItemTemplate, authentication: common.UserSession, portalUrl: string, widgetPath: string, isOnScreen?: boolean): Promise<common.IItemTemplate>;
|
|
27
28
|
export declare function templatizeValues(itemTemplate: common.IItemTemplate, authentication: common.UserSession, portalUrl: string, widgetPath: string): Promise<common.IItemTemplate>;
|