@esri/solution-simple-types 1.3.10 → 1.3.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/esm/dashboard.d.ts +12 -10
- package/dist/esm/dashboard.js +12 -10
- package/dist/esm/dashboard.js.map +1 -1
- package/dist/esm/helpers/convert-item-to-template.d.ts +1 -1
- package/dist/esm/helpers/convert-item-to-template.js +1 -1
- package/dist/esm/notebook.d.ts +3 -3
- package/dist/esm/notebook.js +3 -3
- package/dist/esm/oic.d.ts +7 -7
- package/dist/esm/oic.js +7 -7
- package/dist/esm/quickcapture.d.ts +8 -4
- package/dist/esm/quickcapture.js +8 -4
- package/dist/esm/quickcapture.js.map +1 -1
- package/dist/esm/simple-types.d.ts +2 -2
- package/dist/esm/simple-types.js +2 -2
- package/dist/esm/webmap.d.ts +12 -9
- package/dist/esm/webmap.js +13 -10
- package/dist/esm/webmap.js.map +1 -1
- package/dist/esm/webmappingapplication.d.ts +14 -5
- package/dist/esm/webmappingapplication.js +15 -5
- package/dist/esm/webmappingapplication.js.map +1 -1
- package/dist/esm/workforce.d.ts +2 -2
- package/dist/esm/workforce.js +2 -2
- package/dist/node/dashboard.d.ts +12 -10
- package/dist/node/dashboard.js +12 -10
- package/dist/node/dashboard.js.map +1 -1
- package/dist/node/helpers/convert-item-to-template.d.ts +1 -1
- package/dist/node/helpers/convert-item-to-template.js +1 -1
- package/dist/node/notebook.d.ts +3 -3
- package/dist/node/notebook.js +3 -3
- package/dist/node/oic.d.ts +7 -7
- package/dist/node/oic.js +7 -7
- package/dist/node/quickcapture.d.ts +8 -4
- package/dist/node/quickcapture.js +8 -4
- package/dist/node/quickcapture.js.map +1 -1
- package/dist/node/simple-types.d.ts +2 -2
- package/dist/node/simple-types.js +2 -2
- package/dist/node/webmap.d.ts +12 -9
- package/dist/node/webmap.js +13 -10
- package/dist/node/webmap.js.map +1 -1
- package/dist/node/webmappingapplication.d.ts +14 -5
- package/dist/node/webmappingapplication.js +15 -5
- package/dist/node/webmappingapplication.js.map +1 -1
- package/dist/node/workforce.d.ts +2 -2
- package/dist/node/workforce.js +2 -2
- package/dist/umd/dashboard.d.ts +12 -10
- package/dist/umd/helpers/convert-item-to-template.d.ts +1 -1
- package/dist/umd/notebook.d.ts +3 -3
- package/dist/umd/oic.d.ts +7 -7
- package/dist/umd/quickcapture.d.ts +8 -4
- package/dist/umd/simple-types.d.ts +2 -2
- package/dist/umd/simple-types.umd.js +65 -46
- package/dist/umd/simple-types.umd.js.map +1 -1
- package/dist/umd/simple-types.umd.min.js +2 -2
- package/dist/umd/simple-types.umd.min.js.map +1 -1
- package/dist/umd/webmap.d.ts +12 -9
- package/dist/umd/webmappingapplication.d.ts +14 -5
- package/dist/umd/workforce.d.ts +2 -2
- package/package.json +13 -12
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/* @preserve
|
|
2
|
-
* @esri/solution-simple-types - v1.3.
|
|
2
|
+
* @esri/solution-simple-types - v1.3.13 - Apache-2.0
|
|
3
3
|
* Copyright (c) 2018-2022 Esri, Inc.
|
|
4
|
-
* Tue
|
|
4
|
+
* Tue Apr 26 2022 15:04:36 GMT-0700 (Pacific Daylight Time)
|
|
5
5
|
*
|
|
6
6
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
7
7
|
* you may not use this file except in compliance with the License.
|
|
@@ -60,7 +60,7 @@
|
|
|
60
60
|
* Converts a dashboard item to a template.
|
|
61
61
|
*
|
|
62
62
|
* @param itemTemplate Template for the dashboard item
|
|
63
|
-
* @
|
|
63
|
+
* @returns templatized itemTemplate
|
|
64
64
|
*/
|
|
65
65
|
function convertItemToTemplate$8(itemTemplate) {
|
|
66
66
|
return _extractDependencies$3(itemTemplate);
|
|
@@ -69,8 +69,9 @@
|
|
|
69
69
|
* Templatizes all itemIds and updates the dependency array
|
|
70
70
|
*
|
|
71
71
|
* @param itemTemplate Template for the dashboard item
|
|
72
|
-
* @
|
|
73
|
-
* @
|
|
72
|
+
* @returns The updated itemTemplate
|
|
73
|
+
* @private
|
|
74
|
+
* @private
|
|
74
75
|
*/
|
|
75
76
|
function _extractDependencies$3(itemTemplate) {
|
|
76
77
|
// get dependencies from any
|
|
@@ -106,6 +107,7 @@
|
|
|
106
107
|
*
|
|
107
108
|
* @param obj A widget, selector, or urlParameter that contains a datasets collection
|
|
108
109
|
* @param itemTemplate Template for the dashboard item
|
|
110
|
+
* @private
|
|
109
111
|
*/
|
|
110
112
|
function _getDatasourceDependencies(obj, itemTemplate) {
|
|
111
113
|
obj.datasets.forEach((dataset) => {
|
|
@@ -155,7 +157,7 @@
|
|
|
155
157
|
*
|
|
156
158
|
* @param objs Thes can be widgets, selectors, or urlParameters
|
|
157
159
|
* @param datasourceInfos A list of objects that contain key details about the datasources from the application
|
|
158
|
-
* @
|
|
160
|
+
* @private
|
|
159
161
|
*/
|
|
160
162
|
function _updateDatasourceReferences(objs, datasourceInfos) {
|
|
161
163
|
// objects can be events or widgets
|
|
@@ -206,7 +208,7 @@
|
|
|
206
208
|
* @param itemTemplate Template for the dashboard item
|
|
207
209
|
* @param path A property path to an array of objects that could contain datasets or events
|
|
208
210
|
* @param datasourceInfos A list of objects that contain key details about the datasources from the application
|
|
209
|
-
* @
|
|
211
|
+
* @private
|
|
210
212
|
*/
|
|
211
213
|
function _templatize$1(itemTemplate, path, datasourceInfos) {
|
|
212
214
|
const obj = common__namespace.getProp(itemTemplate, path);
|
|
@@ -220,8 +222,8 @@
|
|
|
220
222
|
*
|
|
221
223
|
* @param objs A list of objects that can contain field references
|
|
222
224
|
* @param datasourceInfos A list of objects that contain key details about the datasources from the application
|
|
223
|
-
* @
|
|
224
|
-
* @
|
|
225
|
+
* @returns An updated list of objects with templatized field references
|
|
226
|
+
* @private
|
|
225
227
|
*/
|
|
226
228
|
function _templatizeByDatasource(objs, datasourceInfos) {
|
|
227
229
|
if (Array.isArray(objs)) {
|
|
@@ -294,8 +296,8 @@
|
|
|
294
296
|
*
|
|
295
297
|
* @param obj Can be a Dataset or an event
|
|
296
298
|
* @param datasourceInfos A list of objects that contain key details about the datasources from the application
|
|
297
|
-
* @
|
|
298
|
-
* @
|
|
299
|
+
* @returns The supporting datasource info for the given object
|
|
300
|
+
* @private
|
|
299
301
|
*/
|
|
300
302
|
function _getDatasourceInfo$1(obj, datasourceInfos) {
|
|
301
303
|
let info;
|
|
@@ -339,7 +341,7 @@
|
|
|
339
341
|
*
|
|
340
342
|
* @param ds The datasource info to add the reference to
|
|
341
343
|
* @param id The id from dashboard object, commonly another widget
|
|
342
|
-
* @
|
|
344
|
+
* @private
|
|
343
345
|
*/
|
|
344
346
|
function _updateReferences(ds, id) {
|
|
345
347
|
ds.references = Array.isArray(ds.references) ? ds.references : [];
|
|
@@ -370,7 +372,7 @@
|
|
|
370
372
|
* @param itemInfo Info about the item
|
|
371
373
|
* @param destAuthentication Credentials for requests to the destination organization
|
|
372
374
|
* @param srcAuthentication Credentials for requests to source items
|
|
373
|
-
* @
|
|
375
|
+
* @returns A promise that will resolve when the template has been created
|
|
374
376
|
*/
|
|
375
377
|
function convertItemToTemplate$7(itemTemplate, destAuthentication, srcAuthentication) {
|
|
376
378
|
return new Promise((resolve, reject) => {
|
|
@@ -639,8 +641,8 @@
|
|
|
639
641
|
* Gets the ids of the dependencies of an AGOL webapp item.
|
|
640
642
|
*
|
|
641
643
|
* @param fullItem A webapp item whose dependencies are sought
|
|
642
|
-
* @
|
|
643
|
-
* @
|
|
644
|
+
* @returns A promise that will resolve with list of dependent ids
|
|
645
|
+
* @private
|
|
644
646
|
*/
|
|
645
647
|
function _extractDependencies$2(model) {
|
|
646
648
|
let processor = _getGenericWebAppDependencies;
|
|
@@ -656,11 +658,14 @@
|
|
|
656
658
|
}
|
|
657
659
|
/**
|
|
658
660
|
* Generic Web App Dependencies
|
|
661
|
+
*
|
|
662
|
+
* @private
|
|
659
663
|
*/
|
|
660
664
|
function _getGenericWebAppDependencies(model) {
|
|
661
665
|
const props = ["data.values.webmap", "data.values.group"];
|
|
662
666
|
return common__namespace.getProps(model, props);
|
|
663
667
|
}
|
|
668
|
+
//???
|
|
664
669
|
function _getWABDependencies(model) {
|
|
665
670
|
const deps = [];
|
|
666
671
|
const v = common__namespace.getProp(model, "data.map.itemId");
|
|
@@ -683,7 +688,7 @@
|
|
|
683
688
|
*
|
|
684
689
|
* @param itemTemplate The solution item template
|
|
685
690
|
* @param paths A list of property paths that contain ids
|
|
686
|
-
* @
|
|
691
|
+
* @private
|
|
687
692
|
*/
|
|
688
693
|
function _templatizeIdPaths(itemTemplate, paths) {
|
|
689
694
|
paths.forEach(path => {
|
|
@@ -697,7 +702,7 @@
|
|
|
697
702
|
* @param itemTemplate The solution item template
|
|
698
703
|
* @param path A path to an id property
|
|
699
704
|
* @param id The base id to use when templatizing
|
|
700
|
-
* @
|
|
705
|
+
* @private
|
|
701
706
|
*/
|
|
702
707
|
function _templatizeIdPath(itemTemplate, path, id) {
|
|
703
708
|
common__namespace.setProp(itemTemplate, path, common__namespace.templatizeTerm(id, id, ".itemId"));
|
|
@@ -743,6 +748,7 @@
|
|
|
743
748
|
* @param obj The dataSource or widget object from the web application.
|
|
744
749
|
* @param datasourceInfos A list of datasource info objects that contain key values to templatize field references
|
|
745
750
|
* @returns The dataSource with templatized field references
|
|
751
|
+
* @private
|
|
746
752
|
*/
|
|
747
753
|
function _templatizeObject(obj, datasourceInfos, templatizeKeys = false) {
|
|
748
754
|
obj = _prioritizedTests(obj, datasourceInfos, templatizeKeys);
|
|
@@ -758,6 +764,7 @@
|
|
|
758
764
|
* @param objects A list of widgets or objects from the web application that may contain field references.
|
|
759
765
|
* @param datasourceInfos A list of datasource info objects that contain key values to templatize field references
|
|
760
766
|
* @returns The widgets with templatized field references
|
|
767
|
+
* @private
|
|
761
768
|
*/
|
|
762
769
|
function _templatizeObjectArray(objects, datasourceInfos) {
|
|
763
770
|
const updateKeyObjects = ["SmartEditor", "Screening"];
|
|
@@ -778,6 +785,7 @@
|
|
|
778
785
|
* @param obj The dataSource or widget object from the web application.
|
|
779
786
|
* @param datasourceInfos A list of datasource info objects that contain key values to templatize field references
|
|
780
787
|
* @returns A list of datasourceInfo objects sorted based on the presence of a layers url or id
|
|
788
|
+
* @private
|
|
781
789
|
*/
|
|
782
790
|
function _getReplaceOrder(obj, datasourceInfos) {
|
|
783
791
|
const objString = JSON.stringify(obj);
|
|
@@ -794,6 +802,7 @@
|
|
|
794
802
|
* @param datasourceInfo The datasource object with key properties about the service.
|
|
795
803
|
* @param testString A stringified version of a widget or dataSource
|
|
796
804
|
* @returns The prioritized order for testing
|
|
805
|
+
* @private
|
|
797
806
|
*/
|
|
798
807
|
function _getSortOrder(datasourceInfo, testString) {
|
|
799
808
|
const url = datasourceInfo.url;
|
|
@@ -842,6 +851,7 @@
|
|
|
842
851
|
* @param obj The dataSource or widget object from the application
|
|
843
852
|
* @param datasourceInfos A list of datasource info objects that contain key values to templatize field references
|
|
844
853
|
* @returns An updated instance of the dataSource or widget with as many field references templatized as possible.
|
|
854
|
+
* @private
|
|
845
855
|
*/
|
|
846
856
|
function _prioritizedTests(obj, datasourceInfos, templatizeKeys) {
|
|
847
857
|
const objString = JSON.stringify(obj);
|
|
@@ -883,6 +893,7 @@
|
|
|
883
893
|
* @param obj The dataSource or widget object from the application
|
|
884
894
|
* @param ds A datasourceInfo object to use for testing against the current dataSource or widget
|
|
885
895
|
* @returns The updated instance of the object with as many field references templatized as possible
|
|
896
|
+
* @private
|
|
886
897
|
*/
|
|
887
898
|
function _templatizeParentByURL(obj, ds, templatizeKeys) {
|
|
888
899
|
let clone = {};
|
|
@@ -924,6 +935,7 @@
|
|
|
924
935
|
* @param ds A datasourceInfo object to use for testing against the current dataSource or widget
|
|
925
936
|
* @param id A webmap layer id to test with.
|
|
926
937
|
* @returns The updated instance of the object with as many field references templatized as possible
|
|
938
|
+
* @private
|
|
927
939
|
*/
|
|
928
940
|
function _templatizeParentByWebMapLayerId(obj, ds, id, templatizeKeys) {
|
|
929
941
|
let clone = {};
|
|
@@ -996,7 +1008,7 @@
|
|
|
996
1008
|
* @param itemTemplate template for the workforce project item
|
|
997
1009
|
* @param destAuthentication Credentials for requests to the destination organization
|
|
998
1010
|
* @param srcAuthentication Credentials for requests to source items
|
|
999
|
-
* @
|
|
1011
|
+
* @returns templatized itemTemplate
|
|
1000
1012
|
*/
|
|
1001
1013
|
function convertItemToTemplate$6(itemTemplate, destAuthentication, srcAuthentication) {
|
|
1002
1014
|
return common__namespace.convertWorkforceItemToTemplate(itemTemplate, srcAuthentication);
|
|
@@ -1006,7 +1018,7 @@
|
|
|
1006
1018
|
*
|
|
1007
1019
|
* @param newlyCreatedItem Item to be created; n.b.: this item is modified
|
|
1008
1020
|
* @param destinationAuthentication The session used to create the new item(s)
|
|
1009
|
-
* @
|
|
1021
|
+
* @returns A promise that will resolve with { "success" === true || false }
|
|
1010
1022
|
*/
|
|
1011
1023
|
function fineTuneCreatedItem$1(newlyCreatedItem, destinationAuthentication, templateDictionary) {
|
|
1012
1024
|
return common__namespace.fineTuneCreatedWorkforceItem(newlyCreatedItem, destinationAuthentication, "", templateDictionary);
|
|
@@ -1210,7 +1222,7 @@
|
|
|
1210
1222
|
* @param destAuthentication Credentials for requests to the destination organization
|
|
1211
1223
|
* @param srcAuthentication Credentials for requests to source items
|
|
1212
1224
|
* @param templateDictionary Hash of facts: folder id, org URL, adlib replacements
|
|
1213
|
-
* @
|
|
1225
|
+
* @returns A promise that will resolve when the template has been created
|
|
1214
1226
|
*/
|
|
1215
1227
|
function convertItemToTemplate$5(solutionItemId, itemInfo, destAuthentication, srcAuthentication, templateDictionary) {
|
|
1216
1228
|
// Delegate back to simple-types, which will in-turn delegate
|
|
@@ -1227,7 +1239,7 @@
|
|
|
1227
1239
|
* Converts a Python Notebook item to a template.
|
|
1228
1240
|
*
|
|
1229
1241
|
* @param itemTemplate template for the Python Notebook
|
|
1230
|
-
* @
|
|
1242
|
+
* @returns templatized itemTemplate
|
|
1231
1243
|
*/
|
|
1232
1244
|
function convertNotebookToTemplate(itemTemplate) {
|
|
1233
1245
|
// The templates data to process
|
|
@@ -1280,7 +1292,7 @@
|
|
|
1280
1292
|
* @param templateDictionary Hash of facts: org URL, adlib replacements, deferreds for dependencies
|
|
1281
1293
|
* @param authentication Credentials for the requests to the destination
|
|
1282
1294
|
*
|
|
1283
|
-
* @
|
|
1295
|
+
* @returns A promise that will resolve once any updates have been made
|
|
1284
1296
|
*/
|
|
1285
1297
|
function fineTuneCreatedItem(originalTemplate, newlyCreatedItem, templateDictionary, authentication) {
|
|
1286
1298
|
return new Promise((resolve, reject) => {
|
|
@@ -1340,7 +1352,7 @@
|
|
|
1340
1352
|
* @param itemTemplate Template for the OIC (Oriented Imagery Catalog) item
|
|
1341
1353
|
* @param destAuthentication Credentials for requests to the destination organization
|
|
1342
1354
|
* @param srcAuthentication Credentials for requests to source items
|
|
1343
|
-
* @
|
|
1355
|
+
* @returns Template for the solution item that contains key details for item reconstruction
|
|
1344
1356
|
*/
|
|
1345
1357
|
function convertItemToTemplate$4(itemTemplate, destAuthentication, srcAuthentication) {
|
|
1346
1358
|
return new Promise((resolve, reject) => {
|
|
@@ -1362,8 +1374,8 @@
|
|
|
1362
1374
|
*
|
|
1363
1375
|
* @param itemTemplate A OIC (Oriented Imagery Catalog) item whose dependencies are sought
|
|
1364
1376
|
* @param authentication Credentials for any requests
|
|
1365
|
-
* @
|
|
1366
|
-
* @
|
|
1377
|
+
* @returns List of dependencies ids and url/itemId hash
|
|
1378
|
+
* @private
|
|
1367
1379
|
*/
|
|
1368
1380
|
function _extractDependencies$1(itemTemplate, authentication) {
|
|
1369
1381
|
return new Promise((resolve, reject) => {
|
|
@@ -1398,8 +1410,8 @@
|
|
|
1398
1410
|
* @param layerURLs List of OIC layer URLs
|
|
1399
1411
|
* @param dependencies Current list of dependencies
|
|
1400
1412
|
* @param authentication Credentials for any requests
|
|
1401
|
-
* @
|
|
1402
|
-
* @
|
|
1413
|
+
* @returns List of dependencies ids and url/itemId hash
|
|
1414
|
+
* @private
|
|
1403
1415
|
*/
|
|
1404
1416
|
function _getLayerIds$1(layerURLs, dependencies, authentication) {
|
|
1405
1417
|
return new Promise((resolve, reject) => {
|
|
@@ -1463,8 +1475,8 @@
|
|
|
1463
1475
|
*
|
|
1464
1476
|
* @param layerURL OIC layer URL
|
|
1465
1477
|
* @param urlHash Lookup object for analysis layers
|
|
1466
|
-
* @
|
|
1467
|
-
* @
|
|
1478
|
+
* @returns Templatized URL if layerURL is in the urlHash
|
|
1479
|
+
* @private
|
|
1468
1480
|
*/
|
|
1469
1481
|
function _templatizeOicLayerUrl(layerURL, urlHash) {
|
|
1470
1482
|
let templatizedURL = layerURL;
|
|
@@ -1526,7 +1538,7 @@
|
|
|
1526
1538
|
* @param destAuthentication Credentials for requests to the destination organization
|
|
1527
1539
|
* @param srcAuthentication Credentials for requests to source items
|
|
1528
1540
|
* @param templateDictionary Hash of facts: folder id, org URL, adlib replacements
|
|
1529
|
-
* @
|
|
1541
|
+
* @returns A promise that will resolve when the template has been created
|
|
1530
1542
|
*/
|
|
1531
1543
|
function convertItemToTemplate$3(solutionItemId, itemInfo, destAuthentication, srcAuthentication, templateDictionary) {
|
|
1532
1544
|
// Delegate back to simple-types, which will in-turn delegate
|
|
@@ -1538,7 +1550,7 @@
|
|
|
1538
1550
|
* Converts an quick capture item to a template.
|
|
1539
1551
|
*
|
|
1540
1552
|
* @param itemTemplate template for the quick capture project item
|
|
1541
|
-
* @
|
|
1553
|
+
* @returns templatized itemTemplate
|
|
1542
1554
|
*/
|
|
1543
1555
|
function convertQuickCaptureToTemplate(itemTemplate) {
|
|
1544
1556
|
return new Promise((resolve, reject) => {
|
|
@@ -1575,7 +1587,8 @@
|
|
|
1575
1587
|
*
|
|
1576
1588
|
* @param data the projects json
|
|
1577
1589
|
* @param itemTemplate template for the quick capture project item
|
|
1578
|
-
* @
|
|
1590
|
+
* @returns templatized itemTemplate
|
|
1591
|
+
* @private
|
|
1579
1592
|
*/
|
|
1580
1593
|
function _templatizeApplication(data, itemTemplate) {
|
|
1581
1594
|
// Quick Project item id
|
|
@@ -1600,6 +1613,7 @@
|
|
|
1600
1613
|
* Templatize the email property
|
|
1601
1614
|
*
|
|
1602
1615
|
* @param data the quick capture application
|
|
1616
|
+
* @private
|
|
1603
1617
|
*/
|
|
1604
1618
|
function _templatizeAdminEmail(data) {
|
|
1605
1619
|
if (common__namespace.getProp(data, "preferences.adminEmail")) {
|
|
@@ -1611,7 +1625,7 @@
|
|
|
1611
1625
|
*
|
|
1612
1626
|
* @param id the item id of the dependency
|
|
1613
1627
|
* @param itemTemplate template for the quick capture project item
|
|
1614
|
-
* @
|
|
1628
|
+
* @returns templatized itemTemplate
|
|
1615
1629
|
*/
|
|
1616
1630
|
function _updateDependencies(id, itemTemplate) {
|
|
1617
1631
|
if (itemTemplate.dependencies.indexOf(id) === -1) {
|
|
@@ -1624,6 +1638,7 @@
|
|
|
1624
1638
|
* @param obj the datasource object
|
|
1625
1639
|
* @param idPath the path to the id property
|
|
1626
1640
|
* @param urlPath the path to the url property
|
|
1641
|
+
* @private
|
|
1627
1642
|
*/
|
|
1628
1643
|
function _templatizeUrl(obj, idPath, urlPath) {
|
|
1629
1644
|
const id = common__namespace.getProp(obj, idPath);
|
|
@@ -1638,6 +1653,7 @@
|
|
|
1638
1653
|
*
|
|
1639
1654
|
* @param obj the datasource or object that contains the item id property
|
|
1640
1655
|
* @param path the path to the id property
|
|
1656
|
+
* @private
|
|
1641
1657
|
*/
|
|
1642
1658
|
function _templatizeId(obj, path) {
|
|
1643
1659
|
const id = common__namespace.getProp(obj, path);
|
|
@@ -1707,7 +1723,7 @@
|
|
|
1707
1723
|
/**
|
|
1708
1724
|
* The portion of a Webmap URL between the server and the map id.
|
|
1709
1725
|
*
|
|
1710
|
-
* @
|
|
1726
|
+
* @private
|
|
1711
1727
|
*/
|
|
1712
1728
|
const WEBMAP_APP_URL_PART = "home/webmap/viewer.html?webmap=";
|
|
1713
1729
|
// ------------------------------------------------------------------------------------------------------------------ //
|
|
@@ -1717,7 +1733,7 @@
|
|
|
1717
1733
|
* @param itemTemplate Template for the webmap item
|
|
1718
1734
|
* @param destAuthentication Credentials for requests to the destination organization
|
|
1719
1735
|
* @param srcAuthentication Credentials for requests to source items
|
|
1720
|
-
* @
|
|
1736
|
+
* @returns Template for the solution item that contains key details for item reconstruction
|
|
1721
1737
|
*/
|
|
1722
1738
|
function convertItemToTemplate$2(itemTemplate, destAuthentication, srcAuthentication) {
|
|
1723
1739
|
return new Promise((resolve, reject) => {
|
|
@@ -1745,8 +1761,8 @@
|
|
|
1745
1761
|
*
|
|
1746
1762
|
* @param itemTemplate A webmap item whose dependencies are sought
|
|
1747
1763
|
* @param authentication Credentials for any requests
|
|
1748
|
-
* @
|
|
1749
|
-
* @
|
|
1764
|
+
* @returns List of dependencies ids and url/itemId hash
|
|
1765
|
+
* @private
|
|
1750
1766
|
*/
|
|
1751
1767
|
function _extractDependencies(itemTemplate, authentication) {
|
|
1752
1768
|
return new Promise((resolve, reject) => {
|
|
@@ -1774,8 +1790,8 @@
|
|
|
1774
1790
|
* Added for issue #662
|
|
1775
1791
|
*
|
|
1776
1792
|
* @param data the data for the web maps item template
|
|
1777
|
-
* @
|
|
1778
|
-
* @
|
|
1793
|
+
* @returns void
|
|
1794
|
+
* @private
|
|
1779
1795
|
*/
|
|
1780
1796
|
function _excludeInitialState(data) {
|
|
1781
1797
|
common__namespace.deleteProp(data, "initialState");
|
|
@@ -1786,8 +1802,8 @@
|
|
|
1786
1802
|
* @param layerList List of map layers or tables
|
|
1787
1803
|
* @param dependencies Current list of dependencies
|
|
1788
1804
|
* @param authentication Credentials for any requests
|
|
1789
|
-
* @
|
|
1790
|
-
* @
|
|
1805
|
+
* @returns List of dependencies ids and url/itemId hash
|
|
1806
|
+
* @private
|
|
1791
1807
|
*/
|
|
1792
1808
|
function _getLayerIds(layerList, dependencies, authentication) {
|
|
1793
1809
|
return new Promise((resolve, reject) => {
|
|
@@ -1848,8 +1864,8 @@
|
|
|
1848
1864
|
*
|
|
1849
1865
|
* @param layerList List of map layers or tables
|
|
1850
1866
|
* @param urlHash Lookup object for analysis layers
|
|
1851
|
-
* @
|
|
1852
|
-
* @
|
|
1867
|
+
* @returns void
|
|
1868
|
+
* @private
|
|
1853
1869
|
*/
|
|
1854
1870
|
function _templatizeWebmapLayerIdsAndUrls(layerList = [], urlHash) {
|
|
1855
1871
|
layerList.forEach((layer) => {
|
|
@@ -1887,6 +1903,7 @@
|
|
|
1887
1903
|
* @param solutionTemplate The solution item template
|
|
1888
1904
|
* @param datasourceInfos A list of datasource info objects that contain key values to templatize field references
|
|
1889
1905
|
* @param path A string path to the object property to templatize
|
|
1906
|
+
* @private
|
|
1890
1907
|
*/
|
|
1891
1908
|
function _templatizeProperty(solutionTemplate, datasourceInfos, path) {
|
|
1892
1909
|
const objs = common__namespace.getProp(solutionTemplate, path);
|
|
@@ -1900,6 +1917,7 @@
|
|
|
1900
1917
|
* @param objs Can be operationalLayers or tables or appProperties search layers
|
|
1901
1918
|
* @param datasourceInfos A list of datasource info objects that contain key values to templatize field references
|
|
1902
1919
|
* @returns updated instances of the objects
|
|
1920
|
+
* @private
|
|
1903
1921
|
*/
|
|
1904
1922
|
function _templatize(objs, datasourceInfos) {
|
|
1905
1923
|
objs.forEach(obj => {
|
|
@@ -1927,6 +1945,7 @@
|
|
|
1927
1945
|
* @param obj Can be operationalLayer or table or appProperties search layer
|
|
1928
1946
|
* @param datasourceInfos A list of datasource info objects that contain key values to templatize field references
|
|
1929
1947
|
* @returns datasourceInfo for the given object id
|
|
1948
|
+
* @private
|
|
1930
1949
|
*/
|
|
1931
1950
|
function _getDatasourceInfo(obj, datasourceInfos) {
|
|
1932
1951
|
let datasourceInfo;
|
|
@@ -1966,7 +1985,7 @@
|
|
|
1966
1985
|
* @param srcAuthentication Credentials for requests to source items
|
|
1967
1986
|
* @param templateDictionary Hash of facts: folder id, org URL, adlib replacements
|
|
1968
1987
|
*
|
|
1969
|
-
* @
|
|
1988
|
+
* @returns A promise that will resolve when the template has been created
|
|
1970
1989
|
*/
|
|
1971
1990
|
function convertItemToTemplate$1(solutionItemId, itemInfo, destAuthentication, srcAuthentication, templateDictionary) {
|
|
1972
1991
|
return new Promise((resolve, reject) => {
|
|
@@ -2130,7 +2149,7 @@
|
|
|
2130
2149
|
* @param destAuthentication Credentials for requests to the destination organization
|
|
2131
2150
|
* @param srcAuthentication Credentials for requests to source items
|
|
2132
2151
|
* @param templateDictionary Hash of facts: folder id, org URL, adlib replacements
|
|
2133
|
-
* @
|
|
2152
|
+
* @returns A promise that will resolve when the template has been created
|
|
2134
2153
|
*/
|
|
2135
2154
|
function convertItemToTemplate(solutionItemId, itemInfo, destAuthentication, srcAuthentication, templateDictionary) {
|
|
2136
2155
|
return convertItemToTemplate$1(solutionItemId, itemInfo, destAuthentication, srcAuthentication, templateDictionary);
|
|
@@ -2153,7 +2172,7 @@
|
|
|
2153
2172
|
* @param template A solution template
|
|
2154
2173
|
* @param datasourceInfos A list of objects that store key datasource info used to templatizing field references
|
|
2155
2174
|
* @param type The item type
|
|
2156
|
-
* @
|
|
2175
|
+
* @returns The updated solution template
|
|
2157
2176
|
*/
|
|
2158
2177
|
function postProcessFieldReferences(solutionTemplate, datasourceInfos, type) {
|
|
2159
2178
|
switch (type) {
|