@esri/solution-common 6.6.1-next.20 → 6.6.1-next.22
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.
|
@@ -19,9 +19,12 @@
|
|
|
19
19
|
import { IFolderIdOptions, IGetGroupContentOptions, IGetUserOptions, IGroup, IGroupContentResult, IGetRelatedItemsResponse, IGroupSharingOptions, IItem, IItemRelationshipOptions, IItemResourceOptions, IItemResourceResponse, IPortal, IRemoveItemResourceOptions, ISearchOptions, ISearchResult, ISharingResponse, IUpdateGroupOptions, IUpdateItemOptions, IUpdateItemResponse, IUser, IUserGroupOptions, IUserItemOptions, SearchQueryBuilder } from "@esri/arcgis-rest-portal";
|
|
20
20
|
import { IRequestOptions } from "@esri/arcgis-rest-request";
|
|
21
21
|
import { IAddToServiceDefinitionOptions, IAddToServiceDefinitionResult, IQueryRelatedOptions, IQueryRelatedResponse } from "@esri/arcgis-rest-feature-service";
|
|
22
|
-
export {
|
|
23
|
-
export {
|
|
24
|
-
export {
|
|
22
|
+
export { createFeatureService as svcAdminCreateFeatureService, queryFeatures, addFeatures, applyEdits, } from "@esri/arcgis-rest-feature-service";
|
|
23
|
+
export type { IAddToServiceDefinitionOptions, IAddToServiceDefinitionResult, ICreateServiceParams, ICreateServiceResult, IExtent, ISpatialReference, IFeature, IQueryRelatedOptions, IQueryRelatedResponse, IRelatedRecordGroup, } from "@esri/arcgis-rest-feature-service";
|
|
24
|
+
export { addItemData as restAddItemData, addItemRelationship, createFolder, createGroup, createItem, createItemInFolder, moveItem, protectItem, SearchQueryBuilder, getGroupCategorySchema as restGetGroupCategorySchema, getItem, getItemData, getItemResources as restGetItemResources, getUserContent, getPortal as restGetPortal, getPortalUrl, searchGroupContent, setItemAccess, searchGroups as restSearchGroups, removeGroupUsers, removeItem as restRemoveItem, } from "@esri/arcgis-rest-portal";
|
|
25
|
+
export type { IAddFolderResponse, IAddItemDataOptions, ICreateItemOptions, ICreateItemResponse, IFolder, IFolderIdOptions, IGetGroupContentOptions, IGetRelatedItemsResponse, IGroup, IGroupAdd, IGroupCategorySchema as restIGroupCategorySchema, IItem, IItemRelationshipOptions, IItemResourceOptions, IItemResourceResponse, IManageItemRelationshipOptions, IMoveItemOptions, IMoveItemResponse, IPagedResponse, IPagingParams, IPortal, IRemoveItemResourceOptions, ISearchGroupContentOptions, ISearchOptions, ISearchResult, ISetAccessOptions, ISharingResponse, ItemRelationshipType, IUpdateGroupOptions, IUpdateItemOptions, IUpdateItemResponse, IUser, IUserContentResponse, IUserGroupOptions, IGroupSharingOptions, IUserItemOptions, } from "@esri/arcgis-rest-portal";
|
|
26
|
+
export { ArcGISAuthError, encodeFormData, ArcGISIdentityManager as UserSession } from "@esri/arcgis-rest-request";
|
|
27
|
+
export type { IArcGISIdentityManagerOptions, ICredential, IRequestOptions, IParams } from "@esri/arcgis-rest-request";
|
|
25
28
|
export interface IFolderSuccessResult {
|
|
26
29
|
success: boolean;
|
|
27
30
|
folder: {
|
|
@@ -158,9 +158,11 @@ exports.deleteViewProps = deleteViewProps;
|
|
|
158
158
|
*/
|
|
159
159
|
function cacheFieldInfos(layer, fieldInfos, isView, isPortal) {
|
|
160
160
|
// cache the source fields as they are in the original source
|
|
161
|
-
|
|
161
|
+
// Note: layer.id is commonly 0 for the first layer, so use a presence check
|
|
162
|
+
// (not a truthy check) to avoid skipping the layer with id === 0.
|
|
163
|
+
if (layer && layer.id !== undefined && layer.id !== null) {
|
|
162
164
|
fieldInfos[layer.id] = {
|
|
163
|
-
sourceFields: JSON.parse(JSON.stringify(layer.fields)),
|
|
165
|
+
sourceFields: layer.fields ? JSON.parse(JSON.stringify(layer.fields)) : [],
|
|
164
166
|
type: layer.type,
|
|
165
167
|
id: layer.id,
|
|
166
168
|
};
|
|
@@ -826,7 +828,12 @@ function addFeatureServiceDefinition(serviceUrl, listToAdd, templateDictionary,
|
|
|
826
828
|
removeLayerOptimization(item);
|
|
827
829
|
// this can still chunk layers
|
|
828
830
|
options = _updateAddOptions(itemTemplate, options, layerChunks, isSelfReferential, authentication);
|
|
829
|
-
|
|
831
|
+
// Route based on the discriminator set by getLayersAndTables (which derives from
|
|
832
|
+
// properties.layers vs properties.tables) rather than the layer object's own `type`
|
|
833
|
+
// field. The latter may be missing when users supply custom layer JSON via
|
|
834
|
+
// params (e.g. {{params.buildSolution.items.<id>.service.layers}}), which would
|
|
835
|
+
// otherwise cause every layer to be pushed into the `tables` array.
|
|
836
|
+
if (toAdd.type === "layer" || item.type === "Feature Layer") {
|
|
830
837
|
options.layers.push(item);
|
|
831
838
|
}
|
|
832
839
|
else {
|
|
@@ -19,9 +19,12 @@
|
|
|
19
19
|
import { IFolderIdOptions, IGetGroupContentOptions, IGetUserOptions, IGroup, IGroupContentResult, IGetRelatedItemsResponse, IGroupSharingOptions, IItem, IItemRelationshipOptions, IItemResourceOptions, IItemResourceResponse, IPortal, IRemoveItemResourceOptions, ISearchOptions, ISearchResult, ISharingResponse, IUpdateGroupOptions, IUpdateItemOptions, IUpdateItemResponse, IUser, IUserGroupOptions, IUserItemOptions, SearchQueryBuilder } from "@esri/arcgis-rest-portal";
|
|
20
20
|
import { IRequestOptions } from "@esri/arcgis-rest-request";
|
|
21
21
|
import { IAddToServiceDefinitionOptions, IAddToServiceDefinitionResult, IQueryRelatedOptions, IQueryRelatedResponse } from "@esri/arcgis-rest-feature-service";
|
|
22
|
-
export {
|
|
23
|
-
export {
|
|
24
|
-
export {
|
|
22
|
+
export { createFeatureService as svcAdminCreateFeatureService, queryFeatures, addFeatures, applyEdits, } from "@esri/arcgis-rest-feature-service";
|
|
23
|
+
export type { IAddToServiceDefinitionOptions, IAddToServiceDefinitionResult, ICreateServiceParams, ICreateServiceResult, IExtent, ISpatialReference, IFeature, IQueryRelatedOptions, IQueryRelatedResponse, IRelatedRecordGroup, } from "@esri/arcgis-rest-feature-service";
|
|
24
|
+
export { addItemData as restAddItemData, addItemRelationship, createFolder, createGroup, createItem, createItemInFolder, moveItem, protectItem, SearchQueryBuilder, getGroupCategorySchema as restGetGroupCategorySchema, getItem, getItemData, getItemResources as restGetItemResources, getUserContent, getPortal as restGetPortal, getPortalUrl, searchGroupContent, setItemAccess, searchGroups as restSearchGroups, removeGroupUsers, removeItem as restRemoveItem, } from "@esri/arcgis-rest-portal";
|
|
25
|
+
export type { IAddFolderResponse, IAddItemDataOptions, ICreateItemOptions, ICreateItemResponse, IFolder, IFolderIdOptions, IGetGroupContentOptions, IGetRelatedItemsResponse, IGroup, IGroupAdd, IGroupCategorySchema as restIGroupCategorySchema, IItem, IItemRelationshipOptions, IItemResourceOptions, IItemResourceResponse, IManageItemRelationshipOptions, IMoveItemOptions, IMoveItemResponse, IPagedResponse, IPagingParams, IPortal, IRemoveItemResourceOptions, ISearchGroupContentOptions, ISearchOptions, ISearchResult, ISetAccessOptions, ISharingResponse, ItemRelationshipType, IUpdateGroupOptions, IUpdateItemOptions, IUpdateItemResponse, IUser, IUserContentResponse, IUserGroupOptions, IGroupSharingOptions, IUserItemOptions, } from "@esri/arcgis-rest-portal";
|
|
26
|
+
export { ArcGISAuthError, encodeFormData, ArcGISIdentityManager as UserSession } from "@esri/arcgis-rest-request";
|
|
27
|
+
export type { IArcGISIdentityManagerOptions, ICredential, IRequestOptions, IParams } from "@esri/arcgis-rest-request";
|
|
25
28
|
export interface IFolderSuccessResult {
|
|
26
29
|
success: boolean;
|
|
27
30
|
folder: {
|
package/dist/esm/arcgisRestJS.js
CHANGED
|
@@ -21,7 +21,7 @@ import { request as restRequest } from "@esri/arcgis-rest-request";
|
|
|
21
21
|
import { addToServiceDefinition, queryRelated as restQueryRelated, } from "@esri/arcgis-rest-feature-service";
|
|
22
22
|
export { createFeatureService as svcAdminCreateFeatureService, queryFeatures, addFeatures, applyEdits, } from "@esri/arcgis-rest-feature-service";
|
|
23
23
|
export { addItemData as restAddItemData, addItemRelationship, createFolder, createGroup, createItem, createItemInFolder, moveItem, protectItem, SearchQueryBuilder, getGroupCategorySchema as restGetGroupCategorySchema, getItem, getItemData, getItemResources as restGetItemResources, getUserContent, getPortal as restGetPortal, getPortalUrl, searchGroupContent, setItemAccess, searchGroups as restSearchGroups, removeGroupUsers, removeItem as restRemoveItem, } from "@esri/arcgis-rest-portal";
|
|
24
|
-
export { ArcGISAuthError, encodeFormData, ArcGISIdentityManager as UserSession
|
|
24
|
+
export { ArcGISAuthError, encodeFormData, ArcGISIdentityManager as UserSession } from "@esri/arcgis-rest-request";
|
|
25
25
|
//custom export functions that mimic the same export function from arcgis-rest-js
|
|
26
26
|
//to bypass unit test error:
|
|
27
27
|
//Error: <spyOn> : <functon or property> is not declared writable or has no setter
|
|
@@ -151,9 +151,11 @@ export function deleteViewProps(layer, isPortal) {
|
|
|
151
151
|
*/
|
|
152
152
|
export function cacheFieldInfos(layer, fieldInfos, isView, isPortal) {
|
|
153
153
|
// cache the source fields as they are in the original source
|
|
154
|
-
|
|
154
|
+
// Note: layer.id is commonly 0 for the first layer, so use a presence check
|
|
155
|
+
// (not a truthy check) to avoid skipping the layer with id === 0.
|
|
156
|
+
if (layer && layer.id !== undefined && layer.id !== null) {
|
|
155
157
|
fieldInfos[layer.id] = {
|
|
156
|
-
sourceFields: JSON.parse(JSON.stringify(layer.fields)),
|
|
158
|
+
sourceFields: layer.fields ? JSON.parse(JSON.stringify(layer.fields)) : [],
|
|
157
159
|
type: layer.type,
|
|
158
160
|
id: layer.id,
|
|
159
161
|
};
|
|
@@ -800,7 +802,12 @@ export function addFeatureServiceDefinition(serviceUrl, listToAdd, templateDicti
|
|
|
800
802
|
removeLayerOptimization(item);
|
|
801
803
|
// this can still chunk layers
|
|
802
804
|
options = _updateAddOptions(itemTemplate, options, layerChunks, isSelfReferential, authentication);
|
|
803
|
-
|
|
805
|
+
// Route based on the discriminator set by getLayersAndTables (which derives from
|
|
806
|
+
// properties.layers vs properties.tables) rather than the layer object's own `type`
|
|
807
|
+
// field. The latter may be missing when users supply custom layer JSON via
|
|
808
|
+
// params (e.g. {{params.buildSolution.items.<id>.service.layers}}), which would
|
|
809
|
+
// otherwise cause every layer to be pushed into the `tables` array.
|
|
810
|
+
if (toAdd.type === "layer" || item.type === "Feature Layer") {
|
|
804
811
|
options.layers.push(item);
|
|
805
812
|
}
|
|
806
813
|
else {
|
|
@@ -1,7 +1,10 @@
|
|
|
1
|
-
Built 04/
|
|
1
|
+
Built 04/29/2026 20:42:20.71
|
|
2
2
|
develop
|
|
3
|
-
commit
|
|
4
|
-
|
|
5
|
-
|
|
3
|
+
commit 4eeb9ac61a1286354f309f0c39518d87c563dc6e
|
|
4
|
+
Merge: 2db5006bb 331225baf
|
|
5
|
+
Author: John Hauck <jhauck@esri.com>
|
|
6
|
+
Date: Wed Apr 29 13:56:18 2026 -0600
|
|
6
7
|
|
|
7
|
-
|
|
8
|
+
Merge pull request #1583 from Esri/layers-vs-tables
|
|
9
|
+
|
|
10
|
+
update layer type check
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@esri/solution-common",
|
|
3
|
-
"version": "6.6.1-next.
|
|
3
|
+
"version": "6.6.1-next.22",
|
|
4
4
|
"description": "Provides general helper functions for @esri/solution.js.",
|
|
5
5
|
"main": "dist/cjs/index.js",
|
|
6
6
|
"module": "dist/esm/index.js",
|
|
@@ -96,5 +96,5 @@
|
|
|
96
96
|
"esri",
|
|
97
97
|
"ES6"
|
|
98
98
|
],
|
|
99
|
-
"gitHead": "
|
|
99
|
+
"gitHead": "4eeb9ac61a1286354f309f0c39518d87c563dc6e"
|
|
100
100
|
}
|