@esri/solution-common 1.3.13 → 1.3.16
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/featureServiceHelpers.d.ts +33 -51
- package/dist/esm/featureServiceHelpers.js +122 -178
- package/dist/esm/featureServiceHelpers.js.map +1 -1
- package/dist/esm/interfaces.d.ts +1 -0
- package/dist/esm/interfaces.js.map +1 -1
- package/dist/esm/restHelpers.d.ts +17 -12
- package/dist/esm/restHelpers.js +67 -40
- package/dist/esm/restHelpers.js.map +1 -1
- package/dist/node/featureServiceHelpers.d.ts +33 -51
- package/dist/node/featureServiceHelpers.js +126 -184
- package/dist/node/featureServiceHelpers.js.map +1 -1
- package/dist/node/interfaces.d.ts +1 -0
- package/dist/node/interfaces.js.map +1 -1
- package/dist/node/restHelpers.d.ts +17 -12
- package/dist/node/restHelpers.js +70 -42
- package/dist/node/restHelpers.js.map +1 -1
- package/dist/umd/common.umd.js +194 -224
- 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/featureServiceHelpers.d.ts +33 -51
- package/dist/umd/interfaces.d.ts +1 -0
- package/dist/umd/restHelpers.d.ts +17 -12
- package/package.json +3 -3
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
* @module featureServiceHelpers
|
|
20
20
|
*/
|
|
21
21
|
export { queryFeatures as rest_queryFeatures, addFeatures as rest_addFeatures } from "@esri/arcgis-rest-feature-layer";
|
|
22
|
-
import { IDependency, IItemTemplate, INumberValuePair, UserSession } from "./interfaces";
|
|
22
|
+
import { IDependency, IFeatureServiceProperties, IItemTemplate, INumberValuePair, UserSession } from "./interfaces";
|
|
23
23
|
/**
|
|
24
24
|
* Templatize the ID, url, field references ect
|
|
25
25
|
*
|
|
@@ -46,10 +46,18 @@ export declare function deleteViewProps(layer: any): void;
|
|
|
46
46
|
*
|
|
47
47
|
* @param layer The data layer instance with field name references within
|
|
48
48
|
* @param fieldInfos the object that stores the cached field infos
|
|
49
|
-
* @param isPortal Controls what properties should be removed.
|
|
50
49
|
* @returns An updated instance of the fieldInfos
|
|
51
50
|
*/
|
|
52
|
-
export declare function cacheFieldInfos(layer: any, fieldInfos: any
|
|
51
|
+
export declare function cacheFieldInfos(layer: any, fieldInfos: any): any;
|
|
52
|
+
/**
|
|
53
|
+
* Cache the stored contingent values so we can add them in subsequent addToDef calls
|
|
54
|
+
*
|
|
55
|
+
* @param id The layer id for the associated values to be stored with
|
|
56
|
+
* @param fieldInfos The object that stores the cached field infos
|
|
57
|
+
* @param itemTemplate The current itemTemplate being processed
|
|
58
|
+
* @returns An updated instance of the fieldInfos
|
|
59
|
+
*/
|
|
60
|
+
export declare function cacheContingentValues(id: string, fieldInfos: any, itemTemplate: IItemTemplate): any;
|
|
53
61
|
/**
|
|
54
62
|
* Helper function to cache a single property into the fieldInfos object
|
|
55
63
|
* This property will be removed from the layer instance.
|
|
@@ -139,6 +147,18 @@ export declare function updateSettingsFieldInfos(itemTemplate: IItemTemplate, se
|
|
|
139
147
|
* @private
|
|
140
148
|
*/
|
|
141
149
|
export declare function updateTemplateForInvalidDesignations(template: IItemTemplate, authentication: UserSession): Promise<IItemTemplate>;
|
|
150
|
+
/**
|
|
151
|
+
* Get the contingent values for each layer in the service.
|
|
152
|
+
* Remove key props that cannot be included with the addToDef call on deploy.
|
|
153
|
+
* Store the values alongside other key feature service properties in the template
|
|
154
|
+
*
|
|
155
|
+
* @param properties the current feature services properties
|
|
156
|
+
* @param adminUrl the current feature service url
|
|
157
|
+
* @param authentication Credentials for the request to AGOL
|
|
158
|
+
* @returns A promise that will resolve when the contingent values have been fetched.
|
|
159
|
+
* This function will update the provided properties argument when contingent values are found.
|
|
160
|
+
*/
|
|
161
|
+
export declare function processContingentValues(properties: IFeatureServiceProperties, adminUrl: string, authentication: UserSession): Promise<void>;
|
|
142
162
|
/**
|
|
143
163
|
* Replace the field name reference templates with the new field names after deployment.
|
|
144
164
|
*
|
|
@@ -332,73 +352,35 @@ export declare function updateLayerFieldReferences(itemTemplate: IItemTemplate,
|
|
|
332
352
|
*/
|
|
333
353
|
export declare function postProcessFields(itemTemplate: IItemTemplate, layerInfos: any, popupInfos: any, adminLayerInfos: any, templateDictionary: any): Promise<any>;
|
|
334
354
|
/**
|
|
335
|
-
*
|
|
336
|
-
*
|
|
337
|
-
*
|
|
338
|
-
* @param item current layer or table
|
|
339
|
-
* @returns name of field to set for typeIdField in the update call
|
|
340
|
-
* @private
|
|
341
|
-
*/
|
|
342
|
-
export declare function _getTypeIdField(item: any): string;
|
|
343
|
-
/**
|
|
344
|
-
* Update a views field visibility to match that of the source
|
|
345
|
-
* Fields that are marked as visible false on a view are all set to
|
|
346
|
-
* visible true when added with the layer definition
|
|
355
|
+
* View field domain, alias, editable, and visible props can contain
|
|
356
|
+
* different values from the source.
|
|
347
357
|
*
|
|
348
|
-
*
|
|
349
|
-
* @returns Array of fields that should not be visible in the view
|
|
350
|
-
* @private
|
|
351
|
-
*/
|
|
352
|
-
export declare function _getFieldVisibilityUpdates(fieldInfo: any): any[];
|
|
353
|
-
/**
|
|
354
|
-
* view field domains can contain different values than the source feature service field domains
|
|
355
|
-
* use the cached domain when it differs from the source view field domain
|
|
358
|
+
* We need to check and set isFieldOverride to true when this occurs and false when it does not
|
|
356
359
|
*
|
|
357
360
|
* @param fieldInfo current view layer or table fieldInfo
|
|
358
|
-
* @param
|
|
359
|
-
* @returns Array of fields to be updated
|
|
360
|
-
* @private
|
|
361
|
-
*/
|
|
362
|
-
export declare function _validateDomains(fieldInfo: any, fieldUpdates: any[]): any[];
|
|
363
|
-
/**
|
|
364
|
-
* Get portal field updates to be added with an updateDefinition call after the
|
|
365
|
-
* initial addToDef
|
|
361
|
+
* @param item that stores the view fields
|
|
366
362
|
*
|
|
367
|
-
*
|
|
368
|
-
* @param names the alias of domain field names
|
|
369
|
-
* @param fields the alias or domain fields
|
|
370
|
-
* @param key the field key to evaluate
|
|
371
|
-
* @param fieldUpdates any existing field updates
|
|
372
|
-
* @private
|
|
373
|
-
*/
|
|
374
|
-
export declare function _getPortalViewFieldUpdates(field: any, names: string[], fields: any[], key: string, fieldUpdates: any[]): void;
|
|
375
|
-
/**
|
|
376
|
-
* view field domains can contain different values than the source feature service field domains
|
|
377
|
-
* use the cached domain when it differs from the source view field domain
|
|
378
|
-
*
|
|
379
|
-
* @param fieldInfo current view layer or table fieldInfo
|
|
380
|
-
* @param fieldUpdates any existing field updates
|
|
381
|
-
* @returns Array of fields to be updated
|
|
363
|
+
* This function will update the item that is provided
|
|
382
364
|
* @private
|
|
383
365
|
*/
|
|
384
|
-
export declare function
|
|
366
|
+
export declare function _validateViewFieldInfos(fieldInfo: any, item: any): void;
|
|
385
367
|
/**
|
|
386
|
-
* Get
|
|
368
|
+
* Get arrays of fields and names for domain, alias, and editable props
|
|
387
369
|
*
|
|
388
370
|
* @param fieldInfo current view layer or table fieldInfo
|
|
389
371
|
* @private
|
|
390
372
|
*/
|
|
391
|
-
export declare function
|
|
373
|
+
export declare function _getViewFieldInfos(fieldInfo: any): any;
|
|
392
374
|
/**
|
|
393
375
|
* Set isViewOverride for view fields when they have differences from the source FS field
|
|
394
376
|
*
|
|
395
377
|
* @param field the field instance we are testing
|
|
396
378
|
* @param names array of field names
|
|
397
|
-
* @param
|
|
379
|
+
* @param vals array of values
|
|
398
380
|
* @param key the field key to compare
|
|
399
381
|
* @private
|
|
400
382
|
*/
|
|
401
|
-
export declare function _isViewFieldOverride(field: any, names: string[],
|
|
383
|
+
export declare function _isViewFieldOverride(field: any, names: string[], vals: any[], key: string): void;
|
|
402
384
|
/**
|
|
403
385
|
* Add popup info back to the layer item
|
|
404
386
|
*
|
package/dist/umd/interfaces.d.ts
CHANGED
|
@@ -217,18 +217,6 @@ export declare function getLayerUpdates(args: IPostProcessArgs, isPortal: boolea
|
|
|
217
217
|
* @private
|
|
218
218
|
*/
|
|
219
219
|
export declare function _sortRelationships(layers: any[], tables: any[], relUpdates: any): any[];
|
|
220
|
-
/**
|
|
221
|
-
* Update view service when sourceSchemaChangesAllowed is true.
|
|
222
|
-
*
|
|
223
|
-
* This property needs to be set after the fact when deploying to portal as it does not honor
|
|
224
|
-
* when set during service creation.
|
|
225
|
-
*
|
|
226
|
-
* @param itemTemplate Template of item being deployed
|
|
227
|
-
* @param authentication Credentials for the request
|
|
228
|
-
* @param updates An array of update instructions
|
|
229
|
-
* @returns An array of update instructions
|
|
230
|
-
*/
|
|
231
|
-
export declare function getFinalServiceUpdates(itemTemplate: IItemTemplate, authentication: UserSession, updates: IUpdate[]): IUpdate[];
|
|
232
220
|
/**
|
|
233
221
|
* Add additional options to a layers definition
|
|
234
222
|
*
|
|
@@ -527,6 +515,14 @@ export declare function _getFallbackExtent(serviceInfo: any, templateDictionary:
|
|
|
527
515
|
* @private
|
|
528
516
|
*/
|
|
529
517
|
export declare function _getRelationshipUpdates(args: IPostProcessArgs): any;
|
|
518
|
+
/**
|
|
519
|
+
* Get the stored contingent values and structure them to be added to the services layers.
|
|
520
|
+
*
|
|
521
|
+
* @param args The IPostProcessArgs for the request(s)
|
|
522
|
+
* @returns Any contingent values that should be added to the service.
|
|
523
|
+
* @private
|
|
524
|
+
*/
|
|
525
|
+
export declare function _getContingentValuesUpdates(args: IPostProcessArgs): any;
|
|
530
526
|
/**
|
|
531
527
|
* Get refresh, add, update, or delete definition info
|
|
532
528
|
*
|
|
@@ -539,6 +535,15 @@ export declare function _getRelationshipUpdates(args: IPostProcessArgs): any;
|
|
|
539
535
|
* @private
|
|
540
536
|
*/
|
|
541
537
|
export declare function _getUpdate(url: string, id: any, obj: any, args: any, type: "delete" | "update" | "add" | "refresh"): IUpdate;
|
|
538
|
+
/**
|
|
539
|
+
* Changes just the domain part of a URL to lowercase.
|
|
540
|
+
*
|
|
541
|
+
* @param url URL to modify
|
|
542
|
+
* @return Adjusted URL
|
|
543
|
+
* @see From `getServerRootUrl` in arcgis-rest-js' ArcGISIdentityManager.ts
|
|
544
|
+
* @private
|
|
545
|
+
*/
|
|
546
|
+
export declare function _lowercaseDomain(url: string): string;
|
|
542
547
|
/**
|
|
543
548
|
* Checks the two main parts of an item for unresolved variables and reports any found.
|
|
544
549
|
*
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@esri/solution-common",
|
|
3
|
-
"version": "1.3.
|
|
3
|
+
"version": "1.3.16",
|
|
4
4
|
"description": "Provides general helper functions for @esri/solution.js.",
|
|
5
5
|
"main": "dist/node/index.js",
|
|
6
6
|
"unpkg": "dist/umd/common.umd.min.js",
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
"@esri/hub-sites": "9.29.0",
|
|
24
24
|
"@esri/hub-teams": "9.29.0",
|
|
25
25
|
"@types/adlib": "^3.0.1",
|
|
26
|
-
"rollup": "2.
|
|
26
|
+
"rollup": "2.66.1"
|
|
27
27
|
},
|
|
28
28
|
"peerDependencies": {
|
|
29
29
|
"@esri/arcgis-rest-auth": "3.4.3",
|
|
@@ -96,5 +96,5 @@
|
|
|
96
96
|
"esri",
|
|
97
97
|
"ES6"
|
|
98
98
|
],
|
|
99
|
-
"gitHead": "
|
|
99
|
+
"gitHead": "c87f04e58c80558f19a6d79086b69a965b17db93"
|
|
100
100
|
}
|