@esri/hub-common 13.22.1 → 13.24.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/capabilities/types.js +1 -0
- package/dist/esm/capabilities/types.js.map +1 -1
- package/dist/esm/core/EntityEditor.js +39 -0
- package/dist/esm/core/EntityEditor.js.map +1 -0
- package/dist/esm/core/HubItemEntity.js +14 -0
- package/dist/esm/core/HubItemEntity.js.map +1 -1
- package/dist/esm/core/index.js.map +1 -1
- package/dist/esm/core/schemas/getEntityEditorSchemas.js +7 -1
- package/dist/esm/core/schemas/getEntityEditorSchemas.js.map +1 -1
- package/dist/esm/core/schemas/internal/getCategoryItems.js +34 -0
- package/dist/esm/core/schemas/internal/getCategoryItems.js.map +1 -0
- package/dist/esm/core/schemas/internal/getFeaturedContentCatalogs.js +21 -0
- package/dist/esm/core/schemas/internal/getFeaturedContentCatalogs.js.map +1 -0
- package/dist/esm/core/schemas/internal/getFeaturedImageUrl.js +9 -0
- package/dist/esm/core/schemas/internal/getFeaturedImageUrl.js.map +1 -0
- package/dist/esm/core/schemas/internal/getLocationExtent.js +11 -0
- package/dist/esm/core/schemas/internal/getLocationExtent.js.map +1 -0
- package/dist/esm/core/schemas/internal/getLocationOptions.js +56 -0
- package/dist/esm/core/schemas/internal/getLocationOptions.js.map +1 -0
- package/dist/esm/core/schemas/internal/getSharableGroupsComboBoxItems.js +27 -0
- package/dist/esm/core/schemas/internal/getSharableGroupsComboBoxItems.js.map +1 -0
- package/dist/esm/core/schemas/internal/getTagItems.js +37 -0
- package/dist/esm/core/schemas/internal/getTagItems.js.map +1 -0
- package/dist/esm/core/types/HubEntityEditor.js +1 -0
- package/dist/esm/core/types/HubEntityEditor.js.map +1 -0
- package/dist/esm/core/types/IHubProject.js.map +1 -1
- package/dist/esm/core/types/index.js +5 -4
- package/dist/esm/core/types/index.js.map +1 -1
- package/dist/esm/index.js +1 -0
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/pages/_internal/PageBusinessRules.js +6 -0
- package/dist/esm/pages/_internal/PageBusinessRules.js.map +1 -1
- package/dist/esm/projects/HubProject.js +92 -13
- package/dist/esm/projects/HubProject.js.map +1 -1
- package/dist/esm/projects/_internal/ProjectBusinessRules.js +13 -0
- package/dist/esm/projects/_internal/ProjectBusinessRules.js.map +1 -1
- package/dist/esm/projects/_internal/ProjectSchema.js +3 -3
- package/dist/esm/projects/_internal/ProjectSchema.js.map +1 -1
- package/dist/esm/projects/_internal/ProjectUiSchemaCreate.js +1 -1
- package/dist/esm/projects/_internal/ProjectUiSchemaCreate.js.map +1 -1
- package/dist/esm/projects/_internal/getProjectEditorConfigOptions.js +63 -0
- package/dist/esm/projects/_internal/getProjectEditorConfigOptions.js.map +1 -0
- package/dist/esm/projects/edit.js +23 -7
- package/dist/esm/projects/edit.js.map +1 -1
- package/dist/esm/sites/HubSites.js +12 -26
- package/dist/esm/sites/HubSites.js.map +1 -1
- package/dist/esm/sites/_internal/SiteBusinessRules.js +6 -0
- package/dist/esm/sites/_internal/SiteBusinessRules.js.map +1 -1
- package/dist/esm/urls/cacheBustUrl.js +13 -0
- package/dist/esm/urls/cacheBustUrl.js.map +1 -0
- package/dist/esm/urls/index.js +1 -0
- package/dist/esm/urls/index.js.map +1 -1
- package/dist/node/capabilities/types.js +1 -0
- package/dist/node/capabilities/types.js.map +1 -1
- package/dist/node/core/EntityEditor.js +43 -0
- package/dist/node/core/EntityEditor.js.map +1 -0
- package/dist/node/core/HubItemEntity.js +14 -0
- package/dist/node/core/HubItemEntity.js.map +1 -1
- package/dist/node/core/index.js.map +1 -1
- package/dist/node/core/schemas/getEntityEditorSchemas.js +7 -1
- package/dist/node/core/schemas/getEntityEditorSchemas.js.map +1 -1
- package/dist/node/core/schemas/internal/getCategoryItems.js +38 -0
- package/dist/node/core/schemas/internal/getCategoryItems.js.map +1 -0
- package/dist/node/core/schemas/internal/getFeaturedContentCatalogs.js +25 -0
- package/dist/node/core/schemas/internal/getFeaturedContentCatalogs.js.map +1 -0
- package/dist/node/core/schemas/internal/getFeaturedImageUrl.js +13 -0
- package/dist/node/core/schemas/internal/getFeaturedImageUrl.js.map +1 -0
- package/dist/node/core/schemas/internal/getLocationExtent.js +15 -0
- package/dist/node/core/schemas/internal/getLocationExtent.js.map +1 -0
- package/dist/node/core/schemas/internal/getLocationOptions.js +60 -0
- package/dist/node/core/schemas/internal/getLocationOptions.js.map +1 -0
- package/dist/node/core/schemas/internal/getSharableGroupsComboBoxItems.js +31 -0
- package/dist/node/core/schemas/internal/getSharableGroupsComboBoxItems.js.map +1 -0
- package/dist/node/core/schemas/internal/getTagItems.js +41 -0
- package/dist/node/core/schemas/internal/getTagItems.js.map +1 -0
- package/dist/node/core/types/HubEntityEditor.js +3 -0
- package/dist/node/core/types/HubEntityEditor.js.map +1 -0
- package/dist/node/core/types/IHubProject.js.map +1 -1
- package/dist/node/core/types/index.js +5 -4
- package/dist/node/core/types/index.js.map +1 -1
- package/dist/node/index.js +1 -0
- package/dist/node/index.js.map +1 -1
- package/dist/node/pages/_internal/PageBusinessRules.js +6 -0
- package/dist/node/pages/_internal/PageBusinessRules.js.map +1 -1
- package/dist/node/projects/HubProject.js +93 -14
- package/dist/node/projects/HubProject.js.map +1 -1
- package/dist/node/projects/_internal/ProjectBusinessRules.js +13 -0
- package/dist/node/projects/_internal/ProjectBusinessRules.js.map +1 -1
- package/dist/node/projects/_internal/ProjectSchema.js +5 -5
- package/dist/node/projects/_internal/ProjectSchema.js.map +1 -1
- package/dist/node/projects/_internal/ProjectUiSchemaCreate.js +1 -1
- package/dist/node/projects/_internal/ProjectUiSchemaCreate.js.map +1 -1
- package/dist/node/projects/_internal/getProjectEditorConfigOptions.js +67 -0
- package/dist/node/projects/_internal/getProjectEditorConfigOptions.js.map +1 -0
- package/dist/node/projects/edit.js +24 -7
- package/dist/node/projects/edit.js.map +1 -1
- package/dist/node/sites/HubSites.js +12 -27
- package/dist/node/sites/HubSites.js.map +1 -1
- package/dist/node/sites/_internal/SiteBusinessRules.js +6 -0
- package/dist/node/sites/_internal/SiteBusinessRules.js.map +1 -1
- package/dist/node/urls/cacheBustUrl.js +16 -0
- package/dist/node/urls/cacheBustUrl.js.map +1 -0
- package/dist/node/urls/index.js +1 -0
- package/dist/node/urls/index.js.map +1 -1
- package/dist/types/capabilities/types.d.ts +1 -1
- package/dist/types/core/EntityEditor.d.ts +13 -0
- package/dist/types/core/behaviors/IWithEditorBehavior.d.ts +23 -9
- package/dist/types/core/schemas/internal/getCategoryItems.d.ts +11 -0
- package/dist/types/core/schemas/internal/getFeaturedContentCatalogs.d.ts +9 -0
- package/dist/types/core/schemas/internal/getFeaturedImageUrl.d.ts +3 -0
- package/dist/types/core/schemas/internal/getLocationExtent.d.ts +7 -0
- package/dist/types/core/schemas/internal/getLocationOptions.d.ts +16 -0
- package/dist/types/core/schemas/internal/getSharableGroupsComboBoxItems.d.ts +7 -0
- package/dist/types/core/schemas/internal/getTagItems.d.ts +12 -0
- package/dist/types/core/schemas/types.d.ts +6 -0
- package/dist/types/core/types/HubEntityEditor.d.ts +11 -0
- package/dist/types/core/types/IHubLocation.d.ts +12 -0
- package/dist/types/core/types/IHubProject.d.ts +10 -0
- package/dist/types/core/types/index.d.ts +5 -4
- package/dist/types/index.d.ts +1 -0
- package/dist/types/permissions/types/Permission.d.ts +1 -1
- package/dist/types/projects/HubProject.d.ts +21 -13
- package/dist/types/projects/_internal/ProjectBusinessRules.d.ts +1 -1
- package/dist/types/projects/_internal/ProjectSchema.d.ts +2 -2
- package/dist/types/projects/_internal/getProjectEditorConfigOptions.d.ts +10 -0
- package/dist/types/projects/edit.d.ts +12 -7
- package/dist/types/sites/HubSites.d.ts +0 -8
- package/dist/types/urls/cacheBustUrl.d.ts +5 -0
- package/dist/types/urls/index.d.ts +1 -0
- package/package.json +1 -1
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import { IHubProject, IWithCatalogBehavior, IWithStoreBehavior, IWithSharingBehavior,
|
|
1
|
+
import { IHubProject, IWithCatalogBehavior, IWithStoreBehavior, IWithSharingBehavior, IResolvedMetric, IWithCardBehavior, IHubProjectEditor, IEntityEditorContext } from "../core";
|
|
2
|
+
import { EditorType } from "../core/schemas/getEntityEditorSchemas";
|
|
2
3
|
import { Catalog } from "../search";
|
|
3
4
|
import { IArcGISContext } from "../ArcGISContext";
|
|
4
5
|
import { HubItemEntity } from "../core/HubItemEntity";
|
|
5
|
-
import { IEditorConfig } from "../core/behaviors/IWithEditorBehavior";
|
|
6
|
-
import { ProjectEditorType } from "./_internal/ProjectSchema";
|
|
6
|
+
import { IEditorConfig, IWithEditorBehavior } from "../core/behaviors/IWithEditorBehavior";
|
|
7
7
|
import { IWithMetricsBehavior } from "../core/behaviors/IWithMetricsBehavior";
|
|
8
8
|
import { IConvertToCardModelOpts, IHubCardViewModel } from "../core/types/IHubCardViewModel";
|
|
9
9
|
/**
|
|
10
10
|
* Hub Project Class
|
|
11
11
|
*/
|
|
12
|
-
export declare class HubProject extends HubItemEntity<IHubProject> implements IWithStoreBehavior<IHubProject>, IWithCatalogBehavior, IWithMetricsBehavior, IWithSharingBehavior, IWithCardBehavior {
|
|
12
|
+
export declare class HubProject extends HubItemEntity<IHubProject> implements IWithStoreBehavior<IHubProject>, IWithCatalogBehavior, IWithMetricsBehavior, IWithSharingBehavior, IWithCardBehavior, IWithEditorBehavior {
|
|
13
13
|
private _catalog;
|
|
14
14
|
/**
|
|
15
15
|
* Private constructor so we don't have `new` all over the place. Allows for
|
|
@@ -45,16 +45,11 @@ export declare class HubProject extends HubItemEntity<IHubProject> implements IW
|
|
|
45
45
|
*/
|
|
46
46
|
static fetch(identifier: string, context: IArcGISContext): Promise<HubProject>;
|
|
47
47
|
/**
|
|
48
|
-
*
|
|
49
|
-
* @param
|
|
50
|
-
* @param
|
|
51
|
-
* @
|
|
52
|
-
*
|
|
53
|
-
* Note: typescript does not have a means to specify static methods in interfaces
|
|
54
|
-
* so while this is the implementation of IWithEditorBehavior, it is not enforced
|
|
55
|
-
* by the compiler.
|
|
48
|
+
* Given a partial project, apply defaults to it to ensure that a baseline of properties are set
|
|
49
|
+
* @param partialProject
|
|
50
|
+
* @param context
|
|
51
|
+
* @returns
|
|
56
52
|
*/
|
|
57
|
-
static getEditorConfig(i18nScope: string, type: ProjectEditorType, options?: UiSchemaElementOptions[]): Promise<IEditorConfig>;
|
|
58
53
|
private static applyDefaults;
|
|
59
54
|
/**
|
|
60
55
|
* Convert the project entity into a card view model that can
|
|
@@ -63,6 +58,19 @@ export declare class HubProject extends HubItemEntity<IHubProject> implements IW
|
|
|
63
58
|
* @param opts view model options
|
|
64
59
|
*/
|
|
65
60
|
convertToCardModel(opts?: IConvertToCardModelOpts): IHubCardViewModel;
|
|
61
|
+
getEditorConfig(i18nScope: string, type: EditorType): Promise<IEditorConfig>;
|
|
62
|
+
/**
|
|
63
|
+
* Return the project as an editor object
|
|
64
|
+
* @param editorContext
|
|
65
|
+
* @returns
|
|
66
|
+
*/
|
|
67
|
+
toEditor(editorContext?: IEntityEditorContext): IHubProjectEditor;
|
|
68
|
+
/**
|
|
69
|
+
* Load the project from the editor object
|
|
70
|
+
* @param editor
|
|
71
|
+
* @returns
|
|
72
|
+
*/
|
|
73
|
+
fromEditor(editor: IHubProjectEditor): Promise<IHubProject>;
|
|
66
74
|
/**
|
|
67
75
|
* Apply a new state to the instance
|
|
68
76
|
* @param changes
|
|
@@ -19,7 +19,7 @@ export declare const ProjectCapabilityPermissions: ICapabilityPermission[];
|
|
|
19
19
|
* These define the requirements any user must meet to perform related actions
|
|
20
20
|
* @private
|
|
21
21
|
*/
|
|
22
|
-
export declare const ProjectPermissions: readonly ["hub:project:create", "hub:project:delete", "hub:project:edit", "hub:project:view", "hub:project:owner"];
|
|
22
|
+
export declare const ProjectPermissions: readonly ["hub:project:create", "hub:project:delete", "hub:project:edit", "hub:project:view", "hub:project:owner", "hub:project:share"];
|
|
23
23
|
/**
|
|
24
24
|
* Project permission policies
|
|
25
25
|
* @private
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { IConfigurationSchema } from "../../core";
|
|
1
|
+
import { IConfigurationSchema } from "../../core/schemas/types";
|
|
2
2
|
export declare type ProjectEditorType = (typeof ProjectEditorTypes)[number];
|
|
3
3
|
export declare const ProjectEditorTypes: readonly ["hub:project:create", "hub:project:edit"];
|
|
4
4
|
/**
|
|
5
|
-
*
|
|
5
|
+
* Defines the JSON schema for a Hub Project's editable fields
|
|
6
6
|
*/
|
|
7
7
|
export declare const ProjectSchema: IConfigurationSchema;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { IArcGISContext } from "../../ArcGISContext";
|
|
2
|
+
import { UiSchemaElementOptions } from "../../core/schemas/types";
|
|
3
|
+
import { IHubProject } from "../../core/types/IHubProject";
|
|
4
|
+
/**
|
|
5
|
+
* Construct the Project Editor configuration options
|
|
6
|
+
* @param entity
|
|
7
|
+
* @param context
|
|
8
|
+
* @returns
|
|
9
|
+
*/
|
|
10
|
+
export declare function getProjectEditorConfigOptions(entity: IHubProject, context: IArcGISContext): Promise<UiSchemaElementOptions[]>;
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import { IUserRequestOptions } from "@esri/arcgis-rest-auth";
|
|
2
|
-
import {
|
|
2
|
+
import { IPortal } from "@esri/arcgis-rest-portal";
|
|
3
|
+
import { IHubProject, IHubProjectEditor } from "../core/types";
|
|
4
|
+
import { ProjectEditorType } from "./_internal/ProjectSchema";
|
|
3
5
|
import { UiSchemaElementOptions } from "../core/schemas";
|
|
4
|
-
import {
|
|
6
|
+
import { IEditorConfig } from "../core/behaviors/IWithEditorBehavior";
|
|
5
7
|
/**
|
|
6
8
|
* @private
|
|
7
9
|
* Create a new Hub Project item
|
|
@@ -12,6 +14,13 @@ import { EditorConfigType, IEditorConfig } from "../core/behaviors/IWithEditorBe
|
|
|
12
14
|
* @param requestOptions
|
|
13
15
|
*/
|
|
14
16
|
export declare function createProject(partialProject: Partial<IHubProject>, requestOptions: IUserRequestOptions): Promise<IHubProject>;
|
|
17
|
+
/**
|
|
18
|
+
* Convert a IHubProjectEditor back to an IHubProject
|
|
19
|
+
* @param editor
|
|
20
|
+
* @param portal
|
|
21
|
+
* @returns
|
|
22
|
+
*/
|
|
23
|
+
export declare function editorToProject(editor: IHubProjectEditor, portal: IPortal): IHubProject;
|
|
15
24
|
/**
|
|
16
25
|
* @private
|
|
17
26
|
* Update a Hub Project
|
|
@@ -27,13 +36,9 @@ export declare function updateProject(project: IHubProject, requestOptions: IUse
|
|
|
27
36
|
*/
|
|
28
37
|
export declare function deleteProject(id: string, requestOptions: IUserRequestOptions): Promise<void>;
|
|
29
38
|
/**
|
|
30
|
-
* DEPRECATED: the following will be removed at next breaking version
|
|
31
|
-
* use the getEntityEditorSchemas function instead (which this function
|
|
32
|
-
* has already been refactored to consume)
|
|
33
|
-
*
|
|
34
39
|
* Get the editor config for for the HubProject entity.
|
|
35
40
|
* @param i18nScope translation scope to be interpolated into the uiSchema
|
|
36
41
|
* @param type editor type - corresonds to the returned uiSchema
|
|
37
42
|
* @param options optional hash of dynamic uiSchema element options
|
|
38
43
|
*/
|
|
39
|
-
export declare function getHubProjectEditorConfig(i18nScope: string, type:
|
|
44
|
+
export declare function getHubProjectEditorConfig(i18nScope: string, type: ProjectEditorType, options?: UiSchemaElementOptions[]): Promise<IEditorConfig>;
|
|
@@ -49,14 +49,6 @@ export declare function fetchSite(identifier: string, requestOptions: IHubReques
|
|
|
49
49
|
* @returns
|
|
50
50
|
*/
|
|
51
51
|
export declare function convertModelToSite(model: IModel, requestOptions: IRequestOptions): IHubSite;
|
|
52
|
-
/**
|
|
53
|
-
* @internal
|
|
54
|
-
* Convert an IHubSite into an IModel
|
|
55
|
-
* @param site
|
|
56
|
-
* @param requestOptions
|
|
57
|
-
* @returns
|
|
58
|
-
*/
|
|
59
|
-
export declare function convertSiteToModel(site: IHubSite, _requestOptions: IRequestOptions): IModel;
|
|
60
52
|
/**
|
|
61
53
|
* Convert a Hub Site Application item into a Hub Site, fetching any
|
|
62
54
|
* additional information that may be required
|