UNPKG

@base-framework/organisms

Version:

This will add default organisms to the base framework.

3 lines (2 loc) 793 B
import{a as l}from"./chunk-HBN3WP3J.js";import{a as r}from"./chunk-YZELTHGR.js";import{Tbody as a}from"@base-framework/atoms";import{Data as u}from"@base-framework/base";var i=class extends r{setData(){let t=this.items&&this.items.length>0;return this.skeleton&&!t?new u({items:this.generateSkeletonRows(),hasItems:!0,showSkeleton:!0}):super.setData()}generateSkeletonRows(){let t=this.skeleton,e=5,o=null;typeof t=="object"&&(e=t.number||5,o=t.row||null);let n=this.columnCount||3;return Array.from({length:e},(c,s)=>o&&typeof o=="function"?o(s,n):l({columnCount:n,key:`skeleton-${s}`}))}render(){let t=this.row.bind(this);return a({onCreated:e=>{this.cacheEle(e,"listContainer")},class:`tbody ${this.class||""}`,for:["items",t]})}};export{i as a}; //# sourceMappingURL=chunk-2KRSR2FQ.js.map