@esri/hub-common 14.134.1 → 14.135.1

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.
Files changed (62) hide show
  1. package/dist/esm/ArcGISContext.js +11 -0
  2. package/dist/esm/ArcGISContext.js.map +1 -1
  3. package/dist/esm/associations/wellKnownAssociationCatalogs.js +8 -4
  4. package/dist/esm/associations/wellKnownAssociationCatalogs.js.map +1 -1
  5. package/dist/esm/content/_internal/computeProps.js +1 -0
  6. package/dist/esm/content/_internal/computeProps.js.map +1 -1
  7. package/dist/esm/content/_internal/internalContentUtils.js +16 -6
  8. package/dist/esm/content/_internal/internalContentUtils.js.map +1 -1
  9. package/dist/esm/events/_internal/computeLinks.js +1 -0
  10. package/dist/esm/events/_internal/computeLinks.js.map +1 -1
  11. package/dist/esm/groups/_internal/computeLinks.js +2 -0
  12. package/dist/esm/groups/_internal/computeLinks.js.map +1 -1
  13. package/dist/esm/initiative-templates/_internal/computeLinks.js +1 -0
  14. package/dist/esm/initiative-templates/_internal/computeLinks.js.map +1 -1
  15. package/dist/esm/initiatives/_internal/computeLinks.js +1 -0
  16. package/dist/esm/initiatives/_internal/computeLinks.js.map +1 -1
  17. package/dist/esm/pages/_internal/computeProps.js +2 -0
  18. package/dist/esm/pages/_internal/computeProps.js.map +1 -1
  19. package/dist/esm/projects/_internal/computeLinks.js +1 -0
  20. package/dist/esm/projects/_internal/computeLinks.js.map +1 -1
  21. package/dist/esm/search/_internal/buildCatalog.js +4 -2
  22. package/dist/esm/search/_internal/buildCatalog.js.map +1 -1
  23. package/dist/esm/search/wellKnownCatalog.js +64 -0
  24. package/dist/esm/search/wellKnownCatalog.js.map +1 -1
  25. package/dist/esm/sites/_internal/computeLinks.js +1 -0
  26. package/dist/esm/sites/_internal/computeLinks.js.map +1 -1
  27. package/dist/esm/templates/_internal/computeLinks.js +1 -0
  28. package/dist/esm/templates/_internal/computeLinks.js.map +1 -1
  29. package/dist/node/ArcGISContext.js +11 -0
  30. package/dist/node/ArcGISContext.js.map +1 -1
  31. package/dist/node/associations/wellKnownAssociationCatalogs.js +8 -4
  32. package/dist/node/associations/wellKnownAssociationCatalogs.js.map +1 -1
  33. package/dist/node/content/_internal/computeProps.js +1 -0
  34. package/dist/node/content/_internal/computeProps.js.map +1 -1
  35. package/dist/node/content/_internal/internalContentUtils.js +15 -5
  36. package/dist/node/content/_internal/internalContentUtils.js.map +1 -1
  37. package/dist/node/events/_internal/computeLinks.js +1 -0
  38. package/dist/node/events/_internal/computeLinks.js.map +1 -1
  39. package/dist/node/groups/_internal/computeLinks.js +2 -0
  40. package/dist/node/groups/_internal/computeLinks.js.map +1 -1
  41. package/dist/node/initiative-templates/_internal/computeLinks.js +1 -0
  42. package/dist/node/initiative-templates/_internal/computeLinks.js.map +1 -1
  43. package/dist/node/initiatives/_internal/computeLinks.js +1 -0
  44. package/dist/node/initiatives/_internal/computeLinks.js.map +1 -1
  45. package/dist/node/pages/_internal/computeProps.js +2 -0
  46. package/dist/node/pages/_internal/computeProps.js.map +1 -1
  47. package/dist/node/projects/_internal/computeLinks.js +1 -0
  48. package/dist/node/projects/_internal/computeLinks.js.map +1 -1
  49. package/dist/node/search/_internal/buildCatalog.js +4 -2
  50. package/dist/node/search/_internal/buildCatalog.js.map +1 -1
  51. package/dist/node/search/wellKnownCatalog.js +64 -0
  52. package/dist/node/search/wellKnownCatalog.js.map +1 -1
  53. package/dist/node/sites/_internal/computeLinks.js +1 -0
  54. package/dist/node/sites/_internal/computeLinks.js.map +1 -1
  55. package/dist/node/templates/_internal/computeLinks.js +1 -0
  56. package/dist/node/templates/_internal/computeLinks.js.map +1 -1
  57. package/dist/types/ArcGISContext.d.ts +8 -0
  58. package/dist/types/content/_internal/internalContentUtils.d.ts +6 -8
  59. package/dist/types/core/types/IHubEntityBase.d.ts +1 -0
  60. package/dist/types/search/_internal/buildCatalog.d.ts +3 -1
  61. package/dist/types/search/wellKnownCatalog.d.ts +7 -1
  62. package/package.json +1 -1
@@ -43,12 +43,7 @@ export declare const setContentBoundary: (content: IHubContent, boundary: Geogra
43
43
  visibility: "private" | "public" | "org";
44
44
  control?: import("../../types").AccessControl;
45
45
  groups?: import("@esri/arcgis-rest-portal").IGroup[];
46
- }; /**
47
- * get a content's boundary based on the item's boundary property
48
- * @param item
49
- * @returns
50
- * @private
51
- */
46
+ };
52
47
  family?: import("../../types").HubFamily;
53
48
  categories?: string[];
54
49
  isDownloadable: boolean;
@@ -161,12 +156,15 @@ export declare const isProxiedCSV: (item: IItem, requestOptions?: IHubRequestOpt
161
156
  /**
162
157
  * Get the relative URL to use for the item in a hub site
163
158
  * @param type
164
- * @param identifier
159
+ * @param identifier optional, if not pass, will return a URL to the entities,
160
+ * e.g. /initiatives, /projects
161
+ * NOTE: not all entities have the entities route set up, in that case, we will
162
+ * not return an URL, so they will be redirected back to the site home
165
163
  * @param typeKeywords
166
164
  * @returns
167
165
  * @private
168
166
  */
169
- export declare const getHubRelativeUrl: (type: string, identifier: string, typeKeywords?: string[]) => string;
167
+ export declare const getHubRelativeUrl: (type: string, identifier?: string, typeKeywords?: string[]) => string;
170
168
  /**
171
169
  * Is this content type a page?
172
170
  * @param type
@@ -30,6 +30,7 @@ export interface IHubEntityLinks {
30
30
  * Relative url of the entity, within a site
31
31
  */
32
32
  siteRelative?: string;
33
+ siteRelativeEntityType?: string;
33
34
  /**
34
35
  * Relative workspace url of the entity, within a site
35
36
  */
@@ -7,6 +7,8 @@ import { EntityType, IFilter, IHubCatalog, IHubCollection } from "../types";
7
7
  * @param catalogName - well known catalog name
8
8
  * @param filters - filters to build the catalog scope
9
9
  * @param collections - collections to include in the catalog
10
+ * @param targetEntity - target entity type for the catalog
11
+ * @param title - optional title override for the catalog
10
12
  * @returns {IHubCatalog}
11
13
  */
12
- export declare function buildCatalog(i18nScope: string, catalogName: string, filters: IFilter[], collections: IHubCollection[], targetEntity: EntityType): IHubCatalog;
14
+ export declare function buildCatalog(i18nScope: string, catalogName: string, filters: IFilter[], collections: IHubCollection[], targetEntity: EntityType, title?: string): IHubCatalog;
@@ -1,17 +1,21 @@
1
1
  import { IUser } from "@esri/arcgis-rest-types";
2
2
  import { HubFamily } from "../types";
3
3
  import { EntityType, IFilter, IHubCatalog, IHubCollection } from "./types";
4
+ import { IArcGISContext } from "..";
4
5
  /**
5
6
  * This is used to determine what IHubCatalog definition JSON object
6
7
  * can be created
7
8
  */
8
- export declare type WellKnownCatalog = "myContent" | "favorites" | "organization" | "world" | "editGroups" | "viewGroups" | "allGroups";
9
+ export declare type WellKnownCatalog = "myContent" | "favorites" | "organization" | "world" | "editGroups" | "viewGroups" | "allGroups" | "partners" | "community";
9
10
  /**
10
11
  * This is used to determine what IHubCollection definition JSON object
11
12
  * can be created. We use HubFamily here to define most of the collections
12
13
  * to ensure consistency
13
14
  */
14
15
  export declare type WellKnownCollection = Exclude<HubFamily, "app" | "map"> | "appAndMap" | "solution" | "projectAndInitiative";
16
+ /**TODO: On the next breaking change User and context should be
17
+ * removed from this interface and passed into the function as a single required context.
18
+ */
15
19
  /**
16
20
  * A list of optional arguments to pass into getWellKnownCatalog
17
21
  * user is the owner of the entity
@@ -23,6 +27,8 @@ export interface IGetWellKnownCatalogOptions {
23
27
  collectionNames?: WellKnownCollection[];
24
28
  /** additional filters to apply to the catalog scope */
25
29
  filters?: IFilter[];
30
+ /** optional context */
31
+ context?: IArcGISContext;
26
32
  }
27
33
  /**
28
34
  * Check if i18nScope is defined and not ending with a ".", if so add a "." at the end.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@esri/hub-common",
3
- "version": "14.134.1",
3
+ "version": "14.135.1",
4
4
  "description": "Common TypeScript types and utility functions for @esri/hub.js.",
5
5
  "main": "dist/node/index.js",
6
6
  "module": "dist/esm/index.js",