@esri/hub-common 14.146.1 → 14.148.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 (97) hide show
  1. package/dist/esm/content/_internal/ContentUiSchemaSettings.js +2 -2
  2. package/dist/esm/content/_internal/ContentUiSchemaSettings.js.map +1 -1
  3. package/dist/esm/content/_internal/computeProps.js +1 -0
  4. package/dist/esm/content/_internal/computeProps.js.map +1 -1
  5. package/dist/esm/content/edit.js +6 -2
  6. package/dist/esm/content/edit.js.map +1 -1
  7. package/dist/esm/content/fetch.js +2 -2
  8. package/dist/esm/content/fetch.js.map +1 -1
  9. package/dist/esm/content/hostedServiceUtils.js +46 -6
  10. package/dist/esm/content/hostedServiceUtils.js.map +1 -1
  11. package/dist/esm/core/schemas/internal/getEditorSchemas.js +1 -0
  12. package/dist/esm/core/schemas/internal/getEditorSchemas.js.map +1 -1
  13. package/dist/esm/core/schemas/shared/HubItemEntitySchema.js +2 -1
  14. package/dist/esm/core/schemas/shared/HubItemEntitySchema.js.map +1 -1
  15. package/dist/esm/core/schemas/shared/subschemas.js +15 -0
  16. package/dist/esm/core/schemas/shared/subschemas.js.map +1 -1
  17. package/dist/esm/core/types/IHubMapSettings.js +1 -0
  18. package/dist/esm/core/types/IHubMapSettings.js.map +1 -0
  19. package/dist/esm/core/types/index.js +1 -0
  20. package/dist/esm/core/types/index.js.map +1 -1
  21. package/dist/esm/downloads/_internal/canUseExportItemFlow.js +2 -2
  22. package/dist/esm/downloads/_internal/canUseExportItemFlow.js.map +1 -1
  23. package/dist/esm/downloads/_internal/format-fetchers/getCreateReplicaFormats.js +6 -1
  24. package/dist/esm/downloads/_internal/format-fetchers/getCreateReplicaFormats.js.map +1 -1
  25. package/dist/esm/downloads/canUseCreateReplica.js +3 -3
  26. package/dist/esm/downloads/canUseCreateReplica.js.map +1 -1
  27. package/dist/esm/downloads/canUseHubDownloadApi.js +3 -3
  28. package/dist/esm/downloads/canUseHubDownloadApi.js.map +1 -1
  29. package/dist/esm/downloads/canUseHubDownloadSystem.js +8 -0
  30. package/dist/esm/downloads/canUseHubDownloadSystem.js.map +1 -0
  31. package/dist/esm/downloads/fetchDownloadFormats.js +1 -1
  32. package/dist/esm/downloads/fetchDownloadFormats.js.map +1 -1
  33. package/dist/esm/downloads/getHubDownloadApiFormats.js +23 -0
  34. package/dist/esm/downloads/getHubDownloadApiFormats.js.map +1 -0
  35. package/dist/esm/downloads/index.js +2 -0
  36. package/dist/esm/downloads/index.js.map +1 -1
  37. package/dist/esm/initiatives/_internal/InitiativeSchema.js +1 -0
  38. package/dist/esm/initiatives/_internal/InitiativeSchema.js.map +1 -1
  39. package/dist/esm/initiatives/_internal/InitiativeUiSchemaSettings.js +33 -0
  40. package/dist/esm/initiatives/_internal/InitiativeUiSchemaSettings.js.map +1 -0
  41. package/dist/node/content/_internal/ContentUiSchemaSettings.js +1 -1
  42. package/dist/node/content/_internal/ContentUiSchemaSettings.js.map +1 -1
  43. package/dist/node/content/_internal/computeProps.js +1 -0
  44. package/dist/node/content/_internal/computeProps.js.map +1 -1
  45. package/dist/node/content/edit.js +5 -1
  46. package/dist/node/content/edit.js.map +1 -1
  47. package/dist/node/content/fetch.js +2 -2
  48. package/dist/node/content/fetch.js.map +1 -1
  49. package/dist/node/content/hostedServiceUtils.js +50 -7
  50. package/dist/node/content/hostedServiceUtils.js.map +1 -1
  51. package/dist/node/core/schemas/internal/getEditorSchemas.js +1 -0
  52. package/dist/node/core/schemas/internal/getEditorSchemas.js.map +1 -1
  53. package/dist/node/core/schemas/shared/HubItemEntitySchema.js +1 -0
  54. package/dist/node/core/schemas/shared/HubItemEntitySchema.js.map +1 -1
  55. package/dist/node/core/schemas/shared/subschemas.js +16 -1
  56. package/dist/node/core/schemas/shared/subschemas.js.map +1 -1
  57. package/dist/node/core/types/IHubMapSettings.js +3 -0
  58. package/dist/node/core/types/IHubMapSettings.js.map +1 -0
  59. package/dist/node/core/types/index.js +1 -0
  60. package/dist/node/core/types/index.js.map +1 -1
  61. package/dist/node/downloads/_internal/canUseExportItemFlow.js +1 -1
  62. package/dist/node/downloads/_internal/canUseExportItemFlow.js.map +1 -1
  63. package/dist/node/downloads/_internal/format-fetchers/getCreateReplicaFormats.js +6 -1
  64. package/dist/node/downloads/_internal/format-fetchers/getCreateReplicaFormats.js.map +1 -1
  65. package/dist/node/downloads/canUseCreateReplica.js +2 -2
  66. package/dist/node/downloads/canUseCreateReplica.js.map +1 -1
  67. package/dist/node/downloads/canUseHubDownloadApi.js +3 -3
  68. package/dist/node/downloads/canUseHubDownloadApi.js.map +1 -1
  69. package/dist/node/downloads/canUseHubDownloadSystem.js +12 -0
  70. package/dist/node/downloads/canUseHubDownloadSystem.js.map +1 -0
  71. package/dist/node/downloads/fetchDownloadFormats.js +1 -1
  72. package/dist/node/downloads/fetchDownloadFormats.js.map +1 -1
  73. package/dist/node/downloads/getHubDownloadApiFormats.js +27 -0
  74. package/dist/node/downloads/getHubDownloadApiFormats.js.map +1 -0
  75. package/dist/node/downloads/index.js +2 -0
  76. package/dist/node/downloads/index.js.map +1 -1
  77. package/dist/node/initiatives/_internal/InitiativeSchema.js +1 -0
  78. package/dist/node/initiatives/_internal/InitiativeSchema.js.map +1 -1
  79. package/dist/node/initiatives/_internal/InitiativeUiSchemaSettings.js +36 -0
  80. package/dist/node/initiatives/_internal/InitiativeUiSchemaSettings.js.map +1 -0
  81. package/dist/types/content/hostedServiceUtils.d.ts +31 -3
  82. package/dist/types/core/schemas/shared/subschemas.d.ts +15 -0
  83. package/dist/types/core/schemas/types.d.ts +2 -2
  84. package/dist/types/core/traits/IWithViewSettings.d.ts +5 -1
  85. package/dist/types/core/types/IHubEditableContent.d.ts +8 -3
  86. package/dist/types/core/types/IHubMapSettings.d.ts +6 -0
  87. package/dist/types/core/types/index.d.ts +1 -0
  88. package/dist/types/downloads/canUseHubDownloadSystem.d.ts +2 -0
  89. package/dist/types/downloads/{_internal/format-fetchers/getHubDownloadApiFormats.d.ts → getHubDownloadApiFormats.d.ts} +2 -3
  90. package/dist/types/downloads/index.d.ts +2 -0
  91. package/dist/types/initiatives/_internal/InitiativeSchema.d.ts +1 -1
  92. package/dist/types/initiatives/_internal/InitiativeUiSchemaSettings.d.ts +10 -0
  93. package/package.json +1 -1
  94. package/dist/esm/downloads/_internal/format-fetchers/getHubDownloadApiFormats.js +0 -18
  95. package/dist/esm/downloads/_internal/format-fetchers/getHubDownloadApiFormats.js.map +0 -1
  96. package/dist/node/downloads/_internal/format-fetchers/getHubDownloadApiFormats.js +0 -22
  97. package/dist/node/downloads/_internal/format-fetchers/getHubDownloadApiFormats.js.map +0 -1
@@ -10,6 +10,7 @@ exports.InitiativeEditorTypes = [
10
10
  "hub:initiative:create",
11
11
  "hub:initiative:metrics",
12
12
  "hub:initiative:associations",
13
+ "hub:initiative:settings",
13
14
  ];
14
15
  /**
15
16
  * defines the JSON schema for a Hub Initiative's editable fields
@@ -1 +1 @@
1
- {"version":3,"file":"InitiativeSchema.js","sourceRoot":"","sources":["../../../../src/initiatives/_internal/InitiativeSchema.ts"],"names":[],"mappings":";;;AAAA,mFAAgF;AAEhF,uFAAoF;AACpF,uCAA8C;AAC9C,iFAKyD;AAG5C,QAAA,qBAAqB,GAAG;IACnC,qBAAqB;IACrB,uBAAuB;IACvB,wBAAwB;IACxB,6BAA6B;CACrB,CAAC;AAEX;;GAEG;AACU,QAAA,gBAAgB,GAAyB,gCACjD,yCAAmB,KACtB,UAAU,kCACL,yCAAmB,CAAC,UAAU,KACjC,OAAO,EAAE;YACP,IAAI,EAAE,OAAO;YACb,KAAK,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;SAC1B,EACD,MAAM,EAAE;YACN,IAAI,EAAE,QAAQ;YACd,OAAO,EAAE,uBAAe,CAAC,UAAU;YACnC,IAAI,EAAE,MAAM,CAAC,IAAI,CAAC,uBAAe,CAAC;SACnC,EACD,OAAO,EAAE;YACP,IAAI,EAAE,QAAQ;YACd,QAAQ,EAAE,CAAC,WAAW,CAAC;YACvB,UAAU,EAAE,2BAAY,CAAC,UAAU;SACpC,KAEH,KAAK,EAAE;QACL,8CAAgC;QAChC,0CAA4B;QAC5B,uCAAyB;QACzB,gCAAkB;KACnB,GACsB,CAAC"}
1
+ {"version":3,"file":"InitiativeSchema.js","sourceRoot":"","sources":["../../../../src/initiatives/_internal/InitiativeSchema.ts"],"names":[],"mappings":";;;AAAA,mFAAgF;AAEhF,uFAAoF;AACpF,uCAA8C;AAC9C,iFAKyD;AAG5C,QAAA,qBAAqB,GAAG;IACnC,qBAAqB;IACrB,uBAAuB;IACvB,wBAAwB;IACxB,6BAA6B;IAC7B,yBAAyB;CACjB,CAAC;AAEX;;GAEG;AACU,QAAA,gBAAgB,GAAyB,gCACjD,yCAAmB,KACtB,UAAU,kCACL,yCAAmB,CAAC,UAAU,KACjC,OAAO,EAAE;YACP,IAAI,EAAE,OAAO;YACb,KAAK,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;SAC1B,EACD,MAAM,EAAE;YACN,IAAI,EAAE,QAAQ;YACd,OAAO,EAAE,uBAAe,CAAC,UAAU;YACnC,IAAI,EAAE,MAAM,CAAC,IAAI,CAAC,uBAAe,CAAC;SACnC,EACD,OAAO,EAAE;YACP,IAAI,EAAE,QAAQ;YACd,QAAQ,EAAE,CAAC,WAAW,CAAC;YACvB,UAAU,EAAE,2BAAY,CAAC,UAAU;SACpC,KAEH,KAAK,EAAE;QACL,8CAAgC;QAChC,0CAA4B;QAC5B,uCAAyB;QACzB,gCAAkB;KACnB,GACsB,CAAC"}
@@ -0,0 +1,36 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.buildUiSchema = void 0;
4
+ /**
5
+ * @private
6
+ * constructs the settings uiSchema for Hub Initiatives.
7
+ * This defines how the schema should be rendered
8
+ * in the initiative settings pane
9
+ */
10
+ exports.buildUiSchema = async (i18nScope, options, context) => {
11
+ return {
12
+ type: "Layout",
13
+ elements: [
14
+ {
15
+ type: "Section",
16
+ labelKey: `${i18nScope}.sections.mapSettings.label`,
17
+ elements: [
18
+ {
19
+ type: "Control",
20
+ scope: "/properties/view/properties/mapSettings",
21
+ labelKey: `${i18nScope}.fields.mapSettings.label`,
22
+ options: {
23
+ type: "Control",
24
+ control: "hub-composite-input-map-settings",
25
+ // the settings that are visible for configuring the map
26
+ visibleSettings: ["gallery"],
27
+ // if the map preview is displayed
28
+ showPreview: true,
29
+ },
30
+ },
31
+ ],
32
+ },
33
+ ],
34
+ };
35
+ };
36
+ //# sourceMappingURL=InitiativeUiSchemaSettings.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"InitiativeUiSchemaSettings.js","sourceRoot":"","sources":["../../../../src/initiatives/_internal/InitiativeUiSchemaSettings.ts"],"names":[],"mappings":";;;AAIA;;;;;GAKG;AACU,QAAA,aAAa,GAAG,KAAK,EAChC,SAAiB,EACjB,OAAgC,EAChC,OAAuB,EACH,EAAE;IACtB,OAAO;QACL,IAAI,EAAE,QAAQ;QACd,QAAQ,EAAE;YACR;gBACE,IAAI,EAAE,SAAS;gBACf,QAAQ,EAAE,GAAG,SAAS,6BAA6B;gBACnD,QAAQ,EAAE;oBACR;wBACE,IAAI,EAAE,SAAS;wBACf,KAAK,EAAE,yCAAyC;wBAChD,QAAQ,EAAE,GAAG,SAAS,2BAA2B;wBACjD,OAAO,EAAE;4BACP,IAAI,EAAE,SAAS;4BACf,OAAO,EAAE,kCAAkC;4BAC3C,wDAAwD;4BACxD,eAAe,EAAE,CAAC,SAAS,CAAC;4BAC5B,kCAAkC;4BAClC,WAAW,EAAE,IAAI;yBAClB;qBACF;iBACF;aACF;SACF;KACF,CAAC;AACJ,CAAC,CAAC"}
@@ -2,19 +2,47 @@ import { IFeatureServiceDefinition } from "@esri/arcgis-rest-feature-layer";
2
2
  import { IItem } from "@esri/arcgis-rest-portal";
3
3
  import { IHubEditableContent } from "../core/types/IHubEditableContent";
4
4
  /**
5
+ * DEPRECATED: This will be removed in the next breaking version. Use "isHostedFeatureServiceMainItem" instead.
5
6
  * Determines whether an item represents a hosted feature service
6
7
  * @param item item to check
7
8
  * @returns whether the item represents a hosted feature service
8
9
  */
9
10
  export declare function isHostedFeatureServiceItem(item: IItem): boolean;
10
11
  /**
11
- * Determines whether an entity represents a hosted feature service
12
+ * Determines whether an item represents the main item of a hosted feature service
13
+ * (i.e. the item that was created when the service was published, not an item that
14
+ * referenced the service via url after it was created).
15
+ *
16
+ * NOTE: This check works for both hosted feature service items created in ArcGIS Online
17
+ * and in ArcGIS Enterprise.
18
+ *
12
19
  * @param item item to check
13
- * @returns whether the item represents a hosted feature service
20
+ * @returns whether the item passes the hosted feature service check
21
+ */
22
+ export declare function isHostedFeatureServiceMainItem(item: IItem): boolean;
23
+ /**
24
+ * DEPRECATED: This will be removed in the next breaking version Use "isHostedFeatureServiceMainEntity" instead
25
+ * Determines whether an entity represents a hosted feature service
26
+ * @param content content entity to check
27
+ * @returns
14
28
  */
15
29
  export declare function isHostedFeatureServiceEntity(content: IHubEditableContent): boolean;
30
+ /**
31
+ * Determines whether an entity represents the main entity of a hosted feature service
32
+ * (i.e. the entity that was created when the service was published, not an entity that
33
+ * referenced the service via url after it was created)
34
+ *
35
+ * NOTE: This check works for both hosted feature service entities created in ArcGIS Online
36
+ * and in ArcGIS Enterprise.
37
+ *
38
+ * @param content content entity to check
39
+ * @returns
40
+ */
41
+ export declare function isHostedFeatureServiceMainEntity(content: IHubEditableContent): boolean;
42
+ export declare function isAGOFeatureServiceUrl(url: string): boolean;
16
43
  export declare enum ServiceCapabilities {
17
- EXTRACT = "Extract"
44
+ EXTRACT = "Extract",
45
+ QUERY = "Query"
18
46
  }
19
47
  /**
20
48
  * Returns a whether a service has a capability
@@ -46,6 +46,21 @@ export declare const ENTITY_LOCATION_SCHEMA: {
46
46
  type: string;
47
47
  };
48
48
  };
49
+ /**
50
+ * defines the JSON schema for the map configuration settings
51
+ */
52
+ export declare const ENTITY_MAP_SCHEMA: {
53
+ type: string;
54
+ properties: {
55
+ baseViewItemId: {
56
+ type: string;
57
+ items: {
58
+ type: string;
59
+ };
60
+ maxItems: number;
61
+ };
62
+ };
63
+ };
49
64
  export declare const ENTITY_IMAGE_SCHEMA: {
50
65
  type: string;
51
66
  properties: {
@@ -12,7 +12,7 @@ export interface IEditorConfig {
12
12
  * to the supported/defined uiSchema configurations
13
13
  */
14
14
  export declare type EntityEditorType = (typeof validEntityEditorTypes)[number];
15
- export declare const validEntityEditorTypes: readonly ["hub:project:create", "hub:project:edit", "hub:project:metrics", "hub:content:edit", "hub:content:settings", "hub:content:discussions", "hub:initiative:edit", "hub:initiative:create", "hub:initiative:metrics", "hub:initiative:associations", "hub:site:edit", "hub:site:create", "hub:site:followers", "hub:site:discussions", "hub:site:settings", "hub:discussion:edit", "hub:discussion:create", "hub:discussion:settings", "hub:page:edit", "hub:template:edit", "hub:group:edit", "hub:group:settings", "hub:group:discussions", "hub:group:create:followers", "hub:group:create:association", "hub:group:create:view", "hub:group:create:edit", "hub:initiativeTemplate:edit", "hub:survey:edit", "hub:survey:settings", "hub:event:create", "hub:event:edit", "hub:event:attendees"];
15
+ export declare const validEntityEditorTypes: readonly ["hub:project:create", "hub:project:edit", "hub:project:metrics", "hub:content:edit", "hub:content:settings", "hub:content:discussions", "hub:initiative:edit", "hub:initiative:create", "hub:initiative:metrics", "hub:initiative:associations", "hub:initiative:settings", "hub:site:edit", "hub:site:create", "hub:site:followers", "hub:site:discussions", "hub:site:settings", "hub:discussion:edit", "hub:discussion:create", "hub:discussion:settings", "hub:page:edit", "hub:template:edit", "hub:group:edit", "hub:group:settings", "hub:group:discussions", "hub:group:create:followers", "hub:group:create:association", "hub:group:create:view", "hub:group:create:edit", "hub:initiativeTemplate:edit", "hub:survey:edit", "hub:survey:settings", "hub:event:create", "hub:event:edit", "hub:event:attendees"];
16
16
  /** Defines the possible editor type values for a stat card. These
17
17
  * correspond to the supported/defined uiSchema configurations. This should
18
18
  * have its own signature in the getEditorConfig function.
@@ -36,7 +36,7 @@ export declare const validCardEditorTypes: readonly ["hub:card:stat", "hub:card:
36
36
  * to defined schema/uiSchema configurations
37
37
  */
38
38
  export declare type EditorType = (typeof validEditorTypes)[number];
39
- export declare const validEditorTypes: readonly ["hub:project:create", "hub:project:edit", "hub:project:metrics", "hub:content:edit", "hub:content:settings", "hub:content:discussions", "hub:initiative:edit", "hub:initiative:create", "hub:initiative:metrics", "hub:initiative:associations", "hub:site:edit", "hub:site:create", "hub:site:followers", "hub:site:discussions", "hub:site:settings", "hub:discussion:edit", "hub:discussion:create", "hub:discussion:settings", "hub:page:edit", "hub:template:edit", "hub:group:edit", "hub:group:settings", "hub:group:discussions", "hub:group:create:followers", "hub:group:create:association", "hub:group:create:view", "hub:group:create:edit", "hub:initiativeTemplate:edit", "hub:survey:edit", "hub:survey:settings", "hub:event:create", "hub:event:edit", "hub:event:attendees", "hub:card:stat", "hub:card:follow"];
39
+ export declare const validEditorTypes: readonly ["hub:project:create", "hub:project:edit", "hub:project:metrics", "hub:content:edit", "hub:content:settings", "hub:content:discussions", "hub:initiative:edit", "hub:initiative:create", "hub:initiative:metrics", "hub:initiative:associations", "hub:initiative:settings", "hub:site:edit", "hub:site:create", "hub:site:followers", "hub:site:discussions", "hub:site:settings", "hub:discussion:edit", "hub:discussion:create", "hub:discussion:settings", "hub:page:edit", "hub:template:edit", "hub:group:edit", "hub:group:settings", "hub:group:discussions", "hub:group:create:followers", "hub:group:create:association", "hub:group:create:view", "hub:group:create:edit", "hub:initiativeTemplate:edit", "hub:survey:edit", "hub:survey:settings", "hub:event:create", "hub:event:edit", "hub:event:attendees", "hub:card:stat", "hub:card:follow"];
40
40
  /**
41
41
  * An editor's module when dynamically imported depending on the EditorType. This
42
42
  * will always have a buildUiSchema function, and sometimes it will have a
@@ -1,5 +1,5 @@
1
1
  import { HubEntityHero } from "../../types";
2
- import { IHubTimeline, IMetricDisplayConfig, HubActionLink } from "../types";
2
+ import { IHubTimeline, IMetricDisplayConfig, HubActionLink, IHubMapSettings } from "../types";
3
3
  /**
4
4
  * Properties to be exclusively displayed on an entity's
5
5
  * pre-defined view
@@ -25,6 +25,10 @@ export interface IWithViewSettings {
25
25
  * name of an entity's featured image
26
26
  */
27
27
  featuredImageName?: string;
28
+ /**
29
+ * configuration settings for the entity map
30
+ */
31
+ mapSettings?: IHubMapSettings;
28
32
  /**
29
33
  * whether the entity should render it's location on a map
30
34
  */
@@ -12,12 +12,17 @@ export interface IHubEditableContent extends IHubItemEntity, IWithSlug, IWithPer
12
12
  */
13
13
  licenseInfo: string;
14
14
  /**
15
- * If the item represents a hosted feature service, shows whether the service has the "Extract"
16
- * capability enabled. This is a pre-requisite for Hosted Downloads to work.
15
+ * If the item represents a feature or map service, shows whether the service has the
16
+ * "Query" capability enabled. This is a pre-requisite for the Hub Download System to work.
17
+ */
18
+ serverQueryCapability?: boolean;
19
+ /**
20
+ * If the item represents a feature service, shows whether the service has the "Extract"
21
+ * capability enabled. This is a pre-requisite for Create Replica Downloads to work.
17
22
  */
18
23
  serverExtractCapability?: boolean;
19
24
  /**
20
- * If the item represents a hosted feature service with "Extract enabled", shows the formats that
25
+ * If the item represents a feature service with "Extract enabled", shows the formats that
21
26
  * can be extracted from the service via the "createReplica" operation.
22
27
  */
23
28
  serverExtractFormats?: string[];
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Interface for Hub Map settings. Used to configure the map for an entity.
3
+ */
4
+ export interface IHubMapSettings {
5
+ baseViewItemId: string[];
6
+ }
@@ -17,6 +17,7 @@ export * from "./IHubInitiativeTemplate";
17
17
  export * from "./IHubItemEntity";
18
18
  export * from "./IHubLayout";
19
19
  export * from "./IHubLocation";
20
+ export * from "./IHubMapSettings";
20
21
  export * from "./IHubPage";
21
22
  export * from "./IHubProject";
22
23
  export * from "./IHubTemplate";
@@ -0,0 +1,2 @@
1
+ import { IHubEditableContent } from "../core/types/IHubEditableContent";
2
+ export declare function canUseHubDownloadSystem(entity: IHubEditableContent): boolean;
@@ -1,7 +1,6 @@
1
- import { IDynamicDownloadFormat } from "../../types";
2
- import { IHubEditableContent } from "../../../core/types/IHubEditableContent";
1
+ import { IDynamicDownloadFormat } from "./types";
2
+ import { IHubEditableContent } from "../core/types/IHubEditableContent";
3
3
  /**
4
- * @private
5
4
  * Returns all the formats that are available for download via the Hub Download API for a given entity.
6
5
  * Formats will vary from entity to entity depending on actual operation that the Hub Download API will
7
6
  * perform under the hood (e.g., hitting /createReplica or paging through the service's features).
@@ -3,4 +3,6 @@ export * from "./types";
3
3
  export * from "./fetchDownloadFileUrl";
4
4
  export * from "./fetchDownloadFormats";
5
5
  export * from "./canUseCreateReplica";
6
+ export * from "./canUseHubDownloadSystem";
6
7
  export * from "./canUseHubDownloadApi";
8
+ export * from "./getHubDownloadApiFormats";
@@ -1,6 +1,6 @@
1
1
  import { IConfigurationSchema } from "../../core";
2
2
  export declare type InitiativeEditorType = (typeof InitiativeEditorTypes)[number];
3
- export declare const InitiativeEditorTypes: readonly ["hub:initiative:edit", "hub:initiative:create", "hub:initiative:metrics", "hub:initiative:associations"];
3
+ export declare const InitiativeEditorTypes: readonly ["hub:initiative:edit", "hub:initiative:create", "hub:initiative:metrics", "hub:initiative:associations", "hub:initiative:settings"];
4
4
  /**
5
5
  * defines the JSON schema for a Hub Initiative's editable fields
6
6
  */
@@ -0,0 +1,10 @@
1
+ import { IArcGISContext } from "../../ArcGISContext";
2
+ import { IUiSchema } from "../../core/schemas/types";
3
+ import { IHubInitiative } from "../../core/types";
4
+ /**
5
+ * @private
6
+ * constructs the settings uiSchema for Hub Initiatives.
7
+ * This defines how the schema should be rendered
8
+ * in the initiative settings pane
9
+ */
10
+ export declare const buildUiSchema: (i18nScope: string, options: Partial<IHubInitiative>, context: IArcGISContext) => Promise<IUiSchema>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@esri/hub-common",
3
- "version": "14.146.1",
3
+ "version": "14.148.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",
@@ -1,18 +0,0 @@
1
- import { getCreateReplicaFormats } from "./getCreateReplicaFormats";
2
- import { getPagingJobFormats } from "./getPagingJobFormats";
3
- import { canUseCreateReplica } from "../../canUseCreateReplica";
4
- /**
5
- * @private
6
- * Returns all the formats that are available for download via the Hub Download API for a given entity.
7
- * Formats will vary from entity to entity depending on actual operation that the Hub Download API will
8
- * perform under the hood (e.g., hitting /createReplica or paging through the service's features).
9
- *
10
- * @param entity Service entity to return download formats for
11
- * @returns available download formats for the entity
12
- */
13
- export function getHubDownloadApiFormats(entity) {
14
- return canUseCreateReplica(entity)
15
- ? getCreateReplicaFormats(entity)
16
- : getPagingJobFormats();
17
- }
18
- //# sourceMappingURL=getHubDownloadApiFormats.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"getHubDownloadApiFormats.js","sourceRoot":"","sources":["../../../../../src/downloads/_internal/format-fetchers/getHubDownloadApiFormats.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,uBAAuB,EAAE,MAAM,2BAA2B,CAAC;AACpE,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAG5D,OAAO,EAAE,mBAAmB,EAAE,MAAM,2BAA2B,CAAC;AAEhE;;;;;;;;GAQG;AACH,MAAM,UAAU,wBAAwB,CACtC,MAA2B;IAE3B,OAAO,mBAAmB,CAAC,MAAM,CAAC;QAChC,CAAC,CAAC,uBAAuB,CAAC,MAAM,CAAC;QACjC,CAAC,CAAC,mBAAmB,EAAE,CAAC;AAC5B,CAAC"}
@@ -1,22 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.getHubDownloadApiFormats = void 0;
4
- const getCreateReplicaFormats_1 = require("./getCreateReplicaFormats");
5
- const getPagingJobFormats_1 = require("./getPagingJobFormats");
6
- const canUseCreateReplica_1 = require("../../canUseCreateReplica");
7
- /**
8
- * @private
9
- * Returns all the formats that are available for download via the Hub Download API for a given entity.
10
- * Formats will vary from entity to entity depending on actual operation that the Hub Download API will
11
- * perform under the hood (e.g., hitting /createReplica or paging through the service's features).
12
- *
13
- * @param entity Service entity to return download formats for
14
- * @returns available download formats for the entity
15
- */
16
- function getHubDownloadApiFormats(entity) {
17
- return canUseCreateReplica_1.canUseCreateReplica(entity)
18
- ? getCreateReplicaFormats_1.getCreateReplicaFormats(entity)
19
- : getPagingJobFormats_1.getPagingJobFormats();
20
- }
21
- exports.getHubDownloadApiFormats = getHubDownloadApiFormats;
22
- //# sourceMappingURL=getHubDownloadApiFormats.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"getHubDownloadApiFormats.js","sourceRoot":"","sources":["../../../../../src/downloads/_internal/format-fetchers/getHubDownloadApiFormats.ts"],"names":[],"mappings":";;;AAAA,uEAAoE;AACpE,+DAA4D;AAG5D,mEAAgE;AAEhE;;;;;;;;GAQG;AACH,SAAgB,wBAAwB,CACtC,MAA2B;IAE3B,OAAO,yCAAmB,CAAC,MAAM,CAAC;QAChC,CAAC,CAAC,iDAAuB,CAAC,MAAM,CAAC;QACjC,CAAC,CAAC,yCAAmB,EAAE,CAAC;AAC5B,CAAC;AAND,4DAMC"}