@esri/hub-common 15.1.0 → 15.2.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/downloads/_internal/_types.js +11 -0
- package/dist/esm/downloads/_internal/_types.js.map +1 -1
- package/dist/esm/downloads/_internal/format-fetchers/getFgdbJobFormats.js +10 -0
- package/dist/esm/downloads/_internal/format-fetchers/getFgdbJobFormats.js.map +1 -0
- package/dist/esm/downloads/_internal/getDownloadFlow.js +3 -1
- package/dist/esm/downloads/_internal/getDownloadFlow.js.map +1 -1
- package/dist/esm/downloads/_internal/getDownloadFormatsByFlow.js +4 -0
- package/dist/esm/downloads/_internal/getDownloadFormatsByFlow.js.map +1 -1
- package/dist/esm/downloads/getHubDownloadApiFormats.js +4 -1
- package/dist/esm/downloads/getHubDownloadApiFormats.js.map +1 -1
- package/dist/node/downloads/_internal/_types.js +12 -1
- package/dist/node/downloads/_internal/_types.js.map +1 -1
- package/dist/node/downloads/_internal/format-fetchers/getFgdbJobFormats.js +14 -0
- package/dist/node/downloads/_internal/format-fetchers/getFgdbJobFormats.js.map +1 -0
- package/dist/node/downloads/_internal/getDownloadFlow.js +3 -1
- package/dist/node/downloads/_internal/getDownloadFlow.js.map +1 -1
- package/dist/node/downloads/_internal/getDownloadFormatsByFlow.js +4 -0
- package/dist/node/downloads/_internal/getDownloadFormatsByFlow.js.map +1 -1
- package/dist/node/downloads/getHubDownloadApiFormats.js +4 -1
- package/dist/node/downloads/getHubDownloadApiFormats.js.map +1 -1
- package/dist/types/core/types/IHubEditableContent.d.ts +1 -1
- package/dist/types/downloads/_internal/_types.d.ts +6 -0
- package/dist/types/downloads/_internal/format-fetchers/getFgdbJobFormats.d.ts +7 -0
- package/package.json +1 -1
|
@@ -23,6 +23,17 @@ export const HUB_PAGING_JOB_FORMATS = [
|
|
|
23
23
|
ServiceDownloadFormat.GEOJSON,
|
|
24
24
|
ServiceDownloadFormat.KML,
|
|
25
25
|
];
|
|
26
|
+
/**
|
|
27
|
+
* Formats supported by the fgdb operation endpoint of the Hub Download API.
|
|
28
|
+
* Listed in the default order of appearance in the UI.
|
|
29
|
+
*/
|
|
30
|
+
export const HUB_FGDB_JOB_FORMATS = [
|
|
31
|
+
ServiceDownloadFormat.CSV,
|
|
32
|
+
ServiceDownloadFormat.SHAPEFILE,
|
|
33
|
+
ServiceDownloadFormat.GEOJSON,
|
|
34
|
+
ServiceDownloadFormat.KML,
|
|
35
|
+
ServiceDownloadFormat.FILE_GDB,
|
|
36
|
+
];
|
|
26
37
|
/**
|
|
27
38
|
* Known formats supported by the /createReplica endpoint of the Hub Download API.
|
|
28
39
|
* Listed in the default order of appearance in the UI.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"_types.js","sourceRoot":"","sources":["../../../../src/downloads/_internal/_types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAE,MAAM,UAAU,CAAC;AAEjD;;;GAGG;AACH,MAAM,CAAC,MAAM,oBAAoB,GAAG;IAClC,4EAA4E;IAC5E,mFAAmF;IACnF,8BAA8B;IAE9B,qBAAqB,CAAC,GAAG;IACzB,qBAAqB,CAAC,GAAG;IACzB,qBAAqB,CAAC,IAAI;IAC1B,qBAAqB,CAAC,KAAK;IAC3B,qBAAqB,CAAC,KAAK;CAWnB,CAAC;AAGX;;;GAGG;AACH,MAAM,CAAC,MAAM,sBAAsB,GAAG;IACpC,qBAAqB,CAAC,GAAG;IACzB,qBAAqB,CAAC,SAAS;IAC/B,qBAAqB,CAAC,OAAO;IAC7B,qBAAqB,CAAC,GAAG;CACjB,CAAC;AAGX;;;;GAIG;AACH,MAAM,CAAC,MAAM,sBAAsB,GAAG;IACpC,qBAAqB,CAAC,GAAG;IACzB,qBAAqB,CAAC,SAAS;IAC/B,qBAAqB,CAAC,OAAO;IAC7B,qBAAqB,CAAC,GAAG;IACzB,qBAAqB,CAAC,QAAQ;IAC9B,qBAAqB,CAAC,kBAAkB;IACxC,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@@
|
|
|
1
|
+
import { HUB_FGDB_JOB_FORMATS } from "../_types";
|
|
2
|
+
/**
|
|
3
|
+
* @private
|
|
4
|
+
* Returns all the download formats that are available for the Hub Download API's fgdb job operation.
|
|
5
|
+
* @returns available download formats for the fgdb job operation
|
|
6
|
+
*/
|
|
7
|
+
export function getFgdbJobFormats() {
|
|
8
|
+
return HUB_FGDB_JOB_FORMATS.map((format) => ({ type: "dynamic", format }));
|
|
9
|
+
}
|
|
10
|
+
//# sourceMappingURL=getFgdbJobFormats.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getFgdbJobFormats.js","sourceRoot":"","sources":["../../../../../src/downloads/_internal/format-fetchers/getFgdbJobFormats.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,oBAAoB,EAAE,MAAM,WAAW,CAAC;AAEjD;;;;GAIG;AACH,MAAM,UAAU,iBAAiB;IAC/B,OAAO,oBAAoB,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC,EAAE,IAAI,EAAE,SAAS,EAAE,MAAM,EAAE,CAAC,CAAC,CAAC;AAC7E,CAAC"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { getProp } from "../../objects/get-prop";
|
|
1
2
|
import { canUseCreateReplica } from "../canUseCreateReplica";
|
|
2
3
|
import { canUseHubDownloadSystem } from "../canUseHubDownloadSystem";
|
|
3
4
|
import { canUseExportImageFlow } from "./canUseExportImageFlow";
|
|
@@ -16,7 +17,8 @@ export function getDownloadFlow(entity, isEnterprise) {
|
|
|
16
17
|
downloadFlow = "createReplica";
|
|
17
18
|
}
|
|
18
19
|
else if (canUseHubDownloadSystem(entity) && !isEnterprise) {
|
|
19
|
-
|
|
20
|
+
const isExtractEnabled = !!getProp(entity, "extendedProps.serverExtractCapability");
|
|
21
|
+
downloadFlow = isExtractEnabled ? "fgdb" : "paging";
|
|
20
22
|
}
|
|
21
23
|
else if (canUseExportImageFlow(entity)) {
|
|
22
24
|
downloadFlow = "exportImage";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getDownloadFlow.js","sourceRoot":"","sources":["../../../../src/downloads/_internal/getDownloadFlow.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"getDownloadFlow.js","sourceRoot":"","sources":["../../../../src/downloads/_internal/getDownloadFlow.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,OAAO,EAAE,MAAM,wBAAwB,CAAC;AACjD,OAAO,EAAE,mBAAmB,EAAE,MAAM,wBAAwB,CAAC;AAC7D,OAAO,EAAE,uBAAuB,EAAE,MAAM,4BAA4B,CAAC;AACrE,OAAO,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AAEhE;;;;;;;;GAQG;AACH,MAAM,UAAU,eAAe,CAC7B,MAA2B,EAC3B,YAAsB;IAEtB,IAAI,YAAY,GAAqB,IAAI,CAAC;IAC1C,IAAI,mBAAmB,CAAC,MAAM,CAAC,EAAE;QAC/B,YAAY,GAAG,eAAe,CAAC;KAChC;SAAM,IAAI,uBAAuB,CAAC,MAAM,CAAC,IAAI,CAAC,YAAY,EAAE;QAC3D,MAAM,gBAAgB,GAAG,CAAC,CAAC,OAAO,CAChC,MAAM,EACN,uCAAuC,CACxC,CAAC;QACF,YAAY,GAAG,gBAAgB,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,QAAQ,CAAC;KACrD;SAAM,IAAI,qBAAqB,CAAC,MAAM,CAAC,EAAE;QACxC,YAAY,GAAG,aAAa,CAAC;KAC9B;IACD,OAAO,YAAY,CAAC;AACtB,CAAC"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { getCreateReplicaFormats } from "./format-fetchers/getCreateReplicaFormats";
|
|
2
2
|
import { getExportImageFormats } from "./format-fetchers/getExportImageFormats";
|
|
3
3
|
import { getPagingJobFormats } from "./format-fetchers/getPagingJobFormats";
|
|
4
|
+
import { getFgdbJobFormats } from "./format-fetchers/getFgdbJobFormats";
|
|
4
5
|
/**
|
|
5
6
|
* @private
|
|
6
7
|
* Get the download formats for a given download flow and entity.
|
|
@@ -18,6 +19,9 @@ export function getDownloadFormatsByFlow(downloadFlow, entity) {
|
|
|
18
19
|
paging: () => {
|
|
19
20
|
downloadFormats = getPagingJobFormats();
|
|
20
21
|
},
|
|
22
|
+
fgdb: () => {
|
|
23
|
+
downloadFormats = getFgdbJobFormats();
|
|
24
|
+
},
|
|
21
25
|
exportImage: () => {
|
|
22
26
|
downloadFormats = getExportImageFormats(entity);
|
|
23
27
|
},
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getDownloadFormatsByFlow.js","sourceRoot":"","sources":["../../../../src/downloads/_internal/getDownloadFormatsByFlow.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,uBAAuB,EAAE,MAAM,2CAA2C,CAAC;AACpF,OAAO,EAAE,qBAAqB,EAAE,MAAM,yCAAyC,CAAC;AAChF,OAAO,EAAE,mBAAmB,EAAE,MAAM,uCAAuC,CAAC;
|
|
1
|
+
{"version":3,"file":"getDownloadFormatsByFlow.js","sourceRoot":"","sources":["../../../../src/downloads/_internal/getDownloadFormatsByFlow.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,uBAAuB,EAAE,MAAM,2CAA2C,CAAC;AACpF,OAAO,EAAE,qBAAqB,EAAE,MAAM,yCAAyC,CAAC;AAChF,OAAO,EAAE,mBAAmB,EAAE,MAAM,uCAAuC,CAAC;AAC5E,OAAO,EAAE,iBAAiB,EAAE,MAAM,qCAAqC,CAAC;AAExE;;;;;;;GAOG;AACH,MAAM,UAAU,wBAAwB,CACtC,YAA8B,EAC9B,MAA2B;IAE3B,IAAI,eAAe,GAA6B,EAAE,CAAC;IACnD,MAAM,aAAa,GAAyC;QAC1D,aAAa,EAAE,GAAG,EAAE;YAClB,eAAe,GAAG,uBAAuB,CAAC,MAAM,CAAC,CAAC;QACpD,CAAC;QACD,MAAM,EAAE,GAAG,EAAE;YACX,eAAe,GAAG,mBAAmB,EAAE,CAAC;QAC1C,CAAC;QACD,IAAI,EAAE,GAAG,EAAE;YACT,eAAe,GAAG,iBAAiB,EAAE,CAAC;QACxC,CAAC;QACD,WAAW,EAAE,GAAG,EAAE;YAChB,eAAe,GAAG,qBAAqB,CAAC,MAAM,CAAC,CAAC;QAClD,CAAC;KACF,CAAC;IACF,aAAa,CAAC,YAAY,CAAC,IAAI,aAAa,CAAC,YAAY,CAAC,EAAE,CAAC;IAC7D,OAAO,eAAe,CAAC;AACzB,CAAC"}
|
|
@@ -2,6 +2,8 @@ import { getCreateReplicaFormats } from "./_internal/format-fetchers/getCreateRe
|
|
|
2
2
|
import { getPagingJobFormats } from "./_internal/format-fetchers/getPagingJobFormats";
|
|
3
3
|
import { canUseCreateReplica } from "./canUseCreateReplica";
|
|
4
4
|
import { canUseHubDownloadSystem } from "./canUseHubDownloadSystem";
|
|
5
|
+
import { getFgdbJobFormats } from "./_internal/format-fetchers/getFgdbJobFormats";
|
|
6
|
+
import { getProp } from "../objects/get-prop";
|
|
5
7
|
/**
|
|
6
8
|
* Returns all the formats that are available for download via the Hub Download API for a given entity.
|
|
7
9
|
* Formats will vary from entity to entity depending on actual operation that the Hub Download API will
|
|
@@ -16,7 +18,8 @@ export function getHubDownloadApiFormats(entity) {
|
|
|
16
18
|
result = getCreateReplicaFormats(entity);
|
|
17
19
|
}
|
|
18
20
|
else if (canUseHubDownloadSystem(entity)) {
|
|
19
|
-
|
|
21
|
+
const isExtractEnabled = !!getProp(entity, "extendedProps.serverExtractCapability");
|
|
22
|
+
result = isExtractEnabled ? getFgdbJobFormats() : getPagingJobFormats();
|
|
20
23
|
}
|
|
21
24
|
return result;
|
|
22
25
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getHubDownloadApiFormats.js","sourceRoot":"","sources":["../../../src/downloads/getHubDownloadApiFormats.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,uBAAuB,EAAE,MAAM,qDAAqD,CAAC;AAC9F,OAAO,EAAE,mBAAmB,EAAE,MAAM,iDAAiD,CAAC;
|
|
1
|
+
{"version":3,"file":"getHubDownloadApiFormats.js","sourceRoot":"","sources":["../../../src/downloads/getHubDownloadApiFormats.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,uBAAuB,EAAE,MAAM,qDAAqD,CAAC;AAC9F,OAAO,EAAE,mBAAmB,EAAE,MAAM,iDAAiD,CAAC;AAMtF,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,EAAE,uBAAuB,EAAE,MAAM,2BAA2B,CAAC;AACpE,OAAO,EAAE,iBAAiB,EAAE,MAAM,+CAA+C,CAAC;AAClF,OAAO,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AAE9C;;;;;;;GAOG;AACH,MAAM,UAAU,wBAAwB,CACtC,MAA2B;IAE3B,IAAI,MAAM,GAA6B,EAAE,CAAC;IAC1C,IAAI,mBAAmB,CAAC,MAAM,CAAC,EAAE;QAC/B,MAAM,GAAG,uBAAuB,CAAC,MAAM,CAAC,CAAC;KAC1C;SAAM,IAAI,uBAAuB,CAAC,MAAM,CAAC,EAAE;QAC1C,MAAM,gBAAgB,GAAG,CAAC,CAAC,OAAO,CAChC,MAAM,EACN,uCAAuC,CACxC,CAAC;QACF,MAAM,GAAG,gBAAgB,CAAC,CAAC,CAAC,iBAAiB,EAAE,CAAC,CAAC,CAAC,mBAAmB,EAAE,CAAC;KACzE;IACD,OAAO,MAAM,CAAC;AAChB,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.CREATE_REPLICA_FORMATS = exports.HUB_PAGING_JOB_FORMATS = exports.EXPORT_IMAGE_FORMATS = void 0;
|
|
3
|
+
exports.CREATE_REPLICA_FORMATS = exports.HUB_FGDB_JOB_FORMATS = exports.HUB_PAGING_JOB_FORMATS = exports.EXPORT_IMAGE_FORMATS = void 0;
|
|
4
4
|
const types_1 = require("../types");
|
|
5
5
|
/**
|
|
6
6
|
* Formats supported by the /exportImage endpoint of Image Services.
|
|
@@ -26,6 +26,17 @@ exports.HUB_PAGING_JOB_FORMATS = [
|
|
|
26
26
|
types_1.ServiceDownloadFormat.GEOJSON,
|
|
27
27
|
types_1.ServiceDownloadFormat.KML,
|
|
28
28
|
];
|
|
29
|
+
/**
|
|
30
|
+
* Formats supported by the fgdb operation endpoint of the Hub Download API.
|
|
31
|
+
* Listed in the default order of appearance in the UI.
|
|
32
|
+
*/
|
|
33
|
+
exports.HUB_FGDB_JOB_FORMATS = [
|
|
34
|
+
types_1.ServiceDownloadFormat.CSV,
|
|
35
|
+
types_1.ServiceDownloadFormat.SHAPEFILE,
|
|
36
|
+
types_1.ServiceDownloadFormat.GEOJSON,
|
|
37
|
+
types_1.ServiceDownloadFormat.KML,
|
|
38
|
+
types_1.ServiceDownloadFormat.FILE_GDB,
|
|
39
|
+
];
|
|
29
40
|
/**
|
|
30
41
|
* Known formats supported by the /createReplica endpoint of the Hub Download API.
|
|
31
42
|
* Listed in the default order of appearance in the UI.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"_types.js","sourceRoot":"","sources":["../../../../src/downloads/_internal/_types.ts"],"names":[],"mappings":";;;AAAA,oCAAiD;AAEjD;;;GAGG;AACU,QAAA,oBAAoB,GAAG;IAClC,4EAA4E;IAC5E,mFAAmF;IACnF,8BAA8B;IAE9B,6BAAqB,CAAC,GAAG;IACzB,6BAAqB,CAAC,GAAG;IACzB,6BAAqB,CAAC,IAAI;IAC1B,6BAAqB,CAAC,KAAK;IAC3B,6BAAqB,CAAC,KAAK;CAWnB,CAAC;AAGX;;;GAGG;AACU,QAAA,sBAAsB,GAAG;IACpC,6BAAqB,CAAC,GAAG;IACzB,6BAAqB,CAAC,SAAS;IAC/B,6BAAqB,CAAC,OAAO;IAC7B,6BAAqB,CAAC,GAAG;CACjB,CAAC;AAGX;;;;GAI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;IAC3B,6BAAqB,CAAC,WAAW;IACjC,6BAAqB,CAAC,MAAM;IAC5B,6BAAqB,CAAC,IAAI;CAClB,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getFgdbJobFormats = void 0;
|
|
4
|
+
const _types_1 = require("../_types");
|
|
5
|
+
/**
|
|
6
|
+
* @private
|
|
7
|
+
* Returns all the download formats that are available for the Hub Download API's fgdb job operation.
|
|
8
|
+
* @returns available download formats for the fgdb job operation
|
|
9
|
+
*/
|
|
10
|
+
function getFgdbJobFormats() {
|
|
11
|
+
return _types_1.HUB_FGDB_JOB_FORMATS.map((format) => ({ type: "dynamic", format }));
|
|
12
|
+
}
|
|
13
|
+
exports.getFgdbJobFormats = getFgdbJobFormats;
|
|
14
|
+
//# sourceMappingURL=getFgdbJobFormats.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getFgdbJobFormats.js","sourceRoot":"","sources":["../../../../../src/downloads/_internal/format-fetchers/getFgdbJobFormats.ts"],"names":[],"mappings":";;;AACA,sCAAiD;AAEjD;;;;GAIG;AACH,SAAgB,iBAAiB;IAC/B,OAAO,6BAAoB,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC,EAAE,IAAI,EAAE,SAAS,EAAE,MAAM,EAAE,CAAC,CAAC,CAAC;AAC7E,CAAC;AAFD,8CAEC"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.getDownloadFlow = void 0;
|
|
4
|
+
const get_prop_1 = require("../../objects/get-prop");
|
|
4
5
|
const canUseCreateReplica_1 = require("../canUseCreateReplica");
|
|
5
6
|
const canUseHubDownloadSystem_1 = require("../canUseHubDownloadSystem");
|
|
6
7
|
const canUseExportImageFlow_1 = require("./canUseExportImageFlow");
|
|
@@ -19,7 +20,8 @@ function getDownloadFlow(entity, isEnterprise) {
|
|
|
19
20
|
downloadFlow = "createReplica";
|
|
20
21
|
}
|
|
21
22
|
else if (canUseHubDownloadSystem_1.canUseHubDownloadSystem(entity) && !isEnterprise) {
|
|
22
|
-
|
|
23
|
+
const isExtractEnabled = !!get_prop_1.getProp(entity, "extendedProps.serverExtractCapability");
|
|
24
|
+
downloadFlow = isExtractEnabled ? "fgdb" : "paging";
|
|
23
25
|
}
|
|
24
26
|
else if (canUseExportImageFlow_1.canUseExportImageFlow(entity)) {
|
|
25
27
|
downloadFlow = "exportImage";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getDownloadFlow.js","sourceRoot":"","sources":["../../../../src/downloads/_internal/getDownloadFlow.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"getDownloadFlow.js","sourceRoot":"","sources":["../../../../src/downloads/_internal/getDownloadFlow.ts"],"names":[],"mappings":";;;AAKA,qDAAiD;AACjD,gEAA6D;AAC7D,wEAAqE;AACrE,mEAAgE;AAEhE;;;;;;;;GAQG;AACH,SAAgB,eAAe,CAC7B,MAA2B,EAC3B,YAAsB;IAEtB,IAAI,YAAY,GAAqB,IAAI,CAAC;IAC1C,IAAI,yCAAmB,CAAC,MAAM,CAAC,EAAE;QAC/B,YAAY,GAAG,eAAe,CAAC;KAChC;SAAM,IAAI,iDAAuB,CAAC,MAAM,CAAC,IAAI,CAAC,YAAY,EAAE;QAC3D,MAAM,gBAAgB,GAAG,CAAC,CAAC,kBAAO,CAChC,MAAM,EACN,uCAAuC,CACxC,CAAC;QACF,YAAY,GAAG,gBAAgB,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,QAAQ,CAAC;KACrD;SAAM,IAAI,6CAAqB,CAAC,MAAM,CAAC,EAAE;QACxC,YAAY,GAAG,aAAa,CAAC;KAC9B;IACD,OAAO,YAAY,CAAC;AACtB,CAAC;AAjBD,0CAiBC"}
|
|
@@ -4,6 +4,7 @@ exports.getDownloadFormatsByFlow = void 0;
|
|
|
4
4
|
const getCreateReplicaFormats_1 = require("./format-fetchers/getCreateReplicaFormats");
|
|
5
5
|
const getExportImageFormats_1 = require("./format-fetchers/getExportImageFormats");
|
|
6
6
|
const getPagingJobFormats_1 = require("./format-fetchers/getPagingJobFormats");
|
|
7
|
+
const getFgdbJobFormats_1 = require("./format-fetchers/getFgdbJobFormats");
|
|
7
8
|
/**
|
|
8
9
|
* @private
|
|
9
10
|
* Get the download formats for a given download flow and entity.
|
|
@@ -21,6 +22,9 @@ function getDownloadFormatsByFlow(downloadFlow, entity) {
|
|
|
21
22
|
paging: () => {
|
|
22
23
|
downloadFormats = getPagingJobFormats_1.getPagingJobFormats();
|
|
23
24
|
},
|
|
25
|
+
fgdb: () => {
|
|
26
|
+
downloadFormats = getFgdbJobFormats_1.getFgdbJobFormats();
|
|
27
|
+
},
|
|
24
28
|
exportImage: () => {
|
|
25
29
|
downloadFormats = getExportImageFormats_1.getExportImageFormats(entity);
|
|
26
30
|
},
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getDownloadFormatsByFlow.js","sourceRoot":"","sources":["../../../../src/downloads/_internal/getDownloadFormatsByFlow.ts"],"names":[],"mappings":";;;AAKA,uFAAoF;AACpF,mFAAgF;AAChF,+EAA4E;
|
|
1
|
+
{"version":3,"file":"getDownloadFormatsByFlow.js","sourceRoot":"","sources":["../../../../src/downloads/_internal/getDownloadFormatsByFlow.ts"],"names":[],"mappings":";;;AAKA,uFAAoF;AACpF,mFAAgF;AAChF,+EAA4E;AAC5E,2EAAwE;AAExE;;;;;;;GAOG;AACH,SAAgB,wBAAwB,CACtC,YAA8B,EAC9B,MAA2B;IAE3B,IAAI,eAAe,GAA6B,EAAE,CAAC;IACnD,MAAM,aAAa,GAAyC;QAC1D,aAAa,EAAE,GAAG,EAAE;YAClB,eAAe,GAAG,iDAAuB,CAAC,MAAM,CAAC,CAAC;QACpD,CAAC;QACD,MAAM,EAAE,GAAG,EAAE;YACX,eAAe,GAAG,yCAAmB,EAAE,CAAC;QAC1C,CAAC;QACD,IAAI,EAAE,GAAG,EAAE;YACT,eAAe,GAAG,qCAAiB,EAAE,CAAC;QACxC,CAAC;QACD,WAAW,EAAE,GAAG,EAAE;YAChB,eAAe,GAAG,6CAAqB,CAAC,MAAM,CAAC,CAAC;QAClD,CAAC;KACF,CAAC;IACF,aAAa,CAAC,YAAY,CAAC,IAAI,aAAa,CAAC,YAAY,CAAC,EAAE,CAAC;IAC7D,OAAO,eAAe,CAAC;AACzB,CAAC;AArBD,4DAqBC"}
|
|
@@ -5,6 +5,8 @@ const getCreateReplicaFormats_1 = require("./_internal/format-fetchers/getCreate
|
|
|
5
5
|
const getPagingJobFormats_1 = require("./_internal/format-fetchers/getPagingJobFormats");
|
|
6
6
|
const canUseCreateReplica_1 = require("./canUseCreateReplica");
|
|
7
7
|
const canUseHubDownloadSystem_1 = require("./canUseHubDownloadSystem");
|
|
8
|
+
const getFgdbJobFormats_1 = require("./_internal/format-fetchers/getFgdbJobFormats");
|
|
9
|
+
const get_prop_1 = require("../objects/get-prop");
|
|
8
10
|
/**
|
|
9
11
|
* Returns all the formats that are available for download via the Hub Download API for a given entity.
|
|
10
12
|
* Formats will vary from entity to entity depending on actual operation that the Hub Download API will
|
|
@@ -19,7 +21,8 @@ function getHubDownloadApiFormats(entity) {
|
|
|
19
21
|
result = getCreateReplicaFormats_1.getCreateReplicaFormats(entity);
|
|
20
22
|
}
|
|
21
23
|
else if (canUseHubDownloadSystem_1.canUseHubDownloadSystem(entity)) {
|
|
22
|
-
|
|
24
|
+
const isExtractEnabled = !!get_prop_1.getProp(entity, "extendedProps.serverExtractCapability");
|
|
25
|
+
result = isExtractEnabled ? getFgdbJobFormats_1.getFgdbJobFormats() : getPagingJobFormats_1.getPagingJobFormats();
|
|
23
26
|
}
|
|
24
27
|
return result;
|
|
25
28
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getHubDownloadApiFormats.js","sourceRoot":"","sources":["../../../src/downloads/getHubDownloadApiFormats.ts"],"names":[],"mappings":";;;AAAA,iGAA8F;AAC9F,yFAAsF;
|
|
1
|
+
{"version":3,"file":"getHubDownloadApiFormats.js","sourceRoot":"","sources":["../../../src/downloads/getHubDownloadApiFormats.ts"],"names":[],"mappings":";;;AAAA,iGAA8F;AAC9F,yFAAsF;AAMtF,+DAA4D;AAC5D,uEAAoE;AACpE,qFAAkF;AAClF,kDAA8C;AAE9C;;;;;;;GAOG;AACH,SAAgB,wBAAwB,CACtC,MAA2B;IAE3B,IAAI,MAAM,GAA6B,EAAE,CAAC;IAC1C,IAAI,yCAAmB,CAAC,MAAM,CAAC,EAAE;QAC/B,MAAM,GAAG,iDAAuB,CAAC,MAAM,CAAC,CAAC;KAC1C;SAAM,IAAI,iDAAuB,CAAC,MAAM,CAAC,EAAE;QAC1C,MAAM,gBAAgB,GAAG,CAAC,CAAC,kBAAO,CAChC,MAAM,EACN,uCAAuC,CACxC,CAAC;QACF,MAAM,GAAG,gBAAgB,CAAC,CAAC,CAAC,qCAAiB,EAAE,CAAC,CAAC,CAAC,yCAAmB,EAAE,CAAC;KACzE;IACD,OAAO,MAAM,CAAC;AAChB,CAAC;AAdD,4DAcC"}
|
|
@@ -55,7 +55,7 @@ export declare type IExtendedProps = IContentExtendedProps | IServiceExtendedPro
|
|
|
55
55
|
/**
|
|
56
56
|
* Represents the download process that the configuration was created for
|
|
57
57
|
*/
|
|
58
|
-
export declare type DownloadFlowType = "createReplica" | "paging" | "exportImage";
|
|
58
|
+
export declare type DownloadFlowType = "createReplica" | "paging" | "exportImage" | "fgdb";
|
|
59
59
|
/**
|
|
60
60
|
* Represents the storage object for configuring a single download format
|
|
61
61
|
* TODO: Should this be IDownloadFormatConfigurationStorage?
|
|
@@ -11,6 +11,12 @@ export declare type ExportImageFormat = (typeof EXPORT_IMAGE_FORMATS)[number];
|
|
|
11
11
|
*/
|
|
12
12
|
export declare const HUB_PAGING_JOB_FORMATS: readonly [ServiceDownloadFormat.CSV, ServiceDownloadFormat.SHAPEFILE, ServiceDownloadFormat.GEOJSON, ServiceDownloadFormat.KML];
|
|
13
13
|
export declare type HubPagingJobFormat = (typeof HUB_PAGING_JOB_FORMATS)[number];
|
|
14
|
+
/**
|
|
15
|
+
* Formats supported by the fgdb operation endpoint of the Hub Download API.
|
|
16
|
+
* Listed in the default order of appearance in the UI.
|
|
17
|
+
*/
|
|
18
|
+
export declare const HUB_FGDB_JOB_FORMATS: readonly [ServiceDownloadFormat.CSV, ServiceDownloadFormat.SHAPEFILE, ServiceDownloadFormat.GEOJSON, ServiceDownloadFormat.KML, ServiceDownloadFormat.FILE_GDB];
|
|
19
|
+
export declare type HubFgdbJobFormat = (typeof HUB_FGDB_JOB_FORMATS)[number];
|
|
14
20
|
/**
|
|
15
21
|
* Known formats supported by the /createReplica endpoint of the Hub Download API.
|
|
16
22
|
* Listed in the default order of appearance in the UI.
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { IDynamicDownloadFormat } from "../../types";
|
|
2
|
+
/**
|
|
3
|
+
* @private
|
|
4
|
+
* Returns all the download formats that are available for the Hub Download API's fgdb job operation.
|
|
5
|
+
* @returns available download formats for the fgdb job operation
|
|
6
|
+
*/
|
|
7
|
+
export declare function getFgdbJobFormats(): IDynamicDownloadFormat[];
|