@esri/hub-common 9.18.0 → 9.19.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 (61) hide show
  1. package/dist/es2017/content/_internal.js +151 -30
  2. package/dist/es2017/content/_internal.js.map +1 -1
  3. package/dist/es2017/content/compose.js +607 -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/IHubContentEnrichments.js +1 -0
  10. package/dist/es2017/core/types/IHubContentEnrichments.js.map +1 -0
  11. package/dist/es2017/core/types/IServerEnrichments.js +1 -0
  12. package/dist/es2017/core/types/IServerEnrichments.js.map +1 -0
  13. package/dist/es2017/core/types/index.js +2 -1
  14. package/dist/es2017/core/types/index.js.map +1 -1
  15. package/dist/esm/content/_internal.js +153 -30
  16. package/dist/esm/content/_internal.js.map +1 -1
  17. package/dist/esm/content/compose.js +600 -0
  18. package/dist/esm/content/compose.js.map +1 -0
  19. package/dist/esm/content/get-family.js +42 -0
  20. package/dist/esm/content/get-family.js.map +1 -0
  21. package/dist/esm/content/index.js +44 -476
  22. package/dist/esm/content/index.js.map +1 -1
  23. package/dist/esm/core/types/IHubContentEnrichments.js +1 -0
  24. package/dist/esm/core/types/IHubContentEnrichments.js.map +1 -0
  25. package/dist/esm/core/types/IServerEnrichments.js +1 -0
  26. package/dist/esm/core/types/IServerEnrichments.js.map +1 -0
  27. package/dist/esm/core/types/index.js +2 -1
  28. package/dist/esm/core/types/index.js.map +1 -1
  29. package/dist/node/content/_internal.js +155 -31
  30. package/dist/node/content/_internal.js.map +1 -1
  31. package/dist/node/content/compose.js +612 -0
  32. package/dist/node/content/compose.js.map +1 -0
  33. package/dist/node/content/get-family.js +46 -0
  34. package/dist/node/content/get-family.js.map +1 -0
  35. package/dist/node/content/index.js +48 -477
  36. package/dist/node/content/index.js.map +1 -1
  37. package/dist/node/core/types/IHubContentEnrichments.js +3 -0
  38. package/dist/node/core/types/IHubContentEnrichments.js.map +1 -0
  39. package/dist/node/core/types/{IContentEnrichments.js → IServerEnrichments.js} +1 -1
  40. package/dist/node/core/types/IServerEnrichments.js.map +1 -0
  41. package/dist/node/core/types/index.js +2 -1
  42. package/dist/node/core/types/index.js.map +1 -1
  43. package/dist/types/content/_internal.d.ts +57 -22
  44. package/dist/types/content/compose.d.ts +115 -0
  45. package/dist/types/content/get-family.d.ts +7 -0
  46. package/dist/types/content/index.d.ts +4 -86
  47. package/dist/types/core/types/IHubContent.d.ts +4 -2
  48. package/dist/types/core/types/IHubContentEnrichments.d.ts +15 -0
  49. package/dist/types/core/types/IHubItemEntity.d.ts +1 -1
  50. package/dist/types/core/types/{IContentEnrichments.d.ts → IServerEnrichments.d.ts} +3 -2
  51. package/dist/types/core/types/index.d.ts +2 -1
  52. package/dist/umd/common.umd.js +910 -555
  53. package/dist/umd/common.umd.js.map +1 -1
  54. package/dist/umd/common.umd.min.js +1 -1
  55. package/dist/umd/common.umd.min.js.map +1 -1
  56. package/package.json +1 -1
  57. package/dist/es2017/core/types/IContentEnrichments.js +0 -1
  58. package/dist/es2017/core/types/IContentEnrichments.js.map +0 -1
  59. package/dist/esm/core/types/IContentEnrichments.js +0 -1
  60. package/dist/esm/core/types/IContentEnrichments.js.map +0 -1
  61. package/dist/node/core/types/IContentEnrichments.js.map +0 -1
@@ -1,14 +1,6 @@
1
- /**
2
- * Use this module for functions that do not need to be used by consumers (yet),
3
- * but may be shared between hub.js modules, and/or need to be tested
4
- * to get 100% coverage w/o writing cumbersome tests of higher level functions.
5
- *
6
- * Consuming will not be able to import these functions.
7
- *
8
- * It's probably a good pattern to add functions here first and then
9
- * move them to index.ts only when they are needed by a consumer.
10
- */
11
1
  import { bBoxToPolygon, isBBox } from "../extent";
2
+ import { getFamily } from "./get-family";
3
+ import { getProp } from "../objects";
12
4
  /**
13
5
  * Create a new content with updated boundary properties
14
6
  * @param content original content
@@ -20,25 +12,11 @@ export const setContentBoundary = (content, boundary) => {
20
12
  const properties = Object.assign(Object.assign({}, (content.item.properties || {})), { boundary });
21
13
  const item = Object.assign(Object.assign({}, content.item), { properties });
22
14
  const updated = Object.assign(Object.assign({}, content), { item });
23
- return Object.assign(Object.assign({}, updated), { boundary: getContentBoundary(updated) });
15
+ return Object.assign(Object.assign({}, updated), { boundary: getContentBoundary(item) });
24
16
  };
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) => {
17
+ // TODO: this needs to be able to handle "automatic"
18
+ export const getContentBoundary = (item) => {
40
19
  var _a;
41
- const item = content.item;
42
20
  const extent = item.extent;
43
21
  const isValidItemExtent = isBBox(extent);
44
22
  // user specified provenance is stored in item.properties
@@ -61,7 +39,12 @@ const getContentBoundary = (content) => {
61
39
  geometry,
62
40
  };
63
41
  };
64
- const MAX_SIZE = 5000000;
42
+ // when no request options are provided, the underlying
43
+ // request functions assume that we are online in production
44
+ // so we only want use enterprise logic if isPortal is explicitly defined
45
+ export const isPortal = (requestOptions) => {
46
+ return requestOptions && requestOptions.isPortal;
47
+ };
65
48
  /**
66
49
  * Returns whether or not an item is a proxied csv
67
50
  *
@@ -69,8 +52,146 @@ const MAX_SIZE = 5000000;
69
52
  * @param requestOptions Hub Request Options (including whether we're in portal)
70
53
  * @returns
71
54
  */
72
- export const isProxiedCSV = (item, requestOptions) => !requestOptions.isPortal &&
55
+ export const isProxiedCSV = (item, requestOptions) => !isPortal(requestOptions) &&
73
56
  item.access === "public" &&
74
57
  item.type === "CSV" &&
75
- item.size <= MAX_SIZE;
58
+ item.size <= 5000000;
59
+ export const getHubRelativeUrl = (type, identifier, typeKeywords) => {
60
+ // solution types have their own logic
61
+ let contentUrl = getSolutionUrl(type, identifier, typeKeywords);
62
+ if (!contentUrl) {
63
+ const family = getFamily(type);
64
+ const familiesWithPluralizedRoute = [
65
+ "app",
66
+ "dataset",
67
+ "document",
68
+ "map",
69
+ "template",
70
+ ];
71
+ // default to the catchall content route
72
+ let path = "/content";
73
+ if (family === "feedback") {
74
+ // the exception
75
+ path = "/feedback/surveys";
76
+ }
77
+ else if (isPageType(type)) {
78
+ // pages are in the document family,
79
+ // but instead of showing the page's metadata on /documents/about
80
+ // but we render the page on the pages route
81
+ path = "/pages";
82
+ }
83
+ else if (familiesWithPluralizedRoute.indexOf(family) > -1) {
84
+ // the rule: route name is plural of family name
85
+ path = `/${family}s`;
86
+ }
87
+ contentUrl = `${path}/${identifier}`;
88
+ }
89
+ return contentUrl;
90
+ };
91
+ export const isPageType = (type) => ["Hub Page", "Site Page"].includes(type);
92
+ const getSolutionUrl = (type, identifier, typeKeywords) => {
93
+ let hubUrl;
94
+ if (type === "Solution") {
95
+ // NOTE: as per the above spreadsheet,
96
+ // solution types are now in the Template family
97
+ // but we don't send them to the route for initiative templates
98
+ if ((typeKeywords === null || typeKeywords === void 0 ? void 0 : typeKeywords.indexOf("Deployed")) > 0) {
99
+ // deployed solutions go to the generic content route
100
+ hubUrl = `/content/${identifier}`;
101
+ }
102
+ // others go to the solution about route
103
+ hubUrl = `/templates/${identifier}/about`;
104
+ }
105
+ return hubUrl;
106
+ };
107
+ export function getMetadataPath(identifier) {
108
+ // NOTE: i have verified that this will work regardless of the "Metadata Style" set on the org
109
+ const metadataPaths = {
110
+ updateFrequency: "metadata.dataIdInfo.resMaint.maintFreq.MaintFreqCd.@_value",
111
+ reviseDate: "metadata.dataIdInfo.idCitation.date.reviseDate",
112
+ pubDate: "metadata.dataIdInfo.idCitation.date.pubDate",
113
+ createDate: "metadata.dataIdInfo.idCitation.date.createDate",
114
+ metadataUpdateFrequency: "metadata.mdMaint.maintFreq.MaintFreqCd.@_value",
115
+ metadataUpdatedDate: "metadata.mdDateSt",
116
+ };
117
+ return metadataPaths[identifier];
118
+ }
119
+ export function getValueFromMetadata(metadata, identifier) {
120
+ const path = getMetadataPath(identifier);
121
+ return path && getProp(metadata, path);
122
+ }
123
+ export var DatePrecision;
124
+ (function (DatePrecision) {
125
+ DatePrecision["Year"] = "year";
126
+ DatePrecision["Month"] = "month";
127
+ DatePrecision["Day"] = "day";
128
+ DatePrecision["Time"] = "time";
129
+ })(DatePrecision || (DatePrecision = {}));
130
+ /**
131
+ * Parses an ISO8601 date string into a date and a precision.
132
+ * This is because a) if somone entered 2018, we want to respect that and not treat it as the same as 2018-01-01
133
+ * and b) you cannot naively call new Date with an ISO 8601 string that does not include time information
134
+ * For example, when I, here in mountain time, do new Date('2018').getFullYear() I get "2017".
135
+ * 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
136
+ * which is actually 7 hours earlier here in mountain time.
137
+ *
138
+ * @param {string} isoString
139
+ * @return { date: Date, precision: DatePrecision }
140
+ */
141
+ export function parseISODateString(isoString) {
142
+ isoString = `${isoString}`;
143
+ let date;
144
+ let precision;
145
+ if (/^\d{4}$/.test(isoString)) {
146
+ // yyyy
147
+ date = new Date(+isoString, 0, 1);
148
+ precision = DatePrecision.Year;
149
+ }
150
+ else if (/^\d{4}-\d{1,2}$/.test(isoString)) {
151
+ // yyyy-mm
152
+ const parts = isoString.split("-");
153
+ date = new Date(+parts[0], +parts[1] - 1, 1);
154
+ precision = DatePrecision.Month;
155
+ }
156
+ else if (/^\d{4}-\d{1,2}-\d{1,2}$/.test(isoString)) {
157
+ // yyyy-mm-dd
158
+ const parts = isoString.split("-");
159
+ date = new Date(+parts[0], +parts[1] - 1, +parts[2]);
160
+ precision = DatePrecision.Day;
161
+ }
162
+ else if (!Number.isNaN(Date.parse(isoString))) {
163
+ // any other string parsable to a valid date
164
+ date = new Date(isoString);
165
+ precision = isoString.includes("T")
166
+ ? DatePrecision.Time
167
+ : DatePrecision.Day;
168
+ }
169
+ return date && precision && { date, precision };
170
+ }
171
+ export const getServerSpatialReference = (server, layer) => {
172
+ var _a;
173
+ const layerSpatialReference = (_a = layer === null || layer === void 0 ? void 0 : layer.extent) === null || _a === void 0 ? void 0 : _a.spatialReference;
174
+ return layerSpatialReference || (server === null || server === void 0 ? void 0 : server.spatialReference);
175
+ };
176
+ // NOTE: IItem has spatialRefernce: ISpatialReference, but
177
+ // the portal REST API returns spatialReference as as string
178
+ // that is always either WKID like "102100" or
179
+ // WKT like "NAD_1983_HARN_StatePlane_Hawaii_3_FIPS_5103_Feet"
180
+ // so we coerce those string into a ISpatialReference object
181
+ export const getItemSpatialReference = (item) => {
182
+ const spatialReference = item.spatialReference;
183
+ if (!spatialReference || typeof spatialReference === "object") {
184
+ // no need to try and transform this into an ISpatialReference
185
+ return spatialReference;
186
+ }
187
+ // otherwise it _should_ be a string (if coming form the REST API)
188
+ // but we force it in case it was set to a number somewhere outside of TS
189
+ const spatialReferenceString = spatialReference + "";
190
+ const wkid = parseInt(spatialReferenceString, 10);
191
+ return isNaN(wkid)
192
+ ? // string is not a number, assume it is WKT
193
+ { wkt: spatialReferenceString }
194
+ : //
195
+ { wkid };
196
+ };
76
197
  //# sourceMappingURL=_internal.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"_internal.js","sourceRoot":"","sources":["../../../src/content/_internal.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAUH,OAAO,EAAE,aAAa,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AAElD;;;;;GAKG;AACH,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAChC,OAAoB,EACpB,QAA6B,EAC7B,EAAE;IACF,qCAAqC;IACrC,MAAM,UAAU,mCAAQ,CAAC,OAAO,CAAC,IAAI,CAAC,U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