@base-framework/organisms 1.0.18 → 1.0.20

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/organisms.js CHANGED
@@ -1,2 +1,2 @@
1
- import{Atom as e}from"@base-framework/base";var r=(t,o)=>({...t,children:o}),p=t=>({...t,tag:"DOCTYPE"}),c=e((t,o)=>r({...t,tag:"html"},o)),g=e((t,o)=>r({...t,tag:"script"},o)),x=e((t,o)=>r({...t,tag:"style"},o)),i=e((t,o)=>r({...t,tag:"head"},o)),l=t=>({...t}),d=t=>({...t,tag:"meta"}),u=e((t,o)=>r({...t,tag:"body"},o)),b=e((t,o)=>r(t,o)),m=e((t,o)=>r({...t,tag:"dialog"},o)),h=e((t,o)=>r({...t,tag:"span"},o)),y=e((t,o)=>r({...t,tag:"p"},o)),S=e((t,o)=>r({...t,tag:"a"},o)),a=e((t,o)=>r({...t,tag:"button"},o)),T=e((t,o)=>a({...t,type:"submit"},o)),f=e((t,o)=>r({...t,tag:"ul"},o)),D=e((t,o)=>r({...t,tag:"li"},o)),H=e(t=>r({...t,tag:"img"},null)),B=e(t=>r({...t,tag:"br"},null)),k=e(t=>r({...t,tag:"hr"},null)),v=e((t,o)=>r({...t,tag:"text"},o)),A=e((t,o)=>r({...t,tag:"h1"},o)),C=e((t,o)=>r({...t,tag:"h2"},o)),F=e((t,o)=>r({...t,tag:"h3"},o)),I=e((t,o)=>r({...t,tag:"h4"},o)),M=e((t,o)=>r({...t,tag:"h5"},o)),P=e((t,o)=>r({...t,tag:"h6"},o)),n=e(t=>r({...t,tag:"input"},null)),q=e((t,o)=>r({...t,tag:"label"},o)),L=e(t=>n({...t,type:"checkbox"})),O=e((t,o)=>r({...t,tag:"section"},o)),R=e((t,o)=>r({...t,tag:"article"},o)),E=e((t,o)=>r({...t,tag:"header"},o)),U=e((t,o)=>r({...t,tag:"footer"},o)),V=e((t,o)=>r({...t,tag:"nav"},o)),w=e((t,o)=>r({...t,tag:"aside"},o)),K=e((t,o)=>r({...t,tag:"figure"},o)),N=e((t,o)=>r({...t,tag:"figcaption"},o)),Q=e((t,o)=>r({...t,tag:"main"},o)),W=e((t,o)=>r({...t,tag:"video"},o)),Y=e((t,o)=>r({...t,tag:"audio"},o)),j=e((t,o)=>r({...t,tag:"table"},o)),z=e((t,o)=>r({...t,tag:"tr"},o)),G=e((t,o)=>r({...t,tag:"th"},o)),J=e((t,o)=>r({...t,tag:"td"},o)),X=e((t,o)=>r({...t,tag:"thead"},o)),Z=e((t,o)=>r({...t,tag:"tbody"},o)),_=e((t,o)=>r({...t,tag:"tfoot"},o)),$=e((t,o)=>r({...t,tag:"form"},o)),tt=e((t,o)=>r({...t,tag:"select"},o)),ot=e((t,o)=>r({...t,tag:"option"},o)),et=e((t,o)=>r({...t,tag:"textarea"},o)),rt=e((t,o)=>r({...t,tag:"canvas"},o)),at=e((t,o)=>r({...t,tag:"progress"},o)),nt=e((t,o)=>r({...t,tag:"blockquote"},o)),st=e((t,o)=>r({...t,tag:"pre"},o)),pt=e((t,o)=>r({...t,tag:"code"},o)),ct=e((t,o)=>r({...t,tag:"ol"},o)),gt=e((t,o)=>r({...t,tag:"dl"},o)),xt=e((t,o)=>r({...t,tag:"dt"},o)),it=e((t,o)=>r({...t,tag:"dd"},o)),lt=e((t,o)=>r({...t,tag:"fieldset"},o)),dt=e((t,o)=>r({...t,tag:"legend"},o)),ut=e((t,o)=>r({...t,tag:"meter"},o)),bt=e((t,o)=>r({...t,tag:"iframe"},o)),mt=e((t,o)=>r({...t,tag:"details"},o)),ht=e((t,o)=>r({...t,tag:"summary"},o)),yt=e((t,o)=>r({...t,tag:"em"},o)),St=e((t,o)=>r({...t,tag:"strong"},o)),Tt=e((t,o)=>r({...t,tag:"small"},o)),ft=e((t,o)=>r({...t,tag:"s"},o)),Dt=e((t,o)=>r({...t,tag:"cite"},o)),Ht=e((t,o)=>r({...t,tag:"q"},o)),Bt=e((t,o)=>r({...t,tag:"dfn"},o)),kt=e((t,o)=>r({...t,tag:"abbr"},o)),vt=e((t,o)=>r({...t,tag:"data"},o)),At=e((t,o)=>r({...t,tag:"time"},o)),Ct=e((t,o)=>r({...t,tag:"var"},o)),Ft=e((t,o)=>r({...t,tag:"samp"},o)),It=e((t,o)=>r({...t,tag:"kbd"},o)),Mt=e((t,o)=>r({...t,tag:"sub"},o)),Pt=e((t,o)=>r({...t,tag:"sup"},o)),qt=e((t,o)=>r({...t,tag:"i"},o)),Lt=e((t,o)=>r({...t,tag:"b"},o)),Ot=e((t,o)=>r({...t,tag:"u"},o)),Rt=e((t,o)=>r({...t,tag:"mark"},o)),Et=e((t,o)=>r({...t,tag:"ruby"},o)),Ut=e((t,o)=>r({...t,tag:"rt"},o)),Vt=e((t,o)=>r({...t,tag:"rp"},o)),wt=e((t,o)=>r({...t,tag:"bdi"},o)),Kt=e((t,o)=>r({...t,tag:"bdo"},o)),Nt=e(t=>r({...t,tag:"wbr"},null));export{S as A,kt as Abbr,R as Article,w as Aside,Y as Audio,Lt as B,wt as Bdi,Kt as Bdo,nt as Blockquote,u as Body,B as Br,a as Button,rt as Canvas,L as Checkbox,Dt as Cite,pt as Code,vt as Data,it as Dd,mt as Details,Bt as Dfn,m as Dialog,b as Div,gt as Dl,p as Doctype,xt as Dt,yt as Em,lt as Fieldset,N as Figcaption,K as Figure,U as Footer,$ as Form,A as H1,C as H2,F as H3,I as H4,M as H5,P as H6,i as Head,E as Header,k as Hr,c as Html,qt as I,bt as Iframe,H as Img,n as Input,It as Kbd,q as Label,dt as Legend,D as Li,Q as Main,Rt as Mark,d as Meta,ut as Meter,V as Nav,ct as Ol,ot as Option,y as P,st as Pre,at as Progress,Ht as Q,Vt as Rp,Ut as Rt,Et as Ruby,ft as S,Ft as Samp,g as Script,O as Section,tt as Select,Tt as Small,h as Span,St as Strong,x as Style,Mt as Sub,T as SubmitButton,ht as Summary,Pt as Sup,j as Table,Z as Tbody,J as Td,v as Text,et as Textarea,_ as Tfoot,G as Th,X as Thead,At as Time,l as Title,z as Tr,Ot as U,f as Ul,Ct as Var,W as Video,Nt as Wbr};
1
+ import{Div as g}from"@base-framework/atoms";import{Data as y,Jot as x}from"@base-framework/base";import{Builder as u,Html as m}from"@base-framework/base";var a=class{static first(t){return this.get(t,0)}static last(t){let e=t.childNodes.length-1;return this.get(t,e)}static get(t,e){return t?.childNodes[e]??null}static next(t){return t?.nextSibling??null}static previous(t){return t?.previousSibling??null}static index(t){return t?.parentNode?.children.indexOf(t)??-1}static getPreviousIndex(t){let e=this.index(t);return e>0?e-1:0}static replace(t,e,r){if(!e)return;let i=this.getPreviousIndex(e);this.remove(e);let n=u.build(t,null,r),c=e.parentNode;c.insertBefore(n,c.childNodes[i])}static remove(t){t&&m.removeChild(t)}static append(t,e,r){!t||u.build(t,e,r)}static prepend(t,e,r){if(!t)return;let i=u.build(t,null,r);r.insertBefore(i,e.firstChild)}};var f=(s,t,e)=>({index:s,item:t,status:e}),l=class{static diff(t,e,r){let i=this.arrayToMap(t,r),n=[],c=[];return e.forEach((o,d)=>{let h=o[r];if(!i.has(h)){n.push(f(d,o,"added"));return}let{item:p}=i.get(h);if(!this.deepEqual(p,o)){n.push(f(d,o,"updated"));return}n.push(f(d,o,"unchanged")),i.delete(h)}),i.forEach(({item:o})=>{c.push(o)}),{changes:n,deletedItems:c}}static arrayToMap(t,e){let r=new Map;return t.forEach((i,n)=>{r.set(i[e],{item:i,index:n})}),r}static deepEqual(t,e){if(t===e)return!0;if(typeof t!="object"||t===null||typeof e!="object"||e===null)return!1;let r=Object.keys(t),i=Object.keys(e);if(r.length!==i.length)return!1;for(let n of r)if(!i.includes(n)||!this.deepEqual(t[n],e[n]))return!1;return!0}};var v=x({setData(){return new y({items:[]})},render(){let s=this.row.bind(this);return g({class:`list ${this.class||""}`,for:["items",s]})},row(s){return typeof this.rowItem!="function"?null:this.rowItem(s)},delete(s){let t=this.findIndexByKey(s);if(t===-1)return;this.data.delete(`items[${t}]`);let e=a.get(this.panel,t);a.remove(e)},replace(s){let t=s.item;if(s.status==="added"){this.append(t);return}let e=t[this.key],r=this.findIndexByKey(e);this.data.set(`items[${r}]`,t);let i=a.get(this.panel,r),n=this.row(t,r);a.replace(i,n)},remove(s){s.forEach(t=>{this.delete(t[this.key])})},append(s){Array.isArray(s)||(s=[s]);let t=[],e=this.data.items.length-1;s.forEach(r=>{t.push(this.row(r)),this.data.set(`items[${++e}]`,r)}),a.append(t,this.panel,this)},mingle(s,t=!1){let e=this.data.items,r=l.diff(e,s,this.key);t&&r.deletedItems.length>0&&this.remove(r.deletedItems),r.changes.forEach(i=>{this.replace(i)})},prepend(s){Array.isArray(s)||(s=[s]);let t=[],e=this.data.items,r=e.length-1;s.reverse().forEach(i=>{r++,t.push(this.row(i)),e.unshift(i)}),a.prepend(t,this.panel,this)},findIndexByKey(s){return this.data.items.findIndex(e=>e[this.key]===s)}});export{v as List};
2
2
  //# sourceMappingURL=organisms.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
- "sources": ["../src/organisms.js"],
4
- "sourcesContent": ["import { Atom } from '@base-framework/base';\r\n\r\n/**\r\n * Creates a generic HTML tag.\r\n *\r\n * @param {object} props - Properties for the HTML element.\r\n * @param {array} children - Children elements of the HTML element.\r\n * @return {object} - Returns an object representing the HTML element.\r\n */\r\nconst Tag = (props, children) => {\r\n return { ...props, children };\r\n};\r\n\r\n/**\r\n * Creates a Doctype tag.\r\n *\r\n * @param {object} props - Properties for the HTML element.\r\n * @return {object} - Returns an object representing the HTML element.\r\n */\r\nexport const Doctype = (props) => ({ ...props, tag: 'DOCTYPE' });\r\n\r\n/**\r\n * Creates an HTML tag.\r\n *\r\n * @param {object} props - Properties for the HTML element.\r\n * @param {array} children - Children elements of the HTML element.\r\n * @return {object} - Returns an object representing the HTML element.\r\n */\r\nexport const Html = Atom((props, children) => Tag({ ...props, tag: 'html' }, children));\r\n\r\n/**\r\n * Creates a script tag.\r\n *\r\n * @param {object} props - Properties for the HTML element.\r\n * @param {array} children - Children elements of the HTML element.\r\n * @return {object} - Returns an object representing the HTML element.\r\n */\r\nexport const Script = Atom((props, children) => Tag({ ...props, tag: 'script' }, children));\r\n\r\n/**\r\n * Creates a style tag.\r\n *\r\n * @param {object} props - Properties for the HTML element.\r\n * @param {array} children - Children elements of the HTML element.\r\n * @return {object} - Returns an object representing the HTML element.\r\n */\r\nexport const Style = Atom((props, children) => Tag({ ...props, tag: 'style' }, children));\r\n\r\n/**\r\n * Creates a head tag.\r\n *\r\n * @param {object} props - Properties for the head element.\r\n * @param {array} children - Children elements of the head.\r\n * @return {object} - Returns an object representing the head element.\r\n */\r\nexport const Head = Atom((props, children) => Tag({ ...props, tag: 'head' }, children));\r\n\r\n/**\r\n * Creates a title tag.\r\n *\r\n * @param {object} props - Properties for the title element.\r\n */\r\nexport const Title = (props) =>\r\n{\r\n return { ...props };\r\n};\r\n\r\n/**\r\n * Creates a meta tag.\r\n *\r\n * @param {object} props - Properties for the meta element.\r\n * @return {object} - Returns an object representing the meta element.\r\n */\r\nexport const Meta = (props) => ({ ...props, tag: 'meta' });\r\n\r\n/**\r\n * Creates a body tag.\r\n *\r\n * @param {object} props - Properties for the body element.\r\n * @param {array} children - Children elements of the body.\r\n * @return {object} - Returns an object representing the body element.\r\n */\r\nexport const Body = Atom((props, children) => Tag({ ...props, tag: 'body' }, children));\r\n\r\n/**\r\n * Creates a div element.\r\n *\r\n * @param {object} props - Properties for the div element.\r\n * @param {array} children - Children elements of the div.\r\n * @return {object} - Returns an object representing the div element.\r\n */\r\nexport const Div = Atom((props, children) => Tag(props, children));\r\n\r\n/**\r\n * Creates a dialog element.\r\n *\r\n * @param {object} props - Properties for the div element.\r\n * @param {array} children - Children elements of the div.\r\n * @return {object} - Returns an object representing the dialog element.\r\n */\r\nexport const Dialog = Atom((props, children) => Tag({ ...props, tag: 'dialog' }, children));\r\n\r\n/**\r\n * Creates a span element.\r\n *\r\n * @param {object} props - Properties for the span element.\r\n * @param {array} children - Children elements of the span.\r\n * @return {object} - Returns an object representing the span element.\r\n */\r\nexport const Span = Atom((props, children) => Tag({ ...props, tag: 'span' }, children));\r\n\r\n/**\r\n * Creates a paragraph (p) element.\r\n *\r\n * @param {object} props - Properties for the paragraph element.\r\n * @param {array} children - Children elements of the paragraph.\r\n * @return {object} - Returns an object representing the paragraph element.\r\n */\r\nexport const P = Atom((props, children) => Tag({ ...props, tag: 'p' }, children));\r\n\r\n/**\r\n * Creates an anchor (a) element.\r\n *\r\n * @param {object} props - Properties for the anchor element.\r\n * @param {array} children - Children elements of the anchor.\r\n * @return {object} - Returns an object representing the anchor element.\r\n */\r\nexport const A = Atom((props, children) => Tag({ ...props, tag: 'a' }, children));\r\n\r\n/**\r\n * Creates a button element.\r\n */\r\nexport const Button = Atom((props, children) => Tag({ ...props, tag: 'button' }, children));\r\n\r\n/**\r\n * Creates a submit button element.\r\n */\r\nexport const SubmitButton = Atom((props, children) => Button({ ...props, type: 'submit' }, children));\r\n\r\n/**\r\n * Creates an unordered list (ul) element.\r\n */\r\nexport const Ul = Atom((props, children) => Tag({ ...props, tag: 'ul' }, children));\r\n\r\n/**\r\n * Creates a list item (li) element.\r\n */\r\nexport const Li = Atom((props, children) => Tag({ ...props, tag: 'li' }, children));\r\n\r\n/**\r\n * Creates an image (img) element.\r\n */\r\nexport const Img = Atom((props) => Tag({ ...props, tag: 'img' }, null));\r\n\r\n/**\r\n * Create a br element.\r\n *\r\n * @param {object} props - Properties for the br element.\r\n * @return {object} - Returns an object representing the br element.\r\n */\r\nexport const Br = Atom((props) => Tag({ ...props, tag: 'br' }, null));\r\n\r\n/**\r\n * Creates a horizontal rule (hr) element.\r\n */\r\nexport const Hr = Atom((props) => Tag({ ...props, tag: 'hr' }, null));\r\n\r\n/**\r\n * Creates a text (text) element.\r\n */\r\nexport const Text = Atom((props, children) => Tag({ ...props, tag: 'text' }, children));\r\n\r\n/**\r\n * Creates a header 1 (h1) element.\r\n */\r\nexport const H1 = Atom((props, children) => Tag({ ...props, tag: 'h1' }, children));\r\n\r\n/**\r\n * Creates a header 2 (h2) element.\r\n */\r\nexport const H2 = Atom((props, children) => Tag({ ...props, tag: 'h2' }, children));\r\n\r\n/**\r\n * Creates a header 3 (h3) element.\r\n */\r\nexport const H3 = Atom((props, children) => Tag({ ...props, tag: 'h3' }, children));\r\n\r\n/**\r\n * Creates a header 4 (h4) element.\r\n */\r\nexport const H4 = Atom((props, children) => Tag({ ...props, tag: 'h4' }, children));\r\n\r\n/**\r\n * Creates a header 5 (h5) element.\r\n */\r\nexport const H5 = Atom((props, children) => Tag({ ...props, tag: 'h5' }, children));\r\n\r\n/**\r\n * Creates a header 6 (h6) element.\r\n */\r\nexport const H6 = Atom((props, children) => Tag({ ...props, tag: 'h6' }, children));\r\n\r\n/**\r\n * Creates an input element.\r\n */\r\nexport const Input = Atom((props) => Tag({ ...props, tag: 'input' }, null));\r\n\r\n/**\r\n * Creates a label element.\r\n */\r\nexport const Label = Atom((props, children) => Tag({ ...props, tag: 'label' }, children));\r\n\r\n/**\r\n * Creates a checkbox input element.\r\n *\r\n * @param {object} props - Properties for the checkbox input element.\r\n * @return {object} - Returns an object representing the checkbox input element.\r\n */\r\nexport const Checkbox = Atom((props) => Input({ ...props, type: 'checkbox' }));\r\n\r\n/**\r\n * Creates a section element.\r\n */\r\nexport const Section = Atom((props, children) => Tag({ ...props, tag: 'section' }, children));\r\n\r\n/**\r\n * Creates an article element.\r\n */\r\nexport const Article = Atom((props, children) => Tag({ ...props, tag: 'article' }, children));\r\n\r\n/**\r\n * Creates a header (header) element.\r\n */\r\nexport const Header = Atom((props, children) => Tag({ ...props, tag: 'header' }, children));\r\n\r\n/**\r\n * Creates a footer element.\r\n */\r\nexport const Footer = Atom((props, children) => Tag({ ...props, tag: 'footer' }, children));\r\n\r\n/**\r\n * Creates a nav element.\r\n */\r\nexport const Nav = Atom((props, children) => Tag({ ...props, tag: 'nav' }, children));\r\n\r\n/**\r\n * Creates an aside element.\r\n */\r\nexport const Aside = Atom((props, children) => Tag({ ...props, tag: 'aside' }, children));\r\n\r\n/**\r\n * Creates a figure element.\r\n */\r\nexport const Figure = Atom((props, children) => Tag({ ...props, tag: 'figure' }, children));\r\n\r\n/**\r\n * Creates a figcaption element.\r\n */\r\nexport const Figcaption = Atom((props, children) => Tag({ ...props, tag: 'figcaption' }, children));\r\n\r\n/**\r\n * Creates a main element.\r\n */\r\nexport const Main = Atom((props, children) => Tag({ ...props, tag: 'main' }, children));\r\n\r\n/**\r\n * Creates a video element.\r\n */\r\nexport const Video = Atom((props, children) => Tag({ ...props, tag: 'video' }, children));\r\n\r\n/**\r\n * Creates an audio element.\r\n */\r\nexport const Audio = Atom((props, children) => Tag({ ...props, tag: 'audio' }, children));\r\n\r\n/**\r\n * Creates a table element.\r\n */\r\nexport const Table = Atom((props, children) => Tag({ ...props, tag: 'table' }, children));\r\n\r\n/**\r\n * Creates a table row (tr) element.\r\n */\r\nexport const Tr = Atom((props, children) => Tag({ ...props, tag: 'tr' }, children));\r\n\r\n/**\r\n * Creates a table header (th) element.\r\n */\r\nexport const Th = Atom((props, children) => Tag({ ...props, tag: 'th' }, children));\r\n\r\n/**\r\n * Creates a table data (td) element.\r\n */\r\nexport const Td = Atom((props, children) => Tag({ ...props, tag: 'td' }, children));\r\n\r\n/**\r\n * Creates a table header group (thead) element.\r\n */\r\nexport const Thead = Atom((props, children) => Tag({ ...props, tag: 'thead' }, children));\r\n\r\n/**\r\n * Creates a table body (tbody) element.\r\n */\r\nexport const Tbody = Atom((props, children) => Tag({ ...props, tag: 'tbody' }, children));\r\n\r\n/**\r\n * Creates a table footer (tfoot) element.\r\n */\r\nexport const Tfoot = Atom((props, children) => Tag({ ...props, tag: 'tfoot' }, children));\r\n\r\n/**\r\n * Creates a form element.\r\n */\r\nexport const Form = Atom((props, children) => Tag({ ...props, tag: 'form' }, children));\r\n\r\n/**\r\n * Creates a select element.\r\n */\r\nexport const Select = Atom((props, children) => Tag({ ...props, tag: 'select' }, children));\r\n\r\n/**\r\n * Creates an option element for a select tag.\r\n */\r\nexport const Option = Atom((props, children) => Tag({ ...props, tag: 'option' }, children));\r\n\r\n/**\r\n * Creates a textarea element.\r\n */\r\nexport const Textarea = Atom((props, children) => Tag({ ...props, tag: 'textarea' }, children));\r\n\r\n/**\r\n * Creates a canvas element.\r\n */\r\nexport const Canvas = Atom((props, children) => Tag({ ...props, tag: 'canvas' }, children));\r\n\r\n/**\r\n * Creates a progress element.\r\n */\r\nexport const Progress = Atom((props, children) => Tag({ ...props, tag: 'progress' }, children));\r\n\r\n/**\r\n * Creates a blockquote element.\r\n */\r\nexport const Blockquote = Atom((props, children) => Tag({ ...props, tag: 'blockquote' }, children));\r\n\r\n/**\r\n * Creates a preformatted text (pre) element.\r\n */\r\nexport const Pre = Atom((props, children) => Tag({ ...props, tag: 'pre' }, children));\r\n\r\n/**\r\n * Creates a code element.\r\n */\r\nexport const Code = Atom((props, children) => Tag({ ...props, tag: 'code' }, children));\r\n\r\n/**\r\n * Creates an ordered list (ol) element.\r\n */\r\nexport const Ol = Atom((props, children) => Tag({ ...props, tag: 'ol' }, children));\r\n\r\n/**\r\n * Creates a definition list (dl) element.\r\n */\r\nexport const Dl = Atom((props, children) => Tag({ ...props, tag: 'dl' }, children));\r\n\r\n/**\r\n * Creates a definition term (dt) element.\r\n */\r\nexport const Dt = Atom((props, children) => Tag({ ...props, tag: 'dt' }, children));\r\n\r\n/**\r\n * Creates a definition description (dd) element.\r\n */\r\nexport const Dd = Atom((props, children) => Tag({ ...props, tag: 'dd' }, children));\r\n\r\n/**\r\n * Creates a fieldset element.\r\n */\r\nexport const Fieldset = Atom((props, children) => Tag({ ...props, tag: 'fieldset' }, children));\r\n\r\n/**\r\n * Creates a legend element.\r\n */\r\nexport const Legend = Atom((props, children) => Tag({ ...props, tag: 'legend' }, children));\r\n\r\n/**\r\n * Creates a meter element.\r\n */\r\nexport const Meter = Atom((props, children) => Tag({ ...props, tag: 'meter' }, children));\r\n\r\n/**\r\n * Creates an iframe element.\r\n */\r\nexport const Iframe = Atom((props, children) => Tag({ ...props, tag: 'iframe' }, children));\r\n\r\n/**\r\n * Creates a details element.\r\n */\r\nexport const Details = Atom((props, children) => Tag({ ...props, tag: 'details' }, children));\r\n\r\n/**\r\n * Creates a summary element.\r\n */\r\nexport const Summary = Atom((props, children) => Tag({ ...props, tag: 'summary' }, children));\r\n\r\n/**\r\n * Creates an em element.\r\n */\r\nexport const Em = Atom((props, children) => Tag({ ...props, tag: 'em' }, children));\r\n\r\n/**\r\n * Creates a strong element.\r\n */\r\nexport const Strong = Atom((props, children) => Tag({ ...props, tag: 'strong' }, children));\r\n\r\n/**\r\n * Creates a small element.\r\n */\r\nexport const Small = Atom((props, children) => Tag({ ...props, tag: 'small' }, children));\r\n\r\n/**\r\n * Creates a s element (strikethrough).\r\n */\r\nexport const S = Atom((props, children) => Tag({ ...props, tag: 's' }, children));\r\n\r\n/**\r\n * Creates a cite element.\r\n */\r\nexport const Cite = Atom((props, children) => Tag({ ...props, tag: 'cite' }, children));\r\n\r\n/**\r\n * Creates a q element (inline quotation).\r\n */\r\nexport const Q = Atom((props, children) => Tag({ ...props, tag: 'q' }, children));\r\n\r\n/**\r\n * Creates a dfn element (definition element).\r\n */\r\nexport const Dfn = Atom((props, children) => Tag({ ...props, tag: 'dfn' }, children));\r\n\r\n/**\r\n * Creates an abbr element (abbreviation).\r\n */\r\nexport const Abbr = Atom((props, children) => Tag({ ...props, tag: 'abbr' }, children));\r\n\r\n/**\r\n * Creates a data element.\r\n */\r\nexport const Data = Atom((props, children) => Tag({ ...props, tag: 'data' }, children));\r\n\r\n/**\r\n * Creates a time element.\r\n */\r\nexport const Time = Atom((props, children) => Tag({ ...props, tag: 'time' }, children));\r\n\r\n/**\r\n * Creates a var element (variable).\r\n */\r\nexport const Var = Atom((props, children) => Tag({ ...props, tag: 'var' }, children));\r\n\r\n/**\r\n * Creates a samp element (sample output).\r\n */\r\nexport const Samp = Atom((props, children) => Tag({ ...props, tag: 'samp' }, children));\r\n\r\n/**\r\n * Creates a kbd element (keyboard input).\r\n */\r\nexport const Kbd = Atom((props, children) => Tag({ ...props, tag: 'kbd' }, children));\r\n\r\n/**\r\n * Creates a sub element (subscript).\r\n */\r\nexport const Sub = Atom((props, children) => Tag({ ...props, tag: 'sub' }, children));\r\n\r\n/**\r\n * Creates a sup element (superscript).\r\n */\r\nexport const Sup = Atom((props, children) => Tag({ ...props, tag: 'sup' }, children));\r\n\r\n/**\r\n * Creates an i element (italic).\r\n */\r\nexport const I = Atom((props, children) => Tag({ ...props, tag: 'i' }, children));\r\n\r\n/**\r\n * Creates a b element (bold).\r\n */\r\nexport const B = Atom((props, children) => Tag({ ...props, tag: 'b' }, children));\r\n\r\n/**\r\n * Creates a u element (underline).\r\n */\r\nexport const U = Atom((props, children) => Tag({ ...props, tag: 'u' }, children));\r\n\r\n/**\r\n * Creates a mark element.\r\n */\r\nexport const Mark = Atom((props, children) => Tag({ ...props, tag: 'mark' }, children));\r\n\r\n/**\r\n * Creates a ruby element (for East Asian typography).\r\n */\r\nexport const Ruby = Atom((props, children) => Tag({ ...props, tag: 'ruby' }, children));\r\n\r\n/**\r\n * Creates an rt element (explanation/pronunciation of characters in East Asian typography).\r\n */\r\nexport const Rt = Atom((props, children) => Tag({ ...props, tag: 'rt' }, children));\r\n\r\n/**\r\n * Creates an rp element (for East Asian fallback parenthesis).\r\n */\r\nexport const Rp = Atom((props, children) => Tag({ ...props, tag: 'rp' }, children));\r\n\r\n/**\r\n * Creates a bdi element (Bi-Directional Isolation).\r\n */\r\nexport const Bdi = Atom((props, children) => Tag({ ...props, tag: 'bdi' }, children));\r\n\r\n/**\r\n * Creates a bdo element (Bi-Directional Override).\r\n */\r\nexport const Bdo = Atom((props, children) => Tag({ ...props, tag: 'bdo' }, children));\r\n\r\n/**\r\n * Creates a wbr element (Word Break Opportunity).\r\n */\r\nexport const Wbr = Atom((props) => Tag({ ...props, tag: 'wbr' }, null));"],
5
- "mappings": "AAAA,OAAS,QAAAA,MAAY,uBASrB,IAAMC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AAO,EAAGC,CAAQ,CAAC,EAKzEwF,GAAK3F,EAAK,CAACE,EAAOC,IAAaF,EAAI,CAAE,GAAGC,EAAO,IAAK,IAAK,EAAGC,CAAQ,CAAC,EAKrEyF,GAAK5F,EAAK,CAACE,EAAOC,IAAaF,EAAI,CAAE,GAAGC,EAAO,IAAK,IAAK,EAAGC,CAAQ,CAAC,EAKrE0F,GAAM7F,EAAK,CAACE,EAAOC,IAAaF,EAAI,CAAE,GAAGC,EAAO,IAAK,KAAM,EAAGC,CAAQ,CAAC,EAKvE2F,GAAM9F,EAAK,CAACE,EAAOC,IAAaF,EAAI,CAAE,GAAGC,EAAO,IAAK,KAAM,EAAGC,CAAQ,CAAC,EAKvE4F,GAAM/F,EAAME,GAAUD,EAAI,CAAE,GAAGC,EAAO,IAAK,KAAM,EAAG,IAAI,CAAC",
6
- "names": ["Atom", "Tag", "props", "children", "Doctype", "Html", "Script", "Style", "Head", "Title", "Meta", "Body", "Div", "Dialog", "Span", "P", "A", "Button", "SubmitButton", "Ul", "Li", "Img", "Br", "Hr", "Text", "H1", "H2", "H3", "H4", "H5", "H6", "Input", "Label", "Checkbox", "Section", "Article", "Header", "Footer", "Nav", "Aside", "Figure", "Figcaption", "Main", "Video", "Audio", "Table", "Tr", "Th", "Td", "Thead", "Tbody", "Tfoot", "Form", "Select", "Option", "Textarea", "Canvas", "Progress", "Blockquote", "Pre", "Code", "Ol", "Dl", "Dt", "Dd", "Fieldset", "Legend", "Meter", "Iframe", "Details", "Summary", "Em", "Strong", "Small", "S", "Cite", "Q", "Dfn", "Abbr", "Data", "Time", "Var", "Samp", "Kbd", "Sub", "Sup", "I", "B", "U", "Mark", "Ruby", "Rt", "Rp", "Bdi", "Bdo", "Wbr"]
3
+ "sources": ["../src/lists/list.js", "../src/utils/child-helper.js", "../src/utils/data-helper.js"],
4
+ "sourcesContent": ["import { Div } from '@base-framework/atoms';\r\nimport { Data, Jot } from '@base-framework/base';\r\nimport { ChildHelper } from 'src/utils/child-helper.js';\r\nimport { DataHelper } from 'src/utils/data-helper.js';\r\n\r\n/**\r\n * List\r\n *\r\n * This will create a list component.\r\n *\r\n * @class\r\n */\r\nexport const List = Jot(\r\n{\r\n /**\r\n * This will set the default data.\r\n *\r\n * @returns {object}\r\n */\r\n\tsetData()\r\n {\r\n return new Data({ items: [] })\r\n },\r\n\r\n /**\r\n * This will render the list.\r\n *\r\n * @returns {object}\r\n */\r\n\trender()\r\n {\r\n // @ts-ignore\r\n const rowCallBack = this.row.bind(this);\r\n\r\n return Div({\r\n // @ts-ignore\r\n class: `list ${this.class || ''}`,\r\n for: ['items', rowCallBack]\r\n });\r\n },\r\n\r\n /**\r\n * This will create a row for each item.\r\n *\r\n * @param {*} item\r\n * @returns {object|null}\r\n */\r\n row(item)\r\n {\r\n // @ts-ignore\r\n if (typeof this.rowItem !== 'function')\r\n {\r\n return null;\r\n }\r\n\r\n // @ts-ignore\r\n return this.rowItem(item);\r\n },\r\n\r\n /**\r\n * This will delete an item from the list.\r\n *\r\n * @public\r\n * @param {*} keyValue\r\n * @returns {void}\r\n */\r\n delete(keyValue)\r\n {\r\n // @ts-ignore\r\n const index = this.findIndexByKey(keyValue);\r\n if (index === -1)\r\n {\r\n return;\r\n }\r\n\r\n // @ts-ignore\r\n this.data.delete(`items[${index}]`);\r\n // @ts-ignore\r\n const rowElement = ChildHelper.get(this.panel, index);\r\n ChildHelper.remove(rowElement);\r\n },\r\n\r\n /**\r\n * This will replace an item in the list.\r\n *\r\n * @protected\r\n * @param {object} row\r\n * @returns {void}\r\n */\r\n replace(row)\r\n {\r\n // @ts-ignore\r\n const item = row.item;\r\n if (row.status === 'added')\r\n {\r\n // @ts-ignore\r\n this.append(item);\r\n return;\r\n }\r\n\r\n // @ts-ignore\r\n const keyValue = item[this.key];\r\n // @ts-ignore\r\n const index = this.findIndexByKey(keyValue);\r\n // @ts-ignore\r\n this.data.set(`items[${index}]`, item);\r\n // @ts-ignore\r\n const oldRow = ChildHelper.get(this.panel, index);\r\n // @ts-ignore\r\n const newRow = this.row(item, index);\r\n ChildHelper.replace(oldRow, newRow);\r\n },\r\n\r\n /**\r\n * This will remove items from the list.\r\n *\r\n * @public\r\n * @param {array} items\r\n * @returns {void}\r\n */\r\n remove(items)\r\n {\r\n /**\r\n * This will get the deleted rows.\r\n */\r\n items.forEach((item) =>\r\n {\r\n // @ts-ignore\r\n this.delete(item[this.key]);\r\n });\r\n },\r\n\r\n /**\r\n * This will append items to the list.\r\n *\r\n * @public\r\n * @param {array|object} items\r\n * @returns {void}\r\n */\r\n append(items)\r\n {\r\n if (!Array.isArray(items))\r\n {\r\n items = [items];\r\n }\r\n\r\n /**\r\n * This will get all the new rows to be batched later.\r\n */\r\n const rows = [];\r\n // @ts-ignore\r\n let lastIndex = this.data.items.length - 1;\r\n items.forEach((item) =>\r\n {\r\n /**\r\n * This will build the new rows that will be appended.\r\n */\r\n // @ts-ignore\r\n rows.push(this.row(item));\r\n\r\n /**\r\n * This will silently add the new rows without re-rendering the entire list.\r\n */\r\n // @ts-ignore\r\n this.data.set(`items[${++lastIndex}]`, item);\r\n });\r\n\r\n // This will batch push all the rows.\r\n // @ts-ignore\r\n ChildHelper.append(rows, this.panel, this);\r\n },\r\n\r\n /**\r\n * This will mingle the new items with the old items.\r\n *\r\n * @public\r\n * @param {Array<Object>} newItems\r\n * @param {boolean} withDelete\r\n * @returns {void}\r\n */\r\n mingle(newItems, withDelete = false)\r\n {\r\n // @ts-ignore\r\n const oldItems = this.data.items;\r\n\r\n /**\r\n * This will diff the old and new items to determine what has\r\n * been added, updated, or deleted.\r\n */\r\n // @ts-ignore\r\n const changes = DataHelper.diff(oldItems, newItems, this.key);\r\n\r\n /**\r\n * We want to delete the items before adding and updating the\r\n * new items.\r\n */\r\n if (withDelete && changes.deletedItems.length > 0)\r\n {\r\n // @ts-ignore\r\n this.remove(changes.deletedItems);\r\n }\r\n\r\n /**\r\n * This will add or update the new rows.\r\n */\r\n changes.changes.forEach((row) =>\r\n {\r\n // @ts-ignore\r\n this.replace(row);\r\n });\r\n },\r\n\r\n /**\r\n * This will prepend items to the list.\r\n *\r\n * @public\r\n * @param {array|object} items\r\n * @returns {void}\r\n */\r\n prepend(items)\r\n {\r\n if (!Array.isArray(items))\r\n {\r\n items = [items];\r\n }\r\n\r\n /**\r\n * This will get all the new rows to be batched later.\r\n */\r\n const rows = [];\r\n // @ts-ignore\r\n const rowItems = this.data.items;\r\n let lastIndex = rowItems.length - 1;\r\n items.reverse().forEach((item) =>\r\n {\r\n lastIndex++;\r\n\r\n /**\r\n * This will build the new rows that will be appended.\r\n */\r\n // @ts-ignore\r\n rows.push(this.row(item));\r\n\r\n /**\r\n * This will silently add the new rows without re-rendering the entire list.\r\n */\r\n rowItems.unshift(item);\r\n });\r\n\r\n // @ts-ignore\r\n ChildHelper.prepend(rows, this.panel, this);\r\n },\r\n\r\n /**\r\n * Finds the index of an item in the data array by its key.\r\n *\r\n * @private\r\n * @param {*} keyValue\r\n * @returns {number} Index of the item, or -1 if not found\r\n */\r\n findIndexByKey(keyValue)\r\n {\r\n //@ts-ignore\r\n const items = this.data.items;\r\n //@ts-ignore\r\n return items.findIndex((item) => item[this.key] === keyValue);\r\n }\r\n});", "import { Builder, Html } from \"@base-framework/base\";\r\n\r\n/**\r\n * ChildHelper\r\n *\r\n * This class will help with getting children of a node.\r\n *\r\n * @class\r\n */\r\nexport class ChildHelper\r\n{\r\n /**\r\n * This will get the first child.\r\n *\r\n * @param {object} parent\r\n * @returns {object|null}\r\n */\r\n\tstatic first(parent)\r\n {\r\n return this.get(parent, 0);\r\n }\r\n\r\n /**\r\n * This will get the last child.\r\n *\r\n * @param {object} parent\r\n * @returns {object|null}\r\n */\r\n static last(parent)\r\n {\r\n const index = parent.childNodes.length - 1;\r\n return this.get(parent, index);\r\n }\r\n\r\n /**\r\n * This will get the child at the specified index.\r\n *\r\n * @param {object} parent\r\n * @param {number} index\r\n * @returns {object|null}\r\n */\r\n static get(parent, index)\r\n {\r\n return parent?.childNodes[index] ?? null;\r\n }\r\n\r\n /**\r\n * This will get the parent of the node.\r\n *\r\n * @param {object} node\r\n * @returns {object|null}\r\n */\r\n static next(node)\r\n {\r\n return node?.nextSibling ?? null;\r\n }\r\n\r\n /**\r\n * This will get the previous sibling.\r\n *\r\n * @param {object} node\r\n * @returns {object|null}\r\n */\r\n static previous(node)\r\n {\r\n return node?.previousSibling ?? null;\r\n }\r\n\r\n /**\r\n * This will get the index of the node.\r\n *\r\n * @param {object} node\r\n * @returns {number}\r\n */\r\n static index(node)\r\n {\r\n return node?.parentNode?.children.indexOf(node) ?? -1;\r\n }\r\n\r\n /**\r\n * This will get the previous index of the node.\r\n *\r\n * @param {object} node\r\n * @returns {number}\r\n */\r\n static getPreviousIndex(node)\r\n {\r\n let index = this.index(node);\r\n return (index > 0)? index - 1 : 0;\r\n }\r\n\r\n /**\r\n * This will replace a child layout.\r\n *\r\n * @param {object} layout\r\n * @param {object} oldChild\r\n * @param {object} parent\r\n * @returns {void}\r\n */\r\n static replace(layout, oldChild, parent)\r\n {\r\n if (!oldChild)\r\n {\r\n return;\r\n }\r\n\r\n // get child index from parent\r\n const index = this.getPreviousIndex(oldChild);\r\n this.remove(oldChild);\r\n\r\n const frag = Builder.build(layout, null, parent);\r\n\r\n // append to parent at index\r\n const container = oldChild.parentNode;\r\n container.insertBefore(frag, container.childNodes[index]);\r\n }\r\n\r\n /**\r\n * This will remove a child.\r\n *\r\n * @param {object} node\r\n * @returns {void}\r\n */\r\n static remove(node)\r\n {\r\n if (node)\r\n {\r\n Html.removeChild(node);\r\n }\r\n }\r\n\r\n /**\r\n * This will append a child layout.\r\n *\r\n * @param {object} childrenLayout\r\n * @param {object} container\r\n * @param {object} parent\r\n * @returns {void}\r\n */\r\n static append(childrenLayout, container, parent)\r\n {\r\n if (!childrenLayout)\r\n {\r\n return;\r\n }\r\n\r\n Builder.build(childrenLayout, container, parent);\r\n }\r\n\r\n /**\r\n * This will prepend a child layout.\r\n *\r\n * @param {object} childrenLayout\r\n * @param {object} container\r\n * @param {object} parent\r\n * @returns {void}\r\n */\r\n static prepend(childrenLayout, container, parent)\r\n {\r\n if (!childrenLayout)\r\n {\r\n return;\r\n }\r\n\r\n const frag = Builder.build(childrenLayout, null, parent);\r\n parent.insertBefore(frag, container.firstChild);\r\n }\r\n}", "/**\r\n * This will create a new item.\r\n *\r\n * @param {number} index\r\n * @param {*} item\r\n * @param {string} status\r\n * @returns {object}\r\n */\r\nconst Item = (index, item, status) =>\r\n{\r\n\treturn {\r\n\t\tindex,\r\n\t\titem,\r\n\t\tstatus\r\n\t};\r\n};\r\n\r\n/**\r\n * DataHelper\r\n *\r\n * This will help with data manipulation.\r\n *\r\n * @class\r\n */\r\nexport class DataHelper\r\n{\r\n\t/**\r\n * Compares two arrays of objects and returns the differences based on a specified key.\r\n *\r\n * @param {Array<Object>} oldArray - The original array of objects.\r\n * @param {Array<Object>} newArray - The updated array of objects.\r\n * @param {string} key - The key used to compare objects in the arrays.\r\n * @returns {Object} An object containing arrays of added, updated, and deleted items.\r\n */\r\n\tstatic diff(oldArray, newArray, key)\r\n\t{\r\n\t\tconst oldItemsMap = this.arrayToMap(oldArray, key);\r\n\t\tconst changes = [];\r\n\t\tconst deletedItems = [];\r\n\r\n\t\t// Process new array to determine status of each item\r\n\t\tnewArray.forEach((newItem, newIndex) =>\r\n\t\t{\r\n\t\t\tconst keyValue = newItem[key];\r\n\t\t\tif (!oldItemsMap.has(keyValue))\r\n\t\t\t{\r\n\t\t\t\t// Item is added\r\n\t\t\t\tchanges.push(Item(newIndex, newItem, 'added'));\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\r\n\t\t\tconst { item: oldItem } = oldItemsMap.get(keyValue);\r\n\t\t\tif (!this.deepEqual(oldItem, newItem))\r\n\t\t\t{\r\n\t\t\t\t// Item is updated\r\n\t\t\t\tchanges.push(Item(newIndex, newItem, 'updated'));\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\r\n\t\t\t// Item is unchanged\r\n\t\t\tchanges.push(Item(newIndex, newItem, 'unchanged'));\r\n\r\n\t\t\t// Remove from oldItemsMap to identify deletions later\r\n\t\t\toldItemsMap.delete(keyValue);\r\n\t\t});\r\n\r\n\t\t// Remaining items in oldItemsMap are deleted\r\n\t\toldItemsMap.forEach(({ item: oldItem }) =>\r\n\t\t{\r\n\t\t\tdeletedItems.push(oldItem);\r\n\t\t});\r\n\r\n\t\treturn {\r\n\t\t\tchanges,\r\n\t\t\tdeletedItems\r\n\t\t};\r\n\t}\r\n\r\n\t/**\r\n\t * Converts an array of objects into a Map keyed by the specified property.\r\n * Each value in the Map is an object containing the item and its index in the array.\r\n\t *\r\n\t * @param {Array<Object>} array - The array to convert.\r\n\t * @param {string} key - The key used to map the objects.\r\n\t * @returns {Map} A Map with keys as specified property and values as objects.\r\n\t * @private\r\n\t */\r\n\tstatic arrayToMap(array, key)\r\n\t{\r\n\t\tconst map = new Map();\r\n\t\tarray.forEach((item, index) =>\r\n\t\t{\r\n\t\t\tmap.set(item[key], { item, index });\r\n\t\t});\r\n\t\treturn map;\r\n\t}\r\n\r\n\t/**\r\n\t * Performs a deep comparison between two objects.\r\n\t *\r\n\t * @param {Object} obj1 - The first object to compare.\r\n\t * @param {Object} obj2 - The second object to compare.\r\n\t * @returns {boolean} True if objects are equal, else false.\r\n\t * @private\r\n\t */\r\n\tstatic deepEqual(obj1, obj2)\r\n\t{\r\n\t\tif (obj1 === obj2) return true;\r\n\r\n\t\tif (\r\n\t\t\ttypeof obj1 !== 'object' ||\r\n\t\t\tobj1 === null ||\r\n\t\t\ttypeof obj2 !== 'object' ||\r\n\t\t\tobj2 === null\r\n\t\t)\r\n\t\t{\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\tconst keys1 = Object.keys(obj1);\r\n\t\tconst keys2 = Object.keys(obj2);\r\n\r\n\t\t// Different number of properties\r\n\t\tif (keys1.length !== keys2.length)\r\n\t\t{\r\n\t\t\treturn false\r\n\t\t}\r\n\r\n\t\tfor (const key of keys1)\r\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CAAQ,CAChE,CACJ,CAAC",
6
+ "names": ["Div", "Data", "Jot", "Builder", "Html", "ChildHelper", "parent", "index", "node", "layout", "oldChild", "frag", "container", "childrenLayout", "Item", "index", "item", "status", "DataHelper", "oldArray", "newArray", "key", "oldItemsMap", "changes", "deletedItems", "newItem", "newIndex", "keyValue", "oldItem", "array", "map", "obj1", "obj2", "keys1", "keys2", "List", "Jot", "Data", "rowCallBack", "Div", "item", "keyValue", "index", "rowElement", "ChildHelper", "row", "oldRow", "newRow", "items", "rows", "lastIndex", "newItems", "withDelete", "oldItems", "changes", "DataHelper", "rowItems"]
7
7
  }
@@ -0,0 +1,8 @@
1
+ /**
2
+ * List
3
+ *
4
+ * This will create a list component.
5
+ *
6
+ * @class
7
+ */
8
+ export const List: object | Function;
@@ -0,0 +1,2 @@
1
+ export { List };
2
+ import { List } from './lists/list.js';
@@ -0,0 +1,50 @@
1
+ /**
2
+ * NavLink
3
+ *
4
+ * This will create a nav link that will add an active
5
+ * class when the browser route path matches the link
6
+ * href.
7
+ *
8
+ * @class
9
+ * @extends Component
10
+ */
11
+ export class NavLink extends Component {
12
+ selectedClass: any;
13
+ /**
14
+ * This will render the component.
15
+ *
16
+ * @returns {object}
17
+ */
18
+ render(): object;
19
+ /**
20
+ * This will get string.
21
+ *
22
+ * @param {string} string
23
+ * @returns {(string|null)}
24
+ */
25
+ getString(string: string): (string | null);
26
+ /**
27
+ * This will setup the watchers.
28
+ *
29
+ * @protected
30
+ * @param {string} href
31
+ * @param {string} text
32
+ * @returns {array}
33
+ */
34
+ protected setupWatchers(href: string, text: string): any[];
35
+ /**
36
+ * This will setup the states.
37
+ *
38
+ * @protected
39
+ * @returns {object}
40
+ */
41
+ protected setupStates(): object;
42
+ /**
43
+ * This will update the class on the element.
44
+ *
45
+ * @param {boolean} selected
46
+ * @returns {void}
47
+ */
48
+ update(selected: boolean): void;
49
+ }
50
+ import { Component } from '@base-framework/base';
@@ -0,0 +1,93 @@
1
+ /**
2
+ * ChildHelper
3
+ *
4
+ * This class will help with getting children of a node.
5
+ *
6
+ * @class
7
+ */
8
+ export class ChildHelper {
9
+ /**
10
+ * This will get the first child.
11
+ *
12
+ * @param {object} parent
13
+ * @returns {object|null}
14
+ */
15
+ static first(parent: object): object | null;
16
+ /**
17
+ * This will get the last child.
18
+ *
19
+ * @param {object} parent
20
+ * @returns {object|null}
21
+ */
22
+ static last(parent: object): object | null;
23
+ /**
24
+ * This will get the child at the specified index.
25
+ *
26
+ * @param {object} parent
27
+ * @param {number} index
28
+ * @returns {object|null}
29
+ */
30
+ static get(parent: object, index: number): object | null;
31
+ /**
32
+ * This will get the parent of the node.
33
+ *
34
+ * @param {object} node
35
+ * @returns {object|null}
36
+ */
37
+ static next(node: object): object | null;
38
+ /**
39
+ * This will get the previous sibling.
40
+ *
41
+ * @param {object} node
42
+ * @returns {object|null}
43
+ */
44
+ static previous(node: object): object | null;
45
+ /**
46
+ * This will get the index of the node.
47
+ *
48
+ * @param {object} node
49
+ * @returns {number}
50
+ */
51
+ static index(node: object): number;
52
+ /**
53
+ * This will get the previous index of the node.
54
+ *
55
+ * @param {object} node
56
+ * @returns {number}
57
+ */
58
+ static getPreviousIndex(node: object): number;
59
+ /**
60
+ * This will replace a child layout.
61
+ *
62
+ * @param {object} layout
63
+ * @param {object} oldChild
64
+ * @param {object} parent
65
+ * @returns {void}
66
+ */
67
+ static replace(layout: object, oldChild: object, parent: object): void;
68
+ /**
69
+ * This will remove a child.
70
+ *
71
+ * @param {object} node
72
+ * @returns {void}
73
+ */
74
+ static remove(node: object): void;
75
+ /**
76
+ * This will append a child layout.
77
+ *
78
+ * @param {object} childrenLayout
79
+ * @param {object} container
80
+ * @param {object} parent
81
+ * @returns {void}
82
+ */
83
+ static append(childrenLayout: object, container: object, parent: object): void;
84
+ /**
85
+ * This will prepend a child layout.
86
+ *
87
+ * @param {object} childrenLayout
88
+ * @param {object} container
89
+ * @param {object} parent
90
+ * @returns {void}
91
+ */
92
+ static prepend(childrenLayout: object, container: object, parent: object): void;
93
+ }
@@ -0,0 +1,37 @@
1
+ /**
2
+ * DataHelper
3
+ *
4
+ * This will help with data manipulation.
5
+ *
6
+ * @class
7
+ */
8
+ export class DataHelper {
9
+ /**
10
+ * Compares two arrays of objects and returns the differences based on a specified key.
11
+ *
12
+ * @param {Array<Object>} oldArray - The original array of objects.
13
+ * @param {Array<Object>} newArray - The updated array of objects.
14
+ * @param {string} key - The key used to compare objects in the arrays.
15
+ * @returns {Object} An object containing arrays of added, updated, and deleted items.
16
+ */
17
+ static diff(oldArray: Array<any>, newArray: Array<any>, key: string): any;
18
+ /**
19
+ * Converts an array of objects into a Map keyed by the specified property.
20
+ * Each value in the Map is an object containing the item and its index in the array.
21
+ *
22
+ * @param {Array<Object>} array - The array to convert.
23
+ * @param {string} key - The key used to map the objects.
24
+ * @returns {Map} A Map with keys as specified property and values as objects.
25
+ * @private
26
+ */
27
+ private static arrayToMap;
28
+ /**
29
+ * Performs a deep comparison between two objects.
30
+ *
31
+ * @param {Object} obj1 - The first object to compare.
32
+ * @param {Object} obj2 - The second object to compare.
33
+ * @returns {boolean} True if objects are equal, else false.
34
+ * @private
35
+ */
36
+ private static deepEqual;
37
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@base-framework/organisms",
3
- "version": "1.0.18",
3
+ "version": "1.0.20",
4
4
  "description": "This will add default organisms to the base framework.",
5
5
  "main": "./dist/organisms.js",
6
6
  "scripts": {