AlkantarClanX12

Your IP : 3.14.134.18


Current Path : /home/thanudqk/shenpokertour.com/wp-content/plugins/tablepress/admin/js/build/
Upload File :
Current File : /home/thanudqk/shenpokertour.com/wp-content/plugins/tablepress/admin/js/build/export.js

(()=>{"use strict";const e=window.React,t=window.ReactDOM,l=window.wp.components,a=window.wp.primitives,r=(0,e.createElement)(a.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,e.createElement)(a.Path,{d:"M12 3.2c-4.8 0-8.8 3.9-8.8 8.8 0 4.8 3.9 8.8 8.8 8.8 4.8 0 8.8-3.9 8.8-8.8 0-4.8-4-8.8-8.8-8.8zm0 16c-4 0-7.2-3.3-7.2-7.2C4.8 8 8 4.8 12 4.8s7.2 3.3 7.2 7.2c0 4-3.2 7.2-7.2 7.2zM11 17h2v-6h-2v6zm0-8h2V7h-2v2z"})),s=window.wp.i18n,n=Object.keys(tp.export.tables).length;let o=n+1;o=Math.max(o,3),o=Math.min(o,12);const c=Object.entries(tp.export.tables).map((([t,l])=>{""===l.trim()&&(l=(0,s.__)("(no name)","tablepress"));const a=(0,s.sprintf)((0,s.__)("ID %1$s: %2$s","tablepress"),t,l);return(0,e.createElement)("option",{key:t,value:t},a)})),p=Object.entries(tp.export.exportFormats).map((([t,l])=>(0,e.createElement)("option",{key:t,value:t},l))),m=Object.entries(tp.export.csvDelimiters).map((([t,l])=>(0,e.createElement)("option",{key:t,value:t},l)));((e,l)=>{const a=document.getElementById("tablepress-export-screen");a&&("function"==typeof t.createRoot?(0,t.createRoot)(a).render(l):(0,t.render)(l,a))})(0,(0,e.createElement)((()=>{const[t,a]=(0,e.useState)({selectedTables:tp.export.selectedTables,exportFormat:tp.export.exportFormat,csvDelimiter:tp.export.csvDelimiter,createZipFile:!1,reverseList:!1}),i=t.selectedTables.length>1,b=e=>{const l={...t,...e};a(l)};return(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 top-align",scope:"row"},(0,e.createElement)("label",{htmlFor:"tables-export-list"},(0,s.__)("Tables to Export","tablepress"),":"),tp.export.zipSupportAvailable&&(0,e.createElement)(e.Fragment,null,(0,e.createElement)("br",null),(0,e.createElement)("br",null),(0,e.createElement)("label",{htmlFor:"tables-export-select-all"},(0,e.createElement)("input",{type:"checkbox",id:"tables-export-select-all",checked:t.selectedTables.length===n,onChange:()=>{const e=t.selectedTables.length===n?[]:Object.keys(tp.export.tables);b({selectedTables:e})}})," ",(0,s.__)("Select all","tablepress")),n>12&&(0,e.createElement)(e.Fragment,null,(0,e.createElement)("br",null),(0,e.createElement)("br",null),(0,e.createElement)("label",{htmlFor:"tables-export-reverse-list"},(0,e.createElement)("input",{id:"tables-export-reverse-list",type:"checkbox",checked:t.reverseList,onChange:()=>{b({reverseList:!t.reverseList}),c.reverse()}})," ",(0,s.__)("Reverse list","tablepress"))))),(0,e.createElement)("td",{className:"column-2"},(0,e.createElement)("select",{id:"tables-export-list",size:tp.export.zipSupportAvailable?o:1,multiple:tp.export.zipSupportAvailable,value:t.selectedTables,onChange:e=>{const t=[...e.target.selectedOptions].map((e=>e.value));b({selectedTables:t})},style:{width:"100%"}},c),tp.export.zipSupportAvailable&&(0,e.createElement)(e.Fragment,null,(0,e.createElement)("br",null),(0,e.createElement)("p",{className:"info-text"},(0,e.createElement)(l.Icon,{icon:r}),(0,e.createElement)("span",null,(0,s.sprintf)((0,s.__)("You can select multiple tables by holding down the “%1$s” key or the “%2$s” key for ranges.","tablepress"),window?.navigator?.platform?.includes("Mac")?(0,s._x)("⌘","keyboard shortcut modifier key on a Mac keyboard","tablepress"):(0,s._x)("Ctrl","keyboard key","tablepress"),(0,s._x)("Shift","keyboard key","tablepress"))))))),(0,e.createElement)("tr",null,(0,e.createElement)("th",{className:"column-1",scope:"row"},(0,e.createElement)("label",{htmlFor:"tables-export-format"},(0,s.__)("Export Format","tablepress"),":")),(0,e.createElement)("td",{className:"column-2"},(0,e.createElement)("select",{id:"tables-export-format",name:"export[format]",value:t.exportFormat,onChange:e=>b({exportFormat:e.target.value})},p))),(0,e.createElement)("tr",null,(0,e.createElement)("th",{className:"column-1",scope:"row"},(0,e.createElement)("label",{htmlFor:"tables-export-csv-delimiter"},(0,s.__)("CSV Delimiter","tablepress"),":")),(0,e.createElement)("td",{className:"column-2"},(0,e.createElement)("select",{id:"tables-export-csv-delimiter",name:"export[csv_delimiter]",disabled:"csv"!==t.exportFormat,value:t.csvDelimiter,onChange:e=>b({csvDelimiter:e.target.value})},m),"csv"!==t.exportFormat&&(0,e.createElement)(e.Fragment,null," ",(0,e.createElement)("span",{className:"description"},(0,s.__)("(Only needed for CSV export.)","tablepress"))))),(0,e.createElement)("tr",{className:"bottom-border"},(0,e.createElement)("th",{className:"column-1",scope:"row"},(0,s.__)("ZIP file","tablepress"),":"),(0,e.createElement)("td",{className:"column-2"},tp.export.zipSupportAvailable&&(0,e.createElement)("label",{htmlFor:"tables-export-zip-file"},(0,e.createElement)("input",{type:"checkbox",id:"tables-export-zip-file",checked:t.createZipFile||i,disabled:i,onChange:()=>b({createZipFile:!t.createZipFile})})," ",(0,s.__)("Create a ZIP archive.","tablepress"),i&&(0,e.createElement)(e.Fragment,null," ",(0,e.createElement)("span",{className:"description"},(0,s.__)("(Mandatory if more than one table is selected.)","tablepress")))),!tp.export.zipSupportAvailable&&(0,s.__)("Note: Support for ZIP file creation seems not to be available on this server.","tablepress"))),(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:"export[tables_list]",value:t.selectedTables.join()}),(0,e.createElement)("input",{type:"hidden",name:"export[zip_file]",value:t.createZipFile||i}),(0,e.createElement)("input",{type:"submit",value:(0,s.__)("Download Export File","tablepress"),className:"button button-primary button-large",disabled:0===t.selectedTables.length})))))}),null))})();