forked from MapComplete/MapComplete
Fix: fix some unresolved imports after refactoring
This commit is contained in:
parent
6f69f3ee69
commit
5e3be88eca
8 changed files with 15 additions and 6 deletions
|
@ -3,6 +3,7 @@ import ScriptUtils from "./ScriptUtils"
|
|||
import { Utils } from "../src/Utils"
|
||||
import Script from "./Script"
|
||||
import { Feature, Polygon } from "geojson"
|
||||
import { Lists } from "../src/Utils/Lists"
|
||||
|
||||
class StatsDownloader {
|
||||
private readonly urlTemplate =
|
||||
|
|
|
@ -2,6 +2,7 @@ import { appendFileSync, existsSync, readFileSync, writeFileSync } from "fs"
|
|||
import { GeoOperations } from "../../Logic/GeoOperations"
|
||||
import ScriptUtils from "../ScriptUtils"
|
||||
import { Utils } from "../../Utils"
|
||||
import { Lists } from "../../src/Utils/Lists"
|
||||
|
||||
async function main(args: string[]) {
|
||||
ScriptUtils.fixUtils()
|
||||
|
@ -63,7 +64,7 @@ async function main(args: string[]) {
|
|||
|
||||
const url =
|
||||
"https://staging.anyways.eu/routing-api/v1/routes?access_token=postal_code_script&turn_by_turn=false&format=geojson&language=en"
|
||||
const depPoints: [number, number][] = Utils.NoNull(
|
||||
const depPoints: [number, number][] = Lists.noNull(
|
||||
await Promise.all(
|
||||
candidates.map(async (candidate) => {
|
||||
try {
|
||||
|
|
|
@ -7,6 +7,7 @@ import { GeoOperations } from "../Logic/GeoOperations"
|
|||
import { Tiles } from "../Models/TileRange"
|
||||
import { Feature } from "geojson"
|
||||
import { features } from "monaco-editor/esm/metadata"
|
||||
import { Lists } from "../src/Utils/Lists"
|
||||
|
||||
/**
|
||||
* This script slices a big newline-delimeted geojson file into tiled geojson
|
||||
|
@ -165,7 +166,7 @@ class Slice extends Script {
|
|||
console.log("Loading as newline-delimited features")
|
||||
allFeatures = await this.readFeaturesFromLineDelimitedJsonFile(inputFile)
|
||||
}
|
||||
allFeatures = Utils.NoNull(allFeatures)
|
||||
allFeatures = Lists.noNull(allFeatures)
|
||||
|
||||
console.log("Loaded all", allFeatures.length, "points")
|
||||
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
import GeocodingProvider, { GeocodeResult, GeocodingOptions } from "./GeocodingProvider"
|
||||
import { Utils } from "../../Utils"
|
||||
import { Store, Stores } from "../UIEventSource"
|
||||
import { Lists } from "../../Utils/Lists"
|
||||
|
||||
export default class CombinedSearcher implements GeocodingProvider {
|
||||
public readonly name = "CombinedSearcher"
|
||||
|
@ -13,7 +14,7 @@ export default class CombinedSearcher implements GeocodingProvider {
|
|||
* @param providers
|
||||
*/
|
||||
constructor(...providers: ReadonlyArray<GeocodingProvider>) {
|
||||
this._providers = Utils.noNull(providers)
|
||||
this._providers = Lists.noNull(providers)
|
||||
this._providersWithSuggest = this._providers.filter((pr) => pr.suggest !== undefined)
|
||||
}
|
||||
|
||||
|
|
|
@ -2,8 +2,10 @@
|
|||
import Tr from "../Base/Tr.svelte"
|
||||
import Translations from "../i18n/Translations"
|
||||
import { XCircleIcon } from "@babeard/svelte-heroicons/solid"
|
||||
import type { SpecialVisualizationState } from "../SpecialVisualization"
|
||||
|
||||
export let failed: number
|
||||
export let state: SpecialVisualizationState
|
||||
const t = Translations.t.image
|
||||
</script>
|
||||
|
||||
|
@ -16,6 +18,9 @@
|
|||
{/if}
|
||||
<Tr cls="text-normal" t={t.upload.failReasons} />
|
||||
<Tr cls="text-xs" t={t.upload.failReasonsAdvanced} />
|
||||
{#if state}
|
||||
<button class="primary pointer-events-auto" on:click={() => state.imageUploadManager.uploadQueue()}></button>
|
||||
{/if}
|
||||
</div>
|
||||
<button
|
||||
class="pointer-events-auto mt-2 h-fit shrink-0 rounded-full border-none p-0"
|
||||
|
|
|
@ -64,7 +64,7 @@
|
|||
|
||||
{#if $debugging}
|
||||
<div class="low-interaction">
|
||||
Pending {$pending} Done {$successfull} Err {$failed}
|
||||
Pending {$pending} Done {$successfull} Err {$failed} id {featureId}
|
||||
</div>
|
||||
{/if}
|
||||
|
||||
|
@ -93,7 +93,7 @@
|
|||
{/if}
|
||||
|
||||
{#if $failed > dismissed}
|
||||
<UploadFailedMessage failed={$failed} on:click={() => (dismissed = $failed)} />
|
||||
<UploadFailedMessage failed={$failed} on:click={() => (dismissed = $failed)} {state} />
|
||||
{/if}
|
||||
|
||||
{#if showThankYou}
|
||||
|
|
|
@ -12,6 +12,7 @@
|
|||
import type { Feature } from "geojson"
|
||||
import LayerConfig from "../../Models/ThemeConfig/LayerConfig"
|
||||
import Loading from "../Base/Loading.svelte"
|
||||
import { Lists } from "../../Utils/Lists"
|
||||
/**
|
||||
* An element showing all reviews
|
||||
*/
|
||||
|
|
|
@ -24,7 +24,6 @@
|
|||
const t = Translations.t.general.search
|
||||
</script>
|
||||
|
||||
{JSON.stringify($visitedThemes)}
|
||||
{#if $themeResults.length > 0}
|
||||
<SidebarUnit>
|
||||
<h3>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue