PluginProbe
WP Data Access – App Builder for Tables, Forms, Charts, Maps & Dashboards / 5.5.85
WP Data Access – App Builder for Tables, Forms, Charts, Maps & Dashboards v5.5.85
5.5.85 5.5.84 5.5.83 5.5.82 5.5.81 5.5.80 5.5.79 5.5.77 5.5.76 5.5.75 5.5.73 5.5.72 5.5.22 5.5.23 5.5.29 5.5.3 5.5.31 5.5.32 5.5.34 5.5.35 5.5.36 5.5.37 5.5.4 5.5.40 5.5.41 All 161 releases
wp-data-access / assets / dist / QueryResultTable-1.0.83-CkzWOXNz.js

QueryResultTable-1.0.83-CkzWOXNz.js in WP Data Access – App Builder for Tables, Forms, Charts, Maps & Dashboards 5.5.85, at assets/dist/QueryResultTable-1.0.83-CkzWOXNz.js

2 lines 2.7 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 import{j as t}from"./tanstack-1.0.83-vdxW-z_W.js";import{r as c}from"./redux-1.0.83-C_HljLTP.js";import{B as u}from"./Box-1.0.83-Cqg2aQ6v.js";import"./vendor-1.0.83-CN03Eozo.js";import"./CircularProgress-1.0.83-C7us6xSc.js";import"./lib-1.0.83-DP604-fF.js";import"./utils-1.0.83-DdPZyaQg.js";import"./Typography-1.0.83-RUNWFUSq.js";const T=c.memo(({queryResults:r})=>{var p,b,i;const s=(e,o,d)=>{const n=o[d]===null?"pp-data-value-null":"";return t.jsx("td",{className:n,children:o[d]},e+d)},l=((p=r==null?void 0:r.status)==null?void 0:p.last_result)??((b=r==null?void 0:r.wpdavar)==null?void 0:b.data);let a=((i=r==null?void 0:r.columns)==null?void 0:i.map(e=>e.Field))??null;return a===null&&Array.isArray(l)&&l.length>0&&(a=Object.keys(l[0])),t.jsx(u,{className:"pp-result-table-container",sx:{borderTopLeftRadius:"4px",borderTopRightRadius:"4px",backgroundColor:"#fff","& table.pp-sql-query-builder-table":{width:"100%",marginBottom:"0 !important",border:"none",borderCollapse:"collapse",borderTopLeftRadius:"4px",borderTopRightRadius:"4px",borderBottomLeftRadius:0,borderBottomRightRadius:0},"& table.pp-sql-query-builder-table thead":{display:"block",overflowY:"scroll",backgroundColor:"#f0f0f1",borderTopLeftRadius:"4px",borderTopRightRadius:"4px",borderBottomLeftRadius:0,borderBottomRightRadius:0},"& table.pp-sql-query-builder-table thead::-webkit-scrollbar":{borderTopRightRadius:"4px"},"& table.pp-sql-query-builder-table tbody":{display:"block",overflowY:"scroll",height:"240px",borderTop:"1px solid #ccc",backgroundColor:"#fff"},"& table.pp-sql-query-builder-table tr":{width:"calc(100% - 1px)",display:"table",tableLayout:"fixed"},"& table.pp-sql-query-builder-table tbody tr:hover":{backgroundColor:"#f5f5f5"},"& table.pp-sql-query-builder-table thead tr th":{borderRight:"1px dotted #ccc",height:"17px",lineHeight:"17px"},"& table.pp-sql-query-builder-table tbody tr td":{borderRight:"1px dotted #ccc",borderBottom:"1px dotted #ccc",borderLeft:0},"& table.pp-sql-query-builder-table tbody tr:first-of-type td":{borderTop:0},"& table.pp-sql-query-builder-table thead tr th, & table.pp-sql-query-builder-table tbody tr td":{overflowWrap:"anywhere",textAlign:"left",padding:"6px"},"& table.pp-sql-query-builder-table tbody td.pp-data-value-null":{fontStyle:"italic",color:"#2271b1"},"& table.pp-sql-query-builder-table tbody td.pp-data-value-null:before":{content:'"(null)"'}},children:l&&Array.isArray(l)&&t.jsxs("table",{className:"pp-sql-query-builder-table",children:[t.jsx("thead",{children:t.jsx("tr",{children:Array.isArray(a)&&a.length>0?t.jsx(t.Fragment,{children:a.map(e=>t.jsx("th",{children:e},e))}):t.jsx("th",{})},"header")}),t.jsx("tbody",{children:l.map((e,o)=>t.jsx("tr",{children:a.map(d=>s(o,e,d))},o))})]})})});export{T as default};
2