@esri/solution-simple-types 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.
Files changed (91) hide show
  1. package/package.json +3 -3
  2. package/dist/cjs/dashboard.d.ts +0 -93
  3. package/dist/cjs/dashboard.js +0 -351
  4. package/dist/cjs/dashboard.js.map +0 -1
  5. package/dist/cjs/helpers/convert-item-to-template.d.ts +0 -34
  6. package/dist/cjs/helpers/convert-item-to-template.js +0 -199
  7. package/dist/cjs/helpers/convert-item-to-template.js.map +0 -1
  8. package/dist/cjs/helpers/create-item-from-template.d.ts +0 -17
  9. package/dist/cjs/helpers/create-item-from-template.js +0 -145
  10. package/dist/cjs/helpers/create-item-from-template.js.map +0 -1
  11. package/dist/cjs/helpers/notebook-helpers.d.ts +0 -19
  12. package/dist/cjs/helpers/notebook-helpers.js +0 -25
  13. package/dist/cjs/helpers/notebook-helpers.js.map +0 -1
  14. package/dist/cjs/helpers/quickcapture-helpers.d.ts +0 -18
  15. package/dist/cjs/helpers/quickcapture-helpers.js +0 -23
  16. package/dist/cjs/helpers/quickcapture-helpers.js.map +0 -1
  17. package/dist/cjs/helpers/simple-type-helpers.d.ts +0 -18
  18. package/dist/cjs/helpers/simple-type-helpers.js +0 -23
  19. package/dist/cjs/helpers/simple-type-helpers.js.map +0 -1
  20. package/dist/cjs/helpers/update-notebook-data.d.ts +0 -17
  21. package/dist/cjs/helpers/update-notebook-data.js +0 -28
  22. package/dist/cjs/helpers/update-notebook-data.js.map +0 -1
  23. package/dist/cjs/index.d.ts +0 -27
  24. package/dist/cjs/index.js +0 -37
  25. package/dist/cjs/index.js.map +0 -1
  26. package/dist/cjs/notebook.d.ts +0 -73
  27. package/dist/cjs/notebook.js +0 -164
  28. package/dist/cjs/notebook.js.map +0 -1
  29. package/dist/cjs/oic.d.ts +0 -53
  30. package/dist/cjs/oic.js +0 -170
  31. package/dist/cjs/oic.js.map +0 -1
  32. package/dist/cjs/quickcapture.d.ts +0 -75
  33. package/dist/cjs/quickcapture.js +0 -143
  34. package/dist/cjs/quickcapture.js.map +0 -1
  35. package/dist/cjs/simple-types.d.ts +0 -56
  36. package/dist/cjs/simple-types.js +0 -94
  37. package/dist/cjs/simple-types.js.map +0 -1
  38. package/dist/cjs/webmap.d.ts +0 -102
  39. package/dist/cjs/webmap.js +0 -314
  40. package/dist/cjs/webmap.js.map +0 -1
  41. package/dist/cjs/webmappingapplication.d.ts +0 -176
  42. package/dist/cjs/webmappingapplication.js +0 -661
  43. package/dist/cjs/webmappingapplication.js.map +0 -1
  44. package/dist/cjs/workforce.d.ts +0 -34
  45. package/dist/cjs/workforce.js +0 -45
  46. package/dist/cjs/workforce.js.map +0 -1
  47. package/dist/esm/dashboard.d.ts +0 -93
  48. package/dist/esm/dashboard.js +0 -338
  49. package/dist/esm/dashboard.js.map +0 -1
  50. package/dist/esm/helpers/convert-item-to-template.d.ts +0 -34
  51. package/dist/esm/helpers/convert-item-to-template.js +0 -193
  52. package/dist/esm/helpers/convert-item-to-template.js.map +0 -1
  53. package/dist/esm/helpers/create-item-from-template.d.ts +0 -17
  54. package/dist/esm/helpers/create-item-from-template.js +0 -140
  55. package/dist/esm/helpers/create-item-from-template.js.map +0 -1
  56. package/dist/esm/helpers/notebook-helpers.d.ts +0 -19
  57. package/dist/esm/helpers/notebook-helpers.js +0 -21
  58. package/dist/esm/helpers/notebook-helpers.js.map +0 -1
  59. package/dist/esm/helpers/quickcapture-helpers.d.ts +0 -18
  60. package/dist/esm/helpers/quickcapture-helpers.js +0 -20
  61. package/dist/esm/helpers/quickcapture-helpers.js.map +0 -1
  62. package/dist/esm/helpers/simple-type-helpers.d.ts +0 -18
  63. package/dist/esm/helpers/simple-type-helpers.js +0 -20
  64. package/dist/esm/helpers/simple-type-helpers.js.map +0 -1
  65. package/dist/esm/helpers/update-notebook-data.d.ts +0 -17
  66. package/dist/esm/helpers/update-notebook-data.js +0 -24
  67. package/dist/esm/helpers/update-notebook-data.js.map +0 -1
  68. package/dist/esm/index.d.ts +0 -27
  69. package/dist/esm/index.js +0 -28
  70. package/dist/esm/index.js.map +0 -1
  71. package/dist/esm/notebook.d.ts +0 -73
  72. package/dist/esm/notebook.js +0 -153
  73. package/dist/esm/notebook.js.map +0 -1
  74. package/dist/esm/oic.d.ts +0 -53
  75. package/dist/esm/oic.js +0 -162
  76. package/dist/esm/oic.js.map +0 -1
  77. package/dist/esm/quickcapture.d.ts +0 -75
  78. package/dist/esm/quickcapture.js +0 -131
  79. package/dist/esm/quickcapture.js.map +0 -1
  80. package/dist/esm/simple-types.d.ts +0 -56
  81. package/dist/esm/simple-types.js +0 -86
  82. package/dist/esm/simple-types.js.map +0 -1
  83. package/dist/esm/webmap.d.ts +0 -102
  84. package/dist/esm/webmap.js +0 -301
  85. package/dist/esm/webmap.js.map +0 -1
  86. package/dist/esm/webmappingapplication.d.ts +0 -176
  87. package/dist/esm/webmappingapplication.js +0 -635
  88. package/dist/esm/webmappingapplication.js.map +0 -1
  89. package/dist/esm/workforce.d.ts +0 -34
  90. package/dist/esm/workforce.js +0 -39
  91. package/dist/esm/workforce.js.map +0 -1
@@ -1,143 +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
- exports.createItemFromTemplate = exports._templatizeId = exports._templatizeUrl = exports._updateDependencies = exports._templatizeAdminEmail = exports._templatizeApplication = exports.convertQuickCaptureToTemplate = exports.convertItemToTemplate = void 0;
19
- const tslib_1 = require("tslib");
20
- const common = tslib_1.__importStar(require("@esri/solution-common"));
21
- const quickcaptureHelpers = tslib_1.__importStar(require("./helpers/quickcapture-helpers"));
22
- //#region Publish Process ---------------------------------------------------------------------------------------//
23
- /**
24
- * Converts a Quick Capture 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
- * @param templateDictionary Hash of facts: folder id, org URL, adlib replacements
30
- * @returns A promise that will resolve when the template has been created
31
- */
32
- function convertItemToTemplate(itemInfo, destAuthentication, srcAuthentication, templateDictionary) {
33
- // Delegate back to simple-types, which will in-turn delegate
34
- // to convertNotebookToTemplate at the correct point in the process
35
- // This is a temporary refactor step
36
- return quickcaptureHelpers.convertItemToTemplate(itemInfo, destAuthentication, srcAuthentication, templateDictionary);
37
- }
38
- exports.convertItemToTemplate = convertItemToTemplate;
39
- /**
40
- * Converts an quick capture item to a template.
41
- *
42
- * @param itemTemplate template for the quick capture project item
43
- * @returns templatized itemTemplate
44
- */
45
- function convertQuickCaptureToTemplate(itemTemplate) {
46
- common.setProp(itemTemplate, "data.application", _templatizeApplication(itemTemplate.data.application, itemTemplate));
47
- return itemTemplate;
48
- }
49
- exports.convertQuickCaptureToTemplate = convertQuickCaptureToTemplate;
50
- /**
51
- * Templatizes key properties for a quick capture project and gathers item dependencies
52
- *
53
- * @param data the projects json
54
- * @param itemTemplate template for the quick capture project item
55
- * @returns templatized itemTemplate
56
- * @private
57
- */
58
- function _templatizeApplication(data, itemTemplate) {
59
- // Quick Project item id
60
- _templatizeId(data, "itemId");
61
- // Set the admin email
62
- _templatizeAdminEmail(data);
63
- // datasource item id and url
64
- const dataSources = data?.dataSources;
65
- if (dataSources && Array.isArray(dataSources)) {
66
- dataSources.forEach((ds) => {
67
- const id = ds.featureServiceItemId;
68
- if (id) {
69
- _updateDependencies(id, itemTemplate);
70
- _templatizeUrl(ds, "featureServiceItemId", "url");
71
- _templatizeId(ds, "featureServiceItemId");
72
- }
73
- });
74
- }
75
- return data;
76
- }
77
- exports._templatizeApplication = _templatizeApplication;
78
- /**
79
- * Templatize the email property
80
- *
81
- * @param data the quick capture application
82
- * @private
83
- */
84
- function _templatizeAdminEmail(data) {
85
- if (common.getProp(data, "preferences.adminEmail")) {
86
- common.setProp(data, "preferences.adminEmail", "{{user.email}}");
87
- }
88
- }
89
- exports._templatizeAdminEmail = _templatizeAdminEmail;
90
- /**
91
- * Updates the templates dependencies list with unique item ids
92
- *
93
- * @param id the item id of the dependency
94
- * @param itemTemplate template for the quick capture project item
95
- * @returns templatized itemTemplate
96
- */
97
- function _updateDependencies(id, itemTemplate) {
98
- if (itemTemplate.dependencies.indexOf(id) === -1) {
99
- itemTemplate.dependencies.push(id);
100
- }
101
- }
102
- exports._updateDependencies = _updateDependencies;
103
- /**
104
- * Templatize a url property
105
- *
106
- * @param obj the datasource object
107
- * @param idPath the path to the id property
108
- * @param urlPath the path to the url property
109
- * @private
110
- */
111
- function _templatizeUrl(obj, idPath, urlPath) {
112
- const id = common.getProp(obj, idPath);
113
- const url = common.getProp(obj, urlPath);
114
- if (url) {
115
- const layerId = url.substr(url.lastIndexOf("/") + 1);
116
- common.setProp(obj, urlPath, common.templatizeTerm(id, id, ".layer" + layerId + ".url"));
117
- }
118
- }
119
- exports._templatizeUrl = _templatizeUrl;
120
- /**
121
- * Templatize the item id property
122
- *
123
- * @param obj the datasource or object that contains the item id property
124
- * @param path the path to the id property
125
- * @private
126
- */
127
- function _templatizeId(obj, path) {
128
- const id = common.getProp(obj, path);
129
- if (id) {
130
- common.setProp(obj, path, common.templatizeTerm(id, id, ".itemId"));
131
- }
132
- }
133
- exports._templatizeId = _templatizeId;
134
- //#endregion
135
- //#region Deploy Process ---------------------------------------------------------------------------------------//
136
- // Delegate back to simple-types
137
- // This is a temporary refactor step
138
- function createItemFromTemplate(template, templateDictionary, destinationAuthentication, itemProgressCallback) {
139
- return quickcaptureHelpers.createItemFromTemplate(template, templateDictionary, destinationAuthentication, itemProgressCallback);
140
- }
141
- exports.createItemFromTemplate = createItemFromTemplate;
142
- //#endregion
143
- //# sourceMappingURL=quickcapture.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"quickcapture.js","sourceRoot":"","sources":["../../src/quickcapture.ts"],"names":[],"mappings":"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"}
@@ -1,56 +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
- import { ICreateItemFromTemplateResponse, IDatasourceInfo, IItemProgressCallback, IItemTemplate, IUpdateItemResponse, UserSession } from "@esri/solution-common";
17
- /**
18
- * Converts an item into a template.
19
- *
20
- * @param itemInfo Info about the item
21
- * @param destAuthentication Credentials for requests to the destination organization
22
- * @param srcAuthentication Credentials for requests to source items
23
- * @param templateDictionary Hash of facts: folder id, org URL, adlib replacements
24
- * @returns A promise that will resolve when the template has been created
25
- */
26
- export declare function convertItemToTemplate(itemInfo: any, destAuthentication: UserSession, srcAuthentication: UserSession, templateDictionary: any): Promise<IItemTemplate>;
27
- /**
28
- * Delegate to simpleType creator
29
- *
30
- * @param template
31
- * @param templateDictionary
32
- * @param destinationAuthentication
33
- * @param itemProgressCallback
34
- */
35
- export declare function createItemFromTemplate(template: IItemTemplate, templateDictionary: any, destinationAuthentication: UserSession, itemProgressCallback: IItemProgressCallback): Promise<ICreateItemFromTemplateResponse>;
36
- /**
37
- * Templatizes field references within specific template types.
38
- * Currently only handles web mapping applications
39
- *
40
- * @param template A solution template
41
- * @param datasourceInfos A list of objects that store key datasource info used to templatizing field references
42
- * @param type The item type
43
- * @returns The updated solution template
44
- */
45
- export declare function postProcessFieldReferences(solutionTemplate: IItemTemplate, datasourceInfos: IDatasourceInfo[], type: string): IItemTemplate;
46
- /**
47
- * Simple Type post-processing actions
48
- *
49
- * @param {string} itemId The item ID
50
- * @param {string} type The template type
51
- * @param {any[]} itemInfos Array of \{id: 'ef3', type: 'Web Map'\} objects
52
- * @param {any} templateDictionary The template dictionary
53
- * @param {UserSession} authentication The destination session info
54
- * @returns Promise resolving to successfulness of update
55
- */
56
- export declare function postProcess(itemId: string, type: string, itemInfos: any[], template: IItemTemplate, templates: IItemTemplate[], templateDictionary: any, authentication: UserSession): Promise<IUpdateItemResponse>;
@@ -1,94 +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
- exports.postProcess = exports.postProcessFieldReferences = exports.createItemFromTemplate = exports.convertItemToTemplate = void 0;
19
- const tslib_1 = require("tslib");
20
- /**
21
- * Manages the creation and deployment of simple item types.
22
- *
23
- * @module simple-types
24
- */
25
- const dashboard = tslib_1.__importStar(require("./dashboard"));
26
- const webmap = tslib_1.__importStar(require("./webmap"));
27
- const webmappingapplication = tslib_1.__importStar(require("./webmappingapplication"));
28
- const solution_common_1 = require("@esri/solution-common");
29
- // Need to import collectively to enable spying
30
- const simpleTypeHelpers = tslib_1.__importStar(require("./helpers/simple-type-helpers"));
31
- /**
32
- * Converts an item into a template.
33
- *
34
- * @param itemInfo Info about the item
35
- * @param destAuthentication Credentials for requests to the destination organization
36
- * @param srcAuthentication Credentials for requests to source items
37
- * @param templateDictionary Hash of facts: folder id, org URL, adlib replacements
38
- * @returns A promise that will resolve when the template has been created
39
- */
40
- function convertItemToTemplate(itemInfo, destAuthentication, srcAuthentication, templateDictionary) {
41
- return simpleTypeHelpers.convertItemToTemplate(itemInfo, destAuthentication, srcAuthentication, templateDictionary);
42
- }
43
- exports.convertItemToTemplate = convertItemToTemplate;
44
- /**
45
- * Delegate to simpleType creator
46
- *
47
- * @param template
48
- * @param templateDictionary
49
- * @param destinationAuthentication
50
- * @param itemProgressCallback
51
- */
52
- function createItemFromTemplate(template, templateDictionary, destinationAuthentication, itemProgressCallback) {
53
- return simpleTypeHelpers.createItemFromTemplate(template, templateDictionary, destinationAuthentication, itemProgressCallback);
54
- }
55
- exports.createItemFromTemplate = createItemFromTemplate;
56
- /**
57
- * Templatizes field references within specific template types.
58
- * Currently only handles web mapping applications
59
- *
60
- * @param template A solution template
61
- * @param datasourceInfos A list of objects that store key datasource info used to templatizing field references
62
- * @param type The item type
63
- * @returns The updated solution template
64
- */
65
- function postProcessFieldReferences(solutionTemplate, datasourceInfos, type) {
66
- switch (type) {
67
- case "Web Mapping Application":
68
- webmappingapplication.postProcessFieldReferences(solutionTemplate, datasourceInfos);
69
- break;
70
- case "Dashboard":
71
- dashboard.postProcessFieldReferences(solutionTemplate, datasourceInfos);
72
- break;
73
- case "Web Map":
74
- webmap.postProcessFieldReferences(solutionTemplate, datasourceInfos);
75
- break;
76
- }
77
- return solutionTemplate;
78
- }
79
- exports.postProcessFieldReferences = postProcessFieldReferences;
80
- /**
81
- * Simple Type post-processing actions
82
- *
83
- * @param {string} itemId The item ID
84
- * @param {string} type The template type
85
- * @param {any[]} itemInfos Array of \{id: 'ef3', type: 'Web Map'\} objects
86
- * @param {any} templateDictionary The template dictionary
87
- * @param {UserSession} authentication The destination session info
88
- * @returns Promise resolving to successfulness of update
89
- */
90
- function postProcess(itemId, type, itemInfos, template, templates, templateDictionary, authentication) {
91
- return (0, solution_common_1.updateItemTemplateFromDictionary)(itemId, templateDictionary, authentication);
92
- }
93
- exports.postProcess = postProcess;
94
- //# sourceMappingURL=simple-types.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"simple-types.js","sourceRoot":"","sources":["../../src/simple-types.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;;AAEH;;;;GAIG;AAEH,+DAAyC;AACzC,yDAAmC;AACnC,uFAAiE;AAEjE,2DAQ+B;AAE/B,+CAA+C;AAC/C,yFAAmE;AAEnE;;;;;;;;GAQG;AACH,SAAgB,qBAAqB,CACnC,QAAa,EACb,kBAA+B,EAC/B,iBAA8B,EAC9B,kBAAuB;IAEvB,OAAO,iBAAiB,CAAC,qBAAqB,CAAC,QAAQ,EAAE,kBAAkB,EAAE,iBAAiB,EAAE,kBAAkB,CAAC,CAAC;AACtH,CAAC;AAPD,sDAOC;AAED;;;;;;;GAOG;AACH,SAAgB,sBAAsB,CACpC,QAAuB,EACvB,kBAAuB,EACvB,yBAAsC,EACtC,oBAA2C;IAE3C,OAAO,iBAAiB,CAAC,sBAAsB,CAC7C,QAAQ,EACR,kBAAkB,EAClB,yBAAyB,EACzB,oBAAoB,CACrB,CAAC;AACJ,CAAC;AAZD,wDAYC;AAED;;;;;;;;GAQG;AACH,SAAgB,0BAA0B,CACxC,gBAA+B,EAC/B,eAAkC,EAClC,IAAY;IAEZ,QAAQ,IAAI,EAAE;QACZ,KAAK,yBAAyB;YAC5B,qBAAqB,CAAC,0BAA0B,CAAC,gBAAgB,EAAE,eAAe,CAAC,CAAC;YACpF,MAAM;QACR,KAAK,WAAW;YACd,SAAS,CAAC,0BAA0B,CAAC,gBAAgB,EAAE,eAAe,CAAC,CAAC;YACxE,MAAM;QACR,KAAK,SAAS;YACZ,MAAM,CAAC,0BAA0B,CAAC,gBAAgB,EAAE,eAAe,CAAC,CAAC;YACrE,MAAM;KACT;IACD,OAAO,gBAAgB,CAAC;AAC1B,CAAC;AAjBD,gEAiBC;AAED;;;;;;;;;GASG;AACH,SAAgB,WAAW,CACzB,MAAc,EACd,IAAY,EACZ,SAAgB,EAChB,QAAuB,EACvB,SAA0B,EAC1B,kBAAuB,EACvB,cAA2B;IAE3B,OAAO,IAAA,kDAAgC,EAAC,MAAM,EAAE,kBAAkB,EAAE,cAAc,CAAC,CAAC;AACtF,CAAC;AAVD,kCAUC"}
@@ -1,102 +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
- import * as common from "@esri/solution-common";
17
- /**
18
- * Converts an AGOL webmap item to a template.
19
- *
20
- * @param itemTemplate Template for the webmap item
21
- * @param destAuthentication Credentials for requests to the destination organization
22
- * @param srcAuthentication Credentials for requests to source items
23
- * @param templateDictionary Hash of key details used for variable replacement
24
- * @returns Template for the solution item that contains key details for item reconstruction
25
- */
26
- export declare function convertItemToTemplate(itemTemplate: common.IItemTemplate, destAuthentication: common.UserSession, srcAuthentication: common.UserSession, templateDictionary: any): Promise<common.IItemTemplate>;
27
- /**
28
- * Gets the ids of the dependencies of an AGOL webmap item.
29
- *
30
- * @param itemTemplate A webmap item whose dependencies are sought
31
- * @param authentication Credentials for any requests
32
- * @returns List of dependencies ids and url/itemId hash
33
- * @private
34
- */
35
- export declare function _extractDependencies(itemTemplate: common.IItemTemplate, authentication: common.UserSession): Promise<common.IWebmapDependencies>;
36
- /**
37
- * Remove the initialState prop from webmaps saved from the new map viewer.
38
- * This allows the map to use the item extent property that we templatize.
39
- *
40
- * Added for issue #662
41
- *
42
- * @param data the data for the web maps item template
43
- * @returns void
44
- * @private
45
- */
46
- export declare function _excludeInitialState(data: any): void;
47
- /**
48
- * Extracts the AGOL itemId for each layer or table object in a list using the url.
49
- *
50
- * @param layerList List of map layers or tables; supported vector tile layers have their styleUrls templatized
51
- * @param dependencies Current list of dependencies
52
- * @param authentication Credentials for any requests
53
- * @returns Updated list of dependencies ids, url/itemId hash (for feature layers),
54
- * and id/styleUrl hash (for vector tile layers)
55
- * @private
56
- */
57
- export declare function _getLayerIds(layerList: any[], dependencies: string[], authentication: common.UserSession): Promise<common.IWebmapDependencies>;
58
- /**
59
- * Templatizes the url and item id for layers or tables within the webmap.
60
- *
61
- * @param layerList List of map layers or tables
62
- * @param urlHash Lookup object for analysis layers; hash from URL to AGO item id
63
- * @param templateDictionary Hash of key details used for variable replacement
64
- * @returns void
65
- * @private
66
- */
67
- export declare function _templatizeWebmapLayerIdsAndUrls(layerList: any[], urlHash: common.IKeyedStrings, templateDictionary: any): void;
68
- /**
69
- * Templatize field references.
70
- *
71
- * @param solutionTemplate The solution item template
72
- * @param datasourceInfos A list of datasource info objects that contain key values to templatize field references
73
- * @returns The solutionTemplate with templatized field references
74
- */
75
- export declare function postProcessFieldReferences(solutionTemplate: common.IItemTemplate, datasourceInfos: common.IDatasourceInfo[]): common.IItemTemplate;
76
- /**
77
- * Templatize field references.
78
- *
79
- * @param solutionTemplate The solution item template
80
- * @param datasourceInfos A list of datasource info objects that contain key values to templatize field references
81
- * @param path A string path to the object property to templatize
82
- * @private
83
- */
84
- export declare function _templatizeProperty(solutionTemplate: common.IItemTemplate, datasourceInfos: common.IDatasourceInfo[], path: string): void;
85
- /**
86
- * Templatize field references.
87
- *
88
- * @param objs Can be operationalLayers or tables or appProperties search layers
89
- * @param datasourceInfos A list of datasource info objects that contain key values to templatize field references
90
- * @returns updated instances of the objects
91
- * @private
92
- */
93
- export declare function _templatize(objs: any[], datasourceInfos: common.IDatasourceInfo[]): any[];
94
- /**
95
- * Get datasourceInfo by map layer id
96
- *
97
- * @param obj Can be operationalLayer or table or appProperties search layer
98
- * @param datasourceInfos A list of datasource info objects that contain key values to templatize field references
99
- * @returns datasourceInfo for the given object id
100
- * @private
101
- */
102
- export declare function _getDatasourceInfo(obj: any, datasourceInfos: common.IDatasourceInfo[]): any;