| 1 |
{ |
| 2 |
"apiVersion": 3, |
| 3 |
"$schema": "https://schemas.wp.org/trunk/block.json", |
| 4 |
"name": "blockenberg/data-table", |
| 5 |
"title": "Data Table", |
| 6 |
"category": "blockenberg", |
| 7 |
"icon": "editor-table", |
| 8 |
"description": "Interactive data table with sorting, search, pagination and export.", |
| 9 |
"keywords": ["table", "data", "grid", "spreadsheet", "csv", "excel", "sort", "filter"], |
| 10 |
"textdomain": "blockenberg", |
| 11 |
"editorScript": "bkbg-data-table-editor", |
| 12 |
"editorStyle": "bkbg-data-table-style", |
| 13 |
"style": "bkbg-data-table-style", |
| 14 |
"viewScript": "bkbg-data-table-frontend", |
| 15 |
"supports": { |
| 16 |
"html": false, |
| 17 |
"anchor": true, |
| 18 |
"className": true, |
| 19 |
"align": ["wide", "full"] |
| 20 |
}, |
| 21 |
"attributes": { |
| 22 |
"columns": { |
| 23 |
"type": "number", |
| 24 |
"default": 4 |
| 25 |
}, |
| 26 |
"headers": { |
| 27 |
"type": "array", |
| 28 |
"default": ["Name", "Category", "Price", "Status"] |
| 29 |
}, |
| 30 |
"rows": { |
| 31 |
"type": "array", |
| 32 |
"default": [ |
| 33 |
["Product A", "Electronics", "$299", "In Stock"], |
| 34 |
["Product B", "Clothing", "$49", "Low Stock"], |
| 35 |
["Product C", "Home & Garden", "$149", "In Stock"], |
| 36 |
["Product D", "Electronics", "$599", "Out of Stock"] |
| 37 |
] |
| 38 |
}, |
| 39 |
"caption": { |
| 40 |
"type": "string", |
| 41 |
"default": "" |
| 42 |
}, |
| 43 |
"captionPosition": { |
| 44 |
"type": "string", |
| 45 |
"default": "bottom" |
| 46 |
}, |
| 47 |
"searchEnabled": { |
| 48 |
"type": "boolean", |
| 49 |
"default": true |
| 50 |
}, |
| 51 |
"searchPlaceholder": { |
| 52 |
"type": "string", |
| 53 |
"default": "Search..." |
| 54 |
}, |
| 55 |
"sortingEnabled": { |
| 56 |
"type": "boolean", |
| 57 |
"default": true |
| 58 |
}, |
| 59 |
"paginationEnabled": { |
| 60 |
"type": "boolean", |
| 61 |
"default": false |
| 62 |
}, |
| 63 |
"itemsPerPage": { |
| 64 |
"type": "number", |
| 65 |
"default": 10 |
| 66 |
}, |
| 67 |
"stickyHeader": { |
| 68 |
"type": "boolean", |
| 69 |
"default": false |
| 70 |
}, |
| 71 |
"stickyFirstColumn": { |
| 72 |
"type": "boolean", |
| 73 |
"default": false |
| 74 |
}, |
| 75 |
"zebraStriping": { |
| 76 |
"type": "boolean", |
| 77 |
"default": true |
| 78 |
}, |
| 79 |
"rowHoverHighlight": { |
| 80 |
"type": "boolean", |
| 81 |
"default": true |
| 82 |
}, |
| 83 |
"responsiveMode": { |
| 84 |
"type": "string", |
| 85 |
"default": "scroll" |
| 86 |
}, |
| 87 |
"exportEnabled": { |
| 88 |
"type": "boolean", |
| 89 |
"default": true |
| 90 |
}, |
| 91 |
"exportCsvText": { |
| 92 |
"type": "string", |
| 93 |
"default": "Export CSV" |
| 94 |
}, |
| 95 |
"tableStyle": { |
| 96 |
"type": "string", |
| 97 |
"default": "default" |
| 98 |
}, |
| 99 |
"tableAlign": { |
| 100 |
"type": "string", |
| 101 |
"default": "left" |
| 102 |
}, |
| 103 |
"headerBg": { |
| 104 |
"type": "string", |
| 105 |
"default": "#f8fafc" |
| 106 |
}, |
| 107 |
"headerColor": { |
| 108 |
"type": "string", |
| 109 |
"default": "#1e293b" |
| 110 |
}, |
| 111 |
"headerBorderColor": { |
| 112 |
"type": "string", |
| 113 |
"default": "#e2e8f0" |
| 114 |
}, |
| 115 |
"cellBg": { |
| 116 |
"type": "string", |
| 117 |
"default": "#ffffff" |
| 118 |
}, |
| 119 |
"cellBgAlt": { |
| 120 |
"type": "string", |
| 121 |
"default": "#f8fafc" |
| 122 |
}, |
| 123 |
"cellColor": { |
| 124 |
"type": "string", |
| 125 |
"default": "#475569" |
| 126 |
}, |
| 127 |
"cellBorderColor": { |
| 128 |
"type": "string", |
| 129 |
"default": "#e2e8f0" |
| 130 |
}, |
| 131 |
"hoverBg": { |
| 132 |
"type": "string", |
| 133 |
"default": "#f1f5f9" |
| 134 |
}, |
| 135 |
"accentColor": { |
| 136 |
"type": "string", |
| 137 |
"default": "#3b82f6" |
| 138 |
}, |
| 139 |
"headerFontSize": { |
| 140 |
"type": "number", |
| 141 |
"default": 14 |
| 142 |
}, |
| 143 |
"headerFontWeight": { |
| 144 |
"type": "number", |
| 145 |
"default": 600 |
| 146 |
}, |
| 147 |
"cellFontSize": { |
| 148 |
"type": "number", |
| 149 |
"default": 14 |
| 150 |
}, |
| 151 |
"cellFontWeight": { |
| 152 |
"type": "number", |
| 153 |
"default": 400 |
| 154 |
}, |
| 155 |
"cellPadding": { |
| 156 |
"type": "number", |
| 157 |
"default": 12 |
| 158 |
}, |
| 159 |
"borderWidth": { |
| 160 |
"type": "number", |
| 161 |
"default": 1 |
| 162 |
}, |
| 163 |
"borderRadius": { |
| 164 |
"type": "number", |
| 165 |
"default": 8 |
| 166 |
}, |
| 167 |
"columnWidths": { |
| 168 |
"type": "array", |
| 169 |
"default": [] |
| 170 |
}, |
| 171 |
"columnAligns": { |
| 172 |
"type": "array", |
| 173 |
"default": [] |
| 174 |
} |
| 175 |
} |
| 176 |
} |
| 177 |
|