forked from MapComplete/MapComplete
Chore: fix warnings
This commit is contained in:
parent
ab70c6adc0
commit
47ae4cb456
38 changed files with 49 additions and 90 deletions
|
@ -3,8 +3,6 @@
|
|||
* This overlay element will regularly show a hand that swipes over the underlying element.
|
||||
* This element will hide as soon as the Store 'hideSignal' receives a change (which is not undefined)
|
||||
*/
|
||||
import ToSvelte from "./ToSvelte.svelte";
|
||||
import Svg from "../../Svg";
|
||||
import { Store } from "../../Logic/UIEventSource";
|
||||
import { onDestroy } from "svelte";
|
||||
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
<script lang="ts">
|
||||
import Loading from "./Loading.svelte";
|
||||
import type { SpecialVisualizationState } from "../SpecialVisualization";
|
||||
import type { OsmServiceState } from "../../Logic/Osm/OsmConnection";
|
||||
import { Translation } from "../i18n/Translation";
|
||||
import Translations from "../i18n/Translations";
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<script lang="ts">
|
||||
import {createEventDispatcher, onMount} from "svelte";
|
||||
import {onMount} from "svelte";
|
||||
import BaseUIElement from "../BaseUIElement";
|
||||
import Img from "./Img";
|
||||
|
||||
|
|
|
@ -2,9 +2,7 @@
|
|||
import {Store, UIEventSource} from "../../Logic/UIEventSource";
|
||||
import type {RasterLayerPolygon} from "../../Models/RasterLayers";
|
||||
import {AvailableRasterLayers} from "../../Models/RasterLayers";
|
||||
import Tr from "../Base/Tr.svelte";
|
||||
import {createEventDispatcher, onDestroy} from "svelte";
|
||||
import Translations from "../i18n/Translations";
|
||||
import Svg from "../../Svg";
|
||||
import {Map as MlMap} from "maplibre-gl"
|
||||
import type {MapProperties} from "../../Models/MapProperties";
|
||||
|
|
|
@ -14,7 +14,6 @@
|
|||
<script lang="ts">
|
||||
import {UIEventSource} from "../../Logic/UIEventSource"
|
||||
import Svg from "../../Svg"
|
||||
import SubtleButton from "../Base/SubtleButton.svelte"
|
||||
import ToSvelte from "../Base/ToSvelte.svelte"
|
||||
import Translations from "../i18n/Translations"
|
||||
import Tr from "../Base/Tr.svelte";
|
||||
|
|
|
@ -127,7 +127,7 @@ export class StackedRenderingChart extends ChartJs {
|
|||
let earliest: Date = undefined
|
||||
let latest: Date = undefined
|
||||
let allDates = new Set<string>()
|
||||
features.forEach((value, key) => {
|
||||
features.forEach((value) => {
|
||||
const d = new Date(value.properties.date)
|
||||
Utils.SetMidnight(d)
|
||||
|
||||
|
|
|
@ -47,7 +47,7 @@ export abstract class Validator {
|
|||
*
|
||||
* Returns 'undefined' if the element is valid
|
||||
*/
|
||||
public getFeedback(s: string, requestCountry?: () => string): Translation | undefined {
|
||||
public getFeedback(s: string, _?: () => string): Translation | undefined {
|
||||
if(this.isValid(s)){
|
||||
return undefined
|
||||
}
|
||||
|
@ -61,16 +61,14 @@ export abstract class Validator {
|
|||
return Translations.t.validation[this.name].description
|
||||
}
|
||||
|
||||
public isValid(string: string, requestCountry?: () => string): boolean {
|
||||
public isValid(_: string, __?: () => string): boolean {
|
||||
return true
|
||||
}
|
||||
|
||||
/**
|
||||
* Reformats for the human
|
||||
* @param s
|
||||
* @param country
|
||||
*/
|
||||
public reformat(s: string, country?: () => string): string {
|
||||
public reformat(s: string, _?: () => string): string {
|
||||
return s
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,8 +1,5 @@
|
|||
import Combine from "../../Base/Combine"
|
||||
import Wikidata from "../../../Logic/Web/Wikidata"
|
||||
import { UIEventSource } from "../../../Logic/UIEventSource"
|
||||
import Locale from "../../i18n/Locale"
|
||||
import { Utils } from "../../../Utils"
|
||||
import WikidataSearchBox from "../../Wikipedia/WikidataSearchBox"
|
||||
import { Validator } from "../Validator"
|
||||
|
||||
|
|
|
@ -4,7 +4,6 @@
|
|||
import type PresetConfig from "../../../Models/ThemeConfig/PresetConfig";
|
||||
import Tr from "../../Base/Tr.svelte";
|
||||
import Translations from "../../i18n/Translations.js";
|
||||
import SubtleButton from "../../Base/SubtleButton.svelte";
|
||||
import {Translation} from "../../i18n/Translation";
|
||||
import type {SpecialVisualizationState} from "../../SpecialVisualization";
|
||||
import {ImmutableStore} from "../../../Logic/UIEventSource";
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
<script lang="ts">
|
||||
import ToSvelte from "../Base/ToSvelte.svelte";
|
||||
import Table from "../Base/Table";
|
||||
import { UIEventSource } from "../../Logic/UIEventSource";
|
||||
import {UIEventSource} from "../../Logic/UIEventSource";
|
||||
import SimpleMetaTaggers from "../../Logic/SimpleMetaTagger";
|
||||
import { FixedUiElement } from "../Base/FixedUiElement";
|
||||
import { onDestroy } from "svelte";
|
||||
import Toggle, { ClickableToggle } from "../Input/Toggle";
|
||||
import {FixedUiElement} from "../Base/FixedUiElement";
|
||||
import {onDestroy} from "svelte";
|
||||
import Toggle from "../Input/Toggle";
|
||||
import Lazy from "../Base/Lazy";
|
||||
import BaseUIElement from "../BaseUIElement";
|
||||
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
import Translations from "../i18n/Translations"
|
||||
import { SubtleButton } from "../Base/SubtleButton"
|
||||
import {SubtleButton} from "../Base/SubtleButton"
|
||||
import Svg from "../../Svg"
|
||||
import Combine from "../Base/Combine"
|
||||
import { GeoOperations } from "../../Logic/GeoOperations"
|
||||
import { Utils } from "../../Utils"
|
||||
import { SpecialVisualization, SpecialVisualizationState } from "../SpecialVisualization"
|
||||
import { Store, UIEventSource } from "../../Logic/UIEventSource"
|
||||
import { Feature, LineString } from "geojson"
|
||||
import {GeoOperations} from "../../Logic/GeoOperations"
|
||||
import {Utils} from "../../Utils"
|
||||
import {SpecialVisualization, SpecialVisualizationState} from "../SpecialVisualization"
|
||||
import {UIEventSource} from "../../Logic/UIEventSource"
|
||||
import {Feature, LineString} from "geojson"
|
||||
import LayerConfig from "../../Models/ThemeConfig/LayerConfig"
|
||||
|
||||
export class ExportAsGpxViz implements SpecialVisualization {
|
||||
|
|
|
@ -58,7 +58,7 @@ export default class WayImportButtonViz implements AutoAction, SpecialVisualizat
|
|||
public readonly supportsAutoAction = true
|
||||
public readonly needsNodeDatabase = true
|
||||
|
||||
constr(state: SpecialVisualizationState, tagSource: UIEventSource<Record<string, string>>, argument: string[], feature: Feature, layer: LayerConfig): BaseUIElement {
|
||||
constr(state: SpecialVisualizationState, tagSource: UIEventSource<Record<string, string>>, argument: string[], feature: Feature, _: LayerConfig): BaseUIElement {
|
||||
const geometry = feature.geometry
|
||||
if (!(geometry.type == "LineString" || geometry.type === "Polygon")) {
|
||||
console.error("Invalid type to import", geometry.type)
|
||||
|
|
|
@ -8,7 +8,6 @@ import { VariableUiElement } from "../Base/VariableUIElement"
|
|||
import { Translation } from "../i18n/Translation"
|
||||
import BaseUIElement from "../BaseUIElement"
|
||||
import { GeoOperations } from "../../Logic/GeoOperations"
|
||||
import { OsmObject } from "../../Logic/Osm/OsmObject"
|
||||
import ChangeLocationAction from "../../Logic/Osm/Actions/ChangeLocationAction"
|
||||
import MoveConfig from "../../Models/ThemeConfig/MoveConfig"
|
||||
import ChangeTagAction from "../../Logic/Osm/Actions/ChangeTagAction"
|
||||
|
|
|
@ -146,7 +146,7 @@ export default class TagApplyButton implements AutoAction, SpecialVisualization
|
|||
tags: UIEventSource<Record<string, string>>,
|
||||
args: string[],
|
||||
feature: Feature,
|
||||
layer: LayerConfig
|
||||
_: LayerConfig
|
||||
): BaseUIElement {
|
||||
const tagsToApply = TagApplyButton.generateTagsToApply(args[0], tags)
|
||||
const msg = args[1]
|
||||
|
|
|
@ -2,7 +2,6 @@
|
|||
import {UIEventSource} from "../../../Logic/UIEventSource";
|
||||
import {Translation} from "../../i18n/Translation";
|
||||
import ValidatedInput from "../../InputElement/ValidatedInput.svelte";
|
||||
import Tr from "../../Base/Tr.svelte";
|
||||
import TagRenderingConfig from "../../../Models/ThemeConfig/TagRenderingConfig";
|
||||
import Inline from "./Inline.svelte";
|
||||
import {createEventDispatcher, onDestroy} from "svelte";
|
||||
|
|
|
@ -1,7 +1,3 @@
|
|||
import { Utils } from "../../Utils"
|
||||
import { Feature } from "geojson"
|
||||
import { Point } from "@turf/turf"
|
||||
import { GeoLocationPointProperties } from "../../Logic/State/GeoLocationState"
|
||||
import UploadTraceToOsmUI from "../BigComponents/UploadTraceToOsmUI"
|
||||
import { SpecialVisualization, SpecialVisualizationState } from "../SpecialVisualization"
|
||||
import { UIEventSource } from "../../Logic/UIEventSource"
|
||||
|
@ -18,8 +14,8 @@ export class UploadToOsmViz implements SpecialVisualization {
|
|||
|
||||
constr(
|
||||
state: SpecialVisualizationState,
|
||||
featureTags: UIEventSource<Record<string, string>>,
|
||||
args: string[]
|
||||
_: UIEventSource<Record<string, string>>,
|
||||
__: string[]
|
||||
) {
|
||||
const locations = state.historicalUserLocations.features.data
|
||||
return new UploadTraceToOsmUI((title) => GeoOperations.toGpx(locations, title), state, {
|
||||
|
|
|
@ -64,7 +64,7 @@ import {SaveButton} from "./Popup/SaveButton"
|
|||
import Lazy from "./Base/Lazy"
|
||||
import {CheckBox} from "./Input/Checkboxes"
|
||||
import Slider from "./Input/Slider"
|
||||
import {OsmId, OsmTags, WayId} from "../Models/OsmFeature"
|
||||
import {OsmTags, WayId} from "../Models/OsmFeature"
|
||||
import MoveWizard from "./Popup/MoveWizard"
|
||||
import SplitRoadWizard from "./Popup/SplitRoadWizard"
|
||||
import {ExportAsGpxViz} from "./Popup/ExportAsGpxViz"
|
||||
|
@ -74,7 +74,6 @@ import {PointImportButtonViz} from "./Popup/ImportButtons/PointImportButtonViz";
|
|||
import WayImportButtonViz from "./Popup/ImportButtons/WayImportButtonViz";
|
||||
import ConflateImportButtonViz from "./Popup/ImportButtons/ConflateImportButtonViz";
|
||||
import DeleteWizard from "./Popup/DeleteFlow/DeleteWizard.svelte";
|
||||
import {UIElement} from "./UIElement";
|
||||
|
||||
class NearbyImageVis implements SpecialVisualization {
|
||||
// Class must be in SpecialVisualisations due to weird cyclical import that breaks the tests
|
||||
|
|
|
@ -41,9 +41,7 @@
|
|||
import Svg from "../Svg";
|
||||
import {ShareScreen} from "./BigComponents/ShareScreen";
|
||||
import ThemeIntroPanel from "./BigComponents/ThemeIntroPanel.svelte";
|
||||
import type {Readable} from "svelte/store";
|
||||
import type {RasterLayerPolygon} from "../Models/RasterLayers";
|
||||
import RasterLayerPicker from "./Map/RasterLayerPicker.svelte";
|
||||
import RasterLayerOverview from "./Map/RasterLayerOverview.svelte";
|
||||
import IfHidden from "./Base/IfHidden.svelte";
|
||||
import {onDestroy} from "svelte";
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
import { UIEventSource } from "../../Logic/UIEventSource"
|
||||
|
||||
export interface WikipediaBoxOptions {
|
||||
addHeader?: boolean
|
||||
firstParagraphOnly?: true | boolean
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
<script lang="ts">
|
||||
import type { FullWikipediaDetails } from "../../Logic/Web/Wikipedia";
|
||||
import { Store } from "../../Logic/UIEventSource";
|
||||
import { onDestroy } from "svelte";
|
||||
|
||||
/**
|
||||
* Small helper
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue