@esri/hub-common 13.27.0 → 13.28.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/ArcGISContextManager.js +2 -0
- package/dist/esm/ArcGISContextManager.js.map +1 -1
- package/dist/esm/capabilities/getWorkspaceCapabilities.js +2 -0
- package/dist/esm/capabilities/getWorkspaceCapabilities.js.map +1 -1
- package/dist/esm/content/HubContent.js +65 -0
- package/dist/esm/content/HubContent.js.map +1 -1
- package/dist/esm/core/EntityEditor.js +20 -7
- package/dist/esm/core/EntityEditor.js.map +1 -1
- package/dist/esm/core/HubItemEntity.js +24 -8
- package/dist/esm/core/HubItemEntity.js.map +1 -1
- package/dist/esm/core/getTypeFromEntity.js.map +1 -1
- package/dist/esm/core/schemas/getEditorConfig.js +15 -0
- package/dist/esm/core/schemas/getEditorConfig.js.map +1 -0
- package/dist/esm/core/schemas/getEntityEditorSchemas.js +5 -14
- package/dist/esm/core/schemas/getEntityEditorSchemas.js.map +1 -1
- package/dist/esm/core/schemas/index.js +1 -0
- package/dist/esm/core/schemas/index.js.map +1 -1
- package/dist/esm/core/schemas/internal/ConfigurableEntity.js +1 -0
- package/dist/esm/core/schemas/internal/ConfigurableEntity.js.map +1 -0
- package/dist/esm/core/schemas/internal/configOptionHelpers.js +88 -0
- package/dist/esm/core/schemas/internal/configOptionHelpers.js.map +1 -0
- package/dist/esm/core/schemas/internal/getConfigOptions.js +15 -0
- package/dist/esm/core/schemas/internal/getConfigOptions.js.map +1 -0
- package/dist/esm/core/schemas/internal/getEditorConfigOptions.js +31 -0
- package/dist/esm/core/schemas/internal/getEditorConfigOptions.js.map +1 -0
- package/dist/esm/core/schemas/internal/getEntityEditorSchemas.js +87 -0
- package/dist/esm/core/schemas/internal/getEntityEditorSchemas.js.map +1 -0
- package/dist/esm/core/schemas/internal/getFeaturedImageUrl.js.map +1 -1
- package/dist/esm/core/schemas/internal/getLocationExtent.js.map +1 -1
- package/dist/esm/core/schemas/internal/getLocationOptions.js.map +1 -1
- package/dist/esm/core/schemas/internal/getTagItems.js +36 -12
- package/dist/esm/core/schemas/internal/getTagItems.js.map +1 -1
- package/dist/esm/core/schemas/types.js +23 -0
- package/dist/esm/core/schemas/types.js.map +1 -1
- package/dist/esm/core/types/ISystemStatus.js +1 -0
- package/dist/esm/core/types/ISystemStatus.js.map +1 -1
- package/dist/esm/discussions/HubDiscussion.js +64 -0
- package/dist/esm/discussions/HubDiscussion.js.map +1 -1
- package/dist/esm/discussions/_internal/DiscussionUiSchemaEdit.js +14 -0
- package/dist/esm/discussions/_internal/DiscussionUiSchemaEdit.js.map +1 -1
- package/dist/esm/initiatives/HubInitiative.js +64 -0
- package/dist/esm/initiatives/HubInitiative.js.map +1 -1
- package/dist/esm/initiatives/_internal/InitiativeSchema.js +4 -1
- package/dist/esm/initiatives/_internal/InitiativeSchema.js.map +1 -1
- package/dist/esm/initiatives/_internal/InitiativeUiSchemaCreate.js +119 -0
- package/dist/esm/initiatives/_internal/InitiativeUiSchemaCreate.js.map +1 -0
- package/dist/esm/initiatives/_internal/InitiativeUiSchemaEdit.js +14 -0
- package/dist/esm/initiatives/_internal/InitiativeUiSchemaEdit.js.map +1 -1
- package/dist/esm/items/deleteItemThumbnail.js +14 -0
- package/dist/esm/items/deleteItemThumbnail.js.map +1 -0
- package/dist/esm/items/index.js +1 -0
- package/dist/esm/items/index.js.map +1 -1
- package/dist/esm/pages/HubPage.js +64 -0
- package/dist/esm/pages/HubPage.js.map +1 -1
- package/dist/esm/pages/_internal/PageUiSchemaEdit.js +14 -0
- package/dist/esm/pages/_internal/PageUiSchemaEdit.js.map +1 -1
- package/dist/esm/permissions/HubPermissionPolicies.js +2 -0
- package/dist/esm/permissions/HubPermissionPolicies.js.map +1 -1
- package/dist/esm/permissions/PlatformPermissionPolicies.js +711 -0
- package/dist/esm/permissions/PlatformPermissionPolicies.js.map +1 -0
- package/dist/esm/permissions/types/Permission.js +2 -0
- package/dist/esm/permissions/types/Permission.js.map +1 -1
- package/dist/esm/projects/HubProject.js +24 -10
- package/dist/esm/projects/HubProject.js.map +1 -1
- package/dist/esm/projects/_internal/ProjectBusinessRules.js +0 -7
- package/dist/esm/projects/_internal/ProjectBusinessRules.js.map +1 -1
- package/dist/esm/projects/_internal/ProjectUiSchemaEdit.js +14 -0
- package/dist/esm/projects/_internal/ProjectUiSchemaEdit.js.map +1 -1
- package/dist/esm/sites/HubSite.js +65 -0
- package/dist/esm/sites/HubSite.js.map +1 -1
- package/dist/esm/sites/_internal/SiteUiSchemaEdit.js +14 -0
- package/dist/esm/sites/_internal/SiteUiSchemaEdit.js.map +1 -1
- package/dist/node/ArcGISContextManager.js +2 -0
- package/dist/node/ArcGISContextManager.js.map +1 -1
- package/dist/node/capabilities/getWorkspaceCapabilities.js +2 -0
- package/dist/node/capabilities/getWorkspaceCapabilities.js.map +1 -1
- package/dist/node/content/HubContent.js +65 -0
- package/dist/node/content/HubContent.js.map +1 -1
- package/dist/node/core/EntityEditor.js +20 -7
- package/dist/node/core/EntityEditor.js.map +1 -1
- package/dist/node/core/HubItemEntity.js +24 -8
- package/dist/node/core/HubItemEntity.js.map +1 -1
- package/dist/node/core/getTypeFromEntity.js.map +1 -1
- package/dist/node/core/schemas/getEditorConfig.js +19 -0
- package/dist/node/core/schemas/getEditorConfig.js.map +1 -0
- package/dist/node/core/schemas/getEntityEditorSchemas.js +6 -15
- package/dist/node/core/schemas/getEntityEditorSchemas.js.map +1 -1
- package/dist/node/core/schemas/index.js +1 -0
- package/dist/node/core/schemas/index.js.map +1 -1
- package/dist/node/core/schemas/internal/ConfigurableEntity.js +3 -0
- package/dist/node/core/schemas/internal/ConfigurableEntity.js.map +1 -0
- package/dist/node/core/schemas/internal/configOptionHelpers.js +91 -0
- package/dist/node/core/schemas/internal/configOptionHelpers.js.map +1 -0
- package/dist/node/core/schemas/internal/getConfigOptions.js +19 -0
- package/dist/node/core/schemas/internal/getConfigOptions.js.map +1 -0
- package/dist/node/core/schemas/internal/getEditorConfigOptions.js +35 -0
- package/dist/node/core/schemas/internal/getEditorConfigOptions.js.map +1 -0
- package/dist/node/core/schemas/internal/getEntityEditorSchemas.js +91 -0
- package/dist/node/core/schemas/internal/getEntityEditorSchemas.js.map +1 -0
- package/dist/node/core/schemas/internal/getFeaturedImageUrl.js.map +1 -1
- package/dist/node/core/schemas/internal/getLocationExtent.js.map +1 -1
- package/dist/node/core/schemas/internal/getLocationOptions.js.map +1 -1
- package/dist/node/core/schemas/internal/getTagItems.js +36 -12
- package/dist/node/core/schemas/internal/getTagItems.js.map +1 -1
- package/dist/node/core/schemas/types.js +24 -1
- package/dist/node/core/schemas/types.js.map +1 -1
- package/dist/node/core/types/ISystemStatus.js +1 -0
- package/dist/node/core/types/ISystemStatus.js.map +1 -1
- package/dist/node/discussions/HubDiscussion.js +64 -0
- package/dist/node/discussions/HubDiscussion.js.map +1 -1
- package/dist/node/discussions/_internal/DiscussionUiSchemaEdit.js +14 -0
- package/dist/node/discussions/_internal/DiscussionUiSchemaEdit.js.map +1 -1
- package/dist/node/initiatives/HubInitiative.js +64 -0
- package/dist/node/initiatives/HubInitiative.js.map +1 -1
- package/dist/node/initiatives/_internal/InitiativeSchema.js +4 -1
- package/dist/node/initiatives/_internal/InitiativeSchema.js.map +1 -1
- package/dist/node/initiatives/_internal/InitiativeUiSchemaCreate.js +122 -0
- package/dist/node/initiatives/_internal/InitiativeUiSchemaCreate.js.map +1 -0
- package/dist/node/initiatives/_internal/InitiativeUiSchemaEdit.js +14 -0
- package/dist/node/initiatives/_internal/InitiativeUiSchemaEdit.js.map +1 -1
- package/dist/node/items/deleteItemThumbnail.js +18 -0
- package/dist/node/items/deleteItemThumbnail.js.map +1 -0
- package/dist/node/items/index.js +1 -0
- package/dist/node/items/index.js.map +1 -1
- package/dist/node/pages/HubPage.js +64 -0
- package/dist/node/pages/HubPage.js.map +1 -1
- package/dist/node/pages/_internal/PageUiSchemaEdit.js +14 -0
- package/dist/node/pages/_internal/PageUiSchemaEdit.js.map +1 -1
- package/dist/node/permissions/HubPermissionPolicies.js +2 -0
- package/dist/node/permissions/HubPermissionPolicies.js.map +1 -1
- package/dist/node/permissions/PlatformPermissionPolicies.js +714 -0
- package/dist/node/permissions/PlatformPermissionPolicies.js.map +1 -0
- package/dist/node/permissions/types/Permission.js +2 -0
- package/dist/node/permissions/types/Permission.js.map +1 -1
- package/dist/node/projects/HubProject.js +24 -10
- package/dist/node/projects/HubProject.js.map +1 -1
- package/dist/node/projects/_internal/ProjectBusinessRules.js +0 -7
- package/dist/node/projects/_internal/ProjectBusinessRules.js.map +1 -1
- package/dist/node/projects/_internal/ProjectUiSchemaEdit.js +14 -0
- package/dist/node/projects/_internal/ProjectUiSchemaEdit.js.map +1 -1
- package/dist/node/sites/HubSite.js +65 -0
- package/dist/node/sites/HubSite.js.map +1 -1
- package/dist/node/sites/_internal/SiteUiSchemaEdit.js +14 -0
- package/dist/node/sites/_internal/SiteUiSchemaEdit.js.map +1 -1
- package/dist/types/content/HubContent.d.ts +19 -2
- package/dist/types/core/HubItemEntity.d.ts +7 -2
- package/dist/types/core/getTypeFromEntity.d.ts +2 -1
- package/dist/types/core/schemas/getEditorConfig.d.ts +13 -0
- package/dist/types/core/schemas/getEntityEditorSchemas.d.ts +2 -7
- package/dist/types/core/schemas/index.d.ts +1 -0
- package/dist/types/core/schemas/internal/ConfigurableEntity.d.ts +4 -0
- package/dist/types/core/schemas/internal/configOptionHelpers.d.ts +6 -0
- package/dist/types/core/schemas/internal/getConfigOptions.d.ts +12 -0
- package/dist/types/core/schemas/internal/getEditorConfigOptions.d.ts +11 -0
- package/dist/types/core/schemas/internal/getEntityEditorSchemas.d.ts +13 -0
- package/dist/types/core/schemas/internal/getFeaturedImageUrl.d.ts +2 -2
- package/dist/types/core/schemas/internal/getLocationExtent.d.ts +2 -2
- package/dist/types/core/schemas/internal/getLocationOptions.d.ts +2 -2
- package/dist/types/core/schemas/internal/getTagItems.d.ts +2 -2
- package/dist/types/core/schemas/types.d.ts +43 -3
- package/dist/types/core/types/IHubDiscussion.d.ts +7 -0
- package/dist/types/core/types/IHubEditableContent.d.ts +7 -0
- package/dist/types/core/types/IHubInitiative.d.ts +7 -0
- package/dist/types/core/types/IHubPage.d.ts +7 -0
- package/dist/types/core/types/IHubProject.d.ts +5 -0
- package/dist/types/core/types/IHubSite.d.ts +7 -0
- package/dist/types/core/types/ISystemStatus.d.ts +1 -1
- package/dist/types/discussions/HubDiscussion.d.ts +17 -2
- package/dist/types/initiatives/HubInitiative.d.ts +17 -2
- package/dist/types/initiatives/_internal/InitiativeSchema.d.ts +1 -1
- package/dist/types/initiatives/_internal/InitiativeUiSchemaCreate.d.ts +7 -0
- package/dist/types/items/deleteItemThumbnail.d.ts +9 -0
- package/dist/types/items/index.d.ts +1 -0
- package/dist/types/pages/HubPage.d.ts +17 -3
- package/dist/types/permissions/PlatformPermissionPolicies.d.ts +9 -0
- package/dist/types/permissions/types/Permission.d.ts +1 -1
- package/dist/types/permissions/types/PlatformPrivilege.d.ts +1 -1
- package/dist/types/projects/HubProject.d.ts +1 -1
- package/dist/types/projects/_internal/ProjectBusinessRules.d.ts +1 -1
- package/dist/types/sites/HubSite.d.ts +18 -1
- package/package.json +1 -1
- package/dist/esm/projects/_internal/getProjectEditorConfigOptions.js +0 -63
- package/dist/esm/projects/_internal/getProjectEditorConfigOptions.js.map +0 -1
- package/dist/node/projects/_internal/getProjectEditorConfigOptions.js +0 -67
- package/dist/node/projects/_internal/getProjectEditorConfigOptions.js.map +0 -1
- package/dist/types/projects/_internal/getProjectEditorConfigOptions.d.ts +0 -10
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
import { JSONSchema } from "json-schema-typed";
|
|
2
2
|
import Ajv from "ajv";
|
|
3
|
+
/**
|
|
4
|
+
* Defines the possible editor type values - these correspond
|
|
5
|
+
* to the supported/defined uiSchema configurations
|
|
6
|
+
*/
|
|
7
|
+
export declare type EditorType = (typeof validEditorTypes)[number];
|
|
8
|
+
export declare const validEditorTypes: readonly ["hub:project:create", "hub:project:edit", "hub:content:edit", "hub:initiative:edit", "hub:initiative:create", "hub:site:edit", "hub:discussion:edit", "hub:discussion:create", "hub:page:edit"];
|
|
3
9
|
export declare enum UiSchemaRuleEffects {
|
|
4
10
|
SHOW = "SHOW",
|
|
5
11
|
HIDE = "HIDE",
|
|
@@ -7,6 +13,7 @@ export declare enum UiSchemaRuleEffects {
|
|
|
7
13
|
NONE = ""
|
|
8
14
|
}
|
|
9
15
|
export declare enum UiSchemaElementTypes {
|
|
16
|
+
accordionItem = "AccordionItem",
|
|
10
17
|
section = "Section",
|
|
11
18
|
step = "Step",
|
|
12
19
|
control = "Control",
|
|
@@ -15,13 +22,20 @@ export declare enum UiSchemaElementTypes {
|
|
|
15
22
|
}
|
|
16
23
|
export declare enum UiSchemaSectionTypes {
|
|
17
24
|
accordion = "accordion",
|
|
18
|
-
|
|
25
|
+
block = "block",
|
|
26
|
+
stepper = "stepper",
|
|
27
|
+
subblock = "subblock"
|
|
28
|
+
}
|
|
29
|
+
export declare enum UiSchemaMessageTypes {
|
|
30
|
+
error = "ERROR",
|
|
31
|
+
success = "SUCCESS",
|
|
32
|
+
custom = "CUSTOM"
|
|
19
33
|
}
|
|
20
34
|
export interface IConfigurationSchema extends JSONSchema {
|
|
21
35
|
type?: "object";
|
|
22
36
|
}
|
|
23
37
|
export interface IConfigurationValues {
|
|
24
|
-
[key: string]:
|
|
38
|
+
[key: string]: any;
|
|
25
39
|
}
|
|
26
40
|
export interface IChangeEventDetail {
|
|
27
41
|
valid: boolean;
|
|
@@ -53,7 +67,7 @@ export interface IUiSchemaElement {
|
|
|
53
67
|
tooltip?: string;
|
|
54
68
|
}
|
|
55
69
|
export interface IUiSchema extends IUiSchemaElement {
|
|
56
|
-
elements?:
|
|
70
|
+
elements?: IUiSchemaElement[];
|
|
57
71
|
}
|
|
58
72
|
/**
|
|
59
73
|
* Run-time configuration for UiSchema Elements
|
|
@@ -65,3 +79,29 @@ export interface IUiSchemaComboboxItem {
|
|
|
65
79
|
icon?: string;
|
|
66
80
|
selected?: boolean;
|
|
67
81
|
}
|
|
82
|
+
export interface IUiSchemaRule {
|
|
83
|
+
effect: UiSchemaRuleEffects;
|
|
84
|
+
condition: IUiSchemaCondition;
|
|
85
|
+
}
|
|
86
|
+
export interface IUiSchemaCondition {
|
|
87
|
+
scope?: string;
|
|
88
|
+
schema: IConfigurationSchema;
|
|
89
|
+
}
|
|
90
|
+
export interface IUiSchemaMessage {
|
|
91
|
+
type: UiSchemaMessageTypes;
|
|
92
|
+
keyword?: string;
|
|
93
|
+
label?: string;
|
|
94
|
+
labelKey?: string;
|
|
95
|
+
icon?: boolean | string;
|
|
96
|
+
hidden?: boolean;
|
|
97
|
+
condition?: IUiSchemaCondition;
|
|
98
|
+
allowShowBeforeInteract?: boolean;
|
|
99
|
+
}
|
|
100
|
+
export interface IUiSchemaRule {
|
|
101
|
+
effect: UiSchemaRuleEffects;
|
|
102
|
+
condition: IUiSchemaCondition;
|
|
103
|
+
}
|
|
104
|
+
export interface IUiSchemaCondition {
|
|
105
|
+
scope?: string;
|
|
106
|
+
schema: IConfigurationSchema;
|
|
107
|
+
}
|
|
@@ -6,3 +6,10 @@ import { IHubItemEntity } from "./IHubItemEntity";
|
|
|
6
6
|
*/
|
|
7
7
|
export interface IHubDiscussion extends IHubItemEntity, IWithSlug, IWithPermissions {
|
|
8
8
|
}
|
|
9
|
+
export declare type IHubDiscussionEditor = Omit<IHubDiscussion, "extent"> & {
|
|
10
|
+
/**
|
|
11
|
+
* Thumbnail image. This is only used on the Editor and is
|
|
12
|
+
* persisted in the fromEditor method on the Class
|
|
13
|
+
*/
|
|
14
|
+
_thumbnail?: any;
|
|
15
|
+
};
|
|
@@ -5,3 +5,10 @@ import { IHubItemEntity } from "./IHubItemEntity";
|
|
|
5
5
|
*/
|
|
6
6
|
export interface IHubEditableContent extends IHubItemEntity, IWithSlug, IWithPermissions {
|
|
7
7
|
}
|
|
8
|
+
export declare type IHubContentEditor = Omit<IHubEditableContent, "extent"> & {
|
|
9
|
+
/**
|
|
10
|
+
* Thumbnail image. This is only used on the Editor and is
|
|
11
|
+
* persisted in the fromEditor method on the Class
|
|
12
|
+
*/
|
|
13
|
+
_thumbnail?: any;
|
|
14
|
+
};
|
|
@@ -7,3 +7,10 @@ import { IHubItemEntity } from "./IHubItemEntity";
|
|
|
7
7
|
*/
|
|
8
8
|
export interface IHubInitiative extends IHubItemEntity, IWithSlug, IWithCatalog, IWithMetrics, IWithPermissions {
|
|
9
9
|
}
|
|
10
|
+
export declare type IHubInitiativeEditor = Omit<IHubInitiative, "extent"> & {
|
|
11
|
+
/**
|
|
12
|
+
* Thumbnail image. This is only used on the Editor and is
|
|
13
|
+
* persisted in the fromEditor method on the Class
|
|
14
|
+
*/
|
|
15
|
+
_thumbnail?: any;
|
|
16
|
+
};
|
|
@@ -6,3 +6,10 @@ import { IWithLayout, IWithPermissions, IWithSlug } from "../traits";
|
|
|
6
6
|
*/
|
|
7
7
|
export interface IHubPage extends IHubItemEntity, IWithLayout, IWithPermissions, IWithSlug {
|
|
8
8
|
}
|
|
9
|
+
export declare type IHubPageEditor = Omit<IHubPage, "extent"> & {
|
|
10
|
+
/**
|
|
11
|
+
* Thumbnail image. This is only used on the Editor and is
|
|
12
|
+
* persisted in the fromEditor method on the Class
|
|
13
|
+
*/
|
|
14
|
+
_thumbnail?: any;
|
|
15
|
+
};
|
|
@@ -18,6 +18,11 @@ export declare enum PROJECT_STATUSES {
|
|
|
18
18
|
* that it can be consumed by the entity editor.
|
|
19
19
|
*/
|
|
20
20
|
export declare type IHubProjectEditor = Omit<IHubProject, "extent"> & {
|
|
21
|
+
/**
|
|
22
|
+
* Thumbnail image. This is only used on the Editor and is
|
|
23
|
+
* persisted in the fromEditor method on the Class
|
|
24
|
+
*/
|
|
25
|
+
_thumbnail?: any;
|
|
21
26
|
view: {
|
|
22
27
|
featuredImage?: any;
|
|
23
28
|
};
|
|
@@ -67,3 +67,10 @@ export interface IHubSite extends IHubItemEntity, IWithSlug, IWithCatalog, IWith
|
|
|
67
67
|
*/
|
|
68
68
|
legacyCapabilities: string[];
|
|
69
69
|
}
|
|
70
|
+
export declare type IHubSiteEditor = Omit<IHubSite, "extent"> & {
|
|
71
|
+
/**
|
|
72
|
+
* Thumbnail image. This is only used on the Editor and is
|
|
73
|
+
* persisted in the fromEditor method on the Class
|
|
74
|
+
*/
|
|
75
|
+
_thumbnail?: any;
|
|
76
|
+
};
|
|
@@ -8,7 +8,7 @@ export declare type SystemStatus = "online" | "offline" | "maintenance" | "not-a
|
|
|
8
8
|
export declare type HubSystemStatus = {
|
|
9
9
|
[key in HubSubsystem]: SystemStatus;
|
|
10
10
|
};
|
|
11
|
-
declare const validSubsystems: readonly ["content", "discussions", "events", "initiatives", "items", "metrics", "notifications", "pages", "projects", "search", "sites", "groups"];
|
|
11
|
+
declare const validSubsystems: readonly ["content", "discussions", "events", "initiatives", "items", "metrics", "notifications", "pages", "projects", "search", "sites", "groups", "platform"];
|
|
12
12
|
/**
|
|
13
13
|
* Defines values for HubSubsystem
|
|
14
14
|
*/
|
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
import { IWithSharingBehavior, IWithStoreBehavior } from "../core/behaviors";
|
|
2
2
|
import { IArcGISContext } from "../ArcGISContext";
|
|
3
|
-
import { IHubDiscussion } from "../core/types";
|
|
3
|
+
import { IEntityEditorContext, IHubDiscussion, IHubDiscussionEditor } from "../core/types";
|
|
4
4
|
import { HubItemEntity } from "../core/HubItemEntity";
|
|
5
|
+
import { EditorType } from "../core/schemas/types";
|
|
6
|
+
import { IEditorConfig, IWithEditorBehavior } from "../core/behaviors/IWithEditorBehavior";
|
|
5
7
|
/**
|
|
6
8
|
* Hub Discussion Class
|
|
7
9
|
*/
|
|
8
|
-
export declare class HubDiscussion extends HubItemEntity<IHubDiscussion> implements IWithStoreBehavior<IHubDiscussion>, IWithSharingBehavior {
|
|
10
|
+
export declare class HubDiscussion extends HubItemEntity<IHubDiscussion> implements IWithStoreBehavior<IHubDiscussion>, IWithSharingBehavior, IWithEditorBehavior {
|
|
9
11
|
/**
|
|
10
12
|
* Create an instance from an IHubDiscussion object
|
|
11
13
|
* @param json JSON object to create a HubDiscussion from
|
|
@@ -41,4 +43,17 @@ export declare class HubDiscussion extends HubItemEntity<IHubDiscussion> impleme
|
|
|
41
43
|
* @returns a promise
|
|
42
44
|
*/
|
|
43
45
|
delete(): Promise<void>;
|
|
46
|
+
getEditorConfig(i18nScope: string, type: EditorType): Promise<IEditorConfig>;
|
|
47
|
+
/**
|
|
48
|
+
* Return the project as an editor object
|
|
49
|
+
* @param editorContext
|
|
50
|
+
* @returns
|
|
51
|
+
*/
|
|
52
|
+
toEditor(editorContext?: IEntityEditorContext): IHubDiscussionEditor;
|
|
53
|
+
/**
|
|
54
|
+
* Load the project from the editor object
|
|
55
|
+
* @param editor
|
|
56
|
+
* @returns
|
|
57
|
+
*/
|
|
58
|
+
fromEditor(editor: IHubDiscussionEditor): Promise<IHubDiscussion>;
|
|
44
59
|
}
|
|
@@ -1,14 +1,16 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { EditorType } from "../core/schemas/types";
|
|
2
|
+
import { IEntityEditorContext } from "../core/types/HubEntityEditor";
|
|
2
3
|
import { Catalog } from "../search";
|
|
3
4
|
import { IArcGISContext } from "../ArcGISContext";
|
|
4
5
|
import { HubItemEntity } from "../core/HubItemEntity";
|
|
5
6
|
import { InitiativeEditorType } from "./_internal/InitiativeSchema";
|
|
6
7
|
import { IWithMetricsBehavior } from "../core/behaviors/IWithMetricsBehavior";
|
|
7
8
|
import { IConvertToCardModelOpts, IHubCardViewModel } from "../core/types/IHubCardViewModel";
|
|
9
|
+
import { IHubInitiative, IWithCatalogBehavior, IWithStoreBehavior, IWithSharingBehavior, UiSchemaElementOptions, IEditorConfig, IResolvedMetric, IWithCardBehavior, IWithEditorBehavior, IHubInitiativeEditor } from "../core";
|
|
8
10
|
/**
|
|
9
11
|
* Hub Initiative Class
|
|
10
12
|
*/
|
|
11
|
-
export declare class HubInitiative extends HubItemEntity<IHubInitiative> implements IWithStoreBehavior<IHubInitiative>, IWithCatalogBehavior, IWithMetricsBehavior, IWithSharingBehavior, IWithCardBehavior {
|
|
13
|
+
export declare class HubInitiative extends HubItemEntity<IHubInitiative> implements IWithStoreBehavior<IHubInitiative>, IWithCatalogBehavior, IWithMetricsBehavior, IWithSharingBehavior, IWithCardBehavior, IWithEditorBehavior {
|
|
12
14
|
private _catalog;
|
|
13
15
|
/**
|
|
14
16
|
* Private constructor so we don't have `new` all over the place. Allows for
|
|
@@ -85,4 +87,17 @@ export declare class HubInitiative extends HubItemEntity<IHubInitiative> impleme
|
|
|
85
87
|
* @param opts view model options
|
|
86
88
|
*/
|
|
87
89
|
convertToCardModel(opts?: IConvertToCardModelOpts): IHubCardViewModel;
|
|
90
|
+
getEditorConfig(i18nScope: string, type: EditorType): Promise<IEditorConfig>;
|
|
91
|
+
/**
|
|
92
|
+
* Return the project as an editor object
|
|
93
|
+
* @param editorContext
|
|
94
|
+
* @returns
|
|
95
|
+
*/
|
|
96
|
+
toEditor(editorContext?: IEntityEditorContext): IHubInitiativeEditor;
|
|
97
|
+
/**
|
|
98
|
+
* Load the project from the editor object
|
|
99
|
+
* @param editor
|
|
100
|
+
* @returns
|
|
101
|
+
*/
|
|
102
|
+
fromEditor(editor: IHubInitiativeEditor): Promise<IHubInitiative>;
|
|
88
103
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { IConfigurationSchema } from "../../core";
|
|
2
2
|
export declare type InitiativeEditorType = (typeof InitiativeEditorTypes)[number];
|
|
3
|
-
export declare const InitiativeEditorTypes: readonly ["hub:initiative:edit"];
|
|
3
|
+
export declare const InitiativeEditorTypes: readonly ["hub:initiative:edit", "hub:initiative:create"];
|
|
4
4
|
/**
|
|
5
5
|
* defines the JSON schema for a Hub Initiative's editable fields
|
|
6
6
|
*/
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { IUserRequestOptions } from "@esri/arcgis-rest-auth";
|
|
2
|
+
/**
|
|
3
|
+
* Delete an item's thumbnail
|
|
4
|
+
* @param id
|
|
5
|
+
* @param owner
|
|
6
|
+
* @param requestOptions
|
|
7
|
+
* @returns
|
|
8
|
+
*/
|
|
9
|
+
export declare function deleteItemThumbnail(id: string, owner: string, requestOptions: IUserRequestOptions): Promise<any>;
|
|
@@ -1,13 +1,14 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { EditorType } from "../core/schemas/types";
|
|
2
|
+
import { IHubPage, IWithStoreBehavior, IWithSharingBehavior, UiSchemaElementOptions, IHubPageEditor, IEntityEditorContext } from "../core";
|
|
2
3
|
import { IArcGISContext } from "../ArcGISContext";
|
|
3
4
|
import { HubItemEntity } from "../core/HubItemEntity";
|
|
4
|
-
import { IEditorConfig } from "../core/behaviors/IWithEditorBehavior";
|
|
5
|
+
import { IEditorConfig, IWithEditorBehavior } from "../core/behaviors/IWithEditorBehavior";
|
|
5
6
|
import { PageEditorType } from "./_internal/PageSchema";
|
|
6
7
|
/**
|
|
7
8
|
* Hub Page Class
|
|
8
9
|
* NOTE: This is a minimal implementation.
|
|
9
10
|
*/
|
|
10
|
-
export declare class HubPage extends HubItemEntity<IHubPage> implements IWithStoreBehavior<IHubPage>, IWithSharingBehavior {
|
|
11
|
+
export declare class HubPage extends HubItemEntity<IHubPage> implements IWithStoreBehavior<IHubPage>, IWithSharingBehavior, IWithEditorBehavior {
|
|
11
12
|
/**
|
|
12
13
|
* Private constructor so we don't have `new` all over the place. Allows for
|
|
13
14
|
* more flexibility in how we create the HubPageManager over time.
|
|
@@ -56,4 +57,17 @@ export declare class HubPage extends HubItemEntity<IHubPage> implements IWithSto
|
|
|
56
57
|
* @returns
|
|
57
58
|
*/
|
|
58
59
|
delete(): Promise<void>;
|
|
60
|
+
getEditorConfig(i18nScope: string, type: EditorType): Promise<IEditorConfig>;
|
|
61
|
+
/**
|
|
62
|
+
* Return the project as an editor object
|
|
63
|
+
* @param editorContext
|
|
64
|
+
* @returns
|
|
65
|
+
*/
|
|
66
|
+
toEditor(editorContext?: IEntityEditorContext): IHubPageEditor;
|
|
67
|
+
/**
|
|
68
|
+
* Load the project from the editor object
|
|
69
|
+
* @param editor
|
|
70
|
+
* @returns
|
|
71
|
+
*/
|
|
72
|
+
fromEditor(editor: IHubPageEditor): Promise<IHubPage>;
|
|
59
73
|
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { IPermissionPolicy } from "./types/IPermissionPolicy";
|
|
2
|
+
/**
|
|
3
|
+
* All the permission policies for the Hub
|
|
4
|
+
*/
|
|
5
|
+
export declare const PlatformPermissions: string[];
|
|
6
|
+
/**
|
|
7
|
+
* Platform Permission policies which delegate to Platform Privileges
|
|
8
|
+
*/
|
|
9
|
+
export declare const PlatformPermissionPolicies: IPermissionPolicy[];
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* It's critical that the arrays defined in the modules use `as const`
|
|
4
4
|
* otherwise Permission devolves into just a string type
|
|
5
5
|
*/
|
|
6
|
-
declare const validPermissions: readonly ["hub:site:create", "hub:site:delete", "hub:site:edit", "hub:site:view", "hub:project:create", "hub:project:delete", "hub:project:edit", "hub:project:view", "hub:project:owner", "hub:
|
|
6
|
+
declare const validPermissions: readonly ["hub:site:create", "hub:site:delete", "hub:site:edit", "hub:site:view", "hub:project:create", "hub:project:delete", "hub:project:edit", "hub:project:view", "hub:project:owner", "hub:initiative:create", "hub:initiative:delete", "hub:initiative:edit", "hub:initiative:view", "hub:discussion:create", "hub:discussion:delete", "hub:discussion:edit", "hub:discussion:view", "hub:content:create", "hub:content:edit", "hub:content:view", "hub:group:create", "hub:group:delete", "hub:group:edit", "hub:group:view", "hub:group:owner", "hub:page:create", "hub:page:delete", "hub:page:edit", "hub:page:view", ...string[]];
|
|
7
7
|
/**
|
|
8
8
|
* Defines the possible values for Permissions
|
|
9
9
|
*/
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
* Type that defines Platform Privileges
|
|
3
3
|
* TODO: Ensure this is a complete list
|
|
4
4
|
*/
|
|
5
|
-
export declare type PlatformPrivilege = "opendata:user:designateGroup" | "opendata:user:openDataAdmin" | "portal:admin:assignToGroups" | "portal:admin:categorizeItems" | "portal:admin:changeUserRoles" | "portal:admin:createGPWebhook" | "portal:admin:createUpdateCapableGroup" | "portal:admin:deleteGroups" | "portal:admin:deleteItems" | "portal:admin:deleteUsers" | "portal:admin:disableUsers" | "portal:admin:inviteUsers" | "portal:admin:manageCollaborations" | "portal:admin:manageCredits" | "portal:admin:manageEnterpriseGroups" | "portal:admin:manageLicenses" | "portal:admin:manageRoles" | "portal:admin:manageSecurity" | "portal:admin:manageServers" | "portal:admin:manageUtilityServices" | "portal:admin:manageWebhooks" | "portal:admin:manageWebsite" | "portal:admin:reassignGroups" | "portal:admin:reassignItems" | "portal:admin:reassignUsers" | "portal:admin:shareToGroup" | "portal:admin:shareToOrg" | "portal:admin:shareToPublic" | "portal:admin:updateGroups" | "portal:admin:updateItemCategorySchema" | "portal:admin:updateItems" | "portal:admin:updateMemberCategorySchema" | "portal:admin:updateUsers" | "portal:admin:viewGroups" | "portal:admin:viewItems" | "portal:admin:viewUsers" | "portal:publisher:bulkPublishFromDataStores" | "portal:publisher:createFeatureWebhook" | "portal:publisher:publishBigDataAnalytics" | "portal:publisher:publishDynamicImagery" | "portal:publisher:publishFeatures" | "portal:publisher:publishFeeds" | "portal:publisher:publishKnowledgeGraph" | "portal:publisher:publishRealTimeAnalytics" | "portal:publisher:publishScenes" | "portal:publisher:publishServerGPServices" | "portal:publisher:publishServerServices" | "portal:publisher:publishTiledImagery" | "portal:publisher:publishTiles" | "portal:publisher:registerDataStores" | "portal:user:addExternalMembersToGroup" | "portal:user:categorizeItems" | "portal:user:createGroup" | "portal:user:createItem" | "portal:user:invitePartneredCollaborationMembers" | "portal:user:joinGroup" | "portal:user:joinNonOrgGroup" | "portal:user:reassignItems" | "portal:user:receiveItems" | "portal:user:runWebTool" | "portal:user:shareGroupToOrg" | "portal:user:shareGroupToPublic" | "portal:user:shareToGroup" | "portal:user:shareToOrg" | "portal:user:shareToPublic" | "portal:user:viewHostedFeatureServices" | "portal:user:viewHostedTileServices" | "portal:user:viewOrgGroups" | "portal:user:viewOrgItems" | "portal:user:viewOrgUsers" | "portal:user:viewTracks";
|
|
5
|
+
export declare type PlatformPrivilege = "features:user:edit" | "features:user:fullEdit" | "features:user:manageVersions" | "marketplace:admin:manage" | "marketplace:admin:purchase" | "marketplace:admin:startTrial" | "opendata:user:designateGroup" | "opendata:user:openDataAdmin" | "portal:admin:assignToGroups" | "portal:admin:categorizeItems" | "portal:admin:changeUserRoles" | "portal:admin:createGPWebhook" | "portal:admin:createUpdateCapableGroup" | "portal:admin:deleteGroups" | "portal:admin:deleteItems" | "portal:admin:deleteUsers" | "portal:admin:disableUsers" | "portal:admin:inviteUsers" | "portal:admin:manageCollaborations" | "portal:admin:manageCredits" | "portal:admin:manageEnterpriseGroups" | "portal:admin:manageLicenses" | "portal:admin:manageRoles" | "portal:admin:manageSecurity" | "portal:admin:manageServers" | "portal:admin:manageUtilityServices" | "portal:admin:manageWebhooks" | "portal:admin:manageWebsite" | "portal:admin:reassignGroups" | "portal:admin:reassignItems" | "portal:admin:reassignUsers" | "portal:admin:shareToGroup" | "portal:admin:shareToOrg" | "portal:admin:shareToPublic" | "portal:admin:updateGroups" | "portal:admin:updateItemCategorySchema" | "portal:admin:updateItems" | "portal:admin:updateMemberCategorySchema" | "portal:admin:updateUsers" | "portal:admin:viewGroups" | "portal:admin:viewItems" | "portal:admin:viewUsers" | "portal:publisher:bulkPublishFromDataStores" | "portal:publisher:createDataPipelines" | "portal:publisher:createFeatureWebhook" | "portal:publisher:publishBigDataAnalytics" | "portal:publisher:publishDynamicImagery" | "portal:publisher:publishFeatures" | "portal:publisher:publishFeeds" | "portal:publisher:publishKnowledgeGraph" | "portal:publisher:publishRealTimeAnalytics" | "portal:publisher:publishScenes" | "portal:publisher:publishServerGPServices" | "portal:publisher:publishServerServices" | "portal:publisher:publishTiledImagery" | "portal:publisher:publishTiles" | "portal:publisher:registerDataStores" | "portal:user:addExternalMembersToGroup" | "portal:user:categorizeItems" | "portal:user:createGroup" | "portal:user:createItem" | "portal:user:invitePartneredCollaborationMembers" | "portal:user:joinGroup" | "portal:user:joinNonOrgGroup" | "portal:user:reassignItems" | "portal:user:receiveItems" | "portal:user:runWebTool" | "portal:user:shareGroupToOrg" | "portal:user:shareGroupToPublic" | "portal:user:shareToGroup" | "portal:user:shareToOrg" | "portal:user:shareToPublic" | "portal:user:viewHostedFeatureServices" | "portal:user:viewHostedTileServices" | "portal:user:viewOrgGroups" | "portal:user:viewOrgItems" | "portal:user:viewOrgUsers" | "portal:user:viewTracks" | "premium:publisher:createAdvancedNotebooks" | "premium:publisher:createNotebooks" | "premium:publisher:geoanalytics" | "premium:publisher:rasteranalysis" | "premium:publisher:scheduleNotebooks" | "premium:user:demographics" | "premium:user:elevation" | "premium:user:featurereport" | "premium:user:geocode:stored" | "premium:user:geocode:temporary" | "premium:user:geocode" | "premium:user:geoenrichment" | "premium:user:networkanalysis:closestfacility" | "premium:user:networkanalysis:locationallocation" | "premium:user:networkanalysis:optimizedrouting" | "premium:user:networkanalysis:origindestinationcostmatrix" | "premium:user:networkanalysis:routing" | "premium:user:networkanalysis:servicearea" | "premium:user:networkanalysis:vehiclerouting" | "premium:user:networkanalysis" | "premium:user:places" | "premium:user:spatialanalysis";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { IHubProject, IWithCatalogBehavior, IWithStoreBehavior, IWithSharingBehavior, IResolvedMetric, IWithCardBehavior, IHubProjectEditor, IEntityEditorContext } from "../core";
|
|
2
|
-
import { EditorType } from "../core/schemas/
|
|
2
|
+
import { EditorType } from "../core/schemas/types";
|
|
3
3
|
import { Catalog } from "../search";
|
|
4
4
|
import { IArcGISContext } from "../ArcGISContext";
|
|
5
5
|
import { HubItemEntity } from "../core/HubItemEntity";
|
|
@@ -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"];
|
|
23
23
|
/**
|
|
24
24
|
* Project permission policies
|
|
25
25
|
* @private
|
|
@@ -2,13 +2,17 @@ import { IHubSite, IWithPermissionBehavior, IWithCatalogBehavior, IWithStoreBeha
|
|
|
2
2
|
import { Catalog } from "../search";
|
|
3
3
|
import { IArcGISContext } from "../ArcGISContext";
|
|
4
4
|
import { HubItemEntity } from "../core/HubItemEntity";
|
|
5
|
+
import { EditorType } from "../core/schemas/types";
|
|
6
|
+
import { IEditorConfig, IWithEditorBehavior } from "../core/behaviors/IWithEditorBehavior";
|
|
7
|
+
import { IEntityEditorContext } from "../core/types/HubEntityEditor";
|
|
5
8
|
import { IContainsResponse, IDeepCatalogInfo } from "../search";
|
|
6
9
|
import { ICreateVersionOptions, IVersion, IVersionMetadata } from "../versioning";
|
|
10
|
+
import { IHubSiteEditor } from "../index";
|
|
7
11
|
/**
|
|
8
12
|
* Hub Site Class
|
|
9
13
|
* NOTE: This is a minimal implementation. Create operations are not supported at this time
|
|
10
14
|
*/
|
|
11
|
-
export declare class HubSite extends HubItemEntity<IHubSite> implements IWithStoreBehavior<IHubSite>, IWithPermissionBehavior, IWithCatalogBehavior, IWithSharingBehavior, IWithVersioningBehavior {
|
|
15
|
+
export declare class HubSite extends HubItemEntity<IHubSite> implements IWithStoreBehavior<IHubSite>, IWithPermissionBehavior, IWithCatalogBehavior, IWithSharingBehavior, IWithVersioningBehavior, IWithEditorBehavior {
|
|
12
16
|
private _catalog;
|
|
13
17
|
private _catalogCache;
|
|
14
18
|
/**
|
|
@@ -131,4 +135,17 @@ export declare class HubSite extends HubItemEntity<IHubSite> implements IWithSto
|
|
|
131
135
|
deleteVersion(versionId: string): Promise<{
|
|
132
136
|
success: boolean;
|
|
133
137
|
}>;
|
|
138
|
+
getEditorConfig(i18nScope: string, type: EditorType): Promise<IEditorConfig>;
|
|
139
|
+
/**
|
|
140
|
+
* Return the project as an editor object
|
|
141
|
+
* @param editorContext
|
|
142
|
+
* @returns
|
|
143
|
+
*/
|
|
144
|
+
toEditor(editorContext?: IEntityEditorContext): IHubSiteEditor;
|
|
145
|
+
/**
|
|
146
|
+
* Load the project from the editor object
|
|
147
|
+
* @param editor
|
|
148
|
+
* @returns
|
|
149
|
+
*/
|
|
150
|
+
fromEditor(editor: IHubSiteEditor): Promise<IHubSite>;
|
|
134
151
|
}
|
package/package.json
CHANGED
|
@@ -1,63 +0,0 @@
|
|
|
1
|
-
import { getCategoryItems } from "../../core/schemas/internal/getCategoryItems";
|
|
2
|
-
import { getFeaturedContentCatalogs } from "../../core/schemas/internal/getFeaturedContentCatalogs";
|
|
3
|
-
import { getFeaturedImageUrl } from "../../core/schemas/internal/getFeaturedImageUrl";
|
|
4
|
-
import { getLocationExtent } from "../../core/schemas/internal/getLocationExtent";
|
|
5
|
-
import { getLocationOptions } from "../../core/schemas/internal/getLocationOptions";
|
|
6
|
-
import { getTagItems } from "../../core/schemas/internal/getTagItems";
|
|
7
|
-
import { getSharableGroupsComboBoxItems } from "../../core/schemas/internal/getSharableGroupsComboBoxItems";
|
|
8
|
-
import { checkPermission } from "../../permissions/checkPermission";
|
|
9
|
-
/**
|
|
10
|
-
* Construct the Project Editor configuration options
|
|
11
|
-
* @param entity
|
|
12
|
-
* @param context
|
|
13
|
-
* @returns
|
|
14
|
-
*/
|
|
15
|
-
export async function getProjectEditorConfigOptions(entity, context) {
|
|
16
|
-
var _a;
|
|
17
|
-
const canShare = checkPermission("hub:project:share", context);
|
|
18
|
-
return [
|
|
19
|
-
{
|
|
20
|
-
scope: "/properties/access",
|
|
21
|
-
options: {
|
|
22
|
-
orgName: context.portal.name,
|
|
23
|
-
},
|
|
24
|
-
},
|
|
25
|
-
{
|
|
26
|
-
scope: "/properties/location",
|
|
27
|
-
options: {
|
|
28
|
-
extent: await getLocationExtent(entity, context.hubRequestOptions),
|
|
29
|
-
options: await getLocationOptions(entity, context.portal.name, context.hubRequestOptions),
|
|
30
|
-
},
|
|
31
|
-
},
|
|
32
|
-
{
|
|
33
|
-
scope: "/properties/tags",
|
|
34
|
-
options: {
|
|
35
|
-
items: await getTagItems(entity, context.portal.id, context.hubRequestOptions),
|
|
36
|
-
},
|
|
37
|
-
},
|
|
38
|
-
{
|
|
39
|
-
scope: "/properties/categories",
|
|
40
|
-
options: {
|
|
41
|
-
items: await getCategoryItems(context.portal.id, context.hubRequestOptions),
|
|
42
|
-
},
|
|
43
|
-
},
|
|
44
|
-
{
|
|
45
|
-
scope: "/properties/view/properties/featuredImage",
|
|
46
|
-
options: {
|
|
47
|
-
imgSrc: ((_a = entity.view) === null || _a === void 0 ? void 0 : _a.featuredImageUrl) && getFeaturedImageUrl(entity, context),
|
|
48
|
-
},
|
|
49
|
-
},
|
|
50
|
-
{
|
|
51
|
-
scope: "/properties/view/properties/featuredContentIds",
|
|
52
|
-
options: getFeaturedContentCatalogs(context.currentUser),
|
|
53
|
-
},
|
|
54
|
-
{
|
|
55
|
-
scope: "/properties/_groups",
|
|
56
|
-
options: {
|
|
57
|
-
items: getSharableGroupsComboBoxItems(context.currentUser.groups),
|
|
58
|
-
disabled: !canShare,
|
|
59
|
-
},
|
|
60
|
-
},
|
|
61
|
-
];
|
|
62
|
-
}
|
|
63
|
-
//# sourceMappingURL=getProjectEditorConfigOptions.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"getProjectEditorConfigOptions.js","sourceRoot":"","sources":["../../../../src/projects/_internal/getProjectEditorConfigOptions.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,gBAAgB,EAAE,MAAM,8CAA8C,CAAC;AAChF,OAAO,EAAE,0BAA0B,EAAE,MAAM,wDAAwD,CAAC;AACpG,OAAO,EAAE,mBAAmB,EAAE,MAAM,iDAAiD,CAAC;AACtF,OAAO,EAAE,iBAAiB,EAAE,MAAM,+CAA+C,CAAC;AAClF,OAAO,EAAE,kBAAkB,EAAE,MAAM,gDAAgD,CAAC;AACpF,OAAO,EAAE,WAAW,EAAE,MAAM,yCAAyC,CAAC;AACtE,OAAO,EAAE,8BAA8B,EAAE,MAAM,4DAA4D,CAAC;AAG5G,OAAO,EAAE,eAAe,EAAE,MAAM,mCAAmC,CAAC;AAEpE;;;;;GAKG;AACH,MAAM,CAAC,KAAK,UAAU,6BAA6B,CACjD,MAAmB,EACnB,OAAuB;;IAEvB,MAAM,QAAQ,GAAG,eAAe,CAAC,mBAAmB,EAAE,OAAO,CAAC,CAAC;IAE/D,OAAO;QACL;YACE,KAAK,EAAE,oBAAoB;YAC3B,OAAO,EAAE;gBACP,OAAO,EAAE,OAAO,CAAC,MAAM,CAAC,IAAI;aAC7B;SACF;QACD;YACE,KAAK,EAAE,sBAAsB;YAC7B,OAAO,EAAE;gBACP,MAAM,EAAE,MAAM,iBAAiB,CAAC,MAAM,EAAE,OAAO,CAAC,iBAAiB,CAAC;gBAClE,OAAO,EAAE,MAAM,kBAAkB,CAC/B,MAAM,EACN,OAAO,CAAC,MAAM,CAAC,IAAI,EACnB,OAAO,CAAC,iBAAiB,CAC1B;aACF;SACF;QACD;YACE,KAAK,EAAE,kBAAkB;YACzB,OAAO,EAAE;gBACP,KAAK,EAAE,MAAM,WAAW,CACtB,MAAM,EACN,OAAO,CAAC,MAAM,CAAC,EAAE,EACjB,OAAO,CAAC,iBAAiB,CAC1B;aACF;SACF;QACD;YACE,KAAK,EAAE,wBAAwB;YAC/B,OAAO,EAAE;gBACP,KAAK,EAAE,MAAM,gBAAgB,CAC3B,OAAO,CAAC,MAAM,CAAC,EAAE,EACjB,OAAO,CAAC,iBAAiB,CAC1B;aACF;SACF;QACD;YACE,KAAK,EAAE,2CAA2C;YAClD,OAAO,EAAE;gBACP,MAAM,EACJ,OAAA,MAAM,CAAC,IAAI,0CAAE,gBAAgB,KAAI,mBAAmB,CAAC,MAAM,EAAE,OAAO,CAAC;aACxE;SACF;QACD;YACE,KAAK,EAAE,gDAAgD;YACvD,OAAO,EAAE,0BAA0B,CAAC,OAAO,CAAC,WAAW,CAAC;SACzD;QACD;YACE,KAAK,EAAE,qBAAqB;YAC5B,OAAO,EAAE;gBACP,KAAK,EAAE,8BAA8B,CAAC,OAAO,CAAC,WAAW,CAAC,MAAM,CAAC;gBACjE,QAAQ,EAAE,CAAC,QAAQ;aACpB;SACF;KACF,CAAC;AACJ,CAAC"}
|
|
@@ -1,67 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.getProjectEditorConfigOptions = void 0;
|
|
4
|
-
const getCategoryItems_1 = require("../../core/schemas/internal/getCategoryItems");
|
|
5
|
-
const getFeaturedContentCatalogs_1 = require("../../core/schemas/internal/getFeaturedContentCatalogs");
|
|
6
|
-
const getFeaturedImageUrl_1 = require("../../core/schemas/internal/getFeaturedImageUrl");
|
|
7
|
-
const getLocationExtent_1 = require("../../core/schemas/internal/getLocationExtent");
|
|
8
|
-
const getLocationOptions_1 = require("../../core/schemas/internal/getLocationOptions");
|
|
9
|
-
const getTagItems_1 = require("../../core/schemas/internal/getTagItems");
|
|
10
|
-
const getSharableGroupsComboBoxItems_1 = require("../../core/schemas/internal/getSharableGroupsComboBoxItems");
|
|
11
|
-
const checkPermission_1 = require("../../permissions/checkPermission");
|
|
12
|
-
/**
|
|
13
|
-
* Construct the Project Editor configuration options
|
|
14
|
-
* @param entity
|
|
15
|
-
* @param context
|
|
16
|
-
* @returns
|
|
17
|
-
*/
|
|
18
|
-
async function getProjectEditorConfigOptions(entity, context) {
|
|
19
|
-
var _a;
|
|
20
|
-
const canShare = checkPermission_1.checkPermission("hub:project:share", context);
|
|
21
|
-
return [
|
|
22
|
-
{
|
|
23
|
-
scope: "/properties/access",
|
|
24
|
-
options: {
|
|
25
|
-
orgName: context.portal.name,
|
|
26
|
-
},
|
|
27
|
-
},
|
|
28
|
-
{
|
|
29
|
-
scope: "/properties/location",
|
|
30
|
-
options: {
|
|
31
|
-
extent: await getLocationExtent_1.getLocationExtent(entity, context.hubRequestOptions),
|
|
32
|
-
options: await getLocationOptions_1.getLocationOptions(entity, context.portal.name, context.hubRequestOptions),
|
|
33
|
-
},
|
|
34
|
-
},
|
|
35
|
-
{
|
|
36
|
-
scope: "/properties/tags",
|
|
37
|
-
options: {
|
|
38
|
-
items: await getTagItems_1.getTagItems(entity, context.portal.id, context.hubRequestOptions),
|
|
39
|
-
},
|
|
40
|
-
},
|
|
41
|
-
{
|
|
42
|
-
scope: "/properties/categories",
|
|
43
|
-
options: {
|
|
44
|
-
items: await getCategoryItems_1.getCategoryItems(context.portal.id, context.hubRequestOptions),
|
|
45
|
-
},
|
|
46
|
-
},
|
|
47
|
-
{
|
|
48
|
-
scope: "/properties/view/properties/featuredImage",
|
|
49
|
-
options: {
|
|
50
|
-
imgSrc: ((_a = entity.view) === null || _a === void 0 ? void 0 : _a.featuredImageUrl) && getFeaturedImageUrl_1.getFeaturedImageUrl(entity, context),
|
|
51
|
-
},
|
|
52
|
-
},
|
|
53
|
-
{
|
|
54
|
-
scope: "/properties/view/properties/featuredContentIds",
|
|
55
|
-
options: getFeaturedContentCatalogs_1.getFeaturedContentCatalogs(context.currentUser),
|
|
56
|
-
},
|
|
57
|
-
{
|
|
58
|
-
scope: "/properties/_groups",
|
|
59
|
-
options: {
|
|
60
|
-
items: getSharableGroupsComboBoxItems_1.getSharableGroupsComboBoxItems(context.currentUser.groups),
|
|
61
|
-
disabled: !canShare,
|
|
62
|
-
},
|
|
63
|
-
},
|
|
64
|
-
];
|
|
65
|
-
}
|
|
66
|
-
exports.getProjectEditorConfigOptions = getProjectEditorConfigOptions;
|
|
67
|
-
//# sourceMappingURL=getProjectEditorConfigOptions.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"getProjectEditorConfigOptions.js","sourceRoot":"","sources":["../../../../src/projects/_internal/getProjectEditorConfigOptions.ts"],"names":[],"mappings":";;;AAEA,mFAAgF;AAChF,uGAAoG;AACpG,yFAAsF;AACtF,qFAAkF;AAClF,uFAAoF;AACpF,yEAAsE;AACtE,+GAA4G;AAG5G,uEAAoE;AAEpE;;;;;GAKG;AACI,KAAK,UAAU,6BAA6B,CACjD,MAAmB,EACnB,OAAuB;;IAEvB,MAAM,QAAQ,GAAG,iCAAe,CAAC,mBAAmB,EAAE,OAAO,CAAC,CAAC;IAE/D,OAAO;QACL;YACE,KAAK,EAAE,oBAAoB;YAC3B,OAAO,EAAE;gBACP,OAAO,EAAE,OAAO,CAAC,MAAM,CAAC,IAAI;aAC7B;SACF;QACD;YACE,KAAK,EAAE,sBAAsB;YAC7B,OAAO,EAAE;gBACP,MAAM,EAAE,MAAM,qCAAiB,CAAC,MAAM,EAAE,OAAO,CAAC,iBAAiB,CAAC;gBAClE,OAAO,EAAE,MAAM,uCAAkB,CAC/B,MAAM,EACN,OAAO,CAAC,MAAM,CAAC,IAAI,EACnB,OAAO,CAAC,iBAAiB,CAC1B;aACF;SACF;QACD;YACE,KAAK,EAAE,kBAAkB;YACzB,OAAO,EAAE;gBACP,KAAK,EAAE,MAAM,yBAAW,CACtB,MAAM,EACN,OAAO,CAAC,MAAM,CAAC,EAAE,EACjB,OAAO,CAAC,iBAAiB,CAC1B;aACF;SACF;QACD;YACE,KAAK,EAAE,wBAAwB;YAC/B,OAAO,EAAE;gBACP,KAAK,EAAE,MAAM,mCAAgB,CAC3B,OAAO,CAAC,MAAM,CAAC,EAAE,EACjB,OAAO,CAAC,iBAAiB,CAC1B;aACF;SACF;QACD;YACE,KAAK,EAAE,2CAA2C;YAClD,OAAO,EAAE;gBACP,MAAM,EACJ,OAAA,MAAM,CAAC,IAAI,0CAAE,gBAAgB,KAAI,yCAAmB,CAAC,MAAM,EAAE,OAAO,CAAC;aACxE;SACF;QACD;YACE,KAAK,EAAE,gDAAgD;YACvD,OAAO,EAAE,uDAA0B,CAAC,OAAO,CAAC,WAAW,CAAC;SACzD;QACD;YACE,KAAK,EAAE,qBAAqB;YAC5B,OAAO,EAAE;gBACP,KAAK,EAAE,+DAA8B,CAAC,OAAO,CAAC,WAAW,CAAC,MAAM,CAAC;gBACjE,QAAQ,EAAE,CAAC,QAAQ;aACpB;SACF;KACF,CAAC;AACJ,CAAC;AA9DD,sEA8DC"}
|
|
@@ -1,10 +0,0 @@
|
|
|
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[]>;
|