@esri/solution-group 6.0.5-alpha.0 → 6.1.0-alpha.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@esri/solution-group",
3
- "version": "6.0.5-alpha.0",
3
+ "version": "6.1.0-alpha.0",
4
4
  "description": "Manages the creation and deployment of group item types for @esri/solution.js.",
5
5
  "main": "dist/cjs/index.js",
6
6
  "module": "dist/esm/index.js",
@@ -22,7 +22,7 @@
22
22
  "npm-check-updates": "^17.1.0"
23
23
  },
24
24
  "dependencies": {
25
- "@esri/solution-common": "^6.0.5-alpha.0",
25
+ "@esri/solution-common": "^6.1.0-alpha.0",
26
26
  "tslib": "1.14.1"
27
27
  },
28
28
  "scripts": {
@@ -76,5 +76,5 @@
76
76
  "esri",
77
77
  "ES6"
78
78
  ],
79
- "gitHead": "fbecb9f8977e44ba6254f9b68b43292b3ab525ae"
79
+ "gitHead": "19cbc20f4da03baa4676b3fad82abcea533432c3"
80
80
  }
@@ -1,45 +0,0 @@
1
- /** @license
2
- * Copyright 2019 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
- /**
17
- * Manages the creation and deployment of groups.
18
- *
19
- * @module group
20
- */
21
- import * as common from "@esri/solution-common";
22
- /**
23
- * Converts a group item into a template.
24
- *
25
- * @param itemInfo Info about the item
26
- * @param destAuthentication Credentials for requests to the destination organization
27
- * @param srcAuthentication Credentials for requests to source items
28
- * @returns A promise that will resolve when the template has been created
29
- */
30
- export declare function convertItemToTemplate(itemInfo: any, destAuthentication: common.UserSession, srcAuthentication: common.UserSession): Promise<common.IItemTemplate>;
31
- export declare function createItemFromTemplate(template: common.IItemTemplate, templateDictionary: any, destinationAuthentication: common.UserSession, itemProgressCallback: common.IItemProgressCallback): Promise<common.ICreateItemFromTemplateResponse>;
32
- /**
33
- * Group post-processing actions
34
- *
35
- * @param {string} id The item ID
36
- * @param {string} type The template type
37
- * @param {any[]} itemInfos Array of \{id: 'ef3', type: 'Web Map'\} objects
38
- * @param {common.IItemTemplate} template The original template
39
- * @param {common.IItemTemplate[]} templates The original templates
40
- * @param {any} templateDictionary The template dictionary
41
- * @param {UserSession} authentication The destination session info
42
- * @returns Promise resolving to successfulness of update
43
- */
44
- export declare function postProcess(id: string, type: string, itemInfos: any[], template: common.IItemTemplate, templates: common.IItemTemplate[], templateDictionary: any, authentication: any): Promise<any>;
45
- export declare function _initializeNewGroup(sourceGroup: common.IItemGeneralized): common.IGroupAdd;
package/dist/cjs/group.js DELETED
@@ -1,232 +0,0 @@
1
- "use strict";
2
- /** @license
3
- * Copyright 2019 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._initializeNewGroup = exports.postProcess = exports.createItemFromTemplate = exports.convertItemToTemplate = void 0;
19
- const tslib_1 = require("tslib");
20
- /**
21
- * Manages the creation and deployment of groups.
22
- *
23
- * @module group
24
- */
25
- const common = tslib_1.__importStar(require("@esri/solution-common"));
26
- // ------------------------------------------------------------------------------------------------------------------ //
27
- /**
28
- * Converts a group item into a template.
29
- *
30
- * @param itemInfo Info about the item
31
- * @param destAuthentication Credentials for requests to the destination organization
32
- * @param srcAuthentication Credentials for requests to source items
33
- * @returns A promise that will resolve when the template has been created
34
- */
35
- function convertItemToTemplate(itemInfo, destAuthentication, srcAuthentication) {
36
- return new Promise((resolve) => {
37
- // Init template
38
- const itemTemplate = common.createInitializedGroupTemplate(itemInfo);
39
- // Templatize item info property values
40
- itemTemplate.item.id = common.templatizeTerm(itemTemplate.item.id, itemTemplate.item.id, ".itemId");
41
- // Get the group's items--its dependencies
42
- common.getGroupContents(itemInfo.id, srcAuthentication).then((groupContents) => {
43
- itemTemplate.type = "Group";
44
- common.getGroupBase(itemInfo.id, srcAuthentication).then((groupResponse) => {
45
- groupResponse.id = itemTemplate.item.id;
46
- itemTemplate.item = {
47
- ...groupResponse,
48
- type: "Group",
49
- };
50
- // Does the group contain groups?
51
- itemTemplate.dependencies = groupContents.concat(common.getSubgroupIds(groupResponse.tags));
52
- resolve(itemTemplate);
53
- }, () => resolve(itemTemplate));
54
- }, () => resolve(itemTemplate));
55
- });
56
- }
57
- exports.convertItemToTemplate = convertItemToTemplate;
58
- function createItemFromTemplate(template, templateDictionary, destinationAuthentication, itemProgressCallback) {
59
- return new Promise((resolve) => {
60
- // Interrupt process if progress callback returns `false`
61
- if (!itemProgressCallback(template.itemId, common.EItemProgressStatus.Started, 0)) {
62
- itemProgressCallback(template.itemId, common.EItemProgressStatus.Ignored, 0);
63
- resolve(common.generateEmptyCreationResponse(template.type));
64
- return;
65
- }
66
- // Replace the templatized symbols in a copy of the template
67
- let newItemTemplate = common.cloneObject(template);
68
- newItemTemplate = common.replaceInTemplate(newItemTemplate, templateDictionary);
69
- // Need to manually reset thumbnail because adlib in replaceInTemplate breaks it
70
- newItemTemplate.item.thumbnail = template.item.thumbnail;
71
- // Set up properties needed to create group
72
- const newGroup = _initializeNewGroup(newItemTemplate.item);
73
- // Create a group, appending a sequential suffix to its name if the group exists, e.g.,
74
- // * Manage Right of Way Activities
75
- // * Manage Right of Way Activities 1
76
- // * Manage Right of Way Activities 2
77
- common
78
- .createUniqueGroup(newGroup.title, newGroup, templateDictionary, destinationAuthentication, common.isTrackingViewGroup(newItemTemplate) ? templateDictionary.locationTracking.owner : undefined)
79
- .then((createResponse) => {
80
- if (createResponse.success) {
81
- // Interrupt process if progress callback returns `false`
82
- if (!itemProgressCallback(template.itemId, common.EItemProgressStatus.Created, template.estimatedDeploymentCostFactor / 2, createResponse.group.id)) {
83
- itemProgressCallback(template.itemId, common.EItemProgressStatus.Cancelled, 0);
84
- // eslint-disable-next-line @typescript-eslint/no-floating-promises
85
- common.removeGroup(createResponse.group.id, destinationAuthentication).then(() => resolve(common.generateEmptyCreationResponse(template.type)), () => resolve(common.generateEmptyCreationResponse(template.type)));
86
- }
87
- else {
88
- newItemTemplate.itemId = createResponse.group.id;
89
- templateDictionary[template.itemId] = {
90
- itemId: createResponse.group.id,
91
- };
92
- // Update the template again now that we have the new item id
93
- newItemTemplate = common.replaceInTemplate(newItemTemplate, templateDictionary);
94
- // Update the template dictionary with the new id
95
- templateDictionary[template.itemId].itemId = createResponse.group.id;
96
- // Interrupt process if progress callback returns `false`
97
- if (!itemProgressCallback(template.itemId, common.EItemProgressStatus.Finished, template.estimatedDeploymentCostFactor / 2, createResponse.group.id)) {
98
- itemProgressCallback(template.itemId, common.EItemProgressStatus.Cancelled, 0);
99
- // eslint-disable-next-line @typescript-eslint/no-floating-promises
100
- common.removeGroup(createResponse.group.id, destinationAuthentication).then(() => resolve(common.generateEmptyCreationResponse(template.type)), () => resolve(common.generateEmptyCreationResponse(template.type)));
101
- }
102
- else {
103
- if (common.isTrackingViewGroup(newItemTemplate)) {
104
- const owner = templateDictionary.locationTracking.owner;
105
- // eslint-disable-next-line @typescript-eslint/no-floating-promises
106
- common
107
- .reassignGroup(createResponse.group.id, owner, destinationAuthentication)
108
- .then((assignResults) => {
109
- if (assignResults.success) {
110
- if (!itemProgressCallback(template.itemId, common.EItemProgressStatus.Created, template.estimatedDeploymentCostFactor / 2, createResponse.group.id)) {
111
- itemProgressCallback(template.itemId, common.EItemProgressStatus.Cancelled, 0);
112
- // eslint-disable-next-line @typescript-eslint/no-floating-promises
113
- common.removeGroup(createResponse.group.id, destinationAuthentication).then(() => resolve(common.generateEmptyCreationResponse(template.type)), () => resolve(common.generateEmptyCreationResponse(template.type)));
114
- }
115
- else {
116
- // eslint-disable-next-line @typescript-eslint/no-floating-promises
117
- common
118
- .removeUsers(createResponse.group.id, [destinationAuthentication.username], destinationAuthentication)
119
- .then((removeResults) => {
120
- if (Array.isArray(removeResults.notRemoved) && removeResults.notRemoved.length === 0) {
121
- if (!itemProgressCallback(template.itemId, common.EItemProgressStatus.Created, template.estimatedDeploymentCostFactor / 2, createResponse.group.id)) {
122
- itemProgressCallback(template.itemId, common.EItemProgressStatus.Cancelled, 0);
123
- // eslint-disable-next-line @typescript-eslint/no-floating-promises
124
- common.removeGroup(createResponse.group.id, destinationAuthentication).then(() => resolve(common.generateEmptyCreationResponse(template.type)), () => resolve(common.generateEmptyCreationResponse(template.type)));
125
- }
126
- else {
127
- resolve({
128
- item: newItemTemplate,
129
- id: createResponse.group.id,
130
- type: newItemTemplate.type,
131
- postProcess: common.hasUnresolvedVariables(newItemTemplate),
132
- });
133
- }
134
- }
135
- else {
136
- itemProgressCallback(template.itemId, common.EItemProgressStatus.Failed, 0);
137
- resolve(common.generateEmptyCreationResponse(template.type)); // fails to create item
138
- }
139
- });
140
- }
141
- }
142
- else {
143
- itemProgressCallback(template.itemId, common.EItemProgressStatus.Failed, 0);
144
- resolve(common.generateEmptyCreationResponse(template.type)); // fails to create item
145
- }
146
- });
147
- }
148
- else {
149
- resolve({
150
- item: newItemTemplate,
151
- id: createResponse.group.id,
152
- type: newItemTemplate.type,
153
- postProcess: common.hasUnresolvedVariables(newItemTemplate),
154
- });
155
- }
156
- }
157
- }
158
- }
159
- else {
160
- itemProgressCallback(template.itemId, common.EItemProgressStatus.Failed, 0);
161
- resolve(common.generateEmptyCreationResponse(template.type)); // fails to create item
162
- }
163
- }, () => {
164
- itemProgressCallback(template.itemId, common.EItemProgressStatus.Failed, 0);
165
- resolve(common.generateEmptyCreationResponse(template.type)); // fails to create item
166
- });
167
- });
168
- }
169
- exports.createItemFromTemplate = createItemFromTemplate;
170
- /**
171
- * Group post-processing actions
172
- *
173
- * @param {string} id The item ID
174
- * @param {string} type The template type
175
- * @param {any[]} itemInfos Array of \{id: 'ef3', type: 'Web Map'\} objects
176
- * @param {common.IItemTemplate} template The original template
177
- * @param {common.IItemTemplate[]} templates The original templates
178
- * @param {any} templateDictionary The template dictionary
179
- * @param {UserSession} authentication The destination session info
180
- * @returns Promise resolving to successfulness of update
181
- */
182
- function postProcess(id, type, itemInfos, template, templates, templateDictionary, authentication) {
183
- let promise = Promise.resolve({ success: true });
184
- itemInfos.some((t) => {
185
- /* istanbul ignore else */
186
- if (t.id === id) {
187
- let group = t.item.item;
188
- /* istanbul ignore else */
189
- if (common.hasUnresolvedVariables(group)) {
190
- group = common.replaceInTemplate(group, templateDictionary);
191
- // update the group
192
- promise = common.updateGroup(group, authentication);
193
- }
194
- return true;
195
- }
196
- });
197
- return promise;
198
- }
199
- exports.postProcess = postProcess;
200
- function _initializeNewGroup(sourceGroup) {
201
- // Set up properties needed to create group
202
- const newGroup = {
203
- access: "private",
204
- description: sourceGroup.description,
205
- owner: sourceGroup.owner,
206
- snippet: sourceGroup.snippet,
207
- tags: sourceGroup.tags,
208
- thumbnail: sourceGroup.thumbnail,
209
- title: sourceGroup.title || "",
210
- typeKeywords: sourceGroup.typeKeywords,
211
- };
212
- const props = [
213
- "autoJoin",
214
- "displaySettings",
215
- "isInvitationOnly",
216
- "isOpenData",
217
- "isViewOnly",
218
- "membershipAccess",
219
- "properties",
220
- "sortField",
221
- "sortOrder",
222
- ];
223
- props.forEach((p) => {
224
- /* istanbul ignore else */
225
- if (sourceGroup.hasOwnProperty(p)) {
226
- newGroup[p] = sourceGroup[p];
227
- }
228
- });
229
- return newGroup;
230
- }
231
- exports._initializeNewGroup = _initializeNewGroup;
232
- //# sourceMappingURL=group.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"group.js","sourceRoot":"","sources":["../../src/group.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;;AAEH;;;;GAIG;AAEH,sEAAgD;AAEhD,wHAAwH;AAExH;;;;;;;GAOG;AACH,SAAgB,qBAAqB,CACnC,QAAa,EACb,kBAAsC,EACtC,iBAAqC;IAErC,OAAO,IAAI,OAAO,CAAuB,CAAC,OAAO,EAAE,EAAE;QACnD,gBAAgB;QAChB,MAAM,YAAY,GAAyB,MAAM,CAAC,8BAA8B,CAAC,QAAQ,CAAC,CAAC;QAE3F,uCAAuC;QACvC,YAAY,CAAC,IAAI,CAAC,EAAE,GAAG,MAAM,CAAC,cAAc,CAAC,YAAY,CAAC,IAAI,CAAC,EAAE,EAAE,YAAY,CAAC,IAAI,CAAC,EAAE,EAAE,SAAS,CAAC,CAAC;QAEpG,0CAA0C;QAC1C,MAAM,CAAC,gBAAgB,CAAC,QAAQ,CAAC,EAAE,EAAE,iBAAiB,CAAC,CAAC,IAAI,CAC1D,CAAC,aAAa,EAAE,EAAE;YAChB,YAAY,CAAC,IAAI,GAAG,OAAO,CAAC;YAC5B,MAAM,CAAC,YAAY,CAAC,QAAQ,CAAC,EAAE,EAAE,iBAAiB,CAAC,CAAC,IAAI,CACtD,CAAC,aAAa,EAAE,EAAE;gBAChB,aAAa,CAAC,EAAE,GAAG,YAAY,CAAC,IAAI,CAAC,EAAE,CAAC;gBACxC,YAAY,CAAC,IAAI,GAAG;oBAClB,GAAG,aAAa;oBAChB,IAAI,EAAE,OAAO;iBACd,CAAC;gBAEF,iCAAiC;gBACjC,YAAY,CAAC,YAAY,GAAG,aAAa,CAAC,MAAM,CAAC,MAAM,CAAC,cAAc,CAAC,aAAa,CAAC,IAAI,CAAC,CAAC,CAAC;gBAE5F,OAAO,CAAC,YAAY,CAAC,CAAC;YACxB,CAA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C;IAEF,MAAM,KAAK,GAAa;QACtB,UAAU;QACV,iBAAiB;QACjB,kBAAkB;QAClB,YAAY;QACZ,YAAY;QACZ,kBAAkB;QAClB,YAAY;QACZ,WAAW;QACX,WAAW;KACZ,CAAC;IACF,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,EAAE;QAClB,0BAA0B;QAC1B,IAAI,WAAW,CAAC,cAAc,CAAC,CAAC,CAAC,EAAE;YACjC,QAAQ,CAAC,CAAC,CAAC,GAAG,WAAW,CAAC,CAAC,CAAC,CAAC;SAC9B;IACH,CAAC,CAAC,CAAC;IAEH,OAAO,QAAQ,CAAC;AAClB,CAAC;AAhCD,kDAgCC"}
@@ -1,21 +0,0 @@
1
- /** @license
2
- * Copyright 2018 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
- /**
17
- * Manages the creation and deployment of simple item types.
18
- *
19
- * @module simple-types
20
- */
21
- export * from "./group";
package/dist/cjs/index.js DELETED
@@ -1,25 +0,0 @@
1
- "use strict";
2
- /** @license
3
- * Copyright 2018 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
- const tslib_1 = require("tslib");
19
- /**
20
- * Manages the creation and deployment of simple item types.
21
- *
22
- * @module simple-types
23
- */
24
- tslib_1.__exportStar(require("./group"), exports);
25
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;AAEH;;;;GAIG;AAEH,kDAAwB"}
@@ -1,45 +0,0 @@
1
- /** @license
2
- * Copyright 2019 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
- /**
17
- * Manages the creation and deployment of groups.
18
- *
19
- * @module group
20
- */
21
- import * as common from "@esri/solution-common";
22
- /**
23
- * Converts a group item into a template.
24
- *
25
- * @param itemInfo Info about the item
26
- * @param destAuthentication Credentials for requests to the destination organization
27
- * @param srcAuthentication Credentials for requests to source items
28
- * @returns A promise that will resolve when the template has been created
29
- */
30
- export declare function convertItemToTemplate(itemInfo: any, destAuthentication: common.UserSession, srcAuthentication: common.UserSession): Promise<common.IItemTemplate>;
31
- export declare function createItemFromTemplate(template: common.IItemTemplate, templateDictionary: any, destinationAuthentication: common.UserSession, itemProgressCallback: common.IItemProgressCallback): Promise<common.ICreateItemFromTemplateResponse>;
32
- /**
33
- * Group post-processing actions
34
- *
35
- * @param {string} id The item ID
36
- * @param {string} type The template type
37
- * @param {any[]} itemInfos Array of \{id: 'ef3', type: 'Web Map'\} objects
38
- * @param {common.IItemTemplate} template The original template
39
- * @param {common.IItemTemplate[]} templates The original templates
40
- * @param {any} templateDictionary The template dictionary
41
- * @param {UserSession} authentication The destination session info
42
- * @returns Promise resolving to successfulness of update
43
- */
44
- export declare function postProcess(id: string, type: string, itemInfos: any[], template: common.IItemTemplate, templates: common.IItemTemplate[], templateDictionary: any, authentication: any): Promise<any>;
45
- export declare function _initializeNewGroup(sourceGroup: common.IItemGeneralized): common.IGroupAdd;
package/dist/esm/group.js DELETED
@@ -1,224 +0,0 @@
1
- /** @license
2
- * Copyright 2019 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
- /**
17
- * Manages the creation and deployment of groups.
18
- *
19
- * @module group
20
- */
21
- import * as common from "@esri/solution-common";
22
- // ------------------------------------------------------------------------------------------------------------------ //
23
- /**
24
- * Converts a group item into a template.
25
- *
26
- * @param itemInfo Info about the item
27
- * @param destAuthentication Credentials for requests to the destination organization
28
- * @param srcAuthentication Credentials for requests to source items
29
- * @returns A promise that will resolve when the template has been created
30
- */
31
- export function convertItemToTemplate(itemInfo, destAuthentication, srcAuthentication) {
32
- return new Promise((resolve) => {
33
- // Init template
34
- const itemTemplate = common.createInitializedGroupTemplate(itemInfo);
35
- // Templatize item info property values
36
- itemTemplate.item.id = common.templatizeTerm(itemTemplate.item.id, itemTemplate.item.id, ".itemId");
37
- // Get the group's items--its dependencies
38
- common.getGroupContents(itemInfo.id, srcAuthentication).then((groupContents) => {
39
- itemTemplate.type = "Group";
40
- common.getGroupBase(itemInfo.id, srcAuthentication).then((groupResponse) => {
41
- groupResponse.id = itemTemplate.item.id;
42
- itemTemplate.item = {
43
- ...groupResponse,
44
- type: "Group",
45
- };
46
- // Does the group contain groups?
47
- itemTemplate.dependencies = groupContents.concat(common.getSubgroupIds(groupResponse.tags));
48
- resolve(itemTemplate);
49
- }, () => resolve(itemTemplate));
50
- }, () => resolve(itemTemplate));
51
- });
52
- }
53
- export function createItemFromTemplate(template, templateDictionary, destinationAuthentication, itemProgressCallback) {
54
- return new Promise((resolve) => {
55
- // Interrupt process if progress callback returns `false`
56
- if (!itemProgressCallback(template.itemId, common.EItemProgressStatus.Started, 0)) {
57
- itemProgressCallback(template.itemId, common.EItemProgressStatus.Ignored, 0);
58
- resolve(common.generateEmptyCreationResponse(template.type));
59
- return;
60
- }
61
- // Replace the templatized symbols in a copy of the template
62
- let newItemTemplate = common.cloneObject(template);
63
- newItemTemplate = common.replaceInTemplate(newItemTemplate, templateDictionary);
64
- // Need to manually reset thumbnail because adlib in replaceInTemplate breaks it
65
- newItemTemplate.item.thumbnail = template.item.thumbnail;
66
- // Set up properties needed to create group
67
- const newGroup = _initializeNewGroup(newItemTemplate.item);
68
- // Create a group, appending a sequential suffix to its name if the group exists, e.g.,
69
- // * Manage Right of Way Activities
70
- // * Manage Right of Way Activities 1
71
- // * Manage Right of Way Activities 2
72
- common
73
- .createUniqueGroup(newGroup.title, newGroup, templateDictionary, destinationAuthentication, common.isTrackingViewGroup(newItemTemplate) ? templateDictionary.locationTracking.owner : undefined)
74
- .then((createResponse) => {
75
- if (createResponse.success) {
76
- // Interrupt process if progress callback returns `false`
77
- if (!itemProgressCallback(template.itemId, common.EItemProgressStatus.Created, template.estimatedDeploymentCostFactor / 2, createResponse.group.id)) {
78
- itemProgressCallback(template.itemId, common.EItemProgressStatus.Cancelled, 0);
79
- // eslint-disable-next-line @typescript-eslint/no-floating-promises
80
- common.removeGroup(createResponse.group.id, destinationAuthentication).then(() => resolve(common.generateEmptyCreationResponse(template.type)), () => resolve(common.generateEmptyCreationResponse(template.type)));
81
- }
82
- else {
83
- newItemTemplate.itemId = createResponse.group.id;
84
- templateDictionary[template.itemId] = {
85
- itemId: createResponse.group.id,
86
- };
87
- // Update the template again now that we have the new item id
88
- newItemTemplate = common.replaceInTemplate(newItemTemplate, templateDictionary);
89
- // Update the template dictionary with the new id
90
- templateDictionary[template.itemId].itemId = createResponse.group.id;
91
- // Interrupt process if progress callback returns `false`
92
- if (!itemProgressCallback(template.itemId, common.EItemProgressStatus.Finished, template.estimatedDeploymentCostFactor / 2, createResponse.group.id)) {
93
- itemProgressCallback(template.itemId, common.EItemProgressStatus.Cancelled, 0);
94
- // eslint-disable-next-line @typescript-eslint/no-floating-promises
95
- common.removeGroup(createResponse.group.id, destinationAuthentication).then(() => resolve(common.generateEmptyCreationResponse(template.type)), () => resolve(common.generateEmptyCreationResponse(template.type)));
96
- }
97
- else {
98
- if (common.isTrackingViewGroup(newItemTemplate)) {
99
- const owner = templateDictionary.locationTracking.owner;
100
- // eslint-disable-next-line @typescript-eslint/no-floating-promises
101
- common
102
- .reassignGroup(createResponse.group.id, owner, destinationAuthentication)
103
- .then((assignResults) => {
104
- if (assignResults.success) {
105
- if (!itemProgressCallback(template.itemId, common.EItemProgressStatus.Created, template.estimatedDeploymentCostFactor / 2, createResponse.group.id)) {
106
- itemProgressCallback(template.itemId, common.EItemProgressStatus.Cancelled, 0);
107
- // eslint-disable-next-line @typescript-eslint/no-floating-promises
108
- common.removeGroup(createResponse.group.id, destinationAuthentication).then(() => resolve(common.generateEmptyCreationResponse(template.type)), () => resolve(common.generateEmptyCreationResponse(template.type)));
109
- }
110
- else {
111
- // eslint-disable-next-line @typescript-eslint/no-floating-promises
112
- common
113
- .removeUsers(createResponse.group.id, [destinationAuthentication.username], destinationAuthentication)
114
- .then((removeResults) => {
115
- if (Array.isArray(removeResults.notRemoved) && removeResults.notRemoved.length === 0) {
116
- if (!itemProgressCallback(template.itemId, common.EItemProgressStatus.Created, template.estimatedDeploymentCostFactor / 2, createResponse.group.id)) {
117
- itemProgressCallback(template.itemId, common.EItemProgressStatus.Cancelled, 0);
118
- // eslint-disable-next-line @typescript-eslint/no-floating-promises
119
- common.removeGroup(createResponse.group.id, destinationAuthentication).then(() => resolve(common.generateEmptyCreationResponse(template.type)), () => resolve(common.generateEmptyCreationResponse(template.type)));
120
- }
121
- else {
122
- resolve({
123
- item: newItemTemplate,
124
- id: createResponse.group.id,
125
- type: newItemTemplate.type,
126
- postProcess: common.hasUnresolvedVariables(newItemTemplate),
127
- });
128
- }
129
- }
130
- else {
131
- itemProgressCallback(template.itemId, common.EItemProgressStatus.Failed, 0);
132
- resolve(common.generateEmptyCreationResponse(template.type)); // fails to create item
133
- }
134
- });
135
- }
136
- }
137
- else {
138
- itemProgressCallback(template.itemId, common.EItemProgressStatus.Failed, 0);
139
- resolve(common.generateEmptyCreationResponse(template.type)); // fails to create item
140
- }
141
- });
142
- }
143
- else {
144
- resolve({
145
- item: newItemTemplate,
146
- id: createResponse.group.id,
147
- type: newItemTemplate.type,
148
- postProcess: common.hasUnresolvedVariables(newItemTemplate),
149
- });
150
- }
151
- }
152
- }
153
- }
154
- else {
155
- itemProgressCallback(template.itemId, common.EItemProgressStatus.Failed, 0);
156
- resolve(common.generateEmptyCreationResponse(template.type)); // fails to create item
157
- }
158
- }, () => {
159
- itemProgressCallback(template.itemId, common.EItemProgressStatus.Failed, 0);
160
- resolve(common.generateEmptyCreationResponse(template.type)); // fails to create item
161
- });
162
- });
163
- }
164
- /**
165
- * Group post-processing actions
166
- *
167
- * @param {string} id The item ID
168
- * @param {string} type The template type
169
- * @param {any[]} itemInfos Array of \{id: 'ef3', type: 'Web Map'\} objects
170
- * @param {common.IItemTemplate} template The original template
171
- * @param {common.IItemTemplate[]} templates The original templates
172
- * @param {any} templateDictionary The template dictionary
173
- * @param {UserSession} authentication The destination session info
174
- * @returns Promise resolving to successfulness of update
175
- */
176
- export function postProcess(id, type, itemInfos, template, templates, templateDictionary, authentication) {
177
- let promise = Promise.resolve({ success: true });
178
- itemInfos.some((t) => {
179
- /* istanbul ignore else */
180
- if (t.id === id) {
181
- let group = t.item.item;
182
- /* istanbul ignore else */
183
- if (common.hasUnresolvedVariables(group)) {
184
- group = common.replaceInTemplate(group, templateDictionary);
185
- // update the group
186
- promise = common.updateGroup(group, authentication);
187
- }
188
- return true;
189
- }
190
- });
191
- return promise;
192
- }
193
- export function _initializeNewGroup(sourceGroup) {
194
- // Set up properties needed to create group
195
- const newGroup = {
196
- access: "private",
197
- description: sourceGroup.description,
198
- owner: sourceGroup.owner,
199
- snippet: sourceGroup.snippet,
200
- tags: sourceGroup.tags,
201
- thumbnail: sourceGroup.thumbnail,
202
- title: sourceGroup.title || "",
203
- typeKeywords: sourceGroup.typeKeywords,
204
- };
205
- const props = [
206
- "autoJoin",
207
- "displaySettings",
208
- "isInvitationOnly",
209
- "isOpenData",
210
- "isViewOnly",
211
- "membershipAccess",
212
- "properties",
213
- "sortField",
214
- "sortOrder",
215
- ];
216
- props.forEach((p) => {
217
- /* istanbul ignore else */
218
- if (sourceGroup.hasOwnProperty(p)) {
219
- newGroup[p] = sourceGroup[p];
220
- }
221
- });
222
- return newGroup;
223
- }
224
- //# sourceMappingURL=group.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"group.js","sourceRoot":"","sources":["../../src/group.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH;;;;GAIG;AAEH,OAAO,KAAK,MAAM,MAAM,uBAAuB,CAAC;AAEhD,wHAAwH;AAExH;;;;;;;GAOG;AACH,MAAM,UAAU,qBAAqB,CACnC,QAAa,EACb,kBAAsC,EACtC,iBAAqC;IAErC,OAAO,IAAI,OAAO,CAAuB,CAAC,OAAO,EAAE,EAAE;QACnD,gBAAgB;QAChB,MAAM,YAAY,GAAyB,MAAM,CAAC,8BAA8B,CAAC,QAAQ,CAAC,CAAC;QAE3F,uCAAuC;QACvC,YAAY,CAAC,IAAI,CAAC,EAAE,GAAG,MAAM,CAAC,cAAc,CAAC,YAAY,CAAC,IAAI,CAAC,EAAE,EAAE,YAAY,CAAC,IAAI,CAAC,EAAE,EAAE,SAAS,CAAC,CAAC;QAEpG,0CAA0C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CAAC,CAAC;gBAC5D,mBAAmB;gBACnB,OAAO,GAAG,MAAM,CAAC,WAAW,CAAC,KAAK,EAAE,cAAc,CAAC,CAAC;aACrD;YACD,OAAO,IAAI,CAAC;SACb;IACH,CAAC,CAAC,CAAC;IACH,OAAO,OAAO,CAAC;AACjB,CAAC;AAED,MAAM,UAAU,mBAAmB,CAAC,WAAoC;IACtE,2CAA2C;IAC3C,MAAM,QAAQ,GAAqB;QACjC,MAAM,EAAE,SAAS;QACjB,WAAW,EAAE,WAAW,CAAC,WAAW;QACpC,KAAK,EAAE,WAAW,CAAC,KAAK;QACxB,OAAO,EAAE,WAAW,CAAC,OAAO;QAC5B,IAAI,EAAE,WAAW,CAAC,IAAI;QACtB,SAAS,EAAE,WAAW,CAAC,SAAS;QAChC,KAAK,EAAE,WAAW,CAAC,KAAK,IAAI,EAAE;QAC9B,YAAY,EAAE,WAAW,CAAC,YAAY;KACvC,CAAC;IAEF,MAAM,KAAK,GAAa;QACtB,UAAU;QACV,iBAAiB;QACjB,kBAAkB;QAClB,YAAY;QACZ,YAAY;QACZ,kBAAkB;QAClB,YAAY;QACZ,WAAW;QACX,WAAW;KACZ,CAAC;IACF,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,EAAE;QAClB,0BAA0B;QAC1B,IAAI,WAAW,CAAC,cAAc,CAAC,CAAC,CAAC,EAAE;YACjC,QAAQ,CAAC,CAAC,CAAC,GAAG,WAAW,CAAC,CAAC,CAAC,CAAC;SAC9B;IACH,CAAC,CAAC,CAAC;IAEH,OAAO,QAAQ,CAAC;AAClB,CAAC"}
@@ -1,21 +0,0 @@
1
- /** @license
2
- * Copyright 2018 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
- /**
17
- * Manages the creation and deployment of simple item types.
18
- *
19
- * @module simple-types
20
- */
21
- export * from "./group";
package/dist/esm/index.js DELETED
@@ -1,22 +0,0 @@
1
- /** @license
2
- * Copyright 2018 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
- /**
17
- * Manages the creation and deployment of simple item types.
18
- *
19
- * @module simple-types
20
- */
21
- export * from "./group";
22
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH;;;;GAIG;AAEH,cAAc,SAAS,CAAC"}