@esri/hub-common 14.223.0 → 14.225.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/associations/index.js +0 -3
- package/dist/esm/associations/index.js.map +1 -1
- package/dist/esm/associations/types.js.map +1 -1
- package/dist/esm/content/_internal/ContentBusinessRules.js +0 -5
- package/dist/esm/content/_internal/ContentBusinessRules.js.map +1 -1
- package/dist/esm/content/hostedServiceUtils.js +0 -22
- package/dist/esm/content/hostedServiceUtils.js.map +1 -1
- package/dist/esm/core/HubItemEntity.js +0 -37
- package/dist/esm/core/HubItemEntity.js.map +1 -1
- package/dist/esm/core/_internal/deepContains.js +40 -31
- package/dist/esm/core/_internal/deepContains.js.map +1 -1
- package/dist/esm/core/behaviors/index.js +0 -1
- package/dist/esm/core/behaviors/index.js.map +1 -1
- package/dist/esm/core/catalogContains.js +115 -0
- package/dist/esm/core/catalogContains.js.map +1 -0
- package/dist/esm/core/deepCatalogContains.js +4 -6
- package/dist/esm/core/deepCatalogContains.js.map +1 -1
- package/dist/esm/core/getEntityTypeFromHubEntityType.js +10 -0
- package/dist/esm/core/getEntityTypeFromHubEntityType.js.map +1 -0
- package/dist/esm/core/getHubTypeFromItemType.js +14 -0
- package/dist/esm/core/getHubTypeFromItemType.js.map +1 -0
- package/dist/esm/core/index.js +3 -1
- package/dist/esm/core/index.js.map +1 -1
- package/dist/esm/core/parseContainmentPath.js +19 -0
- package/dist/esm/core/parseContainmentPath.js.map +1 -1
- package/dist/esm/core/types/IHubProject.js +0 -13
- package/dist/esm/core/types/IHubProject.js.map +1 -1
- package/dist/esm/downloads/getDownloadFormats.js +1 -1
- package/dist/esm/downloads/index.js +0 -1
- package/dist/esm/downloads/index.js.map +1 -1
- package/dist/esm/index.js +1 -0
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/initiative-templates/HubInitiativeTemplate.js +4 -3
- package/dist/esm/initiative-templates/HubInitiativeTemplate.js.map +1 -1
- package/dist/esm/initiative-templates/edit.js +0 -11
- package/dist/esm/initiative-templates/edit.js.map +1 -1
- package/dist/esm/initiatives/HubInitiatives.js +9 -79
- package/dist/esm/initiatives/HubInitiatives.js.map +1 -1
- package/dist/esm/initiatives/_internal/computeProps.js +3 -0
- package/dist/esm/initiatives/_internal/computeProps.js.map +1 -1
- package/dist/esm/initiatives/_internal/getPropertyMap.js +0 -1
- package/dist/esm/initiatives/_internal/getPropertyMap.js.map +1 -1
- package/dist/esm/initiatives/defaults.js +1 -2
- package/dist/esm/initiatives/defaults.js.map +1 -1
- package/dist/esm/permissions/HubPermissionPolicies.js +0 -18
- package/dist/esm/permissions/HubPermissionPolicies.js.map +1 -1
- package/dist/esm/permissions/types/Permission.js +0 -7
- package/dist/esm/permissions/types/Permission.js.map +1 -1
- package/dist/esm/projects/_internal/computeProps.js +3 -0
- package/dist/esm/projects/_internal/computeProps.js.map +1 -1
- package/dist/esm/projects/defaults.js +3 -2
- package/dist/esm/projects/defaults.js.map +1 -1
- package/dist/esm/projects/fetch.js +0 -29
- package/dist/esm/projects/fetch.js.map +1 -1
- package/dist/esm/search/Catalog.js +26 -107
- package/dist/esm/search/Catalog.js.map +1 -1
- package/dist/esm/search/fetchEntityCatalog.js +65 -0
- package/dist/esm/search/fetchEntityCatalog.js.map +1 -0
- package/dist/esm/search/index.js +0 -1
- package/dist/esm/search/index.js.map +1 -1
- package/dist/esm/search/types/IHubCatalog.js.map +1 -1
- package/dist/esm/search/upgradeCatalogSchema.js +1 -1
- package/dist/esm/search/upgradeCatalogSchema.js.map +1 -1
- package/dist/esm/search/utils.js +1 -1
- package/dist/esm/sites/HubSite.js +3 -3
- package/dist/esm/sites/HubSite.js.map +1 -1
- package/dist/esm/sites/_internal/SiteBusinessRules.js +5 -0
- package/dist/esm/sites/_internal/SiteBusinessRules.js.map +1 -1
- package/dist/esm/sites/defaults.js +1 -2
- package/dist/esm/sites/defaults.js.map +1 -1
- package/dist/esm/sites/feed-configuration.js +4 -3
- package/dist/esm/sites/feed-configuration.js.map +1 -1
- package/dist/esm/sites/feeds/_internal/defaults.js +56 -0
- package/dist/esm/sites/feeds/_internal/defaults.js.map +1 -0
- package/dist/esm/sites/feeds/_internal/getMajorVersion.js +11 -0
- package/dist/esm/sites/feeds/_internal/getMajorVersion.js.map +1 -0
- package/dist/esm/sites/feeds/getFeedTemplate.js +25 -0
- package/dist/esm/sites/feeds/getFeedTemplate.js.map +1 -0
- package/dist/esm/sites/feeds/previewFeed.js +35 -0
- package/dist/esm/sites/feeds/previewFeed.js.map +1 -0
- package/dist/esm/sites/feeds/setFeedTemplate.js +20 -0
- package/dist/esm/sites/feeds/setFeedTemplate.js.map +1 -0
- package/dist/esm/sites/feeds/types.js +1 -0
- package/dist/esm/sites/feeds/types.js.map +1 -0
- package/dist/esm/sites/index.js +4 -0
- package/dist/esm/sites/index.js.map +1 -1
- package/dist/esm/utils/hubUserAppResources.js +0 -52
- package/dist/esm/utils/hubUserAppResources.js.map +1 -1
- package/dist/esm/utils/index.js +0 -1
- package/dist/esm/utils/index.js.map +1 -1
- package/dist/node/associations/index.js +0 -3
- package/dist/node/associations/index.js.map +1 -1
- package/dist/node/associations/types.js.map +1 -1
- package/dist/node/content/_internal/ContentBusinessRules.js +0 -5
- package/dist/node/content/_internal/ContentBusinessRules.js.map +1 -1
- package/dist/node/content/hostedServiceUtils.js +1 -25
- package/dist/node/content/hostedServiceUtils.js.map +1 -1
- package/dist/node/core/HubItemEntity.js +0 -37
- package/dist/node/core/HubItemEntity.js.map +1 -1
- package/dist/node/core/_internal/deepContains.js +39 -30
- package/dist/node/core/_internal/deepContains.js.map +1 -1
- package/dist/node/core/behaviors/index.js +0 -1
- package/dist/node/core/behaviors/index.js.map +1 -1
- package/dist/node/core/catalogContains.js +119 -0
- package/dist/node/core/catalogContains.js.map +1 -0
- package/dist/node/core/deepCatalogContains.js +4 -6
- package/dist/node/core/deepCatalogContains.js.map +1 -1
- package/dist/node/core/getEntityTypeFromHubEntityType.js +14 -0
- package/dist/node/core/getEntityTypeFromHubEntityType.js.map +1 -0
- package/dist/node/core/getHubTypeFromItemType.js +18 -0
- package/dist/node/core/getHubTypeFromItemType.js.map +1 -0
- package/dist/node/core/index.js +3 -1
- package/dist/node/core/index.js.map +1 -1
- package/dist/node/core/parseContainmentPath.js +22 -1
- package/dist/node/core/parseContainmentPath.js.map +1 -1
- package/dist/node/core/types/IHubProject.js +0 -14
- package/dist/node/core/types/IHubProject.js.map +1 -1
- package/dist/node/downloads/getDownloadFormats.js +1 -1
- package/dist/node/downloads/index.js +0 -1
- package/dist/node/downloads/index.js.map +1 -1
- package/dist/node/index.js +1 -0
- package/dist/node/index.js.map +1 -1
- package/dist/node/initiative-templates/HubInitiativeTemplate.js +5 -4
- package/dist/node/initiative-templates/HubInitiativeTemplate.js.map +1 -1
- package/dist/node/initiative-templates/edit.js +1 -13
- package/dist/node/initiative-templates/edit.js.map +1 -1
- package/dist/node/initiatives/HubInitiatives.js +9 -82
- package/dist/node/initiatives/HubInitiatives.js.map +1 -1
- package/dist/node/initiatives/_internal/computeProps.js +3 -0
- package/dist/node/initiatives/_internal/computeProps.js.map +1 -1
- package/dist/node/initiatives/_internal/getPropertyMap.js +0 -1
- package/dist/node/initiatives/_internal/getPropertyMap.js.map +1 -1
- package/dist/node/initiatives/defaults.js +1 -2
- package/dist/node/initiatives/defaults.js.map +1 -1
- package/dist/node/permissions/HubPermissionPolicies.js +0 -18
- package/dist/node/permissions/HubPermissionPolicies.js.map +1 -1
- package/dist/node/permissions/types/Permission.js +0 -7
- package/dist/node/permissions/types/Permission.js.map +1 -1
- package/dist/node/projects/_internal/computeProps.js +3 -0
- package/dist/node/projects/_internal/computeProps.js.map +1 -1
- package/dist/node/projects/defaults.js +3 -2
- package/dist/node/projects/defaults.js.map +1 -1
- package/dist/node/projects/fetch.js +1 -31
- package/dist/node/projects/fetch.js.map +1 -1
- package/dist/node/search/Catalog.js +25 -106
- package/dist/node/search/Catalog.js.map +1 -1
- package/dist/node/search/fetchEntityCatalog.js +69 -0
- package/dist/node/search/fetchEntityCatalog.js.map +1 -0
- package/dist/node/search/index.js +0 -1
- package/dist/node/search/index.js.map +1 -1
- package/dist/node/search/types/IHubCatalog.js.map +1 -1
- package/dist/node/search/upgradeCatalogSchema.js +1 -1
- package/dist/node/search/upgradeCatalogSchema.js.map +1 -1
- package/dist/node/search/utils.js +1 -1
- package/dist/node/sites/HubSite.js +5 -5
- package/dist/node/sites/HubSite.js.map +1 -1
- package/dist/node/sites/_internal/SiteBusinessRules.js +5 -0
- package/dist/node/sites/_internal/SiteBusinessRules.js.map +1 -1
- package/dist/node/sites/defaults.js +1 -2
- package/dist/node/sites/defaults.js.map +1 -1
- package/dist/node/sites/feed-configuration.js +10 -9
- package/dist/node/sites/feed-configuration.js.map +1 -1
- package/dist/node/sites/feeds/_internal/defaults.js +60 -0
- package/dist/node/sites/feeds/_internal/defaults.js.map +1 -0
- package/dist/node/sites/feeds/_internal/getMajorVersion.js +15 -0
- package/dist/node/sites/feeds/_internal/getMajorVersion.js.map +1 -0
- package/dist/node/sites/feeds/getFeedTemplate.js +29 -0
- package/dist/node/sites/feeds/getFeedTemplate.js.map +1 -0
- package/dist/node/sites/feeds/previewFeed.js +39 -0
- package/dist/node/sites/feeds/previewFeed.js.map +1 -0
- package/dist/node/sites/feeds/setFeedTemplate.js +24 -0
- package/dist/node/sites/feeds/setFeedTemplate.js.map +1 -0
- package/dist/node/{core/behaviors/IWIthAssociationBehavior.js → sites/feeds/types.js} +1 -1
- package/dist/node/sites/feeds/types.js.map +1 -0
- package/dist/node/sites/index.js +4 -0
- package/dist/node/sites/index.js.map +1 -1
- package/dist/node/utils/hubUserAppResources.js +1 -57
- package/dist/node/utils/hubUserAppResources.js.map +1 -1
- package/dist/node/utils/index.js +0 -1
- package/dist/node/utils/index.js.map +1 -1
- package/dist/types/associations/index.d.ts +0 -3
- package/dist/types/associations/types.d.ts +0 -25
- package/dist/types/content/_fetch.d.ts +1 -1
- package/dist/types/content/_internal/ContentBusinessRules.d.ts +1 -1
- package/dist/types/content/hostedServiceUtils.d.ts +0 -14
- package/dist/types/core/HubItemEntity.d.ts +2 -31
- package/dist/types/core/_internal/deepContains.d.ts +3 -2
- package/dist/types/core/behaviors/IWithCatalogBehavior.d.ts +1 -1
- package/dist/types/core/behaviors/index.d.ts +0 -1
- package/dist/types/core/catalogContains.d.ts +11 -0
- package/dist/types/core/deepCatalogContains.d.ts +2 -2
- package/dist/types/core/getEntityTypeFromHubEntityType.d.ts +8 -0
- package/dist/types/core/getHubTypeFromItemType.d.ts +8 -0
- package/dist/types/core/index.d.ts +2 -1
- package/dist/types/core/parseContainmentPath.d.ts +14 -0
- package/dist/types/core/schemas/types.d.ts +0 -14
- package/dist/types/core/traits/IWithCatalog.d.ts +3 -9
- package/dist/types/core/types/IHubDiscussion.d.ts +2 -2
- package/dist/types/core/types/IHubEvent.d.ts +2 -2
- package/dist/types/core/types/IHubInitiative.d.ts +2 -3
- package/dist/types/core/types/IHubLocation.d.ts +1 -5
- package/dist/types/core/types/IHubProject.d.ts +2 -15
- package/dist/types/core/types/IHubSite.d.ts +2 -3
- package/dist/types/downloads/getDownloadFormats.d.ts +1 -1
- package/dist/types/downloads/index.d.ts +0 -1
- package/dist/types/index.d.ts +1 -0
- package/dist/types/initiative-templates/HubInitiativeTemplate.d.ts +1 -1
- package/dist/types/initiative-templates/edit.d.ts +1 -10
- package/dist/types/initiatives/HubInitiatives.d.ts +1 -38
- package/dist/types/permissions/types/Permission.d.ts +1 -2
- package/dist/types/projects/fetch.d.ts +0 -17
- package/dist/types/search/Catalog.d.ts +9 -13
- package/dist/types/search/fetchEntityCatalog.d.ts +18 -0
- package/dist/types/search/index.d.ts +0 -1
- package/dist/types/search/types/IHubCatalog.d.ts +2 -0
- package/dist/types/search/types/types.d.ts +6 -1
- package/dist/types/search/utils.d.ts +1 -1
- package/dist/types/sites/HubSite.d.ts +1 -1
- package/dist/types/sites/_internal/SiteBusinessRules.d.ts +1 -1
- package/dist/types/sites/feed-configuration.d.ts +3 -0
- package/dist/types/sites/feeds/_internal/defaults.d.ts +5 -0
- package/dist/types/sites/feeds/_internal/getMajorVersion.d.ts +8 -0
- package/dist/types/sites/feeds/getFeedTemplate.d.ts +15 -0
- package/dist/types/sites/feeds/previewFeed.d.ts +19 -0
- package/dist/types/sites/feeds/setFeedTemplate.d.ts +17 -0
- package/dist/types/sites/feeds/types.d.ts +21 -0
- package/dist/types/sites/index.d.ts +4 -0
- package/dist/types/utils/hubUserAppResources.d.ts +0 -36
- package/dist/types/utils/index.d.ts +0 -1
- package/package.json +1 -1
- package/dist/esm/associations/addAssociation.js +0 -19
- package/dist/esm/associations/addAssociation.js.map +0 -1
- package/dist/esm/associations/listAssociations.js +0 -21
- package/dist/esm/associations/listAssociations.js.map +0 -1
- package/dist/esm/associations/removeAssociation.js +0 -20
- package/dist/esm/associations/removeAssociation.js.map +0 -1
- package/dist/esm/core/behaviors/IWIthAssociationBehavior.js +0 -1
- package/dist/esm/core/behaviors/IWIthAssociationBehavior.js.map +0 -1
- package/dist/esm/core/getEntityDefaultWorkspacePane.js +0 -17
- package/dist/esm/core/getEntityDefaultWorkspacePane.js.map +0 -1
- package/dist/esm/downloads/fetchDownloadFormats.js +0 -39
- package/dist/esm/downloads/fetchDownloadFormats.js.map +0 -1
- package/dist/esm/search/fetchCatalog.js +0 -56
- package/dist/esm/search/fetchCatalog.js.map +0 -1
- package/dist/esm/utils/sessionLocalStorage.js +0 -57
- package/dist/esm/utils/sessionLocalStorage.js.map +0 -1
- package/dist/node/associations/addAssociation.js +0 -23
- package/dist/node/associations/addAssociation.js.map +0 -1
- package/dist/node/associations/listAssociations.js +0 -25
- package/dist/node/associations/listAssociations.js.map +0 -1
- package/dist/node/associations/removeAssociation.js +0 -24
- package/dist/node/associations/removeAssociation.js.map +0 -1
- package/dist/node/core/behaviors/IWIthAssociationBehavior.js.map +0 -1
- package/dist/node/core/getEntityDefaultWorkspacePane.js +0 -20
- package/dist/node/core/getEntityDefaultWorkspacePane.js.map +0 -1
- package/dist/node/downloads/fetchDownloadFormats.js +0 -43
- package/dist/node/downloads/fetchDownloadFormats.js.map +0 -1
- package/dist/node/search/fetchCatalog.js +0 -60
- package/dist/node/search/fetchCatalog.js.map +0 -1
- package/dist/node/utils/sessionLocalStorage.js +0 -63
- package/dist/node/utils/sessionLocalStorage.js.map +0 -1
- package/dist/types/associations/addAssociation.d.ts +0 -12
- package/dist/types/associations/listAssociations.d.ts +0 -12
- package/dist/types/associations/removeAssociation.d.ts +0 -12
- package/dist/types/core/behaviors/IWIthAssociationBehavior.d.ts +0 -32
- package/dist/types/core/getEntityDefaultWorkspacePane.d.ts +0 -11
- package/dist/types/downloads/fetchDownloadFormats.d.ts +0 -9
- package/dist/types/search/fetchCatalog.d.ts +0 -10
- package/dist/types/utils/sessionLocalStorage.d.ts +0 -29
|
@@ -88,7 +88,7 @@ export declare function migrateToCollectionKey(collectionOrSearchCategory: Legac
|
|
|
88
88
|
* DEPRECATED: Please use `getGroupPredicate`
|
|
89
89
|
* Searches through a catalog scope and retrieves the predicate responsible
|
|
90
90
|
* for determining group sharing requirements.
|
|
91
|
-
*
|
|
91
|
+
* Still in use 10/29/2024
|
|
92
92
|
* @param scope Catalog scope to search through
|
|
93
93
|
* @returns The first predicate with a `group` field (if present)
|
|
94
94
|
*/
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { IHubSite, IWithPermissionBehavior, IWithCatalogBehavior, IWithStoreBehavior, IWithSharingBehavior, IWithVersioningBehavior } from "../core";
|
|
2
|
-
import { Catalog } from "../search";
|
|
2
|
+
import { Catalog } from "../search/Catalog";
|
|
3
3
|
import { IArcGISContext } from "../ArcGISContext";
|
|
4
4
|
import { HubItemEntity } from "../core/HubItemEntity";
|
|
5
5
|
import { IEditorConfig } from "../core/schemas/types";
|
|
@@ -7,7 +7,7 @@ export declare const SiteDefaultFeatures: IFeatureFlags;
|
|
|
7
7
|
* Site Permissions
|
|
8
8
|
* This feeds into the Permissions type
|
|
9
9
|
*/
|
|
10
|
-
export declare const SitePermissions: readonly ["hub:site", "hub:site:create", "hub:site:delete", "hub:site:edit", "hub:site:view", "hub:site:owner", "hub:site:canChangeAccess", "hub:site:events", "hub:site:content", "hub:site:discussions", "hub:site:feature:follow", "hub:site:feature:discussions", "hub:site:workspace", "hub:site:workspace:overview", "hub:site:workspace:dashboard", "hub:site:workspace:details", "hub:site:workspace:settings", "hub:site:workspace:collaborators", "hub:site:workspace:content", "hub:site:workspace:metrics", "hub:site:workspace:followers", "hub:site:workspace:followers:member", "hub:site:workspace:followers:manager", "hub:site:workspace:followers:create", "hub:site:workspace:discussion", "hub:site:workspace:pages", "hub:site:workspace:events", "hub:site:workspace:projects", "hub:site:workspace:initiatives", "hub:site:manage"];
|
|
10
|
+
export declare const SitePermissions: readonly ["hub:site", "hub:site:create", "hub:site:delete", "hub:site:edit", "hub:site:view", "hub:site:owner", "hub:site:canChangeAccess", "hub:site:events", "hub:site:content", "hub:site:discussions", "hub:site:feature:follow", "hub:site:feature:discussions", "hub:site:workspace", "hub:site:workspace:overview", "hub:site:workspace:dashboard", "hub:site:workspace:details", "hub:site:workspace:settings", "hub:site:workspace:collaborators", "hub:site:workspace:content", "hub:site:workspace:metrics", "hub:site:workspace:followers", "hub:site:workspace:followers:member", "hub:site:workspace:followers:manager", "hub:site:workspace:followers:create", "hub:site:workspace:discussion", "hub:site:workspace:pages", "hub:site:workspace:events", "hub:site:workspace:projects", "hub:site:workspace:initiatives", "hub:site:manage", "temp:hub:site:workspace:feeds"];
|
|
11
11
|
/**
|
|
12
12
|
* Site permission policies
|
|
13
13
|
* @private
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { IModel } from "../types";
|
|
2
2
|
declare type FeedFormat = "dcat-us" | "dcat-ap" | "rss";
|
|
3
3
|
/**
|
|
4
|
+
* DEPRECATED: Use `getFeedTemplate()` instead
|
|
5
|
+
* this can be deleted once we remove the feed editor from the content-library (Ember addon)
|
|
4
6
|
* Returns feed configuration from a site model
|
|
5
7
|
*
|
|
6
8
|
* @param {IModel} site - site model
|
|
@@ -9,6 +11,7 @@ declare type FeedFormat = "dcat-us" | "dcat-ap" | "rss";
|
|
|
9
11
|
*/
|
|
10
12
|
export declare function getFeedConfiguration(site: IModel, format: FeedFormat, version: string): any;
|
|
11
13
|
/**
|
|
14
|
+
* DEPRECATED: This will be removed in the next breaking version. Use `setFeedTemplate()` instead;
|
|
12
15
|
* Returns feed configuration from a site model
|
|
13
16
|
*
|
|
14
17
|
* @param {IModel} site - site model
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { FeedFormat, IFeedsConfiguration } from "./types";
|
|
2
|
+
export interface IGetFeedTemplateOptions {
|
|
3
|
+
feedsConfig: IFeedsConfiguration;
|
|
4
|
+
format: FeedFormat;
|
|
5
|
+
version: string;
|
|
6
|
+
}
|
|
7
|
+
/**
|
|
8
|
+
* Get the feed template for a given feed format and version, accounting
|
|
9
|
+
* for version fallbacks and default templates as necessary.
|
|
10
|
+
* @param opts.feedConfig - the raw feeds configuration object
|
|
11
|
+
* @param opts.format - the feed format
|
|
12
|
+
* @param opts.version - the feed version
|
|
13
|
+
* @returns a feed template object
|
|
14
|
+
*/
|
|
15
|
+
export declare function getFeedTemplate(opts: IGetFeedTemplateOptions): Record<string, any>;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { IArcGISContext } from "../../ArcGISContext";
|
|
2
|
+
import { FeedFormat } from "./types";
|
|
3
|
+
export interface IPreviewFeedOptions {
|
|
4
|
+
format: FeedFormat;
|
|
5
|
+
version: string;
|
|
6
|
+
previewTemplate: Record<string, any>;
|
|
7
|
+
previewHubId: string;
|
|
8
|
+
context: IArcGISContext;
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* Preview a feed using the provided template and context
|
|
12
|
+
* @param opts.format - the feed format
|
|
13
|
+
* @param opts.version - the feed version
|
|
14
|
+
* @param opts.previewTemplate - the feed template to preview
|
|
15
|
+
* @param opts.previewHubId - the Hub ID to preview the feed for
|
|
16
|
+
* @param opts.context - the ArcGIS context
|
|
17
|
+
* @returns the previewed feed as a string
|
|
18
|
+
*/
|
|
19
|
+
export declare function previewFeed(opts: IPreviewFeedOptions): Promise<string>;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { FeedFormat, IFeedsConfiguration } from "./types";
|
|
2
|
+
export interface ISetFeedTemplateOptions {
|
|
3
|
+
feedsConfig: IFeedsConfiguration;
|
|
4
|
+
format: FeedFormat;
|
|
5
|
+
version: string;
|
|
6
|
+
updatedTemplate: Record<string, any>;
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* Sets the feed template for a given feed format and version. Always use this function
|
|
10
|
+
* to update feed templates rather than interacting with the feeds configuration object directly.
|
|
11
|
+
* @param opts.feedsConfig - the raw feeds configuration object
|
|
12
|
+
* @param opts.format - the feed format
|
|
13
|
+
* @param opts.version - the feed version
|
|
14
|
+
* @param opts.updatedTemplate - the updated feed template
|
|
15
|
+
* @returns a new feeds configuration object with the updated template
|
|
16
|
+
*/
|
|
17
|
+
export declare function setFeedTemplate(opts: ISetFeedTemplateOptions): Record<string, any>;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Represents the feed format types that are supported in Hub
|
|
3
|
+
*/
|
|
4
|
+
export declare type FeedFormat = "dcat-us" | "dcat-ap" | "rss";
|
|
5
|
+
/**
|
|
6
|
+
* Configuration object for feeds. Stores feed templates for various feed formats and versions
|
|
7
|
+
* as well as miscellaneous configuration options. Always interact with this object through the
|
|
8
|
+
* configuration helpers (getFeedTemplate(), setFeedTemplate(), etc.) when possible.
|
|
9
|
+
*/
|
|
10
|
+
export interface IFeedsConfiguration extends IWithFeedTemplatePaths {
|
|
11
|
+
/**
|
|
12
|
+
* Whether or not the feeds capability as a whole has been disabled
|
|
13
|
+
*/
|
|
14
|
+
disabled?: boolean;
|
|
15
|
+
}
|
|
16
|
+
declare type IWithFeedTemplatePaths = Partial<Record<FeedTemplatePath, Record<string, any>>>;
|
|
17
|
+
declare type FeedTemplatePath = DcatUSTemplatePaths | DcatAPTemplatePaths | RssTemplatePaths;
|
|
18
|
+
declare type DcatUSTemplatePaths = "dcatUS11" | "dcatUS1X";
|
|
19
|
+
declare type DcatAPTemplatePaths = "dcatAP201" | "dcatAP2XX";
|
|
20
|
+
declare type RssTemplatePaths = "rss2";
|
|
21
|
+
export {};
|
|
@@ -16,3 +16,7 @@ export * from "./themes";
|
|
|
16
16
|
export * from "./upgrade-site-schema";
|
|
17
17
|
export * from "./feed-configuration";
|
|
18
18
|
export * from "./reharvestSiteCatalog";
|
|
19
|
+
export * from "./feeds/getFeedTemplate";
|
|
20
|
+
export * from "./feeds/setFeedTemplate";
|
|
21
|
+
export * from "./feeds/previewFeed";
|
|
22
|
+
export * from "./feeds/types";
|
|
@@ -39,42 +39,6 @@ export interface IUserHubSettings {
|
|
|
39
39
|
*/
|
|
40
40
|
history?: IHubHistory;
|
|
41
41
|
}
|
|
42
|
-
/**
|
|
43
|
-
* @private
|
|
44
|
-
* DEPRECATED: Use `updateUserSiteSettings` instead
|
|
45
|
-
* Store User settings in the Site App's cache
|
|
46
|
-
* @param settings
|
|
47
|
-
* @param context
|
|
48
|
-
* @param replace
|
|
49
|
-
* @returns
|
|
50
|
-
*/
|
|
51
|
-
export declare function setUserSiteSettings(settings: IUserSiteSettings, context: IArcGISContext, replace?: boolean): Promise<void>;
|
|
52
|
-
/**
|
|
53
|
-
* @private
|
|
54
|
-
* DEPRECATED: Use `fetchUserSiteSettings`
|
|
55
|
-
* Get the current user's settings for the current Site
|
|
56
|
-
* @param context
|
|
57
|
-
* @returns
|
|
58
|
-
*/
|
|
59
|
-
export declare function getUserSiteSettings(context: IArcGISContext): Promise<IUserSiteSettings>;
|
|
60
|
-
/**
|
|
61
|
-
* @private
|
|
62
|
-
* DEPRECATED: use `updateUserHubSettings` instead
|
|
63
|
-
* Store the current user's Hub settings
|
|
64
|
-
* @param settings
|
|
65
|
-
* @param context
|
|
66
|
-
* @param replace
|
|
67
|
-
* @returns
|
|
68
|
-
*/
|
|
69
|
-
export declare function setUserHubSettings(settings: IUserHubSettings, context: IArcGISContext, replace?: boolean): Promise<void>;
|
|
70
|
-
/**
|
|
71
|
-
* @private
|
|
72
|
-
* DEPRECATED: Use `fetchUserHubSettings`
|
|
73
|
-
* Get the current user's settings for ArcGIS Hub
|
|
74
|
-
* @param context
|
|
75
|
-
* @returns
|
|
76
|
-
*/
|
|
77
|
-
export declare function getUserHubSettings(context: IArcGISContext): Promise<IUserHubSettings>;
|
|
78
42
|
/**
|
|
79
43
|
* Store User settings in the Site App's cache
|
|
80
44
|
* @param settings
|
|
@@ -18,7 +18,6 @@ export * from "./increment-string";
|
|
|
18
18
|
export * from "./logger";
|
|
19
19
|
export * from "./is-update-group";
|
|
20
20
|
export * from "./revertable-tasks";
|
|
21
|
-
export * from "./sessionLocalStorage";
|
|
22
21
|
export * from "./dasherize";
|
|
23
22
|
export * from "./titleize";
|
|
24
23
|
export * from "./memoize";
|
package/package.json
CHANGED
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* ** DEPRECATED: please use requestAssociation instead.
|
|
3
|
-
* This will be removed in the next breaking version **
|
|
4
|
-
*
|
|
5
|
-
* Add an association to an entity
|
|
6
|
-
* Persisted into the entity's `.typeKeywords` array
|
|
7
|
-
* @param info
|
|
8
|
-
* @param entity
|
|
9
|
-
*/
|
|
10
|
-
export function addAssociation(entity, info) {
|
|
11
|
-
if (!entity.typeKeywords) {
|
|
12
|
-
entity.typeKeywords = [];
|
|
13
|
-
}
|
|
14
|
-
const association = `${info.type}|${info.id}`;
|
|
15
|
-
if (!entity.typeKeywords.includes(association)) {
|
|
16
|
-
entity.typeKeywords.push(association);
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
//# sourceMappingURL=addAssociation.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"addAssociation.js","sourceRoot":"","sources":["../../../src/associations/addAssociation.ts"],"names":[],"mappings":"AAGA;;;;;;;;GAQG;AACH,MAAM,UAAU,cAAc,CAC5B,MAAyB,EACzB,IAAsB;IAEtB,IAAI,CAAC,MAAM,CAAC,YAAY,EAAE;QACxB,MAAM,CAAC,YAAY,GAAG,EAAE,CAAC;KAC1B;IACD,MAAM,WAAW,GAAG,GAAG,IAAI,CAAC,IAAI,IAAI,IAAI,CAAC,EAAE,EAAE,CAAC;IAC9C,IAAI,CAAC,MAAM,CAAC,YAAY,CAAC,QAAQ,CAAC,WAAW,CAAC,EAAE;QAC9C,MAAM,CAAC,YAAY,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;KACvC;AACH,CAAC"}
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* ** DEPRECATED: please use getAssociatedEntitiesQuery
|
|
3
|
-
* to get a query for an entity's associations instead.
|
|
4
|
-
* This will be removed in the next breaking version **
|
|
5
|
-
*
|
|
6
|
-
* Return a list of all associations on an entity for a type
|
|
7
|
-
* @param entity
|
|
8
|
-
* @returns
|
|
9
|
-
*/
|
|
10
|
-
export function listAssociations(entity, type) {
|
|
11
|
-
if (!entity.typeKeywords) {
|
|
12
|
-
return [];
|
|
13
|
-
}
|
|
14
|
-
return entity.typeKeywords
|
|
15
|
-
.filter((tk) => tk.indexOf(`${type}|`) > -1)
|
|
16
|
-
.map((tk) => {
|
|
17
|
-
const [t, id] = tk.split("|");
|
|
18
|
-
return { type: t, id };
|
|
19
|
-
});
|
|
20
|
-
}
|
|
21
|
-
//# sourceMappingURL=listAssociations.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"listAssociations.js","sourceRoot":"","sources":["../../../src/associations/listAssociations.ts"],"names":[],"mappings":"AAGA;;;;;;;;GAQG;AACH,MAAM,UAAU,gBAAgB,CAC9B,MAAyB,EACzB,IAAqB;IAErB,IAAI,CAAC,MAAM,CAAC,YAAY,EAAE;QACxB,OAAO,EAAE,CAAC;KACX;IACD,OAAO,MAAM,CAAC,YAAY;SACvB,MAAM,CAAC,CAAC,EAAE,EAAE,EAAE,CAAC,EAAE,CAAC,OAAO,CAAC,GAAG,IAAI,GAAG,CAAC,GAAG,CAAC,CAAC,CAAC;SAC3C,GAAG,CAAC,CAAC,EAAE,EAAE,EAAE;QACV,MAAM,CAAC,CAAC,EAAE,EAAE,CAAC,GAAG,EAAE,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;QAC9B,OAAO,EAAE,IAAI,EAAE,CAAC,EAAE,EAAE,EAAsB,CAAC;IAC7C,CAAC,CAAC,CAAC;AACP,CAAC"}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* ** DEPRECATED: please use breakAssociation instead.
|
|
3
|
-
* This will be removed in the next breaking version **
|
|
4
|
-
*
|
|
5
|
-
* Remove an association from an entity
|
|
6
|
-
* @param info
|
|
7
|
-
* @param entity
|
|
8
|
-
* @returns
|
|
9
|
-
*/
|
|
10
|
-
export function removeAssociation(entity, info) {
|
|
11
|
-
if (!entity.typeKeywords) {
|
|
12
|
-
return;
|
|
13
|
-
}
|
|
14
|
-
const association = `${info.type}|${info.id}`;
|
|
15
|
-
const index = entity.typeKeywords.indexOf(association);
|
|
16
|
-
if (index > -1) {
|
|
17
|
-
entity.typeKeywords.splice(index, 1);
|
|
18
|
-
}
|
|
19
|
-
}
|
|
20
|
-
//# sourceMappingURL=removeAssociation.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"removeAssociation.js","sourceRoot":"","sources":["../../../src/associations/removeAssociation.ts"],"names":[],"mappings":"AAGA;;;;;;;;GAQG;AACH,MAAM,UAAU,iBAAiB,CAC/B,MAAyB,EACzB,IAAsB;IAEtB,IAAI,CAAC,MAAM,CAAC,YAAY,EAAE;QACxB,OAAO;KACR;IACD,MAAM,WAAW,GAAG,GAAG,IAAI,CAAC,IAAI,IAAI,IAAI,CAAC,EAAE,EAAE,CAAC;IAC9C,MAAM,KAAK,GAAG,MAAM,CAAC,YAAY,CAAC,OAAO,CAAC,WAAW,CAAC,CAAC;IACvD,IAAI,KAAK,GAAG,CAAC,CAAC,EAAE;QACd,MAAM,CAAC,YAAY,CAAC,MAAM,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC;KACtC;AACH,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
//# sourceMappingURL=IWIthAssociationBehavior.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"IWIthAssociationBehavior.js","sourceRoot":"","sources":["../../../../src/core/behaviors/IWIthAssociationBehavior.ts"],"names":[],"mappings":""}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* DEPRECATED
|
|
3
|
-
*
|
|
4
|
-
* This util has been deprecated. It was a duplicate of another util and is the concern of the UI,
|
|
5
|
-
* so it was moved as such.
|
|
6
|
-
*
|
|
7
|
-
* It will be removed in the next breaking version.
|
|
8
|
-
* @param entityType
|
|
9
|
-
* @returns
|
|
10
|
-
*/
|
|
11
|
-
export const getEntityDefaultWorkspacePane = (entityType) => {
|
|
12
|
-
const DEFAULT_PANES = {
|
|
13
|
-
discussion: "details",
|
|
14
|
-
};
|
|
15
|
-
return DEFAULT_PANES[entityType];
|
|
16
|
-
};
|
|
17
|
-
//# sourceMappingURL=getEntityDefaultWorkspacePane.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"getEntityDefaultWorkspacePane.js","sourceRoot":"","sources":["../../../src/core/getEntityDefaultWorkspacePane.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AACH,MAAM,CAAC,MAAM,6BAA6B,GAAG,CAAC,UAAkB,EAAU,EAAE;IAC1E,MAAM,aAAa,GAA2B;QAC5C,UAAU,EAAE,SAAS;KACtB,CAAC;IACF,OAAO,aAAa,CAAC,UAAU,CAAC,CAAC;AACnC,CAAC,CAAC"}
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
import { canUseExportImageFlow } from "./_internal/canUseExportImageFlow";
|
|
2
|
-
import { canUseHubDownloadApi } from "./canUseHubDownloadApi";
|
|
3
|
-
/**
|
|
4
|
-
* DEPRECATED: This will be removed in the next breaking version. Use "getDownloadFormats()" instead.
|
|
5
|
-
*
|
|
6
|
-
* Fetches download formats for the given entity. Also folds in any additional resources defined on the entity.
|
|
7
|
-
* @param options options to refine / filter the results of the fetchDownloadFormats operation
|
|
8
|
-
* @returns a promise that resolves with the download formats
|
|
9
|
-
*/
|
|
10
|
-
export async function fetchDownloadFormats(options) {
|
|
11
|
-
/* tslint:disable no-console */
|
|
12
|
-
console.warn(`"fetchDownloadFormats()" is deprecated. Please use "getDownloadFormats()"`);
|
|
13
|
-
const { entity, context, layers } = options;
|
|
14
|
-
// fetch base formats for the item
|
|
15
|
-
let baseFormats = [];
|
|
16
|
-
if (canUseHubDownloadApi(entity, context)) {
|
|
17
|
-
const { getHubDownloadApiFormats } = await import("./getHubDownloadApiFormats");
|
|
18
|
-
baseFormats = getHubDownloadApiFormats(entity);
|
|
19
|
-
}
|
|
20
|
-
else if (canUseExportImageFlow(entity)) {
|
|
21
|
-
const { getExportImageFormats } = await import("./_internal/format-fetchers/getExportImageFormats");
|
|
22
|
-
baseFormats = getExportImageFormats(entity);
|
|
23
|
-
}
|
|
24
|
-
// add additional resource links as static formats
|
|
25
|
-
// TODO: change to use `extendedProps.additionalResources`
|
|
26
|
-
const additionalFormats = (entity.additionalResources || []).map(toStaticFormat);
|
|
27
|
-
// combine formats into single list
|
|
28
|
-
return [...baseFormats, ...additionalFormats];
|
|
29
|
-
}
|
|
30
|
-
function toStaticFormat(resource) {
|
|
31
|
-
return {
|
|
32
|
-
type: "static",
|
|
33
|
-
label: resource.name ||
|
|
34
|
-
(resource.isDataSource && `{{dataSource:translate}}`) || // if the additional resource is the datasource
|
|
35
|
-
`{{noTitle:translate}}`,
|
|
36
|
-
url: resource.url,
|
|
37
|
-
};
|
|
38
|
-
}
|
|
39
|
-
//# sourceMappingURL=fetchDownloadFormats.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"fetchDownloadFormats.js","sourceRoot":"","sources":["../../../src/downloads/fetchDownloadFormats.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,qBAAqB,EAAE,MAAM,mCAAmC,CAAC;AAC1E,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAO9D;;;;;;GAMG;AACH,MAAM,CAAC,KAAK,UAAU,oBAAoB,CACxC,OAAqC;IAErC,+BAA+B;IAC/B,OAAO,CAAC,IAAI,CACV,2EAA2E,CAC5E,CAAC;IAEF,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC;IAC5C,kCAAkC;IAClC,IAAI,WAAW,GAAsB,EAAE,CAAC;IACxC,IAAI,oBAAoB,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE;QACzC,MAAM,EAAE,wBAAwB,EAAE,GAAG,MAAM,MAAM,CAC/C,4BAA4B,CAC7B,CAAC;QACF,WAAW,GAAG,wBAAwB,CAAC,MAAM,CAAC,CAAC;KAChD;SAAM,IAAI,qBAAqB,CAAC,MAAM,CAAC,EAAE;QACxC,MAAM,EAAE,qBAAqB,EAAE,GAAG,MAAM,MAAM,CAC5C,mDAAmD,CACpD,CAAC;QACF,WAAW,GAAG,qBAAqB,CAAC,MAAM,CAAC,CAAC;KAC7C;IAED,kDAAkD;IAClD,0DAA0D;IAC1D,MAAM,iBAAiB,GAAG,CAAC,MAAM,CAAC,mBAAmB,IAAI,EAAE,CAAC,CAAC,GAAG,CAC9D,cAAc,CACf,CAAC;IAEF,mCAAmC;IACnC,OAAO,CAAC,GAAG,WAAW,EAAE,GAAG,iBAAiB,CAAC,CAAC;AAChD,CAAC;AAED,SAAS,cAAc,CACrB,QAAgC;IAEhC,OAAO;QACL,IAAI,EAAE,QAAQ;QACd,KAAK,EACH,QAAQ,CAAC,IAAI;YACb,CAAC,QAAQ,CAAC,YAAY,IAAI,0BAA0B,CAAC,IAAI,+CAA+C;YACxG,uBAAuB;QACzB,GAAG,EAAE,QAAQ,CAAC,GAAG;KAClB,CAAC;AACJ,CAAC"}
|
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
import { getItemData } from "@esri/arcgis-rest-portal";
|
|
2
|
-
import HubError from "../HubError";
|
|
3
|
-
import { lookupDomain } from "../sites/domains/lookup-domain";
|
|
4
|
-
import { stripProtocol } from "../urls/strip-protocol";
|
|
5
|
-
import { isGuid } from "../utils/is-guid";
|
|
6
|
-
import { upgradeCatalogSchema } from "./upgradeCatalogSchema";
|
|
7
|
-
/**
|
|
8
|
-
* Fetch a IHubCatalog from a backing item.
|
|
9
|
-
* This will apply schema upgrades to the structure
|
|
10
|
-
* @param identifier
|
|
11
|
-
* @param requestOptions
|
|
12
|
-
* @returns
|
|
13
|
-
*/
|
|
14
|
-
export async function fetchCatalog(identifier, requestOptions) {
|
|
15
|
-
let getPrms;
|
|
16
|
-
// identifier can be a guid or a url
|
|
17
|
-
if (identifier.indexOf("http") === 0) {
|
|
18
|
-
let url = identifier;
|
|
19
|
-
// get down the the hostname
|
|
20
|
-
url = stripProtocol(url);
|
|
21
|
-
// if url does not include a hash (i.e. it's not portal)
|
|
22
|
-
// then we want to split on the first slash to get the hostname
|
|
23
|
-
// lookupDomain will handle the enterprise base urls
|
|
24
|
-
if (!url.includes("#")) {
|
|
25
|
-
url = url.split("/")[0];
|
|
26
|
-
}
|
|
27
|
-
getPrms = lookupDomain(url, requestOptions)
|
|
28
|
-
// get the item's data, and read the catalog out of it
|
|
29
|
-
.then(({ siteId }) => getItemData(siteId, requestOptions))
|
|
30
|
-
.then((data) => {
|
|
31
|
-
return upgradeCatalogSchema(data.catalog || {});
|
|
32
|
-
});
|
|
33
|
-
}
|
|
34
|
-
else if (isGuid(identifier)) {
|
|
35
|
-
// get the item's data, and read the catalog out of it
|
|
36
|
-
// TODO: get the entity so the catalog migrations / mappings can be applied
|
|
37
|
-
// however this requires the HubEntityType and context, which we don't have
|
|
38
|
-
getPrms = getItemData(identifier, requestOptions).then((data) => {
|
|
39
|
-
// catalogs are moving to an array structure so we need to handle both
|
|
40
|
-
let catalog = {};
|
|
41
|
-
if (data.catalog) {
|
|
42
|
-
catalog = data.catalog;
|
|
43
|
-
}
|
|
44
|
-
if (data.catalogs && data.catalogs.length > 0) {
|
|
45
|
-
catalog = data.catalogs[0];
|
|
46
|
-
}
|
|
47
|
-
return upgradeCatalogSchema(catalog);
|
|
48
|
-
});
|
|
49
|
-
}
|
|
50
|
-
else {
|
|
51
|
-
throw new HubError("Catalog.create", "Identifier must be a url, guid");
|
|
52
|
-
}
|
|
53
|
-
const fetched = await getPrms;
|
|
54
|
-
return fetched;
|
|
55
|
-
}
|
|
56
|
-
//# sourceMappingURL=fetchCatalog.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"fetchCatalog.js","sourceRoot":"","sources":["../../../src/search/fetchCatalog.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AACvD,OAAO,QAAQ,MAAM,aAAa,CAAC;AACnC,OAAO,EAAE,YAAY,EAAE,MAAM,gCAAgC,CAAC;AAE9D,OAAO,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AACvD,OAAO,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAE1C,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAG9D;;;;;;GAMG;AACH,MAAM,CAAC,KAAK,UAAU,YAAY,CAChC,UAAkB,EAClB,cAAkC;IAElC,IAAI,OAAO,CAAC;IACZ,oCAAoC;IACpC,IAAI,UAAU,CAAC,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,EAAE;QACpC,IAAI,GAAG,GAAG,UAAU,CAAC;QAErB,4BAA4B;QAC5B,GAAG,GAAG,aAAa,CAAC,GAAG,CAAC,CAAC;QACzB,wDAAwD;QACxD,+DAA+D;QAC/D,oDAAoD;QACpD,IAAI,CAAC,GAAG,CAAC,QAAQ,CAAC,GAAG,CAAC,EAAE;YACtB,GAAG,GAAG,GAAG,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC;SACzB;QAED,OAAO,GAAG,YAAY,CAAC,GAAG,EAAE,cAAc,CAAC;YACzC,sDAAsD;aACrD,IAAI,CAAC,CAAC,EAAE,MAAM,EAAE,EAAE,EAAE,CAAC,WAAW,CAAC,MAAM,EAAE,cAAc,CAAC,CAAC;aACzD,IAAI,CAAC,CAAC,IAAI,EAAE,EAAE;YACb,OAAO,oBAAoB,CAAC,IAAI,CAAC,OAAO,IAAI,EAAE,CAAC,CAAC;QAClD,CAAC,CAAC,CAAC;KACN;SAAM,IAAI,MAAM,CAAC,UAAU,CAAC,EAAE;QAC7B,sDAAsD;QAEtD,2EAA2E;QAC3E,2EAA2E;QAC3E,OAAO,GAAG,WAAW,CAAC,UAAU,EAAE,cAAc,CAAC,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,EAAE;YAC9D,sEAAsE;YACtE,IAAI,OAAO,GAAG,EAAE,CAAC;YACjB,IAAI,IAAI,CAAC,OAAO,EAAE;gBAChB,OAAO,GAAG,IAAI,CAAC,OAAO,CAAC;aACxB;YACD,IAAI,IAAI,CAAC,QAAQ,IAAI,IAAI,CAAC,QAAQ,CAAC,MAAM,GAAG,CAAC,EAAE;gBAC7C,OAAO,GAAG,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC;aAC5B;YAED,OAAO,oBAAoB,CAAC,OAAO,CAAC,CAAC;QACvC,CAAC,CAAC,CAAC;KACJ;SAAM;QACL,MAAM,IAAI,QAAQ,CAAC,gBAAgB,EAAE,gCAAgC,CAAC,CAAC;KACxE;IAED,MAAM,OAAO,GAAG,MAAM,OAAO,CAAC;IAE9B,OAAO,OAAO,CAAC;AACjB,CAAC"}
|
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
import { UserSession } from "@esri/arcgis-rest-auth";
|
|
2
|
-
/**
|
|
3
|
-
* DEPRECATED: Applications should manage storage/retrieval of serialized ArcGISContexts.
|
|
4
|
-
* Please see ArcGISContextManager.serialize(...) and ArcGISContextManager.deserialize(...)
|
|
5
|
-
* Remove any serialized sessions associated with the passed clientId
|
|
6
|
-
* from a browser's local storage
|
|
7
|
-
* @param clientId oAuth Client Id
|
|
8
|
-
* @param win optional window (used for testing)
|
|
9
|
-
*/
|
|
10
|
-
export function clearSession(clientId,
|
|
11
|
-
/* istanbul ignore next */
|
|
12
|
-
win = window) {
|
|
13
|
-
if (win.localStorage) {
|
|
14
|
-
win.localStorage.removeItem(`__CONTEXT_${clientId}`);
|
|
15
|
-
}
|
|
16
|
-
}
|
|
17
|
-
/**
|
|
18
|
-
* DEPRECATED: Applications should manage storage/retrieval of serialized ArcGISContexts.
|
|
19
|
-
* Please see ArcGISContextManager.serialize(...) and ArcGISContextManager.deserialize(...)
|
|
20
|
-
* Re-hydrate a UserSession from a browser's local storage.
|
|
21
|
-
* If not found,
|
|
22
|
-
* @param clientId oAuth Client Id
|
|
23
|
-
* @param win optional window (used for testing)
|
|
24
|
-
* @returns
|
|
25
|
-
*/
|
|
26
|
-
export function getSession(clientId,
|
|
27
|
-
/* istanbul ignore next */
|
|
28
|
-
win = window) {
|
|
29
|
-
let result = null;
|
|
30
|
-
// tslint:disable-next-line
|
|
31
|
-
console.warn("getSession is deprecated. App should handle storage/retrieval and use ArcGISContextManager.deserialize(...) instead.");
|
|
32
|
-
if (win.localStorage) {
|
|
33
|
-
const serializedSession = win.localStorage.getItem(`__CONTEXT_${clientId}`);
|
|
34
|
-
if (serializedSession) {
|
|
35
|
-
result = UserSession.deserialize(serializedSession);
|
|
36
|
-
}
|
|
37
|
-
}
|
|
38
|
-
return result;
|
|
39
|
-
}
|
|
40
|
-
/**
|
|
41
|
-
* DEPRECATED: Applications should manage storage/retrieval of serialized ArcGISContexts.
|
|
42
|
-
* Please see ArcGISContextManager.serialize(...) and ArcGISContextManager.deserialize(...)
|
|
43
|
-
* Serialize a UserSession into a browser's local storage
|
|
44
|
-
* @param clientId oAuth Client Id
|
|
45
|
-
* @param session UserSession
|
|
46
|
-
* @param win optional window (used for testing)
|
|
47
|
-
*/
|
|
48
|
-
export function saveSession(clientId, session,
|
|
49
|
-
/* istanbul ignore next */
|
|
50
|
-
win = window) {
|
|
51
|
-
// tslint:disable-next-line
|
|
52
|
-
console.warn("saveSession is deprecated. App should handle storage/retrieval and use ArcGISContextManager.serialize(...) instead.");
|
|
53
|
-
if (win.localStorage) {
|
|
54
|
-
win.localStorage.setItem(`__CONTEXT_${clientId}`, session.serialize());
|
|
55
|
-
}
|
|
56
|
-
}
|
|
57
|
-
//# sourceMappingURL=sessionLocalStorage.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"sessionLocalStorage.js","sourceRoot":"","sources":["../../../src/utils/sessionLocalStorage.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AAErD;;;;;;;GAOG;AACH,MAAM,UAAU,YAAY,CAC1B,QAAgB;AAChB,0BAA0B;AAC1B,MAAW,MAAM;IAEjB,IAAI,GAAG,CAAC,YAAY,EAAE;QACpB,GAAG,CAAC,YAAY,CAAC,UAAU,CAAC,aAAa,QAAQ,EAAE,CAAC,CAAC;KACtD;AACH,CAAC;AAED;;;;;;;;GAQG;AACH,MAAM,UAAU,UAAU,CACxB,QAAgB;AAChB,0BAA0B;AAC1B,MAAW,MAAM;IAEjB,IAAI,MAAM,GAAuB,IAAI,CAAC;IACtC,2BAA2B;IAC3B,OAAO,CAAC,IAAI,CACV,sHAAsH,CACvH,CAAC;IACF,IAAI,GAAG,CAAC,YAAY,EAAE;QACpB,MAAM,iBAAiB,GAAG,GAAG,CAAC,YAAY,CAAC,OAAO,CAAC,aAAa,QAAQ,EAAE,CAAC,CAAC;QAC5E,IAAI,iBAAiB,EAAE;YACrB,MAAM,GAAG,WAAW,CAAC,WAAW,CAAC,iBAAiB,CAAC,CAAC;SACrD;KACF;IACD,OAAO,MAAM,CAAC;AAChB,CAAC;AAED;;;;;;;GAOG;AACH,MAAM,UAAU,WAAW,CACzB,QAAgB,EAChB,OAAoB;AACpB,0BAA0B;AAC1B,MAAW,MAAM;IAEjB,2BAA2B;IAC3B,OAAO,CAAC,IAAI,CACV,qHAAqH,CACtH,CAAC;IACF,IAAI,GAAG,CAAC,YAAY,EAAE;QACpB,GAAG,CAAC,YAAY,CAAC,OAAO,CAAC,aAAa,QAAQ,EAAE,EAAE,OAAO,CAAC,SAAS,EAAE,CAAC,CAAC;KACxE;AACH,CAAC"}
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.addAssociation = void 0;
|
|
4
|
-
/**
|
|
5
|
-
* ** DEPRECATED: please use requestAssociation instead.
|
|
6
|
-
* This will be removed in the next breaking version **
|
|
7
|
-
*
|
|
8
|
-
* Add an association to an entity
|
|
9
|
-
* Persisted into the entity's `.typeKeywords` array
|
|
10
|
-
* @param info
|
|
11
|
-
* @param entity
|
|
12
|
-
*/
|
|
13
|
-
function addAssociation(entity, info) {
|
|
14
|
-
if (!entity.typeKeywords) {
|
|
15
|
-
entity.typeKeywords = [];
|
|
16
|
-
}
|
|
17
|
-
const association = `${info.type}|${info.id}`;
|
|
18
|
-
if (!entity.typeKeywords.includes(association)) {
|
|
19
|
-
entity.typeKeywords.push(association);
|
|
20
|
-
}
|
|
21
|
-
}
|
|
22
|
-
exports.addAssociation = addAssociation;
|
|
23
|
-
//# sourceMappingURL=addAssociation.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"addAssociation.js","sourceRoot":"","sources":["../../../src/associations/addAssociation.ts"],"names":[],"mappings":";;;AAGA;;;;;;;;GAQG;AACH,SAAgB,cAAc,CAC5B,MAAyB,EACzB,IAAsB;IAEtB,IAAI,CAAC,MAAM,CAAC,YAAY,EAAE;QACxB,MAAM,CAAC,YAAY,GAAG,EAAE,CAAC;KAC1B;IACD,MAAM,WAAW,GAAG,GAAG,IAAI,CAAC,IAAI,IAAI,IAAI,CAAC,EAAE,EAAE,CAAC;IAC9C,IAAI,CAAC,MAAM,CAAC,YAAY,CAAC,QAAQ,CAAC,WAAW,CAAC,EAAE;QAC9C,MAAM,CAAC,YAAY,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;KACvC;AACH,CAAC;AAXD,wCAWC"}
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.listAssociations = void 0;
|
|
4
|
-
/**
|
|
5
|
-
* ** DEPRECATED: please use getAssociatedEntitiesQuery
|
|
6
|
-
* to get a query for an entity's associations instead.
|
|
7
|
-
* This will be removed in the next breaking version **
|
|
8
|
-
*
|
|
9
|
-
* Return a list of all associations on an entity for a type
|
|
10
|
-
* @param entity
|
|
11
|
-
* @returns
|
|
12
|
-
*/
|
|
13
|
-
function listAssociations(entity, type) {
|
|
14
|
-
if (!entity.typeKeywords) {
|
|
15
|
-
return [];
|
|
16
|
-
}
|
|
17
|
-
return entity.typeKeywords
|
|
18
|
-
.filter((tk) => tk.indexOf(`${type}|`) > -1)
|
|
19
|
-
.map((tk) => {
|
|
20
|
-
const [t, id] = tk.split("|");
|
|
21
|
-
return { type: t, id };
|
|
22
|
-
});
|
|
23
|
-
}
|
|
24
|
-
exports.listAssociations = listAssociations;
|
|
25
|
-
//# sourceMappingURL=listAssociations.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"listAssociations.js","sourceRoot":"","sources":["../../../src/associations/listAssociations.ts"],"names":[],"mappings":";;;AAGA;;;;;;;;GAQG;AACH,SAAgB,gBAAgB,CAC9B,MAAyB,EACzB,IAAqB;IAErB,IAAI,CAAC,MAAM,CAAC,YAAY,EAAE;QACxB,OAAO,EAAE,CAAC;KACX;IACD,OAAO,MAAM,CAAC,YAAY;SACvB,MAAM,CAAC,CAAC,EAAE,EAAE,EAAE,CAAC,EAAE,CAAC,OAAO,CAAC,GAAG,IAAI,GAAG,CAAC,GAAG,CAAC,CAAC,CAAC;SAC3C,GAAG,CAAC,CAAC,EAAE,EAAE,EAAE;QACV,MAAM,CAAC,CAAC,EAAE,EAAE,CAAC,GAAG,EAAE,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;QAC9B,OAAO,EAAE,IAAI,EAAE,CAAC,EAAE,EAAE,EAAsB,CAAC;IAC7C,CAAC,CAAC,CAAC;AACP,CAAC;AAbD,4CAaC"}
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.removeAssociation = void 0;
|
|
4
|
-
/**
|
|
5
|
-
* ** DEPRECATED: please use breakAssociation instead.
|
|
6
|
-
* This will be removed in the next breaking version **
|
|
7
|
-
*
|
|
8
|
-
* Remove an association from an entity
|
|
9
|
-
* @param info
|
|
10
|
-
* @param entity
|
|
11
|
-
* @returns
|
|
12
|
-
*/
|
|
13
|
-
function removeAssociation(entity, info) {
|
|
14
|
-
if (!entity.typeKeywords) {
|
|
15
|
-
return;
|
|
16
|
-
}
|
|
17
|
-
const association = `${info.type}|${info.id}`;
|
|
18
|
-
const index = entity.typeKeywords.indexOf(association);
|
|
19
|
-
if (index > -1) {
|
|
20
|
-
entity.typeKeywords.splice(index, 1);
|
|
21
|
-
}
|
|
22
|
-
}
|
|
23
|
-
exports.removeAssociation = removeAssociation;
|
|
24
|
-
//# sourceMappingURL=removeAssociation.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"removeAssociation.js","sourceRoot":"","sources":["../../../src/associations/removeAssociation.ts"],"names":[],"mappings":";;;AAGA;;;;;;;;GAQG;AACH,SAAgB,iBAAiB,CAC/B,MAAyB,EACzB,IAAsB;IAEtB,IAAI,CAAC,MAAM,CAAC,YAAY,EAAE;QACxB,OAAO;KACR;IACD,MAAM,WAAW,GAAG,GAAG,IAAI,CAAC,IAAI,IAAI,IAAI,CAAC,EAAE,EAAE,CAAC;IAC9C,MAAM,KAAK,GAAG,MAAM,CAAC,YAAY,CAAC,OAAO,CAAC,WAAW,CAAC,CAAC;IACvD,IAAI,KAAK,GAAG,CAAC,CAAC,EAAE;QACd,MAAM,CAAC,YAAY,CAAC,MAAM,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC;KACtC;AACH,CAAC;AAZD,8CAYC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"IWIthAssociationBehavior.js","sourceRoot":"","sources":["../../../../src/core/behaviors/IWIthAssociationBehavior.ts"],"names":[],"mappings":""}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.getEntityDefaultWorkspacePane = void 0;
|
|
4
|
-
/**
|
|
5
|
-
* DEPRECATED
|
|
6
|
-
*
|
|
7
|
-
* This util has been deprecated. It was a duplicate of another util and is the concern of the UI,
|
|
8
|
-
* so it was moved as such.
|
|
9
|
-
*
|
|
10
|
-
* It will be removed in the next breaking version.
|
|
11
|
-
* @param entityType
|
|
12
|
-
* @returns
|
|
13
|
-
*/
|
|
14
|
-
exports.getEntityDefaultWorkspacePane = (entityType) => {
|
|
15
|
-
const DEFAULT_PANES = {
|
|
16
|
-
discussion: "details",
|
|
17
|
-
};
|
|
18
|
-
return DEFAULT_PANES[entityType];
|
|
19
|
-
};
|
|
20
|
-
//# sourceMappingURL=getEntityDefaultWorkspacePane.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"getEntityDefaultWorkspacePane.js","sourceRoot":"","sources":["../../../src/core/getEntityDefaultWorkspacePane.ts"],"names":[],"mappings":";;;AAAA;;;;;;;;;GASG;AACU,QAAA,6BAA6B,GAAG,CAAC,UAAkB,EAAU,EAAE;IAC1E,MAAM,aAAa,GAA2B;QAC5C,UAAU,EAAE,SAAS;KACtB,CAAC;IACF,OAAO,aAAa,CAAC,UAAU,CAAC,CAAC;AACnC,CAAC,CAAC"}
|