Changeset 3277722
- Timestamp:
- 04/20/2025 05:45:15 PM (11 months ago)
- Location:
- table-block/trunk
- Files:
-
- 23 edited
-
build/index.asset.php (modified) (1 diff)
-
build/index.js (modified) (1 diff)
-
build/style-index-rtl.css (modified) (1 diff)
-
build/style-index.css (modified) (1 diff)
-
build/table/block.json (modified) (1 diff)
-
build/table/index.asset.php (modified) (1 diff)
-
build/table/index.js (modified) (1 diff)
-
build/woo-table/block.json (modified) (1 diff)
-
build/woo-table/style-index-rtl.css (modified) (1 diff)
-
build/woo-table/style-index.css (modified) (1 diff)
-
includes/class-assets.php (modified) (3 diffs)
-
includes/class-plugin.php (modified) (3 diffs)
-
languages/table-block.pot (modified) (4 diffs)
-
package.json (modified) (2 diffs)
-
readme.txt (modified) (2 diffs)
-
src/edit.js (modified) (3 diffs)
-
src/style.scss (modified) (2 diffs)
-
src/table/block.json (modified) (1 diff)
-
src/table/edit.js (modified) (10 diffs)
-
src/table/save.js (modified) (3 diffs)
-
src/woo-table/block.json (modified) (1 diff)
-
src/woo-table/style.scss (modified) (1 diff)
-
table-block.php (modified) (3 diffs)
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 81 81 } 82 82 }, 83 "tableBorderRadius": { 84 "type": "number", 85 "default": "0" 86 }, 83 87 "columnOnlyBorder": { 84 88 "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 4 4 "name": "tablestack/wootable", 5 5 "version": "0.1.0", 6 "title": " Table stack product table",6 "title": "Product Table", 7 7 "category": "widgets", 8 8 "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 38 38 private function __construct() { 39 39 add_action( 'init', [ $this, 'register_blocks' ] ); 40 add_action( 'init', [ $this, 'register_block_styles' ] );40 // add_action( 'init', [ $this, 'register_block_styles' ] ); 41 41 add_action( 'enqueue_block_editor_assets', [ $this, 'localize_script' ] ); 42 add_action( 'admin_enqueue_scripts', [ $this, 'enqueue_admin_assets' ] ); 43 42 44 } 43 45 … … 58 60 * Register block styles. 59 61 */ 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 // ]; 70 72 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 // } 75 77 76 78 /** … … 94 96 ); 95 97 } 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 } 96 132 } -
table-block/trunk/includes/class-plugin.php
r3191529 r3277722 28 28 29 29 /** 30 * Admin instance. 31 * 32 * @var Admin 33 */ 34 protected $admin; 35 36 /** 30 37 * Initialize the plugin. 31 38 * … … 43 50 */ 44 51 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 } 47 56 48 57 /** … … 53 62 protected function load_hooks(): void { 54 63 add_filter( 'plugin_row_meta', [ $this, 'plugin_row_meta' ], 10, 2 ); 64 add_action('admin_menu', [$this->admin, 'register_menu']); 55 65 Assets::get_instance(); 56 66 } -
table-block/trunk/languages/table-block.pot
r3209914 r3277722 1 # Copyright (C) 202 4wprigel1 # Copyright (C) 2025 wprigel 2 2 # This file is distributed under the GPL2. 3 3 msgid "" 4 4 msgstr "" 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" 6 6 "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/table-block\n" 7 7 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" … … 10 10 "Content-Type: text/plain; charset=UTF-8\n" 11 11 "Content-Transfer-Encoding: 8bit\n" 12 "POT-Creation-Date: 202 4-12-18T14:03:58+00:00\n"12 "POT-Creation-Date: 2025-04-20T19:31:44+02:00\n" 13 13 "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" 15 15 16 16 #. Plugin Name of the plugin 17 #: table-block.php 17 18 msgid "TableStack- Ultimate Table Builder for Block Edtior" 18 19 msgstr "" 19 20 20 21 #. Description of the plugin 22 #: table-block.php 21 23 msgid "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." 22 24 msgstr "" 23 25 24 26 #. Author of the plugin 27 #: table-block.php 25 28 msgid "wprigel" 26 29 msgstr "" 27 30 28 31 #. Author URI of the plugin 32 #: table-block.php 29 33 msgid "http://wprigel.com/" 30 34 msgstr "" 31 35 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 39 msgid "Table Block" 40 msgstr "" 41 42 #: admin/table-block-admin.php:7 43 msgid "Table Block Features" 44 msgstr "" 45 46 #: admin/table-block-admin.php:8 47 msgid "Table Block Demo" 48 msgstr "" 49 50 #: admin/table-block-admin.php:9 51 msgid "Product Table Block Demo" 52 msgstr "" 53 54 #: admin/table-block-admin.php:16 55 msgid "Default Table Demos" 56 msgstr "" 57 58 #: admin/table-block-admin.php:17 59 msgid "Explore the different types of tables you can create with the Table Block plugin." 60 msgstr "" 61 62 #: admin/table-block-admin.php:43 63 #: admin/table-block-admin.php:79 64 msgid "Copy Block" 65 msgstr "" 66 67 #: admin/table-block-admin.php:52 68 msgid "Product Table Demos" 69 msgstr "" 70 71 #: admin/table-block-admin.php:53 72 msgid "Discover advanced product tables designed for WooCommerce." 73 msgstr "" 74 75 #: admin/table-block-admin.php:276 76 msgid "Copied to clipboard!" 77 msgstr "" 78 79 #: includes/class-admin.php:60 80 msgid "Table Block Plugin Features" 81 msgstr "" 82 83 #: includes/class-admin.php:61 84 msgid "Welcome to the Table Block plugin! Choose a submenu for more information." 85 msgstr "" 86 87 #: includes/class-plugin.php:79 37 88 msgid "Get started" 38 89 msgstr "" 39 90 40 #: includes/class-plugin.php: 7091 #: includes/class-plugin.php:80 41 92 msgid "Documentation" 42 93 msgstr "" 43 94 44 #: src/edit.js:1 2745 #: src/edit.js:1 5695 #: src/edit.js:137 96 #: src/edit.js:166 46 97 msgid "Create Table" 47 98 msgstr "" 48 99 49 #: src/edit.js:1 29100 #: src/edit.js:139 50 101 msgid "Create a table using block elements" 51 102 msgstr "" 52 103 53 #: src/edit.js:1 35104 #: src/edit.js:145 54 105 msgid "Column count" 55 106 msgstr "" 56 107 57 #: src/edit.js:1 44108 #: src/edit.js:154 58 109 msgid "Row count" 59 110 msgstr "" 60 111 61 #: src/edit.js:1 60112 #: src/edit.js:170 62 113 msgid "Or" 63 114 msgstr "" 64 115 65 #: src/edit.js:1 67116 #: src/edit.js:177 66 117 msgid "Product Table" 67 118 msgstr "" … … 95 146 msgstr "" 96 147 97 #: src/table/edit.js:9 3148 #: src/table/edit.js:96 98 149 msgid "Align top" 99 150 msgstr "" 100 151 101 #: src/table/edit.js: 99152 #: src/table/edit.js:102 102 153 msgid "Align middle" 103 154 msgstr "" 104 155 105 #: src/table/edit.js:10 5156 #: src/table/edit.js:108 106 157 msgid "Align bottom" 107 158 msgstr "" 108 159 109 #: src/table/edit.js:11 4160 #: src/table/edit.js:117 110 161 #: src/woo-table/edit.js:225 111 162 msgid "Align left" 112 163 msgstr "" 113 164 114 #: src/table/edit.js:12 0165 #: src/table/edit.js:123 115 166 #: src/woo-table/edit.js:231 116 167 msgid "Align center" 117 168 msgstr "" 118 169 119 #: src/table/edit.js:12 6170 #: src/table/edit.js:129 120 171 #: src/woo-table/edit.js:237 121 172 msgid "Align right" 122 173 msgstr "" 123 174 124 #: src/table/edit.js:2 46175 #: src/table/edit.js:252 125 176 #: src/woo-table/edit.js:614 126 177 msgid "Vertical Alignment" 127 178 msgstr "" 128 179 129 #: src/table/edit.js:25 3180 #: src/table/edit.js:259 130 181 #: src/woo-table/edit.js:621 131 182 msgid "Horizontal Alignment" 132 183 msgstr "" 133 184 134 #: src/table/edit.js:26 2185 #: src/table/edit.js:268 135 186 msgid "Show Table Header" 136 187 msgstr "" 137 188 138 #: src/table/edit.js:2 66189 #: src/table/edit.js:272 139 190 msgid "Table Types" 140 191 msgstr "" 141 192 142 #: src/table/edit.js:28 1193 #: src/table/edit.js:287 143 194 #: src/woo-table/edit.js:768 144 195 msgid "Table Color Settings" 145 196 msgstr "" 146 197 147 #: src/table/edit.js:2 86198 #: src/table/edit.js:292 148 199 #: src/woo-table/edit.js:773 149 200 msgid "Header row color" 150 201 msgstr "" 151 202 152 #: src/table/edit.js:29 1203 #: src/table/edit.js:297 153 204 msgid "Header row text color" 154 205 msgstr "" 155 206 156 #: src/table/edit.js: 296207 #: src/table/edit.js:302 157 208 #: src/woo-table/edit.js:778 158 209 msgid "Odd row color" 159 210 msgstr "" 160 211 161 #: src/table/edit.js:30 1212 #: src/table/edit.js:307 162 213 msgid "Odd row text color" 163 214 msgstr "" 164 215 165 #: src/table/edit.js:3 06216 #: src/table/edit.js:312 166 217 #: src/woo-table/edit.js:783 167 218 msgid "Even row color" 168 219 msgstr "" 169 220 170 #: src/table/edit.js:31 1221 #: src/table/edit.js:317 171 222 msgid "Even row text color" 172 223 msgstr "" 173 224 174 #: src/table/edit.js:3 15225 #: src/table/edit.js:321 175 226 #: src/woo-table/edit.js:839 176 227 msgid "Table Cell Padding" 177 228 msgstr "" 178 229 179 #: src/table/edit.js:3 17230 #: src/table/edit.js:323 180 231 #: src/woo-table/edit.js:841 181 232 msgid "Padding" 182 233 msgstr "" 183 234 184 #: src/table/edit.js:32 2235 #: src/table/edit.js:328 185 236 msgid "Border Settings" 186 237 msgstr "" 187 238 188 #: src/table/edit.js:3 25239 #: src/table/edit.js:331 189 240 msgid "Show column only border" 190 241 msgstr "" 191 242 192 #: src/table/edit.js:33 3243 #: src/table/edit.js:339 193 244 msgid "Column only border" 194 245 msgstr "" 195 246 196 #: src/table/edit.js:3 42247 #: src/table/edit.js:360 197 248 msgid "Table border" 198 249 msgstr "" 199 250 200 #: src/table/edit.js:3 50251 #: src/table/edit.js:368 201 252 msgid "Cell border" 202 253 msgstr "" … … 461 512 #: src/woo-table/block.json 462 513 msgctxt "block title" 463 msgid " Table stack product table"514 msgid "Product Table" 464 515 msgstr "" 465 516 -
table-block/trunk/package.json
r3209914 r3277722 1 1 { 2 2 "name": "table-block", 3 "version": "1.0. 1",3 "version": "1.0.2", 4 4 "description": "All in one table builder block for Gutenberg", 5 5 "author": "wpRigel", … … 16 16 "makepot": "wp i18n make-pot . languages/table-block.pot --exclude=vendor,node_modules,build,assets/build --ignore-domain" 17 17 }, 18 "files": [ "build", " src", "includes", "languages", "readme.txt", "table-block.php" ],18 "files": [ "build", "assets", "src", "includes", "admin", "languages", "readme.txt", "table-block.php" ], 19 19 "devDependencies": { 20 20 "@wordpress/scripts": "^27.9.0" -
table-block/trunk/readme.txt
r3209914 r3277722 1 1 === TableStack- Ultimate Table Builder for Block Editor === 2 Contributors: wprigel , sakiladnan2 Contributors: wprigel 3 3 Tags: table builder, table creator, Gutenberg table, table plugin, product table 4 Requires at least: 6. 15 Tested up to: 6. 74 Requires at least: 6.4 5 Tested up to: 6.8 6 6 Requires PHP: 7.4 7 Stable tag: 1.0. 17 Stable tag: 1.0.2 8 8 License: GPLv2 or later 9 9 License URI: http://www.gnu.org/licenses/gpl-2.0.html … … 202 202 4. Default tableFrontend view 203 203 5. 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 204 6. Supported blocks in cell 205 7. WooCommerce product table General Settings 206 8. WooCommerce product table query builder 207 9. WooCommerce product table Style Settings 208 10. WooCommerce product table Frontend view 210 209 211 210 == Changelog == 212 213 v1.0.1 -> December 18, 2024214 --------------------------------------------215 - [feat] Added few table predefined layouts216 - [feat] Added rounded table corner settings217 - [fix] Fixed version related issues218 - [fix] Fixed paragraph alignment issues and font size issues219 - [fix] Fixed table block settings once block inserted220 - [fix] Added backspace key support before removing the block content from cell221 - [fix] Fixed few css styling issues222 - [fix] Fixed table header text transformation and alignment issue223 - [fix] Fixed table block settings issue224 225 211 226 212 v1.0.0 -> November 18, 2024 -
table-block/trunk/src/edit.js
r3209914 r3277722 3 3 import { Placeholder, TextControl, Button } from "@wordpress/components"; 4 4 import { grid } from "@wordpress/icons"; 5 import { useEffect } from '@wordpress/element';6 import { useSelect, dispatch,useDispatch } from '@wordpress/data';5 import { useEffect, useState } from '@wordpress/element'; 6 import { useSelect, useDispatch } from '@wordpress/data'; 7 7 import { 8 8 useBlockProps, … … 14 14 } from "@wordpress/blocks"; 15 15 16 import { useState, useRef } from "react";17 18 16 const ALLOWED_BLOCKS = ["tablestack/table", "tablestack/wootable"]; 19 17 … … 45 43 ); 46 44 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 49 56 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); 55 65 } 56 66 } 57 }, [ innerBlocks]);58 67 }, [selectedBlockClientId, clientId, innerBlocks, selectBlock]); 68 59 69 60 70 function checkWooCommerceIsActive() { -
table-block/trunk/src/style.scss
r3209914 r3277722 6 6 7 7 8 9 8 .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 { 41 11 border-style: var(--tablestack-table-border-style); 42 12 border-color: var(--tablestack-table-border-color); 43 13 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 } 121 98 } 122 99 } 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 // } 123 194 124 195 @media screen and (max-width: 600px) { … … 143 214 144 215 tr { 145 border-bottom: 3px solid #ddd;216 // border-bottom: 3px solid #ddd; 146 217 display: block; 147 218 } -
table-block/trunk/src/table/block.json
r3209914 r3277722 81 81 } 82 82 }, 83 "tableBorderRadius":{ 84 "type": "number", 85 "default": "0" 86 }, 83 87 "columnOnlyBorder": { 84 88 "type": "object", -
table-block/trunk/src/table/edit.js
r3209914 r3277722 14 14 RadioControl, 15 15 ToggleControl, 16 RangeControl, 16 17 __experimentalBoxControl as BoxControl, 17 18 ToolbarDropdownMenu, … … 55 56 tableBorder, 56 57 cellBorder, 57 tableOption 58 tableOption, 59 tableBorderRadius 58 60 } = attributes; 59 61 … … 74 76 '--tablestack-table-border-color': tableBorder?.color, 75 77 '--tablestack-table-border-width': tableBorder?.width, 78 '--tablestack-table-border-radius': tableBorderRadius+'px', 76 79 '--tablestack-table-cell-border-style': cellBorder?.style, 77 80 '--tablestack-table-cell-border-color': cellBorder?.color, … … 154 157 } 155 158 } 156 dispatch('core/block-editor').selectBlock(clientId);159 // dispatch('core/block-editor').selectBlock(clientId); 157 160 }, [showTableHeader]); 158 161 … … 197 200 case 'general': 198 201 setAttributes({ 199 showTableHeader: true,200 headerRowBackground: '# 36304A',201 headerRowTextColor: '# ffffff',202 showTableHeader: false, 203 headerRowBackground: '#E5E5E5', 204 headerRowTextColor: '#000000', 202 205 evenRowBackground: '#ffffff', 203 oddRowBackground: '#f 5f5f5',206 oddRowBackground: '#ffffff', 204 207 evenRowTextColor: '#000000', 205 208 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' } 208 212 }); 209 213 break; 210 214 case 'light': 211 215 setAttributes({ 212 showTableHeader: true,216 showTableHeader: false, 213 217 evenRowBackground: '#EDEDED', 214 218 oddRowBackground: '#ffffff', 215 219 evenRowTextColor: '#000000', 216 220 oddRowTextColor: '#000000', 221 tableBorderRadius: '0', 217 222 tableBorder: { color: '', width: '', style: '' }, 218 223 cellBorder: { color: '', width: '', style: '' } … … 221 226 case 'dark': 222 227 setAttributes({ 223 showTableHeader: true,228 showTableHeader: false, 224 229 evenRowBackground: '#2C3844', 225 230 oddRowBackground: '#202832', 226 231 evenRowTextColor: '#ffffff', 227 232 oddRowTextColor: '#ffffff', 233 tableBorderRadius: '0', 228 234 tableBorder: { color: '', width: '', style: '' }, 229 235 cellBorder: { color: '', width: '', style: '' } … … 236 242 237 243 return ( 238 < >239 <table { ...blockProps }>244 <div { ...blockProps }> 245 <table> 240 246 <tbody {...innerBlocks} /> 241 247 </table> … … 269 275 options={ [ 270 276 { 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' } 273 279 ] } 274 280 onChange={ ( value ) => selectTableType( value ) } … … 336 342 /> 337 343 } 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 /> 338 356 <Divider /> 339 357 <BorderBoxControl … … 354 372 </PanelBody> 355 373 </InspectorControls> 356 </ >374 </div> 357 375 ); 358 376 } 359 360 361 -
table-block/trunk/src/table/save.js
r3209914 r3277722 15 15 tableBorder, 16 16 cellBorder, 17 showColumnOnlyBorder 17 showColumnOnlyBorder, 18 tableBorderRadius 18 19 } = attributes; 19 20 … … 34 35 '--tablestack-table-border-color': tableBorder?.color, 35 36 '--tablestack-table-border-width': tableBorder?.width, 37 '--tablestack-table-border-radius': tableBorderRadius+'px', 36 38 '--tablestack-table-cell-border-style': cellBorder?.style, 37 39 '--tablestack-table-cell-border-color': cellBorder?.color, … … 45 47 46 48 return ( 47 <table {...blockProps}> 48 <tbody {...innerBlocks} /> 49 </table> 49 <div { ...blockProps }> 50 <table> 51 <tbody {...innerBlocks} /> 52 </table> 53 </div> 50 54 ); 51 55 } -
table-block/trunk/src/woo-table/block.json
r3191529 r3277722 4 4 "name": "tablestack/wootable", 5 5 "version": "0.1.0", 6 "title": " Table stack product table",6 "title": "Product Table", 7 7 "category": "widgets", 8 8 "parent": [ -
table-block/trunk/src/woo-table/style.scss
r3191529 r3277722 41 41 border: 1px solid #ddd; 42 42 &.header-row { 43 -color: var(--tablestack-header-row-bg-color);43 background-color: var(--tablestack-header-row-bg-color); 44 44 } 45 45 &.odd-row { -
table-block/trunk/table-block.php
r3209914 r3277722 5 5 * Requires at least: 6.1 6 6 * Requires PHP: 7.4 7 * Version: 1.0. 17 * Version: 1.0.2 8 8 * Author: wprigel 9 9 * Author URI: http://wprigel.com/ … … 25 25 26 26 // Define constants. 27 define( 'TABLESTACK_VERSION', ' 1.0.1' );27 define( 'TABLESTACK_VERSION', '0.1.0' ); 28 28 define( 'TABLESTACK_PATH', untrailingslashit( plugin_dir_path( __FILE__ ) ) ); 29 29 define( 'TABLESTACK_URL', untrailingslashit( plugin_dir_url( __FILE__ ) ) ); … … 32 32 * Autoload dependencies. 33 33 */ 34 require_once TABLESTACK_PATH . '/includes/class-admin.php'; 34 35 require_once TABLESTACK_PATH . '/includes/class-plugin.php'; 35 36
Note: See TracChangeset
for help on using the changeset viewer.