@esri/solution-simple-types 6.0.4-alpha.0 → 6.1.0-alpha.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/package.json +3 -3
- package/dist/cjs/dashboard.d.ts +0 -93
- package/dist/cjs/dashboard.js +0 -351
- package/dist/cjs/dashboard.js.map +0 -1
- package/dist/cjs/helpers/convert-item-to-template.d.ts +0 -34
- package/dist/cjs/helpers/convert-item-to-template.js +0 -199
- package/dist/cjs/helpers/convert-item-to-template.js.map +0 -1
- package/dist/cjs/helpers/create-item-from-template.d.ts +0 -17
- package/dist/cjs/helpers/create-item-from-template.js +0 -145
- package/dist/cjs/helpers/create-item-from-template.js.map +0 -1
- package/dist/cjs/helpers/notebook-helpers.d.ts +0 -19
- package/dist/cjs/helpers/notebook-helpers.js +0 -25
- package/dist/cjs/helpers/notebook-helpers.js.map +0 -1
- package/dist/cjs/helpers/quickcapture-helpers.d.ts +0 -18
- package/dist/cjs/helpers/quickcapture-helpers.js +0 -23
- package/dist/cjs/helpers/quickcapture-helpers.js.map +0 -1
- package/dist/cjs/helpers/simple-type-helpers.d.ts +0 -18
- package/dist/cjs/helpers/simple-type-helpers.js +0 -23
- package/dist/cjs/helpers/simple-type-helpers.js.map +0 -1
- package/dist/cjs/helpers/update-notebook-data.d.ts +0 -17
- package/dist/cjs/helpers/update-notebook-data.js +0 -28
- package/dist/cjs/helpers/update-notebook-data.js.map +0 -1
- package/dist/cjs/index.d.ts +0 -27
- package/dist/cjs/index.js +0 -37
- package/dist/cjs/index.js.map +0 -1
- package/dist/cjs/notebook.d.ts +0 -73
- package/dist/cjs/notebook.js +0 -164
- package/dist/cjs/notebook.js.map +0 -1
- package/dist/cjs/oic.d.ts +0 -53
- package/dist/cjs/oic.js +0 -170
- package/dist/cjs/oic.js.map +0 -1
- package/dist/cjs/quickcapture.d.ts +0 -75
- package/dist/cjs/quickcapture.js +0 -143
- package/dist/cjs/quickcapture.js.map +0 -1
- package/dist/cjs/simple-types.d.ts +0 -56
- package/dist/cjs/simple-types.js +0 -94
- package/dist/cjs/simple-types.js.map +0 -1
- package/dist/cjs/webmap.d.ts +0 -102
- package/dist/cjs/webmap.js +0 -314
- package/dist/cjs/webmap.js.map +0 -1
- package/dist/cjs/webmappingapplication.d.ts +0 -176
- package/dist/cjs/webmappingapplication.js +0 -661
- package/dist/cjs/webmappingapplication.js.map +0 -1
- package/dist/cjs/workforce.d.ts +0 -34
- package/dist/cjs/workforce.js +0 -45
- package/dist/cjs/workforce.js.map +0 -1
- package/dist/esm/dashboard.d.ts +0 -93
- package/dist/esm/dashboard.js +0 -338
- package/dist/esm/dashboard.js.map +0 -1
- package/dist/esm/helpers/convert-item-to-template.d.ts +0 -34
- package/dist/esm/helpers/convert-item-to-template.js +0 -193
- package/dist/esm/helpers/convert-item-to-template.js.map +0 -1
- package/dist/esm/helpers/create-item-from-template.d.ts +0 -17
- package/dist/esm/helpers/create-item-from-template.js +0 -140
- package/dist/esm/helpers/create-item-from-template.js.map +0 -1
- package/dist/esm/helpers/notebook-helpers.d.ts +0 -19
- package/dist/esm/helpers/notebook-helpers.js +0 -21
- package/dist/esm/helpers/notebook-helpers.js.map +0 -1
- package/dist/esm/helpers/quickcapture-helpers.d.ts +0 -18
- package/dist/esm/helpers/quickcapture-helpers.js +0 -20
- package/dist/esm/helpers/quickcapture-helpers.js.map +0 -1
- package/dist/esm/helpers/simple-type-helpers.d.ts +0 -18
- package/dist/esm/helpers/simple-type-helpers.js +0 -20
- package/dist/esm/helpers/simple-type-helpers.js.map +0 -1
- package/dist/esm/helpers/update-notebook-data.d.ts +0 -17
- package/dist/esm/helpers/update-notebook-data.js +0 -24
- package/dist/esm/helpers/update-notebook-data.js.map +0 -1
- package/dist/esm/index.d.ts +0 -27
- package/dist/esm/index.js +0 -28
- package/dist/esm/index.js.map +0 -1
- package/dist/esm/notebook.d.ts +0 -73
- package/dist/esm/notebook.js +0 -153
- package/dist/esm/notebook.js.map +0 -1
- package/dist/esm/oic.d.ts +0 -53
- package/dist/esm/oic.js +0 -162
- package/dist/esm/oic.js.map +0 -1
- package/dist/esm/quickcapture.d.ts +0 -75
- package/dist/esm/quickcapture.js +0 -131
- package/dist/esm/quickcapture.js.map +0 -1
- package/dist/esm/simple-types.d.ts +0 -56
- package/dist/esm/simple-types.js +0 -86
- package/dist/esm/simple-types.js.map +0 -1
- package/dist/esm/webmap.d.ts +0 -102
- package/dist/esm/webmap.js +0 -301
- package/dist/esm/webmap.js.map +0 -1
- package/dist/esm/webmappingapplication.d.ts +0 -176
- package/dist/esm/webmappingapplication.js +0 -635
- package/dist/esm/webmappingapplication.js.map +0 -1
- package/dist/esm/workforce.d.ts +0 -34
- package/dist/esm/workforce.js +0 -39
- package/dist/esm/workforce.js.map +0 -1
package/dist/cjs/webmap.js
DELETED
|
@@ -1,314 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/** @license
|
|
3
|
-
* Copyright 2018 Esri
|
|
4
|
-
*
|
|
5
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
|
-
* you may not use this file except in compliance with the License.
|
|
7
|
-
* You may obtain a copy of the License at
|
|
8
|
-
*
|
|
9
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
-
*
|
|
11
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
12
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
-
* See the License for the specific language governing permissions and
|
|
15
|
-
* limitations under the License.
|
|
16
|
-
*/
|
|
17
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
-
exports._getDatasourceInfo = exports._templatize = exports._templatizeProperty = exports.postProcessFieldReferences = exports._templatizeWebmapLayerIdsAndUrls = exports._getLayerIds = exports._excludeInitialState = exports._extractDependencies = exports.convertItemToTemplate = void 0;
|
|
19
|
-
const tslib_1 = require("tslib");
|
|
20
|
-
const common = tslib_1.__importStar(require("@esri/solution-common"));
|
|
21
|
-
/**
|
|
22
|
-
* The portion of a Webmap URL between the server and the map id.
|
|
23
|
-
*
|
|
24
|
-
* @private
|
|
25
|
-
*/
|
|
26
|
-
const WEBMAP_APP_URL_PART = "home/webmap/viewer.html?webmap=";
|
|
27
|
-
// ------------------------------------------------------------------------------------------------------------------ //
|
|
28
|
-
/**
|
|
29
|
-
* Converts an AGOL webmap item to a template.
|
|
30
|
-
*
|
|
31
|
-
* @param itemTemplate Template for the webmap item
|
|
32
|
-
* @param destAuthentication Credentials for requests to the destination organization
|
|
33
|
-
* @param srcAuthentication Credentials for requests to source items
|
|
34
|
-
* @param templateDictionary Hash of key details used for variable replacement
|
|
35
|
-
* @returns Template for the solution item that contains key details for item reconstruction
|
|
36
|
-
*/
|
|
37
|
-
function convertItemToTemplate(itemTemplate, destAuthentication, srcAuthentication, templateDictionary) {
|
|
38
|
-
return new Promise((resolve, reject) => {
|
|
39
|
-
// Templatize the app URL if it's not a vector tile service
|
|
40
|
-
if (itemTemplate.type !== "Vector Tile Service") {
|
|
41
|
-
itemTemplate.item.url = itemTemplate.item.url
|
|
42
|
-
? common.checkUrlPathTermination(common.placeholder(common.SERVER_NAME)) +
|
|
43
|
-
WEBMAP_APP_URL_PART +
|
|
44
|
-
itemTemplate.item.id
|
|
45
|
-
: itemTemplate.item.url; // templatized id
|
|
46
|
-
}
|
|
47
|
-
// Extract dependencies
|
|
48
|
-
_extractDependencies(itemTemplate, srcAuthentication).then((results) => {
|
|
49
|
-
itemTemplate.dependencies = results.dependencies;
|
|
50
|
-
// Templatize the map layer ids after we've extracted them as dependencies
|
|
51
|
-
if (itemTemplate.data) {
|
|
52
|
-
const baseMapLayers = itemTemplate.data.baseMap?.baseMapLayers;
|
|
53
|
-
if (baseMapLayers) {
|
|
54
|
-
_templatizeWebmapLayerIdsAndUrls(itemTemplate.data.baseMap.baseMapLayers, results.urlHash, templateDictionary);
|
|
55
|
-
}
|
|
56
|
-
const operationalLayers = itemTemplate.data.operationalLayers;
|
|
57
|
-
if (operationalLayers) {
|
|
58
|
-
_templatizeWebmapLayerIdsAndUrls(itemTemplate.data.operationalLayers, results.urlHash, templateDictionary);
|
|
59
|
-
}
|
|
60
|
-
_templatizeWebmapLayerIdsAndUrls(itemTemplate.data.tables, results.urlHash, templateDictionary);
|
|
61
|
-
// Exclude intialState
|
|
62
|
-
_excludeInitialState(itemTemplate.data);
|
|
63
|
-
}
|
|
64
|
-
resolve(itemTemplate);
|
|
65
|
-
}, (e) => reject(common.fail(e)));
|
|
66
|
-
});
|
|
67
|
-
}
|
|
68
|
-
exports.convertItemToTemplate = convertItemToTemplate;
|
|
69
|
-
/**
|
|
70
|
-
* Gets the ids of the dependencies of an AGOL webmap item.
|
|
71
|
-
*
|
|
72
|
-
* @param itemTemplate A webmap item whose dependencies are sought
|
|
73
|
-
* @param authentication Credentials for any requests
|
|
74
|
-
* @returns List of dependencies ids and url/itemId hash
|
|
75
|
-
* @private
|
|
76
|
-
*/
|
|
77
|
-
function _extractDependencies(itemTemplate, authentication) {
|
|
78
|
-
return new Promise((resolve, reject) => {
|
|
79
|
-
const dependencies = [];
|
|
80
|
-
if (itemTemplate.data) {
|
|
81
|
-
const basemapLayers = itemTemplate.data.baseMap?.baseMapLayers || [];
|
|
82
|
-
const opLayers = itemTemplate.data.operationalLayers || [];
|
|
83
|
-
const tables = itemTemplate.data.tables || [];
|
|
84
|
-
const layersAndTables = basemapLayers.concat(opLayers).concat(tables);
|
|
85
|
-
_getLayerIds(layersAndTables, dependencies, authentication).then((results) => {
|
|
86
|
-
resolve(results);
|
|
87
|
-
}, (e) => reject(common.fail(e)));
|
|
88
|
-
}
|
|
89
|
-
else {
|
|
90
|
-
resolve({
|
|
91
|
-
dependencies: dependencies,
|
|
92
|
-
urlHash: {},
|
|
93
|
-
});
|
|
94
|
-
}
|
|
95
|
-
});
|
|
96
|
-
}
|
|
97
|
-
exports._extractDependencies = _extractDependencies;
|
|
98
|
-
/**
|
|
99
|
-
* Remove the initialState prop from webmaps saved from the new map viewer.
|
|
100
|
-
* This allows the map to use the item extent property that we templatize.
|
|
101
|
-
*
|
|
102
|
-
* Added for issue #662
|
|
103
|
-
*
|
|
104
|
-
* @param data the data for the web maps item template
|
|
105
|
-
* @returns void
|
|
106
|
-
* @private
|
|
107
|
-
*/
|
|
108
|
-
function _excludeInitialState(data) {
|
|
109
|
-
common.deleteProp(data, "initialState");
|
|
110
|
-
}
|
|
111
|
-
exports._excludeInitialState = _excludeInitialState;
|
|
112
|
-
/**
|
|
113
|
-
* Extracts the AGOL itemId for each layer or table object in a list using the url.
|
|
114
|
-
*
|
|
115
|
-
* @param layerList List of map layers or tables; supported vector tile layers have their styleUrls templatized
|
|
116
|
-
* @param dependencies Current list of dependencies
|
|
117
|
-
* @param authentication Credentials for any requests
|
|
118
|
-
* @returns Updated list of dependencies ids, url/itemId hash (for feature layers),
|
|
119
|
-
* and id/styleUrl hash (for vector tile layers)
|
|
120
|
-
* @private
|
|
121
|
-
*/
|
|
122
|
-
function _getLayerIds(layerList, dependencies, authentication) {
|
|
123
|
-
return new Promise((resolve, reject) => {
|
|
124
|
-
const urlHash = {};
|
|
125
|
-
const options = {
|
|
126
|
-
f: "json",
|
|
127
|
-
authentication: authentication,
|
|
128
|
-
};
|
|
129
|
-
const layerPromises = [];
|
|
130
|
-
const layerChecks = {};
|
|
131
|
-
const layers = layerList.filter((layer) => {
|
|
132
|
-
// Test for Vector Tile Layers
|
|
133
|
-
if (layer.itemId && layer.layerType === "VectorTileLayer") {
|
|
134
|
-
// Fetch the item so that we can check if it has the typeKeyword "Vector Tile Style Editor", which ensures
|
|
135
|
-
// that the user has edited the style and it is something that could be reasonably be packaged with the
|
|
136
|
-
// solution
|
|
137
|
-
layerPromises.push(common.getItemBase(layer.itemId, authentication));
|
|
138
|
-
return true;
|
|
139
|
-
// Handle a feature server layer
|
|
140
|
-
}
|
|
141
|
-
else if (layer.url && layer.url.indexOf("{{velocityUrl}}") < 0) {
|
|
142
|
-
const results = /.+FeatureServer/g.exec(layer.url);
|
|
143
|
-
const baseUrl = Array.isArray(results) && results.length > 0 ? results[0] : undefined;
|
|
144
|
-
if (baseUrl) {
|
|
145
|
-
// avoid redundant checks when we have a layer with subLayers
|
|
146
|
-
if (Object.keys(layerChecks).indexOf(baseUrl) < 0) {
|
|
147
|
-
layerChecks[baseUrl] = common.request(layer.url, options);
|
|
148
|
-
}
|
|
149
|
-
layerPromises.push(layerChecks[baseUrl]);
|
|
150
|
-
return true;
|
|
151
|
-
}
|
|
152
|
-
else {
|
|
153
|
-
return false;
|
|
154
|
-
}
|
|
155
|
-
// This layer is not a dependency
|
|
156
|
-
}
|
|
157
|
-
else {
|
|
158
|
-
return false;
|
|
159
|
-
}
|
|
160
|
-
});
|
|
161
|
-
// We have a mix of Vector Tile Layer item base requests and Feature Server info requests
|
|
162
|
-
if (layerPromises.length > 0) {
|
|
163
|
-
Promise.all(layerPromises).then((responses) => {
|
|
164
|
-
responses.forEach((response, i) => {
|
|
165
|
-
if (layers[i].layerType === "VectorTileLayer") {
|
|
166
|
-
const typeKeywords = common.getProp(response, "typeKeywords");
|
|
167
|
-
if (typeKeywords && typeKeywords.includes("Vector Tile Style Editor")) {
|
|
168
|
-
// Vector tiles edited by the style editor--flag as a dependency
|
|
169
|
-
if (dependencies.indexOf(response.id) < 0) {
|
|
170
|
-
dependencies.push(response.id);
|
|
171
|
-
}
|
|
172
|
-
// Set a flag indicating that this VectorTileLayer should have its id templatized
|
|
173
|
-
layers[i].templatizeId = true;
|
|
174
|
-
// Templatize the URL to the style resource
|
|
175
|
-
const iSuffix = layers[i].styleUrl.indexOf(response.id) + response.id.length;
|
|
176
|
-
layers[i].styleUrl = common.templatizeTerm(layers[i].styleUrl.replace(layers[i].styleUrl.substring(0, iSuffix), response.id), response.id, ".itemUrl");
|
|
177
|
-
}
|
|
178
|
-
}
|
|
179
|
-
else if (common.getProp(response, "serviceItemId")) {
|
|
180
|
-
// Feature Service
|
|
181
|
-
const id = response.serviceItemId;
|
|
182
|
-
if (dependencies.indexOf(id) < 0) {
|
|
183
|
-
dependencies.push(id);
|
|
184
|
-
}
|
|
185
|
-
urlHash[layers[i].url] = id;
|
|
186
|
-
}
|
|
187
|
-
});
|
|
188
|
-
resolve({
|
|
189
|
-
dependencies,
|
|
190
|
-
urlHash,
|
|
191
|
-
});
|
|
192
|
-
}, (e) => reject(common.fail(e)));
|
|
193
|
-
}
|
|
194
|
-
else {
|
|
195
|
-
resolve({
|
|
196
|
-
dependencies,
|
|
197
|
-
urlHash,
|
|
198
|
-
});
|
|
199
|
-
}
|
|
200
|
-
});
|
|
201
|
-
}
|
|
202
|
-
exports._getLayerIds = _getLayerIds;
|
|
203
|
-
/**
|
|
204
|
-
* Templatizes the url and item id for layers or tables within the webmap.
|
|
205
|
-
*
|
|
206
|
-
* @param layerList List of map layers or tables
|
|
207
|
-
* @param urlHash Lookup object for analysis layers; hash from URL to AGO item id
|
|
208
|
-
* @param templateDictionary Hash of key details used for variable replacement
|
|
209
|
-
* @returns void
|
|
210
|
-
* @private
|
|
211
|
-
*/
|
|
212
|
-
function _templatizeWebmapLayerIdsAndUrls(layerList = [], urlHash, templateDictionary) {
|
|
213
|
-
layerList.forEach((layer) => {
|
|
214
|
-
// Test for Vector Tile Layers
|
|
215
|
-
if (layer.itemId && layer.layerType === "VectorTileLayer") {
|
|
216
|
-
// Do we templatize its id? We don't for basemaps, e.g.
|
|
217
|
-
if (layer.templatizeId) {
|
|
218
|
-
layer.itemId = common.templatizeTerm(layer.itemId, layer.itemId, ".itemId");
|
|
219
|
-
delete layer.templatizeId;
|
|
220
|
-
}
|
|
221
|
-
// Handle a feature server layer
|
|
222
|
-
}
|
|
223
|
-
else if (layer.url) {
|
|
224
|
-
const layerId = layer.url.substr(layer.url.lastIndexOf("/") + 1);
|
|
225
|
-
const id = Object.keys(urlHash).indexOf(layer.url) > -1 ? urlHash[layer.url] : undefined;
|
|
226
|
-
if (id) {
|
|
227
|
-
common.cacheLayerInfo(layerId, id, layer.url, templateDictionary);
|
|
228
|
-
layer.url = common.templatizeTerm(id, id, ".layer" + layerId + ".url");
|
|
229
|
-
layer.itemId = common.templatizeTerm(id, id, ".layer" + layerId + ".itemId");
|
|
230
|
-
}
|
|
231
|
-
}
|
|
232
|
-
});
|
|
233
|
-
}
|
|
234
|
-
exports._templatizeWebmapLayerIdsAndUrls = _templatizeWebmapLayerIdsAndUrls;
|
|
235
|
-
/**
|
|
236
|
-
* Templatize field references.
|
|
237
|
-
*
|
|
238
|
-
* @param solutionTemplate The solution item template
|
|
239
|
-
* @param datasourceInfos A list of datasource info objects that contain key values to templatize field references
|
|
240
|
-
* @returns The solutionTemplate with templatized field references
|
|
241
|
-
*/
|
|
242
|
-
function postProcessFieldReferences(solutionTemplate, datasourceInfos) {
|
|
243
|
-
const paths = ["data.operationalLayers", "data.tables", "data.applicationProperties.viewing.search.layers"];
|
|
244
|
-
paths.forEach((p) => _templatizeProperty(solutionTemplate, datasourceInfos, p));
|
|
245
|
-
return solutionTemplate;
|
|
246
|
-
}
|
|
247
|
-
exports.postProcessFieldReferences = postProcessFieldReferences;
|
|
248
|
-
/**
|
|
249
|
-
* Templatize field references.
|
|
250
|
-
*
|
|
251
|
-
* @param solutionTemplate The solution item template
|
|
252
|
-
* @param datasourceInfos A list of datasource info objects that contain key values to templatize field references
|
|
253
|
-
* @param path A string path to the object property to templatize
|
|
254
|
-
* @private
|
|
255
|
-
*/
|
|
256
|
-
function _templatizeProperty(solutionTemplate, datasourceInfos, path) {
|
|
257
|
-
const objs = common.getProp(solutionTemplate, path);
|
|
258
|
-
if (objs) {
|
|
259
|
-
common.setProp(solutionTemplate, path, _templatize(objs, datasourceInfos));
|
|
260
|
-
}
|
|
261
|
-
}
|
|
262
|
-
exports._templatizeProperty = _templatizeProperty;
|
|
263
|
-
/**
|
|
264
|
-
* Templatize field references.
|
|
265
|
-
*
|
|
266
|
-
* @param objs Can be operationalLayers or tables or appProperties search layers
|
|
267
|
-
* @param datasourceInfos A list of datasource info objects that contain key values to templatize field references
|
|
268
|
-
* @returns updated instances of the objects
|
|
269
|
-
* @private
|
|
270
|
-
*/
|
|
271
|
-
function _templatize(objs, datasourceInfos) {
|
|
272
|
-
objs.forEach((obj) => {
|
|
273
|
-
const ds = _getDatasourceInfo(obj, datasourceInfos);
|
|
274
|
-
if (ds) {
|
|
275
|
-
const fieldNames = ds.fields.map((f) => f.name);
|
|
276
|
-
common._templatizePopupInfo(obj, ds, ds.basePath, ds.itemId, fieldNames);
|
|
277
|
-
common._templatizeDefinitionEditor(obj, ds.basePath, fieldNames);
|
|
278
|
-
if (obj.layerDefinition) {
|
|
279
|
-
common._templatizeDrawingInfo(obj.layerDefinition, ds.basePath, fieldNames);
|
|
280
|
-
common._templatizeDefinitionExpression(obj.layerDefinition, ds.basePath, fieldNames);
|
|
281
|
-
}
|
|
282
|
-
// used for applicationProperties search layers
|
|
283
|
-
const fieldName = common.getProp(obj, "field.name");
|
|
284
|
-
if (fieldName) {
|
|
285
|
-
common.setProp(obj, "field.name", common._templatizeFieldName(fieldName, obj, ds.itemId, ds.basePath));
|
|
286
|
-
}
|
|
287
|
-
}
|
|
288
|
-
});
|
|
289
|
-
return objs;
|
|
290
|
-
}
|
|
291
|
-
exports._templatize = _templatize;
|
|
292
|
-
/**
|
|
293
|
-
* Get datasourceInfo by map layer id
|
|
294
|
-
*
|
|
295
|
-
* @param obj Can be operationalLayer or table or appProperties search layer
|
|
296
|
-
* @param datasourceInfos A list of datasource info objects that contain key values to templatize field references
|
|
297
|
-
* @returns datasourceInfo for the given object id
|
|
298
|
-
* @private
|
|
299
|
-
*/
|
|
300
|
-
function _getDatasourceInfo(obj, datasourceInfos) {
|
|
301
|
-
let datasourceInfo;
|
|
302
|
-
datasourceInfos.some((ds) => {
|
|
303
|
-
if (ds.ids.indexOf(obj.id) > -1) {
|
|
304
|
-
datasourceInfo = ds;
|
|
305
|
-
return true;
|
|
306
|
-
}
|
|
307
|
-
else {
|
|
308
|
-
return false;
|
|
309
|
-
}
|
|
310
|
-
});
|
|
311
|
-
return datasourceInfo;
|
|
312
|
-
}
|
|
313
|
-
exports._getDatasourceInfo = _getDatasourceInfo;
|
|
314
|
-
//# sourceMappingURL=webmap.js.map
|
package/dist/cjs/webmap.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"webmap.js","sourceRoot":"","sources":["../../src/webmap.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;;AAEH,sEAAgD;AAEhD;;;;GAIG;AACH,MAAM,mBAAmB,GAAW,iCAAiC,CAAC;AAEtE,wHAAwH;AAExH;;;;;;;;GAQG;AACH,SAAgB,qBAAqB,CACnC,YAAkC,EAClC,kBAAsC,EACtC,iBAAqC,EACrC,kBAAuB;IAEvB,OAAO,IAAI,OAAO,CAAuB,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE;QAC3D,2DAA2D;QAC3D,IAAI,YAAY,CAAC,IAAI,KAAK,qBAAqB,EAAE;YAC/C,YAAY,CAAC,IAAI,CAAC,GAAG,GAAG,YAAY,CAAC,IAAI,CAAC,GAAG;gBAC3C,CAAC,CAAC,MAAM,CAAC,uBAAuB,CAAC,MAAM,CAAC,WAAW,CAAC,MAAM,CAAC,WAAW,CAAC,CAAC;oBACtE,mBAAmB;oBACnB,YAAY,CAAC,IAAI,CAAC,EAAE;gBACtB,CAAC,CAAC,YAAY,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,iBAAiB;SAC7C;QAED,uBAAuB;QACvB,oBAAoB,CAAC,YAAY,EAAE,iBAAiB,CAAC,CAAC,IAAI,CACxD,CAAC,OAAmC,EAAE,EAAE;YACtC,YAAY,CAAC,YAAY,GAAG,OAAO,CAAC,YAAY,CAAC;YAEjD,0EAA0E;YAC1E,IAAI,YAAY,CAAC,IAAI,EAAE;gBACrB,MAAM,aAAa,GAAG,YAAY,CAAC,IAAI,CAAC,OAAO,EAAE,aAAa,CAAC;gBAC/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D,gDAWC"}
|
|
@@ -1,176 +0,0 @@
|
|
|
1
|
-
/** @license
|
|
2
|
-
* Copyright 2020 Esri
|
|
3
|
-
*
|
|
4
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
-
* you may not use this file except in compliance with the License.
|
|
6
|
-
* You may obtain a copy of the License at
|
|
7
|
-
*
|
|
8
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
-
*
|
|
10
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
-
* See the License for the specific language governing permissions and
|
|
14
|
-
* limitations under the License.
|
|
15
|
-
*/
|
|
16
|
-
import * as common from "@esri/solution-common";
|
|
17
|
-
/**
|
|
18
|
-
* Converts a web mapping application item into a template.
|
|
19
|
-
*
|
|
20
|
-
* @param itemInfo Info about the item
|
|
21
|
-
* @param destAuthentication Credentials for requests to the destination organization
|
|
22
|
-
* @param srcAuthentication Credentials for requests to source items
|
|
23
|
-
* @param templateDictionary Hash of key details used for variable replacement
|
|
24
|
-
* @returns A promise that will resolve when the template has been created
|
|
25
|
-
*/
|
|
26
|
-
export declare function convertItemToTemplate(itemTemplate: common.IItemTemplate, destAuthentication: common.UserSession, srcAuthentication: common.UserSession, templateDictionary: any): Promise<common.IItemTemplate>;
|
|
27
|
-
/**
|
|
28
|
-
* Converts web mapping application datasources to variables for deployment
|
|
29
|
-
*
|
|
30
|
-
* @param itemTemplate The solution item template
|
|
31
|
-
* @param authentication Credentials for requests
|
|
32
|
-
* @param portalUrl Rest Url of the portal to perform the search
|
|
33
|
-
* @param templateDictionary Hash of key details used for variable replacement
|
|
34
|
-
* @returns A promise that will resolve with the created template
|
|
35
|
-
*/
|
|
36
|
-
export declare function templatizeDatasources(itemTemplate: common.IItemTemplate, authentication: common.UserSession, portalUrl: string, templateDictionary: any): Promise<common.IItemTemplate>;
|
|
37
|
-
export declare function templatizeWidgets(itemTemplate: common.IItemTemplate, authentication: common.UserSession, portalUrl: string, widgetPath: string, isOnScreen?: boolean): Promise<common.IItemTemplate>;
|
|
38
|
-
export declare function templatizeValues(itemTemplate: common.IItemTemplate, authentication: common.UserSession, portalUrl: string, widgetPath: string): Promise<common.IItemTemplate>;
|
|
39
|
-
export declare function handleServiceRequests(serviceRequests: any[], requestUrls: string[], objString: string): Promise<string>;
|
|
40
|
-
export declare function findUrls(testString: string, portalUrl: string, requestUrls: string[], serviceRequests: any[], authentication: common.UserSession): {
|
|
41
|
-
testString: string;
|
|
42
|
-
requestUrls: string[];
|
|
43
|
-
serviceRequests: any[];
|
|
44
|
-
};
|
|
45
|
-
/**
|
|
46
|
-
* Replace url with templatized url value
|
|
47
|
-
*
|
|
48
|
-
* @param obj can be a single url string or a stringified JSON object
|
|
49
|
-
* @param url the current url we are testing for
|
|
50
|
-
* @param newUrl the templatized url
|
|
51
|
-
* @param validateFullUrl should only replace url when we have a full match.
|
|
52
|
-
* This property is only relevant when the obj is a stringified JSON object.
|
|
53
|
-
*
|
|
54
|
-
* @returns the obj with any instances of the url replaced
|
|
55
|
-
*/
|
|
56
|
-
export declare function replaceUrl(obj: string, url: string, newUrl: string, validateFullUrl?: boolean): string;
|
|
57
|
-
export declare function setValues(itemTemplate: common.IItemTemplate, paths: string[], base: string): void;
|
|
58
|
-
export declare function fineTuneCreatedItem(originalTemplate: common.IItemTemplate, newlyCreatedItem: common.IItemTemplate, templateDictionary: any, destinationAuthentication: common.UserSession): Promise<void>;
|
|
59
|
-
/**
|
|
60
|
-
* Gets the ids of the dependencies of an AGOL webapp item.
|
|
61
|
-
*
|
|
62
|
-
* @param fullItem A webapp item whose dependencies are sought
|
|
63
|
-
* @returns A promise that will resolve with list of dependent ids
|
|
64
|
-
* @private
|
|
65
|
-
*/
|
|
66
|
-
export declare function _extractDependencies(model: any): string[];
|
|
67
|
-
/**
|
|
68
|
-
* Generic Web App Dependencies
|
|
69
|
-
*
|
|
70
|
-
* @private
|
|
71
|
-
*/
|
|
72
|
-
export declare function _getGenericWebAppDependencies(model: any): any;
|
|
73
|
-
export declare function _getWABDependencies(model: any): string[];
|
|
74
|
-
/**
|
|
75
|
-
* Templatizes id properties for the paths provided
|
|
76
|
-
*
|
|
77
|
-
* @param itemTemplate The solution item template
|
|
78
|
-
* @param paths A list of property paths that contain ids
|
|
79
|
-
* @private
|
|
80
|
-
*/
|
|
81
|
-
export declare function _templatizeIdPaths(itemTemplate: common.IItemTemplate, paths: string[]): void;
|
|
82
|
-
/**
|
|
83
|
-
* Templatizes id property for the path provided
|
|
84
|
-
*
|
|
85
|
-
* @param itemTemplate The solution item template
|
|
86
|
-
* @param path A path to an id property
|
|
87
|
-
* @param id The base id to use when templatizing
|
|
88
|
-
* @private
|
|
89
|
-
*/
|
|
90
|
-
export declare function _templatizeIdPath(itemTemplate: common.IItemTemplate, path: string, id: string): void;
|
|
91
|
-
/**
|
|
92
|
-
* Templatize field references for datasources and widgets.
|
|
93
|
-
*
|
|
94
|
-
* @param solutionTemplate The solution item template
|
|
95
|
-
* @param datasourceInfos A list of datasource info objects that contain key values to templatize field references
|
|
96
|
-
* @returns The solutionTemplate with templatized field references
|
|
97
|
-
*/
|
|
98
|
-
export declare function postProcessFieldReferences(solutionTemplate: common.IItemTemplate, datasourceInfos: common.IDatasourceInfo[]): common.IItemTemplate;
|
|
99
|
-
/**
|
|
100
|
-
* Templatize field references for given dataSource from the web application.
|
|
101
|
-
*
|
|
102
|
-
* @param obj The dataSource or widget object from the web application.
|
|
103
|
-
* @param datasourceInfos A list of datasource info objects that contain key values to templatize field references
|
|
104
|
-
* @returns The dataSource with templatized field references
|
|
105
|
-
* @private
|
|
106
|
-
*/
|
|
107
|
-
export declare function _templatizeObject(obj: any, datasourceInfos: common.IDatasourceInfo[], templatizeKeys?: boolean): any;
|
|
108
|
-
/**
|
|
109
|
-
* Templatize field references from an array of various objects from the web application.
|
|
110
|
-
*
|
|
111
|
-
* @param objects A list of widgets or objects from the web application that may contain field references.
|
|
112
|
-
* @param datasourceInfos A list of datasource info objects that contain key values to templatize field references
|
|
113
|
-
* @returns The widgets with templatized field references
|
|
114
|
-
* @private
|
|
115
|
-
*/
|
|
116
|
-
export declare function _templatizeObjectArray(objects: any[], datasourceInfos: common.IDatasourceInfo[]): any;
|
|
117
|
-
/**
|
|
118
|
-
* Gets an order for testing wit the various datasource info objects against the widget or dataSource.
|
|
119
|
-
* A widget or dataSource that contain a layers url or webmap layer id are more likely
|
|
120
|
-
* to have field references from that layer.
|
|
121
|
-
*
|
|
122
|
-
* @param obj The dataSource or widget object from the web application.
|
|
123
|
-
* @param datasourceInfos A list of datasource info objects that contain key values to templatize field references
|
|
124
|
-
* @returns A list of datasourceInfo objects sorted based on the presence of a layers url or id
|
|
125
|
-
* @private
|
|
126
|
-
*/
|
|
127
|
-
export declare function _getReplaceOrder(obj: any, datasourceInfos: common.IDatasourceInfo[]): common.IDatasourceInfo[];
|
|
128
|
-
/**
|
|
129
|
-
* Determine an order for checking field names against a dataSource or widget.
|
|
130
|
-
* Sort order preference is set in this order: layer url, web map layer id, service url, agol itemId
|
|
131
|
-
*
|
|
132
|
-
* @param datasourceInfo The datasource object with key properties about the service.
|
|
133
|
-
* @param testString A stringified version of a widget or dataSource
|
|
134
|
-
* @returns The prioritized order for testing
|
|
135
|
-
* @private
|
|
136
|
-
*/
|
|
137
|
-
export declare function _getSortOrder(datasourceInfo: common.IDatasourceInfo, testString: string): number;
|
|
138
|
-
/**
|
|
139
|
-
* These tests will run prior to the tests associated with the higher level tests based on sort order.
|
|
140
|
-
* The tests work more like cloning an object where we go through and review each individual property.
|
|
141
|
-
* If we find a url or webmap layer id we will templatize the parent object that contains this property.
|
|
142
|
-
* Many widgets will store one of these two properties in an object that will also contain various field references.
|
|
143
|
-
*
|
|
144
|
-
* @param obj The dataSource or widget object from the application
|
|
145
|
-
* @param datasourceInfos A list of datasource info objects that contain key values to templatize field references
|
|
146
|
-
* @returns An updated instance of the dataSource or widget with as many field references templatized as possible.
|
|
147
|
-
* @private
|
|
148
|
-
*/
|
|
149
|
-
export declare function _prioritizedTests(obj: any, datasourceInfos: common.IDatasourceInfo[], templatizeKeys: boolean): any;
|
|
150
|
-
/**
|
|
151
|
-
* This is very close to common.cloneObject but will test if an object
|
|
152
|
-
* has one of the datasource urls as a property. If it finds one it will
|
|
153
|
-
* templatize it's parent based on the fields from that datasource
|
|
154
|
-
*
|
|
155
|
-
* @param obj The dataSource or widget object from the application
|
|
156
|
-
* @param ds A datasourceInfo object to use for testing against the current dataSource or widget
|
|
157
|
-
* @returns The updated instance of the object with as many field references templatized as possible
|
|
158
|
-
* @private
|
|
159
|
-
*/
|
|
160
|
-
export declare function _templatizeParentByURL(obj: {
|
|
161
|
-
[index: string]: any;
|
|
162
|
-
}, ds: common.IDatasourceInfo, templatizeKeys: boolean): any;
|
|
163
|
-
/**
|
|
164
|
-
* This is very close to common.cloneObject but will test if an object
|
|
165
|
-
* has one of the datasource webmap layer ids as a property. If it finds one it will
|
|
166
|
-
* templatize it's parent based on the fields from that datasource.
|
|
167
|
-
*
|
|
168
|
-
* @param obj The dataSource or widget object from the application
|
|
169
|
-
* @param ds A datasourceInfo object to use for testing against the current dataSource or widget
|
|
170
|
-
* @param id A webmap layer id to test with.
|
|
171
|
-
* @returns The updated instance of the object with as many field references templatized as possible
|
|
172
|
-
* @private
|
|
173
|
-
*/
|
|
174
|
-
export declare function _templatizeParentByWebMapLayerId(obj: {
|
|
175
|
-
[index: string]: any;
|
|
176
|
-
}, ds: common.IDatasourceInfo, id: string, templatizeKeys: boolean): any;
|