@esri/hub-common 13.22.0 → 13.23.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 (117) hide show
  1. package/dist/esm/core/EntityEditor.js +39 -0
  2. package/dist/esm/core/EntityEditor.js.map +1 -0
  3. package/dist/esm/core/HubItemEntity.js +15 -0
  4. package/dist/esm/core/HubItemEntity.js.map +1 -1
  5. package/dist/esm/core/index.js.map +1 -1
  6. package/dist/esm/core/schemas/getEntityEditorSchemas.js +7 -1
  7. package/dist/esm/core/schemas/getEntityEditorSchemas.js.map +1 -1
  8. package/dist/esm/core/schemas/internal/getCategoryItems.js +34 -0
  9. package/dist/esm/core/schemas/internal/getCategoryItems.js.map +1 -0
  10. package/dist/esm/core/schemas/internal/getFeaturedContentCatalogs.js +21 -0
  11. package/dist/esm/core/schemas/internal/getFeaturedContentCatalogs.js.map +1 -0
  12. package/dist/esm/core/schemas/internal/getFeaturedImageUrl.js +9 -0
  13. package/dist/esm/core/schemas/internal/getFeaturedImageUrl.js.map +1 -0
  14. package/dist/esm/core/schemas/internal/getLocationExtent.js +11 -0
  15. package/dist/esm/core/schemas/internal/getLocationExtent.js.map +1 -0
  16. package/dist/esm/core/schemas/internal/getLocationOptions.js +56 -0
  17. package/dist/esm/core/schemas/internal/getLocationOptions.js.map +1 -0
  18. package/dist/esm/core/schemas/internal/getSharableGroupsComboBoxItems.js +27 -0
  19. package/dist/esm/core/schemas/internal/getSharableGroupsComboBoxItems.js.map +1 -0
  20. package/dist/esm/core/schemas/internal/getTagItems.js +37 -0
  21. package/dist/esm/core/schemas/internal/getTagItems.js.map +1 -0
  22. package/dist/esm/core/types/HubEntityEditor.js +1 -0
  23. package/dist/esm/core/types/HubEntityEditor.js.map +1 -0
  24. package/dist/esm/core/types/IHubProject.js.map +1 -1
  25. package/dist/esm/core/types/index.js +5 -4
  26. package/dist/esm/core/types/index.js.map +1 -1
  27. package/dist/esm/index.js +1 -0
  28. package/dist/esm/index.js.map +1 -1
  29. package/dist/esm/projects/HubProject.js +92 -13
  30. package/dist/esm/projects/HubProject.js.map +1 -1
  31. package/dist/esm/projects/_internal/ProjectBusinessRules.js +7 -0
  32. package/dist/esm/projects/_internal/ProjectBusinessRules.js.map +1 -1
  33. package/dist/esm/projects/_internal/ProjectSchema.js +3 -3
  34. package/dist/esm/projects/_internal/ProjectSchema.js.map +1 -1
  35. package/dist/esm/projects/_internal/ProjectUiSchemaCreate.js +1 -1
  36. package/dist/esm/projects/_internal/ProjectUiSchemaCreate.js.map +1 -1
  37. package/dist/esm/projects/_internal/getProjectEditorConfigOptions.js +63 -0
  38. package/dist/esm/projects/_internal/getProjectEditorConfigOptions.js.map +1 -0
  39. package/dist/esm/projects/edit.js +23 -7
  40. package/dist/esm/projects/edit.js.map +1 -1
  41. package/dist/esm/sites/HubSites.js +12 -26
  42. package/dist/esm/sites/HubSites.js.map +1 -1
  43. package/dist/esm/urls/cacheBustUrl.js +13 -0
  44. package/dist/esm/urls/cacheBustUrl.js.map +1 -0
  45. package/dist/esm/urls/index.js +1 -0
  46. package/dist/esm/urls/index.js.map +1 -1
  47. package/dist/node/core/EntityEditor.js +43 -0
  48. package/dist/node/core/EntityEditor.js.map +1 -0
  49. package/dist/node/core/HubItemEntity.js +15 -0
  50. package/dist/node/core/HubItemEntity.js.map +1 -1
  51. package/dist/node/core/index.js.map +1 -1
  52. package/dist/node/core/schemas/getEntityEditorSchemas.js +7 -1
  53. package/dist/node/core/schemas/getEntityEditorSchemas.js.map +1 -1
  54. package/dist/node/core/schemas/internal/getCategoryItems.js +38 -0
  55. package/dist/node/core/schemas/internal/getCategoryItems.js.map +1 -0
  56. package/dist/node/core/schemas/internal/getFeaturedContentCatalogs.js +25 -0
  57. package/dist/node/core/schemas/internal/getFeaturedContentCatalogs.js.map +1 -0
  58. package/dist/node/core/schemas/internal/getFeaturedImageUrl.js +13 -0
  59. package/dist/node/core/schemas/internal/getFeaturedImageUrl.js.map +1 -0
  60. package/dist/node/core/schemas/internal/getLocationExtent.js +15 -0
  61. package/dist/node/core/schemas/internal/getLocationExtent.js.map +1 -0
  62. package/dist/node/core/schemas/internal/getLocationOptions.js +60 -0
  63. package/dist/node/core/schemas/internal/getLocationOptions.js.map +1 -0
  64. package/dist/node/core/schemas/internal/getSharableGroupsComboBoxItems.js +31 -0
  65. package/dist/node/core/schemas/internal/getSharableGroupsComboBoxItems.js.map +1 -0
  66. package/dist/node/core/schemas/internal/getTagItems.js +41 -0
  67. package/dist/node/core/schemas/internal/getTagItems.js.map +1 -0
  68. package/dist/node/core/types/HubEntityEditor.js +3 -0
  69. package/dist/node/core/types/HubEntityEditor.js.map +1 -0
  70. package/dist/node/core/types/IHubProject.js.map +1 -1
  71. package/dist/node/core/types/index.js +5 -4
  72. package/dist/node/core/types/index.js.map +1 -1
  73. package/dist/node/index.js +1 -0
  74. package/dist/node/index.js.map +1 -1
  75. package/dist/node/projects/HubProject.js +93 -14
  76. package/dist/node/projects/HubProject.js.map +1 -1
  77. package/dist/node/projects/_internal/ProjectBusinessRules.js +7 -0
  78. package/dist/node/projects/_internal/ProjectBusinessRules.js.map +1 -1
  79. package/dist/node/projects/_internal/ProjectSchema.js +5 -5
  80. package/dist/node/projects/_internal/ProjectSchema.js.map +1 -1
  81. package/dist/node/projects/_internal/ProjectUiSchemaCreate.js +1 -1
  82. package/dist/node/projects/_internal/ProjectUiSchemaCreate.js.map +1 -1
  83. package/dist/node/projects/_internal/getProjectEditorConfigOptions.js +67 -0
  84. package/dist/node/projects/_internal/getProjectEditorConfigOptions.js.map +1 -0
  85. package/dist/node/projects/edit.js +24 -7
  86. package/dist/node/projects/edit.js.map +1 -1
  87. package/dist/node/sites/HubSites.js +12 -27
  88. package/dist/node/sites/HubSites.js.map +1 -1
  89. package/dist/node/urls/cacheBustUrl.js +16 -0
  90. package/dist/node/urls/cacheBustUrl.js.map +1 -0
  91. package/dist/node/urls/index.js +1 -0
  92. package/dist/node/urls/index.js.map +1 -1
  93. package/dist/types/core/EntityEditor.d.ts +13 -0
  94. package/dist/types/core/behaviors/IWithEditorBehavior.d.ts +23 -9
  95. package/dist/types/core/schemas/internal/getCategoryItems.d.ts +11 -0
  96. package/dist/types/core/schemas/internal/getFeaturedContentCatalogs.d.ts +9 -0
  97. package/dist/types/core/schemas/internal/getFeaturedImageUrl.d.ts +3 -0
  98. package/dist/types/core/schemas/internal/getLocationExtent.d.ts +7 -0
  99. package/dist/types/core/schemas/internal/getLocationOptions.d.ts +16 -0
  100. package/dist/types/core/schemas/internal/getSharableGroupsComboBoxItems.d.ts +7 -0
  101. package/dist/types/core/schemas/internal/getTagItems.d.ts +12 -0
  102. package/dist/types/core/schemas/types.d.ts +6 -0
  103. package/dist/types/core/types/HubEntityEditor.d.ts +11 -0
  104. package/dist/types/core/types/IHubLocation.d.ts +12 -0
  105. package/dist/types/core/types/IHubProject.d.ts +10 -0
  106. package/dist/types/core/types/index.d.ts +5 -4
  107. package/dist/types/index.d.ts +1 -0
  108. package/dist/types/permissions/types/Permission.d.ts +1 -1
  109. package/dist/types/projects/HubProject.d.ts +21 -13
  110. package/dist/types/projects/_internal/ProjectBusinessRules.d.ts +1 -1
  111. package/dist/types/projects/_internal/ProjectSchema.d.ts +2 -2
  112. package/dist/types/projects/_internal/getProjectEditorConfigOptions.d.ts +10 -0
  113. package/dist/types/projects/edit.d.ts +12 -7
  114. package/dist/types/sites/HubSites.d.ts +0 -8
  115. package/dist/types/urls/cacheBustUrl.d.ts +5 -0
  116. package/dist/types/urls/index.d.ts +1 -0
  117. package/package.json +1 -1
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.enrichSiteSearchResult = exports.convertItemToSite = exports.convertSiteToModel = exports.convertModelToSite = exports.fetchSite = exports.deleteSite = exports.updateSite = exports.createSite = exports.ENTERPRISE_SITE_ITEM_TYPE = exports.HUB_SITE_ITEM_TYPE = void 0;
3
+ exports.enrichSiteSearchResult = exports.convertItemToSite = exports.convertModelToSite = exports.fetchSite = exports.deleteSite = exports.updateSite = exports.createSite = exports.ENTERPRISE_SITE_ITEM_TYPE = exports.HUB_SITE_ITEM_TYPE = void 0;
4
4
  const arcgis_rest_portal_1 = require("@esri/arcgis-rest-portal");
5
5
  const get_family_1 = require("../content/get-family");
6
6
  const fetchSiteModel_1 = require("./fetchSiteModel");
@@ -260,25 +260,26 @@ exports.createSite = createSite;
260
260
  * @returns
261
261
  */
262
262
  async function updateSite(site, requestOptions) {
263
+ // verify that the slug is unique, excluding the current site
264
+ site.slug = await slugs_1.getUniqueSlug({ slug: site.slug, existingId: site.id }, requestOptions);
263
265
  site.typeKeywords = discussions_1.setDiscussableKeyword(site.typeKeywords, site.isDiscussable);
264
- // convert IHubSite to model
265
- const siteModel = convertSiteToModel(site, requestOptions);
266
266
  // Fetch backing model from the portal
267
267
  const currentModel = await models_1.getModel(site.id, requestOptions);
268
+ // Note: Although we are fetching the model, and applying changes onto it,
269
+ // we are not attempting to handle "concurrent edit" conflict resolution
270
+ // but this is where we would apply that sort of logic
271
+ const mapper = new PropertyMapper_1.PropertyMapper(getPropertyMap_1.getPropertyMap());
272
+ const modelToUpdate = mapper.entityToStore(site, currentModel);
268
273
  // handle any domain changes
269
- await _internal_1.handleDomainChanges(siteModel, currentModel, requestOptions);
270
- if (siteModel.item.properties.slug !== currentModel.item.properties.slug) {
271
- // ensure slug to keywords
272
- siteModel.item.typeKeywords = slugs_1.setSlugKeyword(siteModel.item.typeKeywords, siteModel.item.properties.slug);
273
- }
274
+ await _internal_1.handleDomainChanges(modelToUpdate, currentModel, requestOptions);
274
275
  // The following props are currently affected by in-memory migrations,
275
276
  // so we replace them with their canonical values so as to not overwrite
276
277
  // them. Eventually these changes will be persisted in AGO.
277
- siteModel.data.catalog = currentModel.data.catalog;
278
- siteModel.data.values.searchCategories =
278
+ modelToUpdate.data.catalog = currentModel.data.catalog;
279
+ modelToUpdate.data.values.searchCategories =
279
280
  currentModel.data.values.searchCategories;
280
281
  // send updates to the Portal API and get back the updated site model
281
- const updatedSiteModel = await models_1.updateModel(siteModel, requestOptions);
282
+ const updatedSiteModel = await models_1.updateModel(modelToUpdate, requestOptions);
282
283
  // convert that back into a IHubSite and return it
283
284
  const updatedSite = convertModelToSite(updatedSiteModel, requestOptions);
284
285
  return updatedSite;
@@ -342,22 +343,6 @@ function convertModelToSite(model, requestOptions) {
342
343
  return computeProps_1.computeProps(model, site, requestOptions);
343
344
  }
344
345
  exports.convertModelToSite = convertModelToSite;
345
- /**
346
- * @internal
347
- * Convert an IHubSite into an IModel
348
- * @param site
349
- * @param requestOptions
350
- * @returns
351
- */
352
- function convertSiteToModel(site, _requestOptions) {
353
- // create the mapper
354
- const mapper = new PropertyMapper_1.PropertyMapper(getPropertyMap_1.getPropertyMap());
355
- // applying the site onto the default model ensures that a minimum
356
- // set of properties exist, regardless what may have been done to
357
- // the IHubSite pojo
358
- return mapper.entityToStore(site, util_1.cloneObject(DEFAULT_SITE_MODEL));
359
- }
360
- exports.convertSiteToModel = convertSiteToModel;
361
346
  /**
362
347
  * Convert a Hub Site Application item into a Hub Site, fetching any
363
348
  * additional information that may be required
@@ -1 +1 @@
1
- {"version":3,"file":"HubSites.js","sourceRoot":"","sources":["../../../src/sites/HubSites.ts"],"names":[],"mappings":";;;AACA,iEAA+E;AAC/E,sDAAkD;AAClD,qDAAkD;AAClD,qEAAkE;AAClE,2CAAkD;AAElD,wDAA6D;AAC7D,mEAAgE;AAChE,oFAA8E;AAC9E,mFAAgF;AAChF,2DAAwD;AACxD,+DAA4D;AAE5D,0CAA+D;AAC/D,8CAA2C;AAC3C,mFAA6E;AAC7E,2DAAuD;AACvD,gCAAsC;AACtC,qCAA8C;AAC9C,kCAA8C;AAC9C,sCAKmB;AACnB,6DAA0D;AAE1D,mFAA4E;AAE5E,oCAAiC;AACjC,wCAA8C;AAC9C,gFAA0E;AAC1E,+FAA4F;AAC5F,gDAAuD;AACvD,iGAA8F;AACjF,QAAA,kBAAkB,GAAG,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H,eAAe;IACf,MAAM,CAAC,KAAK,CAAC,SAAS,GAAG,4CAAmB,CAAC,IAAI,EAAE,cAAc,CAAC,CAAC;IACnE,MAAM,CAAC,KAAK,CAAC,IAAI,GAAG,IAAI,CAAC,GAAG,CAAC;IAC7B,MAAM,CAAC,KAAK,CAAC,YAAY,GAAG,wCAAiB,CAC3C,MAAM,CAAC,IAAI,EACX,MAAM,CAAC,EAAE,EACT,IAAI,CAAC,YAAY,CAClB,CAAC;IAEF,OAAO,MAAM,CAAC;AAChB,CAAC;AA1DD,wDA0DC"}
@@ -0,0 +1,16 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.cacheBustUrl = void 0;
4
+ /**
5
+ * artifically update a query param associated with a url to force
6
+ * the browser to load it from file rather than from cache
7
+ */
8
+ exports.cacheBustUrl = (url, param = "v") => {
9
+ if (!url) {
10
+ return url;
11
+ }
12
+ const delimiter = url.indexOf("?") > -1 ? "&" : "?";
13
+ url += `${delimiter}${param}=${new Date().getTime()}`;
14
+ return url;
15
+ };
16
+ //# sourceMappingURL=cacheBustUrl.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cacheBustUrl.js","sourceRoot":"","sources":["../../../src/urls/cacheBustUrl.ts"],"names":[],"mappings":";;;AAAA;;;GAGG;AACU,QAAA,YAAY,GAAG,CAAC,GAAW,EAAE,KAAK,GAAG,GAAG,EAAU,EAAE;IAC/D,IAAI,CAAC,GAAG,EAAE;QACR,OAAO,GAAG,CAAC;KACZ;IAED,MAAM,SAAS,GAAG,GAAG,CAAC,OAAO,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,CAAC;IACpD,GAAG,IAAI,GAAG,SAAS,GAAG,KAAK,IAAI,IAAI,IAAI,EAAE,CAAC,OAAO,EAAE,EAAE,CAAC;IAEtD,OAAO,GAAG,CAAC;AACb,CAAC,CAAC"}
@@ -24,6 +24,7 @@ tslib_1.__exportStar(require("./getGroupHomeUrl"), exports);
24
24
  tslib_1.__exportStar(require("./getUserHomeUrl"), exports);
25
25
  tslib_1.__exportStar(require("./get-campaign-url"), exports);
26
26
  tslib_1.__exportStar(require("./is-safe-redirect-url"), exports);
27
+ tslib_1.__exportStar(require("./cacheBustUrl"), exports);
27
28
  // For some reason, if this is exported here, random tests
28
29
  // start failing. Resolved by moving to the root index
29
30
  // export * from "./getCardModelUrl";
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/urls/index.ts"],"names":[],"mappings":";;;;AAAA,kCAAqC;AACrC,sDAA4B;AAC5B,qEAA2C;AAC3C,+DAAqC;AACrC,2DAAiC;AACjC,2DAAiC;AACjC,6DAAmC;AACnC,2DAAiC;AACjC,qEAA2C;AAC3C,0DAAgC;AAChC,wEAA8C;AAC9C,oEAA0C;AAC1C,8DAAoC;AACpC,6DAAmC;AACnC,8DAAoC;AACpC,wEAA8C;AAC9C,mEAAyC;AACzC,oEAA0C;AAC1C,4DAAkC;AAClC,2DAAiC;AACjC,6DAAmC;AACnC,iEAAuC;AACvC,0DAA0D;AAC1D,sDAAsD;AACtD,qCAAqC;AAErC,MAAM,+BAA+B,GAAG,wBAAwB,CAAC;AAEjE;;;;GAIG;AACU,QAAA,uBAAuB,GAAG,CAAC,GAAW,EAAE,EAAE;IACrD,OAAO,+BAA+B,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AACnD,CAAC,CAAC;AAEF;;;;;GAKG;AACU,QAAA,qBAAqB,GAAG,CAAC,GAAW,EAAE,EAAE;IACnD,MAAM,KAAK,GAAG,GAAG,CAAC,KAAK,CAAC,+BAA+B,CAAC,CAAC;IACzD,MAAM,YAAY,GAAG,KAAK,IAAI,KAAK,CAAC,CAAC,CAAC,CAAC;IACvC,OAAO,YAAY,IAAI,GAAG,iBAAU,CAAC,YAAY,CAAC,UAAU,CAAC;AAC/D,CAAC,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/urls/index.ts"],"names":[],"mappings":";;;;AAAA,kCAAqC;AACrC,sDAA4B;AAC5B,qEAA2C;AAC3C,+DAAqC;AACrC,2DAAiC;AACjC,2DAAiC;AACjC,6DAAmC;AACnC,2DAAiC;AACjC,qEAA2C;AAC3C,0DAAgC;AAChC,wEAA8C;AAC9C,oEAA0C;AAC1C,8DAAoC;AACpC,6DAAmC;AACnC,8DAAoC;AACpC,wEAA8C;AAC9C,mEAAyC;AACzC,oEAA0C;AAC1C,4DAAkC;AAClC,2DAAiC;AACjC,6DAAmC;AACnC,iEAAuC;AACvC,yDAA+B;AAC/B,0DAA0D;AAC1D,sDAAsD;AACtD,qCAAqC;AAErC,MAAM,+BAA+B,GAAG,wBAAwB,CAAC;AAEjE;;;;GAIG;AACU,QAAA,uBAAuB,GAAG,CAAC,GAAW,EAAE,EAAE;IACrD,OAAO,+BAA+B,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AACnD,CAAC,CAAC;AAEF;;;;;GAKG;AACU,QAAA,qBAAqB,GAAG,CAAC,GAAW,EAAE,EAAE;IACnD,MAAM,KAAK,GAAG,GAAG,CAAC,KAAK,CAAC,+BAA+B,CAAC,CAAC;IACzD,MAAM,YAAY,GAAG,KAAK,IAAI,KAAK,CAAC,CAAC,CAAC,CAAC;IACvC,OAAO,YAAY,IAAI,GAAG,iBAAU,CAAC,YAAY,CAAC,UAAU,CAAC;AAC/D,CAAC,CAAC"}
@@ -0,0 +1,13 @@
1
+ import { IArcGISContext } from "../ArcGISContext";
2
+ import { IEditorConfig, IWithEditorBehavior } from "./behaviors";
3
+ import { EditorType } from "./schemas";
4
+ import { HubEntity } from "./types/HubEntity";
5
+ import { HubEntityEditor, IEntityEditorContext } from "./types/HubEntityEditor";
6
+ export declare class EntityEditor {
7
+ instance: IWithEditorBehavior;
8
+ private constructor();
9
+ static fromEntity(entity: HubEntity, context: IArcGISContext): EntityEditor;
10
+ getConfig(i18nScope: string, type: EditorType): Promise<IEditorConfig>;
11
+ toEditor(editorContext?: IEntityEditorContext): HubEntityEditor;
12
+ save(editor: HubEntityEditor): Promise<HubEntity>;
13
+ }
@@ -1,17 +1,31 @@
1
- import { IConfigurationSchema, IUiSchema, UiSchemaElementOptions, EditorType } from "../schemas";
2
- /**
3
- * DEPRECATED: the following will be removed at next breaking version
4
- * we will be shifting towards the EditorType defined in the schemas
5
- * directory
6
- */
7
- export declare type EditorConfigType = "create" | "edit";
1
+ import { IConfigurationSchema, IUiSchema, EditorType } from "../schemas";
2
+ import { HubEntity, HubEntityEditor, IEntityEditorContext } from "../types";
8
3
  export interface IEditorConfig {
9
4
  schema: IConfigurationSchema;
10
5
  uiSchema: IUiSchema;
11
6
  }
12
7
  /**
13
- *
8
+ * Functions that are used by the arcgis-hub-entity-editor component
14
9
  */
15
10
  export interface IWithEditorBehavior {
16
- getEditorConfig(i18nScope: string, type: EditorType, options: UiSchemaElementOptions[]): Promise<IEditorConfig>;
11
+ /**
12
+ * Get the Entity's ui and schema for the editor
13
+ * @param i18nScope
14
+ * @param type
15
+ * @param options
16
+ */
17
+ getEditorConfig(i18nScope: string, type: EditorType): Promise<IEditorConfig>;
18
+ /**
19
+ * Convert the entity into it's "Editor" structure.
20
+ * This should only be used by the arcgis-hub-entity-editor component.
21
+ * For general use, see the `toJson():<T>` method
22
+ */
23
+ toEditor(editorContext: IEntityEditorContext): HubEntityEditor;
24
+ /**
25
+ * Update the internal Entity from the "Editor" structure.
26
+ * This should only be used by the arcgis-hub-entity-editor component.
27
+ * For general use, see the `update(Partial<T>)` method
28
+ * @param values
29
+ */
30
+ fromEditor(editor: HubEntityEditor): Promise<HubEntity>;
17
31
  }
@@ -0,0 +1,11 @@
1
+ import { IHubRequestOptions } from "../../../types";
2
+ import { IUiSchemaComboboxItem } from "../types";
3
+ /**
4
+ * Fetch the categorySchema for all the categories, including
5
+ * the ones with 0 count, then recursively collet all the child
6
+ * categories on the deepest level. Parse into a format that
7
+ * can be consumed by the combobox field
8
+ *
9
+ * TODO: render nested categories in combobox
10
+ */
11
+ export declare function getCategoryItems(orgId: string, hubRequestOptions: IHubRequestOptions): Promise<IUiSchemaComboboxItem[]>;
@@ -0,0 +1,9 @@
1
+ import { IUser } from "@esri/arcgis-rest-portal";
2
+ /**
3
+ * Return a catalog structured for picking featured content.
4
+ * @param user
5
+ * @returns
6
+ */
7
+ export declare function getFeaturedContentCatalogs(user: IUser): {
8
+ catalogs: import("../../..").IHubCatalog[];
9
+ };
@@ -0,0 +1,3 @@
1
+ import { IArcGISContext } from "../../../ArcGISContext";
2
+ import { HubEntity } from "../../types/HubEntity";
3
+ export declare function getFeaturedImageUrl(entity: HubEntity, context: IArcGISContext): string;
@@ -0,0 +1,7 @@
1
+ import { IHubRequestOptions } from "../../../types";
2
+ import { HubEntity } from "../../types/HubEntity";
3
+ /**
4
+ * Get the extent from the entity's location, if it has one.
5
+ * Otherwise, fall back to using the org extent.
6
+ */
7
+ export declare function getLocationExtent(entity: HubEntity, hubRequestOptions: IHubRequestOptions): Promise<import("@esri/arcgis-rest-types").IExtent>;
@@ -0,0 +1,16 @@
1
+ import { IHubRequestOptions } from "../../../types";
2
+ import { HubEntity } from "../../types/HubEntity";
3
+ import { IHubLocationOption } from "../../types/IHubLocation";
4
+ /**
5
+ * Construct the dynamic location picker options with the entity's
6
+ * configured location using the following logic:
7
+ *
8
+ * 1. If there is no entity (e.g. we're creating an entity),
9
+ * select the "custom" option by default
10
+ * 2. Else if there is no location set on the entity, select the
11
+ * "none" option
12
+ * 3. Else if the entity has a location and it's the same as the
13
+ * current option, select it and update the option with the entity's
14
+ * location
15
+ */
16
+ export declare function getLocationOptions(entity: HubEntity, portalName: string, hubRequestOptions: IHubRequestOptions): Promise<IHubLocationOption[]>;
@@ -0,0 +1,7 @@
1
+ import { IGroup } from "@esri/arcgis-rest-portal";
2
+ import { IUiSchemaComboboxItem } from "../types";
3
+ /**
4
+ * Filter an array of groups into the set the user has the rights to share content
5
+ * into, and then convert them to UiSchemaComboboxItem array for use in the Entity Editor component
6
+ */
7
+ export declare function getSharableGroupsComboBoxItems(groups: IGroup[]): IUiSchemaComboboxItem[];
@@ -0,0 +1,12 @@
1
+ import { IHubRequestOptions } from "../../../types";
2
+ import { HubEntity } from "../../types/HubEntity";
3
+ import { IUiSchemaComboboxItem } from "../types";
4
+ /**
5
+ * Fetch the entity's org tags (limited to the top 200),
6
+ * merge with any configured on the entity itself, and convert
7
+ * into a format that can be consumed by the combobox field
8
+ *
9
+ * TODO: the search portion of this util should probably
10
+ * be hoisted to hub.js
11
+ */
12
+ export declare function getTagItems(entity: HubEntity, orgId: string, hubRequestOptions: IHubRequestOptions): Promise<IUiSchemaComboboxItem[]>;
@@ -59,3 +59,9 @@ export interface IUiSchema extends IUiSchemaElement {
59
59
  * Run-time configuration for UiSchema Elements
60
60
  */
61
61
  export declare type UiSchemaElementOptions = Pick<IUiSchemaElement, "scope" | "options">;
62
+ export interface IUiSchemaComboboxItem {
63
+ value: string;
64
+ label?: string;
65
+ icon?: string;
66
+ selected?: boolean;
67
+ }
@@ -0,0 +1,11 @@
1
+ /**
2
+ * Unified type for all Hub entity editors
3
+ */
4
+ export declare type HubEntityEditor = Record<string, any>;
5
+ /**
6
+ * Additional context that can be passed to `toEditor()` functions
7
+ */
8
+ export interface IEntityEditorContext {
9
+ collaborationGroupId?: string;
10
+ contentGroupId?: string;
11
+ }
@@ -1,6 +1,7 @@
1
1
  /// <reference types="arcgis-js-api" />
2
2
  import { ISpatialReference } from "@esri/arcgis-rest-types";
3
3
  import { IHubLocationType } from "./types";
4
+ import { HubEntityType } from "./HubEntityType";
4
5
  /**
5
6
  * A location associated with an item and stored as a json resource.
6
7
  */
@@ -15,3 +16,14 @@ export interface IHubLocation {
15
16
  graphic?: any;
16
17
  geoJson?: any;
17
18
  }
19
+ /**
20
+ * Location options for the location picker
21
+ */
22
+ export interface IHubLocationOption {
23
+ /** Whether or not this option is selected initially */
24
+ selected?: boolean;
25
+ label: string;
26
+ description?: string;
27
+ location: IHubLocation;
28
+ entityType?: HubEntityType;
29
+ }
@@ -13,3 +13,13 @@ export declare enum PROJECT_STATUSES {
13
13
  onHold = "onHold",
14
14
  complete = "complete"
15
15
  }
16
+ /**
17
+ * This type redefines the IHubProject interface in such a way
18
+ * that it can be consumed by the entity editor.
19
+ */
20
+ export declare type IHubProjectEditor = Omit<IHubProject, "extent"> & {
21
+ view: {
22
+ featuredImage?: any;
23
+ };
24
+ _groups?: string[];
25
+ };
@@ -1,4 +1,6 @@
1
+ export * from "./DynamicValues";
1
2
  export * from "./HubEntity";
3
+ export * from "./HubEntityEditor";
2
4
  export * from "./HubEntityType";
3
5
  export * from "./IHubContent";
4
6
  export * from "./IHubContentEnrichments";
@@ -17,11 +19,10 @@ export * from "./IHubSite";
17
19
  export * from "./IHubSiteTheme";
18
20
  export * from "./IHubTimeline";
19
21
  export * from "./IItemEnrichments";
22
+ export * from "./IReference";
20
23
  export * from "./IServerEnrichments";
21
24
  export * from "./ISystemStatus";
22
- export * from "./types";
23
- export * from "./DynamicValues";
24
- export * from "./IReference";
25
- export * from "./Metrics";
26
25
  export * from "./MaybeTranslate";
27
26
  export * from "./IHubCardViewModel";
27
+ export * from "./Metrics";
28
+ export * from "./types";
@@ -34,6 +34,7 @@ export * from "./versioning";
34
34
  export * from "./metrics";
35
35
  export * from "./core/updateHubEntity";
36
36
  export * from "./urls/getCardModelUrl";
37
+ export * from "./core/EntityEditor";
37
38
  import OperationStack from "./OperationStack";
38
39
  import OperationError from "./OperationError";
39
40
  import HubError from "./HubError";
@@ -3,7 +3,7 @@
3
3
  * It's critical that the arrays defined in the modules use `as const`
4
4
  * otherwise Permission devolves into just a string type
5
5
  */
6
- declare const validPermissions: readonly ["hub:site:create", "hub:site:delete", "hub:site:edit", "hub:site:view", "hub:project:create", "hub:project:delete", "hub:project:edit", "hub:project:view", "hub:project:owner", "hub:initiative:create", "hub:initiative:delete", "hub:initiative:edit", "hub:initiative:view", "hub:discussion:create", "hub:discussion:delete", "hub:discussion:edit", "hub:discussion:view", "hub:content:create", "hub:content:edit", "hub:content:view", "hub:page:create", "hub:page:delete", "hub:page:edit", "hub:page:view"];
6
+ declare const validPermissions: readonly ["hub:site:create", "hub:site:delete", "hub:site:edit", "hub:site:view", "hub:project:create", "hub:project:delete", "hub:project:edit", "hub:project:view", "hub:project:owner", "hub:project:share", "hub:initiative:create", "hub:initiative:delete", "hub:initiative:edit", "hub:initiative:view", "hub:discussion:create", "hub:discussion:delete", "hub:discussion:edit", "hub:discussion:view", "hub:content:create", "hub:content:edit", "hub:content:view", "hub:page:create", "hub:page:delete", "hub:page:edit", "hub:page:view"];
7
7
  /**
8
8
  * Defines the possible values for Permissions
9
9
  */
@@ -1,15 +1,15 @@
1
- import { IHubProject, IWithCatalogBehavior, IWithStoreBehavior, IWithSharingBehavior, UiSchemaElementOptions, IResolvedMetric, IWithCardBehavior } from "../core";
1
+ import { IHubProject, IWithCatalogBehavior, IWithStoreBehavior, IWithSharingBehavior, IResolvedMetric, IWithCardBehavior, IHubProjectEditor, IEntityEditorContext } from "../core";
2
+ import { EditorType } from "../core/schemas/getEntityEditorSchemas";
2
3
  import { Catalog } from "../search";
3
4
  import { IArcGISContext } from "../ArcGISContext";
4
5
  import { HubItemEntity } from "../core/HubItemEntity";
5
- import { IEditorConfig } from "../core/behaviors/IWithEditorBehavior";
6
- import { ProjectEditorType } from "./_internal/ProjectSchema";
6
+ import { IEditorConfig, IWithEditorBehavior } from "../core/behaviors/IWithEditorBehavior";
7
7
  import { IWithMetricsBehavior } from "../core/behaviors/IWithMetricsBehavior";
8
8
  import { IConvertToCardModelOpts, IHubCardViewModel } from "../core/types/IHubCardViewModel";
9
9
  /**
10
10
  * Hub Project Class
11
11
  */
12
- export declare class HubProject extends HubItemEntity<IHubProject> implements IWithStoreBehavior<IHubProject>, IWithCatalogBehavior, IWithMetricsBehavior, IWithSharingBehavior, IWithCardBehavior {
12
+ export declare class HubProject extends HubItemEntity<IHubProject> implements IWithStoreBehavior<IHubProject>, IWithCatalogBehavior, IWithMetricsBehavior, IWithSharingBehavior, IWithCardBehavior, IWithEditorBehavior {
13
13
  private _catalog;
14
14
  /**
15
15
  * Private constructor so we don't have `new` all over the place. Allows for
@@ -45,16 +45,11 @@ export declare class HubProject extends HubItemEntity<IHubProject> implements IW
45
45
  */
46
46
  static fetch(identifier: string, context: IArcGISContext): Promise<HubProject>;
47
47
  /**
48
- * Static method to get the editor config for the HubProject entity.
49
- * @param i18nScope translation scope to be interpolated into the uiSchema
50
- * @param type editor type - corresonds to the returned uiSchema
51
- * @param options optional hash of dynamic uiSchema element options
52
- *
53
- * Note: typescript does not have a means to specify static methods in interfaces
54
- * so while this is the implementation of IWithEditorBehavior, it is not enforced
55
- * by the compiler.
48
+ * Given a partial project, apply defaults to it to ensure that a baseline of properties are set
49
+ * @param partialProject
50
+ * @param context
51
+ * @returns
56
52
  */
57
- static getEditorConfig(i18nScope: string, type: ProjectEditorType, options?: UiSchemaElementOptions[]): Promise<IEditorConfig>;
58
53
  private static applyDefaults;
59
54
  /**
60
55
  * Convert the project entity into a card view model that can
@@ -63,6 +58,19 @@ export declare class HubProject extends HubItemEntity<IHubProject> implements IW
63
58
  * @param opts view model options
64
59
  */
65
60
  convertToCardModel(opts?: IConvertToCardModelOpts): IHubCardViewModel;
61
+ getEditorConfig(i18nScope: string, type: EditorType): Promise<IEditorConfig>;
62
+ /**
63
+ * Return the project as an editor object
64
+ * @param editorContext
65
+ * @returns
66
+ */
67
+ toEditor(editorContext?: IEntityEditorContext): IHubProjectEditor;
68
+ /**
69
+ * Load the project from the editor object
70
+ * @param editor
71
+ * @returns
72
+ */
73
+ fromEditor(editor: IHubProjectEditor): Promise<IHubProject>;
66
74
  /**
67
75
  * Apply a new state to the instance
68
76
  * @param changes
@@ -19,7 +19,7 @@ export declare const ProjectCapabilityPermissions: ICapabilityPermission[];
19
19
  * These define the requirements any user must meet to perform related actions
20
20
  * @private
21
21
  */
22
- export declare const ProjectPermissions: readonly ["hub:project:create", "hub:project:delete", "hub:project:edit", "hub:project:view", "hub:project:owner"];
22
+ export declare const ProjectPermissions: readonly ["hub:project:create", "hub:project:delete", "hub:project:edit", "hub:project:view", "hub:project:owner", "hub:project:share"];
23
23
  /**
24
24
  * Project permission policies
25
25
  * @private
@@ -1,7 +1,7 @@
1
- import { IConfigurationSchema } from "../../core";
1
+ import { IConfigurationSchema } from "../../core/schemas/types";
2
2
  export declare type ProjectEditorType = (typeof ProjectEditorTypes)[number];
3
3
  export declare const ProjectEditorTypes: readonly ["hub:project:create", "hub:project:edit"];
4
4
  /**
5
- * defines the JSON schema for a Hub Project's editable fields
5
+ * Defines the JSON schema for a Hub Project's editable fields
6
6
  */
7
7
  export declare const ProjectSchema: IConfigurationSchema;
@@ -0,0 +1,10 @@
1
+ import { IArcGISContext } from "../../ArcGISContext";
2
+ import { UiSchemaElementOptions } from "../../core/schemas/types";
3
+ import { IHubProject } from "../../core/types/IHubProject";
4
+ /**
5
+ * Construct the Project Editor configuration options
6
+ * @param entity
7
+ * @param context
8
+ * @returns
9
+ */
10
+ export declare function getProjectEditorConfigOptions(entity: IHubProject, context: IArcGISContext): Promise<UiSchemaElementOptions[]>;
@@ -1,7 +1,9 @@
1
1
  import { IUserRequestOptions } from "@esri/arcgis-rest-auth";
2
- import { IHubProject } from "../core/types";
2
+ import { IPortal } from "@esri/arcgis-rest-portal";
3
+ import { IHubProject, IHubProjectEditor } from "../core/types";
4
+ import { ProjectEditorType } from "./_internal/ProjectSchema";
3
5
  import { UiSchemaElementOptions } from "../core/schemas";
4
- import { EditorConfigType, IEditorConfig } from "../core/behaviors/IWithEditorBehavior";
6
+ import { IEditorConfig } from "../core/behaviors/IWithEditorBehavior";
5
7
  /**
6
8
  * @private
7
9
  * Create a new Hub Project item
@@ -12,6 +14,13 @@ import { EditorConfigType, IEditorConfig } from "../core/behaviors/IWithEditorBe
12
14
  * @param requestOptions
13
15
  */
14
16
  export declare function createProject(partialProject: Partial<IHubProject>, requestOptions: IUserRequestOptions): Promise<IHubProject>;
17
+ /**
18
+ * Convert a IHubProjectEditor back to an IHubProject
19
+ * @param editor
20
+ * @param portal
21
+ * @returns
22
+ */
23
+ export declare function editorToProject(editor: IHubProjectEditor, portal: IPortal): IHubProject;
15
24
  /**
16
25
  * @private
17
26
  * Update a Hub Project
@@ -27,13 +36,9 @@ export declare function updateProject(project: IHubProject, requestOptions: IUse
27
36
  */
28
37
  export declare function deleteProject(id: string, requestOptions: IUserRequestOptions): Promise<void>;
29
38
  /**
30
- * DEPRECATED: the following will be removed at next breaking version
31
- * use the getEntityEditorSchemas function instead (which this function
32
- * has already been refactored to consume)
33
- *
34
39
  * Get the editor config for for the HubProject entity.
35
40
  * @param i18nScope translation scope to be interpolated into the uiSchema
36
41
  * @param type editor type - corresonds to the returned uiSchema
37
42
  * @param options optional hash of dynamic uiSchema element options
38
43
  */
39
- export declare function getHubProjectEditorConfig(i18nScope: string, type: EditorConfigType, options?: UiSchemaElementOptions[]): Promise<IEditorConfig>;
44
+ export declare function getHubProjectEditorConfig(i18nScope: string, type: ProjectEditorType, options?: UiSchemaElementOptions[]): Promise<IEditorConfig>;
@@ -49,14 +49,6 @@ export declare function fetchSite(identifier: string, requestOptions: IHubReques
49
49
  * @returns
50
50
  */
51
51
  export declare function convertModelToSite(model: IModel, requestOptions: IRequestOptions): IHubSite;
52
- /**
53
- * @internal
54
- * Convert an IHubSite into an IModel
55
- * @param site
56
- * @param requestOptions
57
- * @returns
58
- */
59
- export declare function convertSiteToModel(site: IHubSite, _requestOptions: IRequestOptions): IModel;
60
52
  /**
61
53
  * Convert a Hub Site Application item into a Hub Site, fetching any
62
54
  * additional information that may be required
@@ -0,0 +1,5 @@
1
+ /**
2
+ * artifically update a query param associated with a url to force
3
+ * the browser to load it from file rather than from cache
4
+ */
5
+ export declare const cacheBustUrl: (url: string, param?: string) => string;
@@ -19,6 +19,7 @@ export * from "./getGroupHomeUrl";
19
19
  export * from "./getUserHomeUrl";
20
20
  export * from "./get-campaign-url";
21
21
  export * from "./is-safe-redirect-url";
22
+ export * from "./cacheBustUrl";
22
23
  /**
23
24
  *
24
25
  * @param url
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@esri/hub-common",
3
- "version": "13.22.0",
3
+ "version": "13.23.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",