@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
|
@@ -33,8 +33,8 @@ import { isTrackingViewTemplate, templatizeTracker } from "./trackingHelpers";
|
|
|
33
33
|
* @param dependencies Array of IDependency for name mapping
|
|
34
34
|
* @param templatizeFieldReferences Templatize all field references within a layer
|
|
35
35
|
* @param templateDictionary Hash mapping property names to replacement values
|
|
36
|
-
* @
|
|
37
|
-
* @
|
|
36
|
+
* @returns A promise that will resolve when template has been updated
|
|
37
|
+
* @private
|
|
38
38
|
*/
|
|
39
39
|
export function templatize(itemTemplate, dependencies, templatizeFieldReferences, templateDictionary) {
|
|
40
40
|
templateDictionary = templateDictionary || {};
|
|
@@ -122,7 +122,7 @@ export function deleteViewProps(layer) {
|
|
|
122
122
|
* @param layer The data layer instance with field name references within
|
|
123
123
|
* @param fieldInfos the object that stores the cached field infos
|
|
124
124
|
* @param isPortal Controls what properties should be removed.
|
|
125
|
-
* @
|
|
125
|
+
* @returns An updated instance of the fieldInfos
|
|
126
126
|
*/
|
|
127
127
|
export function cacheFieldInfos(layer, fieldInfos, isPortal) {
|
|
128
128
|
// cache the source fields as they are in the original source
|
|
@@ -157,6 +157,7 @@ export function cacheFieldInfos(layer, fieldInfos, isPortal) {
|
|
|
157
157
|
* @param layer the data layer being cloned
|
|
158
158
|
* @param prop the property name used to cache
|
|
159
159
|
* @param fieldInfos the object that will store the cached property
|
|
160
|
+
* @private
|
|
160
161
|
*/
|
|
161
162
|
export function _cacheFieldInfo(layer, prop, fieldInfos, removeProp) {
|
|
162
163
|
/* istanbul ignore else */
|
|
@@ -177,7 +178,7 @@ export function _cacheFieldInfo(layer, prop, fieldInfos, removeProp) {
|
|
|
177
178
|
* Cache popup info that can contain field references
|
|
178
179
|
*
|
|
179
180
|
* @param data The items data property
|
|
180
|
-
* @
|
|
181
|
+
* @returns An updated instance of the popupInfos
|
|
181
182
|
*/
|
|
182
183
|
export function cachePopupInfos(data) {
|
|
183
184
|
// store any popupInfo so we can update after any potential name changes
|
|
@@ -200,6 +201,7 @@ export function cachePopupInfos(data) {
|
|
|
200
201
|
* @param popupInfos object to store the cahced popupInfo
|
|
201
202
|
* @param type is it a layer or table
|
|
202
203
|
* @param _items list or either layers or tables
|
|
204
|
+
* @private
|
|
203
205
|
*/
|
|
204
206
|
export function _cachePopupInfo(popupInfos, type, _items) {
|
|
205
207
|
_items.forEach((item) => {
|
|
@@ -215,8 +217,8 @@ export function _cachePopupInfo(popupInfos, type, _items) {
|
|
|
215
217
|
* @param itemTemplate Item to be created; n.b.: this item is modified
|
|
216
218
|
* @param templateDictionary Hash mapping property names to replacement values
|
|
217
219
|
* @param createResponse Response from create service
|
|
218
|
-
* @
|
|
219
|
-
* @
|
|
220
|
+
* @returns An updated instance of the template
|
|
221
|
+
* @private
|
|
220
222
|
*/
|
|
221
223
|
export function updateTemplate(itemTemplate, templateDictionary, createResponse) {
|
|
222
224
|
// Update the item with any typeKeywords that were added on create
|
|
@@ -237,8 +239,8 @@ export function updateTemplate(itemTemplate, templateDictionary, createResponse)
|
|
|
237
239
|
*
|
|
238
240
|
* @param itemTemplate Item to be created; n.b.: this item is modified
|
|
239
241
|
* @param createResponse Response from create service
|
|
240
|
-
* @
|
|
241
|
-
* @
|
|
242
|
+
* @returns An updated instance of the template
|
|
243
|
+
* @private
|
|
242
244
|
*/
|
|
243
245
|
export function _updateTypeKeywords(itemTemplate, createResponse) {
|
|
244
246
|
// https://github.com/Esri/solution.js/issues/589
|
|
@@ -257,7 +259,7 @@ export function _updateTypeKeywords(itemTemplate, createResponse) {
|
|
|
257
259
|
* Example... { layer0: { fields: { lowerCaseSourceFieldName: newFieldNameAfterDeployment } } }
|
|
258
260
|
*
|
|
259
261
|
* @param layerInfos The object that stores the cached layer properties and name mapping
|
|
260
|
-
* @
|
|
262
|
+
* @returns The settings object that will be used to de-templatize the field references.
|
|
261
263
|
*/
|
|
262
264
|
export function getLayerSettings(layerInfos, url, itemId, enterpriseIDMapping) {
|
|
263
265
|
const settings = {};
|
|
@@ -289,7 +291,7 @@ export function getLayerSettings(layerInfos, url, itemId, enterpriseIDMapping) {
|
|
|
289
291
|
*
|
|
290
292
|
* @param templates A collection of AGO item templates.
|
|
291
293
|
* @param solutionItemId The item id for the deployed solution item.
|
|
292
|
-
* @
|
|
294
|
+
* @returns An updated collection of AGO templates with unique feature service names.
|
|
293
295
|
*/
|
|
294
296
|
export function setNamesAndTitles(templates, solutionItemId) {
|
|
295
297
|
const names = [];
|
|
@@ -362,8 +364,8 @@ export function updateSettingsFieldInfos(itemTemplate, settings) {
|
|
|
362
364
|
*
|
|
363
365
|
* @param template Template for feature service item
|
|
364
366
|
* @param authentication Credentials for the request
|
|
365
|
-
* @
|
|
366
|
-
* @
|
|
367
|
+
* @returns A promise that will resolve when template has been updated
|
|
368
|
+
* @private
|
|
367
369
|
*/
|
|
368
370
|
export function updateTemplateForInvalidDesignations(template, authentication) {
|
|
369
371
|
return new Promise((resolve, reject) => {
|
|
@@ -400,7 +402,7 @@ export function updateTemplateForInvalidDesignations(template, authentication) {
|
|
|
400
402
|
* @param popupInfos The object from the popupInfo property for the layer
|
|
401
403
|
* @param adminLayerInfos The object from the adminLayerInfo property for the layer
|
|
402
404
|
* @param settings The settings object that has all of the mappings for de-templatizing.
|
|
403
|
-
* @
|
|
405
|
+
* @returns An object that contains updated instances of popupInfos, fieldInfos, and adminLayerInfos
|
|
404
406
|
*/
|
|
405
407
|
export function deTemplatizeFieldInfos(fieldInfos, popupInfos, adminLayerInfos, settings) {
|
|
406
408
|
const fieldInfoKeys = Object.keys(fieldInfos);
|
|
@@ -430,7 +432,7 @@ export function deTemplatizeFieldInfos(fieldInfos, popupInfos, adminLayerInfos,
|
|
|
430
432
|
* to the item settings for the view.
|
|
431
433
|
*
|
|
432
434
|
* @param itemTemplate The current itemTemplate being processed.
|
|
433
|
-
* @
|
|
435
|
+
* @returns array of layers and tables
|
|
434
436
|
*/
|
|
435
437
|
export function getLayersAndTables(itemTemplate) {
|
|
436
438
|
const properties = itemTemplate.properties;
|
|
@@ -457,8 +459,8 @@ export function getLayersAndTables(itemTemplate) {
|
|
|
457
459
|
* @param url Feature service endpoint
|
|
458
460
|
* @param ids layer and table ids
|
|
459
461
|
* @param authentication Credentials for the request
|
|
460
|
-
* @
|
|
461
|
-
* @
|
|
462
|
+
* @returns A promise that will resolve an array of promises with either a failure or the data
|
|
463
|
+
* @private
|
|
462
464
|
*/
|
|
463
465
|
export function getExistingLayersAndTables(url, ids, authentication) {
|
|
464
466
|
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
|
@@ -480,8 +482,8 @@ export function getExistingLayersAndTables(url, ids, authentication) {
|
|
|
480
482
|
* service)
|
|
481
483
|
* @param popupInfos the cached popup info from the layers
|
|
482
484
|
* @param authentication Credentials for the request
|
|
483
|
-
* @
|
|
484
|
-
* @
|
|
485
|
+
* @returns A promise that will resolve when all layers and tables have been added
|
|
486
|
+
* @private
|
|
485
487
|
*/
|
|
486
488
|
export function addFeatureServiceLayersAndTables(itemTemplate, templateDictionary, popupInfos, authentication) {
|
|
487
489
|
return new Promise((resolve, reject) => {
|
|
@@ -542,8 +544,8 @@ export function addFeatureServiceLayersAndTables(itemTemplate, templateDictionar
|
|
|
542
544
|
* @param adminLayerInfos Hash map of a layers adminLayerInfo
|
|
543
545
|
* @param fieldInfos Hash map of properties that contain field references
|
|
544
546
|
* @param itemTemplate
|
|
545
|
-
* @
|
|
546
|
-
* @
|
|
547
|
+
* @returns A promise that will resolve when the feature service has been updated
|
|
548
|
+
* @private
|
|
547
549
|
*/
|
|
548
550
|
export function addFeatureServiceDefinition(serviceUrl, listToAdd, templateDictionary, authentication, key, adminLayerInfos, fieldInfos, itemTemplate) {
|
|
549
551
|
return new Promise((resolve, reject) => {
|
|
@@ -647,8 +649,8 @@ export function addFeatureServiceDefinition(serviceUrl, listToAdd, templateDicti
|
|
|
647
649
|
* @param layerChunks Groups of layers or tables to add to the service
|
|
648
650
|
* @param authentication Credentials for the request
|
|
649
651
|
*
|
|
650
|
-
* @
|
|
651
|
-
* @
|
|
652
|
+
* @returns Add to service definition options
|
|
653
|
+
* @private
|
|
652
654
|
*/
|
|
653
655
|
export function _updateAddOptions(itemTemplate, item, options, layerChunks, authentication) {
|
|
654
656
|
const isMsView = getProp(itemTemplate, "properties.service.isMultiServicesView") || false;
|
|
@@ -681,7 +683,7 @@ export function _updateAddOptions(itemTemplate, item, options, layerChunks, auth
|
|
|
681
683
|
* Remove "multiScaleGeometryInfo" for issue #526 to prevent invalid enablement of layer optimization
|
|
682
684
|
*
|
|
683
685
|
* @param layer the layer to evaluate
|
|
684
|
-
* @
|
|
686
|
+
* @private
|
|
685
687
|
*/
|
|
686
688
|
export function removeLayerOptimization(layer) {
|
|
687
689
|
/* istanbul ignore else */
|
|
@@ -696,8 +698,8 @@ export function removeLayerOptimization(layer) {
|
|
|
696
698
|
* @param itemTemplate the item template
|
|
697
699
|
* @param templateDictionary Hash mapping Solution source id to id of its clone
|
|
698
700
|
*
|
|
699
|
-
* @
|
|
700
|
-
* @
|
|
701
|
+
* @returns the updated item
|
|
702
|
+
* @private
|
|
701
703
|
*/
|
|
702
704
|
export function _updateForPortal(item, itemTemplate, templateDictionary) {
|
|
703
705
|
// When deploying to portal we need to adjust the uniquie ID field up front
|
|
@@ -761,8 +763,8 @@ export function _updateForPortal(item, itemTemplate, templateDictionary) {
|
|
|
761
763
|
* @param itemTemplate the item template
|
|
762
764
|
* @param templateDictionary Hash mapping Solution source id to id of its clone
|
|
763
765
|
*
|
|
764
|
-
* @
|
|
765
|
-
* @
|
|
766
|
+
* @returns an array of the source layers fields
|
|
767
|
+
* @private
|
|
766
768
|
*/
|
|
767
769
|
export function _getFieldNames(table, itemTemplate, templateDictionary) {
|
|
768
770
|
let sourceLayerFields = [];
|
|
@@ -793,8 +795,8 @@ export function _getFieldNames(table, itemTemplate, templateDictionary) {
|
|
|
793
795
|
* @param item Layer or table
|
|
794
796
|
* @param templateDictionary Hash mapping Solution source id to id of its clone
|
|
795
797
|
*
|
|
796
|
-
* @
|
|
797
|
-
* @
|
|
798
|
+
* @returns updated layer or table
|
|
799
|
+
* @private
|
|
798
800
|
*/
|
|
799
801
|
export function _updateItemFields(item, fieldNames) {
|
|
800
802
|
/* istanbul ignore else */
|
|
@@ -815,8 +817,8 @@ export function _updateItemFields(item, fieldNames) {
|
|
|
815
817
|
*
|
|
816
818
|
* @param table the table instance to evaluate
|
|
817
819
|
* @param sourceLayerFields array of fields from the source service
|
|
818
|
-
* @
|
|
819
|
-
* @
|
|
820
|
+
* @returns Updated instance of the table
|
|
821
|
+
* @private
|
|
820
822
|
*/
|
|
821
823
|
export function _updateSourceLayerFields(table, sourceLayerFields) {
|
|
822
824
|
/* istanbul ignore else */
|
|
@@ -836,7 +838,7 @@ export function _updateSourceLayerFields(table, sourceLayerFields) {
|
|
|
836
838
|
*
|
|
837
839
|
* @param item the item details from the current template
|
|
838
840
|
* @param templateDictionary Hash mapping property names to replacement values
|
|
839
|
-
* @
|
|
841
|
+
* @private
|
|
840
842
|
*/
|
|
841
843
|
export function _updateGeomFieldName(adminLayerInfo, templateDictionary) {
|
|
842
844
|
// issue #471
|
|
@@ -864,7 +866,7 @@ export function _updateGeomFieldName(adminLayerInfo, templateDictionary) {
|
|
|
864
866
|
*
|
|
865
867
|
* @param itemTemplate
|
|
866
868
|
* @param templateDictionary Hash mapping Solution source id to id of its clone (and name & URL for feature service)
|
|
867
|
-
* @
|
|
869
|
+
* @private
|
|
868
870
|
*/
|
|
869
871
|
export function _updateTemplateDictionaryFields(itemTemplate, templateDictionary, compareItemId = true) {
|
|
870
872
|
const layers = itemTemplate.properties.layers;
|
|
@@ -894,7 +896,7 @@ export function _updateTemplateDictionaryFields(itemTemplate, templateDictionary
|
|
|
894
896
|
* @param templateDictionary Hash mapping Solution source id to id of its clone (and name & URL for feature service)
|
|
895
897
|
* @param itemId The source id for the item
|
|
896
898
|
* @param spatialReference { wkid: 102100 } for example
|
|
897
|
-
* @
|
|
899
|
+
* @private
|
|
898
900
|
*/
|
|
899
901
|
export function setDefaultSpatialReference(templateDictionary, itemId, spatialReference) {
|
|
900
902
|
/* istanbul ignore else */
|
|
@@ -910,7 +912,7 @@ export function setDefaultSpatialReference(templateDictionary, itemId, spatialRe
|
|
|
910
912
|
* @param serviceInfo Basic service information
|
|
911
913
|
* @param itemTemplate The current template to process
|
|
912
914
|
* @param templateDictionary Hash mapping Solution source id to id of its clone (and name & URL for feature service)
|
|
913
|
-
* @
|
|
915
|
+
* @private
|
|
914
916
|
*/
|
|
915
917
|
export function validateSpatialReferenceAndExtent(serviceInfo, itemTemplate, templateDictionary) {
|
|
916
918
|
/* istanbul ignore else */
|
|
@@ -955,8 +957,8 @@ export function validateSpatialReferenceAndExtent(serviceInfo, itemTemplate, tem
|
|
|
955
957
|
* @param adminLayerInfos Hash map of a layers adminLayerInfo
|
|
956
958
|
* @param templateDictionary Hash mapping Solution source id to id of its clone (and name & URL for feature service)
|
|
957
959
|
* @param authentication Credentials for the request
|
|
958
|
-
* @
|
|
959
|
-
* @
|
|
960
|
+
* @returns A promise that will resolve when the feature service has been updated
|
|
961
|
+
* @private
|
|
960
962
|
*/
|
|
961
963
|
export function updateLayerFieldReferences(itemTemplate, fieldInfos, popupInfos, adminLayerInfos, templateDictionary) {
|
|
962
964
|
return new Promise((resolveFn, rejectFn) => {
|
|
@@ -982,8 +984,8 @@ export function updateLayerFieldReferences(itemTemplate, fieldInfos, popupInfos,
|
|
|
982
984
|
* @param adminLayerInfos Hash map of a layers adminLayerInfo
|
|
983
985
|
* @param templateDictionary
|
|
984
986
|
* @param authentication Credentials for the request
|
|
985
|
-
* @
|
|
986
|
-
* @
|
|
987
|
+
* @returns An object with detemplatized field references
|
|
988
|
+
* @private
|
|
987
989
|
*/
|
|
988
990
|
export function postProcessFields(itemTemplate, layerInfos, popupInfos, adminLayerInfos, templateDictionary) {
|
|
989
991
|
return new Promise((resolveFn, rejectFn) => {
|
|
@@ -1064,8 +1066,8 @@ export function postProcessFields(itemTemplate, layerInfos, popupInfos, adminLay
|
|
|
1064
1066
|
* we need to pass it via an updateDef call or it will be set as the typeIdField of the source service
|
|
1065
1067
|
*
|
|
1066
1068
|
* @param item current layer or table
|
|
1067
|
-
* @
|
|
1068
|
-
* @
|
|
1069
|
+
* @returns name of field to set for typeIdField in the update call
|
|
1070
|
+
* @private
|
|
1069
1071
|
*/
|
|
1070
1072
|
export function _getTypeIdField(item) {
|
|
1071
1073
|
const typeIdFields = item.fields.filter((f) => {
|
|
@@ -1083,8 +1085,8 @@ export function _getTypeIdField(item) {
|
|
|
1083
1085
|
* visible true when added with the layer definition
|
|
1084
1086
|
*
|
|
1085
1087
|
* @param fieldInfo current layers or tables fieldInfo
|
|
1086
|
-
* @
|
|
1087
|
-
* @
|
|
1088
|
+
* @returns Array of fields that should not be visible in the view
|
|
1089
|
+
* @private
|
|
1088
1090
|
*/
|
|
1089
1091
|
export function _getFieldVisibilityUpdates(fieldInfo) {
|
|
1090
1092
|
const visibilityUpdates = [];
|
|
@@ -1112,8 +1114,8 @@ export function _getFieldVisibilityUpdates(fieldInfo) {
|
|
|
1112
1114
|
*
|
|
1113
1115
|
* @param fieldInfo current view layer or table fieldInfo
|
|
1114
1116
|
* @param fieldUpdates any existing field updates
|
|
1115
|
-
* @
|
|
1116
|
-
* @
|
|
1117
|
+
* @returns Array of fields to be updated
|
|
1118
|
+
* @private
|
|
1117
1119
|
*/
|
|
1118
1120
|
export function _validateDomains(fieldInfo, fieldUpdates) {
|
|
1119
1121
|
const domainAliasInfos = _getDomainAndAliasInfos(fieldInfo);
|
|
@@ -1138,7 +1140,7 @@ export function _validateDomains(fieldInfo, fieldUpdates) {
|
|
|
1138
1140
|
* @param fields the alias or domain fields
|
|
1139
1141
|
* @param key the field key to evaluate
|
|
1140
1142
|
* @param fieldUpdates any existing field updates
|
|
1141
|
-
* @
|
|
1143
|
+
* @private
|
|
1142
1144
|
*/
|
|
1143
1145
|
export function _getPortalViewFieldUpdates(field, names, fields, key, fieldUpdates) {
|
|
1144
1146
|
if (field.hasOwnProperty(key) && field[key]) {
|
|
@@ -1167,8 +1169,8 @@ export function _getPortalViewFieldUpdates(field, names, fields, key, fieldUpdat
|
|
|
1167
1169
|
*
|
|
1168
1170
|
* @param fieldInfo current view layer or table fieldInfo
|
|
1169
1171
|
* @param fieldUpdates any existing field updates
|
|
1170
|
-
* @
|
|
1171
|
-
* @
|
|
1172
|
+
* @returns Array of fields to be updated
|
|
1173
|
+
* @private
|
|
1172
1174
|
*/
|
|
1173
1175
|
export function _validateViewDomainsAndAlias(fieldInfo, item) {
|
|
1174
1176
|
const domainAliasInfos = _getDomainAndAliasInfos(fieldInfo);
|
|
@@ -1188,7 +1190,7 @@ export function _validateViewDomainsAndAlias(fieldInfo, item) {
|
|
|
1188
1190
|
* Get array of domain fields and names and alias fields and names
|
|
1189
1191
|
*
|
|
1190
1192
|
* @param fieldInfo current view layer or table fieldInfo
|
|
1191
|
-
*
|
|
1193
|
+
* @private
|
|
1192
1194
|
*/
|
|
1193
1195
|
export function _getDomainAndAliasInfos(fieldInfo) {
|
|
1194
1196
|
const domainFields = [];
|
|
@@ -1231,7 +1233,7 @@ export function _getDomainAndAliasInfos(fieldInfo) {
|
|
|
1231
1233
|
* @param names array of field names
|
|
1232
1234
|
* @param fields array of fields
|
|
1233
1235
|
* @param key the field key to compare
|
|
1234
|
-
* @
|
|
1236
|
+
* @private
|
|
1235
1237
|
*/
|
|
1236
1238
|
export function _isViewFieldOverride(field, names, fields, key) {
|
|
1237
1239
|
/* istanbul ignore else */
|
|
@@ -1248,7 +1250,7 @@ export function _isViewFieldOverride(field, names, fields, key) {
|
|
|
1248
1250
|
*
|
|
1249
1251
|
* @param itemTemplate
|
|
1250
1252
|
* @param popupInfos popup info to be added back to the layer
|
|
1251
|
-
* @
|
|
1253
|
+
* @private
|
|
1252
1254
|
*/
|
|
1253
1255
|
export function updatePopupInfo(itemTemplate, popupInfos) {
|
|
1254
1256
|
["layers", "tables"].forEach(type => {
|
|
@@ -1268,6 +1270,7 @@ export function updatePopupInfo(itemTemplate, popupInfos) {
|
|
|
1268
1270
|
*
|
|
1269
1271
|
* @param basePath path used to de-templatize while deploying
|
|
1270
1272
|
* @param value to be converted to lower case for lookup while deploying
|
|
1273
|
+
* @private
|
|
1271
1274
|
*/
|
|
1272
1275
|
export function _templatize(basePath, value, suffix) {
|
|
1273
1276
|
if (value.startsWith("{{")) {
|
|
@@ -1283,6 +1286,7 @@ export function _templatize(basePath, value, suffix) {
|
|
|
1283
1286
|
* @param object the object with the property to templatize
|
|
1284
1287
|
* @param property the property of the object to templatize
|
|
1285
1288
|
* @param basePath path used to de-templatize while deploying
|
|
1289
|
+
* @private
|
|
1286
1290
|
*/
|
|
1287
1291
|
export function _templatizeProperty(object, property, basePath, suffix) {
|
|
1288
1292
|
if (object && object.hasOwnProperty(property) && object[property]) {
|
|
@@ -1297,8 +1301,8 @@ export function _templatizeProperty(object, property, basePath, suffix) {
|
|
|
1297
1301
|
* @param itemTemplate Template for feature service item
|
|
1298
1302
|
* @param dependencies Array of IDependency for name mapping
|
|
1299
1303
|
* @param templatizeFieldReferences Templatize all field references within a layer
|
|
1300
|
-
* @
|
|
1301
|
-
* @
|
|
1304
|
+
* @returns A promise that will resolve when template has been updated
|
|
1305
|
+
* @private
|
|
1302
1306
|
*/
|
|
1303
1307
|
export function _templatizeLayer(dataItem, adminItem, itemTemplate, dependencies, templatizeFieldReferences, templateDictionary) {
|
|
1304
1308
|
// check for and repair common field issues
|
|
@@ -1353,6 +1357,7 @@ export function _validateFields(adminItem) {
|
|
|
1353
1357
|
*
|
|
1354
1358
|
* @param adminItem layer or table from the service
|
|
1355
1359
|
* @param fieldNames string list of fields names
|
|
1360
|
+
* @private
|
|
1356
1361
|
*/
|
|
1357
1362
|
export function _validateDisplayField(adminItem, fieldNames) {
|
|
1358
1363
|
const displayField = adminItem.displayField || "";
|
|
@@ -1393,6 +1398,7 @@ export function _validateDisplayField(adminItem, fieldNames) {
|
|
|
1393
1398
|
*
|
|
1394
1399
|
* @param adminItem layer or table from the service
|
|
1395
1400
|
* @param fieldNames string list of fields names
|
|
1401
|
+
* @private
|
|
1396
1402
|
*/
|
|
1397
1403
|
export function _validateIndexes(adminItem, fieldNames) {
|
|
1398
1404
|
const indexes = adminItem.indexes;
|
|
@@ -1428,6 +1434,7 @@ export function _validateIndexes(adminItem, fieldNames) {
|
|
|
1428
1434
|
*
|
|
1429
1435
|
* @param adminItem layer or table from the service
|
|
1430
1436
|
* @param fieldNames string list of fields names
|
|
1437
|
+
* @private
|
|
1431
1438
|
*/
|
|
1432
1439
|
export function _validateTemplatesFields(adminItem, fieldNames) {
|
|
1433
1440
|
const templates = adminItem.templates;
|
|
@@ -1454,6 +1461,7 @@ export function _validateTemplatesFields(adminItem, fieldNames) {
|
|
|
1454
1461
|
*
|
|
1455
1462
|
* @param adminItem layer or table from the service
|
|
1456
1463
|
* @param fieldNames string list of fields names
|
|
1464
|
+
* @private
|
|
1457
1465
|
*/
|
|
1458
1466
|
export function _validateTypesTemplates(adminItem, fieldNames) {
|
|
1459
1467
|
const types = adminItem.types;
|
|
@@ -1470,6 +1478,7 @@ export function _validateTypesTemplates(adminItem, fieldNames) {
|
|
|
1470
1478
|
*
|
|
1471
1479
|
* @param adminItem layer or table from the service
|
|
1472
1480
|
* @param fieldNames string list of fields names
|
|
1481
|
+
* @private
|
|
1473
1482
|
*/
|
|
1474
1483
|
export function _validateEditFieldsInfo(adminItem, fieldNames) {
|
|
1475
1484
|
const editFieldsInfo = adminItem.editFieldsInfo;
|
|
@@ -1506,7 +1515,8 @@ export function _validateEditFieldsInfo(adminItem, fieldNames) {
|
|
|
1506
1515
|
* @param itemID The id for the item that contains this layer.
|
|
1507
1516
|
* @param layer JSON return from the layer being templatized.
|
|
1508
1517
|
* @param dependencies
|
|
1509
|
-
* @
|
|
1518
|
+
* @returns An updated instance of the layer
|
|
1519
|
+
* @private
|
|
1510
1520
|
*/
|
|
1511
1521
|
export function _templatizeLayerFieldReferences(dataItem, itemID, layer, dependencies) {
|
|
1512
1522
|
// This is the value that will be used as the template for adlib replacement
|
|
@@ -1535,8 +1545,8 @@ export function _templatizeLayerFieldReferences(dataItem, itemID, layer, depende
|
|
|
1535
1545
|
*
|
|
1536
1546
|
* @param layer The layer to be modified
|
|
1537
1547
|
* @param dependencies Array of service dependencies
|
|
1538
|
-
* @
|
|
1539
|
-
* @
|
|
1548
|
+
* @returns A new copy of the modified adminLayerInfo for the given layer
|
|
1549
|
+
* @private
|
|
1540
1550
|
*/
|
|
1541
1551
|
export function _templatizeAdminLayerInfo(layer, dependencies, templateDictionary) {
|
|
1542
1552
|
// Create new instance of adminLayerInfo to update for clone
|
|
@@ -1569,7 +1579,7 @@ export function _templatizeAdminLayerInfo(layer, dependencies, templateDictionar
|
|
|
1569
1579
|
*
|
|
1570
1580
|
* @param object The layer to be modified
|
|
1571
1581
|
* @param dependencies Array of service dependencies
|
|
1572
|
-
* @
|
|
1582
|
+
* @private
|
|
1573
1583
|
*/
|
|
1574
1584
|
export function _processAdminObject(object, dependencies) {
|
|
1575
1585
|
deleteProp(object, "sourceId");
|
|
@@ -1582,8 +1592,8 @@ export function _processAdminObject(object, dependencies) {
|
|
|
1582
1592
|
*
|
|
1583
1593
|
* @param lookupName The current name from the source service
|
|
1584
1594
|
* @param dependencies Array of IDependency for name mapping
|
|
1585
|
-
* @
|
|
1586
|
-
* @
|
|
1595
|
+
* @returns The templatized name || undefined when no matching dependency is found
|
|
1596
|
+
* @private
|
|
1587
1597
|
*/
|
|
1588
1598
|
export function _templatizeSourceServiceName(lookupName, dependencies) {
|
|
1589
1599
|
const deps = dependencies.filter(dependency => dependency.name === lookupName);
|
|
@@ -1595,6 +1605,7 @@ export function _templatizeSourceServiceName(lookupName, dependencies) {
|
|
|
1595
1605
|
* @param layer the layer object with the adminLayerInfo property to templatize
|
|
1596
1606
|
* @param basePath path used to de-templatize while deploying
|
|
1597
1607
|
* @param itemID the id for the item that contains this layer
|
|
1608
|
+
* @private
|
|
1598
1609
|
*/
|
|
1599
1610
|
export function _templatizeAdminLayerInfoFields(layer, dependencies) {
|
|
1600
1611
|
// templatize the source layer fields
|
|
@@ -1628,6 +1639,7 @@ export function _templatizeAdminLayerInfoFields(layer, dependencies) {
|
|
|
1628
1639
|
*
|
|
1629
1640
|
* @param lookupName name of dependency we want to find the id of
|
|
1630
1641
|
* @param dependencies array of item dependencies
|
|
1642
|
+
* @private
|
|
1631
1643
|
*/
|
|
1632
1644
|
export function _getDependantItemId(lookupName, dependencies) {
|
|
1633
1645
|
const deps = dependencies.filter(dependency => dependency.name === lookupName);
|
|
@@ -1638,6 +1650,7 @@ export function _getDependantItemId(lookupName, dependencies) {
|
|
|
1638
1650
|
*
|
|
1639
1651
|
* @param fields array of sourceLayerFields to templatize
|
|
1640
1652
|
* @param basePath path used to de-templatize while deploying
|
|
1653
|
+
* @private
|
|
1641
1654
|
*/
|
|
1642
1655
|
export function _templatizeAdminSourceLayerFields(fields, basePath) {
|
|
1643
1656
|
fields.forEach(f => _templatizeProperty(f, "source", basePath, "name"));
|
|
@@ -1647,6 +1660,7 @@ export function _templatizeAdminSourceLayerFields(fields, basePath) {
|
|
|
1647
1660
|
*
|
|
1648
1661
|
* @param topFilter the topFilter object to templatize
|
|
1649
1662
|
* @param basePath path used to de-templatize while deploying
|
|
1663
|
+
* @private
|
|
1650
1664
|
*/
|
|
1651
1665
|
export function _templatizeTopFilter(topFilter, basePath) {
|
|
1652
1666
|
/* istanbul ignore else */
|
|
@@ -1677,6 +1691,7 @@ export function _templatizeTopFilter(topFilter, basePath) {
|
|
|
1677
1691
|
*
|
|
1678
1692
|
* @param layer the layer that has the relationships to templatize
|
|
1679
1693
|
* @param itemID the id of the item that contains the related table
|
|
1694
|
+
* @private
|
|
1680
1695
|
*/
|
|
1681
1696
|
export function _templatizeRelationshipFields(layer, itemID) {
|
|
1682
1697
|
if (layer && layer.relationships) {
|
|
@@ -1698,6 +1713,7 @@ export function _templatizeRelationshipFields(layer, itemID) {
|
|
|
1698
1713
|
* @param basePath path used to de-templatize while deploying
|
|
1699
1714
|
* @param itemID the id for the item that contains this layer
|
|
1700
1715
|
* @param fieldNames array of fieldNames
|
|
1716
|
+
* @private
|
|
1701
1717
|
*/
|
|
1702
1718
|
export function _templatizePopupInfo(layerDefinition, layer, basePath, itemID, fieldNames) {
|
|
1703
1719
|
// the data layer does not have the fields...will need to get those
|
|
@@ -1724,6 +1740,7 @@ export function _templatizePopupInfo(layerDefinition, layer, basePath, itemID, f
|
|
|
1724
1740
|
* @param property that could have a field name referenced
|
|
1725
1741
|
* @param fieldNames array for field names for the layer
|
|
1726
1742
|
* @param basePath path used to de-templatize while deploying
|
|
1743
|
+
* @private
|
|
1727
1744
|
*/
|
|
1728
1745
|
export function _templatizeName(object, property, fieldNames, basePath) {
|
|
1729
1746
|
if (object.hasOwnProperty(property)) {
|
|
@@ -1745,6 +1762,7 @@ export function _templatizeName(object, property, fieldNames, basePath) {
|
|
|
1745
1762
|
* @param layer json of layer being cloned
|
|
1746
1763
|
* @param itemID id of the item that contains the current layer
|
|
1747
1764
|
* @param basePath path used to de-templatize while deploying
|
|
1765
|
+
* @private
|
|
1748
1766
|
*/
|
|
1749
1767
|
export function _templatizePopupInfoFieldInfos(fieldInfos, layer, itemID, basePath) {
|
|
1750
1768
|
fieldInfos.forEach((f) => {
|
|
@@ -1759,6 +1777,7 @@ export function _templatizePopupInfoFieldInfos(fieldInfos, layer, itemID, basePa
|
|
|
1759
1777
|
* @param layer json of layer being cloned
|
|
1760
1778
|
* @param itemID id of the item that contains the current layer
|
|
1761
1779
|
* @param basePath path used to de-templatize while deploying
|
|
1780
|
+
* @private
|
|
1762
1781
|
*/
|
|
1763
1782
|
export function _templatizeFieldName(name, layer, itemID, basePath) {
|
|
1764
1783
|
if (name.indexOf("relationships/") > -1) {
|
|
@@ -1794,6 +1813,7 @@ export function _templatizeFieldName(name, layer, itemID, basePath) {
|
|
|
1794
1813
|
* @param expressionInfos the popups expressionInfos to check
|
|
1795
1814
|
* @param fieldNames array of the layers field names
|
|
1796
1815
|
* @param basePath path used to de-templatize while deploying
|
|
1816
|
+
* @private
|
|
1797
1817
|
*/
|
|
1798
1818
|
export function _templatizeExpressionInfos(expressionInfos, fieldNames, basePath) {
|
|
1799
1819
|
return expressionInfos.map((i) => {
|
|
@@ -1811,6 +1831,7 @@ export function _templatizeExpressionInfos(expressionInfos, fieldNames, basePath
|
|
|
1811
1831
|
* @param layer json of layer being cloned
|
|
1812
1832
|
* @param itemID id of the item that contains the current layer
|
|
1813
1833
|
* @param fieldNames array of field names
|
|
1834
|
+
* @private
|
|
1814
1835
|
*/
|
|
1815
1836
|
export function _templatizePopupElements(popupElelments, basePath, layer, itemID, fieldNames) {
|
|
1816
1837
|
popupElelments.forEach((pe) => {
|
|
@@ -1830,6 +1851,7 @@ export function _templatizePopupElements(popupElelments, basePath, layer, itemID
|
|
|
1830
1851
|
* @param basePath path used to de-templatize while deploying
|
|
1831
1852
|
* @param layer json of layer being cloned
|
|
1832
1853
|
* @param itemID id of the item that contains the current layer
|
|
1854
|
+
* @private
|
|
1833
1855
|
*/
|
|
1834
1856
|
export function _templatizeMediaInfos(mediaInfos, fieldNames, basePath, layer, itemId) {
|
|
1835
1857
|
// templatize various properties of mediaInfos
|
|
@@ -1857,6 +1879,7 @@ export function _templatizeMediaInfos(mediaInfos, fieldNames, basePath, layer, i
|
|
|
1857
1879
|
* @param layer the layer with the definition editor
|
|
1858
1880
|
* @param basePath path used to de-templatize while deploying
|
|
1859
1881
|
* @param fieldNames json of layer being cloned
|
|
1882
|
+
* @private
|
|
1860
1883
|
*/
|
|
1861
1884
|
export function _templatizeDefinitionEditor(layer, basePath, fieldNames) {
|
|
1862
1885
|
if (layer) {
|
|
@@ -1886,6 +1909,7 @@ export function _templatizeDefinitionEditor(layer, basePath, fieldNames) {
|
|
|
1886
1909
|
* @param layer the layer with the definition editor
|
|
1887
1910
|
* @param basePath path used to de-templatize while deploying
|
|
1888
1911
|
* @param fieldNames array of field names
|
|
1912
|
+
* @private
|
|
1889
1913
|
*/
|
|
1890
1914
|
export function _templatizeDefinitionExpression(layer, basePath, fieldNames) {
|
|
1891
1915
|
if (layer && layer.hasOwnProperty("definitionExpression")) {
|
|
@@ -1898,6 +1922,7 @@ export function _templatizeDefinitionExpression(layer, basePath, fieldNames) {
|
|
|
1898
1922
|
* @param expression the expression to test for field name references
|
|
1899
1923
|
* @param basePath path used to de-templatize while deploying
|
|
1900
1924
|
* @param fieldNames array of the layers field names
|
|
1925
|
+
* @private
|
|
1901
1926
|
*/
|
|
1902
1927
|
export function _templatizeSimpleName(expression, basePath, fieldNames, suffix) {
|
|
1903
1928
|
fieldNames.forEach(name => {
|
|
@@ -1915,6 +1940,7 @@ export function _templatizeSimpleName(expression, basePath, fieldNames, suffix)
|
|
|
1915
1940
|
* @param layer the data layer
|
|
1916
1941
|
* @param basePath path used to de-templatize while deploying
|
|
1917
1942
|
* @param fieldNames array of the layers field names
|
|
1943
|
+
* @private
|
|
1918
1944
|
*/
|
|
1919
1945
|
export function _templatizeDrawingInfo(layer, basePath, fieldNames) {
|
|
1920
1946
|
if (layer) {
|
|
@@ -1935,6 +1961,7 @@ export function _templatizeDrawingInfo(layer, basePath, fieldNames) {
|
|
|
1935
1961
|
* @param renderer the layers renderer
|
|
1936
1962
|
* @param basePath path used to de-templatize while deploying
|
|
1937
1963
|
* @param fieldNames array of the layers field names
|
|
1964
|
+
* @private
|
|
1938
1965
|
*/
|
|
1939
1966
|
export function _templatizeRenderer(renderer, basePath, fieldNames) {
|
|
1940
1967
|
switch (renderer.type) {
|
|
@@ -1958,6 +1985,7 @@ export function _templatizeRenderer(renderer, basePath, fieldNames) {
|
|
|
1958
1985
|
* @param renderer the renderer object to check for field references
|
|
1959
1986
|
* @param basePath path used to de-templatize while deploying
|
|
1960
1987
|
* @param fieldNames array of field names that will be used to search expressions
|
|
1988
|
+
* @private
|
|
1961
1989
|
*/
|
|
1962
1990
|
export function _templatizeGenRenderer(renderer, basePath, fieldNames) {
|
|
1963
1991
|
/* istanbul ignore else */
|
|
@@ -2007,6 +2035,7 @@ export function _templatizeGenRenderer(renderer, basePath, fieldNames) {
|
|
|
2007
2035
|
* @param renderer the renderer object to check for field references
|
|
2008
2036
|
* @param basePath path used to de-templatize while deploying
|
|
2009
2037
|
* @param fieldNames array of field names that will be used to search expressions
|
|
2038
|
+
* @private
|
|
2010
2039
|
*/
|
|
2011
2040
|
export function _templatizeTemporalRenderer(renderer, basePath, fieldNames) {
|
|
2012
2041
|
const renderers = [
|
|
@@ -2024,6 +2053,7 @@ export function _templatizeTemporalRenderer(renderer, basePath, fieldNames) {
|
|
|
2024
2053
|
* @param authoringInfo object containing metadata about the authoring process
|
|
2025
2054
|
* @param basePath path used to de-templatize while deploying
|
|
2026
2055
|
* @param fieldNames the name of fields from the layer
|
|
2056
|
+
* @private
|
|
2027
2057
|
*/
|
|
2028
2058
|
export function _templatizeAuthoringInfo(authoringInfo, basePath, fieldNames) {
|
|
2029
2059
|
/* istanbul ignore else */
|
|
@@ -2055,6 +2085,7 @@ export function _templatizeAuthoringInfo(authoringInfo, basePath, fieldNames) {
|
|
|
2055
2085
|
* @param text the text that contains the expression
|
|
2056
2086
|
* @param fieldName name of the field to test for
|
|
2057
2087
|
* @param basePath path used to de-templatize while deploying
|
|
2088
|
+
* @private
|
|
2058
2089
|
*/
|
|
2059
2090
|
export function _templatizeArcadeExpressions(text, fieldName, basePath) {
|
|
2060
2091
|
const t = _templatize(basePath, fieldName, "name");
|
|
@@ -2102,6 +2133,7 @@ export function _templatizeArcadeExpressions(text, fieldName, basePath) {
|
|
|
2102
2133
|
* @param labelingInfo the object that contains the labelingInfo
|
|
2103
2134
|
* @param basePath path used to de-templatize while deploying
|
|
2104
2135
|
* @param fieldNames array of the layers field names
|
|
2136
|
+
* @private
|
|
2105
2137
|
*/
|
|
2106
2138
|
export function _templatizeLabelingInfo(labelingInfo, basePath, fieldNames) {
|
|
2107
2139
|
labelingInfo.forEach((li) => {
|
|
@@ -2143,6 +2175,7 @@ export function _templatizeLabelingInfo(labelingInfo, basePath, fieldNames) {
|
|
|
2143
2175
|
*
|
|
2144
2176
|
* @param layer the data layer being cloned
|
|
2145
2177
|
* @param basePath path used to de-templatize while deploying
|
|
2178
|
+
* @private
|
|
2146
2179
|
*/
|
|
2147
2180
|
export function _templatizeTemplates(layer, basePath) {
|
|
2148
2181
|
const templates = layer.templates || [];
|
|
@@ -2160,6 +2193,7 @@ export function _templatizeTemplates(layer, basePath) {
|
|
|
2160
2193
|
*
|
|
2161
2194
|
* @param layer the data layer being cloned
|
|
2162
2195
|
* @param basePath path used to de-templatize while deploying
|
|
2196
|
+
* @private
|
|
2163
2197
|
*/
|
|
2164
2198
|
export function _templatizeTypeTemplates(layer, basePath) {
|
|
2165
2199
|
const types = layer.types;
|
|
@@ -2191,6 +2225,7 @@ export function _templatizeTypeTemplates(layer, basePath) {
|
|
|
2191
2225
|
* @param obj the object to templatize
|
|
2192
2226
|
* @param basePath path used to de-templatize while deploying
|
|
2193
2227
|
* @param suffix expected suffix for template variable
|
|
2228
|
+
* @private
|
|
2194
2229
|
*/
|
|
2195
2230
|
export function _templatizeKeys(obj, basePath, suffix) {
|
|
2196
2231
|
let _obj;
|
|
@@ -2212,6 +2247,7 @@ export function _templatizeKeys(obj, basePath, suffix) {
|
|
|
2212
2247
|
*
|
|
2213
2248
|
* @param layer the data layer being cloned
|
|
2214
2249
|
* @param basePath path used to de-templatize while deploying
|
|
2250
|
+
* @private
|
|
2215
2251
|
*/
|
|
2216
2252
|
export function _templatizeTimeInfo(layer, basePath) {
|
|
2217
2253
|
if (layer.timeInfo) {
|
|
@@ -2237,6 +2273,7 @@ export function _templatizeTimeInfo(layer, basePath) {
|
|
|
2237
2273
|
* @param layer the data layer being cloned
|
|
2238
2274
|
* @param basePath path used to de-templatize while deploying
|
|
2239
2275
|
* @param fieldNames array of the layers field names
|
|
2276
|
+
* @private
|
|
2240
2277
|
*/
|
|
2241
2278
|
export function _templatizeDefinitionQuery(layer, basePath, fieldNames) {
|
|
2242
2279
|
// templatize view definition query
|
|
@@ -2253,6 +2290,7 @@ export function _templatizeDefinitionQuery(layer, basePath, fieldNames) {
|
|
|
2253
2290
|
*
|
|
2254
2291
|
* @param fieldInfos the object that stores the cached information
|
|
2255
2292
|
* @param id the id for the current layer being processed
|
|
2293
|
+
* @private
|
|
2256
2294
|
*/
|
|
2257
2295
|
export function _getNameMapping(fieldInfos, id) {
|
|
2258
2296
|
// create name mapping
|
|
@@ -2333,7 +2371,8 @@ export function _getNameMapping(fieldInfos, id) {
|
|
|
2333
2371
|
/**
|
|
2334
2372
|
* Helper function to ensure same chunk size value is used in multiple locations
|
|
2335
2373
|
*
|
|
2336
|
-
* @
|
|
2374
|
+
* @returns a number that represents how many layers should be included per addToDef call
|
|
2375
|
+
* @private
|
|
2337
2376
|
*/
|
|
2338
2377
|
export function _getLayerChunkSize() {
|
|
2339
2378
|
return 20;
|