| @@ -1,176 +1,221 @@ | ||
| 1 | 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 | |
| 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 | + ] | |
| 25 | 32 | }, |
| 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": [] | |
| 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 | + } | |
| 174 | 220 | } |
| 175 | - } | |
| 176 | 221 | } |