@esri/solution-simple-types 4.1.2 → 5.0.1

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.
Files changed (69) hide show
  1. package/dist/cjs/dashboard.d.ts +93 -93
  2. package/dist/cjs/dashboard.js +352 -352
  3. package/dist/cjs/helpers/convert-item-to-template.d.ts +46 -46
  4. package/dist/cjs/helpers/convert-item-to-template.js +235 -209
  5. package/dist/cjs/helpers/convert-item-to-template.js.map +1 -1
  6. package/dist/cjs/helpers/create-item-from-template.d.ts +17 -17
  7. package/dist/cjs/helpers/create-item-from-template.js +153 -138
  8. package/dist/cjs/helpers/create-item-from-template.js.map +1 -1
  9. package/dist/cjs/helpers/notebook-helpers.d.ts +19 -19
  10. package/dist/cjs/helpers/notebook-helpers.js +24 -24
  11. package/dist/cjs/helpers/quickcapture-helpers.d.ts +18 -18
  12. package/dist/cjs/helpers/quickcapture-helpers.js +22 -22
  13. package/dist/cjs/helpers/simple-type-helpers.d.ts +18 -18
  14. package/dist/cjs/helpers/simple-type-helpers.js +22 -22
  15. package/dist/cjs/helpers/update-notebook-data.d.ts +17 -17
  16. package/dist/cjs/helpers/update-notebook-data.js +27 -27
  17. package/dist/cjs/index.d.ts +27 -27
  18. package/dist/cjs/index.js +36 -36
  19. package/dist/cjs/notebook.d.ts +66 -66
  20. package/dist/cjs/notebook.js +133 -133
  21. package/dist/cjs/oic.d.ts +53 -53
  22. package/dist/cjs/oic.js +170 -170
  23. package/dist/cjs/quickcapture.d.ts +76 -87
  24. package/dist/cjs/quickcapture.js +143 -192
  25. package/dist/cjs/quickcapture.js.map +1 -1
  26. package/dist/cjs/simple-types.d.ts +57 -57
  27. package/dist/cjs/simple-types.js +94 -94
  28. package/dist/cjs/webmap.d.ts +102 -102
  29. package/dist/cjs/webmap.js +325 -325
  30. package/dist/cjs/webmappingapplication.d.ts +176 -176
  31. package/dist/cjs/webmappingapplication.js +674 -674
  32. package/dist/cjs/webmappingapplication.js.map +1 -1
  33. package/dist/cjs/workforce.d.ts +34 -34
  34. package/dist/cjs/workforce.js +44 -44
  35. package/dist/esm/dashboard.d.ts +93 -93
  36. package/dist/esm/dashboard.js +339 -339
  37. package/dist/esm/helpers/convert-item-to-template.d.ts +46 -46
  38. package/dist/esm/helpers/convert-item-to-template.js +228 -202
  39. package/dist/esm/helpers/convert-item-to-template.js.map +1 -1
  40. package/dist/esm/helpers/create-item-from-template.d.ts +17 -17
  41. package/dist/esm/helpers/create-item-from-template.js +148 -133
  42. package/dist/esm/helpers/create-item-from-template.js.map +1 -1
  43. package/dist/esm/helpers/notebook-helpers.d.ts +19 -19
  44. package/dist/esm/helpers/notebook-helpers.js +20 -20
  45. package/dist/esm/helpers/quickcapture-helpers.d.ts +18 -18
  46. package/dist/esm/helpers/quickcapture-helpers.js +19 -19
  47. package/dist/esm/helpers/simple-type-helpers.d.ts +18 -18
  48. package/dist/esm/helpers/simple-type-helpers.js +19 -19
  49. package/dist/esm/helpers/update-notebook-data.d.ts +17 -17
  50. package/dist/esm/helpers/update-notebook-data.js +23 -23
  51. package/dist/esm/index.d.ts +27 -27
  52. package/dist/esm/index.js +27 -27
  53. package/dist/esm/notebook.d.ts +66 -66
  54. package/dist/esm/notebook.js +123 -123
  55. package/dist/esm/oic.d.ts +53 -53
  56. package/dist/esm/oic.js +162 -162
  57. package/dist/esm/quickcapture.d.ts +76 -87
  58. package/dist/esm/quickcapture.js +131 -179
  59. package/dist/esm/quickcapture.js.map +1 -1
  60. package/dist/esm/simple-types.d.ts +57 -57
  61. package/dist/esm/simple-types.js +86 -86
  62. package/dist/esm/webmap.d.ts +102 -102
  63. package/dist/esm/webmap.js +312 -312
  64. package/dist/esm/webmappingapplication.d.ts +176 -176
  65. package/dist/esm/webmappingapplication.js +648 -648
  66. package/dist/esm/webmappingapplication.js.map +1 -1
  67. package/dist/esm/workforce.d.ts +34 -34
  68. package/dist/esm/workforce.js +38 -38
  69. package/package.json +7 -7
@@ -1,46 +1,46 @@
1
- /** @license
2
- * Copyright 2020 Esri
3
- *
4
- * Licensed under the Apache License, Version 2.0 (the "License");
5
- * you may not use this file except in compliance with the License.
6
- * You may obtain a copy of the License at
7
- *
8
- * http://www.apache.org/licenses/LICENSE-2.0
9
- *
10
- * Unless required by applicable law or agreed to in writing, software
11
- * distributed under the License is distributed on an "AS IS" BASIS,
12
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
- * See the License for the specific language governing permissions and
14
- * limitations under the License.
15
- */
16
- import * as common from "@esri/solution-common";
17
- /**
18
- * Converts an item into a template.
19
- *
20
- * @param solutionItemId The solution to contain the template
21
- * @param itemInfo Info about the item
22
- * @param destAuthentication Credentials for requests to the destination organization
23
- * @param srcAuthentication Credentials for requests to source items
24
- * @param templateDictionary Hash of facts: folder id, org URL, adlib replacements
25
- *
26
- * @returns A promise that will resolve when the template has been created
27
- */
28
- export declare function convertItemToTemplate(solutionItemId: string, itemInfo: any, destAuthentication: common.UserSession, srcAuthentication: common.UserSession, templateDictionary: any): Promise<common.IItemTemplate>;
29
- /**
30
- * Extracts the feature layer ids for a Data Pipeline's sources and sinks.
31
- *
32
- * @param itemData Data Pipeline's data section
33
- * @return List of feature layer ids or an empty list if there are no sources or sinks in the pipeline
34
- */
35
- export declare function _getDataPipelineSourcesAndSinks(itemData: any): string[];
36
- /**
37
- * Encapsulates the rules for naming a form's data file.
38
- * Chooses the first parameter that's defined and is not the string "undefined".
39
- *
40
- * @param itemName Template's item name
41
- * @param dataFilename The data file name
42
- * @param itemIdAsName A name constructed from the template's id suffixed with ".zip"
43
- *
44
- * @return A name for the data file
45
- */
46
- export declare function _getFormDataFilename(itemName: string, dataFilename: string, itemIdAsName: string): string;
1
+ /** @license
2
+ * Copyright 2020 Esri
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+ import * as common from "@esri/solution-common";
17
+ /**
18
+ * Converts an item into a template.
19
+ *
20
+ * @param solutionItemId The solution to contain the template
21
+ * @param itemInfo Info about the item
22
+ * @param destAuthentication Credentials for requests to the destination organization
23
+ * @param srcAuthentication Credentials for requests to source items
24
+ * @param templateDictionary Hash of facts: folder id, org URL, adlib replacements
25
+ *
26
+ * @returns A promise that will resolve when the template has been created
27
+ */
28
+ export declare function convertItemToTemplate(solutionItemId: string, itemInfo: any, destAuthentication: common.UserSession, srcAuthentication: common.UserSession, templateDictionary: any): Promise<common.IItemTemplate>;
29
+ /**
30
+ * Extracts the feature layer ids for a Data Pipeline's sources and sinks.
31
+ *
32
+ * @param itemData Data Pipeline's data section
33
+ * @return List of feature layer ids or an empty list if there are no sources or sinks in the pipeline
34
+ */
35
+ export declare function _getDataPipelineSourcesAndSinks(itemData: any): string[];
36
+ /**
37
+ * Encapsulates the rules for naming a form's data file.
38
+ * Chooses the first parameter that's defined and is not the string "undefined".
39
+ *
40
+ * @param itemName Template's item name
41
+ * @param dataFilename The data file name
42
+ * @param itemIdAsName A name constructed from the template's id suffixed with ".zip"
43
+ *
44
+ * @return A name for the data file
45
+ */
46
+ export declare function _getFormDataFilename(itemName: string, dataFilename: string, itemIdAsName: string): string;
@@ -1,203 +1,229 @@
1
- /** @license
2
- * Copyright 2020 Esri
3
- *
4
- * Licensed under the Apache License, Version 2.0 (the "License");
5
- * you may not use this file except in compliance with the License.
6
- * You may obtain a copy of the License at
7
- *
8
- * http://www.apache.org/licenses/LICENSE-2.0
9
- *
10
- * Unless required by applicable law or agreed to in writing, software
11
- * distributed under the License is distributed on an "AS IS" BASIS,
12
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
- * See the License for the specific language governing permissions and
14
- * limitations under the License.
15
- */
16
- import * as common from "@esri/solution-common";
17
- import * as dashboard from "../dashboard";
18
- import * as notebook from "../notebook";
19
- import * as oic from "../oic";
20
- import * as quickcapture from "../quickcapture";
21
- import * as webmap from "../webmap";
22
- import * as webmappingapplication from "../webmappingapplication";
23
- import * as workforce from "../workforce";
24
- /**
25
- * Converts an item into a template.
26
- *
27
- * @param solutionItemId The solution to contain the template
28
- * @param itemInfo Info about the item
29
- * @param destAuthentication Credentials for requests to the destination organization
30
- * @param srcAuthentication Credentials for requests to source items
31
- * @param templateDictionary Hash of facts: folder id, org URL, adlib replacements
32
- *
33
- * @returns A promise that will resolve when the template has been created
34
- */
35
- export function convertItemToTemplate(solutionItemId, itemInfo, destAuthentication, srcAuthentication, templateDictionary) {
36
- return new Promise((resolve, reject) => {
37
- // Init template
38
- const itemTemplate = common.createInitializedItemTemplate(itemInfo);
39
- // Templatize item info property values
40
- itemTemplate.item.id = common.templatizeTerm(itemTemplate.item.id, itemTemplate.item.id, ".itemId");
41
- // Request related items
42
- const relatedPromise = common.getItemRelatedItemsInSameDirection(itemTemplate.itemId, "forward", srcAuthentication);
43
- // Perform type-specific handling
44
- let dataPromise = Promise.resolve({});
45
- let resourcesPromise = Promise.resolve([]);
46
- switch (itemInfo.type) {
47
- case "Dashboard":
48
- case "Data Pipeline":
49
- case "Feature Collection":
50
- case "Feature Service":
51
- case "Hub Initiative":
52
- case "Hub Page":
53
- case "Hub Site Application":
54
- case "Insights Model":
55
- case "Oriented Imagery Catalog":
56
- case "Project Package":
57
- case "Workforce Project":
58
- case "Web Map":
59
- case "Web Mapping Application":
60
- case "Web Scene":
61
- case "Notebook":
62
- dataPromise = new Promise(resolveJSON => {
63
- // eslint-disable-next-line @typescript-eslint/no-floating-promises
64
- common
65
- .getItemDataAsJson(itemTemplate.itemId, srcAuthentication)
66
- .then(json => resolveJSON(json));
67
- });
68
- break;
69
- case "Form":
70
- dataPromise = common.getItemDataAsFile(itemTemplate.itemId, itemTemplate.item.name, srcAuthentication);
71
- break;
72
- case "QuickCapture Project":
73
- dataPromise = new Promise(resolveJSON => {
74
- // eslint-disable-next-line @typescript-eslint/no-floating-promises
75
- common
76
- .getItemDataAsJson(itemTemplate.itemId, srcAuthentication)
77
- .then(json => resolveJSON(json));
78
- });
79
- resourcesPromise = common.getItemResourcesFiles(itemTemplate.itemId, srcAuthentication);
80
- break;
81
- }
82
- // Errors are handled as resolved empty values; this means that there's no `reject` clause to handle, hence:
83
- // eslint-disable-next-line @typescript-eslint/no-floating-promises
84
- Promise.all([dataPromise, relatedPromise, resourcesPromise]).then(responses => {
85
- const [itemDataResponse, relatedItemsResponse, resourcesResponse] = responses;
86
- // need to pre-process for velocity urls before they could be templatized by other processors
87
- itemTemplate.data = common.updateVelocityReferences(itemDataResponse, itemInfo.type, templateDictionary);
88
- const relationships = relatedItemsResponse;
89
- // Save the mappings to related items & add those items to the dependencies, but not WMA Code Attachments
90
- itemTemplate.dependencies = [];
91
- itemTemplate.relatedItems = [];
92
- relationships.forEach(relationship => {
93
- /* istanbul ignore else */
94
- if (relationship.relationshipType !== "WMA2Code") {
95
- itemTemplate.relatedItems.push(relationship);
96
- relationship.relatedItemIds.forEach(relatedItemId => {
97
- if (itemTemplate.dependencies.indexOf(relatedItemId) < 0) {
98
- itemTemplate.dependencies.push(relatedItemId);
99
- }
100
- });
101
- }
102
- });
103
- // Add QuickCapture basemap webmap references
104
- if (itemInfo.type === "QuickCapture Project") {
105
- const basemap = itemDataResponse?.application?.basemap;
106
- if (basemap?.type === "WebMap") {
107
- itemTemplate.dependencies.push(basemap.itemId);
108
- }
109
- itemTemplate.resources = resourcesResponse;
110
- }
111
- // Add Data Pipeline source and sink feature layers to dependencies
112
- else if (itemInfo.type === "Data Pipeline") {
113
- itemTemplate.dependencies = itemTemplate.dependencies.concat(_getDataPipelineSourcesAndSinks(itemDataResponse));
114
- }
115
- // Create the template
116
- let templateModifyingPromise = Promise.resolve(itemTemplate);
117
- switch (itemInfo.type) {
118
- case "Dashboard":
119
- dashboard.convertItemToTemplate(itemTemplate, templateDictionary);
120
- break;
121
- case "Form":
122
- // Store the form's data in the solution resources, not in template
123
- itemTemplate.data = null;
124
- // Add the form data to the template for a post-process resource upload
125
- if (itemDataResponse) {
126
- itemTemplate.item.name = _getFormDataFilename(itemTemplate.item.name, itemDataResponse.name, `${itemTemplate.itemId}.zip`);
127
- const storageName = common.convertItemResourceToStorageResource(itemTemplate.itemId, itemTemplate.item.name, common.SolutionTemplateFormatVersion, common.SolutionResourceType.data);
128
- // Add the data file to the template so that it can be uploaded with the other resources in the solution
129
- const dataFile = {
130
- itemId: itemTemplate.itemId,
131
- file: itemDataResponse,
132
- folder: storageName.folder,
133
- filename: itemTemplate.item.name
134
- };
135
- itemTemplate.dataFile = dataFile;
136
- // Update the template's resources
137
- itemTemplate.resources.push(storageName.folder + "/" + storageName.filename);
138
- }
139
- break;
140
- case "Notebook":
141
- notebook.convertNotebookToTemplate(itemTemplate);
142
- break;
143
- case "Oriented Imagery Catalog":
144
- templateModifyingPromise = oic.convertItemToTemplate(itemTemplate, destAuthentication, srcAuthentication);
145
- break;
146
- case "Vector Tile Service":
147
- case "Web Map":
148
- case "Web Scene":
149
- templateModifyingPromise = webmap.convertItemToTemplate(itemTemplate, destAuthentication, srcAuthentication, templateDictionary);
150
- break;
151
- case "Web Mapping Application":
152
- if (itemDataResponse) {
153
- templateModifyingPromise = webmappingapplication.convertItemToTemplate(itemTemplate, destAuthentication, srcAuthentication, templateDictionary);
154
- }
155
- break;
156
- case "Workforce Project":
157
- templateModifyingPromise = workforce.convertItemToTemplate(itemTemplate, destAuthentication, srcAuthentication, templateDictionary);
158
- break;
159
- case "QuickCapture Project":
160
- templateModifyingPromise = quickcapture.convertQuickCaptureToTemplate(itemTemplate);
161
- break;
162
- }
163
- templateModifyingPromise.then(resolve, err => reject(common.fail(err)));
164
- });
165
- });
166
- }
167
- /**
168
- * Extracts the feature layer ids for a Data Pipeline's sources and sinks.
169
- *
170
- * @param itemData Data Pipeline's data section
171
- * @return List of feature layer ids or an empty list if there are no sources or sinks in the pipeline
172
- */
173
- export function _getDataPipelineSourcesAndSinks(itemData) {
174
- const dependencies = [];
175
- const sourcesAndSinks = (itemData?.inputs ?? []).concat(itemData?.outputs ?? []);
176
- sourcesAndSinks.forEach(sourceOrSink => {
177
- if (sourceOrSink.type === "FeatureServiceSource" || sourceOrSink.type === "FeatureServiceSink") {
178
- const featureServiceId = common.getProp(sourceOrSink, "parameters.layer.value.itemId");
179
- if (featureServiceId) {
180
- dependencies.push(featureServiceId);
181
- }
182
- }
183
- });
184
- return dependencies;
185
- }
186
- /**
187
- * Encapsulates the rules for naming a form's data file.
188
- * Chooses the first parameter that's defined and is not the string "undefined".
189
- *
190
- * @param itemName Template's item name
191
- * @param dataFilename The data file name
192
- * @param itemIdAsName A name constructed from the template's id suffixed with ".zip"
193
- *
194
- * @return A name for the data file
195
- */
196
- export function _getFormDataFilename(itemName, dataFilename, itemIdAsName) {
197
- const originalFilename = itemName || dataFilename;
198
- const filename = originalFilename && originalFilename !== "undefined"
199
- ? originalFilename
200
- : itemIdAsName;
201
- return filename;
202
- }
1
+ /** @license
2
+ * Copyright 2020 Esri
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+ import * as common from "@esri/solution-common";
17
+ import * as dashboard from "../dashboard";
18
+ import * as notebook from "../notebook";
19
+ import * as oic from "../oic";
20
+ import * as quickcapture from "../quickcapture";
21
+ import * as webmap from "../webmap";
22
+ import * as webmappingapplication from "../webmappingapplication";
23
+ import * as workforce from "../workforce";
24
+ /**
25
+ * Converts an item into a template.
26
+ *
27
+ * @param solutionItemId The solution to contain the template
28
+ * @param itemInfo Info about the item
29
+ * @param destAuthentication Credentials for requests to the destination organization
30
+ * @param srcAuthentication Credentials for requests to source items
31
+ * @param templateDictionary Hash of facts: folder id, org URL, adlib replacements
32
+ *
33
+ * @returns A promise that will resolve when the template has been created
34
+ */
35
+ export function convertItemToTemplate(solutionItemId, itemInfo, destAuthentication, srcAuthentication, templateDictionary) {
36
+ return new Promise((resolve, reject) => {
37
+ // Init template
38
+ const itemTemplate = common.createInitializedItemTemplate(itemInfo);
39
+ // Templatize item info property values
40
+ itemTemplate.item.id = common.templatizeTerm(itemTemplate.item.id, itemTemplate.item.id, ".itemId");
41
+ // Request related items
42
+ const relatedPromise = common.getItemRelatedItemsInSameDirection(itemTemplate.itemId, "forward", srcAuthentication);
43
+ // Perform type-specific handling
44
+ let dataPromise = Promise.resolve({});
45
+ let resourcesPromise = Promise.resolve([]);
46
+ switch (itemInfo.type) {
47
+ case "Dashboard":
48
+ case "Data Pipeline":
49
+ case "Feature Collection":
50
+ case "Feature Service":
51
+ case "Hub Initiative":
52
+ case "Hub Page":
53
+ case "Hub Site Application":
54
+ case "Insights Model":
55
+ case "Oriented Imagery Catalog":
56
+ case "Project Package":
57
+ case "Workforce Project":
58
+ case "Web Map":
59
+ case "Web Mapping Application":
60
+ case "Web Scene":
61
+ case "Notebook":
62
+ dataPromise = new Promise(resolveJSON => {
63
+ // eslint-disable-next-line @typescript-eslint/no-floating-promises
64
+ common
65
+ .getItemDataAsJson(itemTemplate.itemId, srcAuthentication)
66
+ .then(json => resolveJSON(json));
67
+ });
68
+ break;
69
+ case "Form":
70
+ dataPromise = common.getItemDataAsFile(itemTemplate.itemId, itemTemplate.item.name, srcAuthentication);
71
+ break;
72
+ case "QuickCapture Project":
73
+ // Fetch all of the resources to get the config
74
+ resourcesPromise = common.getItemResourcesFiles(itemTemplate.itemId, srcAuthentication);
75
+ break;
76
+ }
77
+ // Errors are handled as resolved empty values; this means that there's no `reject` clause to handle, hence:
78
+ // eslint-disable-next-line @typescript-eslint/no-floating-promises
79
+ Promise.all([dataPromise, relatedPromise, resourcesPromise]).then(responses => {
80
+ const [itemDataResponse, relatedItemsResponse, resourcesResponse] = responses;
81
+ // need to pre-process for velocity urls before they could be templatized by other processors
82
+ itemTemplate.data = common.updateVelocityReferences(itemDataResponse, itemInfo.type, templateDictionary);
83
+ const relationships = relatedItemsResponse;
84
+ // Save the mappings to related items & add those items to the dependencies, but not WMA Code Attachments
85
+ itemTemplate.dependencies = [];
86
+ itemTemplate.relatedItems = [];
87
+ relationships.forEach(relationship => {
88
+ /* istanbul ignore else */
89
+ if (relationship.relationshipType !== "WMA2Code") {
90
+ itemTemplate.relatedItems.push(relationship);
91
+ relationship.relatedItemIds.forEach(relatedItemId => {
92
+ if (itemTemplate.dependencies.indexOf(relatedItemId) < 0) {
93
+ itemTemplate.dependencies.push(relatedItemId);
94
+ }
95
+ });
96
+ }
97
+ });
98
+ // Add Data Pipeline source and sink feature layers to dependencies
99
+ if (itemInfo.type === "Data Pipeline") {
100
+ itemTemplate.dependencies = itemTemplate.dependencies.concat(_getDataPipelineSourcesAndSinks(itemDataResponse));
101
+ }
102
+ // Create the template
103
+ let templateModifyingPromise = Promise.resolve(itemTemplate);
104
+ switch (itemInfo.type) {
105
+ case "Dashboard":
106
+ dashboard.convertItemToTemplate(itemTemplate, templateDictionary);
107
+ break;
108
+ case "Form":
109
+ // Store the form's data in the solution resources, not in template
110
+ itemTemplate.data = null;
111
+ // Add the form data to the template for a post-process resource upload
112
+ if (itemDataResponse) {
113
+ itemTemplate.item.name = _getFormDataFilename(itemTemplate.item.name, itemDataResponse.name, `${itemTemplate.itemId}.zip`);
114
+ const storageName = common.convertItemResourceToStorageResource(itemTemplate.itemId, itemTemplate.item.name, common.SolutionTemplateFormatVersion, common.SolutionResourceType.data);
115
+ // Add the data file to the template so that it can be uploaded with the other resources in the solution
116
+ const dataFile = {
117
+ itemId: itemTemplate.itemId,
118
+ file: itemDataResponse,
119
+ folder: storageName.folder,
120
+ filename: itemTemplate.item.name
121
+ };
122
+ itemTemplate.dataFile = dataFile;
123
+ // Update the template's resources
124
+ itemTemplate.resources.push(storageName.folder + "/" + storageName.filename);
125
+ }
126
+ break;
127
+ case "Notebook":
128
+ notebook.convertNotebookToTemplate(itemTemplate);
129
+ break;
130
+ case "Oriented Imagery Catalog":
131
+ templateModifyingPromise = oic.convertItemToTemplate(itemTemplate, destAuthentication, srcAuthentication);
132
+ break;
133
+ case "QuickCapture Project":
134
+ // Save all of the resources that we've fetched so as to not fetch them again
135
+ itemTemplate.resources = resourcesResponse;
136
+ // Get the QC config
137
+ templateModifyingPromise = new Promise(
138
+ // eslint-disable-next-line @typescript-eslint/no-misused-promises, no-async-promise-executor
139
+ async (qcResolve) => {
140
+ // Remove the qc.project.json file from the list of resources
141
+ let qcProjectFile = null;
142
+ let iQcProjectFile = -1;
143
+ if (resourcesResponse) {
144
+ resourcesResponse.some((file, i) => {
145
+ const haveConfigFile = file.name === "qc.project.json";
146
+ if (haveConfigFile) {
147
+ qcProjectFile = file;
148
+ iQcProjectFile = i;
149
+ }
150
+ return haveConfigFile;
151
+ });
152
+ // Discard the qc.project.json file
153
+ if (iQcProjectFile >= 0) {
154
+ resourcesResponse.splice(iQcProjectFile, 1);
155
+ }
156
+ }
157
+ // Copy the qc.project.json file into the data section
158
+ if (qcProjectFile) {
159
+ itemTemplate.data = {
160
+ application: {
161
+ ...await common.blobToJson(qcProjectFile),
162
+ },
163
+ name: "qc.project.json"
164
+ };
165
+ }
166
+ // Save the basemap dependency
167
+ if (itemTemplate.data.application?.basemap?.type === "Web Map") {
168
+ itemTemplate.dependencies.push(itemTemplate.data.application.basemap.itemId);
169
+ }
170
+ // Create the template
171
+ const updatedTemplate = quickcapture.convertQuickCaptureToTemplate(itemTemplate);
172
+ qcResolve(updatedTemplate);
173
+ });
174
+ break;
175
+ case "Vector Tile Service":
176
+ case "Web Map":
177
+ case "Web Scene":
178
+ templateModifyingPromise = webmap.convertItemToTemplate(itemTemplate, destAuthentication, srcAuthentication, templateDictionary);
179
+ break;
180
+ case "Web Mapping Application":
181
+ if (itemDataResponse) {
182
+ templateModifyingPromise = webmappingapplication.convertItemToTemplate(itemTemplate, destAuthentication, srcAuthentication, templateDictionary);
183
+ }
184
+ break;
185
+ case "Workforce Project":
186
+ templateModifyingPromise = workforce.convertItemToTemplate(itemTemplate, destAuthentication, srcAuthentication, templateDictionary);
187
+ break;
188
+ }
189
+ templateModifyingPromise.then(resolve, err => reject(common.fail(err)));
190
+ });
191
+ });
192
+ }
193
+ /**
194
+ * Extracts the feature layer ids for a Data Pipeline's sources and sinks.
195
+ *
196
+ * @param itemData Data Pipeline's data section
197
+ * @return List of feature layer ids or an empty list if there are no sources or sinks in the pipeline
198
+ */
199
+ export function _getDataPipelineSourcesAndSinks(itemData) {
200
+ const dependencies = [];
201
+ const sourcesAndSinks = (itemData?.inputs ?? []).concat(itemData?.outputs ?? []);
202
+ sourcesAndSinks.forEach(sourceOrSink => {
203
+ if (sourceOrSink.type === "FeatureServiceSource" || sourceOrSink.type === "FeatureServiceSink") {
204
+ const featureServiceId = common.getProp(sourceOrSink, "parameters.layer.value.itemId");
205
+ if (featureServiceId) {
206
+ dependencies.push(featureServiceId);
207
+ }
208
+ }
209
+ });
210
+ return dependencies;
211
+ }
212
+ /**
213
+ * Encapsulates the rules for naming a form's data file.
214
+ * Chooses the first parameter that's defined and is not the string "undefined".
215
+ *
216
+ * @param itemName Template's item name
217
+ * @param dataFilename The data file name
218
+ * @param itemIdAsName A name constructed from the template's id suffixed with ".zip"
219
+ *
220
+ * @return A name for the data file
221
+ */
222
+ export function _getFormDataFilename(itemName, dataFilename, itemIdAsName) {
223
+ const originalFilename = itemName || dataFilename;
224
+ const filename = originalFilename && originalFilename !== "undefined"
225
+ ? originalFilename
226
+ : itemIdAsName;
227
+ return filename;
228
+ }
203
229
  //# sourceMappingURL=convert-item-to-template.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"convert-item-to-template.js","sourceRoot":"","sources":["../../../src/helpers/convert-item-to-template.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,KAAK,MAAM,MAAM,uBAAuB,CAAC;AAChD,OAAO,KAAK,SAAS,MAAM,cAAc,CAAC;AAC1C,OAAO,KAAK,QAAQ,MAAM,aAAa,CAAC;AACxC,OAAO,KAAK,GAAG,MAAM,QAAQ,CAAC;AAC9B,OAAO,KAAK,YAAY,MAAM,iBAAiB,CAAC;AAChD,OAAO,KAAK,MAAM,MAAM,WAAW,CAAC;AACpC,OAAO,KAAK,qBAAqB,MAAM,0BAA0B,CAAC;AAClE,OAAO,KAAK,SAAS,MAAM,cAAc,CAAC;AAE1C;;;;;;;;;;GAUG;AACH,MAAM,UAAU,qBAAqB,CACnC,cAAsB,EACtB,QAAa,EACb,kBAAsC,EACtC,iBAAqC,EACrC,kBAAuB;IAEvB,OAAO,IAAI,OAAO,CAAuB,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE;QAC3D,gBAAgB;QAChB,MAAM,YAAY,GAAyB,MAAM,CAAC,6BAA6B,CAC7E,QAAQ,CACT,CAAC;QAEF,uCAAuC;QACvC,YAAY,CAAC,IAAI,CAAC,EAAE,GAAG,MAAM,CAAC,cAAc,CAC1C,YAAY,CAAC,IAAI,CAAC,EAAE,EACpB,YAAY,CAAC,IAAI,CAAC,EAAE,EACpB,SAAS,CACV,CAAC;QAEF,wBAAwB;QACxB,MAAM,cAAc,GAAG,MAAM,CAAC,kCAAkC,CAC9D,YAAY,CAAC,MAAM,EACnB,SAAS,EACT,iBAAiB,CAClB,CAAC;QAEF,iCAAiC;QACjC,IAAI,WAAW,GAAG,OAAO,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC;QACtC,IAAI,gBAAgB,GAAG,OAAO,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC;QAC3C,QAAQ,QAAQ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O,IAAI,EAAE,CAAC,CAAC;IAEjF,eAAe,CAAC,OAAO,CACrB,YAAY,CAAC,EAAE;QACb,IAAI,YAAY,CAAC,IAAI,KAAK,sBAAsB,IAAI,YAAY,CAAC,IAAI,KAAK,oBAAoB,EAAE;YAC9F,MAAM,gBAAgB,GAAG,MAAM,CAAC,OAAO,CAAC,YAAY,EAAE,+BAA+B,CAAC,CAAA;YACtF,IAAI,gBAAgB,EAAE;gBACpB,YAAY,CAAC,IAAI,CAAC,gBAAgB,CAAC,CAAC;aACrC;SACF;IACH,CAAC,CACF,CAAC;IAEF,OAAO,YAAY,CAAC;AACtB,CAAC;AAED;;;;;;;;;GASG;AACH,MAAM,UAAU,oBAAoB,CAClC,QAAgB,EAChB,YAAoB,EACpB,YAAoB;IAEpB,MAAM,gBAAgB,GAAG,QAAQ,IAAI,YAAY,CAAC;IAClD,MAAM,QAAQ,GACZ,gBAAgB,IAAI,gBAAgB,KAAK,WAAW;QAClD,CAAC,CAAC,gBAAgB;QAClB,CAAC,CAAC,YAAY,CAAC;IACnB,OAAO,QAAQ,CAAC;AAClB,CAAC"}
1
+ {"version":3,"file":"convert-item-to-template.js","sourceRoot":"","sources":["../../../src/helpers/convert-item-to-template.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,KAAK,MAAM,MAAM,uBAAuB,CAAC;AAChD,OAAO,KAAK,SAAS,MAAM,cAAc,CAAC;AAC1C,OAAO,KAAK,QAAQ,MAAM,aAAa,CAAC;AACxC,OAAO,KAAK,GAAG,MAAM,QAAQ,CAAC;AAC9B,OAAO,KAAK,YAAY,MAAM,iBAAiB,CAAC;AAChD,OAAO,KAAK,MAAM,MAAM,WAAW,CAAC;AACpC,OAAO,KAAK,qBAAqB,MAAM,0BAA0B,CAAC;AAClE,OAAO,KAAK,SAAS,MAAM,cAAc,CAAC;AAE1C;;;;;;;;;;GAUG;AACH,MAAM,UAAU,qBAAqB,CACnC,cAAsB,EACtB,QAAa,EACb,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C,QAAQ,EAAE,MAAM,IAAI,EAAE,CAAC,CAAC,MAAM,CAAC,QAAQ,EAAE,OAAO,IAAI,EAAE,CAAC,CAAC;IAEjF,eAAe,CAAC,OAAO,CACrB,YAAY,CAAC,EAAE;QACb,IAAI,YAAY,CAAC,IAAI,KAAK,sBAAsB,IAAI,YAAY,CAAC,IAAI,KAAK,oBAAoB,EAAE;YAC9F,MAAM,gBAAgB,GAAG,MAAM,CAAC,OAAO,CAAC,YAAY,EAAE,+BAA+B,CAAC,CAAA;YACtF,IAAI,gBAAgB,EAAE;gBACpB,YAAY,CAAC,IAAI,CAAC,gBAAgB,CAAC,CAAC;aACrC;SACF;IACH,CAAC,CACF,CAAC;IAEF,OAAO,YAAY,CAAC;AACtB,CAAC;AAED;;;;;;;;;GASG;AACH,MAAM,UAAU,oBAAoB,CAClC,QAAgB,EAChB,YAAoB,EACpB,YAAoB;IAEpB,MAAM,gBAAgB,GAAG,QAAQ,IAAI,YAAY,CAAC;IAClD,MAAM,QAAQ,GACZ,gBAAgB,IAAI,gBAAgB,KAAK,WAAW;QAClD,CAAC,CAAC,gBAAgB;QAClB,CAAC,CAAC,YAAY,CAAC;IACnB,OAAO,QAAQ,CAAC;AAClB,CAAC"}
@@ -1,17 +1,17 @@
1
- /** @license
2
- * Copyright 2020 Esri
3
- *
4
- * Licensed under the Apache License, Version 2.0 (the "License");
5
- * you may not use this file except in compliance with the License.
6
- * You may obtain a copy of the License at
7
- *
8
- * http://www.apache.org/licenses/LICENSE-2.0
9
- *
10
- * Unless required by applicable law or agreed to in writing, software
11
- * distributed under the License is distributed on an "AS IS" BASIS,
12
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
- * See the License for the specific language governing permissions and
14
- * limitations under the License.
15
- */
16
- import * as common from "@esri/solution-common";
17
- export declare function createItemFromTemplate(template: common.IItemTemplate, templateDictionary: any, destinationAuthentication: common.UserSession, itemProgressCallback: common.IItemProgressCallback): Promise<common.ICreateItemFromTemplateResponse>;
1
+ /** @license
2
+ * Copyright 2020 Esri
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+ import * as common from "@esri/solution-common";
17
+ export declare function createItemFromTemplate(template: common.IItemTemplate, templateDictionary: any, destinationAuthentication: common.UserSession, itemProgressCallback: common.IItemProgressCallback): Promise<common.ICreateItemFromTemplateResponse>;