@lowdefy/blocks-aggrid 5.4.0 → 5.5.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/ag-grid-antd.module.css +10 -0
- package/dist/blocks/AgGridAlpine/meta.js +2 -525
- package/dist/blocks/AgGridBalham/meta.js +2 -525
- package/dist/blocks/AgGridInputAlpine/meta.js +2 -427
- package/dist/blocks/AgGridInputBalham/meta.js +2 -427
- package/dist/blocks/AgGridInputMaterial/meta.js +2 -427
- package/dist/blocks/AgGridMaterial/meta.js +2 -525
- package/dist/cellRenderers/ParagraphInputCell.js +76 -0
- package/dist/cellRenderers/SelectorCell.js +192 -0
- package/dist/cellRenderers/SwitchCell.js +74 -0
- package/dist/cellRenderers/TextInputCell.js +66 -0
- package/dist/cellRenderers/index.js +10 -1
- package/dist/createDisplayMeta.js +736 -0
- package/dist/createInputMeta.js +447 -0
- package/package.json +6 -5
|
@@ -0,0 +1,736 @@
|
|
|
1
|
+
/*
|
|
2
|
+
Copyright 2020-2026 Lowdefy, Inc
|
|
3
|
+
|
|
4
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
you may not use this file except in compliance with the License.
|
|
6
|
+
You may obtain a copy of the License at
|
|
7
|
+
|
|
8
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
|
|
10
|
+
Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
See the License for the specific language governing permissions and
|
|
14
|
+
limitations under the License.
|
|
15
|
+
*/ // Shared meta for the display AgGrid theme blocks (AgGridAlpine / AgGridMaterial / AgGridBalham).
|
|
16
|
+
// They are identical apart from the theme name in the css key description, so each block's meta.js
|
|
17
|
+
// is a one-line call to this factory rather than a duplicated copy of the whole schema.
|
|
18
|
+
function createDisplayMeta(blockName) {
|
|
19
|
+
return {
|
|
20
|
+
category: 'display',
|
|
21
|
+
icons: [],
|
|
22
|
+
valueType: null,
|
|
23
|
+
cssKeys: {
|
|
24
|
+
element: `The ${blockName} element.`
|
|
25
|
+
},
|
|
26
|
+
events: {
|
|
27
|
+
onCellClick: {
|
|
28
|
+
description: 'Trigger event when a cell is clicked.',
|
|
29
|
+
event: {
|
|
30
|
+
cell: 'The clicked cell with column and value.',
|
|
31
|
+
colId: 'The column id.',
|
|
32
|
+
row: 'The row data.',
|
|
33
|
+
rowIndex: 'The row index.',
|
|
34
|
+
selected: 'All selected rows.'
|
|
35
|
+
}
|
|
36
|
+
},
|
|
37
|
+
onFilterChanged: {
|
|
38
|
+
description: 'Trigger event when the filter changes.',
|
|
39
|
+
event: {
|
|
40
|
+
rows: 'The displayed rows after filtering.',
|
|
41
|
+
filter: 'The filter model.'
|
|
42
|
+
}
|
|
43
|
+
},
|
|
44
|
+
onRowClick: {
|
|
45
|
+
description: 'Trigger event when a row is clicked.',
|
|
46
|
+
event: {
|
|
47
|
+
row: 'The row data.',
|
|
48
|
+
selected: 'All selected rows.',
|
|
49
|
+
rowIndex: 'The row index.'
|
|
50
|
+
}
|
|
51
|
+
},
|
|
52
|
+
onRowSelected: {
|
|
53
|
+
description: 'Trigger event when a row is selected.',
|
|
54
|
+
event: {
|
|
55
|
+
row: 'The row data.',
|
|
56
|
+
rowIndex: 'The row index.',
|
|
57
|
+
selected: 'All selected rows.'
|
|
58
|
+
}
|
|
59
|
+
},
|
|
60
|
+
onSelectionChanged: {
|
|
61
|
+
description: 'Triggered when the selected rows are changed.',
|
|
62
|
+
event: {
|
|
63
|
+
selected: 'All selected rows.'
|
|
64
|
+
}
|
|
65
|
+
},
|
|
66
|
+
onSortChanged: {
|
|
67
|
+
description: 'Trigger event when the sort changes.',
|
|
68
|
+
event: {
|
|
69
|
+
rows: 'The displayed rows after sorting.',
|
|
70
|
+
sort: 'The sort column state.'
|
|
71
|
+
}
|
|
72
|
+
},
|
|
73
|
+
onCellLink: {
|
|
74
|
+
description: 'Triggered when a built-in `cell.type: link` (or avatar with `link`) cell is clicked. Wire to a `Link` action with `params: { _event: link }` to navigate.',
|
|
75
|
+
event: {
|
|
76
|
+
link: 'The resolved link config (pageId/href/urlQuery/back/home/newTab).',
|
|
77
|
+
row: 'The row data.',
|
|
78
|
+
value: 'The cell value.'
|
|
79
|
+
}
|
|
80
|
+
},
|
|
81
|
+
onCellButton: {
|
|
82
|
+
description: 'Documentation reference — the actual event name fired is the `eventName` string declared on each `cell.buttons[]` entry. Wire any number of named events on the block (e.g. `onApprove`, `onDelete`).',
|
|
83
|
+
event: {
|
|
84
|
+
row: 'The row data.',
|
|
85
|
+
value: 'The cell value.',
|
|
86
|
+
button: 'The clicked button: { eventName, title }.',
|
|
87
|
+
buttonIndex: 'Zero-based index in the buttons array.'
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
},
|
|
91
|
+
properties: {
|
|
92
|
+
type: 'object',
|
|
93
|
+
additionalProperties: false,
|
|
94
|
+
properties: {
|
|
95
|
+
height: {
|
|
96
|
+
type: [
|
|
97
|
+
'number',
|
|
98
|
+
'string'
|
|
99
|
+
],
|
|
100
|
+
default: 'auto',
|
|
101
|
+
description: 'Specify table height explicitly, in pixel.'
|
|
102
|
+
},
|
|
103
|
+
rowData: {
|
|
104
|
+
type: 'array',
|
|
105
|
+
description: 'The list of data to display on the table.'
|
|
106
|
+
},
|
|
107
|
+
rowId: {
|
|
108
|
+
type: 'string',
|
|
109
|
+
description: 'The data field to use in `getRowId` which results in Row Selection being maintained across Row Data changes (assuming the Row exists in both sets). See Ag Grid docs for more details (https://www.ag-grid.com/react-data-grid/data-update-row-data/).'
|
|
110
|
+
},
|
|
111
|
+
enableBrowserTooltips: {
|
|
112
|
+
type: 'boolean',
|
|
113
|
+
default: false,
|
|
114
|
+
description: "Set to `true` to use the browser native `title` attribute tooltips instead of AG Grid's styled tooltip component."
|
|
115
|
+
},
|
|
116
|
+
suppressCellFocus: {
|
|
117
|
+
type: 'boolean',
|
|
118
|
+
default: true,
|
|
119
|
+
description: 'When `true` (default), clicking a cell does not draw the AG Grid cell-focus border. Set to `false` to enable spreadsheet-style cell focus and keyboard navigation.'
|
|
120
|
+
},
|
|
121
|
+
tooltipShowDelay: {
|
|
122
|
+
type: 'number',
|
|
123
|
+
default: 2000,
|
|
124
|
+
description: 'The delay in milliseconds before a tooltip is shown. Not applied when `enableBrowserTooltips` is `true`.'
|
|
125
|
+
},
|
|
126
|
+
tooltipHideDelay: {
|
|
127
|
+
type: 'number',
|
|
128
|
+
default: 10000,
|
|
129
|
+
description: 'The delay in milliseconds before a tooltip is hidden. Not applied when `enableBrowserTooltips` is `true`.'
|
|
130
|
+
},
|
|
131
|
+
defaultColDef: {
|
|
132
|
+
type: 'object',
|
|
133
|
+
description: 'Column properties which get applied to all columns. See all (https://www.ag-grid.com/javascript-data-grid/column-properties/).'
|
|
134
|
+
},
|
|
135
|
+
columnDefs: {
|
|
136
|
+
type: 'array',
|
|
137
|
+
description: 'A list of properties for each column.',
|
|
138
|
+
items: {
|
|
139
|
+
type: 'object',
|
|
140
|
+
properties: {
|
|
141
|
+
field: {
|
|
142
|
+
type: 'string',
|
|
143
|
+
description: "The field of the row object to get the cell's data from. Deep references into a row object is supported via dot notation, i.e 'address.firstLine'."
|
|
144
|
+
},
|
|
145
|
+
headerName: {
|
|
146
|
+
type: 'string',
|
|
147
|
+
description: 'The name to render in the column header. If not specified and field is specified, the field name will be used as the header name.'
|
|
148
|
+
},
|
|
149
|
+
filter: {
|
|
150
|
+
type: 'boolean',
|
|
151
|
+
default: false,
|
|
152
|
+
description: 'Filter component to use for this column. Set to true to use the default filter.'
|
|
153
|
+
},
|
|
154
|
+
sortable: {
|
|
155
|
+
type: 'boolean',
|
|
156
|
+
default: false,
|
|
157
|
+
description: 'Set to true to allow sorting on this column.'
|
|
158
|
+
},
|
|
159
|
+
resizable: {
|
|
160
|
+
type: 'boolean',
|
|
161
|
+
default: false,
|
|
162
|
+
description: 'Set to true to allow this column should be resized.'
|
|
163
|
+
},
|
|
164
|
+
width: {
|
|
165
|
+
type: 'number',
|
|
166
|
+
description: 'Initial width in pixels for the cell.'
|
|
167
|
+
},
|
|
168
|
+
cellStyle: {
|
|
169
|
+
type: 'number',
|
|
170
|
+
description: 'An object of css values returning an object of css values for a particular cell.'
|
|
171
|
+
},
|
|
172
|
+
cellRenderer: {
|
|
173
|
+
type: 'object',
|
|
174
|
+
description: "Provide your own cell Renderer function (using the `_function` operator) for this column's cells."
|
|
175
|
+
},
|
|
176
|
+
valueFormatter: {
|
|
177
|
+
type: [
|
|
178
|
+
'object',
|
|
179
|
+
'string'
|
|
180
|
+
],
|
|
181
|
+
description: 'A function (using the `_function` operator) or expression to format a value, should return a string. Not used for CSV export or copy to clipboard, only for UI cell rendering.'
|
|
182
|
+
},
|
|
183
|
+
tooltipField: {
|
|
184
|
+
type: 'string',
|
|
185
|
+
description: "The field of the row object to read the tooltip value from. When set, hovering a cell shows a tooltip with that value using the grid's default tooltip component."
|
|
186
|
+
},
|
|
187
|
+
tooltipValueGetter: {
|
|
188
|
+
type: 'object',
|
|
189
|
+
description: 'Provide a function (using the `_function` operator) that returns the tooltip value for a cell. Overrides `tooltipField`.'
|
|
190
|
+
},
|
|
191
|
+
tooltipComponent: {
|
|
192
|
+
type: 'object',
|
|
193
|
+
description: 'Provide a custom tooltip component. See AG Grid tooltip component docs (https://www.ag-grid.com/react-data-grid/component-tooltip/).'
|
|
194
|
+
},
|
|
195
|
+
ellipsis: {
|
|
196
|
+
type: 'number',
|
|
197
|
+
description: 'Line-clamp count for long text. Automatically enables `wrapText` and `autoHeight` and applies the `.lf-ellipsis-N` class (1–6).'
|
|
198
|
+
},
|
|
199
|
+
cell: {
|
|
200
|
+
type: 'object',
|
|
201
|
+
description: 'Built-in cell renderer. Takes precedence over `cellRenderer` when `type` is set. Field-valued keys (e.g. `nameField`, `srcField`, `urlQuery.*`) are row-data paths.',
|
|
202
|
+
properties: {
|
|
203
|
+
type: {
|
|
204
|
+
type: 'string',
|
|
205
|
+
enum: [
|
|
206
|
+
'tag',
|
|
207
|
+
'avatar',
|
|
208
|
+
'link',
|
|
209
|
+
'date',
|
|
210
|
+
'boolean',
|
|
211
|
+
'progress',
|
|
212
|
+
'number',
|
|
213
|
+
'buttons',
|
|
214
|
+
'selector',
|
|
215
|
+
'multipleSelector',
|
|
216
|
+
'switch',
|
|
217
|
+
'textInput',
|
|
218
|
+
'paragraphInput'
|
|
219
|
+
],
|
|
220
|
+
description: 'The built-in renderer to use.'
|
|
221
|
+
},
|
|
222
|
+
colorMap: {
|
|
223
|
+
type: 'object',
|
|
224
|
+
description: 'Tag: map of cell value → color (antd tag color name or hex). Used when `cell.type: tag`. The cell value may be a single string or an array of strings; arrays render one tag per item. If neither `colorMap`, `colorFrom`, nor `default` is set, tag values are auto-coloured from a stable hash for consistency across rows.'
|
|
225
|
+
},
|
|
226
|
+
colorFrom: {
|
|
227
|
+
type: 'string',
|
|
228
|
+
description: 'Tag: row-data path to a color value. Takes precedence over `colorMap`.'
|
|
229
|
+
},
|
|
230
|
+
default: {
|
|
231
|
+
type: 'string',
|
|
232
|
+
description: 'Tag: fallback color for values not in `colorMap`.'
|
|
233
|
+
},
|
|
234
|
+
nameField: {
|
|
235
|
+
type: 'string',
|
|
236
|
+
description: 'Avatar: row-data path for the name label.'
|
|
237
|
+
},
|
|
238
|
+
srcField: {
|
|
239
|
+
type: 'string',
|
|
240
|
+
description: 'Avatar: row-data path for the image src (optional).'
|
|
241
|
+
},
|
|
242
|
+
idField: {
|
|
243
|
+
type: 'string',
|
|
244
|
+
description: 'Avatar: row-data path for an id used to seed initials colour.'
|
|
245
|
+
},
|
|
246
|
+
shape: {
|
|
247
|
+
type: 'string',
|
|
248
|
+
enum: [
|
|
249
|
+
'circle',
|
|
250
|
+
'square'
|
|
251
|
+
],
|
|
252
|
+
description: 'Avatar shape. Defaults to `circle`.'
|
|
253
|
+
},
|
|
254
|
+
link: {
|
|
255
|
+
type: 'object',
|
|
256
|
+
description: 'Avatar/Link: navigation config. Emits `onCellLink` on click. `pageId`/`href`/`back`/`home`/`newTab` are literal; `urlQuery` values are row-data paths.'
|
|
257
|
+
},
|
|
258
|
+
pageId: {
|
|
259
|
+
type: 'string',
|
|
260
|
+
description: 'Link: target page id (literal).'
|
|
261
|
+
},
|
|
262
|
+
href: {
|
|
263
|
+
type: 'string',
|
|
264
|
+
description: 'Link: literal href (overrides `pageId`).'
|
|
265
|
+
},
|
|
266
|
+
back: {
|
|
267
|
+
type: 'boolean',
|
|
268
|
+
description: 'Link: navigate back.'
|
|
269
|
+
},
|
|
270
|
+
home: {
|
|
271
|
+
type: 'boolean',
|
|
272
|
+
description: 'Link: navigate home.'
|
|
273
|
+
},
|
|
274
|
+
newTab: {
|
|
275
|
+
type: 'boolean',
|
|
276
|
+
description: 'Link: open in a new tab.'
|
|
277
|
+
},
|
|
278
|
+
urlQuery: {
|
|
279
|
+
type: 'object',
|
|
280
|
+
description: 'Link: query params. Each value is a row-data path.'
|
|
281
|
+
},
|
|
282
|
+
labelField: {
|
|
283
|
+
type: 'string',
|
|
284
|
+
description: 'Link: row-data path for the visible label (falls back to cell value).'
|
|
285
|
+
},
|
|
286
|
+
format: {
|
|
287
|
+
type: 'string',
|
|
288
|
+
description: 'Date: dayjs format string. Default `YYYY-MM-DD HH:mm`.'
|
|
289
|
+
},
|
|
290
|
+
relative: {
|
|
291
|
+
type: 'boolean',
|
|
292
|
+
description: 'Date: render as relative time (e.g. "3 hours ago").'
|
|
293
|
+
},
|
|
294
|
+
trueLabel: {
|
|
295
|
+
type: 'string',
|
|
296
|
+
description: 'Boolean: label when truthy.'
|
|
297
|
+
},
|
|
298
|
+
falseLabel: {
|
|
299
|
+
type: 'string',
|
|
300
|
+
description: 'Boolean: label when falsy.'
|
|
301
|
+
},
|
|
302
|
+
trueColor: {
|
|
303
|
+
type: 'string',
|
|
304
|
+
description: 'Boolean: CSS colour when truthy.'
|
|
305
|
+
},
|
|
306
|
+
falseColor: {
|
|
307
|
+
type: 'string',
|
|
308
|
+
description: 'Boolean: CSS colour when falsy.'
|
|
309
|
+
},
|
|
310
|
+
thresholds: {
|
|
311
|
+
type: 'array',
|
|
312
|
+
description: 'Progress: threshold values (ascending). Each threshold defines where the next colour starts.',
|
|
313
|
+
items: {
|
|
314
|
+
type: 'number'
|
|
315
|
+
}
|
|
316
|
+
},
|
|
317
|
+
colors: {
|
|
318
|
+
type: 'array',
|
|
319
|
+
description: 'Progress: colour per bucket (length = thresholds.length + 1).',
|
|
320
|
+
items: {
|
|
321
|
+
type: 'string'
|
|
322
|
+
}
|
|
323
|
+
},
|
|
324
|
+
suffix: {
|
|
325
|
+
type: 'string',
|
|
326
|
+
description: 'Number/Progress: literal suffix appended after the formatted value. Default `%` for progress.'
|
|
327
|
+
},
|
|
328
|
+
nullLabel: {
|
|
329
|
+
type: 'string',
|
|
330
|
+
description: 'Progress: label when value is null. Default `None`.'
|
|
331
|
+
},
|
|
332
|
+
format: {
|
|
333
|
+
type: 'string',
|
|
334
|
+
description: 'Number: `number` (default), `currency`, `percent`, or `compact` (K/M/B). Date: dayjs format string (default `YYYY-MM-DD HH:mm`).'
|
|
335
|
+
},
|
|
336
|
+
locale: {
|
|
337
|
+
type: 'string',
|
|
338
|
+
description: 'Number: BCP 47 locale for `Intl.NumberFormat` (e.g. `en-US`, `de-DE`). Defaults to browser.'
|
|
339
|
+
},
|
|
340
|
+
currency: {
|
|
341
|
+
type: 'string',
|
|
342
|
+
description: 'Number: ISO 4217 currency code when `format: currency`. Default `USD`.'
|
|
343
|
+
},
|
|
344
|
+
currencyDisplay: {
|
|
345
|
+
type: 'string',
|
|
346
|
+
enum: [
|
|
347
|
+
'symbol',
|
|
348
|
+
'narrowSymbol',
|
|
349
|
+
'code',
|
|
350
|
+
'name'
|
|
351
|
+
],
|
|
352
|
+
description: 'Number: currency display style when `format: currency`.'
|
|
353
|
+
},
|
|
354
|
+
decimals: {
|
|
355
|
+
type: 'number',
|
|
356
|
+
description: 'Number: fixed number of fraction digits (sets both `minimumFractionDigits` and `maximumFractionDigits`).'
|
|
357
|
+
},
|
|
358
|
+
minDecimals: {
|
|
359
|
+
type: 'number',
|
|
360
|
+
description: 'Number: `Intl.NumberFormat` `minimumFractionDigits`.'
|
|
361
|
+
},
|
|
362
|
+
maxDecimals: {
|
|
363
|
+
type: 'number',
|
|
364
|
+
description: 'Number: `Intl.NumberFormat` `maximumFractionDigits`.'
|
|
365
|
+
},
|
|
366
|
+
notation: {
|
|
367
|
+
type: 'string',
|
|
368
|
+
enum: [
|
|
369
|
+
'standard',
|
|
370
|
+
'scientific',
|
|
371
|
+
'engineering',
|
|
372
|
+
'compact'
|
|
373
|
+
],
|
|
374
|
+
description: 'Number: `Intl.NumberFormat` notation. `compact` format sets this automatically.'
|
|
375
|
+
},
|
|
376
|
+
useGrouping: {
|
|
377
|
+
type: 'boolean',
|
|
378
|
+
default: true,
|
|
379
|
+
description: 'Number: include thousands separators.'
|
|
380
|
+
},
|
|
381
|
+
negative: {
|
|
382
|
+
type: 'string',
|
|
383
|
+
enum: [
|
|
384
|
+
'minus',
|
|
385
|
+
'parentheses'
|
|
386
|
+
],
|
|
387
|
+
default: 'minus',
|
|
388
|
+
description: 'Number: how to render negative numbers — `minus` (default) or `parentheses` for accounting.'
|
|
389
|
+
},
|
|
390
|
+
signColor: {
|
|
391
|
+
type: 'boolean',
|
|
392
|
+
default: false,
|
|
393
|
+
description: 'Number: when true, positives use `positiveColor` (default success token), negatives use `negativeColor` (default error token).'
|
|
394
|
+
},
|
|
395
|
+
positiveColor: {
|
|
396
|
+
type: 'string',
|
|
397
|
+
description: 'Number: CSS colour when value > 0 (requires `signColor: true`).'
|
|
398
|
+
},
|
|
399
|
+
negativeColor: {
|
|
400
|
+
type: 'string',
|
|
401
|
+
description: 'Number: CSS colour when value < 0 (requires `signColor: true`).'
|
|
402
|
+
},
|
|
403
|
+
zeroColor: {
|
|
404
|
+
type: 'string',
|
|
405
|
+
description: 'Number: CSS colour when value === 0 (requires `signColor: true`).'
|
|
406
|
+
},
|
|
407
|
+
color: {
|
|
408
|
+
type: 'string',
|
|
409
|
+
description: 'Number: CSS colour applied to all values (overridden by `signColor`).'
|
|
410
|
+
},
|
|
411
|
+
prefix: {
|
|
412
|
+
type: 'string',
|
|
413
|
+
description: 'Number: literal prefix (e.g. `Δ `, `~`).'
|
|
414
|
+
},
|
|
415
|
+
align: {
|
|
416
|
+
type: 'string',
|
|
417
|
+
enum: [
|
|
418
|
+
'left',
|
|
419
|
+
'center',
|
|
420
|
+
'right'
|
|
421
|
+
],
|
|
422
|
+
description: 'Cell horizontal alignment. Defaults to `right` for `cell.type: number`. Sets `cellStyle.justifyContent` and `ag-*-aligned-header` on the header.'
|
|
423
|
+
},
|
|
424
|
+
buttons: {
|
|
425
|
+
type: 'array',
|
|
426
|
+
description: 'Buttons cell: list of buttons rendered per row. Each button triggers its own block-level event (declared in `events:`). Per-button properties mirror the `Button` block schema. `*Field` variants (`titleField`, `iconField`, `disabledField`, `hiddenField`) are row-data paths.',
|
|
427
|
+
items: {
|
|
428
|
+
type: 'object',
|
|
429
|
+
required: [
|
|
430
|
+
'eventName'
|
|
431
|
+
],
|
|
432
|
+
properties: {
|
|
433
|
+
eventName: {
|
|
434
|
+
type: 'string',
|
|
435
|
+
description: 'Block-level event name to trigger on click.'
|
|
436
|
+
},
|
|
437
|
+
title: {
|
|
438
|
+
type: 'string',
|
|
439
|
+
description: 'Title text on the button - supports html.'
|
|
440
|
+
},
|
|
441
|
+
titleField: {
|
|
442
|
+
type: 'string',
|
|
443
|
+
description: 'Row-data path for the title.'
|
|
444
|
+
},
|
|
445
|
+
icon: {
|
|
446
|
+
type: [
|
|
447
|
+
'string',
|
|
448
|
+
'object'
|
|
449
|
+
],
|
|
450
|
+
description: 'Name of a React-Icon or Icon block config.',
|
|
451
|
+
docs: {
|
|
452
|
+
displayType: 'icon'
|
|
453
|
+
}
|
|
454
|
+
},
|
|
455
|
+
iconField: {
|
|
456
|
+
type: 'string',
|
|
457
|
+
description: 'Row-data path for the icon name or config.'
|
|
458
|
+
},
|
|
459
|
+
type: {
|
|
460
|
+
type: 'string',
|
|
461
|
+
enum: [
|
|
462
|
+
'primary',
|
|
463
|
+
'default',
|
|
464
|
+
'dashed',
|
|
465
|
+
'link',
|
|
466
|
+
'text'
|
|
467
|
+
],
|
|
468
|
+
description: 'antd Button type.'
|
|
469
|
+
},
|
|
470
|
+
variant: {
|
|
471
|
+
type: 'string',
|
|
472
|
+
enum: [
|
|
473
|
+
'solid',
|
|
474
|
+
'outlined',
|
|
475
|
+
'dashed',
|
|
476
|
+
'filled',
|
|
477
|
+
'text',
|
|
478
|
+
'link'
|
|
479
|
+
],
|
|
480
|
+
description: 'antd Button variant. Takes precedence over `type` when set.'
|
|
481
|
+
},
|
|
482
|
+
color: {
|
|
483
|
+
type: 'string',
|
|
484
|
+
description: 'Button color (antd preset or hex).',
|
|
485
|
+
docs: {
|
|
486
|
+
displayType: 'color'
|
|
487
|
+
}
|
|
488
|
+
},
|
|
489
|
+
size: {
|
|
490
|
+
type: 'string',
|
|
491
|
+
enum: [
|
|
492
|
+
'small',
|
|
493
|
+
'default',
|
|
494
|
+
'large'
|
|
495
|
+
],
|
|
496
|
+
default: 'small',
|
|
497
|
+
description: 'Button size. Defaults to `small` inside cells.'
|
|
498
|
+
},
|
|
499
|
+
shape: {
|
|
500
|
+
type: 'string',
|
|
501
|
+
enum: [
|
|
502
|
+
'circle',
|
|
503
|
+
'round',
|
|
504
|
+
'square'
|
|
505
|
+
],
|
|
506
|
+
default: 'square'
|
|
507
|
+
},
|
|
508
|
+
danger: {
|
|
509
|
+
type: 'boolean',
|
|
510
|
+
default: false
|
|
511
|
+
},
|
|
512
|
+
ghost: {
|
|
513
|
+
type: 'boolean',
|
|
514
|
+
default: false
|
|
515
|
+
},
|
|
516
|
+
hideTitle: {
|
|
517
|
+
type: 'boolean',
|
|
518
|
+
default: false,
|
|
519
|
+
description: "Hide the button's title (icon-only)."
|
|
520
|
+
},
|
|
521
|
+
disabled: {
|
|
522
|
+
type: 'boolean',
|
|
523
|
+
default: false
|
|
524
|
+
},
|
|
525
|
+
disabledField: {
|
|
526
|
+
type: 'string',
|
|
527
|
+
description: 'Row-data path → boolean.'
|
|
528
|
+
},
|
|
529
|
+
hidden: {
|
|
530
|
+
type: 'boolean',
|
|
531
|
+
default: false,
|
|
532
|
+
description: 'Hide the button entirely.'
|
|
533
|
+
},
|
|
534
|
+
hiddenField: {
|
|
535
|
+
type: 'string',
|
|
536
|
+
description: 'Row-data path → boolean.'
|
|
537
|
+
}
|
|
538
|
+
}
|
|
539
|
+
}
|
|
540
|
+
},
|
|
541
|
+
options: {
|
|
542
|
+
type: 'array',
|
|
543
|
+
description: 'Selector / Multiple selector cell: dropdown options. An array of primitives, or objects mirroring the `Selector` block options: `{ label, value, disabled, color, filterString, style }`. `label` supports html.'
|
|
544
|
+
},
|
|
545
|
+
valueKey: {
|
|
546
|
+
type: 'string',
|
|
547
|
+
description: 'Selector / Multiple selector: field on each option object to use as its value. Defaults to `value`.'
|
|
548
|
+
},
|
|
549
|
+
primaryKey: {
|
|
550
|
+
type: 'string',
|
|
551
|
+
description: 'Selector / Multiple selector: field used to match the cell value to an option (identity key for object values).'
|
|
552
|
+
},
|
|
553
|
+
eventName: {
|
|
554
|
+
type: 'string',
|
|
555
|
+
description: 'Selector / Multiple selector: block-level event triggered on change. Event payload is `{ row, value, newValue }` (`newValue` is an array for `multipleSelector`).'
|
|
556
|
+
},
|
|
557
|
+
placeholder: {
|
|
558
|
+
type: 'string',
|
|
559
|
+
description: 'Selector / Multiple selector: placeholder text when empty.'
|
|
560
|
+
},
|
|
561
|
+
allowClear: {
|
|
562
|
+
type: 'boolean',
|
|
563
|
+
default: true,
|
|
564
|
+
description: 'Selector / Multiple selector: show a clear button.'
|
|
565
|
+
},
|
|
566
|
+
showSearch: {
|
|
567
|
+
type: 'boolean',
|
|
568
|
+
default: true,
|
|
569
|
+
description: 'Selector / Multiple selector: allow typing to filter options.'
|
|
570
|
+
},
|
|
571
|
+
size: {
|
|
572
|
+
type: 'string',
|
|
573
|
+
enum: [
|
|
574
|
+
'small',
|
|
575
|
+
'default',
|
|
576
|
+
'large'
|
|
577
|
+
],
|
|
578
|
+
default: 'small',
|
|
579
|
+
description: 'Selector / Multiple selector: input size. Defaults to `small` inside cells.'
|
|
580
|
+
},
|
|
581
|
+
disabled: {
|
|
582
|
+
type: 'boolean',
|
|
583
|
+
default: false,
|
|
584
|
+
description: 'Selector / Multiple selector: disable the input.'
|
|
585
|
+
},
|
|
586
|
+
variant: {
|
|
587
|
+
type: 'string',
|
|
588
|
+
enum: [
|
|
589
|
+
'outlined',
|
|
590
|
+
'filled',
|
|
591
|
+
'borderless',
|
|
592
|
+
'solid'
|
|
593
|
+
],
|
|
594
|
+
description: 'Selector / Multiple selector: visual variant. `solid` fills the control (single) or tags (multiple) with the selected option colour.'
|
|
595
|
+
},
|
|
596
|
+
bordered: {
|
|
597
|
+
type: 'boolean',
|
|
598
|
+
description: 'Selector / Multiple selector: set false for a borderless control. Deprecated alias of `variant: borderless`.'
|
|
599
|
+
},
|
|
600
|
+
showArrow: {
|
|
601
|
+
type: 'boolean',
|
|
602
|
+
description: 'Selector / Multiple selector: show the dropdown arrow.'
|
|
603
|
+
},
|
|
604
|
+
autoFocus: {
|
|
605
|
+
type: 'boolean',
|
|
606
|
+
default: false,
|
|
607
|
+
description: 'Selector / Multiple selector: focus the control on mount.'
|
|
608
|
+
},
|
|
609
|
+
maxTagCount: {
|
|
610
|
+
type: [
|
|
611
|
+
'number',
|
|
612
|
+
'string'
|
|
613
|
+
],
|
|
614
|
+
description: 'Multiple selector: max tags shown before collapsing (a number, or "responsive").'
|
|
615
|
+
},
|
|
616
|
+
autoClearSearchValue: {
|
|
617
|
+
type: 'boolean',
|
|
618
|
+
description: 'Multiple selector: clear the search box after each selection.'
|
|
619
|
+
},
|
|
620
|
+
checkedText: {
|
|
621
|
+
type: 'string',
|
|
622
|
+
description: 'Switch: label shown inside the switch when on.'
|
|
623
|
+
},
|
|
624
|
+
uncheckedText: {
|
|
625
|
+
type: 'string',
|
|
626
|
+
description: 'Switch: label shown inside the switch when off.'
|
|
627
|
+
},
|
|
628
|
+
checkedIcon: {
|
|
629
|
+
type: [
|
|
630
|
+
'string',
|
|
631
|
+
'object'
|
|
632
|
+
],
|
|
633
|
+
description: 'Switch: icon shown when on (React-Icon name or Icon block config).',
|
|
634
|
+
docs: {
|
|
635
|
+
displayType: 'icon'
|
|
636
|
+
}
|
|
637
|
+
},
|
|
638
|
+
uncheckedIcon: {
|
|
639
|
+
type: [
|
|
640
|
+
'string',
|
|
641
|
+
'object'
|
|
642
|
+
],
|
|
643
|
+
description: 'Switch: icon shown when off (React-Icon name or Icon block config).',
|
|
644
|
+
docs: {
|
|
645
|
+
displayType: 'icon'
|
|
646
|
+
}
|
|
647
|
+
},
|
|
648
|
+
inputType: {
|
|
649
|
+
type: 'string',
|
|
650
|
+
description: 'Text input: the HTML input type (e.g. `text`, `email`, `number`, `password`). Named `inputType` to avoid clashing with `cell.type`.'
|
|
651
|
+
},
|
|
652
|
+
maxLength: {
|
|
653
|
+
type: 'number',
|
|
654
|
+
description: 'Text input / Paragraph input: maximum number of characters.'
|
|
655
|
+
},
|
|
656
|
+
showCount: {
|
|
657
|
+
type: 'boolean',
|
|
658
|
+
description: 'Text input: show the character count.'
|
|
659
|
+
},
|
|
660
|
+
editable: {
|
|
661
|
+
type: 'boolean',
|
|
662
|
+
default: true,
|
|
663
|
+
description: 'Paragraph input: set false to render read-only text with no edit pencil.'
|
|
664
|
+
},
|
|
665
|
+
autoSize: {
|
|
666
|
+
type: [
|
|
667
|
+
'boolean',
|
|
668
|
+
'object'
|
|
669
|
+
],
|
|
670
|
+
description: 'Paragraph input: auto-size the inline edit textarea.'
|
|
671
|
+
},
|
|
672
|
+
editTooltip: {
|
|
673
|
+
type: [
|
|
674
|
+
'boolean',
|
|
675
|
+
'string'
|
|
676
|
+
],
|
|
677
|
+
description: 'Paragraph input: tooltip on the edit pencil.'
|
|
678
|
+
},
|
|
679
|
+
copyable: {
|
|
680
|
+
type: [
|
|
681
|
+
'boolean',
|
|
682
|
+
'object'
|
|
683
|
+
],
|
|
684
|
+
description: 'Paragraph input: show a copy-to-clipboard button.'
|
|
685
|
+
},
|
|
686
|
+
ellipsis: {
|
|
687
|
+
type: [
|
|
688
|
+
'boolean',
|
|
689
|
+
'object'
|
|
690
|
+
],
|
|
691
|
+
description: 'Paragraph input: truncate with an ellipsis (e.g. `{ rows: 2, expandable: true }`).'
|
|
692
|
+
},
|
|
693
|
+
code: {
|
|
694
|
+
type: 'boolean',
|
|
695
|
+
description: 'Paragraph input: render as inline code.'
|
|
696
|
+
},
|
|
697
|
+
strong: {
|
|
698
|
+
type: 'boolean',
|
|
699
|
+
description: 'Paragraph input: bold text.'
|
|
700
|
+
},
|
|
701
|
+
italic: {
|
|
702
|
+
type: 'boolean',
|
|
703
|
+
description: 'Paragraph input: italic text.'
|
|
704
|
+
},
|
|
705
|
+
underline: {
|
|
706
|
+
type: 'boolean',
|
|
707
|
+
description: 'Paragraph input: underlined text.'
|
|
708
|
+
},
|
|
709
|
+
delete: {
|
|
710
|
+
type: 'boolean',
|
|
711
|
+
description: 'Paragraph input: strikethrough text.'
|
|
712
|
+
},
|
|
713
|
+
mark: {
|
|
714
|
+
type: 'boolean',
|
|
715
|
+
description: 'Paragraph input: highlighted text.'
|
|
716
|
+
},
|
|
717
|
+
textType: {
|
|
718
|
+
type: 'string',
|
|
719
|
+
enum: [
|
|
720
|
+
'secondary',
|
|
721
|
+
'success',
|
|
722
|
+
'warning',
|
|
723
|
+
'danger'
|
|
724
|
+
],
|
|
725
|
+
description: 'Paragraph input: antd Typography semantic colour.'
|
|
726
|
+
}
|
|
727
|
+
}
|
|
728
|
+
}
|
|
729
|
+
}
|
|
730
|
+
}
|
|
731
|
+
}
|
|
732
|
+
}
|
|
733
|
+
}
|
|
734
|
+
};
|
|
735
|
+
}
|
|
736
|
+
export default createDisplayMeta;
|