@esri/hub-common 13.37.1 → 13.37.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/esm/content/edit.js +5 -0
- package/dist/esm/content/edit.js.map +1 -1
- package/dist/esm/core/EntityEditor.js +4 -0
- package/dist/esm/core/EntityEditor.js.map +1 -1
- package/dist/esm/core/getTypeFromEntity.js +3 -0
- package/dist/esm/core/getTypeFromEntity.js.map +1 -1
- package/dist/esm/core/schemas/getEntityEditorSchemas.js +7 -0
- package/dist/esm/core/schemas/getEntityEditorSchemas.js.map +1 -1
- package/dist/esm/core/schemas/internal/getEditorConfigOptions.js +6 -0
- package/dist/esm/core/schemas/internal/getEditorConfigOptions.js.map +1 -1
- package/dist/esm/core/schemas/internal/getEntityEditorSchemas.js +7 -0
- package/dist/esm/core/schemas/internal/getEntityEditorSchemas.js.map +1 -1
- package/dist/esm/core/schemas/internal/getLocationOptions.js +45 -1
- package/dist/esm/core/schemas/internal/getLocationOptions.js.map +1 -1
- package/dist/esm/core/schemas/types.js +2 -0
- package/dist/esm/core/schemas/types.js.map +1 -1
- package/dist/esm/groups/HubGroup.js +78 -0
- package/dist/esm/groups/HubGroup.js.map +1 -1
- package/dist/esm/groups/HubGroups.js +2 -36
- package/dist/esm/groups/HubGroups.js.map +1 -1
- package/dist/esm/groups/_internal/GroupSchema.js +17 -0
- package/dist/esm/groups/_internal/GroupSchema.js.map +1 -0
- package/dist/esm/groups/_internal/GroupUiSchemaEdit.js +58 -0
- package/dist/esm/groups/_internal/GroupUiSchemaEdit.js.map +1 -0
- package/dist/esm/groups/_internal/convertGroupToHubGroup.js +14 -0
- package/dist/esm/groups/_internal/convertGroupToHubGroup.js.map +1 -0
- package/dist/esm/groups/_internal/convertHubGroupToGroup.js +26 -0
- package/dist/esm/groups/_internal/convertHubGroupToGroup.js.map +1 -0
- package/dist/esm/groups/deleteGroupThumbnail.js +14 -0
- package/dist/esm/groups/deleteGroupThumbnail.js.map +1 -0
- package/dist/esm/groups/setGroupThumbnail.js +32 -0
- package/dist/esm/groups/setGroupThumbnail.js.map +1 -0
- package/dist/node/content/edit.js +5 -0
- package/dist/node/content/edit.js.map +1 -1
- package/dist/node/core/EntityEditor.js +4 -0
- package/dist/node/core/EntityEditor.js.map +1 -1
- package/dist/node/core/getTypeFromEntity.js +3 -0
- package/dist/node/core/getTypeFromEntity.js.map +1 -1
- package/dist/node/core/schemas/getEntityEditorSchemas.js +7 -0
- package/dist/node/core/schemas/getEntityEditorSchemas.js.map +1 -1
- package/dist/node/core/schemas/internal/getEditorConfigOptions.js +6 -0
- package/dist/node/core/schemas/internal/getEditorConfigOptions.js.map +1 -1
- package/dist/node/core/schemas/internal/getEntityEditorSchemas.js +7 -0
- package/dist/node/core/schemas/internal/getEntityEditorSchemas.js.map +1 -1
- package/dist/node/core/schemas/internal/getLocationOptions.js +48 -2
- package/dist/node/core/schemas/internal/getLocationOptions.js.map +1 -1
- package/dist/node/core/schemas/types.js +2 -0
- package/dist/node/core/schemas/types.js.map +1 -1
- package/dist/node/groups/HubGroup.js +78 -0
- package/dist/node/groups/HubGroup.js.map +1 -1
- package/dist/node/groups/HubGroups.js +6 -40
- package/dist/node/groups/HubGroups.js.map +1 -1
- package/dist/node/groups/_internal/GroupSchema.js +20 -0
- package/dist/node/groups/_internal/GroupSchema.js.map +1 -0
- package/dist/node/groups/_internal/GroupUiSchemaEdit.js +61 -0
- package/dist/node/groups/_internal/GroupUiSchemaEdit.js.map +1 -0
- package/dist/node/groups/_internal/convertGroupToHubGroup.js +18 -0
- package/dist/node/groups/_internal/convertGroupToHubGroup.js.map +1 -0
- package/dist/node/groups/_internal/convertHubGroupToGroup.js +30 -0
- package/dist/node/groups/_internal/convertHubGroupToGroup.js.map +1 -0
- package/dist/node/groups/deleteGroupThumbnail.js +18 -0
- package/dist/node/groups/deleteGroupThumbnail.js.map +1 -0
- package/dist/node/groups/setGroupThumbnail.js +36 -0
- package/dist/node/groups/setGroupThumbnail.js.map +1 -0
- package/dist/types/core/schemas/internal/getLocationOptions.d.ts +2 -0
- package/dist/types/core/schemas/types.d.ts +1 -1
- package/dist/types/core/types/IHubGroup.d.ts +16 -2
- package/dist/types/groups/HubGroup.d.ts +20 -2
- package/dist/types/groups/_internal/GroupSchema.d.ts +7 -0
- package/dist/types/groups/_internal/GroupUiSchemaEdit.d.ts +7 -0
- package/dist/types/groups/_internal/convertGroupToHubGroup.d.ts +9 -0
- package/dist/types/groups/_internal/convertHubGroupToGroup.d.ts +7 -0
- package/dist/types/groups/deleteGroupThumbnail.d.ts +9 -0
- package/dist/types/groups/setGroupThumbnail.d.ts +9 -0
- package/package.json +1 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"GroupUiSchemaEdit.js","sourceRoot":"","sources":["../../../../src/groups/_internal/GroupUiSchemaEdit.ts"],"names":[],"mappings":";;;AAEA;;;;GAIG;AACU,QAAA,QAAQ,GAAc;IACjC,IAAI,EAAE,QAAQ;IACd,QAAQ,EAAE;QACR;YACE,IAAI,EAAE,SAAS;YACf,QAAQ,EAAE,wCAAwC;YAClD,QAAQ,EAAE;gBACR;oBACE,QAAQ,EAAE,iCAAiC;oBAC3C,KAAK,EAAE,kBAAkB;oBACzB,IAAI,EAAE,SAAS;oBACf,OAAO,EAAE;wBACP,QAAQ,EAAE;4BACR;gCACE,IAAI,EAAE,OAAO;gCACb,OAAO,EAAE,UAAU;gCACnB,IAAI,EAAE,IAAI;gCACV,QAAQ,EAAE,yCAAyC;6BACpD;yBACF;qBACF;iBACF;gBACD;oBACE,QAAQ,EAAE,oCAAoC;oBAC9C,KAAK,EAAE,qBAAqB;oBAC5B,IAAI,EAAE,SAAS;oBACf,OAAO,EAAE;wBACP,OAAO,EAAE,uBAAuB;wBAChC,IAAI,EAAE,UAAU;wBAChB,UAAU,EAAE;4BACV,QAAQ,EAAE,yCAAyC;yBACpD;qBACF;iBACF;gBACD;oBACE,QAAQ,EAAE,uCAAuC;oBACjD,KAAK,EAAE,wBAAwB;oBAC/B,IAAI,EAAE,SAAS;oBACf,OAAO,EAAE;wBACP,OAAO,EAAE,8BAA8B;wBACvC,QAAQ,EAAE,GAAG;wBACb,SAAS,EAAE,GAAG;wBACd,WAAW,EAAE,GAAG;wBAChB,UAAU,EAAE;4BACV,QAAQ,EAAE,4CAA4C;yBACvD;qBACF;iBACF;aACF;SACF;KACF;CACF,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.convertGroupToHubGroup = void 0;
|
|
4
|
+
const PropertyMapper_1 = require("../../core/_internal/PropertyMapper");
|
|
5
|
+
const computeProps_1 = require("./computeProps");
|
|
6
|
+
const getPropertyMap_1 = require("./getPropertyMap");
|
|
7
|
+
/**
|
|
8
|
+
* Convert an IGroup to a Hub Group
|
|
9
|
+
* @param group
|
|
10
|
+
* @param requestOptions
|
|
11
|
+
*/
|
|
12
|
+
function convertGroupToHubGroup(group, requestOptions) {
|
|
13
|
+
const mapper = new PropertyMapper_1.PropertyMapper(getPropertyMap_1.getPropertyMap());
|
|
14
|
+
const hubGroup = mapper.storeToEntity(group, {});
|
|
15
|
+
return computeProps_1.computeProps(group, hubGroup, requestOptions);
|
|
16
|
+
}
|
|
17
|
+
exports.convertGroupToHubGroup = convertGroupToHubGroup;
|
|
18
|
+
//# sourceMappingURL=convertGroupToHubGroup.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"convertGroupToHubGroup.js","sourceRoot":"","sources":["../../../../src/groups/_internal/convertGroupToHubGroup.ts"],"names":[],"mappings":";;;AACA,wEAAqE;AAErE,iDAA8C;AAC9C,qDAAkD;AAGlD;;;;GAIG;AAEH,SAAgB,sBAAsB,CACpC,KAAa,EACb,cAAmC;IAEnC,MAAM,MAAM,GAAG,IAAI,+BAAc,CAC/B,+BAAc,EAAE,CACjB,CAAC;IACF,MAAM,QAAQ,GAAG,MAAM,CAAC,aAAa,CAAC,KAAK,EAAE,EAAE,CAAc,CAAC;IAC9D,OAAO,2BAAY,CAAC,KAAK,EAAE,QAAQ,EAAE,cAAc,CAAC,CAAC;AACvD,CAAC;AATD,wDASC"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.convertHubGroupToGroup = void 0;
|
|
4
|
+
const PropertyMapper_1 = require("../../core/_internal/PropertyMapper");
|
|
5
|
+
const getPropertyMap_1 = require("./getPropertyMap");
|
|
6
|
+
/**
|
|
7
|
+
* Convert a Hub Group to an IGroup
|
|
8
|
+
* @param hubGroup
|
|
9
|
+
*/
|
|
10
|
+
function convertHubGroupToGroup(hubGroup) {
|
|
11
|
+
const mapper = new PropertyMapper_1.PropertyMapper(getPropertyMap_1.getPropertyMap());
|
|
12
|
+
const group = mapper.entityToStore(hubGroup, {});
|
|
13
|
+
// convert the values for membershipAccess back to
|
|
14
|
+
// the ones the API accepts
|
|
15
|
+
if (group.membershipAccess === "organization") {
|
|
16
|
+
group.membershipAccess = "org";
|
|
17
|
+
}
|
|
18
|
+
if (group.membershipAccess === "collaborators") {
|
|
19
|
+
group.membershipAccess = "collaboration";
|
|
20
|
+
}
|
|
21
|
+
// since we are setting null to a prop, we need to
|
|
22
|
+
// send clearEmptyFields: true to the updateGroup call
|
|
23
|
+
if (group.membershipAccess === "anyone") {
|
|
24
|
+
group.membershipAccess = null;
|
|
25
|
+
group._clearEmptyFields = true;
|
|
26
|
+
}
|
|
27
|
+
return group;
|
|
28
|
+
}
|
|
29
|
+
exports.convertHubGroupToGroup = convertHubGroupToGroup;
|
|
30
|
+
//# sourceMappingURL=convertHubGroupToGroup.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"convertHubGroupToGroup.js","sourceRoot":"","sources":["../../../../src/groups/_internal/convertHubGroupToGroup.ts"],"names":[],"mappings":";;;AACA,wEAAqE;AAErE,qDAAkD;AAElD;;;GAGG;AAEH,SAAgB,sBAAsB,CAAC,QAAmB;IACxD,MAAM,MAAM,GAAG,IAAI,+BAAc,CAC/B,+BAAc,EAAE,CACjB,CAAC;IACF,MAAM,KAAK,GAAG,MAAM,CAAC,aAAa,CAChC,QAAQ,EACR,EAAuB,CACd,CAAC;IACZ,kDAAkD;IAClD,2BAA2B;IAC3B,IAAI,KAAK,CAAC,gBAAgB,KAAK,cAAc,EAAE;QAC7C,KAAK,CAAC,gBAAgB,GAAG,KAAK,CAAC;KAChC;IACD,IAAI,KAAK,CAAC,gBAAgB,KAAK,eAAe,EAAE;QAC9C,KAAK,CAAC,gBAAgB,GAAG,eAAe,CAAC;KAC1C;IACD,kDAAkD;IAClD,sDAAsD;IACtD,IAAI,KAAK,CAAC,gBAAgB,KAAK,QAAQ,EAAE;QACvC,KAAK,CAAC,gBAAgB,GAAG,IAAI,CAAC;QAC9B,KAAK,CAAC,iBAAiB,GAAG,IAAI,CAAC;KAChC;IACD,OAAO,KAAK,CAAC;AACf,CAAC;AAvBD,wDAuBC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.deleteGroupThumbnail = void 0;
|
|
4
|
+
const arcgis_rest_request_1 = require("@esri/arcgis-rest-request");
|
|
5
|
+
/**
|
|
6
|
+
* Delete a group's thumbnail
|
|
7
|
+
* @param id
|
|
8
|
+
* @param owner
|
|
9
|
+
* @param requestOptions
|
|
10
|
+
* @returns
|
|
11
|
+
*/
|
|
12
|
+
async function deleteGroupThumbnail(id, requestOptions) {
|
|
13
|
+
const { portal } = requestOptions;
|
|
14
|
+
const urlPath = `${portal}/community/groups/${id}/deleteThumbnail`;
|
|
15
|
+
return arcgis_rest_request_1.request(urlPath, requestOptions);
|
|
16
|
+
}
|
|
17
|
+
exports.deleteGroupThumbnail = deleteGroupThumbnail;
|
|
18
|
+
//# sourceMappingURL=deleteGroupThumbnail.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"deleteGroupThumbnail.js","sourceRoot":"","sources":["../../../src/groups/deleteGroupThumbnail.ts"],"names":[],"mappings":";;;AACA,mEAAoD;AAEpD;;;;;;GAMG;AACI,KAAK,UAAU,oBAAoB,CACxC,EAAU,EACV,cAAmC;IAEnC,MAAM,EAAE,MAAM,EAAE,GAAG,cAAc,CAAC;IAClC,MAAM,OAAO,GAAG,GAAG,MAAM,qBAAqB,EAAE,kBAAkB,CAAC;IACnE,OAAO,6BAAO,CAAC,OAAO,EAAE,cAAc,CAAC,CAAC;AAC1C,CAAC;AAPD,oDAOC"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.setGroupThumbnail = void 0;
|
|
4
|
+
const arcgis_rest_portal_1 = require("@esri/arcgis-rest-portal");
|
|
5
|
+
const HubError_1 = require("../HubError");
|
|
6
|
+
/**
|
|
7
|
+
* Upload a file to be used as the thumbnail for a group
|
|
8
|
+
* @param id
|
|
9
|
+
* @param file
|
|
10
|
+
* @param filename
|
|
11
|
+
* @param requestOptions
|
|
12
|
+
*/
|
|
13
|
+
async function setGroupThumbnail(id, file, filename, requestOptions, owner) {
|
|
14
|
+
const opts = Object.assign({ group: {
|
|
15
|
+
id,
|
|
16
|
+
}, owner, params: {
|
|
17
|
+
thumbnail: file,
|
|
18
|
+
fileName: filename,
|
|
19
|
+
}, filename }, requestOptions);
|
|
20
|
+
try {
|
|
21
|
+
const response = await arcgis_rest_portal_1.updateGroup(opts);
|
|
22
|
+
if (!response.success) {
|
|
23
|
+
throw new HubError_1.default("Set Group Thumbnail", "Unknown error setting thumbnail.");
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
catch (err) {
|
|
27
|
+
if (err instanceof Error) {
|
|
28
|
+
throw new HubError_1.default("Set Group Thumbnail", err.message, err);
|
|
29
|
+
}
|
|
30
|
+
else {
|
|
31
|
+
throw new HubError_1.default("Set Group Thumbnail", "Unknown error setting thumbnail.");
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
exports.setGroupThumbnail = setGroupThumbnail;
|
|
36
|
+
//# sourceMappingURL=setGroupThumbnail.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"setGroupThumbnail.js","sourceRoot":"","sources":["../../../src/groups/setGroupThumbnail.ts"],"names":[],"mappings":";;;AACA,iEAAuD;AACvD,0CAAmC;AAEnC;;;;;;GAMG;AACI,KAAK,UAAU,iBAAiB,CACrC,EAAU,EACV,IAAS,EACT,QAAgB,EAChB,cAAmC,EACnC,KAAa;IAEb,MAAM,IAAI,mBACR,KAAK,EAAE;YACL,EAAE;SACH,EACD,KAAK,EACL,MAAM,EAAE;YACN,SAAS,EAAE,IAAI;YACf,QAAQ,EAAE,QAAQ;SACnB,EACD,QAAQ,IACL,cAAc,CAClB,CAAC;IACF,IAAI;QACF,MAAM,QAAQ,GAAG,MAAM,gCAAW,CAAC,IAAI,CAAC,CAAC;QACzC,IAAI,CAAC,QAAQ,CAAC,OAAO,EAAE;YACrB,MAAM,IAAI,kBAAQ,CAChB,qBAAqB,EACrB,kCAAkC,CACnC,CAAC;SACH;KACF;IAAC,OAAO,GAAG,EAAE;QACZ,IAAI,GAAG,YAAY,KAAK,EAAE;YACxB,MAAM,IAAI,kBAAQ,CAAC,qBAAqB,EAAE,GAAG,CAAC,OAAO,EAAE,GAAG,CAAC,CAAC;SAC7D;aAAM;YACL,MAAM,IAAI,kBAAQ,CAChB,qBAAqB,EACrB,kCAAkC,CACnC,CAAC;SACH;KACF;AACH,CAAC;AArCD,8CAqCC"}
|
|
@@ -14,3 +14,5 @@ import { IHubLocationOption } from "../../types/IHubLocation";
|
|
|
14
14
|
* location
|
|
15
15
|
*/
|
|
16
16
|
export declare function getLocationOptions(entity: ConfigurableEntity, portalName: string, hubRequestOptions: IHubRequestOptions): Promise<IHubLocationOption[]>;
|
|
17
|
+
export declare function getContentLocationOptions(entity: ConfigurableEntity): Promise<IHubLocationOption[]>;
|
|
18
|
+
export declare function getDefaultLocationOptions(entity: ConfigurableEntity, portalName: string, hubRequestOptions: IHubRequestOptions): Promise<IHubLocationOption[]>;
|
|
@@ -5,7 +5,7 @@ import Ajv from "ajv";
|
|
|
5
5
|
* to the supported/defined uiSchema configurations
|
|
6
6
|
*/
|
|
7
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"];
|
|
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", "hub:group:edit"];
|
|
9
9
|
export declare enum UiSchemaRuleEffects {
|
|
10
10
|
SHOW = "SHOW",
|
|
11
11
|
HIDE = "HIDE",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { IWithPermissions } from "../traits";
|
|
2
2
|
import { IHubEntityBase } from "./IHubEntityBase";
|
|
3
|
-
import { GroupSortField,
|
|
3
|
+
import { GroupSortField, MemberType, MembershipAccess, PlatformSortOrder, AccessLevel } from "./types";
|
|
4
4
|
/**
|
|
5
5
|
* Defines the properties of a Hub Group object
|
|
6
6
|
* @internal
|
|
@@ -9,8 +9,11 @@ export interface IHubGroup extends IHubEntityBase, IWithPermissions {
|
|
|
9
9
|
/**
|
|
10
10
|
* Access level of the group
|
|
11
11
|
* ("private" | "org" | "public")
|
|
12
|
+
* we are using AccessLevel instead of SettableAccessLevel
|
|
13
|
+
* intentionally due to the Portal API being inconsistent
|
|
14
|
+
* between .access on items vs groups
|
|
12
15
|
*/
|
|
13
|
-
access:
|
|
16
|
+
access: AccessLevel;
|
|
14
17
|
/**
|
|
15
18
|
* Whether members can auto join the group
|
|
16
19
|
*/
|
|
@@ -93,3 +96,14 @@ export interface IHubGroup extends IHubEntityBase, IWithPermissions {
|
|
|
93
96
|
*/
|
|
94
97
|
_clearEmptyFields?: boolean;
|
|
95
98
|
}
|
|
99
|
+
/**
|
|
100
|
+
* This type redefines the IHubGroup interface in such a way
|
|
101
|
+
* that it can be consumed by the entity editor.
|
|
102
|
+
*/
|
|
103
|
+
export declare type IHubGroupEditor = IHubGroup & {
|
|
104
|
+
/**
|
|
105
|
+
* Thumbnail image. This is only used on the Editor and is
|
|
106
|
+
* persisted in the fromEditor method on the Class
|
|
107
|
+
*/
|
|
108
|
+
_thumbnail?: any;
|
|
109
|
+
};
|
|
@@ -1,15 +1,22 @@
|
|
|
1
|
-
import { IHubGroup } from "../core/types/IHubGroup";
|
|
1
|
+
import { IHubGroup, IHubGroupEditor } from "../core/types/IHubGroup";
|
|
2
2
|
import { IEntityPermissionPolicy, IPermissionAccessResponse, Permission } from "../permissions";
|
|
3
3
|
import { IWithStoreBehavior } from "../core/behaviors/IWithStoreBehavior";
|
|
4
4
|
import { IWithPermissionBehavior } from "../core/behaviors/IWithPermissionBehavior";
|
|
5
5
|
import { IArcGISContext } from "../ArcGISContext";
|
|
6
|
+
import { IEditorConfig, IWithEditorBehavior } from "../core/behaviors/IWithEditorBehavior";
|
|
7
|
+
import { EditorType } from "../core/schemas/types";
|
|
6
8
|
/**
|
|
7
9
|
* Hub Group Class
|
|
8
10
|
*/
|
|
9
|
-
export declare class HubGroup implements IWithStoreBehavior<IHubGroup>, IWithPermissionBehavior {
|
|
11
|
+
export declare class HubGroup implements IWithStoreBehavior<IHubGroup>, IWithPermissionBehavior, IWithEditorBehavior {
|
|
10
12
|
protected context: IArcGISContext;
|
|
11
13
|
protected entity: IHubGroup;
|
|
12
14
|
protected isDestroyed: boolean;
|
|
15
|
+
protected thumbnailCache: {
|
|
16
|
+
file?: any;
|
|
17
|
+
filename?: string;
|
|
18
|
+
clear?: boolean;
|
|
19
|
+
};
|
|
13
20
|
private constructor();
|
|
14
21
|
/**
|
|
15
22
|
* Whether the user can edit the group,
|
|
@@ -92,4 +99,15 @@ export declare class HubGroup implements IWithStoreBehavior<IHubGroup>, IWithPer
|
|
|
92
99
|
* @param id
|
|
93
100
|
*/
|
|
94
101
|
removePermissionPolicy(permission: Permission, id: string): void;
|
|
102
|
+
getEditorConfig(i18nScope: string, type: EditorType): Promise<IEditorConfig>;
|
|
103
|
+
/**
|
|
104
|
+
* Return the group as an editor object
|
|
105
|
+
*/
|
|
106
|
+
toEditor(): IHubGroupEditor;
|
|
107
|
+
/**
|
|
108
|
+
* Load the group from the editor object
|
|
109
|
+
* @param editor
|
|
110
|
+
* @returns
|
|
111
|
+
*/
|
|
112
|
+
fromEditor(editor: IHubGroupEditor): Promise<IHubGroup>;
|
|
95
113
|
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { IConfigurationSchema } from "../../core";
|
|
2
|
+
export declare type GroupEditorType = (typeof GroupEditorTypes)[number];
|
|
3
|
+
export declare const GroupEditorTypes: readonly ["hub:group:edit"];
|
|
4
|
+
/**
|
|
5
|
+
* Defines the JSON schema for a Hub Group's editable fields
|
|
6
|
+
*/
|
|
7
|
+
export declare const GroupSchema: IConfigurationSchema;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { IGroup } from "@esri/arcgis-rest-types";
|
|
2
|
+
import { IHubGroup } from "../../core/types/IHubGroup";
|
|
3
|
+
import { IUserRequestOptions } from "@esri/arcgis-rest-auth";
|
|
4
|
+
/**
|
|
5
|
+
* Convert an IGroup to a Hub Group
|
|
6
|
+
* @param group
|
|
7
|
+
* @param requestOptions
|
|
8
|
+
*/
|
|
9
|
+
export declare function convertGroupToHubGroup(group: IGroup, requestOptions: IUserRequestOptions): IHubGroup;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { IUserRequestOptions } from "@esri/arcgis-rest-auth";
|
|
2
|
+
/**
|
|
3
|
+
* Delete a group's thumbnail
|
|
4
|
+
* @param id
|
|
5
|
+
* @param owner
|
|
6
|
+
* @param requestOptions
|
|
7
|
+
* @returns
|
|
8
|
+
*/
|
|
9
|
+
export declare function deleteGroupThumbnail(id: string, requestOptions: IUserRequestOptions): Promise<any>;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { IUserRequestOptions } from "@esri/arcgis-rest-auth";
|
|
2
|
+
/**
|
|
3
|
+
* Upload a file to be used as the thumbnail for a group
|
|
4
|
+
* @param id
|
|
5
|
+
* @param file
|
|
6
|
+
* @param filename
|
|
7
|
+
* @param requestOptions
|
|
8
|
+
*/
|
|
9
|
+
export declare function setGroupThumbnail(id: string, file: any, filename: string, requestOptions: IUserRequestOptions, owner: string): Promise<void>;
|