MapComplete/src/UI/Popup/Notes/AddNoteCommentViz.ts

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

26 lines
932 B
TypeScript
Raw Normal View History

2023-12-26 22:30:27 +01:00
import { SpecialVisualization, SpecialVisualizationState } from "../../SpecialVisualization"
import { UIEventSource } from "../../../Logic/UIEventSource"
import Constants from "../../../Models/Constants"
import SvelteUIElement from "../../Base/SvelteUIElement"
import AddNoteComment from "./AddNoteComment.svelte"
export class AddNoteCommentViz implements SpecialVisualization {
funcName = "add_note_comment"
needsUrls = [Constants.osmAuthConfig.url]
docs = "A textfield to add a comment to a node (with the option to close the note)."
args = [
{
name: "Id-key",
doc: "The property name where the ID of the note to close can be found",
defaultValue: "id",
},
]
public constr(
state: SpecialVisualizationState,
2024-01-24 23:45:20 +01:00
tags: UIEventSource<Record<string, string>>
2023-12-26 22:30:27 +01:00
) {
return new SvelteUIElement(AddNoteComment, { state, tags })
}
}