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