@esri/hub-common 9.13.2 → 9.16.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/es2017/ArcGISContext.js +215 -158
- package/dist/es2017/ArcGISContext.js.map +1 -1
- package/dist/es2017/ArcGISContextManager.js +171 -0
- package/dist/es2017/ArcGISContextManager.js.map +1 -0
- package/dist/es2017/Hub.js +70 -0
- package/dist/es2017/Hub.js.map +1 -0
- package/dist/es2017/HubError.js +34 -0
- package/dist/es2017/HubError.js.map +1 -0
- package/dist/es2017/collections.js +23 -0
- package/dist/es2017/collections.js.map +1 -1
- package/dist/es2017/content/_internal.js +12 -0
- package/dist/es2017/content/_internal.js.map +1 -1
- package/dist/es2017/content/index.js +42 -18
- package/dist/es2017/content/index.js.map +1 -1
- package/dist/es2017/core/helpers/PropertyMapper.js +95 -0
- package/dist/es2017/core/helpers/PropertyMapper.js.map +1 -0
- package/dist/es2017/core/index.js +3 -0
- package/dist/es2017/core/index.js.map +1 -0
- package/dist/es2017/core/traits/WithBannerImage.js +1 -0
- package/dist/es2017/core/traits/WithBannerImage.js.map +1 -0
- package/dist/es2017/core/traits/WithLayout.js +1 -0
- package/dist/es2017/core/traits/WithLayout.js.map +1 -0
- package/dist/es2017/core/traits/WithSlug.js +1 -0
- package/dist/es2017/core/traits/WithSlug.js.map +1 -0
- package/dist/es2017/core/traits/index.js +4 -0
- package/dist/es2017/core/traits/index.js.map +1 -0
- package/dist/es2017/core/types/IContentEnrichments.js +1 -0
- package/dist/es2017/core/types/IContentEnrichments.js.map +1 -0
- package/dist/es2017/core/types/IHubContent.js +1 -0
- package/dist/es2017/core/types/IHubContent.js.map +1 -0
- package/dist/es2017/core/types/IHubEntityBase.js +1 -0
- package/dist/es2017/core/types/IHubEntityBase.js.map +1 -0
- package/dist/es2017/core/types/IHubEntityManager.js +1 -0
- package/dist/es2017/core/types/IHubEntityManager.js.map +1 -0
- package/dist/es2017/core/types/IHubEvent.js +1 -0
- package/dist/es2017/core/types/IHubEvent.js.map +1 -0
- package/dist/es2017/core/types/IHubImage.js +1 -0
- package/dist/es2017/core/types/IHubImage.js.map +1 -0
- package/dist/es2017/core/types/IHubInitiative.js +1 -0
- package/dist/es2017/core/types/IHubInitiative.js.map +1 -0
- package/dist/es2017/core/types/IHubItemEntity.js +1 -0
- package/dist/es2017/core/types/IHubItemEntity.js.map +1 -0
- package/dist/es2017/core/types/IHubLayout.js +1 -0
- package/dist/es2017/core/types/IHubLayout.js.map +1 -0
- package/dist/es2017/core/types/IHubPage.js +1 -0
- package/dist/es2017/core/types/IHubPage.js.map +1 -0
- package/dist/es2017/core/types/IHubProject.js +1 -0
- package/dist/es2017/core/types/IHubProject.js.map +1 -0
- package/dist/es2017/core/types/IHubSite.js +1 -0
- package/dist/es2017/core/types/IHubSite.js.map +1 -0
- package/dist/es2017/core/types/IHubTimeline.js +1 -0
- package/dist/es2017/core/types/IHubTimeline.js.map +1 -0
- package/dist/es2017/core/types/IItemEnrichments.js +1 -0
- package/dist/es2017/core/types/IItemEnrichments.js.map +1 -0
- package/dist/es2017/core/types/index.js +15 -0
- package/dist/es2017/core/types/index.js.map +1 -0
- package/dist/es2017/index.js +11 -5
- package/dist/es2017/index.js.map +1 -1
- package/dist/es2017/items/fail-safe-update.js +2 -2
- package/dist/es2017/items/fail-safe-update.js.map +1 -1
- package/dist/es2017/items/get-model-from-options.js +2 -2
- package/dist/es2017/items/get-model-from-options.js.map +1 -1
- package/dist/es2017/items/index.js +2 -3
- package/dist/es2017/items/index.js.map +1 -1
- package/dist/es2017/items/slugs.js +92 -0
- package/dist/es2017/items/slugs.js.map +1 -0
- package/dist/es2017/models/index.js +98 -0
- package/dist/es2017/models/index.js.map +1 -0
- package/dist/es2017/{items/serialize-model.js → models/serializeModel.js} +1 -1
- package/dist/es2017/models/serializeModel.js.map +1 -0
- package/dist/es2017/projects/HubProjectManager.js +115 -0
- package/dist/es2017/projects/HubProjectManager.js.map +1 -0
- package/dist/es2017/projects/HubProjects.js +194 -0
- package/dist/es2017/projects/HubProjects.js.map +1 -0
- package/dist/es2017/projects/index.js +3 -0
- package/dist/es2017/projects/index.js.map +1 -0
- package/dist/es2017/search/_searchContent.js +18 -7
- package/dist/es2017/search/_searchContent.js.map +1 -1
- package/dist/es2017/search/_searchGroups.js +1 -11
- package/dist/es2017/search/_searchGroups.js.map +1 -1
- package/dist/es2017/search/utils.js +1 -1
- package/dist/es2017/urls/getHubApiFromPortalUrl.js +21 -0
- package/dist/es2017/urls/getHubApiFromPortalUrl.js.map +1 -0
- package/dist/es2017/urls/getPortalBaseFromOrgUrl.js +25 -0
- package/dist/es2017/urls/getPortalBaseFromOrgUrl.js.map +1 -0
- package/dist/es2017/urls/index.js +2 -0
- package/dist/es2017/urls/index.js.map +1 -1
- package/dist/es2017/utils/dasherize.js +25 -0
- package/dist/es2017/utils/dasherize.js.map +1 -0
- package/dist/es2017/utils/index.js +1 -0
- package/dist/es2017/utils/index.js.map +1 -1
- package/dist/esm/ArcGISContext.js +299 -200
- package/dist/esm/ArcGISContext.js.map +1 -1
- package/dist/esm/ArcGISContextManager.js +215 -0
- package/dist/esm/ArcGISContextManager.js.map +1 -0
- package/dist/esm/Hub.js +89 -0
- package/dist/esm/Hub.js.map +1 -0
- package/dist/esm/HubError.js +40 -0
- package/dist/esm/HubError.js.map +1 -0
- package/dist/esm/collections.js +23 -0
- package/dist/esm/collections.js.map +1 -1
- package/dist/esm/content/_internal.js +14 -0
- package/dist/esm/content/_internal.js.map +1 -1
- package/dist/esm/content/index.js +42 -18
- package/dist/esm/content/index.js.map +1 -1
- package/dist/esm/core/helpers/PropertyMapper.js +97 -0
- package/dist/esm/core/helpers/PropertyMapper.js.map +1 -0
- package/dist/esm/core/index.js +3 -0
- package/dist/esm/core/index.js.map +1 -0
- package/dist/esm/core/traits/WithBannerImage.js +1 -0
- package/dist/esm/core/traits/WithBannerImage.js.map +1 -0
- package/dist/esm/core/traits/WithLayout.js +1 -0
- package/dist/esm/core/traits/WithLayout.js.map +1 -0
- package/dist/esm/core/traits/WithSlug.js +1 -0
- package/dist/esm/core/traits/WithSlug.js.map +1 -0
- package/dist/esm/core/traits/index.js +4 -0
- package/dist/esm/core/traits/index.js.map +1 -0
- package/dist/esm/core/types/IContentEnrichments.js +1 -0
- package/dist/esm/core/types/IContentEnrichments.js.map +1 -0
- package/dist/esm/core/types/IHubContent.js +1 -0
- package/dist/esm/core/types/IHubContent.js.map +1 -0
- package/dist/esm/core/types/IHubEntityBase.js +1 -0
- package/dist/esm/core/types/IHubEntityBase.js.map +1 -0
- package/dist/esm/core/types/IHubEntityManager.js +1 -0
- package/dist/esm/core/types/IHubEntityManager.js.map +1 -0
- package/dist/esm/core/types/IHubEvent.js +1 -0
- package/dist/esm/core/types/IHubEvent.js.map +1 -0
- package/dist/esm/core/types/IHubImage.js +1 -0
- package/dist/esm/core/types/IHubImage.js.map +1 -0
- package/dist/esm/core/types/IHubInitiative.js +1 -0
- package/dist/esm/core/types/IHubInitiative.js.map +1 -0
- package/dist/esm/core/types/IHubItemEntity.js +1 -0
- package/dist/esm/core/types/IHubItemEntity.js.map +1 -0
- package/dist/esm/core/types/IHubLayout.js +1 -0
- package/dist/esm/core/types/IHubLayout.js.map +1 -0
- package/dist/esm/core/types/IHubPage.js +1 -0
- package/dist/esm/core/types/IHubPage.js.map +1 -0
- package/dist/esm/core/types/IHubProject.js +1 -0
- package/dist/esm/core/types/IHubProject.js.map +1 -0
- package/dist/esm/core/types/IHubSite.js +1 -0
- package/dist/esm/core/types/IHubSite.js.map +1 -0
- package/dist/esm/core/types/IHubTimeline.js +1 -0
- package/dist/esm/core/types/IHubTimeline.js.map +1 -0
- package/dist/esm/core/types/IItemEnrichments.js +1 -0
- package/dist/esm/core/types/IItemEnrichments.js.map +1 -0
- package/dist/esm/core/types/index.js +15 -0
- package/dist/esm/core/types/index.js.map +1 -0
- package/dist/esm/index.js +11 -5
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/items/fail-safe-update.js +2 -2
- package/dist/esm/items/fail-safe-update.js.map +1 -1
- package/dist/esm/items/get-model-from-options.js +2 -2
- package/dist/esm/items/get-model-from-options.js.map +1 -1
- package/dist/esm/items/index.js +2 -3
- package/dist/esm/items/index.js.map +1 -1
- package/dist/esm/items/slugs.js +93 -0
- package/dist/esm/items/slugs.js.map +1 -0
- package/dist/esm/models/index.js +99 -0
- package/dist/esm/models/index.js.map +1 -0
- package/dist/esm/{items/serialize-model.js → models/serializeModel.js} +1 -1
- package/dist/esm/models/serializeModel.js.map +1 -0
- package/dist/esm/projects/HubProjectManager.js +142 -0
- package/dist/esm/projects/HubProjectManager.js.map +1 -0
- package/dist/esm/projects/HubProjects.js +225 -0
- package/dist/esm/projects/HubProjects.js.map +1 -0
- package/dist/esm/projects/index.js +3 -0
- package/dist/esm/projects/index.js.map +1 -0
- package/dist/esm/search/_searchContent.js +18 -7
- package/dist/esm/search/_searchContent.js.map +1 -1
- package/dist/esm/search/_searchGroups.js +3 -13
- package/dist/esm/search/_searchGroups.js.map +1 -1
- package/dist/esm/search/utils.js +1 -1
- package/dist/esm/urls/getHubApiFromPortalUrl.js +21 -0
- package/dist/esm/urls/getHubApiFromPortalUrl.js.map +1 -0
- package/dist/esm/urls/getPortalBaseFromOrgUrl.js +25 -0
- package/dist/esm/urls/getPortalBaseFromOrgUrl.js.map +1 -0
- package/dist/esm/urls/index.js +2 -0
- package/dist/esm/urls/index.js.map +1 -1
- package/dist/esm/utils/dasherize.js +25 -0
- package/dist/esm/utils/dasherize.js.map +1 -0
- package/dist/esm/utils/index.js +1 -0
- package/dist/esm/utils/index.js.map +1 -1
- package/dist/node/ArcGISContext.js +215 -158
- package/dist/node/ArcGISContext.js.map +1 -1
- package/dist/node/ArcGISContextManager.js +175 -0
- package/dist/node/ArcGISContextManager.js.map +1 -0
- package/dist/node/Hub.js +74 -0
- package/dist/node/Hub.js.map +1 -0
- package/dist/node/HubError.js +37 -0
- package/dist/node/HubError.js.map +1 -0
- package/dist/node/collections.js +24 -1
- package/dist/node/collections.js.map +1 -1
- package/dist/node/content/_internal.js +13 -1
- package/dist/node/content/_internal.js.map +1 -1
- package/dist/node/content/index.js +42 -18
- package/dist/node/content/index.js.map +1 -1
- package/dist/node/core/helpers/PropertyMapper.js +101 -0
- package/dist/node/core/helpers/PropertyMapper.js.map +1 -0
- package/dist/node/core/index.js +6 -0
- package/dist/node/core/index.js.map +1 -0
- package/dist/node/core/traits/WithBannerImage.js +3 -0
- package/dist/node/core/traits/WithBannerImage.js.map +1 -0
- package/dist/node/core/traits/WithLayout.js +3 -0
- package/dist/node/core/traits/WithLayout.js.map +1 -0
- package/dist/node/core/traits/WithSlug.js +3 -0
- package/dist/node/core/traits/WithSlug.js.map +1 -0
- package/dist/node/core/traits/index.js +7 -0
- package/dist/node/core/traits/index.js.map +1 -0
- package/dist/node/core/types/IContentEnrichments.js +3 -0
- package/dist/node/core/types/IContentEnrichments.js.map +1 -0
- package/dist/node/core/types/IHubContent.js +3 -0
- package/dist/node/core/types/IHubContent.js.map +1 -0
- package/dist/node/core/types/IHubEntityBase.js +3 -0
- package/dist/node/core/types/IHubEntityBase.js.map +1 -0
- package/dist/node/core/types/IHubEntityManager.js +3 -0
- package/dist/node/core/types/IHubEntityManager.js.map +1 -0
- package/dist/node/core/types/IHubEvent.js +3 -0
- package/dist/node/core/types/IHubEvent.js.map +1 -0
- package/dist/node/core/types/IHubImage.js +3 -0
- package/dist/node/core/types/IHubImage.js.map +1 -0
- package/dist/node/core/types/IHubInitiative.js +3 -0
- package/dist/node/core/types/IHubInitiative.js.map +1 -0
- package/dist/node/core/types/IHubItemEntity.js +3 -0
- package/dist/node/core/types/IHubItemEntity.js.map +1 -0
- package/dist/node/core/types/IHubLayout.js +3 -0
- package/dist/node/core/types/IHubLayout.js.map +1 -0
- package/dist/node/core/types/IHubPage.js +3 -0
- package/dist/node/core/types/IHubPage.js.map +1 -0
- package/dist/node/core/types/IHubProject.js +3 -0
- package/dist/node/core/types/IHubProject.js.map +1 -0
- package/dist/node/core/types/IHubSite.js +3 -0
- package/dist/node/core/types/IHubSite.js.map +1 -0
- package/dist/node/core/types/IHubTimeline.js +3 -0
- package/dist/node/core/types/IHubTimeline.js.map +1 -0
- package/dist/node/core/types/IItemEnrichments.js +3 -0
- package/dist/node/core/types/IItemEnrichments.js.map +1 -0
- package/dist/node/core/types/index.js +18 -0
- package/dist/node/core/types/index.js.map +1 -0
- package/dist/node/index.js +12 -5
- package/dist/node/index.js.map +1 -1
- package/dist/node/items/fail-safe-update.js +3 -3
- package/dist/node/items/fail-safe-update.js.map +1 -1
- package/dist/node/items/get-model-from-options.js +3 -3
- package/dist/node/items/get-model-from-options.js.map +1 -1
- package/dist/node/items/index.js +2 -3
- package/dist/node/items/index.js.map +1 -1
- package/dist/node/items/slugs.js +99 -0
- package/dist/node/items/slugs.js.map +1 -0
- package/dist/node/models/index.js +106 -0
- package/dist/node/models/index.js.map +1 -0
- package/dist/node/{items/serialize-model.js → models/serializeModel.js} +1 -1
- package/dist/node/models/serializeModel.js.map +1 -0
- package/dist/node/projects/HubProjectManager.js +119 -0
- package/dist/node/projects/HubProjectManager.js.map +1 -0
- package/dist/node/projects/HubProjects.js +201 -0
- package/dist/node/projects/HubProjects.js.map +1 -0
- package/dist/node/projects/index.js +6 -0
- package/dist/node/projects/index.js.map +1 -0
- package/dist/node/search/_searchContent.js +17 -6
- package/dist/node/search/_searchContent.js.map +1 -1
- package/dist/node/search/_searchGroups.js +1 -11
- package/dist/node/search/_searchGroups.js.map +1 -1
- package/dist/node/search/utils.js +1 -1
- package/dist/node/urls/getHubApiFromPortalUrl.js +25 -0
- package/dist/node/urls/getHubApiFromPortalUrl.js.map +1 -0
- package/dist/node/urls/getPortalBaseFromOrgUrl.js +29 -0
- package/dist/node/urls/getPortalBaseFromOrgUrl.js.map +1 -0
- package/dist/node/urls/index.js +2 -0
- package/dist/node/urls/index.js.map +1 -1
- package/dist/node/utils/dasherize.js +29 -0
- package/dist/node/utils/dasherize.js.map +1 -0
- package/dist/node/utils/index.js +1 -0
- package/dist/node/utils/index.js.map +1 -1
- package/dist/types/ArcGISContext.d.ts +276 -66
- package/dist/types/ArcGISContextManager.d.ts +130 -0
- package/dist/types/Hub.d.ts +72 -0
- package/dist/types/HubError.d.ts +17 -0
- package/dist/types/collections.d.ts +12 -0
- package/dist/types/content/_internal.d.ts +66 -38
- package/dist/types/content/index.d.ts +17 -8
- package/dist/types/core/helpers/PropertyMapper.d.ts +69 -0
- package/dist/types/core/index.d.ts +2 -0
- package/dist/types/core/traits/WithBannerImage.d.ts +30 -0
- package/dist/types/core/traits/WithLayout.d.ts +54 -0
- package/dist/types/core/traits/WithSlug.d.ts +15 -0
- package/dist/types/core/traits/index.d.ts +3 -0
- package/dist/types/core/types/IContentEnrichments.d.ts +10 -0
- package/dist/types/core/types/IHubContent.d.ts +77 -0
- package/dist/types/core/types/IHubEntityBase.d.ts +41 -0
- package/dist/types/core/types/IHubEntityManager.d.ts +33 -0
- package/dist/types/core/types/IHubEvent.d.ts +10 -0
- package/dist/types/core/types/IHubImage.d.ts +25 -0
- package/dist/types/core/types/IHubInitiative.d.ts +8 -0
- package/dist/types/core/types/IHubItemEntity.d.ts +42 -0
- package/dist/types/core/types/IHubLayout.d.ts +20 -0
- package/dist/types/core/types/IHubPage.d.ts +8 -0
- package/dist/types/core/types/IHubProject.d.ts +15 -0
- package/dist/types/core/types/IHubSite.d.ts +11 -0
- package/dist/types/core/types/IHubTimeline.d.ts +41 -0
- package/dist/types/core/types/IItemEnrichments.d.ts +23 -0
- package/dist/types/core/types/index.d.ts +14 -0
- package/dist/types/index.d.ts +11 -5
- package/dist/types/items/index.d.ts +2 -3
- package/dist/types/items/slugs.d.ts +43 -0
- package/dist/types/models/index.d.ts +42 -0
- package/dist/types/{items/serialize-model.d.ts → models/serializeModel.d.ts} +0 -0
- package/dist/types/projects/HubProjectManager.d.ts +81 -0
- package/dist/types/projects/HubProjects.d.ts +31 -0
- package/dist/types/projects/index.d.ts +2 -0
- package/dist/types/search/utils.d.ts +1 -1
- package/dist/types/types.d.ts +2 -92
- package/dist/types/urls/getHubApiFromPortalUrl.d.ts +8 -0
- package/dist/types/urls/getPortalBaseFromOrgUrl.d.ts +9 -0
- package/dist/types/urls/index.d.ts +2 -0
- package/dist/types/utils/dasherize.d.ts +17 -0
- package/dist/types/utils/index.d.ts +1 -0
- package/dist/umd/common.umd.js +2119 -1152
- package/dist/umd/common.umd.js.map +1 -1
- package/dist/umd/common.umd.min.js +1 -1
- package/dist/umd/common.umd.min.js.map +1 -1
- package/package.json +1 -1
- package/dist/es2017/ArcGISContextState.js +0 -203
- package/dist/es2017/ArcGISContextState.js.map +0 -1
- package/dist/es2017/items/get-model.js +0 -19
- package/dist/es2017/items/get-model.js.map +0 -1
- package/dist/es2017/items/serialize-model.js.map +0 -1
- package/dist/esm/ArcGISContextState.js +0 -285
- package/dist/esm/ArcGISContextState.js.map +0 -1
- package/dist/esm/items/get-model.js +0 -19
- package/dist/esm/items/get-model.js.map +0 -1
- package/dist/esm/items/serialize-model.js.map +0 -1
- package/dist/node/ArcGISContextState.js +0 -207
- package/dist/node/ArcGISContextState.js.map +0 -1
- package/dist/node/items/get-model.js +0 -23
- package/dist/node/items/get-model.js.map +0 -1
- package/dist/node/items/serialize-model.js.map +0 -1
- package/dist/types/ArcGISContextState.d.ts +0 -129
- package/dist/types/items/get-model.d.ts +0 -8
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Hub Images can either be the name of a resource
|
|
3
|
+
* or a full url to a publicly accessible image
|
|
4
|
+
*/
|
|
5
|
+
export interface IHubImage {
|
|
6
|
+
/**
|
|
7
|
+
* What type of image does this reference?
|
|
8
|
+
*/
|
|
9
|
+
type: "resource" | "url";
|
|
10
|
+
/**
|
|
11
|
+
* The name of the resource, or the url
|
|
12
|
+
*/
|
|
13
|
+
value: string;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* Extends IHubImage with a resource property
|
|
17
|
+
* User to send an image file to a store
|
|
18
|
+
*/
|
|
19
|
+
export interface IHubImageOptions extends IHubImage {
|
|
20
|
+
/**
|
|
21
|
+
* If defined, treated as a file and uploaded
|
|
22
|
+
* into a resource associated with an item
|
|
23
|
+
*/
|
|
24
|
+
resource?: any;
|
|
25
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { IWithBannerImage } from "../traits/WithBannerImage";
|
|
2
|
+
import { IHubItemEntity } from "./IHubItemEntity";
|
|
3
|
+
/**
|
|
4
|
+
* DRAFT: Under development and more properties will likely be added
|
|
5
|
+
* @internal
|
|
6
|
+
*/
|
|
7
|
+
export interface IHubInitiative extends IHubItemEntity, IWithBannerImage {
|
|
8
|
+
}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { IHubEntityBase } from "./IHubEntityBase";
|
|
2
|
+
import { IHubGeography } from "../..";
|
|
3
|
+
/**
|
|
4
|
+
* Properties exposed by Entities that are backed by Items
|
|
5
|
+
*/
|
|
6
|
+
export interface IHubItemEntity extends IHubEntityBase {
|
|
7
|
+
/**
|
|
8
|
+
* Thumbnail Uril (read-only)
|
|
9
|
+
*/
|
|
10
|
+
thumbnailUrl?: string;
|
|
11
|
+
/**
|
|
12
|
+
* Username of the owner of the item
|
|
13
|
+
*/
|
|
14
|
+
owner: string;
|
|
15
|
+
/**
|
|
16
|
+
* Description for the item
|
|
17
|
+
*/
|
|
18
|
+
description?: string;
|
|
19
|
+
/**
|
|
20
|
+
* boundary will default to the item extent
|
|
21
|
+
* but can be overwritten by enrichments from the Hub API (inline)
|
|
22
|
+
* or fetched from a location such as /resources/boundary.json
|
|
23
|
+
*/
|
|
24
|
+
boundary?: IHubGeography;
|
|
25
|
+
/**
|
|
26
|
+
* Culture code of the content
|
|
27
|
+
* i.e. `en-us`
|
|
28
|
+
*/
|
|
29
|
+
culture?: string;
|
|
30
|
+
/**
|
|
31
|
+
* User configurable tags
|
|
32
|
+
*/
|
|
33
|
+
tags: string[];
|
|
34
|
+
/**
|
|
35
|
+
* System configurable typekeywords
|
|
36
|
+
*/
|
|
37
|
+
typeKeywords?: string[];
|
|
38
|
+
/**
|
|
39
|
+
* Canonical Url for the Entity
|
|
40
|
+
*/
|
|
41
|
+
url?: string;
|
|
42
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* General interface for a Layout
|
|
3
|
+
*
|
|
4
|
+
* Optional header and footer are only used for
|
|
5
|
+
* a Hub Site
|
|
6
|
+
*/
|
|
7
|
+
export interface IHubLayout {
|
|
8
|
+
/**
|
|
9
|
+
* Sections are required for all Layouts
|
|
10
|
+
*/
|
|
11
|
+
sections: [Record<string, any>];
|
|
12
|
+
/**
|
|
13
|
+
* header is optional; Only used in Sites
|
|
14
|
+
*/
|
|
15
|
+
header?: Record<string, any>;
|
|
16
|
+
/**
|
|
17
|
+
* footer is optional; Only used in Sites
|
|
18
|
+
*/
|
|
19
|
+
footer?: Record<string, any>;
|
|
20
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { IWithLayout } from "../traits/WithLayout";
|
|
2
|
+
import { IHubItemEntity } from "./IHubItemEntity";
|
|
3
|
+
/**
|
|
4
|
+
* DRAFT: Under development and more properties will likely be added
|
|
5
|
+
* @internal
|
|
6
|
+
*/
|
|
7
|
+
export interface IHubPage extends IHubItemEntity, IWithLayout {
|
|
8
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { IHubTimeline } from ".";
|
|
2
|
+
import { IHubItemEntity, IWithLayout, IWithSlug } from "..";
|
|
3
|
+
/**
|
|
4
|
+
* Defines the properties of a Hub Project object
|
|
5
|
+
*/
|
|
6
|
+
export interface IHubProject extends IHubItemEntity, IWithSlug, IWithLayout {
|
|
7
|
+
/**
|
|
8
|
+
* Timeline for the project
|
|
9
|
+
*/
|
|
10
|
+
timeline?: IHubTimeline;
|
|
11
|
+
/**
|
|
12
|
+
* Project Status
|
|
13
|
+
*/
|
|
14
|
+
status: "inactive" | "active";
|
|
15
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { IWithLayout } from "../traits/WithLayout";
|
|
2
|
+
import { IHubItemEntity } from "./IHubItemEntity";
|
|
3
|
+
/**
|
|
4
|
+
* DRAFT: Under development and more properties will likely be added
|
|
5
|
+
* @internal
|
|
6
|
+
*/
|
|
7
|
+
export interface IHubSite extends IHubItemEntity, IWithLayout {
|
|
8
|
+
header: Record<string, any>;
|
|
9
|
+
footer: Record<string, any>;
|
|
10
|
+
pages: Record<string, any>;
|
|
11
|
+
}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Hub Timeline Definition
|
|
3
|
+
*/
|
|
4
|
+
export interface IHubTimeline {
|
|
5
|
+
title: string;
|
|
6
|
+
description: string;
|
|
7
|
+
stages: IHubStage[];
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* Hub Timeline Stage
|
|
11
|
+
*/
|
|
12
|
+
export interface IHubStage {
|
|
13
|
+
/**
|
|
14
|
+
* Stage identifier
|
|
15
|
+
*/
|
|
16
|
+
id: number;
|
|
17
|
+
/**
|
|
18
|
+
* Stage Title
|
|
19
|
+
*/
|
|
20
|
+
title: string;
|
|
21
|
+
/**
|
|
22
|
+
* Timeframe for the stage
|
|
23
|
+
* i.e. "Late Fall 2022"
|
|
24
|
+
*/
|
|
25
|
+
timeframe: string;
|
|
26
|
+
/**
|
|
27
|
+
* Stage Description
|
|
28
|
+
*/
|
|
29
|
+
description: string;
|
|
30
|
+
/**
|
|
31
|
+
* Stage status
|
|
32
|
+
*/
|
|
33
|
+
status: string;
|
|
34
|
+
/**
|
|
35
|
+
* Icon Name
|
|
36
|
+
*/
|
|
37
|
+
icon: string;
|
|
38
|
+
isEditing: boolean;
|
|
39
|
+
leadingElement: boolean;
|
|
40
|
+
trailingElement: boolean;
|
|
41
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { IUser, IPortal } from "@esri/arcgis-rest-portal";
|
|
2
|
+
import { IEnrichmentErrorInfo } from "../..";
|
|
3
|
+
export interface IItemEnrichments {
|
|
4
|
+
/** The portal item's data (if any) */
|
|
5
|
+
data?: {
|
|
6
|
+
[propName: string]: any;
|
|
7
|
+
};
|
|
8
|
+
/** The content's formal metadata */
|
|
9
|
+
metadata?: any;
|
|
10
|
+
/** The ids of any groups that the item belongs to */
|
|
11
|
+
groupIds?: string[];
|
|
12
|
+
/** The user that owns the item */
|
|
13
|
+
ownerUser?: IUser;
|
|
14
|
+
/**
|
|
15
|
+
* The owner's organization (portal) details (id, name, extent, etc)
|
|
16
|
+
*/
|
|
17
|
+
org?: Partial<IPortal>;
|
|
18
|
+
/**
|
|
19
|
+
* Any errors encountered when fetching enrichments
|
|
20
|
+
* see https://github.com/ArcGIS/hub-indexer/blob/master/docs/errors.md#response-formatting-for-errors
|
|
21
|
+
*/
|
|
22
|
+
errors?: IEnrichmentErrorInfo[];
|
|
23
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export * from "./IContentEnrichments";
|
|
2
|
+
export * from "./IItemEnrichments";
|
|
3
|
+
export * from "./IHubContent";
|
|
4
|
+
export * from "./IHubEntityBase";
|
|
5
|
+
export * from "./IHubItemEntity";
|
|
6
|
+
export * from "./IHubEntityManager";
|
|
7
|
+
export * from "./IHubEvent";
|
|
8
|
+
export * from "./IHubImage";
|
|
9
|
+
export * from "./IHubInitiative";
|
|
10
|
+
export * from "./IHubLayout";
|
|
11
|
+
export * from "./IHubPage";
|
|
12
|
+
export * from "./IHubProject";
|
|
13
|
+
export * from "./IHubSite";
|
|
14
|
+
export * from "./IHubTimeline";
|
package/dist/types/index.d.ts
CHANGED
|
@@ -1,25 +1,31 @@
|
|
|
1
1
|
export * from "./access";
|
|
2
2
|
export * from "./api";
|
|
3
|
+
export * from "./ArcGISContext";
|
|
4
|
+
export * from "./ArcGISContextManager";
|
|
3
5
|
export * from "./auth";
|
|
4
6
|
export * from "./categories";
|
|
5
7
|
export * from "./content";
|
|
8
|
+
export * from "./core";
|
|
6
9
|
export * from "./downloads";
|
|
7
10
|
export * from "./extent";
|
|
8
11
|
export * from "./groups";
|
|
12
|
+
export * from "./i18n";
|
|
9
13
|
export * from "./items";
|
|
14
|
+
export * from "./models";
|
|
10
15
|
export * from "./objects";
|
|
16
|
+
export * from "./projects";
|
|
17
|
+
export * from "./request";
|
|
11
18
|
export * from "./resources";
|
|
12
19
|
export * from "./search";
|
|
13
20
|
export * from "./sites";
|
|
21
|
+
export * from "./surveys";
|
|
14
22
|
export * from "./types";
|
|
15
23
|
export * from "./urls";
|
|
16
24
|
export * from "./util";
|
|
17
25
|
export * from "./utils";
|
|
18
|
-
export * from "./
|
|
19
|
-
export * from "./request";
|
|
20
|
-
export * from "./surveys";
|
|
21
|
-
export * from "./ArcGISContext";
|
|
26
|
+
export * from "./Hub";
|
|
22
27
|
import OperationStack from "./OperationStack";
|
|
23
28
|
import OperationError from "./OperationError";
|
|
24
|
-
|
|
29
|
+
import HubError from "./HubError";
|
|
30
|
+
export { OperationStack, OperationError, HubError };
|
|
25
31
|
export { btoa, atob } from "abab";
|
|
@@ -2,13 +2,10 @@ export * from "./_unprotect-and-remove-item";
|
|
|
2
2
|
export * from "./apply-properties-to-items";
|
|
3
3
|
export * from "./delete-prop";
|
|
4
4
|
export * from "./fail-safe-update";
|
|
5
|
-
export * from "./get-model";
|
|
6
5
|
export * from "./get-model-from-options";
|
|
7
6
|
export * from "./interpolate";
|
|
8
7
|
export * from "./interpolate-item-id";
|
|
9
|
-
export * from "./normalize-solution-template-item";
|
|
10
8
|
export * from "./replace-item-id";
|
|
11
|
-
export * from "./serialize-model";
|
|
12
9
|
export * from "./share-item-to-groups";
|
|
13
10
|
export * from "./unprotect-model";
|
|
14
11
|
export * from "./unshare-item-from-groups";
|
|
@@ -16,3 +13,5 @@ export * from "./does-item-exist-with-title";
|
|
|
16
13
|
export * from "./get-unique-item-title";
|
|
17
14
|
export * from "./fetch-all-pages";
|
|
18
15
|
export * from "./get-structured-license";
|
|
16
|
+
export * from "./slugs";
|
|
17
|
+
export * from "./normalize-solution-template-item";
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { IRequestOptions } from "@esri/arcgis-rest-request";
|
|
2
|
+
import { IItem } from "@esri/arcgis-rest-types";
|
|
3
|
+
/**
|
|
4
|
+
* Create a slug, namespaced to an org
|
|
5
|
+
* Typically used to lookup items by a human readable name in urls
|
|
6
|
+
*
|
|
7
|
+
* @param title
|
|
8
|
+
* @param orgKey
|
|
9
|
+
* @returns
|
|
10
|
+
*/
|
|
11
|
+
export declare function constructSlug(title: string, orgKey: string): string;
|
|
12
|
+
/**
|
|
13
|
+
* Adds/Updates the slug typekeyword
|
|
14
|
+
* Returns a new array of keywords
|
|
15
|
+
* @param typeKeywords
|
|
16
|
+
* @param slug
|
|
17
|
+
* @returns
|
|
18
|
+
*/
|
|
19
|
+
export declare function setSlugKeyword(typeKeywords: string[], slug: string): string[];
|
|
20
|
+
/**
|
|
21
|
+
* Get an item by searching for items with a typeKeyword like `slug|{slug-value}`
|
|
22
|
+
*
|
|
23
|
+
* For example, if you pass a slug `"snow-map"` into this function, it will
|
|
24
|
+
* search for items with `slug|snow-map` in it's typeKeywords array,
|
|
25
|
+
*
|
|
26
|
+
* @param slug
|
|
27
|
+
* @param requestOptions
|
|
28
|
+
* @returns
|
|
29
|
+
*/
|
|
30
|
+
export declare function getItemBySlug(slug: string, requestOptions: IRequestOptions): Promise<IItem>;
|
|
31
|
+
/**
|
|
32
|
+
* Given a slug, search for items using that slug, incrementing the slug name until
|
|
33
|
+
* a unique value is found
|
|
34
|
+
*
|
|
35
|
+
* For example, if a slug of `"snow-map"` into this function and some item exists
|
|
36
|
+
* with that slug, it would return `"snow-map-1"`.
|
|
37
|
+
*
|
|
38
|
+
* @param slug
|
|
39
|
+
* @param requestOptions
|
|
40
|
+
* @param step
|
|
41
|
+
* @returns
|
|
42
|
+
*/
|
|
43
|
+
export declare function getUniqueSlug(slug: string, requestOptions: IRequestOptions, step?: number): Promise<string>;
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
export * from "./serializeModel";
|
|
2
|
+
import { IUserRequestOptions } from "@esri/arcgis-rest-auth";
|
|
3
|
+
import { IRequestOptions } from "@esri/arcgis-rest-request";
|
|
4
|
+
import { IModel } from "..";
|
|
5
|
+
/**
|
|
6
|
+
* Gets the full item/data model for an item id
|
|
7
|
+
* @param {string} id
|
|
8
|
+
* @param {Object} requestOptions
|
|
9
|
+
*/
|
|
10
|
+
export declare function getModel(id: string, requestOptions: IRequestOptions): Promise<IModel>;
|
|
11
|
+
/**
|
|
12
|
+
* Get a model by it's slug
|
|
13
|
+
*
|
|
14
|
+
* This uses the [Filter](https://developers.arcgis.com/rest/users-groups-and-items/search-reference.htm) option of the
|
|
15
|
+
* to search for an item that has a typekeyword of `slug|{slug-value}`
|
|
16
|
+
*
|
|
17
|
+
* This is useful for applications that want to use human-readable urls instead
|
|
18
|
+
* of using item ids.
|
|
19
|
+
*
|
|
20
|
+
* @param slug
|
|
21
|
+
* @param requestOptions
|
|
22
|
+
* @returns
|
|
23
|
+
*/
|
|
24
|
+
export declare function getModelBySlug(slug: string, requestOptions: IRequestOptions): Promise<IModel>;
|
|
25
|
+
/**
|
|
26
|
+
* Create an item to back and IModel.
|
|
27
|
+
*
|
|
28
|
+
* @param {IModel}
|
|
29
|
+
* @param {IRequestOptions} requestOptions
|
|
30
|
+
* @returns {Promise<IModel>}
|
|
31
|
+
*/
|
|
32
|
+
export declare function createModel(model: IModel, requestOptions: IUserRequestOptions): Promise<IModel>;
|
|
33
|
+
/**
|
|
34
|
+
* Update an IModel. Generic function that will be used across all
|
|
35
|
+
* type-specific update functions
|
|
36
|
+
*
|
|
37
|
+
* @export
|
|
38
|
+
* @param {IModel} "model" object (i.e. `{item:{...}, data:{...}}`)
|
|
39
|
+
* @param {IRequestOptions} requestOptions
|
|
40
|
+
* @returns {Promise<IModel>}
|
|
41
|
+
*/
|
|
42
|
+
export declare function updateModel(model: IModel, requestOptions: IUserRequestOptions): Promise<IModel>;
|
|
File without changes
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
import { IUserRequestOptions } from "@esri/arcgis-rest-auth";
|
|
2
|
+
import { IRequestOptions } from "@esri/arcgis-rest-request";
|
|
3
|
+
import { ArcGISContextManager } from "../ArcGISContextManager";
|
|
4
|
+
import { IArcGISContext } from "..";
|
|
5
|
+
import { IHubProject, IHubEntityManager } from "../core/types";
|
|
6
|
+
/**
|
|
7
|
+
* Centralized functions used to manage IHubProject instances
|
|
8
|
+
*
|
|
9
|
+
* This class is a convenience wrapper over util functions which
|
|
10
|
+
* are also directly accessible for use in scenarios where
|
|
11
|
+
* classes are inconvenient.
|
|
12
|
+
*/
|
|
13
|
+
export declare class HubProjectManager implements IHubEntityManager<IHubProject> {
|
|
14
|
+
/**
|
|
15
|
+
* Hold a context manager, which should be a single instance for
|
|
16
|
+
* an application. When authentication changes, the .context
|
|
17
|
+
* property on the context manager will be replaced. As long as
|
|
18
|
+
* all the fns in this class leverage properties on .context
|
|
19
|
+
* everything be kept in sync.
|
|
20
|
+
*/
|
|
21
|
+
private _contextManager;
|
|
22
|
+
/**
|
|
23
|
+
* Hold context directly. Allows the class to be used in places
|
|
24
|
+
* where an `ArcGISContextManager` is not directly available, but
|
|
25
|
+
* an `IArcGISContext` is
|
|
26
|
+
*/
|
|
27
|
+
private _context;
|
|
28
|
+
/**
|
|
29
|
+
* Private so we can employ a factory function should we need
|
|
30
|
+
* async work during creation
|
|
31
|
+
* @param contextOrManager
|
|
32
|
+
*/
|
|
33
|
+
private constructor();
|
|
34
|
+
/**
|
|
35
|
+
* Factory function to construct a new HubProjectManager instance.
|
|
36
|
+
*
|
|
37
|
+
* Note: Used so that we could do async actions in the ctor.
|
|
38
|
+
* @param contextOrManager
|
|
39
|
+
* @returns
|
|
40
|
+
*/
|
|
41
|
+
static init(contextOrManager: ArcGISContextManager | IArcGISContext): HubProjectManager;
|
|
42
|
+
/**
|
|
43
|
+
* Getter to abstract how we store the context
|
|
44
|
+
*/
|
|
45
|
+
private get context();
|
|
46
|
+
/**
|
|
47
|
+
* Create and store new project.
|
|
48
|
+
*
|
|
49
|
+
* Projects are stored as Items in the Sharing API
|
|
50
|
+
* @param project
|
|
51
|
+
* @param requestOptions
|
|
52
|
+
* @returns
|
|
53
|
+
*/
|
|
54
|
+
create(project: Partial<IHubProject>, requestOptions?: IUserRequestOptions): Promise<IHubProject>;
|
|
55
|
+
/**
|
|
56
|
+
* Update a project
|
|
57
|
+
* @param project
|
|
58
|
+
* @param requestOptions
|
|
59
|
+
* @returns
|
|
60
|
+
*/
|
|
61
|
+
update(project: IHubProject, requestOptions?: IUserRequestOptions): Promise<IHubProject>;
|
|
62
|
+
/**
|
|
63
|
+
* Destroy a project.
|
|
64
|
+
* This permanently removes the backing Item
|
|
65
|
+
* @param id
|
|
66
|
+
* @param requestOptions
|
|
67
|
+
* @returns
|
|
68
|
+
*/
|
|
69
|
+
destroy(id: string, requestOptions?: IUserRequestOptions): Promise<void>;
|
|
70
|
+
/**
|
|
71
|
+
* Fetch a Project via id or it's slug
|
|
72
|
+
*
|
|
73
|
+
* This function does not require a user to be
|
|
74
|
+
* authenticated, but it does require an `IRequestOptions`
|
|
75
|
+
* which contains the portal instance to communicate with
|
|
76
|
+
* @param identifier
|
|
77
|
+
* @param requestOptions
|
|
78
|
+
* @returns
|
|
79
|
+
*/
|
|
80
|
+
fetch(identifier: string, requestOptions?: IRequestOptions): Promise<IHubProject>;
|
|
81
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { IUserRequestOptions } from "@esri/arcgis-rest-auth";
|
|
2
|
+
import { IRequestOptions } from "@esri/arcgis-rest-request";
|
|
3
|
+
import { IHubProject } from "../core/types";
|
|
4
|
+
export declare const HUB_PROJECT_ITEM_TYPE = "Web Mapping Application";
|
|
5
|
+
/**
|
|
6
|
+
* Create a new Hub Project item
|
|
7
|
+
*
|
|
8
|
+
* Minimal properties are name and org
|
|
9
|
+
*
|
|
10
|
+
* @param project
|
|
11
|
+
* @param requestOptions
|
|
12
|
+
*/
|
|
13
|
+
export declare function createProject(partialProject: Partial<IHubProject>, requestOptions: IUserRequestOptions): Promise<IHubProject>;
|
|
14
|
+
/**
|
|
15
|
+
* Update a Hub Project
|
|
16
|
+
* @param project
|
|
17
|
+
* @param requestOptions
|
|
18
|
+
*/
|
|
19
|
+
export declare function updateProject(project: IHubProject, requestOptions: IUserRequestOptions): Promise<IHubProject>;
|
|
20
|
+
/**
|
|
21
|
+
* Get a Hub Project by id or slug
|
|
22
|
+
* @param identifier item id or slug
|
|
23
|
+
* @param requestOptions
|
|
24
|
+
*/
|
|
25
|
+
export declare function getProject(identifier: string, requestOptions: IRequestOptions): Promise<IHubProject>;
|
|
26
|
+
/**
|
|
27
|
+
* Remove a Hub Project
|
|
28
|
+
* @param id
|
|
29
|
+
* @param requestOptions
|
|
30
|
+
*/
|
|
31
|
+
export declare function destroyProject(id: string, requestOptions: IUserRequestOptions): Promise<void>;
|
|
@@ -104,7 +104,7 @@ export declare function getNextFunction<T>(request: ISearchOptions, nextStart: n
|
|
|
104
104
|
* Construct a the full url to a group thumbnail
|
|
105
105
|
*
|
|
106
106
|
* - If the group has a thumbnail, construct the full url
|
|
107
|
-
* - If the group is not public, append on the token
|
|
107
|
+
* - If the group is not public, append on the token (if passed in)
|
|
108
108
|
* @param portalUrl
|
|
109
109
|
* @param group
|
|
110
110
|
* @param token
|
package/dist/types/types.d.ts
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import { IItem, IUser, IGroup, IGeometry
|
|
1
|
+
import { IItem, IUser, IGroup, IGeometry } from "@esri/arcgis-rest-types";
|
|
2
2
|
import { IPortal, ISearchResult } from "@esri/arcgis-rest-portal";
|
|
3
3
|
import { UserSession } from "@esri/arcgis-rest-auth";
|
|
4
|
-
import { IStructuredLicense } from "./items/get-structured-license";
|
|
5
4
|
import { IRequestOptions } from "@esri/arcgis-rest-request";
|
|
6
5
|
import { IFacet } from "./search";
|
|
7
6
|
/**
|
|
@@ -159,6 +158,7 @@ export interface IHubGeography {
|
|
|
159
158
|
export declare type SearchableType = IItem | IGroup | IUser;
|
|
160
159
|
export declare type SearchFunction = (...args: any[]) => Promise<ISearchResult<SearchableType>>;
|
|
161
160
|
/**
|
|
161
|
+
* DEPRECATED: Use IHubEntityBase instead.
|
|
162
162
|
* Properties that are common to Hub content, community, members, etc
|
|
163
163
|
*
|
|
164
164
|
* @export
|
|
@@ -212,96 +212,6 @@ export interface IEnrichmentErrorInfo {
|
|
|
212
212
|
statusCode?: number;
|
|
213
213
|
message?: string;
|
|
214
214
|
}
|
|
215
|
-
/**
|
|
216
|
-
* Properties that are common to all Hub content types (dataset, map, document, etc)
|
|
217
|
-
*
|
|
218
|
-
* @export
|
|
219
|
-
* @interface IHubContent
|
|
220
|
-
* @extends {IHubResource,IItem}
|
|
221
|
-
*/
|
|
222
|
-
export interface IHubContent extends IHubResource, IItem {
|
|
223
|
-
/**
|
|
224
|
-
* The content's ID for use with the Hub API
|
|
225
|
-
* For most content this will be the item's id
|
|
226
|
-
* For layers this will be `<itemId>_<layerId>`
|
|
227
|
-
* This will be undefined for private items and in enterprise
|
|
228
|
-
* because only public online items are included in the Hub API
|
|
229
|
-
*/
|
|
230
|
-
hubId?: string;
|
|
231
|
-
/**
|
|
232
|
-
* Content visibility and access control, including groups
|
|
233
|
-
*/
|
|
234
|
-
permissions: {
|
|
235
|
-
/** Visibility of the content */
|
|
236
|
-
visibility: Visibility;
|
|
237
|
-
/** Current user's control over the content */
|
|
238
|
-
control?: AccessControl;
|
|
239
|
-
/** The groups that have access to the item (as far as you know) */
|
|
240
|
-
groups?: IGroup[];
|
|
241
|
-
};
|
|
242
|
-
family?: HubFamily;
|
|
243
|
-
/**
|
|
244
|
-
* Item categories are the original, non-flattened item
|
|
245
|
-
* category strings.
|
|
246
|
-
*/
|
|
247
|
-
itemCategories?: string[];
|
|
248
|
-
/**
|
|
249
|
-
* The normalized item type (we run normalizeItemType on
|
|
250
|
-
* the item in order to compute this prop)
|
|
251
|
-
*/
|
|
252
|
-
normalizedType?: string;
|
|
253
|
-
/**
|
|
254
|
-
* Date the content was published (formal metadata),
|
|
255
|
-
* defaults to the date the content was created
|
|
256
|
-
*/
|
|
257
|
-
publishedDate: Date;
|
|
258
|
-
/** Description of the source of the published date */
|
|
259
|
-
publishedDateSource?: string;
|
|
260
|
-
updateFrequency?: string;
|
|
261
|
-
/** Optional links to show in the Hub application for this content */
|
|
262
|
-
actionLinks?: IActionLink[];
|
|
263
|
-
/** Configure which Hub application actions (i.e. create web map) are available for this content */
|
|
264
|
-
hubActions?: object;
|
|
265
|
-
metrics?: {
|
|
266
|
-
/** Visibility of the metrics for this content in the Hub application */
|
|
267
|
-
visibility: Visibility | "updateGroups";
|
|
268
|
-
};
|
|
269
|
-
/** The content's unique URL slug in the Hub app */
|
|
270
|
-
slug?: string;
|
|
271
|
-
/** URL of the Portal API data endpoint for the resource */
|
|
272
|
-
portalDataUrl?: string;
|
|
273
|
-
/** The ids of any groups that the item belongs to */
|
|
274
|
-
groupIds?: string[];
|
|
275
|
-
/**
|
|
276
|
-
* Any errors encountered when indexing or composing the content
|
|
277
|
-
* see https://github.com/ArcGIS/hub-indexer/blob/master/docs/errors.md#response-formatting-for-errors
|
|
278
|
-
*/
|
|
279
|
-
errors?: IEnrichmentErrorInfo[];
|
|
280
|
-
/**
|
|
281
|
-
* The item data associated w/ most types of content
|
|
282
|
-
* the format of the data depends on the item type
|
|
283
|
-
*/
|
|
284
|
-
data?: {
|
|
285
|
-
[propName: string]: any;
|
|
286
|
-
};
|
|
287
|
-
/** service information (currentVersion, capabilities, maxRecordCount etc) */
|
|
288
|
-
server?: Partial<IFeatureServiceDefinition>;
|
|
289
|
-
/** layer information (geometryType, fields, etc) for related layers in the service */
|
|
290
|
-
layers?: Array<Partial<ILayerDefinition>>;
|
|
291
|
-
/** layer information (geometryType, fields, etc) */
|
|
292
|
-
layer?: Partial<ILayerDefinition>;
|
|
293
|
-
recordCount?: number;
|
|
294
|
-
/** The owner's organization id */
|
|
295
|
-
orgId?: string;
|
|
296
|
-
/**
|
|
297
|
-
* The owner's organization (portal) details (id, name, extent, etc)
|
|
298
|
-
*/
|
|
299
|
-
org?: Partial<IPortal>;
|
|
300
|
-
/** Whether the content is downloadable in the Hub app */
|
|
301
|
-
isDownloadable: boolean;
|
|
302
|
-
/** The content's structured license info */
|
|
303
|
-
structuredLicense?: IStructuredLicense;
|
|
304
|
-
}
|
|
305
215
|
export interface IActionLink {
|
|
306
216
|
/** Link title */
|
|
307
217
|
title: string;
|
|
@@ -13,6 +13,8 @@ export * from "./get-item-home-url";
|
|
|
13
13
|
export * from "./get-item-api-url";
|
|
14
14
|
export * from "./get-item-data-url";
|
|
15
15
|
export * from "./convert-urls-to-anchor-tags";
|
|
16
|
+
export * from "./getHubApiFromPortalUrl";
|
|
17
|
+
export * from "./getPortalBaseFromOrgUrl";
|
|
16
18
|
/**
|
|
17
19
|
*
|
|
18
20
|
* @param url
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Dasherize a string
|
|
3
|
+
*
|
|
4
|
+
* ```javascript
|
|
5
|
+
* import { dasherize } from '@esri/hub-common';
|
|
6
|
+
* dasherize('innerHTML'); // 'inner-html'
|
|
7
|
+
* dasherize('action_name'); // 'action-name'
|
|
8
|
+
* dasherize('css-class-name'); // 'css-class-name'
|
|
9
|
+
* dasherize('my favorite items'); // 'my-favorite-items'
|
|
10
|
+
* dasherize('privateDocs/ownerInvoice'; // 'private-docs/owner-invoice'
|
|
11
|
+
* ```
|
|
12
|
+
*
|
|
13
|
+
* Extracted and modified from Ember.js source code - MIT license
|
|
14
|
+
* @param value
|
|
15
|
+
* @returns
|
|
16
|
+
*/
|
|
17
|
+
export declare function dasherize(value: string): string;
|