ropegeo-common 1.19.0 → 1.19.1
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/README.md +7 -12
- package/dist/download/index.d.ts +0 -2
- package/dist/download/index.d.ts.map +1 -1
- package/dist/download/index.js +1 -9
- package/dist/download/tasks/fetchDownloadFolderTask.d.ts +1 -1
- package/dist/download/tasks/fetchDownloadFolderTask.d.ts.map +1 -1
- package/dist/download/tasks/fetchDownloadFolderTask.js +13 -12
- package/dist/download/tasks/fetchPageJsonTask.d.ts.map +1 -1
- package/dist/download/tasks/fetchPageJsonTask.js +4 -6
- package/dist/download/tasks/saveOfflinePageTask.js +2 -2
- package/dist/models/index.d.ts +1 -0
- package/dist/models/index.d.ts.map +1 -1
- package/dist/models/index.js +4 -2
- package/dist/models/minimap/abstract/onlineMiniMap.d.ts +6 -0
- package/dist/models/minimap/abstract/onlineMiniMap.d.ts.map +1 -1
- package/dist/models/minimap/abstract/pageMiniMap.d.ts +5 -1
- package/dist/models/minimap/abstract/pageMiniMap.d.ts.map +1 -1
- package/dist/models/minimap/abstract/pageMiniMap.js +16 -1
- package/dist/models/minimap/concrete/offlinePageMiniMap.d.ts +1 -1
- package/dist/models/minimap/concrete/offlinePageMiniMap.d.ts.map +1 -1
- package/dist/models/minimap/concrete/offlinePageMiniMap.js +3 -2
- package/dist/models/minimap/concrete/onlineCenteredRegionMiniMap.d.ts +1 -0
- package/dist/models/minimap/concrete/onlineCenteredRegionMiniMap.d.ts.map +1 -1
- package/dist/models/minimap/concrete/onlineCenteredRegionMiniMap.js +3 -0
- package/dist/models/minimap/concrete/onlinePageMiniMap.d.ts +1 -1
- package/dist/models/minimap/concrete/onlinePageMiniMap.d.ts.map +1 -1
- package/dist/models/minimap/concrete/onlinePageMiniMap.js +3 -3
- package/dist/models/minimap/concrete/onlineRegionMiniMap.d.ts +3 -0
- package/dist/models/minimap/concrete/onlineRegionMiniMap.d.ts.map +1 -1
- package/dist/models/minimap/concrete/onlineRegionMiniMap.js +7 -0
- package/dist/models/pageViews/offlinePageView.d.ts +5 -2
- package/dist/models/pageViews/offlinePageView.d.ts.map +1 -1
- package/dist/models/pageViews/offlineRopewikiPageView.d.ts +2 -1
- package/dist/models/pageViews/offlineRopewikiPageView.d.ts.map +1 -1
- package/dist/models/pageViews/offlineRopewikiPageView.js +13 -3
- package/dist/models/pageViews/onlinePageView.d.ts +9 -4
- package/dist/models/pageViews/onlinePageView.d.ts.map +1 -1
- package/dist/models/pageViews/onlineRopewikiPageView.d.ts +14 -6
- package/dist/models/pageViews/onlineRopewikiPageView.d.ts.map +1 -1
- package/dist/models/pageViews/onlineRopewikiPageView.js +257 -41
- package/dist/models/pageViews/pageView.d.ts +13 -0
- package/dist/models/pageViews/pageView.d.ts.map +1 -0
- package/dist/models/pageViews/pageView.js +55 -0
- package/dist/models/pageViews/registerPageViewParsers.d.ts +1 -0
- package/dist/models/pageViews/registerPageViewParsers.d.ts.map +1 -1
- package/dist/models/pageViews/registerPageViewParsers.js +1 -0
- package/dist/models/pageViews/ropewikiPageView.d.ts +2 -4
- package/dist/models/pageViews/ropewikiPageView.d.ts.map +1 -1
- package/dist/models/pageViews/ropewikiPageView.js +4 -11
- package/dist/models/previews/onlinePagePreview.d.ts.map +1 -1
- package/dist/models/previews/onlinePagePreview.js +1 -2
- package/package.json +1 -1
- package/dist/download/helpers/planDownloadPhases.d.ts +0 -11
- package/dist/download/helpers/planDownloadPhases.d.ts.map +0 -1
- package/dist/download/helpers/planDownloadPhases.js +0 -108
- package/dist/download/helpers/seedConsumerDependencies.d.ts +0 -5
- package/dist/download/helpers/seedConsumerDependencies.d.ts.map +0 -1
- package/dist/download/helpers/seedConsumerDependencies.js +0 -77
package/README.md
CHANGED
|
@@ -71,7 +71,7 @@ Helper tables use columns **Name**, **Description**, **Import**. Model tables ad
|
|
|
71
71
|
|
|
72
72
|
### Offline page bundle paths (`src/helpers/offlinePageBundlePaths.ts`)
|
|
73
73
|
|
|
74
|
-
Shared relative paths for server-built ZIP bundles and client on-disk storage. Backend zipper and mobile extract both use the same layout under the page root. The page JSON filename comes from `DownloadPlatformHarness.paths.pageJson
|
|
74
|
+
Shared relative paths for server-built ZIP bundles and client on-disk storage. Backend zipper and mobile extract both use the same layout under the page root. The page JSON filename comes from `DownloadPlatformHarness.paths.pageJson`. Bundle extraction resolves absolute paths via `OnlinePageView.toOfflineFromExtractedBundle()` (no wire hydration).
|
|
75
75
|
|
|
76
76
|
| Name | Description | Import |
|
|
77
77
|
| --- | --- | --- |
|
|
@@ -200,11 +200,12 @@ Shared relative paths for server-built ZIP bundles and client on-disk storage. B
|
|
|
200
200
|
|
|
201
201
|
| Name | Base class | Description | Import |
|
|
202
202
|
| --- | --- | --- | --- |
|
|
203
|
+
| `PageView` | N/A | Registry: `fromResult()` → `OnlinePageView`, `fromOfflineResult()` → `OfflinePageView`. | `import { PageView } from 'ropegeo-common/models'` |
|
|
203
204
|
| `RopewikiPageView` | `BaseRopewikiPageView` | Backward-compatible alias exported as the online page view class. | `import { RopewikiPageView } from 'ropegeo-common/models'` |
|
|
204
|
-
| `BaseRopewikiPageView` | N/A | Abstract Ropewiki page view base
|
|
205
|
-
| `OnlineRopewikiPageView` | `BaseRopewikiPageView` | Online Ropewiki page view
|
|
205
|
+
| `BaseRopewikiPageView` | N/A | Abstract Ropewiki page view base with shared validation/fields. | `import { BaseRopewikiPageView } from 'ropegeo-common/models'` |
|
|
206
|
+
| `OnlineRopewikiPageView` | `BaseRopewikiPageView` | Online Ropewiki page view: `planDownloadPhases()`, `getDependenciesForPhases()`, `toOfflineFromExtractedBundle()`. | `import { OnlineRopewikiPageView } from 'ropegeo-common/models'` |
|
|
206
207
|
| `OfflineRopewikiPageView` | `BaseRopewikiPageView` | Offline Ropewiki page view with downloaded paths and offline minimap variants. | `import { OfflineRopewikiPageView } from 'ropegeo-common/models'` |
|
|
207
|
-
| `OnlinePageView` | N/A | Interface for online page-view behavior (`toOffline`, `
|
|
208
|
+
| `OnlinePageView` | N/A | Interface for online page-view behavior (`planDownloadPhases`, `getDependenciesForPhases`, `toOffline`, `toDownloadJob`, etc.). | `import type { OnlinePageView } from 'ropegeo-common/models'` |
|
|
208
209
|
| `OfflinePageView` | N/A | Interface for offline page-view behavior (`toPagePreview`). | `import type { OfflinePageView } from 'ropegeo-common/models'` |
|
|
209
210
|
| `RopewikiPageViewResult` | `Result` | API result wrapping `RopewikiPageView`. | `import { RopewikiPageViewResult } from 'ropegeo-common/models'` |
|
|
210
211
|
|
|
@@ -300,15 +301,9 @@ Import from **`ropegeo-common/download`**. Platform I/O (Expo FileSystem, Mapbox
|
|
|
300
301
|
| `DownloadJobQueueStoredState` | Persisted queue envelope (`queueOrder`, `jobs`). | `import type { DownloadJobQueueStoredState } from 'ropegeo-common/download'` |
|
|
301
302
|
| `DownloadJobStoredState` | Persisted single in-flight job. | `import type { DownloadJobStoredState } from 'ropegeo-common/download'` |
|
|
302
303
|
| `DownloadDependencyKeys` | String keys for task dependency map entries. | `import { DownloadDependencyKeys } from 'ropegeo-common/download'` |
|
|
303
|
-
| `planDownloadPhases` | Routes to bundle or legacy phase plans based on `downloadFolder` on the page view/preview. | `import { planDownloadPhases } from 'ropegeo-common/download'` |
|
|
304
|
-
| `planBundleDownloadPhases` | Bundle path: `FetchDownloadFolder` (+ parallel Mapbox when page minimap bounds are known). | `import { planBundleDownloadPhases } from 'ropegeo-common/download'` |
|
|
305
|
-
| `planLegacyDownloadPhases` | Legacy multi-request path (images, tiles, region routes, save). | `import { planLegacyDownloadPhases } from 'ropegeo-common/download'` |
|
|
306
|
-
| `hasBundleDownloadFolder` | Returns true when a preview/view has a non-empty `downloadFolder` URL. | `import { hasBundleDownloadFolder } from 'ropegeo-common/download'` |
|
|
307
|
-
| `bundleDownloadFolderDependency` | Builds `FetchDownloadFolderTaskDependency` from an online view. | `import { bundleDownloadFolderDependency } from 'ropegeo-common/download'` |
|
|
308
|
-
| `seedConsumerDependencies` | Seeds dependency objects for tasks in a phase plan. | `import { seedConsumerDependencies } from 'ropegeo-common/download'` |
|
|
309
304
|
| `DeleteStoredPageTask` | Phase 1: delete existing offline bundle for the page. | `import { DeleteStoredPageTask } from 'ropegeo-common/download'` |
|
|
310
|
-
| `FetchPageJsonTask` | Preview path: fetch page JSON
|
|
311
|
-
| `FetchDownloadFolderTask` | Bundle path: download ZIP, extract,
|
|
305
|
+
| `FetchPageJsonTask` | Preview path: fetch page JSON, append `planDownloadPhases()`, seed `getDependenciesForPhases()`. | `import { FetchPageJsonTask } from 'ropegeo-common/download'` |
|
|
306
|
+
| `FetchDownloadFolderTask` | Bundle path: download ZIP, extract, `PageView.fromResult` + `toOfflineFromExtractedBundle`. | `import { FetchDownloadFolderTask } from 'ropegeo-common/download'` |
|
|
312
307
|
| `FetchDownloadFolderTaskDependency` | Dependency: `downloadFolderUrl`, `parallelMapbox`. | `import { FetchDownloadFolderTaskDependency } from 'ropegeo-common/download'` |
|
|
313
308
|
| `FetchImageFilesTask` | Download beta/banner image files. | `import { FetchImageFilesTask } from 'ropegeo-common/download'` |
|
|
314
309
|
| `FetchMapboxPackTask` | Download Mapbox offline pack for page minimap bounds. | `import { FetchMapboxPackTask } from 'ropegeo-common/download'` |
|
package/dist/download/index.d.ts
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
export type { DownloadPlatformHarness, DownloadJobConfig, DownloadJobContext, DownloadTaskDependency, DownloadJobUISnapshot, DownloadJobUIState, DownloadJobQueueStoredState, DownloadJobStoredState, TaskTickResult, DownloadTaskStoredState, FetchImageFilesSlot, DownloadedImageVersions, PendingFileTransfer, } from './types';
|
|
2
2
|
export { hydrateTaskDependencyFromStoredState } from './helpers/downloadDependencyRegistry';
|
|
3
|
-
export { seedConsumerDependencies } from './helpers/seedConsumerDependencies';
|
|
4
3
|
export { DownloadDependencyKeys } from './dependencies/downloadDependencyKeys';
|
|
5
4
|
export { FetchPageJsonTaskDependency } from './dependencies/fetchPageJsonTaskDependency';
|
|
6
5
|
export { FetchImageFilesTaskDependency } from './dependencies/fetchImageFilesTaskDependency';
|
|
@@ -28,6 +27,5 @@ export { FetchRopeGeoTileFilesTask } from './tasks/fetchRopeGeoTileFilesTask';
|
|
|
28
27
|
export { FetchRegionRouteListTask } from './tasks/fetchRegionRouteListTask';
|
|
29
28
|
export { FetchDownloadFolderTask } from './tasks/fetchDownloadFolderTask';
|
|
30
29
|
export { SaveOfflinePageTask } from './tasks/saveOfflinePageTask';
|
|
31
|
-
export { planDownloadPhases, planLegacyDownloadPhases, planBundleDownloadPhases, hasBundleDownloadFolder, bundleDownloadFolderDependency } from './helpers/planDownloadPhases';
|
|
32
30
|
export { FetchDownloadFolderTaskDependency } from './dependencies/fetchDownloadFolderTaskDependency';
|
|
33
31
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/download/index.ts"],"names":[],"mappings":"AAAA,YAAY,EACR,uBAAuB,EACvB,iBAAiB,EACjB,kBAAkB,EAClB,sBAAsB,EACtB,qBAAqB,EACrB,kBAAkB,EAClB,2BAA2B,EAC3B,sBAAsB,EACtB,cAAc,EACd,uBAAuB,EACvB,mBAAmB,EACnB,uBAAuB,EACvB,mBAAmB,GACtB,MAAM,SAAS,CAAC;AACjB,OAAO,EAAE,oCAAoC,EAAE,MAAM,sCAAsC,CAAC;AAC5F,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/download/index.ts"],"names":[],"mappings":"AAAA,YAAY,EACR,uBAAuB,EACvB,iBAAiB,EACjB,kBAAkB,EAClB,sBAAsB,EACtB,qBAAqB,EACrB,kBAAkB,EAClB,2BAA2B,EAC3B,sBAAsB,EACtB,cAAc,EACd,uBAAuB,EACvB,mBAAmB,EACnB,uBAAuB,EACvB,mBAAmB,GACtB,MAAM,SAAS,CAAC;AACjB,OAAO,EAAE,oCAAoC,EAAE,MAAM,sCAAsC,CAAC;A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CAAC;AAC5E,OAAO,EAAE,mBAAmB,EAAE,MAAM,6BAA6B,CAAC;AAClE,OAAO,EAAE,mBAAmB,EAAE,MAAM,6BAA6B,CAAC;AAClE,OAAO,EAAE,yBAAyB,EAAE,MAAM,mCAAmC,CAAC;AAC9E,OAAO,EAAE,wBAAwB,EAAE,MAAM,kCAAkC,CAAC;AAC5E,OAAO,EAAE,uBAAuB,EAAE,MAAM,iCAAiC,CAAC;AAC1E,OAAO,EAAE,mBAAmB,EAAE,MAAM,6BAA6B,CAAC;AAClE,OAAO,EAAE,iCAAiC,EAAE,MAAM,kDAAkD,CAAC"}
|
package/dist/download/index.js
CHANGED
|
@@ -1,10 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.FetchDownloadFolderTaskDependency = exports.
|
|
3
|
+
exports.FetchDownloadFolderTaskDependency = exports.SaveOfflinePageTask = exports.FetchDownloadFolderTask = exports.FetchRegionRouteListTask = exports.FetchRopeGeoTileFilesTask = exports.FetchMapboxPackTask = exports.FetchImageFilesTask = exports.FetchRopeGeoTileListTask = exports.FetchPageJsonTask = exports.DeleteStoredPageTask = exports.DownloadTask = exports.enqueuePendingFileTransfer = exports.reconcilePendingFileTransfer = exports.isDownloadCancelledError = exports.InvalidDownloadJobStoredStateError = exports.DownloadCancelledError = exports.DOWNLOAD_CANCELLED_MESSAGE = exports.REGION_PAGES_PER_CHUNK = exports.TILE_FILE_BATCH_SIZE = exports.IMAGE_FILE_BATCH_SIZE = exports.LIST_HTTP_BATCH_SIZE = exports.TILE_LIST_PAGE_LIMIT = exports.buildDeleteStoredPagePhase = exports.titleForPhase = exports.DownloadJobQueue = exports.DownloadPhase = exports.DownloadJob = exports.SaveOfflinePageMiniMapTaskDependency = exports.SaveOfflinePageImagesTaskDependency = exports.SaveOfflinePageViewTaskDependency = exports.FetchRegionRouteListTaskDependency = exports.FetchRopeGeoTileFilesTaskDependency = exports.FetchRopeGeoTileListTaskDependency = exports.FetchMapboxPackTaskDependency = exports.FetchImageFilesTaskDependency = exports.FetchPageJsonTaskDependency = exports.DownloadDependencyKeys = exports.hydrateTaskDependencyFromStoredState = void 0;
|
|
4
4
|
var downloadDependencyRegistry_1 = require("./helpers/downloadDependencyRegistry");
|
|
5
5
|
Object.defineProperty(exports, "hydrateTaskDependencyFromStoredState", { enumerable: true, get: function () { return downloadDependencyRegistry_1.hydrateTaskDependencyFromStoredState; } });
|
|
6
|
-
var seedConsumerDependencies_1 = require("./helpers/seedConsumerDependencies");
|
|
7
|
-
Object.defineProperty(exports, "seedConsumerDependencies", { enumerable: true, get: function () { return seedConsumerDependencies_1.seedConsumerDependencies; } });
|
|
8
6
|
var downloadDependencyKeys_1 = require("./dependencies/downloadDependencyKeys");
|
|
9
7
|
Object.defineProperty(exports, "DownloadDependencyKeys", { enumerable: true, get: function () { return downloadDependencyKeys_1.DownloadDependencyKeys; } });
|
|
10
8
|
var fetchPageJsonTaskDependency_1 = require("./dependencies/fetchPageJsonTaskDependency");
|
|
@@ -68,11 +66,5 @@ var fetchDownloadFolderTask_1 = require("./tasks/fetchDownloadFolderTask");
|
|
|
68
66
|
Object.defineProperty(exports, "FetchDownloadFolderTask", { enumerable: true, get: function () { return fetchDownloadFolderTask_1.FetchDownloadFolderTask; } });
|
|
69
67
|
var saveOfflinePageTask_1 = require("./tasks/saveOfflinePageTask");
|
|
70
68
|
Object.defineProperty(exports, "SaveOfflinePageTask", { enumerable: true, get: function () { return saveOfflinePageTask_1.SaveOfflinePageTask; } });
|
|
71
|
-
var planDownloadPhases_1 = require("./helpers/planDownloadPhases");
|
|
72
|
-
Object.defineProperty(exports, "planDownloadPhases", { enumerable: true, get: function () { return planDownloadPhases_1.planDownloadPhases; } });
|
|
73
|
-
Object.defineProperty(exports, "planLegacyDownloadPhases", { enumerable: true, get: function () { return planDownloadPhases_1.planLegacyDownloadPhases; } });
|
|
74
|
-
Object.defineProperty(exports, "planBundleDownloadPhases", { enumerable: true, get: function () { return planDownloadPhases_1.planBundleDownloadPhases; } });
|
|
75
|
-
Object.defineProperty(exports, "hasBundleDownloadFolder", { enumerable: true, get: function () { return planDownloadPhases_1.hasBundleDownloadFolder; } });
|
|
76
|
-
Object.defineProperty(exports, "bundleDownloadFolderDependency", { enumerable: true, get: function () { return planDownloadPhases_1.bundleDownloadFolderDependency; } });
|
|
77
69
|
var fetchDownloadFolderTaskDependency_1 = require("./dependencies/fetchDownloadFolderTaskDependency");
|
|
78
70
|
Object.defineProperty(exports, "FetchDownloadFolderTaskDependency", { enumerable: true, get: function () { return fetchDownloadFolderTaskDependency_1.FetchDownloadFolderTaskDependency; } });
|
|
@@ -6,7 +6,7 @@ export declare class FetchDownloadFolderTask extends DownloadTask {
|
|
|
6
6
|
total: number;
|
|
7
7
|
constructor(completed?: number, total?: number);
|
|
8
8
|
runTick(ctx: DownloadJobContext, platformHarness: DownloadPlatformHarness, _signal: AbortSignal): Promise<TaskTickResult>;
|
|
9
|
-
private
|
|
9
|
+
private downloadExtractAndConvert;
|
|
10
10
|
private maybeAppendMapboxPhaseAfterExtract;
|
|
11
11
|
toStoredState(): DownloadTaskStoredState;
|
|
12
12
|
static fromStoredState(raw: unknown): FetchDownloadFolderTask;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fetchDownloadFolderTask.d.ts","sourceRoot":"","sources":["../../../src/download/tasks/fetchDownloadFolderTask.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"fetchDownloadFolderTask.d.ts","sourceRoot":"","sources":["../../../src/download/tasks/fetchDownloadFolderTask.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,kBAAkB,EAAE,uBAAuB,EAAE,uBAAuB,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AACrH,OAAO,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AAEtD,qBAAa,uBAAwB,SAAQ,YAAY;IACrD,QAAQ,CAAC,QAAQ,yBAAyB;IAC1C,QAAQ,CAAC,cAAc,mCAAyD;IAChF,KAAK,EAAE,MAAM,CAAC;gBAEF,SAAS,SAAI,EAAE,KAAK,SAAI;IAK9B,OAAO,CACT,GAAG,EAAE,kBAAkB,EACvB,eAAe,EAAE,uBAAuB,EACxC,OAAO,EAAE,WAAW,GACrB,OAAO,CAAC,cAAc,CAAC;YAmBZ,yBAAyB;YAuBzB,kCAAkC;IAmChD,aAAa,IAAI,uBAAuB;IAQxC,MAAM,CAAC,eAAe,CAAC,GAAG,EAAE,OAAO,GAAG,uBAAuB;CAIhE"}
|
|
@@ -34,8 +34,7 @@ var __importStar = (this && this.__importStar) || (function () {
|
|
|
34
34
|
})();
|
|
35
35
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
36
|
exports.FetchDownloadFolderTask = void 0;
|
|
37
|
-
const
|
|
38
|
-
const offlineRopewikiPageView_1 = require("../../models/pageViews/offlineRopewikiPageView");
|
|
37
|
+
const pageView_1 = require("../../models/pageViews/pageView");
|
|
39
38
|
const downloadDependencyKeys_1 = require("../dependencies/downloadDependencyKeys");
|
|
40
39
|
const abstractDownloadTask_1 = require("./abstractDownloadTask");
|
|
41
40
|
class FetchDownloadFolderTask extends abstractDownloadTask_1.DownloadTask {
|
|
@@ -51,37 +50,39 @@ class FetchDownloadFolderTask extends abstractDownloadTask_1.DownloadTask {
|
|
|
51
50
|
return { done: true };
|
|
52
51
|
}
|
|
53
52
|
const dep = this.requireDependency(ctx, downloadDependencyKeys_1.DownloadDependencyKeys.FetchDownloadFolder);
|
|
54
|
-
await this.
|
|
53
|
+
await this.downloadExtractAndConvert(ctx, platformHarness, dep);
|
|
55
54
|
if (!dep.parallelMapbox) {
|
|
56
55
|
await this.maybeAppendMapboxPhaseAfterExtract(ctx, platformHarness);
|
|
57
56
|
}
|
|
58
57
|
this.completed = this.total;
|
|
59
58
|
return { done: true };
|
|
60
59
|
}
|
|
61
|
-
async
|
|
60
|
+
async downloadExtractAndConvert(ctx, platformHarness, _dep) {
|
|
62
61
|
const pageRoot = platformHarness.paths.pageRoot(ctx.pageId);
|
|
63
62
|
const zipPath = platformHarness.paths.zipTemp(ctx.pageId);
|
|
64
63
|
await platformHarness.downloadFile({
|
|
65
|
-
url:
|
|
64
|
+
url: _dep.downloadFolderUrl,
|
|
66
65
|
destPath: zipPath,
|
|
67
66
|
background: true,
|
|
68
67
|
});
|
|
69
68
|
await platformHarness.extractZipArchive({ zipPath, destRoot: pageRoot });
|
|
70
69
|
const jsonPath = platformHarness.paths.pageJson(ctx.pageId);
|
|
71
70
|
const rawJson = await platformHarness.readTextFile(jsonPath);
|
|
72
|
-
const
|
|
71
|
+
const onlineView = pageView_1.PageView.fromResult(JSON.parse(rawJson));
|
|
72
|
+
const offlineView = await onlineView.toOfflineFromExtractedBundle(pageRoot, platformHarness);
|
|
73
73
|
await platformHarness.writeTextFile(jsonPath, JSON.stringify(offlineView));
|
|
74
|
-
await platformHarness.setRoutePreviewsForPage(ctx.pageId, [
|
|
74
|
+
await platformHarness.setRoutePreviewsForPage(ctx.pageId, [
|
|
75
|
+
offlineView.toPagePreview(),
|
|
76
|
+
]);
|
|
75
77
|
}
|
|
76
78
|
async maybeAppendMapboxPhaseAfterExtract(ctx, platformHarness) {
|
|
77
79
|
const jsonPath = platformHarness.paths.pageJson(ctx.pageId);
|
|
78
80
|
const jsonText = await platformHarness.readTextFile(jsonPath);
|
|
79
|
-
const offlineView =
|
|
80
|
-
const
|
|
81
|
-
if (
|
|
81
|
+
const offlineView = pageView_1.PageView.fromOfflineResult(JSON.parse(jsonText));
|
|
82
|
+
const bounds = offlineView.getMapboxPackBounds();
|
|
83
|
+
if (bounds == null) {
|
|
82
84
|
return;
|
|
83
85
|
}
|
|
84
|
-
const pageMiniMap = miniMap;
|
|
85
86
|
const [{ DownloadPhase }, { FetchMapboxPackTask }, { FetchMapboxPackTaskDependency }, { titleForPhase },] = await Promise.all([
|
|
86
87
|
Promise.resolve().then(() => __importStar(require('../downloadPhase'))),
|
|
87
88
|
Promise.resolve().then(() => __importStar(require('./fetchMapboxPackTask'))),
|
|
@@ -95,7 +96,7 @@ class FetchDownloadFolderTask extends abstractDownloadTask_1.DownloadTask {
|
|
|
95
96
|
tasks: [mapboxTask],
|
|
96
97
|
}),
|
|
97
98
|
]);
|
|
98
|
-
ctx.setDependency(downloadDependencyKeys_1.DownloadDependencyKeys.FetchMapboxPack, new FetchMapboxPackTaskDependency(
|
|
99
|
+
ctx.setDependency(downloadDependencyKeys_1.DownloadDependencyKeys.FetchMapboxPack, new FetchMapboxPackTaskDependency(bounds));
|
|
99
100
|
}
|
|
100
101
|
toStoredState() {
|
|
101
102
|
return {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fetchPageJsonTask.d.ts","sourceRoot":"","sources":["../../../src/download/tasks/fetchPageJsonTask.ts"],"names":[],"mappings":"AACA,OAAO,mDAAmD,CAAC;
|
|
1
|
+
{"version":3,"file":"fetchPageJsonTask.d.ts","sourceRoot":"","sources":["../../../src/download/tasks/fetchPageJsonTask.ts"],"names":[],"mappings":"AACA,OAAO,mDAAmD,CAAC;AAI3D,OAAO,KAAK,EAAE,kBAAkB,EAAE,uBAAuB,EAAE,uBAAuB,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AACrH,OAAO,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AAetD,qBAAa,iBAAkB,SAAQ,YAAY;IAC/C,QAAQ,CAAC,QAAQ,mBAAmB;IACpC,QAAQ,CAAC,cAAc,6BAAmD;IAC1E,KAAK,EAAE,MAAM,CAAC;gBAEF,SAAS,SAAI,EAAE,KAAK,SAAI;IAK9B,OAAO,CACT,GAAG,EAAE,kBAAkB,EACvB,gBAAgB,EAAE,uBAAuB,EACzC,MAAM,EAAE,WAAW,GACpB,OAAO,CAAC,cAAc,CAAC;IA4B1B,aAAa,IAAI,uBAAuB;IAQxC,MAAM,CAAC,eAAe,CAAC,GAAG,EAAE,OAAO,GAAG,iBAAiB;CAI1D"}
|
|
@@ -1,13 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.FetchPageJsonTask = void 0;
|
|
4
|
-
const downloadHttpRequest_1 = require("../helpers/downloadHttpRequest");
|
|
5
4
|
require("../../models/api/results/registerAllResultParsers");
|
|
6
5
|
const result_1 = require("../../models/api/results/result");
|
|
7
6
|
const downloadDependencyKeys_1 = require("../dependencies/downloadDependencyKeys");
|
|
8
|
-
const planDownloadPhases_1 = require("../helpers/planDownloadPhases");
|
|
9
|
-
const seedConsumerDependencies_1 = require("../helpers/seedConsumerDependencies");
|
|
10
7
|
const abstractDownloadTask_1 = require("./abstractDownloadTask");
|
|
8
|
+
const downloadHttpRequest_1 = require("../helpers/downloadHttpRequest");
|
|
11
9
|
function unwrapData(value) {
|
|
12
10
|
if (value != null &&
|
|
13
11
|
typeof value === 'object' &&
|
|
@@ -36,10 +34,10 @@ class FetchPageJsonTask extends abstractDownloadTask_1.DownloadTask {
|
|
|
36
34
|
});
|
|
37
35
|
const text = await response.text();
|
|
38
36
|
const parsedResponse = result_1.Result.fromResponseBody(unwrapData(JSON.parse(text)));
|
|
39
|
-
const
|
|
40
|
-
const appendedPhases =
|
|
37
|
+
const onlineView = parsedResponse.result;
|
|
38
|
+
const appendedPhases = onlineView.planDownloadPhases();
|
|
41
39
|
ctx.appendPhases(appendedPhases);
|
|
42
|
-
const seeded =
|
|
40
|
+
const seeded = onlineView.getDependenciesForPhases(appendedPhases);
|
|
43
41
|
for (const [key, dependency] of Object.entries(seeded)) {
|
|
44
42
|
ctx.setDependency(key, dependency);
|
|
45
43
|
}
|
|
@@ -5,7 +5,7 @@ const imageVersions_1 = require("../../models/mobile/imageVersions");
|
|
|
5
5
|
const miniMapType_1 = require("../../models/minimap/abstract/miniMapType");
|
|
6
6
|
const offlineCenteredRegionMiniMap_1 = require("../../models/minimap/concrete/offlineCenteredRegionMiniMap");
|
|
7
7
|
const offlinePageMiniMap_1 = require("../../models/minimap/concrete/offlinePageMiniMap");
|
|
8
|
-
const
|
|
8
|
+
const pageView_1 = require("../../models/pageViews/pageView");
|
|
9
9
|
const downloadDependencyKeys_1 = require("../dependencies/downloadDependencyKeys");
|
|
10
10
|
const abstractDownloadTask_1 = require("./abstractDownloadTask");
|
|
11
11
|
class SaveOfflinePageTask extends abstractDownloadTask_1.DownloadTask {
|
|
@@ -21,7 +21,7 @@ class SaveOfflinePageTask extends abstractDownloadTask_1.DownloadTask {
|
|
|
21
21
|
return { done: true };
|
|
22
22
|
}
|
|
23
23
|
const viewDep = this.requireDependency(ctx, downloadDependencyKeys_1.DownloadDependencyKeys.SaveOfflinePageView);
|
|
24
|
-
const onlineView =
|
|
24
|
+
const onlineView = pageView_1.PageView.fromResult(viewDep.onlineViewWire);
|
|
25
25
|
const downloadedImages = this.getDownloadedImages(ctx);
|
|
26
26
|
const offlineMiniMap = this.getOfflineMiniMapIfPresent(ctx);
|
|
27
27
|
const offlineView = onlineView.toOffline(downloadedImages, offlineMiniMap);
|
package/dist/models/index.d.ts
CHANGED
|
@@ -80,6 +80,7 @@ export { OfflineCenteredRegionMiniMap } from './minimap/concrete/offlineCentered
|
|
|
80
80
|
export { RopewikiPageView } from './api/endpoints/ropewikiPageView';
|
|
81
81
|
export { RopewikiPageViewResult } from './api/results/ropewikiPageViewResult';
|
|
82
82
|
export { PageViewType } from './pageViews/pageViewType';
|
|
83
|
+
export { PageView } from './pageViews/pageView';
|
|
83
84
|
export { RopewikiPageView as BaseRopewikiPageView } from './pageViews/ropewikiPageView';
|
|
84
85
|
export { OnlineRopewikiPageView } from './pageViews/onlineRopewikiPageView';
|
|
85
86
|
export { OfflineRopewikiPageView } from './pageViews/offlineRopewikiPageView';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/models/index.ts"],"names":[],"mappings":"AAAA,OAAO,wCAAwC,CAAC;AAChD,OAAO,8CAA8C,CAAC;AACtD,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AM,4CAA4C,CAAC;AAC1F,OAAO,EAAE,kBAAkB,EAAE,MAAM,yCAAyC,CAAC;AAC7E,OAAO,EAAE,uBAAuB,EAAE,MAAM,yCAAyC,CAAC;AAClF,YAAY,EAAE,0BAA0B,EAAE,MAAM,yCAAyC,CAAC;AAC1F,OAAO,EAAE,0BAA0B,EAAE,MAAM,yCAAyC,CAAC;AACrF,OAAO,EAAE,0BAA0B,EAAE,MAAM,0CAA0C,CAAC;AACtF,OAAO,EAAE,kBAAkB,EAAE,MAAM,kCAAkC,CAAC;AACtE,OAAO,EAAE,YAAY,EAAE,cAAc,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AACrF,OAAO,EACH,SAAS,EACT,uBAAuB,EACvB,qCAAqC,EACrC,KAAK,oBAAoB,EACzB,KAAK,iCAAiC,GACzC,MAAM,oBAAoB,CAAC;AAC5B,YAAY,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC"}
|
package/dist/models/index.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.Preview = exports.RopewikiVehicleType = exports.PermitStatus = exports.SavedFilters = exports.SavedPagesFilter = exports.SearchFilter = exports.RouteFilter = exports.RiskMinMax = exports.TimeMinMax = exports.WaterMinMax = exports.TechnicalMinMax = exports.AcaDifficultyFilterOptions = exports.registerDifficultyFilterOptionsParser = exports.DifficultyFilterOptions = exports.Q_ACA_RISK = exports.Q_ACA_TIME = exports.Q_ACA_WATER = exports.Q_ACA_TECHNICAL = exports.Q_DIFFICULTY_TYPE = exports.AcaDifficultyParams = exports.isDifficultyParamsActive = exports.registerDifficultyParamsQueryParser = exports.registerDifficultyParamsQueryInference = exports.DifficultyParams = exports.AcaRiskRating = exports.AcaTimeRating = exports.AcaWaterRating = exports.AcaTechnicalRating = exports.AcaDifficulty = exports.Difficulty = exports.DifficultyType = exports.DifficultyRisk = exports.DifficultyTime = exports.DifficultyWater = exports.DifficultyTechnical = exports.AcaDifficultyRating = exports.RISK_ORDER = exports.AcaWaterSubRating = exports.AcaTimeSubRating = exports.AcaTechnicalSubRating = exports.AcaRiskSubRating = exports.ACA_WATER_ORDER = exports.ACA_TIME_ORDER = exports.ACA_TECHNICAL_ORDER = exports.ACA_RISK_ORDER = exports.resolveDifficultyRatingFromRecord = exports.registerDifficultyParser = exports.DifficultyRating = exports.DifficultyRatingSystem = exports.PageDataSource = void 0;
|
|
4
|
-
exports.
|
|
5
|
-
exports.DOWNLOADED_ROUTE_PREVIEWS_STORAGE_KEY = exports.SAVED_PAGES_STORAGE_KEY = exports.SavedPage = exports.ImageVersions = exports.VERSION_FORMAT = exports.ImageVersion = exports.RoutePreviewResult = exports.RopewikiRegionImagesResult = exports.RopewikiRegionImagesParams = exports.RopewikiRegionImageView = exports.RegionImagesCursor = exports.RopewikiRegionPreviewsResult = exports.RopewikiRegionPreviewsParams = exports.RegionPreviewsCursor = exports.RopewikiRegionViewResult = exports.RopewikiRegionView = exports.SearchResults = exports.SearchParams = exports.SearchCursor = exports.MapDataTileKeysResults = exports.registerPaginationParser = exports.PaginationResultType = exports.PaginationResults = exports.registerCursorPaginationParser = exports.CursorPaginationResultType = exports.CursorPaginationResults = exports.registerResultParser = exports.ResultType = exports.Result = void 0;
|
|
4
|
+
exports.CursorPaginationParams = exports.CursorType = exports.Cursor = exports.RopewikiPageLinkPreviewResult = exports.LinkPreviewImage = exports.LinkPreview = exports.OfflineRopewikiPageView = exports.OnlineRopewikiPageView = exports.BaseRopewikiPageView = exports.PageView = exports.PageViewType = exports.RopewikiPageViewResult = exports.RopewikiPageView = exports.OfflineCenteredRegionMiniMap = exports.OnlineCenteredRegionMiniMap = exports.OfflineRegionMiniMap = exports.OnlineRegionMiniMap = exports.OfflinePageMiniMap = exports.OnlinePageMiniMap = exports.CenteredRegionMiniMap = exports.PageMiniMap = exports.RegionMiniMap = exports.MiniMap = exports.MiniMapType = exports.PolygonLegendItem = exports.LineLegendItem = exports.PointLegendItem = exports.registerLegendItemParser = exports.LegendItem = exports.LEGEND_FEATURE_TYPES = exports.LegendFeatureType = exports.Bounds = exports.OfflineBetaSection = exports.OnlineBetaSection = exports.BetaSection = exports.DownloadBytes = exports.OfflineBetaSectionImage = exports.OnlineBetaSectionImage = exports.BetaSectionImage = exports.RoutesParams = exports.RouteResult = exports.RoutesGeojson = exports.RouteType = exports.RouteGeoJsonFeature = exports.Route = exports.RegionPreview = exports.OfflinePagePreview = exports.OnlinePagePreview = exports.PagePreview = exports.PreviewType = void 0;
|
|
5
|
+
exports.DOWNLOADED_ROUTE_PREVIEWS_STORAGE_KEY = exports.SAVED_PAGES_STORAGE_KEY = exports.SavedPage = exports.ImageVersions = exports.VERSION_FORMAT = exports.ImageVersion = exports.RoutePreviewResult = exports.RopewikiRegionImagesResult = exports.RopewikiRegionImagesParams = exports.RopewikiRegionImageView = exports.RegionImagesCursor = exports.RopewikiRegionPreviewsResult = exports.RopewikiRegionPreviewsParams = exports.RegionPreviewsCursor = exports.RopewikiRegionViewResult = exports.RopewikiRegionView = exports.SearchResults = exports.SearchParams = exports.SearchCursor = exports.MapDataTileKeysResults = exports.registerPaginationParser = exports.PaginationResultType = exports.PaginationResults = exports.registerCursorPaginationParser = exports.CursorPaginationResultType = exports.CursorPaginationResults = exports.registerResultParser = exports.ResultType = exports.Result = exports.PaginationParams = void 0;
|
|
6
6
|
require("./api/results/registerAllResultParsers");
|
|
7
7
|
require("./difficulty/registerDifficultyRatingParsers");
|
|
8
8
|
require("./filters/registerDifficultyFilterOptionsParsers");
|
|
@@ -173,6 +173,8 @@ var ropewikiPageViewResult_1 = require("./api/results/ropewikiPageViewResult");
|
|
|
173
173
|
Object.defineProperty(exports, "RopewikiPageViewResult", { enumerable: true, get: function () { return ropewikiPageViewResult_1.RopewikiPageViewResult; } });
|
|
174
174
|
var pageViewType_1 = require("./pageViews/pageViewType");
|
|
175
175
|
Object.defineProperty(exports, "PageViewType", { enumerable: true, get: function () { return pageViewType_1.PageViewType; } });
|
|
176
|
+
var pageView_1 = require("./pageViews/pageView");
|
|
177
|
+
Object.defineProperty(exports, "PageView", { enumerable: true, get: function () { return pageView_1.PageView; } });
|
|
176
178
|
var ropewikiPageView_2 = require("./pageViews/ropewikiPageView");
|
|
177
179
|
Object.defineProperty(exports, "BaseRopewikiPageView", { enumerable: true, get: function () { return ropewikiPageView_2.RopewikiPageView; } });
|
|
178
180
|
var onlineRopewikiPageView_1 = require("./pageViews/onlineRopewikiPageView");
|
|
@@ -1,6 +1,12 @@
|
|
|
1
|
+
import type { Bounds } from '../bounds';
|
|
1
2
|
import type { MiniMapType } from './miniMapType';
|
|
3
|
+
import type { OfflineCenteredRegionMiniMap } from '../concrete/offlineCenteredRegionMiniMap';
|
|
4
|
+
import type { OfflinePageMiniMap } from '../concrete/offlinePageMiniMap';
|
|
5
|
+
import type { OfflineRegionMiniMap } from '../concrete/offlineRegionMiniMap';
|
|
2
6
|
export interface OnlineMiniMap {
|
|
3
7
|
readonly fetchType: 'online';
|
|
4
8
|
readonly miniMapType: MiniMapType;
|
|
9
|
+
getBounds(): Bounds | null;
|
|
10
|
+
toOffline(downloadedAssetPath: string): OfflinePageMiniMap | OfflineCenteredRegionMiniMap | OfflineRegionMiniMap;
|
|
5
11
|
}
|
|
6
12
|
//# sourceMappingURL=onlineMiniMap.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"onlineMiniMap.d.ts","sourceRoot":"","sources":["../../../../src/models/minimap/abstract/onlineMiniMap.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;
|
|
1
|
+
{"version":3,"file":"onlineMiniMap.d.ts","sourceRoot":"","sources":["../../../../src/models/minimap/abstract/onlineMiniMap.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AACxC,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AACjD,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,0CAA0C,CAAC;AAC7F,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,gCAAgC,CAAC;AACzE,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,kCAAkC,CAAC;AAE7E,MAAM,WAAW,aAAa;IAC1B,QAAQ,CAAC,SAAS,EAAE,QAAQ,CAAC;IAC7B,QAAQ,CAAC,WAAW,EAAE,WAAW,CAAC;IAClC,SAAS,IAAI,MAAM,GAAG,IAAI,CAAC;IAC3B,SAAS,CACL,mBAAmB,EAAE,MAAM,GAC5B,kBAAkB,GAAG,4BAA4B,GAAG,oBAAoB,CAAC;CAC/E"}
|
|
@@ -13,15 +13,19 @@ export declare function registerPageMiniMapParser(fetchType: FetchType, parse: (
|
|
|
13
13
|
export declare abstract class PageMiniMap extends MiniMap {
|
|
14
14
|
abstract readonly fetchType: FetchType;
|
|
15
15
|
readonly miniMapType = MiniMapType.Page;
|
|
16
|
+
/** MapData record id for vector tile fetches; null when not applicable. */
|
|
17
|
+
mapDataId: string | null;
|
|
16
18
|
/** Vector tile source-layer id for line and polygon features. */
|
|
17
19
|
polyLineLayerId: string;
|
|
18
20
|
/** Vector tile source-layer id for point features. */
|
|
19
21
|
pointLayerId: string;
|
|
20
22
|
bounds: Bounds;
|
|
21
23
|
legend?: Record<string, LegendItem>;
|
|
22
|
-
protected constructor(polyLineLayerId: string, pointLayerId: string, bounds: Bounds, title: string, legend?: Record<string, LegendItem>);
|
|
24
|
+
protected constructor(polyLineLayerId: string, pointLayerId: string, bounds: Bounds, title: string, mapDataId?: string | null, legend?: Record<string, LegendItem>);
|
|
25
|
+
getBounds(): Bounds;
|
|
23
26
|
static fromResult(result: unknown): PageMiniMap;
|
|
24
27
|
protected static validateCommonFields(r: Record<string, unknown>, expectedFetchType: FetchType, context: string): void;
|
|
28
|
+
protected static assertNullableMapDataId(obj: Record<string, unknown>, key: string): void;
|
|
25
29
|
protected static assertTemplate(value: unknown, keyName: string): void;
|
|
26
30
|
}
|
|
27
31
|
//# sourceMappingURL=pageMiniMap.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pageMiniMap.d.ts","sourceRoot":"","sources":["../../../../src/models/minimap/abstract/pageMiniMap.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AACjD,OAAO,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AACnC,OAAO,EAAE,UAAU,EAAE,MAAM,+BAA+B,CAAC;AAC3D,OAAO,mCAAmC,CAAC;AAC3C,OAAO,oCAAoC,CAAC;AAC5C,OAAO,sCAAsC,CAAC;AAC9C,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAI5C,wBAAgB,yBAAyB,CACrC,SAAS,EAAE,SAAS,EACpB,KAAK,EAAE,CAAC,MAAM,EAAE,OAAO,KAAK,WAAW,GACxC,IAAI,CAEN;AAED;;GAEG;AACH,8BAAsB,WAAY,SAAQ,OAAO;IAC7C,QAAQ,CAAC,QAAQ,CAAC,SAAS,EAAE,SAAS,CAAC;IACvC,QAAQ,CAAC,WAAW,oBAAoB;IACxC,iEAAiE;IACjE,eAAe,EAAE,MAAM,CAAC;IACxB,sDAAsD;IACtD,YAAY,EAAE,MAAM,CAAC;IACrB,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,UAAU,CAAC,CAAC;IAEpC,SAAS,aACL,eAAe,EAAE,MAAM,EACvB,YAAY,EAAE,MAAM,EACpB,MAAM,EAAE,MAAM,EACd,KAAK,EAAE,MAAM,EACb,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,UAAU,CAAC;
|
|
1
|
+
{"version":3,"file":"pageMiniMap.d.ts","sourceRoot":"","sources":["../../../../src/models/minimap/abstract/pageMiniMap.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AC,EAC1B,iBAAiB,EAAE,SAAS,EAC5B,OAAO,EAAE,MAAM,GAChB,IAAI;IA8BP,SAAS,CAAC,MAAM,CAAC,uBAAuB,CAAC,GAAG,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,GAAG,EAAE,MAAM,GAAG,IAAI;IAazF,SAAS,CAAC,MAAM,CAAC,cAAc,CAAC,KAAK,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,GAAG,IAAI;CAQzE"}
|
|
@@ -17,14 +17,18 @@ function registerPageMiniMapParser(fetchType, parse) {
|
|
|
17
17
|
* Page minimap: vector tiles for a single route/page.
|
|
18
18
|
*/
|
|
19
19
|
class PageMiniMap extends miniMap_1.MiniMap {
|
|
20
|
-
constructor(polyLineLayerId, pointLayerId, bounds, title, legend) {
|
|
20
|
+
constructor(polyLineLayerId, pointLayerId, bounds, title, mapDataId = null, legend) {
|
|
21
21
|
super(title);
|
|
22
22
|
this.miniMapType = miniMapType_1.MiniMapType.Page;
|
|
23
|
+
this.mapDataId = mapDataId;
|
|
23
24
|
this.polyLineLayerId = polyLineLayerId;
|
|
24
25
|
this.pointLayerId = pointLayerId;
|
|
25
26
|
this.bounds = bounds;
|
|
26
27
|
this.legend = legend;
|
|
27
28
|
}
|
|
29
|
+
getBounds() {
|
|
30
|
+
return this.bounds;
|
|
31
|
+
}
|
|
28
32
|
static fromResult(result) {
|
|
29
33
|
if (result == null || typeof result !== 'object') {
|
|
30
34
|
throw new Error('PageMiniMap result must be an object');
|
|
@@ -64,6 +68,17 @@ class PageMiniMap extends miniMap_1.MiniMap {
|
|
|
64
68
|
if ('legend' in r && r.legend !== undefined) {
|
|
65
69
|
r.legend = legendItem_1.LegendItem.legendRecordFromResult(r.legend, `${context}.legend`);
|
|
66
70
|
}
|
|
71
|
+
PageMiniMap.assertNullableMapDataId(r, 'mapDataId');
|
|
72
|
+
}
|
|
73
|
+
static assertNullableMapDataId(obj, key) {
|
|
74
|
+
const v = obj[key];
|
|
75
|
+
if (v === null || v === undefined) {
|
|
76
|
+
obj[key] = null;
|
|
77
|
+
return;
|
|
78
|
+
}
|
|
79
|
+
if (typeof v !== 'string' || v.length === 0) {
|
|
80
|
+
throw new Error(`PageMiniMap.${key} must be a non-empty string or null, got: ${typeof v === 'string' ? 'empty string' : typeof v}`);
|
|
81
|
+
}
|
|
67
82
|
}
|
|
68
83
|
static assertTemplate(value, keyName) {
|
|
69
84
|
if (typeof value !== 'string') {
|
|
@@ -5,7 +5,7 @@ import type { LegendItem } from '../legend/abstract/legendItem';
|
|
|
5
5
|
export declare class OfflinePageMiniMap extends PageMiniMap implements OfflineMiniMap {
|
|
6
6
|
readonly fetchType: "offline";
|
|
7
7
|
offlineTilesTemplate: string;
|
|
8
|
-
constructor(polyLineLayerId: string, pointLayerId: string, offlineTilesTemplate: string, bounds: Bounds, title: string, legend?: Record<string, LegendItem>);
|
|
8
|
+
constructor(polyLineLayerId: string, pointLayerId: string, offlineTilesTemplate: string, bounds: Bounds, title: string, mapDataId?: string | null, legend?: Record<string, LegendItem>);
|
|
9
9
|
toPlain(): Record<string, unknown>;
|
|
10
10
|
static fromResult(result: unknown): OfflinePageMiniMap;
|
|
11
11
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"offlinePageMiniMap.d.ts","sourceRoot":"","sources":["../../../../src/models/minimap/concrete/offlinePageMiniMap.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AACnC,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AACjE,OAAO,EAAE,WAAW,EAA6B,MAAM,yBAAyB,CAAC;AACjF,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,+BAA+B,CAAC;AAEhE,qBAAa,kBAAmB,SAAQ,WAAY,YAAW,cAAc;IACzE,QAAQ,CAAC,SAAS,EAAG,SAAS,CAAU;IACxC,oBAAoB,EAAE,MAAM,CAAC;gBAGzB,eAAe,EAAE,MAAM,EACvB,YAAY,EAAE,MAAM,EACpB,oBAAoB,EAAE,MAAM,EAC5B,MAAM,EAAE,MAAM,EACd,KAAK,EAAE,MAAM,EACb,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,UAAU,CAAC;IAMvC,OAAO,IAAI,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"offlinePageMiniMap.d.ts","sourceRoot":"","sources":["../../../../src/models/minimap/concrete/offlinePageMiniMap.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AACnC,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AACjE,OAAO,EAAE,WAAW,EAA6B,MAAM,yBAAyB,CAAC;AACjF,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,+BAA+B,CAAC;AAEhE,qBAAa,kBAAmB,SAAQ,WAAY,YAAW,cAAc;IACzE,QAAQ,CAAC,SAAS,EAAG,SAAS,CAAU;IACxC,oBAAoB,EAAE,MAAM,CAAC;gBAGzB,eAAe,EAAE,MAAM,EACvB,YAAY,EAAE,MAAM,EACpB,oBAAoB,EAAE,MAAM,EAC5B,MAAM,EAAE,MAAM,EACd,KAAK,EAAE,MAAM,EACb,SAAS,GAAE,MAAM,GAAG,IAAW,EAC/B,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,UAAU,CAAC;IAMvC,OAAO,IAAI,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;IAwBlC,MAAM,CAAC,UAAU,CAAC,MAAM,EAAE,OAAO,GAAG,kBAAkB;CAUzD"}
|
|
@@ -3,8 +3,8 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.OfflinePageMiniMap = void 0;
|
|
4
4
|
const pageMiniMap_1 = require("../abstract/pageMiniMap");
|
|
5
5
|
class OfflinePageMiniMap extends pageMiniMap_1.PageMiniMap {
|
|
6
|
-
constructor(polyLineLayerId, pointLayerId, offlineTilesTemplate, bounds, title, legend) {
|
|
7
|
-
super(polyLineLayerId, pointLayerId, bounds, title, legend);
|
|
6
|
+
constructor(polyLineLayerId, pointLayerId, offlineTilesTemplate, bounds, title, mapDataId = null, legend) {
|
|
7
|
+
super(polyLineLayerId, pointLayerId, bounds, title, mapDataId, legend);
|
|
8
8
|
this.fetchType = 'offline';
|
|
9
9
|
this.offlineTilesTemplate = offlineTilesTemplate;
|
|
10
10
|
}
|
|
@@ -12,6 +12,7 @@ class OfflinePageMiniMap extends pageMiniMap_1.PageMiniMap {
|
|
|
12
12
|
const plain = {
|
|
13
13
|
fetchType: this.fetchType,
|
|
14
14
|
miniMapType: this.miniMapType,
|
|
15
|
+
mapDataId: this.mapDataId,
|
|
15
16
|
polyLineLayerId: this.polyLineLayerId,
|
|
16
17
|
pointLayerId: this.pointLayerId,
|
|
17
18
|
offlineTilesTemplate: this.offlineTilesTemplate,
|
|
@@ -9,6 +9,7 @@ export declare class OnlineCenteredRegionMiniMap extends CenteredRegionMiniMap i
|
|
|
9
9
|
totalBytes: number;
|
|
10
10
|
constructor(routesParams: RoutesParams, centeredRouteId: string, title: string, routeCount: number, totalBytes: number);
|
|
11
11
|
toOffline(downloadedGeojson: string): OfflineCenteredRegionMiniMap;
|
|
12
|
+
getBounds(): null;
|
|
12
13
|
static fromResult(result: unknown): OnlineCenteredRegionMiniMap;
|
|
13
14
|
}
|
|
14
15
|
//# sourceMappingURL=onlineCenteredRegionMiniMap.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"onlineCenteredRegionMiniMap.d.ts","sourceRoot":"","sources":["../../../../src/models/minimap/concrete/onlineCenteredRegionMiniMap.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAC;AAC7D,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAC/D,OAAO,EACH,qBAAqB,EAExB,MAAM,mCAAmC,CAAC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CAAC,UAAU,CAAC,MAAM,EAAE,OAAO,GAAG,2BAA2B;CAwBlE"}
|
|
@@ -15,6 +15,9 @@ class OnlineCenteredRegionMiniMap extends centeredRegionMiniMap_1.CenteredRegion
|
|
|
15
15
|
toOffline(downloadedGeojson) {
|
|
16
16
|
return new offlineCenteredRegionMiniMap_1.OfflineCenteredRegionMiniMap(downloadedGeojson, this.centeredRouteId, this.title);
|
|
17
17
|
}
|
|
18
|
+
getBounds() {
|
|
19
|
+
return null;
|
|
20
|
+
}
|
|
18
21
|
static fromResult(result) {
|
|
19
22
|
if (result == null || typeof result !== 'object') {
|
|
20
23
|
throw new Error('OnlineCenteredRegionMiniMap result must be an object');
|
|
@@ -8,7 +8,7 @@ export declare class OnlinePageMiniMap extends PageMiniMap implements OnlineMini
|
|
|
8
8
|
onlineTilesTemplate: string;
|
|
9
9
|
tileCount: number;
|
|
10
10
|
tileTotalBytes: number;
|
|
11
|
-
constructor(polyLineLayerId: string, pointLayerId: string, onlineTilesTemplate: string, bounds: Bounds, title: string, tileCount: number, tileTotalBytes: number, legend?: Record<string, LegendItem>);
|
|
11
|
+
constructor(polyLineLayerId: string, pointLayerId: string, onlineTilesTemplate: string, bounds: Bounds, title: string, tileCount: number, tileTotalBytes: number, mapDataId?: string | null, legend?: Record<string, LegendItem>);
|
|
12
12
|
toOffline(offlineTilesTemplate: string): OfflinePageMiniMap;
|
|
13
13
|
static fromResult(result: unknown): OnlinePageMiniMap;
|
|
14
14
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"onlinePageMiniMap.d.ts","sourceRoot":"","sources":["../../../../src/models/minimap/concrete/onlinePageMiniMap.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AAEnC,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAC/D,OAAO,EAAE,WAAW,EAA6B,MAAM,yBAAyB,CAAC;AACjF,OAAO,KAAK,EAAE,UA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K,EAAE,MAAM,EACb,SAAS,EAAE,MAAM,EACjB,cAAc,EAAE,MAAM,EACtB,SAAS,GAAE,MAAM,GAAG,IAAW,EAC/B,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,UAAU,CAAC;IAQvC,SAAS,CAAC,oBAAoB,EAAE,MAAM,GAAG,kBAAkB;IAY3D,MAAM,CAAC,UAAU,CAAC,MAAM,EAAE,OAAO,GAAG,iBAAiB;CAqBxD"}
|
|
@@ -5,15 +5,15 @@ const miniMap_1 = require("../abstract/miniMap");
|
|
|
5
5
|
const pageMiniMap_1 = require("../abstract/pageMiniMap");
|
|
6
6
|
const offlinePageMiniMap_1 = require("./offlinePageMiniMap");
|
|
7
7
|
class OnlinePageMiniMap extends pageMiniMap_1.PageMiniMap {
|
|
8
|
-
constructor(polyLineLayerId, pointLayerId, onlineTilesTemplate, bounds, title, tileCount, tileTotalBytes, legend) {
|
|
9
|
-
super(polyLineLayerId, pointLayerId, bounds, title, legend);
|
|
8
|
+
constructor(polyLineLayerId, pointLayerId, onlineTilesTemplate, bounds, title, tileCount, tileTotalBytes, mapDataId = null, legend) {
|
|
9
|
+
super(polyLineLayerId, pointLayerId, bounds, title, mapDataId, legend);
|
|
10
10
|
this.fetchType = 'online';
|
|
11
11
|
this.onlineTilesTemplate = onlineTilesTemplate;
|
|
12
12
|
this.tileCount = tileCount;
|
|
13
13
|
this.tileTotalBytes = tileTotalBytes;
|
|
14
14
|
}
|
|
15
15
|
toOffline(offlineTilesTemplate) {
|
|
16
|
-
return new offlinePageMiniMap_1.OfflinePageMiniMap(this.polyLineLayerId, this.pointLayerId, offlineTilesTemplate, this.bounds, this.title, this.legend);
|
|
16
|
+
return new offlinePageMiniMap_1.OfflinePageMiniMap(this.polyLineLayerId, this.pointLayerId, offlineTilesTemplate, this.bounds, this.title, this.mapDataId, this.legend);
|
|
17
17
|
}
|
|
18
18
|
static fromResult(result) {
|
|
19
19
|
if (result == null || typeof result !== 'object') {
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { RoutesParams } from '../../api/params/routesParams';
|
|
2
|
+
import { OfflineRegionMiniMap } from './offlineRegionMiniMap';
|
|
2
3
|
import { Bounds } from '../bounds';
|
|
3
4
|
import type { OnlineMiniMap } from '../abstract/onlineMiniMap';
|
|
4
5
|
import { RegionMiniMap } from '../abstract/regionMiniMap';
|
|
@@ -11,6 +12,8 @@ export declare class OnlineRegionMiniMap extends RegionMiniMap implements Online
|
|
|
11
12
|
routeCount: number;
|
|
12
13
|
totalBytes: number;
|
|
13
14
|
constructor(routesParams: RoutesParams, bounds: Bounds | null, title: string, routeCount: number, totalBytes: number);
|
|
15
|
+
getBounds(): Bounds | null;
|
|
16
|
+
toOffline(downloadedGeojson: string): OfflineRegionMiniMap;
|
|
14
17
|
static fromResult(result: unknown): OnlineRegionMiniMap;
|
|
15
18
|
}
|
|
16
19
|
//# sourceMappingURL=onlineRegionMiniMap.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"onlineRegionMiniMap.d.ts","sourceRoot":"","sources":["../../../../src/models/minimap/concrete/onlineRegionMiniMap.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAC;AAC7D,OAAO,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AAGnC,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAC/D,OAAO,EAAE,aAAa,EAA+B,MAAM,2BAA2B,CAAC;AAEvF;;GAEG;AACH,qBAAa,mBAAoB,SAAQ,aAAc,YAAW,aAAa;IAC3E,QAAQ,CAAC,SAAS,EAAG,QAAQ,CAAU;IACvC,YAAY,EAAE,YAAY,CAAC;IAC3B,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC;gBAGf,YAAY,EAAE,YAAY,EAC1B,MAAM,EAAE,MAAM,GAAG,IAAI,EACrB,KAAK,EAAE,MAAM,EACb,UAAU,EAAE,MAAM,EAClB,UAAU,EAAE,MAAM;IAQtB,MAAM,CAAC,UAAU,CAAC,MAAM,EAAE,OAAO,GAAG,mBAAmB;CAsC1D"}
|
|
1
|
+
{"version":3,"file":"onlineRegionMiniMap.d.ts","sourceRoot":"","sources":["../../../../src/models/minimap/concrete/onlineRegionMiniMap.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAC;AAC7D,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAC9D,OAAO,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AAGnC,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAC/D,OAAO,EAAE,aAAa,EAA+B,MAAM,2BAA2B,CAAC;AAEvF;;GAEG;AACH,qBAAa,mBAAoB,SAAQ,aAAc,YAAW,aAAa;IAC3E,QAAQ,CAAC,SAAS,EAAG,QAAQ,CAAU;IACvC,YAAY,EAAE,YAAY,CAAC;IAC3B,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC;gBAGf,YAAY,EAAE,YAAY,EAC1B,MAAM,EAAE,MAAM,GAAG,IAAI,EACrB,KAAK,EAAE,MAAM,EACb,UAAU,EAAE,MAAM,EAClB,UAAU,EAAE,MAAM;IAQtB,SAAS,IAAI,MAAM,GAAG,IAAI;IAI1B,SAAS,CAAC,iBAAiB,EAAE,MAAM,GAAG,oBAAoB;IAI1D,MAAM,CAAC,UAAU,CAAC,MAAM,EAAE,OAAO,GAAG,mBAAmB;CAsC1D"}
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.OnlineRegionMiniMap = void 0;
|
|
4
4
|
const routesParams_1 = require("../../api/params/routesParams");
|
|
5
|
+
const offlineRegionMiniMap_1 = require("./offlineRegionMiniMap");
|
|
5
6
|
const bounds_1 = require("../bounds");
|
|
6
7
|
const miniMap_1 = require("../abstract/miniMap");
|
|
7
8
|
const miniMapType_1 = require("../abstract/miniMapType");
|
|
@@ -17,6 +18,12 @@ class OnlineRegionMiniMap extends regionMiniMap_1.RegionMiniMap {
|
|
|
17
18
|
this.routeCount = routeCount;
|
|
18
19
|
this.totalBytes = totalBytes;
|
|
19
20
|
}
|
|
21
|
+
getBounds() {
|
|
22
|
+
return this.bounds;
|
|
23
|
+
}
|
|
24
|
+
toOffline(downloadedGeojson) {
|
|
25
|
+
return new offlineRegionMiniMap_1.OfflineRegionMiniMap(downloadedGeojson, this.bounds, this.title);
|
|
26
|
+
}
|
|
20
27
|
static fromResult(result) {
|
|
21
28
|
if (result == null || typeof result !== 'object') {
|
|
22
29
|
throw new Error('OnlineRegionMiniMap result must be an object');
|
|
@@ -1,11 +1,14 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { OfflinePagePreview } from '../previews/offlinePagePreview';
|
|
2
2
|
import { RouteType } from '../routes/routeType';
|
|
3
|
+
import type { Bounds } from '../minimap/bounds';
|
|
3
4
|
import { PageViewType } from './pageViewType';
|
|
4
5
|
export interface OfflinePageView {
|
|
5
6
|
readonly fetchType: 'offline';
|
|
6
7
|
readonly id: string;
|
|
7
8
|
readonly routeType: RouteType;
|
|
8
9
|
readonly pageViewType: PageViewType;
|
|
9
|
-
toPagePreview():
|
|
10
|
+
toPagePreview(): OfflinePagePreview;
|
|
11
|
+
/** Bounds for Mapbox offline pack when this page uses a page minimap; otherwise null. */
|
|
12
|
+
getMapboxPackBounds(): Bounds | null;
|
|
10
13
|
}
|
|
11
14
|
//# sourceMappingURL=offlinePageView.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"offlinePageView.d.ts","sourceRoot":"","sources":["../../../src/models/pageViews/offlinePageView.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"offlinePageView.d.ts","sourceRoot":"","sources":["../../../src/models/pageViews/offlinePageView.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,gCAAgC,CAAC;AACzE,OAAO,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAChD,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAChD,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAE9C,MAAM,WAAW,eAAe;IAC5B,QAAQ,CAAC,SAAS,EAAE,SAAS,CAAC;IAC9B,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,SAAS,EAAE,SAAS,CAAC;IAC9B,QAAQ,CAAC,YAAY,EAAE,YAAY,CAAC;IACpC,aAAa,IAAI,kBAAkB,CAAC;IACpC,yFAAyF;IACzF,mBAAmB,IAAI,MAAM,GAAG,IAAI,CAAC;CACxC"}
|