Plugin Directory

Changeset 3277722


Ignore:
Timestamp:
04/20/2025 05:45:15 PM (11 months ago)
Author:
wprigel
Message:

Release v1.0.2

Location:
table-block/trunk
Files:
23 edited

Legend:

Unmodified
Added
Removed
  • table-block/trunk/build/index.asset.php

    r3209914 r3277722  
    1 <?php return array('dependencies' => array('react', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-data', 'wp-element', 'wp-i18n', 'wp-primitives'), 'version' => '5301198149254fb5a87b');
     1<?php return array('dependencies' => array('react', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-data', 'wp-element', 'wp-i18n', 'wp-primitives'), 'version' => '39023a9de7fe7d69af62');
  • table-block/trunk/build/index.js

    r3209914 r3277722  
    1 (()=>{"use strict";var e,t={438:(e,t,l)=>{var o=l(609);const r=window.wp.blocks,a=window.wp.i18n,n=window.wp.components,c=window.wp.primitives;var s=l(848);const i=(0,s.jsx)(c.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,s.jsx)(c.Path,{d:"m3 5c0-1.10457.89543-2 2-2h13.5c1.1046 0 2 .89543 2 2v13.5c0 1.1046-.8954 2-2 2h-13.5c-1.10457 0-2-.8954-2-2zm2-.5h6v6.5h-6.5v-6c0-.27614.22386-.5.5-.5zm-.5 8v6c0 .2761.22386.5.5.5h6v-6.5zm8 0v6.5h6c.2761 0 .5-.2239.5-.5v-6zm0-8v6.5h6.5v-6c0-.27614-.2239-.5-.5-.5z",fillRule:"evenodd",clipRule:"evenodd"})}),u=window.wp.element,b=window.wp.data,p=window.wp.blockEditor,m=["tablestack/table","tablestack/wootable"],d=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"version":"0.0.2","name":"tablestack/tablewrapper","title":"TableStack","category":"text","icon":"excerpt-view","description":"All in one table builder block for Gutenberg","supports":{"html":false,"align":true},"attributes":{"isDefaultTable":{"type":"boolean","default":false},"isProductTable":{"type":"boolean","default":false}},"textdomain":"table-block","editorScript":"file:./index.js","style":"file:./style-index.css","viewScript":"file:./view.js"}');(0,r.registerBlockType)(d,{icon:{src:(0,o.createElement)("svg",{fill:"#FF4187",viewBox:"0 0 56 56",xmlns:"http://www.w3.org/2000/svg"},(0,o.createElement)("path",{d:"M 7.7148 49.5742 L 48.2852 49.5742 C 53.1836 49.5742 55.6446 47.1367 55.6446 42.3086 L 55.6446 13.6914 C 55.6446 8.8633 53.1836 6.4258 48.2852 6.4258 L 7.7148 6.4258 C 2.8398 6.4258 .3554 8.8398 .3554 13.6914 L .3554 42.3086 C .3554 47.1602 2.8398 49.5742 7.7148 49.5742 Z M 4.1288 13.8789 C 4.1288 11.4414 5.4413 10.1992 7.7851 10.1992 L 26.3476 10.1992 L 26.3476 19.8555 L 4.1288 19.8555 Z M 29.6523 19.8555 L 29.6523 10.1992 L 48.2147 10.1992 C 50.5350 10.1992 51.8708 11.4414 51.8708 13.8789 L 51.8708 19.8555 Z M 29.6523 32.8398 L 29.6523 23.1602 L 51.8708 23.1602 L 51.8708 32.8398 Z M 26.3476 23.1602 L 26.3476 32.8398 L 4.1288 32.8398 L 4.1288 23.1602 Z M 48.2147 45.8008 L 29.6523 45.8008 L 29.6523 36.1445 L 51.8708 36.1445 L 51.8708 42.1211 C 51.8708 44.5586 50.5350 45.8008 48.2147 45.8008 Z M 7.7851 45.8008 C 5.4413 45.8008 4.1288 44.5586 4.1288 42.1211 L 4.1288 36.1445 L 26.3476 36.1445 L 26.3476 45.8008 Z",fill:"#FF4187"}))},edit:function({attributes:e,setAttributes:t,clientId:l}){const{isDefaultTable:c,isProductTable:s}=e,d=(0,p.useBlockProps)(),f=(0,p.useInnerBlocksProps)(d,{renderAppender:!1,allowedBlocks:m}),{replaceInnerBlocks:v}=(0,b.useDispatch)(p.store),[k,w]=(0,o.useState)(2),[_,h]=(0,o.useState)(2),g=(0,b.useSelect)((e=>{const{getBlocks:t}=e("core/block-editor");return t(l)}),[l]),y=(0,o.useRef)(!1);function L(){return void 0!==window.wc}function E(e,o){if(e.preventDefault(),""!==k&&""!==_)if("default"===o){const e=[["tablestack/table",{rows:k,columns:_},Array.from({length:k},((e,t)=>["tablestack/tablerow",{},Array.from({length:_},(()=>["tablestack/tablecell"]))]))]];v(l,(0,r.createBlocksFromInnerBlocksTemplate)(e)),t({isDefaultTable:!0,isProductTable:!1,rows:k,columns:_})}else if("product"===o){if(!L())return void alert("WooCommerce plugin not installed");const e=[["tablestack/wootable",{}]];v(l,(0,r.createBlocksFromInnerBlocksTemplate)(e)),t({isDefaultTable:!1,isProductTable:!0})}}(0,u.useEffect)((()=>{if(!y.current&&g.length>0){const e=g[g.length-1];e&&["tablestack/table","tablestack/wootable"].includes(e.name)&&(y.current=!0,(0,b.dispatch)("core/block-editor").selectBlock(e.clientId))}}),[g]);const C=(0,o.createElement)(n.Placeholder,{label:(0,a.__)("Create Table","table-block"),icon:i,instructions:(0,a.__)("Create a table using block elements","table-block")},(0,o.createElement)("form",{className:"blocks-table__placeholder-form"},(0,o.createElement)(n.TextControl,{__nextHasNoMarginBottom:!0,type:"number",label:(0,a.__)("Column count","table-block"),value:_,onChange:function(e){const t=""===e?"":parseInt(e,10)||2;h(t)},min:"1",className:"blocks-table__placeholder-input"}),(0,o.createElement)(n.TextControl,{__nextHasNoMarginBottom:!0,type:"number",label:(0,a.__)("Row count","table-block"),value:k,onChange:function(e){const t=""===e?"":parseInt(e,10)||2;w(t)},min:"1",className:"blocks-table__placeholder-input"}),(0,o.createElement)(n.Button,{className:"blocks-table__placeholder-button",variant:"primary",type:"submit",onClick:e=>E(e,"default")},(0,a.__)("Create Table","table-block")),L()&&(0,o.createElement)(o.Fragment,null,(0,o.createElement)("span",null,(0,a.__)("Or","table-block")),(0,o.createElement)(n.Button,{className:"blocks-table__placeholder-button",variant:"primary",type:"submit",onClick:e=>E(e,"product")},(0,a.__)("Product Table","table-block"))))),x=(0,o.createElement)(o.Fragment,null,(0,o.createElement)("div",{...f})),B=(0,o.createElement)(o.Fragment,null,(0,o.createElement)("div",{...f}));return(0,o.createElement)(o.Fragment,null,c?x:s?B:C)},save:function(){const e=p.useBlockProps.save(),t=p.useInnerBlocksProps.save(e);return(0,o.createElement)("div",{...t})}})},20:(e,t,l)=>{var o=l(609),r=Symbol.for("react.element"),a=(Symbol.for("react.fragment"),Object.prototype.hasOwnProperty),n=o.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,c={key:!0,ref:!0,__self:!0,__source:!0};t.jsx=function(e,t,l){var o,s={},i=null,u=null;for(o in void 0!==l&&(i=""+l),void 0!==t.key&&(i=""+t.key),void 0!==t.ref&&(u=t.ref),t)a.call(t,o)&&!c.hasOwnProperty(o)&&(s[o]=t[o]);if(e&&e.defaultProps)for(o in t=e.defaultProps)void 0===s[o]&&(s[o]=t[o]);return{$$typeof:r,type:e,key:i,ref:u,props:s,_owner:n.current}}},848:(e,t,l)=>{e.exports=l(20)},609:e=>{e.exports=window.React}},l={};function o(e){var r=l[e];if(void 0!==r)return r.exports;var a=l[e]={exports:{}};return t[e](a,a.exports,o),a.exports}o.m=t,e=[],o.O=(t,l,r,a)=>{if(!l){var n=1/0;for(u=0;u<e.length;u++){l=e[u][0],r=e[u][1],a=e[u][2];for(var c=!0,s=0;s<l.length;s++)(!1&a||n>=a)&&Object.keys(o.O).every((e=>o.O[e](l[s])))?l.splice(s--,1):(c=!1,a<n&&(n=a));if(c){e.splice(u--,1);var i=r();void 0!==i&&(t=i)}}return t}a=a||0;for(var u=e.length;u>0&&e[u-1][2]>a;u--)e[u]=e[u-1];e[u]=[l,r,a]},o.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),(()=>{var e={57:0,350:0};o.O.j=t=>0===e[t];var t=(t,l)=>{var r,a,n=l[0],c=l[1],s=l[2],i=0;if(n.some((t=>0!==e[t]))){for(r in c)o.o(c,r)&&(o.m[r]=c[r]);if(s)var u=s(o)}for(t&&t(l);i<n.length;i++)a=n[i],o.o(e,a)&&e[a]&&e[a][0](),e[a]=0;return o.O(u)},l=self.webpackChunktable_block=self.webpackChunktable_block||[];l.forEach(t.bind(null,0)),l.push=t.bind(null,l.push.bind(l))})();var r=o.O(void 0,[350],(()=>o(438)));r=o.O(r)})();
     1(()=>{"use strict";var e,t={438:(e,t,l)=>{var o=l(609);const r=window.wp.blocks,a=window.wp.i18n,n=window.wp.components,c=window.wp.primitives;var s=l(848);const i=(0,s.jsx)(c.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,s.jsx)(c.Path,{d:"m3 5c0-1.10457.89543-2 2-2h13.5c1.1046 0 2 .89543 2 2v13.5c0 1.1046-.8954 2-2 2h-13.5c-1.10457 0-2-.8954-2-2zm2-.5h6v6.5h-6.5v-6c0-.27614.22386-.5.5-.5zm-.5 8v6c0 .2761.22386.5.5.5h6v-6.5zm8 0v6.5h6c.2761 0 .5-.2239.5-.5v-6zm0-8v6.5h6.5v-6c0-.27614-.2239-.5-.5-.5z",fillRule:"evenodd",clipRule:"evenodd"})}),b=window.wp.element,u=window.wp.data,p=window.wp.blockEditor,d=["tablestack/table","tablestack/wootable"],m=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"version":"0.0.2","name":"tablestack/tablewrapper","title":"TableStack","category":"text","icon":"excerpt-view","description":"All in one table builder block for Gutenberg","supports":{"html":false,"align":true},"attributes":{"isDefaultTable":{"type":"boolean","default":false},"isProductTable":{"type":"boolean","default":false}},"textdomain":"table-block","editorScript":"file:./index.js","style":"file:./style-index.css","viewScript":"file:./view.js"}');(0,r.registerBlockType)(m,{icon:{src:(0,o.createElement)("svg",{fill:"#FF4187",viewBox:"0 0 56 56",xmlns:"http://www.w3.org/2000/svg"},(0,o.createElement)("path",{d:"M 7.7148 49.5742 L 48.2852 49.5742 C 53.1836 49.5742 55.6446 47.1367 55.6446 42.3086 L 55.6446 13.6914 C 55.6446 8.8633 53.1836 6.4258 48.2852 6.4258 L 7.7148 6.4258 C 2.8398 6.4258 .3554 8.8398 .3554 13.6914 L .3554 42.3086 C .3554 47.1602 2.8398 49.5742 7.7148 49.5742 Z M 4.1288 13.8789 C 4.1288 11.4414 5.4413 10.1992 7.7851 10.1992 L 26.3476 10.1992 L 26.3476 19.8555 L 4.1288 19.8555 Z M 29.6523 19.8555 L 29.6523 10.1992 L 48.2147 10.1992 C 50.5350 10.1992 51.8708 11.4414 51.8708 13.8789 L 51.8708 19.8555 Z M 29.6523 32.8398 L 29.6523 23.1602 L 51.8708 23.1602 L 51.8708 32.8398 Z M 26.3476 23.1602 L 26.3476 32.8398 L 4.1288 32.8398 L 4.1288 23.1602 Z M 48.2147 45.8008 L 29.6523 45.8008 L 29.6523 36.1445 L 51.8708 36.1445 L 51.8708 42.1211 C 51.8708 44.5586 50.5350 45.8008 48.2147 45.8008 Z M 7.7851 45.8008 C 5.4413 45.8008 4.1288 44.5586 4.1288 42.1211 L 4.1288 36.1445 L 26.3476 36.1445 L 26.3476 45.8008 Z",fill:"#FF4187"}))},edit:function({attributes:e,setAttributes:t,clientId:l}){const{isDefaultTable:c,isProductTable:s}=e,m=(0,p.useBlockProps)(),f=(0,p.useInnerBlocksProps)(m,{renderAppender:!1,allowedBlocks:d}),{replaceInnerBlocks:k}=(0,u.useDispatch)(p.store),[v,w]=(0,b.useState)(2),[_,h]=(0,b.useState)(2),g=(0,u.useSelect)((e=>{const{getBlocks:t}=e("core/block-editor");return t(l)}),[l]),{selectBlock:y}=(0,u.useDispatch)("core/block-editor"),{selectedBlockClientId:B,getBlock:C}=(0,u.useSelect)((e=>{const t=e("core/block-editor");return{selectedBlockClientId:t.getSelectedBlockClientId(),getBlock:t.getBlock}}));function L(){return void 0!==window.wc}function E(e,o){if(e.preventDefault(),""!==v&&""!==_)if("default"===o){const e=[["tablestack/table",{rows:v,columns:_},Array.from({length:v},((e,t)=>["tablestack/tablerow",{},Array.from({length:_},(()=>["tablestack/tablecell"]))]))]];k(l,(0,r.createBlocksFromInnerBlocksTemplate)(e)),t({isDefaultTable:!0,isProductTable:!1,rows:v,columns:_})}else if("product"===o){if(!L())return void alert("WooCommerce plugin not installed");const e=[["tablestack/wootable",{}]];k(l,(0,r.createBlocksFromInnerBlocksTemplate)(e)),t({isDefaultTable:!1,isProductTable:!0})}}(0,b.useEffect)((()=>{if(B===l){const e=g.find((e=>["tablestack/table","tablestack/wootable"].includes(e.name)));e&&y(e.clientId)}}),[B,l,g,y]);const x=(0,o.createElement)(n.Placeholder,{label:(0,a.__)("Create Table","table-block"),icon:i,instructions:(0,a.__)("Create a table using block elements","table-block")},(0,o.createElement)("form",{className:"blocks-table__placeholder-form"},(0,o.createElement)(n.TextControl,{__nextHasNoMarginBottom:!0,type:"number",label:(0,a.__)("Column count","table-block"),value:_,onChange:function(e){const t=""===e?"":parseInt(e,10)||2;h(t)},min:"1",className:"blocks-table__placeholder-input"}),(0,o.createElement)(n.TextControl,{__nextHasNoMarginBottom:!0,type:"number",label:(0,a.__)("Row count","table-block"),value:v,onChange:function(e){const t=""===e?"":parseInt(e,10)||2;w(t)},min:"1",className:"blocks-table__placeholder-input"}),(0,o.createElement)(n.Button,{className:"blocks-table__placeholder-button",variant:"primary",type:"submit",onClick:e=>E(e,"default")},(0,a.__)("Create Table","table-block")),L()&&(0,o.createElement)(o.Fragment,null,(0,o.createElement)("span",null,(0,a.__)("Or","table-block")),(0,o.createElement)(n.Button,{className:"blocks-table__placeholder-button",variant:"primary",type:"submit",onClick:e=>E(e,"product")},(0,a.__)("Product Table","table-block"))))),O=(0,o.createElement)(o.Fragment,null,(0,o.createElement)("div",{...f})),T=(0,o.createElement)(o.Fragment,null,(0,o.createElement)("div",{...f}));return(0,o.createElement)(o.Fragment,null,c?O:s?T:x)},save:function(){const e=p.useBlockProps.save(),t=p.useInnerBlocksProps.save(e);return(0,o.createElement)("div",{...t})}})},20:(e,t,l)=>{var o=l(609),r=Symbol.for("react.element"),a=(Symbol.for("react.fragment"),Object.prototype.hasOwnProperty),n=o.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,c={key:!0,ref:!0,__self:!0,__source:!0};t.jsx=function(e,t,l){var o,s={},i=null,b=null;for(o in void 0!==l&&(i=""+l),void 0!==t.key&&(i=""+t.key),void 0!==t.ref&&(b=t.ref),t)a.call(t,o)&&!c.hasOwnProperty(o)&&(s[o]=t[o]);if(e&&e.defaultProps)for(o in t=e.defaultProps)void 0===s[o]&&(s[o]=t[o]);return{$$typeof:r,type:e,key:i,ref:b,props:s,_owner:n.current}}},848:(e,t,l)=>{e.exports=l(20)},609:e=>{e.exports=window.React}},l={};function o(e){var r=l[e];if(void 0!==r)return r.exports;var a=l[e]={exports:{}};return t[e](a,a.exports,o),a.exports}o.m=t,e=[],o.O=(t,l,r,a)=>{if(!l){var n=1/0;for(b=0;b<e.length;b++){l=e[b][0],r=e[b][1],a=e[b][2];for(var c=!0,s=0;s<l.length;s++)(!1&a||n>=a)&&Object.keys(o.O).every((e=>o.O[e](l[s])))?l.splice(s--,1):(c=!1,a<n&&(n=a));if(c){e.splice(b--,1);var i=r();void 0!==i&&(t=i)}}return t}a=a||0;for(var b=e.length;b>0&&e[b-1][2]>a;b--)e[b]=e[b-1];e[b]=[l,r,a]},o.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),(()=>{var e={57:0,350:0};o.O.j=t=>0===e[t];var t=(t,l)=>{var r,a,n=l[0],c=l[1],s=l[2],i=0;if(n.some((t=>0!==e[t]))){for(r in c)o.o(c,r)&&(o.m[r]=c[r]);if(s)var b=s(o)}for(t&&t(l);i<n.length;i++)a=n[i],o.o(e,a)&&e[a]&&e[a][0](),e[a]=0;return o.O(b)},l=self.webpackChunktable_block=self.webpackChunktable_block||[];l.forEach(t.bind(null,0)),l.push=t.bind(null,l.push.bind(l))})();var r=o.O(void 0,[350],(()=>o(438)));r=o.O(r)})();
  • table-block/trunk/build/style-index-rtl.css

    r3209914 r3277722  
    1 .wp-block-create-block-table-stack{background-color:#21759b;color:#fff;padding:2px}.wp-block-tablestack-tablewrapper table.is-style-rounded-table tr:first-of-type{border-top-right-radius:10px;border-top-left-radius:10px}.wp-block-tablestack-tablewrapper table.is-style-rounded-table tr:first-of-type td:first-of-type,.wp-block-tablestack-tablewrapper table.is-style-rounded-table tr:first-of-type th:first-of-type{border-top-right-radius:10px}.wp-block-tablestack-tablewrapper table.is-style-rounded-table tr:first-of-type td:last-of-type,.wp-block-tablestack-tablewrapper table.is-style-rounded-table tr:first-of-type th:last-of-type{border-top-left-radius:10px}.wp-block-tablestack-tablewrapper table.is-style-rounded-table tr:last-of-type{border-bottom-right-radius:10px;border-bottom-left-radius:10px}.wp-block-tablestack-tablewrapper table.is-style-rounded-table tr:last-of-type td:first-of-type{border-bottom-right-radius:10px}.wp-block-tablestack-tablewrapper table.is-style-rounded-table tr:last-of-type td:last-of-type{border-bottom-left-radius:10px}.wp-block-tablestack-tablewrapper table.wp-block-tablestack-table{border-collapse:collapse;border-color:var(--tablestack-table-border-color);border-style:var(--tablestack-table-border-style);border-width:var(--tablestack-table-border-width);margin:0;padding:0;width:100%}.wp-block-tablestack-tablewrapper table.wp-block-tablestack-table td+td{border-right:var(--tablestack-column-only-border-width) var(--tablestack-column-only-border-style) var(--tablestack-column-only-border-color)}.wp-block-tablestack-tablewrapper table.wp-block-tablestack-table td,.wp-block-tablestack-tablewrapper table.wp-block-tablestack-table th{border-color:var(--tablestack-table-cell-border-color);border-style:var(--tablestack-table-cell-border-style);border-width:var(--tablestack-table-cell-border-width);word-wrap:break-word}.wp-block-tablestack-tablewrapper table.wp-block-tablestack-table td div.cell-container,.wp-block-tablestack-tablewrapper table.wp-block-tablestack-table th div.cell-container{align-items:var(--tablestack-cell-horizontal-alignment);display:flex;flex-direction:column}.wp-block-tablestack-tablewrapper table.wp-block-tablestack-table td div.cell-container p,.wp-block-tablestack-tablewrapper table.wp-block-tablestack-table th div.cell-container p{margin:0;padding:0;width:100%}.wp-block-tablestack-tablewrapper table.wp-block-tablestack-table td div.cell-container p span,.wp-block-tablestack-tablewrapper table.wp-block-tablestack-table th div.cell-container p span{font-size:14px}.wp-block-tablestack-tablewrapper table.wp-block-tablestack-table td div.cell-container ol,.wp-block-tablestack-tablewrapper table.wp-block-tablestack-table td div.cell-container ul,.wp-block-tablestack-tablewrapper table.wp-block-tablestack-table th div.cell-container ol,.wp-block-tablestack-tablewrapper table.wp-block-tablestack-table th div.cell-container ul{margin:0}.wp-block-tablestack-tablewrapper table.wp-block-tablestack-table td,.wp-block-tablestack-tablewrapper table.wp-block-tablestack-table th{vertical-align:var(--tablestack-cell-vertical-alignment);white-space:normal}.wp-block-tablestack-tablewrapper table.wp-block-tablestack-table caption{font-size:1.5em;margin:.5em 0 .75em}.wp-block-tablestack-tablewrapper table.wp-block-tablestack-table tr:not(.header-row):nth-child(2n){background-color:var(--tablestack-even-row-bg-color);color:var(--tablestack-even-row-text-color)}.wp-block-tablestack-tablewrapper table.wp-block-tablestack-table tr:not(.header-row):nth-child(odd){background-color:var(--tablestack-odd-row-bg-color);color:var(--tablestack-odd-row-text-color)}.wp-block-tablestack-tablewrapper table.wp-block-tablestack-table tr.header-row{background-color:var(--tablestack-header-row-bg-color);color:var(--tablestack-header-row-text-color)}.wp-block-tablestack-tablewrapper table.wp-block-tablestack-table td,.wp-block-tablestack-tablewrapper table.wp-block-tablestack-table th{padding:var(--tablestack-padding-top) var(--tablestack-padding-left) var(--tablestack-padding-bottom) var(--tablestack-padding-right)}.wp-block-tablestack-tablewrapper table.wp-block-tablestack-table th{font-size:.85em;letter-spacing:.1em}.wp-block-tablestack-tablewrapper table.wp-block-tablestack-table tbody.body-loading{opacity:.5;transition:opacity .7s ease-in}@media screen and (max-width:600px){.wp-block-tablestack-tablewrapper table.wp-block-tablestack-table{border:0;border-collapse:collapse}.wp-block-tablestack-tablewrapper table.wp-block-tablestack-table caption{font-size:1.3em}.wp-block-tablestack-tablewrapper table.wp-block-tablestack-table tr.header-row{border:none;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px}.wp-block-tablestack-tablewrapper table.wp-block-tablestack-table tr{border-bottom:3px solid #ddd;display:block}.wp-block-tablestack-tablewrapper table.wp-block-tablestack-table td{align-items:center;display:flex;font-size:.8em;justify-content:space-between;text-align:left}.wp-block-tablestack-tablewrapper table.wp-block-tablestack-table td:before{content:attr(data-label);float:right;font-weight:700}.wp-block-tablestack-tablewrapper table.wp-block-tablestack-table td div.cell-container{align-items:end}}
     1.wp-block-create-block-table-stack{background-color:#21759b;color:#fff;padding:2px}.wp-block-tablestack-tablewrapper .wp-block-tablestack-table{border-color:var(--tablestack-table-border-color);border-radius:var(--tablestack-table-border-radius);border-style:var(--tablestack-table-border-style);border-width:var(--tablestack-table-border-width);overflow:hidden}.wp-block-tablestack-tablewrapper .wp-block-tablestack-table table{border:unset;border-collapse:collapse;margin:0;padding:0;width:100%}.wp-block-tablestack-tablewrapper .wp-block-tablestack-table table tr:not(:last-child) td,.wp-block-tablestack-tablewrapper .wp-block-tablestack-table table tr:not(:last-child) th{border-bottom:var(--tablestack-table-border-width) var(--tablestack-table-border-style) var(--tablestack-table-border-color)}.wp-block-tablestack-tablewrapper .wp-block-tablestack-table table tr:not(.header-row):nth-child(2n){background-color:var(--tablestack-even-row-bg-color);color:var(--tablestack-even-row-text-color)}.wp-block-tablestack-tablewrapper .wp-block-tablestack-table table tr:not(.header-row):nth-child(odd){background-color:var(--tablestack-odd-row-bg-color);color:var(--tablestack-odd-row-text-color)}.wp-block-tablestack-tablewrapper .wp-block-tablestack-table table tr.header-row{background-color:var(--tablestack-header-row-bg-color);color:var(--tablestack-header-row-text-color)}.wp-block-tablestack-tablewrapper .wp-block-tablestack-table table td,.wp-block-tablestack-tablewrapper .wp-block-tablestack-table table th{vertical-align:var(--tablestack-cell-vertical-alignment);white-space:normal;word-wrap:break-word;padding:var(--tablestack-padding-top) var(--tablestack-padding-left) var(--tablestack-padding-bottom) var(--tablestack-padding-right)}.wp-block-tablestack-tablewrapper .wp-block-tablestack-table table td:not(:last-child),.wp-block-tablestack-tablewrapper .wp-block-tablestack-table table th:not(:last-child){border-left:var(--tablestack-table-cell-border-width) var(--tablestack-table-cell-border-style) var(--tablestack-table-cell-border-color)}.wp-block-tablestack-tablewrapper .wp-block-tablestack-table table td div.cell-container,.wp-block-tablestack-tablewrapper .wp-block-tablestack-table table th div.cell-container{align-items:var(--tablestack-cell-horizontal-alignment);display:flex;flex-direction:column}.wp-block-tablestack-tablewrapper .wp-block-tablestack-table table td div.cell-container p,.wp-block-tablestack-tablewrapper .wp-block-tablestack-table table th div.cell-container p{margin:0;padding:0;width:100%}.wp-block-tablestack-tablewrapper .wp-block-tablestack-table table td div.cell-container p span,.wp-block-tablestack-tablewrapper .wp-block-tablestack-table table th div.cell-container p span{font-size:14px}.wp-block-tablestack-tablewrapper .wp-block-tablestack-table table td div.cell-container ol,.wp-block-tablestack-tablewrapper .wp-block-tablestack-table table td div.cell-container ul,.wp-block-tablestack-tablewrapper .wp-block-tablestack-table table th div.cell-container ol,.wp-block-tablestack-tablewrapper .wp-block-tablestack-table table th div.cell-container ul{margin:0}.wp-block-tablestack-tablewrapper .wp-block-tablestack-table table th{font-size:.85em;letter-spacing:.1em}.wp-block-tablestack-tablewrapper .wp-block-tablestack-table table caption{font-size:1.5em;margin:.5em 0 .75em}.wp-block-tablestack-tablewrapper .wp-block-tablestack-table table tbody.body-loading{opacity:.5;transition:opacity .7s ease-in}@media screen and (max-width:600px){.wp-block-tablestack-tablewrapper table.wp-block-tablestack-table{border:0;border-collapse:collapse}.wp-block-tablestack-tablewrapper table.wp-block-tablestack-table caption{font-size:1.3em}.wp-block-tablestack-tablewrapper table.wp-block-tablestack-table tr.header-row{border:none;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px}.wp-block-tablestack-tablewrapper table.wp-block-tablestack-table tr{display:block}.wp-block-tablestack-tablewrapper table.wp-block-tablestack-table td{align-items:center;display:flex;font-size:.8em;justify-content:space-between;text-align:left}.wp-block-tablestack-tablewrapper table.wp-block-tablestack-table td:before{content:attr(data-label);float:right;font-weight:700}.wp-block-tablestack-tablewrapper table.wp-block-tablestack-table td div.cell-container{align-items:end}}
  • table-block/trunk/build/style-index.css

    r3209914 r3277722  
    1 .wp-block-create-block-table-stack{background-color:#21759b;color:#fff;padding:2px}.wp-block-tablestack-tablewrapper table.is-style-rounded-table tr:first-of-type{border-top-left-radius:10px;border-top-right-radius:10px}.wp-block-tablestack-tablewrapper table.is-style-rounded-table tr:first-of-type td:first-of-type,.wp-block-tablestack-tablewrapper table.is-style-rounded-table tr:first-of-type th:first-of-type{border-top-left-radius:10px}.wp-block-tablestack-tablewrapper table.is-style-rounded-table tr:first-of-type td:last-of-type,.wp-block-tablestack-tablewrapper table.is-style-rounded-table tr:first-of-type th:last-of-type{border-top-right-radius:10px}.wp-block-tablestack-tablewrapper table.is-style-rounded-table tr:last-of-type{border-bottom-left-radius:10px;border-bottom-right-radius:10px}.wp-block-tablestack-tablewrapper table.is-style-rounded-table tr:last-of-type td:first-of-type{border-bottom-left-radius:10px}.wp-block-tablestack-tablewrapper table.is-style-rounded-table tr:last-of-type td:last-of-type{border-bottom-right-radius:10px}.wp-block-tablestack-tablewrapper table.wp-block-tablestack-table{border-collapse:collapse;border-color:var(--tablestack-table-border-color);border-style:var(--tablestack-table-border-style);border-width:var(--tablestack-table-border-width);margin:0;padding:0;width:100%}.wp-block-tablestack-tablewrapper table.wp-block-tablestack-table td+td{border-left:var(--tablestack-column-only-border-width) var(--tablestack-column-only-border-style) var(--tablestack-column-only-border-color)}.wp-block-tablestack-tablewrapper table.wp-block-tablestack-table td,.wp-block-tablestack-tablewrapper table.wp-block-tablestack-table th{border-color:var(--tablestack-table-cell-border-color);border-style:var(--tablestack-table-cell-border-style);border-width:var(--tablestack-table-cell-border-width);word-wrap:break-word}.wp-block-tablestack-tablewrapper table.wp-block-tablestack-table td div.cell-container,.wp-block-tablestack-tablewrapper table.wp-block-tablestack-table th div.cell-container{align-items:var(--tablestack-cell-horizontal-alignment);display:flex;flex-direction:column}.wp-block-tablestack-tablewrapper table.wp-block-tablestack-table td div.cell-container p,.wp-block-tablestack-tablewrapper table.wp-block-tablestack-table th div.cell-container p{margin:0;padding:0;width:100%}.wp-block-tablestack-tablewrapper table.wp-block-tablestack-table td div.cell-container p span,.wp-block-tablestack-tablewrapper table.wp-block-tablestack-table th div.cell-container p span{font-size:14px}.wp-block-tablestack-tablewrapper table.wp-block-tablestack-table td div.cell-container ol,.wp-block-tablestack-tablewrapper table.wp-block-tablestack-table td div.cell-container ul,.wp-block-tablestack-tablewrapper table.wp-block-tablestack-table th div.cell-container ol,.wp-block-tablestack-tablewrapper table.wp-block-tablestack-table th div.cell-container ul{margin:0}.wp-block-tablestack-tablewrapper table.wp-block-tablestack-table td,.wp-block-tablestack-tablewrapper table.wp-block-tablestack-table th{vertical-align:var(--tablestack-cell-vertical-alignment);white-space:normal}.wp-block-tablestack-tablewrapper table.wp-block-tablestack-table caption{font-size:1.5em;margin:.5em 0 .75em}.wp-block-tablestack-tablewrapper table.wp-block-tablestack-table tr:not(.header-row):nth-child(2n){background-color:var(--tablestack-even-row-bg-color);color:var(--tablestack-even-row-text-color)}.wp-block-tablestack-tablewrapper table.wp-block-tablestack-table tr:not(.header-row):nth-child(odd){background-color:var(--tablestack-odd-row-bg-color);color:var(--tablestack-odd-row-text-color)}.wp-block-tablestack-tablewrapper table.wp-block-tablestack-table tr.header-row{background-color:var(--tablestack-header-row-bg-color);color:var(--tablestack-header-row-text-color)}.wp-block-tablestack-tablewrapper table.wp-block-tablestack-table td,.wp-block-tablestack-tablewrapper table.wp-block-tablestack-table th{padding:var(--tablestack-padding-top) var(--tablestack-padding-right) var(--tablestack-padding-bottom) var(--tablestack-padding-left)}.wp-block-tablestack-tablewrapper table.wp-block-tablestack-table th{font-size:.85em;letter-spacing:.1em}.wp-block-tablestack-tablewrapper table.wp-block-tablestack-table tbody.body-loading{opacity:.5;transition:opacity .7s ease-in}@media screen and (max-width:600px){.wp-block-tablestack-tablewrapper table.wp-block-tablestack-table{border:0;border-collapse:collapse}.wp-block-tablestack-tablewrapper table.wp-block-tablestack-table caption{font-size:1.3em}.wp-block-tablestack-tablewrapper table.wp-block-tablestack-table tr.header-row{border:none;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px}.wp-block-tablestack-tablewrapper table.wp-block-tablestack-table tr{border-bottom:3px solid #ddd;display:block}.wp-block-tablestack-tablewrapper table.wp-block-tablestack-table td{align-items:center;display:flex;font-size:.8em;justify-content:space-between;text-align:right}.wp-block-tablestack-tablewrapper table.wp-block-tablestack-table td:before{content:attr(data-label);float:left;font-weight:700}.wp-block-tablestack-tablewrapper table.wp-block-tablestack-table td div.cell-container{align-items:end}}
     1.wp-block-create-block-table-stack{background-color:#21759b;color:#fff;padding:2px}.wp-block-tablestack-tablewrapper .wp-block-tablestack-table{border-color:var(--tablestack-table-border-color);border-radius:var(--tablestack-table-border-radius);border-style:var(--tablestack-table-border-style);border-width:var(--tablestack-table-border-width);overflow:hidden}.wp-block-tablestack-tablewrapper .wp-block-tablestack-table table{border:unset;border-collapse:collapse;margin:0;padding:0;width:100%}.wp-block-tablestack-tablewrapper .wp-block-tablestack-table table tr:not(:last-child) td,.wp-block-tablestack-tablewrapper .wp-block-tablestack-table table tr:not(:last-child) th{border-bottom:var(--tablestack-table-border-width) var(--tablestack-table-border-style) var(--tablestack-table-border-color)}.wp-block-tablestack-tablewrapper .wp-block-tablestack-table table tr:not(.header-row):nth-child(2n){background-color:var(--tablestack-even-row-bg-color);color:var(--tablestack-even-row-text-color)}.wp-block-tablestack-tablewrapper .wp-block-tablestack-table table tr:not(.header-row):nth-child(odd){background-color:var(--tablestack-odd-row-bg-color);color:var(--tablestack-odd-row-text-color)}.wp-block-tablestack-tablewrapper .wp-block-tablestack-table table tr.header-row{background-color:var(--tablestack-header-row-bg-color);color:var(--tablestack-header-row-text-color)}.wp-block-tablestack-tablewrapper .wp-block-tablestack-table table td,.wp-block-tablestack-tablewrapper .wp-block-tablestack-table table th{vertical-align:var(--tablestack-cell-vertical-alignment);white-space:normal;word-wrap:break-word;padding:var(--tablestack-padding-top) var(--tablestack-padding-right) var(--tablestack-padding-bottom) var(--tablestack-padding-left)}.wp-block-tablestack-tablewrapper .wp-block-tablestack-table table td:not(:last-child),.wp-block-tablestack-tablewrapper .wp-block-tablestack-table table th:not(:last-child){border-right:var(--tablestack-table-cell-border-width) var(--tablestack-table-cell-border-style) var(--tablestack-table-cell-border-color)}.wp-block-tablestack-tablewrapper .wp-block-tablestack-table table td div.cell-container,.wp-block-tablestack-tablewrapper .wp-block-tablestack-table table th div.cell-container{align-items:var(--tablestack-cell-horizontal-alignment);display:flex;flex-direction:column}.wp-block-tablestack-tablewrapper .wp-block-tablestack-table table td div.cell-container p,.wp-block-tablestack-tablewrapper .wp-block-tablestack-table table th div.cell-container p{margin:0;padding:0;width:100%}.wp-block-tablestack-tablewrapper .wp-block-tablestack-table table td div.cell-container p span,.wp-block-tablestack-tablewrapper .wp-block-tablestack-table table th div.cell-container p span{font-size:14px}.wp-block-tablestack-tablewrapper .wp-block-tablestack-table table td div.cell-container ol,.wp-block-tablestack-tablewrapper .wp-block-tablestack-table table td div.cell-container ul,.wp-block-tablestack-tablewrapper .wp-block-tablestack-table table th div.cell-container ol,.wp-block-tablestack-tablewrapper .wp-block-tablestack-table table th div.cell-container ul{margin:0}.wp-block-tablestack-tablewrapper .wp-block-tablestack-table table th{font-size:.85em;letter-spacing:.1em}.wp-block-tablestack-tablewrapper .wp-block-tablestack-table table caption{font-size:1.5em;margin:.5em 0 .75em}.wp-block-tablestack-tablewrapper .wp-block-tablestack-table table tbody.body-loading{opacity:.5;transition:opacity .7s ease-in}@media screen and (max-width:600px){.wp-block-tablestack-tablewrapper table.wp-block-tablestack-table{border:0;border-collapse:collapse}.wp-block-tablestack-tablewrapper table.wp-block-tablestack-table caption{font-size:1.3em}.wp-block-tablestack-tablewrapper table.wp-block-tablestack-table tr.header-row{border:none;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px}.wp-block-tablestack-tablewrapper table.wp-block-tablestack-table tr{display:block}.wp-block-tablestack-tablewrapper table.wp-block-tablestack-table td{align-items:center;display:flex;font-size:.8em;justify-content:space-between;text-align:right}.wp-block-tablestack-tablewrapper table.wp-block-tablestack-table td:before{content:attr(data-label);float:left;font-weight:700}.wp-block-tablestack-tablewrapper table.wp-block-tablestack-table td div.cell-container{align-items:end}}
  • table-block/trunk/build/table/block.json

    r3209914 r3277722  
    8181      }
    8282    },
     83    "tableBorderRadius": {
     84      "type": "number",
     85      "default": "0"
     86    },
    8387    "columnOnlyBorder": {
    8488      "type": "object",
  • table-block/trunk/build/table/index.asset.php

    r3209914 r3277722  
    1 <?php return array('dependencies' => array('react', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-data', 'wp-element', 'wp-i18n', 'wp-primitives'), 'version' => '28d57215c4bb65076618');
     1<?php return array('dependencies' => array('react', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-data', 'wp-element', 'wp-i18n', 'wp-primitives'), 'version' => 'd8404a0d231f3d7ea326');
  • table-block/trunk/build/table/index.js

    r3209914 r3277722  
    1 (()=>{"use strict";var e={20:(e,t,l)=>{var o=l(609),r=Symbol.for("react.element"),a=(Symbol.for("react.fragment"),Object.prototype.hasOwnProperty),n=o.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,c={key:!0,ref:!0,__self:!0,__source:!0};t.jsx=function(e,t,l){var o,d={},s=null,b=null;for(o in void 0!==l&&(s=""+l),void 0!==t.key&&(s=""+t.key),void 0!==t.ref&&(b=t.ref),t)a.call(t,o)&&!c.hasOwnProperty(o)&&(d[o]=t[o]);if(e&&e.defaultProps)for(o in t=e.defaultProps)void 0===d[o]&&(d[o]=t[o]);return{$$typeof:r,type:e,key:s,ref:b,props:d,_owner:n.current}}},848:(e,t,l)=>{e.exports=l(20)},609:e=>{e.exports=window.React}},t={};function l(o){var r=t[o];if(void 0!==r)return r.exports;var a=t[o]={exports:{}};return e[o](a,a.exports,l),a.exports}const o=window.wp.blocks;var r=l(609);const a=window.wp.blockEditor,n=window.wp.i18n,c=window.wp.components,d=window.wp.data,s=window.wp.element,b=window.wp.primitives;var i=l(848);const w=(0,i.jsx)(b.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,i.jsx)(b.Path,{d:"M13 5.5H4V4h9v1.5Zm7 7H4V11h16v1.5Zm-7 7H4V18h9v1.5Z"})}),k=(0,i.jsx)(b.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,i.jsx)(b.Path,{d:"M7.5 5.5h9V4h-9v1.5Zm-3.5 7h16V11H4v1.5Zm3.5 7h9V18h-9v1.5Z"})}),h=(0,i.jsx)(b.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,i.jsx)(b.Path,{d:"M11.111 5.5H20V4h-8.889v1.5ZM4 12.5h16V11H4v1.5Zm7.111 7H20V18h-8.889v1.5Z"})}),g=(0,r.createElement)(c.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,r.createElement)(c.Path,{d:"M15 4H9v11h6V4zM4 18.5V20h16v-1.5H4z"})),m=(0,r.createElement)(c.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,r.createElement)(c.Path,{d:"M20 11h-5V4H9v7H4v1.5h5V20h6v-7.5h5z"})),u=(0,r.createElement)(c.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,r.createElement)(c.Path,{d:"M9 20h6V9H9v11zM4 4v1.5h16V4H4z"})),p=["tablestack/tablerow","tablestack/tablecell"],v=JSON.parse('{"UU":"tablestack/table"}');(0,o.registerBlockType)(v.UU,{edit:function({attributes:e,setAttributes:t,clientId:l}){const{showTableHeader:b,showColumnOnlyBorder:i,columnOnlyBorder:v,columns:_,evenRowBackground:x,oddRowBackground:B,headerRowBackground:f,headerRowTextColor:C,oddRowTextColor:y,evenRowTextColor:E,tdPadding:R,verticalAlignment:T,horizontalAlignment:A,tableBorder:S,cellBorder:H,tableOption:P}=e,V={"--tablestack-cell-vertical-alignment":T,"--tablestack-cell-horizontal-alignment":A,"--tablestack-even-row-bg-color":x,"--tablestack-odd-row-bg-color":B,"--tablestack-header-row-bg-color":f,"--tablestack-header-row-text-color":C,"--tablestack-odd-row-text-color":y,"--tablestack-even-row-text-color":E,"--tablestack-padding-top":R?.top||"0px","--tablestack-padding-bottom":R?.bottom||"0px","--tablestack-padding-left":R?.left||"0px","--tablestack-padding-right":R?.right||"0px","--tablestack-table-border-style":S?.style,"--tablestack-table-border-color":S?.color,"--tablestack-table-border-width":S?.width,"--tablestack-table-cell-border-style":H?.style,"--tablestack-table-cell-border-color":H?.color,"--tablestack-table-cell-border-width":H?.width,"--tablestack-column-only-border-style":i?v?.style:"","--tablestack-column-only-border-color":i?v?.color:"","--tablestack-column-only-border-width":i?v?.width:""},O=(0,a.useBlockProps)({style:V}),z=(0,d.useSelect)((e=>e(a.store).getBlock(l)),[l]),{insertBlocks:D,removeBlock:M}=(0,d.useDispatch)(a.store),I=[{icon:u,title:(0,n.__)("Align top","table-block"),isActive:"top"===T,onClick:()=>t({verticalAlignment:"top"})},{icon:m,title:(0,n.__)("Align middle","table-block"),isActive:"middle"===T,onClick:()=>t({verticalAlignment:"middle"})},{icon:g,title:(0,n.__)("Align bottom","table-block"),isActive:"bottom"===T,onClick:()=>t({verticalAlignment:"bottom"})}],G=[{icon:w,title:(0,n.__)("Align left","table-block"),isActive:"start"===A,onClick:()=>t({horizontalAlignment:"start"})},{icon:k,title:(0,n.__)("Align center","table-block"),isActive:"center"===A,onClick:()=>t({horizontalAlignment:"center"})},{icon:h,title:(0,n.__)("Align right","table-block"),isActive:"end"===A,onClick:()=>t({horizontalAlignment:"end"})}];(0,s.useEffect)((()=>{if(b){const e=[["tablestack/tablerow",{isHeader:!0,className:"header-row"},new Array(_).fill(0).map((()=>["tablestack/tablecell",{htmlTag:"th"},[]]))]];D((0,o.createBlocksFromInnerBlocksTemplate)(e),0,l)}else{const e=z.innerBlocks[0],t=e?.attributes?.isHeader;t&&M(e.clientId)}(0,d.dispatch)("core/block-editor").selectBlock(l)}),[b]);const Z=(0,a.useInnerBlocksProps)({renderAppender:!1,allowedBlocks:p}),j=wp.data.select("core/block-editor").getSettings().colors;return(0,r.createElement)(r.Fragment,null,(0,r.createElement)("table",{...O},(0,r.createElement)("tbody",{...Z})),(0,r.createElement)(a.BlockControls,{group:"block"},(0,r.createElement)(c.ToolbarGroup,null,(0,r.createElement)(c.ToolbarDropdownMenu,{icon:(()=>{switch(T){case"top":default:return u;case"middle":return m;case"bottom":return g}})(),label:(0,n.__)("Vertical Alignment","table-block"),controls:I})),(0,r.createElement)(c.ToolbarGroup,null,(0,r.createElement)(c.ToolbarDropdownMenu,{icon:(()=>{switch(A){case"start":default:return w;case"center":return k;case"end":return h}})(),label:(0,n.__)("Horizontal Alignment","table-block"),controls:G}))),(0,r.createElement)(a.InspectorControls,{group:"settings"},(0,r.createElement)(c.PanelBody,null,(0,r.createElement)(c.ToggleControl,{checked:b,label:(0,n.__)("Show Table Header","table-block"),onChange:e=>t({showTableHeader:e})})),(0,r.createElement)(c.PanelBody,{title:(0,n.__)("Table Types","table-block")},(0,r.createElement)(c.RadioControl,{selected:P,options:[{label:"General",value:"general"},{label:"Striped Light",value:"light"},{label:"Striped Dark",value:"dark"}],onChange:e=>(e=>{switch(t({tableOption:e}),e){case"general":t({showTableHeader:!0,headerRowBackground:"#36304A",headerRowTextColor:"#ffffff",evenRowBackground:"#ffffff",oddRowBackground:"#f5f5f5",evenRowTextColor:"#000000",oddRowTextColor:"#000000",tableBorder:{color:"",width:"",style:""},cellBorder:{color:"",width:"",style:""}});break;case"light":t({showTableHeader:!0,evenRowBackground:"#EDEDED",oddRowBackground:"#ffffff",evenRowTextColor:"#000000",oddRowTextColor:"#000000",tableBorder:{color:"",width:"",style:""},cellBorder:{color:"",width:"",style:""}});break;case"dark":t({showTableHeader:!0,evenRowBackground:"#2C3844",oddRowBackground:"#202832",evenRowTextColor:"#ffffff",oddRowTextColor:"#ffffff",tableBorder:{color:"",width:"",style:""},cellBorder:{color:"",width:"",style:""}})}})(e)}))),(0,r.createElement)(a.InspectorControls,{group:"styles"},(0,r.createElement)(a.PanelColorSettings,{title:(0,n.__)("Table Color Settings","table-block"),colorSettings:[{value:f,onChange:e=>t({headerRowBackground:e}),label:(0,n.__)("Header row color","table-block")},{value:C,onChange:e=>t({headerRowTextColor:e}),label:(0,n.__)("Header row text color","table-block")},{value:B,onChange:e=>t({oddRowBackground:e}),label:(0,n.__)("Odd row color","table-block")},{value:y,onChange:e=>t({oddRowTextColor:e}),label:(0,n.__)("Odd row text color","table-block")},{value:x,onChange:e=>t({evenRowBackground:e}),label:(0,n.__)("Even row color","table-block")},{value:E,onChange:e=>t({evenRowTextColor:e}),label:(0,n.__)("Even row text color","table-block")}]}),(0,r.createElement)(c.PanelBody,{title:(0,n.__)("Table Cell Padding","table-block")},(0,r.createElement)(c.__experimentalBoxControl,{label:(0,n.__)("Padding","table-block"),values:R,onChange:e=>t({tdPadding:e})})),(0,r.createElement)(c.PanelBody,{title:(0,n.__)("Border Settings","table-block"),initialOpen:!0},(0,r.createElement)(c.ToggleControl,{checked:i,label:(0,n.__)("Show column only border","table-block"),onChange:e=>t({showColumnOnlyBorder:e})}),i&&(0,r.createElement)(c.__experimentalBorderBoxControl,{__next40pxDefaultSize:!0,colors:j,label:(0,n.__)("Column only border","table-block"),onChange:e=>t({columnOnlyBorder:e}),value:v}),(0,r.createElement)(c.__experimentalDivider,null),(0,r.createElement)(c.__experimentalBorderBoxControl,{__next40pxDefaultSize:!0,colors:j,label:(0,n.__)("Table border","table-block"),onChange:e=>t({tableBorder:e}),value:S}),(0,r.createElement)(c.__experimentalDivider,null),(0,r.createElement)(c.__experimentalBorderBoxControl,{__next40pxDefaultSize:!0,colors:j,label:(0,n.__)("Cell border","table-block"),onChange:e=>t({cellBorder:e}),value:H}))))},save:function({attributes:e}){const{columnOnlyBorder:t,evenRowBackground:l,oddRowBackground:o,headerRowBackground:n,headerRowTextColor:c,oddRowTextColor:d,evenRowTextColor:s,tdPadding:b,verticalAlignment:i,horizontalAlignment:w,tableBorder:k,cellBorder:h,showColumnOnlyBorder:g}=e,m={"--tablestack-cell-vertical-alignment":i,"--tablestack-cell-horizontal-alignment":w,"--tablestack-even-row-bg-color":l,"--tablestack-odd-row-bg-color":o,"--tablestack-header-row-bg-color":n,"--tablestack-header-row-text-color":c,"--tablestack-odd-row-text-color":d,"--tablestack-even-row-text-color":s,"--tablestack-padding-top":b?.top||"0px","--tablestack-padding-bottom":b?.bottom||"0px","--tablestack-padding-left":b?.left||"0px","--tablestack-padding-right":b?.right||"0px","--tablestack-table-border-style":k?.style,"--tablestack-table-border-color":k?.color,"--tablestack-table-border-width":k?.width,"--tablestack-table-cell-border-style":h?.style,"--tablestack-table-cell-border-color":h?.color,"--tablestack-table-cell-border-width":h?.width,"--tablestack-column-only-border-style":g?t?.style:"","--tablestack-column-only-border-color":g?t?.color:"","--tablestack-column-only-border-width":g?t?.width:""},u=a.useBlockProps.save({style:m}),p=a.useInnerBlocksProps.save();return(0,r.createElement)("table",{...u},(0,r.createElement)("tbody",{...p}))}})})();
     1(()=>{"use strict";var e={20:(e,t,l)=>{var o=l(609),r=Symbol.for("react.element"),a=(Symbol.for("react.fragment"),Object.prototype.hasOwnProperty),n=o.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,c={key:!0,ref:!0,__self:!0,__source:!0};t.jsx=function(e,t,l){var o,d={},i=null,s=null;for(o in void 0!==l&&(i=""+l),void 0!==t.key&&(i=""+t.key),void 0!==t.ref&&(s=t.ref),t)a.call(t,o)&&!c.hasOwnProperty(o)&&(d[o]=t[o]);if(e&&e.defaultProps)for(o in t=e.defaultProps)void 0===d[o]&&(d[o]=t[o]);return{$$typeof:r,type:e,key:i,ref:s,props:d,_owner:n.current}}},848:(e,t,l)=>{e.exports=l(20)},609:e=>{e.exports=window.React}},t={};function l(o){var r=t[o];if(void 0!==r)return r.exports;var a=t[o]={exports:{}};return e[o](a,a.exports,l),a.exports}const o=window.wp.blocks;var r=l(609);const a=window.wp.blockEditor,n=window.wp.i18n,c=window.wp.components,d=window.wp.data,i=window.wp.element,s=window.wp.primitives;var b=l(848);const w=(0,b.jsx)(s.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,b.jsx)(s.Path,{d:"M13 5.5H4V4h9v1.5Zm7 7H4V11h16v1.5Zm-7 7H4V18h9v1.5Z"})}),k=(0,b.jsx)(s.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,b.jsx)(s.Path,{d:"M7.5 5.5h9V4h-9v1.5Zm-3.5 7h16V11H4v1.5Zm3.5 7h9V18h-9v1.5Z"})}),h=(0,b.jsx)(s.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,b.jsx)(s.Path,{d:"M11.111 5.5H20V4h-8.889v1.5ZM4 12.5h16V11H4v1.5Zm7.111 7H20V18h-8.889v1.5Z"})}),g=(0,r.createElement)(c.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,r.createElement)(c.Path,{d:"M15 4H9v11h6V4zM4 18.5V20h16v-1.5H4z"})),m=(0,r.createElement)(c.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,r.createElement)(c.Path,{d:"M20 11h-5V4H9v7H4v1.5h5V20h6v-7.5h5z"})),u=(0,r.createElement)(c.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,r.createElement)(c.Path,{d:"M9 20h6V9H9v11zM4 4v1.5h16V4H4z"})),p=["tablestack/tablerow","tablestack/tablecell"],v=JSON.parse('{"UU":"tablestack/table"}');(0,o.registerBlockType)(v.UU,{edit:function({attributes:e,setAttributes:t,clientId:l}){const{showTableHeader:s,showColumnOnlyBorder:b,columnOnlyBorder:v,columns:_,evenRowBackground:x,oddRowBackground:B,headerRowBackground:f,headerRowTextColor:C,oddRowTextColor:y,evenRowTextColor:E,tdPadding:R,verticalAlignment:T,horizontalAlignment:S,tableBorder:A,cellBorder:H,tableOption:P,tableBorderRadius:V}=e,O={"--tablestack-cell-vertical-alignment":T,"--tablestack-cell-horizontal-alignment":S,"--tablestack-even-row-bg-color":x,"--tablestack-odd-row-bg-color":B,"--tablestack-header-row-bg-color":f,"--tablestack-header-row-text-color":C,"--tablestack-odd-row-text-color":y,"--tablestack-even-row-text-color":E,"--tablestack-padding-top":R?.top||"0px","--tablestack-padding-bottom":R?.bottom||"0px","--tablestack-padding-left":R?.left||"0px","--tablestack-padding-right":R?.right||"0px","--tablestack-table-border-style":A?.style,"--tablestack-table-border-color":A?.color,"--tablestack-table-border-width":A?.width,"--tablestack-table-border-radius":V+"px","--tablestack-table-cell-border-style":H?.style,"--tablestack-table-cell-border-color":H?.color,"--tablestack-table-cell-border-width":H?.width,"--tablestack-column-only-border-style":b?v?.style:"","--tablestack-column-only-border-color":b?v?.color:"","--tablestack-column-only-border-width":b?v?.width:""},z=(0,a.useBlockProps)({style:O}),D=(0,d.useSelect)((e=>e(a.store).getBlock(l)),[l]),{insertBlocks:M,removeBlock:I}=(0,d.useDispatch)(a.store),G=[{icon:u,title:(0,n.__)("Align top","table-block"),isActive:"top"===T,onClick:()=>t({verticalAlignment:"top"})},{icon:m,title:(0,n.__)("Align middle","table-block"),isActive:"middle"===T,onClick:()=>t({verticalAlignment:"middle"})},{icon:g,title:(0,n.__)("Align bottom","table-block"),isActive:"bottom"===T,onClick:()=>t({verticalAlignment:"bottom"})}],Z=[{icon:w,title:(0,n.__)("Align left","table-block"),isActive:"start"===S,onClick:()=>t({horizontalAlignment:"start"})},{icon:k,title:(0,n.__)("Align center","table-block"),isActive:"center"===S,onClick:()=>t({horizontalAlignment:"center"})},{icon:h,title:(0,n.__)("Align right","table-block"),isActive:"end"===S,onClick:()=>t({horizontalAlignment:"end"})}];(0,i.useEffect)((()=>{if(s){const e=[["tablestack/tablerow",{isHeader:!0,className:"header-row"},new Array(_).fill(0).map((()=>["tablestack/tablecell",{htmlTag:"th"},[]]))]];M((0,o.createBlocksFromInnerBlocksTemplate)(e),0,l)}else{const e=D.innerBlocks[0],t=e?.attributes?.isHeader;t&&I(e.clientId)}}),[s]);const j=(0,a.useInnerBlocksProps)({renderAppender:!1,allowedBlocks:p}),N=wp.data.select("core/block-editor").getSettings().colors;return(0,r.createElement)("div",{...z},(0,r.createElement)("table",null,(0,r.createElement)("tbody",{...j})),(0,r.createElement)(a.BlockControls,{group:"block"},(0,r.createElement)(c.ToolbarGroup,null,(0,r.createElement)(c.ToolbarDropdownMenu,{icon:(()=>{switch(T){case"top":default:return u;case"middle":return m;case"bottom":return g}})(),label:(0,n.__)("Vertical Alignment","table-block"),controls:G})),(0,r.createElement)(c.ToolbarGroup,null,(0,r.createElement)(c.ToolbarDropdownMenu,{icon:(()=>{switch(S){case"start":default:return w;case"center":return k;case"end":return h}})(),label:(0,n.__)("Horizontal Alignment","table-block"),controls:Z}))),(0,r.createElement)(a.InspectorControls,{group:"settings"},(0,r.createElement)(c.PanelBody,null,(0,r.createElement)(c.ToggleControl,{checked:s,label:(0,n.__)("Show Table Header","table-block"),onChange:e=>t({showTableHeader:e})})),(0,r.createElement)(c.PanelBody,{title:(0,n.__)("Table Types","table-block")},(0,r.createElement)(c.RadioControl,{selected:P,options:[{label:"General",value:"general"},{label:"Striped Light Square",value:"light"},{label:"Striped Dark Square",value:"dark"}],onChange:e=>(e=>{switch(t({tableOption:e}),e){case"general":t({showTableHeader:!1,headerRowBackground:"#E5E5E5",headerRowTextColor:"#000000",evenRowBackground:"#ffffff",oddRowBackground:"#ffffff",evenRowTextColor:"#000000",oddRowTextColor:"#000000",tableBorderRadius:"0",tableBorder:{color:"#ddd",width:"1px",style:"solid"},cellBorder:{color:"#ddd",width:"1px",style:"solid"}});break;case"light":t({showTableHeader:!1,evenRowBackground:"#EDEDED",oddRowBackground:"#ffffff",evenRowTextColor:"#000000",oddRowTextColor:"#000000",tableBorderRadius:"0",tableBorder:{color:"",width:"",style:""},cellBorder:{color:"",width:"",style:""}});break;case"dark":t({showTableHeader:!1,evenRowBackground:"#2C3844",oddRowBackground:"#202832",evenRowTextColor:"#ffffff",oddRowTextColor:"#ffffff",tableBorderRadius:"0",tableBorder:{color:"",width:"",style:""},cellBorder:{color:"",width:"",style:""}})}})(e)}))),(0,r.createElement)(a.InspectorControls,{group:"styles"},(0,r.createElement)(a.PanelColorSettings,{title:(0,n.__)("Table Color Settings","table-block"),colorSettings:[{value:f,onChange:e=>t({headerRowBackground:e}),label:(0,n.__)("Header row color","table-block")},{value:C,onChange:e=>t({headerRowTextColor:e}),label:(0,n.__)("Header row text color","table-block")},{value:B,onChange:e=>t({oddRowBackground:e}),label:(0,n.__)("Odd row color","table-block")},{value:y,onChange:e=>t({oddRowTextColor:e}),label:(0,n.__)("Odd row text color","table-block")},{value:x,onChange:e=>t({evenRowBackground:e}),label:(0,n.__)("Even row color","table-block")},{value:E,onChange:e=>t({evenRowTextColor:e}),label:(0,n.__)("Even row text color","table-block")}]}),(0,r.createElement)(c.PanelBody,{title:(0,n.__)("Table Cell Padding","table-block")},(0,r.createElement)(c.__experimentalBoxControl,{label:(0,n.__)("Padding","table-block"),values:R,onChange:e=>t({tdPadding:e})})),(0,r.createElement)(c.PanelBody,{title:(0,n.__)("Border Settings","table-block"),initialOpen:!0},(0,r.createElement)(c.ToggleControl,{checked:b,label:(0,n.__)("Show column only border","table-block"),onChange:e=>t({showColumnOnlyBorder:e})}),b&&(0,r.createElement)(c.__experimentalBorderBoxControl,{__next40pxDefaultSize:!0,colors:N,label:(0,n.__)("Column only border","table-block"),onChange:e=>t({columnOnlyBorder:e}),value:v}),(0,r.createElement)(c.__experimentalDivider,null),(0,r.createElement)(c.RangeControl,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,help:"Set border radius of the table",initialPosition:0,label:"Border radius",max:50,min:0,onChange:e=>t({tableBorderRadius:e})}),(0,r.createElement)(c.__experimentalDivider,null),(0,r.createElement)(c.__experimentalBorderBoxControl,{__next40pxDefaultSize:!0,colors:N,label:(0,n.__)("Table border","table-block"),onChange:e=>t({tableBorder:e}),value:A}),(0,r.createElement)(c.__experimentalDivider,null),(0,r.createElement)(c.__experimentalBorderBoxControl,{__next40pxDefaultSize:!0,colors:N,label:(0,n.__)("Cell border","table-block"),onChange:e=>t({cellBorder:e}),value:H}))))},save:function({attributes:e}){const{columnOnlyBorder:t,evenRowBackground:l,oddRowBackground:o,headerRowBackground:n,headerRowTextColor:c,oddRowTextColor:d,evenRowTextColor:i,tdPadding:s,verticalAlignment:b,horizontalAlignment:w,tableBorder:k,cellBorder:h,showColumnOnlyBorder:g,tableBorderRadius:m}=e,u={"--tablestack-cell-vertical-alignment":b,"--tablestack-cell-horizontal-alignment":w,"--tablestack-even-row-bg-color":l,"--tablestack-odd-row-bg-color":o,"--tablestack-header-row-bg-color":n,"--tablestack-header-row-text-color":c,"--tablestack-odd-row-text-color":d,"--tablestack-even-row-text-color":i,"--tablestack-padding-top":s?.top||"0px","--tablestack-padding-bottom":s?.bottom||"0px","--tablestack-padding-left":s?.left||"0px","--tablestack-padding-right":s?.right||"0px","--tablestack-table-border-style":k?.style,"--tablestack-table-border-color":k?.color,"--tablestack-table-border-width":k?.width,"--tablestack-table-border-radius":m+"px","--tablestack-table-cell-border-style":h?.style,"--tablestack-table-cell-border-color":h?.color,"--tablestack-table-cell-border-width":h?.width,"--tablestack-column-only-border-style":g?t?.style:"","--tablestack-column-only-border-color":g?t?.color:"","--tablestack-column-only-border-width":g?t?.width:""},p=a.useBlockProps.save({style:u}),v=a.useInnerBlocksProps.save();return(0,r.createElement)("div",{...p},(0,r.createElement)("table",null,(0,r.createElement)("tbody",{...v})))}})})();
  • table-block/trunk/build/woo-table/block.json

    r3191529 r3277722  
    44  "name": "tablestack/wootable",
    55  "version": "0.1.0",
    6   "title": "Table stack product table",
     6  "title": "Product Table",
    77  "category": "widgets",
    88  "parent": [
  • table-block/trunk/build/woo-table/style-index-rtl.css

    r3191529 r3277722  
    1 .tablestack-wootable .tablestack-product-table-search{box-sizing:border-box;display:block;margin-bottom:15px;max-width:100%;overflow:hidden}.tablestack-wootable .tablestack-product-table-search .tablestack-search-input{box-sizing:border-box;float:var(--tablestack-search-input-position);line-height:2;max-width:100%;min-height:30px;padding:0 8px;width:var(--tablestack-search-input-width)}.tablestack-wootable .tablestack-product-table-search .tablestack-search-input:focus{outline:none}.tablestack-wootable .frontend-table-wrapper{display:block;overflow-x:auto}.tablestack-wootable .frontend-table-wrapper table.wp-block-tablestack-wootable{border:1px solid #ccc;border-collapse:collapse;margin:0;padding:0;width:100%}.tablestack-wootable .frontend-table-wrapper table.wp-block-tablestack-wootable caption{font-size:1.5em;margin:.5em 0 .75em}.tablestack-wootable .frontend-table-wrapper table.wp-block-tablestack-wootable tr{border:1px solid #ddd}.tablestack-wootable .frontend-table-wrapper table.wp-block-tablestack-wootable tr.header-row{-color:var(--tablestack-header-row-bg-color)}.tablestack-wootable .frontend-table-wrapper table.wp-block-tablestack-wootable tr.odd-row{background-color:var(--tablestack-odd-row-bg-color)}.tablestack-wootable .frontend-table-wrapper table.wp-block-tablestack-wootable tr.even-row{background-color:var(--tablestack-even-row-bg-color)}.tablestack-wootable .frontend-table-wrapper table.wp-block-tablestack-wootable tr.warning{background:#fef8ee;border-right:4px solid #f0b849;font-size:14px}.tablestack-wootable .frontend-table-wrapper table.wp-block-tablestack-wootable tr td,.tablestack-wootable .frontend-table-wrapper table.wp-block-tablestack-wootable tr th{padding:var(--tablestack-padding-top) var(--tablestack-padding-left) var(--tablestack-padding-bottom) var(--tablestack-padding-right);vertical-align:var(--tablestack-cell-vertical-alignment)}.tablestack-wootable .frontend-table-wrapper table.wp-block-tablestack-wootable tr td div.cell-container,.tablestack-wootable .frontend-table-wrapper table.wp-block-tablestack-wootable tr th div.cell-container{align-items:var(--tablestack-cell-horizontal-alignment);display:flex;flex-direction:column}.tablestack-wootable .frontend-table-wrapper table.wp-block-tablestack-wootable tr td div.cell-container img,.tablestack-wootable .frontend-table-wrapper table.wp-block-tablestack-wootable tr th div.cell-container img{height:auto;width:var(--tablestack-product-image-size)}.tablestack-wootable .frontend-table-wrapper table.wp-block-tablestack-wootable tr td div.cell-container a.tablestack-cart-button,.tablestack-wootable .frontend-table-wrapper table.wp-block-tablestack-wootable tr th div.cell-container a.tablestack-cart-button{background:var(--tablestack-cart-button-bg-color);color:var(--tablestack-cart-button-text-color);font-size:13px;margin-bottom:5px;padding:6px 12px;text-decoration:none;white-space:nowrap}.tablestack-wootable .frontend-table-wrapper table.wp-block-tablestack-wootable tr td div.cell-container a.tablestack-cart-button:hover,.tablestack-wootable .frontend-table-wrapper table.wp-block-tablestack-wootable tr th div.cell-container a.tablestack-cart-button:hover{background:var(--tablestack-cart-button-hover-bg-color);color:var(--tablestack-cart-button-hover-text-color)}.tablestack-wootable .frontend-table-wrapper table.wp-block-tablestack-wootable tr td div.cell-container a.added_to_cart,.tablestack-wootable .frontend-table-wrapper table.wp-block-tablestack-wootable tr th div.cell-container a.added_to_cart{white-space:nowrap}.tablestack-wootable .frontend-table-wrapper table.wp-block-tablestack-wootable tr td div.cell-container .header-cell,.tablestack-wootable .frontend-table-wrapper table.wp-block-tablestack-wootable tr th div.cell-container .header-cell{align-items:center;display:flex}.tablestack-wootable .frontend-table-wrapper table.wp-block-tablestack-wootable td .wc-block-button{position:relative}.tablestack-wootable .frontend-table-wrapper table.wp-block-tablestack-wootable td .wc-block-button.loading{filter:brightness(50%);padding-left:30px;pointer-events:none}.tablestack-wootable .frontend-table-wrapper table.wp-block-tablestack-wootable td .wc-block-button.loading:after{animation:spin 1s linear infinite;border:2px solid #fff;border-radius:50%;border-top-color:transparent;content:"";height:16px;right:85%;margin-right:-8px;margin-top:-8px;position:absolute;top:50%;width:16px}@keyframes spin{0%{transform:rotate(0deg)}to{transform:rotate(-1turn)}}.tablestack-wootable .frontend-table-wrapper table.wp-block-tablestack-wootable td .wc-block-button.added{filter:brightness(85%)}.tablestack-wootable .frontend-table-wrapper table.wp-block-tablestack-wootable th{font-size:.85em;letter-spacing:.1em;line-height:15px;padding:.625em;text-transform:uppercase}.tablestack-wootable .frontend-table-wrapper table.wp-block-tablestack-wootable th div.move-icon{cursor:grab;font-size:medium}.tablestack-wootable .tablestack-pagination{margin-top:5px}.tablestack-wootable .tablestack-pagination .mr-5{margin-left:5px}.tablestack-wootable .tablestack-pagination .paginate-button{background:var(--tablestack-paginate-button-bg-color);border:none;color:var(--tablestack-paginate-button-text-color);cursor:pointer;display:inline-block;font-size:13px;padding:6px 12px;text-align:center;white-space:nowrap;width:auto}.tablestack-wootable .tablestack-pagination .paginate-button:hover{background:var(--tablestack-paginate-button-hover-bg-color);color:var(--tablestack-paginate-button-hover-text-color)}.tablestack-wootable .tablestack-pagination .paginate-button:disabled,.tablestack-wootable .tablestack-pagination .paginate-button:disabled:hover{background:var(--tablestack-paginate-button-disabled-color);color:var(--tablestack-paginate-button-text-color);cursor:not-allowed}@media screen and (max-width:600px){.tablestack-wootable .frontend-table-wrapper table.wp-block-tablestack-wootable{border:0}.tablestack-wootable .frontend-table-wrapper table.wp-block-tablestack-wootable caption{font-size:1.3em}.tablestack-wootable .frontend-table-wrapper table.wp-block-tablestack-wootable thead{border:none;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px}.tablestack-wootable .frontend-table-wrapper table.wp-block-tablestack-wootable tr{border-bottom:3px solid #ddd;display:block;margin-bottom:.625em}.tablestack-wootable .frontend-table-wrapper table.wp-block-tablestack-wootable tr td{border-bottom:1px solid #ddd;display:block;font-size:.8em;text-align:left;width:none}.tablestack-wootable .frontend-table-wrapper table.wp-block-tablestack-wootable tr td div.cell-container img{width:70%}.tablestack-wootable .frontend-table-wrapper table.wp-block-tablestack-wootable tr td:before{content:attr(data-label);float:right;font-weight:700;text-transform:uppercase}.tablestack-wootable .frontend-table-wrapper table.wp-block-tablestack-wootable tr td:last-child{border-bottom:0}.tablestack-wootable .frontend-table-wrapper table.wp-block-tablestack-wootable tr td div.cell-container{align-items:end}}
     1.tablestack-wootable .tablestack-product-table-search{box-sizing:border-box;display:block;margin-bottom:15px;max-width:100%;overflow:hidden}.tablestack-wootable .tablestack-product-table-search .tablestack-search-input{box-sizing:border-box;float:var(--tablestack-search-input-position);line-height:2;max-width:100%;min-height:30px;padding:0 8px;width:var(--tablestack-search-input-width)}.tablestack-wootable .tablestack-product-table-search .tablestack-search-input:focus{outline:none}.tablestack-wootable .frontend-table-wrapper{display:block;overflow-x:auto}.tablestack-wootable .frontend-table-wrapper table.wp-block-tablestack-wootable{border:1px solid #ccc;border-collapse:collapse;margin:0;padding:0;width:100%}.tablestack-wootable .frontend-table-wrapper table.wp-block-tablestack-wootable caption{font-size:1.5em;margin:.5em 0 .75em}.tablestack-wootable .frontend-table-wrapper table.wp-block-tablestack-wootable tr{border:1px solid #ddd}.tablestack-wootable .frontend-table-wrapper table.wp-block-tablestack-wootable tr.header-row{background-color:var(--tablestack-header-row-bg-color)}.tablestack-wootable .frontend-table-wrapper table.wp-block-tablestack-wootable tr.odd-row{background-color:var(--tablestack-odd-row-bg-color)}.tablestack-wootable .frontend-table-wrapper table.wp-block-tablestack-wootable tr.even-row{background-color:var(--tablestack-even-row-bg-color)}.tablestack-wootable .frontend-table-wrapper table.wp-block-tablestack-wootable tr.warning{background:#fef8ee;border-right:4px solid #f0b849;font-size:14px}.tablestack-wootable .frontend-table-wrapper table.wp-block-tablestack-wootable tr td,.tablestack-wootable .frontend-table-wrapper table.wp-block-tablestack-wootable tr th{padding:var(--tablestack-padding-top) var(--tablestack-padding-left) var(--tablestack-padding-bottom) var(--tablestack-padding-right);vertical-align:var(--tablestack-cell-vertical-alignment)}.tablestack-wootable .frontend-table-wrapper table.wp-block-tablestack-wootable tr td div.cell-container,.tablestack-wootable .frontend-table-wrapper table.wp-block-tablestack-wootable tr th div.cell-container{align-items:var(--tablestack-cell-horizontal-alignment);display:flex;flex-direction:column}.tablestack-wootable .frontend-table-wrapper table.wp-block-tablestack-wootable tr td div.cell-container img,.tablestack-wootable .frontend-table-wrapper table.wp-block-tablestack-wootable tr th div.cell-container img{height:auto;width:var(--tablestack-product-image-size)}.tablestack-wootable .frontend-table-wrapper table.wp-block-tablestack-wootable tr td div.cell-container a.tablestack-cart-button,.tablestack-wootable .frontend-table-wrapper table.wp-block-tablestack-wootable tr th div.cell-container a.tablestack-cart-button{background:var(--tablestack-cart-button-bg-color);color:var(--tablestack-cart-button-text-color);font-size:13px;margin-bottom:5px;padding:6px 12px;text-decoration:none;white-space:nowrap}.tablestack-wootable .frontend-table-wrapper table.wp-block-tablestack-wootable tr td div.cell-container a.tablestack-cart-button:hover,.tablestack-wootable .frontend-table-wrapper table.wp-block-tablestack-wootable tr th div.cell-container a.tablestack-cart-button:hover{background:var(--tablestack-cart-button-hover-bg-color);color:var(--tablestack-cart-button-hover-text-color)}.tablestack-wootable .frontend-table-wrapper table.wp-block-tablestack-wootable tr td div.cell-container a.added_to_cart,.tablestack-wootable .frontend-table-wrapper table.wp-block-tablestack-wootable tr th div.cell-container a.added_to_cart{white-space:nowrap}.tablestack-wootable .frontend-table-wrapper table.wp-block-tablestack-wootable tr td div.cell-container .header-cell,.tablestack-wootable .frontend-table-wrapper table.wp-block-tablestack-wootable tr th div.cell-container .header-cell{align-items:center;display:flex}.tablestack-wootable .frontend-table-wrapper table.wp-block-tablestack-wootable td .wc-block-button{position:relative}.tablestack-wootable .frontend-table-wrapper table.wp-block-tablestack-wootable td .wc-block-button.loading{filter:brightness(50%);padding-left:30px;pointer-events:none}.tablestack-wootable .frontend-table-wrapper table.wp-block-tablestack-wootable td .wc-block-button.loading:after{animation:spin 1s linear infinite;border:2px solid #fff;border-radius:50%;border-top-color:transparent;content:"";height:16px;right:85%;margin-right:-8px;margin-top:-8px;position:absolute;top:50%;width:16px}@keyframes spin{0%{transform:rotate(0deg)}to{transform:rotate(-1turn)}}.tablestack-wootable .frontend-table-wrapper table.wp-block-tablestack-wootable td .wc-block-button.added{filter:brightness(85%)}.tablestack-wootable .frontend-table-wrapper table.wp-block-tablestack-wootable th{font-size:.85em;letter-spacing:.1em;line-height:15px;padding:.625em;text-transform:uppercase}.tablestack-wootable .frontend-table-wrapper table.wp-block-tablestack-wootable th div.move-icon{cursor:grab;font-size:medium}.tablestack-wootable .tablestack-pagination{margin-top:5px}.tablestack-wootable .tablestack-pagination .mr-5{margin-left:5px}.tablestack-wootable .tablestack-pagination .paginate-button{background:var(--tablestack-paginate-button-bg-color);border:none;color:var(--tablestack-paginate-button-text-color);cursor:pointer;display:inline-block;font-size:13px;padding:6px 12px;text-align:center;white-space:nowrap;width:auto}.tablestack-wootable .tablestack-pagination .paginate-button:hover{background:var(--tablestack-paginate-button-hover-bg-color);color:var(--tablestack-paginate-button-hover-text-color)}.tablestack-wootable .tablestack-pagination .paginate-button:disabled,.tablestack-wootable .tablestack-pagination .paginate-button:disabled:hover{background:var(--tablestack-paginate-button-disabled-color);color:var(--tablestack-paginate-button-text-color);cursor:not-allowed}@media screen and (max-width:600px){.tablestack-wootable .frontend-table-wrapper table.wp-block-tablestack-wootable{border:0}.tablestack-wootable .frontend-table-wrapper table.wp-block-tablestack-wootable caption{font-size:1.3em}.tablestack-wootable .frontend-table-wrapper table.wp-block-tablestack-wootable thead{border:none;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px}.tablestack-wootable .frontend-table-wrapper table.wp-block-tablestack-wootable tr{border-bottom:3px solid #ddd;display:block;margin-bottom:.625em}.tablestack-wootable .frontend-table-wrapper table.wp-block-tablestack-wootable tr td{border-bottom:1px solid #ddd;display:block;font-size:.8em;text-align:left;width:none}.tablestack-wootable .frontend-table-wrapper table.wp-block-tablestack-wootable tr td div.cell-container img{width:70%}.tablestack-wootable .frontend-table-wrapper table.wp-block-tablestack-wootable tr td:before{content:attr(data-label);float:right;font-weight:700;text-transform:uppercase}.tablestack-wootable .frontend-table-wrapper table.wp-block-tablestack-wootable tr td:last-child{border-bottom:0}.tablestack-wootable .frontend-table-wrapper table.wp-block-tablestack-wootable tr td div.cell-container{align-items:end}}
  • table-block/trunk/build/woo-table/style-index.css

    r3191529 r3277722  
    1 .tablestack-wootable .tablestack-product-table-search{box-sizing:border-box;display:block;margin-bottom:15px;max-width:100%;overflow:hidden}.tablestack-wootable .tablestack-product-table-search .tablestack-search-input{box-sizing:border-box;float:var(--tablestack-search-input-position);line-height:2;max-width:100%;min-height:30px;padding:0 8px;width:var(--tablestack-search-input-width)}.tablestack-wootable .tablestack-product-table-search .tablestack-search-input:focus{outline:none}.tablestack-wootable .frontend-table-wrapper{display:block;overflow-x:auto}.tablestack-wootable .frontend-table-wrapper table.wp-block-tablestack-wootable{border:1px solid #ccc;border-collapse:collapse;margin:0;padding:0;width:100%}.tablestack-wootable .frontend-table-wrapper table.wp-block-tablestack-wootable caption{font-size:1.5em;margin:.5em 0 .75em}.tablestack-wootable .frontend-table-wrapper table.wp-block-tablestack-wootable tr{border:1px solid #ddd}.tablestack-wootable .frontend-table-wrapper table.wp-block-tablestack-wootable tr.header-row{-color:var(--tablestack-header-row-bg-color)}.tablestack-wootable .frontend-table-wrapper table.wp-block-tablestack-wootable tr.odd-row{background-color:var(--tablestack-odd-row-bg-color)}.tablestack-wootable .frontend-table-wrapper table.wp-block-tablestack-wootable tr.even-row{background-color:var(--tablestack-even-row-bg-color)}.tablestack-wootable .frontend-table-wrapper table.wp-block-tablestack-wootable tr.warning{background:#fef8ee;border-left:4px solid #f0b849;font-size:14px}.tablestack-wootable .frontend-table-wrapper table.wp-block-tablestack-wootable tr td,.tablestack-wootable .frontend-table-wrapper table.wp-block-tablestack-wootable tr th{padding:var(--tablestack-padding-top) var(--tablestack-padding-right) var(--tablestack-padding-bottom) var(--tablestack-padding-left);vertical-align:var(--tablestack-cell-vertical-alignment)}.tablestack-wootable .frontend-table-wrapper table.wp-block-tablestack-wootable tr td div.cell-container,.tablestack-wootable .frontend-table-wrapper table.wp-block-tablestack-wootable tr th div.cell-container{align-items:var(--tablestack-cell-horizontal-alignment);display:flex;flex-direction:column}.tablestack-wootable .frontend-table-wrapper table.wp-block-tablestack-wootable tr td div.cell-container img,.tablestack-wootable .frontend-table-wrapper table.wp-block-tablestack-wootable tr th div.cell-container img{height:auto;width:var(--tablestack-product-image-size)}.tablestack-wootable .frontend-table-wrapper table.wp-block-tablestack-wootable tr td div.cell-container a.tablestack-cart-button,.tablestack-wootable .frontend-table-wrapper table.wp-block-tablestack-wootable tr th div.cell-container a.tablestack-cart-button{background:var(--tablestack-cart-button-bg-color);color:var(--tablestack-cart-button-text-color);font-size:13px;margin-bottom:5px;padding:6px 12px;text-decoration:none;white-space:nowrap}.tablestack-wootable .frontend-table-wrapper table.wp-block-tablestack-wootable tr td div.cell-container a.tablestack-cart-button:hover,.tablestack-wootable .frontend-table-wrapper table.wp-block-tablestack-wootable tr th div.cell-container a.tablestack-cart-button:hover{background:var(--tablestack-cart-button-hover-bg-color);color:var(--tablestack-cart-button-hover-text-color)}.tablestack-wootable .frontend-table-wrapper table.wp-block-tablestack-wootable tr td div.cell-container a.added_to_cart,.tablestack-wootable .frontend-table-wrapper table.wp-block-tablestack-wootable tr th div.cell-container a.added_to_cart{white-space:nowrap}.tablestack-wootable .frontend-table-wrapper table.wp-block-tablestack-wootable tr td div.cell-container .header-cell,.tablestack-wootable .frontend-table-wrapper table.wp-block-tablestack-wootable tr th div.cell-container .header-cell{align-items:center;display:flex}.tablestack-wootable .frontend-table-wrapper table.wp-block-tablestack-wootable td .wc-block-button{position:relative}.tablestack-wootable .frontend-table-wrapper table.wp-block-tablestack-wootable td .wc-block-button.loading{filter:brightness(50%);padding-right:30px;pointer-events:none}.tablestack-wootable .frontend-table-wrapper table.wp-block-tablestack-wootable td .wc-block-button.loading:after{animation:spin 1s linear infinite;border:2px solid #fff;border-radius:50%;border-top-color:transparent;content:"";height:16px;left:85%;margin-left:-8px;margin-top:-8px;position:absolute;top:50%;width:16px}@keyframes spin{0%{transform:rotate(0deg)}to{transform:rotate(1turn)}}.tablestack-wootable .frontend-table-wrapper table.wp-block-tablestack-wootable td .wc-block-button.added{filter:brightness(85%)}.tablestack-wootable .frontend-table-wrapper table.wp-block-tablestack-wootable th{font-size:.85em;letter-spacing:.1em;line-height:15px;padding:.625em;text-transform:uppercase}.tablestack-wootable .frontend-table-wrapper table.wp-block-tablestack-wootable th div.move-icon{cursor:grab;font-size:medium}.tablestack-wootable .tablestack-pagination{margin-top:5px}.tablestack-wootable .tablestack-pagination .mr-5{margin-right:5px}.tablestack-wootable .tablestack-pagination .paginate-button{background:var(--tablestack-paginate-button-bg-color);border:none;color:var(--tablestack-paginate-button-text-color);cursor:pointer;display:inline-block;font-size:13px;padding:6px 12px;text-align:center;white-space:nowrap;width:auto}.tablestack-wootable .tablestack-pagination .paginate-button:hover{background:var(--tablestack-paginate-button-hover-bg-color);color:var(--tablestack-paginate-button-hover-text-color)}.tablestack-wootable .tablestack-pagination .paginate-button:disabled,.tablestack-wootable .tablestack-pagination .paginate-button:disabled:hover{background:var(--tablestack-paginate-button-disabled-color);color:var(--tablestack-paginate-button-text-color);cursor:not-allowed}@media screen and (max-width:600px){.tablestack-wootable .frontend-table-wrapper table.wp-block-tablestack-wootable{border:0}.tablestack-wootable .frontend-table-wrapper table.wp-block-tablestack-wootable caption{font-size:1.3em}.tablestack-wootable .frontend-table-wrapper table.wp-block-tablestack-wootable thead{border:none;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px}.tablestack-wootable .frontend-table-wrapper table.wp-block-tablestack-wootable tr{border-bottom:3px solid #ddd;display:block;margin-bottom:.625em}.tablestack-wootable .frontend-table-wrapper table.wp-block-tablestack-wootable tr td{border-bottom:1px solid #ddd;display:block;font-size:.8em;text-align:right;width:none}.tablestack-wootable .frontend-table-wrapper table.wp-block-tablestack-wootable tr td div.cell-container img{width:70%}.tablestack-wootable .frontend-table-wrapper table.wp-block-tablestack-wootable tr td:before{content:attr(data-label);float:left;font-weight:700;text-transform:uppercase}.tablestack-wootable .frontend-table-wrapper table.wp-block-tablestack-wootable tr td:last-child{border-bottom:0}.tablestack-wootable .frontend-table-wrapper table.wp-block-tablestack-wootable tr td div.cell-container{align-items:end}}
     1.tablestack-wootable .tablestack-product-table-search{box-sizing:border-box;display:block;margin-bottom:15px;max-width:100%;overflow:hidden}.tablestack-wootable .tablestack-product-table-search .tablestack-search-input{box-sizing:border-box;float:var(--tablestack-search-input-position);line-height:2;max-width:100%;min-height:30px;padding:0 8px;width:var(--tablestack-search-input-width)}.tablestack-wootable .tablestack-product-table-search .tablestack-search-input:focus{outline:none}.tablestack-wootable .frontend-table-wrapper{display:block;overflow-x:auto}.tablestack-wootable .frontend-table-wrapper table.wp-block-tablestack-wootable{border:1px solid #ccc;border-collapse:collapse;margin:0;padding:0;width:100%}.tablestack-wootable .frontend-table-wrapper table.wp-block-tablestack-wootable caption{font-size:1.5em;margin:.5em 0 .75em}.tablestack-wootable .frontend-table-wrapper table.wp-block-tablestack-wootable tr{border:1px solid #ddd}.tablestack-wootable .frontend-table-wrapper table.wp-block-tablestack-wootable tr.header-row{background-color:var(--tablestack-header-row-bg-color)}.tablestack-wootable .frontend-table-wrapper table.wp-block-tablestack-wootable tr.odd-row{background-color:var(--tablestack-odd-row-bg-color)}.tablestack-wootable .frontend-table-wrapper table.wp-block-tablestack-wootable tr.even-row{background-color:var(--tablestack-even-row-bg-color)}.tablestack-wootable .frontend-table-wrapper table.wp-block-tablestack-wootable tr.warning{background:#fef8ee;border-left:4px solid #f0b849;font-size:14px}.tablestack-wootable .frontend-table-wrapper table.wp-block-tablestack-wootable tr td,.tablestack-wootable .frontend-table-wrapper table.wp-block-tablestack-wootable tr th{padding:var(--tablestack-padding-top) var(--tablestack-padding-right) var(--tablestack-padding-bottom) var(--tablestack-padding-left);vertical-align:var(--tablestack-cell-vertical-alignment)}.tablestack-wootable .frontend-table-wrapper table.wp-block-tablestack-wootable tr td div.cell-container,.tablestack-wootable .frontend-table-wrapper table.wp-block-tablestack-wootable tr th div.cell-container{align-items:var(--tablestack-cell-horizontal-alignment);display:flex;flex-direction:column}.tablestack-wootable .frontend-table-wrapper table.wp-block-tablestack-wootable tr td div.cell-container img,.tablestack-wootable .frontend-table-wrapper table.wp-block-tablestack-wootable tr th div.cell-container img{height:auto;width:var(--tablestack-product-image-size)}.tablestack-wootable .frontend-table-wrapper table.wp-block-tablestack-wootable tr td div.cell-container a.tablestack-cart-button,.tablestack-wootable .frontend-table-wrapper table.wp-block-tablestack-wootable tr th div.cell-container a.tablestack-cart-button{background:var(--tablestack-cart-button-bg-color);color:var(--tablestack-cart-button-text-color);font-size:13px;margin-bottom:5px;padding:6px 12px;text-decoration:none;white-space:nowrap}.tablestack-wootable .frontend-table-wrapper table.wp-block-tablestack-wootable tr td div.cell-container a.tablestack-cart-button:hover,.tablestack-wootable .frontend-table-wrapper table.wp-block-tablestack-wootable tr th div.cell-container a.tablestack-cart-button:hover{background:var(--tablestack-cart-button-hover-bg-color);color:var(--tablestack-cart-button-hover-text-color)}.tablestack-wootable .frontend-table-wrapper table.wp-block-tablestack-wootable tr td div.cell-container a.added_to_cart,.tablestack-wootable .frontend-table-wrapper table.wp-block-tablestack-wootable tr th div.cell-container a.added_to_cart{white-space:nowrap}.tablestack-wootable .frontend-table-wrapper table.wp-block-tablestack-wootable tr td div.cell-container .header-cell,.tablestack-wootable .frontend-table-wrapper table.wp-block-tablestack-wootable tr th div.cell-container .header-cell{align-items:center;display:flex}.tablestack-wootable .frontend-table-wrapper table.wp-block-tablestack-wootable td .wc-block-button{position:relative}.tablestack-wootable .frontend-table-wrapper table.wp-block-tablestack-wootable td .wc-block-button.loading{filter:brightness(50%);padding-right:30px;pointer-events:none}.tablestack-wootable .frontend-table-wrapper table.wp-block-tablestack-wootable td .wc-block-button.loading:after{animation:spin 1s linear infinite;border:2px solid #fff;border-radius:50%;border-top-color:transparent;content:"";height:16px;left:85%;margin-left:-8px;margin-top:-8px;position:absolute;top:50%;width:16px}@keyframes spin{0%{transform:rotate(0deg)}to{transform:rotate(1turn)}}.tablestack-wootable .frontend-table-wrapper table.wp-block-tablestack-wootable td .wc-block-button.added{filter:brightness(85%)}.tablestack-wootable .frontend-table-wrapper table.wp-block-tablestack-wootable th{font-size:.85em;letter-spacing:.1em;line-height:15px;padding:.625em;text-transform:uppercase}.tablestack-wootable .frontend-table-wrapper table.wp-block-tablestack-wootable th div.move-icon{cursor:grab;font-size:medium}.tablestack-wootable .tablestack-pagination{margin-top:5px}.tablestack-wootable .tablestack-pagination .mr-5{margin-right:5px}.tablestack-wootable .tablestack-pagination .paginate-button{background:var(--tablestack-paginate-button-bg-color);border:none;color:var(--tablestack-paginate-button-text-color);cursor:pointer;display:inline-block;font-size:13px;padding:6px 12px;text-align:center;white-space:nowrap;width:auto}.tablestack-wootable .tablestack-pagination .paginate-button:hover{background:var(--tablestack-paginate-button-hover-bg-color);color:var(--tablestack-paginate-button-hover-text-color)}.tablestack-wootable .tablestack-pagination .paginate-button:disabled,.tablestack-wootable .tablestack-pagination .paginate-button:disabled:hover{background:var(--tablestack-paginate-button-disabled-color);color:var(--tablestack-paginate-button-text-color);cursor:not-allowed}@media screen and (max-width:600px){.tablestack-wootable .frontend-table-wrapper table.wp-block-tablestack-wootable{border:0}.tablestack-wootable .frontend-table-wrapper table.wp-block-tablestack-wootable caption{font-size:1.3em}.tablestack-wootable .frontend-table-wrapper table.wp-block-tablestack-wootable thead{border:none;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px}.tablestack-wootable .frontend-table-wrapper table.wp-block-tablestack-wootable tr{border-bottom:3px solid #ddd;display:block;margin-bottom:.625em}.tablestack-wootable .frontend-table-wrapper table.wp-block-tablestack-wootable tr td{border-bottom:1px solid #ddd;display:block;font-size:.8em;text-align:right;width:none}.tablestack-wootable .frontend-table-wrapper table.wp-block-tablestack-wootable tr td div.cell-container img{width:70%}.tablestack-wootable .frontend-table-wrapper table.wp-block-tablestack-wootable tr td:before{content:attr(data-label);float:left;font-weight:700;text-transform:uppercase}.tablestack-wootable .frontend-table-wrapper table.wp-block-tablestack-wootable tr td:last-child{border-bottom:0}.tablestack-wootable .frontend-table-wrapper table.wp-block-tablestack-wootable tr td div.cell-container{align-items:end}}
  • table-block/trunk/includes/class-assets.php

    r3209914 r3277722  
    3838    private function __construct() {
    3939        add_action( 'init', [ $this, 'register_blocks' ] );
    40         add_action( 'init', [ $this, 'register_block_styles' ] );
     40        // add_action( 'init', [ $this, 'register_block_styles' ] );
    4141        add_action( 'enqueue_block_editor_assets', [ $this, 'localize_script' ] );
     42        add_action( 'admin_enqueue_scripts', [ $this, 'enqueue_admin_assets' ] );
     43
    4244    }
    4345
     
    5860     * Register block styles.
    5961     */
    60     public function register_block_styles() {
    61         $block_styles = [
    62             [
    63                 'block' => 'tablestack/table',
    64                 'style' => [
    65                     'name'  => 'rounded-table',
    66                     'label' => __( 'Rounded Table', 'table-stack' ),
    67                 ],
    68             ]
    69         ];
     62    // public function register_block_styles() {
     63    // $block_styles = [
     64    //      [
     65    //          'block' => 'tablestack/table',
     66    //          'style' => [
     67    //              'name'  => 'rounded-table',
     68    //              'label' => __( 'Rounded Table', 'table-stack' ),
     69    //          ],
     70    //      ]
     71    // ];
    7072
    71         foreach ( $block_styles as $block_style ) {
    72             register_block_style( $block_style['block'], $block_style['style'] );
    73         }
    74     }
     73    // foreach ( $block_styles as $block_style ) {
     74    //      register_block_style( $block_style['block'], $block_style['style'] );
     75    // }
     76    // }
    7577
    7678    /**
     
    9496        );
    9597    }
     98
     99    /**
     100     * Enqueue admin styles.
     101     */
     102    // public function enqueue_admin_styles(): void {
     103    //  wp_enqueue_style(
     104    //      'tablestack-admin-style',
     105    //      TABLESTACK_URL . '/assets/css/admin-style.css',
     106    //      [],
     107    //      TABLESTACK_VERSION
     108    //  );
     109    // }
     110
     111    public function enqueue_admin_assets( $hook ) {
     112        // Load only on the Table Block page
     113        if ( 'toplevel_page_tablestack-admin' !== $hook ) {
     114            return;
     115        }
     116
     117        wp_enqueue_style(
     118            'tablestack-admin',
     119            TABLESTACK_URL . '/assets/css/admin.css',
     120            [],
     121            TABLESTACK_VERSION
     122        );
     123
     124        wp_enqueue_script(
     125            'tablestack-admin',
     126            TABLESTACK_URL . '/assets/js/admin.js',
     127            [ 'jquery' ],
     128            TABLESTACK_VERSION,
     129            true
     130        );
     131    }
    96132}
  • table-block/trunk/includes/class-plugin.php

    r3191529 r3277722  
    2828
    2929    /**
     30     * Admin instance.
     31     *
     32     * @var Admin
     33     */
     34    protected $admin;
     35
     36    /**
    3037     * Initialize the plugin.
    3138     *
     
    4350     */
    4451    protected function load_dependencies(): void {
    45         require_once TABLESTACK_PATH . '/includes/class-assets.php';
    46     }
     52        require_once TABLESTACK_PATH . '/includes/class-assets.php';
     53        require_once TABLESTACK_PATH . '/includes/class-admin.php';
     54        $this->admin = new Admin();
     55    }
    4756
    4857    /**
     
    5362    protected function load_hooks(): void {
    5463        add_filter( 'plugin_row_meta', [ $this, 'plugin_row_meta' ], 10, 2 );
     64        add_action('admin_menu', [$this->admin, 'register_menu']);
    5565        Assets::get_instance();
    5666    }
  • table-block/trunk/languages/table-block.pot

    r3209914 r3277722  
    1 # Copyright (C) 2024 wprigel
     1# Copyright (C) 2025 wprigel
    22# This file is distributed under the GPL2.
    33msgid ""
    44msgstr ""
    5 "Project-Id-Version: TableStack- Ultimate Table Builder for Block Edtior 1.0.0\n"
     5"Project-Id-Version: TableStack- Ultimate Table Builder for Block Edtior 1.0.2\n"
    66"Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/table-block\n"
    77"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
     
    1010"Content-Type: text/plain; charset=UTF-8\n"
    1111"Content-Transfer-Encoding: 8bit\n"
    12 "POT-Creation-Date: 2024-12-18T14:03:58+00:00\n"
     12"POT-Creation-Date: 2025-04-20T19:31:44+02:00\n"
    1313"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
    14 "X-Generator: WP-CLI 2.9.0\n"
     14"X-Generator: WP-CLI 2.11.0\n"
    1515
    1616#. Plugin Name of the plugin
     17#: table-block.php
    1718msgid "TableStack- Ultimate Table Builder for Block Edtior"
    1819msgstr ""
    1920
    2021#. Description of the plugin
     22#: table-block.php
    2123msgid "TableStack is a powerful table builder block plugin for WordPress designed to simplify the process of creating and managing tables within the Gutenberg editor. No short code required."
    2224msgstr ""
    2325
    2426#. Author of the plugin
     27#: table-block.php
    2528msgid "wprigel"
    2629msgstr ""
    2730
    2831#. Author URI of the plugin
     32#: table-block.php
    2933msgid "http://wprigel.com/"
    3034msgstr ""
    3135
    32 #: includes/class-assets.php:66
    33 msgid "Rounded Table"
    34 msgstr ""
    35 
    36 #: includes/class-plugin.php:69
     36#: admin/table-block-admin.php:3
     37#: includes/class-admin.php:28
     38#: includes/class-admin.php:29
     39msgid "Table Block"
     40msgstr ""
     41
     42#: admin/table-block-admin.php:7
     43msgid "Table Block Features"
     44msgstr ""
     45
     46#: admin/table-block-admin.php:8
     47msgid "Table Block Demo"
     48msgstr ""
     49
     50#: admin/table-block-admin.php:9
     51msgid "Product Table Block Demo"
     52msgstr ""
     53
     54#: admin/table-block-admin.php:16
     55msgid "Default Table Demos"
     56msgstr ""
     57
     58#: admin/table-block-admin.php:17
     59msgid "Explore the different types of tables you can create with the Table Block plugin."
     60msgstr ""
     61
     62#: admin/table-block-admin.php:43
     63#: admin/table-block-admin.php:79
     64msgid "Copy Block"
     65msgstr ""
     66
     67#: admin/table-block-admin.php:52
     68msgid "Product Table Demos"
     69msgstr ""
     70
     71#: admin/table-block-admin.php:53
     72msgid "Discover advanced product tables designed for WooCommerce."
     73msgstr ""
     74
     75#: admin/table-block-admin.php:276
     76msgid "Copied to clipboard!"
     77msgstr ""
     78
     79#: includes/class-admin.php:60
     80msgid "Table Block Plugin Features"
     81msgstr ""
     82
     83#: includes/class-admin.php:61
     84msgid "Welcome to the Table Block plugin! Choose a submenu for more information."
     85msgstr ""
     86
     87#: includes/class-plugin.php:79
    3788msgid "Get started"
    3889msgstr ""
    3990
    40 #: includes/class-plugin.php:70
     91#: includes/class-plugin.php:80
    4192msgid "Documentation"
    4293msgstr ""
    4394
    44 #: src/edit.js:127
    45 #: src/edit.js:156
     95#: src/edit.js:137
     96#: src/edit.js:166
    4697msgid "Create Table"
    4798msgstr ""
    4899
    49 #: src/edit.js:129
     100#: src/edit.js:139
    50101msgid "Create a table using block elements"
    51102msgstr ""
    52103
    53 #: src/edit.js:135
     104#: src/edit.js:145
    54105msgid "Column count"
    55106msgstr ""
    56107
    57 #: src/edit.js:144
     108#: src/edit.js:154
    58109msgid "Row count"
    59110msgstr ""
    60111
    61 #: src/edit.js:160
     112#: src/edit.js:170
    62113msgid "Or"
    63114msgstr ""
    64115
    65 #: src/edit.js:167
     116#: src/edit.js:177
    66117msgid "Product Table"
    67118msgstr ""
     
    95146msgstr ""
    96147
    97 #: src/table/edit.js:93
     148#: src/table/edit.js:96
    98149msgid "Align top"
    99150msgstr ""
    100151
    101 #: src/table/edit.js:99
     152#: src/table/edit.js:102
    102153msgid "Align middle"
    103154msgstr ""
    104155
    105 #: src/table/edit.js:105
     156#: src/table/edit.js:108
    106157msgid "Align bottom"
    107158msgstr ""
    108159
    109 #: src/table/edit.js:114
     160#: src/table/edit.js:117
    110161#: src/woo-table/edit.js:225
    111162msgid "Align left"
    112163msgstr ""
    113164
    114 #: src/table/edit.js:120
     165#: src/table/edit.js:123
    115166#: src/woo-table/edit.js:231
    116167msgid "Align center"
    117168msgstr ""
    118169
    119 #: src/table/edit.js:126
     170#: src/table/edit.js:129
    120171#: src/woo-table/edit.js:237
    121172msgid "Align right"
    122173msgstr ""
    123174
    124 #: src/table/edit.js:246
     175#: src/table/edit.js:252
    125176#: src/woo-table/edit.js:614
    126177msgid "Vertical Alignment"
    127178msgstr ""
    128179
    129 #: src/table/edit.js:253
     180#: src/table/edit.js:259
    130181#: src/woo-table/edit.js:621
    131182msgid "Horizontal Alignment"
    132183msgstr ""
    133184
    134 #: src/table/edit.js:262
     185#: src/table/edit.js:268
    135186msgid "Show Table Header"
    136187msgstr ""
    137188
    138 #: src/table/edit.js:266
     189#: src/table/edit.js:272
    139190msgid "Table Types"
    140191msgstr ""
    141192
    142 #: src/table/edit.js:281
     193#: src/table/edit.js:287
    143194#: src/woo-table/edit.js:768
    144195msgid "Table Color Settings"
    145196msgstr ""
    146197
    147 #: src/table/edit.js:286
     198#: src/table/edit.js:292
    148199#: src/woo-table/edit.js:773
    149200msgid "Header row color"
    150201msgstr ""
    151202
    152 #: src/table/edit.js:291
     203#: src/table/edit.js:297
    153204msgid "Header row text color"
    154205msgstr ""
    155206
    156 #: src/table/edit.js:296
     207#: src/table/edit.js:302
    157208#: src/woo-table/edit.js:778
    158209msgid "Odd row color"
    159210msgstr ""
    160211
    161 #: src/table/edit.js:301
     212#: src/table/edit.js:307
    162213msgid "Odd row text color"
    163214msgstr ""
    164215
    165 #: src/table/edit.js:306
     216#: src/table/edit.js:312
    166217#: src/woo-table/edit.js:783
    167218msgid "Even row color"
    168219msgstr ""
    169220
    170 #: src/table/edit.js:311
     221#: src/table/edit.js:317
    171222msgid "Even row text color"
    172223msgstr ""
    173224
    174 #: src/table/edit.js:315
     225#: src/table/edit.js:321
    175226#: src/woo-table/edit.js:839
    176227msgid "Table Cell Padding"
    177228msgstr ""
    178229
    179 #: src/table/edit.js:317
     230#: src/table/edit.js:323
    180231#: src/woo-table/edit.js:841
    181232msgid "Padding"
    182233msgstr ""
    183234
    184 #: src/table/edit.js:322
     235#: src/table/edit.js:328
    185236msgid "Border Settings"
    186237msgstr ""
    187238
    188 #: src/table/edit.js:325
     239#: src/table/edit.js:331
    189240msgid "Show column only border"
    190241msgstr ""
    191242
    192 #: src/table/edit.js:333
     243#: src/table/edit.js:339
    193244msgid "Column only border"
    194245msgstr ""
    195246
    196 #: src/table/edit.js:342
     247#: src/table/edit.js:360
    197248msgid "Table border"
    198249msgstr ""
    199250
    200 #: src/table/edit.js:350
     251#: src/table/edit.js:368
    201252msgid "Cell border"
    202253msgstr ""
     
    461512#: src/woo-table/block.json
    462513msgctxt "block title"
    463 msgid "Table stack product table"
     514msgid "Product Table"
    464515msgstr ""
    465516
  • table-block/trunk/package.json

    r3209914 r3277722  
    11{
    22    "name": "table-block",
    3     "version": "1.0.1",
     3    "version": "1.0.2",
    44    "description": "All in one table builder block for Gutenberg",
    55    "author": "wpRigel",
     
    1616        "makepot": "wp i18n make-pot . languages/table-block.pot --exclude=vendor,node_modules,build,assets/build --ignore-domain"
    1717    },
    18     "files": [ "build", "src", "includes", "languages", "readme.txt", "table-block.php" ],
     18    "files": [ "build", "assets", "src", "includes", "admin", "languages", "readme.txt", "table-block.php" ],
    1919    "devDependencies": {
    2020        "@wordpress/scripts": "^27.9.0"
  • table-block/trunk/readme.txt

    r3209914 r3277722  
    11=== TableStack- Ultimate Table Builder for Block Editor ===
    2 Contributors: wprigel, sakiladnan
     2Contributors: wprigel
    33Tags: table builder, table creator, Gutenberg table, table plugin, product table
    4 Requires at least: 6.1
    5 Tested up to: 6.7
     4Requires at least: 6.4
     5Tested up to: 6.8
    66Requires PHP: 7.4
    7 Stable tag: 1.0.1
     7Stable tag: 1.0.2
    88License: GPLv2 or later
    99License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    2022024. Default tableFrontend view
    2032035. Default table Frontend view 2
    204 6. Rounded dark table
    205 7. Stripe table
    206 8. WooCommerce product table General Settings
    207 9. WooCommerce product table query builder
    208 10. WooCommerce product table Style Settings
    209 11. WooCommerce product table Frontend view
     2046. Supported blocks in cell
     2057. WooCommerce product table General Settings
     2068. WooCommerce product table query builder
     2079. WooCommerce product table Style Settings
     20810. WooCommerce product table Frontend view
    210209
    211210== Changelog ==
    212 
    213 v1.0.1 -> December 18, 2024
    214 --------------------------------------------
    215 - [feat] Added few table predefined layouts
    216 - [feat] Added rounded table corner settings
    217 - [fix] Fixed version related issues
    218 - [fix] Fixed paragraph alignment issues and font size issues
    219 - [fix] Fixed table block settings once block inserted
    220 - [fix] Added backspace key support before removing the block content from cell
    221 - [fix] Fixed few css styling issues
    222 - [fix] Fixed table header text transformation and alignment issue
    223 - [fix] Fixed table block settings issue
    224 
    225211
    226212v1.0.0 -> November 18, 2024
  • table-block/trunk/src/edit.js

    r3209914 r3277722  
    33import { Placeholder, TextControl, Button } from "@wordpress/components";
    44import { grid } from "@wordpress/icons";
    5 import { useEffect } from '@wordpress/element';
    6 import { useSelect, dispatch, useDispatch } from '@wordpress/data';
     5import { useEffect, useState } from '@wordpress/element';
     6import { useSelect, useDispatch } from '@wordpress/data';
    77import {
    88    useBlockProps,
     
    1414} from "@wordpress/blocks";
    1515
    16 import { useState, useRef } from "react";
    17 
    1816const ALLOWED_BLOCKS = ["tablestack/table", "tablestack/wootable"];
    1917
     
    4543    );
    4644   
    47     const hasTableBlock = useRef(false);
    48    
     45    const { selectBlock } = useDispatch('core/block-editor');
     46
     47    // Get the currently selected block
     48    const { selectedBlockClientId, getBlock } = useSelect((select) => {
     49        const editor = select('core/block-editor');
     50        return {
     51            selectedBlockClientId: editor.getSelectedBlockClientId(),
     52            getBlock: editor.getBlock,
     53        };
     54    });
     55
    4956    useEffect(() => {
    50         if (!hasTableBlock.current && innerBlocks.length > 0) {
    51             const lastBlock = innerBlocks[innerBlocks.length - 1];
    52             if (lastBlock && ['tablestack/table', 'tablestack/wootable'].includes(lastBlock.name)) {
    53                 hasTableBlock.current = true;
    54                 dispatch('core/block-editor').selectBlock(lastBlock.clientId);
     57        if (selectedBlockClientId === clientId) {
     58           
     59            const tableBlock = innerBlocks.find((block) =>
     60                ['tablestack/table', 'tablestack/wootable'].includes(block.name)
     61            );
     62
     63            if (tableBlock) {
     64                selectBlock(tableBlock.clientId);
    5565            }
    5666        }
    57     }, [innerBlocks]);
    58    
     67    }, [selectedBlockClientId, clientId, innerBlocks, selectBlock]);
     68
    5969
    6070    function checkWooCommerceIsActive() {
  • table-block/trunk/src/style.scss

    r3209914 r3277722  
    66
    77
    8 
    98.wp-block-tablestack-tablewrapper {
    10 
    11     table.is-style-rounded-table {
    12         tr {
    13             &:first-of-type {
    14                 border-top-left-radius: 10px;
    15                 border-top-right-radius: 10px;
    16                 td, th {
    17                     &:first-of-type {
    18                         border-top-left-radius: 10px;
    19                     }
    20                     &:last-of-type {
    21                         border-top-right-radius: 10px;
    22                     }
    23                 }
    24             }
    25             &:last-of-type {
    26                 border-bottom-left-radius: 10px;
    27                 border-bottom-right-radius: 10px;
    28                 td {
    29                     &:first-of-type {
    30                         border-bottom-left-radius: 10px;
    31                     }
    32                     &:last-of-type {
    33                         border-bottom-right-radius: 10px;
    34                     }
    35                 }
    36             }
    37         }
    38     }
    39 
    40     table.wp-block-tablestack-table {
     9   
     10    .wp-block-tablestack-table {
    4111        border-style: var(--tablestack-table-border-style);
    4212        border-color: var(--tablestack-table-border-color);
    4313        border-width: var(--tablestack-table-border-width);
    44         border-collapse: collapse;
    45         margin: 0;
    46         padding: 0;
    47         width: 100%;
    48 
    49         td + td {
    50             // border-left:1px solid #202832;
    51             border-left-style: var(--tablestack-column-only-border-style);
    52             border-left-color: var(--tablestack-column-only-border-color);
    53             border-left-width: var(--tablestack-column-only-border-width);
    54         }
    55        
    56         td, th {
    57             border-style: var(--tablestack-table-cell-border-style);
    58             border-color: var(--tablestack-table-cell-border-color);
    59             border-width: var(--tablestack-table-cell-border-width);
    60             word-wrap: break-word;
    61             div.cell-container {
    62                 display: flex;
    63                 flex-direction: column;
    64                 align-items: var(--tablestack-cell-horizontal-alignment);
    65 
    66                 p {
    67                     padding: 0;
    68                     margin: 0;
    69                     width: 100%;
    70                     span {
    71                         font-size: 14px;
    72                     }
    73                 }
    74 
    75                 ul, ol {
    76                     margin: 0;
    77                 }
    78             }
    79         }
    80 
    81         td, th {
    82             vertical-align: var(--tablestack-cell-vertical-alignment);
    83             // word-wrap: break-word; /* Break long words */
    84             // word-break: break-word; /* Ensure words break inside the cell */
    85             white-space: normal; /* Allow text to wrap inside the cell */
    86         }
    87 
    88         caption {
    89             font-size: 1.5em;
    90             margin: .5em 0 .75em;
    91         }
    92 
    93         tr:not(.header-row):nth-child(even) {
    94             background-color: var(--tablestack-even-row-bg-color);
    95             color: var(--tablestack-even-row-text-color)
    96         }
    97         tr:not(.header-row):nth-child(odd) {
    98             background-color: var(--tablestack-odd-row-bg-color);
    99             color: var(--tablestack-odd-row-text-color)
    100         }
    101         tr.header-row {
    102             background-color: var(--tablestack-header-row-bg-color);
    103             color: var(--tablestack-header-row-text-color)
    104         }
    105 
    106         th, td {
    107             padding-top: var(--tablestack-padding-top);
    108             padding-bottom: var(--tablestack-padding-bottom);
    109             padding-left: var(--tablestack-padding-left);
    110             padding-right: var(--tablestack-padding-right);
    111         }
    112 
    113         th {
    114             font-size: .85em;
    115             letter-spacing: .1em;
    116         }
    117 
    118         tbody.body-loading {
    119             opacity: 0.5; /* Adjust opacity value as needed */
    120             transition: opacity 0.7s ease-in;
     14        border-radius: var(--tablestack-table-border-radius);
     15        overflow: hidden;
     16        table {
     17            border: unset;
     18            border-collapse: collapse;
     19            margin: 0;
     20            padding: 0;
     21            width: 100%;
     22       
     23            tr {
     24                &:not(:last-child) {
     25                    td, th {
     26                        border-bottom-style: var(--tablestack-table-border-style);
     27                        border-bottom-color: var(--tablestack-table-border-color);
     28                        border-bottom-width: var(--tablestack-table-border-width);
     29                    }
     30                }
     31       
     32                &:not(.header-row) {
     33                    &:nth-child(even) {
     34                        background-color: var(--tablestack-even-row-bg-color);
     35                        color: var(--tablestack-even-row-text-color);
     36                    }
     37       
     38                    &:nth-child(odd) {
     39                        background-color: var(--tablestack-odd-row-bg-color);
     40                        color: var(--tablestack-odd-row-text-color);
     41                    }
     42                }
     43       
     44                &.header-row {
     45                    background-color: var(--tablestack-header-row-bg-color);
     46                    color: var(--tablestack-header-row-text-color);
     47                }
     48            }
     49       
     50            td, th {
     51                white-space: normal; /* Allow text to wrap inside the cell */
     52                vertical-align: var(--tablestack-cell-vertical-alignment);
     53                word-wrap: break-word;
     54                padding: var(--tablestack-padding-top) var(--tablestack-padding-right)
     55                        var(--tablestack-padding-bottom) var(--tablestack-padding-left);
     56       
     57                &:not(:last-child) {
     58                    border-right-style: var(--tablestack-table-cell-border-style);
     59                    border-right-color: var(--tablestack-table-cell-border-color);
     60                    border-right-width: var(--tablestack-table-cell-border-width);
     61                }
     62       
     63                div.cell-container {
     64                    display: flex;
     65                    flex-direction: column;
     66                    align-items: var(--tablestack-cell-horizontal-alignment);
     67       
     68                    p {
     69                        padding: 0;
     70                        margin: 0;
     71                        width: 100%;
     72       
     73                        span {
     74                            font-size: 14px;
     75                        }
     76                    }
     77       
     78                    ul, ol {
     79                        margin: 0;
     80                    }
     81                }
     82            }
     83       
     84            th {
     85                font-size: 0.85em;
     86                letter-spacing: 0.1em;
     87            }
     88       
     89            caption {
     90                font-size: 1.5em;
     91                margin: 0.5em 0 0.75em;
     92            }
     93       
     94            tbody.body-loading {
     95                opacity: 0.5; /* Adjust opacity value as needed */
     96                transition: opacity 0.7s ease-in;
     97            }
    12198        }
    12299    }
     100   
     101
     102    // table.wp-block-tablestack-table {
     103    //  border: unset;
     104    //  border-collapse: collapse;
     105    //  margin: 0;
     106    //  padding: 0;
     107    //  width: 100%;
     108
     109    //  // td + td {
     110    //      // border-left:1px solid #202832;
     111    //      // border-left-style: var(--tablestack-column-only-border-style);
     112    //      // border-left-color: var(--tablestack-column-only-border-color);
     113    //      // border-left-width: var(--tablestack-column-only-border-width);
     114    //  // }
     115    //  tr:not(:last-child) td,
     116    //  tr:not(:last-child) th {
     117    //      border-bottom-style: var(--tablestack-table-border-style);
     118    //      border-bottom-color: var(--tablestack-table-border-color);
     119    //      border-bottom-width: var(--tablestack-table-border-width);
     120    //  }
     121       
     122    //  td, th {
     123           
     124    //      // word-wrap: break-word; /* Break long words */
     125    //      // word-break: break-word; /* Ensure words break inside the cell */
     126    //      white-space: normal; /* Allow text to wrap inside the cell */
     127    //      vertical-align: var(--tablestack-cell-vertical-alignment);
     128
     129    //      &:not(:last-child) {
     130    //          border-right-style: var(--tablestack-table-cell-border-style);
     131    //          border-right-color: var(--tablestack-table-cell-border-color);
     132    //          border-right-width: var(--tablestack-table-cell-border-width);
     133    //      }
     134    //      word-wrap: break-word;
     135    //      div.cell-container {
     136    //          display: flex;
     137    //          flex-direction: column;
     138    //          align-items: var(--tablestack-cell-horizontal-alignment);
     139
     140    //          p {
     141    //              padding: 0;
     142    //              margin: 0;
     143    //              width: 100%;
     144    //              span {
     145    //                  font-size: 14px;
     146    //              }
     147    //          }
     148
     149    //          ul, ol {
     150    //              margin: 0;
     151    //          }
     152    //      }
     153    //  }
     154
     155    //  // td, th {
     156           
     157    //  // }
     158
     159    //  caption {
     160    //      font-size: 1.5em;
     161    //      margin: .5em 0 .75em;
     162    //  }
     163
     164    //  tr:not(.header-row):nth-child(even) {
     165    //      background-color: var(--tablestack-even-row-bg-color);
     166    //      color: var(--tablestack-even-row-text-color)
     167    //  }
     168    //  tr:not(.header-row):nth-child(odd) {
     169    //      background-color: var(--tablestack-odd-row-bg-color);
     170    //      color: var(--tablestack-odd-row-text-color)
     171    //  }
     172    //  tr.header-row {
     173    //      background-color: var(--tablestack-header-row-bg-color);
     174    //      color: var(--tablestack-header-row-text-color)
     175    //  }
     176
     177    //  th, td {
     178    //      padding-top: var(--tablestack-padding-top);
     179    //      padding-bottom: var(--tablestack-padding-bottom);
     180    //      padding-left: var(--tablestack-padding-left);
     181    //      padding-right: var(--tablestack-padding-right);
     182    //  }
     183
     184    //  th {
     185    //      font-size: .85em;
     186    //      letter-spacing: .1em;
     187    //  }
     188
     189    //  tbody.body-loading {
     190    //      opacity: 0.5; /* Adjust opacity value as needed */
     191    //      transition: opacity 0.7s ease-in;
     192    //  }
     193    // }
    123194
    124195    @media screen and (max-width: 600px) {
     
    143214
    144215            tr {
    145                 border-bottom: 3px solid #ddd;
     216                // border-bottom: 3px solid #ddd;
    146217                display: block;
    147218            }
  • table-block/trunk/src/table/block.json

    r3209914 r3277722  
    8181            }
    8282        },
     83        "tableBorderRadius":{
     84            "type": "number",
     85            "default": "0"
     86        },
    8387        "columnOnlyBorder": {
    8488            "type": "object",
  • table-block/trunk/src/table/edit.js

    r3209914 r3277722  
    1414    RadioControl,
    1515    ToggleControl,
     16    RangeControl,
    1617    __experimentalBoxControl as BoxControl,
    1718    ToolbarDropdownMenu,
     
    5556        tableBorder,
    5657        cellBorder,
    57         tableOption
     58        tableOption,
     59        tableBorderRadius
    5860    } = attributes;
    5961
     
    7476        '--tablestack-table-border-color': tableBorder?.color,
    7577        '--tablestack-table-border-width': tableBorder?.width,
     78        '--tablestack-table-border-radius': tableBorderRadius+'px',
    7679        '--tablestack-table-cell-border-style': cellBorder?.style,
    7780        '--tablestack-table-cell-border-color': cellBorder?.color,
     
    154157            }
    155158        }
    156         dispatch('core/block-editor').selectBlock(clientId);
     159        // dispatch('core/block-editor').selectBlock(clientId);
    157160    }, [showTableHeader]);
    158161
     
    197200            case 'general':
    198201                setAttributes({
    199                     showTableHeader: true,
    200                     headerRowBackground: '#36304A',
    201                     headerRowTextColor: '#ffffff',
     202                    showTableHeader: false,
     203                    headerRowBackground: '#E5E5E5',
     204                    headerRowTextColor: '#000000',
    202205                    evenRowBackground: '#ffffff',
    203                     oddRowBackground: '#f5f5f5',
     206                    oddRowBackground: '#ffffff',
    204207                    evenRowTextColor: '#000000',
    205208                    oddRowTextColor: '#000000',
    206                     tableBorder: { color: '', width: '', style: '' },
    207                     cellBorder: { color: '', width: '', style: '' }
     209                    tableBorderRadius: '0',
     210                    tableBorder: { color: '#ddd', width: '1px', style: 'solid' },
     211                    cellBorder: { color: '#ddd', width: '1px', style: 'solid' }
    208212                });
    209213                break;
    210214            case 'light':
    211215                setAttributes({
    212                     showTableHeader: true,
     216                    showTableHeader: false,
    213217                    evenRowBackground: '#EDEDED',
    214218                    oddRowBackground: '#ffffff',
    215219                    evenRowTextColor: '#000000',
    216220                    oddRowTextColor: '#000000',
     221                    tableBorderRadius: '0',
    217222                    tableBorder: { color: '', width: '', style: '' },
    218223                    cellBorder: { color: '', width: '', style: '' }
     
    221226            case 'dark':
    222227                setAttributes({
    223                     showTableHeader: true,
     228                    showTableHeader: false,
    224229                    evenRowBackground: '#2C3844',
    225230                    oddRowBackground: '#202832',
    226231                    evenRowTextColor: '#ffffff',
    227232                    oddRowTextColor: '#ffffff',
     233                    tableBorderRadius: '0',
    228234                    tableBorder: { color: '', width: '', style: '' },
    229235                    cellBorder: { color: '', width: '', style: '' }
     
    236242
    237243    return (
    238         <>
    239             <table { ...blockProps }>
     244        <div { ...blockProps }>
     245            <table>
    240246                <tbody {...innerBlocks} />
    241247            </table>
     
    269275                        options={ [
    270276                            { label: 'General', value: 'general' },
    271                             { label: 'Striped Light', value: 'light' },
    272                             { label: 'Striped Dark', value: 'dark' }
     277                            { label: 'Striped Light Square', value: 'light' },
     278                            { label: 'Striped Dark Square', value: 'dark' }
    273279                        ] }
    274280                        onChange={ ( value ) => selectTableType( value ) }
     
    336342                        />
    337343                    }
     344                   
     345                    <Divider />
     346                    <RangeControl
     347                        __nextHasNoMarginBottom
     348                        __next40pxDefaultSize
     349                        help="Set border radius of the table"
     350                        initialPosition={0}
     351                        label="Border radius"
     352                        max={50}
     353                        min={0}
     354                        onChange={(value) => setAttributes({tableBorderRadius: value})}
     355                    />
    338356                    <Divider />
    339357                    <BorderBoxControl
     
    354372                </PanelBody>
    355373            </InspectorControls>
    356         </>
     374        </div>
    357375    );
    358376}
    359 
    360 
    361 
  • table-block/trunk/src/table/save.js

    r3209914 r3277722  
    1515        tableBorder,
    1616        cellBorder,
    17         showColumnOnlyBorder
     17        showColumnOnlyBorder,
     18        tableBorderRadius
    1819    } = attributes;
    1920
     
    3435        '--tablestack-table-border-color': tableBorder?.color,
    3536        '--tablestack-table-border-width': tableBorder?.width,
     37        '--tablestack-table-border-radius': tableBorderRadius+'px',
    3638        '--tablestack-table-cell-border-style': cellBorder?.style,
    3739        '--tablestack-table-cell-border-color': cellBorder?.color,
     
    4547
    4648    return (
    47         <table {...blockProps}>
    48             <tbody {...innerBlocks} />
    49         </table>
     49        <div { ...blockProps }>
     50            <table>
     51                <tbody {...innerBlocks} />
     52            </table>
     53        </div>   
    5054    );
    5155}
  • table-block/trunk/src/woo-table/block.json

    r3191529 r3277722  
    44    "name": "tablestack/wootable",
    55    "version": "0.1.0",
    6     "title": "Table stack product table",
     6    "title": "Product Table",
    77    "category": "widgets",
    88    "parent": [
  • table-block/trunk/src/woo-table/style.scss

    r3191529 r3277722  
    4141            border: 1px solid #ddd;
    4242            &.header-row {
    43                 -color: var(--tablestack-header-row-bg-color);
     43                background-color: var(--tablestack-header-row-bg-color);
    4444            }
    4545            &.odd-row {
  • table-block/trunk/table-block.php

    r3209914 r3277722  
    55 * Requires at least: 6.1
    66 * Requires PHP:      7.4
    7  * Version:           1.0.1
     7 * Version:           1.0.2
    88 * Author:            wprigel
    99 * Author URI:        http://wprigel.com/
     
    2525
    2626// Define constants.
    27 define( 'TABLESTACK_VERSION', '1.0.1' );
     27define( 'TABLESTACK_VERSION', '0.1.0' );
    2828define( 'TABLESTACK_PATH', untrailingslashit( plugin_dir_path( __FILE__ ) ) );
    2929define( 'TABLESTACK_URL', untrailingslashit( plugin_dir_url( __FILE__ ) ) );
     
    3232 * Autoload dependencies.
    3333 */
     34require_once TABLESTACK_PATH . '/includes/class-admin.php';
    3435require_once TABLESTACK_PATH . '/includes/class-plugin.php';
    3536
Note: See TracChangeset for help on using the changeset viewer.