@esri/hub-common 9.18.0 → 9.21.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 (106) hide show
  1. package/dist/es2017/content/_internal.js +211 -20
  2. package/dist/es2017/content/_internal.js.map +1 -1
  3. package/dist/es2017/content/compose.js +610 -0
  4. package/dist/es2017/content/compose.js.map +1 -0
  5. package/dist/es2017/content/get-family.js +42 -0
  6. package/dist/es2017/content/get-family.js.map +1 -0
  7. package/dist/es2017/content/index.js +42 -468
  8. package/dist/es2017/content/index.js.map +1 -1
  9. package/dist/es2017/core/types/IHubAdditionalResource.js +1 -0
  10. package/dist/es2017/core/types/IHubAdditionalResource.js.map +1 -0
  11. package/dist/es2017/core/types/IHubContentEnrichments.js +1 -0
  12. package/dist/es2017/core/types/IHubContentEnrichments.js.map +1 -0
  13. package/dist/es2017/core/types/IServerEnrichments.js +1 -0
  14. package/dist/es2017/core/types/IServerEnrichments.js.map +1 -0
  15. package/dist/es2017/core/types/index.js +2 -1
  16. package/dist/es2017/core/types/index.js.map +1 -1
  17. package/dist/es2017/projects/HubProjects.js +15 -16
  18. package/dist/es2017/projects/HubProjects.js.map +1 -1
  19. package/dist/es2017/search/_searchContent.js +18 -20
  20. package/dist/es2017/search/_searchContent.js.map +1 -1
  21. package/dist/es2017/search/_searchGroups.js +18 -19
  22. package/dist/es2017/search/_searchGroups.js.map +1 -1
  23. package/dist/es2017/search/_searchUsers.js +16 -16
  24. package/dist/es2017/search/_searchUsers.js.map +1 -1
  25. package/dist/es2017/sites/domains/index.js +1 -0
  26. package/dist/es2017/sites/domains/index.js.map +1 -1
  27. package/dist/es2017/sites/domains/remove-domains-by-site-id.js +20 -0
  28. package/dist/es2017/sites/domains/remove-domains-by-site-id.js.map +1 -0
  29. package/dist/esm/content/_internal.js +214 -21
  30. package/dist/esm/content/_internal.js.map +1 -1
  31. package/dist/esm/content/compose.js +603 -0
  32. package/dist/esm/content/compose.js.map +1 -0
  33. package/dist/esm/content/get-family.js +42 -0
  34. package/dist/esm/content/get-family.js.map +1 -0
  35. package/dist/esm/content/index.js +44 -476
  36. package/dist/esm/content/index.js.map +1 -1
  37. package/dist/esm/core/types/IHubAdditionalResource.js +1 -0
  38. package/dist/esm/core/types/IHubAdditionalResource.js.map +1 -0
  39. package/dist/esm/core/types/IHubContentEnrichments.js +1 -0
  40. package/dist/esm/core/types/IHubContentEnrichments.js.map +1 -0
  41. package/dist/esm/core/types/IServerEnrichments.js +1 -0
  42. package/dist/esm/core/types/IServerEnrichments.js.map +1 -0
  43. package/dist/esm/core/types/index.js +2 -1
  44. package/dist/esm/core/types/index.js.map +1 -1
  45. package/dist/esm/projects/HubProjects.js +14 -17
  46. package/dist/esm/projects/HubProjects.js.map +1 -1
  47. package/dist/esm/search/_searchContent.js +22 -26
  48. package/dist/esm/search/_searchContent.js.map +1 -1
  49. package/dist/esm/search/_searchGroups.js +20 -23
  50. package/dist/esm/search/_searchGroups.js.map +1 -1
  51. package/dist/esm/search/_searchUsers.js +17 -19
  52. package/dist/esm/search/_searchUsers.js.map +1 -1
  53. package/dist/esm/sites/domains/index.js +1 -0
  54. package/dist/esm/sites/domains/index.js.map +1 -1
  55. package/dist/esm/sites/domains/remove-domains-by-site-id.js +20 -0
  56. package/dist/esm/sites/domains/remove-domains-by-site-id.js.map +1 -0
  57. package/dist/node/content/_internal.js +216 -22
  58. package/dist/node/content/_internal.js.map +1 -1
  59. package/dist/node/content/compose.js +615 -0
  60. package/dist/node/content/compose.js.map +1 -0
  61. package/dist/node/content/get-family.js +46 -0
  62. package/dist/node/content/get-family.js.map +1 -0
  63. package/dist/node/content/index.js +48 -477
  64. package/dist/node/content/index.js.map +1 -1
  65. package/dist/node/core/types/IHubAdditionalResource.js +3 -0
  66. package/dist/node/core/types/IHubAdditionalResource.js.map +1 -0
  67. package/dist/node/core/types/IHubContentEnrichments.js +3 -0
  68. package/dist/node/core/types/IHubContentEnrichments.js.map +1 -0
  69. package/dist/node/core/types/{IContentEnrichments.js → IServerEnrichments.js} +1 -1
  70. package/dist/node/core/types/IServerEnrichments.js.map +1 -0
  71. package/dist/node/core/types/index.js +2 -1
  72. package/dist/node/core/types/index.js.map +1 -1
  73. package/dist/node/projects/HubProjects.js +15 -16
  74. package/dist/node/projects/HubProjects.js.map +1 -1
  75. package/dist/node/search/_searchContent.js +17 -19
  76. package/dist/node/search/_searchContent.js.map +1 -1
  77. package/dist/node/search/_searchGroups.js +17 -18
  78. package/dist/node/search/_searchGroups.js.map +1 -1
  79. package/dist/node/search/_searchUsers.js +15 -15
  80. package/dist/node/search/_searchUsers.js.map +1 -1
  81. package/dist/node/sites/domains/index.js +1 -0
  82. package/dist/node/sites/domains/index.js.map +1 -1
  83. package/dist/node/sites/domains/remove-domains-by-site-id.js +24 -0
  84. package/dist/node/sites/domains/remove-domains-by-site-id.js.map +1 -0
  85. package/dist/types/content/_internal.d.ts +101 -22
  86. package/dist/types/content/compose.d.ts +115 -0
  87. package/dist/types/content/get-family.d.ts +7 -0
  88. package/dist/types/content/index.d.ts +4 -86
  89. package/dist/types/core/types/IHubAdditionalResource.d.ts +10 -0
  90. package/dist/types/core/types/IHubContent.d.ts +9 -3
  91. package/dist/types/core/types/IHubContentEnrichments.d.ts +15 -0
  92. package/dist/types/core/types/IHubItemEntity.d.ts +1 -1
  93. package/dist/types/core/types/{IContentEnrichments.d.ts → IServerEnrichments.d.ts} +3 -2
  94. package/dist/types/core/types/index.d.ts +2 -1
  95. package/dist/types/sites/domains/index.d.ts +1 -0
  96. package/dist/types/sites/domains/remove-domains-by-site-id.d.ts +8 -0
  97. package/dist/umd/common.umd.js +1071 -648
  98. package/dist/umd/common.umd.js.map +1 -1
  99. package/dist/umd/common.umd.min.js +1 -1
  100. package/dist/umd/common.umd.min.js.map +1 -1
  101. package/package.json +1 -1
  102. package/dist/es2017/core/types/IContentEnrichments.js +0 -1
  103. package/dist/es2017/core/types/IContentEnrichments.js.map +0 -1
  104. package/dist/esm/core/types/IContentEnrichments.js +0 -1
  105. package/dist/esm/core/types/IContentEnrichments.js.map +0 -1
  106. package/dist/node/core/types/IContentEnrichments.js.map +0 -1
@@ -8,7 +8,10 @@
8
8
  * It's probably a good pattern to add functions here first and then
9
9
  * move them to index.ts only when they are needed by a consumer.
10
10
  */
11
+ import { parseServiceUrl, } from "@esri/arcgis-rest-feature-layer";
11
12
  import { bBoxToPolygon, isBBox } from "../extent";
13
+ import { getFamily } from "./get-family";
14
+ import { getProp } from "../objects";
12
15
  /**
13
16
  * Create a new content with updated boundary properties
14
17
  * @param content original content
@@ -20,25 +23,11 @@ export const setContentBoundary = (content, boundary) => {
20
23
  const properties = Object.assign(Object.assign({}, (content.item.properties || {})), { boundary });
21
24
  const item = Object.assign(Object.assign({}, content.item), { properties });
22
25
  const updated = Object.assign(Object.assign({}, content), { item });
23
- return Object.assign(Object.assign({}, updated), { boundary: getContentBoundary(updated) });
26
+ return Object.assign(Object.assign({}, updated), { boundary: getContentBoundary(item) });
24
27
  };
25
- /**
26
- * Create a new content with updated extent and derived properties like boundary
27
- * @param content original content
28
- * @param extent new extent
29
- * @returns a new content with the updated extent and boundary
30
- */
31
- export const setContentExtent = (content, extent) => {
32
- // update content's item and extent
33
- const item = Object.assign(Object.assign({}, content.item), { extent });
34
- const updated = Object.assign(Object.assign({}, content), { item, extent });
35
- // derive boundary from content properties
36
- const boundary = getContentBoundary(updated);
37
- return Object.assign(Object.assign({}, updated), { boundary });
38
- };
39
- const getContentBoundary = (content) => {
28
+ // TODO: this needs to be able to handle "automatic"
29
+ export const getContentBoundary = (item) => {
40
30
  var _a;
41
- const item = content.item;
42
31
  const extent = item.extent;
43
32
  const isValidItemExtent = isBBox(extent);
44
33
  // user specified provenance is stored in item.properties
@@ -61,7 +50,12 @@ const getContentBoundary = (content) => {
61
50
  geometry,
62
51
  };
63
52
  };
64
- const MAX_SIZE = 5000000;
53
+ // when no request options are provided, the underlying
54
+ // request functions assume that we are online in production
55
+ // so we only want use enterprise logic if isPortal is explicitly defined
56
+ export const isPortal = (requestOptions) => {
57
+ return requestOptions && requestOptions.isPortal;
58
+ };
65
59
  /**
66
60
  * Returns whether or not an item is a proxied csv
67
61
  *
@@ -69,8 +63,205 @@ const MAX_SIZE = 5000000;
69
63
  * @param requestOptions Hub Request Options (including whether we're in portal)
70
64
  * @returns
71
65
  */
72
- export const isProxiedCSV = (item, requestOptions) => !requestOptions.isPortal &&
66
+ export const isProxiedCSV = (item, requestOptions) => !isPortal(requestOptions) &&
73
67
  item.access === "public" &&
74
68
  item.type === "CSV" &&
75
- item.size <= MAX_SIZE;
69
+ item.size <= 5000000;
70
+ export const getHubRelativeUrl = (type, identifier, typeKeywords) => {
71
+ // solution types have their own logic
72
+ let contentUrl = getSolutionUrl(type, identifier, typeKeywords);
73
+ if (!contentUrl) {
74
+ const family = getFamily(type);
75
+ const familiesWithPluralizedRoute = [
76
+ "app",
77
+ "dataset",
78
+ "document",
79
+ "map",
80
+ "template",
81
+ ];
82
+ // default to the catchall content route
83
+ let path = "/content";
84
+ if (family === "feedback") {
85
+ // the exception
86
+ path = "/feedback/surveys";
87
+ }
88
+ else if (isPageType(type)) {
89
+ // pages are in the document family,
90
+ // but instead of showing the page's metadata on /documents/about
91
+ // but we render the page on the pages route
92
+ path = "/pages";
93
+ }
94
+ else if (familiesWithPluralizedRoute.indexOf(family) > -1) {
95
+ // the rule: route name is plural of family name
96
+ path = `/${family}s`;
97
+ }
98
+ contentUrl = `${path}/${identifier}`;
99
+ }
100
+ return contentUrl;
101
+ };
102
+ export const isPageType = (type) => ["Hub Page", "Site Page"].includes(type);
103
+ const getSolutionUrl = (type, identifier, typeKeywords) => {
104
+ let hubUrl;
105
+ if (type === "Solution") {
106
+ // NOTE: as per the above spreadsheet,
107
+ // solution types are now in the Template family
108
+ // but we don't send them to the route for initiative templates
109
+ if ((typeKeywords === null || typeKeywords === void 0 ? void 0 : typeKeywords.indexOf("Deployed")) > 0) {
110
+ // deployed solutions go to the generic content route
111
+ hubUrl = `/content/${identifier}`;
112
+ }
113
+ // others go to the solution about route
114
+ hubUrl = `/templates/${identifier}/about`;
115
+ }
116
+ return hubUrl;
117
+ };
118
+ export function getMetadataPath(identifier) {
119
+ // NOTE: i have verified that this will work regardless of the "Metadata Style" set on the org
120
+ const metadataPaths = {
121
+ updateFrequency: "metadata.dataIdInfo.resMaint.maintFreq.MaintFreqCd.@_value",
122
+ reviseDate: "metadata.dataIdInfo.idCitation.date.reviseDate",
123
+ pubDate: "metadata.dataIdInfo.idCitation.date.pubDate",
124
+ createDate: "metadata.dataIdInfo.idCitation.date.createDate",
125
+ metadataUpdateFrequency: "metadata.mdMaint.maintFreq.MaintFreqCd.@_value",
126
+ metadataUpdatedDate: "metadata.mdDateSt",
127
+ };
128
+ return metadataPaths[identifier];
129
+ }
130
+ export function getValueFromMetadata(metadata, identifier) {
131
+ const path = getMetadataPath(identifier);
132
+ return path && getProp(metadata, path);
133
+ }
134
+ export var DatePrecision;
135
+ (function (DatePrecision) {
136
+ DatePrecision["Year"] = "year";
137
+ DatePrecision["Month"] = "month";
138
+ DatePrecision["Day"] = "day";
139
+ DatePrecision["Time"] = "time";
140
+ })(DatePrecision || (DatePrecision = {}));
141
+ /**
142
+ * Parses an ISO8601 date string into a date and a precision.
143
+ * This is because a) if somone entered 2018, we want to respect that and not treat it as the same as 2018-01-01
144
+ * and b) you cannot naively call new Date with an ISO 8601 string that does not include time information
145
+ * For example, when I, here in mountain time, do new Date('2018').getFullYear() I get "2017".
146
+ * This is because when you do not provide time or timezone info, UTC is assumed, so new Date('2018') is 2018-01-01T00:00:00 in UTC
147
+ * which is actually 7 hours earlier here in mountain time.
148
+ *
149
+ * @param {string} isoString
150
+ * @return { date: Date, precision: DatePrecision }
151
+ */
152
+ export function parseISODateString(isoString) {
153
+ isoString = `${isoString}`;
154
+ let date;
155
+ let precision;
156
+ if (/^\d{4}$/.test(isoString)) {
157
+ // yyyy
158
+ date = new Date(+isoString, 0, 1);
159
+ precision = DatePrecision.Year;
160
+ }
161
+ else if (/^\d{4}-\d{1,2}$/.test(isoString)) {
162
+ // yyyy-mm
163
+ const parts = isoString.split("-");
164
+ date = new Date(+parts[0], +parts[1] - 1, 1);
165
+ precision = DatePrecision.Month;
166
+ }
167
+ else if (/^\d{4}-\d{1,2}-\d{1,2}$/.test(isoString)) {
168
+ // yyyy-mm-dd
169
+ const parts = isoString.split("-");
170
+ date = new Date(+parts[0], +parts[1] - 1, +parts[2]);
171
+ precision = DatePrecision.Day;
172
+ }
173
+ else if (!Number.isNaN(Date.parse(isoString))) {
174
+ // any other string parsable to a valid date
175
+ date = new Date(isoString);
176
+ precision = isoString.includes("T")
177
+ ? DatePrecision.Time
178
+ : DatePrecision.Day;
179
+ }
180
+ return date && precision && { date, precision };
181
+ }
182
+ export const getServerSpatialReference = (server, layer) => {
183
+ var _a;
184
+ const layerSpatialReference = (_a = layer === null || layer === void 0 ? void 0 : layer.extent) === null || _a === void 0 ? void 0 : _a.spatialReference;
185
+ return layerSpatialReference || (server === null || server === void 0 ? void 0 : server.spatialReference);
186
+ };
187
+ // NOTE: IItem has spatialRefernce: ISpatialReference, but
188
+ // the portal REST API returns spatialReference as as string
189
+ // that is always either WKID like "102100" or
190
+ // WKT like "NAD_1983_HARN_StatePlane_Hawaii_3_FIPS_5103_Feet"
191
+ // so we coerce those string into a ISpatialReference object
192
+ export const getItemSpatialReference = (item) => {
193
+ const spatialReference = item.spatialReference;
194
+ if (!spatialReference || typeof spatialReference === "object") {
195
+ // no need to try and transform this into an ISpatialReference
196
+ return spatialReference;
197
+ }
198
+ // otherwise it _should_ be a string (if coming form the REST API)
199
+ // but we force it in case it was set to a number somewhere outside of TS
200
+ const spatialReferenceString = spatialReference + "";
201
+ const wkid = parseInt(spatialReferenceString, 10);
202
+ return isNaN(wkid)
203
+ ? // string is not a number, assume it is WKT
204
+ { wkt: spatialReferenceString }
205
+ : //
206
+ { wkid };
207
+ };
208
+ /**
209
+ * Extracts additional resources from the provided metadata
210
+ * and transforms them into a hub-friendly format.
211
+ *
212
+ * Returns null if no resources are available
213
+ *
214
+ * @param item
215
+ * @param metadata formal metadata
216
+ * @returns
217
+ */
218
+ export const getAdditionalResources = (item, metadata, requestOptions) => {
219
+ let rawResources = getProp(metadata, "metadata.distInfo.distTranOps.onLineSrc") || null;
220
+ if (rawResources === null) {
221
+ return null;
222
+ }
223
+ // Coerce to array since rawResources will be an object if only 1 resource is available
224
+ rawResources = Array.isArray(rawResources) ? rawResources : [rawResources];
225
+ return rawResources.map((resource) => ({
226
+ name: resource.orName,
227
+ url: getAdditionalResourceUrl(resource, item, requestOptions),
228
+ isDataSource: isDataSourceOfItem(resource, item),
229
+ }));
230
+ };
231
+ /**
232
+ * Determines whether a raw additional resource (i.e. extracted out of formal
233
+ * metadata with no transformation) references the underlying service that backs
234
+ * the item.
235
+ *
236
+ * @param resource raw additional resource of an item
237
+ * @param item
238
+ * @returns
239
+ */
240
+ export const isDataSourceOfItem = (resource, item) => {
241
+ const serviceUrl = item.url && parseServiceUrl(item.url);
242
+ return serviceUrl && resource.linkage.includes(serviceUrl);
243
+ };
244
+ /**
245
+ * Returns the url for an additional resource.
246
+ *
247
+ * Automatically appends auth token if token is available
248
+ * and resource points to the backing service of an item.
249
+ *
250
+ * @param resource raw additional resource of an item
251
+ * @param item
252
+ * @param requestOptions IHubRequestOptions, including authentication
253
+ * @returns
254
+ */
255
+ export const getAdditionalResourceUrl = (resource, item, requestOptions) => {
256
+ let result = resource.linkage;
257
+ const token = getProp(requestOptions, "authentication.token");
258
+ if (token && isDataSourceOfItem(resource, item)) {
259
+ const resUrl = new URL(resource.linkage);
260
+ const params = new URLSearchParams(resUrl.search);
261
+ params.set("token", token);
262
+ resUrl.search = params.toString();
263
+ result = resUrl.toString();
264
+ }
265
+ return result;
266
+ };
76
267
  //# sourceMappingURL=_internal.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"_internal.js","sourceRoot":"","sources":["../../../src/content/_internal.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GAS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