dsql-admin/dsql-app/.local_dist/static/chunks/6156-c0700a2f6f1bd267.js
Benjamin Toby 7a06e83a46 Updates
2024-12-08 20:56:57 +01:00

1 line
19 KiB
JavaScript

"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6156],{46156:(e,l,t)=>{t.d(l,{A:()=>F});var a=t(74848),i=t(96540),d=t(36517);function s(e){let{tableFields:l,setTableFields:t,setRefresh:a,setPageRefresh:i,refreshFieldsListRef:d}=e,s=l.findIndex(e=>"date_created"===e.fieldName);l.splice(s,0,{newTempField:!0}),t(l),(null==d?void 0:d.current)&&d.current(e=>e+1)}var n=t(66604),r=t(620),o=t(58825),c=t(2543),u=t.n(c);function m(e){let{tableFields:l,setTableFields:t,refreshFieldsListRef:a,order:i,field:d,e:s}=e,n=u().cloneDeep(l),r=n.findIndex(e=>e.fieldName===d.fieldName);if(r<0)return;let o=n[r];if("up"===i&&r&&r<=1){console.log("Min Reached =>",r);return}if("down"===i&&r&&r>=n.length-7){console.log("Max Reached =>",r);return}try{var c,m;let e;let l=s.target.closest(".table-field-wrapper"),t=l.previousElementSibling,a=l.nextElementSibling,d=window.DSQL.Flip,n=d.getState(l);"up"===i?(e=d.getState(t),null===(c=l.parentNode)||void 0===c||c.insertBefore(l,t)):(null==a?void 0:a.nextElementSibling)&&(e=d.getState(a),null===(m=l.parentNode)||void 0===m||m.insertBefore(l,a.nextElementSibling)),d.from(n,{duration:.3,ease:"power1.inOut"}),d.from(e,{duration:.3,ease:"power1.inOut"})}catch(e){console.log("Error =>",e.message)}if(!r){console.log("No target Field Index =>",r);return}n.splice(r,1),"up"===i?n.splice(r-1,0,o):n.splice(r+1,0,o),setTimeout(()=>{t([...n]),a.current&&a.current(e=>e+1)},500)}var p=t(35160),x=t(94996),h=t(23698);function v(e){var l,t,d,s,n,r,c,u,m,p,v;let{field:f,setTargetField:g,fieldIndex:w,tableFields:b,setTableFields:y,refreshFieldsListRef:j,database:N,currentTable:_,user:T,isDelegated:F,setLoading:A}=e,[C,k]=i.useState(f),[S,D]=i.useState(!1);return(0,a.jsxs)("div",{className:"flex-col w-full table-field-wrapper"+(S?" shadow-2xl shadow-slate-700/40 relative z-50":""),children:[(0,a.jsxs)("div",{className:"card no-hover items-center w-full py-4"+(S?" rounded-t":" rounded")+((null===(l=C.fieldName)||void 0===l?void 0:l.match(o.A))?" text-slate-400 pointer-events-none border-slate-200 border":" light-gray"),children:[(0,a.jsx)("span",{className:"font-bold"+((null===(t=C.fieldName)||void 0===t?void 0:t.match(o.A))?" dark:text-slate-500":" dark:text-white"),children:C.fieldName}),(0,a.jsx)("span",{className:"text-xs py-1 px-2 bg-slate-100 dark:bg-slate-700 dark:text-slate-200 rounded ",children:C.dataType}),(null==C?void 0:C.foreignKey)&&(0,a.jsxs)("div",{className:"text-xs bg-primary text-white px-2 py-0.5 rounded-full",children:[(0,a.jsx)("span",{children:"Foreign Key: "}),(0,a.jsxs)("span",{children:[C.foreignKey.destinationTableName," ("," ",(0,a.jsx)("b",{children:C.foreignKey.destinationTableColumnName})," ",")"]})]}),(null===(d=C.fieldName)||void 0===d?void 0:d.match(o.A))&&(0,a.jsx)("span",{className:"text-slate-300 text-sm font-semibold ml-0 md:ml-auto",children:"Default Field"}),!(!F&&!(null===(s=C.fieldName)||void 0===s?void 0:s.match(o.A))&&(null===(n=C.dataType)||void 0===n?void 0:n.match(/INT/)))||C.foreignKey||(null==N?void 0:null===(c=N.active_clone)||void 0===c?void 0:null===(r=c.toString())||void 0===r?void 0:r.match(/1/))?!(!F&&!(null===(u=C.fieldName)||void 0===u?void 0:u.match(o.A))&&(null===(m=C.dataType)||void 0===m?void 0:m.match(/INT/)))||(null==N?void 0:null===(v=N.active_clone)||void 0===v?void 0:null===(p=v.toString())||void 0===p?void 0:p.match(/1/))?(0,a.jsx)(i.Fragment,{}):(0,a.jsx)("div",{className:"ml-0 md:ml-auto flex-wrap",children:(0,a.jsx)("div",{className:"button py-1 text-xs light-gray",onClick:e=>{if(window.confirm("Delete this foreign Key?")){var l,t;delete f.foreignKey,A(!0),(0,h.A)("/api/updateClonedTableForeignKeys",{method:"post",body:{tableData:_,database:N.db_full_name,dbSlug:N.db_slug,delegated:null!==(t=window.location)&&void 0!==t&&null!==(l=t.search)&&void 0!==l&&!!l.match(/delegated=true/i)}},!0).then(e=>{e.success?window.location.reload():window.alert("Update Failed, Please Try again.")})}},style:{color:"var(--slate-500)"},children:"Delete Foreign Key"})}):(0,a.jsx)("div",{className:"ml-0 md:ml-auto flex-wrap",children:(0,a.jsx)("div",{className:"button outlined py-1 text-xs gray",onClick:e=>{S?D(!1):D(!0)},style:{color:"var(--slate-500)"},children:"Add Foreign Key"})})]}),S&&!F&&(0,a.jsx)("div",{className:"card col w-full -mt-5 pt-0 no-hover",children:(0,a.jsx)(x.A,{targetField:f,setFieldData:k,tableFields:b,setTableFields:y,database:N,currentTable:_,user:T,setActiveEdit:D,activeClonedTable:!0})})]})}var f=t(66051),g=t(39007);function w(e){let{fieldIndex:l,setTableFields:d,database:s,user:n,isNewField:r,setLiteralValue:o,tempFieldData:c,setTempFieldData:u,dataTypeValue:m,setDataTypeValue:p,dataType:x,setDataType:h,dataTypeDesc:v,setDataTypeDesc:w}=e,b=t(94327),y=i.useRef();i.useEffect(()=>{var e;y.current&&(y.current.scrollIntoView({block:"center",behavior:"smooth"}),null===(e=y.current.querySelector("input"))||void 0===e||e.focus())},[]);let j=!!x.match(/uuid/i);return(0,a.jsxs)(i.Fragment,{children:[r&&(0,a.jsx)("span",{className:"absolute -top-4 text-sm bg-fuchsia-600 dark:bg-white text-white dark:text-fuchsia-800 px-3 py-1 rounded-full",children:"New Field"}),(0,a.jsxs)("div",{className:"gap-4 flex-wrap xl:flex-nowrap flex-col xl:flex-row items-stretch w-full xl:w-auto",children:[(0,a.jsxs)("div",{className:"flex flex-col items-start gap-0.5",children:[(0,a.jsx)("label",{htmlFor:"new_field_name",children:"Field Name"}),(0,a.jsx)("input",{type:"text",name:"new_field_name",id:"new_field_name",placeholder:"Eg. post_title",onInput:async e=>{let l=e.target,t=l.value.toLowerCase().replace(/ /g,"_");l.value=t},required:!0})]}),(0,a.jsxs)("div",{className:"flex flex-col items-start gap-4 xl:gap-0.5",children:[(0,a.jsxs)("div",{className:"items-start flex-wrap xl:flex-nowrap",children:[(0,a.jsx)("label",{htmlFor:"new_field_data_type",children:"Data Type"}),(0,a.jsxs)("div",{className:"dropdown-wrapper reversed text-sm w-full items-start gap-2",children:[(0,a.jsx)("span",{className:"px-2 bg-slate-200 dark:bg-slate-700 rounded-full hover:bg-slate-100 dark:hover:bg-slate-600 hidden xl:flex",children:"Info"}),(0,a.jsx)("div",{className:"dropdown mt-0 xl:-mt-2",children:(0,a.jsx)("span",{children:v})})]})]}),(0,a.jsxs)("div",{className:"w-full xl:w-auto",children:[(0,a.jsx)("select",{name:"new_field_data_type",id:"new_field_data_type",className:"w-full xl:w-auto",onChange:e=>{let l=e.target;h(l.value),l.childNodes.forEach(e=>{e.value===l.value&&w(e.dataset.desc),e.value===l.value&&e.dataset.literal&&o(e.dataset.literal)})},children:b.map((e,l)=>e.name.match(/VARCHAR/)?(0,a.jsx)("option",{value:e.name,"data-desc":e.description,children:e.title+"("+(m||200)+")"},l+1):(0,a.jsx)("option",{value:e.name,"data-desc":e.description,"data-literal":e.valueLiteral||void 0,children:e.title},l+1))}),x.match(/VARCHAR/)&&(0,a.jsx)("input",{type:"number",defaultValue:m,className:"px-2",style:{maxWidth:"60px"},max:255,min:5,onChange:e=>{p(e.target.value)}})]})]}),(null==x?void 0:x.match(/text/i))&&(0,a.jsx)(i.Fragment,{children:(0,a.jsx)(g.A,{targetField:c})}),!j&&(0,a.jsxs)("div",{className:"flex flex-col items-start gap-0.5",style:{minWidth:"70px"},children:[(0,a.jsx)("label",{htmlFor:"new_field_required",children:"Required?"}),(0,a.jsxs)("select",{name:"new_field_required",id:"new_field_required",className:"px-2",children:[(0,a.jsx)("option",{value:"No",children:"No"}),(0,a.jsx)("option",{value:"Yes",children:"Yes"})]})]}),!j&&(0,a.jsxs)("div",{className:"flex flex-col items-start gap-0.5",children:[(0,a.jsx)("label",{htmlFor:"new_field_default_value",children:"Default Value (optional)"}),(0,a.jsx)("input",{type:"text",name:"new_field_default_value",id:"new_field_default_value",placeholder:"Default Value"})]}),!j&&(0,a.jsx)(f.A,{database:s,setFieldData:u,targetField:c,user:n,fieldIndex:l})]}),(0,a.jsxs)("div",{className:"secondary mt-auto flex-wrap xl:flex-nowrap w-full xl:w-auto",children:[(0,a.jsx)("button",{type:"submit",className:"secondary mt-auto py-3 w-full sm:w-auto justify-center grow",children:"Add Field"}),(0,a.jsx)("div",{className:"button outlined-gray mt-auto py-2.5 w-full sm:w-auto justify-center grow",onClick:e=>{d(e=>e.filter((e,t)=>t!=l))},children:"Cancel"})]})]})}function b(e){let{fieldIndex:l,tableFields:d,setTableFields:s,refreshFieldsListRef:n,database:r,currentTable:o,user:c}=e;t(94327);let[u,m]=i.useState("VARCHAR"),[p,x]=i.useState("200"),[h,v]=i.useState("Varchar is simply letters and numbers within the range 0 - 255"),[f,g]=i.useState({}),b=i.useRef(),[y,j]=i.useState("");i.useEffect(()=>{var e;b.current&&(b.current.scrollIntoView({block:"center",behavior:"smooth"}),null===(e=b.current.querySelector("input"))||void 0===e||e.focus())},[]);let N=!!u.match(/uuid/i);return(0,a.jsx)("div",{className:"w-full mt-1 flex-wrap relative z-0 hover:z-20",ref:b,children:(0,a.jsx)("form",{className:"flex flex-row items-start gap-4 w-full justify-between border border-solid p-4 pt-6 border-slate-400 rounded focus:shadow-lg shadow-slate-400/40 dark:shadow-black/30 relative flex-wrap xl:flex-nowrap shadow-xl",onSubmit:e=>{var t,a,i,d,r,o;e.preventDefault();let c=f.foreignKey;c&&!c.destinationTableName&&delete f.foreignKey;let u=e.target,m=u.new_field_name.value,x=u.new_field_data_type.value,h=null===(t=u.new_field_required)||void 0===t?void 0:t.value,v=null===(a=u.new_field_default_value)||void 0===a?void 0:a.value,g=null===(i=u.encryption_field)||void 0===i?void 0:i.value,w=null===(d=u.rich_text_option)||void 0===d?void 0:d.value,b=u.foreign_key_field,j=u.foreign_key_destination_table_name,_=u.foreign_key_destination_table_column_name;null==b||b.value;let T={...f,fieldName:m,dataType:(null==f?void 0:f.dataType)&&(null==f?void 0:f.foreignKey)?f.dataType:(null==x?void 0:x.match(/VARCHAR/))?"".concat(x,"(").concat(p,")"):x};(null==h?void 0:h.match(/yes/i))?T.notNullValue=!0:(null==v?void 0:v.match(/./))||(T.nullValue=!0),(null==v?void 0:v.match(/./))&&(T.defaultValue=v),(null==g?void 0:g.match(/yes/i))&&(T.encrypted=!0),(null==_?void 0:null===(r=_.value)||void 0===r?void 0:r.match(/./i))&&!(null==_?void 0:null===(o=_.value)||void 0===o?void 0:o.match(/^--$/i))&&(T.dataType=_.dataset.dataType,T.foreignKey={foreignKeyName:_.dataset.foreignKeyName,destinationTableName:j.dataset.destinationTableName,destinationTableColumnName:_.dataset.destinationTableColumnName,cascadeDelete:!0}),(null==w?void 0:w.match(/yes/i))&&(T.richText=!0),N?(T.defaultValueLiteral=y,T.nullValue=!1):delete T.defaultValueLiteral,console.log("newFieldObject",T),function(e){let{fieldIndex:l,setTableFields:t,refreshFieldsListRef:a,payload:i}=e;t(e=>(e.splice(l,1,i),e)),(null==a?void 0:a.current)&&a.current(e=>e+1)}({fieldIndex:l,setTableFields:s,refreshFieldsListRef:n,payload:T})},children:(0,a.jsx)(w,{database:r,fieldIndex:l,isNewField:!0,literalValue:y,refreshFieldsListRef:n,setLiteralValue:j,setTableFields:s,user:c,currentTable:o,tableFields:d,tempFieldData:f,setTempFieldData:g,dataTypeValue:p,setDataTypeValue:x,dataType:u,setDataType:m,dataTypeDesc:h,setDataTypeDesc:v})})})}var y=t(60557),j=t(62027);function N(e){var l,t,d,s,n,r,c;let{field:u,setTargetField:x,fieldIndex:h,tableFields:v,setTableFields:f,refreshFieldsListRef:g,database:w,currentTable:b,confirmedDelegetedUser:N,user:_}=e,T=null==N?void 0:N.delegated,F=null==N?void 0:null===(l=N.priviledges)||void 0===l?void 0:l.match(/Edit Tables/i);null==N||null===(t=N.priviledges)||void 0===t||t.match(/Delete Tables/i),null==N||null===(d=N.priviledges)||void 0===d||d.match(/Create Tables/i);let{active_clone:A,active_clone_parent_db:C,remote_connected:k}=w,[S,D]=i.useState(u),[E,K]=i.useState(!1);return(0,a.jsxs)("div",{className:"flex-col w-full table-field-wrapper"+(E?" shadow-2xl shadow-slate-300/40 dark:shadow-black/30 relative z-50":""),children:[(0,a.jsxs)("div",{className:"card no-hover items-center w-full py-4"+(E?" rounded-t":" rounded")+((null===(s=S.fieldName)||void 0===s?void 0:s.match(o.A))?" text-slate-400 pointer-events-none border-slate-200 border":" light-gray"),children:[(0,a.jsx)("span",{className:"font-bold"+((null===(n=S.fieldName)||void 0===n?void 0:n.match(o.A))?" dark:text-slate-500":" dark:text-white"),children:S.fieldName}),(0,a.jsx)("span",{className:"text-xs py-1 px-2 bg-slate-100 dark:bg-slate-700 dark:text-slate-200 rounded ",children:S.dataType}),(null==S?void 0:S.foreignKey)&&(0,a.jsxs)("div",{className:"text-xs bg-primary text-white px-2 py-0.5 rounded-full",children:[(0,a.jsx)("span",{children:"Foreign Key: "}),(0,a.jsxs)("span",{children:[S.foreignKey.destinationTableName," ("," ",(0,a.jsx)("b",{children:S.foreignKey.destinationTableColumnName})," ",")"]})]}),(null===(r=S.fieldName)||void 0===r?void 0:r.match(o.A))&&(0,a.jsx)("span",{className:"text-slate-300 text-sm font-semibold ml-0 md:ml-auto",children:"Default Field"}),!(null===(c=S.fieldName)||void 0===c?void 0:c.match(o.A))&&!C&&!k&&(0,a.jsx)("div",{className:"ml-0 md:ml-auto flex-wrap",children:(!T||T&&F)&&(0,a.jsxs)(i.Fragment,{children:[(0,a.jsxs)(y.A,{children:[(0,a.jsx)("div",{className:"button outlined py-1 text-xs gray",onClick:e=>{E?K(!1):K(!0)},style:{color:"var(--slate-500)"},children:"Edit"}),!C&&!k&&(0,a.jsx)("div",{className:"button outlined py-1 text-xs gray",onClick:e=>{window.confirm('Delete "'.concat(u.fieldName,'"?'))&&f(e=>e.filter((e,l)=>l!=h))},style:{color:"var(--slate-500)"},children:"Delete"})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)("div",{className:"button outlined gray p-2 w-8 h-8 rounded-full rotate-180",onClick:e=>{m({tableFields:v,setTableFields:f,refreshFieldsListRef:g,order:"up",field:u,e})},children:(0,a.jsx)(j.A,{size:20})}),(0,a.jsx)("div",{className:"button outlined gray p-2 w-8 h-8 rounded-full",onClick:e=>{m({tableFields:v,setTableFields:f,refreshFieldsListRef:g,order:"down",field:u,e})},children:(0,a.jsx)(j.A,{size:20})})]})]})})]}),E&&(0,a.jsx)("div",{className:"w-full",children:(0,a.jsx)(p.A,{fieldIndex:h,tableFields:v,setTableFields:f,refreshFieldsListRef:g,targetField:u,setActiveEdit:K,database:w,currentTable:b,user:_})})]})}var _=t(41263);let T=1;function F(e){var l,o,c,u;let{user:m,tableFields:p,setTableFields:x,setTargetField:h,refreshFieldsListRef:f,updateTable:g,updateTableAfterFieldsUpdateFunction:w,collapsed:y,database:j,table:F,confirmedDelegetedUser:A,query:C}=e;(null==F?void 0:F.childTable)&&(null===(l=F.childTableDbFullName)||void 0===l||l.replace(new RegExp(/datasquirel_user_\d+_/),""));let k=null==A?void 0:A.delegated,S=null==A?void 0:null===(o=A.priviledges)||void 0===o?void 0:o.match(/Edit Tables/i);null==A||null===(c=A.priviledges)||void 0===c||c.match(/Delete Tables/i),null==A||null===(u=A.priviledges)||void 0===u||u.match(/Create Tables/i);let{active_clone:D,active_clone_parent_db:E,remote_connected:K}=j,[R,V]=i.useState(0);f.current=V;let[I,L]=i.useState(!1),[q,$]=i.useState(y||!1);return(i.useEffect(()=>{let{Flip:e}=t(28383);d.Ay.registerPlugin(e);let l=window.DSQL;l&&(l.Flip=e)},[]),k&&!S)?(0,a.jsx)(a.Fragment,{}):(0,a.jsxs)("section",{className:"paper green",children:[I&&(0,a.jsx)(r.A,{}),(null==F?void 0:F.childTable)?(0,a.jsxs)(i.Fragment,{children:[(0,a.jsxs)("div",{className:"w-full justify-between flex-wrap",children:[(0,a.jsx)("h2",{className:"text-xl m-0 text-left title",children:"Fields"}),(0,a.jsxs)("div",{children:[(0,a.jsx)("div",{className:"button outlined light-gray",onClick:e=>{let l=(0,_.A)({paradigm:"JavaScript",table:F,query:C,user:m});l&&navigator.clipboard.writeText(l).then(()=>{window.alert("JavaScript Type Definition Copied")})},children:(0,a.jsx)("span",{children:"Copy TypeDef (JS)"})}),(0,a.jsx)("div",{className:"button outlined light-gray",onClick:e=>{let l=(0,_.A)({paradigm:"TypeScript",table:F,query:C,user:m});l&&navigator.clipboard.writeText(l).then(()=>{window.alert("TypeScript Type Definition Copied")})},children:(0,a.jsx)("span",{children:"Copy TypeDef (TS)"})})]})]}),(0,a.jsx)("div",{className:"flex-col w-full",style:q?{maxHeight:"200px"}:{},children:p&&p[0]&&p.map((e,l)=>(T++,(0,a.jsx)(v,{field:e,fieldIndex:l,setTargetField:h,setTableFields:x,refreshFieldsListRef:f,tableFields:p,database:j,setLoading:L,currentTable:F,user:m,isDelegated:k},T)))}),y&&(0,a.jsx)(n.A,{collapse:q||!1,setCollapse:$})]}):(0,a.jsxs)(i.Fragment,{children:[(0,a.jsxs)("div",{className:"w-full justify-between flex-wrap",children:[(0,a.jsx)("h2",{className:"text-xl m-0 text-left title",children:"Fields"}),(0,a.jsxs)("div",{children:[(!k||k&&S)&&!E&&!K&&(0,a.jsxs)("div",{className:"button secondary outlined",onClick:e=>{q&&$(!1),s({setTableFields:x,tableFields:p,setRefresh:V,refreshFieldsListRef:f})},children:[(0,a.jsx)("span",{className:"symbol",children:"+"}),(0,a.jsx)("span",{children:"Add New Field"})]}),(0,a.jsx)("div",{className:"button outlined light-gray",onClick:e=>{if(!F)return;let l=(0,_.A)({paradigm:"JavaScript",table:F,query:C,user:m});l&&navigator.clipboard.writeText(l).then(()=>{window.alert("JavaScript Type Definition Copied")})},children:(0,a.jsx)("span",{children:"Copy TypeDef (JS)"})}),(0,a.jsx)("div",{className:"button outlined light-gray",onClick:e=>{if(!F)return;let l=(0,_.A)({paradigm:"TypeScript",table:F,query:C,user:m});l&&navigator.clipboard.writeText(l).then(()=>{window.alert("TypeScript Type Definition Copied")})},children:(0,a.jsx)("span",{children:"Copy TypeDef (TS)"})})]})]}),(0,a.jsxs)("div",{className:"flex-col w-full",style:q?{maxHeight:"200px"}:{},children:[p&&p[0]&&p.map((e,l)=>(T++,e.newTempField)?(0,a.jsx)(b,{fieldIndex:l,tableFields:p,setTableFields:x,refreshFieldsListRef:f,database:j,currentTable:F,user:m},T):(0,a.jsx)(N,{field:e,fieldIndex:l,setTargetField:h,setTableFields:x,refreshFieldsListRef:f,tableFields:p,database:j,currentTable:F,confirmedDelegetedUser:A,user:m},T)),(!k||k&&S)&&!E&&!K&&(0,a.jsxs)(i.Fragment,{children:[(0,a.jsxs)("div",{className:"button outlined gray w-full more-padding",style:{borderStyle:"dashed"},onClick:e=>{q&&$(!1),s({setTableFields:x,tableFields:p,setRefresh:V,refreshFieldsListRef:f})},children:[(0,a.jsx)("span",{className:"symbol",children:"+"}),(0,a.jsx)("span",{children:"Add New Field"})]}),g&&(0,a.jsx)("button",{className:"secondary w-full py-3",onClick:e=>{window.confirm("Update Table Fields?")&&(L(!0),w&&w(L))},children:"Update Table Fields"})]})]}),y&&(0,a.jsx)(n.A,{collapse:q,setCollapse:$})]})]})}},41263:(e,l,t)=>{t.d(l,{A:()=>i});var a=t(58825);function i(e){let{paradigm:l,table:t,query:i,user:d}=e,s="";try{let e="DSQL_".concat(i.single,"_").concat(i.single_table).toUpperCase(),d=t.fields;function n(e){return(null==e?void 0:e.match(/int/i))?"number":(null==e||e.match(/text|varchar|timestamp/i),"string")}let r=[],o=[];r.push("type ".concat(e," = {")),o.push("/**\n * @typedef {object} ".concat(e)),d.forEach(e=>{var l;let t=e.nullValue?"?":(null===(l=e.fieldName)||void 0===l?void 0:l.match(a.A))?"?":"";r.push(" ".concat(e.fieldName).concat(t,": ").concat(n(e.dataType||""),";")),o.push(" * @property {".concat(n(e.dataType||"")).concat(t,"} ").concat(e.fieldName))}),r.push("}"),o.push(" */"),(null==l?void 0:l.match(/javascript/i))&&(s=o.join("\n")),(null==l?void 0:l.match(/typescript/i))&&(s=r.join("\n"))}catch(e){console.log(e.message),s=null}return s}},66604:(e,l,t)=>{t.d(l,{A:()=>i});var a=t(74848);function i(e){let{collapse:l,setCollapse:t}=e;return(0,a.jsxs)("div",{className:"collapse-block"+(l?" -mt-16 -mb-6 pt-10":" mt-0 mb-0 p-0"),onClick:e=>{l?t(!1):t(!0)},children:[(0,a.jsx)("span",{children:l?"Expand":"Collapse"}),(0,a.jsx)("img",{src:"/images/down-arrow-dark.svg",alt:"Down Arrow",width:16,className:"dark:hidden opacity-30 "+(l?"":"rotate-180")}),(0,a.jsx)("img",{src:"/images/down-arrow-white.svg",alt:"Down Arrow",width:16,className:"opacity-30 hidden dark:flex "+(l?"":"rotate-180")})]})}t(96540)},58825:(e,l,t)=>{t.d(l,{A:()=>a});let a=/^id$|^uuid$|^date_created$|^date_created_code$|^date_created_timestamp$|^date_updated$|^date_updated_code$|^date_updated_timestamp$/}}]);