@esri/solution-simple-types 3.0.0 → 3.1.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 (69) hide show
  1. package/dist/esm/helpers/convert-item-to-template.js +1 -0
  2. package/dist/esm/helpers/convert-item-to-template.js.map +1 -1
  3. package/dist/esm/webmap.js +6 -5
  4. package/dist/esm/webmap.js.map +1 -1
  5. package/package.json +7 -7
  6. package/dist/node/dashboard.d.ts +0 -93
  7. package/dist/node/dashboard.js +0 -354
  8. package/dist/node/dashboard.js.map +0 -1
  9. package/dist/node/helpers/convert-item-to-template.d.ts +0 -39
  10. package/dist/node/helpers/convert-item-to-template.js +0 -184
  11. package/dist/node/helpers/convert-item-to-template.js.map +0 -1
  12. package/dist/node/helpers/create-item-from-template.d.ts +0 -17
  13. package/dist/node/helpers/create-item-from-template.js +0 -138
  14. package/dist/node/helpers/create-item-from-template.js.map +0 -1
  15. package/dist/node/helpers/notebook-helpers.d.ts +0 -19
  16. package/dist/node/helpers/notebook-helpers.js +0 -25
  17. package/dist/node/helpers/notebook-helpers.js.map +0 -1
  18. package/dist/node/helpers/quickcapture-helpers.d.ts +0 -18
  19. package/dist/node/helpers/quickcapture-helpers.js +0 -23
  20. package/dist/node/helpers/quickcapture-helpers.js.map +0 -1
  21. package/dist/node/helpers/simple-type-helpers.d.ts +0 -18
  22. package/dist/node/helpers/simple-type-helpers.js +0 -23
  23. package/dist/node/helpers/simple-type-helpers.js.map +0 -1
  24. package/dist/node/helpers/update-notebook-data.d.ts +0 -17
  25. package/dist/node/helpers/update-notebook-data.js +0 -28
  26. package/dist/node/helpers/update-notebook-data.js.map +0 -1
  27. package/dist/node/index.d.ts +0 -27
  28. package/dist/node/index.js +0 -37
  29. package/dist/node/index.js.map +0 -1
  30. package/dist/node/notebook.d.ts +0 -66
  31. package/dist/node/notebook.js +0 -134
  32. package/dist/node/notebook.js.map +0 -1
  33. package/dist/node/oic.d.ts +0 -53
  34. package/dist/node/oic.js +0 -171
  35. package/dist/node/oic.js.map +0 -1
  36. package/dist/node/quickcapture.d.ts +0 -87
  37. package/dist/node/quickcapture.js +0 -193
  38. package/dist/node/quickcapture.js.map +0 -1
  39. package/dist/node/simple-types.d.ts +0 -57
  40. package/dist/node/simple-types.js +0 -95
  41. package/dist/node/simple-types.js.map +0 -1
  42. package/dist/node/webmap.d.ts +0 -101
  43. package/dist/node/webmap.js +0 -273
  44. package/dist/node/webmap.js.map +0 -1
  45. package/dist/node/webmappingapplication.d.ts +0 -176
  46. package/dist/node/webmappingapplication.js +0 -675
  47. package/dist/node/webmappingapplication.js.map +0 -1
  48. package/dist/node/workforce.d.ts +0 -34
  49. package/dist/node/workforce.js +0 -45
  50. package/dist/node/workforce.js.map +0 -1
  51. package/dist/umd/simple-types/src/dashboard.d.ts +0 -93
  52. package/dist/umd/simple-types/src/helpers/convert-item-to-template.d.ts +0 -39
  53. package/dist/umd/simple-types/src/helpers/create-item-from-template.d.ts +0 -17
  54. package/dist/umd/simple-types/src/helpers/notebook-helpers.d.ts +0 -19
  55. package/dist/umd/simple-types/src/helpers/quickcapture-helpers.d.ts +0 -18
  56. package/dist/umd/simple-types/src/helpers/simple-type-helpers.d.ts +0 -18
  57. package/dist/umd/simple-types/src/helpers/update-notebook-data.d.ts +0 -17
  58. package/dist/umd/simple-types/src/index.d.ts +0 -27
  59. package/dist/umd/simple-types/src/notebook.d.ts +0 -66
  60. package/dist/umd/simple-types/src/oic.d.ts +0 -53
  61. package/dist/umd/simple-types/src/quickcapture.d.ts +0 -87
  62. package/dist/umd/simple-types/src/simple-types.d.ts +0 -57
  63. package/dist/umd/simple-types/src/webmap.d.ts +0 -101
  64. package/dist/umd/simple-types/src/webmappingapplication.d.ts +0 -176
  65. package/dist/umd/simple-types/src/workforce.d.ts +0 -34
  66. package/dist/umd/simple-types.umd.js +0 -2296
  67. package/dist/umd/simple-types.umd.js.map +0 -1
  68. package/dist/umd/simple-types.umd.min.js +0 -19
  69. package/dist/umd/simple-types.umd.min.js.map +0 -1
@@ -1,101 +0,0 @@
1
- /** @license
2
- * Copyright 2018 Esri
3
- *
4
- * Licensed under the Apache License, Version 2.0 (the "License");
5
- * you may not use this file except in compliance with the License.
6
- * You may obtain a copy of the License at
7
- *
8
- * http://www.apache.org/licenses/LICENSE-2.0
9
- *
10
- * Unless required by applicable law or agreed to in writing, software
11
- * distributed under the License is distributed on an "AS IS" BASIS,
12
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
- * See the License for the specific language governing permissions and
14
- * limitations under the License.
15
- */
16
- import * as common from "@esri/solution-common";
17
- /**
18
- * Converts an AGOL webmap item to a template.
19
- *
20
- * @param itemTemplate Template for the webmap item
21
- * @param destAuthentication Credentials for requests to the destination organization
22
- * @param srcAuthentication Credentials for requests to source items
23
- * @param templateDictionary Hash of key details used for variable replacement
24
- * @returns Template for the solution item that contains key details for item reconstruction
25
- */
26
- export declare function convertItemToTemplate(itemTemplate: common.IItemTemplate, destAuthentication: common.UserSession, srcAuthentication: common.UserSession, templateDictionary: any): Promise<common.IItemTemplate>;
27
- /**
28
- * Gets the ids of the dependencies of an AGOL webmap item.
29
- *
30
- * @param itemTemplate A webmap item whose dependencies are sought
31
- * @param authentication Credentials for any requests
32
- * @returns List of dependencies ids and url/itemId hash
33
- * @private
34
- */
35
- export declare function _extractDependencies(itemTemplate: common.IItemTemplate, authentication: common.UserSession): Promise<any>;
36
- /**
37
- * Remove the initialState prop from webmaps saved from the new map viewer.
38
- * This allows the map to use the item extent property that we templatize.
39
- *
40
- * Added for issue #662
41
- *
42
- * @param data the data for the web maps item template
43
- * @returns void
44
- * @private
45
- */
46
- export declare function _excludeInitialState(data: any): void;
47
- /**
48
- * Extracts the AGOL itemId for each layer or table object in a list using the url.
49
- *
50
- * @param layerList List of map layers or tables
51
- * @param dependencies Current list of dependencies
52
- * @param authentication Credentials for any requests
53
- * @returns List of dependencies ids and url/itemId hash
54
- * @private
55
- */
56
- export declare function _getLayerIds(layerList: any[], dependencies: string[], authentication: common.UserSession): Promise<any>;
57
- /**
58
- * Templatizes the url and item id for layers or tables within the webmap.
59
- *
60
- * @param layerList List of map layers or tables
61
- * @param urlHash Lookup object for analysis layers
62
- * @param templateDictionary Hash of key details used for variable replacement
63
- * @returns void
64
- * @private
65
- */
66
- export declare function _templatizeWebmapLayerIdsAndUrls(layerList: any[], urlHash: any, templateDictionary: any): void;
67
- /**
68
- * Templatize field references.
69
- *
70
- * @param solutionTemplate The solution item template
71
- * @param datasourceInfos A list of datasource info objects that contain key values to templatize field references
72
- * @returns The solutionTemplate with templatized field references
73
- */
74
- export declare function postProcessFieldReferences(solutionTemplate: common.IItemTemplate, datasourceInfos: common.IDatasourceInfo[]): common.IItemTemplate;
75
- /**
76
- * Templatize field references.
77
- *
78
- * @param solutionTemplate The solution item template
79
- * @param datasourceInfos A list of datasource info objects that contain key values to templatize field references
80
- * @param path A string path to the object property to templatize
81
- * @private
82
- */
83
- export declare function _templatizeProperty(solutionTemplate: common.IItemTemplate, datasourceInfos: common.IDatasourceInfo[], path: string): void;
84
- /**
85
- * Templatize field references.
86
- *
87
- * @param objs Can be operationalLayers or tables or appProperties search layers
88
- * @param datasourceInfos A list of datasource info objects that contain key values to templatize field references
89
- * @returns updated instances of the objects
90
- * @private
91
- */
92
- export declare function _templatize(objs: any[], datasourceInfos: common.IDatasourceInfo[]): any[];
93
- /**
94
- * Get datasourceInfo by map layer id
95
- *
96
- * @param obj Can be operationalLayer or table or appProperties search layer
97
- * @param datasourceInfos A list of datasource info objects that contain key values to templatize field references
98
- * @returns datasourceInfo for the given object id
99
- * @private
100
- */
101
- export declare function _getDatasourceInfo(obj: any, datasourceInfos: common.IDatasourceInfo[]): any;
@@ -1,176 +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 web mapping application 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 key details used for variable replacement
24
- * @returns A promise that will resolve when the template has been created
25
- */
26
- export declare function convertItemToTemplate(itemTemplate: common.IItemTemplate, destAuthentication: common.UserSession, srcAuthentication: common.UserSession, templateDictionary: any): Promise<common.IItemTemplate>;
27
- /**
28
- * Converts web mapping application datasources to variables for deployment
29
- *
30
- * @param itemTemplate The solution item template
31
- * @param authentication Credentials for requests
32
- * @param portalUrl Rest Url of the portal to perform the search
33
- * @param templateDictionary Hash of key details used for variable replacement
34
- * @returns A promise that will resolve with the created template
35
- */
36
- export declare function templatizeDatasources(itemTemplate: common.IItemTemplate, authentication: common.UserSession, portalUrl: string, templateDictionary: any): Promise<common.IItemTemplate>;
37
- export declare function templatizeWidgets(itemTemplate: common.IItemTemplate, authentication: common.UserSession, portalUrl: string, widgetPath: string, isOnScreen?: boolean): Promise<common.IItemTemplate>;
38
- export declare function templatizeValues(itemTemplate: common.IItemTemplate, authentication: common.UserSession, portalUrl: string, widgetPath: string): Promise<common.IItemTemplate>;
39
- export declare function handleServiceRequests(serviceRequests: any[], requestUrls: string[], objString: string): Promise<string>;
40
- export declare function findUrls(testString: string, portalUrl: string, requestUrls: string[], serviceRequests: any[], authentication: common.UserSession): {
41
- testString: string;
42
- requestUrls: string[];
43
- serviceRequests: any[];
44
- };
45
- /**
46
- * Replace url with templatized url value
47
- *
48
- * @param obj can be a single url string or a stringified JSON object
49
- * @param url the current url we are testing for
50
- * @param newUrl the templatized url
51
- * @param validateFullUrl should only replace url when we have a full match.
52
- * This property is only relevant when the obj is a stringified JSON object.
53
- *
54
- * @returns the obj with any instances of the url replaced
55
- */
56
- export declare function replaceUrl(obj: string, url: string, newUrl: string, validateFullUrl?: boolean): string;
57
- export declare function setValues(itemTemplate: common.IItemTemplate, paths: string[], base: string): void;
58
- export declare function fineTuneCreatedItem(originalTemplate: common.IItemTemplate, newlyCreatedItem: common.IItemTemplate, templateDictionary: any, destinationAuthentication: common.UserSession): Promise<void>;
59
- /**
60
- * Gets the ids of the dependencies of an AGOL webapp item.
61
- *
62
- * @param fullItem A webapp item whose dependencies are sought
63
- * @returns A promise that will resolve with list of dependent ids
64
- * @private
65
- */
66
- export declare function _extractDependencies(model: any): string[];
67
- /**
68
- * Generic Web App Dependencies
69
- *
70
- * @private
71
- */
72
- export declare function _getGenericWebAppDependencies(model: any): any;
73
- export declare function _getWABDependencies(model: any): string[];
74
- /**
75
- * Templatizes id properties for the paths provided
76
- *
77
- * @param itemTemplate The solution item template
78
- * @param paths A list of property paths that contain ids
79
- * @private
80
- */
81
- export declare function _templatizeIdPaths(itemTemplate: common.IItemTemplate, paths: string[]): void;
82
- /**
83
- * Templatizes id property for the path provided
84
- *
85
- * @param itemTemplate The solution item template
86
- * @param path A path to an id property
87
- * @param id The base id to use when templatizing
88
- * @private
89
- */
90
- export declare function _templatizeIdPath(itemTemplate: common.IItemTemplate, path: string, id: string): void;
91
- /**
92
- * Templatize field references for datasources and widgets.
93
- *
94
- * @param solutionTemplate The solution item template
95
- * @param datasourceInfos A list of datasource info objects that contain key values to templatize field references
96
- * @returns The solutionTemplate with templatized field references
97
- */
98
- export declare function postProcessFieldReferences(solutionTemplate: common.IItemTemplate, datasourceInfos: common.IDatasourceInfo[]): common.IItemTemplate;
99
- /**
100
- * Templatize field references for given dataSource from the web application.
101
- *
102
- * @param obj The dataSource or widget object from the web application.
103
- * @param datasourceInfos A list of datasource info objects that contain key values to templatize field references
104
- * @returns The dataSource with templatized field references
105
- * @private
106
- */
107
- export declare function _templatizeObject(obj: any, datasourceInfos: common.IDatasourceInfo[], templatizeKeys?: boolean): any;
108
- /**
109
- * Templatize field references from an array of various objects from the web application.
110
- *
111
- * @param objects A list of widgets or objects from the web application that may contain field references.
112
- * @param datasourceInfos A list of datasource info objects that contain key values to templatize field references
113
- * @returns The widgets with templatized field references
114
- * @private
115
- */
116
- export declare function _templatizeObjectArray(objects: any[], datasourceInfos: common.IDatasourceInfo[]): any;
117
- /**
118
- * Gets an order for testing wit the various datasource info objects against the widget or dataSource.
119
- * A widget or dataSource that contain a layers url or webmap layer id are more likely
120
- * to have field references from that layer.
121
- *
122
- * @param obj The dataSource or widget object from the web application.
123
- * @param datasourceInfos A list of datasource info objects that contain key values to templatize field references
124
- * @returns A list of datasourceInfo objects sorted based on the presence of a layers url or id
125
- * @private
126
- */
127
- export declare function _getReplaceOrder(obj: any, datasourceInfos: common.IDatasourceInfo[]): common.IDatasourceInfo[];
128
- /**
129
- * Determine an order for checking field names against a dataSource or widget.
130
- * Sort order preference is set in this order: layer url, web map layer id, service url, agol itemId
131
- *
132
- * @param datasourceInfo The datasource object with key properties about the service.
133
- * @param testString A stringified version of a widget or dataSource
134
- * @returns The prioritized order for testing
135
- * @private
136
- */
137
- export declare function _getSortOrder(datasourceInfo: common.IDatasourceInfo, testString: string): number;
138
- /**
139
- * These tests will run prior to the tests associated with the higher level tests based on sort order.
140
- * The tests work more like cloning an object where we go through and review each individual property.
141
- * If we find a url or webmap layer id we will templatize the parent object that contains this property.
142
- * Many widgets will store one of these two properties in an object that will also contain various field references.
143
- *
144
- * @param obj The dataSource or widget object from the application
145
- * @param datasourceInfos A list of datasource info objects that contain key values to templatize field references
146
- * @returns An updated instance of the dataSource or widget with as many field references templatized as possible.
147
- * @private
148
- */
149
- export declare function _prioritizedTests(obj: any, datasourceInfos: common.IDatasourceInfo[], templatizeKeys: boolean): any;
150
- /**
151
- * This is very close to common.cloneObject but will test if an object
152
- * has one of the datasource urls as a property. If it finds one it will
153
- * templatize it's parent based on the fields from that datasource
154
- *
155
- * @param obj The dataSource or widget object from the application
156
- * @param ds A datasourceInfo object to use for testing against the current dataSource or widget
157
- * @returns The updated instance of the object with as many field references templatized as possible
158
- * @private
159
- */
160
- export declare function _templatizeParentByURL(obj: {
161
- [index: string]: any;
162
- }, ds: common.IDatasourceInfo, templatizeKeys: boolean): any;
163
- /**
164
- * This is very close to common.cloneObject but will test if an object
165
- * has one of the datasource webmap layer ids as a property. If it finds one it will
166
- * templatize it's parent based on the fields from that datasource.
167
- *
168
- * @param obj The dataSource or widget object from the application
169
- * @param ds A datasourceInfo object to use for testing against the current dataSource or widget
170
- * @param id A webmap layer id to test with.
171
- * @returns The updated instance of the object with as many field references templatized as possible
172
- * @private
173
- */
174
- export declare function _templatizeParentByWebMapLayerId(obj: {
175
- [index: string]: any;
176
- }, ds: common.IDatasourceInfo, id: string, templatizeKeys: boolean): any;
@@ -1,34 +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 workforce item to a template.
19
- *
20
- * @param itemTemplate template for the workforce project item
21
- * @param destAuthentication Credentials for requests to the destination organization
22
- * @param srcAuthentication Credentials for requests to source items
23
- * @param templateDictionary Hash of key details used for variable replacement
24
- * @returns templatized itemTemplate
25
- */
26
- export declare function convertItemToTemplate(itemTemplate: common.IItemTemplate, destAuthentication: common.UserSession, srcAuthentication: common.UserSession, templateDictionary: any): Promise<common.IItemTemplate>;
27
- /**
28
- * Gets the current user and updates the dispatchers service
29
- *
30
- * @param newlyCreatedItem Item to be created; n.b.: this item is modified
31
- * @param destinationAuthentication The session used to create the new item(s)
32
- * @returns A promise that will resolve with { "success" === true || false }
33
- */
34
- export declare function fineTuneCreatedItem(newlyCreatedItem: common.IItemTemplate, destinationAuthentication: common.UserSession, templateDictionary: any): Promise<any>;