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