@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
package/dist/cjs/index.js DELETED
@@ -1,37 +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.quickcaptureProcessor = exports.quickcaptureHelpers = exports.simpleTypeHelpers = exports.notebookHelpers = exports.notebookProcessor = exports.simpleTypes = 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 simpleTypeHelpers = tslib_1.__importStar(require("./helpers/simple-type-helpers"));
26
- exports.simpleTypeHelpers = simpleTypeHelpers;
27
- const notebookHelpers = tslib_1.__importStar(require("./helpers/notebook-helpers"));
28
- exports.notebookHelpers = notebookHelpers;
29
- const quickcaptureHelpers = tslib_1.__importStar(require("./helpers/quickcapture-helpers"));
30
- exports.quickcaptureHelpers = quickcaptureHelpers;
31
- const simpleTypes = tslib_1.__importStar(require("./simple-types"));
32
- exports.simpleTypes = simpleTypes;
33
- const notebookProcessor = tslib_1.__importStar(require("./notebook"));
34
- exports.notebookProcessor = notebookProcessor;
35
- const quickcaptureProcessor = tslib_1.__importStar(require("./quickcapture"));
36
- exports.quickcaptureProcessor = quickcaptureProcessor;
37
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;;AAEH;;;;GAIG;AACH,yFAAmE;AAWjE,8CAAiB;AAVnB,oFAA8D;AAS5D,0CAAe;AARjB,4FAAsE;AAUpE,kDAAmB;AATrB,oEAA8C;AAK5C,kCAAW;AAJb,sEAAgD;AAK9C,8CAAiB;AAJnB,8EAAwD;AAQtD,sDAAqB"}
@@ -1,73 +0,0 @@
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 a notebook 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: common.UserSession, srcAuthentication: common.UserSession, templateDictionary: any): Promise<common.IItemTemplate>;
27
- export declare function createItemFromTemplate(template: common.IItemTemplate, templateDictionary: any, destinationAuthentication: common.UserSession, itemProgressCallback: common.IItemProgressCallback): Promise<common.ICreateItemFromTemplateResponse>;
28
- /**
29
- * Converts a Python Notebook item to a template.
30
- *
31
- * @param itemTemplate template for the Python Notebook
32
- * @returns templatized itemTemplate
33
- */
34
- export declare function convertNotebookToTemplate(itemTemplate: common.IItemTemplate): Promise<common.IItemTemplate>;
35
- /**
36
- * Swap any ids found in the items data section with itemId variables
37
- *
38
- * @param templates IItemTemplate[] all templates for the current solution
39
- * @param templateDictionary Hash of facts: folder id, org URL, adlib replacements
40
- * @returns templatized IItemTemplate[]
41
- */
42
- export declare function postProcessNotebookTemplates(templates: common.IItemTemplate[], templateDictionary: any): common.IItemTemplate[];
43
- /**
44
- * Remove interpreter and papermill props
45
- *
46
- * This function will update the data passed in by removing key props
47
- *
48
- * @param data The notebooks data object
49
- *
50
- */
51
- export declare function deleteProps(data: any): void;
52
- /**
53
- * Update the notebooks data
54
- *
55
- * @param originalTemplate The original template item
56
- * @param newlyCreatedItem The current item that may have unswapped variables
57
- * @param templateDictionary Hash of facts: org URL, adlib replacements, deferreds for dependencies
58
- * @param authentication Credentials for the requests to the destination
59
- *
60
- * @returns A promise that will resolve once any updates have been made
61
- */
62
- export declare function fineTuneCreatedItem(originalTemplate: common.IItemTemplate, newlyCreatedItem: common.IItemTemplate, templateDictionary: any, authentication: common.UserSession): Promise<void>;
63
- /**
64
- * Notebook specific post-processing actions
65
- *
66
- * @param {string} itemId The item ID
67
- * @param {string} type The template type
68
- * @param {any[]} itemInfos Array of \{id: 'ef3', type: 'Web Map'\} objects
69
- * @param {any} templateDictionary The template dictionary
70
- * @param {UserSession} authentication The destination session info
71
- * @returns {Promise<any>}
72
- */
73
- export declare function postProcess(itemId: string, type: string, itemInfos: any[], template: common.IItemTemplate, templates: common.IItemTemplate[], templateDictionary: any, authentication: common.UserSession): Promise<any>;
@@ -1,164 +0,0 @@
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.postProcess = exports.fineTuneCreatedItem = exports.deleteProps = exports.postProcessNotebookTemplates = exports.convertNotebookToTemplate = exports.createItemFromTemplate = exports.convertItemToTemplate = void 0;
19
- const tslib_1 = require("tslib");
20
- const common = tslib_1.__importStar(require("@esri/solution-common"));
21
- // Need to import collectively to enable spying
22
- const notebookHelpers = tslib_1.__importStar(require("./helpers/notebook-helpers"));
23
- /**
24
- * Converts a notebook 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 notebookHelpers.convertItemToTemplate(itemInfo, destAuthentication, srcAuthentication, templateDictionary);
37
- }
38
- exports.convertItemToTemplate = convertItemToTemplate;
39
- // Delegate back to simple-types
40
- // This is a temporary refactor step
41
- function createItemFromTemplate(template, templateDictionary, destinationAuthentication, itemProgressCallback) {
42
- return notebookHelpers.createItemFromTemplate(template, templateDictionary, destinationAuthentication, itemProgressCallback);
43
- }
44
- exports.createItemFromTemplate = createItemFromTemplate;
45
- /**
46
- * Converts a Python Notebook item to a template.
47
- *
48
- * @param itemTemplate template for the Python Notebook
49
- * @returns templatized itemTemplate
50
- */
51
- function convertNotebookToTemplate(itemTemplate) {
52
- return new Promise((resolve) => {
53
- deleteProps(itemTemplate.data);
54
- resolve(itemTemplate);
55
- });
56
- }
57
- exports.convertNotebookToTemplate = convertNotebookToTemplate;
58
- /**
59
- * Swap any ids found in the items data section with itemId variables
60
- *
61
- * @param templates IItemTemplate[] all templates for the current solution
62
- * @param templateDictionary Hash of facts: folder id, org URL, adlib replacements
63
- * @returns templatized IItemTemplate[]
64
- */
65
- function postProcessNotebookTemplates(templates, templateDictionary) {
66
- const hasNotebook = templates.some((t) => {
67
- return t.type === "Notebook";
68
- });
69
- if (hasNotebook) {
70
- const fsUrlKeys = Object.keys(templateDictionary)
71
- .filter((k) => k.indexOf("FeatureServer") > -1)
72
- .sort()
73
- .reverse();
74
- const ids = templates.reduce((prev, cur) => {
75
- prev = [...new Set([...prev, ...cur.dependencies, cur.itemId])];
76
- return prev;
77
- }, []);
78
- templates = templates.map((t) => {
79
- if (t.type === "Notebook") {
80
- let dataString = t.data && JSON.stringify(t.data);
81
- ids.forEach((id) => {
82
- const idTest = new RegExp(id, "gim");
83
- if (idTest.test(dataString)) {
84
- dataString = dataString.replace(id, "{{" + id + ".itemId}}");
85
- if (t.dependencies.indexOf(id) < 0) {
86
- t.dependencies.push(id);
87
- }
88
- }
89
- });
90
- fsUrlKeys.forEach((url) => {
91
- const urlTest = new RegExp(url, "gim");
92
- if (urlTest.test(dataString)) {
93
- const urlVar = templateDictionary[url];
94
- dataString = dataString.replace(urlTest, urlVar);
95
- const idTest = /[0-9A-F]{32}/gim;
96
- const id = urlVar.match(idTest)[0];
97
- if (t.dependencies.indexOf(id) < 0) {
98
- t.dependencies.push(id);
99
- }
100
- }
101
- });
102
- t.data = JSON.parse(dataString);
103
- return t;
104
- }
105
- });
106
- }
107
- return templates;
108
- }
109
- exports.postProcessNotebookTemplates = postProcessNotebookTemplates;
110
- /**
111
- * Remove interpreter and papermill props
112
- *
113
- * This function will update the data passed in by removing key props
114
- *
115
- * @param data The notebooks data object
116
- *
117
- */
118
- function deleteProps(data) {
119
- /* istanbul ignore else */
120
- if (data) {
121
- const props = ["metadata.interpreter", "metadata.papermill"];
122
- common.deleteProps(data, props);
123
- (data.cells || []).forEach((cell) => {
124
- common.deleteProps(cell, props);
125
- });
126
- }
127
- }
128
- exports.deleteProps = deleteProps;
129
- /**
130
- * Update the notebooks data
131
- *
132
- * @param originalTemplate The original template item
133
- * @param newlyCreatedItem The current item that may have unswapped variables
134
- * @param templateDictionary Hash of facts: org URL, adlib replacements, deferreds for dependencies
135
- * @param authentication Credentials for the requests to the destination
136
- *
137
- * @returns A promise that will resolve once any updates have been made
138
- */
139
- function fineTuneCreatedItem(originalTemplate, newlyCreatedItem, templateDictionary, authentication) {
140
- return new Promise((resolve, reject) => {
141
- const updateOptions = {
142
- id: newlyCreatedItem.itemId,
143
- url: newlyCreatedItem.item.url,
144
- data: common.jsonToFile(newlyCreatedItem.data, newlyCreatedItem.itemId + ".ipynb"),
145
- };
146
- common.updateItem(updateOptions, authentication).then(() => resolve(null), reject);
147
- });
148
- }
149
- exports.fineTuneCreatedItem = fineTuneCreatedItem;
150
- /**
151
- * Notebook specific post-processing actions
152
- *
153
- * @param {string} itemId The item ID
154
- * @param {string} type The template type
155
- * @param {any[]} itemInfos Array of \{id: 'ef3', type: 'Web Map'\} objects
156
- * @param {any} templateDictionary The template dictionary
157
- * @param {UserSession} authentication The destination session info
158
- * @returns {Promise<any>}
159
- */
160
- function postProcess(itemId, type, itemInfos, template, templates, templateDictionary, authentication) {
161
- return common.updateItemTemplateFromDictionary(itemId, templateDictionary, authentication);
162
- }
163
- exports.postProcess = postProcess;
164
- //# sourceMappingURL=notebook.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"notebook.js","sourceRoot":"","sources":["../../src/notebook.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;;AAEH,sEAAgD;AAChD,+CAA+C;AAC/C,oFAA8D;AAE9D;;;;;;;;GAQG;AACH,SAAgB,qBAAqB,CACnC,QAAa,EACb,kBAAsC,EACtC,iBAAqC,EACrC,kBAAuB;IAEvB,6DAA6D;IAC7D,mEAAmE;IACnE,oCAAoC;IACpC,OAAO,eAAe,CAAC,qBAAqB,CAAC,QAAQ,EAAE,kBAAkB,EAAE,iBAAiB,EAAE,kBAAkB,CAAC,CAAC;AACpH,CAAC;AAVD,sDAUC;AAED,gCAAgC;AAChC,oCAAoC;AACpC,SAAgB,sBAAsB,CACpC,QAA8B,EAC9B,kBAAuB,EACvB,yBAA6C,EAC7C,oBAAkD;IAElD,OAAO,eAAe,CAAC,sBAAsB,CAC3C,QAAQ,EACR,kBAAkB,EAClB,yBAAyB,EACzB,oBAAoB,CACrB,CAAC;AACJ,CAAC;AAZD,wDAYC;AAED;;;;;GAKG;AACH,SAAgB,yBAAyB,CAAC,YAAkC;IAC1E,OAAO,IAAI,OAAO,CAAuB,CAAC,OAAO,EAAE,EAAE;QACnD,WAAW,CAAC,YAAY,CAAC,IAAI,CAAC,CAAC;QAC/B,OAAO,CAAC,YAAY,CAAC,CAAC;IACxB,CAAC,CAAC,CAAC;AACL,CAAC;AALD,8DAKC;AAED;;;;;;GAMG;AACH,SAAgB,4BAA4B,CAC1C,SAAiC,EACjC,kBAAuB;IAEvB,MAAM,WAAW,GAAG,SAAS,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE;QACvC,OAAO,CAAC,CAAC,IAAI,KAAK,UAAU,CAAC;IAC/B,CAAC,CAAC,CAAC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jC,gBAAsC,EACtC,gBAAsC,EACtC,kBAAuB,EACvB,cAAkC;IAElC,OAAO,IAAI,OAAO,CAAO,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE;QAC3C,MAAM,aAAa,GAAuB;YACxC,EAAE,EAAE,gBAAgB,CAAC,MAAM;YAC3B,GAAG,EAAE,gBAAgB,CAAC,IAAI,CAAC,GAAG;YAC9B,IAAI,EAAE,MAAM,CAAC,UAAU,CAAC,gBAAgB,CAAC,IAAI,EAAE,gBAAgB,CAAC,MAAM,GAAG,QAAQ,CAAC;SACnF,CAAC;QACF,MAAM,CAAC,UAAU,CAAC,aAAa,EAAE,cAAc,CAAC,CAAC,IAAI,CAAC,GAAG,EAAE,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC,CAAC;IACrF,CAAC,CAAC,CAAC;AACL,CAAC;AAdD,kDAcC;AAED;;;;;;;;;GASG;AACH,SAAgB,WAAW,CACzB,MAAc,EACd,IAAY,EACZ,SAAgB,EAChB,QAA8B,EAC9B,SAAiC,EACjC,kBAAuB,EACvB,cAAkC;IAElC,OAAO,MAAM,CAAC,gCAAgC,CAAC,MAAM,EAAE,kBAAkB,EAAE,cAAc,CAAC,CAAC;AAC7F,CAAC;AAVD,kCAUC"}
package/dist/cjs/oic.d.ts DELETED
@@ -1,53 +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 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 DELETED
@@ -1,170 +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._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 !== itemTemplate.data.properties.ServiceURL) {
66
- layerURLs.push(itemTemplate.data.properties.OverviewURL);
67
- }
68
- _getLayerIds(layerURLs, dependencies, authentication).then((results) => {
69
- resolve(results);
70
- }, (e) => reject(common.fail(e)));
71
- }
72
- else {
73
- resolve({
74
- dependencies: dependencies,
75
- urlHash: {},
76
- });
77
- }
78
- });
79
- }
80
- exports._extractDependencies = _extractDependencies;
81
- /**
82
- * Extracts the AGOL itemId for each layer in a list using the url.
83
- *
84
- * @param layerURLs List of OIC layer URLs
85
- * @param dependencies Current list of dependencies
86
- * @param authentication Credentials for any requests
87
- * @returns List of dependencies ids and url/itemId hash
88
- * @private
89
- */
90
- function _getLayerIds(layerURLs, dependencies, authentication) {
91
- return new Promise((resolve, reject) => {
92
- const urlHash = {};
93
- const options = {
94
- f: "json",
95
- authentication: authentication,
96
- };
97
- const layerPromises = [];
98
- const layerChecks = {};
99
- const filteredLayerURLs = layerURLs.filter((layerURL) => {
100
- if (layerURL) {
101
- const results = /.+FeatureServer/g.exec(layerURL);
102
- const baseUrl = Array.isArray(results) && results.length > 0 ? results[0] : undefined;
103
- if (baseUrl) {
104
- // avoid redundant checks when we have a layer with subLayers
105
- /* istanbul ignore else */
106
- if (Object.keys(layerChecks).indexOf(baseUrl) < 0) {
107
- layerChecks[baseUrl] = common.request(layerURL, options);
108
- }
109
- layerPromises.push(layerChecks[baseUrl]);
110
- return true;
111
- }
112
- else {
113
- return false;
114
- }
115
- }
116
- else {
117
- return false;
118
- }
119
- });
120
- if (layerPromises.length > 0) {
121
- Promise.all(layerPromises).then((serviceResponses) => {
122
- serviceResponses.forEach((serviceResponse, i) => {
123
- /* istanbul ignore else */
124
- if (common.getProp(serviceResponse, "serviceItemId")) {
125
- const id = serviceResponse.serviceItemId;
126
- /* istanbul ignore else */
127
- if (dependencies.indexOf(id) < 0) {
128
- dependencies.push(id);
129
- }
130
- urlHash[filteredLayerURLs[i]] = id;
131
- }
132
- });
133
- resolve({
134
- dependencies: dependencies,
135
- urlHash: urlHash,
136
- });
137
- }, (e) => reject(common.fail(e)));
138
- }
139
- else {
140
- resolve({
141
- dependencies: dependencies,
142
- urlHash: urlHash,
143
- });
144
- }
145
- });
146
- }
147
- exports._getLayerIds = _getLayerIds;
148
- /**
149
- * Templatizes the url and item id for a layer.
150
- *
151
- * @param layerURL OIC layer URL
152
- * @param urlHash Lookup object for analysis layers
153
- * @returns Templatized URL if layerURL is in the urlHash
154
- * @private
155
- */
156
- function _templatizeOicLayerUrl(layerURL, urlHash) {
157
- let templatizedURL = layerURL;
158
- if (layerURL) {
159
- const id = urlHash[layerURL];
160
- if (id) {
161
- const layerId = layerURL.substr(layerURL.lastIndexOf("/") + 1);
162
- templatizedURL = common.templatizeTerm(id, id, ".layer" + layerId + ".url");
163
- }
164
- // replace everything up until /home with portalBaseUrl var and templatize the itemId
165
- templatizedURL = common.templatizeIds(templatizedURL.replace(/.+?(?=\/home)/, "{{portalBaseUrl}}"));
166
- }
167
- return templatizedURL;
168
- }
169
- exports._templatizeOicLayerUrl = _templatizeOicLayerUrl;
170
- //# sourceMappingURL=oic.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"oic.js","sourceRoot":"","sources":["../../src/oic.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;;AAEH,sEAAgD;AAEhD,wHAAwH;AAExH;;;;;;;GAOG;AACH,SAAgB,qBAAqB,CACnC,YAAkC,EAClC,kBAAsC,EACtC,iBAAqC;IAErC,OAAO,IAAI,OAAO,CAAuB,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE;QAC3D,uBAAuB;QACvB,oBAAoB,CAAC,YAAY,EAAE,iBAAiB,CAAC,CAAC,IAAI,CACxD,CAAC,OAAY,EAAE,EAAE;YACf,YAAY,CAAC,YAAY,GAAG,OAAO,CAAC,YAAY,CAAC;YAEjD,0EAA0E;YAC1E,0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CAAC;AA9DD,oCA8DC;AAED;;;;;;;GAOG;AACH,SAAgB,sBAAsB,CAAC,QAAgB,EAAE,OAAY;IACnE,IAAI,cAAc,GAAG,QAAQ,CAAC;IAC9B,IAAI,QAAQ,EAAE;QACZ,MAAM,EAAE,GAAQ,OAAO,CAAC,QAAQ,CAAC,CAAC;QAClC,IAAI,EAAE,EAAE;YACN,MAAM,OAAO,GAAG,QAAQ,CAAC,MAAM,CAAC,QAAQ,CAAC,WAAW,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,CAAC;YAC/D,cAAc,GAAG,MAAM,CAAC,cAAc,CAAC,EAAE,EAAE,EAAE,EAAE,QAAQ,GAAG,OAAO,GAAG,MAAM,CAAC,CAAC;SAC7E;QAED,qFAAqF;QACrF,cAAc,GAAG,MAAM,CAAC,aAAa,CAAC,cAAc,CAAC,OAAO,CAAC,eAAe,EAAE,mBAAmB,CAAC,CAAC,CAAC;KACrG;IACD,OAAO,cAAc,CAAC;AACxB,CAAC;AAbD,wDAaC"}
@@ -1,75 +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 a Quick Capture 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: common.UserSession, srcAuthentication: common.UserSession, templateDictionary: any): Promise<common.IItemTemplate>;
27
- /**
28
- * Converts an quick capture item to a template.
29
- *
30
- * @param itemTemplate template for the quick capture project item
31
- * @returns templatized itemTemplate
32
- */
33
- export declare function convertQuickCaptureToTemplate(itemTemplate: common.IItemTemplate): common.IItemTemplate;
34
- /**
35
- * Templatizes key properties for a quick capture project and gathers item dependencies
36
- *
37
- * @param data the projects json
38
- * @param itemTemplate template for the quick capture project item
39
- * @returns templatized itemTemplate
40
- * @private
41
- */
42
- export declare function _templatizeApplication(data: any, itemTemplate: common.IItemTemplate): any;
43
- /**
44
- * Templatize the email property
45
- *
46
- * @param data the quick capture application
47
- * @private
48
- */
49
- export declare function _templatizeAdminEmail(data: any): void;
50
- /**
51
- * Updates the templates dependencies list with unique item ids
52
- *
53
- * @param id the item id of the dependency
54
- * @param itemTemplate template for the quick capture project item
55
- * @returns templatized itemTemplate
56
- */
57
- export declare function _updateDependencies(id: string, itemTemplate: common.IItemTemplate): void;
58
- /**
59
- * Templatize a url property
60
- *
61
- * @param obj the datasource object
62
- * @param idPath the path to the id property
63
- * @param urlPath the path to the url property
64
- * @private
65
- */
66
- export declare function _templatizeUrl(obj: any, idPath: string, urlPath: string): void;
67
- /**
68
- * Templatize the item id property
69
- *
70
- * @param obj the datasource or object that contains the item id property
71
- * @param path the path to the id property
72
- * @private
73
- */
74
- export declare function _templatizeId(obj: any, path: string): void;
75
- export declare function createItemFromTemplate(template: common.IItemTemplate, templateDictionary: any, destinationAuthentication: common.UserSession, itemProgressCallback: common.IItemProgressCallback): Promise<common.ICreateItemFromTemplateResponse>;