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