Sindbad~EG File Manager

Current Path : /var/www/html/ciautomaq.sumar.com.py/wp-content/plugins/tablepress/admin/js/build/
Upload File :
Current File : /var/www/html/ciautomaq.sumar.com.py/wp-content/plugins/tablepress/admin/js/build/import.js

!function(){"use strict";var e=window.React,t=window.ReactDOM,r=window.wp.i18n;const l={"file-upload":{label:(0,r.__)("File Upload","tablepress"),instruction:(0,r.__)("Select files","tablepress")},url:{label:(0,r.__)("URL","tablepress"),instruction:(0,r.__)("File URL","tablepress")},server:{label:(0,r.__)("File on server","tablepress"),instruction:(0,r.__)("Server Path to file","tablepress")},"form-field":{label:(0,r.__)("Manual Input","tablepress"),instruction:(0,r.__)("Import data","tablepress")}};tp.import.showImportSourceServer||delete l.server;const a=Object.keys(tp.import.tables).length,o=Object.entries(tp.import.tables).map((([t,l])=>{""===l.trim()&&(l=(0,r.__)("(no name)","tablepress"));const a=(0,r.sprintf)((0,r.__)("ID %1$s: %2$s","tablepress"),t,l);return(0,e.createElement)("option",{key:t,value:t},a)}));((e,r)=>{const l=document.getElementById("tablepress-import-screen");l&&("function"==typeof t.createRoot?(0,t.createRoot)(l).render(r):(0,t.render)(r,l))})(0,(0,e.createElement)((()=>{const[t,i]=(0,e.useState)({importSource:tp.import.importSource,importType:tp.import.importType,importFileUpload:[],importUrl:tp.import.importUrl,importServer:tp.import.importServer,importFormField:tp.import.importFormField,importExistingTable:tp.import.importExistingTable,validationHighlighting:!1}),p=(e,r)=>{const l={...t,validationHighlighting:!1,[e]:r};i(l)},m=(0,e.useRef)(null),s=(0,e.useRef)(null),n=(0,e.useRef)(null);(0,e.useEffect)((()=>{jSuites.dropdown(s.current,{autocomplete:!0,placeholder:(0,r.__)("— Select or type —","tablepress"),onchange:(e,t,r,l)=>{i((e=>({...e,validationHighlighting:!1,importExistingTable:l})))}})}),[]),(0,e.useEffect)((()=>{document.getElementById("tablepress_import-import-form").classList.toggle("no-validation-highlighting",!t.validationHighlighting),t.validationHighlighting||(m.current?.setCustomValidity(""),s.current.previousElementSibling.querySelector(".jdropdown-header")?.setCustomValidity(""))}),[t.validationHighlighting]);const c="file-upload"===t.importSource&&(1<t.importFileUpload.length||1===t.importFileUpload.length&&t.importFileUpload[0].name.endsWith(".zip")),d=0===a||"add"===t.importType||c;return(0,e.useEffect)((()=>{s.current.previousElementSibling.classList.toggle("disabled",d)}),[d]),(0,e.createElement)("table",{className:"tablepress-postbox-table fixed"},(0,e.createElement)("tbody",null,(0,e.createElement)("tr",null,(0,e.createElement)("th",{className:"column-1",scope:"row",id:"import-source-header"},(0,r.__)("Import Source","tablepress"),":"),(0,e.createElement)("td",{className:"column-2"},Object.entries(l).map((([r,l])=>(0,e.createElement)("label",{key:r,htmlFor:`tables-import-source-${r}`},(0,e.createElement)("input",{name:"import[source]",id:`tables-import-source-${r}`,type:"radio","aria-labelledby":"import-source-header",value:r,checked:r===t.importSource,onChange:e=>p("importSource",e.target.value)})," ",l.label))))),(0,e.createElement)("tr",{className:"top-border bottom-border"},(0,e.createElement)("th",{className:"column-1 top-align",scope:"row"},(0,e.createElement)("label",{htmlFor:`tables-import-${t.importSource}`},l[t.importSource].instruction,":")),(0,e.createElement)("td",{className:"column-2"},(0,e.createElement)("div",{className:"file-upload-area",style:{display:"file-upload"===t.importSource?"block":"none"}},(0,e.createElement)("input",{name:"import_file_upload[]",id:"tables-import-file-upload",type:"file",multiple:!0,required:"file-upload"===t.importSource,onChange:e=>e.target.files&&p("importFileUpload",e.target.files),onDragEnter:()=>n.current.classList.add("dragover"),onDragLeave:()=>n.current.classList.remove("dragover")}),(0,e.createElement)("div",{ref:n,className:"dropzone"},(0,e.createElement)("span",null,0===t.importFileUpload.length&&(0,r.__)("Click to select files, or drag them here.","tablepress"),0<t.importFileUpload.length&&(0,r.sprintf)((0,r._n)("You have selected %1$d file:","You have selected %1$d files:",t.importFileUpload.length,"tablepress"),t.importFileUpload.length)),[...t.importFileUpload].map((t=>(0,e.createElement)("span",{key:t.name},t.name))))),"url"===t.importSource&&(0,e.createElement)("input",{type:"url",name:"import[url]",id:"tables-import-url",className:"large-text code",required:!0,value:t.importUrl,onChange:e=>p("importUrl",e.target.value)}),tp.import.showImportSourceServer&&"server"===t.importSource&&(0,e.createElement)("input",{ref:m,type:"text",name:"import[server]",id:"tables-import-server",className:"large-text code",required:!0,value:t.importServer,onChange:e=>p("importServer",e.target.value)}),"form-field"===t.importSource&&(0,e.createElement)("textarea",{name:"import[form-field]",id:"tables-import-form-field",rows:"15",cols:"40",className:"large-text code",required:!0,value:t.importFormField,onChange:e=>p("importFormField",e.target.value)}),tp.import.zipSupportAvailable&&"form-field"!==t.importSource&&(0,e.createElement)("span",{className:"description"},(0,r.__)("You can also import multiple tables by placing them in a ZIP file.","tablepress")))),(0,e.createElement)("tr",{className:"top-border"},(0,e.createElement)("th",{className:"column-1",scope:"row",id:"import-type-header"},(0,r.__)("Add, Replace, or Append?","tablepress"),":"),(0,e.createElement)("td",{className:"column-2"},(0,e.createElement)("label",{htmlFor:"tables-import-type-add"},(0,e.createElement)("input",{name:"import[type]",id:"tables-import-type-add",type:"radio","aria-labelledby":"import-type-header",value:"add",checked:"add"===t.importType||0===a,onChange:e=>p("importType",e.target.value)})," ",(0,r.__)("Add as new table","tablepress")),(0,e.createElement)("label",{htmlFor:"tables-import-type-replace"},(0,e.createElement)("input",{name:"import[type]",id:"tables-import-type-replace",type:"radio","aria-labelledby":"import-type-header",value:"replace",disabled:0===a,checked:"replace"===t.importType,onChange:e=>p("importType",e.target.value)})," ",(0,r.__)("Replace existing table","tablepress")),(0,e.createElement)("label",{htmlFor:"tables-import-type-append"},(0,e.createElement)("input",{name:"import[type]",id:"tables-import-type-append",type:"radio","aria-labelledby":"import-type-header",value:"append",disabled:0===a,checked:"append"===t.importType,onChange:e=>p("importType",e.target.value)})," ",(0,r.__)("Append rows to existing table","tablepress")))),(0,e.createElement)("tr",{className:"top-border bottom-border"},(0,e.createElement)("th",{className:"column-1",scope:"row"},(0,e.createElement)("label",{htmlFor:"tables-import-existing-table"},(0,r.__)("Table to replace or append to","tablepress"),":")),(0,e.createElement)("td",{className:"column-2"},(0,e.createElement)("select",{ref:s,id:"tables-import-existing-table",name:"import[existing_table]",disabled:d,value:t.importExistingTable},(0,e.createElement)("option",{value:""}," "),o))),(0,e.createElement)("tr",{className:"top-border"},(0,e.createElement)("td",{className:"column-1"}),(0,e.createElement)("td",{className:"column-2"},(0,e.createElement)("input",{type:"hidden",name:"import[legacy_import]",value:tp.import.legacyImport}),(0,e.createElement)("input",{type:"submit",value:(0,r._x)("Import","button","tablepress"),className:"button button-primary button-large",id:"import-submit-button",onClick:()=>{p("validationHighlighting",!0),"server"===t.importSource&&tp.import.importServer===t.importServer&&m.current.setCustomValidity((0,r.__)("You must specify a path to a file on the server.","tablepress")),d||""!==t.importExistingTable||s.current.previousElementSibling.querySelector(".jdropdown-header").setCustomValidity((0,r.__)("You must select a table.","tablepress"))}})))))}),null))}();

Sindbad File Manager Version 1.0, Coded By Sindbad EG ~ The Terrorists