Configuración de la colección

{col.id}
{#each [ { label: 'Entidades', value: stats.entities }, { label: 'Grupos', value: stats.groups }, { label: 'Atributos', value: stats.attributes }, { label: 'Opciones', value: stats.options }, ] as stat}
{stat.value} {stat.label}
{/each}

Identificación

patch('code', e.currentTarget.value)} placeholder="viviendas_vice" class="field-input font-mono text-xs" />
{#each col.langs as lang}
{lang} patchI18n('name', lang, e.currentTarget.value)} placeholder={lang === 'es' ? 'Viviendas VICE' : ''} class="field-input flex-1" />
{/each}
{#each col.langs as lang}
{lang}
{/each}

Idiomas soportados

{#each ALL_LANGS as lang} {@const active = col.langs.includes(lang)} {@const required = lang === 'es'} {/each}

* Español es obligatorio y no puede desactivarse

Atributos de contexto ({col.attributes.length})

{#if col.attributes.length === 0}

Sin atributos — añade variables de contexto como país, normativa fiscal, año...

{:else}
{#each col.attributes as attr} {@const lit = asLiteral(attr)}
editor.updateCatalogAttribute(attr.id, { code: e.currentTarget.value })} placeholder="country" class="field-input font-mono text-xs w-32" /> {#if lit.kind === 'boolean'} {:else} editor.updateCatalogAttribute(attr.id, { value: lit.kind === 'number' ? Number(e.currentTarget.value) : e.currentTarget.value })} class="field-input text-xs w-24" /> {/if}
{#each col.langs as lang}
{lang} patchLiteralName(attr, lang, e.currentTarget.value)} placeholder={lang === 'es' ? 'País' : ''} class="field-input text-xs flex-1" />
{/each}
{/each}
{/if}

Rutas de imagen

patch('basePath', e.currentTarget.value)} placeholder="/renders/" class="field-input font-mono text-xs" />
Los templates de imagen se resuelven como basePath + template. Cada grupo puede sobreescribir este valor.
{#if editor.validation.errors.filter(e => e.path.startsWith('collection')).length > 0}

Errores

{#each editor.validation.errors.filter(e => e.path.startsWith('collection')) as error}

{error.message}

{error.path}

{/each}
{/if}

Importar / Resetear

{#if showImport}
{#if importError}

{importError}

{/if}
{/if}