@esri/solution-common 1.1.2 → 1.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/esm/completeItem.js +6 -7
- package/dist/esm/completeItem.js.map +1 -1
- package/dist/esm/create-hub-request-options.d.ts +4 -4
- package/dist/esm/create-hub-request-options.js +9 -12
- package/dist/esm/create-hub-request-options.js.map +1 -1
- package/dist/esm/deleteHelpers/deleteEmptyGroups.js +2 -2
- package/dist/esm/deleteHelpers/deleteEmptyGroups.js.map +1 -1
- package/dist/esm/deleteHelpers/deleteGroupIfEmpty.js +15 -15
- package/dist/esm/deleteHelpers/deleteGroupIfEmpty.js.map +1 -1
- package/dist/esm/deleteHelpers/deleteSolutionContents.js +20 -22
- package/dist/esm/deleteHelpers/deleteSolutionContents.js.map +1 -1
- package/dist/esm/deleteHelpers/deleteSolutionFolder.js +10 -10
- package/dist/esm/deleteHelpers/deleteSolutionFolder.js.map +1 -1
- package/dist/esm/deleteHelpers/deleteSolutionItem.js +4 -4
- package/dist/esm/deleteHelpers/deleteSolutionItem.js.map +1 -1
- package/dist/esm/deleteHelpers/reconstructBuildOrderIds.js +1 -1
- package/dist/esm/deleteHelpers/reconstructBuildOrderIds.js.map +1 -1
- package/dist/esm/deleteHelpers/removeItems.js +20 -29
- package/dist/esm/deleteHelpers/removeItems.js.map +1 -1
- package/dist/esm/deleteHelpers/reportProgress.js +3 -6
- package/dist/esm/deleteHelpers/reportProgress.js.map +1 -1
- package/dist/esm/deleteSolution.js +10 -12
- package/dist/esm/deleteSolution.js.map +1 -1
- package/dist/esm/dependencies.js +27 -19
- package/dist/esm/dependencies.js.map +1 -1
- package/dist/esm/featureServiceHelpers.d.ts +6 -0
- package/dist/esm/featureServiceHelpers.js +530 -500
- package/dist/esm/featureServiceHelpers.js.map +1 -1
- package/dist/esm/generalHelpers.js +72 -76
- package/dist/esm/generalHelpers.js.map +1 -1
- package/dist/esm/get-subscription-info.js +5 -3
- package/dist/esm/get-subscription-info.js.map +1 -1
- package/dist/esm/getDeletableSolutionInfo.js +6 -10
- package/dist/esm/getDeletableSolutionInfo.js.map +1 -1
- package/dist/esm/getSolutionSummary.js +15 -19
- package/dist/esm/getSolutionSummary.js.map +1 -1
- package/dist/esm/index.d.ts +1 -0
- package/dist/esm/index.js +1 -0
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/interfaces.d.ts +39 -1
- package/dist/esm/interfaces.js +3 -3
- package/dist/esm/interfaces.js.map +1 -1
- package/dist/esm/libConnectors.js +5 -7
- package/dist/esm/libConnectors.js.map +1 -1
- package/dist/esm/migrations/apply-schema.js +3 -3
- package/dist/esm/migrations/apply-schema.js.map +1 -1
- package/dist/esm/migrations/is-legacy-solution.js +2 -2
- package/dist/esm/migrations/is-legacy-solution.js.map +1 -1
- package/dist/esm/migrations/upgrade-three-dot-one.js +3 -3
- package/dist/esm/migrations/upgrade-three-dot-one.js.map +1 -1
- package/dist/esm/migrations/upgrade-three-dot-zero.js +1 -1
- package/dist/esm/migrations/upgrade-three-dot-zero.js.map +1 -1
- package/dist/esm/migrations/upgrade-two-dot-five.js +17 -8
- package/dist/esm/migrations/upgrade-two-dot-five.js.map +1 -1
- package/dist/esm/migrations/upgrade-two-dot-four.js +12 -12
- package/dist/esm/migrations/upgrade-two-dot-four.js.map +1 -1
- package/dist/esm/migrations/upgrade-two-dot-one.js +1 -1
- package/dist/esm/migrations/upgrade-two-dot-one.js.map +1 -1
- package/dist/esm/migrations/upgrade-two-dot-seven.js +1 -1
- package/dist/esm/migrations/upgrade-two-dot-seven.js.map +1 -1
- package/dist/esm/migrations/upgrade-two-dot-six.js +9 -12
- package/dist/esm/migrations/upgrade-two-dot-six.js.map +1 -1
- package/dist/esm/migrations/upgrade-two-dot-three.js +3 -3
- package/dist/esm/migrations/upgrade-two-dot-three.js.map +1 -1
- package/dist/esm/migrations/upgrade-two-dot-two.js +3 -3
- package/dist/esm/migrations/upgrade-two-dot-two.js.map +1 -1
- package/dist/esm/migrations/upgrade-two-dot-zero.js +8 -9
- package/dist/esm/migrations/upgrade-two-dot-zero.js.map +1 -1
- package/dist/esm/migrator.js +5 -7
- package/dist/esm/migrator.js.map +1 -1
- package/dist/esm/polyfills.js +5 -5
- package/dist/esm/polyfills.js.map +1 -1
- package/dist/esm/resourceHelpers.js +54 -57
- package/dist/esm/resourceHelpers.js.map +1 -1
- package/dist/esm/resources/add-resource-from-blob.js +2 -2
- package/dist/esm/resources/add-resource-from-blob.js.map +1 -1
- package/dist/esm/resources/addMetadataFromBlob.js +1 -1
- package/dist/esm/resources/addMetadataFromBlob.js.map +1 -1
- package/dist/esm/resources/convert-item-resource-to-storage-resource.js +6 -7
- package/dist/esm/resources/convert-item-resource-to-storage-resource.js.map +1 -1
- package/dist/esm/resources/convert-storage-resource-to-item-resource.js +8 -9
- package/dist/esm/resources/convert-storage-resource-to-item-resource.js.map +1 -1
- package/dist/esm/resources/copyAssociatedFiles.js +44 -53
- package/dist/esm/resources/copyAssociatedFiles.js.map +1 -1
- package/dist/esm/resources/copyDataIntoItem.js +5 -11
- package/dist/esm/resources/copyDataIntoItem.js.map +1 -1
- package/dist/esm/resources/copyMetadataIntoItem.js +4 -10
- package/dist/esm/resources/copyMetadataIntoItem.js.map +1 -1
- package/dist/esm/resources/copyResourceIntoZip.js +5 -7
- package/dist/esm/resources/copyResourceIntoZip.js.map +1 -1
- package/dist/esm/resources/copyZipIntoItem.js +5 -9
- package/dist/esm/resources/copyZipIntoItem.js.map +1 -1
- package/dist/esm/resources/createCopyResults.js +5 -2
- package/dist/esm/resources/createCopyResults.js.map +1 -1
- package/dist/esm/resources/get-blob.js +7 -5
- package/dist/esm/resources/get-blob.js.map +1 -1
- package/dist/esm/resources/getItemResourcesFilesFromPaths.js +7 -7
- package/dist/esm/resources/getItemResourcesFilesFromPaths.js.map +1 -1
- package/dist/esm/resources/getItemResourcesPaths.js +7 -8
- package/dist/esm/resources/getItemResourcesPaths.js.map +1 -1
- package/dist/esm/resources/transform-resource-paths-to-solution-resources.js +8 -9
- package/dist/esm/resources/transform-resource-paths-to-solution-resources.js.map +1 -1
- package/dist/esm/restHelpers.d.ts +65 -5
- package/dist/esm/restHelpers.js +422 -276
- package/dist/esm/restHelpers.js.map +1 -1
- package/dist/esm/restHelpersGet.js +102 -111
- package/dist/esm/restHelpersGet.js.map +1 -1
- package/dist/esm/sharing/share-item-to-groups.d.ts +2 -1
- package/dist/esm/sharing/share-item-to-groups.js +12 -6
- package/dist/esm/sharing/share-item-to-groups.js.map +1 -1
- package/dist/esm/templatization.js +64 -40
- package/dist/esm/templatization.js.map +1 -1
- package/dist/esm/trackingHelpers.d.ts +116 -0
- package/dist/esm/trackingHelpers.js +205 -0
- package/dist/esm/trackingHelpers.js.map +1 -0
- package/dist/esm/velocityHelpers.d.ts +2 -0
- package/dist/esm/velocityHelpers.js +30 -12
- package/dist/esm/velocityHelpers.js.map +1 -1
- package/dist/esm/workforceHelpers.d.ts +11 -0
- package/dist/esm/workforceHelpers.js +208 -180
- package/dist/esm/workforceHelpers.js.map +1 -1
- package/dist/node/completeItem.js +8 -9
- package/dist/node/completeItem.js.map +1 -1
- package/dist/node/create-hub-request-options.d.ts +4 -4
- package/dist/node/create-hub-request-options.js +11 -14
- package/dist/node/create-hub-request-options.js.map +1 -1
- package/dist/node/deleteHelpers/deleteEmptyGroups.js +3 -3
- package/dist/node/deleteHelpers/deleteEmptyGroups.js.map +1 -1
- package/dist/node/deleteHelpers/deleteGroupIfEmpty.js +16 -16
- package/dist/node/deleteHelpers/deleteGroupIfEmpty.js.map +1 -1
- package/dist/node/deleteHelpers/deleteSolutionContents.js +26 -28
- package/dist/node/deleteHelpers/deleteSolutionContents.js.map +1 -1
- package/dist/node/deleteHelpers/deleteSolutionFolder.js +11 -11
- package/dist/node/deleteHelpers/deleteSolutionFolder.js.map +1 -1
- package/dist/node/deleteHelpers/deleteSolutionItem.js +6 -6
- package/dist/node/deleteHelpers/deleteSolutionItem.js.map +1 -1
- package/dist/node/deleteHelpers/index.js +1 -1
- package/dist/node/deleteHelpers/reconstructBuildOrderIds.js +2 -2
- package/dist/node/deleteHelpers/reconstructBuildOrderIds.js.map +1 -1
- package/dist/node/deleteHelpers/removeItems.js +26 -35
- package/dist/node/deleteHelpers/removeItems.js.map +1 -1
- package/dist/node/deleteHelpers/reportProgress.js +4 -7
- package/dist/node/deleteHelpers/reportProgress.js.map +1 -1
- package/dist/node/deleteSolution.js +12 -14
- package/dist/node/deleteSolution.js.map +1 -1
- package/dist/node/dependencies.js +29 -21
- package/dist/node/dependencies.js.map +1 -1
- package/dist/node/featureServiceHelpers.d.ts +6 -0
- package/dist/node/featureServiceHelpers.js +535 -504
- package/dist/node/featureServiceHelpers.js.map +1 -1
- package/dist/node/generalHelpers.js +75 -79
- package/dist/node/generalHelpers.js.map +1 -1
- package/dist/node/get-subscription-info.js +7 -5
- package/dist/node/get-subscription-info.js.map +1 -1
- package/dist/node/getDeletableSolutionInfo.js +8 -12
- package/dist/node/getDeletableSolutionInfo.js.map +1 -1
- package/dist/node/getSolutionSummary.js +19 -23
- package/dist/node/getSolutionSummary.js.map +1 -1
- package/dist/node/index.d.ts +1 -0
- package/dist/node/index.js +2 -1
- package/dist/node/index.js.map +1 -1
- package/dist/node/interfaces.d.ts +39 -1
- package/dist/node/interfaces.js.map +1 -1
- package/dist/node/libConnectors.js +8 -10
- package/dist/node/libConnectors.js.map +1 -1
- package/dist/node/migrations/apply-schema.js +4 -4
- package/dist/node/migrations/apply-schema.js.map +1 -1
- package/dist/node/migrations/is-legacy-solution.js +3 -3
- package/dist/node/migrations/is-legacy-solution.js.map +1 -1
- package/dist/node/migrations/upgrade-three-dot-one.js +5 -5
- package/dist/node/migrations/upgrade-three-dot-one.js.map +1 -1
- package/dist/node/migrations/upgrade-three-dot-zero.js +2 -2
- package/dist/node/migrations/upgrade-three-dot-zero.js.map +1 -1
- package/dist/node/migrations/upgrade-two-dot-five.js +18 -9
- package/dist/node/migrations/upgrade-two-dot-five.js.map +1 -1
- package/dist/node/migrations/upgrade-two-dot-four.js +13 -13
- package/dist/node/migrations/upgrade-two-dot-four.js.map +1 -1
- package/dist/node/migrations/upgrade-two-dot-one.js +2 -2
- package/dist/node/migrations/upgrade-two-dot-one.js.map +1 -1
- package/dist/node/migrations/upgrade-two-dot-seven.js +2 -2
- package/dist/node/migrations/upgrade-two-dot-seven.js.map +1 -1
- package/dist/node/migrations/upgrade-two-dot-six.js +10 -13
- package/dist/node/migrations/upgrade-two-dot-six.js.map +1 -1
- package/dist/node/migrations/upgrade-two-dot-three.js +5 -5
- package/dist/node/migrations/upgrade-two-dot-three.js.map +1 -1
- package/dist/node/migrations/upgrade-two-dot-two.js +5 -5
- package/dist/node/migrations/upgrade-two-dot-two.js.map +1 -1
- package/dist/node/migrations/upgrade-two-dot-zero.js +9 -10
- package/dist/node/migrations/upgrade-two-dot-zero.js.map +1 -1
- package/dist/node/migrator.js +16 -18
- package/dist/node/migrator.js.map +1 -1
- package/dist/node/polyfills.js +5 -5
- package/dist/node/polyfills.js.map +1 -1
- package/dist/node/resourceHelpers.js +62 -65
- package/dist/node/resourceHelpers.js.map +1 -1
- package/dist/node/resources/add-resource-from-blob.js +4 -4
- package/dist/node/resources/add-resource-from-blob.js.map +1 -1
- package/dist/node/resources/addMetadataFromBlob.js +2 -2
- package/dist/node/resources/addMetadataFromBlob.js.map +1 -1
- package/dist/node/resources/convert-item-resource-to-storage-resource.js +6 -7
- package/dist/node/resources/convert-item-resource-to-storage-resource.js.map +1 -1
- package/dist/node/resources/convert-storage-resource-to-item-resource.js +9 -10
- package/dist/node/resources/convert-storage-resource-to-item-resource.js.map +1 -1
- package/dist/node/resources/copyAssociatedFiles.js +52 -61
- package/dist/node/resources/copyAssociatedFiles.js.map +1 -1
- package/dist/node/resources/copyDataIntoItem.js +9 -15
- package/dist/node/resources/copyDataIntoItem.js.map +1 -1
- package/dist/node/resources/copyMetadataIntoItem.js +7 -13
- package/dist/node/resources/copyMetadataIntoItem.js.map +1 -1
- package/dist/node/resources/copyResourceIntoZip.js +7 -9
- package/dist/node/resources/copyResourceIntoZip.js.map +1 -1
- package/dist/node/resources/copyZipIntoItem.js +8 -12
- package/dist/node/resources/copyZipIntoItem.js.map +1 -1
- package/dist/node/resources/createCopyResults.js +5 -2
- package/dist/node/resources/createCopyResults.js.map +1 -1
- package/dist/node/resources/get-blob.js +8 -6
- package/dist/node/resources/get-blob.js.map +1 -1
- package/dist/node/resources/getItemResourcesFilesFromPaths.js +8 -8
- package/dist/node/resources/getItemResourcesFilesFromPaths.js.map +1 -1
- package/dist/node/resources/getItemResourcesPaths.js +9 -10
- package/dist/node/resources/getItemResourcesPaths.js.map +1 -1
- package/dist/node/resources/index.js +1 -1
- package/dist/node/resources/transform-resource-paths-to-solution-resources.js +10 -11
- package/dist/node/resources/transform-resource-paths-to-solution-resources.js.map +1 -1
- package/dist/node/restHelpers.d.ts +65 -5
- package/dist/node/restHelpers.js +437 -285
- package/dist/node/restHelpers.js.map +1 -1
- package/dist/node/restHelpersGet.js +107 -116
- package/dist/node/restHelpersGet.js.map +1 -1
- package/dist/node/sharing/index.js +1 -1
- package/dist/node/sharing/share-item-to-groups.d.ts +2 -1
- package/dist/node/sharing/share-item-to-groups.js +13 -7
- package/dist/node/sharing/share-item-to-groups.js.map +1 -1
- package/dist/node/templatization.js +61 -37
- package/dist/node/templatization.js.map +1 -1
- package/dist/node/trackingHelpers.d.ts +116 -0
- package/dist/node/trackingHelpers.js +217 -0
- package/dist/node/trackingHelpers.js.map +1 -0
- package/dist/node/velocityHelpers.d.ts +2 -0
- package/dist/node/velocityHelpers.js +33 -15
- package/dist/node/velocityHelpers.js.map +1 -1
- package/dist/node/workforceHelpers.d.ts +11 -0
- package/dist/node/workforceHelpers.js +214 -185
- package/dist/node/workforceHelpers.js.map +1 -1
- package/dist/umd/common.umd.js +14830 -14466
- package/dist/umd/common.umd.js.map +1 -1
- package/dist/umd/common.umd.min.js +3 -3
- package/dist/umd/common.umd.min.js.map +1 -1
- package/dist/umd/create-hub-request-options.d.ts +4 -4
- package/dist/umd/featureServiceHelpers.d.ts +6 -0
- package/dist/umd/index.d.ts +1 -0
- package/dist/umd/interfaces.d.ts +39 -1
- package/dist/umd/restHelpers.d.ts +65 -5
- package/dist/umd/sharing/share-item-to-groups.d.ts +2 -1
- package/dist/umd/trackingHelpers.d.ts +116 -0
- package/dist/umd/velocityHelpers.d.ts +2 -0
- package/dist/umd/workforceHelpers.d.ts +11 -0
- package/package.json +24 -24
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"share-item-to-groups.js","sourceRoot":"","sources":["../../../src/sharing/share-item-to-groups.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAGH,OAAO,
|
|
1
|
+
{"version":3,"file":"share-item-to-groups.js","sourceRoot":"","sources":["../../../src/sharing/share-item-to-groups.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAGH,OAAO,EAAwB,kBAAkB,EAAE,MAAM,0BAA0B,CAAC;AAEpF;;;;;;;;GAQG;AACH,MAAM,UAAU,iBAAiB,CAC/B,QAAkB,EAClB,MAAc,EACd,cAA2B,EAC3B,KAAc;IAEd,OAAO,OAAO,CAAC,GAAG,CAChB,QAAQ,CAAC,GAAG,CAAC,OAAO,CAAC,EAAE;QACrB,MAAM,cAAc,GAAyB;YAC3C,EAAE,EAAE,MAAM;YACV,OAAO;YACP,cAAc;SACf,CAAC;QACF,0BAA0B;QAC1B,IAAI,KAAK,EAAE;YACT,cAAc,CAAC,KAAK,GAAG,KAAK,CAAC;SAC9B;QACD,OAAO,kBAAkB,CAAC,cAAc,CAAC,CAAC;IAC5C,CAAC,CAAC,CACH,CAAC;AACJ,CAAC"}
|
|
@@ -13,7 +13,6 @@
|
|
|
13
13
|
* See the License for the specific language governing permissions and
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
|
-
import { __assign } from "tslib";
|
|
17
16
|
/**
|
|
18
17
|
* Provides common functions involving the adlib library.
|
|
19
18
|
*
|
|
@@ -30,36 +29,36 @@ import { createShortId, getProp } from "./generalHelpers";
|
|
|
30
29
|
*
|
|
31
30
|
* @protected
|
|
32
31
|
*/
|
|
33
|
-
export
|
|
32
|
+
export const SERVER_NAME = "portalBaseUrl";
|
|
34
33
|
/**
|
|
35
34
|
* A parameterized geometry server name
|
|
36
35
|
*
|
|
37
36
|
* @protected
|
|
38
37
|
*/
|
|
39
|
-
export
|
|
38
|
+
export const GEOMETRY_SERVER_NAME = "organization.helperServices.geometry.url";
|
|
40
39
|
/**
|
|
41
40
|
* A parameterized geocode server name
|
|
42
41
|
*
|
|
43
42
|
* @protected
|
|
44
43
|
*/
|
|
45
|
-
export
|
|
44
|
+
export const GEOCODE_SERVER_NAME = "organization.helperServices.geocode:getDefaultLocatorURL";
|
|
46
45
|
/**
|
|
47
46
|
* A parameterized network analyst server name
|
|
48
47
|
*
|
|
49
48
|
* @protected
|
|
50
49
|
*/
|
|
51
|
-
export
|
|
50
|
+
export const NA_SERVER_NAME = "organization.helperServices.route.url";
|
|
52
51
|
/**
|
|
53
52
|
* A parameterized network analyst server name
|
|
54
53
|
*
|
|
55
54
|
* @protected
|
|
56
55
|
*/
|
|
57
|
-
export
|
|
58
|
-
export
|
|
59
|
-
getDefaultLocatorURL
|
|
56
|
+
export const PRINT_SERVER_NAME = "organization.helperServices.printTask.url";
|
|
57
|
+
export const TRANSFORMS = {
|
|
58
|
+
getDefaultLocatorURL(key, val) {
|
|
60
59
|
// get the url from the template dictionary or return the default template variable when it's not present
|
|
61
60
|
// this fallback is needed when we detemplatize living atlas layers as a part of the create process
|
|
62
|
-
return val ? val[0].url :
|
|
61
|
+
return val ? val[0].url : `{{${GEOCODE_SERVER_NAME}}}`;
|
|
63
62
|
}
|
|
64
63
|
};
|
|
65
64
|
/**
|
|
@@ -72,13 +71,41 @@ export function placeholder(term) {
|
|
|
72
71
|
return "{{" + term + "}}";
|
|
73
72
|
}
|
|
74
73
|
export function createInitializedGroupTemplate(itemInfo) {
|
|
75
|
-
|
|
76
|
-
itemTemplate.item =
|
|
74
|
+
const itemTemplate = createPlaceholderTemplate(itemInfo.id, itemInfo.type);
|
|
75
|
+
itemTemplate.item = {
|
|
76
|
+
...itemTemplate.item,
|
|
77
|
+
description: itemInfo.description,
|
|
78
|
+
snippet: itemInfo.snippet,
|
|
79
|
+
tags: itemInfo.tags,
|
|
80
|
+
title: itemInfo.title,
|
|
81
|
+
thumbnail: itemInfo.thumbnail
|
|
82
|
+
};
|
|
77
83
|
return itemTemplate;
|
|
78
84
|
}
|
|
79
85
|
export function createInitializedItemTemplate(itemInfo) {
|
|
80
|
-
|
|
81
|
-
itemTemplate.item =
|
|
86
|
+
const itemTemplate = createPlaceholderTemplate(itemInfo.id, itemInfo.type);
|
|
87
|
+
itemTemplate.item = {
|
|
88
|
+
...itemTemplate.item,
|
|
89
|
+
accessInformation: itemInfo.accessInformation,
|
|
90
|
+
categories: itemInfo.categories,
|
|
91
|
+
contentStatus: itemInfo.contentStatus,
|
|
92
|
+
created: itemInfo.created,
|
|
93
|
+
culture: itemInfo.culture,
|
|
94
|
+
description: itemInfo.description,
|
|
95
|
+
extent: getDefaultExtent(itemInfo),
|
|
96
|
+
licenseInfo: itemInfo.licenseInfo,
|
|
97
|
+
modified: itemInfo.modified,
|
|
98
|
+
name: itemInfo.name,
|
|
99
|
+
origUrl: itemInfo.origUrl,
|
|
100
|
+
properties: itemInfo.properties,
|
|
101
|
+
snippet: itemInfo.snippet,
|
|
102
|
+
spatialReference: undefined,
|
|
103
|
+
tags: itemInfo.tags,
|
|
104
|
+
thumbnail: itemInfo.thumbnail,
|
|
105
|
+
title: itemInfo.title,
|
|
106
|
+
typeKeywords: itemInfo.typeKeywords,
|
|
107
|
+
url: itemInfo.url
|
|
108
|
+
};
|
|
82
109
|
return itemTemplate;
|
|
83
110
|
}
|
|
84
111
|
/**
|
|
@@ -88,15 +115,14 @@ export function createInitializedItemTemplate(itemInfo) {
|
|
|
88
115
|
* @param type AGO item type; defaults to ""
|
|
89
116
|
* @return Empty template containing supplied id, optional type, and a key created using the function createShortId()
|
|
90
117
|
*/
|
|
91
|
-
export function createPlaceholderTemplate(id, type) {
|
|
92
|
-
if (type === void 0) { type = ""; }
|
|
118
|
+
export function createPlaceholderTemplate(id, type = "") {
|
|
93
119
|
return {
|
|
94
120
|
itemId: id,
|
|
95
|
-
type
|
|
121
|
+
type,
|
|
96
122
|
key: createShortId(),
|
|
97
123
|
item: {
|
|
98
|
-
id
|
|
99
|
-
type
|
|
124
|
+
id,
|
|
125
|
+
type
|
|
100
126
|
},
|
|
101
127
|
data: {},
|
|
102
128
|
resources: [],
|
|
@@ -113,7 +139,7 @@ export function createPlaceholderTemplate(id, type) {
|
|
|
113
139
|
* @return Zero-based version number
|
|
114
140
|
*/
|
|
115
141
|
export function extractSolutionVersion(itemData) {
|
|
116
|
-
|
|
142
|
+
let version = getProp(itemData, "metadata.version");
|
|
117
143
|
if (!version) {
|
|
118
144
|
return 0;
|
|
119
145
|
}
|
|
@@ -132,8 +158,8 @@ export function extractSolutionVersion(itemData) {
|
|
|
132
158
|
* @protected
|
|
133
159
|
*/
|
|
134
160
|
export function findTemplateIndexInList(templates, id) {
|
|
135
|
-
|
|
136
|
-
return templates.findIndex(
|
|
161
|
+
const baseId = id;
|
|
162
|
+
return templates.findIndex(template => {
|
|
137
163
|
return baseId === template.itemId;
|
|
138
164
|
});
|
|
139
165
|
}
|
|
@@ -145,20 +171,20 @@ export function findTemplateIndexInList(templates, id) {
|
|
|
145
171
|
* @return Matching template or null
|
|
146
172
|
*/
|
|
147
173
|
export function findTemplateInList(templates, id) {
|
|
148
|
-
|
|
174
|
+
const iTemplate = findTemplateIndexInList(templates, id);
|
|
149
175
|
return iTemplate >= 0 ? templates[iTemplate] : null;
|
|
150
176
|
}
|
|
151
177
|
export function hasUnresolvedVariables(data) {
|
|
152
|
-
|
|
178
|
+
const getUnresolved = (v) => {
|
|
153
179
|
return v ? JSON.stringify(v).match(/{{.+?}}/gim) || [] : [];
|
|
154
180
|
};
|
|
155
181
|
return getUnresolved(data).length > 0;
|
|
156
182
|
}
|
|
157
183
|
export function getIdsInTemplatesList(templates) {
|
|
158
|
-
return templates.map(
|
|
184
|
+
return templates.map(template => template.itemId);
|
|
159
185
|
}
|
|
160
186
|
export function getDefaultExtent(itemInfo) {
|
|
161
|
-
|
|
187
|
+
const ext = itemInfo.extent;
|
|
162
188
|
return ext === null || (Array.isArray(ext) && ext.length === 0)
|
|
163
189
|
? ext
|
|
164
190
|
: "{{solutionItemExtent}}";
|
|
@@ -171,7 +197,7 @@ export function getDefaultExtent(itemInfo) {
|
|
|
171
197
|
* @protected
|
|
172
198
|
*/
|
|
173
199
|
export function removeTemplate(templates, id) {
|
|
174
|
-
|
|
200
|
+
const i = findTemplateIndexInList(templates, id);
|
|
175
201
|
if (i >= 0) {
|
|
176
202
|
templates.splice(i, 1);
|
|
177
203
|
}
|
|
@@ -196,19 +222,18 @@ export function replaceInTemplate(template, replacements) {
|
|
|
196
222
|
* @protected
|
|
197
223
|
*/
|
|
198
224
|
export function replaceTemplate(templates, id, template) {
|
|
199
|
-
|
|
225
|
+
const i = findTemplateIndexInList(templates, id);
|
|
200
226
|
if (i >= 0) {
|
|
201
227
|
templates[i] = template;
|
|
202
228
|
return true;
|
|
203
229
|
}
|
|
204
230
|
return false;
|
|
205
231
|
}
|
|
206
|
-
export function templatizeTerm(context, term, suffix) {
|
|
207
|
-
if (suffix === void 0) { suffix = ""; }
|
|
232
|
+
export function templatizeTerm(context, term, suffix = "") {
|
|
208
233
|
if (!context) {
|
|
209
234
|
return context;
|
|
210
235
|
}
|
|
211
|
-
|
|
236
|
+
const pattern = new RegExp(term, "g");
|
|
212
237
|
return context.replace(pattern, "{{" + term + suffix + "}}");
|
|
213
238
|
}
|
|
214
239
|
/**
|
|
@@ -235,11 +260,10 @@ export function templatizeToLowerCase(basePath, value) {
|
|
|
235
260
|
* "{NAME}"
|
|
236
261
|
* "(NAME = value AND NAME2 = someOtherValue)"
|
|
237
262
|
*/
|
|
238
|
-
export function templatizeFieldReferences(obj, fields, basePath, templatizeKeys) {
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
var expression = "\\b" + field.name + "\\b(?![.])(?![}]{2})";
|
|
263
|
+
export function templatizeFieldReferences(obj, fields, basePath, templatizeKeys = false) {
|
|
264
|
+
let objString = JSON.stringify(obj);
|
|
265
|
+
fields.forEach(field => {
|
|
266
|
+
let expression = "\\b" + field.name + "\\b(?![.])(?![}]{2})";
|
|
243
267
|
if (!templatizeKeys) {
|
|
244
268
|
expression += '(?!":)';
|
|
245
269
|
}
|
|
@@ -252,14 +276,14 @@ export function templatizeFieldReferences(obj, fields, basePath, templatizeKeys)
|
|
|
252
276
|
}
|
|
253
277
|
export function templatizeIds(obj) {
|
|
254
278
|
// Convert object to string
|
|
255
|
-
|
|
279
|
+
let objString = JSON.stringify(obj);
|
|
256
280
|
// Find ids
|
|
257
|
-
|
|
281
|
+
const idTest = /[0-9A-F]{32}/gim;
|
|
258
282
|
if (obj && idTest.test(objString)) {
|
|
259
283
|
// Templatize ids
|
|
260
|
-
|
|
261
|
-
ids.forEach(
|
|
262
|
-
|
|
284
|
+
const ids = objString.match(idTest).filter(unique);
|
|
285
|
+
ids.forEach(id => {
|
|
286
|
+
const regEx = new RegExp(id, "gm");
|
|
263
287
|
objString = objString.replace(regEx, "{{" + id + ".itemId}}");
|
|
264
288
|
});
|
|
265
289
|
obj = JSON.parse(objString);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"templatization.js","sourceRoot":"","sources":["../../src/templatization.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG
|
|
1
|
+
{"version":3,"file":"templatization.js","sourceRoot":"","sources":["../../src/templatization.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH;;;;GAIG;AAEH,OAAO,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAC1C,OAAO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H,OAAO,IAAI,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC;AAC/B,CAAC;AAED,MAAM,UAAU,aAAa,CAAC,GAAQ;IACpC,2BAA2B;IAC3B,IAAI,SAAS,GAAG,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC;IAEpC,WAAW;IACX,MAAM,MAAM,GAAW,iBAAiB,CAAC;IACzC,IAAI,GAAG,IAAI,MAAM,CAAC,IAAI,CAAC,SAAS,CAAC,EAAE;QACjC,iBAAiB;QACjB,MAAM,GAAG,GAAa,SAAS,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;QAC7D,GAAG,CAAC,OAAO,CAAC,EAAE,CAAC,EAAE;YACf,MAAM,KAAK,GAAG,IAAI,MAAM,CAAC,EAAE,EAAE,IAAI,CAAC,CAAC;YACnC,SAAS,GAAG,SAAS,CAAC,OAAO,CAAC,KAAK,EAAE,IAAI,GAAG,EAAE,GAAG,WAAW,CAAC,CAAC;QAChE,CAAC,CAAC,CAAC;QACH,GAAG,GAAG,IAAI,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC;KAC7B;IACD,OAAO,GAAG,CAAC;AACb,CAAC"}
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
/** @license
|
|
2
|
+
* Copyright 2021 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 { IItemTemplate, UserSession } from "./interfaces";
|
|
17
|
+
import { IItemUpdate } from "@esri/arcgis-rest-types";
|
|
18
|
+
import { ICreateServiceParams } from "@esri/arcgis-rest-service-admin";
|
|
19
|
+
/**
|
|
20
|
+
* Used by deploy to evaluate if we have everything we need to deploy tracking views.
|
|
21
|
+
*
|
|
22
|
+
* This function will update the input templateDictionary with a boolean
|
|
23
|
+
* indicating if tracking is enabled on the org and the user is an admin.
|
|
24
|
+
*
|
|
25
|
+
* @param portalResponse portal self response
|
|
26
|
+
* @param userResponse portal user response
|
|
27
|
+
* @param templateDictionary Hash of facts: org URL, adlib replacements, deferreds for dependencies
|
|
28
|
+
* @param templates the list of IItemTemplates from the solution
|
|
29
|
+
*
|
|
30
|
+
* @protected
|
|
31
|
+
*/
|
|
32
|
+
export declare function setLocationTrackingEnabled(portalResponse: any, userResponse: any, templateDictionary: any, templates?: IItemTemplate[]): void;
|
|
33
|
+
/**
|
|
34
|
+
* Used by deploy to evaluate if we have everything we need to deploy tracking views.
|
|
35
|
+
*
|
|
36
|
+
* An error is thrown to prevent additional deployment work if we have Tracking items and tracking is
|
|
37
|
+
* not enabled or the deployment user is not an admin in the organization.
|
|
38
|
+
*
|
|
39
|
+
* @param templates the list of IItemTemplates from the solution
|
|
40
|
+
* @param templateDictionary Hash of facts: org URL, adlib replacements, deferreds for dependencies
|
|
41
|
+
*
|
|
42
|
+
* @protected
|
|
43
|
+
*/
|
|
44
|
+
export declare function _validateTrackingTemplates(templates: IItemTemplate[], templateDictionary: any): void;
|
|
45
|
+
/**
|
|
46
|
+
* Used by deploy to determine the owner of the tracking service.
|
|
47
|
+
* Only one tracking service per org and all tracking views and tracking groups must be owned by the tracking service owner.
|
|
48
|
+
*
|
|
49
|
+
* This function will update the input templateDictionary with the owner as well as
|
|
50
|
+
* the item id for the source tracking service.
|
|
51
|
+
*
|
|
52
|
+
* @param templateDictionary Hash of facts: org URL, adlib replacements, deferreds for dependencies
|
|
53
|
+
* @param authentication Credentials for the requests
|
|
54
|
+
*
|
|
55
|
+
* @protected
|
|
56
|
+
*/
|
|
57
|
+
export declare function getTackingServiceOwner(templateDictionary: any, authentication: UserSession): Promise<boolean>;
|
|
58
|
+
/**
|
|
59
|
+
* Check key properties to understand if we are dealing with a tracking template
|
|
60
|
+
*
|
|
61
|
+
* @param itemTemplate the template to evaluate
|
|
62
|
+
* @param itemUpdate the item update to evaluate
|
|
63
|
+
*
|
|
64
|
+
* @protected
|
|
65
|
+
*/
|
|
66
|
+
export declare function isTrackingViewTemplate(itemTemplate?: IItemTemplate, itemUpdate?: IItemUpdate): boolean;
|
|
67
|
+
/**
|
|
68
|
+
* Check key properties to understand if we are dealing with a tracking group template
|
|
69
|
+
*
|
|
70
|
+
* @param itemTemplate the template to evaluate
|
|
71
|
+
*
|
|
72
|
+
* @protected
|
|
73
|
+
*/
|
|
74
|
+
export declare function isTrackingViewGroup(itemTemplate: IItemTemplate): boolean;
|
|
75
|
+
/**
|
|
76
|
+
* Templatize the tracker view group id and view name for location tracking views.
|
|
77
|
+
* This function will update the itemTemplate that is passed in when it's a tracking view.
|
|
78
|
+
*
|
|
79
|
+
* @param itemTemplate Template for feature service item
|
|
80
|
+
*
|
|
81
|
+
* @protected
|
|
82
|
+
*/
|
|
83
|
+
export declare function templatizeTracker(itemTemplate: IItemTemplate): void;
|
|
84
|
+
/**
|
|
85
|
+
* Templatize the tracker view group id and view name for location tracking views.
|
|
86
|
+
* This function will update the itemTemplate that is passed in when it's a tracking view.
|
|
87
|
+
*
|
|
88
|
+
* @param itemTemplate Template for the tracker view
|
|
89
|
+
* @param path the path to the property that stores the current name
|
|
90
|
+
* @param groupId the id of the associated tracker group
|
|
91
|
+
* @param groupIdVar the variable to replace the existing name with
|
|
92
|
+
*
|
|
93
|
+
* @protected
|
|
94
|
+
*/
|
|
95
|
+
export declare function _setName(itemTemplate: IItemTemplate, path: string, groupId: string, groupIdVar: string): void;
|
|
96
|
+
/**
|
|
97
|
+
* Templatize the tracker view serviceItemId
|
|
98
|
+
*
|
|
99
|
+
* This function will update the input obj with the templatized variable
|
|
100
|
+
*
|
|
101
|
+
* @param obj the object that stores the serviceItemId
|
|
102
|
+
* @param path the path to the property that stores the serviceItemId
|
|
103
|
+
*
|
|
104
|
+
* @protected
|
|
105
|
+
*/
|
|
106
|
+
export declare function templatizeServiceItemId(obj: any, path: string): void;
|
|
107
|
+
/**
|
|
108
|
+
* Used by deploy to update the request options with key details for deploying tracker views
|
|
109
|
+
*
|
|
110
|
+
* @param itemTemplate Template for feature service item
|
|
111
|
+
* @param options the current request options to update
|
|
112
|
+
* @param templateDictionary Hash of facts: org URL, adlib replacements, deferreds for dependencies
|
|
113
|
+
*
|
|
114
|
+
* @protected
|
|
115
|
+
*/
|
|
116
|
+
export declare function setTrackingOptions(itemTemplate: IItemTemplate, options: any, templateDictionary: any): ICreateServiceParams;
|
|
@@ -0,0 +1,205 @@
|
|
|
1
|
+
/** @license
|
|
2
|
+
* Copyright 2021 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 { getProp, setCreateProp, setProp } from "./generalHelpers";
|
|
17
|
+
import { getItemBase } from "./restHelpersGet";
|
|
18
|
+
import { templatizeTerm } from "./templatization";
|
|
19
|
+
/**
|
|
20
|
+
* Used by deploy to evaluate if we have everything we need to deploy tracking views.
|
|
21
|
+
*
|
|
22
|
+
* This function will update the input templateDictionary with a boolean
|
|
23
|
+
* indicating if tracking is enabled on the org and the user is an admin.
|
|
24
|
+
*
|
|
25
|
+
* @param portalResponse portal self response
|
|
26
|
+
* @param userResponse portal user response
|
|
27
|
+
* @param templateDictionary Hash of facts: org URL, adlib replacements, deferreds for dependencies
|
|
28
|
+
* @param templates the list of IItemTemplates from the solution
|
|
29
|
+
*
|
|
30
|
+
* @protected
|
|
31
|
+
*/
|
|
32
|
+
export function setLocationTrackingEnabled(portalResponse, userResponse, templateDictionary, templates) {
|
|
33
|
+
// set locationTracking...contains service url and id
|
|
34
|
+
const locationTracking = getProp(portalResponse, "helperServices.locationTracking");
|
|
35
|
+
/* istanbul ignore else */
|
|
36
|
+
if (locationTracking) {
|
|
37
|
+
templateDictionary.locationTracking = locationTracking;
|
|
38
|
+
}
|
|
39
|
+
// verify we have location tracking service and the user is an admin
|
|
40
|
+
templateDictionary.locationTrackingEnabled =
|
|
41
|
+
templateDictionary.locationTracking &&
|
|
42
|
+
getProp(userResponse, "role") === "org_admin"
|
|
43
|
+
? true
|
|
44
|
+
: false;
|
|
45
|
+
if (templates) {
|
|
46
|
+
_validateTrackingTemplates(templates, templateDictionary);
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* Used by deploy to evaluate if we have everything we need to deploy tracking views.
|
|
51
|
+
*
|
|
52
|
+
* An error is thrown to prevent additional deployment work if we have Tracking items and tracking is
|
|
53
|
+
* not enabled or the deployment user is not an admin in the organization.
|
|
54
|
+
*
|
|
55
|
+
* @param templates the list of IItemTemplates from the solution
|
|
56
|
+
* @param templateDictionary Hash of facts: org URL, adlib replacements, deferreds for dependencies
|
|
57
|
+
*
|
|
58
|
+
* @protected
|
|
59
|
+
*/
|
|
60
|
+
export function _validateTrackingTemplates(templates, templateDictionary) {
|
|
61
|
+
/* istanbul ignore else */
|
|
62
|
+
if (!templateDictionary.locationTrackingEnabled &&
|
|
63
|
+
templates.some(template => {
|
|
64
|
+
const typeKeywords = getProp(template, "item.typeKeywords") || [];
|
|
65
|
+
return typeKeywords.indexOf("Location Tracking View") > -1;
|
|
66
|
+
})) {
|
|
67
|
+
console.error("Location tracking not enabled or user is not admin.");
|
|
68
|
+
throw new Error("Location tracking not enabled or user is not admin.");
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
/**
|
|
72
|
+
* Used by deploy to determine the owner of the tracking service.
|
|
73
|
+
* Only one tracking service per org and all tracking views and tracking groups must be owned by the tracking service owner.
|
|
74
|
+
*
|
|
75
|
+
* This function will update the input templateDictionary with the owner as well as
|
|
76
|
+
* the item id for the source tracking service.
|
|
77
|
+
*
|
|
78
|
+
* @param templateDictionary Hash of facts: org URL, adlib replacements, deferreds for dependencies
|
|
79
|
+
* @param authentication Credentials for the requests
|
|
80
|
+
*
|
|
81
|
+
* @protected
|
|
82
|
+
*/
|
|
83
|
+
export function getTackingServiceOwner(templateDictionary, authentication) {
|
|
84
|
+
if (templateDictionary.locationTrackingEnabled) {
|
|
85
|
+
const locationTrackingId = templateDictionary.locationTracking.id;
|
|
86
|
+
return getItemBase(locationTrackingId, authentication).then(itemBase => {
|
|
87
|
+
templateDictionary.locationTracking.owner = itemBase.owner;
|
|
88
|
+
templateDictionary[itemBase.id] = {
|
|
89
|
+
itemId: itemBase.id
|
|
90
|
+
};
|
|
91
|
+
return Promise.resolve(itemBase && itemBase.owner === authentication.username);
|
|
92
|
+
}, () => Promise.resolve(false));
|
|
93
|
+
}
|
|
94
|
+
else {
|
|
95
|
+
return Promise.resolve(false);
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
/**
|
|
99
|
+
* Check key properties to understand if we are dealing with a tracking template
|
|
100
|
+
*
|
|
101
|
+
* @param itemTemplate the template to evaluate
|
|
102
|
+
* @param itemUpdate the item update to evaluate
|
|
103
|
+
*
|
|
104
|
+
* @protected
|
|
105
|
+
*/
|
|
106
|
+
export function isTrackingViewTemplate(itemTemplate, itemUpdate) {
|
|
107
|
+
const typeKeywords = getProp(itemTemplate, "item.typeKeywords") ||
|
|
108
|
+
getProp(itemUpdate, "typeKeywords");
|
|
109
|
+
const trackViewGroup = getProp(itemTemplate, "item.properties.trackViewGroup") ||
|
|
110
|
+
getProp(itemUpdate, "properties.trackViewGroup");
|
|
111
|
+
return (typeKeywords && typeKeywords.indexOf("Location Tracking View") > -1 && trackViewGroup) ? true : false;
|
|
112
|
+
}
|
|
113
|
+
/**
|
|
114
|
+
* Check key properties to understand if we are dealing with a tracking group template
|
|
115
|
+
*
|
|
116
|
+
* @param itemTemplate the template to evaluate
|
|
117
|
+
*
|
|
118
|
+
* @protected
|
|
119
|
+
*/
|
|
120
|
+
export function isTrackingViewGroup(itemTemplate) {
|
|
121
|
+
const typeKeywords = getProp(itemTemplate, "item.tags");
|
|
122
|
+
return (typeKeywords && typeKeywords.indexOf("Location Tracking Group") > -1) ? true : false;
|
|
123
|
+
}
|
|
124
|
+
/**
|
|
125
|
+
* Templatize the tracker view group id and view name for location tracking views.
|
|
126
|
+
* This function will update the itemTemplate that is passed in when it's a tracking view.
|
|
127
|
+
*
|
|
128
|
+
* @param itemTemplate Template for feature service item
|
|
129
|
+
*
|
|
130
|
+
* @protected
|
|
131
|
+
*/
|
|
132
|
+
export function templatizeTracker(itemTemplate) {
|
|
133
|
+
/* istanbul ignore else */
|
|
134
|
+
if (isTrackingViewTemplate(itemTemplate)) {
|
|
135
|
+
const trackViewGroup = getProp(itemTemplate, "item.properties.trackViewGroup");
|
|
136
|
+
itemTemplate.groups.push(trackViewGroup);
|
|
137
|
+
itemTemplate.dependencies.push(trackViewGroup);
|
|
138
|
+
const groupIdVar = templatizeTerm(trackViewGroup, trackViewGroup, ".itemId");
|
|
139
|
+
setProp(itemTemplate, "item.properties.trackViewGroup", groupIdVar);
|
|
140
|
+
_setName(itemTemplate, "item.name", trackViewGroup, groupIdVar);
|
|
141
|
+
_setName(itemTemplate, "properties.service.adminServiceInfo.name", trackViewGroup, groupIdVar);
|
|
142
|
+
const layersAndTables = (itemTemplate.properties.layers || []).concat(itemTemplate.properties.tables || []);
|
|
143
|
+
layersAndTables.forEach(l => {
|
|
144
|
+
templatizeServiceItemId(l, "adminLayerInfo.viewLayerDefinition.sourceServiceItemId");
|
|
145
|
+
});
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
/**
|
|
149
|
+
* Templatize the tracker view group id and view name for location tracking views.
|
|
150
|
+
* This function will update the itemTemplate that is passed in when it's a tracking view.
|
|
151
|
+
*
|
|
152
|
+
* @param itemTemplate Template for the tracker view
|
|
153
|
+
* @param path the path to the property that stores the current name
|
|
154
|
+
* @param groupId the id of the associated tracker group
|
|
155
|
+
* @param groupIdVar the variable to replace the existing name with
|
|
156
|
+
*
|
|
157
|
+
* @protected
|
|
158
|
+
*/
|
|
159
|
+
export function _setName(itemTemplate, path, groupId, groupIdVar) {
|
|
160
|
+
const name = getProp(itemTemplate, path);
|
|
161
|
+
/* istanbul ignore else */
|
|
162
|
+
if (name) {
|
|
163
|
+
setProp(itemTemplate, path, name.replace(groupId, groupIdVar));
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
/**
|
|
167
|
+
* Templatize the tracker view serviceItemId
|
|
168
|
+
*
|
|
169
|
+
* This function will update the input obj with the templatized variable
|
|
170
|
+
*
|
|
171
|
+
* @param obj the object that stores the serviceItemId
|
|
172
|
+
* @param path the path to the property that stores the serviceItemId
|
|
173
|
+
*
|
|
174
|
+
* @protected
|
|
175
|
+
*/
|
|
176
|
+
export function templatizeServiceItemId(obj, path) {
|
|
177
|
+
const serviceItemId = getProp(obj, path);
|
|
178
|
+
/* istanbul ignore else */
|
|
179
|
+
if (serviceItemId) {
|
|
180
|
+
setProp(obj, path, templatizeTerm(serviceItemId, serviceItemId, ".itemId"));
|
|
181
|
+
}
|
|
182
|
+
}
|
|
183
|
+
/**
|
|
184
|
+
* Used by deploy to update the request options with key details for deploying tracker views
|
|
185
|
+
*
|
|
186
|
+
* @param itemTemplate Template for feature service item
|
|
187
|
+
* @param options the current request options to update
|
|
188
|
+
* @param templateDictionary Hash of facts: org URL, adlib replacements, deferreds for dependencies
|
|
189
|
+
*
|
|
190
|
+
* @protected
|
|
191
|
+
*/
|
|
192
|
+
export function setTrackingOptions(itemTemplate, options, templateDictionary) {
|
|
193
|
+
/* istanbul ignore else */
|
|
194
|
+
if (isTrackingViewTemplate(itemTemplate)) {
|
|
195
|
+
setCreateProp(options, "owner", templateDictionary.locationTracking.owner);
|
|
196
|
+
setCreateProp(options.item, "name", itemTemplate.item.name);
|
|
197
|
+
setCreateProp(options.item, "isView", true);
|
|
198
|
+
setCreateProp(options.item, "owner", templateDictionary.locationTracking.owner);
|
|
199
|
+
setCreateProp(options.params, "isView", true);
|
|
200
|
+
setCreateProp(options.params, "outputType", "locationTrackingService");
|
|
201
|
+
delete (options.folderId);
|
|
202
|
+
}
|
|
203
|
+
return options.item;
|
|
204
|
+
}
|
|
205
|
+
//# sourceMappingURL=trackingHelpers.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"trackingHelpers.js","sourceRoot":"","sources":["../../src/trackingHelpers.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAKH,OAAO,EAAE,OAAO,EAAE,aAAa,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AACnE,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAC/C,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAIlD;;;;;;;;;;;;GAYG;AACH,MAAM,UAAU,0BAA0B,CACxC,cAAmB,EACnB,YAAiB,EACjB,kBAAuB,EACvB,SAA2B;IAE3B,qDAAqD;IACrD,MAAM,gBAAgB,GAAG,OAAO,CAAC,cAAc,EAAE,iCAAiC,CAAC,CAAC;IACpF,0BAA0B;IAC1B,IAAI,gBAAgB,EAAE;QACpB,kBAAkB,CAAC,gBAAgB,GAAG,gBAAgB,CAAC;KACxD;IAED,oEAAoE;IACpE,kBAAkB,CAAC,uBAAuB;QACxC,kBAAk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,MAAM,UAAU,kBAAkB,CAChC,YAA2B,EAC3B,OAAY,EACZ,kBAAuB;IAEvB,0BAA0B;IAC1B,IAAI,sBAAsB,CAAC,YAAY,CAAC,EAAE;QACxC,aAAa,CAAC,OAAO,EAAE,OAAO,EAAE,kBAAkB,CAAC,gBAAgB,CAAC,KAAK,CAAC,CAAC;QAE3E,aAAa,CAAC,OAAO,CAAC,IAAI,EAAE,MAAM,EAAE,YAAY,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QAC5D,aAAa,CAAC,OAAO,CAAC,IAAI,EAAE,QAAQ,EAAE,IAAI,CAAC,CAAC;QAC5C,aAAa,CAAC,OAAO,CAAC,IAAI,EAAE,OAAO,EAAE,kBAAkB,CAAC,gBAAgB,CAAC,KAAK,CAAC,CAAC;QAEhF,aAAa,CAAC,OAAO,CAAC,MAAM,EAAE,QAAQ,EAAE,IAAI,CAAC,CAAC;QAC9C,aAAa,CAAC,OAAO,CAAC,MAAM,EAAE,YAAY,EAAE,yBAAyB,CAAC,CAAC;QAEvE,OAAM,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC;KAC1B;IACD,OAAO,OAAO,CAAC,IAAI,CAAC;AACtB,CAAC"}
|
|
@@ -14,6 +14,8 @@
|
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
16
|
import { UserSession } from "./interfaces";
|
|
17
|
+
export declare const BASE_NAMES: string[];
|
|
18
|
+
export declare const PROP_NAMES: string[];
|
|
17
19
|
/**
|
|
18
20
|
* Get the base velocity url from the current orgs subscription info
|
|
19
21
|
*
|