chore: automated housekeeping...

This commit is contained in:
Pieter Vander Vennet 2024-10-19 14:44:55 +02:00
parent c9ce29f206
commit 40e894df8b
294 changed files with 14209 additions and 4192 deletions

View file

@ -5,7 +5,7 @@ import {
Conversion,
ConversionMessage,
DesugaringContext,
Pipe
Pipe,
} from "../../Models/ThemeConfig/Conversion/Conversion"
import { PrepareLayer } from "../../Models/ThemeConfig/Conversion/PrepareLayer"
import { PrevalidateTheme, ValidateLayer } from "../../Models/ThemeConfig/Conversion/Validation"
@ -98,7 +98,6 @@ export abstract class EditJsonState<T> {
public startSavingUpdates(enabled = true) {
this.sendingUpdates = enabled
if (!this.server.isDirect) {
this.register(
["credits"],
this.osmConnection.userDetails.mapD((u) => u.name),
@ -177,10 +176,10 @@ export abstract class EditJsonState<T> {
path,
type: "translation",
hints: {
typehint: "translation"
typehint: "translation",
},
required: origConfig.required ?? false,
description: origConfig.description ?? "A translatable object"
description: origConfig.description ?? "A translatable object",
}
}
@ -332,7 +331,7 @@ export default class EditLayerState extends EditJsonState<LayerConfigJson> {
public readonly imageUploadManager = {
getCountsFor() {
return 0
}
},
}
public readonly theme: { getMatchingLayer: (key: any) => LayerConfig }
public readonly featureSwitches: {
@ -348,8 +347,8 @@ export default class EditLayerState extends EditJsonState<LayerConfigJson> {
properties: this.testTags.data,
geometry: {
type: "Point",
coordinates: [3.21, 51.2]
}
coordinates: [3.21, 51.2],
},
}
constructor(
@ -366,10 +365,10 @@ export default class EditLayerState extends EditJsonState<LayerConfigJson> {
} catch (e) {
return undefined
}
}
},
}
this.featureSwitches = {
featureSwitchIsDebugging: new UIEventSource<boolean>(true)
featureSwitchIsDebugging: new UIEventSource<boolean>(true),
}
this.addMissingTagRenderingIds()
@ -459,7 +458,7 @@ export default class EditLayerState extends EditJsonState<LayerConfigJson> {
const state: DesugaringContext = {
tagRenderings: sharedQuestions,
sharedLayers: layers,
tagRenderingOrder: []
tagRenderingOrder: [],
}
const prepare = this.buildValidation(state)
const context = ConversionContext.construct([], ["prepare"])
@ -536,7 +535,7 @@ export class EditThemeState extends EditJsonState<ThemeConfigJson> {
const state: DesugaringContext = {
tagRenderings: sharedQuestions,
sharedLayers: layers,
tagRenderingOrder: []
tagRenderingOrder: [],
}
const prepare = this.buildValidation(state)
const context = ConversionContext.construct([], ["prepare"])