@esri/hub-common 28.5.0 → 28.7.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/channels/_internal/ChannelUiSchemaCreate.js +33 -52
- package/dist/esm/channels/_internal/ChannelUiSchemaCreate.js.map +1 -1
- package/dist/esm/core/_internal/getBasePropertyMap.js +4 -0
- package/dist/esm/core/_internal/getBasePropertyMap.js.map +1 -1
- package/dist/esm/core/traits/IWithVersions.js +2 -0
- package/dist/esm/core/traits/IWithVersions.js.map +1 -0
- package/dist/esm/index.js +3 -0
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/layouts/fetchHubEntityLayouts.js +30 -0
- package/dist/esm/layouts/fetchHubEntityLayouts.js.map +1 -0
- package/dist/esm/layouts/internal/upsertLayoutAssetResource.js +72 -0
- package/dist/esm/layouts/internal/upsertLayoutAssetResource.js.map +1 -0
- package/dist/esm/layouts/publishHubEntityLayout.js +82 -0
- package/dist/esm/layouts/publishHubEntityLayout.js.map +1 -0
- package/dist/esm/layouts/types.js +1 -1
- package/dist/esm/layouts/types.js.map +1 -1
- package/dist/esm/projects/edit.js +0 -2
- package/dist/esm/projects/edit.js.map +1 -1
- package/dist/esm/resources/addHubEntityResource.js +36 -0
- package/dist/esm/resources/addHubEntityResource.js.map +1 -0
- package/dist/esm/resources/addResource.js +37 -0
- package/dist/esm/resources/addResource.js.map +1 -0
- package/dist/esm/resources/fetchHubEntityResource.js +37 -0
- package/dist/esm/resources/fetchHubEntityResource.js.map +1 -0
- package/dist/esm/resources/fetchHubEntityResources.js +37 -0
- package/dist/esm/resources/fetchHubEntityResources.js.map +1 -0
- package/dist/esm/resources/removeHubEntityResource.js +33 -0
- package/dist/esm/resources/removeHubEntityResource.js.map +1 -0
- package/dist/esm/resources/upsertHubEntityResource.js +34 -0
- package/dist/esm/resources/upsertHubEntityResource.js.map +1 -0
- package/dist/esm/sites/_internal/SiteUiSchemaAssistant.js +8 -45
- package/dist/esm/sites/_internal/SiteUiSchemaAssistant.js.map +1 -1
- package/dist/node/channels/_internal/ChannelUiSchemaCreate.js +33 -52
- package/dist/node/channels/_internal/ChannelUiSchemaCreate.js.map +1 -1
- package/dist/node/core/_internal/getBasePropertyMap.js +4 -0
- package/dist/node/core/_internal/getBasePropertyMap.js.map +1 -1
- package/dist/node/core/traits/IWithVersions.js +3 -0
- package/dist/node/core/traits/IWithVersions.js.map +1 -0
- package/dist/node/index.js +7 -1
- package/dist/node/index.js.map +1 -1
- package/dist/node/layouts/fetchHubEntityLayouts.js +33 -0
- package/dist/node/layouts/fetchHubEntityLayouts.js.map +1 -0
- package/dist/node/layouts/internal/upsertLayoutAssetResource.js +75 -0
- package/dist/node/layouts/internal/upsertLayoutAssetResource.js.map +1 -0
- package/dist/node/layouts/publishHubEntityLayout.js +85 -0
- package/dist/node/layouts/publishHubEntityLayout.js.map +1 -0
- package/dist/node/layouts/types.js +2 -0
- package/dist/node/layouts/types.js.map +1 -1
- package/dist/node/projects/edit.js +0 -2
- package/dist/node/projects/edit.js.map +1 -1
- package/dist/node/resources/addHubEntityResource.js +39 -0
- package/dist/node/resources/addHubEntityResource.js.map +1 -0
- package/dist/node/resources/addResource.js +40 -0
- package/dist/node/resources/addResource.js.map +1 -0
- package/dist/node/resources/fetchHubEntityResource.js +40 -0
- package/dist/node/resources/fetchHubEntityResource.js.map +1 -0
- package/dist/node/resources/fetchHubEntityResources.js +40 -0
- package/dist/node/resources/fetchHubEntityResources.js.map +1 -0
- package/dist/node/resources/removeHubEntityResource.js +36 -0
- package/dist/node/resources/removeHubEntityResource.js.map +1 -0
- package/dist/node/resources/upsertHubEntityResource.js +37 -0
- package/dist/node/resources/upsertHubEntityResource.js.map +1 -0
- package/dist/node/sites/_internal/SiteUiSchemaAssistant.js +8 -45
- package/dist/node/sites/_internal/SiteUiSchemaAssistant.js.map +1 -1
- package/dist/types/content/_internal/internalContentUtils.d.ts +1 -1
- package/dist/types/core/traits/IWithVersions.d.ts +5 -0
- package/dist/types/core/types/IHubItemEntity.d.ts +2 -1
- package/dist/types/index.d.ts +4 -1
- package/dist/types/layouts/fetchHubEntityLayouts.d.ts +16 -0
- package/dist/types/layouts/internal/upsertLayoutAssetResource.d.ts +27 -0
- package/dist/types/layouts/layout-event-types.d.ts +2 -1
- package/dist/types/layouts/migrations/types/ILayoutV2.d.ts +3 -0
- package/dist/types/layouts/publishHubEntityLayout.d.ts +29 -0
- package/dist/types/layouts/types.d.ts +5 -0
- package/dist/types/resources/addHubEntityResource.d.ts +19 -0
- package/dist/types/resources/addResource.d.ts +18 -0
- package/dist/types/resources/fetchHubEntityResource.d.ts +15 -0
- package/dist/types/resources/fetchHubEntityResources.d.ts +17 -0
- package/dist/types/resources/removeHubEntityResource.d.ts +18 -0
- package/dist/types/resources/upsertHubEntityResource.d.ts +20 -0
- package/dist/types/versioning/types/IVersion.d.ts +6 -2
- package/dist/types/versioning/types/IVersionMetadata.d.ts +10 -0
- package/package.json +3 -3
- package/dist/esm/layouts/updateLayout.js +0 -33
- package/dist/esm/layouts/updateLayout.js.map +0 -1
- package/dist/esm/layouts/upsertLayoutResource.js +0 -78
- package/dist/esm/layouts/upsertLayoutResource.js.map +0 -1
- package/dist/node/layouts/updateLayout.js +0 -36
- package/dist/node/layouts/updateLayout.js.map +0 -1
- package/dist/node/layouts/upsertLayoutResource.js +0 -81
- package/dist/node/layouts/upsertLayoutResource.js.map +0 -1
- package/dist/types/layouts/updateLayout.d.ts +0 -4
- package/dist/types/layouts/upsertLayoutResource.d.ts +0 -26
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { addItemResource } from "@esri/arcgis-rest-portal";
|
|
2
|
+
import HubError from "../HubError";
|
|
3
|
+
/**
|
|
4
|
+
* Thin wrapper around addItemResource to add a resource
|
|
5
|
+
* to a portal item and provide Hub-specific error
|
|
6
|
+
* handling.
|
|
7
|
+
*
|
|
8
|
+
* @param id - id of the item to add the resource to
|
|
9
|
+
* @param name - name of the resource file
|
|
10
|
+
* @param owner - owner of the item to add the resource to
|
|
11
|
+
* @param context - contextual portal and auth information
|
|
12
|
+
* @throws {HubError} if there is an error during the add process
|
|
13
|
+
*/
|
|
14
|
+
export async function addResource(id, name, resource, context, opts) {
|
|
15
|
+
var _a;
|
|
16
|
+
try {
|
|
17
|
+
// Add the item resource
|
|
18
|
+
const owner = (opts === null || opts === void 0 ? void 0 : opts.owner) || ((_a = context === null || context === void 0 ? void 0 : context.currentUser) === null || _a === void 0 ? void 0 : _a.username);
|
|
19
|
+
const response = await addItemResource(Object.assign({ id,
|
|
20
|
+
owner,
|
|
21
|
+
resource, name: name, prefix: opts === null || opts === void 0 ? void 0 : opts.prefix }, context.userRequestOptions));
|
|
22
|
+
// If error, throw
|
|
23
|
+
if (!response.success) {
|
|
24
|
+
throw new HubError("Add Item Resource", `Error adding resource ${name} to item ${id}.`);
|
|
25
|
+
}
|
|
26
|
+
return response;
|
|
27
|
+
}
|
|
28
|
+
catch (err) {
|
|
29
|
+
if (err instanceof Error) {
|
|
30
|
+
throw new HubError("Add Item Resource", err.message, err);
|
|
31
|
+
}
|
|
32
|
+
else {
|
|
33
|
+
throw new HubError("Add Item Resource", `Error adding resource ${name} to item ${id}.`);
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
//# sourceMappingURL=addResource.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"addResource.js","sourceRoot":"","sources":["../../../src/resources/addResource.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAC;AAC3D,OAAO,QAAQ,MAAM,aAAa,CAAC;AAGnC;;;;;;;;;;GAUG;AACH,MAAM,CAAC,KAAK,UAAU,WAAW,CAC/B,EAAU,EACV,IAAY,EACZ,QAAiB,EACjB,OAAuB,EACvB,IAGC;;IAED,IAAI,CAAC;QACH,wBAAwB;QACxB,MAAM,KAAK,GAAG,CAAA,IAAI,aAAJ,IAAI,uBAAJ,IAAI,CAAE,KAAK,MAAI,MAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,WAAW,0CAAE,QAAQ,CAAA,CAAC;QAC5D,MAAM,QAAQ,GAAG,MAAM,eAAe,iBACpC,EAAE;YACF,KAAK;YACL,QAAQ,EACR,IAAI,EAAE,IAAI,EACV,MAAM,EAAE,IAAI,aAAJ,IAAI,uBAAJ,IAAI,CAAE,MAAM,IACjB,OAAO,CAAC,kBAAkB,EAC7B,CAAC;QAEH,kBAAkB;QAClB,IAAI,CAAC,QAAQ,CAAC,OAAO,EAAE,CAAC;YACtB,MAAM,IAAI,QAAQ,CAChB,mBAAmB,EACnB,yBAAyB,IAAI,YAAY,EAAE,GAAG,CAC/C,CAAC;QACJ,CAAC;QACD,OAAO,QAAQ,CAAC;IAClB,CAAC;IAAC,OAAO,GAAG,EAAE,CAAC;QACb,IAAI,GAAG,YAAY,KAAK,EAAE,CAAC;YACzB,MAAM,IAAI,QAAQ,CAAC,mBAAmB,EAAE,GAAG,CAAC,OAAO,EAAE,GAAG,CAAC,CAAC;QAC5D,CAAC;aAAM,CAAC;YACN,MAAM,IAAI,QAAQ,CAChB,mBAAmB,EACnB,yBAAyB,IAAI,YAAY,EAAE,GAAG,CAC/C,CAAC;QACJ,CAAC;IACH,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { getItemResource } from "@esri/arcgis-rest-portal";
|
|
2
|
+
import HubError from "../HubError";
|
|
3
|
+
/**
|
|
4
|
+
* Fetches a Hub entity resource. This util handles
|
|
5
|
+
* delegating to the correct resource fetching logic
|
|
6
|
+
* based on the entity type.
|
|
7
|
+
*
|
|
8
|
+
* @param type - type of the entity to fetch the resource for
|
|
9
|
+
* @param identifier - id of the entity to fetch the resource for
|
|
10
|
+
* @param fileName - name of the info file (including the optional folder path) to fetch
|
|
11
|
+
* @param context - contextual portal and auth information
|
|
12
|
+
* @returns the fetched resource
|
|
13
|
+
* @throws {HubError} if there is an error during the fetch process or if fetching is not yet implemented for the entity type
|
|
14
|
+
*/
|
|
15
|
+
export async function fetchHubEntityResource(type, identifier, fileName, context) {
|
|
16
|
+
let resource;
|
|
17
|
+
if (type === "event") {
|
|
18
|
+
// TODO: add logic to fetch event resource
|
|
19
|
+
throw new HubError("fetchHubEntityResource", "Fetching event resources is not yet implemented");
|
|
20
|
+
}
|
|
21
|
+
else if (type === "group") {
|
|
22
|
+
// TODO: add logic to fetch group resource once
|
|
23
|
+
// supported by portal
|
|
24
|
+
throw new HubError("fetchHubEntityResource", "Fetching group resources is not yet supported");
|
|
25
|
+
}
|
|
26
|
+
else {
|
|
27
|
+
// default to item-based resource fetching for item-backed entities
|
|
28
|
+
try {
|
|
29
|
+
resource = await getItemResource(identifier, Object.assign(Object.assign({}, context.requestOptions), { fileName }));
|
|
30
|
+
}
|
|
31
|
+
catch (error) {
|
|
32
|
+
throw new HubError("Get Item Resource", `Failed to fetch resource ${fileName} for ${type} with identifier ${identifier}`, error);
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
return resource;
|
|
36
|
+
}
|
|
37
|
+
//# sourceMappingURL=fetchHubEntityResource.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fetchHubEntityResource.js","sourceRoot":"","sources":["../../../src/resources/fetchHubEntityResource.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAC;AAG3D,OAAO,QAAQ,MAAM,aAAa,CAAC;AAEnC;;;;;;;;;;;GAWG;AACH,MAAM,CAAC,KAAK,UAAU,sBAAsB,CAC1C,IAAmB,EACnB,UAAkB,EAClB,QAAgB,EAChB,OAAuB;IAEvB,IAAI,QAAiB,CAAC;IACtB,IAAI,IAAI,KAAK,OAAO,EAAE,CAAC;QACrB,0CAA0C;QAC1C,MAAM,IAAI,QAAQ,CAChB,wBAAwB,EACxB,iDAAiD,CAClD,CAAC;IACJ,CAAC;SAAM,IAAI,IAAI,KAAK,OAAO,EAAE,CAAC;QAC5B,+CAA+C;QAC/C,sBAAsB;QACtB,MAAM,IAAI,QAAQ,CAChB,wBAAwB,EACxB,+CAA+C,CAChD,CAAC;IACJ,CAAC;SAAM,CAAC;QACN,mEAAmE;QACnE,IAAI,CAAC;YACH,QAAQ,GAAG,MAAM,eAAe,CAAC,UAAU,kCACtC,OAAO,CAAC,cAAc,KACzB,QAAQ,IACR,CAAC;QACL,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,MAAM,IAAI,QAAQ,CAChB,mBAAmB,EACnB,4BAA4B,QAAQ,QAAQ,IAAI,oBAAoB,UAAU,EAAE,EAChF,KAAc,CACf,CAAC;QACJ,CAAC;IACH,CAAC;IAED,OAAO,QAAQ,CAAC;AAClB,CAAC"}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { getItemResources } from "@esri/arcgis-rest-portal";
|
|
2
|
+
import HubError from "../HubError";
|
|
3
|
+
/**
|
|
4
|
+
* Fetches a Hub entity's resources. This util handles
|
|
5
|
+
* delegating to the correct resource fetching logic
|
|
6
|
+
* based on the entity type.
|
|
7
|
+
*
|
|
8
|
+
* @param type - type of the entity to fetch the resources for
|
|
9
|
+
* @param identifier - id of the entity to fetch the resources for
|
|
10
|
+
* @param context - contextual portal and auth information
|
|
11
|
+
* @returns the fetched resources
|
|
12
|
+
* @throws {HubError} if there is an error during the fetch process or if fetching is not yet implemented for the entity type
|
|
13
|
+
*/
|
|
14
|
+
export async function fetchHubEntityResources(type, identifier, context) {
|
|
15
|
+
let resources = [];
|
|
16
|
+
if (type === "event") {
|
|
17
|
+
// TODO: add logic to fetch event resources
|
|
18
|
+
throw new HubError("fetchHubEntityResource", "Fetching event resources is not yet implemented");
|
|
19
|
+
}
|
|
20
|
+
else if (type === "group") {
|
|
21
|
+
// TODO: add logic to fetch group resources once
|
|
22
|
+
// supported by portal
|
|
23
|
+
throw new HubError("fetchHubEntityResource", "Fetching group resources is not yet supported");
|
|
24
|
+
}
|
|
25
|
+
else {
|
|
26
|
+
// default to item-based resource fetching for item-backed entities
|
|
27
|
+
try {
|
|
28
|
+
const res = await getItemResources(identifier, context.requestOptions);
|
|
29
|
+
resources = res.resources.map((resource) => (Object.assign(Object.assign({}, resource), { name: resource.resource })));
|
|
30
|
+
}
|
|
31
|
+
catch (error) {
|
|
32
|
+
throw new HubError("Get Item Resources", `Failed to fetch resources for ${type} with identifier ${identifier}`, error);
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
return resources;
|
|
36
|
+
}
|
|
37
|
+
//# sourceMappingURL=fetchHubEntityResources.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fetchHubEntityResources.js","sourceRoot":"","sources":["../../../src/resources/fetchHubEntityResources.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AAG5D,OAAO,QAAQ,MAAM,aAAa,CAAC;AAEnC;;;;;;;;;;GAUG;AACH,MAAM,CAAC,KAAK,UAAU,uBAAuB,CAC3C,IAAmB,EACnB,UAAkB,EAClB,OAAuB;IAEvB,IAAI,SAAS,GAAG,EAAE,CAAC;IACnB,IAAI,IAAI,KAAK,OAAO,EAAE,CAAC;QACrB,2CAA2C;QAC3C,MAAM,IAAI,QAAQ,CAChB,wBAAwB,EACxB,iDAAiD,CAClD,CAAC;IACJ,CAAC;SAAM,IAAI,IAAI,KAAK,OAAO,EAAE,CAAC;QAC5B,gDAAgD;QAChD,sBAAsB;QACtB,MAAM,IAAI,QAAQ,CAChB,wBAAwB,EACxB,+CAA+C,CAChD,CAAC;IACJ,CAAC;SAAM,CAAC;QACN,mEAAmE;QACnE,IAAI,CAAC;YACH,MAAM,GAAG,GAAG,MAAM,gBAAgB,CAAC,UAAU,EAAE,OAAO,CAAC,cAAc,CAAC,CAAC;YACvE,SAAS,GAAG,GAAG,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC,QAAQ,EAAE,EAAE,CAAC,iCACvC,QAAQ,KACX,IAAI,EAAE,QAAQ,CAAC,QAAQ,IACvB,CAAC,CAAC;QACN,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,MAAM,IAAI,QAAQ,CAChB,oBAAoB,EACpB,iCAAiC,IAAI,oBAAoB,UAAU,EAAE,EACrE,KAAc,CACf,CAAC;QACJ,CAAC;IACH,CAAC;IAED,OAAO,SAAS,CAAC;AACnB,CAAC"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import HubError from "../HubError";
|
|
2
|
+
import { removeResource } from "./removeResource";
|
|
3
|
+
/**
|
|
4
|
+
* Removes a Hub entity resource. This util handles delegating
|
|
5
|
+
* to the correct resource remove logic based on the entity type.
|
|
6
|
+
*
|
|
7
|
+
* @param type - type of the entity to remove the resource for
|
|
8
|
+
* @param identifier - id of the entity to remove the resource for
|
|
9
|
+
* @param name - name of the new/existing resource file
|
|
10
|
+
* @param context - contextual portal and auth information
|
|
11
|
+
* @param opts.owner - (optional) owner of the resource to add, defaults to the current user if not provided
|
|
12
|
+
* @param opts.prefix - (optional) folder in which to store the new resource
|
|
13
|
+
* @throws {HubError} if there is an error during the remove process or if removeing is not yet implemented for the entity type
|
|
14
|
+
*/
|
|
15
|
+
export async function removeHubEntityResource(type, identifier, name, context, opts) {
|
|
16
|
+
var _a;
|
|
17
|
+
if (type === "event") {
|
|
18
|
+
// TODO: add logic to remove event resource
|
|
19
|
+
throw new HubError("removeHubEntityResource", "removing event resources is not yet implemented");
|
|
20
|
+
}
|
|
21
|
+
else if (type === "group") {
|
|
22
|
+
// TODO: add logic to remove group resource once
|
|
23
|
+
// supported by portal
|
|
24
|
+
throw new HubError("removeHubEntityResource", "removing group resources is not yet supported");
|
|
25
|
+
}
|
|
26
|
+
else {
|
|
27
|
+
// default logic for item-backed entities
|
|
28
|
+
const owner = (opts === null || opts === void 0 ? void 0 : opts.owner) || ((_a = context === null || context === void 0 ? void 0 : context.currentUser) === null || _a === void 0 ? void 0 : _a.username);
|
|
29
|
+
const fileName = (opts === null || opts === void 0 ? void 0 : opts.prefix) ? `${opts.prefix}/${name}` : name;
|
|
30
|
+
await removeResource(identifier, fileName, owner, context.userRequestOptions);
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
//# sourceMappingURL=removeHubEntityResource.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"removeHubEntityResource.js","sourceRoot":"","sources":["../../../src/resources/removeHubEntityResource.ts"],"names":[],"mappings":"AACA,OAAO,QAAQ,MAAM,aAAa,CAAC;AAEnC,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAElD;;;;;;;;;;;GAWG;AACH,MAAM,CAAC,KAAK,UAAU,uBAAuB,CAC3C,IAAmB,EACnB,UAAkB,EAClB,IAAY,EACZ,OAAuB,EACvB,IAGC;;IAED,IAAI,IAAI,KAAK,OAAO,EAAE,CAAC;QACrB,2CAA2C;QAC3C,MAAM,IAAI,QAAQ,CAChB,yBAAyB,EACzB,iDAAiD,CAClD,CAAC;IACJ,CAAC;SAAM,IAAI,IAAI,KAAK,OAAO,EAAE,CAAC;QAC5B,gDAAgD;QAChD,sBAAsB;QACtB,MAAM,IAAI,QAAQ,CAChB,yBAAyB,EACzB,+CAA+C,CAChD,CAAC;IACJ,CAAC;SAAM,CAAC;QACN,yCAAyC;QACzC,MAAM,KAAK,GAAG,CAAA,IAAI,aAAJ,IAAI,uBAAJ,IAAI,CAAE,KAAK,MAAI,MAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,WAAW,0CAAE,QAAQ,CAAA,CAAC;QAC5D,MAAM,QAAQ,GAAG,CAAA,IAAI,aAAJ,IAAI,uBAAJ,IAAI,CAAE,MAAM,EAAC,CAAC,CAAC,GAAG,IAAI,CAAC,MAAM,IAAI,IAAI,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC;QAChE,MAAM,cAAc,CAClB,UAAU,EACV,QAAQ,EACR,KAAK,EACL,OAAO,CAAC,kBAAkB,CAC3B,CAAC;IACJ,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import HubError from "../HubError";
|
|
2
|
+
import { upsertResource } from "./upsertResource";
|
|
3
|
+
/**
|
|
4
|
+
* Adds or updates a Hub entity resource depending on whether it
|
|
5
|
+
* already exists. This util handles delegating to the correct
|
|
6
|
+
* resource upsert logic based on the entity type.
|
|
7
|
+
*
|
|
8
|
+
* @param type - type of the entity to upsert the resource for
|
|
9
|
+
* @param identifier - id of the entity to upsert the resource for
|
|
10
|
+
* @param resource - the resource to upsert
|
|
11
|
+
* @param name - name of the new/existing resource file
|
|
12
|
+
* @param context - contextual portal and auth information
|
|
13
|
+
* @param opts.owner - (optional) owner of the resource to add, defaults to the current user if not provided
|
|
14
|
+
* @param opts.prefix - (optional) folder in which to store the new resource
|
|
15
|
+
* @throws {HubError} if there is an error during the upsert process or if upserting is not yet implemented for the entity type
|
|
16
|
+
*/
|
|
17
|
+
export async function upsertHubEntityResource(type, identifier, resource, name, context, opts) {
|
|
18
|
+
var _a;
|
|
19
|
+
if (type === "event") {
|
|
20
|
+
// TODO: add logic to upsert event resource
|
|
21
|
+
throw new HubError("upsertHubEntityResource", "Upserting event resources is not yet implemented");
|
|
22
|
+
}
|
|
23
|
+
else if (type === "group") {
|
|
24
|
+
// TODO: add logic to upsert group resource once
|
|
25
|
+
// supported by portal
|
|
26
|
+
throw new HubError("upsertHubEntityResource", "Upserting group resources is not yet supported");
|
|
27
|
+
}
|
|
28
|
+
else {
|
|
29
|
+
// default logic for item-backed entities
|
|
30
|
+
const owner = (opts === null || opts === void 0 ? void 0 : opts.owner) || ((_a = context === null || context === void 0 ? void 0 : context.currentUser) === null || _a === void 0 ? void 0 : _a.username);
|
|
31
|
+
await upsertResource(identifier, owner, resource, name, context.userRequestOptions, opts === null || opts === void 0 ? void 0 : opts.prefix);
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
//# sourceMappingURL=upsertHubEntityResource.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"upsertHubEntityResource.js","sourceRoot":"","sources":["../../../src/resources/upsertHubEntityResource.ts"],"names":[],"mappings":"AACA,OAAO,QAAQ,MAAM,aAAa,CAAC;AAEnC,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAElD;;;;;;;;;;;;;GAaG;AACH,MAAM,CAAC,KAAK,UAAU,uBAAuB,CAC3C,IAAmB,EACnB,UAAkB,EAClB,QAAiB,EACjB,IAAY,EACZ,OAAuB,EACvB,IAGC;;IAED,IAAI,IAAI,KAAK,OAAO,EAAE,CAAC;QACrB,2CAA2C;QAC3C,MAAM,IAAI,QAAQ,CAChB,yBAAyB,EACzB,kDAAkD,CACnD,CAAC;IACJ,CAAC;SAAM,IAAI,IAAI,KAAK,OAAO,EAAE,CAAC;QAC5B,gDAAgD;QAChD,sBAAsB;QACtB,MAAM,IAAI,QAAQ,CAChB,yBAAyB,EACzB,gDAAgD,CACjD,CAAC;IACJ,CAAC;SAAM,CAAC;QACN,yCAAyC;QACzC,MAAM,KAAK,GAAG,CAAA,IAAI,aAAJ,IAAI,uBAAJ,IAAI,CAAE,KAAK,MAAI,MAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,WAAW,0CAAE,QAAQ,CAAA,CAAC;QAC5D,MAAM,cAAc,CAClB,UAAU,EACV,KAAK,EACL,QAAQ,EACR,IAAI,EACJ,OAAO,CAAC,kBAAkB,EAC1B,IAAI,aAAJ,IAAI,uBAAJ,IAAI,CAAE,MAAM,CACb,CAAC;IACJ,CAAC;AACH,CAAC"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { WELL_KNOWN_GROUP_FACET_TYPES } from "../../search/wellKnownFacets";
|
|
1
2
|
/**
|
|
2
3
|
* @private
|
|
3
4
|
* constructs the edit uiSchema for assistants.
|
|
@@ -59,61 +60,23 @@ export const buildUiSchema = async (i18nScope, options, context) => {
|
|
|
59
60
|
{
|
|
60
61
|
predicates: [
|
|
61
62
|
{
|
|
62
|
-
|
|
63
|
-
not: ["updateitemcontrol"],
|
|
64
|
-
},
|
|
63
|
+
orgid: context.currentUser.orgId,
|
|
65
64
|
},
|
|
66
65
|
],
|
|
67
66
|
},
|
|
68
67
|
],
|
|
69
68
|
},
|
|
70
69
|
},
|
|
71
|
-
collections: [
|
|
72
|
-
{
|
|
73
|
-
targetEntity: "group",
|
|
74
|
-
scope: {
|
|
75
|
-
targetEntity: "group",
|
|
76
|
-
filters: [
|
|
77
|
-
{
|
|
78
|
-
predicates: [
|
|
79
|
-
{
|
|
80
|
-
q: "*",
|
|
81
|
-
},
|
|
82
|
-
],
|
|
83
|
-
},
|
|
84
|
-
],
|
|
85
|
-
},
|
|
86
|
-
},
|
|
87
|
-
],
|
|
88
70
|
},
|
|
89
71
|
],
|
|
72
|
+
// Note: Excluding "group-organization" because `orgid: context.currentUser.orgId` makes it
|
|
73
|
+
// redundant and not useful. We also opted to keep the "group-within" facet even though the
|
|
74
|
+
// "Living Atlas" will result in 0 results. Changes to this set of facets at the request of product in:
|
|
75
|
+
// https://devtopia.esri.com/dc/hub/issues/14705#issuecomment-6153620
|
|
90
76
|
facets: [
|
|
91
|
-
|
|
92
|
-
label: `{{${i18nScope}.assistant.fields.accessGroups.facets.label.from:translate}}`,
|
|
93
|
-
display: "single-select",
|
|
94
|
-
operation: "OR",
|
|
95
|
-
options: [
|
|
96
|
-
{
|
|
97
|
-
label: `{{${i18nScope}.assistant.fields.accessGroups.facets.label.group:translate}}`,
|
|
98
|
-
selected: true,
|
|
99
|
-
predicates: [
|
|
100
|
-
{
|
|
101
|
-
owner: context.currentUser.username,
|
|
102
|
-
},
|
|
103
|
-
],
|
|
104
|
-
},
|
|
105
|
-
{
|
|
106
|
-
label: `{{${i18nScope}.assistant.fields.accessGroups.facets.label.org:translate}}`,
|
|
107
|
-
selected: false,
|
|
108
|
-
predicates: [
|
|
109
|
-
{
|
|
110
|
-
orgid: context.currentUser.orgId,
|
|
111
|
-
},
|
|
112
|
-
],
|
|
113
|
-
},
|
|
114
|
-
],
|
|
115
|
-
},
|
|
77
|
+
...WELL_KNOWN_GROUP_FACET_TYPES.filter((facet) => !["group-organization"].includes(facet)),
|
|
116
78
|
],
|
|
79
|
+
widthScale: "l",
|
|
117
80
|
},
|
|
118
81
|
},
|
|
119
82
|
],
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SiteUiSchemaAssistant.js","sourceRoot":"","sources":["../../../../src/sites/_internal/SiteUiSchemaAssistant.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"SiteUiSchemaAssistant.js","sourceRoot":"","sources":["../../../../src/sites/_internal/SiteUiSchemaAssistant.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,4BAA4B,EAAE,MAAM,8BAA8B,CAAC;AAE5E;;;;;GAKG;AACH,MAAM,CAAC,MAAM,aAAa,GAAG,KAAK,EAChC,SAAiB,EACjB,OAA0B,EAC1B,OAAuB,EACH,EAAE;IACtB,gDAAgD;IAChD,sDAAsD;IACtD,8CAA8C;IAC9C,OAAO;QACL,IAAI,EAAE,QAAQ;QACd,QAAQ,EAAE;YACR;gBACE,IAAI,EAAE,SAAS;gBACf,KAAK,EAAE,KAAK,SAAS,oDAAoD;gBACzE,QAAQ,EAAE;oBACR;wBACE,KAAK,EAAE,KAAK,SAAS,6CAA6C;wBAClE,KAAK,EAAE,0CAA0C;wBACjD,IAAI,EAAE,SAAS;wBACf,OAAO,EAAE;4BACP,OAAO,EAAE,wBAAwB;4BACjC,MAAM,EAAE,sBAAsB;yBAC/B;qBACF;oBACD;wBACE,KAAK,EAAE,KAAK,SAAS,4CAA4C;wBACjE,KAAK,EAAE,yCAAyC;wBAChD,IAAI,EAAE,SAAS;wBACf,OAAO,EAAE;4BACP,OAAO,EAAE,kCAAkC;4BAC3C,QAAQ,EAAE,WAAW;4BACrB,OAAO,EAAE,OAAO,CAAC,MAAM,CAAC,IAAI;4BAC5B,aAAa,EAAE;gCACb,o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AAE;6CAC5B;yCACF;qCACF;iCACF;6BACF;yBACF;qBACF;iBACF;aACF;YACD,kCAAkC;YAClC,IAAI;YACJ,qBAAqB;YACrB,8EAA8E;YAC9E,eAAe;YACf,oBAAoB;YACpB,uFAAuF;YACvF,SAAS;YACT,OAAO;YACP,gBAAgB;YAChB,QAAQ;YACR,+DAA+D;YAC/D,yBAAyB;YACzB,mBAAmB;YACnB,2CAA2C;YAC3C,2BAA2B;YAC3B,0BAA0B;YAC1B,6BAA6B;YAC7B,qCAAqC;YACrC,wGAAwG;YACxG,yHAAyH;YACzH,2HAA2H;YAC3H,wBAAwB;YACxB,4BAA4B;YAC5B,iCAAiC;YACjC,0BAA0B;YAC1B,uBAAuB;YACvB,gCAAgC;YAChC,gCAAgC;YAChC,iBAAiB;YACjB,eAAe;YACf,aAAa;YACb,0BAA0B;YAC1B,4BAA4B;YAC5B,wBAAwB;YACxB,gBAAgB;YAChB,gGAAgG;YAChG,4CAA4C;YAC5C,iCAAiC;YACjC,2BAA2B;YAC3B,oDAAoD;YACpD,mBAAmB;YACnB,iBAAiB;YACjB,eAAe;YACf,aAAa;YACb,WAAW;YACX,SAAS;YACT,OAAO;YACP,KAAK;SACN;KACF,CAAC;AACJ,CAAC,CAAC"}
|
|
@@ -2,12 +2,12 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.buildUiSchema = void 0;
|
|
4
4
|
const uiSchemaRuleEffects_1 = require("../../core/enums/uiSchemaRuleEffects");
|
|
5
|
-
const wellKnownCatalog_1 = require("../../search/wellKnownCatalog");
|
|
6
5
|
const constants_1 = require("../../discussions/constants");
|
|
7
6
|
const ChannelBusinessRules_1 = require("./ChannelBusinessRules");
|
|
8
7
|
const role_1 = require("../../discussions/api/enums/role");
|
|
9
8
|
const derive_user_role_v2_1 = require("../../discussions/api/utils/channels/derive-user-role-v2");
|
|
10
9
|
const channel_permission_1 = require("../../discussions/api/utils/channel-permission");
|
|
10
|
+
const wellKnownFacets_1 = require("../../search/wellKnownFacets");
|
|
11
11
|
/**
|
|
12
12
|
* @private
|
|
13
13
|
* constructs the complete create uiSchema for Hub Channels.
|
|
@@ -18,53 +18,6 @@ const buildUiSchema = (i18nScope, options, context) => {
|
|
|
18
18
|
const role = options.id
|
|
19
19
|
? (0, derive_user_role_v2_1.deriveUserRoleV2)(options.channel, context.currentUser)
|
|
20
20
|
: role_1.Role.OWNER;
|
|
21
|
-
const facet = {
|
|
22
|
-
label: `{{${i18nScope}.sections.group.picker.facets.label:translate}}`,
|
|
23
|
-
key: "groups",
|
|
24
|
-
display: "single-select",
|
|
25
|
-
operation: "OR",
|
|
26
|
-
options: [
|
|
27
|
-
{
|
|
28
|
-
label: `{{${i18nScope}.sections.group.picker.facets.myGroups.label:translate}}`,
|
|
29
|
-
key: "my-group",
|
|
30
|
-
selected: true,
|
|
31
|
-
predicates: [
|
|
32
|
-
{
|
|
33
|
-
owner: context.currentUser.username,
|
|
34
|
-
typekeywords: { not: constants_1.CANNOT_DISCUSS },
|
|
35
|
-
},
|
|
36
|
-
],
|
|
37
|
-
},
|
|
38
|
-
{
|
|
39
|
-
label: `{{${i18nScope}.sections.group.picker.facets.myOrganization.label:translate}}`,
|
|
40
|
-
key: "my-organization",
|
|
41
|
-
selected: false,
|
|
42
|
-
predicates: [
|
|
43
|
-
{
|
|
44
|
-
orgid: context.currentUser.orgId,
|
|
45
|
-
searchUserAccess: "groupMember",
|
|
46
|
-
searchUserName: context.currentUser.username,
|
|
47
|
-
typekeywords: { not: constants_1.CANNOT_DISCUSS },
|
|
48
|
-
},
|
|
49
|
-
],
|
|
50
|
-
},
|
|
51
|
-
],
|
|
52
|
-
};
|
|
53
|
-
if (context.communityOrgId) {
|
|
54
|
-
facet.options.push({
|
|
55
|
-
label: `{{${i18nScope}.sections.group.picker.facets.myCommunity.label:translate}}`,
|
|
56
|
-
key: "my-community",
|
|
57
|
-
selected: false,
|
|
58
|
-
predicates: [
|
|
59
|
-
{
|
|
60
|
-
orgid: context.communityOrgId,
|
|
61
|
-
searchUserAccess: "groupMember",
|
|
62
|
-
searchUserName: context.currentUser.username,
|
|
63
|
-
typekeywords: { not: constants_1.CANNOT_DISCUSS },
|
|
64
|
-
},
|
|
65
|
-
],
|
|
66
|
-
});
|
|
67
|
-
}
|
|
68
21
|
return Promise.resolve({
|
|
69
22
|
type: "Layout",
|
|
70
23
|
elements: [
|
|
@@ -292,17 +245,45 @@ const buildUiSchema = (i18nScope, options, context) => {
|
|
|
292
245
|
type: "add",
|
|
293
246
|
options: {
|
|
294
247
|
label: `{{${i18nScope}.sections.group.picker.title:translate}}`,
|
|
248
|
+
// TODO: AP - general concerns about ripping out the pre-existing `entityType: "group"`,
|
|
249
|
+
// given I don't have the full history/context behind the naming convention and existing usage
|
|
250
|
+
// throughout `arcgis-hub-permissions` and the wrapping config field `hub-field-permissions`.
|
|
251
|
+
// See conversation here: https://github.com/ArcGIS/hub-ui/pull/416/changes#r2905466464
|
|
252
|
+
// See TODO ticket here: https://devtopia.esri.com/dc/hub/issues/15457
|
|
253
|
+
targetEntity: "group",
|
|
295
254
|
entityType: "group",
|
|
296
255
|
catalogs: [
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
256
|
+
{
|
|
257
|
+
schemaVersion: 1,
|
|
258
|
+
scopes: {
|
|
259
|
+
group: {
|
|
260
|
+
targetEntity: "group",
|
|
261
|
+
filters: [
|
|
262
|
+
{
|
|
263
|
+
predicates: [
|
|
264
|
+
{
|
|
265
|
+
searchUserAccess: "groupMember",
|
|
266
|
+
},
|
|
267
|
+
{
|
|
268
|
+
typekeywords: { not: [constants_1.CANNOT_DISCUSS] },
|
|
269
|
+
},
|
|
270
|
+
],
|
|
271
|
+
},
|
|
272
|
+
],
|
|
273
|
+
},
|
|
274
|
+
},
|
|
275
|
+
},
|
|
276
|
+
],
|
|
277
|
+
// Note: Excluding group-within because `searchUserAcces: groupMember` makes it redundant and not useful
|
|
278
|
+
// Removed at the request of product for https://devtopia.esri.com/dc/hub/issues/14705
|
|
279
|
+
facets: [
|
|
280
|
+
...wellKnownFacets_1.WELL_KNOWN_GROUP_FACET_TYPES.filter((facet) => !["group-within"].includes(facet)),
|
|
300
281
|
],
|
|
301
|
-
facets: [facet],
|
|
302
282
|
defaultValues: {
|
|
303
283
|
member: ChannelBusinessRules_1.ChannelNonePermission,
|
|
304
284
|
admin: ChannelBusinessRules_1.ChannelNonePermission,
|
|
305
285
|
},
|
|
286
|
+
widthScale: "l",
|
|
306
287
|
},
|
|
307
288
|
},
|
|
308
289
|
{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ChannelUiSchemaCreate.js","sourceRoot":"","sources":["../../../../src/channels/_internal/ChannelUiSchemaCreate.ts"],"names":[],"mappings":";;;AACA,8EAA2E;AAC3E,
|
|
1
|
+
{"version":3,"file":"ChannelUiSchemaCreate.js","sourceRoot":"","sources":["../../../../src/channels/_internal/ChannelUiSchemaCreate.ts"],"names":[],"mappings":";;;AACA,8EAA2E;AAC3E,2DAA6D;AAC7D,iEAA+D;AAC/D,2DAAwD;AACxD,kGAA4F;AAC5F,uFAAsF;AAGtF,kEAA4E;AAE5E;;;;;GAKG;AACI,MAAM,aAAa,GAAG,CAC3B,SAAiB,EACjB,OAA6B,EAC7B,OAAuB,EACH,EAAE;IACtB,MAAM,IAAI,GAAG,OAAO,CAAC,EAAE;QACrB,CAAC,CAAC,IAAA,sCAAgB,EAAC,OAAO,CAAC,OAAO,EAAE,OAAO,CAAC,WAAW,CAAC;QACxD,CAAC,CAAC,WAAI,CAAC,KAAK,CAAC;IACf,OAAO,OAAO,CAAC,OAAO,CAAC;QACrB,IAAI,EAAE,QAAQ;QACd,QAAQ,EAAE;YACR;gBACE,IAAI,EAAE,SAAS;gBACf,QAAQ,EAAE,GAAG,SAAS,2BAA2B;gBACjD,OAAO,EAAE;oBACP,SAAS,EAAE,IAAI;iBAChB;gBACD,QAAQ,EAAE;oBACR;wBACE,QAAQ,EAAE,GAAG,SA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oDACb,MAAM,EAAE,4CAAqB;oDAC7B,KAAK,EAAE,4CAAqB;iDAC7B;gDACD,UAAU,EAAE,GAAG;6CAChB;yCACF;wCACD;4CACE,SAAS,EAAE,KAAK,SAAS,2CAA2C;4CACpE,WAAW,EAAE,SAAS;4CACtB,UAAU,EAAE,SAAS;4CACrB,IAAI,EAAE,QAAQ;4CACd,IAAI,EAAE,GAAG;yCACV;qCACF;oCACD,KAAK,EAAE;wCACL;4CACE,QAAQ,EAAE,QAAQ;4CAClB,WAAW,EAAE,KAAK,SAAS,8CAA8C;4CACzE,KAAK,EAAE,KAAK,SAAS,wCAAwC;4CAC7D,gBAAgB,EAAE;gDAChB,KAAK,SAAS,oDAAoD;gDAClE,KAAK,SAAS,gDAAgD;gDAC9D,KAAK,SAAS,gDAAgD;gDAC9D,KAAK,SAAS,uDAAuD;gDACrE,KAAK,SAAS,oDAAoD;gDAClE,KAAK,SAAS,kDAAkD;gDAChE,KAAK,SAAS,iDAAiD;6CAChE;yCACF;wCACD;4CACE,QAAQ,EAAE,OAAO;4CACjB,WAAW,EAAE,KAAK,SAAS,6CAA6C;4CACxE,KAAK,EAAE,KAAK,SAAS,uCAAuC;4CAC5D,gBAAgB,EAAE;gDAChB,KAAK,SAAS,oDAAoD;gDAClE,KAAK,SAAS,gDAAgD;gDAC9D,KAAK,SAAS,gDAAgD;gDAC9D,KAAK,SAAS,uDAAuD;gDACrE,KAAK,SAAS,oDAAoD;gDAClE,KAAK,SAAS,kDAAkD;gDAChE,KAAK,SAAS,iDAAiD;6CAChE;yCACF;qCACF;iCACF;6BACF;yBACF;qBACF;iBACF;aACF;SACF;KACF,CAAC,CAAC;AACL,CAAC,CAAC;AAtUW,QAAA,aAAa,iBAsUxB"}
|
|
@@ -84,6 +84,10 @@ function getBasePropertyMap() {
|
|
|
84
84
|
entityKey: "entitySettingsId",
|
|
85
85
|
storeKey: "entitySettings.id",
|
|
86
86
|
});
|
|
87
|
+
map.push({
|
|
88
|
+
entityKey: "currentVersions",
|
|
89
|
+
storeKey: "item.properties.currentVersions",
|
|
90
|
+
});
|
|
87
91
|
return map;
|
|
88
92
|
}
|
|
89
93
|
//# sourceMappingURL=getBasePropertyMap.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getBasePropertyMap.js","sourceRoot":"","sources":["../../../../src/core/_internal/getBasePropertyMap.ts"],"names":[],"mappings":";;AAQA,
|
|
1
|
+
{"version":3,"file":"getBasePropertyMap.js","sourceRoot":"","sources":["../../../../src/core/_internal/getBasePropertyMap.ts"],"names":[],"mappings":";;AAQA,gDAkFC;AA1FD,0CAAmD;AAGnD;;;;GAIG;AACH,SAAgB,kBAAkB;IAChC,MAAM,SAAS,GAAG;QAChB,QAAQ;QACR,SAAS;QACT,SAAS;QACT,aAAa;QACb,QAAQ;QACR,IAAI;QACJ,aAAa;QACb,UAAU;QACV,OAAO;QACP,MAAM;QACN,YAAY;QACZ,MAAM;QACN,cAAc;QACd,WAAW;QACX,KAAK;QACL,OAAO;QACP,iFAAiF;KAClF,CAAC;IACF,MAAM,SAAS,GAAG;QAChB,SAAS;QACT,UAAU;QACV,MAAM;QACN,cAAc;QACd,UAAU;QACV,WAAW;QACX,QAAQ;KACT,CAAC;IACF,MAAM,aAAa,GAAG,MAAM,CAAC,IAAI,CAAC,yBAAiB,CAAC,CAAC;IACrD,MAAM,GAAG,GAAmB,EAAE,CAAC;IAC/B,SAAS,CAAC,OAAO,CAAC,CAAC,KAAK,EAAE,EAAE;QAC1B,GAAG,CAAC,IAAI,CAAC,EAAE,SAAS,EAAE,KAAK,EAAE,QAAQ,EAAE,QAAQ,KAAK,EAAE,EAAE,CAAC,CAAC;IAC5D,CAAC,CAAC,CAAC;IACH,SAAS,CAAC,OAAO,CAAC,CAAC,KAAK,EAAE,EAAE;QAC1B,GAAG,CAAC,IAAI,CAAC,EAAE,SAAS,EAAE,KAAK,EAAE,QAAQ,EAAE,QAAQ,KAAK,EAAE,EAAE,CAAC,CAAC;IAC5D,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,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IWithVersions.js","sourceRoot":"","sources":["../../../../src/core/traits/IWithVersions.ts"],"names":[],"mappings":""}
|
package/dist/node/index.js
CHANGED
|
@@ -14,7 +14,7 @@ exports.getUniversalCatalog = exports.getFacetTargetEntities = exports.WELL_KNOW
|
|
|
14
14
|
exports.upgradeSiteSchema = exports.getOrgDefaultTheme = exports.DEFAULT_THEME = exports.SITE_SCHEMA_VERSION = exports.searchCategoriesToCollections = exports.reharvestSiteCatalog = exports.updateSite = exports.HUB_SITE_ITEM_TYPE = exports.fetchSite = exports.ENTERPRISE_SITE_ITEM_TYPE = exports.enrichSiteSearchResult = exports.deleteSite = exports.createSite = exports.convertModelToSite = exports.convertItemToSite = exports.HubSite = exports.getSiteById = exports.getCatalogFromSiteModel = exports.fetchSiteModel = exports.setFeedTemplate = exports.previewFeed = exports.getFeedTemplate = exports.setFeedConfiguration = exports.getFeedConfiguration = exports.buildDraft = exports.updateDomain = exports.removeDomainByHostname = exports.removeDomainsBySiteId = exports.removeDomain = exports.lookupDomain = exports.isValidDomain = exports.isDomainUsedElsewhere = exports.isDomainForLegacySite = exports.getUniqueDomainNamePortal = exports.getUniqueDomainName = exports.getDomainsForSite = exports.ensureUniqueDomainName = exports.domainExistsPortal = exports.domainExists = exports.addSiteDomains = exports.addDomain = exports._lookupPortal = exports._getDomainServiceUrl = exports._getAuthHeader = exports._ensureSafeDomainLength = exports._checkStatusAndParseJson = exports.defaultSiteCollectionKeys = exports.migrateWebMappingApplicationSites = exports.migrateEnsureHeaderComponentName = exports.migrateBadBasemap = void 0;
|
|
15
15
|
exports.isSafeRedirectUrl = exports.HUB_CDN_URLMAP = exports.getUserHomeUrl = exports.getPortalBaseFromOrgUrl = exports.getHubApiFromPortalUrl = exports.getGroupHomeUrl = exports.getContentHomeUrl = exports.getCardModelUrlFromResult = exports.getCardModelUrlFromEntity = exports.getPortalUrl = exports.getPortalApiUrl = exports.getItemHomeUrl = exports.getItemDataUrl = exports.getItemApiUrl = exports.getHubUrlFromPortal = exports.getHubLocaleAssetUrl = exports.getHubApiUrlFromPortal = exports.getCdnAssetUrl = exports.getCampaignUrl = exports.isMapOrFeatureServerUrl = exports.getServiceTypeFromUrl = exports.convertUrlsToAnchorTags = exports.cacheBustUrl = exports.buildUrl = exports._getLocation = exports._getHttpAndHttpsUris = exports.templateToCardModel = exports.templateResultToCardModel = exports.HubTemplate = exports.fetchTemplate = exports.enrichTemplateSearchResult = exports.convertItemToTemplate = exports.updateTemplate = exports.editorToTemplate = exports.deleteTemplate = exports.createTemplate = exports.isFieldworkerView = exports.isDraft = exports.getSurveyModels = exports.getStakeholderModel = exports.getSourceFeatureServiceModelFromFieldworker = exports.getS123ShareUrl = exports.getS123EditUrl = exports.getInputFeatureServiceModel = exports._migrateToV2Catalog = exports._migrateTelemetryConfig = exports._migrateLinkUnderlinesCapability = exports._migrateFeedConfig = exports._migrateEventListCardConfigs = exports._ensureTelemetry = void 0;
|
|
16
16
|
exports.includes = exports.updateUserSiteSettings = exports.updateUserHubSettings = exports.fetchUserSiteSettings = exports.fetchUserHubSettings = exports.getObjectSize = exports.getEventThumbnail = exports.getEnvironmentFromPortalUrl = exports.getSubscriptionType = exports.getHubProduct = exports.generateRandomString = exports.failSafe = exports.ensureUniqueString = exports.unicodeToBase64 = exports.base64ToUnicode = exports.guessTimeZone = exports.getTimePickerTime = exports.getDatePickerDate = exports.dasherize = exports.createOperationPipeline = exports.batch = exports.asyncForEach = exports.isArrayEqual = exports.without = exports.uniqueBy = exports.unique = exports.objectToArray = exports.maybePush = exports.maybeAdd = exports.last = exports.isNil = exports.flattenArray = exports.findBy = exports.filterBy = exports.extend = exports.createId = exports.compose = exports.cloneObject = exports.chunkArray = exports.capitalize = exports.camelize = exports.arrayToObject = exports.addDays = exports.userResultToCardModel = exports.fetchHubUser = exports.enrichUserSearchResult = exports.convertUserToHubUser = exports.upgradeProtocol = exports.stripProtocol = exports.isEnterprisePortalUrl = void 0;
|
|
17
|
-
exports.layoutNodeTags = exports.OperationStack = exports.OperationError = exports.HubError = exports.checkForStaleVersion = exports.applyVersion = exports.updateVersionMetadata = exports.updateVersion = exports.searchVersions = exports.getVersion = exports.deleteVersion = exports.createVersion = exports.withoutByProp = exports.wait = exports.titleize = exports.slugify = exports.runRevertableTask = exports.processRevertableTasks = exports.propifyString = exports.poll = exports.memoize = exports.clearMemoizedCache = exports.mapBy = exports.Logger = exports.isComboboxItemSelected = exports.isUpdateGroup = exports.isGuid = exports.isCuid = exports.incrementString = void 0;
|
|
17
|
+
exports.publishHubEntityLayout = exports.fetchHubEntityLayouts = exports.LAYOUT_SCHEMA_VERSION = exports.layoutNodeTags = exports.OperationStack = exports.OperationError = exports.HubError = exports.checkForStaleVersion = exports.applyVersion = exports.updateVersionMetadata = exports.updateVersion = exports.searchVersions = exports.getVersion = exports.deleteVersion = exports.createVersion = exports.withoutByProp = exports.wait = exports.titleize = exports.slugify = exports.runRevertableTask = exports.processRevertableTasks = exports.propifyString = exports.poll = exports.memoize = exports.clearMemoizedCache = exports.mapBy = exports.Logger = exports.isComboboxItemSelected = exports.isUpdateGroup = exports.isGuid = exports.isCuid = exports.incrementString = void 0;
|
|
18
18
|
/* Copyright (c) 2024 Environmental Systems Research Institute, Inc.
|
|
19
19
|
* Apache-2.0 */
|
|
20
20
|
/* istanbul ignore file */
|
|
@@ -1208,4 +1208,10 @@ Object.defineProperty(exports, "applyVersion", { enumerable: true, get: function
|
|
|
1208
1208
|
Object.defineProperty(exports, "checkForStaleVersion", { enumerable: true, get: function () { return utils_4.checkForStaleVersion; } });
|
|
1209
1209
|
var layout_system_types_1 = require("./layouts/layout-system-types");
|
|
1210
1210
|
Object.defineProperty(exports, "layoutNodeTags", { enumerable: true, get: function () { return layout_system_types_1.layoutNodeTags; } });
|
|
1211
|
+
var types_9 = require("./layouts/types");
|
|
1212
|
+
Object.defineProperty(exports, "LAYOUT_SCHEMA_VERSION", { enumerable: true, get: function () { return types_9.LAYOUT_SCHEMA_VERSION; } });
|
|
1213
|
+
var fetchHubEntityLayouts_1 = require("./layouts/fetchHubEntityLayouts");
|
|
1214
|
+
Object.defineProperty(exports, "fetchHubEntityLayouts", { enumerable: true, get: function () { return fetchHubEntityLayouts_1.fetchHubEntityLayouts; } });
|
|
1215
|
+
var publishHubEntityLayout_1 = require("./layouts/publishHubEntityLayout");
|
|
1216
|
+
Object.defineProperty(exports, "publishHubEntityLayout", { enumerable: true, get: function () { return publishHubEntityLayout_1.publishHubEntityLayout; } });
|
|
1211
1217
|
//# sourceMappingURL=index.js.map
|