@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
package/dist/cjs/oic.d.ts CHANGED
@@ -1,53 +1,53 @@
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
- import * as common from "@esri/solution-common";
17
- /**
18
- * Converts an AGOL OIC (Oriented Imagery Catalog) item to a template.
19
- *
20
- * @param itemTemplate Template for the OIC (Oriented Imagery Catalog) item
21
- * @param destAuthentication Credentials for requests to the destination organization
22
- * @param srcAuthentication Credentials for requests to source items
23
- * @returns Template for the solution item that contains key details for item reconstruction
24
- */
25
- export declare function convertItemToTemplate(itemTemplate: common.IItemTemplate, destAuthentication: common.UserSession, srcAuthentication: common.UserSession): Promise<common.IItemTemplate>;
26
- /**
27
- * Gets the ids of the dependencies of an AGOL OIC (Oriented Imagery Catalog) item.
28
- *
29
- * @param itemTemplate A OIC (Oriented Imagery Catalog) item whose dependencies are sought
30
- * @param authentication Credentials for any requests
31
- * @returns List of dependencies ids and url/itemId hash
32
- * @private
33
- */
34
- export declare function _extractDependencies(itemTemplate: common.IItemTemplate, authentication: common.UserSession): Promise<any>;
35
- /**
36
- * Extracts the AGOL itemId for each layer in a list using the url.
37
- *
38
- * @param layerURLs List of OIC layer URLs
39
- * @param dependencies Current list of dependencies
40
- * @param authentication Credentials for any requests
41
- * @returns List of dependencies ids and url/itemId hash
42
- * @private
43
- */
44
- export declare function _getLayerIds(layerURLs: string[], dependencies: string[], authentication: common.UserSession): Promise<any>;
45
- /**
46
- * Templatizes the url and item id for a layer.
47
- *
48
- * @param layerURL OIC layer URL
49
- * @param urlHash Lookup object for analysis layers
50
- * @returns Templatized URL if layerURL is in the urlHash
51
- * @private
52
- */
53
- export declare function _templatizeOicLayerUrl(layerURL: string, urlHash: any): string;
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
+ import * as common from "@esri/solution-common";
17
+ /**
18
+ * Converts an AGOL OIC (Oriented Imagery Catalog) item to a template.
19
+ *
20
+ * @param itemTemplate Template for the OIC (Oriented Imagery Catalog) item
21
+ * @param destAuthentication Credentials for requests to the destination organization
22
+ * @param srcAuthentication Credentials for requests to source items
23
+ * @returns Template for the solution item that contains key details for item reconstruction
24
+ */
25
+ export declare function convertItemToTemplate(itemTemplate: common.IItemTemplate, destAuthentication: common.UserSession, srcAuthentication: common.UserSession): Promise<common.IItemTemplate>;
26
+ /**
27
+ * Gets the ids of the dependencies of an AGOL OIC (Oriented Imagery Catalog) item.
28
+ *
29
+ * @param itemTemplate A OIC (Oriented Imagery Catalog) item whose dependencies are sought
30
+ * @param authentication Credentials for any requests
31
+ * @returns List of dependencies ids and url/itemId hash
32
+ * @private
33
+ */
34
+ export declare function _extractDependencies(itemTemplate: common.IItemTemplate, authentication: common.UserSession): Promise<any>;
35
+ /**
36
+ * Extracts the AGOL itemId for each layer in a list using the url.
37
+ *
38
+ * @param layerURLs List of OIC layer URLs
39
+ * @param dependencies Current list of dependencies
40
+ * @param authentication Credentials for any requests
41
+ * @returns List of dependencies ids and url/itemId hash
42
+ * @private
43
+ */
44
+ export declare function _getLayerIds(layerURLs: string[], dependencies: string[], authentication: common.UserSession): Promise<any>;
45
+ /**
46
+ * Templatizes the url and item id for a layer.
47
+ *
48
+ * @param layerURL OIC layer URL
49
+ * @param urlHash Lookup object for analysis layers
50
+ * @returns Templatized URL if layerURL is in the urlHash
51
+ * @private
52
+ */
53
+ export declare function _templatizeOicLayerUrl(layerURL: string, urlHash: any): string;
package/dist/cjs/oic.js CHANGED
@@ -1,171 +1,171 @@
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
- exports._templatizeOicLayerUrl = exports._getLayerIds = exports._extractDependencies = exports.convertItemToTemplate = void 0;
19
- const tslib_1 = require("tslib");
20
- const common = tslib_1.__importStar(require("@esri/solution-common"));
21
- // ------------------------------------------------------------------------------------------------------------------ //
22
- /**
23
- * Converts an AGOL OIC (Oriented Imagery Catalog) item to a template.
24
- *
25
- * @param itemTemplate Template for the OIC (Oriented Imagery Catalog) item
26
- * @param destAuthentication Credentials for requests to the destination organization
27
- * @param srcAuthentication Credentials for requests to source items
28
- * @returns Template for the solution item that contains key details for item reconstruction
29
- */
30
- function convertItemToTemplate(itemTemplate, destAuthentication, srcAuthentication) {
31
- return new Promise((resolve, reject) => {
32
- // Extract dependencies
33
- _extractDependencies(itemTemplate, srcAuthentication).then((results) => {
34
- itemTemplate.dependencies = results.dependencies;
35
- // Templatize the map layer ids after we've extracted them as dependencies
36
- /* istanbul ignore else */
37
- if (itemTemplate.data?.properties) {
38
- itemTemplate.data.properties.ServiceURL = _templatizeOicLayerUrl(itemTemplate.data.properties.ServiceURL, results.urlHash);
39
- itemTemplate.data.properties.OverviewURL = _templatizeOicLayerUrl(itemTemplate.data.properties.OverviewURL, results.urlHash);
40
- }
41
- resolve(itemTemplate);
42
- }, e => reject(common.fail(e)));
43
- });
44
- }
45
- exports.convertItemToTemplate = convertItemToTemplate;
46
- /**
47
- * Gets the ids of the dependencies of an AGOL OIC (Oriented Imagery Catalog) item.
48
- *
49
- * @param itemTemplate A OIC (Oriented Imagery Catalog) item whose dependencies are sought
50
- * @param authentication Credentials for any requests
51
- * @returns List of dependencies ids and url/itemId hash
52
- * @private
53
- */
54
- function _extractDependencies(itemTemplate, authentication) {
55
- return new Promise((resolve, reject) => {
56
- const dependencies = [];
57
- if (itemTemplate.data?.properties) {
58
- const layerURLs = [];
59
- /* istanbul ignore else */
60
- if (itemTemplate.data.properties.ServiceURL) {
61
- layerURLs.push(itemTemplate.data.properties.ServiceURL);
62
- }
63
- /* istanbul ignore else */
64
- if (itemTemplate.data.properties.OverviewURL &&
65
- itemTemplate.data.properties.OverviewURL !==
66
- itemTemplate.data.properties.ServiceURL) {
67
- layerURLs.push(itemTemplate.data.properties.OverviewURL);
68
- }
69
- _getLayerIds(layerURLs, dependencies, authentication).then(results => {
70
- resolve(results);
71
- }, e => reject(common.fail(e)));
72
- }
73
- else {
74
- resolve({
75
- dependencies: dependencies,
76
- urlHash: {}
77
- });
78
- }
79
- });
80
- }
81
- exports._extractDependencies = _extractDependencies;
82
- /**
83
- * Extracts the AGOL itemId for each layer in a list using the url.
84
- *
85
- * @param layerURLs List of OIC layer URLs
86
- * @param dependencies Current list of dependencies
87
- * @param authentication Credentials for any requests
88
- * @returns List of dependencies ids and url/itemId hash
89
- * @private
90
- */
91
- function _getLayerIds(layerURLs, dependencies, authentication) {
92
- return new Promise((resolve, reject) => {
93
- const urlHash = {};
94
- const options = {
95
- f: "json",
96
- authentication: authentication
97
- };
98
- const layerPromises = [];
99
- const layerChecks = {};
100
- const filteredLayerURLs = layerURLs.filter(layerURL => {
101
- if (layerURL) {
102
- const results = /.+FeatureServer/g.exec(layerURL);
103
- const baseUrl = Array.isArray(results) && results.length > 0 ? results[0] : undefined;
104
- if (baseUrl) {
105
- // avoid redundant checks when we have a layer with subLayers
106
- /* istanbul ignore else */
107
- if (Object.keys(layerChecks).indexOf(baseUrl) < 0) {
108
- layerChecks[baseUrl] = common.rest_request(layerURL, options);
109
- }
110
- layerPromises.push(layerChecks[baseUrl]);
111
- return true;
112
- }
113
- else {
114
- return false;
115
- }
116
- }
117
- else {
118
- return false;
119
- }
120
- });
121
- if (layerPromises.length > 0) {
122
- Promise.all(layerPromises).then(serviceResponses => {
123
- serviceResponses.forEach((serviceResponse, i) => {
124
- /* istanbul ignore else */
125
- if (common.getProp(serviceResponse, "serviceItemId")) {
126
- const id = serviceResponse.serviceItemId;
127
- /* istanbul ignore else */
128
- if (dependencies.indexOf(id) < 0) {
129
- dependencies.push(id);
130
- }
131
- urlHash[filteredLayerURLs[i]] = id;
132
- }
133
- });
134
- resolve({
135
- dependencies: dependencies,
136
- urlHash: urlHash
137
- });
138
- }, e => reject(common.fail(e)));
139
- }
140
- else {
141
- resolve({
142
- dependencies: dependencies,
143
- urlHash: urlHash
144
- });
145
- }
146
- });
147
- }
148
- exports._getLayerIds = _getLayerIds;
149
- /**
150
- * Templatizes the url and item id for a layer.
151
- *
152
- * @param layerURL OIC layer URL
153
- * @param urlHash Lookup object for analysis layers
154
- * @returns Templatized URL if layerURL is in the urlHash
155
- * @private
156
- */
157
- function _templatizeOicLayerUrl(layerURL, urlHash) {
158
- let templatizedURL = layerURL;
159
- if (layerURL) {
160
- const id = urlHash[layerURL];
161
- if (id) {
162
- const layerId = layerURL.substr(layerURL.lastIndexOf("/") + 1);
163
- templatizedURL = common.templatizeTerm(id, id, ".layer" + layerId + ".url");
164
- }
165
- // replace everything up until /home with portalBaseUrl var and templatize the itemId
166
- templatizedURL = common.templatizeIds(templatizedURL.replace(/.+?(?=\/home)/, "{{portalBaseUrl}}"));
167
- }
168
- return templatizedURL;
169
- }
170
- exports._templatizeOicLayerUrl = _templatizeOicLayerUrl;
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
+ exports._templatizeOicLayerUrl = exports._getLayerIds = exports._extractDependencies = exports.convertItemToTemplate = void 0;
19
+ const tslib_1 = require("tslib");
20
+ const common = tslib_1.__importStar(require("@esri/solution-common"));
21
+ // ------------------------------------------------------------------------------------------------------------------ //
22
+ /**
23
+ * Converts an AGOL OIC (Oriented Imagery Catalog) item to a template.
24
+ *
25
+ * @param itemTemplate Template for the OIC (Oriented Imagery Catalog) item
26
+ * @param destAuthentication Credentials for requests to the destination organization
27
+ * @param srcAuthentication Credentials for requests to source items
28
+ * @returns Template for the solution item that contains key details for item reconstruction
29
+ */
30
+ function convertItemToTemplate(itemTemplate, destAuthentication, srcAuthentication) {
31
+ return new Promise((resolve, reject) => {
32
+ // Extract dependencies
33
+ _extractDependencies(itemTemplate, srcAuthentication).then((results) => {
34
+ itemTemplate.dependencies = results.dependencies;
35
+ // Templatize the map layer ids after we've extracted them as dependencies
36
+ /* istanbul ignore else */
37
+ if (itemTemplate.data?.properties) {
38
+ itemTemplate.data.properties.ServiceURL = _templatizeOicLayerUrl(itemTemplate.data.properties.ServiceURL, results.urlHash);
39
+ itemTemplate.data.properties.OverviewURL = _templatizeOicLayerUrl(itemTemplate.data.properties.OverviewURL, results.urlHash);
40
+ }
41
+ resolve(itemTemplate);
42
+ }, e => reject(common.fail(e)));
43
+ });
44
+ }
45
+ exports.convertItemToTemplate = convertItemToTemplate;
46
+ /**
47
+ * Gets the ids of the dependencies of an AGOL OIC (Oriented Imagery Catalog) item.
48
+ *
49
+ * @param itemTemplate A OIC (Oriented Imagery Catalog) item whose dependencies are sought
50
+ * @param authentication Credentials for any requests
51
+ * @returns List of dependencies ids and url/itemId hash
52
+ * @private
53
+ */
54
+ function _extractDependencies(itemTemplate, authentication) {
55
+ return new Promise((resolve, reject) => {
56
+ const dependencies = [];
57
+ if (itemTemplate.data?.properties) {
58
+ const layerURLs = [];
59
+ /* istanbul ignore else */
60
+ if (itemTemplate.data.properties.ServiceURL) {
61
+ layerURLs.push(itemTemplate.data.properties.ServiceURL);
62
+ }
63
+ /* istanbul ignore else */
64
+ if (itemTemplate.data.properties.OverviewURL &&
65
+ itemTemplate.data.properties.OverviewURL !==
66
+ itemTemplate.data.properties.ServiceURL) {
67
+ layerURLs.push(itemTemplate.data.properties.OverviewURL);
68
+ }
69
+ _getLayerIds(layerURLs, dependencies, authentication).then(results => {
70
+ resolve(results);
71
+ }, e => reject(common.fail(e)));
72
+ }
73
+ else {
74
+ resolve({
75
+ dependencies: dependencies,
76
+ urlHash: {}
77
+ });
78
+ }
79
+ });
80
+ }
81
+ exports._extractDependencies = _extractDependencies;
82
+ /**
83
+ * Extracts the AGOL itemId for each layer in a list using the url.
84
+ *
85
+ * @param layerURLs List of OIC layer URLs
86
+ * @param dependencies Current list of dependencies
87
+ * @param authentication Credentials for any requests
88
+ * @returns List of dependencies ids and url/itemId hash
89
+ * @private
90
+ */
91
+ function _getLayerIds(layerURLs, dependencies, authentication) {
92
+ return new Promise((resolve, reject) => {
93
+ const urlHash = {};
94
+ const options = {
95
+ f: "json",
96
+ authentication: authentication
97
+ };
98
+ const layerPromises = [];
99
+ const layerChecks = {};
100
+ const filteredLayerURLs = layerURLs.filter(layerURL => {
101
+ if (layerURL) {
102
+ const results = /.+FeatureServer/g.exec(layerURL);
103
+ const baseUrl = Array.isArray(results) && results.length > 0 ? results[0] : undefined;
104
+ if (baseUrl) {
105
+ // avoid redundant checks when we have a layer with subLayers
106
+ /* istanbul ignore else */
107
+ if (Object.keys(layerChecks).indexOf(baseUrl) < 0) {
108
+ layerChecks[baseUrl] = common.rest_request(layerURL, options);
109
+ }
110
+ layerPromises.push(layerChecks[baseUrl]);
111
+ return true;
112
+ }
113
+ else {
114
+ return false;
115
+ }
116
+ }
117
+ else {
118
+ return false;
119
+ }
120
+ });
121
+ if (layerPromises.length > 0) {
122
+ Promise.all(layerPromises).then(serviceResponses => {
123
+ serviceResponses.forEach((serviceResponse, i) => {
124
+ /* istanbul ignore else */
125
+ if (common.getProp(serviceResponse, "serviceItemId")) {
126
+ const id = serviceResponse.serviceItemId;
127
+ /* istanbul ignore else */
128
+ if (dependencies.indexOf(id) < 0) {
129
+ dependencies.push(id);
130
+ }
131
+ urlHash[filteredLayerURLs[i]] = id;
132
+ }
133
+ });
134
+ resolve({
135
+ dependencies: dependencies,
136
+ urlHash: urlHash
137
+ });
138
+ }, e => reject(common.fail(e)));
139
+ }
140
+ else {
141
+ resolve({
142
+ dependencies: dependencies,
143
+ urlHash: urlHash
144
+ });
145
+ }
146
+ });
147
+ }
148
+ exports._getLayerIds = _getLayerIds;
149
+ /**
150
+ * Templatizes the url and item id for a layer.
151
+ *
152
+ * @param layerURL OIC layer URL
153
+ * @param urlHash Lookup object for analysis layers
154
+ * @returns Templatized URL if layerURL is in the urlHash
155
+ * @private
156
+ */
157
+ function _templatizeOicLayerUrl(layerURL, urlHash) {
158
+ let templatizedURL = layerURL;
159
+ if (layerURL) {
160
+ const id = urlHash[layerURL];
161
+ if (id) {
162
+ const layerId = layerURL.substr(layerURL.lastIndexOf("/") + 1);
163
+ templatizedURL = common.templatizeTerm(id, id, ".layer" + layerId + ".url");
164
+ }
165
+ // replace everything up until /home with portalBaseUrl var and templatize the itemId
166
+ templatizedURL = common.templatizeIds(templatizedURL.replace(/.+?(?=\/home)/, "{{portalBaseUrl}}"));
167
+ }
168
+ return templatizedURL;
169
+ }
170
+ exports._templatizeOicLayerUrl = _templatizeOicLayerUrl;
171
171
  //# sourceMappingURL=oic.js.map
@@ -1,87 +1,76 @@
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
- import * as common from "@esri/solution-common";
17
- /**
18
- * Converts a Quick Capture 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
- * @returns A promise that will resolve when the template has been created
26
- */
27
- export declare function convertItemToTemplate(solutionItemId: string, itemInfo: any, destAuthentication: common.UserSession, srcAuthentication: common.UserSession, templateDictionary: any): Promise<common.IItemTemplate>;
28
- /**
29
- * Converts an quick capture item to a template.
30
- *
31
- * @param itemTemplate template for the quick capture project item
32
- * @returns templatized itemTemplate
33
- */
34
- export declare function convertQuickCaptureToTemplate(itemTemplate: common.IItemTemplate): Promise<common.IItemTemplate>;
35
- /**
36
- * Templatizes key properties for a quick capture project and gathers item dependencies
37
- *
38
- * @param data the projects json
39
- * @param itemTemplate template for the quick capture project item
40
- * @returns templatized itemTemplate
41
- * @private
42
- */
43
- export declare function _templatizeApplication(data: any, itemTemplate: common.IItemTemplate): any;
44
- /**
45
- * Templatize the email property
46
- *
47
- * @param data the quick capture application
48
- * @private
49
- */
50
- export declare function _templatizeAdminEmail(data: any): void;
51
- /**
52
- * Updates the templates dependencies list with unique item ids
53
- *
54
- * @param id the item id of the dependency
55
- * @param itemTemplate template for the quick capture project item
56
- * @returns templatized itemTemplate
57
- */
58
- export declare function _updateDependencies(id: string, itemTemplate: common.IItemTemplate): void;
59
- /**
60
- * Templatize a url property
61
- *
62
- * @param obj the datasource object
63
- * @param idPath the path to the id property
64
- * @param urlPath the path to the url property
65
- * @private
66
- */
67
- export declare function _templatizeUrl(obj: any, idPath: string, urlPath: string): void;
68
- /**
69
- * Templatize the item id property
70
- *
71
- * @param obj the datasource or object that contains the item id property
72
- * @param path the path to the id property
73
- * @private
74
- */
75
- export declare function _templatizeId(obj: any, path: string): void;
76
- export declare function createItemFromTemplate(template: common.IItemTemplate, templateDictionary: any, destinationAuthentication: common.UserSession, itemProgressCallback: common.IItemProgressCallback): Promise<common.ICreateItemFromTemplateResponse>;
77
- /**
78
- * QuickCapture post-processing actions
79
- *
80
- * @param {string} itemId The item ID
81
- * @param {string} type The template type
82
- * @param {any[]} itemInfos Array of \{id: 'ef3', type: 'Web Map'\} objects
83
- * @param {any} templateDictionary The template dictionary
84
- * @param {UserSession} authentication The destination session info
85
- * @returns Promise resolving to successfulness of update
86
- */
87
- export declare function postProcess(itemId: string, type: string, itemInfos: any[], template: common.IItemTemplate, templates: common.IItemTemplate[], templateDictionary: any, authentication: common.UserSession): Promise<any>;
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
+ import * as common from "@esri/solution-common";
17
+ /**
18
+ * Converts a Quick Capture 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
+ * @returns A promise that will resolve when the template has been created
26
+ */
27
+ export declare function convertItemToTemplate(solutionItemId: string, itemInfo: any, destAuthentication: common.UserSession, srcAuthentication: common.UserSession, templateDictionary: any): Promise<common.IItemTemplate>;
28
+ /**
29
+ * Converts an quick capture item to a template.
30
+ *
31
+ * @param itemTemplate template for the quick capture project item
32
+ * @returns templatized itemTemplate
33
+ */
34
+ export declare function convertQuickCaptureToTemplate(itemTemplate: common.IItemTemplate): common.IItemTemplate;
35
+ /**
36
+ * Templatizes key properties for a quick capture project and gathers item dependencies
37
+ *
38
+ * @param data the projects json
39
+ * @param itemTemplate template for the quick capture project item
40
+ * @returns templatized itemTemplate
41
+ * @private
42
+ */
43
+ export declare function _templatizeApplication(data: any, itemTemplate: common.IItemTemplate): any;
44
+ /**
45
+ * Templatize the email property
46
+ *
47
+ * @param data the quick capture application
48
+ * @private
49
+ */
50
+ export declare function _templatizeAdminEmail(data: any): void;
51
+ /**
52
+ * Updates the templates dependencies list with unique item ids
53
+ *
54
+ * @param id the item id of the dependency
55
+ * @param itemTemplate template for the quick capture project item
56
+ * @returns templatized itemTemplate
57
+ */
58
+ export declare function _updateDependencies(id: string, itemTemplate: common.IItemTemplate): void;
59
+ /**
60
+ * Templatize a url property
61
+ *
62
+ * @param obj the datasource object
63
+ * @param idPath the path to the id property
64
+ * @param urlPath the path to the url property
65
+ * @private
66
+ */
67
+ export declare function _templatizeUrl(obj: any, idPath: string, urlPath: string): void;
68
+ /**
69
+ * Templatize the item id property
70
+ *
71
+ * @param obj the datasource or object that contains the item id property
72
+ * @param path the path to the id property
73
+ * @private
74
+ */
75
+ export declare function _templatizeId(obj: any, path: string): void;
76
+ export declare function createItemFromTemplate(template: common.IItemTemplate, templateDictionary: any, destinationAuthentication: common.UserSession, itemProgressCallback: common.IItemProgressCallback): Promise<common.ICreateItemFromTemplateResponse>;