${Object.entries(this._settingProperties).map(([key, value]) => {
// TODO remove marketplace registry (bundling is too expensive)
//const item = registry.find((item) => item.id === value.meta?.id)
return value.schema?.properties && this._newSettings
? html`
${value.meta &&
(value.meta?.displayName as { en: string }).en &&
html`
${value.meta &&
(value.meta?.displayName as { en: string }).en}
${value.meta.id.startsWith("plugin")
? "Plugin"
: "Lint Rule"}
`}
${Object.entries(value.schema.properties).map(
([property, schema]) => {
if (
property === "$schema" ||
property === "modules" ||
property === "languageTags" ||
property === "sourceLanguageTag"
)
return undefined;
return key === "internal"
? html`
`
: html`
`;
}
)}
`
: undefined;
})}
${this._unsavedChanges
? html`
Attention, you have unsaved changes.
{
this._revertChanges();
}}
varaint="default"
>
Cancel
{
this._saveChanges();
}}
variant="primary"
>
Save Changes
`
: html``}
`;
}
}
// add types
declare global {
interface HTMLElementTagNameMap {
"inlang-settings": InlangSettings;
}
}