forked from MapComplete/MapComplete
chore: automated housekeeping...
This commit is contained in:
parent
79b6927b56
commit
42ded4c1b1
328 changed files with 4062 additions and 1284 deletions
|
|
@ -1,7 +1,10 @@
|
|||
import { DesugaringStep } from "./Conversion"
|
||||
import { TagRenderingConfigJson } from "../Json/TagRenderingConfigJson"
|
||||
import { LayerConfigJson } from "../Json/LayerConfigJson"
|
||||
import { MappingConfigJson, QuestionableTagRenderingConfigJson } from "../Json/QuestionableTagRenderingConfigJson"
|
||||
import {
|
||||
MappingConfigJson,
|
||||
QuestionableTagRenderingConfigJson,
|
||||
} from "../Json/QuestionableTagRenderingConfigJson"
|
||||
import { ConversionContext } from "./ConversionContext"
|
||||
import { Translation } from "../../../UI/i18n/Translation"
|
||||
import { TagUtils } from "../../../Logic/Tags/TagUtils"
|
||||
|
|
|
|||
|
|
@ -1,6 +1,18 @@
|
|||
import { Concat, DesugaringContext, DesugaringStep, Each, FirstOf, Fuse, On, SetDefault } from "./Conversion"
|
||||
import {
|
||||
Concat,
|
||||
DesugaringContext,
|
||||
DesugaringStep,
|
||||
Each,
|
||||
FirstOf,
|
||||
Fuse,
|
||||
On,
|
||||
SetDefault,
|
||||
} from "./Conversion"
|
||||
import { LayerConfigJson } from "../Json/LayerConfigJson"
|
||||
import { MinimalTagRenderingConfigJson, TagRenderingConfigJson } from "../Json/TagRenderingConfigJson"
|
||||
import {
|
||||
MinimalTagRenderingConfigJson,
|
||||
TagRenderingConfigJson,
|
||||
} from "../Json/TagRenderingConfigJson"
|
||||
import { Utils } from "../../../Utils"
|
||||
import RewritableConfigJson from "../Json/RewritableConfigJson"
|
||||
import SpecialVisualizations from "../../../UI/SpecialVisualizations"
|
||||
|
|
|
|||
|
|
@ -271,7 +271,6 @@ export interface QuestionableTagRenderingConfigJson extends TagRenderingConfigJs
|
|||
*/
|
||||
default?: string
|
||||
|
||||
|
||||
/**
|
||||
* question: If this key shared and distinguished by a postfix, what is the postfix?
|
||||
* This option is used specifically for `charge`, where the cost is indicated with `/item`.
|
||||
|
|
|
|||
|
|
@ -381,14 +381,11 @@ export default class LayerConfig extends WithContextLoader {
|
|||
* @private
|
||||
*/
|
||||
private generateDocumentationQuickTable(): string {
|
||||
|
||||
|
||||
return MarkdownUtils.table(
|
||||
["id", "question", "labels", "freeform key"],
|
||||
this.tagRenderings
|
||||
.filter(tr => tr.labels.indexOf("ignore_docs") < 0)
|
||||
.map(tr => {
|
||||
|
||||
.filter((tr) => tr.labels.indexOf("ignore_docs") < 0)
|
||||
.map((tr) => {
|
||||
let key = "_Multiple choice only_"
|
||||
if (tr.freeform) {
|
||||
const type = `[${tr.freeform.type}](../SpecialInputElements.md#${tr.freeform.type})`
|
||||
|
|
@ -419,14 +416,10 @@ export default class LayerConfig extends WithContextLoader {
|
|||
`[${tr.id}](#${tr.id}) ${origDef}`,
|
||||
Utils.NoNull([q, r, options]).join("<br/>"),
|
||||
tr.labels.join(", "),
|
||||
key
|
||||
|
||||
key,
|
||||
]
|
||||
|
||||
|
||||
})
|
||||
)
|
||||
|
||||
}
|
||||
|
||||
public generateDocumentation(
|
||||
|
|
|
|||
|
|
@ -5,7 +5,10 @@ import { TagUtils } from "../../Logic/Tags/TagUtils"
|
|||
import { And } from "../../Logic/Tags/And"
|
||||
import { Utils } from "../../Utils"
|
||||
import { Tag } from "../../Logic/Tags/Tag"
|
||||
import { MappingConfigJson, QuestionableTagRenderingConfigJson } from "./Json/QuestionableTagRenderingConfigJson"
|
||||
import {
|
||||
MappingConfigJson,
|
||||
QuestionableTagRenderingConfigJson,
|
||||
} from "./Json/QuestionableTagRenderingConfigJson"
|
||||
import Validators, { ValidatorType } from "../../UI/InputElement/Validators"
|
||||
import { TagRenderingConfigJson } from "./Json/TagRenderingConfigJson"
|
||||
import { RegexTag } from "../../Logic/Tags/RegexTag"
|
||||
|
|
@ -697,7 +700,10 @@ export default class TagRenderingConfig {
|
|||
* TagRenderingConfig.splitPostfixDistinguished(" €10 / day ") // => {value: "€10", denomination: "day"}
|
||||
*
|
||||
*/
|
||||
private static splitPostfixDistinguished(part: string): { value: string, denomination: string } {
|
||||
private static splitPostfixDistinguished(part: string): {
|
||||
value: string
|
||||
denomination: string
|
||||
} {
|
||||
const i = part.indexOf("/")
|
||||
if (i < 0) {
|
||||
return { value: part, denomination: "" }
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue