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