@lowdefy/blocks-aggrid 5.0.0 → 5.2.0

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.
@@ -65,6 +65,14 @@
65
65
  rows: 'The displayed rows after sorting.',
66
66
  sort: 'The sort column state.'
67
67
  }
68
+ },
69
+ onCellLink: {
70
+ 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.',
71
+ event: {
72
+ link: 'The resolved link config (pageId/href/urlQuery/back/home/newTab).',
73
+ row: 'The row data.',
74
+ value: 'The cell value.'
75
+ }
68
76
  }
69
77
  },
70
78
  properties: {
@@ -87,6 +95,21 @@
87
95
  type: 'string',
88
96
  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/).'
89
97
  },
98
+ enableBrowserTooltips: {
99
+ type: 'boolean',
100
+ default: false,
101
+ description: "Set to `true` to use the browser native `title` attribute tooltips instead of AG Grid's styled tooltip component."
102
+ },
103
+ tooltipShowDelay: {
104
+ type: 'number',
105
+ default: 2000,
106
+ description: 'The delay in milliseconds before a tooltip is shown. Not applied when `enableBrowserTooltips` is `true`.'
107
+ },
108
+ tooltipHideDelay: {
109
+ type: 'number',
110
+ default: 10000,
111
+ description: 'The delay in milliseconds before a tooltip is hidden. Not applied when `enableBrowserTooltips` is `true`.'
112
+ },
90
113
  defaultColDef: {
91
114
  type: 'object',
92
115
  description: 'Column properties which get applied to all columns. See all (https://www.ag-grid.com/javascript-data-grid/column-properties/).'
@@ -138,6 +161,243 @@
138
161
  'string'
139
162
  ],
140
163
  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.'
164
+ },
165
+ tooltipField: {
166
+ type: 'string',
167
+ 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."
168
+ },
169
+ tooltipValueGetter: {
170
+ type: 'object',
171
+ description: 'Provide a function (using the `_function` operator) that returns the tooltip value for a cell. Overrides `tooltipField`.'
172
+ },
173
+ tooltipComponent: {
174
+ type: 'object',
175
+ description: 'Provide a custom tooltip component. See AG Grid tooltip component docs (https://www.ag-grid.com/react-data-grid/component-tooltip/).'
176
+ },
177
+ ellipsis: {
178
+ type: 'number',
179
+ description: 'Line-clamp count for long text. Automatically enables `wrapText` and `autoHeight` and applies the `.lf-ellipsis-N` class (1–6).'
180
+ },
181
+ cell: {
182
+ type: 'object',
183
+ 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.',
184
+ properties: {
185
+ type: {
186
+ type: 'string',
187
+ enum: [
188
+ 'tag',
189
+ 'avatar',
190
+ 'link',
191
+ 'date',
192
+ 'boolean',
193
+ 'progress',
194
+ 'number'
195
+ ],
196
+ description: 'The built-in renderer to use.'
197
+ },
198
+ colorMap: {
199
+ type: 'object',
200
+ description: 'Tag: map of cell value → color (antd tag color name or hex). Used when `cell.type: tag`.'
201
+ },
202
+ colorFrom: {
203
+ type: 'string',
204
+ description: 'Tag: row-data path to a color value. Takes precedence over `colorMap`.'
205
+ },
206
+ default: {
207
+ type: 'string',
208
+ description: 'Tag: fallback color for values not in `colorMap`.'
209
+ },
210
+ nameField: {
211
+ type: 'string',
212
+ description: 'Avatar: row-data path for the name label.'
213
+ },
214
+ srcField: {
215
+ type: 'string',
216
+ description: 'Avatar: row-data path for the image src (optional).'
217
+ },
218
+ idField: {
219
+ type: 'string',
220
+ description: 'Avatar: row-data path for an id used to seed initials colour.'
221
+ },
222
+ shape: {
223
+ type: 'string',
224
+ enum: [
225
+ 'circle',
226
+ 'square'
227
+ ],
228
+ description: 'Avatar shape. Defaults to `circle`.'
229
+ },
230
+ link: {
231
+ type: 'object',
232
+ description: 'Avatar/Link: navigation config. Emits `onCellLink` on click. `pageId`/`href`/`back`/`home`/`newTab` are literal; `urlQuery` values are row-data paths.'
233
+ },
234
+ pageId: {
235
+ type: 'string',
236
+ description: 'Link: target page id (literal).'
237
+ },
238
+ href: {
239
+ type: 'string',
240
+ description: 'Link: literal href (overrides `pageId`).'
241
+ },
242
+ back: {
243
+ type: 'boolean',
244
+ description: 'Link: navigate back.'
245
+ },
246
+ home: {
247
+ type: 'boolean',
248
+ description: 'Link: navigate home.'
249
+ },
250
+ newTab: {
251
+ type: 'boolean',
252
+ description: 'Link: open in a new tab.'
253
+ },
254
+ urlQuery: {
255
+ type: 'object',
256
+ description: 'Link: query params. Each value is a row-data path.'
257
+ },
258
+ labelField: {
259
+ type: 'string',
260
+ description: 'Link: row-data path for the visible label (falls back to cell value).'
261
+ },
262
+ format: {
263
+ type: 'string',
264
+ description: 'Date: dayjs format string. Default `YYYY-MM-DD HH:mm`.'
265
+ },
266
+ relative: {
267
+ type: 'boolean',
268
+ description: 'Date: render as relative time (e.g. "3 hours ago").'
269
+ },
270
+ trueLabel: {
271
+ type: 'string',
272
+ description: 'Boolean: label when truthy.'
273
+ },
274
+ falseLabel: {
275
+ type: 'string',
276
+ description: 'Boolean: label when falsy.'
277
+ },
278
+ trueColor: {
279
+ type: 'string',
280
+ description: 'Boolean: CSS colour when truthy.'
281
+ },
282
+ falseColor: {
283
+ type: 'string',
284
+ description: 'Boolean: CSS colour when falsy.'
285
+ },
286
+ thresholds: {
287
+ type: 'array',
288
+ description: 'Progress: threshold values (ascending). Each threshold defines where the next colour starts.',
289
+ items: {
290
+ type: 'number'
291
+ }
292
+ },
293
+ colors: {
294
+ type: 'array',
295
+ description: 'Progress: colour per bucket (length = thresholds.length + 1).',
296
+ items: {
297
+ type: 'string'
298
+ }
299
+ },
300
+ suffix: {
301
+ type: 'string',
302
+ description: 'Number/Progress: literal suffix appended after the formatted value. Default `%` for progress.'
303
+ },
304
+ nullLabel: {
305
+ type: 'string',
306
+ description: 'Progress: label when value is null. Default `None`.'
307
+ },
308
+ format: {
309
+ type: 'string',
310
+ description: 'Number: `number` (default), `currency`, `percent`, or `compact` (K/M/B). Date: dayjs format string (default `YYYY-MM-DD HH:mm`).'
311
+ },
312
+ locale: {
313
+ type: 'string',
314
+ description: 'Number: BCP 47 locale for `Intl.NumberFormat` (e.g. `en-US`, `de-DE`). Defaults to browser.'
315
+ },
316
+ currency: {
317
+ type: 'string',
318
+ description: 'Number: ISO 4217 currency code when `format: currency`. Default `USD`.'
319
+ },
320
+ currencyDisplay: {
321
+ type: 'string',
322
+ enum: [
323
+ 'symbol',
324
+ 'narrowSymbol',
325
+ 'code',
326
+ 'name'
327
+ ],
328
+ description: 'Number: currency display style when `format: currency`.'
329
+ },
330
+ decimals: {
331
+ type: 'number',
332
+ description: 'Number: fixed number of fraction digits (sets both `minimumFractionDigits` and `maximumFractionDigits`).'
333
+ },
334
+ minDecimals: {
335
+ type: 'number',
336
+ description: 'Number: `Intl.NumberFormat` `minimumFractionDigits`.'
337
+ },
338
+ maxDecimals: {
339
+ type: 'number',
340
+ description: 'Number: `Intl.NumberFormat` `maximumFractionDigits`.'
341
+ },
342
+ notation: {
343
+ type: 'string',
344
+ enum: [
345
+ 'standard',
346
+ 'scientific',
347
+ 'engineering',
348
+ 'compact'
349
+ ],
350
+ description: 'Number: `Intl.NumberFormat` notation. `compact` format sets this automatically.'
351
+ },
352
+ useGrouping: {
353
+ type: 'boolean',
354
+ default: true,
355
+ description: 'Number: include thousands separators.'
356
+ },
357
+ negative: {
358
+ type: 'string',
359
+ enum: [
360
+ 'minus',
361
+ 'parentheses'
362
+ ],
363
+ default: 'minus',
364
+ description: 'Number: how to render negative numbers — `minus` (default) or `parentheses` for accounting.'
365
+ },
366
+ signColor: {
367
+ type: 'boolean',
368
+ default: false,
369
+ description: 'Number: when true, positives use `positiveColor` (default success token), negatives use `negativeColor` (default error token).'
370
+ },
371
+ positiveColor: {
372
+ type: 'string',
373
+ description: 'Number: CSS colour when value > 0 (requires `signColor: true`).'
374
+ },
375
+ negativeColor: {
376
+ type: 'string',
377
+ description: 'Number: CSS colour when value < 0 (requires `signColor: true`).'
378
+ },
379
+ zeroColor: {
380
+ type: 'string',
381
+ description: 'Number: CSS colour when value === 0 (requires `signColor: true`).'
382
+ },
383
+ color: {
384
+ type: 'string',
385
+ description: 'Number: CSS colour applied to all values (overridden by `signColor`).'
386
+ },
387
+ prefix: {
388
+ type: 'string',
389
+ description: 'Number: literal prefix (e.g. `Δ `, `~`).'
390
+ },
391
+ align: {
392
+ type: 'string',
393
+ enum: [
394
+ 'left',
395
+ 'center',
396
+ 'right'
397
+ ],
398
+ description: 'Cell horizontal alignment. Defaults to `right` for `cell.type: number`. Sets `cellStyle.justifyContent` and `ag-*-aligned-header` on the header.'
399
+ }
400
+ }
141
401
  }
142
402
  }
143
403
  }
@@ -86,6 +86,14 @@
86
86
  toIndex: 'The new row index.',
87
87
  newRowData: 'All row data after reorder.'
88
88
  }
89
+ },
90
+ onCellLink: {
91
+ 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.',
92
+ event: {
93
+ link: 'The resolved link config (pageId/href/urlQuery/back/home/newTab).',
94
+ row: 'The row data.',
95
+ value: 'The cell value.'
96
+ }
89
97
  }
90
98
  },
91
99
  properties: {
@@ -108,6 +116,21 @@
108
116
  type: 'string',
109
117
  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
118
  },
119
+ enableBrowserTooltips: {
120
+ type: 'boolean',
121
+ default: false,
122
+ description: "Set to `true` to use the browser native `title` attribute tooltips instead of AG Grid's styled tooltip component."
123
+ },
124
+ tooltipShowDelay: {
125
+ type: 'number',
126
+ default: 2000,
127
+ description: 'The delay in milliseconds before a tooltip is shown. Not applied when `enableBrowserTooltips` is `true`.'
128
+ },
129
+ tooltipHideDelay: {
130
+ type: 'number',
131
+ default: 10000,
132
+ description: 'The delay in milliseconds before a tooltip is hidden. Not applied when `enableBrowserTooltips` is `true`.'
133
+ },
111
134
  defaultColDef: {
112
135
  type: 'object',
113
136
  description: 'Column properties which get applied to all columns. See all (https://www.ag-grid.com/javascript-data-grid/column-properties/).'
@@ -172,6 +195,243 @@
172
195
  'string'
173
196
  ],
174
197
  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.'
198
+ },
199
+ tooltipField: {
200
+ type: 'string',
201
+ 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."
202
+ },
203
+ tooltipValueGetter: {
204
+ type: 'object',
205
+ description: 'Provide a function (using the `_function` operator) that returns the tooltip value for a cell. Overrides `tooltipField`.'
206
+ },
207
+ tooltipComponent: {
208
+ type: 'object',
209
+ description: 'Provide a custom tooltip component. See AG Grid tooltip component docs (https://www.ag-grid.com/react-data-grid/component-tooltip/).'
210
+ },
211
+ ellipsis: {
212
+ type: 'number',
213
+ description: 'Line-clamp count for long text. Automatically enables `wrapText` and `autoHeight` and applies the `.lf-ellipsis-N` class (1–6).'
214
+ },
215
+ cell: {
216
+ type: 'object',
217
+ 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.',
218
+ properties: {
219
+ type: {
220
+ type: 'string',
221
+ enum: [
222
+ 'tag',
223
+ 'avatar',
224
+ 'link',
225
+ 'date',
226
+ 'boolean',
227
+ 'progress',
228
+ 'number'
229
+ ],
230
+ description: 'The built-in renderer to use.'
231
+ },
232
+ colorMap: {
233
+ type: 'object',
234
+ description: 'Tag: map of cell value → color (antd tag color name or hex). Used when `cell.type: tag`.'
235
+ },
236
+ colorFrom: {
237
+ type: 'string',
238
+ description: 'Tag: row-data path to a color value. Takes precedence over `colorMap`.'
239
+ },
240
+ default: {
241
+ type: 'string',
242
+ description: 'Tag: fallback color for values not in `colorMap`.'
243
+ },
244
+ nameField: {
245
+ type: 'string',
246
+ description: 'Avatar: row-data path for the name label.'
247
+ },
248
+ srcField: {
249
+ type: 'string',
250
+ description: 'Avatar: row-data path for the image src (optional).'
251
+ },
252
+ idField: {
253
+ type: 'string',
254
+ description: 'Avatar: row-data path for an id used to seed initials colour.'
255
+ },
256
+ shape: {
257
+ type: 'string',
258
+ enum: [
259
+ 'circle',
260
+ 'square'
261
+ ],
262
+ description: 'Avatar shape. Defaults to `circle`.'
263
+ },
264
+ link: {
265
+ type: 'object',
266
+ description: 'Avatar/Link: navigation config. Emits `onCellLink` on click. `pageId`/`href`/`back`/`home`/`newTab` are literal; `urlQuery` values are row-data paths.'
267
+ },
268
+ pageId: {
269
+ type: 'string',
270
+ description: 'Link: target page id (literal).'
271
+ },
272
+ href: {
273
+ type: 'string',
274
+ description: 'Link: literal href (overrides `pageId`).'
275
+ },
276
+ back: {
277
+ type: 'boolean',
278
+ description: 'Link: navigate back.'
279
+ },
280
+ home: {
281
+ type: 'boolean',
282
+ description: 'Link: navigate home.'
283
+ },
284
+ newTab: {
285
+ type: 'boolean',
286
+ description: 'Link: open in a new tab.'
287
+ },
288
+ urlQuery: {
289
+ type: 'object',
290
+ description: 'Link: query params. Each value is a row-data path.'
291
+ },
292
+ labelField: {
293
+ type: 'string',
294
+ description: 'Link: row-data path for the visible label (falls back to cell value).'
295
+ },
296
+ format: {
297
+ type: 'string',
298
+ description: 'Date: dayjs format string. Default `YYYY-MM-DD HH:mm`.'
299
+ },
300
+ relative: {
301
+ type: 'boolean',
302
+ description: 'Date: render as relative time (e.g. "3 hours ago").'
303
+ },
304
+ trueLabel: {
305
+ type: 'string',
306
+ description: 'Boolean: label when truthy.'
307
+ },
308
+ falseLabel: {
309
+ type: 'string',
310
+ description: 'Boolean: label when falsy.'
311
+ },
312
+ trueColor: {
313
+ type: 'string',
314
+ description: 'Boolean: CSS colour when truthy.'
315
+ },
316
+ falseColor: {
317
+ type: 'string',
318
+ description: 'Boolean: CSS colour when falsy.'
319
+ },
320
+ thresholds: {
321
+ type: 'array',
322
+ description: 'Progress: threshold values (ascending). Each threshold defines where the next colour starts.',
323
+ items: {
324
+ type: 'number'
325
+ }
326
+ },
327
+ colors: {
328
+ type: 'array',
329
+ description: 'Progress: colour per bucket (length = thresholds.length + 1).',
330
+ items: {
331
+ type: 'string'
332
+ }
333
+ },
334
+ suffix: {
335
+ type: 'string',
336
+ description: 'Number/Progress: literal suffix appended after the formatted value. Default `%` for progress.'
337
+ },
338
+ nullLabel: {
339
+ type: 'string',
340
+ description: 'Progress: label when value is null. Default `None`.'
341
+ },
342
+ format: {
343
+ type: 'string',
344
+ description: 'Number: `number` (default), `currency`, `percent`, or `compact` (K/M/B). Date: dayjs format string (default `YYYY-MM-DD HH:mm`).'
345
+ },
346
+ locale: {
347
+ type: 'string',
348
+ description: 'Number: BCP 47 locale for `Intl.NumberFormat` (e.g. `en-US`, `de-DE`). Defaults to browser.'
349
+ },
350
+ currency: {
351
+ type: 'string',
352
+ description: 'Number: ISO 4217 currency code when `format: currency`. Default `USD`.'
353
+ },
354
+ currencyDisplay: {
355
+ type: 'string',
356
+ enum: [
357
+ 'symbol',
358
+ 'narrowSymbol',
359
+ 'code',
360
+ 'name'
361
+ ],
362
+ description: 'Number: currency display style when `format: currency`.'
363
+ },
364
+ decimals: {
365
+ type: 'number',
366
+ description: 'Number: fixed number of fraction digits (sets both `minimumFractionDigits` and `maximumFractionDigits`).'
367
+ },
368
+ minDecimals: {
369
+ type: 'number',
370
+ description: 'Number: `Intl.NumberFormat` `minimumFractionDigits`.'
371
+ },
372
+ maxDecimals: {
373
+ type: 'number',
374
+ description: 'Number: `Intl.NumberFormat` `maximumFractionDigits`.'
375
+ },
376
+ notation: {
377
+ type: 'string',
378
+ enum: [
379
+ 'standard',
380
+ 'scientific',
381
+ 'engineering',
382
+ 'compact'
383
+ ],
384
+ description: 'Number: `Intl.NumberFormat` notation. `compact` format sets this automatically.'
385
+ },
386
+ useGrouping: {
387
+ type: 'boolean',
388
+ default: true,
389
+ description: 'Number: include thousands separators.'
390
+ },
391
+ negative: {
392
+ type: 'string',
393
+ enum: [
394
+ 'minus',
395
+ 'parentheses'
396
+ ],
397
+ default: 'minus',
398
+ description: 'Number: how to render negative numbers — `minus` (default) or `parentheses` for accounting.'
399
+ },
400
+ signColor: {
401
+ type: 'boolean',
402
+ default: false,
403
+ description: 'Number: when true, positives use `positiveColor` (default success token), negatives use `negativeColor` (default error token).'
404
+ },
405
+ positiveColor: {
406
+ type: 'string',
407
+ description: 'Number: CSS colour when value > 0 (requires `signColor: true`).'
408
+ },
409
+ negativeColor: {
410
+ type: 'string',
411
+ description: 'Number: CSS colour when value < 0 (requires `signColor: true`).'
412
+ },
413
+ zeroColor: {
414
+ type: 'string',
415
+ description: 'Number: CSS colour when value === 0 (requires `signColor: true`).'
416
+ },
417
+ color: {
418
+ type: 'string',
419
+ description: 'Number: CSS colour applied to all values (overridden by `signColor`).'
420
+ },
421
+ prefix: {
422
+ type: 'string',
423
+ description: 'Number: literal prefix (e.g. `Δ `, `~`).'
424
+ },
425
+ align: {
426
+ type: 'string',
427
+ enum: [
428
+ 'left',
429
+ 'center',
430
+ 'right'
431
+ ],
432
+ description: 'Cell horizontal alignment. Defaults to `right` for `cell.type: number`. Sets `cellStyle.justifyContent` and `ag-*-aligned-header` on the header.'
433
+ }
434
+ }
175
435
  }
176
436
  }
177
437
  }