@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 +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,15 +1,7 @@
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 { __assign } from "tslib";
12
2
  import { bBoxToPolygon, isBBox } from "../extent";
3
+ import { getFamily } from "./get-family";
4
+ import { getProp } from "../objects";
13
5
  /**
14
6
  * Create a new content with updated boundary properties
15
7
  * @param content original content
@@ -21,25 +13,11 @@ export var setContentBoundary = function (content, boundary) {
21
13
  var properties = __assign(__assign({}, (content.item.properties || {})), { boundary: boundary });
22
14
  var item = __assign(__assign({}, content.item), { properties: properties });
23
15
  var updated = __assign(__assign({}, content), { item: item });
24
- return __assign(__assign({}, updated), { boundary: getContentBoundary(updated) });
16
+ return __assign(__assign({}, updated), { boundary: getContentBoundary(item) });
25
17
  };
26
- /**
27
- * Create a new content with updated extent and derived properties like boundary
28
- * @param content original content
29
- * @param extent new extent
30
- * @returns a new content with the updated extent and boundary
31
- */
32
- export var setContentExtent = function (content, extent) {
33
- // update content's item and extent
34
- var item = __assign(__assign({}, content.item), { extent: extent });
35
- var updated = __assign(__assign({}, content), { item: item, extent: extent });
36
- // derive boundary from content properties
37
- var boundary = getContentBoundary(updated);
38
- return __assign(__assign({}, updated), { boundary: boundary });
39
- };
40
- var getContentBoundary = function (content) {
18
+ // TODO: this needs to be able to handle "automatic"
19
+ export var getContentBoundary = function (item) {
41
20
  var _a;
42
- var item = content.item;
43
21
  var extent = item.extent;
44
22
  var isValidItemExtent = isBBox(extent);
45
23
  // user specified provenance is stored in item.properties
@@ -62,7 +40,12 @@ var getContentBoundary = function (content) {
62
40
  geometry: geometry,
63
41
  };
64
42
  };
65
- var MAX_SIZE = 5000000;
43
+ // when no request options are provided, the underlying
44
+ // request functions assume that we are online in production
45
+ // so we only want use enterprise logic if isPortal is explicitly defined
46
+ export var isPortal = function (requestOptions) {
47
+ return requestOptions && requestOptions.isPortal;
48
+ };
66
49
  /**
67
50
  * Returns whether or not an item is a proxied csv
68
51
  *
@@ -71,9 +54,149 @@ var MAX_SIZE = 5000000;
71
54
  * @returns
72
55
  */
73
56
  export var isProxiedCSV = function (item, requestOptions) {
74
- return !requestOptions.isPortal &&
57
+ return !isPortal(requestOptions) &&
75
58
  item.access === "public" &&
76
59
  item.type === "CSV" &&
77
- item.size <= MAX_SIZE;
60
+ item.size <= 5000000;
61
+ };
62
+ export var getHubRelativeUrl = function (type, identifier, typeKeywords) {
63
+ // solution types have their own logic
64
+ var contentUrl = getSolutionUrl(type, identifier, typeKeywords);
65
+ if (!contentUrl) {
66
+ var family = getFamily(type);
67
+ var familiesWithPluralizedRoute = [
68
+ "app",
69
+ "dataset",
70
+ "document",
71
+ "map",
72
+ "template",
73
+ ];
74
+ // default to the catchall content route
75
+ var path = "/content";
76
+ if (family === "feedback") {
77
+ // the exception
78
+ path = "/feedback/surveys";
79
+ }
80
+ else if (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
+ export var isPageType = function (type) {
95
+ return ["Hub Page", "Site Page"].includes(type);
96
+ };
97
+ var getSolutionUrl = function (type, identifier, typeKeywords) {
98
+ var hubUrl;
99
+ if (type === "Solution") {
100
+ // NOTE: as per the above spreadsheet,
101
+ // solution types are now in the Template family
102
+ // but we don't send them to the route for initiative templates
103
+ if ((typeKeywords === null || typeKeywords === void 0 ? void 0 : typeKeywords.indexOf("Deployed")) > 0) {
104
+ // deployed solutions go to the generic content route
105
+ hubUrl = "/content/" + identifier;
106
+ }
107
+ // others go to the solution about route
108
+ hubUrl = "/templates/" + identifier + "/about";
109
+ }
110
+ return hubUrl;
111
+ };
112
+ export function getMetadataPath(identifier) {
113
+ // NOTE: i have verified that this will work regardless of the "Metadata Style" set on the org
114
+ var metadataPaths = {
115
+ updateFrequency: "metadata.dataIdInfo.resMaint.maintFreq.MaintFreqCd.@_value",
116
+ reviseDate: "metadata.dataIdInfo.idCitation.date.reviseDate",
117
+ pubDate: "metadata.dataIdInfo.idCitation.date.pubDate",
118
+ createDate: "metadata.dataIdInfo.idCitation.date.createDate",
119
+ metadataUpdateFrequency: "metadata.mdMaint.maintFreq.MaintFreqCd.@_value",
120
+ metadataUpdatedDate: "metadata.mdDateSt",
121
+ };
122
+ return metadataPaths[identifier];
123
+ }
124
+ export function getValueFromMetadata(metadata, identifier) {
125
+ var path = getMetadataPath(identifier);
126
+ return path && getProp(metadata, path);
127
+ }
128
+ export var DatePrecision;
129
+ (function (DatePrecision) {
130
+ DatePrecision["Year"] = "year";
131
+ DatePrecision["Month"] = "month";
132
+ DatePrecision["Day"] = "day";
133
+ DatePrecision["Time"] = "time";
134
+ })(DatePrecision || (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
+ export function parseISODateString(isoString) {
147
+ isoString = "" + isoString;
148
+ var date;
149
+ var 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
+ var 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
+ var 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: date, precision: precision };
175
+ }
176
+ export var getServerSpatialReference = function (server, layer) {
177
+ var _a;
178
+ var layerSpatialReference = (_a = layer === null || layer === void 0 ? void 0 : layer.extent) === null || _a === void 0 ? void 0 : _a.spatialReference;
179
+ return layerSpatialReference || (server === null || server === void 0 ? void 0 : server.spatialReference);
180
+ };
181
+ // NOTE: IItem has spatialRefernce: ISpatialReference, but
182
+ // the portal REST API returns spatialReference as as string
183
+ // that is always either WKID like "102100" or
184
+ // WKT like "NAD_1983_HARN_StatePlane_Hawaii_3_FIPS_5103_Feet"
185
+ // so we coerce those string into a ISpatialReference object
186
+ export var getItemSpatialReference = function (item) {
187
+ var spatialReference = item.spatialReference;
188
+ if (!spatialReference || typeof spatialReference === "object") {
189
+ // no need to try and transform this into an ISpatialReference
190
+ return spatialReference;
191
+ }
192
+ // otherwise it _should_ be a string (if coming form the REST API)
193
+ // but we force it in case it was set to a number somewhere outside of TS
194
+ var spatialReferenceString = spatialReference + "";
195
+ var wkid = parseInt(spatialReferenceString, 10);
196
+ return isNaN(wkid)
197
+ ? // string is not a number, assume it is WKT
198
+ { wkt: spatialReferenceString }
199
+ : //
200
+ { wkid: wkid };
78
201
  };
79
202
  //# 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,IAAM,kBAAkB,GAAG,UAChC,OAAoB,EACpB,QAA6B;IAE7B,qCAAqC;IACrC,IAAM,UAAU,yBAAQ,CAAC,OAAO,CAAC,IAAI,CAAC,UAAU,IAAI,EAAE,CAAC,KAAE,QAAQ,UAAA,GAAE,CAAC;IACpE,IAAM,IAAI,yBAAQ,OAAO,CAAC,IAAI,KAAE,UAAU,YAAA,GAAE,CAAC;IAC7C,IAAM,OAAO,yBAAQ,OAAO,KAAE,IAAI,MAAA,GAAE,CAAC;IACrC,6BAAY,OAAO,KAAE,QAAQ,EAAE,kBAAkB,CAAC,OAAO,CAAC,IAAG;AAC/D,CAAC,CAAC;AAEF;;;;;GAKG;AACH,MAAM,CAAC,IAAM,gBAAgB,GAAG,U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