@esri/hub-common 14.39.1 → 14.41.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.
Files changed (56) hide show
  1. package/dist/esm/content/_internal/ContentBusinessRules.js +11 -6
  2. package/dist/esm/content/_internal/ContentBusinessRules.js.map +1 -1
  3. package/dist/esm/groups/_internal/GroupBusinessRules.js +10 -5
  4. package/dist/esm/groups/_internal/GroupBusinessRules.js.map +1 -1
  5. package/dist/esm/initiative-templates/_internal/InitiativeTemplateBusinessRules.js +25 -5
  6. package/dist/esm/initiative-templates/_internal/InitiativeTemplateBusinessRules.js.map +1 -1
  7. package/dist/esm/initiatives/_internal/InitiativeBusinessRules.js +13 -7
  8. package/dist/esm/initiatives/_internal/InitiativeBusinessRules.js.map +1 -1
  9. package/dist/esm/pages/_internal/PageBusinessRules.js +10 -5
  10. package/dist/esm/pages/_internal/PageBusinessRules.js.map +1 -1
  11. package/dist/esm/permissions/HubPermissionPolicies.js +20 -1
  12. package/dist/esm/permissions/HubPermissionPolicies.js.map +1 -1
  13. package/dist/esm/permissions/types/Permission.js +2 -0
  14. package/dist/esm/permissions/types/Permission.js.map +1 -1
  15. package/dist/esm/projects/_internal/ProjectBusinessRules.js +11 -7
  16. package/dist/esm/projects/_internal/ProjectBusinessRules.js.map +1 -1
  17. package/dist/esm/projects/defaults.js +2 -0
  18. package/dist/esm/projects/defaults.js.map +1 -1
  19. package/dist/esm/sites/_internal/SiteBusinessRules.js +15 -9
  20. package/dist/esm/sites/_internal/SiteBusinessRules.js.map +1 -1
  21. package/dist/esm/templates/_internal/TemplateBusinessRules.js +10 -5
  22. package/dist/esm/templates/_internal/TemplateBusinessRules.js.map +1 -1
  23. package/dist/node/content/_internal/ContentBusinessRules.js +11 -6
  24. package/dist/node/content/_internal/ContentBusinessRules.js.map +1 -1
  25. package/dist/node/groups/_internal/GroupBusinessRules.js +10 -5
  26. package/dist/node/groups/_internal/GroupBusinessRules.js.map +1 -1
  27. package/dist/node/initiative-templates/_internal/InitiativeTemplateBusinessRules.js +25 -5
  28. package/dist/node/initiative-templates/_internal/InitiativeTemplateBusinessRules.js.map +1 -1
  29. package/dist/node/initiatives/_internal/InitiativeBusinessRules.js +13 -7
  30. package/dist/node/initiatives/_internal/InitiativeBusinessRules.js.map +1 -1
  31. package/dist/node/pages/_internal/PageBusinessRules.js +10 -5
  32. package/dist/node/pages/_internal/PageBusinessRules.js.map +1 -1
  33. package/dist/node/permissions/HubPermissionPolicies.js +20 -1
  34. package/dist/node/permissions/HubPermissionPolicies.js.map +1 -1
  35. package/dist/node/permissions/types/Permission.js +2 -0
  36. package/dist/node/permissions/types/Permission.js.map +1 -1
  37. package/dist/node/projects/_internal/ProjectBusinessRules.js +11 -7
  38. package/dist/node/projects/_internal/ProjectBusinessRules.js.map +1 -1
  39. package/dist/node/projects/defaults.js +2 -0
  40. package/dist/node/projects/defaults.js.map +1 -1
  41. package/dist/node/sites/_internal/SiteBusinessRules.js +15 -9
  42. package/dist/node/sites/_internal/SiteBusinessRules.js.map +1 -1
  43. package/dist/node/templates/_internal/TemplateBusinessRules.js +10 -5
  44. package/dist/node/templates/_internal/TemplateBusinessRules.js.map +1 -1
  45. package/dist/types/content/_internal/ContentBusinessRules.d.ts +1 -1
  46. package/dist/types/core/traits/IWithViewSettings.d.ts +5 -1
  47. package/dist/types/core/types/Metrics.d.ts +8 -0
  48. package/dist/types/groups/_internal/GroupBusinessRules.d.ts +1 -1
  49. package/dist/types/initiative-templates/_internal/InitiativeTemplateBusinessRules.d.ts +1 -1
  50. package/dist/types/initiatives/_internal/InitiativeBusinessRules.d.ts +1 -1
  51. package/dist/types/pages/_internal/PageBusinessRules.d.ts +1 -1
  52. package/dist/types/permissions/types/Permission.d.ts +2 -1
  53. package/dist/types/projects/_internal/ProjectBusinessRules.d.ts +1 -1
  54. package/dist/types/sites/_internal/SiteBusinessRules.d.ts +1 -1
  55. package/dist/types/templates/_internal/TemplateBusinessRules.d.ts +1 -1
  56. package/package.json +1 -1
@@ -1,4 +1,4 @@
1
- import { IHubTimeline } from "../types";
1
+ import { IHubTimeline, IMetricDisplayConfig } from "../types";
2
2
  /**
3
3
  * Properties to be exclusively displayed on an entity's
4
4
  * pre-defined view
@@ -32,4 +32,8 @@ export interface IWithViewSettings {
32
32
  * timeline associated with an entity
33
33
  */
34
34
  timeline?: IHubTimeline;
35
+ /**
36
+ * configurations for how to display metrics in the ui
37
+ */
38
+ metricDisplays?: IMetricDisplayConfig[];
35
39
  }
@@ -183,3 +183,11 @@ export interface IExpression {
183
183
  */
184
184
  key?: string;
185
185
  }
186
+ /**
187
+ * Configuration for how to show a metric in the ui
188
+ */
189
+ export interface IMetricDisplayConfig {
190
+ metricId: string;
191
+ displayType: string;
192
+ [key: string]: any;
193
+ }
@@ -4,7 +4,7 @@ import { IPermissionPolicy } from "../../permissions";
4
4
  * These define the requirements any user must meet to perform related actions
5
5
  * @private
6
6
  */
7
- export declare const GroupPermissions: readonly ["hub:group", "hub:group:create", "hub:group:delete", "hub:group:edit", "hub:group:view", "hub:group:owner", "hub:group:workspace:overview", "hub:group:workspace:dashboard", "hub:group:workspace:details", "hub:group:workspace:discussion", "hub:group:workspace:settings", "hub:group:workspace:collaborators", "hub:group:workspace:content", "hub:group:workspace:members", "hub:group:shareContent", "hub:group:manage"];
7
+ export declare const GroupPermissions: readonly ["hub:group", "hub:group:create", "hub:group:delete", "hub:group:edit", "hub:group:view", "hub:group:owner", "hub:group:workspace", "hub:group:workspace:overview", "hub:group:workspace:dashboard", "hub:group:workspace:details", "hub:group:workspace:discussion", "hub:group:workspace:settings", "hub:group:workspace:collaborators", "hub:group:workspace:content", "hub:group:workspace:members", "hub:group:shareContent", "hub:group:manage"];
8
8
  /**
9
9
  * Group permission policies
10
10
  * @private
@@ -8,7 +8,7 @@ export declare const InitiativeTemplateDefaultFeatures: IFeatureFlags;
8
8
  * These define the requirements any user must meet to perform related actions
9
9
  * @private
10
10
  */
11
- export declare const InitiativeTemplatePermissions: readonly ["hub:initiativeTemplate", "hub:initiativeTemplate:create", "hub:initiativeTemplate:delete", "hub:initiativeTemplate:edit", "hub:initiativeTemplate:view", "hub:initiativeTemplate:workspace:overview", "hub:initiativeTemplate:workspace:dashboard", "hub:initiativeTemplate:workspace:details", "hub:initiativeTemplate:workspace:collaborators", "hub:initiativeTemplate:workspace:settings", "hub:initiativeTemplate:manage"];
11
+ export declare const InitiativeTemplatePermissions: readonly ["hub:initiativeTemplate", "hub:initiativeTemplate:create", "hub:initiativeTemplate:delete", "hub:initiativeTemplate:edit", "hub:initiativeTemplate:view", "hub:initiativeTemplate:workspace", "hub:initiativeTemplate:workspace:overview", "hub:initiativeTemplate:workspace:dashboard", "hub:initiativeTemplate:workspace:details", "hub:initiativeTemplate:workspace:collaborators", "hub:initiativeTemplate:workspace:settings", "hub:initiativeTemplate:manage"];
12
12
  /**
13
13
  * Initiative Template policies
14
14
  * @private
@@ -8,7 +8,7 @@ export declare const InitiativeDefaultFeatures: IFeatureFlags;
8
8
  * These define the requirements any user must meet to perform related actions
9
9
  * @private
10
10
  */
11
- export declare const InitiativePermissions: readonly ["hub:initiative", "hub:initiative:create", "hub:initiative:delete", "hub:initiative:edit", "hub:initiative:view", "hub:initiative:events", "hub:initiative:content", "hub:initiative:discussions", "hub:initiative:workspace:overview", "hub:initiative:workspace:dashboard", "hub:initiative:workspace:details", "hub:initiative:workspace:settings", "hub:initiative:workspace:collaborators", "hub:initiative:workspace:content", "hub:initiative:workspace:metrics", "hub:initiative:manage"];
11
+ export declare const InitiativePermissions: readonly ["hub:initiative", "hub:initiative:create", "hub:initiative:delete", "hub:initiative:edit", "hub:initiative:view", "hub:initiative:events", "hub:initiative:content", "hub:initiative:discussions", "hub:initiative:workspace", "hub:initiative:workspace:overview", "hub:initiative:workspace:dashboard", "hub:initiative:workspace:details", "hub:initiative:workspace:settings", "hub:initiative:workspace:collaborators", "hub:initiative:workspace:content", "hub:initiative:workspace:metrics", "hub:initiative:manage"];
12
12
  /**
13
13
  * Initiative permission policies
14
14
  * @private
@@ -8,7 +8,7 @@ export declare const PageDefaultFeatures: IFeatureFlags;
8
8
  * These define the requirements any user must meet to perform related actions
9
9
  * @private
10
10
  */
11
- export declare const PagePermissions: readonly ["hub:page", "hub:page:create", "hub:page:delete", "hub:page:edit", "hub:page:view", "hub:page:workspace:overview", "hub:page:workspace:dashboard", "hub:page:workspace:details", "hub:page:workspace:settings", "hub:page:workspace:collaborators", "hub:page:manage"];
11
+ export declare const PagePermissions: readonly ["hub:page", "hub:page:create", "hub:page:delete", "hub:page:edit", "hub:page:view", "hub:page:workspace", "hub:page:workspace:overview", "hub:page:workspace:dashboard", "hub:page:workspace:details", "hub:page:workspace:settings", "hub:page:workspace:collaborators", "hub:page:manage"];
12
12
  /**
13
13
  * Page permission policies
14
14
  * @private
@@ -14,10 +14,11 @@ import { TemplatePermissions } from "../../templates/_internal/TemplateBusinessR
14
14
  * otherwise Permission devolves into just a string type
15
15
  */
16
16
  declare const TempPermissions: string[];
17
+ declare const SystemPermissions: string[];
17
18
  /**
18
19
  * Defines the possible values for Permissions
19
20
  */
20
- export declare type Permission = (typeof SitePermissions)[number] | (typeof ProjectPermissions)[number] | (typeof InitiativePermissions)[number] | (typeof ContentPermissions)[number] | (typeof GroupPermissions)[number] | (typeof PagePermissions)[number] | (typeof PlatformPermissions)[number] | (typeof TempPermissions)[number] | (typeof DiscussionPermissions)[number] | (typeof InitiativeTemplatePermissions)[number] | (typeof TemplatePermissions)[number];
21
+ export declare type Permission = (typeof SitePermissions)[number] | (typeof ProjectPermissions)[number] | (typeof InitiativePermissions)[number] | (typeof ContentPermissions)[number] | (typeof GroupPermissions)[number] | (typeof PagePermissions)[number] | (typeof PlatformPermissions)[number] | (typeof TempPermissions)[number] | (typeof DiscussionPermissions)[number] | (typeof InitiativeTemplatePermissions)[number] | (typeof TemplatePermissions)[number] | (typeof SystemPermissions)[number];
21
22
  /**
22
23
  * Validate a Permission
23
24
  * @param permission
@@ -8,7 +8,7 @@ export declare const ProjectDefaultFeatures: IFeatureFlags;
8
8
  * These define the requirements any user must meet to perform related actions
9
9
  * @private
10
10
  */
11
- export declare const ProjectPermissions: readonly ["hub:project", "hub:project:create", "hub:project:delete", "hub:project:edit", "hub:project:view", "hub:project:owner", "hub:project:events", "hub:project:content", "hub:project:discussions", "hub:project:workspace:overview", "hub:project:workspace:dashboard", "hub:project:workspace:details", "hub:project:workspace:settings", "hub:project:workspace:collaborators", "hub:project:workspace:content", "hub:project:workspace:metrics", "hub:project:manage"];
11
+ export declare const ProjectPermissions: readonly ["hub:project", "hub:project:create", "hub:project:delete", "hub:project:edit", "hub:project:view", "hub:project:owner", "hub:project:events", "hub:project:content", "hub:project:discussions", "hub:project:workspace", "hub:project:workspace:overview", "hub:project:workspace:dashboard", "hub:project:workspace:details", "hub:project:workspace:settings", "hub:project:workspace:collaborators", "hub:project:workspace:content", "hub:project:workspace:metrics", "hub:project:manage"];
12
12
  /**
13
13
  * Project permission policies
14
14
  * @private
@@ -7,7 +7,7 @@ export declare const SiteDefaultFeatures: IFeatureFlags;
7
7
  * Site Permissions
8
8
  * This feeds into the Permissions type
9
9
  */
10
- export declare const SitePermissions: readonly ["hub:site", "hub:site:create", "hub:site:delete", "hub:site:edit", "hub:site:view", "hub:site:owner", "hub:site:events", "hub:site:content", "hub:site:discussions", "hub:site:feature:follow", "hub:site:feature:discussions", "hub:site:workspace:overview", "hub:site:workspace:dashboard", "hub:site:workspace:details", "hub:site:workspace:settings", "hub:site:workspace:collaborators", "hub:site:workspace:content", "hub:site:workspace:metrics", "hub:site:workspace:followers", "hub:site:workspace:followers:member", "hub:site:workspace:followers:manager", "hub:site:workspace:discussion", "hub:site:manage"];
10
+ export declare const SitePermissions: readonly ["hub:site", "hub:site:create", "hub:site:delete", "hub:site:edit", "hub:site:view", "hub:site:owner", "hub:site:events", "hub:site:content", "hub:site:discussions", "hub:site:feature:follow", "hub:site:feature:discussions", "hub:site:workspace", "hub:site:workspace:overview", "hub:site:workspace:dashboard", "hub:site:workspace:details", "hub:site:workspace:settings", "hub:site:workspace:collaborators", "hub:site:workspace:content", "hub:site:workspace:metrics", "hub:site:workspace:followers", "hub:site:workspace:followers:member", "hub:site:workspace:followers:manager", "hub:site:workspace:discussion", "hub:site:manage"];
11
11
  /**
12
12
  * Site permission policies
13
13
  * @private
@@ -9,7 +9,7 @@ export declare const TemplateDefaultFeatures: IFeatureFlags;
9
9
  * Template permissions: these define the requirements
10
10
  * any user must meet to perform related actions
11
11
  */
12
- export declare const TemplatePermissions: readonly ["hub:template", "hub:template:create", "hub:template:delete", "hub:template:edit", "hub:template:manage", "hub:template:view", "hub:template:workspace:overview", "hub:template:workspace:details", "hub:template:workspace:dashboard", "hub:template:workspace:collaborators", "hub:template:workspace:settings"];
12
+ export declare const TemplatePermissions: readonly ["hub:template", "hub:template:create", "hub:template:delete", "hub:template:edit", "hub:template:manage", "hub:template:view", "hub:template:workspace", "hub:template:workspace:overview", "hub:template:workspace:details", "hub:template:workspace:dashboard", "hub:template:workspace:collaborators", "hub:template:workspace:settings"];
13
13
  /**
14
14
  * @private
15
15
  * Template permission policies
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@esri/hub-common",
3
- "version": "14.39.1",
3
+ "version": "14.41.0",
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",