@esri/hub-common 14.80.1 → 14.81.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/content/_internal/computeProps.js +3 -25
- package/dist/esm/content/_internal/computeProps.js.map +1 -1
- package/dist/esm/content/_internal/internalContentUtils.js +69 -1
- package/dist/esm/content/_internal/internalContentUtils.js.map +1 -1
- package/dist/esm/content/search.js +2 -15
- package/dist/esm/content/search.js.map +1 -1
- package/dist/esm/core/_internal/computeBaseProps.js +15 -0
- package/dist/esm/core/_internal/computeBaseProps.js.map +1 -0
- package/dist/esm/discussions/_internal/computeProps.js +3 -0
- package/dist/esm/discussions/_internal/computeProps.js.map +1 -1
- package/dist/esm/discussions/edit.js +2 -2
- package/dist/esm/discussions/edit.js.map +1 -1
- package/dist/esm/extent.js +39 -0
- package/dist/esm/extent.js.map +1 -1
- package/dist/esm/initiative-templates/_internal/computeProps.js +3 -0
- package/dist/esm/initiative-templates/_internal/computeProps.js.map +1 -1
- package/dist/esm/initiative-templates/fetch.js +2 -0
- package/dist/esm/initiative-templates/fetch.js.map +1 -1
- package/dist/esm/initiatives/HubInitiative.js +16 -9
- package/dist/esm/initiatives/HubInitiative.js.map +1 -1
- package/dist/esm/initiatives/HubInitiatives.js +2 -1
- package/dist/esm/initiatives/HubInitiatives.js.map +1 -1
- package/dist/esm/initiatives/_internal/computeProps.js +4 -2
- package/dist/esm/initiatives/_internal/computeProps.js.map +1 -1
- package/dist/esm/pages/HubPages.js +2 -1
- package/dist/esm/pages/HubPages.js.map +1 -1
- package/dist/esm/pages/_internal/computeProps.js +3 -0
- package/dist/esm/pages/_internal/computeProps.js.map +1 -1
- package/dist/esm/projects/HubProject.js +16 -9
- package/dist/esm/projects/HubProject.js.map +1 -1
- package/dist/esm/projects/_internal/computeProps.js +4 -2
- package/dist/esm/projects/_internal/computeProps.js.map +1 -1
- package/dist/esm/projects/fetch.js +2 -0
- package/dist/esm/projects/fetch.js.map +1 -1
- package/dist/esm/resources/doesResourceExist.js +19 -0
- package/dist/esm/resources/doesResourceExist.js.map +1 -0
- package/dist/esm/resources/index.js +1 -0
- package/dist/esm/resources/index.js.map +1 -1
- package/dist/esm/resources/upsertResource.js +4 -12
- package/dist/esm/resources/upsertResource.js.map +1 -1
- package/dist/esm/search/_internal/hubSearchItemsHelpers/ogcItemToSearchResult.js +1 -16
- package/dist/esm/search/_internal/hubSearchItemsHelpers/ogcItemToSearchResult.js.map +1 -1
- package/dist/esm/sites/HubSites.js +2 -1
- package/dist/esm/sites/HubSites.js.map +1 -1
- package/dist/esm/sites/_internal/computeProps.js +3 -0
- package/dist/esm/sites/_internal/computeProps.js.map +1 -1
- package/dist/esm/templates/_internal/computeProps.js +10 -7
- package/dist/esm/templates/_internal/computeProps.js.map +1 -1
- package/dist/esm/templates/fetch.js +2 -0
- package/dist/esm/templates/fetch.js.map +1 -1
- package/dist/node/content/_internal/computeProps.js +4 -27
- package/dist/node/content/_internal/computeProps.js.map +1 -1
- package/dist/node/content/_internal/internalContentUtils.js +69 -1
- package/dist/node/content/_internal/internalContentUtils.js.map +1 -1
- package/dist/node/content/search.js +1 -14
- package/dist/node/content/search.js.map +1 -1
- package/dist/node/core/_internal/computeBaseProps.js +19 -0
- package/dist/node/core/_internal/computeBaseProps.js.map +1 -0
- package/dist/node/discussions/_internal/computeProps.js +3 -0
- package/dist/node/discussions/_internal/computeProps.js.map +1 -1
- package/dist/node/discussions/edit.js +2 -2
- package/dist/node/discussions/edit.js.map +1 -1
- package/dist/node/extent.js +40 -1
- package/dist/node/extent.js.map +1 -1
- package/dist/node/initiative-templates/_internal/computeProps.js +3 -0
- package/dist/node/initiative-templates/_internal/computeProps.js.map +1 -1
- package/dist/node/initiative-templates/fetch.js +2 -0
- package/dist/node/initiative-templates/fetch.js.map +1 -1
- package/dist/node/initiatives/HubInitiative.js +16 -9
- package/dist/node/initiatives/HubInitiative.js.map +1 -1
- package/dist/node/initiatives/HubInitiatives.js +1 -0
- package/dist/node/initiatives/HubInitiatives.js.map +1 -1
- package/dist/node/initiatives/_internal/computeProps.js +4 -2
- package/dist/node/initiatives/_internal/computeProps.js.map +1 -1
- package/dist/node/pages/HubPages.js +1 -0
- package/dist/node/pages/HubPages.js.map +1 -1
- package/dist/node/pages/_internal/computeProps.js +3 -0
- package/dist/node/pages/_internal/computeProps.js.map +1 -1
- package/dist/node/projects/HubProject.js +16 -9
- package/dist/node/projects/HubProject.js.map +1 -1
- package/dist/node/projects/_internal/computeProps.js +4 -2
- package/dist/node/projects/_internal/computeProps.js.map +1 -1
- package/dist/node/projects/fetch.js +2 -0
- package/dist/node/projects/fetch.js.map +1 -1
- package/dist/node/resources/doesResourceExist.js +23 -0
- package/dist/node/resources/doesResourceExist.js.map +1 -0
- package/dist/node/resources/index.js +1 -0
- package/dist/node/resources/index.js.map +1 -1
- package/dist/node/resources/upsertResource.js +2 -10
- package/dist/node/resources/upsertResource.js.map +1 -1
- package/dist/node/search/_internal/hubSearchItemsHelpers/ogcItemToSearchResult.js +1 -16
- package/dist/node/search/_internal/hubSearchItemsHelpers/ogcItemToSearchResult.js.map +1 -1
- package/dist/node/sites/HubSites.js +1 -0
- package/dist/node/sites/HubSites.js.map +1 -1
- package/dist/node/sites/_internal/computeProps.js +3 -0
- package/dist/node/sites/_internal/computeProps.js.map +1 -1
- package/dist/node/templates/_internal/computeProps.js +10 -7
- package/dist/node/templates/_internal/computeProps.js.map +1 -1
- package/dist/node/templates/fetch.js +2 -0
- package/dist/node/templates/fetch.js.map +1 -1
- package/dist/types/content/_internal/computeProps.d.ts +0 -4
- package/dist/types/content/_internal/internalContentUtils.d.ts +16 -2
- package/dist/types/core/_internal/computeBaseProps.d.ts +9 -0
- package/dist/types/extent.d.ts +14 -0
- package/dist/types/resources/doesResourceExist.d.ts +10 -0
- package/dist/types/resources/index.d.ts +1 -0
- package/dist/types/search/types/IHubSearchResult.d.ts +4 -0
- package/package.json +1 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { IItem, IPortal } from "@esri/arcgis-rest-portal";
|
|
2
|
-
import { ILayerDefinition, ISpatialReference, IUser } from "@esri/arcgis-rest-types";
|
|
3
|
-
import { IHubContent, PublisherSource } from "../../core";
|
|
2
|
+
import { IExtent, ILayerDefinition, ISpatialReference, IUser } from "@esri/arcgis-rest-types";
|
|
3
|
+
import { IHubContent, IHubLocation, PublisherSource } from "../../core";
|
|
4
4
|
import { IHubGeography, GeographyProvenance, IHubRequestOptions } from "../../types";
|
|
5
5
|
import { IHubAdditionalResource } from "../../core/types/IHubAdditionalResource";
|
|
6
6
|
import { IRequestOptions } from "@esri/arcgis-rest-request";
|
|
@@ -110,6 +110,20 @@ export declare const setContentBoundary: (content: IHubContent, boundary: Geogra
|
|
|
110
110
|
* @private
|
|
111
111
|
*/
|
|
112
112
|
export declare const getContentBoundary: (item: IItem) => IHubGeography;
|
|
113
|
+
/**
|
|
114
|
+
* Constructs IExtent from numeric item extent array
|
|
115
|
+
* @param extent Raw item extent array
|
|
116
|
+
* @returns IExtent
|
|
117
|
+
*/
|
|
118
|
+
export declare const getExtentObject: (extent: number[][]) => IExtent;
|
|
119
|
+
/**
|
|
120
|
+
* Derives proper IHubLocation given an ArcGIS Item. If no
|
|
121
|
+
* location (item.properties.location) is present, one will be
|
|
122
|
+
* constructed from the item's extent.
|
|
123
|
+
* @param item ArcGIS Item
|
|
124
|
+
* @returns IHubLocation
|
|
125
|
+
*/
|
|
126
|
+
export declare const deriveLocationFromItem: (item: IItem) => IHubLocation;
|
|
113
127
|
/**
|
|
114
128
|
* Determine if we are in an enterprise environment
|
|
115
129
|
* NOTE: when no request options are provided, the underlying
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { IItem } from "@esri/arcgis-rest-types";
|
|
2
|
+
import { IHubItemEntity } from "../types";
|
|
3
|
+
/**
|
|
4
|
+
* Base property mapping for item backed entity types
|
|
5
|
+
* @param item IItem
|
|
6
|
+
* @param entity IHubItemEntity
|
|
7
|
+
* @returns
|
|
8
|
+
*/
|
|
9
|
+
export declare function computeBaseProps<T extends Partial<IHubItemEntity>>(item: IItem, entity: T): T;
|
package/dist/types/extent.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { IExtent, IPoint, IPolygon } from "@esri/arcgis-rest-types";
|
|
2
2
|
import { IHubRequestOptions, BBox } from "./types";
|
|
3
|
+
import { Polygon } from "geojson";
|
|
3
4
|
/**
|
|
4
5
|
* Turns an bounding box coordinate array into an extent object
|
|
5
6
|
* @param bBox bounding box coordinate array
|
|
@@ -54,3 +55,16 @@ export declare const extentToPolygon: (extent: IExtent) => IPolygon;
|
|
|
54
55
|
* @returns
|
|
55
56
|
*/
|
|
56
57
|
export declare const getExtentCenter: (extent: IExtent) => IPoint;
|
|
58
|
+
/**
|
|
59
|
+
* Checks coordinate or coordinate array to determine if all coordinates are
|
|
60
|
+
* possibly WGS84. This is a best effert attempt, not a guarantee.
|
|
61
|
+
* @param bboxOrCoordinates
|
|
62
|
+
* @returns
|
|
63
|
+
*/
|
|
64
|
+
export declare const allCoordinatesPossiblyWGS84: (bboxOrCoordinates: number[][] | number[]) => boolean;
|
|
65
|
+
/**
|
|
66
|
+
* Turns a geojson polygon in to a bounding box coordinate array
|
|
67
|
+
* @param polygon
|
|
68
|
+
* @returns BBox
|
|
69
|
+
*/
|
|
70
|
+
export declare const GeoJSONPolygonToBBox: (polygon: Partial<Polygon>) => BBox;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { IUserRequestOptions } from "@esri/arcgis-rest-auth";
|
|
2
|
+
/**
|
|
3
|
+
* Given an item ID, and a resource name, check if the resource exists
|
|
4
|
+
*
|
|
5
|
+
* @param id Item ID
|
|
6
|
+
* @param name Resource name
|
|
7
|
+
* @param ro Request options
|
|
8
|
+
* @returns boolean
|
|
9
|
+
*/
|
|
10
|
+
export declare function doesResourceExist(id: string, name: string, ro: IUserRequestOptions): Promise<boolean>;
|
|
@@ -33,6 +33,10 @@ export interface IHubSearchResult extends IHubEntityBase {
|
|
|
33
33
|
*/
|
|
34
34
|
typeKeywords?: string[];
|
|
35
35
|
/**
|
|
36
|
+
* @deprecated geometry is being dropped and replaced
|
|
37
|
+
* with 'location' for all location specific information
|
|
38
|
+
* on a search result
|
|
39
|
+
*
|
|
36
40
|
* Geometry connected to this entity
|
|
37
41
|
* For items, it will default to the extent,
|
|
38
42
|
* but may be derived from a boundary resource
|