dsql-admin/dsql-app/.local_dist/static/chunks/5160-1efe1d072c9abed0.js
Benjamin Toby 86f931fb82 Updates
2024-12-08 09:57:48 +01:00

1 line
20 KiB
JavaScript

"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5160],{35160:(e,l,a)=>{a.d(l,{A:()=>o});var t=a(74848),n=a(96540),s=a(66051),i=a(39007),d=a(2543),r=a.n(d);function o(e){var l,d,o;let{targetField:u,fieldIndex:c,tableFields:m,setTableFields:x,refreshFieldsListRef:p,setActiveEdit:h,database:f,currentTable:v,user:g}=e,N=(null==u?void 0:u.dataType)?u.dataType.replace(/\d|\(|\)/g,""):null,y=(null==u?void 0:u.dataType)?u.dataType.replace(/[^\d]/g,""):"200",j=a(94327),b=n.useRef(r().cloneDeep(u)),w=n.useRef(),[T,_]=n.useState(u),[C,F]=n.useState(null==u?void 0:u.fieldName),[V,I]=n.useState(N),[k,S]=n.useState(y),[A,E]=n.useState("Varchar is simply letters and numbers within the range 0 - 255"),[D,K]=n.useState((null==u?void 0:u.richText)&&!(null==u?void 0:u.encrypted)?"Yes":"No"),U=!!(null==V?void 0:V.match(/uuid/i));return(0,t.jsx)("div",{className:"w-full -mt-3 bg-white dark:bg-slate-800 flex-wrap",ref:w,children:(0,t.jsxs)("form",{className:"flex flex-col xl:flex-row items-start gap-4 w-full justify-between border border-solid p-4 border-slate-200 dark:border-slate-600 rounded rounded-t-none focus:shadow-lg shadow-slate-700 dark:shadow-black relative flex-wrap",onSubmit:e=>{var l,a;e.preventDefault(),x(e=>(e[c]=T,e)),p.current(e=>e+1),null===(a=e.target.closest(".table-field-wrapper"))||void 0===a||null===(l=a.querySelector(".edit-table-field-section"))||void 0===l||l.classList.toggle("hidden")},children:[(0,t.jsxs)("div",{className:"gap-4 flex-wrap w-full md:w-auto flex-col xl:flex-row items-stretch",children:[(0,t.jsxs)("div",{className:"flex flex-col items-start gap-0.5",children:[(0,t.jsx)("label",{htmlFor:"new_field_name",children:"Field Name"}),(0,t.jsx)("input",{type:"text",name:"new_field_name",id:"new_field_name",placeholder:"Eg. post_title",onInput:async e=>{let l=e.target;l.value=l.value.toLowerCase().replace(/ /g,"_"),_(e=>(e.fieldName=l.value,e.updatedField=!0,e.originName||(e.originName=C),e))},required:!0,defaultValue:C})]}),(0,t.jsxs)("div",{className:"flex flex-col items-start gap-4 xl:gap-0.5",children:[(0,t.jsxs)("div",{className:"flex-wrap xl:flex-nowrap w-full md:w-auto",children:[(0,t.jsx)("label",{htmlFor:"new_field_data_type",children:"Data Type"}),(0,t.jsxs)("div",{className:"dropdown-wrapper reversed text-sm items-start",children:[(0,t.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,t.jsx)("div",{className:"dropdown mt-0 xl:-mt-2",children:(0,t.jsx)("span",{children:A})})]})]}),(0,t.jsxs)("div",{className:"w-auto",children:[(0,t.jsx)("select",{name:"new_field_data_type",id:"new_field_data_type",className:"w-full xl-w-auto",onChange:e=>{let l=e.target;I(l.value),l.childNodes.forEach(e=>{e.value===l.value&&e.dataset.desc&&E(e.dataset.desc),e.value===l.value&&e.dataset.literal?(T.defaultValueLiteral=e.dataset.literal,T.nullValue=!1):delete T.defaultValueLiteral}),u.dataType=l.value+(l.value.match(/VARCHAR/)?"(".concat(k||200,")"):"")},defaultValue:V||void 0,children:j.map((e,l)=>e.name.match(/VARCHAR/)?(0,t.jsx)("option",{value:e.name,"data-desc":e.description,children:e.title+"("+(k||200)+")"},l+1):(0,t.jsx)("option",{value:e.name,"data-desc":e.description,"data-literal":e.valueLiteral||void 0,children:e.title},l+1))}),(null==V?void 0:V.match(/VARCHAR/))&&(0,t.jsx)("input",{type:"number",defaultValue:k||200,className:"px-2",style:{maxWidth:"60px"},max:255,min:5,onChange:e=>{S(e.target.value),u.dataType=V+"(".concat(e.target.value,")")}})]})]}),(null==V?void 0:V.match(/text/i))&&(0,t.jsx)(n.Fragment,{children:(0,t.jsx)(i.A,{targetField:u})}),!(null===(l=u.dataType)||void 0===l?void 0:l.match(/text/i))&&!U&&(0,t.jsxs)("div",{className:"flex flex-col items-start gap-0.5",style:{minWidth:"70px"},children:[(0,t.jsx)("label",{htmlFor:"new_field_required",children:"Required?"}),(0,t.jsxs)("select",{name:"new_field_required",id:"new_field_required",className:"px-2",defaultValue:(null==u?void 0:u.notNullValue)?"Yes":"No",onChange:e=>{console.log(u),"Yes"===e.target.value?u.notNullValue=!0:(u.notNullValue=!1,delete u.notNullValue)},children:[(0,t.jsx)("option",{value:"No",children:"No"}),(0,t.jsx)("option",{value:"Yes",children:"Yes"})]})]}),!U&&(0,t.jsxs)("div",{className:"flex flex-col items-start gap-0.5",children:[(0,t.jsx)("label",{htmlFor:"new_field_default_value",children:(null==T?void 0:null===(d=T.dataType)||void 0===d?void 0:d.match(/text$/i))?"Can't Set Default for text values":"Default Value (optional)"}),(0,t.jsx)("input",{type:"text",name:"new_field_default_value",id:"new_field_default_value",className:(null==T?void 0:null===(o=T.dataType)||void 0===o?void 0:o.match(/text$/i))?"pointer-events-none opacity-50":"",placeholder:"Default Value",defaultValue:(null==T?void 0:T.defaultValue)?T.defaultValue:(null==T?void 0:T.nullValue)?"NULL":"",onInput:e=>{var l;let a=e.target;null!==(l=T.dataType)&&void 0!==l&&l.match(/text$/i)||_(e=>(a.value.match(/./)?delete e.notNullValue:(delete e.defaultValue,delete e.nullValue),a.value.match(/^null$/i)?(delete e.defaultValue,e.nullValue=!0):a.value.match(/./)&&(delete e.nullValue,e.defaultValue=a.value),e))}})]}),!U&&(0,t.jsx)(s.A,{database:f,setFieldData:_,setTableFields:x,tableFields:m,targetField:u,user:g,currentTable:v,fieldIndex:c})]}),(0,t.jsxs)("div",{className:"secondary mt-auto flex-wrap w-full xl:w-auto",children:[(0,t.jsx)("button",{type:"submit",className:"secondary mt-auto py-3 w-full md:w-auto grow",children:"Save Updates"}),(0,t.jsx)("div",{className:"button outlined gray mt-auto py-2.5 w-full md:w-auto justify-center grow",onClick:e=>{b.current&&(u=r().cloneDeep(b.current)),x(e=>{let l=r().cloneDeep(e);return c&&b.current&&(l[c]=r().cloneDeep(b.current)),l}),h&&h(!1)},children:"Cancel"})]})]})})}},66051:(e,l,a)=>{a.d(l,{A:()=>f});var t=a(74848),n=a(96540),s=a(25414),i=a(76897);function d(e){let{targetField:l}=e;if(!(null==l?void 0:l.richText))return null;let[a,d]=n.useState(l.cssFiles||[]),r=n.useRef(null);return n.useEffect(()=>{l.cssFiles=a},[a]),(0,t.jsxs)("div",{className:"flex flex-col items-start gap-2 w-full my-4",style:{minWidth:"70px"},children:[(0,t.jsx)("span",{className:"label text-xs text-slate-500",children:"Add CSS"}),a.map((e,l)=>(0,t.jsxs)("div",{className:"relative border border-solid border-slate-300 text-xs px-2 py-1 rounded-full",children:[(0,t.jsx)("span",{children:e}),(0,t.jsx)(i.A,{size:20,onClick:()=>{d(l=>l.filter(l=>l!==e))},className:"cursor-pointer hover:opacity-60 "})]},l+1)),(0,t.jsxs)("div",{className:"row w-full",children:[(0,t.jsx)(s.A,{name:"css-file",placeholder:"CSS file URL",elementRef:r}),(0,t.jsx)("button",{className:"secondary outlined",onClick:()=>{var e;let l=null===(e=r.current)||void 0===e?void 0:e.value;(null==l?void 0:l.match(/./))&&d(e=>[...new Set([...e,l])])},children:"Add"})]}),(0,t.jsx)("span",{className:"text-sm text-slate-600",children:"Add CSS files to your Rich Text field"})]})}function r(e){let{targetField:l,setFieldData:a}=e;return(0,t.jsxs)("div",{className:"flex flex-col items-start gap-0.5 w-full",style:{minWidth:"70px"},children:[(0,t.jsx)("label",{htmlFor:"encryption_field",children:"Encrypt?"}),(0,t.jsxs)("select",{name:"encryption_field",id:"encryption_field",className:"px-2",defaultValue:(null==l?void 0:l.encrypted)?"Yes":"No",onChange:e=>{a&&a(l=>(e.target.value.match(/yes/i)?l.encrypted=!0:(l.encrypted=!1,delete l.encrypted),l))},children:[(0,t.jsx)("option",{value:"No",children:"No"}),(0,t.jsx)("option",{value:"Yes",children:"Yes"})]})]})}var o=a(94996);function u(e){let{targetField:l,setFieldData:a}=e;return null}function c(e){let{targetField:l}=e;return(0,t.jsxs)("div",{className:"flex flex-col items-start gap-2 w-full",style:{minWidth:"70px"},children:[(0,t.jsx)("label",{htmlFor:"encryption_field",children:"Pattern"}),(0,t.jsx)("span",{className:"text-sm text-slate-500",children:'This describes a pattern that must be matched for this field to be valid. If you add a pattern and make a db entry that doesn\'t match, the entry will be "NULL" or an empty string or the default value.'}),(0,t.jsx)("input",{type:"text",placeholder:"Regex Pattern. Eg: '\\\\.[a-z]+'",onInput:e=>{var a;let t=e.target;(null==t?void 0:null===(a=t.value)||void 0===a?void 0:a.length)>0?l.pattern=t.value:delete l.pattern},defaultValue:null==l?void 0:l.pattern}),(0,t.jsx)("input",{type:"text",placeholder:"Regex Pattern Flags. Eg: igm",onInput:e=>{var a;let t=e.target;(null==t?void 0:null===(a=t.value)||void 0===a?void 0:a.length)>0?l.patternFlags=t.value:delete l.patternFlags},defaultValue:null==l?void 0:l.patternFlags})]})}var m=a(2543),x=a.n(m),p=a(44500);function h(e){let{targetField:l,setFieldData:a}=e;return(0,t.jsxs)("div",{className:"flex flex-col items-start gap-0.5 w-full",style:{minWidth:"70px"},children:[(0,t.jsx)("label",{htmlFor:"unique_field",children:"Unique Field?"}),(0,t.jsxs)("select",{name:"unique_field",id:"unique_field",className:"px-2",defaultValue:(null==l?void 0:l.unique)?"Yes":"No",onChange:e=>{a&&a(l=>(e.target.value.match(/yes/i)?l.unique=!0:(l.unique=!1,delete l.unique),l))},children:[(0,t.jsx)("option",{value:"No",children:"No"}),(0,t.jsx)("option",{value:"Yes",children:"Yes"})]})]})}function f(e){let{targetField:l,currentTable:a,database:s,tableFields:i,setTableFields:m,setFieldData:f,user:v,fieldIndex:g}=e,[N,y]=n.useState(!1),j=n.useRef(x().cloneDeep(l));return n.useEffect(()=>{},[]),(0,t.jsxs)(n.Fragment,{children:[(0,t.jsx)("span",{className:"button outlined gray mt-5 w-full xl:w-auto",onClick:()=>{y(!0)},children:"More"}),(0,t.jsx)(p.A,{open:N,onClose:()=>{j.current&&(l=x().cloneDeep(j.current)),y(!1)},maxWidth:"600px",children:(0,t.jsxs)("div",{className:"m-auto flex flex-col max-w-xl w-full max-h-[90vh] overflow-y-auto",children:[(0,t.jsx)("div",{className:"w-full justify-between",children:(0,t.jsx)("span",{className:"text-xl",children:"More Options"})}),(0,t.jsx)(d,{targetField:l}),(0,t.jsx)(h,{targetField:l,setFieldData:f}),(0,t.jsx)(r,{targetField:l,setFieldData:f}),a&&(0,t.jsx)(o.A,{targetField:l,setFieldData:f,database:s,tableFields:i,setTableFields:m,currentTable:a,user:v}),(0,t.jsx)(u,{targetField:l,setFieldData:f}),(0,t.jsx)(c,{targetField:l}),(0,t.jsx)("button",{className:"w-full outlined more-padding",onClick:()=>{y(!1)},children:"Done"})]})})]})}},94996:(e,l,a)=>{a.d(l,{A:()=>r});var t=a(74848),n=a(96540),s=a(23698),i=a(620),d=a(21458);function r(e){var l,a,r,o;let{targetField:u,setFieldData:c,tableFields:m,setTableFields:x,database:p,currentTable:h,user:f,setActiveEdit:v,activeClonedTable:g}=e,[N,y]=n.useState(null!=u&&!!u.foreignKey),[j,b]=n.useState(null),[w,T]=n.useState(null),[_,C]=n.useState(null),[F,V]=n.useState(null),[I,k]=n.useState(!1),[S,A]=n.useState("boolean"!=typeof(null===(l=u.foreignKey)||void 0===l?void 0:l.cascadeDelete)||u.foreignKey.cascadeDelete),[E,D]=n.useState("boolean"==typeof(null===(a=u.foreignKey)||void 0===a?void 0:a.cascadeUpdate)&&u.foreignKey.cascadeUpdate);return n.useEffect(()=>{u.foreignKey={...u.foreignKey,cascadeDelete:S,cascadeUpdate:E}},[S,E]),n.useEffect(()=>{if(!N&&!(null==u?void 0:u.foreignKey)){b(null),T(null),C(null),V(null);return}(0,s.A)("/api/getUserSchemaData").then(e=>{if(e.success)try{let a=e.schemaData.filter(e=>e.dbFullName===p.db_full_name),t=h?a[0].tables.filter(e=>e.tableName!==h.tableName):a[0].tables;if(b(t),null==u?void 0:u.foreignKey){var l;let e=t.filter(e=>{var l;return e.tableName===(null==u?void 0:null===(l=u.foreignKey)||void 0===l?void 0:l.destinationTableName)});T(e[0]),(null===(l=e[0])||void 0===l?void 0:l.fields)&&C(e[0].fields)}}catch(e){(0,s.A)("/api/admin/clientError",{method:"post",body:{component:"ForeignKey/fetch-error-getUserSchemaData/lines-65-77",message:e.message,user:f}})}})},[N]),(0,t.jsxs)("div",{className:"flex flex-col items-start gap-2 w-full mt-2 relative",style:{minWidth:"70px"},children:[I&&(0,t.jsx)(i.A,{}),(0,t.jsxs)("label",{htmlFor:"foreign_key_field",className:"flex flex-wrap items-center gap-2 mt-2",children:[(0,t.jsx)("span",{children:"Foreign Key?"}),(0,t.jsxs)("div",{className:"dropdown-wrapper reversed text-sm items-start",children:[(0,t.jsx)("span",{className:"px-2 bg-slate-200 rounded-full hover:bg-slate-100 hidden xl:flex text-slate-600",children:"Info"}),(0,t.jsx)("div",{className:"dropdown mt-0 xl:-mt-2",children:(0,t.jsx)("span",{children:"Foriegn key links the current table to another table"})})]})]}),(0,t.jsxs)("select",{name:"foreign_key_field",id:"foreign_key_field",className:"px-2",defaultValue:(null==u?void 0:u.foreignKey)?"Yes":"No",onChange:e=>{e.target.value.match(/yes/i)?(y(!0),c&&c(e=>(e.foreignKey={foreignKeyName:void 0,destinationTableName:void 0,destinationTableColumnName:void 0,cascadeDelete:!0},e))):(y(!1),c&&c(e=>(delete e.foreignKey,e)))},children:[(0,t.jsx)("option",{value:"No",children:"No"}),(0,t.jsx)("option",{value:"Yes",children:"Yes"})]}),N&&j&&(0,t.jsx)(n.Fragment,{children:(0,t.jsxs)("select",{name:"foreign_key_destination_table_name",id:"foreign_key_destination_table_name",className:"px-2",defaultValue:(null==u?void 0:null===(r=u.foreignKey)||void 0===r?void 0:r.destinationTableName)?u.foreignKey.destinationTableName:void 0,onChange:e=>{var l;let a=e.target;if(null===(l=e.target.value)||void 0===l?void 0:l.match(/--/)){c?c(e=>{let l=e.foreignKey;return l&&(l.destinationTableName=void 0),e}):a.dataset.destinationTableName=void 0;return}let t=j.filter(l=>l.tableName===e.target.value)[0];T(t),(null==t?void 0:t.fields)&&C(t.fields),c?c(l=>{let a=l.foreignKey;return a&&(a.destinationTableName=e.target.value),l}):e.target.dataset.destinationTableName=e.target.value},children:[(0,t.jsx)("option",{value:"--",children:"--Select Table--"}),j.map((e,l)=>(0,t.jsx)("option",{value:e.tableName,children:e.tableFullName},l+1))]})}),w&&_&&(0,t.jsxs)(n.Fragment,{children:[(0,t.jsxs)("select",{name:"foreign_key_destination_table_column_name",id:"foreign_key_destination_table_column_name",className:"px-2",defaultValue:(null==u?void 0:null===(o=u.foreignKey)||void 0===o?void 0:o.destinationTableColumnName)?u.foreignKey.destinationTableColumnName:void 0,onChange:e=>{try{var l;let a=_.filter(l=>l.fieldName===e.target.value)[0];if(V(a),null===(l=e.target.value)||void 0===l?void 0:l.match(/--/)){c&&c(e=>{let l=e.foreignKey;return l&&(l.destinationTableColumnName=void 0),e});return}let t="dsql_".concat(p.user_id,"_").concat(p.db_slug,"_").concat(Date.now());c?c(e=>{e.dataType=a.dataType;let l=e.foreignKey;return l&&(l.destinationTableColumnName=a.fieldName,l.destinationTableColumnType=a.dataType,l.foreignKeyName=t),e}):(e.target.dataset.dataType=a.dataType,e.target.dataset.destinationTableColumnName=a.fieldName,e.target.dataset.foreignKeyName=t)}catch(e){(0,s.A)("/api/admin/clientError",{method:"post",body:{component:"ForeignKey/lines-232-264",message:e.message,user:f}})}},children:[(0,t.jsx)("option",{value:"--",children:"--Select Column--"}),_.map((e,l)=>(0,t.jsx)("option",{value:e.fieldName,children:e.fieldName},l+1))]}),g&&F&&(0,t.jsx)("button",{className:"secondary w-full",onClick:e=>{var l,a;k(!0),(0,s.A)("/api/updateClonedTableForeignKeys",{method:"post",body:{tableData:h,database:p.db_full_name,dbSlug:p.db_slug,delegated:null!==(a=window.location)&&void 0!==a&&null!==(l=a.search)&&void 0!==l&&!!l.match(/delegated=true/i)}},!0).then(e=>{e.success?window.alert("Foreign Key Added Successfully!"):window.alert("Update Failed, Please Try again."),setTimeout(()=>{v&&v(!1)},1e3)})},children:"Add Foreign Key"}),(0,t.jsx)(d.A,{checkBoxValues:[{title:"Cascade Delete",default:S,name:"cascade-delete",onChangeHandler:e=>{A(e.target.checked)}},{title:"Cascade Update",name:"cascade-update",default:E,onChangeHandler:e=>{D(e.target.checked)}}],smallText:!0})]}),g&&(0,t.jsx)("button",{className:"light-gray w-full",onClick:e=>{delete u.foreignKey,v&&v(!1)},children:"Cancel"})]})}},39007:(e,l,a)=>{a.d(l,{A:()=>n});var t=a(74848);function n(e){let{targetField:l}=e;return(0,t.jsxs)("div",{className:"flex flex-col items-start gap-0.5",style:{minWidth:"70px"},children:[(0,t.jsx)("label",{htmlFor:"rich_text_option",children:"Text Type"}),(0,t.jsxs)("select",{name:"rich_text_option",id:"rich_text_option",className:"px-2",onChange:e=>{switch(delete l.json,delete l.richText,delete l.yaml,delete l.html,delete l.javascript,delete l.shell,e.target.value){case"plain":break;case"rte":l.richText=!0;break;case"json":l.json=!0;break;case"yaml":l.yaml=!0;break;case"html":l.html=!0;break;case"css":l.css=!0;break;case"javascript":l.javascript=!0;break;case"shell":l.shell=!0}},defaultValue:l.richText?"rte":l.json?"json":l.yaml?"yaml":l.html?"html":l.javascript?"javascript":l.shell?"shell":l.css?"css":"plain",children:[(0,t.jsx)("option",{value:"plain",children:"Plain Text"}),(0,t.jsx)("option",{value:"rte",children:"Rich Text"}),(0,t.jsx)("option",{value:"json",children:"JSON"}),(0,t.jsx)("option",{value:"yaml",children:"YAML"}),(0,t.jsx)("option",{value:"html",children:"HTML"}),(0,t.jsx)("option",{value:"css",children:"CSS"}),(0,t.jsx)("option",{value:"javascript",children:"Javascript"}),(0,t.jsx)("option",{value:"shell",children:"Shell"})]})]})}a(96540)},21458:(e,l,a)=>{a.d(l,{A:()=>n});var t=a(74848);function n(e){let{name:l,checkBoxValues:a,setAlert:n,labelColor:s,flexRow:i,baseText:d,smallText:r,className:o}=e;return(0,t.jsx)("div",{className:"flex items-start gap-x-4"+(i?" flex-row flex-wrap gap-y-2 ":" flex-col gap-y-4 ")+(o||""),children:a.map((e,a)=>{let{payload:i,title:o,onChangeHandler:u,fixed:c,jsx:m}=e,x=e.name?"".concat(l,"-").concat(e.name):i?l+"-"+i:l;return(0,t.jsxs)("div",{className:"flex items-center"+(e.default&&c?" pointer-events-none":"")+(r?" gap-1 ":" gap-2 ")+((null==e?void 0:e.className)?e.className:""),children:[(0,t.jsx)("input",{className:"m-0"+(r?" w-4 h-4":" w-5 h-5"),type:"checkbox",defaultChecked:!!e.default,name:x,id:x,onChange:l=>{n&&n(null),u&&u(l,e)},value:i,style:{minWidth:"20px"},...e.props}),m||(0,t.jsx)("label",{htmlFor:x,className:"m-0 "+(s||"text-slate-800 dark:text-white/80")+(d||r?" text-base":" text-lg"),children:o})]},a+1)})})}a(96540)},44500:(e,l,a)=>{a.d(l,{A:()=>d});var t=a(74848),n=a(96540),s=a(5338),i=a(76897);function d(e){let{children:l,open:a,setOpen:i,onClose:d,maxWidth:o}=e;return n.useEffect(()=>{if(a){let e=document.createElement("div");e.className="modal-wrapper",(0,s.createRoot)(e).render((0,t.jsx)(r,{onClose:d,maxWidth:o,children:l})),document.body.appendChild(e)}else document.querySelectorAll(".modal-wrapper").forEach(e=>{var l;null===(l=e.parentElement)||void 0===l||l.removeChild(e)})},[a]),(0,t.jsx)(t.Fragment,{})}function r(e){let{children:l,onClose:a,maxWidth:s,open:d}=e,r=n.useRef();return(0,t.jsxs)(n.Fragment,{children:[(0,t.jsx)("div",{className:"modal-cancel",onClick:e=>{o({modalEl:e.target.closest(".modal-wrapper"),closeFn:a})}}),(0,t.jsxs)("div",{className:"modal-content",style:{maxWidth:s||void 0},ref:r,children:[l," ",(0,t.jsx)("button",{className:"ghost modal-cancel-button",onClick:e=>{o({modalEl:e.target.closest(".modal-wrapper"),closeFn:a})},children:(0,t.jsx)(i.A,{})})]})]})}function o(e){var l;let{modalEl:a,closeFn:t}=e;t&&t(),null===(l=a.parentElement)||void 0===l||l.removeChild(a)}},94327:e=>{e.exports=JSON.parse('[{"title":"VARCHAR","name":"VARCHAR","value":"0-255","argument":true,"description":"Varchar is simply letters and numbers within the range 0 - 255","maxValue":255},{"title":"TINYINT","name":"TINYINT","value":"0-100","description":"TINYINT means Integers: 0 to 100","maxValue":127},{"title":"SMALLINT","name":"SMALLINT","value":"0-255","description":"SMALLINT means Integers: 0 to 240933","maxValue":32767},{"title":"MEDIUMINT","name":"MEDIUMINT","value":"0-255","description":"MEDIUMINT means Integers: 0 to 1245568545560","maxValue":8388607},{"title":"INT","name":"INT","value":"0-255","description":"INT means Integers: 0 to 12560","maxValue":2147483647},{"title":"BIGINT","name":"BIGINT","value":"0-255","description":"BIGINT means Integers: 0 to 1245569056767568545560","maxValue":2e+63},{"title":"TINYTEXT","name":"TINYTEXT","value":"0-255","description":"Text with 255 max characters","maxValue":127},{"title":"TEXT","name":"TEXT","value":"0-100","description":"MEDIUMTEXT is just text with max length 16,777,215","maxValue":127},{"title":"MEDIUMTEXT","name":"MEDIUMTEXT","value":"0-255","description":"MEDIUMTEXT is just text with max length 16,777,215","maxValue":127},{"title":"LONGTEXT","name":"LONGTEXT","value":"0-255","description":"LONGTEXT is just text with max length 4,294,967,295","maxValue":127},{"title":"UUID","name":"UUID","valueLiteral":"UUID()","description":"A Unique ID"}]')}}]);