UNPKG

@lucidcms/core

Version:

The core of the Lucid CMS. It's responsible for spinning up the API and serving the CMS.

2 lines 713 B
import{copy as e,normalizeCopy as t}from"../../../i18n/copy.mjs";import n from"../field-builder/index.mjs";var r=class extends n{key;config;constructor(n,r){super(),this.key=n,this.config={key:this.key,details:{name:t(r?.details?.name)||e(`admin:bricks.${this.key}.name`,{defaultMessage:n}),summary:t(r?.details?.summary)},preview:r?.preview||{},tenants:r?.tenants??[]}}addFields(e){let t=Array.from(e.fields.values());for(let e of t)e.type!==`tab`&&e.tabParent===null&&(e.tabParent=this.activeTabKey),this.fields.set(e.key,e),this.meta.fieldKeys.push(e.key);return this.activeTabKey=e.activeTabKey??this.activeTabKey,this.invalidateFieldTreeCache(),this}};export{r as default}; //# sourceMappingURL=index.mjs.map