PluginProbe
TablePress – Tables in WordPress made easy / 3.3
TablePress – Tables in WordPress made easy v3.3
3.3.4 3.3.3 3.3.2 3.3.1 trunk 1.12 1.14 1.9.2 2.0.4 2.1.7 2.1.8 2.2 2.2.1 2.2.2 2.2.3 2.2.4 2.2.5 2.3 2.3.1 2.3.2 2.4 2.4.1 2.4.2 2.4.3 2.4.4 All 44 releases
tablepress / admin / js / build / add.js

add.js in TablePress – Tables in WordPress made easy 3.3, at admin/js/build/add.js

1 lines 2.2 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 (()=>{"use strict";const e=window.React,t=window.ReactDOM,n=(window.wp.hooks,window.ReactJSXRuntime),a=window.wp.components,s=window.wp.i18n,l=()=>{const[t,l]=(0,e.useState)({name:"",description:"",rows:5,columns:5}),r=e=>{l(t=>({...t,...e}))};return(0,n.jsxs)(a.Card,{children:[(0,n.jsx)(a.CardHeader,{children:(0,n.jsx)("h2",{children:(0,s.__)("Add New Table","tablepress")})}),(0,n.jsx)(a.CardBody,{children:(0,n.jsxs)(a.__experimentalVStack,{spacing:"20px",style:{maxWidth:"500px"},children:[(0,n.jsx)(a.TextControl,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,name:"table[name]",label:(0,s.__)("Table Name","tablepress"),help:(0,s.__)("The name or title of your table.","tablepress"),value:t.name,onChange:e=>r({name:e})}),(0,n.jsx)(a.TextareaControl,{__nextHasNoMarginBottom:!0,name:"table[description]",label:(0,s.__)("Description","tablepress")+" "+(0,s.__)("(optional)","tablepress"),help:(0,s.__)("A description of the contents of your table.","tablepress"),value:t.description,onChange:e=>r({description:e}),rows:"4"}),(0,n.jsxs)(a.__experimentalHStack,{alignment:"left",spacing:"20px",children:[(0,n.jsx)("div",{style:{width:"150px"},children:(0,n.jsx)(a.__experimentalNumberControl,{__next40pxDefaultSize:!0,name:"table[rows]",label:(0,s.__)("Number of Rows","tablepress"),help:(0,s.__)("The number of rows in your table.","tablepress"),title:(0,s.__)("This field must contain a positive number.","tablepress"),isDragEnabled:!1,value:t.rows,onChange:e=>r({rows:e}),min:1,max:99999,required:!0})}),(0,n.jsx)("div",{style:{width:"150px"},children:(0,n.jsx)(a.__experimentalNumberControl,{__next40pxDefaultSize:!0,name:"table[columns]",label:(0,s.__)("Number of Columns","tablepress"),help:(0,s.__)("The number of columns in your table.","tablepress"),title:(0,s.__)("This field must contain a positive number.","tablepress"),isDragEnabled:!1,value:t.columns,onChange:e=>r({columns:e}),min:1,max:99999,required:!0})})]}),(0,n.jsx)(a.__experimentalHStack,{children:(0,n.jsx)(a.Button,{variant:"primary",type:"submit",text:(0,s.__)("Add Table","tablepress")})})]})})]})};((e,n)=>{const a=document.getElementById("tablepress-add-screen");a&&(0,t.createRoot)(a).render(n)})(0,(0,n.jsx)(l,{}))})();