@esri/solution-common 1.3.10 → 1.3.13
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/completeItem.d.ts +1 -1
- package/dist/esm/completeItem.js +1 -1
- package/dist/esm/deleteHelpers/deleteEmptyGroups.d.ts +1 -1
- package/dist/esm/deleteHelpers/deleteEmptyGroups.js +1 -1
- package/dist/esm/deleteHelpers/deleteGroupIfEmpty.d.ts +1 -1
- package/dist/esm/deleteHelpers/deleteGroupIfEmpty.js +1 -1
- package/dist/esm/deleteHelpers/deleteSolutionContents.d.ts +1 -1
- package/dist/esm/deleteHelpers/deleteSolutionContents.js +1 -1
- package/dist/esm/deleteHelpers/deleteSolutionFolder.d.ts +1 -1
- package/dist/esm/deleteHelpers/deleteSolutionFolder.js +1 -1
- package/dist/esm/deleteHelpers/deleteSolutionItem.d.ts +1 -1
- package/dist/esm/deleteHelpers/deleteSolutionItem.js +1 -1
- package/dist/esm/deleteHelpers/reconstructBuildOrderIds.d.ts +1 -1
- package/dist/esm/deleteHelpers/reconstructBuildOrderIds.js +1 -1
- package/dist/esm/deleteHelpers/removeItems.d.ts +1 -1
- package/dist/esm/deleteHelpers/removeItems.js +1 -1
- package/dist/esm/deleteSolution.d.ts +2 -2
- package/dist/esm/deleteSolution.js +2 -2
- package/dist/esm/dependencies.d.ts +1 -1
- package/dist/esm/dependencies.js +2 -2
- package/dist/esm/featureServiceHelpers.d.ts +99 -60
- package/dist/esm/featureServiceHelpers.js +99 -60
- package/dist/esm/featureServiceHelpers.js.map +1 -1
- package/dist/esm/generalHelpers.d.ts +34 -34
- package/dist/esm/generalHelpers.js +36 -36
- package/dist/esm/getDeletableSolutionInfo.d.ts +1 -1
- package/dist/esm/getDeletableSolutionInfo.js +1 -1
- package/dist/esm/getSolutionSummary.d.ts +1 -1
- package/dist/esm/getSolutionSummary.js +1 -1
- package/dist/esm/interfaces.d.ts +438 -10
- package/dist/esm/interfaces.js +7 -1
- package/dist/esm/interfaces.js.map +1 -1
- package/dist/esm/libConnectors.d.ts +5 -5
- package/dist/esm/libConnectors.js +5 -5
- package/dist/esm/migrations/apply-schema.d.ts +1 -0
- package/dist/esm/migrations/apply-schema.js +1 -0
- package/dist/esm/migrations/apply-schema.js.map +1 -1
- package/dist/esm/migrations/upgrade-three-dot-one.d.ts +1 -0
- package/dist/esm/migrations/upgrade-three-dot-one.js +1 -0
- package/dist/esm/migrations/upgrade-three-dot-one.js.map +1 -1
- package/dist/esm/migrations/upgrade-two-dot-seven.d.ts +7 -0
- package/dist/esm/migrations/upgrade-two-dot-seven.js +7 -0
- package/dist/esm/migrations/upgrade-two-dot-seven.js.map +1 -1
- package/dist/esm/polyfills.d.ts +2 -2
- package/dist/esm/polyfills.js +2 -2
- package/dist/esm/resourceHelpers.d.ts +11 -11
- package/dist/esm/resourceHelpers.js +11 -11
- package/dist/esm/resources/addMetadataFromBlob.d.ts +1 -1
- package/dist/esm/resources/addMetadataFromBlob.js +1 -1
- package/dist/esm/resources/convert-item-resource-to-storage-resource.d.ts +1 -1
- package/dist/esm/resources/convert-item-resource-to-storage-resource.js +1 -1
- package/dist/esm/resources/convert-storage-resource-to-item-resource.d.ts +1 -1
- package/dist/esm/resources/convert-storage-resource-to-item-resource.js +1 -1
- package/dist/esm/resources/copyAssociatedFiles.d.ts +4 -3
- package/dist/esm/resources/copyAssociatedFiles.js +5 -4
- package/dist/esm/resources/copyAssociatedFiles.js.map +1 -1
- package/dist/esm/resources/copyDataIntoItem.d.ts +2 -2
- package/dist/esm/resources/copyDataIntoItem.js +2 -2
- package/dist/esm/resources/copyMetadataIntoItem.d.ts +1 -1
- package/dist/esm/resources/copyMetadataIntoItem.js +1 -1
- package/dist/esm/resources/copyResourceIntoZip.d.ts +2 -2
- package/dist/esm/resources/copyResourceIntoZip.js +2 -2
- package/dist/esm/resources/copyZipIntoItem.d.ts +1 -1
- package/dist/esm/resources/copyZipIntoItem.js +1 -1
- package/dist/esm/resources/createCopyResults.d.ts +1 -1
- package/dist/esm/resources/createCopyResults.js +1 -1
- package/dist/esm/resources/get-blob.d.ts +1 -1
- package/dist/esm/resources/get-blob.js +1 -1
- package/dist/esm/resources/getItemResourcesFilesFromPaths.d.ts +1 -1
- package/dist/esm/resources/getItemResourcesFilesFromPaths.js +1 -1
- package/dist/esm/resources/getItemResourcesPaths.d.ts +1 -1
- package/dist/esm/resources/getItemResourcesPaths.js +1 -1
- package/dist/esm/resources/transform-resource-paths-to-solution-resources.d.ts +1 -0
- package/dist/esm/resources/transform-resource-paths-to-solution-resources.js +1 -0
- package/dist/esm/resources/transform-resource-paths-to-solution-resources.js.map +1 -1
- package/dist/esm/restHelpers.d.ts +59 -54
- package/dist/esm/restHelpers.js +55 -50
- package/dist/esm/restHelpers.js.map +1 -1
- package/dist/esm/restHelpersGet.d.ts +30 -30
- package/dist/esm/restHelpersGet.js +30 -30
- package/dist/esm/templatization.d.ts +15 -15
- package/dist/esm/templatization.js +15 -15
- package/dist/esm/trackingHelpers.d.ts +9 -9
- package/dist/esm/trackingHelpers.js +9 -9
- package/dist/esm/velocityHelpers.d.ts +4 -4
- package/dist/esm/velocityHelpers.js +4 -4
- package/dist/esm/workforceHelpers.d.ts +8 -7
- package/dist/esm/workforceHelpers.js +18 -7
- package/dist/esm/workforceHelpers.js.map +1 -1
- package/dist/node/completeItem.d.ts +1 -1
- package/dist/node/completeItem.js +1 -1
- package/dist/node/deleteHelpers/deleteEmptyGroups.d.ts +1 -1
- package/dist/node/deleteHelpers/deleteEmptyGroups.js +1 -1
- package/dist/node/deleteHelpers/deleteGroupIfEmpty.d.ts +1 -1
- package/dist/node/deleteHelpers/deleteGroupIfEmpty.js +1 -1
- package/dist/node/deleteHelpers/deleteSolutionContents.d.ts +1 -1
- package/dist/node/deleteHelpers/deleteSolutionContents.js +1 -1
- package/dist/node/deleteHelpers/deleteSolutionFolder.d.ts +1 -1
- package/dist/node/deleteHelpers/deleteSolutionFolder.js +1 -1
- package/dist/node/deleteHelpers/deleteSolutionItem.d.ts +1 -1
- package/dist/node/deleteHelpers/deleteSolutionItem.js +1 -1
- package/dist/node/deleteHelpers/reconstructBuildOrderIds.d.ts +1 -1
- package/dist/node/deleteHelpers/reconstructBuildOrderIds.js +1 -1
- package/dist/node/deleteHelpers/removeItems.d.ts +1 -1
- package/dist/node/deleteHelpers/removeItems.js +1 -1
- package/dist/node/deleteSolution.d.ts +2 -2
- package/dist/node/deleteSolution.js +2 -2
- package/dist/node/dependencies.d.ts +1 -1
- package/dist/node/dependencies.js +2 -2
- package/dist/node/featureServiceHelpers.d.ts +99 -60
- package/dist/node/featureServiceHelpers.js +99 -60
- package/dist/node/featureServiceHelpers.js.map +1 -1
- package/dist/node/generalHelpers.d.ts +34 -34
- package/dist/node/generalHelpers.js +36 -36
- package/dist/node/getDeletableSolutionInfo.d.ts +1 -1
- package/dist/node/getDeletableSolutionInfo.js +1 -1
- package/dist/node/getSolutionSummary.d.ts +1 -1
- package/dist/node/getSolutionSummary.js +1 -1
- package/dist/node/interfaces.d.ts +438 -10
- package/dist/node/interfaces.js +7 -1
- package/dist/node/interfaces.js.map +1 -1
- package/dist/node/libConnectors.d.ts +5 -5
- package/dist/node/libConnectors.js +5 -5
- package/dist/node/migrations/apply-schema.d.ts +1 -0
- package/dist/node/migrations/apply-schema.js +1 -0
- package/dist/node/migrations/apply-schema.js.map +1 -1
- package/dist/node/migrations/upgrade-three-dot-one.d.ts +1 -0
- package/dist/node/migrations/upgrade-three-dot-one.js +1 -0
- package/dist/node/migrations/upgrade-three-dot-one.js.map +1 -1
- package/dist/node/migrations/upgrade-two-dot-seven.d.ts +7 -0
- package/dist/node/migrations/upgrade-two-dot-seven.js +7 -0
- package/dist/node/migrations/upgrade-two-dot-seven.js.map +1 -1
- package/dist/node/polyfills.d.ts +2 -2
- package/dist/node/polyfills.js +2 -2
- package/dist/node/resourceHelpers.d.ts +11 -11
- package/dist/node/resourceHelpers.js +11 -11
- package/dist/node/resources/addMetadataFromBlob.d.ts +1 -1
- package/dist/node/resources/addMetadataFromBlob.js +1 -1
- package/dist/node/resources/convert-item-resource-to-storage-resource.d.ts +1 -1
- package/dist/node/resources/convert-item-resource-to-storage-resource.js +1 -1
- package/dist/node/resources/convert-storage-resource-to-item-resource.d.ts +1 -1
- package/dist/node/resources/convert-storage-resource-to-item-resource.js +1 -1
- package/dist/node/resources/copyAssociatedFiles.d.ts +4 -3
- package/dist/node/resources/copyAssociatedFiles.js +5 -4
- package/dist/node/resources/copyAssociatedFiles.js.map +1 -1
- package/dist/node/resources/copyDataIntoItem.d.ts +2 -2
- package/dist/node/resources/copyDataIntoItem.js +2 -2
- package/dist/node/resources/copyMetadataIntoItem.d.ts +1 -1
- package/dist/node/resources/copyMetadataIntoItem.js +1 -1
- package/dist/node/resources/copyResourceIntoZip.d.ts +2 -2
- package/dist/node/resources/copyResourceIntoZip.js +2 -2
- package/dist/node/resources/copyZipIntoItem.d.ts +1 -1
- package/dist/node/resources/copyZipIntoItem.js +1 -1
- package/dist/node/resources/createCopyResults.d.ts +1 -1
- package/dist/node/resources/createCopyResults.js +1 -1
- package/dist/node/resources/get-blob.d.ts +1 -1
- package/dist/node/resources/get-blob.js +1 -1
- package/dist/node/resources/getItemResourcesFilesFromPaths.d.ts +1 -1
- package/dist/node/resources/getItemResourcesFilesFromPaths.js +1 -1
- package/dist/node/resources/getItemResourcesPaths.d.ts +1 -1
- package/dist/node/resources/getItemResourcesPaths.js +1 -1
- package/dist/node/resources/transform-resource-paths-to-solution-resources.d.ts +1 -0
- package/dist/node/resources/transform-resource-paths-to-solution-resources.js +1 -0
- package/dist/node/resources/transform-resource-paths-to-solution-resources.js.map +1 -1
- package/dist/node/restHelpers.d.ts +59 -54
- package/dist/node/restHelpers.js +55 -50
- package/dist/node/restHelpers.js.map +1 -1
- package/dist/node/restHelpersGet.d.ts +30 -30
- package/dist/node/restHelpersGet.js +30 -30
- package/dist/node/templatization.d.ts +15 -15
- package/dist/node/templatization.js +15 -15
- package/dist/node/trackingHelpers.d.ts +9 -9
- package/dist/node/trackingHelpers.js +9 -9
- package/dist/node/velocityHelpers.d.ts +4 -4
- package/dist/node/velocityHelpers.js +4 -4
- package/dist/node/workforceHelpers.d.ts +8 -7
- package/dist/node/workforceHelpers.js +18 -7
- package/dist/node/workforceHelpers.js.map +1 -1
- package/dist/umd/common.umd.js +399 -313
- package/dist/umd/common.umd.js.map +1 -1
- package/dist/umd/common.umd.min.js +3 -3
- package/dist/umd/common.umd.min.js.map +1 -1
- package/dist/umd/completeItem.d.ts +1 -1
- package/dist/umd/deleteHelpers/deleteEmptyGroups.d.ts +1 -1
- package/dist/umd/deleteHelpers/deleteGroupIfEmpty.d.ts +1 -1
- package/dist/umd/deleteHelpers/deleteSolutionContents.d.ts +1 -1
- package/dist/umd/deleteHelpers/deleteSolutionFolder.d.ts +1 -1
- package/dist/umd/deleteHelpers/deleteSolutionItem.d.ts +1 -1
- package/dist/umd/deleteHelpers/reconstructBuildOrderIds.d.ts +1 -1
- package/dist/umd/deleteHelpers/removeItems.d.ts +1 -1
- package/dist/umd/deleteSolution.d.ts +2 -2
- package/dist/umd/dependencies.d.ts +1 -1
- package/dist/umd/featureServiceHelpers.d.ts +99 -60
- package/dist/umd/generalHelpers.d.ts +34 -34
- package/dist/umd/getDeletableSolutionInfo.d.ts +1 -1
- package/dist/umd/getSolutionSummary.d.ts +1 -1
- package/dist/umd/interfaces.d.ts +438 -10
- package/dist/umd/libConnectors.d.ts +5 -5
- package/dist/umd/migrations/apply-schema.d.ts +1 -0
- package/dist/umd/migrations/upgrade-three-dot-one.d.ts +1 -0
- package/dist/umd/migrations/upgrade-two-dot-seven.d.ts +7 -0
- package/dist/umd/polyfills.d.ts +2 -2
- package/dist/umd/resourceHelpers.d.ts +11 -11
- package/dist/umd/resources/addMetadataFromBlob.d.ts +1 -1
- package/dist/umd/resources/convert-item-resource-to-storage-resource.d.ts +1 -1
- package/dist/umd/resources/convert-storage-resource-to-item-resource.d.ts +1 -1
- package/dist/umd/resources/copyAssociatedFiles.d.ts +4 -3
- package/dist/umd/resources/copyDataIntoItem.d.ts +2 -2
- package/dist/umd/resources/copyMetadataIntoItem.d.ts +1 -1
- package/dist/umd/resources/copyResourceIntoZip.d.ts +2 -2
- package/dist/umd/resources/copyZipIntoItem.d.ts +1 -1
- package/dist/umd/resources/createCopyResults.d.ts +1 -1
- package/dist/umd/resources/get-blob.d.ts +1 -1
- package/dist/umd/resources/getItemResourcesFilesFromPaths.d.ts +1 -1
- package/dist/umd/resources/getItemResourcesPaths.d.ts +1 -1
- package/dist/umd/resources/transform-resource-paths-to-solution-resources.d.ts +1 -0
- package/dist/umd/restHelpers.d.ts +59 -54
- package/dist/umd/restHelpersGet.d.ts +30 -30
- package/dist/umd/templatization.d.ts +15 -15
- package/dist/umd/trackingHelpers.d.ts +9 -9
- package/dist/umd/velocityHelpers.d.ts +4 -4
- package/dist/umd/workforceHelpers.d.ts +8 -7
- package/package.json +18 -17
|
@@ -39,8 +39,8 @@ const trackingHelpers_1 = require("./trackingHelpers");
|
|
|
39
39
|
* @param dependencies Array of IDependency for name mapping
|
|
40
40
|
* @param templatizeFieldReferences Templatize all field references within a layer
|
|
41
41
|
* @param templateDictionary Hash mapping property names to replacement values
|
|
42
|
-
* @
|
|
43
|
-
* @
|
|
42
|
+
* @returns A promise that will resolve when template has been updated
|
|
43
|
+
* @private
|
|
44
44
|
*/
|
|
45
45
|
function templatize(itemTemplate, dependencies, templatizeFieldReferences, templateDictionary) {
|
|
46
46
|
templateDictionary = templateDictionary || {};
|
|
@@ -130,7 +130,7 @@ exports.deleteViewProps = deleteViewProps;
|
|
|
130
130
|
* @param layer The data layer instance with field name references within
|
|
131
131
|
* @param fieldInfos the object that stores the cached field infos
|
|
132
132
|
* @param isPortal Controls what properties should be removed.
|
|
133
|
-
* @
|
|
133
|
+
* @returns An updated instance of the fieldInfos
|
|
134
134
|
*/
|
|
135
135
|
function cacheFieldInfos(layer, fieldInfos, isPortal) {
|
|
136
136
|
// cache the source fields as they are in the original source
|
|
@@ -166,6 +166,7 @@ exports.cacheFieldInfos = cacheFieldInfos;
|
|
|
166
166
|
* @param layer the data layer being cloned
|
|
167
167
|
* @param prop the property name used to cache
|
|
168
168
|
* @param fieldInfos the object that will store the cached property
|
|
169
|
+
* @private
|
|
169
170
|
*/
|
|
170
171
|
function _cacheFieldInfo(layer, prop, fieldInfos, removeProp) {
|
|
171
172
|
/* istanbul ignore else */
|
|
@@ -187,7 +188,7 @@ exports._cacheFieldInfo = _cacheFieldInfo;
|
|
|
187
188
|
* Cache popup info that can contain field references
|
|
188
189
|
*
|
|
189
190
|
* @param data The items data property
|
|
190
|
-
* @
|
|
191
|
+
* @returns An updated instance of the popupInfos
|
|
191
192
|
*/
|
|
192
193
|
function cachePopupInfos(data) {
|
|
193
194
|
// store any popupInfo so we can update after any potential name changes
|
|
@@ -211,6 +212,7 @@ exports.cachePopupInfos = cachePopupInfos;
|
|
|
211
212
|
* @param popupInfos object to store the cahced popupInfo
|
|
212
213
|
* @param type is it a layer or table
|
|
213
214
|
* @param _items list or either layers or tables
|
|
215
|
+
* @private
|
|
214
216
|
*/
|
|
215
217
|
function _cachePopupInfo(popupInfos, type, _items) {
|
|
216
218
|
_items.forEach((item) => {
|
|
@@ -227,8 +229,8 @@ exports._cachePopupInfo = _cachePopupInfo;
|
|
|
227
229
|
* @param itemTemplate Item to be created; n.b.: this item is modified
|
|
228
230
|
* @param templateDictionary Hash mapping property names to replacement values
|
|
229
231
|
* @param createResponse Response from create service
|
|
230
|
-
* @
|
|
231
|
-
* @
|
|
232
|
+
* @returns An updated instance of the template
|
|
233
|
+
* @private
|
|
232
234
|
*/
|
|
233
235
|
function updateTemplate(itemTemplate, templateDictionary, createResponse) {
|
|
234
236
|
// Update the item with any typeKeywords that were added on create
|
|
@@ -250,8 +252,8 @@ exports.updateTemplate = updateTemplate;
|
|
|
250
252
|
*
|
|
251
253
|
* @param itemTemplate Item to be created; n.b.: this item is modified
|
|
252
254
|
* @param createResponse Response from create service
|
|
253
|
-
* @
|
|
254
|
-
* @
|
|
255
|
+
* @returns An updated instance of the template
|
|
256
|
+
* @private
|
|
255
257
|
*/
|
|
256
258
|
function _updateTypeKeywords(itemTemplate, createResponse) {
|
|
257
259
|
// https://github.com/Esri/solution.js/issues/589
|
|
@@ -271,7 +273,7 @@ exports._updateTypeKeywords = _updateTypeKeywords;
|
|
|
271
273
|
* Example... { layer0: { fields: { lowerCaseSourceFieldName: newFieldNameAfterDeployment } } }
|
|
272
274
|
*
|
|
273
275
|
* @param layerInfos The object that stores the cached layer properties and name mapping
|
|
274
|
-
* @
|
|
276
|
+
* @returns The settings object that will be used to de-templatize the field references.
|
|
275
277
|
*/
|
|
276
278
|
function getLayerSettings(layerInfos, url, itemId, enterpriseIDMapping) {
|
|
277
279
|
const settings = {};
|
|
@@ -304,7 +306,7 @@ exports.getLayerSettings = getLayerSettings;
|
|
|
304
306
|
*
|
|
305
307
|
* @param templates A collection of AGO item templates.
|
|
306
308
|
* @param solutionItemId The item id for the deployed solution item.
|
|
307
|
-
* @
|
|
309
|
+
* @returns An updated collection of AGO templates with unique feature service names.
|
|
308
310
|
*/
|
|
309
311
|
function setNamesAndTitles(templates, solutionItemId) {
|
|
310
312
|
const names = [];
|
|
@@ -379,8 +381,8 @@ exports.updateSettingsFieldInfos = updateSettingsFieldInfos;
|
|
|
379
381
|
*
|
|
380
382
|
* @param template Template for feature service item
|
|
381
383
|
* @param authentication Credentials for the request
|
|
382
|
-
* @
|
|
383
|
-
* @
|
|
384
|
+
* @returns A promise that will resolve when template has been updated
|
|
385
|
+
* @private
|
|
384
386
|
*/
|
|
385
387
|
function updateTemplateForInvalidDesignations(template, authentication) {
|
|
386
388
|
return new Promise((resolve, reject) => {
|
|
@@ -418,7 +420,7 @@ exports.updateTemplateForInvalidDesignations = updateTemplateForInvalidDesignati
|
|
|
418
420
|
* @param popupInfos The object from the popupInfo property for the layer
|
|
419
421
|
* @param adminLayerInfos The object from the adminLayerInfo property for the layer
|
|
420
422
|
* @param settings The settings object that has all of the mappings for de-templatizing.
|
|
421
|
-
* @
|
|
423
|
+
* @returns An object that contains updated instances of popupInfos, fieldInfos, and adminLayerInfos
|
|
422
424
|
*/
|
|
423
425
|
function deTemplatizeFieldInfos(fieldInfos, popupInfos, adminLayerInfos, settings) {
|
|
424
426
|
const fieldInfoKeys = Object.keys(fieldInfos);
|
|
@@ -449,7 +451,7 @@ exports.deTemplatizeFieldInfos = deTemplatizeFieldInfos;
|
|
|
449
451
|
* to the item settings for the view.
|
|
450
452
|
*
|
|
451
453
|
* @param itemTemplate The current itemTemplate being processed.
|
|
452
|
-
* @
|
|
454
|
+
* @returns array of layers and tables
|
|
453
455
|
*/
|
|
454
456
|
function getLayersAndTables(itemTemplate) {
|
|
455
457
|
const properties = itemTemplate.properties;
|
|
@@ -477,8 +479,8 @@ exports.getLayersAndTables = getLayersAndTables;
|
|
|
477
479
|
* @param url Feature service endpoint
|
|
478
480
|
* @param ids layer and table ids
|
|
479
481
|
* @param authentication Credentials for the request
|
|
480
|
-
* @
|
|
481
|
-
* @
|
|
482
|
+
* @returns A promise that will resolve an array of promises with either a failure or the data
|
|
483
|
+
* @private
|
|
482
484
|
*/
|
|
483
485
|
function getExistingLayersAndTables(url, ids, authentication) {
|
|
484
486
|
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
|
@@ -501,8 +503,8 @@ exports.getExistingLayersAndTables = getExistingLayersAndTables;
|
|
|
501
503
|
* service)
|
|
502
504
|
* @param popupInfos the cached popup info from the layers
|
|
503
505
|
* @param authentication Credentials for the request
|
|
504
|
-
* @
|
|
505
|
-
* @
|
|
506
|
+
* @returns A promise that will resolve when all layers and tables have been added
|
|
507
|
+
* @private
|
|
506
508
|
*/
|
|
507
509
|
function addFeatureServiceLayersAndTables(itemTemplate, templateDictionary, popupInfos, authentication) {
|
|
508
510
|
return new Promise((resolve, reject) => {
|
|
@@ -564,8 +566,8 @@ exports.addFeatureServiceLayersAndTables = addFeatureServiceLayersAndTables;
|
|
|
564
566
|
* @param adminLayerInfos Hash map of a layers adminLayerInfo
|
|
565
567
|
* @param fieldInfos Hash map of properties that contain field references
|
|
566
568
|
* @param itemTemplate
|
|
567
|
-
* @
|
|
568
|
-
* @
|
|
569
|
+
* @returns A promise that will resolve when the feature service has been updated
|
|
570
|
+
* @private
|
|
569
571
|
*/
|
|
570
572
|
function addFeatureServiceDefinition(serviceUrl, listToAdd, templateDictionary, authentication, key, adminLayerInfos, fieldInfos, itemTemplate) {
|
|
571
573
|
return new Promise((resolve, reject) => {
|
|
@@ -670,8 +672,8 @@ exports.addFeatureServiceDefinition = addFeatureServiceDefinition;
|
|
|
670
672
|
* @param layerChunks Groups of layers or tables to add to the service
|
|
671
673
|
* @param authentication Credentials for the request
|
|
672
674
|
*
|
|
673
|
-
* @
|
|
674
|
-
* @
|
|
675
|
+
* @returns Add to service definition options
|
|
676
|
+
* @private
|
|
675
677
|
*/
|
|
676
678
|
function _updateAddOptions(itemTemplate, item, options, layerChunks, authentication) {
|
|
677
679
|
const isMsView = (0, generalHelpers_1.getProp)(itemTemplate, "properties.service.isMultiServicesView") || false;
|
|
@@ -705,7 +707,7 @@ exports._updateAddOptions = _updateAddOptions;
|
|
|
705
707
|
* Remove "multiScaleGeometryInfo" for issue #526 to prevent invalid enablement of layer optimization
|
|
706
708
|
*
|
|
707
709
|
* @param layer the layer to evaluate
|
|
708
|
-
* @
|
|
710
|
+
* @private
|
|
709
711
|
*/
|
|
710
712
|
function removeLayerOptimization(layer) {
|
|
711
713
|
/* istanbul ignore else */
|
|
@@ -721,8 +723,8 @@ exports.removeLayerOptimization = removeLayerOptimization;
|
|
|
721
723
|
* @param itemTemplate the item template
|
|
722
724
|
* @param templateDictionary Hash mapping Solution source id to id of its clone
|
|
723
725
|
*
|
|
724
|
-
* @
|
|
725
|
-
* @
|
|
726
|
+
* @returns the updated item
|
|
727
|
+
* @private
|
|
726
728
|
*/
|
|
727
729
|
function _updateForPortal(item, itemTemplate, templateDictionary) {
|
|
728
730
|
// When deploying to portal we need to adjust the uniquie ID field up front
|
|
@@ -787,8 +789,8 @@ exports._updateForPortal = _updateForPortal;
|
|
|
787
789
|
* @param itemTemplate the item template
|
|
788
790
|
* @param templateDictionary Hash mapping Solution source id to id of its clone
|
|
789
791
|
*
|
|
790
|
-
* @
|
|
791
|
-
* @
|
|
792
|
+
* @returns an array of the source layers fields
|
|
793
|
+
* @private
|
|
792
794
|
*/
|
|
793
795
|
function _getFieldNames(table, itemTemplate, templateDictionary) {
|
|
794
796
|
let sourceLayerFields = [];
|
|
@@ -820,8 +822,8 @@ exports._getFieldNames = _getFieldNames;
|
|
|
820
822
|
* @param item Layer or table
|
|
821
823
|
* @param templateDictionary Hash mapping Solution source id to id of its clone
|
|
822
824
|
*
|
|
823
|
-
* @
|
|
824
|
-
* @
|
|
825
|
+
* @returns updated layer or table
|
|
826
|
+
* @private
|
|
825
827
|
*/
|
|
826
828
|
function _updateItemFields(item, fieldNames) {
|
|
827
829
|
/* istanbul ignore else */
|
|
@@ -843,8 +845,8 @@ exports._updateItemFields = _updateItemFields;
|
|
|
843
845
|
*
|
|
844
846
|
* @param table the table instance to evaluate
|
|
845
847
|
* @param sourceLayerFields array of fields from the source service
|
|
846
|
-
* @
|
|
847
|
-
* @
|
|
848
|
+
* @returns Updated instance of the table
|
|
849
|
+
* @private
|
|
848
850
|
*/
|
|
849
851
|
function _updateSourceLayerFields(table, sourceLayerFields) {
|
|
850
852
|
/* istanbul ignore else */
|
|
@@ -865,7 +867,7 @@ exports._updateSourceLayerFields = _updateSourceLayerFields;
|
|
|
865
867
|
*
|
|
866
868
|
* @param item the item details from the current template
|
|
867
869
|
* @param templateDictionary Hash mapping property names to replacement values
|
|
868
|
-
* @
|
|
870
|
+
* @private
|
|
869
871
|
*/
|
|
870
872
|
function _updateGeomFieldName(adminLayerInfo, templateDictionary) {
|
|
871
873
|
// issue #471
|
|
@@ -894,7 +896,7 @@ exports._updateGeomFieldName = _updateGeomFieldName;
|
|
|
894
896
|
*
|
|
895
897
|
* @param itemTemplate
|
|
896
898
|
* @param templateDictionary Hash mapping Solution source id to id of its clone (and name & URL for feature service)
|
|
897
|
-
* @
|
|
899
|
+
* @private
|
|
898
900
|
*/
|
|
899
901
|
function _updateTemplateDictionaryFields(itemTemplate, templateDictionary, compareItemId = true) {
|
|
900
902
|
const layers = itemTemplate.properties.layers;
|
|
@@ -925,7 +927,7 @@ exports._updateTemplateDictionaryFields = _updateTemplateDictionaryFields;
|
|
|
925
927
|
* @param templateDictionary Hash mapping Solution source id to id of its clone (and name & URL for feature service)
|
|
926
928
|
* @param itemId The source id for the item
|
|
927
929
|
* @param spatialReference { wkid: 102100 } for example
|
|
928
|
-
* @
|
|
930
|
+
* @private
|
|
929
931
|
*/
|
|
930
932
|
function setDefaultSpatialReference(templateDictionary, itemId, spatialReference) {
|
|
931
933
|
/* istanbul ignore else */
|
|
@@ -942,7 +944,7 @@ exports.setDefaultSpatialReference = setDefaultSpatialReference;
|
|
|
942
944
|
* @param serviceInfo Basic service information
|
|
943
945
|
* @param itemTemplate The current template to process
|
|
944
946
|
* @param templateDictionary Hash mapping Solution source id to id of its clone (and name & URL for feature service)
|
|
945
|
-
* @
|
|
947
|
+
* @private
|
|
946
948
|
*/
|
|
947
949
|
function validateSpatialReferenceAndExtent(serviceInfo, itemTemplate, templateDictionary) {
|
|
948
950
|
/* istanbul ignore else */
|
|
@@ -988,8 +990,8 @@ exports.validateSpatialReferenceAndExtent = validateSpatialReferenceAndExtent;
|
|
|
988
990
|
* @param adminLayerInfos Hash map of a layers adminLayerInfo
|
|
989
991
|
* @param templateDictionary Hash mapping Solution source id to id of its clone (and name & URL for feature service)
|
|
990
992
|
* @param authentication Credentials for the request
|
|
991
|
-
* @
|
|
992
|
-
* @
|
|
993
|
+
* @returns A promise that will resolve when the feature service has been updated
|
|
994
|
+
* @private
|
|
993
995
|
*/
|
|
994
996
|
function updateLayerFieldReferences(itemTemplate, fieldInfos, popupInfos, adminLayerInfos, templateDictionary) {
|
|
995
997
|
return new Promise((resolveFn, rejectFn) => {
|
|
@@ -1016,8 +1018,8 @@ exports.updateLayerFieldReferences = updateLayerFieldReferences;
|
|
|
1016
1018
|
* @param adminLayerInfos Hash map of a layers adminLayerInfo
|
|
1017
1019
|
* @param templateDictionary
|
|
1018
1020
|
* @param authentication Credentials for the request
|
|
1019
|
-
* @
|
|
1020
|
-
* @
|
|
1021
|
+
* @returns An object with detemplatized field references
|
|
1022
|
+
* @private
|
|
1021
1023
|
*/
|
|
1022
1024
|
function postProcessFields(itemTemplate, layerInfos, popupInfos, adminLayerInfos, templateDictionary) {
|
|
1023
1025
|
return new Promise((resolveFn, rejectFn) => {
|
|
@@ -1099,8 +1101,8 @@ exports.postProcessFields = postProcessFields;
|
|
|
1099
1101
|
* we need to pass it via an updateDef call or it will be set as the typeIdField of the source service
|
|
1100
1102
|
*
|
|
1101
1103
|
* @param item current layer or table
|
|
1102
|
-
* @
|
|
1103
|
-
* @
|
|
1104
|
+
* @returns name of field to set for typeIdField in the update call
|
|
1105
|
+
* @private
|
|
1104
1106
|
*/
|
|
1105
1107
|
function _getTypeIdField(item) {
|
|
1106
1108
|
const typeIdFields = item.fields.filter((f) => {
|
|
@@ -1119,8 +1121,8 @@ exports._getTypeIdField = _getTypeIdField;
|
|
|
1119
1121
|
* visible true when added with the layer definition
|
|
1120
1122
|
*
|
|
1121
1123
|
* @param fieldInfo current layers or tables fieldInfo
|
|
1122
|
-
* @
|
|
1123
|
-
* @
|
|
1124
|
+
* @returns Array of fields that should not be visible in the view
|
|
1125
|
+
* @private
|
|
1124
1126
|
*/
|
|
1125
1127
|
function _getFieldVisibilityUpdates(fieldInfo) {
|
|
1126
1128
|
const visibilityUpdates = [];
|
|
@@ -1149,8 +1151,8 @@ exports._getFieldVisibilityUpdates = _getFieldVisibilityUpdates;
|
|
|
1149
1151
|
*
|
|
1150
1152
|
* @param fieldInfo current view layer or table fieldInfo
|
|
1151
1153
|
* @param fieldUpdates any existing field updates
|
|
1152
|
-
* @
|
|
1153
|
-
* @
|
|
1154
|
+
* @returns Array of fields to be updated
|
|
1155
|
+
* @private
|
|
1154
1156
|
*/
|
|
1155
1157
|
function _validateDomains(fieldInfo, fieldUpdates) {
|
|
1156
1158
|
const domainAliasInfos = _getDomainAndAliasInfos(fieldInfo);
|
|
@@ -1176,7 +1178,7 @@ exports._validateDomains = _validateDomains;
|
|
|
1176
1178
|
* @param fields the alias or domain fields
|
|
1177
1179
|
* @param key the field key to evaluate
|
|
1178
1180
|
* @param fieldUpdates any existing field updates
|
|
1179
|
-
* @
|
|
1181
|
+
* @private
|
|
1180
1182
|
*/
|
|
1181
1183
|
function _getPortalViewFieldUpdates(field, names, fields, key, fieldUpdates) {
|
|
1182
1184
|
if (field.hasOwnProperty(key) && field[key]) {
|
|
@@ -1206,8 +1208,8 @@ exports._getPortalViewFieldUpdates = _getPortalViewFieldUpdates;
|
|
|
1206
1208
|
*
|
|
1207
1209
|
* @param fieldInfo current view layer or table fieldInfo
|
|
1208
1210
|
* @param fieldUpdates any existing field updates
|
|
1209
|
-
* @
|
|
1210
|
-
* @
|
|
1211
|
+
* @returns Array of fields to be updated
|
|
1212
|
+
* @private
|
|
1211
1213
|
*/
|
|
1212
1214
|
function _validateViewDomainsAndAlias(fieldInfo, item) {
|
|
1213
1215
|
const domainAliasInfos = _getDomainAndAliasInfos(fieldInfo);
|
|
@@ -1228,7 +1230,7 @@ exports._validateViewDomainsAndAlias = _validateViewDomainsAndAlias;
|
|
|
1228
1230
|
* Get array of domain fields and names and alias fields and names
|
|
1229
1231
|
*
|
|
1230
1232
|
* @param fieldInfo current view layer or table fieldInfo
|
|
1231
|
-
*
|
|
1233
|
+
* @private
|
|
1232
1234
|
*/
|
|
1233
1235
|
function _getDomainAndAliasInfos(fieldInfo) {
|
|
1234
1236
|
const domainFields = [];
|
|
@@ -1272,7 +1274,7 @@ exports._getDomainAndAliasInfos = _getDomainAndAliasInfos;
|
|
|
1272
1274
|
* @param names array of field names
|
|
1273
1275
|
* @param fields array of fields
|
|
1274
1276
|
* @param key the field key to compare
|
|
1275
|
-
* @
|
|
1277
|
+
* @private
|
|
1276
1278
|
*/
|
|
1277
1279
|
function _isViewFieldOverride(field, names, fields, key) {
|
|
1278
1280
|
/* istanbul ignore else */
|
|
@@ -1290,7 +1292,7 @@ exports._isViewFieldOverride = _isViewFieldOverride;
|
|
|
1290
1292
|
*
|
|
1291
1293
|
* @param itemTemplate
|
|
1292
1294
|
* @param popupInfos popup info to be added back to the layer
|
|
1293
|
-
* @
|
|
1295
|
+
* @private
|
|
1294
1296
|
*/
|
|
1295
1297
|
function updatePopupInfo(itemTemplate, popupInfos) {
|
|
1296
1298
|
["layers", "tables"].forEach(type => {
|
|
@@ -1311,6 +1313,7 @@ exports.updatePopupInfo = updatePopupInfo;
|
|
|
1311
1313
|
*
|
|
1312
1314
|
* @param basePath path used to de-templatize while deploying
|
|
1313
1315
|
* @param value to be converted to lower case for lookup while deploying
|
|
1316
|
+
* @private
|
|
1314
1317
|
*/
|
|
1315
1318
|
function _templatize(basePath, value, suffix) {
|
|
1316
1319
|
if (value.startsWith("{{")) {
|
|
@@ -1327,6 +1330,7 @@ exports._templatize = _templatize;
|
|
|
1327
1330
|
* @param object the object with the property to templatize
|
|
1328
1331
|
* @param property the property of the object to templatize
|
|
1329
1332
|
* @param basePath path used to de-templatize while deploying
|
|
1333
|
+
* @private
|
|
1330
1334
|
*/
|
|
1331
1335
|
function _templatizeProperty(object, property, basePath, suffix) {
|
|
1332
1336
|
if (object && object.hasOwnProperty(property) && object[property]) {
|
|
@@ -1342,8 +1346,8 @@ exports._templatizeProperty = _templatizeProperty;
|
|
|
1342
1346
|
* @param itemTemplate Template for feature service item
|
|
1343
1347
|
* @param dependencies Array of IDependency for name mapping
|
|
1344
1348
|
* @param templatizeFieldReferences Templatize all field references within a layer
|
|
1345
|
-
* @
|
|
1346
|
-
* @
|
|
1349
|
+
* @returns A promise that will resolve when template has been updated
|
|
1350
|
+
* @private
|
|
1347
1351
|
*/
|
|
1348
1352
|
function _templatizeLayer(dataItem, adminItem, itemTemplate, dependencies, templatizeFieldReferences, templateDictionary) {
|
|
1349
1353
|
// check for and repair common field issues
|
|
@@ -1400,6 +1404,7 @@ exports._validateFields = _validateFields;
|
|
|
1400
1404
|
*
|
|
1401
1405
|
* @param adminItem layer or table from the service
|
|
1402
1406
|
* @param fieldNames string list of fields names
|
|
1407
|
+
* @private
|
|
1403
1408
|
*/
|
|
1404
1409
|
function _validateDisplayField(adminItem, fieldNames) {
|
|
1405
1410
|
const displayField = adminItem.displayField || "";
|
|
@@ -1441,6 +1446,7 @@ exports._validateDisplayField = _validateDisplayField;
|
|
|
1441
1446
|
*
|
|
1442
1447
|
* @param adminItem layer or table from the service
|
|
1443
1448
|
* @param fieldNames string list of fields names
|
|
1449
|
+
* @private
|
|
1444
1450
|
*/
|
|
1445
1451
|
function _validateIndexes(adminItem, fieldNames) {
|
|
1446
1452
|
const indexes = adminItem.indexes;
|
|
@@ -1477,6 +1483,7 @@ exports._validateIndexes = _validateIndexes;
|
|
|
1477
1483
|
*
|
|
1478
1484
|
* @param adminItem layer or table from the service
|
|
1479
1485
|
* @param fieldNames string list of fields names
|
|
1486
|
+
* @private
|
|
1480
1487
|
*/
|
|
1481
1488
|
function _validateTemplatesFields(adminItem, fieldNames) {
|
|
1482
1489
|
const templates = adminItem.templates;
|
|
@@ -1504,6 +1511,7 @@ exports._validateTemplatesFields = _validateTemplatesFields;
|
|
|
1504
1511
|
*
|
|
1505
1512
|
* @param adminItem layer or table from the service
|
|
1506
1513
|
* @param fieldNames string list of fields names
|
|
1514
|
+
* @private
|
|
1507
1515
|
*/
|
|
1508
1516
|
function _validateTypesTemplates(adminItem, fieldNames) {
|
|
1509
1517
|
const types = adminItem.types;
|
|
@@ -1521,6 +1529,7 @@ exports._validateTypesTemplates = _validateTypesTemplates;
|
|
|
1521
1529
|
*
|
|
1522
1530
|
* @param adminItem layer or table from the service
|
|
1523
1531
|
* @param fieldNames string list of fields names
|
|
1532
|
+
* @private
|
|
1524
1533
|
*/
|
|
1525
1534
|
function _validateEditFieldsInfo(adminItem, fieldNames) {
|
|
1526
1535
|
const editFieldsInfo = adminItem.editFieldsInfo;
|
|
@@ -1558,7 +1567,8 @@ exports._validateEditFieldsInfo = _validateEditFieldsInfo;
|
|
|
1558
1567
|
* @param itemID The id for the item that contains this layer.
|
|
1559
1568
|
* @param layer JSON return from the layer being templatized.
|
|
1560
1569
|
* @param dependencies
|
|
1561
|
-
* @
|
|
1570
|
+
* @returns An updated instance of the layer
|
|
1571
|
+
* @private
|
|
1562
1572
|
*/
|
|
1563
1573
|
function _templatizeLayerFieldReferences(dataItem, itemID, layer, dependencies) {
|
|
1564
1574
|
// This is the value that will be used as the template for adlib replacement
|
|
@@ -1588,8 +1598,8 @@ exports._templatizeLayerFieldReferences = _templatizeLayerFieldReferences;
|
|
|
1588
1598
|
*
|
|
1589
1599
|
* @param layer The layer to be modified
|
|
1590
1600
|
* @param dependencies Array of service dependencies
|
|
1591
|
-
* @
|
|
1592
|
-
* @
|
|
1601
|
+
* @returns A new copy of the modified adminLayerInfo for the given layer
|
|
1602
|
+
* @private
|
|
1593
1603
|
*/
|
|
1594
1604
|
function _templatizeAdminLayerInfo(layer, dependencies, templateDictionary) {
|
|
1595
1605
|
// Create new instance of adminLayerInfo to update for clone
|
|
@@ -1623,7 +1633,7 @@ exports._templatizeAdminLayerInfo = _templatizeAdminLayerInfo;
|
|
|
1623
1633
|
*
|
|
1624
1634
|
* @param object The layer to be modified
|
|
1625
1635
|
* @param dependencies Array of service dependencies
|
|
1626
|
-
* @
|
|
1636
|
+
* @private
|
|
1627
1637
|
*/
|
|
1628
1638
|
function _processAdminObject(object, dependencies) {
|
|
1629
1639
|
(0, generalHelpers_1.deleteProp)(object, "sourceId");
|
|
@@ -1637,8 +1647,8 @@ exports._processAdminObject = _processAdminObject;
|
|
|
1637
1647
|
*
|
|
1638
1648
|
* @param lookupName The current name from the source service
|
|
1639
1649
|
* @param dependencies Array of IDependency for name mapping
|
|
1640
|
-
* @
|
|
1641
|
-
* @
|
|
1650
|
+
* @returns The templatized name || undefined when no matching dependency is found
|
|
1651
|
+
* @private
|
|
1642
1652
|
*/
|
|
1643
1653
|
function _templatizeSourceServiceName(lookupName, dependencies) {
|
|
1644
1654
|
const deps = dependencies.filter(dependency => dependency.name === lookupName);
|
|
@@ -1651,6 +1661,7 @@ exports._templatizeSourceServiceName = _templatizeSourceServiceName;
|
|
|
1651
1661
|
* @param layer the layer object with the adminLayerInfo property to templatize
|
|
1652
1662
|
* @param basePath path used to de-templatize while deploying
|
|
1653
1663
|
* @param itemID the id for the item that contains this layer
|
|
1664
|
+
* @private
|
|
1654
1665
|
*/
|
|
1655
1666
|
function _templatizeAdminLayerInfoFields(layer, dependencies) {
|
|
1656
1667
|
// templatize the source layer fields
|
|
@@ -1685,6 +1696,7 @@ exports._templatizeAdminLayerInfoFields = _templatizeAdminLayerInfoFields;
|
|
|
1685
1696
|
*
|
|
1686
1697
|
* @param lookupName name of dependency we want to find the id of
|
|
1687
1698
|
* @param dependencies array of item dependencies
|
|
1699
|
+
* @private
|
|
1688
1700
|
*/
|
|
1689
1701
|
function _getDependantItemId(lookupName, dependencies) {
|
|
1690
1702
|
const deps = dependencies.filter(dependency => dependency.name === lookupName);
|
|
@@ -1696,6 +1708,7 @@ exports._getDependantItemId = _getDependantItemId;
|
|
|
1696
1708
|
*
|
|
1697
1709
|
* @param fields array of sourceLayerFields to templatize
|
|
1698
1710
|
* @param basePath path used to de-templatize while deploying
|
|
1711
|
+
* @private
|
|
1699
1712
|
*/
|
|
1700
1713
|
function _templatizeAdminSourceLayerFields(fields, basePath) {
|
|
1701
1714
|
fields.forEach(f => _templatizeProperty(f, "source", basePath, "name"));
|
|
@@ -1706,6 +1719,7 @@ exports._templatizeAdminSourceLayerFields = _templatizeAdminSourceLayerFields;
|
|
|
1706
1719
|
*
|
|
1707
1720
|
* @param topFilter the topFilter object to templatize
|
|
1708
1721
|
* @param basePath path used to de-templatize while deploying
|
|
1722
|
+
* @private
|
|
1709
1723
|
*/
|
|
1710
1724
|
function _templatizeTopFilter(topFilter, basePath) {
|
|
1711
1725
|
/* istanbul ignore else */
|
|
@@ -1737,6 +1751,7 @@ exports._templatizeTopFilter = _templatizeTopFilter;
|
|
|
1737
1751
|
*
|
|
1738
1752
|
* @param layer the layer that has the relationships to templatize
|
|
1739
1753
|
* @param itemID the id of the item that contains the related table
|
|
1754
|
+
* @private
|
|
1740
1755
|
*/
|
|
1741
1756
|
function _templatizeRelationshipFields(layer, itemID) {
|
|
1742
1757
|
if (layer && layer.relationships) {
|
|
@@ -1759,6 +1774,7 @@ exports._templatizeRelationshipFields = _templatizeRelationshipFields;
|
|
|
1759
1774
|
* @param basePath path used to de-templatize while deploying
|
|
1760
1775
|
* @param itemID the id for the item that contains this layer
|
|
1761
1776
|
* @param fieldNames array of fieldNames
|
|
1777
|
+
* @private
|
|
1762
1778
|
*/
|
|
1763
1779
|
function _templatizePopupInfo(layerDefinition, layer, basePath, itemID, fieldNames) {
|
|
1764
1780
|
// the data layer does not have the fields...will need to get those
|
|
@@ -1786,6 +1802,7 @@ exports._templatizePopupInfo = _templatizePopupInfo;
|
|
|
1786
1802
|
* @param property that could have a field name referenced
|
|
1787
1803
|
* @param fieldNames array for field names for the layer
|
|
1788
1804
|
* @param basePath path used to de-templatize while deploying
|
|
1805
|
+
* @private
|
|
1789
1806
|
*/
|
|
1790
1807
|
function _templatizeName(object, property, fieldNames, basePath) {
|
|
1791
1808
|
if (object.hasOwnProperty(property)) {
|
|
@@ -1808,6 +1825,7 @@ exports._templatizeName = _templatizeName;
|
|
|
1808
1825
|
* @param layer json of layer being cloned
|
|
1809
1826
|
* @param itemID id of the item that contains the current layer
|
|
1810
1827
|
* @param basePath path used to de-templatize while deploying
|
|
1828
|
+
* @private
|
|
1811
1829
|
*/
|
|
1812
1830
|
function _templatizePopupInfoFieldInfos(fieldInfos, layer, itemID, basePath) {
|
|
1813
1831
|
fieldInfos.forEach((f) => {
|
|
@@ -1823,6 +1841,7 @@ exports._templatizePopupInfoFieldInfos = _templatizePopupInfoFieldInfos;
|
|
|
1823
1841
|
* @param layer json of layer being cloned
|
|
1824
1842
|
* @param itemID id of the item that contains the current layer
|
|
1825
1843
|
* @param basePath path used to de-templatize while deploying
|
|
1844
|
+
* @private
|
|
1826
1845
|
*/
|
|
1827
1846
|
function _templatizeFieldName(name, layer, itemID, basePath) {
|
|
1828
1847
|
if (name.indexOf("relationships/") > -1) {
|
|
@@ -1859,6 +1878,7 @@ exports._templatizeFieldName = _templatizeFieldName;
|
|
|
1859
1878
|
* @param expressionInfos the popups expressionInfos to check
|
|
1860
1879
|
* @param fieldNames array of the layers field names
|
|
1861
1880
|
* @param basePath path used to de-templatize while deploying
|
|
1881
|
+
* @private
|
|
1862
1882
|
*/
|
|
1863
1883
|
function _templatizeExpressionInfos(expressionInfos, fieldNames, basePath) {
|
|
1864
1884
|
return expressionInfos.map((i) => {
|
|
@@ -1877,6 +1897,7 @@ exports._templatizeExpressionInfos = _templatizeExpressionInfos;
|
|
|
1877
1897
|
* @param layer json of layer being cloned
|
|
1878
1898
|
* @param itemID id of the item that contains the current layer
|
|
1879
1899
|
* @param fieldNames array of field names
|
|
1900
|
+
* @private
|
|
1880
1901
|
*/
|
|
1881
1902
|
function _templatizePopupElements(popupElelments, basePath, layer, itemID, fieldNames) {
|
|
1882
1903
|
popupElelments.forEach((pe) => {
|
|
@@ -1897,6 +1918,7 @@ exports._templatizePopupElements = _templatizePopupElements;
|
|
|
1897
1918
|
* @param basePath path used to de-templatize while deploying
|
|
1898
1919
|
* @param layer json of layer being cloned
|
|
1899
1920
|
* @param itemID id of the item that contains the current layer
|
|
1921
|
+
* @private
|
|
1900
1922
|
*/
|
|
1901
1923
|
function _templatizeMediaInfos(mediaInfos, fieldNames, basePath, layer, itemId) {
|
|
1902
1924
|
// templatize various properties of mediaInfos
|
|
@@ -1925,6 +1947,7 @@ exports._templatizeMediaInfos = _templatizeMediaInfos;
|
|
|
1925
1947
|
* @param layer the layer with the definition editor
|
|
1926
1948
|
* @param basePath path used to de-templatize while deploying
|
|
1927
1949
|
* @param fieldNames json of layer being cloned
|
|
1950
|
+
* @private
|
|
1928
1951
|
*/
|
|
1929
1952
|
function _templatizeDefinitionEditor(layer, basePath, fieldNames) {
|
|
1930
1953
|
if (layer) {
|
|
@@ -1955,6 +1978,7 @@ exports._templatizeDefinitionEditor = _templatizeDefinitionEditor;
|
|
|
1955
1978
|
* @param layer the layer with the definition editor
|
|
1956
1979
|
* @param basePath path used to de-templatize while deploying
|
|
1957
1980
|
* @param fieldNames array of field names
|
|
1981
|
+
* @private
|
|
1958
1982
|
*/
|
|
1959
1983
|
function _templatizeDefinitionExpression(layer, basePath, fieldNames) {
|
|
1960
1984
|
if (layer && layer.hasOwnProperty("definitionExpression")) {
|
|
@@ -1968,6 +1992,7 @@ exports._templatizeDefinitionExpression = _templatizeDefinitionExpression;
|
|
|
1968
1992
|
* @param expression the expression to test for field name references
|
|
1969
1993
|
* @param basePath path used to de-templatize while deploying
|
|
1970
1994
|
* @param fieldNames array of the layers field names
|
|
1995
|
+
* @private
|
|
1971
1996
|
*/
|
|
1972
1997
|
function _templatizeSimpleName(expression, basePath, fieldNames, suffix) {
|
|
1973
1998
|
fieldNames.forEach(name => {
|
|
@@ -1986,6 +2011,7 @@ exports._templatizeSimpleName = _templatizeSimpleName;
|
|
|
1986
2011
|
* @param layer the data layer
|
|
1987
2012
|
* @param basePath path used to de-templatize while deploying
|
|
1988
2013
|
* @param fieldNames array of the layers field names
|
|
2014
|
+
* @private
|
|
1989
2015
|
*/
|
|
1990
2016
|
function _templatizeDrawingInfo(layer, basePath, fieldNames) {
|
|
1991
2017
|
if (layer) {
|
|
@@ -2007,6 +2033,7 @@ exports._templatizeDrawingInfo = _templatizeDrawingInfo;
|
|
|
2007
2033
|
* @param renderer the layers renderer
|
|
2008
2034
|
* @param basePath path used to de-templatize while deploying
|
|
2009
2035
|
* @param fieldNames array of the layers field names
|
|
2036
|
+
* @private
|
|
2010
2037
|
*/
|
|
2011
2038
|
function _templatizeRenderer(renderer, basePath, fieldNames) {
|
|
2012
2039
|
switch (renderer.type) {
|
|
@@ -2031,6 +2058,7 @@ exports._templatizeRenderer = _templatizeRenderer;
|
|
|
2031
2058
|
* @param renderer the renderer object to check for field references
|
|
2032
2059
|
* @param basePath path used to de-templatize while deploying
|
|
2033
2060
|
* @param fieldNames array of field names that will be used to search expressions
|
|
2061
|
+
* @private
|
|
2034
2062
|
*/
|
|
2035
2063
|
function _templatizeGenRenderer(renderer, basePath, fieldNames) {
|
|
2036
2064
|
/* istanbul ignore else */
|
|
@@ -2081,6 +2109,7 @@ exports._templatizeGenRenderer = _templatizeGenRenderer;
|
|
|
2081
2109
|
* @param renderer the renderer object to check for field references
|
|
2082
2110
|
* @param basePath path used to de-templatize while deploying
|
|
2083
2111
|
* @param fieldNames array of field names that will be used to search expressions
|
|
2112
|
+
* @private
|
|
2084
2113
|
*/
|
|
2085
2114
|
function _templatizeTemporalRenderer(renderer, basePath, fieldNames) {
|
|
2086
2115
|
const renderers = [
|
|
@@ -2099,6 +2128,7 @@ exports._templatizeTemporalRenderer = _templatizeTemporalRenderer;
|
|
|
2099
2128
|
* @param authoringInfo object containing metadata about the authoring process
|
|
2100
2129
|
* @param basePath path used to de-templatize while deploying
|
|
2101
2130
|
* @param fieldNames the name of fields from the layer
|
|
2131
|
+
* @private
|
|
2102
2132
|
*/
|
|
2103
2133
|
function _templatizeAuthoringInfo(authoringInfo, basePath, fieldNames) {
|
|
2104
2134
|
/* istanbul ignore else */
|
|
@@ -2131,6 +2161,7 @@ exports._templatizeAuthoringInfo = _templatizeAuthoringInfo;
|
|
|
2131
2161
|
* @param text the text that contains the expression
|
|
2132
2162
|
* @param fieldName name of the field to test for
|
|
2133
2163
|
* @param basePath path used to de-templatize while deploying
|
|
2164
|
+
* @private
|
|
2134
2165
|
*/
|
|
2135
2166
|
function _templatizeArcadeExpressions(text, fieldName, basePath) {
|
|
2136
2167
|
const t = _templatize(basePath, fieldName, "name");
|
|
@@ -2179,6 +2210,7 @@ exports._templatizeArcadeExpressions = _templatizeArcadeExpressions;
|
|
|
2179
2210
|
* @param labelingInfo the object that contains the labelingInfo
|
|
2180
2211
|
* @param basePath path used to de-templatize while deploying
|
|
2181
2212
|
* @param fieldNames array of the layers field names
|
|
2213
|
+
* @private
|
|
2182
2214
|
*/
|
|
2183
2215
|
function _templatizeLabelingInfo(labelingInfo, basePath, fieldNames) {
|
|
2184
2216
|
labelingInfo.forEach((li) => {
|
|
@@ -2221,6 +2253,7 @@ exports._templatizeLabelingInfo = _templatizeLabelingInfo;
|
|
|
2221
2253
|
*
|
|
2222
2254
|
* @param layer the data layer being cloned
|
|
2223
2255
|
* @param basePath path used to de-templatize while deploying
|
|
2256
|
+
* @private
|
|
2224
2257
|
*/
|
|
2225
2258
|
function _templatizeTemplates(layer, basePath) {
|
|
2226
2259
|
const templates = layer.templates || [];
|
|
@@ -2239,6 +2272,7 @@ exports._templatizeTemplates = _templatizeTemplates;
|
|
|
2239
2272
|
*
|
|
2240
2273
|
* @param layer the data layer being cloned
|
|
2241
2274
|
* @param basePath path used to de-templatize while deploying
|
|
2275
|
+
* @private
|
|
2242
2276
|
*/
|
|
2243
2277
|
function _templatizeTypeTemplates(layer, basePath) {
|
|
2244
2278
|
const types = layer.types;
|
|
@@ -2271,6 +2305,7 @@ exports._templatizeTypeTemplates = _templatizeTypeTemplates;
|
|
|
2271
2305
|
* @param obj the object to templatize
|
|
2272
2306
|
* @param basePath path used to de-templatize while deploying
|
|
2273
2307
|
* @param suffix expected suffix for template variable
|
|
2308
|
+
* @private
|
|
2274
2309
|
*/
|
|
2275
2310
|
function _templatizeKeys(obj, basePath, suffix) {
|
|
2276
2311
|
let _obj;
|
|
@@ -2293,6 +2328,7 @@ exports._templatizeKeys = _templatizeKeys;
|
|
|
2293
2328
|
*
|
|
2294
2329
|
* @param layer the data layer being cloned
|
|
2295
2330
|
* @param basePath path used to de-templatize while deploying
|
|
2331
|
+
* @private
|
|
2296
2332
|
*/
|
|
2297
2333
|
function _templatizeTimeInfo(layer, basePath) {
|
|
2298
2334
|
if (layer.timeInfo) {
|
|
@@ -2319,6 +2355,7 @@ exports._templatizeTimeInfo = _templatizeTimeInfo;
|
|
|
2319
2355
|
* @param layer the data layer being cloned
|
|
2320
2356
|
* @param basePath path used to de-templatize while deploying
|
|
2321
2357
|
* @param fieldNames array of the layers field names
|
|
2358
|
+
* @private
|
|
2322
2359
|
*/
|
|
2323
2360
|
function _templatizeDefinitionQuery(layer, basePath, fieldNames) {
|
|
2324
2361
|
// templatize view definition query
|
|
@@ -2336,6 +2373,7 @@ exports._templatizeDefinitionQuery = _templatizeDefinitionQuery;
|
|
|
2336
2373
|
*
|
|
2337
2374
|
* @param fieldInfos the object that stores the cached information
|
|
2338
2375
|
* @param id the id for the current layer being processed
|
|
2376
|
+
* @private
|
|
2339
2377
|
*/
|
|
2340
2378
|
function _getNameMapping(fieldInfos, id) {
|
|
2341
2379
|
// create name mapping
|
|
@@ -2417,7 +2455,8 @@ exports._getNameMapping = _getNameMapping;
|
|
|
2417
2455
|
/**
|
|
2418
2456
|
* Helper function to ensure same chunk size value is used in multiple locations
|
|
2419
2457
|
*
|
|
2420
|
-
* @
|
|
2458
|
+
* @returns a number that represents how many layers should be included per addToDef call
|
|
2459
|
+
* @private
|
|
2421
2460
|
*/
|
|
2422
2461
|
function _getLayerChunkSize() {
|
|
2423
2462
|
return 20;
|