@esri/solution-feature-layer 1.3.9 → 1.3.12

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.
@@ -27,7 +27,7 @@ import * as common from "@esri/solution-common";
27
27
  * @param destAuthentication Credentials for requests to the destination organization
28
28
  * @param srcAuthentication Credentials for requests to source items
29
29
  * @param templateDictionary Hash mapping property names to replacement values
30
- * @return A promise that will resolve when fullItem has been updated
30
+ * @returns A promise that will resolve when fullItem has been updated
31
31
  */
32
32
  export declare function convertItemToTemplate(solutionItemId: string, itemInfo: any, destAuthentication: common.UserSession, srcAuthentication: common.UserSession, templateDictionary?: any): Promise<common.IItemTemplate>;
33
33
  /**
@@ -38,8 +38,8 @@ export declare function convertItemToTemplate(solutionItemId: string, itemInfo:
38
38
  * folder; ignored for Group item type
39
39
  * @param settings Hash mapping property names to replacement values
40
40
  * @param authentication Credentials for the request
41
- * @return A promise that will resolve with the id of the created item
42
- * @protected
41
+ * @returns A promise that will resolve with the id of the created item
42
+ * @private
43
43
  */
44
44
  export declare function createItemFromTemplate(template: common.IItemTemplate, templateDictionary: any, destinationAuthentication: common.UserSession, itemProgressCallback: common.IItemProgressCallback): Promise<common.ICreateItemFromTemplateResponse>;
45
45
  /**
@@ -30,7 +30,7 @@ import * as common from "@esri/solution-common";
30
30
  * @param destAuthentication Credentials for requests to the destination organization
31
31
  * @param srcAuthentication Credentials for requests to source items
32
32
  * @param templateDictionary Hash mapping property names to replacement values
33
- * @return A promise that will resolve when fullItem has been updated
33
+ * @returns A promise that will resolve when fullItem has been updated
34
34
  */
35
35
  export function convertItemToTemplate(solutionItemId, itemInfo, destAuthentication, srcAuthentication, templateDictionary) {
36
36
  return new Promise((resolve, reject) => {
@@ -75,8 +75,8 @@ export function convertItemToTemplate(solutionItemId, itemInfo, destAuthenticati
75
75
  * folder; ignored for Group item type
76
76
  * @param settings Hash mapping property names to replacement values
77
77
  * @param authentication Credentials for the request
78
- * @return A promise that will resolve with the id of the created item
79
- * @protected
78
+ * @returns A promise that will resolve with the id of the created item
79
+ * @private
80
80
  */
81
81
  export function createItemFromTemplate(template, templateDictionary, destinationAuthentication, itemProgressCallback) {
82
82
  return new Promise(resolve => {
@@ -211,6 +211,7 @@ export function postProcess(itemId, type, itemInfos, template, templates, templa
211
211
  }
212
212
  //#endregion
213
213
  //#region Internal functions -----------------------------------------------------------------------------------------//
214
+ //???
214
215
  export function _mostRecentlyEditedLayer(layerOrTableList) {
215
216
  let mostRecentlyEdited = 0;
216
217
  layerOrTableList.forEach((layer) => {
@@ -1 +1 @@
1
- {"version":3,"file":"feature-layer.js","sourceRoot":"","sources":["../../src/feature-layer.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH;;;;GAIG;AAEH,kHAAkH;AAElH,OAAO,KAAK,MAAM,MAAM,uBAAuB,CAAC;AAEhD,YAAY;AAEZ,kHAAkH;AAElH;;;;;;;;;GASG;AACH,MAAM,UAAU,qBAAqB,CACnC,cAAsB,EACtB,QAAa,EACb,kBAAsC,EACtC,iBAAqC,EACrC,kBAAwB;IAExB,OAAO,IAAI,OAAO,CAAuB,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE;QAC3D,gBAAgB;QAChB,MAAM,QAAQ,GAAyB,MAAM,CAAC,6BAA6B,CACzE,QAAQ,CACT,CAAC;QAEF,MAAM,sBAAsB,GAAY,MAAM,CAAC,2BAA2B,CACxE,QAAQ,CAAC,iBAAiB,CAC3B,CAAC;QACF,IAAI,sBAAsB,EAAE;YAC1B,MAAM;iBACH,oCAAoC,CAAC,QAAQ,EAAE,iBAAiB,CAAC;iBACjE,IAAI,CACH,SAAS,CAAC,EAAE,CAAC,OAAO,CAAC,SAAS,CAAC,EAC/B,CAAC,CAAC,EAAE,CAAC,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAC5B,CAAC;SACL;aAAM;YACL,uDAAuD;YACvD,QAAQ,CAAC,6BAA6B,GAAG,EA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,7 @@ import * as common from "@esri/solution-common";
27
27
  * @param destAuthentication Credentials for requests to the destination organization
28
28
  * @param srcAuthentication Credentials for requests to source items
29
29
  * @param templateDictionary Hash mapping property names to replacement values
30
- * @return A promise that will resolve when fullItem has been updated
30
+ * @returns A promise that will resolve when fullItem has been updated
31
31
  */
32
32
  export declare function convertItemToTemplate(solutionItemId: string, itemInfo: any, destAuthentication: common.UserSession, srcAuthentication: common.UserSession, templateDictionary?: any): Promise<common.IItemTemplate>;
33
33
  /**
@@ -38,8 +38,8 @@ export declare function convertItemToTemplate(solutionItemId: string, itemInfo:
38
38
  * folder; ignored for Group item type
39
39
  * @param settings Hash mapping property names to replacement values
40
40
  * @param authentication Credentials for the request
41
- * @return A promise that will resolve with the id of the created item
42
- * @protected
41
+ * @returns A promise that will resolve with the id of the created item
42
+ * @private
43
43
  */
44
44
  export declare function createItemFromTemplate(template: common.IItemTemplate, templateDictionary: any, destinationAuthentication: common.UserSession, itemProgressCallback: common.IItemProgressCallback): Promise<common.ICreateItemFromTemplateResponse>;
45
45
  /**
@@ -34,7 +34,7 @@ const common = tslib_1.__importStar(require("@esri/solution-common"));
34
34
  * @param destAuthentication Credentials for requests to the destination organization
35
35
  * @param srcAuthentication Credentials for requests to source items
36
36
  * @param templateDictionary Hash mapping property names to replacement values
37
- * @return A promise that will resolve when fullItem has been updated
37
+ * @returns A promise that will resolve when fullItem has been updated
38
38
  */
39
39
  function convertItemToTemplate(solutionItemId, itemInfo, destAuthentication, srcAuthentication, templateDictionary) {
40
40
  return new Promise((resolve, reject) => {
@@ -80,8 +80,8 @@ exports.convertItemToTemplate = convertItemToTemplate;
80
80
  * folder; ignored for Group item type
81
81
  * @param settings Hash mapping property names to replacement values
82
82
  * @param authentication Credentials for the request
83
- * @return A promise that will resolve with the id of the created item
84
- * @protected
83
+ * @returns A promise that will resolve with the id of the created item
84
+ * @private
85
85
  */
86
86
  function createItemFromTemplate(template, templateDictionary, destinationAuthentication, itemProgressCallback) {
87
87
  return new Promise(resolve => {
@@ -218,6 +218,7 @@ function postProcess(itemId, type, itemInfos, template, templates, templateDicti
218
218
  exports.postProcess = postProcess;
219
219
  //#endregion
220
220
  //#region Internal functions -----------------------------------------------------------------------------------------//
221
+ //???
221
222
  function _mostRecentlyEditedLayer(layerOrTableList) {
222
223
  let mostRecentlyEdited = 0;
223
224
  layerOrTableList.forEach((layer) => {
@@ -1 +1 @@
1
- {"version":3,"file":"feature-layer.js","sourceRoot":"","sources":["../../src/feature-layer.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;;AAEH;;;;GAIG;AAEH,kHAAkH;AAElH,sEAAgD;AAEhD,YAAY;AAEZ,kHAAkH;AAElH;;;;;;;;;GASG;AACH,SAAgB,qBAAqB,CACnC,cAAsB,EACtB,QAAa,EACb,kBAAsC,EACtC,iBAAqC,EACrC,kBAAwB;IAExB,OAAO,IAAI,OAAO,CAAuB,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE;QAC3D,gBAAgB;QAChB,MAAM,QAAQ,GAAyB,MAAM,CAAC,6BAA6B,CACzE,QAAQ,CACT,CAAC;QAEF,MAAM,sBAAsB,GAAY,MAAM,CAAC,2BAA2B,CACxE,QAAQ,CAAC,iBAAiB,CAC3B,CAAC;QACF,IAAI,sBAAsB,EAAE;YAC1B,MAAM;iBACH,oCAAoC,CAAC,QAAQ,EAAE,iBAAiB,CAAC;iBACjE,IAAI,CACH,SAAS,CAAC,EAAE,CAAC,OAAO,CAAC,SAAS,CAAC,EAC/B,CAAC,CAAC,EAAE,CAAC,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAC5B,CAAC;SACL;aAAM;YACL,uDAAuD;YACvD,QAAQ,CAAC,6BAA6B,GAAG,EAAE,CAAC;YAE5C,mEAAmE;YACnE,MAAM,CAAC,iBAAiB,CAAC,QAAQ,CAAC,IAAI,CAAC,EAAE,EAAE,iBAAiB,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,EAA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CACzB,MAAc,EACd,IAAY,EACZ,SAAgB,EAChB,QAA8B,EAC9B,SAAiC,EACjC,kBAAuB,EACvB,cAAkC;IAElC,OAAO,IAAI,OAAO,CAA6B,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE;QACjE,MAAM;aACH,gCAAgC,CAC/B,MAAM,EACN,kBAAkB,EAClB,cAAc,CACf;aACA,IAAI,CAAC,OAAO,CAAC,EAAE;YACd,IAAI,MAAM,CAAC,kBAAkB,CAAC,QAAQ,CAAC,EAAE;gBACvC,QAAQ,GAAG,MAAM,CAAC,iBAAiB,CAAC,QAAQ,EAAE,kBAAkB,CAAC,CAAC;gBAClE,MAAM;qBACH,4BAA4B,CAC3B,QAAQ,EACR,cAAc,EACd,QAAQ,CAAC,IAAI,CAAC,GAAG,EACjB,kBAAkB,CACnB;qBACA,IAAI,CAAC,OAAO,EAAE,MAAM,CAAC,CAAC;aAC1B;iBAAM;gBACL,OAAO,CAAC,OAAO,CAAC,CAAC;aAClB;QACH,CAAC,EAAE,MAAM,CAAC,CAAC;IACf,CAAC,CAAC,CAAC;AACL,CAAC;AAhCD,kCAgCC;AAED,YAAY;AAEZ,wHAAwH;AAExH,KAAK;AACL,SAAgB,wBAAwB,CACtC,gBAAuB;IAEvB,IAAI,kBAAkB,GAAG,CAAC,CAAC;IAC3B,gBAAgB,CAAC,OAAO,CACtB,CAAC,KAAK,EAAE,EAAE;QACR,kBAAkB;YAChB,KAAK,CAAC,WAAW,EAAE,YAAY,CAAC,CAAC;gBACjC,IAAI,CAAC,GAAG,CAAC,kBAAkB,EAAE,KAAK,CAAC,WAAW,CAAC,YAAY,CAAC,CAAC,CAAC;gBAC9D,kBAAkB,CAAC;IACvB,CAAC,CACF,CAAC;IACF,OAAO,kBAAkB,CAAC;AAC5B,CAAC;AAbD,4DAaC;AAED,YAAY"}
@@ -27,7 +27,7 @@ import * as common from "@esri/solution-common";
27
27
  * @param destAuthentication Credentials for requests to the destination organization
28
28
  * @param srcAuthentication Credentials for requests to source items
29
29
  * @param templateDictionary Hash mapping property names to replacement values
30
- * @return A promise that will resolve when fullItem has been updated
30
+ * @returns A promise that will resolve when fullItem has been updated
31
31
  */
32
32
  export declare function convertItemToTemplate(solutionItemId: string, itemInfo: any, destAuthentication: common.UserSession, srcAuthentication: common.UserSession, templateDictionary?: any): Promise<common.IItemTemplate>;
33
33
  /**
@@ -38,8 +38,8 @@ export declare function convertItemToTemplate(solutionItemId: string, itemInfo:
38
38
  * folder; ignored for Group item type
39
39
  * @param settings Hash mapping property names to replacement values
40
40
  * @param authentication Credentials for the request
41
- * @return A promise that will resolve with the id of the created item
42
- * @protected
41
+ * @returns A promise that will resolve with the id of the created item
42
+ * @private
43
43
  */
44
44
  export declare function createItemFromTemplate(template: common.IItemTemplate, templateDictionary: any, destinationAuthentication: common.UserSession, itemProgressCallback: common.IItemProgressCallback): Promise<common.ICreateItemFromTemplateResponse>;
45
45
  /**
@@ -1,7 +1,7 @@
1
1
  /* @preserve
2
- * @esri/solution-feature-layer - v1.3.9 - Apache-2.0
2
+ * @esri/solution-feature-layer - v1.3.12 - Apache-2.0
3
3
  * Copyright (c) 2018-2022 Esri, Inc.
4
- * Fri Mar 25 2022 15:22:51 GMT-0700 (Pacific Daylight Time)
4
+ * Tue Apr 26 2022 14:43:10 GMT-0700 (Pacific Daylight Time)
5
5
  *
6
6
  * Licensed under the Apache License, Version 2.0 (the "License");
7
7
  * you may not use this file except in compliance with the License.
@@ -66,7 +66,7 @@
66
66
  * @param destAuthentication Credentials for requests to the destination organization
67
67
  * @param srcAuthentication Credentials for requests to source items
68
68
  * @param templateDictionary Hash mapping property names to replacement values
69
- * @return A promise that will resolve when fullItem has been updated
69
+ * @returns A promise that will resolve when fullItem has been updated
70
70
  */
71
71
  function convertItemToTemplate(solutionItemId, itemInfo, destAuthentication, srcAuthentication, templateDictionary) {
72
72
  return new Promise((resolve, reject) => {
@@ -111,8 +111,8 @@
111
111
  * folder; ignored for Group item type
112
112
  * @param settings Hash mapping property names to replacement values
113
113
  * @param authentication Credentials for the request
114
- * @return A promise that will resolve with the id of the created item
115
- * @protected
114
+ * @returns A promise that will resolve with the id of the created item
115
+ * @private
116
116
  */
117
117
  function createItemFromTemplate(template, templateDictionary, destinationAuthentication, itemProgressCallback) {
118
118
  return new Promise(resolve => {
@@ -247,6 +247,7 @@
247
247
  }
248
248
  //#endregion
249
249
  //#region Internal functions -----------------------------------------------------------------------------------------//
250
+ //???
250
251
  function _mostRecentlyEditedLayer(layerOrTableList) {
251
252
  let mostRecentlyEdited = 0;
252
253
  layerOrTableList.forEach((layer) => {
@@ -1 +1 @@
1
- {"version":3,"file":"feature-layer.umd.js","sources":["../../src/feature-layer.ts"],"sourcesContent":["/** @license\r\n * Copyright 2018 Esri\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\r\n\r\n/**\r\n * Manages the creation and deployment of feature layers and services.\r\n *\r\n * @module feature-layer\r\n */\r\n\r\n//#region Imports ----------------------------------------------------------------------------------------------//\r\n\r\nimport * as common from \"@esri/solution-common\";\r\n\r\n//#endregion\r\n\r\n//#region Publish Process --------------------------------------------------------------------------------------//\r\n\r\n/**\r\n * Fills in missing data, including full layer and table definitions, in a feature services' definition.\r\n *\r\n * @param solutionItemId\r\n * @param itemInfo Feature service item\r\n * @param destAuthentication Credentials for requests to the destination organization\r\n * @param srcAuthentication Credentials for requests to source items\r\n * @param templateDictionary Hash mapping property names to replacement values\r\n * @return A promise that will resolve when fullItem has been updated\r\n */\r\nexport function convertItemToTemplate(\r\n solutionItemId: string,\r\n itemInfo: any,\r\n destAuthentication: common.UserSession,\r\n srcAuthentication: common.UserSession,\r\n templateDictionary?: any\r\n): Promise<common.IItemTemplate> {\r\n return new Promise<common.IItemTemplate>((resolve, reject) => {\r\n // Init template\r\n const template: common.IItemTemplate = common.createInitializedItemTemplate(\r\n itemInfo\r\n );\r\n\r\n const hasInvalidDesignations: boolean = common.hasInvalidGroupDesignations(\r\n itemInfo.groupDesignations\r\n );\r\n if (hasInvalidDesignations) {\r\n common\r\n .updateTemplateForInvalidDesignations(template, srcAuthentication)\r\n .then(\r\n _template => resolve(_template),\r\n e => reject(common.fail(e))\r\n );\r\n } else {\r\n // Update the estimated cost factor to deploy this item\r\n template.estimatedDeploymentCostFactor = 10;\r\n\r\n // eslint-disable-next-line @typescript-eslint/no-floating-promises\r\n common.getItemDataAsJson(template.item.id, srcAuthentication).then(data => {\r\n template.data = data;\r\n common.getServiceLayersAndTables(template, srcAuthentication).then(\r\n itemTemplate => {\r\n // Update item's modified date to the latest of its modified date and the last edit date\r\n // of each of its layers or tables\r\n itemTemplate.item.modified =\r\n Math.max(itemTemplate.item.modified,\r\n _mostRecentlyEditedLayer(template.properties.layers),\r\n _mostRecentlyEditedLayer(template.properties.tables)\r\n );\r\n\r\n // Extract dependencies\r\n common.extractDependencies(itemTemplate, srcAuthentication).then(\r\n (dependencies: common.IDependency[]) => {\r\n // set the dependencies as an array of IDs from the array of IDependency\r\n itemTemplate.dependencies = dependencies.map(\r\n (dep: any) => dep.id\r\n );\r\n\r\n // resolve the template with templatized values\r\n resolve(\r\n common.templatize(\r\n itemTemplate,\r\n dependencies,\r\n false,\r\n templateDictionary\r\n )\r\n );\r\n },\r\n (e: any) => reject(common.fail(e))\r\n );\r\n },\r\n e => reject(common.fail(e))\r\n );\r\n });\r\n }\r\n });\r\n}\r\n\r\n//#endregion\r\n\r\n//#region Deploy Process ---------------------------------------------------------------------------------------//\r\n\r\n/**\r\n * Creates an item in a specified folder (except for Group item type).\r\n *\r\n * @param itemTemplate Item to be created; n.b.: this item is modified\r\n * @param folderId Id of folder to receive item; null indicates that the item goes into the root\r\n * folder; ignored for Group item type\r\n * @param settings Hash mapping property names to replacement values\r\n * @param authentication Credentials for the request\r\n * @return A promise that will resolve with the id of the created item\r\n * @protected\r\n */\r\nexport function createItemFromTemplate(\r\n template: common.IItemTemplate,\r\n templateDictionary: any,\r\n destinationAuthentication: common.UserSession,\r\n itemProgressCallback: common.IItemProgressCallback\r\n): Promise<common.ICreateItemFromTemplateResponse> {\r\n return new Promise<common.ICreateItemFromTemplateResponse>(resolve => {\r\n // Interrupt process if progress callback returns `false`\r\n if (\r\n !itemProgressCallback(\r\n template.itemId,\r\n common.EItemProgressStatus.Started,\r\n 0\r\n )\r\n ) {\r\n itemProgressCallback(\r\n template.itemId,\r\n common.EItemProgressStatus.Ignored,\r\n 0\r\n );\r\n resolve(common.generateEmptyCreationResponse(template.type));\r\n return;\r\n }\r\n\r\n // Replace the templatized symbols in a copy of the template\r\n let newItemTemplate: common.IItemTemplate = common.cloneObject(template);\r\n newItemTemplate = common.replaceInTemplate(\r\n newItemTemplate,\r\n templateDictionary\r\n );\r\n\r\n // Thumbnail has to be updated separately; doesn't work in create service call\r\n delete newItemTemplate.item.thumbnail;\r\n\r\n // cache the popup info to be added later\r\n const popupInfos: common.IPopupInfos = common.cachePopupInfos(\r\n newItemTemplate.data\r\n );\r\n\r\n // Create the item, then update its URL with its new id\r\n common\r\n .createFeatureService(\r\n newItemTemplate,\r\n destinationAuthentication,\r\n templateDictionary\r\n )\r\n .then(\r\n createResponse => {\r\n if (createResponse.success) {\r\n // Interrupt process if progress callback returns `false`\r\n if (\r\n !itemProgressCallback(\r\n template.itemId,\r\n common.EItemProgressStatus.Created,\r\n template.estimatedDeploymentCostFactor / 2,\r\n createResponse.serviceItemId\r\n )\r\n ) {\r\n itemProgressCallback(\r\n template.itemId,\r\n common.EItemProgressStatus.Cancelled,\r\n 0\r\n );\r\n common\r\n .removeItem(\r\n createResponse.serviceItemId,\r\n destinationAuthentication\r\n )\r\n .then(\r\n () =>\r\n resolve(\r\n common.generateEmptyCreationResponse(template.type)\r\n ),\r\n () =>\r\n resolve(common.generateEmptyCreationResponse(template.type))\r\n );\r\n } else {\r\n // Detemplatize what we can now that the service has been created\r\n newItemTemplate = common.updateTemplate(\r\n newItemTemplate,\r\n templateDictionary,\r\n createResponse\r\n );\r\n // Add the layers and tables to the feature service\r\n common\r\n .addFeatureServiceLayersAndTables(\r\n newItemTemplate,\r\n templateDictionary,\r\n popupInfos,\r\n destinationAuthentication\r\n )\r\n .then(\r\n () => {\r\n newItemTemplate = common.updateTemplate(\r\n newItemTemplate,\r\n templateDictionary,\r\n createResponse\r\n );\r\n // Update the item with snippet, description, popupInfo, etc.\r\n common\r\n .updateItemExtended(\r\n {\r\n ...newItemTemplate.item,\r\n url: undefined // can't update the URL of a feature service\r\n },\r\n newItemTemplate.data,\r\n destinationAuthentication,\r\n template.item.thumbnail,\r\n undefined,\r\n templateDictionary\r\n )\r\n .then(\r\n () => {\r\n // Interrupt process if progress callback returns `false`\r\n if (\r\n !itemProgressCallback(\r\n template.itemId,\r\n common.EItemProgressStatus.Finished,\r\n template.estimatedDeploymentCostFactor / 2,\r\n createResponse.serviceItemId\r\n )\r\n ) {\r\n itemProgressCallback(\r\n template.itemId,\r\n common.EItemProgressStatus.Cancelled,\r\n 0\r\n );\r\n common\r\n .removeItem(\r\n createResponse.serviceItemId,\r\n destinationAuthentication\r\n )\r\n .then(\r\n () =>\r\n resolve(\r\n common.generateEmptyCreationResponse(\r\n template.type\r\n )\r\n ),\r\n () =>\r\n resolve(\r\n common.generateEmptyCreationResponse(\r\n template.type\r\n )\r\n )\r\n );\r\n } else {\r\n // Update the template to match what we've stored in AGO\r\n common\r\n .getItemBase(\r\n newItemTemplate.itemId,\r\n destinationAuthentication\r\n )\r\n .then(\r\n updatedItem => {\r\n newItemTemplate.item = updatedItem;\r\n /* istanbul ignore else */\r\n if (\r\n common.getProp(\r\n newItemTemplate,\r\n \"item.url\"\r\n ) &&\r\n !newItemTemplate.item.url.endsWith(\"/\")\r\n ) {\r\n newItemTemplate.item.url += \"/\";\r\n }\r\n\r\n resolve({\r\n item: newItemTemplate,\r\n id: createResponse.serviceItemId,\r\n type: newItemTemplate.type,\r\n postProcess:\r\n common.hasUnresolvedVariables({\r\n item: newItemTemplate.item,\r\n data: newItemTemplate.data\r\n }) ||\r\n common.isWorkforceProject(newItemTemplate)\r\n });\r\n },\r\n () => {\r\n itemProgressCallback(\r\n template.itemId,\r\n common.EItemProgressStatus.Failed,\r\n 0\r\n );\r\n common\r\n .removeItem(\r\n createResponse.serviceItemId,\r\n destinationAuthentication\r\n )\r\n .then(\r\n () =>\r\n resolve(\r\n common.generateEmptyCreationResponse(\r\n template.type\r\n )\r\n ),\r\n () =>\r\n resolve(\r\n common.generateEmptyCreationResponse(\r\n template.type\r\n )\r\n )\r\n );\r\n } // fails to update item\r\n );\r\n }\r\n },\r\n () => {\r\n itemProgressCallback(\r\n template.itemId,\r\n common.EItemProgressStatus.Failed,\r\n 0\r\n );\r\n common\r\n .removeItem(\r\n createResponse.serviceItemId,\r\n destinationAuthentication\r\n )\r\n .then(\r\n () =>\r\n resolve(\r\n common.generateEmptyCreationResponse(\r\n template.type\r\n )\r\n ),\r\n () =>\r\n resolve(\r\n common.generateEmptyCreationResponse(\r\n template.type\r\n )\r\n )\r\n );\r\n } // fails to update item\r\n );\r\n },\r\n () => {\r\n itemProgressCallback(\r\n template.itemId,\r\n common.EItemProgressStatus.Failed,\r\n 0\r\n );\r\n common\r\n .removeItem(\r\n createResponse.serviceItemId,\r\n destinationAuthentication\r\n )\r\n .then(\r\n () =>\r\n resolve(\r\n common.generateEmptyCreationResponse(template.type)\r\n ),\r\n () =>\r\n resolve(\r\n common.generateEmptyCreationResponse(template.type)\r\n )\r\n );\r\n } // fails to add service layers and/or tables\r\n );\r\n }\r\n } else {\r\n itemProgressCallback(\r\n template.itemId,\r\n common.EItemProgressStatus.Failed,\r\n 0\r\n );\r\n resolve(common.generateEmptyCreationResponse(template.type)); // fails to create item\r\n }\r\n },\r\n () => {\r\n itemProgressCallback(\r\n template.itemId,\r\n common.EItemProgressStatus.Failed,\r\n 0\r\n );\r\n resolve(common.generateEmptyCreationResponse(template.type)); // fails to create item\r\n }\r\n );\r\n });\r\n}\r\n\r\n/**\r\n * Feature Layer post-processing actions\r\n *\r\n * @param {string} itemId The item ID\r\n * @param {string} type The template type\r\n * @param {any[]} itemInfos Array of {id: 'ef3', type: 'Web Map'} objects\r\n * @param {any} templateDictionary The template dictionary\r\n * @param {UserSession} authentication The destination session info\r\n * @returns Promise resolving to successfulness of update\r\n */\r\nexport function postProcess(\r\n itemId: string,\r\n type: string,\r\n itemInfos: any[],\r\n template: common.IItemTemplate,\r\n templates: common.IItemTemplate[],\r\n templateDictionary: any,\r\n authentication: common.UserSession\r\n): Promise<common.IUpdateItemResponse> {\r\n return new Promise<common.IUpdateItemResponse>((resolve, reject) => {\r\n common\r\n .updateItemTemplateFromDictionary(\r\n itemId,\r\n templateDictionary,\r\n authentication\r\n )\r\n .then(results => {\r\n if (common.isWorkforceProject(template)) {\r\n template = common.replaceInTemplate(template, templateDictionary);\r\n common\r\n .fineTuneCreatedWorkforceItem(\r\n template,\r\n authentication,\r\n template.item.url,\r\n templateDictionary\r\n )\r\n .then(resolve, reject);\r\n } else {\r\n resolve(results);\r\n }\r\n }, reject);\r\n });\r\n}\r\n\r\n//#endregion\r\n\r\n//#region Internal functions -----------------------------------------------------------------------------------------//\r\n\r\nexport function _mostRecentlyEditedLayer(\r\n layerOrTableList: any[]\r\n): any {\r\n let mostRecentlyEdited = 0;\r\n layerOrTableList.forEach(\r\n (layer) => {\r\n mostRecentlyEdited =\r\n layer.editingInfo?.lastEditDate ?\r\n Math.max(mostRecentlyEdited, layer.editingInfo.lastEditDate) :\r\n mostRecentlyEdited;\r\n }\r\n );\r\n return mostRecentlyEdited;\r\n}\r\n\r\n//#endregion\r\n"],"names":["common"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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OACtB,CACF,CAAC;MACF,OAAO,kBAAkB,CAAC;EAC5B,CAAC;EAED;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"feature-layer.umd.js","sources":["../../src/feature-layer.ts"],"sourcesContent":["/** @license\r\n * Copyright 2018 Esri\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\r\n\r\n/**\r\n * Manages the creation and deployment of feature layers and services.\r\n *\r\n * @module feature-layer\r\n */\r\n\r\n//#region Imports ----------------------------------------------------------------------------------------------//\r\n\r\nimport * as common from \"@esri/solution-common\";\r\n\r\n//#endregion\r\n\r\n//#region Publish Process --------------------------------------------------------------------------------------//\r\n\r\n/**\r\n * Fills in missing data, including full layer and table definitions, in a feature services' definition.\r\n *\r\n * @param solutionItemId\r\n * @param itemInfo Feature service item\r\n * @param destAuthentication Credentials for requests to the destination organization\r\n * @param srcAuthentication Credentials for requests to source items\r\n * @param templateDictionary Hash mapping property names to replacement values\r\n * @returns A promise that will resolve when fullItem has been updated\r\n */\r\nexport function convertItemToTemplate(\r\n solutionItemId: string,\r\n itemInfo: any,\r\n destAuthentication: common.UserSession,\r\n srcAuthentication: common.UserSession,\r\n templateDictionary?: any\r\n): Promise<common.IItemTemplate> {\r\n return new Promise<common.IItemTemplate>((resolve, reject) => {\r\n // Init template\r\n const template: common.IItemTemplate = common.createInitializedItemTemplate(\r\n itemInfo\r\n );\r\n\r\n const hasInvalidDesignations: boolean = common.hasInvalidGroupDesignations(\r\n itemInfo.groupDesignations\r\n );\r\n if (hasInvalidDesignations) {\r\n common\r\n .updateTemplateForInvalidDesignations(template, srcAuthentication)\r\n .then(\r\n _template => resolve(_template),\r\n e => reject(common.fail(e))\r\n );\r\n } else {\r\n // Update the estimated cost factor to deploy this item\r\n template.estimatedDeploymentCostFactor = 10;\r\n\r\n // eslint-disable-next-line @typescript-eslint/no-floating-promises\r\n common.getItemDataAsJson(template.item.id, srcAuthentication).then(data => {\r\n template.data = data;\r\n common.getServiceLayersAndTables(template, srcAuthentication).then(\r\n itemTemplate => {\r\n // Update item's modified date to the latest of its modified date and the last edit date\r\n // of each of its layers or tables\r\n itemTemplate.item.modified =\r\n Math.max(itemTemplate.item.modified,\r\n _mostRecentlyEditedLayer(template.properties.layers),\r\n _mostRecentlyEditedLayer(template.properties.tables)\r\n );\r\n\r\n // Extract dependencies\r\n common.extractDependencies(itemTemplate, srcAuthentication).then(\r\n (dependencies: common.IDependency[]) => {\r\n // set the dependencies as an array of IDs from the array of IDependency\r\n itemTemplate.dependencies = dependencies.map(\r\n (dep: any) => dep.id\r\n );\r\n\r\n // resolve the template with templatized values\r\n resolve(\r\n common.templatize(\r\n itemTemplate,\r\n dependencies,\r\n false,\r\n templateDictionary\r\n )\r\n );\r\n },\r\n (e: any) => reject(common.fail(e))\r\n );\r\n },\r\n e => reject(common.fail(e))\r\n );\r\n });\r\n }\r\n });\r\n}\r\n\r\n//#endregion\r\n\r\n//#region Deploy Process ---------------------------------------------------------------------------------------//\r\n\r\n/**\r\n * Creates an item in a specified folder (except for Group item type).\r\n *\r\n * @param itemTemplate Item to be created; n.b.: this item is modified\r\n * @param folderId Id of folder to receive item; null indicates that the item goes into the root\r\n * folder; ignored for Group item type\r\n * @param settings Hash mapping property names to replacement values\r\n * @param authentication Credentials for the request\r\n * @returns A promise that will resolve with the id of the created item\r\n * @private\r\n */\r\nexport function createItemFromTemplate(\r\n template: common.IItemTemplate,\r\n templateDictionary: any,\r\n destinationAuthentication: common.UserSession,\r\n itemProgressCallback: common.IItemProgressCallback\r\n): Promise<common.ICreateItemFromTemplateResponse> {\r\n return new Promise<common.ICreateItemFromTemplateResponse>(resolve => {\r\n // Interrupt process if progress callback returns `false`\r\n if (\r\n !itemProgressCallback(\r\n template.itemId,\r\n common.EItemProgressStatus.Started,\r\n 0\r\n )\r\n ) {\r\n itemProgressCallback(\r\n template.itemId,\r\n common.EItemProgressStatus.Ignored,\r\n 0\r\n );\r\n resolve(common.generateEmptyCreationResponse(template.type));\r\n return;\r\n }\r\n\r\n // Replace the templatized symbols in a copy of the template\r\n let newItemTemplate: common.IItemTemplate = common.cloneObject(template);\r\n newItemTemplate = common.replaceInTemplate(\r\n newItemTemplate,\r\n templateDictionary\r\n );\r\n\r\n // Thumbnail has to be updated separately; doesn't work in create service call\r\n delete newItemTemplate.item.thumbnail;\r\n\r\n // cache the popup info to be added later\r\n const popupInfos: common.IPopupInfos = common.cachePopupInfos(\r\n newItemTemplate.data\r\n );\r\n\r\n // Create the item, then update its URL with its new id\r\n common\r\n .createFeatureService(\r\n newItemTemplate,\r\n destinationAuthentication,\r\n templateDictionary\r\n )\r\n .then(\r\n createResponse => {\r\n if (createResponse.success) {\r\n // Interrupt process if progress callback returns `false`\r\n if (\r\n !itemProgressCallback(\r\n template.itemId,\r\n common.EItemProgressStatus.Created,\r\n template.estimatedDeploymentCostFactor / 2,\r\n createResponse.serviceItemId\r\n )\r\n ) {\r\n itemProgressCallback(\r\n template.itemId,\r\n common.EItemProgressStatus.Cancelled,\r\n 0\r\n );\r\n common\r\n .removeItem(\r\n createResponse.serviceItemId,\r\n destinationAuthentication\r\n )\r\n .then(\r\n () =>\r\n resolve(\r\n common.generateEmptyCreationResponse(template.type)\r\n ),\r\n () =>\r\n resolve(common.generateEmptyCreationResponse(template.type))\r\n );\r\n } else {\r\n // Detemplatize what we can now that the service has been created\r\n newItemTemplate = common.updateTemplate(\r\n newItemTemplate,\r\n templateDictionary,\r\n createResponse\r\n );\r\n // Add the layers and tables to the feature service\r\n common\r\n .addFeatureServiceLayersAndTables(\r\n newItemTemplate,\r\n templateDictionary,\r\n popupInfos,\r\n destinationAuthentication\r\n )\r\n .then(\r\n () => {\r\n newItemTemplate = common.updateTemplate(\r\n newItemTemplate,\r\n templateDictionary,\r\n createResponse\r\n );\r\n // Update the item with snippet, description, popupInfo, etc.\r\n common\r\n .updateItemExtended(\r\n {\r\n ...newItemTemplate.item,\r\n url: undefined // can't update the URL of a feature service\r\n },\r\n newItemTemplate.data,\r\n destinationAuthentication,\r\n template.item.thumbnail,\r\n undefined,\r\n templateDictionary\r\n )\r\n .then(\r\n () => {\r\n // Interrupt process if progress callback returns `false`\r\n if (\r\n !itemProgressCallback(\r\n template.itemId,\r\n common.EItemProgressStatus.Finished,\r\n template.estimatedDeploymentCostFactor / 2,\r\n createResponse.serviceItemId\r\n )\r\n ) {\r\n itemProgressCallback(\r\n template.itemId,\r\n common.EItemProgressStatus.Cancelled,\r\n 0\r\n );\r\n common\r\n .removeItem(\r\n createResponse.serviceItemId,\r\n destinationAuthentication\r\n )\r\n .then(\r\n () =>\r\n resolve(\r\n common.generateEmptyCreationResponse(\r\n template.type\r\n )\r\n ),\r\n () =>\r\n resolve(\r\n common.generateEmptyCreationResponse(\r\n template.type\r\n )\r\n )\r\n );\r\n } else {\r\n // Update the template to match what we've stored in AGO\r\n common\r\n .getItemBase(\r\n newItemTemplate.itemId,\r\n destinationAuthentication\r\n )\r\n .then(\r\n updatedItem => {\r\n newItemTemplate.item = updatedItem;\r\n /* istanbul ignore else */\r\n if (\r\n common.getProp(\r\n newItemTemplate,\r\n \"item.url\"\r\n ) &&\r\n !newItemTemplate.item.url.endsWith(\"/\")\r\n ) {\r\n newItemTemplate.item.url += \"/\";\r\n }\r\n\r\n resolve({\r\n item: newItemTemplate,\r\n id: createResponse.serviceItemId,\r\n type: newItemTemplate.type,\r\n postProcess:\r\n common.hasUnresolvedVariables({\r\n item: newItemTemplate.item,\r\n data: newItemTemplate.data\r\n }) ||\r\n common.isWorkforceProject(newItemTemplate)\r\n });\r\n },\r\n () => {\r\n itemProgressCallback(\r\n template.itemId,\r\n common.EItemProgressStatus.Failed,\r\n 0\r\n );\r\n common\r\n .removeItem(\r\n createResponse.serviceItemId,\r\n destinationAuthentication\r\n )\r\n .then(\r\n () =>\r\n resolve(\r\n common.generateEmptyCreationResponse(\r\n template.type\r\n )\r\n ),\r\n () =>\r\n resolve(\r\n common.generateEmptyCreationResponse(\r\n template.type\r\n )\r\n )\r\n );\r\n } // fails to update item\r\n );\r\n }\r\n },\r\n () => {\r\n itemProgressCallback(\r\n template.itemId,\r\n common.EItemProgressStatus.Failed,\r\n 0\r\n );\r\n common\r\n .removeItem(\r\n createResponse.serviceItemId,\r\n destinationAuthentication\r\n )\r\n .then(\r\n () =>\r\n resolve(\r\n common.generateEmptyCreationResponse(\r\n template.type\r\n )\r\n ),\r\n () =>\r\n resolve(\r\n common.generateEmptyCreationResponse(\r\n template.type\r\n )\r\n )\r\n );\r\n } // fails to update item\r\n );\r\n },\r\n () => {\r\n itemProgressCallback(\r\n template.itemId,\r\n common.EItemProgressStatus.Failed,\r\n 0\r\n );\r\n common\r\n .removeItem(\r\n createResponse.serviceItemId,\r\n destinationAuthentication\r\n )\r\n .then(\r\n () =>\r\n resolve(\r\n common.generateEmptyCreationResponse(template.type)\r\n ),\r\n () =>\r\n resolve(\r\n common.generateEmptyCreationResponse(template.type)\r\n )\r\n );\r\n } // fails to add service layers and/or tables\r\n );\r\n }\r\n } else {\r\n itemProgressCallback(\r\n template.itemId,\r\n common.EItemProgressStatus.Failed,\r\n 0\r\n );\r\n resolve(common.generateEmptyCreationResponse(template.type)); // fails to create item\r\n }\r\n },\r\n () => {\r\n itemProgressCallback(\r\n template.itemId,\r\n common.EItemProgressStatus.Failed,\r\n 0\r\n );\r\n resolve(common.generateEmptyCreationResponse(template.type)); // fails to create item\r\n }\r\n );\r\n });\r\n}\r\n\r\n/**\r\n * Feature Layer post-processing actions\r\n *\r\n * @param {string} itemId The item ID\r\n * @param {string} type The template type\r\n * @param {any[]} itemInfos Array of {id: 'ef3', type: 'Web Map'} objects\r\n * @param {any} templateDictionary The template dictionary\r\n * @param {UserSession} authentication The destination session info\r\n * @returns Promise resolving to successfulness of update\r\n */\r\nexport function postProcess(\r\n itemId: string,\r\n type: string,\r\n itemInfos: any[],\r\n template: common.IItemTemplate,\r\n templates: common.IItemTemplate[],\r\n templateDictionary: any,\r\n authentication: common.UserSession\r\n): Promise<common.IUpdateItemResponse> {\r\n return new Promise<common.IUpdateItemResponse>((resolve, reject) => {\r\n common\r\n .updateItemTemplateFromDictionary(\r\n itemId,\r\n templateDictionary,\r\n authentication\r\n )\r\n .then(results => {\r\n if (common.isWorkforceProject(template)) {\r\n template = common.replaceInTemplate(template, templateDictionary);\r\n common\r\n .fineTuneCreatedWorkforceItem(\r\n template,\r\n authentication,\r\n template.item.url,\r\n templateDictionary\r\n )\r\n .then(resolve, reject);\r\n } else {\r\n resolve(results);\r\n }\r\n }, reject);\r\n });\r\n}\r\n\r\n//#endregion\r\n\r\n//#region Internal functions -----------------------------------------------------------------------------------------//\r\n\r\n//???\r\nexport function _mostRecentlyEditedLayer(\r\n layerOrTableList: any[]\r\n): any {\r\n let mostRecentlyEdited = 0;\r\n layerOrTableList.forEach(\r\n (layer) => {\r\n mostRecentlyEdited =\r\n layer.editingInfo?.lastEditDate ?\r\n Math.max(mostRecentlyEdited, layer.editingInfo.lastEditDate) :\r\n mostRecentlyEdited;\r\n }\r\n );\r\n return mostRecentlyEdited;\r\n}\r\n\r\n//#endregion\r\n"],"names":["common"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAAA;;;;;;;;;;;;;;EAcG;EAYH;EAEA;EAEA;;;;;;;;;EASG;EACG,SAAU,qBAAqB,CACnC,cAAsB,EACtB,QAAa,EACb,kBAAsC,EACtC,iBAAqC,EACrC,kBAAwB,EAAA;MAExB,OAAO,IAAI,OAAO,CAAuB,CAAC,OAAO,EAAE,MAAM,KAAI;;UAE3D,MAAM,QAAQ,GAAyBA,iBAAM,CAAC,6BAA6B,CACzE,QA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AAC;EACL,CAAC;EAED;EAEA;EAEA;EACM,SAAU,wBAAwB,CACtC,gBAAuB,EAAA;MAEvB,IAAI,kBAAkB,GAAG,CAAC,CAAC;EAC3B,IAAA,gBAAgB,CAAC,OAAO,CACtB,CAAC,KAAK,KAAI;UACR,kBAAkB;EAChB,YAAA,KAAK,CAAC,WAAW,EAAE,YAAY;EAC/B,gBAAA,IAAI,CAAC,GAAG,CAAC,kBAAkB,EAAE,KAAK,CAAC,WAAW,CAAC,YAAY,CAAC;EAC5D,gBAAA,kBAAkB,CAAC;EACvB,KAAC,CACF,CAAC;EACF,IAAA,OAAO,kBAAkB,CAAC;EAC5B,CAAC;EAED;;;;;;;;;;;;;"}
@@ -1,7 +1,7 @@
1
1
  /* @preserve
2
- * @esri/solution-feature-layer - v1.3.9 - Apache-2.0
2
+ * @esri/solution-feature-layer - v1.3.12 - Apache-2.0
3
3
  * Copyright (c) 2018-2022 Esri, Inc.
4
- * Fri Mar 25 2022 15:22:54 GMT-0700 (Pacific Daylight Time)
4
+ * Tue Apr 26 2022 14:43:20 GMT-0700 (Pacific Daylight Time)
5
5
  *
6
6
  * Licensed under the Apache License, Version 2.0 (the "License");
7
7
  * you may not use this file except in compliance with the License.
@@ -1 +1 @@
1
- {"version":3,"file":"feature-layer.umd.min.js","sources":["../../src/feature-layer.ts"],"sourcesContent":["/** @license\r\n * Copyright 2018 Esri\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\r\n\r\n/**\r\n * Manages the creation and deployment of feature layers and services.\r\n *\r\n * @module feature-layer\r\n */\r\n\r\n//#region Imports ----------------------------------------------------------------------------------------------//\r\n\r\nimport * as common from \"@esri/solution-common\";\r\n\r\n//#endregion\r\n\r\n//#region Publish Process --------------------------------------------------------------------------------------//\r\n\r\n/**\r\n * Fills in missing data, including full layer and table definitions, in a feature services' definition.\r\n *\r\n * @param solutionItemId\r\n * @param itemInfo Feature service item\r\n * @param destAuthentication Credentials for requests to the destination organization\r\n * @param srcAuthentication Credentials for requests to source items\r\n * @param templateDictionary Hash mapping property names to replacement values\r\n * @return A promise that will resolve when fullItem has been updated\r\n */\r\nexport function convertItemToTemplate(\r\n solutionItemId: string,\r\n itemInfo: any,\r\n destAuthentication: common.UserSession,\r\n srcAuthentication: common.UserSession,\r\n templateDictionary?: any\r\n): Promise<common.IItemTemplate> {\r\n return new Promise<common.IItemTemplate>((resolve, reject) => {\r\n // Init template\r\n const template: common.IItemTemplate = common.createInitializedItemTemplate(\r\n itemInfo\r\n );\r\n\r\n const hasInvalidDesignations: boolean = common.hasInvalidGroupDesignations(\r\n itemInfo.groupDesignations\r\n );\r\n if (hasInvalidDesignations) {\r\n common\r\n .updateTemplateForInvalidDesignations(template, srcAuthentication)\r\n .then(\r\n _template => resolve(_template),\r\n e => reject(common.fail(e))\r\n );\r\n } else {\r\n // Update the estimated cost factor to deploy this item\r\n template.estimatedDeploymentCostFactor = 10;\r\n\r\n // eslint-disable-next-line @typescript-eslint/no-floating-promises\r\n common.getItemDataAsJson(template.item.id, srcAuthentication).then(data => {\r\n template.data = data;\r\n common.getServiceLayersAndTables(template, srcAuthentication).then(\r\n itemTemplate => {\r\n // Update item's modified date to the latest of its modified date and the last edit date\r\n // of each of its layers or tables\r\n itemTemplate.item.modified =\r\n Math.max(itemTemplate.item.modified,\r\n _mostRecentlyEditedLayer(template.properties.layers),\r\n _mostRecentlyEditedLayer(template.properties.tables)\r\n );\r\n\r\n // Extract dependencies\r\n common.extractDependencies(itemTemplate, srcAuthentication).then(\r\n (dependencies: common.IDependency[]) => {\r\n // set the dependencies as an array of IDs from the array of IDependency\r\n itemTemplate.dependencies = dependencies.map(\r\n (dep: any) => dep.id\r\n );\r\n\r\n // resolve the template with templatized values\r\n resolve(\r\n common.templatize(\r\n itemTemplate,\r\n dependencies,\r\n false,\r\n templateDictionary\r\n )\r\n );\r\n },\r\n (e: any) => reject(common.fail(e))\r\n );\r\n },\r\n e => reject(common.fail(e))\r\n );\r\n });\r\n }\r\n });\r\n}\r\n\r\n//#endregion\r\n\r\n//#region Deploy Process ---------------------------------------------------------------------------------------//\r\n\r\n/**\r\n * Creates an item in a specified folder (except for Group item type).\r\n *\r\n * @param itemTemplate Item to be created; n.b.: this item is modified\r\n * @param folderId Id of folder to receive item; null indicates that the item goes into the root\r\n * folder; ignored for Group item type\r\n * @param settings Hash mapping property names to replacement values\r\n * @param authentication Credentials for the request\r\n * @return A promise that will resolve with the id of the created item\r\n * @protected\r\n */\r\nexport function createItemFromTemplate(\r\n template: common.IItemTemplate,\r\n templateDictionary: any,\r\n destinationAuthentication: common.UserSession,\r\n itemProgressCallback: common.IItemProgressCallback\r\n): Promise<common.ICreateItemFromTemplateResponse> {\r\n return new Promise<common.ICreateItemFromTemplateResponse>(resolve => {\r\n // Interrupt process if progress callback returns `false`\r\n if (\r\n !itemProgressCallback(\r\n template.itemId,\r\n common.EItemProgressStatus.Started,\r\n 0\r\n )\r\n ) {\r\n itemProgressCallback(\r\n template.itemId,\r\n common.EItemProgressStatus.Ignored,\r\n 0\r\n );\r\n resolve(common.generateEmptyCreationResponse(template.type));\r\n return;\r\n }\r\n\r\n // Replace the templatized symbols in a copy of the template\r\n let newItemTemplate: common.IItemTemplate = common.cloneObject(template);\r\n newItemTemplate = common.replaceInTemplate(\r\n newItemTemplate,\r\n templateDictionary\r\n );\r\n\r\n // Thumbnail has to be updated separately; doesn't work in create service call\r\n delete newItemTemplate.item.thumbnail;\r\n\r\n // cache the popup info to be added later\r\n const popupInfos: common.IPopupInfos = common.cachePopupInfos(\r\n newItemTemplate.data\r\n );\r\n\r\n // Create the item, then update its URL with its new id\r\n common\r\n .createFeatureService(\r\n newItemTemplate,\r\n destinationAuthentication,\r\n templateDictionary\r\n )\r\n .then(\r\n createResponse => {\r\n if (createResponse.success) {\r\n // Interrupt process if progress callback returns `false`\r\n if (\r\n !itemProgressCallback(\r\n template.itemId,\r\n common.EItemProgressStatus.Created,\r\n template.estimatedDeploymentCostFactor / 2,\r\n createResponse.serviceItemId\r\n )\r\n ) {\r\n itemProgressCallback(\r\n template.itemId,\r\n common.EItemProgressStatus.Cancelled,\r\n 0\r\n );\r\n common\r\n .removeItem(\r\n createResponse.serviceItemId,\r\n destinationAuthentication\r\n )\r\n .then(\r\n () =>\r\n resolve(\r\n common.generateEmptyCreationResponse(template.type)\r\n ),\r\n () =>\r\n resolve(common.generateEmptyCreationResponse(template.type))\r\n );\r\n } else {\r\n // Detemplatize what we can now that the service has been created\r\n newItemTemplate = common.updateTemplate(\r\n newItemTemplate,\r\n templateDictionary,\r\n createResponse\r\n );\r\n // Add the layers and tables to the feature service\r\n common\r\n .addFeatureServiceLayersAndTables(\r\n newItemTemplate,\r\n templateDictionary,\r\n popupInfos,\r\n destinationAuthentication\r\n )\r\n .then(\r\n () => {\r\n newItemTemplate = common.updateTemplate(\r\n newItemTemplate,\r\n templateDictionary,\r\n createResponse\r\n );\r\n // Update the item with snippet, description, popupInfo, etc.\r\n common\r\n .updateItemExtended(\r\n {\r\n ...newItemTemplate.item,\r\n url: undefined // can't update the URL of a feature service\r\n },\r\n newItemTemplate.data,\r\n destinationAuthentication,\r\n template.item.thumbnail,\r\n undefined,\r\n templateDictionary\r\n )\r\n .then(\r\n () => {\r\n // Interrupt process if progress callback returns `false`\r\n if (\r\n !itemProgressCallback(\r\n template.itemId,\r\n common.EItemProgressStatus.Finished,\r\n template.estimatedDeploymentCostFactor / 2,\r\n createResponse.serviceItemId\r\n )\r\n ) {\r\n itemProgressCallback(\r\n template.itemId,\r\n common.EItemProgressStatus.Cancelled,\r\n 0\r\n );\r\n common\r\n .removeItem(\r\n createResponse.serviceItemId,\r\n destinationAuthentication\r\n )\r\n .then(\r\n () =>\r\n resolve(\r\n common.generateEmptyCreationResponse(\r\n template.type\r\n )\r\n ),\r\n () =>\r\n resolve(\r\n common.generateEmptyCreationResponse(\r\n template.type\r\n )\r\n )\r\n );\r\n } else {\r\n // Update the template to match what we've stored in AGO\r\n common\r\n .getItemBase(\r\n newItemTemplate.itemId,\r\n destinationAuthentication\r\n )\r\n .then(\r\n updatedItem => {\r\n newItemTemplate.item = updatedItem;\r\n /* istanbul ignore else */\r\n if (\r\n common.getProp(\r\n newItemTemplate,\r\n \"item.url\"\r\n ) &&\r\n !newItemTemplate.item.url.endsWith(\"/\")\r\n ) {\r\n newItemTemplate.item.url += \"/\";\r\n }\r\n\r\n resolve({\r\n item: newItemTemplate,\r\n id: createResponse.serviceItemId,\r\n type: newItemTemplate.type,\r\n postProcess:\r\n common.hasUnresolvedVariables({\r\n item: newItemTemplate.item,\r\n data: newItemTemplate.data\r\n }) ||\r\n common.isWorkforceProject(newItemTemplate)\r\n });\r\n },\r\n () => {\r\n itemProgressCallback(\r\n template.itemId,\r\n common.EItemProgressStatus.Failed,\r\n 0\r\n );\r\n common\r\n .removeItem(\r\n createResponse.serviceItemId,\r\n destinationAuthentication\r\n )\r\n .then(\r\n () =>\r\n resolve(\r\n common.generateEmptyCreationResponse(\r\n template.type\r\n )\r\n ),\r\n () =>\r\n resolve(\r\n common.generateEmptyCreationResponse(\r\n template.type\r\n )\r\n )\r\n );\r\n } // fails to update item\r\n );\r\n }\r\n },\r\n () => {\r\n itemProgressCallback(\r\n template.itemId,\r\n common.EItemProgressStatus.Failed,\r\n 0\r\n );\r\n common\r\n .removeItem(\r\n createResponse.serviceItemId,\r\n destinationAuthentication\r\n )\r\n .then(\r\n () =>\r\n resolve(\r\n common.generateEmptyCreationResponse(\r\n template.type\r\n )\r\n ),\r\n () =>\r\n resolve(\r\n common.generateEmptyCreationResponse(\r\n template.type\r\n )\r\n )\r\n );\r\n } // fails to update item\r\n );\r\n },\r\n () => {\r\n itemProgressCallback(\r\n template.itemId,\r\n common.EItemProgressStatus.Failed,\r\n 0\r\n );\r\n common\r\n .removeItem(\r\n createResponse.serviceItemId,\r\n destinationAuthentication\r\n )\r\n .then(\r\n () =>\r\n resolve(\r\n common.generateEmptyCreationResponse(template.type)\r\n ),\r\n () =>\r\n resolve(\r\n common.generateEmptyCreationResponse(template.type)\r\n )\r\n );\r\n } // fails to add service layers and/or tables\r\n );\r\n }\r\n } else {\r\n itemProgressCallback(\r\n template.itemId,\r\n common.EItemProgressStatus.Failed,\r\n 0\r\n );\r\n resolve(common.generateEmptyCreationResponse(template.type)); // fails to create item\r\n }\r\n },\r\n () => {\r\n itemProgressCallback(\r\n template.itemId,\r\n common.EItemProgressStatus.Failed,\r\n 0\r\n );\r\n resolve(common.generateEmptyCreationResponse(template.type)); // fails to create item\r\n }\r\n );\r\n });\r\n}\r\n\r\n/**\r\n * Feature Layer post-processing actions\r\n *\r\n * @param {string} itemId The item ID\r\n * @param {string} type The template type\r\n * @param {any[]} itemInfos Array of {id: 'ef3', type: 'Web Map'} objects\r\n * @param {any} templateDictionary The template dictionary\r\n * @param {UserSession} authentication The destination session info\r\n * @returns Promise resolving to successfulness of update\r\n */\r\nexport function postProcess(\r\n itemId: string,\r\n type: string,\r\n itemInfos: any[],\r\n template: common.IItemTemplate,\r\n templates: common.IItemTemplate[],\r\n templateDictionary: any,\r\n authentication: common.UserSession\r\n): Promise<common.IUpdateItemResponse> {\r\n return new Promise<common.IUpdateItemResponse>((resolve, reject) => {\r\n common\r\n .updateItemTemplateFromDictionary(\r\n itemId,\r\n templateDictionary,\r\n authentication\r\n )\r\n .then(results => {\r\n if (common.isWorkforceProject(template)) {\r\n template = common.replaceInTemplate(template, templateDictionary);\r\n common\r\n .fineTuneCreatedWorkforceItem(\r\n template,\r\n authentication,\r\n template.item.url,\r\n templateDictionary\r\n )\r\n .then(resolve, reject);\r\n } else {\r\n resolve(results);\r\n }\r\n }, reject);\r\n });\r\n}\r\n\r\n//#endregion\r\n\r\n//#region Internal functions -----------------------------------------------------------------------------------------//\r\n\r\nexport function _mostRecentlyEditedLayer(\r\n layerOrTableList: any[]\r\n): any {\r\n let mostRecentlyEdited = 0;\r\n layerOrTableList.forEach(\r\n (layer) => {\r\n mostRecentlyEdited =\r\n layer.editingInfo?.lastEditDate ?\r\n Math.max(mostRecentlyEdited, layer.editingInfo.lastEditDate) :\r\n mostRecentlyEdited;\r\n }\r\n );\r\n return mostRecentlyEdited;\r\n}\r\n\r\n//#endregion\r\n"],"names":["_mostRecentlyEditedLayer","layerOrTableList","mostRecentlyEdited","forEach","layer","editingInfo","lastEditDate","Math","max","solutionItemId","itemInfo","destAuthentication","srcAuthentication","templateDictionary","Promise","resolve","reject","template","common","createInitializedItemTemplate","hasInvalidGroupDesignations","groupDesignations","updateTemplateForInvalidDesignations","then","_template","e","fail","estimatedDeploymentCostFactor","getItemDataAsJson","item","id","data","getServiceLayersAndTables","itemTemplate","modified","properties","layers","tables","extractDependencies","dependencies","map","dep","templatize","destinationAuthentication","itemProgressCallback","itemId","EItemProgressStatus","Started","Ignored","generateEmptyCreationResponse","type","newItemTemplate","cloneObject","replaceInTemplate","thumbnail","popupInfos","cachePopupInfos","createFeatureService","createResponse","success","Created","serviceItemId","updateTemplate","addFeatureServiceLayersAndTables","updateItemExtended","url","undefined","Finished","getItemBase","updatedItem","getProp","endsWith","postProcess","hasUnresolvedVariables","isWorkforceProject","Failed","removeItem","Cancelled","itemInfos","templates","authentication","updateItemTemplateFromDictionary","results","fineTuneCreatedWorkforceItem"],"mappings":";;;;;;;;;;;;;;;;;uoBAocgBA,EACdC,GAEA,IAAIC,EAAqB,EASzB,OARAD,EAAiBE,SACdC,IACCF,EACEE,EAAMC,aAAaC,aACnBC,KAAKC,IAAIN,EAAoBE,EAAMC,YAAYC,cAC/CJ,KAGCA,gEAvaPO,EACAC,EACAC,EACAC,EACAC,GAEA,OAAO,IAAIC,SAA8B,CAACC,EAASC,K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ACLhC,EAASiC,SAGf,IACEnC,EACEG,EAAO+B,8BACLhC,EAASiC,eAO3B,KACEN,EACE3B,EAAS4B,OACT3B,EAAO4B,oBAAoB6B,OAC3B,GAEFzD,EACG0D,WACClB,EAAeG,cACflB,GAEDpB,MACC,IACER,EACEG,EAAO+B,8BAA8BhC,EAASiC,SAElD,IACEnC,EACEG,EAAO+B,8BAA8BhC,EAASiC,cApM5DN,EACE3B,EAAS4B,OACT3B,EAAO4B,oBAAoB+B,UAC3B,GAEF3D,EACG0D,WACClB,EAAeG,cACflB,GAEDpB,MACC,IACER,EACEG,EAAO+B,8BAA8BhC,EAASiC,SAElD,IACEnC,EAAQG,EAAO+B,8BAA8BhC,EAASiC,WA2L9DN,EACE3B,EAAS4B,OACT3B,EAAO4B,oBAAoB6B,OAC3B,GAEF5D,EAAQG,EAAO+B,8BAA8BhC,EAASiC,WAG1D,KACEN,EACE3B,EAAS4B,OACT3B,EAAO4B,oBAAoB6B,OAC3B,GAEF5D,EAAQG,EAAO+B,8BAA8BhC,EAASiC,qCAiB9DL,EACAK,EACA4B,EACA7D,EACA8D,EACAlE,EACAmE,GAEA,OAAO,IAAIlE,SAAoC,CAACC,EAASC,KACvDE,EACG+D,iCACCpC,EACAhC,EACAmE,GAEDzD,MAAK2D,IACAhE,EAAOwD,mBAAmBzD,IAC5BA,EAAWC,EAAOmC,kBAAkBpC,EAAUJ,GAC9CK,EACGiE,6BACClE,EACA+D,EACA/D,EAASY,KAAKoC,IACdpD,GAEDU,KAAKR,EAASC,IAEjBD,EAAQmE,KAETlE"}
1
+ {"version":3,"file":"feature-layer.umd.min.js","sources":["../../src/feature-layer.ts"],"sourcesContent":["/** @license\r\n * Copyright 2018 Esri\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\r\n\r\n/**\r\n * Manages the creation and deployment of feature layers and services.\r\n *\r\n * @module feature-layer\r\n */\r\n\r\n//#region Imports ----------------------------------------------------------------------------------------------//\r\n\r\nimport * as common from \"@esri/solution-common\";\r\n\r\n//#endregion\r\n\r\n//#region Publish Process --------------------------------------------------------------------------------------//\r\n\r\n/**\r\n * Fills in missing data, including full layer and table definitions, in a feature services' definition.\r\n *\r\n * @param solutionItemId\r\n * @param itemInfo Feature service item\r\n * @param destAuthentication Credentials for requests to the destination organization\r\n * @param srcAuthentication Credentials for requests to source items\r\n * @param templateDictionary Hash mapping property names to replacement values\r\n * @returns A promise that will resolve when fullItem has been updated\r\n */\r\nexport function convertItemToTemplate(\r\n solutionItemId: string,\r\n itemInfo: any,\r\n destAuthentication: common.UserSession,\r\n srcAuthentication: common.UserSession,\r\n templateDictionary?: any\r\n): Promise<common.IItemTemplate> {\r\n return new Promise<common.IItemTemplate>((resolve, reject) => {\r\n // Init template\r\n const template: common.IItemTemplate = common.createInitializedItemTemplate(\r\n itemInfo\r\n );\r\n\r\n const hasInvalidDesignations: boolean = common.hasInvalidGroupDesignations(\r\n itemInfo.groupDesignations\r\n );\r\n if (hasInvalidDesignations) {\r\n common\r\n .updateTemplateForInvalidDesignations(template, srcAuthentication)\r\n .then(\r\n _template => resolve(_template),\r\n e => reject(common.fail(e))\r\n );\r\n } else {\r\n // Update the estimated cost factor to deploy this item\r\n template.estimatedDeploymentCostFactor = 10;\r\n\r\n // eslint-disable-next-line @typescript-eslint/no-floating-promises\r\n common.getItemDataAsJson(template.item.id, srcAuthentication).then(data => {\r\n template.data = data;\r\n common.getServiceLayersAndTables(template, srcAuthentication).then(\r\n itemTemplate => {\r\n // Update item's modified date to the latest of its modified date and the last edit date\r\n // of each of its layers or tables\r\n itemTemplate.item.modified =\r\n Math.max(itemTemplate.item.modified,\r\n _mostRecentlyEditedLayer(template.properties.layers),\r\n _mostRecentlyEditedLayer(template.properties.tables)\r\n );\r\n\r\n // Extract dependencies\r\n common.extractDependencies(itemTemplate, srcAuthentication).then(\r\n (dependencies: common.IDependency[]) => {\r\n // set the dependencies as an array of IDs from the array of IDependency\r\n itemTemplate.dependencies = dependencies.map(\r\n (dep: any) => dep.id\r\n );\r\n\r\n // resolve the template with templatized values\r\n resolve(\r\n common.templatize(\r\n itemTemplate,\r\n dependencies,\r\n false,\r\n templateDictionary\r\n )\r\n );\r\n },\r\n (e: any) => reject(common.fail(e))\r\n );\r\n },\r\n e => reject(common.fail(e))\r\n );\r\n });\r\n }\r\n });\r\n}\r\n\r\n//#endregion\r\n\r\n//#region Deploy Process ---------------------------------------------------------------------------------------//\r\n\r\n/**\r\n * Creates an item in a specified folder (except for Group item type).\r\n *\r\n * @param itemTemplate Item to be created; n.b.: this item is modified\r\n * @param folderId Id of folder to receive item; null indicates that the item goes into the root\r\n * folder; ignored for Group item type\r\n * @param settings Hash mapping property names to replacement values\r\n * @param authentication Credentials for the request\r\n * @returns A promise that will resolve with the id of the created item\r\n * @private\r\n */\r\nexport function createItemFromTemplate(\r\n template: common.IItemTemplate,\r\n templateDictionary: any,\r\n destinationAuthentication: common.UserSession,\r\n itemProgressCallback: common.IItemProgressCallback\r\n): Promise<common.ICreateItemFromTemplateResponse> {\r\n return new Promise<common.ICreateItemFromTemplateResponse>(resolve => {\r\n // Interrupt process if progress callback returns `false`\r\n if (\r\n !itemProgressCallback(\r\n template.itemId,\r\n common.EItemProgressStatus.Started,\r\n 0\r\n )\r\n ) {\r\n itemProgressCallback(\r\n template.itemId,\r\n common.EItemProgressStatus.Ignored,\r\n 0\r\n );\r\n resolve(common.generateEmptyCreationResponse(template.type));\r\n return;\r\n }\r\n\r\n // Replace the templatized symbols in a copy of the template\r\n let newItemTemplate: common.IItemTemplate = common.cloneObject(template);\r\n newItemTemplate = common.replaceInTemplate(\r\n newItemTemplate,\r\n templateDictionary\r\n );\r\n\r\n // Thumbnail has to be updated separately; doesn't work in create service call\r\n delete newItemTemplate.item.thumbnail;\r\n\r\n // cache the popup info to be added later\r\n const popupInfos: common.IPopupInfos = common.cachePopupInfos(\r\n newItemTemplate.data\r\n );\r\n\r\n // Create the item, then update its URL with its new id\r\n common\r\n .createFeatureService(\r\n newItemTemplate,\r\n destinationAuthentication,\r\n templateDictionary\r\n )\r\n .then(\r\n createResponse => {\r\n if (createResponse.success) {\r\n // Interrupt process if progress callback returns `false`\r\n if (\r\n !itemProgressCallback(\r\n template.itemId,\r\n common.EItemProgressStatus.Created,\r\n template.estimatedDeploymentCostFactor / 2,\r\n createResponse.serviceItemId\r\n )\r\n ) {\r\n itemProgressCallback(\r\n template.itemId,\r\n common.EItemProgressStatus.Cancelled,\r\n 0\r\n );\r\n common\r\n .removeItem(\r\n createResponse.serviceItemId,\r\n destinationAuthentication\r\n )\r\n .then(\r\n () =>\r\n resolve(\r\n common.generateEmptyCreationResponse(template.type)\r\n ),\r\n () =>\r\n resolve(common.generateEmptyCreationResponse(template.type))\r\n );\r\n } else {\r\n // Detemplatize what we can now that the service has been created\r\n newItemTemplate = common.updateTemplate(\r\n newItemTemplate,\r\n templateDictionary,\r\n createResponse\r\n );\r\n // Add the layers and tables to the feature service\r\n common\r\n .addFeatureServiceLayersAndTables(\r\n newItemTemplate,\r\n templateDictionary,\r\n popupInfos,\r\n destinationAuthentication\r\n )\r\n .then(\r\n () => {\r\n newItemTemplate = common.updateTemplate(\r\n newItemTemplate,\r\n templateDictionary,\r\n createResponse\r\n );\r\n // Update the item with snippet, description, popupInfo, etc.\r\n common\r\n .updateItemExtended(\r\n {\r\n ...newItemTemplate.item,\r\n url: undefined // can't update the URL of a feature service\r\n },\r\n newItemTemplate.data,\r\n destinationAuthentication,\r\n template.item.thumbnail,\r\n undefined,\r\n templateDictionary\r\n )\r\n .then(\r\n () => {\r\n // Interrupt process if progress callback returns `false`\r\n if (\r\n !itemProgressCallback(\r\n template.itemId,\r\n common.EItemProgressStatus.Finished,\r\n template.estimatedDeploymentCostFactor / 2,\r\n createResponse.serviceItemId\r\n )\r\n ) {\r\n itemProgressCallback(\r\n template.itemId,\r\n common.EItemProgressStatus.Cancelled,\r\n 0\r\n );\r\n common\r\n .removeItem(\r\n createResponse.serviceItemId,\r\n destinationAuthentication\r\n )\r\n .then(\r\n () =>\r\n resolve(\r\n common.generateEmptyCreationResponse(\r\n template.type\r\n )\r\n ),\r\n () =>\r\n resolve(\r\n common.generateEmptyCreationResponse(\r\n template.type\r\n )\r\n )\r\n );\r\n } else {\r\n // Update the template to match what we've stored in AGO\r\n common\r\n .getItemBase(\r\n newItemTemplate.itemId,\r\n destinationAuthentication\r\n )\r\n .then(\r\n updatedItem => {\r\n newItemTemplate.item = updatedItem;\r\n /* istanbul ignore else */\r\n if (\r\n common.getProp(\r\n newItemTemplate,\r\n \"item.url\"\r\n ) &&\r\n !newItemTemplate.item.url.endsWith(\"/\")\r\n ) {\r\n newItemTemplate.item.url += \"/\";\r\n }\r\n\r\n resolve({\r\n item: newItemTemplate,\r\n id: createResponse.serviceItemId,\r\n type: newItemTemplate.type,\r\n postProcess:\r\n common.hasUnresolvedVariables({\r\n item: newItemTemplate.item,\r\n data: newItemTemplate.data\r\n }) ||\r\n common.isWorkforceProject(newItemTemplate)\r\n });\r\n },\r\n () => {\r\n itemProgressCallback(\r\n template.itemId,\r\n common.EItemProgressStatus.Failed,\r\n 0\r\n );\r\n common\r\n .removeItem(\r\n createResponse.serviceItemId,\r\n destinationAuthentication\r\n )\r\n .then(\r\n () =>\r\n resolve(\r\n common.generateEmptyCreationResponse(\r\n template.type\r\n )\r\n ),\r\n () =>\r\n resolve(\r\n common.generateEmptyCreationResponse(\r\n template.type\r\n )\r\n )\r\n );\r\n } // fails to update item\r\n );\r\n }\r\n },\r\n () => {\r\n itemProgressCallback(\r\n template.itemId,\r\n common.EItemProgressStatus.Failed,\r\n 0\r\n );\r\n common\r\n .removeItem(\r\n createResponse.serviceItemId,\r\n destinationAuthentication\r\n )\r\n .then(\r\n () =>\r\n resolve(\r\n common.generateEmptyCreationResponse(\r\n template.type\r\n )\r\n ),\r\n () =>\r\n resolve(\r\n common.generateEmptyCreationResponse(\r\n template.type\r\n )\r\n )\r\n );\r\n } // fails to update item\r\n );\r\n },\r\n () => {\r\n itemProgressCallback(\r\n template.itemId,\r\n common.EItemProgressStatus.Failed,\r\n 0\r\n );\r\n common\r\n .removeItem(\r\n createResponse.serviceItemId,\r\n destinationAuthentication\r\n )\r\n .then(\r\n () =>\r\n resolve(\r\n common.generateEmptyCreationResponse(template.type)\r\n ),\r\n () =>\r\n resolve(\r\n common.generateEmptyCreationResponse(template.type)\r\n )\r\n );\r\n } // fails to add service layers and/or tables\r\n );\r\n }\r\n } else {\r\n itemProgressCallback(\r\n template.itemId,\r\n common.EItemProgressStatus.Failed,\r\n 0\r\n );\r\n resolve(common.generateEmptyCreationResponse(template.type)); // fails to create item\r\n }\r\n },\r\n () => {\r\n itemProgressCallback(\r\n template.itemId,\r\n common.EItemProgressStatus.Failed,\r\n 0\r\n );\r\n resolve(common.generateEmptyCreationResponse(template.type)); // fails to create item\r\n }\r\n );\r\n });\r\n}\r\n\r\n/**\r\n * Feature Layer post-processing actions\r\n *\r\n * @param {string} itemId The item ID\r\n * @param {string} type The template type\r\n * @param {any[]} itemInfos Array of {id: 'ef3', type: 'Web Map'} objects\r\n * @param {any} templateDictionary The template dictionary\r\n * @param {UserSession} authentication The destination session info\r\n * @returns Promise resolving to successfulness of update\r\n */\r\nexport function postProcess(\r\n itemId: string,\r\n type: string,\r\n itemInfos: any[],\r\n template: common.IItemTemplate,\r\n templates: common.IItemTemplate[],\r\n templateDictionary: any,\r\n authentication: common.UserSession\r\n): Promise<common.IUpdateItemResponse> {\r\n return new Promise<common.IUpdateItemResponse>((resolve, reject) => {\r\n common\r\n .updateItemTemplateFromDictionary(\r\n itemId,\r\n templateDictionary,\r\n authentication\r\n )\r\n .then(results => {\r\n if (common.isWorkforceProject(template)) {\r\n template = common.replaceInTemplate(template, templateDictionary);\r\n common\r\n .fineTuneCreatedWorkforceItem(\r\n template,\r\n authentication,\r\n template.item.url,\r\n templateDictionary\r\n )\r\n .then(resolve, reject);\r\n } else {\r\n resolve(results);\r\n }\r\n }, reject);\r\n });\r\n}\r\n\r\n//#endregion\r\n\r\n//#region Internal functions -----------------------------------------------------------------------------------------//\r\n\r\n//???\r\nexport function _mostRecentlyEditedLayer(\r\n layerOrTableList: any[]\r\n): any {\r\n let mostRecentlyEdited = 0;\r\n layerOrTableList.forEach(\r\n (layer) => {\r\n mostRecentlyEdited =\r\n layer.editingInfo?.lastEditDate ?\r\n Math.max(mostRecentlyEdited, layer.editingInfo.lastEditDate) :\r\n mostRecentlyEdited;\r\n }\r\n );\r\n return mostRecentlyEdited;\r\n}\r\n\r\n//#endregion\r\n"],"names":["_mostRecentlyEditedLayer","layerOrTableList","mostRecentlyEdited","forEach","layer","editingInfo","lastEditDate","Math","max","solutionItemId","itemInfo","destAuthentication","srcAuthentication","templateDictionary","Promise","resolve","reject","template","common","createInitializedItemTemplate","hasInvalidGroupDesignations","groupDesignations","updateTemplateForInvalidDesignations","then","_template","e","fail","estimatedDeploymentCostFactor","getItemDataAsJson","item","id","data","getServiceLayersAndTables","itemTemplate","modified","properties","layers","tables","extractDependencies","dependencies","map","dep","templatize","destinationAuthentication","itemProgressCallback","itemId","EItemProgressStatus","Started","Ignored","generateEmptyCreationResponse","type","newItemTemplate","cloneObject","replaceInTemplate","thumbnail","popupInfos","cachePopupInfos","createFeatureService","createResponse","success","Created","serviceItemId","updateTemplate","addFeatureServiceLayersAndTables","updateItemExtended","url","undefined","Finished","getItemBase","updatedItem","getProp","endsWith","postProcess","hasUnresolvedVariables","isWorkforceProject","Failed","removeItem","Cancelled","itemInfos","templates","authentication","updateItemTemplateFromDictionary","results","fineTuneCreatedWorkforceItem"],"mappings":";;;;;;;;;;;;;;;;;8nBAqcM,SAAUA,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AEDpB,MACC,IACER,EACEG,EAAO+B,8BACLhC,EAASiC,SAGf,IACEnC,EACEG,EAAO+B,8BACLhC,EAASiC,aAkEvB,KACEN,EACE3B,EAAS4B,OACT3B,EAAO4B,oBAAoB6B,OAC3B,GAEFzD,EACG0D,WACClB,EAAeG,cACflB,GAEDpB,MACC,IACER,EACEG,EAAO+B,8BACLhC,EAASiC,SAGf,IACEnC,EACEG,EAAO+B,8BACLhC,EAASiC,eAO3B,KACEN,EACE3B,EAAS4B,OACT3B,EAAO4B,oBAAoB6B,OAC3B,GAEFzD,EACG0D,WACClB,EAAeG,cACflB,GAEDpB,MACC,IACER,EACEG,EAAO+B,8BAA8BhC,EAASiC,SAElD,IACEnC,EACEG,EAAO+B,8BAA8BhC,EAASiC,cApM5DN,EACE3B,EAAS4B,OACT3B,EAAO4B,oBAAoB+B,UAC3B,GAEF3D,EACG0D,WACClB,EAAeG,cACflB,GAEDpB,MACC,IACER,EACEG,EAAO+B,8BAA8BhC,EAASiC,SAElD,IACEnC,EAAQG,EAAO+B,8BAA8BhC,EAASiC,WA2L9DN,EACE3B,EAAS4B,OACT3B,EAAO4B,oBAAoB6B,OAC3B,GAEF5D,EAAQG,EAAO+B,8BAA8BhC,EAASiC,WAG1D,KACEN,EACE3B,EAAS4B,OACT3B,EAAO4B,oBAAoB6B,OAC3B,GAEF5D,EAAQG,EAAO+B,8BAA8BhC,EAASiC,4BAgBhD,SACdL,EACAK,EACA4B,EACA7D,EACA8D,EACAlE,EACAmE,GAEA,OAAO,IAAIlE,SAAoC,CAACC,EAASC,KACvDE,EACG+D,iCACCpC,EACAhC,EACAmE,GAEDzD,MAAK2D,IACAhE,EAAOwD,mBAAmBzD,IAC5BA,EAAWC,EAAOmC,kBAAkBpC,EAAUJ,GAC9CK,EACGiE,6BACClE,EACA+D,EACA/D,EAASY,KAAKoC,IACdpD,GAEDU,KAAKR,EAASC,IAEjBD,EAAQmE,KAETlE"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@esri/solution-feature-layer",
3
- "version": "1.3.9",
3
+ "version": "1.3.12",
4
4
  "description": "Manages the creation and deployment of feature layers and services for @esri/solution.js.",
5
5
  "main": "dist/node/index.js",
6
6
  "unpkg": "dist/umd/feature-layer.umd.min.js",
@@ -18,11 +18,11 @@
18
18
  "@esri/arcgis-rest-portal": "3.4.3",
19
19
  "@esri/arcgis-rest-request": "3.4.3",
20
20
  "@esri/arcgis-rest-service-admin": "3.4.3",
21
- "@esri/hub-common": "9.15.0",
22
- "@esri/hub-initiatives": "9.15.0",
23
- "@esri/hub-sites": "9.15.0",
24
- "@esri/hub-teams": "9.15.0",
25
- "rollup": "^2.60.0"
21
+ "@esri/hub-common": "9.29.0",
22
+ "@esri/hub-initiatives": "9.29.0",
23
+ "@esri/hub-sites": "9.29.0",
24
+ "@esri/hub-teams": "9.29.0",
25
+ "rollup": "2.70.2"
26
26
  },
27
27
  "peerDependencies": {
28
28
  "@esri/arcgis-rest-auth": "3.4.3",
@@ -30,14 +30,14 @@
30
30
  "@esri/arcgis-rest-portal": "3.4.3",
31
31
  "@esri/arcgis-rest-request": "3.4.3",
32
32
  "@esri/arcgis-rest-service-admin": "3.4.3",
33
- "@esri/hub-common": "9.15.0",
34
- "@esri/hub-initiatives": "9.15.0",
35
- "@esri/hub-sites": "9.15.0",
36
- "@esri/hub-teams": "9.15.0"
33
+ "@esri/hub-common": "9.29.0",
34
+ "@esri/hub-initiatives": "9.29.0",
35
+ "@esri/hub-sites": "9.29.0",
36
+ "@esri/hub-teams": "9.29.0"
37
37
  },
38
38
  "dependencies": {
39
- "@esri/solution-common": "^1.3.9",
40
- "tslib": "1.13.0"
39
+ "@esri/solution-common": "^1.3.12",
40
+ "tslib": "1.14.1"
41
41
  },
42
42
  "scripts": {
43
43
  "prepare": "npm run build",
@@ -47,7 +47,8 @@
47
47
  "build:node": "tsc -p ./tsconfig.json --module commonjs --outDir ./dist/node",
48
48
  "dev:esm": "tsc -w --module esnext --outDir ./dist/esm --declaration",
49
49
  "dev:umd": "rollup -w -c ../../umd-base-profile.js",
50
- "dev:node": "tsc -w --module commonjs --outDir ./dist/node"
50
+ "dev:node": "tsc -w --module commonjs --outDir ./dist/node",
51
+ "getupdates": "npm-check-updates --upgrade"
51
52
  },
52
53
  "publishConfig": {
53
54
  "access": "public"
@@ -89,5 +90,5 @@
89
90
  "esri",
90
91
  "ES6"
91
92
  ],
92
- "gitHead": "b6373fcbf48472b35e833564440ecec8665cd734"
93
+ "gitHead": "5cb0515da75cf8faaba2a626808d50925d290b55"
93
94
  }