@esri/hub-common 13.0.0 → 13.1.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.
- package/dist/esm/search/_internal/hubSearchItemsHelpers/ogcItemToSearchResult.js +6 -2
- package/dist/esm/search/_internal/hubSearchItemsHelpers/ogcItemToSearchResult.js.map +1 -1
- package/dist/node/search/_internal/hubSearchItemsHelpers/ogcItemToSearchResult.js +6 -2
- package/dist/node/search/_internal/hubSearchItemsHelpers/ogcItemToSearchResult.js.map +1 -1
- package/package.json +1 -1
|
@@ -1,9 +1,13 @@
|
|
|
1
1
|
import { itemToSearchResult } from "../portalSearchItems";
|
|
2
|
-
export function ogcItemToSearchResult(ogcItem, includes, requestOptions) {
|
|
2
|
+
export async function ogcItemToSearchResult(ogcItem, includes, requestOptions) {
|
|
3
3
|
// OGC Api stuffs the item wholesale in `.properties`
|
|
4
4
|
// NOTE: the properties hash may also have some extraneous members such
|
|
5
5
|
// as `license` and `source` if the OgcItem came from the index.
|
|
6
6
|
const pseudoItem = ogcItem.properties;
|
|
7
|
-
|
|
7
|
+
const result = await itemToSearchResult(pseudoItem, includes, requestOptions);
|
|
8
|
+
// Expose extraneous members like `license` and `source`
|
|
9
|
+
result.source = ogcItem.properties.source;
|
|
10
|
+
result.license = ogcItem.properties.license;
|
|
11
|
+
return result;
|
|
8
12
|
}
|
|
9
13
|
//# sourceMappingURL=ogcItemToSearchResult.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ogcItemToSearchResult.js","sourceRoot":"","sources":["../../../../../src/search/_internal/hubSearchItemsHelpers/ogcItemToSearchResult.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAG1D,MAAM,UAAU,qBAAqB,
|
|
1
|
+
{"version":3,"file":"ogcItemToSearchResult.js","sourceRoot":"","sources":["../../../../../src/search/_internal/hubSearchItemsHelpers/ogcItemToSearchResult.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAG1D,MAAM,CAAC,KAAK,UAAU,qBAAqB,CACzC,OAAiB,EACjB,QAAmB,EACnB,cAAmC;IAEnC,sDAAsD;IACtD,uEAAuE;IACvE,gEAAgE;IAChE,MAAM,UAAU,GAAG,OAAO,CAAC,UAAmB,CAAC;IAC/C,MAAM,MAAM,GAAG,MAAM,kBAAkB,CAAC,UAAU,EAAE,QAAQ,EAAE,cAAc,CAAC,CAAC;IAC9E,wDAAwD;IACxD,MAAM,CAAC,MAAM,GAAG,OAAO,CAAC,UAAU,CAAC,MAAM,CAAC;IAC1C,MAAM,CAAC,OAAO,GAAG,OAAO,CAAC,UAAU,CAAC,OAAO,CAAC;IAE5C,OAAO,MAAM,CAAC;AAChB,CAAC"}
|
|
@@ -2,12 +2,16 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.ogcItemToSearchResult = void 0;
|
|
4
4
|
const portalSearchItems_1 = require("../portalSearchItems");
|
|
5
|
-
function ogcItemToSearchResult(ogcItem, includes, requestOptions) {
|
|
5
|
+
async function ogcItemToSearchResult(ogcItem, includes, requestOptions) {
|
|
6
6
|
// OGC Api stuffs the item wholesale in `.properties`
|
|
7
7
|
// NOTE: the properties hash may also have some extraneous members such
|
|
8
8
|
// as `license` and `source` if the OgcItem came from the index.
|
|
9
9
|
const pseudoItem = ogcItem.properties;
|
|
10
|
-
|
|
10
|
+
const result = await portalSearchItems_1.itemToSearchResult(pseudoItem, includes, requestOptions);
|
|
11
|
+
// Expose extraneous members like `license` and `source`
|
|
12
|
+
result.source = ogcItem.properties.source;
|
|
13
|
+
result.license = ogcItem.properties.license;
|
|
14
|
+
return result;
|
|
11
15
|
}
|
|
12
16
|
exports.ogcItemToSearchResult = ogcItemToSearchResult;
|
|
13
17
|
//# sourceMappingURL=ogcItemToSearchResult.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ogcItemToSearchResult.js","sourceRoot":"","sources":["../../../../../src/search/_internal/hubSearchItemsHelpers/ogcItemToSearchResult.ts"],"names":[],"mappings":";;;AAGA,4DAA0D;
|
|
1
|
+
{"version":3,"file":"ogcItemToSearchResult.js","sourceRoot":"","sources":["../../../../../src/search/_internal/hubSearchItemsHelpers/ogcItemToSearchResult.ts"],"names":[],"mappings":";;;AAGA,4DAA0D;AAGnD,KAAK,UAAU,qBAAqB,CACzC,OAAiB,EACjB,QAAmB,EACnB,cAAmC;IAEnC,sDAAsD;IACtD,uEAAuE;IACvE,gEAAgE;IAChE,MAAM,UAAU,GAAG,OAAO,CAAC,UAAmB,CAAC;IAC/C,MAAM,MAAM,GAAG,MAAM,sCAAkB,CAAC,UAAU,EAAE,QAAQ,EAAE,cAAc,CAAC,CAAC;IAC9E,wDAAwD;IACxD,MAAM,CAAC,MAAM,GAAG,OAAO,CAAC,UAAU,CAAC,MAAM,CAAC;IAC1C,MAAM,CAAC,OAAO,GAAG,OAAO,CAAC,UAAU,CAAC,OAAO,CAAC;IAE5C,OAAO,MAAM,CAAC;AAChB,CAAC;AAfD,sDAeC"}
|