@esri/hub-common 14.80.2 → 14.81.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 (86) hide show
  1. package/dist/esm/content/_internal/computeProps.js +3 -25
  2. package/dist/esm/content/_internal/computeProps.js.map +1 -1
  3. package/dist/esm/content/_internal/internalContentUtils.js +69 -1
  4. package/dist/esm/content/_internal/internalContentUtils.js.map +1 -1
  5. package/dist/esm/content/search.js +2 -15
  6. package/dist/esm/content/search.js.map +1 -1
  7. package/dist/esm/core/_internal/computeBaseProps.js +15 -0
  8. package/dist/esm/core/_internal/computeBaseProps.js.map +1 -0
  9. package/dist/esm/discussions/_internal/computeProps.js +3 -0
  10. package/dist/esm/discussions/_internal/computeProps.js.map +1 -1
  11. package/dist/esm/discussions/edit.js +2 -2
  12. package/dist/esm/discussions/edit.js.map +1 -1
  13. package/dist/esm/extent.js +39 -0
  14. package/dist/esm/extent.js.map +1 -1
  15. package/dist/esm/initiative-templates/_internal/computeProps.js +3 -0
  16. package/dist/esm/initiative-templates/_internal/computeProps.js.map +1 -1
  17. package/dist/esm/initiative-templates/fetch.js +2 -0
  18. package/dist/esm/initiative-templates/fetch.js.map +1 -1
  19. package/dist/esm/initiatives/HubInitiatives.js +2 -1
  20. package/dist/esm/initiatives/HubInitiatives.js.map +1 -1
  21. package/dist/esm/initiatives/_internal/computeProps.js +3 -0
  22. package/dist/esm/initiatives/_internal/computeProps.js.map +1 -1
  23. package/dist/esm/pages/HubPages.js +2 -1
  24. package/dist/esm/pages/HubPages.js.map +1 -1
  25. package/dist/esm/pages/_internal/computeProps.js +3 -0
  26. package/dist/esm/pages/_internal/computeProps.js.map +1 -1
  27. package/dist/esm/projects/_internal/computeProps.js +3 -0
  28. package/dist/esm/projects/_internal/computeProps.js.map +1 -1
  29. package/dist/esm/projects/fetch.js +2 -0
  30. package/dist/esm/projects/fetch.js.map +1 -1
  31. package/dist/esm/search/_internal/hubSearchItemsHelpers/ogcItemToSearchResult.js +1 -16
  32. package/dist/esm/search/_internal/hubSearchItemsHelpers/ogcItemToSearchResult.js.map +1 -1
  33. package/dist/esm/sites/HubSites.js +2 -1
  34. package/dist/esm/sites/HubSites.js.map +1 -1
  35. package/dist/esm/sites/_internal/computeProps.js +3 -0
  36. package/dist/esm/sites/_internal/computeProps.js.map +1 -1
  37. package/dist/esm/templates/_internal/computeProps.js +10 -7
  38. package/dist/esm/templates/_internal/computeProps.js.map +1 -1
  39. package/dist/esm/templates/fetch.js +2 -0
  40. package/dist/esm/templates/fetch.js.map +1 -1
  41. package/dist/node/content/_internal/computeProps.js +4 -27
  42. package/dist/node/content/_internal/computeProps.js.map +1 -1
  43. package/dist/node/content/_internal/internalContentUtils.js +69 -1
  44. package/dist/node/content/_internal/internalContentUtils.js.map +1 -1
  45. package/dist/node/content/search.js +1 -14
  46. package/dist/node/content/search.js.map +1 -1
  47. package/dist/node/core/_internal/computeBaseProps.js +19 -0
  48. package/dist/node/core/_internal/computeBaseProps.js.map +1 -0
  49. package/dist/node/discussions/_internal/computeProps.js +3 -0
  50. package/dist/node/discussions/_internal/computeProps.js.map +1 -1
  51. package/dist/node/discussions/edit.js +2 -2
  52. package/dist/node/discussions/edit.js.map +1 -1
  53. package/dist/node/extent.js +40 -1
  54. package/dist/node/extent.js.map +1 -1
  55. package/dist/node/initiative-templates/_internal/computeProps.js +3 -0
  56. package/dist/node/initiative-templates/_internal/computeProps.js.map +1 -1
  57. package/dist/node/initiative-templates/fetch.js +2 -0
  58. package/dist/node/initiative-templates/fetch.js.map +1 -1
  59. package/dist/node/initiatives/HubInitiatives.js +1 -0
  60. package/dist/node/initiatives/HubInitiatives.js.map +1 -1
  61. package/dist/node/initiatives/_internal/computeProps.js +3 -0
  62. package/dist/node/initiatives/_internal/computeProps.js.map +1 -1
  63. package/dist/node/pages/HubPages.js +1 -0
  64. package/dist/node/pages/HubPages.js.map +1 -1
  65. package/dist/node/pages/_internal/computeProps.js +3 -0
  66. package/dist/node/pages/_internal/computeProps.js.map +1 -1
  67. package/dist/node/projects/_internal/computeProps.js +3 -0
  68. package/dist/node/projects/_internal/computeProps.js.map +1 -1
  69. package/dist/node/projects/fetch.js +2 -0
  70. package/dist/node/projects/fetch.js.map +1 -1
  71. package/dist/node/search/_internal/hubSearchItemsHelpers/ogcItemToSearchResult.js +1 -16
  72. package/dist/node/search/_internal/hubSearchItemsHelpers/ogcItemToSearchResult.js.map +1 -1
  73. package/dist/node/sites/HubSites.js +1 -0
  74. package/dist/node/sites/HubSites.js.map +1 -1
  75. package/dist/node/sites/_internal/computeProps.js +3 -0
  76. package/dist/node/sites/_internal/computeProps.js.map +1 -1
  77. package/dist/node/templates/_internal/computeProps.js +10 -7
  78. package/dist/node/templates/_internal/computeProps.js.map +1 -1
  79. package/dist/node/templates/fetch.js +2 -0
  80. package/dist/node/templates/fetch.js.map +1 -1
  81. package/dist/types/content/_internal/computeProps.d.ts +0 -4
  82. package/dist/types/content/_internal/internalContentUtils.d.ts +16 -2
  83. package/dist/types/core/_internal/computeBaseProps.d.ts +9 -0
  84. package/dist/types/extent.d.ts +14 -0
  85. package/dist/types/search/types/IHubSearchResult.d.ts +4 -0
  86. package/package.json +1 -1
@@ -7,6 +7,7 @@ const TemplateBusinessRules_1 = require("./TemplateBusinessRules");
7
7
  const computeLinks_1 = require("./computeLinks");
8
8
  const objects_1 = require("../../objects");
9
9
  const utils_2 = require("../utils");
10
+ const computeBaseProps_1 = require("../../core/_internal/computeBaseProps");
10
11
  /**
11
12
  * @private
12
13
  * Given a model and a template, set various computed
@@ -17,23 +18,25 @@ const utils_2 = require("../utils");
17
18
  * @param requestOptions
18
19
  */
19
20
  function computeProps(model, template, requestOptions) {
20
- // 1. compute relevant template links
21
+ // 1. compute base properties on template
22
+ template = computeBaseProps_1.computeBaseProps(model.item, template);
23
+ // 2. compute relevant template links
21
24
  template.links = computeLinks_1.computeLinks(model.item, requestOptions);
22
- // 2. append the template's thumbnail url at the top-level
25
+ // 3. append the template's thumbnail url at the top-level
23
26
  template.thumbnailUrl = template.links.thumbnail;
24
- // 3. compute relevant template dates
27
+ // 4. compute relevant template dates
25
28
  template.createdDate = new Date(model.item.created);
26
29
  template.createdDateSource = "item.created";
27
30
  template.updatedDate = new Date(model.item.modified);
28
31
  template.updatedDateSource = "item.modified";
29
- // 4. determine whether the template is discussable
32
+ // 5. determine whether the template is discussable
30
33
  template.isDiscussable = utils_1.isDiscussable(template);
31
- // 5. process features that can be disabled by the entity owner
34
+ // 6. process features that can be disabled by the entity owner
32
35
  template.features = processEntityFeatures_1.processEntityFeatures(objects_1.getProp(model, "data.settings.features") || {}, TemplateBusinessRules_1.TemplateDefaultFeatures);
33
- // 6. compute additional template-specific properties
36
+ // 7. compute additional template-specific properties
34
37
  template.isDeployed = (objects_1.getProp(model, "item.typeKeywords") || []).includes("Deployed");
35
38
  template.deployedType = utils_2.getDeployedTemplateType(model.item);
36
- // 7. cast b/c this takes a partial but returns a full template
39
+ // 8. cast b/c this takes a partial but returns a full template
37
40
  return template;
38
41
  }
39
42
  exports.computeProps = computeProps;
@@ -1 +1 @@
1
- {"version":3,"file":"computeProps.js","sourceRoot":"","sources":["../../../../src/templates/_internal/computeProps.ts"],"names":[],"mappings":";;;AACA,mDAAwD;AACxD,6FAA0F;AAE1F,mEAAkE;AAElE,iDAA8C;AAC9C,2CAAwC;AACxC,oCAAmD;AAEnD;;;;;;;;GAQG;AACH,SAAgB,YAAY,CAC1B,KAAa,EACb,QAA+B,EAC/B,cAA+B;IAE/B,qCAAqC;IACrC,QAAQ,CAAC,KAAK,GAAG,2BAAY,CAAC,KAAK,CAAC,IAAI,EAAE,cAAc,CAAC,CAAC;IAE1D,0DAA0D;IAC1D,QAAQ,CAAC,YAAY,GAAG,QAAQ,CAAC,KAAK,CAAC,SAAS,CAAC;IAEjD,qCAAqC;IACrC,QAAQ,CAAC,WAAW,GAAG,IAAI,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IACpD,QA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AC;IAEjD,qCAAqC;IACrC,QAAQ,CAAC,WAAW,GAAG,IAAI,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IACpD,QAAQ,CAAC,iBAAiB,GAAG,cAAc,CAAC;IAC5C,QAAQ,CAAC,WAAW,GAAG,IAAI,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;IACrD,QAAQ,CAAC,iBAAiB,GAAG,eAAe,CAAC;IAE7C,mDAAmD;IACnD,QAAQ,CAAC,aAAa,GAAG,qBAAa,CAAC,QAAQ,CAAC,CAAC;IAEjD,+DAA+D;IAC/D,QAAQ,CAAC,QAAQ,GAAG,6CAAqB,CACvC,iBAAO,CAAC,KAAK,EAAE,wBAAwB,CAAC,IAAI,EAAE,EAC9C,+CAAuB,CACxB,CAAC;IAEF,qDAAqD;IACrD,QAAQ,CAAC,UAAU,GAAG,CAAC,iBAAO,CAAC,KAAK,EAAE,mBAAmB,CAAC,IAAI,EAAE,CAAC,CAAC,QAAQ,CACxE,UAAU,CACX,CAAC;IACF,QAAQ,CAAC,YAAY,GAAG,+BAAuB,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;IAE5D,+DAA+D;IAC/D,OAAO,QAAwB,CAAC;AAClC,CAAC;AArCD,oCAqCC"}
@@ -15,6 +15,7 @@ const _enrichments_1 = require("../items/_enrichments");
15
15
  const objects_1 = require("../objects");
16
16
  const computeLinks_1 = require("./_internal/computeLinks");
17
17
  const utils_2 = require("./utils");
18
+ const internalContentUtils_1 = require("../content/_internal/internalContentUtils");
18
19
  /**
19
20
  * @private
20
21
  * Fetch a Hub Template backing item by id or slug
@@ -84,6 +85,7 @@ async function enrichTemplateSearchResult(item, include, requestOptions) {
84
85
  thumbnail: "not-implemented",
85
86
  workspaceRelative: "not-implemented",
86
87
  },
88
+ location: internalContentUtils_1.deriveLocationFromItem(item),
87
89
  rawResult: item,
88
90
  };
89
91
  // 1. optionally enrich the template item with
@@ -1 +1 @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IAEpD,OAAO,MAAM,CAAC;AAChB,CAAC;AAzDD,gEAyDC"}
@@ -1,9 +1,5 @@
1
1
  import { IRequestOptions } from "@esri/arcgis-rest-request";
2
2
  import { IModel } from "../../types";
3
- import { IExtent } from "@esri/arcgis-rest-types";
4
- import { IHubLocation } from "../../core/types/IHubLocation";
5
3
  import { IHubEditableContent } from "../../core/types/IHubEditableContent";
6
4
  import { IItemAndIServerEnrichments } from "../../items/_enrichments";
7
- export declare const getExtentObject: (itemExtent: number[][]) => IExtent;
8
- export declare function deriveLocationFromItemExtent(itemExtent?: number[][]): IHubLocation;
9
5
  export declare function computeProps(model: IModel, content: Partial<IHubEditableContent>, requestOptions: IRequestOptions, enrichments?: IItemAndIServerEnrichments): IHubEditableContent;
@@ -1,6 +1,6 @@
1
1
  import { IItem, IPortal } from "@esri/arcgis-rest-portal";
2
- import { ILayerDefinition, ISpatialReference, IUser } from "@esri/arcgis-rest-types";
3
- import { IHubContent, PublisherSource } from "../../core";
2
+ import { IExtent, ILayerDefinition, ISpatialReference, IUser } from "@esri/arcgis-rest-types";
3
+ import { IHubContent, IHubLocation, PublisherSource } from "../../core";
4
4
  import { IHubGeography, GeographyProvenance, IHubRequestOptions } from "../../types";
5
5
  import { IHubAdditionalResource } from "../../core/types/IHubAdditionalResource";
6
6
  import { IRequestOptions } from "@esri/arcgis-rest-request";
@@ -110,6 +110,20 @@ export declare const setContentBoundary: (content: IHubContent, boundary: Geogra
110
110
  * @private
111
111
  */
112
112
  export declare const getContentBoundary: (item: IItem) => IHubGeography;
113
+ /**
114
+ * Constructs IExtent from numeric item extent array
115
+ * @param extent Raw item extent array
116
+ * @returns IExtent
117
+ */
118
+ export declare const getExtentObject: (extent: number[][]) => IExtent;
119
+ /**
120
+ * Derives proper IHubLocation given an ArcGIS Item. If no
121
+ * location (item.properties.location) is present, one will be
122
+ * constructed from the item's extent.
123
+ * @param item ArcGIS Item
124
+ * @returns IHubLocation
125
+ */
126
+ export declare const deriveLocationFromItem: (item: IItem) => IHubLocation;
113
127
  /**
114
128
  * Determine if we are in an enterprise environment
115
129
  * NOTE: when no request options are provided, the underlying
@@ -0,0 +1,9 @@
1
+ import { IItem } from "@esri/arcgis-rest-types";
2
+ import { IHubItemEntity } from "../types";
3
+ /**
4
+ * Base property mapping for item backed entity types
5
+ * @param item IItem
6
+ * @param entity IHubItemEntity
7
+ * @returns
8
+ */
9
+ export declare function computeBaseProps<T extends Partial<IHubItemEntity>>(item: IItem, entity: T): T;
@@ -1,5 +1,6 @@
1
1
  import { IExtent, IPoint, IPolygon } from "@esri/arcgis-rest-types";
2
2
  import { IHubRequestOptions, BBox } from "./types";
3
+ import { Polygon } from "geojson";
3
4
  /**
4
5
  * Turns an bounding box coordinate array into an extent object
5
6
  * @param bBox bounding box coordinate array
@@ -54,3 +55,16 @@ export declare const extentToPolygon: (extent: IExtent) => IPolygon;
54
55
  * @returns
55
56
  */
56
57
  export declare const getExtentCenter: (extent: IExtent) => IPoint;
58
+ /**
59
+ * Checks coordinate or coordinate array to determine if all coordinates are
60
+ * possibly WGS84. This is a best effert attempt, not a guarantee.
61
+ * @param bboxOrCoordinates
62
+ * @returns
63
+ */
64
+ export declare const allCoordinatesPossiblyWGS84: (bboxOrCoordinates: number[][] | number[]) => boolean;
65
+ /**
66
+ * Turns a geojson polygon in to a bounding box coordinate array
67
+ * @param polygon
68
+ * @returns BBox
69
+ */
70
+ export declare const GeoJSONPolygonToBBox: (polygon: Partial<Polygon>) => BBox;
@@ -33,6 +33,10 @@ export interface IHubSearchResult extends IHubEntityBase {
33
33
  */
34
34
  typeKeywords?: string[];
35
35
  /**
36
+ * @deprecated geometry is being dropped and replaced
37
+ * with 'location' for all location specific information
38
+ * on a search result
39
+ *
36
40
  * Geometry connected to this entity
37
41
  * For items, it will default to the extent,
38
42
  * but may be derived from a boundary resource
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@esri/hub-common",
3
- "version": "14.80.2",
3
+ "version": "14.81.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",