@esri/hub-common 14.144.0 → 14.146.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 (48) hide show
  1. package/dist/esm/core/schemas/internal/getEditorSchemas.js +0 -4
  2. package/dist/esm/core/schemas/internal/getEditorSchemas.js.map +1 -1
  3. package/dist/esm/core/schemas/internal/metrics/InitiativeUiSchemaMetrics.js +18 -0
  4. package/dist/esm/core/schemas/internal/metrics/InitiativeUiSchemaMetrics.js.map +1 -1
  5. package/dist/esm/core/schemas/internal/metrics/ProjectUiSchemaMetrics.js +18 -0
  6. package/dist/esm/core/schemas/internal/metrics/ProjectUiSchemaMetrics.js.map +1 -1
  7. package/dist/esm/events/_internal/EventSchemaEdit.js +16 -7
  8. package/dist/esm/events/_internal/EventSchemaEdit.js.map +1 -1
  9. package/dist/esm/events/_internal/EventUiSchemaEdit.js +77 -2
  10. package/dist/esm/events/_internal/EventUiSchemaEdit.js.map +1 -1
  11. package/dist/esm/events/_internal/PropertyMapper.js +34 -7
  12. package/dist/esm/events/_internal/PropertyMapper.js.map +1 -1
  13. package/dist/esm/events/_internal/validations.js +20 -2
  14. package/dist/esm/events/_internal/validations.js.map +1 -1
  15. package/dist/esm/events/defaults.js +6 -2
  16. package/dist/esm/events/defaults.js.map +1 -1
  17. package/dist/esm/events/edit.js +4 -2
  18. package/dist/esm/events/edit.js.map +1 -1
  19. package/dist/esm/events/types.js +5 -5
  20. package/dist/esm/events/types.js.map +1 -1
  21. package/dist/node/core/schemas/internal/getEditorSchemas.js +0 -4
  22. package/dist/node/core/schemas/internal/getEditorSchemas.js.map +1 -1
  23. package/dist/node/core/schemas/internal/metrics/InitiativeUiSchemaMetrics.js +19 -1
  24. package/dist/node/core/schemas/internal/metrics/InitiativeUiSchemaMetrics.js.map +1 -1
  25. package/dist/node/core/schemas/internal/metrics/ProjectUiSchemaMetrics.js +19 -1
  26. package/dist/node/core/schemas/internal/metrics/ProjectUiSchemaMetrics.js.map +1 -1
  27. package/dist/node/events/_internal/EventSchemaEdit.js +14 -5
  28. package/dist/node/events/_internal/EventSchemaEdit.js.map +1 -1
  29. package/dist/node/events/_internal/EventUiSchemaEdit.js +76 -1
  30. package/dist/node/events/_internal/EventUiSchemaEdit.js.map +1 -1
  31. package/dist/node/events/_internal/PropertyMapper.js +33 -6
  32. package/dist/node/events/_internal/PropertyMapper.js.map +1 -1
  33. package/dist/node/events/_internal/validations.js +20 -2
  34. package/dist/node/events/_internal/validations.js.map +1 -1
  35. package/dist/node/events/defaults.js +5 -1
  36. package/dist/node/events/defaults.js.map +1 -1
  37. package/dist/node/events/edit.js +4 -2
  38. package/dist/node/events/edit.js.map +1 -1
  39. package/dist/node/events/types.js +6 -6
  40. package/dist/node/events/types.js.map +1 -1
  41. package/dist/types/core/schemas/internal/metrics/InitiativeUiSchemaMetrics.d.ts +13 -1
  42. package/dist/types/core/schemas/internal/metrics/ProjectUiSchemaMetrics.d.ts +13 -1
  43. package/dist/types/core/types/IHubEvent.d.ts +2 -2
  44. package/dist/types/events/_internal/EventUiSchemaEdit.d.ts +2 -2
  45. package/dist/types/events/_internal/validations.d.ts +22 -2
  46. package/dist/types/events/edit.d.ts +1 -1
  47. package/dist/types/events/types.d.ts +1 -1
  48. package/package.json +1 -1
@@ -1,5 +1,5 @@
1
1
  import { IArcGISContext } from "../../../../ArcGISContext";
2
- import { IUiSchema } from "../../types";
2
+ import { IConfigurationValues, IUiSchema } from "../../types";
3
3
  import { EntityEditorOptions } from "../EditorOptions";
4
4
  /**
5
5
  * @private
@@ -14,3 +14,15 @@ import { EntityEditorOptions } from "../EditorOptions";
14
14
  * @returns
15
15
  */
16
16
  export declare const buildUiSchema: (i18nScope: string, config: EntityEditorOptions, context: IArcGISContext) => Promise<IUiSchema>;
17
+ /**
18
+ * @private
19
+ * constructs the default values for the initiative metrics editor.
20
+ * This is used to pre-populate the metrics editor with specific default values
21
+ * that are different from the Schema default values, or contain translated
22
+ * values.
23
+ * @param i18nScope
24
+ * @param options
25
+ * @param context
26
+ * @returns
27
+ */
28
+ export declare const buildDefaults: (i18nScope: string, options: EntityEditorOptions, context: IArcGISContext) => Promise<IConfigurationValues>;
@@ -1,5 +1,5 @@
1
1
  import { IArcGISContext } from "../../../../ArcGISContext";
2
- import { IUiSchema } from "../../types";
2
+ import { IConfigurationValues, IUiSchema } from "../../types";
3
3
  import { EntityEditorOptions } from "../EditorOptions";
4
4
  /**
5
5
  * @private
@@ -10,3 +10,15 @@ import { EntityEditorOptions } from "../EditorOptions";
10
10
  * @returns
11
11
  */
12
12
  export declare const buildUiSchema: (i18nScope: string, config: EntityEditorOptions, context: IArcGISContext) => Promise<IUiSchema>;
13
+ /**
14
+ * @private
15
+ * constructs the default values for the project metrics editor.
16
+ * This is used to pre-populate the metrics editor with specific default values
17
+ * that are different from the Schema default values, or contain translated
18
+ * values.
19
+ * @param i18nScope
20
+ * @param options
21
+ * @param context
22
+ * @returns
23
+ */
24
+ export declare const buildDefaults: (i18nScope: string, options: EntityEditorOptions, context: IArcGISContext) => Promise<IConfigurationValues>;
@@ -1,4 +1,4 @@
1
- import { HubEventAttendanceType, HubEventOnlineCapacityType } from "../../events/types";
1
+ import { HubEventAttendanceType, HubEventCapacityType } from "../../events/types";
2
2
  import { IWithPermissions, IWithSlug } from "../traits";
3
3
  import { IHubItemEntity, IHubItemEntityEditor } from "./IHubItemEntity";
4
4
  /**
@@ -93,7 +93,7 @@ export interface IHubEvent extends IHubItemEntity, IWithPermissions, IWithSlug {
93
93
  /**
94
94
  * The capacity type for an online event, either `unlimited` or `fixed`
95
95
  */
96
- onlineCapacityType?: HubEventOnlineCapacityType;
96
+ onlineCapacityType?: HubEventCapacityType;
97
97
  /**
98
98
  * The details for an online event
99
99
  */
@@ -1,10 +1,10 @@
1
1
  import { IUiSchema } from "../../core/schemas/types";
2
2
  import { IArcGISContext } from "../../ArcGISContext";
3
- import { EntityEditorOptions } from "../../core/schemas/internal/EditorOptions";
3
+ import { IHubEvent } from "../../core/types/IHubEvent";
4
4
  /**
5
5
  * @private
6
6
  * constructs the complete edit uiSchema for Hub Events.
7
7
  * This defines how the schema properties should be
8
8
  * rendered in the event creation experience
9
9
  */
10
- export declare const buildUiSchema: (i18nScope: string, options: EntityEditorOptions, context: IArcGISContext) => Promise<IUiSchema>;
10
+ export declare const buildUiSchema: (i18nScope: string, options: Partial<IHubEvent>, context: IArcGISContext) => Promise<IUiSchema>;
@@ -1,4 +1,4 @@
1
- import { HubEventAttendanceType, HubEventOnlineCapacityType } from "../types";
1
+ import { HubEventAttendanceType, HubEventCapacityType } from "../types";
2
2
  export declare const TIME_VALIDATIONS_WHEN_NOT_ALL_DAY: {
3
3
  if: {
4
4
  properties: {
@@ -40,7 +40,7 @@ export declare const FIXED_ONLINE_ATTENDANCE_VALIDATIONS: {
40
40
  if: {
41
41
  properties: {
42
42
  onlineCapacityType: {
43
- const: HubEventOnlineCapacityType;
43
+ const: HubEventCapacityType;
44
44
  };
45
45
  attendanceType: {
46
46
  enum: HubEventAttendanceType[];
@@ -56,3 +56,23 @@ export declare const FIXED_ONLINE_ATTENDANCE_VALIDATIONS: {
56
56
  };
57
57
  };
58
58
  };
59
+ export declare const FIXED_IN_PERSON_ATTENDANCE_VALIDATIONS: {
60
+ if: {
61
+ properties: {
62
+ inPersonCapacityType: {
63
+ const: HubEventCapacityType;
64
+ };
65
+ attendanceType: {
66
+ enum: HubEventAttendanceType[];
67
+ };
68
+ };
69
+ };
70
+ then: {
71
+ required: string[];
72
+ properties: {
73
+ inPersonCapacity: {
74
+ minimum: number;
75
+ };
76
+ };
77
+ };
78
+ };
@@ -18,7 +18,7 @@ export declare function createHubEvent(partialEvent: Partial<IHubEvent>, request
18
18
  * @param requestOptions user request options
19
19
  * @returns promise that resolves a IHubEvent
20
20
  */
21
- export declare function updateHubEvent(event: IHubEvent, requestOptions: IHubRequestOptions): Promise<IHubEvent>;
21
+ export declare function updateHubEvent(partialEvent: Partial<IHubEvent>, requestOptions: IHubRequestOptions): Promise<IHubEvent>;
22
22
  /**
23
23
  * @private
24
24
  * Remove an Event Attendee
@@ -3,7 +3,7 @@ export declare enum HubEventAttendanceType {
3
3
  Online = "online",
4
4
  Both = "both"
5
5
  }
6
- export declare enum HubEventOnlineCapacityType {
6
+ export declare enum HubEventCapacityType {
7
7
  Unlimited = "unlimited",
8
8
  Fixed = "fixed"
9
9
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@esri/hub-common",
3
- "version": "14.144.0",
3
+ "version": "14.146.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",